/*
Type: PE
Platform: windows-x86
Architecture: x86

Libraries: 
  ADVAPI32.dll
  USER32.dll
  KERNEL32.dll
  RPCRT4.dll
  SHELL32.dll
  IMM32.dll
  COMCTL32.dll
  MSVCP70.dll
  MSVCR70.dll
  OLEAUT32.dll
  VERSION.dll
  WSOCK32.dll
  MSACM32.dll
  WINMM.dll
  GDI32.dll
  ole32.dll
  DSOUND.dll
  zlib1.dll

Compiler(s) Used: 
  Imported Functions (552 objects)
  VS2003 v7.1 .NET build 3077 (57 objects)
  VS2003 v7.1 | Windows Server 2003 SP1 DDK build 4035 (169 objects)
  MASM 6.14.8444 (9 objects)
  VB 6.0 SP3 build 8495 and VS 6.0 SP4 build 8799 (2 objects)
  VS 6.0 SP5 Processor Pack build 9044 and Windows XP SP1 DDK (34 objects)
  Windows XP SP1 DDK and VS2001 v7.0 Beta 2 build 9254 (35 objects)
  Windows XP SP1 DDK and VS2001 v7.0 Beta 2 build 9254 (29 objects)
  VS2002 v7.0 .NET build 9466 (751 objects)
  VS2002 v7.0 .NET build 9466 and VB 6.0 SP6 / VC++ build 9782 (1 objects)

Segments:
r--  0x00400000-0x00401000 
r-x  0x00401000-0x00791dd0  {Code}
r--  0x00792000-0x008093a6  {Data}
rw-  0x0080a000-0x009057d4  {Data}
rw-  0x00906000-0x00907ba0  {Data}
r--  0x00908000-0x00913b08  {Data}
r--  0x00914000-0x0096b356  {Data}
---  0x0096b360-0x0096b930 
---  0x0096b930-0x0096b944 

Sections:
0x00401000-0x00791dd0  .text  {Code}
0x00792000-0x008093a6  .rdata  {Read-only data}
0x0080a000-0x009057d4  .data  {Writable data}
0x00906000-0x00907ba0  .data1  {Writable data}
0x00908000-0x00913b08  .rsrc  {Read-only data}
0x00914000-0x0096b356  .reloc  {Read-only data}
0x0096b360-0x0096b930  .extern  {External}
0x0096b930-0x0096b944  .synthetic_builtins  {External}
*/
00400000  struct _GUID IID_ISeekingPassThru = 
00400000    [Guid("00905a4d-0003-0000-0400-0000ffff0000")]

00400010                                                  b8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00                  ........@.......
00400020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 01 00 00  ............................H...
00400040  __dos_stub:
00400040  0e 1f ba 0e 00 b4 09 cd 21 b8 01 4c cd 21 54 68 69 73 20 70 72 6f 67 72 61 6d 20 63 61 6e 6e 6f  ........!..L.!This program canno
00400060  74 20 62 65 20 72 75 6e 20 69 6e 20 44 4f 53 20 6d 6f 64 65 2e 0d 0d 0a 24 00 00 00 00 00 00 00  t be run in DOS mode....$.......

00400080  struct Rich_Header __rich_header = 
00400080  {
00400080      uint32_t e_magic__DanS = 0x86fc3b53
00400084      uint32_t e_align[0x3] = 
00400084      {
00400084          [0x0] =  0xd5925a17
00400088          [0x1] =  0xd5925a17
0040008c          [0x2] =  0xd5925a17
00400090      }
00400090      uint32_t e_entry_id0__00252233 = 0xd5b77824
00400094      uint32_t e_entry_count0__2 = 0xd5925a15
00400098      uint32_t e_entry_id1__004024fa = 0xd5d27eed
0040009c      uint32_t e_entry_count1__12 = 0xd5925a1b
004000a0      uint32_t e_entry_id2__001924fa = 0xd58b7eed
004000a4      uint32_t e_entry_count2__6 = 0xd5925a11
004000a8      uint32_t e_entry_id3__001c24fa = 0xd58e7eed
004000ac      uint32_t e_entry_count3__14 = 0xd5925a19
004000b0      uint32_t e_entry_id4__00600c05 = 0xd5f25612
004000b4      uint32_t e_entry_count4__53 = 0xd5925a22
004000b8      uint32_t e_entry_id5__005f0c05 = 0xd5cd5612
004000bc      uint32_t e_entry_count5__2 = 0xd5925a15
004000c0      uint32_t e_entry_id6__001220fc = 0xd5807aeb
004000c4      uint32_t e_entry_count6__9 = 0xd5925a1e
004000c8      uint32_t e_entry_id7__00000000 = 0xd5925a17
004000cc      uint32_t e_entry_count7__25 = 0xd5925a0e
004000d0      uint32_t e_entry_id8__005d0c05 = 0xd5cf5612
004000d4      uint32_t e_entry_count8__2 = 0xd5925a15
004000d8      uint32_t e_entry_id9__000f0fc3 = 0xd59d55d4
004000dc      uint32_t e_entry_count9__6 = 0xd5925a11
004000e0      uint32_t e_entry_id10__00600fc3 = 0xd5f255d4
004000e4      uint32_t e_entry_count10__142 = 0xd5925a99
004000e8      uint32_t e_entry_id11__005f0fc3 = 0xd5cd55d4
004000ec      uint32_t e_entry_count11__19 = 0xd5925a04
004000f0      uint32_t e_entry_id12__005d0fc3 = 0xd5cf55d4
004000f4      uint32_t e_entry_count12__2 = 0xd5925a15
004000f8      uint32_t e_entry_id13__001923fa = 0xd58b79ed
004000fc      uint32_t e_entry_count13__29 = 0xd5925a0a
00400100      uint32_t e_entry_id14__00010000 = 0xd5935a17
00400104      uint32_t e_entry_count14__527 = 0xd5925818
00400108      uint32_t e_entry_id15__002723ca = 0xd5b579dd
0040010c      uint32_t e_entry_count15__34 = 0xd5925a35
00400110      uint32_t e_entry_id16__001c23da = 0xd58e79cd
00400114      uint32_t e_entry_count16__35 = 0xd5925a34
00400118      uint32_t e_entry_id17__001d24fa = 0xd58f7eed
0040011c      uint32_t e_entry_count17__718 = 0xd59258d9
00400120      uint32_t e_entry_id18__004524fa = 0xd5d77eed
00400124      uint32_t e_entry_count18__1 = 0xd5925a16
00400128      uint32_t e_entry_id19__003d2594 = 0xd5af7f83
0040012c      uint32_t e_entry_count19__1 = 0xd5925a16
00400130      char e_magic[0x4] = "Rich"
00400134      uint32_t e_checksum = 0xd5925a17
00400138  }

00400138                                                                          00 00 00 00 00 00 00 00                          ........
00400140  00 00 00 00 00 00 00 00                                                                          ........

00400148  struct COFF_Header __coff_header = 
00400148  {
00400148      char magic[0x4] = "PE\x00", 0
0040014c      enum coff_machine machine = IMAGE_FILE_MACHINE_I386
0040014e      uint16_t numberOfSections = 0x6
00400150      uint32_t timeDateStamp = 0x52291f34
00400154      uint32_t pointerToSymbolTable = 0x0
00400158      uint32_t numberOfSymbols = 0x0
0040015c      uint16_t sizeOfOptionalHeader = 0xe0
0040015e      enum coff_characteristics characteristics = IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_LINE_NUMS_STRIPPED | IMAGE_FILE_LOCAL_SYMS_STRIPPED | IMAGE_FILE_LARGE_ADDRESS_AWARE | IMAGE_FILE_32BIT_MACHINE
00400160  }
00400160  struct PE32_Optional_Header __pe32_optional_header = 
00400160  {
00400160      enum pe_magic magic = PE_32BIT
00400162      uint8_t majorLinkerVersion = 0x7
00400163      uint8_t minorLinkerVersion = 0x0
00400164      uint32_t sizeOfCode = 0x391000
00400168      uint32_t sizeOfInitializedData = 0x1da000
0040016c      uint32_t sizeOfUninitializedData = 0x0
00400170      uint32_t addressOfEntryPoint = 0x1de03a
00400174      uint32_t baseOfCode = 0x1000
00400178      uint32_t baseOfData = 0x392000
0040017c      uint32_t imageBase = 0x400000
00400180      uint32_t sectionAlignment = 0x1000
00400184      uint32_t fileAlignment = 0x1000
00400188      uint16_t majorOperatingSystemVersion = 0x4
0040018a      uint16_t minorOperatingSystemVersion = 0x0
0040018c      uint16_t majorImageVersion = 0x0
0040018e      uint16_t minorImageVersion = 0x0
00400190      uint16_t majorSubsystemVersion = 0x4
00400192      uint16_t minorSubsystemVersion = 0x0
00400194      uint32_t win32VersionValue = 0x0
00400198      uint32_t sizeOfImage = 0x56c000
0040019c      uint32_t sizeOfHeaders = 0x1000
004001a0      uint32_t checkSum = 0x49d162
004001a4      enum pe_subsystem subsystem = IMAGE_SUBSYSTEM_WINDOWS_GUI
004001a6      enum pe_dll_characteristics dllCharacteristics = 0
004001a8      uint32_t sizeOfStackReserve = 0x100000
004001ac      uint32_t sizeOfStackCommit = 0x1000
004001b0      uint32_t sizeOfHeapReserve = 0x100000
004001b4      uint32_t sizeOfHeapCommit = 0x1000
004001b8      uint32_t loaderFlags = 0x0
004001bc      uint32_t numberOfRvaAndSizes = 0x10
004001c0      struct PE_Data_Directory_Entry exportTableEntry = 
004001c0      {
004001c0          uint32_t virtualAddress = 0x0
004001c4          uint32_t size = 0x0
004001c8      }
004001c8      struct PE_Data_Directory_Entry importTableEntry = 
004001c8      {
004001c8          uint32_t virtualAddress = 0x4074e8
004001cc          uint32_t size = 0x17c
004001d0      }
004001d0      struct PE_Data_Directory_Entry resourceTableEntry = 
004001d0      {
004001d0          uint32_t virtualAddress = 0x508000
004001d4          uint32_t size = 0xbb08
004001d8      }
004001d8      struct PE_Data_Directory_Entry exceptionTableEntry = 
004001d8      {
004001d8          uint32_t virtualAddress = 0x0
004001dc          uint32_t size = 0x0
004001e0      }
004001e0      struct PE_Data_Directory_Entry certificateTableEntry = 
004001e0      {
004001e0          uint32_t virtualAddress = 0x0
004001e4          uint32_t size = 0x0
004001e8      }
004001e8      struct PE_Data_Directory_Entry baseRelocationTableEntry = 
004001e8      {
004001e8          uint32_t virtualAddress = 0x514000
004001ec          uint32_t size = 0x47f90
004001f0      }
004001f0      struct PE_Data_Directory_Entry debugEntry = 
004001f0      {
004001f0          uint32_t virtualAddress = 0x392620
004001f4          uint32_t size = 0x1c
004001f8      }
004001f8      struct PE_Data_Directory_Entry architectureEntry = 
004001f8      {
004001f8          uint32_t virtualAddress = 0x0
004001fc          uint32_t size = 0x0
00400200      }
00400200      struct PE_Data_Directory_Entry globalPtrEntry = 
00400200      {
00400200          uint32_t virtualAddress = 0x0
00400204          uint32_t size = 0x0
00400208      }
00400208      struct PE_Data_Directory_Entry tlsTableEntry = 
00400208      {
00400208          uint32_t virtualAddress = 0x0
0040020c          uint32_t size = 0x0
00400210      }
00400210      struct PE_Data_Directory_Entry loadConfigTableEntry = 
00400210      {
00400210          uint32_t virtualAddress = 0x0
00400214          uint32_t size = 0x0
00400218      }
00400218      struct PE_Data_Directory_Entry boundImportEntry = 
00400218      {
00400218          uint32_t virtualAddress = 0x0
0040021c          uint32_t size = 0x0
00400220      }
00400220      struct PE_Data_Directory_Entry iatEntry = 
00400220      {
00400220          uint32_t virtualAddress = 0x392000
00400224          uint32_t size = 0x618
00400228      }
00400228      struct PE_Data_Directory_Entry delayImportDescriptorEntry = 
00400228      {
00400228          uint32_t virtualAddress = 0x0
0040022c          uint32_t size = 0x0
00400230      }
00400230      struct PE_Data_Directory_Entry clrRuntimeHeaderEntry = 
00400230      {
00400230          uint32_t virtualAddress = 0x0
00400234          uint32_t size = 0x0
00400238      }
00400238      struct PE_Data_Directory_Entry reservedEntry = 
00400238      {
00400238          uint32_t virtualAddress = 0x0
0040023c          uint32_t size = 0x0
00400240      }
00400240  }
00400240  struct Section_Header __section_headers[0x6] = 
00400240  {
00400240      [0x0] = 
00400240      {
00400240          char name[0x8] = ".text\x00\x00", 0
00400248          uint32_t virtualSize = 0x390dd0
0040024c          uint32_t virtualAddress = 0x1000
00400250          uint32_t sizeOfRawData = 0x391000
00400254          uint32_t pointerToRawData = 0x1000
00400258          uint32_t pointerToRelocations = 0x0
0040025c          uint32_t pointerToLineNumbers = 0x0
00400260          uint16_t numberOfRelocations = 0x0
00400262          uint16_t numberOfLineNumbers = 0x0
00400264          enum pe_section_flags characteristics = IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ
00400268      }
00400268      [0x1] = 
00400268      {
00400268          char name[0x8] = ".rdata\x00", 0
00400270          uint32_t virtualSize = 0x773a6
00400274          uint32_t virtualAddress = 0x392000
00400278          uint32_t sizeOfRawData = 0x78000
0040027c          uint32_t pointerToRawData = 0x392000
00400280          uint32_t pointerToRelocations = 0x0
00400284          uint32_t pointerToLineNumbers = 0x0
00400288          uint16_t numberOfRelocations = 0x0
0040028a          uint16_t numberOfLineNumbers = 0x0
0040028c          enum pe_section_flags characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
00400290      }
00400290      [0x2] = 
00400290      {
00400290          char name[0x8] = ".data\x00\x00", 0
00400298          uint32_t virtualSize = 0xfb7d4
0040029c          uint32_t virtualAddress = 0x40a000
004002a0          uint32_t sizeOfRawData = 0x2d000
004002a4          uint32_t pointerToRawData = 0x40a000
004002a8          uint32_t pointerToRelocations = 0x0
004002ac          uint32_t pointerToLineNumbers = 0x0
004002b0          uint16_t numberOfRelocations = 0x0
004002b2          uint16_t numberOfLineNumbers = 0x0
004002b4          enum pe_section_flags characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE
004002b8      }
004002b8      [0x3] = 
004002b8      {
004002b8          char name[0x8] = ".data1\x00", 0
004002c0          uint32_t virtualSize = 0x1ba0
004002c4          uint32_t virtualAddress = 0x506000
004002c8          uint32_t sizeOfRawData = 0x2000
004002cc          uint32_t pointerToRawData = 0x437000
004002d0          uint32_t pointerToRelocations = 0x0
004002d4          uint32_t pointerToLineNumbers = 0x0
004002d8          uint16_t numberOfRelocations = 0x0
004002da          uint16_t numberOfLineNumbers = 0x0
004002dc          enum pe_section_flags characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE
004002e0      }
004002e0      [0x4] = 
004002e0      {
004002e0          char name[0x8] = ".rsrc\x00\x00", 0
004002e8          uint32_t virtualSize = 0xbb08
004002ec          uint32_t virtualAddress = 0x508000
004002f0          uint32_t sizeOfRawData = 0xc000
004002f4          uint32_t pointerToRawData = 0x439000
004002f8          uint32_t pointerToRelocations = 0x0
004002fc          uint32_t pointerToLineNumbers = 0x0
00400300          uint16_t numberOfRelocations = 0x0
00400302          uint16_t numberOfLineNumbers = 0x0
00400304          enum pe_section_flags characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
00400308      }
00400308      [0x5] = 
00400308      {
00400308          char name[0x8] = ".reloc\x00", 0
00400310          uint32_t virtualSize = 0x57356
00400314          uint32_t virtualAddress = 0x514000
00400318          uint32_t sizeOfRawData = 0x58000
0040031c          uint32_t pointerToRawData = 0x445000
00400320          uint32_t pointerToRelocations = 0x0
00400324          uint32_t pointerToLineNumbers = 0x0
00400328          uint16_t numberOfRelocations = 0x0
0040032a          uint16_t numberOfLineNumbers = 0x0
0040032c          enum pe_section_flags characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_DISCARDABLE | IMAGE_SCN_MEM_READ
00400330      }
00400330  }

00400330                                                  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00                  ................
00400340  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400360  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400380  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004003a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004003c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004003e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400400  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400420  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400440  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400460  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400480  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004004a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004004c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004004e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400500  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400520  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400540  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400560  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400580  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004005a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004005c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004005e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400600  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400620  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400640  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400660  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400680  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004006a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004006c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004006e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400700  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400720  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400740  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400760  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400780  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004007a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004007c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004007e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400800  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400820  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400840  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400860  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400880  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004008a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004008c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004008e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400900  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400920  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400940  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400960  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400980  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004009a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004009c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
004009e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400a00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400a20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400a40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400a60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400a80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400aa0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400ac0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400ae0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400b00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400b20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400b40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400b60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400b80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400ba0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400bc0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400be0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400c00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400c20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400c40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400c60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400c80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400ca0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400cc0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400ce0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400d00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400d20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400d40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400d60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400d80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400da0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400dc0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400de0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400e00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400e20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400e40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400e60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400e80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400ea0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400ec0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400ee0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400f00  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400f20  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400f40  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400f60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400f80  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400fa0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400fc0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................
00400fe0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................................

.text section started  {0x401000-0x791dd0}

00401000  void __stdcall `vector constructor iterator'(void* arg1, uint32_t arg2, int32_t arg3, void* (* arg4)(void*))

00401000  {
00401005      if ((arg3 - 1) >= 0)
00401005      {
00401012          void* esi_1 = arg1;
00401017          int32_t i_1 = arg3;
00401027          int32_t i;
00401027          
00401027          do
00401027          {
00401022              void* edi;
00401022              arg4(edi);
00401024              esi_1 += arg2;
00401026              i = i_1;
00401026              i_1 -= 1;
00401027          } while (i != 1);
00401005      }
00401000  }


00401030  void __stdcall `vector destructor iterator'(void* arg1, uint32_t arg2, int32_t arg3, void (* arg4)(void*))

00401030  {
00401043      void* esi_1 = ((char*)arg1 + (arg2 * arg3));
00401043      
00401046      if ((arg3 - 1) >= 0)
00401046      {
0040104e          int32_t i_1 = arg3;
00401058          int32_t i;
00401058          
00401058          do
00401058          {
00401051              esi_1 -= arg2;
00401055              void* edi;
00401055              arg4(edi);
00401057              i = i_1;
00401057              i_1 -= 1;
00401058          } while (i != 1);
00401046      }
00401030  }

00401061     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00401070  char* ps_strcpy(char* arg1, char const* arg2)

00401070  {
0040107d      char const* ecx_1 = arg2;
00401088      char const i;
00401088      
00401088      do
00401088      {
00401080          i = *(uint8_t*)ecx_1;
00401082          *(uint8_t*)((arg1 - arg2) + ecx_1) = i;
00401085          ecx_1 = &ecx_1[1];
00401088      } while (i != 0);
0040108b      return arg1;
00401070  }

0040108c                                      90 90 90 90                                                              ....

00401090  uint32_t __fastcall PackObj::GetPackSize(class PackObj const* this)

00401090  {
00401092      /* tailcall */
00401092      return this->vtable->GetPackSize(this);
00401090  }

00401095                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004010a0  uint32_t __fastcall ReferenceCountTemplate<268435456,0>::Release(class ReferenceCountTemplate<268435456,0> const* this)

004010a0  {
004010b0      if (InterlockedDecrement(&this->m_cRef) != 0)
004010b6          return this->m_cRef;
004010b6      
004010b9      if (this != 0)
004010bb          this->vtable->__vecDelDtor(this, 1);
004010bb      
004010c7      return 0;
004010a0  }

004010c8                          90 90 90 90 90 90 90 90                                                          ........

004010d0  uint8_t BitUtils::AllAreOn(uint32_t arg1, uint32_t arg2) __pure

004010d0  {
004010da      uint32_t eax_2 = ((arg1 & arg2) - arg2);
004010dc      int32_t eax_3 = -(eax_2);
004010e1      return (((int8_t)(eax_3 - eax_3)) + 1);
004010d0  }

004010e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004010f0  void ClientMain::ClientCleanUp(class Client* arg1)

004010f0  {
004010f7      if (arg1 != 0)
004010f7      {
004010f9          arg1->vtable->Cleanup(arg1);
00401100          arg1->vtable->Release(arg1);
004010f7      }
004010f7      
00401107      CFactory::CleanUp();
0040110d      /* tailcall */
0040110d      return AC1Legacy::Version::Cleanup();
004010f0  }

00401112                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00401120  void ClientMain::ConfigureFPU()

00401120  {
00401128      Turbine::Debug::SetFloatingPointException(0, 0x80017);
0040113d      _control87(0x10000, 0x30000);
00401146      _control87(0, 0x300);
0040114f      _control87(0, 0x40000);
00401120  }

00401156                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00401160  class Client* ConstructClassObjectEx<Client,Interface>(struct Turbine_GUID const* arg1)

00401160  {
00401179      int32_t var_8 = 0;
00401188      class TResult __return;
00401188      InterfaceSystem::CreateInstance(InterfaceSystem::GetInstance(), &__return, arg1, &Interface_InterfaceType, nullptr, &var_8);
00401199      int32_t eax_1;
00401199      eax_1 = __return < 0;
004011a2      return ((eax_1 - 1) & var_8);
00401160  }

004011a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004011b0  void __fastcall PStringBase<unsigned short>::~PStringBase<unsigned short>(class PStringBase<unsigned short>* this)

004011b0  {
004011b3      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = (this->m_charbuffer - 0x14);
004011b3      
004011c6      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004011ce          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004011b0  }

004011d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004011e0  void* __thiscall AC1Legacy::PSRefBuffer<char>::`scalar deleting destructor'(class AC1Legacy::PSRefBuffer<char>* this, uint32_t arg2)

004011e0  {
004011e8      this->vtable = 0x7ca074;
004011e8      
004011ee      if ((arg2 & 1) != 0)
004011f1          operator delete(this);
004011f1      
004011fc      return this;
004011e0  }

004011ff                                                                                               90                                 .

00401200  void __fastcall SmartArray<unsigned long,1>::~SmartArray<unsigned long,1>(class SmartArray<unsigned long,1>* this)

00401200  {
0040120d      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00401212          operator delete[](this->m_data);
00401200  }

00401219                                                                             90 90 90 90 90 90 90                           .......

00401220  void* __thiscall AC1Legacy::PStringBase<char>::`vector deleting destructor'(class AC1Legacy::PStringBase<char>* this, uint32_t arg2)

00401220  {
00401220      class AC1Legacy::PStringBase<char>* var_4 = this;
00401220      
0040122a      if ((arg2 & 2) == 0)
0040122a      {
00401281          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
00401281          
00401293          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00401295              m_buffer_1->vtable->__vecDelDtor(m_buffer_1, 1);
00401295          
004012a2          if ((arg2 & 1) != 0)
004012a5              operator delete(this);
004012a5          
004012b2          return this;
0040122a      }
0040122a      
0040122c      int32_t m_buffer = this->m_buffer;
00401233      void* edi = &this[m_buffer];
00401233      
00401237      if ((m_buffer - 1) >= 0)
00401237      {
00401241          var_4 = m_buffer;
00401265          class AC1Legacy::PStringBase<char>* i;
00401265          
00401265          do
00401265          {
00401245              int32_t* esi_1 = *(uint32_t*)((char*)edi - 4);
00401248              edi -= 4;
00401248              
00401257              if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0040125f                  **(uint32_t**)esi_1(1);
0040125f              
00401261              i = var_4;
00401261              var_4 -= 1;
00401265          } while (i != 1);
00401237      }
00401237      
0040126d      if ((arg2 & 1) != 0)
00401270          operator delete[](&this[-1]);
00401270      
0040127e      return &this[-1];
00401220  }

004012b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004012c0  uint8_t __thiscall PStringBase<char>::allocate_ref_buffer(class PStringBase<char>* this, uint32_t arg2)

004012c0  {
004012cf      uint32_t var_10;
004012cf      int32_t esi;
004012cf      
004012cf      if (arg2 >= 0x10)
004012cf      {
004012dc          int32_t eax_4;
004012dc          
004012dc          if (arg2 > 0x10000)
004012ff              eax_4 = ((arg2 & 0xffff0000) + 0x10000);
004012dc          else
004012dc          {
004012e9              int32_t eflags_1;
004012e9              char eax_3;
004012e9              eax_3 = __bsr_gprv_memv((arg2 * 2));
004012f6              eax_4 = (1 << (eax_3 + 1));
004012dc          }
004012dc          
00401304          esi = (eax_4 - 0x10);
00401304          
00401309          if (esi != 0)
00401312              var_10 = (esi + 0x24);
00401309          else
0040130b              var_10 = 0x24;
004012cf      }
004012cf      else
004012cf      {
004012d1          esi = 0;
004012d3          var_10 = 0x24;
004012cf      }
004012cf      
00401313      void* eax_6 = operator new[](var_10);
00401313      
0040131d      if (eax_6 == 0)
0040131d      {
0040131f          eax_6 = 0;
00401325          return 0;
0040131d      }
0040131d      
00401328      *(uint32_t*)((char*)eax_6 + 4) = 1;
0040132f      *(uint32_t*)eax_6 = 0x7ca074;
00401335      *(uint32_t*)((char*)eax_6 + 0x10) = 1;
0040133c      *(uint32_t*)((char*)eax_6 + 8) = 1;
00401343      *(uint32_t*)((char*)eax_6 + 0xc) = 0xffffffff;
0040134a      *(uint8_t*)((char*)eax_6 + 0x14) = 0;
00401355      *(uint32_t*)this = ((char*)eax_6 + 0x14);
00401362      *(uint32_t*)(this->m_charbuffer - 4) = (arg2 + 1);
0040136e      *(uint32_t*)(this->m_charbuffer - 0xc) = (esi + 0x10);
00401371      class PStringBase<char>* eax_10;
00401371      eax_10 = 1;
00401377      return 1;
004012c0  }

0040137a                                                                                90 90 90 90 90 90                            ......

00401380  void __thiscall PStringBase<char>::PStringBase<char>(class PStringBase<char>* this, char const* arg2)

00401380  {
00401388      class PStringBase<char>* this_1 = this;
00401388      
0040138f      if ((arg2 == 0 || *(uint8_t*)arg2 == 0))
0040138f      {
004013c1          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004013cc          this_1->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004013ce          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
004013d8          return;
0040138f      }
0040138f      
00401391      char const* eax = arg2;
00401391      
0040139b      do
0040139b      {
00401396          this = *(uint8_t*)eax;
00401398          eax = &eax[1];
0040139b      } while (this != 0);
0040139b      
004013a2      PStringBase<char>::allocate_ref_buffer(this_1, (eax - &eax[1]));
004013a7      class PSRefBufferCharData<char>* m_charbuffer = this_1->m_charbuffer;
004013a9      char const* ecx_1 = arg2;
004013b8      char const i;
004013b8      
004013b8      do
004013b8      {
004013b0          i = *(uint8_t*)ecx_1;
004013b2          ecx_1 = &ecx_1[1];
004013b3          m_charbuffer->m_data[0] = i;
004013b5          m_charbuffer = &m_charbuffer->m_data[1];
004013b8      } while (i != 0);
00401380  }

004013ad                                         8d 49 00                                                               .I.
004013db                                                                                   90 90 90 90 90                             .....

004013e0  int32_t WinMain(struct HINSTANCE__* arg1, struct HINSTANCE__* arg2, char* arg3, int32_t arg4)

004013e0  {
004013fc      if (Turbine::Debug::Init(&data_7928ac, &data_7928af, 0xe08) == 0)
004013fc      {
00401414          ErrorStream::operator<<(ErrorStream::operator<<(&perr, "Could not initialize Debugging f…"), endp);
00401421          return 1;
004013fc      }
004013fc      
00401428      void var_c;
00401428      SmartBuffer::SmartBuffer(&var_c);
00401437      void* var_18 = nullptr;
0040143f      int32_t var_14 = 0;
00401447      int32_t var_10 = 0;
00401447      
00401460      if (ConvertCommandLineToArgList(GetCommandLineA(), &var_c, &var_18) == 0)
00401460      {
00401472          if ((var_14 & 0x80000000) == 0x80000000)
00401479              operator delete[](var_18);
00401479          
00401485          SmartBuffer::~SmartBuffer(&var_c);
00401492          return 1;
00401460      }
00401460      
0040149c      void* edi = var_18;
004014a0      ClientMain::ConfigureFPU();
004014ac      ProgramTypeSystem::s_eProgramType = GameClient_ProgramType;
004014b6      IError::AddDataErrorHandlers(DataError_Normal, &PStringBase<char>::null_string);
004014bb      APIManager::Init();
004014c3      AC1Legacy::Version::Init(*(uint32_t*)edi);
004014c8      ACCFactory::Init();
004014d2      class Client* eax_7 = ConstructClassObjectEx<Client,Interface>(&Client_ClassType);
004014d2      
004014de      if (eax_7 != 0)
004014de      {
0040152f          if (eax_7->vtable->ParseArgs(&eax_7->vtable, edi, var_10, 1) != 0)
0040152f          {
0040155a              void var_1c;
0040155a              PStringBase<char>::PStringBase<char>(&var_1c, "Asheron's Call");
0040155a              
00401571              if (eax_7->vtable->Init(eax_7, &var_1c, 1, 1) != 0)
00401571              {
00401593                  eax_7->vtable->Run(eax_7);
0040159b                  ClientMain::ClientCleanUp(eax_7);
004015a7                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
004015b0                  SmartArray<unsigned long,1>::~SmartArray<unsigned long,1>(&var_18);
004015b9                  SmartBuffer::~SmartBuffer(&var_c);
004015c6                  return 0;
00401571              }
00401571              
00401574              ClientMain::ClientCleanUp(eax_7);
00401580              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
00401589              SmartArray<unsigned long,1>::~SmartArray<unsigned long,1>(&var_18);
0040152f          }
0040152f          else
0040152f          {
00401532              ClientMain::ClientCleanUp(eax_7);
00401532              
00401548              if ((var_14 & 0x80000000) == 0x80000000)
00401501                  operator delete[](var_18);
0040152f          }
004014de      }
004014de      else
004014de      {
004014e0          CFactory::CleanUp();
004014e5          AC1Legacy::Version::Cleanup();
004014e5          
004014fa          if ((var_14 & 0x80000000) == 0x80000000)
00401501              operator delete[](var_18);
004014de      }
004014de      
0040150d      SmartBuffer::~SmartBuffer(&var_c);
0040151d      return 1;
004013e0  }

004015c9                             90 90 90 90 90 90 90                                                           .......

004015d0  void Serializer::SerializeBytes(uint8_t* arg1, uint32_t arg2, class Archive* arg3)

004015d0  {
004015dd      uint8_t* eax = Archive::GetBytes(arg3, arg2);
004015dd      
004015e4      if (eax != 0)
004015e4      {
004015ec          if ((arg3->m_flags & 1) != 0)
004015ec          {
004015f9              int32_t esi_2;
004015f9              int32_t edi_2;
004015f9              edi_2 = __builtin_memcpy(eax, arg1, ((arg2 >> 2) << 2));
00401600              __builtin_memcpy(edi_2, esi_2, (arg2 & 3));
00401604              return;
004015ec          }
004015ec          
00401610          int32_t esi_4;
00401610          int32_t edi_4;
00401610          edi_4 = __builtin_memcpy(arg1, eax, ((arg2 >> 2) << 2));
00401617          __builtin_memcpy(edi_4, esi_4, (arg2 & 3));
004015e4      }
004015d0  }

0040161c                                                                                      90 90 90 90                              ....

00401620  void NoticeHandler::RecvNotice_ServerSaysMoveItem(class NoticeHandler* this @ ecx, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9) __pure

00401620  {
00401620      return;
00401620  }

00401623           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00401630  void NoticeHandler::RecvNotice_UpdateGameView(class NoticeHandler* this @ ecx, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5) __pure

00401630  {
00401630      return;
00401630  }

00401633                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00401640  void __fastcall TransientArchive::TransientArchive(class TransientArchive* this, enum Archive::tagPacking arg2)

00401640  {
00401649      this->vtable = 0x792b3c;
0040164f      this->m_flags = 0;
00401655      this->m_hrError.m_val = 0;
00401658      SmartBuffer::SmartBuffer(&this->m_buffer);
00401661      this->m_currOffset = 0;
00401664      this->m_pcUserDataHash = nullptr;
00401667      this->m_pVersionStack = nullptr;
0040166a      this->vtable = 0x792b50;
0040167d      void var_c;
0040167d      Archive::InitForPacking(this, &Archive::SetCurrentCoreVersion, SmartBuffer::SmartBuffer(&var_c));
00401686      SmartBuffer::~SmartBuffer(&var_c);
00401640  }

00401695                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004016a0  void __thiscall TransientArchive::SetCheckpointing(class TransientArchive* this, uint8_t arg2)

004016a0  {
004016a0      /* tailcall */
004016a0      return Archive::SetCheckpointing(this, arg2);
004016a0  }

004016a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004016b0  void __thiscall TransientArchive::InitForPacking(class TransientArchive* this, class SmartBuffer const* arg2)

004016b0  {
004016ba      Archive::InitForPacking(this, &Archive::SetCurrentCoreVersion, arg2);
004016b0  }

004016c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004016d0  void __thiscall TransientArchive::InitForUnpacking(class TransientArchive* this, class SmartBuffer const* arg2)

004016d0  {
004016da      Archive::InitForUnpacking(this, &Archive::SetCurrentCoreVersion, arg2);
004016d0  }

004016e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004016f0  void __thiscall PStringBase<char>::set(class PStringBase<char>* this, class PStringBase<char> const* arg2)

004016f0  {
004016f8      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
004016f8      
004016fc      if (m_charbuffer == arg2->m_charbuffer)
00401732          return;
00401732      
00401712      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040171a          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040171a      
0040171c      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0040171f      this->m_charbuffer = m_charbuffer_1;
00401726      arg2 = &m_charbuffer_1[-1];
0040172a      /* tailcall */
0040172a      return InterlockedIncrement();
004016f0  }

00401735                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00401740  class GlobalRegistryInstance* GlobalRegistry::GetRegistry()

00401740  {
00401740      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00401740      
00401747      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00401747      {
0040174e          GlobalRegistry::s_pcGlobalRegistry_1 = operator new(0x8100);
0040174e          
00401758          if (GlobalRegistry::s_pcGlobalRegistry_1 != 0)
00401758          {
0040175c              class GlobalRegistryInstance* eax = GlobalRegistryInstance::GlobalRegistryInstance(GlobalRegistry::s_pcGlobalRegistry_1);
00401761              GlobalRegistry::s_pcGlobalRegistry = eax;
00401766              return eax;
00401758          }
00401758          
00401769          GlobalRegistry::s_pcGlobalRegistry = nullptr;
00401747      }
00401747      
0040176e      return GlobalRegistry::s_pcGlobalRegistry_1;
00401740  }

0040176f                                               90                                                                 .

00401770  uint8_t __fastcall gmClient::Disconnect(class gmClient* this)

00401770  {
00401770      /* tailcall */
00401770      return Client::Disconnect(this);
00401770  }

00401775                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00401780  void __thiscall gmClient::OnDDDEvent(class gmClient* this, enum DDDEvent arg2, uint32_t arg3)

00401780  {
0040178e      Client::OnDDDEvent(this, arg2, arg3);
0040178e      
00401796      if (arg2 == DDD_PatchtimeEnd)
004017a3          *(uint32_t*)(*(int32_t*)((char*)this + -0x1c) + 0x90)(0x8173b4);
00401780  }

004017ae                                            90 90                                                                ..

004017b0  uint8_t __fastcall gmClient::UseTime(class gmClient* this)

004017b0  {
004017b3      class IQueuedUIEventDeliverer* m_UIQueueManager = this->m_UIQueueManager;
004017b9      m_UIQueueManager->vtable->UseTime(m_UIQueueManager);
004017c1      /* tailcall */
004017c1      return Client::UseTime(this);
004017b0  }

004017c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004017d0  void gmClient::DetachUIPreferences(class gmClient* this @ ecx)

004017d0  {
004017d5      UIPreferences::DetachPreference(&Sound_SoundDisabled);
004017df      UIPreferences::DetachPreference(&Sound_SoundVolume);
004017e9      UIPreferences::DetachPreference(&Sound_AmbientSoundDisabled);
004017f3      UIPreferences::DetachPreference(&Sound_AmbientSoundVolume);
004017fd      UIPreferences::DetachPreference(&Sound_InterfaceSoundDisabled);
00401807      UIPreferences::DetachPreference(&Sound_InterfaceSoundVolume);
00401811      UIPreferences::DetachPreference(&Sound_SoundFeatures);
0040181b      UIPreferences::DetachPreference(&Sound_PlaySoundOnlyWhenActive);
00401825      UIPreferences::DetachPreference(&Misc_TooltipDelay);
0040182f      UIPreferences::DetachPreference(&Misc_TooltipEnable);
00401839      UIPreferences::DetachPreference(&Render_TextureFiltering);
00401843      UIPreferences::DetachPreference(&Render_BuildingDetailTextures);
0040184d      UIPreferences::DetachPreference(&Render_MultiPassAlpha);
00401857      UIPreferences::DetachPreference(&Render_LandscapeTextureDetail);
00401861      UIPreferences::DetachPreference(&Render_EnvironmentTextureDetail);
0040186b      UIPreferences::DetachPreference(&Render_SceneryDrawDistance);
00401878      UIPreferences::DetachPreference(&Render_LandscapeDrawDistance);
00401882      UIPreferences::DetachPreference(&Render_ScreenBrightness);
0040188c      UIPreferences::DetachPreference(&Display_FullScreen);
00401896      UIPreferences::DetachPreference(&Display_SyncToRefresh);
004018a0      UIPreferences::DetachPreference(&Display_Resolution);
004018aa      UIPreferences::DetachPreference(&Input_MouseLookSensitivity);
004018b4      UIPreferences::DetachPreference(&Input_InvertMouseLookYAxis);
004018be      UIPreferences::DetachPreference(&Camera_AlignToSlope);
004018c8      UIPreferences::DetachPreference(&Camera_Stiffness);
004018d2      UIPreferences::DetachPreference(&Camera_AdjustmentSpeed);
004018dc      UIPreferences::DetachPreference(&UI_ChatFontFace);
004018e6      UIPreferences::DetachPreference(&UI_ChatFontSize);
004017d0  }

004018ef                                               90                                                                 .

004018f0  void gmClient::GRPCallback_OnFontPreferenceChanged(class PStringBase<char> const* arg1)

004018f0  {
004018fd      CM_UI::SendNotice_FontSettingsChanged(gmClient::sm_nFontFace, gmClient::sm_nFontSize);
004018f0  }

00401906                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00401910  uint8_t __thiscall PStringBase<char>::operator==(class PStringBase<char> const* this, class PStringBase<char> const* arg2)

00401910  {
00401915      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00401917      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00401917      
0040191f      if (m_charbuffer->m_data[-4] == m_charbuffer_1->m_data[-4])
0040191f      {
00401921          int32_t ecx_1 = *(int32_t*)((char*)m_charbuffer + -8);
00401924          int32_t edx_1 = *(int32_t*)((char*)m_charbuffer_1 + -8);
00401924          
00401933          if (((ecx_1 == edx_1 || ecx_1 == 0xffffffff) || edx_1 == 0xffffffff))
00401933          {
0040193b              int32_t ebx;
0040193b              int32_t var_8 = ebx;
0040193b              
00401940              while (true)
00401940              {
00401940                  edx_1 = m_charbuffer->m_data[0];
00401942                  ebx = m_charbuffer_1->m_data[0];
00401944                  ecx_1 = edx_1;
00401946                  bool c_1 = edx_1 < ebx;
00401946                  
00401948                  if (edx_1 == ebx)
00401948                  {
0040194c                      if (ecx_1 == 0)
0040194c                          break;
0040194c                      
0040194e                      edx_1 = m_charbuffer->m_data[1];
00401951                      ebx = m_charbuffer_1->m_data[1];
00401954                      ecx_1 = edx_1;
00401956                      c_1 = edx_1 < ebx;
00401956                      
00401958                      if (edx_1 == ebx)
00401958                      {
0040195a                          m_charbuffer = &m_charbuffer->m_data[2];
0040195d                          m_charbuffer_1 = &m_charbuffer_1->m_data[2];
0040195d                          
00401962                          if (ecx_1 == 0)
00401962                              break;
00401962                          
00401962                          continue;
00401958                      }
00401948                  }
00401948                  
00401974                  bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00401981                  int32_t eax_2;
00401981                  eax_2 = (((char*)m_charbuffer - m_charbuffer) + 1) == 0;
00401984                  return eax_2;
00401940              }
00401940              
0040196e              int32_t eax;
0040196e              eax = 1;
00401971              return 1;
00401933          }
0040191f      }
0040191f      
00401935      m_charbuffer = 0;
00401938      return 0;
00401910  }

00401987                       90 90 90 90 90 90 90 90 90                                                         .........

00401990  void Serializer::SerializeObject(uint8_t* arg1, class Archive* arg2)

00401990  {
00401999      Archive::CheckAlignment(arg2, 1);
004019a2      uint8_t* eax = Archive::GetBytes(arg2, 1);
004019a2      
004019a9      if (eax != 0)
004019a9      {
004019b3          if ((arg2->m_flags & 1) != 0)
004019b3          {
004019b7              *(uint8_t*)eax = *(uint8_t*)arg1;
004019ba              return;
004019b3          }
004019b3          
004019bb          eax = *(uint8_t*)eax;
004019bd          *(uint8_t*)arg1 = eax;
004019a9      }
00401990  }

004019c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004019d0  void Serializer::SerializeObject(uint16_t* arg1, class Archive* arg2)

004019d0  {
004019d9      Archive::CheckAlignment(arg2, 2);
004019e2      uint8_t* eax = Archive::GetBytes(arg2, 2);
004019e2      
004019e9      if (eax != 0)
004019e9      {
004019ef          int16_t* ecx_2 = arg1;
004019ef          
004019f3          if ((arg2->m_flags & 1) != 0)
004019f3          {
004019f8              *(uint16_t*)eax = *(uint16_t*)ecx_2;
004019fc              return;
004019f3          }
004019f3          
004019fd          eax = *(uint16_t*)eax;
00401a00          *(uint16_t*)ecx_2 = eax;
004019e9      }
004019d0  }

00401a05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00401a10  uint32_t Tokenize(char const* arg1)

00401a10  {
00401a16      if (arg1 == 0)
00401a23          return 0;
00401a23      
00401a1c      /* tailcall */
00401a1c      return compute_str_hash(arg1);
00401a10  }

00401a24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00401a30  void __fastcall PStringBase<char>::PStringBase<char>(class PStringBase<char>* this)

00401a30  {
00401a30      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00401a3e      *(uint32_t*)this = PStringBase<char>::s_NullBuffer_1;
00401a40      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00401a30  }

00401a4a                                90 90 90 90 90 90                                                            ......

00401a50  class PStringBase<unsigned short>* __thiscall PStringBase<unsigned short>::operator=(class PStringBase<unsigned short>* this, class PStringBase<unsigned short> const* arg2)

00401a50  {
00401a58      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
00401a58      
00401a5c      if (m_charbuffer != arg2->m_charbuffer)
00401a5c      {
00401a72          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00401a7a              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00401a7a          
00401a7c          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_charbuffer;
00401a7e          this->m_charbuffer = m_charbuffer_1;
00401a84          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00401a5c      }
00401a5c      
00401a8f      return this;
00401a50  }

00401a92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00401aa0  void __fastcall PStringBase<unsigned short>::PStringBase<unsigned short>(class PStringBase<unsigned short>* this)

00401aa0  {
00401aa0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00401aae      *(uint32_t*)this = PStringBase<unsigned short>::s_NullBuffer_1;
00401ab0      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00401aa0  }

00401aba                                                                                90 90 90 90 90 90                            ......

00401ac0  HRESULT __stdcall Interface::IUnknown_QueryInterface(class Interface* this @ ecx, struct _GUID const* arg2, void** arg3)

00401ac0  {
00401ada      return *(uint32_t*)*(uint32_t*)(arg2->Data1 + 0xc)(&arg2, arg3, arg_c);
00401ac0  }

00401add                                                                                         90 90 90                               ...

00401ae0  uint32_t __stdcall Interface::IUnknown_AddRef(class Interface* this @ ecx)

00401ae0  {
00401ae9      return *(uint32_t*)(*(uint32_t*)arg_4 + 0x10)();
00401ae0  }

00401aec                                      90 90 90 90                                                              ....

00401af0  uint32_t __stdcall Interface::IUnknown_Release(class Interface* this @ ecx)

00401af0  {
00401af9      return *(uint32_t*)(*(uint32_t*)arg_4 + 0x14)();
00401af0  }

00401afc                                                                                      90 90 90 90                              ....

00401b00  void* __thiscall Turbine_RefCount::`scalar deleting destructor'(struct Turbine_RefCount* this, uint32_t arg2)

00401b00  {
00401b08      this->vtable = 0x792b6c;
00401b08      
00401b0e      if ((arg2 & 1) != 0)
00401b11          operator delete(this);
00401b11      
00401b1c      return this;
00401b00  }

00401b1f                                                                                               90                                 .

00401b20  void __fastcall gmClient::~gmClient(class gmClient* this)

00401b20  {
00401b32      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_startChar.m_charbuffer - 0x14);
00401b3f      *(uint32_t*)((char*)this - 0x1c) = 0x792c48;
00401b46      *(uint32_t*)((char*)this - 0x18) = 0x792bf8;
00401b4d      this->vtable = 0x792bec;
00401b53      this->m_ErrorText.m_charbuffer = 0x792be0;
00401b5a      this->m_CmdChars.m_charbuffer = 0x792bd0;
00401b38      this->pNetAuth_ = &gmClient::`vftable';
00401b38      
00401b70      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00401b78          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00401b78      
00401b80      void* __offset(NoticeHandler::VTable, -0x14) edi_3 = (this->vtable - 0x14);
00401b80      
00401b8f      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
00401b97          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
00401b97      
00401b9f      int32_t* edi_5 = (*(int32_t*)((char*)this + 0x134) - 0x14);
00401b9f      
00401bae      if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
00401bb6          **(uint32_t**)edi_5(1);
00401bb6      
00401bbe      void* edi_7 = (this->m_running_check.m_UniqueClientSemaphore - 0x14);
00401bbe      
00401bcd      if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
00401bd5          **(uint32_t**)edi_7(1);
00401bd5      
00401bdd      void* __offset(PacketController, -0x14) edi_9 = (this->packControl_ - 0x14);
00401bdd      
00401bec      if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
00401bf4          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_9) + -0x14)(1);
00401bf4      
00401bfc      void* __offset(NIList<NetBlob *>, -0x14) edi_11 = (this->m_logonEventQueue - 0x14);
00401bfc      
00401c0b      if ((InterlockedDecrement(((char*)edi_11 + 4)) == 0 && edi_11 != 0))
00401c13          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_11) + -0x14)(1);
00401c13      
00401c1b      void* __offset(SmartBox, -0x14) edi_13 = (this->smartbox_ - 0x14);
00401c1b      
00401c2a      if ((InterlockedDecrement(((char*)edi_13 + 4)) == 0 && edi_13 != 0))
00401c32          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_13) + -0x14)(1);
00401c32      
00401c37      int32_t ecx_8 = -(((char*)this - 0x1c));
00401c3d      NoticeHandler::~NoticeHandler(((ecx_8 - ecx_8) & &this->pNetAuth_));
00401c48      /* tailcall */
00401c48      return Client::~Client(this);
00401b20  }

00401c4d                                         90 90 90                                                               ...

00401c50  void __thiscall CPluginPrototype::OnPluggedIn(class CPluginPrototype* this, class CPluginManager* arg2)

00401c50  {
00401c54      this->m_pManager = arg2;
00401c50  }

00401c5a                                                                                90 90 90 90 90 90                            ......

00401c60  class accountID* __fastcall Client::GetAccountName(class Client* this) __pure

00401c60  {
00401c63      return &this->m_account;
00401c60  }

00401c64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00401c70  class PStringBase<char> const* __fastcall Client::GetHostName(class Client const* this) __pure

00401c70  {
00401c76      return &this->m_hostName;
00401c70  }

00401c77                                                                       90 90 90 90 90 90 90 90 90                         .........

00401c80  int32_t const __fastcall Client::GetPort(class Client const* this)

00401c80  {
00401c86      return this->m_port;
00401c80  }

00401c87                       90 90 90 90 90 90 90 90 90                                                         .........

00401c90  void __thiscall Client::SetPortA(class Client* this, int32_t const arg2)

00401c90  {
00401c94      this->m_port = arg2;
00401c90  }

00401c9d                                                                                         90 90 90                               ...

00401ca0  class PStringBase<unsigned short> const* __fastcall Client::GetWorldName(class Client const* this) __pure

00401ca0  {
00401ca6      return &this->m_worldName;
00401ca0  }

00401ca7                       90 90 90 90 90 90 90 90 90                                                         .........

00401cb0  uint8_t gmClient::`vector deleting destructor'(void* arg1, uint32_t arg2)

00401cb0  {
00401cb3      int32_t ecx;
00401cb3      /* tailcall */
00401cb3      return gmClient::`vector deleting destructor'((ecx - 8), arg1);
00401cb0  }

00401cb8                                                                          cc cc cc cc cc cc cc cc                          ........

00401cc0  int32_t __fastcall gmClient::`vector deleting destructor'(int32_t arg1)

00401cc0  {
00401cc3      /* tailcall */
00401cc3      return gmClient::`vector deleting destructor'((arg1 - 0xc));
00401cc0  }

00401cc8                          cc cc cc cc cc cc cc cc                                                          ........

00401cd0  class TResult* __thiscall Client::QueryInterface(class Client* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00401cd0  {
00401cda      if (arg3->m_data1 == 0xdeadbeef)
00401cda      {
00401cdc          int32_t edx;
00401cdc          edx = arg3->m_data2;
00401cdc          *(uint16_t*)((char*)edx)[2] = arg3->m_data3;
00401cdc          
00401ce5          if (edx == 0)
00401ce5          {
00401ce7              int32_t edx_1;
00401ce7              edx_1 = arg3->m_data4[0];
00401ce7              *(uint8_t*)((char*)edx_1)[1] = arg3->m_data4[1];
00401ce7              *(uint8_t*)((char*)edx_1)[2] = arg3->m_data4[2];
00401ce7              *(uint8_t*)((char*)edx_1)[3] = arg3->m_data4[3];
00401ce7              
00401cf0              if (edx_1 == 0)
00401cf0              {
00401cf2                  int32_t eax;
00401cf2                  eax = arg3->m_data4[4];
00401cf2                  *(uint8_t*)((char*)eax)[1] = arg3->m_data4[5];
00401cf2                  *(uint8_t*)((char*)eax)[2] = arg3->m_data4[6];
00401cf2                  *(uint8_t*)((char*)eax)[3] = arg3->m_data4[7];
00401cf2                  
00401cff                  if ((eax == 0xcdab0000 && this != 0))
00401cff                  {
00401d05                      *(uint32_t*)arg4 = this;
00401d07                      this->vtable->AddRef(this);
00401d10                      __return->m_val = 0;
00401d16                      return __return;
00401cff                  }
00401cf0              }
00401ce5          }
00401cda      }
00401cda      
00401d1d      __return->m_val = 0x80004002;
00401d23      return __return;
00401cd0  }

00401d26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00401d30  uint32_t __fastcall Client::AddRef(class Client const* this)

00401d30  {
00401d3a      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00401d30  }

00401d3b                                                                                   90 90 90 90 90                             .....

00401d40  uint32_t __fastcall Client::Release(class Client const* this)

00401d40  {
00401d47      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00401d47      
00401d54      if ((result == 0 && this != 0))
00401d56          this->vtable->__vecDelDtor(&this->vtable, 1);
00401d56      
00401d64      return result;
00401d40  }

00401d65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00401d70  uint32_t __fastcall ReferenceCountTemplate<1048576,2>::Release(class ReferenceCountTemplate<1048576,2> const* this)

00401d70  {
00401d7d      if (InterlockedDecrement(&this->m_cRef) == 0)
00401d86          return 0;
00401d86      
00401d82      return this->m_cRef;
00401d70  }

00401d87                       90 90 90 90 90 90 90 90 90                                                         .........

00401d90  void __fastcall gmClient::Cleanup(class gmClient* this)

00401d90  {
00401d94      int32_t esi;
00401d94      int32_t var_10 = esi;
00401d95      int32_t edi;
00401d95      int32_t var_14 = edi;
00401d95      int32_t* esp_1 = &var_14;
00401d98      gmClient::DetachUIPreferences(this);
00401d9d      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
00401da4      class NoticeHandler* PStringBase<char>::s_NullBuffer_3;
00401da4      
00401da4      if (eax != 0)
00401da4      {
00401da8          struct NoticeHandler::VTable** PStringBase<char>::s_NullBuffer_4;
00401da8          
00401da8          if (this == 0)
00401db2              PStringBase<char>::s_NullBuffer_4 = nullptr;
00401da8          else
00401daa              PStringBase<char>::s_NullBuffer_4 = &this->vtable;
00401daa          
00401db4          struct GlobalEventHandler::VTable* vtable = eax->vtable;
00401db6          PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_4;
00401db7          int32_t var_1c_1 = 0x186a2;
00401dbe          vtable->UnRegisterNoticeHandler(eax, 0x186a2, PStringBase<char>::s_NullBuffer_3);
00401dbe          esp_1 = &var_14;
00401da4      }
00401da4      
00401dc8      if (ICIDM::s_cidm != 0)
00401dc8      {
00401dde          if (this->m_strKeymapFile.m_charbuffer->m_data[-4] != 1)
00401dde          {
00401de4              class PSRefBufferCharData<char>* eax_2;
00401de4              eax_2 = this->m_bKeymapLoaded;
00401de4              
00401dec              if (eax_2 != 0)
00401dec              {
00401df2                  class PSRefBufferCharData<char>* m_charbuffer = UserPreferences::sm_strDefaultFile.m_charbuffer;
00401dfd                  class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
00401e04                  PStringBase<char>::s_NullBuffer_3 = &m_charbuffer[-1];
00401e05                  InterlockedIncrement(PStringBase<char>::s_NullBuffer_3);
00401e07                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00401e0c                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00401e13                  PStringBase<char>::s_NullBuffer_3 = &PStringBase<char>::s_NullBuffer_1[-1];
00401e14                  InterlockedIncrement(PStringBase<char>::s_NullBuffer_3);
00401e1a                  PStringBase<char>::s_NullBuffer_3 = &m_charbuffer_1;
00401e20                  PSUtils::get_directory(&PStringBase<char>::s_NullBuffer_2, PStringBase<char>::s_NullBuffer_3);
00401e2b                  PSUtils::path_append(&PStringBase<char>::s_NullBuffer_2, &this->m_strKeymapFile);
00401e34                  class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00401e3f                  PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00401e49                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00401e4b                  ICIDM::s_cidm_1->vtable->SaveKeyMap(ICIDM::s_cidm_1, PStringBase<char>::s_NullBuffer_3);
00401e6b                  void* ebx;
00401e6b                  
00401e6b                  if ((InterlockedDecrement(((char*)ebx - 0x10)) == 0 && ebx != 0x14))
00401e6b                  {
00401e6f                      int32_t var_1c_5 = 1;
00401e73                      **(uint32_t**)((char*)ebx - 0x14)(1);
00401e6b                  }
00401e6b                  
00401e79                  void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00401e80                  esp_1 = &PStringBase<char>::s_NullBuffer_3;
00401e80                  
00401e88                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00401e88                  {
00401e8c                      int32_t var_1c_7 = 1;
00401e90                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00401e90                      esp_1 = &PStringBase<char>::s_NullBuffer_3;
00401e88                  }
00401dec              }
00401dde          }
00401dde          
00401e92          ICIDM::s_cidm->vtable->ClearKeyMap();
00401dc8      }
00401dc8      
00401e9d      *(uint32_t*)((char*)esp_1 - 4) = 0x836560;
00401ea2      UserPreferences::UnregisterPreference();
00401ea7      *(uint32_t*)((char*)esp_1 - 8) = 0x836564;
00401eac      UserPreferences::UnregisterPreference();
00401eb1      *(uint32_t*)((char*)esp_1 - 0xc) = 0x836568;
00401eb6      UserPreferences::UnregisterPreference();
00401ec0      Client::Cleanup(this);
00401ec5      *(uint32_t*)esp_1;
00401e9d      esp_1[1];
00401e9d      esp_1[2];
00401d90  }

00401ecc                                      90 90 90 90                                                              ....

00401ed0  class NetError* __thiscall gmClient::Connect(class gmClient* this, class NetError* __return)

00401ed0  {
00401ed6      Client::Connect(this, __return);
00401ede      return __return;
00401ed0  }

00401ee1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00401ef0  void __thiscall gmClient::SetKeyMapFileName(class gmClient* this, class PStringBase<char> const* arg2)

00401ef0  {
00401ef8      class PSRefBufferCharData<char>* m_charbuffer = this->m_strKeymapFile.m_charbuffer;
00401ef8      
00401f00      if (m_charbuffer == arg2->m_charbuffer)
00401f3a          return;
00401f3a      
00401f16      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00401f1e          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00401f1e      
00401f20      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00401f23      this->m_strKeymapFile.m_charbuffer = m_charbuffer_1;
00401f2e      arg2 = &m_charbuffer_1[-1];
00401f32      /* tailcall */
00401f32      return InterlockedIncrement();
00401ef0  }

00401f3d                                                                                         90 90 90                               ...

00401f40  void __thiscall UserPreferences::RegisterPreference(class UserPreferences* this, class PStringBase<char>* arg2, class PStringBase<char> const* arg3, class PStringBase<char> const* arg4, void (* arg5)(class PStringBase<char> const*), uint32_t const arg6, class PStringBase<char>* arg7, uint32_t const* arg8)

00401f40  {
00401f43      class PStringBase<char>* esi = arg2;
00401f43      
00401f47      if (this != 0)
00401f66          GlobalRegistry::RegisterVariableInternal(this, GRVDataType_PString, esi, arg3, arg4, arg5, arg6, arg7);
00401f66      
00401f6e      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00401f6e      
00401f75      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00401f75      {
00401f7c          void* eax_4 = operator new(0x8100);
00401f7c          
00401f86          if (eax_4 == 0)
00401f91              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00401f86          else
00401f8a              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_4);
00401f8a          
00401f93          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00401f75      }
00401f75      
00401fa8      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, esi, &arg2) != 0)
00401fa8      {
00401fb0          void* eax_6 = *(int32_t*)((char*)arg2->m_charbuffer + 0x44)();
00401fb0          
00401fb5          if (eax_6 != 0)
00401fb7              *(uint8_t*)((char*)eax_6 + 0x28) = 1;
00401fa8      }
00401f40  }

00401fbe                                                                                            90 90                                ..

00401fc0  void __thiscall UserPreferences::RegisterPreference(class UserPreferences* this, uint32_t* arg2, class PStringBase<char> const* arg3, class PStringBase<char> const* arg4, void (* arg5)(class PStringBase<char> const*), uint32_t const arg6, class PStringBase<char>* arg7, uint32_t const* arg8)

00401fc0  {
00401fc3      uint32_t* esi = arg2;
00401fc3      
00401fc7      if (this != 0)
00401fe6          GlobalRegistry::RegisterVariableInternal(this, GRVDataType_UInt32, esi, arg3, arg4, arg5, arg6, arg7);
00401fe6      
00401fee      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00401fee      
00401ff5      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00401ff5      {
00401ffc          void* eax_4 = operator new(0x8100);
00401ffc          
00402006          if (eax_4 == 0)
00402011              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00402006          else
0040200a              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_4);
0040200a          
00402013          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00401ff5      }
00401ff5      
00402028      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, esi, &arg2) != 0)
00402028      {
00402030          void* eax_6 = *(uint32_t*)(*(uint32_t*)arg2 + 0x44)();
00402030          
00402035          if (eax_6 != 0)
00402037              *(uint8_t*)((char*)eax_6 + 0x28) = 1;
00402028      }
00401fc0  }

0040203e                                                                                            90 90                                ..

00402040  void __thiscall Client::SetHostName(class Client* this, class PStringBase<char> const* arg2)

00402040  {
00402048      class PSRefBufferCharData<char>* m_charbuffer = this->m_hostName.m_charbuffer;
00402048      
00402050      if (m_charbuffer == arg2->m_charbuffer)
0040208a          return;
0040208a      
00402066      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040206e          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040206e      
00402070      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00402073      this->m_hostName.m_charbuffer = m_charbuffer_1;
0040207e      arg2 = &m_charbuffer_1[-1];
00402082      /* tailcall */
00402082      return InterlockedIncrement();
00402040  }

0040208d                                         90 90 90                                                               ...

00402090  void __thiscall Client::SetWorldName(class Client* this, class PStringBase<unsigned short> const* arg2)

00402090  {
00402098      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_worldName.m_charbuffer;
00402098      
004020a0      if (m_charbuffer == arg2->m_charbuffer)
004020da          return;
004020da      
004020b6      if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
004020be          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004020be      
004020c0      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_charbuffer;
004020c3      this->m_worldName.m_charbuffer = m_charbuffer_1;
004020ce      arg2 = &m_charbuffer_1->m_data[-8];
004020d2      /* tailcall */
004020d2      return InterlockedIncrement();
00402090  }

004020dd                                                                                         90 90 90                               ...

004020e0  void __fastcall CommandLineArg::~CommandLineArg(struct CommandLineArg* this)

004020e0  {
004020ee      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->Description.m_charbuffer - 0x14);
004020ee      
004020fd      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00402105          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00402105      
0040210a      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->LongVersion.m_charbuffer - 0x14);
0040210a      
00402119      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00402121          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004020e0  }

00402127                       90 90 90 90 90 90 90 90 90                                                         .........

00402130  uint8_t __thiscall PStringBase<unsigned short>::allocate_ref_buffer(class PStringBase<unsigned short>* this, uint32_t arg2)

00402130  {
0040213f      uint32_t var_10;
0040213f      int32_t esi;
0040213f      
0040213f      if (arg2 >= 0x10)
0040213f      {
0040214c          int32_t eax_4;
0040214c          
0040214c          if (arg2 > 0x10000)
0040216f              eax_4 = ((arg2 & 0xffff0000) + 0x10000);
0040214c          else
0040214c          {
00402159              int32_t eflags_1;
00402159              char eax_3;
00402159              eax_3 = __bsr_gprv_memv((arg2 * 2));
00402166              eax_4 = (1 << (eax_3 + 1));
0040214c          }
0040214c          
00402174          esi = (eax_4 - 0x10);
00402174          
00402179          if (esi != 0)
00402183              var_10 = ((esi * 2) + 0x34);
00402179          else
0040217b              var_10 = 0x34;
0040213f      }
0040213f      else
0040213f      {
00402141          esi = 0;
00402143          var_10 = 0x34;
0040213f      }
0040213f      
00402184      void* eax_6 = operator new[](var_10);
00402184      
0040218e      if (eax_6 == 0)
0040218e      {
00402190          eax_6 = 0;
00402196          return 0;
0040218e      }
0040218e      
00402199      *(uint32_t*)((char*)eax_6 + 4) = 1;
004021a0      *(uint32_t*)eax_6 = 0x7ca074;
004021a6      *(uint32_t*)((char*)eax_6 + 0x10) = 1;
004021ad      *(uint32_t*)((char*)eax_6 + 8) = 1;
004021b4      *(uint32_t*)((char*)eax_6 + 0xc) = 0xffffffff;
004021bb      *(uint16_t*)((char*)eax_6 + 0x14) = 0;
004021c8      *(uint32_t*)this = ((char*)eax_6 + 0x14);
004021d5      *(uint32_t*)(this->m_charbuffer - 4) = (arg2 + 1);
004021e1      *(uint32_t*)(this->m_charbuffer - 0xc) = (esi + 0x10);
004021e4      class PStringBase<unsigned short>* eax_10;
004021e4      eax_10 = 1;
004021ea      return 1;
00402130  }

004021ed                                         90 90 90                                                               ...

004021f0  int32_t __thiscall PStringBase<char>::vsprintf(class PStringBase<char>* this, char const* arg2, char* arg3)

004021f0  {
00402200      int32_t result = _vscprintf(arg2, arg3);
00402210      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_charbuffer - 0x14);
00402213      PStringBase<char>::allocate_ref_buffer(this, result);
00402225      _vsnprintf(this->m_charbuffer, (result + 1), arg2, arg3);
00402225      
0040223e      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00402246          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00402246      
0040224e      return result;
004021f0  }

00402251                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00402260  void __thiscall PStringBase<char>::Serialize(class PStringBase<char>* this, class Archive* arg2)

00402260  {
00402261      class Archive* esi = arg2;
00402261      
0040226c      if ((esi->m_flags & 1) != 0)
00402274          arg2 = (this->m_charbuffer->m_data[-4] - 1);
00402274      
00402283      SB_As32Bit_Compressed::Serialize(&arg2, &arg2, esi);
00402283      
00402294      if ((((int8_t)(esi->m_flags >> 2)) & 1) == 0)
00402294      {
0040229f          char* ebx_1 = arg2;
0040229f          
004022a3          if ((!(esi->m_flags) & 1) != 0)
004022a3          {
004022ae              if (ebx_1 > Archive::GetSizeLeft(esi))
004022ae              {
004022b2                  Archive::RaiseError(esi);
004022ba                  return;
004022ae              }
004022ae              
004022c2              ReferenceCountTemplate<268435456,0>::Release((this->m_charbuffer - 0x14));
004022ca              PStringBase<char>::allocate_ref_buffer(this, ebx_1);
004022d1              *(uint8_t*)(ebx_1 + this->m_charbuffer) = 0;
004022a3          }
004022a3          
004022da          Serializer::SerializeBytes(this->m_charbuffer, ebx_1, esi);
00402294      }
00402260  }

004022e8                          90 90 90 90 90 90 90 90                                                          ........

004022f0  void __thiscall PStringBase<unsigned short>::append_n_chars(class PStringBase<unsigned short>* this, uint16_t const* arg2, uint32_t arg3)

004022f0  {
004022f0      uint16_t const* edx_1 = arg2;
004022f0      
00402308      if ((edx_1 != 0 && (*(uint16_t*)edx_1 != 0 && arg3 != 0)))
00402308      {
0040230a          class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
0040230d          int32_t ebx_1 = m_charbuffer->m_data[0x7ffffffffffffffe];
00402315          int32_t ecx = (ebx_1 + arg3);
00402315          
0040231d          if ((*(int32_t*)((char*)m_charbuffer + -0x10) != 1 || ecx > *(int32_t*)((char*)m_charbuffer + -0xc)))
0040231d          {
00402334              PStringBase<unsigned short>::allocate_ref_buffer(this, (ecx - 1));
00402340              wcscpy(this->m_charbuffer, m_charbuffer);
0040234b              ReferenceCountTemplate<268435456,0>::Release(&m_charbuffer->m_data[-0xa]);
00402350              edx_1 = arg2;
0040231d          }
0040231d          else
0040231d          {
0040231f              *(uint32_t*)((char*)m_charbuffer - 4) = ecx;
00402324              *(uint32_t*)(this->m_charbuffer - 8) = 0xffffffff;
0040231d          }
0040231d          
0040235d          wcsncpy(&this->m_charbuffer->m_data[(ebx_1 - 1)], edx_1, arg3);
00402363          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_charbuffer;
0040236c          m_charbuffer_1->m_data[(m_charbuffer_1->m_data[0x7ffffffffffffffe] - 1)] = 0;
00402308      }
004022f0  }

00402379                                                                             90 90 90 90 90 90 90                           .......

00402380  int32_t __thiscall PStringBase<unsigned short>::vsprintf(class PStringBase<unsigned short>* this, uint16_t const* arg2, char* arg3)

00402380  {
00402390      int32_t result = _vscwprintf(arg2, arg3);
004023a0      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = (this->m_charbuffer - 0x14);
004023a3      PStringBase<unsigned short>::allocate_ref_buffer(this, result);
004023b5      _vsnwprintf(this->m_charbuffer, (result + 1), arg2, arg3);
004023b5      
004023ce      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004023d6          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004023d6      
004023de      return result;
00402380  }

004023e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004023f0  class TResult* __thiscall ClassFactoryForceClient_ClassType::QueryInterface(class ClassFactoryForceClient_ClassType* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

004023f0  {
004023f7      uint32_t m_data1 = arg3->m_data1;
004023f7      
004023ff      if (m_data1 != 0x4a28b2a4)
004023ff      {
00402422      label_402422:
00402422          
00402428          if (m_data1 == 0xdeadbeef)
00402428          {
0040242a              int32_t ecx;
0040242a              ecx = arg3->m_data2;
0040242a              *(uint16_t*)((char*)ecx)[2] = arg3->m_data3;
0040242a              
00402433              if (ecx == 0)
00402433              {
00402435                  int32_t edx_3;
00402435                  edx_3 = arg3->m_data4[0];
00402435                  *(uint8_t*)((char*)edx_3)[1] = arg3->m_data4[1];
00402435                  *(uint8_t*)((char*)edx_3)[2] = arg3->m_data4[2];
00402435                  *(uint8_t*)((char*)edx_3)[3] = arg3->m_data4[3];
00402435                  
0040243e                  if (edx_3 == 0)
0040243e                  {
00402440                      int32_t eax;
00402440                      eax = arg3->m_data4[4];
00402440                      *(uint8_t*)((char*)eax)[1] = arg3->m_data4[5];
00402440                      *(uint8_t*)((char*)eax)[2] = arg3->m_data4[6];
00402440                      *(uint8_t*)((char*)eax)[3] = arg3->m_data4[7];
00402440                      
00402449                      if (eax == 0xcdab0000)
00402449                          goto label_40244b;
0040243e                  }
00402433              }
00402428          }
004023ff      }
004023ff      else
004023ff      {
00402401          int32_t edx;
00402401          edx = arg3->m_data2;
00402401          *(uint16_t*)((char*)edx)[2] = arg3->m_data3;
00402401          
0040240a          if (edx != 0x4853b129)
0040240a              goto label_402422;
0040240a          
0040240c          int32_t edx_1;
0040240c          edx_1 = arg3->m_data4[0];
0040240c          *(uint8_t*)((char*)edx_1)[1] = arg3->m_data4[1];
0040240c          *(uint8_t*)((char*)edx_1)[2] = arg3->m_data4[2];
0040240c          *(uint8_t*)((char*)edx_1)[3] = arg3->m_data4[3];
0040240c          
00402415          if (edx_1 != 0xdb13b897)
00402415              goto label_402422;
00402415          
00402417          int32_t edx_2;
00402417          edx_2 = arg3->m_data4[4];
00402417          *(uint8_t*)((char*)edx_2)[1] = arg3->m_data4[5];
00402417          *(uint8_t*)((char*)edx_2)[2] = arg3->m_data4[6];
00402417          *(uint8_t*)((char*)edx_2)[3] = arg3->m_data4[7];
00402417          
00402420          if (edx_2 != 0x2c769f47)
00402420              goto label_402422;
00402420          
0040244b      label_40244b:
0040244b          
0040244d          if (this != 0)
0040244d          {
0040244f              this->vtable->AddRef(this);
0040245a              *(uint32_t*)arg4 = this;
00402460              __return->m_val = 0;
00402467              return __return;
0040244d          }
004023ff      }
004023ff      
0040246e      __return->m_val = 0x80004002;
00402475      return __return;
004023f0  }

00402478                                                                          90 90 90 90 90 90 90 90                          ........

00402480  uint32_t __fastcall ClassFactoryForceClient_ClassType::AddRef(class ClassFactoryForceClient_ClassType const* this)

00402480  {
0040248a      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00402480  }

0040248b                                   90 90 90 90 90                                                             .....

00402490  void* __thiscall gmClient::`vector deleting destructor'(class gmClient* this, uint32_t arg2)

00402490  {
00402493      gmClient::~gmClient(this);
0040249d      void* __offset(gmClient, -0x1c) result = ((char*)this - 0x1c);
0040249d      
004024a0      if ((arg2 & 1) == 0)
004024af          return result;
004024af      
004024a3      operator delete(result);
004024ab      return ((char*)this - 0x1c);
00402490  }

004024b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004024c0  uint8_t __thiscall ArgumentParser::CommandLineArgList::AddCmd(class ArgumentParser::CommandLineArgList* this, int32_t arg2, char arg3, class PStringBase<char> const* arg4, class PStringBase<char> const* arg5, void* arg6, uint32_t arg7, uint32_t arg8)

004024c0  {
004024cc      int32_t var_1c = arg2;
004024d0      class PSRefBufferCharData<char>* m_charbuffer = arg4->m_charbuffer;
004024de      class ArgumentParser::CommandLineArgList* this_1 = this;
004024e0      this = arg3;
004024e8      char var_18 = this;
004024ec      InterlockedIncrement(&m_charbuffer[-1]);
004024f2      class PSRefBufferCharData<char>* m_charbuffer_1 = arg5->m_charbuffer;
004024fc      InterlockedIncrement(&m_charbuffer_1[-1]);
0040250a      void* var_c = arg6;
00402515      uint32_t var_8 = arg7;
00402519      uint32_t var_4 = arg8;
00402533      int32_t ebx;
00402533      ebx = ArgumentParser::CommandLineArgList::add(this_1, &var_1c);
00402533      
0040253d      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00402545          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00402545      
0040255a      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00402562          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00402562      
00402566      int32_t eax_8;
00402566      eax_8 = ebx;
0040256c      return eax_8;
004024c0  }

0040256f                                               90                                                                 .

00402570  int32_t PStringBase<char>::sprintf(class PStringBase<char>* this, char const* arg2)

00402570  {
00402583      return PStringBase<char>::vsprintf(this, arg2, &arg_c);
00402570  }

00402584              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00402590  void __thiscall PStringBase<unsigned short>::PStringBase<unsigned short>(class PStringBase<unsigned short>* this, uint16_t const* arg2)

00402590  {
004025a0      if ((arg2 != 0 && *(uint16_t*)arg2 != 0))
004025a0      {
004025af          PStringBase<unsigned short>::allocate_ref_buffer(this, wcslen(arg2));
004025b8          wcscpy(this->m_charbuffer, arg2);
004025c5          return;
004025a0      }
004025a0      
004025c8      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004025d4      this->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
004025d6      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00402590  }

004025e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004025f0  void __thiscall PStringBase<unsigned short>::append_string(class PStringBase<unsigned short>* this, class PStringBase<unsigned short> const* arg2)

004025f0  {
004025f4      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
004025f6      int32_t edx = m_charbuffer->m_data[0x7ffffffffffffffe];
004025f6      
004025fc      if (edx != 1)
00402601          PStringBase<unsigned short>::append_n_chars(this, m_charbuffer, (edx - 1));
004025f0  }

00402609                             90 90 90 90 90 90 90                                                           .......

00402610  int32_t PStringBase<unsigned short>::sprintf(class PStringBase<unsigned short>* this, uint16_t const* arg2)

00402610  {
00402623      return PStringBase<unsigned short>::vsprintf(this, arg2, &arg_c);
00402610  }

00402624              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00402630  void __fastcall gmClient::gmClient(class gmClient* this)

00402630  {
0040263c      Client::Client(this);
00402647      this->vtable = &CObjectMaint::`vftable';
00402651      this->vtable = 0x792c48;
00402657      this->vtable = &gmClient::`vftable';
0040265e      this->vtable = &gmClient::`vftable';
00402665      this->vtable = &gmClient::`vftable';
0040266c      this->vtable = &gmClient::`vftable';
00402673      this->vtable = &gmClient::`vftable';
0040267d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00402688      this->m_startChar.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040268e      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00402690      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer;
0040269c      this->m_createChar.m_charbuffer = PStringBase<char>::s_NullBuffer_7;
004026a2      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_7 - 0x10));
004026a4      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer;
004026b0      this->m_strKeymapFile.m_charbuffer = PStringBase<char>::s_NullBuffer_6;
004026b6      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_6 - 0x10));
004026b8      this->m_bKeymapLoaded = 0;
004026bf      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004026ca      this->m_strZoneTicket.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
004026d0      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
004026d2      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer;
004026de      this->m_strGLSTicket.m_charbuffer = PStringBase<char>::s_NullBuffer_8;
004026e4      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_8 - 0x10));
004026e6      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004026f2      this->m_wstrMigrationURL.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
004026f8      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
004026fa      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
00402705      this->m_strVGPassword.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0040270b      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
0040270d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
00402712      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_4;
0040271a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
00402721      uint8_t eax_5 = PSUtils::get_cwd(&PStringBase<char>::s_NullBuffer_10);
00402731      class PStringBase<unsigned short> PStringBase<char>::s_NullBuffer_9;
00402731      int32_t eax_9;
00402731      
00402731      if (eax_5 != 0)
00402731      {
00402733          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer;
00402738          PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_5;
00402740          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_5[-1]);
00402746          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_10;
00402751          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_9, "%s\UserPreferences.ini");
0040275d          PSUtils::cleanup_filename(&PStringBase<char>::s_NullBuffer_9, 0);
00402769          uint8_t eax_8 = PSUtils::check_access(&PStringBase<char>::s_NullBuffer_9, 0);
00402769          
00402777          if (eax_8 != 0)
00402781              PStringBase<unsigned short>::operator=(&this->m_preferencesFile.m_charbuffer, &PStringBase<char>::s_NullBuffer_9);
00402781          
0040278a          int32_t* ebx_2 = (PStringBase<char>::s_NullBuffer_9 - 0x14);
0040278a          
00402799          if ((InterlockedDecrement(&ebx_2[1]) == 0 && ebx_2 != 0))
004027a1              **(uint32_t**)ebx_2(1);
004027a1          
004027a3          eax_9 = eax_8;
00402731      }
00402731      
004027a9      void pszPath;
004027a9      
004027a9      if (((eax_5 == 0 || eax_9 == 0) && SHGetSpecialFolderPathA(nullptr, &pszPath, 5, 1) != 0))
004027a9      {
004027c4          void* var_124_12 = &pszPath;
004027cf          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_10, "%s\Asheron's Call");
004027d9          PSUtils::create_directory(&PStringBase<char>::s_NullBuffer_10);
004027e2          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_10;
004027ec          PStringBase<char>::sprintf(&this->m_preferencesFile, "%s\UserPreferences.ini");
004027a9      }
004027a9      
00402807      PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_9, wcslen(u"http://acbm.turbinegames.com/IIS…"));
00402816      wcscpy(PStringBase<char>::s_NullBuffer_9, u"http://acbm.turbinegames.com/IIS…");
0040281c      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_wstrMigrationURL.m_charbuffer;
0040281c      
0040282b      if (m_charbuffer != PStringBase<char>::s_NullBuffer_9)
0040282b      {
0040283c          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00402844              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00402844          
00402846          class PStringBase<unsigned short> PStringBase<char>::s_NullBuffer_13 = PStringBase<char>::s_NullBuffer_9;
0040284a          this->m_wstrMigrationURL.m_charbuffer = PStringBase<char>::s_NullBuffer_13;
00402854          InterlockedIncrement((PStringBase<char>::s_NullBuffer_13 - 0x10));
0040282b      }
0040282b      
0040285a      int32_t* edi_1 = (PStringBase<char>::s_NullBuffer_9 - 0x14);
00402861      int32_t eax_18;
00402861      class IDClass<_tagDataID,32,0>* ecx_12;
00402861      eax_18 = InterlockedDecrement(&edi_1[1]);
00402861      
00402869      if ((eax_18 == 0 && edi_1 != 0))
00402871          ecx_12 = **(uint32_t**)edi_1(1);
00402871      
00402873      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx_12);
0040287c      void* __offset(PSRefBufferCharData<char>, -0x14) edi_3 = &PStringBase<char>::s_NullBuffer_10->m_data[0xffffffec];
0040287c      
0040288b      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
00402893          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
00402630  }

004028a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004028b0  void __fastcall gmClient::BuildCommandLineArgs(class gmClient* this, class ArgumentParser::CommandLineArgList* arg2)

004028b0  {
004028c2      class PStringBase<char> var_4;
004028c2      PStringBase<char>::PStringBase<char>(&var_4, "<name> : Character Name you woul…");
004028d0      class PStringBase<char> var_8;
004028d0      PStringBase<char>::PStringBase<char>(&var_8, "user");
004028d5      class ArgumentParser::CommandLineArgList* ebx = arg2;
004028f4      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x32, 0x75, &var_8, &var_4, &this->vtable, 0, 0);
00402903      int32_t* edi_1 = (var_8 - 0x14);
00402903      
00402912      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0040291a          **(uint32_t**)edi_1(1);
0040291a      
00402920      int32_t* edi_3 = (var_4 - 0x14);
00402920      
0040292f      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00402937          **(uint32_t**)edi_3(1);
00402937      
00402942      PStringBase<char>::PStringBase<char>(&var_4, "<name> : Character Name you woul…");
00402950      PStringBase<char>::PStringBase<char>(&arg2, "create");
00402970      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x32, 0x72, &arg2, &var_4, &this->m_startChar, 0, 0);
00402979      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_5 = ((char*)arg2 - 0x14);
00402979      
00402988      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
00402990          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
00402990      
00402996      int32_t* edi_7 = (var_4 - 0x14);
00402996      
004029a5      if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
004029ad          **(uint32_t**)edi_7(1);
004029ad      
004029b8      PStringBase<char>::PStringBase<char>(&var_4, "<string>: Specify ticket data.");
004029c6      PStringBase<char>::PStringBase<char>(&arg2, "zoneticket");
004029e6      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x32, 0x7a, &arg2, &var_4, &this->m_bKeymapLoaded, 0, 0);
004029ef      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_9 = ((char*)arg2 - 0x14);
004029ef      
004029fe      if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
00402a06          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_9) + -0x14)(1);
00402a06      
00402a0c      int32_t* edi_11 = (var_4 - 0x14);
00402a0c      
00402a1b      if ((InterlockedDecrement(&edi_11[1]) == 0 && edi_11 != 0))
00402a23          **(uint32_t**)edi_11(1);
00402a23      
00402a2e      PStringBase<char>::PStringBase<char>(&var_4, "<ticket> : Raw GLS ticket data.");
00402a3c      PStringBase<char>::PStringBase<char>(&arg2, "glsticketdirect");
00402a5c      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x32, 0, &arg2, &var_4, &this->m_strZoneTicket, 0, 0);
00402a65      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_13 = ((char*)arg2 - 0x14);
00402a65      
00402a74      if ((InterlockedDecrement(((char*)edi_13 + 4)) == 0 && edi_13 != 0))
00402a7c          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_13) + -0x14)(1);
00402a7c      
00402a82      int32_t* edi_15 = (var_4 - 0x14);
00402a82      
00402a91      if ((InterlockedDecrement(&edi_15[1]) == 0 && edi_15 != 0))
00402a99          **(uint32_t**)edi_15(1);
00402a99      
00402aa4      PStringBase<char>::PStringBase<char>(&var_4, "Tells the client to use GLS auth…");
00402ab2      PStringBase<char>::PStringBase<char>(&arg2, "glsticket");
00402acd      ArgumentParser::CommandLineArgList::AddCmd(ebx, 1, 0, &arg2, &var_4, nullptr, 0, 0);
00402ad6      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_17 = ((char*)arg2 - 0x14);
00402ad6      
00402ae5      if ((InterlockedDecrement(((char*)edi_17 + 4)) == 0 && edi_17 != 0))
00402aed          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_17) + -0x14)(1);
00402aed      
00402af3      int32_t* edi_19 = (var_4 - 0x14);
00402af3      
00402b02      if ((InterlockedDecrement(&edi_19[1]) == 0 && edi_19 != 0))
00402b0a          **(uint32_t**)edi_19(1);
00402b0a      
00402b15      PStringBase<char>::PStringBase<char>(&var_4, "<name> : Location of the account…");
00402b23      PStringBase<char>::PStringBase<char>(&arg2, "migrationurl");
00402b43      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x3a, 0, &arg2, &var_4, &this->m_strGLSTicket, 0, 0);
00402b4c      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_21 = ((char*)arg2 - 0x14);
00402b4c      
00402b5b      if ((InterlockedDecrement(((char*)edi_21 + 4)) == 0 && edi_21 != 0))
00402b63          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_21) + -0x14)(1);
00402b63      
00402b69      int32_t* edi_23 = (var_4 - 0x14);
00402b69      
00402b78      if ((InterlockedDecrement(&edi_23[1]) == 0 && edi_23 != 0))
00402b80          **(uint32_t**)edi_23(1);
00402b80      
00402b8b      PStringBase<char>::PStringBase<char>(&var_4, "<pw> : Vanguard pw.");
00402b99      PStringBase<char>::PStringBase<char>(&arg2, "vgpassword");
00402bb9      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x32, 0x76, &arg2, &var_4, &this->m_wstrMigrationURL.m_charbuffer, 0, 0);
00402bc2      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_25 = ((char*)arg2 - 0x14);
00402bc2      
00402bd1      if ((InterlockedDecrement(((char*)edi_25 + 4)) == 0 && edi_25 != 0))
00402bd9          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_25) + -0x14)(1);
00402bd9      
00402bdf      int32_t* edi_27 = (var_4 - 0x14);
00402be6      int32_t eax_32;
00402be6      class ArgumentParser::CommandLineArgList* edx_14;
00402be6      eax_32 = InterlockedDecrement(&edi_27[1]);
00402be6      
00402bee      if ((eax_32 == 0 && edi_27 != 0))
00402bf6          edx_14 = **(uint32_t**)edi_27(1);
00402bf6      
00402bf8      class ArgumentParser::CommandLineArgList* var_1c_14 = ebx;
00402bfb      Client::BuildCommandLineArgs(this, edx_14);
004028b0  }

00402c0a                                90 90 90 90 90 90                                                            ......

00402c10  uint8_t __thiscall gmClient::EvaluateCommandLineArg(class gmClient* this, struct CommandLineArg const* arg2, class PStringBase<char> const* arg3)

00402c10  {
00402c19      struct CommandLineArg* esi = arg2;
00402c21      int32_t eax_1 = Client::EvaluateCommandLineArg(this, esi, arg3);
00402c28      arg3 = eax_1;
00402c28      
00402c2c      if (eax_1 != 0)
00402c2c      {
00402c3d          PStringBase<char>::PStringBase<char>(&arg2, "glsticket");
00402c4a          uint8_t eax_2 = PStringBase<char>::operator==(&esi->LongVersion, &arg2);
00402c59          void* __offset(CommandLineArg, -0x14) esi_2 = ((char*)arg2 - 0x14);
00402c60          int32_t ebx;
00402c60          ebx = eax_2;
00402c60          
00402c6a          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00402c72              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00402c72          
00402c76          if (ebx != 0)
00402c76          {
00402c85              class PStringBase<char> var_8;
00402c85              PStringBase<char>::PStringBase<char>(&var_8, "GLSTicket");
00402c93              PStringBase<char>::PStringBase<char>(&arg2, "Software\Turbine\ac1");
00402cbb              void var_4;
00402cbb              ebx = RegEdit::QueryStrValue(&var_4, &arg2, &var_8, &this->m_strZoneTicket, 0x80000001);
00402cbd              void* __offset(CommandLineArg, -0x14) esi_4 = ((char*)arg2 - 0x14);
00402cbd              
00402ccc              if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00402cd4                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00402cd4              
00402cda              int32_t* esi_6 = (var_8 - 0x14);
00402cda              
00402ce9              if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00402cf1                  **(uint32_t**)esi_6(1);
00402cf1              
00402cf5              if (ebx != 0)
00402cf5              {
00402d00                  PStringBase<char>::PStringBase<char>(&var_8, "GLSTicket");
00402d0e                  PStringBase<char>::PStringBase<char>(&arg2, "Software\Turbine\ac1");
00402d26                  RegEdit::DeleteValue(&var_4, &arg2, &var_8, 0x80000001);
00402d2f                  void* __offset(CommandLineArg, -0x14) esi_8 = ((char*)arg2 - 0x14);
00402d2f                  
00402d3e                  if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
00402d46                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
00402d46                  
00402d4c                  int32_t* esi_10 = (var_8 - 0x14);
00402d4c                  
00402d5b                  if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
00402d63                      **(uint32_t**)esi_10(1);
00402cf5              }
00402c76          }
00402c76          
00402d65          eax_1 = arg3;
00402c2c      }
00402c2c      
00402d70      return eax_1;
00402c10  }

00402d73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00402d80  uint8_t __fastcall gmClient::OnCommandLineEvaluationDone(class gmClient* this)

00402d80  {
00402d80      class gmClient* this_1 = this;
00402d99      char const* const var_14;
00402d99      
00402d99      if (*(uint32_t*)(*(uint32_t*)*(uint32_t*)(this->vtable + 0x34)() + 8) != 1)
00402d99      {
00402daf          if (*(uint32_t*)(*(uint32_t*)*(uint32_t*)(this->vtable + 0x3c)() - 4) != 1)
00402daf          {
00402df5              int32_t* eax_3;
00402df5              eax_3 = 1;
00402df9              return 1;
00402daf          }
00402daf          
00402db1          var_14 = "You must specify a host name";
00402d99      }
00402d99      else
00402d9b          var_14 = "You must specify an account name";
00402d9b      
00402dba      PStringBase<char>::PStringBase<char>(&this_1, var_14);
00402dc5      class gmClient** var_14_1 = &this_1;
00402dbf      this->vtable->Cleanup(this);
00402dcf      void* __offset(gmClient, -0x14) esi_2 = ((char*)this_1 - 0x14);
00402dcf      
00402de2      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00402dea          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00402dea      
00402dee      int32_t eax_4;
00402dee      eax_4 = 0;
00402df2      return 0;
00402d80  }

00402dfa                                                                                90 90 90 90 90 90                            ......

00402e00  uint8_t __fastcall gmClient::InitKeymap(class gmClient* this, class PStringBase<char> const* arg2)

00402e00  {
00402e04      int32_t ebp;
00402e04      int32_t var_14 = ebp;
00402e05      int32_t esi;
00402e05      int32_t var_18 = esi;
00402e06      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00402e0e      int32_t edi;
00402e0e      int32_t var_1c = edi;
00402e0e      
00402e11      if ((ICIDM::s_cidm_1 != 0 && ICIDM::s_cidm_1->vtable->InitializeKeymap(ICIDM::s_cidm_1) != 0))
00402e11      {
00402e26          class PSRefBufferCharData<char>* m_charbuffer = UserPreferences::sm_strDefaultFile.m_charbuffer;
00402e31          class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
00402e39          InterlockedIncrement(&m_charbuffer[-1]);
00402e3b          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00402e40          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00402e48          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00402e54          PSUtils::get_directory(&PStringBase<char>::s_NullBuffer_2, &m_charbuffer_1);
00402e59          class PStringBase<char>* eax_4 = arg2;
00402e72          void* var_8;
00402e72          
00402e72          if (eax_4->m_charbuffer->m_data[-4] != 1)
00402e77              PStringBase<unsigned short>::operator=(&this->m_strKeymapFile.m_charbuffer, eax_4);
00402e72          else if (this->m_strKeymapFile.m_charbuffer->m_data[-4] == 1)
00402e83          {
00402e8a              PSUtils::get_process_name(&arg2);
00402e94              PSUtils::strip_directory(&arg2);
00402ea3              PStringBase<unsigned short>::operator=(&this->m_strKeymapFile.m_charbuffer, &arg2);
00402eb1              PStringBase<char>::PStringBase<char>(&var_8, "keymap");
00402ebc              PSUtils::change_extension(&this->m_strKeymapFile, &var_8);
00402ec8              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00402ed1              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00402e83          }
00402e83          
00402edc          PSUtils::path_append(&PStringBase<char>::s_NullBuffer_2, &this->m_strKeymapFile);
00402ee8          PSUtils::cleanup_filename(&PStringBase<char>::s_NullBuffer_2, 1);
00402eed          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00402f00          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00402f00          
00402f0b          if (*(int32_t*)((char*)ICIDM::s_cidm_1->vtable + 0x28)(PStringBase<char>::s_NullBuffer_3) == 0)
00402f0d              ICIDM::s_cidm_1->vtable->InitializeKeymap(ICIDM::s_cidm_1);
00402f0d          
00402f14          ICIDM::s_cidm_1->vtable->AddKeyMap(ICIDM::s_cidm_1, 0x10000001);
00402f20          ICIDM::s_cidm_1->vtable->AddKeyMap(ICIDM::s_cidm_1, 1);
00402f3a          this->m_bKeymapLoaded = 1;
00402f49          void* ebx;
00402f49          
00402f49          if ((InterlockedDecrement(((char*)ebx - 0x10)) == 0 && ebx != 0x14))
00402f51              **(uint32_t**)((char*)ebx - 0x14)(1);
00402f51          
00402f57          int32_t* esi_4 = ((char*)var_8 - 0x14);
00402f57          
00402f66          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00402f6e              **(uint32_t**)esi_4(1);
00402f6e          
00402f70          int32_t eax_12;
00402f70          eax_12 = 1;
00402f79          return 1;
00402e11      }
00402e11      
00402f85      return 0;
00402e00  }

00402f88                          90 90 90 90 90 90 90 90                                                          ........

00402f90  uint8_t __fastcall gmClient::InitPreferences(class gmClient* this)

00402f90  {
00402f90      class gmClient* this_1 = this;
00402f9f      PStringBase<char>::PStringBase<char>(&this_1, "The filename of the keymap file …");
00402fbc      uint32_t* edi;
00402fbc      UserPreferences::RegisterPreference(&this->m_strKeymapFile.m_charbuffer, &Input_KeymapFile, &this_1, nullptr, nullptr, 0, nullptr, edi);
00402fcb      void* __offset(gmClient, -0x14) esi_1 = ((char*)this_1 - 0x14);
00402fcb      
00402fda      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00402fe2          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00402fe2      
00402fed      PStringBase<char>::PStringBase<char>(&this_1, "Chat Font Face");
0040300f      UserPreferences::RegisterPreference(&gmClient::sm_nFontFace, &UI_ChatFontFace, &this_1, gmClient::GRPCallback_OnFontPreferenceChanged, 5, 0x83656c, nullptr);
00403018      void* __offset(gmClient, -0x14) esi_3 = ((char*)this_1 - 0x14);
00403018      
00403027      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0040302f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0040302f      
0040303a      PStringBase<char>::PStringBase<char>(&this_1, "Chat Font Size");
0040305c      UserPreferences::RegisterPreference(&gmClient::sm_nFontSize, &UI_ChatFontSize, &this_1, gmClient::GRPCallback_OnFontPreferenceChanged, 5, 0x836580, nullptr);
00403065      void* __offset(gmClient, -0x14) esi_5 = ((char*)this_1 - 0x14);
00403065      
00403074      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0040307c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0040307c      
00403089      return Client::InitPreferences(this);
00402f90  }

0040308a                                90 90 90 90 90 90                                                            ......

00403090  uint8_t __fastcall gmClient::InitAuth(class gmClient* this)

00403090  {
004030a7      uint32_t var_3c;
004030a7      class accountID* var_38;
004030a7      uint32_t var_34;
004030a7      uint8_t* var_30_3;
004030a7      void var_24;
004030a7      enum Archive::tagPacking edx;
004030a7      
004030a7      if (this->m_strVGPassword.m_charbuffer->m_data[-4] == 1)
004030a7      {
004030f8          if (this->m_strGLSTicket.m_charbuffer->m_data[-4] == 1)
00403162              return Client::InitAuth(this);
00403162          
004030fa          int32_t var_30_4 = 0;
00403100          TransientArchive::TransientArchive(&var_24, edx);
0040310c          PStringBase<char>::Serialize(&this->m_strGLSTicket, &var_24);
00403126          var_30_3 = Archive::PeekBytes(&var_24, 0, Archive::GetCurrentPosition(&var_24));
00403130          var_34 = Archive::GetCurrentPosition(&var_24);
00403134          var_38 = &this->m_account;
00403135          var_3c = 0x40000002;
004030a7      }
004030a7      else
004030a7      {
004030a9          int32_t var_30 = 0;
004030af          TransientArchive::TransientArchive(&var_24, edx);
004030bb          PStringBase<char>::Serialize(&this->m_strVGPassword, &var_24);
004030d5          var_30_3 = Archive::PeekBytes(&var_24, 0, Archive::GetCurrentPosition(&var_24));
004030df          var_34 = Archive::GetCurrentPosition(&var_24);
004030e3          var_38 = &this->m_account;
004030e4          var_3c = 2;
004030a7      }
00403140      NetAuthenticator::SetToAuthType(&this->m_netAuth, var_3c, var_38, var_34, var_30_3);
00403149      Archive::~Archive(&var_24);
0040314f      int32_t eax_8;
0040314f      eax_8 = 1;
00403155      return 1;
00403090  }

00403163           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00403170  class PStringBase<unsigned short>* __thiscall PStringBase<char>::to_wpstring(class PStringBase<char> const* this, class PStringBase<unsigned short>* __return, uint16_t const arg3)

00403170  {
00403170      class PStringBase<char>* var_4 = this;
00403171      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040317f      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
0040318a      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0040318c      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
0040318f      int32_t ecx = m_charbuffer->m_data[-4];
00403195      class PStringBase<unsigned short>* result;
00403195      void* __offset(PStringBase<char>, -0x10) var_18_2;
00403195      void* __offset(PStringBase<char>, -0x14) esi_1;
00403195      
00403195      if (ecx != 1)
00403195      {
004031b7          uint32_t esi_2 = ((uint32_t)arg3);
004031bc          int32_t var_18_3 = 0;
004031be          int32_t var_1c_1 = 0;
004031c0          int32_t var_20_1 = ecx;
004031c1          class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
004031c2          int32_t var_28_1 = 0;
004031c4          uint32_t var_2c_1 = esi_2;
004031c5          uint32_t eax_4 = kernel32_MultiByteToWideChar_Ptr();
004031cf          wchar16 const* const var_24_1;
004031cf          
004031cf          if (eax_4 == 0)
004031cf          {
004031d9              enum WIN32_ERROR var_18_4 = GetLastError();
004031dc              enum WIN32_ERROR var_1c_2 = GetLastError();
004031dd              uint32_t var_20_2 = esi_2;
004031de              var_24_1 = u"Could not determine number of by…";
00403221          label_403221:
00403221              PStringBase<unsigned short>::sprintf(&var_4, var_24_1);
00403226              class PStringBase<unsigned short> eax_10 = var_4;
0040322a              result = __return;
0040322e              result->m_charbuffer = eax_10;
00403237              InterlockedIncrement((eax_10 - 0x10));
0040323d              esi_1 = &var_4[-5];
00403243              var_18_2 = ((char*)esi_1 + 4);
00403243              goto label_403244;
004031cf          }
004031cf          
004031ea          PStringBase<unsigned short>::allocate_ref_buffer(&var_4, eax_4);
004031ef          class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_charbuffer;
004031f9          uint32_t var_18_6 = eax_4;
004031fa          class PStringBase<char>* var_1c_3 = var_4;
004031fb          int32_t var_20_3 = m_charbuffer_1->m_data[-4];
004031fc          class PSRefBufferCharData<char>* m_charbuffer_3 = m_charbuffer_1;
004031fd          int32_t var_28_2 = 0;
004031ff          uint32_t var_2c_2 = esi_2;
00403200          int32_t eax_7 = kernel32_MultiByteToWideChar_Ptr();
00403200          
00403208          if (eax_7 == 0)
00403208          {
00403212              enum WIN32_ERROR var_18_7 = GetLastError();
00403215              enum WIN32_ERROR var_1c_4 = GetLastError();
00403216              uint32_t var_20_4 = esi_2;
00403217              var_24_1 = u"Failed conversion from codepage …";
00403217              goto label_403221;
00403208          }
00403208          
00403268          result = __return;
00403264          var_4[-1].m_charbuffer = eax_7;
0040326f          class PStringBase<char>* eax_14 = var_4;
00403273          result->m_charbuffer = eax_14;
00403279          InterlockedIncrement(&eax_14[-4]);
0040327f          void* __offset(PStringBase<char>, -0x14) esi_5 = &var_4[-5];
0040327f          
00403292          if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0040329a              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00403195      }
00403195      else
00403195      {
00403197          class PStringBase<char>* eax_1 = var_4;
0040319b          result = __return;
0040319f          result->m_charbuffer = eax_1;
004031a5          InterlockedIncrement(&eax_1[-4]);
004031ab          esi_1 = &var_4[-5];
004031b1          var_18_2 = ((char*)esi_1 + 4);
00403244      label_403244:
00403244          
00403250          if ((InterlockedDecrement(var_18_2) == 0 && esi_1 != 0))
00403258              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00403195      }
004032a3      return result;
00403170  }

004032a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004032b0  void __thiscall Client::SetAccountName(class Client* this, class accountID const* arg2)

004032b0  {
004032c1      AC1Legacy::PStringBase<char>::set(&this->m_account.m_buffer, &arg2->m_buffer->m_data);
004032b8      this->m_account.fIsDarkMajestyExpansion_ = arg2->fIsDarkMajestyExpansion_;
004032b8      this->m_account.m_fIsThroneOfDestinyExpansion = arg2->m_fIsThroneOfDestinyExpansion;
004032b8      this->m_account.m_fPreOrderedThroneOfDestinyExpansion = arg2->m_fPreOrderedThroneOfDestinyExpansion;
004032b0  }

004032dd                                                                                         90 90 90                               ...

004032e0  void __thiscall AC1Legacy::PStringBase<char>::set(class AC1Legacy::PStringBase<char>* this, char const* arg2)

004032e0  {
004032ef      if ((arg2 == 0 || *(uint8_t*)arg2 == 0))
004032ef      {
0040333f          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
0040333f          
00403347          if (m_buffer_1 != AC1Legacy::PStringBase<char>::s_NullBuffer)
00403347          {
00403359              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
0040335b                  m_buffer_1->vtable->__vecDelDtor(m_buffer_1, 1);
0040335b              
00403363              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0040336e              this->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00403371              arg2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
00403375              /* tailcall */
00403375              return InterlockedIncrement();
00403347          }
004032ef      }
004032ef      else
004032ef      {
004032f2          class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004032f2          
00403304          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00403306              m_buffer->vtable->__vecDelDtor(m_buffer, 1);
00403306          
0040330e          char const* eax_3 = arg2;
00403319          char const i;
00403319          
00403319          do
00403319          {
00403314              i = *(uint8_t*)eax_3;
00403316              eax_3 = &eax_3[1];
00403319          } while (i != 0);
00403320          AC1Legacy::PStringBase<char>::allocate_ref_buffer(this, (eax_3 - &eax_3[1]));
00403327          char const* edx_3 = arg2;
00403329          char (* eax_6)[0x1] = &this->m_buffer->m_data;
00403338          char i_1[0x1];
00403338          
00403338          do
00403338          {
00403330              i_1 = *(uint8_t*)edx_3;
00403332              edx_3 = &edx_3[1];
00403330              ADJ(eax_6)->m_data = i_1;
00403335              eax_6 = &eax_6[1];
00403338          } while (i_1 != 0);
004032ef      }
004032e0  }

0040337b                                                                                   90 90 90 90 90                             .....

00403380  void __thiscall AC1Legacy::PStringBase<char>::allocate_ref_buffer(class AC1Legacy::PStringBase<char>* this, uint32_t arg2)

00403380  {
00403389      int32_t esi = 1;
00403389      
00403394      do
00403390          esi <<= 1;
00403394       while (arg2 > esi);
00403394      
0040339a      void* eax_1 = operator new[]((esi + 0x18));
0040339a      
004033a4      if (eax_1 == 0)
004033a4      {
004033e0          this->m_buffer = 0;
004033e3          *(uint32_t*)8 = (arg2 + 1);
004033e6          this->m_buffer->m_size = (esi + 1);
004033ef          return;
004033a4      }
004033a4      
004033a6      *(uint32_t*)((char*)eax_1 + 4) = 1;
004033ad      *(uint32_t*)eax_1 = 0x7ca074;
004033b3      *(uint32_t*)((char*)eax_1 + 8) = 1;
004033ba      *(uint32_t*)((char*)eax_1 + 0xc) = 1;
004033c1      *(uint32_t*)((char*)eax_1 + 0x10) = 0xffffffff;
004033c8      *(uint8_t*)((char*)eax_1 + 0x14) = 0;
004033cc      this->m_buffer = eax_1;
004033cf      *(uint32_t*)((char*)eax_1 + 8) = (arg2 + 1);
004033d2      this->m_buffer->m_size = (esi + 1);
00403380  }

004033f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00403400  class TResult* __stdcall ClassFactoryForceClient_ClassType::CreateInstance(class ClassFactoryForceClient_ClassType* this @ ecx, class TResult* __return, class Interface* arg3, struct Turbine_GUID const* arg4, void** arg5)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00403400  {
00403409      if (arg3 != 0)
00403409      {
0040340b          class TResult* __return_1 = __return;
0040340f          __return_1->m_val = 0x80040110;
00403418          return __return_1;
00403409      }
00403409      
00403420      void* eax = operator new(0x160);
0040342a      int32_t eax_1;
0040342a      
0040342a      if (eax == 0)
00403435          eax_1 = 0;
0040342a      else
0040342e          eax_1 = gmClient::gmClient(eax);
0040342e      
00403438      int32_t var_14 = eax_1;
00403442      int32_t* var_8 = nullptr;
0040344a      int32_t var_4 = 0;
00403452      int32_t* esp = &var_14;
0040345f      int32_t* var_c;
0040345f      var_8 = *(uint32_t*)InterfacePtr<class Interface>::_QueryInterface(&var_8, &var_c);
00403463      int32_t* ecx_3 = var_c;
00403467      class TResult* esi;
00403467      int32_t __saved_esi;
00403467      
00403467      if (arg4 == 0)
00403467      {
004034aa          esi = __return_addr;
004034ae          esi->m_val = 0x80004003;
004034ae          
004034b4          if (ecx_3 != 0)
004034b4          {
004034b8              *(uint32_t*)(*(uint32_t*)ecx_3 + 0x14)();
004034b8              esp = &__saved_esi;
004034b4          }
00403467      }
00403467      else
00403467      {
0040346a          arg4->m_data1 = 0;
0040347c          *(uint32_t*)(*(uint32_t*)ecx_3 + 0xc)(&__return, arg3, arg4);
0040347c          esp = &__saved_esi;
00403485          *(uint32_t*)(*(uint32_t*)var_8 + 0x14)();
00403488          int32_t* ecx_5 = var_8;
0040348e          esi = __return;
00403496          esi->m_val = arg3;
00403496          
00403498          if (ecx_5 != 0)
00403498          {
0040349c              *(uint32_t*)(*(uint32_t*)ecx_5 + 0x14)();
004034a5              return esi;
00403498          }
00403467      }
004034bd      *(uint32_t*)esp;
004034c1      return esi;
00403400  }

004034c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004034d0  class TResult __thiscall InterfacePtr<class Interface>::_QueryInterface(InterfacePtr<class Interface>* this, class gmClient* arg2)

004034d0  {
004034d0      InterfacePtr<class Interface>* this_1 = this;
004034d4      int32_t* ecx = arg_8;
004034d4      
004034db      if (ecx == 0)
004034db      {
0040354b          InterfacePtr<Interface>::operator=(this, nullptr);
00403559          arg2->vtable = 0x80004002;
0040355e          return arg2;
004034db      }
004034db      
004034dd      int32_t eax = *(uint32_t*)ecx;
004034ee      arg_8 = nullptr;
004034f9      int32_t edi = *(uint32_t*)*(uint32_t*)(eax + 0xc)(&this_1, 0x792b20, &arg_8);
004034fd      int32_t* ecx_1 = *(uint32_t*)this;
004034fd      
004034ff      if (edi < 0)
004034ff      {
00403503          if (ecx_1 != 0)
00403507              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
00403507          
0040350e          *(uint32_t*)this = 0;
00403514          *(uint32_t*)((char*)this + 4) = 0;
0040351b          arg2->vtable = edi;
00403520          return arg2;
004034ff      }
004034ff      
00403526      int32_t* ebx = arg_8;
00403526      
0040352a      if (ecx_1 != 0)
0040352e          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0040352e      
00403535      *(uint32_t*)this = ebx;
00403537      *(uint32_t*)((char*)this + 4) = 0;
0040353f      arg2->vtable = edi;
00403544      return arg2;
004034d0  }

00403561     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00403570  class InterfacePtr<Interface>* __thiscall InterfacePtr<Interface>::operator=(class InterfacePtr<Interface>* this, class Interface* arg2)

00403570  {
00403578      class Interface* m_pInterface = this->m_pInterface;
00403578      
0040357c      if (m_pInterface != arg2)
0040357c      {
00403580          this->m_pInterface = arg2;
00403580          
00403582          if (arg2 != 0)
00403584              arg2->vtable->AddRef(arg2);
00403584          
0040358b          if (m_pInterface != 0)
0040358d              m_pInterface->vtable->Release(m_pInterface);
0040358d          
00403594          this->m_trStatus.m_val = 0;
0040357c      }
0040357c      
0040359f      return this;
00403570  }

004035a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004035b0  void gmClient::InitUIPreferences(class gmClient* this @ ecx)

004035b0  {
004035ba      uint32_t eax = compute_str_hash("ID_Sound_DisableSound_Help");
004035dd      UIPreferences::AttachPreference(&Sound_SoundDisabled, 4, 0x10000003, compute_str_hash("ID_Sound_DisableSound"), eax);
004035e7      uint32_t eax_2 = compute_str_hash("ID_Sound_EffectVolume_Help");
0040360a      UIPreferences::AttachPreference(&Sound_SoundVolume, 3, 0x10000003, compute_str_hash("ID_Sound_EffectVolume"), eax_2);
0040361c      UIPreferences::SetPreferenceRange(&Sound_SoundVolume, 0f, 1f);
00403626      uint32_t eax_4 = compute_str_hash("ID_Sound_DisableAmbientSound_Hel…");
00403649      UIPreferences::AttachPreference(&Sound_AmbientSoundDisabled, 4, 0x10000003, compute_str_hash("ID_Sound_DisableAmbientSound"), eax_4);
00403653      uint32_t eax_6 = compute_str_hash("ID_Sound_AmbientVolume_Help");
00403676      UIPreferences::AttachPreference(&Sound_AmbientSoundVolume, 3, 0x10000003, compute_str_hash("ID_Sound_AmbientVolume"), eax_6);
00403686      UIPreferences::SetPreferenceRange(&Sound_AmbientSoundVolume, 0f, 1f);
00403690      uint32_t eax_8 = compute_str_hash("ID_Sound_DisableInterfaceSound_H…");
004036b3      UIPreferences::AttachPreference(&Sound_InterfaceSoundDisabled, 4, 0x10000003, compute_str_hash("ID_Sound_DisableInterfaceSound"), eax_8);
004036bd      uint32_t eax_10 = compute_str_hash("ID_Sound_InterfaceVolume_Help");
004036e0      UIPreferences::AttachPreference(&Sound_InterfaceSoundVolume, 3, 0x10000003, compute_str_hash("ID_Sound_InterfaceVolume"), eax_10);
004036f0      UIPreferences::SetPreferenceRange(&Sound_InterfaceSoundVolume, 0f, 1f);
004036fa      uint32_t eax_12 = compute_str_hash("ID_Sound_SoundFeatures_Help");
0040371d      UIPreferences::AttachPreference(&Sound_SoundFeatures, 2, 0x10000003, compute_str_hash("ID_Sound_SoundFeatures"), eax_12);
00403727      void* var_c = nullptr;
0040372b      int32_t var_8 = 0;
0040372f      int32_t var_4 = 0;
00403733      uint32_t eax_14 = compute_str_hash("ID_Sound_Stereo");
00403733      
00403754      if (SmartArray<unsigned long,1>::grow(&var_c, SmartArray<unsigned long,1>::get_new_size(&var_c, 1)) != 0)
00403754      {
0040375e          *(uint32_t*)((char*)var_c + (var_4 << 2)) = eax_14;
00403761          var_4 += 1;
00403754      }
00403754      
0040376a      uint32_t eax_18 = compute_str_hash("ID_Sound_Mono");
00403779      int32_t eax_20 = (var_8 & 0x7fffffff);
00403783      int32_t var_4_1;
00403783      
00403783      if (var_4 < eax_20)
00403783      {
004037a6          *(uint32_t*)((char*)var_c + (var_4 << 2)) = eax_18;
004037a9          var_4_1 = (var_4 + 1);
00403783      }
00403783      else if (SmartArray<unsigned long,1>::grow(&var_c, SmartArray<unsigned long,1>::get_new_size(&var_c, (eax_20 + 1))) != 0)
0040379c      {
004037a6          *(uint32_t*)((char*)var_c + (var_4 << 2)) = eax_18;
004037a9          var_4_1 = (var_4 + 1);
0040379c      }
004037b7      UIPreferences::SetEnumChoices(&Sound_SoundFeatures, &var_c);
004037c1      uint32_t eax_25 = compute_str_hash("ID_Sound_NoFocusNoSound_Help");
004037e4      UIPreferences::AttachPreference(&Sound_PlaySoundOnlyWhenActive, 4, 0x10000003, compute_str_hash("ID_Sound_NoFocusNoSound"), eax_25);
004037ee      uint32_t eax_27 = compute_str_hash("ID_Misc_TooltipDelay_Help");
00403811      UIPreferences::AttachPreference(&Misc_TooltipDelay, 3, 0x10000003, compute_str_hash("ID_Misc_TooltipDelay"), eax_27);
00403821      UIPreferences::SetPreferenceRange(&Misc_TooltipDelay, 0f, 10f);
0040382b      uint32_t eax_29 = compute_str_hash("ID_Misc_TooltipEnable_Help");
0040384e      UIPreferences::AttachPreference(&Misc_TooltipEnable, 4, 0x10000003, compute_str_hash("ID_Misc_TooltipEnable"), eax_29);
00403858      uint32_t eax_31 = compute_str_hash("ID_UI_ChatFontFace_Help");
0040387b      UIPreferences::AttachPreference(&UI_ChatFontFace, 2, 0x10000003, compute_str_hash("ID_UI_ChatFontFace"), eax_31);
00403885      void* var_30 = nullptr;
00403889      int32_t var_2c = 0;
0040388d      int32_t var_28 = 0;
00403891      uint32_t eax_33 = compute_str_hash("ID_UI_Value_Arial");
00403891      
004038b2      if (SmartArray<unsigned long,1>::grow(&var_30, SmartArray<unsigned long,1>::get_new_size(&var_30, 1)) != 0)
004038b2      {
004038bc          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_33;
004038bf          var_28 += 1;
004038b2      }
004038b2      
004038c8      uint32_t eax_37 = compute_str_hash("ID_UI_Value_CourierNew");
004038d7      int32_t eax_39 = (var_2c & 0x7fffffff);
004038d7      
004038e1      if (var_28 < eax_39)
004038e1      {
00403904          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_37;
00403907          var_28 += 1;
004038e1      }
004038e1      else if (SmartArray<unsigned long,1>::grow(&var_30, SmartArray<unsigned long,1>::get_new_size(&var_30, (eax_39 + 1))) != 0)
004038fa      {
00403904          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_37;
00403907          var_28 += 1;
004038fa      }
004038fa      
00403910      uint32_t eax_43 = compute_str_hash("ID_UI_Value_PalatinoLinotype");
0040391f      int32_t eax_45 = (var_2c & 0x7fffffff);
0040391f      
00403929      if (var_28 < eax_45)
00403929      {
0040394c          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_43;
0040394f          var_28 += 1;
00403929      }
00403929      else if (SmartArray<unsigned long,1>::grow(&var_30, SmartArray<unsigned long,1>::get_new_size(&var_30, (eax_45 + 1))) != 0)
00403942      {
0040394c          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_43;
0040394f          var_28 += 1;
00403942      }
00403942      
00403958      uint32_t eax_50 = compute_str_hash("ID_UI_Value_Tahoma");
00403967      int32_t eax_52 = (var_2c & 0x7fffffff);
00403967      
00403971      if (var_28 < eax_52)
00403971      {
00403994          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_50;
00403997          var_28 += 1;
00403971      }
00403971      else if (SmartArray<unsigned long,1>::grow(&var_30, SmartArray<unsigned long,1>::get_new_size(&var_30, (eax_52 + 1))) != 0)
0040398a      {
00403994          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_50;
00403997          var_28 += 1;
0040398a      }
0040398a      
004039a0      uint32_t eax_57 = compute_str_hash("ID_UI_Value_TimesNewRoman");
004039af      int32_t eax_59 = (var_2c & 0x7fffffff);
004039b9      int32_t var_28_1;
004039b9      
004039b9      if (var_28 < eax_59)
004039b9      {
004039dc          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_57;
004039df          var_28_1 = (var_28 + 1);
004039b9      }
004039b9      else if (SmartArray<unsigned long,1>::grow(&var_30, SmartArray<unsigned long,1>::get_new_size(&var_30, (eax_59 + 1))) != 0)
004039d2      {
004039dc          *(uint32_t*)((char*)var_30 + (var_28 << 2)) = eax_57;
004039df          var_28_1 = (var_28 + 1);
004039d2      }
004039ed      UIPreferences::SetEnumChoices(&UI_ChatFontFace, &var_30);
004039f7      uint32_t eax_63 = compute_str_hash("ID_UI_ChatFontSize_Help");
00403a1a      UIPreferences::AttachPreference(&UI_ChatFontSize, 2, 0x10000003, compute_str_hash("ID_UI_ChatFontSize"), eax_63);
00403a24      void* var_3c = nullptr;
00403a28      int32_t var_38 = 0;
00403a2c      int32_t var_34 = 0;
00403a30      uint32_t eax_65 = compute_str_hash("ID_UI_Value_Tiny");
00403a30      
00403a51      if (SmartArray<unsigned long,1>::grow(&var_3c, SmartArray<unsigned long,1>::get_new_size(&var_3c, 1)) != 0)
00403a51      {
00403a5b          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_65;
00403a5e          var_34 += 1;
00403a51      }
00403a51      
00403a67      uint32_t eax_68 = compute_str_hash("ID_UI_Value_Small");
00403a76      int32_t eax_70 = (var_38 & 0x7fffffff);
00403a76      
00403a80      if (var_34 < eax_70)
00403a80      {
00403aa3          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_68;
00403aa6          var_34 += 1;
00403a80      }
00403a80      else if (SmartArray<unsigned long,1>::grow(&var_3c, SmartArray<unsigned long,1>::get_new_size(&var_3c, (eax_70 + 1))) != 0)
00403a99      {
00403aa3          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_68;
00403aa6          var_34 += 1;
00403a99      }
00403a99      
00403aaf      uint32_t eax_75 = compute_str_hash("ID_UI_Value_Medium");
00403abe      int32_t eax_77 = (var_38 & 0x7fffffff);
00403abe      
00403ac8      if (var_34 < eax_77)
00403ac8      {
00403aeb          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_75;
00403aee          var_34 += 1;
00403ac8      }
00403ac8      else if (SmartArray<unsigned long,1>::grow(&var_3c, SmartArray<unsigned long,1>::get_new_size(&var_3c, (eax_77 + 1))) != 0)
00403ae1      {
00403aeb          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_75;
00403aee          var_34 += 1;
00403ae1      }
00403ae1      
00403af7      uint32_t eax_82 = compute_str_hash("ID_UI_Value_Large");
00403b06      int32_t eax_84 = (var_38 & 0x7fffffff);
00403b06      
00403b10      if (var_34 < eax_84)
00403b10      {
00403b33          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_82;
00403b36          var_34 += 1;
00403b10      }
00403b10      else if (SmartArray<unsigned long,1>::grow(&var_3c, SmartArray<unsigned long,1>::get_new_size(&var_3c, (eax_84 + 1))) != 0)
00403b29      {
00403b33          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_82;
00403b36          var_34 += 1;
00403b29      }
00403b29      
00403b3f      uint32_t eax_88 = compute_str_hash("ID_UI_Value_XLarge");
00403b4e      int32_t eax_90 = (var_38 & 0x7fffffff);
00403b58      int32_t var_34_1;
00403b58      
00403b58      if (var_34 < eax_90)
00403b58      {
00403b7b          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_88;
00403b7e          var_34_1 = (var_34 + 1);
00403b58      }
00403b58      else if (SmartArray<unsigned long,1>::grow(&var_3c, SmartArray<unsigned long,1>::get_new_size(&var_3c, (eax_90 + 1))) != 0)
00403b71      {
00403b7b          *(uint32_t*)((char*)var_3c + (var_34 << 2)) = eax_88;
00403b7e          var_34_1 = (var_34 + 1);
00403b71      }
00403b8c      UIPreferences::SetEnumChoices(&UI_ChatFontSize, &var_3c);
00403b96      uint32_t eax_95 = compute_str_hash("ID_Graphics_TextureFiltering_Hel…");
00403bb9      UIPreferences::AttachPreference(&Render_TextureFiltering, 2, 0x10000003, compute_str_hash("ID_Graphics_TextureFiltering"), eax_95);
00403bc3      void* var_24 = nullptr;
00403bc7      int32_t var_20 = 0;
00403bcb      int32_t var_1c = 0;
00403bcf      uint32_t eax_97 = compute_str_hash("ID_Graphics_TextureFiltering_Bil…");
00403bcf      
00403bf0      if (SmartArray<unsigned long,1>::grow(&var_24, SmartArray<unsigned long,1>::get_new_size(&var_24, 1)) != 0)
00403bf0      {
00403bfa          *(uint32_t*)((char*)var_24 + (var_1c << 2)) = eax_97;
00403bfd          var_1c += 1;
00403bf0      }
00403bf0      
00403c06      uint32_t eax_101 = compute_str_hash("ID_Graphics_TextureFiltering_Tri…");
00403c15      int32_t eax_103 = (var_20 & 0x7fffffff);
00403c15      
00403c1f      if (var_1c < eax_103)
00403c1f      {
00403c42          *(uint32_t*)((char*)var_24 + (var_1c << 2)) = eax_101;
00403c45          var_1c += 1;
00403c1f      }
00403c1f      else if (SmartArray<unsigned long,1>::grow(&var_24, SmartArray<unsigned long,1>::get_new_size(&var_24, (eax_103 + 1))) != 0)
00403c38      {
00403c42          *(uint32_t*)((char*)var_24 + (var_1c << 2)) = eax_101;
00403c45          var_1c += 1;
00403c38      }
00403c38      
00403c4e      uint32_t eax_108 = compute_str_hash("ID_Graphics_TextureFiltering_Sha…");
00403c5d      int32_t eax_110 = (var_20 & 0x7fffffff);
00403c5d      
00403c67      if (var_1c < eax_110)
00403c67      {
00403c8a          *(uint32_t*)((char*)var_24 + (var_1c << 2)) = eax_108;
00403c8d          var_1c += 1;
00403c67      }
00403c67      else if (SmartArray<unsigned long,1>::grow(&var_24, SmartArray<unsigned long,1>::get_new_size(&var_24, (eax_110 + 1))) != 0)
00403c80      {
00403c8a          *(uint32_t*)((char*)var_24 + (var_1c << 2)) = eax_108;
00403c8d          var_1c += 1;
00403c80      }
00403c80      
00403c96      uint32_t eax_114 = compute_str_hash("ID_Graphics_TextureFiltering_Ani…");
00403ca5      int32_t eax_116 = (var_20 & 0x7fffffff);
00403caf      int32_t var_1c_1;
00403caf      
00403caf      if (var_1c < eax_116)
00403caf      {
00403cd2          *(uint32_t*)((char*)var_24 + (var_1c << 2)) = eax_114;
00403cd5          var_1c_1 = (var_1c + 1);
00403caf      }
00403caf      else if (SmartArray<unsigned long,1>::grow(&var_24, SmartArray<unsigned long,1>::get_new_size(&var_24, (eax_116 + 1))) != 0)
00403cc8      {
00403cd2          *(uint32_t*)((char*)var_24 + (var_1c << 2)) = eax_114;
00403cd5          var_1c_1 = (var_1c + 1);
00403cc8      }
00403ce3      UIPreferences::SetEnumChoices(&Render_TextureFiltering, &var_24);
00403ced      uint32_t eax_121 = compute_str_hash("ID_Graphics_BuildingDetailTextur…");
00403d10      UIPreferences::AttachPreference(&Render_BuildingDetailTextures, 4, 0x10000003, compute_str_hash("ID_Graphics_BuildingDetailTextur…"), eax_121);
00403d1a      uint32_t eax_123 = compute_str_hash("ID_Graphics_MultiPassAlpha_Help");
00403d3d      UIPreferences::AttachPreference(&Render_MultiPassAlpha, 4, 0x10000003, compute_str_hash("ID_Graphics_MultiPassAlpha"), eax_123);
00403d47      uint32_t eax_125 = compute_str_hash("ID_Graphics_LandscapeTextureDeta…");
00403d6a      UIPreferences::AttachPreference(&Render_LandscapeTextureDetail, 2, 0x10000003, compute_str_hash("ID_Graphics_LandscapeTextureDeta…"), eax_125);
00403d74      void* var_48 = nullptr;
00403d78      int32_t var_44 = 0;
00403d7c      int32_t var_40 = 0;
00403d80      uint32_t eax_127 = compute_str_hash("ID_Graphics_Value_VeryLow");
00403d80      
00403da1      if (SmartArray<unsigned long,1>::grow(&var_48, SmartArray<unsigned long,1>::get_new_size(&var_48, 1)) != 0)
00403da1      {
00403dab          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_127;
00403dae          var_40 += 1;
00403da1      }
00403da1      
00403db7      uint32_t eax_131 = compute_str_hash("ID_Graphics_Value_Low");
00403dc6      int32_t eax_133 = (var_44 & 0x7fffffff);
00403dc6      
00403dd0      if (var_40 < eax_133)
00403dd0      {
00403df3          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_131;
00403df6          var_40 += 1;
00403dd0      }
00403dd0      else if (SmartArray<unsigned long,1>::grow(&var_48, SmartArray<unsigned long,1>::get_new_size(&var_48, (eax_133 + 1))) != 0)
00403de9      {
00403df3          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_131;
00403df6          var_40 += 1;
00403de9      }
00403de9      
00403dff      uint32_t eax_138 = compute_str_hash("ID_Graphics_Value_Medium");
00403e0e      int32_t eax_140 = (var_44 & 0x7fffffff);
00403e0e      
00403e18      if (var_40 < eax_140)
00403e18      {
00403e3b          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_138;
00403e3e          var_40 += 1;
00403e18      }
00403e18      else if (SmartArray<unsigned long,1>::grow(&var_48, SmartArray<unsigned long,1>::get_new_size(&var_48, (eax_140 + 1))) != 0)
00403e31      {
00403e3b          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_138;
00403e3e          var_40 += 1;
00403e31      }
00403e31      
00403e47      uint32_t eax_144 = compute_str_hash("ID_Graphics_Value_High");
00403e56      int32_t eax_146 = (var_44 & 0x7fffffff);
00403e56      
00403e60      if (var_40 < eax_146)
00403e60      {
00403e83          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_144;
00403e86          var_40 += 1;
00403e60      }
00403e60      else if (SmartArray<unsigned long,1>::grow(&var_48, SmartArray<unsigned long,1>::get_new_size(&var_48, (eax_146 + 1))) != 0)
00403e79      {
00403e83          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_144;
00403e86          var_40 += 1;
00403e79      }
00403e79      
00403e8f      uint32_t eax_151 = compute_str_hash("ID_Graphics_Value_VeryHigh");
00403e9e      int32_t eax_153 = (var_44 & 0x7fffffff);
00403ea8      int32_t var_40_1;
00403ea8      
00403ea8      if (var_40 < eax_153)
00403ea8      {
00403ecb          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_151;
00403ece          var_40_1 = (var_40 + 1);
00403ea8      }
00403ea8      else if (SmartArray<unsigned long,1>::grow(&var_48, SmartArray<unsigned long,1>::get_new_size(&var_48, (eax_153 + 1))) != 0)
00403ec1      {
00403ecb          *(uint32_t*)((char*)var_48 + (var_40 << 2)) = eax_151;
00403ece          var_40_1 = (var_40 + 1);
00403ec1      }
00403edc      UIPreferences::SetEnumChoices(&Render_LandscapeTextureDetail, &var_48);
00403ee6      uint32_t eax_158 = compute_str_hash("ID_Graphics_EnvironmentTextureDe…");
00403f09      UIPreferences::AttachPreference(&Render_EnvironmentTextureDetail, 2, 0x10000003, compute_str_hash("ID_Graphics_EnvironmentTextureDe…"), eax_158);
00403f13      void* var_54 = nullptr;
00403f17      int32_t var_50 = 0;
00403f1b      int32_t var_4c = 0;
00403f1f      uint32_t eax_160 = compute_str_hash("ID_Graphics_Value_VeryLow");
00403f1f      
00403f40      if (SmartArray<unsigned long,1>::grow(&var_54, SmartArray<unsigned long,1>::get_new_size(&var_54, 1)) != 0)
00403f40      {
00403f4a          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_160;
00403f4d          var_4c += 1;
00403f40      }
00403f40      
00403f56      uint32_t eax_164 = compute_str_hash("ID_Graphics_Value_Low");
00403f65      int32_t eax_166 = (var_50 & 0x7fffffff);
00403f65      
00403f6f      if (var_4c < eax_166)
00403f6f      {
00403f92          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_164;
00403f95          var_4c += 1;
00403f6f      }
00403f6f      else if (SmartArray<unsigned long,1>::grow(&var_54, SmartArray<unsigned long,1>::get_new_size(&var_54, (eax_166 + 1))) != 0)
00403f88      {
00403f92          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_164;
00403f95          var_4c += 1;
00403f88      }
00403f88      
00403f9e      uint32_t eax_170 = compute_str_hash("ID_Graphics_Value_Medium");
00403fad      int32_t eax_172 = (var_50 & 0x7fffffff);
00403fad      
00403fb7      if (var_4c < eax_172)
00403fb7      {
00403fda          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_170;
00403fdd          var_4c += 1;
00403fb7      }
00403fb7      else if (SmartArray<unsigned long,1>::grow(&var_54, SmartArray<unsigned long,1>::get_new_size(&var_54, (eax_172 + 1))) != 0)
00403fd0      {
00403fda          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_170;
00403fdd          var_4c += 1;
00403fd0      }
00403fd0      
00403fe6      uint32_t eax_177 = compute_str_hash("ID_Graphics_Value_High");
00403ff5      int32_t eax_179 = (var_50 & 0x7fffffff);
00403ff5      
00403fff      if (var_4c < eax_179)
00403fff      {
00404022          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_177;
00404025          var_4c += 1;
00403fff      }
00403fff      else if (SmartArray<unsigned long,1>::grow(&var_54, SmartArray<unsigned long,1>::get_new_size(&var_54, (eax_179 + 1))) != 0)
00404018      {
00404022          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_177;
00404025          var_4c += 1;
00404018      }
00404018      
0040402e      uint32_t eax_184 = compute_str_hash("ID_Graphics_Value_VeryHigh");
0040403d      int32_t eax_186 = (var_50 & 0x7fffffff);
00404047      int32_t var_4c_1;
00404047      
00404047      if (var_4c < eax_186)
00404047      {
0040406a          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_184;
0040406d          var_4c_1 = (var_4c + 1);
00404047      }
00404047      else if (SmartArray<unsigned long,1>::grow(&var_54, SmartArray<unsigned long,1>::get_new_size(&var_54, (eax_186 + 1))) != 0)
00404060      {
0040406a          *(uint32_t*)((char*)var_54 + (var_4c << 2)) = eax_184;
0040406d          var_4c_1 = (var_4c + 1);
00404060      }
0040407b      UIPreferences::SetEnumChoices(&Render_EnvironmentTextureDetail, &var_54);
00404085      uint32_t eax_190 = compute_str_hash("ID_Graphics_SceneryDrawDistance_…");
004040a8      UIPreferences::AttachPreference(&Render_SceneryDrawDistance, 2, 0x10000003, compute_str_hash("ID_Graphics_SceneryDrawDistance"), eax_190);
004040b2      void* var_18 = nullptr;
004040b6      int32_t var_14 = 0;
004040ba      int32_t var_10 = 0;
004040be      uint32_t eax_192 = compute_str_hash("ID_Graphics_Value_Low");
004040be      
004040df      if (SmartArray<unsigned long,1>::grow(&var_18, SmartArray<unsigned long,1>::get_new_size(&var_18, 1)) != 0)
004040df      {
004040e9          *(uint32_t*)((char*)var_18 + (var_10 << 2)) = eax_192;
004040ec          var_10 += 1;
004040df      }
004040df      
004040f5      uint32_t eax_195 = compute_str_hash("ID_Graphics_Value_Medium");
00404104      int32_t eax_197 = (var_14 & 0x7fffffff);
00404104      
0040410e      if (var_10 < eax_197)
0040410e      {
00404131          *(uint32_t*)((char*)var_18 + (var_10 << 2)) = eax_195;
00404134          var_10 += 1;
0040410e      }
0040410e      else if (SmartArray<unsigned long,1>::grow(&var_18, SmartArray<unsigned long,1>::get_new_size(&var_18, (eax_197 + 1))) != 0)
00404127      {
00404131          *(uint32_t*)((char*)var_18 + (var_10 << 2)) = eax_195;
00404134          var_10 += 1;
00404127      }
00404127      
0040413d      uint32_t eax_202 = compute_str_hash("ID_Graphics_Value_High");
0040414c      int32_t eax_204 = (var_14 & 0x7fffffff);
00404156      int32_t var_10_1;
00404156      
00404156      if (var_10 < eax_204)
00404156      {
00404179          *(uint32_t*)((char*)var_18 + (var_10 << 2)) = eax_202;
0040417c          var_10_1 = (var_10 + 1);
00404156      }
00404156      else if (SmartArray<unsigned long,1>::grow(&var_18, SmartArray<unsigned long,1>::get_new_size(&var_18, (eax_204 + 1))) != 0)
0040416f      {
00404179          *(uint32_t*)((char*)var_18 + (var_10 << 2)) = eax_202;
0040417c          var_10_1 = (var_10 + 1);
0040416f      }
0040418a      UIPreferences::SetEnumChoices(&Render_SceneryDrawDistance, &var_18);
00404194      uint32_t eax_209 = compute_str_hash("ID_Graphics_LandscapeDrawDistanc…");
004041b7      UIPreferences::AttachPreference(&Render_LandscapeDrawDistance, 2, 0x10000003, compute_str_hash("ID_Graphics_LandscapeDrawDistanc…"), eax_209);
004041c1      void* var_60 = nullptr;
004041c5      int32_t var_5c = 0;
004041c9      int32_t var_58 = 0;
004041cd      uint32_t eax_211 = compute_str_hash("ID_Graphics_Value_VeryLow");
004041cd      
004041ee      if (SmartArray<unsigned long,1>::grow(&var_60, SmartArray<unsigned long,1>::get_new_size(&var_60, 1)) != 0)
004041ee      {
004041f8          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_211;
004041fb          var_58 += 1;
004041ee      }
004041ee      
00404204      uint32_t eax_215 = compute_str_hash("ID_Graphics_Value_Low");
00404213      int32_t eax_217 = (var_5c & 0x7fffffff);
00404213      
0040421d      if (var_58 < eax_217)
0040421d      {
00404240          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_215;
00404243          var_58 += 1;
0040421d      }
0040421d      else if (SmartArray<unsigned long,1>::grow(&var_60, SmartArray<unsigned long,1>::get_new_size(&var_60, (eax_217 + 1))) != 0)
00404236      {
00404240          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_215;
00404243          var_58 += 1;
00404236      }
00404236      
0040424c      uint32_t eax_221 = compute_str_hash("ID_Graphics_Value_Medium");
0040425b      int32_t eax_223 = (var_5c & 0x7fffffff);
0040425b      
00404265      if (var_58 < eax_223)
00404265      {
00404288          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_221;
0040428b          var_58 += 1;
00404265      }
00404265      else if (SmartArray<unsigned long,1>::grow(&var_60, SmartArray<unsigned long,1>::get_new_size(&var_60, (eax_223 + 1))) != 0)
0040427e      {
00404288          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_221;
0040428b          var_58 += 1;
0040427e      }
0040427e      
00404294      uint32_t eax_228 = compute_str_hash("ID_Graphics_Value_High");
004042a3      int32_t eax_230 = (var_5c & 0x7fffffff);
004042a3      
004042ad      if (var_58 < eax_230)
004042ad      {
004042d0          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_228;
004042d3          var_58 += 1;
004042ad      }
004042ad      else if (SmartArray<unsigned long,1>::grow(&var_60, SmartArray<unsigned long,1>::get_new_size(&var_60, (eax_230 + 1))) != 0)
004042c6      {
004042d0          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_228;
004042d3          var_58 += 1;
004042c6      }
004042c6      
004042dc      uint32_t eax_235 = compute_str_hash("ID_Graphics_Value_VeryHigh");
004042eb      int32_t eax_237 = (var_5c & 0x7fffffff);
004042eb      
004042f5      if (var_58 < eax_237)
004042f5      {
00404318          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_235;
0040431b          var_58 += 1;
004042f5      }
004042f5      else if (SmartArray<unsigned long,1>::grow(&var_60, SmartArray<unsigned long,1>::get_new_size(&var_60, (eax_237 + 1))) != 0)
0040430e      {
00404318          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_235;
0040431b          var_58 += 1;
0040430e      }
0040430e      
00404324      uint32_t eax_241 = compute_str_hash("ID_Graphics_Value_Extreme");
00404333      int32_t eax_243 = (var_5c & 0x7fffffff);
0040433d      int32_t var_58_1;
0040433d      
0040433d      if (var_58 < eax_243)
0040433d      {
00404360          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_241;
00404363          var_58_1 = (var_58 + 1);
0040433d      }
0040433d      else if (SmartArray<unsigned long,1>::grow(&var_60, SmartArray<unsigned long,1>::get_new_size(&var_60, (eax_243 + 1))) != 0)
00404356      {
00404360          *(uint32_t*)((char*)var_60 + (var_58 << 2)) = eax_241;
00404363          var_58_1 = (var_58 + 1);
00404356      }
00404371      UIPreferences::SetEnumChoices(&Render_LandscapeDrawDistance, &var_60);
0040437b      uint32_t eax_248 = compute_str_hash("ID_Graphics_FieldOfView_Help");
0040439e      UIPreferences::AttachPreference(&Render_FieldOfView, 3, 0x10000003, compute_str_hash("ID_Graphics_FieldOfView"), eax_248);
004043b2      UIPreferences::SetPreferenceRange(&Render_FieldOfView, 10f, 160f);
004043bc      uint32_t eax_250 = compute_str_hash("ID_Graphics_ScreenBrightness_Hel…");
004043df      UIPreferences::AttachPreference(&Render_ScreenBrightness, 3, 0x10000003, compute_str_hash("ID_Graphics_ScreenBrightness"), eax_250);
004043f3      UIPreferences::SetPreferenceRange(&Render_ScreenBrightness, -1f, 1f);
004043fd      uint32_t eax_252 = compute_str_hash("ID_Graphics_AdaptiveDegrade_Help");
00404420      UIPreferences::AttachPreference(&Render_AutomaticDegrades, 4, 0x10000003, compute_str_hash("ID_Graphics_AdaptiveDegrade"), eax_252);
0040442a      uint32_t eax_254 = compute_str_hash("ID_Graphics_AdaptiveDegradeBias_…");
0040444d      UIPreferences::AttachPreference(&Render_GraphicsPerformance, 3, 0x10000003, compute_str_hash("ID_Graphics_AdaptiveDegradeBias"), eax_254);
00404461      UIPreferences::SetPreferenceRange(&Render_GraphicsPerformance, -1f, 1f);
0040446b      uint32_t eax_256 = compute_str_hash("ID_Graphics_DegradeDistance_Help");
0040448e      UIPreferences::AttachPreference(&Render_DegradeDistance, 3, 0x10000003, compute_str_hash("ID_Graphics_DegradeDistance"), eax_256);
0040449e      UIPreferences::SetPreferenceRange(&Render_DegradeDistance, 0f, 100f);
004044a8      uint32_t eax_258 = compute_str_hash("ID_Rendering_FullScreen_Help");
004044cb      UIPreferences::AttachPreference(&Display_FullScreen, 4, 0x10000003, compute_str_hash("ID_Rendering_FullScreen"), eax_258);
004044d5      uint32_t eax_260 = compute_str_hash("ID_Rendering_SyncToDisplayRefres…");
004044f8      UIPreferences::AttachPreference(&Display_SyncToRefresh, 4, 0x10000003, compute_str_hash("ID_Rendering_SyncToDisplayRefres…"), eax_260);
00404502      uint32_t eax_262 = compute_str_hash("ID_Rendering_DisplayResolution_H…");
00404525      UIPreferences::AttachPreference(&Display_Resolution, 2, 0x10000003, compute_str_hash("ID_Rendering_DisplayResolution"), eax_262);
0040452f      uint32_t eax_264 = compute_str_hash("ID_Rendering_RefreshRate_Help");
00404552      UIPreferences::AttachPreference(&Display_RefreshRate, 2, 0x10000003, compute_str_hash("ID_Rendering_RefreshRate"), eax_264);
0040455c      uint32_t eax_266 = compute_str_hash("ID_Input_MouseLookSensitivity_He…");
0040457f      UIPreferences::AttachPreference(&Input_MouseLookSensitivity, 3, 0x10000003, compute_str_hash("ID_Input_MouseLookSensitivity"), eax_266);
00404593      UIPreferences::SetPreferenceRange(&Input_MouseLookSensitivity, 0.00999999978f, 1f);
0040459d      uint32_t eax_268 = compute_str_hash("ID_Input_InvertMouseLookYAxis_He…");
004045c0      UIPreferences::AttachPreference(&Input_InvertMouseLookYAxis, 4, 0x10000003, compute_str_hash("ID_Input_InvertMouseLookYAxis"), eax_268);
004045ca      uint32_t eax_270 = compute_str_hash("ID_Input_UseMouseTurning_Help");
004045ed      UIPreferences::AttachPreference(&Input_UseMouseTurning, 4, 0x10000003, compute_str_hash("ID_Input_UseMouseTurning"), eax_270);
004045f7      uint32_t eax_272 = compute_str_hash("ID_Camera_AlignToSlope_Help");
0040461a      UIPreferences::AttachPreference(&Camera_AlignToSlope, 4, 0x10000003, compute_str_hash("ID_Camera_AlignToSlope"), eax_272);
00404624      uint32_t eax_274 = compute_str_hash("ID_Camera_Stiffness_Help");
00404647      UIPreferences::AttachPreference(&Camera_Stiffness, 3, 0x10000003, compute_str_hash("ID_Camera_Stiffness"), eax_274);
0040465b      UIPreferences::SetPreferenceRange(&Camera_Stiffness, 0.285714298f, 1f);
00404665      uint32_t eax_276 = compute_str_hash("ID_Camera_AdjustmentSpeed_Help");
00404688      UIPreferences::AttachPreference(&Camera_AdjustmentSpeed, 3, 0x10000003, compute_str_hash("ID_Camera_AdjustmentSpeed"), eax_276);
0040469c      UIPreferences::SetPreferenceRange(&Camera_AdjustmentSpeed, 5f, 80f);
0040469c      
004046b4      if ((var_5c & 0x80000000) == 0x80000000)
004046bb          operator delete[](var_60);
004046bb      
004046d3      if ((var_14 & 0x80000000) == 0x80000000)
004046da          operator delete[](var_18);
004046da      
004046f2      if ((var_50 & 0x80000000) == 0x80000000)
004046f9          operator delete[](var_54);
004046f9      
0040470f      if ((var_44 & 0x80000000) == 0x80000000)
00404716          operator delete[](var_48);
00404716      
0040472e      if ((var_20 & 0x80000000) == 0x80000000)
00404735          operator delete[](var_24);
00404735      
0040474d      if ((var_38 & 0x80000000) == 0x80000000)
00404754          operator delete[](var_3c);
00404754      
0040476a      if ((var_2c & 0x80000000) == 0x80000000)
00404771          operator delete[](var_30);
00404771      
00404789      if ((var_8 & 0x80000000) == 0x80000000)
00404790          operator delete[](var_c);
004035b0  }

0040479c                                                                                      90 90 90 90                              ....

004047a0  uint8_t __thiscall gmClient::Init(class gmClient* this, class PStringBase<char> const* arg2, int32_t const arg3, int32_t const arg4)

004047a0  {
004047af      Device::ForceDisplayResolution(1, 0x320, 0x258);
004047c8      uint8_t result;
004047c8      class gmClient* esi_1;
004047c8      result = Client::Init(this, arg2, arg3, arg4);
004047c8      
004047cf      if (result == 0)
004047d2          return result;
004047d2      
004047d7      void* eax_1 = operator new(0x58);
004047e1      int32_t* eax_2;
004047e1      
004047e1      if (eax_1 == 0)
004047f6          eax_2 = nullptr;
004047e1      else
004047ef          eax_2 = UIQueueManager::UIQueueManager(eax_1, esi_1->netQueues_[9]);
004047ef      
004047f8      esi_1->m_UIQueueManager = eax_2;
00404802      *(uint32_t*)(*(uint32_t*)eax_2 + 0x18)();
0040480c      setlocale(0, "English");
00404815      class NoticeRegistrar* eax_3 = GlobalEventHandler::GetGlobalEventHandler();
00404815      
0040481c      if (eax_3 != 0)
0040481e          eax_3->vtable->RegisterNoticeHandler(eax_3, 0x186a2, &esi_1->vtable);
0040481e      
00404833      gmClient::InitUIPreferences(esi_1);
00404838      int32_t eax_4;
00404838      eax_4 = 1;
0040483b      return 1;
004047a0  }

0040483e                                                                                            90 90                                ..

00404840  void __thiscall PStringBase<unsigned short>::PStringBase<unsigned short>(class PStringBase<unsigned short>* this, enum _WidthConvert arg2, char const* arg3)

00404840  {
00404840      class PStringBase<unsigned short>* this_1 = this;
00404841      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00404846      void* __return_1;
00404846      void* __return = __return_1;
00404847      class PSRefBufferCharData<unsigned short>** this_2 = this;
0040484b      int32_t edi;
0040484b      int32_t var_c = edi;
00404850      *(uint32_t*)this_2 = PStringBase<unsigned short>::s_NullBuffer_1;
00404852      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00404861      PStringBase<char>::PStringBase<char>(&arg2, arg2);
00404876      class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<char>::to_wpstring(&arg2, &__return, 0)->m_charbuffer;
00404878      int32_t ecx_4 = m_charbuffer->m_data[0x7ffffffffffffffe];
00404878      
0040487e      if (ecx_4 != 1)
00404885          PStringBase<unsigned short>::append_n_chars(this_2, m_charbuffer, (ecx_4 - 1));
00404885      
0040488e      int32_t ebx;
0040488e      int32_t var_14_2 = ebx;
00404895      int32_t* edi_2 = ((char*)__return - 0x14);
00404895      
004048a4      if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004048ac          **(uint32_t**)edi_2(1);
004048ac      
004048c2      if ((InterlockedDecrement(&arg3[0xfffffff0]) == 0 && arg3 != 0x14))
004048ca          **(uint32_t**)(arg3 - 0x14)(1);
00404840  }

004048d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004048e0  void __stdcall gmClient::RecvNotice_WorldName(class gmClient* this @ ecx, class AC1Legacy::PStringBase<char> const* arg2)

004048e0  {
00404909      *(uint32_t*)(*(uint32_t*)(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &arg2->m_buffer->m_data) - 0x138) + 0x58)(&arg2);
00404910      void* __offset(AC1Legacy::PStringBase<char>, -0x14) esi_3 = &arg2[-5];
00404910      
00404923      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0040492b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004048e0  }

00404931                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00404940  int32_t __thiscall PStringBase<char>::cmp(class PStringBase<char> const* this, class PStringBase<char> const* arg2, uint8_t arg3)

00404940  {
0040494a      if (arg3 == 0)
00404996          return _stricmp(this->m_charbuffer, arg2->m_charbuffer);
00404996      
0040494c      int32_t ebx;
0040494c      int32_t var_4 = ebx;
0040494e      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00404950      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00404950      
00404952      while (true)
00404952      {
00404952          char edx = m_charbuffer->m_data[0];
00404954          ebx = m_charbuffer_1->m_data[0];
00404956          this = edx;
00404958          bool c_1 = edx < ebx;
00404958          
0040495a          if (edx == ebx)
0040495a          {
0040495e              if (this == 0)
0040495e                  break;
0040495e              
00404960              edx = m_charbuffer->m_data[1];
00404963              ebx = m_charbuffer_1->m_data[1];
00404966              this = edx;
00404968              c_1 = edx < ebx;
00404968              
0040496a              if (edx == ebx)
0040496a              {
0040496c                  m_charbuffer = &m_charbuffer->m_data[2];
0040496f                  m_charbuffer_1 = &m_charbuffer_1->m_data[2];
0040496f                  
00404974                  if (this == 0)
00404974                      break;
00404974                  
00404974                  continue;
0040496a              }
0040495a          }
0040495a          
0040497d          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00404984          return (((char*)m_charbuffer - m_charbuffer) + 1);
00404952      }
00404952      
0040497a      return 0;
00404940  }

00404999                                                                             90 90 90 90 90 90 90                           .......

004049a0  char* _STL::__node_alloc<1,0>::_S_chunk_alloc(uint32_t arg1, int32_t* arg2)

004049a0  {
004049a6      char* _STL::__node_alloc<1,0>::_S_start_free_1 = _STL::__node_alloc<1,0>::_S_start_free;
004049b8      int32_t ecx_1 = (*(uint32_t*)arg2 * arg1);
004049bb      void* edx = (_STL::__node_alloc<1,0>::_S_end_free - _STL::__node_alloc<1,0>::_S_start_free_1);
004049bb      
004049c1      if (edx < ecx_1)
004049c1      {
004049c7          uint32_t _STL::__node_alloc<1,0>::_S_heap_size_1 = _STL::__node_alloc<1,0>::_S_heap_size;
004049c7          
00404a7d          do
00404a7d          {
004049d2              if (edx >= arg1)
004049d2              {
00404aab                  int32_t temp0 = (COMBINE(0, edx) / arg1);
00404aaf                  *(uint32_t*)arg2 = temp0;
00404ab5                  char* _STL::__node_alloc<1,0>::_S_start_free_2 = _STL::__node_alloc<1,0>::_S_start_free;
00404ac0                  _STL::__node_alloc<1,0>::_S_start_free = &_STL::__node_alloc<1,0>::_S_start_free_2[(temp0 * arg1)];
00404ac9                  return _STL::__node_alloc<1,0>::_S_start_free_2;
004049d2              }
004049d2              
004049e3              uint32_t edi_1 = ((((_STL::__node_alloc<1,0>::_S_heap_size_1 >> 4) + 7) & 0xfffffff8) + (ecx_1 << 1));
004049e3              
004049e6              if (edx > 0)
004049e6              {
004049eb                  uint32_t ecx_3 = (((char*)edx - 1) >> 3);
004049fc                  *(uint32_t*)_STL::__node_alloc<1,0>::_S_start_free_1 = _STL::__node_alloc<1,0>::_S_free_list[ecx_3];
004049f5                  _STL::__node_alloc<1,0>::_S_free_list[ecx_3] = _STL::__node_alloc<1,0>::_S_start_free;
004049e6              }
004049e6              
00404a06              _STL::__node_alloc<1,0>::_S_start_free_1 = operator new(edi_1);
00404a10              _STL::__node_alloc<1,0>::_S_start_free = _STL::__node_alloc<1,0>::_S_start_free_1;
00404a10              
00404a15              if (_STL::__node_alloc<1,0>::_S_start_free_1 != 0)
00404a15                  goto label_404a62;
00404a15              
00404a1d              uint32_t ecx_5 = arg1;
00404a1f              void* edx_5;
00404a1f              
00404a1f              if (arg1 > 0x80)
00404a1f              {
00404a45              label_404a45:
00404a45                  _STL::__node_alloc<1,0>::_S_end_free = nullptr;
00404a4f                  _STL::__node_alloc<1,0>::_S_start_free_1 = operator new(edi_1);
00404a57                  _STL::__node_alloc<1,0>::_S_start_free = _STL::__node_alloc<1,0>::_S_start_free_1;
00404a62              label_404a62:
00404a62                  _STL::__node_alloc<1,0>::_S_heap_size_1 = (_STL::__node_alloc<1,0>::_S_heap_size + edi_1);
00404a64                  _STL::__node_alloc<1,0>::_S_heap_size = _STL::__node_alloc<1,0>::_S_heap_size_1;
00404a6a                  edx_5 = &_STL::__node_alloc<1,0>::_S_start_free_1[edi_1];
00404a1f              }
00404a1f              else
00404a1f              {
00404a24                  while (true)
00404a24                  {
00404a24                      uint32_t edx_3 = ((ecx_5 - 1) >> 3);
00404a27                      _STL::__node_alloc<1,0>::_S_start_free_1 = _STL::__node_alloc<1,0>::_S_free_list[edx_3];
00404a27                      
00404a37                      if (_STL::__node_alloc<1,0>::_S_start_free_1 != 0)
00404a37                      {
00404a30                          _STL::__node_alloc<1,0>::_S_free_list[edx_3] = *(uint32_t*)_STL::__node_alloc<1,0>::_S_start_free_1;
00404a97                          _STL::__node_alloc<1,0>::_S_heap_size_1 = _STL::__node_alloc<1,0>::_S_heap_size;
00404a9d                          _STL::__node_alloc<1,0>::_S_start_free = _STL::__node_alloc<1,0>::_S_start_free_1;
00404aa2                          edx_5 = &_STL::__node_alloc<1,0>::_S_start_free_1[ecx_5];
00404aa5                          break;
00404a37                      }
00404a37                      
00404a39                      ecx_5 += 8;
00404a39                      
00404a42                      if (ecx_5 > 0x80)
00404a42                          goto label_404a45;
00404a24                  }
00404a1f              }
00404a1f              
00404a6d              _STL::__node_alloc<1,0>::_S_end_free = edx_5;
00404a76              ecx_1 = (*(uint32_t*)arg2 * arg1);
00404a79              edx = ((char*)edx_5 - _STL::__node_alloc<1,0>::_S_start_free_1);
00404a7d          } while (edx < ecx_1);
004049c1      }
004049c1      
00404a8a      _STL::__node_alloc<1,0>::_S_start_free = &_STL::__node_alloc<1,0>::_S_start_free_1[ecx_1];
00404a92      return _STL::__node_alloc<1,0>::_S_start_free_1;
004049a0  }

00404aca                                90 90 90 90 90 90                                                            ......

00404ad0  void __fastcall PStringBase<char>::clear(class PStringBase<char>* this)

00404ad0  {
00404ad3      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00404ad3      
00404adb      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
00404adb      {
00404af1          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00404af9              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00404af9          
00404afb          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00404b06          this->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00404b08          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
00404adb      }
00404ad0  }

00404b11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00404b20  uint8_t __thiscall PStringBase<char>::eq(class PStringBase<char> const* this, class PStringBase<char> const* arg2, uint8_t arg3)

00404b20  {
00404b2a      int32_t eax = PStringBase<char>::cmp(this, arg2, arg3);
00404b2f      int32_t eax_1 = -(eax);
00404b34      return (((int8_t)(eax_1 - eax_1)) + 1);
00404b20  }

00404b37                                                                       90 90 90 90 90 90 90 90 90                         .........

00404b40  int32_t __thiscall PStringBase<char>::find_substring(class PStringBase<char> const* this, class PStringBase<char> const* arg2)

00404b40  {
00404b4d      int32_t eax_1 = strstr(this->m_charbuffer, arg2->m_charbuffer);
00404b4d      
00404b58      if (eax_1 != 0)
00404b64          return (eax_1 - this->m_charbuffer);
00404b64      
00404b5e      return 0xffffffff;
00404b40  }

00404b67                       90 90 90 90 90 90 90 90 90                                                         .........

00404b70  uint32_t __fastcall PStringBase<char>::to_uint32(class PStringBase<char> const* this)

00404b70  {
00404b71      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00404b7e      *(uint32_t*)_errno() = 0;
00404b8e      return strtoul(m_charbuffer, 0, 0);
00404b70  }

00404b8f                                               90                                                                 .

00404b90  void _STL::_STLP_mutex_spin<0>::_M_do_lock(int32_t volatile* arg1)

00404b90  {
00404b90      int32_t ecx;
00404b90      int32_t var_4 = ecx;
00404b90      
00404ba1      if (InterlockedExchange(arg1, 1) != 0)
00404ba1      {
00404bab          uint32_t _STL::_STLP_mutex_spin<0>::__max_1 = _STL::_STLP_mutex_spin<0>::__max;
00404bb1          uint32_t esi_1 = 0;
00404bb5          var_4 = 0x11;
00404bb5          
00404bbd          if (_STL::_STLP_mutex_spin<0>::__max_1 <= 0)
00404bbd          {
00404c37          label_404c37:
00404c37              _STL::_STLP_mutex_spin<0>::__max = 0x1e;
00404c41              int32_t edi_1 = 6;
00404c41              
00404c49              while (true)
00404c49              {
00404c49                  int32_t esi_2 = edi_1;
00404c49                  
00404c4b                  if (edi_1 > 0x1b)
00404c4d                      esi_2 = 0x1b;
00404c4d                  
00404c5d                  if (InterlockedExchange(arg1, 1) == 0)
00404c5d                      break;
00404c5d                  
00404c62                  if (esi_2 > 0x14)
00404c62                  {
00404c76                      Sleep((1 << (esi_2 - 0x14)));
00404c78                      edi_1 += 1;
00404c62                  }
00404c62                  else
00404c62                  {
00404c66                      Sleep(1);
00404c68                      edi_1 += 1;
00404c62                  }
00404c49              }
00404bbd          }
00404bbd          else
00404bbd          {
00404bc1              uint32_t ebx_2 = (_STL::_STLP_mutex_spin<0>::__last >> 1);
00404bc1              
00404bcb              while (true)
00404bcb              {
00404bcb                  if ((esi_1 < ebx_2 || *(uint32_t*)arg1 != 0))
00404bcb                  {
00404bf8                      int32_t eax_4 = (var_4 * var_4);
00404c07                      int32_t edx_2 = (eax_4 * eax_4);
00404c16                      int32_t ecx_4 = (edx_2 * edx_2);
00404c28                      var_4 = (ecx_4 * ecx_4);
00404bcb                  }
00404bcb                  else if (InterlockedExchange(arg1, 1) == 0)
00404bd8                  {
00404bda                      _STL::_STLP_mutex_spin<0>::__last = esi_1;
00404be0                      _STL::_STLP_mutex_spin<0>::__max = 0x3e8;
00404be0                      break;
00404bd8                  }
00404bd8                  
00404c2c                  esi_1 += 1;
00404c2c                  
00404c2f                  if (esi_1 >= _STL::_STLP_mutex_spin<0>::__max_1)
00404c2f                      goto label_404c37;
00404bcb              }
00404bbd          }
00404ba1      }
00404b90  }

00404c7b                                                                                   90 90 90 90 90                             .....

00404c80  void* __convention("regparm") _STL::__node_alloc<1,0>::_S_refill(uint32_t arg1)

00404c80  {
00404c80      int32_t ecx;
00404c80      int32_t var_4 = ecx;
00404c8f      uint32_t esi_2 = ((arg1 + 7) & 0xfffffff8);
00404c93      var_4 = 0x14;
00404c9b      char* result = _STL::__node_alloc<1,0>::_S_chunk_alloc(esi_2, &var_4);
00404ca0      int32_t ebx = var_4;
00404ca0      
00404caa      if (ebx != 1)
00404caa      {
00404cac          void* ecx_1 = &result[esi_2];
00404cb5          _STL::__node_alloc<1,0>::_S_free_list[((esi_2 - 1) >> 3)] = ecx_1;
00404cbc          void* edx_3 = ecx_1;
00404cbe          void* ecx_2 = ((char*)ecx_1 + esi_2);
00404cc1          int32_t i = 1;
00404cc1          
00404cc9          if (ebx != 2)
00404cc9          {
00404cde              do
00404cde              {
00404cd0                  *(uint32_t*)edx_3 = ecx_2;
00404cd6                  i += 1;
00404cd7                  edx_3 = ecx_2;
00404cd9                  ecx_2 += esi_2;
00404cde              } while ((var_4 - 1) != i);
00404cc9          }
00404cc9          
00404ce0          *(uint32_t*)edx_3 = 0;
00404caa      }
00404caa      
00404cea      return result;
00404c80  }

00404ccd                                         8d 49 00                                                               .I.
00404ceb                                   90 90 90 90 90                                                             .....

00404cf0  void __thiscall PStringBase<char>::append_n_chars(class PStringBase<char>* this, char const* arg2, uint32_t arg3)

00404cf0  {
00404cf0      char const* edx_1 = arg2;
00404cf0      
00404d07      if ((edx_1 != 0 && (*(uint8_t*)edx_1 != 0 && arg3 != 0)))
00404d07      {
00404d09          class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00404d0c          int32_t ebx_1 = m_charbuffer->m_data[-4];
00404d14          int32_t ecx = (ebx_1 + arg3);
00404d14          
00404d1c          if ((*(int32_t*)((char*)m_charbuffer + -0x10) != 1 || ecx > *(int32_t*)((char*)m_charbuffer + -0xc)))
00404d1c          {
00404d33              PStringBase<char>::allocate_ref_buffer(this, (ecx - 1));
00404d3f              ps_strcpy(this->m_charbuffer, m_charbuffer);
00404d49              ReferenceCountTemplate<268435456,0>::Release(&m_charbuffer->m_data[0xffffffec]);
00404d4e              edx_1 = arg2;
00404d1c          }
00404d1c          else
00404d1c          {
00404d1e              *(uint32_t*)((char*)m_charbuffer - 4) = ecx;
00404d23              *(uint32_t*)(this->m_charbuffer - 8) = 0xffffffff;
00404d1c          }
00404d1c          
00404d5b          strncpy(&this->m_charbuffer->m_data[(ebx_1 - 1)], edx_1, arg3);
00404d61          class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_charbuffer;
00404d6a          m_charbuffer_1->m_data[(m_charbuffer_1->m_data[-4] - 1)] = 0;
00404d07      }
00404cf0  }

00404d75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00404d80  class PStringBase<char>* __thiscall PStringBase<char>::substring(class PStringBase<char> const* this, class PStringBase<char>* __return, uint32_t arg3, uint32_t arg4)

00404d80  {
00404d80      class PStringBase<char>* var_4 = this;
00404d81      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00404d8f      var_4 = PStringBase<char>::s_NullBuffer_1;
00404d99      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00404d9b      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00404da4      int32_t ecx_1 = (m_charbuffer->m_data[-4] - 1);
00404da4      
00404da7      if (arg3 < ecx_1)
00404da7      {
00404da9          uint32_t eax_1 = arg4;
00404da9          
00404daf          if (eax_1 >= ecx_1)
00404db1              eax_1 = (ecx_1 - 1);
00404db1          
00404dbf          PStringBase<char>::append_n_chars(&var_4, &m_charbuffer->m_data[arg3], ((eax_1 - arg3) + 1));
00404da7      }
00404da7      
00404dc4      class PStringBase<char>* eax_4 = var_4;
00404dcc      __return->m_charbuffer = eax_4;
00404dd2      InterlockedIncrement(&eax_4[-4]);
00404dd8      void* __offset(PStringBase<char>, -0x14) esi_3 = &var_4[-5];
00404dd8      
00404deb      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00404df3          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00404df3      
00404dfb      return __return;
00404d80  }

00404dfe                                                                                            90 90                                ..

00404e00  void __thiscall PStringBase<char>::set(class PStringBase<char>* this, char const* arg2)

00404e00  {
00404e09      class PStringBase<char>* this_1 = this;
00404e09      
00404e11      if ((arg2 == 0 || *(uint8_t*)arg2 == 0))
00404e11      {
00404e7d          class PSRefBufferCharData<char>* m_charbuffer_1 = this_1->m_charbuffer;
00404e88          int32_t eax_6 = -(&m_charbuffer_1->m_data[0xffffffec]);
00404e88          
00404e90          if (((eax_6 - eax_6) & m_charbuffer_1) != PStringBase<char>::s_NullBuffer)
00404e90          {
00404ea5              if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00404ead                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00404ead              
00404eaf              class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00404ebc              this_1->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00404ebf              arg2 = (PStringBase<char>::s_NullBuffer_1 - 0x10);
00404ec3              /* tailcall */
00404ec3              return InterlockedIncrement();
00404e90          }
00404e11      }
00404e11      else
00404e11      {
00404e13          char const* eax = arg2;
00404e13          
00404e1d          do
00404e1d          {
00404e18              this = *(uint8_t*)eax;
00404e1a              eax = &eax[1];
00404e1d          } while (this != 0);
00404e1d          
00404e1f          void* eax_1 = (eax - &eax[1]);
00404e23          class PSRefBufferCharData<char>* m_charbuffer = this_1->m_charbuffer;
00404e23          
00404e2e          if ((*(int32_t*)((char*)m_charbuffer + -0x10) != 1 || *(int32_t*)((char*)m_charbuffer + -0xc) <= eax_1))
00404e2e          {
00404e55              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00404e5d                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00404e5d              
00404e62              PStringBase<char>::allocate_ref_buffer(this_1, eax_1);
00404e2e          }
00404e2e          else
00404e2e          {
00404e30              *(uint32_t*)((char*)m_charbuffer - 8) = 0xffffffff;
00404e3c              *(uint32_t*)(this_1->m_charbuffer - 4) = ((char*)eax_1 + 1);
00404e2e          }
00404e2e          
00404e6e          strncpy(this_1->m_charbuffer, arg2, ((char*)eax_1 + 1));
00404e11      }
00404e00  }

00404ec9                             90 90 90 90 90 90 90                                                           .......

00404ed0  void* _STL::__node_alloc<1,0>::_M_allocate(uint32_t arg1)

00404ed0  {
00404ee8      _STL::_STLP_mutex_spin<0>::_M_do_lock(&_STL::_Node_Alloc_Lock<1,0>::_S_lock);
00404eed      int32_t* eax = _STL::__node_alloc<1,0>::_S_free_list[((arg1 - 1) >> 3)];
00404eed      
00404ef4      if (eax != 0)
00404ef4      {
00404ee1          _STL::__node_alloc<1,0>::_S_free_list[((arg1 - 1) >> 3)] = *(uint32_t*)eax;
00404efb          _STL::_Node_Alloc_Lock<1,0>::_S_lock._M_lock = 0;
00404f06          return eax;
00404ef4      }
00404ef4      
00404f07      uint32_t var_c = arg1;
00404f08      void* eax_1 = _STL::__node_alloc<1,0>::_S_refill(eax);
00404f11      _STL::_Node_Alloc_Lock<1,0>::_S_lock._M_lock = 0;
00404f1c      return eax_1;
00404ed0  }

00404f1d                                                                                         90 90 90                               ...

00404f20  uint8_t __thiscall List<PStringBase<char> >::pop_front(class List<PStringBase<char> >* this, class PStringBase<char>* arg2)

00404f20  {
00404f24      class ListNode<PStringBase<char> >* _head = this->_head;
00404f24      
00404f2b      if (_head == 0)
00404f2b      {
00404f2e          int32_t eax;
00404f2e          eax = 0;
00404f31          return 0;
00404f2b      }
00404f2b      
00404f34      class ListNode<PStringBase<char> >* next = _head->next;
00404f39      this->_head = next;
00404f39      
00404f3c      if (next == 0)
00404f43          this->_tail = nullptr;
00404f3c      else
00404f3e          next->prev = nullptr;
00404f3e      
00404f4d      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
00404f4d      
00404f53      if (m_charbuffer != _head->data.m_charbuffer)
00404f53      {
00404f68          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00404f70              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00404f70          
00404f72          class PSRefBufferCharData<char>* m_charbuffer_1 = _head->data.m_charbuffer;
00404f74          arg2->m_charbuffer = m_charbuffer_1;
00404f7b          InterlockedIncrement(&m_charbuffer_1[-1]);
00404f53      }
00404f53      
00404f83      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (_head->data.m_charbuffer - 0x14);
00404f83      
00404f96      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00404f9e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00404f9e      
00404fa1      operator delete(_head);
00404faf      this->_num_elements -= 1;
00404fb3      uint32_t eax_7;
00404fb3      eax_7 = 1;
00404fb6      return 1;
00404f20  }

00404fb9                                                                             90 90 90 90 90 90 90                           .......

00404fc0  void _STL::__node_alloc<1,0>::deallocate(void* arg1, uint32_t arg2)

00404fc0  {
00404fc9      if (arg2 > 0x80)
00404fc9      {
00404fd0          operator delete(arg1);
00404fd8          return;
00404fc9      }
00404fc9      
00404fec      _STL::_STLP_mutex_spin<0>::_M_do_lock(&_STL::_Node_Alloc_Lock<1,0>::_S_lock);
00404ff7      *(uint32_t*)arg1 = _STL::__node_alloc<1,0>::_S_free_list[((arg2 - 1) >> 3)];
00404fe5      _STL::__node_alloc<1,0>::_S_free_list[((arg2 - 1) >> 3)] = arg1;
00404ffe      _STL::_Node_Alloc_Lock<1,0>::_S_lock._M_lock = 0;
00404fc0  }

0040500a                                90 90 90 90 90 90                                                            ......

00405010  void __fastcall List<PStringBase<char> >::flush(class List<PStringBase<char> >* this)

00405010  {
00405010      class List<PStringBase<char> >* var_4 = this;
00405010      
00405028      while (this->_head != 0)
00405028      {
0040502a          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040502f          var_4 = PStringBase<char>::s_NullBuffer_1;
00405037          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00405040          List<PStringBase<char> >::pop_front(this, &var_4);
00405049          void* __offset(List<PStringBase<char> >, -0x14) esi_2 = ((char*)var_4 - 0x14);
00405049          
00405054          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00405060              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00405028      }
00405010  }

0040506a                                90 90 90 90 90 90                                                            ......

00405070  void* __thiscall List<PStringBase<char> >::`scalar deleting destructor'(class List<PStringBase<char> >* this, uint32_t arg2)

00405070  {
00405073      this->vtable = &List<class PStringBase<char> >::`vftable';
00405079      List<PStringBase<char> >::flush(this);
00405079      
00405083      if ((arg2 & 1) != 0)
00405086          operator delete(this);
00405086      
00405091      return this;
00405070  }

00405094                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004050a0  int32_t __thiscall PStringBase<char>::replace(class PStringBase<char>* this, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3)

004050a0  {
004050b2      int32_t* edi = nullptr;
004050b6      void* var_c = nullptr;
004050ba      int32_t* var_8 = nullptr;
004050be      int32_t var_4 = 0;
004050c8      int32_t i = strstr(this->m_charbuffer, arg2->m_charbuffer);
004050cf      int32_t result = i;
004050cf      
004050d3      while (i != 0)
004050d3      {
004050d9          if (edi == var_4)
004050d9          {
004050fd              _STL::vector<char const *,_STL::allocator<char const *> >::_M_insert_overflow(&var_c, edi, &result, &arg3, 1, 1);
00405102              edi = var_8;
004050d9          }
004050d9          else
004050d9          {
004050dd              if (edi != 0)
004050df                  *(uint32_t*)edi = i;
004050df              
004050e1              edi = &edi[1];
004050e4              var_8 = edi;
004050d9          }
004050d9          
00405106          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
00405117          i = strstr(((m_charbuffer->m_data[-4] + i) - 1), m_charbuffer);
0040511e          result = i;
004050d3      }
004050d3      
00405124      void* ecx_2 = var_c;
0040512a      int32_t result_1 = (((char*)edi - ecx_2) >> 2);
0040512f      result = result_1;
0040512f      
00405133      if (result_1 == 0)
00405133      {
00405137          if (ecx_2 != 0)
00405147              _STL::__node_alloc<1,0>::deallocate(ecx_2, (((var_4 - ecx_2) >> 2) << 2));
00405147          
00405158          return 0;
00405133      }
00405133      
00405169      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_charbuffer;
00405171      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &m_charbuffer_1->m_data[0xffffffec];
00405182      PStringBase<char>::allocate_ref_buffer(this, ((((arg3->m_charbuffer->m_data[-4] - arg2->m_charbuffer->m_data[-4]) * result_1) + m_charbuffer_1->m_data[-4]) - 1));
0040518d      class PSRefBufferCharData<char>* m_charbuffer_3 = this->m_charbuffer;
00405190      class PSRefBufferCharData<char>* ebx_2 = ((char*)esi_1 + 0x14);
00405193      int32_t var_18 = 0;
00405193      
0040519b      if (result > 0)
0040519b      {
004051f9          bool cond:3_1;
004051f9          
004051f9          do
004051f9          {
004051ab              void* esi_3 = (*(uint32_t*)((char*)var_c + (var_18 << 2)) - ebx_2);
004051b0              strncpy(m_charbuffer_3, ebx_2, esi_3);
004051ba              class PSRefBufferCharData<char>* m_charbuffer_2 = arg3->m_charbuffer;
004051bf              char* edi_2 = ((char*)m_charbuffer_3 + esi_3);
004051c1              char* ebp_1 = edi_2;
004051cc              class PStringBase<char>* ecx_8;
004051cc              
004051cc              do
004051cc              {
004051c3                  ecx_8 = m_charbuffer_2->m_data[0];
004051c5                  m_charbuffer_2 = &m_charbuffer_2->m_data[1];
004051c6                  *(uint8_t*)ebp_1 = ecx_8;
004051c9                  ebp_1 = &ebp_1[1];
004051cc              } while (ecx_8 != 0);
004051dd              m_charbuffer_3 = &edi_2[(arg3->m_charbuffer->m_data[-4] - 1)];
004051ea              ebx_2 = (((char*)ebx_2 + (*(uint32_t*)(*(uint32_t*)arg2 - 4) + esi_3)) - 1);
004051f3              cond:3_1 = (var_18 + 1) < result;
004051f5              var_18 += 1;
004051f9          } while (cond:3_1);
0040519b      }
0040519b      
004051ff      char* edi_3 = ((char*)m_charbuffer_3 - ebx_2);
00405209      int32_t eax_9;
00405209      
00405209      do
00405209      {
00405201          eax_9 = ebx_2->m_data[0];
00405203          *(uint8_t*)(edi_3 + ebx_2) = eax_9;
00405206          ebx_2 = &ebx_2->m_data[1];
00405209      } while (eax_9 != 0);
00405209      
0040521b      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00405223          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00405223      
00405225      void* ecx_14 = var_c;
00405225      
0040522b      if (ecx_14 != 0)
0040523b          _STL::__node_alloc<1,0>::deallocate(ecx_14, (((var_4 - ecx_14) >> 2) << 2));
0040523b      
0040524e      return result;
004050a0  }

00405251                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00405260  void kernel32_MultiByteToWideChar_Thunk()

00405260  {
0040527a      ResolveThunk("kernel32.dll", "MultiByteToWideChar", &kernel32_MultiByteToWideChar_Ptr, Unicows_MultiByteToWideChar, GodotFailMultiByteToWideChar);
0040527f      /* tailcall */
0040527f      return kernel32_MultiByteToWideChar_Ptr();
00405260  }


00405285  uint16_t __stdcall GetOrdinal(char* arg1, uint32_t arg2, void* arg3, uint32_t* arg4, uint16_t* arg5)

00405285  {
00405288      int32_t ecx;
00405288      int32_t var_8 = ecx;
00405289      uint16_t* var_8_1 = nullptr;
00405290      void* ecx_2 = (arg2 - 1);
00405294      uint16_t* eax;
00405294      
00405294      if (ecx_2 < 0)
004052f0          eax = 0xffff;
00405294      else
00405294      {
00405296          int32_t ebx;
00405296          int32_t var_10_1 = ebx;
0040529b          int32_t esi_2;
0040529b          
0040529b          while (true)
0040529b          {
0040529b              char* edi_1 = arg1;
004052a4              esi_2 = (((char*)ecx_2 + var_8_1) >> 1);
004052a9              void* eax_4 = (arg4[esi_2] + arg3);
004052a9              
004052ac              while (true)
004052ac              {
004052ac                  ebx = *(uint8_t*)edi_1;
004052b0                  char temp1_1 = *(uint8_t*)eax_4;
004052b0                  bool c_1 = ebx < temp1_1;
004052b0                  
004052b2                  if (ebx == temp1_1)
004052b2                  {
004052b6                      if (ebx == 0)
004052b6                      {
004052ca                          eax = nullptr;
004052cc                          break;
004052b6                      }
004052b6                      
004052b8                      ebx = edi_1[1];
004052bd                      char temp5_1 = *(uint8_t*)((char*)eax_4 + 1);
004052bd                      c_1 = ebx < temp5_1;
004052bd                      
004052c0                      if (ebx == temp5_1)
004052c0                      {
004052c3                          edi_1 = &edi_1[2];
004052c5                          eax_4 += 2;
004052c5                          
004052c8                          if (ebx != 0)
004052c8                              continue;
004052c8                          
004052ca                          eax = nullptr;
004052cc                          break;
004052c0                      }
004052b2                  }
004052b2                  
004052ce                  bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004052d0                  eax = (((char*)eax_4 - eax_4) + 1);
004052d0                  break;
004052ac              }
004052ac              
004052d5              if (eax >= 0)
004052d5              {
004052dc                  if (eax <= 0)
004052dc                      break;
004052dc                  
004052e1                  var_8_1 = (esi_2 + 1);
004052d5              }
004052d5              else
004052d7                  ecx_2 = (esi_2 - 1);
004052d7              
004052e7              if (ecx_2 < var_8_1)
004052e7                  break;
0040529b          }
0040529b          
004052ee          if (ecx_2 >= var_8_1)
004052f9              eax = arg5[esi_2];
004052ee          else
004052f0              eax = 0xffff;
00405294      }
00405294      
004052ff      return eax;
00405285  }


00405302  void* __stdcall ImageEntryToDataC(void* arg1, uint16_t arg2, uint32_t* arg3)

00405302  {
00405307      void* eax = *(uint32_t*)((char*)arg1 + 0x3c);
0040530a      void* eax_1 = ((char*)eax + arg1);
0040530a      
0040530c      if (eax != -(arg1))
0040530c      {
0040530e          uint32_t ecx_1 = ((uint32_t)arg2);
0040530e          
00405316          if (ecx_1 < *(uint32_t*)((char*)eax_1 + 0x74))
00405316          {
00405318              void* edx_1 = *(uint32_t*)(((char*)eax_1 + (ecx_1 << 3)) + 0x78);
00405318              
0040531e              if (edx_1 != 0)
0040531e              {
00405328                  *(uint32_t*)arg3 = *(uint32_t*)(((char*)eax_1 + (ecx_1 << 3)) + 0x7c);
0040532a                  return ((char*)edx_1 + arg1);
0040531e              }
00405316          }
0040530c      }
0040530c      
00405333      *(uint32_t*)arg3 = 0;
00405336      return nullptr;
00405302  }


0040533c  int32_t __stdcall strcmpiC(char* arg1, char* arg2)

0040533c  {
00405356      int32_t eax_2 = (CompareStringA(0x409, 1, arg1, 0xffffffff, arg2, 0xffffffff) - 2);
00405357      int32_t eax_3 = -(eax_2);
0040535c      return ((eax_3 - eax_3) + 1);
0040533c  }


0040535f  char* __stdcall strncpyC(char* arg1, char const* arg2, uint32_t arg3)

0040535f  {
0040535f      uint32_t i_1 = arg3;
00405367      char* s = arg1;
0040536b      char* result = s;
0040536b      
0040536d      if (i_1 != 0)
0040536d      {
0040536f          char const* edx_1 = arg2;
0040537e          uint32_t i;
0040537e          
0040537e          do
0040537e          {
00405373              char const eax = *(uint8_t*)edx_1;
00405375              *(uint8_t*)s = eax;
00405377              s = &s[1];
00405378              edx_1 = &edx_1[1];
00405378              
0040537b              if (eax == 0)
0040537b                  break;
0040537b              
0040537d              i = i_1;
0040537d              i_1 -= 1;
0040537e          } while (i != 1);
0040537e          
00405385          if ((i_1 != 0 && i_1 != 1))
00405395              __builtin_memset(__builtin_memset(s, 0, (((i_1 - 1) >> 2) << 2)), 0, ((i_1 - 1) & 3));
0040536d      }
0040536d      
0040539b      return result;
0040535f  }


0040539e  int32_t (*)() __stdcall GetProcAddressInternal(struct HINSTANCE__* arg1, char* arg2)

0040539e  {
004053a3      struct HINSTANCE__* edi = arg1;
004053a3      
004053ae      if ((edi != 0 && arg2 != 0))
004053ae      {
004053b7          void* eax_1 = ImageEntryToDataC(edi, 0, &arg1);
004053b7          
004053c0          if (eax_1 != 0)
004053c0          {
004053da              uint32_t eax_7 = ((uint32_t)GetOrdinal(arg2, *(uint32_t*)((char*)eax_1 + 0x18), edi, (*(uint32_t*)((char*)eax_1 + 0x20) + edi), (*(uint32_t*)((char*)eax_1 + 0x24) + edi)));
004053da              
004053e0              if (eax_7 < *(uint32_t*)((char*)eax_1 + 0x14))
004053e0              {
004053eb                  void* result = (*(uint32_t*)((*(uint32_t*)((char*)eax_1 + 0x1c) + (eax_7 << 2)) + edi) + edi);
004053eb                  
004053f8                  if ((result <= eax_1 || result >= ((char*)arg1 + eax_1)))
004053ff                      return result;
004053e0              }
004053c0          }
004053ae      }
004053ae      
004053fa      return nullptr;
0040539e  }


00405402  void __stdcall driveandpathC(char const* arg1, char* arg2, char* arg3)

00405402  {
00405406      char const* ebx = arg1;
0040540a      char const* eax = ebx;
00405415      char const i;
00405415      
00405415      do
00405415      {
00405410          i = *(uint8_t*)eax;
00405412          eax = &eax[1];
00405415      } while (i != 0);
00405415      
00405422      if (((eax - &eax[1]) >= 1 && ebx[1] == 0x3a))
00405422      {
00405429          if (arg2 != 0)
00405429          {
0040542f              strncpyC(arg2, ebx, 2);
00405434              arg2[2] = 0;
00405429          }
00405429          
00405439          ebx = &ebx[2];
00405422      }
00405422      else if (arg2 != 0)
00405443          *(uint8_t*)arg2 = 0;
00405443      
00405446      i = *(uint8_t*)ebx;
00405448      void* eax_3 = nullptr;
0040544c      char const* edx_1 = ebx;
0040544c      
0040544e      if (i == 0)
0040544e      {
0040548f      label_40548f:
0040548f          
00405491          if (arg3 != 0)
00405493              *(uint8_t*)arg3 = 0;
00405493          
00405491          return;
0040544e      }
0040544e      
00405462      do
00405462      {
00405458          if ((i == 0x2f || i == 0x5c))
0040545a              eax_3 = &edx_1[1];
0040545a          
0040545d          edx_1 = &edx_1[1];
0040545e          i = *(uint8_t*)edx_1;
00405462      } while (i != 0);
00405462      
00405466      if (eax_3 == 0)
00405466          goto label_40548f;
00405466      
0040546d      if (arg3 != 0)
0040546d      {
00405471          char* esi_2 = ((char*)eax_3 - ebx);
00405471          
0040547a          if (esi_2 > 0xff)
0040547c              esi_2 = 0xff;
0040547c          
00405481          strncpyC(arg3, ebx, esi_2);
00405486          *(uint8_t*)(esi_2 + arg3) = 0;
0040546d      }
00405402  }


0040549d  struct HINSTANCE__* LoadGodot()

0040549d  {
004054a6      struct HINSTANCE__* (* _PfnLoadUnicows_1)() = _PfnLoadUnicows;
004054b0      struct HINSTANCE__* result;
004054b0      struct HINSTANCE__* result_1;
004054b0      
004054b0      if (_PfnLoadUnicows_1 != 0)
004054b0      {
004054b2          result_1 = _PfnLoadUnicows_1();
004054b6          result = result_1;
004054b0      }
004054b0      
004054b9      if ((_PfnLoadUnicows_1 == 0 || result_1 == 0))
004054b9      {
004054c7          HINSTANCE result_2 = LoadLibraryA(m_rgDLLMap[0].szDLLName);
004054cf          result = result_2;
004054d2          char var_118;
004054d2          HKEY hKey;
004054d2          
004054d2          if (result_2 != 0)
004054d2          {
004054ed              char lpBuffer;
004054ed              
004054ed              if (GetSystemDirectoryA(&lpBuffer, 0x104) == 0)
004054ef                  lpBuffer = 0;
004054ef              
00405505              char lpBuffer_1;
00405505              
00405505              if (GetWindowsDirectoryA(&lpBuffer_1, 0x104) == 0)
00405507                  lpBuffer_1 = 0;
00405507              
00405522              char lpFilename;
00405522              
00405522              if (GetModuleFileNameA(result, &lpFilename, 0x104) == 0)
00405524                  lpFilename = 0;
00405524              
0040553e              if (GetModuleFileNameA(GetModuleHandleA(nullptr), &var_118, 0x104) == 0)
00405540                  var_118 = 0;
00405540              
00405558              void var_320;
00405558              driveandpathC(&var_118, &hKey, &var_320);
0040555d              int32_t* eax_5 = &hKey;
00405568              char i;
00405568              
00405568              do
00405568              {
00405563                  i = *(uint8_t*)eax_5;
00405565                  eax_5 += 1;
00405568              } while (i != 0);
0040556e              void* eax_7 = &var_320;
0040557c              char i_1;
0040557c              
0040557c              do
0040557c              {
00405577                  i_1 = *(uint8_t*)eax_7;
00405579                  eax_7 += 1;
0040557c              } while (i_1 != 0);
00405582              void var_31f;
00405582              void var_117;
00405582              *(uint8_t*)(&var_117 + (((char*)eax_7 - &var_31f) + ((char*)eax_5 - &*(uint32_t*)((char*)hKey)[1]))) = 0;
0040559b              driveandpathC(&lpFilename, &hKey, &var_320);
004055a0              int32_t* eax_10 = &hKey;
004055ab              char i_2;
004055ab              
004055ab              do
004055ab              {
004055a6                  i_2 = *(uint8_t*)eax_10;
004055a8                  eax_10 += 1;
004055ab              } while (i_2 != 0);
004055ab              
004055af              void* ecx_2 = &var_320;
004055af              
004055bd              do
004055bd              {
004055b8                  i_2 = *(uint8_t*)ecx_2;
004055ba                  ecx_2 += 1;
004055bd              } while (i_2 != 0);
004055bd              
004055d1              void var_21f;
004055d1              *(uint8_t*)(&var_21f + (((char*)ecx_2 - &var_31f) + ((char*)eax_10 - &*(uint32_t*)((char*)hKey)[1]))) = 0;
004055d8              int32_t eax_12 = strcmpiC(&lpBuffer_1, &lpFilename);
004055df              int32_t eax_13;
004055df              
004055df              if (eax_12 == 0)
004055ef                  eax_13 = strcmpiC(&lpBuffer_1, &var_118);
004055ef              
004055f6              if ((eax_12 == 0 && eax_13 != 0))
004055f6              {
00405629                  FreeLibrary(result);
0040562f                  result = nullptr;
004055f6              }
004055f6              else if ((strcmpiC(&lpBuffer, &lpFilename) == 0 && strcmpiC(&lpBuffer, &var_118) != 0))
0040560d              {
00405629                  FreeLibrary(result);
0040562f                  result = nullptr;
0040560d              }
004054d2          }
004054d2          
00405635          if ((result_2 == 0 || result == 0))
00405635          {
00405640              hKey = nullptr;
00405643              HINSTANCE hLibModule = LoadLibraryA("advapi32.dll");
00405643              
00405659              if (InterlockedExchange(0x8172c4, hLibModule) != 0)
0040565c                  FreeLibrary(hLibModule);
0040565c              
00405662              struct HINSTANCE__* hMod = m_rgDLLMap[4].hMod;
00405662              
00405669              if (hMod != 0)
00405669              {
00405675                  int32_t (* eax_17)() = GetProcAddressInternal(hMod, "RegOpenKeyExA");
00405687                  int32_t (* eax_18)() = GetProcAddressInternal(m_rgDLLMap[4].hMod, "RegQueryValueExA");
00405687                  
00405698                  if ((eax_17 != 0 && eax_18 != 0))
00405698                  {
004056a1                      int32_t* var_540_11 = &hKey;
004056a2                      int32_t var_544_13 = 1;
004056a4                      int32_t var_548_5 = 0;
004056a5                      char const* const var_54c_1 = "SOFTWARE\Microsoft\Windows\Curre…";
004056aa                      int32_t var_550_1 = 0x80000002;
004056aa                      
004056b3                      if (eax_17() == 0)
004056b3                      {
004056bc                          int32_t var_10;
004056bc                          int32_t* var_540_12 = &var_10;
004056c3                          char* var_544_14 = &var_118;
004056c4                          int32_t var_548_6 = 0;
004056c5                          int32_t var_54c_2 = 0;
004056c6                          char const* const var_550_2 = "CommonFilesDir";
004056cb                          HKEY hKey_1 = hKey;
004056ce                          var_10 = 0x104;
004056d5                          var_118 = 0;
004056d5                          
004056df                          if (eax_18() == 0)
004056df                          {
004056e1                              char const* const eax_21 = "\Microsoft Shared\MSLU\";
004056ed                              char const i_3;
004056ed                              
004056ed                              do
004056ed                              {
004056e8                                  i_3 = *(uint8_t*)eax_21;
004056ea                                  eax_21 = &eax_21[1];
004056ed                              } while (i_3 != 0);
004056ed                              
004056f7                              void var_119;
004056f7                              void* edi_2 = &var_119;
004056f7                              
004056fe                              do
004056fe                              {
004056f8                                  i_3 = *(uint8_t*)((char*)edi_2 + 1);
004056fb                                  edi_2 += 1;
004056fe                              } while (i_3 != 0);
004056fe                              
00405707                              int32_t esi_3;
00405707                              int32_t edi_3;
00405707                              edi_3 = __builtin_memcpy(edi_2, "\Microsoft Shared\MSLU\", (((eax_21 - "\Microsoft Shared\MSLU\") >> 2) << 2));
0040570b                              char const* szDLLName = m_rgDLLMap[0].szDLLName;
00405713                              __builtin_memcpy(edi_3, esi_3, ((eax_21 - "\Microsoft Shared\MSLU\") & 3));
00405715                              char const* szDLLName_1 = szDLLName;
0040571c                              char const i_4;
0040571c                              
0040571c                              do
0040571c                              {
00405717                                  i_4 = *(uint8_t*)szDLLName;
00405719                                  szDLLName = &szDLLName[1];
0040571c                              } while (i_4 != 0);
00405724                              void* eax_23 = (szDLLName - szDLLName_1);
00405726                              char const* szDLLName_2 = szDLLName_1;
00405728                              void* edi_4 = &var_119;
00405728                              
0040572f                              do
0040572f                              {
00405729                                  szDLLName_1 = *(uint8_t*)((char*)edi_4 + 1);
0040572c                                  edi_4 += 1;
0040572f                              } while (szDLLName_1 != 0);
0040572f                              
00405736                              int32_t esi_4;
00405736                              int32_t edi_5;
00405736                              edi_5 = __builtin_memcpy(edi_4, szDLLName_2, ((eax_23 >> 2) << 2));
00405744                              __builtin_memcpy(edi_5, esi_4, (eax_23 & 3));
0040574c                              result = LoadLibraryA(&var_118);
004056df                          }
004056df                          
00405752                          RegCloseKey(hKey);
004056b3                      }
00405698                  }
00405669              }
00405635          }
004054b9      }
004054b9      
0040575f      return result;
0040549d  }


00405760  void __stdcall ResolveThunk(char* arg1, char* arg2, int32_t (** arg3)(), int32_t (* arg4)(), int32_t (* arg5)())

00405760  {
00405777      if (UniPlatform != PlatformUntested)
00405777          goto label_40579d;
00405777      
00405784      int32_t (* var_30_1)();
00405784      struct HINSTANCE__* hMod;
00405784      char* var_30_7;
00405784      int32_t edi;
00405784      
00405784      if (GetVersion() >= 0x80000000)
00405784      {
00405791          UniPlatform = PlatformNotUnicode;
0040579d      label_40579d:
0040579d          edi = 1;
0040579d          
004057a4          if (UniPlatform == PlatformUnicode)
004057a4              goto label_4057b0;
004057a4          
0040585d          int32_t (* eax_8)() = arg4;
0040585d          
00405862          if (eax_8 != 0)
00405862              goto label_4058a5;
00405862          
0040586a          if (m_rgDLLMap[0].hMod == 0)
0040586a          {
0040586c              struct HINSTANCE__* hLibModule_1 = LoadGodot();
0040586c              
00405875              if ((hLibModule_1 != 0 && InterlockedExchange(0x8172a4, hLibModule_1) != 0))
00405884                  FreeLibrary(hLibModule_1);
0040586a          }
0040586a          
0040586a          if (m_rgDLLMap[0].hMod == 0)
0040586a          {
00405810          label_405810:
00405810              var_30_1 = arg5;
0040586a          }
0040586a          else
0040586a          {
00405897              var_30_7 = arg2;
0040589a              hMod = m_rgDLLMap[0].hMod;
004058a0          label_4058a0:
004058a0              eax_8 = GetProcAddressInternal(hMod, var_30_7);
004058a5          label_4058a5:
004058a5              
004058a7              if (eax_8 == 0)
004058a7              {
00405810              label_405810_1:
00405810                  var_30_1 = arg5;
004058a7              }
004058a7              else
004058ad                  var_30_1 = eax_8;
0040586a          }
00405784      }
00405784      else
00405784      {
00405788          edi = 1;
00405789          UniPlatform = PlatformUnicode;
004057b0      label_4057b0:
004057b0          
004057b0          if (m_hinst == 0)
004057b0          {
004057bd              void lpBuffer;
004057bd              VirtualQuery(ResolveThunk, &lpBuffer, 0x1c);
004057c6              struct HINSTANCE__* var_1c;
004057c6              m_hinst = var_1c;
004057b0          }
004057b0          
004057cb          char const* szDLLName = m_rgDLLMap[1].szDLLName;
004057cb          
004057d2          if (szDLLName != 0)
004057d2          {
004057d4              while (true)
004057d4              {
004057d4                  char const* szDLLName_1 = szDLLName;
004057d6                  char* eax_3 = arg1;
004057d9                  int32_t eax_6;
004057d9                  
004057d9                  while (true)
004057d9                  {
004057d9                      char edx = *(uint8_t*)eax_3;
004057dd                      char const temp1_1 = *(uint8_t*)szDLLName_1;
004057dd                      bool c_1 = edx < temp1_1;
004057dd                      
004057df                      if (edx == temp1_1)
004057df                      {
004057e3                          if (edx == 0)
004057e3                          {
004057f7                              eax_6 = 0;
004057f9                              break;
004057e3                          }
004057e3                          
004057e5                          edx = eax_3[1];
004057ea                          char temp4_1 = szDLLName_1[1];
004057ea                          c_1 = edx < temp4_1;
004057ea                          
004057ed                          if (edx == temp4_1)
004057ed                          {
004057f0                              eax_3 = &eax_3[2];
004057f2                              szDLLName_1 = &szDLLName_1[2];
004057f2                              
004057f5                              if (edx != 0)
004057f5                                  continue;
004057f5                              
004057f7                              eax_6 = 0;
004057f9                              break;
004057ed                          }
004057df                      }
004057df                      
004057fb                      bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004057fd                      eax_6 = ((eax_3 - eax_3) + 1);
004057fd                      break;
004057d9                  }
004057d9                  
00405802                  if (eax_6 == 0)
00405802                  {
00405830                      void* esi_2 = &m_rgDLLMap[edi].hMod;
00405830                      
0040583a                      if (*(uint32_t*)esi_2 == 0)
0040583a                      {
0040583f                          HINSTANCE hLibModule = LoadLibraryA(arg1);
0040583f                          
0040584d                          if (InterlockedExchange(esi_2, hLibModule) != 0)
00405850                              FreeLibrary(hLibModule);
0040583a                      }
0040583a                      
00405856                      var_30_7 = arg2;
00405859                      hMod = *(uint32_t*)esi_2;
0040585b                      break;
00405802                  }
00405802                  
00405804                  szDLLName = m_rgDLLMap[(1 + edi)].szDLLName;
0040580b                  edi += 1;
0040580b                  
0040580e                  if (szDLLName == 0)
0040580e                      goto label_405810_2;
004057d4              }
004057d4              
00405802              goto label_4058a0;
004057d2          }
004057d2          
00405810      label_405810_2:
00405810          var_30_1 = arg5;
00405784      }
00405816      InterlockedExchange(arg3, var_30_1);
00405823      FlushInstructionCache(m_hinst, arg3, 4);
00405760  }


004058b3  void* GodotFailCreateFileW(uint16_t const* arg1, uint32_t arg2, uint32_t arg3, struct _SECURITY_ATTRIBUTES* arg4, uint32_t arg5, uint32_t arg6, void* arg7)

004058b3  {
004058b5      SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
004058be      return 0xffffffff;
004058b3  }


004058c1  struct HFONT__* GodotFailCreateFontIndirectW(struct tagLOGFONTW const* arg1)

004058c1  {
004058c3      SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
004058cb      return 0;
004058c1  }


004058ce  struct HRSRC__* GodotFailFindResourceW(struct HINSTANCE__* arg1, uint16_t const* arg2, uint16_t const* arg3)

004058ce  {
004058df      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("kernel32.dll"), "FindResourceW");
004058df      
004058e6      if (eax_1 != 0)
004058e8          /* tailcall */
004058e8          return eax_1();
004058e8      
004058ec      SetLastError(ERROR_PROC_NOT_FOUND);
004058f4      return 0;
004058ce  }


004058f7  uint32_t GodotFailGetEnvironmentVariableW(uint16_t const* arg1, uint16_t* arg2, uint32_t arg3)

004058f7  {
004058f9      SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00405901      return 0;
004058f7  }


00405904  int32_t (*)() __stdcall GodotFailGetProcAddress(struct HINSTANCE__* arg1, char const* arg2)

00405904  {
00405904      /* tailcall */
00405904      return GetProcAddressInternal(arg1, arg2);
00405904  }


00405909  int32_t GodotFailVerQueryValueW(void* arg1, uint16_t* arg2, void** arg3, uint32_t* arg4)

00405909  {
0040590b      SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00405913      return 0;
00405909  }


00405916  uint16_t* GodotFaillstrcatW(uint16_t* arg1, uint16_t const* arg2)

00405916  {
00405927      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("kernel32.dll"), "lstrcatW");
00405927      
0040592e      if (eax_1 != 0)
00405930          /* tailcall */
00405930          return eax_1();
00405930      
00405934      SetLastError(ERROR_PROC_NOT_FOUND);
0040593c      return 0;
00405916  }


0040593f  int32_t GodotFaillstrlenW(uint16_t const* arg1)

0040593f  {
00405950      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("kernel32.dll"), "lstrlenW");
00405950      
00405957      if (eax_1 != 0)
00405959          /* tailcall */
00405959          return eax_1();
00405959      
0040595d      SetLastError(ERROR_PROC_NOT_FOUND);
00405965      return 0;
0040593f  }


00405968  int32_t GodotFailCreateDirectoryW(uint16_t const* arg1, struct _SECURITY_ATTRIBUTES* arg2)

00405968  {
0040596a      SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00405972      return 0;
00405968  }


00405975  int32_t GodotFailMultiByteToWideChar(uint32_t arg1, uint32_t arg2, char const* arg3, int32_t arg4, uint16_t* arg5, int32_t arg6)

00405975  {
00405989      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("kernel32.dll"), "MultiByteToWideChar");
00405989      
00405990      if (eax_1 != 0)
00405993          /* tailcall */
00405993          return eax_1();
00405993      
00405997      SetLastError(ERROR_PROC_NOT_FOUND);
004059a0      return 0;
00405975  }


004059a3  int32_t GodotFailWideCharToMultiByte(uint32_t arg1, uint32_t arg2, uint16_t const* arg3, int32_t arg4, char* arg5, int32_t arg6, char const* arg7, int32_t* arg8)

004059a3  {
004059b7      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("kernel32.dll"), "WideCharToMultiByte");
004059b7      
004059be      if (eax_1 != 0)
004059c1          /* tailcall */
004059c1          return eax_1();
004059c1      
004059c5      SetLastError(ERROR_PROC_NOT_FOUND);
004059ce      return 0;
004059a3  }


004059d1  void* GodotFailGetClipboardData(uint32_t arg1)

004059d1  {
004059e2      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("user32.dll"), "GetClipboardData");
004059e2      
004059e9      if (eax_1 != 0)
004059eb          /* tailcall */
004059eb          return eax_1();
004059eb      
004059ef      SetLastError(ERROR_PROC_NOT_FOUND);
004059f7      return 0;
004059d1  }


004059fa  int32_t GodotFailIsClipboardFormatAvailable(uint32_t arg1)

004059fa  {
00405a0b      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("user32.dll"), "IsClipboardFormatAvailable");
00405a0b      
00405a12      if (eax_1 != 0)
00405a14          /* tailcall */
00405a14          return eax_1();
00405a14      
00405a18      SetLastError(ERROR_PROC_NOT_FOUND);
00405a20      return 0;
004059fa  }


00405a23  int32_t GodotFailMessageBoxW(struct HWND__* arg1, uint16_t const* arg2, uint16_t const* arg3, uint32_t arg4)

00405a23  {
00405a34      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("user32.dll"), "MessageBoxW");
00405a34      
00405a3b      if (eax_1 != 0)
00405a3d          /* tailcall */
00405a3d          return eax_1();
00405a3d      
00405a41      SetLastError(ERROR_PROC_NOT_FOUND);
00405a49      return 0;
00405a23  }


00405a4c  int32_t GodotFailSetWindowLongA(struct HWND__* arg1, int32_t arg2, int32_t arg3)

00405a4c  {
00405a5d      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("user32.dll"), "SetWindowLongA");
00405a5d      
00405a64      if (eax_1 != 0)
00405a66          /* tailcall */
00405a66          return eax_1();
00405a66      
00405a6a      SetLastError(ERROR_PROC_NOT_FOUND);
00405a72      return 0;
00405a4c  }


00405a75  int32_t GodotFailwsprintfW(uint16_t* arg1, uint16_t const* arg2, ...)

00405a75  {
00405a77      SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00405a80      return 0xffffffff;
00405a75  }


00405a81  int32_t GodotFailExtTextOutW(struct HDC__* arg1, int32_t arg2, int32_t arg3, uint32_t arg4, struct tagRECT* arg5, uint16_t const* arg6, uint32_t arg7, int32_t* arg8)

00405a81  {
00405a95      int32_t (* eax_1)() = GetProcAddressInternal(GetModuleHandleA("gdi32.dll"), "ExtTextOutW");
00405a95      
00405a9c      if (eax_1 != 0)
00405a9f          /* tailcall */
00405a9f          return eax_1();
00405a9f      
00405aa3      SetLastError(ERROR_PROC_NOT_FOUND);
00405aac      return 0;
00405a81  }


00405aaf  uint32_t GodotFailGetCharacterPlacementW(struct HDC__* arg1, uint16_t const* arg2, int32_t arg3, int32_t arg4, struct tagGCP_RESULTSW* arg5, uint32_t arg6)

00405aaf  {
00405ab1      SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
00405ab9      return 0;
00405aaf  }


00405abc  int32_t GodotFailRegCreateKeyExW(struct HKEY__* arg1, uint16_t const* arg2, uint32_t arg3, uint16_t* arg4, uint32_t arg5, uint32_t arg6, struct _SECURITY_ATTRIBUTES* arg7, struct HKEY__** arg8, uint32_t* arg9) __pure

00405abc  {
00405abf      return 0x78;
00405abc  }


00405ac2  int32_t GodotFailRegEnumValueW(struct HKEY__* arg1, uint32_t arg2, uint16_t* arg3, uint32_t* arg4, uint32_t* arg5, uint32_t* arg6, uint8_t* arg7, uint32_t* arg8) __pure

00405ac2  {
00405ac5      return 0x78;
00405ac2  }


00405ac8  int32_t GodotFailRegOpenKeyExW(struct HKEY__* arg1, uint16_t const* arg2, uint32_t arg3, uint32_t arg4, struct HKEY__** arg5) __pure

00405ac8  {
00405acb      return 0x78;
00405ac8  }


00405ace  int32_t GodotFailRegQueryValueExW(struct HKEY__* arg1, uint16_t const* arg2, uint32_t* arg3, uint32_t* arg4, uint8_t* arg5, uint32_t* arg6) __pure

00405ace  {
00405ad1      return 0x78;
00405ace  }

00405ad4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

00405ae0  uint8_t CreateAndRunDebugWorkerThread(uint32_t (* arg1)(void*), struct DebugWorkerThreadData* arg2)

00405ae0  {
00405af4      int32_t** lpParameter = arg2;
00405afc      *(uint32_t*)lpParameter = CreateEventA(nullptr, 1, 0, nullptr);
00405b0a      HANDLE eax_2 = CreateThread(nullptr, nullptr, arg1, lpParameter, THREAD_CREATE_RUN_IMMEDIATELY, &lpParameter[1]);
00405b0a      
00405b1a      if (eax_2 != 0)
00405b1a      {
00405b2c          if (WaitForSingleObject(*(uint32_t*)lpParameter, 0x3e8) == 0)
00405b2c          {
00405b31              WaitForSingleObject(eax_2, 0xffffffff);
00405b38              CloseHandle(eax_2);
00405b3f              CloseHandle(*(uint32_t*)lpParameter);
00405b44              BOOL eax_5;
00405b44              eax_5 = 1;
00405b47              return 1;
00405b2c          }
00405b2c          
00405b49          CloseHandle(eax_2);
00405b1a      }
00405b1a      
00405b4e      CloseHandle(*(uint32_t*)lpParameter);
00405b53      BOOL eax_7;
00405b53      eax_7 = 0;
00405b56      return 0;
00405ae0  }

00405b57                                                                       cc cc cc cc cc cc cc cc cc                         .........

00405b60  void Turbine::Debug::SetDebugFlags(uint32_t arg1, uint8_t arg2)

00405b60  {
00405b65      if (arg2 != 0)
00405b65      {
00405b6b          Turbine::Debug::DebugFlags |= arg1;
00405b71          return;
00405b65      }
00405b65      
00405b78      Turbine::Debug::DebugFlags &= !(arg1);
00405b60  }

00405b7f                                                                                               cc                                 .

00405b80  uint32_t Turbine::Debug::GetDebugFlags()

00405b80  {
00405b85      return Turbine::Debug::DebugFlags;
00405b80  }

00405b86                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

00405b90  uint8_t Turbine::Debug::IsDebugFlagSet(uint32_t arg1)

00405b90  {
00405ba3      uint32_t eax;
00405ba3      eax = (Turbine::Debug::DebugFlags & arg1) == arg1;
00405ba5      return eax;
00405b90  }

00405ba6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

00405bb0  void Turbine::Debug::Abort()

00405bb0  {
00405bb7      if (s_bDebugAborting != 0)
00405bcd          return;
00405bcd      
00405bb9      CrashCleaners::CallCrashCleaners();
00405bc0      s_bDebugAborting = 1;
00405bc7      _exit(0);
00405bc7      /* no return */
00405bb0  }

00405bce                                            cc cc                                                                ..

00405bd0  int32_t Turbine::Debug::ReportException(struct _EXCEPTION_POINTERS* arg1, class DbgReportContext const* arg2)

00405bd0  {
00405bd0      uint32_t Turbine::Debug::DebugFlags_1 = Turbine::Debug::DebugFlags;
00405be4      int32_t ebx;
00405be4      ebx = (Turbine::Debug::DebugFlags_1 & 0x4000) == 0x4000;
00405be7      *(uint8_t*)((char*)Turbine::Debug::DebugFlags_1)[1] &= 0xbf;
00405bea      Turbine::Debug::DebugFlags = Turbine::Debug::DebugFlags_1;
00405bef      CrashCleaners::CallCrashCleaners();
00405bf4      Turbine::Debug::DebugFlags &= 0xffffffb7;
00405bf4      
00405bfe      if (ebx == 0)
00405c09          *(int32_t*)((char*)Turbine::Debug::DebugFlags + 1) &= 0xbf;
00405bfe      else
00405c00          *(int32_t*)((char*)Turbine::Debug::DebugFlags + 1) |= 0x40;
00405c00      
00405c10      int32_t (* G_oldFilter_1)(struct _EXCEPTION_POINTERS*) = G_oldFilter;
00405c10      
00405c17      if (G_oldFilter_1 == 0)
00405c23          return 0;
00405c23      
00405c20      return G_oldFilter_1(arg1);
00405bd0  }

00405c24              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

00405c30  void __fastcall Turbine::Debug::Debug(class Turbine::Debug* this)

00405c30  {
00405c32      this->vtable = 0x7942b0;
00405c30  }

00405c39                                                                             cc cc cc cc cc cc cc                           .......

00405c40  void __fastcall Turbine::Debug::~Debug(class Turbine::Debug* this)

00405c40  {
00405c40      this->vtable = 0x7942b0;
00405c46      int32_t (* G_oldFilter_1)(struct _EXCEPTION_POINTERS*) = G_oldFilter;
00405c46      
00405c4d      if (G_oldFilter_1 != 0)
00405c4d      {
00405c50          SetUnhandledExceptionFilter(G_oldFilter_1);
00405c56          G_oldFilter = nullptr;
00405c4d      }
00405c4d      
00405c60      /* tailcall */
00405c60      return DbgHelpWrapper::FreeDbgHelpFunctions();
00405c40  }

00405c65                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00405c70  uint32_t __fastcall ReferenceCountTemplate<1048576,0>::Release(class ReferenceCountTemplate<1048576,0> const* this)

00405c70  {
00405c80      if (InterlockedDecrement(&this->m_cRef) != 0)
00405c86          return this->m_cRef;
00405c86      
00405c89      if (this != 0)
00405c8b          this->vtable->__vecDelDtor(this, 1);
00405c8b      
00405c97      return 0;
00405c70  }

00405c98                                                                          cc cc cc cc cc cc cc cc                          ........

00405ca0  uint32_t Turbine::Debug::SetFloatingPointException(uint8_t arg1, uint32_t arg2)

00405ca0  {
00405cac      int32_t eax = _control87(0, 0);
00405cb3      _clearfp();
00405cb3      
00405cbe      if (arg1 != 0)
00405ce7          return _control87((eax & !(arg2)), 0x8001f);
00405ce7      
00405cd1      return _control87((eax | arg2), 0x8001f);
00405ca0  }

00405ce8                          cc cc cc cc cc cc cc cc                                                          ........

00405cf0  uint32_t __stdcall ProtectedDebug::ExceptionFilterThread(void* arg1)

00405cf0  {
00405cf8      SetEvent(*(uint32_t*)arg1);
00405d0e      *(uint32_t*)((char*)arg1 + 0xc) = Turbine::Debug::ReportException(*(uint32_t*)((char*)arg1 + 8), ((char*)arg1 + 0x10));
00405d14      return 0;
00405cf0  }

00405d17                                                                       cc cc cc cc cc cc cc cc cc                         .........

00405d20  int32_t RunInBackupStack(struct _EXCEPTION_POINTERS* arg1)

00405d20  {
00405d2d      s_bBackupStackAvailable = 0;
00405d34      struct _EXCEPTION_POINTERS* var_18 = arg1;
00405d38      void var_10;
00405d38      DbgReportContext::DbgReportContext(&var_10, arg1);
00405d51      void var_20;
00405d51      
00405d51      if (CreateAndRunDebugWorkerThread(ProtectedDebug::ExceptionFilterThread, &var_20) != 0)
00405d51      {
00405d5b          DbgReportContext::~DbgReportContext(&var_10);
00405d66          int32_t var_14;
00405d66          return var_14;
00405d51      }
00405d51      
00405d67      int32_t (* G_oldFilter_1)(struct _EXCEPTION_POINTERS*) = G_oldFilter;
00405d67      
00405d6e      if (G_oldFilter_1 == 0)
00405d6e      {
00405d8b          DbgReportContext::~DbgReportContext(&var_10);
00405d96          return 0;
00405d6e      }
00405d6e      
00405d71      int32_t eax_2 = G_oldFilter_1(arg1);
00405d79      DbgReportContext::~DbgReportContext(&var_10);
00405d84      return eax_2;
00405d20  }

00405d97                                                                       cc cc cc cc cc cc cc cc cc                         .........

00405da0  int32_t __stdcall Turbine::Debug::TurbineExceptionFilter(struct _EXCEPTION_POINTERS* arg1)

00405da0  {
00405da4      _clearfp();
00405db0      uint32_t ExceptionCode = arg1->ExceptionRecord->ExceptionCode;
00405db0      
00405db7      if (ExceptionCode != 0x80000003)
00405db7      {
00405dc7          if ((ExceptionCode == 0xc0000017 && (*(int32_t*)((char*)Turbine::Debug::DebugFlags + 1) & 0x40) == 0))
00405dd0              return 0xffffffff;
00405dd0          
00405dda          if (S_inDebugExecptionHandler == 0)
00405dda          {
00405dfe              int32_t ebx;
00405dfe              int32_t var_18_1 = ebx;
00405e0b              ExceptionCode = ExceptionCode == 0xc0000017;
00405e17              S_inDebugExecptionHandler = 1;
00405e17              
00405e1e              if (ExceptionCode == 0)
00405e1e              {
00405e2a                  void* lpMem = HeapAlloc(GetProcessHeap(), HEAP_NONE, &IID_ISeekingPassThru);
00405e31                  ebx = lpMem == 0;
00405e37                  HeapFree(GetProcessHeap(), HEAP_NONE, lpMem);
00405e1e              }
00405e1e              
00405e3b              if ((ExceptionCode != 0 || ebx != 0))
00405e3b              {
00405e3d                  void* m_pReservedMemory = g_EmergencyMemoryPool.m_pReservedMemory;
00405e3d                  
00405e44                  if (m_pReservedMemory != 0)
00405e4e                      VirtualFree(m_pReservedMemory, nullptr, MEM_RELEASE);
00405e4e                  
00405e5b                  g_EmergencyMemoryPool.m_pReservedMemory = 0;
00405e68                  void* lpMem_1 = HeapAlloc(GetProcessHeap(), HEAP_NONE, &IID_ISeekingPassThru);
00405e6f                  ebx = lpMem_1 == 0;
00405e75                  HeapFree(GetProcessHeap(), HEAP_NONE, lpMem_1);
00405e75                  
00405e79                  if (ebx != 0)
00405e79                  {
00405e7b                      CrashCleaners::CallCrashCleaners();
00405e80                      int32_t (* G_oldFilter_2)(struct _EXCEPTION_POINTERS*) = G_oldFilter;
00405e80                      
00405e87                      if (G_oldFilter_2 == 0)
00405ea3                          return 0;
00405ea3                      
00405e97                      return G_oldFilter_2(arg1);
00405e79                  }
00405e3b              }
00405e3b              
00405ebb              if ((arg1->ExceptionRecord->ExceptionCode == 0xc00000fd && s_bBackupStackAvailable != 0))
00405ebb              {
00405ebe                  int32_t eax_9 = RunInBackupStack(arg1);
00405ec9                  S_inDebugExecptionHandler = 0;
00405ed4                  return eax_9;
00405ebb              }
00405ebb              
00405edc              void var_10;
00405edc              DbgReportContext::DbgReportContext(&var_10, arg1);
00405ee7              int32_t eax_10 = Turbine::Debug::ReportException(arg1, &var_10);
00405ef5              S_inDebugExecptionHandler = 0;
00405efc              DbgReportContext::~DbgReportContext(&var_10);
00405f0a              return eax_10;
00405dda          }
00405dda          
00405ddc          CrashCleaners::CallCrashCleaners();
00405db7      }
00405db7      
00405de1      int32_t (* G_oldFilter_1)(struct _EXCEPTION_POINTERS*) = G_oldFilter;
00405de1      
00405de8      if (G_oldFilter_1 == 0)
00405f13          return 0;
00405f13      
00405df5      return G_oldFilter_1(arg1);
00405da0  }

00405f16                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00405f20  uint8_t Turbine::Debug::InitCommon(class Turbine::Debug* this @ ecx)

00405f20  {
00405f30      if (((*(int32_t*)((char*)Turbine::Debug::DebugFlags + 1) & 2) != 0 && G_oldFilter == 0))
00405f3d          G_oldFilter = SetUnhandledExceptionFilter(Turbine::Debug::TurbineExceptionFilter);
00405f3d      
00405f49      if ((*(int32_t*)((char*)Turbine::Debug::DebugFlags + 1) & 4) != 0)
00405f49      {
00405f57          int32_t eax_1 = _control87(0, 0);
00405f5b          _clearfp();
00405f6a          _control87((eax_1 & 0xfffffff7), 0x8001f);
00405f49      }
00405f49      
00405f71      LPTOP_LEVEL_EXCEPTION_FILTER eax;
00405f71      eax = 1;
00405f73      return 1;
00405f20  }

00405f74                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

00405f80  uint8_t __fastcall Turbine::Debug::InitDebug(class Turbine::Debug* this)

00405f80  {
00405f80      *(int32_t*)((char*)Turbine::Debug::DebugFlags + 1) &= 0xfe;
00405f91      return Turbine::Debug::InitCommon(this) != 0;
00405f80  }

00405f92                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

00405fa0  void __thiscall Turbine::InplaceString<4096,char>::Init(class Turbine::InplaceString<4096,char>* this, char const* arg2, char* arg3)

00405fa0  {
00405fc2      if (_vsnprintf(this->m_pBuffer, 0x1000, arg2, arg3) < 0)
00405fc2      {
00405fc7          int32_t eax_2 = _vscprintf(arg2, arg3);
00405fd3          void* eax_4 = operator new[]((eax_2 + 1));
00405fd3          
00405fdd          if (eax_4 != 0)
00405fdd          {
00405fe3              this->m_pBuffer = eax_4;
00405fe5              _vsnprintf(eax_4, eax_2, arg2, arg3);
00405feb              this->m_pBuffer[eax_2] = 0;
00405fdd          }
00405fc2      }
00405fa0  }

00405ffb                                                                                   cc cc cc cc cc                             .....

00406000  uint8_t Turbine::Debug::Init(char const* arg1, char const* arg2, uint32_t arg3)

00406000  {
0040600a      Turbine::Debug::DebugFlags &= !(arg3);
00406016      PStringBase<char>::set(&g_strProjectName, arg1);
00406025      PStringBase<char>::set(&g_strEmailAssertions, arg2);
0040602a      uint32_t Turbine::Debug::DebugFlags_1 = Turbine::Debug::DebugFlags;
0040602a      
00406032      if ((*(uint8_t*)((char*)Turbine::Debug::DebugFlags_1)[1] & 0x20) == 0)
00406032      {
0040607e          Turbine::Debug::DebugFlags_1 = 1;
00406080          return 1;
00406032      }
00406032      
00406034      *(uint8_t*)((char*)Turbine::Debug::DebugFlags_1)[1] &= 0xdf;
00406037      Turbine::Debug::DebugFlags = Turbine::Debug::DebugFlags_1;
00406046      int32_t eax_2;
00406046      eax_2 = (Turbine::Debug::DebugFlags_1 & 0x800) != 0x800;
0040604a      Logger::Initialize(eax_2);
0040604a      
00406059      if ((*(int32_t*)((char*)Turbine::Debug::DebugFlags + 1) & 2) != 0)
0040606f          g_EmergencyMemoryPool.m_pReservedMemory = VirtualAlloc(nullptr, 0x6400000, MEM_RESERVE, PAGE_READWRITE);
0040606f      
00406074      class Turbine::Debug* Turbine::Debug::s_pDebug_1 = Turbine::Debug::s_pDebug;
0040607c      /* tailcall */
0040607c      return Turbine::Debug::s_pDebug_1->vtable->InitDebug(Turbine::Debug::s_pDebug_1);
00406000  }

00406081     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00406090  uint8_t __stdcall _STL::__less_2<unsigned long,unsigned long>::operator()(struct _STL::__less_2<unsigned long,unsigned long> const* this @ ecx, uint32_t const* arg2, uint32_t const arg3)

00406090  {
0040609e      return ((int8_t)-(((char*)arg2 - arg2)));
00406090  }

004060a1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

004060b0  void* __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this, uint32_t arg2)

004060b0  {
004060b3      class HashTableData<Turbine_GUID,Interface *>** m_buckets = this->m_buckets;
004060bb      this->vtable = 0x7942dc;
004060bb      
004060c1      if (m_buckets != &this->m_aInplaceBuckets)
004060c4          operator delete[](m_buckets);
004060c4      
004060d3      this->m_buckets = nullptr;
004060d6      this->m_firstInterestingBucket = nullptr;
004060d9      this->m_numBuckets = 0;
004060dc      this->m_numElements = 0;
004060dc      
004060df      if ((arg2 & 1) != 0)
004060e2          operator delete(this);
004060e2      
004060ed      return this;
004060b0  }


004060f0  class IntrusiveHashIterator<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::begin(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1> const* this, class IntrusiveHashIterator<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* __return)

004060f0  {
004060f7      void* i = &this->m_buckets[this->m_numBuckets];
004060f7      
004060ff      if (this->m_firstInterestingBucket != i)
004060ff      {
00406110          class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket;
00406110          
00406110          do
00406110          {
00406101              m_firstInterestingBucket = this->m_firstInterestingBucket;
00406101              
00406106              if (*(uint32_t*)m_firstInterestingBucket != 0)
00406106              {
00406122                  class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0040612b                  __return->m_currElement = *(uint32_t*)m_firstInterestingBucket_1;
0040612e                  __return->m_currBucket = m_firstInterestingBucket_1;
00406131                  __return->m_currHashTable = this;
00406134                  return __return;
00406106              }
00406106              
0040610d              this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00406110          } while (&m_firstInterestingBucket[1] != i);
004060ff      }
004060ff      
00406116      __return->m_currBucket = nullptr;
00406119      __return->m_currElement = nullptr;
0040611c      __return->m_currHashTable = this;
0040611f      return __return;
004060f0  }

00406137                                                                       cc cc cc cc cc cc cc cc cc                         .........

00406140  class IntrusiveHashIterator<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::find_internal(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1> const* this, class IntrusiveHashIterator<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* __return, struct Turbine_GUID const* arg3)

00406140  {
00406147      uint32_t m_data1 = arg3->m_data1;
00406153      void* ebx = &this->m_buckets[(COMBINE(0, m_data1) % this->m_numBuckets)];
00406156      int32_t* edx_2 = *(uint32_t*)ebx;
00406156      
0040615a      if (edx_2 != 0)
0040615a      {
0040617a          while ((*(uint32_t*)edx_2 != m_data1 || (edx_2[1] != arg3->m_data2*(int32_t*)((char*)arg3 + 4) || (edx_2[2] != arg3->m_data4[0] || edx_2[3] != arg3->m_data4[4]))))
0040617a          {
0040617c              edx_2 = edx_2[4];
0040617c              
00406181              if (edx_2 == 0)
00406181                  break;
0040617a          }
0040615a      }
0040615a      
00406183      class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>** result = __return;
00406189      result[1] = ebx;
0040618c      *(uint32_t*)result = this;
0040618e      result[2] = edx_2;
00406192      return result;
00406140  }

00406195                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

004061a0  uint32_t const* _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(uint32_t const* arg1, uint32_t const* arg2, uint32_t const* arg3, struct _STL::__less_2<unsigned long,unsigned long> arg4, int32_t* arg5)

004061a0  {
004061a4      uint32_t const* result = arg1;
004061aa      int32_t i = (((char*)arg2 - result) >> 2);
004061aa      
004061af      while (i > 0)
004061af      {
004061c2          int32_t i_1 = (i >> 1);
004061c2          
004061c7          if (result[i_1] >= *(uint32_t*)arg3)
004061d6              i = i_1;
004061c7          else
004061c7          {
004061ce              result = &result[(i_1 + 1)];
004061d2              i += (0xffffffff - i_1);
004061c7          }
004061af      }
004061af      
004061de      return result;
004061a0  }

004061df                                                                                               cc                                 .

004061e0  void __thiscall PStringBase<char>::append_string(class PStringBase<char>* this, class PStringBase<char> const* arg2)

004061e0  {
004061e4      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004061e6      int32_t edx = m_charbuffer->m_data[-4];
004061e6      
004061ec      if (edx != 1)
004061f3          PStringBase<char>::append_n_chars(this, m_charbuffer, (edx - 1));
004061e0  }

004061fb                                                                                   cc cc cc cc cc                             .....

00406200  int32_t __convention("regparm") PStringBase<char>::sprintf_append(class PStringBase<char>* this, char const* arg2)

00406200  {
00406200      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
00406200      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
00406201      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00406207      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00406210      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00406224      int32_t result = PStringBase<char>::vsprintf(&PStringBase<char>::s_NullBuffer_2, arg2, &arg_c);
00406229      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0040622f      int32_t eax_1 = PStringBase<char>::s_NullBuffer_4->m_data[-4];
0040622f      
00406235      if (eax_1 != 1)
00406240          PStringBase<char>::append_n_chars(this, PStringBase<char>::s_NullBuffer_4, (eax_1 - 1));
00406240      
00406258      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
00406260          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
00406260      
00406267      return result;
00406200  }

00406268                          cc cc cc cc cc cc cc cc                                                          ........

00406270  class TResult* __thiscall InterfaceSystem::GetClass(class InterfaceSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, class Interface** arg4)

00406270  {
00406285      *(uint32_t*)arg4 = nullptr;
0040628b      void __return_1;
0040628b      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::find_internal(&this->m_classTable.m_intrusiveTable, &__return_1, arg3);
00406296      void* var_4;
00406296      
00406296      if (var_4 != 0)
0040629b          *(uint32_t*)arg4 = *(uint32_t*)((char*)var_4 + 0x14);
0040629b      
0040629d      class Interface* ecx_1 = *(uint32_t*)arg4;
0040629d      
004062a2      if (ecx_1 == 0)
004062a2      {
004062bd          __return->m_val = 0x80040154;
004062c6          return __return;
004062a2      }
004062a2      
004062a4      ecx_1->vtable->AddRef(ecx_1);
004062ad      __return->m_val = 0;
004062b6      return __return;
00406270  }

004062c9                             cc cc cc cc cc cc cc                                                           .......

004062d0  class TResult* __thiscall InterfaceSystem::GetClass(class InterfaceSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, struct Turbine_GUID const* arg4, void** arg5)

004062d0  {
004062e0      void __return_1;
004062e0      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::find_internal(&this->m_classTable.m_intrusiveTable, &__return_1, arg3);
004062eb      void* var_4;
004062eb      
004062eb      if (var_4 != 0)
004062eb      {
004062ed          int32_t* ecx_1 = *(uint32_t*)((char*)var_4 + 0x14);
004062ed          
004062f2          if (ecx_1 != 0)
004062f2          {
004062f4              int32_t eax_1 = *(uint32_t*)ecx_1;
004062fb              struct Turbine_GUID* edx = arg4;
00406305              arg3 = nullptr;
00406305              
00406313              if (*(uint32_t*)*(uint32_t*)(eax_1 + 0xc)(&arg4, edx, &arg3) < 0)
00406313              {
00406333                  __return->m_val = 0x80004002;
0040633c                  return __return;
00406313              }
00406313              
0040631d              *(uint32_t*)arg5 = arg3;
00406323              __return->m_val = 0;
0040632c              return __return;
004062f2          }
004062eb      }
004062eb      
00406343      __return->m_val = 0x80040154;
0040634c      return __return;
004062d0  }

0040634f                                               cc                                                                 .

00406350  class TResult* __thiscall InterfaceSystem::CreateInstance(class InterfaceSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, struct Turbine_GUID const* arg4, class Interface* arg5, void** arg6)

00406350  {
00406350      class InterfaceSystem* __return_1 = this;
00406351      struct Turbine_GUID* edx = arg3;
00406356      void** ebp = arg6;
0040636a      *(uint32_t*)ebp = nullptr;
00406371      arg6 = nullptr;
00406379      InterfaceSystem::GetClass(this, &__return_1, edx, &IObjectFactory_InterfaceType, &arg6);
0040637e      class InterfaceSystem* __return_3 = __return_1;
0040637e      
00406384      if (__return_3 < 0)
00406384      {
00406386          class InterfaceSystem** __return_2 = __return;
0040638a          *(uint32_t*)__return_2 = __return_3;
0040638e          return __return_2;
00406384      }
00406384      
00406396      void** esi = arg6;
004063aa      arg3 = nullptr;
004063ba      class TResult edi = *(uint32_t*)*(uint32_t*)(*(uint32_t*)esi + 0x18)(&arg6, arg5, arg4, &arg3);
004063ba      
004063be      if (edi >= 0)
004063c4          *(uint32_t*)ebp = arg3;
004063c4      
004063cb      *(uint32_t*)(*(uint32_t*)esi + 0x14)();
004063d2      __return->m_val = edi;
004063d8      return __return;
00406350  }

004063db                                                                                   cc cc cc cc cc                             .....

004063e0  void __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this, uint32_t arg2)

004063e0  {
004063e0      class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this_1 = this;
004063f4      this->m_buckets = nullptr;
004063f7      this->m_firstInterestingBucket = nullptr;
004063fa      this->m_numBuckets = 0;
004063fd      this->m_numElements = 0;
00406401      this->vtable = 0x7942dc;
00406407      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00406412      this_1 = arg2;
0040641e      uint32_t* eax = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &this_1, 0, nullptr);
0040641e      
00406428      if (eax == bucketSizesEnd_1)
0040642a          eax -= 4;
0040642a      
0040642d      uint32_t eax_1 = *(uint32_t*)eax;
00406432      this->m_numBuckets = eax_1;
00406432      
00406435      if (eax_1 > 0x17)
0040644c          this->m_buckets = operator new[]((eax_1 * 4));
00406435      else
0040643a          this->m_buckets = &this->m_aInplaceBuckets;
0040643a      
00406452      class HashTableData<Turbine_GUID,Interface *>** m_buckets = this->m_buckets;
00406457      uint32_t ecx_4 = (this->m_numBuckets * 4);
0040645c      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0040646d      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
004063e0  }

00406477                                                                       cc cc cc cc cc cc cc cc cc                         .........

00406480  uint8_t __fastcall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::grow(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this)

00406480  {
00406484      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004064a1      uint32_t m_numBuckets = this->m_numBuckets;
004064ac      uint32_t* eax_2 = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, 0, nullptr);
004064ac      
004064b6      if (eax_2 != bucketSizesEnd_1)
004064bf          eax_2 = &eax_2[1];
004064b6      else
004064b6      {
004064b8          eax_2 -= 4;
004064b8          
004064bd          if (eax_2 != bucketSizesEnd_1)
004064bf              eax_2 = &eax_2[1];
004064b6      }
004064b6      
004064d1      return IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00406480  }

004064d2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

004064e0  uint8_t __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::resize_internal(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this, uint32_t arg2)

004064e0  {
004064ed      if (arg2 == this->m_numBuckets)
004064ed      {
004064ef          uint32_t eax;
004064ef          eax = 0;
004064f5          return 0;
004064ed      }
004064ed      
004064fa      int32_t* i_2 = nullptr;
004064fa      
004064ff      while (this->m_numElements != 0)
004064ff      {
00406507          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0040650d          class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket_2;
0040650d          int32_t* i_3;
0040650d          
0040650d          if (this->m_firstInterestingBucket == ecx_1)
0040650d          {
00406521          label_406521:
00406521              m_firstInterestingBucket_2 = nullptr;
00406523              i_3 = nullptr;
0040650d          }
0040650d          else
0040650d          {
00406510              while (true)
00406510              {
00406510                  class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00406510                  
00406515                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00406515                  {
00406527                      class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0040652a                      i_3 = *(uint32_t*)m_firstInterestingBucket_1;
0040652c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0040652c                      break;
00406515                  }
00406515                  
0040651c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0040651c                  
0040651f                  if (&m_firstInterestingBucket[1] == ecx_1)
0040651f                      goto label_406521;
00406510              }
0040650d          }
0040650d          
00406533          class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
0040653a          int32_t* i_4 = i_3;
0040653d          IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::remove(this, this);
00406542          i_3[4] = i_2;
00406548          i_2 = i_3;
004064ff      }
004064ff      
0040654c      class HashTableData<Turbine_GUID,Interface *>** m_buckets = this->m_buckets;
0040654c      
00406554      if (m_buckets != &this->m_aInplaceBuckets)
00406557          operator delete[](m_buckets);
00406557      
00406566      this->m_buckets = nullptr;
00406569      this->m_firstInterestingBucket = nullptr;
0040656c      this->m_numBuckets = 0;
0040656f      this->m_numElements = 0;
00406572      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::init(this, arg2);
00406579      int32_t* i_1 = i_2;
00406580      class HashTableData<Turbine_GUID,Interface *>** eax_2;
00406580      
00406580      if (i_2 != 0)
00406580      {
004065bf          int32_t* i;
004065bf          
004065bf          do
004065bf          {
00406588              i = i_1[4];
00406588              
00406591              if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
00406595                  IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::grow(this);
00406595              
0040659e              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
004065a1              class HashTableData<Turbine_GUID,Interface *>** m_buckets_1 = this->m_buckets;
004065a7              i_1[4] = m_buckets_1[temp1_1];
004065aa              m_buckets_1[temp1_1] = i_1;
004065ad              eax_2 = &m_buckets_1[temp1_1];
004065ad              
004065b3              if (eax_2 < this->m_firstInterestingBucket)
004065b5                  this->m_firstInterestingBucket = eax_2;
004065b5              
004065b8              this->m_numElements += 1;
004065bd              i_1 = i;
004065bf          } while (i != 0);
00406580      }
00406580      
004065c4      eax_2 = 1;
004065c7      return 1;
004064e0  }

004065ca                                cc cc cc cc cc cc                                                            ......

004065d0  uint8_t __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::add(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this, class HashTableData<Turbine_GUID,Interface *>* arg2)

004065d0  {
004065e1      void __return;
004065e1      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::find_internal(this, &__return, arg2);
004065eb      int32_t var_4;
004065eb      
004065eb      if (var_4 != 0)
004065eb      {
004065ee          class IntrusiveHashIterator<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* eax;
004065ee          eax = 0;
004065f4          return 0;
004065eb      }
004065eb      
00406604      if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
00406608          IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::grow(this);
00406608      
00406611      uint32_t temp1 = (COMBINE(0, arg2->m_hashKey.m_data1) % this->m_numBuckets);
00406614      class HashTableData<Turbine_GUID,Interface *>** m_buckets = this->m_buckets;
0040661a      arg2->m_hashNext = m_buckets[temp1];
0040661d      m_buckets[temp1] = arg2;
00406620      class HashTableData<Turbine_GUID,Interface *>** eax_2 = &m_buckets[temp1];
00406620      
00406626      if (eax_2 < this->m_firstInterestingBucket)
00406628          this->m_firstInterestingBucket = eax_2;
00406628      
0040662b      this->m_numElements += 1;
00406630      eax_2 = 1;
00406636      return 1;
004065d0  }

00406639                                                                             cc cc cc cc cc cc cc                           .......

00406640  uint8_t __thiscall HashTable<Turbine_GUID,Interface *,1>::set(class HashTable<Turbine_GUID,Interface *,1>* this, struct Turbine_GUID const* arg2, class Interface** arg3)

00406640  {
00406654      void __return;
00406654      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::find_internal(&this->m_intrusiveTable, &__return, arg2);
0040665f      void* var_4;
0040665f      
0040665f      if (var_4 != 0)
0040665f      {
00406668          *(uint32_t*)((char*)var_4 + 0x14) = *(uint32_t*)arg3;
0040666b          void* eax;
0040666b          eax = 1;
00406671          return 1;
0040665f      }
0040665f      
00406676      void* eax_1 = operator new(0x18);
00406676      
00406680      if (eax_1 == 0)
00406680      {
004066c1          IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::add(&this->m_intrusiveTable, nullptr);
004066c7          int32_t eax_3;
004066c7          eax_3 = 1;
004066cd          return 1;
00406680      }
00406680      
00406684      uint32_t* ecx_2 = eax_1;
00406686      *(uint32_t*)ecx_2 = arg2->m_data1;
00406688      int32_t edx_2;
00406688      edx_2 = arg2->m_data2;
00406688      *(uint16_t*)((char*)edx_2)[2] = arg2->m_data3;
0040668b      ecx_2[1] = edx_2;
0040668e      int32_t edx_3;
0040668e      edx_3 = arg2->m_data4[0];
0040668e      *(uint8_t*)((char*)edx_3)[1] = arg2->m_data4[1];
0040668e      *(uint8_t*)((char*)edx_3)[2] = arg2->m_data4[2];
0040668e      *(uint8_t*)((char*)edx_3)[3] = arg2->m_data4[3];
00406691      ecx_2[2] = edx_3;
00406694      int32_t edx_4;
00406694      edx_4 = arg2->m_data4[4];
00406694      *(uint8_t*)((char*)edx_4)[1] = arg2->m_data4[5];
00406694      *(uint8_t*)((char*)edx_4)[2] = arg2->m_data4[6];
00406694      *(uint8_t*)((char*)edx_4)[3] = arg2->m_data4[7];
00406697      ecx_2[3] = edx_4;
0040669e      *(uint32_t*)((char*)eax_1 + 0x10) = 0;
004066aa      *(uint32_t*)((char*)eax_1 + 0x14) = *(uint32_t*)arg3;
004066ad      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::add(&this->m_intrusiveTable, eax_1);
004066b3      int32_t eax_2;
004066b3      eax_2 = 1;
004066b9      return 1;
00406640  }


004066d0  void __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::remove(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this, class IntrusiveHashIterator<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1> arg2)

004066d0  {
004066d1      class HashTableData<Turbine_GUID,Interface *>* m_currElement = arg2.m_currElement;
004066d6      class HashTableData<Turbine_GUID,Interface *>** m_currBucket = arg2.m_currBucket;
004066da      class HashTableData<Turbine_GUID,Interface *>* m_hashNext = *(uint32_t*)m_currBucket;
004066da      
004066de      if (m_hashNext != m_currElement)
004066de      {
004066e7          class HashTableData<Turbine_GUID,Interface *>* m_hashNext_1;
004066e7          
004066e7          do
004066e7          {
004066e0              m_hashNext_1 = m_hashNext;
004066e2              m_hashNext = m_hashNext->m_hashNext;
004066e7          } while (m_hashNext != m_currElement);
004066e7          
004066eb          if (m_hashNext_1 != 0)
004066eb          {
004066ff              m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
00406702              this->m_numElements -= 1;
00406707              return;
004066eb          }
004066de      }
004066de      
004066f0      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
004066f2      this->m_numElements -= 1;
004066d0  }

0040670a                                cc cc cc cc cc cc                                                            ......

00406710  void __fastcall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::delete_contents(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this)

00406710  {
00406717      if (this->m_numElements != 0)
00406717      {
00406719          class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket_2;
00406719          class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
00406719          
00406784          do
00406784          {
00406726              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0040672c              void* ecx_2;
0040672c              
0040672c              if (this->m_firstInterestingBucket == ecx_1)
0040672c              {
00406742              label_406742:
00406742                  m_firstInterestingBucket_2 = nullptr;
00406744                  ecx_2 = nullptr;
0040672c              }
0040672c              else
0040672c              {
00406730                  while (true)
00406730                  {
00406730                      int32_t* m_firstInterestingBucket = this->m_firstInterestingBucket;
00406730                      
00406736                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00406736                      {
00406748                          class HashTableData<Turbine_GUID,Interface *>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0040674b                          ecx_2 = *(uint32_t*)m_firstInterestingBucket_1;
0040674d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0040674d                          break;
00406736                      }
00406736                      
0040673d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0040673d                      
00406740                      if (&m_firstInterestingBucket[1] == ecx_1)
00406740                          goto label_406742;
00406730                  }
0040672c              }
0040672c              
0040674f              class HashTableData<Turbine_GUID,Interface *>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0040674f              
00406753              if (m_hashNext == ecx_2)
00406765                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00406753              else
00406753              {
0040675c                  class HashTableData<Turbine_GUID,Interface *>* m_hashNext_1;
0040675c                  
0040675c                  do
0040675c                  {
00406755                      m_hashNext_1 = m_hashNext;
00406757                      m_hashNext = m_hashNext->m_hashNext;
0040675c                  } while (m_hashNext != ecx_2);
0040675c                  
00406760                  if (m_hashNext_1 != 0)
0040676c                      m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
00406760                  else
00406765                      *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00406753              }
00406753              
0040676f              this->m_numElements -= 1;
0040676f              
00406775              if (ecx_2 != 0)
00406778                  operator delete(ecx_2);
00406784          } while (this->m_numElements != 0);
00406717      }
00406710  }

00406789                             cc cc cc cc cc cc cc                                                           .......

00406790  class TResult* __thiscall InterfaceSystem::RegisterClassA(class InterfaceSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, class Interface* arg4, class Interface** arg5)

00406790  {
00406794      class Interface* ebp = arg4;
00406794      
0040679d      if (ebp == 0)
0040679d      {
00406816          __return->m_val = 0x80004005;
00406820          return __return;
0040679d      }
0040679d      
004067ad      class Interface* esi = nullptr;
004067af      void __return_1;
004067af      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::find_internal(&this->m_classTable.m_intrusiveTable, &__return_1, arg3);
004067ba      void* var_4;
004067ba      
004067ba      if (var_4 != 0)
004067bc          esi = *(uint32_t*)((char*)var_4 + 0x14);
004067bc      
004067c6      if (arg5 != 0)
004067c6      {
004067ca          if (esi != 0)
004067cc              esi->vtable->AddRef(esi);
004067cc          
004067d3          *(uint32_t*)arg5 = esi;
004067c6      }
004067c6      
004067d8      if (esi != ebp)
004067d8      {
004067dc          if (esi != 0)
004067de              esi->vtable->Release(esi);
004067de          
004067e5          ebp->vtable->AddRef(ebp);
004067f9          HashTable<Turbine_GUID,Interface *,1>::set(this, arg3, &arg4);
004067d8      }
004067d8      
00406804      __return->m_val = 0;
0040680e      return __return;
00406790  }

00406823           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

00406830  class HashTableData<Turbine_GUID,Interface *>* __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::remove(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this, struct Turbine_GUID const* arg2)

00406830  {
00406846      int32_t __return;
00406846      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::find_internal(this, &__return, arg2);
00406851      int32_t result;
00406851      
00406851      if (result == 0)
00406882          return 0;
00406882      
00406860      int32_t var_8;
00406860      int32_t var_20_1 = var_8;
00406867      int32_t result_1 = result;
0040686a      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::remove(this, __return);
00406877      return result;
00406830  }

00406885                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00406890  void __fastcall InterfaceSystem::~InterfaceSystem(class InterfaceSystem* this)

00406890  {
004068a3      void __return;
004068a3      class IntrusiveHashIterator<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* eax = IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::begin(&this->m_classTable.m_intrusiveTable, &__return);
004068a8      class HashTableData<Turbine_GUID,Interface *>* esi = eax->m_currElement;
004068ad      class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* m_currHashTable = eax->m_currHashTable;
004068af      class HashTableData<Turbine_GUID,Interface *>** m_currBucket = eax->m_currBucket;
004068af      
004068b6      if (esi != 0)
004068b6      {
004068b8          while (true)
004068b8          {
004068b8              class Interface* m_data = esi->m_data;
004068bb              m_data->vtable->Release(m_data);
004068c0              esi = esi->m_hashNext;
004068c0              
004068c5              if (esi == 0)
004068c5              {
004068de                  do
004068de                  {
004068d4                      m_currBucket = &m_currBucket[1];
004068d4                      
004068d9                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004068d9                          goto label_4068e8;
004068de                  } while (*(uint32_t*)m_currBucket == 0);
004068de                  
004068e0                  esi = *(uint32_t*)m_currBucket;
004068e0                  
004068e4                  if (esi == 0)
004068e4                      break;
004068c5              }
004068b8          }
004068b6      }
004068b6      
004068e8  label_4068e8:
004068e8      this->m_classTable.vtable = 0x7942e0;
004068ef      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::delete_contents(&this->m_classTable.m_intrusiveTable);
004068f4      class HashTableData<Turbine_GUID,Interface *>** m_buckets = this->m_classTable.m_intrusiveTable.m_buckets;
0040689d      this->m_classTable.m_intrusiveTable.vtable = 0x7942dc;
0040689d      
00406902      if (m_buckets != &this->m_classTable.m_intrusiveTable.m_aInplaceBuckets)
00406905          operator delete[](m_buckets);
00406905      
0040689d      this->m_classTable.m_intrusiveTable.m_buckets = nullptr;
0040689d      this->m_classTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0040689d      this->m_classTable.m_intrusiveTable.m_numBuckets = 0;
0040689d      this->m_classTable.m_intrusiveTable.m_numElements = 0;
00406890  }

00406923           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

00406930  class TResult* __thiscall InterfaceSystem::UnregisterClassA(class InterfaceSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, class Interface* arg4, class Interface** arg5)

00406930  {
00406945      class Interface* esi = nullptr;
00406947      void __return_1;
00406947      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::find_internal(&this->m_classTable.m_intrusiveTable, &__return_1, arg3);
00406952      void* var_4;
00406952      
00406952      if (var_4 != 0)
00406954          esi = *(uint32_t*)((char*)var_4 + 0x14);
00406954      
0040695d      if (arg5 != 0)
0040695d      {
0040695f          *(uint32_t*)arg5 = esi;
00406961          esi->vtable->AddRef(esi);
0040695d      }
0040695d      
00406972      if ((arg4 == 0 || esi == arg4))
00406972      {
00406977          class HashTableData<Turbine_GUID,Interface *>* eax_3 = IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::remove(&this->m_classTable.m_intrusiveTable, arg3);
00406977          
0040697e          if (eax_3 != 0)
00406981              operator delete(eax_3);
00406981          
0040698b          if (esi != 0)
0040698d              esi->vtable->Release(esi);
00406972      }
00406972      
0040699a      __return->m_val = 0;
004069a4      return __return;
00406930  }

004069a7                       cc cc cc cc cc cc cc cc cc                                                         .........

004069b0  void* __thiscall HashTable<Turbine_GUID,Interface *,1>::`scalar deleting destructor'(class HashTable<Turbine_GUID,Interface *,1>* this, uint32_t arg2)

004069b0  {
004069b9      this->vtable = 0x7942e0;
004069bf      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::delete_contents(&this->m_intrusiveTable);
004069c4      class HashTableData<Turbine_GUID,Interface *>** m_buckets = this->m_intrusiveTable.m_buckets;
004069b4      this->m_intrusiveTable.vtable = 0x7942dc;
004069b4      
004069d2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004069d5          operator delete[](m_buckets);
004069d5      
004069b4      this->m_intrusiveTable.m_buckets = nullptr;
004069b4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004069b4      this->m_intrusiveTable.m_numBuckets = 0;
004069b4      this->m_intrusiveTable.m_numElements = 0;
004069b4      
004069f0      if ((arg2 & 1) != 0)
004069f3          operator delete(this);
004069f3      
004069ff      return this;
004069b0  }

00406a02        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

00406a10  class InterfaceSystem* InterfaceSystem::GetInstance()

00406a10  {
00406a17      if (InterfaceSystem::s_bInterfaceSystemDestroyed != 0)
00406a1b          return 0;
00406a1b      
00406a1c      class InterfaceSystem* InterfaceSystem::s_pInterfaceSystem_1 = InterfaceSystem::s_pInterfaceSystem;
00406a1c      
00406a23      if (InterfaceSystem::s_pInterfaceSystem_1 == 0)
00406a23      {
00406a28          InterfaceSystem::s_pInterfaceSystem_1 = operator new(0x74);
00406a28          
00406a34          if (InterfaceSystem::s_pInterfaceSystem_1 != 0)
00406a34          {
00406a3b              InterfaceSystem::s_pInterfaceSystem_1->m_classTable.vtable = 0x7942e0;
00406a41              IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>(&InterfaceSystem::s_pInterfaceSystem_1->m_classTable.m_intrusiveTable, 0);
00406a48              InterfaceSystem::s_pInterfaceSystem_1->m_classTable.vtable = 0x7942e0;
00406a4e              InterfaceSystem::s_pInterfaceSystem = InterfaceSystem::s_pInterfaceSystem_1;
00406a54              return InterfaceSystem::s_pInterfaceSystem_1;
00406a34          }
00406a34          
00406a57          InterfaceSystem::s_pInterfaceSystem = nullptr;
00406a23      }
00406a23      
00406a5d      return InterfaceSystem::s_pInterfaceSystem_1;
00406a10  }

00406a5e                                                                                            cc cc                                ..

00406a60  void __fastcall SmartBuffer::SmartBuffer(class SmartBuffer* this)

00406a60  {
00406a64      this->m_startOffset = 0;
00406a66      this->m_size = 0;
00406a69      this->m_masterBuffer = nullptr;
00406a60  }

00406a6d                                         cc cc cc                                                               ...

00406a70  uint8_t __fastcall SmartBuffer::CanGrow(class SmartBuffer const* this)

00406a70  {
00406a70      class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
00406a70      
00406a75      if (m_masterBuffer != 0)
00406a75      {
00406a77          m_masterBuffer = m_masterBuffer->m_bCanResize;
00406a7a          return m_masterBuffer;
00406a75      }
00406a75      
00406a7b      m_masterBuffer = 1;
00406a7d      return 1;
00406a70  }

00406a7e                                                                                            cc cc                                ..

00406a80  uint8_t* __fastcall SmartBuffer::GetBuffer(class SmartBuffer* this)

00406a80  {
00406a80      class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
00406a80      
00406a85      if (m_masterBuffer == 0)
00406a8f          return 0;
00406a8f      
00406a8c      return &m_masterBuffer->m_data[this->m_startOffset];
00406a80  }


00406a90  uint8_t* __fastcall SmartBuffer::Orphan(class SmartBuffer* this)

00406a90  {
00406a90      class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
00406a90      
00406a97      if (m_masterBuffer == 0)
00406aa5          return 0;
00406aa5      
00406a99      m_masterBuffer->m_ownsBuffer = 0;
00406a9c      m_masterBuffer->m_bCanResize = 0;
00406aa2      return m_masterBuffer->m_data;
00406a90  }

00406aa6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

00406ab0  uint32_t __fastcall SmartBuffer::GetSize(class SmartBuffer const* this)

00406ab0  {
00406ab3      return this->m_size;
00406ab0  }

00406ab4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

00406ac0  uint32_t __fastcall SmartBuffer::GetShareCount(class SmartBuffer const* this)

00406ac0  {
00406ac0      class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
00406ac0      
00406ac5      if (m_masterBuffer == 0)
00406acd          return 0;
00406acd      
00406aca      return m_masterBuffer->m_cRef;
00406ac0  }

00406ace                                            cc cc                                                                ..

00406ad0  void __fastcall CSpinLock<1048576,0>::Enter(class CSpinLock<1048576,0>* this)

00406ad0  {
00406ade      int32_t esi = 0;
00406ae0      int32_t eax;
00406ae0      int32_t ecx;
00406ae0      eax = InterlockedExchange(this, 1);
00406ae0      
00406ae4      if (eax != 0)
00406ae4      {
00406b12          int32_t i;
00406b12          
00406b12          do
00406b12          {
00406af3              while (this->m_Lock != 0)
00406af3              {
00406af5                  esi += 1;
00406af5                  
00406afe                  if (esi >= 0x100000)
00406afe                  {
00406b02                      Sleep(0);
00406b04                      esi = 0;
00406afe                  }
00406af3              }
00406af3              
00406b0e              i = InterlockedExchange(this, 1);
00406b12          } while (i != 0);
00406ae4      }
00406ad0  }

00406b19                                                                             cc cc cc cc cc cc cc                           .......

00406b20  uint32_t __stdcall GrowBuffer::GetGoodSize(class GrowBuffer* this @ ecx, uint32_t arg2)

00406b20  {
00406b2b      if (arg2 > 0x40000)
00406b3e          return ((arg2 + 0x3ffff) - ((arg2 + 0x3ffff) & 0x3ffff));
00406b3e      
00406b44      if (arg2 < 0x10)
00406b4c          return 0x10;
00406b4c      
00406b58      int32_t eflags;
00406b58      char eax_4;
00406b58      eax_4 = __bsr_gprv_memv(arg2);
00406b64      int32_t result_1 = (1 << eax_4);
00406b6c      int32_t result = result_1;
00406b6c      
00406b6e      if (result_1 > 0x1800)
00406b70          result = (result_1 + 0xc00);
00406b70      
00406b78      if (result >= arg2)
00406b7d          return result;
00406b7d      
00406b7a      return (result + result_1);
00406b20  }


00406b80  void __fastcall GrowBuffer::FreeBuffer(class GrowBuffer* this)

00406b80  {
00406b87      if (this->m_ownsBuffer != 0)
00406b87      {
00406b91          if (this->m_bAllocateFromFreelist != 0)
00406b91          {
00406b97              uint32_t m_size = this->m_size;
00406b9b              uint32_t i_1 = 0;
00406b9b              
00406baa              if ((m_size != 0 && m_size < 0x200000))
00406baa              {
00406bb0                  class CSpinLock<1048576,0>* GrowBuffer::m_pFreeListLock_1 = GrowBuffer::m_pFreeListLock;
00406bb0                  
00406bb8                  if (GrowBuffer::m_pFreeListLock_1 != 0)
00406bb8                  {
00406bc0                      uint32_t GrowBuffer::m_nFreeListEntries_2 = 0xffffffff;
00406bc3                      CSpinLock<1048576,0>::Enter(GrowBuffer::m_pFreeListLock_1);
00406bc8                      uint32_t GrowBuffer::m_nFreeListEntries_1 = GrowBuffer::m_nFreeListEntries;
00406bc8                      
00406bd1                      if (GrowBuffer::m_nFreeListEntries_1 >= 8)
00406bd1                      {
00406be7                          uint32_t cbSize = GrowBuffer::m_FreeList[0].cbSize;
00406bed                          uint32_t i = GrowBuffer::m_nFreeListEntries_1;
00406bed                          
00406bf2                          while (i > 1)
00406bf2                          {
00406bf4                              uint32_t cbSize_1 = *(uint32_t*)((i << 3) + &data_836754);
00406bfb                              i -= 1;
00406bfb                              
00406c00                              if (cbSize > cbSize_1)
00406c00                              {
00406c02                                  cbSize = cbSize_1;
00406c04                                  i_1 = i;
00406c00                              }
00406bf2                          }
00406bf2                          
00406c0e                          if (cbSize < this->m_size)
00406c10                              GrowBuffer::m_nFreeListEntries_2 = i_1;
00406bd1                      }
00406bd1                      else
00406bd1                      {
00406bd3                          GrowBuffer::m_nFreeListEntries_2 = GrowBuffer::m_nFreeListEntries_1;
00406bd5                          GrowBuffer::m_nFreeListEntries_1 += 1;
00406bd8                          GrowBuffer::m_FreeList[GrowBuffer::m_nFreeListEntries_2].pData = 0;
00406bdf                          GrowBuffer::m_nFreeListEntries = GrowBuffer::m_nFreeListEntries_1;
00406bd1                      }
00406bd1                      
00406c14                      if (GrowBuffer::m_nFreeListEntries_2 < GrowBuffer::m_nFreeListEntries_1)
00406c14                      {
00406c1d                          uint8_t* m_data = this->m_data;
00406c20                          this->m_data = GrowBuffer::m_FreeList[GrowBuffer::m_nFreeListEntries_2].pData;
00406c23                          GrowBuffer::m_FreeList[GrowBuffer::m_nFreeListEntries_2].pData = m_data;
00406c2d                          GrowBuffer::m_FreeList[GrowBuffer::m_nFreeListEntries_2].cbSize = this->m_size;
00406c14                      }
00406c14                      
00406c3c                      InterlockedExchange(GrowBuffer::m_pFreeListLock, 0);
00406bb8                  }
00406baa              }
00406b91          }
00406b91          
00406c49          operator delete[](this->m_data);
00406b87      }
00406b87      
00406c53      this->m_data = nullptr;
00406c56      this->m_size = 0;
00406b80  }

00406c5b                                                                                   cc cc cc cc cc                             .....

00406c60  void __thiscall SmartBuffer::SmartBuffer(class SmartBuffer* this, class SmartBuffer const* arg2)

00406c60  {
00406c69      this->m_startOffset = arg2->m_startOffset;
00406c6e      this->m_size = arg2->m_size;
00406c71      class GrowBuffer* m_masterBuffer = arg2->m_masterBuffer;
00406c76      this->m_masterBuffer = m_masterBuffer;
00406c76      
00406c79      if (m_masterBuffer != 0)
00406c7f          InterlockedIncrement(&m_masterBuffer->m_cRef);
00406c60  }

00406c8b                                   cc cc cc cc cc                                                             .....

00406c90  void __fastcall SmartBuffer::~SmartBuffer(class SmartBuffer* this)

00406c90  {
00406c94      class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
00406c94      
00406c99      if (m_masterBuffer != 0)
00406c99      {
00406cab          if ((InterlockedDecrement(&m_masterBuffer->m_cRef) == 0 && m_masterBuffer != 0))
00406cad              m_masterBuffer->vtable->__vecDelDtor(m_masterBuffer, 1);
00406cad          
00406cb5          this->m_masterBuffer = nullptr;
00406c99      }
00406c99      
00406cbd      this->m_startOffset = 0;
00406cc3      this->m_size = 0;
00406c90  }

00406ccc                                      cc cc cc cc                                                              ....

00406cd0  void* __thiscall GrowBuffer::`scalar deleting destructor'(class GrowBuffer* this, uint32_t arg2)

00406cd0  {
00406cd3      this->vtable = 0x7942f8;
00406cd9      GrowBuffer::FreeBuffer(this);
00406ce3      this->vtable = 0x7942f4;
00406ce3      
00406ce9      if ((arg2 & 1) != 0)
00406cec          operator delete(this);
00406cec      
00406cf7      return this;
00406cd0  }

00406cfa                                                                                cc cc cc cc cc cc                            ......

00406d00  void `GrowBuffer::GrowExact'::`2'::FreeListLockAllocator::~FreeListLockAllocator(class GrowBuffer::GrowExact::__l2::FreeListLockAllocator* this @ ecx)

00406d00  {
00406d00      class CSpinLock<1048576,0>* GrowBuffer::m_pFreeListLock_1 = GrowBuffer::m_pFreeListLock;
00406d00      
00406d07      if (GrowBuffer::m_pFreeListLock_1 != 0)
00406d0a          operator delete(GrowBuffer::m_pFreeListLock_1);
00406d0a      
00406d13      uint32_t GrowBuffer::m_nFreeListEntries_1 = GrowBuffer::m_nFreeListEntries;
00406d1b      GrowBuffer::m_pFreeListLock = nullptr;
00406d1b      
00406d25      while (GrowBuffer::m_nFreeListEntries_1 > 0)
00406d25      {
00406d30          void* m_charbuffer = (&PStringBase<unsigned short>::whitespace_string)[(GrowBuffer::m_nFreeListEntries_1 * 2)].m_charbuffer;
00406d37          GrowBuffer::m_nFreeListEntries_1 -= 1;
00406d3b          operator delete[](m_charbuffer);
00406d25      }
00406d25      
00406d47      GrowBuffer::m_nFreeListEntries = 0;
00406d00  }

00406d29                             8d a4 24 00 00 00 00                                                           ..$....
00406d53                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

00406d60  void __thiscall SmartBuffer::SmartBuffer(class SmartBuffer* this, void* arg2, uint32_t arg3)

00406d60  {
00406d6e      this->m_startOffset = 0;
00406d70      this->m_size = arg3;
00406d73      void* eax = operator new(0x14);
00406d7d      class GrowBuffer* esi;
00406d7d      
00406d7d      if (eax == 0)
00406da0          esi = nullptr;
00406d7d      else
00406d7d      {
00406d84          *(uint32_t*)((char*)eax + 4) = 1;
00406d87          *(uint32_t*)eax = 0x7942f8;
00406d8d          *(uint32_t*)((char*)eax + 8) = 0;
00406d90          *(uint32_t*)((char*)eax + 0xc) = 0;
00406d93          *(uint8_t*)((char*)eax + 0x10) = 1;
00406d96          *(uint8_t*)((char*)eax + 0x11) = 1;
00406d99          *(uint8_t*)((char*)eax + 0x12) = 0;
00406d9c          esi = eax;
00406d7d      }
00406d7d      
00406da4      this->m_masterBuffer = esi;
00406da7      GrowBuffer::FreeBuffer(esi);
00406db0      esi->m_data = arg2;
00406db6      esi->m_size = arg3;
00406db9      esi->m_ownsBuffer = 0;
00406dbc      esi->m_bCanResize = 0;
00406d60  }

00406dc5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00406dd0  class SmartBuffer& __thiscall SmartBuffer::operator=(class SmartBuffer* this, class SmartBuffer const& arg2)

00406dd0  {
00406dda      if (arg2 != this)
00406dda      {
00406ddd          class GrowBuffer* m_masterBuffer_1 = this->m_masterBuffer;
00406ddd          
00406de2          if (m_masterBuffer_1 != 0)
00406de2          {
00406df4              if ((InterlockedDecrement(&m_masterBuffer_1->m_cRef) == 0 && m_masterBuffer_1 != 0))
00406df6                  m_masterBuffer_1->vtable->__vecDelDtor(m_masterBuffer_1, 1);
00406df6              
00406dfe              this->m_masterBuffer = nullptr;
00406de2          }
00406de2          
00406e05          this->m_startOffset = 0;
00406e0b          this->m_size = 0;
00406e12          class GrowBuffer* m_masterBuffer = arg2->m_masterBuffer;
00406e17          this->m_masterBuffer = m_masterBuffer;
00406e17          
00406e1b          if (m_masterBuffer != 0)
00406e21              InterlockedIncrement(&m_masterBuffer->m_cRef);
00406e21          
00406e29          this->m_startOffset = arg2->m_startOffset;
00406e2e          this->m_size = arg2->m_size;
00406dda      }
00406dda      
00406e35      return this;
00406dd0  }

00406e38                                                                          cc cc cc cc cc cc cc cc                          ........

00406e40  class SmartBuffer* __thiscall SmartBuffer::MakeWindow(class SmartBuffer* this, class SmartBuffer* __return, uint32_t arg3, uint32_t arg4)

00406e40  {
00406e48      if (this->m_masterBuffer == 0)
00406e48      {
00406e4c          class GrowBuffer* eax_1 = operator new(0x14);
00406e4c          
00406e56          if (eax_1 == 0)
00406e81              eax_1 = nullptr;
00406e56          else
00406e56          {
00406e58              eax_1->m_cRef = 1;
00406e5f              eax_1->vtable = 0x7942f8;
00406e65              eax_1->m_data = nullptr;
00406e6c              eax_1->m_size = 0;
00406e73              eax_1->m_ownsBuffer = 1;
00406e77              eax_1->m_bCanResize = 1;
00406e7b              eax_1->m_bAllocateFromFreelist = 0;
00406e56          }
00406e56          
00406e83          this->m_masterBuffer = eax_1;
00406e48      }
00406e48      
00406e86      class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
00406e86      
00406e8b      if (m_masterBuffer != 0)
00406e91          InterlockedIncrement(&m_masterBuffer->m_cRef);
00406e91      
00406e9f      uint32_t* result = __return;
00406ea7      *(uint32_t*)result = (this->m_startOffset + arg3);
00406ea9      result[1] = arg4;
00406eac      result[2] = m_masterBuffer;
00406eac      
00406eaf      if (m_masterBuffer != 0)
00406eaf      {
00406eb6          InterlockedIncrement(&m_masterBuffer->m_cRef);
00406eb6          
00406ec6          if (InterlockedDecrement(&m_masterBuffer->m_cRef) == 0)
00406ec8              m_masterBuffer->vtable->__vecDelDtor(m_masterBuffer, 1);
00406eaf      }
00406eaf      
00406ed4      return result;
00406e40  }

00406ed7                                                                       cc cc cc cc cc cc cc cc cc                         .........

00406ee0  void __fastcall SmartBuffer::CreateNewMasterBuffer(class SmartBuffer* this)

00406ee0  {
00406ee5      class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
00406ee5      
00406eec      if (m_masterBuffer != 0)
00406eec      {
00406efe          if ((InterlockedDecrement(&m_masterBuffer->m_cRef) == 0 && m_masterBuffer != 0))
00406f00              m_masterBuffer->vtable->__vecDelDtor(m_masterBuffer, 1);
00406f00          
00406f08          this->m_masterBuffer = nullptr;
00406eec      }
00406eec      
00406f0d      this->m_startOffset = 0;
00406f0f      this->m_size = 0;
00406f12      class GrowBuffer* eax_3 = operator new(0x14);
00406f12      
00406f1c      if (eax_3 == 0)
00406f1c      {
00406f44          this->m_masterBuffer = nullptr;
00406f49          return;
00406f1c      }
00406f1c      
00406f1e      eax_3->m_data = nullptr;
00406f21      eax_3->m_size = 0;
00406f24      eax_3->m_bAllocateFromFreelist = 0;
00406f28      eax_3->m_cRef = 1;
00406f2f      eax_3->vtable = 0x7942f8;
00406f35      eax_3->m_ownsBuffer = 1;
00406f39      eax_3->m_bCanResize = 1;
00406f3d      this->m_masterBuffer = eax_3;
00406ee0  }

00406f4a                                cc cc cc cc cc cc                                                            ......

00406f50  void __thiscall GrowBuffer::GrowExact(class GrowBuffer* this, uint32_t arg2)

00406f50  {
00406f50      class GrowBuffer* this_1 = this;
00406f50      
00406f61      if (((*(uint8_t*)GrowBuffer::GrowExact::operator new::`local static guard') & 1) == 0)
00406f61      {
00406f63          (*(uint32_t*)GrowBuffer::GrowExact::operator new::`local static guard') |= 1;
00406f6c          void* eax_1 = operator new(0xc);
00406f6c          
00406f78          if (eax_1 == 0)
00406f78          {
00406f9b              GrowBuffer::m_pFreeListLock = nullptr;
00406fa1              atexit(`GrowBuffer::GrowExact'::`3'::s_FreeListHelper);
00406f78          }
00406f78          else
00406f78          {
00406f7a              *(uint32_t*)eax_1 = 0;
00406f7c              *(uint32_t*)((char*)eax_1 + 4) = 0;
00406f7f              *(uint32_t*)((char*)eax_1 + 8) = 0;
00406f87              GrowBuffer::m_pFreeListLock = eax_1;
00406f8c              atexit(`GrowBuffer::GrowExact'::`3'::s_FreeListHelper);
00406f78          }
00406f61      }
00406f61      
00406fad      uint32_t cbSize = arg2;
00406fad      
00406fb4      if (this->m_size < cbSize)
00406fb4      {
00406fbb          void* pData = nullptr;
00406fbb          
00406fcd          if ((this->m_bAllocateFromFreelist == 0 || GrowBuffer::m_nFreeListEntries == 0))
0040704d              pData = operator new[](cbSize);
00406fcd          else
00406fcd          {
00406fcf              class CSpinLock<1048576,0>* GrowBuffer::m_pFreeListLock_1 = GrowBuffer::m_pFreeListLock;
00406fcf              
00406fd7              if (GrowBuffer::m_pFreeListLock_1 == 0)
0040704d                  pData = operator new[](cbSize);
00406fd7              else
00406fd7              {
00406fd9                  CSpinLock<1048576,0>::Enter(GrowBuffer::m_pFreeListLock_1);
00406fde                  uint32_t GrowBuffer::m_nFreeListEntries_1 = GrowBuffer::m_nFreeListEntries;
00406fde                  
00406fe6                  if (GrowBuffer::m_nFreeListEntries_1 != 0)
00406fe6                  {
00406fe8                      uint32_t i = GrowBuffer::m_nFreeListEntries_1;
00406fe8                      
00406fec                      while (i > 0)
00406fec                      {
00406ff0                          i -= 1;
00406ff0                          
00406ffa                          if (GrowBuffer::m_FreeList[i].cbSize >= cbSize)
00406ffa                          {
00407002                              cbSize = GrowBuffer::m_FreeList[i].cbSize;
00407009                              pData = GrowBuffer::m_FreeList[i].pData;
00407017                              int32_t m_charbuffer = (&PStringBase<unsigned short>::whitespace_string)[(GrowBuffer::m_nFreeListEntries_1 * 2)].m_charbuffer;
00407021                              GrowBuffer::m_nFreeListEntries = (GrowBuffer::m_nFreeListEntries_1 - 1);
00407010                              GrowBuffer::m_FreeList[i].pData = m_charbuffer;
00407030                              GrowBuffer::m_FreeList[i].cbSize = GrowBuffer::m_FreeList[(GrowBuffer::m_nFreeListEntries_1 - 1)].cbSize;
00407030                              break;
00406ffa                          }
00406fec                      }
00406fe6                  }
00406fe6                  
0040703a                  InterlockedExchange(GrowBuffer::m_pFreeListLock, 0);
0040703a                  
00407042                  if (pData == 0)
0040704d                      pData = operator new[](cbSize);
00406fd7              }
00406fcd          }
00406fcd          
0040704f          uint32_t m_size = this->m_size;
0040704f          
00407054          if (m_size > 0)
00407054          {
00407060              int32_t esi_2;
00407060              int32_t edi_2;
00407060              edi_2 = __builtin_memcpy(pData, this->m_data, ((m_size >> 2) << 2));
00407067              __builtin_memcpy(edi_2, esi_2, (m_size & 3));
0040706d              GrowBuffer::FreeBuffer(this);
00407054          }
00407054          
00407076          this->m_data = pData;
00407079          this->m_size = cbSize;
00406fb4      }
00406f50  }

00407084              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

00407090  class SmartBuffer* __thiscall SmartBuffer::MakeWindow(class SmartBuffer* this, class SmartBuffer* __return, uint32_t arg3)

00407090  {
004070a1      SmartBuffer::MakeWindow(this, __return, arg3, (this->m_size - arg3));
004070a9      return __return;
00407090  }

004070ac                                      cc cc cc cc                                                              ....

004070b0  void __thiscall SmartBuffer::Borrow(class SmartBuffer* this, uint8_t* arg2, uint32_t arg3)

004070b0  {
004070b4      SmartBuffer::CreateNewMasterBuffer(this);
004070b9      class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
004070be      GrowBuffer::FreeBuffer(m_masterBuffer);
004070c7      m_masterBuffer->m_data = arg2;
004070d0      m_masterBuffer->m_size = arg3;
004070d3      m_masterBuffer->m_ownsBuffer = 0;
004070d6      m_masterBuffer->m_bCanResize = 0;
004070d9      this->m_size = arg3;
004070b0  }

004070e1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

004070f0  class SmartBuffer* __thiscall SmartBuffer::Clone(class SmartBuffer const* this, class SmartBuffer* __return)

004070f0  {
004070f6      int32_t edi = 0;
004070f8      uint32_t m_size = 0;
004070fa      void* ebp = nullptr;
004070fa      
004070ff      if (this->m_masterBuffer != 0)
004070ff      {
00407103          void* eax = operator new(0x14);
00407103          
0040710d          if (eax == 0)
00407132              ebp = nullptr;
0040710d          else
0040710d          {
0040710f              *(uint32_t*)((char*)eax + 4) = 1;
00407116              *(uint32_t*)eax = 0x7942f8;
0040711c              *(uint32_t*)((char*)eax + 8) = 0;
0040711f              *(uint32_t*)((char*)eax + 0xc) = 0;
00407122              *(uint8_t*)((char*)eax + 0x10) = 1;
00407126              *(uint8_t*)((char*)eax + 0x11) = 1;
0040712a              *(uint8_t*)((char*)eax + 0x12) = 0;
0040712e              ebp = eax;
0040710d          }
0040710d          
0040713a          GrowBuffer::GrowExact(ebp, this->m_size);
0040713f          class GrowBuffer* m_masterBuffer = this->m_masterBuffer;
00407144          void* esi_2;
00407144          
00407144          if (m_masterBuffer == 0)
0040714d              esi_2 = nullptr;
00407144          else
00407149              esi_2 = &m_masterBuffer->m_data[this->m_startOffset];
00407149          
00407151          if (ebp != 0)
00407153              edi = *(uint32_t*)((char*)ebp + 8);
00407153          
00407156          uint32_t m_size_1 = this->m_size;
0040715e          int32_t esi_3;
0040715e          int32_t edi_1;
0040715e          edi_1 = __builtin_memcpy(edi, esi_2, ((m_size_1 >> 2) << 2));
00407165          __builtin_memcpy(edi_1, esi_3, (m_size_1 & 3));
00407167          m_size = this->m_size;
004070ff      }
004070ff      
00407170      __return->m_startOffset = 0;
00407176      __return->m_size = m_size;
00407179      __return->m_masterBuffer = ebp;
00407179      
0040717c      if (ebp != 0)
0040717c      {
00407182          InterlockedIncrement(((char*)ebp + 4));
00407182          
00407191          if (InterlockedDecrement(((char*)ebp + 4)) == 0)
0040719a              **(uint32_t**)ebp(1);
0040717c      }
0040717c      
004071a2      return __return;
004070f0  }

004071a5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

004071b0  void __thiscall SmartBuffer::ReconfigureAllocation(class SmartBuffer* this, uint32_t arg2, uint32_t arg3)

004071b0  {
004071b0      class GrowBuffer* eax;
004071b0      eax = arg3;
004071b0      
004071c0      if ((eax & 8) != 0)
004071c2          this->m_masterBuffer->m_bAllocateFromFreelist = 1;
004071c2      
004071cf      if (this->m_size < arg2)
004071cf      {
004071d7          if (this->m_masterBuffer == 0)
004071d7          {
004071db              eax = operator new(0x14);
004071db              
004071e5              if (eax == 0)
00407202                  eax = nullptr;
004071e5              else
004071e5              {
004071e7                  eax->m_cRef = 1;
004071ea                  eax->vtable = 0x7942f8;
004071f0                  eax->m_data = nullptr;
004071f3                  eax->m_size = 0;
004071f6                  eax->m_ownsBuffer = 1;
004071f9                  eax->m_bCanResize = 1;
004071fc                  eax->m_bAllocateFromFreelist = 0;
004071e5              }
004071e5              
00407204              this->m_masterBuffer = eax;
00407207              eax = arg3;
004071d7          }
004071d7          
0040720d          uint32_t var_14_2;
0040720d          class GrowBuffer* m_masterBuffer;
0040720d          
0040720d          if ((1 & eax) == 0)
0040720d          {
00407225              m_masterBuffer = this->m_masterBuffer;
0040722a              var_14_2 = (this->m_startOffset + arg2);
0040720d          }
0040720d          else
0040720d          {
00407211              class GrowBuffer* m_masterBuffer_1 = this->m_masterBuffer;
0040721e              var_14_2 = GrowBuffer::GetGoodSize(m_masterBuffer_1, (this->m_startOffset + arg2));
0040721f              m_masterBuffer = m_masterBuffer_1;
0040720d          }
0040720d          
0040722b          GrowBuffer::GrowExact(m_masterBuffer, var_14_2);
00407230          eax = arg3;
00407234          this->m_size = arg2;
004071cf      }
004071cf      
0040723a      if ((eax & 4) != 0)
0040723c          this->m_masterBuffer->m_bCanResize = 0;
0040723c      
00407245      if ((eax & 2) != 0)
00407247          this->m_size = arg2;
004071b0  }


00407250  void __stdcall ArgumentParser::AppendOutputText(class ArgumentParser* this @ ecx, char const* arg2, enum ArgumentParser::OutputTextType arg3)

00407250  {
0040725b      if ((arg2 != 0 && *(uint8_t*)arg2 != 0))
0040725b      {
00407264          char const* const ecx_1;
00407264          
00407264          switch (arg3)
00407264          {
0040726d              case ottErrorText:
0040726d              {
0040726d                  ecx_1 = "\x1b[0m\x1b[1m";
00407279              label_407279:
00407279                  char const* const var_4_1 = "\x1b[0m";
0040727e                  char const* var_8_1 = arg2;
0040727f                  char const* const var_c = ecx_1;
00407280                  char const* const var_10 = "%s%s%s";
00407285                  color_printf();
0040728d                  return;
0040726d                  break;
0040726d              }
00407274              case ottShortVersion:
00407274              case ottLongVersion:
00407274              {
00407274                  ecx_1 = "\x1b[4m";
00407274                  goto label_407279;
00407274              }
00407264          }
00407264          
0040729b          fputs(arg2, (_imp___iob + 0x20));
0040725b      }
00407250  }

004072a7                       90                                                                                 .
004072a8  uint32_t jump_table_4072a8[0x5] = 
004072a8  {
004072a8      [0x0] =  0x00407290
004072ac      [0x1] =  0x0040726d
004072b0      [0x2] =  0x00407274
004072b4      [0x3] =  0x00407274
004072b8      [0x4] =  0x00407290
004072bc  }

004072bc                                                                                      cc cc cc cc                              ....

004072c0  void __thiscall IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::init(class IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>* this, uint32_t arg2)

004072c0  {
004072cb      this->m_numBuckets = arg2;
004072ce      class HashTableData<Turbine_GUID,Interface *>** s;
004072ce      
004072ce      if (arg2 > 0x17)
004072dd          s = operator new[]((arg2 << 2));
004072ce      else
004072d0          s = &this->m_aInplaceBuckets;
004072d0      
004072ea      uint32_t ecx_3 = (this->m_numBuckets * 4);
004072f1      this->m_firstInterestingBucket = &s[*(int32_t*)((char*)this + 0x68)];
004072f6      this->m_buckets = s;
00407305      __builtin_memset(__builtin_memset(s, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004072c0  }

0040730c                                      cc cc cc cc                                                              ....

00407310  uint16_t const* __thiscall PStringBase<unsigned short>::operator[](class PStringBase<unsigned short> const* this, uint32_t arg2)

00407310  {
00407310      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
00407312      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
00407312      
0040731b      if (arg2 < ecx)
00407327          return &m_charbuffer->m_data[arg2];
00407327      
00407321      return &m_charbuffer->m_data[(ecx - 1)];
00407310  }

0040732a                                cc cc cc cc cc cc                                                            ......

00407330  int32_t SortCommandLineArgs(void const* arg1, void const* arg2)

00407330  {
00407342      arg2 = *(uint32_t*)(*(uint32_t*)arg2 + 8);
00407346      arg1 = *(uint32_t*)(*(uint32_t*)arg1 + 8);
0040734a      /* tailcall */
0040734a      return _stricmp();
00407330  }


00407350  uint8_t __thiscall ArgumentParser::ParseArgs(class ArgumentParser* this, class SmartArray<PStringBase<unsigned short>,1> const* arg2, uint8_t arg3)

00407350  {
00407350      class SmartArray<PStringBase<unsigned short>,1>* edx_1 = arg2;
00407354      uint32_t m_num = edx_1->m_num;
00407354      
00407359      if (m_num != 0)
00407389          return *(int32_t*)((char*)this->vtable + 0xc)(edx_1->m_data, m_num, arg3);
00407389      
0040735f      struct ArgumentParser::VTable* vtable = this->vtable;
00407369      arg2 = &data_794320;
00407374      return *(int32_t*)((char*)vtable + 0xc)(&arg2, 0, arg3);
00407350  }

0040738c                                      cc cc cc cc                                                              ....

00407390  uint8_t __thiscall ArgumentParser::ParseArgs(class ArgumentParser* this, class SmartArray<PStringBase<char>,1> const* arg2, uint8_t arg3)

00407390  {
00407390      class SmartArray<PStringBase<char>,1>* edx_1 = arg2;
00407394      uint32_t m_num = edx_1->m_num;
00407394      
00407399      if (m_num != 0)
004073c9          return this->vtable->ParseArgs(this, edx_1->m_data, m_num, arg3);
004073c9      
0040739f      struct ArgumentParser::VTable* vtable = this->vtable;
004073a9      arg2 = &data_794320;
004073b4      return *(int32_t*)((char*)vtable + 0xc)(&arg2, 0, arg3);
00407390  }

004073cc                                      cc cc cc cc                                                              ....

004073d0  uint32_t __fastcall CaseInsensitiveStringBase<PStringBase<unsigned short> >::case_insensitive_hash(class CaseInsensitiveStringBase<PStringBase<unsigned short> > const* this)

004073d0  {
004073d2      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
004073d4      int32_t eax;
004073d4      eax = m_charbuffer->m_data[0];
004073d7      int32_t result = 0;
004073d7      
004073dc      while (eax != 0)
004073dc      {
004073ee          result = ((result << 4) + ((uint32_t)towlower(eax)));
004073f5          eax = (result & 0xf0000000);
004073f5          
004073fa          if (eax != 0)
00407406              result = (((eax >> 0x18) ^ result) & 0xfffffff);
00407406          
00407408          eax = m_charbuffer->m_data[1];
0040740c          m_charbuffer = &m_charbuffer->m_data[1];
004073dc      }
004073dc      
00407419      return result;
004073d0  }

0040741a                                                                                cc cc cc cc cc cc                            ......

00407420  void* __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* this, uint32_t arg2)

00407420  {
00407423      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_buckets = this->m_buckets;
0040742b      this->vtable = &IntrusiveHashTable<class CaseInsensitiveStringBase<class PStringBase<uint16_t> >,class HashTableData<class CaseInsensitiveStringBase<class PStringBase<uint16_t> >,long>*,1>::`vftable';
0040742b      
00407431      if (m_buckets != &this->m_aInplaceBuckets)
00407434          operator delete[](m_buckets);
00407434      
00407443      this->m_buckets = nullptr;
00407446      this->m_firstInterestingBucket = nullptr;
00407449      this->m_numBuckets = 0;
0040744c      this->m_numElements = 0;
0040744c      
0040744f      if ((arg2 & 1) != 0)
00407452          operator delete(this);
00407452      
0040745d      return this;
00407420  }


00407460  void* __thiscall IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>* this, uint32_t arg2)

00407460  {
00407463      class HashTableData<unsigned short,long>** m_buckets = this->m_buckets;
0040746b      this->vtable = &IntrusiveHashTable<uint16_t,class HashTableData<uint16_t,long>*,1>::`vftable';
0040746b      
00407471      if (m_buckets != &this->m_aInplaceBuckets)
00407474          operator delete[](m_buckets);
00407474      
00407483      this->m_buckets = nullptr;
00407486      this->m_firstInterestingBucket = nullptr;
00407489      this->m_numBuckets = 0;
0040748c      this->m_numElements = 0;
0040748c      
0040748f      if ((arg2 & 1) != 0)
00407492          operator delete(this);
00407492      
0040749d      return this;
00407460  }


004074a0  struct CommandLineArg& __thiscall CommandLineArg::operator=(struct CommandLineArg* this, struct CommandLineArg const& arg2)

004074a0  {
004074b0      int32_t* result = this;
004074b2      *(uint32_t*)result = arg2->ArgType;
004074b4      this = arg2->ShortVersion;
004074b7      result[1] = this;
004074ba      void* eax_1 = result[2];
004074ba      
004074c0      if (eax_1 != arg2->LongVersion.m_charbuffer)
004074c0      {
004074d1          if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
004074d9              **(uint32_t**)((char*)eax_1 - 0x14)(1);
004074d9          
004074db          class PSRefBufferCharData<char>* m_charbuffer = arg2->LongVersion.m_charbuffer;
004074de          result[2] = m_charbuffer;
004074e5          InterlockedIncrement(&m_charbuffer[-1]);
004074c0      }
004074c0      
004074eb      void* eax_5 = result[3];
004074eb      
004074f1      if (eax_5 != arg2->Description.m_charbuffer)
004074f1      {
00407502          if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
0040750a              **(uint32_t**)((char*)eax_5 - 0x14)(1);
0040750a          
0040750c          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->Description.m_charbuffer;
0040750f          result[3] = m_charbuffer_1;
00407516          InterlockedIncrement(&m_charbuffer_1[-1]);
004074f1      }
004074f1      
0040751f      result[4] = arg2->VariableToModify;
00407525      result[5] = arg2->ValueToStore;
0040752c      result[6] = arg2->UserData;
00407534      return result;
004074a0  }

00407537                                                                       cc cc cc cc cc cc cc cc cc                         .........

00407540  void* __thiscall PStringBase<char>::`vector deleting destructor'(class PStringBase<char>* this, uint32_t arg2)

00407540  {
00407540      class PStringBase<char>* var_4 = this;
00407540      
0040754a      if ((arg2 & 2) == 0)
0040754a      {
004075b2          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = (this->m_charbuffer - 0x14);
004075b2          
004075c5          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004075cd              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004075cd          
004075d4          if ((arg2 & 1) != 0)
004075d7              operator delete(this);
004075d7          
004075e4          return this;
0040754a      }
0040754a      
0040754c      int32_t m_charbuffer = this->m_charbuffer;
00407553      void* edi_1 = &this[m_charbuffer];
00407553      
00407559      if ((m_charbuffer - 1) >= 0)
00407559      {
00407565          var_4 = m_charbuffer;
00407594          class PStringBase<char>* i;
00407594          
00407594          do
00407594          {
00407570              int32_t esi_1 = *(uint32_t*)((char*)edi_1 - 4);
00407573              edi_1 -= 4;
00407573              
00407585              if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
0040758d                  **(uint32_t**)(esi_1 - 0x14)(1);
0040758d              
0040758f              i = var_4;
0040758f              var_4 -= 1;
00407594          } while (i != 1);
00407559      }
00407559      
0040759c      if ((arg2 & 1) != 0)
0040759f          operator delete[](&this[-1]);
0040759f      
004075ad      return &this[-1];
00407540  }

004075e7                       cc cc cc cc cc cc cc cc cc                                                         .........

004075f0  uint32_t __stdcall SmartArray<PFileNode *,1>::get_new_size(class SmartArray<PFileNode *,1> const* this @ ecx, uint32_t arg2)

004075f0  {
004075f7      if (arg2 <= 8)
004075fe          return 8;
004075fe      
00407607      if (arg2 > 0x4000)
00407607      {
0040760b          int32_t eax_2 = (arg2 & 0x3fff);
0040760b          
00407610          if (eax_2 == 0)
0040761d              return arg2;
0040761d          
00407619          return (arg2 + (0x4000 - eax_2));
00407607      }
00407607      
0040762a      int32_t eflags;
0040762a      char eax_5;
0040762a      eax_5 = __bsr_gprv_memv(arg2);
00407636      int32_t esi = (1 << eax_5);
00407636      
0040763d      if (arg2 > esi)
00407642          return (esi * 2);
00407642      
0040763f      return arg2;
004075f0  }

00407645                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00407650  void __fastcall SmartArray<PStringBase<unsigned short>,1>::Reset(class SmartArray<PStringBase<unsigned short>,1>* this)

00407650  {
00407654      class SmartArray<PStringBase<unsigned short>,1>* this_1 = this;
00407656      uint32_t m_sizeAndDeallocate = this_1->m_sizeAndDeallocate;
0040766a      class SmartArray<PStringBase<unsigned short>,1>* this_2 = this_1;
0040766e      this_1->m_num = 0;
0040766e      
00407671      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00407671      {
00407673          class PStringBase<unsigned short>* m_data = this_1->m_data;
00407673          
00407678          if (m_data != 0)
0040767c              PStringBase<char>::`vector deleting destructor'(m_data, 3);
0040767c          
00407681          this_1->m_data = 0;
00407684          this_1->m_sizeAndDeallocate = 0;
0040768c          return;
00407671      }
00407671      
00407690      if (this_1->m_data != 0)
00407690      {
00407696          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
0040769e          int32_t var_8_1 = (eax - 1);
0040769e          
004076a2          if ((eax - 1) >= 0)
004076a2          {
00407713              int32_t temp1_1;
00407713              
00407713              do
00407713              {
004076a6                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004076b0                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004076bd                  void* ebx_1 = &this_1->m_data[var_8_1];
004076c0                  void* eax_3 = *(uint32_t*)ebx_1;
004076c0                  
004076c4                  if (eax_3 != PStringBase<unsigned short>::s_NullBuffer_1)
004076c4                  {
004076d9                      if ((InterlockedDecrement(((char*)eax_3 - 0x10)) == 0 && eax_3 != 0x14))
004076e2                          **(uint32_t**)((char*)eax_3 - 0x14)(1);
004076e2                      
004076e5                      *(uint32_t*)ebx_1 = PStringBase<unsigned short>::s_NullBuffer_1;
004076e7                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004076ed                      this_1 = this_2;
004076c4                  }
004076c4                  
00407704                  if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
0040770c                      *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
0040770c                  
0040770e                  temp1_1 = var_8_1;
0040770e                  var_8_1 -= 1;
00407713              } while ((temp1_1 - 1) >= 0);
004076a2          }
00407690      }
00407650  }

0040771d                                                                                         cc cc cc                               ...

00407720  void __fastcall SmartArray<PFileNode *,1>::Reset(class SmartArray<PFileNode *,1>* this)

00407720  {
00407723      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00407734      this->m_num = 0;
00407734      
0040773b      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0040773b      {
00407740          operator delete[](this->m_data);
00407748          this->m_data = 0;
0040774e          this->m_sizeAndDeallocate = 0;
00407756          return;
0040773b      }
0040773b      
0040775a      if (this->m_data != 0)
0040775a      {
0040775c          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
00407761          int32_t eax_1 = (eax - 1);
00407761          
00407764          if ((eax - 1) >= 0)
00407764          {
0040777d              int32_t temp1_1;
0040777d              
0040777d              do
0040777d              {
00407770                  temp1_1 = eax_1;
00407770                  eax_1 -= 1;
00407773                  this->m_data[(eax_1 + 1)] = 0;
0040777d              } while ((temp1_1 - 1) >= 0);
00407764          }
0040775a      }
00407720  }

00407768                          8d a4 24 00 00 00 00 90                                                          ..$.....
00407781     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00407790  void __fastcall SmartArray<PStringBase<char>,1>::Reset(class SmartArray<PStringBase<char>,1>* this)

00407790  {
00407794      class SmartArray<PStringBase<char>,1>* this_1 = this;
00407796      uint32_t m_sizeAndDeallocate = this_1->m_sizeAndDeallocate;
004077aa      class SmartArray<PStringBase<char>,1>* this_2 = this_1;
004077ae      this_1->m_num = 0;
004077ae      
004077b1      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004077b1      {
004077b3          class PStringBase<char>* m_data = this_1->m_data;
004077b3          
004077b8          if (m_data != 0)
004077bc              PStringBase<char>::`vector deleting destructor'(m_data, 3);
004077bc          
004077c1          this_1->m_data = 0;
004077c4          this_1->m_sizeAndDeallocate = 0;
004077cc          return;
004077b1      }
004077b1      
004077d0      if (this_1->m_data != 0)
004077d0      {
004077d6          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
004077de          int32_t var_8_1 = (eax - 1);
004077de          
004077e2          if ((eax - 1) >= 0)
004077e2          {
00407853              int32_t temp1_1;
00407853              
00407853              do
00407853              {
004077e6                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004077f0                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004077fd                  void* ebx_1 = &this_1->m_data[var_8_1];
00407800                  void* eax_3 = *(uint32_t*)ebx_1;
00407800                  
00407804                  if (eax_3 != PStringBase<char>::s_NullBuffer_1)
00407804                  {
00407819                      if ((InterlockedDecrement(((char*)eax_3 - 0x10)) == 0 && eax_3 != 0x14))
00407822                          **(uint32_t**)((char*)eax_3 - 0x14)(1);
00407822                      
00407825                      *(uint32_t*)ebx_1 = PStringBase<char>::s_NullBuffer_1;
00407827                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040782d                      this_1 = this_2;
00407804                  }
00407804                  
00407844                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0040784c                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0040784c                  
0040784e                  temp1_1 = var_8_1;
0040784e                  var_8_1 -= 1;
00407853              } while ((temp1_1 - 1) >= 0);
004077e2          }
004077d0      }
00407790  }

0040785d                                                                                         cc cc cc                               ...

00407860  void __fastcall CommandLineArg::CommandLineArg(struct CommandLineArg* this)

00407860  {
00407863      this->ArgType = 0;
00407869      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040787b      this->LongVersion.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040787e      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00407880      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0040788c      this->Description.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0040788f      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
00407860  }

00407896                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

004078a0  void __thiscall ArgumentParser::AppendArgumentText(class ArgumentParser* this, class PStringBase<char> arg2, class PStringBase<char> arg3, class PStringBase<char> arg4)

004078a0  {
004078ac      int32_t s_1;
004078ac      int32_t s = s_1;
004078ad      int32_t esi;
004078ad      int32_t var_11c = esi;
004078bc      char var_10d;
004078bc      
004078bc      if (this->m_CmdChars.m_charbuffer->m_data[-4] != 1)
004078bc      {
004078c5          class PSRefBufferCharData<char>* m_charbuffer = this->m_CmdChars.m_charbuffer;
004078c8          int32_t ecx = m_charbuffer->m_data[-4];
004078c8          
004078cd          if (ecx <= 0)
004078cf              m_charbuffer = &m_charbuffer->m_data[(ecx - 1)];
004078cf          
004078d3          ecx = m_charbuffer->m_data[0];
004078d5          var_10d = ecx;
004078bc      }
004078bc      else
004078be          var_10d = 0x20;
004078be      
004078d9      class PStringBase<char> edi_1 = arg2;
004078df      void* var_130;
004078df      void var_108;
004078df      int32_t edi;
004078df      
004078df      if (*(uint32_t*)(edi_1 - 4) == 1)
00407907          sprintf(&var_108, &data_794338, edi);
004078df      else
004078df      {
004078ec          char const* const var_12c_1 = "%c%s";
004078f1          var_130 = &var_108;
004078f2          sprintf(var_130, var_12c_1, ((int32_t)var_10d), edi_1, edi);
004078df      }
004078df      
00407910      struct ArgumentParser::VTable* vtable = this->vtable;
00407912      enum ArgumentParser::OutputTextType var_124_2 = ottShortVersion;
00407914      int32_t var_128_2 = 0;
00407916      int32_t var_12c_2 = 0x16;
0040791c      var_130 = &var_108;
0040791f      int32_t eax_1 = vtable->AppendAndWordWrap(this, var_130, var_12c_2, var_128_2, var_124_2);
00407934      int32_t* var_138;
00407934      void* const var_134;
00407934      
00407934      if ((*(uint32_t*)(edi_1 - 4) == 1 || *(uint32_t*)(arg3 - 4) == 1))
00407934      {
00407942          var_134 = &data_794338;
0040794b          var_138 = &s;
00407934      }
00407934      else
00407934      {
00407936          var_134 = &data_794334;
0040793f          var_138 = &s;
00407934      }
00407934      
0040794c      sprintf(var_138, var_134);
0040796d      int32_t ebx_1 = this->vtable->AppendAndWordWrap(this, &s, 0x16, eax_1, ottNormal);
0040796d      
0040796f      if (*(uint32_t*)(arg3 - 4) != 1)
0040796f      {
00407971          int32_t eax_3 = ((int32_t)*(uint8_t*)((char*)edi)[3]);
00407983          sprintf(&s, "%c%c%s", eax_3, eax_3, arg3);
0040799d          ebx_1 = this->vtable->AppendAndWordWrap(this, &s, 0x16, ebx_1, ottLongVersion);
0040796f      }
0040796f      
004079a2      void* eax_5 = &s;
004079a2      
004079a6      if (ebx_1 < 0x14)
004079a6      {
004079ad          int32_t ecx_6 = (0x14 - ebx_1);
004079af          int32_t var_11c_1 = ecx_6;
004079c8          __builtin_memset(__builtin_memset(&s, 0x20202020, ((ecx_6 >> 2) << 2)), 0x20, (ecx_6 & 3));
004079ca          edi_1 = arg2;
004079cf          ebx_1 += ecx_6;
004079d1          eax_5 = ((&var_130 + ecx_6) + 0x18);
004079a6      }
004079a6      
004079d7      *(uint8_t*)eax_5 = 0x3a;
004079de      *(uint8_t*)((char*)eax_5 + 1) = 0x20;
004079e7      *(uint8_t*)((char*)eax_5 + 2) = 0;
004079f3      this->vtable->AppendAndWordWrap(this, arg4, 0x16, this->vtable->AppendAndWordWrap(this, &s, 0x16, ebx_1, ottNormal), ottDescription);
00407a0e      s = 0xa;
00407a13      *(uint8_t*)((char*)s)[1] = 0;
00407a03      this->vtable->AppendOutputText(this, &s, ottNormal);
00407a03      
00407a30      if ((InterlockedDecrement((edi_1 - 0x10)) == 0 && edi_1 != 0x14))
00407a38          **(uint32_t**)(edi_1 - 0x14)(1);
00407a38      
00407a4c      if ((InterlockedDecrement((arg3 - 0x10)) == 0 && arg3 != 0x14))
00407a54          **(uint32_t**)(arg3 - 0x14)(1);
00407a54      
00407a68      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
00407a70          **(uint32_t**)(arg4 - 0x14)(1);
004078a0  }

00407a7b                                                                                   cc cc cc cc cc                             .....

00407a80  void __thiscall ArgumentParser::SetErrorText(class ArgumentParser* this, class PStringBase<char> const* arg2)

00407a80  {
00407a88      class PSRefBufferCharData<char>* m_charbuffer = this->m_ErrorText.m_charbuffer;
00407a88      
00407a8d      if (m_charbuffer == arg2->m_charbuffer)
00407ac4          return;
00407ac4      
00407aa3      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00407aab          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00407aab      
00407aad      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00407ab0      this->m_ErrorText.m_charbuffer = m_charbuffer_1;
00407ab8      arg2 = &m_charbuffer_1[-1];
00407abc      /* tailcall */
00407abc      return InterlockedIncrement();
00407a80  }

00407ac7                       cc cc cc cc cc cc cc cc cc                                                         .........

00407ad0  void* __thiscall CommandLineArg::`vector deleting destructor'(struct CommandLineArg* this, uint32_t arg2)

00407ad0  {
00407ad0      struct CommandLineArg* this_1 = this;
00407ad2      int32_t ebx;
00407ad2      ebx = arg2;
00407ad2      
00407adc      if ((ebx & 2) == 0)
00407adc      {
00407b71          CommandLineArg::~CommandLineArg(this);
00407b71          
00407b79          if ((ebx & 1) != 0)
00407b7c              operator delete(this);
00407b7c          
00407b89          return this;
00407adc      }
00407adc      
00407ae2      int32_t ArgType = this->ArgType;
00407ae6      void* __offset(CommandLineArg, -0x4) edi = ((char*)this - 4);
00407ae6      
00407afc      if ((ArgType - 1) >= 0)
00407afc      {
00407b05          void* edi_1 = &this[ArgType].LongVersion;
00407b08          ebx = ArgType;
00407b4d          int32_t i;
00407b4d          
00407b4d          do
00407b4d          {
00407b10              int32_t esi_1 = *(uint32_t*)((char*)edi_1 - 0x18);
00407b13              edi_1 -= 0x1c;
00407b13              
00407b25              if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
00407b2d                  **(uint32_t**)(esi_1 - 0x14)(1);
00407b2d              
00407b31              int32_t* esi_4 = (*(uint32_t*)edi_1 - 0x14);
00407b31              
00407b40              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00407b48                  **(uint32_t**)esi_4(1);
00407b48              
00407b4a              i = ebx;
00407b4a              ebx -= 1;
00407b4d          } while (i != 1);
00407b4f          ebx = arg2;
00407afc      }
00407afc      
00407b5b      if ((ebx & 1) != 0)
00407b5e          operator delete[](edi);
00407b5e      
00407b6c      return edi;
00407ad0  }

00407b0d                                         8d 49 00                                                               .I.
00407b8c                                      cc cc cc cc                                                              ....

00407b90  void __thiscall PStringBase<unsigned short>::set(class PStringBase<unsigned short>* this, uint16_t const* arg2)

00407b90  {
00407ba2      if ((arg2 == 0 || *(uint16_t*)arg2 == 0))
00407ba2      {
00407c0c          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_charbuffer;
00407c11          int32_t eax_5 = -(&m_charbuffer_1->m_data[-0xa]);
00407c11          
00407c1d          if (((eax_5 - eax_5) & m_charbuffer_1) != PStringBase<unsigned short>::s_NullBuffer)
00407c1d          {
00407c32              if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
00407c3a                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00407c3a              
00407c3c              class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00407c45              this->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00407c4c              arg2 = (PStringBase<unsigned short>::s_NullBuffer_1 - 0x10);
00407c50              /* tailcall */
00407c50              return InterlockedIncrement();
00407c1d          }
00407ba2      }
00407ba2      else
00407ba2      {
00407ba5          int32_t eax = wcslen(arg2);
00407bad          class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
00407bad          
00407bbb          if ((*(int32_t*)((char*)m_charbuffer + -0x10) != 1 || *(int32_t*)((char*)m_charbuffer + -0xc) <= eax))
00407bbb          {
00407be2              if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00407bea                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00407bea              
00407bef              PStringBase<unsigned short>::allocate_ref_buffer(this, eax);
00407bbb          }
00407bbb          else
00407bbb          {
00407bbd              *(uint32_t*)((char*)m_charbuffer - 8) = 0xffffffff;
00407bc9              *(uint32_t*)(this->m_charbuffer - 4) = (eax + 1);
00407bbb          }
00407bbb          
00407bfd          wcsncpy(this->m_charbuffer, arg2, (eax + 1));
00407ba2      }
00407b90  }

00407c56                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00407c60  uint8_t __thiscall SmartArray<PFileNode *,1>::grow(class SmartArray<PFileNode *,1>* this, uint32_t arg2)

00407c60  {
00407c6b      if (arg2 < this->m_num)
00407c6b      {
00407cf8          int32_t eax;
00407cf8          eax = 0;
00407cfb          return 0;
00407c6b      }
00407c6b      
00407c7b      if (arg2 > (this->m_sizeAndDeallocate & 0x7fffffff))
00407c7b      {
00407c7f          if (arg2 != 0)
00407c7f          {
00407c9b              void* ebx = operator new[]((arg2 << 2));
00407ca2              void* eax_3;
00407ca2              
00407ca2              if (ebx == 0)
00407ca2              {
00407cf1                  eax_3 = 0;
00407cf4                  return 0;
00407ca2              }
00407ca2              
00407ca7              if (this->m_data != 0)
00407ca7              {
00407ca9                  uint32_t m_num = this->m_num;
00407cac                  eax_3 = (m_num - 1);
00407cac                  
00407caf                  if ((m_num - 1) >= 0)
00407caf                  {
00407cbe                      void* temp2_1;
00407cbe                      
00407cbe                      do
00407cbe                      {
00407cb1                          temp2_1 = eax_3;
00407cb1                          eax_3 -= 1;
00407cba                          *(uint32_t*)(((char*)ebx + (eax_3 << 2)) + 4) = this->m_data[((char*)eax_3 + 1)];
00407cbe                      } while (((char*)temp2_1 - 1) >= 0);
00407caf                  }
00407caf                  
00407ccf                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00407cd4                      operator delete[](this->m_data);
00407ca7              }
00407ca7              
00407cdc              this->m_data = ebx;
00407ce5              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00407ce9              eax_3 = 1;
00407cec              return 1;
00407c7f          }
00407c7f          
00407c81          SmartArray<PFileNode *,1>::Reset(this);
00407c7b      }
00407c7b      
00407c87      int32_t eax_2;
00407c87      eax_2 = 1;
00407c8a      return 1;
00407c60  }

00407cfe                                                                                            cc cc                                ..

00407d00  uint8_t __thiscall SmartArray<PStringBase<unsigned short>,1>::grow(class SmartArray<PStringBase<unsigned short>,1>* this, uint32_t arg2)

00407d00  {
00407d0b      if (arg2 < this->m_num)
00407d0b      {
00407dc2          int32_t eax;
00407dc2          eax = 0;
00407dc5          return 0;
00407d0b      }
00407d0b      
00407d1b      if (arg2 > (this->m_sizeAndDeallocate & 0x7fffffff))
00407d1b      {
00407d1f          if (arg2 != 0)
00407d1f          {
00407d36              uint32_t* eax_3 = operator new[](((arg2 << 2) + 4));
00407d36              
00407d40              if (eax_3 != 0)
00407d40              {
00407d48                  void* ebx_1 = &eax_3[1];
00407d4e                  *(uint32_t*)eax_3 = arg2;
00407d50                  `vector constructor iterator'(ebx_1, 4, arg2, PStringBase<unsigned short>::PStringBase<unsigned short>);
00407d50                  
00407d57                  if (ebx_1 != 0)
00407d57                  {
00407d5c                      if (this->m_data != 0)
00407d5c                      {
00407d5f                          uint32_t m_num = this->m_num;
00407d62                          int32_t edi_1 = (m_num - 1);
00407d62                          
00407d65                          if ((m_num - 1) >= 0)
00407d65                          {
00407d87                              int32_t temp2_1;
00407d87                              
00407d87                              do
00407d87                              {
00407d72                                  int32_t eax_4 = (edi_1 << 2);
00407d7f                                  PStringBase<unsigned short>::operator=((eax_4 + ebx_1), (this->m_data + eax_4));
00407d84                                  temp2_1 = edi_1;
00407d84                                  edi_1 -= 1;
00407d87                              } while ((temp2_1 - 1) >= 0);
00407d65                          }
00407d65                          
00407d97                          if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00407d97                          {
00407d99                              class PStringBase<unsigned short>* m_data = this->m_data;
00407d99                              
00407d9d                              if (m_data != 0)
00407da1                                  PStringBase<char>::`vector deleting destructor'(m_data, 3);
00407d97                          }
00407d5c                      }
00407d5c                      
00407da6                      this->m_data = ebx_1;
00407daf                      this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00407db3                      eax_3 = 1;
00407db6                      return 1;
00407d57                  }
00407d40              }
00407d40              
00407dbb              eax_3 = 0;
00407dbe              return 0;
00407d1f          }
00407d1f          
00407d21          SmartArray<PStringBase<unsigned short>,1>::Reset(this);
00407d1b      }
00407d1b      
00407d27      int32_t eax_2;
00407d27      eax_2 = 1;
00407d2a      return 1;
00407d00  }

00407d69                             8d a4 24 00 00 00 00                                                           ..$....
00407dc8                          cc cc cc cc cc cc cc cc                                                          ........

00407dd0  uint8_t __thiscall SmartArray<PStringBase<unsigned short>,1>::SetNElements(class SmartArray<PStringBase<unsigned short>,1>* this, uint32_t const arg2, uint8_t arg3)

00407dd0  {
00407dd0      class SmartArray<PStringBase<unsigned short>,1>* this_1 = this;
00407dd2      class SmartArray<PStringBase<unsigned short>,1>* this_2 = this;
00407dd8      uint32_t const esi = arg2;
00407de3      class SmartArray<PStringBase<unsigned short>,1>* this_3 = this_2;
00407de7      int32_t eax_1;
00407de7      
00407de7      if ((this_2->m_sizeAndDeallocate & 0x7fffffff) >= esi)
00407de7      {
00407e15          arg3 = esi;
00407e15          
00407e19          if (esi < this_2->m_num)
00407e19          {
00407e98              bool cond:2_1;
00407e98              
00407e98              do
00407e98              {
00407e21                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00407e2b                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00407e31                  class PStringBase<unsigned short>* m_data = this_2->m_data;
00407e34                  int32_t edx_1 = arg3;
00407e38                  void* m_charbuffer = m_data[edx_1].m_charbuffer;
00407e38                  
00407e40                  if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer_1)
00407e40                  {
00407e55                      if ((InterlockedDecrement(((char*)m_charbuffer - 0x10)) == 0 && m_charbuffer != 0x14))
00407e5e                          **(uint32_t**)((char*)m_charbuffer - 0x14)(1);
00407e5e                      
00407e3d                      m_data[edx_1].m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00407e63                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00407e69                      this_2 = this_3;
00407e40                  }
00407e40                  
00407e80                  if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
00407e88                      *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
00407e88                  
00407e91                  cond:2_1 = (arg3 + 1) < this_2->m_num;
00407e94                  arg3 += 1;
00407e98              } while (cond:2_1);
00407e9a              esi = arg2;
00407e19          }
00407de7      }
00407de7      else
00407de7      {
00407dee          uint32_t const eax_2;
00407dee          
00407dee          if (arg3 == 0)
00407df7              eax_2 = SmartArray<PFileNode *,1>::get_new_size(this_2, esi);
00407dee          else
00407df0              eax_2 = esi;
00407df0          
00407dff          eax_1 = SmartArray<PStringBase<unsigned short>,1>::grow(this_2, eax_2);
00407dff          
00407e06          if (eax_1 == 0)
00407e0f              return eax_1;
00407de7      }
00407de7      
00407ea0      this_2->m_num = esi;
00407ea4      eax_1 = 1;
00407ea8      return 1;
00407dd0  }

00407eab                                   cc cc cc cc cc                                                             .....

00407eb0  void __fastcall PStringBase<char>::break_reference(class PStringBase<char>* this)

00407eb0  {
00407eb3      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00407eb3      
00407eb9      if (*(int32_t*)((char*)m_charbuffer + -0x10) == 1)
00407eb9      {
00407ebb          *(uint32_t*)((char*)m_charbuffer - 8) = 0xffffffff;
00407ec3          return;
00407eb9      }
00407eb9      
00407ed2      PStringBase<char>::allocate_ref_buffer(this, (m_charbuffer->m_data[-4] - 1));
00407ed7      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_charbuffer;
00407ed9      int32_t ecx_1 = m_charbuffer_1->m_data[-4];
00407ee4      int32_t esi_2;
00407ee4      int32_t edi;
00407ee4      edi = __builtin_memcpy(m_charbuffer_1, m_charbuffer, ((ecx_1 >> 2) << 2));
00407eef      __builtin_memcpy(edi, esi_2, (ecx_1 & 3));
00407eef      
00407efd      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00407f05          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00407eb0  }

00407f0b                                   cc cc cc cc cc                                                             .....

00407f10  void __fastcall SmartArray<CommandLineArg,1>::Reset(class SmartArray<CommandLineArg,1>* this)

00407f10  {
00407f16      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00407f2a      this->m_num = 0;
00407f2a      
00407f2d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00407f2d      {
00407f2f          struct CommandLineArg* m_data = this->m_data;
00407f2f          
00407f34          if (m_data != 0)
00407f38              CommandLineArg::`vector deleting destructor'(m_data, 3);
00407f38          
00407f3d          this->m_data = 0;
00407f40          this->m_sizeAndDeallocate = 0;
00407f48          return;
00407f2d      }
00407f2d      
00407f4c      if (this->m_data != 0)
00407f4c      {
00407f52          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00407f52          
00407f5a          if ((i_2 - 1) >= 0)
00407f5a          {
00407f73              int32_t edi_4 = ((i_2 - 1) * 0x1c);
00407f78              int32_t i_1 = i_2;
00407ffb              int32_t i;
00407ffb              
00407ffb              do
00407ffb              {
00407f80                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00407f8d                  int32_t var_1c = 0;
00407f91                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00407f93                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00407fa0                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00407fac                  CommandLineArg::operator=((this->m_data + edi_4), &var_1c);
00407fac                  
00407fc8                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
00407fd0                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
00407fd0                  
00407fe9                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00407ff1                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
00407ff1                  
00407ff3                  edi_4 -= 0x1c;
00407ff6                  i = i_1;
00407ff6                  i_1 -= 1;
00407ffb              } while (i != 1);
00407f5a          }
00407f4c      }
00407f10  }

00408005                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00408010  uint8_t __thiscall SmartArray<PStringBase<char>,1>::grow(class SmartArray<PStringBase<char>,1>* this, uint32_t arg2)

00408010  {
0040801b      if (arg2 < this->m_num)
0040801b      {
004080d2          int32_t eax;
004080d2          eax = 0;
004080d5          return 0;
0040801b      }
0040801b      
0040802b      if (arg2 > (this->m_sizeAndDeallocate & 0x7fffffff))
0040802b      {
0040802f          if (arg2 != 0)
0040802f          {
00408046              uint32_t* eax_3 = operator new[](((arg2 << 2) + 4));
00408046              
00408050              if (eax_3 != 0)
00408050              {
00408058                  void* ebx_1 = &eax_3[1];
0040805e                  *(uint32_t*)eax_3 = arg2;
00408060                  `vector constructor iterator'(ebx_1, 4, arg2, PStringBase<char>::PStringBase<char>);
00408060                  
00408067                  if (ebx_1 != 0)
00408067                  {
0040806c                      if (this->m_data != 0)
0040806c                      {
0040806f                          uint32_t m_num = this->m_num;
00408072                          int32_t edi_1 = (m_num - 1);
00408072                          
00408075                          if ((m_num - 1) >= 0)
00408075                          {
00408097                              int32_t temp2_1;
00408097                              
00408097                              do
00408097                              {
00408082                                  int32_t eax_4 = (edi_1 << 2);
0040808f                                  PStringBase<unsigned short>::operator=((eax_4 + ebx_1), (this->m_data + eax_4));
00408094                                  temp2_1 = edi_1;
00408094                                  edi_1 -= 1;
00408097                              } while ((temp2_1 - 1) >= 0);
00408075                          }
00408075                          
004080a7                          if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004080a7                          {
004080a9                              class PStringBase<char>* m_data = this->m_data;
004080a9                              
004080ad                              if (m_data != 0)
004080b1                                  PStringBase<char>::`vector deleting destructor'(m_data, 3);
004080a7                          }
0040806c                      }
0040806c                      
004080b6                      this->m_data = ebx_1;
004080bf                      this->m_sizeAndDeallocate = (arg2 | 0x80000000);
004080c3                      eax_3 = 1;
004080c6                      return 1;
00408067                  }
00408050              }
00408050              
004080cb              eax_3 = 0;
004080ce              return 0;
0040802f          }
0040802f          
00408031          SmartArray<PStringBase<char>,1>::Reset(this);
0040802b      }
0040802b      
00408037      int32_t eax_2;
00408037      eax_2 = 1;
0040803a      return 1;
00408010  }

00408079                                                                             8d a4 24 00 00 00 00                           ..$....
004080d8                                                                          cc cc cc cc cc cc cc cc                          ........

004080e0  void __fastcall PStringBase<unsigned short>::break_reference(class PStringBase<unsigned short>* this)

004080e0  {
004080e3      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
004080e3      
004080e9      if (*(int32_t*)((char*)m_charbuffer + -0x10) == 1)
004080e9      {
004080eb          *(uint32_t*)((char*)m_charbuffer - 8) = 0xffffffff;
004080f3          return;
004080e9      }
004080e9      
00408102      PStringBase<unsigned short>::allocate_ref_buffer(this, (m_charbuffer->m_data[0x7ffffffffffffffe] - 1));
00408107      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_charbuffer;
0040810c      int32_t ecx_2 = (m_charbuffer_1->m_data[0x7ffffffffffffffe] * 2);
00408116      int32_t esi_2;
00408116      int32_t edi;
00408116      edi = __builtin_memcpy(m_charbuffer_1, m_charbuffer, ((ecx_2 >> 2) << 2));
00408121      __builtin_memcpy(edi, esi_2, (ecx_2 & 3));
00408121      
0040812f      if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00408137          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004080e0  }

0040813d                                                                                         cc cc cc                               ...

00408140  uint8_t __stdcall ArgumentParser::EvaluateCommandLineArg(class ArgumentParser* this @ ecx, struct CommandLineArg const* arg2, class PStringBase<char> const* arg3)

00408140  {
00408153      int32_t ebx;
00408153      ebx = 1;
00408163      struct CommandLineArg* VariableToModify;
00408163      
00408163      switch ((((uint32_t)((int8_t)arg2->ArgType)) - 0x11))
00408163      {
0040816a          case nullptr:
0040816a          {
0040816a              uint32_t* VariableToModify_1 = arg2->VariableToModify;
0040816a              
0040816f              if (VariableToModify_1 != 0)
0040816f              {
00408179                  VariableToModify = 1;
0040817b                  *(uint32_t*)VariableToModify_1 = arg2->ValueToStore;
0040817e                  return 1;
0040816f              }
0040816a              break;
0040816a          }
0040819c          case 0x11:
0040819c          {
0040819c              void* VariableToModify_3 = arg2->VariableToModify;
0040819c              
004081a1              if (VariableToModify_3 != 0)
004081a1              {
004081bb                  *(uint32_t*)VariableToModify_3 = strtol(arg3->m_charbuffer, 0, 0);
004081be                  int32_t eax;
004081be                  eax = 1;
004081c1                  return 1;
004081a1              }
0040819c              break;
0040819c          }
004081c4          case 0x21:
004081c4          {
004081c4              void* VariableToModify_4 = arg2->VariableToModify;
004081c4              
004081c9              if (VariableToModify_4 != 0)
004081c9              {
004081d3                  class PSRefBufferCharData<char>* m_charbuffer = arg3->m_charbuffer;
004081d5                  arg3 = m_charbuffer;
004081dd                  InterlockedIncrement(&m_charbuffer[-1]);
004081ea                  PStringBase<unsigned short>::operator=(VariableToModify_4, &arg3);
004081f3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
004081f9                  int32_t eax_3;
004081f9                  eax_3 = 1;
004081fc                  return 1;
004081c9              }
004081c4              break;
004081c4          }
004081ff          case 0x31:
004081ff          {
004081ff              VariableToModify = arg2->VariableToModify;
004081ff              
00408204              if ((VariableToModify != 0 && sscanf(arg3->m_charbuffer, &data_794350, VariableToModify) != 1))
00408204              {
0040822c                  VariableToModify = 0;
0040822f                  return 0;
00408204              }
004081ff              break;
004081ff          }
00408232          case 0x41:
00408232          {
00408232              VariableToModify = arg2->VariableToModify;
00408232              
00408237              if ((VariableToModify != 0 && sscanf(arg3->m_charbuffer, &data_79434c, VariableToModify) != 1))
00408237              {
0040825b                  VariableToModify = 0;
0040825e                  return 0;
00408237              }
00408232              break;
00408232          }
00408261          case 0x51:
00408261          {
00408261              VariableToModify = arg2->VariableToModify;
00408261              
00408266              if ((VariableToModify != 0 && sscanf(arg3->m_charbuffer, &data_794348, VariableToModify) != 1))
00408266              {
00408286                  VariableToModify = 0;
00408289                  return 0;
00408266              }
00408261              break;
00408261          }
00408181          case 0x60:
00408181          {
00408181              char* VariableToModify_2 = arg2->VariableToModify;
00408181              
00408186              if (VariableToModify_2 != 0)
00408186              {
00408191                  VariableToModify = arg2->ValueToStore != 0;
00408194                  *(uint8_t*)VariableToModify_2 = VariableToModify;
00408196                  VariableToModify = 1;
00408199                  return 1;
00408186              }
00408181              break;
00408181          }
0040828c          case 0x71:
0040828c          {
0040828c              void* VariableToModify_5 = arg2->VariableToModify;
0040828c              
00408291              if (VariableToModify_5 != 0)
00408291              {
004082b0                  if (sscanf(arg3->m_charbuffer, &data_794344, &arg3) != 1)
004082b2                      ebx = 0;
004082b2                  
004082bc                  *(uint8_t*)VariableToModify_5 = arg3 != 0;
00408291              }
0040828c              break;
0040828c          }
00408163      }
00408163      
004082bf      VariableToModify = ebx;
004082c2      return VariableToModify;
00408140  }

004082c5                 8d 49 00                                                                               .I.
004082c8  uint32_t jump_table_4082c8[0x9] = 
004082c8  {
004082c8      [0x0] =  0x0040816a
004082cc      [0x1] =  0x0040819c
004082d0      [0x2] =  0x004081c4
004082d4      [0x3] =  0x004081ff
004082d8      [0x4] =  0x00408232
004082dc      [0x5] =  0x00408261
004082e0      [0x6] =  0x00408181
004082e4      [0x7] =  0x0040828c
004082e8      [0x8] =  0x004082be
004082ec  }
004082ec  uint8_t lookup_table_4082ec[0x72] = 
004082ec  {
004082ec      [0x00] =  0x00
004082ed      [0x01] =  0x08
004082ee      [0x02] =  0x08
004082ef      [0x03] =  0x08
004082f0      [0x04] =  0x08
004082f1      [0x05] =  0x08
004082f2      [0x06] =  0x08
004082f3      [0x07] =  0x08
004082f4      [0x08] =  0x08
004082f5      [0x09] =  0x08
004082f6      [0x0a] =  0x08
004082f7      [0x0b] =  0x08
004082f8      [0x0c] =  0x08
004082f9      [0x0d] =  0x08
004082fa      [0x0e] =  0x08
004082fb      [0x0f] =  0x08
004082fc      [0x10] =  0x08
004082fd      [0x11] =  0x01
004082fe      [0x12] =  0x08
004082ff      [0x13] =  0x08
00408300      [0x14] =  0x08
00408301      [0x15] =  0x08
00408302      [0x16] =  0x08
00408303      [0x17] =  0x08
00408304      [0x18] =  0x08
00408305      [0x19] =  0x08
00408306      [0x1a] =  0x08
00408307      [0x1b] =  0x08
00408308      [0x1c] =  0x08
00408309      [0x1d] =  0x08
0040830a      [0x1e] =  0x08
0040830b      [0x1f] =  0x08
0040830c      [0x20] =  0x08
0040830d      [0x21] =  0x02
0040830e      [0x22] =  0x08
0040830f      [0x23] =  0x08
00408310      [0x24] =  0x08
00408311      [0x25] =  0x08
00408312      [0x26] =  0x08
00408313      [0x27] =  0x08
00408314      [0x28] =  0x08
00408315      [0x29] =  0x08
00408316      [0x2a] =  0x08
00408317      [0x2b] =  0x08
00408318      [0x2c] =  0x08
00408319      [0x2d] =  0x08
0040831a      [0x2e] =  0x08
0040831b      [0x2f] =  0x08
0040831c      [0x30] =  0x08
0040831d      [0x31] =  0x03
0040831e      [0x32] =  0x08
0040831f      [0x33] =  0x08
00408320      [0x34] =  0x08
00408321      [0x35] =  0x08
00408322      [0x36] =  0x08
00408323      [0x37] =  0x08
00408324      [0x38] =  0x08
00408325      [0x39] =  0x08
00408326      [0x3a] =  0x08
00408327      [0x3b] =  0x08
00408328      [0x3c] =  0x08
00408329      [0x3d] =  0x08
0040832a      [0x3e] =  0x08
0040832b      [0x3f] =  0x08
0040832c      [0x40] =  0x08
0040832d      [0x41] =  0x04
0040832e      [0x42] =  0x08
0040832f      [0x43] =  0x08
00408330      [0x44] =  0x08
00408331      [0x45] =  0x08
00408332      [0x46] =  0x08
00408333      [0x47] =  0x08
00408334      [0x48] =  0x08
00408335      [0x49] =  0x08
00408336      [0x4a] =  0x08
00408337      [0x4b] =  0x08
00408338      [0x4c] =  0x08
00408339      [0x4d] =  0x08
0040833a      [0x4e] =  0x08
0040833b      [0x4f] =  0x08
0040833c      [0x50] =  0x08
0040833d      [0x51] =  0x05
0040833e      [0x52] =  0x08
0040833f      [0x53] =  0x08
00408340      [0x54] =  0x08
00408341      [0x55] =  0x08
00408342      [0x56] =  0x08
00408343      [0x57] =  0x08
00408344      [0x58] =  0x08
00408345      [0x59] =  0x08
00408346      [0x5a] =  0x08
00408347      [0x5b] =  0x08
00408348      [0x5c] =  0x08
00408349      [0x5d] =  0x08
0040834a      [0x5e] =  0x08
0040834b      [0x5f] =  0x08
0040834c      [0x60] =  0x06
0040834d      [0x61] =  0x08
0040834e      [0x62] =  0x08
0040834f      [0x63] =  0x08
00408350      [0x64] =  0x08
00408351      [0x65] =  0x08
00408352      [0x66] =  0x08
00408353      [0x67] =  0x08
00408354      [0x68] =  0x08
00408355      [0x69] =  0x08
00408356      [0x6a] =  0x08
00408357      [0x6b] =  0x08
00408358      [0x6c] =  0x08
00408359      [0x6d] =  0x08
0040835a      [0x6e] =  0x08
0040835b      [0x6f] =  0x08
0040835c      [0x70] =  0x08
0040835d      [0x71] =  0x07
0040835e  }

0040835e                                                                                            cc cc                                ..

00408360  class IntrusiveHashIterator<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::find_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1> const* this, class IntrusiveHashIterator<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* __return, class CaseInsensitiveStringBase<PStringBase<unsigned short> > const* arg3)

00408360  {
00408375      uint32_t temp1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<unsigned short> >::case_insensitive_hash(arg3)) % this->m_numBuckets);
00408377      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_buckets = this->m_buckets;
00408386      int32_t* i;
00408386      
00408386      for (i = m_buckets[temp1]; i != 0; i = i[1])
00408386      {
0040839d          if (_wcsicmp(*(uint32_t*)i, arg3->m_charbuffer) == 0)
0040839d              break;
00408386      }
00408386      
004083ab      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>** result = __return;
004083b0      result[2] = i;
004083b4      *(uint32_t*)result = this;
004083b6      result[1] = &m_buckets[temp1];
004083ba      return result;
00408360  }

004083bd                                                                                         cc cc cc                               ...

004083c0  void PStringBase<char>::PStringBase<char>(class PStringBase<char>* this, enum _Formatted arg2, char const* arg3)

004083c0  {
004083cc      int32_t eax = _vscprintf(arg3, &arg_10);
004083de      PStringBase<char>::allocate_ref_buffer(this, eax);
004083f4      _vsnprintf(this->m_charbuffer, (eax + 1), arg3, &arg_10);
004083c0  }

00408402        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

00408410  class PStringBase<unsigned short>* __convention("regparm") PStringBase<unsigned short>::operator+(class PStringBase<unsigned short> const* this @ ecx, class PStringBase<unsigned short>* __return, class PStringBase<unsigned short> const* arg3)

00408410  {
00408410      class PStringBase<unsigned short>* var_4 = this;
00408411      int32_t esi;
00408411      int32_t var_8 = esi;
00408412      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00408418      int32_t edi;
00408418      int32_t var_c = edi;
0040841f      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00408423      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00408423      
0040843c      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
00408444          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
00408444      
00408448      int32_t ebx;
00408448      int32_t var_10_2 = ebx;
00408459      int32_t ebp;
00408459      int32_t var_14 = ebp;
0040845f      PStringBase<unsigned short>::allocate_ref_buffer(&var_4, ((arg3->m_charbuffer->m_data[0x7ffffffffffffffe] + this->m_charbuffer->m_data[0x7ffffffffffffffe]) - 2));
00408466      class PStringBase<unsigned short>* esi_2 = var_4;
00408472      wcscpy(esi_2, this->m_charbuffer);
00408481      wcscpy((((char*)esi_2 + (this->m_charbuffer->m_data[0x7ffffffffffffffe] << 1)) - 2), arg3->m_charbuffer);
0040848d      arg3 = &esi_2[-4];
0040848e      *(uint32_t*)result = esi_2;
00408490      InterlockedIncrement();
0040849c      arg3 = &esi_2[-4];
0040849c      
004084ab      if ((InterlockedDecrement() == 0 && esi_2 != 0x14))
004084ab      {
004084af          arg_10 = 1;
004084b3          *(uint32_t*)*(int32_t*)((char*)esi_2 + -0x14)();
004084ab      }
004084ab      
004084ba      return result;
00408410  }

004084bd                                                                                         cc cc cc                               ...

004084c0  void __thiscall PStringBase<char>::SetAtIndex(class PStringBase<char>* this, uint32_t arg2, char const arg3)

004084c0  {
004084c8      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
004084ca      int32_t ecx = m_charbuffer->m_data[-4];
004084ca      
004084cf      if (arg2 < ecx)
004084cf      {
004084d1          m_charbuffer = m_charbuffer->m_data[arg2];
004084d1          
004084d8          if (m_charbuffer != arg3)
004084d8          {
004084e0              if (arg2 == (ecx - 1))
004084e0              {
004084eb                  PStringBase<char>::append_n_chars(this, &arg3, 1);
004084f3                  return;
004084e0              }
004084e0              
004084f8              PStringBase<char>::break_reference(this);
004084fd              this->m_charbuffer->m_data[arg2] = arg3;
004084fd              
0040850f              if ((arg3 == 0 && (ecx - 1) > arg2))
00408516                  *(uint32_t*)(this->m_charbuffer - 4) = (arg2 + 1);
004084d8          }
004084cf      }
004084c0  }

0040851f                                                                                               cc                                 .

00408520  class PStringBase<char>* __thiscall PStringBase<char>::operator+=(class PStringBase<char>* this, class PStringBase<char> const* arg2)

00408520  {
00408524      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
00408529      int32_t ecx = m_charbuffer->m_data[-4];
00408529      
0040852f      if (ecx != 1)
00408538          PStringBase<char>::append_n_chars(this, m_charbuffer, (ecx - 1));
00408538      
00408540      return this;
00408520  }

00408543           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

00408550  class PStringBase<unsigned short>* __thiscall PStringBase<unsigned short>::operator+=(class PStringBase<unsigned short>* this, class PStringBase<unsigned short> const* arg2)

00408550  {
00408554      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
00408559      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
00408559      
0040855f      if (ecx != 1)
00408568          PStringBase<unsigned short>::append_n_chars(this, m_charbuffer, (ecx - 1));
00408568      
00408570      return this;
00408550  }

00408573                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

00408580  uint8_t __thiscall SmartArray<CommandLineArg,1>::grow(class SmartArray<CommandLineArg,1>* this, uint32_t arg2)

00408580  {
00408581      uint32_t ebp = arg2;
00408581      
0040858b      if (ebp < this->m_num)
0040858b      {
0040865a          int32_t eax;
0040865a          eax = 0;
0040865d          return 0;
0040858b      }
0040858b      
0040859b      if (ebp > (this->m_sizeAndDeallocate & 0x7fffffff))
0040859b      {
0040859f          if (ebp != 0)
0040859f          {
004085bf              uint32_t* eax_3 = operator new[](((ebp * 0x1c) + 4));
004085bf              
004085c9              if (eax_3 != 0)
004085c9              {
004085d5                  void* ebx_1 = &eax_3[1];
004085db                  *(uint32_t*)eax_3 = ebp;
004085dd                  `vector constructor iterator'(ebx_1, 0x1c, ebp, CommandLineArg::CommandLineArg);
004085dd                  
004085e4                  if (ebx_1 != 0)
004085e4                  {
004085e9                      if (this->m_data != 0)
004085e9                      {
004085eb                          uint32_t m_num = this->m_num;
004085eb                          
004085f1                          if ((m_num - 1) >= 0)
004085f1                          {
004085ff                              void* esi_4 = ((m_num - 1) * 0x1c);
00408604                              arg2 = m_num;
0040861d                              uint32_t i;
0040861d                              
0040861d                              do
0040861d                              {
00408610                                  CommandLineArg::operator=(((char*)esi_4 + ebx_1), (this->m_data + esi_4));
00408615                                  esi_4 -= 0x1c;
00408618                                  i = arg2;
00408618                                  arg2 -= 1;
0040861d                              } while (i != 1);
004085f1                          }
004085f1                          
0040862f                          if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0040862f                          {
00408631                              struct CommandLineArg* m_data = this->m_data;
00408631                              
00408635                              if (m_data != 0)
00408639                                  CommandLineArg::`vector deleting destructor'(m_data, 3);
0040862f                          }
004085e9                      }
004085e9                      
0040863e                      this->m_data = ebx_1;
00408647                      this->m_sizeAndDeallocate = (ebp | 0x80000000);
0040864b                      eax_3 = 1;
0040864e                      return 1;
004085e4                  }
004085c9              }
004085c9              
00408653              eax_3 = 0;
00408656              return 0;
0040859f          }
0040859f          
004085a1          SmartArray<CommandLineArg,1>::Reset(this);
0040859b      }
0040859b      
004085a7      int32_t eax_2;
004085a7      eax_2 = 1;
004085aa      return 1;
00408580  }


00408660  uint8_t __thiscall SmartArray<PStringBase<char>,1>::SetNElements(class SmartArray<PStringBase<char>,1>* this, uint32_t const arg2, uint8_t arg3)

00408660  {
00408660      class SmartArray<PStringBase<char>,1>* this_1 = this;
00408662      class SmartArray<PStringBase<char>,1>* this_2 = this;
00408668      uint32_t const esi = arg2;
00408673      class SmartArray<PStringBase<char>,1>* this_3 = this_2;
00408677      int32_t eax_1;
00408677      
00408677      if ((this_2->m_sizeAndDeallocate & 0x7fffffff) >= esi)
00408677      {
004086a5          arg3 = esi;
004086a5          
004086a9          if (esi < this_2->m_num)
004086a9          {
00408728              bool cond:2_1;
00408728              
00408728              do
00408728              {
004086b1                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004086bb                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004086c1                  class PStringBase<char>* m_data = this_2->m_data;
004086c4                  int32_t edx_1 = arg3;
004086c8                  void* m_charbuffer = m_data[edx_1].m_charbuffer;
004086c8                  
004086d0                  if (m_charbuffer != PStringBase<char>::s_NullBuffer_1)
004086d0                  {
004086e5                      if ((InterlockedDecrement(((char*)m_charbuffer - 0x10)) == 0 && m_charbuffer != 0x14))
004086ee                          **(uint32_t**)((char*)m_charbuffer - 0x14)(1);
004086ee                      
004086cd                      m_data[edx_1].m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004086f3                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004086f9                      this_2 = this_3;
004086d0                  }
004086d0                  
00408710                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00408718                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
00408718                  
00408721                  cond:2_1 = (arg3 + 1) < this_2->m_num;
00408724                  arg3 += 1;
00408728              } while (cond:2_1);
0040872a              esi = arg2;
004086a9          }
00408677      }
00408677      else
00408677      {
0040867e          uint32_t const eax_2;
0040867e          
0040867e          if (arg3 == 0)
00408687              eax_2 = SmartArray<PFileNode *,1>::get_new_size(this_2, esi);
0040867e          else
00408680              eax_2 = esi;
00408680          
0040868f          eax_1 = SmartArray<PStringBase<char>,1>::grow(this_2, eax_2);
0040868f          
00408696          if (eax_1 == 0)
0040869f              return eax_1;
00408677      }
00408677      
00408730      this_2->m_num = esi;
00408734      eax_1 = 1;
00408738      return 1;
00408660  }

0040873b                                                                                   cc cc cc cc cc                             .....

00408740  void __thiscall PStringBase<unsigned short>::SetAtIndex(class PStringBase<unsigned short>* this, uint32_t arg2, uint16_t const arg3)

00408740  {
00408748      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
0040874a      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0040874a      
0040874f      if (arg2 < ecx)
0040874f      {
00408751          m_charbuffer = m_charbuffer->m_data[arg2];
00408751          
0040875a          if (m_charbuffer != arg3)
0040875a          {
00408762              if (arg2 == (ecx - 1))
00408762              {
0040876d                  PStringBase<unsigned short>::append_n_chars(this, &arg3, 1);
00408775                  return;
00408762              }
00408762              
0040877a              PStringBase<unsigned short>::break_reference(this);
0040877f              this->m_charbuffer->m_data[arg2] = arg3;
0040877f              
00408794              if ((arg3 == 0 && (ecx - 1) > arg2))
0040879b                  *(uint32_t*)(this->m_charbuffer - 4) = (arg2 + 1);
0040875a          }
0040874f      }
00408740  }

004087a4              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

004087b0  int32_t __thiscall ArgumentParser::AppendAndWordWrap(class ArgumentParser* this, char const* arg2, int32_t arg3, int32_t arg4, enum ArgumentParser::OutputTextType arg5)

004087b0  {
004087be      int32_t eax_1 = this->vtable->GetCharactersToWrapUsageTo(this);
004087c3      int32_t var_110 = eax_1;
004087c3      
004087c7      if (eax_1 < 0)
004087c9          var_110 = 0x7fffffff;
004087c9      
004087d1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004087dd      class PSRefBufferCharData<char>* result = PStringBase<char>::s_NullBuffer_1;
004087e4      void* ebx_1 = &arg2[0xffffffff];
004087e8      char* ebp = nullptr;
004087ea      char var_119 = 0;
004087ef      void* var_108 = ebx_1;
004087f3      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00408804      char var_114 = 0xa;
00408809      PStringBase<char>::append_n_chars(&result, &var_114, 1);
00408817      class PSRefBufferCharData<char>* result_1 = result;
00408817      
0040881b      if (arg3 > 0)
0040881b      {
00408821          int32_t i_1 = arg3;
004088c1          int32_t i;
004088c1          
004088c1          do
004088c1          {
00408830              var_114 = 0x20;
00408835              int32_t eax_4 = result_1->m_data[-4];
00408835              
00408848              if ((*(int32_t*)((char*)result_1 + -0x10) != 1 || (eax_4 + 1) > *(int32_t*)((char*)result_1 + -0xc)))
00408848              {
0040885e                  void* __offset(PSRefBufferCharData<char>, -0x14) ebx_2 = &result_1->m_data[0xffffffec];
00408861                  PStringBase<char>::allocate_ref_buffer(&result, eax_4);
00408866                  result_1 = result;
0040886a                  class PSRefBufferCharData<char>* eax_7 = ((char*)ebx_2 + 0x14);
0040886f                  void* edx_2 = ((char*)result_1 - eax_7);
0040887b                  char j;
0040887b                  
0040887b                  do
0040887b                  {
00408871                      j = eax_7->m_data[0];
00408873                      *(uint8_t*)((char*)edx_2 + eax_7) = j;
00408876                      eax_7 = &eax_7->m_data[1];
0040887b                  } while (j != 0);
0040887b                  
0040888d                  if ((InterlockedDecrement(((char*)ebx_2 + 4)) == 0 && ebx_2 != 0))
00408895                      *(uint32_t*)*(int32_t*)((char*)ADJ(ebx_2) + -0x14)(1);
00408895                  
00408897                  ebx_1 = var_108;
00408848              }
00408848              else
00408848              {
0040884a                  *(uint32_t*)((char*)result_1 - 4) = (eax_4 + 1);
0040884d                  *(uint32_t*)((char*)result_1 - 8) = 0xffffffff;
00408848              }
00408848              
004088ab              strncpy(&result_1->m_data[(eax_4 - 1)], &var_114, 1);
004088b7              i = i_1;
004088b7              i_1 -= 1;
004088bc              result_1->m_data[(result_1->m_data[-4] - 1)] = 0;
004088c1          } while (i != 1);
0040881b      }
0040881b      
004088ce      result = arg4;
004088ce      
004089bf      do
004089bf      {
004088d2          int32_t eax_3;
004088d2          eax_3 = *(uint8_t*)((char*)ebx_1 + 1);
004088d5          ebx_1 += 1;
004088da          int32_t edx_5;
004088da          
004088da          if (eax_3 == 0)
004088da          {
0040890d          label_40890d:
0040890d              char var_100;
0040890d              
0040890d              if (var_119 != 0)
0040890d              {
0040891b                  if ((((char*)result - ebp) + ebx_1) >= var_110)
0040891b                  {
0040891d                      this->vtable->AppendOutputText(this, result_1, ottNormal);
0040892e                      result = arg3;
0040891b                  }
0040891b                  
00408934                  if (ebp < ebx_1)
00408934                  {
0040893a                      result += ((char*)ebx_1 - ebp);
0040893a                      
00408965                      do
00408965                      {
00408940                          edx_5 = *(uint8_t*)ebp;
0040894a                          struct ArgumentParser::VTable* vtable = this->vtable;
0040894c                          var_100 = edx_5;
00408958                          char var_ff_1 = 0;
0040895d                          eax_3 = vtable->AppendOutputText(this, &var_100, arg5);
00408960                          ebp = &ebp[1];
00408965                      } while (ebp < ebx_1);
00408934                  }
00408934                  
00408967                  var_119 = 0;
0040890d              }
0040890d              
0040896c              eax_3 = *(uint8_t*)ebx_1;
0040896c              
00408970              if (eax_3 != 0xa)
00408970              {
0040898b                  if (eax_3 == 0)
0040898b                      break;
0040898b                  
00408998                  if (result < (var_110 - 1))
00408998                  {
004089a6                      var_100 = eax_3;
004089af                      char var_ff_2 = 0;
004089b4                      eax_3 = this->vtable->AppendOutputText(this, &var_100, arg5);
004089b7                      result = &result->m_data[1];
00408998                  }
00408970              }
00408970              else
00408970              {
00408979                  eax_3 = this->vtable->AppendOutputText(this, result_1, ottNormal);
00408983                  result = arg3;
00408970              }
004088da          }
004088da          else
004088da          {
004088e5              eax_3 = strchr(&data_794354, ((int32_t)eax_3));
004088e5              
004088f0              if (eax_3 != 0)
004088f0                  goto label_40890d;
004088f0              
004088f6              if (var_119 == eax_3)
004088f6              {
004088fc                  var_119 = 1;
00408901                  ebp = ebx_1;
004088f6              }
004088da          }
004089bf      } while (*(uint8_t*)ebx_1 != 0);
004089bf      
004089d8      if ((InterlockedDecrement(&result_1[-1]) == 0 && result_1 != 0x14))
004089e0          *(uint32_t*)*(int32_t*)((char*)result_1 + -0x14)(1);
004089e0      
004089f0      return result;
004087b0  }

00408827                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
004089f3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

00408a00  uint8_t __thiscall ArgumentParser::IsCommandLineArgument(class ArgumentParser* this, class PStringBase<unsigned short>* arg2, uint8_t arg3)

00408a00  {
00408a01      class PStringBase<unsigned short>* ebx = arg2;
00408a05      class PSRefBufferCharData<unsigned short>* m_charbuffer = ebx->m_charbuffer;
00408a0a      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
00408a0f      void* m_charbuffer_2 = &m_charbuffer->m_data[(ecx - 1)];
00408a0f      
00408a13      if (ecx > 0)
00408a15          m_charbuffer_2 = m_charbuffer;
00408a15      
00408a1b      if (*(uint16_t*)m_charbuffer_2 == 0)
00408a1b      {
00408a1e          m_charbuffer = 0;
00408a21          return 0;
00408a1b      }
00408a1b      
00408a26      if (ecx <= 0)
00408a28          m_charbuffer = &m_charbuffer->m_data[(ecx - 1)];
00408a28      
00408a3b      int32_t eax_1 = strchr(this->m_CmdChars.m_charbuffer, ((uint32_t)m_charbuffer->m_data[0]));
00408a3b      
00408a42      if (eax_1 == 0)
00408a42      {
00408a4c          if (arg3 != eax_1)
00408a4c          {
00408ad4              eax_1 = 0;
00408ad7              return 0;
00408a4c          }
00408a4c          
00408a52          class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_CmdChars.m_charbuffer;
00408a52          
00408a59          if ((m_charbuffer_1->m_data[-4] != 1 && strchr(m_charbuffer_1, 0x20) == 0))
00408a59          {
00408ad4              eax_1 = 0;
00408ad7              return 0;
00408a59          }
00408a59          
00408a67          class PStringBase<unsigned short>* var_10_1 = ebx;
00408a6c          uint8_t* var_14_2 = &arg3;
00408a76          class PStringBase<unsigned short>* __return;
00408a76          class PStringBase<unsigned short>* edx;
00408a76          __return = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_794358);
00408a85          PStringBase<unsigned short>::operator=(ebx, PStringBase<unsigned short>::operator+(__return, __return, edx));
00408a94          int32_t* esi_2 = (arg3 - 0x14);
00408a94          
00408aa3          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00408aab              **(uint32_t**)esi_2(1);
00408aab          
00408ab1          void* __offset(PStringBase<unsigned short>, -0x14) esi_4 = &arg2[-5];
00408ab1          
00408ac0          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00408ac8              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00408a42      }
00408a42      
00408acc      eax_1 = 1;
00408acf      return 1;
00408a00  }

00408ada                                                                                cc cc cc cc cc cc                            ......

00408ae0  uint8_t __thiscall PStringBase<char>::allocate(class PStringBase<char>* this, uint32_t arg2)

00408ae0  {
00408ae3      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00408ae9      uint32_t ecx = arg2;
00408ae9      
00408af9      if ((*(int32_t*)((char*)m_charbuffer + -0x10) != 1 || m_charbuffer->m_data[-4] < (ecx + 1)))
00408af9      {
00408b5a          if (PStringBase<char>::allocate_ref_buffer(this, ecx) == 0)
00408b8a              return 0;
00408b8a          
00408b6c          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00408b74              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00408b74          
00408b79          *(uint32_t*)(this->m_charbuffer - 4) = 1;
00408b80          class PSRefBufferCharData<char>* eax_3;
00408b80          eax_3 = 1;
00408b83          return 1;
00408af9      }
00408af9      
00408afb      arg2 = 0;
00408b00      int32_t ecx_1 = m_charbuffer->m_data[-4];
00408b00      
00408b0a      if ((ecx_1 > 0 && m_charbuffer->m_data[0] != 0))
00408b0a      {
00408b13          if (ecx_1 == 1)
00408b13          {
00408b1c              PStringBase<char>::append_n_chars(this, &arg2, 1);
00408b22              int32_t eax;
00408b22              eax = 1;
00408b25              return 1;
00408b13          }
00408b13          
00408b28          PStringBase<char>::break_reference(this);
00408b2d          this->m_charbuffer->m_data[0] = arg2;
00408b2d          
00408b3e          if ((arg2 == 0 && (ecx_1 - 1) > 0))
00408b42              *(uint32_t*)(this->m_charbuffer - 4) = 1;
00408b0a      }
00408b0a      
00408b4a      m_charbuffer = 1;
00408b4d      return 1;
00408ae0  }

00408b8d                                         cc cc cc                                                               ...

00408b90  uint8_t __thiscall SmartArray<PStringBase<unsigned short>,1>::AddToEnd(class SmartArray<PStringBase<unsigned short>,1>* this, class PStringBase<unsigned short> const* arg2)

00408b90  {
00408b96      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00408b96      
00408b9e      if (this->m_num >= eax_1)
00408b9e      {
00408bac          uint8_t result = SmartArray<PStringBase<unsigned short>,1>::grow(this, SmartArray<PFileNode *,1>::get_new_size(this, (eax_1 + 1)));
00408bac          
00408bb3          if (result == 0)
00408bb6              return result;
00408b9e      }
00408b9e      
00408bc4      void* edi = &this->m_data[this->m_num];
00408bc7      int32_t eax_5 = *(uint32_t*)edi;
00408bc7      
00408bcc      if (eax_5 != arg2->m_charbuffer)
00408bcc      {
00408be2          if ((InterlockedDecrement((eax_5 - 0x10)) == 0 && eax_5 != 0x14))
00408bea              **(uint32_t**)(eax_5 - 0x14)(1);
00408bea          
00408bec          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
00408bef          *(uint32_t*)edi = m_charbuffer;
00408bf5          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00408bcc      }
00408bcc      
00408bfc      this->m_num += 1;
00408c02      eax_5 = 1;
00408c05      return 1;
00408b90  }

00408c08                          cc cc cc cc cc cc cc cc                                                          ........

00408c10  uint8_t __thiscall PStringBase<unsigned short>::allocate(class PStringBase<unsigned short>* this, uint32_t arg2)

00408c10  {
00408c13      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
00408c19      uint32_t ecx = arg2;
00408c19      
00408c29      if ((*(int32_t*)((char*)m_charbuffer + -0x10) != 1 || m_charbuffer->m_data[0x7ffffffffffffffe] < (ecx + 1)))
00408c29      {
00408c91          if (PStringBase<unsigned short>::allocate_ref_buffer(this, ecx) == 0)
00408cc1              return 0;
00408cc1          
00408ca3          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00408cab              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00408cab          
00408cb0          *(uint32_t*)(this->m_charbuffer - 4) = 1;
00408cb7          class PSRefBufferCharData<unsigned short>* eax_3;
00408cb7          eax_3 = 1;
00408cba          return 1;
00408c29      }
00408c29      
00408c2b      arg2 = 0;
00408c33      int32_t ecx_1 = m_charbuffer->m_data[0x7ffffffffffffffe];
00408c33      
00408c3e      if ((ecx_1 > 0 && m_charbuffer->m_data[0] != 0))
00408c3e      {
00408c47          if (ecx_1 == 1)
00408c47          {
00408c50              PStringBase<unsigned short>::append_n_chars(this, &arg2, 1);
00408c56              int32_t eax;
00408c56              eax = 1;
00408c59              return 1;
00408c47          }
00408c47          
00408c5c          PStringBase<unsigned short>::break_reference(this);
00408c61          this->m_charbuffer->m_data[0] = arg2;
00408c61          
00408c75          if ((arg2 == 0 && (ecx_1 - 1) > 0))
00408c79              *(uint32_t*)(this->m_charbuffer - 4) = 1;
00408c3e      }
00408c3e      
00408c81      m_charbuffer = 1;
00408c84      return 1;
00408c10  }

00408cc4              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

00408cd0  int32_t __thiscall ArgumentParser::CommandLineArgList::FindByShortCmd(class ArgumentParser::CommandLineArgList const* this, wchar16 arg2)

00408cd0  {
00408cd1      int32_t esi;
00408cd1      esi = arg2;
00408cd1      
00408cf0      for (int16_t* i = this->m_ShortNamesHash.m_intrusiveTable.m_buckets[(COMBINE(0, ((uint32_t)esi)) % this->m_ShortNamesHash.m_intrusiveTable.m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 4))
00408cf0      {
00408cf5          if (*(uint16_t*)i == esi)
00408cf5          {
00408d07              if (i != 0)
00408d0e                  return *(uint32_t*)((char*)i + 8);
00408d0e              
00408d07              break;
00408cf5          }
00408cf0      }
00408cf0      
00408d02      return 0xffffffff;
00408cd0  }

00408d11                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

00408d20  class PStringBase<char>* __thiscall PStringBase<unsigned short>::to_spstring(class PStringBase<unsigned short> const* this, class PStringBase<char>* __return, uint16_t const arg3)

00408d20  {
00408d2c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00408d3d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00408d41      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00408d43      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this->m_charbuffer;
00408d43      
00408d49      if (m_charbuffer_2->m_data[0x7ffffffffffffffe] == 1)
00408d49      {
00408d50          __return->m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00408d52          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00408d52          
00408d67          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
00408d6f              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
00408d6f          
00408d7a          return __return;
00408d49      }
00408d49      
00408d7d      uint32_t edi_1 = ((uint32_t)arg3);
00408d89      int32_t var_8 = 0;
00408d91      void* const ebp = &data_7943a4;
00408d96      int32_t* ebx_2 = &var_8;
00408d96      
00408d9a      if (edi_1 > 0xcec8)
00408d9a      {
00408dbb          if (edi_1 > 0xdeb3)
00408dbb          {
00408dd9              if ((edi_1 >= 0xfde8 && edi_1 <= 0xfde9))
00408dd9              {
00408ddb                  ebx_2 = nullptr;
00408ddd                  ebp = nullptr;
00408dd9              }
00408dbb          }
00408dbb          else if ((edi_1 >= 0xdeaa || edi_1 == 0xd698))
00408dc9          {
00408ddb              ebx_2 = nullptr;
00408ddd              ebp = nullptr;
00408dc9          }
00408d9a      }
00408d9a      else if (edi_1 == 0xcec8)
00408d9c      {
00408ddb          ebx_2 = nullptr;
00408ddd          ebp = nullptr;
00408d9c      }
00408d9c      else if ((edi_1 - 0xc42c) <= 9)
00408dc9          switch (edi_1)
00408dc9          {
00408ddb              case 0xc42c:
00408ddb              case 0xc42d:
00408ddb              case 0xc42e:
00408ddb              case 0xc431:
00408ddb              case 0xc433:
00408ddb              case 0xc435:
00408ddb              {
00408ddb                  ebx_2 = nullptr;
00408ddd                  ebp = nullptr;
00408ddb                  break;
00408ddb              }
00408dc9          }
00408dc9      
00408de2      int32_t* var_20_3 = ebx_2;
00408de3      void* const var_24 = ebp;
00408de4      int32_t var_28 = 0;
00408de6      int32_t var_2c = 0;
00408de8      int32_t var_30 = m_charbuffer_2->m_data[0x7ffffffffffffffe];
00408de9      class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = m_charbuffer_2;
00408dea      int32_t var_38 = 0;
00408dec      uint32_t var_3c = edi_1;
00408ded      uint32_t eax_7 = kernel32_WideCharToMultiByte_Ptr();
00408df7      class PStringBase<char>* __return_1;
00408df7      
00408df7      if (eax_7 != 0)
00408df7      {
00408e08          if (var_8 != 0)
00408e08              goto label_408e17;
00408e08          
00408f1a          PStringBase<char>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_3, eax_7);
00408f23          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_charbuffer;
00408f28          int32_t* var_20_12 = ebx_2;
00408f29          void* const var_24_3 = ebp;
00408f2a          uint32_t var_28_2 = eax_7;
00408f2b          class PStringBase<char> PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
00408f2f          class PStringBase<char> PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_5;
00408f30          int32_t var_30_1 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
00408f31          class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = m_charbuffer_1;
00408f32          int32_t var_38_1 = 0;
00408f34          uint32_t var_3c_1 = edi_1;
00408f35          int32_t eax_18 = kernel32_WideCharToMultiByte_Ptr();
00408f35          
00408f3d          if (eax_18 != 0)
00408f64              *(uint32_t*)(PStringBase<char>::s_NullBuffer_5 - 4) = eax_18;
00408f3d          else
00408f3d          {
00408f47              enum WIN32_ERROR var_20_13 = GetLastError();
00408f4a              enum WIN32_ERROR var_24_4 = GetLastError();
00408f4b              uint32_t var_28_3 = edi_1;
00408f56              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "Failed conversion to codepage %h…");
00408f5b              PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
00408f3d          }
00408f3d          
00408f67          __return_1 = __return;
00408f6f          __return_1->m_charbuffer = PStringBase<char>::s_NullBuffer_5;
00408f71          InterlockedIncrement((PStringBase<char>::s_NullBuffer_5 - 0x10));
00408f71          
00408f8a          if ((InterlockedDecrement((PStringBase<char>::s_NullBuffer_5 - 0x10)) == 0 && PStringBase<char>::s_NullBuffer_5 != 0x14))
00408f92              **(uint32_t**)(PStringBase<char>::s_NullBuffer_5 - 0x14)(1);
00408df7      }
00408df7      else
00408df7      {
00408df9          var_8 = 1;
00408e17      label_408e17:
00408e17          uint32_t ebp_2 = (this->m_charbuffer->m_data[0x7ffffffffffffffe] - 1);
00408e1f          PStringBase<char>::allocate(&PStringBase<char>::s_NullBuffer_3, ebp_2);
00408e1f          
00408e28          if (ebp_2 > 0)
00408e28          {
00408e2e              int32_t edi_2 = 0;
00408e2e              
00408eca              do
00408eca              {
00408e34                  class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
00408e36                  int32_t ecx_3 = m_charbuffer->m_data[0x7ffffffffffffffe];
00408e3b                  void* eax_9;
00408e3b                  
00408e3b                  if (edi_2 < ecx_3)
00408e43                      eax_9 = &m_charbuffer->m_data[edi_2];
00408e3b                  else
00408e3d                      eax_9 = &m_charbuffer->m_data[(ecx_3 - 1)];
00408e3d                  
00408e46                  ebx_2 = *(uint16_t*)eax_9;
00408e46                  
00408e4d                  if (ebx_2 <= 0x7f)
00408e4d                  {
00408ebc                      arg3 = ebx_2;
00408ec0                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_3, &arg3, 1);
00408e4d                  }
00408e4d                  else
00408e4d                  {
00408e4f                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00408e54                      arg3 = PStringBase<char>::s_NullBuffer_1;
00408e5c                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00408e65                      uint32_t var_20_6 = ((uint32_t)ebx_2);
00408e70                      PStringBase<char>::sprintf(&arg3, "<%04x>");
00408e75                      char* esi_2 = arg3;
00408e79                      int32_t eax_11 = *(uint32_t*)(esi_2 - 4);
00408e79                      
00408e82                      if (eax_11 != 1)
00408e8d                          PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_3, esi_2, (eax_11 - 1));
00408e8d                      
00408ea5                      if ((InterlockedDecrement(&esi_2[0xfffffff0]) == 0 && esi_2 != 0x14))
00408ead                          **(uint32_t**)(esi_2 - 0x14)(1);
00408e4d                  }
00408e4d                  
00408ec5                  edi_2 += 1;
00408eca              } while (edi_2 < ebp_2);
00408e28          }
00408e28          
00408ed0          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
00408ed4          __return_1 = __return;
00408edc          __return_1->m_charbuffer = PStringBase<char>::s_NullBuffer_4;
00408ede          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
00408ede          
00408efb          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
00408f07              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
00408df7      }
00408df7      
00408f9d      return __return_1;
00408d20  }

00408fa0  uint32_t jump_table_408fa0[0x2] = 
00408fa0  {
00408fa0      [0x0] =  0x00408ddb
00408fa4      [0x1] =  0x00408ddf
00408fa8  }
00408fa8  uint8_t lookup_table_408fa8[0xa] = 
00408fa8  {
00408fa8      [0x0] =  0x00
00408fa9      [0x1] =  0x00
00408faa      [0x2] =  0x00
00408fab      [0x3] =  0x01
00408fac      [0x4] =  0x01
00408fad      [0x5] =  0x00
00408fae      [0x6] =  0x01
00408faf      [0x7] =  0x00
00408fb0      [0x8] =  0x01
00408fb1      [0x9] =  0x00
00408fb2  }

00408fb2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

00408fc0  uint8_t __thiscall SmartArray<CommandLineArg,1>::AddToEnd(class SmartArray<CommandLineArg,1>* this, struct CommandLineArg const* arg2)

00408fc0  {
00408fc6      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00408fc6      
00408fce      if (this->m_num >= eax_1)
00408fce      {
00408fdc          uint8_t eax_4 = SmartArray<CommandLineArg,1>::grow(this, SmartArray<PFileNode *,1>::get_new_size(this, (eax_1 + 1)));
00408fdc          
00408fe3          if (eax_4 == 0)
00408fe6              return eax_4;
00408fce      }
00408fce      
00408fff      char eax_7 = CommandLineArg::operator=(&this->m_data[this->m_num], arg2);
00409009      this->m_num += 1;
0040900d      return eax_7;
00408fc0  }


00409010  int32_t __thiscall ArgumentParser::CommandLineArgList::FindByLongCmd(class ArgumentParser::CommandLineArgList const* this, class PStringBase<unsigned short> const* arg2)

00409010  {
00409019      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
00409022      int32_t result = 0xffffffff;
00409025      arg2 = m_charbuffer;
00409029      InterlockedIncrement(&m_charbuffer->m_data[-8]);
0040903c      void __return;
0040903c      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::find_internal(&this->m_LongNamesHash.m_intrusiveTable, &__return, &arg2);
00409047      void* var_4;
00409047      
00409047      if (var_4 != 0)
00409049          result = *(uint32_t*)((char*)var_4 + 8);
00409049      
0040905f      if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00409067          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00409067      
00409071      return result;
00409010  }

00409074                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

00409080  void __stdcall ArgumentParser::DisplayUsage(class ArgumentParser* this @ ecx, class ArgumentParser::CommandLineArgList const* arg2)

00409080  {
00409084      class ArgumentParser::CommandLineArgList* ebx = arg2;
0040908e      int32_t esi = 0;
00409090      class ArgumentParser* this_1 = this;
00409094      uint32_t m_num = ebx->m_num;
00409099      uint32_t m_num_8 = 0;
0040909d      int32_t var_18 = 0;
004090a1      int32_t var_14 = 0;
004090a5      SmartArray<PFileNode *,1>::grow(&m_num_8, m_num);
004090af      int32_t edi = var_14;
004090b3      arg2 = nullptr;
004090b3      
004090b7      if (ebx->m_num > 0)
004090b7      {
004090bd          int32_t var_28_1 = 0;
004090bd          
00409155          do
00409155          {
004090c7              int32_t edx_2 = (var_18 & 0x7fffffff);
004090cd              void* ebp_2 = (ebx->m_data + esi);
004090cd              
004090d1              if (edi < edx_2)
004090d1              {
00409132              label_409132:
00409132                  *(uint32_t*)(m_num_8 + (edi << 2)) = ebp_2;
00409135                  edi += 1;
00409138                  var_14 = edi;
004090d1              }
004090d1              else
004090d1              {
004090d3                  uint32_t m_num_6 = (edx_2 + 1);
004090d3                  
004090d9                  if (m_num_6 <= 8)
004090db                      m_num_6 = 8;
004090d9                  else if (m_num_6 <= 0x4000)
004090e8                  {
00409107                      int32_t eflags_1;
00409107                      char eax_5;
00409107                      eax_5 = __bsr_gprv_memv(m_num_6);
00409113                      int32_t esi_1 = (1 << eax_5);
00409113                      
00409117                      if (m_num_6 > esi_1)
00409119                          m_num_6 = (esi_1 * 2);
004090e8                  }
004090e8                  else
004090e8                  {
004090ec                      int32_t eax_3 = (m_num_6 & 0x3fff);
004090ec                      
004090f1                      if (eax_3 != 0)
004090fa                          m_num_6 += (0x4000 - eax_3);
004090e8                  }
004090e8                  
0040911c                  m_num = m_num_6;
00409128                  edi = var_14;
00409128                  
0040912c                  if (SmartArray<PFileNode *,1>::grow(&m_num_8, m_num) != 0)
0040912c                      goto label_409132;
004090d1              }
004090d1              
00409147              esi = (var_28_1 + 0x1c);
0040914d              arg2 = (&arg2->m_data + 1);
00409151              var_28_1 = esi;
00409155          } while ((&arg2->m_data + 1) < ebx->m_num);
00409155          
0040915b          esi = 0;
004090b7      }
004090b7      
0040915d      uint32_t m_num_7 = m_num_8;
00409161      m_num = SortCommandLineArgs;
0040916a      qsort(m_num_7, edi, 4, m_num);
0040916a      
00409175      if (edi > 0)
00409175      {
004091d1          do
004091d1          {
00409180              void* eax_9 = *(uint32_t*)(m_num_7 + (esi << 2));
00409183              uint32_t m_num_3;
00409183              m_num_3 = *(uint8_t*)((char*)eax_9 + 4);
00409186              uint32_t m_num_1 = *(uint32_t*)((char*)eax_9 + 0xc);
00409189              char var_10_1 = m_num_3;
0040918d              char var_f_1 = 0;
00409192              m_num = m_num_3;
00409195              m_num = m_num_1;
0040919b              uint32_t m_num_4 = InterlockedIncrement((m_num_1 - 0x10), m_num);
004091a0              uint32_t m_num_2 = *(uint32_t*)(*(uint32_t*)(m_num_7 + (esi << 2)) + 8);
004091a3              m_num = m_num_4;
004091a6              m_num = m_num_2;
004091ac              uint32_t m_num_5 = InterlockedIncrement((m_num_2 - 0x10), m_num);
004091b2              int32_t ebx_1 = *(uint32_t*)m_num_8;
004091b4              m_num = m_num_5;
004091bc              void var_8;
004091bc              PStringBase<char>::PStringBase<char>(&m_num, &var_8);
004091c5              *(uint32_t*)(ebx_1 + 0x2c)(m_num);
004091c8              m_num_7 = m_num_8;
004091cc              esi += 1;
004091d1          } while (esi < edi);
00409175      }
00409175      
004091e1      if ((var_18 & 0x80000000) == 0x80000000)
004091e1      {
004091e3          m_num = m_num_7;
004091e4          operator delete[](m_num);
004091e1      }
00409080  }

004091f6                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00409200  void __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* this, uint32_t arg2)

00409200  {
00409200      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* this_1 = this;
00409214      this->m_buckets = nullptr;
00409217      this->m_firstInterestingBucket = nullptr;
0040921a      this->m_numBuckets = 0;
0040921d      this->m_numElements = 0;
00409221      this->vtable = &IntrusiveHashTable<class CaseInsensitiveStringBase<class PStringBase<uint16_t> >,class HashTableData<class CaseInsensitiveStringBase<class PStringBase<uint16_t> >,long>*,1>::`vftable';
00409227      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00409232      this_1 = arg2;
0040923e      uint32_t* eax = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &this_1, 0, nullptr);
0040923e      
00409248      if (eax == bucketSizesEnd_1)
0040924a          eax -= 4;
0040924a      
0040924d      uint32_t eax_1 = *(uint32_t*)eax;
00409252      this->m_numBuckets = eax_1;
00409252      
00409255      if (eax_1 > 0x17)
0040926c          this->m_buckets = operator new[]((eax_1 * 4));
00409255      else
0040925a          this->m_buckets = &this->m_aInplaceBuckets;
0040925a      
00409272      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_buckets = this->m_buckets;
00409277      uint32_t ecx_4 = (this->m_numBuckets * 4);
0040927c      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0040928d      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
00409200  }

00409297                                                                       cc cc cc cc cc cc cc cc cc                         .........

004092a0  void __thiscall IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>(class IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>* this, uint32_t arg2)

004092a0  {
004092a0      class IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>* this_1 = this;
004092b4      this->m_buckets = nullptr;
004092b7      this->m_firstInterestingBucket = nullptr;
004092ba      this->m_numBuckets = 0;
004092bd      this->m_numElements = 0;
004092c1      this->vtable = &IntrusiveHashTable<uint16_t,class HashTableData<uint16_t,long>*,1>::`vftable';
004092c7      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004092d2      this_1 = arg2;
004092de      uint32_t* eax = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &this_1, 0, nullptr);
004092de      
004092e8      if (eax == bucketSizesEnd_1)
004092ea          eax -= 4;
004092ea      
004092ed      uint32_t eax_1 = *(uint32_t*)eax;
004092f2      this->m_numBuckets = eax_1;
004092f2      
004092f5      if (eax_1 > 0x17)
0040930c          this->m_buckets = operator new[]((eax_1 * 4));
004092f5      else
004092fa          this->m_buckets = &this->m_aInplaceBuckets;
004092fa      
00409312      class HashTableData<unsigned short,long>** m_buckets = this->m_buckets;
00409317      uint32_t ecx_4 = (this->m_numBuckets * 4);
0040931c      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0040932d      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
004092a0  }

00409337                                                                       cc cc cc cc cc cc cc cc cc                         .........

00409340  uint8_t __fastcall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::grow(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* this)

00409340  {
00409344      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00409361      uint32_t m_numBuckets = this->m_numBuckets;
0040936c      uint32_t* eax_2 = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, 0, nullptr);
0040936c      
00409376      if (eax_2 != bucketSizesEnd_1)
0040937f          eax_2 = &eax_2[1];
00409376      else
00409376      {
00409378          eax_2 -= 4;
00409378          
0040937d          if (eax_2 != bucketSizesEnd_1)
0040937f              eax_2 = &eax_2[1];
00409376      }
00409376      
00409391      return IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00409340  }

00409392                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

004093a0  uint8_t __fastcall IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::grow(class IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>* this)

004093a0  {
004093a4      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004093c1      uint32_t m_numBuckets = this->m_numBuckets;
004093cc      uint32_t* eax_2 = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, 0, nullptr);
004093cc      
004093d6      if (eax_2 != bucketSizesEnd_1)
004093df          eax_2 = &eax_2[1];
004093d6      else
004093d6      {
004093d8          eax_2 -= 4;
004093d8          
004093dd          if (eax_2 != bucketSizesEnd_1)
004093df              eax_2 = &eax_2[1];
004093d6      }
004093d6      
004093f1      return IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::resize_internal(this, *(uint32_t*)eax_2);
004093a0  }

004093f2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

00409400  uint8_t ConvertCommandLineToArgListTemplate<char>(char const* arg1, class SmartBuffer* arg2, class SmartArray<char *,1>* arg3)

00409400  {
00409407      if (arg1 == 0)
00409407      {
00409409          int32_t eax;
00409409          eax = 0;
0040940c          return 0;
00409407      }
00409407      
0040940d      char const* eax_1 = arg1;
00409419      char const i;
00409419      
00409419      do
00409419      {
00409412          i = *(uint8_t*)eax_1;
00409414          eax_1 = &eax_1[1];
00409419      } while (i != 0);
0040942c      SmartBuffer::ReconfigureAllocation(arg2, ((eax_1 - &eax_1[1]) + 1), 1);
00409438      class SmartBuffer* ecx_1;
00409438      ecx_1 = 0;
0040943a      char* ebp = SmartBuffer::GetBuffer(arg2);
0040943c      char** edx_1;
0040943c      edx_1 = 0;
0040943e      void* ebx = &arg1[0xffffffff];
00409445      arg1 = 0;
00409449      char* esi_1 = ebp;
00409451      uint8_t* eax_4;
00409451      
00409451      while (true)
00409451      {
00409451          eax_4 = *(uint8_t*)((char*)ebx + 1);
00409454          ebx += 1;
00409454          
00409461          if ((eax_4 == 0 || (eax_4 == 0x20 && edx_1 == 0)))
00409461          {
00409483              if (ecx_1 != 0)
00409483              {
00409485                  *(uint8_t*)esi_1 = 0;
0040948b                  eax_4 = (arg3->m_sizeAndDeallocate & 0x7fffffff);
00409490                  esi_1 = &esi_1[1];
00409490                  
00409496                  if (arg3->m_num < eax_4)
00409496                  {
004094b2                      arg3->m_data[arg3->m_num] = ebp;
004094b7                      arg3->m_num += 1;
00409496                  }
00409496                  else
00409496                  {
004094a6                      eax_4 = SmartArray<PFileNode *,1>::grow(arg3, SmartArray<PFileNode *,1>::get_new_size(arg3, &eax_4[1]));
004094a6                      
004094ad                      if (eax_4 != 0)
004094ad                      {
004094b2                          arg3->m_data[arg3->m_num] = ebp;
004094b7                          arg3->m_num += 1;
004094ad                      }
00409496                  }
00409496                  
004094bb                  ecx_1 = 0;
00409483              }
00409461          }
00409461          else if (eax_4 != 0x22)
00409465          {
00409474              if (ecx_1 == 0)
00409474              {
00409476                  ebp = esi_1;
00409478                  ecx_1 = 1;
00409474              }
00409474              
0040947a              *(uint8_t*)esi_1 = eax_4;
0040947c              esi_1 = &esi_1[1];
00409465          }
00409465          else
00409465          {
00409469              eax_4 = edx_1 == 0;
0040946c              arg1 = eax_4;
00409465          }
00409465          
004094c0          if (*(uint8_t*)ebx == 0)
004094c0              break;
004094c0          
0040944d          edx_1 = arg1;
00409451      }
00409451      
004094ca      eax_4 = arg1 == 0;
004094ce      return eax_4;
00409400  }

004094cf                                               cc                                                                 .

004094d0  uint8_t ConvertCommandLineToArgListTemplate<unsigned short>(uint16_t const* arg1, class SmartBuffer* arg2, class SmartArray<unsigned short *,1>* arg3)

004094d0  {
004094d7      if (arg1 == 0)
004094d7      {
004094d9          int32_t eax;
004094d9          eax = 0;
004094dc          return 0;
004094d7      }
004094d7      
004094f7      SmartBuffer::ReconfigureAllocation(arg2, ((wcslen(arg1) * 2) + 2), 1);
00409503      class SmartBuffer* ecx_1;
00409503      ecx_1 = 0;
00409505      int16_t* ebp = SmartBuffer::GetBuffer(arg2);
00409507      wchar16** edx;
00409507      edx = 0;
00409509      void* ebx = &arg1[-1];
00409510      arg1 = 0;
00409514      int16_t* edi_1 = ebp;
00409520      uint8_t* eax_3;
00409520      
00409520      while (true)
00409520      {
00409520          eax_3 = *(uint16_t*)((char*)ebx + 2);
00409524          ebx += 2;
00409524          
00409534          if ((eax_3 == 0 || (eax_3 == 0x20 && edx == 0)))
00409534          {
00409559              if (ecx_1 != 0)
00409559              {
0040955b                  *(uint16_t*)edi_1 = 0;
00409563                  eax_3 = (arg3->m_sizeAndDeallocate & 0x7fffffff);
00409568                  edi_1 = &edi_1[1];
00409568                  
0040956e                  if (arg3->m_num < eax_3)
0040956e                  {
0040958a                      arg3->m_data[arg3->m_num] = ebp;
0040958f                      arg3->m_num += 1;
0040956e                  }
0040956e                  else
0040956e                  {
0040957e                      eax_3 = SmartArray<PFileNode *,1>::grow(arg3, SmartArray<PFileNode *,1>::get_new_size(arg3, &eax_3[1]));
0040957e                      
00409585                      if (eax_3 != 0)
00409585                      {
0040958a                          arg3->m_data[arg3->m_num] = ebp;
0040958f                          arg3->m_num += 1;
00409585                      }
0040956e                  }
0040956e                  
00409593                  ecx_1 = 0;
00409559              }
00409534          }
00409534          else if (eax_3 != 0x22)
0040953a          {
00409549              if (ecx_1 == 0)
00409549              {
0040954b                  ebp = edi_1;
0040954d                  ecx_1 = 1;
00409549              }
00409549              
0040954f              *(uint16_t*)edi_1 = eax_3;
00409552              edi_1 = &edi_1[1];
0040953a          }
0040953a          else
0040953a          {
0040953e              eax_3 = edx == 0;
00409541              arg1 = eax_3;
0040953a          }
0040953a          
00409599          if (*(uint16_t*)ebx == 0)
00409599              break;
00409599          
00409518          edx = arg1;
00409520      }
00409520      
004095a7      eax_3 = arg1 == 0;
004095ab      return eax_3;
004094d0  }

004095ac                                      cc cc cc cc                                                              ....

004095b0  uint8_t __thiscall ArgumentParser::EvaluateCommandLineArg(class ArgumentParser* this, struct CommandLineArg const* arg2, class PStringBase<unsigned short> const* arg3)

004095b0  {
004095b3      struct CommandLineArg* edi = arg2;
004095b9      uint32_t eax_1 = ((uint32_t)((int8_t)edi->ArgType));
004095c3      struct ArgumentParser::VTable* ebx;
004095c3      ebx = 1;
004095ca      void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_10_3;
004095ca      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1;
004095ca      
004095ca      if ((eax_1 == 0x32 || eax_1 != 0x3a))
004095ca      {
00409612          char eax_5 = *(int32_t*)((char*)this->vtable + 0x3c)(edi, PStringBase<unsigned short>::to_spstring(arg3, &arg2, 0));
00409619          esi_1 = ((char*)arg2 - 0x14);
0040961f          ebx = eax_5;
00409621          var_10_3 = ((char*)esi_1 + 4);
00409622      label_409622:
00409622          
0040962e          if ((InterlockedDecrement(var_10_3) == 0 && esi_1 != 0))
00409636              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004095ca      }
004095ca      else
004095ca      {
004095cc          void* VariableToModify = edi->VariableToModify;
004095cc          
004095d1          if (VariableToModify != 0)
004095d1          {
004095d7              class PSRefBufferCharData<unsigned short>* m_charbuffer = arg3->m_charbuffer;
004095dd              arg3 = m_charbuffer;
004095e1              InterlockedIncrement(&m_charbuffer->m_data[-8]);
004095ee              PStringBase<unsigned short>::operator=(VariableToModify, &arg3);
004095f3              esi_1 = &m_charbuffer->m_data[-0xa];
004095f9              var_10_3 = ((char*)esi_1 + 4);
004095fa              goto label_409622;
004095d1          }
004095ca      }
0040963a      eax_1 = ebx;
0040963d      return eax_1;
004095b0  }


00409640  uint8_t ConvertCommandLineToArgList(char const* arg1, class SmartBuffer* arg2, class SmartArray<char *,1>* arg3)

00409640  {
00409640      /* tailcall */
00409640      return ConvertCommandLineToArgListTemplate<char>(arg1, arg2, arg3);
00409640  }

00409645                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00409650  uint8_t __thiscall ArgumentParser::ParseCommandLine(class ArgumentParser* this, char const* arg2, uint8_t arg3)

00409650  {
00409656      char const* edi = arg2;
00409656      
00409660      if (edi != 0)
00409660      {
0040966a          void var_c;
0040966a          SmartBuffer::SmartBuffer(&var_c);
0040967a          void* var_18 = nullptr;
0040967e          int32_t var_14_1 = 0;
00409682          int32_t var_10_1 = 0;
00409682          
00409690          if (ConvertCommandLineToArgListTemplate<char>(edi, &var_c, &var_18) != 0)
00409690          {
00409706              void* edi_1 = var_18;
00409711              uint8_t result = this->vtable->ParseArgs(this, edi_1, var_10_1, arg3);
00409711              
00409726              if ((var_14_1 & 0x80000000) == 0x80000000)
00409729                  operator delete[](edi_1);
00409729              
00409735              SmartBuffer::~SmartBuffer(&var_c);
00409742              return result;
00409690          }
00409690          
0040969b          PStringBase<char>::PStringBase<char>(&arg2, "Unmatched quote");
004096a0          this->vtable->SetErrorText(this, &arg2);
004096b0          void* esi_2 = &arg2[0xffffffec];
004096b0          
004096c3          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004096cb              **(uint32_t**)esi_2(1);
004096cb          
004096db          if ((var_14_1 & 0x80000000) == 0x80000000)
004096e2              operator delete[](var_18);
004096e2          
004096ee          SmartBuffer::~SmartBuffer(&var_c);
00409660      }
00409660      
004096f5      int32_t eax;
004096f5      eax = 0;
004096fb      return 0;
00409650  }

00409745                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00409750  uint8_t __thiscall ArgumentParser::ParseCommandLine(class ArgumentParser* this, wchar16 const* arg2, uint8_t arg3)

00409750  {
00409756      wchar16 const* edi = arg2;
00409756      
00409760      if (edi != 0)
00409760      {
0040976a          void var_c;
0040976a          SmartBuffer::SmartBuffer(&var_c);
0040977a          void* var_18 = nullptr;
0040977e          int32_t var_14_1 = 0;
00409782          int32_t var_10_1 = 0;
00409782          
00409790          if (ConvertCommandLineToArgListTemplate<unsigned short>(edi, &var_c, &var_18) != 0)
00409790          {
00409806              void* edi_1 = var_18;
00409811              char result = *(int32_t*)((char*)this->vtable + 0xc)(edi_1, var_10_1, arg3);
00409811              
00409826              if ((var_14_1 & 0x80000000) == 0x80000000)
00409829                  operator delete[](edi_1);
00409829              
00409835              SmartBuffer::~SmartBuffer(&var_c);
00409842              return result;
00409790          }
00409790          
0040979b          PStringBase<char>::PStringBase<char>(&arg2, "Unmatched quote");
004097a0          this->vtable->SetErrorText(this, &arg2);
004097b0          void* esi_2 = &arg2[-0xa];
004097b0          
004097c3          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004097cb              **(uint32_t**)esi_2(1);
004097cb          
004097db          if ((var_14_1 & 0x80000000) == 0x80000000)
004097e2              operator delete[](var_18);
004097e2          
004097ee          SmartBuffer::~SmartBuffer(&var_c);
00409760      }
00409760      
004097f5      int32_t eax;
004097f5      eax = 0;
004097fb      return 0;
00409750  }

00409845                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00409850  uint8_t __thiscall ArgumentParser::ParseArgs(class ArgumentParser* this, char** arg2, int32_t arg3, uint8_t arg4)

00409850  {
0040985c      int32_t edi = 0;
00409867      class PStringBase<char>* var_c = nullptr;
0040986b      int32_t var_8 = 0;
0040986f      int32_t var_4 = 0;
00409873      SmartArray<PStringBase<unsigned short>,1>::grow(&var_c, arg3);
0040987a      int32_t ebx;
0040987a      
0040987a      if (arg3 > 0)
0040987a      {
0040987c          ebx = arg2;
0040987c          
004098c4          do
004098c4          {
00409891              class PStringBase<unsigned short>* eax_2;
00409891              eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, *(uint32_t*)(ebx + (edi << 2)));
0040989b              SmartArray<PStringBase<unsigned short>,1>::AddToEnd(&var_c, eax_2);
004098a4              void* esi_2 = &arg2[-5];
004098a4              
004098b3              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004098bb                  **(uint32_t**)esi_2(1);
004098bb              
004098bd              edi += 1;
004098c4          } while (edi < arg3);
0040987a      }
0040987a      
004098de      ebx = *(int32_t*)((char*)this->vtable + 4)(&var_c, arg4);
004098de      
004098ee      if ((var_8 & 0x80000000) == 0x80000000)
004098ee      {
004098f0          class PStringBase<char>* ecx_7 = var_c;
004098f0          
004098f6          if (ecx_7 != 0)
004098fa              PStringBase<char>::`vector deleting destructor'(ecx_7, 3);
004098ee      }
004098ee      
00409901      void* eax_7;
00409901      eax_7 = ebx;
00409907      return eax_7;
00409850  }

0040990a                                cc cc cc cc cc cc                                                            ......

00409910  void __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::add_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* this, class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>* arg2)

00409910  {
00409920      if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
00409924          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::grow(this);
00409924      
0040993b      uint32_t temp1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<unsigned short> >::case_insensitive_hash(arg2)) % this->m_numBuckets);
0040993d      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_buckets = this->m_buckets;
00409943      arg2->m_hashNext = m_buckets[temp1];
00409946      m_buckets[temp1] = arg2;
0040994b      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** eax_3 = &m_buckets[temp1];
0040994b      
00409951      if (eax_3 < this->m_firstInterestingBucket)
00409953          this->m_firstInterestingBucket = eax_3;
00409953      
00409956      this->m_numElements += 1;
00409910  }

0040995e                                                                                            cc cc                                ..

00409960  uint8_t __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::resize_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* this, uint32_t arg2)

00409960  {
0040996a      if (arg2 == this->m_numBuckets)
0040996a      {
0040996c          uint32_t eax;
0040996c          eax = 0;
0040996f          return 0;
0040996a      }
0040996a      
00409977      class CaseInsensitiveStringBase<PStringBase<unsigned short> >* i_1 = nullptr;
00409977      
0040997c      if (this->m_numElements != 0)
0040997c      {
0040997e          i_1 = nullptr;
0040997e          
004099da          do
004099da          {
00409986              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0040998c              class CaseInsensitiveStringBase<PStringBase<unsigned short> >* i_2;
0040998c              class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_firstInterestingBucket_2;
0040998c              
0040998c              if (this->m_firstInterestingBucket == ecx_1)
0040998c              {
004099a1              label_4099a1:
004099a1                  m_firstInterestingBucket_2 = nullptr;
004099a3                  i_2 = nullptr;
0040998c              }
0040998c              else
0040998c              {
00409990                  while (true)
00409990                  {
00409990                      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00409990                      
00409995                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00409995                      {
004099a7                          class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004099aa                          i_2 = *(uint32_t*)m_firstInterestingBucket_1;
004099ac                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004099ac                          break;
00409995                      }
00409995                      
0040999c                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0040999c                      
0040999f                      if (&m_firstInterestingBucket[1] == ecx_1)
0040999f                          goto label_4099a1;
00409990                  }
0040998c              }
0040998c              
004099ae              class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
004099ae              
004099b2              if (m_hashNext == i_2)
004099c4                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
004099b2              else
004099b2              {
004099bb                  class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>* m_hashNext_1;
004099bb                  
004099bb                  do
004099bb                  {
004099b4                      m_hashNext_1 = m_hashNext;
004099b6                      m_hashNext = m_hashNext->m_hashNext;
004099bb                  } while (m_hashNext != i_2);
004099bb                  
004099bf                  if (m_hashNext_1 != 0)
004099cb                      m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
004099bf                  else
004099c4                      *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
004099b2              }
004099b2              
004099ce              this->m_numElements -= 1;
004099d2              *(int32_t*)((char*)i_2 + 4) = i_1;
004099d8              i_1 = i_2;
004099da          } while (this->m_numElements != 0);
0040997c      }
0040997c      
004099dc      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_buckets = this->m_buckets;
004099dc      
004099e4      if (m_buckets != &this->m_aInplaceBuckets)
004099e7          operator delete[](m_buckets);
004099e7      
004099f6      this->m_buckets = nullptr;
004099f9      this->m_firstInterestingBucket = nullptr;
004099fc      this->m_numBuckets = 0;
004099ff      this->m_numElements = 0;
00409a02      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::init(this, arg2);
00409a09      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** eax_4;
00409a09      
00409a09      if (i_1 != 0)
00409a09      {
00409a56          class CaseInsensitiveStringBase<PStringBase<unsigned short> >* i;
00409a56          
00409a56          do
00409a56          {
00409a16              i = *(int32_t*)((char*)i_1 + 4);
00409a16              
00409a20              if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
00409a24                  IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::grow(this);
00409a24              
00409a35              uint32_t temp1_1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<unsigned short> >::case_insensitive_hash(i_1)) % this->m_numBuckets);
00409a37              class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_buckets_1 = this->m_buckets;
00409a3d              *(int32_t*)((char*)i_1 + 4) = m_buckets_1[temp1_1];
00409a40              m_buckets_1[temp1_1] = i_1;
00409a43              eax_4 = &m_buckets_1[temp1_1];
00409a43              
00409a49              if (eax_4 < this->m_firstInterestingBucket)
00409a4b                  this->m_firstInterestingBucket = eax_4;
00409a4b              
00409a4e              this->m_numElements += 1;
00409a54              i_1 = i;
00409a56          } while (i != 0);
00409a09      }
00409a09      
00409a5b      eax_4 = 1;
00409a5e      return 1;
00409960  }

00409a0d                                         8d 49 00                                                               .I.
00409a61     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00409a70  uint8_t __thiscall IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::resize_internal(class IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>* this, uint32_t arg2)

00409a70  {
00409a7a      if (arg2 == this->m_numBuckets)
00409a7a      {
00409a7c          uint32_t eax;
00409a7c          eax = 0;
00409a7f          return 0;
00409a7a      }
00409a7a      
00409a84      int16_t* i_1 = nullptr;
00409a84      
00409a89      while (this->m_numElements != 0)
00409a89      {
00409a96          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00409a9c          int16_t* i_2;
00409a9c          class HashTableData<unsigned short,long>** m_firstInterestingBucket_2;
00409a9c          
00409a9c          if (this->m_firstInterestingBucket == ecx_1)
00409a9c          {
00409ab2          label_409ab2:
00409ab2              m_firstInterestingBucket_2 = nullptr;
00409ab4              i_2 = nullptr;
00409a9c          }
00409a9c          else
00409a9c          {
00409aa0              while (true)
00409aa0              {
00409aa0                  int32_t* m_firstInterestingBucket = this->m_firstInterestingBucket;
00409aa0                  
00409aa6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00409aa6                  {
00409ab8                      class HashTableData<unsigned short,long>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00409abb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
00409abd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00409abd                      break;
00409aa6                  }
00409aa6                  
00409aad                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00409aad                  
00409ab0                  if (&m_firstInterestingBucket[1] == ecx_1)
00409ab0                      goto label_409ab2;
00409aa0              }
00409a9c          }
00409a9c          
00409abf          class HashTableData<unsigned short,long>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
00409abf          
00409ac4          if (m_hashNext == i_2)
00409ad6              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00409ac4          else
00409ac4          {
00409acd              class HashTableData<unsigned short,long>* m_hashNext_1;
00409acd              
00409acd              do
00409acd              {
00409ac6                  m_hashNext_1 = m_hashNext;
00409ac8                  m_hashNext = m_hashNext->m_hashNext;
00409acd              } while (m_hashNext != i_2);
00409acd              
00409ad1              if (m_hashNext_1 != 0)
00409ade                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
00409ad1              else
00409ad6                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00409ac4          }
00409ac4          
00409ae1          this->m_numElements -= 1;
00409ae5          *(uint32_t*)((char*)i_2 + 4) = i_1;
00409aec          i_1 = i_2;
00409a89      }
00409a89      
00409af0      class HashTableData<unsigned short,long>** m_buckets = this->m_buckets;
00409af0      
00409af8      if (m_buckets != &this->m_aInplaceBuckets)
00409afb          operator delete[](m_buckets);
00409afb      
00409b0c      this->m_buckets = nullptr;
00409b0f      this->m_firstInterestingBucket = nullptr;
00409b12      this->m_numBuckets = 0;
00409b15      this->m_numElements = 0;
00409b18      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::init(this, arg2);
00409b1f      void* eax_4;
00409b1f      
00409b1f      if (i_1 != 0)
00409b1f      {
00409b61          int16_t* i;
00409b61          
00409b61          do
00409b61          {
00409b27              i = *(uint32_t*)((char*)i_1 + 4);
00409b27              
00409b31              if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
00409b35                  IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::grow(this);
00409b35              
00409b3f              uint32_t temp1_1 = (COMBINE(0, ((uint32_t)*(uint16_t*)i_1)) % this->m_numBuckets);
00409b42              class HashTableData<unsigned short,long>** m_buckets_1 = this->m_buckets;
00409b48              *(uint32_t*)((char*)i_1 + 4) = m_buckets_1[temp1_1];
00409b4b              m_buckets_1[temp1_1] = i_1;
00409b4e              eax_4 = &m_buckets_1[temp1_1];
00409b4e              
00409b54              if (eax_4 < this->m_firstInterestingBucket)
00409b56                  this->m_firstInterestingBucket = eax_4;
00409b56              
00409b59              this->m_numElements += 1;
00409b5f              i_1 = i;
00409b61          } while (i != 0);
00409b1f      }
00409b1f      
00409b65      eax_4 = 1;
00409b68      return 1;
00409a70  }

00409a8d                                         8d 49 00                                                               .I.
00409b6b                                   cc cc cc cc cc                                                             .....

00409b70  uint8_t __thiscall IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::add(class IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>* this, class HashTableData<unsigned short,long>* arg2)

00409b70  {
00409b76      class IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>* this_1 = this;
00409b78      this = arg2->m_hashKey;
00409b81      uint32_t m_numBuckets = this_1->m_numBuckets;
00409b81      
00409b8e      for (int16_t* i = this_1->m_buckets[(COMBINE(0, ((uint32_t)this)) % m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 4))
00409b8e      {
00409b93          if (*(uint16_t*)i == this)
00409b93          {
00409bdd              if (i == 0)
00409bdd                  break;
00409bdd              
00409be1              class HashTableData<unsigned short,long>** eax_1;
00409be1              eax_1 = 0;
00409be4              return 0;
00409b93          }
00409b8e      }
00409b8e      
00409ba7      if ((m_numBuckets * 2) < (this_1->m_numElements + 1))
00409bab          IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::grow(this_1);
00409bab      
00409bb5      uint32_t temp1_1 = (COMBINE(0, ((uint32_t)arg2->m_hashKey)) % this_1->m_numBuckets);
00409bb8      class HashTableData<unsigned short,long>** m_buckets = this_1->m_buckets;
00409bbe      arg2->m_hashNext = m_buckets[temp1_1];
00409bc1      m_buckets[temp1_1] = arg2;
00409bc4      class HashTableData<unsigned short,long>** eax_3 = &m_buckets[temp1_1];
00409bc4      
00409bca      if (eax_3 < this_1->m_firstInterestingBucket)
00409bcc          this_1->m_firstInterestingBucket = eax_3;
00409bcc      
00409bcf      this_1->m_numElements += 1;
00409bd5      eax_3 = 1;
00409bd8      return 1;
00409b70  }

00409be7                       cc cc cc cc cc cc cc cc cc                                                         .........

00409bf0  void __fastcall IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::delete_contents(class IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>* this)

00409bf0  {
00409bf7      if (this->m_numElements != 0)
00409bf7      {
00409bf9          class HashTableData<unsigned short,long>** m_firstInterestingBucket_2;
00409bf9          class HashTableData<unsigned short,long>** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
00409bf9          
00409c64          do
00409c64          {
00409c06              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00409c0c              void* ecx_2;
00409c0c              
00409c0c              if (this->m_firstInterestingBucket == ecx_1)
00409c0c              {
00409c22              label_409c22:
00409c22                  m_firstInterestingBucket_2 = nullptr;
00409c24                  ecx_2 = nullptr;
00409c0c              }
00409c0c              else
00409c0c              {
00409c10                  while (true)
00409c10                  {
00409c10                      int32_t* m_firstInterestingBucket = this->m_firstInterestingBucket;
00409c10                      
00409c16                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00409c16                      {
00409c28                          class HashTableData<unsigned short,long>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00409c2b                          ecx_2 = *(uint32_t*)m_firstInterestingBucket_1;
00409c2d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00409c2d                          break;
00409c16                      }
00409c16                      
00409c1d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00409c1d                      
00409c20                      if (&m_firstInterestingBucket[1] == ecx_1)
00409c20                          goto label_409c22;
00409c10                  }
00409c0c              }
00409c0c              
00409c2f              class HashTableData<unsigned short,long>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
00409c2f              
00409c33              if (m_hashNext == ecx_2)
00409c45                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00409c33              else
00409c33              {
00409c3c                  class HashTableData<unsigned short,long>* m_hashNext_1;
00409c3c                  
00409c3c                  do
00409c3c                  {
00409c35                      m_hashNext_1 = m_hashNext;
00409c37                      m_hashNext = m_hashNext->m_hashNext;
00409c3c                  } while (m_hashNext != ecx_2);
00409c3c                  
00409c40                  if (m_hashNext_1 != 0)
00409c4c                      m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
00409c40                  else
00409c45                      *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00409c33              }
00409c33              
00409c4f              this->m_numElements -= 1;
00409c4f              
00409c55              if (ecx_2 != 0)
00409c58                  operator delete(ecx_2);
00409c64          } while (this->m_numElements != 0);
00409bf7      }
00409bf0  }

00409c69                             cc cc cc cc cc cc cc                                                           .......

00409c70  uint8_t __thiscall HashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long,1>::add(class HashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long,1>* this, class CaseInsensitiveStringBase<PStringBase<unsigned short> > const* arg2, int32_t const* arg3)

00409c70  {
00409c7e      void* esi = operator new(0xc);
00409c7e      
00409c85      if (esi == 0)
00409cab          esi = nullptr;
00409c85      else
00409c85      {
00409c8b          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
00409c8d          *(uint32_t*)esi = m_charbuffer;
00409c93          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00409c9d          *(uint32_t*)((char*)esi + 4) = 0;
00409ca6          *(uint32_t*)((char*)esi + 8) = *(uint32_t*)arg3;
00409c85      }
00409c85      
00409cb8      void __return;
00409cb8      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::find_internal(&this->m_intrusiveTable, &__return, esi);
00409cc2      int32_t var_4;
00409cc2      
00409cc2      if (var_4 == 0)
00409cc2      {
00409cc7          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::add_internal(&this->m_intrusiveTable, esi);
00409ccd          int32_t eax_4;
00409ccd          eax_4 = 1;
00409cd3          return 1;
00409cc2      }
00409cc2      
00409cd8      if (esi != 0)
00409cd8      {
00409cdc          int32_t* edi_3 = (*(uint32_t*)esi - 0x14);
00409cdc          
00409cef          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00409cf7              **(uint32_t**)edi_3(1);
00409cf7          
00409cfa          operator delete(esi);
00409cd8      }
00409cd8      
00409d03      class IntrusiveHashIterator<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>* eax_3;
00409d03      eax_3 = 0;
00409d09      return 0;
00409c70  }

00409d0c                                      cc cc cc cc                                                              ....

00409d10  uint8_t __thiscall HashTable<unsigned short,long,1>::add(class HashTable<unsigned short,long,1>* this, uint16_t const* arg2, int32_t const* arg3)

00409d10  {
00409d16      void* eax = operator new(0xc);
00409d20      void* esi;
00409d20      
00409d20      if (eax == 0)
00409d40          esi = nullptr;
00409d20      else
00409d20      {
00409d2d          *(uint16_t*)eax = *(uint16_t*)arg2;
00409d30          *(uint32_t*)((char*)eax + 4) = 0;
00409d39          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
00409d3c          esi = eax;
00409d20      }
00409d20      
00409d4d      if (IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::add(&this->m_intrusiveTable, esi) != 0)
00409d67          return 1;
00409d67      
00409d51      if (esi != 0)
00409d54          operator delete(esi);
00409d54      
00409d60      return 0;
00409d10  }

00409d6a                                cc cc cc cc cc cc                                                            ......

00409d70  uint8_t __thiscall ArgumentParser::CommandLineArgList::add(class ArgumentParser::CommandLineArgList* this, struct CommandLineArg const* arg2)

00409d70  {
00409d76      struct CommandLineArg* edi = arg2;
00409d88      PStringBase<char>::to_wpstring(&edi->LongVersion, &arg2, 0);
00409d88      
00409d9c      if ((ArgumentParser::CommandLineArgList::FindByShortCmd(this, ((int16_t)edi->ShortVersion)) < 0 && ArgumentParser::CommandLineArgList::FindByLongCmd(this, &arg2) < 0))
00409d9c      {
00409db5          uint32_t m_num = this->m_num;
00409dbb          SmartArray<CommandLineArg,1>::AddToEnd(this, edi);
00409dc0          struct CommandLineArg* eax_2;
00409dc0          eax_2 = edi->ShortVersion;
00409dc5          struct CommandLineArg* var_4;
00409dc5          
00409dc5          if (eax_2 != 0)
00409dc5          {
00409dc7              eax_2 = ((int16_t)eax_2);
00409ddb              uint32_t m_num_1 = m_num;
00409ddf              var_4 = eax_2;
00409de3              HashTable<unsigned short,long,1>::add(&this->m_ShortNamesHash, &var_4, &m_num_1);
00409dc5          }
00409dc5          
00409dee          struct CommandLineArg* ebx_1 = arg2;
00409dee          
00409df8          if ((edi->LongVersion.m_charbuffer->m_data[-4] != 1 || edi->ShortVersion == 0))
00409df8          {
00409dfe              arg2 = m_num;
00409e02              var_4 = ebx_1;
00409e06              InterlockedIncrement(&ebx_1[0]);
00409e19              HashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long,1>::add(&this->m_LongNamesHash.vtable, &var_4, &arg2);
00409e19              
00409e31              if ((InterlockedDecrement(&ebx_1[0]) == 0 && ebx_1 != 0x14))
00409e39                  *(uint32_t*)*(int32_t*)((char*)ebx_1 + -0x14)(1);
00409df8          }
00409df8          
00409e4f          if ((InterlockedDecrement(&ebx_1[0]) == 0 && ebx_1 != 0x14))
00409e57              *(uint32_t*)*(int32_t*)((char*)ebx_1 + -0x14)(1);
00409e57          
00409e5b          int32_t eax_6;
00409e5b          eax_6 = 1;
00409e61          return 1;
00409d9c      }
00409d9c      
00409e68      void* __offset(CommandLineArg, -0x14) esi_3 = ((char*)arg2 - 0x14);
00409e68      
00409e7b      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00409e83          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00409e83      
00409e87      int32_t eax_8;
00409e87      eax_8 = 0;
00409e8d      return 0;
00409d70  }


00409e90  void* __thiscall AutoGrowHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>::`scalar deleting destructor'(class AutoGrowHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>* this, uint32_t arg2)

00409e90  {
00409e99      this->vtable = 0x7943b8;
00409e9f      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::delete_contents(&this->m_intrusiveTable);
00409ea4      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_buckets = this->m_intrusiveTable.m_buckets;
00409e94      this->m_intrusiveTable.vtable = &IntrusiveHashTable<class CaseInsensitiveStringBase<class PStringBase<uint16_t> >,class HashTableData<class CaseInsensitiveStringBase<class PStringBase<uint16_t> >,long>*,1>::`vftable';
00409e94      
00409eb2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00409eb5          operator delete[](m_buckets);
00409eb5      
00409e94      this->m_intrusiveTable.m_buckets = nullptr;
00409e94      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00409e94      this->m_intrusiveTable.m_numBuckets = 0;
00409e94      this->m_intrusiveTable.m_numElements = 0;
00409e94      
00409ed0      if ((arg2 & 1) != 0)
00409ed3          operator delete(this);
00409ed3      
00409edf      return this;
00409e90  }

00409ee2        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

00409ef0  void* __thiscall HashTable<unsigned short,long,1>::`scalar deleting destructor'(class HashTable<unsigned short,long,1>* this, uint32_t arg2)

00409ef0  {
00409ef9      this->vtable = 0x7943bc;
00409eff      IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::delete_contents(&this->m_intrusiveTable);
00409f04      class HashTableData<unsigned short,long>** m_buckets = this->m_intrusiveTable.m_buckets;
00409ef4      this->m_intrusiveTable.vtable = &IntrusiveHashTable<uint16_t,class HashTableData<uint16_t,long>*,1>::`vftable';
00409ef4      
00409f12      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00409f15          operator delete[](m_buckets);
00409f15      
00409ef4      this->m_intrusiveTable.m_buckets = nullptr;
00409ef4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00409ef4      this->m_intrusiveTable.m_numBuckets = 0;
00409ef4      this->m_intrusiveTable.m_numElements = 0;
00409ef4      
00409f30      if ((arg2 & 1) != 0)
00409f33          operator delete(this);
00409f33      
00409f3f      return this;
00409ef0  }

00409f42        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

00409f50  void __fastcall ArgumentParser::CommandLineArgList::CommandLineArgList(class ArgumentParser::CommandLineArgList* this)

00409f50  {
00409f53      this->m_data = 0;
00409f59      this->m_sizeAndDeallocate = 0;
00409f60      this->m_num = 0;
00409f6c      this->m_LongNamesHash.vtable = 0x7943b8;
00409f73      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>::IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<unsigned short> >,HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long> *,1>(&this->m_LongNamesHash.m_intrusiveTable, 0);
00409f78      this->m_LongNamesHash.vtable = 0x7943b8;
00409f87      this->m_ShortNamesHash.vtable = 0x7943bc;
00409f91      IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>(&this->m_ShortNamesHash.m_intrusiveTable, 0);
00409f96      this->m_ShortNamesHash.vtable = 0x7943bc;
00409f50  }

00409fa4              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

00409fb0  void __fastcall ArgumentParser::CommandLineArgList::~CommandLineArgList(class ArgumentParser::CommandLineArgList* this)

00409fb0  {
00409fbd      this->m_ShortNamesHash.vtable = 0x7943bc;
00409fc7      IntrusiveHashTable<unsigned short,HashTableData<unsigned short,long> *,1>::delete_contents(&this->m_ShortNamesHash.m_intrusiveTable);
00409fcc      class HashTableData<unsigned short,long>** m_buckets = this->m_ShortNamesHash.m_intrusiveTable.m_buckets;
00409fb5      this->m_ShortNamesHash.m_intrusiveTable.vtable = &IntrusiveHashTable<uint16_t,class HashTableData<uint16_t,long>*,1>::`vftable';
00409fb5      
00409fda      if (m_buckets != &this->m_ShortNamesHash.m_intrusiveTable.m_aInplaceBuckets)
00409fdd          operator delete[](m_buckets);
00409fdd      
00409fb5      this->m_ShortNamesHash.m_intrusiveTable.m_buckets = nullptr;
00409fb5      this->m_ShortNamesHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00409fb5      this->m_ShortNamesHash.m_intrusiveTable.m_numBuckets = 0;
00409fb5      this->m_ShortNamesHash.m_intrusiveTable.m_numElements = 0;
00409ff8      this->m_LongNamesHash.vtable = 0x7943b8;
00409fff      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::delete_contents(&this->m_LongNamesHash.m_intrusiveTable);
0040a004      class HashTableData<CaseInsensitiveStringBase<PStringBase<unsigned short> >,long>** m_buckets_1 = this->m_LongNamesHash.m_intrusiveTable.m_buckets;
00409ff3      this->m_LongNamesHash.m_intrusiveTable.vtable = &IntrusiveHashTable<class CaseInsensitiveStringBase<class PStringBase<uint16_t> >,class HashTableData<class CaseInsensitiveStringBase<class PStringBase<uint16_t> >,long>*,1>::`vftable';
00409ff3      
0040a012      if (m_buckets_1 != &this->m_LongNamesHash.m_intrusiveTable.m_aInplaceBuckets)
0040a015          operator delete[](m_buckets_1);
0040a015      
00409ff3      this->m_LongNamesHash.m_intrusiveTable.m_buckets = nullptr;
00409ff3      this->m_LongNamesHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00409ff3      this->m_LongNamesHash.m_intrusiveTable.m_numBuckets = 0;
00409ff3      this->m_LongNamesHash.m_intrusiveTable.m_numElements = 0;
00409ff3      
0040a036      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0040a036      {
0040a038          struct CommandLineArg* m_data = this->m_data;
0040a038          
0040a03c          if (m_data != 0)
0040a040              CommandLineArg::`vector deleting destructor'(m_data, 3);
0040a036      }
00409fb0  }

0040a049                             cc cc cc cc cc cc cc                                                           .......

0040a050  void __fastcall ArgumentParser::Usage(class ArgumentParser* this)

0040a050  {
0040a05d      void var_f4;
0040a05d      ArgumentParser::CommandLineArgList::CommandLineArgList(&var_f4);
0040a062      this->vtable->BuildCommandLineArgs(this, &var_f4);
0040a06e      this->vtable->DisplayUsage(this, &var_f4);
0040a07a      this->vtable->FinishOutputText(this);
0040a085      ArgumentParser::CommandLineArgList::~CommandLineArgList(&var_f4);
0040a050  }

0040a092                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0040a0a0  uint8_t __thiscall ArgumentParser::ParseArgs(class ArgumentParser* this, wchar16** arg2, int32_t arg3, uint8_t arg4)

0040a0a0  {
0040a0ad      int32_t (* var_f4)();
0040a0ad      ArgumentParser::CommandLineArgList::CommandLineArgList(&var_f4);
0040a0b2      this->vtable->BuildCommandLineArgs(this, &var_f4);
0040a0c7      uint8_t result = 1;
0040a0cc      int32_t PStringBase<unsigned short>::s_NullBuffer_7 = ArgumentParser::CommandLineArgList::FindByLongCmd(&var_f4, &PStringBase<unsigned short>::null_string);
0040a0d5      int32_t eax_1 = 0;
0040a0de      int32_t PStringBase<unsigned short>::s_NullBuffer_4 = 0xffffffff;
0040a0de      
0040a0e6      if (arg4 != 0)
0040a0e8          eax_1 = 1;
0040a0e8      
0040a0fd      this->m_argv = arg2;
0040a100      this->m_argc = arg3;
0040a103      this->m_CurArg = eax_1;
0040a103      
0040a106      if (eax_1 > arg3)
0040a106      {
0040a511      label_40a511:
0040a511          uint8_t result_1 = this->vtable->OnCommandLineEvaluationDone(this);
0040a516          result = result_1;
0040a516          
0040a51a          if (result_1 == 0)
0040a51a          {
0040a51c          label_40a51c:
0040a51c              class PSRefBufferCharData<char>* m_charbuffer = this->m_ErrorText.m_charbuffer;
0040a51c              
0040a523              if (m_charbuffer->m_data[-4] != 1)
0040a523              {
0040a525                  this->vtable->AppendOutputText(this, m_charbuffer, ottErrorText);
0040a52f                  this->vtable->AppendOutputText(this, &data_7943c0, ottNormal);
0040a523              }
0040a523              
0040a53d              this->vtable->DisplayUsage(this, &var_f4);
0040a549              this->vtable->FinishOutputText(this);
0040a51a          }
0040a51a          
0040a554          ArgumentParser::CommandLineArgList::~CommandLineArgList(&var_f4);
0040a564          return result;
0040a106      }
0040a106      
0040a10c      int32_t (* const ebx)();
0040a10c      int32_t (* const var_128_1)() = ebx;
0040a10c      
0040a4fd      do
0040a4fd      {
0040a110          int32_t m_CurArg = this->m_CurArg;
0040a116          int16_t* edi_1;
0040a116          
0040a116          if (m_CurArg < this->m_argc)
0040a11b              edi_1 = this->m_argv[m_CurArg];
0040a11b          
0040a126          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_5;
0040a126          
0040a126          if (((m_CurArg >= this->m_argc || edi_1 == 0) || *(uint16_t*)edi_1 == 0))
0040a126          {
0040a14d              class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040a152              PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_1;
0040a15a              InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0040a126          }
0040a126          else
0040a126          {
0040a137              PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_5, wcslen(edi_1));
0040a142              wcscpy(PStringBase<unsigned short>::s_NullBuffer_5, edi_1);
0040a126          }
0040a126          
0040a162          int16_t ebp_1 = 0;
0040a16c          ebx = PStringBase<unsigned short>::s_NullBuffer_4 >= 0;
0040a17b          uint8_t eax_5 = this->vtable->IsCommandLineArgument(this, &PStringBase<unsigned short>::s_NullBuffer_5, ebx);
0040a180          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_5;
0040a180          
0040a184          if (eax_5 != 0)
0040a184          {
0040a186              int32_t edx_2 = *(uint32_t*)(PStringBase<unsigned short>::s_NullBuffer_10 - 4);
0040a18b              class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_13 = ((PStringBase<unsigned short>::s_NullBuffer_10 + (edx_2 << 1)) - 2);
0040a18b              
0040a18f              if (edx_2 > 0)
0040a191                  PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_10;
0040a191              
0040a193              ebp_1 = *(uint16_t*)PStringBase<unsigned short>::s_NullBuffer_13;
0040a184          }
0040a184          
0040a196          bool cond:3_1 = ebx == 0;
0040a198          ebx = var_f4;
0040a19c          class PStringBase<char> edi_22;
0040a19c          
0040a19c          if (cond:3_1)
0040a19c          {
0040a251              if (eax_5 == 0)
0040a251                  goto label_40a3db;
0040a251              
0040a257          label_40a257:
0040a257              int32_t eax_13 = *(uint32_t*)(PStringBase<unsigned short>::s_NullBuffer_10 - 4);
0040a25d              int16_t* edi_14 = ((PStringBase<unsigned short>::s_NullBuffer_10 + (eax_13 << 1)) - 2);
0040a25d              
0040a261              if (eax_13 > 1)
0040a263                  edi_14 = (PStringBase<unsigned short>::s_NullBuffer_10 + 2);
0040a263              
0040a269              int32_t PStringBase<unsigned short>::s_NullBuffer_8;
0040a269              
0040a269              if (*(uint16_t*)edi_14 != ebp_1)
0040a269              {
0040a27d                  if (wcslen(edi_14) != 1)
0040a27d                      goto label_40a29d;
0040a27d                  
0040a27f                  int32_t eax_14;
0040a27f                  eax_14 = *(uint16_t*)edi_14;
0040a287                  PStringBase<unsigned short>::s_NullBuffer_8 = ArgumentParser::CommandLineArgList::FindByShortCmd(&var_f4, eax_14);
0040a28f                  PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_8;
0040a28f                  
0040a293                  if (PStringBase<unsigned short>::s_NullBuffer_8 == 0xffffffff)
0040a293                      goto label_40a29d;
0040a269              }
0040a269              else
0040a269              {
0040a26b                  edi_14 = &edi_14[1];
0040a29d              label_40a29d:
0040a29d                  class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_6;
0040a29d                  class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_3;
0040a29d                  
0040a29d                  if ((edi_14 == 0 || *(uint16_t*)edi_14 == 0))
0040a29d                  {
0040a2c4                      PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
0040a2ce                      PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_3;
0040a2d2                      InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
0040a29d                  }
0040a29d                  else
0040a29d                  {
0040a2ae                      PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_6, wcslen(edi_14));
0040a2b3                      PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_6;
0040a2b9                      wcscpy(PStringBase<unsigned short>::s_NullBuffer_3, edi_14);
0040a29d                  }
0040a29d                  
0040a2e6                  PStringBase<unsigned short>::s_NullBuffer_4 = ArgumentParser::CommandLineArgList::FindByLongCmd(&var_f4, &PStringBase<unsigned short>::s_NullBuffer_6);
0040a2e6                  
0040a2fd                  if ((InterlockedDecrement((PStringBase<unsigned short>::s_NullBuffer_3 - 0x10)) == 0 && PStringBase<unsigned short>::s_NullBuffer_3 != 0x14))
0040a306                      **(uint32_t**)(PStringBase<unsigned short>::s_NullBuffer_3 - 0x14)(1);
0040a306                  
0040a308                  PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer_4;
0040a269              }
0040a269              
0040a30e              if (PStringBase<unsigned short>::s_NullBuffer_8 < 0)
0040a30e              {
0040a387                  if (*(uint16_t*)edi_14 == 0x3f)
0040a387                  {
0040a392                      result = 0;
0040a397                      class PStringBase<char> var_110;
0040a397                      PStringBase<char>::PStringBase<char>(&var_110, &data_7928af);
0040a39c                      this->vtable->SetErrorText(this, &var_110);
0040a3a8                      edi_22 = var_110;
0040a3ac                      goto label_40a4a1;
0040a387                  }
0040a387                  
0040a3b1                  int16_t* var_134_21 = edi_14;
0040a3be                  class PStringBase<char> var_100;
0040a3be                  PStringBase<char>::PStringBase<char>(&var_100, Formatted, "Unrecognized argument '%ls'");
0040a3c3                  this->vtable->SetErrorText(this, &var_100);
0040a3d2                  edi_22 = var_100;
0040a3d6                  goto label_40a495;
0040a30e              }
0040a30e              
0040a31f              int32_t edi_18 = (PStringBase<unsigned short>::s_NullBuffer_8 * 0x1c);
0040a31f              
0040a32a              if ((((int8_t)*(uint32_t*)(edi_18 + var_f4)) & 0xf) != 1)
0040a32a                  goto label_40a4d2;
0040a32a              
0040a339              void* var_108;
0040a339              PStringBase<char>::PStringBase<char>(&var_108, &data_7928af);
0040a355              result &= *(int32_t*)((char*)this->vtable + 0x3c)((edi_18 + var_f4), &var_108);
0040a359              int32_t* edi_21 = ((char*)var_108 - 0x14);
0040a359              
0040a370              if ((InterlockedDecrement(&edi_21[1]) == 0 && edi_21 != 0))
0040a37c                  **(uint32_t**)edi_21(1);
0040a37c              
0040a370              goto label_40a4ca;
0040a19c          }
0040a19c          
0040a1a4          if (eax_5 == 0)
0040a1a4          {
0040a3db          label_40a3db:
0040a3db              int32_t PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_4;
0040a3db              
0040a3e1              if (PStringBase<unsigned short>::s_NullBuffer_9 < 0)
0040a3e1              {
0040a3e3                  int32_t eax_23 = *(uint32_t*)(PStringBase<unsigned short>::s_NullBuffer_10 - 4);
0040a3e8                  class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_14 = ((PStringBase<unsigned short>::s_NullBuffer_10 + (eax_23 << 1)) - 2);
0040a3e8                  
0040a3ec                  if (eax_23 > 0)
0040a3ee                      PStringBase<unsigned short>::s_NullBuffer_14 = PStringBase<unsigned short>::s_NullBuffer_10;
0040a3ee                  
0040a3fc                  if ((*(uint16_t*)PStringBase<unsigned short>::s_NullBuffer_14 == 0 || PStringBase<unsigned short>::s_NullBuffer_7 < 0))
0040a3fc                  {
0040a400                      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_12 = ((PStringBase<unsigned short>::s_NullBuffer_10 + (eax_23 << 1)) - 2);
0040a400                      
0040a404                      if (eax_23 > 0)
0040a406                          PStringBase<unsigned short>::s_NullBuffer_12 = PStringBase<unsigned short>::s_NullBuffer_10;
0040a406                      
0040a40c                      if (*(uint16_t*)PStringBase<unsigned short>::s_NullBuffer_12 == 0)
0040a40c                          goto label_40a4d6;
0040a40c                      
0040a412                      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_10;
0040a41f                      class PStringBase<char> var_104;
0040a41f                      PStringBase<char>::PStringBase<char>(&var_104, Formatted, "Argument '%ls' unknown");
0040a424                      this->vtable->SetErrorText(this, &var_104);
0040a433                      edi_22 = var_104;
0040a437                      goto label_40a495;
0040a3fc                  }
0040a3fc                  
0040a439                  PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_7;
0040a43d                  PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_7;
0040a3e1              }
0040a3e1              
0040a448              void* eax_24 = ((char*)ebx + (PStringBase<unsigned short>::s_NullBuffer_9 * 0x1c));
0040a448              
0040a453              if ((((int8_t)*(uint32_t*)eax_24) & 0xf) == 2)
0040a453              {
0040a455                  int32_t edx_18 = *(uint32_t*)(PStringBase<unsigned short>::s_NullBuffer_10 - 4);
0040a455                  
0040a45a                  if (edx_18 <= 0)
0040a45c                      PStringBase<unsigned short>::s_NullBuffer_10 = ((PStringBase<unsigned short>::s_NullBuffer_10 + (edx_18 << 1)) - 2);
0040a453              }
0040a453              
0040a464              if (((((int8_t)*(uint32_t*)eax_24) & 0xf) == 2 && *(uint16_t*)PStringBase<unsigned short>::s_NullBuffer_10 == 0))
0040a464              {
0040a470                  int32_t var_134_24 = this->m_argv[(this->m_CurArg - 1)];
0040a47d                  class PStringBase<char> var_10c;
0040a47d                  PStringBase<char>::PStringBase<char>(&var_10c, Formatted, "Argument %ls requires parameter");
0040a482                  this->vtable->SetErrorText(this, &var_10c);
0040a491                  edi_22 = var_10c;
0040a495              label_40a495:
0040a495                  result = 0;
0040a4a1              label_40a4a1:
0040a4a1                  
0040a4ad                  if ((InterlockedDecrement((edi_22 - 0x10)) == 0 && edi_22 != 0x14))
0040a4b5                      **(uint32_t**)(edi_22 - 0x14)(1);
0040a4b5                  
0040a4ad                  goto label_40a4d2;
0040a464              }
0040a464              
0040a4c6              result &= this->vtable->EvaluateCommandLineArg(this, eax_24, &PStringBase<unsigned short>::s_NullBuffer_5);
0040a4ca          label_40a4ca:
0040a4ca              PStringBase<unsigned short>::s_NullBuffer_4 = 0xffffffff;
0040a4d2          label_40a4d2:
0040a4d2              PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_5;
0040a4d6          label_40a4d6:
0040a4d6              this->m_CurArg += 1;
0040a4d6              
0040a4ed              if ((InterlockedDecrement((PStringBase<unsigned short>::s_NullBuffer_10 - 0x10)) == 0 && PStringBase<unsigned short>::s_NullBuffer_10 != 0x14))
0040a4f5                  **(uint32_t**)(PStringBase<unsigned short>::s_NullBuffer_10 - 0x14)(1);
0040a1a4          }
0040a1a4          else
0040a1a4          {
0040a1ba              int32_t edi_8 = (PStringBase<unsigned short>::s_NullBuffer_4 * 0x1c);
0040a1bf              int32_t edx_4 = (*(uint32_t*)(edi_8 + ebx) & 0xf);
0040a1bf              
0040a1c5              if (edx_4 != 3)
0040a1c5              {
0040a249                  if ((edx_4 == 2 || eax_5 == 0))
0040a249                      goto label_40a3db;
0040a249                  
0040a249                  goto label_40a257;
0040a1c5              }
0040a1c5              
0040a1c7              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0040a1cc              PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0040a1d4              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0040a1f1              result &= this->vtable->EvaluateCommandLineArg(this, (edi_8 + var_f4), &PStringBase<unsigned short>::s_NullBuffer_4);
0040a1fb              int32_t* edi_11 = (PStringBase<unsigned short>::s_NullBuffer_4 - 0x14);
0040a1fb              
0040a20a              if ((InterlockedDecrement(&edi_11[1]) == 0 && edi_11 != 0))
0040a212                  **(uint32_t**)edi_11(1);
0040a212              
0040a218              int32_t* edi_13 = (PStringBase<unsigned short>::s_NullBuffer_5 - 0x14);
0040a21f              PStringBase<unsigned short>::s_NullBuffer_4 = 0xffffffff;
0040a21f              
0040a233              if ((InterlockedDecrement(&edi_13[1]) == 0 && edi_13 != 0))
0040a23f                  **(uint32_t**)edi_13(1);
0040a1a4          }
0040a4fd      } while (this->m_CurArg <= this->m_argc);
0040a4fd      
0040a50b      if (result == 0)
0040a50b          goto label_40a51c;
0040a50b      
0040a50b      goto label_40a511;
0040a0a0  }

0040a567                       cc cc cc cc cc cc cc cc cc                                                         .........

0040a570  uint32_t __fastcall Archive::GetCurrentPosition(class Archive const* this)

0040a570  {
0040a573      return this->m_currOffset;
0040a570  }

0040a574                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0040a580  void __thiscall Archive::SetCurrentPosition(class Archive* this, uint32_t arg2)

0040a580  {
0040a584      this->m_currOffset = arg2;
0040a580  }

0040a58a                                cc cc cc cc cc cc                                                            ......

0040a590  uint32_t __fastcall Archive::GetSizeLeft(class Archive const* this)

0040a590  {
0040a59f      return (SmartBuffer::GetSize(&this->m_buffer) - this->m_currOffset);
0040a590  }


0040a5a0  class SmartBuffer* __thiscall Archive::GetSerializedBuffer(class Archive* this, class SmartBuffer* __return)

0040a5a0  {
0040a5af      SmartBuffer::MakeWindow(&this->m_buffer, __return, 0, this->m_currOffset);
0040a5b7      return __return;
0040a5a0  }

0040a5ba                                                                                cc cc cc cc cc cc                            ......

0040a5c0  class SmartBuffer* __thiscall Archive::GetRemainingBuffer(class Archive* this, class SmartBuffer* __return)

0040a5c0  {
0040a5cd      SmartBuffer::MakeWindow(&this->m_buffer, __return, this->m_currOffset);
0040a5d5      return __return;
0040a5c0  }

0040a5d8                                                                          cc cc cc cc cc cc cc cc                          ........

0040a5e0  void __fastcall Archive::InitVersionStack(class Archive* this)

0040a5e0  {
0040a5e4      if (this->m_pVersionStack == 0)
0040a5f0          /* tailcall */
0040a5f0          return this->vtable->CreateVersionStack(this);
0040a5f0      
0040a5e6      class IArchiveVersionStack* m_pVersionStack = this->m_pVersionStack;
0040a5eb      /* tailcall */
0040a5eb      return m_pVersionStack->vtable->Reset(m_pVersionStack);
0040a5e0  }

0040a5f3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0040a600  uint32_t __thiscall Archive::GetVersionByToken(class Archive const* this, uint32_t arg2)

0040a600  {
0040a604      if (this->m_pVersionStack == 0)
0040a608          return 0;
0040a608      
0040a60b      class IArchiveVersionStack* m_pVersionStack = this->m_pVersionStack;
0040a610      /* tailcall */
0040a610      return m_pVersionStack->vtable->GetVersionByToken(m_pVersionStack, arg2);
0040a600  }

0040a613                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0040a620  uint32_t compute_str_hash<char>(char* arg1)

0040a620  {
0040a620      char* edx = arg1;
0040a624      int32_t ecx;
0040a624      ecx = *(uint8_t*)edx;
0040a626      int32_t result = 0;
0040a626      
0040a62a      if (ecx != 0)
0040a62a      {
0040a657          do
0040a657          {
0040a636              result = ((result << 4) + ((int32_t)ecx));
0040a63a              ecx = (result & 0xf0000000);
0040a63a              
0040a640              if (ecx != 0)
0040a64d                  result = (((ecx >> 0x18) ^ result) & 0xfffffff);
0040a64d              
0040a64f              ecx = edx[1];
0040a652              edx = &edx[1];
0040a657          } while (ecx != 0);
0040a657          
0040a65c          if (result == 0xffffffff)
0040a65e              return 0xfffffffe;
0040a62a      }
0040a62a      
0040a663      return result;
0040a620  }

0040a664              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040a670  void __thiscall Archive::SetCheckpointing(class Archive* this, uint8_t arg2)

0040a670  {
0040a675      if (arg2 != 0)
0040a675      {
0040a677          *(uint8_t*)((char*)this->m_flags)[1] |= 0x40;
0040a67b          return;
0040a675      }
0040a675      
0040a67e      *(uint8_t*)((char*)this->m_flags)[1] &= 0xbf;
0040a670  }

0040a685                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040a690  uint8_t __fastcall Archive::UsingDBLoader(class Archive const* this)

0040a690  {
0040a6a2      int32_t eax;
0040a6a2      eax = (this->m_flags & 0x8000) == 0x8000;
0040a6a4      return eax;
0040a690  }

0040a6a5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040a6b0  void __thiscall Archive::SetDBLoader(class Archive* this, uint8_t arg2)

0040a6b0  {
0040a6b5      if (arg2 != 0)
0040a6b5      {
0040a6b7          *(uint8_t*)((char*)this->m_flags)[1] |= 0x80;
0040a6bb          return;
0040a6b5      }
0040a6b5      
0040a6be      *(uint8_t*)((char*)this->m_flags)[1] &= 0x7f;
0040a6b0  }

0040a6c5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040a6d0  void __thiscall Archive::SetWordAligned(class Archive* this, uint8_t arg2)

0040a6d0  {
0040a6d5      if (arg2 != 0)
0040a6d5      {
0040a6d7          this->m_flags |= 2;
0040a6db          return;
0040a6d5      }
0040a6d5      
0040a6de      this->m_flags &= 0xfffffffd;
0040a6d0  }

0040a6e5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040a6f0  void __fastcall Archive::RaiseError(class Archive* this)

0040a6f0  {
0040a6f0      this->m_flags |= 4;
0040a6f4      this->m_hrError.m_val = 0x80004005;
0040a6f0  }

0040a6fc                                                                                      cc cc cc cc                              ....

0040a700  uint8_t __fastcall Archive::IsWordAligned(class Archive const* this)

0040a700  {
0040a70e      return (((int8_t)this->m_flags) & 2) == 2;
0040a700  }

0040a70f                                               cc                                                                 .

0040a710  uint8_t __thiscall Archive::SetVersionByToken(class Archive* this, uint32_t arg2, uint32_t arg3)

0040a710  {
0040a713      uint32_t m_flags = this->m_flags;
0040a713      
0040a720      if ((!(((int8_t)(m_flags >> 2))) & 1) != 0)
0040a720      {
0040a722          class IArchiveVersionStack* m_pVersionStack = this->m_pVersionStack;
0040a722          
0040a727          if (m_pVersionStack == 0)
0040a727          {
0040a729              m_flags |= 4;
0040a72b              this->m_hrError.m_val = 0x80004005;
0040a732              this->m_flags = m_flags;
0040a735              m_flags = 0;
0040a738              return 0;
0040a727          }
0040a727          
0040a74c          if (m_pVersionStack->vtable->SetVersion(m_pVersionStack, arg2, arg3) != 0)
0040a74c          {
0040a74e              m_flags = 1;
0040a751              return 1;
0040a74c          }
0040a74c          
0040a754          this->m_flags |= 4;
0040a758          this->m_hrError.m_val = 0x80004005;
0040a720      }
0040a720      
0040a75f      m_flags = 0;
0040a762      return 0;
0040a710  }

0040a765                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040a770  class IDClass<_tagVersionHandle,32,0>* __thiscall Archive::PushVersionRow(class Archive* this, class IDClass<_tagVersionHandle,32,0>* __return)

0040a770  {
0040a772      uint32_t m_flags = this->m_flags;
0040a772      
0040a77f      if ((!(((int8_t)(m_flags >> 2))) & 1) == 0)
0040a77f      {
0040a7bf          __return->id = INVALID_VERSIONHANDLE.id;
0040a7c1          return __return;
0040a77f      }
0040a77f      
0040a781      class IArchiveVersionStack* m_pVersionStack = this->m_pVersionStack;
0040a781      
0040a786      if (m_pVersionStack != 0)
0040a786      {
0040a7a4          m_pVersionStack->vtable->PushVersionRow(m_pVersionStack, __return);
0040a7b2          return __return;
0040a786      }
0040a786      
0040a78b      this->m_flags = (m_flags | 4);
0040a78e      this->m_hrError.m_val = 0x80004005;
0040a79f      __return->id = INVALID_VERSIONHANDLE.id;
0040a7a1      return __return;
0040a770  }

0040a7c4              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040a7d0  class IDClass<_tagVersionHandle,32,0>* __thiscall Archive::PushVersionRow(class Archive* this, class IDClass<_tagVersionHandle,32,0>* __return, class ArchiveVersionRow const* arg3)

0040a7d0  {
0040a7d2      uint32_t m_flags = this->m_flags;
0040a7d2      
0040a7df      if ((!(((int8_t)(m_flags >> 2))) & 1) == 0)
0040a7df      {
0040a824          __return->id = INVALID_VERSIONHANDLE.id;
0040a826          return __return;
0040a7df      }
0040a7df      
0040a7e1      class IArchiveVersionStack* m_pVersionStack = this->m_pVersionStack;
0040a7e1      
0040a7e6      if (m_pVersionStack != 0)
0040a7e6      {
0040a811          *(int32_t*)((char*)m_pVersionStack->vtable + 0x20)(__return, arg3);
0040a817          return __return;
0040a7e6      }
0040a7e6      
0040a7eb      this->m_flags = (m_flags | 4);
0040a7ee      this->m_hrError.m_val = 0x80004005;
0040a7ff      __return->id = INVALID_VERSIONHANDLE.id;
0040a801      return __return;
0040a7d0  }

0040a829                             cc cc cc cc cc cc cc                                                           .......

0040a830  uint8_t __thiscall Archive::GetVersionRowByHandle(class Archive* this, class IDClass<_tagVersionHandle,32,0> arg2, class ArchiveVersionRow const** arg3)

0040a830  {
0040a834      if (this->m_pVersionStack == 0)
0040a834      {
0040a836          int32_t eax;
0040a836          eax = 0;
0040a838          return 0;
0040a834      }
0040a834      
0040a83b      class IArchiveVersionStack* m_pVersionStack = this->m_pVersionStack;
0040a840      /* tailcall */
0040a840      return m_pVersionStack->vtable->GetRowByHandle(m_pVersionStack, arg2, arg3);
0040a830  }

0040a843           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0040a850  void* __thiscall IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this, uint32_t arg2)

0040a850  {
0040a853      class InArchiveVersionStack::VersionRowHolder** m_buckets = this->m_buckets;
0040a85b      this->vtable = 0x79442c;
0040a85b      
0040a861      if (m_buckets != &this->m_aInplaceBuckets)
0040a864          operator delete[](m_buckets);
0040a864      
0040a873      this->m_buckets = nullptr;
0040a876      this->m_firstInterestingBucket = nullptr;
0040a879      this->m_numBuckets = 0;
0040a87c      this->m_numElements = 0;
0040a87c      
0040a87f      if ((arg2 & 1) != 0)
0040a882          operator delete(this);
0040a882      
0040a88d      return this;
0040a850  }


0040a890  uint8_t __stdcall Archive::tagSetCurrentCoreVersion::InitializeArchive(class Archive::tagSetCurrentCoreVersion const* this @ ecx, class Archive* arg2)

0040a890  {
0040a891      class Archive* esi = arg2;
0040a891      
0040a89f      if ((!(((int8_t)(esi->m_flags >> 2))) & 1) == 0)
0040a8c4          return 0;
0040a8c4      
0040a8a8      Archive::PushVersionRow(esi, &arg2);
0040a8b6      Archive::SetVersionByToken(esi, 0x436f7265, 2);
0040a8bb      int32_t eax_2;
0040a8bb      eax_2 = 1;
0040a8be      return 1;
0040a890  }

0040a8c7                       cc cc cc cc cc cc cc cc cc                                                         .........

0040a8d0  uint8_t __thiscall Archive::SetVersionRow::InitializeArchive(class Archive::SetVersionRow const* this, class Archive* arg2)

0040a8d0  {
0040a8d2      class Archive* ecx = arg2;
0040a8d2      
0040a8e1      if ((!(((int8_t)(ecx->m_flags >> 2))) & 1) == 0)
0040a8e1      {
0040a8ff          class Archive::SetVersionRow* eax_2;
0040a8ff          eax_2 = 0;
0040a901          return 0;
0040a8e1      }
0040a8e1      
0040a8f1      uint32_t id = Archive::PushVersionRow(ecx, &arg2, this->m_rInitialData)->id;
0040a8f9      id = INVALID_VERSIONHANDLE.id != id;
0040a8fc      return id;
0040a8d0  }

0040a904              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040a910  uint8_t* __thiscall Archive::PeekBytes(class Archive* this, uint32_t arg2, uint32_t arg3)

0040a910  {
0040a91b      if ((((int8_t)(this->m_flags >> 2)) & 1) != 0)
0040a920          return 0;
0040a920      
0040a932      uint32_t ebx = (arg3 + arg2);
0040a935      uint8_t eax_3;
0040a935      class SmartBuffer* edi_1;
0040a935      
0040a935      if ((this->m_flags & 1) != 0)
0040a935      {
0040a937          edi_1 = &this->m_buffer;
0040a93c          eax_3 = SmartBuffer::CanGrow(edi_1);
0040a935      }
0040a935      
0040a943      if (((this->m_flags & 1) == 0 || eax_3 == 0))
0040a943      {
0040a95f          edi_1 = &this->m_buffer;
0040a95f          
0040a96b          if (SmartBuffer::GetSize(edi_1) < ebx)
0040a96b          {
0040a96d              this->m_flags |= 4;
0040a974              this->m_hrError.m_val = 0x80004005;
0040a97e              return 0;
0040a96b          }
0040a943      }
0040a943      else
0040a94a          SmartBuffer::ReconfigureAllocation(edi_1, ebx, 1);
0040a94a      
0040a95c      return &SmartBuffer::GetBuffer(edi_1)[arg2];
0040a910  }

0040a981     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0040a990  uint8_t* __thiscall Archive::GetBytes(class Archive* this, uint32_t arg2)

0040a990  {
0040a99d      uint8_t* result = Archive::PeekBytes(this, this->m_currOffset, arg2);
0040a99d      
0040a9a4      if (result != 0)
0040a9a6          this->m_currOffset += arg2;
0040a9a6      
0040a9ab      return result;
0040a990  }

0040a9ae                                            cc cc                                                                ..

0040a9b0  void __thiscall Archive::CheckAlignment(class Archive* this, uint32_t arg2)

0040a9b0  {
0040a9b7      if ((this->m_flags & 2) != 0)
0040a9b7      {
0040a9bd          int32_t eax_2 = (arg2 & 3);
0040a9c4          int32_t esi_1;
0040a9c4          
0040a9c4          if (eax_2 == 0)
0040a9c4          {
0040a9d2              esi_1 = 4;
0040a9d8          label_40a9d8:
0040a9d8              uint32_t m_currOffset = this->m_currOffset;
0040a9e7              uint32_t temp1_1 = (COMBINE(0, &SmartBuffer::GetBuffer(&this->m_buffer)[m_currOffset]) % esi_1);
0040a9e7              
0040a9eb              if (temp1_1 != 0)
0040a9eb              {
0040a9ed                  uint32_t esi_2 = (esi_1 - temp1_1);
0040a9f3                  uint8_t* s = Archive::PeekBytes(this, m_currOffset, esi_2);
0040a9f3                  
0040a9fc                  if (s == 0)
0040a9fc                  {
0040aa1f                      this->m_flags |= 4;
0040aa25                      this->m_hrError.m_val = 0x80004005;
0040aa2d                      return;
0040a9fc                  }
0040a9fc                  
0040a9fe                  this->m_currOffset += esi_2;
0040a9fe                  
0040aa05                  if ((this->m_flags & 1) != 0)
0040aa17                      __builtin_memset(__builtin_memset(s, 0, ((esi_2 >> 2) << 2)), 0, (esi_2 & 3));
0040a9eb              }
0040a9c4          }
0040a9c4          else if (eax_2 == 2)
0040a9c9          {
0040a9cb              esi_1 = 2;
0040a9d0              goto label_40a9d8;
0040a9c9          }
0040a9b7      }
0040a9b0  }


0040aa30  void __thiscall IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>(class IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this, uint32_t arg2)

0040aa30  {
0040aa30      class IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this_1 = this;
0040aa44      this->m_buckets = nullptr;
0040aa47      this->m_firstInterestingBucket = nullptr;
0040aa4a      this->m_numBuckets = 0;
0040aa4d      this->m_numElements = 0;
0040aa51      this->vtable = 0x79442c;
0040aa57      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0040aa62      this_1 = arg2;
0040aa6e      uint32_t* eax = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &this_1, 0, nullptr);
0040aa6e      
0040aa78      if (eax == bucketSizesEnd_1)
0040aa7a          eax -= 4;
0040aa7a      
0040aa7d      uint32_t eax_1 = *(uint32_t*)eax;
0040aa82      this->m_numBuckets = eax_1;
0040aa82      
0040aa85      if (eax_1 > 0x17)
0040aa9c          this->m_buckets = operator new[]((eax_1 * 4));
0040aa85      else
0040aa8a          this->m_buckets = &this->m_aInplaceBuckets;
0040aa8a      
0040aaa2      class InArchiveVersionStack::VersionRowHolder** m_buckets = this->m_buckets;
0040aaa7      uint32_t ecx_4 = (this->m_numBuckets * 4);
0040aaac      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0040aabd      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
0040aa30  }

0040aac7                       cc cc cc cc cc cc cc cc cc                                                         .........

0040aad0  void __fastcall InArchiveVersionStack::InArchiveVersionStack(class InArchiveVersionStack* this)

0040aad0  {
0040aad5      this->vtable = 0x794434;
0040aae3      this->m_cTurbineRefCount.m_cRef = 1;
0040aaea      this->m_cTurbineRefCount.vtable = 0x792b6c;
0040aaf1      IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>(&this->m_hlVersions, 0);
0040aadb      this->m_hlVersions.m_list.head_ = 0;
0040aadb      this->m_hlVersions.m_list.tail_ = nullptr;
0040ab01      this->m_vrDefaultRow.m_hashKey.id = INVALID_VERSIONHANDLE.id;
0040ab07      this->m_vrDefaultRow.m_hashNext = nullptr;
0040ab0d      this->m_vrDefaultRow.dllist_next = nullptr;
0040ab13      this->m_vrDefaultRow.dllist_prev = nullptr;
0040ab19      this->m_vrDefaultRow.m_VersionRow.vtable = 0x794430;
0040ab29      this->m_vrDefaultRow.m_VersionRow.m_aVersions.m_num = 0;
0040ab2f      this->m_vrDefaultRow.m_VersionRow.m_aVersions.m_data = &this->m_vrDefaultRow.m_VersionRow.m_aVersions.m_aPrimitiveInplaceMemory;
0040ab35      this->m_vrDefaultRow.m_VersionRow.m_aVersions.m_sizeAndDeallocate = 8;
0040ab40      this->m_iLastSerialNumber = 1;
0040aad0  }

0040ab4f                                               cc                                                                 .

0040ab50  uint32_t __fastcall InArchiveVersionStack::AddRef(class InArchiveVersionStack const* this)

0040ab50  {
0040ab5a      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
0040ab50  }

0040ab5b                                                                                   cc cc cc cc cc                             .....

0040ab60  uint32_t __fastcall InArchiveVersionStack::Release(class InArchiveVersionStack const* this)

0040ab60  {
0040ab67      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
0040ab67      
0040ab74      if ((result == 0 && this != 0))
0040ab74      {
0040ab78          InArchiveVersionStack::~InArchiveVersionStack(this);
0040ab7e          operator delete(this);
0040ab74      }
0040ab74      
0040ab8a      return result;
0040ab60  }

0040ab8b                                   cc cc cc cc cc                                                             .....

0040ab90  void __fastcall Archive::CreateVersionStack(class Archive* this)

0040ab90  {
0040ab98      void* eax = operator new(0xe8);
0040ab98      
0040aba2      if (eax != 0)
0040aba2      {
0040abab          this->m_pVersionStack = InArchiveVersionStack::InArchiveVersionStack(eax);
0040abaf          return;
0040aba2      }
0040aba2      
0040abb2      this->m_pVersionStack = nullptr;
0040ab90  }

0040abb7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0040abc0  void __fastcall Archive::ReleaseUserData(class Archive* this)

0040abc0  {
0040abc3      class HashTable<unsigned long,Interface *,0>* m_pcUserDataHash = this->m_pcUserDataHash;
0040abc3      
0040abd2      if ((m_pcUserDataHash != 0 && m_pcUserDataHash->m_intrusiveTable.m_numElements != 0))
0040abd2      {
0040ac48          do
0040ac48          {
0040abdd              void* edx_2 = &m_pcUserDataHash->m_intrusiveTable.m_buckets[m_pcUserDataHash->m_intrusiveTable.m_numBuckets];
0040abe3              void* ecx_2;
0040abe3              class HashTableData<unsigned long,Interface *>** m_firstInterestingBucket_2;
0040abe3              
0040abe3              if (m_pcUserDataHash->m_intrusiveTable.m_firstInterestingBucket == edx_2)
0040abe3              {
0040abf7              label_40abf7:
0040abf7                  m_firstInterestingBucket_2 = nullptr;
0040abf9                  ecx_2 = nullptr;
0040abe3              }
0040abe3              else
0040abe3              {
0040abe5                  while (true)
0040abe5                  {
0040abe5                      int32_t* m_firstInterestingBucket_1 = m_pcUserDataHash->m_intrusiveTable.m_firstInterestingBucket;
0040abe5                      
0040abeb                      if (*(uint32_t*)m_firstInterestingBucket_1 != 0)
0040abeb                      {
0040abfd                          class HashTableData<unsigned long,Interface *>** m_firstInterestingBucket = m_pcUserDataHash->m_intrusiveTable.m_firstInterestingBucket;
0040ac00                          ecx_2 = *(uint32_t*)m_firstInterestingBucket;
0040ac02                          m_firstInterestingBucket_2 = m_firstInterestingBucket;
0040ac02                          break;
0040abeb                      }
0040abeb                      
0040abf2                      m_pcUserDataHash->m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket_1[1];
0040abf2                      
0040abf5                      if (&m_firstInterestingBucket_1[1] == edx_2)
0040abf5                          goto label_40abf7;
0040abe5                  }
0040abe3              }
0040abe3              
0040ac07              class HashTableData<unsigned long,Interface *>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0040ac09              int32_t* esi_1 = *(uint32_t*)((char*)ecx_2 + 8);
0040ac0c              class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Interface *> *,0>* edx_4 = &this->m_pcUserDataHash->m_intrusiveTable;
0040ac0c              
0040ac11              if (m_hashNext == ecx_2)
0040ac23                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0040ac11              else
0040ac11              {
0040ac1a                  class HashTableData<unsigned long,Interface *>* m_hashNext_1;
0040ac1a                  
0040ac1a                  do
0040ac1a                  {
0040ac13                      m_hashNext_1 = m_hashNext;
0040ac15                      m_hashNext = m_hashNext->m_hashNext;
0040ac1a                  } while (m_hashNext != ecx_2);
0040ac1a                  
0040ac1e                  if (m_hashNext_1 != 0)
0040ac2a                      m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0040ac1e                  else
0040ac23                      *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0040ac11              }
0040ac11              
0040ac2d              edx_4->m_numElements -= 1;
0040ac32              operator delete(ecx_2);
0040ac3e              *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0040ac41              m_pcUserDataHash = this->m_pcUserDataHash;
0040ac48          } while (m_pcUserDataHash->m_intrusiveTable.m_numElements != 0);
0040abd2      }
0040abc0  }

0040ac4f                                               cc                                                                 .

0040ac50  void __thiscall Archive::InitForPacking(class Archive* this, class ArchiveInitializer const* arg2, class SmartBuffer const* arg3)

0040ac50  {
0040ac5f      bool cond:0 = SmartBuffer::GetShareCount(&this->m_buffer) != 1;
0040ac66      uint32_t eax_1;
0040ac66      
0040ac66      if (!(cond:0))
0040ac6a          eax_1 = SmartBuffer::GetSize(arg3);
0040ac6a      
0040ac71      if ((cond:0 || eax_1 != 0))
0040ac71      {
0040ac75          Archive::ReleaseUserData(this);
0040ac7c          SmartBuffer::~SmartBuffer(&this->m_buffer);
0040ac84          SmartBuffer::operator=(&this->m_buffer, arg3);
0040ac71      }
0040ac71      
0040ac8c      struct Archive::VTable* vtable = this->vtable;
0040ac96      this->m_flags = ((this->m_flags & 0xfffffffb) | 1);
0040ac9b      this->m_currOffset = 0;
0040ac9e      this->m_hrError.m_val = 0;
0040aca1      vtable->InitVersionStack(this);
0040aca8      arg2->vtable->InitializeArchive(arg2, this);
0040ac50  }

0040acb3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0040acc0  void __thiscall Archive::InitForUnpacking(class Archive* this, class ArchiveInitializer const* arg2, class SmartBuffer const* arg3)

0040acc0  {
0040acc4      Archive::ReleaseUserData(this);
0040acce      SmartBuffer::~SmartBuffer(&this->m_buffer);
0040acda      SmartBuffer::operator=(&this->m_buffer, arg3);
0040acdf      struct Archive::VTable* vtable = this->vtable;
0040ace1      this->m_flags &= 0xfffffffa;
0040ace9      this->m_currOffset = 0;
0040acec      this->m_hrError.m_val = 0;
0040acef      vtable->InitVersionStack(this);
0040acf6      arg2->vtable->InitializeArchive(arg2, this);
0040acc0  }


0040ad00  void __fastcall Archive::~Archive(class Archive* this)

0040ad00  {
0040ad04      this->vtable = 0x792b3c;
0040ad0a      Archive::ReleaseUserData(this);
0040ad14      SmartBuffer::~SmartBuffer(&this->m_buffer);
0040ad19      class HashTable<unsigned long,Interface *,0>* m_pcUserDataHash = this->m_pcUserDataHash;
0040ad19      
0040ad1e      if (m_pcUserDataHash != 0)
0040ad20          m_pcUserDataHash->vtable->__vecDelDtor(m_pcUserDataHash, 1);
0040ad20      
0040ad26      class IArchiveVersionStack* m_pVersionStack = this->m_pVersionStack;
0040ad2b      this->m_pcUserDataHash = nullptr;
0040ad2b      
0040ad32      if (m_pVersionStack != 0)
0040ad32      {
0040ad34          m_pVersionStack->vtable->Release(m_pVersionStack);
0040ad39          this->m_pVersionStack = nullptr;
0040ad32      }
0040ad32      
0040ad44      /* tailcall */
0040ad44      return SmartBuffer::~SmartBuffer(&this->m_buffer);
0040ad00  }

0040ad49                             cc cc cc cc cc cc cc                                                           .......

0040ad50  void Serializer::SerializePrimitive<unsigned char>(uint8_t* arg1, class Archive* arg2)

0040ad50  {
0040ad59      Archive::CheckAlignment(arg2, 1);
0040ad62      uint8_t* eax = Archive::GetBytes(arg2, 1);
0040ad62      
0040ad69      if (eax != 0)
0040ad69      {
0040ad73          if ((arg2->m_flags & 1) != 0)
0040ad73          {
0040ad77              *(uint8_t*)eax = *(uint8_t*)arg1;
0040ad7a              return;
0040ad73          }
0040ad73          
0040ad7b          eax = *(uint8_t*)eax;
0040ad7d          *(uint8_t*)arg1 = eax;
0040ad69      }
0040ad50  }

0040ad81     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0040ad90  uint8_t __thiscall PStringBaseIter_Common<char>::Next(class PStringBaseIter_Common<char>* this, int32_t arg2)

0040ad90  {
0040ad9b      if (arg2 < 0)
0040ad9b      {
0040ad9e          PStringBaseIter_Common<char>::Next(this, arg2);
0040ada3          uint32_t curr = this->curr;
0040ada3          
0040ada8          if (arg2 <= curr)
0040adb5              this->curr = (curr - arg2);
0040ada8          else
0040adaa              this->curr = 0;
0040ad9b      }
0040ad9b      
0040adbf      int32_t edi_1 = (this->curr + arg2);
0040adbf      
0040adc5      if (edi_1 > this->vtable->GetStrLen(this))
0040adc5      {
0040adce          this->curr = this->vtable->GetStrLen(this);
0040add2          uint32_t eax_4;
0040add2          eax_4 = 0;
0040add5          return 0;
0040adc5      }
0040adc5      
0040add8      this->curr = edi_1;
0040addd      uint32_t eax_3;
0040addd      eax_3 = 1;
0040ade0      return 1;
0040ad90  }

0040ade3           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0040adf0  uint8_t __thiscall PStringBaseIter_Common<unsigned short>::Next(class PStringBaseIter_Common<unsigned short>* this, int32_t arg2)

0040adf0  {
0040adfb      if (arg2 < 0)
0040adfb      {
0040adfe          PStringBaseIter_Common<unsigned short>::Next(this, arg2);
0040ae03          uint32_t curr = this->curr;
0040ae03          
0040ae08          if (arg2 <= curr)
0040ae15              this->curr = (curr - arg2);
0040ae08          else
0040ae0a              this->curr = 0;
0040adfb      }
0040adfb      
0040ae1f      int32_t edi_1 = (this->curr + arg2);
0040ae1f      
0040ae25      if (edi_1 > this->vtable->GetStrLen(this))
0040ae25      {
0040ae2e          this->curr = this->vtable->GetStrLen(this);
0040ae32          uint32_t eax_4;
0040ae32          eax_4 = 0;
0040ae35          return 0;
0040ae25      }
0040ae25      
0040ae38      this->curr = edi_1;
0040ae3d      uint32_t eax_3;
0040ae3d      eax_3 = 1;
0040ae40      return 1;
0040adf0  }

0040ae43           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0040ae50  uint8_t __thiscall PStringBaseIter_Common<unsigned short>::SetMark(class PStringBaseIter_Common<unsigned short>* this, uint32_t arg2)

0040ae50  {
0040ae5d      if (arg2 > this->vtable->GetStrLen(this))
0040ae5d      {
0040ae65          this->mark = this->vtable->GetStrLen(this);
0040ae68          uint32_t eax_2;
0040ae68          eax_2 = 0;
0040ae6b          return 0;
0040ae5d      }
0040ae5d      
0040ae6e      this->mark = arg2;
0040ae71      uint32_t eax_1;
0040ae71      eax_1 = 1;
0040ae74      return 1;
0040ae50  }

0040ae77                                                                       cc cc cc cc cc cc cc cc cc                         .........

0040ae80  uint16_t* search_skipescapes<unsigned short>(uint16_t const* arg1, int32_t arg2, int32_t arg3)

0040ae80  {
0040ae80      uint16_t const* result = arg1;
0040ae84      uint32_t ecx;
0040ae84      ecx = *(uint16_t*)result;
0040ae88      bool edx = false;
0040ae88      
0040ae8e      while (ecx != 0)
0040ae8e      {
0040ae98          ecx = ((uint32_t)ecx);
0040ae98          
0040aea1          if ((ecx == arg2 && edx == 0))
0040aeb8              return result;
0040aeb8          
0040aea3          bool cond:1_1 = ecx == arg3;
0040aea5          ecx = result[1];
0040aea9          edx = cond:1_1;
0040aeac          result = &result[1];
0040ae8e      }
0040ae8e      
0040aeb4      return nullptr;
0040ae80  }

0040aeb9                                                                             cc cc cc cc cc cc cc                           .......

0040aec0  void __fastcall PStringBase<unsigned short>::clear(class PStringBase<unsigned short>* this)

0040aec0  {
0040aec3      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
0040aec3      
0040aecb      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
0040aecb      {
0040aee1          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0040aee9              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040aee9          
0040aeeb          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040aef6          this->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
0040aef8          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0040aecb      }
0040aec0  }

0040af01     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0040af10  uint32_t template_strcspn<char>(class PStringBase<char> const* arg1, char const* arg2, uint8_t arg3)

0040af10  {
0040af19      int32_t i;
0040af19      int32_t ebx;
0040af19      
0040af19      if (arg3 == 0)
0040af19      {
0040af6b          class PSRefBufferCharData<char>* m_charbuffer_1 = arg1->m_charbuffer;
0040af6d          int32_t ebp_1 = m_charbuffer_1->m_data[-4];
0040af73          i = 0;
0040af73          
0040af77          if ((ebp_1 - 1) > 0)
0040af77          {
0040af7d              ebx = *(uint8_t*)arg2;
0040af7d              
0040afb1              do
0040afb1              {
0040af82                  char const* esi_2 = arg2;
0040af82                  
0040af86                  if (ebx != 0)
0040af86                  {
0040af88                      class PStringBase<char>* edx;
0040af88                      edx = ebx;
0040af88                      
0040afa7                      do
0040afa7                      {
0040af92                          void* ecx_5 = &m_charbuffer_1->m_data[(ebp_1 - 1)];
0040af92                          
0040af96                          if (i < ebp_1)
0040af98                              ecx_5 = &m_charbuffer_1->m_data[i];
0040af98                          
0040af9d                          if (*(uint8_t*)ecx_5 == edx)
0040afba                              return i;
0040afba                          
0040af9f                          edx = esi_2[1];
0040afa2                          esi_2 = &esi_2[1];
0040afa7                      } while (edx != 0);
0040af86                  }
0040af86                  
0040afa9                  i += 1;
0040afb1              } while (i < (ebp_1 - 1));
0040af77          }
0040af19      }
0040af19      else
0040af19      {
0040af1f          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0040af21          int32_t ebp = m_charbuffer->m_data[-4];
0040af24          i = (ebp - 1);
0040af24          
0040af29          if (i > 0)
0040af29          {
0040af33              ebx = *(uint8_t*)arg2;
0040af33              
0040af5d              do
0040af5d              {
0040af35                  char const* esi_1 = arg2;
0040af39                  i -= 1;
0040af39                  
0040af3e                  if (ebx != 0)
0040af3e                  {
0040af40                      char j = ebx;
0040af40                      
0040af59                      do
0040af59                      {
0040af44                          void* ecx_2 = &m_charbuffer->m_data[(ebp - 1)];
0040af44                          
0040af48                          if (i < ebp)
0040af4a                              ecx_2 = &m_charbuffer->m_data[i];
0040af4a                          
0040af4f                          if (*(uint8_t*)ecx_2 == j)
0040afba                              return i;
0040afba                          
0040af51                          j = esi_1[1];
0040af54                          esi_1 = &esi_1[1];
0040af59                      } while (j != 0);
0040af3e                  }
0040af5d              } while (i > 0);
0040af29          }
0040af19      }
0040afb3      return 0xffffffff;
0040af10  }

0040afbb                                                                                   cc cc cc cc cc                             .....

0040afc0  uint8_t PSUtils::check_access(class PStringBase<char> const* arg1, int32_t arg2)

0040afc0  {
0040afcc      int32_t eax = _access(arg1->m_charbuffer, arg2);
0040afd5      int32_t eax_1 = -(eax);
0040afdc      return (((int8_t)(eax_1 - eax_1)) + 1);
0040afc0  }

0040afdd                                                                                         cc cc cc                               ...

0040afe0  wchar16* PSUtils::wcschr_skipescapes(wchar16 const* arg1, wchar16 arg2, wchar16 arg3)

0040afe0  {
0040afe5      arg3 = ((uint32_t)arg3);
0040afee      arg2 = ((uint32_t)arg2);
0040aff2      /* tailcall */
0040aff2      return search_skipescapes<unsigned short>(arg1, arg2, arg3);
0040afe0  }

0040aff7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0040b000  char const* __thiscall PStringBaseIter_Const<char>::IndexToConstPointer(class PStringBaseIter_Const<char> const* this, uint32_t arg2)

0040b000  {
0040b003      class PSRefBufferCharData<char>* m_charbuffer = this->pstring_ptr->m_charbuffer;
0040b005      int32_t ecx = m_charbuffer->m_data[-4];
0040b005      
0040b00e      if (arg2 < ecx)
0040b019          return &m_charbuffer->m_data[arg2];
0040b019      
0040b014      return &m_charbuffer->m_data[(ecx - 1)];
0040b000  }

0040b01c                                                                                      cc cc cc cc                              ....

0040b020  class PStringBase<char>* __fastcall PStringBaseIter<char>::GetPStringPtr(class PStringBaseIter<char> const* this)

0040b020  {
0040b023      return this->pstring_ptr;
0040b020  }

0040b024              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040b030  char __thiscall PStringBaseIter_Const<char>::IndexToChar(class PStringBaseIter_Const<char> const* this, uint32_t arg2)

0040b030  {
0040b033      class PSRefBufferCharData<char>* m_charbuffer = this->pstring_ptr->m_charbuffer;
0040b035      int32_t ecx = m_charbuffer->m_data[-4];
0040b035      
0040b03e      if (arg2 >= ecx)
0040b03e      {
0040b040          m_charbuffer = m_charbuffer->m_data[(ecx - 1)];
0040b044          return m_charbuffer;
0040b03e      }
0040b03e      
0040b047      m_charbuffer = m_charbuffer->m_data[arg2];
0040b04a      return m_charbuffer;
0040b030  }

0040b04d                                         cc cc cc                                                               ...

0040b050  uint16_t const* __thiscall PStringBaseIter<unsigned short>::IndexToConstPointer(class PStringBaseIter<unsigned short> const* this, uint32_t arg2)

0040b050  {
0040b053      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->pstring_ptr->m_charbuffer;
0040b055      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0040b055      
0040b05e      if (arg2 < ecx)
0040b06a          return &m_charbuffer->m_data[arg2];
0040b06a      
0040b064      return &m_charbuffer->m_data[(ecx - 1)];
0040b050  }

0040b06d                                         cc cc cc                                                               ...

0040b070  uint16_t __thiscall PStringBaseIter<unsigned short>::IndexToChar(class PStringBaseIter<unsigned short> const* this, uint32_t arg2)

0040b070  {
0040b073      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->pstring_ptr->m_charbuffer;
0040b075      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0040b075      
0040b07e      if (arg2 >= ecx)
0040b07e      {
0040b080          m_charbuffer = m_charbuffer->m_data[(ecx - 1)];
0040b085          return m_charbuffer;
0040b07e      }
0040b07e      
0040b088      m_charbuffer = m_charbuffer->m_data[arg2];
0040b08c      return m_charbuffer;
0040b070  }

0040b08f                                               cc                                                                 .

0040b090  uint32_t __fastcall PStringBaseIter_Const<unsigned short>::GetStrLen(class PStringBaseIter_Const<unsigned short> const* this)

0040b090  {
0040b09b      return (this->pstring_ptr->m_charbuffer->m_data[0x7ffffffffffffffe] - 1);
0040b090  }

0040b09c                                                                                      cc cc cc cc                              ....

0040b0a0  uint8_t wildcard_match_iter<char>(class PStringBaseIter_Const<char>* arg1, class PStringBaseIter_Const<char>* arg2)

0040b0a0  {
0040b0a0      uint32_t ebx;
0040b0a0      uint32_t var_4 = ebx;
0040b0a3      class PStringBaseIter_Const<char>* esi = arg2;
0040b0a3      
0040b0b9      if (esi->vtable->IndexToChar(esi, esi->curr) != 0)
0040b0b9      {
0040b1eb          char i;
0040b1eb          
0040b1eb          do
0040b1eb          {
0040b0cd              int32_t eax_22;
0040b0cd              
0040b0cd              if (esi->vtable->IndexToChar(esi, esi->curr) != 0x2a)
0040b0cd              {
0040b162                  char eax_16 = esi->vtable->IndexToChar(esi, esi->curr);
0040b162                  
0040b167                  if (eax_16 != 0x3f)
0040b167                  {
0040b176                      ebx = arg1->vtable->IndexToChar(arg1, arg1->curr);
0040b191                      arg2 = tolower(((int32_t)esi->vtable->IndexToChar(esi, esi->curr)));
0040b195                      eax_22 = tolower(((int32_t)ebx));
0040b167                  }
0040b167                  
0040b1a0                  if ((eax_16 != 0x3f && arg2 != eax_22))
0040b1a0                  {
0040b214                      eax_22 = 0;
0040b217                      return 0;
0040b1a0                  }
0040b1a0                  
0040b1a9                  uint32_t ebx_4 = (arg1->curr + 1);
0040b1a9                  
0040b1b0                  if (ebx_4 <= arg1->vtable->GetStrLen(arg1))
0040b1bd                      arg1->curr = ebx_4;
0040b1b0                  else
0040b1b8                      arg1->curr = arg1->vtable->GetStrLen(arg1);
0040b1b8                  
0040b1c7                  ebx = (esi->curr + 1);
0040b1c7                  
0040b1ce                  if (ebx <= esi->vtable->GetStrLen(esi))
0040b1db                      esi->curr = ebx;
0040b1ce                  else
0040b1d6                      esi->curr = esi->vtable->GetStrLen(esi);
0040b0cd              }
0040b0cd              else
0040b0cd              {
0040b0d6                  uint32_t curr = esi->curr;
0040b0db                  arg2 = arg1->curr;
0040b0db                  
0040b0e8                  if ((curr + 1) <= esi->vtable->GetStrLen(esi))
0040b0f5                      esi->curr = (curr + 1);
0040b0e8                  else
0040b0f0                      esi->curr = esi->vtable->GetStrLen(esi);
0040b0f0                  
0040b104                  if (wildcard_match_iter<char>(arg1, esi) != 0)
0040b21e                      return 1;
0040b21e                  
0040b116                  if (arg2 <= arg1->vtable->GetStrLen(arg1))
0040b123                      arg1->curr = arg2;
0040b116                  else
0040b11e                      arg1->curr = arg1->vtable->GetStrLen(arg1);
0040b11e                  
0040b12e                  if (curr <= esi->vtable->GetStrLen(esi))
0040b13b                      esi->curr = curr;
0040b12e                  else
0040b136                      esi->curr = esi->vtable->GetStrLen(esi);
0040b136                  
0040b145                  ebx = (arg1->curr + 1);
0040b145                  
0040b14c                  if (ebx > arg1->vtable->GetStrLen(arg1))
0040b14c                  {
0040b20e                      arg1->curr = arg1->vtable->GetStrLen(arg1);
0040b214                      eax_22 = 0;
0040b217                      return 0;
0040b14c                  }
0040b14c                  
0040b152                  arg1->curr = ebx;
0040b0cd              }
0040b1e6              i = esi->vtable->IndexToChar(esi, esi->curr);
0040b1eb          } while (i != 0);
0040b0b9      }
0040b0b9      
0040b1f9      int32_t eax_31 = arg1->vtable->IndexToChar(arg1, arg1->curr);
0040b1fc      char temp0 = eax_31;
0040b1fc      eax_31 = -(eax_31);
0040b207      return (((int8_t)(eax_31 - eax_31)) + 1);
0040b0a0  }

0040b21f                                                                                               cc                                 .

0040b220  uint8_t __thiscall PStringBaseIter_Common<char>::FindChar(class PStringBaseIter_Common<char>* this, char arg2, uint8_t arg3)

0040b220  {
0040b22a      uint32_t curr;
0040b22a      int32_t ebx;
0040b22a      
0040b22a      if (arg3 == 0)
0040b22a      {
0040b26c          ebx = arg2;
0040b26c          
0040b272          if (this->vtable->IndexToChar(this, this->curr) == ebx)
0040b2b5              return 1;
0040b2b5          
0040b27b          while (true)
0040b27b          {
0040b27b              uint32_t edi_2 = (this->curr + 1);
0040b27b              
0040b282              if (edi_2 <= this->vtable->GetStrLen(this))
0040b28f                  this->curr = edi_2;
0040b282              else
0040b28a                  this->curr = this->vtable->GetStrLen(this);
0040b28a              
0040b29f              if (this->vtable->IndexToChar(this, this->curr) == 0)
0040b29f                  break;
0040b29f              
0040b2ae              if (this->vtable->IndexToChar(this, this->curr) == ebx)
0040b2b5                  return 1;
0040b27b          }
0040b22a      }
0040b22a      else
0040b22a      {
0040b22c          ebx = arg2;
0040b22c          
0040b230          while (true)
0040b230          {
0040b230              curr = this->curr;
0040b230              
0040b236              if (curr < 1)
0040b236              {
0040b252                  this->curr = 0;
0040b252                  break;
0040b236              }
0040b236              
0040b238              struct PStringBaseIter_Common<char>::VTable* vtable = this->vtable;
0040b240              this->curr = (curr - 1);
0040b240              
0040b248              if (vtable->IndexToChar(this, (curr - 1)) == ebx)
0040b24f                  return 1;
0040b230          }
0040b22a      }
0040b25b      curr = 0;
0040b25e      return 0;
0040b220  }

0040b2b8                                                                          cc cc cc cc cc cc cc cc                          ........

0040b2c0  uint8_t __thiscall PStringBaseIter_Common<unsigned short>::FindChar(class PStringBaseIter_Common<unsigned short>* this, uint16_t arg2, uint8_t arg3)

0040b2c0  {
0040b2ca      uint32_t curr;
0040b2ca      
0040b2ca      if (arg3 == 0)
0040b2ca      {
0040b30e          int32_t ebx;
0040b30e          ebx = arg2;
0040b30e          
0040b316          if (this->vtable->IndexToChar(this, this->curr) == ebx)
0040b316          {
0040b358          label_40b358:
0040b358              uint16_t eax_4;
0040b358              eax_4 = 1;
0040b35b              return 1;
0040b316          }
0040b316          
0040b31f          while (true)
0040b31f          {
0040b31f              uint32_t edi_2 = (this->curr + 1);
0040b31f              
0040b326              if (edi_2 <= this->vtable->GetStrLen(this))
0040b333                  this->curr = edi_2;
0040b326              else
0040b32e                  this->curr = this->vtable->GetStrLen(this);
0040b32e              
0040b344              if (this->vtable->IndexToChar(this, this->curr) == 0)
0040b344                  break;
0040b344              
0040b354              if (this->vtable->IndexToChar(this, this->curr) == ebx)
0040b354                  goto label_40b358;
0040b31f          }
0040b2ca      }
0040b2ca      else
0040b2ca      {
0040b2cc          int32_t edi;
0040b2cc          edi = arg2;
0040b2cc          
0040b2d1          while (true)
0040b2d1          {
0040b2d1              curr = this->curr;
0040b2d1              
0040b2d7              if (curr < 1)
0040b2d7              {
0040b2f4                  this->curr = 0;
0040b2f4                  break;
0040b2d7              }
0040b2d7              
0040b2d9              struct PStringBaseIter_Common<unsigned short>::VTable* vtable = this->vtable;
0040b2e1              this->curr = (curr - 1);
0040b2e1              
0040b2ea              if (vtable->IndexToChar(this, (curr - 1)) == edi)
0040b2ea              {
0040b2ee                  uint16_t eax_2;
0040b2ee                  eax_2 = 1;
0040b2f1                  return 1;
0040b2ea              }
0040b2d1          }
0040b2ca      }
0040b2ca      
0040b2fd      curr = 0;
0040b300      return 0;
0040b2c0  }

0040b35e                                                                                            cc cc                                ..

0040b360  uint8_t template_find_extension<char>(class PStringBaseIter<char>* arg1)

0040b360  {
0040b369      uint32_t eax_1 = arg1->vtable->GetStrLen(arg1);
0040b36b      arg1->curr = eax_1;
0040b36e      arg1->mark = eax_1;
0040b371      uint32_t curr;
0040b371      
0040b371      while (true)
0040b371      {
0040b371          curr = arg1->curr;
0040b371          
0040b377          if (curr < 1)
0040b377          {
0040b3a2              arg1->curr = 0;
0040b3a9          label_40b3a9:
0040b3a9              curr = 0;
0040b3ac              return 0;
0040b377          }
0040b377          
0040b379          struct PStringBaseIter_Common<char>::VTable* vtable = arg1->vtable;
0040b381          arg1->curr = (curr - 1);
0040b384          curr = vtable->IndexToChar(arg1, (curr - 1));
0040b384          
0040b389          if (curr == 0x2e)
0040b389              break;
0040b389          
0040b38b          char const* const edx_1 = "\/:";
0040b38b          
0040b39e          for (char i = 0x5c; i != 0; )
0040b39e          {
0040b394              if (i == curr)
0040b394                  goto label_40b3a9;
0040b394              
0040b396              i = edx_1[1];
0040b399              edx_1 = &edx_1[1];
0040b39e          }
0040b371      }
0040b371      
0040b3ad      curr = 1;
0040b3b0      return 1;
0040b360  }

0040b3b1                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

0040b3c0  uint8_t __thiscall List<PStringBase<char> >::push_back(class List<PStringBase<char> >* this, class PStringBase<char> const* arg2)

0040b3c0  {
0040b3cb      class ListNode<PStringBase<char> >* esi = operator new(0xc);
0040b3cb      
0040b3d2      if (esi == 0)
0040b3d2      {
0040b40e          void* eax;
0040b40e          eax = 0;
0040b411          return 0;
0040b3d2      }
0040b3d2      
0040b3d8      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0040b3da      esi->data.m_charbuffer = m_charbuffer;
0040b3e0      char result = InterlockedIncrement(&m_charbuffer[-1]);
0040b3e6      esi->next = nullptr;
0040b3ed      esi->prev = nullptr;
0040b3ed      
0040b3f8      if (this->_head == 0)
0040b3f8      {
0040b3ff          this->_num_elements += 1;
0040b402          this->_head = esi;
0040b405          this->_tail = esi;
0040b40a          return result;
0040b3f8      }
0040b3f8      
0040b414      class ListNode<PStringBase<char> >* _tail = this->_tail;
0040b417      _tail->next = esi;
0040b41a      esi->prev = _tail;
0040b422      this->_num_elements += 1;
0040b425      this->_tail = esi;
0040b42a      return _tail;
0040b3c0  }

0040b42d                                         cc cc cc                                                               ...

0040b430  uint8_t __thiscall PStringBaseIter_Common<char>::FindChar(class PStringBaseIter_Common<char>* this, class PStringBase<char> const* arg2, uint8_t arg3)

0040b430  {
0040b442      int32_t var_10 = 0x79448c;
0040b44a      class PStringBase<char>* var_4 = arg2;
0040b44e      int32_t var_c = 0;
0040b452      int32_t var_8 = 0;
0040b456      uint32_t curr;
0040b456      
0040b456      if (arg3 == 0)
0040b456      {
0040b4b2          if (PStringBaseIter_Common<char>::FindChar(&var_10, this->vtable->IndexToChar(this, this->curr), 0) != 0)
0040b507              return 1;
0040b507          
0040b4bb          while (true)
0040b4bb          {
0040b4bb              uint32_t edi_2 = (this->curr + 1);
0040b4bb              
0040b4c2              if (edi_2 <= this->vtable->GetStrLen(this))
0040b4cf                  this->curr = edi_2;
0040b4c2              else
0040b4ca                  this->curr = this->vtable->GetStrLen(this);
0040b4ca              
0040b4df              if (this->vtable->IndexToChar(this, this->curr) == 0)
0040b4df                  break;
0040b4df              
0040b4ea              int32_t var_c_2 = 0;
0040b4ea              
0040b4fd              if (PStringBaseIter_Common<char>::FindChar(&var_10, this->vtable->IndexToChar(this, this->curr), 0) != 0)
0040b507                  return 1;
0040b4bb          }
0040b456      }
0040b456      else
0040b456      {
0040b458          while (true)
0040b458          {
0040b458              curr = this->curr;
0040b458              
0040b45e              if (curr < 1)
0040b45e              {
0040b48c                  this->curr = 0;
0040b48c                  break;
0040b45e              }
0040b45e              
0040b460              struct PStringBaseIter_Common<char>::VTable* vtable = this->vtable;
0040b469              this->curr = (curr - 1);
0040b46c              int32_t var_c_1 = 0;
0040b46c              
0040b47f              if (PStringBaseIter_Common<char>::FindChar(&var_10, vtable->IndexToChar(this, (curr - 1)), 0) != 0)
0040b489                  return 1;
0040b458          }
0040b456      }
0040b456      
0040b491      curr = 0;
0040b497      return 0;
0040b430  }

0040b50a                                cc cc cc cc cc cc                                                            ......

0040b510  void __thiscall PStringBase<char>::PStringBase<char>(class PStringBase<char>* this, char arg2)

0040b510  {
0040b511      int32_t ebx;
0040b511      ebx = arg2;
0040b511      
0040b51a      if (ebx == 0)
0040b51a      {
0040b51c          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040b527          this->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040b529          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0040b533          return;
0040b51a      }
0040b51a      
0040b538      void* eax_1 = operator new[](0x24);
0040b538      
0040b542      if (eax_1 != 0)
0040b542      {
0040b549          *(uint32_t*)((char*)eax_1 + 4) = 1;
0040b54c          *(uint32_t*)eax_1 = 0x7ca074;
0040b552          *(uint32_t*)((char*)eax_1 + 0x10) = 1;
0040b555          *(uint32_t*)((char*)eax_1 + 8) = 1;
0040b558          *(uint32_t*)((char*)eax_1 + 0xc) = 0xffffffff;
0040b562          *(uint8_t*)((char*)eax_1 + 0x14) = 0;
0040b565          this->m_charbuffer = ((char*)eax_1 + 0x14);
0040b567          *(uint32_t*)((char*)eax_1 + 0x10) = 2;
0040b570          *(uint32_t*)(this->m_charbuffer - 0xc) = 0x10;
0040b542      }
0040b542      
0040b577      this->m_charbuffer->m_data[0] = ebx;
0040b57b      this->m_charbuffer->m_data[1] = 0;
0040b510  }

0040b588                          cc cc cc cc cc cc cc cc                                                          ........

0040b590  void __thiscall PStringBase<unsigned short>::append_string(class PStringBase<unsigned short>* this, uint16_t const* arg2)

0040b590  {
0040b5a0      if ((arg2 != 0 && *(uint16_t*)arg2 != 0))
0040b5b0          PStringBase<unsigned short>::append_n_chars(this, arg2, wcslen(arg2));
0040b590  }

0040b5ba                                                                                cc cc cc cc cc cc                            ......

0040b5c0  uint8_t __thiscall PStringBaseIter_Common<unsigned short>::GetSubString(class PStringBaseIter_Common<unsigned short> const* this, class PStringBase<unsigned short>* arg2)

0040b5c0  {
0040b5c0      uint32_t mark = this->mark;
0040b5c3      uint32_t curr = this->curr;
0040b5cb      uint16_t* eax;
0040b5cb      uint32_t esi;
0040b5cb      
0040b5cb      if (mark >= curr)
0040b5cb      {
0040b5d9          uint32_t curr_1 = this->curr;
0040b5de          esi = (mark - curr_1);
0040b5e3          eax = this->vtable->IndexToConstPointer(this, curr_1);
0040b5cb      }
0040b5cb      else
0040b5cb      {
0040b5cf          esi = (curr - mark);
0040b5d4          eax = this->vtable->IndexToConstPointer(this, mark);
0040b5cb      }
0040b5cb      
0040b5ec      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0040b5ec      
0040b5f5      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
0040b5f5      {
0040b60b          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0040b613              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040b613          
0040b615          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040b620          arg2->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
0040b623          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0040b5f5      }
0040b5f5      
0040b62c      if (esi > 0)
0040b632          PStringBase<unsigned short>::append_n_chars(arg2, eax, esi);
0040b632      
0040b639      m_charbuffer = 1;
0040b63c      return 1;
0040b5c0  }

0040b63f                                                                                               cc                                 .

0040b640  class PStringBase<unsigned short>* __thiscall PStringBaseIter_Common<unsigned short>::GetSubString(class PStringBaseIter_Common<unsigned short> const* this, class PStringBase<unsigned short>* __return)

0040b640  {
0040b640      class PStringBaseIter_Common<unsigned short>* var_4 = this;
0040b641      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040b64f      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
0040b659      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0040b662      PStringBaseIter_Common<unsigned short>::GetSubString(this, &var_4);
0040b667      class PStringBaseIter_Common<unsigned short>* esi_1 = var_4;
0040b673      __return->m_charbuffer = esi_1;
0040b675      InterlockedIncrement(&esi_1[-1]);
0040b675      
0040b68a      if ((InterlockedDecrement(&esi_1[-1]) == 0 && esi_1 != 0x14))
0040b692          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0040b692      
0040b69a      return __return;
0040b640  }

0040b69d                                                                                         cc cc cc                               ...

0040b6a0  uint8_t __fastcall PStringBaseIter<unsigned short>::Truncate(class PStringBaseIter<unsigned short>* this)

0040b6a0  {
0040b6a7      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->pstring_ptr->m_charbuffer;
0040b6ae      InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
0040b6b4      class PStringBase<unsigned short>* pstring_ptr = this->pstring_ptr;
0040b6b7      class PSRefBufferCharData<unsigned short>* m_charbuffer = pstring_ptr->m_charbuffer;
0040b6b7      
0040b6bf      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
0040b6bf      {
0040b6c1          int32_t ebp;
0040b6c1          int32_t var_14_1 = ebp;
0040b6c1          
0040b6d5          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0040b6de              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040b6de          
0040b6e0          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040b6ec          pstring_ptr->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
0040b6ee          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0040b6bf      }
0040b6bf      
0040b6f5      uint32_t curr = this->curr;
0040b6f5      
0040b6fa      if (curr > 0)
0040b701          PStringBase<unsigned short>::append_n_chars(this->pstring_ptr, m_charbuffer_1, curr);
0040b701      
0040b706      uint32_t curr_1 = this->curr;
0040b706      
0040b70c      if (this->mark > curr_1)
0040b70e          this->mark = curr_1;
0040b70e      
0040b724      if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
0040b72c          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0040b72c      
0040b730      int32_t eax_4;
0040b730      eax_4 = 1;
0040b733      return 1;
0040b6a0  }

0040b734                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0040b740  class SmartBuffer* PSUtils::get_binary_buffer_from_string(class SmartBuffer* __return, class PStringBase<char> const* arg2)

0040b740  {
0040b74c      if (((*(uint8_t*)$S83) & 1) == 0)
0040b74c      {
0040b74e          $S83 |= 1;
0040b75c          archive.vtable = 0x792b3c;
0040b766          archive.m_flags = 0;
0040b76c          archive.m_hrError.m_val = 0;
0040b772          SmartBuffer::SmartBuffer(&archive.m_buffer);
0040b77c          archive.m_currOffset = 0;
0040b782          archive.m_pcUserDataHash = nullptr;
0040b788          archive.m_pVersionStack = nullptr;
0040b78e          archive.vtable = 0x792b50;
0040b798          atexit($E84);
0040b74c      }
0040b74c      
0040b7b4      void var_c;
0040b7b4      Archive::InitForPacking(&archive, &Archive::SetCurrentCoreVersion, SmartBuffer::SmartBuffer(&var_c));
0040b7bd      SmartBuffer::~SmartBuffer(&var_c);
0040b7c6      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0040b7cb      void* ebp = &m_charbuffer->m_data[(m_charbuffer->m_data[-4] - 1)];
0040b7d1      char var_e = 0;
0040b7d1      
0040b7d6      if (m_charbuffer < ebp)
0040b7d6      {
0040b7d8          int32_t ebx;
0040b7d8          int32_t var_1c_1 = ebx;
0040b7d8          
0040b845          do
0040b845          {
0040b7ef              if (isspace(((int32_t)m_charbuffer->m_data[0])) == 0)
0040b7ef              {
0040b7f6                  int32_t eax_2;
0040b7f6                  eax_2 = m_charbuffer->m_data[0];
0040b7f8                  char var_10 = eax_2;
0040b80e                  char var_f_1 = m_charbuffer->m_data[1];
0040b812                  m_charbuffer = &m_charbuffer->m_data[2];
0040b821                  ebx = strtoul(&var_10, &arg2, 0x10);
0040b823                  Archive::CheckAlignment(&archive, 1);
0040b82f                  uint8_t* eax_4 = Archive::GetBytes(&archive, 1);
0040b82f                  
0040b83f                  if ((eax_4 != 0 && (archive.m_flags & 1) != 0))
0040b841                      *(uint8_t*)eax_4 = ebx;
0040b7ef              }
0040b7ef              else
0040b7f1                  m_charbuffer = &m_charbuffer->m_data[1];
0040b845          } while (m_charbuffer < ebp);
0040b7d6      }
0040b7d6      
0040b853      Archive::GetSerializedBuffer(&archive, __return);
0040b85f      return __return;
0040b740  }


0040b860  class PStringBase<char>* __thiscall PStringBase<char>::operator+(class PStringBase<char> const* this, class PStringBase<char>* __return, class PStringBase<char> const* arg3)

0040b860  {
0040b860      class PStringBase<char>* var_4 = this;
0040b869      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040b876      var_4 = PStringBase<char>::s_NullBuffer_1;
0040b87a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040b87a      
0040b88f      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0040b897          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0040b897      
0040b8b1      PStringBase<char>::allocate_ref_buffer(&var_4, ((arg3->m_charbuffer->m_data[-4] + this->m_charbuffer->m_data[-4]) - 2));
0040b8b6      class PStringBase<char>* esi_1 = var_4;
0040b8ba      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
0040b8bc      char* edx_3 = esi_1;
0040b8cc      char i;
0040b8cc      
0040b8cc      do
0040b8cc      {
0040b8c0          i = m_charbuffer->m_data[0];
0040b8c2          *(uint8_t*)edx_3 = i;
0040b8c4          m_charbuffer = &m_charbuffer->m_data[1];
0040b8c7          edx_3 = &edx_3[1];
0040b8cc      } while (i != 0);
0040b8d3      class PSRefBufferCharData<char>* m_charbuffer_1 = arg3->m_charbuffer;
0040b8d5      void* edx_5 = ((this->m_charbuffer->m_data[-4] + esi_1) - 1);
0040b8ec      int32_t eax_4;
0040b8ec      
0040b8ec      do
0040b8ec      {
0040b8e0          eax_4 = m_charbuffer_1->m_data[0];
0040b8e2          *(uint8_t*)edx_5 = eax_4;
0040b8e4          m_charbuffer_1 = &m_charbuffer_1->m_data[1];
0040b8e7          edx_5 += 1;
0040b8ec      } while (eax_4 != 0);
0040b8f6      __return->m_charbuffer = esi_1;
0040b8f8      InterlockedIncrement(&esi_1[-4]);
0040b8f8      
0040b90d      if ((InterlockedDecrement(&esi_1[-4]) == 0 && esi_1 != 0x14))
0040b915          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0040b915      
0040b91d      return __return;
0040b860  }


0040b920  uint8_t template_explode<unsigned short>(class PStringBase<unsigned short> const* arg1, uint16_t arg2, class List<PStringBase<unsigned short> >* arg3)

0040b920  {
0040b927      class PStringBase<unsigned short>* var_4 = arg1;
0040b932      int32_t var_10 = 0x79449c;
0040b93a      int32_t var_c = 0;
0040b93e      int32_t var_8 = 0;
0040b94b      class PStringBaseIter<unsigned short>* ecx;
0040b94b      
0040b94b      if (PStringBaseIter<unsigned short>::IndexToChar(ecx, 0) != 0)
0040b94b      {
0040b960          while (true)
0040b960          {
0040b960              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040b965              arg1 = PStringBase<unsigned short>::s_NullBuffer_1;
0040b96d              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0040b97a              PStringBaseIter_Common<unsigned short>::FindChar(&var_10, arg2, 0);
0040b97a              
0040b98f              if (PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, &arg1) == 0)
0040b98f                  break;
0040b98f              
0040b997              void* eax_4 = operator new(0xc);
0040b99c              class PStringBase<unsigned short>* ebp_1 = arg1;
0040b9a0              class ListNode<PStringBase<unsigned short> >* esi_1 = eax_4;
0040b9a0              
0040b9a7              if (esi_1 != 0)
0040b9a7              {
0040b9ad                  esi_1->data.m_charbuffer = ebp_1;
0040b9af                  InterlockedIncrement(&ebp_1[-4]);
0040b9b3                  esi_1->next = nullptr;
0040b9b6                  esi_1->prev = nullptr;
0040b9b6                  
0040b9bc                  if (arg3->_head != 0)
0040b9bc                  {
0040b9c3                      class ListNode<PStringBase<unsigned short> >* _tail = arg3->_tail;
0040b9c6                      _tail->next = esi_1;
0040b9c9                      esi_1->prev = _tail;
0040b9bc                  }
0040b9bc                  else
0040b9be                      arg3->_head = esi_1;
0040b9be                  
0040b9cc                  arg3->_num_elements += 1;
0040b9d0                  arg3->_tail = esi_1;
0040b9a7              }
0040b9a7              
0040b9e6              if ((var_c + 1) <= *(uint32_t*)var_10())
0040b9f8                  int32_t var_8_2 = (var_c + 1);
0040b9e6              else
0040b9f2                  int32_t var_8_1 = *(uint32_t*)var_10();
0040b9f2              
0040ba0f              if ((var_c + 1) <= *(uint32_t*)var_10())
0040ba21                  var_c += 1;
0040ba0f              else
0040ba1b                  var_c = *(uint32_t*)var_10();
0040ba1b              
0040ba38              if ((InterlockedDecrement(&ebp_1[-4]) == 0 && ebp_1 != 0x14))
0040ba40                  *(uint32_t*)*(int32_t*)((char*)ebp_1 + -0x14)(1);
0040ba40              
0040ba55              if (*(uint32_t*)(var_10 + 8)(var_c) == 0)
0040ba55              {
0040ba5f                  int16_t eax_14;
0040ba5f                  eax_14 = 1;
0040ba64                  return 1;
0040ba55              }
0040b960          }
0040b960          
0040ba69          void* __offset(PStringBase<unsigned short>, -0x14) esi_8 = &arg1[-5];
0040ba69          
0040ba7c          if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
0040ba84              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
0040b94b      }
0040b94b      
0040ba8a      int32_t eax_1;
0040ba8a      eax_1 = 1;
0040ba8f      return 1;
0040b920  }


0040ba90  uint8_t __thiscall PStringBaseIter<unsigned short>::Replace(class PStringBaseIter<unsigned short>* this, class PStringBase<unsigned short> const* arg2)

0040ba90  {
0040ba98      uint32_t curr = this->curr;
0040ba9b      uint32_t mark = this->mark;
0040baa1      uint32_t curr_2;
0040baa1      uint32_t var_4;
0040baa1      uint32_t ebp;
0040baa1      
0040baa1      if (curr >= mark)
0040baa1      {
0040baaf          var_4 = mark;
0040bab3          curr_2 = curr;
0040bab7          ebp = curr;
0040baa1      }
0040baa1      else
0040baa1      {
0040baa3          ebp = mark;
0040baa5          var_4 = curr;
0040baa9          curr_2 = ebp;
0040baa1      }
0040baa1      
0040babc      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this->pstring_ptr->m_charbuffer;
0040bac2      InterlockedIncrement(&m_charbuffer_2->m_data[-8]);
0040bac8      class PStringBase<unsigned short>* pstring_ptr = this->pstring_ptr;
0040bacb      class PSRefBufferCharData<unsigned short>* m_charbuffer = pstring_ptr->m_charbuffer;
0040bacb      
0040bad3      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
0040bad3      {
0040bae8          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0040baf1              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040baf1          
0040baf3          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040baff          pstring_ptr->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
0040bb01          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0040bb07          ebp = curr_2;
0040bad3      }
0040bad3      
0040bb11      if (var_4 != 0)
0040bb18          PStringBase<unsigned short>::append_n_chars(this->pstring_ptr, m_charbuffer_2, var_4);
0040bb18      
0040bb21      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_charbuffer;
0040bb23      int32_t ecx_3 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0040bb23      
0040bb29      if (ecx_3 != 1)
0040bb33          PStringBase<unsigned short>::append_n_chars(this->pstring_ptr, m_charbuffer_1, (ecx_3 - 1));
0040bb33      
0040bb38      int32_t eax_5 = m_charbuffer_2->m_data[0x7ffffffffffffffe];
0040bb3d      void* ecx_6 = &m_charbuffer_2->m_data[(eax_5 - 1)];
0040bb3d      
0040bb41      if (ebp < eax_5)
0040bb43          ecx_6 = &m_charbuffer_2->m_data[ebp];
0040bb43      
0040bb4a      if (*(uint16_t*)ecx_6 != 0)
0040bb4a      {
0040bb4e          void* edi = &m_charbuffer_2->m_data[(eax_5 - 1)];
0040bb4e          
0040bb52          if (ebp < eax_5)
0040bb54              edi = &m_charbuffer_2->m_data[ebp];
0040bb54          
0040bb66          if ((edi != 0 && *(uint16_t*)edi != 0))
0040bb78              PStringBase<unsigned short>::append_n_chars(this->pstring_ptr, edi, wcslen(edi));
0040bb4a      }
0040bb4a      
0040bb86      uint32_t curr_1 = this->curr;
0040bb8b      uint32_t edx_6 = (ebp - var_4);
0040bb8f      int32_t eax_9 = (arg2->m_charbuffer->m_data[0x7ffffffffffffffe] - 1);
0040bb8f      
0040bb94      if (curr_1 != ebp)
0040bba1          this->mark += (eax_9 - edx_6);
0040bb94      else
0040bb9a          this->curr = ((curr_1 - edx_6) + eax_9);
0040bb9a      
0040bbb7      if ((InterlockedDecrement(&m_charbuffer_2->m_data[-8]) == 0 && m_charbuffer_2 != 0x14))
0040bbbf          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0040bbbf      
0040bbc4      int32_t eax_11;
0040bbc4      eax_11 = 1;
0040bbca      return 1;
0040ba90  }

0040bbcd                                         cc cc cc                                                               ...

0040bbd0  uint8_t __thiscall PStringBaseIter_Common<char>::GetSubString(class PStringBaseIter_Common<char> const* this, class PStringBase<char>* arg2)

0040bbd0  {
0040bbd0      uint32_t mark = this->mark;
0040bbd3      uint32_t curr = this->curr;
0040bbdb      char* eax;
0040bbdb      uint32_t esi;
0040bbdb      
0040bbdb      if (mark >= curr)
0040bbdb      {
0040bbe9          uint32_t curr_1 = this->curr;
0040bbee          esi = (mark - curr_1);
0040bbf3          eax = this->vtable->IndexToConstPointer(this, curr_1);
0040bbdb      }
0040bbdb      else
0040bbdb      {
0040bbdf          esi = (curr - mark);
0040bbe4          eax = this->vtable->IndexToConstPointer(this, mark);
0040bbdb      }
0040bbdb      
0040bbfc      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0040bbfc      
0040bc05      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0040bc05      {
0040bc1b          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040bc23              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040bc23          
0040bc25          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040bc30          arg2->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040bc33          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0040bc05      }
0040bc05      
0040bc3c      if (esi > 0)
0040bc42          PStringBase<char>::append_n_chars(arg2, eax, esi);
0040bc42      
0040bc49      m_charbuffer = 1;
0040bc4c      return 1;
0040bbd0  }

0040bc4f                                               cc                                                                 .

0040bc50  class PStringBase<char>* __thiscall PStringBaseIter_Common<char>::GetSubString(class PStringBaseIter_Common<char> const* this, class PStringBase<char>* __return)

0040bc50  {
0040bc50      class PStringBaseIter_Common<char>* var_4 = this;
0040bc51      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040bc5f      var_4 = PStringBase<char>::s_NullBuffer_1;
0040bc69      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040bc72      PStringBaseIter_Common<char>::GetSubString(this, &var_4);
0040bc77      class PStringBaseIter_Common<char>* esi_1 = var_4;
0040bc83      __return->m_charbuffer = esi_1;
0040bc85      InterlockedIncrement(&esi_1[-1]);
0040bc85      
0040bc9a      if ((InterlockedDecrement(&esi_1[-1]) == 0 && esi_1 != 0x14))
0040bca2          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0040bca2      
0040bcaa      return __return;
0040bc50  }

0040bcad                                         cc cc cc                                                               ...

0040bcb0  uint8_t __fastcall PStringBaseIter<char>::Truncate(class PStringBaseIter<char>* this)

0040bcb0  {
0040bcb7      class PSRefBufferCharData<char>* m_charbuffer_1 = this->pstring_ptr->m_charbuffer;
0040bcbe      InterlockedIncrement(&m_charbuffer_1[-1]);
0040bcc4      class PStringBase<char>* pstring_ptr = this->pstring_ptr;
0040bcc7      class PSRefBufferCharData<char>* m_charbuffer = pstring_ptr->m_charbuffer;
0040bcc7      
0040bccf      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0040bccf      {
0040bcd1          int32_t ebp;
0040bcd1          int32_t var_14_1 = ebp;
0040bcd1          
0040bce5          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040bcee              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040bcee          
0040bcf0          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040bcfc          pstring_ptr->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040bcfe          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0040bccf      }
0040bccf      
0040bd05      uint32_t curr = this->curr;
0040bd05      
0040bd0a      if (curr > 0)
0040bd11          PStringBase<char>::append_n_chars(this->pstring_ptr, m_charbuffer_1, curr);
0040bd11      
0040bd16      uint32_t curr_1 = this->curr;
0040bd16      
0040bd1c      if (this->mark > curr_1)
0040bd1e          this->mark = curr_1;
0040bd1e      
0040bd34      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0040bd3c          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0040bd3c      
0040bd40      int32_t eax_4;
0040bd40      eax_4 = 1;
0040bd43      return 1;
0040bcb0  }

0040bd44              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040bd50  uint8_t __fastcall PStringBaseIter<char>::Behead(class PStringBaseIter<char>* this)

0040bd50  {
0040bd57      if (this->curr != 0)
0040bd57      {
0040bd61          class PSRefBufferCharData<char>* m_charbuffer_1 = this->pstring_ptr->m_charbuffer;
0040bd69          InterlockedIncrement(&m_charbuffer_1[-1]);
0040bd6f          class PStringBase<char>* pstring_ptr = this->pstring_ptr;
0040bd72          class PSRefBufferCharData<char>* m_charbuffer = pstring_ptr->m_charbuffer;
0040bd72          
0040bd7a          if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0040bd7a          {
0040bd8f              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040bd98                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040bd98              
0040bd9a              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040bda6              pstring_ptr->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040bda8              InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0040bd7a          }
0040bd7a          
0040bdae          int32_t ecx_2 = m_charbuffer_1->m_data[-4];
0040bdb1          uint32_t curr = this->curr;
0040bdb6          void* ecx_3 = &m_charbuffer_1->m_data[(ecx_2 - 1)];
0040bdb6          
0040bdba          if (curr < ecx_2)
0040bdbc              ecx_3 = &m_charbuffer_1->m_data[curr];
0040bdbc          
0040bdc8          if ((ecx_3 != 0 && *(uint8_t*)ecx_3 != 0))
0040bdc8          {
0040bdca              void* eax_4 = ecx_3;
0040bdcc              void* edi_1 = ((char*)eax_4 + 1);
0040bdd7              char i;
0040bdd7              
0040bdd7              do
0040bdd7              {
0040bdd0                  i = *(uint8_t*)eax_4;
0040bdd2                  eax_4 += 1;
0040bdd7              } while (i != 0);
0040bde0              PStringBase<char>::append_n_chars(this->pstring_ptr, ecx_3, ((char*)eax_4 - edi_1));
0040bdc8          }
0040bdc8          
0040bde5          uint32_t mark = this->mark;
0040bde8          uint32_t curr_1 = this->curr;
0040bde8          
0040bded          if (mark < curr_1)
0040bdf6              this->mark = 0;
0040bded          else
0040bdf1              this->mark = (mark - curr_1);
0040bdf1          
0040bdf9          this->curr = 0;
0040bdf9          
0040be0f          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0040be17              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0040bd57      }
0040bd57      
0040be1c      int32_t eax;
0040be1c      eax = 1;
0040be1f      return 1;
0040bd50  }


0040be20  uint8_t __thiscall List<PStringBase<unsigned short> >::pop_front(class List<PStringBase<unsigned short> >* this, class PStringBase<unsigned short>* arg2)

0040be20  {
0040be24      class ListNode<PStringBase<unsigned short> >* _head = this->_head;
0040be24      
0040be2b      if (_head == 0)
0040be2b      {
0040be2e          int32_t eax;
0040be2e          eax = 0;
0040be31          return 0;
0040be2b      }
0040be2b      
0040be34      class ListNode<PStringBase<unsigned short> >* next = _head->next;
0040be39      this->_head = next;
0040be39      
0040be3c      if (next == 0)
0040be43          this->_tail = nullptr;
0040be3c      else
0040be3e          next->prev = nullptr;
0040be3e      
0040be4b      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0040be4b      
0040be51      if (m_charbuffer != _head->data.m_charbuffer)
0040be51      {
0040be66          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0040be6e              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040be6e          
0040be70          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = _head->data.m_charbuffer;
0040be72          arg2->m_charbuffer = m_charbuffer_1;
0040be79          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
0040be51      }
0040be51      
0040be81      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = (_head->data.m_charbuffer - 0x14);
0040be81      
0040be94      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0040be9c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0040be9c      
0040be9f      operator delete(_head);
0040bea4      this->_num_elements -= 1;
0040beae      int32_t eax_6;
0040beae      eax_6 = 1;
0040beb1      return 1;
0040be20  }

0040beb4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0040bec0  uint8_t PSUtils::explode(class PStringBase<unsigned short> const* arg1, wchar16 arg2, class List<PStringBase<unsigned short> >* arg3)

0040bec0  {
0040bec0      /* tailcall */
0040bec0      return template_explode<unsigned short>(arg1, arg2, arg3);
0040bec0  }

0040bec5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040bed0  class PStringBase<char>* PSUtils::get_process_name(class PStringBase<char>* __return)

0040bed0  {
0040bee3      char lpFilename = 0;
0040bee8      GetModuleFileNameA(nullptr, &lpFilename, 0x104);
0040befc      PStringBase<char>::PStringBase<char>(__return, &lpFilename);
0040bf0a      return __return;
0040bed0  }

0040bf0b                                   cc cc cc cc cc                                                             .....

0040bf10  uint8_t PSUtils::GetEnvironmentVariableA(class PStringBase<unsigned short> const* arg1, class PStringBase<unsigned short>* arg2)

0040bf10  {
0040bf1b      int32_t var_14 = 0;
0040bf1d      int32_t var_18 = 0;
0040bf1f      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg1->m_charbuffer;
0040bf26      int32_t esi = kernel32_GetEnvironmentVariableW_Ptr();
0040bf26      
0040bf2a      if (esi != 0)
0040bf2a      {
0040bf35          _chkstk();
0040bf3e          int32_t var_14_1 = esi;
0040bf3f          int32_t __saved_edi;
0040bf3f          int32_t* var_18_1 = &__saved_edi;
0040bf40          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg1->m_charbuffer;
0040bf40          
0040bf49          if (kernel32_GetEnvironmentVariableW_Ptr() < esi)
0040bf49          {
0040bf59              PStringBase<unsigned short>::set(arg2, &__saved_edi);
0040bf5e              int32_t eax_4;
0040bf5e              eax_4 = 1;
0040bf67              return 1;
0040bf49          }
0040bf2a      }
0040bf2a      
0040bf4b      int32_t eax_1;
0040bf4b      eax_1 = 0;
0040bf54      return 0;
0040bf10  }

0040bf68                          cc cc cc cc cc cc cc cc                                                          ........

0040bf70  uint8_t template_explode<char>(class PStringBase<char> const* arg1, char arg2, class List<PStringBase<char> >* arg3)

0040bf70  {
0040bf77      class PStringBase<char>* var_4 = arg1;
0040bf82      int32_t var_10 = 0x79448c;
0040bf8a      int32_t var_c = 0;
0040bf8e      int32_t var_8 = 0;
0040bf9a      class PStringBaseIter_Const<char>* ecx;
0040bf9a      
0040bf9a      if (PStringBaseIter_Const<char>::IndexToChar(ecx, 0) != 0)
0040bf9a      {
0040bfb0          while (true)
0040bfb0          {
0040bfb0              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040bfb5              arg1 = PStringBase<char>::s_NullBuffer_1;
0040bfbd              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040bfca              PStringBaseIter_Common<char>::FindChar(&var_10, arg2, 0);
0040bfca              
0040bfdf              if (PStringBaseIter_Common<char>::GetSubString(&var_10, &arg1) == 0)
0040bfdf                  break;
0040bfdf              
0040bfe7              void* eax_4 = operator new(0xc);
0040bfec              class PStringBase<char>* ebp_1 = arg1;
0040bff0              class ListNode<PStringBase<char> >* esi_1 = eax_4;
0040bff0              
0040bff7              if (esi_1 != 0)
0040bff7              {
0040bffd                  esi_1->data.m_charbuffer = ebp_1;
0040bfff                  InterlockedIncrement(&ebp_1[-4]);
0040c003                  esi_1->next = nullptr;
0040c006                  esi_1->prev = nullptr;
0040c006                  
0040c00c                  if (arg3->_head != 0)
0040c00c                  {
0040c013                      class ListNode<PStringBase<char> >* _tail = arg3->_tail;
0040c016                      _tail->next = esi_1;
0040c019                      esi_1->prev = _tail;
0040c00c                  }
0040c00c                  else
0040c00e                      arg3->_head = esi_1;
0040c00e                  
0040c01c                  arg3->_num_elements += 1;
0040c020                  arg3->_tail = esi_1;
0040bff7              }
0040bff7              
0040c036              if ((var_c + 1) <= *(uint32_t*)var_10())
0040c048                  int32_t var_8_2 = (var_c + 1);
0040c036              else
0040c042                  int32_t var_8_1 = *(uint32_t*)var_10();
0040c042              
0040c05f              if ((var_c + 1) <= *(uint32_t*)var_10())
0040c071                  var_c += 1;
0040c05f              else
0040c06b                  var_c = *(uint32_t*)var_10();
0040c06b              
0040c088              if ((InterlockedDecrement(&ebp_1[-4]) == 0 && ebp_1 != 0x14))
0040c090                  *(uint32_t*)*(int32_t*)((char*)ebp_1 + -0x14)(1);
0040c090              
0040c0a4              if (*(uint32_t*)(var_10 + 8)(var_c) == 0)
0040c0b3                  return 1;
0040bfb0          }
0040bfb0          
0040c0b8          void* __offset(PStringBase<char>, -0x14) esi_8 = &arg1[-5];
0040c0b8          
0040c0cb          if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
0040c0d3              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
0040bf9a      }
0040bf9a      
0040c0d9      int32_t eax_1;
0040c0d9      eax_1 = 1;
0040c0de      return 1;
0040bf70  }

0040c0df                                                                                               cc                                 .

0040c0e0  uint8_t __thiscall SmartArray<PStringBase<char>,1>::AddToEnd(class SmartArray<PStringBase<char>,1>* this, class PStringBase<char> const* arg2)

0040c0e0  {
0040c0e6      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
0040c0e6      
0040c0ee      if (this->m_num >= eax_1)
0040c0ee      {
0040c0fc          uint8_t result = SmartArray<PStringBase<char>,1>::grow(this, SmartArray<PFileNode *,1>::get_new_size(this, (eax_1 + 1)));
0040c0fc          
0040c103          if (result == 0)
0040c106              return result;
0040c0ee      }
0040c0ee      
0040c114      void* edi = &this->m_data[this->m_num];
0040c117      int32_t eax_5 = *(uint32_t*)edi;
0040c117      
0040c11c      if (eax_5 != arg2->m_charbuffer)
0040c11c      {
0040c132          if ((InterlockedDecrement((eax_5 - 0x10)) == 0 && eax_5 != 0x14))
0040c13a              **(uint32_t**)(eax_5 - 0x14)(1);
0040c13a          
0040c13c          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0040c13f          *(uint32_t*)edi = m_charbuffer;
0040c145          InterlockedIncrement(&m_charbuffer[-1]);
0040c11c      }
0040c11c      
0040c14c      this->m_num += 1;
0040c152      eax_5 = 1;
0040c155      return 1;
0040c0e0  }

0040c158                                                                          cc cc cc cc cc cc cc cc                          ........

0040c160  uint8_t __thiscall PStringBaseIter_Common<char>::Split(class PStringBaseIter_Common<char> const* this, class PStringBase<char>* arg2, class PStringBase<char>* arg3, class PStringBase<char>* arg4)

0040c160  {
0040c169      class PStringBase<char>* eax_1 = this->vtable->GetPStringPtr(this);
0040c169      
0040c170      if (eax_1 == 0)
0040c170      {
0040c2dd          eax_1 = 0;
0040c2e3          return 0;
0040c170      }
0040c170      
0040c176      uint32_t curr = this->curr;
0040c179      uint32_t mark = this->mark;
0040c180      int32_t eax_13;
0040c180      void* __offset(PStringBase<char>, -0x14) esi_2;
0040c180      uint32_t var_8_1;
0040c180      void* __return;
0040c180      uint32_t ebp_1;
0040c180      
0040c180      if (mark <= curr)
0040c180      {
0040c18a          if (mark < curr)
0040c18a          {
0040c190              ebp_1 = mark;
0040c192              var_8_1 = curr;
0040c192              goto label_40c1a3;
0040c18a          }
0040c18a          
0040c26e          class PStringBase<char>* eax_16 = PStringBase<char>::substring(eax_1, &__return, 0, (curr - 1));
0040c278          PStringBase<unsigned short>::operator=(arg2, eax_16);
0040c287          void* ebx_3 = ((char*)__return - 0x14);
0040c287          
0040c296          if ((InterlockedDecrement(((char*)ebx_3 + 4)) == 0 && ebx_3 != 0))
0040c29e              **(uint32_t**)ebx_3(1);
0040c29e          
0040c2a4          PStringBase<char>::clear(arg3);
0040c2ad          uint32_t eax_19 = this->vtable->GetStrLen(this);
0040c2c5          PStringBase<unsigned short>::operator=(arg4, PStringBase<char>::substring(eax_1, &arg2, this->curr, eax_19));
0040c2ce          esi_2 = &arg2[-5];
0040c2d5          eax_13 = InterlockedDecrement(((char*)esi_2 + 4));
0040c180      }
0040c180      else
0040c180      {
0040c182          ebp_1 = curr;
0040c184          var_8_1 = mark;
0040c1a3      label_40c1a3:
0040c1a3          class PStringBase<char>* eax_2 = PStringBase<char>::substring(eax_1, &__return, 0, (ebp_1 - 1));
0040c1ad          PStringBase<unsigned short>::operator=(arg2, eax_2);
0040c1b6          int32_t* ebx_1 = ((char*)__return - 0x14);
0040c1b6          
0040c1c9          if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
0040c1d1              **(uint32_t**)ebx_1(1);
0040c1d1          
0040c1ed          PStringBase<unsigned short>::operator=(arg3, PStringBase<char>::substring(eax_1, &arg2, ebp_1, (var_8_1 - 1)));
0040c1fc          void* __offset(PStringBase<char>, -0x14) ebp_3 = &arg2[-5];
0040c1fc          
0040c20b          if ((InterlockedDecrement(((char*)ebp_3 + 4)) == 0 && ebp_3 != 0))
0040c214              *(uint32_t*)*(int32_t*)((char*)ADJ(ebp_3) + -0x14)(1);
0040c214          
0040c233          PStringBase<unsigned short>::operator=(arg4, PStringBase<char>::substring(eax_1, &arg2, var_8_1, this->vtable->GetStrLen(this)));
0040c23c          esi_2 = &arg2[-5];
0040c243          eax_13 = InterlockedDecrement(((char*)esi_2 + 4));
0040c180      }
0040c180      
0040c24b      if ((eax_13 == 0 && esi_2 != 0))
0040c253          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0040c253      
0040c258      eax_13 = 1;
0040c25e      return 1;
0040c160  }

0040c2e6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0040c2f0  uint8_t template_change_extension<char>(class PStringBase<char>* arg1, class PStringBase<char> const* arg2)

0040c2f0  {
0040c2f5      class PStringBase<char>* edi = arg1;
0040c2fe      int32_t var_10 = 0x79448c;
0040c306      class PStringBase<char>* var_4 = edi;
0040c30a      int32_t var_c = 0;
0040c312      int32_t var_8 = 0;
0040c312      
0040c324      if (template_find_extension<char>(&var_10) != 0)
0040c32a          PStringBaseIter<char>::Truncate(&var_10);
0040c32a      
0040c32f      class PSRefBufferCharData<char>* m_charbuffer = edi->m_charbuffer;
0040c331      int32_t ecx_2 = m_charbuffer->m_data[-4];
0040c339      void* esi;
0040c339      
0040c339      if ((ecx_2 - 2) < ecx_2)
0040c341          esi = &m_charbuffer->m_data[(ecx_2 - 2)];
0040c339      else
0040c33b          esi = &m_charbuffer->m_data[(ecx_2 - 1)];
0040c33b      
0040c344      int32_t edx;
0040c344      edx = *(uint8_t*)esi;
0040c34b      m_charbuffer = 0x5c;
0040c34d      void* ecx_3 = "\/:";
0040c34d      
0040c35c      do
0040c35c      {
0040c352          if (m_charbuffer == edx)
0040c352          {
0040c3ab              m_charbuffer = 0;
0040c3b1              return 0;
0040c352          }
0040c352          
0040c354          m_charbuffer = *(uint8_t*)((char*)ecx_3 + 1);
0040c357          ecx_3 += 1;
0040c35c      } while (m_charbuffer != 0);
0040c35c      
0040c362      class PSRefBufferCharData<char>* m_charbuffer_2 = arg2->m_charbuffer;
0040c364      int32_t eax_1 = m_charbuffer_2->m_data[-4];
0040c364      
0040c36a      if (eax_1 != 1)
0040c36a      {
0040c36e          if (eax_1 <= 0)
0040c370              m_charbuffer_2 = &m_charbuffer_2->m_data[(eax_1 - 1)];
0040c370          
0040c377          if (m_charbuffer_2->m_data[0] != 0x2e)
0040c377          {
0040c382              arg1 = 0x2e;
0040c387              PStringBase<char>::append_n_chars(edi, &arg1, 1);
0040c377          }
0040c36a      }
0040c36a      
0040c38c      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0040c38e      int32_t ecx_5 = m_charbuffer_1->m_data[-4];
0040c38e      
0040c394      if (ecx_5 != 1)
0040c39d          PStringBase<char>::append_n_chars(edi, m_charbuffer_1, (ecx_5 - 1));
0040c39d      
0040c3a3      m_charbuffer_1 = 1;
0040c3a9      return 1;
0040c2f0  }

0040c3b2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0040c3c0  uint8_t template_strip_directory<char>(class PStringBase<char>* arg1)

0040c3c0  {
0040c3cf      int32_t var_10 = 0x79448c;
0040c3d7      class PStringBase<char>* var_4 = arg1;
0040c3db      int32_t var_c = 0;
0040c3e3      int32_t var_8 = 0;
0040c3eb      uint32_t eax_1 = template_strcspn<char>(arg1, "\/:", 1);
0040c3eb      
0040c3f5      if (eax_1 >= 0)
0040c3f5      {
0040c3ff          PStringBaseIter_Common<char>::Next(&var_10, (eax_1 + 1));
0040c407          PStringBaseIter<char>::Behead(&var_10);
0040c3f5      }
0040c3f5      
0040c40c      eax_1 = 1;
0040c411      return 1;
0040c3c0  }

0040c412                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0040c420  uint8_t template_get_directory<char>(class PStringBase<char>* arg1, class PStringBase<char> const* arg2)

0040c420  {
0040c42f      int32_t var_10 = 0x79448c;
0040c437      class PStringBase<char>* var_4 = arg2;
0040c43b      int32_t var_c = 0;
0040c443      int32_t var_8 = 0;
0040c44b      uint32_t eax_1 = template_strcspn<char>(arg2, "\/:", 1);
0040c44b      
0040c455      if (eax_1 >= 0)
0040c455      {
0040c45f          PStringBaseIter_Common<char>::Next(&var_10, (eax_1 + 1));
0040c471          int32_t var_8_1 = var_c;
0040c475          int32_t var_c_1 = 0;
0040c47d          PStringBaseIter_Common<char>::GetSubString(&var_10, arg1);
0040c482          int32_t eax_4;
0040c482          eax_4 = 1;
0040c487          return 1;
0040c455      }
0040c455      
0040c48d      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0040c48d      
0040c495      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0040c495      {
0040c4ab          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040c4b3              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040c4b3          
0040c4b5          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040c4c1          arg1->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040c4c3          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0040c495      }
0040c495      
0040c4cb      m_charbuffer = 1;
0040c4d0      return 1;
0040c420  }

0040c4d1                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

0040c4e0  class PStringBase<char>* template_get_extension<char>(class PStringBase<char>* __return, class PStringBase<char> const* arg2)

0040c4e0  {
0040c4e7      class PStringBase<char>* var_4 = arg2;
0040c4f2      int32_t var_10 = 0x79448c;
0040c4fa      int32_t var_c = 0;
0040c4fe      int32_t var_8 = 0;
0040c4fe      
0040c510      if (template_find_extension<char>(&var_10) != 0)
0040c510      {
0040c517          PStringBaseIter_Common<char>::GetSubString(&var_10, __return);
0040c522          return __return;
0040c510      }
0040c510      
0040c523      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040c52f      __return->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040c531      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0040c53d      return __return;
0040c4e0  }

0040c53e                                                                                            cc cc                                ..

0040c540  uint8_t __thiscall PStringBaseIter<char>::Insert(class PStringBaseIter<char>* this, class PStringBase<char> const* arg2)

0040c540  {
0040c541      class PStringBase<char>* ebx = arg2;
0040c541      
0040c54e      if (ebx->m_charbuffer->m_data[-4] != 1)
0040c54e      {
0040c558          class PSRefBufferCharData<char>* m_charbuffer_2 = this->pstring_ptr->m_charbuffer;
0040c55f          InterlockedIncrement(&m_charbuffer_2[-1]);
0040c565          class PStringBase<char>* pstring_ptr = this->pstring_ptr;
0040c568          class PSRefBufferCharData<char>* m_charbuffer = pstring_ptr->m_charbuffer;
0040c568          
0040c570          if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0040c570          {
0040c585              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040c58d                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040c58d              
0040c58f              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040c59a              pstring_ptr->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040c59c              InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0040c5a2              ebx = arg2;
0040c570          }
0040c570          
0040c5a6          uint32_t curr = this->curr;
0040c5a6          
0040c5ab          if (curr != 0)
0040c5b2              PStringBase<char>::append_n_chars(this->pstring_ptr, m_charbuffer_2, curr);
0040c5b2          
0040c5b7          class PSRefBufferCharData<char>* m_charbuffer_1 = ebx->m_charbuffer;
0040c5b9          int32_t ecx_5 = m_charbuffer_1->m_data[-4];
0040c5b9          
0040c5bf          if (ecx_5 != 1)
0040c5c9              PStringBase<char>::append_n_chars(this->pstring_ptr, m_charbuffer_1, (ecx_5 - 1));
0040c5c9          
0040c5ce          uint32_t curr_2 = this->curr;
0040c5d1          void* ecx_8 = &m_charbuffer_2->m_data[curr_2];
0040c5d1          
0040c5d8          if ((curr_2 != -(m_charbuffer_2) && *(uint8_t*)ecx_8 != 0))
0040c5d8          {
0040c5da              void* eax_3 = ecx_8;
0040c5dc              void* edi_1 = ((char*)eax_3 + 1);
0040c5e7              char i;
0040c5e7              
0040c5e7              do
0040c5e7              {
0040c5e0                  i = *(uint8_t*)eax_3;
0040c5e2                  eax_3 += 1;
0040c5e7              } while (i != 0);
0040c5f0              PStringBase<char>::append_n_chars(this->pstring_ptr, ecx_8, ((char*)eax_3 - edi_1));
0040c5d8          }
0040c5d8          
0040c5f5          uint32_t mark = this->mark;
0040c5f8          uint32_t curr_1 = this->curr;
0040c5f8          
0040c5fd          if (mark >= curr_1)
0040c608              this->mark = ((ebx->m_charbuffer->m_data[-4] + mark) - 1);
0040c608          
0040c614          this->curr = ((ebx->m_charbuffer->m_data[-4] + curr_1) - 1);
0040c614          
0040c62c          if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
0040c634              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0040c54e      }
0040c54e      
0040c637      class PSRefBufferCharData<char>* eax;
0040c637      eax = 1;
0040c63a      return 1;
0040c540  }

0040c63d                                                                                         cc cc cc                               ...

0040c640  uint8_t __thiscall PStringBaseIter<char>::Replace(class PStringBaseIter<char>* this, class PStringBase<char> const* arg2)

0040c640  {
0040c648      uint32_t curr = this->curr;
0040c64b      uint32_t mark = this->mark;
0040c651      uint32_t curr_2;
0040c651      uint32_t var_4;
0040c651      uint32_t ebx;
0040c651      
0040c651      if (curr >= mark)
0040c651      {
0040c65f          var_4 = mark;
0040c663          curr_2 = curr;
0040c667          ebx = curr;
0040c651      }
0040c651      else
0040c651      {
0040c653          ebx = mark;
0040c655          var_4 = curr;
0040c659          curr_2 = ebx;
0040c651      }
0040c651      
0040c66c      class PSRefBufferCharData<char>* m_charbuffer_2 = this->pstring_ptr->m_charbuffer;
0040c672      InterlockedIncrement(&m_charbuffer_2[-1]);
0040c678      class PStringBase<char>* pstring_ptr = this->pstring_ptr;
0040c67b      class PSRefBufferCharData<char>* m_charbuffer = pstring_ptr->m_charbuffer;
0040c67b      
0040c683      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0040c683      {
0040c698          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040c6a0              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040c6a0          
0040c6a2          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040c6ae          pstring_ptr->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040c6b0          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0040c6b6          ebx = curr_2;
0040c683      }
0040c683      
0040c6ba      uint32_t edi = var_4;
0040c6ba      
0040c6c0      if (edi != 0)
0040c6c7          PStringBase<char>::append_n_chars(this->pstring_ptr, m_charbuffer_2, edi);
0040c6c7      
0040c6d0      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0040c6d2      int32_t ecx_3 = m_charbuffer_1->m_data[-4];
0040c6d2      
0040c6d8      if (ecx_3 != 1)
0040c6e2          PStringBase<char>::append_n_chars(this->pstring_ptr, m_charbuffer_1, (ecx_3 - 1));
0040c6e2      
0040c6e7      int32_t ecx_6 = m_charbuffer_2->m_data[-4];
0040c6ec      void* eax_4 = &m_charbuffer_2->m_data[(ecx_6 - 1)];
0040c6ec      
0040c6f0      if (ebx < ecx_6)
0040c6f2          eax_4 = &m_charbuffer_2->m_data[ebx];
0040c6f2      
0040c6f8      if (*(uint8_t*)eax_4 != 0)
0040c6f8      {
0040c6fc          void* ecx_7 = &m_charbuffer_2->m_data[(ecx_6 - 1)];
0040c6fc          
0040c700          if (ebx < ecx_6)
0040c702              ecx_7 = &m_charbuffer_2->m_data[ebx];
0040c702          
0040c70c          if ((ecx_7 != 0 && *(uint8_t*)ecx_7 != 0))
0040c70c          {
0040c70e              void* eax_5 = ecx_7;
0040c710              void* edi_1 = ((char*)eax_5 + 1);
0040c71a              char i;
0040c71a              
0040c71a              do
0040c71a              {
0040c713                  i = *(uint8_t*)eax_5;
0040c715                  eax_5 += 1;
0040c71a              } while (i != 0);
0040c723              PStringBase<char>::append_n_chars(this->pstring_ptr, ecx_7, ((char*)eax_5 - edi_1));
0040c728              edi = var_4;
0040c70c          }
0040c6f8      }
0040c6f8      
0040c735      uint32_t curr_1 = this->curr;
0040c73a      int32_t eax_8 = (arg2->m_charbuffer->m_data[-4] - 1);
0040c73d      uint32_t edx_6 = (ebx - edi);
0040c73d      
0040c741      if (curr_1 != ebx)
0040c74e          this->mark += (eax_8 - edx_6);
0040c741      else
0040c747          this->curr = ((curr_1 - edx_6) + eax_8);
0040c747      
0040c764      if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
0040c76c          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0040c76c      
0040c771      int32_t eax_11;
0040c771      eax_11 = 1;
0040c777      return 1;
0040c640  }

0040c77a                                                                                cc cc cc cc cc cc                            ......

0040c780  uint8_t PSUtils::explode(class PStringBase<char> const* arg1, char arg2, class List<PStringBase<char> >* arg3)

0040c780  {
0040c780      /* tailcall */
0040c780      return template_explode<char>(arg1, arg2, arg3);
0040c780  }

0040c785                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040c790  uint8_t PSUtils::explode(char const* arg1, uint32_t arg2, class PStringBaseArray<char>* arg3)

0040c790  {
0040c791      uint32_t ebx = arg2;
0040c797      char const* esi = arg1;
0040c79c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040c7a6      void* ebp = &esi[ebx];
0040c7a9      arg1 = PStringBase<char>::s_NullBuffer_1;
0040c7ad      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040c7ad      
0040c7b5      if (esi < ebp)
0040c7b5      {
0040c7e3          do
0040c7e3          {
0040c7b7              char const* var_14_1 = esi;
0040c7b8              uint32_t var_18_1 = ebx;
0040c7c3              int32_t eax_1 = PStringBase<char>::sprintf(&arg1, "%.*s");
0040c7d6              ebx -= eax_1;
0040c7d8              SmartArray<PStringBase<char>,1>::AddToEnd(arg3, &arg1);
0040c7dd              esi = &esi[(eax_1 + 1)];
0040c7e3          } while (esi < ebp);
0040c7e3          
0040c7e5          PStringBase<char>::s_NullBuffer_1 = arg1;
0040c7b5      }
0040c7b5      
0040c7fc      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0040c804          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0040c804      
0040c809      int32_t eax_3;
0040c809      eax_3 = 1;
0040c80c      return 1;
0040c790  }

0040c80d                                         cc cc cc                                                               ...

0040c810  void PSUtils::path_append(class PStringBase<char>* arg1, class PStringBase<char> const* arg2)

0040c810  {
0040c811      class PStringBase<char>* ebx = arg2;
0040c811      
0040c81b      if (ebx->m_charbuffer->m_data[-4] != 1)
0040c81b      {
0040c82a          if (((*(uint8_t*)$S73) & 1) == 0)
0040c82a          {
0040c82c              $S73 |= 1;
0040c841              class PStringBase<char> eax_2 = *(uint32_t*)PStringBase<char>::PStringBase<char>(&arg2, "\/");
0040c843              DirSeps.m_charbuffer = eax_2;
0040c84c              InterlockedIncrement((eax_2 - 0x10));
0040c856              void* __offset(PStringBase<char>, -0x14) esi_2 = &arg2[-5];
0040c856              
0040c869              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0040c871                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0040c871              
0040c878              atexit($E74);
0040c82a          }
0040c82a          
0040c884          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0040c886          int32_t ecx_4 = m_charbuffer->m_data[-4];
0040c886          
0040c88c          if (ecx_4 != 1)
0040c88c          {
0040c89c              int32_t edx_2 = m_charbuffer->m_data[-4];
0040c8a4              void* eax_5;
0040c8a4              
0040c8a4              if ((edx_2 - 2) < edx_2)
0040c8ac                  eax_5 = &m_charbuffer->m_data[(edx_2 - 2)];
0040c8a4              else
0040c8a6                  eax_5 = &m_charbuffer->m_data[(ecx_4 - 1)];
0040c8a6              
0040c8c6              if (strchr(DirSeps.m_charbuffer, ((int32_t)*(uint8_t*)eax_5)) == 0)
0040c8c6              {
0040c8c8                  class PSRefBufferCharData<char>* m_charbuffer_1 = ebx->m_charbuffer;
0040c8ca                  int32_t ecx_7 = m_charbuffer_1->m_data[-4];
0040c8ca                  
0040c8cf                  if (ecx_7 <= 0)
0040c8d1                      m_charbuffer_1 = &m_charbuffer_1->m_data[(ecx_7 - 1)];
0040c8d1                  
0040c8e6                  if (strchr(DirSeps.m_charbuffer, ((int32_t)m_charbuffer_1->m_data[0])) == 0)
0040c8e6                  {
0040c8f1                      arg2 = 0x2f;
0040c8f6                      PStringBase<char>::append_n_chars(arg1, &arg2, 1);
0040c8e6                  }
0040c8c6              }
0040c88c          }
0040c88c          else
0040c895              PStringBase<char>::set(arg1, &data_7944e0);
0040c895          
0040c8fb          class PSRefBufferCharData<char>* m_charbuffer_2 = ebx->m_charbuffer;
0040c8fd          int32_t ecx_9 = m_charbuffer_2->m_data[-4];
0040c8fd          
0040c903          if (ecx_9 != 1)
0040c90c              PStringBase<char>::append_n_chars(arg1, m_charbuffer_2, (ecx_9 - 1));
0040c81b      }
0040c810  }

0040c915                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040c920  void PSUtils::path_append(class PStringBase<unsigned short>* arg1, class PStringBase<unsigned short> const* arg2)

0040c920  {
0040c921      class PStringBase<unsigned short>* ebx = arg2;
0040c921      
0040c92b      if (ebx->m_charbuffer->m_data[0x7ffffffffffffffe] != 1)
0040c92b      {
0040c93a          if (((*(uint8_t*)$S75) & 1) == 0)
0040c93a          {
0040c93c              $S75 |= 1;
0040c95a              PStringBase<char>::to_wpstring(PStringBase<char>::PStringBase<char>(&arg2, "\/"), &DirSeps, 0);
0040c963              void* __offset(PStringBase<unsigned short>, -0x14) esi_2 = &arg2[-5];
0040c963              
0040c976              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0040c97e                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0040c97e              
0040c985              atexit($E76);
0040c93a          }
0040c93a          
0040c991          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg1->m_charbuffer;
0040c993          int32_t ecx_5 = m_charbuffer->m_data[0x7ffffffffffffffe];
0040c993          
0040c999          if (ecx_5 != 1)
0040c999          {
0040c9a9              int32_t edx_2 = m_charbuffer->m_data[0x7ffffffffffffffe];
0040c9b1              void* eax_3;
0040c9b1              
0040c9b1              if ((edx_2 - 2) < edx_2)
0040c9b9                  eax_3 = &m_charbuffer->m_data[(edx_2 - 2)];
0040c9b1              else
0040c9b3                  eax_3 = &m_charbuffer->m_data[(ecx_5 - 1)];
0040c9b3              
0040c9bc              eax_3 = *(uint16_t*)eax_3;
0040c9cd              int32_t eax_4;
0040c9cd              int32_t edx_3;
0040c9cd              eax_4 = wcschr(DirSeps.m_charbuffer, eax_3);
0040c9cd              
0040c9d4              if (eax_4 == 0)
0040c9d4              {
0040c9d6                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ebx->m_charbuffer;
0040c9d8                  int32_t ecx_8 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0040c9d8                  
0040c9dd                  if (ecx_8 <= 0)
0040c9df                      m_charbuffer_1 = &m_charbuffer_1->m_data[(ecx_8 - 1)];
0040c9df                  
0040c9e3                  edx_3 = m_charbuffer_1->m_data[0];
0040c9e3                  
0040c9f4                  if (wcschr(DirSeps.m_charbuffer, edx_3) == 0)
0040c9f4                  {
0040c9ff                      arg2 = 0x2f;
0040ca07                      PStringBase<unsigned short>::append_n_chars(arg1, &arg2, 1);
0040c9f4                  }
0040c9d4              }
0040c999          }
0040c999          else
0040c9a2              PStringBase<unsigned short>::set(arg1, &data_7944e4);
0040c9a2          
0040ca0c          class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ebx->m_charbuffer;
0040ca0e          int32_t ecx_10 = m_charbuffer_2->m_data[0x7ffffffffffffffe];
0040ca0e          
0040ca14          if (ecx_10 != 1)
0040ca1d              PStringBase<unsigned short>::append_n_chars(arg1, m_charbuffer_2, (ecx_10 - 1));
0040c92b      }
0040c920  }

0040ca26                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0040ca30  uint8_t PSUtils::change_extension(class PStringBase<char>* arg1, class PStringBase<char> const* arg2)

0040ca30  {
0040ca30      /* tailcall */
0040ca30      return template_change_extension<char>(arg1, arg2);
0040ca30  }

0040ca35                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040ca40  uint8_t PSUtils::remove_extension(class PStringBase<char>* arg1)

0040ca40  {
0040ca47      class PStringBase<char>* var_4 = arg1;
0040ca51      int32_t var_10 = 0x79448c;
0040ca59      int32_t var_c = 0;
0040ca5d      int32_t var_8 = 0;
0040ca5d      
0040ca6b      if (template_find_extension<char>(&var_10) != 0)
0040ca70          PStringBaseIter<char>::Truncate(&var_10);
0040ca70      
0040ca7a      return 1;
0040ca40  }

0040ca7b                                                                                   cc cc cc cc cc                             .....

0040ca80  uint8_t PSUtils::strip_directory(class PStringBase<char>* arg1)

0040ca80  {
0040ca80      /* tailcall */
0040ca80      return template_strip_directory<char>(arg1);
0040ca80  }

0040ca85                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040ca90  uint8_t PSUtils::get_directory(class PStringBase<char>* arg1, class PStringBase<char> const* arg2)

0040ca90  {
0040ca90      /* tailcall */
0040ca90      return template_get_directory<char>(arg1, arg2);
0040ca90  }

0040ca95                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040caa0  class PStringBase<char>* PSUtils::get_extension(class PStringBase<char>* __return, class PStringBase<char> const* arg2)

0040caa0  {
0040caab      template_get_extension<char>(__return, arg2);
0040cab6      return __return;
0040caa0  }

0040cab7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0040cac0  class PStringBase<char>* PSUtils::stringify_buffer(class PStringBase<char>* __return, class SmartBuffer const* arg2)

0040cac0  {
0040cae5      int32_t var_14;
0040cae5      __builtin_strncpy(&var_14, "0123456789ABCDEF", 0x11);
0040cafc      uint8_t* eax = SmartBuffer::GetBuffer(arg2);
0040cb05      uint32_t eax_1 = SmartBuffer::GetSize(arg2);
0040cb0c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040cb11      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0040cb18      void* ebx_1 = &eax[eax_1];
0040cb1b      void* var_18 = ebx_1;
0040cb1f      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040cb33      PStringBase<char>::allocate(&PStringBase<char>::s_NullBuffer_2, (SmartBuffer::GetSize(arg2) * 2));
0040cb38      uint8_t* eax_5 = eax;
0040cb3c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0040cb40      uint8_t* var_1c = eax_5;
0040cb40      
0040cb44      if (eax < ebx_1)
0040cb44      {
0040cc82          do
0040cc82          {
0040cb50              uint32_t eax_6 = ((uint32_t)*(uint8_t*)eax_5);
0040cb58              uint32_t eax_7;
0040cb58              eax_7 = *(uint8_t*)(&var_14 + (eax_6 >> 4));
0040cb61              char var_24 = eax_7;
0040cb61              
0040cb65              if (eax_7 != 0)
0040cb65              {
0040cb6f                  int32_t ebx_2 = PStringBase<char>::s_NullBuffer_3->m_data[-4];
0040cb6f                  
0040cb7a                  if ((*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x10) != 1 || (ebx_2 + 1) > *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0xc)))
0040cb7a                  {
0040cb90                      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
0040cb93                      PStringBase<char>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_2, ebx_2);
0040cb98                      PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0040cb9c                      class PSRefBufferCharData<char>* eax_10 = ((char*)edi_1 + 0x14);
0040cba1                      void* edx_2 = ((char*)PStringBase<char>::s_NullBuffer_3 - eax_10);
0040cbad                      char i;
0040cbad                      
0040cbad                      do
0040cbad                      {
0040cba3                          i = eax_10->m_data[0];
0040cba5                          *(uint8_t*)((char*)edx_2 + eax_10) = i;
0040cba8                          eax_10 = &eax_10->m_data[1];
0040cbad                      } while (i != 0);
0040cbad                      
0040cbbf                      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0040cbc7                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0040cb7a                  }
0040cb7a                  else
0040cb7a                  {
0040cb7c                      *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_3 - 4) = (ebx_2 + 1);
0040cb7f                      *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_3 - 8) = 0xffffffff;
0040cb7a                  }
0040cb7a                  
0040cbd5                  strncpy(&PStringBase<char>::s_NullBuffer_3->m_data[(ebx_2 - 1)], &var_24, 1);
0040cbde                  ebx_1 = var_18;
0040cbe5                  PStringBase<char>::s_NullBuffer_3->m_data[(PStringBase<char>::s_NullBuffer_3->m_data[-4] - 1)] = 0;
0040cb65              }
0040cb65              
0040cbea              eax_7 = *(uint8_t*)(&var_14 + (eax_6 & 0xf));
0040cbf0              var_24 = eax_7;
0040cbf0              
0040cbf4              if (eax_7 != 0)
0040cbf4              {
0040cbfe                  int32_t ebp_3 = PStringBase<char>::s_NullBuffer_3->m_data[-4];
0040cbfe                  
0040cc09                  if ((*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x10) != 1 || (ebp_3 + 1) > *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0xc)))
0040cc09                  {
0040cc1f                      void* __offset(PSRefBufferCharData<char>, -0x14) edi_2 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
0040cc22                      PStringBase<char>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_2, ebp_3);
0040cc27                      PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0040cc2b                      class PSRefBufferCharData<char>* eax_15 = ((char*)edi_2 + 0x14);
0040cc30                      void* edx_6 = ((char*)PStringBase<char>::s_NullBuffer_3 - eax_15);
0040cc3c                      char i_1;
0040cc3c                      
0040cc3c                      do
0040cc3c                      {
0040cc32                          i_1 = eax_15->m_data[0];
0040cc34                          *(uint8_t*)((char*)edx_6 + eax_15) = i_1;
0040cc37                          eax_15 = &eax_15->m_data[1];
0040cc3c                      } while (i_1 != 0);
0040cc3c                      
0040cc4e                      if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0040cc56                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0040cc09                  }
0040cc09                  else
0040cc09                  {
0040cc0b                      *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_3 - 4) = (ebp_3 + 1);
0040cc0e                      *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_3 - 8) = 0xffffffff;
0040cc09                  }
0040cc09                  
0040cc64                  strncpy(&PStringBase<char>::s_NullBuffer_3->m_data[(ebp_3 - 1)], &var_24, 1);
0040cc70                  PStringBase<char>::s_NullBuffer_3->m_data[(PStringBase<char>::s_NullBuffer_3->m_data[-4] - 1)] = 0;
0040cbf4              }
0040cbf4              
0040cc79              eax_5 = &var_1c[1];
0040cc7e              var_1c = eax_5;
0040cc82          } while (eax_5 < ebx_1);
0040cb44      }
0040cb44      
0040cc91      __return->m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0040cc93      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
0040cc93      
0040ccac      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_3[-1]) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
0040ccb4          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x14)(1);
0040ccb4      
0040ccbe      return __return;
0040cac0  }

0040cb4d                                         8d 49 00                                                               .I.
0040ccbf                                                                                               cc                                 .

0040ccc0  uint8_t PSUtils::linewrap_string(class PStringBase<char>* arg1, uint32_t arg2)

0040ccc0  {
0040ccc6      class PStringBase<char>* esi = arg1;
0040ccca      class PSRefBufferCharData<char>* m_charbuffer = esi->m_charbuffer;
0040ccd5      InterlockedIncrement(&m_charbuffer[-1]);
0040ccdb      class PSRefBufferCharData<char>* m_charbuffer_3 = esi->m_charbuffer;
0040cce0      int32_t ebp_1 = (m_charbuffer_3->m_data[-4] - 1);
0040cce0      
0040ccf5      if (m_charbuffer_3 != PStringBase<char>::s_NullBuffer)
0040ccf5      {
0040cd0a          if ((InterlockedDecrement(&m_charbuffer_3[-1]) == 0 && m_charbuffer_3 != 0x14))
0040cd12              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_3 + -0x14)(1);
0040cd12          
0040cd14          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040cd1f          esi->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040cd21          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0040ccf5      }
0040ccf5      
0040cd2a      PStringBase<char>::allocate(esi, ((COMBINE(0, ebp_1) / arg2) + ebp_1));
0040cd2f      void* ebx_2 = nullptr;
0040cd2f      
0040cd33      if (ebp_1 > 0)
0040cd33      {
0040cde4          do
0040cde4          {
0040cd4f              PStringBase<char>::append_n_chars(esi, ((char*)ebx_2 + m_charbuffer), arg2);
0040cd54              class PSRefBufferCharData<char>* m_charbuffer_1 = esi->m_charbuffer;
0040cd56              arg1 = 0xa;
0040cd5b              int32_t ecx_6 = m_charbuffer_1->m_data[-4];
0040cd5b              
0040cd6e              if ((*(int32_t*)((char*)m_charbuffer_1 + -0x10) != 1 || (ecx_6 + 1) > *(int32_t*)((char*)m_charbuffer_1 + -0xc)))
0040cd6e              {
0040cd87                  PStringBase<char>::allocate_ref_buffer(esi, ecx_6);
0040cd8c                  uint8_t* m_charbuffer_4 = esi->m_charbuffer;
0040cd8e                  class PSRefBufferCharData<char>* m_charbuffer_5 = m_charbuffer_1;
0040cd9d                  uint8_t i;
0040cd9d                  
0040cd9d                  do
0040cd9d                  {
0040cd91                      i = m_charbuffer_5->m_data[0];
0040cd93                      *(uint8_t*)m_charbuffer_4 = i;
0040cd95                      m_charbuffer_5 = &m_charbuffer_5->m_data[1];
0040cd98                      m_charbuffer_4 = &m_charbuffer_4[1];
0040cd9d                  } while (i != 0);
0040cd9d                  
0040cdaf                  if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0040cdb7                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0040cd6e              }
0040cd6e              else
0040cd6e              {
0040cd70                  *(uint32_t*)((char*)m_charbuffer_1 - 4) = (ecx_6 + 1);
0040cd75                  *(uint32_t*)(esi->m_charbuffer - 8) = 0xffffffff;
0040cd6e              }
0040cd6e              
0040cdcb              strncpy(&esi->m_charbuffer->m_data[(ecx_6 - 1)], &arg1, 1);
0040cdd1              class PSRefBufferCharData<char>* m_charbuffer_2 = esi->m_charbuffer;
0040cdd3              ebx_2 += arg2;
0040cddf              m_charbuffer_2->m_data[(m_charbuffer_2->m_data[-4] - 1)] = 0;
0040cde4          } while (ebx_2 < ebp_1);
0040cd33      }
0040cd33      
0040ce01      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040ce09          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040ce09      
0040ce0e      int32_t eax_9;
0040ce0e      eax_9 = 1;
0040ce14      return 1;
0040ccc0  }

0040ce15                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040ce20  uint8_t __convention("regparm") PSUtils::widify(class PStringBase<unsigned short>* arg1, class PStringBase<char> const* arg2)

0040ce20  {
0040ce20      class PStringBase<unsigned short> __return_1;
0040ce20      class PStringBase<unsigned short> __return = __return_1;
0040ce30      class PStringBase<unsigned short>* eax = PStringBase<char>::to_wpstring(arg2, &__return, 0);
0040ce41      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg1->m_charbuffer;
0040ce41      
0040ce45      if (m_charbuffer != eax->m_charbuffer)
0040ce45      {
0040ce56          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0040ce5e              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040ce5e          
0040ce60          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax->m_charbuffer;
0040ce62          arg1->m_charbuffer = m_charbuffer_1;
0040ce68          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
0040ce45      }
0040ce45      
0040ce72      int32_t* esi_3 = (__return - 0x14);
0040ce72      
0040ce81      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0040ce89          **(uint32_t**)esi_3(1);
0040ce89      
0040ce8e      int32_t eax_3;
0040ce8e      eax_3 = 1;
0040ce92      return 1;
0040ce20  }

0040ce93                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0040cea0  class PStringBase<unsigned short>* __convention("regparm") PSUtils::widify(class PStringBase<unsigned short>* __return, class PStringBase<char> const* arg2)

0040cea0  {
0040cea0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3;
0040cea0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_3;
0040cea1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040ceaf      PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0040cebd      class PStringBase<char>* var_14_1 = arg2;
0040cec2      class PSRefBufferCharData<unsigned short>** var_18 = &PStringBase<unsigned short>::s_NullBuffer_2;
0040cec3      PSUtils::widify(arg2, InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]));
0040cec8      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0040ced7      __return->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_4;
0040ced9      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
0040ced9      
0040ceee      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_4 != 0x14))
0040cef6          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4 + -0x14)(1);
0040cef6      
0040cefe      return __return;
0040cea0  }

0040ceff                                                                                               cc                                 .

0040cf00  uint8_t template_change_directory<char>(class PStringBase<char>* arg1, class PStringBase<char> const* arg2)

0040cf00  {
0040cf07      class PStringBase<char>* edi = arg2;
0040cf17      char var_21 = 1;
0040cf17      
0040cf1c      if (edi->m_charbuffer->m_data[-4] == 1)
0040cf1c      {
0040cf6f      label_40cf6f:
0040cf6f          var_21 = 0;
0040cf1c      }
0040cf1c      else
0040cf1c      {
0040cf22          int32_t var_10_1 = 0x79448c;
0040cf2a          class PStringBase<char>* var_4_1 = edi;
0040cf2e          int32_t var_c_1 = 0;
0040cf32          int32_t var_8_1 = 0;
0040cf36          class PStringBaseIter_Const<unsigned short>* ecx;
0040cf36          uint32_t eax_1 = PStringBaseIter_Const<unsigned short>::GetStrLen(ecx);
0040cf3e          int32_t eax_2;
0040cf3e          
0040cf3e          if (eax_1 >= 1)
0040cf44              eax_2 = (eax_1 - 1);
0040cf3e          else
0040cf40              eax_2 = 0;
0040cf40          
0040cf4f          int32_t var_c_2 = eax_2;
0040cf53          char eax_3 = *(uint32_t*)(var_10_1 + 8)(eax_2);
0040cf56          char const* const edx_2 = "\/:";
0040cf56          
0040cf6b          for (char i = 0x5c; i != 0; )
0040cf6b          {
0040cf62              if (i == eax_3)
0040cf62                  goto label_40cf6f;
0040cf62              
0040cf64              i = edx_2[1];
0040cf67              edx_2 = &edx_2[1];
0040cf6b          }
0040cf1c      }
0040cf1c      
0040cf7e      int32_t var_20 = 0x79448c;
0040cf86      class PStringBase<char>* var_14 = arg1;
0040cf8a      int32_t var_1c = 0;
0040cf8e      int32_t var_18 = 0;
0040cf92      int32_t eax_5 = template_strcspn<char>(arg1, "\/:", 1);
0040cf9c      class PStringBaseIter<char>* ecx_2 = &var_20;
0040cfa0      class PStringBase<char>* esi_3;
0040cfa0      
0040cfa0      if (eax_5 < 0)
0040cfa0      {
0040d021          int32_t var_1c_3 = 0;
0040d025          PStringBaseIter<char>::Insert(ecx_2, edi);
0040d025          
0040d02e          if (var_21 != 0)
0040d02e          {
0040d032              int32_t* eax_14 = operator new[](0x24);
0040d032              
0040d03c              if (eax_14 == 0)
0040d06d                  esi_3 = arg2;
0040d03c              else
0040d03c              {
0040d03e                  esi_3 = &eax_14[5];
0040d041                  eax_14[1] = 1;
0040d044                  *(uint32_t*)eax_14 = 0x7ca074;
0040d04a                  eax_14[4] = 1;
0040d04d                  eax_14[2] = 1;
0040d050                  eax_14[3] = 0xffffffff;
0040d057                  esi_3->m_charbuffer = 0;
0040d059                  esi_3[-1].m_charbuffer = 2;
0040d060                  arg2 = esi_3;
0040d064                  esi_3[-3].m_charbuffer = 0x10;
0040d03c              }
0040d03c              
0040d075              esi_3->m_charbuffer = 0x2f;
0040d07d              *(uint8_t*)((char*)esi_3->m_charbuffer)[1] = 0;
0040d080              PStringBaseIter<char>::Insert(&var_20, &arg2);
0040d080              goto label_40d08c;
0040d02e          }
0040cfa0      }
0040cfa0      else
0040cfa0      {
0040cfa3          PStringBaseIter_Common<char>::Next(ecx_2, eax_5);
0040cfbc          arg2 = *(uint32_t*)(var_20 + 8)(var_1c);
0040cfbc          
0040cfcf          if ((var_1c + 1) <= *(uint32_t*)var_20())
0040cfe1              int32_t var_1c_2 = (var_1c + 1);
0040cfcf          else
0040cfdb              int32_t var_1c_1 = *(uint32_t*)var_20();
0040cfdb          
0040cfe9          PStringBaseIter<char>::Behead(&var_20);
0040cff3          PStringBaseIter<char>::Insert(&var_20, edi);
0040cff3          
0040cffc          if (var_21 != 0)
0040cffc          {
0040d015              PStringBaseIter<char>::Insert(&var_20, PStringBase<char>::PStringBase<char>(&arg2, ((int8_t)arg2)));
0040d01a              esi_3 = arg2;
0040d08c          label_40d08c:
0040d08c              
0040d098              if ((InterlockedDecrement(&esi_3[-4]) == 0 && esi_3 != 0x14))
0040d09f                  *(uint32_t*)*(int32_t*)((char*)esi_3 + -0x14)(1);
0040cffc          }
0040cfa0      }
0040d0a4      int32_t eax_11;
0040d0a4      eax_11 = 1;
0040d0aa      return 1;
0040cf00  }

0040d0ab                                   cc cc cc cc cc                                                             .....

0040d0b0  void __fastcall List<PStringBase<unsigned short> >::flush(class List<PStringBase<unsigned short> >* this)

0040d0b0  {
0040d0b0      class List<PStringBase<unsigned short> >* var_4 = this;
0040d0b0      
0040d0c7      while (this->_head != 0)
0040d0c7      {
0040d0c9          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0040d0ce          var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
0040d0d6          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0040d0df          List<PStringBase<unsigned short> >::pop_front(this, &var_4);
0040d0e8          void* __offset(List<PStringBase<unsigned short> >, -0x14) esi_2 = ((char*)var_4 - 0x14);
0040d0e8          
0040d0f3          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0040d0ff              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0040d0c7      }
0040d0b0  }

0040d109                             cc cc cc cc cc cc cc                                                           .......

0040d110  void* __thiscall List<PStringBase<unsigned short> >::`scalar deleting destructor'(class List<PStringBase<unsigned short> >* this, uint32_t arg2)

0040d110  {
0040d113      this->vtable = 0x794488;
0040d119      List<PStringBase<unsigned short> >::flush(this);
0040d119      
0040d123      if ((arg2 & 1) != 0)
0040d126          operator delete(this);
0040d126      
0040d131      return this;
0040d110  }

0040d134                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0040d140  uint8_t PSUtils::find_files(class PStringBase<char> const* arg1, class List<PStringBase<char> >* arg2, class List<PStringBase<char> >* arg3, uint8_t arg4)

0040d140  {
0040d146      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040d154      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0040d15c      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040d16b      template_get_directory<char>(&PStringBase<char>::s_NullBuffer_2, arg1);
0040d17c      class PStringBase<char> var_140;
0040d17c      PStringBase<char>::PStringBase<char>(&var_140, &data_794504);
0040d18b      template_change_directory<char>(&var_140, &PStringBase<char>::s_NullBuffer_2);
0040d190      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0040d192      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0040d19d      InterlockedIncrement(&m_charbuffer[-1]);
0040d1a4      template_strip_directory<char>(&m_charbuffer_1);
0040d1b3      int32_t var_118;
0040d1b3      int32_t eax_1 = _findfirst(var_140, &var_118);
0040d1b3      
0040d1c9      if (eax_1 != 0xffffffff)
0040d1c9      {
0040d3c1          int32_t i;
0040d3c1          
0040d3c1          do
0040d3c1          {
0040d1e0              class PStringBase<char> var_150;
0040d1e0              void var_104;
0040d1e0              PStringBase<char>::PStringBase<char>(&var_150, &var_104);
0040d1e0              
0040d1fe              if ((_stricmp(var_150, ignore1.m_charbuffer) != 0 && _stricmp(var_150, ignore2.m_charbuffer) != 0))
0040d1fe              {
0040d229                  class PStringBase<char>* var_11c_1 = &var_150;
0040d22f                  int32_t var_128 = 0x79448c;
0040d233                  int32_t var_138 = 0x79448c;
0040d241                  int32_t var_124_1 = 0;
0040d245                  int32_t var_120_1 = 0;
0040d249                  class PSRefBufferCharData<char>** var_12c_1 = &m_charbuffer_1;
0040d24d                  int32_t var_134_1 = 0;
0040d251                  int32_t var_130_1 = 0;
0040d262                  bool cond:1_1 = wildcard_match_iter<char>(&var_128, &var_138) == 0;
0040d264                  var_138 = 0x794478;
0040d268                  var_128 = 0x794478;
0040d26c                  class PStringBase<char> var_154;
0040d26c                  
0040d26c                  if (!(cond:1_1))
0040d26c                  {
0040d26e                      class PStringBase<char> eax_6 = var_150;
0040d272                      var_154 = eax_6;
0040d27a                      InterlockedIncrement((eax_6 - 0x10));
0040d286                      template_change_directory<char>(&var_154, &PStringBase<char>::s_NullBuffer_2);
0040d29a                      List<PStringBase<char> >::push_back(arg2, &var_154);
0040d2a3                      int32_t* esi_3 = (var_154 - 0x14);
0040d2a3                      
0040d2b2                      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0040d2ba                          **(uint32_t**)esi_3(1);
0040d26c                  }
0040d26c                  
0040d2d9                  if (((((int8_t)(var_118 >> 4)) & 1) != 0 && (arg3 != 0 || arg4 != 0)))
0040d2d9                  {
0040d2df                      class PStringBase<char> eax_12 = var_150;
0040d2e3                      var_154 = eax_12;
0040d2eb                      InterlockedIncrement((eax_12 - 0x10));
0040d2f7                      template_change_directory<char>(&var_154, &PStringBase<char>::s_NullBuffer_2);
0040d2f7                      
0040d301                      if (arg3 != 0)
0040d30a                          List<PStringBase<char> >::push_back(arg3, &var_154);
0040d30a                      
0040d317                      if (arg4 != 0)
0040d317                      {
0040d319                          class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
0040d31d                          class PStringBase<char> m_charbuffer_3 = m_charbuffer_2;
0040d325                          InterlockedIncrement(&m_charbuffer_2[-1]);
0040d331                          template_change_directory<char>(&m_charbuffer_3, &var_154);
0040d34c                          PSUtils::find_files(&m_charbuffer_3, arg2, arg3, arg4);
0040d355                          int32_t* esi_5 = (m_charbuffer_3 - 0x14);
0040d355                          
0040d367                          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0040d36f                              **(uint32_t**)esi_5(1);
0040d317                      }
0040d317                      
0040d375                      int32_t* esi_7 = (var_154 - 0x14);
0040d375                      
0040d384                      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
0040d38c                          **(uint32_t**)esi_7(1);
0040d2d9                  }
0040d1fe              }
0040d1fe              
0040d392              int32_t* esi_9 = (var_150 - 0x14);
0040d392              
0040d3a1              if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
0040d3a9                  **(uint32_t**)esi_9(1);
0040d3a9              
0040d3b5              i = _findnext(eax_1, &var_118);
0040d3c1          } while (i != 0xffffffff);
0040d1c9      }
0040d1c9      
0040d3cd      _findclose(eax_1);
0040d3d7      void* __offset(PSRefBufferCharData<char>, -0x14) esi_11 = &m_charbuffer_1->m_data[0xffffffec];
0040d3d7      
0040d3e9      if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
0040d3f1          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
0040d3f1      
0040d3f7      int32_t* esi_13 = (var_140 - 0x14);
0040d3f7      
0040d406      if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
0040d40e          **(uint32_t**)esi_13(1);
0040d40e      
0040d414      void* __offset(PSRefBufferCharData<char>, -0x14) esi_15 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0040d414      
0040d423      if ((InterlockedDecrement(((char*)esi_15 + 4)) == 0 && esi_15 != 0))
0040d42b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_15) + -0x14)(1);
0040d42b      
0040d42f      int32_t eax_26;
0040d42f      eax_26 = 1;
0040d438      return 1;
0040d140  }

0040d439                                                                             cc cc cc cc cc cc cc                           .......

0040d440  uint8_t __convention("regparm") PSUtils::narrowify(class PStringBase<char>* arg1, class PStringBase<unsigned short> const* arg2)

0040d440  {
0040d440      class PStringBase<char> __return_1;
0040d440      class PStringBase<char> __return = __return_1;
0040d450      PStringBase<unsigned short>::to_spstring(arg2, &__return, 0);
0040d459      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0040d45b      class PStringBase<char> __return_2 = __return;
0040d45b      
0040d467      if (m_charbuffer != __return_2)
0040d467      {
0040d478          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040d480              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040d480          
0040d486          arg1->m_charbuffer = __return_2;
0040d488          InterlockedIncrement((__return_2 - 0x10));
0040d467      }
0040d467      
0040d49d      if ((InterlockedDecrement((__return_2 - 0x10)) == 0 && __return_2 != 0x14))
0040d4a5          **(uint32_t**)(__return_2 - 0x14)(1);
0040d4a5      
0040d4aa      int32_t eax_2;
0040d4aa      eax_2 = 1;
0040d4ae      return 1;
0040d440  }

0040d4af                                               cc                                                                 .

0040d4b0  class PStringBase<char>* __convention("regparm") PSUtils::narrowify(class PStringBase<char>* __return, class PStringBase<unsigned short> const* arg2)

0040d4b0  {
0040d4b0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
0040d4b0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
0040d4b1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040d4bf      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0040d4cd      class PStringBase<unsigned short>* var_14_1 = arg2;
0040d4d2      class PSRefBufferCharData<char>** var_18 = &PStringBase<char>::s_NullBuffer_2;
0040d4d3      PSUtils::narrowify(arg2, InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]));
0040d4d8      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0040d4e7      __return->m_charbuffer = PStringBase<char>::s_NullBuffer_4;
0040d4e9      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
0040d4e9      
0040d4fe      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
0040d506          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
0040d506      
0040d50e      return __return;
0040d4b0  }

0040d50f                                               cc                                                                 .

0040d510  int32_t __thiscall PStringBase<unsigned short>::replace(class PStringBase<unsigned short>* this, class PStringBase<unsigned short> const* arg2, class PStringBase<unsigned short> const* arg3)

0040d510  {
0040d522      int32_t* ebx = nullptr;
0040d526      void* var_c = nullptr;
0040d52a      int32_t* var_8 = nullptr;
0040d52e      int32_t var_4 = 0;
0040d538      int32_t i = wcsstr(this->m_charbuffer, arg2->m_charbuffer);
0040d53f      int32_t result = i;
0040d53f      
0040d543      while (i != 0)
0040d543      {
0040d549          if (ebx == var_4)
0040d549          {
0040d56d              _STL::vector<unsigned short const *,_STL::allocator<unsigned short const *> >::_M_insert_overflow(&var_c, ebx, &result, &arg3, 1, 1);
0040d572              ebx = var_8;
0040d549          }
0040d549          else
0040d549          {
0040d54d              if (ebx != 0)
0040d54f                  *(uint32_t*)ebx = i;
0040d54f              
0040d551              ebx = &ebx[1];
0040d554              var_8 = ebx;
0040d549          }
0040d549          
0040d576          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0040d587          i = wcsstr(((i + (m_charbuffer->m_data[0x7ffffffffffffffe] << 1)) - 2), m_charbuffer);
0040d58e          result = i;
0040d543      }
0040d543      
0040d594      void* ecx_2 = var_c;
0040d59a      int32_t result_1 = (((char*)ebx - ecx_2) >> 2);
0040d59d      result = result_1;
0040d59d      
0040d5a1      if (result_1 == 0)
0040d5a1      {
0040d5a5          if (ecx_2 != 0)
0040d5b6              _STL::__node_alloc<1,0>::deallocate(ecx_2, (((var_4 - ecx_2) >> 2) * 4));
0040d5b6          
0040d5c7          return 0;
0040d5a1      }
0040d5a1      
0040d5dc      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_charbuffer;
0040d5e5      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &m_charbuffer_1->m_data[-0xa];
0040d5f3      PStringBase<unsigned short>::allocate_ref_buffer(this, ((((arg3->m_charbuffer->m_data[0x7ffffffffffffffe] - arg2->m_charbuffer->m_data[0x7ffffffffffffffe]) * result_1) + m_charbuffer_1->m_data[0x7ffffffffffffffe]) - 1));
0040d5f8      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this->m_charbuffer;
0040d5fb      int32_t ebp_1 = 0;
0040d601      class PSRefBufferCharData<unsigned short>* edi_1 = ((char*)esi_1 + 0x14);
0040d601      
0040d604      if (result > 0)
0040d604      {
0040d651          do
0040d651          {
0040d60f              int32_t esi_4 = ((*(uint32_t*)((char*)var_c + (ebp_1 << 2)) - edi_1) >> 1);
0040d614              wcsncpy(m_charbuffer_2, edi_1, esi_4);
0040d621              void* ebx_2 = &m_charbuffer_2->m_data[esi_4];
0040d625              wcscpy(ebx_2, arg3->m_charbuffer);
0040d63a              m_charbuffer_2 = (((char*)ebx_2 + (arg3->m_charbuffer->m_data[0x7ffffffffffffffe] << 1)) - 2);
0040d643              ebp_1 += 1;
0040d64d              edi_1 = &edi_1->m_data[((arg2->m_charbuffer->m_data[0x7ffffffffffffffe] + esi_4) - 1)];
0040d651          } while (ebp_1 < result);
0040d604      }
0040d604      
0040d659      wcscpy(m_charbuffer_2, edi_1);
0040d659      
0040d672      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0040d67a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0040d67a      
0040d67c      void* ecx_15 = var_c;
0040d67c      
0040d682      if (ecx_15 != 0)
0040d693          _STL::__node_alloc<1,0>::deallocate(ecx_15, (((var_4 - ecx_15) >> 2) * 4));
0040d693      
0040d6a6      return result;
0040d510  }

0040d6a9                             cc cc cc cc cc cc cc                                                           .......

0040d6b0  uint8_t template_cleanup_filename<char>(class PStringBase<char>* arg1, uint8_t arg2)

0040d6b0  {
0040d6bc      if (((*(uint8_t*)template_cleanup_filename<char>::`local static guard'::~`local static guard') & 1) == 0)
0040d6bc      {
0040d6be          (*(uint32_t*)template_cleanup_filename<char>::`local static guard'::~`local static guard') |= 1;
0040d6c6          void* eax_1 = operator new[](0x24);
0040d6c6          
0040d6d0          if (eax_1 != 0)
0040d6d0          {
0040d6d2              *(uint32_t*)((char*)eax_1 + 4) = 1;
0040d6d5              *(uint32_t*)eax_1 = 0x7ca074;
0040d6db              *(uint32_t*)((char*)eax_1 + 0x10) = 1;
0040d6de              *(uint32_t*)((char*)eax_1 + 8) = 1;
0040d6e1              *(uint32_t*)((char*)eax_1 + 0xc) = 0xffffffff;
0040d6eb              *(uint8_t*)((char*)eax_1 + 0x14) = 0;
0040d6ee              back_slash.m_charbuffer = ((char*)eax_1 + 0x14);
0040d6f3              *(uint32_t*)((char*)eax_1 + 0x10) = 2;
0040d6ff              *(uint32_t*)(back_slash.m_charbuffer - 0xc) = 0x10;
0040d6d0          }
0040d6d0          
0040d706          back_slash.m_charbuffer->m_data[0] = 0x5c;
0040d70f          back_slash.m_charbuffer->m_data[1] = 0;
0040d71e          atexit(`template_cleanup_filename<char>'::`2'::back_slash);
0040d6bc      }
0040d6bc      
0040d72d      if (((*(uint8_t*)template_cleanup_filename<char>::`local static guard'::~`local static guard') & 2) == 0)
0040d72d      {
0040d72f          (*(uint32_t*)template_cleanup_filename<char>::`local static guard'::~`local static guard') |= 2;
0040d738          void* eax_4 = operator new[](0x24);
0040d738          
0040d742          if (eax_4 != 0)
0040d742          {
0040d744              *(uint32_t*)((char*)eax_4 + 4) = 1;
0040d747              *(uint32_t*)eax_4 = 0x7ca074;
0040d74d              *(uint32_t*)((char*)eax_4 + 0x10) = 1;
0040d750              *(uint32_t*)((char*)eax_4 + 8) = 1;
0040d753              *(uint32_t*)((char*)eax_4 + 0xc) = 0xffffffff;
0040d75d              *(uint8_t*)((char*)eax_4 + 0x14) = 0;
0040d760              forward_slash.m_charbuffer = ((char*)eax_4 + 0x14);
0040d765              *(uint32_t*)((char*)eax_4 + 0x10) = 2;
0040d771              *(uint32_t*)(forward_slash.m_charbuffer - 0xc) = 0x10;
0040d742          }
0040d742          
0040d778          forward_slash.m_charbuffer->m_data[0] = 0x2f;
0040d781          forward_slash.m_charbuffer->m_data[1] = 0;
0040d790          atexit(`template_cleanup_filename<char>'::`2'::forward_slash);
0040d72d      }
0040d72d      
0040d7a1      if (arg2 != 0)
0040d7a1      {
0040d7ad          PStringBase<char>::replace(arg1, &forward_slash, &back_slash);
0040d7b2          int32_t eax_7;
0040d7b2          eax_7 = 1;
0040d7b5          return 1;
0040d7a1      }
0040d7a1      
0040d7c0      PStringBase<char>::replace(arg1, &back_slash, &forward_slash);
0040d7c5      int32_t eax_8;
0040d7c5      eax_8 = 1;
0040d7c8      return 1;
0040d6b0  }

0040d7c9                             cc cc cc cc cc cc cc                                                           .......

0040d7d0  uint8_t PSUtils::get_cwd(class PStringBase<char>* arg1)

0040d7d0  {
0040d7e8      void lpBuffer;
0040d7e8      
0040d7e8      if (GetCurrentDirectoryA(0x400, &lpBuffer) == 0)
0040d7e8      {
0040d87b          uint32_t eax;
0040d87b          eax = 0;
0040d883          return 0;
0040d7e8      }
0040d7e8      
0040d7fe      PStringBase<char>::set(arg1, &lpBuffer);
0040d80c      class PStringBase<char> var_408;
0040d80c      PStringBase<char>::PStringBase<char>(&var_408, &data_7944ac);
0040d81a      class PStringBase<char> var_404;
0040d81a      PStringBase<char>::PStringBase<char>(&var_404, &data_79450c);
0040d82b      PStringBase<char>::replace(arg1, &var_404, &var_408);
0040d83a      int32_t* esi_2 = (var_404 - 0x14);
0040d83a      
0040d849      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0040d851          **(uint32_t**)esi_2(1);
0040d851      
0040d857      int32_t* esi_4 = (var_408 - 0x14);
0040d857      
0040d866      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0040d86e          **(uint32_t**)esi_4(1);
0040d86e      
0040d871      int32_t eax_3;
0040d871      eax_3 = 1;
0040d87a      return 1;
0040d7d0  }

0040d884              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040d890  uint8_t PSUtils::cleanup_filename(class PStringBase<char>* arg1, uint8_t arg2)

0040d890  {
0040d890      /* tailcall */
0040d890      return template_cleanup_filename<char>(arg1, arg2);
0040d890  }

0040d895                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040d8a0  uint8_t PSUtils::GetLongPathNameA(class PStringBase<char> const* arg1, class PStringBase<char>* arg2)

0040d8a0  {
0040d8c2      char var_371 = 0;
0040d8ce      void lpFilePart;
0040d8ce      void var_348;
0040d8ce      void lpszLongPath;
0040d8ce      
0040d8ce      if ((GetFullPathNameA(arg1->m_charbuffer, 0x104, &var_348, &lpFilePart) > 0 && GetLongPathNameA(&var_348, &lpszLongPath, 0x104) > 0))
0040d8ce      {
0040d8f7          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040d901          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0040d905          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040d917          class PStringBase<char> var_36c;
0040d917          PStringBase<char>::PStringBase<char>(&var_36c, &lpszLongPath);
0040d917          
0040d934          if (template_cleanup_filename<char>(&var_36c, 0) != 0)
0040d934          {
0040d946              struct List<PStringBase<char> >::VTable* const var_360 = &List<class PStringBase<char> >::`vftable';
0040d94e              class PStringBase<unsigned short>* var_35c_1 = nullptr;
0040d952              int32_t var_358_1 = 0;
0040d956              int32_t var_354_1 = 0;
0040d956              
0040d964              if (template_explode<char>(&var_36c, 0x2f, &var_360) != 0)
0040d964              {
0040d973                  PStringBase<unsigned short>::operator=(&PStringBase<char>::s_NullBuffer_2, var_35c_1);
0040d97a                  class PStringBase<char>* ebp_1;
0040d97a                  
0040d97a                  if (var_35c_1 != 0)
0040d980                      ebp_1 = *(int32_t*)((char*)var_35c_1 + 4);
0040d980                  
0040d985                  if ((var_35c_1 == 0 || ebp_1 == 0))
0040d985                  {
0040da6b                  label_40da6b:
0040da6b                      PStringBase<char>::set(arg2, &PStringBase<char>::s_NullBuffer_2);
0040da70                      var_371 = 1;
0040d985                  }
0040d985                  else
0040d985                  {
0040d999                      while (true)
0040d999                      {
0040d999                          void* var_368;
0040d999                          PStringBase<char>::PStringBase<char>(&var_368, &data_7944ac);
0040d9b9                          PSTR __return;
0040d9b9                          class PStringBase<char> __return_1;
0040d9b9                          PStringBase<char>::operator+(PStringBase<char>::operator+(&PStringBase<char>::s_NullBuffer_2, &__return_1, &var_368), &__return, ebp_1);
0040d9c2                          int32_t* esi_3 = (__return_1 - 0x14);
0040d9c2                          
0040d9d1                          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0040d9d9                              **(uint32_t**)esi_3(1);
0040d9d9                          
0040d9df                          int32_t* esi_5 = ((char*)var_368 - 0x14);
0040d9df                          
0040d9ee                          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0040d9f6                              **(uint32_t**)esi_5(1);
0040d9f6                          
0040d9f8                          PSTR lpFileName = __return;
0040da05                          void lpFindFileData;
0040da05                          FindFileHandle hFindFile;
0040da05                          char* edx_3;
0040da05                          hFindFile = FindFirstFileA(lpFileName, &lpFindFileData);
0040da05                          
0040da10                          if (hFindFile == 0xffffffff)
0040da10                          {
0040dae0                              if ((InterlockedDecrement(&lpFileName[0xfffffff0]) == 0 && lpFileName != 0x14))
0040dae8                                  **(uint32_t**)(lpFileName - 0x14)(1);
0040dae8                              
0040dae0                              break;
0040da10                          }
0040da10                          
0040da1d                          void var_114;
0040da1d                          void* var_388_9 = &var_114;
0040da22                          void* const var_38c_3 = &data_794510;
0040da27                          class PSRefBufferCharData<char>** var_390_3 = &PStringBase<char>::s_NullBuffer_2;
0040da28                          PStringBase<char>::sprintf_append(hFindFile, edx_3);
0040da31                          FindClose(hFindFile);
0040da31                          
0040da46                          if ((InterlockedDecrement(&lpFileName[0xfffffff0]) == 0 && lpFileName != 0x14))
0040da4e                              **(uint32_t**)(lpFileName - 0x14)(1);
0040da4e                          
0040da52                          if (ebp_1 == 0)
0040da52                              goto label_40da6b;
0040da52                          
0040da54                          ebp_1 = *(int32_t*)((char*)ebp_1 + 4);
0040da54                          
0040da59                          if (ebp_1 == 0)
0040da59                              goto label_40da6b;
0040d999                      }
0040d985                  }
0040d964              }
0040d964              
0040da79              var_360 = &List<class PStringBase<char> >::`vftable';
0040da81              List<PStringBase<char> >::flush(&var_360);
0040da86              PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer_2;
0040d934          }
0040d934          
0040da90          int32_t* esi_9 = (var_36c - 0x14);
0040da90          
0040da9f          if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
0040daa7              **(uint32_t**)esi_9(1);
0040daa7          
0040dab8          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0040dac0              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0040dac0          
0040dac2          int32_t eax_13;
0040dac2          eax_13 = var_371;
0040dad0          return eax_13;
0040d8ce      }
0040d8ce      
0040daec      uint32_t eax_1;
0040daec      eax_1 = 0;
0040daf5      return 0;
0040d8a0  }

0040d98d                                         8d 49 00                                                               .I.
0040daf6                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0040db00  uint8_t __convention("regparm") PSUtils::unwrap_string(class PStringBase<char>* arg1)

0040db00  {
0040db00      class PStringBase<char> ecx;
0040db00      class PStringBase<char> var_4 = ecx;
0040db0b      PStringBase<char>::PStringBase<char>(&var_4, &data_794508);
0040db1e      PStringBase<char>::replace(arg1, &var_4, &PStringBase<char>::s_NullBuffer);
0040db27      int32_t* esi_1 = (var_4 - 0x14);
0040db27      
0040db3a      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0040db42          **(uint32_t**)esi_1(1);
0040db42      
0040db44      int32_t eax;
0040db44      eax = 1;
0040db48      return 1;
0040db00  }

0040db49                             cc cc cc cc cc cc cc                                                           .......

0040db50  uint8_t PSUtils::template_cleanup_directory_name<char>(class PStringBase<char>* arg1, uint8_t arg2)

0040db50  {
0040db51      char ebx = ((int8_t)arg2);
0040db5c      template_cleanup_filename<char>(arg1, ebx);
0040db61      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0040db63      int32_t ecx = m_charbuffer->m_data[-4];
0040db69      char temp0 = ebx;
0040db69      ebx = -(ebx);
0040db69      
0040db76      if (ecx >= 2)
0040db76      {
0040db80          if ((ecx - 2) < ecx)
0040db88              m_charbuffer = &m_charbuffer->m_data[(ecx - 2)];
0040db80          else
0040db82              m_charbuffer = &m_charbuffer->m_data[(ecx - 1)];
0040db82          
0040db8d          if (m_charbuffer->m_data[0] != (((ebx - ebx) & 0x2d) + 0x2f))
0040db8d          {
0040db98              arg2 = (((ebx - ebx) & 0x2d) + 0x2f);
0040db9c              PStringBase<char>::append_n_chars(arg1, &arg2, 1);
0040db8d          }
0040db76      }
0040db76      
0040dba2      m_charbuffer = 1;
0040dba5      return 1;
0040db50  }

0040dba6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0040dbb0  uint8_t PSUtils::cleanup_directory_name(class PStringBase<char>* arg1, uint8_t arg2)

0040dbb0  {
0040dbb0      /* tailcall */
0040dbb0      return PSUtils::template_cleanup_directory_name<char>(arg1, arg2);
0040dbb0  }

0040dbb5                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040dbc0  uint8_t PSUtils::template_create_directory<char>(class PStringBase<char> const* arg1)

0040dbc0  {
0040dbc7      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0040dbd2      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0040dbdb      InterlockedIncrement(&m_charbuffer[-1]);
0040dbe5      template_cleanup_filename<char>(&m_charbuffer_1, 0);
0040dbea      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
0040dbee      int32_t ecx = m_charbuffer_2->m_data[-4];
0040dbee      
0040dbf7      if (ecx >= 2)
0040dbf7      {
0040dc00          void* eax_2;
0040dc00          
0040dc00          if ((ecx - 2) < ecx)
0040dc08              eax_2 = &m_charbuffer_2->m_data[(ecx - 2)];
0040dc00          else
0040dc02              eax_2 = &m_charbuffer_2->m_data[(ecx - 1)];
0040dc02          
0040dc0d          if (*(uint8_t*)eax_2 != 0x2f)
0040dc0d          {
0040dc1a              arg1 = 0x2f;
0040dc1f              PStringBase<char>::append_n_chars(&m_charbuffer_1, &arg1, 1);
0040dc0d          }
0040dbf7      }
0040dbf7      
0040dc35      struct List<PStringBase<char> >::VTable* const var_10 = &List<class PStringBase<char> >::`vftable';
0040dc39      int32_t* i_1 = nullptr;
0040dc3d      int32_t var_8 = 0;
0040dc41      int32_t var_4 = 0;
0040dc41      
0040dc4f      if (template_explode<char>(&m_charbuffer_1, 0x2f, &var_10) == 0)
0040dc4f      {
0040dc55          var_10 = &List<class PStringBase<char> >::`vftable';
0040dc59          List<PStringBase<char> >::flush(&var_10);
0040dc62          void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &m_charbuffer_1->m_data[0xffffffec];
0040dc62          
0040dc75          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0040dc7d              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0040dc7d          
0040dc82          int32_t eax_4;
0040dc82          eax_4 = 0;
0040dc88          return 0;
0040dc4f      }
0040dc4f      
0040dc89      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040dc8f      int32_t* i = i_1;
0040dc97      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0040dc9b      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040dc9b      
0040dc9f      for (; i != 0; i = i[1])
0040dc9f      {
0040dcb0          char* eax_6 = *(uint32_t*)i;
0040dcb2          int32_t ecx_7 = *(uint32_t*)(eax_6 - 4);
0040dcb2          
0040dcb8          if (ecx_7 != 1)
0040dcc3              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, eax_6, (ecx_7 - 1));
0040dcc3          
0040dcd3          arg1 = 0x2f;
0040dcd8          PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, &arg1, 1);
0040dcdd          PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer_2;
0040dcdd          
0040dceb          if ((_access(PStringBase<char>::s_NullBuffer_1, 0) != 0 && CreateDirectoryA(PStringBase<char>::s_NullBuffer_1, nullptr) == 0))
0040dceb          {
0040dd6a              if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0040dd72                  *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0040dd72              
0040dd78              var_10 = &List<class PStringBase<char> >::`vftable';
0040dd80              List<PStringBase<char> >::flush(&var_10);
0040dd89              void* __offset(PSRefBufferCharData<char>, -0x14) esi_9 = &m_charbuffer_1->m_data[0xffffffec];
0040dd89              
0040dd98              if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
0040dda0                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
0040dda0              
0040dda5              int32_t eax_16;
0040dda5              eax_16 = 0;
0040ddab              return 0;
0040dceb          }
0040dc9f      }
0040dc9f      
0040dd17      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0040dd1f          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0040dd1f      
0040dd25      var_10 = &List<class PStringBase<char> >::`vftable';
0040dd29      List<PStringBase<char> >::flush(&var_10);
0040dd32      void* __offset(PSRefBufferCharData<char>, -0x14) esi_6 = &m_charbuffer_1->m_data[0xffffffec];
0040dd32      
0040dd41      if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
0040dd49          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
0040dd49      
0040dd4e      int32_t eax_12;
0040dd4e      eax_12 = 1;
0040dd54      return 1;
0040dbc0  }

0040ddac                                      cc cc cc cc                                                              ....

0040ddb0  uint8_t PSUtils::create_directory(class PStringBase<char> const* arg1)

0040ddb0  {
0040ddb0      /* tailcall */
0040ddb0      return PSUtils::template_create_directory<char>(arg1);
0040ddb0  }

0040ddb5                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040ddc0  uint8_t __thiscall RegEdit::QueryStrValue(class RegEdit* this, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3, char* arg4, uint32_t arg5, struct HKEY__* arg6)

0040ddc0  {
0040ddc0      class RegEdit* var_4 = this;
0040ddc5      class PStringBase<char>* edx = arg2;
0040ddd8      arg5 = arg5;
0040dddc      class PSRefBufferCharData<char>* m_charbuffer = edx->m_charbuffer;
0040dde2      var_4 = nullptr;
0040ddf2      int32_t ebx;
0040ddf2      ebx = RegOpenKeyExA(arg6, m_charbuffer, 0, KEY_READ, &var_4) == NO_ERROR;
0040ddf2      
0040ddf7      if (ebx != 0)
0040de1e          ebx = RegQueryValueExA(var_4, arg3->m_charbuffer, nullptr, &arg2, arg4, &arg5) == NO_ERROR;
0040de1e      
0040de21      class RegEdit* hKey = var_4;
0040de21      
0040de27      if (hKey != 0)
0040de2a          RegCloseKey(hKey);
0040de2a      
0040de30      hKey = ebx;
0040de34      return hKey;
0040ddc0  }

0040de37                                                                       cc cc cc cc cc cc cc cc cc                         .........

0040de40  uint8_t __thiscall RegEdit::QueryWStrValue(class RegEdit* this, class PStringBase<unsigned short> const* arg2, class PStringBase<unsigned short> const* arg3, wchar16* arg4, uint32_t arg5, struct HKEY__* arg6)

0040de40  {
0040de40      class RegEdit* var_4 = this;
0040de4a      class RegEdit** var_c = &var_4;
0040de52      class PStringBase<unsigned short>* eax_1 = arg2;
0040de56      int32_t var_10 = 0x20019;
0040de5b      arg5 *= 2;
0040de61      int32_t var_14 = 0;
0040de63      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax_1->m_charbuffer;
0040de64      struct HKEY__* var_1c = arg6;
0040de65      var_4 = nullptr;
0040de75      int32_t ebx;
0040de75      ebx = advapi32_RegOpenKeyExW_Ptr() == 0;
0040de75      
0040de7a      if (ebx != 0)
0040de7a      {
0040de84          uint32_t* var_c_1 = &arg5;
0040de89          wchar16* var_10_1 = arg4;
0040de90          class PStringBase<unsigned short> const** var_14_1 = &arg2;
0040de95          int32_t var_18 = 0;
0040de97          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg3->m_charbuffer;
0040de98          class RegEdit* var_20_1 = var_4;
0040dea1          ebx = advapi32_RegQueryValueExW_Ptr() == 0;
0040de7a      }
0040de7a      
0040dea4      class RegEdit* hKey = var_4;
0040dea4      
0040deaa      if (hKey != 0)
0040dead          RegCloseKey(hKey);
0040dead      
0040deb3      hKey = ebx;
0040deb7      return hKey;
0040de40  }

0040deba                                                                                cc cc cc cc cc cc                            ......

0040dec0  uint8_t __thiscall RegEdit::DeleteValue(class RegEdit* this, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3, struct HKEY__* arg4)

0040dec0  {
0040dec0      class RegEdit* var_4 = this;
0040dec5      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0040deda      var_4 = nullptr;
0040deea      int32_t ebx;
0040deea      ebx = RegOpenKeyExA(arg4, m_charbuffer, 0, KEY_WRITE, &var_4) == NO_ERROR;
0040deea      
0040deef      if (ebx != 0)
0040df05          ebx = RegDeleteValueA(var_4, arg3->m_charbuffer) == NO_ERROR;
0040df05      
0040df08      class RegEdit* hKey = var_4;
0040df08      
0040df0e      if (hKey != 0)
0040df11          RegCloseKey(hKey);
0040df11      
0040df17      hKey = ebx;
0040df1b      return hKey;
0040dec0  }

0040df1e                                                                                            cc cc                                ..

0040df20  uint8_t __thiscall RegEdit::QueryStrValue(class RegEdit* this, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3, class PStringBase<char>* arg4, struct HKEY__* arg5)

0040df20  {
0040df45      void var_800;
0040df45      uint8_t result = RegEdit::QueryStrValue(this, arg2, arg3, &var_800, 0x800, arg5);
0040df45      
0040df4c      if (result == 0)
0040df54          return result;
0040df54      
0040df62      PStringBase<char>::set(arg4, &var_800);
0040df67      int32_t eax_1;
0040df67      eax_1 = 1;
0040df6f      return 1;
0040df20  }

0040df72                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0040df80  uint8_t RegEdit::QueryWStrValue(class RegEdit* this @ ecx, class PStringBase<unsigned short> const* arg2, class PStringBase<unsigned short> const* arg3, class PStringBase<unsigned short>* arg4, struct HKEY__* arg5)

0040df80  {
0040dfac      uint8_t result = RegEdit::QueryWStrValue(_chkstk(), arg_1004, arg_1008, &__return_addr, 0x800, arg_1010);
0040dfac      
0040dfb3      if (result == 0)
0040dfbb          return result;
0040dfbb      
0040dfc9      PStringBase<unsigned short>::set(arg_100c, &__return_addr);
0040dfce      int32_t eax_2;
0040dfce      eax_2 = 1;
0040dfd6      return 1;
0040df80  }

0040dfd9                                                                             cc cc cc cc cc cc cc                           .......

0040dfe0  uint8_t __thiscall CPluginManager::RemovePluginPrototype(class CPluginManager* this, class CPluginPrototype* arg2)

0040dfe0  {
0040dfe0      uint32_t i = 0;
0040dfe0      
0040dfe6      if (this->m_Plugins.m_num > 0)
0040dfe6      {
0040dfe8          class CPluginPrototype** m_data = this->m_Plugins.m_data;
0040dfe8          
0040dffd          do
0040dffd          {
0040dff2              if (*(uint32_t*)m_data == arg2)
0040dff2              {
0040e005                  arg2->m_pManager = nullptr;
0040e00c                  uint32_t m_num = this->m_Plugins.m_num;
0040e00c                  
0040e011                  if (i < m_num)
0040e011                  {
0040e018                      this->m_Plugins.m_num = (m_num - 1);
0040e018                      
0040e01b                      if (i != (m_num - 1))
0040e01b                      {
0040e01d                          class CPluginPrototype** m_data_1 = this->m_Plugins.m_data;
0040e022                          m_data_1[i] = m_data_1[(m_num - 1)];
0040e028                          this->m_Plugins.m_data[this->m_Plugins.m_num] = 0;
0040e01b                      }
0040e011                  }
0040e011                  
0040e031                  i = 1;
0040e034                  return 1;
0040dff2              }
0040dff2              
0040dff4              i += 1;
0040dff7              m_data = &m_data[1];
0040dffd          } while (i < this->m_Plugins.m_num);
0040dfe6      }
0040dfe6      
0040dfff      i = 0;
0040e002      return 0;
0040dfe0  }

0040e037                                                                       cc cc cc cc cc cc cc cc cc                         .........

0040e040  void CrashCleaners::CallCrashCleaners()

0040e040  {
0040e047      if (s_fCrashCleanersCalled == 0)
0040e047      {
0040e04a          int32_t i = 0;
0040e04c          bool cond:0_1 = G_crashCleaners.m_Plugins.m_num <= 0;
0040e052          s_fCrashCleanersCalled = 1;
0040e052          
0040e059          if (!(cond:0_1))
0040e059          {
0040e076              do
0040e076              {
0040e060                  G_crashCleaners.m_Plugins.m_data[i]->vtable[1].__vecDelDtor();
0040e06d                  i += 1;
0040e076              } while (i < G_crashCleaners.m_Plugins.m_num);
0040e059          }
0040e047      }
0040e040  }

0040e05d                                                                                         8d 49 00                               .I.
0040e07a                                                                                cc cc cc cc cc cc                            ......

0040e080  void __fastcall CPluginManager::~CPluginManager(class CPluginManager* this)

0040e080  {
0040e082      int32_t i = 0;
0040e082      
0040e087      if (this->m_Plugins.m_num > 0)
0040e087      {
0040e09e          do
0040e09e          {
0040e092              void* esi_2 = this->m_Plugins.m_data[i];
0040e095              i += 1;
0040e098              *(uint32_t*)((char*)esi_2 + 4) = 0;
0040e09e          } while (i < this->m_Plugins.m_num);
0040e087      }
0040e087      
0040e0ae      this->m_Plugins.m_num = 0;
0040e0ae      
0040e0b1      if ((this->m_Plugins.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0040e0b6          operator delete[](this->m_Plugins.m_data);
0040e080  }

0040e0bd                                                                                         cc cc cc                               ...

0040e0c0  void __fastcall CrashCleaner::~CrashCleaner(class CrashCleaner* this)

0040e0c0  {
0040e0c9      this->vtable = 0x794540;
0040e0cf      CPluginManager::RemovePluginPrototype(&G_crashCleaners, this);
0040e0d4      class CPluginManager* m_pManager = this->m_pManager;
0040e0d9      this->vtable = 0x794538;
0040e0d9      
0040e0df      if (m_pManager != 0)
0040e0df      {
0040e0e2          CPluginManager::RemovePluginPrototype(m_pManager, this);
0040e0e7          this->m_pManager = nullptr;
0040e0df      }
0040e0c0  }


0040e0f0  void* __thiscall CPluginPrototype::`scalar deleting destructor'(class CPluginPrototype* this, uint32_t arg2)

0040e0f0  {
0040e0f3      class CPluginManager* m_pManager = this->m_pManager;
0040e0f8      this->vtable = 0x794538;
0040e0f8      
0040e0fe      if (m_pManager != 0)
0040e0fe      {
0040e101          CPluginManager::RemovePluginPrototype(m_pManager, this);
0040e106          this->m_pManager = nullptr;
0040e0fe      }
0040e0fe      
0040e112      if ((arg2 & 1) != 0)
0040e115          operator delete(this);
0040e115      
0040e120      return this;
0040e0f0  }

0040e123           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0040e130  void* __thiscall CrashCleaner::`scalar deleting destructor'(class CrashCleaner* this, uint32_t arg2)

0040e130  {
0040e139      this->vtable = 0x794540;
0040e13f      CPluginManager::RemovePluginPrototype(&G_crashCleaners, this);
0040e144      class CPluginManager* m_pManager = this->m_pManager;
0040e149      this->vtable = 0x794538;
0040e149      
0040e14f      if (m_pManager != 0)
0040e14f      {
0040e152          CPluginManager::RemovePluginPrototype(m_pManager, this);
0040e157          this->m_pManager = nullptr;
0040e14f      }
0040e14f      
0040e163      if ((arg2 & 1) != 0)
0040e166          operator delete(this);
0040e166      
0040e171      return this;
0040e130  }

0040e174                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0040e180  uint8_t __thiscall CPluginManager::AddPluginPrototype(class CPluginManager* this, class CPluginPrototype* arg2)

0040e180  {
0040e18c      if (arg2->m_pManager != 0)
0040e18c      {
0040e18f          int32_t eax;
0040e18f          eax = 0;
0040e192          return 0;
0040e18c      }
0040e18c      
0040e198      int32_t eax_2 = (this->m_Plugins.m_sizeAndDeallocate & 0x7fffffff);
0040e1a0      uint8_t eax_5;
0040e1a0      
0040e1a0      if (this->m_Plugins.m_num >= eax_2)
0040e1b0          eax_5 = SmartArray<PFileNode *,1>::grow(this, SmartArray<PFileNode *,1>::get_new_size(this, (eax_2 + 1)));
0040e1b0      
0040e1b7      if ((this->m_Plugins.m_num < eax_2 || eax_5 != 0))
0040e1b7      {
0040e1bc          this->m_Plugins.m_data[this->m_Plugins.m_num] = arg2;
0040e1c1          this->m_Plugins.m_num += 1;
0040e1b7      }
0040e1b7      
0040e1c5      arg2->vtable->OnPluggedIn(arg2, this);
0040e1ce      int32_t eax_7;
0040e1ce      eax_7 = 1;
0040e1d1      return 1;
0040e180  }

0040e1d4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0040e1e0  void __fastcall CrashCleaner::CrashCleaner(class CrashCleaner* this)

0040e1e0  {
0040e1e9      this->m_pManager = nullptr;
0040e1f0      this->vtable = 0x794540;
0040e1f6      CPluginManager::AddPluginPrototype(&G_crashCleaners, this);
0040e1e0  }

0040e1ff                                                                                               cc                                 .

0040e200  int32_t DialogBoxGateways::ReportThread_PrepareForDialogBox()

0040e200  {
0040e201      int32_t ebx = *(int32_t*)((char*)DialogBoxGateways::s_qwReportContext + 4);
0040e208      int32_t DialogBoxGateways::s_qwReportContext_1 = (*(uint32_t*)DialogBoxGateways::s_qwReportContext);
0040e208      
0040e21b      if (InterlockedIncrement(0x8173c0) == 0)
0040e21b      {
0040e21e          int32_t i = 0;
0040e21e          
0040e226          if (G_dialogBoxGateways.m_Plugins.m_num > 0)
0040e226          {
0040e255              do
0040e255              {
0040e230                  G_dialogBoxGateways.m_Plugins.m_data[i]->vtable[2].__vecDelDtor();
0040e243                  int32_t eax_5;
0040e243                  int32_t edx_3;
0040e243                  eax_5 = _allshl();
0040e248                  i += 1;
0040e24b                  DialogBoxGateways::s_qwReportContext_1 |= eax_5;
0040e24d                  ebx |= edx_3;
0040e255              } while (i < G_dialogBoxGateways.m_Plugins.m_num);
0040e226          }
0040e226          
0040e257          (*(uint32_t*)DialogBoxGateways::s_qwReportContext) = DialogBoxGateways::s_qwReportContext_1;
0040e25d          *(int32_t*)((char*)DialogBoxGateways::s_qwReportContext + 4) = ebx;
0040e21b      }
0040e21b      
0040e26a      return DialogBoxGateways::s_qwReportContext_1;
0040e200  }

0040e22a                                8d 9b 00 00 00 00                                                            ......
0040e26b                                   cc cc cc cc cc                                                             .....

0040e270  void DialogBoxGateways::ReportThread_DoneWithDialogBox(uint64_t arg1)

0040e270  {
0040e27d      if (InterlockedDecrement(0x8173c0) < 0)
0040e27d      {
0040e280          int32_t i = 0;
0040e280          
0040e288          if (G_dialogBoxGateways.m_Plugins.m_num > 0)
0040e288          {
0040e2b9              do
0040e2b9              {
0040e29d                  int32_t vtable = G_dialogBoxGateways.m_Plugins.m_data[i]->vtable;
0040e2a8                  int32_t eax_3;
0040e2a8                  eax_3 = (_aullshr() & 1);
0040e2ad                  *(uint32_t*)(vtable + 0x14)(eax_3);
0040e2b0                  i += 1;
0040e2b9              } while (i < G_dialogBoxGateways.m_Plugins.m_num);
0040e288          }
0040e27d      }
0040e270  }


0040e2c0  int32_t DialogBoxGateways::DialogThread_PrepareForDialogBox()

0040e2c0  {
0040e2c1      int32_t ebx = *(int32_t*)((char*)DialogBoxGateways::s_qwDialogContext + 4);
0040e2c8      int32_t DialogBoxGateways::s_qwDialogContext_1 = (*(uint32_t*)DialogBoxGateways::s_qwDialogContext);
0040e2c8      
0040e2db      if (InterlockedIncrement(0x8173bc) == 0)
0040e2db      {
0040e2de          int32_t i = 0;
0040e2de          
0040e2e6          if (G_dialogBoxGateways.m_Plugins.m_num > 0)
0040e2e6          {
0040e315              do
0040e315              {
0040e2f0                  G_dialogBoxGateways.m_Plugins.m_data[i]->vtable[3].__vecDelDtor();
0040e303                  int32_t eax_5;
0040e303                  int32_t edx_3;
0040e303                  eax_5 = _allshl();
0040e308                  i += 1;
0040e30b                  DialogBoxGateways::s_qwDialogContext_1 |= eax_5;
0040e30d                  ebx |= edx_3;
0040e315              } while (i < G_dialogBoxGateways.m_Plugins.m_num);
0040e2e6          }
0040e2e6          
0040e317          (*(uint32_t*)DialogBoxGateways::s_qwDialogContext) = DialogBoxGateways::s_qwDialogContext_1;
0040e31d          *(int32_t*)((char*)DialogBoxGateways::s_qwDialogContext + 4) = ebx;
0040e2db      }
0040e2db      
0040e32a      return DialogBoxGateways::s_qwDialogContext_1;
0040e2c0  }

0040e2ea                                8d 9b 00 00 00 00                                                            ......
0040e32b                                   cc cc cc cc cc                                                             .....

0040e330  void DialogBoxGateways::DialogThread_DoneWithDialogBox(uint64_t arg1)

0040e330  {
0040e33d      if (InterlockedDecrement(0x8173bc) < 0)
0040e33d      {
0040e340          int32_t i = 0;
0040e340          
0040e348          if (G_dialogBoxGateways.m_Plugins.m_num > 0)
0040e348          {
0040e379              do
0040e379              {
0040e35d                  int32_t vtable = G_dialogBoxGateways.m_Plugins.m_data[i]->vtable;
0040e368                  int32_t eax_3;
0040e368                  eax_3 = (_aullshr() & 1);
0040e36d                  *(uint32_t*)(vtable + 0x1c)(eax_3);
0040e370                  i += 1;
0040e379              } while (i < G_dialogBoxGateways.m_Plugins.m_num);
0040e348          }
0040e33d      }
0040e330  }


0040e380  void __fastcall DialogBoxGateway::~DialogBoxGateway(class DialogBoxGateway* this)

0040e380  {
0040e389      this->vtable = 0x79454c;
0040e38f      CPluginManager::RemovePluginPrototype(&G_dialogBoxGateways, this);
0040e394      class CPluginManager* m_pManager = this->m_pManager;
0040e399      this->vtable = 0x794538;
0040e399      
0040e39f      if (m_pManager != 0)
0040e39f      {
0040e3a2          CPluginManager::RemovePluginPrototype(m_pManager, this);
0040e3a7          this->m_pManager = nullptr;
0040e39f      }
0040e380  }


0040e3b0  enum InArchiveVersionStack::Enum3 InArchiveVersionStack::You_Must_Not_Have_Multiple_Implementations_Of_AddRef_In_A_Hierarchy(class InArchiveVersionStack* this @ ecx) __pure

0040e3b0  {
0040e3b2      return 0;
0040e3b0  }

0040e3b3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0040e3c0  enum DialogBoxGateway::ThisFunctionHasBeenRenamed DialogBoxGateway::OnDialogBoxEnd(class DialogBoxGateway* this @ ecx, uint8_t arg2) __pure

0040e3c0  {
0040e3c2      return 0;
0040e3c0  }

0040e3c5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0040e3d0  uint8_t DialogBoxGateway::DialogThread_OnDialogBoxBegin(class DialogBoxGateway* this @ ecx) __pure

0040e3d0  {
0040e3d0      int32_t eax;
0040e3d0      eax = 0;
0040e3d2      return 0;
0040e3d0  }

0040e3d3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0040e3e0  void* __thiscall DialogBoxGateway::`scalar deleting destructor'(class DialogBoxGateway* this, uint32_t arg2)

0040e3e0  {
0040e3e9      this->vtable = 0x79454c;
0040e3ef      CPluginManager::RemovePluginPrototype(&G_dialogBoxGateways, this);
0040e3f4      class CPluginManager* m_pManager = this->m_pManager;
0040e3f9      this->vtable = 0x794538;
0040e3f9      
0040e3ff      if (m_pManager != 0)
0040e3ff      {
0040e402          CPluginManager::RemovePluginPrototype(m_pManager, this);
0040e407          this->m_pManager = nullptr;
0040e3ff      }
0040e3ff      
0040e413      if ((arg2 & 1) != 0)
0040e416          operator delete(this);
0040e416      
0040e421      return this;
0040e3e0  }

0040e424              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040e430  void __fastcall DialogBoxGateway::DialogBoxGateway(class DialogBoxGateway* this)

0040e430  {
0040e439      this->m_pManager = nullptr;
0040e440      this->vtable = 0x79454c;
0040e446      CPluginManager::AddPluginPrototype(&G_dialogBoxGateways, this);
0040e430  }

0040e44f                                               cc                                                                 .

0040e450  void __fastcall DbgReportContext::~DbgReportContext(class DbgReportContext* this)

0040e450  {
0040e45e      CloseHandle(this->m_hThread);
0040e463      CloseHandle(this->m_hProcess);
0040e450  }

0040e468                          cc cc cc cc cc cc cc cc                                                          ........

0040e470  void __thiscall DbgReportContext::DbgReportContext(class DbgReportContext* this, struct _EXCEPTION_POINTERS* arg2)

0040e470  {
0040e470      class DbgReportContext* lpTargetHandle = this;
0040e47f      HANDLE hSourceHandle = GetCurrentProcess();
0040e481      lpTargetHandle = hSourceHandle;
0040e485      HANDLE eax_1 = GetCurrentProcess();
0040e485      
0040e49f      if (DuplicateHandle(eax_1, hSourceHandle, eax_1, &lpTargetHandle, 0, 1, DUPLICATE_SAME_ACCESS) != 0)
0040e4a1          hSourceHandle = lpTargetHandle;
0040e4a1      
0040e4a5      this->m_hProcess = hSourceHandle;
0040e4ad      this->m_idThread = GetCurrentThreadId();
0040e4b6      class DbgReportContext* hSourceHandle_1 = GetCurrentThread();
0040e4b8      lpTargetHandle = hSourceHandle_1;
0040e4bc      HANDLE eax_5 = GetCurrentProcess();
0040e4bc      
0040e4d0      if (DuplicateHandle(eax_5, hSourceHandle_1, eax_5, &lpTargetHandle, 0, 1, DUPLICATE_SAME_ACCESS) != 0)
0040e4d2          hSourceHandle_1 = lpTargetHandle;
0040e4d2      
0040e4dc      this->m_hThread = hSourceHandle_1;
0040e4dc      
0040e4df      if (arg2 != 0)
0040e4df      {
0040e4e1          struct _CONTEXT* ContextRecord = arg2->ContextRecord;
0040e4e1          
0040e4e6          if (ContextRecord != 0)
0040e4e6          {
0040e4f4              this->m_hModule = GetModuleFromAddress(ContextRecord->Eip);
0040e4fd              return;
0040e4e6          }
0040e4df      }
0040e4df      
0040e509      this->m_hModule = GetModuleHandleA(nullptr);
0040e470  }

0040e515                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040e520  void DbgHelpWrapper::FreeDbgHelpFunctions()

0040e520  {
0040e520      struct HINSTANCE__* hDbgHelp_1 = g_hDbgHelp;
0040e520      
0040e52a      if (hDbgHelp_1 != 0)
0040e52a      {
0040e52d          __builtin_memset(&G_StackWalk, 0, 0x2c);
0040e56f          FreeLibrary(hDbgHelp_1);
0040e575          g_hDbgHelp = nullptr;
0040e52a      }
0040e520  }

0040e57d                                                                                         cc cc cc                               ...

0040e580  void __fastcall TextFileOutputHandler::Flush(class TextFileOutputHandler* this)

0040e580  {
0040e580      struct _iobuf* m_fileLog = this->m_fileLog;
0040e580      
0040e585      if (m_fileLog != 0)
0040e588          fflush(m_fileLog);
0040e580  }


0040e590  class PStringBase<char> const* __fastcall TextFileOutputHandler::GetLogFileName(class TextFileOutputHandler* this) __pure

0040e590  {
0040e593      return &this->m_strFilename;
0040e590  }

0040e594                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0040e5a0  void CAsyncStateHandler::OnStateHandlerInit(class CAsyncStateHandler* this @ ecx) __pure

0040e5a0  {
0040e5a0      return;
0040e5a0  }

0040e5a1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0040e5b0  enum Logger::LoggerWriteResult LogController::CategoryHandler::SendToOutputHandlers(class LogController::CategoryHandler const* this @ ecx, enum Logger::LoggingSeverity arg2, uint32_t arg3, char const* arg4)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0040e5b0  {
0040e5b5      void* ecx = _chkstk();
0040e5be      bool cond:0 = *(uint32_t*)((char*)ecx + 0x14) == 0;
0040e5c7      __return_addr = 2;
0040e5c7      
0040e5cb      if (cond:0)
0040e697          return 2;
0040e697      
0040e5e3      strncpy(&arg2, arg_1010, 0xfff);
0040e5e9      enum Logger::LoggingSeverity* eax_1 = &arg2;
0040e5f0      arg_1003 = 0;
0040e607      char i;
0040e607      
0040e607      do
0040e607      {
0040e600          i = *(uint8_t*)eax_1;
0040e602          eax_1 += 1;
0040e607      } while (i != 0);
0040e609      int32_t eax_2 = ((char*)eax_1 - &*(uint32_t*)((char*)arg2)[1]);
0040e609      
0040e611      if (*(uint8_t*)(&*(uint32_t*)((char*)__return_addr)[3] + eax_2) != 0xa)
0040e611      {
0040e618          if (eax_2 == 0xfff)
0040e61a              eax_2 = 0xffe;
0040e61a          
0040e61f          *(uint8_t*)(&arg2 + eax_2) = 0xa;
0040e623          *(uint8_t*)(&*(uint32_t*)((char*)arg2)[1] + eax_2) = 0;
0040e611      }
0040e611      
0040e629      int32_t i_1 = 0;
0040e629      
0040e62e      if (*(uint32_t*)((char*)ecx + 0x14) <= 0)
0040e68a          return 2;
0040e68a      
0040e66c      do
0040e66c      {
0040e64f          void* __return_addr_1 = *(uint32_t*)(**(uint32_t**)(*(uint32_t*)((char*)ecx + 0xc) + (i_1 << 2)) + 4)(arg_1008, arg_100c, &arg2);
0040e64f          
0040e660          if ((__return_addr_1 >= 0 && (__return_addr_1 <= 1 && __return_addr != 0)))
0040e662              __return_addr = __return_addr_1;
0040e662          
0040e666          i_1 += 1;
0040e66c      } while (i_1 < *(uint32_t*)((char*)ecx + 0x14));
0040e66c      
0040e67c      return __return_addr;
0040e5b0  }

0040e5fd                                                                                         8d 49 00                               .I.
0040e69a                                                                                cc cc cc cc cc cc                            ......

0040e6a0  enum Logger::LoggerWriteResult __stdcall ConsoleOutputHandler::Write(class ConsoleOutputHandler* this @ ecx, enum Logger::LoggingSeverity arg2, uint32_t arg3, char const* arg4)

0040e6a0  {
0040e6aa      printf(&data_7945ac, arg4);
0040e6b8      return 1;
0040e6a0  }

0040e6bb                                                                                   cc cc cc cc cc                             .....

0040e6c0  enum Logger::LoggerWriteResult __stdcall OutputDebugStringOutputHandler::Write(class OutputDebugStringOutputHandler* this @ ecx, enum Logger::LoggingSeverity arg2, uint32_t arg3, char const* arg4)

0040e6c0  {
0040e6c8      if (IsDebuggerPresent() != 0)
0040e6cf          OutputDebugStringA(arg4);
0040e6cf      
0040e6da      return 1;
0040e6c0  }

0040e6dd                                                                                         cc cc cc                               ...

0040e6e0  void* __thiscall IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>* this, uint32_t arg2)

0040e6e0  {
0040e6e3      class LogController::CategoryHandler** m_buckets = this->m_buckets;
0040e6eb      this->vtable = 0x7945bc;
0040e6eb      
0040e6f1      if (m_buckets != &this->m_aInplaceBuckets)
0040e6f4          operator delete[](m_buckets);
0040e6f4      
0040e703      this->m_buckets = nullptr;
0040e706      this->m_firstInterestingBucket = nullptr;
0040e709      this->m_numBuckets = 0;
0040e70c      this->m_numElements = 0;
0040e70c      
0040e70f      if ((arg2 & 1) != 0)
0040e712          operator delete(this);
0040e712      
0040e71d      return this;
0040e6e0  }


0040e720  class Logger::ILoggingOutputHandler* __fastcall LogController::GetConsoleOutputHandler(class LogController* this)

0040e720  {
0040e72a      if (this->m_plohConsole == 0)
0040e72a      {
0040e72e          class Logger::ILoggingOutputHandler* eax_1 = operator new(8);
0040e72e          
0040e738          if (eax_1 == 0)
0040e749              eax_1 = nullptr;
0040e738          else
0040e738          {
0040e73a              eax_1->m_cRef = 1;
0040e741              eax_1->vtable = 0x7945a0;
0040e738          }
0040e738          
0040e74b          this->m_plohConsole = eax_1;
0040e72a      }
0040e72a      
0040e75b      InterlockedIncrement(&this->m_plohConsole->m_cRef);
0040e768      return this->m_plohConsole;
0040e720  }

0040e769                             cc cc cc cc cc cc cc                                                           .......

0040e770  class Logger::ILoggingOutputHandler* __fastcall LogController::GetOutputDebugStringOutputHandler(class LogController* this)

0040e770  {
0040e77a      if (this->m_plohODS == 0)
0040e77a      {
0040e77e          class Logger::ILoggingOutputHandler* eax_1 = operator new(8);
0040e77e          
0040e788          if (eax_1 == 0)
0040e799              eax_1 = nullptr;
0040e788          else
0040e788          {
0040e78a              eax_1->m_cRef = 1;
0040e791              eax_1->vtable = 0x7945b0;
0040e788          }
0040e788          
0040e79b          this->m_plohODS = eax_1;
0040e77a      }
0040e77a      
0040e7ab      InterlockedIncrement(&this->m_plohODS->m_cRef);
0040e7b8      return this->m_plohODS;
0040e770  }

0040e7b9                                                                             cc cc cc cc cc cc cc                           .......

0040e7c0  uint32_t Logger::CreateLoggingCategory(char const* arg1)

0040e7c0  {
0040e7c6      if (arg1 == 0)
0040e7d3          return 0;
0040e7d3      
0040e7cc      /* tailcall */
0040e7cc      return compute_str_hash<char>(arg1);
0040e7c0  }

0040e7d4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0040e7e0  class Logger::ILoggingOutputHandler* Logger::GetConsoleOutputHandler()

0040e7e0  {
0040e7e7      if (g_fInitialized != 0)
0040e7f1          /* tailcall */
0040e7f1          return LogController::GetConsoleOutputHandler(&g_LogController);
0040e7f1      
0040e7eb      return 0;
0040e7e0  }

0040e7f6                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0040e800  class Logger::ILoggingOutputHandler* Logger::GetOutputDebugStringOutputHandler()

0040e800  {
0040e807      if (g_fInitialized != 0)
0040e811          /* tailcall */
0040e811          return LogController::GetOutputDebugStringOutputHandler(&g_LogController);
0040e811      
0040e80b      return 0;
0040e800  }

0040e816                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0040e820  uint32_t InstanceDiviner::AllocateIndex(class InstanceDiviner* this @ ecx, uint32_t arg2, class PStringBase<char> arg3)

0040e820  {
0040e825      class PStringBase<unsigned short>* ecx = _chkstk();
0040e825      
0040e832      if (*(int32_t*)((char*)ecx + 4) == 0)
0040e832      {
0040e848          if (*(uint32_t*)((char*)arg_100c - 4) != 1)
0040e854              PStringBase<unsigned short>::operator=(ecx, &arg_100c);
0040e854          
0040e85e          if (ecx->m_charbuffer->m_data[0x7ffffffffffffffe] == 1)
0040e85e          {
0040e870              PStringBase<unsigned short>::operator=(ecx, PSUtils::get_process_name(&__return_addr));
0040e879              void* edi_2 = ((char*)__return_addr - 0x14);
0040e879              
0040e88c              if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0040e893                  **(uint32_t**)edi_2(1);
0040e893              
0040e896              PSUtils::strip_directory(ecx);
0040e85e          }
0040e85e          
0040e89e          int32_t edi_3 = arg_1008;
0040e89e          
0040e8a7          if (edi_3 == 0)
0040e8a9              edi_3 = 1;
0040e8a9          
0040e8c6          while (true)
0040e8c6          {
0040e8c6              sprintf(&arg2, "%s_%d", ecx->m_charbuffer, edi_3);
0040e8cd              SetLastError(NO_ERROR);
0040e8d8              HANDLE eax_4 = CreateMutexA(nullptr, 0, &arg2);
0040e8e0              *(int32_t*)((char*)ecx + 4) = eax_4;
0040e8e0              
0040e8e3              if (eax_4 != 0)
0040e8e3              {
0040e8f0                  if (GetLastError() != ERROR_ALREADY_EXISTS)
0040e8f0                  {
0040e90b                      *(int32_t*)((char*)ecx + 8) = edi_3;
0040e90b                      break;
0040e8f0                  }
0040e8f0                  
0040e8f6                  CloseHandle(*(int32_t*)((char*)ecx + 4));
0040e8f6                  
0040e904                  if (arg_1008 != 0)
0040e904                      break;
0040e8e3              }
0040e8e3              
0040e906              edi_3 += 1;
0040e8c6          }
0040e832      }
0040e832      
0040e917      int32_t result = *(int32_t*)((char*)ecx + 8);
0040e91a      void* edi_5 = ((char*)arg_100c - 0x14);
0040e91a      
0040e92d      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
0040e935          **(uint32_t**)edi_5(1);
0040e935      
0040e941      return result;
0040e820  }

0040e944              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040e950  void* __thiscall InstanceDiviner::`scalar deleting destructor'(class InstanceDiviner* this, uint32_t arg2)

0040e950  {
0040e953      void* m_hMutex = this->m_hMutex;
0040e953      
0040e958      if (m_hMutex != 0)
0040e958      {
0040e95b          CloseHandle(m_hMutex);
0040e961          this->m_hMutex = nullptr;
0040e968          this->m_Index = 0;
0040e958      }
0040e958      
0040e972      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_NameStem.m_charbuffer - 0x14);
0040e972      
0040e985      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0040e98d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0040e98d      
0040e995      if ((arg2 & 1) != 0)
0040e998          operator delete(this);
0040e998      
0040e9a3      return this;
0040e950  }

0040e9a6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0040e9b0  uint8_t __thiscall TextFileOutputHandler::OpenLogFile(class TextFileOutputHandler* this, class PStringBase<char> const* arg2)

0040e9b0  {
0040e9b5      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0040e9b5      
0040e9be      if (m_charbuffer->m_data[-4] == 1)
0040e9be      {
0040e9c1          m_charbuffer = 0;
0040e9c4          return 0;
0040e9be      }
0040e9be      
0040e9cb      if (this->m_fileLog != 0)
0040e9cb      {
0040e9dd          if (_stricmp(this->m_strFilename.m_charbuffer, m_charbuffer) == 0)
0040e9dd          {
0040e9e0              int32_t eax;
0040e9e0              eax = 1;
0040e9e3              return 1;
0040e9dd          }
0040e9dd          
0040e9ea          fclose(this->m_fileLog);
0040e9f0          class InstanceDiviner* m_pidLogInstance = this->m_pidLogInstance;
0040e9f0          
0040e9f8          if (m_pidLogInstance != 0)
0040e9fc              InstanceDiviner::`scalar deleting destructor'(m_pidLogInstance, 1);
0040e9fc          
0040ea01          this->m_pidLogInstance = nullptr;
0040e9cb      }
0040e9cb      
0040ea15      struct _iobuf* eax_2 = fopen(this->m_strFilename.m_charbuffer, &data_7945dc);
0040ea20      this->m_fileLog = eax_2;
0040ea20      
0040ea25      if (eax_2 == 0)
0040ea25      {
0040ea3b          PStringBase<char>::clear(&this->m_strFilename);
0040ea4b          return this->m_fileLog != 0;
0040ea25      }
0040ea25      
0040ea28      PStringBase<unsigned short>::operator=(&this->m_strFilename, arg2);
0040ea38      return this->m_fileLog != 0;
0040e9b0  }

0040ea4e                                            cc cc                                                                ..

0040ea50  enum Logger::LoggerWriteResult __thiscall TimestamppedTextFileOutputHandler::Write(class TimestamppedTextFileOutputHandler* this, enum Logger::LoggingSeverity arg2, uint32_t arg3, char const* arg4)

0040ea50  {
0040ea57      if (this->m_fFirstWrite != 0)
0040ea57      {
0040ea5c          class PStringBase<char>* var_8_1 = &this->m_strFilename;
0040ea5d          TextFileOutputHandler::OpenLogFile();
0040ea62          this->m_fFirstWrite = 0;
0040ea57      }
0040ea57      
0040ea66      struct _iobuf* m_fileLog = this->m_fileLog;
0040ea66      
0040ea6b      if (m_fileLog == 0)
0040eaaa          return 0;
0040eaaa      
0040ea7f      fprintf(m_fileLog, "%0.3lf: ", ((double)((long double)Timer::cur_time)));
0040ea8e      fputs(arg4, this->m_fileLog);
0040ea94      this->vtable->Flush(this);
0040eaa4      return 1;
0040ea50  }

0040eaad                                         cc cc cc                                                               ...

0040eab0  void __thiscall InstanceDiviner::InstanceDiviner(class InstanceDiviner* this, class PStringBase<char> arg2, uint8_t arg3, uint32_t arg4)

0040eab0  {
0040eac0      class PStringBase<char>* this_1 = this;
0040eac3      this_1->m_charbuffer = arg2;
0040eac5      int32_t ecx = InterlockedIncrement((arg2 - 0x10));
0040eacc      *(int32_t*)((char*)this_1 + 4) = 0;
0040ead3      *(int32_t*)((char*)this_1 + 8) = 0;
0040ead3      
0040eada      if (arg3 != 0)
0040eada      {
0040eadc          int32_t var_10_1 = ecx;
0040eadd          class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
0040eaed          InterlockedIncrement(((char*)m_charbuffer - 0x10));
0040eaf6          InstanceDiviner::AllocateIndex(this_1, arg4, m_charbuffer);
0040eada      }
0040eada      
0040eb0e      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
0040eb16          **(uint32_t**)(arg2 - 0x14)(1);
0040eab0  }


0040eb20  uint8_t __thiscall SmartArray<unsigned long,1>::SetNElements(class SmartArray<unsigned long,1>* this, uint32_t const arg2, uint8_t arg3)

0040eb20  {
0040eb32      uint32_t const i;
0040eb32      
0040eb32      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
0040eb32      {
0040eb5b          i = arg2;
0040eb5b          
0040eb5d          if (arg2 < this->m_num)
0040eb5d          {
0040eb6f              do
0040eb6f              {
0040eb60                  this->m_data[i] = 0;
0040eb69                  i += 1;
0040eb6f              } while (i < this->m_num);
0040eb5d          }
0040eb32      }
0040eb32      else
0040eb32      {
0040eb39          uint32_t const eax_2;
0040eb39          
0040eb39          if (arg3 == 0)
0040eb42              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
0040eb39          else
0040eb3b              eax_2 = arg2;
0040eb3b          
0040eb4a          i = SmartArray<unsigned long,1>::grow(this, eax_2);
0040eb4a          
0040eb51          if (i == 0)
0040eb55              return i;
0040eb32      }
0040eb32      
0040eb71      this->m_num = arg2;
0040eb75      i = 1;
0040eb78      return 1;
0040eb20  }

0040eb7b                                                                                   cc cc cc cc cc                             .....

0040eb80  void __fastcall TextFileOutputHandler::~TextFileOutputHandler(class TextFileOutputHandler* this)

0040eb80  {
0040eb84      struct _iobuf* m_fileLog = this->m_fileLog;
0040eb8c      this->vtable = 0x7945c0;
0040eb8c      
0040eb92      if (m_fileLog != 0)
0040eb95          fclose(m_fileLog);
0040eb95      
0040eb9e      class InstanceDiviner* m_pidLogInstance = this->m_pidLogInstance;
0040eb9e      
0040ebaa      if (m_pidLogInstance != 0)
0040ebaa      {
0040ebac          void* m_hMutex = m_pidLogInstance->m_hMutex;
0040ebac          
0040ebb1          if (m_hMutex != 0)
0040ebb1          {
0040ebb4              CloseHandle(m_hMutex);
0040ebba              m_pidLogInstance->m_hMutex = nullptr;
0040ebbd              m_pidLogInstance->m_Index = 0;
0040ebb1          }
0040ebb1          
0040ebc2          void* __offset(PSRefBufferCharData<char>, -0x14) edi_2 = (m_pidLogInstance->m_NameStem.m_charbuffer - 0x14);
0040ebc2          
0040ebd1          if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0040ebd9              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0040ebd9          
0040ebdc          operator delete(m_pidLogInstance);
0040ebaa      }
0040ebaa      
0040ebe9      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_strFilename.m_charbuffer - 0x14);
0040ebf0      this->m_pidLogInstance = nullptr;
0040ebf0      
0040ebfc      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0040ec04          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0040ec04      
0040ec08      this->vtable = 0x7942f4;
0040eb80  }


0040ec10  enum Logger::LoggerWriteResult __thiscall TextFileOutputHandler::Write(class TextFileOutputHandler* this, enum Logger::LoggingSeverity arg2, uint32_t arg3, char const* arg4)

0040ec10  {
0040ec17      if (this->m_fFirstWrite != 0)
0040ec17      {
0040ec1d          TextFileOutputHandler::OpenLogFile(this, &this->m_strFilename);
0040ec22          this->m_fFirstWrite = 0;
0040ec17      }
0040ec17      
0040ec26      struct _iobuf* m_fileLog = this->m_fileLog;
0040ec26      
0040ec2b      if (m_fileLog == 0)
0040ec4f          return 0;
0040ec4f      
0040ec33      fputs(arg4, m_fileLog);
0040ec39      this->vtable->Flush(this);
0040ec49      return 1;
0040ec10  }

0040ec52                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0040ec60  uint8_t __thiscall TextFileOutputHandler::ChangeLogFile(class TextFileOutputHandler* this, class PStringBase<char> const* arg2)

0040ec60  {
0040ec67      if (this->m_fFirstWrite == 0)
0040ecb7          return TextFileOutputHandler::OpenLogFile(this, arg2);
0040ecb7      
0040ec69      class PSRefBufferCharData<char>* m_charbuffer = this->m_strFilename.m_charbuffer;
0040ec69      
0040ec73      if (m_charbuffer != arg2->m_charbuffer)
0040ec73      {
0040ec89          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040ec91              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040ec91          
0040ec93          class PStringBase<char> m_charbuffer_1 = arg2->m_charbuffer;
0040ec95          this->m_strFilename.m_charbuffer = m_charbuffer_1;
0040ec9c          InterlockedIncrement((m_charbuffer_1 - 0x10));
0040ec73      }
0040ec73      
0040eca4      m_charbuffer = 1;
0040eca7      return 1;
0040ec60  }

0040ecba                                                                                cc cc cc cc cc cc                            ......

0040ecc0  void __thiscall TimestamppedTextFileOutputHandler::TimestamppedTextFileOutputHandler(class TimestamppedTextFileOutputHandler* this, char const* arg2)

0040ecc0  {
0040ecc9      this->m_cRef = 1;
0040eccc      this->m_fFirstWrite = 1;
0040ecd9      this->vtable = 0x7945c0;
0040ecdf      this->m_fileLog = nullptr;
0040ece6      PStringBase<char>::PStringBase<char>(&this->m_strFilename, arg2);
0040ecee      this->m_pidLogInstance = nullptr;
0040ecf5      DeleteFileA(this->m_strFilename.m_charbuffer);
0040ecfc      this->vtable = 0x7945ec;
0040ecc0  }

0040ed08                          cc cc cc cc cc cc cc cc                                                          ........

0040ed10  void __thiscall LogController::LogMessage(class LogController* this, enum Logger::LoggingSeverity arg2, uint32_t arg3, char const* arg4)

0040ed10  {
0040ed20      if (this->m_rgGloballyDisabledSeverities[arg2] == 0)
0040ed20      {
0040ed22          uint32_t m_numBuckets = this->m_hashHandlers.m_numBuckets;
0040ed22          
0040ed31          if (m_numBuckets == 0)
0040ed6b              LogController::CategoryHandler::SendToOutputHandlers(&this->m_DefaultHandler, arg2, arg3, arg4);
0040ed31          else
0040ed31          {
0040ed3c              class LogController::CategoryHandler* m_hashNext = this->m_hashHandlers.m_buckets[(COMBINE(0, arg3) % m_numBuckets)];
0040ed3c              
0040ed41              if (m_hashNext == 0)
0040ed6b                  LogController::CategoryHandler::SendToOutputHandlers(&this->m_DefaultHandler, arg2, arg3, arg4);
0040ed41              else
0040ed41              {
0040ed45                  while (m_hashNext->m_hashKey != arg3)
0040ed45                  {
0040ed47                      m_hashNext = m_hashNext->m_hashNext;
0040ed47                      
0040ed4c                      if (m_hashNext == 0)
0040ed4c                          break;
0040ed45                  }
0040ed45                  
0040ed50                  if (m_hashNext == 0)
0040ed6b                      LogController::CategoryHandler::SendToOutputHandlers(&this->m_DefaultHandler, arg2, arg3, arg4);
0040ed50                  else if ((m_hashNext->m_fEnabled != 0 && LogController::CategoryHandler::SendToOutputHandlers(m_hashNext, arg2, arg3, arg4) == res_NotHandled))
0040ed6b                      LogController::CategoryHandler::SendToOutputHandlers(&this->m_DefaultHandler, arg2, arg3, arg4);
0040ed41              }
0040ed31          }
0040ed20      }
0040ed10  }

0040ed77                                                                       cc cc cc cc cc cc cc cc cc                         .........

0040ed80  void Logger::Log(enum Logger::LoggingSeverity arg1, uint32_t arg2, char const* arg3)

0040ed80  {
0040ed87      if (g_fInitialized != 0)
0040ed9d          LogController::LogMessage(&g_LogController, arg1, arg2, arg3);
0040ed80  }

0040eda3           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0040edb0  void __thiscall PStringBase<char>::append_uint32(class PStringBase<char>* this, uint32_t arg2)

0040edb0  {
0040edb0      class PStringBase<char>* var_4 = this;
0040edb1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040edb8      var_4 = PStringBase<char>::s_NullBuffer_1;
0040edc2      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040edcc      uint32_t var_10_1 = arg2;
0040edd7      PStringBase<char>::sprintf(&var_4, &data_79459c);
0040eddc      class PStringBase<char>* esi = var_4;
0040ede0      int32_t m_charbuffer = esi->m_charbuffer;
0040ede0      
0040ede9      if (m_charbuffer != 1)
0040edf2          PStringBase<char>::append_n_chars(this, esi, (m_charbuffer - 1));
0040edf2      
0040ee0a      if ((InterlockedDecrement(&esi[-4]) == 0 && esi != 0x14))
0040ee12          *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
0040edb0  }

0040ee1a                                                                                cc cc cc cc cc cc                            ......

0040ee20  void __fastcall TextFileOutputHandler::TextFileOutputHandler(class TextFileOutputHandler* this, uint8_t arg2)

0040ee20  {
0040ee20      class TextFileOutputHandler* __return = this;
0040ee2c      this->m_cRef = 1;
0040ee33      this->vtable = 0x7945c0;
0040ee39      this->m_fileLog = nullptr;
0040ee40      this->m_fFirstWrite = 1;
0040ee44      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040ee49      this->m_strFilename.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0040ee51      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040ee58      PSUtils::get_process_name(&__return);
0040ee58      
0040ee65      if (arg2 != 0)
0040ee6c          PSUtils::strip_directory(&__return);
0040ee6c      
0040ee79      PSUtils::remove_extension(&__return);
0040ee80      void* eax_1;
0040ee80      int32_t ecx;
0040ee80      eax_1 = operator new(0xc);
0040ee8c      class InstanceDiviner* eax_2;
0040ee8c      
0040ee8c      if (eax_1 == 0)
0040eeae          eax_2 = nullptr;
0040ee8c      else
0040ee8c      {
0040ee92          int32_t var_20_1 = ecx;
0040ee93          class PSRefBufferCharData<char>* m_charbuffer_1 = PStringBase<char>::null_string.m_charbuffer;
0040eea3          InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
0040eea7          eax_2 = InstanceDiviner::InstanceDiviner(eax_1, m_charbuffer_1, 0, 0);
0040ee8c      }
0040ee8c      
0040eeb0      this->m_pidLogInstance = eax_2;
0040eeb3      int32_t var_18_4 = ecx;
0040eeb4      class PSRefBufferCharData<char>* m_charbuffer_2 = PStringBase<char>::null_string.m_charbuffer;
0040eec4      InterlockedIncrement(((char*)m_charbuffer_2 - 0x10));
0040eecb      uint32_t eax_3 = InstanceDiviner::AllocateIndex(this->m_pidLogInstance, 0, m_charbuffer_2);
0040eecb      
0040eed5      if (eax_3 != 1)
0040eed5      {
0040eee0          PStringBase<char>::PStringBase<char>(&arg2, &data_794500);
0040eee5          char* ebp_1 = arg2;
0040eee9          int32_t eax_4 = *(uint32_t*)(ebp_1 - 4);
0040eee9          
0040eeef          if (eax_4 != 1)
0040eefa              PStringBase<char>::append_n_chars(&__return, ebp_1, (eax_4 - 1));
0040eefa          
0040ef12          if ((InterlockedDecrement(&ebp_1[0xfffffff0]) == 0 && ebp_1 != 0x14))
0040ef1b              **(uint32_t**)(ebp_1 - 0x14)(1);
0040ef1b          
0040ef22          PStringBase<char>::append_uint32(&__return, eax_3);
0040eed5      }
0040eed5      
0040ef30      PStringBase<char>::PStringBase<char>(&arg2, ".log");
0040ef35      char* edi_2 = arg2;
0040ef39      int32_t eax_8 = *(uint32_t*)(edi_2 - 4);
0040ef39      
0040ef3f      if (eax_8 != 1)
0040ef4a          PStringBase<char>::append_n_chars(&__return, edi_2, (eax_8 - 1));
0040ef4a      
0040ef64      if ((InterlockedDecrement(&edi_2[0xfffffff0]) == 0 && edi_2 != 0x14))
0040ef6c          **(uint32_t**)(edi_2 - 0x14)(1);
0040ef6c      
0040ef6e      class PSRefBufferCharData<char>* m_charbuffer = this->m_strFilename.m_charbuffer;
0040ef6e      
0040ef75      if (m_charbuffer != __return)
0040ef75      {
0040ef86          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0040ef8e              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0040ef8e          
0040ef90          class TextFileOutputHandler* __return_1 = __return;
0040ef94          this->m_strFilename.m_charbuffer = __return_1;
0040ef9b          InterlockedIncrement(&__return_1[0]);
0040ef75      }
0040ef75      
0040efa1      DeleteFileA(this->m_strFilename.m_charbuffer);
0040efab      void* __offset(TextFileOutputHandler, -0x14) edi_6 = ((char*)__return - 0x14);
0040efab      
0040efba      if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
0040efc2          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_6) + -0x14)(1);
0040ee20  }

0040efce                                            cc cc                                                                ..

0040efd0  void* __thiscall TextFileOutputHandler::`scalar deleting destructor'(class TextFileOutputHandler* this, uint32_t arg2)

0040efd0  {
0040efd3      TextFileOutputHandler::~TextFileOutputHandler(this);
0040efd3      
0040efdd      if ((arg2 & 1) != 0)
0040efe0          operator delete(this);
0040efe0      
0040efeb      return this;
0040efd0  }

0040efee                                            cc cc                                                                ..

0040eff0  class Logger::ITextFileOutputHandler* __thiscall LogController::GetTextFileOutputHandler(class LogController* this, uint8_t arg2)

0040eff0  {
0040effa      if (this->m_plohTextFile == 0)
0040effa      {
0040efff          void* eax_1;
0040efff          uint8_t edx_1;
0040efff          eax_1 = operator new(0x18);
0040f004          class Logger::ITextFileOutputHandler* esi_1 = eax_1;
0040f004          
0040f00b          if (esi_1 == 0)
0040f021              esi_1 = nullptr;
0040f00b          else
0040f00b          {
0040f011              int32_t var_c_1 = arg2;
0040f014              TextFileOutputHandler::TextFileOutputHandler(esi_1, edx_1);
0040f019              esi_1->vtable = 0x7945ec;
0040f00b          }
0040f00b          
0040f023          this->m_plohTextFile = esi_1;
0040effa      }
0040effa      
0040f034      InterlockedIncrement(&this->m_plohTextFile->m_cRef);
0040f041      return this->m_plohTextFile;
0040eff0  }

0040f044              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0040f050  uint8_t __fastcall LogController::CategoryHandler::RemoveAllHandlers(class LogController::CategoryHandler* this)

0040f050  {
0040f060      while (true)
0040f060      {
0040f060          uint32_t m_num = this->m_rgOutputPlugins.m_num;
0040f060          
0040f065          if (m_num == 0)
0040f065              break;
0040f065          
0040f067          class Logger::ILoggingOutputHandler** m_data = this->m_rgOutputPlugins.m_data;
0040f06d          this->m_rgOutputPlugins.m_num = (m_num - 1);
0040f070          int32_t* edi_1 = m_data[(m_num - 1)];
0040f073          m_data[(m_num - 1)] = 0;
0040f073          
0040f084          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0040f090              **(uint32_t**)edi_1(1);
0040f060      }
0040f060      
0040f094      int32_t i = 0;
0040f094      
0040f099      if (this->m_rgContextIDs.m_num > 0)
0040f099      {
0040f0b0          do
0040f0b0          {
0040f0a0              this->m_rgContextIDs.m_data[i] = 0;
0040f0aa              i += 1;
0040f0b0          } while (i < this->m_rgContextIDs.m_num);
0040f099      }
0040f099      
0040f0b3      this->m_rgContextIDs.m_num = 0;
0040f0bb      i = 1;
0040f0be      return 1;
0040f050  }

0040f05d                                                                                         8d 49 00                               .I.
0040f09d                                                                                         8d 49 00                               .I.
0040f0bf                                                                                               cc                                 .

0040f0c0  void __stdcall Logger::LogVAList(enum Logger::LoggingSeverity arg1, uint32_t arg2, char const* arg3, char* arg4)

0040f0c0  {
0040f0c5      _chkstk();
0040f0c5      
0040f0d1      if (g_fInitialized != 0)
0040f0d1      {
0040f0eb          __return_addr = &arg1;
0040f0ef          Turbine::InplaceString<4096,char>::Init(&__return_addr, arg_1010, arg_1014);
0040f0ef          
0040f0fb          if (g_fInitialized != 0)
0040f116              LogController::LogMessage(&g_LogController, arg_1008, arg_100c, __return_addr);
0040f116          
0040f11b          void* const __return_addr_1 = __return_addr;
0040f11b          
0040f124          if (__return_addr_1 != &arg1)
0040f127              operator delete[](__return_addr_1);
0040f0d1      }
0040f0c0  }

0040f136                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0040f140  void __stdcall Logger::LogMacro::operator()(class Logger::LogMacro* this, char const* arg2)

0040f140  {
0040f155      Logger::LogVAList(this->m_ls, this->m_lc, arg2, &arg_c);
0040f140  }

0040f15e                                                                                            cc cc                                ..

0040f160  class Logger::ITextFileOutputHandler* Logger::GetTextFileOutputHandler()

0040f160  {
0040f167      if (g_fInitialized != 0)
0040f178          return LogController::GetTextFileOutputHandler(&g_LogController, 0);
0040f178      
0040f16b      return 0;
0040f160  }

0040f179                                                                             cc cc cc cc cc cc cc                           .......

0040f180  uint8_t __thiscall SmartArray<Logger::ILoggingOutputHandler *,1>::add_unique(class SmartArray<Logger::ILoggingOutputHandler *,1>* this, class Logger::ILoggingOutputHandler** arg2)

0040f180  {
0040f188      uint32_t m_num = this->m_num;
0040f18b      int32_t eax = 0;
0040f18b      
0040f190      if (m_num > 0)
0040f190      {
0040f194          class Logger::ILoggingOutputHandler** m_data = this->m_data;
0040f194          
0040f198          while (*(uint32_t*)m_data != *(uint32_t*)arg2)
0040f198          {
0040f19a              eax += 1;
0040f19d              m_data = &m_data[1];
0040f19d              
0040f1a3              if (eax >= this->m_num)
0040f1a3                  goto label_40f1af;
0040f198          }
0040f190      }
0040f190      
0040f1aa      if ((m_num <= 0 || eax == 0xffffffff))
0040f1aa      {
0040f1af      label_40f1af:
0040f1af          int32_t eax_2 = (this->m_sizeAndDeallocate & 0x7fffffff);
0040f1af          
0040f1b6          if (m_num >= eax_2)
0040f1c6              eax = SmartArray<PFileNode *,1>::grow(this, SmartArray<PFileNode *,1>::get_new_size(this, (eax_2 + 1)));
0040f1c6          
0040f1cd          if ((m_num < eax_2 || eax != 0))
0040f1cd          {
0040f1dc              this->m_data[this->m_num] = *(uint32_t*)arg2;
0040f1e1              this->m_num += 1;
0040f1e7              uint32_t eax_5;
0040f1e7              eax_5 = 1;
0040f1ea              return 1;
0040f1cd          }
0040f1aa      }
0040f1aa      
0040f1d1      eax = 0;
0040f1d4      return 0;
0040f180  }

0040f1ed                                         cc cc cc                                                               ...

0040f1f0  void __thiscall IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>::IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>(class IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>* this, uint32_t arg2)

0040f1f0  {
0040f1f0      class IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>* this_1 = this;
0040f204      this->m_buckets = nullptr;
0040f207      this->m_firstInterestingBucket = nullptr;
0040f20a      this->m_numBuckets = 0;
0040f20d      this->m_numElements = 0;
0040f211      this->vtable = 0x7945bc;
0040f217      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0040f222      this_1 = arg2;
0040f22e      uint32_t* eax = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &this_1, 0, nullptr);
0040f22e      
0040f238      if (eax == bucketSizesEnd_1)
0040f23a          eax -= 4;
0040f23a      
0040f23d      uint32_t eax_1 = *(uint32_t*)eax;
0040f242      this->m_numBuckets = eax_1;
0040f242      
0040f245      if (eax_1 > 0x17)
0040f25c          this->m_buckets = operator new[]((eax_1 * 4));
0040f245      else
0040f24a          this->m_buckets = &this->m_aInplaceBuckets;
0040f24a      
0040f262      class LogController::CategoryHandler** m_buckets = this->m_buckets;
0040f267      uint32_t ecx_4 = (this->m_numBuckets * 4);
0040f26c      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0040f27d      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
0040f1f0  }

0040f287                       cc cc cc cc cc cc cc cc cc                                                         .........

0040f290  void __thiscall IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::remove(class IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this, class IntrusiveHashIterator<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1> arg2)

0040f290  {
0040f291      class InArchiveVersionStack::VersionRowHolder* m_currElement = arg2.m_currElement;
0040f296      class InArchiveVersionStack::VersionRowHolder** m_currBucket = arg2.m_currBucket;
0040f29a      class InArchiveVersionStack::VersionRowHolder* m_hashNext = *(uint32_t*)m_currBucket;
0040f29a      
0040f29e      if (m_hashNext != m_currElement)
0040f29e      {
0040f2a7          class InArchiveVersionStack::VersionRowHolder* m_hashNext_1;
0040f2a7          
0040f2a7          do
0040f2a7          {
0040f2a0              m_hashNext_1 = m_hashNext;
0040f2a2              m_hashNext = m_hashNext->m_hashNext;
0040f2a7          } while (m_hashNext != m_currElement);
0040f2a7          
0040f2ab          if (m_hashNext_1 != 0)
0040f2ab          {
0040f2bf              m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0040f2c2              this->m_numElements -= 1;
0040f2c7              return;
0040f2ab          }
0040f29e      }
0040f29e      
0040f2b0      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
0040f2b2      this->m_numElements -= 1;
0040f290  }

0040f2ca                                cc cc cc cc cc cc                                                            ......

0040f2d0  uint8_t __thiscall LogController::CategoryHandler::AddHandler(class LogController::CategoryHandler* this, class Logger::ILoggingOutputHandler* arg2, uint32_t arg3)

0040f2d0  {
0040f2e2      if (SmartArray<Logger::ILoggingOutputHandler *,1>::add_unique(&this->m_rgOutputPlugins, &arg2) == 0)
0040f332          return 0;
0040f332      
0040f2ec      InterlockedIncrement(&arg2->m_cRef);
0040f2f8      int32_t eax_2 = (this->m_rgContextIDs.m_sizeAndDeallocate & 0x7fffffff);
0040f300      uint32_t* eax_5;
0040f300      
0040f300      if (this->m_rgContextIDs.m_num >= eax_2)
0040f310          eax_5 = SmartArray<unsigned long,1>::grow(&this->m_rgContextIDs, SmartArray<unsigned long,1>::get_new_size(&this->m_rgContextIDs, (eax_2 + 1)));
0040f310      
0040f317      if ((this->m_rgContextIDs.m_num < eax_2 || eax_5 != 0))
0040f317      {
0040f2f5          this->m_rgContextIDs.m_data[this->m_rgContextIDs.m_num] = arg3;
0040f2f5          this->m_rgContextIDs.m_num += 1;
0040f317      }
0040f317      
0040f329      eax_5 = 1;
0040f32c      return 1;
0040f2d0  }

0040f335                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0040f340  uint8_t __thiscall IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>::add(class IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>* this, class LogController::CategoryHandler* arg2)

0040f340  {
0040f346      uint32_t m_hashKey = arg2->m_hashKey;
0040f352      class LogController::CategoryHandler** edx_2 = &this->m_buckets[(COMBINE(0, m_hashKey) % this->m_numBuckets)];
0040f352      
0040f359      for (int32_t* i = *(uint32_t*)edx_2; i != 0; i = i[1])
0040f359      {
0040f362          if (*(uint32_t*)i == m_hashKey)
0040f362          {
0040f389              if (i == 0)
0040f389                  break;
0040f389              
0040f38c              i = 0;
0040f38f              return 0;
0040f362          }
0040f359      }
0040f359      
0040f36b      class LogController::CategoryHandler* eax_2 = *(uint32_t*)edx_2;
0040f36d      arg2->m_hashNext = eax_2;
0040f370      *(uint32_t*)edx_2 = arg2;
0040f370      
0040f375      if (edx_2 < this->m_firstInterestingBucket)
0040f377          this->m_firstInterestingBucket = edx_2;
0040f377      
0040f37f      this->m_numElements += 1;
0040f384      return eax_2;
0040f340  }

0040f35d                                                                                         8d 49 00                               .I.
0040f392                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0040f3a0  class InArchiveVersionStack::VersionRowHolder* __thiscall IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::remove(class IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this, class IDClass<_tagVersionHandle,32,0>* arg2)

0040f3a0  {
0040f3a7      uint32_t id = arg2->id;
0040f3ad      uint32_t temp1 = (COMBINE(0, id) % this->m_numBuckets);
0040f3b0      class InArchiveVersionStack::VersionRowHolder** m_buckets = this->m_buckets;
0040f3b0      
0040f3bd      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
0040f3bd      {
0040f3c2          if (*(uint32_t*)i == id)
0040f3c2          {
0040f3d5              if (i == 0)
0040f3d5                  break;
0040f3d5              
0040f3de              void* var_14 = &m_buckets[temp1];
0040f3e1              int32_t* i_1 = i;
0040f3e4              IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::remove(this, this);
0040f3ee              return i;
0040f3c2          }
0040f3bd      }
0040f3bd      
0040f3d0      return 0;
0040f3a0  }

0040f3f1                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

0040f400  void __fastcall IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>::delete_contents(class IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>* this)

0040f400  {
0040f407      if (this->m_numElements != 0)
0040f407      {
0040f40d          void* edi;
0040f40d          void* var_8_1 = edi;
0040f40d          
0040f4b3          do
0040f4b3          {
0040f416              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0040f41c              class LogController::CategoryHandler** m_firstInterestingBucket_2;
0040f41c              void* edi_1;
0040f41c              
0040f41c              if (this->m_firstInterestingBucket == ecx_1)
0040f41c              {
0040f432              label_40f432:
0040f432                  m_firstInterestingBucket_2 = nullptr;
0040f434                  edi_1 = nullptr;
0040f41c              }
0040f41c              else
0040f41c              {
0040f420                  while (true)
0040f420                  {
0040f420                      int32_t* m_firstInterestingBucket = this->m_firstInterestingBucket;
0040f420                      
0040f426                      if (*(uint32_t*)m_firstInterestingBucket != 0)
0040f426                      {
0040f438                          class LogController::CategoryHandler** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0040f43b                          edi_1 = *(uint32_t*)m_firstInterestingBucket_1;
0040f43d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0040f43d                          break;
0040f426                      }
0040f426                      
0040f42d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0040f42d                      
0040f430                      if (&m_firstInterestingBucket[1] == ecx_1)
0040f430                          goto label_40f432;
0040f420                  }
0040f41c              }
0040f41c              
0040f43f              class LogController::CategoryHandler* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0040f43f              
0040f443              if (m_hashNext == edi_1)
0040f455                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0040f443              else
0040f443              {
0040f44c                  class LogController::CategoryHandler* m_hashNext_1;
0040f44c                  
0040f44c                  do
0040f44c                  {
0040f445                      m_hashNext_1 = m_hashNext;
0040f447                      m_hashNext = m_hashNext->m_hashNext;
0040f44c                  } while (m_hashNext != edi_1);
0040f44c                  
0040f450                  if (m_hashNext_1 != 0)
0040f45c                      m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0040f450                  else
0040f455                      *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0040f443              }
0040f443              
0040f45f              this->m_numElements -= 1;
0040f45f              
0040f465              if (edi_1 != 0)
0040f465              {
0040f469                  LogController::CategoryHandler::RemoveAllHandlers(edi_1);
0040f469                  
0040f47b                  if ((*(uint32_t*)((char*)edi_1 + 0x1c) & 0x80000000) == 0x80000000)
0040f481                      operator delete[](*(uint32_t*)((char*)edi_1 + 0x18));
0040f481                  
0040f498                  if ((*(uint32_t*)((char*)edi_1 + 0x10) & 0x80000000) == 0x80000000)
0040f49e                      operator delete[](*(uint32_t*)((char*)edi_1 + 0xc));
0040f49e                  
0040f4a7                  operator delete(edi_1);
0040f465              }
0040f4b3          } while (this->m_numElements != 0);
0040f407      }
0040f400  }

0040f4bc                                                                                      cc cc cc cc                              ....

0040f4c0  void __fastcall LogController::LogController(class LogController* this)

0040f4c0  {
0040f4c5      IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>::IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>(this, 0xa);
0040f4cc      this->m_LastAssignedContext = 0xa;
0040f4d3      this->m_DefaultHandler.m_hashKey = 0;
0040f4d3      this->m_DefaultHandler.m_hashNext = nullptr;
0040f4d3      this->m_DefaultHandler.m_fEnabled = 1;
0040f4df      __builtin_memset(&this->m_DefaultHandler.m_rgOutputPlugins, 0, 0x1e);
0040f4f1      this->m_plohTextFile = nullptr;
0040f4f7      this->m_plohConsole = nullptr;
0040f4fd      this->m_plohODS = nullptr;
0040f512      IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>::add(this, &this->m_DefaultHandler);
0040f519      g_fSegmentInitialized = 1;
0040f4c0  }

0040f522        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0040f530  void __fastcall LogController::~LogController(class LogController* this)

0040f530  {
0040f53d      g_fSegmentInitialized = 0;
0040f543      g_fInitialized = 0;
0040f549      IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::remove(this, &cat_DefaultHandler);
0040f550      IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>::delete_contents(this);
0040f555      class Logger::ITextFileOutputHandler* m_plohTextFile = this->m_plohTextFile;
0040f555      
0040f563      if (m_plohTextFile != 0)
0040f563      {
0040f571          if ((InterlockedDecrement(&m_plohTextFile->m_cRef) == 0 && m_plohTextFile != 0))
0040f573              m_plohTextFile->vtable->__vecDelDtor(m_plohTextFile, 1);
0040f573          
0040f57b          this->m_plohTextFile = nullptr;
0040f563      }
0040f563      
0040f581      class Logger::ILoggingOutputHandler* m_plohConsole = this->m_plohConsole;
0040f581      
0040f589      if (m_plohConsole != 0)
0040f589      {
0040f597          if ((InterlockedDecrement(&m_plohConsole->m_cRef) == 0 && m_plohConsole != 0))
0040f599              m_plohConsole->vtable->__vecDelDtor(m_plohConsole, 1);
0040f599          
0040f5a1          this->m_plohConsole = nullptr;
0040f589      }
0040f589      
0040f5a7      class Logger::ILoggingOutputHandler* m_plohODS = this->m_plohODS;
0040f5a7      
0040f5af      if (m_plohODS != 0)
0040f5af      {
0040f5bd          if ((InterlockedDecrement(&m_plohODS->m_cRef) == 0 && m_plohODS != 0))
0040f5bf              m_plohODS->vtable->__vecDelDtor(m_plohODS, 1);
0040f5bf          
0040f5c7          this->m_plohODS = nullptr;
0040f5af      }
0040f5af      
0040f5d2      LogController::CategoryHandler::RemoveAllHandlers(&this->m_DefaultHandler);
0040f5d2      
0040f5e4      if ((this->m_DefaultHandler.m_rgContextIDs.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0040f5ea          operator delete[](this->m_DefaultHandler.m_rgContextIDs.m_data);
0040f5ea      
0040f601      if ((this->m_DefaultHandler.m_rgOutputPlugins.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0040f607          operator delete[](this->m_DefaultHandler.m_rgOutputPlugins.m_data);
0040f607      
0040f60f      class LogController::CategoryHandler** m_buckets = this->m_hashHandlers.m_buckets;
0040f617      this->m_hashHandlers.vtable = 0x7945bc;
0040f617      
0040f61d      if (m_buckets != &this->m_hashHandlers.m_aInplaceBuckets)
0040f620          operator delete[](m_buckets);
0040f620      
0040f629      this->m_hashHandlers.m_buckets = nullptr;
0040f62c      this->m_hashHandlers.m_firstInterestingBucket = nullptr;
0040f62f      this->m_hashHandlers.m_numBuckets = 0;
0040f632      this->m_hashHandlers.m_numElements = 0;
0040f530  }

0040f639                                                                             cc cc cc cc cc cc cc                           .......

0040f640  uint32_t __thiscall LogController::AddCategoryHandler(class LogController* this, uint32_t arg2, class Logger::ILoggingOutputHandler* arg3)

0040f640  {
0040f656      int32_t* edx_2 = this->m_hashHandlers.m_buckets[(COMBINE(0, arg2) % this->m_hashHandlers.m_numBuckets)];
0040f656      
0040f65b      if (edx_2 != 0)
0040f65b      {
0040f662          while (*(uint32_t*)edx_2 != arg2)
0040f662          {
0040f664              edx_2 = edx_2[1];
0040f664              
0040f669              if (edx_2 == 0)
0040f669                  break;
0040f662          }
0040f65b      }
0040f65b      
0040f66d      uint32_t* edi = edx_2;
0040f66d      
0040f66f      if (edx_2 == 0)
0040f66f      {
0040f673          uint32_t* eax_2 = operator new(0x24);
0040f673          
0040f67d          if (eax_2 == 0)
0040f69e              edi = nullptr;
0040f67d          else
0040f67d          {
0040f67f              *(uint32_t*)eax_2 = arg2;
0040f681              eax_2[1] = 0;
0040f684              eax_2[2] = 1;
0040f688              __builtin_memset(&eax_2[3], 0, 0x18);
0040f69a              edi = eax_2;
0040f67d          }
0040f67d          
0040f6a3          IntrusiveHashTable<unsigned long,LogController::CategoryHandler *,0>::add(this, edi);
0040f66f      }
0040f66f      
0040f6a8      this->m_LastAssignedContext += 1;
0040f6b7      LogController::CategoryHandler::AddHandler(edi, arg3, this->m_LastAssignedContext);
0040f6c3      return this->m_LastAssignedContext;
0040f640  }

0040f6c6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0040f6d0  void __thiscall LogController::Initialize(class LogController* this, uint8_t arg2)

0040f6d0  {
0040f6db      class Logger::ITextFileOutputHandler* eax = LogController::GetTextFileOutputHandler(this, arg2);
0040f6ea      LogController::CategoryHandler::AddHandler(&this->m_DefaultHandler, eax, 0);
0040f6ea      
0040f701      if ((InterlockedDecrement(&eax->m_cRef) == 0 && eax != 0))
0040f703          eax->vtable->__vecDelDtor(eax, 1);
0040f703      
0040f712      if (this->m_plohODS == 0)
0040f712      {
0040f716          class Logger::ILoggingOutputHandler* eax_2 = operator new(8);
0040f716          
0040f720          if (eax_2 == 0)
0040f731              eax_2 = nullptr;
0040f720          else
0040f720          {
0040f722              eax_2->m_cRef = 1;
0040f729              eax_2->vtable = 0x7945b0;
0040f720          }
0040f720          
0040f733          this->m_plohODS = eax_2;
0040f712      }
0040f712      
0040f743      InterlockedIncrement(&this->m_plohODS->m_cRef);
0040f749      class Logger::ILoggingOutputHandler* m_plohODS = this->m_plohODS;
0040f754      LogController::CategoryHandler::AddHandler(&this->m_DefaultHandler, m_plohODS, 1);
0040f754      
0040f765      if ((InterlockedDecrement(&m_plohODS->m_cRef) == 0 && m_plohODS != 0))
0040f767          m_plohODS->vtable->__vecDelDtor(m_plohODS, 1);
0040f6d0  }

0040f776                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0040f780  void Logger::Initialize(uint8_t arg1)

0040f780  {
0040f787      if (g_fInitialized == 0)
0040f787      {
0040f793          LogController::Initialize(&g_LogController, arg1);
0040f798          g_fInitialized = 1;
0040f787      }
0040f780  }


0040f7a0  uint32_t Logger::AddCategoryHandler(uint32_t arg1, class Logger::ILoggingOutputHandler* arg2)

0040f7a0  {
0040f7a7      if (g_fInitialized != 0)
0040f7c0          return LogController::AddCategoryHandler(&g_LogController, arg1, arg2);
0040f7c0      
0040f7ab      return 0;
0040f7a0  }

0040f7c1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0040f7d0  int32_t Timer::get_real_time()

0040f7d0  {
0040f7db      return time(0);
0040f7d0  }

0040f7dc                                                                                      cc cc cc cc                              ....

0040f7e0  void Timer::compute_time()

0040f7e0  {
0040f7e7      if (Timer::initialized_ == 0)
0040f7ef          return;
0040f7ef      
0040f7fd      int32_t eax_1;
0040f7fd      long double st0;
0040f7fd      eax_1 = TimeSource_QueryPerformanceCounter::ComputeElapsedTime(&Timer::s_pcTimerInstance->m_cTimeSource, 0);
0040f802      *(uint32_t*)0x58;
0040f7e0  }

0040f807                       cc cc cc cc cc cc cc cc cc                                                         .........

0040f810  void Timer::compute_local_time()

0040f810  {
0040f817      if (Timer::initialized_ == 0)
0040f81f          return;
0040f81f      
0040f82b      int32_t eax;
0040f82b      int80_t st0;
0040f82b      eax = TimeSource_QueryPerformanceCounter::ComputeElapsedTime(&Timer::s_pcTimerInstance->m_cTimeSource, 0);
0040f810  }

0040f831                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

0040f840  void Timer::set_time(double const* arg1)

0040f840  {
0040f84a      if (Timer::initialized_ != 0)
0040f84a      {
0040f854          long double x87_r7_1 = ((long double)*(uint64_t*)arg1);
0040f856          class PreciseTimerInstance* Timer::s_pcTimerInstance_1 = Timer::s_pcTimerInstance;
0040f861          long double temp0_1 = ((long double)Timer::s_pcTimerInstance_1->m_tExternalTime);
0040f861          (x87_r7_1 - temp0_1);
0040f86a          double const* eax_1;
0040f86a          eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0040f86a          
0040f86f          if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0040f86f          {
0040f878              double var_10_1 = ((double)((long double)Timer::s_pcTimerInstance_1->m_tElapsedTime));
0040f881              long double st0_1 = TimeSource_QueryPerformanceCounter::ComputeElapsedTime(&Timer::s_pcTimerInstance_1->m_cTimeSource, 1);
0040f886              long double temp1_1 = ((long double)var_10_1);
0040f886              (st0_1 - temp1_1);
0040f875              Timer::s_pcTimerInstance_1->m_tElapsedTime = ((double)st0_1);
0040f88a              bool c1_1 = /* bool c1_1 = unimplemented  {fst qword [edi], st0} */;
0040f88a              
0040f891              if ((*(uint8_t*)((char*)((((st0_1 < temp1_1) ? 1 : 0) << 8) | ((((c1_1) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0040f875                  Timer::s_pcTimerInstance_1->m_tElapsedTime = ((double)((long double)var_10_1));
0040f891              else
0040f896                  *nullptr = ((double)(st0_1 + ((long double)Timer::s_pcTimerInstance_1->m_rExternalOffset)));
0040f896              
0040f8a2              long double x87_r0_4 = ((long double)((double)x87_r7_1));
0040f8a8              long double x87_r7_4 = (((long double)*nullptr) + ((long double)1.0000000000000001e-09));
0040f8b0              (x87_r0_4 - x87_r7_4);
0040f8b0              
0040f8b7              if ((*(uint8_t*)((char*)((((x87_r0_4 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_4, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r0_4 == x87_r7_4) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0040f8b7              {
0040f8da                  Timer::s_pcTimerInstance_1->m_rExternalOffset = ((double)(x87_r0_4 - ((long double)Timer::s_pcTimerInstance_1->m_tElapsedTime)));
0040f8dd                  *nullptr = ((double)x87_r0_4);
0040f8b7              }
0040f8b7              else
0040f8b7              {
0040f8c1                  ((((long double)1.0000000000000001e-09) + x87_r0_4) - ((long double)*nullptr));
0040f8c5                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0040f8c5                  
0040f8c8                  if (!(p_1))
0040f8c8                  {
0040f875                      Timer::s_pcTimerInstance_1->m_tElapsedTime = ((double)(((long double)Timer::s_pcTimerInstance_1->m_tElapsedTime) - (((long double)*nullptr) - x87_r0_4)));
0040f8d2                      *nullptr = ((double)x87_r0_4);
0040f8c8                  }
0040f8b7              }
0040f86f          }
0040f86f          
0040f8ea          /* unimplemented  {fld st0, qword [ecx+0x60]} */;
0040f8ee          Timer::local_time = ((double)/* Timer::local_time = fconvert.d(unimplemented  {fstp qword [&Timer::local_time], st0}) */);
0040f8ee          /* unimplemented  {fstp qword [&Timer::local_time], st0} */;
0040f8f5          /* unimplemented  {fld st0, qword [ecx+0x68]} */;
0040f8f8          Timer::cur_time = ((double)/* Timer::cur_time = fconvert.d(unimplemented  {fstp qword [&Timer::cur_time], st0}) */);
0040f8f8          /* unimplemented  {fstp qword [&Timer::cur_time], st0} */;
0040f84a      }
0040f840  }

0040f902        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0040f910  void Timer::update_time()

0040f910  {
0040f91a      if (Timer::initialized_ != 0)
0040f91a      {
0040f91c          class PreciseTimerInstance* Timer::s_pcTimerInstance_1 = Timer::s_pcTimerInstance;
0040f926          double var_8_1 = ((double)((long double)Timer::s_pcTimerInstance_1->m_tElapsedTime));
0040f934          long double st0_1 = TimeSource_QueryPerformanceCounter::ComputeElapsedTime(&Timer::s_pcTimerInstance_1->m_cTimeSource, 1);
0040f939          long double temp0_1 = ((long double)var_8_1);
0040f939          (st0_1 - temp0_1);
0040f93d          *nullptr = ((double)st0_1);
0040f93d          bool c1_1 = /* bool c1_1 = unimplemented  {fst qword [esi], st0} */;
0040f93d          
0040f944          if ((*(uint8_t*)((char*)((((st0_1 < temp0_1) ? 1 : 0) << 8) | ((((c1_1) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp0_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0040f954              *nullptr = ((double)((long double)var_8_1));
0040f944          else
0040f949              Timer::s_pcTimerInstance_1->m_tExternalTime = ((double)(st0_1 + ((long double)Timer::s_pcTimerInstance_1->m_rExternalOffset)));
0040f949          
0040f956          class PreciseTimerInstance* Timer::s_pcTimerInstance_2 = Timer::s_pcTimerInstance;
0040f95f          Timer::local_time = ((double)((long double)Timer::s_pcTimerInstance_2->m_tElapsedTime));
0040f969          Timer::cur_time = ((double)((long double)Timer::s_pcTimerInstance_2->m_tExternalTime));
0040f91a      }
0040f910  }

0040f973                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0040f980  void* __thiscall PreciseTimerInstance::`scalar deleting destructor'(class PreciseTimerInstance* this, uint32_t arg2)

0040f980  {
0040f988      this->vtable = 0x7942f4;
0040f988      
0040f98e      if ((arg2 & 1) != 0)
0040f991          operator delete(this);
0040f991      
0040f99c      return this;
0040f980  }

0040f99f                                                                                               cc                                 .

0040f9a0  void __fastcall PreciseTimerInstance::PreciseTimerInstance(class PreciseTimerInstance* this)

0040f9a0  {
0040f9a6      this->m_cRef = 1;
0040f9ad      this->vtable = 0x7942f4;
0040f9b3      TimeSource_QueryPerformanceCounter::TimeSource_QueryPerformanceCounter(&this->m_cTimeSource);
0040f9be      this->m_rExternalOffset = ((double)((long double)0.0));
0040f9c1      this->vtable = 0x7942f4;
0040f9cf      this->m_tElapsedTime = ((double)((long double)0.0));
0040f9d8      this->m_tExternalTime = ((double)((long double)0.0));
0040f9a0  }

0040f9dd                                                                                         cc cc cc                               ...

0040f9e0  class PreciseTimerInstance* Timer::GetTimerInstance()

0040f9e0  {
0040f9e0      class PreciseTimerInstance* Timer::s_pcTimerInstance_1 = Timer::s_pcTimerInstance;
0040f9e0      
0040f9e7      if (Timer::s_pcTimerInstance_1 == 0)
0040f9e7      {
0040f9eb          Timer::s_pcTimerInstance_1 = operator new(0x78);
0040f9eb          
0040f9f5          if (Timer::s_pcTimerInstance_1 != 0)
0040f9f5          {
0040f9f9              class PreciseTimerInstance* eax = PreciseTimerInstance::PreciseTimerInstance(Timer::s_pcTimerInstance_1);
0040f9fe              Timer::s_pcTimerInstance = eax;
0040fa03              return eax;
0040f9f5          }
0040f9f5          
0040fa06          Timer::s_pcTimerInstance = nullptr;
0040f9e7      }
0040f9e7      
0040fa0b      return Timer::s_pcTimerInstance_1;
0040f9e0  }

0040fa0c                                      cc cc cc cc                                                              ....

0040fa10  void Timer::Init()

0040fa10  {
0040fa17      if (Timer::initialized_ == 0)
0040fa17      {
0040fa1f          class PreciseTimerInstance* Timer::s_pcTimerInstance_1 = Timer::s_pcTimerInstance;
0040fa26          Timer::cur_time = ((double)((long double)0.0));
0040fa32          Timer::local_time = ((double)((long double)0.0));
0040fa32          
0040fa38          if (Timer::s_pcTimerInstance_1 == 0)
0040fa38          {
0040fa3c              void* eax_1 = operator new(0x78);
0040fa3c              
0040fa46              if (eax_1 == 0)
0040fa51                  Timer::s_pcTimerInstance_1 = nullptr;
0040fa46              else
0040fa4a                  Timer::s_pcTimerInstance_1 = PreciseTimerInstance::PreciseTimerInstance(eax_1);
0040fa4a              
0040fa53              Timer::s_pcTimerInstance = Timer::s_pcTimerInstance_1;
0040fa38          }
0040fa38          
0040fa5e          TimeSource_QueryPerformanceCounter::Init(&Timer::s_pcTimerInstance_1->m_cTimeSource);
0040fa65          Timer::s_pcTimerInstance_1->m_bInitialized = 1;
0040fa68          Timer::initialized_ = 1;
0040fa17      }
0040fa10  }

0040fa6f                                               cc                                                                 .

0040fa70  uint8_t __thiscall Turbine_GUID::Convert(struct Turbine_GUID* this, char const* arg2)

0040fa70  {
0040fa70      struct Turbine_GUID* this_1 = this;
0040fa70      
0040faa6      if (sscanf(arg2, "%08lX-%04hX-%04hX-%04hX-%04hX%08…", this, &this->m_data2, &this->m_data3, &this->m_data4, &this->m_data4[2], &this->m_data4[4]) != 6)
0040faa6      {
0040fa83          this->m_data4[0] = 0;
0040fa83          this->m_data4[1] = 0;
0040fa83          this->m_data4[2] = 0;
0040fa83          this->m_data4[3] = 0;
0040fab3          this->m_data1 = 0;
0040fa8b          this->m_data2 = 0;
0040fa8b          this->m_data3 = 0;
0040fa7b          this->m_data4[4] = 0;
0040fa7b          this->m_data4[5] = 0;
0040fa7b          this->m_data4[6] = 0;
0040fa7b          this->m_data4[7] = 0;
0040fac7          uint16_t* eax_2;
0040fac7          eax_2 = 0;
0040facb          return 0;
0040faa6      }
0040faa6      
0040face      int32_t eax_1;
0040face      eax_1 = this->m_data4[0];
0040face      *(uint8_t*)((char*)eax_1)[1] = this->m_data4[1];
0040fad5      uint16_t ecx_1;
0040fad5      *(uint8_t*)((char*)ecx_1)[1] = eax_1;
0040fa83      this->m_data4[0] = ecx_1;
0040fa83      this->m_data4[1] = *(uint8_t*)((char*)ecx_1)[1];
0040fada      eax_1 = this->m_data4[2];
0040fae2      uint16_t edx_1;
0040fae2      *(uint8_t*)((char*)edx_1)[1] = eax_1;
0040fa7f      this->m_data4[2] = edx_1;
0040faea      int32_t eax_3;
0040faea      eax_3 = this->m_data4[4];
0040faea      *(uint8_t*)((char*)eax_3)[1] = this->m_data4[5];
0040faea      *(uint8_t*)((char*)eax_3)[2] = this->m_data4[6];
0040faea      *(uint8_t*)((char*)eax_3)[3] = this->m_data4[7];
0040fb0e      int32_t ecx_7 = ((((eax_3 & 0xff0000) | (eax_3 >> 0x10)) >> 8) | (((eax_3 & 0xff00) | (eax_3 << 0x10)) << 8));
0040fa7b      this->m_data4[4] = ecx_7;
0040fa7b      this->m_data4[5] = *(uint8_t*)((char*)ecx_7)[1];
0040fa7b      this->m_data4[6] = *(uint8_t*)((char*)ecx_7)[2];
0040fa7b      this->m_data4[7] = *(uint8_t*)((char*)ecx_7)[3];
0040fb13      int32_t eax_4;
0040fb13      eax_4 = 1;
0040fb17      return 1;
0040fa70  }

0040fb1a                                                                                cc cc cc cc cc cc                            ......

0040fb20  class PStringBase<char>* __thiscall Turbine_GUID::ToString(struct Turbine_GUID const* this, class PStringBase<char>* __return)

0040fb20  {
0040fb20      struct Turbine_GUID* var_4 = this;
0040fb21      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040fb2f      var_4 = PStringBase<char>::s_NullBuffer_1;
0040fb39      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0040fb47      uint32_t var_14_1 = ((uint32_t)this->m_data4[7]);
0040fb4c      uint32_t var_18 = ((uint32_t)this->m_data4[6]);
0040fb51      uint32_t var_1c = ((uint32_t)this->m_data4[5]);
0040fb56      uint32_t var_20 = ((uint32_t)this->m_data4[4]);
0040fb5b      uint32_t var_24 = ((uint32_t)this->m_data4[3]);
0040fb60      uint32_t var_28 = ((uint32_t)this->m_data4[2]);
0040fb65      uint32_t var_2c = ((uint32_t)this->m_data4[1]);
0040fb6a      uint32_t var_30 = ((uint32_t)this->m_data4[0]);
0040fb6d      uint32_t m_data3 = ((uint32_t)this->m_data3);
0040fb6e      uint32_t m_data2 = ((uint32_t)this->m_data2);
0040fb6f      uint32_t m_data1 = this->m_data1;
0040fb7a      PStringBase<char>::sprintf(&var_4, "%08X-%04hX-%04hX-%02X%02X-%02X%0…");
0040fb7f      struct Turbine_GUID* esi_1 = var_4;
0040fb8e      __return->m_charbuffer = esi_1;
0040fb90      InterlockedIncrement(&esi_1[-1]);
0040fb90      
0040fba5      if ((InterlockedDecrement(&esi_1[-1]) == 0 && esi_1 != 0x14))
0040fbad          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0040fbad      
0040fbb5      return __return;
0040fb20  }

0040fbb8                                                                          cc cc cc cc cc cc cc cc                          ........

0040fbc0  void __fastcall ANSIColorStatus::Init(class ANSIColorStatus* this)

0040fbc0  {
0040fbc9      this->m_hConsole = nullptr;
0040fbd0      this->m_wDefaultAttr = 8;
0040fbd6      this->m_bInitialized = 1;
0040fbdf      void* hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
0040fbef      void lpConsoleScreenBufferInfo;
0040fbef      
0040fbef      if (GetConsoleScreenBufferInfo(hConsoleOutput, &lpConsoleScreenBufferInfo) == 0)
0040fbef      {
0040fc07          fprintf((_imp___iob + 0x40), "GetConsoleScreenBufferInfo %d", GetLastError());
0040fc15          return;
0040fbef      }
0040fbef      
0040fc16      int16_t var_10;
0040fc16      BOOL eax_1;
0040fc16      eax_1 = var_10;
0040fc1b      this->m_hConsole = hConsoleOutput;
0040fc1f      this->m_wDefaultAttr = eax_1;
0040fc23      this->m_attr = eax_1;
0040fbc0  }

0040fc2c                                      cc cc cc cc                                                              ....

0040fc30  void __thiscall ANSIColorStatus::SetForeColor(class ANSIColorStatus* this, uint16_t arg2)

0040fc30  {
0040fc36      if (this->m_bInitialized == 0)
0040fc38          ANSIColorStatus::Init(this);
0040fc38      
0040fc3d      int16_t eax;
0040fc3d      eax = this->m_attr;
0040fc40      eax ^= arg2;
0040fc44      HANDLE m_hConsole = this->m_hConsole;
0040fc4a      this->m_attr ^= (eax & 0xf);
0040fc54      SetConsoleTextAttribute(m_hConsole, this->m_attr);
0040fc30  }

0040fc5e                                                                                            cc cc                                ..

0040fc60  void __thiscall ANSIColorStatus::SetBackColor(class ANSIColorStatus* this, uint16_t arg2)

0040fc60  {
0040fc66      if (this->m_bInitialized == 0)
0040fc68          ANSIColorStatus::Init(this);
0040fc68      
0040fc6d      int16_t eax;
0040fc6d      eax = this->m_attr;
0040fc70      eax ^= arg2;
0040fc74      HANDLE m_hConsole = this->m_hConsole;
0040fc7c      this->m_attr ^= (eax & 0xf0);
0040fc86      SetConsoleTextAttribute(m_hConsole, this->m_attr);
0040fc60  }


0040fc90  void __fastcall ANSIColorStatus::SetToDefaultColors(class ANSIColorStatus* this)

0040fc90  {
0040fc96      if (this->m_bInitialized == 0)
0040fc98          ANSIColorStatus::Init(this);
0040fc98      
0040fc9d      uint16_t m_wDefaultAttr = this->m_wDefaultAttr;
0040fca1      this->m_attr = m_wDefaultAttr;
0040fcaa      SetConsoleTextAttribute(this->m_hConsole, m_wDefaultAttr);
0040fc90  }

0040fcb2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0040fcc0  int32_t DoANSIEscape<char>(char const* arg1)

0040fcc0  {
0040fccc      if (*(uint8_t*)arg1 == 0x1b)
0040fccc      {
0040fcd5          char const* var_2c_1 = arg1;
0040fcd5          
0040fce0          if (arg1[1] == 0x5b)
0040fce0          {
0040fceb              void* ebp_2 = &arg1[2];
0040fcee              arg1 = nullptr;
0040fcf6              int32_t ebx;
0040fcf6              ebx = 1;
0040fcf8              void* var_28;
0040fcf8              int32_t* esi = &var_28;
0040fd30              int32_t eax_2;
0040fd30              uint32_t ecx_1;
0040fd30              uint16_t edx_1;
0040fd30              
0040fd30              do
0040fd30              {
0040fd0c                  int32_t var_34;
0040fd0c                  eax_2 = sscanf(ebp_2, "%d%n", esi, &var_34);
0040fd0c                  
0040fd13                  if (eax_2 == 0)
0040fd13                      break;
0040fd13                  
0040fd15                  ebp_2 += var_34;
0040fd15                  
0040fd1d                  if (*(uint8_t*)ebp_2 != 0x3b)
0040fd24                      ebx = 0;
0040fd1d                  else
0040fd1f                      ebp_2 += 1;
0040fd1f                  
0040fd26                  arg1 = &arg1[1];
0040fd2b                  esi = &esi[1];
0040fd30              } while (ebx != 0);
0040fd30              
0040fd32              eax_2 = *(uint8_t*)ebp_2;
0040fd32              
0040fd3a              if (eax_2 != 0x6d)
0040fee7                  return 0;
0040fee7              
0040fd47              if (arg1 == 1)
0040fd61                  switch (var_28)
0040fd61                  {
0040fd6d                      case nullptr:
0040fd6d                      {
0040fd6d                          ANSIColorStatus::SetToDefaultColors(&s_ConsoleColor);
0040fd7f                          return (((char*)ebp_2 + 1) - var_2c_1);
0040fd6d                          break;
0040fd6d                      }
0040fd87                      case 1:
0040fd87                      case 4:
0040fd87                      {
0040fd87                          if (s_ConsoleColor.m_bInitialized == 0)
0040fd8e                              ANSIColorStatus::Init(&s_ConsoleColor);
0040fd8e                          
0040fd9a                          edx_1 = (s_ConsoleColor.m_attr | 8);
0040fda3                          ANSIColorStatus::SetForeColor(&s_ConsoleColor, edx_1);
0040fdb5                          return (((char*)ebp_2 + 1) - var_2c_1);
0040fd87                          break;
0040fd87                      }
0040fdbd                      case 0x16:
0040fdbd                      case 0x18:
0040fdbd                      {
0040fdbd                          if (s_ConsoleColor.m_bInitialized == 0)
0040fdc4                              ANSIColorStatus::Init(&s_ConsoleColor);
0040fdc4                          
0040fdc9                          void* eax_3;
0040fdc9                          eax_3 = s_ConsoleColor.m_attr;
0040fdda                          ANSIColorStatus::SetForeColor(&s_ConsoleColor, (eax_3 & 0xfff7));
0040fdec                          return (((char*)ebp_2 + 1) - var_2c_1);
0040fdbd                          break;
0040fdbd                      }
0040fd61                  }
0040fd61              
0040fdf4              if (s_ConsoleColor.m_bInitialized == 0)
0040fdfb                  ecx_1 = ANSIColorStatus::Init(&s_ConsoleColor);
0040fdfb              
0040fe00              ecx_1 = s_ConsoleColor.m_attr;
0040fe07              int16_t var_30 = ecx_1;
0040fe0c              ecx_1 = 0;
0040fe0e              edx_1 = 0;
0040fe0e              
0040fe14              if (arg1 > 0)
0040fe14              {
0040fe1a                  int32_t esi_2 = var_30;
0040fe1e                  int32_t edi_1 = 0;
0040fe1e                  
0040feca                  do
0040feca                  {
0040fe20                      void* eax_11 = &var_28[edi_1];
0040fe20                      
0040fe34                      switch (eax_11)
0040fe34                      {
0040fe3b                          case nullptr:
0040fe3b                          {
0040fe3b                              ecx_1 = 1;
0040fe3b                              break;
0040fe3b                          }
0040fe42                          case 1:
0040fe42                          {
0040fe42                              edx_1 = 1;
0040fe42                              break;
0040fe42                          }
0040fe49                          case 0x1e:
0040fe49                          case 0x1f:
0040fe49                          case 0x20:
0040fe49                          case 0x21:
0040fe49                          case 0x22:
0040fe49                          case 0x23:
0040fe49                          case 0x24:
0040fe49                          case 0x25:
0040fe49                          {
0040fe49                              esi_2 &= 0xfff8;
0040fe49                              
0040fe51                              if (((eax_11 - 0x1e) & 1) != 0)
0040fe53                                  esi_2 |= 4;
0040fe53                              
0040fe58                              if (((eax_11 - 0x1e) & 2) != 0)
0040fe5a                                  esi_2 |= 2;
0040fe5a                              
0040fe5f                              if (((eax_11 - 0x1e) & 4) != 0)
0040fe61                                  esi_2 |= 1;
0040fe61                              
0040fe66                              if (ecx_1 != 0)
0040fe68                                  esi_2 &= 0xfff7;
0040fe68                              
0040fe70                              if (edx_1 != 0)
0040fe72                                  esi_2 |= 8;
0040fe72                              
0040fe7b                              ecx_1 = ANSIColorStatus::SetForeColor(&s_ConsoleColor, esi_2);
0040febf                              ecx_1 = 0;
0040fec1                              edx_1 = 0;
0040fe49                              break;
0040fe49                          }
0040fe85                          case 0x28:
0040fe85                          case 0x29:
0040fe85                          case 0x2a:
0040fe85                          case 0x2b:
0040fe85                          case 0x2c:
0040fe85                          case 0x2d:
0040fe85                          case 0x2e:
0040fe85                          case 0x2f:
0040fe85                          {
0040fe85                              esi_2 &= 0xff8f;
0040fe85                              
0040fe8d                              if (((eax_11 - 0x28) & 1) != 0)
0040fe8f                                  esi_2 |= 0x40;
0040fe8f                              
0040fe94                              if (((eax_11 - 0x28) & 2) != 0)
0040fe96                                  esi_2 |= 0x20;
0040fe96                              
0040fe9b                              if (((eax_11 - 0x28) & 4) != 0)
0040fe9d                                  esi_2 |= 0x10;
0040fe9d                              
0040fea2                              if (ecx_1 != 0)
0040fea4                                  esi_2 &= 0xff7f;
0040fea4                              
0040feac                              if (edx_1 != 0)
0040feae                                  esi_2 |= 0x80;
0040feae                              
0040feba                              ecx_1 = ANSIColorStatus::SetBackColor(&s_ConsoleColor, esi_2);
0040febf                              ecx_1 = 0;
0040fec1                              edx_1 = 0;
0040fe85                              break;
0040fe85                          }
0040fe34                      }
0040fe34                      
0040fec3                      edi_1 += 1;
0040feca                  } while (edi_1 < arg1);
0040fe14              }
0040fe14              
0040fedd              return (((char*)ebp_2 + 1) - var_2c_1);
0040fce0          }
0040fccc      }
0040fccc      
0040fcd4      return 0;
0040fcc0  }

0040fee8  uint32_t jump_table_40fee8[0x4] = 
0040fee8  {
0040fee8      [0x0] =  0x0040fd68
0040feec      [0x1] =  0x0040fd80
0040fef0      [0x2] =  0x0040fdb6
0040fef4      [0x3] =  0x0040fded
0040fef8  }
0040fef8  uint8_t lookup_table_40fef8[0x19] = 
0040fef8  {
0040fef8      [0x00] =  0x00
0040fef9      [0x01] =  0x01
0040fefa      [0x02] =  0x03
0040fefb      [0x03] =  0x03
0040fefc      [0x04] =  0x01
0040fefd      [0x05] =  0x03
0040fefe      [0x06] =  0x03
0040feff      [0x07] =  0x03
0040ff00      [0x08] =  0x03
0040ff01      [0x09] =  0x03
0040ff02      [0x0a] =  0x03
0040ff03      [0x0b] =  0x03
0040ff04      [0x0c] =  0x03
0040ff05      [0x0d] =  0x03
0040ff06      [0x0e] =  0x03
0040ff07      [0x0f] =  0x03
0040ff08      [0x10] =  0x03
0040ff09      [0x11] =  0x03
0040ff0a      [0x12] =  0x03
0040ff0b      [0x13] =  0x03
0040ff0c      [0x14] =  0x03
0040ff0d      [0x15] =  0x03
0040ff0e      [0x16] =  0x02
0040ff0f      [0x17] =  0x03
0040ff10      [0x18] =  0x02
0040ff11  }

0040ff11                                                     8d 49 00                                                       .I.
0040ff14  uint32_t jump_table_40ff14[0x5] = 
0040ff14  {
0040ff14      [0x0] =  0x0040fe3b
0040ff18      [0x1] =  0x0040fe42
0040ff1c      [0x2] =  0x0040fe46
0040ff20      [0x3] =  0x0040fe82
0040ff24      [0x4] =  0x0040fec3
0040ff28  }
0040ff28  uint8_t lookup_table_40ff28[0x30] = 
0040ff28  {
0040ff28      [0x00] =  0x00
0040ff29      [0x01] =  0x01
0040ff2a      [0x02] =  0x04
0040ff2b      [0x03] =  0x04
0040ff2c      [0x04] =  0x04
0040ff2d      [0x05] =  0x04
0040ff2e      [0x06] =  0x04
0040ff2f      [0x07] =  0x04
0040ff30      [0x08] =  0x04
0040ff31      [0x09] =  0x04
0040ff32      [0x0a] =  0x04
0040ff33      [0x0b] =  0x04
0040ff34      [0x0c] =  0x04
0040ff35      [0x0d] =  0x04
0040ff36      [0x0e] =  0x04
0040ff37      [0x0f] =  0x04
0040ff38      [0x10] =  0x04
0040ff39      [0x11] =  0x04
0040ff3a      [0x12] =  0x04
0040ff3b      [0x13] =  0x04
0040ff3c      [0x14] =  0x04
0040ff3d      [0x15] =  0x04
0040ff3e      [0x16] =  0x04
0040ff3f      [0x17] =  0x04
0040ff40      [0x18] =  0x04
0040ff41      [0x19] =  0x04
0040ff42      [0x1a] =  0x04
0040ff43      [0x1b] =  0x04
0040ff44      [0x1c] =  0x04
0040ff45      [0x1d] =  0x04
0040ff46      [0x1e] =  0x02
0040ff47      [0x1f] =  0x02
0040ff48      [0x20] =  0x02
0040ff49      [0x21] =  0x02
0040ff4a      [0x22] =  0x02
0040ff4b      [0x23] =  0x02
0040ff4c      [0x24] =  0x02
0040ff4d      [0x25] =  0x02
0040ff4e      [0x26] =  0x04
0040ff4f      [0x27] =  0x04
0040ff50      [0x28] =  0x03
0040ff51      [0x29] =  0x03
0040ff52      [0x2a] =  0x03
0040ff53      [0x2b] =  0x03
0040ff54      [0x2c] =  0x03
0040ff55      [0x2d] =  0x03
0040ff56      [0x2e] =  0x03
0040ff57      [0x2f] =  0x03
0040ff58  }

0040ff58                                                                          cc cc cc cc cc cc cc cc                          ........

0040ff60  int32_t DoANSIString<char>(char const* arg1)

0040ff60  {
0040ff63      char const* esi = arg1;
0040ff67      void* result = nullptr;
0040ff6c      char const* ebx = esi;
0040ff6c      
0040ff6e      while (*(uint8_t*)esi != 0)
0040ff6e      {
0040ff74          int32_t eax_1;
0040ff74          
0040ff74          if (*(uint8_t*)esi == 0x1b)
0040ff74          {
0040ff78              void* edi_2 = (esi - ebx);
0040ff78              
0040ff7a              if (esi != ebx)
0040ff7a              {
0040ff83                  printf("%0.*s", edi_2, ebx);
0040ff8c                  result += edi_2;
0040ff7a              }
0040ff7a              
0040ff8f              eax_1 = DoANSIEscape<char>(esi);
0040ff74          }
0040ff74          
0040ff99          if ((*(uint8_t*)esi != 0x1b || eax_1 == 0))
0040ffa1              esi = &esi[1];
0040ff99          else
0040ff99          {
0040ff9b              esi = &esi[eax_1];
0040ff9d              ebx = esi;
0040ff99          }
0040ff6e      }
0040ff6e      
0040ffad      if (*(uint8_t*)ebx != 0)
0040ffad      {
0040ffaf          int32_t esi_1 = 0;
0040ffb1          char const* eax_2 = ebx;
0040ffb1          
0040ffbc          do
0040ffbc          {
0040ffb3              eax_2 = &eax_2[1];
0040ffb6              esi_1 += 1;
0040ffbc          } while (*(uint8_t*)eax_2 != 0);
0040ffbc          
0040ffc0          if (esi_1 != 0)
0040ffc0          {
0040ffc9              printf("%0.*s", esi_1, ebx);
0040ffd2              return ((char*)result + esi_1);
0040ffc0          }
0040ffad      }
0040ffad      
0040ffd9      return result;
0040ff60  }

0040ffda                                                                                cc cc cc cc cc cc                            ......

0040ffe0  int32_t __convention("regparm") color_printf(char const* arg1, ...)

0040ffe0  {
0040ffe0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
0040ffe0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
0040ffe1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0040ffe7      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0040fff0      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00410004      int32_t result_1 = PStringBase<char>::vsprintf(&PStringBase<char>::s_NullBuffer_2, arg1, &arg_8);
00410009      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0041000d      int32_t result = result_1;
0041000d      
00410011      if (result >= 0)
0041001c          result = DoANSIString<char>(PStringBase<char>::s_NullBuffer_4);
0041001c      
00410031      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
00410039          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
00410039      
00410040      return result;
0040ffe0  }

00410041     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00410050  void Serializer::SerializeObject<unsigned long>(uint32_t* arg1, class Archive* arg2)

00410050  {
00410059      Archive::CheckAlignment(arg2, 4);
00410062      uint8_t* eax = Archive::GetBytes(arg2, 4);
00410062      
00410069      if (eax != 0)
00410069      {
00410073          if ((arg2->m_flags & 1) != 0)
00410073          {
00410077              *(uint32_t*)eax = *(uint32_t*)arg1;
0041007a              return;
00410073          }
00410073          
0041007d          *(uint32_t*)arg1 = *(uint32_t*)eax;
00410069      }
00410050  }

00410081     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00410090  void __fastcall SmartArray<ArchiveVersionRow::VersionEntry,1>::Reset(class SmartArray<ArchiveVersionRow::VersionEntry,1>* this)

00410090  {
00410093      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004100a4      this->m_num = 0;
004100a4      
004100ab      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004100ab      {
004100b0          operator delete[](this->m_data);
004100b8          this->m_data = 0;
004100be          this->m_sizeAndDeallocate = 0;
004100c6          return;
004100ab      }
004100ab      
004100ca      if (this->m_data != 0)
004100ca      {
004100cc          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
004100d1          int32_t eax_1 = (eax - 1);
004100d1          
004100d4          if ((eax - 1) >= 0)
004100d4          {
004100e5              int32_t temp1_1;
004100e5              
004100e5              do
004100e5              {
004100d6                  struct ArchiveVersionRow::VersionEntry* m_data = this->m_data;
004100da                  temp1_1 = eax_1;
004100da                  eax_1 -= 1;
004100dd                  m_data[(eax_1 + 1)].tokVersion = 0;
004100e1                  *(uint32_t*)(&m_data[eax_1] + 0xc) = 0;
004100e5              } while ((temp1_1 - 1) >= 0);
004100d4          }
004100ca      }
00410090  }

004100e9                             cc cc cc cc cc cc cc                                                           .......

004100f0  uint32_t __thiscall ArchiveVersionRow::GetVersionByToken(class ArchiveVersionRow const* this, uint32_t arg2)

004100f0  {
004100f0      uint32_t m_num = this->m_aVersions.m_num;
004100f4      int32_t eax = 0;
004100f4      
004100f9      if (m_num > 0)
004100f9      {
004100fb          struct ArchiveVersionRow::VersionEntry* m_data = this->m_aVersions.m_data;
00410102          int32_t* m_data_1 = m_data;
00410102          
00410106          while (*(uint32_t*)m_data_1 != arg2)
00410106          {
00410108              eax += 1;
0041010b              m_data_1 = &m_data_1[2];
0041010b              
00410110              if (eax >= m_num)
00410116                  return 0;
00410106          }
00410106          
0041011c          if (eax != 0xffffffff)
0041012b              return m_data[eax].iVersion;
004100f9      }
004100f9      
00410122      return 0;
004100f0  }

0041012e                                            cc cc                                                                ..

00410130  uint8_t __thiscall SmartArray<ArchiveVersionRow::VersionEntry,1>::grow(class SmartArray<ArchiveVersionRow::VersionEntry,1>* this, uint32_t arg2)

00410130  {
0041013b      if (arg2 < this->m_num)
0041013b      {
004101ce          int32_t eax;
004101ce          eax = 0;
004101d1          return 0;
0041013b      }
0041013b      
0041014b      if (arg2 > (this->m_sizeAndDeallocate & 0x7fffffff))
0041014b      {
0041014f          if (arg2 != 0)
0041014f          {
0041016b              void* edi = operator new[]((arg2 << 3));
00410172              void* eax_3;
00410172              
00410172              if (edi == 0)
00410172              {
004101c7                  eax_3 = 0;
004101ca                  return 0;
00410172              }
00410172              
00410177              if (this->m_data != 0)
00410177              {
00410179                  uint32_t m_num = this->m_num;
0041017c                  int32_t eax_4 = (m_num - 1);
0041017c                  
0041017f                  if ((m_num - 1) >= 0)
0041017f                  {
00410196                      int32_t temp2_1;
00410196                      
00410196                      do
00410196                      {
00410181                          temp2_1 = eax_4;
00410181                          eax_4 -= 1;
00410184                          struct ArchiveVersionRow::VersionEntry* m_data = this->m_data;
0041018a                          *(uint32_t*)(((char*)edi + (eax_4 << 3)) + 8) = m_data[(eax_4 + 1)].tokVersion;
00410192                          *(uint32_t*)(((char*)edi + (eax_4 << 3)) + 0xc) = *(uint32_t*)(&m_data[eax_4] + 0xc);
00410196                      } while ((temp2_1 - 1) >= 0);
0041017f                  }
0041017f                  
004101a5                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004101aa                      operator delete[](this->m_data);
00410177              }
00410177              
004101b2              this->m_data = edi;
004101bb              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
004101bf              eax_3 = 1;
004101c2              return 1;
0041014f          }
0041014f          
00410151          SmartArray<ArchiveVersionRow::VersionEntry,1>::Reset(this);
0041014b      }
0041014b      
00410157      int32_t eax_2;
00410157      eax_2 = 1;
0041015a      return 1;
00410130  }

004101d4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

004101e0  uint8_t __thiscall SmartArray<ArchiveVersionRow::VersionEntry,1>::SetNElements(class SmartArray<ArchiveVersionRow::VersionEntry,1>* this, uint32_t const arg2, uint8_t arg3)

004101e0  {
004101f2      uint32_t const i;
004101f2      
004101f2      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
004101f2      {
0041021b          i = arg2;
0041021b          
0041021d          if (arg2 < this->m_num)
0041021d          {
00410231              do
00410231              {
00410220                  struct ArchiveVersionRow::VersionEntry* m_data = this->m_data;
00410224                  m_data[i].tokVersion = 0;
00410227                  m_data[i].iVersion = 0;
0041022b                  i += 1;
00410231              } while (i < this->m_num);
0041021d          }
004101f2      }
004101f2      else
004101f2      {
004101f9          uint32_t const eax_2;
004101f9          
004101f9          if (arg3 == 0)
00410202              eax_2 = SmartArray<PFileNode *,1>::get_new_size(this, arg2);
004101f9          else
004101fb              eax_2 = arg2;
004101fb          
0041020a          i = SmartArray<ArchiveVersionRow::VersionEntry,1>::grow(this, eax_2);
0041020a          
00410211          if (i == 0)
00410215              return i;
004101f2      }
004101f2      
00410233      this->m_num = arg2;
00410237      i = 1;
0041023a      return 1;
004101e0  }

0041023d                                                                                         cc cc cc                               ...

00410240  uint8_t __thiscall ArchiveVersionRow::SetVersion(class ArchiveVersionRow* this, uint32_t arg2, uint32_t arg3)

00410240  {
00410247      uint32_t m_num = this->m_aVersions.m_num;
0041024a      int32_t eax = 0;
0041024a      
0041024e      if (m_num > 0)
0041024e      {
00410250          struct ArchiveVersionRow::VersionEntry* m_data = this->m_aVersions.m_data;
00410253          int32_t* m_data_1 = m_data;
00410253          
00410261          do
00410261          {
00410257              if (*(uint32_t*)m_data_1 == arg2)
00410257              {
00410268                  if (eax == 0xffffffff)
00410268                      break;
00410268                  
004102be                  eax = m_data[eax].iVersion == arg3;
004102c1                  return eax;
00410257              }
00410257              
00410259              eax += 1;
0041025c              m_data_1 = &m_data_1[2];
00410261          } while (eax < m_num);
0041024e      }
0041024e      
00410274      uint32_t ebx_1 = (this->m_aVersions.m_num + 1);
0041027e      uint8_t eax_4;
0041027e      
0041027e      if ((this->m_aVersions.m_sizeAndDeallocate & 0x7fffffff) < ebx_1)
0041028b          eax_4 = SmartArray<ArchiveVersionRow::VersionEntry,1>::grow(&this->m_aVersions, SmartArray<PFileNode *,1>::get_new_size(&this->m_aVersions, ebx_1));
0041028b      
00410292      if (((this->m_aVersions.m_sizeAndDeallocate & 0x7fffffff) >= ebx_1 || eax_4 != 0))
0041026d          this->m_aVersions.m_num = ebx_1;
0041026d      
0041026d      this->m_aVersions.m_data[m_num].tokVersion = arg2;
0041026d      this->m_aVersions.m_data[m_num].iVersion = arg3;
004102a9      uint32_t eax_5;
004102a9      eax_5 = 1;
004102ac      return 1;
00410240  }

004102c4              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

004102d0  void __thiscall ArchiveVersionRow::SerializeRow(class ArchiveVersionRow* this, class Archive* arg2)

004102d0  {
004102d9      uint32_t m_num = this->m_aVersions.m_num;
004102e0      Archive::CheckAlignment(arg2, 4);
004102e9      uint8_t* eax = Archive::GetBytes(arg2, 4);
004102e9      
004102f0      if (eax != 0)
004102f0      {
004102f6          if ((arg2->m_flags & 1) == 0)
004102fc              m_num = *(uint32_t*)eax;
004102f6          else
004102f8              *(uint32_t*)eax = m_num;
004102f0      }
004102f0      
00410306      if ((((int8_t)(arg2->m_flags >> 2)) & 1) == 0)
00410306      {
00410310          if ((!(arg2->m_flags) & 1) != 0)
00410318              SmartArray<ArchiveVersionRow::VersionEntry,1>::SetNElements(&this->m_aVersions.m_data, m_num, 1);
00410318          
0041031d          uint32_t m_num_1 = this->m_aVersions.m_num;
0041031d          
00410322          while (m_num_1 > 0)
00410322          {
00410328              m_num_1 -= 1;
0041032f              void* ebp_1 = &this->m_aVersions.m_data[m_num_1];
00410332              Archive::CheckAlignment(arg2, 8);
0041033b              uint8_t* eax_3 = Archive::GetBytes(arg2, 8);
0041033b              
00410342              if (eax_3 != 0)
00410342              {
00410348                  if ((arg2->m_flags & 1) == 0)
00410348                  {
00410359                      *(uint32_t*)ebp_1 = *(uint32_t*)eax_3;
0041035f                      *(uint32_t*)((char*)ebp_1 + 4) = *(uint32_t*)(eax_3 + 4);
00410348                  }
00410348                  else
00410348                  {
0041034d                      *(uint32_t*)eax_3 = *(uint32_t*)ebp_1;
00410352                      *(uint32_t*)(eax_3 + 4) = *(uint32_t*)((char*)ebp_1 + 4);
00410348                  }
00410342              }
00410322          }
00410306      }
004102d0  }

0041036d                                         cc cc cc                                                               ...

00410370  uint32_t __thiscall ArchiveVersionRow::SerializeHeader(class ArchiveVersionRow* this, class Archive* arg2)

00410370  {
00410370      class ArchiveVersionRow* this_1 = this;
00410370      
0041038b      if ((!(((int8_t)(arg2->m_flags >> 2))) & 1) == 0)
00410429          return 0xffffffff;
00410429      
00410395      uint32_t result = Archive::GetCurrentPosition(arg2);
004103a0      int32_t edi_1 = 0x4d676963;
004103a5      Archive::CheckAlignment(arg2, 4);
004103ae      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
004103ae      
004103b5      if (eax_1 != 0)
004103b5      {
004103bb          if ((arg2->m_flags & 1) == 0)
004103c1              edi_1 = *(uint32_t*)eax_1;
004103bb          else
004103bd              __builtin_strncpy(eax_1, "cigM", 4);
004103b5      }
004103b5      
004103cb      if ((!(arg2->m_flags) & 1) != 0)
004103cb      {
004103cf          if (edi_1 < 0)
004103cf          {
004103d3              uint32_t eax_2 = Archive::GetCurrentPosition(arg2);
004103e3              Archive::SetCurrentPosition(arg2, (edi_1 & 0x3fffffff));
004103ed              ArchiveVersionRow::SerializeRow(this, arg2);
004103f5              Archive::SetCurrentPosition(arg2, eax_2);
00410401              return result;
004103cf          }
004103cf          
00410419          if (ArchiveVersionRow::SetVersion(this, 0x436f7265, (edi_1 & 0x3fffffff)) == 0)
0041041d              Archive::RaiseError(arg2);
004103cb      }
004103cb      
00410423      return result;
00410370  }

0041042c                                      cc cc cc cc                                                              ....

00410430  uint8_t __thiscall ArchiveVersionRow::SerializeFooter(class ArchiveVersionRow* this, uint32_t arg2, class Archive* arg3)

00410430  {
00410432      class Archive* edi = arg3;
0041043c      uint32_t eax_1;
0041043c      eax_1 = !((edi->m_flags >> 2));
0041043c      
0041044f      if (((eax_1 & 1) == 0 || arg2 == 0xffffffff))
0041044f      {
00410550          eax_1 = 0;
00410553          return 0;
0041044f      }
0041044f      
0041045b      uint8_t* eax_2 = Archive::PeekBytes(edi, arg2, 4);
0041045b      
00410464      if (eax_2 != 0)
00410464      {
0041046e          if ((!(edi->m_flags) & 1) == 0)
0041046e          {
004104dd              if (*(uint32_t*)eax_2 == 0x4d676963)
004104dd              {
004104df                  uint32_t m_num = this->m_aVersions.m_num;
004104df                  
004104f2                  if ((m_num >= 1 && (m_num != 1 || this->m_aVersions.m_data->tokVersion == 0x436f7265)))
004104f2                  {
004104f7                      if (m_num == 1)
004104f7                      {
004104f9                          __builtin_strncpy(eax_2, "cig\r", 4);
0041050a                          *(uint32_t*)eax_2 = (this->m_aVersions.m_data->iVersion & 0x3fffffff);
0041051a                          return (((int8_t)!((edi->m_flags >> 2))) & 1);
004104f7                      }
004104f7                      
0041051f                      *(uint32_t*)eax_2 = 0x8d676963;
00410525                      uint32_t eax_18 = Archive::GetCurrentPosition(edi);
00410534                      *(uint32_t*)eax_2 ^= ((*(uint32_t*)eax_2 ^ eax_18) & 0x3fffffff);
00410539                      ArchiveVersionRow::SerializeRow(this, edi);
0041054c                      return (((int8_t)!((edi->m_flags >> 2))) & 1);
004104f2                  }
004104dd              }
004104dd              
004104c1              Archive::RaiseError(edi);
0041046e          }
0041046e          else
0041046e          {
00410470              int32_t ebx_1 = *(uint32_t*)eax_2;
00410470              
00410474              if (ebx_1 < 0)
00410474              {
00410487                  if (Archive::GetCurrentPosition(edi) == (ebx_1 & 0x3fffffff))
00410487                  {
0041048f                      Serializer::SerializeObject<unsigned long>(&arg3, edi);
004104a5                      Archive::GetBytes(edi, (arg3 << 3));
004104b8                      return (((int8_t)!((edi->m_flags >> 2))) & 1);
00410487                  }
00410487                  
004104bd                  if (ebx_1 < 0)
004104c1                      Archive::RaiseError(edi);
00410474              }
0041046e          }
00410464      }
00410464      
004104d4      return (((int8_t)!((edi->m_flags >> 2))) & 1);
00410430  }

00410556                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00410560  void __thiscall DLListBase::InsertAfter(class DLListBase* this, class DLListData* arg2, class DLListData* arg3)

00410560  {
0041056b      if (arg3 != 0)
0041056b      {
0041056f          arg2->dllist_next = arg3->dllist_next;
00410571          class DLListData* dllist_next = arg3->dllist_next;
00410571          
00410575          if (dllist_next == 0)
00410575          {
00410583              this->tail_ = arg2;
00410586              arg3->dllist_next = arg2;
00410588              arg2->dllist_prev = arg3;
0041058c              return;
00410575          }
00410575          
00410577          dllist_next->dllist_prev = arg2;
0041057a          arg3->dllist_next = arg2;
0041057c          arg2->dllist_prev = arg3;
00410580          return;
0041056b      }
0041056b      
00410591      arg2->dllist_next = this->head_;
00410593      class DLListData* head_ = this->head_;
00410593      
00410597      if (head_ == 0)
00410597      {
004105a5          this->tail_ = arg2;
004105a8          this->head_ = arg2;
004105aa          arg2->dllist_prev = arg3;
004105ae          return;
00410597      }
00410597      
00410599      head_->dllist_prev = arg2;
0041059c      this->head_ = arg2;
0041059e      arg2->dllist_prev = arg3;
00410560  }

004105b1                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

004105c0  void __thiscall DLListBase::Remove(class DLListBase* this, class DLListData* arg2)

004105c0  {
004105c4      class DLListData* dllist_prev = arg2->dllist_prev;
004105c4      
004105cc      if (dllist_prev == 0)
004105cc      {
004105d8          class DLListData* dllist_next = this->head_->dllist_next;
004105dc          this->head_ = dllist_next;
004105dc          
004105de          if (dllist_next != 0)
004105e0              dllist_next->dllist_prev = nullptr;
004105cc      }
004105cc      else
004105d1          dllist_prev->dllist_next = arg2->dllist_next;
004105d1      
004105e3      class DLListData* dllist_next_1 = arg2->dllist_next;
004105e3      
004105e7      if (dllist_next_1 != 0)
004105e7      {
004105ec          dllist_next_1->dllist_prev = arg2->dllist_prev;
004105ef          arg2->dllist_next = 0;
004105f1          arg2->dllist_prev = nullptr;
004105f5          return;
004105e7      }
004105e7      
004105fb      class DLListData* dllist_prev_1 = this->tail_->dllist_prev;
00410600      this->tail_ = dllist_prev_1;
00410600      
00410603      if (dllist_prev_1 != 0)
00410605          dllist_prev_1->dllist_next = 0;
00410605      
00410607      arg2->dllist_next = 0;
00410609      arg2->dllist_prev = nullptr;
004105c0  }


00410610  class TResult* __thiscall InArchiveVersionStack::QueryInterface(class InArchiveVersionStack* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00410610  {
0041061c      int32_t* i = &InArchiveVersionStack_InterfaceType;
00410622      uint32_t m_data1 = arg3->m_data1;
00410624      int32_t var_18 = 0x794700;
00410628      int32_t var_14 = 0;
0041062c      int32_t var_10 = 0x794710;
00410634      int32_t var_c = 0;
00410638      int32_t var_8 = 0;
0041063c      int32_t var_4 = 0;
00410640      int32_t* edx = &var_18;
00410640      
00410668      do
00410668      {
0041065e          if ((*(uint32_t*)i == m_data1 && (i[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (i[2] == arg3->m_data4[0] && i[3] == arg3->m_data4[4]))))
0041065e          {
00410684              if (arg4 != 0)
00410684              {
00410686                  int32_t* esi_1 = edx[1];
00410690                  *(uint32_t*)(*(uint32_t*)((char*)esi_1 + this) + 0x10)();
00410693                  *(uint32_t*)arg4 = ((char*)esi_1 + this);
00410684              }
00410684              
0041069c              __return->m_val = 0;
004106a2              return __return;
0041065e          }
0041065e          
00410660          i = edx[2];
00410663          edx = &edx[2];
00410668      } while (i != 0);
00410668      
00410671      __return->m_val = 0x80004002;
0041067b      return __return;
00410610  }

004106a5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

004106b0  uint32_t __thiscall InArchiveVersionStack::GetVersionByToken(class InArchiveVersionStack const* this, uint32_t arg2)

004106b0  {
004106b2      uint32_t m_numElements = this->m_hlVersions.m_hash.m_numElements;
004106b2      
004106b7      if ((m_numElements != 0 && m_numElements > 0))
004106b7      {
004106b9          class DLListData* tail_ = this->m_hlVersions.m_list.tail_;
004106b9          
004106c6          if ((tail_ != 0 && tail_ != 8))
004106cd              /* jump -> *(uint32_t*)*(int32_t*)((char*)tail_ + 8) */
004106b7      }
004106b7      
004106cf      int32_t result;
004106cf      return result;
004106b0  }

004106d2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

004106e0  uint8_t __thiscall InArchiveVersionStack::SetVersion(class InArchiveVersionStack* this, uint32_t arg2, uint32_t arg3)

004106e0  {
004106e0      int32_t eax;
004106e0      eax = 0;
004106e2      uint32_t m_numElements = this->m_hlVersions.m_hash.m_numElements;
004106e2      
004106e8      if ((m_numElements != 0 && m_numElements > 0))
004106e8      {
004106ea          class DLListData* tail_ = this->m_hlVersions.m_list.tail_;
004106ea          
004106f7          if ((tail_ != 0 && tail_ != 8))
004106fc              /* tailcall */
004106fc              return ArchiveVersionRow::SetVersion(&tail_[1], arg2, arg3);
004106e8      }
004106e8      
00410701      return 0;
004106e0  }

00410704              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

00410710  class IDClass<_tagVersionHandle,32,0>* __thiscall InArchiveVersionStack::GetCurrentVersionHandle(class InArchiveVersionStack const* this, class IDClass<_tagVersionHandle,32,0>* __return)

00410710  {
00410714      if (this->m_hlVersions.m_hash.m_numElements > 0)
00410714      {
00410716          class DLListData* tail_ = this->m_hlVersions.m_list.tail_;
00410716          
00410723          if ((tail_ != 0 && tail_ != 8))
00410723          {
0041072b              __return->id = *(int32_t*)((char*)tail_ + -8);
0041072d              return __return;
00410723          }
00410714      }
00410714      
0041073a      __return->id = INVALID_VERSIONHANDLE.id;
0041073c      return __return;
00410710  }

0041073f                                                                                               cc                                 .

00410740  int32_t* __thiscall SmartArray<ArchiveVersionRow::VersionEntry,1>::operator=(int32_t* arg1, int32_t* arg2)

00410740  {
0041075b      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
0041075b      {
00410779      label_410779:
00410779          int32_t* eax_3 = *(uint32_t*)arg2;
0041077e          void* edx_3 = &eax_3[(arg2[2] * 2)];
00410783          int32_t* ecx_4 = *(uint32_t*)arg1;
00410783          
00410785          while (eax_3 < edx_3)
00410785          {
0041078a              *(uint32_t*)ecx_4 = *(uint32_t*)eax_3;
0041078f              ecx_4[1] = eax_3[1];
00410792              eax_3 = &eax_3[2];
00410795              ecx_4 = &ecx_4[2];
00410785          }
00410785          
004107a3          for (int32_t i = arg2[2]; i < arg1[2]; i += 1)
004107a3          {
004107a5              int32_t edx_4 = *(uint32_t*)arg1;
004107a9              *(uint32_t*)(edx_4 + (i << 3)) = 0;
004107ac              *(uint32_t*)((edx_4 + (i << 3)) + 4) = 0;
004107a3          }
004107a3          
004107bb          arg1[2] = arg2[2];
0041075b      }
0041075b      else
0041075b      {
0041075d          arg1[2] = 0;
0041075d          
00410777          if (SmartArray<ArchiveVersionRow::VersionEntry,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
00410777              goto label_410779;
0041075b      }
0041075b      
004107c2      return arg1;
00410740  }

004107c5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

004107d0  uint8_t __fastcall IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::grow(class IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this)

004107d0  {
004107d4      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004107f1      uint32_t m_numBuckets = this->m_numBuckets;
004107fc      uint32_t* eax_2 = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, 0, nullptr);
004107fc      
00410806      if (eax_2 != bucketSizesEnd_1)
0041080f          eax_2 = &eax_2[1];
00410806      else
00410806      {
00410808          eax_2 -= 4;
00410808          
0041080d          if (eax_2 != bucketSizesEnd_1)
0041080f              eax_2 = &eax_2[1];
00410806      }
00410806      
00410821      return IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::resize_internal(this, *(uint32_t*)eax_2);
004107d0  }

00410822        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

00410830  uint8_t __thiscall InArchiveVersionStack::GetRowByHandle(class InArchiveVersionStack* this, class IDClass<_tagVersionHandle,32,0> arg2, class ArchiveVersionRow const** arg3)

00410830  {
00410844      class InArchiveVersionStack::VersionRowHolder** eax_1;
00410844      
00410844      for (int32_t* i = this->m_hlVersions.m_hash.m_buckets[(COMBINE(0, arg2) % this->m_hlVersions.m_hash.m_numBuckets)]; i != 0; i = i[1])
00410844      {
00410848          if (*(uint32_t*)i == arg2)
00410848          {
00410859              if (i == 0)
00410859                  break;
00410859              
00410862              *(uint32_t*)arg3 = &i[4];
00410864              eax_1 = 1;
00410867              return 1;
00410848          }
00410844      }
00410844      
00410851      eax_1 = 0;
00410854      return 0;
00410830  }

0041086a                                cc cc cc cc cc cc                                                            ......

00410870  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::resize_internal(class IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this, uint32_t arg2)

00410870  {
0041087d      if (arg2 == this->m_numBuckets)
0041087d      {
0041087f          uint32_t eax;
0041087f          eax = 0;
00410885          return 0;
0041087d      }
0041087d      
0041088a      int32_t* i_2 = nullptr;
0041088a      
0041088f      while (this->m_numElements != 0)
0041088f      {
00410897          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0041089d          class InArchiveVersionStack::VersionRowHolder** m_firstInterestingBucket_2;
0041089d          int32_t* i_3;
0041089d          
0041089d          if (this->m_firstInterestingBucket == ecx_1)
0041089d          {
004108b1          label_4108b1:
004108b1              m_firstInterestingBucket_2 = nullptr;
004108b3              i_3 = nullptr;
0041089d          }
0041089d          else
0041089d          {
004108a0              while (true)
004108a0              {
004108a0                  class InArchiveVersionStack::VersionRowHolder** m_firstInterestingBucket = this->m_firstInterestingBucket;
004108a0                  
004108a5                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004108a5                  {
004108b7                      class InArchiveVersionStack::VersionRowHolder** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004108ba                      i_3 = *(uint32_t*)m_firstInterestingBucket_1;
004108bc                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004108bc                      break;
004108a5                  }
004108a5                  
004108ac                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004108ac                  
004108af                  if (&m_firstInterestingBucket[1] == ecx_1)
004108af                      goto label_4108b1;
004108a0              }
0041089d          }
0041089d          
004108c3          class InArchiveVersionStack::VersionRowHolder** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
004108ca          int32_t* i_4 = i_3;
004108cd          IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::remove(this, this);
004108d2          i_3[1] = i_2;
004108d8          i_2 = i_3;
0041088f      }
0041088f      
004108dc      class InArchiveVersionStack::VersionRowHolder** m_buckets = this->m_buckets;
004108dc      
004108e4      if (m_buckets != &this->m_aInplaceBuckets)
004108e7          operator delete[](m_buckets);
004108e7      
004108f6      this->m_buckets = nullptr;
004108f9      this->m_firstInterestingBucket = nullptr;
004108fc      this->m_numBuckets = 0;
004108ff      this->m_numElements = 0;
00410902      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::init(this, arg2);
00410909      int32_t* i_1 = i_2;
00410910      class InArchiveVersionStack::VersionRowHolder** eax_2;
00410910      
00410910      if (i_2 != 0)
00410910      {
0041094f          int32_t* i;
0041094f          
0041094f          do
0041094f          {
00410918              i = i_1[1];
00410918              
00410921              if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
00410925                  IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::grow(this);
00410925              
0041092e              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
00410931              class InArchiveVersionStack::VersionRowHolder** m_buckets_1 = this->m_buckets;
00410937              i_1[1] = m_buckets_1[temp1_1];
0041093a              m_buckets_1[temp1_1] = i_1;
0041093d              eax_2 = &m_buckets_1[temp1_1];
0041093d              
00410943              if (eax_2 < this->m_firstInterestingBucket)
00410945                  this->m_firstInterestingBucket = eax_2;
00410945              
00410948              this->m_numElements += 1;
0041094d              i_1 = i;
0041094f          } while (i != 0);
00410910      }
00410910      
00410954      eax_2 = 1;
00410957      return 1;
00410870  }

0041095a                                                                                cc cc cc cc cc cc                            ......

00410960  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::add(class IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this, class InArchiveVersionStack::VersionRowHolder* arg2)

00410960  {
00410968      uint32_t id = arg2->m_hashKey.id;
0041096d      uint32_t m_numBuckets = this->m_numBuckets;
0041096d      
0041097c      for (int32_t* i = this->m_buckets[(COMBINE(0, id) % m_numBuckets)]; i != 0; i = i[1])
0041097c      {
00410982          if (*(uint32_t*)i == id)
00410982          {
004109cb              if (i == 0)
004109cb                  break;
004109cb              
004109cf              class InArchiveVersionStack::VersionRowHolder** eax_1;
004109cf              eax_1 = 0;
004109d2              return 0;
00410982          }
0041097c      }
0041097c      
00410996      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0041099a          IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::grow(this);
0041099a      
004109a3      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.id) % this->m_numBuckets);
004109a6      class InArchiveVersionStack::VersionRowHolder** m_buckets = this->m_buckets;
004109ac      arg2->m_hashNext = m_buckets[temp1_1];
004109af      m_buckets[temp1_1] = arg2;
004109b2      class InArchiveVersionStack::VersionRowHolder** eax_3 = &m_buckets[temp1_1];
004109b2      
004109b8      if (eax_3 < this->m_firstInterestingBucket)
004109ba          this->m_firstInterestingBucket = eax_3;
004109ba      
004109bd      this->m_numElements += 1;
004109c3      eax_3 = 1;
004109c6      return 1;
00410960  }

004109d5                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

004109e0  uint8_t __thiscall IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::push_tail(class IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this, class InArchiveVersionStack::VersionRowHolder* arg2)

004109e0  {
004109e8      uint32_t id = arg2->m_hashKey.id;
004109e8      
004109f9      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, id) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
004109f9      {
00410a02          if (*(uint32_t*)i == id)
00410a02          {
00410a2c              if (i == 0)
00410a2c                  break;
00410a2c              
00410a2f              class InArchiveVersionStack::VersionRowHolder** eax_1;
00410a2f              eax_1 = 0;
00410a32              return 0;
00410a02          }
004109f9      }
004109f9      
00410a0e      IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::add(this, arg2);
00410a1e      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
00410a24      int32_t eax_3;
00410a24      eax_3 = 1;
00410a27      return 1;
004109e0  }

004109fd                                                                                         8d 49 00                               .I.
00410a35                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

00410a40  class IDClass<_tagVersionHandle,32,0>* __thiscall InArchiveVersionStack::PushVersionRow(class InArchiveVersionStack* this, class IDClass<_tagVersionHandle,32,0>* __return)

00410a40  {
00410a44      this->m_iLastSerialNumber += 2;
00410a51      uint32_t m_iLastSerialNumber = this->m_iLastSerialNumber;
00410a51      
00410a57      if (this->m_hlVersions.m_hash.m_numElements == 0)
00410a57      {
00410a59          this->m_vrDefaultRow.m_hashKey.id = m_iLastSerialNumber;
00410a65          IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::push_tail(&this->m_hlVersions, &this->m_vrDefaultRow);
00410a6e          __return->id = m_iLastSerialNumber;
00410a73          return __return;
00410a57      }
00410a57      
00410a78      class InArchiveVersionStack::VersionRowHolder* eax_2 = operator new(0x60);
00410a78      
00410a82      if (eax_2 == 0)
00410a82      {
00410ac1          IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::push_tail(&this->m_hlVersions, nullptr);
00410ac6          uint32_t* __return_2 = __return;
00410aca          *(uint32_t*)__return_2 = m_iLastSerialNumber;
00410acf          return __return_2;
00410a82      }
00410a82      
00410a84      eax_2->m_hashKey.id = m_iLastSerialNumber;
00410a86      eax_2->m_hashNext = nullptr;
00410a89      eax_2->dllist_next = nullptr;
00410a8c      eax_2->dllist_prev = nullptr;
00410a8f      eax_2->m_VersionRow.vtable = 0x794430;
00410a99      eax_2->m_VersionRow.m_aVersions.m_data = &eax_2->m_VersionRow.m_aVersions.m_aPrimitiveInplaceMemory;
00410aa0      eax_2->m_VersionRow.m_aVersions.m_sizeAndDeallocate = 8;
00410aa7      eax_2->m_VersionRow.m_aVersions.m_num = 0;
00410aaa      IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::push_tail(&this->m_hlVersions, eax_2);
00410aaf      uint32_t* __return_1 = __return;
00410ab3      *(uint32_t*)__return_1 = m_iLastSerialNumber;
00410ab8      return __return_1;
00410a40  }

00410ad2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

00410ae0  class IDClass<_tagVersionHandle,32,0>* __thiscall InArchiveVersionStack::PushVersionRow(class InArchiveVersionStack* this, class IDClass<_tagVersionHandle,32,0>* __return, class ArchiveVersionRow const* arg3)

00410ae0  {
00410ae4      this->m_iLastSerialNumber += 2;
00410aeb      class InArchiveVersionStack::VersionRowHolder* ebx = nullptr;
00410af1      uint32_t m_iLastSerialNumber = this->m_iLastSerialNumber;
00410af7      class PrimitiveInplaceArray<ArchiveVersionRow::VersionEntry,8,1>* var_10;
00410af7      int32_t* ecx;
00410af7      
00410af7      if (this->m_hlVersions.m_hash.m_numElements != 0)
00410af7      {
00410b13          void* eax_2 = operator new(0x60);
00410b13          
00410b1d          if (eax_2 != 0)
00410b1d          {
00410b1f              *(uint32_t*)((char*)eax_2 + 4) = 0;
00410b22              *(uint32_t*)eax_2 = m_iLastSerialNumber;
00410b24              *(uint32_t*)((char*)eax_2 + 8) = 0;
00410b27              *(uint32_t*)((char*)eax_2 + 0xc) = 0;
00410b2a              *(uint32_t*)((char*)eax_2 + 0x10) = 0x794430;
00410b34              *(uint32_t*)((char*)eax_2 + 0x1c) = 0;
00410b37              *(uint32_t*)((char*)eax_2 + 0x14) = ((char*)eax_2 + 0x20);
00410b3a              *(uint32_t*)((char*)eax_2 + 0x18) = 8;
00410b41              ebx = eax_2;
00410b1d          }
00410b1d          
00410b4a          var_10 = &arg3->m_aVersions;
00410b4b          ecx = &ebx->m_VersionRow.m_aVersions;
00410af7      }
00410af7      else
00410af7      {
00410afd          ebx = &this->m_vrDefaultRow;
00410b06          ebx->m_hashKey.id = m_iLastSerialNumber;
00410b08          var_10 = &arg3->m_aVersions;
00410b09          ecx = &this->m_vrDefaultRow.m_VersionRow.m_aVersions;
00410af7      }
00410af7      
00410b4e      SmartArray<ArchiveVersionRow::VersionEntry,1>::operator=(ecx, var_10);
00410b57      IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::push_tail(&this->m_hlVersions, ebx);
00410b5c      uint32_t* result = __return;
00410b60      *(uint32_t*)result = m_iLastSerialNumber;
00410b65      return result;
00410ae0  }

00410b68                          cc cc cc cc cc cc cc cc                                                          ........

00410b70  class InArchiveVersionStack::VersionRowHolder* __thiscall IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::remove(class IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>* this, class IDClass<_tagVersionHandle,32,0>* arg2)

00410b70  {
00410b79      uint32_t id = arg2->id;
00410b85      int32_t* result = this->m_hash.m_buckets[(COMBINE(0, id) % this->m_hash.m_numBuckets)];
00410b85      
00410b8a      if (result != 0)
00410b8a      {
00410b92          while (*(uint32_t*)result != id)
00410b92          {
00410b94              result = result[1];
00410b94              
00410b99              if (result == 0)
00410ba0                  return result;
00410b92          }
00410b92          
00410ba5          if (result != 0)
00410ba5          {
00410bae              DLListBase::Remove(&this->m_list, &result[2]);
00410bb6              IntrusiveHashTable<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::remove(this, arg2);
00410ba5          }
00410b8a      }
00410b8a      
00410bc0      return result;
00410b70  }

00410bc3           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

00410bd0  uint8_t __fastcall InArchiveVersionStack::PopVersionRow(class InArchiveVersionStack* this, class IDClass<_tagVersionHandle,32,0> arg2)

00410bd0  {
00410bdc      class InArchiveVersionStack::VersionRowHolder* eax = IntrusiveHashList<IDClass<_tagVersionHandle,32,0>,InArchiveVersionStack::VersionRowHolder *,1>::remove(&this->m_hlVersions, &arg2);
00410bdc      
00410be5      if (eax == 0)
00410be5      {
00410c1f          eax = 0;
00410c22          return 0;
00410be5      }
00410be5      
00410bef      if (eax != &this->m_vrDefaultRow)
00410bef      {
00410c00          if ((eax->m_VersionRow.m_aVersions.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00410c06              operator delete[](eax->m_VersionRow.m_aVersions.m_data);
00410c06          
00410c0f          operator delete(eax);
00410bef      }
00410bef      
00410c18      eax = 1;
00410c1b      return 1;
00410bd0  }

00410c25                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00410c30  void __fastcall InArchiveVersionStack::Reset(class InArchiveVersionStack* this)

00410c30  {
00410c3b      if (this->m_hlVersions.m_hash.m_numElements > 0)
00410c3b      {
00410c41          class DLListData* head_ = this->m_hlVersions.m_list.head_;
00410c41          
00410c46          if (head_ != 0)
00410c46          {
00410c4c              void* __offset(DLListData, -0x8) eax_1 = &head_[-1];
00410c4c              
00410c51              if (eax_1 != 0)
00410c51              {
00410c62                  while (true)
00410c62                  {
00410c62                      class DLListData* dllist_next = ADJ(eax_1)->dllist_next;
00410c6c                      void* __offset(DLListData, -0x8) var_8_1;
00410c6c                      
00410c6c                      if (dllist_next == 0)
00410c77                          var_8_1 = nullptr;
00410c6c                      else
00410c71                          var_8_1 = &dllist_next[-1];
00410c71                      
00410c7b                      class DLListData* dllist_prev = ((char*)eax_1 + 8)->dllist_prev;
00410c7b                      
00410c80                      if (dllist_prev == 0)
00410c80                      {
00410c8b                          class DLListData* dllist_next_1 = this->m_hlVersions.m_list.head_->dllist_next;
00410c8f                          this->m_hlVersions.m_list.head_ = dllist_next_1;
00410c8f                          
00410c92                          if (dllist_next_1 != 0)
00410c94                              dllist_next_1->dllist_prev = nullptr;
00410c80                      }
00410c80                      else
00410c84                          dllist_prev->dllist_next = ((char*)eax_1 + 8)->dllist_next;
00410c84                      
00410c97                      class DLListData* dllist_next_2 = ((char*)eax_1 + 8)->dllist_next;
00410c97                      
00410c9b                      if (dllist_next_2 == 0)
00410c9b                      {
00410cab                          class DLListData* dllist_prev_1 = this->m_hlVersions.m_list.tail_->dllist_prev;
00410cb0                          this->m_hlVersions.m_list.tail_ = dllist_prev_1;
00410cb0                          
00410cb6                          if (dllist_prev_1 != 0)
00410cb8                              dllist_prev_1->dllist_next = 0;
00410c9b                      }
00410c9b                      else
00410ca0                          dllist_next_2->dllist_prev = ((char*)eax_1 + 8)->dllist_prev;
00410ca0                      
00410c67                      ((char*)eax_1 + 8)->dllist_next = 0;
00410c67                      ((char*)eax_1 + 8)->dllist_prev = nullptr;
00410cbf                      int32_t esi_3 = *(int32_t*)((char*)ADJ(eax_1) + -8);
00410cc6                      uint32_t temp1_1 = (COMBINE(0, esi_3) % this->m_hlVersions.m_hash.m_numBuckets);
00410cc9                      class InArchiveVersionStack::VersionRowHolder** m_buckets = this->m_hlVersions.m_hash.m_buckets;
00410ccc                      int32_t* i_1 = m_buckets[temp1_1];
00410ccc                      
00410cd6                      for (int32_t* i = i_1; i != 0; i = i[1])
00410cd6                      {
00410cda                          if (*(uint32_t*)i == esi_3)
00410cda                          {
00410ce7                              if (i != 0)
00410ce7                              {
00410ceb                                  if (i_1 == i)
00410ccf                                      m_buckets[temp1_1] = i_1[1];
00410ceb                                  else
00410ceb                                  {
00410cf7                                      int32_t* i_2;
00410cf7                                      
00410cf7                                      do
00410cf7                                      {
00410cf0                                          i_2 = i_1;
00410cf2                                          i_1 = i_1[1];
00410cf7                                      } while (i_1 != i);
00410cf7                                      
00410cfb                                      if (i_2 != 0)
00410d07                                          i_2[1] = i_1[1];
00410cfb                                      else
00410ccf                                          m_buckets[temp1_1] = i_1[1];
00410ceb                                  }
00410ceb                                  
00410d0a                                  this->m_hlVersions.m_hash.m_numElements -= 1;
00410ce7                              }
00410ce7                              
00410ce7                              break;
00410cda                          }
00410cd6                      }
00410cd6                      
00410d16                      if (eax_1 != &this->m_vrDefaultRow)
00410d16                      {
00410d27                          if ((*(int32_t*)((char*)ADJ(eax_1) + 0x10) & 0x80000000) == 0x80000000)
00410d2d                              operator delete[](*(int32_t*)((char*)ADJ(eax_1) + 0xc));
00410d2d                          
00410d36                          operator delete(eax_1);
00410d16                      }
00410d16                      
00410d43                      if (var_8_1 == 0)
00410d43                          break;
00410d43                      
00410c5c                      eax_1 = var_8_1;
00410c62                  }
00410c51              }
00410c46          }
00410c3b      }
00410c30  }

00410d51                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

00410d60  void __fastcall InArchiveVersionStack::~InArchiveVersionStack(class InArchiveVersionStack* this)

00410d60  {
00410d63      this->vtable = 0x794434;
00410d69      InArchiveVersionStack::Reset(this);
00410d69      
00410d7e      if ((this->m_vrDefaultRow.m_VersionRow.m_aVersions.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00410d87          operator delete[](this->m_vrDefaultRow.m_VersionRow.m_aVersions.m_data);
00410d87      
00410d8f      class InArchiveVersionStack::VersionRowHolder** m_buckets = this->m_hlVersions.m_hash.m_buckets;
00410d97      this->m_hlVersions.m_hash.vtable = 0x79442c;
00410d97      
00410d9e      if (m_buckets != &this->m_hlVersions.m_hash.m_aInplaceBuckets)
00410da1          operator delete[](m_buckets);
00410da1      
00410dab      this->m_hlVersions.m_hash.m_buckets = nullptr;
00410dae      this->m_hlVersions.m_hash.m_firstInterestingBucket = nullptr;
00410db1      this->m_hlVersions.m_hash.m_numBuckets = 0;
00410db4      this->m_hlVersions.m_hash.m_numElements = 0;
00410db7      this->m_cTurbineRefCount.vtable = 0x792b6c;
00410d60  }


00410dc0  struct HINSTANCE__* __fastcall GetModuleFromAddress(uint8_t* arg1)

00410dc0  {
00410dcb      void lpBuffer;
00410dcb      void* lpAddress;
00410dcb      VirtualQuery(lpAddress, &lpBuffer, 0x1c);
00410dd8      int32_t result;
00410dd8      return result;
00410dc0  }

00410dd9                                                                             cc cc cc cc cc cc cc                           .......

00410de0  void __fastcall CSpinLock<512,0>::Enter(class CSpinLock<512,0>* this)

00410de0  {
00410dee      int32_t esi = 0;
00410df0      int32_t eax;
00410df0      int32_t ecx;
00410df0      eax = InterlockedExchange(this, 1);
00410df0      
00410df4      if (eax != 0)
00410df4      {
00410e22          int32_t i;
00410e22          
00410e22          do
00410e22          {
00410e03              while (this->m_Lock != 0)
00410e03              {
00410e05                  esi += 1;
00410e05                  
00410e0e                  if (esi >= 0x200)
00410e0e                  {
00410e12                      Sleep(0);
00410e14                      esi = 0;
00410e0e                  }
00410e03              }
00410e03              
00410e1e              i = InterlockedExchange(this, 1);
00410e22          } while (i != 0);
00410df4      }
00410de0  }

00410e29                             cc cc cc cc cc cc cc                                                           .......

00410e30  void __fastcall TimeSource_QueryPerformanceCounter::TimeSource_QueryPerformanceCounter(class TimeSource_QueryPerformanceCounter* this)

00410e30  {
00410e34      this->m_SpinLock.m_Lock = 0;
00410e37      this->m_SpinLock.m_hCurThread = 0;
00410e3a      this->m_SpinLock.m_nEnterCount = 0;
00410e3d      this->m_cVolatileState.dwFlags = 0;
00410e30  }

00410e41     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00410e50  void __fastcall TimeSource_QueryPerformanceCounter::Init(class TimeSource_QueryPerformanceCounter* this)

00410e50  {
00410e5d      int32_t ebx;
00410e5d      ebx = 0;
00410e67      int32_t var_8;
00410e67      int32_t var_4;
00410e67      
00410e67      if (QueryPerformanceFrequency(&var_8) != 0)
00410e67      {
00410e6e          int32_t ebp_1 = var_8;
00410e72          int32_t var_1c_1 = 0;
00410e74          int32_t var_20_1 = 0x3e8;
00410e79          int32_t var_24_1 = var_4;
00410e7a          int32_t var_28_1 = ebp_1;
00410e7b          ebx = 1;
00410e7d          int32_t eax_1;
00410e7d          int32_t edx_1;
00410e7d          eax_1 = _alldiv();
00410e82          int32_t var_1c_2 = 0;
00410e84          int32_t var_20_2 = 2;
00410e86          int32_t var_24_2 = var_4;
00410e87          int32_t var_28_2 = ebp_1;
00410e88          this->m_qwPerfsPerMS = eax_1;
00410e8b          *(uint32_t*)((char*)this->m_qwPerfsPerMS)[4] = edx_1;
00410e8e          int32_t eax_2;
00410e8e          int32_t edx_2;
00410e8e          eax_2 = _alldiv();
00410e9c          this->m_rPerfsPerSecond = ((double)((long double)var_8));
00410e9e          this->m_qwPerfCountTolerance = eax_2;
00410ea1          *(uint32_t*)((char*)this->m_qwPerfCountTolerance)[4] = edx_2;
00410ea4          QueryPerformanceCounter(&var_8);
00410e67      }
00410e67      
00410eb0      CSpinLock<512,0>::Enter(&this->m_SpinLock);
00410eb0      
00410eb9      if ((this->m_cVolatileState.dwFlags & 1) == 0)
00410eb9      {
00410ec9          this->m_cVolatileState.qwReferenceQPC = var_8;
00410ecc          *(uint32_t*)((char*)this->m_cVolatileState.qwReferenceQPC)[4] = var_4;
00410ecf          this->m_cVolatileState.tLastTime = ((double)((long double)0.0));
00410ed8          this->m_cVolatileState.tReference = ((double)((long double)0.0));
00410ee3          this->m_cVolatileState.dwReferenceTGT = timeGetTime();
00410ee3          
00410ee6          if (ebx != 0)
00410ef9              this->m_cVolatileState.dwFlags &= 0xfffffffd;
00410ee6          else
00410eee              this->m_cVolatileState.dwFlags |= 2;
00410eee          
00410efc          this->m_cVolatileState;
00410f05          this->m_cVolatileState.dwFlags |= 1;
00410f08          this->m_cVolatileState;
00410eb9      }
00410eb9      
00410f0e      InterlockedExchange(&this->m_SpinLock, 0);
00410e50  }

00410f1b                                                                                   cc cc cc cc cc                             .....

00410f20  int32_t __thiscall TimeSource_QueryPerformanceCounter::ComputeElapsedTime(class TimeSource_QueryPerformanceCounter* this, uint8_t arg2)

00410f20  {
00410f29      int32_t ebx;
00410f29      int32_t var_58 = ebx;
00410f2c      int32_t esi;
00410f2c      int32_t var_5c = esi;
00410f30      int32_t edi;
00410f30      int32_t var_60 = edi;
00410f35      CSpinLock<512,0>::Enter(&this->m_SpinLock);
00410f4c      struct TimeSource_QueryPerformanceCounter::StateData volatile* var_44 = &this->m_cVolatileState;
00410f51      char var_30;
00410f51      __builtin_memcpy(&var_30, &this->m_cVolatileState, 0x28);
00410f53      int32_t result = InterlockedExchange(&this->m_SpinLock, 0);
00410f53      
00410f5e      if ((var_30 & 1) == 0)
00410f6c          return result;
00410f6c      
00410f6f      uint32_t eax_1 = timeGetTime();
00410f77      int32_t var_20;
00410f77      int32_t ecx_2 = (eax_1 - var_20);
00410f7b      bool cond:0 = (var_30 & 2) != 0;
00410f80      uint32_t var_50 = eax_1;
00410f84      var_58 = ecx_2;
00410f88      int32_t lpPerformanceCount;
00410f88      int32_t var_3c;
00410f88      long double x87_r7_4;
00410f88      double var_28;
00410f88      
00410f88      if (cond:0)
00410f88      {
00411097          long double x87_r7_7 = ((long double)ecx_2);
00411097          
0041109b          if (ecx_2 < 0)
0041109d              x87_r7_7 = (x87_r7_7 + ((long double)4294967296.0));
0041109d          
004110a9          x87_r7_4 = ((x87_r7_7 * ((long double)0.001)) + ((long double)var_28));
00410f88      }
00410f88      else
00410f88      {
00410f93          QueryPerformanceCounter(&lpPerformanceCount);
00410fa0          int32_t lpPerformanceCount_2 = lpPerformanceCount;
00410fa7          int32_t var_18;
00410fa7          int32_t edi_2 = (lpPerformanceCount_2 - var_18);
00410faf          int32_t var_14;
00410faf          int32_t esi_4 = (var_3c - var_14);
00410fb3          int32_t var_6c_2 = 0;
00410fb5          int32_t var_70_1 = var_58;
00410fb6          int32_t var_74_1 = *(uint32_t*)((char*)this->m_qwPerfsPerMS)[4];
00410fb7          int32_t var_78_1 = this->m_qwPerfsPerMS;
00410fb8          int32_t eax_3;
00410fb8          int32_t edx_2;
00410fb8          eax_3 = _allmul();
00410fc0          int32_t edx_3 = (edx_2 + *(uint32_t*)((char*)this->m_qwPerfCountTolerance)[4]);
00410fc0          
00410fcb          if ((esi_4 > edx_3 || (esi_4 >= edx_3 && edi_2 >= (eax_3 + this->m_qwPerfCountTolerance))))
00410fcb          {
00411045              long double x87_r7_5 = ((long double)var_58);
00411049              var_30 |= 2;
00411049              
00411050              if (var_58 < 0)
00411052                  x87_r7_5 = (x87_r7_5 + ((long double)4294967296.0));
00411052              
00411065              x87_r7_4 = ((x87_r7_5 * ((long double)0.001)) + ((long double)var_28));
00411065              
00411069              if (bComplainedAlready == 0)
0041106b                  bComplainedAlready = 1;
0041106b              
0041107f              if ((arg2 != 0 && bComplainedAlready == 0))
00411085                  bComplainedAlready = 1;
00410fcb          }
00410fcb          else
00410fcb          {
00410fd9              int32_t var_44_1 = (esi_4 & 0x7fffffff);
00410fe6              uint32_t var_44_2 = (esi_4 & 0x80000000);
00410ffc              x87_r7_4 = (((((long double)edi_2) + -(((long double)0))) / ((long double)this->m_rPerfsPerSecond)) + ((long double)var_28));
00410fcb          }
00410fcb          
00411000          ecx_2 = var_58;
00410f88      }
00411004      double var_38;
00411004      long double temp5 = ((long double)var_38);
00411004      (x87_r7_4 - temp5);
00411008      eax_1 = ((((x87_r7_4 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp5) ? 1 : 0) << 0xe) | 0x3800))));
00411008      
0041100d      if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0041100d      {
00411019          var_38 = ((double)x87_r7_4);
00411019          
0041101d          if (ecx_2 >= 0x2710)
0041101d          {
00411027              double var_28_1 = ((double)x87_r7_4);
00411033              uint32_t var_20_1 = var_50;
00411037              int32_t lpPerformanceCount_1 = lpPerformanceCount;
0041103b              int32_t var_14_1 = var_3c;
0041101d          }
0041100d      }
0041100d      
004110b8      class CSpinLock<512,0>* var_54;
004110b8      CSpinLock<512,0>::Enter(var_54);
004110c1      long double x87_r7_9 = ((long double)*(uint64_t*)((char*)this->m_SpinLock + 0));
004110c3      long double temp6 = ((long double)var_38);
004110c3      (x87_r7_9 - temp6);
004110c7      int32_t eax_6;
004110c7      eax_6 = ((((x87_r7_9 < temp6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp6))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp6) ? 1 : 0) << 0xe) | 0))));
004110c9      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004110c9      
004110cc      if (p)
004110eb          var_38 = ((double)((long double)*(uint64_t*)((char*)this->m_SpinLock + 0)));
004110cc      else if (arg2 == 0)
004110e5          *(uint64_t*)((char*)this->m_SpinLock + 0) = ((double)((long double)var_38));
004110d2      else
004110dd          __builtin_memcpy(&this->m_SpinLock, &var_38, 0x28);
004110dd      
00411106      return InterlockedExchange(var_54, 0);
00410f20  }

00411109                             cc cc cc cc cc cc cc                                                           .......

00411110  void __fastcall IInputActionCallback::~IInputActionCallback(class IInputActionCallback* this)

00411110  {
00411112      this->vtable = 0x794824;
00411118      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00411118      
00411120      if (ICIDM::s_cidm_1 != 0)
00411122          ICIDM::s_cidm_1->vtable->UnregisterCallback(ICIDM::s_cidm_1, this);
00411110  }

00411129                             90 90 90 90 90 90 90                                                           .......

00411130  void* __thiscall IInputActionCallback::`scalar deleting destructor'(class IInputActionCallback* this, uint32_t arg2)

00411130  {
00411133      this->vtable = 0x794824;
00411139      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00411139      
00411141      if (ICIDM::s_cidm_1 != 0)
00411143          ICIDM::s_cidm_1->vtable->UnregisterCallback(ICIDM::s_cidm_1, this);
00411143      
0041114e      if ((arg2 & 1) != 0)
00411151          operator delete(this);
00411151      
0041115c      return this;
00411130  }

0041115f                                                                                               90                                 .

00411160  class Client* Client::GetInstance()

00411160  {
00411165      return Client::m_instance;
00411160  }

00411166                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00411170  void __fastcall Client::CleanupUI(class Client* this)

00411170  {
00411173      class UIFlow* m_ui = this->m_ui;
00411173      
0041117b      if (m_ui != 0)
0041117b      {
0041117d          m_ui->vtable->Release(m_ui);
00411182          this->m_ui = nullptr;
0041117b      }
0041117b      
0041118c      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0041118c      
00411194      if (UIElementManager::s_pInstance_1 != 0)
00411194      {
00411196          UIElementManager::Cleanup(UIElementManager::s_pInstance_1);
0041119b          UIElementManager::DestroyUIElementManager();
00411194      }
00411194      
004111a0      class IQueuedUIEventDeliverer* m_UIQueueManager = this->m_UIQueueManager;
004111a0      
004111a8      if (m_UIQueueManager != 0)
004111a8      {
004111aa          m_UIQueueManager->vtable->OnShutdown(m_UIQueueManager);
004111af          class IQueuedUIEventDeliverer* m_UIQueueManager_1 = this->m_UIQueueManager;
004111af          
004111b7          if (m_UIQueueManager_1 != 0)
004111b7          {
004111b9              m_UIQueueManager_1->vtable->Release(m_UIQueueManager_1);
004111be              this->m_UIQueueManager = nullptr;
004111b7          }
004111a8      }
004111a8      
004111c8      class SmartBox* smartbox_ = this->smartbox_;
004111c8      
004111d0      if (smartbox_ != 0)
004111d3          SmartBox::Cleanup(smartbox_);
004111d3      
004111db      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004111db      
004111e3      if (ICIDM::s_cidm_1 != 0)
004111e5          ICIDM::s_cidm_1->vtable->UnregisterCallback(ICIDM::s_cidm_1, &this->vtable);
004111e5      
004111ee      Device::Cleanup();
004111f3      KeyStone::Cleanup();
004111f9      /* tailcall */
004111f9      return CoUninitialize();
00411170  }

004111ff                                                                                               90                                 .

00411200  void __fastcall Client::CleanupDatabase(class Client* this)

00411200  {
00411203      class CLCache* m_pDBCache = this->m_pDBCache;
00411203      
0041120b      if (m_pDBCache != 0)
0041120b      {
0041120d          m_pDBCache->vtable->Release(m_pDBCache);
00411212          this->m_pDBCache = nullptr;
0041120b      }
00411200  }

0041121e                                                                                            90 90                                ..

00411220  int32_t portal_new_handler(uint32_t arg1)

00411220  {
0041122a      PopupError("OUT OF MEMORY: Failed to allocat…", arg1);
00411232      DebugBreak();
0041123a      return 0;
00411220  }

0041123b                                                                                   90 90 90 90 90                             .....

00411240  void Client::CleanupPreferences(class Client* this @ ecx)

00411240  {
00411245      UserPreferences::UnregisterPreference(&Net_BindInterface);
0041124f      UserPreferences::UnregisterPreference(&Net_ComputeUniquePort);
00411259      UserPreferences::UnregisterPreference(&Net_UserSpecifiedPort);
00411261      CIme::CleanupPreferences();
00411266      UserPreferences::Save();
0041126b      /* tailcall */
0041126b      return UserPreferences::Cleanup();
00411240  }


00411270  uint8_t __fastcall Client::InitAuth(class Client* this)

00411270  {
00411280      NetAuthenticator::SetToAuthType(&this->m_netAuth, 1, &this->m_account, 0, nullptr);
00411285      int32_t eax_1;
00411285      eax_1 = 1;
00411287      return 1;
00411270  }

00411288                          90 90 90 90 90 90 90 90                                                          ........

00411290  uint8_t __fastcall Client::Disconnect(class Client* this)

00411290  {
0041129b      if (this->m_connected != 0)
0041129b      {
0041129d          class ClientNet* m_net = this->m_net;
0041129d          
004112a5          if (m_net != 0)
004112a7              ClientNet::LogOffServer(m_net);
004112a7          
004112ac          class DBCache* m_pDBCache = this->m_pDBCache;
004112b2          m_pDBCache->vtable->ResetCache(m_pDBCache);
004112b7          this->m_connected = 0;
0041129b      }
0041129b      
004112c1      return 1;
00411290  }

004112c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004112d0  void __fastcall Client::KeepUIAlive(class Client* this)

004112d0  {
004112d3      Timer::update_time();
004112dd      bool cond:0 = Device::DoEventLoop() == 0;
004112df      class ClientNet* m_net = this->m_net;
004112df      
004112e5      if (!(cond:0))
004112e8          /* tailcall */
004112e8          return ClientNet::AbortConnection(m_net);
004112e8      
004112ed      ClientNet::UseTime(m_net);
004112f8      struct AsyncCache::VTable** ecx_1 = &this->m_pDBCache->vtable;
004112e8      ADJ(ecx_1)->vtable->UseTime(ecx_1);
00411306      UIElementManager::UseTime(UIElementManager::s_pInstance);
00411311      SmartBox::UseTime(this->smartbox_);
00411316      SceneTool::PrepareGraphicsDevice();
0041131b      SceneTool::StartFrame();
00411326      SmartBox::Draw(this->smartbox_);
0041132d      SceneTool::EndFrame(1);
00411336      /* tailcall */
00411336      return Device::DoFrameSleep();
004112d0  }

0041133b                                                                                   90 90 90 90 90                             .....

00411340  int32_t Client::GetCharactersToWrapUsageTo(class Client* this @ ecx) __pure

00411340  {
00411343      return 0xffffffff;
00411340  }

00411344              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00411350  uint32_t __fastcall Client::GetNameRuleLanguage(class Client const* this)

00411350  {
00411350      class CLCache* m_pDBCache = this->m_pDBCache;
00411350      
00411358      if (m_pDBCache == 0)
00411366          return 1;
00411366      
00411360      return m_pDBCache->m_eNameRuleLanguage;
00411350  }

00411367                       90 90 90 90 90 90 90 90 90                                                         .........

00411370  float __fastcall LinkStatusHolder::GetPacketLossPercentage(class LinkStatusHolder const* this)

00411370  {
00411373      return ((int32_t)((long double)this->m_fPacketLoss));
00411370  }

00411374                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00411380  int32_t __thiscall LinkStatusHolder::GetConnectionStatus(class LinkStatusHolder const* this, int32_t* arg2)

00411380  {
0041138c      int32_t eax;
0041138c      eax = this->m_eLinkState == LinkStatus_Connected;
00411391      *(uint32_t*)arg2 = eax;
00411393      long double x87_r7_1;
00411393      
00411393      if (eax == 0)
004113a0          x87_r7_1 = ((long double)0.0);
00411393      else
0041139b          x87_r7_1 = (((long double)Timer::cur_time) - ((long double)this->m_tLastHeardFromCurServer));
0041139b      
004113a6      int32_t m_nodropKick = this->m_nodropKick;
004113a6      
004113ab      if (m_nodropKick != 0)
004113ab      {
004113ad          long double temp1_1 = ((long double)15.0);
004113ad          (x87_r7_1 - temp1_1);
004113b3          m_nodropKick = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
004113ab      }
004113ab      
004113c2      return m_nodropKick;
00411380  }

004113c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004113d0  void __thiscall LinkStatusHolder::OnHeartbeat(class LinkStatusHolder* this, class CLinkStatusAverages* arg2)

004113d0  {
004113de      *(uint32_t*)((char*)this->m_tLastHeardFromCurServer)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004113e5      this->m_tLastHeardFromCurServer = (*(uint32_t*)Timer::cur_time);
004113ed      this->m_fPacketLoss = ((float)CLinkStatusAverages::GetAveragePacketLoss(arg2));
004113d0  }

004113f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00411400  class UIFlow* ConstructClassObjectEx<UIFlow,Interface>(struct Turbine_GUID const* arg1)

00411400  {
00411419      int32_t var_8 = 0;
00411428      class TResult __return;
00411428      InterfaceSystem::CreateInstance(InterfaceSystem::GetInstance(), &__return, arg1, &Interface_InterfaceType, nullptr, &var_8);
00411439      int32_t eax_1;
00411439      eax_1 = __return < 0;
00411442      return ((eax_1 - 1) & var_8);
00411400  }

00411443           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00411450  uint32_t __thiscall NetError::Pack(class NetError* this, void** arg2, uint32_t arg3)

00411450  {
00411463      if ((arg3 >= this->vtable->GetPackSize(this) && arg3 >= 4))
00411463      {
0041146f          **(uint32_t**)arg2 = this->m_stringID;
00411473          void* edx_3 = (*(uint32_t*)arg2 + 4);
0041147c          *(uint32_t*)arg2 = edx_3;
0041147c          
0041147f          if ((arg3 - 4) >= 4)
0041147f          {
00411484              *(uint32_t*)edx_3 = this->m_tableID;
00411486              *(uint32_t*)arg2 += 4;
0041147f          }
00411463      }
00411463      
00411491      return this->vtable->GetPackSize(this);
00411450  }

00411494                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004114a0  int32_t __thiscall NetError::UnPack(class NetError* this, void** arg2, uint32_t arg3)

004114a0  {
004114ae      if (arg3 < this->vtable->GetPackSize(this))
004114b3          return 0;
004114b3      
004114b9      if (arg3 >= 4)
004114b9      {
004114c3          this->m_stringID = **(uint32_t**)arg2;
004114c8          void* edx_4 = (*(uint32_t*)arg2 + 4);
004114d1          *(uint32_t*)arg2 = edx_4;
004114d1          
004114d3          if ((arg3 - 4) >= 4)
004114d3          {
004114d7              this->m_tableID = *(uint32_t*)edx_4;
004114da              *(uint32_t*)arg2 += 4;
004114d3          }
004114b9      }
004114b9      
004114e3      return 1;
004114a0  }

004114e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004114f0  void __fastcall AC1Legacy::PStringBase<char>::PStringBase<char>(class AC1Legacy::PStringBase<char>* this)

004114f0  {
004114f0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004114fe      *(uint32_t*)this = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00411500      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004114f0  }

0041150a                                90 90 90 90 90 90                                                            ......

00411510  void __fastcall AC1Legacy::PStringBase<char>::break_reference(class AC1Legacy::PStringBase<char>* this)

00411510  {
00411514      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
00411514      
0041151a      if (m_buffer_1->m_cRef == 1)
0041151a      {
0041151d          m_buffer_1->m_hash = 0xffffffff;
00411525          return;
0041151a      }
0041151a      
0041152e      AC1Legacy::PStringBase<char>::allocate_ref_buffer(this, (m_buffer_1->m_len - 1));
00411533      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
00411535      uint32_t m_len = m_buffer->m_len;
00411543      int32_t esi_2;
00411543      int32_t edi_1;
00411543      edi_1 = __builtin_memcpy(&m_buffer->m_data, &m_buffer_1->m_data, ((m_len >> 2) << 2));
0041154e      __builtin_memcpy(edi_1, esi_2, (m_len & 3));
0041154e      
0041155d      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
0041155f          m_buffer_1->vtable->__vecDelDtor(m_buffer_1, 1);
00411510  }

0041156a                                90 90 90 90 90 90                                                            ......

00411570  void __fastcall Client::Cleanup(class Client* this)

00411570  {
00411573      this->vtable->Disconnect(this);
00411578      CCommunicationSystem::Cleanup();
0041157d      this->vtable->CleanupNet(this);
00411587      CLanguageInfoInterface::Shutdown();
0041158c      this->vtable->CleanupUI(this);
00411596      this->vtable->CleanupPreferences(this);
0041159d      class QualityRegistrar* m_qualityRegistrar = this->m_qualityRegistrar;
0041159d      
004115a5      if (m_qualityRegistrar != 0)
004115a7          m_qualityRegistrar->vtable->__vecDelDtor(m_qualityRegistrar, 1);
004115a7      
004115ad      class GlobalEventHandler* m_eventHandler = this->m_eventHandler;
004115b5      this->m_qualityRegistrar = nullptr;
004115b5      
004115bf      if (m_eventHandler != 0)
004115c1          m_eventHandler->vtable->__vecDelDtor(m_eventHandler, 1);
004115c1      
004115c7      this->m_eventHandler = nullptr;
004115d1      InterfaceSystem::GetInstance();
004115d6      class InterfaceSystem* InterfaceSystem::s_pInterfaceSystem_1 = InterfaceSystem::s_pInterfaceSystem;
004115d6      
004115de      if (InterfaceSystem::s_pInterfaceSystem_1 != 0)
004115de      {
004115e3          InterfaceSystem::~InterfaceSystem(InterfaceSystem::s_pInterfaceSystem_1);
004115e9          operator delete(InterfaceSystem::s_pInterfaceSystem_1);
004115f1          InterfaceSystem::s_pInterfaceSystem = nullptr;
004115fb          InterfaceSystem::s_bInterfaceSystemDestroyed = 1;
004115de      }
004115de      
00411603      this->vtable->CleanupDatabase(this);
0041160e      /* tailcall */
0041160e      return SoundManager::Cleanup();
00411570  }

00411613                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00411620  int32_t const __fastcall Client::GetLanguage(class Client const* this)

00411620  {
00411620      class Client* result = this;
00411624      class PSRefBufferCharData<char>* m_charbuffer = this->m_LanguageStr.m_charbuffer;
00411624      
0041162e      if (m_charbuffer->m_data[-4] != 1)
0041162e      {
00411635          class Client** var_10_1 = &result;
0041163e          InterlockedIncrement(&m_charbuffer[-1]);
0041163e          
00411654          if (EnumMapper::GetEnum(0xc, m_charbuffer, &result) != 0)
0041165e              return result;
0041162e      }
0041162e      
00411656      return this->m_Language;
00411620  }

0041165f                                                                                               90                                 .

00411660  uint8_t __thiscall Client::InitUI(class Client* this, class PStringBase<char> const* arg2)

00411660  {
00411665      CoInitialize(nullptr);
0041166b      KeyStone::Init();
00411680      int32_t ecx;
00411680      ecx = this->m_fWindowed != 0;
00411699      class UIFlow* eax_1;
00411699      
00411699      if (Device::Init(ecx, arg2, 0x320, 0x258, 1, (&PStringBase<char>::null_string)) != 0)
00411699      {
0041169b          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0041169b          
004116a3          if (ICIDM::s_cidm_1 != 0)
004116a5              ICIDM::s_cidm_1->vtable->RegisterInputMap(ICIDM::s_cidm_1, 0x10, &this->vtable, 0xffffffff);
004116a5          
004116b9          SoundManager::Init(Device::m_hWnd);
004116ca          class SmartBox* eax_4 = SmartBox::Init(this->netQueues_[0xa], 0);
004116d4          this->smartbox_ = eax_4;
004116d4          
004116da          if (eax_4 != 0)
004116da          {
004116f1              SmartBox::Hide(eax_4);
004116f6              UIElementManager::CreateUIElementManager();
004116fb              class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004116fb              
00411703              if (UIElementManager::s_pInstance_1 != 0)
00411705                  UIElementManager::Init(UIElementManager::s_pInstance_1);
00411705              
0041170f              eax_1 = ConstructClassObjectEx<UIFlow,Interface>(&UIFlow_ClassType);
00411719              this->m_ui = eax_1;
00411719              
0041171f              if (eax_1 != 0)
0041171f              {
00411721                  struct HWND__* Device::m_hWnd_1 = Device::m_hWnd;
00411727                  struct HWND__* Device::m_hWnd_2 = Device::m_hWnd_1;
00411728                  ArgumentParser::OnCommandLineEvaluationDone(Device::m_hWnd_1);
00411730                  int32_t eax_5;
00411730                  eax_5 = 1;
00411733                  return 1;
0041171f              }
004116da          }
004116da          else
004116e1              PopupError("FATAL ERROR: Cannot initialize t…");
00411699      }
00411699      
004116e9      eax_1 = 0;
004116ec      return 0;
00411660  }

00411736                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00411740  int32_t __thiscall Client::AddNetQueue(class Client* this, int16_t arg2)

00411740  {
00411745      void* eax = operator new(8);
0041174f      void* ecx;
0041174f      
0041174f      if (eax == 0)
00411762          ecx = nullptr;
0041174f      else
0041174f      {
00411751          *(uint32_t*)eax = 0;
00411757          *(uint32_t*)((char*)eax + 4) = 0;
0041175e          ecx = eax;
0041174f      }
0041174f      
00411772      void** eax_2 = (((int32_t)arg2) << 2);
00411775      *(uint32_t*)((char*)eax_2 + this->netQueues_) = ecx;
0041177e      class NIList<NetBlob *>* eax_3 = *(uint32_t*)((char*)eax_2 + this->netQueues_);
0041177e      
00411784      if (eax_3 == 0)
004117a3          return 0;
004117a3      
0041178e      PacketController::AddReceiveQueue(this->packControl_, arg2, eax_3);
0041179d      return 1;
00411740  }

004117a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004117b0  uint8_t __fastcall Client::Run(class Client* this)

004117b0  {
004117bf      void __return;
004117bf      class NetError* eax_1 = this->vtable->Connect(this, &__return);
004117bf      
004117d6      if ((ID_NetError_None.m_stringID == eax_1->m_stringID && ID_NetError_None.m_tableID == eax_1->m_tableID))
004117d6      {
004117e1          do
004117dc              eax_1 = this->vtable->UseTime(this);
004117e1           while (eax_1 != 0);
004117d6      }
004117d6      
004117e3      eax_1 = 0;
004117e9      return 0;
004117b0  }

004117ea                                90 90 90 90 90 90                                                            ......

004117f0  void __thiscall Client::SetLanguage(class Client* this, class PStringBase<char> const* arg2)

004117f0  {
004117f8      class PSRefBufferCharData<char>* m_charbuffer = this->m_LanguageStr.m_charbuffer;
004117f8      
00411800      if (m_charbuffer == arg2->m_charbuffer)
0041183a          return;
0041183a      
00411816      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0041181e          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0041181e      
00411820      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00411823      this->m_LanguageStr.m_charbuffer = m_charbuffer_1;
0041182e      arg2 = &m_charbuffer_1[-1];
00411832      /* tailcall */
00411832      return InterlockedIncrement();
004117f0  }

0041183d                                                                                         90 90 90                               ...

00411840  void __thiscall Client::OnDDDEvent(class Client* this, enum DDDEvent arg2, uint32_t arg3)

00411840  {
00411848      if (arg2 == DDD_PatchtimeEnd)
00411848      {
0041184a          CLanguageInfoInterface::Shutdown();
0041184f          class MasterProperty* m_object = MasterPropertyGrabber::s_spcMasterPropertyList.m_object;
0041184f          
00411857          if (m_object != 0)
00411857          {
00411859              m_object->vtable->Release(m_object);
0041185e              MasterPropertyGrabber::s_spcMasterPropertyList.m_object = 0;
00411857          }
00411857          
00411870          DBCache::FlushFreeObjects(DBCache::s_pCache, 0);
0041187d          DBCache::FlushFreeObjects(DBCache::s_pCache, 0);
0041188a          DBCache::FlushFreeObjects(DBCache::s_pCache, 0);
0041188f          class DiskConBase* ecx_3 = CLanguageInfoInterface::Startup();
0041188f          
0041189b          if (DiskConBase::Close(ecx_3) != 0)
0041189d              IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx_3);
0041189d          
004118a2          class GlobalEventHandler* m_eventHandler = this->m_eventHandler;
004118a2          
004118aa          if (m_eventHandler != 0)
004118b1              SmartBox::SetRegion(m_eventHandler, arg3);
00411848      }
00411840  }

004118ba                                                                                90 90 90 90 90 90                            ......

004118c0  void __fastcall Client::ProcessLogonEventQueue(class Client* this)

004118c0  {
004118c0      class Client* this_1 = this;
004118c1      class NIList<NetBlob *>* m_logonEventQueue = this->m_logonEventQueue;
004118c1      
004118d6      if ((m_logonEventQueue != 0 && m_logonEventQueue->head_ != 0))
004118d6      {
00411955          do
00411955          {
004118e0              class NIListElement<NetBlob *>* head_ = m_logonEventQueue->head_;
004118e4              class NetBlob* data_;
004118e4              
004118e4              if (head_ != 0)
004118e4              {
004118ea                  class NIListElement<NetBlob *>* next_ = head_->next_;
004118ef                  m_logonEventQueue->head_ = next_;
004118ef                  
004118f1                  if (next_ == 0)
004118f3                      m_logonEventQueue->tail_ = next_;
004118f3                  
004118f6                  data_ = head_->data_;
004118f9                  operator delete(head_);
004118e4              }
004118e4              else
004118e6                  data_ = nullptr;
004118e6              
00411901              uint8_t* buf_ = data_->buf_;
00411901              
00411914              if ((buf_ != 0 && (data_->bufSize_ >= 4 && *(uint32_t*)buf_ == 0xf7de)))
00411914              {
00411916                  int32_t edi_1 = *(uint32_t*)(buf_ + 4);
0041191c                  CCommunicationSystem::GetChatManager();
00411921                  struct IChatClient* eax = AC1ClientChatManager::GetIChatClient();
00411921                  
00411928                  if (eax != 0)
00411928                  {
0041192a                      struct IChatNetworkSink* vtable = eax->vtable;
0041192c                      void* var_14_2 = &buf_[8];
0041192d                      int32_t var_18_1 = edi_1;
0041192f                      *(int32_t*)((char*)vtable + 0xc)(vtable, eax);
00411928                  }
00411914              }
00411914              
0041193e              if (InterlockedDecrement(&data_->m_cRef) == 0)
00411940                  data_->vtable->__vecDelDtor(data_, 1);
00411940              
0041194c              m_logonEventQueue = this->m_logonEventQueue;
00411955          } while (m_logonEventQueue->head_ != 0);
004118d6      }
004118c0  }

0041195c                                                                                      90 90 90 90                              ....

00411960  void __thiscall LinkStatusHolder::OnNetStatusChange(class LinkStatusHolder* this, enum NetStatus arg2, int32_t arg3, int32_t arg4)

00411960  {
00411967      switch (arg2)
00411967      {
00411974          case Net_Initializing:
00411974          {
00411974              this->m_eLinkState = LinkStatus_Initialized;
0041197b              this->m_fConnectionProgress = 0.100000001f;
00411974              break;
00411974          }
00411999          case Net_LoginAuthenticating:
00411999          {
00411999              this->m_fConnectionProgress = ((float)(((((long double)arg3) * ((long double)0.5f)) / ((long double)arg4)) + ((long double)0.100000001f)));
00411999              break;
00411999          }
004119a9          case Net_LoginConnecting:
004119a9          {
004119a9              long double x87_r7_7 = ((((long double)arg3) * ((long double)0.0300000012f)) + ((long double)0.600000024f));
004119af              this->m_fConnectionProgress = ((float)x87_r7_7);
004119b2              long double temp1_1 = ((long double)0.899999976f);
004119b2              (x87_r7_7 - temp1_1);
004119b8              enum NetStatus eax;
004119b8              eax = ((((x87_r7_7 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004119b8              
004119bd              if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
004119bf                  __builtin_strncpy(&this->m_fConnectionProgress, "fff?", 4);
004119a9              break;
004119a9          }
004119c9          case Net_LoginConnected:
004119c9          {
004119c9              this->m_fConnectionProgress = 1f;
004119d0              this->m_eLinkState = LinkStatus_Connected;
004119dc              this->m_errFinal.m_stringID = ID_NetError_None.m_stringID;
004119e5              this->m_errFinal.m_tableID = ID_NetError_None.m_tableID;
004119f3              this->m_tLastHeardFromCurServer = (*(uint32_t*)Timer::cur_time);
004119f6              *(uint32_t*)((char*)this->m_tLastHeardFromCurServer)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004119c9              break;
004119c9          }
00411a03          case Net_LoginConnectionError:
00411a03          {
00411a03              this->m_errFinal.m_stringID = *(uint32_t*)(arg3 + 4);
00411a09              this->m_errFinal.m_tableID = *(uint32_t*)(arg3 + 8);
00411a0c              this->m_eLinkState = LinkStatus_Disconnected;
00411a03              break;
00411a03          }
00411967      }
00411960  }

00411a16                                                                    8b ff                                                ..
00411a18  uint32_t jump_table_411a18[0x5] = 
00411a18  {
00411a18      [0x0] =  0x00411974
00411a1c      [0x1] =  0x00411985
00411a20      [0x2] =  0x0041199f
00411a24      [0x3] =  0x004119c9
00411a28      [0x4] =  0x004119fc
00411a2c  }

00411a2c                                      90 90 90 90                                                              ....

00411a30  void __thiscall UserPreferences::RegisterPreference(class UserPreferences* this, uint8_t* arg2, class PStringBase<char> const* arg3, class PStringBase<char> const* arg4, void (* arg5)(class PStringBase<char> const*), uint32_t const arg6, class PStringBase<char>* arg7, uint32_t const* arg8)

00411a30  {
00411a33      uint8_t* esi = arg2;
00411a33      
00411a37      if (this != 0)
00411a56          GlobalRegistry::RegisterVariableInternal(this, GRVDataType_Bool, esi, arg3, arg4, arg5, arg6, arg7);
00411a56      
00411a5e      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00411a5e      
00411a65      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00411a65      {
00411a6c          void* eax_4 = operator new(0x8100);
00411a6c          
00411a76          if (eax_4 == 0)
00411a81              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00411a76          else
00411a7a              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_4);
00411a7a          
00411a83          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00411a65      }
00411a65      
00411a98      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, esi, &arg2) != 0)
00411a98      {
00411aa0          void* eax_6 = *(uint32_t*)(*(uint32_t*)arg2 + 0x44)();
00411aa0          
00411aa5          if (eax_6 != 0)
00411aa7              *(uint8_t*)((char*)eax_6 + 0x28) = 1;
00411a98      }
00411a30  }

00411aae                                            90 90                                                                ..

00411ab0  void __fastcall NetAuthenticator::~NetAuthenticator(class NetAuthenticator* this)

00411ab0  {
00411ab9      operator delete[](this->m_ExtraData.m_pBuf);
00411abe      this->m_ExtraData.m_pBuf = 0;
00411ac9      operator delete[](this->m_CryptoData.m_pBuf);
00411ad4      this->m_CryptoData.m_pBuf = 0;
00411adb      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_AccountToLogonAs.m_buffer;
00411adb      
00411aed      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00411aef          m_buffer->vtable->__vecDelDtor(m_buffer, 1);
00411aef      
00411af7      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_Account.m_buffer;
00411af7      
00411b06      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00411b08          m_buffer_1->vtable->__vecDelDtor(m_buffer_1, 1);
00411b08      
00411b11      this->vtable = 0x79285c;
00411ab0  }

00411b1a                                                                                90 90 90 90 90 90                            ......

00411b20  uint8_t __fastcall Client::InitNet(class Client* this)

00411b20  {
00411b28      void* eax = operator new(0x8cd0);
00411b32      class ClientNet* eax_1;
00411b32      
00411b32      if (eax == 0)
00411b3d          eax_1 = nullptr;
00411b32      else
00411b36          eax_1 = ClientNet::ClientNet(eax);
00411b36      
00411b41      this->m_net = eax_1;
00411b41      
00411b47      if (eax_1 == 0)
00411b47      {
00411b4e          PopupError("FATAL ERROR: Client can't initia…");
00411b56          int32_t eax_2;
00411b56          eax_2 = 0;
00411b59          return 0;
00411b47      }
00411b47      
00411b5c      void* eax_3;
00411b5c      class ClientNet* edx;
00411b5c      eax_3 = operator new(0x70);
00411b66      class PacketController* eax_4;
00411b66      
00411b66      if (eax_3 == 0)
00411b78          eax_4 = nullptr;
00411b66      else
00411b66      {
00411b6e          class ClientNet* m_net = this->m_net;
00411b71          eax_4 = PacketController::PacketController(eax_3, edx);
00411b66      }
00411b66      
00411b7c      this->packControl_ = eax_4;
00411b7c      
00411b82      if (eax_4 == 0)
00411b82      {
00411b89          PopupError("FATAL ERROR: Client can't alloca…");
00411b91          int32_t eax_5;
00411b91          eax_5 = 0;
00411b94          return 0;
00411b82      }
00411b82      
00411b97      void* eax_6 = operator new[](0x30);
00411ba1      this->netQueues_ = eax_6;
00411ba1      
00411ba7      if (eax_6 == 0)
00411ba7      {
00411bae          PopupError("FATAL ERROR: Client can't alloca…");
00411bb6          int32_t eax_7;
00411bb6          eax_7 = 0;
00411bb9          return 0;
00411ba7      }
00411ba7      
00411bd3      for (int32_t* i = nullptr; i < 0x30; i = &i[1])
00411bc6          *(uint32_t*)((char*)i + this->netQueues_) = 0;
00411bc6      
00411be0      if (((((Client::AddNetQueue(this, 2) != 0 && Client::AddNetQueue(this, 0xa) != 0) && Client::AddNetQueue(this, 9) != 0) && Client::AddNetQueue(this, 4) != 0) && Client::AddNetQueue(this, 5) != 0))
00411be0      {
00411c1f          this->m_logonEventQueue = this->netQueues_[4];
00411c25          class NIList<NetBlob *>** eax_13;
00411c25          eax_13 = 1;
00411c28          return 1;
00411be0      }
00411be0      
00411c2e      PopupError("FATAL ERROR: Client CANNOT add a…");
00411c36      int32_t eax_14;
00411c36      eax_14 = 0;
00411c39      return 0;
00411b20  }

00411c3a                                                                                90 90 90 90 90 90                            ......

00411c40  uint8_t __fastcall Client::UseTime(class Client* this)

00411c40  {
00411c43      Timer::update_time();
00411c43      
00411c4f      if (Device::DoEventLoop() != 0)
00411c54          return 0;
00411c54      
00411c5b      ClientNet::UseTime(this->m_net);
00411c62      Client::ProcessLogonEventQueue(this);
00411c6d      PacketController::UseTime(this->packControl_);
00411c78      struct AsyncCache::VTable** ecx_3 = &this->m_pDBCache->vtable;
00411c51      ADJ(ecx_3)->vtable->UseTime(ecx_3);
00411c86      UIElementManager::UseTime(UIElementManager::s_pInstance);
00411c91      SmartBox::UseTime(this->smartbox_);
00411c96      SceneTool::PrepareGraphicsDevice();
00411c9b      SceneTool::StartFrame();
00411ca6      SmartBox::Draw(this->smartbox_);
00411cad      SceneTool::EndFrame(1);
00411cb5      Device::DoFrameSleep();
00411cba      int32_t eax_3;
00411cba      eax_3 = 1;
00411cbd      return 1;
00411c40  }

00411cbe                                                                                            90 90                                ..

00411cc0  void* __thiscall CDDDStatusPlugin::`scalar deleting destructor'(class CDDDStatusPlugin* this, uint32_t arg2)

00411cc0  {
00411cc3      class CPluginManager* m_pManager = this->m_pManager;
00411cc8      this->vtable = 0x794538;
00411cc8      
00411cce      if (m_pManager != 0)
00411cce      {
00411cd1          CPluginManager::RemovePluginPrototype(m_pManager, this);
00411cd6          this->m_pManager = nullptr;
00411cce      }
00411cce      
00411ce2      if ((arg2 & 1) != 0)
00411ce5          operator delete(this);
00411ce5      
00411cf0      return this;
00411cc0  }

00411cf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00411d00  void __fastcall Client::CleanupNet(class Client* this)

00411d00  {
00411d00      class Client* var_4 = this;
00411d05      class ClientNet* m_net_1 = this->m_net;
00411d05      
00411d10      if (m_net_1 != 0)
00411d12          ClientNet::LogOffServer(m_net_1);
00411d12      
00411d17      class PacketController* packControl_ = this->packControl_;
00411d17      
00411d1f      if (packControl_ != 0)
00411d1f      {
00411d23          PacketController::~PacketController(packControl_);
00411d29          operator delete(packControl_);
00411d1f      }
00411d1f      
00411d31      class ClientNet* m_net = this->m_net;
00411d39      this->packControl_ = nullptr;
00411d39      
00411d3f      if (m_net != 0)
00411d41          m_net->vtable->__vecDelDtor(&m_net->vtable, 1);
00411d41      
00411d4d      bool cond:2 = this->netQueues_ == 0;
00411d53      this->m_net = nullptr;
00411d53      
00411d59      if (!(cond:2))
00411d59      {
00411d5f          class Client* i = nullptr;
00411d61          var_4 = nullptr;
00411d61          
00411dff          do
00411dff          {
00411d76              int32_t* edi_1 = *(uint32_t*)((char*)i + this->netQueues_);
00411d76              
00411d7b              if (edi_1 != 0)
00411d7b              {
00411d7d                  int32_t** eax_1 = *(uint32_t*)edi_1;
00411d81                  int32_t* j;
00411d81                  
00411d81                  if (eax_1 != 0)
00411d81                  {
00411d87                      int32_t ecx_3 = eax_1[1];
00411d8c                      *(uint32_t*)edi_1 = ecx_3;
00411d8c                      
00411d8e                      if (ecx_3 == 0)
00411d90                          edi_1[1] = 0;
00411d90                      
00411d93                      j = *(uint32_t*)eax_1;
00411d96                      operator delete(eax_1);
00411d81                  }
00411d81                  else
00411d83                      j = nullptr;
00411d83                  
00411da0                  while (j != 0)
00411da0                  {
00411db2                      if ((InterlockedDecrement(&j[1]) == 0 && j != 0))
00411dba                          **(uint32_t**)j(1);
00411dba                      
00411dbc                      int32_t** eax_4 = *(uint32_t*)edi_1;
00411dbc                      
00411dc0                      if (eax_4 != 0)
00411dc0                      {
00411dc6                          int32_t ecx_5 = eax_4[1];
00411dcb                          *(uint32_t*)edi_1 = ecx_5;
00411dcb                          
00411dcd                          if (ecx_5 == 0)
00411dcf                              edi_1[1] = 0;
00411dcf                          
00411dd2                          j = *(uint32_t*)eax_4;
00411dd5                          operator delete(eax_4);
00411dc0                      }
00411dc0                      else
00411dc2                          j = nullptr;
00411da0                  }
00411da0                  
00411de3                  NIList<NetBlob *>::DeleteContents(edi_1);
00411de9                  operator delete(edi_1);
00411dee                  i = var_4;
00411d7b              }
00411d7b              
00411df5              i = &i->vtable;
00411dfb              var_4 = i;
00411dff          } while (i < 0x30);
00411dff          
00411e0c          operator delete[](this->netQueues_);
00411d59      }
00411d00  }

00411d68                          8d a4 24 00 00 00 00 90                                                          ..$.....
00411e1a                                                                                90 90 90 90 90 90                            ......

00411e20  uint8_t __thiscall Client::Init(class Client* this, class PStringBase<char> const* arg2, int32_t const arg3, int32_t const arg4)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00411e20  {
00411e2d      int32_t edi;
00411e2d      int32_t var_a8 = edi;
00411e35      _set_new_handler(portal_new_handler);
00411e4a      class GlobalEventHandler* eax_1;
00411e4a      
00411e4a      if (this->vtable->IsAlreadyRunning(this) == 0)
00411e4a      {
00411e57          int32_t s;
00411e57          __builtin_memset(&s, 0, 0x94);
00411e5d          int32_t* lpVersionInformation = &s;
00411e5e          s = 0x94;
00411e75          int32_t var_90;
00411e75          
00411e75          if ((GetVersionExA(lpVersionInformation) != 0 && var_90 != 1))
00411e6e              goto label_411ec9;
00411e6e          
00411e7c          HINSTANCE hLibModule;
00411e7c          int32_t ecx_1;
00411e7c          hLibModule = LoadLibraryA("unicows.dll");
00411e84          uint16_t* var_b4;
00411e84          int32_t var_b0;
00411e84          
00411e84          if (hLibModule != 0)
00411e84          {
00411ec3              FreeLibrary(hLibModule);
00411ec9          label_411ec9:
00411ec9              Timer::Init();
00411ece              Random::Seed();
00411ed3              eax_1 = CFactory::MakeGlobalEventHandler();
00411eda              this->m_eventHandler = eax_1;
00411eda              
00411ee0              if (eax_1 != 0)
00411ee0              {
00411ee2                  eax_1 = CFactory::MakeQualityRegistrar();
00411ee9                  this->m_qualityRegistrar = eax_1;
00411ee9                  
00411eef                  if (eax_1 != 0)
00411eef                  {
00411ef1                      this->vtable->InitPreferences(this);
00411ef1                      
00411f01                      if (this->vtable->InitNet(this) != 0)
00411f01                      {
00411f09                          struct Client::VTable* vtable = this->vtable;
00411f0d                          eax_1 = this->m_fReadOnlyDatFiles != 0;
00411f10                          uint8_t var_ac_3 = eax_1;
00411f14                          var_b0 = arg4;
00411f15                          var_b4 = arg3;
00411f15                          
00411f1d                          if ((vtable->InitDatabase(this, var_b4, var_b0, var_ac_3) != 0 && CLanguageInfoInterface::Startup() != 0))
00411f3d                              return this->vtable->InitUI(this, arg2) != 0;
00411f01                      }
00411eef                  }
00411ee0              }
00411e84          }
00411e84          else
00411e84          {
00411e86              HINSTANCE hLibModule_1 = hLibModule;
00411e87              var_b0 = ecx_1;
00411e8a              var_b4 = &data_794320;
00411e94              var_b4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_b0, var_b4);
00411e97              uint16_t* var_b8 = &data_794320;
00411ea1              var_b8 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_b4, var_b8);
00411ea9              uint16_t eax_3;
00411ea9              class PStringBase<unsigned short> ecx_7;
00411ea9              class PStringBase<unsigned short> edx_1;
00411ea9              eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_b8, u"UnicoWS.dll");
00411eb0              PlatformString::DisplayString(eax_3, edx_1, ecx_7, 0x6d, var_b8);
00411e84          }
00411e4a      }
00411e4a      
00411eb8      eax_1 = 0;
00411ebf      return 0;
00411e20  }


00411f40  uint8_t __fastcall Client::IsAlreadyRunning(class Client* this)

00411f40  {
00411f41      char const* const lpName = "Empyrean Client";
00411f46      int32_t lMaximumCount = 1;
00411f48      int32_t lInitialCount = 0;
00411f4a      struct SECURITY_ATTRIBUTES* lpSemaphoreAttributes = nullptr;
00411f54      this->m_running_check.m_UniqueClientSemaphore = CreateSemaphoreA(lpSemaphoreAttributes, lInitialCount, lMaximumCount, lpName);
00411f5a      enum WIN32_ERROR eax_1;
00411f5a      int32_t lMaximumCount_1;
00411f5a      eax_1 = GetLastError();
00411f5a      
00411f65      if (eax_1 != ERROR_ALREADY_EXISTS)
00411f65      {
00411fa1          eax_1 = 0;
00411fa4          return 0;
00411f65      }
00411f65      
00411f67      int32_t var_8 = 0;
00411f69      lMaximumCount = lMaximumCount_1;
00411f6c      lInitialCount = 0x794320;
00411f76      lInitialCount = PStringBase<unsigned short>::PStringBase<unsigned short>(&lMaximumCount, lInitialCount);
00411f79      lpSemaphoreAttributes = &data_794320;
00411f83      lpSemaphoreAttributes = PStringBase<unsigned short>::PStringBase<unsigned short>(&lInitialCount, lpSemaphoreAttributes);
00411f8b      uint16_t eax_2;
00411f8b      class PStringBase<unsigned short> ecx_5;
00411f8b      class PStringBase<unsigned short> edx;
00411f8b      eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&lpSemaphoreAttributes, &data_794320);
00411f95      PlatformString::DisplayString(eax_2, edx, ecx_5, 0xcc, lpSemaphoreAttributes);
00411f9d      int32_t eax_3;
00411f9d      eax_3 = 1;
00411fa0      return 1;
00411f40  }

00411fa5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00411fb0  uint8_t __fastcall Client::InitPreferences(class Client* this)

00411fb0  {
00411fb0      class Client* this_1 = this;
00411fbc      UserPreferences::Initialize(0, &this->m_preferencesFile);
00411fc4      UserPreferences::Load();
00411fd2      PStringBase<char>::PStringBase<char>(&this_1, "Network Bind Interface");
00411fef      uint32_t* edi;
00411fef      UserPreferences::RegisterPreference(&this->m_strPreferenceBindInterface.m_charbuffer, &Net_BindInterface, &this_1, nullptr, nullptr, 0, nullptr, edi);
00411ffe      void* __offset(Client, -0x14) edi_2 = ((char*)this_1 - 0x14);
00411ffe      
0041200d      if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
00412015          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
00412015      
00412020      PStringBase<char>::PStringBase<char>(&this_1, "Flag to compute a unique port");
0041203d      UserPreferences::RegisterPreference(&this->m_bPreferenceComputeUniquePort, &Net_ComputeUniquePort, &this_1, nullptr, nullptr, 0, nullptr);
00412046      void* __offset(Client, -0x14) edi_4 = ((char*)this_1 - 0x14);
00412046      
00412055      if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
0041205d          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
0041205d      
00412068      PStringBase<char>::PStringBase<char>(&this_1, "The user specified port");
00412085      UserPreferences::RegisterPreference(&this->m_nPreferenceUserSpecifiedPort, &Net_UserSpecifiedPort, &this_1, nullptr, nullptr, 0, nullptr);
0041208e      void* __offset(Client, -0x14) esi_2 = ((char*)this_1 - 0x14);
0041208e      
0041209d      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004120a5          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004120a5      
004120a7      CIme::InitPreferences();
004120ae      int32_t eax_7;
004120ae      eax_7 = 1;
004120b2      return 1;
00411fb0  }

004120b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004120c0  void __fastcall Client::BuildCommandLineArgs(class Client* this, class ArgumentParser::CommandLineArgList* arg2)

004120c0  {
004120d2      class PStringBase<char> var_4;
004120d2      PStringBase<char>::PStringBase<char>(&var_4, "<string>: Specifies the account …");
004120e0      class PStringBase<char> var_8;
004120e0      PStringBase<char>::PStringBase<char>(&var_8, "account");
004120e5      class ArgumentParser::CommandLineArgList* ebx = arg2;
004120ff      ArgumentParser::CommandLineArgList::AddCmd(ebx, 2, 0x61, &var_8, &var_4, nullptr, 0, 0);
0041210e      int32_t* edi_1 = (var_8 - 0x14);
0041210e      
0041211d      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00412125          **(uint32_t**)edi_1(1);
00412125      
0041212b      int32_t* edi_3 = (var_4 - 0x14);
0041212b      
0041213a      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00412142          **(uint32_t**)edi_3(1);
00412142      
0041214d      PStringBase<char>::PStringBase<char>(&var_4, "<32 bitfield>: Controls what kin…");
0041215b      PStringBase<char>::PStringBase<char>(&arg2, "debug");
00412176      ArgumentParser::CommandLineArgList::AddCmd(ebx, 2, 0, &arg2, &var_4, nullptr, 0, 0);
0041217f      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_5 = ((char*)arg2 - 0x14);
0041217f      
0041218e      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
00412196          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
00412196      
0041219c      int32_t* edi_7 = (var_4 - 0x14);
0041219c      
004121ab      if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
004121b3          **(uint32_t**)edi_7(1);
004121b3      
004121be      PStringBase<char>::PStringBase<char>(&var_4, "[host/IP]:Specifies where to fin…");
004121cc      PStringBase<char>::PStringBase<char>(&arg2, "host");
004121ec      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x32, 0x68, &arg2, &var_4, &this->m_LanguageStr, 0, 0);
004121f5      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_9 = ((char*)arg2 - 0x14);
004121f5      
00412204      if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
0041220c          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_9) + -0x14)(1);
0041220c      
00412212      int32_t* edi_11 = (var_4 - 0x14);
00412212      
00412221      if ((InterlockedDecrement(&edi_11[1]) == 0 && edi_11 != 0))
00412229          **(uint32_t**)edi_11(1);
00412229      
00412234      PStringBase<char>::PStringBase<char>(&var_4, "<string>: Language to run the cl…");
00412242      PStringBase<char>::PStringBase<char>(&arg2, "language");
00412262      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x32, 0, &arg2, &var_4, &this->m_pPrimer, 0, 0);
0041226b      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_13 = ((char*)arg2 - 0x14);
0041226b      
0041227a      if ((InterlockedDecrement(((char*)edi_13 + 4)) == 0 && edi_13 != 0))
00412282          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_13) + -0x14)(1);
00412282      
00412288      int32_t* edi_15 = (var_4 - 0x14);
00412288      
00412297      if ((InterlockedDecrement(&edi_15[1]) == 0 && edi_15 != 0))
0041229f          **(uint32_t**)edi_15(1);
0041229f      
004122aa      PStringBase<char>::PStringBase<char>(&var_4, "<1-65535>: Specify the outgoing …");
004122b8      PStringBase<char>::PStringBase<char>(&arg2, "outport");
004122d8      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x22, 0x71, &arg2, &var_4, &this->m_port, 0, 0);
004122e1      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_17 = ((char*)arg2 - 0x14);
004122e1      
004122f0      if ((InterlockedDecrement(((char*)edi_17 + 4)) == 0 && edi_17 != 0))
004122f8          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_17) + -0x14)(1);
004122f8      
004122fe      int32_t* edi_19 = (var_4 - 0x14);
004122fe      
0041230d      if ((InterlockedDecrement(&edi_19[1]) == 0 && edi_19 != 0))
00412315          **(uint32_t**)edi_19(1);
00412315      
00412320      PStringBase<char>::PStringBase<char>(&var_4, "<1-65535>: Specify the server po…");
0041232e      PStringBase<char>::PStringBase<char>(&arg2, "port");
0041234e      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x22, 0x70, &arg2, &var_4, &this->m_noflowqueue, 0, 0);
00412357      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_21 = ((char*)arg2 - 0x14);
00412357      
00412366      if ((InterlockedDecrement(((char*)edi_21 + 4)) == 0 && edi_21 != 0))
0041236e          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_21) + -0x14)(1);
0041236e      
00412374      int32_t* edi_23 = (var_4 - 0x14);
00412374      
00412383      if ((InterlockedDecrement(&edi_23[1]) == 0 && edi_23 != 0))
0041238b          **(uint32_t**)edi_23(1);
0041238b      
00412396      PStringBase<char>::PStringBase<char>(&var_4, "<string>: Specify the preference…");
004123a4      PStringBase<char>::PStringBase<char>(&arg2, "prefs");
004123c1      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x32, 0, &arg2, &var_4, &this->m_FullOutputText, 0, 0);
004123ca      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_25 = ((char*)arg2 - 0x14);
004123ca      
004123d9      if ((InterlockedDecrement(((char*)edi_25 + 4)) == 0 && edi_25 != 0))
004123e1          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_25) + -0x14)(1);
004123e1      
004123e7      int32_t* edi_27 = (var_4 - 0x14);
004123e7      
004123f6      if ((InterlockedDecrement(&edi_27[1]) == 0 && edi_27 != 0))
004123fe          **(uint32_t**)edi_27(1);
004123fe      
00412409      PStringBase<char>::PStringBase<char>(&var_4, "Opens the DAT files readonly");
00412417      PStringBase<char>::PStringBase<char>(&arg2, "rodat");
00412432      ArgumentParser::CommandLineArgList::AddCmd(ebx, 3, 0, &arg2, &var_4, nullptr, 0, 0);
0041243b      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_29 = ((char*)arg2 - 0x14);
0041243b      
0041244a      if ((InterlockedDecrement(((char*)edi_29 + 4)) == 0 && edi_29 != 0))
00412452          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_29) + -0x14)(1);
00412452      
00412458      int32_t* edi_31 = (var_4 - 0x14);
00412458      
00412467      if ((InterlockedDecrement(&edi_31[1]) == 0 && edi_31 != 0))
0041246f          **(uint32_t**)edi_31(1);
0041246f      
0041247a      PStringBase<char>::PStringBase<char>(&var_4, "Enables the use of the memory ma…");
00412488      PStringBase<char>::PStringBase<char>(&arg2, "usemem");
004124a5      ArgumentParser::CommandLineArgList::AddCmd(ebx, 0x11, 0, &arg2, &var_4, &this->m_fWindowed, 1, 0);
004124ae      void* __offset(ArgumentParser::CommandLineArgList, -0x14) edi_33 = ((char*)arg2 - 0x14);
004124ae      
004124bd      if ((InterlockedDecrement(((char*)edi_33 + 4)) == 0 && edi_33 != 0))
004124c5          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_33) + -0x14)(1);
004124c5      
004124cb      int32_t* edi_35 = (var_4 - 0x14);
004124cb      
004124da      if ((InterlockedDecrement(&edi_35[1]) == 0 && edi_35 != 0))
004124e2          **(uint32_t**)edi_35(1);
004120c0  }

004124ee                                            90 90                                                                ..

004124f0  uint8_t __thiscall Client::EvaluateCommandLineArg(class Client* this, struct CommandLineArg const* arg2, class PStringBase<char> const* arg3)

004124f0  {
004124f8      struct CommandLineArg* esi = arg2;
00412502      int32_t m_port = ArgumentParser::EvaluateCommandLineArg(this, esi, arg3);
00412509      arg2 = m_port;
00412509      
0041250d      if (m_port != 0)
0041250d      {
0041251f          class PStringBase<unsigned short> var_4;
0041251f          PStringBase<char>::PStringBase<char>(&var_4, "account");
0041252e          uint8_t eax_1 = PStringBase<char>::operator==(&esi->LongVersion, &var_4);
0041253d          int32_t* edi_2 = (var_4 - 0x14);
00412544          int32_t ebx;
00412544          ebx = eax_1;
00412544          
0041254e          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00412556              **(uint32_t**)edi_2(1);
00412556          
0041255a          if (ebx != 0)
0041255a          {
0041256c              AC1Legacy::PStringBase<char>::set(&this->m_fReadOnlyDatFiles, arg3->m_charbuffer);
00412573              AC1Legacy::PStringBase<char>::break_reference(&this->m_fReadOnlyDatFiles);
0041257e              _strlwr((this->m_fReadOnlyDatFiles + 0x14));
00412592              return arg2;
0041255a          }
0041255a          
0041259e          PStringBase<char>::PStringBase<char>(&var_4, "debug");
004125aa          uint8_t eax_7 = PStringBase<char>::operator==(&esi->LongVersion, &var_4);
004125b3          int32_t* edi_4 = (var_4 - 0x14);
004125ba          ebx = eax_7;
004125ba          
004125c4          if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
004125cc              **(uint32_t**)edi_4(1);
004125cc          
004125d0          if (ebx != 0)
004125d0          {
004125d6              class PSRefBufferCharData<char>* m_charbuffer = arg3->m_charbuffer;
004125e3              *(uint32_t*)_errno() = 0;
004125e9              int32_t eax_11 = strtoul(m_charbuffer, 0, 0);
004125f4              Turbine::Debug::SetDebugFlags(eax_11, 1);
004125fe              Turbine::Debug::SetDebugFlags(!(eax_11), 0);
00412611              return arg2;
004125d0          }
004125d0          
0041261d          PStringBase<char>::PStringBase<char>(&var_4, "logfile");
00412632          ebx = PStringBase<char>::operator==(&esi->LongVersion, &var_4);
00412634          int32_t* edi_6 = (var_4 - 0x14);
00412634          
00412643          if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
0041264b              **(uint32_t**)edi_6(1);
0041264b          
0041264f          if (ebx == 0)
0041264f          {
0041265e              PStringBase<char>::PStringBase<char>(&var_4, "outport");
00412673              ebx = PStringBase<char>::operator==(&esi->LongVersion, &var_4);
00412675              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
00412675              
0041267c              if (ebx == 0)
0041267c              {
004126cc                  PStringBase<char>::PStringBase<char>(&var_4, "rodat");
004126e1                  ebx = PStringBase<char>::operator==(&esi->LongVersion, &var_4);
004126e3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
004126e3                  
004126ea                  if (ebx != 0)
004126ea                  {
004126fe                      int32_t ecx_22;
004126fe                      ecx_22 = *(uint32_t*)(*(uint32_t*)arg3 - 4) == 1;
00412701                      this->m_fUseMemoryManager = ecx_22;
004126ea                  }
0041267c              }
0041267c              else
0041267c              {
00412682                  m_port = this->m_port;
00412682                  
00412692                  if ((m_port < 1 || m_port > 0xffff))
00412692                  {
0041269d                      PStringBase<char>::PStringBase<char>(&arg3, "Client port must be between 1 an…");
004126a8                      class PStringBase<char> const** var_1c_10 = &arg3;
004126a2                      this->vtable->Cleanup(this);
004126b2                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
004126ba                      int32_t eax_16;
004126ba                      eax_16 = 0;
004126c0                      return 0;
00412692                  }
0041267c              }
0041264f          }
0041264f          
00412704          m_port = arg2;
0041250d      }
0041250d      
0041270f      return m_port;
004124f0  }

00412712                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00412720  void __fastcall Client::FinishOutputText(class Client* this)

00412720  {
00412720      int32_t var_4 = 0;
00412722      class Client* this_1 = this;
00412725      uint16_t* var_c = &data_794320;
0041272f      var_c = PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, var_c);
00412732      uint16_t* var_10 = &data_794320;
0041273c      var_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, var_10);
00412744      uint16_t eax;
00412744      class PStringBase<unsigned short> ecx_5;
00412744      class PStringBase<unsigned short> edx;
00412744      eax = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, &data_794320);
0041274e      PlatformString::DisplayString(eax, edx, ecx_5, 0xcd, var_10);
00412720  }

00412757                                                                       90 90 90 90 90 90 90 90 90                         .........

00412760  uint8_t __thiscall Client::RemoveDDDStatusPlugin(class Client* this, class CDDDStatusPlugin* arg2)

00412760  {
00412760      class CLCache* m_pDBCache = this->m_pDBCache;
00412760      
00412768      if (m_pDBCache != 0)
00412770          /* tailcall */
00412770          return CPluginManager::RemovePluginPrototype(&m_pDBCache->m_Plugins, arg2);
00412770      
00412775      m_pDBCache = 0;
00412777      return 0;
00412760  }

0041277a                                                                                90 90 90 90 90 90                            ......

00412780  class PStringBase<unsigned short>* __thiscall NetError::GetLogString(class NetError const* this, class PStringBase<unsigned short>* __return)

00412780  {
00412795      if ((this->m_stringID == 0 || this->m_tableID == 0))
00412795      {
004127e7          PStringBase<unsigned short>::PStringBase<unsigned short>(__return, u"unknown");
004127f5          return __return;
00412795      }
00412795      
0041279b      void var_90;
0041279b      StringInfo::StringInfo(&var_90);
004127ac      StringInfo::SetStringIDandTableEnum(&var_90, this->m_stringID, this->m_tableID);
004127bf      StringInfo::GetLogString(&var_90, __return, 1);
004127c8      StringInfo::~StringInfo(&var_90);
004127d6      return __return;
00412780  }

004127f8                                                                          90 90 90 90 90 90 90 90                          ........

00412800  int32_t ArgumentParser::GetCharactersToWrapUsageTo(class ArgumentParser* this @ ecx) __pure

00412800  {
00412805      return 0x50;
00412800  }

00412806                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00412810  void __fastcall Client::~Client(class Client* this)

00412810  {
00412810      class Client* this_1 = this;
00412811      int32_t ebx;
00412811      int32_t var_8 = ebx;
00412812      int32_t ebp;
00412812      int32_t var_c = ebp;
00412813      int32_t esi;
00412813      int32_t var_10 = esi;
0041281b      *(uint32_t*)((char*)this - 0x1c) = 0x794d48;
00412822      *(int32_t*)((char*)this + -0x18) = 0x794cf8;
00412828      this->vtable = 0x794ce8;
0041282e      this->m_ErrorText.m_charbuffer = &Client::`vftable';
00412835      this->m_CmdChars.m_charbuffer = &Client::`vftable';
0041283c      void* __offset(Client, -0x18) var_4 = ((char*)this - 0x18);
00412840      Client::m_instance = nullptr;
00412846      uint32_t m_nPreferenceUserSpecifiedPort = this->m_nPreferenceUserSpecifiedPort;
00412846      
0041284e      if (m_nPreferenceUserSpecifiedPort != 0)
0041284e      {
00412851          CloseHandle(m_nPreferenceUserSpecifiedPort);
00412857          this->m_nPreferenceUserSpecifiedPort = 0;
0041284e      }
0041284e      
00412863      int32_t edi;
00412863      int32_t var_14_2 = edi;
0041286a      int32_t* edi_2 = (this->m_netAuth.m_CryptoData.m_cbCurSize - 0x14);
0041286a      
00412879      if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00412881          **(uint32_t**)edi_2(1);
00412881      
00412889      NetAuthenticator::~NetAuthenticator(&this->m_latencyDelay);
00412894      void* __offset(PSRefBufferCharData<char>, -0x14) edi_4 = (this->m_hostName.m_charbuffer - 0x14);
00412894      
004128a3      if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
004128ab          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
004128ab      
004128b0      int32_t* edi_6 = (this->m_fReadOnlyDatFiles - 0x14);
004128b0      
004128bf      if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
004128c7          **(uint32_t**)edi_6(1);
004128c7      
004128cc      int32_t* edi_8 = (this->m_fUseMemoryManager - 0x14);
004128cc      
004128db      if ((InterlockedDecrement(&edi_8[1]) == 0 && edi_8 != 0))
004128e3          **(uint32_t**)edi_8(1);
004128e3      
004128e8      int32_t* edi_10 = (this->m_fWindowed - 0x14);
004128e8      
004128f7      if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
004128ff          **(uint32_t**)edi_10(1);
004128ff      
00412901      struct Turbine_RefCount::VTable* vtable = this->m_cTurbineRefCount.vtable;
00412901      
00412910      if ((InterlockedDecrement(&vtable[1]) == 0 && vtable != 0))
00412918          *(uint32_t*)vtable->__vecDelDtor(1);
00412918      
0041291d      void* __offset(NetError::VTable, -0x14) edi_12 = (this->m_errFinal.vtable - 0x14);
0041291d      
0041292c      if ((InterlockedDecrement(((char*)edi_12 + 4)) == 0 && edi_12 != 0))
00412934          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_12) + -0x14)(1);
00412934      
00412939      int32_t* edi_14 = (this->m_fPacketLoss - 0x14);
00412939      
00412948      if ((InterlockedDecrement(&edi_14[1]) == 0 && edi_14 != 0))
00412950          **(uint32_t**)edi_14(1);
00412950      
00412957      int32_t edi_16 = -(((char*)this - 0x1c));
0041295e      void* edi_18 = ((edi_16 - edi_16) & &this->m_CmdChars);
00412960      *(uint32_t*)((char*)this->m_tLastHeardFromCurServer)[4] = 0x792b6c;
00412967      class CPluginManager* ecx_9 = *(uint32_t*)((char*)edi_18 + 4);
0041296c      *(uint32_t*)((char*)edi_18 + 0x20) = 0x79285c;
00412973      *(uint32_t*)edi_18 = 0x794538;
00412973      
00412979      if (ecx_9 != 0)
00412979      {
0041297c          CPluginManager::RemovePluginPrototype(ecx_9, edi_18);
00412981          *(uint32_t*)((char*)edi_18 + 4) = 0;
00412979      }
00412979      
0041298a      int32_t eax_19 = -(((char*)this - 0x1c));
00412991      void* eax_21 = ((eax_19 - eax_19) & &this->m_ErrorText);
00412993      *(uint32_t*)eax_21 = 0x794824;
00412999      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00412999      
004129a1      if (ICIDM::s_cidm_1 != 0)
004129a3          ICIDM::s_cidm_1->vtable->UnregisterCallback(ICIDM::s_cidm_1, eax_21);
004129a3      
004129ab      int32_t edi_20 = -(((char*)this - 0x1c));
004129af      void* edi_22 = ((edi_20 - edi_20) & this);
004129b1      class CPluginManager* ecx_11 = *(uint32_t*)((char*)edi_22 + 4);
004129b6      *(uint32_t*)edi_22 = 0x794538;
004129b6      
004129bc      if (ecx_11 != 0)
004129bc      {
004129bf          CPluginManager::RemovePluginPrototype(ecx_11, edi_22);
004129c4          *(uint32_t*)((char*)edi_22 + 4) = 0;
004129bc      }
004129bc      
004129cf      int32_t ebx_2 = -(((char*)this - 0x1c));
004129d3      void* ebx_4 = ((ebx_2 - ebx_2) & &edi_8[1]);
004129d8      int32_t* esi_3 = (*(uint32_t*)((char*)ebx_4 + 8) - 0x14);
004129d8      
004129e8      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004129f0          **(uint32_t**)esi_3(1);
004129f0      
004129f5      int32_t* esi_5 = (*(uint32_t*)((char*)ebx_4 + 4) - 0x14);
004129f5      
00412a04      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00412a0c          **(uint32_t**)esi_5(1);
00412810  }

00412a13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00412a20  uint8_t Client::`vector deleting destructor'(void* arg1, uint32_t arg2)

00412a20  {
00412a23      int32_t ecx;
00412a23      /* tailcall */
00412a23      return Client::`vector deleting destructor'((ecx - 8), arg1);
00412a20  }

00412a28                          cc cc cc cc cc cc cc cc                                                          ........

00412a30  int32_t __fastcall Client::`vector deleting destructor'(int32_t arg1)

00412a30  {
00412a33      /* tailcall */
00412a33      return Client::`vector deleting destructor'((arg1 - 0xc));
00412a30  }

00412a38                                                                          cc cc cc cc cc cc cc cc                          ........

00412a40  void __thiscall Client::AppendOutputText(class Client* this, char const* arg2, enum ArgumentParser::OutputTextType arg3)

00412a40  {
00412a4e      ArgumentParser::AppendOutputText(this, arg2, arg3);
00412a4e      
00412a5a      if ((arg2 != 0 && *(uint8_t*)arg2 != 0))
00412a5a      {
00412a61          PStringBase<char>::PStringBase<char>(&arg3, arg2);
00412a66          enum ArgumentParser::OutputTextType ecx_1 = arg3;
00412a6a          int32_t eax = *(uint32_t*)(ecx_1 - 4);
00412a6a          
00412a70          if (eax != 1)
00412a70          {
00412a78              PStringBase<char>::append_n_chars(&this->m_cTurbineRefCount.m_cRef, ecx_1, (eax - 1));
00412a7d              ecx_1 = arg3;
00412a70          }
00412a70          
00412a94          if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00412a9c              **(uint32_t**)(ecx_1 - 0x14)(1);
00412a5a      }
00412a40  }

00412aa3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00412ab0  void* __thiscall LinkStatusHolder::`scalar deleting destructor'(class LinkStatusHolder* this, uint32_t arg2)

00412ab0  {
00412ab3      class CPluginManager* m_pManager = this->m_pManager;
00412ab8      this->m_errFinal.vtable = 0x79285c;
00412abf      this->vtable = 0x794538;
00412abf      
00412ac5      if (m_pManager != 0)
00412ac5      {
00412ac8          CPluginManager::RemovePluginPrototype(m_pManager, this);
00412acd          this->m_pManager = nullptr;
00412ac5      }
00412ac5      
00412ad9      if ((arg2 & 1) != 0)
00412adc          operator delete(this);
00412adc      
00412ae7      return this;
00412ab0  }

00412aea                                90 90 90 90 90 90                                                            ......

00412af0  void __fastcall Client::Client(class Client* this)

00412af0  {
00412af5      this->vtable = &ArgumentParser::`vftable';
00412afc      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00412b0e      this->m_ErrorText.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00412b11      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00412b1b      PStringBase<char>::PStringBase<char>(&this->m_CmdChars, &data_794c7c);
00412b20      this->vtable = &CDDDStatusPlugin::`vftable';
00412b29      this->m_pManager = nullptr;
00412b2c      this->vtable = &IInputActionCallback::`vftable';
00412b33      this->m_pManager = nullptr;
00412b36      this->vtable = &LinkStatusHolder::`vftable';
00412b3d      this->m_eLinkState = LinkStatus_Created;
00412b40      this->m_tLastHeardFromCurServer = 0f;
00412b43      *(uint32_t*)((char*)this->m_tLastHeardFromCurServer)[4] = 0;
00412b46      this->m_fConnectionProgress = 0f;
00412b49      this->m_fPacketLoss = 1f;
00412b50      this->m_errFinal.vtable = 0x794878;
00412b57      this->m_nodropKick = 0;
00412b5a      this->vtable = 0x794d48;
00412b60      this->vtable = &Client::`vftable';
00412b67      this->vtable = &Client::`vftable';
00412b6e      this->vtable = &Client::`vftable';
00412b75      this->vtable = &Client::`vftable';
00412b81      this->m_cTurbineRefCount.m_cRef = 1;
00412b84      this->m_cTurbineRefCount.vtable = 0x792b6c;
00412b8b      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer;
00412b97      this->m_FullOutputText.m_charbuffer = PStringBase<char>::s_NullBuffer_6;
00412b9a      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_6 - 0x10));
00412b9c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
00412ba8      this->m_preferencesFile.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
00412bab      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
00412bad      this->m_fWindowed = 1;
00412bb0      this->m_fUseMemoryManager = 0;
00412bb3      this->m_fReadOnlyDatFiles = 1;
00412bb6      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00412bc1      this->m_account.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00412bc4      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00412bc6      this->m_account.fIsDarkMajestyExpansion_ = 0;
00412bc9      this->m_account.m_fIsThroneOfDestinyExpansion = 0;
00412bcc      this->m_account.m_fPreOrderedThroneOfDestinyExpansion = 0;
00412bd2      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer;
00412bde      this->m_pPrimer.m_charbuffer = PStringBase<char>::s_NullBuffer_7;
00412be4      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_7 - 0x10));
00412be6      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
00412bf2      this->m_LanguageStr.m_charbuffer = PStringBase<char>::s_NullBuffer_4;
00412bf8      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_4 - 0x10));
00412bfa      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00412c05      this->m_hostName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00412c0b      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
00412c0d      this->m_noflowqueue = 0;
00412c13      this->m_port = 0x1c88;
00412c1d      this->m_clientPort = 0;
00412c23      this->m_latencyDelay = 0;
00412c29      this->m_latencyPercent = 0;
00412c2f      this->m_Language = 1;
00412c35      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00412c41      this->m_worldName.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00412c47      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00412c4f      this->m_pDBCache = nullptr;
00412c55      this->m_ui = nullptr;
00412c5b      this->m_connected = 0;
00412c61      NetAuthenticator::NetAuthenticator(&this->m_netAuth);
00412c66      this->m_net = nullptr;
00412c6c      this->m_eventHandler = nullptr;
00412c72      this->m_qualityRegistrar = nullptr;
00412c78      class PStringBase<char> PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer;
00412c84      this->m_strPreferenceBindInterface.m_charbuffer = PStringBase<char>::s_NullBuffer_5;
00412c8a      InterlockedIncrement((PStringBase<char>::s_NullBuffer_5 - 0x10));
00412c8c      this->m_bPreferenceComputeUniquePort = 0;
00412c92      this->m_nPreferenceUserSpecifiedPort = 0;
00412c98      this->m_UIQueueManager = nullptr;
00412c9e      __builtin_memset(&this->smartbox_, 0, 0x14);
00412cbc      Client::m_instance = this;
00412cc2      CCommunicationSystem::Init();
00412ccd      Turbine::Debug::SetDebugFlags(0x100, 1);
00412af0  }

00412cdc                                                                                      90 90 90 90                              ....

00412ce0  void* __thiscall Client::`vector deleting destructor'(class Client* this, uint32_t arg2)

00412ce0  {
00412ce3      Client::~Client(this);
00412ced      void* __offset(Client, -0x1c) result = ((char*)this - 0x1c);
00412ced      
00412cf0      if ((arg2 & 1) == 0)
00412cff          return result;
00412cff      
00412cf3      operator delete(result);
00412cfb      return ((char*)this - 0x1c);
00412ce0  }

00412d02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00412d10  uint8_t __thiscall Client::InitDatabase(class Client* this, int32_t const arg2, int32_t const arg3, uint8_t arg4)

00412d10  {
00412d10      class Client* this_1 = this;
00412d16      class CLCache* eax = CFactory::Make_Client_Cache();
00412d1d      this->m_pDBCache = eax;
00412d1d      
00412d23      if (eax == 0)
00412d23      {
00412d2a          PopupError("FATAL ERROR: Client can't alloca…");
00412d32          int32_t eax_1;
00412d32          eax_1 = 0;
00412d38          return 0;
00412d23      }
00412d23      
00412d44      PStringBase<char>::PStringBase<char>(&this_1, "client_portal.dat");
00412d4d      class CLCache* m_pDBCache = this->m_pDBCache;
00412d53      struct CLCache::VTable* vtable = m_pDBCache->vtable;
00412d55      int32_t var_14_2 = 0;
00412d57      int32_t var_18 = 0;
00412d59      uint16_t* var_1c = 1;
00412d5b      uint16_t* var_20 = nullptr;
00412d6c      int32_t ebx;
00412d6c      ebx = vtable->Init(m_pDBCache, &this_1, arg4, 1, var_20, var_1c, var_18, var_14_2);
00412d6e      char temp1 = ebx;
00412d6e      ebx = -(ebx);
00412d70      ebx = (ebx - ebx);
00412d72      void* __offset(Client, -0x14) edi_1 = ((char*)this_1 - 0x14);
00412d79      ebx += 1;
00412d7b      int32_t eax_4;
00412d7b      int32_t ecx_2;
00412d7b      eax_4 = InterlockedDecrement(((char*)edi_1 + 4));
00412d7b      
00412d87      if ((eax_4 == 0 && edi_1 != 0))
00412d8f          ecx_2 = *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00412d8f      
00412d93      if (ebx == 0)
00412d93      {
00412de4          CLCache::SetNetQueue(this->m_pDBCache, this->netQueues_[5]);
00412df9          CPluginManager::AddPluginPrototype(&this->m_pDBCache->m_Plugins, &this->vtable);
00412e00          uint8_t var_14_8 = 1;
00412e07          var_18 = this->vtable->GetLanguage(this);
00412e19          return DBCache::SetLocalLanguage(var_18, var_14_8) != 0;
00412d93      }
00412d93      
00412d95      int32_t var_14_5 = 0;
00412d97      var_18 = ecx_2;
00412d9a      var_1c = &data_794320;
00412da4      var_1c = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, var_1c);
00412da7      var_20 = &data_794320;
00412db1      var_20 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1c, var_20);
00412db9      uint16_t eax_5;
00412db9      class PStringBase<unsigned short> ecx_9;
00412db9      class PStringBase<unsigned short> edx_2;
00412db9      eax_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, &data_794320);
00412dc3      PlatformString::DisplayString(eax_5, edx_2, ecx_9, 0xc9, var_20);
00412dcb      int32_t eax_6;
00412dcb      eax_6 = 0;
00412dd1      return 0;
00412d10  }

00412e1c                                                                                      90 90 90 90                              ....

00412e20  class NetError* __thiscall Client::Connect(class Client* this, class NetError* __return)

00412e20  {
00412e2b      this->vtable->InitAuth(this);
00412e31      int32_t m_clientPort = this->m_clientPort;
00412e3d      class PSRefBufferCharData<char>* m_charbuffer = this->m_hostName.m_charbuffer;
00412e47      int32_t m_port = this->m_port;
00412e4b      int32_t m_nPreferenceUserSpecifiedPort = m_clientPort;
00412e4b      
00412e4d      if (m_clientPort == 0)
00412e4f          m_nPreferenceUserSpecifiedPort = this->m_nPreferenceUserSpecifiedPort;
00412e4f      
00412e65      CPluginManager::AddPluginPrototype(&this->m_net->m_Plugins, &this->vtable);
00412e6a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00412e6f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00412e77      int32_t s;
00412e77      __builtin_memset(&s, 0, 0x14);
00412e8b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00412ea3      int32_t m_nPreferenceUserSpecifiedPort_1 = m_nPreferenceUserSpecifiedPort;
00412ea7      uint32_t m_bPreferenceComputeUniquePort = ((uint32_t)this->m_bPreferenceComputeUniquePort);
00412eab      AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, this->m_strPreferenceBindInterface.m_charbuffer);
00412ebd      HINSTANCE edi = LoadLibraryA("acpl.dll");
00412ebd      
00412ec1      if (edi != 0)
00412ec1      {
00412ed0      label_412ed0:
00412ed0          void (* kernel32_GetProcAddress_Ptr_1)() = kernel32_GetProcAddress_Ptr;
00412ed6          char const* const var_210_3 = "LogWireDataReceived";
00412edb          HINSTANCE var_214_1 = edi;
00412ede          char const* const var_210_4 = "LogWireDataSent";
00412ee3          HINSTANCE var_214_2 = edi;
00412ee4          s = kernel32_GetProcAddress_Ptr_1();
00412eea          int32_t var_1e0_1 = kernel32_GetProcAddress_Ptr_1();
00412ec1      }
00412ec1      else
00412ec1      {
00412eca          edi = LoadLibraryA("pl.dll");
00412eca          
00412ece          if (edi != 0)
00412ece              goto label_412ed0;
00412ec1      }
00412ec1      
00412ef2      void var_1c4;
00412ef2      DatIDStamp::DatIDStamp(&var_1c4);
00412f19      int32_t __return_1;
00412f19      ClientNet::Init(this->m_net, &__return_1, m_port, m_charbuffer, &var_1c4, &this->m_netAuth, &s);
00412f1e      uint32_t m_stringID_1;
00412f1e      uint32_t m_stringID = m_stringID_1;
00412f2e      int32_t m_tableID;
00412f2e      int32_t m_tableID_1;
00412f2e      
00412f2e      if (m_stringID != ID_NetError_None.m_stringID)
00412f2e      {
00412f85      label_412f85:
00412f85          void var_120;
00412f85          StringInfo::StringInfo(&var_120);
00412f9b          StringInfo::SetStringIDandTableEnum(&var_120, m_stringID_1, m_tableID_1);
00412faf          void var_90;
00412faf          StringInfo::StringInfo(&var_90, &var_120);
00412fbb          StringInfo::~StringInfo(&var_120);
00412fcc          void var_1b0;
00412fcc          StringInfo::StringInfo(&var_1b0, &var_90);
00412fd8          StringInfo::~StringInfo(&var_90);
00412fe6          NetError::GetLogString(&__return_1, &m_port);
00412ff6          void* __return_2;
00412ff6          PStringBase<unsigned short>::to_spstring(&m_port, &__return_2, 0);
00412fff          int32_t* esi_2 = (m_port - 0x14);
00412fff          
0041300e          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00413016              **(uint32_t**)esi_2(1);
00413016          
00413018          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0041301d          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00413025          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00413033          void* __return_3 = __return_2;
00413037          int32_t var_1ac;
00413037          int32_t var_210_12 = var_1ac;
00413038          int32_t var_1a8;
00413038          int32_t var_214_6 = var_1a8;
00413039          void* __return_4 = __return_3;
00413044          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "Failed to establish connection t…");
0041304e          PopupError(PStringBase<char>::s_NullBuffer_2);
00413057          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00413057          
00413069          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00413071              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00413071          
00413082          if ((InterlockedDecrement(((char*)__return_3 - 0x10)) == 0 && __return_3 != 0x14))
0041308a              **(uint32_t**)((char*)__return_3 - 0x14)(1);
0041308a          
00413090          StringInfo::~StringInfo(&var_1b0);
00413095          m_tableID = m_tableID_1;
00413099          m_stringID = m_stringID_1;
00412f2e      }
00412f2e      else
00412f2e      {
00412f30          m_tableID = m_tableID_1;
00412f30          
00412f3a          if (m_tableID == ID_NetError_None.m_tableID)
00412f3a          {
00412f46              while (this->m_eLinkState < LinkStatus_Connected)
00412f4a                  Client::KeepUIAlive(this);
00412f4a              
00412f54              m_stringID = this->m_errFinal.m_stringID;
00412f57              m_tableID = this->m_errFinal.m_tableID;
00412f5a              m_stringID_1 = m_stringID;
00412f5e              m_tableID_1 = m_tableID;
00412f3a          }
00412f3a          
00412f70          if ((m_stringID != ID_NetError_None.m_stringID || m_tableID != ID_NetError_None.m_tableID))
00412f68              goto label_412f85;
00412f68          
00412f72          this->m_connected = 1;
00412f2e      }
004130a4      __return->m_tableID = m_tableID;
004130ab      __return->vtable = 0x794878;
004130b1      __return->m_stringID = m_stringID;
004130b4      __return_1 = 0x79285c;
004130bc      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&var_1c4);
004130c1      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004130c1      
004130d1      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004130d3          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(AC1Legacy::PStringBase<char>::s_NullBuffer_3, 1);
004130d3      
004130e7      return __return;
00412e20  }

004130ea                                90 90 90 90 90 90                                                            ......

004130f0  uint8_t __thiscall Client::AddDDDStatusPlugin(class Client* this, class CDDDStatusPlugin* arg2)

004130f0  {
004130f0      class CLCache* m_pDBCache = this->m_pDBCache;
004130f0      
004130f8      if (m_pDBCache != 0)
00413100          /* tailcall */
00413100          return CPluginManager::AddPluginPrototype(&m_pDBCache->m_Plugins, arg2);
00413100      
00413105      m_pDBCache = 0;
00413107      return 0;
004130f0  }

0041310a                                90 90 90 90 90 90                                                            ......

00413110  uint32_t compute_str_hash(char const* arg1)

00413110  {
00413114      char const* edx = arg1;
00413116      char const* ecx;
00413116      ecx = *(uint8_t*)arg1;
00413118      char const* result = nullptr;
00413118      
0041311c      if (ecx != 0)
0041311c      {
00413145          do
00413145          {
00413126              result = ((result << 4) + ((int32_t)ecx));
0041312a              ecx = (result & 0xf0000000);
0041312a              
00413130              if (ecx != 0)
0041313d                  result = (((ecx >> 0x18) ^ result) & 0xfffffff);
0041313d              
0041313f              ecx = edx[1];
00413142              edx = &edx[1];
00413145          } while (ecx != 0);
00413145          
0041314a          if (result == 0xffffffff)
0041314c              return 0xfffffffe;
0041311c      }
0041311c      
00413151      return result;
00413110  }

00413152                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00413160  void* __thiscall IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::`scalar deleting destructor'(class IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>* this, uint32_t arg2)

00413160  {
00413163      class HashSetData<PStringBase<char> >** m_buckets = this->m_buckets;
0041316b      this->vtable = &IntrusiveHashTable<class PStringBase<char>,class HashSetData<class PStringBase<char> >*,1>::`vftable';
0041316b      
00413171      if (m_buckets != &this->m_aInplaceBuckets)
00413174          operator delete[](m_buckets);
00413174      
0041317e      this->m_buckets = nullptr;
00413181      this->m_firstInterestingBucket = nullptr;
00413184      this->m_numBuckets = 0;
00413187      this->m_numElements = 0;
00413187      
0041318f      if ((arg2 & 1) != 0)
00413192          operator delete(this);
00413192      
0041319d      return this;
00413160  }


004131a0  uint32_t __fastcall PStringBase<char>::hash(class PStringBase<char> const* this)

004131a0  {
004131a1      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
004131a3      uint32_t result = *(int32_t*)((char*)m_charbuffer + -8);
004131a3      
004131a9      if (result == 0xffffffff)
004131a9      {
004131ac          result = compute_str_hash(m_charbuffer);
004131b4          *(uint32_t*)((char*)m_charbuffer - 8) = result;
004131a9      }
004131a9      
004131b8      return result;
004131a0  }

004131b9                                                                             90 90 90 90 90 90 90                           .......

004131c0  int32_t _STL::distance(uint32_t const** arg1, uint32_t const** arg2)

004131c0  {
004131cf      return ((*(uint32_t*)arg2 - *(uint32_t*)arg1) >> 2);
004131c0  }


004131d0  void _STL::advance(uint32_t const** arg1, int32_t arg2)

004131d0  {
004131db      int32_t* eax = arg1;
004131df      *(uint32_t*)eax += (arg2 << 2);
004131d0  }

004131e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004131f0  class PStringBase<char>* __convention("regparm") GetFileName(class PStringBase<char>* __return, class IDClass<_tagDataID,32,0> arg2)

004131f0  {
004131f0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4;
004131f0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_4;
004131f1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004131fd      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00413206      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0041320c      class IDClass<_tagDataID,32,0> var_10_1 = arg2;
00413217      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "'<unknowable file>' (did=0x%08X)");
0041321c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00413224      __return->m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0041322d      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
00413233      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00413233      
00413246      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0041324e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0041324e      
00413255      return __return;
004131f0  }

00413256                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00413260  void IError::ReportDataErrorFrom(class IDClass<_tagDataID,32,0> arg1, char const* arg2, ...)

00413260  {
0041326a      class IDClass<_tagDataID,32,0> var_1c = arg1;
0041326f      void* var_4;
0041326f      int32_t* var_20 = &var_4;
00413270      class IDClass<_tagDataID,32,0> edx;
00413270      GetFileName(arg1, edx);
00413275      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00413280      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_1;
0041328b      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0041329b      PStringBase<char>::vsprintf(&PStringBase<char>::s_NullBuffer_4, arg2, &arg_c);
004132a0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004132a5      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004132ad      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004132b3      void* ebx = var_4;
004132b7      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
004132b8      void* var_20_2 = ebx;
004132c3      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "Error in file "%s": %s\n");
004132cd      IError::ReportDataError(&PStringBase<char>::s_NullBuffer_3);
004132dc      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
004132dc      
004132ee      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004132f6          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004132f6      
004132fc      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
004132fc      
0041330b      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00413313          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00413313      
00413324      if ((InterlockedDecrement(((char*)ebx - 0x10)) == 0 && ebx != 0x14))
0041332c          **(uint32_t**)((char*)ebx - 0x14)(1);
00413260  }

00413335                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00413340  void __thiscall IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>(class IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>* this, uint32_t arg2)

00413340  {
0041334b      arg2 = arg2;
0041334f      uint8_t edx = ((int8_t)arg2);
00413353      this->m_buckets = nullptr;
00413356      this->m_firstInterestingBucket = nullptr;
00413359      this->m_numBuckets = 0;
0041335c      this->m_numElements = 0;
00413360      this->vtable = &IntrusiveHashTable<class PStringBase<char>,class HashSetData<class PStringBase<char> >*,1>::`vftable';
00413366      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00413379      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00413379      
00413383      if (eax == bucketSizesEnd_1)
00413385          eax -= 4;
00413385      
00413388      uint32_t eax_1 = *(uint32_t*)eax;
0041338d      this->m_numBuckets = eax_1;
0041338d      
00413390      if (eax_1 > 0x17)
004133a6          this->m_buckets = operator new[]((eax_1 << 2));
00413390      else
00413395          this->m_buckets = &this->m_aInplaceBuckets;
00413395      
004133ac      class HashSetData<PStringBase<char> >** m_buckets = this->m_buckets;
004133af      uint32_t ecx_3 = (this->m_numBuckets << 2);
004133b5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004133c6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00413340  }

004133cf                                               90                                                                 .

004133d0  void __fastcall HashSet<PStringBase<char> >::~HashSet<PStringBase<char> >(class HashSet<PStringBase<char> >* this)

004133d0  {
004133d4      this->vtable = 0x794f38;
004133dc      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_intrusiveTable);
004133e1      class HashSetData<PStringBase<char> >** m_buckets = this->m_intrusiveTable.m_buckets;
004133d1      this->m_intrusiveTable.vtable = &IntrusiveHashTable<class PStringBase<char>,class HashSetData<class PStringBase<char> >*,1>::`vftable';
004133d1      
004133ef      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004133f2          operator delete[](m_buckets);
004133f2      
004133d1      this->m_intrusiveTable.m_buckets = nullptr;
004133d1      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004133d1      this->m_intrusiveTable.m_numBuckets = 0;
004133d1      this->m_intrusiveTable.m_numElements = 0;
004133d0  }

0041340a                                90 90 90 90 90 90                                                            ......

00413410  void* __thiscall HashSet<PStringBase<char> >::`scalar deleting destructor'(class HashSet<PStringBase<char> >* this, uint32_t arg2)

00413410  {
00413419      this->vtable = 0x794f38;
0041341f      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_intrusiveTable);
00413424      class HashSetData<PStringBase<char> >** m_buckets = this->m_intrusiveTable.m_buckets;
00413414      this->m_intrusiveTable.vtable = &IntrusiveHashTable<class PStringBase<char>,class HashSetData<class PStringBase<char> >*,1>::`vftable';
00413414      
00413432      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00413435          operator delete[](m_buckets);
00413435      
00413414      this->m_intrusiveTable.m_buckets = nullptr;
00413414      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00413414      this->m_intrusiveTable.m_numBuckets = 0;
00413414      this->m_intrusiveTable.m_numElements = 0;
00413414      
00413450      if ((arg2 & 1) != 0)
00413453          operator delete(this);
00413453      
0041345f      return this;
00413410  }

00413462        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00413470  enum Logger::LoggerWriteResult __thiscall InteractiveOutputHandler::Write(class InteractiveOutputHandler* this, enum Logger::LoggingSeverity arg2, uint32_t arg3, char const* arg4)

00413470  {
0041347f      PStringBase<char>::PStringBase<char>(&arg4, arg4);
00413489      void __return;
00413489      
00413489      if (this->m_fIgnoreAll == 0)
00413498          IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&this->m_setReportedErrors.m_intrusiveTable, &__return, &arg4)->m_currElement;
004134a4      void* esi_2 = &arg4[0xffffffec];
004134a4      
004134b7      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004134bf          **(uint32_t**)esi_2(1);
004134bf      
004134c7      return 0;
00413470  }

004134ca                                90 90 90 90 90 90                                                            ......

004134d0  class IntrusiveHashIterator<PStringBase<char>,HashSetData<PStringBase<char> > *,1>* __thiscall IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(class IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1> const* this, class IntrusiveHashIterator<PStringBase<char>,HashSetData<PStringBase<char> > *,1>* __return, class PStringBase<char> const* arg3)

004134d0  {
004134d7      class PSRefBufferCharData<char>* m_charbuffer = arg3->m_charbuffer;
004134da      uint32_t eax = *(int32_t*)((char*)m_charbuffer + -8);
004134e3      uint32_t m_numBuckets = this->m_numBuckets;
004134e3      
004134e6      if (eax == 0xffffffff)
004134e6      {
004134e9          eax = compute_str_hash(m_charbuffer);
004134f1          *(uint32_t*)((char*)m_charbuffer - 8) = eax;
004134e6      }
004134e6      
004134f6      uint32_t temp1 = (COMBINE(0, eax) % m_numBuckets);
004134f8      class HashSetData<PStringBase<char> >** m_buckets = this->m_buckets;
00413503      class PStringBase<char>* i;
00413503      
00413503      for (i = m_buckets[temp1]; i != 0; i = *(int32_t*)((char*)i + 4))
00413503      {
0041350f          if (PStringBase<char>::operator==(i, arg3) != 0)
0041350f              break;
00413503      }
00413503      
00413518      class IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>** result = __return;
0041351c      *(uint32_t*)result = this;
0041351f      result[2] = i;
00413524      result[1] = &m_buckets[temp1];
00413528      return result;
004134d0  }

0041352b                                   90 90 90 90 90                                                             .....

00413530  uint8_t __fastcall InteractiveOutputHandler::ResetReportedErrors(class InteractiveOutputHandler* this)

00413530  {
00413533      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_setReportedErrors.m_intrusiveTable);
00413538      int32_t eax;
00413538      eax = 1;
0041353a      return 1;
00413530  }

0041353b                                                                                   90 90 90 90 90                             .....

00413540  class IInteractiveOutputHandler* Logger::GetInteractiveOutputHandler()

00413540  {
00413541      class IInteractiveOutputHandler* plohInteractive_1 = g_plohInteractive;
00413541      
00413549      if (plohInteractive_1 == 0)
00413549      {
00413555          plohInteractive_1 = operator new(0x80);
00413555          
0041355c          if (plohInteractive_1 == 0)
00413586              plohInteractive_1 = nullptr;
0041355c          else
0041355c          {
0041355e              plohInteractive_1->m_cRef = 1;
00413565              plohInteractive_1->vtable = 0x794f3c;
0041356b              *(int32_t*)((char*)plohInteractive_1 + 8) = 0;
0041356f              *(int32_t*)((char*)plohInteractive_1 + 9) = 0;
00413578              *(int32_t*)((char*)plohInteractive_1 + 0xc) = 0x794f38;
0041357f              IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>(&plohInteractive_1[2], 0x17);
0041355c          }
0041355c          
00413588          g_plohInteractive = plohInteractive_1;
00413549      }
00413549      
00413592      InterlockedIncrement(&plohInteractive_1->m_cRef);
0041359e      return g_plohInteractive;
00413540  }

0041359f                                                                                               90                                 .

004135a0  void IError::AddDataErrorHandlers(enum LegacyDataErrorMode arg1, class PStringBase<char> const* arg2)

004135a0  {
004135a2      class Logger::ITextFileOutputHandler* eax = Logger::GetTextFileOutputHandler();
004135aa      IError::DefaultAllIErrorCategoriesToProvidedHandler(eax);
004135aa      
004135c4      if ((InterlockedDecrement(&eax->m_cRef) == 0 && eax != 0))
004135c6          eax->vtable->__vecDelDtor(eax, 1);
004135c6      
004135d5      if (arg1 == DataError_Normal)
004135d5      {
00413617          if (arg2->m_charbuffer->m_data[-4] == 1)
00413617          {
00413659              class IInteractiveOutputHandler* eax_15 = Logger::GetInteractiveOutputHandler();
00413661              IError::DefaultAllIErrorCategoriesToProvidedHandler(eax_15);
0041366d              /* tailcall */
0041366d              return ReferenceCountTemplate<1048576,0>::Release(eax_15);
00413617          }
00413617          
0041361b          void* eax_11 = operator new(0x18);
0041361b          
00413625          if (eax_11 == 0)
00413625          {
00413648              IError::DefaultAllIErrorCategoriesToProvidedHandler(nullptr);
00413654              /* tailcall */
00413654              return ReferenceCountTemplate<1048576,0>::Release(nullptr);
00413625          }
00413625          
0041362c          class Logger::ILoggingOutputHandler* eax_12 = TimestamppedTextFileOutputHandler::TimestamppedTextFileOutputHandler(eax_11, arg2->m_charbuffer);
00413634          IError::DefaultAllIErrorCategoriesToProvidedHandler(eax_12);
00413640          /* tailcall */
00413640          return ReferenceCountTemplate<1048576,0>::Release(eax_12);
004135d5      }
004135d5      
004135d8      class Logger::ILoggingOutputHandler* eax_7;
004135d8      
004135d8      if (arg1 == 1)
004135d8      {
00413606          eax_7 = Logger::GetOutputDebugStringOutputHandler();
004135e5      label_4135e5:
004135e5          IError::DefaultAllIErrorCategoriesToProvidedHandler(eax_7);
004135e5          
004135f9          if ((InterlockedDecrement(&eax_7->m_cRef) == 0 && eax_7 != 0))
004135fb              eax_7->vtable->__vecDelDtor(eax_7, 1);
004135d8      }
004135d8      else if (arg1 == 2)
004135db      {
004135dd          eax_7 = Logger::GetConsoleOutputHandler();
004135dd          goto label_4135e5;
004135db      }
004135a0  }

00413672                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00413680  void* __thiscall InteractiveOutputHandler::`scalar deleting destructor'(class InteractiveOutputHandler* this, uint32_t arg2)

00413680  {
00413686      HashSet<PStringBase<char> >::~HashSet<PStringBase<char> >(&this->m_setReportedErrors);
00413690      this->vtable = 0x7942f4;
00413690      
00413696      if ((arg2 & 1) != 0)
00413699          operator delete(this);
00413699      
004136a4      return this;
00413680  }

004136a7                       90 90 90 90 90 90 90 90 90                                                         .........

004136b0  void __thiscall DatIDStamp::DatIDStamp(class DatIDStamp* this, class DatIDStamp const* arg2)

004136b0  {
004136bc      uint32_t* this_1 = this;
004136be      *(uint32_t*)this_1 = arg2->_maj_vnum.Data1;
004136c0      int32_t edi_1;
004136c0      edi_1 = arg2->_maj_vnum.Data2;
004136c0      *(uint16_t*)((char*)edi_1)[2] = arg2->_maj_vnum.Data3;
004136c3      this_1[1] = edi_1;
004136c6      int32_t edi_2;
004136c6      edi_2 = arg2->_maj_vnum.Data4[0];
004136c6      *(uint8_t*)((char*)edi_2)[1] = arg2->_maj_vnum.Data4[1];
004136c6      *(uint8_t*)((char*)edi_2)[2] = arg2->_maj_vnum.Data4[2];
004136c6      *(uint8_t*)((char*)edi_2)[3] = arg2->_maj_vnum.Data4[3];
004136c9      this_1[2] = edi_2;
004136cc      int32_t edx_1;
004136cc      edx_1 = arg2->_maj_vnum.Data4[4];
004136cc      *(uint8_t*)((char*)edx_1)[1] = arg2->_maj_vnum.Data4[5];
004136cc      *(uint8_t*)((char*)edx_1)[2] = arg2->_maj_vnum.Data4[6];
004136cc      *(uint8_t*)((char*)edx_1)[3] = arg2->_maj_vnum.Data4[7];
004136cf      this_1[3] = edx_1;
004136d6      this->_min_vnum = arg2->_min_vnum;
004136b0  }

004136dd                                                                                         90 90 90                               ...

004136e0  void __fastcall DatIDStamp::Clear(class DatIDStamp* this)

004136e0  {
004136e4      this->_maj_vnum.Data1 = 0;
004136e6      this->_maj_vnum.Data2 = 0;
004136e6      this->_maj_vnum.Data3 = 0;
004136e9      this->_maj_vnum.Data4[0] = 0;
004136e9      this->_maj_vnum.Data4[1] = 0;
004136e9      this->_maj_vnum.Data4[2] = 0;
004136e9      this->_maj_vnum.Data4[3] = 0;
004136ec      this->_maj_vnum.Data4[4] = 0;
004136ec      this->_maj_vnum.Data4[5] = 0;
004136ec      this->_maj_vnum.Data4[6] = 0;
004136ec      this->_maj_vnum.Data4[7] = 0;
004136ef      this->_min_vnum = 0;
004136e0  }

004136f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00413700  void __fastcall DatIDStamp::DatIDStamp(class DatIDStamp* this)

00413700  {
00413706      this->_maj_vnum.Data1 = 0;
00413708      this->_maj_vnum.Data2 = 0;
00413708      this->_maj_vnum.Data3 = 0;
0041370b      this->_maj_vnum.Data4[0] = 0;
0041370b      this->_maj_vnum.Data4[1] = 0;
0041370b      this->_maj_vnum.Data4[2] = 0;
0041370b      this->_maj_vnum.Data4[3] = 0;
0041370e      this->_maj_vnum.Data4[4] = 0;
0041370e      this->_maj_vnum.Data4[5] = 0;
0041370e      this->_maj_vnum.Data4[6] = 0;
0041370e      this->_maj_vnum.Data4[7] = 0;
00413711      this->_min_vnum = 0;
00413700  }

00413715                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00413720  void __fastcall DBCache::ResetCache(class DBCache* this)

00413720  {
00413720      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413720      
0041372a      if (DBCache::s_pCache_1 != 0)
00413732          DBCache::s_pCache_1->vtable->ReleaseContext(&DBCache::s_pCache_1->vtable, s_PrefetchCallback.m_PreFetchContext.m_id);
00413732      
00413743      s_PrefetchCallback.m_PreFetchContext.m_id = INVALID_ASYNCCONTEXT.m_id;
0041374b      /* tailcall */
0041374b      return this->vtable->FlushPendingRequests(&this->vtable);
00413720  }

0041374e                                            90 90                                                                ..

00413750  class DBObj* DBCache::GetFromEnumStatic(int32_t arg1, int32_t arg2, uint32_t arg3)

00413750  {
00413750      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413750      
00413758      if (DBCache::s_pCache_1 == 0)
00413771          return 0;
00413771      
0041376e      return DBCache::s_pCache_1->vtable->GetFromEnum(DBCache::s_pCache_1, arg1, arg2, arg3);
00413750  }

00413772                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00413780  enum CACHE_OBJECT_CODES DBCache::PreFetchStatic(struct QualifiedDataID const* arg1)

00413780  {
00413780      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413780      
00413788      if (DBCache::s_pCache_1 == 0)
00413797          return 0;
00413797      
00413794      return DBCache::s_pCache_1->vtable->PreFetch(DBCache::s_pCache_1, arg1);
00413780  }

00413798                                                                          90 90 90 90 90 90 90 90                          ........

004137a0  uint8_t DBCache::GetCurrentRegion(uint32_t* arg1)

004137a0  {
004137a0      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
004137a0      
004137a7      if (DBCache::s_pCache_1 == 0)
004137a7      {
004137b8          DBCache::s_pCache_1 = 0;
004137ba          return 0;
004137a7      }
004137a7      
004137b3      *(uint32_t*)arg1 = DBCache::s_pCache_1->m_CurrentRegion;
004137b5      uint32_t eax;
004137b5      eax = 1;
004137b7      return 1;
004137a0  }

004137bb                                                                                   90 90 90 90 90                             .....

004137c0  uint8_t DBCache::IsRunTime()

004137c0  {
004137c0      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
004137c0      
004137c7      if (DBCache::s_pCache_1 != 0)
004137c7      {
004137c9          DBCache::s_pCache_1 = DBCache::s_pCache_1->m_bRuntime;
004137cf          return DBCache::s_pCache_1;
004137c7      }
004137c7      
004137d0      DBCache::s_pCache_1 = 0;
004137d2      return 0;
004137c0  }

004137d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004137e0  uint8_t DBCache::IsClient()

004137e0  {
004137e0      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
004137e0      
004137e7      if (DBCache::s_pCache_1 != 0)
004137e7      {
004137e9          DBCache::s_pCache_1 = DBCache::s_pCache_1->m_bIsClient;
004137ef          return DBCache::s_pCache_1;
004137e7      }
004137e7      
004137f0      DBCache::s_pCache_1 = 0;
004137f2      return 0;
004137e0  }

004137f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00413800  uint8_t DBCache::IsServer()

00413800  {
00413800      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413800      
00413807      if (DBCache::s_pCache_1 != 0)
00413807      {
00413809          DBCache::s_pCache_1 = DBCache::s_pCache_1->m_bIsServer;
0041380f          return DBCache::s_pCache_1;
00413807      }
00413807      
00413810      DBCache::s_pCache_1 = 0;
00413812      return 0;
00413800  }

00413813                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00413820  uint8_t __thiscall DBCache::SetRegion(class DBCache* this, uint32_t arg2)

00413820  {
00413824      this->m_CurrentRegion = arg2;
0041382a      uint32_t eax;
0041382a      eax = 1;
0041382c      return 1;
00413820  }

0041382f                                               90                                                                 .

00413830  uint8_t DBCache::SetLocalLanguage(uint32_t arg1, uint8_t arg2)

00413830  {
00413830      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413830      
00413838      if (DBCache::s_pCache_1 != 0)
00413849          return DBCache::s_pCache_1->vtable->SetLanguageInternal(DBCache::s_pCache_1, arg1, arg2);
00413849      
0041384a      int32_t eax;
0041384a      eax = 0;
0041384c      return 0;
00413830  }

0041384d                                         90 90 90                                                               ...

00413850  uint32_t DBCache::GetLocalLanguage()

00413850  {
00413850      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413850      
00413857      if (DBCache::s_pCache_1 == 0)
00413862          return 0;
00413862      
0041385f      return DBCache::s_pCache_1->m_LocalLanguage;
00413850  }

00413863           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00413870  void __fastcall TDynamicCircularArray<AsyncCache::CCallbackHandler *>::Clear(class TDynamicCircularArray<AsyncCache::CCallbackHandler *>* this)

00413870  {
00413872      this->count = 0;
00413875      this->next = 0;
00413878      this->first = 0;
00413870  }

0041387c                                                                                      90 90 90 90                              ....

00413880  void* __thiscall TDynamicCircularArray<AsyncCache::CCallbackHandler *>::`scalar deleting destructor'(class TDynamicCircularArray<AsyncCache::CCallbackHandler *>* this, uint32_t arg2)

00413880  {
00413883      class AsyncCache::CCallbackHandler** A = this->A;
00413888      this->vtable = 0x794f70;
00413888      
0041388e      if (A != 0)
00413891          operator delete[](A);
00413891      
0041389e      if ((arg2 & 1) != 0)
004138a1          operator delete(this);
004138a1      
004138ac      return this;
00413880  }

004138af                                               90                                                                 .

004138b0  class IDClass<_tagDataID,32,0>* __thiscall DBCache::SetMasterMapDID(class DBCache* this, class IDClass<_tagDataID,32,0>* __return, class IDClass<_tagDataID,32,0> arg3)

004138b0  {
004138ba      this->m_MasterMapID.id = arg3;
004138c0      uint32_t* result = __return;
004138c4      *(uint32_t*)result = this->m_MasterMapID.id;
004138c6      return result;
004138b0  }

004138c9                             90 90 90 90 90 90 90                                                           .......

004138d0  class DBObj* DBCache::Get(class IDClass<_tagDataID,32,0> arg1, uint32_t arg2)

004138d0  {
004138dc      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413900      void var_8;
00413900      return DBCache::s_pCache_1->vtable->BlockingGet(&DBCache::s_pCache_1->vtable, 2, QualifiedDataID::QualifiedDataID(&var_8, arg1, arg2));
004138d0  }

00413901     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00413910  class IDClass<_tagDataID,32,0>* DBCache::GetDIDFromEnumStatic(class IDClass<_tagDataID,32,0>* __return, int32_t arg2, int32_t arg3)

00413910  {
00413910      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413910      
00413918      if (DBCache::s_pCache_1 != 0)
00413918      {
0041391e          DBCache::s_pCache_1->vtable->GetDIDFromEnum(DBCache::s_pCache_1, __return, arg2, arg3);
00413932          return __return;
00413918      }
00413918      
0041393d      __return->id = INVALID_DID.id;
0041393f      return __return;
00413910  }


00413940  class IDClass<_tagDataID,32,0>* __thiscall DBCache::GetDIDFromEnum(class DBCache* this, class IDClass<_tagDataID,32,0>* __return, int32_t arg3, int32_t arg4)

00413940  {
00413940      uint32_t id_2 = this->m_MasterMapID.id;
00413946      uint32_t id_3 = INVALID_DID.id;
00413946      
00413951      if (id_2 != 0)
00413951      {
0041395a          uint32_t id = id_3;
00413969          void var_10;
00413969          class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_10, id_2, 0x26));
00413969          
00413975          if (eax_1 == 0)
00413975          {
0041397d              uint32_t* __return_1 = __return;
00413982              *(uint32_t*)__return_1 = INVALID_DID.id;
00413987              return __return_1;
00413975          }
00413975          
0041399d          uint32_t id_1 = INVALID_DID.id;
004139a1          EnumIDMap::EnumToDID(eax_1, arg4, &id_1);
004139b7          void var_8;
004139b7          class DBObj* eax_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id_1, 0x26));
004139b7          
004139c3          if (eax_3 != 0)
004139c3          {
004139df              id = INVALID_DID.id;
004139e6              EnumIDMap::EnumToDID(eax_3, arg3, &id);
004139eb              eax_3->vtable->Release(eax_3);
004139c3          }
004139c3          else
004139ca              id = INVALID_DID.id;
004139ca          
004139f2          eax_1->vtable->Release(eax_1);
004139f9          id_3 = id;
00413951      }
00413951      
00413a03      __return->id = id_3;
00413a08      return __return;
00413940  }

00413a0b                                   90 90 90 90 90                                                             .....

00413a10  class DBObj* __thiscall DBCache::GetFromEnum(class DBCache* this, int32_t arg2, int32_t arg3, uint32_t arg4)

00413a10  {
00413a14      this->vtable->GetDIDFromEnum(this, &arg3, arg2, arg3);
00413a27      int32_t eax_1 = arg3;
00413a27      
00413a31      if (eax_1 == INVALID_DID.id)
00413a38          return 0;
00413a38      
00413a40      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413a64      void var_8;
00413a64      return DBCache::s_pCache_1->vtable->BlockingGet(&DBCache::s_pCache_1->vtable, 2, QualifiedDataID::QualifiedDataID(&var_8, eax_1, arg4));
00413a10  }

00413a67                       90 90 90 90 90 90 90 90 90                                                         .........

00413a70  uint8_t __thiscall DBCache::ReloadObject(class DBCache* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

00413a70  {
00413a87      int32_t ebx;
00413a87      ebx = 0;
00413a89      void var_8;
00413a89      QualifiedDataID::QualifiedDataID(&var_8, arg2, arg3);
00413a9e      class DBOCache* ebp = this->vtable->GetDBOCache(&this->vtable, &var_8);
00413aa2      class DBOCache* eax;
00413aa2      
00413aa2      if (ebp != 0)
00413aa2      {
00413ab4          class DBOCache* esi_1 = this->vtable->GetIfInMemory(&this->vtable, &var_8, ebp);
00413ab4          
00413ab8          if (esi_1 != 0)
00413ab8          {
00413aba              eax = esi_1->m_ObjTable.m_intrusiveTable.vtable;
00413abf              arg3 = eax;
00413abf              
00413ac3              if (eax != 0)
00413ac5                  esi_1->vtable->SaveObjectToDisk();
00413ac5              
00413acc              esi_1->vtable->RemoveObj_Internal();
00413ae1              ebx = this->vtable->BlockingLoadInto(&this->vtable, esi_1, &var_8, ebp);
00413ae1              
00413ae5              if (ebx == 0)
00413b0d                  ebp->vtable->RemoveObj(arg2);
00413ae5              else
00413ae5              {
00413aee                  ebx = esi_1->vtable->CanRequestFromNet();
00413aee                  
00413af2                  if (ebx == 0)
00413b0d                      ebp->vtable->RemoveObj(arg2);
00413af2                  else
00413af2                  {
00413afa                      if (arg3 != 0)
00413b03                          ebx = esi_1->vtable->FlushFreeObjects();
00413b03                      
00413b07                      if (ebx == 0)
00413b0d                          ebp->vtable->RemoveObj(arg2);
00413af2                  }
00413ae5              }
00413ae5              
00413b16              esi_1->vtable->Release();
00413ab8          }
00413aa2      }
00413aa2      
00413b20      eax = ebx;
00413b26      return eax;
00413a70  }

00413b29                             90 90 90 90 90 90 90                                                           .......

00413b30  void DBCache::AddToDataGraph(class DBObj const* arg1)

00413b30  {
00413b30      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00413b30      
00413b54      if (((DBCache::s_pCache_1 != 0 && (arg1->m_DID.id != INVALID_DID.id && DBCache::s_pCache_1->m_pDataGraph != 0)) && MasterDBMap::IsCellType(arg1->vtable->GetDBOType(arg1)) == 0))
00413b80          switch ((arg1->vtable->GetDBOType(arg1) - 0x15))
00413b80          {
00413b9b              case nullptr:
00413b9b              case 7:
00413b9b              case 0xf:
00413b9b              case 0x11:
00413b9b              case 0x13:
00413b9b              case 0x18:
00413b9b              {
00413b9b                  /* nop */
00413b9b                  break;
00413b9b              }
00413b80              default:
00413b80              {
00413b92                  arg1->vtable->FillDataGraph(arg1, DBCache::s_pCache->m_pDataGraph);
00413b80              }
00413b80          }
00413b30  }

00413b9c  uint32_t jump_table_413b9c[0x2] = 
00413b9c  {
00413b9c      [0x0] =  0x00413b9a
00413ba0      [0x1] =  0x00413b87
00413ba4  }
00413ba4  uint8_t lookup_table_413ba4[0x19] = 
00413ba4  {
00413ba4      [0x00] =  0x00
00413ba5      [0x01] =  0x01
00413ba6      [0x02] =  0x01
00413ba7      [0x03] =  0x01
00413ba8      [0x04] =  0x01
00413ba9      [0x05] =  0x01
00413baa      [0x06] =  0x01
00413bab      [0x07] =  0x00
00413bac      [0x08] =  0x01
00413bad      [0x09] =  0x01
00413bae      [0x0a] =  0x01
00413baf      [0x0b] =  0x01
00413bb0      [0x0c] =  0x01
00413bb1      [0x0d] =  0x01
00413bb2      [0x0e] =  0x01
00413bb3      [0x0f] =  0x00
00413bb4      [0x10] =  0x01
00413bb5      [0x11] =  0x00
00413bb6      [0x12] =  0x01
00413bb7      [0x13] =  0x00
00413bb8      [0x14] =  0x01
00413bb9      [0x15] =  0x01
00413bba      [0x16] =  0x01
00413bbb      [0x17] =  0x01
00413bbc      [0x18] =  0x00
00413bbd  }

00413bbd                                                                                         90 90 90                               ...

00413bc0  void* __thiscall IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::`scalar deleting destructor'(class IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>* this, uint32_t arg2)

00413bc0  {
00413bc3      class DBObjSaveInfo** m_buckets = this->m_buckets;
00413bcb      this->vtable = 0x794f84;
00413bcb      
00413bd1      if (m_buckets != &this->m_aInplaceBuckets)
00413bd4          operator delete[](m_buckets);
00413bd4      
00413bde      this->m_buckets = nullptr;
00413be1      this->m_firstInterestingBucket = nullptr;
00413be4      this->m_numBuckets = 0;
00413be7      this->m_numElements = 0;
00413be7      
00413bef      if ((arg2 & 1) != 0)
00413bf2          operator delete(this);
00413bf2      
00413bfd      return this;
00413bc0  }


00413c00  void* __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* this, uint32_t arg2)

00413c00  {
00413c03      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_buckets = this->m_buckets;
00413c0b      this->vtable = 0x794f88;
00413c0b      
00413c11      if (m_buckets != &this->m_aInplaceBuckets)
00413c14          operator delete[](m_buckets);
00413c14      
00413c1e      this->m_buckets = nullptr;
00413c21      this->m_firstInterestingBucket = nullptr;
00413c24      this->m_numBuckets = 0;
00413c27      this->m_numElements = 0;
00413c27      
00413c2f      if ((arg2 & 1) != 0)
00413c32          operator delete(this);
00413c32      
00413c3d      return this;
00413c00  }


00413c40  void* __thiscall IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>* this, uint32_t arg2)

00413c40  {
00413c43      class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** m_buckets = this->m_buckets;
00413c4b      this->vtable = &IntrusiveHashTable<class AsyncContext,class HashTableData<class AsyncContext,class AsyncCache::CCallbackHandler*>*,1>::`vftable';
00413c4b      
00413c51      if (m_buckets != &this->m_aInplaceBuckets)
00413c54          operator delete[](m_buckets);
00413c54      
00413c5e      this->m_buckets = nullptr;
00413c61      this->m_firstInterestingBucket = nullptr;
00413c64      this->m_numBuckets = 0;
00413c67      this->m_numElements = 0;
00413c67      
00413c6f      if ((arg2 & 1) != 0)
00413c72          operator delete(this);
00413c72      
00413c7d      return this;
00413c40  }


00413c80  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* this, uint32_t arg2)

00413c80  {
00413c83      class HashTableData<unsigned long,DBOCache *>** m_buckets = this->m_buckets;
00413c8b      this->vtable = 0x794f90;
00413c8b      
00413c91      if (m_buckets != &this->m_aInplaceBuckets)
00413c94          operator delete[](m_buckets);
00413c94      
00413c9e      this->m_buckets = nullptr;
00413ca1      this->m_firstInterestingBucket = nullptr;
00413ca4      this->m_numBuckets = 0;
00413ca7      this->m_numElements = 0;
00413ca7      
00413caf      if ((arg2 & 1) != 0)
00413cb2          operator delete(this);
00413cb2      
00413cbd      return this;
00413c80  }


00413cc0  void* __thiscall IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>* this, uint32_t arg2)

00413cc0  {
00413cc3      class HashSetData<QualifiedDataID>** m_buckets = this->m_buckets;
00413ccb      this->vtable = 0x794f94;
00413ccb      
00413cd1      if (m_buckets != &this->m_aInplaceBuckets)
00413cd4          operator delete[](m_buckets);
00413cd4      
00413cde      this->m_buckets = nullptr;
00413ce1      this->m_firstInterestingBucket = nullptr;
00413ce4      this->m_numBuckets = 0;
00413ce7      this->m_numElements = 0;
00413ce7      
00413cef      if ((arg2 & 1) != 0)
00413cf2          operator delete(this);
00413cf2      
00413cfd      return this;
00413cc0  }


00413d00  uint32_t __thiscall TDynamicCircularArray<AsyncCache::CCallbackHandler *>::Add(class TDynamicCircularArray<AsyncCache::CCallbackHandler *>* this, class AsyncCache::CCallbackHandler** arg2)

00413d00  {
00413d03      uint32_t max = this->max;
00413d03      
00413d09      if (this->count == max)
00413d09      {
00413d15          void* eax = operator new[](((this->growsize + max) << 2));
00413d15          
00413d24          if (this->A != 0)
00413d24          {
00413d29              uint32_t first = this->first;
00413d2c              int32_t i = 0;
00413d2c              
00413d30              if (this->count > 0)
00413d30              {
00413d49                  do
00413d49                  {
00413d38                      *(uint32_t*)((char*)eax + (i << 2)) = this->A[first];
00413d40                      first = (COMBINE(0, (first + 1)) % this->max);
00413d46                      i += 1;
00413d49                  } while (i < this->count);
00413d30              }
00413d30              
00413d4f              operator delete[](this->A);
00413d24          }
00413d24          
00413d5d          uint32_t count = this->count;
00413d60          uint32_t ecx_5 = (this->max + this->growsize);
00413d62          this->A = eax;
00413d65          this->first = 0;
00413d6c          this->next = count;
00413d6f          this->max = ecx_5;
00413d09      }
00413d09      
00413d76      this->A[this->next] = *(uint32_t*)arg2;
00413d8d      this->next = (COMBINE(0, (this->next + 1)) % this->max);
00413d93      uint32_t eax_13 = (this->count + 1);
00413d94      this->count = eax_13;
00413d9d      return (eax_13 - 1);
00413d00  }


00413da0  void __thiscall TDynamicCircularArray<AsyncCache::CCallbackHandler *>::Remove(class TDynamicCircularArray<AsyncCache::CCallbackHandler *>* this, uint32_t arg2)

00413da0  {
00413dac      int32_t edx = 0;
00413db0      this->count -= 1;
00413db3      uint32_t max = this->max;
00413db3      
00413db6      if (arg2 == 0)
00413db6      {
00413dbe          this->first = (COMBINE(edx, (this->first + 1)) % max);
00413dc3          return;
00413db6      }
00413db6      
00413dcf      this->next = (COMBINE(edx, ((max + this->next) - 1)) % max);
00413dcf      
00413dd5      if (arg2 != this->count)
00413dd5      {
00413dd7          uint32_t first = this->first;
00413ddb          uint32_t max_1 = this->max;
00413de3          uint32_t edx_4 = (COMBINE(0, (first + arg2)) % max_1);
00413de3          
00413dec          if ((this->next < first && edx_4 > first))
00413dec          {
00413dfb              TDynamicCircularArray<AsyncCache::CCallbackHandler *>::Move(this, edx_4, (edx_4 + 1), ((max_1 - 1) - edx_4));
00413e00              class AsyncCache::CCallbackHandler** A = this->A;
00413e05              A[(max_1 - 1)] = *(uint32_t*)A;
00413e08              edx_4 = 0;
00413dec          }
00413dec          
00413e17          TDynamicCircularArray<AsyncCache::CCallbackHandler *>::Move(this, edx_4, (edx_4 + 1), (this->next - edx_4));
00413dd5      }
00413da0  }

00413e22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00413e30  void __thiscall TDynamicCircularArray<AsyncCache::CCallbackHandler *>::Move(class TDynamicCircularArray<AsyncCache::CCallbackHandler *>* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00413e30  {
00413e31      uint32_t i_2 = arg4;
00413e31      
00413e37      if (i_2 != 0)
00413e37      {
00413e45          if (arg2 >= arg3)
00413e45          {
00413e7c              if (i_2 > 0)
00413e7c              {
00413e84                  int32_t edx_3 = (((arg2 - 1) + i_2) << 2);
00413e87                  int32_t eax_4 = (((arg3 - 1) + i_2) << 2);
00413e8a                  uint32_t i_3 = i_2;
00413ea0                  uint32_t i;
00413ea0                  
00413ea0                  do
00413ea0                  {
00413e90                      class AsyncCache::CCallbackHandler** A_1 = this->A;
00413e96                      *(uint32_t*)(edx_3 + A_1) = *(uint32_t*)(eax_4 + A_1);
00413e99                      eax_4 -= 4;
00413e9c                      edx_3 -= 4;
00413e9f                      i = i_3;
00413e9f                      i_3 -= 1;
00413ea0                  } while (i != 1);
00413e7c              }
00413e45          }
00413e45          else if (i_2 > 0)
00413e49          {
00413e4b              uint32_t edi_1 = (arg2 << 2);
00413e52              uint32_t edx_1 = (arg3 << 2);
00413e70              uint32_t i_1;
00413e70              
00413e70              do
00413e70              {
00413e60                  class AsyncCache::CCallbackHandler** A = this->A;
00413e66                  *(uint32_t*)(edi_1 + A) = *(uint32_t*)(edx_1 + A);
00413e69                  edx_1 += 4;
00413e6c                  edi_1 += 4;
00413e6f                  i_1 = i_2;
00413e6f                  i_2 -= 1;
00413e70              } while (i_1 != 1);
00413e49          }
00413e37      }
00413e30  }

00413ea8                          90 90 90 90 90 90 90 90                                                          ........

00413eb0  class AsyncCache::CCallbackHandler* __thiscall TDynamicCircularArray<AsyncCache::CCallbackHandler *>::RemoveAndReturn(class TDynamicCircularArray<AsyncCache::CCallbackHandler *>* this, uint32_t arg2)

00413eb0  {
00413ec4      int32_t result = this->A[(COMBINE(0, (this->first + arg2)) % this->max)];
00413ec7      this->vtable->Remove(this, arg2);
00413ed0      return result;
00413eb0  }

00413ed3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00413ee0  uint8_t DBCache::Init(class DBCache* this @ ecx, uint8_t arg2, class PStringBase<char> const* arg3)

00413ee0  {
00413eea      if (MasterDBMap::sm_mmap == 0)
00413eea      {
00413eee          void* eax = operator new(4);
00413eee          
00413ef8          if (eax == 0)
00413f02              eax = nullptr;
00413ef8          else
00413efa              *(uint32_t*)eax = 0x794f5c;
00413efa          
00413f05          uint8_t result = MasterDBMap::Init(eax);
00413f05          
00413f0f          if (result == 0)
00413f14              return result;
00413eea      }
00413eea      
00413f22      void* var_c;
00413f22      class PStringBase<char>* __return_2;
00413f22      class PStringBase<char>* edx;
00413f22      __return_2 = PStringBase<char>::PStringBase<char>(&var_c, &data_7944ac);
00413f35      int32_t var_24 = 0x836be4;
00413f3a      void* __return_1;
00413f3a      int32_t* var_28 = &__return_1;
00413f45      class PStringBase<char> __return;
00413f45      PStringBase<char>::operator+(ProjectSettings::CompleteProjectPath(__return_2, edx), &__return, &var_c);
00413f54      int32_t* esi_1 = ((char*)__return_1 - 0x14);
00413f54      
00413f63      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00413f6b          **(uint32_t**)esi_1(1);
00413f6b      
00413f71      int32_t* esi_3 = ((char*)var_c - 0x14);
00413f71      
00413f80      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00413f88          **(uint32_t**)esi_3(1);
00413f88      
00413f90      MasterDBMap::SetGameDataDir(&__return);
00413fa1      class PStringBase<char>* __return_3;
00413fa1      class PStringBase<char>* edx_3;
00413fa1      __return_3 = PStringBase<char>::PStringBase<char>(&var_c, &data_7944ac);
00413fb4      int32_t var_28_1 = 0x836be8;
00413fb9      void* var_4;
00413fb9      int32_t* var_2c = &var_4;
00413fc4      class PStringBase<char>* eax_7 = PStringBase<char>::operator+(ProjectSettings::CompleteProjectPath(__return_3, edx_3), &__return_1, &var_c);
00413fcb      class PStringBase<char> __return_4 = __return;
00413fcb      
00413fd1      if (__return_4 != eax_7->m_charbuffer)
00413fd1      {
00413fe2          if ((InterlockedDecrement((__return_4 - 0x10)) == 0 && __return_4 != 0x14))
00413fea              **(uint32_t**)(__return_4 - 0x14)(1);
00413fea          
00413fec          class PSRefBufferCharData<char>* m_charbuffer = eax_7->m_charbuffer;
00413fee          __return = m_charbuffer;
00413ff6          InterlockedIncrement(&m_charbuffer[-1]);
00413fd1      }
00413fd1      
00414000      void* esi_6 = ((char*)__return_1 - 0x14);
00414000      
00414010      if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00414018          **(uint32_t**)esi_6(1);
00414018      
0041401e      int32_t* esi_8 = ((char*)var_4 - 0x14);
0041401e      
0041402d      if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
00414035          **(uint32_t**)esi_8(1);
00414035      
0041403b      int32_t* esi_10 = ((char*)var_c - 0x14);
0041403b      
0041404a      if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
00414052          **(uint32_t**)esi_10(1);
00414052      
00414059      MasterDBMap::SetEngineDataDir(&__return);
00414062      int32_t* esi_12 = (__return - 0x14);
00414062      
00414074      if ((InterlockedDecrement(&esi_12[1]) == 0 && esi_12 != 0))
0041407c          **(uint32_t**)esi_12(1);
0041407c      
0041407f      int32_t eax_15;
0041407f      eax_15 = 1;
00414085      return 1;
00413ee0  }

00414088                          90 90 90 90 90 90 90 90                                                          ........

00414090  void __fastcall DBCache::UseTime(class DBCache* this)

00414090  {
00414096      AsyncCache::UseTime(this);
004140a5      void __return;
004140a5      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&DBCache::s_ObjCache.m_intrusiveTable, &__return);
004140aa      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
004140af      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
004140b1      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
004140b1      
004140b4      if (i_1 != 0)
004140b4      {
004140b6          while (true)
004140b6          {
004140b6              class DBOCache* m_data = i_1->m_data;
004140b6              
004140bb              if (m_data != 0)
004140bd                  DBOCache::UseTime(m_data);
004140bd              
004140c2              i_1 = i_1->m_hashNext;
004140c2              
004140c7              if (i_1 == 0)
004140c7              {
004140dd                  class HashTableData<unsigned long,DBOCache *>* i;
004140dd                  
004140dd                  do
004140dd                  {
004140d2                      m_currBucket = &m_currBucket[1];
004140d2                      
004140d7                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004140eb                          return;
004140eb                      
004140d9                      i = *(uint32_t*)m_currBucket;
004140dd                  } while (i == 0);
004140dd                  
004140df                  i_1 = i;
004140df                  
004140e3                  if (i_1 == 0)
004140e3                      break;
004140c7              }
004140b6          }
004140b4      }
00414090  }

004140ec                                      90 90 90 90                                                              ....

004140f0  uint8_t DBCache::UnloadCellData(class DBCache* this @ ecx)

004140f0  {
00414101      int32_t ebx;
00414101      ebx = 1;
00414103      void __return;
00414103      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&DBCache::s_ObjCache.m_intrusiveTable, &__return);
00414108      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
0041410d      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0041410f      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0041410f      
00414116      if (i_1 != 0)
00414116      {
00414118          while (true)
00414118          {
00414118              class DBOCache* m_data = i_1->m_data;
00414118              
00414129              if (MasterDBMap::IsCellType(m_data->m_dbtype) != 0)
00414129              {
0041412b                  m_data->vtable->FlushFreeObjects(m_data);
0041412b                  
0041413f                  if ((ebx == 0 || m_data->m_nTotalCount != 0))
00414145                      ebx = 0;
0041413f                  else
00414141                      ebx = 1;
00414129              }
00414129              
00414147              i_1 = i_1->m_hashNext;
00414147              
0041414c              if (i_1 == 0)
0041414c              {
0041416b                  class HashTableData<unsigned long,DBOCache *>* i;
0041416b                  
0041416b                  do
0041416b                  {
00414160                      m_currBucket = &m_currBucket[1];
00414160                      
00414165                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00414165                          goto label_414176;
00414165                      
00414167                      i = *(uint32_t*)m_currBucket;
0041416b                  } while (i == 0);
0041416b                  
0041416d                  i_1 = i;
0041416d                  
00414171                  if (i_1 == 0)
00414171                      break;
0041414c              }
00414118          }
00414116      }
00414116      
00414176  label_414176:
00414176      eax = ebx;
0041417c      return eax;
004140f0  }

0041415d                                                                                         8d 49 00                               .I.
0041417d                                                                                         90 90 90                               ...

00414180  void DBCache::AskForLastWords(class DBCache* this @ ecx)

00414180  {
00414190      void __return;
00414190      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&DBCache::s_ObjCache.m_intrusiveTable, &__return);
00414195      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
0041419a      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0041419c      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0041419c      
0041419f      if (i_1 != 0)
0041419f      {
004141a1          while (true)
004141a1          {
004141a1              class DBOCache* m_data = i_1->m_data;
004141a4              m_data->vtable->LastWords(m_data);
004141a9              i_1 = i_1->m_hashNext;
004141a9              
004141ae              if (i_1 == 0)
004141ae              {
004141cb                  class HashTableData<unsigned long,DBOCache *>* i;
004141cb                  
004141cb                  do
004141cb                  {
004141c0                      m_currBucket = &m_currBucket[1];
004141c0                      
004141c5                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004141d9                          return;
004141d9                      
004141c7                      i = *(uint32_t*)m_currBucket;
004141cb                  } while (i == 0);
004141cb                  
004141cd                  i_1 = i;
004141cd                  
004141d1                  if (i_1 == 0)
004141d1                      break;
004141ae              }
004141a1          }
0041419f      }
00414180  }

004141da                                                                                90 90 90 90 90 90                            ......

004141e0  void __stdcall DBCache::FlushFreeObjects(class DBCache* this @ ecx, uint32_t arg2)

004141e0  {
004141e9      if (arg2 == 0)
004141e9      {
0041423f          void __return;
0041423f          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&DBCache::s_ObjCache.m_intrusiveTable, &__return);
00414244          class HashTableData<unsigned long,DBOCache *>* i_1 = eax_6->m_currElement;
00414249          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0041424b          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
0041424b          
0041424e          if (i_1 != 0)
0041424e          {
00414250              while (true)
00414250              {
00414250                  class DBOCache* m_data = i_1->m_data;
00414250                  
00414255                  if (m_data != 0)
00414257                      m_data->vtable->FlushFreeObjects(m_data);
00414257                  
0041425c                  i_1 = i_1->m_hashNext;
0041425c                  
00414261                  if (i_1 == 0)
00414261                  {
0041427b                      class HashTableData<unsigned long,DBOCache *>* i;
0041427b                      
0041427b                      do
0041427b                      {
00414270                          m_currBucket = &m_currBucket[1];
00414270                          
00414275                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00414289                              return;
00414289                          
00414277                          i = *(uint32_t*)m_currBucket;
0041427b                      } while (i == 0);
0041427b                      
0041427d                      i_1 = i;
0041427d                      
00414281                      if (i_1 == 0)
00414281                          break;
00414261                  }
00414250              }
0041424e          }
004141e9      }
004141e9      else
004141e9      {
004141fd          int32_t* eax_3 = DBCache::s_ObjCache.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % DBCache::s_ObjCache.m_intrusiveTable.m_numBuckets)];
004141fd          
00414201          if (eax_3 != 0)
00414201          {
00414209              while (*(uint32_t*)eax_3 != arg2)
00414209              {
0041420b                  eax_3 = eax_3[1];
0041420b                  
00414210                  if (eax_3 == 0)
00414215                      return;
00414209              }
00414209              
00414221              if ((eax_3 != 0 && eax_3 != 0xfffffff8))
00414229                  *(uint32_t*)(*(uint32_t*)eax_3[2] + 0x28)();
00414201          }
004141e9      }
004141e0  }

0041428c                                      90 90 90 90                                                              ....

00414290  class DBOCache* DBCache::GetDBOCache(uint32_t arg1)

00414290  {
004142a6      int32_t* result = DBCache::s_ObjCache.m_intrusiveTable.m_buckets[(COMBINE(0, arg1) % DBCache::s_ObjCache.m_intrusiveTable.m_numBuckets)];
004142a6      
004142aa      if (result != 0)
004142aa      {
004142b2          while (*(uint32_t*)result != arg1)
004142b2          {
004142b4              result = result[1];
004142b4              
004142b9              if (result == 0)
004142bb                  return result;
004142b2          }
004142b2          
004142c5          if ((result != 0 && result != 0xfffffff8))
004142cc              return result[2];
004142aa      }
004142aa      
004142c9      return 0;
00414290  }

004142cd                                         90 90 90                                                               ...

004142d0  uint8_t __fastcall IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::grow(class IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>* this)

004142d0  {
004142d0      class IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>* m_numBuckets = this;
004142d2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004142de      m_numBuckets = this->m_numBuckets;
004142f5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
004142f5      
004142ff      if (eax_2 != bucketSizesEnd_1)
00414308          eax_2 = &eax_2[1];
004142ff      else
004142ff      {
00414301          eax_2 -= 4;
00414301          
00414306          if (eax_2 != bucketSizesEnd_1)
00414308              eax_2 = &eax_2[1];
004142ff      }
004142ff      
00414318      return IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::resize_internal(this, *(uint32_t*)eax_2);
004142d0  }

00414319                                                                             90 90 90 90 90 90 90                           .......

00414320  uint8_t __stdcall DBCache::KeepFreeObjects(class DBCache* this @ ecx, uint8_t arg2, uint32_t arg3)

00414320  {
0041432d      class DBOCache* eax;
0041432d      
0041432d      if (arg3 == 0)
0041432d      {
0041435e          void __return;
0041435e          eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&DBCache::s_ObjCache.m_intrusiveTable, &__return);
00414363          void* (__thiscall* vtable_1)(class AutoGrowHashTable<IDClass<_tagDataID,32,0>,DBObj *>* this, uint32_t) = eax->m_ObjTable.m_intrusiveTable.vtable;
00414368          struct DBOCache::VTable* vtable = eax->vtable;
0041436a          struct AutoGrowHashTable<IDClass<_tagDataID,32,0>,DBObj *>::VTable* vtable_2 = eax->m_ObjTable.vtable;
0041436a          
0041436d          if (vtable_1 != 0)
0041436d          {
00414373              while (true)
00414373              {
00414373                  class DBOCache* ecx_2 = *(uint32_t*)((char*)vtable_1 + 8);
00414373                  
00414378                  if (ecx_2 != 0)
0041437b                      DBOCache::KeepFreeObjects(ecx_2, arg2);
0041437b                  
00414380                  vtable_1 = *(uint32_t*)((char*)vtable_1 + 4);
00414380                  
00414385                  if (vtable_1 == 0)
00414385                  {
0041439b                      void* (__thiscall* __vecDelDtor)(class AutoGrowHashTable<IDClass<_tagDataID,32,0>,DBObj *>* this, uint32_t);
0041439b                      
0041439b                      do
0041439b                      {
00414390                          vtable_2 = &vtable_2[1];
00414390                          
00414395                          if (vtable_2 == (*(int32_t*)((char*)vtable + 0x60) + (*(int32_t*)((char*)vtable + 0x68) << 2)))
00414395                              goto label_4143a6;
00414395                          
00414397                          __vecDelDtor = vtable_2->__vecDelDtor;
0041439b                      } while (__vecDelDtor == 0);
0041439b                      
0041439d                      vtable_1 = __vecDelDtor;
0041439d                      
004143a1                      if (vtable_1 == 0)
004143a1                          break;
00414385                  }
00414373              }
0041436d          }
0041432d      }
0041432d      else
0041432d      {
00414330          eax = DBCache::GetDBOCache(arg3);
00414330          
0041433a          if (eax != 0)
0041433a          {
00414343              DBOCache::KeepFreeObjects(eax, arg2);
0041434b              int32_t eax_1;
0041434b              eax_1 = 1;
00414351              return 1;
0041433a          }
0041432d      }
0041432d      
004143a6  label_4143a6:
004143a6      eax = 1;
004143ac      return 1;
00414320  }

004143af                                               90                                                                 .

004143b0  class DBOCache* __stdcall DBCache::GetDBOCache(class DBCache* this @ ecx, struct QualifiedDataID const* arg2)

004143b0  {
004143b4      uint32_t Type = arg2->Type;
004143c8      int32_t* result = DBCache::s_ObjCache.m_intrusiveTable.m_buckets[(COMBINE(0, Type) % DBCache::s_ObjCache.m_intrusiveTable.m_numBuckets)];
004143c8      
004143cc      if (result != 0)
004143cc      {
004143d2          while (*(uint32_t*)result != Type)
004143d2          {
004143d4              result = result[1];
004143d4              
004143d9              if (result == 0)
004143db                  return result;
004143d2          }
004143d2          
004143e7          if ((result != 0 && result != 0xfffffff8))
004143f0              return result[2];
004143cc      }
004143cc      
004143eb      return 0;
004143b0  }

004143f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00414400  void __thiscall IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>(class IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>* this, uint32_t arg2)

00414400  {
0041440b      arg2 = arg2;
0041440f      uint8_t edx = ((int8_t)arg2);
00414413      this->m_buckets = nullptr;
00414416      this->m_firstInterestingBucket = nullptr;
00414419      this->m_numBuckets = 0;
0041441c      this->m_numElements = 0;
00414420      this->vtable = 0x794f84;
00414426      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00414439      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00414439      
00414443      if (eax == bucketSizesEnd_1)
00414445          eax -= 4;
00414445      
00414448      uint32_t eax_1 = *(uint32_t*)eax;
0041444d      this->m_numBuckets = eax_1;
0041444d      
00414450      if (eax_1 > 0x17)
00414466          this->m_buckets = operator new[]((eax_1 << 2));
00414450      else
00414455          this->m_buckets = &this->m_aInplaceBuckets;
00414455      
0041446c      class DBObjSaveInfo** m_buckets = this->m_buckets;
0041446f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00414475      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00414486      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00414400  }

0041448f                                               90                                                                 .

00414490  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* this, uint32_t arg2)

00414490  {
0041449b      arg2 = arg2;
0041449f      uint8_t edx = ((int8_t)arg2);
004144a3      this->m_buckets = nullptr;
004144a6      this->m_firstInterestingBucket = nullptr;
004144a9      this->m_numBuckets = 0;
004144ac      this->m_numElements = 0;
004144b0      this->vtable = 0x794f90;
004144b6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004144c9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004144c9      
004144d3      if (eax == bucketSizesEnd_1)
004144d5          eax -= 4;
004144d5      
004144d8      uint32_t eax_1 = *(uint32_t*)eax;
004144dd      this->m_numBuckets = eax_1;
004144dd      
004144e0      if (eax_1 > 0x17)
004144f6          this->m_buckets = operator new[]((eax_1 << 2));
004144e0      else
004144e5          this->m_buckets = &this->m_aInplaceBuckets;
004144e5      
004144fc      class HashTableData<unsigned long,DBOCache *>** m_buckets = this->m_buckets;
004144ff      uint32_t ecx_3 = (this->m_numBuckets << 2);
00414505      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00414516      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00414490  }

0041451f                                                                                               90                                 .

00414520  void __thiscall IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>(class IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>* this, uint32_t arg2)

00414520  {
0041452b      arg2 = arg2;
0041452f      uint8_t edx = ((int8_t)arg2);
00414533      this->m_buckets = nullptr;
00414536      this->m_firstInterestingBucket = nullptr;
00414539      this->m_numBuckets = 0;
0041453c      this->m_numElements = 0;
00414540      this->vtable = 0x794f94;
00414546      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00414559      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00414559      
00414563      if (eax == bucketSizesEnd_1)
00414565          eax -= 4;
00414565      
00414568      uint32_t eax_1 = *(uint32_t*)eax;
0041456d      this->m_numBuckets = eax_1;
0041456d      
00414570      if (eax_1 > 0x17)
00414586          this->m_buckets = operator new[]((eax_1 << 2));
00414570      else
00414575          this->m_buckets = &this->m_aInplaceBuckets;
00414575      
0041458c      class HashSetData<QualifiedDataID>** m_buckets = this->m_buckets;
0041458f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00414595      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004145a6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00414520  }

004145af                                               90                                                                 .

004145b0  uint8_t __thiscall IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::resize_internal(class IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>* this, uint32_t arg2)

004145b0  {
004145b1      uint32_t ebp = arg2;
004145b1      
004145bb      if (ebp == this->m_numBuckets)
004145bb      {
004145be          int32_t eax;
004145be          eax = 0;
004145c1          return 0;
004145bb      }
004145bb      
004145c9      int32_t* i_1 = nullptr;
004145c9      
004145cd      while (this->m_numElements != 0)
004145cd      {
004145d6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004145dc          int32_t* i_2;
004145dc          int32_t* m_firstInterestingBucket_2;
004145dc          
004145dc          if (this->m_firstInterestingBucket == ecx_1)
004145dc          {
004145f2          label_4145f2:
004145f2              m_firstInterestingBucket_2 = nullptr;
004145f4              i_2 = nullptr;
004145dc          }
004145dc          else
004145dc          {
004145e0              while (true)
004145e0              {
004145e0                  class HashSetData<QualifiedDataID>** m_firstInterestingBucket = this->m_firstInterestingBucket;
004145e0                  
004145e6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004145e6                  {
004145f8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004145fb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
004145fd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004145fd                      break;
004145e6                  }
004145e6                  
004145ed                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004145ed                  
004145f0                  if (&m_firstInterestingBucket[1] == ecx_1)
004145f0                      goto label_4145f2;
004145e0              }
004145dc          }
004145dc          
004145ff          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
004145ff          
00414603          if (eax_4 == i_2)
00414615              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
00414603          else
00414603          {
0041460c              void* edx_1;
0041460c              
0041460c              do
0041460c              {
00414605                  edx_1 = eax_4;
00414607                  eax_4 = *(uint32_t*)((char*)eax_4 + 8);
0041460c              } while (eax_4 != i_2);
0041460c              
00414610              if (edx_1 != 0)
0041461c                  *(uint32_t*)((char*)edx_1 + 8) = *(uint32_t*)((char*)eax_4 + 8);
00414610              else
00414615                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
00414603          }
00414603          
0041461f          this->m_numElements -= 1;
00414622          i_2[2] = i_1;
0041462a          i_1 = i_2;
004145cd      }
004145cd      
0041462e      class HashSetData<QualifiedDataID>** m_buckets = this->m_buckets;
0041462e      
00414636      if (m_buckets != &this->m_aInplaceBuckets)
00414639          operator delete[](m_buckets);
00414639      
00414646      this->m_buckets = nullptr;
00414649      this->m_firstInterestingBucket = nullptr;
0041464c      this->m_numBuckets = 0;
0041464f      this->m_numElements = 0;
00414652      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00414659      void* eax_7;
00414659      
00414659      if (i_1 != 0)
00414659      {
004146e0          int32_t* i;
004146e0          
004146e0          do
004146e0          {
00414660              uint32_t m_numBuckets = this->m_numBuckets;
00414666              i = i_1[2];
00414666              
0041466f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0041466f              {
00414671                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00414678                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041467e                  arg2 = m_numBuckets;
0041468e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0041468e                  
00414698                  if (eax_8 != bucketSizesEnd_1)
004146a1                      eax_8 = &eax_8[1];
00414698                  else
00414698                  {
0041469a                      eax_8 -= 4;
0041469a                      
0041469f                      if (eax_8 != bucketSizesEnd_1)
004146a1                          eax_8 = &eax_8[1];
00414698                  }
00414698                  
004146a9                  IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::resize_internal(this, *(uint32_t*)eax_8);
0041466f              }
0041466f              
004146b7              uint32_t temp1_1 = (COMBINE(0, (i_1[1] + *(uint32_t*)i_1)) % this->m_numBuckets);
004146ba              class HashSetData<QualifiedDataID>** m_buckets_1 = this->m_buckets;
004146c0              i_1[2] = m_buckets_1[temp1_1];
004146c3              m_buckets_1[temp1_1] = i_1;
004146c9              eax_7 = &m_buckets_1[temp1_1];
004146c9              
004146ce              if (eax_7 < this->m_firstInterestingBucket)
004146d0                  this->m_firstInterestingBucket = eax_7;
004146d0              
004146db              this->m_numElements += 1;
004146de              i_1 = i;
004146e0          } while (i != 0);
00414659      }
00414659      
004146e9      eax_7 = 1;
004146ec      return 1;
004145b0  }

004146ef                                               90                                                                 .

004146f0  void __thiscall QualifiedDataIDArray::QualifiedDataIDArray(class QualifiedDataIDArray* this, int32_t arg2)

004146f0  {
004146f8      IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>(this, arg2);
004146fd      this->vtable = &QualifiedDataIDArray::`vftable';
00414705      this->m_CurBracketIterator.m_currHashTable = 0;
00414708      this->m_CurBracketIterator.m_currBucket = nullptr;
0041470b      this->m_CurBracketIterator.m_currElement = nullptr;
0041470e      this->m_LastBracketIndex = 0xffffffff;
00414715      this->m_CurBracketIterator.m_currElement = nullptr;
00414718      this->m_CurBracketIterator.m_currBucket = nullptr;
0041471b      this->m_CurBracketIterator.m_currHashTable = this;
004146f0  }

00414724              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00414730  void* __thiscall QualifiedDataIDArray::`scalar deleting destructor'(class QualifiedDataIDArray* this, uint32_t arg2)

00414730  {
00414733      QualifiedDataIDArray::~QualifiedDataIDArray(this);
00414733      
0041473d      if ((arg2 & 1) != 0)
00414740          operator delete(this);
00414740      
0041474b      return this;
00414730  }

0041474e                                            90 90                                                                ..

00414750  uint8_t __thiscall IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::add(class IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>* this, class HashSetData<QualifiedDataID>* arg2)

00414750  {
00414761      void __return;
00414761      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(this, &__return, arg2);
0041476c      int32_t var_4;
0041476c      
0041476c      if (var_4 != 0)
0041476c      {
0041476f          int32_t eax;
0041476f          eax = 0;
00414775          return 0;
0041476c      }
0041476c      
00414783      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
00414787          IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::grow(this);
00414787      
00414795      uint32_t temp1 = (COMBINE(0, (arg2->m_hashKey.ID.id + arg2->m_hashKey.Type)) % this->m_numBuckets);
00414798      class HashSetData<QualifiedDataID>** m_buckets = this->m_buckets;
0041479e      arg2->m_hashNext = m_buckets[temp1];
004147a1      m_buckets[temp1] = arg2;
004147a7      class HashSetData<QualifiedDataID>** eax_3 = &m_buckets[temp1];
004147a7      
004147ac      if (eax_3 < this->m_firstInterestingBucket)
004147ae          this->m_firstInterestingBucket = eax_3;
004147ae      
004147b1      this->m_numElements += 1;
004147b5      eax_3 = 1;
004147bb      return 1;
00414750  }

004147be                                                                                            90 90                                ..

004147c0  uint8_t __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::resize_internal(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* this, uint32_t arg2)

004147c0  {
004147ca      if (arg2 == this->m_numBuckets)
004147ca      {
004147cc          uint32_t eax;
004147cc          eax = 0;
004147cf          return 0;
004147ca      }
004147ca      
004147d5      int32_t* m_firstInterestingBucket_2;
004147d5      int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
004147da      int32_t* i_1 = nullptr;
004147da      
004147de      while (this->m_numElements != 0)
004147de      {
004147e9          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004147ee          int32_t* i_2;
004147ee          
004147ee          if (this->m_firstInterestingBucket == ecx_1)
004147ee          {
00414801          label_414801:
00414801              m_firstInterestingBucket_2 = nullptr;
00414803              i_2 = nullptr;
004147ee          }
004147ee          else
004147ee          {
004147f0              while (true)
004147f0              {
004147f0                  class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
004147f0                  
004147f5                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004147f5                  {
00414807                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0041480a                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0041480c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0041480c                      break;
004147f5                  }
004147f5                  
004147fc                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004147fc                  
004147ff                  if (&m_firstInterestingBucket[1] == ecx_1)
004147ff                      goto label_414801;
004147f0              }
004147ee          }
004147ee          
0041480e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0041480e          
00414812          if (eax_4 == i_2)
00414824              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
00414812          else
00414812          {
0041481b              void* edx_2;
0041481b              
0041481b              do
0041481b              {
00414814                  edx_2 = eax_4;
00414816                  eax_4 = *(uint32_t*)((char*)eax_4 + 8);
0041481b              } while (eax_4 != i_2);
0041481b              
0041481f              if (edx_2 != 0)
0041482b                  *(uint32_t*)((char*)edx_2 + 8) = *(uint32_t*)((char*)eax_4 + 8);
0041481f              else
00414824                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
00414812          }
00414812          
0041482e          this->m_numElements -= 1;
00414831          i_2[2] = i_1;
00414837          i_1 = i_2;
004147de      }
004147de      
0041483b      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_buckets = this->m_buckets;
0041483b      
00414843      if (m_buckets != &this->m_aInplaceBuckets)
00414846          operator delete[](m_buckets);
00414846      
00414855      this->m_buckets = nullptr;
00414858      this->m_firstInterestingBucket = nullptr;
0041485b      this->m_numBuckets = 0;
0041485e      this->m_numElements = 0;
00414861      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
00414868      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** eax_7;
00414868      
00414868      if (i_1 != 0)
00414868      {
004148c2          int32_t* i;
004148c2          
004148c2          do
004148c2          {
00414870              uint32_t m_numBuckets = this->m_numBuckets;
00414876              i = i_1[2];
00414876              
0041487f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0041488d                  IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::resize_internal(this, IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::next_largest_num_buckets(m_numBuckets));
0041488d              
0041489b              uint32_t temp1_1 = (COMBINE(0, (i_1[1] + *(uint32_t*)i_1)) % this->m_numBuckets);
0041489e              class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_buckets_1 = this->m_buckets;
004148a4              i_1[2] = m_buckets_1[temp1_1];
004148a7              m_buckets_1[temp1_1] = i_1;
004148ad              eax_7 = &m_buckets_1[temp1_1];
004148ad              
004148b2              if (eax_7 < this->m_firstInterestingBucket)
004148b4                  this->m_firstInterestingBucket = eax_7;
004148b4              
004148bd              this->m_numElements += 1;
004148c0              i_1 = i;
004148c2          } while (i != 0);
00414868      }
00414868      
004148c7      eax_7 = 1;
004148ca      return 1;
004147c0  }

004148cd                                         90 90 90                                                               ...

004148d0  uint8_t __thiscall IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::resize_internal(class IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>* this, uint32_t arg2)

004148d0  {
004148da      if (arg2 == this->m_numBuckets)
004148da      {
004148dc          uint32_t eax;
004148dc          eax = 0;
004148df          return 0;
004148da      }
004148da      
004148e5      int32_t* m_firstInterestingBucket_2;
004148e5      int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
004148ea      int32_t* i_1 = nullptr;
004148ea      
004148ee      while (this->m_numElements != 0)
004148ee      {
004148f9          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004148fe          int32_t* i_2;
004148fe          
004148fe          if (this->m_firstInterestingBucket == ecx_1)
004148fe          {
00414911          label_414911:
00414911              m_firstInterestingBucket_2 = nullptr;
00414913              i_2 = nullptr;
004148fe          }
004148fe          else
004148fe          {
00414900              while (true)
00414900              {
00414900                  class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00414900                  
00414905                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00414905                  {
00414917                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0041491a                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0041491c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0041491c                      break;
00414905                  }
00414905                  
0041490c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0041490c                  
0041490f                  if (&m_firstInterestingBucket[1] == ecx_1)
0041490f                      goto label_414911;
00414900              }
004148fe          }
004148fe          
0041491e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0041491e          
00414922          if (eax_4 == i_2)
00414934              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00414922          else
00414922          {
0041492b              void* edx_2;
0041492b              
0041492b              do
0041492b              {
00414924                  edx_2 = eax_4;
00414926                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0041492b              } while (eax_4 != i_2);
0041492b              
0041492f              if (edx_2 != 0)
0041493b                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0041492f              else
00414934                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00414922          }
00414922          
0041493e          this->m_numElements -= 1;
00414941          i_2[1] = i_1;
00414947          i_1 = i_2;
004148ee      }
004148ee      
0041494b      class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** m_buckets = this->m_buckets;
0041494b      
00414953      if (m_buckets != &this->m_aInplaceBuckets)
00414956          operator delete[](m_buckets);
00414956      
00414965      this->m_buckets = nullptr;
00414968      this->m_firstInterestingBucket = nullptr;
0041496b      this->m_numBuckets = 0;
0041496e      this->m_numElements = 0;
00414971      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
00414978      class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** eax_7;
00414978      
00414978      if (i_1 != 0)
00414978      {
004149cd          int32_t* i;
004149cd          
004149cd          do
004149cd          {
00414980              uint32_t m_numBuckets = this->m_numBuckets;
00414986              i = i_1[1];
00414986              
0041498f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0041499d                  IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::resize_internal(this, IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::next_largest_num_buckets(m_numBuckets));
0041499d              
004149a6              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
004149a9              class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** m_buckets_1 = this->m_buckets;
004149af              i_1[1] = m_buckets_1[temp1_1];
004149b2              m_buckets_1[temp1_1] = i_1;
004149b8              eax_7 = &m_buckets_1[temp1_1];
004149b8              
004149bd              if (eax_7 < this->m_firstInterestingBucket)
004149bf                  this->m_firstInterestingBucket = eax_7;
004149bf              
004149c8              this->m_numElements += 1;
004149cb              i_1 = i;
004149cd          } while (i != 0);
00414978      }
00414978      
004149d2      eax_7 = 1;
004149d5      return 1;
004148d0  }

004149d8                                                                          90 90 90 90 90 90 90 90                          ........

004149e0  uint8_t __fastcall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::grow(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* this)

004149e0  {
004149e0      class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* m_numBuckets = this;
004149e2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004149ee      m_numBuckets = this->m_numBuckets;
00414a05      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00414a05      
00414a0f      if (eax_2 != bucketSizesEnd_1)
00414a18          eax_2 = &eax_2[1];
00414a0f      else
00414a0f      {
00414a11          eax_2 -= 4;
00414a11          
00414a16          if (eax_2 != bucketSizesEnd_1)
00414a18              eax_2 = &eax_2[1];
00414a0f      }
00414a0f      
00414a28      return IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
004149e0  }

00414a29                             90 90 90 90 90 90 90                                                           .......

00414a30  uint8_t __fastcall IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::grow(class IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>* this)

00414a30  {
00414a30      class IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>* m_numBuckets = this;
00414a32      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00414a3e      m_numBuckets = this->m_numBuckets;
00414a55      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00414a55      
00414a5f      if (eax_2 != bucketSizesEnd_1)
00414a68          eax_2 = &eax_2[1];
00414a5f      else
00414a5f      {
00414a61          eax_2 -= 4;
00414a61          
00414a66          if (eax_2 != bucketSizesEnd_1)
00414a68              eax_2 = &eax_2[1];
00414a5f      }
00414a5f      
00414a78      return IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00414a30  }

00414a79                                                                             90 90 90 90 90 90 90                           .......

00414a80  uint8_t __thiscall HashSet<QualifiedDataID>::add(class HashSet<QualifiedDataID>* this, struct QualifiedDataID const* arg2)

00414a80  {
00414a94      void __return;
00414a94      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(&this->m_intrusiveTable.vtable, &__return, arg2);
00414a9f      int32_t var_4;
00414a9f      
00414a9f      if (var_4 != 0)
00414a9f      {
00414aa2          int32_t eax;
00414aa2          eax = 0;
00414aa8          return 0;
00414a9f      }
00414a9f      
00414aad      void* eax_1 = operator new(0xc);
00414aad      
00414ab7      if (eax_1 == 0)
00414ab7      {
00414ae1          IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::add(&this->m_intrusiveTable, nullptr);
00414ae7          int32_t eax_3;
00414ae7          eax_3 = 1;
00414aed          return 1;
00414ab7      }
00414ab7      
00414abb      *(uint32_t*)eax_1 = arg2->Type;
00414ac3      *(uint32_t*)((char*)eax_1 + 4) = arg2->ID.id;
00414ac6      *(uint32_t*)((char*)eax_1 + 8) = 0;
00414acd      IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::add(&this->m_intrusiveTable, eax_1);
00414ad3      int32_t eax_2;
00414ad3      eax_2 = 1;
00414ad9      return 1;
00414a80  }


00414af0  void* __thiscall HashSet<QualifiedDataID>::`scalar deleting destructor'(class HashSet<QualifiedDataID>* this, uint32_t arg2)

00414af0  {
00414af9      this->vtable = 0x794fa0;
00414aff      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_intrusiveTable);
00414b04      class HashSetData<QualifiedDataID>** m_buckets = this->m_intrusiveTable.m_buckets;
00414af4      this->m_intrusiveTable.vtable = 0x794f94;
00414af4      
00414b12      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00414b15          operator delete[](m_buckets);
00414b15      
00414af4      this->m_intrusiveTable.m_buckets = nullptr;
00414af4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00414af4      this->m_intrusiveTable.m_numBuckets = 0;
00414af4      this->m_intrusiveTable.m_numElements = 0;
00414af4      
00414b30      if ((arg2 & 1) != 0)
00414b33          operator delete(this);
00414b33      
00414b3f      return this;
00414af0  }

00414b42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00414b50  void __fastcall DBCachePrefetchCallback::OnContextFinished(class DBCachePrefetchCallback* this, class AsyncContext arg2, enum AsyncResult arg3, uint32_t arg4)

00414b50  {
00414b50      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00414b50      
00414b5a      if (DBCache::s_pCache_1 == 0)
00414b5a      {
00414b7a          this->m_PreFetchContext.m_id = INVALID_ASYNCCONTEXT.m_id;
00414b7e          return;
00414b5a      }
00414b5a      
00414b5f      DBCache::s_pCache_1->vtable->ReleaseContext(&DBCache::s_pCache_1->vtable, this->m_PreFetchContext.m_id);
00414b6d      this->m_PreFetchContext.m_id = INVALID_ASYNCCONTEXT.m_id;
00414b50  }

00414b81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00414b90  void __thiscall DBCachePrefetchCallback::PreFetch(class DBCachePrefetchCallback* this, struct QualifiedDataID const* arg2)

00414b90  {
00414bb4      void __return_1;
00414bb4      
00414bb4      if (IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(&this->m_hashRequestedIDs.m_intrusiveTable, &__return_1, arg2)->m_currElement == 0)
00414bb4      {
00414bb7          class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00414bb7          
00414bbf          if (DBCache::s_pCache_1 != 0)
00414bbf          {
00414bca              void __return;
00414bca              
00414bca              if (INVALID_ASYNCCONTEXT.m_id != this->m_PreFetchContext.m_id)
00414bca              {
00414bed                  void var_80;
00414bed                  QualifiedDataIDArray::QualifiedDataIDArray(&var_80, 0x20);
00414bf9                  QualifiedDataIDArray::AddQDID(&var_80, arg2, 0);
00414bfe                  DBCache::s_pCache_1->vtable->AddToAsyncGet(&DBCache::s_pCache_1->vtable, this->m_PreFetchContext.m_id, 3, &var_80);
00414c16                  QualifiedDataIDArray::~QualifiedDataIDArray(&var_80);
00414bca              }
00414bca              else
00414be2                  this->m_PreFetchContext.m_id = DBCache::s_pCache_1->vtable->AsyncGet(&DBCache::s_pCache_1->vtable, &__return, 3, arg2, this, 0)->m_id;
00414c1f              HashSet<QualifiedDataID>::add(&this->m_hashRequestedIDs, arg2);
00414bbf          }
00414bb4      }
00414b90  }


00414c30  void __thiscall DBCachePrefetchCallback::OnTopLevelRequestFinished(class DBCachePrefetchCallback* this, class AsyncContext arg2, struct QualifiedDataID arg3, enum AsyncResult arg4, uint32_t arg5, int32_t arg6, void* arg7)

00414c30  {
00414c35      if (arg6 == 1)
00414c3f          HashSet<QualifiedDataID>::erase(&this->m_hashRequestedIDs, &arg3);
00414c30  }

00414c47                       90 90 90 90 90 90 90 90 90                                                         .........

00414c50  uint8_t __thiscall HashSet<QualifiedDataID>::erase(class HashSet<QualifiedDataID>* this, struct QualifiedDataID const* arg2)

00414c50  {
00414c58      class HashTableData<QualifiedDataID,CAsyncGetRequest *>* eax = IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::remove(&this->m_intrusiveTable.vtable, arg2);
00414c58      
00414c5f      if (eax == 0)
00414c5f      {
00414c6f          eax = 0;
00414c71          return 0;
00414c5f      }
00414c5f      
00414c62      operator delete(eax);
00414c6a      int32_t eax_1;
00414c6a      eax_1 = 1;
00414c6c      return 1;
00414c50  }

00414c74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00414c80  enum CACHE_OBJECT_CODES __thiscall DBCache::PreFetch(class DBCache* this, struct QualifiedDataID const* arg2)

00414c80  {
00414c8f      class DBOCache* eax = this->vtable->GetDBOCache(&this->vtable, arg2);
00414c8f      
00414c94      if (eax != 0)
00414c94      {
00414c9c          class DBObj* eax_1 = this->vtable->GetIfInMemory(&this->vtable, arg2, eax);
00414c9c          
00414ca4          if (eax_1 != 0)
00414ca4          {
00414ca6              eax_1->vtable->Release();
00414cb4              return 2;
00414ca4          }
00414c94      }
00414c94      
00414cc1      if (this->vtable->IsOnDisk(&this->vtable, arg2) != 0)
00414cca          return 1;
00414cca      
00414cd3      DBCachePrefetchCallback::PreFetch(&s_PrefetchCallback, arg2);
00414cdd      return 0xffffffff;
00414c80  }


00414ce0  void __fastcall DBCache::DestroyObjectCaches(class DBCache* this)

00414ce0  {
00414ce0      this->vtable->SetShutdown(this, 1);
00414cf7      void __return;
00414cf7      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&DBCache::s_ObjCache.m_intrusiveTable, &__return);
00414cfc      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
00414d01      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00414d03      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00414d03      
00414d06      if (i_1 != 0)
00414d06      {
00414d08          while (true)
00414d08          {
00414d08              class DBOCache* m_data = i_1->m_data;
00414d08              
00414d0d              if (m_data != 0)
00414d0f                  m_data->vtable->__vecDelDtor(m_data, 1);
00414d0f              
00414d15              i_1 = i_1->m_hashNext;
00414d15              
00414d1a              if (i_1 == 0)
00414d1a              {
00414d30                  class HashTableData<unsigned long,DBOCache *>* i;
00414d30                  
00414d30                  do
00414d30                  {
00414d25                      m_currBucket = &m_currBucket[1];
00414d25                      
00414d2a                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00414d2a                          goto label_414d3d;
00414d2a                      
00414d2c                      i = *(uint32_t*)m_currBucket;
00414d30                  } while (i == 0);
00414d30                  
00414d32                  i_1 = i;
00414d32                  
00414d36                  if (i_1 == 0)
00414d36                      break;
00414d1a              }
00414d08          }
00414d06      }
00414d06      
00414d3d  label_414d3d:
00414d3d      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&DBCache::s_ObjCache.m_intrusiveTable);
00414ce0  }

00414d49                             90 90 90 90 90 90 90                                                           .......

00414d50  void* __thiscall HashTable<unsigned long,DBOCache *,0>::`scalar deleting destructor'(class HashTable<unsigned long,DBOCache *,0>* this, uint32_t arg2)

00414d50  {
00414d59      this->vtable = &HashTable<unsigned long,class DBOCache*,0>::`vftable';
00414d5f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00414d64      class HashTableData<unsigned long,DBOCache *>** m_buckets = this->m_intrusiveTable.m_buckets;
00414d54      this->m_intrusiveTable.vtable = 0x794f90;
00414d54      
00414d72      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00414d75          operator delete[](m_buckets);
00414d75      
00414d54      this->m_intrusiveTable.m_buckets = nullptr;
00414d54      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00414d54      this->m_intrusiveTable.m_numBuckets = 0;
00414d54      this->m_intrusiveTable.m_numElements = 0;
00414d54      
00414d90      if ((arg2 & 1) != 0)
00414d93          operator delete(this);
00414d93      
00414d9f      return this;
00414d50  }

00414da2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00414db0  void* __thiscall AutoGrowHashTable<QualifiedDataID,CAsyncGetRequest *>::`scalar deleting destructor'(class AutoGrowHashTable<QualifiedDataID,CAsyncGetRequest *>* this, uint32_t arg2)

00414db0  {
00414db9      this->vtable = 0x7953a8;
00414dbf      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_intrusiveTable);
00414dc4      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_buckets = this->m_intrusiveTable.m_buckets;
00414db4      this->m_intrusiveTable.vtable = 0x794f88;
00414db4      
00414dd2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00414dd5          operator delete[](m_buckets);
00414dd5      
00414db4      this->m_intrusiveTable.m_buckets = nullptr;
00414db4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00414db4      this->m_intrusiveTable.m_numBuckets = 0;
00414db4      this->m_intrusiveTable.m_numElements = 0;
00414db4      
00414df0      if ((arg2 & 1) != 0)
00414df3          operator delete(this);
00414df3      
00414dff      return this;
00414db0  }

00414e02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00414e10  void* __thiscall AutoGrowHashTable<AsyncContext,AsyncCache::CCallbackHandler *>::`scalar deleting destructor'(class AutoGrowHashTable<AsyncContext,AsyncCache::CCallbackHandler *>* this, uint32_t arg2)

00414e10  {
00414e19      this->vtable = 0x7953a4;
00414e1f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00414e24      class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** m_buckets = this->m_intrusiveTable.m_buckets;
00414e14      this->m_intrusiveTable.vtable = &IntrusiveHashTable<class AsyncContext,class HashTableData<class AsyncContext,class AsyncCache::CCallbackHandler*>*,1>::`vftable';
00414e14      
00414e32      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00414e35          operator delete[](m_buckets);
00414e35      
00414e14      this->m_intrusiveTable.m_buckets = nullptr;
00414e14      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00414e14      this->m_intrusiveTable.m_numBuckets = 0;
00414e14      this->m_intrusiveTable.m_numElements = 0;
00414e14      
00414e50      if ((arg2 & 1) != 0)
00414e53          operator delete(this);
00414e53      
00414e5f      return this;
00414e10  }

00414e62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00414e70  void __fastcall AsyncCache::~AsyncCache(class AsyncCache* this)

00414e70  {
00414e7d      this->m_BusyCallbacks.vtable = 0x7953a4;
00414e87      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_BusyCallbacks.m_intrusiveTable);
00414e8c      class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** m_buckets = this->m_BusyCallbacks.m_intrusiveTable.m_buckets;
00414e75      this->m_BusyCallbacks.m_intrusiveTable.vtable = &IntrusiveHashTable<class AsyncContext,class HashTableData<class AsyncContext,class AsyncCache::CCallbackHandler*>*,1>::`vftable';
00414e75      
00414e9a      if (m_buckets != &this->m_BusyCallbacks.m_intrusiveTable.m_aInplaceBuckets)
00414e9d          operator delete[](m_buckets);
00414e9d      
00414e75      this->m_BusyCallbacks.m_intrusiveTable.m_buckets = nullptr;
00414e75      this->m_BusyCallbacks.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00414e75      this->m_BusyCallbacks.m_intrusiveTable.m_numBuckets = 0;
00414e75      this->m_BusyCallbacks.m_intrusiveTable.m_numElements = 0;
00414eb8      this->m_PendingGets.vtable = 0x7953a8;
00414ebf      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_PendingGets.m_intrusiveTable);
00414ec4      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_buckets_1 = this->m_PendingGets.m_intrusiveTable.m_buckets;
00414eb3      this->m_PendingGets.m_intrusiveTable.vtable = 0x794f88;
00414eb3      
00414ed2      if (m_buckets_1 != &this->m_PendingGets.m_intrusiveTable.m_aInplaceBuckets)
00414ed5          operator delete[](m_buckets_1);
00414ed5      
00414eb3      this->m_PendingGets.m_intrusiveTable.m_buckets = nullptr;
00414eb3      this->m_PendingGets.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00414eb3      this->m_PendingGets.m_intrusiveTable.m_numBuckets = 0;
00414eb3      this->m_PendingGets.m_intrusiveTable.m_numElements = 0;
00414ee9      this->m_PendingCallbacks.vtable = 0x794f70;
00414ef0      class AsyncCache::CCallbackHandler** A = this->m_PendingCallbacks.A;
00414ef0      
00414ef5      if (A != 0)
00414ef8          operator delete[](A);
00414e70  }

00414f04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00414f10  void __fastcall DBCache::~DBCache(class DBCache* this)

00414f10  {
00414f17      this->vtable = 0x795058;
00414f14      this->vtable = &DBCache::`vftable';
00414f23      MasterDBMap::Cleanup();
00414f28      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00414f28      
00414f2f      if (DBCache::s_pCache_1 != 0)
00414f37          DBCache::s_pCache_1->vtable->ReleaseContext(&DBCache::s_pCache_1->vtable, s_PrefetchCallback.m_PreFetchContext.m_id);
00414f37      
00414f47      s_PrefetchCallback.m_PreFetchContext.m_id = INVALID_ASYNCCONTEXT.m_id;
00414f4c      DBCache::s_pCache = nullptr;
00414f56      DBCache::s_bCacheInitialized = 0;
00414f5e      this->m_cTurbineRefCount.vtable = 0x792b6c;
00414f69      /* tailcall */
00414f69      return AsyncCache::~AsyncCache(&this->vtable);
00414f10  }

00414f6e                                            90 90                                                                ..

00414f70  class TResult* __thiscall DBCache::QueryInterface(class DBCache* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00414f70  {
00414f7a      if (arg3->m_data1 == 0xdeadbeef)
00414f7a      {
00414f7c          int32_t edx;
00414f7c          edx = arg3->m_data2;
00414f7c          *(uint16_t*)((char*)edx)[2] = arg3->m_data3;
00414f7c          
00414f85          if (edx == 0)
00414f85          {
00414f87              int32_t edx_1;
00414f87              edx_1 = arg3->m_data4[0];
00414f87              *(uint8_t*)((char*)edx_1)[1] = arg3->m_data4[1];
00414f87              *(uint8_t*)((char*)edx_1)[2] = arg3->m_data4[2];
00414f87              *(uint8_t*)((char*)edx_1)[3] = arg3->m_data4[3];
00414f87              
00414f90              if (edx_1 == 0)
00414f90              {
00414f92                  int32_t eax;
00414f92                  eax = arg3->m_data4[4];
00414f92                  *(uint8_t*)((char*)eax)[1] = arg3->m_data4[5];
00414f92                  *(uint8_t*)((char*)eax)[2] = arg3->m_data4[6];
00414f92                  *(uint8_t*)((char*)eax)[3] = arg3->m_data4[7];
00414f92                  
00414f9f                  if ((eax == 0xcdab0000 && this != 0))
00414f9f                  {
00414fa5                      *(uint32_t*)arg4 = this;
00414fa7                      this->vtable->AddRef(this);
00414fb0                      __return->m_val = 0;
00414fb6                      return __return;
00414f9f                  }
00414f90              }
00414f85          }
00414f7a      }
00414f7a      
00414fbd      __return->m_val = 0x80004002;
00414fc3      return __return;
00414f70  }

00414fc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00414fd0  uint32_t __fastcall DBCache::AddRef(class DBCache const* this)

00414fd0  {
00414fdd      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00414fd0  }

00414fde                                                                                            90 90                                ..

00414fe0  uint32_t __fastcall DBCache::Release(class DBCache const* this)

00414fe0  {
00414fea      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00414fea      
00414ff7      if ((result == 0 && this != 0))
00414ff9          this->vtable->__vecDelDtor(this, 1);
00414ff9      
00415006      return result;
00414fe0  }

00415007                       90 90 90 90 90 90 90 90 90                                                         .........

00415010  uint8_t __stdcall DBCache::SetShutdown(class DBCache* this @ ecx, uint8_t arg2)

00415010  {
00415014      int32_t ebx;
00415014      ebx = arg2;
0041502e      void __return;
0041502e      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_1 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&DBCache::s_ObjCache.m_intrusiveTable, &__return);
00415033      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_1->m_currElement;
00415038      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_1->m_currHashTable;
0041503a      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_1->m_currBucket;
0041503a      
0041503d      if (i_1 != 0)
0041503d      {
00415043          while (true)
00415043          {
00415043              class DBOCache* m_data = i_1->m_data;
00415043              
00415048              if (m_data != 0)
0041504b                  DBOCache::KeepFreeObjects(m_data, ebx == 0);
0041504b              
00415050              i_1 = i_1->m_hashNext;
00415050              
00415055              if (i_1 == 0)
00415055              {
0041506b                  class HashTableData<unsigned long,DBOCache *>* i;
0041506b                  
0041506b                  do
0041506b                  {
00415060                      m_currBucket = &m_currBucket[1];
00415060                      
00415065                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00415065                          goto label_415076;
00415065                      
00415067                      i = *(uint32_t*)m_currBucket;
0041506b                  } while (i == 0);
0041506b                  
0041506d                  i_1 = i;
0041506d                  
00415071                  if (i_1 == 0)
00415071                      break;
00415055              }
00415043          }
0041503d      }
0041503d      
00415076  label_415076:
00415076      eax_1 = 0;
0041507c      return 0;
00415010  }

0041507f                                                                                               90                                 .

00415080  void __fastcall DBCache::DBCache(class DBCache* this)

00415080  {
00415089      AsyncCache::AsyncCache(&this->vtable);
0041508e      this->vtable = 0x795058;
00415084      this->vtable = &DBCache::`vftable';
0041509a      this->m_cTurbineRefCount.vtable = 0x792b6c;
004150a9      this->m_cTurbineRefCount.m_cRef = 1;
004150b4      this->m_MasterMapID.id = INVALID_DID.id;
004150bc      this->m_CurrentRegion = 0;
004150c2      this->m_LocalLanguage = 0;
004150c8      this->m_bRuntime = 1;
004150ce      this->m_bIsClient = 0;
004150d4      this->m_bIsServer = 0;
004150da      this->m_pDataGraph = nullptr;
004150e0      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
004150e0      
004150e8      if (DBCache::s_pCache_1 != 0)
004150ea          DBCache::s_pCache_1->vtable->__vecDelDtor(DBCache::s_pCache_1, 1);
004150ea      
004150f1      DBCache::s_pCache = this;
00415080  }

004150fb                                                                                   90 90 90 90 90                             .....

00415100  void* __thiscall DBCache::`scalar deleting destructor'(class DBCache* this, uint32_t arg2)

00415100  {
00415103      DBCache::~DBCache(this);
00415103      
0041510d      if ((arg2 & 1) != 0)
00415110          operator delete(this);
00415110      
0041511b      return this;
00415100  }

0041511e                                                                                            90 90                                ..

00415120  void __fastcall DBObj::AddToDataGraph(class DBObj const* this)

00415120  {
00415121      DBCache::AddToDataGraph(this);
00415120  }

00415128                          90 90 90 90 90 90 90 90                                                          ........

00415130  uint32_t __fastcall DBObj::AddRef(class DBObj const* this)

00415130  {
00415133      class DBOCache* m_pMaintainer = this->m_pMaintainer;
00415133      
00415138      if (m_pMaintainer != 0)
00415138      {
0041513e          DBOCache::GetIfUsing(m_pMaintainer, this->m_DID.id);
00415147          return this->m_numLinks;
00415138      }
00415138      
0041514b      int32_t result = (this->m_numLinks + 1);
0041514c      this->m_numLinks = result;
00415150      return result;
00415130  }

00415151                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00415160  uint32_t __fastcall DBObj::Release(class DBObj const* this)

00415160  {
00415160      class DBOCache* m_pMaintainer = this->m_pMaintainer;
00415160      
00415165      if (m_pMaintainer != 0)
00415172          return m_pMaintainer->vtable->Release(m_pMaintainer, this->m_DID.id);
00415172      
00415173      int32_t m_numLinks = this->m_numLinks;
00415176      int32_t result = (m_numLinks - 1);
00415177      this->m_numLinks = result;
00415177      
0041517a      if (m_numLinks != 1)
00415185          return result;
00415185      
0041517c      this->vtable->__vecDelDtor(this, 1);
00415183      return 0;
00415160  }

00415186                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00415190  class DBObj* DBObj::Get(struct QualifiedDataID const* arg1)

00415190  {
00415190      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
00415190      
00415197      if (DBCache::s_pCache_1 == 0)
004151aa          return 0;
004151aa      
004151a7      return DBCache::s_pCache_1->vtable->BlockingGet(&DBCache::s_pCache_1->vtable, 2, arg1);
00415190  }

004151ab                                   90 90 90 90 90                                                             .....

004151b0  enum CACHE_OBJECT_CODES DBObj::PreFetch(struct QualifiedDataID const* arg1)

004151b0  {
004151b0      /* tailcall */
004151b0      return DBCache::PreFetchStatic(arg1);
004151b0  }

004151b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004151c0  void __thiscall DBObj::DBObj(class DBObj* this, class IDClass<_tagDataID,32,0> arg2)

004151c0  {
004151c8      this->m_dataCategory = 0;
004151cb      this->m_bLoaded = 0;
004151ce      __builtin_memset(&this->m_timeStamp, 0, 0x14);
004151e2      this->vtable = 0x7951e0;
004151e8      this->m_numLinks = 1;
004151eb      this->m_DID.id = arg2;
004151ee      this->m_AllowedInFreeList = 1;
004151c0  }

004151f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00415200  uint8_t ArgumentParser::OnCommandLineEvaluationDone(class ArgumentParser* this @ ecx) __pure

00415200  {
00415200      int32_t eax;
00415200      eax = 1;
00415202      return 1;
00415200  }

00415203           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00415210  void __fastcall DBObj::~DBObj(class DBObj* this)

00415210  {
00415210      this->vtable = 0x7951e0;
00415210  }

00415217                                                                       90 90 90 90 90 90 90 90 90                         .........

00415220  class TResult* __thiscall DBObj::QueryInterface(class DBObj* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00415220  {
0041522a      if (arg3->m_data1 == 0xdeadbeef)
0041522a      {
0041522c          int32_t edx;
0041522c          edx = arg3->m_data2;
0041522c          *(uint16_t*)((char*)edx)[2] = arg3->m_data3;
0041522c          
00415235          if (edx == 0)
00415235          {
00415237              int32_t edx_1;
00415237              edx_1 = arg3->m_data4[0];
00415237              *(uint8_t*)((char*)edx_1)[1] = arg3->m_data4[1];
00415237              *(uint8_t*)((char*)edx_1)[2] = arg3->m_data4[2];
00415237              *(uint8_t*)((char*)edx_1)[3] = arg3->m_data4[3];
00415237              
00415240              if (edx_1 == 0)
00415240              {
00415242                  int32_t eax;
00415242                  eax = arg3->m_data4[4];
00415242                  *(uint8_t*)((char*)eax)[1] = arg3->m_data4[5];
00415242                  *(uint8_t*)((char*)eax)[2] = arg3->m_data4[6];
00415242                  *(uint8_t*)((char*)eax)[3] = arg3->m_data4[7];
00415242                  
0041524f                  if ((eax == 0xcdab0000 && this != 0))
0041524f                  {
00415255                      *(uint32_t*)arg4 = this;
00415257                      this->vtable->AddRef(this);
00415260                      __return->m_val = 0;
00415266                      return __return;
0041524f                  }
00415240              }
00415235          }
0041522a      }
0041522a      
0041526d      __return->m_val = 0x80004002;
00415273      return __return;
00415220  }

00415276                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00415280  uint8_t __fastcall DBObj::ReloadFromDisk(class DBObj const* this)

00415280  {
00415288      uint32_t eax;
00415288      
00415288      if (this->m_DID.id != 0)
00415288      {
00415290          eax = DBCache::GetDBOCache(this->vtable->GetDBOType(this));
00415290          
0041529a          if (eax != 0)
004152a8              return *(uint32_t*)(*(uint32_t*)eax + 0x30)(this->m_DID.id);
00415288      }
00415288      
004152a9      eax = 0;
004152ac      return 0;
00415280  }

004152ad                                         90 90 90                                                               ...

004152b0  uint8_t __thiscall DBObj::SaveToDisk(class DBObj const* this, class PreprocHeader const* arg2)

004152b0  {
004152b8      uint32_t eax;
004152b8      
004152b8      if (this->m_DID.id != 0)
004152b8      {
004152c0          eax = DBCache::GetDBOCache(this->vtable->GetDBOType(this));
004152c0          
004152ca          if (eax != 0)
004152da              return *(uint32_t*)(*(uint32_t*)eax + 0x2c)(arg2, this);
004152b8      }
004152b8      
004152dd      eax = 0;
004152e0      return 0;
004152b0  }

004152e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004152f0  void __thiscall DBObj::Serialize(class DBObj* this, class Archive* arg2)

004152f0  {
004152fc      Archive::CheckAlignment(arg2, 4);
00415305      uint8_t* eax = Archive::GetBytes(arg2, 4);
00415305      
0041530c      if (eax != 0)
0041530c      {
00415312          if ((arg2->m_flags & 1) == 0)
0041531d              this->m_DID.id = *(uint32_t*)eax;
00415312          else
00415317              *(uint32_t*)eax = this->m_DID.id;
0041530c      }
0041530c      
00415332      if (MasterDBMap::IsCategorized(this->vtable->GetDBOType(this)) != 0)
00415332      {
00415338          Archive::CheckAlignment(arg2, 4);
00415341          uint32_t* eax_4 = Archive::GetBytes(arg2, 4);
00415341          
00415348          if (eax_4 != 0)
00415348          {
0041534e              if ((arg2->m_flags & 1) != 0)
0041534e              {
00415354                  *(uint32_t*)eax_4 = this->m_dataCategory;
00415357                  return;
0041534e              }
0041534e              
0041535c              this->m_dataCategory = *(uint32_t*)eax_4;
00415348          }
00415332      }
004152f0  }

00415364              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00415370  void DBObj::Remove(class DBObj const* arg1)

00415370  {
0041537e      if (arg1->vtable->GetDBOType(arg1) != 0)
0041537e      {
00415388          class DBOCache* eax_3 = DBCache::GetDBOCache(arg1->vtable->GetDBOType(arg1));
00415390          eax_3->vtable->RemoveObj(eax_3, arg1->m_DID.id);
0041537e      }
00415370  }

0041539d                                                                                         90 90 90                               ...

004153a0  class IDClass<_tagDataID,32,0>* DBObj::GetDIDByEnum(class IDClass<_tagDataID,32,0>* __return, int32_t arg2, int32_t arg3)

004153a0  {
004153b0      DBCache::GetDIDFromEnumStatic(__return, arg2, arg3);
004153bb      return __return;
004153a0  }

004153bc                                                                                      90 90 90 90                              ....

004153c0  class IntrusiveHashIterator<QualifiedDataID,DBObjSaveInfo *,1>* __fastcall IntrusiveHashIterator<QualifiedDataID,DBObjSaveInfo *,1>::operator++(class IntrusiveHashIterator<QualifiedDataID,DBObjSaveInfo *,1>* this)

004153c0  {
004153c5      class DBObjSaveInfo* m_hashNext = this->m_currElement->m_hashNext;
004153cb      this->m_currElement = m_hashNext;
004153cb      
004153ce      if (m_hashNext == 0)
004153ce      {
004153d0          class IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>* m_currHashTable = this->m_currHashTable;
004153d8          void* edx_2 = &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets];
004153d8          
004153e3          while (true)
004153e3          {
004153e3              void* ecx_3 = &this->m_currBucket[1];
004153e8              this->m_currBucket = ecx_3;
004153e8              
004153eb              if (ecx_3 == edx_2)
004153eb                  break;
004153eb              
004153ed              class DBObjSaveInfo* edi_1 = *(uint32_t*)ecx_3;
004153ed              
004153f1              if (edi_1 != 0)
004153f1              {
004153f5                  this->m_currElement = edi_1;
004153f5                  break;
004153f1              }
004153e3          }
004153ce      }
004153ce      
004153f9      return this;
004153c0  }

004153dd                                                                                         8d 49 00                               .I.
004153fa                                                                                90 90 90 90 90 90                            ......

00415400  struct QualifiedDataID const* __thiscall QualifiedDataIDArray::operator[](class QualifiedDataIDArray const* this, uint32_t arg2)

00415400  {
0041540d      if (arg2 != 0)
0041540d      {
0041542c          uint32_t m_LastBracketIndex = this->m_LastBracketIndex;
0041542c          
00415431          if (arg2 != m_LastBracketIndex)
00415431          {
0041543d              if ((this->m_CurBracketIterator.m_currElement == 0 || arg2 != (m_LastBracketIndex + 1)))
0041544c                  QualifiedDataIDArray::ExpensiveUpdateIterator(this, arg2);
0041543d              else
00415442                  IntrusiveHashIterator<QualifiedDataID,DBObjSaveInfo *,1>::operator++(&this->m_CurBracketIterator);
00415431          }
0041540d      }
0041540d      else
0041540d      {
00415414          void __return;
00415414          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(this, &__return);
0041541b          this->m_CurBracketIterator.m_currHashTable = eax->m_currHashTable;
00415421          this->m_CurBracketIterator.m_currElement = eax->m_currElement;
00415427          this->m_CurBracketIterator.m_currBucket = eax->m_currBucket;
0041540d      }
0041540d      
00415451      class DBObjSaveInfo* m_currElement = this->m_CurBracketIterator.m_currElement;
00415451      
00415456      if (m_currElement == 0)
0041546d          return 0x836cbc;
0041546d      
00415458      this->m_LastBracketIndex = arg2;
00415460      return m_currElement;
00415400  }


00415470  void* __thiscall DBObj::`scalar deleting destructor'(class DBObj* this, uint32_t arg2)

00415470  {
00415478      this->vtable = 0x7951e0;
00415478      
0041547e      if ((arg2 & 1) != 0)
00415481          operator delete(this);
00415481      
0041548c      return this;
00415470  }

0041548f                                               90                                                                 .

00415490  class DBObj* __convention("regparm") DBObj::GetByEnum(int32_t arg1, int32_t arg2, uint32_t arg3)

00415490  {
00415490      class IDClass<_tagDataID,32,0> __return_1;
00415490      class IDClass<_tagDataID,32,0> __return = __return_1;
004154a0      DBCache::GetDIDFromEnumStatic(&__return, arg1, arg2);
004154b7      return DBCache::Get(__return, arg3);
00415490  }

004154b8                                                                          90 90 90 90 90 90 90 90                          ........

004154c0  void __thiscall DBObj::FillDataGraph(class DBObj const* this, class IDataGraph* arg2)

004154c0  {
004154cd      uint32_t esi = 0;
004154cd      
004154d1      if (this->m_pMaintainer != 0)
004154d1      {
004154e2          arg2->vtable->add_did(arg2, this->m_DID.id);
004154ef          struct QualifiedDataIDArray::VTable* const var_80;
004154ef          IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>(&var_80, 0x20);
004154f4          struct DBObj::VTable* vtable = this->vtable;
004154fa          int32_t* var_10_1 = &var_80;
00415505          var_80 = &QualifiedDataIDArray::`vftable';
0041550d          int32_t var_4_1 = 0xffffffff;
00415518          int32_t var_8_1 = 0;
0041551f          int32_t var_c_1 = 0;
00415526          vtable->GetSubDataIDs(this, &var_80);
0041552d          int32_t var_14;
0041552d          
0041552d          if (var_14 > 0)
0041552d          {
0041556a              do
0041556a              {
00415548                  if (QualifiedDataIDArray::operator[](&var_80, esi)->ID.id != INVALID_DID.id)
00415548                  {
0041554a                      struct IDataGraph::VTable* vtable_1 = arg2->vtable;
00415556                      uint32_t id = QualifiedDataIDArray::operator[](&var_80, esi)->ID.id;
00415560                      vtable_1->add_did_link(arg2, this->m_DID.id, id);
00415548                  }
00415548                  
00415567                  esi += 1;
0041556a              } while (esi < var_14);
0041552d          }
0041552d          
00415571          QualifiedDataIDArray::~QualifiedDataIDArray(&var_80);
004154d1      }
004154c0  }

00415582        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00415590  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>* this, uint32_t arg2)

00415590  {
00415593      class HashTableData<unsigned long,PStringBase<char> >** m_buckets = this->m_buckets;
0041559b      this->vtable = 0x795294;
0041559b      
004155a1      if (m_buckets != &this->m_aInplaceBuckets)
004155a4          operator delete[](m_buckets);
004155a4      
004155ae      this->m_buckets = nullptr;
004155b1      this->m_firstInterestingBucket = nullptr;
004155b4      this->m_numBuckets = 0;
004155b7      this->m_numElements = 0;
004155b7      
004155bf      if ((arg2 & 1) != 0)
004155c2          operator delete(this);
004155c2      
004155cd      return this;
00415590  }


004155d0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>* this, uint32_t arg2)

004155d0  {
004155d3      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_buckets = this->m_buckets;
004155db      this->vtable = 0x795298;
004155db      
004155e1      if (m_buckets != &this->m_aInplaceBuckets)
004155e4          operator delete[](m_buckets);
004155e4      
004155ee      this->m_buckets = nullptr;
004155f1      this->m_firstInterestingBucket = nullptr;
004155f4      this->m_numBuckets = 0;
004155f7      this->m_numElements = 0;
004155f7      
004155ff      if ((arg2 & 1) != 0)
00415602          operator delete(this);
00415602      
0041560d      return this;
004155d0  }


00415610  void __fastcall SmartArray<IDClass<_tagDataID,32,0>,1>::Reset(class SmartArray<IDClass<_tagDataID,32,0>,1>* this)

00415610  {
00415614      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00415625      this->m_num = 0;
00415625      
0041562c      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0041562c      {
0041562e          class IDClass<_tagDataID,32,0>* m_data = this->m_data;
0041562e          
00415632          if (m_data != 0)
00415638              operator delete[](&m_data[-1]);
00415638          
00415640          this->m_data = 0;
00415646          this->m_sizeAndDeallocate = 0;
0041564f          return;
0041562c      }
0041562c      
00415653      if (this->m_data != 0)
00415653      {
00415655          int32_t eax_1 = (m_sizeAndDeallocate & 0x7fffffff);
0041565a          int32_t eax_2 = (eax_1 - 1);
0041565a          
0041565b          if ((eax_1 - 1) >= 0)
0041565b          {
00415668              int32_t temp1_1;
00415668              
00415668              do
00415668              {
00415661                  temp1_1 = eax_2;
00415661                  eax_2 -= 1;
00415662                  this->m_data[(eax_2 + 1)].id = this;
00415668              } while ((temp1_1 - 1) >= 0);
0041565b          }
00415653      }
00415610  }

0041566d                                         90 90 90                                                               ...

00415670  uint8_t __thiscall SmartArray<IDClass<_tagDataID,32,0>,1>::grow(class SmartArray<IDClass<_tagDataID,32,0>,1>* this, uint32_t arg2)

00415670  {
0041567e      uint32_t m_data;
0041567e      
0041567e      if (arg2 >= this->m_num)
0041567e      {
0041568e          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
0041568e          {
0041571d              m_data = 1;
00415720              return 1;
0041568e          }
0041568e          
00415696          if (arg2 == 0)
00415696          {
00415698              SmartArray<IDClass<_tagDataID,32,0>,1>::Reset(this);
0041569f              int32_t eax_1;
0041569f              eax_1 = 1;
004156a2              return 1;
00415696          }
00415696          
004156ad          m_data = operator new[](((arg2 << 2) + 4));
004156ad          
004156b7          if (m_data != 0)
004156b7          {
004156bf              void* ebx_1 = (m_data + 4);
004156c5              *(uint32_t*)m_data = arg2;
004156c7              `vector constructor iterator'(ebx_1, 4, arg2, Vector3::Vector3);
004156c7              
004156ce              if (ebx_1 != 0)
004156ce              {
004156d3                  if (this->m_data != 0)
004156d3                  {
004156d5                      uint32_t m_num = this->m_num;
004156d8                      m_data = (m_num - 1);
004156d8                      
004156d9                      if ((m_num - 1) >= 0)
004156d9                      {
004156eb                          uint32_t m_data_1;
004156eb                          
004156eb                          do
004156eb                          {
004156e0                              m_data_1 = m_data;
004156e0                              m_data -= 1;
004156e7                              *(uint32_t*)(((char*)ebx_1 + (m_data << 2)) + 4) = this->m_data[(m_data + 1)].id;
004156eb                          } while ((m_data_1 - 1) >= 0);
004156d9                      }
004156d9                      
004156fc                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004156fc                      {
004156fe                          m_data = this->m_data;
004156fe                          
00415702                          if (m_data != 0)
00415708                              operator delete[]((m_data - 4));
004156fc                      }
004156d3                  }
004156d3                  
00415716                  this->m_data = ebx_1;
00415718                  this->m_sizeAndDeallocate = (arg2 | 0x80000000);
0041571d                  m_data = 1;
00415720                  return 1;
004156ce              }
004156b7          }
0041567e      }
0041567e      
00415725      m_data = 0;
00415728      return 0;
00415670  }

004156dd                                                                                         8d 49 00                               .I.
0041572b                                   90 90 90 90 90                                                             .....

00415730  uint8_t __thiscall EnumIDMap::NameToEnum(class EnumIDMap const* this, class PStringBase<char> const* arg2, uint32_t* arg3)

00415730  {
00415744      void __return;
00415744      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_EnumToName.m_intrusiveTable, &__return);
00415749      class HashTableData<unsigned long,DBOCache *>* i_2 = eax->m_currElement;
0041574e      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00415750      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00415750      
00415753      if (i_2 != 0)
00415753      {
00415760          while (true)
00415760          {
00415760              int32_t eax_2;
00415760              int32_t ecx_3;
00415760              eax_2 = _stricmp(arg2->m_charbuffer, i_2->m_data);
00415760              
0041576b              if (eax_2 == 0)
0041576b              {
004157d7                  *(uint32_t*)arg3 = i_2->m_hashKey;
004157d9                  eax_2 = 1;
004157df                  return 1;
0041576b              }
0041576b              
0041576d              i_2 = i_2->m_hashNext;
0041576d              
00415772              if (i_2 == 0)
00415772              {
0041578b                  class HashTableData<unsigned long,DBOCache *>* i;
0041578b                  
0041578b                  do
0041578b                  {
00415780                      m_currBucket = &m_currBucket[1];
00415780                      
00415785                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00415785                          goto label_41579f;
00415785                      
00415787                      i = *(uint32_t*)m_currBucket;
0041578b                  } while (i == 0);
0041578b                  
0041578d                  i_2 = i;
0041578d                  
00415791                  if (i_2 == 0)
00415791                      break;
00415772              }
00415760          }
00415753      }
00415753      
0041579f  label_41579f:
0041579f      void* ecx_6 = &this->m_EnumToNameInternal.m_intrusiveTable.m_buckets[this->m_EnumToNameInternal.m_intrusiveTable.m_numBuckets];
004157a8      void* m_firstInterestingBucket_1;
004157a8      int32_t* i_3;
004157a8      
004157a8      if (this->m_EnumToNameInternal.m_intrusiveTable.m_firstInterestingBucket == ecx_6)
004157a8      {
004157c8      label_4157c8:
004157c8          m_firstInterestingBucket_1 = nullptr;
004157ca          i_3 = nullptr;
004157a8      }
004157a8      else
004157a8      {
004157b0          while (true)
004157b0          {
004157b0              class HashTableData<unsigned long,PStringBase<char> >** m_firstInterestingBucket = this->m_EnumToNameInternal.m_intrusiveTable.m_firstInterestingBucket;
004157b0              
004157b9              if (*(uint32_t*)m_firstInterestingBucket != 0)
004157b9              {
004157e2                  m_firstInterestingBucket_1 = this->m_EnumToNameInternal.m_intrusiveTable.m_firstInterestingBucket;
004157e8                  i_3 = *(uint32_t*)m_firstInterestingBucket_1;
004157e8                  break;
004157b9              }
004157b9              
004157c0              this->m_EnumToNameInternal.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
004157c0              
004157c6              if (&m_firstInterestingBucket[1] == ecx_6)
004157c6                  goto label_4157c8;
004157b0          }
004157a8      }
004157a8      
004157ec      void* m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004157ec      
004157ee      if (i_3 != 0)
004157ee      {
004157fb          while (true)
004157fb          {
00415806              if (_stricmp(arg2->m_charbuffer, i_3[2]) == 0)
00415806              {
00415848                  *(uint32_t*)arg3 = *(uint32_t*)i_3;
0041584a                  uint32_t* eax_10;
0041584a                  eax_10 = 1;
00415850                  return 1;
00415806              }
00415806              
00415808              i_3 = i_3[1];
00415808              
0041580d              if (i_3 == 0)
0041580d              {
0041582b                  int32_t* i_1;
0041582b                  
0041582b                  do
0041582b                  {
00415820                      m_firstInterestingBucket_2 += 4;
00415820                      
00415825                      if (m_firstInterestingBucket_2 == &this->m_EnumToNameInternal.m_intrusiveTable.m_buckets[this->m_EnumToNameInternal.m_intrusiveTable.m_numBuckets])
00415825                          goto label_415836;
00415825                      
00415827                      i_1 = *(uint32_t*)m_firstInterestingBucket_2;
0041582b                  } while (i_1 == 0);
0041582b                  
0041582d                  i_3 = i_1;
0041582d                  
00415831                  if (i_3 == 0)
00415831                      break;
0041580d              }
004157fb          }
004157ee      }
004157ee      
00415836  label_415836:
00415836      m_firstInterestingBucket_1 = 0;
0041583c      return 0;
00415730  }

00415853                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00415860  void __thiscall EnumIDMap::GetSubDataIDs(class EnumIDMap const* this, class QualifiedDataIDArray* arg2)

00415860  {
00415876      void __return;
00415876      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_EnumToID.m_intrusiveTable, &__return);
0041587b      class HashTableData<unsigned long,DBOCache *>* i_2 = eax->m_currElement;
00415880      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00415882      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00415882      
00415889      if (i_2 != 0)
00415889      {
004158a5          while (true)
004158a5          {
004158a5              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, i_2->m_data, 0), 0);
004158aa              i_2 = i_2->m_hashNext;
004158aa              
004158af              if (i_2 == 0)
004158af              {
004158cb                  class HashTableData<unsigned long,DBOCache *>* i;
004158cb                  
004158cb                  do
004158cb                  {
004158c0                      m_currBucket = &m_currBucket[1];
004158c0                      
004158c5                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004158c5                          goto label_4158df;
004158c5                      
004158c7                      i = *(uint32_t*)m_currBucket;
004158cb                  } while (i == 0);
004158cb                  
004158cd                  i_2 = i;
004158cd                  
004158d1                  if (i_2 == 0)
004158d1                      break;
004158af              }
004158a5          }
00415889      }
00415889      
004158df  label_4158df:
004158df      void* ecx_5 = &this->m_EnumToIDInternal.m_intrusiveTable.m_buckets[this->m_EnumToIDInternal.m_intrusiveTable.m_numBuckets];
004158e8      int32_t* m_firstInterestingBucket_1;
004158e8      void* i_3;
004158e8      
004158e8      if (this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket == ecx_5)
004158e8      {
00415908      label_415908:
00415908          m_firstInterestingBucket_1 = nullptr;
0041590a          i_3 = nullptr;
004158e8      }
004158e8      else
004158e8      {
004158f0          while (true)
004158f0          {
004158f0              class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_firstInterestingBucket = this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket;
004158f0              
004158f9              if (*(uint32_t*)m_firstInterestingBucket != 0)
004158f9              {
0041590e                  m_firstInterestingBucket_1 = this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket;
00415914                  i_3 = *(uint32_t*)m_firstInterestingBucket_1;
00415914                  break;
004158f9              }
004158f9              
00415900              this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
00415900              
00415906              if (&m_firstInterestingBucket[1] == ecx_5)
00415906                  goto label_415908;
004158f0          }
004158e8      }
004158e8      
00415918      int32_t* m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00415918      
0041591a      if (i_3 != 0)
0041591a      {
00415935          while (true)
00415935          {
00415935              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, *(uint32_t*)((char*)i_3 + 8), 0), 2);
0041593a              i_3 = *(uint32_t*)((char*)i_3 + 4);
0041593a              
0041593f              if (i_3 == 0)
0041593f              {
0041595b                  void* i_1;
0041595b                  
0041595b                  do
0041595b                  {
00415950                      m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
00415950                      
00415955                      if (m_firstInterestingBucket_2 == &this->m_EnumToIDInternal.m_intrusiveTable.m_buckets[this->m_EnumToIDInternal.m_intrusiveTable.m_numBuckets])
00415969                          return;
00415969                      
00415957                      i_1 = *(uint32_t*)m_firstInterestingBucket_2;
0041595b                  } while (i_1 == 0);
0041595b                  
0041595d                  i_3 = i_1;
0041595d                  
00415961                  if (i_3 == 0)
00415961                      break;
0041593f              }
00415935          }
0041591a      }
00415860  }

0041588d                                         8d 49 00                                                               .I.
0041596c                                      90 90 90 90                                                              ....

00415970  uint8_t __thiscall EnumIDMap::EnumToDID(class EnumIDMap const* this, uint32_t const arg2, class IDClass<_tagDataID,32,0>* arg3)

00415970  {
00415988      int32_t* eax_3 = this->m_EnumToID.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_EnumToID.m_intrusiveTable.m_numBuckets)];
00415988      
0041598c      if (eax_3 == 0)
0041598c      {
004159b4      label_4159b4:
004159b4          eax_3 = this->m_EnumToIDInternal.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_EnumToIDInternal.m_intrusiveTable.m_numBuckets)];
004159b4          
004159b8          if (eax_3 == 0)
004159ce              return 0;
004159ce          
004159c2          while (*(uint32_t*)eax_3 != arg2)
004159c2          {
004159c4              eax_3 = eax_3[1];
004159c4              
004159c9              if (eax_3 == 0)
004159ce                  return 0;
004159c2          }
004159c2          
004159d3          if (eax_3 == 0)
004159ce              return 0;
0041598c      }
0041598c      else
0041598c      {
00415992          while (*(uint32_t*)eax_3 != arg2)
00415992          {
00415994              eax_3 = eax_3[1];
00415994              
00415999              if (eax_3 == 0)
00415999                  goto label_4159b4;
00415992          }
00415992          
0041599f          if (eax_3 == 0)
0041599f              goto label_4159b4;
0041598c      }
0041598c      
004159dc      arg3->id = eax_3[2];
004159e4      return 1;
00415970  }

004159e7                       90 90 90 90 90 90 90 90 90                                                         .........

004159f0  uint8_t __thiscall EnumIDMap::GetName(class EnumIDMap const* this, uint32_t const arg2, class PStringBase<char>* arg3)

004159f0  {
00415a0b      if ((HashTable<unsigned long,PStringBase<char>,0>::find(&this->m_EnumToName, &arg2, arg3) == 0 && HashTable<unsigned long,PStringBase<char>,0>::find(&this->m_EnumToNameInternal, &arg2, arg3) == 0))
00415a26          return 0;
00415a26      
00415a30      return 1;
004159f0  }

00415a33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00415a40  uint8_t __thiscall DualEnumIDMap::DIDToEnum(class DualEnumIDMap const* this, class IDClass<_tagDataID,32,0> arg2, uint32_t* arg3)

00415a40  {
00415a5c      int32_t* i;
00415a5c      
00415a5c      for (i = this->m_IDToEnum.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_IDToEnum.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00415a5c      {
00415a62          if (*(uint32_t*)i == arg2)
00415a62          {
00415a73              if (i == 0)
00415a73                  break;
00415a73              
00415a7c              *(uint32_t*)arg3 = i[2];
00415a7e              i = 1;
00415a81              return 1;
00415a62          }
00415a5c      }
00415a5c      
00415a6b      i = 0;
00415a6e      return 0;
00415a40  }

00415a84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00415a90  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>* this, uint32_t arg2)

00415a90  {
00415a9b      arg2 = arg2;
00415a9f      uint8_t edx = ((int8_t)arg2);
00415aa3      this->m_buckets = nullptr;
00415aa6      this->m_firstInterestingBucket = nullptr;
00415aa9      this->m_numBuckets = 0;
00415aac      this->m_numElements = 0;
00415ab0      this->vtable = 0x795294;
00415ab6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00415ac9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00415ac9      
00415ad3      if (eax == bucketSizesEnd_1)
00415ad5          eax -= 4;
00415ad5      
00415ad8      uint32_t eax_1 = *(uint32_t*)eax;
00415add      this->m_numBuckets = eax_1;
00415add      
00415ae0      if (eax_1 > 0x17)
00415af6          this->m_buckets = operator new[]((eax_1 << 2));
00415ae0      else
00415ae5          this->m_buckets = &this->m_aInplaceBuckets;
00415ae5      
00415afc      class HashTableData<unsigned long,PStringBase<char> >** m_buckets = this->m_buckets;
00415aff      uint32_t ecx_3 = (this->m_numBuckets << 2);
00415b05      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00415b16      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00415a90  }

00415b1f                                                                                               90                                 .

00415b20  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>* this, uint32_t arg2)

00415b20  {
00415b2b      arg2 = arg2;
00415b2f      uint8_t edx = ((int8_t)arg2);
00415b33      this->m_buckets = nullptr;
00415b36      this->m_firstInterestingBucket = nullptr;
00415b39      this->m_numBuckets = 0;
00415b3c      this->m_numElements = 0;
00415b40      this->vtable = 0x795298;
00415b46      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00415b59      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00415b59      
00415b63      if (eax == bucketSizesEnd_1)
00415b65          eax -= 4;
00415b65      
00415b68      uint32_t eax_1 = *(uint32_t*)eax;
00415b6d      this->m_numBuckets = eax_1;
00415b6d      
00415b70      if (eax_1 > 0x17)
00415b86          this->m_buckets = operator new[]((eax_1 << 2));
00415b70      else
00415b75          this->m_buckets = &this->m_aInplaceBuckets;
00415b75      
00415b8c      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_buckets = this->m_buckets;
00415b8f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00415b95      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00415ba6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00415b20  }

00415baf                                               90                                                                 .

00415bb0  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>* this)

00415bb0  {
00415bb8      while (this->m_numElements != 0)
00415bb8      {
00415bcd          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00415bd3          int32_t* m_firstInterestingBucket_2;
00415bd3          void* ebx_1;
00415bd3          
00415bd3          if (this->m_firstInterestingBucket == ecx_1)
00415bd3          {
00415be7          label_415be7:
00415be7              m_firstInterestingBucket_2 = nullptr;
00415be9              ebx_1 = nullptr;
00415bd3          }
00415bd3          else
00415bd3          {
00415bd5              while (true)
00415bd5              {
00415bd5                  class HashTableData<unsigned long,PStringBase<char> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
00415bd5                  
00415bdb                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00415bdb                  {
00415bed                      int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00415bf0                      ebx_1 = *(uint32_t*)m_firstInterestingBucket_1;
00415bf2                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00415bf2                      break;
00415bdb                  }
00415bdb                  
00415be2                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00415be2                  
00415be5                  if (&m_firstInterestingBucket[1] == ecx_1)
00415be5                      goto label_415be7;
00415bd5              }
00415bd3          }
00415bd3          
00415bf4          void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
00415bf4          
00415bf8          if (eax_3 == ebx_1)
00415c10              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00415bf8          else
00415bf8          {
00415c07              void* ecx_2;
00415c07              
00415c07              do
00415c07              {
00415c00                  ecx_2 = eax_3;
00415c02                  eax_3 = *(uint32_t*)((char*)eax_3 + 4);
00415c07              } while (eax_3 != ebx_1);
00415c07              
00415c0b              if (ecx_2 != 0)
00415c17                  *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00415c0b              else
00415c10                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00415bf8          }
00415bf8          
00415c20          this->m_numElements -= 1;
00415c20          
00415c23          if (ebx_1 != 0)
00415c23          {
00415c28              int32_t* edi_2 = (*(uint32_t*)((char*)ebx_1 + 8) - 0x14);
00415c28              
00415c37              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00415c3f                  **(uint32_t**)edi_2(1);
00415c3f              
00415c42              operator delete(ebx_1);
00415c23          }
00415bb8      }
00415bb0  }

00415c5a                                                                                90 90 90 90 90 90                            ......

00415c60  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>* arg2, class Archive* arg3)

00415c60  {
00415c66      class Archive* esi = arg3;
00415c66      
00415c72      if ((!(esi->m_flags) & 1) != 0)
00415c78          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
00415c78      
00415c86      int32_t ebx;
00415c86      
00415c86      if ((((int8_t)esi->m_flags) & 5) != 1)
00415cc5          ebx = arg3;
00415c86      else
00415c86      {
00415c8f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00415c95          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00415c9d          arg3 = arg2->m_numBuckets;
00415cad          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
00415cad          
00415cb7          if (eax_2 == bucketSizesEnd_1)
00415cb9              eax_2 -= 4;
00415cb9          
00415cc0          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
00415c86      }
00415c86      
00415ccd      Archive::CheckAlignment(esi, 1);
00415cd6      char* eax_3 = Archive::GetBytes(esi, 1);
00415cd6      
00415cdd      if (eax_3 != 0)
00415cdd      {
00415ce3          if ((esi->m_flags & 1) == 0)
00415ce9              ebx = *(uint8_t*)eax_3;
00415ce3          else
00415ce5              *(uint8_t*)eax_3 = ebx;
00415cdd      }
00415cdd      
00415cef      if ((esi->m_flags & 5) == 0)
00415cef      {
00415cf7          uint32_t eax_4 = ((uint32_t)ebx);
00415cf7          
00415cfc          if (eax_4 < 0x17)
00415d15              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
00415cfc          else
00415d00              Archive::RaiseError(esi);
00415cef      }
00415cef      
00415d21      if ((((int8_t)esi->m_flags) & 5) == 1)
00415d2a          arg3 = arg2->m_numElements;
00415d2a      
00415d39      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
00415d39      
00415d4a      if ((((int8_t)esi->m_flags) & 5) == 1)
00415d4a      {
00415d59          void __return;
00415d59          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
00415d5e          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
00415d60          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
00415d63          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
00415d63          
00415d68          while (i != 0)
00415d68          {
00415dbd              do
00415dbd              {
00415d6e                  Archive::CheckAlignment(esi, 4);
00415d77                  uint8_t* eax_7 = Archive::GetBytes(esi, 4);
00415d77                  
00415d7e                  if (eax_7 != 0)
00415d7e                  {
00415d84                      if ((esi->m_flags & 1) == 0)
00415d8e                          i->m_hashKey = *(uint32_t*)eax_7;
00415d84                      else
00415d88                          *(uint32_t*)eax_7 = i->m_hashKey;
00415d7e                  }
00415d7e                  
00415d94                  Archive::CheckAlignment(esi, 4);
00415d9d                  uint8_t* eax_8 = Archive::GetBytes(esi, 4);
00415d9d                  
00415da4                  if (eax_8 != 0)
00415da4                  {
00415daa                      if ((esi->m_flags & 1) == 0)
00415db5                          i->m_data = *(uint32_t*)eax_8;
00415daa                      else
00415daf                          *(uint32_t*)eax_8 = i->m_data;
00415da4                  }
00415da4                  
00415db8                  i = i->m_hashNext;
00415dbd              } while (i != 0);
00415dbd              
00415dc8              while (true)
00415dc8              {
00415dc8                  m_currBucket = &m_currBucket[1];
00415dc8                  
00415dcd                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00415dcd                      break;
00415dcd                  
00415dcf                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
00415dcf                  
00415dd4                  if (i_1 != 0)
00415dd4                  {
00415dd6                      i = i_1;
00415dd8                      break;
00415dd4                  }
00415dc8              }
00415d68          }
00415d4a      }
00415d4a      
00415dde      if ((esi->m_flags & 5) == 0)
00415dde      {
00415de6          uint32_t eax_11 = Archive::GetSizeLeft(esi);
00415deb          class Archive* ecx_19 = arg3;
00415deb          
00415df1          if (ecx_19 > eax_11)
00415e98              Archive::RaiseError(esi);
00415df1          else
00415df1          {
00415df7              void* ebx_3 = nullptr;
00415df9              int32_t ebp_1 = 0;
00415df9              
00415dfd              if (ecx_19 > 0)
00415dfd              {
00415e05                  while (true)
00415e05                  {
00415e05                      void* eax_12 = operator new(0xc);
00415e0a                      void* edi_1 = nullptr;
00415e0a                      
00415e11                      if (eax_12 != 0)
00415e11                      {
00415e13                          *(uint32_t*)((char*)eax_12 + 4) = 0;
00415e16                          edi_1 = eax_12;
00415e11                      }
00415e11                      
00415e1c                      Archive::CheckAlignment(esi, 4);
00415e25                      uint8_t* eax_13 = Archive::GetBytes(esi, 4);
00415e25                      
00415e2c                      if (eax_13 != 0)
00415e2c                      {
00415e32                          if ((esi->m_flags & 1) == 0)
00415e3c                              *(uint32_t*)edi_1 = *(uint32_t*)eax_13;
00415e32                          else
00415e36                              *(uint32_t*)eax_13 = *(uint32_t*)edi_1;
00415e2c                      }
00415e2c                      
00415e42                      Archive::CheckAlignment(esi, 4);
00415e4b                      uint8_t* eax_15 = Archive::GetBytes(esi, 4);
00415e4b                      
00415e52                      if (eax_15 != 0)
00415e52                      {
00415e58                          if ((esi->m_flags & 1) == 0)
00415e63                              *(uint32_t*)((char*)edi_1 + 8) = *(uint32_t*)eax_15;
00415e58                          else
00415e5d                              *(uint32_t*)eax_15 = *(uint32_t*)((char*)edi_1 + 8);
00415e52                      }
00415e52                      
00415e6e                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
00415ea4                          return;
00415ea4                      
00415e7d                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebx_3) == 0)
00415e7d                          break;
00415e7d                      
00415e83                      ebp_1 += 1;
00415e86                      ebx_3 = edi_1;
00415e86                      
00415e88                      if (ebp_1 >= arg3)
00415e95                          return;
00415e05                  }
00415e05                  
00415e98                  Archive::RaiseError(esi);
00415dfd              }
00415df1          }
00415dde      }
00415c60  }

00415ea5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00415eb0  void __fastcall EnumIDMap::Destroy(class EnumIDMap* this)

00415eb0  {
00415eb6      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_EnumToID.m_intrusiveTable);
00415ec1      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_EnumToName.m_intrusiveTable);
00415ecc      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_EnumToIDInternal.m_intrusiveTable);
00415ed8      /* tailcall */
00415ed8      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_EnumToNameInternal.m_intrusiveTable);
00415eb0  }

00415edd                                                                                         90 90 90                               ...

00415ee0  uint8_t __fastcall DualEnumIDMap::InitLoad(class DualEnumIDMap* this)

00415ee0  {
00415ee3      int32_t i;
00415ee3      int32_t i_4 = i;
00415ef1      char var_19 = 1;
00415ef6      void __return;
00415ef6      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_EnumToID.m_intrusiveTable, &__return);
00415efb      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00415efd      class HashTableData<unsigned long,DBOCache *>* i_5 = eax->m_currElement;
00415f09      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00415f09      
00415f0d      if (i_5 != 0)
00415f0d      {
00415f15          while (true)
00415f15          {
00415f15              void* eax_1 = operator new(0xc);
00415f1a              void* ebp_1 = nullptr;
00415f1a              
00415f21              if (eax_1 != 0)
00415f21              {
00415f23                  class DBOCache* m_data = i_5->m_data;
00415f26                  *(uint32_t*)((char*)eax_1 + 4) = 0;
00415f29                  *(uint32_t*)eax_1 = m_data;
00415f2d                  *(uint32_t*)((char*)eax_1 + 8) = i_5->m_hashKey;
00415f30                  ebp_1 = eax_1;
00415f21              }
00415f21              
00415f32              i = *(uint32_t*)ebp_1;
00415f45              void** ecx_3 = &this->m_IDToEnum.m_intrusiveTable.m_buckets[(COMBINE(0, i) % this->m_IDToEnum.m_intrusiveTable.m_numBuckets)];
00415f48              void* eax_4 = *(uint32_t*)ecx_3;
00415f48              
00415f4c              if (eax_4 == 0)
00415f4c              {
00415f63              label_415f63:
00415f63                  *(uint32_t*)((char*)ebp_1 + 4) = *(uint32_t*)ecx_3;
00415f66                  *(uint32_t*)ecx_3 = ebp_1;
00415f66                  
00415f6e                  if (ecx_3 < this->m_IDToEnum.m_intrusiveTable.m_firstInterestingBucket)
00415f70                      this->m_IDToEnum.m_intrusiveTable.m_firstInterestingBucket = ecx_3;
00415f70                  
00415f76                  this->m_IDToEnum.m_intrusiveTable.m_numElements += 1;
00415f7c                  i = 1;
00415f4c              }
00415f4c              else
00415f4c              {
00415f52                  while (*(uint32_t*)eax_4 != i)
00415f52                  {
00415f54                      eax_4 = *(uint32_t*)((char*)eax_4 + 4);
00415f54                      
00415f59                      if (eax_4 == 0)
00415f59                          goto label_415f63;
00415f52                  }
00415f52                  
00415f5f                  if (eax_4 == 0)
00415f5f                      goto label_415f63;
00415f5f                  
00415f81                  operator delete(ebp_1);
00415f96                  i = 0;
00415f98                  IError::ReportDataErrorFrom(this->m_DID.id, "DataID 0x%08X used multiple time…", i_5->m_data);
00415f4c              }
00415f4c              
00415fa0              ecx_3 = var_19;
00415fa4              i_5 = i_5->m_hashNext;
00415fa7              ecx_3 &= i;
00415fab              var_19 = ecx_3;
00415fab              
00415faf              if (i_5 == 0)
00415faf              {
00415fd5                  class HashTableData<unsigned long,DBOCache *>* i_1;
00415fd5                  
00415fd5                  do
00415fd5                  {
00415fc6                      void* m_currBucket_1 = &m_currBucket[1];
00415fcb                      m_currBucket = m_currBucket_1;
00415fcb                      
00415fcf                      if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00415fcf                          goto label_415ff3;
00415fcf                      
00415fd1                      i_1 = *(uint32_t*)m_currBucket_1;
00415fd5                  } while (i_1 == 0);
00415fd5                  
00415fd7                  i_5 = i_1;
00415fd7                  
00415fdb                  if (i_5 == 0)
00415fdb                      break;
00415faf              }
00415f15          }
00415f0d      }
00415f0d      
00415ff3  label_415ff3:
00415ff3      void* ecx_7 = &this->m_EnumToIDInternal.m_intrusiveTable.m_buckets[this->m_EnumToIDInternal.m_intrusiveTable.m_numBuckets];
00415ff8      int32_t** m_firstInterestingBucket_1;
00415ff8      int32_t* i_6;
00415ff8      
00415ff8      if (this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket == ecx_7)
00415ff8      {
00416018      label_416018:
00416018          m_firstInterestingBucket_1 = nullptr;
0041601a          i_6 = nullptr;
00415ff8      }
00415ff8      else
00415ff8      {
00416000          while (true)
00416000          {
00416000              class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_firstInterestingBucket = this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket;
00416000              
00416009              if (*(uint32_t*)m_firstInterestingBucket != 0)
00416009              {
0041601e                  m_firstInterestingBucket_1 = this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket;
00416024                  i_6 = *(uint32_t*)m_firstInterestingBucket_1;
00416024                  break;
00416009              }
00416009              
00416010              this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
00416010              
00416016              if (&m_firstInterestingBucket[1] == ecx_7)
00416016                  goto label_416018;
00416000          }
00415ff8      }
00415ff8      
00416028      int32_t** m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00416028      
0041602c      if (i_6 != 0)
0041602c      {
00416034          while (true)
00416034          {
00416034              void* eax_11 = operator new(0xc);
00416039              void* ebp_2 = nullptr;
00416039              
00416040              if (eax_11 != 0)
00416040              {
00416042                  int32_t ecx_8 = i_6[2];
00416045                  *(uint32_t*)((char*)eax_11 + 4) = 0;
00416048                  *(uint32_t*)eax_11 = ecx_8;
0041604c                  *(uint32_t*)((char*)eax_11 + 8) = *(uint32_t*)i_6;
0041604f                  ebp_2 = eax_11;
00416040              }
00416040              
00416051              int32_t i_2 = *(uint32_t*)ebp_2;
00416064              void* ecx_9 = &this->m_IDToEnum.m_intrusiveTable.m_buckets[(COMBINE(0, i_2) % this->m_IDToEnum.m_intrusiveTable.m_numBuckets)];
00416067              int32_t* eax_14 = *(uint32_t*)ecx_9;
00416067              
0041606b              if (eax_14 == 0)
0041606b              {
00416083              label_416083:
00416083                  *(uint32_t*)((char*)ebp_2 + 4) = *(uint32_t*)ecx_9;
00416086                  *(uint32_t*)ecx_9 = ebp_2;
00416086                  
0041608e                  if (ecx_9 < this->m_IDToEnum.m_intrusiveTable.m_firstInterestingBucket)
00416090                      this->m_IDToEnum.m_intrusiveTable.m_firstInterestingBucket = ecx_9;
00416090                  
00416096                  this->m_IDToEnum.m_intrusiveTable.m_numElements += 1;
0041609c                  i_2 = 1;
0041606b              }
0041606b              else
0041606b              {
00416072                  while (*(uint32_t*)eax_14 != i_2)
00416072                  {
00416074                      eax_14 = eax_14[1];
00416074                      
00416079                      if (eax_14 == 0)
00416079                          goto label_416083;
00416072                  }
00416072                  
0041607f                  if (eax_14 == 0)
0041607f                      goto label_416083;
0041607f                  
004160a1                  operator delete(ebp_2);
004160b6                  i_2 = 0;
004160b8                  IError::ReportDataErrorFrom(this->m_DID.id, "DataID 0x%08X used multiple time…", i_6[2]);
0041606b              }
0041606b              
004160c0              ecx_9 = var_19;
004160c4              i_6 = i_6[1];
004160c7              ecx_9 &= i_2;
004160cb              var_19 = ecx_9;
004160cb              
004160cf              if (i_6 == 0)
004160cf              {
004160f7                  int32_t* i_3;
004160f7                  
004160f7                  do
004160f7                  {
004160e8                      m_firstInterestingBucket_1 = &m_firstInterestingBucket_2[1];
004160ed                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004160ed                      
004160f1                      if (m_firstInterestingBucket_1 == &this->m_EnumToIDInternal.m_intrusiveTable.m_buckets[this->m_EnumToIDInternal.m_intrusiveTable.m_numBuckets])
004160f1                          goto label_416103;
004160f1                      
004160f3                      i_3 = *(uint32_t*)m_firstInterestingBucket_1;
004160f7                  } while (i_3 == 0);
004160f7                  
004160f9                  i_6 = i_3;
004160f9                  
004160fd                  if (i_6 == 0)
004160fd                      break;
004160cf              }
00416034          }
0041602c      }
0041602c      
00416103  label_416103:
00416103      m_firstInterestingBucket_1 = var_19;
0041610e      return m_firstInterestingBucket_1;
00415ee0  }

0041610f                                               90                                                                 .

00416110  void* __thiscall HashTable<unsigned long,PStringBase<char>,0>::`scalar deleting destructor'(class HashTable<unsigned long,PStringBase<char>,0>* this, uint32_t arg2)

00416110  {
00416119      this->vtable = 0x79529c;
0041611f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_intrusiveTable);
00416124      class HashTableData<unsigned long,PStringBase<char> >** m_buckets = this->m_intrusiveTable.m_buckets;
00416114      this->m_intrusiveTable.vtable = 0x795294;
00416114      
00416132      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00416135          operator delete[](m_buckets);
00416135      
00416114      this->m_intrusiveTable.m_buckets = nullptr;
00416114      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00416114      this->m_intrusiveTable.m_numBuckets = 0;
00416114      this->m_intrusiveTable.m_numElements = 0;
00416114      
00416150      if ((arg2 & 1) != 0)
00416153          operator delete(this);
00416153      
0041615f      return this;
00416110  }

00416162        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00416170  void* __thiscall HashTable<unsigned long,IDClass<_tagDataID,32,0>,0>::`scalar deleting destructor'(class HashTable<unsigned long,IDClass<_tagDataID,32,0>,0>* this, uint32_t arg2)

00416170  {
00416179      this->vtable = &HashTable<unsigned long,class IDClass<struct _tagDataID,32,0>,0>::`vftable';
0041617f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00416184      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_buckets = this->m_intrusiveTable.m_buckets;
00416174      this->m_intrusiveTable.vtable = 0x795298;
00416174      
00416192      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00416195          operator delete[](m_buckets);
00416195      
00416174      this->m_intrusiveTable.m_buckets = nullptr;
00416174      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00416174      this->m_intrusiveTable.m_numBuckets = 0;
00416174      this->m_intrusiveTable.m_numElements = 0;
00416174      
004161b0      if ((arg2 & 1) != 0)
004161b3          operator delete(this);
004161b3      
004161bf      return this;
00416170  }

004161c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004161d0  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>,HashTableData<unsigned long,PStringBase<char> > *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>* arg2, class Archive* arg3)

004161d0  {
004161d7      class Archive* edi = arg3;
004161d7      
004161e2      if ((!(edi->m_flags) & 1) != 0)
004161e8          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
004161e8      
004161f6      int32_t ebx;
004161f6      
004161f6      if ((((int8_t)edi->m_flags) & 5) != 1)
00416235          ebx = arg3;
004161f6      else
004161f6      {
004161ff          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00416205          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0041620d          arg3 = arg2->m_numBuckets;
0041621d          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0041621d          
00416227          if (eax_2 == bucketSizesEnd_1)
00416229              eax_2 -= 4;
00416229          
00416230          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
004161f6      }
004161f6      
0041623d      Archive::CheckAlignment(edi, 1);
00416246      char* eax_3 = Archive::GetBytes(edi, 1);
00416246      
0041624d      if (eax_3 != 0)
0041624d      {
00416253          if ((edi->m_flags & 1) == 0)
00416259              ebx = *(uint8_t*)eax_3;
00416253          else
00416255              *(uint8_t*)eax_3 = ebx;
0041624d      }
0041624d      
0041625f      if ((edi->m_flags & 5) == 0)
0041625f      {
00416267          uint32_t eax_4 = ((uint32_t)ebx);
00416267          
0041626c          if (eax_4 < 0x17)
00416285              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
0041626c          else
00416270              Archive::RaiseError(edi);
0041625f      }
0041625f      
00416291      if ((((int8_t)edi->m_flags) & 5) == 1)
0041629a          arg3 = arg2->m_numElements;
0041629a      
004162a9      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, edi);
004162a9      
004162ba      if ((((int8_t)edi->m_flags) & 5) == 1)
004162ba      {
004162c5          void __return;
004162c5          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
004162ca          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
004162cc          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
004162cf          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
004162cf          
004162d4          while (i != 0)
004162d4          {
0041630a              do
0041630a              {
004162da                  Archive::CheckAlignment(edi, 4);
004162e3                  uint8_t* eax_7 = Archive::GetBytes(edi, 4);
004162e3                  
004162ea                  if (eax_7 != 0)
004162ea                  {
004162f0                      if ((edi->m_flags & 1) == 0)
004162fa                          i->m_hashKey = *(uint32_t*)eax_7;
004162f0                      else
004162f4                          *(uint32_t*)eax_7 = i->m_hashKey;
004162ea                  }
004162ea                  
00416300                  PStringBase<char>::Serialize(&i->m_data, edi);
00416305                  i = i->m_hashNext;
0041630a              } while (i != 0);
0041630a              
00416315              while (true)
00416315              {
00416315                  m_currBucket = &m_currBucket[1];
00416315                  
0041631a                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0041631a                      break;
0041631a                  
0041631c                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0041631c                  
00416321                  if (i_1 != 0)
00416321                  {
00416323                      i = i_1;
00416325                      break;
00416321                  }
00416315              }
004162d4          }
004162ba      }
004162ba      
0041632b      if ((edi->m_flags & 5) == 0)
0041632b      {
00416333          uint32_t eax_10 = Archive::GetSizeLeft(edi);
00416338          class Archive* ecx_17 = arg3;
00416338          
0041633e          if (ecx_17 > eax_10)
004163e1              Archive::RaiseError(edi);
0041633e          else
0041633e          {
00416344              void* ebx_3 = nullptr;
00416346              int32_t ebp_1 = 0;
00416346              
0041634a              if (ecx_17 > 0)
0041634a              {
00416357                  while (true)
00416357                  {
00416357                      void* esi_1 = operator new(0xc);
00416357                      
0041635e                      if (esi_1 == 0)
0041637e                          esi_1 = nullptr;
0041635e                      else
0041635e                      {
00416360                          *(uint32_t*)((char*)esi_1 + 4) = 0;
00416367                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00416373                          *(uint32_t*)((char*)esi_1 + 8) = PStringBase<char>::s_NullBuffer_1;
00416376                          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0041635e                      }
0041635e                      
00416384                      Archive::CheckAlignment(edi, 4);
0041638d                      uint8_t* eax_14 = Archive::GetBytes(edi, 4);
0041638d                      
00416394                      if (eax_14 != 0)
00416394                      {
0041639a                          if ((edi->m_flags & 1) == 0)
004163a4                              *(uint32_t*)esi_1 = *(uint32_t*)eax_14;
0041639a                          else
0041639e                              *(uint32_t*)eax_14 = *(uint32_t*)esi_1;
00416394                      }
00416394                      
004163aa                      PStringBase<char>::Serialize(((char*)esi_1 + 8), edi);
004163aa                      
004163b7                      if ((((int8_t)(edi->m_flags >> 2)) & 1) != 0)
004163ed                          return;
004163ed                      
004163c6                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, esi_1, ebx_3) == 0)
004163c6                          break;
004163c6                      
004163cc                      ebp_1 += 1;
004163cf                      ebx_3 = esi_1;
004163cf                      
004163d1                      if (ebp_1 >= arg3)
004163de                          return;
00416357                  }
00416357                  
004163e1                  Archive::RaiseError(edi);
0041634a              }
0041633e          }
0041632b      }
004161d0  }

004163ee                                            90 90                                                                ..

004163f0  void __fastcall EnumIDMap::EnumIDMap(class EnumIDMap* this)

004163f0  {
004163f9      DBObj::DBObj(this, INVALID_DID.id);
004163fe      this->vtable = 0x7952c8;
00416409      this->m_EnumToID.vtable = &HashTable<unsigned long,class IDClass<struct _tagDataID,32,0>,0>::`vftable';
00416410      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>(&this->m_EnumToID.m_intrusiveTable, 0x10);
0041641d      this->m_EnumToIDInternal.vtable = &HashTable<unsigned long,class IDClass<struct _tagDataID,32,0>,0>::`vftable';
00416427      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>(&this->m_EnumToIDInternal.m_intrusiveTable, 0x10);
00416434      this->m_EnumToName.vtable = 0x79529c;
0041643e      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>(&this->m_EnumToName.m_intrusiveTable, 0x10);
0041644b      this->m_EnumToNameInternal.vtable = 0x79529c;
00416455      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>(&this->m_EnumToNameInternal.m_intrusiveTable, 0x10);
004163f0  }

0041645e                                                                                            90 90                                ..

00416460  uint32_t EnumIDMap::GetDBOType(class EnumIDMap const* this @ ecx) __pure

00416460  {
00416465      return 0x26;
00416460  }

00416466                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00416470  void __fastcall EnumIDMap::~EnumIDMap(class EnumIDMap* this)

00416470  {
00416478      this->vtable = 0x7952c8;
0041647e      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_EnumToID.m_intrusiveTable);
00416489      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_EnumToName.m_intrusiveTable);
00416494      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_EnumToIDInternal.m_intrusiveTable);
0041649f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_EnumToNameInternal.m_intrusiveTable);
004164ac      this->m_EnumToNameInternal.vtable = 0x79529c;
004164b6      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_EnumToNameInternal.m_intrusiveTable);
004164bb      class HashTableData<unsigned long,PStringBase<char> >** m_buckets = this->m_EnumToNameInternal.m_intrusiveTable.m_buckets;
004164a4      this->m_EnumToNameInternal.m_intrusiveTable.vtable = 0x795294;
004164a4      
004164c9      if (m_buckets != &this->m_EnumToNameInternal.m_intrusiveTable.m_aInplaceBuckets)
004164cc          operator delete[](m_buckets);
004164cc      
004164a4      this->m_EnumToNameInternal.m_intrusiveTable.m_buckets = nullptr;
004164a4      this->m_EnumToNameInternal.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004164a4      this->m_EnumToNameInternal.m_intrusiveTable.m_numBuckets = 0;
004164a4      this->m_EnumToNameInternal.m_intrusiveTable.m_numElements = 0;
004164ea      this->m_EnumToName.vtable = 0x79529c;
004164f4      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_EnumToName.m_intrusiveTable);
004164f9      class HashTableData<unsigned long,PStringBase<char> >** m_buckets_1 = this->m_EnumToName.m_intrusiveTable.m_buckets;
004164e2      this->m_EnumToName.m_intrusiveTable.vtable = 0x795294;
004164e2      
00416507      if (m_buckets_1 != &this->m_EnumToName.m_intrusiveTable.m_aInplaceBuckets)
0041650a          operator delete[](m_buckets_1);
0041650a      
004164e2      this->m_EnumToName.m_intrusiveTable.m_buckets = nullptr;
004164e2      this->m_EnumToName.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004164e2      this->m_EnumToName.m_intrusiveTable.m_numBuckets = 0;
004164e2      this->m_EnumToName.m_intrusiveTable.m_numElements = 0;
00416526      this->m_EnumToIDInternal.vtable = &HashTable<unsigned long,class IDClass<struct _tagDataID,32,0>,0>::`vftable';
00416530      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_EnumToIDInternal.m_intrusiveTable);
00416535      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_buckets_2 = this->m_EnumToIDInternal.m_intrusiveTable.m_buckets;
0041651e      this->m_EnumToIDInternal.m_intrusiveTable.vtable = 0x795298;
0041651e      
00416543      if (m_buckets_2 != &this->m_EnumToIDInternal.m_intrusiveTable.m_aInplaceBuckets)
00416546          operator delete[](m_buckets_2);
00416546      
0041651e      this->m_EnumToIDInternal.m_intrusiveTable.m_buckets = nullptr;
0041651e      this->m_EnumToIDInternal.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0041651e      this->m_EnumToIDInternal.m_intrusiveTable.m_numBuckets = 0;
0041651e      this->m_EnumToIDInternal.m_intrusiveTable.m_numElements = 0;
0041655f      this->m_EnumToID.vtable = &HashTable<unsigned long,class IDClass<struct _tagDataID,32,0>,0>::`vftable';
00416566      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_EnumToID.m_intrusiveTable);
0041656b      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_buckets_3 = this->m_EnumToID.m_intrusiveTable.m_buckets;
0041655a      this->m_EnumToID.m_intrusiveTable.vtable = 0x795298;
0041655a      
00416579      if (m_buckets_3 != &this->m_EnumToID.m_intrusiveTable.m_aInplaceBuckets)
0041657c          operator delete[](m_buckets_3);
0041657c      
0041655a      this->m_EnumToID.m_intrusiveTable.m_buckets = nullptr;
0041655a      this->m_EnumToID.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0041655a      this->m_EnumToID.m_intrusiveTable.m_numBuckets = 0;
0041655a      this->m_EnumToID.m_intrusiveTable.m_numElements = 0;
00416595      /* tailcall */
00416595      return DBObj::~DBObj(this);
00416470  }

0041659a                                                                                90 90 90 90 90 90                            ......

004165a0  class DBObj* EnumIDMap::Allocate(class EnumIDMap const* this @ ecx)

004165a0  {
004165a0      /* tailcall */
004165a0      return EnumIDMap::Allocator();
004165a0  }

004165a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004165b0  class DBObj* EnumIDMap::Allocator()

004165b0  {
004165b5      void* eax = operator new(0x200);
004165b5      
004165bf      if (eax == 0)
004165ca          return 0;
004165ca      
004165c3      /* tailcall */
004165c3      return EnumIDMap::EnumIDMap(eax);
004165b0  }

004165cb                                   90 90 90 90 90                                                             .....

004165d0  void* __thiscall EnumIDMap::`scalar deleting destructor'(class EnumIDMap* this, uint32_t arg2)

004165d0  {
004165d3      EnumIDMap::~EnumIDMap(this);
004165d3      
004165dd      if ((arg2 & 1) != 0)
004165e0          operator delete(this);
004165e0      
004165eb      return this;
004165d0  }

004165ee                                            90 90                                                                ..

004165f0  void __thiscall EnumIDMap::Serialize(class EnumIDMap* this, class Archive* arg2)

004165f0  {
004165f1      class Archive* esi = arg2;
004165f9      DBObj::Serialize(this, esi);
004165f9      
00416605      if ((!(esi->m_flags) & 1) != 0)
0041660a          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_EnumToID.m_intrusiveTable);
0041660a      
00416619      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,SB_Default>(&arg2, &this->m_EnumToID.m_intrusiveTable, esi);
00416619      
00416628      if ((!(esi->m_flags) & 1) != 0)
00416630          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_EnumToName.m_intrusiveTable);
00416630      
00416642      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>,HashTableData<unsigned long,PStringBase<char> > *,SB_Default>(&arg2, &this->m_EnumToName.m_intrusiveTable, esi);
00416642      
00416651      if ((!(esi->m_flags) & 1) != 0)
00416659          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_EnumToIDInternal.m_intrusiveTable);
00416659      
0041666b      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,SB_Default>(&arg2, &this->m_EnumToIDInternal.m_intrusiveTable, esi);
0041666b      
0041667a      if ((!(esi->m_flags) & 1) != 0)
00416682          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_EnumToNameInternal.m_intrusiveTable);
00416682      
00416694      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>,HashTableData<unsigned long,PStringBase<char> > *,SB_Default>(&arg2, &this->m_EnumToNameInternal.m_intrusiveTable, esi);
004165f0  }

004166a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004166b0  uint8_t __thiscall DBOCache::AddObj(class DBOCache* this, class DBObj* arg2)

004166b0  {
004166bd      if (this->vtable->AddObj_Internal(this, arg2) == 0)
004166cb          return 0;
004166cb      
004166bf      arg2->m_numLinks += 1;
004166c5      return 1;
004166b0  }

004166ce                                            90 90                                                                ..

004166d0  uint8_t __thiscall DBOCache::KeepFreeObjects(class DBOCache* this, uint8_t arg2)

004166d0  {
004166d9      int32_t ebx;
004166d9      ebx = this->m_fKeepFreeObjs;
004166d9      
004166df      if (this->m_fCanKeepFreeObjs != 0)
004166df      {
004166e7          this->m_fKeepFreeObjs = arg2;
004166e7          
004166f1          if ((ebx != 0 && arg2 == 0))
004166f3              this->vtable->FlushFreeObjects(this);
004166df      }
004166df      
004166fb      return ebx;
004166d0  }

004166fe                                                                                            90 90                                ..

00416700  void __thiscall DBOCache::FreeObject(class DBOCache* this, class DBObj* arg2)

00416700  {
0041670a      if (arg2 != 0)
0041670a      {
0041670c          arg2->vtable->ReleaseSubObjects(arg2);
00416713          arg2->m_bLoaded = 0;
00416713          
00416726          if ((this->m_fKeepFreeObjs == 0 || arg2->m_AllowedInFreeList == 0))
0041673f              this->vtable->DestroyObj(this, arg2);
00416726          else if (this->m_bFreelistActive != 0)
00416732              this->vtable->FreelistAdd(this, arg2);
0041670a      }
00416700  }

0041674c                                      90 90 90 90                                                              ....

00416750  void __thiscall DBOCache::FreelistRemove(class DBOCache* this, class DBObj* arg2)

00416750  {
00416754      class DBObj* m_pLast = arg2->m_pLast;
00416754      
00416762      if ((m_pLast != 0 || this->m_pOldestFree == arg2))
00416762      {
00416764          class DBObj* m_pNext = arg2->m_pNext;
00416764          
00416769          if (m_pNext == 0)
00416770              this->m_pYoungestFree = m_pLast;
00416769          else
0041676b              m_pNext->m_pLast = m_pLast;
0041676b          
00416776          class DBObj* m_pLast_1 = arg2->m_pLast;
00416776          
0041677b          if (m_pLast_1 == 0)
00416788              this->m_pOldestFree = arg2->m_pNext;
0041677b          else
00416780              m_pLast_1->m_pNext = arg2->m_pNext;
00416780          
0041678e          arg2->m_pLast = nullptr;
00416795          arg2->m_pNext = nullptr;
0041679c          this->m_nFree -= 1;
00416762      }
00416750  }

004167a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004167b0  class DBObj* __fastcall DBOCache::FreelistRemoveOldest(class DBOCache* this)

004167b0  {
004167b1      class DBObj* m_pOldestFree = this->m_pOldestFree;
004167b1      
004167b9      if (m_pOldestFree != 0)
004167bb          this->vtable->FreelistRemove(this, m_pOldestFree);
004167bb      
004167c4      return m_pOldestFree;
004167b0  }

004167c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004167d0  class DBObj* __fastcall DBOCache::GetFreeObj(class DBOCache* this)

004167d0  {
004167ea      if ((this->m_freelistDef.m_bRecycle != 0 && this->m_nFree > this->m_freelistDef.m_nIdealSize))
004167ea      {
004167f0          class DBObj* result = this->vtable->FreelistRemoveOldest(this);
004167f0          
004167f7          if (result != 0)
004167f7          {
004167f9              this->vtable->RemoveObj_Internal(this, result);
00416801              result->vtable->Destroy();
0041680c              return result;
004167f7          }
004167ea      }
004167ea      
00416815      return this->m_pfnAllocator();
004167d0  }

00416816                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00416820  void __fastcall DBOCache::UseTime(class DBOCache* this)

00416820  {
0041682f      if (this->m_nFree > this->m_freelistDef.m_nIdealSize)
0041682f      {
00416832          class DBObj* m_pOldestFree = this->m_pOldestFree;
00416832          
0041683a          if (m_pOldestFree != 0)
0041683a          {
0041683f              long double x87_r7_2 = (((long double)m_pOldestFree->m_timeStamp) + ((long double)30.0));
00416845              long double temp0_1 = ((long double)Timer::cur_time);
00416845              (x87_r7_2 - temp0_1);
0041684b              uint32_t eax;
0041684b              eax = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0041684d              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0041684d              
00416850              if (!(p_1))
00416850              {
00416852                  this->vtable->FreelistRemove(this, m_pOldestFree);
0041685a                  this->vtable->DestroyObj(this, m_pOldestFree);
00416850              }
0041683a          }
0041682f      }
00416820  }

00416865                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00416870  void __fastcall DBOCache::FlushFreeObjects(class DBOCache* this)

00416870  {
0041687b      while (this->m_nFree != 0)
00416884          this->vtable->DestroyObj(this, this->vtable->FreelistRemoveOldest(this));
00416870  }


00416890  uint8_t __thiscall DBOCache::ReloadObject(class DBOCache* this, class IDClass<_tagDataID,32,0> arg2)

00416890  {
00416893      class DBCache* DBCache::s_pCache_1 = DBCache::s_pCache;
004168a5      return DBCache::s_pCache_1->vtable->ReloadObject(DBCache::s_pCache_1, arg2, this->m_dbtype);
00416890  }

004168a8                          90 90 90 90 90 90 90 90                                                          ........

004168b0  void __thiscall DBOCache::FreelistAdd(class DBOCache* this, class DBObj* arg2)

004168b0  {
004168bb      arg2->m_timeStamp = ((double)((long double)Timer::cur_time));
004168be      int32_t* this_1 = this;
004168c0      this = arg2->m_AllowedInFreeList;
004168c0      
004168c5      if (this != 0)
004168c5      {
004168c7          this = *(uint8_t*)((char*)this_1 + 0xf1);
004168c7          
004168cf          if (this != 0)
004168cf          {
004168d1              void* ecx = this_1[0x41];
004168d1              
004168d9              if (ecx == 0)
004168e9                  this_1[0x40] = arg2;
004168d9              else
004168d9              {
004168db                  *(uint32_t*)((char*)ecx + 0x18) = arg2;
004168e4                  arg2->m_pLast = this_1[0x41];
004168d9              }
004168d9              
004168f5              int32_t ecx_2 = this_1[0x3f];
004168fb              int32_t edx_2 = (this_1[0x42] + 1);
004168fc              this_1[0x41] = arg2;
00416906              this_1[0x42] = edx_2;
00416906              
0041690c              if (edx_2 > ecx_2)
0041691a                  *(uint32_t*)(*(uint32_t*)this_1 + 0x44)(*(uint32_t*)(*(uint32_t*)this_1 + 0x50)());
004168cf          }
004168c5      }
004168b0  }

00416921     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00416930  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>* this, uint32_t arg2)

00416930  {
00416933      class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_buckets = this->m_buckets;
0041693b      this->vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,class HashTableData<class IDClass<struct _tagDataID,32,0>,class DBObj*>*,1>::`vftable';
0041693b      
00416941      if (m_buckets != &this->m_aInplaceBuckets)
00416944          operator delete[](m_buckets);
00416944      
0041694e      this->m_buckets = nullptr;
00416951      this->m_firstInterestingBucket = nullptr;
00416954      this->m_numBuckets = 0;
00416957      this->m_numElements = 0;
00416957      
0041695f      if ((arg2 & 1) != 0)
00416962          operator delete(this);
00416962      
0041696d      return this;
00416930  }


00416970  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,float> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,float> *,0>* this, uint32_t arg2)

00416970  {
00416973      class HashTableData<unsigned long,float>** m_buckets = this->m_buckets;
0041697b      this->vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,float>*,0>::`vftable';
0041697b      
00416981      if (m_buckets != &this->m_aInplaceBuckets)
00416984          operator delete[](m_buckets);
00416984      
0041698e      this->m_buckets = nullptr;
00416991      this->m_firstInterestingBucket = nullptr;
00416994      this->m_numBuckets = 0;
00416997      this->m_numElements = 0;
00416997      
0041699f      if ((arg2 & 1) != 0)
004169a2          operator delete(this);
004169a2      
004169ad      return this;
00416970  }


004169b0  class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0> const* this, class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* __return)

004169b0  {
004169b6      void* i = &this->m_buckets[this->m_numBuckets];
004169b6      
004169c1      if (this->m_firstInterestingBucket != i)
004169c1      {
004169d2          class HashTableData<unsigned long,DBOCache *>** m_firstInterestingBucket;
004169d2          
004169d2          do
004169d2          {
004169c3              m_firstInterestingBucket = this->m_firstInterestingBucket;
004169c3              
004169c8              if (*(uint32_t*)m_firstInterestingBucket != 0)
004169c8              {
004169e4                  class HashTableData<unsigned long,DBOCache *>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004169ed                  __return->m_currElement = *(uint32_t*)m_firstInterestingBucket_1;
004169f0                  __return->m_currBucket = m_firstInterestingBucket_1;
004169f3                  __return->m_currHashTable = this;
004169f6                  return __return;
004169c8              }
004169c8              
004169cf              this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004169d2          } while (&m_firstInterestingBucket[1] != i);
004169c1      }
004169c1      
004169d8      __return->m_currBucket = nullptr;
004169db      __return->m_currElement = nullptr;
004169de      __return->m_currHashTable = this;
004169e1      return __return;
004169b0  }

004169f9                                                                             90 90 90 90 90 90 90                           .......

00416a00  uint8_t __thiscall DBOCache::IsInMemory(class DBOCache* this, class IDClass<_tagDataID,32,0> arg2)

00416a00  {
00416a12      int32_t* eax_3 = this->m_ObjTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_ObjTable.m_intrusiveTable.m_numBuckets)];
00416a14      bool cond:0 = eax_3 != 0;
00416a14      
00416a16      if (eax_3 != 0)
00416a16      {
00416a1a          while (*(uint32_t*)eax_3 != arg2)
00416a1a          {
00416a1c              eax_3 = eax_3[1];
00416a1c              
00416a21              if (eax_3 == 0)
00416a21                  break;
00416a1a          }
00416a1a          
00416a23          cond:0 = eax_3 != 0;
00416a16      }
00416a16      
00416a25      eax_3 = cond:0;
00416a29      return eax_3;
00416a00  }

00416a2c                                      90 90 90 90                                                              ....

00416a30  void __thiscall DBOCache::DestroyObj(class DBOCache* this, class DBObj* arg2)

00416a30  {
00416a36      uint32_t id = arg2->m_DID.id;
00416a36      
00416a4a      for (int32_t* i = this->m_ObjTable.m_intrusiveTable.m_buckets[(COMBINE(0, id) % this->m_ObjTable.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00416a4a      {
00416a52          if (*(uint32_t*)i == id)
00416a52          {
00416a5f              if (i != 0)
00416a61                  this->vtable->RemoveObj_Internal(this, arg2);
00416a61              
00416a5f              break;
00416a52          }
00416a4a      }
00416a4a      
00416a67      int32_t m_numLinks = arg2->m_numLinks;
00416a67      arg2->m_numLinks -= 1;
00416a67      
00416a6a      if (m_numLinks == 1)
00416a6c          arg2->vtable->__vecDelDtor(arg2, 1);
00416a30  }

00416a7a                                                                                90 90 90 90 90 90                            ......

00416a80  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,float> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,float> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,float> *,0>* this, uint32_t arg2)

00416a80  {
00416a8b      arg2 = arg2;
00416a8f      uint8_t edx = ((int8_t)arg2);
00416a93      this->m_buckets = nullptr;
00416a96      this->m_firstInterestingBucket = nullptr;
00416a99      this->m_numBuckets = 0;
00416a9c      this->m_numElements = 0;
00416aa0      this->vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,float>*,0>::`vftable';
00416aa6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00416ab9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00416ab9      
00416ac3      if (eax == bucketSizesEnd_1)
00416ac5          eax -= 4;
00416ac5      
00416ac8      uint32_t eax_1 = *(uint32_t*)eax;
00416acd      this->m_numBuckets = eax_1;
00416acd      
00416ad0      if (eax_1 > 0x17)
00416ae6          this->m_buckets = operator new[]((eax_1 << 2));
00416ad0      else
00416ad5          this->m_buckets = &this->m_aInplaceBuckets;
00416ad5      
00416aec      class HashTableData<unsigned long,float>** m_buckets = this->m_buckets;
00416aef      uint32_t ecx_3 = (this->m_numBuckets << 2);
00416af5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00416b06      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00416a80  }

00416b0f                                               90                                                                 .

00416b10  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>* this, uint32_t arg2)

00416b10  {
00416b1b      arg2 = arg2;
00416b1f      uint8_t edx = ((int8_t)arg2);
00416b23      this->m_buckets = nullptr;
00416b26      this->m_firstInterestingBucket = nullptr;
00416b29      this->m_numBuckets = 0;
00416b2c      this->m_numElements = 0;
00416b30      this->vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,class HashTableData<class IDClass<struct _tagDataID,32,0>,class DBObj*>*,1>::`vftable';
00416b36      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00416b49      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00416b49      
00416b53      if (eax == bucketSizesEnd_1)
00416b55          eax -= 4;
00416b55      
00416b58      uint32_t eax_1 = *(uint32_t*)eax;
00416b5d      this->m_numBuckets = eax_1;
00416b5d      
00416b60      if (eax_1 > 0x17)
00416b76          this->m_buckets = operator new[]((eax_1 << 2));
00416b60      else
00416b65          this->m_buckets = &this->m_aInplaceBuckets;
00416b65      
00416b7c      class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_buckets = this->m_buckets;
00416b7f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00416b85      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00416b96      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00416b10  }

00416b9f                                                                                               90                                 .

00416ba0  uint8_t __fastcall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::grow(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>* this)

00416ba0  {
00416ba0      class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>* m_numBuckets = this;
00416ba2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00416bae      m_numBuckets = this->m_numBuckets;
00416bc5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00416bc5      
00416bcf      if (eax_2 != bucketSizesEnd_1)
00416bd8          eax_2 = &eax_2[1];
00416bcf      else
00416bcf      {
00416bd1          eax_2 -= 4;
00416bd1          
00416bd6          if (eax_2 != bucketSizesEnd_1)
00416bd8              eax_2 = &eax_2[1];
00416bcf      }
00416bcf      
00416be8      return IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00416ba0  }

00416be9                             90 90 90 90 90 90 90                                                           .......

00416bf0  uint8_t __thiscall DBOCache::RemoveObj(class DBOCache* this, class IDClass<_tagDataID,32,0> arg2)

00416bf0  {
00416c02      class DBObj* edi = nullptr;
00416c07      int32_t* eax_3 = this->m_ObjTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_ObjTable.m_intrusiveTable.m_numBuckets)];
00416c07      
00416c0b      if (eax_3 != 0)
00416c0b      {
00416c12          while (*(uint32_t*)eax_3 != arg2)
00416c12          {
00416c14              eax_3 = eax_3[1];
00416c14              
00416c19              if (eax_3 == 0)
00416c19              {
00416c1e                  eax_3 = false;
00416c22                  return 0;
00416c19              }
00416c12          }
00416c12          
00416c27          if (eax_3 != 0)
00416c27          {
00416c29              edi = eax_3[2];
00416c2c              this->vtable->FreelistRemove(this, edi);
00416c34              this->vtable->RemoveObj_Internal(this, edi);
00416c3c              int32_t m_numLinks = edi->m_numLinks;
00416c3c              edi->m_numLinks -= 1;
00416c3c              
00416c3f              if (m_numLinks == 1)
00416c41                  edi->vtable->__vecDelDtor(1);
00416c27          }
00416c0b      }
00416c0b      
00416c4d      eax_3 = edi != 0;
00416c51      return eax_3;
00416bf0  }

00416c54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00416c60  class DBObj* __thiscall DBOCache::GetIfInMemory(class DBOCache* this, class IDClass<struct _tagDataID,32,0> arg2, bool arg3)

00416c60  {
00416c61      int32_t esi = arg2;
00416c61      
00416c79      for (int32_t* i = this->m_ObjTable.m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_ObjTable.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00416c79      {
00416c82          if (*(uint32_t*)i == esi)
00416c82          {
00416c94              if (i == 0)
00416c94                  break;
00416c94              
00416c96              int32_t* result = i[2];
00416c96              
00416c9b              if (result != 0)
00416ca1                  i = result[9] > 1;
00416ca1              
00416ca6              if ((result == 0 || i == 0))
00416ca8                  this->vtable->FreelistRemove(this, result);
00416ca8              
00416cb1              i = result[2];
00416cb7              result[9] += 1;
00416cb7              
00416cba              if (i == 0)
00416cba              {
00416cbc                  i = arg3;
00416cbc                  
00416cc2                  if (i != 0)
00416cc2                  {
00416ccd                      if (*(uint32_t*)(*(uint32_t*)result + 0x28)() == 0)
00416ccd                      {
00416cde                          *(uint32_t*)(*(uint32_t*)result + 0x14)();
00416ce5                          return 0;
00416ccd                      }
00416ccd                      
00416ccf                      result[2] = 1;
00416cc2                  }
00416cba              }
00416cba              
00416cd7              return result;
00416c82          }
00416c79      }
00416c79      
00416c8f      return 0;
00416c60  }

00416c7d                                                                                         8d 49 00                               .I.
00416ce8                          90 90 90 90 90 90 90 90                                                          ........

00416cf0  class DBObj* __thiscall DBOCache::GetIfUsing(class DBOCache* this, class IDClass<_tagDataID,32,0> arg2)

00416cf0  {
00416d09      for (int32_t* i = this->m_ObjTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_ObjTable.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00416d09      {
00416d12          if (*(uint32_t*)i == arg2)
00416d12          {
00416d24              if (i == 0)
00416d24                  break;
00416d24              
00416d26              void* result = i[2];
00416d26              
00416d2b              if (result != 0)
00416d2b              {
00416d2d                  int32_t ecx = *(uint32_t*)((char*)result + 0x24);
00416d33                  uint32_t edx_1;
00416d33                  edx_1 = ecx > 1;
00416d33                  
00416d38                  if (edx_1 != 0)
00416d38                  {
00416d3c                      *(uint32_t*)((char*)result + 0x24) = (ecx + 1);
00416d40                      return result;
00416d38                  }
00416d2b              }
00416d2b              
00416d47              return 0;
00416d12          }
00416d09      }
00416d09      
00416d1f      return 0;
00416cf0  }

00416d0d                                         8d 49 00                                                               .I.
00416d4a                                90 90 90 90 90 90                                                            ......

00416d50  uint32_t __thiscall DBOCache::Release(class DBOCache* this, class IDClass<_tagDataID,32,0> arg2)

00416d50  {
00416d68      for (int32_t* i = this->m_ObjTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_ObjTable.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00416d68      {
00416d72          if (*(uint32_t*)i == arg2)
00416d72          {
00416d83              if (i == 0)
00416d83                  break;
00416d83              
00416d86              class DBObj* esi = i[2];
00416d8a              int32_t result = 0;
00416d8a              
00416d8e              if (esi != 0)
00416d8e              {
00416d90                  int32_t m_numLinks = esi->m_numLinks;
00416d96                  class IDClass<_tagDataID,32,0> ecx;
00416d96                  ecx.id = m_numLinks > 1;
00416d96                  
00416d9b                  if (ecx.id != 0)
00416d9b                  {
00416d9d                      int32_t result_1 = (m_numLinks - 1);
00416da0                      esi->m_numLinks = result_1;
00416da0                      
00416da3                      if (result_1 == 0)
00416da3                      {
00416da5                          esi->vtable->__vecDelDtor(1);
00416dae                          result_1 = 0;
00416da3                      }
00416da3                      
00416db4                      result = result_1;
00416db6                      result_1 = esi->m_numLinks > 1;
00416db6                      
00416dbb                      if (result_1 == 0)
00416dbd                          this->vtable->FreeObject(this, esi);
00416d9b                  }
00416d8e              }
00416d8e              
00416dca              return result;
00416d72          }
00416d68      }
00416d68      
00416d7e      return 0;
00416d50  }

00416dcd                                         90 90 90                                                               ...

00416dd0  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::resize_internal(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>* this, uint32_t arg2)

00416dd0  {
00416dd1      uint32_t ebp = arg2;
00416dd1      
00416ddb      if (ebp == this->m_numBuckets)
00416ddb      {
00416dde          int32_t eax;
00416dde          eax = 0;
00416de1          return 0;
00416ddb      }
00416ddb      
00416de9      int32_t* i_1 = nullptr;
00416de9      
00416ded      while (this->m_numElements != 0)
00416ded      {
00416df6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00416dfc          int32_t* i_2;
00416dfc          int32_t* m_firstInterestingBucket_2;
00416dfc          
00416dfc          if (this->m_firstInterestingBucket == ecx_1)
00416dfc          {
00416e12          label_416e12:
00416e12              m_firstInterestingBucket_2 = nullptr;
00416e14              i_2 = nullptr;
00416dfc          }
00416dfc          else
00416dfc          {
00416e00              while (true)
00416e00              {
00416e00                  class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00416e00                  
00416e06                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00416e06                  {
00416e18                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00416e1b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
00416e1d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00416e1d                      break;
00416e06                  }
00416e06                  
00416e0d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00416e0d                  
00416e10                  if (&m_firstInterestingBucket[1] == ecx_1)
00416e10                      goto label_416e12;
00416e00              }
00416dfc          }
00416dfc          
00416e1f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
00416e1f          
00416e23          if (eax_4 == i_2)
00416e35              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00416e23          else
00416e23          {
00416e2c              void* edx_1;
00416e2c              
00416e2c              do
00416e2c              {
00416e25                  edx_1 = eax_4;
00416e27                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
00416e2c              } while (eax_4 != i_2);
00416e2c              
00416e30              if (edx_1 != 0)
00416e3c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
00416e30              else
00416e35                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00416e23          }
00416e23          
00416e3f          this->m_numElements -= 1;
00416e42          i_2[1] = i_1;
00416e4a          i_1 = i_2;
00416ded      }
00416ded      
00416e4e      class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_buckets = this->m_buckets;
00416e4e      
00416e56      if (m_buckets != &this->m_aInplaceBuckets)
00416e59          operator delete[](m_buckets);
00416e59      
00416e66      this->m_buckets = nullptr;
00416e69      this->m_firstInterestingBucket = nullptr;
00416e6c      this->m_numBuckets = 0;
00416e6f      this->m_numElements = 0;
00416e72      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00416e79      void* eax_7;
00416e79      
00416e79      if (i_1 != 0)
00416e79      {
00416efb          int32_t* i;
00416efb          
00416efb          do
00416efb          {
00416e80              uint32_t m_numBuckets = this->m_numBuckets;
00416e86              i = i_1[1];
00416e86              
00416e8f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
00416e8f              {
00416e91                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00416e98                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00416e9e                  arg2 = m_numBuckets;
00416eae                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
00416eae                  
00416eb8                  if (eax_8 != bucketSizesEnd_1)
00416ec1                      eax_8 = &eax_8[1];
00416eb8                  else
00416eb8                  {
00416eba                      eax_8 -= 4;
00416eba                      
00416ebf                      if (eax_8 != bucketSizesEnd_1)
00416ec1                          eax_8 = &eax_8[1];
00416eb8                  }
00416eb8                  
00416ec9                  IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
00416e8f              }
00416e8f              
00416ed2              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
00416ed5              class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_buckets_1 = this->m_buckets;
00416edb              i_1[1] = m_buckets_1[temp1_1];
00416ede              m_buckets_1[temp1_1] = i_1;
00416ee4              eax_7 = &m_buckets_1[temp1_1];
00416ee4              
00416ee9              if (eax_7 < this->m_firstInterestingBucket)
00416eeb                  this->m_firstInterestingBucket = eax_7;
00416eeb              
00416ef6              this->m_numElements += 1;
00416ef9              i_1 = i;
00416efb          } while (i != 0);
00416e79      }
00416e79      
00416f00      eax_7 = 1;
00416f03      return 1;
00416dd0  }

00416f06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00416f10  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::add(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>* this, class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>* arg2)

00416f10  {
00416f18      uint32_t id = arg2->m_hashKey.id;
00416f1b      uint32_t m_numBuckets = this->m_numBuckets;
00416f1b      
00416f2e      for (int32_t* i = this->m_buckets[(COMBINE(0, id) % m_numBuckets)]; i != 0; i = i[1])
00416f2e      {
00416f32          if (*(uint32_t*)i == id)
00416f32          {
00416f7e              if (i == 0)
00416f7e                  break;
00416f7e              
00416f82              i = 0;
00416f85              return 0;
00416f32          }
00416f2e      }
00416f2e      
00416f44      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00416f48          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::grow(this);
00416f48      
00416f51      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.id) % this->m_numBuckets);
00416f54      class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_buckets = this->m_buckets;
00416f5a      arg2->m_hashNext = m_buckets[temp1_1];
00416f5d      m_buckets[temp1_1] = arg2;
00416f63      class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** eax_4 = &m_buckets[temp1_1];
00416f63      
00416f68      if (eax_4 < this->m_firstInterestingBucket)
00416f6a          this->m_firstInterestingBucket = eax_4;
00416f6a      
00416f72      this->m_numElements += 1;
00416f76      uint32_t eax_6;
00416f76      eax_6 = 1;
00416f79      return 1;
00416f10  }

00416f88                          90 90 90 90 90 90 90 90                                                          ........

00416f90  uint8_t __thiscall HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::add(class HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>* this, class IDClass<_tagDataID,32,0>* arg2, class DBObj** arg3)

00416f90  {
00416f96      void* eax = operator new(0xc);
00416fa0      void* esi;
00416fa0      
00416fa0      if (eax == 0)
00416fbe          esi = nullptr;
00416fa0      else
00416fa0      {
00416fac          *(uint32_t*)eax = arg2->id;
00416fae          *(uint32_t*)((char*)eax + 4) = 0;
00416fb7          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
00416fba          esi = eax;
00416fa0      }
00416fa0      
00416fcb      if (IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::add(&this->m_intrusiveTable, esi) != 0)
00416fe5          return 1;
00416fe5      
00416fcf      if (esi != 0)
00416fd2          operator delete(esi);
00416fd2      
00416fde      return 0;
00416f90  }

00416fe8                          90 90 90 90 90 90 90 90                                                          ........

00416ff0  void* __thiscall HashTable<unsigned long,float,0>::`scalar deleting destructor'(class HashTable<unsigned long,float,0>* this, uint32_t arg2)

00416ff0  {
00416ff9      this->vtable = 0x795340;
00416fff      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00417004      class HashTableData<unsigned long,float>** m_buckets = this->m_intrusiveTable.m_buckets;
00416ff4      this->m_intrusiveTable.vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,float>*,0>::`vftable';
00416ff4      
00417012      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00417015          operator delete[](m_buckets);
00417015      
00416ff4      this->m_intrusiveTable.m_buckets = nullptr;
00416ff4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00416ff4      this->m_intrusiveTable.m_numBuckets = 0;
00416ff4      this->m_intrusiveTable.m_numElements = 0;
00416ff4      
00417030      if ((arg2 & 1) != 0)
00417033          operator delete(this);
00417033      
0041703f      return this;
00416ff0  }

00417042        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00417050  void __fastcall DBOCache::~DBOCache(class DBOCache* this)

00417050  {
0041705c      class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>* esi = &this->m_ObjTable.m_intrusiveTable;
00417062      this->vtable = &CLCache::`vftable'.SerializeFromCachePack;
0041706d      void __return;
0041706d      class HashTableData<unsigned long,DBOCache *>* m_currElement = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(esi, &__return)->m_currElement;
0041706d      
00417074      while (m_currElement != 0)
00417074      {
0041707b          DBOCache::RemoveObj(this, m_currElement->m_hashKey);
00417086          void* ecx_3 = &esi->m_buckets[esi->m_numBuckets];
00417086          
0041708c          if (esi->m_firstInterestingBucket == ecx_3)
0041708c          {
004170a1          label_4170a1:
004170a1              m_currElement = nullptr;
0041708c          }
0041708c          else
0041708c          {
00417090              while (true)
00417090              {
00417090                  class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_firstInterestingBucket = esi->m_firstInterestingBucket;
00417090                  
00417095                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00417095                  {
004170a8                      m_currElement = *(uint32_t*)esi->m_firstInterestingBucket;
004170a8                      break;
00417095                  }
00417095                  
0041709c                  esi->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0041709c                  
0041709f                  if (&m_firstInterestingBucket[1] == ecx_3)
0041709f                      goto label_4170a1;
00417090              }
0041708c          }
00417074      }
00417074      
004170b6      this->m_fidelityTable.vtable = 0x795340;
004170bd      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_fidelityTable.m_intrusiveTable);
004170c2      class HashTableData<unsigned long,float>** m_buckets = this->m_fidelityTable.m_intrusiveTable.m_buckets;
004170ae      this->m_fidelityTable.m_intrusiveTable.vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,float>*,0>::`vftable';
004170ae      
004170d0      if (m_buckets != &this->m_fidelityTable.m_intrusiveTable.m_aInplaceBuckets)
004170d3          operator delete[](m_buckets);
004170d3      
004170ae      this->m_fidelityTable.m_intrusiveTable.m_buckets = nullptr;
004170ae      this->m_fidelityTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004170ae      this->m_fidelityTable.m_intrusiveTable.m_numBuckets = 0;
004170ae      this->m_fidelityTable.m_intrusiveTable.m_numElements = 0;
004170ec      this->m_ObjTable.vtable = 0x795348;
004170f3      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_ObjTable.m_intrusiveTable);
004170f8      class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_buckets_1 = this->m_ObjTable.m_intrusiveTable.m_buckets;
004170e7      this->m_ObjTable.m_intrusiveTable.vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,class HashTableData<class IDClass<struct _tagDataID,32,0>,class DBObj*>*,1>::`vftable';
004170e7      
00417106      if (m_buckets_1 != &this->m_ObjTable.m_intrusiveTable.m_aInplaceBuckets)
00417109          operator delete[](m_buckets_1);
00417109      
004170e7      this->m_ObjTable.m_intrusiveTable.m_buckets = nullptr;
004170e7      this->m_ObjTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004170e7      this->m_ObjTable.m_intrusiveTable.m_numBuckets = 0;
004170e7      this->m_ObjTable.m_intrusiveTable.m_numElements = 0;
00417050  }

00417124              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00417130  uint8_t __fastcall DBOCache::AddObj_Internal(class DBOCache* this, class DBObj* arg2)

00417130  {
00417130      class DBOCache* id = this;
00417134      class DBObj* edi = arg2;
0041713c      uint32_t id_1;
0041713c      
0041713c      if (edi != 0)
0041713c      {
0041713e          id_1 = edi->m_DID.id;
0041713e          
00417147          if (id_1 != INVALID_DID.id)
00417147          {
00417149              id = id_1;
00417149              
0041715e              if (HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(&this->m_ObjTable.vtable, &id) == 0)
0041715e              {
00417162                  edi->m_pMaintainer = this;
00417165                  DBObj::AddToDataGraph(edi);
00417176                  id = edi->m_DID.id;
0041717d                  HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::add(&this->m_ObjTable.vtable, &id, &arg2);
0041718a                  this->m_nTotalCount += 1;
00417191                  uint32_t eax_1;
00417191                  eax_1 = 1;
00417195                  return 1;
0041715e              }
00417147          }
0041713c      }
0041713c      
0041719a      id_1 = 0;
0041719e      return 0;
00417130  }

004171a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004171b0  void __thiscall DBOCache::RemoveObj_Internal(class DBOCache* this, class DBObj* arg2)

004171b0  {
004171b2      class DBObj* edi = arg2;
004171c3      arg2 = edi->m_DID.id;
004171c7      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_1 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_ObjTable.m_intrusiveTable, &arg2);
004171c7      
004171ce      if (eax_1 != 0)
004171ce      {
004171d1          operator delete(eax_1);
004171e0          this->m_nTotalCount -= 1;
004171ce      }
004171ce      
004171e6      edi->m_pMaintainer = nullptr;
004171b0  }

004171f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00417200  void* __thiscall HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::`scalar deleting destructor'(class HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>* this, uint32_t arg2)

00417200  {
00417209      this->vtable = 0x795348;
0041720f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00417214      class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>** m_buckets = this->m_intrusiveTable.m_buckets;
00417204      this->m_intrusiveTable.vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,class HashTableData<class IDClass<struct _tagDataID,32,0>,class DBObj*>*,1>::`vftable';
00417204      
00417222      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00417225          operator delete[](m_buckets);
00417225      
00417204      this->m_intrusiveTable.m_buckets = nullptr;
00417204      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00417204      this->m_intrusiveTable.m_numBuckets = 0;
00417204      this->m_intrusiveTable.m_numElements = 0;
00417204      
00417240      if ((arg2 & 1) != 0)
00417243          operator delete(this);
00417243      
0041724f      return this;
00417200  }

00417252                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00417260  void __thiscall DBOCache::DBOCache(class DBOCache* this, class DBObj* (* arg2)(), uint32_t arg3)

00417260  {
00417263      this->vtable = &CLCache::`vftable'.SerializeFromCachePack;
00417271      this->m_ObjTable.vtable = 0x795348;
00417278      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>(&this->m_ObjTable.m_intrusiveTable, 0x80);
00417281      this->m_ObjTable.vtable = 0x795348;
00417288      this->m_dbtype = arg3;
00417293      this->m_fidelityTable.vtable = 0x795340;
0041729a      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,float> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,float> *,0>(&this->m_fidelityTable.m_intrusiveTable, 0x17);
004172a1      this->m_fCanKeepFreeObjs = 1;
004172a7      this->m_fKeepFreeObjs = 1;
004172ad      this->m_bFreelistActive = 1;
004172b5      this->m_freelistDef.m_bRecycle = 0;
004172bb      this->m_freelistDef.m_bShrink = 0;
004172c6      this->m_freelistDef.m_nIdealSize = 0x10;
004172cc      this->m_freelistDef.m_nMaxSize = 0x10;
004172d2      uint32_t m_dbtype = this->m_dbtype;
004172da      this->m_pOldestFree = nullptr;
004172e0      this->m_pYoungestFree = nullptr;
004172e6      this->m_nFree = 0;
004172ec      this->m_nTotalCount = 0;
004172f2      this->m_pfnAllocator = arg2;
004172f8      int32_t* eax_1 = MasterDBMap::GetFreelistDef(m_dbtype);
004172fd      int32_t ecx_3 = *(uint32_t*)eax_1;
004172ff      this->m_freelistDef.m_bRecycle = ecx_3;
004172ff      this->m_freelistDef.m_bShrink = *(uint8_t*)((char*)ecx_3)[1];
00417308      this->m_freelistDef.m_nIdealSize = eax_1[1];
00417311      this->m_freelistDef.m_nMaxSize = eax_1[2];
00417260  }


00417320  void* __thiscall DBOCache::`scalar deleting destructor'(class DBOCache* this, uint32_t arg2)

00417320  {
00417323      DBOCache::~DBOCache(this);
00417323      
0041732d      if ((arg2 & 1) != 0)
00417330          operator delete(this);
00417330      
0041733b      return this;
00417320  }

0041733e                                                                                            90 90                                ..

00417340  void __fastcall AsyncCache::CAsyncRequest::CCallbackWrapper::CCallbackWrapper(struct AsyncCache::CAsyncRequest::CCallbackWrapper* this)

00417340  {
00417342      this->pCallbackHandler = 0;
00417348      this->dwTimesFinished = 0;
00417340  }


00417350  void __fastcall Cache_Pack_t::Cache_Pack_t(class Cache_Pack_t* this)

00417350  {
00417356      this->m_dwOffset = 0;
0041735c      this->m_iVersion = 0;
00417363      SmartBuffer::SmartBuffer(&this->m_buff);
00417350  }

0041736c                                      90 90 90 90                                                              ....

00417370  uint8_t* __fastcall Cache_Pack_t::GetPackBufferPtr(class Cache_Pack_t* this)

00417370  {
0041737a      SmartBuffer::ReconfigureAllocation(&this->m_buff, 4, 1);
0041738a      return &SmartBuffer::GetBuffer(&this->m_buff)[4];
00417370  }

0041738b                                   90 90 90 90 90                                                             .....

00417390  uint32_t __fastcall Cache_Pack_t::GetDataSize(class Cache_Pack_t const* this)

00417390  {
0041739e      if (SmartBuffer::GetSize(&this->m_buff) <= 4)
004173af          return 0;
004173af      
004173ab      return (SmartBuffer::GetSize(&this->m_buff) - 4);
00417390  }


004173b0  void __thiscall AsyncCache::CAsyncRequest::AdoptDBObj(struct AsyncCache::CAsyncRequest* this, class DBObj* arg2)

004173b0  {
004173b3      this->vtable->ReleaseDBObj(this);
004173bc      this->m_pObj = arg2;
004173b0  }

004173c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004173d0  void __fastcall AsyncCache::CAsyncRequest::ReleaseDBObj(struct AsyncCache::CAsyncRequest* this)

004173d0  {
004173d3      class DBObj* m_pObj = this->m_pObj;
004173d3      
004173d8      if (m_pObj != 0)
004173d8      {
004173da          m_pObj->vtable->Release(m_pObj);
004173df          this->m_pObj = nullptr;
004173d8      }
004173d0  }

004173e8                          90 90 90 90 90 90 90 90                                                          ........

004173f0  class Cache_Pack_t& __thiscall Cache_Pack_t::operator=(class Cache_Pack_t* this, class Cache_Pack_t const& arg2)

004173f0  {
004173f9      this->m_dwOffset = arg2->m_dwOffset;
00417405      this->m_iVersion = arg2->m_iVersion;
00417408      SmartBuffer::operator=(&this->m_buff, &arg2->m_buff);
00417410      return this;
004173f0  }

00417413                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00417420  void __thiscall AsyncCache::OnRequestFinished(class AsyncCache* this, struct AsyncCache::CAsyncRequest* arg2)

00417420  {
00417424      union __inner1 = arg2->__inner1;
00417424      
0041742a      if (__inner1 == 0)
0041744a          /* tailcall */
0041744a          return this->vtable->OnGetRequestFinished(this, arg2);
0041744a      
0041742d      if (__inner1 == 1)
00417441          /* tailcall */
00417441          return this->vtable->OnPurgeRequestFinished(this, arg2);
00417441      
00417430      if (__inner1 != 2)
0041744d          return;
0041744d      
00417438      /* tailcall */
00417438      return this->vtable->OnSaveRequestFinished(this, arg2);
00417420  }


00417450  void __convention("regparm") AsyncCache::OnPurgeRequestFinished(class AsyncCache* this @ ecx, struct CAsyncPurgeRequest* arg2)

00417450  {
00417452      /* tailcall */
00417452      return this->vtable->NotifyCallback(this, arg2);
00417450  }

00417455                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00417460  void __fastcall AsyncCache::UseTime(class AsyncCache* this)

00417460  {
00417462      /* tailcall */
00417462      return this->vtable->CallPendingCallbacks(this);
00417460  }

00417465                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00417470  uint8_t __stdcall AsyncCache::AddObjToDBOCache(class AsyncCache* this @ ecx, class DBObj* arg2, class DBOCache* arg3)

00417470  {
00417476      if (arg3 != 0)
00417482          return arg3->vtable->AddObj(arg3, arg2);
00417482      
00417485      int32_t eax;
00417485      eax = 0;
00417487      return 0;
00417470  }

0041748a                                90 90 90 90 90 90                                                            ......

00417490  class DBObj* __stdcall AsyncCache::GetIfInMemory(class AsyncCache* this @ ecx, struct QualifiedDataID const* arg2, class DBOCache* arg3)

00417490  {
00417496      if (arg3 == 0)
004174b2          return 0;
004174b2      
004174ad      /* tailcall */
004174ad      return arg3->vtable->GetIfInMemory(arg3, arg2->ID.id, 0);
00417490  }

004174b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004174c0  class DBObj* __stdcall AsyncCache::GetFreeObj(class AsyncCache* this @ ecx, struct QualifiedDataID const* arg2, class DBOCache* arg3)

004174c0  {
004174c9      if (arg3 == 0)
004174e8          return nullptr;
004174e8      
004174cd      class DBObj* result = arg3->vtable->GetFreeObj(arg3);
004174cd      
004174d4      if (result != 0)
004174dd          result->vtable->SetDID(arg2->ID.id);
004174dd      
004174e5      return result;
004174c0  }

004174eb                                   90 90 90 90 90                                                             .....

004174f0  uint8_t __thiscall AsyncCache::LoadData(class AsyncCache* this, struct QualifiedDataID const* arg2, class Cache_Pack_t* arg3, uint64_t arg4)

004174f0  {
004174fb      int32_t var_8 = *(uint32_t*)((char*)arg4)[4];
00417502      class DiskController* eax_1 = this->vtable->GetDiskController(this, arg2, arg4);
00417502      
0041750a      if (eax_1 != 0)
0041751d          return eax_1->vtable->LoadData(arg2->ID.id, arg3);
0041751d      
00417520      eax_1 = 0;
00417523      return 0;
004174f0  }

00417526                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00417530  uint8_t __thiscall AsyncCache::PurgeData(class AsyncCache* this, struct QualifiedDataID const* arg2, uint64_t arg3)

00417530  {
0041753b      int32_t var_8 = *(uint32_t*)((char*)arg3)[4];
00417542      class DiskController* eax_1 = this->vtable->GetDiskController(this, arg2, arg3);
00417542      
0041754a      if (eax_1 != 0)
0041755a          return eax_1->vtable->DeleteData(arg2->ID.id, 0);
0041755a      
0041755d      eax_1 = 0;
00417560      return 0;
00417530  }

00417563           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00417570  uint8_t __thiscall AsyncCache::SaveData(class AsyncCache* this, struct QualifiedDataID const* arg2, class Cache_Pack_t* arg3, uint64_t arg4)

00417570  {
0041757b      int32_t var_8 = *(uint32_t*)((char*)arg4)[4];
00417582      class DiskController* eax_1 = this->vtable->GetDiskController(this, arg2, arg4);
00417582      
0041758a      if (eax_1 != 0)
0041759f          return eax_1->vtable->SaveData(arg2->ID.id, arg3, 0);
0041759f      
004175a2      eax_1 = 0;
004175a5      return 0;
00417570  }

004175a8                          90 90 90 90 90 90 90 90                                                          ........

004175b0  uint8_t __thiscall AsyncCache::BlockingPurge(class AsyncCache* this, struct QualifiedDataID const* arg2)

004175b0  {
004175b6      int32_t var_4 = 0;
004175c1      return this->vtable->PurgeData(this, arg2, 0);
004175b0  }

004175c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004175d0  uint8_t __thiscall AsyncCache::BlockingSave(class AsyncCache* this, struct QualifiedDataID const* arg2, class Cache_Pack_t* arg3)

004175d0  {
004175d6      int32_t var_4 = 0;
004175e6      return this->vtable->SaveData(this, arg2, arg3, 0);
004175d0  }

004175e9                             90 90 90 90 90 90 90                                                           .......

004175f0  void __fastcall Cache_Pack_t::~Cache_Pack_t(class Cache_Pack_t* this)

004175f0  {
004175f6      SmartBuffer::~SmartBuffer(&this->m_buff);
004175fe      /* tailcall */
004175fe      return SmartBuffer::~SmartBuffer(&this->m_buff);
004175f0  }

00417603           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00417610  uint8_t __fastcall AsyncCache::CAsyncRequest::RemoveAllCallbacks(struct AsyncCache::CAsyncRequest* this)

00417610  {
00417617      int32_t i = 0;
00417617      
0041761b      if (this->m_pCallbacks.m_num <= 0)
0041761b      {
00417657          this->m_pCallbacks.m_num = 0;
0041765b          uint32_t eax;
0041765b          eax = 1;
0041765e          return 1;
0041761b      }
0041761b      
00417647      do
00417647      {
00417628          int32_t* pCallbackHandler = this->m_pCallbacks.m_data[i].pCallbackHandler;
00417628          
00417637          if ((InterlockedDecrement(&pCallbackHandler[1]) == 0 && pCallbackHandler != 0))
0041763f              **(uint32_t**)pCallbackHandler(1);
0041763f          
00417644          i += 1;
00417647      } while (i < this->m_pCallbacks.m_num);
00417647      
0041764b      this->m_pCallbacks.m_num = 0;
00417653      uint32_t eax_3;
00417653      eax_3 = 1;
00417656      return 1;
00417610  }

0041765f                                                                                               90                                 .

00417660  void __fastcall CAsyncGetRequest::ReleaseDBObj(struct CAsyncGetRequest* this)

00417660  {
00417663      class DBObj* m_pObj = this->m_pObj;
00417663      
00417668      if (m_pObj != 0)
00417668      {
0041766e          uint8_t eax_2;
0041766e          
0041766e          if ((this->m_dwGetRequestFlags & 4) == 0)
00417672              eax_2 = m_pObj->vtable->InitLoad(m_pObj);
00417672          
00417677          if (((this->m_dwGetRequestFlags & 4) != 0 || eax_2 != 0))
00417677          {
00417679              class DBObj* m_pObj_1 = this->m_pObj;
00417682              class DBOCache* eax_4 = DBCache::GetDBOCache(m_pObj_1->vtable->GetDBOType(m_pObj_1));
00417682              
0041768c              if (eax_4 != 0)
00417691                  eax_4->vtable->AddObj(eax_4, this->m_pObj);
00417677          }
00417668      }
00417668      
00417699      class DBObj* m_pObj_2 = this->m_pObj;
00417699      
0041769e      if (m_pObj_2 != 0)
0041769e      {
004176a0          m_pObj_2->vtable->Release(m_pObj_2);
004176a5          this->m_pObj = nullptr;
0041769e      }
00417660  }

004176ae                                            90 90                                                                ..

004176b0  void __thiscall AsyncCache::EnqueueAsyncRequest(class AsyncCache* this, struct AsyncCache::CAsyncRequest* arg2)

004176b0  {
004176c1      if (arg2->qdid.ID.id == INVALID_DID.id)
00417766          arg2->Result = AsyncResult_Failure;
004176c1      else
004176c1      {
004176c7          union __inner1 = arg2->__inner1;
004176c7          
004176cd          if (__inner1 == 0)
004176cd          {
00417734              class DBObj* eax_17 = this->vtable->BlockingGet(this, *(int32_t*)((char*)arg2 + 0x28), &arg2->qdid);
00417736              arg2->vtable->ReleaseDBObj(arg2);
0041773f              arg2->m_pObj = eax_17;
00417744              arg2->Result = AsyncResult_Failure;
00417744              
0041774c              if (eax_17 != 0)
0041774c              {
0041774e                  arg2->Result = AsyncResult_Success;
00417755                  *(int32_t*)((char*)arg2 + 0x60) |= 4;
00417759                  this->vtable->OnRequestFinished(this, arg2);
00417763                  return;
0041774c              }
004176cd          }
004176cd          else
004176cd          {
004176d0              if (__inner1 == 1)
004176d0              {
0041770a                  int32_t eax_11 = this->vtable->BlockingPurge(this, &arg2->qdid);
0041770d                  char temp3 = eax_11;
0041770d                  eax_11 = -(eax_11);
0041771a                  arg2->Result = (((eax_11 - eax_11) & 0xfffffffe) + 3);
0041771d                  this->vtable->OnRequestFinished(this, arg2);
00417724                  return;
004176d0              }
004176d0              
004176d3              if (__inner1 == 2)
004176d3              {
004176e5                  int32_t eax_5 = this->vtable->BlockingSave(this, &arg2->qdid, &arg2[1]);
004176e8                  char temp5 = eax_5;
004176e8                  eax_5 = -(eax_5);
004176f5                  arg2->Result = (((eax_5 - eax_5) & 0xfffffffe) + 3);
004176f8                  this->vtable->OnRequestFinished(this, arg2);
004176ff                  return;
004176d3              }
004176cd          }
004176c1      }
004176c1      
0041776d      this->vtable->OnRequestFinished(this, arg2);
004176b0  }

0041777a                                                                                90 90 90 90 90 90                            ......

00417780  void __thiscall AsyncCache::OnAsyncGetFinished(class AsyncCache* this, struct CAsyncGetRequest* arg2)

00417780  {
00417794      if ((arg2->Result == AsyncResult_Success && arg2->m_pObj == 0))
00417796          arg2->Result = AsyncResult_Failure;
00417796      
004177a0      int32_t i = 0;
004177a0      
004177a4      if (arg2->RequestsWaitingForMe.m_num > 0)
004177a4      {
004177ec          do
004177ec          {
004177aa              struct CAsyncGetRequest* esi_1 = arg2->RequestsWaitingForMe.m_data[i];
004177b0              int32_t edx_2 = (esi_1->nGetsRemaining - 1);
004177b1              esi_1->nGetsRemaining = edx_2;
004177b1              
004177ba              if (arg2->Result == AsyncResult_Failure)
004177bc                  esi_1->Result = AsyncResult_PartialSuccess;
004177bc              
004177c5              if (edx_2 == 0)
004177c7                  this->vtable->OnAsyncGetFinished(this, esi_1);
004177c7              
004177dc              if (InterlockedDecrement(&esi_1->m_cRef) == 0)
004177de                  esi_1->vtable->__vecDelDtor(1);
004177de              
004177e9              i += 1;
004177ec          } while (i < arg2->RequestsWaitingForMe.m_num);
004177a4      }
004177a4      
004177ef      arg2->RequestsWaitingForMe.m_num = 0;
004177f6      this->vtable->NotifyCallback(this, arg2);
00417780  }

00417805                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00417810  uint8_t __stdcall AsyncCache::SerializeFromCachePack(class AsyncCache* this @ ecx, class DBObj* arg2, class Cache_Pack_t* arg3)

00417810  {
00417823      SmartBuffer::ReconfigureAllocation(&arg3->m_buff, 4, 1);
00417831      void __return;
00417831      SmartBuffer::MakeWindow(&arg3->m_buff, &__return, 4);
0041783c      int32_t var_24 = 0x792b3c;
00417844      int32_t var_20 = 0;
00417848      int32_t var_1c = 0;
0041784c      void var_18;
0041784c      SmartBuffer::SmartBuffer(&var_18);
00417855      uint32_t m_iVersion = arg3->m_iVersion;
00417858      uint32_t eax_1 = (var_20 | 0x400);
0041785d      uint32_t m_iVersion_1 = m_iVersion;
0041785e      int32_t var_c = 0;
00417862      int32_t var_8 = 0;
00417866      int32_t var_4 = 0;
00417866      
0041787c      if ((m_iVersion == 0 || GetCoreSDKPackVersionFromDBObjPackVersion(eax_1) == 0))
0041787c      {
004178ef          Archive::~Archive(&var_24);
004178f8          SmartBuffer::~SmartBuffer(&__return);
004178ff          int32_t eax_6;
004178ff          eax_6 = 0;
00417905          return 0;
0041787c      }
0041787c      
0041787f      class ArchiveInitializer var_38 = 0x79535c;
0041789d      class ArchiveVersionRow* var_34 = GetVersionRowForDBObjPackVersion(m_iVersion);
004178a1      Archive::InitForUnpacking(&var_24, &var_38, &__return);
004178ae      arg2->vtable->Serialize(arg2, &var_24);
004178d2      Archive::~Archive(&var_24);
004178db      SmartBuffer::~SmartBuffer(&__return);
004178e8      return (!(((int8_t)((eax_1 | 0x2000) >> 2))) & 1);
00417810  }

00417908                          90 90 90 90 90 90 90 90                                                          ........

00417910  void __fastcall AsyncCache::CallPendingCallbacks(class AsyncCache* this)

00417910  {
0041791b      if (this->m_bCallingPendingCallbacks == 0)
0041791b      {
00417929          this->m_bCallingPendingCallbacks = 1;
00417930          uint32_t eax_1 = GetTickCount();
00417930          
0041793b          if ((GetTickCount() - eax_1) < 0x19)
0041793b          {
00417945              while (this->m_PendingCallbacks.count != 0)
00417945              {
0041794f                  class AsyncCache::CCallbackHandler* eax_6 = this->m_PendingCallbacks.vtable->RemoveAndReturn(&this->m_PendingCallbacks, 0);
00417954                  class AsyncCacheCallback* m_pCallbackPlugin = eax_6->m_pCallbackPlugin;
00417954                  
00417964                  if ((m_pCallbackPlugin != 0 && eax_6->m_hContext.m_id != INVALID_ASYNCCONTEXT.m_id))
00417969                      m_pCallbackPlugin->vtable->OnContextFinished(eax_6->m_hContext.m_id, eax_6->m_AccumulatedResults, eax_6->m_dwUser1);
00417969                  
00417982                  if (InterlockedDecrement(&eax_6->m_cRef) == 0)
00417984                      eax_6->vtable->__vecDelDtor(1);
00417984                  
00417993                  if ((GetTickCount() - eax_1) >= 0x19)
00417993                      break;
00417945              }
0041793b          }
0041793b          
00417997          this->m_bCallingPendingCallbacks = 0;
0041791b      }
00417910  }

004179a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004179b0  uint8_t __thiscall AsyncCache::BlockingLoadInto(class AsyncCache* this, class DBObj* arg2, struct QualifiedDataID const* arg3, class DBOCache* arg4)

004179b0  {
004179c6      int32_t ebx;
004179c6      ebx = arg3->ID.id != INVALID_DID.id;
004179cf      int32_t var_14 = 0;
004179d3      int32_t var_10 = 0;
004179d7      void var_c;
004179d7      SmartBuffer::SmartBuffer(&var_c);
004179d7      
004179de      if (ebx != 0)
004179de      {
004179e2          int32_t var_28_1 = 0;
004179f2          ebx = this->vtable->LoadData(this, arg3, &var_14, 0);
004179f2          
004179f6          if (ebx != 0)
004179f6          {
00417a0c              ebx = this->vtable->SerializeFromCachePack(this, arg2, &var_14);
00417a0c              
00417a18              if ((ebx != 0 && arg2->m_DID.id != arg3->ID.id))
00417a1a                  ebx = 0;
004179f6          }
004179de      }
004179de      
00417a20      SmartBuffer::~SmartBuffer(&var_c);
00417a29      SmartBuffer::~SmartBuffer(&var_c);
00417a37      return ebx;
004179b0  }

00417a3a                                                                                90 90 90 90 90 90                            ......

00417a40  class DBObj* __thiscall AsyncCache::BlockingGetFromDisk(class AsyncCache* this, struct QualifiedDataID const* arg2, class DBOCache* arg3)

00417a40  {
00417a57      class DBObj* result = nullptr;
00417a57      
00417a5b      if (arg2->ID.id != INVALID_DID.id)
00417a69          result = this->vtable->GetFreeObj(this, arg2, arg3);
00417a69      
00417a72      uint8_t eax_3 = this->vtable->BlockingLoadInto(this, result, arg2, arg3);
00417a77      char eax_4;
00417a77      
00417a77      if (eax_3 != 0)
00417a7d          eax_4 = result->vtable->InitLoad();
00417a7d      
00417a82      if ((eax_3 != 0 && eax_4 != 0))
00417a84          this->vtable->AddObjToDBOCache(this, result, arg3);
00417a82      else if (result != 0)
00417a9b      {
00417a9d          result->vtable->Release();
00417aaa          return 0;
00417a9b      }
00417a9b      
00417a96      return result;
00417a40  }

00417aad                                         90 90 90                                                               ...

00417ab0  void __fastcall SmartArray<AsyncCache::CAsyncRequest::CCallbackWrapper,1>::Reset(class SmartArray<AsyncCache::CAsyncRequest::CCallbackWrapper,1>* this)

00417ab0  {
00417ab3      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00417ac7      this->m_num = 0;
00417ac7      
00417aca      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00417aca      {
00417acf          operator delete[](this->m_data);
00417ad7          this->m_data = 0;
00417ad9          this->m_sizeAndDeallocate = 0;
00417ade          return;
00417aca      }
00417aca      
00417ae1      if (this->m_data != 0)
00417ae1      {
00417ae3          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
00417ae8          int32_t eax_1 = (eax - 1);
00417ae8          
00417ae9          if ((eax - 1) >= 0)
00417ae9          {
00417afb              int32_t temp1_1;
00417afb              
00417afb              do
00417afb              {
00417af0                  temp1_1 = eax_1;
00417af0                  eax_1 -= 1;
00417af1                  struct AsyncCache::CAsyncRequest::CCallbackWrapper* m_data = this->m_data;
00417af3                  m_data[(eax_1 + 1)].pCallbackHandler = 0;
00417af7                  *(uint32_t*)(&m_data[eax_1] + 0xc) = 0;
00417afb              } while ((temp1_1 - 1) >= 0);
00417ae9          }
00417ae1      }
00417ab0  }


00417b00  uint8_t __thiscall AsyncCache::CAsyncRequest::RemoveCallback(struct AsyncCache::CAsyncRequest* this, class AsyncCache::CCallbackHandler* arg2)

00417b00  {
00417b02      uint32_t m_num_1 = this->m_pCallbacks.m_num;
00417b05      int32_t eax = 0;
00417b05      
00417b0a      if (m_num_1 > 0)
00417b0a      {
00417b0c          struct AsyncCache::CAsyncRequest::CCallbackWrapper* m_data_1 = this->m_pCallbacks.m_data;
00417b0c          
00417b1d          do
00417b1d          {
00417b15              if (m_data_1->pCallbackHandler == arg2)
00417b15              {
00417b27                  uint32_t m_num = this->m_pCallbacks.m_num;
00417b27                  
00417b2c                  if (eax < m_num)
00417b2c                  {
00417b33                      this->m_pCallbacks.m_num = (m_num - 1);
00417b33                      
00417b36                      if (eax != (m_num - 1))
00417b36                      {
00417b38                          struct AsyncCache::CAsyncRequest::CCallbackWrapper* m_data_2 = this->m_pCallbacks.m_data;
00417b3e                          m_data_2[eax].pCallbackHandler = m_data_2[(m_num - 1)].pCallbackHandler;
00417b45                          m_data_2[eax].dwTimesFinished = m_data_2[(m_num - 1)].dwTimesFinished;
00417b49                          uint32_t m_num_2 = this->m_pCallbacks.m_num;
00417b4c                          struct AsyncCache::CAsyncRequest::CCallbackWrapper* m_data = this->m_pCallbacks.m_data;
00417b53                          m_data[m_num_2].pCallbackHandler = 0;
00417b56                          m_data[m_num_2].dwTimesFinished = 0;
00417b36                      }
00417b2c                  }
00417b2c                  
00417b6a                  if ((InterlockedDecrement(&arg2->m_cRef) == 0 && arg2 != 0))
00417b6c                      arg2->vtable->__vecDelDtor(arg2, 1);
00417b6c                  
00417b76                  void* eax_1;
00417b76                  eax_1 = 1;
00417b79                  return 1;
00417b15              }
00417b15              
00417b17              eax += 1;
00417b18              m_data_1 = &m_data_1[1];
00417b1d          } while (eax < m_num_1);
00417b0a      }
00417b0a      
00417b21      eax = 0;
00417b24      return 0;
00417b00  }

00417b7c                                                                                      90 90 90 90                              ....

00417b80  void __fastcall AsyncCache::CCallbackHandler::OnContextReleased(class AsyncCache::CCallbackHandler* this)

00417b80  {
00417b87      int32_t i = 0;
00417b87      
00417b8b      if (this->m_TopLevelReqs.m_num > 0)
00417b8b      {
00417b8d          int32_t edi;
00417b8d          int32_t var_c_1 = edi;
00417b8d          
00417bd0          do
00417bd0          {
00417b97              AsyncCache::CAsyncRequest::RemoveCallback(this->m_TopLevelReqs.m_data[i], this);
00417b9f              int32_t* edi_2 = this->m_TopLevelReqs.m_data[i];
00417b9f              
00417ba4              if (edi_2 != 0)
00417ba4              {
00417bb6                  if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00417bbe                      **(uint32_t**)edi_2(1);
00417bbe                  
00417bc0                  this->m_TopLevelReqs.m_data[i] = 0;
00417ba4              }
00417ba4              
00417bcd              i += 1;
00417bd0          } while (i < this->m_TopLevelReqs.m_num);
00417b8b      }
00417b8b      
00417bd3      this->m_TopLevelReqs.m_num = 0;
00417bda      this->m_pCallbackPlugin = nullptr;
00417be7      this->m_hContext.m_id = INVALID_ASYNCCONTEXT.m_id;
00417b80  }

00417bed                                         90 90 90                                                               ...

00417bf0  void __thiscall AsyncCache::AsyncGetImmediate(class AsyncCache* this, class AsyncContext* arg2, uint32_t arg3, class QualifiedDataIDArray const* arg4, class AsyncCacheCallback* arg5, uint32_t arg6)

00417bf0  {
00417bf0      class AsyncCache* this_1 = this;
00417bfe      uint32_t count = this->m_PendingCallbacks.count;
00417c1d      class AsyncContext ebx = *(uint32_t*)*(int32_t*)((char*)this->vtable + 0x10)(&arg6, arg3, arg4, arg5, arg6);
00417c23      arg2->m_id = ebx;
00417c25      int32_t* eax_1;
00417c25      eax_1 = this->m_bCallingPendingCallbacks;
00417c25      
00417c2d      if (eax_1 == 0)
00417c2d      {
00417c30          uint32_t count_1 = this->m_PendingCallbacks.count;
00417c30          
00417c35          if (count_1 > count)
00417c35          {
00417c40              while (true)
00417c40              {
00417c40                  count_1 -= 1;
00417c40                  
00417c51                  if (this->m_PendingCallbacks.A[(COMBINE(0, (this->m_PendingCallbacks.first + count_1)) % this->m_PendingCallbacks.max)]->m_hContext.m_id == ebx)
00417c51                      break;
00417c51                  
00417c57                  if (count_1 <= count)
00417c5e                      return;
00417c40              }
00417c40              
00417c64              class AsyncCache::CCallbackHandler* eax_5 = this->m_PendingCallbacks.vtable->RemoveAndReturn(&this->m_PendingCallbacks, count_1);
00417c69              class AsyncCacheCallback* m_pCallbackPlugin = eax_5->m_pCallbackPlugin;
00417c69              
00417c79              if ((m_pCallbackPlugin != 0 && eax_5->m_hContext.m_id != INVALID_ASYNCCONTEXT.m_id))
00417c7e                  m_pCallbackPlugin->vtable->OnContextFinished(eax_5->m_hContext.m_id, eax_5->m_AccumulatedResults, eax_5->m_dwUser1);
00417c7e              
00417c97              if (InterlockedDecrement(&eax_5->m_cRef) == 0)
00417c99                  eax_5->vtable->__vecDelDtor(1);
00417c35          }
00417c2d      }
00417bf0  }

00417ca9                             90 90 90 90 90 90 90                                                           .......

00417cb0  uint8_t __thiscall AsyncCache::AreOnDisk(class AsyncCache* this, class QualifiedDataIDArray const* arg2)

00417cb0  {
00417cc3      void* __return;
00417cc3      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
00417cc8      struct QualifiedDataID* var_4;
00417cc8      struct QualifiedDataID* edi = var_4;
00417cc8      
00417cce      if (edi == 0)
00417cce      {
00417d2d          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax;
00417d2d          eax = 1;
00417d33          return 1;
00417cce      }
00417cce      
00417cd0      void* __return_1 = __return;
00417cd5      struct QualifiedDataID** var_8;
00417cd5      struct QualifiedDataID** esi = var_8;
00417cd5      
00417ce6      while (this->vtable->IsOnDisk(this, edi) != 0)
00417ce6      {
00417ced          edi = *(int32_t*)((char*)edi + 8);
00417ced          
00417cf2          if (edi == 0)
00417cf2          {
00417d00              while (true)
00417d00              {
00417d00                  esi = &esi[1];
00417d00                  
00417d05                  if (esi != (*(uint32_t*)((char*)__return_1 + 0x60) + (*(uint32_t*)((char*)__return_1 + 0x68) << 2)))
00417d05                  {
00417d07                      struct QualifiedDataID* ecx_4 = *(uint32_t*)esi;
00417d07                      
00417d0b                      if (ecx_4 == 0)
00417d0b                          continue;
00417d0b                      else
00417d0b                      {
00417d0d                          edi = ecx_4;
00417d0d                          
00417d11                          if (edi != 0)
00417d11                              break;
00417d0b                      }
00417d05                  }
00417d05                  
00417d16                  int32_t eax_3;
00417d16                  eax_3 = 1;
00417d1c                  return 1;
00417d00              }
00417cf2          }
00417ce6      }
00417ce6      
00417d28      return 0;
00417cb0  }

00417d36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00417d40  uint8_t __thiscall SmartArray<AsyncCache::CAsyncRequest::CCallbackWrapper,1>::grow(class SmartArray<AsyncCache::CAsyncRequest::CCallbackWrapper,1>* this, uint32_t arg2)

00417d40  {
00417d4c      void* eax;
00417d4c      
00417d4c      if (arg2 >= this->m_num)
00417d4c      {
00417d5c          int32_t eax_2;
00417d5c          
00417d5c          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
00417d5c          {
00417dde              eax_2 = 1;
00417de1              return 1;
00417d5c          }
00417d5c          
00417d64          if (arg2 == 0)
00417d64          {
00417d66              SmartArray<AsyncCache::CAsyncRequest::CCallbackWrapper,1>::Reset(this);
00417d6d              int32_t eax_3;
00417d6d              eax_3 = 1;
00417d70              return 1;
00417d64          }
00417d64          
00417d7b          eax = operator new[]((arg2 << 3));
00417d7b          
00417d87          if (eax != 0)
00417d87          {
00417d92              `vector constructor iterator'(eax, 8, arg2, AsyncCache::CAsyncRequest::CCallbackWrapper::CCallbackWrapper);
00417d92              
00417d9a              if (this->m_data != 0)
00417d9a              {
00417d9c                  uint32_t m_num = this->m_num;
00417d9f                  int32_t eax_4 = (m_num - 1);
00417d9f                  
00417da0                  if ((m_num - 1) >= 0)
00417da0                  {
00417db5                      int32_t temp2_1;
00417db5                      
00417db5                      do
00417db5                      {
00417da2                          temp2_1 = eax_4;
00417da2                          eax_4 -= 1;
00417da3                          struct AsyncCache::CAsyncRequest::CCallbackWrapper* m_data = this->m_data;
00417da9                          *(uint32_t*)(((char*)eax + (eax_4 << 3)) + 8) = m_data[(eax_4 + 1)].pCallbackHandler;
00417db1                          *(uint32_t*)(((char*)eax + (eax_4 << 3)) + 0xc) = *(uint32_t*)(&m_data[eax_4] + 0xc);
00417db5                      } while ((temp2_1 - 1) >= 0);
00417da0                  }
00417da0                  
00417dc4                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00417dc9                      operator delete[](this->m_data);
00417d9a              }
00417d9a              
00417dd7              this->m_data = eax;
00417dd9              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00417dde              eax_2 = 1;
00417de1              return 1;
00417d87          }
00417d4c      }
00417d4c      
00417de6      eax = 0;
00417de9      return 0;
00417d40  }

00417dec                                      90 90 90 90                                                              ....

00417df0  uint8_t __thiscall SmartArray<unsigned long,1>::grow(class SmartArray<unsigned long,1>* this, uint32_t arg2)

00417df0  {
00417dfe      uint32_t eax;
00417dfe      
00417dfe      if (arg2 >= this->m_num)
00417dfe      {
00417e0a          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
00417e0a          {
00417e76              eax = 1;
00417e79              return 1;
00417e0a          }
00417e0a          
00417e0e          if (arg2 == 0)
00417e0e          {
00417e10              SmartArray<unsigned long,1>::Reset(this);
00417e17              int32_t eax_2;
00417e17              eax_2 = 1;
00417e1a              return 1;
00417e0e          }
00417e0e          
00417e2a          uint32_t ebx_1 = operator new[]((arg2 << 2));
00417e2a          
00417e31          if (ebx_1 != 0)
00417e31          {
00417e36              if (this->m_data != 0)
00417e36              {
00417e38                  uint32_t m_num = this->m_num;
00417e3b                  eax = (m_num - 1);
00417e3b                  
00417e3c                  if ((m_num - 1) >= 0)
00417e3c                  {
00417e4b                      uint32_t temp2_1;
00417e4b                      
00417e4b                      do
00417e4b                      {
00417e40                          temp2_1 = eax;
00417e40                          eax -= 1;
00417e47                          *(uint32_t*)((ebx_1 + (eax << 2)) + 4) = this->m_data[(eax + 1)];
00417e4b                      } while ((temp2_1 - 1) >= 0);
00417e3c                  }
00417e3c                  
00417e5c                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00417e61                      operator delete[](this->m_data);
00417e36              }
00417e36              
00417e6f              this->m_data = ebx_1;
00417e71              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00417e76              eax = 1;
00417e79              return 1;
00417e31          }
00417dfe      }
00417dfe      
00417e7e      eax = 0;
00417e81      return 0;
00417df0  }

00417e84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00417e90  uint8_t __fastcall AsyncCache::CAsyncRequest::ReadyToUnhash(struct AsyncCache::CAsyncRequest const* this)

00417e90  {
00417e9b      return this->m_cRef == 2;
00417e90  }

00417e9c                                                                                      90 90 90 90                              ....

00417ea0  void __fastcall AsyncCache::CAsyncRequest::~CAsyncRequest(struct AsyncCache::CAsyncRequest* this)

00417ea0  {
00417ea3      class DBObj* m_pObj = this->m_pObj;
00417ea8      this->vtable = 0x795360;
00417ea8      
00417eae      if (m_pObj != 0)
00417eae      {
00417eb0          m_pObj->vtable->Release(m_pObj);
00417eb5          this->m_pObj = nullptr;
00417eae      }
00417eae      
00417ecb      if ((this->m_pCallbacks.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00417ed1          operator delete[](this->m_pCallbacks.m_data);
00417ed1      
00417ed9      this->vtable = 0x7942f4;
00417ea0  }

00417ee1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00417ef0  void __fastcall CAsyncGetRequest::~CAsyncGetRequest(struct CAsyncGetRequest* this)

00417ef0  {
00417ef9      struct CAsyncGetRequest* this_1 = this;
00417efe      int32_t i = 0;
00417f00      bool cond:0 = this_1->RequestsImWaitingFor.m_num <= 0;
00417f03      this_1->vtable = 0x795374;
00417f03      
00417f09      if (!(cond:0))
00417f09      {
00417f32          do
00417f32          {
00417f13              int32_t* edi_1 = this_1->RequestsImWaitingFor.m_data[i];
00417f1a              int32_t eax_2;
00417f1a              eax_2 = InterlockedDecrement(&edi_1[1]);
00417f1a              
00417f22              if ((eax_2 == 0 && edi_1 != 0))
00417f2a                  **(uint32_t**)edi_1(1);
00417f2a              
00417f2f              i += 1;
00417f32          } while (i < this_1->RequestsImWaitingFor.m_num);
00417f09      }
00417f09      
00417f37      int32_t i_1 = 0;
00417f37      
00417f3b      if (this_1->RequestsWaitingForMe.m_num > 0)
00417f3b      {
00417f62          do
00417f62          {
00417f43              int32_t* edi_2 = this_1->RequestsWaitingForMe.m_data[i_1];
00417f43              
00417f52              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00417f5a                  **(uint32_t**)edi_2(1);
00417f5a              
00417f5f              i_1 += 1;
00417f62          } while (i_1 < this_1->RequestsWaitingForMe.m_num);
00417f3b      }
00417f3b      
00417f64      class DBObj* m_pObj = this_1->m_pObj;
00417f64      
00417f69      if (m_pObj != 0)
00417f69      {
00417f6f          uint8_t eax_9;
00417f6f          
00417f6f          if ((this_1->m_dwGetRequestFlags & 4) == 0)
00417f73              eax_9 = m_pObj->vtable->InitLoad(m_pObj);
00417f73          
00417f78          if (((this_1->m_dwGetRequestFlags & 4) != 0 || eax_9 != 0))
00417f78          {
00417f7a              class DBObj* m_pObj_1 = this_1->m_pObj;
00417f83              class DBOCache* eax_11 = DBCache::GetDBOCache(m_pObj_1->vtable->GetDBOType(m_pObj_1));
00417f83              
00417f8d              if (eax_11 != 0)
00417f92                  eax_11->vtable->AddObj(eax_11, this_1->m_pObj);
00417f78          }
00417f69      }
00417f69      
00417f9a      class DBObj* m_pObj_2 = this_1->m_pObj;
00417f9a      
00417f9f      if (m_pObj_2 != 0)
00417f9f      {
00417fa1          m_pObj_2->vtable->Release(m_pObj_2);
00417fa6          this_1->m_pObj = nullptr;
00417f9f      }
00417f9f      
00417fb2      SmartBuffer::~SmartBuffer(&this_1->Buf.m_buff);
00417fb9      SmartBuffer::~SmartBuffer(&this_1->Buf.m_buff);
00417fb9      
00417fcb      if ((this_1->RequestsImWaitingFor.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00417fd1          operator delete[](this_1->RequestsImWaitingFor.m_data);
00417fd1      
00417fe8      if ((this_1->RequestsWaitingForMe.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00417fee          operator delete[](this_1->RequestsWaitingForMe.m_data);
00417fee      
00417ff6      class DBObj* m_pObj_3 = this_1->m_pObj;
00417ffb      this_1->vtable = 0x795360;
00417ffb      
00418001      if (m_pObj_3 != 0)
00418001      {
00418003          m_pObj_3->vtable->Release(m_pObj_3);
00418008          this_1->m_pObj = nullptr;
00418001      }
00418001      
0041801c      if ((this_1->m_pCallbacks.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00418022          operator delete[](this_1->m_pCallbacks.m_data);
00418022      
0041802b      this_1->vtable = 0x7942f4;
00417ef0  }

00417f0d                                         8d 49 00                                                               .I.
00418035                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00418040  uint8_t __fastcall CAsyncGetRequest::bAllDependanciesDone(struct CAsyncGetRequest const* this)

00418040  {
0041804a      return this->nGetsRemaining == 0;
00418040  }

0041804b                                   90 90 90 90 90                                                             .....

00418050  void __fastcall AsyncCache::CCallbackHandler::~CCallbackHandler(class AsyncCache::CCallbackHandler* this)

00418050  {
00418057      int32_t i = 0;
00418059      bool cond:0 = this->m_TopLevelReqs.m_num <= 0;
0041805b      this->vtable = 0x795370;
0041805b      
00418061      if (!(cond:0))
00418061      {
004180ac          do
004180ac          {
00418077              AsyncCache::CAsyncRequest::RemoveCallback(this->m_TopLevelReqs.m_data[i], this);
0041807f              int32_t* edi_1 = this->m_TopLevelReqs.m_data[i];
0041807f              
00418084              if (edi_1 != 0)
00418084              {
00418092                  if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0041809a                      **(uint32_t**)edi_1(1);
0041809a                  
0041809c                  this->m_TopLevelReqs.m_data[i] = 0;
00418084              }
00418084              
004180a9              i += 1;
004180ac          } while (i < this->m_TopLevelReqs.m_num);
00418061      }
00418061      
004180bf      if ((this->m_TopLevelReqs.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004180c5          operator delete[](this->m_TopLevelReqs.m_data);
004180c5      
004180cd      this->vtable = 0x7942f4;
00418050  }

0041806d                                         8d 49 00                                                               .I.
004180d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004180e0  class IntrusiveHashIterator<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1> const* this, class IntrusiveHashIterator<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* __return, struct QualifiedDataID const* arg3)

004180e0  {
004180e6      uint32_t id = arg3->ID.id;
004180ea      uint32_t Type = arg3->Type;
004180f7      void* ebx = &this->m_buckets[(COMBINE(0, (Type + id)) % this->m_numBuckets)];
004180fa      int32_t* edx_2 = *(uint32_t*)ebx;
004180fa      
004180fe      if (edx_2 != 0)
004180fe      {
00418107          while ((*(uint32_t*)edx_2 != Type || edx_2[1] != id))
00418107          {
00418109              edx_2 = edx_2[2];
00418109              
0041810e              if (edx_2 == 0)
0041810e                  break;
00418107          }
004180fe      }
004180fe      
00418110      class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>** result = __return;
00418116      result[1] = ebx;
00418119      *(uint32_t*)result = this;
0041811b      result[2] = edx_2;
0041811f      return result;
004180e0  }

00418122        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00418130  void* __thiscall AsyncCache::CAsyncRequest::`scalar deleting destructor'(struct AsyncCache::CAsyncRequest* this, uint32_t arg2)

00418130  {
00418133      class DBObj* m_pObj = this->m_pObj;
00418138      this->vtable = 0x795360;
00418138      
0041813e      if (m_pObj != 0)
0041813e      {
00418140          m_pObj->vtable->Release(m_pObj);
00418145          this->m_pObj = nullptr;
0041813e      }
0041813e      
0041815b      if ((this->m_pCallbacks.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00418161          operator delete[](this->m_pCallbacks.m_data);
00418161      
0041816e      this->vtable = 0x7942f4;
0041816e      
00418174      if ((arg2 & 1) != 0)
00418177          operator delete(this);
00418177      
00418182      return this;
00418130  }

00418185                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00418190  void* __thiscall AsyncCache::CCallbackHandler::`scalar deleting destructor'(class AsyncCache::CCallbackHandler* this, uint32_t arg2)

00418190  {
00418193      AsyncCache::CCallbackHandler::~CCallbackHandler(this);
00418193      
0041819d      if ((arg2 & 1) != 0)
004181a0          operator delete(this);
004181a0      
004181ab      return this;
00418190  }

004181ae                                            90 90                                                                ..

004181b0  void __fastcall CAsyncGetRequest::CAsyncGetRequest(struct CAsyncGetRequest* this)

004181b0  {
004181b3      this->m_cRef = 1;
004181bd      this->Result = AsyncResult_Unknown;
004181c0      this->m_pCallbacks.m_data = 0;
004181c3      this->m_pCallbacks.m_sizeAndDeallocate = 0;
004181c6      this->m_pCallbacks.m_num = 0;
004181c9      this->m_pObj = nullptr;
004181cc      this->vtable = 0x795374;
004181d2      __builtin_memset(&this->RequestsWaitingForMe, 0, 0x20);
004181ed      SmartBuffer::SmartBuffer(&this->Buf.m_buff);
004181f2      this->m_dwGetRequestFlags = 0;
004181b0  }

004181fa                                                                                90 90 90 90 90 90                            ......

00418200  void* __thiscall CAsyncGetRequest::`scalar deleting destructor'(struct CAsyncGetRequest* this, uint32_t arg2)

00418200  {
00418203      CAsyncGetRequest::~CAsyncGetRequest(this);
00418203      
0041820d      if ((arg2 & 1) != 0)
00418210          operator delete(this);
00418210      
0041821b      return this;
00418200  }

0041821e                                                                                            90 90                                ..

00418220  void* __thiscall CAsyncPurgeRequest::`scalar deleting destructor'(struct CAsyncPurgeRequest* this, uint32_t arg2)

00418220  {
00418223      AsyncCache::CAsyncRequest::~CAsyncRequest(this);
00418223      
0041822d      if ((arg2 & 1) != 0)
00418230          operator delete(this);
00418230      
0041823b      return this;
00418220  }

0041823e                                                                                            90 90                                ..

00418240  void* __thiscall CAsyncSaveRequest::`scalar deleting destructor'(struct CAsyncSaveRequest* this, uint32_t arg2)

00418240  {
00418246      Cache_Pack_t::~Cache_Pack_t(&this->Buf);
0041824d      AsyncCache::CAsyncRequest::~CAsyncRequest(this);
0041824d      
00418257      if ((arg2 & 1) != 0)
0041825a          operator delete(this);
0041825a      
00418265      return this;
00418240  }

00418268                          90 90 90 90 90 90 90 90                                                          ........

00418270  uint32_t IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::next_largest_num_buckets(uint32_t arg1)

00418270  {
00418275      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041827b      arg1 = arg1;
00418292      uint32_t* eax_1 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg1, ((int8_t)arg1), nullptr);
0041829a      bool cond:0 = eax_1 == bucketSizesEnd_1;
0041829a      
0041829c      if (eax_1 == bucketSizesEnd_1)
0041829c      {
0041829e          eax_1 -= 4;
004182a1          cond:0 = eax_1 == bucketSizesEnd_1;
0041829c      }
0041829c      
004182a4      if (cond:0)
004182ac          return *(uint32_t*)eax_1;
004182ac      
004182a9      return eax_1[1];
00418270  }

004182ad                                         90 90 90                                                               ...

004182b0  void __thiscall AsyncCache::NotifyCallback(class AsyncCache* this, struct AsyncCache::CAsyncRequest* arg2)

004182b0  {
004182b0      int32_t ebx;
004182b0      int32_t var_4 = ebx;
004182b3      struct AsyncCache::CAsyncRequest* esi = arg2;
004182b3      
004182bf      if (esi->__inner1 == 0)
004182bf      {
004182c4          int32_t i = 0;
004182c4          
004182c8          if (esi->m_pCallbacks.m_num > 0)
004182c8          {
00418315              do
00418315              {
004182d3                  void* ecx = &esi->m_pCallbacks.m_data[i];
004182d6                  void* eax_3 = *(uint32_t*)ecx;
004182d6                  
004182e1                  if ((eax_3 != 0 && *(uint8_t*)((char*)eax_3 + 0x28) == 0))
004182e1                  {
004182e3                      *(uint32_t*)((char*)ecx + 4) += 1;
004182e6                      int32_t* ecx_1 = *(uint32_t*)((char*)eax_3 + 0xc);
004182e6                      
004182eb                      if (ecx_1 != 0)
0041830c                          *(uint32_t*)(*(uint32_t*)ecx_1 + 4)(*(uint32_t*)((char*)eax_3 + 0x24), esi->qdid.Type, esi->qdid.ID.id, esi->Result, *(uint32_t*)((char*)eax_3 + 0x14), esi->m_pCallbacks.m_data[i].dwTimesFinished, esi);
004182e1                  }
004182e1                  
00418312                  i += 1;
00418315              } while (i < esi->m_pCallbacks.m_num);
004182c8          }
004182bf      }
004182bf      
00418320      if (esi->vtable->bAllDependanciesDone(esi) != 0)
00418320      {
00418329          int32_t i_1 = 0;
00418329          
0041832d          if (esi->m_pCallbacks.m_num > 0)
0041832d          {
004183eb              do
004183eb              {
00418336                  struct AsyncCache::CAsyncRequest* pCallbackHandler = esi->m_pCallbacks.m_data[i_1].pCallbackHandler;
0041833b                  arg2 = pCallbackHandler;
0041833b                  
0041833f                  if (pCallbackHandler != 0)
0041833f                  {
00418345                      pCallbackHandler->Result -= 1;
00418348                      enum AsyncResult Result = esi->Result;
00418348                      
0041834e                      if (Result != AsyncResult_Success)
0041834e                      {
0041836e                          uint32_t Type_1 = pCallbackHandler->qdid.Type;
0041836e                          
00418374                          if (Type_1 == 1)
00418376                              pCallbackHandler->qdid.Type = 2;
00418374                          else if (Type_1 == 0)
00418383                              pCallbackHandler->qdid.Type = Result;
0041834e                      }
0041834e                      else
0041834e                      {
00418350                          uint32_t Type = pCallbackHandler->qdid.Type;
00418350                          
00418356                          if (Type == 3)
00418358                              pCallbackHandler->qdid.Type = 2;
00418356                          else if (Type == 0)
00418365                              pCallbackHandler->qdid.Type = 1;
0041834e                      }
0041834e                      
00418386                      struct AsyncCache::CAsyncRequest* edi_1 = arg2;
00418386                      
0041838f                      if (edi_1->Result == AsyncResult_Unknown)
0041838f                      {
00418391                          enum AsyncResult eax_9;
00418391                          eax_9 = *(int32_t*)((char*)edi_1 + 0x28);
00418391                          
00418396                          if (eax_9 == 0)
00418396                          {
00418398                              class DBObj* m_pObj = edi_1->m_pObj;
00418398                              
004183b2                              for (int32_t* j = this->m_BusyCallbacks.m_intrusiveTable.m_buckets[(COMBINE(0, m_pObj) % this->m_BusyCallbacks.m_intrusiveTable.m_numBuckets)]; j != 0; j = j[1])
004183b2                              {
004183b6                                  if (*(uint32_t*)j == m_pObj)
004183b6                                  {
004183c3                                      if (j != 0)
004183c3                                      {
004183c9                                          InterlockedIncrement(&edi_1->m_cRef);
004183d3                                          *(int32_t*)((char*)arg2 + 0x28) = 1;
004183d7                                          this->m_PendingCallbacks.vtable->Add(&this->m_PendingCallbacks, &arg2);
004183c3                                      }
004183c3                                      
004183c3                                      break;
004183b6                                  }
004183b2                              }
00418396                          }
0041838f                      }
0041833f                  }
0041833f                  
004183e8                  i_1 += 1;
004183eb              } while (i_1 < esi->m_pCallbacks.m_num);
0041832d          }
0041832d          
004183f3          AsyncCache::CAsyncRequest::RemoveAllCallbacks(esi);
00418320      }
004182b0  }

004183ff                                                                                               90                                 .

00418400  uint8_t __thiscall HashTable<QualifiedDataID,CAsyncGetRequest *,1>::find(class HashTable<QualifiedDataID,CAsyncGetRequest *,1> const* this, struct QualifiedDataID const* arg2, struct CAsyncGetRequest** arg3)

00418400  {
00418410      void __return;
00418410      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(&this->m_intrusiveTable, &__return, arg2);
0041841b      void* var_4;
0041841b      
0041841b      if (var_4 == 0)
0041841b      {
0041842e          void* eax;
0041842e          eax = 0;
00418433          return 0;
0041841b      }
0041841b      
00418424      *(uint32_t*)arg3 = *(uint32_t*)((char*)var_4 + 0xc);
00418426      struct CAsyncGetRequest* eax_1;
00418426      eax_1 = 1;
0041842b      return 1;
00418400  }

00418436                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00418440  void __thiscall AsyncCache::CAsyncRequest::AddCallback(struct AsyncCache::CAsyncRequest* this, class AsyncCache::CCallbackHandler* arg2)

00418440  {
0041844d      InterlockedIncrement(&arg2->m_cRef);
0041845c      int32_t eax_2 = (this->m_pCallbacks.m_sizeAndDeallocate & 0x7fffffff);
00418465      uint8_t eax_5;
00418465      
00418465      if (this->m_pCallbacks.m_num >= eax_2)
00418473          eax_5 = SmartArray<AsyncCache::CAsyncRequest::CCallbackWrapper,1>::grow(&this->m_pCallbacks, SmartArray<unsigned long,1>::get_new_size(&this->m_pCallbacks, (eax_2 + 1)));
00418473      
0041847a      if ((this->m_pCallbacks.m_num < eax_2 || eax_5 != 0))
0041847a      {
0041847c          uint32_t m_num = this->m_pCallbacks.m_num;
0041847f          struct AsyncCache::CAsyncRequest::CCallbackWrapper* m_data = this->m_pCallbacks.m_data;
00418481          m_data[m_num].pCallbackHandler = arg2;
00418484          m_data[m_num].dwTimesFinished = 0;
00418459          this->m_pCallbacks.m_num += 1;
0041847a      }
00418440  }

00418491                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004184a0  struct CAsyncGetRequest* __thiscall AsyncCache::FormGetRequest(class AsyncCache* this, struct CAsyncGetRequest* arg2, uint32_t arg3, struct QualifiedDataID const* arg4)

004184a0  {
004184b5      void __return;
004184b5      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(&this->m_PendingGets.m_intrusiveTable, &__return, arg4);
004184c0      void* var_4;
004184c0      
004184c0      if (var_4 != 0)
004184c0      {
004184c2          int32_t esi = *(uint32_t*)((char*)var_4 + 0xc);
004184c9          InterlockedIncrement((esi + 4));
004184d7          return esi;
004184c0      }
004184c0      
004184dc      void* eax_3 = operator new(0x64);
004184e6      void* const esi_1;
004184e6      
004184e6      if (eax_3 == 0)
004184f3          esi_1 = nullptr;
004184e6      else
004184ef          esi_1 = CAsyncGetRequest::CAsyncGetRequest(eax_3);
004184ef      
004184fd      *(uint32_t*)((char*)esi_1 + 0x5c) = this->vtable->GetDBOCache(this, arg4);
00418504      *(uint32_t*)((char*)esi_1 + 0x28) = arg3;
00418507      *(uint32_t*)((char*)esi_1 + 0xc) = 0;
00418510      *(uint32_t*)((char*)esi_1 + 0x10) = arg4->Type;
00418517      *(uint32_t*)((char*)esi_1 + 0x14) = arg4->ID.id;
0041851a      *(uint32_t*)((char*)esi_1 + 0x58) = 1;
00418521      *(uint32_t*)((char*)esi_1 + 8) = 0;
0041852f      return esi_1;
004184a0  }

00418532                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00418540  void __thiscall AsyncCache::OnSaveRequestFinished(class AsyncCache* this, struct CAsyncSaveRequest* arg2)

00418540  {
00418546      struct CAsyncSaveRequest* edi = arg2;
00418558      void __return;
00418558      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(&this->m_PendingGets.m_intrusiveTable, &__return, &edi->qdid);
00418563      void* var_4;
00418563      
00418563      if (var_4 != 0)
00418563      {
00418566          struct CAsyncGetRequest* ebx_1 = *(uint32_t*)((char*)var_4 + 0xc);
00418566          
00418574          if ((ebx_1->Result == AsyncResult_Unknown && (ebx_1->m_dwGetRequestFlags & 2) == 0))
00418574          {
0041857d              ebx_1->Result = edi->Result;
0041857d              
00418589              if (arg2->Result == AsyncResult_Success)
00418589              {
0041858d                  uint8_t* eax_3 = Cache_Pack_t::GetPackBufferPtr(&edi->Buf);
00418594                  uint32_t eax_4;
00418594                  
00418594                  if (eax_3 != 0)
00418598                      eax_4 = Cache_Pack_t::GetDataSize(&edi->Buf);
00418598                  
0041859f                  if ((eax_3 == 0 || eax_4 == 0))
0041859f                  {
004185a3                      int32_t var_20_1 = 0;
004185a1                      this->vtable->LoadData(this, &edi->qdid, &edi->Buf, 0);
0041859f                  }
0041859f                  
004185b5                  Cache_Pack_t::operator=(&ebx_1->Buf.m_dwOffset, &edi->Buf);
00418589              }
00418589              
004185ba              this->vtable->OnGetRequestFinished(this, ebx_1);
004185c2              edi = arg2;
00418574          }
00418563      }
00418563      
004185c7      this->vtable->NotifyCallback(this, edi);
00418540  }

004185d8                                                                          90 90 90 90 90 90 90 90                          ........

004185e0  uint8_t __thiscall AsyncCache::IsOnDisk(class AsyncCache* this, struct QualifiedDataID const* arg2)

004185e0  {
004185ee      class DBOCache* eax_1 = this->vtable->GetDBOCache(this, arg2);
004185f3      int32_t eax_2;
004185f3      
004185f3      if (eax_1 != 0)
004185fb          eax_2 = DBOCache::IsInMemory(eax_1, arg2->ID.id);
004185fb      
00418602      if ((eax_1 == 0 || eax_2 == 0))
00418602      {
0041860d          void __return;
0041860d          IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(&this->m_PendingGets.m_intrusiveTable, &__return, arg2);
00418618          void* var_4;
00418618          
00418618          if (var_4 == 0)
00418618          {
0041863b          label_41863b:
0041863b              int32_t var_18_3 = 0;
00418642              class DiskController* eax_6 = this->vtable->GetDiskController(this, arg2, 0);
00418642              
0041864a              if (eax_6 != 0)
0041865e                  return eax_6->vtable->IsMember(arg2->ID.id, 0);
0041865e              
00418662              eax_6 = 0;
00418668              return 0;
00418618          }
00418618          
0041861a          void* eax_4 = *(uint32_t*)((char*)var_4 + 0xc);
0041861a          
00418621          if ((*(uint8_t*)((char*)eax_4 + 0x60) & 2) != 0)
00418621              goto label_41863b;
00418621          
00418623          eax_2 = *(uint32_t*)((char*)eax_4 + 8);
00418623          
0041862d          if ((eax_2 == 3 || eax_2 == 0))
00418629              goto label_41863b;
00418602      }
00418602      
00418630      eax_2 = 1;
00418636      return 1;
004185e0  }

0041866b                                   90 90 90 90 90                                                             .....

00418670  class DBObj* __thiscall AsyncCache::BlockingGet(class AsyncCache* this, uint32_t arg2, struct QualifiedDataID const* arg3)

00418670  {
00418671      struct QualifiedDataID* ebx = arg3;
00418671      
00418681      if (ebx->ID.id == INVALID_DID.id)
00418687          return 0;
00418687      
00418691      class DBOCache* eax_2 = this->vtable->GetDBOCache(this, ebx);
00418691      
00418698      if (eax_2 != 0)
00418698      {
004186a9          class DBObj* result_1 = this->vtable->GetIfInMemory(this, ebx, eax_2);
004186af          class DBObj* result = result_1;
004186b1          bool cond:0_1 = result != 0;
004186b1          
004186b3          if (result != 0)
004186b3              goto label_418722;
004186b3          
004186be          arg3 = result_1;
004186c2          uint8_t eax_5 = HashTable<QualifiedDataID,CAsyncGetRequest *,1>::find(&this->m_PendingGets, ebx, &arg3);
004186c9          struct QualifiedDataID* eax_6;
004186c9          
004186c9          if (eax_5 != 0)
004186c9          {
004186cb              eax_6 = arg3;
004186cf              result = *(int32_t*)((char*)eax_6 + 0x24);
004186c9          }
004186c9          
004186d4          if ((eax_5 == 0 || result == 0))
004186d4          {
00418713              if (eax_2->vtable->CanLoadFromDisk() != 0)
0041871e                  result = this->vtable->BlockingGetFromDisk(this, ebx, eax_2);
0041871e              
00418713              goto label_418720;
004186d4          }
004186d4          
004186e0          if ((4 & *(int32_t*)((char*)eax_6 + 0x60)) != 0)
004186e0              goto label_4186f1;
004186e0          
004186eb          if (result->vtable->InitLoad() != 0)
004186eb          {
004186ed              eax_6 = arg3;
004186f1          label_4186f1:
004186f1              *(int32_t*)((char*)eax_6 + 0x60) |= 4;
004186f4              this->vtable->AddObjToDBOCache(this, result, eax_2);
00418700              result->vtable->AddRef();
00418720          label_418720:
00418720              cond:0_1 = result != 0;
00418722          label_418722:
00418722              result_1 = cond:0_1;
00418722              
00418727              if (result_1 == 0)
00418727              {
00418754              label_418754:
00418754                  
00418756                  if (result != 0)
00418756                  {
00418758                      result->vtable->Release();
0041875f                      return nullptr;
00418756                  }
00418727              }
00418727              else
00418727              {
00418729                  result_1 = result->m_bLoaded;
00418729                  
0041873b                  if ((result_1 == 0 && arg2 != 1))
0041873b                  {
00418746                      if (result->vtable->GetSubObjects() == 0)
00418746                          goto label_418754;
00418746                      
00418748                      result->m_bLoaded = 1;
0041873b                  }
00418727              }
00418727              
00418767              return result;
004186eb          }
00418698      }
00418698      
004186a0      return 0;
00418670  }

0041876a                                90 90 90 90 90 90                                                            ......

00418770  void __thiscall AsyncCache::OnAsyncGetFromOtherSourcesFailed(class AsyncCache* this, struct QualifiedDataID const* arg2)

00418770  {
00418783      void __return;
00418783      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(&this->m_PendingGets.m_intrusiveTable, &__return, arg2);
0041878e      void* var_4;
0041878e      
0041878e      if (var_4 != 0)
0041878e      {
00418790          struct CAsyncGetRequest* eax_1 = *(uint32_t*)((char*)var_4 + 0xc);
00418793          eax_1->Result = AsyncResult_Failure;
0041879a          this->vtable->OnGetRequestFinished(this, eax_1);
0041878e      }
00418770  }

004187a9                             90 90 90 90 90 90 90                                                           .......

004187b0  void __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* this, uint32_t arg2)

004187b0  {
004187bb      arg2 = arg2;
004187bf      uint8_t edx = ((int8_t)arg2);
004187c3      this->m_buckets = nullptr;
004187c6      this->m_firstInterestingBucket = nullptr;
004187c9      this->m_numBuckets = 0;
004187cc      this->m_numElements = 0;
004187d0      this->vtable = 0x794f88;
004187d6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004187e9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004187e9      
004187f3      if (eax == bucketSizesEnd_1)
004187f5          eax -= 4;
004187f5      
004187f8      uint32_t eax_1 = *(uint32_t*)eax;
004187fd      this->m_numBuckets = eax_1;
004187fd      
00418800      if (eax_1 > 0x17)
00418816          this->m_buckets = operator new[]((eax_1 << 2));
00418800      else
00418805          this->m_buckets = &this->m_aInplaceBuckets;
00418805      
0041881c      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_buckets = this->m_buckets;
0041881f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00418825      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00418836      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004187b0  }

0041883f                                                                                               90                                 .

00418840  void __thiscall IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>(class IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>* this, uint32_t arg2)

00418840  {
0041884b      arg2 = arg2;
0041884f      uint8_t edx = ((int8_t)arg2);
00418853      this->m_buckets = nullptr;
00418856      this->m_firstInterestingBucket = nullptr;
00418859      this->m_numBuckets = 0;
0041885c      this->m_numElements = 0;
00418860      this->vtable = &IntrusiveHashTable<class AsyncContext,class HashTableData<class AsyncContext,class AsyncCache::CCallbackHandler*>*,1>::`vftable';
00418866      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00418879      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00418879      
00418883      if (eax == bucketSizesEnd_1)
00418885          eax -= 4;
00418885      
00418888      uint32_t eax_1 = *(uint32_t*)eax;
0041888d      this->m_numBuckets = eax_1;
0041888d      
00418890      if (eax_1 > 0x17)
004188a6          this->m_buckets = operator new[]((eax_1 << 2));
00418890      else
00418895          this->m_buckets = &this->m_aInplaceBuckets;
00418895      
004188ac      class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** m_buckets = this->m_buckets;
004188af      uint32_t ecx_3 = (this->m_numBuckets << 2);
004188b5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004188c6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00418840  }

004188cf                                               90                                                                 .

004188d0  uint8_t __thiscall IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::resize_internal(class IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>* this, uint32_t arg2)

004188d0  {
004188da      if (arg2 == this->m_numBuckets)
004188da      {
004188dc          uint32_t eax;
004188dc          eax = 0;
004188df          return 0;
004188da      }
004188da      
004188e5      int32_t* m_firstInterestingBucket_2;
004188e5      int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
004188ea      int32_t* i_1 = nullptr;
004188ea      
004188ee      while (this->m_numElements != 0)
004188ee      {
004188f9          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004188fe          int32_t* i_2;
004188fe          
004188fe          if (this->m_firstInterestingBucket == ecx_1)
004188fe          {
00418911          label_418911:
00418911              m_firstInterestingBucket_2 = nullptr;
00418913              i_2 = nullptr;
004188fe          }
004188fe          else
004188fe          {
00418900              while (true)
00418900              {
00418900                  class DBObjSaveInfo** m_firstInterestingBucket = this->m_firstInterestingBucket;
00418900                  
00418905                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00418905                  {
00418917                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0041891a                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0041891c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0041891c                      break;
00418905                  }
00418905                  
0041890c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0041890c                  
0041890f                  if (&m_firstInterestingBucket[1] == ecx_1)
0041890f                      goto label_418911;
00418900              }
004188fe          }
004188fe          
0041891e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0041891e          
00418922          if (eax_4 == i_2)
00418934              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
00418922          else
00418922          {
0041892b              void* edx_2;
0041892b              
0041892b              do
0041892b              {
00418924                  edx_2 = eax_4;
00418926                  eax_4 = *(uint32_t*)((char*)eax_4 + 8);
0041892b              } while (eax_4 != i_2);
0041892b              
0041892f              if (edx_2 != 0)
0041893b                  *(uint32_t*)((char*)edx_2 + 8) = *(uint32_t*)((char*)eax_4 + 8);
0041892f              else
00418934                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
00418922          }
00418922          
0041893e          this->m_numElements -= 1;
00418941          i_2[2] = i_1;
00418947          i_1 = i_2;
004188ee      }
004188ee      
0041894b      class DBObjSaveInfo** m_buckets = this->m_buckets;
0041894b      
00418953      if (m_buckets != &this->m_aInplaceBuckets)
00418956          operator delete[](m_buckets);
00418956      
00418965      this->m_buckets = nullptr;
00418968      this->m_firstInterestingBucket = nullptr;
0041896b      this->m_numBuckets = 0;
0041896e      this->m_numElements = 0;
00418971      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
00418978      class DBObjSaveInfo** eax_7;
00418978      
00418978      if (i_1 != 0)
00418978      {
004189d2          int32_t* i;
004189d2          
004189d2          do
004189d2          {
00418980              uint32_t m_numBuckets = this->m_numBuckets;
00418986              i = i_1[2];
00418986              
0041898f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0041899d                  IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::resize_internal(this, IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::next_largest_num_buckets(m_numBuckets));
0041899d              
004189ab              uint32_t temp1_1 = (COMBINE(0, (i_1[1] + *(uint32_t*)i_1)) % this->m_numBuckets);
004189ae              class DBObjSaveInfo** m_buckets_1 = this->m_buckets;
004189b4              i_1[2] = m_buckets_1[temp1_1];
004189b7              m_buckets_1[temp1_1] = i_1;
004189bd              eax_7 = &m_buckets_1[temp1_1];
004189bd              
004189c2              if (eax_7 < this->m_firstInterestingBucket)
004189c4                  this->m_firstInterestingBucket = eax_7;
004189c4              
004189cd              this->m_numElements += 1;
004189d0              i_1 = i;
004189d2          } while (i != 0);
00418978      }
00418978      
004189d7      eax_7 = 1;
004189da      return 1;
004188d0  }

004189dd                                                                                         90 90 90                               ...

004189e0  uint8_t __fastcall IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::grow(class IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>* this)

004189e0  {
004189e0      class IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>* m_numBuckets = this;
004189e2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004189ee      m_numBuckets = this->m_numBuckets;
00418a05      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00418a05      
00418a0f      if (eax_2 != bucketSizesEnd_1)
00418a18          eax_2 = &eax_2[1];
00418a0f      else
00418a0f      {
00418a11          eax_2 -= 4;
00418a11          
00418a16          if (eax_2 != bucketSizesEnd_1)
00418a18              eax_2 = &eax_2[1];
00418a0f      }
00418a0f      
00418a28      return IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::resize_internal(this, *(uint32_t*)eax_2);
004189e0  }

00418a29                             90 90 90 90 90 90 90                                                           .......

00418a30  void __thiscall AsyncCache::CCallbackHandler::AddTopLevelRequest(class AsyncCache::CCallbackHandler* this, struct AsyncCache::CAsyncRequest* arg2)

00418a30  {
00418a3d      InterlockedIncrement(&arg2->m_cRef);
00418a4c      int32_t eax_2 = (this->m_TopLevelReqs.m_sizeAndDeallocate & 0x7fffffff);
00418a53      uint8_t eax_5;
00418a53      
00418a53      if (this->m_TopLevelReqs.m_num >= eax_2)
00418a61          eax_5 = SmartArray<unsigned long,1>::grow(&this->m_TopLevelReqs, SmartArray<unsigned long,1>::get_new_size(&this->m_TopLevelReqs, (eax_2 + 1)));
00418a61      
00418a68      if ((this->m_TopLevelReqs.m_num < eax_2 || eax_5 != 0))
00418a68      {
00418a49          this->m_TopLevelReqs.m_data[this->m_TopLevelReqs.m_num] = arg2;
00418a49          this->m_TopLevelReqs.m_num += 1;
00418a68      }
00418a68      
00418a78      AsyncCache::CAsyncRequest::AddCallback(arg2, this);
00418a30  }

00418a83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00418a90  uint8_t __thiscall AsyncCache::AddToAsyncGet(class AsyncCache* this, class AsyncContext arg2, uint32_t arg3, class QualifiedDataIDArray const* arg4)

00418a90  {
00418a94      class AsyncCache* this_1 = this;
00418aaa      class AsyncCache* this_2 = this_1;
00418ab5      int32_t* i;
00418ab5      
00418ab5      for (i = this_1->m_BusyCallbacks.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this_1->m_BusyCallbacks.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00418ab5      {
00418ab9          if (*(uint32_t*)i == arg2)
00418ab9          {
00418acd              if (i == 0)
00418acd                  break;
00418acd              
00418ad7              void* ebp = i[2];
00418ae5              *(uint32_t*)((char*)ebp + 8) += arg4->m_numElements;
00418ae8              void* __return;
00418ae8              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg4, &__return);
00418af3              int32_t* j_1;
00418af3              int32_t* eax_3;
00418af3              
00418af3              if (j_1 != 0)
00418af3              {
00418b0e                  while (true)
00418b0e                  {
00418b0e                      struct CAsyncGetRequest* eax_4 = AsyncCache::FormGetRequest(this_1, nullptr, arg3, j_1);
00418b19                      InterlockedIncrement(&eax_4->m_cRef);
00418b28                      int32_t eax_6 = (*(uint32_t*)((char*)ebp + 0x1c) & 0x7fffffff);
00418b2f                      uint8_t eax_9;
00418b2f                      
00418b2f                      if (*(uint32_t*)((char*)ebp + 0x20) >= eax_6)
00418b3d                          eax_9 = SmartArray<unsigned long,1>::grow(((char*)ebp + 0x18), SmartArray<unsigned long,1>::get_new_size(((char*)ebp + 0x18), (eax_6 + 1)));
00418b3d                      
00418b44                      if ((*(uint32_t*)((char*)ebp + 0x20) < eax_6 || eax_9 != 0))
00418b44                      {
00418b4b                          *(uint32_t*)(*(uint32_t*)((char*)ebp + 0x18) + (*(uint32_t*)((char*)ebp + 0x20) << 2)) = eax_4;
00418b4e                          *(uint32_t*)((char*)ebp + 0x20) += 1;
00418b44                      }
00418b44                      
00418b55                      InterlockedIncrement(((char*)ebp + 4));
00418b64                      int32_t eax_12 = (eax_4->m_pCallbacks.m_sizeAndDeallocate & 0x7fffffff);
00418b6b                      uint8_t eax_15;
00418b6b                      
00418b6b                      if (eax_4->m_pCallbacks.m_num >= eax_12)
00418b79                          eax_15 = SmartArray<AsyncCache::CAsyncRequest::CCallbackWrapper,1>::grow(&eax_4->m_pCallbacks, SmartArray<unsigned long,1>::get_new_size(&eax_4->m_pCallbacks, (eax_12 + 1)));
00418b79                      
00418b80                      if ((eax_4->m_pCallbacks.m_num < eax_12 || eax_15 != 0))
00418b80                      {
00418b82                          uint32_t m_num = eax_4->m_pCallbacks.m_num;
00418b85                          struct AsyncCache::CAsyncRequest::CCallbackWrapper* m_data = eax_4->m_pCallbacks.m_data;
00418b87                          m_data[m_num].pCallbackHandler = ebp;
00418b8c                          m_data[m_num].dwTimesFinished = 0;
00418b61                          eax_4->m_pCallbacks.m_num += 1;
00418b80                      }
00418b80                      
00418b9c                      class AsyncCache* this_3;
00418b9c                      
00418b9c                      if (eax_4->vtable->bAllDependanciesDone() == 0)
00418b9c                      {
00418bb0                          if ((eax_4->m_dwGetRequestFlags & 1) == 0)
00418bb6                              this_2->vtable->HashAndEnqueue(eax_4);
00418bb6                          
00418bbc                          this_3 = this_2;
00418b9c                      }
00418b9c                      else
00418b9c                      {
00418b9e                          this_3 = this_2;
00418ba2                          this_3->vtable->NotifyCallback(eax_4);
00418b9c                      }
00418b9c                      
00418bc9                      if (InterlockedDecrement(&eax_4->m_cRef) == 0)
00418bcb                          eax_4->vtable->__vecDelDtor(1);
00418bcb                      
00418bea                      eax_3 = this_3->m_BusyCallbacks.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this_3->m_BusyCallbacks.m_intrusiveTable.m_numBuckets)];
00418bea                      
00418bee                      if (eax_3 == 0)
00418bee                          break;
00418bee                      
00418bf2                      while (*(uint32_t*)eax_3 != arg2)
00418bf2                      {
00418bf4                          eax_3 = eax_3[1];
00418bf4                          
00418bf9                          if (eax_3 == 0)
00418bf9                          {
00418bfe                              eax_3 = 1;
00418c04                              return 1;
00418bf9                          }
00418bf2                      }
00418bf2                      
00418c09                      if (eax_3 == 0)
00418c09                          break;
00418c09                      
00418c0f                      ebp = eax_3[2];
00418c12                      int32_t* j_2 = j_1[2];
00418c17                      j_1 = j_2;
00418c17                      
00418c1b                      if (j_2 == 0)
00418c1b                      {
00418c21                          void* __return_1 = __return;
00418c43                          int32_t* j;
00418c43                          
00418c43                          do
00418c43                          {
00418c34                              int32_t* var_8;
00418c34                              eax_3 = &var_8[1];
00418c39                              var_8 = eax_3;
00418c39                              
00418c3d                              if (eax_3 == (*(uint32_t*)((char*)__return_1 + 0x60) + (*(uint32_t*)((char*)__return_1 + 0x68) << 2)))
00418c3d                                  goto label_418c56;
00418c3d                              
00418c3f                              j = *(uint32_t*)eax_3;
00418c43                          } while (j == 0);
00418c43                          
00418c49                          j_1 = j;
00418c49                          
00418c4d                          if (j == 0)
00418c4d                              break;
00418c1b                      }
00418c1b                      
00418afc                      this_1 = this_2;
00418b0e                  }
00418af3              }
00418af3              
00418c56          label_418c56:
00418c56              eax_3 = 1;
00418c5c              return 1;
00418ab9          }
00418ab5      }
00418ab5      
00418ac2      i = 0;
00418ac8      return 0;
00418a90  }

00418c5f                                                                                               90                                 .

00418c60  uint8_t __thiscall AsyncCache::AddToAsyncGet(class AsyncCache* this, class AsyncContext arg2, class SmartArray<_STL::pair<unsigned long,QualifiedDataIDArray>,1> const* arg3)

00418c60  {
00418c83      int32_t* i;
00418c83      
00418c83      for (i = this->m_BusyCallbacks.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_BusyCallbacks.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00418c83      {
00418c87          if (*(uint32_t*)i == arg2)
00418c87          {
00418c9b              if (i == 0)
00418c9b                  break;
00418c9b              
00418c9e              void* ebx = i[2];
00418ca5              uint32_t m_num = arg3->m_num;
00418ca8              int32_t ecx = 0;
00418cad              void* var_24 = ebx;
00418cad              
00418cb1              if (m_num > 0)
00418cb1              {
00418cb5                  uint32_t* eax_5 = &arg3->m_data->second.m_numElements;
00418cc0                  uint32_t j;
00418cc0                  
00418cc0                  do
00418cc0                  {
00418cb8                      ecx += ADJ(eax_5)->second.m_numElements;
00418cba                      eax_5 = &eax_5[0x21];
00418cbf                      j = m_num;
00418cbf                      m_num -= 1;
00418cc0                  } while (j != 1);
00418cb1              }
00418cb1              
00418cc2              *(uint32_t*)((char*)ebx + 8) += ecx;
00418cc5              class SmartArray<_STL::pair<unsigned long,QualifiedDataIDArray>,1>* eax_6 = arg3;
00418cce              int32_t var_20 = 0;
00418cce              
00418cd6              if (eax_6->m_num > 0)
00418cd6              {
00418cdc                  void* edx_2 = nullptr;
00418cdf                  void* var_1c_1 = nullptr;
00418cdf                  
00418cf0                  while (true)
00418cf0                  {
00418cf0                      struct _STL::pair<unsigned long,QualifiedDataIDArray>* m_data = eax_6->m_data;
00418cf2                      uint32_t eax_7 = *(uint32_t*)((char*)edx_2 + m_data);
00418cf5                      void* edx_3 = ((char*)edx_2 + m_data);
00418d01                      int32_t j_1 = (*(uint32_t*)((char*)edx_3 + 0x64) + (*(uint32_t*)((char*)edx_3 + 0x6c) << 2));
00418d01                      
00418d0b                      if (*(uint32_t*)((char*)edx_3 + 0x68) != j_1)
00418d0b                      {
00418d21                          int32_t* eax_9;
00418d21                          
00418d21                          do
00418d21                          {
00418d11                              eax_9 = *(uint32_t*)((char*)edx_3 + 0x68);
00418d11                              
00418d17                              if (*(uint32_t*)eax_9 != 0)
00418d17                              {
00418d28                                  int32_t* eax_11 = *(uint32_t*)((char*)edx_3 + 0x68);
00418d2b                                  struct QualifiedDataID* k_3 = *(uint32_t*)eax_11;
00418d2f                                  int32_t* var_8_1 = eax_11;
00418d33                                  struct QualifiedDataID* k_1 = k_3;
00418d33                                  
00418d37                                  if (k_3 != 0)
00418d37                                  {
00418d50                                      while (true)
00418d50                                      {
00418d50                                          struct CAsyncGetRequest* eax_12 = AsyncCache::FormGetRequest(this, nullptr, eax_7, k_1);
00418d61                                          InterlockedIncrement(&eax_12->m_cRef);
00418d69                                          int32_t eax_15 = (*(uint32_t*)((char*)ebx + 0x1c) & 0x7fffffff);
00418d70                                          uint8_t eax_20;
00418d70                                          
00418d70                                          if (*(uint32_t*)((char*)ebx + 0x20) >= eax_15)
00418d70                                          {
00418d72                                              uint32_t edx_5 = (eax_15 + 1);
00418d72                                              
00418d78                                              if (edx_5 <= 8)
00418d7a                                                  edx_5 = 8;
00418d78                                              else if (edx_5 <= 0x4000)
00418d87                                              {
00418da6                                                  int32_t eflags_1;
00418da6                                                  char eax_19;
00418da6                                                  eax_19 = __bsr_gprv_memv(edx_5);
00418db2                                                  int32_t esi_1 = (1 << eax_19);
00418db2                                                  
00418db6                                                  if (edx_5 > esi_1)
00418db8                                                      edx_5 = (esi_1 * 2);
00418d87                                              }
00418d87                                              else
00418d87                                              {
00418d8b                                                  int32_t eax_17 = (edx_5 & 0x3fff);
00418d8b                                                  
00418d90                                                  if (eax_17 != 0)
00418d99                                                      edx_5 += (0x4000 - eax_17);
00418d87                                              }
00418d87                                              
00418dbe                                              eax_20 = SmartArray<unsigned long,1>::grow(((char*)ebx + 0x18), edx_5);
00418d70                                          }
00418d70                                          
00418dc5                                          if ((*(uint32_t*)((char*)ebx + 0x20) < eax_15 || eax_20 != 0))
00418dc5                                          {
00418dcc                                              *(uint32_t*)(*(uint32_t*)((char*)ebx + 0x18) + (*(uint32_t*)((char*)ebx + 0x20) << 2)) = eax_12;
00418dcf                                              *(uint32_t*)((char*)ebx + 0x20) += 1;
00418dc5                                          }
00418dc5                                          
00418dda                                          InterlockedIncrement(((char*)var_24 + 4));
00418de5                                          int32_t eax_25 = (eax_12->m_pCallbacks.m_sizeAndDeallocate & 0x7fffffff);
00418dec                                          uint8_t eax_30;
00418dec                                          
00418dec                                          if (eax_12->m_pCallbacks.m_num >= eax_25)
00418dec                                          {
00418dee                                              uint32_t edx_7 = (eax_25 + 1);
00418dee                                              
00418df4                                              if (edx_7 <= 8)
00418df6                                                  edx_7 = 8;
00418df4                                              else if (edx_7 <= 0x4000)
00418e03                                              {
00418e22                                                  int32_t eflags_2;
00418e22                                                  char eax_29;
00418e22                                                  eax_29 = __bsr_gprv_memv(edx_7);
00418e2e                                                  int32_t edi_1 = (1 << eax_29);
00418e2e                                                  
00418e32                                                  if (edx_7 > edi_1)
00418e34                                                      edx_7 = (edi_1 * 2);
00418e03                                              }
00418e03                                              else
00418e03                                              {
00418e07                                                  int32_t eax_27 = (edx_7 & 0x3fff);
00418e07                                                  
00418e0c                                                  if (eax_27 != 0)
00418e15                                                      edx_7 += (0x4000 - eax_27);
00418e03                                              }
00418e03                                              
00418e3a                                              eax_30 = SmartArray<AsyncCache::CAsyncRequest::CCallbackWrapper,1>::grow(&eax_12->m_pCallbacks, edx_7);
00418dec                                          }
00418dec                                          
00418e41                                          if ((eax_12->m_pCallbacks.m_num < eax_25 || eax_30 != 0))
00418e41                                          {
00418e43                                              uint32_t m_num_1 = eax_12->m_pCallbacks.m_num;
00418e46                                              struct AsyncCache::CAsyncRequest::CCallbackWrapper* m_data_1 = eax_12->m_pCallbacks.m_data;
00418e4c                                              m_data_1[m_num_1].pCallbackHandler = var_24;
00418e51                                              m_data_1[m_num_1].dwTimesFinished = 0;
00418de2                                              eax_12->m_pCallbacks.m_num += 1;
00418e41                                          }
00418e41                                          
00418e62                                          if (eax_12->vtable->bAllDependanciesDone() != 0)
00418e68                                              this->vtable->NotifyCallback(eax_12);
00418e62                                          else if ((eax_12->m_dwGetRequestFlags & 1) == 0)
00418e7a                                              this->vtable->HashAndEnqueue(eax_12);
00418e7a                                          
00418e8c                                          if (InterlockedDecrement(&eax_12->m_cRef) == 0)
00418e8e                                              eax_12->vtable->__vecDelDtor(1);
00418e8e                                          
00418e9b                                          struct QualifiedDataID* k_2 = *(int32_t*)((char*)k_1 + 8);
00418ea0                                          k_1 = k_2;
00418ea0                                          
00418ea4                                          if (k_2 == 0)
00418ea4                                          {
00418eca                                              struct QualifiedDataID* k;
00418eca                                              
00418eca                                              do
00418eca                                              {
00418ebb                                                  void* ecx_19 = &var_8_1[1];
00418ec0                                                  var_8_1 = ecx_19;
00418ec0                                                  
00418ec4                                                  if (ecx_19 == (*(uint32_t*)((char*)edx_3 + 0x64) + (*(uint32_t*)((char*)edx_3 + 0x6c) << 2)))
00418ec4                                                      goto label_418ee2;
00418ec4                                                  
00418ec6                                                  k = *(uint32_t*)ecx_19;
00418eca                                              } while (k == 0);
00418eca                                              
00418ed0                                              k_1 = k;
00418ed0                                              
00418ed4                                              if (k == 0)
00418ed4                                                  break;
00418ea4                                          }
00418d50                                      }
00418d37                                  }
00418d37                                  
00418d37                                  break;
00418d17                              }
00418d17                              
00418d1e                              *(uint32_t*)((char*)edx_3 + 0x68) = &eax_9[1];
00418d21                          } while (&eax_9[1] != j_1);
00418d0b                      }
00418d0b                      
00418ee2                  label_418ee2:
00418ee2                      eax_6 = arg3;
00418eea                      edx_2 = ((char*)var_1c_1 + 0x84);
00418ef0                      bool cond:3_1 = (var_20 + 1) < eax_6->m_num;
00418ef2                      var_20 += 1;
00418ef6                      var_1c_1 = edx_2;
00418ef6                      
00418efa                      if (!(cond:3_1))
00418efa                          break;
00418efa                      
00418ce5                      ebx = var_24;
00418cf0                  }
00418cd6              }
00418cd6              
00418f03              eax_6 = 1;
00418f09              return 1;
00418c87          }
00418c83      }
00418c83      
00418c90      i = 0;
00418c96      return 0;
00418c60  }

00418f0c                                      90 90 90 90                                                              ....

00418f10  void __stdcall AsyncCache::FilterSubDataIDs(class AsyncCache* this @ ecx, class QualifiedDataIDArray* arg2, uint32_t arg3)

00418f10  {
00418f1c      void* __return;
00418f1c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
00418f21      void* i_1;
00418f21      void* i = i_1;
00418f21      
00418f27      if (i != 0)
00418f27      {
00418f2f          void* __return_1 = __return;
00418f34          int32_t* var_8;
00418f34          int32_t* esi_1 = var_8;
00418f34          
00418f59          while (true)
00418f59          {
00418f59              if ((arg3 == 1 || (arg3 != 2 && (arg3 != 3 || (!(((int8_t)(*(uint32_t*)((char*)i + 0xc) >> 3))) & 1) == 0))))
00418f59              {
00418f5b                  void* i_2 = *(uint32_t*)((char*)i + 8);
00418f60                  int32_t* edx_1 = esi_1;
00418f60                  
00418f62                  if (i_2 == 0)
00418f62                  {
00418f70                      while (true)
00418f70                      {
00418f70                          edx_1 = &edx_1[1];
00418f70                          
00418f75                          if (edx_1 == (*(uint32_t*)((char*)__return_1 + 0x60) + (*(uint32_t*)((char*)__return_1 + 0x68) << 2)))
00418f75                              break;
00418f75                          
00418f77                          void* i_3 = *(uint32_t*)edx_1;
00418f77                          
00418f7b                          if (i_3 != 0)
00418f7b                          {
00418f7d                              i_2 = i_3;
00418f7d                              break;
00418f7b                          }
00418f70                      }
00418f62                  }
00418f62                  
00418f7f                  void* eax_9 = *(uint32_t*)esi_1;
00418f7f                  
00418f83                  if (eax_9 == i)
00418f83                  {
00418f95                  label_418f95:
00418f95                      *(uint32_t*)esi_1 = *(uint32_t*)((char*)eax_9 + 8);
00418f97                      *(uint32_t*)((char*)__return_1 + 0x6c) -= 1;
00418f9a                      i = i_2;
00418f9c                      esi_1 = edx_1;
00418f83                  }
00418f83                  else
00418f83                  {
00418f8c                      void* edi_2;
00418f8c                      
00418f8c                      do
00418f8c                      {
00418f85                          edi_2 = eax_9;
00418f87                          eax_9 = *(uint32_t*)((char*)eax_9 + 8);
00418f8c                      } while (eax_9 != i);
00418f8c                      
00418f90                      if (edi_2 == 0)
00418f90                          goto label_418f95;
00418f90                      
00418fa3                      *(uint32_t*)((char*)edi_2 + 8) = *(uint32_t*)((char*)eax_9 + 8);
00418fa6                      *(uint32_t*)((char*)__return_1 + 0x6c) -= 1;
00418fa9                      i = i_2;
00418fab                      esi_1 = edx_1;
00418f83                  }
00418f59              }
00418f59              else
00418f59              {
00418faf                  i = *(uint32_t*)((char*)i + 8);
00418faf                  
00418fb4                  if (i != 0)
00418fb4                      continue;
00418fb4                  else
00418fb4                  {
00418fcb                      do
00418fcb                      {
00418fc0                          esi_1 = &esi_1[1];
00418fc0                          
00418fc5                          if (esi_1 == (*(uint32_t*)((char*)__return_1 + 0x60) + (*(uint32_t*)((char*)__return_1 + 0x68) << 2)))
00418fdc                              return;
00418fdc                          
00418fc7                          i = *(uint32_t*)esi_1;
00418fcb                      } while (i == 0);
00418fb4                  }
00418f59              }
00418f59              
00418fcf              if (i == 0)
00418fcf                  break;
00418f59          }
00418f27      }
00418f10  }

00418fdf                                                                                               90                                 .

00418fe0  uint8_t __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::add(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* this, class HashTableData<QualifiedDataID,CAsyncGetRequest *>* arg2)

00418fe0  {
00418ff1      void __return;
00418ff1      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(this, &__return, arg2);
00418ffc      int32_t var_4;
00418ffc      
00418ffc      if (var_4 != 0)
00418ffc      {
00418fff          int32_t eax;
00418fff          eax = 0;
00419005          return 0;
00418ffc      }
00418ffc      
00419013      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
00419017          IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::grow(this);
00419017      
00419025      uint32_t temp1 = (COMBINE(0, (arg2->m_hashKey.ID.id + arg2->m_hashKey.Type)) % this->m_numBuckets);
00419028      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_buckets = this->m_buckets;
0041902e      arg2->m_hashNext = m_buckets[temp1];
00419031      m_buckets[temp1] = arg2;
00419037      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** eax_3 = &m_buckets[temp1];
00419037      
0041903c      if (eax_3 < this->m_firstInterestingBucket)
0041903e          this->m_firstInterestingBucket = eax_3;
0041903e      
00419041      this->m_numElements += 1;
00419045      eax_3 = 1;
0041904b      return 1;
00418fe0  }

0041904e                                            90 90                                                                ..

00419050  class HashTableData<QualifiedDataID,CAsyncGetRequest *>* __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::remove(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* this, struct QualifiedDataID const* arg2)

00419050  {
00419066      int32_t __return;
00419066      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(this, &__return, arg2);
00419071      int32_t result;
00419071      
00419071      if (result == 0)
004190a2          return 0;
004190a2      
00419080      int32_t var_8;
00419080      int32_t var_20_1 = var_8;
00419087      int32_t result_1 = result;
0041908a      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::remove(this, __return);
00419097      return result;
00419050  }

004190a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004190b0  uint8_t __thiscall IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::add(class IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>* this, class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>* arg2)

004190b0  {
004190b8      uint32_t m_id = arg2->m_hashKey.m_id;
004190bb      uint32_t m_numBuckets = this->m_numBuckets;
004190bb      
004190ce      for (int32_t* i = this->m_buckets[(COMBINE(0, m_id) % m_numBuckets)]; i != 0; i = i[1])
004190ce      {
004190d2          if (*(uint32_t*)i == m_id)
004190d2          {
0041911e              if (i == 0)
0041911e                  break;
0041911e              
00419122              i = 0;
00419125              return 0;
004190d2          }
004190ce      }
004190ce      
004190e4      if ((m_numBuckets * 2) < (this->m_numElements + 1))
004190e8          IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::grow(this);
004190e8      
004190f1      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.m_id) % this->m_numBuckets);
004190f4      class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** m_buckets = this->m_buckets;
004190fa      arg2->m_hashNext = m_buckets[temp1_1];
004190fd      m_buckets[temp1_1] = arg2;
00419103      class HashTableData<AsyncContext,AsyncCache::CCallbackHandler *>** eax_4 = &m_buckets[temp1_1];
00419103      
00419108      if (eax_4 < this->m_firstInterestingBucket)
0041910a          this->m_firstInterestingBucket = eax_4;
0041910a      
00419112      this->m_numElements += 1;
00419116      uint32_t eax_6;
00419116      eax_6 = 1;
00419119      return 1;
004190b0  }

00419128                          90 90 90 90 90 90 90 90                                                          ........

00419130  void __thiscall AsyncCache::OnGetRequestFinished(class AsyncCache* this, struct CAsyncGetRequest* arg2)

00419130  {
00419144      uint32_t ecx_1 = (arg2->m_dwGetRequestFlags & 0xfffffffd);
0041914b      arg2->m_dwGetRequestFlags = ecx_1;
0041914b      
0041915c      if ((((ecx_1 & 1) != 0 || arg2->m_pCallbacks.m_num != 0) || arg2->RequestsWaitingForMe.m_num != 0))
0041915c      {
00419166          if (arg2->Result == AsyncResult_Success)
00419166          {
00419176              class DBObj* eax_4 = this->vtable->GetIfInMemory(this, &arg2->qdid, arg2->pObjCache);
00419176              
00419180              if (eax_4 == 0)
00419180              {
00419205                  class DBObj* eax_9 = this->vtable->GetFreeObj(this, &arg2->qdid, arg2->pObjCache);
0041920b                  arg2->vtable->ReleaseDBObj(arg2);
00419214                  arg2->m_pObj = eax_9;
00419217                  arg2->m_dwGetRequestFlags &= 0xfffffffb;
0041921b                  class DBObj* m_pObj = arg2->m_pObj;
00419225                  class DBObj* ebx_1;
00419225                  
00419225                  if (m_pObj != 0 != 0)
00419225                  {
00419239                      ebx_1 = this->vtable->SerializeFromCachePack(this, m_pObj, &arg2->Buf);
0041923b                      SmartBuffer::~SmartBuffer(&arg2->Buf.m_buff);
00419225                  }
00419225                  
00419242                  if ((m_pObj != 0 != 0 && ebx_1 != 0))
00419242                      goto label_419190;
00419242                  
0041924d                  if (arg2->m_pObj != 0)
0041924d                  {
0041924f                      arg2->vtable->ReleaseDBObj(arg2);
00419256                      arg2->m_pObj = nullptr;
0041924d                  }
0041924d                  
0041925d                  arg2->Result = AsyncResult_Failure;
00419180              }
00419180              else
00419180              {
00419182                  arg2->vtable->ReleaseDBObj(arg2);
00419189                  arg2->m_pObj = eax_4;
0041918c                  arg2->m_dwGetRequestFlags |= 4;
00419190              label_419190:
00419190                  
0041919e                  if ((arg2->GSDIType != 1 && arg2->m_pObj->m_bLoaded == 0))
0041919e                  {
004191a6                      void var_80;
004191a6                      QualifiedDataIDArray::QualifiedDataIDArray(&var_80, 0x20);
004191ab                      class DBObj* m_pObj_1 = arg2->m_pObj;
004191ae                      m_pObj_1->vtable->GetSubDataIDs(m_pObj_1, &var_80);
004191c3                      AsyncCache::FilterSubDataIDs(this, &var_80, arg2->GSDIType);
004191d6                      *(int32_t*)((char*)this->vtable + 0x28)(arg2->GSDIType, &var_80, arg2);
004191dd                      QualifiedDataIDArray::~QualifiedDataIDArray(&var_80);
0041919e                  }
00419180              }
00419166          }
00419166          
004191e4          int32_t nGetsRemaining = arg2->nGetsRemaining;
004191e4          arg2->nGetsRemaining -= 1;
004191e4          
004191e7          if (nGetsRemaining == 1)
004191e9              this->vtable->OnAsyncGetFinished(this, arg2);
0041915c      }
00419130  }

00419269                             90 90 90 90 90 90 90                                                           .......

00419270  uint8_t __thiscall HashTable<QualifiedDataID,CAsyncGetRequest *,1>::add(class HashTable<QualifiedDataID,CAsyncGetRequest *,1>* this, struct QualifiedDataID const* arg2, struct CAsyncGetRequest** arg3)

00419270  {
00419276      void* eax = operator new(0x10);
00419280      void* esi;
00419280      
00419280      if (eax == 0)
004192a4          esi = nullptr;
00419280      else
00419280      {
00419288          *(uint32_t*)eax = arg2->Type;
00419291          *(uint32_t*)((char*)eax + 4) = arg2->ID.id;
00419294          *(uint32_t*)((char*)eax + 8) = 0;
0041929d          *(uint32_t*)((char*)eax + 0xc) = *(uint32_t*)arg3;
004192a0          esi = eax;
00419280      }
00419280      
004192b1      if (IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::add(&this->m_intrusiveTable, esi) != 0)
004192cb          return 1;
004192cb      
004192b5      if (esi != 0)
004192b8          operator delete(esi);
004192b8      
004192c4      return 0;
00419270  }

004192ce                                            90 90                                                                ..

004192d0  uint8_t __thiscall HashTable<AsyncContext,AsyncCache::CCallbackHandler *,1>::add(class HashTable<AsyncContext,AsyncCache::CCallbackHandler *,1>* this, class AsyncContext* arg2, class AsyncCache::CCallbackHandler** arg3)

004192d0  {
004192d6      void* eax = operator new(0xc);
004192e0      void* esi;
004192e0      
004192e0      if (eax == 0)
004192fe          esi = nullptr;
004192e0      else
004192e0      {
004192ec          *(uint32_t*)eax = arg2->m_id;
004192ee          *(uint32_t*)((char*)eax + 4) = 0;
004192f7          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
004192fa          esi = eax;
004192e0      }
004192e0      
0041930b      if (IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::add(&this->m_intrusiveTable, esi) != 0)
00419325          return 1;
00419325      
0041930f      if (esi != 0)
00419312          operator delete(esi);
00419312      
0041931e      return 0;
004192d0  }

00419328                          90 90 90 90 90 90 90 90                                                          ........

00419330  class AsyncCache::CCallbackHandler* __thiscall AsyncCache::AllocateCallback(class AsyncCache* this, class AsyncCacheCallback* arg2, uint32_t arg3, uint32_t arg4)

00419330  {
00419332      class AsyncCacheCallback* ebp = arg2;
00419332      
0041933d      if (ebp == 0)
004193e9          return 0;
004193e9      
00419349      if (this->dwNextCallbackHandle == 0)
0041934b          this->dwNextCallbackHandle = 1;
0041934b      
00419356      uint32_t dwNextCallbackHandle = this->dwNextCallbackHandle;
00419361      this->dwNextCallbackHandle = (dwNextCallbackHandle + 1);
00419367      void* result_1 = operator new(0x2c);
00419371      void* result;
00419371      
00419371      if (result_1 == 0)
004193a3          result = nullptr;
00419371      else
00419371      {
00419373          uint32_t ecx = arg3;
00419377          *(uint32_t*)((char*)result_1 + 4) = 1;
0041937e          *(uint32_t*)result_1 = 0x795370;
00419384          *(uint32_t*)((char*)result_1 + 8) = 0;
00419387          *(uint32_t*)((char*)result_1 + 0xc) = ebp;
0041938a          *(uint32_t*)((char*)result_1 + 0x10) = 0;
0041938d          *(uint32_t*)((char*)result_1 + 0x14) = ecx;
00419390          *(uint32_t*)((char*)result_1 + 0x18) = 0;
00419393          *(uint32_t*)((char*)result_1 + 0x1c) = 0;
00419396          *(uint32_t*)((char*)result_1 + 0x20) = 0;
00419399          *(uint32_t*)((char*)result_1 + 0x24) = dwNextCallbackHandle;
0041939c          *(uint8_t*)((char*)result_1 + 0x28) = 0;
0041939f          result = result_1;
00419371      }
00419371      
004193ae      *(uint32_t*)((char*)result + 8) += arg4;
004193b5      arg2 = result;
004193b9      InterlockedIncrement(((char*)result + 4));
004193cb      arg3 = *(uint32_t*)((char*)result + 0x24);
004193d6      HashTable<AsyncContext,AsyncCache::CCallbackHandler *,1>::add(&this->m_BusyCallbacks, &arg3, &arg2);
004193e1      return result;
00419330  }

004193ec                                      90 90 90 90                                                              ....

004193f0  class AsyncContext* __thiscall AsyncCache::CreateContext(class AsyncCache* this, class AsyncContext* __return, class AsyncCacheCallback* arg3, uint32_t arg4)

004193f0  {
004193f6      if (arg3 == 0)
004193f6      {
00419439          __return->m_id = INVALID_ASYNCCONTEXT.m_id;
0041943b          return __return;
004193f6      }
004193f6      
00419402      class AsyncCache::CCallbackHandler* eax = AsyncCache::AllocateCallback(this, arg3, arg4, 0);
00419414      __return->m_id = eax->m_hContext.m_id;
00419414      
0041941e      if (InterlockedDecrement(&eax->m_cRef) == 0)
00419420          eax->vtable->__vecDelDtor(eax, 1);
00419420      
0041942c      return __return;
004193f0  }

0041943e                                                                                            90 90                                ..

00419440  class AsyncContext* __thiscall AsyncCache::AsyncGet(class AsyncCache* this, class AsyncContext* __return, uint32_t arg3, struct QualifiedDataID const* arg4, class AsyncCacheCallback* arg5, uint32_t arg6)

00419440  {
00419454      struct CAsyncGetRequest* eax = AsyncCache::FormGetRequest(this, nullptr, arg3, arg4);
00419459      uint32_t m_id = INVALID_ASYNCCONTEXT.m_id;
00419465      class AsyncCache::CCallbackHandler* esi = nullptr;
00419465      
00419469      if (arg5 != 0)
00419469      {
0041947a          esi = AsyncCache::AllocateCallback(this, arg5, arg6, 1);
0041947f          AsyncCache::CCallbackHandler::AddTopLevelRequest(esi, eax);
00419484          m_id = esi->m_hContext.m_id;
00419469      }
00419469      
00419490      if (eax->vtable->bAllDependanciesDone(eax) != 0)
00419492          this->vtable->NotifyCallback(this, eax);
00419490      else if ((eax->m_dwGetRequestFlags & 1) == 0)
004194a2          this->vtable->HashAndEnqueue(this, eax);
004194a2      
004194b2      if ((esi != 0 && InterlockedDecrement(&esi->m_cRef) == 0))
004194be          esi->vtable->__vecDelDtor(esi, 1);
004194be      
004194ce      if (InterlockedDecrement(&eax->m_cRef) == 0)
004194d0          eax->vtable->__vecDelDtor(eax, 1);
004194d0      
004194d8      uint32_t* result = __return;
004194de      *(uint32_t*)result = m_id;
004194e2      return result;
00419440  }

004194e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004194f0  class AsyncContext* __thiscall AsyncCache::AsyncGet(class AsyncCache* this, class AsyncContext* __return, uint32_t arg3, class QualifiedDataIDArray const* arg4, class AsyncCacheCallback* arg5, uint32_t arg6)

004194f0  {
004194f4      class QualifiedDataIDArray* esi = arg4;
004194f8      uint32_t m_numElements = esi->m_numElements;
004194f8      
00419501      if (m_numElements == 0)
00419501      {
00419509          uint32_t* __return_2 = __return;
0041950d          *(uint32_t*)__return_2 = INVALID_ASYNCCONTEXT.m_id;
00419513          return __return_2;
00419501      }
00419501      
00419522      class AsyncCache::CCallbackHandler* eax_1 = AsyncCache::AllocateCallback(this, arg5, arg6, m_numElements);
0041952b      class QualifiedDataIDArray const** eax_2;
0041952b      
0041952b      if (eax_1 == 0)
0041953a          eax_2 = &INVALID_ASYNCCONTEXT;
0041952b      else
0041952b      {
00419530          arg4 = eax_1->m_hContext.m_id;
00419534          eax_2 = &arg4;
0041952b      }
0041952b      
00419549      arg4 = *(uint32_t*)eax_2;
0041954d      void* __return_1;
0041954d      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(esi, &__return_1);
00419552      struct QualifiedDataID* var_4;
00419552      struct QualifiedDataID* edi = var_4;
00419552      
00419558      if (edi != 0)
00419558      {
0041955f          struct QualifiedDataID** var_8;
0041955f          struct QualifiedDataID** ebp_1 = var_8;
00419569      label_419569:
00419569          
0041957e          if ((arg3 != 1 && (arg3 == 2 || (arg3 == 3 && (!(((int8_t)(*(int32_t*)((char*)edi + 0xc) >> 3))) & 1) != 0))))
0041957e          {
00419598              struct AsyncCache::CAsyncRequest* esi_1 = AsyncCache::FormGetRequest(this, nullptr, arg3, edi);
00419598              
0041959a              if (eax_1 != 0)
0041959f                  AsyncCache::CCallbackHandler::AddTopLevelRequest(eax_1, esi_1);
0041959f              
004195ad              if (esi_1->vtable->bAllDependanciesDone() != 0)
004195b3                  this->vtable->NotifyCallback(esi_1);
004195ad              else if ((*(int32_t*)((char*)esi_1 + 0x60) & 1) == 0)
004195c5                  this->vtable->HashAndEnqueue(esi_1);
004195c5              
004195d7              if (InterlockedDecrement(&esi_1->m_cRef) == 0)
004195d9                  esi_1->vtable->__vecDelDtor(1);
0041957e          }
0041957e          else if (eax_1 != 0)
00419584              eax_1->m_nRequestsPending -= 1;
00419584          
004195e1          *(int32_t*)((char*)edi + 8);
004195ec          void* __return_3 = __return_1;
004195ec          
00419600          while (true)
00419600          {
00419600              ebp_1 = &ebp_1[1];
00419600              
00419605              if (ebp_1 == (*(uint32_t*)((char*)__return_3 + 0x60) + (*(uint32_t*)((char*)__return_3 + 0x68) << 2)))
00419605                  break;
00419605              
00419607              struct QualifiedDataID* ecx_11 = *(uint32_t*)ebp_1;
00419607              
0041960c              if (ecx_11 != 0)
0041960c              {
0041960e                  edi = ecx_11;
0041960e                  
00419612                  if (edi != 0)
00419612                      goto label_419569;
00419612                  
00419612                  goto label_419619;
0041960c              }
00419600          }
00419558      }
00419558      
00419619  label_419619:
00419619      
0041961c      if ((eax_1 != 0 && InterlockedDecrement(&eax_1->m_cRef) == 0))
0041962c          eax_1->vtable->__vecDelDtor(1);
0041962c      
00419638      class QualifiedDataIDArray** __return_4 = __return;
0041963d      *(uint32_t*)__return_4 = arg4;
00419643      return __return_4;
004194f0  }

00419646                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00419650  class AsyncContext* __thiscall AsyncCache::AsyncPurge(class AsyncCache* this, class AsyncContext* __return, struct QualifiedDataID const* arg3, class AsyncCacheCallback* arg4, uint32_t arg5)

00419650  {
00419650      class AsyncCache* this_1 = this;
0041965e      uint32_t m_id = INVALID_ASYNCCONTEXT.m_id;
00419662      void* eax_1 = operator new(0x28);
0041966e      void* esi;
0041966e      
0041966e      if (eax_1 == 0)
00419690          esi = nullptr;
0041966e      else
0041966e      {
00419670          *(uint32_t*)((char*)eax_1 + 4) = 1;
00419677          *(uint32_t*)((char*)eax_1 + 8) = 0;
0041967a          *(uint32_t*)((char*)eax_1 + 0x18) = 0;
0041967d          *(uint32_t*)((char*)eax_1 + 0x1c) = 0;
00419680          *(uint32_t*)((char*)eax_1 + 0x20) = 0;
00419683          *(uint32_t*)((char*)eax_1 + 0x24) = 0;
00419686          *(uint32_t*)eax_1 = 0x795384;
0041968c          esi = eax_1;
0041966e      }
0041966e      
00419696      *(uint32_t*)((char*)esi + 0xc) = 1;
0041969f      *(uint32_t*)((char*)esi + 0x10) = arg3->Type;
004196a5      bool cond:1 = *(uint32_t*)((char*)esi + 0x24) == 0;
004196a8      *(uint32_t*)((char*)esi + 0x14) = arg3->ID.id;
004196a8      
004196ab      if (!(cond:1))
004196ab      {
004196b1          *(uint32_t*)(*(uint32_t*)esi + 0xc)();
004196b4          *(uint32_t*)((char*)esi + 0x24) = 0;
004196ab      }
004196ab      
004196c3      if (arg4 != 0)
004196c3      {
004196cf          class AsyncCache::CCallbackHandler* eax_5 = AsyncCache::AllocateCallback(this, arg4, arg5, 1);
004196d9          AsyncCache::CCallbackHandler::AddTopLevelRequest(eax_5, esi);
004196e5          m_id = eax_5->m_hContext.m_id;
004196e5          
004196ed          if (InterlockedDecrement(&eax_5->m_cRef) == 0)
004196ef              eax_5->vtable->__vecDelDtor(eax_5, 1);
004196c3      }
004196c3      
004196f7      this->vtable->EnqueueAsyncRequest(this, esi);
004196f7      
00419707      if (InterlockedDecrement(((char*)esi + 4)) != 0)
00419707      {
0041972e          __return->m_id = m_id;
00419732          return __return;
00419707      }
00419707      
0041970f      **(uint32_t**)esi(1);
00419711      uint32_t* __return_1 = __return;
0041971c      *(uint32_t*)__return_1 = m_id;
00419720      return __return_1;
00419650  }

00419735                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00419740  class AsyncContext* __thiscall AsyncCache::AsyncPurge(class AsyncCache* this, class AsyncContext* __return, class QualifiedDataIDArray const* arg3, class AsyncCacheCallback* arg4, uint32_t arg5)

00419740  {
00419754      class AsyncCache::CCallbackHandler* eax_2 = AsyncCache::AllocateCallback(this, arg4, arg5, arg3->m_numElements);
0041975d      class QualifiedDataIDArray const** eax_3;
0041975d      
0041975d      if (eax_2 == 0)
0041976c          eax_3 = &INVALID_ASYNCCONTEXT;
0041975d      else
0041975d      {
00419762          arg3 = eax_2->m_hContext.m_id;
00419766          eax_3 = &arg3;
0041975d      }
0041975d      
00419773      class QualifiedDataIDArray* edi = *(uint32_t*)eax_3;
00419773      
00419775      if ((eax_2 != 0 && InterlockedDecrement(&eax_2->m_cRef) == 0))
00419785          eax_2->vtable->__vecDelDtor(eax_2, 1);
00419785      
0041978d      class QualifiedDataIDArray** result = __return;
00419791      *(uint32_t*)result = edi;
00419795      return result;
00419740  }

00419798                                                                          90 90 90 90 90 90 90 90                          ........

004197a0  class AsyncContext* __thiscall AsyncCache::AsyncSave(class AsyncCache* this, class AsyncContext* __return, struct QualifiedDataID const* arg3, class Cache_Pack_t* arg4, uint64_t arg5, class AsyncCacheCallback* arg6, uint32_t arg7)

004197a0  {
004197a2      uint32_t m_id = INVALID_ASYNCCONTEXT.m_id;
004197b3      void* esi = operator new(0x58);
004197b3      
004197bc      if (esi == 0)
004197ea          esi = nullptr;
004197bc      else
004197bc      {
004197be          *(uint32_t*)((char*)esi + 4) = 1;
004197c5          *(uint32_t*)((char*)esi + 8) = 0;
004197c8          __builtin_memset(((char*)esi + 0x18), 0, 0x18);
004197d4          *(uint32_t*)esi = 0x795394;
004197e3          SmartBuffer::SmartBuffer(((char*)esi + 0x30));
004197bc      }
004197bc      
004197f0      *(uint32_t*)((char*)esi + 0xc) = 2;
004197f9      *(uint32_t*)((char*)esi + 0x10) = arg3->Type;
00419803      *(uint32_t*)((char*)esi + 0x14) = arg3->ID.id;
00419808      *(uint32_t*)((char*)esi + 0x28) = arg4->m_dwOffset;
00419815      *(uint32_t*)((char*)esi + 0x2c) = arg4->m_iVersion;
00419818      SmartBuffer::operator=(((char*)esi + 0x30), &arg4->m_buff);
00419825      *(uint32_t*)((char*)esi + 0x40) = arg5;
0041982e      *(uint32_t*)((char*)esi + 0x4c) = 0;
00419831      *(uint32_t*)((char*)esi + 0x44) = *(uint32_t*)((char*)arg5)[4];
00419834      *(uint32_t*)((char*)esi + 0x48) = 1;
0041983b      *(uint32_t*)((char*)esi + 0x50) = 0;
0041983b      
0041983e      if (arg6 != 0)
0041983e      {
0041984a          class AsyncCache::CCallbackHandler* eax_6 = AsyncCache::AllocateCallback(this, arg6, arg7, 1);
00419854          AsyncCache::CCallbackHandler::AddTopLevelRequest(eax_6, esi);
00419859          m_id = eax_6->m_hContext.m_id;
00419859          
00419868          if (InterlockedDecrement(&eax_6->m_cRef) == 0)
0041986a              eax_6->vtable->__vecDelDtor(eax_6, 1);
0041983e      }
0041983e      
00419872      this->vtable->EnqueueAsyncRequest(this, esi);
00419872      
00419886      if (InterlockedDecrement(((char*)esi + 4)) == 0)
0041988e          **(uint32_t**)esi(1);
0041988e      
00419890      uint32_t* result = __return;
00419896      *(uint32_t*)result = m_id;
0041989a      return result;
004197a0  }

0041989d                                                                                         90 90 90                               ...

004198a0  void __thiscall AsyncCache::HashAndEnqueue(class AsyncCache* this, struct CAsyncGetRequest* arg2)

004198a0  {
004198a1      struct CAsyncGetRequest* esi = arg2;
004198a1      
004198bb      if (HashTable<QualifiedDataID,CAsyncGetRequest *,1>::add(&this->m_PendingGets.vtable, &esi->qdid, &arg2) != 0)
004198bb      {
004198c1          InterlockedIncrement(&esi->m_cRef);
004198ca          uint32_t eax_2 = (esi->m_dwGetRequestFlags | 1);
004198cf          esi->m_dwGetRequestFlags = eax_2;
004198d5          esi->m_dwGetRequestFlags = (eax_2 | 2);
004198d8          this->vtable->EnqueueAsyncRequest(this, esi);
004198bb      }
004198a0  }

004198e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004198f0  void __thiscall AsyncCache::UnhashPendingGet(class AsyncCache* this, struct CAsyncGetRequest* arg2, struct CAsyncGetRequest* arg3)

004198f0  {
004198f6      uint32_t m_num = arg2->RequestsWaitingForMe.m_num;
004198f9      int32_t i = 0;
004198f9      
00419900      if (m_num > 0)
00419900      {
00419902          struct CAsyncGetRequest** m_data = arg2->RequestsWaitingForMe.m_data;
0041990a          int32_t* m_data_1 = m_data;
0041990a          
0041991b          do
0041991b          {
00419912              if (*(uint32_t*)m_data_1 == arg3)
00419912              {
00419921                  if (i < m_num)
00419921                  {
00419928                      arg2->RequestsWaitingForMe.m_num = (m_num - 1);
00419928                      
0041992b                      if (i != (m_num - 1))
0041992b                      {
00419930                          m_data[i] = m_data[(m_num - 1)];
00419936                          arg2->RequestsWaitingForMe.m_data[arg2->RequestsWaitingForMe.m_num] = 0;
0041992b                      }
00419921                  }
00419921                  
00419921                  break;
00419912              }
00419912              
00419914              i += 1;
00419915              m_data_1 = &m_data_1[1];
0041991b          } while (i < arg2->RequestsWaitingForMe.m_num);
00419900      }
00419900      
00419953      if (((arg2->m_dwGetRequestFlags & 1) != 0 && (arg2->RequestsWaitingForMe.m_num == 0 && arg2->m_pCallbacks.m_num == 0)))
00419953      {
00419962          arg2->m_dwGetRequestFlags &= 0xfffffffe;
00419965          class HashTableData<QualifiedDataID,CAsyncGetRequest *>* eax_3 = IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::remove(&this->m_PendingGets.m_intrusiveTable, &arg2->qdid);
00419965          
0041996c          if (eax_3 != 0)
0041996c          {
0041996f              operator delete(eax_3);
0041997a              int32_t i_1 = 0;
0041997a              
0041997e              if (arg2->RequestsImWaitingFor.m_num > 0)
0041997e              {
00419995                  do
00419995                  {
00419986                      this->vtable->UnhashPendingGet(this, arg2->RequestsImWaitingFor.m_data[i_1], arg2);
00419992                      i_1 += 1;
00419995                  } while (i_1 < arg2->RequestsImWaitingFor.m_num);
0041997e              }
0041997e              
004199a3              if (InterlockedDecrement(&arg2->m_cRef) == 0)
004199a5                  arg2->vtable->__vecDelDtor(arg2, 1);
0041996c          }
00419953      }
004198f0  }

004199b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004199c0  void __fastcall AsyncCache::ReleaseContext(class AsyncCache* this, class AsyncContext arg2)

004199c0  {
004199ce      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_BusyCallbacks.m_intrusiveTable, &arg2);
004199ce      
004199d5      if (eax != 0)
004199d5      {
004199d8          class DLListData* dllist_next = eax->dllist_next;
004199dd          operator delete(eax);
004199dd          
004199ec          if (*(int32_t*)((char*)dllist_next + 0x20) > 0)
004199ec          {
004199ee              int32_t i = 0;
004199ee              
00419a0d              do
00419a0d              {
004199f3                  struct CAsyncGetRequest* eax_2 = *(uint32_t*)(*(int32_t*)((char*)dllist_next + 0x18) + (i << 2));
004199f3                  
004199fb                  if (eax_2->__inner1 == 0)
004199fd                      this->vtable->UnhashPendingGet(this, eax_2, nullptr);
004199fd                  
00419a0a                  i += 1;
00419a0d              } while (i < *(int32_t*)((char*)dllist_next + 0x20));
004199ec          }
004199ec          
00419a11          AsyncCache::CCallbackHandler::OnContextReleased(dllist_next);
00419a11          
00419a22          if (InterlockedDecrement(&dllist_next->dllist_prev) == 0)
00419a24              dllist_next->dllist_next->dllist_next(1);
004199d5      }
004199c0  }

00419a32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00419a40  void __fastcall AsyncCache::FlushPendingRequests(class AsyncCache* this)

00419a40  {
00419a54      void __return;
00419a54      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_BusyCallbacks.m_intrusiveTable, &__return);
00419a59      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00419a5b      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00419a5e      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax->m_currElement;
00419a5e      
00419a63      if (m_currElement != 0)
00419a63      {
00419a96          class HashTableData<unsigned long,DBOCache *>* m_hashNext;
00419a96          
00419a96          do
00419a96          {
00419a65              m_hashNext = m_currElement->m_hashNext;
00419a65              
00419a6a              if (m_hashNext == 0)
00419a6a              {
00419a75                  while (true)
00419a75                  {
00419a75                      m_currBucket = &m_currBucket[1];
00419a75                      
00419a7a                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00419a7a                          break;
00419a7a                      
00419a7c                      class HashTableData<unsigned long,DBOCache *>* m_hashNext_1 = *(uint32_t*)m_currBucket;
00419a7c                      
00419a80                      if (m_hashNext_1 != 0)
00419a80                      {
00419a82                          m_hashNext = m_hashNext_1;
00419a82                          break;
00419a80                      }
00419a75                  }
00419a6a              }
00419a6a              
00419a8a              this->vtable->ReleaseContext(this, m_currElement->m_data->m_ObjTable.m_intrusiveTable.m_aInplaceBuckets[6]);
00419a94              m_currElement = m_hashNext;
00419a96          } while (m_hashNext != 0);
00419a63      }
00419a63      
00419a98      class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* ebx_1 = &this->m_PendingGets.m_intrusiveTable;
00419aa6      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_3 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(ebx_1, &__return);
00419aab      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_3->m_currElement;
00419ab0      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = eax_3->m_currHashTable;
00419ab2      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = eax_3->m_currBucket;
00419ab2      
00419ab5      if (i_1 != 0)
00419ab5      {
00419ab7          while (true)
00419ab7          {
00419ab7              int32_t* ebx_2 = *(int32_t*)((char*)i_1 + 0xc);
00419ab7              
00419aca              if ((InterlockedDecrement(&ebx_2[1]) == 0 && ebx_2 != 0))
00419ad2                  **(uint32_t**)ebx_2(1);
00419ad2              
00419ad4              i_1 = i_1->m_data;
00419ad4              
00419ad9              if (i_1 == 0)
00419ad9              {
00419aef                  class HashTableData<unsigned long,DBOCache *>* i;
00419aef                  
00419aef                  do
00419aef                  {
00419ae4                      m_currBucket_1 = &m_currBucket_1[1];
00419ae4                      
00419ae9                      if (m_currBucket_1 == &m_currHashTable_1->m_buckets[m_currHashTable_1->m_numBuckets])
00419ae9                          goto label_419afd;
00419ae9                      
00419aeb                      i = *(uint32_t*)m_currBucket_1;
00419aef                  } while (i == 0);
00419aef                  
00419af1                  i_1 = i;
00419af1                  
00419af5                  if (i_1 == 0)
00419af5                      break;
00419ad9              }
00419ab7          }
00419ab5      }
00419ab5      
00419afd  label_419afd:
00419afd      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(ebx_1);
00419a40  }

00419b0a                                90 90 90 90 90 90                                                            ......

00419b10  uint8_t __stdcall AsyncCache::IsWaitingFor(class AsyncCache* this @ ecx, struct CAsyncGetRequest* arg2, struct CAsyncGetRequest* arg3)

00419b10  {
00419b16      int32_t ebx;
00419b16      int32_t var_8c = ebx;
00419b20      int32_t var_74 = 0x794fa0;
00419b28      int32_t var_70;
00419b28      IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>::IntrusiveHashTable<QualifiedDataID,HashSetData<QualifiedDataID> *,1>(&var_70, 0x17);
00419b2d      int32_t ebp = 0;
00419b35      void* var_88 = nullptr;
00419b39      int32_t var_84 = 0;
00419b3d      int32_t var_80 = 0;
00419b3d      
00419b52      if (SmartArray<unsigned long,1>::grow(&var_88, SmartArray<unsigned long,1>::get_new_size(&var_88, 1)) != 0)
00419b52      {
00419b63          *(uint32_t*)((char*)var_88 + (var_80 << 2)) = arg2;
00419b66          var_80 += 1;
00419b52      }
00419b52      
00419b79      HashSet<QualifiedDataID>::add(&var_74, &arg2->qdid);
00419b7e      int32_t eax_5 = var_80;
00419b84      void var_6c;
00419b84      void* var_10;
00419b84      
00419b84      if (eax_5 != 0)
00419b84      {
00419b90          while (true)
00419b90          {
00419b90              void* ecx_5 = var_88;
00419b95              int32_t var_80_1 = (eax_5 - 1);
00419b99              void* ebx_2 = *(uint32_t*)((char*)ecx_5 + ((eax_5 - 1) << 2));
00419b9c              *(uint32_t*)((char*)ecx_5 + ((eax_5 - 1) << 2)) = 0;
00419b9c              
00419ba2              if (*(uint32_t*)((char*)ebx_2 + 0x40) > 0)
00419ba2              {
00419ba8                  struct CAsyncGetRequest* edi_1 = arg3;
00419ba8                  
00419bb3                  while (true)
00419bb3                  {
00419bb3                      void** eax_7 = (*(uint32_t*)((char*)ebx_2 + 0x38) + (ebp << 2));
00419bba                      void* eax_8 = *(uint32_t*)eax_7;
00419bba                      
00419bd2                      if ((eax_8 == edi_1 || (edi_1->qdid.Type == *(uint32_t*)((char*)eax_8 + 0x10) && edi_1->qdid.ID.id == *(uint32_t*)((char*)eax_8 + 0x14))))
00419bd2                      {
00419d3a                          if ((var_84 & 0x80000000) == 0x80000000)
00419d41                              operator delete[](var_88);
00419d41                          
00419d4d                          var_74 = 0x794fa0;
00419d55                          IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&var_70);
00419d67                          var_70 = 0x794f94;
00419d67                          
00419d6f                          if (var_10 != &var_6c)
00419d72                              operator delete[](var_10);
00419d72                          
00419d7d                          void* eax_26;
00419d7d                          eax_26 = 1;
00419d86                          return 1;
00419bd2                      }
00419bd2                      
00419bd8                      int32_t ecx_8 = *(uint32_t*)((char*)eax_8 + 0x14);
00419bdb                      int32_t esi_1 = *(uint32_t*)((char*)eax_8 + 0x10);
00419bf4                      int32_t var_8;
00419bf4                      int32_t* eax_12 = *(uint32_t*)((char*)var_10 + ((COMBINE(0, (esi_1 + ecx_8)) % var_8) << 2));
00419bf4                      
00419bf8                      if (eax_12 == 0)
00419bf8                      {
00419c22                      label_419c22:
00419c22                          int32_t eax_14 = (var_84 & 0x7fffffff);
00419c22                          
00419c29                          if (var_80_1 < eax_14)
00419c29                          {
00419c90                              *(uint32_t*)((char*)var_88 + (var_80_1 << 2)) = *(uint32_t*)eax_7;
00419c93                              var_80_1 += 1;
00419c29                          }
00419c29                          else
00419c29                          {
00419c2b                              uint32_t edx_5 = (eax_14 + 1);
00419c2b                              
00419c31                              if (edx_5 <= 8)
00419c33                                  edx_5 = 8;
00419c31                              else if (edx_5 <= 0x4000)
00419c40                              {
00419c5f                                  int32_t eflags_1;
00419c5f                                  char eax_18;
00419c5f                                  eax_18 = __bsr_gprv_memv(edx_5);
00419c6b                                  int32_t esi_2 = (1 << eax_18);
00419c6b                                  
00419c6f                                  if (edx_5 > esi_2)
00419c71                                      edx_5 = (esi_2 * 2);
00419c40                              }
00419c40                              else
00419c40                              {
00419c44                                  int32_t eax_16 = (edx_5 & 0x3fff);
00419c44                                  
00419c49                                  if (eax_16 != 0)
00419c52                                      edx_5 += (0x4000 - eax_16);
00419c40                              }
00419c40                              
00419c80                              if (SmartArray<unsigned long,1>::grow(&var_88, edx_5) != 0)
00419c80                              {
00419c90                                  *(uint32_t*)((char*)var_88 + (var_80_1 << 2)) = *(uint32_t*)eax_7;
00419c93                                  var_80_1 += 1;
00419c80                              }
00419c29                          }
00419c29                          
00419ca5                          HashSet<QualifiedDataID>::add(&var_74, (*(uint32_t*)(*(uint32_t*)((char*)ebx_2 + 0x38) + (ebp << 2)) + 0x10));
00419caa                          edi_1 = arg3;
00419bf8                      }
00419bf8                      else
00419bf8                      {
00419c07                          while ((*(uint32_t*)eax_12 != esi_1 || eax_12[1] != ecx_8))
00419c07                          {
00419c09                              eax_12 = eax_12[2];
00419c09                              
00419c0e                              if (eax_12 == 0)
00419c0e                                  goto label_419c22;
00419c07                          }
00419c07                          
00419c14                          if (eax_12 == 0)
00419c14                              goto label_419c22;
00419bf8                      }
00419bf8                      
00419cb4                      ebp += 1;
00419cb4                      
00419cb7                      if (ebp >= *(uint32_t*)((char*)ebx_2 + 0x40))
00419cb7                          break;
00419cb7                      
00419cb7                      continue;
00419bb3                  }
00419ba2              }
00419ba2              
00419cbd              eax_5 = var_80_1;
00419cc1              ebp = 0;
00419cc1              
00419cc5              if (eax_5 == 0)
00419cc5                  break;
00419b90          }
00419b84      }
00419b84      
00419cdb      if ((var_84 & 0x80000000) == 0x80000000)
00419ce2          operator delete[](var_88);
00419ce2      
00419cee      var_74 = 0x794fa0;
00419cf6      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&var_70);
00419d08      var_70 = 0x794f94;
00419d08      
00419d10      if (var_10 != &var_6c)
00419d13          operator delete[](var_10);
00419d13      
00419d1e      void* eax_24;
00419d1e      eax_24 = 0;
00419d27      return 0;
00419b10  }

00419d89                             90 90 90 90 90 90 90                                                           .......

00419d90  uint8_t __thiscall AsyncCache::AddToAsyncGet(class AsyncCache* this, uint32_t arg2, class QualifiedDataIDArray const* arg3, void* arg4)

00419d90  {
00419d9e      class AsyncCache* this_1 = this;
00419da0      class AsyncCache* this_2 = this_1;
00419da0      
00419da4      if (*(uint32_t*)((char*)arg4 + 0xc) != 0)
00419da4      {
00419da7          int32_t eax;
00419da7          eax = 0;
00419dad          return 0;
00419da4      }
00419da4      
00419dc2      *(uint32_t*)((char*)arg4 + 0x58) += arg3->m_numElements;
00419dc5      void* __return;
00419dc5      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg3, &__return);
00419dca      struct QualifiedDataIDArray::VTable* vtable_2;
00419dca      struct QualifiedDataIDArray::VTable* vtable_1 = vtable_2;
00419dca      
00419dd0      if (vtable_1 != 0)
00419dd0      {
00419ded          while (true)
00419ded          {
00419ded              class QualifiedDataIDArray* ecx;
00419ded              
00419ded              if ((vtable_1->__vecDelDtor != *(uint32_t*)((char*)arg4 + 0x10) || *(int32_t*)((char*)vtable_1 + 4) != *(uint32_t*)((char*)arg4 + 0x14)))
00419ded              {
00419e01                  struct CAsyncGetRequest* esi_1 = AsyncCache::FormGetRequest(this_1, arg4, arg2, vtable_1);
00419e01                  
00419e09                  if ((esi_1 == arg4 && esi_1 != 0))
00419e09                  {
00419e17                      if (InterlockedDecrement(&esi_1->m_cRef) == 0)
00419e19                          esi_1->vtable->__vecDelDtor(1);
00419e19                      
00419e21                      esi_1 = nullptr;
00419e09                  }
00419e09                  
00419e27                  uint8_t eax_7;
00419e27                  eax_7 = AsyncCache::IsWaitingFor(this_1, esi_1, arg4);
00419e27                  
00419e2e                  if (eax_7 != 0)
00419e2e                  {
00419e32                      if (esi_1 != 0)
00419e32                      {
00419e3c                          int32_t eax_8;
00419e3c                          eax_8 = InterlockedDecrement(&esi_1->m_cRef);
00419e3c                          
00419e44                          if (eax_8 == 0)
00419e4a                              esi_1->vtable->__vecDelDtor(1);
00419e32                      }
00419e32                      
00419ef7                      *(uint32_t*)((char*)arg4 + 0x58) -= 1;
00419e2e                  }
00419e2e                  else if (esi_1 == 0)
00419ef7                      *(uint32_t*)((char*)arg4 + 0x58) -= 1;
00419e59                  else
00419e59                  {
00419e68                      int32_t eax_10 = (*(uint32_t*)((char*)arg4 + 0x3c) & 0x7fffffff);
00419e68                      
00419e6f                      if (*(uint32_t*)((char*)arg4 + 0x40) < eax_10)
00419e6f                      {
00419e8b                          *(uint32_t*)(*(uint32_t*)((char*)arg4 + 0x38) + (*(uint32_t*)((char*)arg4 + 0x40) << 2)) = esi_1;
00419e8e                          *(uint32_t*)((char*)arg4 + 0x40) += 1;
00419e6f                      }
00419e6f                      else if (SmartArray<unsigned long,1>::grow(((char*)arg4 + 0x38), SmartArray<unsigned long,1>::get_new_size(((char*)arg4 + 0x38), (eax_10 + 1))) != 0)
00419e84                      {
00419e8b                          *(uint32_t*)(*(uint32_t*)((char*)arg4 + 0x38) + (*(uint32_t*)((char*)arg4 + 0x40) << 2)) = esi_1;
00419e8e                          *(uint32_t*)((char*)arg4 + 0x40) += 1;
00419e84                      }
00419e84                      
00419e95                      char eax_15;
00419e95                      eax_15 = esi_1->vtable->bAllDependanciesDone();
00419e95                      
00419e9a                      if (eax_15 != 0)
00419e9a                      {
00419eee                          if (esi_1->Result != AsyncResult_Success)
00419ef0                              *(uint32_t*)((char*)arg4 + 8) = 2;
00419ef0                          
00419ef7                          *(uint32_t*)((char*)arg4 + 0x58) -= 1;
00419e9a                      }
00419e9a                      else
00419e9a                      {
00419ea0                          InterlockedIncrement(((char*)arg4 + 4));
00419eaf                          int32_t eax_18 = (esi_1->RequestsWaitingForMe.m_sizeAndDeallocate & 0x7fffffff);
00419eb6                          uint8_t eax_21;
00419eb6                          
00419eb6                          if (esi_1->RequestsWaitingForMe.m_num >= eax_18)
00419ec4                              eax_21 = SmartArray<unsigned long,1>::grow(&esi_1->RequestsWaitingForMe, SmartArray<unsigned long,1>::get_new_size(&esi_1->RequestsWaitingForMe.m_data, (eax_18 + 1)));
00419ec4                          
00419ecb                          if ((esi_1->RequestsWaitingForMe.m_num < eax_18 || eax_21 != 0))
00419ecb                          {
00419eac                              esi_1->RequestsWaitingForMe.m_data[esi_1->RequestsWaitingForMe.m_num] = arg4;
00419eac                              esi_1->RequestsWaitingForMe.m_num += 1;
00419ecb                          }
00419ecb                          
00419edc                          if ((esi_1->m_dwGetRequestFlags & 1) == 0)
00419ee2                              this_2->vtable->HashAndEnqueue(esi_1);
00419e9a                      }
00419e59                  }
00419ded              }
00419ded              else
00419ef7                  *(uint32_t*)((char*)arg4 + 0x58) -= 1;
00419ef7              
00419efa              vtable_1 = *(int32_t*)((char*)vtable_1 + 8);
00419efa              
00419eff              if (vtable_1 == 0)
00419eff              {
00419f05                  void* __return_1 = __return;
00419f25                  struct QualifiedDataIDArray::VTable* vtable;
00419f25                  
00419f25                  do
00419f25                  {
00419f16                      class QualifiedDataIDArray* var_8;
00419f16                      ecx = &var_8->m_aInplaceBuckets;
00419f1b                      var_8 = ecx;
00419f1b                      
00419f1f                      if (ecx == (*(uint32_t*)((char*)__return_1 + 0x60) + (*(uint32_t*)((char*)__return_1 + 0x68) << 2)))
00419f1f                          goto label_419f31;
00419f1f                      
00419f21                      vtable = ecx->vtable;
00419f25                  } while (vtable == 0);
00419f25                  
00419f27                  vtable_1 = vtable;
00419f27                  
00419f2b                  if (vtable_1 == 0)
00419f2b                      break;
00419eff              }
00419eff              
00419dd9              this_1 = this_2;
00419ded          }
00419ded          
00419f31      label_419f31:
00419f31          this_1 = this_2;
00419dd0      }
00419dd0      
00419f3c      if (*(uint32_t*)((char*)arg4 + 0x58) == 0)
00419f3e          this_1->vtable->OnAsyncGetFinished(arg4);
00419f3e      
00419f47      int32_t eax_25;
00419f47      eax_25 = 1;
00419f4d      return 1;
00419d90  }


00419f50  void __fastcall AsyncCache::AsyncCache(class AsyncCache* this)

00419f50  {
00419f54      this->vtable = 0x7953b0;
00419f61      this->m_PendingCallbacks.vtable = 0x794f70;
00419f68      this->m_PendingCallbacks.first = 0;
00419f6b      this->m_PendingCallbacks.next = 0;
00419f6e      this->m_PendingCallbacks.count = 0;
00419f71      this->m_PendingCallbacks.max = 0;
00419f74      this->m_PendingCallbacks.growsize = 0x100;
00419f83      this->m_PendingCallbacks.A = operator new[](0x4000);
00419f86      this->m_PendingCallbacks.max = 0x1000;
00419f91      this->m_PendingGets.vtable = 0x7953a8;
00419f98      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>(&this->m_PendingGets.m_intrusiveTable, 0);
00419f9d      this->m_PendingGets.vtable = 0x7953a8;
00419fab      this->m_BusyCallbacks.vtable = 0x7953a4;
00419fb5      IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>::IntrusiveHashTable<AsyncContext,HashTableData<AsyncContext,AsyncCache::CCallbackHandler *> *,1>(&this->m_BusyCallbacks.m_intrusiveTable, 0);
00419fba      this->m_BusyCallbacks.vtable = 0x7953a4;
00419fc4      this->m_bCallingPendingCallbacks = 0;
00419fca      this->dwNextCallbackHandle = 1;
00419f50  }

00419fd9                                                                             90 90 90 90 90 90 90                           .......

00419fe0  void __thiscall QualifiedDataIDArray::ExpensiveUpdateIterator(class QualifiedDataIDArray const* this, uint32_t arg2)

00419fe0  {
00419feb      void __return;
00419feb      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(this, &__return);
00419ff2      this->m_CurBracketIterator.m_currHashTable = eax->m_currHashTable;
00419ff5      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax->m_currElement;
00419ff8      this->m_CurBracketIterator.m_currElement = m_currElement;
00419ffe      this->m_CurBracketIterator.m_currBucket = eax->m_currBucket;
00419ffe      
0041a005      if (m_currElement != 0)
0041a005      {
0041a009          uint32_t i = arg2;
0041a009          
0041a014          while (i != 0)
0041a014          {
0041a019              class DBObjSaveInfo* m_hashNext = this->m_CurBracketIterator.m_currElement->m_hashNext;
0041a01e              this->m_CurBracketIterator.m_currElement = m_hashNext;
0041a01e              
0041a021              if (m_hashNext == 0)
0041a021              {
0041a023                  class IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>* m_currHashTable = this->m_CurBracketIterator.m_currHashTable;
0041a023                  
0041a033                  while (true)
0041a033                  {
0041a033                      void* eax_5 = &this->m_CurBracketIterator.m_currBucket[1];
0041a037                      this->m_CurBracketIterator.m_currBucket = eax_5;
0041a037                      
0041a03a                      if (eax_5 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0041a03a                          break;
0041a03a                      
0041a03c                      class DBObjSaveInfo* ebx_1 = *(uint32_t*)eax_5;
0041a03c                      
0041a040                      if (ebx_1 != 0)
0041a040                      {
0041a044                          this->m_CurBracketIterator.m_currElement = ebx_1;
0041a044                          break;
0041a040                      }
0041a033                  }
0041a021              }
0041a021              
0041a04a              i -= 1;
0041a04a              
0041a04d              if (this->m_CurBracketIterator.m_currElement == 0)
0041a04d                  break;
0041a014          }
0041a005      }
00419fe0  }

0041a058                                                                          90 90 90 90 90 90 90 90                          ........

0041a060  uint8_t __thiscall IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::add(class IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>* this, class DBObjSaveInfo* arg2)

0041a060  {
0041a071      void __return;
0041a071      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(this, &__return, arg2);
0041a07c      int32_t var_4;
0041a07c      
0041a07c      if (var_4 != 0)
0041a07c      {
0041a07f          int32_t eax;
0041a07f          eax = 0;
0041a085          return 0;
0041a07c      }
0041a07c      
0041a093      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
0041a097          IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::grow(this);
0041a097      
0041a0a5      uint32_t temp1 = (COMBINE(0, (arg2->m_hashKey.ID.id + arg2->m_hashKey.Type)) % this->m_numBuckets);
0041a0a8      class DBObjSaveInfo** m_buckets = this->m_buckets;
0041a0ae      arg2->m_hashNext = m_buckets[temp1];
0041a0b1      m_buckets[temp1] = arg2;
0041a0b7      class DBObjSaveInfo** eax_3 = &m_buckets[temp1];
0041a0b7      
0041a0bc      if (eax_3 < this->m_firstInterestingBucket)
0041a0be          this->m_firstInterestingBucket = eax_3;
0041a0be      
0041a0c1      this->m_numElements += 1;
0041a0c5      eax_3 = 1;
0041a0cb      return 1;
0041a060  }

0041a0ce                                            90 90                                                                ..

0041a0d0  void __fastcall QualifiedDataIDArray::~QualifiedDataIDArray(class QualifiedDataIDArray* this)

0041a0d0  {
0041a0d3      this->vtable = &QualifiedDataIDArray::`vftable';
0041a0d9      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(this);
0041a0de      class DBObjSaveInfo** m_buckets = this->m_buckets;
0041a0e6      this->vtable = 0x794f84;
0041a0e6      
0041a0ec      if (m_buckets != &this->m_aInplaceBuckets)
0041a0ef          operator delete[](m_buckets);
0041a0ef      
0041a0f9      this->m_buckets = nullptr;
0041a0fc      this->m_firstInterestingBucket = nullptr;
0041a0ff      this->m_numBuckets = 0;
0041a102      this->m_numElements = 0;
0041a0d0  }

0041a107                       90 90 90 90 90 90 90 90 90                                                         .........

0041a110  uint8_t __thiscall QualifiedDataIDArray::AdoptDBObjSaveInfo(class QualifiedDataIDArray* this, class DBObjSaveInfo* arg2)

0041a110  {
0041a125      int32_t ebx;
0041a125      ebx = 0;
0041a125      
0041a129      if (arg2->m_hashKey.ID.id == INVALID_DID.id)
0041a129      {
0041a142      label_41a142:
0041a142          void __return;
0041a142          IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(this, &__return, arg2);
0041a14d          void* var_4;
0041a14d          
0041a14d          if (var_4 != 0)
0041a14d          {
0041a14f              int32_t ecx_3 = *(uint32_t*)((char*)var_4 + 0xc);
0041a152              uint32_t m_dwSubDataIDFlags = arg2->m_dwSubDataIDFlags;
0041a165              int32_t eax_5 = (((ecx_3 | m_dwSubDataIDFlags) & s_dwDominantDBObjSubDataIDFlags) | (ecx_3 & m_dwSubDataIDFlags));
0041a169              *(uint32_t*)((char*)var_4 + 0xc) = eax_5;
0041a16c              ebx = eax_5 != ecx_3;
0041a14d          }
0041a14d          
0041a170          operator delete(arg2);
0041a170          
0041a17b          if (ebx != 0)
0041a17b              goto label_41a17f;
0041a129      }
0041a129      else
0041a129      {
0041a133          ebx = IntrusiveHashTable<QualifiedDataID,DBObjSaveInfo *,1>::add(this, arg2);
0041a133          
0041a137          if (ebx == 0)
0041a137              goto label_41a142;
0041a137          
0041a17f      label_41a17f:
0041a17f          this->m_CurBracketIterator.m_currHashTable = this;
0041a182          this->m_CurBracketIterator.m_currElement = nullptr;
0041a185          this->m_CurBracketIterator.m_currBucket = nullptr;
0041a129      }
0041a129      
0041a190      return ebx;
0041a110  }

0041a193                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0041a1a0  uint8_t __thiscall QualifiedDataIDArray::AddQDID(class QualifiedDataIDArray* this, struct QualifiedDataID const* arg2, uint32_t arg3)

0041a1a0  {
0041a1b4      if (arg2->ID.id == INVALID_DID.id)
0041a1b4      {
0041a1b7          uint32_t eax;
0041a1b7          eax = 0;
0041a1bd          return 0;
0041a1b4      }
0041a1b4      
0041a1c8      void __return;
0041a1c8      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(this, &__return, arg2);
0041a1d3      void* var_4;
0041a1d3      
0041a1d3      if (var_4 != 0)
0041a1d3      {
0041a1d5          int32_t ecx_1 = *(uint32_t*)((char*)var_4 + 0xc);
0041a1ec          int32_t eax_4 = (((ecx_1 | arg3) & s_dwDominantDBObjSubDataIDFlags) | (ecx_1 & arg3));
0041a1ee          *(uint32_t*)((char*)var_4 + 0xc) = eax_4;
0041a1f9          eax_4 = eax_4 != ecx_1;
0041a1ff          return eax_4;
0041a1d3      }
0041a1d3      
0041a204      void* eax_5 = operator new(0x10);
0041a204      
0041a20e      if (eax_5 == 0)
0041a247          return QualifiedDataIDArray::AdoptDBObjSaveInfo(this, nullptr);
0041a247      
0041a212      *(uint32_t*)eax_5 = arg2->Type;
0041a214      uint32_t id = arg2->ID.id;
0041a21b      *(uint32_t*)((char*)eax_5 + 0xc) = arg3;
0041a221      *(uint32_t*)((char*)eax_5 + 4) = id;
0041a224      *(uint32_t*)((char*)eax_5 + 8) = 0;
0041a235      return QualifiedDataIDArray::AdoptDBObjSaveInfo(this, eax_5);
0041a1a0  }

0041a24a                                90 90 90 90 90 90                                                            ......

0041a250  uint8_t __thiscall QualifiedDataIDArray::CopyDIDs(class QualifiedDataIDArray* this, class SmartArray<IDClass<_tagDataID,32,0>,1> const* arg2, uint32_t arg3)

0041a250  {
0041a25e      int32_t ebx;
0041a25e      ebx = 0;
0041a260      int32_t i = 0;
0041a260      
0041a266      if (arg2->m_num > 0)
0041a266      {
0041a296          do
0041a296          {
0041a28e              void var_8;
0041a28e              ebx |= QualifiedDataIDArray::AddQDID(this, QualifiedDataID::QualifiedDataID(&var_8, arg2->m_data[i].id, 0), arg3);
0041a293              i += 1;
0041a296          } while (i < arg2->m_num);
0041a266      }
0041a266      
0041a29b      uint32_t eax;
0041a29b      eax = ebx;
0041a2a1      return eax;
0041a250  }

0041a26a                                8d 9b 00 00 00 00                                                            ......
0041a2a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0041a2b0  uint32_t __convention("regparm") GetCoreSDKPackVersionFromDBObjPackVersion(uint32_t arg1) __pure

0041a2b0  {
0041a2ba      int32_t eax;
0041a2ba      return ((eax - eax) + 2);
0041a2b0  }

0041a2bb                                                                                   90 90 90 90 90                             .....

0041a2c0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>* this, uint32_t arg2)

0041a2c0  {
0041a2c3      class HashTableData<unsigned long,ArchiveVersionRow>** m_buckets = this->m_buckets;
0041a2cb      this->vtable = 0x79545c;
0041a2cb      
0041a2d1      if (m_buckets != &this->m_aInplaceBuckets)
0041a2d4          operator delete[](m_buckets);
0041a2d4      
0041a2de      this->m_buckets = nullptr;
0041a2e1      this->m_firstInterestingBucket = nullptr;
0041a2e4      this->m_numBuckets = 0;
0041a2e7      this->m_numElements = 0;
0041a2e7      
0041a2ef      if ((arg2 & 1) != 0)
0041a2f2          operator delete(this);
0041a2f2      
0041a2fd      return this;
0041a2c0  }


0041a300  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>* this, uint32_t arg2)

0041a300  {
0041a30b      arg2 = arg2;
0041a30f      uint8_t edx = ((int8_t)arg2);
0041a313      this->m_buckets = nullptr;
0041a316      this->m_firstInterestingBucket = nullptr;
0041a319      this->m_numBuckets = 0;
0041a31c      this->m_numElements = 0;
0041a320      this->vtable = 0x79545c;
0041a326      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041a339      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0041a339      
0041a343      if (eax == bucketSizesEnd_1)
0041a345          eax -= 4;
0041a345      
0041a348      uint32_t eax_1 = *(uint32_t*)eax;
0041a34d      this->m_numBuckets = eax_1;
0041a34d      
0041a350      if (eax_1 > 0x17)
0041a366          this->m_buckets = operator new[]((eax_1 << 2));
0041a350      else
0041a355          this->m_buckets = &this->m_aInplaceBuckets;
0041a355      
0041a36c      class HashTableData<unsigned long,ArchiveVersionRow>** m_buckets = this->m_buckets;
0041a36f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0041a375      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0041a386      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0041a300  }

0041a38f                                               90                                                                 .

0041a390  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>* this)

0041a390  {
0041a398      if (this->m_numElements != 0)
0041a398      {
0041a39e          void* edi;
0041a39e          void* var_8_1 = edi;
0041a39e          
0041a423          do
0041a423          {
0041a3a6              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0041a3ac              int32_t* m_firstInterestingBucket_2;
0041a3ac              
0041a3ac              if (this->m_firstInterestingBucket == ecx_1)
0041a3ac              {
0041a3c2              label_41a3c2:
0041a3c2                  m_firstInterestingBucket_2 = nullptr;
0041a3c4                  edi = nullptr;
0041a3ac              }
0041a3ac              else
0041a3ac              {
0041a3b0                  while (true)
0041a3b0                  {
0041a3b0                      class HashTableData<unsigned long,ArchiveVersionRow>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0041a3b0                      
0041a3b6                      if (*(uint32_t*)m_firstInterestingBucket != 0)
0041a3b6                      {
0041a3c8                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0041a3cb                          edi = *(uint32_t*)m_firstInterestingBucket_1;
0041a3cd                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0041a3cd                          break;
0041a3b6                      }
0041a3b6                      
0041a3bd                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0041a3bd                      
0041a3c0                      if (&m_firstInterestingBucket[1] == ecx_1)
0041a3c0                          goto label_41a3c2;
0041a3b0                  }
0041a3ac              }
0041a3ac              
0041a3cf              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0041a3cf              
0041a3d3              if (eax_3 == edi)
0041a3e5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0041a3d3              else
0041a3d3              {
0041a3dc                  void* ecx_2;
0041a3dc                  
0041a3dc                  do
0041a3dc                  {
0041a3d5                      ecx_2 = eax_3;
0041a3d7                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0041a3dc                  } while (eax_3 != edi);
0041a3dc                  
0041a3e0                  if (ecx_2 != 0)
0041a3ec                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
0041a3e0                  else
0041a3e5                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0041a3d3              }
0041a3d3              
0041a3f5              this->m_numElements -= 1;
0041a3f5              
0041a3f8              if (edi != 0)
0041a3f8              {
0041a407                  if ((*(uint32_t*)((char*)edi + 0x10) & 0x80000000) == 0x80000000)
0041a40d                      operator delete[](*(uint32_t*)((char*)edi + 0xc));
0041a40d                  
0041a416                  operator delete(edi);
0041a3f8              }
0041a423          } while (this->m_numElements != 0);
0041a398      }
0041a390  }

0041a42c                                      90 90 90 90                                                              ....

0041a430  uint8_t __thiscall HashTable<unsigned long,ArchiveVersionRow,0>::add(class HashTable<unsigned long,ArchiveVersionRow,0>* this, uint32_t const* arg2, class ArchiveVersionRow const* arg3)

0041a430  {
0041a43b      void* esi = operator new(0x58);
0041a43b      
0041a442      if (esi == 0)
0041a47f          esi = nullptr;
0041a442      else
0041a442      {
0041a44e          *(uint32_t*)esi = *(uint32_t*)arg2;
0041a453          *(uint32_t*)((char*)esi + 4) = 0;
0041a45a          *(uint32_t*)((char*)esi + 8) = 0x794430;
0041a468          *(uint32_t*)((char*)esi + 0xc) = ((char*)esi + 0x18);
0041a46a          *(uint32_t*)((char*)esi + 0x10) = 8;
0041a471          *(uint32_t*)((char*)esi + 0x14) = 0;
0041a478          SmartArray<ArchiveVersionRow::VersionEntry,1>::operator=(((char*)esi + 0xc), &arg3->m_aVersions);
0041a442      }
0041a442      
0041a48c      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
0041a4c3          return 1;
0041a4c3      
0041a490      if (esi != 0)
0041a490      {
0041a4a1          if ((*(uint32_t*)((char*)esi + 0x10) & 0x80000000) == 0x80000000)
0041a4a7              operator delete[](*(uint32_t*)((char*)esi + 0xc));
0041a4a7          
0041a4b0          operator delete(esi);
0041a490      }
0041a490      
0041a4bc      return 0;
0041a430  }

0041a4c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0041a4d0  class ArchiveVersionRow const* GetVersionRowForDBObjPackVersion(uint32_t arg1)

0041a4d0  {
0041a4d5      uint32_t edi = arg1;
0041a4e8      void* esi = nullptr;
0041a4e8      
0041a4f1      for (int32_t* i = s_CachedVersionRows.m_intrusiveTable.m_buckets[(COMBINE(0, edi) % s_CachedVersionRows.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0041a4f1      {
0041a4f5          if (*(uint32_t*)i == edi)
0041a4f5          {
0041a502              if (i != 0)
0041a502              {
0041a504                  void* eax_3 = &i[2];
0041a504                  
0041a509                  if (eax_3 != 0)
0041a5c6                      return eax_3;
0041a502              }
0041a502              
0041a502              break;
0041a4f5          }
0041a4f1      }
0041a4f1      
0041a51c      void var_40;
0041a51c      void* var_4c_1 = &var_40;
0041a526      int32_t var_50 = 0x794430;
0041a52e      int32_t var_48_1 = 8;
0041a536      int32_t var_44_1 = 0;
0041a53a      HashTable<unsigned long,ArchiveVersionRow,0>::add(&s_CachedVersionRows, &arg1, &var_50);
0041a53a      
0041a54f      if ((var_48_1 & 0x80000000) == 0x80000000)
0041a556          operator delete[](var_4c_1);
0041a556      
0041a574      int32_t* i_1;
0041a574      
0041a574      for (i_1 = s_CachedVersionRows.m_intrusiveTable.m_buckets[(COMBINE(0, edi) % s_CachedVersionRows.m_intrusiveTable.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
0041a574      {
0041a578          if (*(uint32_t*)i_1 == edi)
0041a578          {
0041a585              if (i_1 != 0)
0041a587                  esi = &i_1[2];
0041a587              
0041a585              break;
0041a578          }
0041a574      }
0041a574      
0041a59a      ArchiveVersionRow::SetVersion(esi, 0x436f7265, (((char*)i_1 - i_1) + 2));
0041a5a7      int32_t eax_9 = ArchiveVersionRow::SetVersion(esi, 0x444f626a, edi);
0041a5ba      ArchiveVersionRow::SetVersion(esi, 0x55494c20, ((eax_9 - eax_9) + 1));
0041a5bf      return esi;
0041a4d0  }

0041a5c7                       90 90 90 90 90 90 90 90 90                                                         .........

0041a5d0  void* __thiscall HashTable<unsigned long,ArchiveVersionRow,0>::`scalar deleting destructor'(class HashTable<unsigned long,ArchiveVersionRow,0>* this, uint32_t arg2)

0041a5d0  {
0041a5d9      this->vtable = 0x795460;
0041a5df      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::delete_contents(&this->m_intrusiveTable);
0041a5e4      class HashTableData<unsigned long,ArchiveVersionRow>** m_buckets = this->m_intrusiveTable.m_buckets;
0041a5d4      this->m_intrusiveTable.vtable = 0x79545c;
0041a5d4      
0041a5f2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0041a5f5          operator delete[](m_buckets);
0041a5f5      
0041a5d4      this->m_intrusiveTable.m_buckets = nullptr;
0041a5d4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0041a5d4      this->m_intrusiveTable.m_numBuckets = 0;
0041a5d4      this->m_intrusiveTable.m_numElements = 0;
0041a5d4      
0041a610      if ((arg2 & 1) != 0)
0041a613          operator delete(this);
0041a613      
0041a61f      return this;
0041a5d0  }

0041a622        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0041a630  uint8_t __fastcall EnumMapper::ReleaseSubObjects(class EnumMapper* this)

0041a630  {
0041a633      class EnumMapper* m_base_emp = this->m_base_emp;
0041a633      
0041a638      if (m_base_emp != 0)
0041a638      {
0041a63a          m_base_emp->vtable->Release(m_base_emp);
0041a63f          this->m_base_emp = nullptr;
0041a638      }
0041a638      
0041a646      uint32_t eax;
0041a646      eax = 1;
0041a649      return 1;
0041a630  }

0041a64a                                90 90 90 90 90 90                                                            ......

0041a650  uint8_t __fastcall EnumMapper::GetSubObjects(class EnumMapper* this)

0041a650  {
0041a657      class EnumMapper* id = this->m_base_emp_did.id;
0041a657      
0041a65e      if (id != 0)
0041a65e      {
0041a66d          void var_8;
0041a66d          id = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0x24));
0041a677          this->m_base_emp = id;
0041a677          
0041a67a          if (id == 0)
0041a67a          {
0041a67d              id = 0;
0041a683              return 0;
0041a67a          }
0041a65e      }
0041a65e      
0041a685      id = 1;
0041a68b      return 1;
0041a650  }

0041a68c                                      90 90 90 90                                                              ....

0041a690  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* this, uint32_t arg2)

0041a690  {
0041a693      class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_buckets = this->m_buckets;
0041a69b      this->vtable = 0x795464;
0041a69b      
0041a6a1      if (m_buckets != &this->m_aInplaceBuckets)
0041a6a4          operator delete[](m_buckets);
0041a6a4      
0041a6ae      this->m_buckets = nullptr;
0041a6b1      this->m_firstInterestingBucket = nullptr;
0041a6b4      this->m_numBuckets = 0;
0041a6b7      this->m_numElements = 0;
0041a6b7      
0041a6bf      if ((arg2 & 1) != 0)
0041a6c2          operator delete(this);
0041a6c2      
0041a6cd      return this;
0041a690  }


0041a6d0  void* __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* this, uint32_t arg2)

0041a6d0  {
0041a6d3      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_buckets = this->m_buckets;
0041a6db      this->vtable = 0x795468;
0041a6db      
0041a6e1      if (m_buckets != &this->m_aInplaceBuckets)
0041a6e4          operator delete[](m_buckets);
0041a6e4      
0041a6ee      this->m_buckets = nullptr;
0041a6f1      this->m_firstInterestingBucket = nullptr;
0041a6f4      this->m_numBuckets = 0;
0041a6f7      this->m_numElements = 0;
0041a6f7      
0041a6ff      if ((arg2 & 1) != 0)
0041a702          operator delete(this);
0041a702      
0041a70d      return this;
0041a6d0  }


0041a710  uint32_t __fastcall CaseInsensitiveStringBase<PStringBase<char> >::case_insensitive_hash(class CaseInsensitiveStringBase<PStringBase<char> > const* this)

0041a710  {
0041a712      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
0041a714      int32_t eax;
0041a714      eax = m_charbuffer->m_data[0];
0041a716      int32_t result = 0;
0041a716      
0041a71a      while (eax != 0)
0041a71a      {
0041a72f          result = ((result << 4) + ((int32_t)tolower(((int32_t)eax))));
0041a736          eax = (result & 0xf0000000);
0041a736          
0041a73b          if (eax != 0)
0041a747              result = (((eax >> 0x18) ^ result) & 0xfffffff);
0041a747          
0041a749          eax = m_charbuffer->m_data[1];
0041a74c          m_charbuffer = &m_charbuffer->m_data[1];
0041a71a      }
0041a71a      
0041a756      return result;
0041a710  }

0041a757                                                                       90 90 90 90 90 90 90 90 90                         .........

0041a760  uint8_t __thiscall QualifiedDataIDArray::AddDID(class QualifiedDataIDArray* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

0041a760  {
0041a787      void var_8;
0041a787      return QualifiedDataIDArray::AddQDID(this, QualifiedDataID::QualifiedDataID(&var_8, arg2, 0), arg3);
0041a760  }

0041a78a                                90 90 90 90 90 90                                                            ......

0041a790  void __thiscall EnumMapper::GetSubDataIDs(class EnumMapper const* this, class QualifiedDataIDArray* arg2)

0041a790  {
0041a790      uint32_t id = this->m_base_emp_did.id;
0041a798      void var_8;
0041a798      
0041a798      if (id != 0)
0041a7ad          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, id, 0), 0);
0041a790  }

0041a7b8                                                                          90 90 90 90 90 90 90 90                          ........

0041a7c0  uint8_t __thiscall EnumMapper::iterator::operator!=(class EnumMapper::iterator const* this, class EnumMapper::iterator const* arg2)

0041a7c0  {
0041a7c0      class EnumMapper* m_mapper = this->m_mapper;
0041a7c0      
0041a7c4      if (m_mapper == 0)
0041a7c4      {
0041a7cd          class EnumMapper::iterator* eax;
0041a7cd          eax = arg2->m_mapper == 0;
0041a7d7          eax = eax == 0;
0041a7d9          return eax;
0041a7c4      }
0041a7c4      
0041a7ea      if ((m_mapper == arg2->m_mapper && this->m_iter.m_iter.m_currElement == arg2->m_iter.m_iter.m_currElement))
0041a7ea      {
0041a7ec          m_mapper = 1;
0041a7f5          m_mapper = 0;
0041a7f7          return 0;
0041a7ea      }
0041a7ea      
0041a7fa      m_mapper = 0;
0041a803      m_mapper = 1;
0041a805      return 1;
0041a7c0  }

0041a808                          90 90 90 90 90 90 90 90                                                          ........

0041a810  uint32_t __fastcall EnumMapper::iterator::get_enum(class EnumMapper::iterator const* this)

0041a810  {
0041a815      return this->m_iter.m_iter.m_currElement->m_hashKey;
0041a810  }

0041a816                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0041a820  class PStringBase<char>* __thiscall EnumMapper::iterator::get_string(class EnumMapper::iterator const* this, class PStringBase<char>* __return)

0041a820  {
0041a823      class PSRefBufferCharData<char>* m_charbuffer = this->m_iter.m_iter.m_currElement->m_data.m_charbuffer;
0041a82b      __return->m_charbuffer = m_charbuffer;
0041a831      InterlockedIncrement(&m_charbuffer[-1]);
0041a83a      return __return;
0041a820  }

0041a83d                                                                                         90 90 90                               ...

0041a840  void __thiscall PStringBase<unsigned short>::PStringBase<unsigned short>(class PStringBase<unsigned short>* this, class PStringBase<unsigned short> const* arg2)

0041a840  {
0041a844      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0041a849      this->m_charbuffer = m_charbuffer;
0041a84f      InterlockedIncrement(&m_charbuffer->m_data[-8]);
0041a840  }

0041a85b                                                                                   90 90 90 90 90                             .....

0041a860  void __thiscall DBObjGrabber<EnumMapper>::DBObjGrabber<EnumMapper>(class DBObjGrabber<EnumMapper>* this, class IDClass<_tagDataID,32,0> arg2)

0041a860  {
0041a871      this->m_object = 0;
0041a882      void var_8;
0041a882      this->m_object = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x24));
0041a860  }


0041a890  void __thiscall DBObjGrabber<EnumIDMap>::DBObjGrabber<EnumIDMap>(class DBObjGrabber<EnumIDMap>* this, class IDClass<_tagDataID,32,0> arg2)

0041a890  {
0041a8a1      this->m_object = 0;
0041a8b2      void var_8;
0041a8b2      this->m_object = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x26));
0041a890  }


0041a8c0  void __thiscall DBObjGrabber<DualEnumIDMap>::DBObjGrabber<DualEnumIDMap>(class DBObjGrabber<DualEnumIDMap>* this, class IDClass<_tagDataID,32,0> arg2)

0041a8c0  {
0041a8d1      this->m_object = 0;
0041a8e2      void var_8;
0041a8e2      this->m_object = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x28));
0041a8c0  }


0041a8f0  class EnumMapper::iterator* __thiscall EnumMapper::end(class EnumMapper const* this, class EnumMapper::iterator* __return)

0041a8f0  {
0041a8fb      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* var_c = &this->m_id_to_string_map.m_intrusiveTable;
0041a909      int32_t var_8 = 0;
0041a90d      int32_t var_4 = 0;
0041a911      EnumMapper::iterator::iterator(__return, nullptr, &var_c);
0041a91c      return __return;
0041a8f0  }

0041a91f                                                                                               90                                 .

0041a920  void __thiscall EnumMapper::iterator::iterator(class EnumMapper::iterator* this, class EnumMapper const* arg2, class HashIterator<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1> const* arg3)

0041a920  {
0041a929      class EnumMapper** this_1 = this;
0041a92b      *(uint32_t*)this_1 = arg2;
0041a933      this_1[1] = arg3->m_iter.m_currHashTable;
0041a939      this_1[2] = arg3->m_iter.m_currBucket;
0041a93f      this_1[3] = arg3->m_iter.m_currElement;
0041a93f      
0041a948      while (*(uint32_t*)this_1 != 0)
0041a948      {
0041a95a          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* var_38 = &*(uint32_t*)this_1->m_id_to_string_map.m_intrusiveTable;
0041a963          int32_t var_34_1 = 0;
0041a967          int32_t var_30_1 = 0;
0041a96b          void var_10;
0041a96b          EnumMapper::iterator::iterator(&var_10, nullptr, &var_38);
0041a977          int32_t var_4;
0041a977          
0041a977          if (this_1[3] != var_4)
0041a977              break;
0041a977          
0041a97b          class EnumMapper* m_base_emp = *(uint32_t*)this_1->m_base_emp;
0041a980          *(uint32_t*)this_1 = m_base_emp;
0041a980          
0041a982          if (m_base_emp != 0)
0041a982          {
0041a997              void __return;
0041a997              void var_20;
0041a997              EnumMapper::iterator::iterator(&var_20, m_base_emp, HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>::begin(&m_base_emp->m_id_to_string_map.vtable, &__return));
0041a9a8              int32_t var_1c;
0041a9a8              this_1[1] = var_1c;
0041a9ab              int32_t var_14;
0041a9ab              this_1[3] = var_14;
0041a9ae              int32_t var_18;
0041a9ae              this_1[2] = var_18;
0041a982          }
0041a948      }
0041a920  }

0041a94d                                         8d 49 00                                                               .I.

0041a9c0  class EnumMapper::iterator* __thiscall EnumMapper::begin(class EnumMapper const* this, class EnumMapper::iterator* __return)

0041a9c0  {
0041a9ce      void __return_1;
0041a9ce      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_id_to_string_map.m_intrusiveTable.vtable, &__return_1);
0041a9d5      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0041a9d8      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax->m_currElement;
0041a9db      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0041a9eb      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
0041a9ef      class HashTableData<unsigned long,DBOCache *>* m_currElement_1 = m_currElement;
0041a9f3      EnumMapper::iterator::iterator(__return, this, &m_currHashTable);
0041a9fe      return __return;
0041a9c0  }

0041aa01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0041aa10  class EnumMapper::iterator* __fastcall EnumMapper::iterator::operator++(class EnumMapper::iterator* this)

0041aa10  {
0041aa23      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* __return;
0041aa23      IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::operator++(&this->m_iter, &__return, 0);
0041aa23      
0041aa2b      if (this->m_mapper != 0)
0041aa2b      {
0041aa31          int32_t var_34_1 = 0;
0041aa39          int32_t var_30_1 = 0;
0041aa39          
0041aad5          do
0041aad5          {
0041aa4c              class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* var_38 = &this->m_mapper->m_id_to_string_map.m_intrusiveTable;
0041aa56              void var_10;
0041aa56              EnumMapper::iterator::iterator(&var_10, nullptr, &var_38);
0041aa62              int32_t var_4;
0041aa62              
0041aa62              if (this->m_iter.m_iter.m_currElement != var_4)
0041aa62                  break;
0041aa62              
0041aa66              class EnumMapper* m_base_emp = this->m_mapper->m_base_emp;
0041aa6b              this->m_mapper = m_base_emp;
0041aa6b              
0041aa6d              if (m_base_emp != 0)
0041aa6d              {
0041aa7e                  void* edx_2 = &m_base_emp->m_id_to_string_map.m_intrusiveTable.m_buckets[m_base_emp->m_id_to_string_map.m_intrusiveTable.m_numBuckets];
0041aa84                  class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_firstInterestingBucket_1;
0041aa84                  class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >* edx_3;
0041aa84                  
0041aa84                  if (m_base_emp->m_id_to_string_map.m_intrusiveTable.m_firstInterestingBucket == edx_2)
0041aa84                  {
0041aa98                  label_41aa98:
0041aa98                      m_firstInterestingBucket_1 = nullptr;
0041aa9a                      edx_3 = nullptr;
0041aa84                  }
0041aa84                  else
0041aa84                  {
0041aa86                      while (true)
0041aa86                      {
0041aa86                          class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_firstInterestingBucket = m_base_emp->m_id_to_string_map.m_intrusiveTable.m_firstInterestingBucket;
0041aa86                          
0041aa8c                          if (*(uint32_t*)m_firstInterestingBucket != 0)
0041aa8c                          {
0041aa9e                              m_firstInterestingBucket_1 = m_base_emp->m_id_to_string_map.m_intrusiveTable.m_firstInterestingBucket;
0041aaa1                              edx_3 = *(uint32_t*)m_firstInterestingBucket_1;
0041aaa1                              break;
0041aa8c                          }
0041aa8c                          
0041aa7b                          m_base_emp->m_id_to_string_map.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
0041aa7b                          
0041aa96                          if (&m_firstInterestingBucket[1] == edx_2)
0041aa96                              goto label_41aa98;
0041aa86                      }
0041aa84                  }
0041aa84                  
0041aaa3                  class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >* var_24_1 = edx_3;
0041aaac                  class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0041aab5                  __return = &m_base_emp->m_id_to_string_map.m_intrusiveTable;
0041aab9                  void var_20;
0041aab9                  EnumMapper::iterator::iterator(&var_20, m_base_emp, &__return);
0041aaca                  int32_t var_1c;
0041aa1d                  this->m_iter.m_iter.m_currHashTable = var_1c;
0041aacc                  class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >* var_14;
0041aa1d                  this->m_iter.m_iter.m_currElement = var_14;
0041aacf                  class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** var_18;
0041aa1d                  this->m_iter.m_iter.m_currBucket = var_18;
0041aa6d              }
0041aad5          } while (this->m_mapper != 0);
0041aa2b      }
0041aa2b      
0041aae3      return this;
0041aa10  }

0041aae4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0041aaf0  uint8_t __fastcall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::grow(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* this)

0041aaf0  {
0041aaf0      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* m_numBuckets = this;
0041aaf2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041aafe      m_numBuckets = this->m_numBuckets;
0041ab15      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0041ab15      
0041ab1f      if (eax_2 != bucketSizesEnd_1)
0041ab28          eax_2 = &eax_2[1];
0041ab1f      else
0041ab1f      {
0041ab21          eax_2 -= 4;
0041ab21          
0041ab26          if (eax_2 != bucketSizesEnd_1)
0041ab28              eax_2 = &eax_2[1];
0041ab1f      }
0041ab1f      
0041ab38      return IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::resize_internal(this, *(uint32_t*)eax_2);
0041aaf0  }

0041ab39                                                                             90 90 90 90 90 90 90                           .......

0041ab40  uint8_t __thiscall EnumMapper::GetString(class EnumMapper const* this, uint32_t arg2, class PStringBase<char>* arg3)

0041ab40  {
0041ab40      class EnumMapper* var_4 = this;
0041ab41      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0041ab48      var_4 = PStringBase<char>::s_NullBuffer_1;
0041ab52      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0041ab52      
0041ab6c      if (HashTable<unsigned long,PStringBase<char>,0>::find(&this->m_id_to_string_map.vtable, &arg2, &var_4) != 0)
0041ab6c      {
0041ab72          class PSRefBufferCharData<char>* m_charbuffer = arg3->m_charbuffer;
0041ab7c          class PStringBase<char> edi = var_4;
0041ab7c          
0041ab82          if (m_charbuffer != edi)
0041ab82          {
0041ab93              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0041ab9b                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0041ab9b              
0041aba1              arg3->m_charbuffer = edi;
0041aba3              InterlockedIncrement((edi - 0x10));
0041ab82          }
0041ab82          
0041abba          if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0041abc2              **(uint32_t**)(edi - 0x14)(1);
0041abc2          
0041abc5          int32_t eax_4;
0041abc5          eax_4 = 1;
0041abc9          return 1;
0041ab6c      }
0041ab6c      
0041abcc      class EnumMapper* m_base_emp = this->m_base_emp;
0041abcc      
0041abd1      if (m_base_emp == 0)
0041abd1      {
0041ac11          void* __offset(EnumMapper, -0x14) esi_6 = ((char*)var_4 - 0x14);
0041ac11          
0041ac24          if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
0041ac2c              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
0041ac2c          
0041ac2f          int32_t eax_10;
0041ac2f          eax_10 = 0;
0041ac33          return 0;
0041abd1      }
0041abd1      
0041abdd      uint8_t eax_7 = EnumMapper::GetString(m_base_emp, arg2, arg3);
0041abe6      void* __offset(EnumMapper, -0x14) esi_4 = ((char*)var_4 - 0x14);
0041abed      int32_t ebx;
0041abed      ebx = eax_7;
0041abed      
0041abfb      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0041ac03          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0041ac03      
0041ac06      int32_t eax_8;
0041ac06      eax_8 = ebx;
0041ac0a      return eax_8;
0041ab40  }

0041ac36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0041ac40  uint8_t EnumMapper::GetString(uint32_t const arg1, uint32_t const arg2, class PStringBase<char>* arg3)

0041ac40  {
0041ac50      int32_t ebx;
0041ac50      ebx = 0;
0041ac52      class IDClass<_tagDataID,32,0> __return;
0041ac52      DBObj::GetDIDByEnum(&__return, arg1, 1);
0041ac57      class IDClass<_tagDataID,32,0> __return_1 = __return;
0041ac57      
0041ac66      if (__return_1 == INVALID_DID.id)
0041ac66      {
0041ac68          __return_1.id = 0;
0041ac6e          return 0;
0041ac66      }
0041ac66      
0041ac71      uint32_t eax = MasterDBMap::DivineType(__return_1);
0041ac7c      class DBObjGrabber<DualEnumIDMap> var_4;
0041ac7c      uint8_t eax_5;
0041ac7c      class DBObjGrabber<DualEnumIDMap> esi_1;
0041ac7c      
0041ac7c      if (eax == 0x24)
0041ac7c      {
0041acfe          DBObjGrabber<EnumMapper>::DBObjGrabber<EnumMapper>(&var_4, __return);
0041ad03          esi_1 = var_4;
0041ad03          
0041ad09          if (esi_1 != 0)
0041ad09          {
0041ad17              eax_5 = EnumMapper::GetString(esi_1, arg2, arg3);
0041ad1e          label_41ad1e:
0041ad1e              
0041ad1e              if (eax_5 != 0)
0041ad20                  ebx = 1;
0041ad20              
0041ad26              *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0041ad09          }
0041ac7c      }
0041ac7c      else if (eax == 0x26)
0041ac81      {
0041acc2          DBObjGrabber<EnumIDMap>::DBObjGrabber<EnumIDMap>(&var_4, __return);
0041acc7          class DBObjGrabber<DualEnumIDMap> esi_2 = var_4;
0041acc7          
0041accd          if (esi_2 != 0)
0041accd          {
0041ace2              if (EnumIDMap::GetName(esi_2, arg2, arg3) != 0)
0041ace4                  ebx = 1;
0041ace4              
0041acea              *(uint32_t*)(*(uint32_t*)esi_2 + 0x14)();
0041accd          }
0041ac81      }
0041ac81      else if (eax == 0x28)
0041ac86      {
0041ac95          DBObjGrabber<DualEnumIDMap>::DBObjGrabber<DualEnumIDMap>(&var_4, __return);
0041ac9a          esi_1 = var_4;
0041ac9a          
0041aca0          if (esi_1 != 0)
0041aca0          {
0041acb2              eax_5 = EnumIDMap::GetName(esi_1, arg2, arg3);
0041acb7              goto label_41ad1e;
0041aca0          }
0041ac86      }
0041ad30      return ebx;
0041ac40  }

0041ad31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0041ad40  uint8_t EnumMapper::InqString(uint32_t const arg1, uint32_t const arg2, class PStringBase<unsigned short>* arg3)

0041ad40  {
0041ad43      int32_t ebx;
0041ad43      int32_t var_c = ebx;
0041ad44      int32_t esi;
0041ad44      int32_t var_10 = esi;
0041ad45      class PStringBase<unsigned short>* esi_1 = arg3;
0041ad49      int32_t edi;
0041ad49      int32_t var_14 = edi;
0041ad4e      class PStringBase<unsigned short>* var_18 = esi_1;
0041ad4f      int32_t var_8;
0041ad4f      int32_t* var_1c = &var_8;
0041ad50      class PStringBase<char>* __return;
0041ad50      class PStringBase<unsigned short>* edx;
0041ad50      PSUtils::narrowify(__return, edx);
0041ad64      class PStringBase<unsigned short>* __return_1;
0041ad64      class PStringBase<char>* edx_2;
0041ad64      __return_1 = EnumMapper::GetString(arg1, arg2, &var_8);
0041ad6d      int32_t* var_2c = &var_8;
0041ad72      void* var_4;
0041ad72      int32_t* var_30 = &var_4;
0041ad73      arg3 = __return_1;
0041ad77      class PStringBase<unsigned short>* eax_1 = PSUtils::widify(__return_1, edx_2);
0041ad84      class PSRefBufferCharData<unsigned short>* m_charbuffer = esi_1->m_charbuffer;
0041ad84      
0041ad8d      if (m_charbuffer != eax_1->m_charbuffer)
0041ad8d      {
0041ad8f          int32_t ebp;
0041ad8f          int32_t var_18_1 = ebp;
0041ad8f          
0041ad9f          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0041ada8              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0041ada8          
0041adaa          class PStringBase<unsigned short> m_charbuffer_1 = eax_1->m_charbuffer;
0041adac          esi_1->m_charbuffer = m_charbuffer_1;
0041adb2          InterlockedIncrement((m_charbuffer_1 - 0x10));
0041ad8d      }
0041ad8d      
0041adbd      int32_t* esi_3 = ((char*)var_4 - 0x14);
0041adbd      
0041adcc      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0041add4          **(uint32_t**)esi_3(1);
0041add4      
0041adda      int32_t* esi_5 = ((char*)var_4 - 0x14);
0041adda      
0041ade9      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0041adf1          **(uint32_t**)esi_5(1);
0041adf1      
0041adf3      int32_t eax_7;
0041adf3      eax_7 = arg_14;
0041adfd      return eax_7;
0041ad40  }

0041adfe                                                                                            90 90                                ..

0041ae00  uint8_t EnumMapper::GetStringByDID(class IDClass<_tagDataID,32,0> arg1, uint32_t const arg2, class PStringBase<char>* arg3)

0041ae00  {
0041ae0a      int32_t ebx;
0041ae0a      ebx = 0;
0041ae0c      uint32_t eax = MasterDBMap::DivineType(arg1);
0041ae17      void var_8;
0041ae17      uint8_t eax_6;
0041ae17      class DBObj* esi_1;
0041ae17      
0041ae17      if (eax == 0x24)
0041ae17      {
0041ae67          esi_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0x24));
0041ae67          
0041ae6e          if (esi_1 != 0)
0041ae6e          {
0041ae7c              eax_6 = EnumMapper::GetString(esi_1, arg2, arg3);
0041ae83          label_41ae83:
0041ae83              
0041ae83              if (eax_6 != 0)
0041ae85                  ebx = 1;
0041ae85              
0041ae87              esi_1->vtable->Release(esi_1);
0041ae6e          }
0041ae17      }
0041ae17      else
0041ae17      {
0041ae1c          uint32_t var_14_1;
0041ae1c          
0041ae1c          if (eax == 0x26)
0041ae1c          {
0041ae27              var_14_1 = 0x26;
0041ae39          label_41ae39:
0041ae39              esi_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, var_14_1));
0041ae39              
0041ae40              if (esi_1 != 0)
0041ae40              {
0041ae4e                  eax_6 = EnumIDMap::GetName(esi_1, arg2, arg3);
0041ae53                  goto label_41ae83;
0041ae40              }
0041ae1c          }
0041ae1c          else if (eax == 0x28)
0041ae21          {
0041ae23              var_14_1 = 0x28;
0041ae25              goto label_41ae39;
0041ae21          }
0041ae17      }
0041ae8f      class DBObj* eax_3;
0041ae8f      eax_3 = ebx;
0041ae95      return eax_3;
0041ae00  }

0041ae96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0041aea0  void* __thiscall AutoGrowHashTable<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>::`scalar deleting destructor'(class AutoGrowHashTable<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>* this, uint32_t arg2)

0041aea0  {
0041aea9      this->vtable = 0x795470;
0041aeaf      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_intrusiveTable);
0041aeb4      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_buckets = this->m_intrusiveTable.m_buckets;
0041aea4      this->m_intrusiveTable.vtable = 0x795468;
0041aea4      
0041aec2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0041aec5          operator delete[](m_buckets);
0041aec5      
0041aea4      this->m_intrusiveTable.m_buckets = nullptr;
0041aea4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0041aea4      this->m_intrusiveTable.m_numBuckets = 0;
0041aea4      this->m_intrusiveTable.m_numElements = 0;
0041aea4      
0041aee0      if ((arg2 & 1) != 0)
0041aee3          operator delete(this);
0041aee3      
0041aeef      return this;
0041aea0  }

0041aef2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0041af00  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* this, uint32_t arg2)

0041af00  {
0041af0b      arg2 = arg2;
0041af0f      uint8_t edx = ((int8_t)arg2);
0041af13      this->m_buckets = nullptr;
0041af16      this->m_firstInterestingBucket = nullptr;
0041af19      this->m_numBuckets = 0;
0041af1c      this->m_numElements = 0;
0041af20      this->vtable = 0x795464;
0041af26      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041af39      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0041af39      
0041af43      if (eax == bucketSizesEnd_1)
0041af45          eax -= 4;
0041af45      
0041af48      uint32_t eax_1 = *(uint32_t*)eax;
0041af4d      this->m_numBuckets = eax_1;
0041af4d      
0041af50      if (eax_1 > 0x17)
0041af66          this->m_buckets = operator new[]((eax_1 << 2));
0041af50      else
0041af55          this->m_buckets = &this->m_aInplaceBuckets;
0041af55      
0041af6c      class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_buckets = this->m_buckets;
0041af6f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0041af75      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0041af86      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0041af00  }

0041af8f                                               90                                                                 .

0041af90  void __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* this, uint32_t arg2)

0041af90  {
0041af9b      arg2 = arg2;
0041af9f      uint8_t edx = ((int8_t)arg2);
0041afa3      this->m_buckets = nullptr;
0041afa6      this->m_firstInterestingBucket = nullptr;
0041afa9      this->m_numBuckets = 0;
0041afac      this->m_numElements = 0;
0041afb0      this->vtable = 0x795468;
0041afb6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041afc9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0041afc9      
0041afd3      if (eax == bucketSizesEnd_1)
0041afd5          eax -= 4;
0041afd5      
0041afd8      uint32_t eax_1 = *(uint32_t*)eax;
0041afdd      this->m_numBuckets = eax_1;
0041afdd      
0041afe0      if (eax_1 > 0x17)
0041aff6          this->m_buckets = operator new[]((eax_1 << 2));
0041afe0      else
0041afe5          this->m_buckets = &this->m_aInplaceBuckets;
0041afe5      
0041affc      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_buckets = this->m_buckets;
0041afff      uint32_t ecx_3 = (this->m_numBuckets << 2);
0041b005      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0041b016      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0041af90  }

0041b01f                                                                                               90                                 .

0041b020  void __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::add_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* this, class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>* arg2)

0041b020  {
0041b02e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
0041b032          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::grow(this);
0041b032      
0041b049      uint32_t temp1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<char> >::case_insensitive_hash(arg2)) % this->m_numBuckets);
0041b04b      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_buckets = this->m_buckets;
0041b051      arg2->m_hashNext = m_buckets[temp1];
0041b054      m_buckets[temp1] = arg2;
0041b05c      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** eax_3 = &m_buckets[temp1];
0041b05c      
0041b061      if (eax_3 < this->m_firstInterestingBucket)
0041b063          this->m_firstInterestingBucket = eax_3;
0041b063      
0041b066      this->m_numElements += 1;
0041b020  }

0041b06d                                         90 90 90                                                               ...

0041b070  uint32_t __thiscall EnumMapper::GetEnum(class EnumMapper const* this, class PStringBase<char> arg2)

0041b070  {
0041b073      int32_t ebx;
0041b073      int32_t var_14 = ebx;
0041b074      int32_t ebp;
0041b074      int32_t var_18 = ebp;
0041b076      int32_t edi;
0041b076      int32_t var_20 = edi;
0041b077      class PStringBase<char> edi_1 = arg2;
0041b081      arg2 = edi_1;
0041b085      int32_t var_10 = (edi_1 - 0x10);
0041b089      InterlockedIncrement((edi_1 - 0x10));
0041b09f      void __return;
0041b09f      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_string_to_id_map.m_intrusiveTable, &__return, &arg_8);
0041b09f      
0041b0aa      if (__return_addr == 0)
0041b0b5          arg_8 = nullptr;
0041b0aa      else
0041b0af          arg_8 = ((char*)__return_addr + 8);
0041b0af      
0041b0ca      int32_t eax_3;
0041b0ca      int32_t ecx_1;
0041b0ca      eax_3 = InterlockedDecrement((edi_1 - 0x10));
0041b0ca      
0041b0d2      if ((eax_3 == 0 && edi_1 != 0x14))
0041b0da          ecx_1 = **(uint32_t**)(edi_1 - 0x14)(1);
0041b0da      
0041b0dc      void* eax_5 = arg_8;
0041b0e2      uint32_t result;
0041b0e2      
0041b0e2      if (eax_5 == 0)
0041b0e2      {
0041b0ed          if (this->m_base_emp == 0)
0041b0ed          {
0041b137              if ((InterlockedDecrement((edi_1 - 0x10)) == 0 && edi_1 != 0x14))
0041b13f                  **(uint32_t**)(edi_1 - 0x14)(1);
0041b13f              
0041b14a              return 0;
0041b0ed          }
0041b0ed          
0041b0ef          int32_t var_20_3 = ecx_1;
0041b0f9          int32_t var_c;
0041b0f9          InterlockedIncrement(var_c, edi_1);
0041b107          class PStringBase<char> esi;
0041b107          result = EnumMapper::GetEnum(this->m_base_emp, esi);
0041b0e2      }
0041b0e2      else
0041b0e4          result = *(uint32_t*)eax_5;
0041b0e4      
0041b115      if ((InterlockedDecrement((edi_1 - 0x10)) == 0 && edi_1 != 0x14))
0041b11d          **(uint32_t**)(edi_1 - 0x14)(1);
0041b11d      
0041b128      return result;
0041b070  }

0041b14d                                         90 90 90                                                               ...

0041b150  uint8_t __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::resize_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* this, uint32_t arg2)

0041b150  {
0041b151      uint32_t ebp = arg2;
0041b151      
0041b15b      if (ebp == this->m_numBuckets)
0041b15b      {
0041b15e          int32_t eax;
0041b15e          eax = 0;
0041b161          return 0;
0041b15b      }
0041b15b      
0041b169      class CaseInsensitiveStringBase<PStringBase<char> >* i_1 = nullptr;
0041b169      
0041b16d      while (this->m_numElements != 0)
0041b16d      {
0041b176          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0041b17c          class CaseInsensitiveStringBase<PStringBase<char> >* i_2;
0041b17c          int32_t* m_firstInterestingBucket_2;
0041b17c          
0041b17c          if (this->m_firstInterestingBucket == ecx_1)
0041b17c          {
0041b192          label_41b192:
0041b192              m_firstInterestingBucket_2 = nullptr;
0041b194              i_2 = nullptr;
0041b17c          }
0041b17c          else
0041b17c          {
0041b180              while (true)
0041b180              {
0041b180                  class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0041b180                  
0041b186                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0041b186                  {
0041b198                      class CaseInsensitiveStringBase<PStringBase<char> >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0041b19b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0041b19d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0041b19d                      break;
0041b186                  }
0041b186                  
0041b18d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0041b18d                  
0041b190                  if (&m_firstInterestingBucket[1] == ecx_1)
0041b190                      goto label_41b192;
0041b180              }
0041b17c          }
0041b17c          
0041b19f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0041b19f          
0041b1a3          if (eax_4 == i_2)
0041b1b5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0041b1a3          else
0041b1a3          {
0041b1ac              void* edx_1;
0041b1ac              
0041b1ac              do
0041b1ac              {
0041b1a5                  edx_1 = eax_4;
0041b1a7                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0041b1ac              } while (eax_4 != i_2);
0041b1ac              
0041b1b0              if (edx_1 != 0)
0041b1bc                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0041b1b0              else
0041b1b5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0041b1a3          }
0041b1a3          
0041b1bf          this->m_numElements -= 1;
0041b1c2          *(int32_t*)((char*)i_2 + 4) = i_1;
0041b1ca          i_1 = i_2;
0041b16d      }
0041b16d      
0041b1ce      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_buckets = this->m_buckets;
0041b1ce      
0041b1d6      if (m_buckets != &this->m_aInplaceBuckets)
0041b1d9          operator delete[](m_buckets);
0041b1d9      
0041b1e6      this->m_buckets = nullptr;
0041b1e9      this->m_firstInterestingBucket = nullptr;
0041b1ec      this->m_numBuckets = 0;
0041b1ef      this->m_numElements = 0;
0041b1f2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
0041b1f9      void* eax_7;
0041b1f9      
0041b1f9      if (i_1 != 0)
0041b1f9      {
0041b281          class CaseInsensitiveStringBase<PStringBase<char> >* i;
0041b281          
0041b281          do
0041b281          {
0041b200              uint32_t m_numBuckets = this->m_numBuckets;
0041b206              i = *(int32_t*)((char*)i_1 + 4);
0041b206              
0041b20f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0041b20f              {
0041b211                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041b217                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0041b21d                  arg2 = m_numBuckets;
0041b22f                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0041b22f                  
0041b239                  if (eax_8 != bucketSizesEnd_1)
0041b242                      eax_8 = &eax_8[1];
0041b239                  else
0041b239                  {
0041b23b                      eax_8 -= 4;
0041b23b                      
0041b240                      if (eax_8 != bucketSizesEnd_1)
0041b242                          eax_8 = &eax_8[1];
0041b239                  }
0041b239                  
0041b24a                  IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::resize_internal(this, *(uint32_t*)eax_8);
0041b20f              }
0041b20f              
0041b25b              uint32_t temp1_1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<char> >::case_insensitive_hash(i_1)) % this->m_numBuckets);
0041b25d              class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_buckets_1 = this->m_buckets;
0041b263              *(int32_t*)((char*)i_1 + 4) = m_buckets_1[temp1_1];
0041b266              m_buckets_1[temp1_1] = i_1;
0041b26c              eax_7 = &m_buckets_1[temp1_1];
0041b26c              
0041b271              if (eax_7 < this->m_firstInterestingBucket)
0041b273                  this->m_firstInterestingBucket = eax_7;
0041b273              
0041b27c              this->m_numElements += 1;
0041b27f              i_1 = i;
0041b281          } while (i != 0);
0041b1f9      }
0041b1f9      
0041b28a      eax_7 = 1;
0041b28d      return 1;
0041b150  }


0041b290  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* this, uint32_t arg2)

0041b290  {
0041b29d      if (arg2 == this->m_numBuckets)
0041b29d      {
0041b29f          uint32_t eax;
0041b29f          eax = 0;
0041b2a5          return 0;
0041b29d      }
0041b29d      
0041b2ad      int32_t* i_2 = nullptr;
0041b2ad      
0041b2b1      while (this->m_numElements != 0)
0041b2b1      {
0041b2bc          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0041b2c1          int32_t** m_firstInterestingBucket_2;
0041b2c1          int32_t* i_3;
0041b2c1          
0041b2c1          if (this->m_firstInterestingBucket == ecx_1)
0041b2c1          {
0041b2d4          label_41b2d4:
0041b2d4              m_firstInterestingBucket_2 = nullptr;
0041b2d6              i_3 = nullptr;
0041b2c1          }
0041b2c1          else
0041b2c1          {
0041b2c3              while (true)
0041b2c3              {
0041b2c3                  class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0041b2c3                  
0041b2c8                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0041b2c8                  {
0041b2da                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0041b2dd                      i_3 = *(uint32_t*)m_firstInterestingBucket_1;
0041b2df                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0041b2df                      break;
0041b2c8                  }
0041b2c8                  
0041b2cf                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0041b2cf                  
0041b2d2                  if (&m_firstInterestingBucket[1] == ecx_1)
0041b2d2                      goto label_41b2d4;
0041b2c3              }
0041b2c1          }
0041b2c1          
0041b2e6          int32_t** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
0041b2ed          int32_t* i_4 = i_3;
0041b2f0          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, this);
0041b2f5          i_3[1] = i_2;
0041b2fb          i_2 = i_3;
0041b2b1      }
0041b2b1      
0041b2ff      class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_buckets = this->m_buckets;
0041b2ff      
0041b307      if (m_buckets != &this->m_aInplaceBuckets)
0041b30a          operator delete[](m_buckets);
0041b30a      
0041b312      uint32_t edx_2 = arg2;
0041b319      this->m_buckets = nullptr;
0041b31c      this->m_firstInterestingBucket = nullptr;
0041b31f      this->m_numBuckets = 0;
0041b322      this->m_numElements = 0;
0041b325      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, edx_2);
0041b32c      int32_t* i_1 = i_2;
0041b32e      void** eax_4;
0041b32e      
0041b32e      if (i_2 != 0)
0041b32e      {
0041b3a6          int32_t* i;
0041b3a6          
0041b3a6          do
0041b3a6          {
0041b330              uint32_t m_numBuckets = this->m_numBuckets;
0041b336              i = i_1[1];
0041b336              
0041b33f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0041b33f              {
0041b341                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041b347                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0041b34f                  arg2 = m_numBuckets;
0041b35f                  uint32_t* eax_6 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0041b35f                  
0041b369                  if (eax_6 != bucketSizesEnd_1)
0041b372                      eax_6 = &eax_6[1];
0041b369                  else
0041b369                  {
0041b36b                      eax_6 -= 4;
0041b36b                      
0041b370                      if (eax_6 != bucketSizesEnd_1)
0041b372                          eax_6 = &eax_6[1];
0041b369                  }
0041b369                  
0041b37a                  IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::resize_internal(this, *(uint32_t*)eax_6);
0041b33f              }
0041b33f              
0041b389              eax_4 = &this->m_buckets[(COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets)];
0041b38e              i_1[1] = *(uint32_t*)eax_4;
0041b391              *(uint32_t*)eax_4 = i_1;
0041b391              
0041b396              if (eax_4 < this->m_firstInterestingBucket)
0041b398                  this->m_firstInterestingBucket = eax_4;
0041b398              
0041b3a1              this->m_numElements += 1;
0041b3a4              i_1 = i;
0041b3a6          } while (i != 0);
0041b32e      }
0041b32e      
0041b3ab      eax_4 = 1;
0041b3ae      return 1;
0041b290  }

0041b3b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0041b3c0  uint8_t __thiscall EnumMapper::GetEnum(class EnumMapper const* this, class PStringBase<char> arg2, uint32_t* arg3)

0041b3c0  {
0041b3c7      class PStringBase<char> edi = arg2;
0041b3d4      arg2 = edi;
0041b3d8      InterlockedIncrement((edi - 0x10));
0041b3ee      void __return;
0041b3ee      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_string_to_id_map.m_intrusiveTable, &__return, &arg2);
0041b3f9      void* var_4;
0041b3f9      
0041b3f9      if (var_4 == 0)
0041b40b          arg2.m_charbuffer = 0;
0041b3f9      else
0041b3f9      {
0041b402          *(uint32_t*)arg3 = *(uint32_t*)((char*)var_4 + 8);
0041b404          arg2.m_charbuffer = 1;
0041b3f9      }
0041b3f9      
0041b41a      int32_t eax_3;
0041b41a      int32_t ecx_2;
0041b41a      eax_3 = InterlockedDecrement((edi - 0x10));
0041b41a      
0041b422      if ((eax_3 == 0 && edi != 0x14))
0041b42a          eax_3 = **(uint32_t**)(edi - 0x14)(1);
0041b42a      
0041b42c      eax_3 = arg2.m_charbuffer;
0041b42c      
0041b432      if (eax_3 != 0)
0041b432      {
0041b440          if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0041b448              **(uint32_t**)(edi - 0x14)(1);
0041b448          
0041b44a          int32_t eax_5;
0041b44a          eax_5 = 1;
0041b453          return 1;
0041b432      }
0041b432      
0041b45b      if (this->m_base_emp == 0)
0041b45b      {
0041b4ad          if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0041b4b5              **(uint32_t**)(edi - 0x14)(1);
0041b4b5          
0041b4ba          int32_t eax_11;
0041b4ba          eax_11 = 0;
0041b4c0          return 0;
0041b45b      }
0041b45b      
0041b462      int32_t var_24_1 = ecx_2;
0041b46b      InterlockedIncrement((edi - 0x10));
0041b47d      arg3 = EnumMapper::GetEnum(this->m_base_emp, edi, arg3);
0041b47d      
0041b489      if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0041b491          **(uint32_t**)(edi - 0x14)(1);
0041b491      
0041b493      int32_t eax_9;
0041b493      eax_9 = arg3;
0041b49e      return eax_9;
0041b3c0  }

0041b4c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0041b4d0  uint8_t EnumMapper::GetEnum(uint32_t const arg1, class PStringBase<char> arg2, uint32_t* arg3)

0041b4d0  {
0041b4e1      int32_t ebx;
0041b4e1      ebx = 0;
0041b4e3      class IDClass<_tagDataID,32,0> __return;
0041b4e3      DBObj::GetDIDByEnum(&__return, arg1, 1);
0041b4e8      class IDClass<_tagDataID,32,0> __return_1 = __return;
0041b4e8      
0041b4f7      if (__return_1 == INVALID_DID.id)
0041b4f7      {
0041b4fd          int32_t* esi_2 = (arg2 - 0x14);
0041b4fd          
0041b510          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0041b518              **(uint32_t**)esi_2(1);
0041b518          
0041b51a          int32_t eax;
0041b51a          eax = 0;
0041b521          return 0;
0041b4f7      }
0041b4f7      
0041b523      uint32_t eax_2 = MasterDBMap::DivineType(__return_1);
0041b52e      class DBObjGrabber<DualEnumIDMap> var_4;
0041b52e      uint8_t eax_8;
0041b52e      class DBObjGrabber<DualEnumIDMap> esi_4;
0041b52e      
0041b52e      if (eax_2 == 0x24)
0041b52e      {
0041b5aa          int32_t ecx_11 = DBObjGrabber<EnumMapper>::DBObjGrabber<EnumMapper>(&var_4, __return);
0041b5af          esi_4 = var_4;
0041b5af          
0041b5b5          if (esi_4 != 0)
0041b5b5          {
0041b5bc              int32_t var_18_3 = ecx_11;
0041b5bd              class PStringBase<char> ecx_12 = arg2;
0041b5cd              InterlockedIncrement((arg2 - 0x10));
0041b5d5              eax_8 = EnumMapper::GetEnum(esi_4, ecx_12, arg3);
0041b5dc          label_41b5dc:
0041b5dc              
0041b5dc              if (eax_8 != 0)
0041b5de                  ebx = 1;
0041b5de              
0041b5e4              *(uint32_t*)(*(uint32_t*)esi_4 + 0x14)();
0041b5b5          }
0041b52e      }
0041b52e      else if (eax_2 == 0x26)
0041b533      {
0041b581          DBObjGrabber<EnumIDMap>::DBObjGrabber<EnumIDMap>(&var_4, __return);
0041b586          esi_4 = var_4;
0041b586          
0041b58c          if (esi_4 != 0)
0041b58c          {
0041b59a              eax_8 = EnumIDMap::NameToEnum(esi_4, &arg2, arg3);
0041b59f              goto label_41b5dc;
0041b58c          }
0041b533      }
0041b533      else if (eax_2 == 0x28)
0041b538      {
0041b547          DBObjGrabber<DualEnumIDMap>::DBObjGrabber<DualEnumIDMap>(&var_4, __return);
0041b54c          class DBObjGrabber<DualEnumIDMap> esi_3 = var_4;
0041b54c          
0041b552          if (esi_3 != 0)
0041b552          {
0041b56b              if (EnumIDMap::NameToEnum(esi_3, &arg2, arg3) != 0)
0041b56d                  ebx = 1;
0041b56d              
0041b573              *(uint32_t*)(*(uint32_t*)esi_3 + 0x14)();
0041b552          }
0041b538      }
0041b5eb      int32_t* esi_6 = (arg2 - 0x14);
0041b5eb      
0041b5fe      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0041b606          **(uint32_t**)esi_6(1);
0041b606      
0041b609      int32_t eax_10;
0041b609      eax_10 = ebx;
0041b60f      return eax_10;
0041b4d0  }


0041b610  uint8_t __convention("regparm") EnumMapper::InqEnum(uint32_t const arg1, class PStringBase<unsigned short> arg2, uint32_t* arg3)

0041b610  {
0041b610      class PStringBase<char> ecx;
0041b610      class PStringBase<char> var_4 = ecx;
0041b618      class PStringBase<unsigned short>* var_14 = &arg2;
0041b61d      int32_t* var_18 = &var_4;
0041b62b      class PStringBase<char>* __return;
0041b62b      class PStringBase<unsigned short>* edx;
0041b62b      int32_t var_18_1 = PSUtils::narrowify(__return, edx);
0041b62c      class PStringBase<char> ecx_2 = var_4;
0041b63c      InterlockedIncrement((var_4 - 0x10));
0041b647      uint8_t eax_1 = EnumMapper::GetEnum(arg1, ecx_2, arg3);
0041b656      int32_t* esi_1 = (var_4 - 0x14);
0041b660      int32_t ebx;
0041b660      ebx = eax_1;
0041b660      
0041b66a      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0041b672          **(uint32_t**)esi_1(1);
0041b672      
0041b678      int32_t* esi_3 = (arg2 - 0x14);
0041b678      
0041b687      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0041b68f          **(uint32_t**)esi_3(1);
0041b68f      
0041b693      int32_t eax_4;
0041b693      eax_4 = ebx;
0041b697      return eax_4;
0041b610  }

0041b698                                                                          90 90 90 90 90 90 90 90                          ........

0041b6a0  uint8_t EnumMapper::GetEnumByDID(class IDClass<_tagDataID,32,0> arg1, class PStringBase<char> arg2, uint32_t* arg3)

0041b6a0  {
0041b6aa      int32_t ebx;
0041b6aa      ebx = 0;
0041b6ac      uint32_t eax = MasterDBMap::DivineType(arg1);
0041b6b7      void var_8;
0041b6b7      
0041b6b7      if (eax == 0x24)
0041b6b7      {
0041b755          class DBObj* eax_13;
0041b755          int32_t ecx_8;
0041b755          eax_13 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0x24));
0041b755          
0041b761          if (eax_13 != 0)
0041b761          {
0041b768              int32_t var_18_6 = ecx_8;
0041b769              class PStringBase<char> ecx_9 = arg2;
0041b779              InterlockedIncrement((arg2 - 0x10));
0041b779              
0041b788              if (EnumMapper::GetEnum(eax_13, ecx_9, arg3) != 0)
0041b78a                  ebx = 1;
0041b78a              
0041b78c              eax_13->vtable->Release();
0041b761          }
0041b6b7      }
0041b6b7      else if (eax == 0x26)
0041b6c0      {
0041b71a          class DBObj* eax_9 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0x26));
0041b71a          
0041b726          if (eax_9 != 0)
0041b726          {
0041b73b              if (EnumIDMap::NameToEnum(eax_9, &arg2, arg3) != 0)
0041b73d                  ebx = 1;
0041b73d              
0041b73f              eax_9->vtable->Release();
0041b726          }
0041b6c0      }
0041b6c0      else if (eax == 0x28)
0041b6c5      {
0041b6d8          class DBObj* eax_5 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0x28));
0041b6d8          
0041b6e4          if (eax_5 != 0)
0041b6e4          {
0041b6fd              if (EnumIDMap::NameToEnum(eax_5, &arg2, arg3) != 0)
0041b6ff                  ebx = 1;
0041b6ff              
0041b701              eax_5->vtable->Release();
0041b6e4          }
0041b6c5      }
0041b797      int32_t* esi_5 = (arg2 - 0x14);
0041b797      
0041b7aa      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0041b7b2          **(uint32_t**)esi_5(1);
0041b7b2      
0041b7b5      int32_t eax_17;
0041b7b5      eax_17 = ebx;
0041b7bb      return eax_17;
0041b6a0  }

0041b7bc                                                                                      90 90 90 90                              ....

0041b7c0  uint8_t __thiscall HashTable<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long,1>::set(class HashTable<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long,1>* this, class CaseInsensitiveStringBase<PStringBase<char> > const* arg2, uint32_t const* arg3)

0041b7c0  {
0041b7d4      void __return;
0041b7d4      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_intrusiveTable, &__return, arg2);
0041b7df      void* var_4;
0041b7df      
0041b7df      if (var_4 != 0)
0041b7df      {
0041b7e8          *(uint32_t*)((char*)var_4 + 8) = *(uint32_t*)arg3;
0041b7eb          void* eax;
0041b7eb          eax = 1;
0041b7f1          return 1;
0041b7df      }
0041b7df      
0041b7fc      void* esi = operator new(0xc);
0041b7fc      
0041b803      if (esi == 0)
0041b825          esi = nullptr;
0041b803      else
0041b803      {
0041b805          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0041b807          *(uint32_t*)esi = m_charbuffer;
0041b80d          InterlockedIncrement(&m_charbuffer[-1]);
0041b817          *(uint32_t*)((char*)esi + 4) = 0;
0041b820          *(uint32_t*)((char*)esi + 8) = *(uint32_t*)arg3;
0041b803      }
0041b803      
0041b82f      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_intrusiveTable, &__return, esi);
0041b82f      
0041b83a      if (var_4 == 0)
0041b83f          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::add_internal(&this->m_intrusiveTable, esi);
0041b83f      
0041b846      void* eax_4;
0041b846      eax_4 = 1;
0041b84c      return 1;
0041b7c0  }

0041b84f                                               90                                                                 .

0041b850  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::resize(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* this, uint32_t arg2)

0041b850  {
0041b855      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041b85c      arg2 = arg2;
0041b875      uint32_t* eax_1 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0041b875      
0041b87f      if (eax_1 == bucketSizesEnd_1)
0041b881          eax_1 -= 4;
0041b881      
0041b890      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::resize_internal(this, *(uint32_t*)eax_1);
0041b850  }

0041b893                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0041b8a0  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* arg2, class Archive* arg3)

0041b8a0  {
0041b8a7      class Archive* edi = arg3;
0041b8a7      
0041b8b2      if ((!(edi->m_flags) & 1) != 0)
0041b8b8          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
0041b8b8      
0041b8c6      int32_t ebx;
0041b8c6      
0041b8c6      if ((((int8_t)edi->m_flags) & 5) != 1)
0041b905          ebx = arg3;
0041b8c6      else
0041b8c6      {
0041b8cf          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041b8d5          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0041b8dd          arg3 = arg2->m_numBuckets;
0041b8ed          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0041b8ed          
0041b8f7          if (eax_2 == bucketSizesEnd_1)
0041b8f9              eax_2 -= 4;
0041b8f9          
0041b900          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
0041b8c6      }
0041b8c6      
0041b90d      Archive::CheckAlignment(edi, 1);
0041b916      char* eax_3 = Archive::GetBytes(edi, 1);
0041b916      
0041b91d      if (eax_3 != 0)
0041b91d      {
0041b923          if ((edi->m_flags & 1) == 0)
0041b929              ebx = *(uint8_t*)eax_3;
0041b923          else
0041b925              *(uint8_t*)eax_3 = ebx;
0041b91d      }
0041b91d      
0041b92f      if ((edi->m_flags & 5) == 0)
0041b92f      {
0041b937          uint32_t eax_4 = ((uint32_t)ebx);
0041b937          
0041b93c          if (eax_4 < 0x17)
0041b955              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::resize(arg2, g_bucketSizesBegin[eax_4]);
0041b93c          else
0041b940              Archive::RaiseError(edi);
0041b92f      }
0041b92f      
0041b961      if ((((int8_t)edi->m_flags) & 5) == 1)
0041b96a          arg3 = arg2->m_numElements;
0041b96a      
0041b979      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, edi);
0041b979      
0041b98a      if ((((int8_t)edi->m_flags) & 5) == 1)
0041b98a      {
0041b995          void __return;
0041b995          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0041b99a          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0041b99c          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
0041b99f          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
0041b99f          
0041b9a4          while (i != 0)
0041b9a4          {
0041b9da              do
0041b9da              {
0041b9aa                  Archive::CheckAlignment(edi, 4);
0041b9b3                  uint8_t* eax_7 = Archive::GetBytes(edi, 4);
0041b9b3                  
0041b9ba                  if (eax_7 != 0)
0041b9ba                  {
0041b9c0                      if ((edi->m_flags & 1) == 0)
0041b9ca                          i->m_hashKey = *(uint32_t*)eax_7;
0041b9c0                      else
0041b9c4                          *(uint32_t*)eax_7 = i->m_hashKey;
0041b9ba                  }
0041b9ba                  
0041b9d0                  PStringBase<char>::Serialize(&i->m_data, edi);
0041b9d5                  i = i->m_hashNext;
0041b9da              } while (i != 0);
0041b9da              
0041b9e5              while (true)
0041b9e5              {
0041b9e5                  m_currBucket = &m_currBucket[1];
0041b9e5                  
0041b9ea                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0041b9ea                      break;
0041b9ea                  
0041b9ec                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0041b9ec                  
0041b9f1                  if (i_1 != 0)
0041b9f1                  {
0041b9f3                      i = i_1;
0041b9f5                      break;
0041b9f1                  }
0041b9e5              }
0041b9a4          }
0041b98a      }
0041b98a      
0041b9fb      if ((edi->m_flags & 5) == 0)
0041b9fb      {
0041ba03          uint32_t eax_10 = Archive::GetSizeLeft(edi);
0041ba08          class Archive* ecx_17 = arg3;
0041ba08          
0041ba0e          if (ecx_17 > eax_10)
0041bab1              Archive::RaiseError(edi);
0041ba0e          else
0041ba0e          {
0041ba14              void* ebx_3 = nullptr;
0041ba16              int32_t ebp_1 = 0;
0041ba16              
0041ba1a              if (ecx_17 > 0)
0041ba1a              {
0041ba27                  while (true)
0041ba27                  {
0041ba27                      void* esi_1 = operator new(0xc);
0041ba27                      
0041ba2e                      if (esi_1 == 0)
0041ba4e                          esi_1 = nullptr;
0041ba2e                      else
0041ba2e                      {
0041ba30                          *(uint32_t*)((char*)esi_1 + 4) = 0;
0041ba37                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0041ba43                          *(uint32_t*)((char*)esi_1 + 8) = PStringBase<char>::s_NullBuffer_1;
0041ba46                          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0041ba2e                      }
0041ba2e                      
0041ba54                      Archive::CheckAlignment(edi, 4);
0041ba5d                      uint8_t* eax_14 = Archive::GetBytes(edi, 4);
0041ba5d                      
0041ba64                      if (eax_14 != 0)
0041ba64                      {
0041ba6a                          if ((edi->m_flags & 1) == 0)
0041ba74                              *(uint32_t*)esi_1 = *(uint32_t*)eax_14;
0041ba6a                          else
0041ba6e                              *(uint32_t*)eax_14 = *(uint32_t*)esi_1;
0041ba64                      }
0041ba64                      
0041ba7a                      PStringBase<char>::Serialize(((char*)esi_1 + 8), edi);
0041ba7a                      
0041ba87                      if ((((int8_t)(edi->m_flags >> 2)) & 1) != 0)
0041babd                          return;
0041babd                      
0041ba96                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, esi_1, ebx_3) == 0)
0041ba96                          break;
0041ba96                      
0041ba9c                      ebp_1 += 1;
0041ba9f                      ebx_3 = esi_1;
0041ba9f                      
0041baa1                      if (ebp_1 >= arg3)
0041baae                          return;
0041ba27                  }
0041ba27                  
0041bab1                  Archive::RaiseError(edi);
0041ba1a              }
0041ba0e          }
0041b9fb      }
0041b8a0  }

0041babe                                                                                            90 90                                ..

0041bac0  void __fastcall EnumMapper::Destroy(class EnumMapper* this)

0041bac0  {
0041bac9      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_string_to_id_map.m_intrusiveTable);
0041bad1      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_id_to_string_map.m_intrusiveTable);
0041bad6      class EnumMapper* m_base_emp = this->m_base_emp;
0041bad6      
0041badb      if (m_base_emp == 0)
0041badb      {
0041bafa          this->m_base_emp_did.id = INVALID_DID.id;
0041bafe          return;
0041badb      }
0041badb      
0041badd      m_base_emp->vtable->Release(m_base_emp);
0041bae2      this->m_base_emp = nullptr;
0041baef      this->m_base_emp_did.id = INVALID_DID.id;
0041bac0  }

0041baff                                                                                               90                                 .

0041bb00  void* __thiscall AutoGrowHashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >::`scalar deleting destructor'(class AutoGrowHashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >* this, uint32_t arg2)

0041bb00  {
0041bb09      this->vtable = 0x79546c;
0041bb0f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_intrusiveTable);
0041bb14      class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_buckets = this->m_intrusiveTable.m_buckets;
0041bb04      this->m_intrusiveTable.vtable = 0x795464;
0041bb04      
0041bb22      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0041bb25          operator delete[](m_buckets);
0041bb25      
0041bb04      this->m_intrusiveTable.m_buckets = nullptr;
0041bb04      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0041bb04      this->m_intrusiveTable.m_numBuckets = 0;
0041bb04      this->m_intrusiveTable.m_numElements = 0;
0041bb04      
0041bb40      if ((arg2 & 1) != 0)
0041bb43          operator delete(this);
0041bb43      
0041bb4f      return this;
0041bb00  }

0041bb52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0041bb60  void __fastcall EnumMapper::~EnumMapper(class EnumMapper* this)

0041bb60  {
0041bb6b      this->vtable = 0x795478;
0041bb71      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_string_to_id_map.m_intrusiveTable);
0041bb79      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_id_to_string_map.m_intrusiveTable);
0041bb7e      class EnumMapper* m_base_emp = this->m_base_emp;
0041bb7e      
0041bb85      if (m_base_emp != 0)
0041bb85      {
0041bb87          m_base_emp->vtable->Release();
0041bb8c          this->m_base_emp = nullptr;
0041bb85      }
0041bb85      
0041bb95      this->m_base_emp_did.id = INVALID_DID.id;
0041bba0      this->m_string_to_id_map.vtable = 0x795470;
0041bbaa      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_string_to_id_map.m_intrusiveTable);
0041bbaf      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_buckets = this->m_string_to_id_map.m_intrusiveTable.m_buckets;
0041bb98      this->m_string_to_id_map.m_intrusiveTable.vtable = 0x795468;
0041bb98      
0041bbbd      if (m_buckets != &this->m_string_to_id_map.m_intrusiveTable.m_aInplaceBuckets)
0041bbc0          operator delete[](m_buckets);
0041bbc0      
0041bb98      this->m_string_to_id_map.m_intrusiveTable.m_buckets = nullptr;
0041bb98      this->m_string_to_id_map.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0041bb98      this->m_string_to_id_map.m_intrusiveTable.m_numBuckets = 0;
0041bb98      this->m_string_to_id_map.m_intrusiveTable.m_numElements = 0;
0041bbd9      this->m_id_to_string_map.vtable = 0x79546c;
0041bbe0      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_id_to_string_map.m_intrusiveTable);
0041bbe5      class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_buckets_1 = this->m_id_to_string_map.m_intrusiveTable.m_buckets;
0041bbd4      this->m_id_to_string_map.m_intrusiveTable.vtable = 0x795464;
0041bbd4      
0041bbf3      if (m_buckets_1 != &this->m_id_to_string_map.m_intrusiveTable.m_aInplaceBuckets)
0041bbf6          operator delete[](m_buckets_1);
0041bbf6      
0041bbd4      this->m_id_to_string_map.m_intrusiveTable.m_buckets = nullptr;
0041bbd4      this->m_id_to_string_map.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0041bbd4      this->m_id_to_string_map.m_intrusiveTable.m_numBuckets = 0;
0041bbd4      this->m_id_to_string_map.m_intrusiveTable.m_numElements = 0;
0041bc0f      /* tailcall */
0041bc0f      return DBObj::~DBObj(this);
0041bb60  }

0041bc14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0041bc20  uint32_t EnumMapper::GetDBOType(class EnumMapper const* this @ ecx) __pure

0041bc20  {
0041bc25      return 0x24;
0041bc20  }

0041bc26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0041bc30  void __fastcall EnumMapper::EnumMapper(class EnumMapper* this)

0041bc30  {
0041bc39      DBObj::DBObj(this, INVALID_DID.id);
0041bc3e      this->vtable = 0x795478;
0041bc4a      this->m_base_emp_did.id = INVALID_DID.id;
0041bc4d      this->m_base_emp = nullptr;
0041bc59      this->m_id_to_string_map.vtable = 0x79546c;
0041bc60      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>(&this->m_id_to_string_map.m_intrusiveTable, 0);
0041bc65      this->m_id_to_string_map.vtable = 0x79546c;
0041bc74      this->m_string_to_id_map.vtable = 0x795470;
0041bc7e      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>(&this->m_string_to_id_map.m_intrusiveTable, 0);
0041bc83      this->m_string_to_id_map.vtable = 0x795470;
0041bc30  }

0041bc91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0041bca0  void* __thiscall EnumMapper::`scalar deleting destructor'(class EnumMapper* this, uint32_t arg2)

0041bca0  {
0041bca3      EnumMapper::~EnumMapper(this);
0041bca3      
0041bcad      if ((arg2 & 1) != 0)
0041bcb0          operator delete(this);
0041bcb0      
0041bcbb      return this;
0041bca0  }

0041bcbe                                                                                            90 90                                ..

0041bcc0  class DBObj* EnumMapper::Allocate(class EnumMapper const* this @ ecx)

0041bcc0  {
0041bcc0      /* tailcall */
0041bcc0      return EnumMapper::Allocator();
0041bcc0  }

0041bcc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0041bcd0  class DBObj* EnumMapper::Allocator()

0041bcd0  {
0041bcd5      void* eax = operator new(0x120);
0041bcd5      
0041bcdf      if (eax == 0)
0041bcea          return 0;
0041bcea      
0041bce3      /* tailcall */
0041bce3      return EnumMapper::EnumMapper(eax);
0041bcd0  }

0041bceb                                   90 90 90 90 90                                                             .....

0041bcf0  void __thiscall EnumMapper::Serialize(class EnumMapper* this, class Archive* arg2)

0041bcf0  {
0041bcf5      class Archive* esi = arg2;
0041bcfc      DBObj::Serialize(this, esi);
0041bd05      Archive::CheckAlignment(esi, 4);
0041bd0e      uint8_t* eax = Archive::GetBytes(esi, 4);
0041bd0e      
0041bd15      if (eax != 0)
0041bd15      {
0041bd1b          if ((esi->m_flags & 1) == 0)
0041bd26              this->m_base_emp_did.id = *(uint32_t*)eax;
0041bd1b          else
0041bd20              *(uint32_t*)eax = this->m_base_emp_did.id;
0041bd15      }
0041bd15      
0041bd29      eax = esi->m_flags;
0041bd2c      eax = !(eax);
0041bd2c      
0041bd30      if ((eax & 1) != 0)
0041bd35          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_id_to_string_map.m_intrusiveTable);
0041bd35      
0041bd44      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,SB_Default>(&arg2, &this->m_id_to_string_map.m_intrusiveTable, esi);
0041bd44      
0041bd53      if ((!(esi->m_flags) & 1) != 0)
0041bd53      {
0041bd63          IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_string_to_id_map.m_intrusiveTable);
0041bd6e          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041bd74          arg2 = this->m_id_to_string_map.m_intrusiveTable.m_numElements;
0041bd8c          uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0041bd8c          
0041bd96          if (eax_2 == bucketSizesEnd_1)
0041bd98              eax_2 -= 4;
0041bd98          
0041bda0          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::resize_internal(&this->m_string_to_id_map.m_intrusiveTable, *(uint32_t*)eax_2);
0041bdad          void __return;
0041bdad          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_3 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_id_to_string_map.m_intrusiveTable, &__return);
0041bdb2          class HashTableData<unsigned long,DBOCache *>* i_1 = eax_3->m_currElement;
0041bdb7          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_3->m_currHashTable;
0041bdb9          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_3->m_currBucket;
0041bdb9          
0041bdbc          if (i_1 != 0)
0041bdbc          {
0041bdcb              while (true)
0041bdcb              {
0041bdcb                  HashTable<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long,1>::set(&this->m_string_to_id_map, &i_1->m_data, i_1);
0041bdd0                  i_1 = i_1->m_hashNext;
0041bdd0                  
0041bdd5                  if (i_1 == 0)
0041bdd5                  {
0041bdeb                      class HashTableData<unsigned long,DBOCache *>* i;
0041bdeb                      
0041bdeb                      do
0041bdeb                      {
0041bde0                          m_currBucket = &m_currBucket[1];
0041bde0                          
0041bde5                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0041bdfa                              return;
0041bdfa                          
0041bde7                          i = *(uint32_t*)m_currBucket;
0041bdeb                      } while (i == 0);
0041bdeb                      
0041bded                      i_1 = i;
0041bded                      
0041bdf1                      if (i_1 == 0)
0041bdf1                          break;
0041bdd5                  }
0041bdcb              }
0041bdbc          }
0041bd53      }
0041bcf0  }

0041bdfd                                                                                         90 90 90                               ...

0041be00  uint8_t MasterDBMap::Init(class MasterDBMap* arg1)

0041be00  {
0041be0f      if ((arg1 == 0 || MasterDBMap::sm_mmap != 0))
0041be0f      {
0041be1b          class MasterDBMap* eax;
0041be1b          eax = 0;
0041be1d          return 0;
0041be0f      }
0041be0f      
0041be11      MasterDBMap::sm_mmap = arg1;
0041be19      /* tailcall */
0041be19      return arg1->vtable->InitDBTypeDef_Internal(arg1);
0041be00  }

0041be1e                                                                                            90 90                                ..

0041be20  uint8_t MasterDBMap::Cleanup()

0041be20  {
0041be26      operator delete(MasterDBMap::sm_mmap);
0041be2e      MasterDBMap::sm_mmap = nullptr;
0041be38      int32_t eax;
0041be38      eax = 1;
0041be3a      return 1;
0041be20  }

0041be3b                                                                                   90 90 90 90 90                             .....

0041be40  uint32_t MasterDBMap::DivineType(class PStringBase<char> const* arg1)

0041be40  {
0041be40      class MasterDBMap* MasterDBMap::sm_mmap_1 = MasterDBMap::sm_mmap;
0041be40      
0041be48      if (MasterDBMap::sm_mmap_1 == 0)
0041be57          return 0;
0041be57      
0041be54      return *(int32_t*)((char*)MasterDBMap::sm_mmap_1->vtable + 4)(arg1);
0041be40  }

0041be58                                                                          90 90 90 90 90 90 90 90                          ........

0041be60  uint32_t MasterDBMap::DivineType(class IDClass<_tagDataID,32,0> arg1)

0041be60  {
0041be60      class MasterDBMap* MasterDBMap::sm_mmap_1 = MasterDBMap::sm_mmap;
0041be60      
0041be68      if (MasterDBMap::sm_mmap_1 == 0)
0041be77          return 0;
0041be77      
0041be74      return MasterDBMap::sm_mmap_1->vtable->DivineType_Internal(MasterDBMap::sm_mmap_1, arg1);
0041be60  }

0041be78                                                                          90 90 90 90 90 90 90 90                          ........

0041be80  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBTypeDef> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBTypeDef> *,0>* this, uint32_t arg2)

0041be80  {
0041be83      class HashTableData<unsigned long,DBTypeDef>** m_buckets = this->m_buckets;
0041be8b      this->vtable = 0x7954d0;
0041be8b      
0041be91      if (m_buckets != &this->m_aInplaceBuckets)
0041be94          operator delete[](m_buckets);
0041be94      
0041be9e      this->m_buckets = nullptr;
0041bea1      this->m_firstInterestingBucket = nullptr;
0041bea4      this->m_numBuckets = 0;
0041bea7      this->m_numElements = 0;
0041bea7      
0041beaf      if ((arg2 & 1) != 0)
0041beb2          operator delete(this);
0041beb2      
0041bebd      return this;
0041be80  }


0041bec0  void MasterDBMap::SetGameDataDir(class PStringBase<char> const* arg1)

0041bec0  {
0041bec0      class PSRefBufferCharData<char>* m_charbuffer_1 = MasterDBMap::sm_game_data_dir.m_charbuffer;
0041bec0      
0041becc      if (m_charbuffer_1 != arg1->m_charbuffer)
0041becc      {
0041bee2          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0041beea              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0041beea          
0041beec          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0041beee          MasterDBMap::sm_game_data_dir.m_charbuffer = m_charbuffer;
0041bef7          InterlockedIncrement(&m_charbuffer[-1]);
0041becc      }
0041becc      
0041bf05      PSUtils::cleanup_directory_name(&MasterDBMap::sm_game_data_dir, 0);
0041bec0  }

0041bf0f                                               90                                                                 .

0041bf10  void MasterDBMap::SetEngineDataDir(class PStringBase<char> const* arg1)

0041bf10  {
0041bf10      class PSRefBufferCharData<char>* m_charbuffer_1 = MasterDBMap::sm_engine_data_dir.m_charbuffer;
0041bf10      
0041bf1c      if (m_charbuffer_1 != arg1->m_charbuffer)
0041bf1c      {
0041bf32          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0041bf3a              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0041bf3a          
0041bf3c          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0041bf3e          MasterDBMap::sm_engine_data_dir.m_charbuffer = m_charbuffer;
0041bf47          InterlockedIncrement(&m_charbuffer[-1]);
0041bf1c      }
0041bf1c      
0041bf55      PSUtils::cleanup_directory_name(&MasterDBMap::sm_engine_data_dir, 0);
0041bf10  }

0041bf5f                                                                                               90                                 .

0041bf60  void __fastcall DBTypeDef::DBTypeDef(class DBTypeDef* this)

0041bf60  {
0041bf69      uint32_t* this_1 = this;
0041bf6b      *(uint32_t*)this_1 = INVALID_DID.id;
0041bf73      this_1[1] = INVALID_DID.id;
0041bf76      __builtin_memset(&this_1[2], 0, 0x18);
0041bf91      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0041bf9d      this_1[8] = PStringBase<char>::s_NullBuffer_1;
0041bfa0      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0041bfa6      this_1[9] = 0;
0041bfa9      *(uint8_t*)((char*)this_1 + 0x25) = 0;
0041bfac      *(uint8_t*)((char*)this_1 + 0x26) = 0;
0041bfaf      *(uint8_t*)((char*)this_1 + 0x27) = 0;
0041bfb2      this_1[0xa] = 0;
0041bfb5      *(uint8_t*)((char*)this_1 + 0x29) = 0;
0041bfb8      *(uint8_t*)((char*)this_1 + 0x2a) = 0;
0041bfbb      this_1[0xb] = 0;
0041bfbe      *(uint8_t*)((char*)this_1 + 0x2d) = 0;
0041bfc1      this_1[0xc] = 0x10;
0041bfc8      this_1[0xd] = 0x10;
0041bf60  }

0041bfd4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0041bfe0  class DBTypeDef const* MasterDBMap::GetDBTypeDef(uint32_t const arg1)

0041bfe0  {
0041bfed      if ((1 & (*(uint8_t*)$S82)) == 0)
0041bfed      {
0041bffc          $S82 |= 1;
0041c002          DBTypeDef::DBTypeDef(&INVALID_DBTypeDef);
0041c00c          atexit($E83);
0041bfed      }
0041bfed      
0041c02a      int32_t* eax_3 = MasterDBMap::sm_DBTypeDefHash.m_intrusiveTable.m_buckets[(COMBINE(0, arg1) % MasterDBMap::sm_DBTypeDefHash.m_intrusiveTable.m_numBuckets)];
0041c02a      
0041c02e      if (eax_3 != 0)
0041c02e      {
0041c032          while (*(uint32_t*)eax_3 != arg1)
0041c032          {
0041c034              eax_3 = eax_3[1];
0041c034              
0041c039              if (eax_3 == 0)
0041c040                  return 0x836c78;
0041c032          }
0041c032          
0041c043          if (eax_3 != 0)
0041c043          {
0041c045              void* result = &eax_3[2];
0041c045              
0041c04a              if (result != 0)
0041c051                  return result;
0041c043          }
0041c02e      }
0041c02e      
0041c04c      return &INVALID_DBTypeDef;
0041bfe0  }

0041c052                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0041c060  uint8_t MasterDBMap::IsPortalType(uint32_t const arg1)

0041c060  {
0041c06a      class DBTypeDef* eax;
0041c06a      eax = MasterDBMap::GetDBTypeDef(arg1)->m_bIsPortalType;
0041c070      return eax;
0041c060  }

0041c071                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0041c080  uint8_t MasterDBMap::IsCellType(uint32_t const arg1)

0041c080  {
0041c08a      class DBTypeDef* eax;
0041c08a      eax = MasterDBMap::GetDBTypeDef(arg1)->m_bIsCellType;
0041c090      return eax;
0041c080  }

0041c091                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0041c0a0  uint8_t MasterDBMap::IsLocalType(uint32_t const arg1)

0041c0a0  {
0041c0aa      class DBTypeDef* eax;
0041c0aa      eax = MasterDBMap::GetDBTypeDef(arg1)->m_bIsLocalType;
0041c0b0      return eax;
0041c0a0  }

0041c0b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0041c0c0  uint8_t MasterDBMap::IsCategorized(uint32_t const arg1)

0041c0c0  {
0041c0ca      class DBTypeDef* eax;
0041c0ca      eax = MasterDBMap::GetDBTypeDef(arg1)->m_bIsCategorized;
0041c0d0      return eax;
0041c0c0  }

0041c0d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0041c0e0  class FreelistDef const* MasterDBMap::GetFreelistDef(uint32_t const arg1)

0041c0e0  {
0041c0f0      return &MasterDBMap::GetDBTypeDef(arg1)->m_freelistDef;
0041c0e0  }

0041c0f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0041c100  uint8_t MasterDBMap::VerifyDirectory(class PStringBase<char> arg1, uint32_t arg2)

0041c100  {
0041c117      class PStringBase<char>* ecx = &MasterDBMap::GetDBTypeDef(arg2)->m_strDataDir;
0041c11a      class PSRefBufferCharData<char>* m_charbuffer = ecx->m_charbuffer;
0041c129      class PSRefBufferCharData<char>* __return;
0041c129      class PSRefBufferCharData<char>* ebx;
0041c129      
0041c129      if (m_charbuffer->m_data[-4] == 1)
0041c129      {
0041c141          ebx = m_charbuffer;
0041c147          InterlockedIncrement(&ebx[-1]);
0041c129      }
0041c129      else
0041c129      {
0041c136          PStringBase<char>::operator+(&MasterDBMap::sm_game_data_dir, &__return, ecx);
0041c13b          ebx = __return;
0041c129      }
0041c129      
0041c14f      class PStringBase<char>* ecx_2 = &MasterDBMap::GetDBTypeDef(arg2)->m_strDataDir;
0041c152      class PSRefBufferCharData<char>* m_charbuffer_1 = ecx_2->m_charbuffer;
0041c15c      class PSRefBufferCharData<char>* ebp;
0041c15c      
0041c15c      if (m_charbuffer_1->m_data[-4] == 1)
0041c15c      {
0041c174          ebp = m_charbuffer_1;
0041c17a          InterlockedIncrement(&ebp[-1]);
0041c15c      }
0041c15c      else
0041c15c      {
0041c169          PStringBase<char>::operator+(&MasterDBMap::sm_engine_data_dir, &__return, ecx_2);
0041c16e          ebp = __return;
0041c15c      }
0041c15c      
0041c180      class PStringBase<char> var_8 = arg1;
0041c188      InterlockedIncrement((arg1 - 0x10));
0041c191      PSUtils::cleanup_directory_name(&var_8, 0);
0041c1a7      int32_t eax_7 = _strnicmp(ebx, var_8, (ebx->m_data[-4] - 1));
0041c1ae      char var_9_1;
0041c1ae      bool cond:0_1;
0041c1ae      
0041c1ae      if (eax_7 != 0)
0041c1ae      {
0041c1c0          cond:0_1 = _strnicmp(ebp, var_8, (ebp->m_data[-4] - 1)) != 0;
0041c1c2          var_9_1 = 0;
0041c1ae      }
0041c1ae      
0041c1c7      if ((eax_7 == 0 || !(cond:0_1)))
0041c1c9          var_9_1 = 1;
0041c1c9      
0041c1d8      int32_t* esi_2 = (var_8 - 0x14);
0041c1d8      
0041c1e7      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0041c1ef          **(uint32_t**)esi_2(1);
0041c1ef      
0041c200      if ((InterlockedDecrement(&ebp[-1]) == 0 && ebp != 0x14))
0041c208          *(uint32_t*)*(int32_t*)((char*)ebp + -0x14)(1);
0041c208      
0041c219      if ((InterlockedDecrement(&ebx[-1]) == 0 && ebx != 0x14))
0041c221          *(uint32_t*)*(int32_t*)((char*)ebx + -0x14)(1);
0041c221      
0041c236      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
0041c23e          **(uint32_t**)(arg1 - 0x14)(1);
0041c23e      
0041c240      int32_t eax_18;
0041c240      eax_18 = var_9_1;
0041c24b      return eax_18;
0041c100  }

0041c24c                                      90 90 90 90                                                              ....

0041c250  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBTypeDef> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBTypeDef> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBTypeDef> *,0>* this, uint32_t arg2)

0041c250  {
0041c25b      arg2 = arg2;
0041c25f      uint8_t edx = ((int8_t)arg2);
0041c263      this->m_buckets = nullptr;
0041c266      this->m_firstInterestingBucket = nullptr;
0041c269      this->m_numBuckets = 0;
0041c26c      this->m_numElements = 0;
0041c270      this->vtable = 0x7954d0;
0041c276      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0041c289      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0041c289      
0041c293      if (eax == bucketSizesEnd_1)
0041c295          eax -= 4;
0041c295      
0041c298      uint32_t eax_1 = *(uint32_t*)eax;
0041c29d      this->m_numBuckets = eax_1;
0041c29d      
0041c2a0      if (eax_1 > 0x17)
0041c2b6          this->m_buckets = operator new[]((eax_1 << 2));
0041c2a0      else
0041c2a5          this->m_buckets = &this->m_aInplaceBuckets;
0041c2a5      
0041c2bc      class HashTableData<unsigned long,DBTypeDef>** m_buckets = this->m_buckets;
0041c2bf      uint32_t ecx_3 = (this->m_numBuckets << 2);
0041c2c5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0041c2d6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0041c250  }

0041c2df                                                                                               90                                 .

0041c2e0  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBTypeDef> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBTypeDef> *,0>* this)

0041c2e0  {
0041c2eb      while (this->m_numElements != 0)
0041c2eb      {
0041c2fa          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0041c300          class HashTableData<unsigned long,DBTypeDef>** m_firstInterestingBucket_2;
0041c300          void* ebx_1;
0041c300          
0041c300          if (this->m_firstInterestingBucket == ecx_1)
0041c300          {
0041c314          label_41c314:
0041c314              m_firstInterestingBucket_2 = nullptr;
0041c316              ebx_1 = nullptr;
0041c300          }
0041c300          else
0041c300          {
0041c302              while (true)
0041c302              {
0041c302                  class HashTableData<unsigned long,DBTypeDef>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0041c302                  
0041c308                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0041c308                  {
0041c31a                      class HashTableData<unsigned long,DBTypeDef>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0041c31d                      ebx_1 = *(uint32_t*)m_firstInterestingBucket_1;
0041c31f                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0041c31f                      break;
0041c308                  }
0041c308                  
0041c30f                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0041c30f                  
0041c312                  if (&m_firstInterestingBucket[1] == ecx_1)
0041c312                      goto label_41c314;
0041c302              }
0041c300          }
0041c300          
0041c321          class HashTableData<unsigned long,DBTypeDef>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0041c321          
0041c325          if (m_hashNext == ebx_1)
0041c337              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0041c325          else
0041c325          {
0041c32e              class HashTableData<unsigned long,DBTypeDef>* m_hashNext_1;
0041c32e              
0041c32e              do
0041c32e              {
0041c327                  m_hashNext_1 = m_hashNext;
0041c329                  m_hashNext = m_hashNext->m_hashNext;
0041c32e              } while (m_hashNext != ebx_1);
0041c32e              
0041c332              if (m_hashNext_1 != 0)
0041c33e                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0041c332              else
0041c337                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0041c325          }
0041c325          
0041c347          this->m_numElements -= 1;
0041c347          
0041c34a          if (ebx_1 != 0)
0041c34a          {
0041c353              int32_t* esi_2 = (*(uint32_t*)((char*)ebx_1 + 0x28) - 0x14);
0041c353              
0041c366              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0041c36e                  **(uint32_t**)esi_2(1);
0041c36e              
0041c37d              if ((*(uint32_t*)((char*)ebx_1 + 0x14) & 0x80000000) == 0x80000000)
0041c37d              {
0041c37f                  void* ecx_5 = *(uint32_t*)((char*)ebx_1 + 0x10);
0041c37f                  
0041c384                  if (ecx_5 != 0)
0041c384                  {
0041c386                      int32_t i_2 = *(uint32_t*)((char*)ecx_5 - 4);
0041c38c                      void* edi_1 = ((char*)ecx_5 + (i_2 << 2));
0041c38c                      
0041c394                      if ((i_2 - 1) >= 0)
0041c394                      {
0041c397                          int32_t i_1 = i_2;
0041c3c7                          int32_t i;
0041c3c7                          
0041c3c7                          do
0041c3c7                          {
0041c3a0                              int32_t esi_3 = *(uint32_t*)((char*)edi_1 - 4);
0041c3a3                              edi_1 -= 4;
0041c3a3                              
0041c3b9                              if ((InterlockedDecrement((esi_3 - 0x10)) == 0 && esi_3 != 0x14))
0041c3c1                                  **(uint32_t**)(esi_3 - 0x14)(1);
0041c3c1                              
0041c3c3                              i = i_1;
0041c3c3                              i_1 -= 1;
0041c3c7                          } while (i != 1);
0041c394                      }
0041c394                      
0041c3ce                      operator delete[](((char*)ecx_5 - 4));
0041c384                  }
0041c37d              }
0041c37d              
0041c3d7              operator delete(ebx_1);
0041c34a          }
0041c2eb      }
0041c2e0  }

0041c39d                                                                                         8d 49 00                               .I.
0041c3f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0041c400  void* __thiscall HashTable<unsigned long,DBTypeDef,0>::`scalar deleting destructor'(class HashTable<unsigned long,DBTypeDef,0>* this, uint32_t arg2)

0041c400  {
0041c409      this->vtable = 0x7954d4;
0041c40f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBTypeDef> *,0>::delete_contents(&this->m_intrusiveTable);
0041c414      class HashTableData<unsigned long,DBTypeDef>** m_buckets = this->m_intrusiveTable.m_buckets;
0041c404      this->m_intrusiveTable.vtable = 0x7954d0;
0041c404      
0041c422      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0041c425          operator delete[](m_buckets);
0041c425      
0041c404      this->m_intrusiveTable.m_buckets = nullptr;
0041c404      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0041c404      this->m_intrusiveTable.m_numBuckets = 0;
0041c404      this->m_intrusiveTable.m_numElements = 0;
0041c404      
0041c440      if ((arg2 & 1) != 0)
0041c443          operator delete(this);
0041c443      
0041c44f      return this;
0041c400  }

0041c452                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0041c460  uint32_t __stdcall MasterDBMap::DivineType_Internal(class MasterDBMap const* this @ ecx, class IDClass<_tagDataID,32,0> arg2) __pure

0041c460  {
0041c469      if (arg2 <= 0x1400ffff)
0041c469      {
0041c474          if (arg2 >= 0x14000000)
0041c47b              return 0x1d;
0041c47b          
0041c483          if (arg2 <= 0xe00000d)
0041c483          {
0041c489              if (arg2 >= 0xe00000d)
0041c490                  return 0x12;
0041c490              
0041c498              if (arg2 <= 0x7ffffff)
0041c498              {
0041c4a3                  if (arg2 >= 0x6000000)
0041c4aa                      return 0xc;
0041c4aa                  
0041c4b2                  if (arg2 <= 0x300ffff)
0041c4b2                  {
0041c4b9                      if (arg2 >= 0x3000000)
0041c4c0                          return 8;
0041c4c0                      
0041c4c8                      if (arg2 <= 0x200ffff)
0041c4c8                      {
0041c4d3                          if (arg2 >= 0x2000000)
0041c4da                              return 7;
0041c4da                          
0041c4e2                          if (arg2 <= 0x100ffff)
0041c4f5                              return (((arg2 - arg2) & 0xfffffffa) + 6);
0041c4c8                      }
0041c4b2                  }
0041c4b2                  else if (arg2 <= 0x5ffffff)
0041c4fd                  {
0041c508                      if (arg2 >= 0x5000000)
0041c50f                          return 0xb;
0041c50f                      
0041c517                      if (arg2 <= 0x400ffff)
0041c52a                          return (((arg2 - arg2) & 0xfffffff6) + 0xa);
0041c4fd                  }
0041c498              }
0041c498              else if (arg2 <= 0xa00ffff)
0041c532              {
0041c539                  if (arg2 >= 0xa000000)
0041c540                      return 0xf;
0041c540                  
0041c548                  if (arg2 <= 0x900ffff)
0041c548                  {
0041c553                      if (arg2 >= 0x9000000)
0041c55a                          return 0xe;
0041c55a                      
0041c562                      if (arg2 <= 0x800ffff)
0041c575                          return (((arg2 - arg2) & 0xfffffff3) + 0xd);
0041c548                  }
0041c532              }
0041c532              else if (arg2 <= 0xe000007)
0041c57d              {
0041c583                  if (arg2 >= 0xe000007)
0041c58a                      return 0x11;
0041c58a                  
0041c592                  if (arg2 <= 0xd00ffff)
0041c5a5                      return (((arg2 - arg2) & 0xfffffff0) + 0x10);
0041c57d              }
0041c483          }
0041c483          else if (arg2 <= 0xf00ffff)
0041c5ad          {
0041c5b4              if (arg2 >= 0xf000000)
0041c5bb                  return 0x18;
0041c5bb              
0041c5c3              if (arg2 <= 0xe00001f)
0041c5c3              {
0041c5c5                  if (arg2 >= 0xe00001f)
0041c5cc                      return 0x15;
0041c5cc                  
0041c5d4                  if (arg2 <= 0xe00001e)
0041c5d4                  {
0041c5da                      if (arg2 >= 0xe00001e)
0041c5e1                          return 0x14;
0041c5e1                      
0041c5e4                      bool c_5 = arg2 < 0xe00001a;
0041c5e4                      
0041c5e9                      if ((arg2 == 0xe00001a || c_5))
0041c5f7                          return (((arg2 - arg2) & 0xffffffed) + 0x13);
0041c5d4                  }
0041c5c3              }
0041c5c3              else if (arg2 <= 0xe02ffff)
0041c5ff              {
0041c60a                  if (arg2 >= 0xe020000)
0041c611                      return 0x17;
0041c611                  
0041c614                  bool c_6 = arg2 < 0xe000020;
0041c614                  
0041c619                  if ((arg2 == 0xe000020 || c_6))
0041c627                      return (((arg2 - arg2) & 0xffffffea) + 0x16);
0041c5ff              }
0041c5ad          }
0041c5ad          else if (arg2 <= 0x1200ffff)
0041c62f          {
0041c636              if (arg2 >= 0x12000000)
0041c63d                  return 0x1b;
0041c63d              
0041c645              if (arg2 <= 0x1100ffff)
0041c645              {
0041c650                  if (arg2 >= 0x11000000)
0041c657                      return 0x1a;
0041c657                  
0041c65f                  if (arg2 <= 0x1000ffff)
0041c672                      return (((arg2 - arg2) & 0xffffffe7) + 0x19);
0041c645              }
0041c62f          }
0041c62f          else if (arg2 <= 0x1300ffff)
0041c68d              return (((arg2 - arg2) & 0xffffffe4) + 0x1c);
0041c469      }
0041c469      else if (arg2 <= 0x2600ffff)
0041c695      {
0041c6a0          if (arg2 >= 0x26000000)
0041c6a7              return 0x27;
0041c6a7          
0041c6af          if (arg2 <= 0x2000ffff)
0041c6af          {
0041c6ba              if (arg2 >= 0x20000000)
0041c6c1                  return 0x22;
0041c6c1              
0041c6c9              if (arg2 <= 0x17ffffff)
0041c6c9              {
0041c6d0                  if (arg2 >= 0x17000000)
0041c6d7                      return 0x20;
0041c6d7                  
0041c6df                  if (arg2 <= 0x16ffffff)
0041c6df                  {
0041c6ea                      if (arg2 >= 0x16000000)
0041c6f1                          return 0x1f;
0041c6f1                      
0041c6f9                      if (arg2 <= 0x15ffffff)
0041c70c                          return (((arg2 - arg2) & 0xffffffe2) + 0x1e);
0041c6df                  }
0041c6c9              }
0041c6c9              else if (arg2 <= 0x19ffffff)
0041c714              {
0041c71f                  if (arg2 >= 0x19000000)
0041c726                      return 0x43;
0041c726                  
0041c72e                  if (arg2 <= 0x18ffffff)
0041c741                      return (((arg2 - arg2) & 0xffffffdf) + 0x21);
0041c714              }
0041c6af          }
0041c6af          else if (arg2 <= 0x24ffffff)
0041c749          {
0041c750              if (arg2 >= 0x23000000)
0041c757                  return 0x25;
0041c757              
0041c75f              if (arg2 <= 0x22ffffff)
0041c75f              {
0041c76a                  if (arg2 >= 0x22000000)
0041c771                      return 0x24;
0041c771                  
0041c779                  if (arg2 <= 0x21ffffff)
0041c78c                      return (((arg2 - arg2) & 0xffffffdd) + 0x23);
0041c75f              }
0041c749          }
0041c749          else if (arg2 <= 0x25ffffff)
0041c7a7              return (((arg2 - arg2) & 0xffffffda) + 0x26);
0041c695      }
0041c695      else if (arg2 <= 0x39ffffff)
0041c7af      {
0041c7ba          if (arg2 >= 0x39000000)
0041c7c1              return 0x2d;
0041c7c1          
0041c7c9          if (arg2 <= 0x3200ffff)
0041c7c9          {
0041c7d0              if (arg2 >= 0x32000000)
0041c7d7                  return 0x2a;
0041c7d7              
0041c7df              if (arg2 <= 0x3100ffff)
0041c7df              {
0041c7ea                  if (arg2 >= 0x31000000)
0041c7f1                      return 0x29;
0041c7f1                  
0041c7f9                  if (arg2 <= 0x27ffffff)
0041c80c                      return (((arg2 - arg2) & 0xffffffd8) + 0x28);
0041c7df              }
0041c7c9          }
0041c7c9          else if (arg2 <= 0x3400ffff)
0041c814          {
0041c81f              if (arg2 >= 0x34000000)
0041c826                  return 0x2c;
0041c826              
0041c82e              if (arg2 <= 0x3300ffff)
0041c83d                  return (((arg2 - arg2) & 0xffffffd5) + 0x2b);
0041c814          }
0041c7af      }
0041c7af      else if (arg2 <= 0x41ffffff)
0041c845      {
0041c84c          if (arg2 >= 0x41000000)
0041c853              return 0x30;
0041c853          
0041c85b          if (arg2 <= 0x40ffffff)
0041c85b          {
0041c862              if (arg2 >= 0x40001000)
0041c869                  return 0x2f;
0041c869              
0041c871              if (arg2 <= 0x40000fff)
0041c880                  return (((arg2 - arg2) & 0xffffffd2) + 0x2e);
0041c85b          }
0041c845      }
0041c845      else if (arg2 <= 0x7fffffff)
0041c897          return (((arg2 - arg2) & 0xffffffcf) + 0x31);
0041c897      
0041c89c      return 0;
0041c460  }

0041c89f                                                                                               90                                 .

0041c8a0  void __fastcall PStringBase<char>::tolower(class PStringBase<char>* this)

0041c8a0  {
0041c8a3      PStringBase<char>::break_reference(this);
0041c8ab      _strlwr(this->m_charbuffer);
0041c8a0  }

0041c8b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0041c8c0  uint32_t __stdcall MasterDBMap::DivineType_Internal(class MasterDBMap const* this @ ecx, class PStringBase<char> const* arg2)

0041c8c0  {
0041c8c0      class PStringBase<char>* eax_156 = arg2;
0041c8ca      int32_t ebx;
0041c8ca      int32_t var_e8 = ebx;
0041c8cb      void* esi;
0041c8cb      void* var_ec = esi;
0041c8cc      void* edi;
0041c8cc      void* var_f0 = edi;
0041c8d3      class PStringBase<char> __return;
0041c8d3      PSUtils::get_extension(&__return, eax_156);
0041c8df      PStringBase<char>::break_reference(&__return);
0041c8e9      _strlwr(__return);
0041c8ef      class PStringBase<char> __return_1 = __return;
0041c8f3      uint32_t eax = *(uint32_t*)(__return_1 - 8);
0041c8f6      int32_t* esp_1 = &var_f0;
0041c8f6      
0041c8fc      if (eax == 0xffffffff)
0041c8fc      {
0041c8ff          eax = compute_str_hash(__return_1);
0041c904          *(uint32_t*)(__return_1 - 8) = eax;
0041c907          __return_1 = __return;
0041c90b          esp_1 = &var_f0;
0041c8fc      }
0041c8fc      
0041c919      void* var_e0;
0041c919      int32_t var_dc;
0041c919      void* var_d4;
0041c919      int32_t eax_5;
0041c919      int32_t* ecx_3;
0041c919      
0041c919      if (eax > 0x356c3)
0041c919      {
0041d2f0          void* var_64;
0041d2f0          int32_t eax_107;
0041d2f0          int32_t eax_114;
0041d2f0          int32_t* ecx_127;
0041d2f0          int32_t* ecx_137;
0041d2f0          
0041d2f0          if (eax > 0x34b040)
0041d2f0          {
0041d7aa              int32_t var_2c;
0041d7aa              
0041d7aa              if (eax > 0xaba5bae)
0041d7aa              {
0041dbbf                  int32_t var_c;
0041dbbf                  int32_t var_4;
0041dbbf                  
0041dbbf                  if (eax == 0xb071420)
0041dbbf                  {
0041dc1f                      char const* const var_f4_114 = ".actionmap";
0041dc2b                      PStringBase<char>::PStringBase<char>(&var_4, ".actionmap");
0041dc3d                      int32_t eax_151 = _stricmp(__return, var_4);
0041dc43                      esp_1 = &var_e8;
0041dc4f                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0041dc4f                      
0041dc56                      if (eax_151 == 0)
0041dc56                      {
0041dc5c                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041dc6f                          return 0x27;
0041dc56                      }
0041dc56                      
0041dc72                      __return_1 = esp_1[3];
0041dbbf                  }
0041dbbf                  else if (eax == 0xba55039)
0041dbc6                  {
0041dbcc                      char const* const var_f4_112 = ".stt_ansi";
0041dbd8                      PStringBase<char>::PStringBase<char>(&var_c, ".stt_ansi");
0041dbea                      eax_107 = _stricmp(__return, var_c);
0041dbf0                      ecx_127 = &var_4;
0041dbf0                      goto label_41dbf7;
0041dbc6                  }
0041da3b                  int32_t var_14;
0041da3b                  
0041da3b                  if (eax == 0xafeb0d8)
0041da3b                  {
0041db63                      char const* const var_f4_110 = ".rendermesh";
0041db6f                      PStringBase<char>::PStringBase<char>(&var_14, ".rendermesh");
0041db81                      int32_t eax_147 = _stricmp(__return, var_14);
0041db87                      esp_1 = &var_e8;
0041db93                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0041db93                      
0041db9a                      if (eax_147 == 0)
0041db9a                      {
0041dba4                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041dbb7                          return 0x43;
0041db9a                      }
0041db9a                      
0041dc72                      __return_1 = esp_1[3];
0041da3b                  }
0041da3b                  else
0041da3b                  {
0041da46                      int32_t var_1c;
0041da46                      
0041da46                      if (eax == 0xac8c4c5)
0041da46                      {
0041db0c                          char const* const var_f4_108 = ".surface";
0041db18                          PStringBase<char>::PStringBase<char>(&var_1c, ".surface");
0041db2a                          int32_t eax_144 = _stricmp(__return, var_1c);
0041db30                          esp_1 = &var_e8;
0041db3c                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14);
0041db3c                          
0041db43                          if (eax_144 == 0)
0041db43                          {
0041db4d                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041db60                              return 0xd;
0041db43                          }
0041db43                          
0041dc72                          __return_1 = esp_1[3];
0041da46                      }
0041da46                      else
0041da46                      {
0041da51                          int32_t var_24;
0041da51                          
0041da51                          if (eax == 0xacf8915)
0041da51                          {
0041dab5                              char const* const var_f4_106 = ".rtexture";
0041dac1                              PStringBase<char>::PStringBase<char>(&var_24, ".rtexture");
0041dad3                              int32_t eax_141 = _stricmp(__return, var_24);
0041dad9                              esp_1 = &var_e8;
0041dae5                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
0041dae5                              
0041daec                              if (eax_141 == 0)
0041daec                              {
0041daf6                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041db09                                  return 0x1e;
0041daec                              }
0041daec                              
0041dc72                              __return_1 = esp_1[3];
0041da51                          }
0041da51                          else if (eax == 0xacfbfd5)
0041da58                          {
0041da5e                              char const* const var_f4_104 = ".texture";
0041da6a                              PStringBase<char>::PStringBase<char>(&var_2c, ".texture");
0041da7c                              int32_t eax_139 = _stricmp(__return, var_2c);
0041da82                              esp_1 = &var_e8;
0041da8e                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_24);
0041da8e                              
0041da95                              if (eax_139 == 0)
0041da95                              {
0041da9f                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041dab2                                  return 0xb;
0041da95                              }
0041da95                              
0041dc72                              __return_1 = esp_1[3];
0041da58                          }
0041da46                      }
0041da3b                  }
0041d7aa              }
0041d7aa              else
0041d7aa              {
0041d7b0                  int32_t var_34;
0041d7b0                  
0041d7b0                  if (eax == 0xaba5bae)
0041d7b0                  {
0041da00                      char const* const var_f4_102 = ".stt_bin";
0041da0c                      PStringBase<char>::PStringBase<char>(&var_34, ".stt_bin");
0041da1e                      eax_107 = _stricmp(__return, var_34);
0041da24                      ecx_127 = &var_2c;
0041dbf7                  label_41dbf7:
0041dbf7                      esp_1 = &var_e8;
0041dbfc                      PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_127);
0041dbfc                      
0041dc03                      if (eax_107 == 0)
0041dc03                      {
0041dc09                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041dc1c                          return 0x25;
0041dc03                      }
0041dc03                      
0041dc72                      __return_1 = esp_1[3];
0041d7b0                  }
0041d7b0                  else
0041d7b0                  {
0041d7bb                      int32_t var_44;
0041d7bb                      
0041d7bb                      if (eax > 0x4657c30)
0041d7bb                      {
0041d945                          int32_t var_3c;
0041d945                          
0041d945                          if (eax == 0x51d03b0)
0041d945                          {
0041d9a9                              char const* const var_f4_100 = ".keymap";
0041d9b5                              PStringBase<char>::PStringBase<char>(&var_3c, ".keymap");
0041d9c7                              int32_t eax_135 = _stricmp(__return, var_3c);
0041d9cd                              esp_1 = &var_e8;
0041d9d9                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_34);
0041d9d9                              
0041d9e0                              if (eax_135 == 0)
0041d9e0                              {
0041d9ea                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d9fd                                  return 0x1d;
0041d9e0                              }
0041d9e0                              
0041dc72                              __return_1 = esp_1[3];
0041d945                          }
0041d945                          else if (eax == 0xa778f2c)
0041d94c                          {
0041d952                              char const* const var_f4_98 = ".font_local";
0041d95e                              PStringBase<char>::PStringBase<char>(&var_44, ".font_local");
0041d970                              int32_t eax_133 = _stricmp(__return, var_44);
0041d976                              esp_1 = &var_e8;
0041d982                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c);
0041d982                              
0041d989                              if (eax_133 == 0)
0041d989                              {
0041d993                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d9a6                                  return 0x2f;
0041d989                              }
0041d989                              
0041dc72                              __return_1 = esp_1[3];
0041d94c                          }
0041d7bb                      }
0041d7bb                      else
0041d7bb                      {
0041d7c1                          int32_t var_4c;
0041d7c1                          
0041d7c1                          if (eax == 0x4657c30)
0041d7c1                          {
0041d8e9                              char const* const var_f4_96 = ".monprop";
0041d8f5                              PStringBase<char>::PStringBase<char>(&var_4c, ".monprop");
0041d907                              int32_t eax_130 = _stricmp(__return, var_4c);
0041d90d                              esp_1 = &var_e8;
0041d919                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_44);
0041d919                              
0041d920                              if (eax_130 == 0)
0041d920                              {
0041d92a                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d93d                                  return 0x17;
0041d920                              }
0041d920                              
0041dc72                              __return_1 = esp_1[3];
0041d7c1                          }
0041d7c1                          else
0041d7c1                          {
0041d7cc                              int32_t var_54;
0041d7cc                              
0041d7cc                              if (eax == 0x34d654)
0041d7cc                              {
0041d892                                  char const* const var_f4_94 = ".font";
0041d89e                                  PStringBase<char>::PStringBase<char>(&var_54, ".font");
0041d8b0                                  int32_t eax_127 = _stricmp(__return, var_54);
0041d8b6                                  esp_1 = &var_e8;
0041d8c2                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4c);
0041d8c2                                  
0041d8c9                                  if (eax_127 == 0)
0041d8c9                                  {
0041d8d3                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d8e6                                      return 0x2e;
0041d8c9                                  }
0041d8c9                                  
0041dc72                                  __return_1 = esp_1[3];
0041d7cc                              }
0041d7cc                              else
0041d7cc                              {
0041d7d7                                  int32_t var_5c;
0041d7d7                                  
0041d7d7                                  if (eax == 0x357384)
0041d7d7                                  {
0041d83b                                      char const* const var_f4_92 = ".pmat";
0041d847                                      PStringBase<char>::PStringBase<char>(&var_5c, ".pmat");
0041d859                                      eax_114 = _stricmp(__return, var_5c);
0041d85f                                      ecx_137 = &var_54;
0041d85f                                      goto label_41d866;
0041d7d7                                  }
0041d7d7                                  
0041d7de                                  if (eax == 0x35a795f)
0041d7de                                  {
0041d7e4                                      char const* const var_f4_90 = ".taboo";
0041d7f0                                      PStringBase<char>::PStringBase<char>(&var_64, ".taboo");
0041d802                                      int32_t eax_123 = _stricmp(__return, var_64);
0041d808                                      esp_1 = &var_e8;
0041d814                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_5c);
0041d814                                      
0041d81b                                      if (eax_123 == 0)
0041d81b                                      {
0041d825                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d838                                          return 0x14;
0041d81b                                      }
0041d81b                                      
0041dc72                                      __return_1 = esp_1[3];
0041d7de                                  }
0041d7cc                              }
0041d7c1                          }
0041d7bb                      }
0041d7b0                  }
0041d7aa              }
0041d2f0          }
0041d2f0          else
0041d2f0          {
0041d2f6              int32_t var_6c;
0041d2f6              
0041d2f6              if (eax == 0x34b040)
0041d2f6              {
0041d734                  char const* const var_f4_88 = ".dimp";
0041d740                  PStringBase<char>::PStringBase<char>(&var_6c, ".dimp");
0041d752                  int32_t eax_119 = _stricmp(__return, var_6c);
0041d764                  char ebx_38 = ((int8_t)-(eax_119));
0041d768                  int32_t* esi_73 = ((char*)var_64 - 0x14);
0041d76e                  var_ec = &esi_73[1];
0041d76e                  esp_1 = &var_ec;
0041d76e                  
0041d779                  if ((InterlockedDecrement(var_ec) == 0 && esi_73 != 0))
0041d779                  {
0041d77b                      int32_t edx_31 = *(uint32_t*)esi_73;
0041d77d                      var_f0 = 1;
0041d781                      *(uint32_t*)edx_31(var_f0);
0041d781                      esp_1 = &var_ec;
0041d779                  }
0041d779                  
0041d785                  if ((ebx_38 - ebx_38) != 0xff)
0041d785                  {
0041d78f                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_e0);
0041d7a2                      return 0x28;
0041d785                  }
0041d785                  
0041dc72                  __return_1 = esp_1[3];
0041d2f6              }
0041d2f6              else
0041d2f6              {
0041d301                  int32_t var_9c;
0041d301                  
0041d301                  if (eax > 0x35aa9)
0041d301                  {
0041d574                      int32_t var_7c;
0041d574                      
0041d574                      if (eax > 0x35bfc)
0041d574                      {
0041d6af                          int32_t var_74;
0041d6af                          
0041d6af                          if (eax == 0x35d86)
0041d6af                          {
0041d6e3                              char const* const var_f4_86 = ".wav";
0041d6ef                              PStringBase<char>::PStringBase<char>(&var_74, ".wav");
0041d6fe                              int32_t eax_116 = _stricmp(__return, var_74);
0041d704                              esp_1 = &var_e8;
0041d70d                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_6c);
0041d70d                              
0041d714                              if (eax_116 == 0)
0041d714                              {
0041d71e                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d731                                  return 0xf;
0041d714                              }
0041d714                              
0041dc72                              __return_1 = esp_1[3];
0041d6af                          }
0041d6af                          else if (eax == 0x34a963)
0041d6b6                          {
0041d6bc                              char const* const var_f4_84 = ".dbpc";
0041d6c5                              PStringBase<char>::PStringBase<char>(&var_7c, ".dbpc");
0041d6d4                              eax_114 = _stricmp(__return, var_7c);
0041d6da                              ecx_137 = &var_74;
0041d866                          label_41d866:
0041d866                              esp_1 = &var_e8;
0041d86b                              PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_137);
0041d86b                              
0041d872                              if (eax_114 == 0)
0041d872                              {
0041d87c                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d88f                                  return 0x31;
0041d872                              }
0041d872                              
0041dc72                              __return_1 = esp_1[3];
0041d6b6                          }
0041d574                      }
0041d574                      else
0041d574                      {
0041d57a                          int32_t var_84;
0041d57a                          
0041d57a                          if (eax == 0x35bfc)
0041d57a                          {
0041d65c                              char const* const var_f4_82 = ".uil";
0041d665                              PStringBase<char>::PStringBase<char>(&var_84, ".uil");
0041d674                              int32_t eax_112 = _stricmp(__return, var_84);
0041d67a                              esp_1 = &var_e8;
0041d683                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_7c);
0041d683                              
0041d68a                              if (eax_112 == 0)
0041d68a                              {
0041d694                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d6a7                                  return 0x23;
0041d68a                              }
0041d68a                              
0041dc72                              __return_1 = esp_1[3];
0041d57a                          }
0041d57a                          else
0041d57a                          {
0041d585                              int32_t var_8c;
0041d585                              
0041d585                              if (eax == 0x35ab2)
0041d585                              {
0041d60e                                  char const* const var_f4_80 = ".str";
0041d617                                  PStringBase<char>::PStringBase<char>(&var_8c, ".str");
0041d626                                  int32_t eax_109 = _stricmp(__return, var_8c);
0041d62c                                  esp_1 = &var_e8;
0041d635                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_84);
0041d635                                  
0041d63c                                  if (eax_109 == 0)
0041d63c                                  {
0041d646                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d659                                      return 0x29;
0041d63c                                  }
0041d63c                                  
0041dc72                                  __return_1 = esp_1[3];
0041d585                              }
0041d585                              else
0041d585                              {
0041d58e                                  int32_t var_94;
0041d58e                                  
0041d58e                                  if (eax == 0x35ab4)
0041d58e                                  {
0041d5e7                                      char const* const var_f4_78 = ".stt";
0041d5f0                                      PStringBase<char>::PStringBase<char>(&var_94, ".stt");
0041d5ff                                      eax_107 = _stricmp(__return, var_94);
0041d605                                      ecx_127 = &var_8c;
0041d609                                      goto label_41dbf7;
0041d58e                                  }
0041d58e                                  
0041d593                                  if (eax == 0x35ad1)
0041d593                                  {
0041d599                                      char const* const var_f4_76 = ".tga";
0041d5a2                                      PStringBase<char>::PStringBase<char>(&var_9c, ".tga");
0041d5b1                                      eax_5 = _stricmp(__return, var_9c);
0041d5b7                                      ecx_3 = &var_94;
0041d5b7                                      goto label_41d5bb;
0041d593                                  }
0041d585                              }
0041d57a                          }
0041d574                      }
0041d301                  }
0041d301                  else
0041d301                  {
0041d307                      int32_t var_a4;
0041d307                      
0041d307                      if (eax == 0x35aa9)
0041d307                      {
0041d521                          char const* const var_f4_74 = ".sti";
0041d52a                          PStringBase<char>::PStringBase<char>(&var_a4, ".sti");
0041d539                          int32_t eax_100 = _stricmp(__return, var_a4);
0041d53f                          esp_1 = &var_e8;
0041d548                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
0041d548                          
0041d54f                          if (eax_100 == 0)
0041d54f                          {
0041d559                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d56c                              return 0x30;
0041d54f                          }
0041d54f                          
0041dc72                          __return_1 = esp_1[3];
0041d307                      }
0041d307                      else
0041d307                      {
0041d478                          int32_t var_b4;
0041d478                          int32_t var_ac;
0041d478                          
0041d478                          if (eax == 0x359c4)
0041d478                          {
0041d4d3                              char const* const var_f4_72 = ".set";
0041d4dc                              PStringBase<char>::PStringBase<char>(&var_ac, ".set");
0041d4eb                              int32_t eax_97 = _stricmp(__return, var_ac);
0041d4f1                              esp_1 = &var_e8;
0041d4fa                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a4);
0041d4fa                              
0041d501                              if (eax_97 == 0)
0041d501                              {
0041d50b                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d51e                                  return 7;
0041d501                              }
0041d501                              
0041dc72                              __return_1 = esp_1[3];
0041d478                          }
0041d478                          else if (eax == 0x35aa2)
0041d47f                          {
0041d485                              char const* const var_f4_70 = ".stb";
0041d48e                              PStringBase<char>::PStringBase<char>(&var_b4, ".stb");
0041d49d                              int32_t eax_95 = _stricmp(__return, var_b4);
0041d4a3                              esp_1 = &var_e8;
0041d4ac                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_ac);
0041d4ac                              
0041d4b3                              if (eax_95 == 0)
0041d4b3                              {
0041d4bd                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d4d0                                  return 0x22;
0041d4b3                              }
0041d4b3                              
0041dc72                              __return_1 = esp_1[3];
0041d47f                          }
0041d318                          int32_t var_bc;
0041d318                          
0041d318                          if (eax == 0x3599e)
0041d318                          {
0041d425                              char const* const var_f4_68 = ".scn";
0041d42e                              PStringBase<char>::PStringBase<char>(&var_bc, ".scn");
0041d43d                              int32_t eax_92 = _stricmp(__return, var_bc);
0041d443                              esp_1 = &var_e8;
0041d44c                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b4);
0041d44c                              
0041d453                              if (eax_92 == 0)
0041d453                              {
0041d45d                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d470                                  return 0x1b;
0041d453                              }
0041d453                              
0041dc72                              __return_1 = esp_1[3];
0041d318                          }
0041d318                          else
0041d318                          {
0041d323                              int32_t var_c4;
0041d323                              
0041d323                              if (eax == 0x356c4)
0041d323                              {
0041d3d7                                  char const* const var_f4_66 = ".pet";
0041d3e0                                  PStringBase<char>::PStringBase<char>(&var_c4, ".pet");
0041d3ef                                  int32_t eax_89 = _stricmp(__return, var_c4);
0041d3f5                                  esp_1 = &var_e8;
0041d3fe                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_bc);
0041d3fe                                  
0041d405                                  if (eax_89 == 0)
0041d405                                  {
0041d40f                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d422                                      return 0x2c;
0041d405                                  }
0041d405                                  
0041dc72                                  __return_1 = esp_1[3];
0041d323                              }
0041d323                              else
0041d323                              {
0041d32e                                  int32_t var_cc;
0041d32e                                  
0041d32e                                  if (eax == 0x357a4)
0041d32e                                  {
0041d389                                      char const* const var_f4_64 = ".pst";
0041d392                                      PStringBase<char>::PStringBase<char>(&var_cc, ".pst");
0041d3a1                                      int32_t eax_87 = _stricmp(__return, var_cc);
0041d3a7                                      esp_1 = &var_e8;
0041d3b0                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c4);
0041d3b0                                      
0041d3b7                                      if (eax_87 == 0)
0041d3b7                                      {
0041d3c1                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d3d4                                          return 0x18;
0041d3b7                                      }
0041d3b7                                      
0041dc72                                      __return_1 = esp_1[3];
0041d32e                                  }
0041d32e                                  else if (eax == 0x358de)
0041d335                                  {
0041d33b                                      char const* const var_f4_62 = ".rgn";
0041d344                                      PStringBase<char>::PStringBase<char>(&var_d4, ".rgn");
0041d353                                      int32_t eax_84 = _stricmp(__return, var_d4);
0041d359                                      esp_1 = &var_e8;
0041d362                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_cc);
0041d362                                      
0041d369                                      if (eax_84 == 0)
0041d369                                      {
0041d373                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d386                                          return 0x1c;
0041d369                                      }
0041d369                                      
0041dc72                                      __return_1 = esp_1[3];
0041d335                                  }
0041d323                              }
0041d318                          }
0041d307                      }
0041d301                  }
0041d2f6              }
0041d2f0          }
0041c919      }
0041c919      else if (eax == 0x356c3)
0041c91f      {
0041d26f          char const* const var_f4_59 = ".pes";
0041d278          PStringBase<char>::PStringBase<char>(&var_dc, ".pes");
0041d287          int32_t eax_78 = _stricmp(__return, var_dc);
0041d296          char ebx_24 = ((int8_t)-(eax_78));
0041d29a          int32_t* esi_46 = ((char*)var_d4 - 0x14);
0041d2a0          var_ec = &esi_46[1];
0041d2a0          esp_1 = &var_ec;
0041d2a0          
0041d2ab          if ((InterlockedDecrement(var_ec) == 0 && esi_46 != 0))
0041d2ab          {
0041d2ad              int32_t edx_20 = *(uint32_t*)esi_46;
0041d2af              var_f0 = 1;
0041d2b3              *(uint32_t*)edx_20(var_f0);
0041d2b3              esp_1 = &var_ec;
0041d2ab          }
0041d2ab          
0041d2b7          if ((ebx_24 - ebx_24) != 0xff)
0041d2b7          {
0041d2c1              int32_t* esi_48 = ((char*)var_e0 - 0x14);
0041d2c7              var_f0 = &esi_48[1];
0041d2c7              
0041d2d0              if ((InterlockedDecrement(var_f0) == 0 && esi_48 != 0))
0041d2d0              {
0041d2d4                  int32_t var_f4_61 = 1;
0041d2d8                  **(uint32_t**)esi_48(1);
0041d2d0              }
0041d2d0              
0041d2e8              return 0x2b;
0041d2b7          }
0041d2b7          
0041dc72          __return_1 = esp_1[3];
0041c91f      }
0041c91f      else
0041c91f      {
0041c92a          int32_t var_d8;
0041c92a          int32_t var_a0;
0041c92a          int32_t var_70;
0041c92a          int32_t var_50;
0041c92a          int32_t var_38;
0041c92a          int32_t var_28;
0041c92a          int32_t var_18;
0041c92a          int32_t var_8;
0041c92a          
0041c92a          if (eax > 0x34c44)
0041c92a          {
0041ce07              int32_t var_80;
0041ce07              int32_t var_40;
0041ce07              int32_t var_20;
0041ce07              
0041ce07              if (eax > 0x35289)
0041ce07              {
0041d1bd                  if (eax == 0x3558a)
0041d1bd                  {
0041d221                      char const* const var_f4_57 = ".obj";
0041d22a                      PStringBase<char>::PStringBase<char>(&var_e0, ".obj");
0041d239                      int32_t eax_75 = _stricmp(__return, var_e0);
0041d23f                      esp_1 = &var_e8;
0041d248                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_d8);
0041d248                      
0041d24f                      if (eax_75 == 0)
0041d24f                      {
0041d259                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d26c                          return 6;
0041d24f                      }
0041d24f                      
0041dc72                      __return_1 = esp_1[3];
0041d1bd                  }
0041d1bd                  else if (eax == 0x3567c)
0041d1c4                  {
0041d1ca                      char const* const var_f4_55 = ".pal";
0041d1d6                      PStringBase<char>::PStringBase<char>(&var_20, ".pal");
0041d1e8                      int32_t eax_72 = _stricmp(__return, var_20);
0041d1ee                      esp_1 = &var_e8;
0041d1fa                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
0041d1fa                      
0041d201                      if (eax_72 == 0)
0041d201                      {
0041d20b                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d21e                          return 0xa;
0041d201                      }
0041d201                      
0041dc72                      __return_1 = esp_1[3];
0041d1c4                  }
0041d1c4                  
0041d04b                  int32_t var_78;
0041d04b                  
0041d04b                  if (eax == 0x354d4)
0041d04b                  {
0041d16a                      char const* const var_f4_53 = ".nft";
0041d173                      PStringBase<char>::PStringBase<char>(&var_78, ".nft");
0041d182                      int32_t eax_70 = _stricmp(__return, var_78);
0041d188                      esp_1 = &var_e8;
0041d191                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_70);
0041d191                      
0041d198                      if (eax_70 == 0)
0041d198                      {
0041d1a2                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d1b5                          return 0x16;
0041d198                      }
0041d198                      
0041dc72                      __return_1 = esp_1[3];
0041d04b                  }
0041d04b                  else if (eax == 0x3528f)
0041d056                  {
0041d113                      char const* const var_f4_51 = ".lbo";
0041d11f                      PStringBase<char>::PStringBase<char>(&var_40, ".lbo");
0041d131                      int32_t eax_67 = _stricmp(__return, var_40);
0041d137                      esp_1 = &var_e8;
0041d143                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_38);
0041d143                      
0041d14a                      if (eax_67 == 0)
0041d14a                      {
0041d154                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d167                          return 4;
0041d14a                      }
0041d14a                      
0041dc72                      __return_1 = esp_1[3];
0041d056                  }
0041d056                  else if (eax == 0x35384)
0041d061                  {
0041d0c5                      char const* const var_f4_49 = ".mat";
0041d0ce                      PStringBase<char>::PStringBase<char>(&var_80, ".mat");
0041d0dd                      int32_t eax_64 = _stricmp(__return, var_80);
0041d0e3                      esp_1 = &var_e8;
0041d0ec                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_78);
0041d0ec                      
0041d0f3                      if (eax_64 == 0)
0041d0f3                      {
0041d0fd                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d110                          return 0x1f;
0041d0f3                      }
0041d0f3                      
0041dc72                      __return_1 = esp_1[3];
0041d061                  }
0041d061                  else if (eax == 0x35472)
0041d068                  {
0041d06e                      char const* const var_f4_47 = ".mpr";
0041d07a                      PStringBase<char>::PStringBase<char>(&var_8, ".mpr");
0041d08c                      int32_t eax_62 = _stricmp(__return, var_8);
0041d092                      esp_1 = &var_e8;
0041d09e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_addr);
0041d09e                      
0041d0a5                      if (eax_62 == 0)
0041d0a5                      {
0041d0af                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d0c2                          return 0x2d;
0041d0a5                      }
0041d0a5                      
0041dc72                      __return_1 = esp_1[3];
0041d068                  }
0041ce07              }
0041ce07              else
0041ce07              {
0041ce0d                  int32_t var_88;
0041ce0d                  
0041ce0d                  if (eax == 0x35289)
0041ce0d                  {
0041cff2                      char const* const var_f4_45 = ".lbi";
0041cffb                      PStringBase<char>::PStringBase<char>(&var_88, ".lbi");
0041d00a                      int32_t eax_59 = _stricmp(__return, var_88);
0041d010                      esp_1 = &var_e8;
0041d019                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_80);
0041d019                      
0041d020                      if (eax_59 == 0)
0041d020                      {
0041d02a                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d03d                          return 2;
0041d020                      }
0041d020                      
0041dc72                      __return_1 = esp_1[3];
0041ce0d                  }
0041ce0d                  else
0041ce0d                  {
0041cf67                      int32_t var_90;
0041cf67                      int32_t var_48;
0041cf67                      
0041cf67                      if (eax == 0x35053)
0041cf67                      {
0041cf9b                          char const* const var_f4_43 = ".ins";
0041cfa7                          PStringBase<char>::PStringBase<char>(&var_48, ".ins");
0041cfb9                          int32_t eax_56 = _stricmp(__return, var_48);
0041cfbf                          esp_1 = &var_e8;
0041cfcb                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_40);
0041cfcb                          
0041cfd2                          if (eax_56 == 0)
0041cfd2                          {
0041cfdc                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cfef                              return 5;
0041cfd2                          }
0041cfd2                          
0041dc72                          __return_1 = esp_1[3];
0041cf67                      }
0041cf67                      else if (eax == 0x35167)
0041cf6e                      {
0041cf74                          char const* const var_f4_41 = ".jpg";
0041cf7d                          PStringBase<char>::PStringBase<char>(&var_90, ".jpg");
0041cf8c                          eax_5 = _stricmp(__return, var_90);
0041cf92                          ecx_3 = &var_88;
0041d5bb                      label_41d5bb:
0041d5bb                          esp_1 = &var_e8;
0041d5c0                          PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_3);
0041d5c0                          
0041d5c7                          if (eax_5 == 0)
0041d5c7                          {
0041d5d1                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041d5e4                              return 0xc;
0041d5c7                          }
0041d5c7                          
0041dc72                          __return_1 = esp_1[3];
0041cf6e                      }
0041cf6e                      
0041ce1e                      if (eax == 0x35040)
0041ce1e                      {
0041cf0b                          char const* const var_f4_39 = ".imp";
0041cf17                          PStringBase<char>::PStringBase<char>(&var_28, ".imp");
0041cf29                          int32_t eax_53 = _stricmp(__return, var_28);
0041cf2f                          esp_1 = &var_e8;
0041cf3b                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
0041cf3b                          
0041cf42                          if (eax_53 == 0)
0041cf42                          {
0041cf4c                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cf5f                              return 0x26;
0041cf42                          }
0041cf42                          
0041dc72                          __return_1 = esp_1[3];
0041ce1e                      }
0041ce1e                      else
0041ce1e                      {
0041ce29                          int32_t var_98;
0041ce29                          
0041ce29                          if (eax == 0x34c56)
0041ce29                          {
0041cebd                              char const* const var_f4_37 = ".env";
0041cec6                              PStringBase<char>::PStringBase<char>(&var_98, ".env");
0041ced5                              int32_t eax_50 = _stricmp(__return, var_98);
0041cedb                              esp_1 = &var_e8;
0041cee4                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_90);
0041cee4                              
0041ceeb                              if (eax_50 == 0)
0041ceeb                              {
0041cef5                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cf08                                  return 0x10;
0041ceeb                              }
0041ceeb                              
0041dc72                              __return_1 = esp_1[3];
0041ce29                          }
0041ce29                          else if (eax == 0x34f83)
0041ce34                          {
0041ce66                              char const* const var_f4_35 = ".hrc";
0041ce72                              PStringBase<char>::PStringBase<char>(&var_50, ".hrc");
0041ce84                              int32_t eax_48 = _stricmp(__return, var_50);
0041ce8a                              esp_1 = &var_e8;
0041ce96                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_48);
0041ce96                              
0041ce9d                              if (eax_48 == 0)
0041ce9d                              {
0041cea7                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041ceba                                  return 0x12;
0041ce9d                              }
0041ce9d                              
0041dc72                              __return_1 = esp_1[3];
0041ce34                          }
0041ce34                          else if (eax == 0x34fc6)
0041ce39                          {
0041ce3f                              char const* const var_f4_33 = ".iff";
0041ce48                              PStringBase<char>::PStringBase<char>(&var_a0, ".iff");
0041ce57                              eax_5 = _stricmp(__return, var_a0);
0041ce5d                              ecx_3 = &var_98;
0041ce61                              goto label_41d5bb;
0041ce39                          }
0041ce1e                      }
0041ce0d                  }
0041ce07              }
0041c92a          }
0041c92a          else
0041c92a          {
0041c930              int32_t var_10;
0041c930              
0041c930              if (eax == 0x34c44)
0041c930              {
0041cdab                  char const* const var_f4_31 = ".emt";
0041cdb7                  PStringBase<char>::PStringBase<char>(&var_18, ".emt");
0041cdc9                  int32_t eax_41 = _stricmp(__return, var_18);
0041cdcf                  esp_1 = &var_e8;
0041cddb                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
0041cddb                  
0041cde2                  if (eax_41 == 0)
0041cde2                  {
0041cdec                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cdff                      return 0x2a;
0041cde2                  }
0041cde2                  
0041dc72                  __return_1 = esp_1[3];
0041c930              }
0041c930              else
0041c930              {
0041c93b                  int32_t var_b8;
0041c93b                  int32_t var_60;
0041c93b                  int32_t var_30;
0041c93b                  
0041c93b                  if (eax > 0x34a2f)
0041c93b                  {
0041cbd7                      int32_t var_a8;
0041cbd7                      int32_t var_58;
0041cbd7                      
0041cbd7                      if (eax > 0x34ab7)
0041cbd7                      {
0041ccf9                          if (eax == 0x34b93)
0041ccf9                          {
0041cd5d                              char const* const var_f4_29 = ".dsc";
0041cd66                              PStringBase<char>::PStringBase<char>(&var_a8, ".dsc");
0041cd75                              int32_t eax_39 = _stricmp(__return, var_a8);
0041cd7b                              esp_1 = &var_e8;
0041cd84                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a0);
0041cd84                              
0041cd8b                              if (eax_39 == 0)
0041cd8b                              {
0041cd95                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cda8                                  return 0xe;
0041cd8b                              }
0041cd8b                              
0041dc72                              __return_1 = esp_1[3];
0041ccf9                          }
0041ccf9                          else if (eax == 0x34c40)
0041cd00                          {
0041cd06                              char const* const var_f4_27 = ".emp";
0041cd12                              PStringBase<char>::PStringBase<char>(&var_58, ".emp");
0041cd24                              int32_t eax_36 = _stricmp(__return, var_58);
0041cd2a                              esp_1 = &var_e8;
0041cd36                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
0041cd36                              
0041cd3d                              if (eax_36 == 0)
0041cd3d                              {
0041cd47                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cd5a                                  return 0x24;
0041cd3d                              }
0041cd3d                              
0041dc72                              __return_1 = esp_1[3];
0041cd00                          }
0041cbd7                      }
0041cbd7                      else
0041cbd7                      {
0041cbdd                          int32_t var_b0;
0041cbdd                          
0041cbdd                          if (eax == 0x34ab7)
0041cbdd                          {
0041cca6                              char const* const var_f4_25 = ".deg";
0041ccaf                              PStringBase<char>::PStringBase<char>(&var_b0, ".deg");
0041ccbe                              int32_t eax_33 = _stricmp(__return, var_b0);
0041ccc4                              esp_1 = &var_e8;
0041cccd                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a8);
0041cccd                              
0041ccd4                              if (eax_33 == 0)
0041ccd4                              {
0041ccde                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041ccf1                                  return 0x1a;
0041ccd4                              }
0041ccd4                              
0041dc72                              __return_1 = esp_1[3];
0041cbdd                          }
0041cbdd                          else if (eax == 0x34a73)
0041cbe8                          {
0041cc4f                              char const* const var_f4_23 = ".cps";
0041cc5b                              PStringBase<char>::PStringBase<char>(&var_30, ".cps");
0041cc6d                              int32_t eax_31 = _stricmp(__return, var_30);
0041cc73                              esp_1 = &var_e8;
0041cc7f                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_28);
0041cc7f                              
0041cc86                              if (eax_31 == 0)
0041cc86                              {
0041cc90                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cca3                                  return 0x11;
0041cc86                              }
0041cc86                              
0041dc72                              __return_1 = esp_1[3];
0041cbe8                          }
0041cbe8                          else
0041cbe8                          {
0041cbed                              if (eax == 0x34a99)
0041cbed                              {
0041cc28                                  char const* const var_f4_21 = ".csi";
0041cc31                                  PStringBase<char>::PStringBase<char>(&var_b8, ".csi");
0041cc40                                  eax_5 = _stricmp(__return, var_b8);
0041cc46                                  ecx_3 = &var_b0;
0041cc4a                                  goto label_41d5bb;
0041cbed                              }
0041cbed                              
0041cbf2                              if (eax == 0x34ab3)
0041cbf2                              {
0041cbf8                                  char const* const var_f4_19 = ".dds";
0041cc04                                  PStringBase<char>::PStringBase<char>(&var_60, ".dds");
0041cc16                                  eax_5 = _stricmp(__return, var_60);
0041cc1c                                  ecx_3 = &var_58;
0041cc23                                  goto label_41d5bb;
0041cbf2                              }
0041cbe8                          }
0041cbd7                      }
0041c93b                  }
0041c93b                  else
0041c93b                  {
0041c941                      int32_t var_c0;
0041c941                      
0041c941                      if (eax == 0x34a2f)
0041c941                      {
0041cb84                          char const* const var_f4_17 = ".clo";
0041cb8d                          PStringBase<char>::PStringBase<char>(&var_c0, ".clo");
0041cb9c                          int32_t eax_24 = _stricmp(__return, var_c0);
0041cba2                          esp_1 = &var_e8;
0041cbab                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b8);
0041cbab                          
0041cbb2                          if (eax_24 == 0)
0041cbb2                          {
0041cbbc                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cbcf                              return 0x19;
0041cbb2                          }
0041cbb2                          
0041dc72                          __return_1 = esp_1[3];
0041c941                      }
0041c941                      else
0041c941                      {
0041ca9b                          if (eax == 0x34830)
0041ca9b                          {
0041cb54                              char const* const var_f4_15 = ".alp";
0041cb60                              PStringBase<char>::PStringBase<char>(&var_10, ".alp");
0041cb72                              eax_5 = _stricmp(__return, var_10);
0041cb78                              ecx_3 = &var_8;
0041cb7f                              goto label_41d5bb;
0041ca9b                          }
0041ca9b                          
0041caa4                          int32_t var_c8;
0041caa4                          int32_t var_68;
0041caa4                          
0041caa4                          if (eax == 0x3484d)
0041caa4                          {
0041cb06                              char const* const var_f4_13 = ".anm";
0041cb0f                              PStringBase<char>::PStringBase<char>(&var_c8, ".anm");
0041cb1e                              int32_t eax_20 = _stricmp(__return, var_c8);
0041cb24                              esp_1 = &var_e8;
0041cb2d                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c0);
0041cb2d                              
0041cb34                              if (eax_20 == 0)
0041cb34                              {
0041cb3e                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cb51                                  return 8;
0041cb34                              }
0041cb34                              
0041dc72                              __return_1 = esp_1[3];
0041caa4                          }
0041caa4                          else if (eax == 0x34874)
0041caa9                          {
0041caaf                              char const* const var_f4_11 = ".bad";
0041cabb                              PStringBase<char>::PStringBase<char>(&var_68, ".bad");
0041cacd                              int32_t eax_18 = _stricmp(__return, var_68);
0041cad3                              esp_1 = &var_e8;
0041cadf                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_60);
0041cadf                              
0041cae6                              if (eax_18 == 0)
0041cae6                              {
0041caf0                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041cb03                                  return 0x13;
0041cae6                              }
0041cae6                              
0041dc72                              __return_1 = esp_1[3];
0041caa9                          }
0041caa9                          
0041c952                          int32_t var_d0;
0041c952                          
0041c952                          if (eax == 0x347eb)
0041c952                          {
0041ca48                              char const* const var_f4_9 = ".ahk";
0041ca51                              PStringBase<char>::PStringBase<char>(&var_d0, ".ahk");
0041ca60                              int32_t eax_12 = _stricmp(__return, var_d0);
0041ca66                              esp_1 = &var_e8;
0041ca6f                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c8);
0041ca6f                              
0041ca76                              if (eax_12 == 0)
0041ca76                              {
0041ca80                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041ca93                                  return 9;
0041ca76                              }
0041ca76                              
0041dc72                              __return_1 = esp_1[3];
0041c952                          }
0041c952                          else if (eax == 0x3539)
0041c95d                          {
0041c9f1                              char const* const var_f4_7 = ".mi";
0041c9fd                              PStringBase<char>::PStringBase<char>(&var_38, ".mi");
0041ca0f                              int32_t eax_9 = _stricmp(__return, var_38);
0041ca15                              esp_1 = &var_e8;
0041ca21                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30);
0041ca21                              
0041ca28                              if (eax_9 == 0)
0041ca28                              {
0041ca32                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041ca45                                  return 0x21;
0041ca28                              }
0041ca28                              
0041dc72                              __return_1 = esp_1[3];
0041c95d                          }
0041c95d                          else if (eax == 0x353d)
0041c966                          {
0041c9a3                              char const* const var_f4_5 = ".mm";
0041c9ac                              PStringBase<char>::PStringBase<char>(&var_d8, ".mm");
0041c9bb                              int32_t eax_7 = _stricmp(__return, var_d8);
0041c9c1                              esp_1 = &var_e8;
0041c9ca                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_d0);
0041c9ca                              
0041c9d1                              if (eax_7 == 0)
0041c9d1                              {
0041c9db                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
0041c9ee                                  return 0x20;
0041c9d1                              }
0041c9d1                              
0041dc72                              __return_1 = esp_1[3];
0041c966                          }
0041c966                          else if (eax == 0x31586)
0041c96d                          {
0041c973                              char const* const var_f4_3 = ".256";
0041c97f                              PStringBase<char>::PStringBase<char>(&var_70, ".256");
0041c991                              eax_5 = _stricmp(__return, var_70);
0041c997                              ecx_3 = &var_68;
0041c99e                              goto label_41d5bb;
0041c96d                          }
0041c941                      }
0041c93b                  }
0041c930              }
0041c92a          }
0041c91f      }
0041dc7c      *(uint32_t*)((char*)esp_1 - 4) = (__return_1 - 0x10);
0041dc7c      void* esp_2 = ((char*)esp_1 - 4);
0041dc7c      
0041dc85      if ((InterlockedDecrement() == 0 && __return_1 != 0x14))
0041dc85      {
0041dc87          int32_t eax_154 = *(uint32_t*)(__return_1 - 0x14);
0041dc89          *(uint32_t*)((char*)esp_2 - 4) = 1;
0041dc8d          *(uint32_t*)eax_154();
0041dc85      }
0041dc85      
0041dc8f      *(uint32_t*)esp_2;
0041dc90      *(uint32_t*)((char*)esp_2 + 4);
0041dc93      *(uint32_t*)((char*)esp_2 + 8);
0041dc9a      return 0;
0041c8c0  }

0041dc9d                                                                                         90 90 90                               ...

0041dca0  uint8_t __stdcall MasterDBMap::InqTypeByString_Internal(class MasterDBMap const* this @ ecx, class PStringBase<char> const* arg2, uint32_t* arg3)

0041dca0  {
0041dcad      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0041dcb0      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0041dcb9      int32_t ebx;
0041dcb9      ebx = 0;
0041dcbb      InterlockedIncrement(&m_charbuffer[-1]);
0041dcc5      PStringBase<char>::break_reference(&m_charbuffer_1);
0041dccf      _strlwr(m_charbuffer_1);
0041dcd5      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
0041dcd9      uint32_t eax_2 = *(int32_t*)((char*)m_charbuffer_2 + -8);
0041dcd9      
0041dce2      if (eax_2 == 0xffffffff)
0041dce2      {
0041dce5          eax_2 = compute_str_hash(m_charbuffer_2);
0041dced          *(uint32_t*)((char*)m_charbuffer_2 - 8) = eax_2;
0041dce2      }
0041dce2      
0041dcfc      if (eax_2 > 0x6779a4f)
0041dcfc      {
0041e5ca          if (eax_2 > 0xcf90dc5)
0041e5ca          {
0041ea18              if (eax_2 > 0xe710390)
0041ea18              {
0041ed48                  if (eax_2 == 0xee7e04e)
0041ed48                  {
0041eda9                      int32_t var_4;
0041eda9                      PStringBase<char>::PStringBase<char>(&var_4, "REGION");
0041edbb                      int32_t eax_110 = _stricmp(m_charbuffer_1, var_4);
0041edcd                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0041edcd                      
0041edd4                      if (eax_110 == 0)
0041edd4                      {
0041eddd                          *(uint32_t*)arg3 = 0x1c;
0041ede3                          ebx = 1;
0041edd4                      }
0041ed48                  }
0041ed48                  else if (eax_2 == 0xf6af247)
0041ed4f                  {
0041ed61                      int32_t var_c;
0041ed61                      PStringBase<char>::PStringBase<char>(&var_c, "CLOTHING");
0041ed73                      int32_t eax_108 = _stricmp(m_charbuffer_1, var_c);
0041ed85                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0041ed85                      
0041ed8c                      if (eax_108 == 0)
0041ed8c                      {
0041ed95                          *(uint32_t*)arg3 = 0x19;
0041ede3                          ebx = 1;
0041ed8c                      }
0041ed4f                  }
0041ed4f                  
0041ec3e                  if (eax_2 == 0xec79057)
0041ec3e                  {
0041ed00                      int32_t var_14;
0041ed00                      PStringBase<char>::PStringBase<char>(&var_14, "STRING");
0041ed12                      int32_t eax_106 = _stricmp(m_charbuffer_1, var_14);
0041ed24                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14);
0041ed24                      
0041ed2b                      if (eax_106 == 0)
0041ed2b                      {
0041ed38                          *(uint32_t*)arg3 = 0x29;
0041ede3                          ebx = 1;
0041ed2b                      }
0041ec3e                  }
0041ec3e                  else if (eax_2 == 0xebaa971)
0041ec49                  {
0041ecb1                      int32_t var_1c;
0041ecb1                      PStringBase<char>::PStringBase<char>(&var_1c, "BADDATA");
0041ecc3                      int32_t eax_104 = _stricmp(m_charbuffer_1, var_1c);
0041ecd5                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
0041ecd5                      
0041ecdc                      if (eax_104 == 0)
0041ecdc                      {
0041ece9                          *(uint32_t*)arg3 = 0x13;
0041ede3                          ebx = 1;
0041ecdc                      }
0041ec49                  }
0041ec49                  else if (eax_2 == 0xec67935)
0041ec50                  {
0041ec62                      int32_t var_24;
0041ec62                      PStringBase<char>::PStringBase<char>(&var_24, "STABLE");
0041ec74                      int32_t eax_102 = _stricmp(m_charbuffer_1, var_24);
0041ec86                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_24);
0041ec86                      
0041ec8d                      if (eax_102 == 0)
0041ec8d                      {
0041ec9a                          *(uint32_t*)arg3 = 0x22;
0041ede3                          ebx = 1;
0041ec8d                      }
0041ec50                  }
0041ea18              }
0041ea18              else if (eax_2 == 0xe710390)
0041ea1e              {
0041ebf0                  int32_t var_2c;
0041ebf0                  PStringBase<char>::PStringBase<char>(&var_2c, "KEYMAP");
0041ec02                  int32_t eax_100 = _stricmp(m_charbuffer_1, var_2c);
0041ec14                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2c);
0041ec14                  
0041ec1b                  if (eax_100 == 0)
0041ec1b                  {
0041ec28                      *(uint32_t*)arg3 = 0x1d;
0041ede3                      ebx = 1;
0041ec1b                  }
0041ea1e              }
0041ea1e              else
0041ea1e              {
0041eb39                  if (eax_2 == 0xe1c0432)
0041eb39                  {
0041eba1                      int32_t var_34;
0041eba1                      PStringBase<char>::PStringBase<char>(&var_34, "DUAL_DID_MAPPER");
0041ebb3                      int32_t eax_98 = _stricmp(m_charbuffer_1, var_34);
0041ebc5                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_34);
0041ebc5                      
0041ebcc                      if (eax_98 == 0)
0041ebcc                      {
0041ebd9                          *(uint32_t*)arg3 = 0x28;
0041ede3                          ebx = 1;
0041ebcc                      }
0041eb39                  }
0041eb39                  else if (eax_2 == 0xe267935)
0041eb40                  {
0041eb52                      int32_t var_3c;
0041eb52                      PStringBase<char>::PStringBase<char>(&var_3c, "MTABLE");
0041eb64                      int32_t eax_96 = _stricmp(m_charbuffer_1, var_3c);
0041eb76                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c);
0041eb76                      
0041eb7d                      if (eax_96 == 0)
0041eb7d                      {
0041eb8a                          *(uint32_t*)arg3 = 0xe;
0041ede3                          ebx = 1;
0041eb7d                      }
0041eb40                  }
0041eb40                  
0041ea2f                  if (eax_2 == 0xdb1f59a)
0041ea2f                  {
0041eaf1                      int32_t var_44;
0041eaf1                      PStringBase<char>::PStringBase<char>(&var_44, "GFXOBJ");
0041eb03                      int32_t eax_94 = _stricmp(m_charbuffer_1, var_44);
0041eb15                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_44);
0041eb15                      
0041eb1c                      if (eax_94 == 0)
0041eb1c                      {
0041eb29                          *(uint32_t*)arg3 = 6;
0041ede3                          ebx = 1;
0041eb1c                      }
0041ea2f                  }
0041ea2f                  else if (eax_2 == 0xd4683bb)
0041ea3a                  {
0041eaa2                      int32_t var_4c;
0041eaa2                      PStringBase<char>::PStringBase<char>(&var_4c, "ANIMATION_HOOK");
0041eab4                      int32_t eax_92 = _stricmp(m_charbuffer_1, var_4c);
0041eac6                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4c);
0041eac6                      
0041eacd                      if (eax_92 == 0)
0041eacd                      {
0041eada                          *(uint32_t*)arg3 = 9;
0041ede3                          ebx = 1;
0041eacd                      }
0041ea3a                  }
0041ea3a                  else if (eax_2 == 0xdacb838)
0041ea41                  {
0041ea53                      int32_t var_54;
0041ea53                      PStringBase<char>::PStringBase<char>(&var_54, "RENDER_MESH");
0041ea65                      int32_t eax_90 = _stricmp(m_charbuffer_1, var_54);
0041ea77                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_54);
0041ea77                      
0041ea7e                      if (eax_90 == 0)
0041ea7e                      {
0041ea8b                          *(uint32_t*)arg3 = 0x43;
0041ede3                          ebx = 1;
0041ea7e                      }
0041ea41                  }
0041ea1e              }
0041e5ca          }
0041e5ca          else if (eax_2 == 0xcf90dc5)
0041e5d0          {
0041e9b0              void* var_5c;
0041e9b0              PStringBase<char>::PStringBase<char>(&var_5c, "PHYSICS_SCRIPT_TABLE");
0041e9c2              int32_t eax_85 = _stricmp(m_charbuffer_1, var_5c);
0041e9d2              char eax_86 = ((int8_t)-(eax_85));
0041e9dc              int32_t* esi_40 = ((char*)var_5c - 0x14);
0041e9dc              
0041e9eb              if ((InterlockedDecrement(&esi_40[1]) == 0 && esi_40 != 0))
0041e9f3                  **(uint32_t**)esi_40(1);
0041e9f3              
0041e9f5              int32_t eax_88;
0041e9f5              eax_88 = ((eax_86 - eax_86) + 1);
0041e9f5              
0041e9fb              if (eax_88 != 0)
0041e9fb              {
0041ea08                  *(uint32_t*)arg3 = 0x2c;
0041ede3                  ebx = 1;
0041e9fb              }
0041e5d0          }
0041e5d0          else if (eax_2 > 0xa4779db)
0041e5db          {
0041e90b              if (eax_2 == 0xb0cd6b3)
0041e90b              {
0041e967                  int32_t var_64;
0041e967                  PStringBase<char>::PStringBase<char>(&var_64, "DBPROPERTIES");
0041e976                  int32_t eax_83 = _stricmp(m_charbuffer_1, var_64);
0041e985                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_64);
0041e985                  
0041e98c                  if (eax_83 == 0)
0041e98c                  {
0041e999                      *(uint32_t*)arg3 = 0x31;
0041ede3                      ebx = 1;
0041e98c                  }
0041e90b              }
0041e90b              else if (eax_2 == 0xc08c675)
0041e912              {
0041e921                  int32_t var_6c;
0041e921                  PStringBase<char>::PStringBase<char>(&var_6c, "SURFACE");
0041e930                  int32_t eax_81 = _stricmp(m_charbuffer_1, var_6c);
0041e93f                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_6c);
0041e93f                  
0041e946                  if (eax_81 == 0)
0041e946                  {
0041e953                      *(uint32_t*)arg3 = 0xd;
0041ede3                      ebx = 1;
0041e946                  }
0041e912              }
0041e912              
0041e81c              if (eax_2 == 0xb05a2e0)
0041e81c              {
0041e8c9                  int32_t var_74;
0041e8c9                  PStringBase<char>::PStringBase<char>(&var_74, "ACTIONMAP");
0041e8d8                  int32_t eax_79 = _stricmp(m_charbuffer_1, var_74);
0041e8e7                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_74);
0041e8e7                  
0041e8ee                  if (eax_79 == 0)
0041e8ee                  {
0041e8fb                      *(uint32_t*)arg3 = 0x27;
0041ede3                      ebx = 1;
0041e8ee                  }
0041e81c              }
0041e81c              else if (eax_2 == 0xa60e32c)
0041e827              {
0041e883                  int32_t var_7c;
0041e883                  PStringBase<char>::PStringBase<char>(&var_7c, "FONT_LOCAL");
0041e892                  int32_t eax_77 = _stricmp(m_charbuffer_1, var_7c);
0041e8a1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_7c);
0041e8a1                  
0041e8a8                  if (eax_77 == 0)
0041e8a8                  {
0041e8b5                      *(uint32_t*)arg3 = 0x2f;
0041ede3                      ebx = 1;
0041e8a8                  }
0041e827              }
0041e827              else if (eax_2 == 0xa9ba754)
0041e82e              {
0041e83d                  int32_t var_84;
0041e83d                  PStringBase<char>::PStringBase<char>(&var_84, "ENVIRONMENT");
0041e84c                  int32_t eax_75 = _stricmp(m_charbuffer_1, var_84);
0041e85b                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_84);
0041e85b                  
0041e862                  if (eax_75 == 0)
0041e862                  {
0041e86f                      *(uint32_t*)arg3 = 0x10;
0041ede3                      ebx = 1;
0041e862                  }
0041e82e              }
0041e5db          }
0041e5db          else if (eax_2 == 0xa4779db)
0041e5e1          {
0041e7d4              int32_t var_8c;
0041e7d4              PStringBase<char>::PStringBase<char>(&var_8c, "LAND_BLOCK");
0041e7e3              int32_t eax_73 = _stricmp(m_charbuffer_1, var_8c);
0041e7f2              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8c);
0041e7f2              
0041e7f9              if (eax_73 == 0)
0041e7f9              {
0041e806                  *(uint32_t*)arg3 = 1;
0041ede3                  ebx = 1;
0041e7f9              }
0041e5e1          }
0041e5e1          else
0041e5e1          {
0041e732              if (eax_2 == 0x93ef862)
0041e732              {
0041e78e                  int32_t var_94;
0041e78e                  PStringBase<char>::PStringBase<char>(&var_94, "MATERIALMODIFIER");
0041e79d                  int32_t eax_71 = _stricmp(m_charbuffer_1, var_94);
0041e7ac                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
0041e7ac                  
0041e7b3                  if (eax_71 == 0)
0041e7b3                  {
0041e7c0                      *(uint32_t*)arg3 = 0x20;
0041ede3                      ebx = 1;
0041e7b3                  }
0041e732              }
0041e732              else if (eax_2 == 0xa43db85)
0041e739              {
0041e748                  int32_t var_9c;
0041e748                  PStringBase<char>::PStringBase<char>(&var_9c, "SURFACETEXTURE");
0041e757                  int32_t eax_69 = _stricmp(m_charbuffer_1, var_9c);
0041e766                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
0041e766                  
0041e76d                  if (eax_69 == 0)
0041e76d                  {
0041e77a                      *(uint32_t*)arg3 = 0xb;
0041ede3                      ebx = 1;
0041e76d                  }
0041e739              }
0041e739              
0041e5f2              if (eax_2 == 0x93b52f5)
0041e5f2              {
0041e6f0                  int32_t var_a4;
0041e6f0                  PStringBase<char>::PStringBase<char>(&var_a4, "MATERIALINSTANCE");
0041e6ff                  int32_t eax_67 = _stricmp(m_charbuffer_1, var_a4);
0041e70e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a4);
0041e70e                  
0041e715                  if (eax_67 == 0)
0041e715                  {
0041e722                      *(uint32_t*)arg3 = 0x21;
0041ede3                      ebx = 1;
0041e715                  }
0041e5f2              }
0041e5f2              else if (eax_2 == 0x686c245)
0041e5fd              {
0041e6aa                  int32_t var_ac;
0041e6aa                  PStringBase<char>::PStringBase<char>(&var_ac, "TABOO_TABLE");
0041e6b9                  int32_t eax_65 = _stricmp(m_charbuffer_1, var_ac);
0041e6c8                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_ac);
0041e6c8                  
0041e6cf                  if (eax_65 == 0)
0041e6cf                  {
0041e6dc                      *(uint32_t*)arg3 = 0x14;
0041ede3                      ebx = 1;
0041e6cf                  }
0041e5fd              }
0041e5fd              else if (eax_2 == 0x730e209)
0041e608              {
0041e664                  int32_t var_b4;
0041e664                  PStringBase<char>::PStringBase<char>(&var_b4, "OBJECT_HIERARCHY");
0041e673                  int32_t eax_63 = _stricmp(m_charbuffer_1, var_b4);
0041e682                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b4);
0041e682                  
0041e689                  if (eax_63 == 0)
0041e689                  {
0041e696                      *(uint32_t*)arg3 = 0x12;
0041ede3                      ebx = 1;
0041e689                  }
0041e608              }
0041e608              else if (eax_2 == 0x8d7da23)
0041e60f              {
0041e61e                  int32_t var_bc;
0041e61e                  PStringBase<char>::PStringBase<char>(&var_bc, "MONITOREDPROPERTIES");
0041e62d                  int32_t eax_61 = _stricmp(m_charbuffer_1, var_bc);
0041e63c                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_bc);
0041e63c                  
0041e643                  if (eax_61 == 0)
0041e643                  {
0041e650                      *(uint32_t*)arg3 = 0x17;
0041ede3                      ebx = 1;
0041e643                  }
0041e60f              }
0041e5e1          }
0041dcfc      }
0041dcfc      else if (eax_2 == 0x6779a4f)
0041dd02      {
0041e568          void* var_c4;
0041e568          PStringBase<char>::PStringBase<char>(&var_c4, "DEGRADEINFO");
0041e577          int32_t eax_57 = _stricmp(m_charbuffer_1, var_c4);
0041e584          char eax_58 = ((int8_t)-(eax_57));
0041e588          int32_t* esi_26 = ((char*)var_c4 - 0x14);
0041e588          
0041e59d          if ((InterlockedDecrement(&esi_26[1]) == 0 && esi_26 != 0))
0041e5a5              **(uint32_t**)esi_26(1);
0041e5a5          
0041e5a7          int32_t eax_59;
0041e5a7          eax_59 = ((eax_58 - eax_58) + 1);
0041e5a7          
0041e5ad          if (eax_59 != 0)
0041e5ad          {
0041e5ba              *(uint32_t*)arg3 = 0x1a;
0041ede3              ebx = 1;
0041e5ad          }
0041dd02      }
0041dd02      else if (eax_2 > 0x29374e4)
0041dd0d      {
0041e160          if (eax_2 > 0x4448255)
0041e160          {
0041e4bd              if (eax_2 == 0x625b562)
0041e4bd              {
0041e51c                  int32_t var_10;
0041e51c                  PStringBase<char>::PStringBase<char>(&var_10, "DID_MAPPER");
0041e52e                  int32_t eax_55 = _stricmp(m_charbuffer_1, var_10);
0041e540                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
0041e540                  
0041e547                  if (eax_55 == 0)
0041e547                  {
0041e554                      *(uint32_t*)arg3 = 0x26;
0041ede3                      ebx = 1;
0041e547                  }
0041e4bd              }
0041e4bd              else if (eax_2 == 0x6292bf4)
0041e4c4              {
0041e4d3                  int32_t var_c8;
0041e4d3                  PStringBase<char>::PStringBase<char>(&var_c8, "UI_LAYOUT");
0041e4e2                  int32_t eax_53 = _stricmp(m_charbuffer_1, var_c8);
0041e4f1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c8);
0041e4f1                  
0041e4f8                  if (eax_53 == 0)
0041e4f8                  {
0041e505                      *(uint32_t*)arg3 = 0x23;
0041ede3                      ebx = 1;
0041e4f8                  }
0041e4c4              }
0041e4c4              
0041e3bc              if (eax_2 == 0x5e6eaf2)
0041e3bc              {
0041e475                  int32_t var_38;
0041e475                  PStringBase<char>::PStringBase<char>(&var_38, "ENUM_MAPPER");
0041e487                  int32_t eax_51 = _stricmp(m_charbuffer_1, var_38);
0041e499                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_38);
0041e499                  
0041e4a0                  if (eax_51 == 0)
0041e4a0                  {
0041e4ad                      *(uint32_t*)arg3 = 0x24;
0041ede3                      ebx = 1;
0041e4a0                  }
0041e3bc              }
0041e3bc              else if (eax_2 == 0x44b11f5)
0041e3c7              {
0041e42c                  int32_t var_70;
0041e42c                  PStringBase<char>::PStringBase<char>(&var_70, "RENDERTEXTURE");
0041e43b                  int32_t eax_49 = _stricmp(m_charbuffer_1, var_70);
0041e44a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_70);
0041e44a                  
0041e451                  if (eax_49 == 0)
0041e451                  {
0041e45e                      *(uint32_t*)arg3 = 0x1e;
0041ede3                      ebx = 1;
0041e451                  }
0041e3c7              }
0041e3c7              else if (eax_2 == 0x44c6ae5)
0041e3ce              {
0041e3e0                  int32_t var_20;
0041e3e0                  PStringBase<char>::PStringBase<char>(&var_20, "RENDERSURFACE");
0041e3f2                  int32_t eax_47 = _stricmp(m_charbuffer_1, var_20);
0041e404                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
0041e404                  
0041e40b                  if (eax_47 == 0)
0041e40b                  {
0041e418                      *(uint32_t*)arg3 = 0xc;
0041ede3                      ebx = 1;
0041e40b                  }
0041e3ce              }
0041e160          }
0041e160          else if (eax_2 == 0x4448255)
0041e166          {
0041e374              int32_t var_78;
0041e374              PStringBase<char>::PStringBase<char>(&var_78, "NAME_FILTER_TABLE");
0041e383              int32_t eax_45 = _stricmp(m_charbuffer_1, var_78);
0041e392              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_78);
0041e392              
0041e399              if (eax_45 == 0)
0041e399              {
0041e3a6                  *(uint32_t*)arg3 = 0x16;
0041ede3                  ebx = 1;
0041e399              }
0041e166          }
0041e166          else
0041e166          {
0041e2c9              if (eax_2 == 0x3cdb295)
0041e2c9              {
0041e328                  int32_t var_40;
0041e328                  PStringBase<char>::PStringBase<char>(&var_40, "CHAT_POSE_TABLE");
0041e33a                  int32_t eax_43 = _stricmp(m_charbuffer_1, var_40);
0041e34c                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_40);
0041e34c                  
0041e353                  if (eax_43 == 0)
0041e353                  {
0041e360                      *(uint32_t*)arg3 = 0x11;
0041ede3                      ebx = 1;
0041e353                  }
0041e2c9              }
0041e2c9              else if (eax_2 == 0x428f205)
0041e2d0              {
0041e2df                  int32_t var_80;
0041e2df                  PStringBase<char>::PStringBase<char>(&var_80, "FILE2ID_TABLE");
0041e2ee                  int32_t eax_41 = _stricmp(m_charbuffer_1, var_80);
0041e2fd                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_80);
0041e2fd                  
0041e304                  if (eax_41 == 0)
0041e304                  {
0041e311                      *(uint32_t*)arg3 = 0x15;
0041ede3                      ebx = 1;
0041e304                  }
0041e2d0              }
0041e2d0              
0041e177              if (eax_2 == 0x3cb6a89)
0041e177              {
0041e281                  int32_t var_8;
0041e281                  PStringBase<char>::PStringBase<char>(&var_8, "MASTER_PROPERTY");
0041e293                  int32_t eax_39 = _stricmp(m_charbuffer_1, var_8);
0041e2a5                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
0041e2a5                  
0041e2ac                  if (eax_39 == 0)
0041e2ac                  {
0041e2b9                      *(uint32_t*)arg3 = 0x2d;
0041ede3                      ebx = 1;
0041e2ac                  }
0041e177              }
0041e177              else if (eax_2 == 0x2e89502)
0041e182              {
0041e238                  int32_t var_88;
0041e238                  PStringBase<char>::PStringBase<char>(&var_88, "PARTICLE_EMITTER");
0041e247                  int32_t eax_37 = _stricmp(m_charbuffer_1, var_88);
0041e256                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_88);
0041e256                  
0041e25d                  if (eax_37 == 0)
0041e25d                  {
0041e26a                      *(uint32_t*)arg3 = 0x2a;
0041ede3                      ebx = 1;
0041e25d                  }
0041e182              }
0041e182              else if (eax_2 == 0x3ad38f5)
0041e18d              {
0041e1ec                  int32_t var_48;
0041e1ec                  PStringBase<char>::PStringBase<char>(&var_48, "STRING_STATE");
0041e1fe                  int32_t eax_35 = _stricmp(m_charbuffer_1, var_48);
0041e210                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_48);
0041e210                  
0041e217                  if (eax_35 == 0)
0041e217                  {
0041e224                      *(uint32_t*)arg3 = 0x30;
0041ede3                      ebx = 1;
0041e217                  }
0041e18d              }
0041e18d              else if (eax_2 == 0x3ade975)
0041e194              {
0041e1a3                  int32_t var_90;
0041e1a3                  PStringBase<char>::PStringBase<char>(&var_90, "STRING_TABLE");
0041e1b2                  int32_t eax_33 = _stricmp(m_charbuffer_1, var_90);
0041e1c1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_90);
0041e1c1                  
0041e1c8                  if (eax_33 == 0)
0041e1c8                  {
0041e1d5                      *(uint32_t*)arg3 = 0x25;
0041ede3                      ebx = 1;
0041e1c8                  }
0041e194              }
0041e166          }
0041dd0d      }
0041dd0d      else if (eax_2 == 0x29374e4)
0041dd13      {
0041e118          int32_t var_28;
0041e118          PStringBase<char>::PStringBase<char>(&var_28, "PHYSICS_SCRIPT");
0041e12a          int32_t eax_31 = _stricmp(m_charbuffer_1, var_28);
0041e13c          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_28);
0041e13c          
0041e143          if (eax_31 == 0)
0041e143          {
0041e150              *(uint32_t*)arg3 = 0x2b;
0041ede3              ebx = 1;
0041e143          }
0041dd13      }
0041dd13      else if (eax_2 > 0x6209de)
0041dd1e      {
0041e06a          if (eax_2 == 0x1ef0bc0)
0041e06a          {
0041e0cf              int32_t var_98;
0041e0cf              PStringBase<char>::PStringBase<char>(&var_98, "SETUP");
0041e0de              int32_t eax_29 = _stricmp(m_charbuffer_1, var_98);
0041e0ed              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
0041e0ed              
0041e0f4              if (eax_29 == 0)
0041e0f4              {
0041e101                  *(uint32_t*)arg3 = 7;
0041ede3                  ebx = 1;
0041e0f4              }
0041e06a          }
0041e06a          else if (eax_2 == 0x1ef5c45)
0041e071          {
0041e083              int32_t var_50;
0041e083              PStringBase<char>::PStringBase<char>(&var_50, "SCENE");
0041e095              int32_t eax_27 = _stricmp(m_charbuffer_1, var_50);
0041e0a7              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
0041e0a7              
0041e0ae              if (eax_27 == 0)
0041e0ae              {
0041e0bb                  *(uint32_t*)arg3 = 0x1b;
0041ede3                  ebx = 1;
0041e0ae              }
0041e071          }
0041e071          
0041df72          if (eax_2 == 0xe658ac)
0041df72          {
0041e028              int32_t var_a0;
0041e028              PStringBase<char>::PStringBase<char>(&var_a0, "RENDERMATERIAL");
0041e037              int32_t eax_25 = _stricmp(m_charbuffer_1, var_a0);
0041e046              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a0);
0041e046              
0041e04d              if (eax_25 == 0)
0041e04d              {
0041e05a                  *(uint32_t*)arg3 = 0x1f;
0041ede3                  ebx = 1;
0041e04d              }
0041df72          }
0041df72          else if (eax_2 == 0xc26824)
0041df7d          {
0041dfdc              int32_t var_18;
0041dfdc              PStringBase<char>::PStringBase<char>(&var_18, "PAL_SET");
0041dfee              int32_t eax_23 = _stricmp(m_charbuffer_1, var_18);
0041e000              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
0041e000              
0041e007              if (eax_23 == 0)
0041e007              {
0041e014                  *(uint32_t*)arg3 = 0x18;
0041ede3                  ebx = 1;
0041e007              }
0041df7d          }
0041df7d          else if (eax_2 == 0xc2ca45)
0041df84          {
0041df93              int32_t var_a8;
0041df93              PStringBase<char>::PStringBase<char>(&var_a8, "PALETTE");
0041dfa2              int32_t eax_21 = _stricmp(m_charbuffer_1, var_a8);
0041dfb1              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a8);
0041dfb1              
0041dfb8              if (eax_21 == 0)
0041dfb8              {
0041dfc5                  *(uint32_t*)arg3 = 0xa;
0041ede3                  ebx = 1;
0041dfb8              }
0041df84          }
0041dd1e      }
0041dd1e      else if (eax_2 == 0x6209de)
0041dd24      {
0041df24          int32_t var_58;
0041df24          PStringBase<char>::PStringBase<char>(&var_58, "INSTANTIATION");
0041df36          int32_t eax_19 = _stricmp(m_charbuffer_1, var_58);
0041df48          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_58);
0041df48          
0041df4f          if (eax_19 == 0)
0041df4f          {
0041df5c              *(uint32_t*)arg3 = 5;
0041ede3              ebx = 1;
0041df4f          }
0041dd24      }
0041dd24      else
0041dd24      {
0041de76          if (eax_2 == 0x1df82c)
0041de76          {
0041dedb              int32_t var_b0;
0041dedb              PStringBase<char>::PStringBase<char>(&var_b0, "CELL");
0041deea              int32_t eax_17 = _stricmp(m_charbuffer_1, var_b0);
0041def9              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b0);
0041def9              
0041df00              if (eax_17 == 0)
0041df00              {
0041df0d                  *(uint32_t*)arg3 = 3;
0041ede3                  ebx = 1;
0041df00              }
0041de76          }
0041de76          else if (eax_2 == 0x1eb4c5)
0041de7d          {
0041de8f              int32_t var_30;
0041de8f              PStringBase<char>::PStringBase<char>(&var_30, "WAVE");
0041dea1              int32_t eax_15 = _stricmp(m_charbuffer_1, var_30);
0041deb3              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30);
0041deb3              
0041deba              if (eax_15 == 0)
0041deba              {
0041dec7                  *(uint32_t*)arg3 = 0xf;
0041ede3                  ebx = 1;
0041deba              }
0041de7d          }
0041de7d          
0041dd35          if (eax_2 == 0x1dba54)
0041dd35          {
0041de34              int32_t var_b8;
0041de34              PStringBase<char>::PStringBase<char>(&var_b8, "FONT");
0041de43              int32_t eax_13 = _stricmp(m_charbuffer_1, var_b8);
0041de52              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b8);
0041de52              
0041de59              if (eax_13 == 0)
0041de59              {
0041de66                  *(uint32_t*)arg3 = 0x2e;
0041ede3                  ebx = 1;
0041de59              }
0041dd35          }
0041dd35          else if (eax_2 == 0x1e449)
0041dd40          {
0041ddee              int32_t var_60;
0041ddee              PStringBase<char>::PStringBase<char>(&var_60, &data_7959e8);
0041ddfd              int32_t eax_11 = _stricmp(m_charbuffer_1, var_60);
0041de0c              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_60);
0041de0c              
0041de13              if (eax_11 == 0)
0041de13              {
0041de20                  *(uint32_t*)arg3 = 2;
0041ede3                  ebx = 1;
0041de13              }
0041dd40          }
0041dd40          else if (eax_2 == 0x1e44f)
0041dd49          {
0041dda5              int32_t var_c0;
0041dda5              PStringBase<char>::PStringBase<char>(&var_c0, &data_7959ec);
0041ddb4              int32_t eax_9 = _stricmp(m_charbuffer_1, var_c0);
0041ddc3              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c0);
0041ddc3              
0041ddca              if (eax_9 == 0)
0041ddca              {
0041ddd7                  *(uint32_t*)arg3 = 4;
0041ede3                  ebx = 1;
0041ddca              }
0041dd49          }
0041dd49          else if (eax_2 == 0x1d28fd)
0041dd50          {
0041dd5f              int32_t var_68;
0041dd5f              PStringBase<char>::PStringBase<char>(&var_68, "ANIM");
0041dd6e              int32_t eax_7 = _stricmp(m_charbuffer_1, var_68);
0041dd7d              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_68);
0041dd7d              
0041dd84              if (eax_7 == 0)
0041dd84              {
0041dd91                  *(uint32_t*)arg3 = 8;
0041ede3                  ebx = 1;
0041dd84              }
0041dd50          }
0041dd24      }
0041dd24      
0041ede9      void* __offset(PSRefBufferCharData<char>, -0x14) esi_53 = &m_charbuffer_1->m_data[0xffffffec];
0041ede9      
0041edf9      if ((InterlockedDecrement(((char*)esi_53 + 4)) == 0 && esi_53 != 0))
0041ee01          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_53) + -0x14)(1);
0041ee01      
0041ee04      int32_t eax_112;
0041ee04      eax_112 = ebx;
0041ee0d      return eax_112;
0041dca0  }


0041ee10  int32_t* __thiscall SmartArray<PStringBase<char>,1>::operator=(int32_t* arg1, int32_t* arg2)

0041ee10  {
0041ee14      int32_t* result = arg1;
0041ee1a      int32_t* edi = arg2;
0041ee2e      int32_t* result_1 = result;
0041ee32      uint8_t eax_2;
0041ee32      
0041ee32      if ((result[1] & 0x7fffffff) < (edi[1] & 0x7fffffff))
0041ee32      {
0041ee34          result[2] = 0;
0041ee47          eax_2 = SmartArray<PStringBase<char>,1>::grow(result, (edi[1] & 0x7fffffff));
0041ee32      }
0041ee32      
0041ee4e      if (((result[1] & 0x7fffffff) >= (edi[1] & 0x7fffffff) || eax_2 != 0))
0041ee4e      {
0041ee58          int32_t* ebx_1 = *(uint32_t*)result;
0041ee5c          int32_t* esi_1 = *(uint32_t*)edi;
0041ee5e          void* ecx_3 = &esi_1[edi[2]];
0041ee63          void* var_8_1 = ecx_3;
0041ee63          
0041ee67          while (esi_1 < ecx_3)
0041ee67          {
0041ee70              void* eax_4 = *(uint32_t*)ebx_1;
0041ee70              
0041ee74              if (eax_4 != *(uint32_t*)esi_1)
0041ee74              {
0041ee89                  if ((InterlockedDecrement(((char*)eax_4 - 0x10)) == 0 && eax_4 != 0x14))
0041ee91                      **(uint32_t**)((char*)eax_4 - 0x14)(1);
0041ee91                  
0041ee93                  int32_t eax_6 = *(uint32_t*)esi_1;
0041ee95                  *(uint32_t*)ebx_1 = eax_6;
0041ee9b                  InterlockedIncrement((eax_6 - 0x10));
0041eea1                  edi = arg2;
0041eea5                  ecx_3 = var_8_1;
0041ee74              }
0041ee74              
0041eea9              esi_1 = &esi_1[1];
0041eeac              ebx_1 = &ebx_1[1];
0041ee67          }
0041ee67          
0041eeb3          int32_t ebx_2 = edi[2];
0041eeb9          int32_t var_8_2 = ebx_2;
0041eeb9          
0041eebd          if (ebx_2 < result[2])
0041eebd          {
0041eec5              while (true)
0041eec5              {
0041eec5                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0041eecf                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0041eed8                  class PSRefBufferCharData<char>** ebx_3 = (*(uint32_t*)result + (ebx_2 << 2));
0041eedb                  class PSRefBufferCharData<char>* eax_9 = *(uint32_t*)ebx_3;
0041eedb                  
0041eedf                  if (eax_9 != PStringBase<char>::s_NullBuffer_1)
0041eedf                  {
0041eef4                      if ((InterlockedDecrement(&eax_9[-1]) == 0 && eax_9 != 0x14))
0041eefd                          *(uint32_t*)*(int32_t*)((char*)eax_9 + -0x14)(1);
0041eefd                      
0041ef00                      *(uint32_t*)ebx_3 = PStringBase<char>::s_NullBuffer_1;
0041ef02                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0041ef08                      result = result_1;
0041eedf                  }
0041eedf                  
0041ef1f                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0041ef27                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0041ef27                  
0041ef31                  bool cond:3_1 = (var_8_2 + 1) < result[2];
0041ef33                  var_8_2 += 1;
0041ef33                  
0041ef37                  if (!(cond:3_1))
0041ef37                      break;
0041ef37                  
0041eec1                  ebx_2 = var_8_2;
0041eec5              }
0041eec5              
0041ef39              edi = arg2;
0041eebd          }
0041eebd          
0041ef41          result[2] = edi[2];
0041ee4e      }
0041ee4e      
0041ef4c      return result;
0041ee10  }

0041ef4f                                               90                                                                 .

0041ef50  uint8_t __stdcall MasterDBMap::InqStringByType_Internal(class MasterDBMap const* this @ ecx, uint32_t arg2, class PStringBase<char>* arg3)

0041ef50  {
0041ef5a      if ((arg2 - 1) <= 0x42)
0041ef60          switch (arg2)
0041ef60          {
0041ef70              case 1:
0041ef70              {
0041ef70                  PStringBase<char>::set(arg3, "LAND_BLOCK");
0041ef75                  int32_t eax_1;
0041ef75                  eax_1 = 1;
0041ef77                  return 1;
0041ef70                  break;
0041ef70              }
0041ef83              case 2:
0041ef83              {
0041ef83                  PStringBase<char>::set(arg3, &data_7959e8);
0041ef88                  int32_t eax_2;
0041ef88                  eax_2 = 1;
0041ef8a                  return 1;
0041ef83                  break;
0041ef83              }
0041ef96              case 3:
0041ef96              {
0041ef96                  PStringBase<char>::set(arg3, "CELL");
0041ef9b                  int32_t eax_3;
0041ef9b                  eax_3 = 1;
0041ef9d                  return 1;
0041ef96                  break;
0041ef96              }
0041efa9              case 4:
0041efa9              {
0041efa9                  PStringBase<char>::set(arg3, &data_7959ec);
0041efae                  int32_t eax_4;
0041efae                  eax_4 = 1;
0041efb0                  return 1;
0041efa9                  break;
0041efa9              }
0041efbc              case 5:
0041efbc              {
0041efbc                  PStringBase<char>::set(arg3, "INSTANTIATION");
0041efc1                  int32_t eax_5;
0041efc1                  eax_5 = 1;
0041efc3                  return 1;
0041efbc                  break;
0041efbc              }
0041efcf              case 6:
0041efcf              {
0041efcf                  PStringBase<char>::set(arg3, "GFXOBJ");
0041efd4                  int32_t eax_6;
0041efd4                  eax_6 = 1;
0041efd6                  return 1;
0041efcf                  break;
0041efcf              }
0041efe2              case 7:
0041efe2              {
0041efe2                  PStringBase<char>::set(arg3, "SETUP");
0041efe7                  int32_t eax_7;
0041efe7                  eax_7 = 1;
0041efe9                  return 1;
0041efe2                  break;
0041efe2              }
0041eff5              case 8:
0041eff5              {
0041eff5                  PStringBase<char>::set(arg3, "ANIM");
0041effa                  int32_t eax_8;
0041effa                  eax_8 = 1;
0041effc                  return 1;
0041eff5                  break;
0041eff5              }
0041f008              case 9:
0041f008              {
0041f008                  PStringBase<char>::set(arg3, "ANIMATION_HOOK");
0041f00d                  int32_t eax_9;
0041f00d                  eax_9 = 1;
0041f00f                  return 1;
0041f008                  break;
0041f008              }
0041f01b              case 0xa:
0041f01b              {
0041f01b                  PStringBase<char>::set(arg3, "PALETTE");
0041f020                  int32_t eax_10;
0041f020                  eax_10 = 1;
0041f022                  return 1;
0041f01b                  break;
0041f01b              }
0041f02e              case 0xb:
0041f02e              {
0041f02e                  PStringBase<char>::set(arg3, "SURFACETEXTURE");
0041f033                  int32_t eax_11;
0041f033                  eax_11 = 1;
0041f035                  return 1;
0041f02e                  break;
0041f02e              }
0041f041              case 0xc:
0041f041              {
0041f041                  PStringBase<char>::set(arg3, "RENDERSURFACE");
0041f046                  int32_t eax_12;
0041f046                  eax_12 = 1;
0041f048                  return 1;
0041f041                  break;
0041f041              }
0041f054              case 0xd:
0041f054              {
0041f054                  PStringBase<char>::set(arg3, "SURFACE");
0041f059                  int32_t eax_13;
0041f059                  eax_13 = 1;
0041f05b                  return 1;
0041f054                  break;
0041f054              }
0041f067              case 0xe:
0041f067              {
0041f067                  PStringBase<char>::set(arg3, "MTABLE");
0041f06c                  int32_t eax_14;
0041f06c                  eax_14 = 1;
0041f06e                  return 1;
0041f067                  break;
0041f067              }
0041f07a              case 0xf:
0041f07a              {
0041f07a                  PStringBase<char>::set(arg3, "WAVE");
0041f07f                  int32_t eax_15;
0041f07f                  eax_15 = 1;
0041f081                  return 1;
0041f07a                  break;
0041f07a              }
0041f08d              case 0x10:
0041f08d              {
0041f08d                  PStringBase<char>::set(arg3, "ENVIRONMENT");
0041f092                  int32_t eax_16;
0041f092                  eax_16 = 1;
0041f094                  return 1;
0041f08d                  break;
0041f08d              }
0041f0a0              case 0x11:
0041f0a0              {
0041f0a0                  PStringBase<char>::set(arg3, "CHAT_POSE_TABLE");
0041f0a5                  int32_t eax_17;
0041f0a5                  eax_17 = 1;
0041f0a7                  return 1;
0041f0a0                  break;
0041f0a0              }
0041f0b3              case 0x12:
0041f0b3              {
0041f0b3                  PStringBase<char>::set(arg3, "OBJECT_HIERARCHY");
0041f0b8                  int32_t eax_18;
0041f0b8                  eax_18 = 1;
0041f0ba                  return 1;
0041f0b3                  break;
0041f0b3              }
0041f0c6              case 0x13:
0041f0c6              {
0041f0c6                  PStringBase<char>::set(arg3, "BADDATA");
0041f0cb                  int32_t eax_19;
0041f0cb                  eax_19 = 1;
0041f0cd                  return 1;
0041f0c6                  break;
0041f0c6              }
0041f0d9              case 0x14:
0041f0d9              {
0041f0d9                  PStringBase<char>::set(arg3, "TABOO_TABLE");
0041f0de                  int32_t eax_20;
0041f0de                  eax_20 = 1;
0041f0e0                  return 1;
0041f0d9                  break;
0041f0d9              }
0041f0ec              case 0x15:
0041f0ec              {
0041f0ec                  PStringBase<char>::set(arg3, "FILE2ID_TABLE");
0041f0f1                  int32_t eax_21;
0041f0f1                  eax_21 = 1;
0041f0f3                  return 1;
0041f0ec                  break;
0041f0ec              }
0041f0ff              case 0x16:
0041f0ff              {
0041f0ff                  PStringBase<char>::set(arg3, "NAME_FILTER_TABLE");
0041f104                  int32_t eax_22;
0041f104                  eax_22 = 1;
0041f106                  return 1;
0041f0ff                  break;
0041f0ff              }
0041f112              case 0x17:
0041f112              {
0041f112                  PStringBase<char>::set(arg3, "MONITOREDPROPERTIES");
0041f117                  int32_t eax_23;
0041f117                  eax_23 = 1;
0041f119                  return 1;
0041f112                  break;
0041f112              }
0041f125              case 0x18:
0041f125              {
0041f125                  PStringBase<char>::set(arg3, "PAL_SET");
0041f12a                  int32_t eax_24;
0041f12a                  eax_24 = 1;
0041f12c                  return 1;
0041f125                  break;
0041f125              }
0041f138              case 0x19:
0041f138              {
0041f138                  PStringBase<char>::set(arg3, "CLOTHING");
0041f13d                  int32_t eax_25;
0041f13d                  eax_25 = 1;
0041f13f                  return 1;
0041f138                  break;
0041f138              }
0041f14b              case 0x1a:
0041f14b              {
0041f14b                  PStringBase<char>::set(arg3, "DEGRADEINFO");
0041f150                  int32_t eax_26;
0041f150                  eax_26 = 1;
0041f152                  return 1;
0041f14b                  break;
0041f14b              }
0041f15e              case 0x1b:
0041f15e              {
0041f15e                  PStringBase<char>::set(arg3, "SCENE");
0041f163                  int32_t eax_27;
0041f163                  eax_27 = 1;
0041f165                  return 1;
0041f15e                  break;
0041f15e              }
0041f171              case 0x1c:
0041f171              {
0041f171                  PStringBase<char>::set(arg3, "REGION");
0041f176                  int32_t eax_28;
0041f176                  eax_28 = 1;
0041f178                  return 1;
0041f171                  break;
0041f171              }
0041f184              case 0x1d:
0041f184              {
0041f184                  PStringBase<char>::set(arg3, "KEYMAP");
0041f189                  int32_t eax_29;
0041f189                  eax_29 = 1;
0041f18b                  return 1;
0041f184                  break;
0041f184              }
0041f197              case 0x1e:
0041f197              {
0041f197                  PStringBase<char>::set(arg3, "RENDERTEXTURE");
0041f19c                  int32_t eax_30;
0041f19c                  eax_30 = 1;
0041f19e                  return 1;
0041f197                  break;
0041f197              }
0041f1aa              case 0x1f:
0041f1aa              {
0041f1aa                  PStringBase<char>::set(arg3, "RENDERMATERIAL");
0041f1af                  int32_t eax_31;
0041f1af                  eax_31 = 1;
0041f1b1                  return 1;
0041f1aa                  break;
0041f1aa              }
0041f1bd              case 0x20:
0041f1bd              {
0041f1bd                  PStringBase<char>::set(arg3, "MATERIALMODIFIER");
0041f1c2                  int32_t eax_32;
0041f1c2                  eax_32 = 1;
0041f1c4                  return 1;
0041f1bd                  break;
0041f1bd              }
0041f1d0              case 0x21:
0041f1d0              {
0041f1d0                  PStringBase<char>::set(arg3, "MATERIALINSTANCE");
0041f1d5                  int32_t eax_33;
0041f1d5                  eax_33 = 1;
0041f1d7                  return 1;
0041f1d0                  break;
0041f1d0              }
0041f1f6              case 0x22:
0041f1f6              {
0041f1f6                  PStringBase<char>::set(arg3, "STABLE");
0041f1fb                  int32_t eax_35;
0041f1fb                  eax_35 = 1;
0041f1fd                  return 1;
0041f1f6                  break;
0041f1f6              }
0041f209              case 0x23:
0041f209              {
0041f209                  PStringBase<char>::set(arg3, "UI_LAYOUT");
0041f20e                  int32_t eax_36;
0041f20e                  eax_36 = 1;
0041f210                  return 1;
0041f209                  break;
0041f209              }
0041f21c              case 0x24:
0041f21c              {
0041f21c                  PStringBase<char>::set(arg3, "ENUM_MAPPER");
0041f221                  int32_t eax_37;
0041f221                  eax_37 = 1;
0041f223                  return 1;
0041f21c                  break;
0041f21c              }
0041f22f              case 0x25:
0041f22f              {
0041f22f                  PStringBase<char>::set(arg3, "STRING_TABLE");
0041f234                  int32_t eax_38;
0041f234                  eax_38 = 1;
0041f236                  return 1;
0041f22f                  break;
0041f22f              }
0041f242              case 0x26:
0041f242              {
0041f242                  PStringBase<char>::set(arg3, "DID_MAPPER");
0041f247                  int32_t eax_39;
0041f247                  eax_39 = 1;
0041f249                  return 1;
0041f242                  break;
0041f242              }
0041f255              case 0x27:
0041f255              {
0041f255                  PStringBase<char>::set(arg3, "ACTIONMAP");
0041f25a                  int32_t eax_40;
0041f25a                  eax_40 = 1;
0041f25c                  return 1;
0041f255                  break;
0041f255              }
0041f268              case 0x28:
0041f268              {
0041f268                  PStringBase<char>::set(arg3, "DUAL_DID_MAPPER");
0041f26d                  int32_t eax_41;
0041f26d                  eax_41 = 1;
0041f26f                  return 1;
0041f268                  break;
0041f268              }
0041f27b              case 0x29:
0041f27b              {
0041f27b                  PStringBase<char>::set(arg3, "STRING");
0041f280                  int32_t eax_42;
0041f280                  eax_42 = 1;
0041f282                  return 1;
0041f27b                  break;
0041f27b              }
0041f28e              case 0x2a:
0041f28e              {
0041f28e                  PStringBase<char>::set(arg3, "PARTICLE_EMITTER");
0041f293                  int32_t eax_43;
0041f293                  eax_43 = 1;
0041f295                  return 1;
0041f28e                  break;
0041f28e              }
0041f2a1              case 0x2b:
0041f2a1              {
0041f2a1                  PStringBase<char>::set(arg3, "PHYSICS_SCRIPT");
0041f2a6                  int32_t eax_44;
0041f2a6                  eax_44 = 1;
0041f2a8                  return 1;
0041f2a1                  break;
0041f2a1              }
0041f2b4              case 0x2c:
0041f2b4              {
0041f2b4                  PStringBase<char>::set(arg3, "PHYSICS_SCRIPT_TABLE");
0041f2b9                  int32_t eax_45;
0041f2b9                  eax_45 = 1;
0041f2bb                  return 1;
0041f2b4                  break;
0041f2b4              }
0041f2c7              case 0x2d:
0041f2c7              {
0041f2c7                  PStringBase<char>::set(arg3, "MASTER_PROPERTY");
0041f2cc                  int32_t eax_46;
0041f2cc                  eax_46 = 1;
0041f2ce                  return 1;
0041f2c7                  break;
0041f2c7              }
0041f2da              case 0x2e:
0041f2da              {
0041f2da                  PStringBase<char>::set(arg3, "FONT");
0041f2df                  int32_t eax_47;
0041f2df                  eax_47 = 1;
0041f2e1                  return 1;
0041f2da                  break;
0041f2da              }
0041f2ed              case 0x2f:
0041f2ed              {
0041f2ed                  PStringBase<char>::set(arg3, "FONT_LOCAL");
0041f2f2                  int32_t eax_48;
0041f2f2                  eax_48 = 1;
0041f2f4                  return 1;
0041f2ed                  break;
0041f2ed              }
0041f300              case 0x30:
0041f300              {
0041f300                  PStringBase<char>::set(arg3, "STRING_STATE");
0041f305                  int32_t eax_49;
0041f305                  eax_49 = 1;
0041f307                  return 1;
0041f300                  break;
0041f300              }
0041f313              case 0x31:
0041f313              {
0041f313                  PStringBase<char>::set(arg3, "DBPROPERTIES");
0041f318                  return 1;
0041f313                  break;
0041f313              }
0041f1e3              case 0x43:
0041f1e3              {
0041f1e3                  PStringBase<char>::set(arg3, "RENDER_MESH");
0041f1e8                  int32_t eax_34;
0041f1e8                  eax_34 = 1;
0041f1ea                  return 1;
0041f1e3                  break;
0041f1e3              }
0041ef60          }
0041ef60      
0041f31a      return 0;
0041ef50  }

0041f31d                                                                                         8d 49 00                               .I.
0041f320  uint32_t jump_table_41f320[0x43] = 
0041f320  {
0041f320      [0x00] =  0x0041ef67
0041f324      [0x01] =  0x0041ef7a
0041f328      [0x02] =  0x0041ef8d
0041f32c      [0x03] =  0x0041efa0
0041f330      [0x04] =  0x0041efb3
0041f334      [0x05] =  0x0041efc6
0041f338      [0x06] =  0x0041efd9
0041f33c      [0x07] =  0x0041efec
0041f340      [0x08] =  0x0041efff
0041f344      [0x09] =  0x0041f012
0041f348      [0x0a] =  0x0041f025
0041f34c      [0x0b] =  0x0041f038
0041f350      [0x0c] =  0x0041f04b
0041f354      [0x0d] =  0x0041f05e
0041f358      [0x0e] =  0x0041f071
0041f35c      [0x0f] =  0x0041f084
0041f360      [0x10] =  0x0041f097
0041f364      [0x11] =  0x0041f0aa
0041f368      [0x12] =  0x0041f0bd
0041f36c      [0x13] =  0x0041f0d0
0041f370      [0x14] =  0x0041f0e3
0041f374      [0x15] =  0x0041f0f6
0041f378      [0x16] =  0x0041f109
0041f37c      [0x17] =  0x0041f11c
0041f380      [0x18] =  0x0041f12f
0041f384      [0x19] =  0x0041f142
0041f388      [0x1a] =  0x0041f155
0041f38c      [0x1b] =  0x0041f168
0041f390      [0x1c] =  0x0041f17b
0041f394      [0x1d] =  0x0041f18e
0041f398      [0x1e] =  0x0041f1a1
0041f39c      [0x1f] =  0x0041f1b4
0041f3a0      [0x20] =  0x0041f1c7
0041f3a4      [0x21] =  0x0041f1ed
0041f3a8      [0x22] =  0x0041f200
0041f3ac      [0x23] =  0x0041f213
0041f3b0      [0x24] =  0x0041f226
0041f3b4      [0x25] =  0x0041f239
0041f3b8      [0x26] =  0x0041f24c
0041f3bc      [0x27] =  0x0041f25f
0041f3c0      [0x28] =  0x0041f272
0041f3c4      [0x29] =  0x0041f285
0041f3c8      [0x2a] =  0x0041f298
0041f3cc      [0x2b] =  0x0041f2ab
0041f3d0      [0x2c] =  0x0041f2be
0041f3d4      [0x2d] =  0x0041f2d1
0041f3d8      [0x2e] =  0x0041f2e4
0041f3dc      [0x2f] =  0x0041f2f7
0041f3e0      [0x30] =  0x0041f30a
0041f3e4      [0x31] =  0x0041f31a
0041f3e8      [0x32] =  0x0041f31a
0041f3ec      [0x33] =  0x0041f31a
0041f3f0      [0x34] =  0x0041f31a
0041f3f4      [0x35] =  0x0041f31a
0041f3f8      [0x36] =  0x0041f31a
0041f3fc      [0x37] =  0x0041f31a
0041f400      [0x38] =  0x0041f31a
0041f404      [0x39] =  0x0041f31a
0041f408      [0x3a] =  0x0041f31a
0041f40c      [0x3b] =  0x0041f31a
0041f410      [0x3c] =  0x0041f31a
0041f414      [0x3d] =  0x0041f31a
0041f418      [0x3e] =  0x0041f31a
0041f41c      [0x3f] =  0x0041f31a
0041f420      [0x40] =  0x0041f31a
0041f424      [0x41] =  0x0041f31a
0041f428      [0x42] =  0x0041f1da
0041f42c  }

0041f42c                                      90 90 90 90                                                              ....

0041f430  void __thiscall DBTypeDef::DBTypeDef(class DBTypeDef* this, class DBTypeDef const* arg2)

0041f430  {
0041f438      uint32_t* this_1 = this;
0041f43a      *(uint32_t*)this_1 = arg2->m_base_did.id;
0041f43f      this_1[1] = arg2->m_top_did.id;
0041f442      this_1[2] = 0;
0041f442      this_1[3] = 0;
0041f442      this_1[4] = 0;
0041f453      SmartArray<PStringBase<char>,1>::operator=(&this_1[2], &arg2->m_extensions.m_data);
0041f45b      this_1[5] = arg2->m_packVersion;
0041f461      this_1[6] = arg2->m_updateType;
0041f467      this_1[7] = arg2->m_bHasFile;
0041f46a      uint32_t eax_1;
0041f46a      eax_1 = arg2->m_bIsPortalType;
0041f46d      *(uint8_t*)((char*)this_1 + 0x1d) = eax_1;
0041f470      enum DBUpdateType::Type ecx_2;
0041f470      ecx_2 = arg2->m_bIsCellType;
0041f473      *(uint8_t*)((char*)this_1 + 0x1e) = ecx_2;
0041f479      *(uint8_t*)((char*)this_1 + 0x1f) = arg2->m_bIsLocalType;
0041f47c      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_strDataDir.m_charbuffer;
0041f47f      this_1[8] = m_charbuffer;
0041f486      InterlockedIncrement(&m_charbuffer[-1]);
0041f48f      this_1[9] = arg2->m_bIsClientType;
0041f495      *(uint8_t*)((char*)this_1 + 0x25) = arg2->m_bIsServerType;
0041f49b      *(uint8_t*)((char*)this_1 + 0x26) = arg2->m_bIsEngineType;
0041f4a1      *(uint8_t*)((char*)this_1 + 0x27) = arg2->m_bIsDIDPackedToDats;
0041f4a7      this_1[0xa] = arg2->m_bIsWBEditable;
0041f4ad      *(uint8_t*)((char*)this_1 + 0x29) = arg2->m_bIsCategorized;
0041f4b3      *(uint8_t*)((char*)this_1 + 0x2a) = arg2->m_bForceExpire;
0041f4b9      int32_t edx_3;
0041f4b9      edx_3 = arg2->m_freelistDef.m_bRecycle;
0041f4b9      *(uint8_t*)((char*)edx_3)[1] = arg2->m_freelistDef.m_bShrink;
0041f4bb      this_1[0xb] = edx_3;
0041f4bb      this_1[0xc] = arg2->m_freelistDef.m_nIdealSize;
0041f4bb      this_1[0xd] = arg2->m_freelistDef.m_nMaxSize;
0041f430  }

0041f4d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0041f4e0  uint8_t __thiscall HashTable<unsigned long,DBTypeDef,0>::add(class HashTable<unsigned long,DBTypeDef,0>* this, uint32_t const* arg2, class DBTypeDef const* arg3)

0041f4e0  {
0041f4eb      void* esi = operator new(0x40);
0041f4eb      
0041f4f2      if (esi == 0)
0041f512          esi = nullptr;
0041f4f2      else
0041f4f2      {
0041f4fe          *(uint32_t*)esi = *(uint32_t*)arg2;
0041f504          *(uint32_t*)((char*)esi + 4) = 0;
0041f50b          DBTypeDef::DBTypeDef(((char*)esi + 8), arg3);
0041f4f2      }
0041f4f2      
0041f51f      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
0041f576          return 1;
0041f576      
0041f523      if (esi != 0)
0041f523      {
0041f528          int32_t* edi_2 = (*(uint32_t*)((char*)esi + 0x28) - 0x14);
0041f528          
0041f53b          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0041f543              **(uint32_t**)edi_2(1);
0041f543          
0041f552          if ((*(uint32_t*)((char*)esi + 0x14) & 0x80000000) == 0x80000000)
0041f552          {
0041f554              class PStringBase<char>* ecx_4 = *(uint32_t*)((char*)esi + 0x10);
0041f554              
0041f559              if (ecx_4 != 0)
0041f55d                  PStringBase<char>::`vector deleting destructor'(ecx_4, 3);
0041f552          }
0041f552          
0041f563          operator delete(esi);
0041f523      }
0041f523      
0041f56f      return 0;
0041f4e0  }

0041f579                                                                             90 90 90 90 90 90 90                           .......

0041f580  uint8_t MasterDBMap::InitDBTypeDef_Internal(class MasterDBMap* this @ ecx)

0041f580  {
0041f58b      int32_t var_38;
0041f58b      DBTypeDef::DBTypeDef(&var_38);
0041f5a0      var_38 = 0;
0041f5a4      int32_t var_34 = 0;
0041f5a8      int32_t var_24 = 1;
0041f5ac      int32_t var_20 = 2;
0041f5b4      char var_1c = 0;
0041f5b8      char var_1b = 0;
0041f5bc      char var_1a = 1;
0041f5c1      char var_19 = 0;
0041f5c5      void* var_18;
0041f5c5      PStringBase<char>::set(&var_18, &data_7928af);
0041f5d9      char var_14 = 1;
0041f5de      char var_13 = 1;
0041f5e3      char var_12 = 1;
0041f5e8      char var_11 = 0;
0041f5ec      char var_10 = 0;
0041f5f0      char var_f = 0;
0041f5f4      char var_c = 0;
0041f5f8      char var_b = 1;
0041f5fd      int32_t var_8 = 0x15;
0041f605      int32_t var_4 = 0x90;
0041f60d      char var_e = 0;
0041f611      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_LAND_BLOCK, &var_38);
0041f61f      int32_t var_28 = 0;
0041f623      var_38 = 0;
0041f627      int32_t var_34_1 = 0;
0041f62b      void* var_3c;
0041f62b      PStringBase<char>::PStringBase<char>(&var_3c, ".lbi");
0041f639      class PStringBase<char>* var_30;
0041f639      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041f648      int32_t* ebp_1 = ((char*)var_3c - 0x14);
0041f648      
0041f657      if ((InterlockedDecrement(&ebp_1[1]) == 0 && ebp_1 != 0))
0041f65f          **(uint32_t**)ebp_1(1);
0041f65f      
0041f66f      int32_t var_24_1 = 1;
0041f673      int32_t var_20_1 = 2;
0041f677      char var_1c_1 = 1;
0041f67c      char var_1b_1 = 0;
0041f680      char var_1a_1 = 1;
0041f685      char var_19_1 = 0;
0041f689      PStringBase<char>::set(&var_18, &data_795b1c);
0041f69d      char var_14_1 = 1;
0041f6a2      char var_13_1 = 1;
0041f6a7      char var_12_1 = 1;
0041f6ac      char var_11_1 = 0;
0041f6b0      char var_10_1 = 0;
0041f6b4      char var_f_1 = 0;
0041f6b8      char var_c_1 = 0;
0041f6bc      char var_b_1 = 1;
0041f6c1      int32_t var_8_1 = 0x15;
0041f6c9      int32_t var_4_1 = 0x90;
0041f6d1      char var_e_1 = 0;
0041f6d5      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_LBI, &var_38);
0041f6e3      int32_t var_28_1 = 0;
0041f6e7      var_38 = 0;
0041f6eb      int32_t var_34_2 = 0;
0041f6ef      int32_t var_24_2 = 1;
0041f6f3      int32_t var_20_2 = 2;
0041f6f7      char var_1c_2 = 0;
0041f6fb      char var_1b_2 = 0;
0041f6ff      char var_1a_2 = 1;
0041f704      char var_19_2 = 0;
0041f708      PStringBase<char>::set(&var_18, &data_7928af);
0041f71c      char var_14_2 = 1;
0041f721      char var_13_2 = 1;
0041f726      char var_12_2 = 1;
0041f72b      char var_11_2 = 0;
0041f72f      char var_10_2 = 0;
0041f733      char var_f_2 = 0;
0041f737      char var_c_2 = 0;
0041f73b      char var_b_2 = 1;
0041f740      int32_t var_8_2 = 0x14;
0041f748      int32_t var_4_2 = 0x90;
0041f750      char var_e_2 = 0;
0041f754      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_CELL, &var_38);
0041f762      int32_t var_28_2 = 0;
0041f766      var_38 = 0;
0041f76a      int32_t var_34_3 = 0;
0041f76e      PStringBase<char>::PStringBase<char>(&var_3c, ".lbo");
0041f77c      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041f785      void* ebp_3 = ((char*)var_3c - 0x14);
0041f785      
0041f794      if ((InterlockedDecrement(((char*)ebp_3 + 4)) == 0 && ebp_3 != 0))
0041f79c          **(uint32_t**)ebp_3(1);
0041f79c      
0041f7a7      int32_t var_24_3 = 1;
0041f7ab      int32_t var_20_3 = 2;
0041f7b3      char var_1c_3 = 1;
0041f7b8      char var_1b_3 = 0;
0041f7bc      char var_1a_3 = 0;
0041f7c0      char var_19_3 = 0;
0041f7c4      PStringBase<char>::set(&var_18, &data_795b18);
0041f7d8      char var_14_3 = 0;
0041f7dc      char var_13_3 = 0;
0041f7e0      char var_12_3 = 1;
0041f7e5      char var_11_3 = 0;
0041f7e9      char var_10_3 = 0;
0041f7ed      char var_f_3 = 0;
0041f7f1      char var_c_3 = 0;
0041f7f5      char var_b_3 = 1;
0041f7fa      int32_t var_8_3 = 3;
0041f802      int32_t var_4_3 = 0xf;
0041f80a      char var_e_3 = 0;
0041f80e      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_LBO, &var_38);
0041f81c      int32_t var_28_3 = 0;
0041f820      var_38 = 0;
0041f824      int32_t var_34_4 = 0;
0041f828      PStringBase<char>::PStringBase<char>(&var_3c, ".ins");
0041f836      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041f83f      void* ebp_5 = ((char*)var_3c - 0x14);
0041f83f      
0041f84e      if ((InterlockedDecrement(((char*)ebp_5 + 4)) == 0 && ebp_5 != 0))
0041f856          **(uint32_t**)ebp_5(1);
0041f856      
0041f861      int32_t var_24_4 = 1;
0041f865      int32_t var_20_4 = 2;
0041f86d      char var_1c_4 = 1;
0041f872      char var_1b_4 = 0;
0041f876      char var_1a_4 = 0;
0041f87a      char var_19_4 = 0;
0041f87e      PStringBase<char>::set(&var_18, &data_795b14);
0041f892      char var_14_4 = 0;
0041f896      char var_13_4 = 0;
0041f89a      char var_12_4 = 1;
0041f89f      char var_11_4 = 0;
0041f8a3      char var_10_4 = 0;
0041f8a7      char var_f_4 = 0;
0041f8ab      char var_c_4 = 0;
0041f8af      char var_b_4 = 1;
0041f8b4      int32_t var_8_4 = 3;
0041f8bc      int32_t var_4_4 = 0xf;
0041f8c4      char var_e_4 = 0;
0041f8c8      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_INSTANTIATION, &var_38);
0041f8d6      int32_t var_28_4 = 0;
0041f8da      var_38 = 0x1000000;
0041f8e2      int32_t var_34_5 = 0x100ffff;
0041f8ea      PStringBase<char>::PStringBase<char>(&var_3c, ".obj");
0041f8f8      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041f901      void* ebp_7 = ((char*)var_3c - 0x14);
0041f901      
0041f910      if ((InterlockedDecrement(((char*)ebp_7 + 4)) == 0 && ebp_7 != 0))
0041f918          **(uint32_t**)ebp_7(1);
0041f918      
0041f923      int32_t var_24_5 = 1;
0041f927      int32_t var_20_5 = 1;
0041f92b      char var_1c_5 = 1;
0041f930      char var_1b_5 = 1;
0041f935      char var_1a_5 = 0;
0041f939      char var_19_5 = 0;
0041f93d      PStringBase<char>::set(&var_18, "gfxobj");
0041f951      char var_14_5 = 1;
0041f956      char var_13_5 = 1;
0041f95b      char var_12_5 = 1;
0041f960      char var_11_5 = 0;
0041f964      char var_10_5 = 0;
0041f968      char var_f_5 = 0;
0041f96c      char var_c_5 = 0;
0041f970      char var_b_5 = 1;
0041f975      int32_t var_8_5 = 0x64;
0041f97d      int32_t var_4_5 = 0xc8;
0041f985      char var_e_5 = 0;
0041f989      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_GFXOBJ, &var_38);
0041f997      int32_t var_28_5 = 0;
0041f99b      var_38 = 0x2000000;
0041f9a3      int32_t var_34_6 = 0x200ffff;
0041f9ab      PStringBase<char>::PStringBase<char>(&var_3c, ".set");
0041f9b9      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041f9c2      void* ebp_9 = ((char*)var_3c - 0x14);
0041f9c2      
0041f9d1      if ((InterlockedDecrement(((char*)ebp_9 + 4)) == 0 && ebp_9 != 0))
0041f9d9          **(uint32_t**)ebp_9(1);
0041f9d9      
0041f9e4      int32_t var_24_6 = 1;
0041f9e8      int32_t var_20_6 = 1;
0041f9ec      char var_1c_6 = 1;
0041f9f1      char var_1b_6 = 1;
0041f9f6      char var_1a_6 = 0;
0041f9fa      char var_19_6 = 0;
0041f9fe      PStringBase<char>::set(&var_18, "setup");
0041fa12      char var_14_6 = 1;
0041fa17      char var_13_6 = 1;
0041fa1c      char var_12_6 = 1;
0041fa21      char var_11_6 = 0;
0041fa25      char var_10_6 = 0;
0041fa29      char var_f_6 = 0;
0041fa2d      char var_c_6 = 0;
0041fa31      char var_b_6 = 1;
0041fa36      int32_t var_8_6 = 0x19;
0041fa3e      int32_t var_4_6 = 0x64;
0041fa46      char var_e_6 = 0;
0041fa4a      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_SETUP, &var_38);
0041fa58      int32_t var_28_6 = 0;
0041fa5c      var_38 = 0x3000000;
0041fa64      int32_t var_34_7 = 0x300ffff;
0041fa6c      PStringBase<char>::PStringBase<char>(&var_3c, ".anm");
0041fa7a      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fa83      void* ebp_11 = ((char*)var_3c - 0x14);
0041fa83      
0041fa92      if ((InterlockedDecrement(((char*)ebp_11 + 4)) == 0 && ebp_11 != 0))
0041fa9a          **(uint32_t**)ebp_11(1);
0041fa9a      
0041faa5      int32_t var_24_7 = 1;
0041faa9      int32_t var_20_7 = 1;
0041faad      char var_1c_7 = 1;
0041fab2      char var_1b_7 = 1;
0041fab7      char var_1a_7 = 0;
0041fabb      char var_19_7 = 0;
0041fabf      PStringBase<char>::set(&var_18, "anim");
0041fad3      char var_14_7 = 1;
0041fad8      char var_13_7 = 1;
0041fadd      char var_12_7 = 1;
0041fae2      char var_11_7 = 0;
0041fae6      char var_10_7 = 0;
0041faea      char var_f_7 = 0;
0041faee      char var_c_7 = 0;
0041faf2      char var_b_7 = 1;
0041faf7      int32_t var_8_7 = 0x14;
0041faff      int32_t var_4_7 = 0x50;
0041fb07      char var_e_7 = 0;
0041fb0b      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_ANIM, &var_38);
0041fb19      int32_t var_28_7 = 0;
0041fb1d      var_38 = 0;
0041fb21      int32_t var_34_8 = 0;
0041fb25      PStringBase<char>::PStringBase<char>(&var_3c, ".ahk");
0041fb33      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fb3c      void* ebp_13 = ((char*)var_3c - 0x14);
0041fb3c      
0041fb4b      if ((InterlockedDecrement(((char*)ebp_13 + 4)) == 0 && ebp_13 != 0))
0041fb53          **(uint32_t**)ebp_13(1);
0041fb53      
0041fb5e      int32_t var_24_8 = 1;
0041fb62      int32_t var_20_8 = 1;
0041fb66      char var_1c_8 = 1;
0041fb6b      char var_1b_8 = 0;
0041fb6f      char var_1a_8 = 0;
0041fb73      char var_19_8 = 0;
0041fb77      PStringBase<char>::set(&var_18, &data_795af8);
0041fb8b      char var_14_8 = 0;
0041fb8f      char var_13_8 = 0;
0041fb93      char var_12_8 = 1;
0041fb98      char var_11_8 = 0;
0041fb9c      char var_10_8 = 0;
0041fba0      char var_f_8 = 0;
0041fba4      char var_c_8 = 0;
0041fba8      char var_b_8 = 1;
0041fbad      int32_t var_8_8 = 3;
0041fbb5      int32_t var_4_8 = 0xf;
0041fbbd      char var_e_8 = 0;
0041fbc1      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_ANIMATION_HOOK, &var_38);
0041fbcf      int32_t var_28_8 = 0;
0041fbd3      var_38 = 0x4000000;
0041fbdb      int32_t var_34_9 = 0x400ffff;
0041fbe3      PStringBase<char>::PStringBase<char>(&var_3c, ".pal");
0041fbf1      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fbfa      void* ebp_15 = ((char*)var_3c - 0x14);
0041fbfa      
0041fc09      if ((InterlockedDecrement(((char*)ebp_15 + 4)) == 0 && ebp_15 != 0))
0041fc11          **(uint32_t**)ebp_15(1);
0041fc11      
0041fc1c      int32_t var_24_9 = 1;
0041fc20      int32_t var_20_9 = 1;
0041fc24      char var_1c_9 = 1;
0041fc29      char var_1b_9 = 1;
0041fc2e      char var_1a_9 = 0;
0041fc32      char var_19_9 = 0;
0041fc36      PStringBase<char>::set(&var_18, "palette");
0041fc4a      char var_14_9 = 1;
0041fc4f      char var_13_9 = 0;
0041fc53      char var_12_9 = 1;
0041fc58      char var_11_9 = 0;
0041fc5c      char var_10_9 = 0;
0041fc60      char var_f_9 = 0;
0041fc64      char var_c_9 = 0;
0041fc68      char var_b_9 = 1;
0041fc6d      int32_t var_8_9 = 0x3c;
0041fc75      int32_t var_4_9 = 0x64;
0041fc7d      char var_e_9 = 0;
0041fc81      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_PALETTE, &var_38);
0041fc8f      int32_t var_28_9 = 0;
0041fc93      var_38 = 0x5000000;
0041fc9b      int32_t var_34_10 = 0x5ffffff;
0041fca3      PStringBase<char>::PStringBase<char>(&var_3c, ".texture");
0041fcb1      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fcba      void* ebp_17 = ((char*)var_3c - 0x14);
0041fcba      
0041fcc9      if ((InterlockedDecrement(((char*)ebp_17 + 4)) == 0 && ebp_17 != 0))
0041fcd1          **(uint32_t**)ebp_17(1);
0041fcd1      
0041fcdc      int32_t var_24_10 = 1;
0041fce0      int32_t var_20_10 = 1;
0041fce4      char var_1c_10 = 1;
0041fce9      char var_1b_10 = 1;
0041fcee      char var_1a_10 = 0;
0041fcf2      char var_19_10 = 0;
0041fcf6      PStringBase<char>::set(&var_18, "textures");
0041fd0a      char var_14_10 = 1;
0041fd0f      char var_13_10 = 0;
0041fd13      char var_12_10 = 1;
0041fd18      char var_11_10 = 0;
0041fd1c      char var_10_10 = 0;
0041fd20      char var_f_10 = 1;
0041fd25      char var_c_10 = 0;
0041fd29      char var_b_10 = 1;
0041fd2e      int32_t var_8_10 = 0x64;
0041fd36      int32_t var_4_10 = 0x190;
0041fd3e      char var_e_10 = 0;
0041fd42      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_SURFACETEXTURE, &var_38);
0041fd50      int32_t var_28_10 = 0;
0041fd54      var_38 = 0x6000000;
0041fd5c      int32_t var_34_11 = 0x7ffffff;
0041fd64      PStringBase<char>::PStringBase<char>(&var_3c, ".jpg");
0041fd72      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fd7b      void* ebp_19 = ((char*)var_3c - 0x14);
0041fd7b      
0041fd8a      if ((InterlockedDecrement(((char*)ebp_19 + 4)) == 0 && ebp_19 != 0))
0041fd92          **(uint32_t**)ebp_19(1);
0041fd92      
0041fd9d      PStringBase<char>::PStringBase<char>(&var_3c, ".dds");
0041fdab      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fdb4      void* ebp_21 = ((char*)var_3c - 0x14);
0041fdb4      
0041fdc3      if ((InterlockedDecrement(((char*)ebp_21 + 4)) == 0 && ebp_21 != 0))
0041fdcb          **(uint32_t**)ebp_21(1);
0041fdcb      
0041fdd6      PStringBase<char>::PStringBase<char>(&var_3c, ".tga");
0041fde4      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fded      void* ebp_23 = ((char*)var_3c - 0x14);
0041fded      
0041fdfc      if ((InterlockedDecrement(((char*)ebp_23 + 4)) == 0 && ebp_23 != 0))
0041fe04          **(uint32_t**)ebp_23(1);
0041fe04      
0041fe0f      PStringBase<char>::PStringBase<char>(&var_3c, ".iff");
0041fe1d      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fe26      void* ebp_25 = ((char*)var_3c - 0x14);
0041fe26      
0041fe35      if ((InterlockedDecrement(((char*)ebp_25 + 4)) == 0 && ebp_25 != 0))
0041fe3d          **(uint32_t**)ebp_25(1);
0041fe3d      
0041fe48      PStringBase<char>::PStringBase<char>(&var_3c, ".256");
0041fe56      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fe5f      void* ebp_27 = ((char*)var_3c - 0x14);
0041fe5f      
0041fe6e      if ((InterlockedDecrement(((char*)ebp_27 + 4)) == 0 && ebp_27 != 0))
0041fe76          **(uint32_t**)ebp_27(1);
0041fe76      
0041fe81      PStringBase<char>::PStringBase<char>(&var_3c, ".csi");
0041fe8f      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fe98      void* ebp_29 = ((char*)var_3c - 0x14);
0041fe98      
0041fea7      if ((InterlockedDecrement(((char*)ebp_29 + 4)) == 0 && ebp_29 != 0))
0041feaf          **(uint32_t**)ebp_29(1);
0041feaf      
0041feba      PStringBase<char>::PStringBase<char>(&var_3c, ".alp");
0041fec8      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041fed1      void* ebp_31 = ((char*)var_3c - 0x14);
0041fed1      
0041fee0      if ((InterlockedDecrement(((char*)ebp_31 + 4)) == 0 && ebp_31 != 0))
0041fee8          **(uint32_t**)ebp_31(1);
0041fee8      
0041fef3      int32_t var_24_11 = 1;
0041fef7      int32_t var_20_11 = 1;
0041fefb      char var_1c_11 = 1;
0041ff00      char var_1b_11 = 1;
0041ff05      char var_1a_11 = 0;
0041ff09      char var_19_11 = 0;
0041ff0d      PStringBase<char>::set(&var_18, "surfaces");
0041ff21      char var_14_11 = 1;
0041ff26      char var_13_11 = 0;
0041ff2a      char var_12_11 = 1;
0041ff2f      char var_11_11 = 0;
0041ff33      char var_10_11 = 0;
0041ff37      char var_f_11 = 1;
0041ff3c      char var_c_11 = 0;
0041ff40      char var_b_11 = 1;
0041ff45      int32_t var_8_11 = 0x64;
0041ff4d      int32_t var_4_11 = 0x190;
0041ff55      char var_e_11 = 0;
0041ff59      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_RENDERSURFACE, &var_38);
0041ff67      int32_t var_28_11 = 0;
0041ff6b      var_38 = 0x8000000;
0041ff73      int32_t var_34_12 = 0x800ffff;
0041ff7b      PStringBase<char>::PStringBase<char>(&var_3c, ".surface");
0041ff89      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0041ff92      void* ebp_33 = ((char*)var_3c - 0x14);
0041ff92      
0041ffa1      if ((InterlockedDecrement(((char*)ebp_33 + 4)) == 0 && ebp_33 != 0))
0041ffa9          **(uint32_t**)ebp_33(1);
0041ffa9      
0041ffb4      int32_t var_24_12 = 1;
0041ffb8      int32_t var_20_12 = 1;
0041ffbc      char var_1c_12 = 1;
0041ffc1      char var_1b_12 = 1;
0041ffc6      char var_1a_12 = 0;
0041ffca      char var_19_12 = 0;
0041ffce      PStringBase<char>::set(&var_18, "materials");
0041ffe2      char var_14_12 = 1;
0041ffe7      char var_13_12 = 0;
0041ffeb      char var_12_12 = 1;
0041fff0      char var_11_12 = 0;
0041fff4      char var_10_12 = 0;
0041fff8      char var_f_12 = 0;
0041fffc      char var_c_12 = 0;
00420000      char var_b_12 = 1;
00420005      int32_t var_8_12 = 0x32;
0042000d      int32_t var_4_12 = 0xc8;
00420015      char var_e_12 = 0;
00420019      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_SURFACE, &var_38);
00420027      int32_t var_28_12 = 0;
0042002b      var_38 = 0x9000000;
00420033      int32_t var_34_13 = 0x900ffff;
0042003b      PStringBase<char>::PStringBase<char>(&var_3c, ".dsc");
00420049      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420052      void* ebp_35 = ((char*)var_3c - 0x14);
00420052      
00420061      if ((InterlockedDecrement(((char*)ebp_35 + 4)) == 0 && ebp_35 != 0))
00420069          **(uint32_t**)ebp_35(1);
00420069      
00420074      int32_t var_24_13 = 1;
00420078      int32_t var_20_13 = 1;
0042007c      char var_1c_13 = 1;
00420081      char var_1b_13 = 1;
00420086      char var_1a_13 = 0;
0042008a      char var_19_13 = 0;
0042008e      PStringBase<char>::set(&var_18, &data_795ac8);
004200a2      char var_14_13 = 1;
004200a7      char var_13_13 = 1;
004200ac      char var_12_13 = 1;
004200b1      char var_11_13 = 0;
004200b5      char var_10_13 = 0;
004200b9      char var_f_13 = 0;
004200bd      char var_c_13 = 0;
004200c1      char var_b_13 = 1;
004200c6      int32_t var_8_13 = 3;
004200ce      int32_t var_4_13 = 0xf;
004200d6      char var_e_13 = 0;
004200da      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_MTABLE, &var_38);
004200e8      int32_t var_28_13 = 0;
004200ec      var_38 = 0xa000000;
004200f4      int32_t var_34_14 = 0xa00ffff;
004200fc      PStringBase<char>::PStringBase<char>(&var_3c, ".wav");
0042010a      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420113      void* ebp_37 = ((char*)var_3c - 0x14);
00420113      
00420122      if ((InterlockedDecrement(((char*)ebp_37 + 4)) == 0 && ebp_37 != 0))
0042012a          **(uint32_t**)ebp_37(1);
0042012a      
00420135      int32_t var_24_14 = 1;
00420139      int32_t var_20_14 = 1;
0042013d      char var_1c_14 = 1;
00420142      char var_1b_14 = 1;
00420147      char var_1a_14 = 0;
0042014b      char var_19_14 = 0;
0042014f      PStringBase<char>::set(&var_18, "sound");
00420163      char var_14_14 = 1;
00420168      char var_13_14 = 0;
0042016c      char var_12_14 = 1;
00420171      char var_11_14 = 0;
00420175      char var_10_14 = 0;
00420179      char var_f_14 = 0;
0042017d      char var_c_14 = 0;
00420181      char var_b_14 = 1;
00420186      int32_t var_8_14 = 3;
0042018e      int32_t var_4_14 = 0xf;
00420196      char var_e_14 = 0;
0042019a      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_WAVE, &var_38);
004201a8      int32_t var_28_14 = 0;
004201ac      var_38 = 0xd000000;
004201b4      int32_t var_34_15 = 0xd00ffff;
004201bc      PStringBase<char>::PStringBase<char>(&var_3c, ".env");
004201ca      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004201d3      void* ebp_39 = ((char*)var_3c - 0x14);
004201d3      
004201e2      if ((InterlockedDecrement(((char*)ebp_39 + 4)) == 0 && ebp_39 != 0))
004201ea          **(uint32_t**)ebp_39(1);
004201ea      
004201f5      int32_t var_24_15 = 1;
004201f9      int32_t var_20_15 = 1;
004201fd      char var_1c_15 = 1;
00420202      char var_1b_15 = 1;
00420207      char var_1a_15 = 0;
0042020b      char var_19_15 = 0;
0042020f      PStringBase<char>::set(&var_18, &data_795abc);
00420223      char var_14_15 = 1;
00420228      char var_13_15 = 1;
0042022d      char var_12_15 = 1;
00420232      char var_11_15 = 0;
00420236      char var_10_15 = 0;
0042023a      char var_f_15 = 0;
0042023e      char var_c_15 = 0;
00420242      char var_b_15 = 1;
00420247      int32_t var_8_15 = 3;
0042024f      int32_t var_4_15 = 0xf;
00420257      char var_e_15 = 0;
0042025b      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_ENVIRONMENT, &var_38);
0042026e      int32_t var_28_15 = 0;
00420272      var_38 = 0xe000007;
00420276      int32_t var_34_16 = 0xe000007;
0042027a      PStringBase<char>::PStringBase<char>(&var_3c, ".cps");
00420288      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420291      void* ebp_41 = ((char*)var_3c - 0x14);
00420291      
004202a0      if ((InterlockedDecrement(((char*)ebp_41 + 4)) == 0 && ebp_41 != 0))
004202a8          **(uint32_t**)ebp_41(1);
004202a8      
004202b3      int32_t var_24_16 = 1;
004202b7      int32_t var_20_16 = 1;
004202bb      char var_1c_16 = 1;
004202c0      char var_1b_16 = 1;
004202c5      char var_1a_16 = 0;
004202c9      char var_19_16 = 0;
004202cd      PStringBase<char>::set(&var_18, &data_795ab8);
004202e1      char var_14_16 = 1;
004202e6      char var_13_16 = 0;
004202ea      char var_12_16 = 1;
004202ef      char var_11_16 = 0;
004202f3      char var_10_16 = 0;
004202f7      char var_f_16 = 0;
004202fb      char var_c_16 = 0;
004202ff      char var_b_16 = 0;
00420303      int32_t var_8_16 = 1;
00420307      int32_t var_4_16 = 1;
0042030b      char var_e_16 = 0;
0042030f      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_CHAT_POSE_TABLE, &var_38);
00420322      int32_t var_28_16 = 0;
00420326      var_38 = 0xe00000d;
0042032a      int32_t var_34_17 = 0xe00000d;
0042032e      PStringBase<char>::PStringBase<char>(&var_3c, ".hrc");
0042033c      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420345      void* ebp_43 = ((char*)var_3c - 0x14);
00420345      
00420354      if ((InterlockedDecrement(((char*)ebp_43 + 4)) == 0 && ebp_43 != 0))
0042035c          **(uint32_t**)ebp_43(1);
0042035c      
00420367      int32_t var_24_17 = 1;
0042036b      int32_t var_20_17 = 1;
0042036f      char var_1c_17 = 1;
00420374      char var_1b_17 = 1;
00420379      char var_1a_17 = 0;
0042037d      char var_19_17 = 0;
00420381      PStringBase<char>::set(&var_18, "DungeonCfgs");
00420395      char var_14_17 = 1;
0042039a      char var_13_17 = 0;
0042039e      char var_12_17 = 1;
004203a3      char var_11_17 = 0;
004203a7      char var_10_17 = 0;
004203ab      char var_f_17 = 0;
004203af      char var_c_17 = 0;
004203b3      char var_b_17 = 1;
004203b8      int32_t var_8_17 = 3;
004203c0      int32_t var_4_17 = 0xf;
004203c8      char var_e_17 = 0;
004203cc      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_OBJECT_HIERARCHY, &var_38);
004203df      int32_t var_28_17 = 0;
004203e3      var_38 = 0xe00001a;
004203e7      int32_t var_34_18 = 0xe00001a;
004203eb      PStringBase<char>::PStringBase<char>(&var_3c, ".bad");
004203f9      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420402      void* ebp_45 = ((char*)var_3c - 0x14);
00420402      
00420411      if ((InterlockedDecrement(((char*)ebp_45 + 4)) == 0 && ebp_45 != 0))
00420419          **(uint32_t**)ebp_45(1);
00420419      
00420424      int32_t var_24_18 = 1;
00420428      int32_t var_20_18 = 1;
0042042c      char var_1c_18 = 1;
00420431      char var_1b_18 = 1;
00420436      char var_1a_18 = 0;
0042043a      char var_19_18 = 0;
0042043e      PStringBase<char>::set(&var_18, "weenie");
00420452      char var_14_18 = 1;
00420457      char var_13_18 = 1;
0042045c      char var_12_18 = 1;
00420461      char var_11_18 = 0;
00420465      char var_10_18 = 0;
00420469      char var_f_18 = 0;
0042046d      char var_c_18 = 0;
00420471      char var_b_18 = 0;
00420475      int32_t var_8_18 = 1;
00420479      int32_t var_4_18 = 1;
0042047d      char var_e_18 = 0;
00420481      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_BADDATA, &var_38);
00420494      int32_t var_28_18 = 0;
00420498      var_38 = 0xe00001e;
0042049c      int32_t var_34_19 = 0xe00001e;
004204a0      PStringBase<char>::PStringBase<char>(&var_3c, ".taboo");
004204ae      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004204b7      void* ebp_47 = ((char*)var_3c - 0x14);
004204b7      
004204c6      if ((InterlockedDecrement(((char*)ebp_47 + 4)) == 0 && ebp_47 != 0))
004204ce          **(uint32_t**)ebp_47(1);
004204ce      
004204d9      int32_t var_24_19 = 1;
004204dd      int32_t var_20_19 = 1;
004204e1      char var_1c_19 = 1;
004204e6      char var_1b_19 = 1;
004204eb      char var_1a_19 = 0;
004204ef      char var_19_19 = 0;
004204f3      PStringBase<char>::set(&var_18, "weenie");
0042050c      char var_14_19 = 1;
00420511      char var_13_19 = 1;
00420516      char var_12_19 = 1;
0042051b      char var_11_19 = 0;
0042051f      char var_10_19 = 0;
00420523      char var_f_19 = 0;
00420527      char var_c_19 = 0;
0042052b      char var_b_19 = 1;
00420530      int32_t var_8_19 = 3;
00420534      int32_t var_4_19 = 0xf;
0042053c      char var_e_19 = 0;
00420540      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_TABOO_TABLE, &var_38);
00420553      int32_t var_28_19 = 0;
00420557      var_38 = 0xe00001f;
0042055b      int32_t var_34_20 = 0xe00001f;
0042055f      int32_t var_24_20 = 1;
00420563      int32_t var_20_20 = 1;
00420567      char var_1c_20 = 0;
0042056b      char var_1b_20 = 1;
00420570      char var_1a_20 = 0;
00420574      char var_19_20 = 0;
00420578      PStringBase<char>::set(&var_18, &data_7928af);
0042058c      char var_14_20 = 1;
00420591      char var_13_20 = 1;
00420596      char var_12_20 = 1;
0042059b      char var_11_20 = 0;
0042059f      char var_10_20 = 0;
004205a3      char var_f_20 = 0;
004205a7      char var_c_20 = 0;
004205ab      char var_b_20 = 1;
004205b0      int32_t var_8_20 = 3;
004205b4      int32_t var_4_20 = 0xf;
004205bc      char var_e_20 = 0;
004205c0      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_FILE2ID_TABLE, &var_38);
004205d3      int32_t var_28_20 = 0;
004205d7      var_38 = 0xe000020;
004205db      int32_t var_34_21 = 0xe000020;
004205df      PStringBase<char>::PStringBase<char>(&var_3c, ".nft");
004205ed      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004205f6      void* ebp_49 = ((char*)var_3c - 0x14);
004205f6      
00420605      if ((InterlockedDecrement(((char*)ebp_49 + 4)) == 0 && ebp_49 != 0))
0042060d          **(uint32_t**)ebp_49(1);
0042060d      
00420618      int32_t var_24_21 = 1;
0042061c      int32_t var_20_21 = 1;
00420620      char var_1c_21 = 1;
00420625      char var_1b_21 = 1;
0042062a      char var_1a_21 = 0;
0042062e      char var_19_21 = 0;
00420632      PStringBase<char>::set(&var_18, "namefilter");
00420646      char var_14_21 = 1;
0042064b      char var_13_21 = 1;
00420650      char var_12_21 = 1;
00420655      char var_11_21 = 0;
00420659      char var_10_21 = 0;
0042065d      char var_f_21 = 0;
00420661      char var_c_21 = 0;
00420665      char var_b_21 = 1;
0042066a      int32_t var_8_21 = 3;
00420672      int32_t var_4_21 = 0xf;
0042067a      char var_e_21 = 0;
0042067e      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_NAME_FILTER_TABLE, &var_38);
0042068c      int32_t var_28_21 = 0;
00420690      var_38 = 0xe020000;
00420698      int32_t var_34_22 = 0xe02ffff;
004206a0      PStringBase<char>::PStringBase<char>(&var_3c, ".monprop");
004206ae      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004206b7      void* ebp_51 = ((char*)var_3c - 0x14);
004206b7      
004206c6      if ((InterlockedDecrement(((char*)ebp_51 + 4)) == 0 && ebp_51 != 0))
004206ce          **(uint32_t**)ebp_51(1);
004206ce      
004206d9      int32_t var_24_22 = 1;
004206dd      int32_t var_20_22 = 1;
004206e1      char var_1c_22 = 1;
004206e6      char var_1b_22 = 1;
004206eb      char var_1a_22 = 0;
004206ef      char var_19_22 = 0;
004206f3      PStringBase<char>::set(&var_18, "properties");
00420707      char var_14_22 = 0;
0042070b      char var_13_22 = 1;
00420710      char var_12_22 = 1;
00420715      char var_11_22 = 0;
00420719      char var_10_22 = 0;
0042071d      char var_f_22 = 0;
00420721      char var_c_22 = 0;
00420725      char var_b_22 = 1;
0042072a      int32_t var_8_22 = 3;
00420732      int32_t var_4_22 = 0xf;
0042073a      char var_e_22 = 0;
0042073e      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_MONITOREDPROPERTIES, &var_38);
0042074c      int32_t var_28_22 = 0;
00420750      var_38 = 0xf000000;
00420758      int32_t var_34_23 = 0xf00ffff;
00420760      PStringBase<char>::PStringBase<char>(&var_3c, ".pst");
0042076e      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420777      void* ebp_53 = ((char*)var_3c - 0x14);
00420777      
00420786      if ((InterlockedDecrement(((char*)ebp_53 + 4)) == 0 && ebp_53 != 0))
0042078e          **(uint32_t**)ebp_53(1);
0042078e      
00420799      int32_t var_24_23 = 1;
0042079d      int32_t var_20_23 = 1;
004207a1      char var_1c_23 = 1;
004207a6      char var_1b_23 = 1;
004207ab      char var_1a_23 = 0;
004207af      char var_19_23 = 0;
004207b3      PStringBase<char>::set(&var_18, "palset");
004207c7      char var_14_23 = 1;
004207cc      char var_13_23 = 1;
004207d1      char var_12_23 = 1;
004207d6      char var_11_23 = 0;
004207da      char var_10_23 = 0;
004207de      char var_f_23 = 0;
004207e2      char var_c_23 = 0;
004207e6      char var_b_23 = 1;
004207eb      int32_t var_8_23 = 0xa;
004207f3      int32_t var_4_23 = 0x28;
004207fb      char var_e_23 = 0;
004207ff      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_PAL_SET, &var_38);
0042080d      int32_t var_28_23 = 0;
00420811      var_38 = 0x10000000;
00420819      int32_t var_34_24 = 0x1000ffff;
00420821      PStringBase<char>::PStringBase<char>(&var_3c, ".clo");
0042082f      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420838      void* ebp_55 = ((char*)var_3c - 0x14);
00420838      
00420847      if ((InterlockedDecrement(((char*)ebp_55 + 4)) == 0 && ebp_55 != 0))
0042084f          **(uint32_t**)ebp_55(1);
0042084f      
0042085a      int32_t var_24_24 = 1;
0042085e      int32_t var_20_24 = 1;
00420862      char var_1c_24 = 1;
00420867      char var_1b_24 = 1;
0042086c      char var_1a_24 = 0;
00420870      char var_19_24 = 0;
00420874      PStringBase<char>::set(&var_18, "clothing");
00420888      char var_14_24 = 1;
0042088d      char var_13_24 = 1;
00420892      char var_12_24 = 1;
00420897      char var_11_24 = 0;
0042089b      char var_10_24 = 0;
0042089f      char var_f_24 = 0;
004208a3      char var_c_24 = 0;
004208a7      char var_b_24 = 1;
004208ac      int32_t var_8_24 = 0x14;
004208b4      int32_t var_4_24 = 0x28;
004208bc      char var_e_24 = 0;
004208c0      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_CLOTHING, &var_38);
004208ce      int32_t var_28_24 = 0;
004208d2      var_38 = 0x11000000;
004208da      int32_t var_34_25 = 0x1100ffff;
004208e2      PStringBase<char>::PStringBase<char>(&var_3c, ".deg");
004208f0      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004208f9      void* ebp_57 = ((char*)var_3c - 0x14);
004208f9      
00420908      if ((InterlockedDecrement(((char*)ebp_57 + 4)) == 0 && ebp_57 != 0))
00420910          **(uint32_t**)ebp_57(1);
00420910      
0042091b      int32_t var_24_25 = 1;
0042091f      int32_t var_20_25 = 1;
00420923      char var_1c_25 = 1;
00420928      char var_1b_25 = 1;
0042092d      char var_1a_25 = 0;
00420931      char var_19_25 = 0;
00420935      PStringBase<char>::set(&var_18, &data_795a74);
00420949      char var_14_25 = 1;
0042094e      char var_13_25 = 0;
00420952      char var_12_25 = 1;
00420957      char var_11_25 = 0;
0042095b      char var_10_25 = 0;
0042095f      char var_f_25 = 0;
00420963      char var_c_25 = 0;
00420967      char var_b_25 = 1;
0042096c      int32_t var_8_25 = 0x50;
00420974      int32_t var_4_25 = 0xc8;
0042097c      char var_e_25 = 0;
00420980      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_DEGRADEINFO, &var_38);
0042098e      int32_t var_28_25 = 0;
00420992      var_38 = 0x12000000;
0042099a      int32_t var_34_26 = 0x1200ffff;
004209a2      PStringBase<char>::PStringBase<char>(&var_3c, ".scn");
004209b0      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004209b9      void* ebp_59 = ((char*)var_3c - 0x14);
004209b9      
004209c8      if ((InterlockedDecrement(((char*)ebp_59 + 4)) == 0 && ebp_59 != 0))
004209d0          **(uint32_t**)ebp_59(1);
004209d0      
004209db      int32_t var_24_26 = 1;
004209df      int32_t var_20_26 = 1;
004209e3      char var_1c_26 = 1;
004209e8      char var_1b_26 = 1;
004209ed      char var_1a_26 = 0;
004209f1      char var_19_26 = 0;
004209f5      PStringBase<char>::set(&var_18, &data_795a70);
00420a09      char var_14_26 = 1;
00420a0e      char var_13_26 = 1;
00420a13      char var_12_26 = 1;
00420a18      char var_11_26 = 0;
00420a1c      char var_10_26 = 0;
00420a20      char var_f_26 = 0;
00420a24      char var_c_26 = 0;
00420a28      char var_b_26 = 1;
00420a2d      int32_t var_8_26 = 0x19;
00420a35      int32_t var_4_26 = 0x64;
00420a3d      char var_e_26 = 0;
00420a41      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_SCENE, &var_38);
00420a4f      int32_t var_28_26 = 0;
00420a53      var_38 = 0x13000000;
00420a5b      int32_t var_34_27 = 0x1300ffff;
00420a63      PStringBase<char>::PStringBase<char>(&var_3c, ".rgn");
00420a71      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420a7a      void* ebp_61 = ((char*)var_3c - 0x14);
00420a7a      
00420a89      if ((InterlockedDecrement(((char*)ebp_61 + 4)) == 0 && ebp_61 != 0))
00420a91          **(uint32_t**)ebp_61(1);
00420a91      
00420a9c      int32_t var_24_27 = 1;
00420aa0      int32_t var_20_27 = 1;
00420aa4      char var_1c_27 = 1;
00420aa9      char var_1b_27 = 1;
00420aae      char var_1a_27 = 0;
00420ab2      char var_19_27 = 0;
00420ab6      PStringBase<char>::set(&var_18, "landscape");
00420aca      char var_14_27 = 1;
00420acf      char var_13_27 = 1;
00420ad4      char var_12_27 = 1;
00420ad9      char var_11_27 = 0;
00420add      char var_10_27 = 0;
00420ae1      char var_f_27 = 0;
00420ae5      char var_c_27 = 0;
00420ae9      char var_b_27 = 1;
00420aee      int32_t var_8_27 = 3;
00420af6      int32_t var_4_27 = 0xf;
00420afe      char var_e_27 = 1;
00420b03      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_REGION, &var_38);
00420b11      int32_t var_28_27 = 0;
00420b15      var_38 = 0x14000000;
00420b1d      int32_t var_34_28 = 0x1400ffff;
00420b25      PStringBase<char>::PStringBase<char>(&var_3c, ".keymap");
00420b33      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420b3c      void* ebp_63 = ((char*)var_3c - 0x14);
00420b3c      
00420b4b      if ((InterlockedDecrement(((char*)ebp_63 + 4)) == 0 && ebp_63 != 0))
00420b53          **(uint32_t**)ebp_63(1);
00420b53      
00420b5e      int32_t var_24_28 = 1;
00420b62      int32_t var_20_28 = 1;
00420b66      char var_1c_28 = 1;
00420b6b      char var_1b_28 = 1;
00420b70      char var_1a_28 = 0;
00420b74      char var_19_28 = 0;
00420b78      PStringBase<char>::set(&var_18, "keymap");
00420b8c      char var_14_28 = 1;
00420b91      char var_13_28 = 0;
00420b95      char var_12_28 = 1;
00420b9a      char var_11_28 = 0;
00420b9e      char var_10_28 = 0;
00420ba2      char var_f_28 = 0;
00420ba6      char var_c_28 = 0;
00420baa      char var_b_28 = 1;
00420baf      int32_t var_8_28 = 3;
00420bb7      int32_t var_4_28 = 0xf;
00420bbf      char var_e_28 = 0;
00420bc3      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_KEYMAP, &var_38);
00420bd1      int32_t var_28_28 = 0;
00420bd5      var_38 = 0x15000000;
00420bdd      int32_t var_34_29 = 0x15ffffff;
00420be5      PStringBase<char>::PStringBase<char>(&var_3c, ".rtexture");
00420bf3      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420bfc      void* ebp_65 = ((char*)var_3c - 0x14);
00420bfc      
00420c0b      if ((InterlockedDecrement(((char*)ebp_65 + 4)) == 0 && ebp_65 != 0))
00420c13          **(uint32_t**)ebp_65(1);
00420c13      
00420c1e      int32_t var_24_29 = 1;
00420c22      int32_t var_20_29 = 1;
00420c26      char var_1c_29 = 1;
00420c2b      char var_1b_29 = 1;
00420c30      char var_1a_29 = 0;
00420c34      char var_19_29 = 0;
00420c38      PStringBase<char>::set(&var_18, "textures");
00420c4c      char var_14_29 = 1;
00420c51      char var_13_29 = 0;
00420c55      char var_12_29 = 1;
00420c5a      char var_11_29 = 0;
00420c5e      char var_10_29 = 0;
00420c62      char var_f_29 = 1;
00420c67      char var_c_29 = 0;
00420c6b      char var_b_29 = 1;
00420c70      int32_t var_8_29 = 0x80;
00420c78      int32_t var_4_29 = 0x100;
00420c80      char var_e_29 = 0;
00420c84      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_RENDERTEXTURE, &var_38);
00420c92      int32_t var_28_29 = 0;
00420c96      var_38 = 0x16000000;
00420c9e      int32_t var_34_30 = 0x16ffffff;
00420ca6      PStringBase<char>::PStringBase<char>(&var_3c, ".mat");
00420cb4      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420cbd      void* ebp_67 = ((char*)var_3c - 0x14);
00420cbd      
00420ccc      if ((InterlockedDecrement(((char*)ebp_67 + 4)) == 0 && ebp_67 != 0))
00420cd4          **(uint32_t**)ebp_67(1);
00420cd4      
00420cdf      int32_t var_24_30 = 1;
00420ce3      int32_t var_20_30 = 1;
00420ce7      char var_1c_30 = 1;
00420cec      char var_1b_30 = 1;
00420cf1      char var_1a_30 = 0;
00420cf5      char var_19_30 = 0;
00420cf9      PStringBase<char>::set(&var_18, "materials");
00420d0d      char var_14_30 = 1;
00420d12      char var_13_30 = 0;
00420d16      char var_12_30 = 1;
00420d1b      char var_11_30 = 0;
00420d1f      char var_10_30 = 0;
00420d23      char var_f_30 = 0;
00420d27      char var_c_30 = 0;
00420d2b      char var_b_30 = 1;
00420d30      int32_t var_8_30 = 0x40;
00420d38      int32_t var_4_30 = 0x80;
00420d40      char var_e_30 = 1;
00420d45      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_RENDERMATERIAL, &var_38);
00420d53      int32_t var_28_30 = 0;
00420d57      var_38 = 0x17000000;
00420d5f      int32_t var_34_31 = 0x17ffffff;
00420d67      PStringBase<char>::PStringBase<char>(&var_3c, ".mm");
00420d75      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420d7e      void* ebp_69 = ((char*)var_3c - 0x14);
00420d7e      
00420d8d      if ((InterlockedDecrement(((char*)ebp_69 + 4)) == 0 && ebp_69 != 0))
00420d95          **(uint32_t**)ebp_69(1);
00420d95      
00420da0      int32_t var_24_31 = 1;
00420da4      int32_t var_20_31 = 1;
00420da8      char var_1c_31 = 1;
00420dad      char var_1b_31 = 1;
00420db2      char var_1a_31 = 0;
00420db6      char var_19_31 = 0;
00420dba      PStringBase<char>::set(&var_18, "materials");
00420dce      char var_14_31 = 1;
00420dd3      char var_13_31 = 0;
00420dd7      char var_12_31 = 1;
00420ddc      char var_11_31 = 0;
00420de0      char var_10_31 = 0;
00420de4      char var_f_31 = 0;
00420de8      char var_c_31 = 0;
00420dec      char var_b_31 = 1;
00420df1      int32_t var_8_31 = 0x40;
00420df9      int32_t var_4_31 = 0x80;
00420e01      char var_e_31 = 0;
00420e05      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, U" !"#$%&'()*+,-./01C", &var_38);
00420e13      int32_t var_28_31 = 0;
00420e17      var_38 = 0x18000000;
00420e1f      int32_t var_34_32 = 0x18ffffff;
00420e27      PStringBase<char>::PStringBase<char>(&var_3c, ".mi");
00420e35      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420e3e      void* ebp_71 = ((char*)var_3c - 0x14);
00420e3e      
00420e4d      if ((InterlockedDecrement(((char*)ebp_71 + 4)) == 0 && ebp_71 != 0))
00420e55          **(uint32_t**)ebp_71(1);
00420e55      
00420e60      int32_t var_24_32 = 1;
00420e64      int32_t var_20_32 = 1;
00420e68      char var_1c_32 = 1;
00420e6d      char var_1b_32 = 1;
00420e72      char var_1a_32 = 0;
00420e76      char var_19_32 = 0;
00420e7a      PStringBase<char>::set(&var_18, "materials");
00420e8e      char var_14_32 = 1;
00420e93      char var_13_32 = 0;
00420e97      char var_12_32 = 1;
00420e9c      char var_11_32 = 0;
00420ea0      char var_10_32 = 0;
00420ea4      char var_f_32 = 0;
00420ea8      char var_c_32 = 0;
00420eac      char var_b_32 = 1;
00420eb1      int32_t var_8_32 = 0x40;
00420eb9      int32_t var_4_32 = 0x80;
00420ec1      char var_e_32 = 0;
00420ec5      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[1], &var_38);
00420ed3      int32_t var_28_32 = 0;
00420ed7      var_38 = 0x19000000;
00420edf      int32_t var_34_33 = 0x19ffffff;
00420ee7      PStringBase<char>::PStringBase<char>(&var_3c, ".rendermesh");
00420ef5      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420efe      void* ebp_73 = ((char*)var_3c - 0x14);
00420efe      
00420f0d      if ((InterlockedDecrement(((char*)ebp_73 + 4)) == 0 && ebp_73 != 0))
00420f15          **(uint32_t**)ebp_73(1);
00420f15      
00420f20      int32_t var_24_33 = 1;
00420f24      int32_t var_20_33 = 1;
00420f28      char var_1c_33 = 1;
00420f2d      char var_1b_33 = 1;
00420f32      char var_1a_33 = 0;
00420f36      char var_19_33 = 0;
00420f3a      PStringBase<char>::set(&var_18, "mesh");
00420f4e      char var_14_33 = 1;
00420f53      char var_13_33 = 0;
00420f57      char var_12_33 = 1;
00420f5c      char var_11_33 = 0;
00420f60      char var_10_33 = 0;
00420f64      char var_f_33 = 0;
00420f68      char var_c_33 = 0;
00420f6c      char var_b_33 = 1;
00420f71      int32_t var_8_33 = 0x10;
00420f79      int32_t var_4_33 = 0x20;
00420f81      char var_e_33 = 0;
00420f85      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0x12], &var_38);
00420f93      int32_t var_28_33 = 0;
00420f97      var_38 = 0x20000000;
00420f9f      int32_t var_34_34 = 0x2000ffff;
00420fa7      PStringBase<char>::PStringBase<char>(&var_3c, ".stb");
00420fb5      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00420fbe      void* ebp_75 = ((char*)var_3c - 0x14);
00420fbe      
00420fcd      if ((InterlockedDecrement(((char*)ebp_75 + 4)) == 0 && ebp_75 != 0))
00420fd5          **(uint32_t**)ebp_75(1);
00420fd5      
00420fe0      int32_t var_24_34 = 1;
00420fe4      int32_t var_20_34 = 1;
00420fe8      char var_1c_34 = 1;
00420fed      char var_1b_34 = 1;
00420ff2      char var_1a_34 = 0;
00420ff6      char var_19_34 = 0;
00420ffa      PStringBase<char>::set(&var_18, &data_795a58);
0042100e      char var_14_34 = 1;
00421013      char var_13_34 = 0;
00421017      char var_12_34 = 1;
0042101c      char var_11_34 = 0;
00421020      char var_10_34 = 0;
00421024      char var_f_34 = 0;
00421028      char var_c_34 = 0;
0042102c      char var_b_34 = 1;
00421031      int32_t var_8_34 = 2;
00421039      int32_t var_4_34 = 6;
00421041      char var_e_34 = 0;
00421045      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[2], &var_38);
00421053      int32_t var_28_34 = 0;
00421057      var_38 = 0x21000000;
0042105f      int32_t var_34_35 = 0x21ffffff;
00421067      PStringBase<char>::PStringBase<char>(&var_3c, ".uil");
00421075      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0042107e      void* ebp_77 = ((char*)var_3c - 0x14);
0042107e      
0042108d      if ((InterlockedDecrement(((char*)ebp_77 + 4)) == 0 && ebp_77 != 0))
00421095          **(uint32_t**)ebp_77(1);
00421095      
004210a5      int32_t var_24_35 = 3;
004210a9      int32_t var_20_35 = 1;
004210ad      char var_1c_35 = 1;
004210b2      char var_1b_35 = 0;
004210b6      char var_1a_35 = 0;
004210ba      char var_19_35 = 1;
004210bf      PStringBase<char>::set(&var_18, "ui/layout");
004210d3      char var_14_35 = 1;
004210d8      char var_13_35 = 0;
004210dc      char var_12_35 = 1;
004210e1      char var_11_35 = 0;
004210e5      char var_10_35 = 0;
004210e9      char var_f_35 = 0;
004210ed      char var_c_35 = 0;
004210f1      char var_b_35 = 1;
004210f6      int32_t var_8_35 = 3;
004210fa      int32_t var_4_35 = 0xf;
00421102      char var_e_35 = 1;
00421107      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[3], &var_38);
00421115      int32_t var_28_35 = 0;
00421119      var_38 = 0x22000000;
00421121      int32_t var_34_36 = 0x22ffffff;
00421129      PStringBase<char>::PStringBase<char>(&var_3c, ".emp");
00421137      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00421140      void* ebp_79 = ((char*)var_3c - 0x14);
00421140      
0042114f      if ((InterlockedDecrement(((char*)ebp_79 + 4)) == 0 && ebp_79 != 0))
00421157          **(uint32_t**)ebp_79(1);
00421157      
00421162      int32_t var_24_36 = 1;
00421166      int32_t var_20_36 = 1;
0042116a      char var_1c_36 = 1;
0042116f      char var_1b_36 = 1;
00421174      char var_1a_36 = 0;
00421178      char var_19_36 = 0;
0042117c      PStringBase<char>::set(&var_18, &data_795a48);
00421190      char var_14_36 = 1;
00421195      char var_13_36 = 1;
0042119a      char var_12_36 = 1;
0042119f      char var_11_36 = 0;
004211a3      char var_10_36 = 0;
004211a7      char var_f_36 = 0;
004211ab      char var_c_36 = 0;
004211af      char var_b_36 = 1;
004211b4      int32_t var_8_36 = 0x40;
004211bc      int32_t var_4_36 = 0x80;
004211c4      char var_e_36 = 1;
004211c9      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[4], &var_38);
004211d7      int32_t var_28_36 = 0;
004211db      var_38 = 0x23000000;
004211e3      int32_t var_34_37 = 0x24ffffff;
004211eb      PStringBase<char>::PStringBase<char>(&var_3c, ".stt");
004211f9      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00421202      void* ebp_81 = ((char*)var_3c - 0x14);
00421202      
00421211      if ((InterlockedDecrement(((char*)ebp_81 + 4)) == 0 && ebp_81 != 0))
00421219          **(uint32_t**)ebp_81(1);
00421219      
00421224      PStringBase<char>::PStringBase<char>(&var_3c, ".stt_ansi");
00421232      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0042123b      void* ebp_83 = ((char*)var_3c - 0x14);
0042123b      
0042124a      if ((InterlockedDecrement(((char*)ebp_83 + 4)) == 0 && ebp_83 != 0))
00421252          **(uint32_t**)ebp_83(1);
00421252      
0042125d      PStringBase<char>::PStringBase<char>(&var_3c, ".stt_bin");
0042126b      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00421274      void* ebp_85 = ((char*)var_3c - 0x14);
00421274      
00421283      if ((InterlockedDecrement(((char*)ebp_85 + 4)) == 0 && ebp_85 != 0))
0042128b          **(uint32_t**)ebp_85(1);
0042128b      
00421296      int32_t var_24_37 = 1;
0042129a      int32_t var_20_37 = 1;
0042129e      char var_1c_37 = 1;
004212a3      char var_1b_37 = 0;
004212a7      char var_1a_37 = 0;
004212ab      char var_19_37 = 1;
004212b0      PStringBase<char>::set(&var_18, "stringtable");
004212c4      char var_14_37 = 1;
004212c9      char var_13_37 = 1;
004212ce      char var_12_37 = 1;
004212d3      char var_11_37 = 0;
004212d7      char var_10_37 = 0;
004212db      char var_f_37 = 0;
004212df      char var_c_37 = 0;
004212e3      char var_b_37 = 1;
004212e8      int32_t var_8_37 = 3;
004212f0      int32_t var_4_37 = 0xf;
004212f8      char var_e_37 = 1;
004212fd      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[5], &var_38);
0042130b      int32_t var_28_37 = 0;
0042130f      var_38 = 0x25000000;
00421317      int32_t var_34_38 = 0x25ffffff;
0042131f      PStringBase<char>::PStringBase<char>(&var_3c, ".imp");
0042132d      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00421336      void* ebp_87 = ((char*)var_3c - 0x14);
00421336      
00421345      if ((InterlockedDecrement(((char*)ebp_87 + 4)) == 0 && ebp_87 != 0))
0042134d          **(uint32_t**)ebp_87(1);
0042134d      
00421358      int32_t var_24_38 = 1;
0042135c      int32_t var_20_38 = 1;
00421360      char var_1c_38 = 1;
00421365      char var_1b_38 = 1;
0042136a      char var_1a_38 = 0;
0042136e      char var_19_38 = 0;
00421372      PStringBase<char>::set(&var_18, "emp/idmap");
00421386      char var_14_38 = 1;
0042138b      char var_13_38 = 1;
00421390      char var_12_38 = 1;
00421395      char var_11_38 = 0;
00421399      char var_10_38 = 0;
0042139d      char var_f_38 = 0;
004213a1      char var_c_38 = 0;
004213a5      char var_b_38 = 1;
004213aa      int32_t var_8_38 = 0x40;
004213b2      int32_t var_4_38 = 0x80;
004213ba      char var_e_38 = 1;
004213bf      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[6], &var_38);
004213cd      int32_t var_28_38 = 0;
004213d1      var_38 = 0x26000000;
004213d9      int32_t var_34_39 = 0x2600ffff;
004213e1      PStringBase<char>::PStringBase<char>(&var_3c, ".actionmap");
004213ef      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004213f8      void* ebp_89 = ((char*)var_3c - 0x14);
004213f8      
00421407      if ((InterlockedDecrement(((char*)ebp_89 + 4)) == 0 && ebp_89 != 0))
0042140f          **(uint32_t**)ebp_89(1);
0042140f      
0042141a      int32_t var_24_39 = 1;
0042141e      int32_t var_20_39 = 1;
00421422      char var_1c_39 = 1;
00421427      char var_1b_39 = 1;
0042142c      char var_1a_39 = 0;
00421430      char var_19_39 = 0;
00421434      PStringBase<char>::set(&var_18, "actionmap");
00421448      char var_14_39 = 1;
0042144d      char var_13_39 = 0;
00421451      char var_12_39 = 1;
00421456      char var_11_39 = 0;
0042145a      char var_10_39 = 0;
0042145e      char var_f_39 = 0;
00421462      char var_c_39 = 0;
00421466      char var_b_39 = 1;
0042146b      int32_t var_8_39 = 3;
00421473      int32_t var_4_39 = 0xf;
0042147b      char var_e_39 = 0;
0042147f      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[7], &var_38);
0042148d      int32_t var_28_39 = 0;
00421491      var_38 = 0x27000000;
00421499      int32_t var_34_40 = 0x27ffffff;
004214a1      PStringBase<char>::PStringBase<char>(&var_3c, ".dimp");
004214af      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004214b8      void* ebp_91 = ((char*)var_3c - 0x14);
004214b8      
004214c7      if ((InterlockedDecrement(((char*)ebp_91 + 4)) == 0 && ebp_91 != 0))
004214cf          **(uint32_t**)ebp_91(1);
004214cf      
004214da      int32_t var_24_40 = 1;
004214de      int32_t var_20_40 = 1;
004214e2      char var_1c_40 = 1;
004214e7      char var_1b_40 = 1;
004214ec      char var_1a_40 = 0;
004214f0      char var_19_40 = 0;
004214f4      PStringBase<char>::set(&var_18, "emp/idmap");
00421508      char var_14_40 = 1;
0042150d      char var_13_40 = 1;
00421512      char var_12_40 = 1;
00421517      char var_11_40 = 0;
0042151b      char var_10_40 = 0;
0042151f      char var_f_40 = 0;
00421523      char var_c_40 = 0;
00421527      char var_b_40 = 1;
0042152c      int32_t var_8_40 = 0x40;
00421534      int32_t var_4_40 = 0x80;
0042153c      char var_e_40 = 1;
00421541      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[8], &var_38);
0042154f      int32_t var_28_40 = 0;
00421553      var_38 = 0x31000000;
0042155b      int32_t var_34_41 = 0x3100ffff;
00421563      PStringBase<char>::PStringBase<char>(&var_3c, ".str");
00421571      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0042157a      void* ebp_93 = ((char*)var_3c - 0x14);
0042157a      
00421589      if ((InterlockedDecrement(((char*)ebp_93 + 4)) == 0 && ebp_93 != 0))
00421591          **(uint32_t**)ebp_93(1);
00421591      
0042159c      int32_t var_24_41 = 1;
004215a0      int32_t var_20_41 = 1;
004215a4      char var_1c_41 = 1;
004215a9      char var_1b_41 = 1;
004215ae      char var_1a_41 = 0;
004215b2      char var_19_41 = 0;
004215b6      PStringBase<char>::set(&var_18, "string");
004215ca      char var_14_41 = 1;
004215cf      char var_13_41 = 0;
004215d3      char var_12_41 = 1;
004215d8      char var_11_41 = 0;
004215dc      char var_10_41 = 0;
004215e0      char var_f_41 = 0;
004215e4      char var_c_41 = 0;
004215e8      char var_b_41 = 1;
004215ed      int32_t var_8_41 = 3;
004215f5      int32_t var_4_41 = 0xf;
004215fd      char var_e_41 = 0;
00421601      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[9], &var_38);
0042160f      int32_t var_28_41 = 0;
00421613      var_38 = 0x32000000;
0042161b      int32_t var_34_42 = 0x3200ffff;
00421623      PStringBase<char>::PStringBase<char>(&var_3c, ".emt");
00421631      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0042163a      void* ebp_95 = ((char*)var_3c - 0x14);
0042163a      
00421649      if ((InterlockedDecrement(((char*)ebp_95 + 4)) == 0 && ebp_95 != 0))
00421651          **(uint32_t**)ebp_95(1);
00421651      
0042165c      int32_t var_24_42 = 1;
00421660      int32_t var_20_42 = 1;
00421664      char var_1c_42 = 1;
00421669      char var_1b_42 = 1;
0042166e      char var_1a_42 = 0;
00421672      char var_19_42 = 0;
00421676      PStringBase<char>::set(&var_18, &data_795a18);
0042168a      char var_14_42 = 1;
0042168f      char var_13_42 = 0;
00421693      char var_12_42 = 1;
00421698      char var_11_42 = 0;
0042169c      char var_10_42 = 0;
004216a0      char var_f_42 = 0;
004216a4      char var_c_42 = 0;
004216a8      char var_b_42 = 1;
004216ad      int32_t var_8_42 = 3;
004216b5      int32_t var_4_42 = 0xf;
004216bd      char var_e_42 = 0;
004216c1      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0xa], &var_38);
004216cf      int32_t var_28_42 = 0;
004216d3      var_38 = 0x33000000;
004216db      int32_t var_34_43 = 0x3300ffff;
004216e3      PStringBase<char>::PStringBase<char>(&var_3c, ".pes");
004216f1      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004216fa      void* ebp_97 = ((char*)var_3c - 0x14);
004216fa      
00421709      if ((InterlockedDecrement(((char*)ebp_97 + 4)) == 0 && ebp_97 != 0))
00421711          **(uint32_t**)ebp_97(1);
00421711      
0042171c      int32_t var_24_43 = 1;
00421720      int32_t var_20_43 = 1;
00421724      char var_1c_43 = 1;
00421729      char var_1b_43 = 1;
0042172e      char var_1a_43 = 0;
00421732      char var_19_43 = 0;
00421736      PStringBase<char>::set(&var_18, &data_795a14);
0042174a      char var_14_43 = 1;
0042174f      char var_13_43 = 0;
00421753      char var_12_43 = 1;
00421758      char var_11_43 = 0;
0042175c      char var_10_43 = 0;
00421760      char var_f_43 = 0;
00421764      char var_c_43 = 0;
00421768      char var_b_43 = 1;
0042176d      int32_t var_8_43 = 3;
00421775      int32_t var_4_43 = 0xf;
0042177d      char var_e_43 = 0;
00421781      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0xb], &var_38);
0042178f      int32_t var_28_43 = 0;
00421793      var_38 = 0x34000000;
0042179b      int32_t var_34_44 = 0x3400ffff;
004217a3      PStringBase<char>::PStringBase<char>(&var_3c, ".pet");
004217b1      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004217ba      void* ebp_99 = ((char*)var_3c - 0x14);
004217ba      
004217c9      if ((InterlockedDecrement(((char*)ebp_99 + 4)) == 0 && ebp_99 != 0))
004217d1          **(uint32_t**)ebp_99(1);
004217d1      
004217dc      int32_t var_24_44 = 1;
004217e0      int32_t var_20_44 = 1;
004217e4      char var_1c_44 = 1;
004217e9      char var_1b_44 = 1;
004217ee      char var_1a_44 = 0;
004217f2      char var_19_44 = 0;
004217f6      PStringBase<char>::set(&var_18, &data_795a10);
0042180a      char var_14_44 = 1;
0042180f      char var_13_44 = 0;
00421813      char var_12_44 = 1;
00421818      char var_11_44 = 0;
0042181c      char var_10_44 = 0;
00421820      char var_f_44 = 0;
00421824      char var_c_44 = 0;
00421828      char var_b_44 = 1;
0042182d      int32_t var_8_44 = 3;
00421835      int32_t var_4_44 = 0xf;
0042183d      char var_e_44 = 0;
00421841      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0xc], &var_38);
0042184f      int32_t var_28_44 = 0;
00421853      var_38 = 0x39000000;
0042185b      int32_t var_34_45 = 0x39ffffff;
00421863      PStringBase<char>::PStringBase<char>(&var_3c, ".mpr");
00421871      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0042187a      void* ebp_101 = ((char*)var_3c - 0x14);
0042187a      
00421889      if ((InterlockedDecrement(((char*)ebp_101 + 4)) == 0 && ebp_101 != 0))
00421891          **(uint32_t**)ebp_101(1);
00421891      
0042189c      int32_t var_24_45 = 1;
004218a0      int32_t var_20_45 = 1;
004218a4      char var_1c_45 = 1;
004218a9      char var_1b_45 = 1;
004218ae      char var_1a_45 = 0;
004218b2      char var_19_45 = 0;
004218b6      PStringBase<char>::set(&var_18, "emp/property");
004218ca      char var_14_45 = 1;
004218cf      char var_13_45 = 1;
004218d4      char var_12_45 = 1;
004218d9      char var_11_45 = 0;
004218dd      char var_10_45 = 0;
004218e1      char var_f_45 = 0;
004218e5      char var_c_45 = 0;
004218e9      char var_b_45 = 1;
004218ee      int32_t var_8_45 = 3;
004218f6      int32_t var_4_45 = 0xf;
004218fe      char var_e_45 = 1;
00421903      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0xd], &var_38);
00421911      int32_t var_28_45 = 0;
00421915      var_38 = 0x40000000;
0042191d      int32_t var_34_46 = 0x40000fff;
00421925      PStringBase<char>::PStringBase<char>(&var_3c, ".font");
00421933      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
0042193c      void* ebp_103 = ((char*)var_3c - 0x14);
0042193c      
0042194b      if ((InterlockedDecrement(((char*)ebp_103 + 4)) == 0 && ebp_103 != 0))
00421953          **(uint32_t**)ebp_103(1);
00421953      
0042195e      int32_t var_24_46 = 1;
00421962      int32_t var_20_46 = 1;
00421966      char var_1c_46 = 1;
0042196b      char var_1b_46 = 1;
00421970      char var_1a_46 = 0;
00421974      char var_19_46 = 0;
00421978      PStringBase<char>::set(&var_18, "fonts");
0042198c      char var_14_46 = 1;
00421991      char var_13_46 = 0;
00421995      char var_12_46 = 1;
0042199a      char var_11_46 = 0;
0042199e      char var_10_46 = 0;
004219a2      char var_f_46 = 0;
004219a6      char var_c_46 = 0;
004219aa      char var_b_46 = 1;
004219af      int32_t var_8_46 = 3;
004219b7      int32_t var_4_46 = 0xf;
004219bf      char var_e_46 = 0;
004219c3      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0xe], &var_38);
004219d1      int32_t var_28_46 = 0;
004219d5      var_38 = 0x40001000;
004219dd      int32_t var_34_47 = 0x40ffffff;
004219e5      PStringBase<char>::PStringBase<char>(&var_3c, ".font_local");
004219f3      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
004219fc      void* ebp_105 = ((char*)var_3c - 0x14);
004219fc      
00421a0b      if ((InterlockedDecrement(((char*)ebp_105 + 4)) == 0 && ebp_105 != 0))
00421a13          **(uint32_t**)ebp_105(1);
00421a13      
00421a1e      int32_t var_24_47 = 1;
00421a22      int32_t var_20_47 = 1;
00421a26      char var_1c_47 = 1;
00421a2b      char var_1b_47 = 0;
00421a2f      char var_1a_47 = 0;
00421a33      char var_19_47 = 1;
00421a38      PStringBase<char>::set(&var_18, "fonts");
00421a4c      char var_14_47 = 1;
00421a51      char var_13_47 = 0;
00421a55      char var_12_47 = 1;
00421a5a      char var_11_47 = 0;
00421a5e      char var_10_47 = 0;
00421a62      char var_f_47 = 0;
00421a66      char var_c_47 = 0;
00421a6a      char var_b_47 = 1;
00421a6f      int32_t var_8_47 = 3;
00421a77      int32_t var_4_47 = 0xf;
00421a7f      char var_e_47 = 1;
00421a84      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0xf], &var_38);
00421a92      int32_t var_28_47 = 0;
00421a96      var_38 = 0x41000000;
00421a9e      int32_t var_34_48 = 0x41ffffff;
00421aa6      PStringBase<char>::PStringBase<char>(&var_3c, ".sti");
00421ab4      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00421abd      void* ebp_107 = ((char*)var_3c - 0x14);
00421abd      
00421acc      if ((InterlockedDecrement(((char*)ebp_107 + 4)) == 0 && ebp_107 != 0))
00421ad4          **(uint32_t**)ebp_107(1);
00421ad4      
00421adf      int32_t var_24_48 = 1;
00421ae3      int32_t var_20_48 = 1;
00421ae7      char var_1c_48 = 1;
00421aec      char var_1b_48 = 0;
00421af0      char var_1a_48 = 0;
00421af4      char var_19_48 = 1;
00421af9      PStringBase<char>::set(&var_18, "stringtable");
00421b0d      char var_14_48 = 1;
00421b12      char var_13_48 = 0;
00421b16      char var_12_48 = 1;
00421b1b      char var_11_48 = 0;
00421b1f      char var_10_48 = 0;
00421b23      char var_f_48 = 0;
00421b27      char var_c_48 = 0;
00421b2b      char var_b_48 = 1;
00421b30      int32_t var_8_48 = 3;
00421b38      int32_t var_4_48 = 0xf;
00421b40      char var_e_48 = 1;
00421b45      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0x10], &var_38);
00421b53      int32_t var_28_48 = 0;
00421b57      var_38 = 0x78000000;
00421b5f      int32_t var_34_49 = 0x7fffffff;
00421b67      PStringBase<char>::PStringBase<char>(&var_3c, ".dbpc");
00421b75      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00421b7e      void* ebp_109 = ((char*)var_3c - 0x14);
00421b7e      
00421b8d      if ((InterlockedDecrement(((char*)ebp_109 + 4)) == 0 && ebp_109 != 0))
00421b95          **(uint32_t**)ebp_109(1);
00421b95      
00421ba0      PStringBase<char>::PStringBase<char>(&var_3c, ".pmat");
00421bae      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_3c);
00421bb7      void* ebp_111 = ((char*)var_3c - 0x14);
00421bb7      
00421bc6      if ((InterlockedDecrement(((char*)ebp_111 + 4)) == 0 && ebp_111 != 0))
00421bce          **(uint32_t**)ebp_111(1);
00421bce      
00421bd9      int32_t var_24_49 = 1;
00421bdd      int32_t var_20_49 = 1;
00421be1      char var_1c_49 = 1;
00421be6      char var_1b_49 = 1;
00421beb      char var_1a_49 = 0;
00421bef      char var_19_49 = 0;
00421bf3      PStringBase<char>::set(&var_18, "properties");
00421c07      char var_14_49 = 1;
00421c0c      char var_13_49 = 1;
00421c11      char var_12_49 = 1;
00421c16      char var_11_49 = 0;
00421c1a      char var_10_49 = 0;
00421c1e      char var_f_49 = 0;
00421c22      char var_c_49 = 0;
00421c26      char var_b_49 = 1;
00421c2b      int32_t var_8_49 = 3;
00421c33      int32_t var_4_49 = 0xf;
00421c3b      char var_e_49 = 0;
00421c3f      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &*U" !"#$%&'()*+,-./01C"[0x11], &var_38);
00421c48      int32_t* ebp_113 = ((char*)var_18 - 0x14);
00421c4f      int32_t var_28_49 = 0;
00421c4f      
00421c5b      if ((InterlockedDecrement(&ebp_113[1]) == 0 && ebp_113 != 0))
00421c63          **(uint32_t**)ebp_113(1);
00421c63      
00421c73      int32_t var_2c;
00421c73      
00421c73      if ((var_2c & 0x80000000) == 0x80000000)
00421c73      {
00421c75          class PStringBase<char>* ecx_231 = var_30;
00421c75          
00421c7b          if (ecx_231 != 0)
00421c7f              PStringBase<char>::`vector deleting destructor'(ecx_231, 3);
00421c73      }
00421c73      
00421c87      void* eax_104;
00421c87      eax_104 = 1;
00421c8d      return 1;
0041f580  }

00421c8e                                            90 90                                                                ..

00421c90  void __thiscall QualifiedDataID::QualifiedDataID(struct QualifiedDataID* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

00421c90  {
00421c9b      this->Type = arg3;
00421c9d      this->ID.id = arg2;
00421c9d      
00421caa      if ((arg2 != INVALID_DID.id && arg3 == 0))
00421cb5          this->Type = MasterDBMap::DivineType(arg2);
00421c90  }

00421cbd                                                                                         90 90 90                               ...

00421cc0  uint8_t __thiscall CLanguageInfoInterface::GetNumDecDigits(class CLanguageInfoInterface const* this, uint16_t* arg2)

00421cc0  {
00421cc0      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00421cc0      
00421cc4      if (m_pLanguageInfo == 0)
00421cc4      {
00421cd6          m_pLanguageInfo = 0;
00421cd8          return 0;
00421cc4      }
00421cc4      
00421cc6      m_pLanguageInfo = m_pLanguageInfo->numDecimalDigits;
00421cce      *(uint16_t*)arg2 = m_pLanguageInfo;
00421cd1      m_pLanguageInfo = 1;
00421cd3      return 1;
00421cc0  }

00421cdb                                                                                   90 90 90 90 90                             .....

00421ce0  uint8_t __thiscall CLanguageInfoInterface::GetLeadingZero(class CLanguageInfoInterface const* this, uint8_t* arg2)

00421ce0  {
00421ce0      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00421ce0      
00421ce4      if (m_pLanguageInfo == 0)
00421ce4      {
00421cf4          m_pLanguageInfo = 0;
00421cf6          return 0;
00421ce4      }
00421ce4      
00421ce6      m_pLanguageInfo = m_pLanguageInfo->leadingZero;
00421ced      *(uint8_t*)arg2 = m_pLanguageInfo;
00421cef      m_pLanguageInfo = 1;
00421cf1      return 1;
00421ce0  }

00421cf9                                                                             90 90 90 90 90 90 90                           .......

00421d00  uint8_t __thiscall CLanguageInfoInterface::GetBase(class CLanguageInfoInterface const* this, uint16_t* arg2)

00421d00  {
00421d00      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00421d00      
00421d04      if (m_pLanguageInfo == 0)
00421d04      {
00421d16          m_pLanguageInfo = 0;
00421d18          return 0;
00421d04      }
00421d04      
00421d06      m_pLanguageInfo = m_pLanguageInfo->base;
00421d0e      *(uint16_t*)arg2 = m_pLanguageInfo;
00421d11      m_pLanguageInfo = 1;
00421d13      return 1;
00421d00  }

00421d1b                                                                                   90 90 90 90 90                             .....

00421d20  uint8_t __thiscall CLanguageInfoInterface::GetGroupingSize(class CLanguageInfoInterface const* this, uint16_t* arg2)

00421d20  {
00421d20      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00421d20      
00421d24      if (m_pLanguageInfo == 0)
00421d24      {
00421d36          m_pLanguageInfo = 0;
00421d38          return 0;
00421d24      }
00421d24      
00421d26      m_pLanguageInfo = m_pLanguageInfo->groupingSize;
00421d2e      *(uint16_t*)arg2 = m_pLanguageInfo;
00421d31      m_pLanguageInfo = 1;
00421d33      return 1;
00421d20  }

00421d3b                                                                                   90 90 90 90 90                             .....

00421d40  uint8_t __thiscall CLanguageInfoInterface::IsNumberSingular(class CLanguageInfoInterface const* this, int32_t arg2)

00421d40  {
00421d40      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00421d40      
00421d44      if (m_pLanguageInfo != 0)
00421d44      {
00421d4c          int32_t ecx;
00421d4c          
00421d4c          if (arg2 == 0)
00421d4c          {
00421d4e              ecx = m_pLanguageInfo->isZeroSingular;
00421d4e              
00421d53              if (ecx != 0)
00421d53              {
00421d55                  m_pLanguageInfo = 1;
00421d57                  return 1;
00421d53              }
00421d4c          }
00421d4c          else if (arg2 == 1)
00421d5d          {
00421d5f              ecx = m_pLanguageInfo->isOneSingular;
00421d5f              
00421d64              if (ecx != 0)
00421d64              {
00421d66                  m_pLanguageInfo = 1;
00421d68                  return 1;
00421d64              }
00421d5d          }
00421d5d          else if (arg2 != 0xffffffff)
00421d6e          {
00421d86              if ((arg2 > 1 && m_pLanguageInfo->isTwoOrMoreSingular != 0))
00421d86              {
00421d55                  m_pLanguageInfo = 1;
00421d57                  return 1;
00421d86              }
00421d86              
00421d8b              if (arg2 < 0xffffffff)
00421d8b              {
00421d8d                  ecx = m_pLanguageInfo->isNegativeTwoOrLessSingular;
00421d8d                  
00421d92                  if (ecx != 0)
00421d92                  {
00421d94                      m_pLanguageInfo = 1;
00421d96                      return 1;
00421d92                  }
00421d8b              }
00421d6e          }
00421d6e          else
00421d6e          {
00421d70              ecx = m_pLanguageInfo->isNegativeOneSingular;
00421d70              
00421d75              if (ecx != 0)
00421d75              {
00421d77                  m_pLanguageInfo = 1;
00421d79                  return 1;
00421d75              }
00421d6e          }
00421d44      }
00421d44      
00421d99      m_pLanguageInfo = 0;
00421d9b      return 0;
00421d40  }

00421d9e                                                                                            90 90                                ..

00421da0  uint8_t CLanguageInfoInterface::Startup()

00421da0  {
00421da3      void* eax;
00421da3      uint32_t ecx;
00421da3      int32_t edx;
00421da3      eax = operator new(4);
00421da8      void* esi = eax;
00421da8      
00421daf      if (esi == 0)
00421dd5          CLanguageInfoInterface::m_instance = nullptr;
00421daf      else
00421daf      {
00421db1          int32_t var_8_1 = 0x30;
00421db3          int32_t var_c_1 = 4;
00421db5          *(uint32_t*)esi = 0;
00421dbb          int32_t var_10_1 = 1;
00421dbd          CLanguageInfoInterface::m_instance = esi;
00421dc3          eax = DBObj::GetByEnum(eax, edx, ecx);
00421dc3          
00421dcd          if (eax != 0)
00421dcd          {
00421dcf              *(uint32_t*)esi = eax;
00421dd1              eax = 1;
00421dd4              return 1;
00421dcd          }
00421daf      }
00421daf      
00421ddf      eax = 0;
00421de2      return 0;
00421da0  }

00421de3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00421df0  uint8_t CLanguageInfoInterface::Shutdown()

00421df0  {
00421df0      class CLanguageInfoInterface* CLanguageInfoInterface::m_instance_1 = CLanguageInfoInterface::m_instance;
00421df0      
00421dfa      if (CLanguageInfoInterface::m_instance_1 != 0)
00421dfa      {
00421dfc          class CLanguageInfo* m_pLanguageInfo = CLanguageInfoInterface::m_instance_1->m_pLanguageInfo;
00421dfc          
00421e00          if (m_pLanguageInfo != 0)
00421e00          {
00421e02              m_pLanguageInfo->vtable->Release();
00421e07              CLanguageInfoInterface::m_instance_1->m_pLanguageInfo = 0;
00421e00          }
00421e00          
00421e0e          operator delete(CLanguageInfoInterface::m_instance_1);
00421dfa      }
00421dfa      
00421e16      CLanguageInfoInterface::m_instance = nullptr;
00421e20      CLanguageInfoInterface::m_instance_1 = 1;
00421e23      return 1;
00421df0  }

00421e24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00421e30  void Serializer::SerializeObject(uint8_t* arg1, class Archive* arg2)

00421e30  {
00421e3b      int32_t ebx;
00421e3b      ebx = *(uint8_t*)arg1;
00421e41      Archive::CheckAlignment(arg2, 1);
00421e4a      uint8_t* eax = Archive::GetBytes(arg2, 1);
00421e4a      
00421e51      if (eax != 0)
00421e51      {
00421e57          if ((arg2->m_flags & 1) == 0)
00421e5d              ebx = *(uint8_t*)eax;
00421e57          else
00421e59              *(uint8_t*)eax = ebx;
00421e51      }
00421e51      
00421e63      bool cond:0_1;
00421e63      
00421e63      if ((arg2->m_flags & 5) != 0)
00421e75          cond:0_1 = ebx != 0;
00421e63      else
00421e63      {
00421e65          char temp0_1 = ebx;
00421e65          cond:0_1 = temp0_1 != 0;
00421e65          
00421e67          if (temp0_1 != 0)
00421e67          {
00421e6c              if (ebx != 1)
00421e70                  Archive::RaiseError(arg2);
00421e70              
00421e75              cond:0_1 = ebx != 0;
00421e67          }
00421e63      }
00421e63      
00421e77      eax = cond:0_1;
00421e7a      *(uint8_t*)arg1 = eax;
00421e30  }


00421e80  void __fastcall CLanguageInfo::CLanguageInfo(class CLanguageInfo* this)

00421e80  {
00421e8a      DBObj::DBObj(this, INVALID_DID.id);
00421e95      this->vtable = 0x795b20;
00421e9b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
00421ea7      this->numerals.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_4;
00421eaa      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_4 - 0x10));
00421eac      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00421eb7      this->decimalSeperator.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00421eba      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00421ebc      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer;
00421ec8      this->groupingSeperator.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_8;
00421ecb      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_8 - 0x10));
00421ecd      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
00421ed9      this->negativeNumberFormat.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_5;
00421edc      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_5 - 0x10));
00421ede      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00421ee9      this->treasurePrefixLetters.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_2;
00421eec      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
00421eee      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer;
00421efa      this->treasureMiddleLetters.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_9;
00421efd      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_9 - 0x10));
00421eff      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer;
00421f0b      this->treasureSuffixLetters.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_6;
00421f0e      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_6 - 0x10));
00421f10      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00421f1b      this->malePlayerLetters.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_3;
00421f1e      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
00421f20      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer;
00421f2c      this->femalePlayerLetters.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_10;
00421f2f      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_10 - 0x10));
00421f31      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer;
00421f3d      this->m_additionalSettings.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_7;
00421f43      InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_7 - 0x10));
00421e80  }

00421f4a                                90 90 90 90 90 90                                                            ......

00421f50  uint32_t CLanguageInfo::GetDBOType(class CLanguageInfo const* this @ ecx) __pure

00421f50  {
00421f55      return 0x30;
00421f50  }

00421f56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00421f60  void __fastcall CLanguageInfo::~CLanguageInfo(class CLanguageInfo* this)

00421f60  {
00421f71      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_1 = (this->m_additionalSettings.m_charbuffer - 0x14);
00421f78      this->vtable = 0x795b20;
00421f78      
00421f86      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00421f8e          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00421f8e      
00421f93      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_3 = (this->femalePlayerLetters.m_charbuffer - 0x14);
00421f93      
00421fa2      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
00421faa          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
00421faa      
00421faf      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_5 = (this->malePlayerLetters.m_charbuffer - 0x14);
00421faf      
00421fbe      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
00421fc6          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
00421fc6      
00421fcb      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_7 = (this->treasureSuffixLetters.m_charbuffer - 0x14);
00421fcb      
00421fda      if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
00421fe2          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_7) + -0x14)(1);
00421fe2      
00421fe7      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_9 = (this->treasureMiddleLetters.m_charbuffer - 0x14);
00421fe7      
00421ff6      if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
00421ffe          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_9) + -0x14)(1);
00421ffe      
00422003      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_11 = (this->treasurePrefixLetters.m_charbuffer - 0x14);
00422003      
00422012      if ((InterlockedDecrement(((char*)edi_11 + 4)) == 0 && edi_11 != 0))
0042201a          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_11) + -0x14)(1);
0042201a      
0042201f      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_13 = (this->negativeNumberFormat.m_charbuffer - 0x14);
0042201f      
0042202e      if ((InterlockedDecrement(((char*)edi_13 + 4)) == 0 && edi_13 != 0))
00422036          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_13) + -0x14)(1);
00422036      
0042203b      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_15 = (this->groupingSeperator.m_charbuffer - 0x14);
0042203b      
0042204a      if ((InterlockedDecrement(((char*)edi_15 + 4)) == 0 && edi_15 != 0))
00422052          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_15) + -0x14)(1);
00422052      
00422057      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_17 = (this->decimalSeperator.m_charbuffer - 0x14);
00422057      
00422066      if ((InterlockedDecrement(((char*)edi_17 + 4)) == 0 && edi_17 != 0))
0042206e          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_17) + -0x14)(1);
0042206e      
00422073      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_19 = (this->numerals.m_charbuffer - 0x14);
00422073      
00422082      if ((InterlockedDecrement(((char*)edi_19 + 4)) == 0 && edi_19 != 0))
0042208a          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_19) + -0x14)(1);
0042208a      
00422091      /* tailcall */
00422091      return DBObj::~DBObj(this);
00421f60  }

00422096                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004220a0  class DBObj* CLanguageInfo::Allocate(class CLanguageInfo const* this @ ecx)

004220a0  {
004220a0      /* tailcall */
004220a0      return CLanguageInfo::Allocator();
004220a0  }

004220a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004220b0  class DBObj* CLanguageInfo::Allocator()

004220b0  {
004220b5      void* eax = operator new(0xb8);
004220b5      
004220bf      if (eax == 0)
004220ca          return 0;
004220ca      
004220c3      /* tailcall */
004220c3      return CLanguageInfo::CLanguageInfo(eax);
004220b0  }

004220cb                                   90 90 90 90 90                                                             .....

004220d0  void* __thiscall CLanguageInfo::`scalar deleting destructor'(class CLanguageInfo* this, uint32_t arg2)

004220d0  {
004220d3      CLanguageInfo::~CLanguageInfo(this);
004220d3      
004220dd      if ((arg2 & 1) != 0)
004220e0          operator delete(this);
004220e0      
004220eb      return this;
004220d0  }

004220ee                                            90 90                                                                ..

004220f0  uint8_t __thiscall CLanguageInfoInterface::GetNumerals(class CLanguageInfoInterface const* this, class PStringBase<unsigned short>* arg2)

004220f0  {
004220f1      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
004220f1      
004220f5      if (m_pLanguageInfo == 0)
004220f5      {
0042213a          int32_t eax;
0042213a          eax = 0;
0042213d          return 0;
004220f5      }
004220f5      
004220ff      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
004220ff      
00422103      if (m_charbuffer != m_pLanguageInfo->numerals.m_charbuffer)
00422103      {
00422119          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00422121              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00422121          
00422123          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = m_pLanguageInfo->numerals.m_charbuffer;
00422126          arg2->m_charbuffer = m_charbuffer_1;
0042212c          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00422103      }
00422103      
00422134      m_charbuffer = 1;
00422137      return 1;
004220f0  }


00422140  uint8_t __thiscall CLanguageInfoInterface::GetGroupingSeperator(class CLanguageInfoInterface const* this, class PStringBase<unsigned short>* arg2)

00422140  {
00422141      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00422141      
00422145      if (m_pLanguageInfo == 0)
00422145      {
0042218a          int32_t eax;
0042218a          eax = 0;
0042218d          return 0;
00422145      }
00422145      
0042214f      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0042214f      
00422153      if (m_charbuffer != m_pLanguageInfo->groupingSeperator.m_charbuffer)
00422153      {
00422169          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00422171              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00422171          
00422173          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = m_pLanguageInfo->groupingSeperator.m_charbuffer;
00422176          arg2->m_charbuffer = m_charbuffer_1;
0042217c          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00422153      }
00422153      
00422184      m_charbuffer = 1;
00422187      return 1;
00422140  }


00422190  uint8_t __thiscall CLanguageInfoInterface::GetDecimalSeperator(class CLanguageInfoInterface const* this, class PStringBase<unsigned short>* arg2)

00422190  {
00422191      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00422191      
00422195      if (m_pLanguageInfo == 0)
00422195      {
004221da          int32_t eax;
004221da          eax = 0;
004221dd          return 0;
00422195      }
00422195      
0042219f      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0042219f      
004221a3      if (m_charbuffer != m_pLanguageInfo->decimalSeperator.m_charbuffer)
004221a3      {
004221b9          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
004221c1              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004221c1          
004221c3          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = m_pLanguageInfo->decimalSeperator.m_charbuffer;
004221c6          arg2->m_charbuffer = m_charbuffer_1;
004221cc          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
004221a3      }
004221a3      
004221d4      m_charbuffer = 1;
004221d7      return 1;
00422190  }


004221e0  uint8_t __thiscall CLanguageInfoInterface::GetNegNumFormat(class CLanguageInfoInterface const* this, class PStringBase<unsigned short>* arg2)

004221e0  {
004221e1      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
004221e1      
004221e5      if (m_pLanguageInfo == 0)
004221e5      {
0042222a          int32_t eax;
0042222a          eax = 0;
0042222d          return 0;
004221e5      }
004221e5      
004221ef      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
004221ef      
004221f3      if (m_charbuffer != m_pLanguageInfo->negativeNumberFormat.m_charbuffer)
004221f3      {
00422209          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00422211              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00422211          
00422213          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = m_pLanguageInfo->negativeNumberFormat.m_charbuffer;
00422216          arg2->m_charbuffer = m_charbuffer_1;
0042221c          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
004221f3      }
004221f3      
00422224      m_charbuffer = 1;
00422227      return 1;
004221e0  }


00422230  uint8_t __thiscall CLanguageInfoInterface::GetMaleMetaLetters(class CLanguageInfoInterface const* this, class PStringBase<unsigned short>* arg2)

00422230  {
00422231      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00422231      
00422235      if (m_pLanguageInfo == 0)
00422235      {
0042227a          int32_t eax;
0042227a          eax = 0;
0042227d          return 0;
00422235      }
00422235      
0042223f      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0042223f      
00422243      if (m_charbuffer != m_pLanguageInfo->malePlayerLetters.m_charbuffer)
00422243      {
00422259          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00422261              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00422261          
00422263          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = m_pLanguageInfo->malePlayerLetters.m_charbuffer;
00422266          arg2->m_charbuffer = m_charbuffer_1;
0042226c          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00422243      }
00422243      
00422274      m_charbuffer = 1;
00422277      return 1;
00422230  }


00422280  uint8_t __thiscall CLanguageInfoInterface::GetFemaleMetaLetters(class CLanguageInfoInterface const* this, class PStringBase<unsigned short>* arg2)

00422280  {
00422281      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
00422281      
00422285      if (m_pLanguageInfo == 0)
00422285      {
004222ca          int32_t eax;
004222ca          eax = 0;
004222cd          return 0;
00422285      }
00422285      
0042228f      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0042228f      
00422293      if (m_charbuffer != m_pLanguageInfo->femalePlayerLetters.m_charbuffer)
00422293      {
004222a9          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
004222b1              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004222b1          
004222b3          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = m_pLanguageInfo->femalePlayerLetters.m_charbuffer;
004222b6          arg2->m_charbuffer = m_charbuffer_1;
004222bc          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00422293      }
00422293      
004222c4      m_charbuffer = 1;
004222c7      return 1;
00422280  }


004222d0  uint8_t __thiscall CLanguageInfoInterface::GetTreasureMetaLetters(class CLanguageInfoInterface const* this, class PStringBase<unsigned short>* arg2, class PStringBase<unsigned short>* arg3, class PStringBase<unsigned short>* arg4)

004222d0  {
004222d4      class CLanguageInfo* m_pLanguageInfo = this->m_pLanguageInfo;
004222d4      
004222d9      if (m_pLanguageInfo == 0)
004222d9      {
004223a0          int32_t eax;
004223a0          eax = 0;
004223a3          return 0;
004222d9      }
004222d9      
004222e7      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
004222e7      
004222ec      if (m_charbuffer != m_pLanguageInfo->treasurePrefixLetters.m_charbuffer)
004222ec      {
00422301          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00422309              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00422309          
0042230b          class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = m_pLanguageInfo->treasurePrefixLetters.m_charbuffer;
0042230e          arg2->m_charbuffer = m_charbuffer_3;
00422314          InterlockedIncrement(&m_charbuffer_3->m_data[-8]);
004222ec      }
004222ec      
0042231a      class CLanguageInfo* m_pLanguageInfo_1 = this->m_pLanguageInfo;
00422321      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg3->m_charbuffer;
00422321      
0042232b      if (m_charbuffer_1 != m_pLanguageInfo_1->treasureMiddleLetters.m_charbuffer)
0042232b      {
00422340          if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
00422348              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00422348          
0042234a          class PStringBase<unsigned short> m_charbuffer_4 = m_pLanguageInfo_1->treasureMiddleLetters.m_charbuffer;
0042234c          arg3->m_charbuffer = m_charbuffer_4;
00422352          InterlockedIncrement((m_charbuffer_4 - 0x10));
0042232b      }
0042232b      
00422358      class CLanguageInfo* m_pLanguageInfo_2 = this->m_pLanguageInfo;
0042235f      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = arg4->m_charbuffer;
0042235f      
00422369      if (m_charbuffer_2 != m_pLanguageInfo_2->treasureSuffixLetters.m_charbuffer)
00422369      {
0042237e          if ((InterlockedDecrement(&m_charbuffer_2->m_data[-8]) == 0 && m_charbuffer_2 != 0x14))
00422386              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00422386          
00422388          class PStringBase<unsigned short> m_charbuffer_5 = m_pLanguageInfo_2->treasureSuffixLetters.m_charbuffer;
0042238a          arg4->m_charbuffer = m_charbuffer_5;
00422390          InterlockedIncrement((m_charbuffer_5 - 0x10));
00422369      }
00422369      
00422399      m_charbuffer_2 = 1;
0042239c      return 1;
004222d0  }

004223a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004223b0  void __thiscall PStringBase<unsigned short>::Serialize(class PStringBase<unsigned short>* this, class Archive* arg2)

004223b0  {
004223b2      class Archive* esi = arg2;
004223b2      
004223bc      if ((esi->m_flags & 1) != 0)
004223c4          arg2 = (this->m_charbuffer->m_data[0x7ffffffffffffffe] - 1);
004223c4      
004223d3      SB_As32Bit_Compressed::Serialize(&arg2, &arg2, esi);
004223d3      
004223e4      if ((((int8_t)(esi->m_flags >> 2)) & 1) == 0)
004223e4      {
004223ea          class Archive* ebp_1 = arg2;
004223f4          int16_t* edi_1 = (ebp_1 * 2);
004223f4          
004223f8          if ((!(esi->m_flags) & 1) != 0)
004223f8          {
00422403              if (edi_1 > Archive::GetSizeLeft(esi))
00422403              {
00422407                  Archive::RaiseError(esi);
00422410                  return;
00422403              }
00422403              
00422418              ReferenceCountTemplate<268435456,0>::Release((this->m_charbuffer - 0x14));
00422420              PStringBase<unsigned short>::allocate_ref_buffer(this, ebp_1);
00422427              *(uint16_t*)((char*)edi_1 + this->m_charbuffer) = 0;
004223f8          }
004223f8          
00422432          Serializer::SerializeBytes(this->m_charbuffer, edi_1, esi);
004223e4      }
004223b0  }

00422441     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00422450  void __thiscall CLanguageInfo::Serialize(class CLanguageInfo* this, class Archive* arg2)

00422450  {
0042245d      Archive::CheckAlignment(arg2, 4);
00422466      uint8_t* eax = Archive::GetBytes(arg2, 4);
00422466      
0042246f      if (eax != 0)
0042246f      {
00422474          if ((arg2->m_flags & 1) == 0)
0042247f              this->version = *(uint32_t*)eax;
00422474          else
00422479              *(uint32_t*)eax = this->version;
0042246f      }
0042246f      
00422486      Archive::CheckAlignment(arg2, 2);
0042248f      uint8_t* eax_1 = Archive::GetBytes(arg2, 2);
0042248f      
00422496      if (eax_1 != 0)
00422496      {
0042249b          if ((arg2->m_flags & 1) == 0)
004224a9              this->base = *(uint16_t*)eax_1;
0042249b          else
004224a1              *(uint16_t*)eax_1 = this->base;
00422496      }
00422496      
004224b1      Archive::CheckAlignment(arg2, 2);
004224ba      uint8_t* eax_2 = Archive::GetBytes(arg2, 2);
004224ba      
004224c1      if (eax_2 != 0)
004224c1      {
004224c6          if ((arg2->m_flags & 1) == 0)
004224d4              this->numDecimalDigits = *(uint16_t*)eax_2;
004224c6          else
004224cc              *(uint16_t*)eax_2 = this->numDecimalDigits;
004224c1      }
004224c1      
004224dd      Serializer::SerializeObject(&this->leadingZero, arg2);
004224e9      Archive::CheckAlignment(arg2, 2);
004224f2      uint8_t* eax_4 = Archive::GetBytes(arg2, 2);
004224f2      
004224f9      if (eax_4 != 0)
004224f9      {
004224fe          if ((arg2->m_flags & 1) == 0)
0042250c              this->groupingSize = *(uint16_t*)eax_4;
004224fe          else
00422504              *(uint16_t*)eax_4 = this->groupingSize;
004224f9      }
004224f9      
00422514      PStringBase<unsigned short>::Serialize(&this->numerals, arg2);
0042251d      PStringBase<unsigned short>::Serialize(&this->decimalSeperator, arg2);
00422526      PStringBase<unsigned short>::Serialize(&this->groupingSeperator, arg2);
0042252f      PStringBase<unsigned short>::Serialize(&this->negativeNumberFormat, arg2);
00422539      Serializer::SerializeObject(&this->isZeroSingular, arg2);
00422543      Serializer::SerializeObject(&this->isOneSingular, arg2);
0042254d      Serializer::SerializeObject(&this->isNegativeOneSingular, arg2);
00422557      Serializer::SerializeObject(&this->isTwoOrMoreSingular, arg2);
00422561      Serializer::SerializeObject(&this->isNegativeTwoOrLessSingular, arg2);
0042256d      PStringBase<unsigned short>::Serialize(&this->treasurePrefixLetters, arg2);
00422576      PStringBase<unsigned short>::Serialize(&this->treasureMiddleLetters, arg2);
0042257f      PStringBase<unsigned short>::Serialize(&this->treasureSuffixLetters, arg2);
00422588      PStringBase<unsigned short>::Serialize(&this->malePlayerLetters, arg2);
00422591      PStringBase<unsigned short>::Serialize(&this->femalePlayerLetters, arg2);
0042259a      Archive::CheckAlignment(arg2, 4);
004225a3      uint8_t* eax_7 = Archive::GetBytes(arg2, 4);
004225a3      
004225aa      if (eax_7 != 0)
004225aa      {
004225af          if ((arg2->m_flags & 1) == 0)
004225ba              this->m_ImeEnabledSetting = *(uint32_t*)eax_7;
004225af          else
004225b4              *(uint32_t*)eax_7 = this->m_ImeEnabledSetting;
004225aa      }
004225aa      
004225c1      Archive::CheckAlignment(arg2, 4);
004225ca      uint8_t* eax_9 = Archive::GetBytes(arg2, 4);
004225ca      
004225d1      if (eax_9 != 0)
004225d1      {
004225d6          if ((arg2->m_flags & 1) == 0)
004225e1              this->m_symbolColor = *(uint32_t*)eax_9;
004225d6          else
004225db              *(uint32_t*)eax_9 = this->m_symbolColor;
004225d1      }
004225d1      
004225e8      Archive::CheckAlignment(arg2, 4);
004225f1      uint8_t* eax_10 = Archive::GetBytes(arg2, 4);
004225f1      
004225f8      if (eax_10 != 0)
004225f8      {
004225fd          if ((arg2->m_flags & 1) == 0)
00422608              this->m_symbolColorText = *(uint32_t*)eax_10;
004225fd          else
00422602              *(uint32_t*)eax_10 = this->m_symbolColorText;
004225f8      }
004225f8      
0042260f      Archive::CheckAlignment(arg2, 4);
00422618      uint8_t* eax_11 = Archive::GetBytes(arg2, 4);
00422618      
0042261f      if (eax_11 != 0)
0042261f      {
00422624          if ((arg2->m_flags & 1) == 0)
0042262f              this->m_symbolHeight = *(uint32_t*)eax_11;
00422624          else
00422629              *(uint32_t*)eax_11 = this->m_symbolHeight;
0042261f      }
0042261f      
00422636      Archive::CheckAlignment(arg2, 4);
0042263f      uint8_t* eax_12 = Archive::GetBytes(arg2, 4);
0042263f      
00422646      if (eax_12 != 0)
00422646      {
0042264b          if ((arg2->m_flags & 1) == 0)
00422656              this->m_symbolTranslucence = *(uint32_t*)eax_12;
0042264b          else
00422650              *(uint32_t*)eax_12 = this->m_symbolTranslucence;
00422646      }
00422646      
0042265d      Archive::CheckAlignment(arg2, 4);
00422666      uint8_t* eax_13 = Archive::GetBytes(arg2, 4);
00422666      
0042266d      if (eax_13 != 0)
0042266d      {
00422672          if ((arg2->m_flags & 1) == 0)
0042267d              this->m_symbolPlacement = *(uint32_t*)eax_13;
00422672          else
00422677              *(uint32_t*)eax_13 = this->m_symbolPlacement;
0042266d      }
0042266d      
00422684      Archive::CheckAlignment(arg2, 4);
0042268d      uint8_t* eax_14 = Archive::GetBytes(arg2, 4);
0042268d      
00422694      if (eax_14 != 0)
00422694      {
00422699          if ((arg2->m_flags & 1) == 0)
004226a7              this->m_candColorBase = *(uint32_t*)eax_14;
00422699          else
004226a1              *(uint32_t*)eax_14 = this->m_candColorBase;
00422694      }
00422694      
004226b1      Archive::CheckAlignment(arg2, 4);
004226ba      uint8_t* eax_15 = Archive::GetBytes(arg2, 4);
004226ba      
004226c1      if (eax_15 != 0)
004226c1      {
004226c6          if ((arg2->m_flags & 1) == 0)
004226d4              this->m_candColorBorder = *(uint32_t*)eax_15;
004226c6          else
004226ce              *(uint32_t*)eax_15 = this->m_candColorBorder;
004226c1      }
004226c1      
004226de      Archive::CheckAlignment(arg2, 4);
004226e7      uint8_t* eax_16 = Archive::GetBytes(arg2, 4);
004226e7      
004226ee      if (eax_16 != 0)
004226ee      {
004226f3          if ((arg2->m_flags & 1) == 0)
00422701              this->m_candColorText = *(uint32_t*)eax_16;
004226f3          else
004226fb              *(uint32_t*)eax_16 = this->m_candColorText;
004226ee      }
004226ee      
0042270b      Archive::CheckAlignment(arg2, 4);
00422714      uint8_t* eax_17 = Archive::GetBytes(arg2, 4);
00422714      
0042271b      if (eax_17 != 0)
0042271b      {
00422720          if ((arg2->m_flags & 1) == 0)
0042272e              this->m_compColorInput = *(uint32_t*)eax_17;
00422720          else
00422728              *(uint32_t*)eax_17 = this->m_compColorInput;
0042271b      }
0042271b      
00422738      Archive::CheckAlignment(arg2, 4);
00422741      uint8_t* eax_18 = Archive::GetBytes(arg2, 4);
00422741      
00422748      if (eax_18 != 0)
00422748      {
0042274d          if ((arg2->m_flags & 1) == 0)
0042275b              this->m_compColorTargetConv = *(uint32_t*)eax_18;
0042274d          else
00422755              *(uint32_t*)eax_18 = this->m_compColorTargetConv;
00422748      }
00422748      
00422765      Archive::CheckAlignment(arg2, 4);
0042276e      uint8_t* eax_19 = Archive::GetBytes(arg2, 4);
0042276e      
00422775      if (eax_19 != 0)
00422775      {
0042277a          if ((arg2->m_flags & 1) == 0)
00422788              this->m_compColorConverted = *(uint32_t*)eax_19;
0042277a          else
00422782              *(uint32_t*)eax_19 = this->m_compColorConverted;
00422775      }
00422775      
00422792      Archive::CheckAlignment(arg2, 4);
0042279b      uint8_t* eax_20 = Archive::GetBytes(arg2, 4);
0042279b      
004227a2      if (eax_20 != 0)
004227a2      {
004227a7          if ((arg2->m_flags & 1) == 0)
004227b5              this->m_compColorTargetNotConv = *(uint32_t*)eax_20;
004227a7          else
004227af              *(uint32_t*)eax_20 = this->m_compColorTargetNotConv;
004227a2      }
004227a2      
004227bf      Archive::CheckAlignment(arg2, 4);
004227c8      uint8_t* eax_21 = Archive::GetBytes(arg2, 4);
004227c8      
004227cf      if (eax_21 != 0)
004227cf      {
004227d4          if ((arg2->m_flags & 1) == 0)
004227e2              this->m_compColorInputErr = *(uint32_t*)eax_21;
004227d4          else
004227dc              *(uint32_t*)eax_21 = this->m_compColorInputErr;
004227cf      }
004227cf      
004227ec      Archive::CheckAlignment(arg2, 4);
004227f5      uint8_t* eax_22 = Archive::GetBytes(arg2, 4);
004227f5      
004227fc      if (eax_22 != 0)
004227fc      {
00422801          if ((arg2->m_flags & 1) == 0)
0042280f              this->m_compTranslucence = *(uint32_t*)eax_22;
00422801          else
00422809              *(uint32_t*)eax_22 = this->m_compTranslucence;
004227fc      }
004227fc      
00422819      Archive::CheckAlignment(arg2, 4);
00422822      uint8_t* eax_23 = Archive::GetBytes(arg2, 4);
00422822      
00422829      if (eax_23 != 0)
00422829      {
0042282e          if ((arg2->m_flags & 1) == 0)
0042283c              this->m_compColorText = *(uint32_t*)eax_23;
0042282e          else
00422836              *(uint32_t*)eax_23 = this->m_compColorText;
00422829      }
00422829      
00422846      Archive::CheckAlignment(arg2, 4);
0042284f      uint8_t* eax_24 = Archive::GetBytes(arg2, 4);
0042284f      
00422856      if (eax_24 != 0)
00422856      {
0042285b          if ((arg2->m_flags & 1) == 0)
00422869              this->m_otherIME = *(uint32_t*)eax_24;
0042285b          else
00422863              *(uint32_t*)eax_24 = this->m_otherIME;
00422856      }
00422856      
00422873      Archive::CheckAlignment(arg2, 4);
0042287c      int32_t* eax_25 = Archive::GetBytes(arg2, 4);
0042287c      
00422883      if (eax_25 != 0)
00422883      {
00422888          if ((arg2->m_flags & 1) == 0)
00422896              this->m_wordWrapOnSpace = *(uint32_t*)eax_25;
00422888          else
00422890              *(uint32_t*)eax_25 = this->m_wordWrapOnSpace;
00422883      }
00422883      
004228a3      PStringBase<unsigned short>::Serialize(&this->m_additionalSettings, arg2);
004228ac      Archive::CheckAlignment(arg2, 4);
004228b5      uint32_t* eax_26 = Archive::GetBytes(arg2, 4);
004228b5      
004228bc      if (eax_26 != 0)
004228bc      {
004228c1          if ((arg2->m_flags & 1) != 0)
004228c1          {
004228cb              *(uint32_t*)eax_26 = this->m_additionalFlags;
004228ce              return;
004228c1          }
004228c1          
004228d3          this->m_additionalFlags = *(uint32_t*)eax_26;
004228bc      }
00422450  }

004228df                                                                                               90                                 .

004228e0  void _STL::fill(void** arg1, void** arg2, void** arg3)

004228e0  {
004228ea      for (void** i = arg1; i != arg2; i = &i[1])
004228f3          *(uint32_t*)i = *(uint32_t*)arg3;
004228e0  }

004228fe                                                                                            90 90                                ..

00422900  uint32_t const* _STL::__lower_bound(uint32_t const* arg1, uint32_t const* arg2, uint32_t const* arg3, struct _STL::__less_2<unsigned long,unsigned long> arg4, int32_t* arg5)

00422900  {
00422904      uint32_t const* result = arg1;
0042290a      int32_t i = (((char*)arg2 - result) >> 2);
0042290a      
0042290f      while (i > 0)
0042290f      {
00422922          int32_t i_1 = (i >> 1);
00422922          
00422927          if (result[i_1] >= *(uint32_t*)arg3)
00422936              i = i_1;
00422927          else
00422927          {
0042292e              result = &result[(i_1 + 1)];
00422932              i += (0xffffffff - i_1);
00422927          }
0042290f      }
0042290f      
0042293e      return result;
00422900  }

0042293f                                                                                               90                                 .

00422940  int32_t* __thiscall _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::_M_find(void* arg1, int32_t* arg2)

00422940  {
00422947      char* edi = *(uint32_t*)arg2;
00422949      uint32_t eax = *(uint32_t*)(edi - 8);
00422949      
00422951      if (eax == 0xffffffff)
00422951      {
00422954          eax = compute_str_hash(edi);
0042295c          *(uint32_t*)(edi - 8) = eax;
00422951      }
00422951      
00422962      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 4);
00422975      int32_t* i;
00422975      
00422975      for (i = *(uint32_t*)(edi_1 + ((COMBINE(0, eax) % ((*(uint32_t*)((char*)arg1 + 8) - edi_1) >> 2)) << 2)); i != 0; i = *(uint32_t*)i)
00422975      {
00422982          if (PStringBase<char>::operator==(&i[1], arg2) != 0)
00422982              break;
00422975      }
00422975      
0042298f      return i;
00422940  }

00422992                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004229a0  void** __thiscall _STL::vector<void*,class _STL::allocator<void*> >::_M_allocate_and_copy(_STL::vector<void*,class _STL::allocator<void*> >* this, uint32_t arg2, void** arg3, void** arg4)

004229a0  {
004229a7      void* result;
004229a7      
004229a7      if (arg2 == 0)
004229cc          result = nullptr;
004229a7      else
004229a7      {
004229a9          uint32_t eax = (arg2 << 2);
004229a9          
004229b2          if (eax <= 0x80)
004229c8              result = _STL::__node_alloc<1,0>::_M_allocate(eax);
004229b2          else
004229bc              result = operator new(eax);
004229a7      }
004229a7      
004229d8      if (arg4 != arg3)
004229df          memmove(result, arg3, ((char*)arg4 - arg3));
004229df      
004229eb      return result;
004229a0  }

004229ee                                            90 90                                                                ..

004229f0  void __thiscall _STL::vector<void *,_STL::allocator<void *> >::reserve(class _STL::vector<void *,_STL::allocator<void *> >* this, uint32_t arg2)

004229f0  {
004229f8      void** _M_start = this->_M_start;
004229f8      
00422a04      if (((this->_M_end_of_storage._M_data - _M_start) >> 2) < arg2)
00422a04      {
00422a06          void** _M_finish = this->_M_finish;
00422a14          void** edi_1;
00422a14          
00422a14          if (_M_start != 0)
00422a14          {
00422a20              edi_1 = _STL::vector<void*,class _STL::allocator<void*> >::_M_allocate_and_copy(this, arg2, _M_start, _M_finish);
00422a22              void** _M_start_1 = this->_M_start;
00422a22              
00422a26              if (_M_start_1 != 0)
00422a35                  _STL::__node_alloc<1,0>::deallocate(_M_start_1, (((this->_M_end_of_storage._M_data - _M_start_1) >> 2) << 2));
00422a14          }
00422a14          else if (arg2 == 0)
00422a6a              edi_1 = nullptr;
00422a41          else
00422a41          {
00422a43              uint32_t eax_1 = (arg2 << 2);
00422a43              
00422a50              if (eax_1 <= 0x80)
00422a66                  edi_1 = _STL::__node_alloc<1,0>::_M_allocate(eax_1);
00422a50              else
00422a5a                  edi_1 = operator new(eax_1);
00422a41          }
00422a41          
00422a72          this->_M_start = edi_1;
00422a75          this->_M_finish = &edi_1[(((char*)_M_finish - _M_start) >> 2)];
00422a78          this->_M_end_of_storage._M_data = &edi_1[arg2];
00422a04      }
004229f0  }

00422a81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00422a90  void __thiscall _STL::vector<char const *,_STL::allocator<char const *> >::_M_insert_overflow(class _STL::vector<char const *,_STL::allocator<char const *> >* this, char const** arg2, char const** arg3, struct _STL::__true_type const* arg4, uint32_t arg5, uint8_t arg6)

00422a90  {
00422a90      class _STL::vector<char const *,_STL::allocator<char const *> >* this_1 = this;
00422a9c      uint32_t i_2 = arg5;
00422aa0      int32_t this_2 = ((this->_M_finish - this->_M_start) >> 2);
00422aa5      this_1 = this_2;
00422aa9      uint32_t* ecx = &arg5;
00422aa9      
00422aad      if (this_2 >= i_2)
00422aaf          ecx = &this_1;
00422aaf      
00422ab3      uint32_t ecx_1 = *(uint32_t*)ecx;
00422ab5      uint32_t i_1 = (ecx_1 + this_2);
00422ab7      this_1 = i_1;
00422ab7      
00422abb      if (ecx_1 == -(this_2))
00422ae8          arg5 = 0;
00422abb      else
00422abb      {
00422abd          uint32_t eax_2 = (i_1 << 2);
00422abd          
00422aca          if (eax_2 <= 0x80)
00422aca          {
00422ada              void* eax_4;
00422ada              eax_4 = _STL::__node_alloc<1,0>::_M_allocate(eax_2);
00422ae2              arg5 = eax_4;
00422aca          }
00422aca          else
00422aca          {
00422acc              void* eax_3;
00422acc              eax_3 = operator new(eax_2);
00422ad4              arg5 = eax_3;
00422aca          }
00422abb      }
00422abb      
00422af0      char const** _M_start = this->_M_start;
00422afa      uint32_t eax_5;
00422afa      
00422afa      if (arg2 != _M_start)
00422afa      {
00422b04          int32_t esi_2 = ((char*)arg2 - _M_start);
00422b0d          int32_t eax_7;
00422b0d          eax_7 = memmove(arg5, _M_start, esi_2);
00422b16          eax_5 = (eax_7 + esi_2);
00422afa      }
00422afa      else
00422afc          eax_5 = arg5;
00422afc      
00422b1a      if (i_2 > 0)
00422b1a      {
00422b20          i_1 = i_2;
00422b2a          uint32_t i;
00422b2a          
00422b2a          do
00422b2a          {
00422b24              *(uint32_t*)eax_5 = *(uint32_t*)arg3;
00422b26              eax_5 += 4;
00422b29              i = i_1;
00422b29              i_1 -= 1;
00422b2a          } while (i != 1);
00422b1a      }
00422b1a      
00422b2c      i_1 = arg6;
00422b32      uint32_t edi = eax_5;
00422b32      
00422b34      if (i_1 == 0)
00422b34      {
00422b36          char const** _M_finish = this->_M_finish;
00422b36          
00422b3b          if (_M_finish != arg2)
00422b3b          {
00422b3d              int32_t esi_4 = ((char*)_M_finish - arg2);
00422b4d              edi = (memmove(eax_5, arg2, esi_4) + esi_4);
00422b3b          }
00422b34      }
00422b34      
00422b4f      char const** _M_start_1 = this->_M_start;
00422b4f      
00422b55      if (_M_start_1 != 0)
00422b64          _STL::__node_alloc<1,0>::deallocate(_M_start_1, (((this->_M_end_of_storage._M_data - _M_start_1) >> 2) << 2));
00422b64      
00422b6c      uint32_t eax_9 = arg5;
00422b70      class _STL::vector<char const *,_STL::allocator<char const *> >* this_3 = this_1;
00422b74      this->_M_finish = edi;
00422b77      this->_M_start = eax_9;
00422b7f      this->_M_end_of_storage._M_data = (eax_9 + (this_3 << 2));
00422a90  }

00422b87                       90 90 90 90 90 90 90 90 90                                                         .........

00422b90  void __thiscall _STL::vector<void *,_STL::allocator<void *> >::vector<void *,_STL::allocator<void *> >(class _STL::vector<void *,_STL::allocator<void *> >* this, uint32_t arg2, void** arg3, class _STL::allocator<void *> const* arg4)

00422b90  {
00422b94      uint32_t i_1 = arg2;
00422b9a      this->_M_start = 0;
00422ba0      this->_M_finish = nullptr;
00422ba7      this->_M_end_of_storage._M_data = 0;
00422bae      void* eax_1;
00422bae      
00422bae      if (i_1 == 0)
00422bd3          eax_1 = nullptr;
00422bae      else
00422bae      {
00422bb0          uint32_t eax = (i_1 << 2);
00422bb0          
00422bbd          if (eax <= 0x80)
00422bc9              eax_1 = _STL::__node_alloc<1,0>::_M_allocate(eax);
00422bbd          else
00422bbf              eax_1 = operator new(eax);
00422bae      }
00422bae      
00422bda      this->_M_start = eax_1;
00422bdc      this->_M_finish = eax_1;
00422bdf      this->_M_end_of_storage._M_data = ((char*)eax_1 + (i_1 << 2));
00422bdf      
00422be2      if (i_1 > 0)
00422be2      {
00422bf0          uint32_t i;
00422bf0          
00422bf0          do
00422bf0          {
00422bea              *(uint32_t*)eax_1 = *(uint32_t*)arg3;
00422bec              eax_1 += 4;
00422bef              i = i_1;
00422bef              i_1 -= 1;
00422bf0          } while (i != 1);
00422be2      }
00422be2      
00422bf2      this->_M_finish = eax_1;
00422b90  }

00422bfc                                                                                      90 90 90 90                              ....

00422c00  void __thiscall _STL::vector<void *,_STL::allocator<void *> >::_M_fill_insert(class _STL::vector<void *,_STL::allocator<void *> >* this, void** arg2, uint32_t arg3, void** arg4)

00422c00  {
00422c04      uint32_t edi = arg3;
00422c04      
00422c0c      if (edi != 0)
00422c0c      {
00422c12          void** _M_finish = this->_M_finish;
00422c18          void** edx_1 = arg4;
00422c18          
00422c23          if (((this->_M_end_of_storage._M_data - _M_finish) >> 2) >= edi)
00422c23          {
00422c2d              void* eax_4 = *(uint32_t*)edx_1;
00422c2f              void** _M_finish_1 = this->_M_finish;
00422c37              int32_t edx_2 = (((char*)_M_finish - arg2) >> 2);
00422c3b              arg3 = eax_4;
00422c3b              
00422c43              if (edx_2 <= edi)
00422c43              {
00422ca6                  int32_t ecx_5 = (edi - edx_2);
00422ca8                  arg4 = ecx_5;
00422ca8                  
00422cac                  if (edi != edx_2)
00422cac                  {
00422cb0                      int32_t ecx_6;
00422cb0                      int32_t edi_5;
00422cb0                      edi_5 = __memfill_u32(_M_finish_1, eax_4, ecx_5);
00422cb2                      ecx_5 = arg4;
00422cac                  }
00422cac                  
00422cc0                  void* edi_7 = &this->_M_finish[ecx_5];
00422cc4                  this->_M_finish = edi_7;
00422cc4                  
00422cc9                  if (_M_finish_1 != arg2)
00422cd2                      memmove(edi_7, arg2, ((char*)_M_finish_1 - arg2));
00422cd2                  
00422ce7                  this->_M_finish = &this->_M_finish[edx_2];
00422cf1                  _STL::fill(arg2, _M_finish_1, &arg3);
00422cfd                  return;
00422c43              }
00422c43              
00422c45              uint32_t eax_5 = (edi << 2);
00422c4e              void* edi_2 = ((char*)_M_finish_1 - eax_5);
00422c52              arg4 = eax_5;
00422c52              
00422c56              if (_M_finish_1 != edi_2)
00422c56              {
00422c5f                  memmove(_M_finish_1, edi_2, ((char*)_M_finish_1 - edi_2));
00422c65                  eax_5 = arg4;
00422c56              }
00422c56              
00422c71              int32_t edi_3 = ((char*)edi_2 - arg2);
00422c75              this->_M_finish += eax_5;
00422c75              
00422c78              if (edi_3 > 0)
00422c78              {
00422c7f                  memmove(((char*)_M_finish_1 - edi_3), arg2, edi_3);
00422c85                  eax_5 = arg4;
00422c78              }
00422c78              
00422c95              _STL::fill(arg2, (eax_5 + arg2), &arg3);
00422ca1              return;
00422c23          }
00422c23          
00422d10          _STL::vector<char const *,_STL::allocator<char const *> >::_M_insert_overflow(this, arg2, edx_1, &arg4, edi, 0);
00422c0c      }
00422c00  }

00422d1c                                                                                      90 90 90 90                              ....

00422d20  void __fastcall _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::clear(class _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >* this)

00422d20  {
00422d2a      int32_t i = 0;
00422d31      class _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >* this_1 = this;
00422d35      int32_t i_1 = 0;
00422d35      
00422d39      if (((this->_M_buckets._M_finish - this->_M_buckets._M_start) >> 2) > 0)
00422d39      {
00422dd8          do
00422dd8          {
00422d4b              class _STL::_Node_alloc_obj* _M_free_list_link_1 = this->_M_buckets._M_start[i];
00422d4b              
00422d50              if (_M_free_list_link_1 != 0)
00422d50              {
00422db4                  class _STL::_Node_alloc_obj* _M_free_list_link;
00422db4                  
00422db4                  do
00422db4                  {
00422d55                      _M_free_list_link = _M_free_list_link_1->_M_free_list_link;
00422d57                      int32_t* edi_2 = (*(int32_t*)((char*)_M_free_list_link_1 + 8) - 0x14);
00422d57                      
00422d66                      if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00422d6e                          **(uint32_t**)edi_2(1);
00422d6e                      
00422d73                      int32_t* edi_4 = (*(int32_t*)((char*)_M_free_list_link_1 + 4) - 0x14);
00422d73                      
00422d82                      if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
00422d8a                          **(uint32_t**)edi_4(1);
00422d8a                      
00422d91                      _STL::_STLP_mutex_spin<0>::_M_do_lock(&_STL::_Node_Alloc_Lock<1,0>::_S_lock);
00422d9b                      _M_free_list_link_1->_M_free_list_link = _STL::__node_alloc<1,0>::_S_free_list[1];
00422da2                      _STL::__node_alloc<1,0>::_S_free_list[1] = _M_free_list_link_1;
00422da8                      _STL::_Node_Alloc_Lock<1,0>::_S_lock._M_lock = 0;
00422db2                      _M_free_list_link_1 = _M_free_list_link;
00422db4                  } while (_M_free_list_link != 0);
00422db6                  i = i_1;
00422dba                  this = this_1;
00422d50              }
00422d50              
00422dbe              this->_M_buckets._M_start[i] = 0;
00422dce              i += 1;
00422dd4              i_1 = i;
00422dd8          } while (i < ((this->_M_buckets._M_finish - this->_M_buckets._M_start) >> 2));
00422d39      }
00422d39      
00422de1      this->_M_num_elements._M_data = 0;
00422d20  }

00422ded                                         90 90 90                                                               ...

00422df0  void __thiscall _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::resize(class _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >* this, uint32_t arg2)

00422df0  {
00422df3      uint32_t eax = arg2;
00422e02      int32_t ebp_2 = ((this->_M_buckets._M_finish - this->_M_buckets._M_start) >> 2);
00422e07      int32_t var_10 = ebp_2;
00422e07      
00422e0b      if (eax > ebp_2)
00422e0b      {
00422e12          arg2 = eax;
00422e1a          int32_t ebx_1 = 0;
00422e2d          uint32_t* eax_2 = _STL::__lower_bound(&_STL::_Stl_prime<bool>::_M_list, "config/ProjectSettings.xml", &arg2, ((int8_t)arg2), nullptr);
00422e3a          uint32_t eax_3;
00422e3a          
00422e3a          if (eax_2 != "config/ProjectSettings.xml")
00422e3a          {
00422e47              uint32_t edx_1 = *(uint32_t*)eax_2;
00422e49              arg2 = edx_1;
00422e4d              eax_3 = edx_1;
00422e3a          }
00422e3a          else
00422e3a          {
00422e3c              eax_3 = 0xfffffffb;
00422e41              arg2 = 0xfffffffb;
00422e3a          }
00422e3a          
00422e51          if (eax_3 > ebp_2)
00422e51          {
00422e66              void* var_14 = nullptr;
00422e6a              int32_t var_c;
00422e6a              _STL::vector<void *,_STL::allocator<void *> >::vector<void *,_STL::allocator<void *> >(&var_c, eax_3, &var_14, &arg2);
00422e6a              
00422e71              if (ebp_2 > 0)
00422e71              {
00422ec2                  do
00422ec2                  {
00422e76                      int32_t* i = this->_M_buckets._M_start[ebx_1];
00422e76                      
00422e7b                      if (i != 0)
00422e7b                      {
00422eb9                          do
00422eb9                          {
00422e80                              char* ebp_3 = i[1];
00422e83                              uint32_t eax_5 = *(uint32_t*)(ebp_3 - 8);
00422e83                              
00422e89                              if (eax_5 == 0xffffffff)
00422e89                              {
00422e8c                                  eax_5 = compute_str_hash(ebp_3);
00422e94                                  *(uint32_t*)(ebp_3 - 8) = eax_5;
00422e89                              }
00422e89                              
00422e99                              uint32_t temp1_1 = (COMBINE(0, eax_5) % arg2);
00422e9f                              this->_M_buckets._M_start[ebx_1] = *(uint32_t*)i;
00422ea5                              int32_t eax_7 = var_c;
00422eac                              *(uint32_t*)i = *(uint32_t*)(eax_7 + (temp1_1 << 2));
00422eae                              *(uint32_t*)(eax_7 + (temp1_1 << 2)) = i;
00422eb4                              i = this->_M_buckets._M_start[ebx_1];
00422eb9                          } while (i != 0);
00422eb9                          
00422ebb                          ebp_2 = var_10;
00422e7b                      }
00422e7b                      
00422ebf                      ebx_1 += 1;
00422ec2                  } while (ebx_1 < ebp_2);
00422e71              }
00422e71              
00422ec4              void** _M_start = this->_M_buckets._M_start;
00422ed1              this->_M_buckets._M_start = var_c;
00422ed4              void** var_8;
00422ed4              this->_M_buckets._M_finish = var_8;
00422ede              class _STL::_STLP_alloc_proxy<void * *,void *,_STL::allocator<void *> > var_4;
00422ede              this->_M_buckets._M_end_of_storage._M_data = var_4;
00422ede              
00422ee1              if (_M_start != 0)
00422eed                  _STL::__node_alloc<1,0>::deallocate(_M_start, (((this->_M_buckets._M_end_of_storage._M_data - _M_start) >> 2) << 2));
00422e51          }
00422e0b      }
00422df0  }

00422eff                                                                                               90                                 .

00422f00  struct _STL::pair<PStringBase<char> const ,PStringBase<char> >* __thiscall _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::_M_insert(class _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >* this, struct _STL::pair<PStringBase<char> const ,PStringBase<char> > const* arg2)

00422f00  {
00422f00      class _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >* this_1 = this;
00422f0c      _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::resize(this, (this->_M_num_elements._M_data + 1));
00422f1d      class PSRefBufferCharData<char>* m_charbuffer_2 = arg2->first.m_charbuffer;
00422f1f      uint32_t eax_2 = *(int32_t*)((char*)m_charbuffer_2 + -8);
00422f22      int32_t edi_2 = ((this->_M_buckets._M_finish - this->_M_buckets._M_start) >> 2);
00422f22      
00422f28      if (eax_2 == 0xffffffff)
00422f28      {
00422f2b          eax_2 = compute_str_hash(m_charbuffer_2);
00422f33          *(uint32_t*)((char*)m_charbuffer_2 - 8) = eax_2;
00422f28      }
00422f28      
00422f38      uint32_t temp1 = (COMBINE(0, eax_2) % edi_2);
00422f41      int32_t eax_3 = this->_M_buckets._M_start[temp1];
00422f48      void* eax_4 = _STL::__node_alloc<1,0>::_M_allocate(0xc);
00422f57      *(uint32_t*)eax_4 = 0;
00422f57      
00422f5d      if (eax_4 != 0xfffffffc)
00422f5d      {
00422f63          class PSRefBufferCharData<char>* m_charbuffer = arg2->first.m_charbuffer;
00422f65          *(uint32_t*)((char*)eax_4 + 4) = m_charbuffer;
00422f6b          InterlockedIncrement(&m_charbuffer[-1]);
00422f75          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->second.m_charbuffer;
00422f78          *(uint32_t*)((char*)eax_4 + 8) = m_charbuffer_1;
00422f7f          InterlockedIncrement(&m_charbuffer_1[-1]);
00422f5d      }
00422f5d      
00422f89      *(uint32_t*)eax_4 = eax_3;
00422f8b      this->_M_buckets._M_start[temp1] = eax_4;
00422f96      this->_M_num_elements._M_data += 1;
00422f9f      return ((char*)eax_4 + 4);
00422f00  }

00422fa2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00422fb0  class PStringBase<char>* __thiscall _STL::hash_map<PStringBase<char>,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::operator[](class _STL::hash_map<PStringBase<char>,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >* this, class PStringBase<char> const* arg2)

00422fb0  {
00422fb4      class PStringBase<char>* ebx = arg2;
00422fbe      int32_t var_c = 0;
00422fc6      int32_t* eax = _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::_M_find(this, ebx);
00422fcd      class PStringBase<char>* var_4;
00422fcd      class PSRefBufferCharData<char>* m_charbuffer;
00422fcd      void* result;
00422fcd      class PSRefBufferCharData<char>* m_charbuffer_1;
00422fcd      
00422fcd      if (eax != 0)
00422fcd      {
00423016          m_charbuffer = m_charbuffer_1;
0042301a          result = &eax[2];
00422fcd      }
00422fcd      else
00422fcd      {
00422fcf          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00422fde          var_c = 3;
00422fe6          arg2 = PStringBase<char>::s_NullBuffer_1;
00422fea          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00422fec          m_charbuffer = ebx->m_charbuffer;
00422ff2          m_charbuffer_1 = m_charbuffer;
00422ff6          InterlockedIncrement(&m_charbuffer[-1]);
00422ffd          var_4 = arg2;
00423001          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00423011          result = &_STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::_M_insert(this, &m_charbuffer_1)->second;
00422fcd      }
00422fcd      
00423028      if ((var_c & 2) != 0)
00423028      {
0042302a          var_c &= 0xfffffffd;
0042302a          
00423042          if ((InterlockedDecrement(&var_4[-4]) == 0 && var_4 != 0x14))
0042304a              *(uint32_t*)*(int32_t*)((char*)var_4 + -0x14)(1);
0042304a          
0042305b          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00423063              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00423028      }
00423028      
0042306a      if (((var_c & 1) != 0 && (InterlockedDecrement(&arg2[-4]) == 0 && arg2 != 0x14)))
00423087          *(uint32_t*)*(int32_t*)((char*)arg2 + -0x14)(1);
00423087      
00423092      return result;
00422fb0  }

00423095                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004230a0  void __thiscall _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::_M_initialize_buckets(class _STL::hashtable<_STL::pair<PStringBase<char> const ,PStringBase<char> >,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::_Select1st<_STL::pair<PStringBase<char> const ,PStringBase<char> > >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >* this, uint32_t arg2)

004230a0  {
004230ab      arg2 = arg2;
004230c3      uint32_t* eax = _STL::__lower_bound(&_STL::_Stl_prime<bool>::_M_list, "config/ProjectSettings.xml", &arg2, ((int8_t)arg2), nullptr);
004230d0      uint32_t ebx = 0xfffffffb;
004230d0      
004230d5      if (eax != "config/ProjectSettings.xml")
004230d7          ebx = *(uint32_t*)eax;
004230d7      
004230df      _STL::vector<void *,_STL::allocator<void *> >::reserve(&this->_M_buckets, ebx);
004230e4      void** _M_finish = this->_M_buckets._M_finish;
004230f0      arg2 = 0;
004230f8      _STL::vector<void *,_STL::allocator<void *> >::_M_fill_insert(&this->_M_buckets, _M_finish, ebx, &arg2);
004230fe      this->_M_num_elements._M_data = 0;
004230a0  }

0042310a                                90 90 90 90 90 90                                                            ......

00423110  class PStringBase<char>* __convention("regparm") ProjectSettings::CompleteProjectPath(class PStringBase<char>* __return, class PStringBase<char> const* arg2)

00423110  {
00423110      class PStringBase<char> __return_3;
00423110      class PStringBase<char> __return_1 = __return_3;
0042312e      PStringBase<char>::operator+(_STL::hash_map<PStringBase<char>,PStringBase<char>,_STL::hash<PStringBase<char> >,_STL::equal_to<PStringBase<char> >,_STL::allocator<_STL::pair<PStringBase<char> const ,PStringBase<char> > > >::operator[](&ProjectSettings::sm_settings, &BRANCHBASEDIR), &__return_1, arg2);
0042313a      PSUtils::cleanup_filename(&__return_1, 0);
0042313f      class PStringBase<char> __return_2 = __return_1;
00423147      __return->m_charbuffer = __return_2;
00423150      InterlockedIncrement((__return_2 - 0x10));
0042315a      int32_t* esi_1 = (__return_1 - 0x14);
0042315a      
0042316d      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00423175          **(uint32_t**)esi_1(1);
00423175      
0042317c      return __return;
00423110  }

0042317d                                                                                         90 90 90                               ...

00423180  uint8_t __thiscall MasterProperty::InqPropertyNameString(class MasterProperty const* this, uint32_t arg2, class PStringBase<char>* arg3)

00423180  {
00423183      /* tailcall */
00423183      return EnumMapper::GetString(&this->m_emapper, arg2, arg3);
00423180  }

00423188                          90 90 90 90 90 90 90 90                                                          ........

00423190  uint32_t __fastcall ReferenceCountTemplate<1048576,1>::Release(class ReferenceCountTemplate<1048576,1> const* this)

00423190  {
00423190      uint32_t m_cRef = this->m_cRef;
00423193      uint32_t result = (m_cRef - 1);
00423194      this->m_cRef = result;
00423194      
00423197      if (m_cRef != 1)
004231a1          return result;
004231a1      
00423199      this->vtable->__vecDelDtor(1);
0042319f      return 0;
00423190  }

004231a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004231b0  void __fastcall BaseProperty::~BaseProperty(class BaseProperty* this)

004231b0  {
004231b3      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
004231b3      
004231b7      if (m_pcPropertyDesc != 0)
004231b7      {
004231b9          uint32_t m_cRef = m_pcPropertyDesc->m_cRef;
004231b9          m_pcPropertyDesc->m_cRef -= 1;
004231b9          
004231bc          if (m_cRef == 1)
004231be              m_pcPropertyDesc->vtable->__vecDelDtor(1);
004231be          
004231c4          this->m_pcPropertyDesc = 0;
004231b7      }
004231b7      
004231ca      class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
004231ca      
004231cf      if (m_pcPropertyValue != 0)
004231cf      {
004231d1          uint32_t m_cRef_1 = m_pcPropertyValue->m_cRef;
004231d1          m_pcPropertyValue->m_cRef -= 1;
004231d1          
004231d4          if (m_cRef_1 == 1)
004231d6              m_pcPropertyValue->vtable->__vecDelDtor(1);
004231d6          
004231dc          this->m_pcPropertyValue = nullptr;
004231cf      }
004231b0  }

004231e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004231f0  uint8_t __thiscall FloatPropertyValue::InqFloat(class FloatPropertyValue const* this, float* arg2)

004231f0  {
004231f7      *(uint32_t*)arg2 = this->m_value;
004231f9      float eax;
004231f9      eax = 1;
004231fb      return 1;
004231f0  }

004231fe                                                                                            90 90                                ..

00423200  uint8_t __thiscall TriStatePropertyValue::SetTriState(class TriStatePropertyValue* this, enum TriState const arg2)

00423200  {
00423204      this->m_value = arg2;
00423207      enum TriState eax;
00423207      eax = 1;
00423209      return 1;
00423200  }

0042320c                                      90 90 90 90                                                              ....

00423210  uint8_t __thiscall Bitfield32PropertyValue::SetValue(class Bitfield32PropertyValue* this, class BasePropertyValue const* arg2)

00423210  {
00423216      struct BasePropertyValue::VTable* vtable = arg2->vtable;
0042321b      arg2 = &this->m_value;
0042321f      /* jump -> vtable->InqBitfield32 */
00423210  }

00423225                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00423230  uint8_t __thiscall Bitfield32PropertyValue::Compare(class Bitfield32PropertyValue const* this, class BasePropertyValue const* arg2)

00423230  {
00423233      class BasePropertyValue* ecx = arg2;
00423233      
00423239      if ((ecx != 0 && ecx->vtable->InqBitfield32(&arg2) != 0))
0042325b          return this->m_value == arg2;
0042325b      
00423261      return 0;
00423230  }

00423264              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00423270  uint8_t __thiscall Bitfield32PropertyValue::InqLessThan(class Bitfield32PropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

00423270  {
00423286      if (arg2->vtable->InqBitfield32(&arg2) == 0)
004232a3          return 0;
004232a3      
00423295      class BasePropertyValue* ecx_1;
00423295      ecx_1 = this->m_value < arg2;
00423298      *(uint8_t*)arg3 = ecx_1;
0042329a      uint32_t eax_2;
0042329a      eax_2 = 1;
0042329d      return 1;
00423270  }

004232a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004232b0  void __thiscall Bitfield32PropertyValue::operator&=(class Bitfield32PropertyValue* this, class BasePropertyValue const* arg2)

004232b0  {
004232c6      if (arg2->vtable->InqBitfield32(&arg2) != 0)
004232d1          this->m_value &= arg2;
004232b0  }

004232d8                                                                          90 90 90 90 90 90 90 90                          ........

004232e0  void __thiscall Bitfield32PropertyValue::on(class Bitfield32PropertyValue* this, class BasePropertyValue const* arg2)

004232e0  {
004232f6      if (arg2->vtable->InqBitfield32(&arg2) != 0)
00423301          this->m_value |= arg2;
004232e0  }

00423308                          90 90 90 90 90 90 90 90                                                          ........

00423310  void __thiscall Bitfield32PropertyValue::operator^=(class Bitfield32PropertyValue* this, class BasePropertyValue const* arg2)

00423310  {
00423326      if (arg2->vtable->InqBitfield32(&arg2) != 0)
00423331          this->m_value ^= arg2;
00423310  }

00423338                                                                          90 90 90 90 90 90 90 90                          ........

00423340  uint8_t __thiscall Bitfield32PropertyValue::operator!=(class Bitfield32PropertyValue const* this, class BasePropertyValue const* arg2)

00423340  {
00423356      if (arg2->vtable->InqBitfield32(&arg2) == 0)
0042336d          return 0;
0042336d      
00423367      return this->m_value != arg2;
00423340  }


00423370  uint8_t __thiscall Bitfield32PropertyValue::operator==(class Bitfield32PropertyValue const* this, class BasePropertyValue const* arg2)

00423370  {
00423386      if (arg2->vtable->InqBitfield32(&arg2) == 0)
0042339d          return 0;
0042339d      
00423397      return this->m_value == arg2;
00423370  }


004233a0  uint8_t __thiscall Bitfield32PropertyValue::contains(class Bitfield32PropertyValue const* this, class BasePropertyValue const* arg2)

004233a0  {
004233b6      if (arg2->vtable->InqBitfield32(&arg2) == 0)
004233cf          return 0;
004233cf      
004233bb      class BasePropertyValue* ecx_1 = arg2;
004233c1      void* eax_4 = ((this->m_value & ecx_1) - ecx_1);
004233c3      int32_t eax_5 = -(eax_4);
004233c9      return (((int8_t)(eax_5 - eax_5)) + 1);
004233a0  }

004233d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004233e0  void __thiscall Bitfield32PropertyValue::off(class Bitfield32PropertyValue* this, class BasePropertyValue const* arg2)

004233e0  {
004233f6      if (arg2->vtable->InqBitfield32(&arg2) != 0)
00423403          this->m_value &= !(arg2);
004233e0  }

0042340a                                90 90 90 90 90 90                                                            ......

00423410  void __fastcall Bitfield32PropertyValue::toggle(class Bitfield32PropertyValue* this)

00423410  {
00423415      this->m_value = !(this->m_value);
00423410  }

00423419                                                                             90 90 90 90 90 90 90                           .......

00423420  class BasePropertyValue* __fastcall Bitfield32PropertyValue::Copy(class Bitfield32PropertyValue const* this)

00423420  {
00423425      void* result = operator new(0xc);
00423425      
0042342f      if (result == 0)
00423449          return 0;
00423449      
00423431      uint32_t m_value = this->m_value;
00423434      *(uint32_t*)((char*)result + 4) = 1;
0042343b      *(uint32_t*)result = &Bitfield32PropertyValue::`vftable';
00423441      *(uint32_t*)((char*)result + 8) = m_value;
00423445      return result;
00423420  }

0042344a                                90 90 90 90 90 90                                                            ......

00423450  uint8_t __thiscall LongIntegerPropertyValue::InqLongInteger(class LongIntegerPropertyValue const* this, int64_t* arg2)

00423450  {
00423457      *(uint32_t*)arg2 = this->m_value;
0042345c      *(uint32_t*)((char*)arg2 + 4) = *(uint32_t*)((char*)this->m_value)[4];
0042345f      int64_t* eax;
0042345f      eax = 1;
00423461      return 1;
00423450  }

00423464              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00423470  uint8_t __thiscall TimeStampPropertyValue::SetTimeStamp(class TimeStampPropertyValue* this, double const arg2)

00423470  {
00423478      this->m_value = arg2;
0042347b      *(uint32_t*)((char*)this->m_value)[4] = *(uint32_t*)((char*)arg2)[4];
0042347e      int32_t eax;
0042347e      eax = 1;
00423480      return 1;
00423470  }

00423483           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00423490  uint8_t __thiscall Bitfield64PropertyValue::SetValue(class Bitfield64PropertyValue* this, class BasePropertyValue const* arg2)

00423490  {
00423496      struct BasePropertyValue::VTable* vtable = arg2->vtable;
0042349b      arg2 = &this->m_value;
0042349f      /* jump -> vtable->InqBitfield64 */
00423490  }

004234a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004234b0  uint8_t __thiscall Bitfield64PropertyValue::Compare(class Bitfield64PropertyValue const* this, class BasePropertyValue const* arg2)

004234b0  {
004234bc      int32_t var_8;
004234bc      
004234bc      if ((arg2 != 0 && arg2->vtable->InqBitfield64(&var_8) != 0))
004234bc      {
004234df          int32_t var_4;
004234df          
004234df          if ((this->m_value == var_8 && *(uint32_t*)((char*)this->m_value)[4] == var_4))
004234ea              return 1;
004234bc      }
004234bc      
004234fc      return 0;
004234b0  }

004234ff                                                                                               90                                 .

00423500  uint8_t __thiscall Bitfield64PropertyValue::InqLessThan(class Bitfield64PropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

00423500  {
00423519      int32_t var_8;
00423519      
00423519      if (arg2->vtable->InqBitfield64(&var_8) == 0)
00423558          return 0;
00423558      
0042351b      int32_t eax_2 = *(uint32_t*)((char*)this->m_value)[4];
0042352d      int32_t var_4;
0042352d      
0042352d      if ((eax_2 <= var_4 && (eax_2 < var_4 || this->m_value < var_8)))
0042352d      {
00423538          *(uint8_t*)arg3 = 1;
0042353e          return eax_2;
0042352d      }
0042352d      
00423547      *(uint8_t*)arg3 = 0;
00423549      int32_t eax_3;
00423549      eax_3 = 1;
0042354f      return 1;
00423500  }

0042355b                                                                                   90 90 90 90 90                             .....

00423560  void __thiscall Bitfield64PropertyValue::operator&=(class Bitfield64PropertyValue* this, class BasePropertyValue const* arg2)

00423560  {
00423579      int32_t var_8;
00423579      
00423579      if (arg2->vtable->InqBitfield64(&var_8) != 0)
00423579      {
00423587          this->m_value &= var_8;
00423590          int32_t var_4;
00423590          *(uint32_t*)((char*)this->m_value)[4] &= var_4;
00423579      }
00423560  }

0042359a                                                                                90 90 90 90 90 90                            ......

004235a0  void __thiscall Bitfield64PropertyValue::operator^=(class Bitfield64PropertyValue* this, class BasePropertyValue const* arg2)

004235a0  {
004235b9      int32_t var_8;
004235b9      
004235b9      if (arg2->vtable->InqBitfield64(&var_8) != 0)
004235b9      {
004235c7          this->m_value ^= var_8;
004235d0          int32_t var_4;
004235d0          *(uint32_t*)((char*)this->m_value)[4] ^= var_4;
004235b9      }
004235a0  }

004235da                                                                                90 90 90 90 90 90                            ......

004235e0  uint8_t __thiscall Bitfield64PropertyValue::operator!=(class Bitfield64PropertyValue const* this, class BasePropertyValue const* arg2)

004235e0  {
004235f9      int32_t var_8;
004235f9      
004235f9      if (arg2->vtable->InqBitfield64(&var_8) == 0)
00423628          return 0;
00423628      
0042360b      int32_t var_4;
0042360b      
0042360b      if ((this->m_value == var_8 && *(uint32_t*)((char*)this->m_value)[4] == var_4))
0042361f          return 0;
0042361f      
00423616      return 1;
004235e0  }

0042362b                                   90 90 90 90 90                                                             .....

00423630  uint8_t __thiscall Bitfield64PropertyValue::operator==(class Bitfield64PropertyValue const* this, class BasePropertyValue const* arg2)

00423630  {
00423649      int32_t var_8;
00423649      
00423649      if (arg2->vtable->InqBitfield64(&var_8) == 0)
00423678          return 0;
00423678      
0042365b      int32_t var_4;
0042365b      
0042365b      if ((this->m_value == var_8 && *(uint32_t*)((char*)this->m_value)[4] == var_4))
00423666          return 1;
00423666      
0042366f      return 0;
00423630  }

0042367b                                                                                   90 90 90 90 90                             .....

00423680  uint8_t __thiscall Bitfield64PropertyValue::contains(class Bitfield64PropertyValue const* this, class BasePropertyValue const* arg2)

00423680  {
00423699      int32_t var_8;
00423699      
00423699      if (arg2->vtable->InqBitfield64(&var_8) == 0)
004236d0          return 0;
004236d0      
0042369e      int32_t edx = var_8;
004236b3      int32_t var_4;
004236b3      
004236b3      if (((this->m_value & edx) == edx && (*(uint32_t*)((char*)this->m_value)[4] & var_4) == var_4))
004236be          return 1;
004236be      
004236c7      return 0;
00423680  }

004236d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004236e0  void __thiscall Bitfield64PropertyValue::on(class Bitfield64PropertyValue* this, class BasePropertyValue const* arg2)

004236e0  {
004236f9      int32_t var_8;
004236f9      
004236f9      if (arg2->vtable->InqBitfield64(&var_8) != 0)
004236f9      {
00423707          this->m_value |= var_8;
00423710          int32_t var_4;
00423710          *(uint32_t*)((char*)this->m_value)[4] |= var_4;
004236f9      }
004236e0  }

0042371a                                                                                90 90 90 90 90 90                            ......

00423720  void __thiscall Bitfield64PropertyValue::off(class Bitfield64PropertyValue* this, class BasePropertyValue const* arg2)

00423720  {
00423739      int32_t var_8;
00423739      
00423739      if (arg2->vtable->InqBitfield64(&var_8) != 0)
00423739      {
00423751          this->m_value &= !(var_8);
00423754          int32_t var_4;
00423754          *(uint32_t*)((char*)this->m_value)[4] &= !(var_4);
00423739      }
00423720  }

0042375e                                                                                            90 90                                ..

00423760  void __fastcall Bitfield64PropertyValue::toggle(class Bitfield64PropertyValue* this)

00423760  {
0042376a      this->m_value = !(this->m_value);
0042376d      *(uint32_t*)((char*)this->m_value)[4] = !(*(uint32_t*)((char*)this->m_value)[4]);
00423760  }

00423771                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00423780  class BasePropertyValue* __fastcall Bitfield64PropertyValue::Copy(class Bitfield64PropertyValue const* this)

00423780  {
00423785      void* result = operator new(0x10);
00423785      
0042378f      if (result == 0)
004237af          return 0;
004237af      
00423791      int32_t ecx = this->m_value;
00423797      *(uint32_t*)((char*)result + 0xc) = *(uint32_t*)((char*)this->m_value)[4];
0042379a      *(uint32_t*)((char*)result + 4) = 1;
004237a1      *(uint32_t*)result = &Bitfield64PropertyValue::`vftable';
004237a7      *(uint32_t*)((char*)result + 8) = ecx;
004237ab      return result;
00423780  }


004237b0  void __thiscall Bitfield64PropertyValue::Serialize(class Bitfield64PropertyValue* this, class Archive* arg2, uint32_t const arg3)

004237b0  {
004237b9      Serializer::SerializePrimitive(&this->m_value, arg2);
004237b0  }

004237c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004237d0  uint8_t __thiscall BoolPropertyValue::InqBool(class BoolPropertyValue const* this, uint8_t* arg2)

004237d0  {
004237d7      *(uint8_t*)arg2 = this->m_value;
004237db      return 1;
004237d0  }

004237de                                                                                            90 90                                ..

004237e0  uint8_t __thiscall BoolPropertyValue::SetBool(class BoolPropertyValue* this, uint8_t const arg2)

004237e0  {
004237e4      this->m_value = arg2;
004237e9      return 1;
004237e0  }

004237ec                                      90 90 90 90                                                              ....

004237f0  uint8_t __thiscall BoolPropertyValue::SetValue(class BoolPropertyValue* this, class BasePropertyValue const* arg2)

004237f0  {
004237f6      struct BasePropertyValue::VTable* vtable = arg2->vtable;
004237fb      arg2 = &this->m_value;
004237ff      /* jump -> vtable->InqBool */
004237f0  }

00423802        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00423810  uint8_t __thiscall BoolPropertyValue::Compare(class BoolPropertyValue const* this, class BasePropertyValue const* arg2)

00423810  {
00423813      class BasePropertyValue* ecx = arg2;
00423813      
00423819      if ((ecx != 0 && ecx->vtable->InqBool(&arg2) != 0))
00423838          return this->m_value == arg2;
00423838      
0042383e      return 0;
00423810  }

00423841     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00423850  uint8_t __thiscall BoolPropertyValue::InqLessThan(class BoolPropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

00423850  {
00423863      if (arg2->vtable->InqBool(&arg2) == 0)
00423880          return 0;
00423880      
00423875      *(uint8_t*)arg3 = this->m_value < arg2;
0042387a      return 1;
00423850  }

00423883           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00423890  uint8_t __thiscall BoolPropertyValue::operator!=(class BoolPropertyValue const* this, class BasePropertyValue const* arg2)

00423890  {
004238a3      if (arg2->vtable->InqBool(&arg2) == 0)
004238ba          return 0;
004238ba      
004238b4      return this->m_value != arg2;
00423890  }

004238bd                                                                                         90 90 90                               ...

004238c0  uint8_t __thiscall BoolPropertyValue::operator==(class BoolPropertyValue const* this, class BasePropertyValue const* arg2)

004238c0  {
004238d3      if (arg2->vtable->InqBool(&arg2) == 0)
004238ea          return 0;
004238ea      
004238e4      return this->m_value == arg2;
004238c0  }

004238ed                                         90 90 90                                                               ...

004238f0  void __thiscall BoolPropertyValue::operator&=(class BoolPropertyValue* this, class BasePropertyValue const* arg2)

004238f0  {
00423903      if (arg2->vtable->InqBool(&arg2) != 0)
0042390e          this->m_value &= arg2;
004238f0  }

00423915                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00423920  void __thiscall BoolPropertyValue::operator|=(class BoolPropertyValue* this, class BasePropertyValue const* arg2)

00423920  {
00423933      if (arg2->vtable->InqBool(&arg2) != 0)
0042393e          this->m_value |= arg2;
00423920  }

00423945                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00423950  void __thiscall BoolPropertyValue::operator^=(class BoolPropertyValue* this, class BasePropertyValue const* arg2)

00423950  {
00423963      if (arg2->vtable->InqBool(&arg2) != 0)
0042396e          this->m_value ^= arg2;
00423950  }

00423975                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00423980  void __fastcall BoolPropertyValue::toggle(class BoolPropertyValue* this)

00423980  {
00423988      this->m_value = this->m_value == 0;
00423980  }

0042398c                                      90 90 90 90                                                              ....

00423990  class BasePropertyValue* __fastcall BoolPropertyValue::Copy(class BoolPropertyValue const* this)

00423990  {
00423995      void* result = operator new(0xc);
00423995      
0042399f      if (result == 0)
004239b9          return 0;
004239b9      
004239a1      uint8_t m_value = this->m_value;
004239a4      *(uint32_t*)((char*)result + 4) = 1;
004239ab      *(uint32_t*)result = &BoolPropertyValue::`vftable';
004239b1      *(uint8_t*)((char*)result + 8) = m_value;
004239b5      return result;
00423990  }

004239ba                                                                                90 90 90 90 90 90                            ......

004239c0  void __thiscall BoolPropertyValue::Serialize(class BoolPropertyValue* this, class Archive* arg2, uint32_t const arg3)

004239c0  {
004239c9      Serializer::SerializeObject(&this->m_value, arg2);
004239c0  }

004239d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004239e0  uint8_t __thiscall BoolPropertyValue::ToFileNode(class BoolPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

004239e0  {
004239e6      class PFileNode* eax;
004239e6      
004239e6      if (arg3 != 0)
004239e6      {
004239e8          this = this->m_value;
004239eb          struct PFileNode::VTable* vtable = arg3->vtable;
004239ed          arg3 = this;
004239f3          eax = *(int32_t*)((char*)vtable + 4)();
004239f3          
004239f8          if (eax != 0)
004239f8          {
00423a01              PFileNode::SetNameAsBool(eax, arg3);
00423a06              int32_t eax_1;
00423a06              eax_1 = 1;
00423a08              return 1;
004239f8          }
004239e6      }
004239e6      
00423a0b      eax = 0;
00423a0d      return 0;
004239e0  }


00423a10  void __thiscall PFileNode::SetNameAsBool(class PFileNode* this, uint8_t arg2)

00423a10  {
00423a13      class IFileNodeName* m_pcName = this->m_pcName;
00423a13      
00423a18      if (m_pcName != 0)
00423a1a          m_pcName->vtable->__vecDelDtor(1);
00423a1a      
00423a22      this->m_pcName = nullptr;
00423a29      class IFileNodeName* eax_2 = operator new(8);
00423a29      
00423a33      if (eax_2 == 0)
00423a33      {
00423a4b          this->m_pcName = nullptr;
00423a4f          return;
00423a33      }
00423a33      
00423a39      eax_2->vtable = 0x796010;
00423a3f      *(int32_t*)((char*)eax_2 + 4) = arg2;
00423a42      this->m_pcName = eax_2;
00423a10  }

00423a52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00423a60  class IFileNodeName* __fastcall FileNodeName_Bool::Clone(class FileNodeName_Bool const* this)

00423a60  {
00423a65      void* result = operator new(8);
00423a65      
00423a6f      if (result == 0)
00423a82          return 0;
00423a82      
00423a71      *(uint32_t*)result = 0x796010;
00423a7a      *(uint8_t*)((char*)result + 4) = this->m_name;
00423a7e      return result;
00423a60  }

00423a83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00423a90  void* __thiscall FileNodeName_Bool::`scalar deleting destructor'(class FileNodeName_Bool* this, uint32_t arg2)

00423a90  {
00423a98      this->vtable = 0x79602c;
00423a98      
00423a9e      if ((arg2 & 1) != 0)
00423aa1          operator delete(this);
00423aa1      
00423aac      return this;
00423a90  }

00423aaf                                               90                                                                 .

00423ab0  void __fastcall ColorPropertyValue::ColorPropertyValue(class ColorPropertyValue* this)

00423ab0  {
00423ab2      this->m_cRef = 1;
00423ab9      this->vtable = &ColorPropertyValue::`vftable';
00423ac5      this->m_value.r = RGBAColor_Black.r;
00423ac5      this->m_value.g = RGBAColor_Black.g;
00423ac5      this->m_value.b = RGBAColor_Black.b;
00423ac5      this->m_value.a = RGBAColor_Black.a;
00423ab0  }

00423ae6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00423af0  uint8_t __thiscall ColorPropertyValue::FromFileNode(class ColorPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00423af0  {
00423af6      if (arg3 != 0)
00423b05          return RGBAColor::FromFileNode(&this->m_value, arg3, 1, 1);
00423b05      
00423b08      class PFileNode* eax_1;
00423b08      eax_1 = 0;
00423b0a      return 0;
00423af0  }

00423b0d                                         90 90 90                                                               ...

00423b10  uint8_t __thiscall ColorPropertyValue::ToFileNode(class ColorPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00423b10  {
00423b16      if (arg3 != 0)
00423b26          return RGBAColor::ToFileNode(&this->m_value, arg3) != 0;
00423b26      
00423b29      class PFileNode* eax_1;
00423b29      eax_1 = 0;
00423b2b      return 0;
00423b10  }

00423b2e                                            90 90                                                                ..

00423b30  uint8_t __thiscall ColorPropertyValue::InqColor(class ColorPropertyValue const* this, class RGBAColor* arg2)

00423b30  {
00423b39      arg2->r = this->m_value.r;
00423b3e      arg2->g = this->m_value.g;
00423b44      arg2->b = this->m_value.b;
00423b4a      arg2->a = this->m_value.a;
00423b4d      class RGBAColor* eax;
00423b4d      eax = 1;
00423b4f      return 1;
00423b30  }

00423b52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00423b60  uint8_t __thiscall ColorPropertyValue::SetColor(class ColorPropertyValue* this, class RGBAColor const* arg2)

00423b60  {
00423b66      this->m_value.r = arg2->r;
00423b66      this->m_value.g = arg2->g;
00423b66      this->m_value.b = arg2->b;
00423b66      this->m_value.a = arg2->a;
00423b7d      float eax;
00423b7d      eax = 1;
00423b7f      return 1;
00423b60  }

00423b82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00423b90  uint8_t __thiscall ColorPropertyValue::SetValue(class ColorPropertyValue* this, class BasePropertyValue const* arg2)

00423b90  {
00423b96      struct BasePropertyValue::VTable* vtable = arg2->vtable;
00423b9b      arg2 = &this->m_value;
00423b9f      /* jump -> vtable->InqColor */
00423b90  }

00423ba5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00423bb0  class BasePropertyValue* __fastcall ColorPropertyValue::Copy(class ColorPropertyValue const* this)

00423bb0  {
00423bb5      void* result = operator new(0x18);
00423bb5      
00423bbf      if (result == 0)
00423bef          return 0;
00423bef      
00423bc4      *(uint32_t*)((char*)result + 4) = 1;
00423bcb      *(uint32_t*)result = &ColorPropertyValue::`vftable';
00423bd6      *(uint32_t*)((char*)result + 8) = this->m_value.r;
00423bdb      *(uint32_t*)((char*)result + 0xc) = this->m_value.g;
00423be1      *(uint32_t*)((char*)result + 0x10) = this->m_value.b;
00423be7      *(uint32_t*)((char*)result + 0x14) = this->m_value.a;
00423beb      return result;
00423bb0  }


00423bf0  void __thiscall ColorPropertyValue::Serialize(class ColorPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00423bf0  {
00423bf8      RGBAColor::Serialize(&this->m_value, arg2);
00423bf0  }


00423c00  uint8_t __thiscall ColorPropertyValue::Compare(class ColorPropertyValue const* this, class BasePropertyValue const* arg2)

00423c00  {
00423c0c      void var_10;
00423c0c      
00423c0c      if ((arg2 != 0 && arg2->vtable->InqColor(&var_10) != 0))
00423c30          return RGBAColor::operator==(&this->m_value, &var_10);
00423c30      
00423c39      return 0;
00423c00  }

00423c3c                                                                                      90 90 90 90                              ....

00423c40  uint8_t __thiscall RGBAColor::operator==(class RGBAColor const* this, class RGBAColor const* arg2)

00423c40  {
00423c42      float* edx = arg2;
00423c48      long double x87_r7_1 = fabsl((((long double)this->r) - ((long double)*(uint32_t*)edx)));
00423c4a      long double temp1 = ((long double)0.000199999995f);
00423c4a      (x87_r7_1 - temp1);
00423c50      int32_t eax;
00423c50      eax = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
00423c52      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00423c52      
00423c55      if (!(p))
00423c55      {
00423c5d          long double x87_r7_4 = fabsl((((long double)this->g) - ((long double)edx[1])));
00423c5f          long double temp2_1 = ((long double)0.000199999995f);
00423c5f          (x87_r7_4 - temp2_1);
00423c65          eax = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00423c67          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00423c67          
00423c6a          if (!(p_1))
00423c6a          {
00423c72              long double x87_r7_7 = fabsl((((long double)this->b) - ((long double)edx[2])));
00423c74              long double temp3_1 = ((long double)0.000199999995f);
00423c74              (x87_r7_7 - temp3_1);
00423c7a              eax = ((((x87_r7_7 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp3_1) ? 1 : 0) << 0xe) | 0))));
00423c7c              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
00423c7c              
00423c7f              if (!(p_2))
00423c7f              {
00423c87                  long double x87_r7_10 = fabsl((((long double)this->a) - ((long double)edx[3])));
00423c89                  long double temp4_1 = ((long double)0.000199999995f);
00423c89                  (x87_r7_10 - temp4_1);
00423c8f                  eax = ((((x87_r7_10 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00423c91                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
00423c91                  
00423c94                  if (!(p_3))
00423c9b                      return 1;
00423c7f              }
00423c6a          }
00423c55      }
00423c55      
00423ca0      return 0;
00423c40  }

00423ca3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00423cb0  uint8_t __thiscall ColorPropertyValue::InqLessThan(class ColorPropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

00423cb0  {
00423cc9      void var_10;
00423cc9      
00423cc9      if (arg2->vtable->InqColor(&var_10) == 0)
00423cf8          return 0;
00423cf8      
00423ce4      uint32_t eax_3;
00423ce4      eax_3 = RGBAColor::GetColor32(&this->m_value) < RGBAColor::GetColor32(&var_10);
00423ce7      *(uint8_t*)arg3 = eax_3;
00423ce9      eax_3 = 1;
00423cef      return 1;
00423cb0  }

00423cfb                                                                                   90 90 90 90 90                             .....

00423d00  uint32_t const __fastcall RGBAColor::GetColor32(class RGBAColor const* this)

00423d00  {
00423d03      this->a;
00423d0d      int32_t eax = _ftol2();
00423d12      this->r;
00423d1f      int32_t eax_1 = _ftol2();
00423d24      this->g;
00423d32      int32_t eax_2 = _ftol2();
00423d37      this->b;
00423d4e      return (_ftol2() | (((((eax << 8) | eax_1) << 8) | eax_2) << 8));
00423d00  }

00423d4f                                               90                                                                 .

00423d50  uint8_t __thiscall DataFilePropertyValue::SetValue(class DataFilePropertyValue* this, class BasePropertyValue const* arg2)

00423d50  {
00423d56      struct BasePropertyValue::VTable* vtable = arg2->vtable;
00423d5b      arg2 = &this->m_value;
00423d5f      /* jump -> vtable->InqDataID */
00423d50  }

00423d65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00423d70  class BasePropertyValue* __fastcall DataFilePropertyValue::Copy(class DataFilePropertyValue const* this)

00423d70  {
00423d75      void* result = operator new(0xc);
00423d75      
00423d7f      if (result == 0)
00423d99          return 0;
00423d99      
00423d81      uint32_t id = this->m_value.id;
00423d84      *(uint32_t*)((char*)result + 4) = 1;
00423d8b      *(uint32_t*)result = &DataFilePropertyValue::`vftable';
00423d91      *(uint32_t*)((char*)result + 8) = id;
00423d95      return result;
00423d70  }

00423d9a                                                                                90 90 90 90 90 90                            ......

00423da0  uint8_t __fastcall DataFilePropertyValue::HasValidData(class DataFilePropertyValue const* this)

00423da0  {
00423db0      return this->m_value.id != INVALID_DID.id;
00423da0  }

00423db1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00423dc0  void __thiscall Bitfield32PropertyValue::Serialize(class Bitfield32PropertyValue* this, class Archive* arg2, uint32_t const arg3)

00423dc0  {
00423dcc      Archive::CheckAlignment(arg2, 4);
00423dd5      uint32_t* eax = Archive::GetBytes(arg2, 4);
00423dd5      
00423ddc      if (eax != 0)
00423ddc      {
00423de2          if ((arg2->m_flags & 1) != 0)
00423de2          {
00423de8              *(uint32_t*)eax = this->m_value;
00423deb              return;
00423de2          }
00423de2          
00423df0          this->m_value = *(uint32_t*)eax;
00423ddc      }
00423dc0  }

00423df8                                                                          90 90 90 90 90 90 90 90                          ........

00423e00  uint8_t __thiscall DataFilePropertyValue::Compare(class DataFilePropertyValue const* this, class BasePropertyValue const* arg2)

00423e00  {
00423e03      class BasePropertyValue* ecx = arg2;
00423e03      
00423e09      if ((ecx != 0 && ecx->vtable->InqDataID(&arg2) != 0))
00423e09      {
00423e23          uint32_t eax_2;
00423e23          eax_2 = this->m_value.id == arg2;
00423e27          return eax_2;
00423e09      }
00423e09      
00423e2d      return 0;
00423e00  }


00423e30  uint8_t __thiscall DataFilePropertyValue::operator!=(class DataFilePropertyValue const* this, class BasePropertyValue const* arg2)

00423e30  {
00423e46      if (arg2->vtable->InqDataID(&arg2) == 0)
00423e59          return 0;
00423e59      
00423e4f      uint32_t eax_2;
00423e4f      eax_2 = this->m_value.id != arg2;
00423e53      return eax_2;
00423e30  }

00423e5c                                                                                      90 90 90 90                              ....

00423e60  uint8_t __thiscall DataFilePropertyValue::operator==(class DataFilePropertyValue const* this, class BasePropertyValue const* arg2)

00423e60  {
00423e76      if (arg2->vtable->InqDataID(&arg2) == 0)
00423e89          return 0;
00423e89      
00423e7f      uint32_t eax_2;
00423e7f      eax_2 = this->m_value.id == arg2;
00423e83      return eax_2;
00423e60  }

00423e8c                                      90 90 90 90                                                              ....

00423e90  uint8_t __fastcall WaveformPropertyValue::HasValidData(class WaveformPropertyValue const* this)

00423e90  {
00423e9a      return this->m_value.type != WAVEFORM_INVALID;
00423e90  }

00423e9b                                                                                   90 90 90 90 90                             .....

00423ea0  uint8_t __thiscall EnumPropertyValue::SetValue(class EnumPropertyValue* this, class BasePropertyValue const* arg2)

00423ea0  {
00423ea6      struct BasePropertyValue::VTable* vtable = arg2->vtable;
00423eab      arg2 = &this->m_value;
00423eaf      /* jump -> vtable->InqEnum */
00423ea0  }

00423eb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00423ec0  uint8_t __thiscall EnumPropertyValue::Compare(class EnumPropertyValue const* this, class BasePropertyValue const* arg2)

00423ec0  {
00423ec3      class BasePropertyValue* ecx = arg2;
00423ec3      
00423ec9      if ((ecx != 0 && ecx->vtable->InqEnum(&arg2) != 0))
00423eeb          return this->m_value == arg2;
00423eeb      
00423ef1      return 0;
00423ec0  }

00423ef4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00423f00  uint8_t __thiscall EnumPropertyValue::operator!=(class EnumPropertyValue const* this, class BasePropertyValue const* arg2)

00423f00  {
00423f16      if (arg2->vtable->InqEnum(&arg2) == 0)
00423f2d          return 0;
00423f2d      
00423f27      return this->m_value != arg2;
00423f00  }


00423f30  uint8_t __thiscall EnumPropertyValue::operator==(class EnumPropertyValue const* this, class BasePropertyValue const* arg2)

00423f30  {
00423f46      if (arg2->vtable->InqEnum(&arg2) == 0)
00423f5d          return 0;
00423f5d      
00423f57      return this->m_value == arg2;
00423f30  }


00423f60  class BasePropertyValue* __fastcall EnumPropertyValue::Copy(class EnumPropertyValue const* this)

00423f60  {
00423f65      void* result = operator new(0xc);
00423f65      
00423f6f      if (result == 0)
00423f89          return 0;
00423f89      
00423f71      uint32_t m_value = this->m_value;
00423f74      *(uint32_t*)((char*)result + 4) = 1;
00423f7b      *(uint32_t*)result = &EnumPropertyValue::`vftable';
00423f81      *(uint32_t*)((char*)result + 8) = m_value;
00423f85      return result;
00423f60  }

00423f8a                                90 90 90 90 90 90                                                            ......

00423f90  uint8_t __thiscall FloatPropertyValue::SetValue(class FloatPropertyValue* this, class BasePropertyValue const* arg2)

00423f90  {
00423f96      struct BasePropertyValue::VTable* vtable = arg2->vtable;
00423f9b      arg2 = &this->m_value;
00423f9f      /* jump -> vtable->InqFloat */
00423f90  }

00423fa5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00423fb0  uint8_t __thiscall FloatPropertyValue::InqLessThan(class FloatPropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

00423fb0  {
00423fc6      if (arg2->vtable->InqFloat(&arg2) == 0)
00423ff6          return 0;
00423ff6      
00423fc8      long double x87_r7 = ((long double)this->m_value);
00423fcb      long double temp1 = ((long double)arg2);
00423fcb      (x87_r7 - temp1);
00423fd1      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00423fd1      
00423fd4      if (!(p))
00423fd4      {
00423fdf          *(uint8_t*)arg3 = 1;
00423fe2          return (((int8_t)(((x87_r7 < temp1) ? 1 : 0) << 8)) | (((int8_t)(((0) ? 1 : 0) << 9)) | (((int8_t)((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa)) | (((int8_t)(((x87_r7 == temp1) ? 1 : 0) << 0xe)) | 0))));
00423fd4      }
00423fd4      
00423feb      *(uint8_t*)arg3 = 0;
00423fed      int32_t eax_2;
00423fed      eax_2 = 1;
00423ff0      return 1;
00423fb0  }

00423ff9                                                                             90 90 90 90 90 90 90                           .......

00424000  void __thiscall FloatPropertyValue::operator+=(class FloatPropertyValue* this, class BasePropertyValue const* arg2)

00424000  {
00424016      if (arg2->vtable->InqFloat(&arg2) != 0)
0042401f          this->m_value = ((float)(((long double)arg2) + ((long double)this->m_value)));
00424000  }

00424026                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00424030  void __thiscall FloatPropertyValue::operator-=(class FloatPropertyValue* this, class BasePropertyValue const* arg2)

00424030  {
00424046      if (arg2->vtable->InqFloat(&arg2) != 0)
0042404f          this->m_value = ((float)(((long double)this->m_value) - ((long double)arg2)));
00424030  }

00424056                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00424060  void __thiscall FloatPropertyValue::operator*=(class FloatPropertyValue* this, class BasePropertyValue const* arg2)

00424060  {
00424076      if (arg2->vtable->InqFloat(&arg2) != 0)
0042407f          this->m_value = ((float)(((long double)arg2) * ((long double)this->m_value)));
00424060  }

00424086                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00424090  void __thiscall FloatPropertyValue::operator/=(class FloatPropertyValue* this, class BasePropertyValue const* arg2)

00424090  {
004240a6      if (arg2->vtable->InqFloat(&arg2) != 0)
004240af          this->m_value = ((float)(((long double)this->m_value) / ((long double)arg2)));
00424090  }

004240b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004240c0  uint8_t __thiscall FloatPropertyValue::operator>(class FloatPropertyValue const* this, class BasePropertyValue const* arg2)

004240c0  {
004240d6      if (arg2->vtable->InqFloat(&arg2) == 0)
004240d6      {
004240f5          int16_t eax_1;
004240f5          eax_1 = 0;
004240f8          return 0;
004240d6      }
004240d6      
004240d8      long double x87_r7 = ((long double)this->m_value);
004240db      long double temp1 = ((long double)arg2);
004240db      (x87_r7 - temp1);
004240db      
004240e4      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
004240f2          return 0;
004240f2      
004240ec      return 1;
004240c0  }

004240fb                                                                                   90 90 90 90 90                             .....

00424100  uint8_t __thiscall FloatPropertyValue::operator>=(class FloatPropertyValue const* this, class BasePropertyValue const* arg2)

00424100  {
00424116      if (arg2->vtable->InqFloat(&arg2) == 0)
00424116      {
00424135          int16_t eax_1;
00424135          eax_1 = 0;
00424138          return 0;
00424116      }
00424116      
00424118      long double x87_r7 = ((long double)this->m_value);
0042411b      long double temp1 = ((long double)arg2);
0042411b      (x87_r7 - temp1);
0042411b      
00424124      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
00424132          return 0;
00424132      
0042412c      return 1;
00424100  }

0042413b                                                                                   90 90 90 90 90                             .....

00424140  uint8_t __thiscall FloatPropertyValue::operator<(class FloatPropertyValue const* this, class BasePropertyValue const* arg2)

00424140  {
00424156      if (arg2->vtable->InqFloat(&arg2) == 0)
00424178          return 0;
00424178      
0042415b      (((long double)this->m_value) - ((long double)arg2));
00424161      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00424161      
00424164      if (p)
00424172          return 0;
00424172      
0042416c      return 1;
00424140  }

0042417b                                                                                   90 90 90 90 90                             .....

00424180  uint8_t __thiscall FloatPropertyValue::operator<=(class FloatPropertyValue const* this, class BasePropertyValue const* arg2)

00424180  {
00424196      if (arg2->vtable->InqFloat(&arg2) == 0)
004241b8          return 0;
004241b8      
0042419b      (((long double)this->m_value) - ((long double)arg2));
004241a1      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
004241a1      
004241a4      if (p)
004241b2          return 0;
004241b2      
004241ac      return 1;
00424180  }

004241bb                                                                                   90 90 90 90 90                             .....

004241c0  uint8_t __thiscall FloatPropertyValue::operator!=(class FloatPropertyValue const* this, class BasePropertyValue const* arg2)

004241c0  {
004241d6      if (arg2->vtable->InqFloat(&arg2) == 0)
004241f8          return 0;
004241f8      
004241db      (((long double)this->m_value) - ((long double)arg2));
004241e1      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004241e1      
004241e4      if (!(p))
004241f2          return 0;
004241f2      
004241ec      return 1;
004241c0  }

004241fb                                                                                   90 90 90 90 90                             .....

00424200  uint8_t __thiscall FloatPropertyValue::operator==(class FloatPropertyValue const* this, class BasePropertyValue const* arg2)

00424200  {
00424216      if (arg2->vtable->InqFloat(&arg2) == 0)
00424238          return 0;
00424238      
0042421b      (((long double)this->m_value) - ((long double)arg2));
00424221      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00424221      
00424224      if (p)
00424232          return 0;
00424232      
0042422c      return 1;
00424200  }

0042423b                                                                                   90 90 90 90 90                             .....

00424240  class BasePropertyValue* __fastcall FloatPropertyValue::Copy(class FloatPropertyValue const* this)

00424240  {
00424245      void* result = operator new(0xc);
00424245      
0042424f      if (result == 0)
00424269          return 0;
00424269      
00424251      long double x87_r7 = ((long double)this->m_value);
00424254      *(uint32_t*)((char*)result + 4) = 1;
0042425b      *(uint32_t*)((char*)result + 8) = ((float)x87_r7);
0042425e      *(uint32_t*)result = &FloatPropertyValue::`vftable';
00424265      return result;
00424240  }

0042426a                                90 90 90 90 90 90                                                            ......

00424270  void __thiscall FileNodeName_Bool::Serialize(class FileNodeName_Bool* this, class Archive* arg2)

00424270  {
00424279      Serializer::SerializeObject(&this->m_name, arg2);
00424270  }

00424284              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00424290  uint8_t __thiscall FloatPropertyValue::Compare(class FloatPropertyValue const* this, class BasePropertyValue const* arg2)

00424290  {
00424293      class BasePropertyValue* ecx = arg2;
00424293      
00424299      if ((ecx != 0 && ecx->vtable->InqFloat(&arg2) != 0))
00424299      {
004242b5          (fabsl((((long double)this->m_value) - ((long double)arg2))) - ((long double)0.000199999995f));
004242bd          bool p = /* bool p = unimplemented  {test ah, 0x41} */;
004242bd          
004242c0          if (p)
004242ce              return 0;
004242ce          
004242c8          return 1;
00424299      }
00424299      
004242d4      return 0;
00424290  }

004242d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004242e0  uint8_t __thiscall InstanceIDPropertyValue::SetValue(class InstanceIDPropertyValue* this, class BasePropertyValue const* arg2)

004242e0  {
004242e6      struct BasePropertyValue::VTable* vtable = arg2->vtable;
004242eb      arg2 = &this->m_value;
004242ef      /* jump -> vtable->InqInstanceID */
004242e0  }

004242f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00424300  uint8_t __thiscall InstanceIDPropertyValue::Compare(class InstanceIDPropertyValue const* this, class BasePropertyValue const* arg2)

00424300  {
00424303      class BasePropertyValue* ecx = arg2;
00424303      
00424309      if ((ecx != 0 && ecx->vtable->InqInstanceID(&arg2) != 0))
0042432b          return this->m_value == arg2;
0042432b      
00424331      return 0;
00424300  }

00424334                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00424340  class BasePropertyValue* __fastcall InstanceIDPropertyValue::Copy(class InstanceIDPropertyValue const* this)

00424340  {
00424345      void* result = operator new(0xc);
00424345      
0042434f      if (result == 0)
00424369          return 0;
00424369      
00424351      uint32_t m_value = this->m_value;
00424354      *(uint32_t*)((char*)result + 4) = 1;
0042435b      *(uint32_t*)result = &InstanceIDPropertyValue::`vftable';
00424361      *(uint32_t*)((char*)result + 8) = m_value;
00424365      return result;
00424340  }

0042436a                                90 90 90 90 90 90                                                            ......

00424370  void* __thiscall WaveformPropertyValue::`scalar deleting destructor'(class WaveformPropertyValue* this, uint32_t arg2)

00424370  {
00424378      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00424378      
0042437e      if ((arg2 & 1) != 0)
00424381          operator delete(this);
00424381      
0042438c      return this;
00424370  }

0042438f                                               90                                                                 .

00424390  uint8_t __thiscall IntegerPropertyValue::SetValue(class IntegerPropertyValue* this, class BasePropertyValue const* arg2)

00424390  {
00424396      struct BasePropertyValue::VTable* vtable = arg2->vtable;
0042439b      arg2 = &this->m_value;
0042439f      /* jump -> vtable->InqInteger */
00424390  }

004243a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004243b0  uint8_t __thiscall IntegerPropertyValue::Compare(class IntegerPropertyValue const* this, class BasePropertyValue const* arg2)

004243b0  {
004243b3      class BasePropertyValue* ecx = arg2;
004243b3      
004243b9      if ((ecx != 0 && ecx->vtable->InqInteger(&arg2) != 0))
004243d8          return this->m_value == arg2;
004243d8      
004243de      return 0;
004243b0  }

004243e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004243f0  uint8_t __thiscall IntegerPropertyValue::InqLessThan(class IntegerPropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

004243f0  {
00424403      if (arg2->vtable->InqInteger(&arg2) == 0)
00424420          return 0;
00424420      
00424412      class BasePropertyValue* ecx_1;
00424412      ecx_1 = this->m_value < arg2;
00424415      *(uint8_t*)arg3 = ecx_1;
00424417      int32_t eax_2;
00424417      eax_2 = 1;
0042441a      return 1;
004243f0  }

00424423           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00424430  void __thiscall IntegerPropertyValue::operator+=(class IntegerPropertyValue* this, class BasePropertyValue const* arg2)

00424430  {
00424443      if (arg2->vtable->InqInteger(&arg2) != 0)
0042444e          this->m_value += arg2;
00424430  }

00424455                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00424460  void __thiscall IntegerPropertyValue::operator-=(class IntegerPropertyValue* this, class BasePropertyValue const* arg2)

00424460  {
00424473      if (arg2->vtable->InqInteger(&arg2) != 0)
0042447e          this->m_value -= arg2;
00424460  }

00424485                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00424490  void __thiscall IntegerPropertyValue::operator*=(class IntegerPropertyValue* this, class BasePropertyValue const* arg2)

00424490  {
004244a3      if (arg2->vtable->InqInteger(&arg2) != 0)
004244ad          this->m_value *= arg2;
00424490  }

004244b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004244c0  void __thiscall IntegerPropertyValue::operator/=(class IntegerPropertyValue* this, class BasePropertyValue const* arg2)

004244c0  {
004244d3      if (arg2->vtable->InqInteger(&arg2) != 0)
004244dd          this->m_value = (((int64_t)this->m_value) / arg2);
004244c0  }

004244e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004244f0  uint8_t __thiscall IntegerPropertyValue::operator>(class IntegerPropertyValue const* this, class BasePropertyValue const* arg2)

004244f0  {
00424503      if (arg2->vtable->InqInteger(&arg2) == 0)
0042451a          return 0;
0042451a      
00424514      return this->m_value > arg2;
004244f0  }

0042451d                                                                                         90 90 90                               ...

00424520  uint8_t __thiscall IntegerPropertyValue::operator>=(class IntegerPropertyValue const* this, class BasePropertyValue const* arg2)

00424520  {
00424533      if (arg2->vtable->InqInteger(&arg2) == 0)
0042454a          return 0;
0042454a      
00424544      return this->m_value >= arg2;
00424520  }

0042454d                                         90 90 90                                                               ...

00424550  uint8_t __thiscall IntegerPropertyValue::operator<(class IntegerPropertyValue const* this, class BasePropertyValue const* arg2)

00424550  {
00424563      if (arg2->vtable->InqInteger(&arg2) == 0)
0042457a          return 0;
0042457a      
00424574      return this->m_value < arg2;
00424550  }

0042457d                                                                                         90 90 90                               ...

00424580  uint8_t __thiscall IntegerPropertyValue::operator<=(class IntegerPropertyValue const* this, class BasePropertyValue const* arg2)

00424580  {
00424593      if (arg2->vtable->InqInteger(&arg2) == 0)
004245aa          return 0;
004245aa      
004245a4      return this->m_value <= arg2;
00424580  }

004245ad                                         90 90 90                                                               ...

004245b0  uint8_t __thiscall IntegerPropertyValue::operator!=(class IntegerPropertyValue const* this, class BasePropertyValue const* arg2)

004245b0  {
004245c3      if (arg2->vtable->InqInteger(&arg2) == 0)
004245da          return 0;
004245da      
004245d4      return this->m_value != arg2;
004245b0  }

004245dd                                                                                         90 90 90                               ...

004245e0  uint8_t __thiscall IntegerPropertyValue::operator==(class IntegerPropertyValue const* this, class BasePropertyValue const* arg2)

004245e0  {
004245f3      if (arg2->vtable->InqInteger(&arg2) == 0)
0042460a          return 0;
0042460a      
00424604      return this->m_value == arg2;
004245e0  }

0042460d                                         90 90 90                                                               ...

00424610  class BasePropertyValue* __fastcall IntegerPropertyValue::Copy(class IntegerPropertyValue const* this)

00424610  {
00424615      void* result = operator new(0xc);
00424615      
0042461f      if (result == 0)
00424639          return 0;
00424639      
00424621      int32_t m_value = this->m_value;
00424624      *(uint32_t*)((char*)result + 4) = 1;
0042462b      *(uint32_t*)result = &IntegerPropertyValue::`vftable';
00424631      *(uint32_t*)((char*)result + 8) = m_value;
00424635      return result;
00424610  }

0042463a                                                                                90 90 90 90 90 90                            ......

00424640  void __thiscall FloatPropertyValue::Serialize(class FloatPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00424640  {
00424649      Serializer::SerializeObject(&this->m_value, arg2);
00424640  }

00424654                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00424660  uint8_t __thiscall LongIntegerPropertyValue::SetValue(class LongIntegerPropertyValue* this, class BasePropertyValue const* arg2)

00424660  {
00424666      struct BasePropertyValue::VTable* vtable = arg2->vtable;
0042466b      arg2 = &this->m_value;
0042466f      /* jump -> vtable->InqLongInteger */
00424660  }

00424675                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00424680  uint8_t __thiscall LongIntegerPropertyValue::Compare(class LongIntegerPropertyValue const* this, class BasePropertyValue const* arg2)

00424680  {
0042468c      int32_t var_8;
0042468c      
0042468c      if ((arg2 != 0 && arg2->vtable->InqLongInteger(&var_8) != 0))
0042468c      {
004246af          int32_t var_4;
004246af          
004246af          if ((this->m_value == var_8 && *(uint32_t*)((char*)this->m_value)[4] == var_4))
004246ba              return 1;
0042468c      }
0042468c      
004246cc      return 0;
00424680  }

004246cf                                               90                                                                 .

004246d0  uint8_t __thiscall LongIntegerPropertyValue::InqLessThan(class LongIntegerPropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

004246d0  {
004246e9      int32_t var_8;
004246e9      
004246e9      if (arg2->vtable->InqLongInteger(&var_8) == 0)
00424728          return 0;
00424728      
004246eb      int32_t eax_2 = *(uint32_t*)((char*)this->m_value)[4];
004246fd      int32_t var_4;
004246fd      
004246fd      if ((eax_2 <= var_4 && (eax_2 < var_4 || this->m_value < var_8)))
004246fd      {
00424708          *(uint8_t*)arg3 = 1;
0042470e          return eax_2;
004246fd      }
004246fd      
00424717      *(uint8_t*)arg3 = 0;
00424719      int32_t eax_3;
00424719      eax_3 = 1;
0042471f      return 1;
004246d0  }

0042472b                                   90 90 90 90 90                                                             .....

00424730  void __thiscall LongIntegerPropertyValue::operator+=(class LongIntegerPropertyValue* this, class BasePropertyValue const* arg2)

00424730  {
00424749      int32_t var_8;
00424749      
00424749      if (arg2->vtable->InqLongInteger(&var_8) != 0)
00424749      {
0042474b          int32_t eax_2 = var_8;
0042474f          int32_t ecx_1 = this->m_value;
00424757          this->m_value = (ecx_1 + eax_2);
00424760          int32_t var_4;
00424760          *(uint32_t*)((char*)this->m_value)[4] = (*(uint32_t*)((char*)this->m_value)[4] + var_4);
00424749      }
00424730  }

0042476a                                90 90 90 90 90 90                                                            ......

00424770  void __thiscall LongIntegerPropertyValue::operator-=(class LongIntegerPropertyValue* this, class BasePropertyValue const* arg2)

00424770  {
00424789      int32_t var_8;
00424789      
00424789      if (arg2->vtable->InqLongInteger(&var_8) != 0)
00424789      {
0042478b          int32_t eax_2 = var_8;
0042478f          int32_t ecx_1 = this->m_value;
00424797          this->m_value = (ecx_1 - eax_2);
004247a0          int32_t var_4;
004247a0          *(uint32_t*)((char*)this->m_value)[4] = (*(uint32_t*)((char*)this->m_value)[4] - var_4);
00424789      }
00424770  }

004247aa                                90 90 90 90 90 90                                                            ......

004247b0  void __thiscall LongIntegerPropertyValue::operator*=(class LongIntegerPropertyValue* this, class BasePropertyValue const* arg2)

004247b0  {
004247c9      int32_t var_8;
004247c9      
004247c9      if (arg2->vtable->InqLongInteger(&var_8) != 0)
004247c9      {
004247d6          int32_t var_4;
004247d6          int32_t var_10_1 = var_4;
004247da          int32_t var_14_1 = var_8;
004247db          int32_t var_18_1 = *(uint32_t*)((char*)this->m_value)[4];
004247dc          int32_t var_1c_1 = this->m_value;
004247dd          int32_t eax_4;
004247dd          int32_t edx_2;
004247dd          eax_4 = _allmul();
004247e2          this->m_value = eax_4;
004247e5          *(uint32_t*)((char*)this->m_value)[4] = edx_2;
004247c9      }
004247b0  }

004247ef                                               90                                                                 .

004247f0  void __thiscall LongIntegerPropertyValue::operator/=(class LongIntegerPropertyValue* this, class BasePropertyValue const* arg2)

004247f0  {
00424809      int32_t var_8;
00424809      
00424809      if (arg2->vtable->InqLongInteger(&var_8) != 0)
00424809      {
00424816          int32_t var_4;
00424816          int32_t var_10_1 = var_4;
0042481a          int32_t var_14_1 = var_8;
0042481b          int32_t var_18_1 = *(uint32_t*)((char*)this->m_value)[4];
0042481c          int32_t var_1c_1 = this->m_value;
0042481d          int32_t eax_4;
0042481d          int32_t edx_2;
0042481d          eax_4 = _alldiv();
00424822          this->m_value = eax_4;
00424825          *(uint32_t*)((char*)this->m_value)[4] = edx_2;
00424809      }
004247f0  }

0042482f                                               90                                                                 .

00424830  uint8_t __thiscall LongIntegerPropertyValue::operator>(class LongIntegerPropertyValue const* this, class BasePropertyValue const* arg2)

00424830  {
00424849      int32_t var_8;
00424849      
00424849      if (arg2->vtable->InqLongInteger(&var_8) == 0)
0042487a          return 0;
0042487a      
0042484b      int32_t eax_2 = *(uint32_t*)((char*)this->m_value)[4];
0042485d      int32_t var_4;
0042485d      
0042485d      if ((eax_2 >= var_4 && (eax_2 > var_4 || this->m_value > var_8)))
00424868          return 1;
00424868      
00424871      return 0;
00424830  }

0042487d                                                                                         90 90 90                               ...

00424880  uint8_t __thiscall LongIntegerPropertyValue::operator>=(class LongIntegerPropertyValue const* this, class BasePropertyValue const* arg2)

00424880  {
00424899      int32_t var_8;
00424899      
00424899      if (arg2->vtable->InqLongInteger(&var_8) == 0)
004248ca          return 0;
004248ca      
0042489b      int32_t eax_2 = *(uint32_t*)((char*)this->m_value)[4];
004248ad      int32_t var_4;
004248ad      
004248ad      if ((eax_2 >= var_4 && (eax_2 > var_4 || this->m_value >= var_8)))
004248b8          return 1;
004248b8      
004248c1      return 0;
00424880  }

004248cd                                         90 90 90                                                               ...

004248d0  uint8_t __thiscall LongIntegerPropertyValue::operator<(class LongIntegerPropertyValue const* this, class BasePropertyValue const* arg2)

004248d0  {
004248e9      int32_t var_8;
004248e9      
004248e9      if (arg2->vtable->InqLongInteger(&var_8) == 0)
0042491a          return 0;
0042491a      
004248eb      int32_t eax_2 = *(uint32_t*)((char*)this->m_value)[4];
004248fd      int32_t var_4;
004248fd      
004248fd      if ((eax_2 <= var_4 && (eax_2 < var_4 || this->m_value < var_8)))
00424908          return 1;
00424908      
00424911      return 0;
004248d0  }

0042491d                                                                                         90 90 90                               ...

00424920  uint8_t __thiscall LongIntegerPropertyValue::operator<=(class LongIntegerPropertyValue const* this, class BasePropertyValue const* arg2)

00424920  {
00424939      int32_t var_8;
00424939      
00424939      if (arg2->vtable->InqLongInteger(&var_8) == 0)
0042496a          return 0;
0042496a      
0042493b      int32_t eax_2 = *(uint32_t*)((char*)this->m_value)[4];
0042494d      int32_t var_4;
0042494d      
0042494d      if ((eax_2 <= var_4 && (eax_2 < var_4 || this->m_value <= var_8)))
00424958          return 1;
00424958      
00424961      return 0;
00424920  }

0042496d                                         90 90 90                                                               ...

00424970  uint8_t __thiscall LongIntegerPropertyValue::operator!=(class LongIntegerPropertyValue const* this, class BasePropertyValue const* arg2)

00424970  {
00424989      int32_t var_8;
00424989      
00424989      if (arg2->vtable->InqLongInteger(&var_8) == 0)
004249b8          return 0;
004249b8      
0042499b      int32_t var_4;
0042499b      
0042499b      if ((this->m_value == var_8 && *(uint32_t*)((char*)this->m_value)[4] == var_4))
004249af          return 0;
004249af      
004249a6      return 1;
00424970  }

004249bb                                                                                   90 90 90 90 90                             .....

004249c0  uint8_t __thiscall LongIntegerPropertyValue::operator==(class LongIntegerPropertyValue const* this, class BasePropertyValue const* arg2)

004249c0  {
004249d9      int32_t var_8;
004249d9      
004249d9      if (arg2->vtable->InqLongInteger(&var_8) == 0)
00424a08          return 0;
00424a08      
004249eb      int32_t var_4;
004249eb      
004249eb      if ((this->m_value == var_8 && *(uint32_t*)((char*)this->m_value)[4] == var_4))
004249f6          return 1;
004249f6      
004249ff      return 0;
004249c0  }

00424a0b                                   90 90 90 90 90                                                             .....

00424a10  class BasePropertyValue* __fastcall LongIntegerPropertyValue::Copy(class LongIntegerPropertyValue const* this)

00424a10  {
00424a15      void* result = operator new(0x10);
00424a15      
00424a1f      if (result == 0)
00424a3f          return 0;
00424a3f      
00424a21      int32_t ecx = this->m_value;
00424a27      *(uint32_t*)((char*)result + 0xc) = *(uint32_t*)((char*)this->m_value)[4];
00424a2a      *(uint32_t*)((char*)result + 4) = 1;
00424a31      *(uint32_t*)result = &LongIntegerPropertyValue::`vftable';
00424a37      *(uint32_t*)((char*)result + 8) = ecx;
00424a3b      return result;
00424a10  }


00424a40  void Serializer::SerializePrimitive(double* arg1, class Archive* arg2)

00424a40  {
00424a49      Archive::CheckAlignment(arg2, 8);
00424a52      uint8_t* eax = Archive::GetBytes(arg2, 8);
00424a52      
00424a59      if (eax != 0)
00424a59      {
00424a63          if ((arg2->m_flags & 1) != 0)
00424a63          {
00424a67              *(uint32_t*)eax = *(uint32_t*)arg1;
00424a6c              *(uint32_t*)(eax + 4) = *(uint32_t*)((char*)arg1 + 4);
00424a70              return;
00424a63          }
00424a63          
00424a73          *(uint32_t*)arg1 = *(uint32_t*)eax;
00424a78          *(uint32_t*)((char*)arg1 + 4) = *(uint32_t*)(eax + 4);
00424a59      }
00424a40  }

00424a7d                                                                                         90 90 90                               ...

00424a80  void __fastcall Frame::Frame(class Frame* this)

00424a80  {
00424a85      this->qw = 0x3f800000;
00424a8b      this->qx = 0f;
00424a8e      this->qy = 0f;
00424a91      this->qz = 0f;
00424a94      this->m_fOrigin.x = 0;
00424a97      this->m_fOrigin.y = 0f;
00424a9a      this->m_fOrigin.z = 0f;
00424a9d      Frame::cache(this);
00424a80  }

00424aa6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00424ab0  void __fastcall Position::Position(class Position* this)

00424ab0  {
00424ab8      this->vtable = 0x796910;
00424abe      this->objcell_id = 0;
00424ab5      this->frame.qw = 0x3f800000;
00424ab5      this->frame.qx = 0f;
00424ab5      this->frame.qy = 0f;
00424ab5      this->frame.qz = 0f;
00424ab5      this->frame.m_fOrigin.x = 0;
00424ab5      this->frame.m_fOrigin.y = 0f;
00424ab5      this->frame.m_fOrigin.z = 0f;
00424ad9      Frame::cache(&this->frame);
00424ab0  }

00424ae2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00424af0  void __fastcall PositionPropertyValue::PositionPropertyValue(class PositionPropertyValue* this)

00424af0  {
00424af5      this->m_cRef = 1;
00424afc      this->vtable = &PositionPropertyValue::`vftable';
00424b05      this->m_value.vtable = 0x796910;
00424b0c      this->m_value.objcell_id = 0;
00424b02      this->m_value.frame.qw = 0x3f800000;
00424b02      this->m_value.frame.qx = 0f;
00424b02      this->m_value.frame.qy = 0f;
00424b02      this->m_value.frame.qz = 0f;
00424b02      this->m_value.frame.m_fOrigin.x = 0;
00424b02      this->m_value.frame.m_fOrigin.y = 0f;
00424b02      this->m_value.frame.m_fOrigin.z = 0f;
00424b27      Frame::cache(&this->m_value.frame);
00424af0  }


00424b30  uint8_t __fastcall PositionPropertyValue::HasValidData(class PositionPropertyValue const* this)

00424b30  {
00424b3a      int32_t eax;
00424b3a      eax = Position::IsValid(&this->m_value) != 0;
00424b3d      return eax;
00424b30  }

00424b3e                                                                                            90 90                                ..

00424b40  uint8_t __thiscall PositionPropertyValue::SetValue(class PositionPropertyValue* this, class BasePropertyValue const* arg2)

00424b40  {
00424b46      struct BasePropertyValue::VTable* vtable = arg2->vtable;
00424b4b      arg2 = &this->m_value;
00424b4f      /* jump -> vtable->InqPosition */
00424b40  }

00424b55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00424b60  void __thiscall PositionPropertyValue::Serialize(class PositionPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00424b60  {
00424b68      Position::Serialize(&this->m_value, arg2);
00424b60  }


00424b70  uint8_t __thiscall PositionPropertyValue::Compare(class PositionPropertyValue const* this, class BasePropertyValue const* arg2)

00424b70  {
00424b7a      int32_t var_48 = 0x796910;
00424b82      int32_t var_44 = 0;
00424b8a      int32_t var_40 = 0x3f800000;
00424b92      int32_t var_3c = 0;
00424b9a      int32_t var_38 = 0;
00424ba2      int32_t var_34 = 0;
00424baa      int32_t var_c = 0;
00424bb2      int32_t var_8 = 0;
00424bba      int32_t var_4 = 0;
00424bc2      Frame::cache(&var_40);
00424bc2      
00424bcd      if ((arg2 != 0 && arg2->vtable->InqPosition(&var_48) != 0))
00424bcd      {
00424be7          if ((this->m_value.objcell_id == var_44 && Frame::is_equal(&this->m_value.frame, &var_40) != 0))
00424be7          {
00424c01              int32_t eax_4;
00424c01              eax_4 = true;
00424c08              return 1;
00424be7          }
00424be7          
00424c0f          int32_t eax_5;
00424c0f          eax_5 = false;
00424bcd      }
00424bcd      
00424c1f      return 0;
00424b70  }

00424c22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00424c30  int32_t __thiscall Frame::is_equal(class Frame const* this, class Frame const* arg2)

00424c30  {
00424c50      if ((Vector3Math::AreEqual(&this->m_fOrigin, &arg2->m_fOrigin, 0.000199999995f) != 0 && Frame::is_quaternion_equal(this, arg2) != 0))
00424c65          return 1;
00424c65      
00424c6c      return 0;
00424c30  }

00424c6f                                               90                                                                 .

00424c70  int32_t __thiscall Frame::is_quaternion_equal(class Frame const* this, class Frame const* arg2)

00424c70  {
00424c72      float* edx = arg2;
00424c78      long double x87_r7_1 = fabsl((((long double)this->qw) - ((long double)*(uint32_t*)edx)));
00424c7a      long double x87_r6 = ((long double)0.000199999995f);
00424c80      (x87_r6 - x87_r7_1);
00424c80      
00424c87      if ((*(uint8_t*)((char*)((((x87_r6 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00424c87      {
00424c8f          long double x87_r7_4 = fabsl((((long double)this->qx) - ((long double)edx[1])));
00424c91          long double x87_r6_1 = ((long double)0.000199999995f);
00424c97          (x87_r6_1 - x87_r7_4);
00424c97          
00424c9e          if ((*(uint8_t*)((char*)((((x87_r6_1 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_4) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00424c9e          {
00424ca6              long double x87_r7_7 = fabsl((((long double)this->qy) - ((long double)edx[2])));
00424ca8              long double x87_r6_2 = ((long double)0.000199999995f);
00424cae              (x87_r6_2 - x87_r7_7);
00424cae              
00424cb5              if ((*(uint8_t*)((char*)((((x87_r6_2 < x87_r7_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_7))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_7) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00424cb5              {
00424cbd                  long double x87_r7_10 = fabsl((((long double)this->qz) - ((long double)edx[3])));
00424cbf                  long double x87_r6_3 = ((long double)0.000199999995f);
00424cc5                  (x87_r6_3 - x87_r7_10);
00424cc5                  
00424ccc                  if ((*(uint8_t*)((char*)((((x87_r6_3 < x87_r7_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_10))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_10) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00424cd3                      return 1;
00424cb5              }
00424c9e          }
00424c87      }
00424c87      
00424cd8      return 0;
00424c70  }

00424cdb                                                                                   90 90 90 90 90                             .....

00424ce0  uint8_t Vector3Math::AreEqual(class Vector3 const* arg1, class Vector3 const* arg2, float const arg3)

00424ce0  {
00424ce6      float* edx = arg2;
00424cec      long double x87_r7_2 = fabsl((((long double)arg1->x) - ((long double)*(uint32_t*)edx)));
00424cee      long double temp0 = ((long double)arg3);
00424cee      (x87_r7_2 - temp0);
00424cf2      int32_t eax;
00424cf2      eax = ((((x87_r7_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0) ? 1 : 0) << 0xe) | 0))));
00424cf4      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00424cf4      
00424cf7      if (!(p))
00424cf7      {
00424cff          long double x87_r7_5 = fabsl((((long double)arg1->y) - ((long double)edx[1])));
00424d01          long double temp1_1 = ((long double)arg3);
00424d01          (x87_r7_5 - temp1_1);
00424d05          eax = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00424d07          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00424d07          
00424d0a          if (!(p_1))
00424d0a          {
00424d12              long double x87_r7_8 = fabsl((((long double)arg1->z) - ((long double)edx[2])));
00424d14              long double temp2_1 = ((long double)arg3);
00424d14              (x87_r7_8 - temp2_1);
00424d18              eax = ((((x87_r7_8 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00424d1a              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
00424d1a              
00424d1d              if (!(p_2))
00424d24                  return 1;
00424d0a          }
00424cf7      }
00424cf7      
00424d27      return 0;
00424ce0  }

00424d28                          90 90 90 90 90 90 90 90                                                          ........

00424d30  void* __thiscall PositionPropertyValue::`scalar deleting destructor'(class PositionPropertyValue* this, uint32_t arg2)

00424d30  {
00424d38      this->m_value.vtable = 0x79285c;
00424d3f      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00424d3f      
00424d45      if ((arg2 & 1) != 0)
00424d48          operator delete(this);
00424d48      
00424d53      return this;
00424d30  }

00424d56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00424d60  void __fastcall StringInfoPropertyValue::StringInfoPropertyValue(class StringInfoPropertyValue* this)

00424d60  {
00424d66      this->m_cRef = 1;
00424d6d      this->vtable = 0x796a68;
00424d73      StringInfo::StringInfo(&this->m_value);
00424d60  }

00424d7c                                                                                      90 90 90 90                              ....

00424d80  uint8_t __thiscall StringInfoPropertyValue::InqStringInfo(class StringInfoPropertyValue const* this, class StringInfo* arg2)

00424d80  {
00424d88      StringInfo::operator=(arg2, &this->m_value);
00424d8d      class StringInfo* eax;
00424d8d      eax = 1;
00424d8f      return 1;
00424d80  }

00424d92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00424da0  uint8_t __thiscall StringInfoPropertyValue::SetStringInfo(class StringInfoPropertyValue* this, class StringInfo const* arg2)

00424da0  {
00424da8      StringInfo::operator=(&this->m_value, arg2);
00424dad      class StringInfo* eax;
00424dad      eax = 1;
00424daf      return 1;
00424da0  }

00424db2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00424dc0  uint8_t __thiscall StringInfoPropertyValue::SetValue(class StringInfoPropertyValue* this, class BasePropertyValue const* arg2)

00424dc0  {
00424dc6      struct BasePropertyValue::VTable* vtable = arg2->vtable;
00424dcb      arg2 = &this->m_value;
00424dcf      /* jump -> vtable->InqStringInfo */
00424dc0  }

00424dd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00424de0  uint8_t __thiscall StringInfoPropertyValue::operator!=(class StringInfoPropertyValue const* this, class BasePropertyValue const* arg2)

00424de0  {
00424ded      void var_90;
00424ded      StringInfo::StringInfo(&var_90);
00424ded      
00424e08      if (arg2->vtable->InqStringInfo(&var_90) == 0)
00424e08      {
00424e3a          StringInfo::~StringInfo(&var_90);
00424e3f          int32_t eax_4;
00424e3f          eax_4 = 0;
00424e48          return 0;
00424e08      }
00424e08      
00424e18      int32_t ebx;
00424e18      ebx = StringInfo::operator==(&this->m_value, &var_90);
00424e1a      char temp1 = ebx;
00424e1a      ebx = -(ebx);
00424e1c      ebx = (ebx - ebx);
00424e22      ebx += 1;
00424e24      StringInfo::~StringInfo(&var_90);
00424e33      return ebx;
00424de0  }

00424e4b                                   90 90 90 90 90                                                             .....

00424e50  uint8_t __thiscall StringInfoPropertyValue::operator==(class StringInfoPropertyValue const* this, class BasePropertyValue const* arg2)

00424e50  {
00424e5d      void var_90;
00424e5d      StringInfo::StringInfo(&var_90);
00424e5d      
00424e78      if (arg2->vtable->InqStringInfo(&var_90) != 0)
00424e78      {
00424e8c          int32_t ebx;
00424e8c          ebx = StringInfo::operator==(&this->m_value, &var_90);
00424e8e          StringInfo::~StringInfo(&var_90);
00424e9d          return ebx;
00424e78      }
00424e78      
00424ea4      StringInfo::~StringInfo(&var_90);
00424ea9      int32_t eax_4;
00424ea9      eax_4 = 0;
00424eb2      return 0;
00424e50  }

00424eb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00424ec0  class BasePropertyValue* __fastcall StringInfoPropertyValue::Copy(class StringInfoPropertyValue const* this)

00424ec0  {
00424ec9      void* result = operator new(0x98);
00424ec9      
00424ed5      if (result == 0)
00424ef9          return 0;
00424ef9      
00424ede      *(uint32_t*)((char*)result + 4) = 1;
00424ee5      *(uint32_t*)result = 0x796a68;
00424eeb      StringInfo::StringInfo(((char*)result + 8), &this->m_value);
00424ef4      return result;
00424ec0  }

00424efa                                                                                90 90 90 90 90 90                            ......

00424f00  void __thiscall StringInfoPropertyValue::Serialize(class StringInfoPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00424f00  {
00424f08      StringInfo::Serialize(&this->m_value, arg2);
00424f00  }


00424f10  void* __thiscall StringInfoPropertyValue::`scalar deleting destructor'(class StringInfoPropertyValue* this, uint32_t arg2)

00424f10  {
00424f16      this->vtable = 0x796a68;
00424f1c      StringInfo::~StringInfo(&this->m_value);
00424f26      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00424f26      
00424f2c      if ((arg2 & 1) != 0)
00424f2f          operator delete(this);
00424f2f      
00424f3a      return this;
00424f10  }

00424f3d                                                                                         90 90 90                               ...

00424f40  uint8_t __thiscall TriStatePropertyValue::SetValue(class TriStatePropertyValue* this, class BasePropertyValue const* arg2)

00424f40  {
00424f46      struct BasePropertyValue::VTable* vtable = arg2->vtable;
00424f4b      arg2 = &this->m_value;
00424f4f      /* jump -> vtable->InqTriState */
00424f40  }

00424f55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00424f60  uint8_t __thiscall TriStatePropertyValue::Compare(class TriStatePropertyValue const* this, class BasePropertyValue const* arg2)

00424f60  {
00424f63      class BasePropertyValue* ecx = arg2;
00424f63      
00424f69      if ((ecx != 0 && ecx->vtable->InqTriState(&arg2) != 0))
00424f8b          return this->m_value == arg2;
00424f8b      
00424f91      return 0;
00424f60  }

00424f94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00424fa0  uint8_t __thiscall TriStatePropertyValue::InqLessThan(class TriStatePropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

00424fa0  {
00424fb6      if (arg2->vtable->InqTriState(&arg2) == 0)
00424fd3          return 0;
00424fd3      
00424fc5      class BasePropertyValue* ecx_1;
00424fc5      ecx_1 = this->m_value < arg2;
00424fc8      *(uint8_t*)arg3 = ecx_1;
00424fca      enum TriState eax_2;
00424fca      eax_2 = 1;
00424fcd      return 1;
00424fa0  }

00424fd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00424fe0  class BasePropertyValue* __fastcall TriStatePropertyValue::Copy(class TriStatePropertyValue const* this)

00424fe0  {
00424fe5      void* result = operator new(0xc);
00424fe5      
00424fef      if (result == 0)
00425009          return 0;
00425009      
00424ff1      enum TriState m_value = this->m_value;
00424ff4      *(uint32_t*)((char*)result + 4) = 1;
00424ffb      *(uint32_t*)result = &TriStatePropertyValue::`vftable';
00425001      *(uint32_t*)((char*)result + 8) = m_value;
00425005      return result;
00424fe0  }

0042500a                                90 90 90 90 90 90                                                            ......

00425010  void __fastcall TimeStampPropertyValue::TimeStampPropertyValue(class TimeStampPropertyValue* this)

00425010  {
0042501e      this->m_cRef = 1;
00425025      this->vtable = &TimeStampPropertyValue::`vftable';
0042502b      this->m_value = 0f;
0042502e      *(uint32_t*)((char*)this->m_value)[4] = 0xbff00000;
00425010  }

00425032                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00425040  uint8_t __fastcall TimeStampPropertyValue::HasValidData(class TimeStampPropertyValue const* this)

00425040  {
00425040      long double x87_r7 = ((long double)this->m_value);
00425043      long double temp0 = ((long double)-1.0);
00425043      (x87_r7 - temp0);
00425049      int32_t eax;
00425049      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0042504b      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0042504b      
0042504e      if (!(p))
00425058          return 0;
00425058      
00425055      return 1;
00425040  }

00425059                                                                             90 90 90 90 90 90 90                           .......

00425060  uint8_t __thiscall TimeStampPropertyValue::SetValue(class TimeStampPropertyValue* this, class BasePropertyValue const* arg2)

00425060  {
00425066      struct BasePropertyValue::VTable* vtable = arg2->vtable;
0042506b      arg2 = &this->m_value;
0042506f      /* jump -> vtable->InqTimeStamp */
00425060  }

00425075                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00425080  uint8_t __thiscall TimeStampPropertyValue::Compare(class TimeStampPropertyValue const* this, class BasePropertyValue const* arg2)

00425080  {
0042508c      double var_8;
0042508c      
0042508c      if ((arg2 != 0 && arg2->vtable->InqTimeStamp(&var_8) != 0))
0042508c      {
004250a2          (((long double)this->m_value) - ((long double)var_8));
004250a8          bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004250a8          
004250ab          if (p)
004250bf              return 0;
004250bf          
004250b6          return 1;
0042508c      }
0042508c      
004250c8      return 0;
00425080  }

004250cb                                   90 90 90 90 90                                                             .....

004250d0  uint8_t __thiscall TimeStampPropertyValue::InqLessThan(class TimeStampPropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

004250d0  {
004250e9      double var_8;
004250e9      
004250e9      if (arg2->vtable->InqTimeStamp(&var_8) == 0)
00425122          return 0;
00425122      
004250eb      long double x87_r7 = ((long double)this->m_value);
004250ee      long double temp1 = ((long double)var_8);
004250ee      (x87_r7 - temp1);
004250f4      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004250f4      
004250f7      if (!(p))
004250f7      {
00425102          *(uint8_t*)arg3 = 1;
00425108          return (((int8_t)(((x87_r7 < temp1) ? 1 : 0) << 8)) | (((int8_t)(((0) ? 1 : 0) << 9)) | (((int8_t)((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa)) | (((int8_t)(((x87_r7 == temp1) ? 1 : 0) << 0xe)) | 0))));
004250f7      }
004250f7      
00425111      *(uint8_t*)arg3 = 0;
00425113      int32_t eax_2;
00425113      eax_2 = 1;
00425119      return 1;
004250d0  }

00425125                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00425130  class BasePropertyValue* __fastcall TimeStampPropertyValue::Copy(class TimeStampPropertyValue const* this)

00425130  {
00425135      void* result = operator new(0x10);
00425135      
0042513f      if (result == 0)
00425159          return 0;
00425159      
00425141      long double x87_r7 = ((long double)this->m_value);
00425144      *(uint32_t*)((char*)result + 4) = 1;
0042514b      *(uint64_t*)((char*)result + 8) = ((double)x87_r7);
0042514e      *(uint32_t*)result = &TimeStampPropertyValue::`vftable';
00425155      return result;
00425130  }

0042515a                                                                                90 90 90 90 90 90                            ......

00425160  uint8_t __thiscall TimeStampPropertyValue::ToFileNode(class TimeStampPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00425160  {
0042516b      class TimeStampPropertyValue* eax_1;
0042516b      
0042516b      if (arg3 != 0)
0042516b      {
0042516d          int32_t edx_1 = this->m_value;
00425170          int32_t eax = *(uint32_t*)((char*)this->m_value)[4];
0042517d          eax_1 = *(int32_t*)((char*)arg3->vtable + 4)(edx_1, eax);
0042517d          
00425182          if (eax_1 != 0)
00425182          {
0042518c              int32_t var_c = eax;
00425190              PFileNode::SetNameAsDouble(eax_1, edx_1);
00425195              int32_t eax_2;
00425195              eax_2 = 1;
0042519a              return 1;
00425182          }
0042516b      }
0042516b      
0042519d      eax_1 = 0;
004251a2      return 0;
00425160  }

004251a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004251b0  void __thiscall PFileNode::SetNameAsDouble(class PFileNode* this, double arg2)

004251b0  {
004251b3      class IFileNodeName* m_pcName = this->m_pcName;
004251b3      
004251b8      if (m_pcName != 0)
004251ba          m_pcName->vtable->__vecDelDtor(1);
004251ba      
004251c2      this->m_pcName = nullptr;
004251c9      class IFileNodeName* eax_2 = operator new(0x10);
004251c9      
004251d3      if (eax_2 == 0)
004251d3      {
004251f2          this->m_pcName = nullptr;
004251f6          return;
004251d3      }
004251d3      
004251dd      eax_2->vtable = 0x796e28;
004251e3      *(int32_t*)((char*)eax_2 + 8) = arg2;
004251e6      *(int32_t*)((char*)eax_2 + 0xc) = *(uint32_t*)((char*)arg2)[4];
004251e9      this->m_pcName = eax_2;
004251b0  }

004251f9                                                                             90 90 90 90 90 90 90                           .......

00425200  class IFileNodeName* __fastcall FileNodeName_Double::Clone(class FileNodeName_Double const* this)

00425200  {
00425205      void* result = operator new(0x10);
00425205      
0042520f      if (result == 0)
00425228          return 0;
00425228      
00425211      *(uint32_t*)result = 0x796e28;
0042521a      *(uint32_t*)((char*)result + 8) = this->m_name;
00425220      *(uint32_t*)((char*)result + 0xc) = *(uint32_t*)((char*)this->m_name)[4];
00425224      return result;
00425200  }

00425229                             90 90 90 90 90 90 90                                                           .......

00425230  void __thiscall FileNodeName_Double::Serialize(class FileNodeName_Double* this, class Archive* arg2)

00425230  {
00425239      Serializer::SerializePrimitive(&this->m_name, arg2);
00425230  }

00425244              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00425250  void __fastcall VectorPropertyValue::VectorPropertyValue(class VectorPropertyValue* this)

00425250  {
00425252      this->m_cRef = 1;
00425259      this->vtable = &VectorPropertyValue::`vftable';
00425265      this->m_value.x = Vector3_ZeroVector__.x;
0042526e      this->m_value.y = Vector3_ZeroVector__.y;
00425277      this->m_value.z = Vector3_ZeroVector__.z;
00425250  }

0042527b                                                                                   90 90 90 90 90                             .....

00425280  uint8_t __thiscall VectorPropertyValue::FromFileNode(class VectorPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00425280  {
00425286      if (arg3 != 0)
00425291          return Vector3::FromFileNode(&this->m_value, arg3);
00425291      
00425294      class PFileNode* eax_1;
00425294      eax_1 = 0;
00425296      return 0;
00425280  }

00425299                                                                             90 90 90 90 90 90 90                           .......

004252a0  uint8_t __thiscall VectorPropertyValue::ToFileNode(class VectorPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

004252a0  {
004252a6      if (arg3 != 0)
004252b6          return Vector3::ToFileNode(&this->m_value, arg3) != 0;
004252b6      
004252b9      class PFileNode* eax_1;
004252b9      eax_1 = 0;
004252bb      return 0;
004252a0  }

004252be                                                                                            90 90                                ..

004252c0  uint8_t __thiscall VectorPropertyValue::InqVector(class VectorPropertyValue const* this, class Vector3* arg2)

004252c0  {
004252c9      arg2->x = this->m_value.x;
004252ce      arg2->y = this->m_value.y;
004252d4      arg2->z = this->m_value.z;
004252d7      class Vector3* eax;
004252d7      eax = 1;
004252d9      return 1;
004252c0  }

004252dc                                                                                      90 90 90 90                              ....

004252e0  uint8_t __thiscall VectorPropertyValue::SetVector(class VectorPropertyValue* this, class Vector3 const* arg2)

004252e0  {
004252e6      this->m_value.x = arg2->x;
004252e6      this->m_value.y = arg2->y;
004252e6      this->m_value.z = arg2->z;
004252f7      float eax;
004252f7      eax = 1;
004252f9      return 1;
004252e0  }

004252fc                                                                                      90 90 90 90                              ....

00425300  uint8_t __thiscall VectorPropertyValue::SetValue(class VectorPropertyValue* this, class BasePropertyValue const* arg2)

00425300  {
00425306      struct BasePropertyValue::VTable* vtable = arg2->vtable;
0042530b      arg2 = &this->m_value;
0042530f      /* jump -> vtable->InqVector */
00425300  }

00425315                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00425320  uint8_t __thiscall VectorPropertyValue::Compare(class VectorPropertyValue const* this, class BasePropertyValue const* arg2)

00425320  {
0042532c      void var_c;
0042532c      
0042532c      if ((arg2 != 0 && arg2->vtable->InqVector(&var_c) != 0))
0042535a          return Vector3Math::AreEqual(&this->m_value, &var_c, 0.000199999995f);
0042535a      
00425363      return 0;
00425320  }

00425366                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00425370  uint8_t __thiscall VectorPropertyValue::InqLessThan(class VectorPropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

00425370  {
00425389      float var_c;
00425389      int16_t eax_1;
00425389      
00425389      if (arg2->vtable->InqVector(&var_c) == 0)
00425389      {
004253f2          eax_1 = 0;
004253f8          return 0;
00425389      }
00425389      
0042538b      long double x87_r7 = ((long double)this->m_value.z);
0042538e      long double x87_r6 = ((long double)this->m_value.y);
00425391      long double x87_r5 = ((long double)this->m_value.x);
004253a2      long double x87_r4_3 = (((x87_r5 * x87_r5) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7));
004253be      float var_8;
004253be      float var_4;
004253be      long double x87_r3_7 = (((((long double)var_4) * ((long double)var_4)) + (((long double)var_8) * ((long double)var_8))) + (((long double)var_c) * ((long double)var_c)));
004253c0      (x87_r3_7 - x87_r4_3);
004253c4      bool c1;
004253c4      eax_1 = ((((x87_r3_7 < x87_r4_3) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_7, x87_r4_3))) ? 1 : 0) << 0xa) | ((((x87_r3_7 == x87_r4_3) ? 1 : 0) << 0xe) | 0x3000))));
004253c4      
004253cd      if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
004253cd      {
004253d8          *(uint8_t*)arg3 = 1;
004253de          return eax_1;
004253cd      }
004253cd      
004253e7      *(uint8_t*)arg3 = 0;
004253e9      int32_t eax_2;
004253e9      eax_2 = 1;
004253ef      return 1;
00425370  }

004253fb                                                                                   90 90 90 90 90                             .....

00425400  class BasePropertyValue* __fastcall VectorPropertyValue::Copy(class VectorPropertyValue const* this)

00425400  {
00425405      void* result = operator new(0x14);
00425405      
0042540f      if (result == 0)
00425435          return 0;
00425435      
00425411      *(uint32_t*)((char*)result + 4) = 1;
00425418      *(uint32_t*)result = &VectorPropertyValue::`vftable';
00425421      *(uint32_t*)((char*)result + 8) = this->m_value.x;
00425427      *(uint32_t*)((char*)result + 0xc) = this->m_value.y;
0042542d      *(uint32_t*)((char*)result + 0x10) = this->m_value.z;
00425431      return result;
00425400  }

00425436                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00425440  void __fastcall WaveformPropertyValue::WaveformPropertyValue(class WaveformPropertyValue* this)

00425440  {
00425449      this->m_cRef = 1;
00425450      this->vtable = &WaveformPropertyValue::`vftable';
00425456      Waveform::Waveform(&this->m_value);
0042545d      Waveform::SetDefaults(&this->m_value);
00425440  }

00425467                       90 90 90 90 90 90 90 90 90                                                         .........

00425470  uint8_t __thiscall WaveformPropertyValue::FromFileNode(class WaveformPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00425470  {
00425479      if (arg3 != 0)
00425491          return Waveform::Parse(&this->m_value, arg3->vtable->GetSubNode(0)) != 0;
00425491      
00425494      int32_t eax;
00425494      eax = 0;
00425497      return 0;
00425470  }

0042549a                                                                                90 90 90 90 90 90                            ......

004254a0  uint8_t __thiscall WaveformPropertyValue::ToFileNode(class WaveformPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

004254a0  {
004254a6      if (arg3 == 0)
004254a6      {
004254b6          class PFileNode* eax_1;
004254b6          eax_1 = 0;
004254b8          return 0;
004254a6      }
004254a6      
004254ac      Waveform::Output(&this->m_value, arg3);
004254b1      int32_t eax;
004254b1      eax = 1;
004254b3      return 1;
004254a0  }

004254bb                                                                                   90 90 90 90 90                             .....

004254c0  uint8_t __thiscall WaveformPropertyValue::InqWaveform(class WaveformPropertyValue const* this, class Waveform* arg2)

004254c0  {
004254c8      Waveform::operator=(arg2, &this->m_value);
004254cd      class Waveform* eax;
004254cd      eax = 1;
004254cf      return 1;
004254c0  }

004254d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004254e0  class Waveform& __thiscall Waveform::operator=(class Waveform* this, class Waveform const& arg2)

004254e0  {
004254e8      this->type = arg2->type;
004254ed      this->base = arg2->base;
004254f3      this->base_vel = arg2->base_vel;
004254f9      this->amplitude = arg2->amplitude;
004254ff      this->amplitude_vel = arg2->amplitude_vel;
00425505      this->phase = arg2->phase;
0042550b      this->phase_vel = arg2->phase_vel;
00425511      this->frequency = arg2->frequency;
00425517      this->frequency_vel = arg2->frequency_vel;
0042551d      this->roughness = arg2->roughness;
00425523      this->roughness_vel = arg2->roughness_vel;
00425526      return this;
004254e0  }

00425529                             90 90 90 90 90 90 90                                                           .......

00425530  uint8_t __thiscall WaveformPropertyValue::SetWaveform(class WaveformPropertyValue* this, class Waveform const* arg2)

00425530  {
00425536      this->m_value.type = arg2->type;
0042553c      this->m_value.base = arg2->base;
00425542      this->m_value.base_vel = arg2->base_vel;
00425548      this->m_value.amplitude = arg2->amplitude;
0042554e      this->m_value.amplitude_vel = arg2->amplitude_vel;
00425554      this->m_value.phase = arg2->phase;
0042555a      this->m_value.phase_vel = arg2->phase_vel;
00425560      this->m_value.frequency = arg2->frequency;
00425566      this->m_value.frequency_vel = arg2->frequency_vel;
0042556c      this->m_value.roughness = arg2->roughness;
00425572      this->m_value.roughness_vel = arg2->roughness_vel;
00425575      float eax;
00425575      eax = 1;
00425577      return 1;
00425530  }

0042557a                                                                                90 90 90 90 90 90                            ......

00425580  uint8_t __thiscall WaveformPropertyValue::SetValue(class WaveformPropertyValue* this, class BasePropertyValue const* arg2)

00425580  {
00425586      struct BasePropertyValue::VTable* vtable = arg2->vtable;
0042558b      arg2 = &this->m_value;
0042558f      /* jump -> vtable->InqWaveform */
00425580  }

00425595                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004255a0  uint8_t __thiscall WaveformPropertyValue::Compare(class WaveformPropertyValue const* this, class BasePropertyValue const* arg2)

004255a0  {
004255aa      void var_2c;
004255aa      Waveform::Waveform(&var_2c);
004255aa      
004255b5      if ((arg2 != 0 && arg2->vtable->InqWaveform(&var_2c) != 0))
004255d9          return Waveform::operator==(&this->m_value, &var_2c);
004255d9      
004255e2      return 0;
004255a0  }

004255e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004255f0  uint8_t __thiscall Waveform::operator==(class Waveform const* this, class Waveform const* arg2)

004255f0  {
004255f8      if (this->type == arg2->type)
004255f8      {
00425604          long double x87_r7_3 = fabsl((((long double)this->base) - ((long double)arg2->base)));
00425606          long double temp1_1 = ((long double)0.000199999995f);
00425606          (x87_r7_3 - temp1_1);
0042560c          enum WaveformType eax;
0042560c          eax = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0042560e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0042560e          
00425611          if (!(p_1))
00425611          {
0042561d              long double x87_r7_6 = fabsl((((long double)this->base_vel) - ((long double)arg2->base_vel)));
0042561f              long double temp2_1 = ((long double)0.000199999995f);
0042561f              (x87_r7_6 - temp2_1);
00425625              eax = ((((x87_r7_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00425627              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
00425627              
0042562a              if (!(p_2))
0042562a              {
00425636                  long double x87_r7_9 = fabsl((((long double)this->amplitude) - ((long double)arg2->amplitude)));
00425638                  long double temp3_1 = ((long double)0.000199999995f);
00425638                  (x87_r7_9 - temp3_1);
0042563e                  eax = ((((x87_r7_9 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp3_1) ? 1 : 0) << 0xe) | 0))));
00425640                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
00425640                  
00425643                  if (!(p_3))
00425643                  {
0042564f                      long double x87_r7_12 = fabsl((((long double)this->amplitude_vel) - ((long double)arg2->amplitude_vel)));
00425651                      long double temp4_1 = ((long double)0.000199999995f);
00425651                      (x87_r7_12 - temp4_1);
00425657                      eax = ((((x87_r7_12 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00425659                      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
00425659                      
0042565c                      if (!(p_4))
0042565c                      {
00425668                          long double x87_r7_15 = fabsl((((long double)this->phase) - ((long double)arg2->phase)));
0042566a                          long double temp5_1 = ((long double)0.000199999995f);
0042566a                          (x87_r7_15 - temp5_1);
00425670                          eax = ((((x87_r7_15 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_15, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_15 == temp5_1) ? 1 : 0) << 0xe) | 0))));
00425672                          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
00425672                          
00425675                          if (!(p_5))
00425675                          {
0042567d                              long double x87_r7_18 = fabsl((((long double)this->phase_vel) - ((long double)arg2->phase_vel)));
0042567f                              long double temp6_1 = ((long double)0.000199999995f);
0042567f                              (x87_r7_18 - temp6_1);
00425685                              eax = ((((x87_r7_18 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_18, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_18 == temp6_1) ? 1 : 0) << 0xe) | 0))));
00425687                              bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x41} */;
00425687                              
0042568a                              if (!(p_6))
0042568a                              {
00425692                                  long double x87_r7_21 = fabsl((((long double)this->frequency) - ((long double)arg2->frequency)));
00425694                                  long double temp7_1 = ((long double)0.000199999995f);
00425694                                  (x87_r7_21 - temp7_1);
0042569a                                  eax = ((((x87_r7_21 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == temp7_1) ? 1 : 0) << 0xe) | 0))));
0042569c                                  bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x41} */;
0042569c                                  
0042569f                                  if (!(p_7))
0042569f                                  {
004256a7                                      long double x87_r7_24 = fabsl((((long double)this->frequency_vel) - ((long double)arg2->frequency_vel)));
004256a9                                      long double temp8_1 = ((long double)0.000199999995f);
004256a9                                      (x87_r7_24 - temp8_1);
004256af                                      eax = ((((x87_r7_24 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_24, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_24 == temp8_1) ? 1 : 0) << 0xe) | 0))));
004256b1                                      bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x41} */;
004256b1                                      
004256b4                                      if (!(p_8))
004256b4                                      {
004256bc                                          long double x87_r7_27 = fabsl((((long double)this->roughness) - ((long double)arg2->roughness)));
004256be                                          long double temp9_1 = ((long double)0.000199999995f);
004256be                                          (x87_r7_27 - temp9_1);
004256c4                                          eax = ((((x87_r7_27 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_27, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_27 == temp9_1) ? 1 : 0) << 0xe) | 0))));
004256c6                                          bool p_9 = /* bool p_9 = unimplemented  {test ah, 0x41} */;
004256c6                                          
004256c9                                          if (!(p_9))
004256c9                                          {
004256d1                                              long double x87_r7_30 = fabsl((((long double)this->roughness_vel) - ((long double)arg2->roughness_vel)));
004256d3                                              long double temp10_1 = ((long double)0.000199999995f);
004256d3                                              (x87_r7_30 - temp10_1);
004256d9                                              eax = ((((x87_r7_30 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_30, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_30 == temp10_1) ? 1 : 0) << 0xe) | 0))));
004256db                                              bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x41} */;
004256db                                              
004256de                                              if (!(p_10))
004256e5                                                  return 1;
004256c9                                          }
004256b4                                      }
0042569f                                  }
0042568a                              }
00425675                          }
0042565c                      }
00425643                  }
0042562a              }
00425611          }
004255f8      }
004255f8      
004256ea      return 0;
004255f0  }

004256ed                                         90 90 90                                                               ...

004256f0  uint8_t __thiscall WaveformPropertyValue::InqLessThan(class WaveformPropertyValue const* this, class BasePropertyValue const* arg2, uint8_t* arg3)

004256f0  {
004256fa      void var_2c;
004256fa      Waveform::Waveform(&var_2c);
004256fa      
00425712      if (arg2->vtable->InqWaveform(&var_2c) == 0)
0042574b          return 0;
0042574b      
00425714      long double x87_r7 = ((long double)this->m_value.base);
00425717      float var_28;
00425717      long double temp1 = ((long double)var_28);
00425717      (x87_r7 - temp1);
0042571d      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0042571d      
00425720      if (!(p))
00425720      {
0042572b          *(uint8_t*)arg3 = 1;
00425731          return (((int8_t)(((x87_r7 < temp1) ? 1 : 0) << 8)) | (((int8_t)(((0) ? 1 : 0) << 9)) | (((int8_t)((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa)) | (((int8_t)(((x87_r7 == temp1) ? 1 : 0) << 0xe)) | 0))));
00425720      }
00425720      
0042573a      *(uint8_t*)arg3 = 0;
0042573c      int32_t eax_2;
0042573c      eax_2 = 1;
00425742      return 1;
004256f0  }

0042574e                                            90 90                                                                ..

00425750  class BasePropertyValue* __fastcall WaveformPropertyValue::Copy(class WaveformPropertyValue const* this)

00425750  {
00425755      void* result = operator new(0x34);
00425755      
0042575f      if (result == 0)
00425782          return 0;
00425782      
0042576d      *(uint32_t*)((char*)result + 4) = 1;
00425774      *(uint32_t*)result = &WaveformPropertyValue::`vftable';
0042577a      __builtin_memcpy(((char*)result + 8), &this->m_value, 0x2c);
0042577e      return result;
00425750  }

00425783           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00425790  void __thiscall WaveformPropertyValue::Serialize(class WaveformPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00425790  {
00425798      Waveform::Serialize(&this->m_value, arg2);
00425790  }


004257a0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BasePropertyDesc *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BasePropertyDesc *> *,0>* this, uint32_t arg2)

004257a0  {
004257a3      class HashTableData<unsigned long,BasePropertyDesc *>** m_buckets = this->m_buckets;
004257ab      this->vtable = 0x7970c8;
004257ab      
004257b1      if (m_buckets != &this->m_aInplaceBuckets)
004257b4          operator delete[](m_buckets);
004257b4      
004257be      this->m_buckets = nullptr;
004257c1      this->m_firstInterestingBucket = nullptr;
004257c4      this->m_numBuckets = 0;
004257c7      this->m_numElements = 0;
004257c7      
004257cf      if ((arg2 & 1) != 0)
004257d2          operator delete(this);
004257d2      
004257dd      return this;
004257a0  }


004257e0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* this, uint32_t arg2)

004257e0  {
004257e3      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_buckets;
004257eb      this->vtable = 0x7970cc;
004257eb      
004257f1      if (m_buckets != &this->m_aInplaceBuckets)
004257f4          operator delete[](m_buckets);
004257f4      
004257fe      this->m_buckets = nullptr;
00425801      this->m_firstInterestingBucket = nullptr;
00425804      this->m_numBuckets = 0;
00425807      this->m_numElements = 0;
00425807      
0042580f      if ((arg2 & 1) != 0)
00425812          operator delete(this);
00425812      
0042581d      return this;
004257e0  }


00425820  void* __thiscall BaseProperty::`vector deleting destructor'(class BaseProperty* this, uint32_t arg2)

00425820  {
00425828      if ((arg2 & 2) == 0)
00425828      {
0042588f          class BasePropertyDesc* m_pcPropertyDesc_1 = this->m_pcPropertyDesc;
0042588f          
00425893          if (m_pcPropertyDesc_1 != 0)
00425893          {
00425895              uint32_t m_cRef = m_pcPropertyDesc_1->m_cRef;
00425895              m_pcPropertyDesc_1->m_cRef -= 1;
00425895              
00425898              if (m_cRef == 1)
0042589a                  m_pcPropertyDesc_1->vtable->__vecDelDtor(1);
0042589a              
004258a0              this->m_pcPropertyDesc = 0;
00425893          }
00425893          
004258a6          class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
004258a6          
004258ab          if (m_pcPropertyValue != 0)
004258ab          {
004258ad              uint32_t m_cRef_1 = m_pcPropertyValue->m_cRef;
004258ad              m_pcPropertyValue->m_cRef -= 1;
004258ad              
004258b0              if (m_cRef_1 == 1)
004258b2                  m_pcPropertyValue->vtable->__vecDelDtor(1);
004258b2              
004258b8              this->m_pcPropertyValue = nullptr;
004258ab          }
004258ab          
004258c4          if ((arg2 & 1) != 0)
004258c7              operator delete(this);
004258c7          
004258d2          return this;
00425828      }
00425828      
0042582a      int32_t m_pcPropertyDesc = this->m_pcPropertyDesc;
00425831      void* esi_1 = &this[m_pcPropertyDesc];
00425831      
00425835      if ((m_pcPropertyDesc - 1) >= 0)
00425835      {
00425838          int32_t ebx_1 = m_pcPropertyDesc;
00425875          int32_t i;
00425875          
00425875          do
00425875          {
00425840              int32_t* ecx = *(uint32_t*)((char*)esi_1 - 8);
00425843              esi_1 -= 8;
00425843              
00425848              if (ecx != 0)
00425848              {
0042584a                  int32_t temp4_1 = ecx[1];
0042584a                  ecx[1] -= 1;
0042584a                  
0042584d                  if (temp4_1 == 1)
00425853                      **(uint32_t**)ecx(1);
00425853                  
00425855                  *(uint32_t*)esi_1 = 0;
00425848              }
00425848              
0042585b              int32_t* ecx_1 = *(uint32_t*)((char*)esi_1 + 4);
0042585b              
00425860              if (ecx_1 != 0)
00425860              {
00425862                  int32_t temp6_1 = ecx_1[1];
00425862                  ecx_1[1] -= 1;
00425862                  
00425865                  if (temp6_1 == 1)
0042586b                      **(uint32_t**)ecx_1(1);
0042586b                  
0042586d                  *(uint32_t*)((char*)esi_1 + 4) = 0;
00425860              }
00425860              
00425874              i = ebx_1;
00425874              ebx_1 -= 1;
00425875          } while (i != 1);
00425835      }
00425835      
0042587d      if ((arg2 & 1) != 0)
00425880          operator delete[](((char*)this - 4));
00425880      
0042588c      return ((char*)this - 4);
00425820  }

0042583d                                                                                         8d 49 00                               .I.
004258d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004258e0  void __fastcall MasterPropertyGrabber::MasterPropertyGrabber(class MasterPropertyGrabber* this)

004258e0  {
004258e3      this->m_object = 0;
004258e9      class MasterProperty* m_object = MasterPropertyGrabber::s_spcMasterPropertyList.m_object;
004258e9      
004258f0      if (m_object != 0)
004258f0      {
00425954          this->m_object = m_object;
00425956          m_object->vtable->AddRef();
00425958          return;
004258f0      }
004258f0      
004258f3      int32_t var_c_1 = 0x2d;
004258f5      int32_t var_10_1 = 2;
004258f7      int32_t var_14_1 = 0xf;
004258f9      int32_t edx;
004258f9      class DBObj* eax = DBObj::GetByEnum(m_object, edx, this);
00425900      m_object = MasterPropertyGrabber::s_spcMasterPropertyList.m_object;
00425900      
0042590a      if (m_object != 0)
0042590a      {
0042590c          m_object->vtable->Release();
00425913          m_object = nullptr;
00425915          MasterPropertyGrabber::s_spcMasterPropertyList.m_object = 0;
0042590a      }
0042590a      
0042591c      if (eax != 0)
0042591c      {
0042591e          MasterPropertyGrabber::s_spcMasterPropertyList.m_object = eax;
00425924          eax->vtable->AddRef();
0042592b          eax->vtable->Release();
00425932          m_object = MasterPropertyGrabber::s_spcMasterPropertyList.m_object;
0042591c      }
0042591c      
00425937      class MasterProperty* m_object_1 = this->m_object;
00425937      
0042593c      if (m_object_1 != 0)
0042593c      {
0042593e          m_object_1->vtable->Release();
00425943          this->m_object = 0;
00425949          m_object = MasterPropertyGrabber::s_spcMasterPropertyList.m_object;
0042593c      }
0042593c      
00425950      if (m_object != 0)
00425950      {
00425954          this->m_object = m_object;
00425956          m_object->vtable->AddRef();
00425950      }
004258e0  }

0042595f                                                                                               90                                 .

00425960  uint8_t __thiscall FloatPropertyValue::ToFileNode(class FloatPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00425960  {
00425966      class PFileNode* eax;
00425966      
00425966      if (arg3 != 0)
00425966      {
0042596b          struct PFileNode::VTable* vtable = arg3->vtable;
0042596d          arg3 = this->m_value;
00425973          eax = *(int32_t*)((char*)vtable + 4)();
00425973          
00425978          if (eax != 0)
00425978          {
00425981              PFileNode::SetNameAsFloat(eax, arg3);
00425986              int32_t eax_1;
00425986              eax_1 = 1;
00425988              return 1;
00425978          }
00425966      }
00425966      
0042598b      eax = 0;
0042598d      return 0;
00425960  }


00425990  void __thiscall PFileNode::SetNameAsFloat(class PFileNode* this, float arg2)

00425990  {
00425993      class IFileNodeName* m_pcName = this->m_pcName;
00425993      
00425998      if (m_pcName != 0)
0042599a          m_pcName->vtable->__vecDelDtor(1);
0042599a      
004259a2      this->m_pcName = nullptr;
004259a9      class IFileNodeName* eax_2 = operator new(8);
004259a9      
004259b3      if (eax_2 == 0)
004259b3      {
004259cb          this->m_pcName = nullptr;
004259cf          return;
004259b3      }
004259b3      
004259b9      eax_2->vtable = 0x7970d0;
004259bf      *(int32_t*)((char*)eax_2 + 4) = arg2;
004259c2      this->m_pcName = eax_2;
00425990  }

004259d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004259e0  class IFileNodeName* __fastcall FileNodeName_Float::Clone(class FileNodeName_Float const* this)

004259e0  {
004259e5      void* result = operator new(8);
004259e5      
004259ef      if (result == 0)
00425a02          return 0;
00425a02      
004259f1      *(uint32_t*)result = 0x7970d0;
004259fa      *(uint32_t*)((char*)result + 4) = this->m_name;
004259fe      return result;
004259e0  }

00425a03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00425a10  uint8_t __thiscall InstanceIDPropertyValue::ToFileNode(class InstanceIDPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00425a10  {
00425a17      class PFileNode* eax;
00425a17      
00425a17      if (arg3 != 0)
00425a17      {
00425a19          uint32_t m_value = this->m_value;
00425a20          eax = *(int32_t*)((char*)arg3->vtable + 4)();
00425a20          
00425a25          if (eax != 0)
00425a25          {
00425a2a              PFileNode::SetNameAsHex(eax, m_value);
00425a2f              int32_t eax_1;
00425a2f              eax_1 = 1;
00425a32              return 1;
00425a25          }
00425a17      }
00425a17      
00425a35      eax = 0;
00425a38      return 0;
00425a10  }

00425a3b                                                                                   90 90 90 90 90                             .....

00425a40  void __thiscall PFileNode::SetNameAsHex(class PFileNode* this, uint32_t arg2)

00425a40  {
00425a43      class IFileNodeName* m_pcName = this->m_pcName;
00425a43      
00425a48      if (m_pcName != 0)
00425a4a          m_pcName->vtable->__vecDelDtor(1);
00425a4a      
00425a52      this->m_pcName = nullptr;
00425a59      class IFileNodeName* eax_2 = operator new(8);
00425a59      
00425a63      if (eax_2 == 0)
00425a63      {
00425a7b          this->m_pcName = nullptr;
00425a7f          return;
00425a63      }
00425a63      
00425a69      *(int32_t*)((char*)eax_2 + 4) = arg2;
00425a6c      eax_2->vtable = 0x7970ec;
00425a72      this->m_pcName = eax_2;
00425a40  }

00425a82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00425a90  class IFileNodeName* __fastcall FileNodeName_Hex::Clone(class FileNodeName_Hex const* this)

00425a90  {
00425a95      void* result = operator new(8);
00425a95      
00425a9f      if (result == 0)
00425ab8          return 0;
00425ab8      
00425aa1      *(uint32_t*)result = 0x797108;
00425aaa      *(uint32_t*)((char*)result + 4) = this->m_name;
00425aad      *(uint32_t*)result = 0x7970ec;
00425ab4      return result;
00425a90  }

00425ab9                                                                             90 90 90 90 90 90 90                           .......

00425ac0  class IFileNodeName* __fastcall FileNodeName_UInt32::Clone(class FileNodeName_UInt32 const* this)

00425ac0  {
00425ac5      void* result = operator new(8);
00425ac5      
00425acf      if (result == 0)
00425ae2          return 0;
00425ae2      
00425ad1      *(uint32_t*)result = 0x797108;
00425ada      *(uint32_t*)((char*)result + 4) = this->m_name;
00425ade      return result;
00425ac0  }

00425ae3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00425af0  uint8_t __thiscall IntegerPropertyValue::ToFileNode(class IntegerPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00425af0  {
00425af7      class PFileNode* eax;
00425af7      
00425af7      if (arg3 != 0)
00425af7      {
00425af9          int32_t m_value = this->m_value;
00425b00          eax = *(int32_t*)((char*)arg3->vtable + 4)();
00425b00          
00425b05          if (eax != 0)
00425b05          {
00425b0a              PFileNode::SetNameAsInt32(eax, m_value);
00425b0f              int32_t eax_1;
00425b0f              eax_1 = 1;
00425b12              return 1;
00425b05          }
00425af7      }
00425af7      
00425b15      eax = 0;
00425b18      return 0;
00425af0  }

00425b1b                                                                                   90 90 90 90 90                             .....

00425b20  void __thiscall PFileNode::SetNameAsInt32(class PFileNode* this, int32_t arg2)

00425b20  {
00425b23      class IFileNodeName* m_pcName = this->m_pcName;
00425b23      
00425b28      if (m_pcName != 0)
00425b2a          m_pcName->vtable->__vecDelDtor(1);
00425b2a      
00425b32      this->m_pcName = nullptr;
00425b39      class IFileNodeName* eax_2 = operator new(8);
00425b39      
00425b43      if (eax_2 == 0)
00425b43      {
00425b5b          this->m_pcName = nullptr;
00425b5f          return;
00425b43      }
00425b43      
00425b49      eax_2->vtable = 0x797124;
00425b4f      *(int32_t*)((char*)eax_2 + 4) = arg2;
00425b52      this->m_pcName = eax_2;
00425b20  }

00425b62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00425b70  class IFileNodeName* __fastcall FileNodeName_Int32::Clone(class FileNodeName_Int32 const* this)

00425b70  {
00425b75      void* result = operator new(8);
00425b75      
00425b7f      if (result == 0)
00425b92          return 0;
00425b92      
00425b81      *(uint32_t*)result = 0x797124;
00425b8a      *(uint32_t*)((char*)result + 4) = this->m_name;
00425b8e      return result;
00425b70  }

00425b93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00425ba0  void __thiscall FileNodeName_Int32::Serialize(class FileNodeName_Int32* this, class Archive* arg2)

00425ba0  {
00425ba9      Serializer::SerializeObject(&this->m_name, arg2);
00425ba0  }

00425bb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00425bc0  class BasePropertyValue* __fastcall PositionPropertyValue::Copy(class PositionPropertyValue const* this)

00425bc0  {
00425bc5      void* eax = operator new(0x50);
00425bc5      
00425bcf      if (eax == 0)
00425be1          return 0;
00425be1      
00425bdd      return PositionPropertyValue::PositionPropertyValue(eax, &this->m_value);
00425bc0  }

00425be2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00425bf0  void __thiscall PositionPropertyValue::PositionPropertyValue(class PositionPropertyValue* this, class Position const* arg2)

00425bf0  {
00425bf7      this->m_cRef = 1;
00425bfe      this->vtable = &PositionPropertyValue::`vftable';
00425c04      this->m_value.vtable = 0x796910;
00425c11      this->m_value.objcell_id = arg2->objcell_id;
00425c18      Frame::operator=(&this->m_value.frame, &arg2->frame);
00425bf0  }

00425c23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00425c30  class Frame& __thiscall Frame::operator=(class Frame* this, class Frame const& arg2)

00425c30  {
00425c3d      this->m_fOrigin.x = arg2->m_fOrigin.x;
00425c3d      this->m_fOrigin.y = arg2->m_fOrigin.y;
00425c3d      this->m_fOrigin.z = arg2->m_fOrigin.z;
00425c50      this->qw = arg2->qw;
00425c55      this->qx = arg2->qx;
00425c5b      this->qy = arg2->qy;
00425c61      this->qz = arg2->qz;
00425c67      this->m_fl2gv[0] = arg2->m_fl2gv[0];
00425c6d      this->m_fl2gv[1] = arg2->m_fl2gv[1];
00425c73      this->m_fl2gv[2] = arg2->m_fl2gv[2];
00425c79      this->m_fl2gv[3] = arg2->m_fl2gv[3];
00425c7f      this->m_fl2gv[4] = arg2->m_fl2gv[4];
00425c85      this->m_fl2gv[5] = arg2->m_fl2gv[5];
00425c8b      this->m_fl2gv[6] = arg2->m_fl2gv[6];
00425c91      this->m_fl2gv[7] = arg2->m_fl2gv[7];
00425c98      this->m_fl2gv[8] = arg2->m_fl2gv[8];
00425c9c      return this;
00425c30  }

00425c9f                                                                                               90                                 .

00425ca0  uint8_t __thiscall PositionPropertyValue::FromFileNode(class PositionPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00425ca0  {
00425ca0      class PositionPropertyValue* var_4 = this;
00425ca1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00425ca7      var_4 = PStringBase<char>::s_NullBuffer_1;
00425cb1      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00425cbb      class PFileNode* eax_1 = PFileNode::GetLeaf(arg3);
00425cbb      
00425cc2      if ((eax_1 != 0 && PFileNode::GetNameAsPString(eax_1, &var_4) != 0))
00425cc2      {
00425ce8          int32_t ebx;
00425ce8          ebx = Position::FromString(&this->m_value, var_4) != 0;
00425ceb          void* __offset(PositionPropertyValue, -0x14) esi_2 = ((char*)var_4 - 0x14);
00425ceb          
00425cfe          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00425d06              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00425d06          
00425d08          int32_t eax_5;
00425d08          eax_5 = ebx;
00425d0d          return eax_5;
00425cc2      }
00425cc2      
00425d14      void* __offset(PositionPropertyValue, -0x14) esi_4 = ((char*)var_4 - 0x14);
00425d14      
00425d27      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00425d2f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00425d2f      
00425d31      int32_t eax_7;
00425d31      eax_7 = 0;
00425d35      return 0;
00425ca0  }

00425d38                                                                          90 90 90 90 90 90 90 90                          ........

00425d40  uint8_t __thiscall PFileNode::GetNameAsPString(class PFileNode const* this, class PStringBase<char>* arg2)

00425d40  {
00425d40      class PFileNode* this_1 = this;
00425d45      class IFileNodeName* m_pcName = this->m_pcName;
00425d48      int32_t ebx;
00425d48      ebx = 0;
00425d48      
00425d4c      if (m_pcName != 0)
00425d4c      {
00425d57          bool cond:0_1 = m_pcName->vtable->GetType() != 0;
00425d59          class IFileNodeName* m_pcName_1 = this->m_pcName;
00425d59          
00425d5c          if (!(cond:0_1))
00425d5c          {
00425d66              PStringBase<char>::set(arg2, &m_pcName_1[1]);
00425d6c              int32_t eax_3;
00425d6c              eax_3 = 1;
00425d70              return 1;
00425d5c          }
00425d5c          
00425d73          m_pcName_1->vtable->ToPString(&this_1);
00425d85          class IFileNodeName* edi_1 = operator new(8);
00425d85          
00425d8c          if (edi_1 == 0)
00425d9e              edi_1 = nullptr;
00425d8c          else
00425d8c          {
00425d91              edi_1->vtable = 0x797140;
00425d97              PStringBase<char>::PStringBase<char>(&edi_1[1]);
00425d8c          }
00425d8c          
00425dae          if (edi_1->vtable->FromPString(&this_1) == 0)
00425dd1              edi_1->vtable->__vecDelDtor(1);
00425dae          else
00425dae          {
00425db8              PStringBase<char>::set(arg2, &edi_1[1]);
00425dbd              class IFileNodeName* m_pcName_2 = this->m_pcName;
00425dbd              
00425dc2              if (m_pcName_2 != 0)
00425dc4                  m_pcName_2->vtable->__vecDelDtor(1);
00425dc4              
00425dca              this->m_pcName = edi_1;
00425dcd              ebx = 1;
00425dae          }
00425dae          
00425ddd          void* __offset(PFileNode, -0x14) esi_2 = ((char*)this_1 - 0x14);
00425ddd          
00425df1          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00425df9              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00425d4c      }
00425d4c      
00425dfc      int32_t eax;
00425dfc      eax = ebx;
00425e00      return eax;
00425d40  }

00425e03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00425e10  class IFileNodeName* __fastcall FileNodeName_PString::Clone(class FileNodeName_PString const* this)

00425e10  {
00425e16      void* result = operator new(8);
00425e16      
00425e22      if (result == 0)
00425e3f          return 0;
00425e3f      
00425e2b      *(uint32_t*)result = 0x797140;
00425e31      PStringBase<unsigned short>::PStringBase<unsigned short>(((char*)result + 4), &this->m_name);
00425e3a      return result;
00425e10  }


00425e40  uint8_t __thiscall FileNodeName_PString::FromPString(class FileNodeName_PString* this, class PStringBase<char> const* arg2)

00425e40  {
00425e48      PStringBase<char>::set(&this->m_name, arg2);
00425e4d      int32_t eax;
00425e4d      eax = 1;
00425e4f      return 1;
00425e40  }

00425e52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00425e60  class PStringBase<char>* __thiscall FileNodeName_PString::ToPString(class FileNodeName_PString const* this, class PStringBase<char>* __return)

00425e60  {
00425e60      class PSRefBufferCharData<char>* m_charbuffer = this->m_name.m_charbuffer;
00425e68      __return->m_charbuffer = m_charbuffer;
00425e6e      InterlockedIncrement(&m_charbuffer[-1]);
00425e77      return __return;
00425e60  }

00425e7a                                                                                90 90 90 90 90 90                            ......

00425e80  void* __thiscall FileNodeName_PString::`scalar deleting destructor'(class FileNodeName_PString* this, uint32_t arg2)

00425e80  {
00425e86      this->vtable = 0x797140;
00425e8c      PStringBase<unsigned short>::~PStringBase<unsigned short>(&this->m_name);
00425e96      this->vtable = 0x79602c;
00425e96      
00425e9c      if ((arg2 & 1) != 0)
00425e9f          operator delete(this);
00425e9f      
00425eaa      return this;
00425e80  }

00425ead                                         90 90 90                                                               ...

00425eb0  uint8_t __thiscall PositionPropertyValue::InqPosition(class PositionPropertyValue const* this, class Position* arg2)

00425eb0  {
00425ebe      arg2->objcell_id = this->m_value.objcell_id;
00425ec1      Frame::operator=(&arg2->frame, &this->m_value.frame);
00425ec6      class Frame* eax_1;
00425ec6      eax_1 = 1;
00425ec8      return 1;
00425eb0  }

00425ecb                                   90 90 90 90 90                                                             .....

00425ed0  uint8_t __thiscall PositionPropertyValue::SetPosition(class PositionPropertyValue* this, class Position const* arg2)

00425ed0  {
00425eda      this->m_value.objcell_id = arg2->objcell_id;
00425ee1      Frame::operator=(&this->m_value.frame, &arg2->frame);
00425ee6      class Frame* eax_1;
00425ee6      eax_1 = 1;
00425ee8      return 1;
00425ed0  }

00425eeb                                   90 90 90 90 90                                                             .....

00425ef0  uint8_t __fastcall StringInfoPropertyValue::HasValidData(class StringInfoPropertyValue const* this)

00425ef0  {
00425ef0      uint32_t id = this->m_value.m_tableID.id;
00425ef0      
00425f08      if ((id == INVALID_DID.id || this->m_value.m_strToken.m_charbuffer->m_data[-4] == 1))
00425f0a          id = 0;
00425f0a      
00425f0c      return id;
00425ef0  }

00425f0d                                         90 90 90                                                               ...

00425f10  uint8_t __thiscall StringInfoPropertyValue::Compare(class StringInfoPropertyValue const* this, class BasePropertyValue const* arg2)

00425f10  {
00425f24      if (arg2 != 0)
00425f24      {
00425f2a          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00425f34          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00425f3e          void var_90;
00425f3e          StringInfo::StringInfo(&var_90);
00425f3e          
00425f54          if (arg2->vtable->InqStringInfo(&var_90) != 0)
00425f54          {
00425f67              class StringInfoPropertyValue* ebx;
00425f67              ebx = StringInfo::operator==(&this->m_value, &var_90);
00425f69              StringInfo::~StringInfo(&var_90);
00425f69              
00425f81              if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00425f89                  *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
00425f89              
00425f8d              int32_t eax_4;
00425f8d              eax_4 = ebx;
00425f96              return eax_4;
00425f54          }
00425f54          
00425f9d          StringInfo::~StringInfo(&var_90);
00425f9d          
00425fb5          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00425fbd              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
00425f24      }
00425f24      
00425fc1      int32_t eax;
00425fc1      eax = 0;
00425fca      return 0;
00425f10  }

00425fcd                                         90 90 90                                                               ...

00425fd0  void __fastcall StringPropertyValue::StringPropertyValue(class StringPropertyValue* this)

00425fd0  {
00425fd3      this->m_cRef = 1;
00425fda      this->vtable = &StringPropertyValue::`vftable';
00425fe0      class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00425feb      this->m_value.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00425fee      InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
00425fd0  }

00425ff8                                                                          90 90 90 90 90 90 90 90                          ........

00426000  uint8_t __convention("regparm") StringPropertyValue::SetValue(class StringPropertyValue* this @ ecx, class BasePropertyValue const* arg2)

00426000  {
0042600f      /* tailcall */
0042600f      return arg2->vtable->InqString(arg2, &this->m_value.m_charbuffer);
00426000  }

00426015                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00426020  uint8_t __fastcall StringPropertyValue::HasValidData(class StringPropertyValue const* this)

00426020  {
0042602e      class PSRefBufferCharData<char>* eax;
0042602e      eax = this->m_value.m_charbuffer->m_data[-4] != 1;
00426030      return eax;
00426020  }

00426031                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00426040  class BasePropertyValue* __fastcall StringPropertyValue::Copy(class StringPropertyValue const* this)

00426040  {
00426046      void* result = operator new(0xc);
00426046      
00426052      if (result == 0)
00426076          return 0;
00426076      
0042605b      *(uint32_t*)((char*)result + 4) = 1;
00426062      *(uint32_t*)result = &StringPropertyValue::`vftable';
00426068      PStringBase<unsigned short>::PStringBase<unsigned short>(((char*)result + 8), &this->m_value);
00426071      return result;
00426040  }

00426077                                                                       90 90 90 90 90 90 90 90 90                         .........

00426080  uint8_t __thiscall StringPropertyValue::FromFileNode(class StringPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00426080  {
00426089      class PFileNode* eax;
00426089      
00426089      if (arg3 != 0)
00426089      {
0042608b          eax = PFileNode::GetLeaf(arg3);
0042608b          
00426092          if (eax != 0)
004260a0              return PFileNode::GetNameAsPString(eax, &this->m_value);
00426089      }
00426089      
004260a3      eax = 0;
004260a6      return 0;
00426080  }

004260a9                             90 90 90 90 90 90 90                                                           .......

004260b0  uint8_t __thiscall StringPropertyValue::InqString(class StringPropertyValue const* this, class PStringBase<char>* arg2)

004260b0  {
004260b8      PStringBase<char>::set(arg2, &this->m_value);
004260bd      int32_t eax;
004260bd      eax = 1;
004260bf      return 1;
004260b0  }

004260c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004260d0  uint8_t __thiscall StringPropertyValue::SetString(class StringPropertyValue* this, class PStringBase<char> const* arg2)

004260d0  {
004260d8      PStringBase<char>::set(&this->m_value, arg2);
004260dd      int32_t eax;
004260dd      eax = 1;
004260df      return 1;
004260d0  }

004260e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004260f0  uint8_t __thiscall StringPropertyValue::GetValueAsString(class StringPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

004260f0  {
004260f8      PStringBase<char>::set(arg3, &this->m_value);
004260fd      int32_t eax;
004260fd      eax = 1;
004260ff      return 1;
004260f0  }

00426102        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00426110  uint8_t __thiscall StringPropertyValue::Compare(class StringPropertyValue const* this, class BasePropertyValue const* arg2)

00426110  {
00426110      class StringPropertyValue* var_4 = this;
00426111      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00426117      var_4 = PStringBase<char>::s_NullBuffer_1;
00426121      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00426121      
0042612d      if ((arg2 != 0 && arg2->vtable->InqString(arg2, &var_4) != 0))
0042612d      {
0042614b          int32_t eax_3 = PStringBase<char>::cmp(&this->m_value, &var_4, 0);
00426156          char ebx_1 = ((int8_t)-(eax_3));
0042615a          void* __offset(StringPropertyValue, -0x14) esi_2 = ((char*)var_4 - 0x14);
0042615a          
0042616f          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00426177              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00426177          
00426179          int32_t eax_4;
00426179          eax_4 = ((ebx_1 - ebx_1) + 1);
0042617e          return eax_4;
0042612d      }
0042612d      
00426185      void* __offset(StringPropertyValue, -0x14) esi_4 = ((char*)var_4 - 0x14);
00426185      
00426198      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004261a0          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004261a0      
004261a2      int32_t eax_6;
004261a2      eax_6 = 0;
004261a6      return 0;
00426110  }

004261a9                             90 90 90 90 90 90 90                                                           .......

004261b0  uint8_t __thiscall StringPropertyValue::operator!=(class StringPropertyValue const* this, class BasePropertyValue const* arg2)

004261b0  {
004261b0      class StringPropertyValue* var_4 = this;
004261b1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004261b7      var_4 = PStringBase<char>::s_NullBuffer_1;
004261c1      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004261c1      
004261da      if (arg2->vtable->InqString(arg2, &var_4) == 0)
004261da      {
00426219          void* __offset(StringPropertyValue, -0x14) esi_4 = ((char*)var_4 - 0x14);
00426219          
0042622c          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00426234              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00426234          
00426236          int32_t eax_6;
00426236          eax_6 = 0;
0042623a          return 0;
004261da      }
004261da      
004261e5      uint8_t eax_3 = PStringBase<char>::operator!=(&this->m_value, &var_4);
004261ee      void* __offset(StringPropertyValue, -0x14) esi_2 = ((char*)var_4 - 0x14);
004261f5      int32_t ebx;
004261f5      ebx = eax_3;
004261f5      
00426203      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0042620b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0042620b      
0042620d      int32_t eax_4;
0042620d      eax_4 = ebx;
00426212      return eax_4;
004261b0  }

0042623d                                                                                         90 90 90                               ...

00426240  uint8_t __thiscall PStringBase<char>::operator!=(class PStringBase<char> const* this, class PStringBase<char> const* arg2)

00426240  {
00426245      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00426247      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00426247      
0042624f      if (m_charbuffer->m_data[-4] == m_charbuffer_1->m_data[-4])
0042624f      {
00426251          int32_t ecx_1 = *(int32_t*)((char*)m_charbuffer + -8);
00426254          int32_t edx_1 = *(int32_t*)((char*)m_charbuffer_1 + -8);
00426254          
00426263          if (((ecx_1 == edx_1 || ecx_1 == 0xffffffff) || edx_1 == 0xffffffff))
00426263          {
0042626b              int32_t ebx;
0042626b              int32_t var_8 = ebx;
0042626b              
00426270              while (true)
00426270              {
00426270                  edx_1 = m_charbuffer->m_data[0];
00426272                  ebx = m_charbuffer_1->m_data[0];
00426274                  ecx_1 = edx_1;
00426276                  bool c_1 = edx_1 < ebx;
00426276                  
00426278                  if (edx_1 == ebx)
00426278                  {
0042627c                      if (ecx_1 == 0)
0042627c                          break;
0042627c                      
0042627e                      edx_1 = m_charbuffer->m_data[1];
00426281                      ebx = m_charbuffer_1->m_data[1];
00426284                      ecx_1 = edx_1;
00426286                      c_1 = edx_1 < ebx;
00426286                      
00426288                      if (edx_1 == ebx)
00426288                      {
0042628a                          m_charbuffer = &m_charbuffer->m_data[2];
0042628d                          m_charbuffer_1 = &m_charbuffer_1->m_data[2];
0042628d                          
00426292                          if (ecx_1 == 0)
00426292                              break;
00426292                          
00426292                          continue;
00426288                      }
00426278                  }
00426278                  
004262a4                  bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004262b1                  int32_t eax_2;
004262b1                  eax_2 = (((char*)m_charbuffer - m_charbuffer) + 1) != 0;
004262b4                  return eax_2;
00426270              }
00426270              
0042629e              int32_t eax;
0042629e              eax = 0;
004262a1              return 0;
00426263          }
0042624f      }
0042624f      
00426265      m_charbuffer = 1;
00426268      return 1;
00426240  }

004262b7                                                                       90 90 90 90 90 90 90 90 90                         .........

004262c0  uint8_t __thiscall StringPropertyValue::operator==(class StringPropertyValue const* this, class BasePropertyValue const* arg2)

004262c0  {
004262c0      class StringPropertyValue* var_4 = this;
004262c1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004262c7      var_4 = PStringBase<char>::s_NullBuffer_1;
004262d1      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004262d1      
004262ea      if (arg2->vtable->InqString(arg2, &var_4) == 0)
004262ea      {
00426329          void* __offset(StringPropertyValue, -0x14) esi_4 = ((char*)var_4 - 0x14);
00426329          
0042633c          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00426344              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00426344          
00426346          int32_t eax_6;
00426346          eax_6 = 0;
0042634a          return 0;
004262ea      }
004262ea      
004262f5      uint8_t eax_3 = PStringBase<char>::operator==(&this->m_value, &var_4);
004262fe      void* __offset(StringPropertyValue, -0x14) esi_2 = ((char*)var_4 - 0x14);
00426305      int32_t ebx;
00426305      ebx = eax_3;
00426305      
00426313      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0042631b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0042631b      
0042631d      int32_t eax_4;
0042631d      eax_4 = ebx;
00426322      return eax_4;
004262c0  }

0042634d                                         90 90 90                                                               ...

00426350  void* __thiscall StringPropertyValue::`scalar deleting destructor'(class StringPropertyValue* this, uint32_t arg2)

00426350  {
00426356      this->vtable = &StringPropertyValue::`vftable';
0042635c      PStringBase<unsigned short>::~PStringBase<unsigned short>(&this->m_value);
00426366      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00426366      
0042636c      if ((arg2 & 1) != 0)
0042636f          operator delete(this);
0042636f      
0042637a      return this;
00426350  }

0042637d                                                                                         90 90 90                               ...

00426380  void __fastcall StringTokenPropertyValue::StringTokenPropertyValue(class StringTokenPropertyValue* this)

00426380  {
00426383      this->m_cRef = 1;
0042638a      this->vtable = 0x7972a0;
00426390      this->m_value = 0;
00426397      class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004263a2      this->m_tokenName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004263a5      InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
00426380  }

004263af                                               90                                                                 .

004263b0  uint8_t __convention("regparm") StringTokenPropertyValue::SetValue(class StringTokenPropertyValue* this @ ecx, class BasePropertyValue const* arg2)

004263b0  {
004263bf      /* tailcall */
004263bf      return arg2->vtable->InqStringToken(arg2, &this->m_value);
004263b0  }

004263c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004263d0  uint8_t __thiscall StringTokenPropertyValue::Compare(class StringTokenPropertyValue const* this, class BasePropertyValue const* arg2)

004263d0  {
004263d3      class BasePropertyValue* ecx = arg2;
004263d3      
004263d9      if ((ecx != 0 && ecx->vtable->InqStringToken(&arg2) != 0))
004263fb          return this->m_value == arg2;
004263fb      
00426401      return 0;
004263d0  }

00426404              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00426410  class BasePropertyValue* __fastcall StringTokenPropertyValue::Copy(class StringTokenPropertyValue const* this)

00426410  {
00426416      void* result = operator new(0x10);
00426416      
00426422      if (result == 0)
0042644c          return 0;
0042644c      
00426424      uint32_t m_value = this->m_value;
0042642e      *(uint32_t*)((char*)result + 4) = 1;
00426435      *(uint32_t*)result = 0x7972a0;
0042643b      *(uint32_t*)((char*)result + 8) = m_value;
0042643e      PStringBase<unsigned short>::PStringBase<unsigned short>(((char*)result + 0xc), &this->m_tokenName);
00426447      return result;
00426410  }

0042644d                                         90 90 90                                                               ...

00426450  uint8_t __thiscall StringTokenPropertyValue::FromFileNode(class StringTokenPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00426450  {
0042645a      class PFileNode* eax;
0042645a      
0042645a      if (arg3 != 0)
0042645a      {
0042645c          eax = PFileNode::GetLeaf(arg3);
0042645c          
00426463          if ((eax != 0 && PFileNode::GetNameAsPString(eax, &this->m_tokenName) != 0))
00426463          {
0042647b              this->m_value = PStringBase<char>::hash(&this->m_tokenName);
0042647f              uint32_t eax_1;
0042647f              eax_1 = 1;
00426482              return 1;
00426463          }
0042645a      }
0042645a      
00426486      eax = 0;
00426489      return 0;
00426450  }

0042648c                                      90 90 90 90                                                              ....

00426490  void* __thiscall StringTokenPropertyValue::`scalar deleting destructor'(class StringTokenPropertyValue* this, uint32_t arg2)

00426490  {
00426496      this->vtable = 0x7972a0;
0042649c      PStringBase<unsigned short>::~PStringBase<unsigned short>(&this->m_tokenName);
004264a6      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
004264a6      
004264ac      if ((arg2 & 1) != 0)
004264af          operator delete(this);
004264af      
004264ba      return this;
00426490  }

004264bd                                                                                         90 90 90                               ...

004264c0  uint8_t __thiscall TriStatePropertyValue::GetValueAsString(class TriStatePropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

004264c0  {
004264c0      enum TriState m_value = this->m_value;
004264c0      
004264c6      if (m_value == False_TriState)
004264c6      {
00426506          PStringBase<char>::set(arg3, &KW_FALSE);
0042650b          int32_t eax_5;
0042650b          eax_5 = 1;
0042650d          return 1;
004264c6      }
004264c6      
004264c9      if (m_value == 1)
004264c9      {
004264f3          PStringBase<char>::set(arg3, &KW_TRUE);
004264f8          int32_t eax_4;
004264f8          eax_4 = 1;
004264fa          return 1;
004264c9      }
004264c9      
004264d0      if (m_value != 0xff)
004264d0      {
004264d2          int32_t eax_2;
004264d2          eax_2 = 0;
004264d4          return 0;
004264d0      }
004264d0      
004264e0      PStringBase<char>::set(arg3, &KW_UNDEF);
004264e5      int32_t eax_3;
004264e5      eax_3 = 1;
004264e7      return 1;
004264c0  }


00426510  void __thiscall VectorPropertyValue::Serialize(class VectorPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00426510  {
0042651d      Archive::CheckAlignment(arg2, 0xc);
00426526      uint8_t* eax = Archive::GetBytes(arg2, 0xc);
00426526      
0042652d      if (eax != 0)
0042652d      {
00426533          if ((arg2->m_flags & 1) != 0)
00426533          {
00426537              *(uint32_t*)eax = this->m_value.x;
0042653c              *(uint32_t*)(eax + 4) = this->m_value.y;
00426543              *(uint32_t*)(eax + 8) = this->m_value.z;
00426547              return;
00426533          }
00426533          
00426516          this->m_value.x = *(uint32_t*)eax;
00426516          this->m_value.y = *(uint32_t*)(eax + 4);
00426516          this->m_value.z = *(uint32_t*)(eax + 8);
0042652d      }
00426510  }

0042655f                                                                                               90                                 .

00426560  uint8_t __thiscall WaveformPropertyValue::GetValueAsString(class WaveformPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00426560  {
00426560      class WaveformPropertyValue* __return = this;
00426574      PStringBase<char>::set(arg3, Waveform::ToString(&this->m_value, &__return));
0042657d      void* __offset(WaveformPropertyValue, -0x14) esi_1 = ((char*)__return - 0x14);
0042657d      
00426590      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00426598          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00426598      
0042659a      int32_t eax_1;
0042659a      eax_1 = 1;
0042659e      return 1;
00426560  }

004265a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004265b0  uint8_t __convention("regparm") MasterProperty::InqPropertyNameStringStatic(uint32_t arg1, class PStringBase<char>* arg2)

004265b0  {
004265b0      int32_t* ecx;
004265b0      int32_t* var_4 = ecx;
004265b6      MasterPropertyGrabber::MasterPropertyGrabber(&var_4);
004265bb      int32_t* esi = var_4;
004265bb      
004265c1      if (esi == 0)
004265c1      {
004265c3          int32_t eax;
004265c3          eax = 0;
004265c7          return 0;
004265c1      }
004265c1      
004265df      int32_t ebx;
004265df      ebx = EnumMapper::GetString(&esi[0xc], arg1, arg2);
004265e1      *(uint32_t*)(*(uint32_t*)esi + 0x14)();
004265e9      return ebx;
004265b0  }

004265ea                                90 90 90 90 90 90                                                            ......

004265f0  uint8_t __convention("regparm") MasterProperty::InqPropertyGroupNameStringStatic(uint32_t arg1, class PStringBase<char>* arg2)

004265f0  {
004265f0      int32_t* ecx;
004265f0      int32_t* var_4 = ecx;
004265f6      MasterPropertyGrabber::MasterPropertyGrabber(&var_4);
004265fb      int32_t* esi = var_4;
004265fb      
00426601      if (esi == 0)
00426601      {
00426603          int32_t eax;
00426603          eax = 0;
00426607          return 0;
00426601      }
00426601      
00426621      int32_t ebx;
00426621      ebx = EnumMapper::GetString(0xa, arg1, arg2);
00426623      *(uint32_t*)(*(uint32_t*)esi + 0x14)();
0042662b      return ebx;
004265f0  }

0042662c                                      90 90 90 90                                                              ....

00426630  void __fastcall SmartArray<BaseProperty,1>::~SmartArray<BaseProperty,1>(class SmartArray<BaseProperty,1>* this)

00426630  {
0042663d      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0042663d      {
0042663f          class BaseProperty* m_data = this->m_data;
0042663f          
00426643          if (m_data != 0)
00426647              BaseProperty::`vector deleting destructor'(m_data, 3);
0042663d      }
00426630  }

0042664d                                         90 90 90                                                               ...

00426650  void __fastcall ArrayPropertyValue::ArrayPropertyValue(class ArrayPropertyValue* this)

00426650  {
00426654      this->m_cRef = 1;
0042665b      this->vtable = &ArrayPropertyValue::`vftable';
00426661      this->m_value.m_data = 0;
00426664      this->m_value.m_sizeAndDeallocate = 0;
00426667      this->m_value.m_num = 0;
00426650  }

0042666b                                   90 90 90 90 90                                                             .....

00426670  class SmartArray<BaseProperty,1>* __fastcall ArrayPropertyValue::AccessArray(class ArrayPropertyValue* this) __pure

00426670  {
00426673      return &this->m_value;
00426670  }

00426674                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00426680  uint8_t __thiscall ArrayPropertyValue::InqArrayNumElements(class ArrayPropertyValue const* this, uint32_t* arg2)

00426680  {
00426687      *(uint32_t*)arg2 = this->m_value.m_num;
00426689      uint32_t eax;
00426689      eax = 1;
0042668b      return 1;
00426680  }

0042668e                                            90 90                                                                ..

00426690  uint8_t __thiscall ArrayPropertyValue::RemoveArrayElement(class ArrayPropertyValue* this, uint32_t const arg2)

00426690  {
00426693      /* tailcall */
00426693      return SmartArray<BaseProperty,1>::RemoveOrderedByIndex(&this->m_value, arg2);
00426690  }

00426698                                                                          90 90 90 90 90 90 90 90                          ........

004266a0  uint8_t __thiscall SmartArray<BaseProperty,1>::RemoveOrderedByIndex(class SmartArray<BaseProperty,1>* this, uint32_t arg2)

004266a0  {
004266a6      uint32_t m_num = this->m_num;
004266a6      
004266af      if (arg2 >= m_num)
004266af      {
0042673f          m_num = 0;
00426745          return 0;
004266af      }
004266af      
004266b5      class BaseProperty* m_data = this->m_data;
004266b9      void* i = &m_data[arg2];
004266c1      this->m_num = (m_num - 1);
004266c1      
004266c4      for (; i < &m_data[(m_num - 1)]; i += 8)
004266cb          BaseProperty::operator=(i, ((char*)i + 8));
004266cb      
004266e3      void* ecx_2 = &this->m_data[this->m_num];
004266e6      int32_t* var_8 = nullptr;
004266ea      int32_t* var_4 = nullptr;
004266ee      BaseProperty::operator=(ecx_2, &var_8);
004266f3      int32_t* eax_1 = var_8;
004266f3      
004266f9      if (eax_1 != 0)
004266f9      {
00426703          int32_t esi_2 = (eax_1[1] - 1);
00426700          eax_1[1] = esi_2;
00426700          
0042670a          if (esi_2 == 0)
00426710              **(uint32_t**)eax_1(1);
00426710          
00426712          var_8 = nullptr;
004266f9      }
004266f9      
0042671c      if (var_4 != 0)
0042671c      {
00426726          int32_t esi_4 = (var_4[1] - 1);
00426723          var_4[1] = esi_4;
00426723          
0042672d          if (esi_4 == 0)
00426733              **(uint32_t**)var_4(1);
0042671c      }
0042671c      
00426736      int32_t* eax_4;
00426736      eax_4 = 1;
0042673c      return 1;
004266a0  }

00426748                          90 90 90 90 90 90 90 90                                                          ........

00426750  uint8_t __thiscall ArrayPropertyValue::PopArrayElement(class ArrayPropertyValue* this, class BaseProperty* arg2)

00426750  {
00426753      /* tailcall */
00426753      return SmartArray<BaseProperty,1>::pop(&this->m_value, arg2);
00426750  }

00426758                                                                          90 90 90 90 90 90 90 90                          ........

00426760  uint8_t __thiscall SmartArray<BaseProperty,1>::pop(class SmartArray<BaseProperty,1>* this, class BaseProperty* arg2)

00426760  {
00426766      uint32_t m_num = this->m_num;
00426766      
0042676b      if (m_num == 0)
0042676b      {
0042676d          m_num = 0;
00426773          return 0;
0042676b      }
0042676b      
00426781      this->m_num = (m_num - 1);
00426784      BaseProperty::operator=(arg2, &this->m_data[(m_num - 1)]);
00426793      void* ecx_3 = &this->m_data[this->m_num];
00426796      int32_t* var_8 = nullptr;
0042679e      int32_t* var_4 = nullptr;
004267a6      BaseProperty::operator=(ecx_3, &var_8);
004267ab      int32_t* eax_1 = var_8;
004267ab      
004267b1      if (eax_1 != 0)
004267b1      {
004267bb          int32_t esi_2 = (eax_1[1] - 1);
004267b8          eax_1[1] = esi_2;
004267b8          
004267c2          if (esi_2 == 0)
004267c8              **(uint32_t**)eax_1(1);
004267c8          
004267ca          var_8 = nullptr;
004267b1      }
004267b1      
004267d8      if (var_4 != 0)
004267d8      {
004267e2          int32_t esi_4 = (var_4[1] - 1);
004267df          var_4[1] = esi_4;
004267df          
004267e9          if (esi_4 == 0)
004267ef              **(uint32_t**)var_4(1);
004267d8      }
004267d8      
004267f1      int32_t* eax_4;
004267f1      eax_4 = 1;
004267f7      return 1;
00426760  }

004267fa                                                                                90 90 90 90 90 90                            ......

00426800  uint8_t __thiscall ArrayPropertyValue::InqArrayElement(class ArrayPropertyValue const* this, uint32_t const arg2, class BaseProperty* arg3)

00426800  {
00426807      if (arg2 >= this->m_value.m_num)
00426807      {
0042681e          uint32_t const eax_1;
0042681e          eax_1 = 0;
00426820          return 0;
00426807      }
00426807      
00426814      BaseProperty::operator=(arg3, &this->m_value.m_data[arg2]);
00426819      class BaseProperty* eax;
00426819      eax = 1;
0042681b      return 1;
00426800  }

00426823           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00426830  class BaseProperty const* __thiscall ArrayPropertyValue::GetArrayElement(class ArrayPropertyValue const* this, uint32_t const arg2)

00426830  {
0042683a      return &this->m_value.m_data[arg2];
00426830  }

0042683d                                                                                         90 90 90                               ...

00426840  void* __thiscall ArrayPropertyValue::`scalar deleting destructor'(class ArrayPropertyValue* this, uint32_t arg2)

00426840  {
00426846      this->vtable = &ArrayPropertyValue::`vftable';
0042684c      SmartArray<BaseProperty,1>::~SmartArray<BaseProperty,1>(&this->m_value);
00426856      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00426856      
0042685c      if ((arg2 & 1) != 0)
0042685f          operator delete(this);
0042685f      
0042686a      return this;
00426840  }

0042686d                                         90 90 90                                                               ...

00426870  uint8_t __thiscall BoolPropertyValue::FromFileNode(class BoolPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00426870  {
00426879      class PFileNode* eax;
00426879      
00426879      if (arg3 != 0)
00426879      {
0042687b          eax = PFileNode::GetLeaf(arg3);
0042687b          
00426882          if (eax != 0)
00426890              return PFileNode::GetNameAsBool(eax, &this->m_value);
00426879      }
00426879      
00426893      eax = 0;
00426896      return 0;
00426870  }

00426899                                                                             90 90 90 90 90 90 90                           .......

004268a0  uint8_t __thiscall PFileNode::GetNameAsBool(class PFileNode const* this, uint8_t* arg2)

004268a0  {
004268a0      class PFileNode* this_1 = this;
004268a5      class IFileNodeName* m_pcName = this->m_pcName;
004268a8      int32_t ebx;
004268a8      ebx = 0;
004268a8      
004268ac      if (m_pcName != 0)
004268ac      {
004268b7          bool cond:0_1 = m_pcName->vtable->GetType() != 7;
004268ba          class IFileNodeName* m_pcName_1 = this->m_pcName;
004268ba          
004268bd          if (!(cond:0_1))
004268bd          {
004268c7              *(uint8_t*)arg2 = *(int32_t*)((char*)m_pcName_1 + 4);
004268c9              uint8_t* eax_3;
004268c9              eax_3 = 1;
004268cd              return 1;
004268bd          }
004268bd          
004268d0          m_pcName_1->vtable->ToPString(&this_1);
004268dd          void* eax_4 = operator new(8);
004268e7          class IFileNodeName* edi_1;
004268e7          
004268e7          if (eax_4 == 0)
004268f3              edi_1 = nullptr;
004268e7          else
004268e7          {
004268e9              *(uint32_t*)eax_4 = 0x796010;
004268ef              edi_1 = eax_4;
004268e7          }
004268e7          
00426903          if (edi_1->vtable->FromPString(&this_1) == 0)
00426922              edi_1->vtable->__vecDelDtor(1);
00426903          else
00426903          {
0042690c              *(uint8_t*)arg2 = *(int32_t*)((char*)edi_1 + 4);
0042690e              class IFileNodeName* m_pcName_2 = this->m_pcName;
0042690e              
00426913              if (m_pcName_2 != 0)
00426915                  m_pcName_2->vtable->__vecDelDtor(1);
00426915              
0042691b              this->m_pcName = edi_1;
0042691e              ebx = 1;
00426903          }
00426903          
0042692e          void* __offset(PFileNode, -0x14) esi_2 = ((char*)this_1 - 0x14);
0042692e          
00426942          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0042694a              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004268ac      }
004268ac      
0042694d      int32_t eax;
0042694d      eax = ebx;
00426951      return eax;
004268a0  }

00426954                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00426960  uint8_t __thiscall FloatPropertyValue::FromFileNode(class FloatPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00426960  {
00426969      class PFileNode* eax;
00426969      
00426969      if (arg3 != 0)
00426969      {
0042696b          eax = PFileNode::GetLeaf(arg3);
0042696b          
00426972          if (eax != 0)
00426980              return PFileNode::GetNameAsFloat(eax, &this->m_value);
00426969      }
00426969      
00426983      eax = 0;
00426986      return 0;
00426960  }

00426989                             90 90 90 90 90 90 90                                                           .......

00426990  uint8_t __thiscall PFileNode::GetNameAsFloat(class PFileNode const* this, float* arg2)

00426990  {
00426990      class PFileNode* this_1 = this;
00426995      class IFileNodeName* m_pcName = this->m_pcName;
00426998      int32_t ebx;
00426998      ebx = 0;
00426998      
0042699c      if (m_pcName != 0)
0042699c      {
004269a7          bool cond:0_1 = m_pcName->vtable->GetType() != 4;
004269aa          class IFileNodeName* m_pcName_1 = this->m_pcName;
004269aa          
004269ad          if (!(cond:0_1))
004269ad          {
004269b7              *(uint32_t*)arg2 = *(int32_t*)((char*)m_pcName_1 + 4);
004269b9              float* eax_3;
004269b9              eax_3 = 1;
004269bd              return 1;
004269ad          }
004269ad          
004269c0          m_pcName_1->vtable->ToPString(&this_1);
004269cd          void* eax_4 = operator new(8);
004269d7          class IFileNodeName* edi_1;
004269d7          
004269d7          if (eax_4 == 0)
004269e3              edi_1 = nullptr;
004269d7          else
004269d7          {
004269d9              *(uint32_t*)eax_4 = 0x7970d0;
004269df              edi_1 = eax_4;
004269d7          }
004269d7          
004269f3          if (edi_1->vtable->FromPString(&this_1) == 0)
00426a12              edi_1->vtable->__vecDelDtor(1);
004269f3          else
004269f3          {
004269fc              *(uint32_t*)arg2 = *(int32_t*)((char*)edi_1 + 4);
004269fe              class IFileNodeName* m_pcName_2 = this->m_pcName;
004269fe              
00426a03              if (m_pcName_2 != 0)
00426a05                  m_pcName_2->vtable->__vecDelDtor(1);
00426a05              
00426a0b              this->m_pcName = edi_1;
00426a0e              ebx = 1;
004269f3          }
004269f3          
00426a1e          void* __offset(PFileNode, -0x14) esi_2 = ((char*)this_1 - 0x14);
00426a1e          
00426a32          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00426a3a              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0042699c      }
0042699c      
00426a3d      int32_t eax;
00426a3d      eax = ebx;
00426a41      return eax;
00426990  }

00426a44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00426a50  uint8_t __thiscall InstanceIDPropertyValue::FromFileNode(class InstanceIDPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00426a50  {
00426a59      class PFileNode* eax;
00426a59      
00426a59      if (arg3 != 0)
00426a59      {
00426a5b          eax = PFileNode::GetLeaf(arg3);
00426a5b          
00426a62          if (eax != 0)
00426a70              return PFileNode::GetNameAsHex(eax, &this->m_value);
00426a59      }
00426a59      
00426a73      eax = 0;
00426a76      return 0;
00426a50  }

00426a79                                                                             90 90 90 90 90 90 90                           .......

00426a80  uint8_t __thiscall PFileNode::GetNameAsHex(class PFileNode const* this, uint32_t* arg2)

00426a80  {
00426a80      class PFileNode* this_1 = this;
00426a85      class IFileNodeName* m_pcName = this->m_pcName;
00426a88      int32_t ebx;
00426a88      ebx = 0;
00426a88      
00426a8c      if (m_pcName != 0)
00426a8c      {
00426a97          bool cond:0_1 = m_pcName->vtable->GetType() != 8;
00426a9a          class IFileNodeName* m_pcName_1 = this->m_pcName;
00426a9a          
00426a9d          if (!(cond:0_1))
00426a9d          {
00426aa7              *(uint32_t*)arg2 = *(int32_t*)((char*)m_pcName_1 + 4);
00426aa9              uint32_t* eax_3;
00426aa9              eax_3 = 1;
00426aad              return 1;
00426a9d          }
00426a9d          
00426ab0          m_pcName_1->vtable->ToPString(&this_1);
00426abd          void* eax_4 = operator new(8);
00426ac7          class IFileNodeName* edi_1;
00426ac7          
00426ac7          if (eax_4 == 0)
00426ad3              edi_1 = nullptr;
00426ac7          else
00426ac7          {
00426ac9              *(uint32_t*)eax_4 = 0x7970ec;
00426acf              edi_1 = eax_4;
00426ac7          }
00426ac7          
00426ae3          if (edi_1->vtable->FromPString(&this_1) == 0)
00426b02              edi_1->vtable->__vecDelDtor(1);
00426ae3          else
00426ae3          {
00426aec              *(uint32_t*)arg2 = *(int32_t*)((char*)edi_1 + 4);
00426aee              class IFileNodeName* m_pcName_2 = this->m_pcName;
00426aee              
00426af3              if (m_pcName_2 != 0)
00426af5                  m_pcName_2->vtable->__vecDelDtor(1);
00426af5              
00426afb              this->m_pcName = edi_1;
00426afe              ebx = 1;
00426ae3          }
00426ae3          
00426b0e          void* __offset(PFileNode, -0x14) esi_2 = ((char*)this_1 - 0x14);
00426b0e          
00426b22          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00426b2a              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00426a8c      }
00426a8c      
00426b2d      int32_t eax;
00426b2d      eax = ebx;
00426b31      return eax;
00426a80  }

00426b34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00426b40  uint8_t __thiscall IntegerPropertyValue::FromFileNode(class IntegerPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00426b40  {
00426b49      class PFileNode* eax;
00426b49      
00426b49      if (arg3 != 0)
00426b49      {
00426b4b          eax = PFileNode::GetLeaf(arg3);
00426b4b          
00426b52          if (eax != 0)
00426b60              return PFileNode::GetNameAsInt32(eax, &this->m_value);
00426b49      }
00426b49      
00426b63      eax = 0;
00426b66      return 0;
00426b40  }

00426b69                             90 90 90 90 90 90 90                                                           .......

00426b70  uint8_t __thiscall PFileNode::GetNameAsInt32(class PFileNode const* this, int32_t* arg2)

00426b70  {
00426b70      class PFileNode* this_1 = this;
00426b75      class IFileNodeName* m_pcName = this->m_pcName;
00426b78      int32_t ebx;
00426b78      ebx = 0;
00426b78      
00426b7c      if (m_pcName != 0)
00426b7c      {
00426b87          bool cond:0_1 = m_pcName->vtable->GetType() != 2;
00426b8a          class IFileNodeName* m_pcName_1 = this->m_pcName;
00426b8a          
00426b8d          if (!(cond:0_1))
00426b8d          {
00426b97              *(uint32_t*)arg2 = *(int32_t*)((char*)m_pcName_1 + 4);
00426b99              int32_t* eax_3;
00426b99              eax_3 = 1;
00426b9d              return 1;
00426b8d          }
00426b8d          
00426ba0          m_pcName_1->vtable->ToPString(&this_1);
00426bad          void* eax_4 = operator new(8);
00426bb7          class IFileNodeName* edi_1;
00426bb7          
00426bb7          if (eax_4 == 0)
00426bc3              edi_1 = nullptr;
00426bb7          else
00426bb7          {
00426bb9              *(uint32_t*)eax_4 = 0x797124;
00426bbf              edi_1 = eax_4;
00426bb7          }
00426bb7          
00426bd3          if (edi_1->vtable->FromPString(&this_1) == 0)
00426bf2              edi_1->vtable->__vecDelDtor(1);
00426bd3          else
00426bd3          {
00426bdc              *(uint32_t*)arg2 = *(int32_t*)((char*)edi_1 + 4);
00426bde              class IFileNodeName* m_pcName_2 = this->m_pcName;
00426bde              
00426be3              if (m_pcName_2 != 0)
00426be5                  m_pcName_2->vtable->__vecDelDtor(1);
00426be5              
00426beb              this->m_pcName = edi_1;
00426bee              ebx = 1;
00426bd3          }
00426bd3          
00426bfe          void* __offset(PFileNode, -0x14) esi_2 = ((char*)this_1 - 0x14);
00426bfe          
00426c12          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00426c1a              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00426b7c      }
00426b7c      
00426c1d      int32_t eax;
00426c1d      eax = ebx;
00426c21      return eax;
00426b70  }

00426c24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00426c30  uint8_t __thiscall StringPropertyValue::ToFileNode(class StringPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00426c30  {
00426c37      if (arg3 == 0)
00426c37      {
00426c5b          int32_t eax;
00426c5b          eax = 0;
00426c5e          return 0;
00426c37      }
00426c37      
00426c39      class PSRefBufferCharData<char>* m_charbuffer = this->m_value.m_charbuffer;
00426c3c      class StringPropertyValue* this_1 = this;
00426c45      InterlockedIncrement(&m_charbuffer[-1]);
00426c54      class PFileNode* eax_2;
00426c54      eax_2 = PFileNode::MakeSubNode(arg3, m_charbuffer) != 0;
00426c58      return eax_2;
00426c30  }

00426c61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00426c70  class PFileNode* __thiscall PFileNode::MakeSubNode(class PFileNode* this, class PStringBase<char> arg2)

00426c70  {
00426c76      class PFileNode* this_1 = this;
00426c81      InterlockedIncrement((arg2 - 0x10));
00426c89      class PFileNode* result = PFileNode::MakeSubNodeAsPString(this, arg2);
00426c89      
00426ca3      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00426cab          **(uint32_t**)(arg2 - 0x14)(1);
00426cab      
00426cb1      return result;
00426c70  }

00426cb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00426cc0  class PFileNode* __thiscall PFileNode::MakeSubNodeAsPString(class PFileNode* this, class PStringBase<char> arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00426cc0  {
00426cc2      int32_t esi;
00426cc2      int32_t var_4 = esi;
00426cc3      int32_t edi;
00426cc3      int32_t var_8 = edi;
00426cc4      class PFileNode* result;
00426cc4      int32_t ecx;
00426cc4      result = *(int32_t*)((char*)this->vtable + 4)();
00426cc4      
00426ccf      if (result == 0)
00426ccf      {
00426ce4          if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00426cec              **(uint32_t**)(arg2 - 0x14)(1);
00426cec          
00426cf2          return 0;
00426ccf      }
00426ccf      
00426cf5      int32_t var_c_1 = ecx;
00426d06      PFileNode::SetNameAsPString(result, InterlockedIncrement((arg2 - 0x10), arg2));
00426d06      
00426d1e      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00426d26          **(uint32_t**)(arg2 - 0x14)(1);
00426d26      
00426d2c      return result;
00426cc0  }

00426d2f                                               90                                                                 .

00426d30  void __fastcall PFileNode::SetNameAsPString(class PFileNode* this, class PStringBase<char> arg2)

00426d30  {
00426d34      class IFileNodeName* m_pcName = this->m_pcName;
00426d34      
00426d39      if (m_pcName != 0)
00426d3b          m_pcName->vtable->__vecDelDtor(1);
00426d3b      
00426d43      this->m_pcName = nullptr;
00426d4f      class IFileNodeName* esi = operator new(8);
00426d4f      
00426d56      if (esi == 0)
00426d6d          esi = nullptr;
00426d56      else
00426d56      {
00426d60          esi->vtable = 0x797140;
00426d66          PStringBase<unsigned short>::PStringBase<unsigned short>(&esi[1], &arg2);
00426d56      }
00426d56      
00426d6f      this->m_pcName = esi;
00426d76      int32_t* esi_2 = (arg2 - 0x14);
00426d76      
00426d89      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00426d91          **(uint32_t**)esi_2(1);
00426d30  }

00426d98                                                                          90 90 90 90 90 90 90 90                          ........

00426da0  uint8_t __thiscall StringTokenPropertyValue::ToFileNode(class StringTokenPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00426da0  {
00426daa      if (arg3 == 0)
00426daa      {
00426df8          int32_t eax;
00426df8          eax = 0;
00426dfb          return 0;
00426daa      }
00426daa      
00426dac      class PSRefBufferCharData<char>* m_charbuffer = this->m_tokenName.m_charbuffer;
00426dbb      int32_t var_14_1 = InterlockedIncrement(&m_charbuffer[-1]);
00426dc1      InterlockedIncrement(&m_charbuffer[-1]);
00426dc5      class PFileNode* eax_1 = PFileNode::MakeSubNodeAsPString(arg3, m_charbuffer);
00426dc5      
00426ddf      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00426de7          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00426de7      
00426deb      int32_t eax_3;
00426deb      eax_3 = eax_1 != 0;
00426df2      return eax_3;
00426da0  }

00426dfe                                                                                            90 90                                ..

00426e00  void __thiscall TriStatePropertyValue::Serialize(class TriStatePropertyValue* this, class Archive* arg2, uint32_t const arg3)

00426e00  {
00426e00      class TriStatePropertyValue* this_1 = this;
00426e12      *(uint8_t*)((char*)this_1)[3] = this->m_value;
00426e16      Serializer::SerializeObject(&*(uint32_t*)((char*)this_1)[3], arg2);
00426e16      
00426e23      if ((arg2->m_flags & 5) == 0)
00426e2a          this->m_value = ((uint32_t)*(uint8_t*)((char*)this_1)[3]);
00426e00  }

00426e33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00426e40  uint8_t __thiscall TriStatePropertyValue::ToFileNode(class TriStatePropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00426e40  {
00426e47      class PFileNode* eax;
00426e47      
00426e47      if (arg3 != 0)
00426e47      {
00426e49          enum TriState m_value = this->m_value;
00426e49          
00426e4f          if (m_value == False_TriState)
00426e4f          {
00426e9a              class TriStatePropertyValue* this_3 = this;
00426eaf              InterlockedIncrement(&KW_FALSE.m_charbuffer[-1]);
00426eaf              
00426ebe              if (PFileNode::MakeSubNode(arg3, KW_FALSE.m_charbuffer) != 0)
00426ebe              {
00426ec0                  eax = 1;
00426ec3                  return 1;
00426ebe              }
00426e4f          }
00426e4f          else
00426e4f          {
00426e52              class PStringBase<char> m_charbuffer;
00426e52              class PSRefBufferCharData<char>* m_charbuffer_1;
00426e52              
00426e52              if (m_value == 1)
00426e52              {
00426e6e                  class TriStatePropertyValue* this_2 = this;
00426e77                  m_charbuffer = KW_TRUE.m_charbuffer;
00426e79                  m_charbuffer_1 = KW_TRUE.m_charbuffer;
00426e83              label_426e83:
00426e83                  InterlockedIncrement(&m_charbuffer_1[-1]);
00426e83                  
00426e92                  if (PFileNode::MakeSubNode(arg3, m_charbuffer) != 0)
00426e92                  {
00426ec0                      eax = 1;
00426ec3                      return 1;
00426e92                  }
00426e52              }
00426e52              else if (m_value == 0xff)
00426e59              {
00426e5b                  class TriStatePropertyValue* this_1 = this;
00426e64                  m_charbuffer = KW_UNDEF.m_charbuffer;
00426e66                  m_charbuffer_1 = KW_UNDEF.m_charbuffer;
00426e6c                  goto label_426e83;
00426e59              }
00426e4f          }
00426e47      }
00426e47      
00426e94      eax = 0;
00426e97      return 0;
00426e40  }

00426ec6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00426ed0  uint8_t __convention("regparm") MasterProperty::InqPropertyNameEnumStatic(class PStringBase<char> const* arg1, uint32_t* arg2)

00426ed0  {
00426ed0      int32_t* ecx;
00426ed0      int32_t* var_4 = ecx;
00426ed7      int32_t eax;
00426ed7      int32_t ecx_2;
00426ed7      eax = MasterPropertyGrabber::MasterPropertyGrabber(&var_4);
00426edc      int32_t* esi = var_4;
00426edc      
00426ee2      if (esi == 0)
00426ee2      {
00426ee4          eax = 0;
00426ee9          return 0;
00426ee2      }
00426ee2      
00426ef3      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
00426ef5      int32_t var_14 = ecx_2;
00426efe      InterlockedIncrement(&m_charbuffer[-1]);
00426f0c      int32_t ebx;
00426f0c      ebx = EnumMapper::GetEnum(&esi[0xc], m_charbuffer, arg2);
00426f12      *(uint32_t*)(*(uint32_t*)esi + 0x14)();
00426f1a      return ebx;
00426ed0  }

00426f1b                                                                                   90 90 90 90 90                             .....

00426f20  uint8_t __thiscall MasterProperty::InqAvailablePropertiesByPropertyGroup(class MasterProperty const* this, uint32_t arg2, class AvailablePropertySet* arg3)

00426f20  {
00426f32      void __return;
00426f32      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_properties.m_intrusiveTable, &__return);
00426f37      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
00426f3c      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00426f3e      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00426f3e      
00426f41      if (i_1 != 0)
00426f41      {
00426f47          while (true)
00426f47          {
00426f47              class DBOCache* m_data = i_1->m_data;
00426f47              
00426f55              if ((m_data != 0 && m_data->m_ObjTable.m_intrusiveTable.m_aInplaceBuckets[1] == arg2))
00426f55              {
00426f57                  uint32_t m_hashKey = i_1->m_hashKey;
00426f59                  uint32_t m_hashKey_1 = m_hashKey;
00426f59                  
00426f63                  if (AvailablePropertySet::AddProperty(arg3, m_hashKey) == 0)
00426f9d                      return 0;
00426f55              }
00426f55              
00426f65              i_1 = i_1->m_hashNext;
00426f65              
00426f6a              if (i_1 == 0)
00426f6a              {
00426f80                  class HashTableData<unsigned long,DBOCache *>* i;
00426f80                  
00426f80                  do
00426f80                  {
00426f75                      m_currBucket = &m_currBucket[1];
00426f75                      
00426f7a                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00426f7a                          goto label_426f8b;
00426f7a                      
00426f7c                      i = *(uint32_t*)m_currBucket;
00426f80                  } while (i == 0);
00426f80                  
00426f82                  i_1 = i;
00426f82                  
00426f86                  if (i_1 == 0)
00426f86                      break;
00426f6a              }
00426f47          }
00426f41      }
00426f41      
00426f8b  label_426f8b:
00426f8b      eax = 1;
00426f91      return 1;
00426f20  }


00426fa0  void __thiscall MasterProperty::GetSubDataIDs(class MasterProperty const* this, class QualifiedDataIDArray* arg2)

00426fa0  {
00426fb1      void __return;
00426fb1      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_properties.m_intrusiveTable, &__return);
00426fb6      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
00426fbb      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00426fbd      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00426fbd      
00426fc0      if (i_1 != 0)
00426fc0      {
00426fc7          while (true)
00426fc7          {
00426fc7              class BasePropertyDesc* m_data = i_1->m_data;
00426fc7              
00426fcc              if (m_data != 0)
00426fcf                  BasePropertyDesc::GetSubDataIDs(m_data, arg2);
00426fcf              
00426fd4              i_1 = i_1->m_hashNext;
00426fd4              
00426fd9              if (i_1 == 0)
00426fd9              {
00426fef                  class HashTableData<unsigned long,DBOCache *>* i;
00426fef                  
00426fef                  do
00426fef                  {
00426fe4                      m_currBucket = &m_currBucket[1];
00426fe4                      
00426fe9                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00426ffe                          return;
00426ffe                      
00426feb                      i = *(uint32_t*)m_currBucket;
00426fef                  } while (i == 0);
00426fef                  
00426ff1                  i_1 = i;
00426ff1                  
00426ff5                  if (i_1 == 0)
00426ff5                      break;
00426fd9              }
00426fc7          }
00426fc0      }
00426fa0  }

00427001     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00427010  uint32_t const* __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::get_bucket_size_pointer(uint32_t arg1)

00427010  {
0042701c      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0042702c      int32_t ecx;
0042702c      uint32_t* result = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg1, ecx, nullptr);
0042702c      
00427037      if (result != bucketSizesEnd_1)
0042703d          return result;
0042703d      
00427039      return ((char*)result - 4);
00427010  }

0042703e                                                                                            90 90                                ..

00427040  void __thiscall ArrayPropertyValue::operator+=(class ArrayPropertyValue* this, class BasePropertyValue const* arg2)

00427040  {
00427049      class SmartArray<BaseProperty,1>* eax_1 = arg2->vtable->GetArray();
00427049      
00427051      if (eax_1 != 0)
00427057          SmartArray<BaseProperty,1>::AddToEnd(&this->m_value, eax_1);
00427040  }


00427060  uint8_t __thiscall SmartArray<BaseProperty,1>::AddToEnd(class SmartArray<BaseProperty,1>* this, class SmartArray<BaseProperty,1> const* arg2)

00427060  {
00427072      class BaseProperty* eax_2;
00427072      int32_t ecx;
00427072      eax_2 = SmartArray<BaseProperty,1>::grow(this, (this->m_num + arg2->m_num));
00427077      uint32_t m_num = arg2->m_num;
0042707a      int32_t esi = (m_num - 1);
0042707a      
0042707b      if ((m_num - 1) >= 0)
0042707b      {
00427096          int32_t temp2_1;
00427096          
00427096          do
00427096          {
00427090              BaseProperty::operator=(&this->m_data[(this->m_num + esi)], &arg2->m_data[esi]);
00427095              temp2_1 = esi;
00427095              esi -= 1;
00427096          } while ((temp2_1 - 1) >= 0);
0042707b      }
0042707b      
0042709b      this->m_num += arg2->m_num;
004270a0      eax_2 = 1;
004270a3      return 1;
00427060  }

004270a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004270b0  uint8_t __thiscall SmartArray<BaseProperty,1>::grow(class SmartArray<BaseProperty,1>* this, uint32_t arg2)

004270b0  {
004270bc      void* eax;
004270bc      
004270bc      if (arg2 >= this->m_num)
004270bc      {
004270cc          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
004270cc          {
00427161              eax = 1;
00427164              return 1;
004270cc          }
004270cc          
004270d4          if (arg2 == 0)
004270d4          {
004270d6              SmartArray<BaseProperty,1>::Reset(this);
004270dd              int32_t eax_2;
004270dd              eax_2 = 1;
004270e0              return 1;
004270d4          }
004270d4          
004270eb          eax = operator new[](((arg2 << 3) + 4));
004270eb          
004270f5          if (eax != 0)
004270f5          {
004270fd              void* ebp_1 = ((char*)eax + 4);
00427103              *(uint32_t*)eax = arg2;
00427105              `vector constructor iterator'(ebp_1, 8, arg2, AsyncCache::CAsyncRequest::CCallbackWrapper::CCallbackWrapper);
00427105              
0042710c              if (ebp_1 != 0)
0042710c              {
00427111                  if (this->m_data != 0)
00427111                  {
00427114                      uint32_t m_num = this->m_num;
00427117                      int32_t edi_1 = (m_num - 1);
00427117                      
00427118                      if ((m_num - 1) >= 0)
00427118                      {
00427135                          int32_t temp2_1;
00427135                          
00427135                          do
00427135                          {
00427122                              int32_t eax_3 = (edi_1 << 3);
0042712f                              BaseProperty::operator=((eax_3 + ebp_1), (this->m_data + eax_3));
00427134                              temp2_1 = edi_1;
00427134                              edi_1 -= 1;
00427135                          } while ((temp2_1 - 1) >= 0);
00427118                      }
00427118                      
00427145                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00427145                      {
00427147                          class BaseProperty* m_data = this->m_data;
00427147                          
0042714b                          if (m_data != 0)
0042714f                              BaseProperty::`vector deleting destructor'(m_data, 3);
00427145                      }
00427111                  }
00427111                  
0042715a                  this->m_data = ebp_1;
0042715c                  this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00427161                  eax = 1;
00427164                  return 1;
0042710c              }
004270f5          }
004270bc      }
004270bc      
00427169      eax = 0;
0042716c      return 0;
004270b0  }

0042716f                                               90                                                                 .

00427170  void __fastcall SmartArray<BaseProperty,1>::Reset(class SmartArray<BaseProperty,1>* this)

00427170  {
00427176      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0042718a      this->m_num = 0;
0042718a      
0042718d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0042718d      {
0042718f          class BaseProperty* m_data = this->m_data;
0042718f          
00427193          if (m_data != 0)
00427197              BaseProperty::`vector deleting destructor'(m_data, 3);
00427197          
0042719c          this->m_data = 0;
0042719e          this->m_sizeAndDeallocate = 0;
004271a6          return;
0042718d      }
0042718d      
004271a9      if (this->m_data != 0)
004271a9      {
004271ab          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
004271b2          int32_t ebx_1 = (eax - 1);
004271b2          
004271b4          if ((eax - 1) >= 0)
004271b4          {
00427210              int32_t temp1_1;
00427210              
00427210              do
00427210              {
004271c0                  int32_t* var_8 = nullptr;
004271c4                  int32_t* var_4_1 = nullptr;
004271c8                  BaseProperty::operator=(&this->m_data[ebx_1], &var_8);
004271cd                  int32_t* eax_3 = var_8;
004271cd                  
004271d3                  if (eax_3 != 0)
004271d3                  {
004271dd                      int32_t edx_2 = (eax_3[1] - 1);
004271da                      eax_3[1] = edx_2;
004271da                      
004271e2                      if (edx_2 == 0)
004271e8                          **(uint32_t**)eax_3(1);
004271e8                      
004271ea                      var_8 = nullptr;
004271d3                  }
004271d3                  
004271f4                  if (var_4_1 != 0)
004271f4                  {
004271fe                      int32_t edx_5 = (var_4_1[1] - 1);
004271fb                      var_4_1[1] = edx_5;
004271fb                      
00427203                      if (edx_5 == 0)
00427209                          **(uint32_t**)var_4_1(1);
00427209                      
0042720b                      int32_t var_4_2 = 0;
004271f4                  }
004271f4                  
0042720f                  temp1_1 = ebx_1;
0042720f                  ebx_1 -= 1;
00427210              } while ((temp1_1 - 1) >= 0);
004271b4          }
004271a9      }
00427170  }

00427219                                                                             90 90 90 90 90 90 90                           .......

00427220  uint8_t __thiscall ArrayPropertyValue::SetValue(class ArrayPropertyValue* this, class BasePropertyValue const* arg2)

00427220  {
00427229      int32_t* eax_1 = arg2->vtable->GetArray();
00427229      
00427231      if (eax_1 == 0)
00427231      {
00427242          eax_1 = 0;
00427245          return 0;
00427231      }
00427231      
00427237      SmartArray<BaseProperty,1>::operator=(&this->m_value, eax_1);
0042723c      int32_t* eax_2;
0042723c      eax_2 = 1;
0042723f      return 1;
00427220  }

00427248                          90 90 90 90 90 90 90 90                                                          ........

00427250  int32_t* __thiscall SmartArray<BaseProperty,1>::operator=(int32_t* arg1, int32_t* arg2)

00427250  {
0042726e      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
0042726e      {
00427295      label_427295:
00427295          class BaseProperty* esi_1 = *(uint32_t*)arg2;
00427297          class BaseProperty* edi_1 = *(uint32_t*)arg1;
00427299          void* ebp_1 = &esi_1[arg2[2]];
00427299          
0042729e          while (esi_1 < ebp_1)
0042729e          {
004272a3              BaseProperty::operator=(edi_1, esi_1);
004272a8              esi_1 = &esi_1[1];
004272ab              edi_1 = &edi_1[1];
0042729e          }
0042729e          
004272b6          int32_t i_1 = arg2[2];
004272b6          
004272bc          if (i_1 < arg1[2])
004272bc          {
004272be              int32_t i = i_1;
004272be              
00427321              do
00427321              {
004272c9                  class BaseProperty* ecx_4 = (*(uint32_t*)arg1 + (i << 3));
004272cc                  int32_t* var_8 = nullptr;
004272d0                  int32_t* var_4_1 = nullptr;
004272d4                  BaseProperty::operator=(ecx_4, &var_8);
004272d9                  int32_t* eax_4 = var_8;
004272d9                  
004272df                  if (eax_4 != 0)
004272df                  {
004272e9                      int32_t edx_5 = (eax_4[1] - 1);
004272e6                      eax_4[1] = edx_5;
004272e6                      
004272ee                      if (edx_5 == 0)
004272f4                          **(uint32_t**)eax_4(1);
004272f4                      
004272f6                      var_8 = nullptr;
004272df                  }
004272df                  
00427300                  if (var_4_1 != 0)
00427300                  {
0042730a                      int32_t edx_7 = (var_4_1[1] - 1);
00427307                      var_4_1[1] = edx_7;
00427307                      
0042730f                      if (edx_7 == 0)
00427315                          **(uint32_t**)var_4_1(1);
00427315                      
00427317                      int32_t var_4_2 = 0;
00427300                  }
00427300                  
0042731e                  i += 1;
00427321              } while (i < arg1[2]);
004272bc          }
004272bc          
00427327          arg1[2] = arg2[2];
0042726e      }
0042726e      else
0042726e      {
00427270          arg1[2] = 0;
00427270          
0042728a          if (SmartArray<BaseProperty,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
0042728a              goto label_427295;
0042726e      }
0042726e      
00427332      return arg1;
00427250  }

00427335                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00427340  uint8_t __thiscall BoolPropertyValue::GetValueAsString(class BoolPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427340  {
00427349      if (this->m_value != 0)
00427349      {
00427350          PStringBase<char>::set(arg3, "True");
00427355          int32_t eax_1;
00427355          eax_1 = 1;
00427357          return 1;
00427349      }
00427349      
0042735f      PStringBase<char>::set(arg3, "False");
00427364      int32_t eax_2;
00427364      eax_2 = 1;
00427366      return 1;
00427340  }

00427369                             90 90 90 90 90 90 90                                                           .......

00427370  uint8_t __thiscall ColorPropertyValue::GetValueAsString(class ColorPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427370  {
0042737a      double var_8 = ((double)((long double)this->m_value.a));
00427381      double var_10 = ((double)((long double)this->m_value.b));
00427388      double var_18 = ((double)((long double)this->m_value.g));
0042738f      double var_20 = ((double)((long double)this->m_value.r));
00427398      PStringBase<char>::sprintf(arg3, "%.3f %.3f %.3f %.3f");
004273a0      int32_t eax_1;
004273a0      eax_1 = 1;
004273a2      return 1;
00427370  }

004273a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004273b0  uint8_t __thiscall FloatPropertyValue::GetValueAsString(class FloatPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

004273b0  {
004273bc      double var_8 = ((double)((long double)this->m_value));
004273bc      
004273bf      if (arg4 != 0)
004273bf      {
004273cb          PStringBase<char>::sprintf(arg3, "%.3f");
004273d3          int32_t eax_2;
004273d3          eax_2 = 1;
004273d5          return 1;
004273bf      }
004273bf      
004273e2      PStringBase<char>::sprintf(arg3, "%.3g");
004273ea      int32_t eax_3;
004273ea      eax_3 = 1;
004273ec      return 1;
004273b0  }

004273ef                                               90                                                                 .

004273f0  void __thiscall FileNodeName_PString::Serialize(class FileNodeName_PString* this, class Archive* arg2)

004273f0  {
004273f3      /* tailcall */
004273f3      return PStringBase<char>::Serialize(&this->m_name, arg2);
004273f0  }

004273f8                                                                          90 90 90 90 90 90 90 90                          ........

00427400  uint8_t __thiscall InstanceIDPropertyValue::GetValueAsString(class InstanceIDPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427400  {
00427407      uint32_t m_value = this->m_value;
0042740e      PStringBase<char>::sprintf(arg3, "0x%08X");
00427416      int32_t eax;
00427416      eax = 1;
00427418      return 1;
00427400  }

0042741b                                                                                   90 90 90 90 90                             .....

00427420  uint8_t __thiscall IntegerPropertyValue::GetValueAsString(class IntegerPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427420  {
00427427      int32_t m_value = this->m_value;
0042742e      PStringBase<char>::sprintf(arg3, &data_794344);
00427436      int32_t eax;
00427436      eax = 1;
00427438      return 1;
00427420  }

0042743b                                                                                   90 90 90 90 90                             .....

00427440  uint8_t __thiscall LongIntegerPropertyValue::FromFileNode(class LongIntegerPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00427440  {
00427442      class PFileNode* esi = arg3;
00427442      
0042744b      if (esi != 0)
0042744b      {
0042744d          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00427458          arg3 = PStringBase<char>::s_NullBuffer_1;
0042745f          class PStringBase<char> var_10 = &PStringBase<char>::s_NullBuffer_1[-1];
00427460          InterlockedIncrement(var_10);
00427464          class PFileNode* eax_2;
00427464          class PStringBase<char> ecx_1;
00427464          eax_2 = PFileNode::GetLeaf(esi);
0042746b          uint8_t eax_3;
0042746b          
0042746b          if (eax_2 != 0)
0042746b          {
00427471              var_10 = &arg3;
00427474              eax_3 = PFileNode::GetNameAsPString(eax_2, var_10);
0042746b          }
0042746b          
0042747b          if ((eax_2 != 0 && eax_3 != 0))
0042747b          {
004274bc              var_10 = ecx_1;
004274c3              var_10 = arg3;
004274cf              uint8_t eax_6;
004274cf              class PStringBase<char> ecx_6;
004274cf              eax_6 = PSUtils::is_int64(InterlockedIncrement(&arg3[0]));
004274cf              
004274d9              if (eax_6 != 0)
004274d9              {
0042751a                  class PFileNode* esi_5 = arg3;
0042751e                  int32_t eax_9 = _errno();
00427524                  var_10 = 0;
00427529                  *(uint32_t*)eax_9 = 0;
0042752f                  int32_t eax_10;
0042752f                  int32_t edx_5;
0042752f                  eax_10 = strtoint64(esi_5, nullptr, var_10);
00427538                  this->m_value = eax_10;
0042753b                  void* __offset(PFileNode, -0x14) esi_7 = ((char*)arg3 - 0x14);
00427544                  var_10 = ((char*)esi_7 + 4);
00427545                  *(uint32_t*)((char*)this->m_value)[4] = edx_5;
00427545                  
00427554                  if ((InterlockedDecrement(var_10) == 0 && esi_7 != 0))
00427554                  {
00427556                      int32_t edx_6 = *(int32_t*)((char*)ADJ(esi_7) + -0x14);
00427558                      var_10 = 1;
0042755c                      *(uint32_t*)edx_6(var_10);
00427554                  }
00427554                  
00427560                  int32_t eax_12;
00427560                  eax_12 = 1;
00427563                  return 1;
004274d9              }
004274d9              
004274db              var_10 = ecx_6;
004274e3              PStringBase<char>::PStringBase<char>(&var_10, "Not an int64.");
004274e9              PFileNode::ReportError(esi, var_10);
004274f2              void* __offset(PFileNode, -0x14) esi_4 = ((char*)arg3 - 0x14);
004274fb              var_10 = ((char*)esi_4 + 4);
004274fb              
00427508              if ((InterlockedDecrement(var_10) == 0 && esi_4 != 0))
00427508              {
0042750a                  int32_t edx_4 = *(int32_t*)((char*)ADJ(esi_4) + -0x14);
0042750c                  var_10 = 1;
00427510                  *(uint32_t*)edx_4(var_10);
00427512                  int32_t eax_8;
00427512                  eax_8 = 0;
00427517                  return 0;
00427508              }
0042747b          }
0042747b          else
0042747b          {
0042747d              var_10 = ecx_1;
00427485              PStringBase<char>::PStringBase<char>(&var_10, "Couldn't read value.");
0042748b              PFileNode::ReportError(esi, var_10);
00427494              void* __offset(PFileNode, -0x14) esi_2 = ((char*)arg3 - 0x14);
0042749d              var_10 = ((char*)esi_2 + 4);
0042749d              
004274aa              if ((InterlockedDecrement(var_10) == 0 && esi_2 != 0))
004274aa              {
004274ac                  int32_t eax_4 = *(int32_t*)((char*)ADJ(esi_2) + -0x14);
004274ae                  var_10 = 1;
004274b2                  *(uint32_t*)eax_4(var_10);
004274aa              }
0042747b          }
0042744b      }
0042744b      
004274b4      int32_t eax;
004274b4      eax = 0;
004274b9      return 0;
00427440  }

00427566                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00427570  uint8_t __convention("regparm") PSUtils::is_int64(class PStringBase<char> arg1)

00427570  {
00427570      char* ecx;
00427570      char* var_4 = ecx;
0042757a      var_4 = nullptr;
00427588      *(uint32_t*)_errno() = 0;
00427596      strtoint64(arg1, &var_4, 0);
004275a6      int32_t ebx;
004275a6      
004275a6      if (*(uint8_t*)var_4 != 0)
004275b3          ebx = 0;
004275a6      else if (*(uint32_t*)_errno() == 0x22)
004275b3          ebx = 0;
004275ad      else
004275af          ebx = 1;
004275af      
004275c8      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
004275d0          **(uint32_t**)(arg1 - 0x14)(1);
004275d0      
004275d4      int32_t eax_3;
004275d4      eax_3 = ebx;
004275d8      return eax_3;
00427570  }

004275d9                                                                             90 90 90 90 90 90 90                           .......

004275e0  uint8_t __thiscall LongIntegerPropertyValue::ToFileNode(class LongIntegerPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004275e0  {
004275e0      class LongIntegerPropertyValue* this_1 = this;
004275e1      class PStringBase<char> ebx;
004275e1      class PStringBase<char> var_8 = ebx;
004275e2      int32_t ebp;
004275e2      int32_t var_c = ebp;
004275e3      class PFileNode* ebp_1 = arg3;
004275e9      int32_t esi;
004275e9      int32_t var_10 = esi;
004275ea      int32_t edi;
004275ea      int32_t var_14 = edi;
004275ea      int32_t* esp = &var_14;
004275ea      
004275ed      if (ebp_1 != 0)
004275ed      {
004275f3          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004275fe          arg3 = PStringBase<char>::s_NullBuffer_1;
00427606          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00427608          int32_t ebx_1 = this->m_value;
0042760b          int32_t edi_2 = *(uint32_t*)((char*)this->m_value)[4];
00427612          PStringBase<char>::PStringBase<char>(&var_8);
00427617          int32_t var_1c_1 = edi_2;
00427618          int32_t var_20_1 = ebx_1;
0042761d          char const* const var_24_1 = "%I64d";
00427622          class PStringBase<char>* var_28 = &var_8;
00427623          PStringBase<char>::sprintf(var_28, var_24_1);
00427634          PStringBase<char>::append_string(&arg2, &var_8);
0042763d          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00427642          class BasePropertyDesc* edi_3 = arg2;
0042764c          int32_t var_20_2 = InterlockedIncrement(((char*)edi_3 - 0x10));
00427652          InterlockedIncrement(((char*)edi_3 - 0x10), edi_3);
00427656          class PFileNode* eax_2 = PFileNode::MakeSubNodeAsPString(ebp_1);
00427656          
00427672          if ((InterlockedDecrement(((char*)edi_3 - 0x10)) == 0 && edi_3 != 0x14))
00427672          {
00427674              int32_t eax_4 = *(int32_t*)((char*)edi_3 + -0x14);
00427676              var_28 = 1;
0042767a              *(uint32_t*)eax_4(var_28);
00427672          }
00427672          
00427680          int32_t* esi_3 = (var_8 - 0x14);
00427680          
00427685          if (eax_2 != 0)
00427685          {
0042768a              var_28 = &esi_3[1];
0042768a              
00427693              if ((InterlockedDecrement(var_28) == 0 && esi_3 != 0))
0042769b                  **(uint32_t**)esi_3(1);
0042769b              
0042769d              int32_t eax_5;
0042769d              eax_5 = 1;
004276a4              return 1;
00427685          }
00427685          
004276aa          var_28 = &esi_3[1];
004276aa          esp = &var_28;
004276aa          
004276b3          if ((InterlockedDecrement(var_28) == 0 && esi_3 != 0))
004276b3          {
004276bb              **(uint32_t**)esi_3(1);
004276bb              esp = &var_28;
004276b3          }
004275ed      }
004275ed      
004276bd      *(uint32_t*)esp;
004276bd      esp[1];
004276bd      esp[2];
004276c0      int32_t eax;
004276c0      eax = 0;
004276bd      esp[3];
004276bd      esp[4];
004276c4      return 0;
004275e0  }

004276c7                       90 90 90 90 90 90 90 90 90                                                         .........

004276d0  uint8_t __thiscall LongIntegerPropertyValue::GetValueAsString(class LongIntegerPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

004276d0  {
004276db      PStringBase<char>::clear(arg3);
004276e6      int32_t ebx = this->m_value;
004276e9      uint8_t* ecx_1 = &arg4;
004276e9      
004276ed      if (arg4 != 0)
004276ed      {
004276ef          int32_t __saved_ebp_5 = *(uint32_t*)((char*)this->m_value)[4];
004276f2          PStringBase<char>::PStringBase<char>(ecx_1);
004276f7          int32_t __saved_ebp_1 = __saved_ebp_5;
004276f8          int32_t var_14 = ebx;
00427703          PStringBase<char>::sprintf(&arg4, "%I64d");
00427712          PStringBase<char>::append_string(arg3, &arg4);
0042771b          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg4);
00427722          int32_t eax_1;
00427722          eax_1 = 1;
00427725          return 1;
004276ed      }
004276ed      
00427729      int32_t ebp = *(uint32_t*)((char*)this->m_value)[4];
0042772c      PStringBase<char>::PStringBase<char>(ecx_1);
00427731      int32_t var_14_1 = ebp;
00427732      int32_t var_18 = ebx;
0042773d      PStringBase<char>::sprintf(&arg4, "0x%016I64X");
0042774c      PStringBase<char>::append_string(arg3, &arg4);
00427755      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg4);
00427763      PStringBase<char>::PStringBase<char>(&arg4, &data_797588);
00427763      
00427770      if (*(uint32_t*)(arg4 - 4) != 1)
00427779          PStringBase<char>::append_string(arg3, &arg4);
00427779      
00427788      int32_t* ebp_2 = (arg4 - 0x14);
00427788      
00427797      if ((InterlockedDecrement(&ebp_2[1]) == 0 && ebp_2 != 0))
004277a0          **(uint32_t**)ebp_2(1);
004277a0      
004277a2      int32_t ebp_3 = this->m_value;
004277a5      int32_t esi_1 = *(uint32_t*)((char*)this->m_value)[4];
004277ac      PStringBase<char>::PStringBase<char>(&arg4);
004277b1      int32_t var_14_5 = esi_1;
004277b2      int32_t var_18_1 = ebp_3;
004277bd      PStringBase<char>::sprintf(&arg4, "%I64d");
004277cc      PStringBase<char>::append_string(arg3, &arg4);
004277d5      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg4);
004277e3      PStringBase<char>::PStringBase<char>(&arg4, &data_797584);
004277e3      
004277f1      if (*(uint32_t*)(arg4 - 4) != 1)
004277fa          PStringBase<char>::append_string(arg3, &arg4);
004277fa      
00427803      int32_t* esi_3 = (arg4 - 0x14);
00427803      
00427812      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0042781a          **(uint32_t**)esi_3(1);
0042781a      
0042781e      int32_t eax_4;
0042781e      eax_4 = 1;
00427821      return 1;
004276d0  }

00427824              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00427830  uint8_t __thiscall PositionPropertyValue::ToFileNode(class PositionPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00427830  {
00427836      uint32_t var_204 = 0x200;
00427843      void var_200;
00427843      uint32_t eax;
00427843      uint32_t ecx_1;
00427843      eax = Position::ToString(&this->m_value, &var_200, var_204);
00427843      
0042784a      if (eax <= 0)
0042784a      {
00427874          eax = 0;
0042787c          return 0;
0042784a      }
0042784a      
0042784c      var_204 = ecx_1;
00427854      PStringBase<char>::PStringBase<char>(&var_204, &var_200);
00427860      class PFileNode* eax_1 = PFileNode::MakeSubNodeAsPString(arg3, var_204);
00427865      int32_t eax_2 = -(eax_1);
00427871      return ((int8_t)-((eax_2 - eax_2)));
00427830  }

0042787f                                                                                               90                                 .

00427880  uint8_t __thiscall PositionPropertyValue::GetValueAsString(class PositionPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427880  {
00427893      void var_200;
00427893      Position::ToString(&this->m_value, &var_200, 0x200);
004278a4      PStringBase<char>::set(arg3, &var_200);
004278a9      int32_t eax;
004278a9      eax = 1;
004278b1      return 1;
00427880  }

004278b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004278c0  uint8_t __thiscall StringInfoPropertyValue::FromFileNode(class StringInfoPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

004278c0  {
004278d7      if (arg3 != 0)
004278d7      {
004278dd          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004278e2          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
004278e9          class PStringBase<char> var_b0 = &PStringBase<char>::s_NullBuffer_1[-1];
004278ea          InterlockedIncrement(var_b0);
004278f2          class PFileNode* eax_2 = PFileNode::GetLeaf(arg3);
004278f2          
004278ff          if (eax_2 != 0)
004278ff          {
00427909              var_b0 = &PStringBase<char>::s_NullBuffer_2;
00427909              
00427913              if (PFileNode::GetNameAsPString(eax_2, var_b0) == 0)
00427913                  goto label_4279a9;
00427913              
00427919              var_b0 = "INVALID";
00427922              class PStringBase<char> var_98;
00427922              PStringBase<char>::PStringBase<char>(&var_98, var_b0);
00427927              var_b0 = 0;
0042793b              int32_t ebx;
0042793b              ebx = PStringBase<char>::eq(&PStringBase<char>::s_NullBuffer_2, &var_98, var_b0.m_charbuffer);
0042793d              int32_t* esi_2 = (var_98 - 0x14);
00427943              var_b0 = &esi_2[1];
00427943              
0042794c              if ((InterlockedDecrement(var_b0) == 0 && esi_2 != 0))
0042794c              {
0042794e                  int32_t edx_1 = *(uint32_t*)esi_2;
00427950                  var_b0 = 1;
00427954                  *(uint32_t*)edx_1(var_b0);
0042794c              }
0042794c              
00427958              if (ebx == 0)
00427958                  goto label_4279a9;
00427958              
00427967              void var_90;
00427967              var_b0 = StringInfo::StringInfo(&var_90);
0042796b              StringInfo::operator=(&this->m_value, var_b0);
00427974              StringInfo::~StringInfo(&var_90);
0042797d          label_42797d:
0042797d              void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00427983              var_b0 = ((char*)esi_4 + 4);
00427983              
0042798c              if ((InterlockedDecrement(var_b0) == 0 && esi_4 != 0))
0042798c              {
0042798e                  int32_t edx_2 = *(int32_t*)((char*)ADJ(esi_4) + -0x14);
00427990                  var_b0 = 1;
00427994                  *(uint32_t*)edx_2(var_b0);
0042798c              }
0042798c              
00427996              int32_t eax_9;
00427996              eax_9 = 1;
004279a2              return 1;
004278ff          }
004278ff          
004279a9      label_4279a9:
004279a9          var_b0 = arg3;
004279ad          uint8_t eax_10;
004279ad          class PStringBase<char> ecx_12;
004279ad          eax_10 = StringInfo::FromFileNode(&this->m_value, var_b0);
004279ad          
004279b4          if (eax_10 != 0)
004279b4              goto label_42797d;
004279b4          
004279b6          var_b0 = ecx_12;
004279be          PStringBase<char>::PStringBase<char>(&var_b0, "Error loading stringinfo!");
004279c4          PFileNode::ReportError(arg3, var_b0);
004279cd          void* __offset(PSRefBufferCharData<char>, -0x14) esi_6 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
004279d6          var_b0 = ((char*)esi_6 + 4);
004279d6          
004279df          if ((InterlockedDecrement(var_b0) == 0 && esi_6 != 0))
004279df          {
004279e1              int32_t edx_3 = *(int32_t*)((char*)ADJ(esi_6) + -0x14);
004279e3              var_b0 = 1;
004279e7              *(uint32_t*)edx_3(var_b0);
004279df          }
004278d7      }
004278d7      
004279ec      int32_t eax;
004279ec      eax = 0;
004279f5      return 0;
004278c0  }

004279f8                                                                          90 90 90 90 90 90 90 90                          ........

00427a00  uint8_t __thiscall StringInfoPropertyValue::ToFileNode(class StringInfoPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

00427a00  {
00427a08      if (arg3 == 0)
00427a08      {
00427a45          int32_t eax;
00427a45          eax = 0;
00427a48          return 0;
00427a08      }
00427a08      
00427a0d      class PFileNode* var_c = 1;
00427a11      uint8_t eax_1;
00427a11      class PFileNode* ecx_1;
00427a11      eax_1 = StringInfo::IsValid(&this->m_value, var_c);
00427a11      
00427a18      if (eax_1 != 0)
00427a18      {
00427a1a          var_c = arg3;
00427a1d          IInputActionCallback::OnAction(&this->m_value.m_strToken.m_charbuffer, var_c);
00427a22          int32_t eax_2;
00427a22          eax_2 = 1;
00427a26          return 1;
00427a18      }
00427a18      
00427a29      var_c = ecx_1;
00427a31      PStringBase<char>::PStringBase<char>(&var_c, "INVALID");
00427a38      PFileNode::MakeSubNodeAsPString(arg3, var_c);
00427a3d      class PFileNode* eax_3;
00427a3d      eax_3 = 1;
00427a41      return 1;
00427a00  }

00427a4b                                   90 90 90 90 90                                                             .....

00427a50  uint8_t __thiscall StringInfoPropertyValue::GetValueAsString(class StringInfoPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427a50  {
00427a5e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2;
00427a5e      void* __return;
00427a5e      
00427a5e      if (this->m_value.m_Override != 1)
00427a5e      {
00427b09          if (arg4 != 0)
00427b09          {
00427b0b              int32_t var_14_2 = 1;
00427b1f              __return = ArgumentParser::OnCommandLineEvaluationDone(this);
00427b2e              class PSRefBufferCharData<unsigned short>* m_charbuffer = StringInfo::GetString(&this->m_value, &arg4, 0)->m_charbuffer;
00427b35              PStringBase<char>::sprintf(arg3, &data_7975cc);
00427b3e              int32_t* esi_6 = (arg4 - 0x14);
00427b48              int32_t eax_10;
00427b48              class ArgumentParser* ecx_7;
00427b48              eax_10 = InterlockedDecrement(&esi_6[1]);
00427b48              
00427b54              if ((eax_10 == 0 && esi_6 != 0))
00427b5c                  ecx_7 = **(uint32_t**)esi_6(1);
00427b5c              
00427b62              void* __return_3 = __return;
00427b63              ArgumentParser::OnCommandLineEvaluationDone(ecx_7);
00427b6c              int32_t eax_12;
00427b6c              eax_12 = 1;
00427b72              return 1;
00427b09          }
00427b09          
00427b75          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00427b7a          int32_t ebp;
00427b7a          int32_t var_14_4 = ebp;
00427b81          PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00427b89          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00427b95          uint8_t eax_14;
00427b95          int32_t ebp_1;
00427b95          void* esi_7;
00427b95          eax_14 = StringInfo::InqStringTableFile(&this->m_value, &__return);
00427b95          
00427b9c          if (eax_14 == 0)
00427b9c          {
00427ba1              int32_t var_14_6 = *(uint32_t*)((char*)esi_7 + 0x10);
00427bac              PStringBase<char>::sprintf(&__return, "0x%08X");
00427b9c          }
00427b9c          
00427bb4          class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_value.m_strToken.m_charbuffer;
00427bb6          m_charbuffer_2 = m_charbuffer_1;
00427bbe          ebp_1(&m_charbuffer_1[-1]);
00427bbe          
00427bc9          if (*(uint32_t*)(arg4 - 4) == 1)
00427bc9          {
00427bce              int32_t var_14_8 = *(uint32_t*)((char*)esi_7 + 0xc);
00427bd9              PStringBase<char>::sprintf(&arg4, "0x%08x");
00427bc9          }
00427bc9          
00427bed          int32_t var_14_9 = arg4;
00427bee          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00427bf5          PStringBase<char>::sprintf(arg3, "%s:%s");
00427c04          int32_t* esi_9 = (arg4 - 0x14);
00427c04          
00427c16          if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
00427c1e              **(uint32_t**)esi_9(1);
00427c1e          
00427c24          void* esi_11 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00427c24          
00427c33          if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
00427c3b              **(uint32_t**)esi_11(1);
00427a5e      }
00427a5e      else
00427a5e      {
00427a6e          class PStringBase<unsigned short>* __return_1;
00427a6e          class PStringBase<unsigned short>* edx;
00427a6e          __return_1 = StringInfo::GetLiteralValue(&this->m_value, &__return, 0);
00427a73          class PStringBase<unsigned short>* __return_2 = __return_1;
00427a78          int32_t* var_18_1 = &PStringBase<char>::s_NullBuffer_2;
00427a79          PSUtils::narrowify(__return_1, edx);
00427a88          int32_t* esi_2 = ((char*)__return - 0x14);
00427a88          
00427a9a          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00427aa2              **(uint32_t**)esi_2(1);
00427aa2          
00427aa4          int32_t eax_1;
00427aa4          eax_1 = arg4;
00427aaa          class PStringBase<char>* var_1c_1;
00427aaa          void* const var_18_2;
00427aaa          
00427aaa          if (eax_1 == 0)
00427aaa          {
00427ac5              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_2;
00427ac6              var_18_2 = "Literal: %s";
00427acb              var_1c_1 = arg3;
00427aaa          }
00427aaa          else
00427aaa          {
00427ab4              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
00427ab5              var_18_2 = &data_7945ac;
00427aba              var_1c_1 = arg3;
00427aaa          }
00427aaa          
00427acc          PStringBase<char>::sprintf(var_1c_1, var_18_2);
00427ad5          int32_t* esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00427ad5          
00427aeb          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00427aeb          {
00427af7              **(uint32_t**)esi_4(1);
00427afa              int32_t eax_6;
00427afa              eax_6 = 1;
00427b00              return 1;
00427aeb          }
00427a5e      }
00427c3e      int32_t eax_4;
00427c3e      eax_4 = 1;
00427c44      return 1;
00427a50  }

00427c47                       90 90 90 90 90 90 90 90 90                                                         .........

00427c50  void __thiscall StringPropertyValue::Serialize(class StringPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00427c50  {
00427c58      PStringBase<char>::Serialize(&this->m_value, arg2);
00427c50  }


00427c60  uint8_t __thiscall StringTokenPropertyValue::GetValueAsString(class StringTokenPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427c60  {
00427c6b      uint32_t m_value = this->m_value;
00427c72      char* edx = PStringBase<char>::sprintf(arg3, "0x%08x");
00427c77      class PSRefBufferCharData<char>* m_charbuffer = this->m_tokenName.m_charbuffer;
00427c83      class PStringBase<char>* eax_1;
00427c83      
00427c83      if (m_charbuffer->m_data[-4] != 1)
00427c83      {
00427c85          eax_1 = arg4;
00427c85          
00427c8b          if (eax_1 == 0)
00427c8b          {
00427c8d              class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
00427c8e              char const* const var_10_1 = " <%s>";
00427c93              class PStringBase<char>* var_14_1 = arg3;
00427c94              PStringBase<char>::sprintf_append(eax_1, edx);
00427c8b          }
00427c83      }
00427c83      
00427c9d      eax_1 = 1;
00427ca0      return 1;
00427c60  }

00427ca3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00427cb0  uint8_t __thiscall TriStatePropertyValue::FromFileNode(class TriStatePropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00427cb0  {
00427cb3      class PFileNode* esi = arg3;
00427cb3      
00427cbc      if (esi == 0)
00427cbc      {
00427d9c          int32_t eax;
00427d9c          eax = 0;
00427d9f          return 0;
00427cbc      }
00427cbc      
00427cc2      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00427cc7      arg3 = PStringBase<char>::s_NullBuffer_1;
00427cce      class PStringBase<char> m_charbuffer = &PStringBase<char>::s_NullBuffer_1[-1];
00427ccf      int32_t ebx;
00427ccf      ebx = 1;
00427cd1      InterlockedIncrement(m_charbuffer);
00427cd9      class PFileNode* eax_2;
00427cd9      class PStringBase<char> m_charbuffer_1;
00427cd9      eax_2 = PFileNode::GetLeaf(esi);
00427ce0      uint8_t eax_3;
00427ce0      
00427ce0      if (eax_2 != 0)
00427ce0      {
00427ce6          m_charbuffer = &arg3;
00427ce9          eax_3 = PFileNode::GetNameAsPString(eax_2, m_charbuffer);
00427ce0      }
00427ce0      
00427cf0      char* var_18;
00427cf0      class PStringBase<char>* ecx_2;
00427cf0      
00427cf0      if ((eax_2 != 0 && eax_3 != 0))
00427cf0      {
00427d02          class PFileNode* eax_4 = arg3;
00427d0c          m_charbuffer = KW_TRUE.m_charbuffer;
00427d0c          
00427d15          if (_stricmp(eax_4, m_charbuffer) != 0)
00427d15          {
00427d26              class PFileNode* edx_2 = arg3;
00427d2a              m_charbuffer = KW_FALSE.m_charbuffer;
00427d2c              enum TriState eax_6 = _stricmp(edx_2, m_charbuffer);
00427d2c              
00427d33              if (eax_6 != False_TriState)
00427d33              {
00427d3f                  class PFileNode* ecx_4 = arg3;
00427d43                  m_charbuffer = KW_UNDEF.m_charbuffer;
00427d45                  int32_t eax_8;
00427d45                  class PStringBase<char> m_charbuffer_2;
00427d45                  eax_8 = _stricmp(ecx_4, m_charbuffer);
00427d45                  
00427d4c                  if (eax_8 != 0)
00427d4c                  {
00427d57                      m_charbuffer = m_charbuffer_2;
00427d58                      ecx_2 = &m_charbuffer;
00427d5a                      var_18 = "Unknown Keyword";
00427d5a                      goto label_427d5f;
00427d4c                  }
00427d4c                  
00427d4e                  this->m_value = Undef_TriState;
00427d33              }
00427d33              else
00427d35                  this->m_value = eax_6;
00427d15          }
00427d15          else
00427d17              this->m_value = True_TriState;
00427cf0      }
00427cf0      else
00427cf0      {
00427cf2          m_charbuffer = m_charbuffer_1;
00427cf3          ecx_2 = &m_charbuffer;
00427cf5          var_18 = "Expecting a leaf string node";
00427d5f      label_427d5f:
00427d5f          PStringBase<char>::PStringBase<char>(ecx_2, var_18);
00427d65          PFileNode::ReportError(esi, m_charbuffer);
00427d6d          ebx = 0;
00427cf0      }
00427d73      void* __offset(PFileNode, -0x14) esi_2 = ((char*)arg3 - 0x14);
00427d79      m_charbuffer = ((char*)esi_2 + 4);
00427d79      
00427d86      if ((InterlockedDecrement(m_charbuffer) == 0 && esi_2 != 0))
00427d86      {
00427d88          int32_t eax_10 = *(int32_t*)((char*)ADJ(esi_2) + -0x14);
00427d8a          m_charbuffer = 1;
00427d8e          *(uint32_t*)eax_10(m_charbuffer);
00427d86      }
00427d86      
00427d90      int32_t eax_9;
00427d90      eax_9 = ebx;
00427d96      return eax_9;
00427cb0  }

00427da2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00427db0  uint8_t __thiscall TimeStampPropertyValue::FromFileNode(class TimeStampPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

00427db0  {
00427dba      class PFileNode* eax;
00427dba      
00427dba      if (arg3 != 0)
00427dba      {
00427dbe          eax = PFileNode::GetLeaf(arg3);
00427dbe          
00427dc5          if (eax != 0)
00427dc5          {
00427dca              class PStringBase<char> var_c = &this->m_value;
00427dcd              class PStringBase<char> ecx_2;
00427dcd              eax = PFileNode::GetNameAsDouble(eax, var_c);
00427dcd              
00427dd4              if (eax != 0)
00427dd4              {
00427dd6                  long double x87_r7 = ((long double)this->m_value);
00427dd8                  long double temp1 = ((long double)-1.0);
00427dd8                  (x87_r7 - temp1);
00427dde                  eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00427de0                  bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00427de0                  
00427de3                  if (p)
00427de3                  {
00427de5                      var_c = ecx_2;
00427ded                      PStringBase<char>::PStringBase<char>(&var_c, "TimeStamp Properties are a runti…");
00427df3                      PFileNode::ReportError(arg3, var_c);
00427de3                  }
00427de3                  
00427dfb                  eax = 1;
00427dff                  return 1;
00427dd4              }
00427dc5          }
00427dba      }
00427dba      
00427e03      eax = 0;
00427e06      return 0;
00427db0  }

00427e09                             90 90 90 90 90 90 90                                                           .......

00427e10  uint8_t __thiscall PFileNode::GetNameAsDouble(class PFileNode const* this, double* arg2)

00427e10  {
00427e10      class PFileNode* this_1 = this;
00427e15      class IFileNodeName* m_pcName = this->m_pcName;
00427e18      int32_t ebx;
00427e18      ebx = 0;
00427e18      
00427e1c      if (m_pcName != 0)
00427e1c      {
00427e27          bool cond:0_1 = m_pcName->vtable->GetType() != 3;
00427e2a          class IFileNodeName* m_pcName_1 = this->m_pcName;
00427e2a          
00427e2d          if (!(cond:0_1))
00427e2d          {
00427e36              *(uint32_t*)arg2 = *(int32_t*)((char*)m_pcName_1 + 8);
00427e3c              *(uint32_t*)((char*)arg2 + 4) = *(int32_t*)((char*)m_pcName_1 + 0xc);
00427e3f              double* eax_3;
00427e3f              eax_3 = 1;
00427e43              return 1;
00427e2d          }
00427e2d          
00427e46          m_pcName_1->vtable->ToPString(&this_1);
00427e53          void* eax_4 = operator new(0x10);
00427e5d          class IFileNodeName* esi_1;
00427e5d          
00427e5d          if (eax_4 == 0)
00427e69              esi_1 = nullptr;
00427e5d          else
00427e5d          {
00427e5f              *(uint32_t*)eax_4 = 0x796e28;
00427e65              esi_1 = eax_4;
00427e5d          }
00427e5d          
00427e79          if (esi_1->vtable->FromPString(&this_1) == 0)
00427e9e              esi_1->vtable->__vecDelDtor(1);
00427e79          else
00427e79          {
00427e82              *(uint32_t*)arg2 = *(int32_t*)((char*)esi_1 + 8);
00427e87              *(uint32_t*)((char*)arg2 + 4) = *(int32_t*)((char*)esi_1 + 0xc);
00427e8a              class IFileNodeName* m_pcName_2 = this->m_pcName;
00427e8a              
00427e8f              if (m_pcName_2 != 0)
00427e91                  m_pcName_2->vtable->__vecDelDtor(1);
00427e91              
00427e97              this->m_pcName = esi_1;
00427e9a              ebx = 1;
00427e79          }
00427e79          
00427eaa          void* __offset(PFileNode, -0x14) esi_3 = ((char*)this_1 - 0x14);
00427eaa          
00427ebd          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00427ec5              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00427e1c      }
00427e1c      
00427ec9      int32_t eax;
00427ec9      eax = ebx;
00427ecd      return eax;
00427e10  }


00427ed0  uint8_t __thiscall TimeStampPropertyValue::GetValueAsString(class TimeStampPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427ed0  {
00427eda      int32_t var_4 = *(uint32_t*)((char*)this->m_value)[4];
00427edb      int32_t var_8 = this->m_value;
00427ee2      PStringBase<char>::sprintf(arg3, "%.3g");
00427eea      int32_t eax;
00427eea      eax = 1;
00427eec      return 1;
00427ed0  }

00427eef                                               90                                                                 .

00427ef0  uint8_t __thiscall VectorPropertyValue::GetValueAsString(class VectorPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

00427ef0  {
00427efa      double var_8 = ((double)((long double)this->m_value.z));
00427f01      double var_10 = ((double)((long double)this->m_value.y));
00427f08      double var_18 = ((double)((long double)this->m_value.x));
00427f11      PStringBase<char>::sprintf(arg3, "%.3f %.3f %.3f");
00427f19      int32_t eax_1;
00427f19      eax_1 = 1;
00427f1b      return 1;
00427ef0  }

00427f1e                                                                                            90 90                                ..

00427f20  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::grow(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* this)

00427f20  {
00427f20      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* m_numBuckets = this;
00427f22      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00427f2e      m_numBuckets = this->m_numBuckets;
00427f45      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00427f45      
00427f4f      if (eax_2 != bucketSizesEnd_1)
00427f58          eax_2 = &eax_2[1];
00427f4f      else
00427f4f      {
00427f51          eax_2 -= 4;
00427f51          
00427f56          if (eax_2 != bucketSizesEnd_1)
00427f58              eax_2 = &eax_2[1];
00427f4f      }
00427f4f      
00427f68      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00427f20  }

00427f69                             90 90 90 90 90 90 90                                                           .......

00427f70  class BasePropertyValue* __fastcall ArrayPropertyValue::Copy(class ArrayPropertyValue const* this)

00427f70  {
00427f75      void* eax = operator new(0x14);
00427f75      
00427f7f      if (eax == 0)
00427f91          return 0;
00427f91      
00427f8d      return ArrayPropertyValue::ArrayPropertyValue(eax, &this->m_value);
00427f70  }

00427f92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00427fa0  void __thiscall ArrayPropertyValue::ArrayPropertyValue(class ArrayPropertyValue* this, class SmartArray<BaseProperty,1> const* arg2)

00427fa0  {
00427fa8      this->m_cRef = 1;
00427faf      this->vtable = &ArrayPropertyValue::`vftable';
00427fa5      this->m_value.m_data = 0;
00427fa5      this->m_value.m_sizeAndDeallocate = 0;
00427fa5      this->m_value.m_num = 0;
00427fc2      SmartArray<BaseProperty,1>::operator=(&this->m_value, arg2);
00427fa0  }

00427fcd                                         90 90 90                                                               ...

00427fd0  void __thiscall ArrayPropertyValue::Serialize(class ArrayPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00427fd0  {
00427fd8      SmartArray<BaseProperty,1>::Serialize(&this->m_value, arg2);
00427fd0  }


00427fe0  void __thiscall SmartArray<BaseProperty,1>::Serialize(class SmartArray<BaseProperty,1>* this, class Archive* arg2)

00427fe0  {
00427fe9      uint32_t m_num = this->m_num;
00427ff0      Archive::CheckAlignment(arg2, 4);
00427ff9      uint8_t* eax = Archive::GetBytes(arg2, 4);
00427ff9      
00428000      if (eax != 0)
00428000      {
00428006          if ((arg2->m_flags & 1) == 0)
0042800c              m_num = *(uint32_t*)eax;
00428006          else
00428008              *(uint32_t*)eax = m_num;
00428000      }
00428000      
0042800e      eax = arg2->m_flags;
00428011      eax = !(eax);
00428011      
00428015      if ((eax & 1) != 0)
00428015      {
00428020          if (m_num > Archive::GetSizeLeft(arg2))
00428020          {
00428024              Archive::RaiseError(arg2);
0042802c              return;
00428020          }
00428020          
00428034          this->m_num = 0;
0042803b          SmartArray<BaseProperty,1>::SetNElements(this, m_num, 1);
00428015      }
00428015      
00428043      int32_t i = 0;
00428043      
00428047      if (this->m_num > 0)
00428047      {
00428061          do
00428061          {
00428056              BaseProperty::Serialize(&this->m_data[i], arg2);
0042805e              i += 1;
00428061          } while (i < this->m_num);
00428047      }
00427fe0  }

00428069                             90 90 90 90 90 90 90                                                           .......

00428070  uint8_t __thiscall SmartArray<BaseProperty,1>::SetNElements(class SmartArray<BaseProperty,1>* this, uint32_t const arg2, uint8_t arg3)

00428070  {
00428085      uint32_t eax_1;
00428085      
00428085      if ((this->m_sizeAndDeallocate & 0x7fffffff) < arg2)
00428085      {
00428087          eax_1 = arg3;
0042808d          uint32_t const eax_2;
0042808d          
0042808d          if (eax_1 == 0)
00428096              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
0042808d          else
0042808f              eax_2 = arg2;
0042808f          
0042809e          eax_1 = SmartArray<BaseProperty,1>::grow(this, eax_2);
0042809e          
004280a5          if (eax_1 == 0)
004280ac              return eax_1;
00428085      }
00428085      else if (arg2 < this->m_num)
004280b5      {
004280ba          uint32_t const i = arg2;
004280ba          
0042811f          do
0042811f          {
004280ca              int32_t* var_8 = nullptr;
004280ce              int32_t* var_4_1 = nullptr;
004280d2              BaseProperty::operator=(&this->m_data[i], &var_8);
004280d7              int32_t* eax_3 = var_8;
004280d7              
004280dd              if (eax_3 != 0)
004280dd              {
004280e7                  int32_t edx_3 = (eax_3[1] - 1);
004280e4                  eax_3[1] = edx_3;
004280e4                  
004280ec                  if (edx_3 == 0)
004280f2                      **(uint32_t**)eax_3(1);
004280f2                  
004280f4                  var_8 = nullptr;
004280dd              }
004280dd              
004280fe              if (var_4_1 != 0)
004280fe              {
00428108                  int32_t edx_5 = (var_4_1[1] - 1);
00428105                  var_4_1[1] = edx_5;
00428105                  
0042810d                  if (edx_5 == 0)
00428113                      **(uint32_t**)var_4_1(1);
00428113                  
00428115                  int32_t var_4_2 = 0;
004280fe              }
004280fe              
0042811c              i += 1;
0042811f          } while (i < this->m_num);
004280b5      }
004280b5      
00428123      this->m_num = arg2;
00428127      eax_1 = 1;
0042812d      return 1;
00428070  }


00428130  uint8_t __thiscall ArrayPropertyValue::SetArrayElement(class ArrayPropertyValue* this, uint32_t const arg2, class BaseProperty const* arg3)

00428130  {
00428134      uint32_t m_num = this->m_value.m_num;
00428134      
00428137      if (arg2 == m_num)
00428146          return SmartArray<BaseProperty,1>::AddToEnd(&this->m_value, arg3);
00428146      
00428149      if (arg2 >= m_num)
00428149      {
00428160          uint32_t const eax_3;
00428160          eax_3 = 0;
00428162          return 0;
00428149      }
00428149      
00428156      BaseProperty::operator=(&this->m_value.m_data[arg2], arg3);
0042815b      class BaseProperty* eax_2;
0042815b      eax_2 = 1;
0042815d      return 1;
00428130  }

00428165                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00428170  uint8_t __thiscall SmartArray<BaseProperty,1>::AddToEnd(class SmartArray<BaseProperty,1>* this, class BaseProperty const* arg2)

00428170  {
00428179      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00428179      
00428180      if (this->m_num >= eax_1)
00428180      {
0042818e          uint8_t result = SmartArray<BaseProperty,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
0042818e          
00428195          if (result == 0)
00428198              return result;
00428180      }
00428180      
004281a8      BaseProperty::operator=(&this->m_data[this->m_num], arg2);
004281ad      this->m_num += 1;
004281b0      class BaseProperty* eax_5;
004281b0      eax_5 = 1;
004281b3      return 1;
00428170  }

004281b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004281c0  class BasePropertyDesc* __thiscall MasterProperty::AccessPropertyDesc(class MasterProperty const* this, uint32_t arg2)

004281c0  {
004281df      for (int32_t* i = this->m_properties.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_properties.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
004281df      {
004281e3          if (*(uint32_t*)i == arg2)
004281e3          {
004281f5              if (i != 0)
004281fc                  return i[2];
004281fc              
004281f5              break;
004281e3          }
004281df      }
004281df      
004281f0      return 0;
004281c0  }

004281ff                                                                                               90                                 .

00428200  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BasePropertyDesc *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BasePropertyDesc *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BasePropertyDesc *> *,0>* this, uint32_t arg2)

00428200  {
0042820b      arg2 = arg2;
0042820f      uint8_t edx = ((int8_t)arg2);
00428213      this->m_buckets = nullptr;
00428216      this->m_firstInterestingBucket = nullptr;
00428219      this->m_numBuckets = 0;
0042821c      this->m_numElements = 0;
00428220      this->vtable = 0x7970c8;
00428226      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00428239      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00428239      
00428243      if (eax == bucketSizesEnd_1)
00428245          eax -= 4;
00428245      
00428248      uint32_t eax_1 = *(uint32_t*)eax;
0042824d      this->m_numBuckets = eax_1;
0042824d      
00428250      if (eax_1 > 0x17)
00428266          this->m_buckets = operator new[]((eax_1 << 2));
00428250      else
00428255          this->m_buckets = &this->m_aInplaceBuckets;
00428255      
0042826c      class HashTableData<unsigned long,BasePropertyDesc *>** m_buckets = this->m_buckets;
0042826f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00428275      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00428286      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00428200  }

0042828f                                               90                                                                 .

00428290  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* this, uint32_t arg2)

00428290  {
0042829b      arg2 = arg2;
0042829f      uint8_t edx = ((int8_t)arg2);
004282a3      this->m_buckets = nullptr;
004282a6      this->m_firstInterestingBucket = nullptr;
004282a9      this->m_numBuckets = 0;
004282ac      this->m_numElements = 0;
004282b0      this->vtable = 0x7970cc;
004282b6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004282c9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004282c9      
004282d3      if (eax == bucketSizesEnd_1)
004282d5          eax -= 4;
004282d5      
004282d8      uint32_t eax_1 = *(uint32_t*)eax;
004282dd      this->m_numBuckets = eax_1;
004282dd      
004282e0      if (eax_1 > 0x17)
004282f6          this->m_buckets = operator new[]((eax_1 << 2));
004282e0      else
004282e5          this->m_buckets = &this->m_aInplaceBuckets;
004282e5      
004282fc      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_buckets;
004282ff      uint32_t ecx_3 = (this->m_numBuckets << 2);
00428305      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00428316      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00428290  }

0042831f                                                                                               90                                 .

00428320  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::add_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* this, class HashTableData<unsigned long,BaseProperty>* arg2)

00428320  {
0042832e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
00428332          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::grow(this);
00428332      
00428345      class HashTableData<unsigned long,BaseProperty>** eax_4 = &this->m_buckets[(COMBINE(0, arg2->m_hashKey) % this->m_numBuckets)];
0042834a      arg2->m_hashNext = *(uint32_t*)eax_4;
0042834d      *(uint32_t*)eax_4 = arg2;
0042834d      
00428352      if (eax_4 < this->m_firstInterestingBucket)
00428354          this->m_firstInterestingBucket = eax_4;
00428354      
00428357      this->m_numElements += 1;
00428320  }

0042835e                                                                                            90 90                                ..

00428360  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* this, uint32_t arg2)

00428360  {
0042836d      if (arg2 == this->m_numBuckets)
0042836d      {
0042836f          uint32_t eax;
0042836f          eax = 0;
00428375          return 0;
0042836d      }
0042836d      
0042837d      int32_t* i_2 = nullptr;
0042837d      
00428381      while (this->m_numElements != 0)
00428381      {
0042838c          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00428391          int32_t** m_firstInterestingBucket_2;
00428391          int32_t* i_3;
00428391          
00428391          if (this->m_firstInterestingBucket == ecx_1)
00428391          {
004283a4          label_4283a4:
004283a4              m_firstInterestingBucket_2 = nullptr;
004283a6              i_3 = nullptr;
00428391          }
00428391          else
00428391          {
00428393              while (true)
00428393              {
00428393                  class HashTableData<unsigned long,BaseProperty>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00428393                  
00428398                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00428398                  {
004283aa                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004283ad                      i_3 = *(uint32_t*)m_firstInterestingBucket_1;
004283af                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004283af                      break;
00428398                  }
00428398                  
0042839f                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0042839f                  
004283a2                  if (&m_firstInterestingBucket[1] == ecx_1)
004283a2                      goto label_4283a4;
00428393              }
00428391          }
00428391          
004283b6          int32_t** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
004283bd          int32_t* i_4 = i_3;
004283c0          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, this);
004283c5          i_3[1] = i_2;
004283cb          i_2 = i_3;
00428381      }
00428381      
004283cf      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_buckets;
004283cf      
004283d7      if (m_buckets != &this->m_aInplaceBuckets)
004283da          operator delete[](m_buckets);
004283da      
004283e2      uint32_t edx_2 = arg2;
004283e9      this->m_buckets = nullptr;
004283ec      this->m_firstInterestingBucket = nullptr;
004283ef      this->m_numBuckets = 0;
004283f2      this->m_numElements = 0;
004283f5      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, edx_2);
004283fc      int32_t* i_1 = i_2;
004283fe      void** eax_4;
004283fe      
004283fe      if (i_2 != 0)
004283fe      {
00428476          int32_t* i;
00428476          
00428476          do
00428476          {
00428400              uint32_t m_numBuckets = this->m_numBuckets;
00428406              i = i_1[1];
00428406              
0042840f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0042840f              {
00428411                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00428417                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0042841f                  arg2 = m_numBuckets;
0042842f                  uint32_t* eax_6 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0042842f                  
00428439                  if (eax_6 != bucketSizesEnd_1)
00428442                      eax_6 = &eax_6[1];
00428439                  else
00428439                  {
0042843b                      eax_6 -= 4;
0042843b                      
00428440                      if (eax_6 != bucketSizesEnd_1)
00428442                          eax_6 = &eax_6[1];
00428439                  }
00428439                  
0042844a                  IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::resize_internal(this, *(uint32_t*)eax_6);
0042840f              }
0042840f              
00428459              eax_4 = &this->m_buckets[(COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets)];
0042845e              i_1[1] = *(uint32_t*)eax_4;
00428461              *(uint32_t*)eax_4 = i_1;
00428461              
00428466              if (eax_4 < this->m_firstInterestingBucket)
00428468                  this->m_firstInterestingBucket = eax_4;
00428468              
00428471              this->m_numElements += 1;
00428474              i_1 = i;
00428476          } while (i != 0);
004283fe      }
004283fe      
0042847b      eax_4 = 1;
0042847e      return 1;
00428360  }

00428481     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00428490  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>* this, uint32_t arg2)

00428490  {
00428495      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0042849c      arg2 = arg2;
004284b5      uint32_t* eax_1 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
004284b5      
004284bf      if (eax_1 == bucketSizesEnd_1)
004284c1          eax_1 -= 4;
004284c1      
004284d0      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::resize_internal(this, *(uint32_t*)eax_1);
00428490  }

004284d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004284e0  void __thiscall ArrayPropertyValue::push(class ArrayPropertyValue* this, class BaseProperty const* arg2)

004284e0  {
004284e3      /* tailcall */
004284e3      return SmartArray<BaseProperty,1>::AddToEnd(&this->m_value, arg2);
004284e0  }

004284e8                          90 90 90 90 90 90 90 90                                                          ........

004284f0  void __thiscall TimeStampPropertyValue::Serialize(class TimeStampPropertyValue* this, class Archive* arg2, uint32_t const arg3)

004284f0  {
004284f0      class TimeStampPropertyValue* this_1 = this;
004284f9      MasterPropertyGrabber::MasterPropertyGrabber(&this_1);
00428502      class TimeStampPropertyValue* this_2 = this_1;
00428519      int32_t* eax_3 = *(uint32_t*)(*(int32_t*)((char*)this_2 + 0x1b4) + ((COMBINE(0, arg3) % *(int32_t*)((char*)this_2 + 0x1bc)) << 2));
00428519      
0042851d      if (eax_3 == 0)
00428545          Archive::RaiseError(arg2);
0042851d      else
0042851d      {
00428522          while (*(uint32_t*)eax_3 != arg3)
00428522          {
00428524              eax_3 = eax_3[1];
00428524              
00428529              if (eax_3 == 0)
00428529              {
0042852f                  Archive::RaiseError(arg2);
00428534                  goto label_428581;
00428529              }
00428522          }
00428522          
00428538          if (eax_3 == 0)
00428545              Archive::RaiseError(arg2);
00428538          else
00428538          {
0042853a              void* eax_4 = eax_3[2];
0042853a              
0042853f              if (eax_4 != 0)
0042853f              {
0042854c                  uint32_t const ecx_1;
0042854c                  ecx_1 = *(uint8_t*)((char*)eax_4 + 0xb4);
0042854c                  
0042855b                  if (ecx_1 == 0)
0042855b                  {
00428575                      int32_t var_10_2 = *(int32_t*)((char*)Timer::cur_time + 4);
00428579                      Serializer::SerializeRelativeTime(&this->m_value, arg2, (*(uint32_t*)Timer::cur_time));
0042855b                  }
0042855b                  else
0042855f                      Serializer::SerializePrimitive(&this->m_value, arg2);
0042853f              }
0042853f              else
00428545                  Archive::RaiseError(arg2);
00428538          }
0042851d      }
0042851d      
00428581  label_428581:
00428581      
00428583      if (this_2 != 0)
00428585          this_2->vtable->operator-=();
004284f0  }

00428592                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004285a0  void Serializer::SerializeRelativeTime(double* arg1, class Archive* arg2, double arg3)

004285a0  {
004285b8      double var_10;
004285b8      
004285b8      if ((((int8_t)arg2->m_flags) & 5) == 1)
004285b8      {
004285bc          (((long double)*(uint64_t*)arg1) - ((long double)-1.0));
004285c4          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004285c4          
004285c7          if (p_1)
004285e0              var_10 = ((double)(((long double)*(uint64_t*)arg1) - ((long double)arg3)));
004285c7          else
004285c7          {
004285c9              var_10 = 0xe0000000;
004285d1              *(uint32_t*)((char*)var_10)[4] = 0x47efffff;
004285c7          }
004285b8      }
004285b8      
004285e8      Archive::CheckAlignment(arg2, 8);
004285f1      uint8_t* eax_1 = Archive::GetBytes(arg2, 8);
004285f1      
004285f8      if (eax_1 != 0)
004285f8      {
004285fe          if ((arg2->m_flags & 1) == 0)
004285fe          {
00428614              var_10 = *(uint32_t*)eax_1;
00428618              *(uint32_t*)((char*)var_10)[4] = *(uint32_t*)(eax_1 + 4);
004285fe          }
004285fe          else
004285fe          {
00428608              *(uint32_t*)eax_1 = var_10;
0042860a              *(uint32_t*)(eax_1 + 4) = *(uint32_t*)((char*)var_10)[4];
004285fe          }
004285f8      }
004285f8      
00428620      if ((arg2->m_flags & 5) == 0)
00428620      {
00428622          long double x87_r7_4 = ((long double)var_10);
00428626          long double temp1_1 = ((long double)3.4028234663852886e+38);
00428626          (x87_r7_4 - temp1_1);
0042862c          eax_1 = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0042862e          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0042862e          
00428631          if (!(p_2))
00428631          {
0042863e              *(uint32_t*)arg1 = 0f;
00428640              *(uint32_t*)((char*)arg1 + 4) = 0xbff00000;
00428648              return;
00428631          }
00428631          
00428650          *(uint64_t*)arg1 = ((double)(((long double)var_10) + ((long double)arg3)));
00428620      }
004285a0  }

00428658                                                                          90 90 90 90 90 90 90 90                          ........

00428660  void ?SerializeIntrusiveHashTable@?$@PAVMasterProperty@@V?$IntrusiveHashTable@KPAV?$HashTableData@KPAVBasePropertyDesc@@@@$0A@@@PAV?$HashTableData@KPAVBasePropertyDesc@@@@USB_HashData@?$SB_Hash@USB_Default@@U?$SB_Alloc@USB_DefaultAllocator@@$0A@USB_Default@@@@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABQAVMasterProperty@@AAV?$IntrusiveHashTable@KPAV?$HashTableData@KPAVBasePropertyDesc@@@@$0A@@@AAVArchive@@@Z(class MasterProperty** arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BasePropertyDesc *> *,0>* arg2, class Archive* arg3)

00428660  {
00428666      class Archive* esi = arg3;
00428666      
00428672      if ((!(esi->m_flags) & 1) != 0)
00428678          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
00428678      
00428686      int32_t ebx;
00428686      
00428686      if ((((int8_t)esi->m_flags) & 5) != 1)
004286c5          ebx = arg3;
00428686      else
00428686      {
0042868f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00428695          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0042869d          arg3 = arg2->m_numBuckets;
004286ad          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
004286ad          
004286b7          if (eax_2 == bucketSizesEnd_1)
004286b9              eax_2 -= 4;
004286b9          
004286c0          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
00428686      }
00428686      
004286cd      Archive::CheckAlignment(esi, 1);
004286d6      uint8_t* eax_3 = Archive::GetBytes(esi, 1);
004286d6      
004286dd      if (eax_3 != 0)
004286dd      {
004286e3          if ((esi->m_flags & 1) == 0)
004286e9              ebx = *(uint8_t*)eax_3;
004286e3          else
004286e5              *(uint8_t*)eax_3 = ebx;
004286dd      }
004286dd      
004286ef      if ((esi->m_flags & 5) == 0)
004286ef      {
004286f7          uint32_t eax_4 = ((uint32_t)ebx);
004286f7          
004286fc          if (eax_4 < 0x17)
00428715              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
004286fc          else
00428700              Archive::RaiseError(esi);
004286ef      }
004286ef      
00428721      if ((((int8_t)esi->m_flags) & 5) == 1)
0042872a          arg3 = arg2->m_numElements;
0042872a      
00428739      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
00428739      
0042874a      if ((((int8_t)esi->m_flags) & 5) == 1)
0042874a      {
00428759          void __return;
00428759          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0042875e          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
00428760          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
00428763          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
00428763          
00428768          while (i != 0)
00428768          {
004287e2              do
004287e2              {
00428772                  Archive::CheckAlignment(esi, 4);
0042877b                  uint8_t* eax_7;
0042877b                  uint32_t ecx_13;
0042877b                  eax_7 = Archive::GetBytes(esi, 4);
0042877b                  
00428782                  if (eax_7 != 0)
00428782                  {
00428788                      if ((esi->m_flags & 1) == 0)
00428792                          i->m_hashKey = *(uint32_t*)eax_7;
00428788                      else
0042878c                          *(uint32_t*)eax_7 = i->m_hashKey;
00428782                  }
00428782                  
0042879c                  if ((((int8_t)(esi->m_flags >> 2)) & 1) == 0)
0042879c                  {
0042879e                      ecx_13 = esi->m_flags;
004287a1                      ecx_13 = !(ecx_13);
004287a1                      
004287a6                      if ((ecx_13 & 1) != 0)
004287a6                      {
004287ad                          void* eax_10 = operator new(0xcc);
004287b7                          class DBOCache* eax_11;
004287b7                          
004287b7                          if (eax_10 == 0)
004287c2                              eax_11 = nullptr;
004287b7                          else
004287bb                              eax_11 = BasePropertyDesc::BasePropertyDesc(eax_10);
004287bb                          
004287c4                          i->m_data = eax_11;
004287a6                      }
004287a6                      
004287c7                      class BasePropertyDesc* m_data = i->m_data;
004287c7                      
004287cc                      if (m_data != 0)
004287d8                          BasePropertyDesc::Serialize(m_data, esi);
004287cc                      else
004287d0                          Archive::RaiseError(esi);
0042879c                  }
0042879c                  
004287dd                  i = i->m_hashNext;
004287e2              } while (i != 0);
004287e2              
004287f0              while (true)
004287f0              {
004287f0                  m_currBucket = &m_currBucket[1];
004287f0                  
004287f5                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004287f5                      break;
004287f5                  
004287fb                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
004287fb                  
004287ff                  if (i_1 != 0)
004287ff                  {
00428801                      i = i_1;
00428803                      break;
004287ff                  }
004287f0              }
00428768          }
0042874a      }
0042874a      
0042880c      if ((esi->m_flags & 5) == 0)
0042880c      {
00428814          uint32_t eax_14 = Archive::GetSizeLeft(esi);
00428819          class Archive* ecx_17 = arg3;
00428819          
0042881f          if (ecx_17 > eax_14)
004288e8              Archive::RaiseError(esi);
0042881f          else
0042881f          {
00428825              void* ebx_3 = nullptr;
00428827              int32_t ebp_1 = 0;
00428827              
0042882b              if (ecx_17 > 0)
0042882b              {
00428833                  while (true)
00428833                  {
00428833                      void* eax_15 = operator new(0xc);
00428838                      void* edi_1 = nullptr;
00428838                      
0042883f                      if (eax_15 != 0)
0042883f                      {
00428841                          *(uint32_t*)((char*)eax_15 + 4) = 0;
00428844                          edi_1 = eax_15;
0042883f                      }
0042883f                      
0042884a                      Archive::CheckAlignment(esi, 4);
00428853                      uint8_t* eax_16;
00428853                      int32_t ecx_20;
00428853                      eax_16 = Archive::GetBytes(esi, 4);
00428853                      
0042885a                      if (eax_16 != 0)
0042885a                      {
00428860                          if ((esi->m_flags & 1) == 0)
0042886a                              *(uint32_t*)edi_1 = *(uint32_t*)eax_16;
00428860                          else
00428864                              *(uint32_t*)eax_16 = *(uint32_t*)edi_1;
0042885a                      }
0042885a                      
00428874                      if ((((int8_t)(esi->m_flags >> 2)) & 1) == 0)
00428874                      {
00428876                          ecx_20 = esi->m_flags;
00428879                          ecx_20 = !(ecx_20);
00428879                          
0042887e                          if ((ecx_20 & 1) != 0)
0042887e                          {
00428885                              void* eax_19 = operator new(0xcc);
0042888f                              int32_t eax_20;
0042888f                              
0042888f                              if (eax_19 == 0)
0042889a                                  eax_20 = 0;
0042888f                              else
00428893                                  eax_20 = BasePropertyDesc::BasePropertyDesc(eax_19);
00428893                              
0042889c                              *(uint32_t*)((char*)edi_1 + 8) = eax_20;
0042887e                          }
0042887e                          
0042889f                          class BasePropertyDesc* ecx_22 = *(uint32_t*)((char*)edi_1 + 8);
0042889f                          
004288a4                          if (ecx_22 != 0)
004288b0                              BasePropertyDesc::Serialize(ecx_22, esi);
004288a4                          else
004288a8                              Archive::RaiseError(esi);
00428874                      }
00428874                      
004288be                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
004288f4                          return;
004288f4                      
004288cd                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebx_3) == 0)
004288cd                          break;
004288cd                      
004288d3                      ebp_1 += 1;
004288d6                      ebx_3 = edi_1;
004288d6                      
004288d8                      if (ebp_1 >= arg3)
004288e5                          return;
00428833                  }
00428833                  
004288e8                  Archive::RaiseError(esi);
0042882b              }
0042881f          }
0042880c      }
00428660  }

004288f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00428900  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, class IntrusiveHashIterator<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1> arg2)

00428900  {
00428901      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* m_currElement = arg2.m_currElement;
00428906      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_currBucket = arg2.m_currBucket;
0042890a      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* m_hashNext = *(uint32_t*)m_currBucket;
0042890a      
0042890e      if (m_hashNext != m_currElement)
0042890e      {
00428917          struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* m_hashNext_1;
00428917          
00428917          do
00428917          {
00428910              m_hashNext_1 = m_hashNext;
00428912              m_hashNext = m_hashNext->m_hashNext;
00428917          } while (m_hashNext != m_currElement);
00428917          
0042891b          if (m_hashNext_1 != 0)
0042891b          {
00428931              m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
00428939              this->m_numElements -= 1;
0042893d              return;
0042891b          }
0042890e      }
0042890e      
00428920      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00428927      this->m_numElements -= 1;
00428900  }


00428940  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* this)

00428940  {
0042894b      while (this->m_numElements != 0)
0042894b      {
00428958          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0042895e          class HashTableData<unsigned long,BaseProperty>** m_firstInterestingBucket_2;
0042895e          void* esi_1;
0042895e          
0042895e          if (this->m_firstInterestingBucket == ecx_1)
0042895e          {
00428971          label_428971:
00428971              m_firstInterestingBucket_2 = nullptr;
00428973              esi_1 = nullptr;
0042895e          }
0042895e          else
0042895e          {
00428960              while (true)
00428960              {
00428960                  class HashTableData<unsigned long,BaseProperty>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00428960                  
00428965                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00428965                  {
00428977                      class HashTableData<unsigned long,BaseProperty>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0042897a                      esi_1 = *(uint32_t*)m_firstInterestingBucket_1;
0042897c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0042897c                      break;
00428965                  }
00428965                  
0042896c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0042896c                  
0042896f                  if (&m_firstInterestingBucket[1] == ecx_1)
0042896f                      goto label_428971;
00428960              }
0042895e          }
0042895e          
0042897e          class HashTableData<unsigned long,BaseProperty>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0042897e          
00428982          if (m_hashNext == esi_1)
00428994              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00428982          else
00428982          {
0042898b              class HashTableData<unsigned long,BaseProperty>* m_hashNext_1;
0042898b              
0042898b              do
0042898b              {
00428984                  m_hashNext_1 = m_hashNext;
00428986                  m_hashNext = m_hashNext->m_hashNext;
0042898b              } while (m_hashNext != esi_1);
0042898b              
0042898f              if (m_hashNext_1 != 0)
0042899b                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0042898f              else
00428994                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00428982          }
00428982          
004289a4          this->m_numElements -= 1;
004289a4          
004289a7          if (esi_1 != 0)
004289a7          {
004289a9              int32_t* ecx_4 = *(uint32_t*)((char*)esi_1 + 8);
004289a9              
004289ae              if (ecx_4 != 0)
004289ae              {
004289b0                  int32_t temp0_1 = ecx_4[1];
004289b0                  ecx_4[1] -= 1;
004289b0                  
004289b3                  if (temp0_1 == 1)
004289b9                      **(uint32_t**)ecx_4(1);
004289b9                  
004289bb                  *(uint32_t*)((char*)esi_1 + 8) = 0;
004289ae              }
004289ae              
004289be              int32_t* ecx_5 = *(uint32_t*)((char*)esi_1 + 0xc);
004289be              
004289c3              if (ecx_5 != 0)
004289c3              {
004289c5                  int32_t temp1_1 = ecx_5[1];
004289c5                  ecx_5[1] -= 1;
004289c5                  
004289c8                  if (temp1_1 == 1)
004289ce                      **(uint32_t**)ecx_5(1);
004289ce                  
004289d0                  *(uint32_t*)((char*)esi_1 + 0xc) = 0;
004289c3              }
004289c3              
004289d4              operator delete(esi_1);
004289a7          }
0042894b      }
00428940  }

004289e9                             90 90 90 90 90 90 90                                                           .......

004289f0  uint8_t __thiscall MasterProperty::CopyInto(class MasterProperty const* this, class DBObj* arg2)

004289f0  {
00428a02      void __return;
00428a02      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_properties.m_intrusiveTable, &__return);
00428a07      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
00428a0c      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00428a0e      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00428a0e      
00428a15      if (i_1 != 0)
00428a15      {
00428a17          while (true)
00428a17          {
00428a17              class DBOCache* m_data = i_1->m_data;
00428a1c              uint32_t m_hashKey = i_1->m_hashKey;
00428a1c              
00428a1e              if (m_data != 0)
00428a1e              {
00428a26                  m_data->m_ObjTable.vtable = (&m_data->m_ObjTable.vtable->__vecDelDtor + 1);
00428a29                  uint32_t* eax_1 = operator new(0xc);
00428a33                  uint32_t* esi_1;
00428a33                  
00428a33                  if (eax_1 == 0)
00428a45                      esi_1 = nullptr;
00428a33                  else
00428a33                  {
00428a35                      eax_1[2] = m_data;
00428a38                      *(uint32_t*)eax_1 = m_hashKey;
00428a3a                      eax_1[1] = 0;
00428a41                      esi_1 = eax_1;
00428a33                  }
00428a33                  
00428a5d                  if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(((char*)arg2 + 0x154), esi_1) == 0 && esi_1 != 0))
00428a60                      operator delete(esi_1);
00428a1e              }
00428a1e              
00428a68              i_1 = i_1->m_hashNext;
00428a68              
00428a6d              if (i_1 == 0)
00428a6d              {
00428a8b                  class HashTableData<unsigned long,DBOCache *>* i;
00428a8b                  
00428a8b                  do
00428a8b                  {
00428a80                      m_currBucket = &m_currBucket[1];
00428a80                      
00428a85                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00428a85                          goto label_428a96;
00428a85                      
00428a87                      i = *(uint32_t*)m_currBucket;
00428a8b                  } while (i == 0);
00428a8b                  
00428a8d                  i_1 = i;
00428a8d                  
00428a91                  if (i_1 == 0)
00428a91                      break;
00428a6d              }
00428a17          }
00428a15      }
00428a15      
00428a96  label_428a96:
00428a96      eax = 1;
00428a9c      return 1;
004289f0  }

00428a9f                                                                                               90                                 .

00428aa0  void __fastcall MasterProperty::Destroy(class MasterProperty* this)

00428aa0  {
00428aa8      this->m_emapper.vtable->Destroy();
00428abf      void __return;
00428abf      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_1 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_properties.m_intrusiveTable, &__return);
00428ac4      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_1->m_currElement;
00428ac9      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_1->m_currHashTable;
00428acb      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_1->m_currBucket;
00428acb      
00428ace      if (i_1 != 0)
00428ace      {
00428ad0          while (true)
00428ad0          {
00428ad0              class DBOCache* m_data = i_1->m_data;
00428ad0              
00428ad5              if (m_data != 0)
00428ad5              {
00428ad7                  m_data->m_ObjTable.vtable -= 1;
00428ad7                  
00428ada                  if (m_data->m_ObjTable.vtable == 1)
00428adc                      m_data->vtable->__vecDelDtor(1);
00428ad5              }
00428ad5              
00428ae2              i_1 = i_1->m_hashNext;
00428ae2              
00428ae7              if (i_1 == 0)
00428ae7              {
00428afd                  class HashTableData<unsigned long,DBOCache *>* i;
00428afd                  
00428afd                  do
00428afd                  {
00428af2                      m_currBucket = &m_currBucket[1];
00428af2                      
00428af7                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00428af7                          goto label_428b07;
00428af7                      
00428af9                      i = *(uint32_t*)m_currBucket;
00428afd                  } while (i == 0);
00428afd                  
00428aff                  i_1 = i;
00428aff                  
00428b03                  if (i_1 == 0)
00428b03                      break;
00428ae7              }
00428ad0          }
00428ace      }
00428ace      
00428b07  label_428b07:
00428b07      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_properties.m_intrusiveTable);
00428aa0  }

00428b14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00428b20  void* __thiscall HashTable<unsigned long,BasePropertyDesc *,0>::`scalar deleting destructor'(class HashTable<unsigned long,BasePropertyDesc *,0>* this, uint32_t arg2)

00428b20  {
00428b29      this->vtable = 0x7976a0;
00428b2f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00428b34      class HashTableData<unsigned long,BasePropertyDesc *>** m_buckets = this->m_intrusiveTable.m_buckets;
00428b24      this->m_intrusiveTable.vtable = 0x7970c8;
00428b24      
00428b42      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00428b45          operator delete[](m_buckets);
00428b45      
00428b24      this->m_intrusiveTable.m_buckets = nullptr;
00428b24      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00428b24      this->m_intrusiveTable.m_numBuckets = 0;
00428b24      this->m_intrusiveTable.m_numElements = 0;
00428b24      
00428b60      if ((arg2 & 1) != 0)
00428b63          operator delete(this);
00428b63      
00428b6f      return this;
00428b20  }

00428b72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00428b80  uint32_t MasterProperty::GetDBOType(class MasterProperty const* this @ ecx) __pure

00428b80  {
00428b85      return 0x2d;
00428b80  }

00428b86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00428b90  void __fastcall MasterProperty::~MasterProperty(class MasterProperty* this)

00428b90  {
00428b94      this->vtable = 0x7976a8;
00428b9a      MasterProperty::Destroy(this);
00428ba7      this->m_properties.vtable = 0x7976a0;
00428bb1      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_properties.m_intrusiveTable);
00428bb6      class HashTableData<unsigned long,BasePropertyDesc *>** m_buckets = this->m_properties.m_intrusiveTable.m_buckets;
00428b9f      this->m_properties.m_intrusiveTable.vtable = 0x7970c8;
00428b9f      
00428bc4      if (m_buckets != &this->m_properties.m_intrusiveTable.m_aInplaceBuckets)
00428bc7          operator delete[](m_buckets);
00428bc7      
00428b9f      this->m_properties.m_intrusiveTable.m_buckets = nullptr;
00428b9f      this->m_properties.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00428b9f      this->m_properties.m_intrusiveTable.m_numBuckets = 0;
00428b9f      this->m_properties.m_intrusiveTable.m_numElements = 0;
00428be0      EnumMapper::~EnumMapper(&this->m_emapper);
00428be9      /* tailcall */
00428be9      return DBObj::~DBObj(this);
00428b90  }

00428bee                                            90 90                                                                ..

00428bf0  void __thiscall MasterProperty::Serialize(class MasterProperty* this, class Archive* arg2)

00428bf0  {
00428bf2      class Archive* edi = arg2;
00428bf9      DBObj::Serialize(this, edi);
00428bfe      this->m_emapper.vtable->Serialize(edi);
00428bfe      
00428c10      if ((!(edi->m_flags) & 1) != 0)
00428c18          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_properties.m_intrusiveTable);
00428c18      
00428c2a      ?SerializeIntrusiveHashTable@?$@PAVMasterProperty@@V?$IntrusiveHashTable@KPAV?$HashTableData@KPAVBasePropertyDesc@@@@$0A@@@PAV?$HashTableData@KPAVBasePropertyDesc@@@@USB_HashData@?$SB_Hash@USB_Default@@U?$SB_Alloc@USB_DefaultAllocator@@$0A@USB_Default@@@@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABQAVMasterProperty@@AAV?$IntrusiveHashTable@KPAV?$HashTableData@KPAVBasePropertyDesc@@@@$0A@@@AAVArchive@@@Z(&arg2, &this->m_properties.m_intrusiveTable, edi);
00428bf0  }

00428c37                                                                       90 90 90 90 90 90 90 90 90                         .........

00428c40  class DBObj* MasterProperty::Allocate(class MasterProperty const* this @ ecx)

00428c40  {
00428c40      /* tailcall */
00428c40      return MasterProperty::Allocator();
00428c40  }

00428c45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00428c50  class DBObj* MasterProperty::Allocator()

00428c50  {
00428c56      void* result = operator new(0x1c8);
00428c56      
00428c62      if (result == 0)
00428c9d          return 0;
00428c9d      
00428c6c      DBObj::DBObj(result, INVALID_DID.id);
00428c74      *(uint32_t*)result = 0x7976a8;
00428c7a      EnumMapper::EnumMapper(((char*)result + 0x30));
00428c87      *(uint32_t*)((char*)result + 0x150) = 0x7976a0;
00428c91      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BasePropertyDesc *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BasePropertyDesc *> *,0>(((char*)result + 0x154), 0x17);
00428c99      return result;
00428c50  }

00428c9e                                                                                            90 90                                ..

00428ca0  void __fastcall AutoGrowHashTable<unsigned long,BaseProperty>::~AutoGrowHashTable<unsigned long,BaseProperty>(class AutoGrowHashTable<unsigned long,BaseProperty>* this)

00428ca0  {
00428ca4      this->vtable = 0x797700;
00428cac      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::delete_contents(&this->m_intrusiveTable);
00428cb1      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_intrusiveTable.m_buckets;
00428ca1      this->m_intrusiveTable.vtable = 0x7970cc;
00428ca1      
00428cbf      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00428cc2          operator delete[](m_buckets);
00428cc2      
00428ca1      this->m_intrusiveTable.m_buckets = nullptr;
00428ca1      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00428ca1      this->m_intrusiveTable.m_numBuckets = 0;
00428ca1      this->m_intrusiveTable.m_numElements = 0;
00428ca0  }

00428cda                                                                                90 90 90 90 90 90                            ......

00428ce0  void* __thiscall MasterProperty::`scalar deleting destructor'(class MasterProperty* this, uint32_t arg2)

00428ce0  {
00428ce3      MasterProperty::~MasterProperty(this);
00428ce3      
00428ced      if ((arg2 & 1) != 0)
00428cf0          operator delete(this);
00428cf0      
00428cfb      return this;
00428ce0  }

00428cfe                                                                                            90 90                                ..

00428d00  void* __thiscall AutoGrowHashTable<unsigned long,BaseProperty>::`scalar deleting destructor'(class AutoGrowHashTable<unsigned long,BaseProperty>* this, uint32_t arg2)

00428d00  {
00428d09      this->vtable = 0x797700;
00428d0f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::delete_contents(&this->m_intrusiveTable);
00428d14      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_intrusiveTable.m_buckets;
00428d04      this->m_intrusiveTable.vtable = 0x7970cc;
00428d04      
00428d22      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00428d25          operator delete[](m_buckets);
00428d25      
00428d04      this->m_intrusiveTable.m_buckets = nullptr;
00428d04      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00428d04      this->m_intrusiveTable.m_numBuckets = 0;
00428d04      this->m_intrusiveTable.m_numElements = 0;
00428d04      
00428d40      if ((arg2 & 1) != 0)
00428d43          operator delete(this);
00428d43      
00428d4f      return this;
00428d00  }

00428d52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00428d60  void __fastcall StructPropertyValue::StructPropertyValue(class StructPropertyValue* this)

00428d60  {
00428d63      this->m_cRef = 1;
00428d6a      this->vtable = 0x797708;
00428d75      this->m_value.vtable = 0x797700;
00428d7c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&this->m_value.m_intrusiveTable, 0);
00428d81      this->m_value.vtable = 0x797700;
00428d60  }

00428d8c                                      90 90 90 90                                                              ....

00428d90  uint8_t __thiscall StructPropertyValue::InqStructElement(class StructPropertyValue const* this, uint32_t arg2, class BaseProperty* arg3)

00428d90  {
00428da2      return HashTable<unsigned long,BaseProperty,1>::lookup(&this->m_value.vtable, &arg2, arg3);
00428d90  }

00428da5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00428db0  uint8_t __thiscall HashTable<unsigned long,BaseProperty,1>::lookup(class HashTable<unsigned long,BaseProperty,1> const* this, uint32_t const* arg2, class BaseProperty* arg3)

00428db0  {
00428dc0      void __return;
00428dc0      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::find_internal(&this->m_intrusiveTable, &__return, arg2);
00428dcb      void* var_4;
00428dcb      
00428dcb      if (var_4 == 0)
00428dcb      {
00428de2          void* eax;
00428de2          eax = 0;
00428de7          return 0;
00428dcb      }
00428dcb      
00428dd5      BaseProperty::operator=(arg3, ((char*)var_4 + 8));
00428dda      class BaseProperty* eax_2;
00428dda      eax_2 = 1;
00428ddf      return 1;
00428db0  }

00428dea                                90 90 90 90 90 90                                                            ......

00428df0  class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::find_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1> const* this, class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* __return, uint32_t const* arg3)

00428df0  {
00428df5      uint32_t const i = *(uint32_t*)arg3;
00428e02      void* edi = &this->m_buckets[(COMBINE(0, i) % this->m_numBuckets)];
00428e05      int32_t* edx_2 = *(uint32_t*)edi;
00428e05      
00428e09      if (edx_2 != 0)
00428e09      {
00428e12          while (*(uint32_t*)edx_2 != i)
00428e12          {
00428e14              edx_2 = edx_2[1];
00428e14              
00428e19              if (edx_2 == 0)
00428e19                  break;
00428e12          }
00428e09      }
00428e09      
00428e1b      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>** result = __return;
00428e1f      result[1] = edi;
00428e23      *(uint32_t*)result = this;
00428e25      result[2] = edx_2;
00428e29      return result;
00428df0  }

00428e0d                                         8d 49 00                                                               .I.
00428e2c                                      90 90 90 90                                                              ....

00428e30  class BaseProperty const* __fastcall StructPropertyValue::GetStructElement(class StructPropertyValue const* this, uint32_t const arg2)

00428e30  {
00428e40      void __return;
00428e40      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::find_internal(&this->m_value.m_intrusiveTable, &__return, &arg2);
00428e4b      int32_t var_4;
00428e4b      
00428e4b      if (var_4 == 0)
00428e5b          return 0;
00428e5b      
00428e53      return (var_4 + 8);
00428e30  }

00428e5e                                                                                            90 90                                ..

00428e60  uint8_t __thiscall StructPropertyValue::SetStructElement(class StructPropertyValue* this, uint32_t arg2, class BaseProperty const* arg3)

00428e60  {
00428e72      return HashTable<unsigned long,BaseProperty,1>::set(&this->m_value.vtable, &arg2, arg3);
00428e60  }

00428e75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00428e80  uint8_t __thiscall HashTable<unsigned long,BaseProperty,1>::set(class HashTable<unsigned long,BaseProperty,1>* this, uint32_t const* arg2, class BaseProperty const* arg3)

00428e80  {
00428e94      void __return;
00428e94      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::find_internal(&this->m_intrusiveTable, &__return, arg2);
00428e9f      void* var_4;
00428e9f      
00428e9f      if (var_4 != 0)
00428e9f      {
00428ea9          BaseProperty::operator=(((char*)var_4 + 8), arg3);
00428eaf          class BaseProperty* eax_1;
00428eaf          eax_1 = 1;
00428eb5          return 1;
00428e9f      }
00428e9f      
00428ec0      uint32_t* esi = operator new(0x10);
00428ec0      
00428ec7      if (esi == 0)
00428ef0          esi = nullptr;
00428ec7      else
00428ec7      {
00428ed2          *(uint32_t*)esi = *(uint32_t*)arg2;
00428ed4          esi[1] = 0;
00428ecf          esi[2] = 0;
00428ecf          esi[3] = 0;
00428ee9          BaseProperty::operator=(&esi[2], arg3);
00428ec7      }
00428ec7      
00428efa      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::find_internal(&this->m_intrusiveTable, &__return, esi);
00428efa      
00428f05      if (var_4 == 0)
00428f0a          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::add_internal(&this->m_intrusiveTable, esi);
00428f0a      
00428f11      void* eax_4;
00428f11      eax_4 = 1;
00428f17      return 1;
00428e80  }

00428f1a                                                                                90 90 90 90 90 90                            ......

00428f20  uint8_t __fastcall StructPropertyValue::RemoveStructElement(class StructPropertyValue* this, uint32_t arg2)

00428f20  {
00428f2d      return HashTable<unsigned long,BaseProperty,1>::erase(&this->m_value.vtable, &arg2);
00428f20  }


00428f30  uint8_t __thiscall HashTable<unsigned long,BaseProperty,1>::erase(class HashTable<unsigned long,BaseProperty,1>* this, uint32_t const* arg2)

00428f30  {
00428f39      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_intrusiveTable, arg2);
00428f39      
00428f42      if (eax == 0)
00428f42      {
00428f85          eax = 0;
00428f88          return 0;
00428f42      }
00428f42      
00428f44      class DLListData* dllist_next = eax->dllist_next;
00428f44      
00428f49      if (dllist_next != 0)
00428f49      {
00428f4b          class DLListData* dllist_prev_1 = dllist_next->dllist_prev;
00428f4b          dllist_next->dllist_prev -= 1;
00428f4b          
00428f4e          if (dllist_prev_1 == 1)
00428f50              dllist_next->dllist_next->dllist_next(1);
00428f50          
00428f56          eax->dllist_next = nullptr;
00428f49      }
00428f49      
00428f5d      class DLListData* dllist_prev = eax->dllist_prev;
00428f5d      
00428f62      if (dllist_prev != 0)
00428f62      {
00428f64          class DLListData* dllist_prev_2 = dllist_prev->dllist_prev;
00428f64          dllist_prev->dllist_prev -= 1;
00428f64          
00428f67          if (dllist_prev_2 == 1)
00428f69              dllist_prev->dllist_next->dllist_next(1);
00428f69          
00428f6f          eax->dllist_prev = nullptr;
00428f62      }
00428f62      
00428f77      operator delete(eax);
00428f7f      int32_t eax_2;
00428f7f      eax_2 = 1;
00428f82      return 1;
00428f30  }

00428f8b                                   90 90 90 90 90                                                             .....

00428f90  void* __thiscall StructPropertyValue::`scalar deleting destructor'(class StructPropertyValue* this, uint32_t arg2)

00428f90  {
00428f96      this->vtable = 0x797708;
00428f9c      AutoGrowHashTable<unsigned long,BaseProperty>::~AutoGrowHashTable<unsigned long,BaseProperty>(&this->m_value);
00428fa6      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00428fa6      
00428fac      if ((arg2 & 1) != 0)
00428faf          operator delete(this);
00428faf      
00428fba      return this;
00428f90  }

00428fbd                                                                                         90 90 90                               ...

00428fc0  uint8_t __thiscall StructPropertyValue::SetValue(class StructPropertyValue* this, class BasePropertyValue const* arg2)

00428fc0  {
00428fc9      void* eax_1 = arg2->vtable->GetHash();
00428fc9      
00428fd1      if (eax_1 == 0)
00428fd1      {
00428fe2          eax_1 = 0;
00428fe5          return 0;
00428fd1      }
00428fd1      
00428fd7      HashTable<unsigned long,BaseProperty,1>::operator=(&this->m_value, eax_1);
00428fdc      void* eax_2;
00428fdc      eax_2 = 1;
00428fdf      return 1;
00428fc0  }

00428fe8                          90 90 90 90 90 90 90 90                                                          ........

00428ff0  void* __thiscall HashTable<unsigned long,BaseProperty,1>::operator=(void* arg1, void* arg2)

00428ff0  {
00429000      if (arg1 == arg2)
004290cf          return arg1;
004290cf      
0042900e      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::delete_contents(((char*)arg1 + 4));
00429022      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::resize_internal(((char*)arg1 + 4), IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::nice_num_buckets(*(uint32_t*)((char*)arg2 + 0x6c)));
00429033      void* ebp_1 = nullptr;
00429035      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = nullptr;
00429039      int32_t var_20_1 = 0;
0042903d      int32_t var_1c_1 = 0;
0042904b      void var_18;
0042904b      void __return;
0042904b      HashIterator<unsigned long,BaseProperty,1>::HashIterator<unsigned long,BaseProperty,1>(&var_18, IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::end(((char*)arg2 + 4), &__return));
00429057      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(((char*)arg2 + 4), &__return);
0042905e      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
00429061      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax_4->m_currElement;
00429064      m_currHashTable = eax_4->m_currHashTable;
00429070      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
00429074      int32_t var_10;
00429074      
00429074      while (m_currElement != var_10)
00429074      {
0042907d          void* esi_2 = operator new(0x10);
0042907d          
00429084          if (esi_2 == 0)
004290a4              esi_2 = nullptr;
00429084          else
00429084          {
0042908c              *(uint32_t*)esi_2 = m_currElement->m_hashKey;
00429094              *(uint32_t*)((char*)esi_2 + 4) = 0;
00429098              *(uint32_t*)((char*)esi_2 + 8) = 0;
0042909a              *(uint32_t*)((char*)esi_2 + 0xc) = 0;
0042909d              BaseProperty::operator=(((char*)esi_2 + 8), &m_currElement->m_data);
00429084          }
00429084          
004290aa          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(((char*)arg1 + 4), esi_2, ebp_1);
004290b3          ebp_1 = esi_2;
004290b5          IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::operator++(&m_currHashTable);
00429074      }
00429074      
004290c4      return arg1;
00428ff0  }

004290d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004290e0  class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* __fastcall IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::operator++(class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* this)

004290e0  {
004290e5      class HashTableData<unsigned long,BaseProperty>* m_hashNext = this->m_currElement->m_hashNext;
004290eb      this->m_currElement = m_hashNext;
004290eb      
004290ee      if (m_hashNext == 0)
004290ee      {
004290f0          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* m_currHashTable = this->m_currHashTable;
004290f8          void* edx_2 = &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets];
004290f8          
00429103          while (true)
00429103          {
00429103              void* ecx_3 = &this->m_currBucket[1];
00429108              this->m_currBucket = ecx_3;
00429108              
0042910b              if (ecx_3 == edx_2)
0042910b                  break;
0042910b              
0042910d              class HashTableData<unsigned long,BaseProperty>* edi_1 = *(uint32_t*)ecx_3;
0042910d              
00429111              if (edi_1 != 0)
00429111              {
00429115                  this->m_currElement = edi_1;
00429115                  break;
00429111              }
00429103          }
004290ee      }
004290ee      
00429119      return this;
004290e0  }

004290fd                                                                                         8d 49 00                               .I.
0042911a                                                                                90 90 90 90 90 90                            ......

00429120  class BasePropertyValue* MasterProperty::AllocatePropertyValue(uint32_t arg1)

00429120  {
00429128      if ((arg1 - 1) <= 0x14)
0042912e          switch (arg1)
0042912e          {
00429137              case 1:
00429137              {
00429137                  void* eax_1 = operator new(0xc);
00429137                  
00429141                  if (eax_1 != 0)
00429141                  {
00429147                      *(uint32_t*)eax_1 = &BoolPropertyValue::`vftable';
0042914d                      *(uint8_t*)((char*)eax_1 + 8) = 0;
00429151                      *(uint32_t*)((char*)eax_1 + 4) = 1;
00429158                      return eax_1;
00429141                  }
00429137                  break;
00429137              }
0042915b              case 2:
0042915b              {
0042915b                  void* eax_2 = operator new(0xc);
0042915b                  
00429165                  if (eax_2 != 0)
00429165                  {
0042916b                      *(uint32_t*)eax_2 = &IntegerPropertyValue::`vftable';
00429171                      *(uint32_t*)((char*)eax_2 + 8) = 0;
00429178                      *(uint32_t*)((char*)eax_2 + 4) = 1;
0042917f                      return eax_2;
00429165                  }
0042915b                  break;
0042915b              }
00429182              case 3:
00429182              {
00429182                  void* eax_3 = operator new(0x10);
00429182                  
0042918c                  if (eax_3 != 0)
0042918c                  {
00429192                      *(uint32_t*)eax_3 = &LongIntegerPropertyValue::`vftable';
00429198                      *(uint32_t*)((char*)eax_3 + 8) = 0;
0042919f                      *(uint32_t*)((char*)eax_3 + 0xc) = 0;
004291a6                      *(uint32_t*)((char*)eax_3 + 4) = 1;
004291ad                      return eax_3;
0042918c                  }
00429182                  break;
00429182              }
004291b0              case 4:
004291b0              {
004291b0                  void* eax_4 = operator new(0xc);
004291b0                  
004291ba                  if (eax_4 != 0)
004291ba                  {
004291c0                      *(uint32_t*)eax_4 = &FloatPropertyValue::`vftable';
004291c6                      *(uint32_t*)((char*)eax_4 + 8) = 0;
004291cd                      *(uint32_t*)((char*)eax_4 + 4) = 1;
004291d4                      return eax_4;
004291ba                  }
004291b0                  break;
004291b0              }
004291d7              case 5:
004291d7              {
004291d7                  void* eax_5 = operator new(0x14);
004291d7                  
004291e1                  if (eax_5 != 0)
004291e9                      /* tailcall */
004291e9                      return VectorPropertyValue::VectorPropertyValue(eax_5);
004291d7                  break;
004291d7              }
004291f0              case 6:
004291f0              {
004291f0                  void* eax_7 = operator new(0x18);
004291f0                  
004291fa                  if (eax_7 != 0)
00429202                      /* tailcall */
00429202                      return ColorPropertyValue::ColorPropertyValue(eax_7);
004291f0                  break;
004291f0              }
00429209              case 7:
00429209              {
00429209                  void* eax_9 = operator new(0xc);
00429209                  
00429213                  if (eax_9 != 0)
0042921b                      /* tailcall */
0042921b                      return StringPropertyValue::StringPropertyValue(eax_9);
00429209                  break;
00429209              }
00429225              case 8:
00429225              {
00429225                  void* eax_11 = operator new(0x98);
00429225                  
0042922f                  if (eax_11 != 0)
00429237                      /* tailcall */
00429237                      return StringInfoPropertyValue::StringInfoPropertyValue(eax_11);
00429225                  break;
00429225              }
0042923e              case 9:
0042923e              case 0x14:
0042923e              {
0042923e                  void* eax_13 = operator new(0xc);
0042923e                  
00429248                  if (eax_13 != 0)
00429248                  {
0042924e                      *(uint32_t*)eax_13 = &EnumPropertyValue::`vftable';
00429254                      *(uint32_t*)((char*)eax_13 + 8) = 0;
0042925b                      *(uint32_t*)((char*)eax_13 + 4) = 1;
00429262                      return eax_13;
00429248                  }
0042923e                  break;
0042923e              }
00429265              case 0xa:
00429265              {
00429265                  void* eax_14 = operator new(0xc);
00429265                  
0042926f                  if (eax_14 != 0)
0042926f                  {
00429275                      *(uint32_t*)((char*)eax_14 + 4) = 1;
0042927c                      *(uint32_t*)eax_14 = &DataFilePropertyValue::`vftable';
00429288                      *(uint32_t*)((char*)eax_14 + 8) = INVALID_DID.id;
0042928b                      return eax_14;
0042926f                  }
00429265                  break;
00429265              }
0042928e              case 0xb:
0042928e              {
0042928e                  void* eax_15 = operator new(0x34);
0042928e                  
00429298                  if (eax_15 != 0)
004292a0                      /* tailcall */
004292a0                      return WaveformPropertyValue::WaveformPropertyValue(eax_15);
0042928e                  break;
0042928e              }
004292a7              case 0xc:
004292a7              {
004292a7                  void* eax_17 = operator new(0xc);
004292a7                  
004292b1                  if (eax_17 != 0)
004292b1                  {
004292b7                      *(uint32_t*)eax_17 = &InstanceIDPropertyValue::`vftable';
004292bd                      *(uint32_t*)((char*)eax_17 + 8) = 0;
004292c4                      *(uint32_t*)((char*)eax_17 + 4) = 1;
004292cb                      return eax_17;
004292b1                  }
004292a7                  break;
004292a7              }
004292ce              case 0xd:
004292ce              {
004292ce                  void* eax_18 = operator new(0x50);
004292ce                  
004292d8                  if (eax_18 != 0)
004292e0                      /* tailcall */
004292e0                      return PositionPropertyValue::PositionPropertyValue(eax_18);
004292ce                  break;
004292ce              }
004292e7              case 0xe:
004292e7              {
004292e7                  void* eax_20 = operator new(0x10);
004292e7                  
004292f1                  if (eax_20 != 0)
004292f9                      /* tailcall */
004292f9                      return TimeStampPropertyValue::TimeStampPropertyValue(eax_20);
004292e7                  break;
004292e7              }
00429300              case 0xf:
00429300              {
00429300                  void* eax_22 = operator new(0xc);
00429300                  
0042930a                  if (eax_22 != 0)
0042930a                  {
00429310                      *(uint32_t*)eax_22 = &Bitfield32PropertyValue::`vftable';
00429316                      *(uint32_t*)((char*)eax_22 + 8) = 0;
0042931d                      *(uint32_t*)((char*)eax_22 + 4) = 1;
00429324                      return eax_22;
0042930a                  }
00429300                  break;
00429300              }
00429327              case 0x10:
00429327              {
00429327                  void* eax_23 = operator new(0x10);
00429327                  
00429331                  if (eax_23 != 0)
00429331                  {
00429333                      *(uint32_t*)eax_23 = &Bitfield64PropertyValue::`vftable';
00429339                      *(uint32_t*)((char*)eax_23 + 8) = 0;
00429340                      *(uint32_t*)((char*)eax_23 + 0xc) = 0;
00429347                      *(uint32_t*)((char*)eax_23 + 4) = 1;
0042934e                      return eax_23;
00429331                  }
00429327                  break;
00429327              }
00429351              case 0x11:
00429351              {
00429351                  void* eax_24 = operator new(0x14);
00429351                  
0042935b                  if (eax_24 != 0)
0042935f                      /* tailcall */
0042935f                      return ArrayPropertyValue::ArrayPropertyValue(eax_24);
00429351                  break;
00429351              }
00429366              case 0x12:
00429366              {
00429366                  void* eax_26 = operator new(0x7c);
00429366                  
00429370                  if (eax_26 != 0)
00429374                      /* tailcall */
00429374                      return StructPropertyValue::StructPropertyValue(eax_26);
00429366                  break;
00429366              }
0042937b              case 0x13:
0042937b              {
0042937b                  void* eax_28 = operator new(0x10);
0042937b                  
00429385                  if (eax_28 != 0)
00429389                      /* tailcall */
00429389                      return StringTokenPropertyValue::StringTokenPropertyValue(eax_28);
0042937b                  break;
0042937b              }
00429390              case 0x15:
00429390              {
00429390                  void* eax_30 = operator new(0xc);
00429390                  
0042939a                  if (eax_30 != 0)
0042939a                  {
0042939c                      *(uint32_t*)eax_30 = &TriStatePropertyValue::`vftable';
004293a2                      *(uint32_t*)((char*)eax_30 + 8) = 0xff;
004293a9                      *(uint32_t*)((char*)eax_30 + 4) = 1;
004293b0                      return eax_30;
0042939a                  }
00429390                  break;
00429390              }
0042912e          }
0042912e      
004293b3      return 0;
00429120  }

004293b4  uint32_t jump_table_4293b4[0x15] = 
004293b4  {
004293b4      [0x00] =  0x00429135
004293b8      [0x01] =  0x00429159
004293bc      [0x02] =  0x00429180
004293c0      [0x03] =  0x004291ae
004293c4      [0x04] =  0x004291d5
004293c8      [0x05] =  0x004291ee
004293cc      [0x06] =  0x00429207
004293d0      [0x07] =  0x00429220
004293d4      [0x08] =  0x0042923c
004293d8      [0x09] =  0x00429263
004293dc      [0x0a] =  0x0042928c
004293e0      [0x0b] =  0x004292a5
004293e4      [0x0c] =  0x004292cc
004293e8      [0x0d] =  0x004292e5
004293ec      [0x0e] =  0x004292fe
004293f0      [0x0f] =  0x00429325
004293f4      [0x10] =  0x0042934f
004293f8      [0x11] =  0x00429364
004293fc      [0x12] =  0x00429379
00429400      [0x13] =  0x0042923c
00429404      [0x14] =  0x0042938e
00429408  }

00429408                          90 90 90 90 90 90 90 90                                                          ........

00429410  class BasePropertyValue* __fastcall StructPropertyValue::Copy(class StructPropertyValue const* this)

00429410  {
00429415      void* eax = operator new(0x7c);
00429415      
0042941f      if (eax == 0)
00429431          return 0;
00429431      
0042942d      return StructPropertyValue::StructPropertyValue(eax, &this->m_value);
00429410  }

00429432                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00429440  void __thiscall StructPropertyValue::StructPropertyValue(class StructPropertyValue* this, class AutoGrowHashTable<unsigned long,BaseProperty> const* arg2)

00429440  {
00429449      this->m_cRef = 1;
00429450      this->vtable = 0x797708;
00429456      this->m_value.vtable = 0x797700;
00429466      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&this->m_value.m_intrusiveTable, arg2->m_intrusiveTable.m_numBuckets);
0042946e      HashTable<unsigned long,BaseProperty,1>::operator=(&this->m_value, arg2);
00429456      this->m_value.vtable = 0x797700;
00429440  }

00429481     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00429490  void __thiscall StructPropertyValue::Serialize(class StructPropertyValue* this, class Archive* arg2, uint32_t const arg3)

00429490  {
00429492      class Archive* edi = arg2;
00429492      
0042949f      if ((!(edi->m_flags) & 1) != 0)
004294a4          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::delete_contents(&this->m_value.m_intrusiveTable);
004294a4      
004294b3      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>,HashTableData<unsigned long,BaseProperty> *,SB_Default>(&arg2, &this->m_value.m_intrusiveTable, edi);
00429490  }


004294c0  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>,HashTableData<unsigned long,BaseProperty> *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* arg2, class Archive* arg3)

004294c0  {
004294c5      class Archive* ebp = arg3;
004294c5      
004294d6      if ((!(ebp->m_flags) & 1) != 0)
004294da          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
004294da      
004294e2      uint32_t ecx_2;
004294e2      ecx_2 = (ebp->m_flags & 5);
004294e8      int32_t ebx;
004294e8      
004294e8      if (ecx_2 != 1)
00429505          ebx = arg3;
004294e8      else
004294e8      {
004294ed          uint32_t m_numBuckets = arg2->m_numBuckets;
00429500          ebx = ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::get_bucket_size_pointer(ecx_2) - g_bucketSizesBegin) >> 2);
004294e8      }
004294e8      
0042950d      Archive::CheckAlignment(ebp, 1);
00429516      char* eax_2 = Archive::GetBytes(ebp, 1);
00429516      
0042951d      if (eax_2 != 0)
0042951d      {
00429523          if ((ebp->m_flags & 1) == 0)
00429529              ebx = *(uint8_t*)eax_2;
00429523          else
00429525              *(uint8_t*)eax_2 = ebx;
0042951d      }
0042951d      
0042952f      if ((ebp->m_flags & 5) == 0)
0042952f      {
00429537          uint32_t eax_3 = ((uint32_t)ebx);
00429537          
0042953c          if (eax_3 < 0x17)
0042955c              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::resize_internal(arg2, IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::nice_num_buckets(g_bucketSizesBegin[eax_3]));
0042953c          else
00429540              Archive::RaiseError(ebp);
0042952f      }
0042952f      
00429568      if ((((int8_t)ebp->m_flags) & 5) == 1)
0042956d          arg3 = arg2->m_numElements;
0042956d      
0042957c      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, ebp);
0042957c      
0042958d      if ((((int8_t)ebp->m_flags) & 5) == 1)
0042958d      {
00429596          void __return;
00429596          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0042959b          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0042959d          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
004295a0          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
004295a0          
004295a5          while (i != 0)
004295a5          {
004295bf              do
004295bf              {
004295a9                  Serializer::SerializeObject(i, ebp);
004295b5                  BaseProperty::Serialize(&i->m_data, ebp);
004295ba                  i = i->m_hashNext;
004295bf              } while (i != 0);
004295bf              
004295d0              while (true)
004295d0              {
004295d0                  m_currBucket = &m_currBucket[1];
004295d0                  
004295d5                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004295d5                      break;
004295d5                  
004295d7                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
004295d7                  
004295db                  if (i_1 != 0)
004295db                  {
004295dd                      i = i_1;
004295df                      break;
004295db                  }
004295d0              }
004295a5          }
0042958d      }
0042958d      
004295e5      if ((ebp->m_flags & 5) == 0)
004295e5      {
004295e9          uint32_t eax_9 = Archive::GetSizeLeft(ebp);
004295ee          class Archive* ecx_15 = arg3;
004295ee          
004295f4          if (ecx_15 > eax_9)
0042964a              Archive::RaiseError(ebp);
004295f4          else
004295f4          {
004295f6              class HashTableData<unsigned long,BaseProperty>* esi_1 = nullptr;
004295f8              class HashTableData<unsigned long,BaseProperty>* edi_1 = nullptr;
004295fa              int32_t ebx_3 = 0;
004295fa              
004295fe              if (ecx_15 > 0)
004295fe              {
00429606                  while (true)
00429606                  {
00429606                      esi_1 = AllocateHashData(esi_1);
0042960a                      Serializer::SerializeObject(esi_1, ebp);
00429616                      BaseProperty::Serialize(&esi_1->m_data, ebp);
00429616                      
00429624                      if ((((int8_t)(ebp->m_flags >> 2)) & 1) != 0)
00429656                          return;
00429656                      
00429633                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, esi_1, edi_1) == 0)
00429633                          break;
00429633                      
00429639                      ebx_3 += 1;
0042963c                      edi_1 = esi_1;
0042963c                      
0042963e                      if (ebx_3 >= arg3)
00429647                          return;
00429606                  }
00429606                  
0042964a                  Archive::RaiseError(ebp);
004295fe              }
004295f4          }
004295e5      }
004294c0  }

00429657                                                                       90 90 90 90 90 90 90 90 90                         .........

00429660  class HashTableData<unsigned long,BaseProperty>* AllocateHashData(class HashTableData<unsigned long,BaseProperty>* arg1)

00429660  {
00429662      void* result = operator new(0x10);
00429662      
0042966e      if (result == 0)
0042967c          return 0;
0042967c      
00429670      *(uint32_t*)((char*)result + 4) = 0;
00429673      *(uint32_t*)((char*)result + 8) = 0;
00429676      *(uint32_t*)((char*)result + 0xc) = 0;
00429679      return result;
00429660  }

0042967d                                                                                         90 90 90                               ...

00429680  uint8_t __thiscall BasePropertyDesc::InqPatchFlags(class BasePropertyDesc const* this, uint32_t* arg2)

00429680  {
00429684      if (this->m_propertyType != 0xa)
00429684      {
00429686          int32_t eax;
00429686          eax = 0;
00429688          return 0;
00429684      }
00429684      
00429692      *(uint32_t*)arg2 = this->m_ePatchFlags;
00429694      uint32_t eax_1;
00429694      eax_1 = 1;
00429696      return 1;
00429680  }

00429699                                                                             90 90 90 90 90 90 90                           .......

004296a0  uint8_t __thiscall BaseProperty::InqEnum(class BaseProperty const* this, uint32_t* arg2)

004296a0  {
004296a0      class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
004296a0      
004296a5      if (m_pcPropertyValue != 0)
004296a9          /* jump -> m_pcPropertyValue->vtable->InqEnum */
004296a9      
004296af      int32_t eax;
004296af      eax = 0;
004296b1      return 0;
004296a0  }

004296b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004296c0  uint8_t __fastcall BaseProperty::IsClientOnlyData(class BaseProperty const* this)

004296c0  {
004296c0      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
004296c0      
004296c4      if (m_pcPropertyDesc != 0)
004296c4      {
004296d3          m_pcPropertyDesc = m_pcPropertyDesc->m_datFileType == ClientOnlyData;
004296d5          return m_pcPropertyDesc;
004296c4      }
004296c4      
004296d6      m_pcPropertyDesc = 0;
004296d8      return 0;
004296c0  }

004296d9                                                                             90 90 90 90 90 90 90                           .......

004296e0  uint8_t __fastcall BaseProperty::IsServerOnlyData(class BaseProperty const* this)

004296e0  {
004296e0      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
004296e0      
004296e4      if (m_pcPropertyDesc != 0)
004296e4      {
004296f4          m_pcPropertyDesc = m_pcPropertyDesc->m_datFileType == ServerOnlyData;
004296f6          return m_pcPropertyDesc;
004296e4      }
004296e4      
004296f7      m_pcPropertyDesc = 0;
004296f9      return 0;
004296e0  }

004296fa                                                                                90 90 90 90 90 90                            ......

00429700  uint8_t __fastcall BaseProperty::IsToolOnly(class BaseProperty const* this)

00429700  {
00429700      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
00429700      
00429704      if (m_pcPropertyDesc != 0)
00429704      {
00429706          m_pcPropertyDesc = m_pcPropertyDesc->m_bToolOnly;
0042970c          return m_pcPropertyDesc;
00429704      }
00429704      
0042970d      m_pcPropertyDesc = 0;
0042970f      return 0;
00429700  }


00429710  uint8_t __thiscall BaseProperty::Compare(class BaseProperty const* this, class BaseProperty const* arg2)

00429710  {
00429711      class BasePropertyDesc* m_pcPropertyDesc_1 = this->m_pcPropertyDesc;
00429715      class BasePropertyDesc* m_pcPropertyDesc;
00429715      
00429715      if (m_pcPropertyDesc_1 != 0)
00429715      {
00429717          class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
00429717          
0042971c          if (m_pcPropertyValue != 0)
0042971c          {
00429722              m_pcPropertyDesc = arg2->m_pcPropertyDesc;
00429722              
00429726              if (m_pcPropertyDesc != 0)
00429726              {
0042972e                  if ((m_pcPropertyDesc_1->m_propertyName == m_pcPropertyDesc->m_propertyName && m_pcPropertyValue->vtable->Compare(arg2->m_pcPropertyValue) != 0))
00429743                      return 1;
00429743                  
00429749                  return 0;
00429726              }
0042971c          }
00429715      }
00429715      
0042974c      m_pcPropertyDesc = 0;
0042974f      return 0;
00429710  }

00429752                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00429760  uint32_t __fastcall BaseProperty::GetPropertyName(class BaseProperty const* this)

00429760  {
00429760      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
00429760      
00429764      if (m_pcPropertyDesc != 0)
0042976a          return m_pcPropertyDesc->m_propertyName;
0042976a      
00429766      return m_pcPropertyDesc;
00429760  }

0042976b                                   90 90 90 90 90                                                             .....

00429770  uint32_t __fastcall BaseProperty::GetGroupName(class BaseProperty const* this)

00429770  {
00429770      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
00429770      
00429774      if (m_pcPropertyDesc == 0)
0042977c          return 0;
0042977c      
00429779      return m_pcPropertyDesc->m_propertyGroup;
00429770  }

0042977d                                                                                         90 90 90                               ...

00429780  uint8_t __thiscall BaseProperty::InqPropertyName(class BaseProperty const* this, class PStringBase<char>* arg2)

00429780  {
00429780      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
00429784      class PStringBase<char>* edx;
00429784      
00429784      if (m_pcPropertyDesc == 0)
00429784      {
0042978a          class PStringBase<char>* var_4 = arg2;
0042978b          class BasePropertyDesc* m_pcPropertyDesc_1 = m_pcPropertyDesc;
00429794          return MasterProperty::InqPropertyNameStringStatic(m_pcPropertyDesc, edx);
00429784      }
00429784      
0042979b      uint32_t m_propertyName = m_pcPropertyDesc->m_propertyName;
0042979e      class PStringBase<char>* var_4_1 = arg2;
0042979f      uint32_t m_propertyName_1 = m_propertyName;
004297a8      return MasterProperty::InqPropertyNameStringStatic(m_propertyName, edx);
00429780  }

004297ab                                   90 90 90 90 90                                                             .....

004297b0  int32_t __fastcall PStringBase<char>::to_int32(class PStringBase<char> const* this)

004297b0  {
004297b1      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
004297be      *(uint32_t*)_errno() = 0;
004297ce      return strtol(m_charbuffer, 0, 0);
004297b0  }

004297cf                                               90                                                                 .

004297d0  uint8_t __thiscall BasePropertyDesc::InqDataID(class BasePropertyDesc const* this, class IDClass<_tagDataID,32,0>* arg2)

004297d0  {
004297e2      uint32_t eax;
004297e2      
004297e2      switch ((this->m_propertyType - 9))
004297e2      {
004297f0          case 0:
004297f0          case 6:
004297f0          case 7:
004297f0          case 0xb:
004297f0          {
004297f0              *(uint32_t*)arg2 = this->m_data;
004297f2              eax = 1;
004297f4              return 1;
004297f0              break;
004297f0          }
004297e2      }
004297e2      
004297f7      eax = 0;
004297f9      return 0;
004297d0  }

004297fc  uint32_t jump_table_4297fc[0x2] = 
004297fc  {
004297fc      [0x0] =  0x004297e9
00429800      [0x1] =  0x004297f7
00429804  }
00429804  uint8_t lookup_table_429804[0xc] = 
00429804  {
00429804      [0x0] =  0x00
00429805      [0x1] =  0x01
00429806      [0x2] =  0x01
00429807      [0x3] =  0x01
00429808      [0x4] =  0x01
00429809      [0x5] =  0x01
0042980a      [0x6] =  0x00
0042980b      [0x7] =  0x00
0042980c      [0x8] =  0x01
0042980d      [0x9] =  0x01
0042980e      [0xa] =  0x01
0042980f      [0xb] =  0x00
00429810  }

00429810  class BaseProperty& __thiscall BaseProperty::operator=(class BaseProperty* this, class BaseProperty const& arg2)

00429810  {
0042981a      if (this != arg2)
0042981a      {
0042981c          class BasePropertyDesc* m_pcPropertyDesc_1 = this->m_pcPropertyDesc;
0042981c          
00429820          if (m_pcPropertyDesc_1 != 0)
00429820          {
00429822              uint32_t m_cRef = m_pcPropertyDesc_1->m_cRef;
00429822              m_pcPropertyDesc_1->m_cRef -= 1;
00429822              
00429825              if (m_cRef == 1)
00429827                  m_pcPropertyDesc_1->vtable->__vecDelDtor(1);
00429827              
0042982d              this->m_pcPropertyDesc = 0;
00429820          }
00429820          
00429833          class BasePropertyDesc* m_pcPropertyDesc = arg2->m_pcPropertyDesc;
00429833          
00429837          if (m_pcPropertyDesc != 0)
00429837          {
00429839              this->m_pcPropertyDesc = m_pcPropertyDesc;
0042983b              m_pcPropertyDesc->m_cRef += 1;
00429837          }
00429837          
0042983e          class BasePropertyValue* m_pcPropertyValue_1 = this->m_pcPropertyValue;
0042983e          
00429843          if (m_pcPropertyValue_1 != 0)
00429843          {
00429845              uint32_t m_cRef_1 = m_pcPropertyValue_1->m_cRef;
00429845              m_pcPropertyValue_1->m_cRef -= 1;
00429845              
00429848              if (m_cRef_1 == 1)
0042984a                  m_pcPropertyValue_1->vtable->__vecDelDtor(1);
0042984a              
00429850              this->m_pcPropertyValue = nullptr;
00429843          }
00429843          
00429857          class BasePropertyValue* m_pcPropertyValue = arg2->m_pcPropertyValue;
00429857          
0042985c          if (m_pcPropertyValue != 0)
0042985c          {
0042985e              this->m_pcPropertyValue = m_pcPropertyValue;
00429861              m_pcPropertyValue->m_cRef += 1;
0042985c          }
0042981a      }
0042981a      
00429868      return this;
00429810  }

0042986b                                   90 90 90 90 90                                                             .....

00429870  void __fastcall BaseProperty::CheckCopyOnWrite(class BaseProperty* this)

00429870  {
00429873      class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
00429873      
00429878      if (m_pcPropertyValue != 0)
00429878      {
0042987a          uint32_t m_cRef = m_pcPropertyValue->m_cRef;
0042987a          
00429880          if (m_cRef != 1)
00429880          {
00429883              m_pcPropertyValue->m_cRef = (m_cRef - 1);
00429883              
00429886              if (m_cRef == 1)
00429888                  m_pcPropertyValue->vtable->__vecDelDtor(1);
00429888              
00429896              this->m_pcPropertyValue = this->m_pcPropertyValue->vtable->Copy();
00429880          }
00429878      }
00429870  }

0042989b                                                                                   90 90 90 90 90                             .....

004298a0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> > *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> > *,0>* this, uint32_t arg2)

004298a0  {
004298a3      class HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> >** m_buckets = this->m_buckets;
004298ab      this->vtable = 0x797888;
004298ab      
004298b1      if (m_buckets != &this->m_aInplaceBuckets)
004298b4          operator delete[](m_buckets);
004298b4      
004298be      this->m_buckets = nullptr;
004298c1      this->m_firstInterestingBucket = nullptr;
004298c4      this->m_numBuckets = 0;
004298c7      this->m_numElements = 0;
004298c7      
004298cf      if ((arg2 & 1) != 0)
004298d2          operator delete(this);
004298d2      
004298dd      return this;
004298a0  }


004298e0  uint8_t __thiscall BaseProperty::SetFloat(class BaseProperty* this, float const arg2)

004298e0  {
004298e3      class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
004298e3      
004298e8      if (m_pcPropertyValue == 0)
004298e8      {
00429915          int32_t eax;
00429915          eax = 0;
00429918          return 0;
004298e8      }
004298e8      
004298ea      uint32_t m_cRef = m_pcPropertyValue->m_cRef;
004298ea      
004298f0      if (m_cRef != 1)
004298f0      {
004298f3          m_pcPropertyValue->m_cRef = (m_cRef - 1);
004298f3          
004298f6          if (m_cRef == 1)
004298f8              m_pcPropertyValue->vtable->__vecDelDtor(1);
004298f8          
00429906          this->m_pcPropertyValue = this->m_pcPropertyValue->vtable->Copy();
004298f0      }
004298f0      
0042990f      /* jump -> this->m_pcPropertyValue->vtable->SetFloat */
004298e0  }

0042991b                                                                                   90 90 90 90 90                             .....

00429920  uint8_t __thiscall BaseProperty::SetEnum(class BaseProperty* this, uint32_t const arg2)

00429920  {
00429923      class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
00429923      
00429928      if (m_pcPropertyValue == 0)
00429928      {
00429955          int32_t eax;
00429955          eax = 0;
00429958          return 0;
00429928      }
00429928      
0042992a      uint32_t m_cRef = m_pcPropertyValue->m_cRef;
0042992a      
00429930      if (m_cRef != 1)
00429930      {
00429933          m_pcPropertyValue->m_cRef = (m_cRef - 1);
00429933          
00429936          if (m_cRef == 1)
00429938              m_pcPropertyValue->vtable->__vecDelDtor(1);
00429938          
00429946          this->m_pcPropertyValue = this->m_pcPropertyValue->vtable->Copy();
00429930      }
00429930      
0042994f      /* jump -> this->m_pcPropertyValue->vtable->SetEnum */
00429920  }

0042995b                                                                                   90 90 90 90 90                             .....

00429960  uint8_t __thiscall BaseProperty::SetStringInfo(class BaseProperty* this, class StringInfo const* arg2)

00429960  {
00429963      class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
00429963      
00429968      if (m_pcPropertyValue == 0)
00429968      {
00429995          int32_t eax;
00429995          eax = 0;
00429998          return 0;
00429968      }
00429968      
0042996a      uint32_t m_cRef = m_pcPropertyValue->m_cRef;
0042996a      
00429970      if (m_cRef != 1)
00429970      {
00429973          m_pcPropertyValue->m_cRef = (m_cRef - 1);
00429973          
00429976          if (m_cRef == 1)
00429978              m_pcPropertyValue->vtable->__vecDelDtor(1);
00429978          
00429986          this->m_pcPropertyValue = this->m_pcPropertyValue->vtable->Copy();
00429970      }
00429970      
0042998f      /* jump -> this->m_pcPropertyValue->vtable->SetStringInfo */
00429960  }

0042999b                                                                                   90 90 90 90 90                             .....

004299a0  void __fastcall FileNodeName_PString::FileNodeName_PString(class FileNodeName_PString* this)

004299a0  {
004299a3      this->vtable = 0x797140;
004299a9      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004299b4      this->m_name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004299b7      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
004299a0  }

004299c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004299d0  class HashIterator<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>* __thiscall HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>::begin(class HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1> const* this, class HashIterator<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>* __return)

004299d0  {
004299db      void __return_1;
004299db      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_intrusiveTable.vtable, &__return_1);
004299e2      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>** result = __return;
004299e6      *(uint32_t*)result = eax->m_currHashTable;
004299eb      result[1] = eax->m_currBucket;
004299f1      result[2] = eax->m_currElement;
004299f9      return result;
004299d0  }

004299fc                                                                                      90 90 90 90                              ....

00429a00  class HashIterator<unsigned long,BaseProperty,1>* __fastcall HashIterator<unsigned long,BaseProperty,1>::operator++(class HashIterator<unsigned long,BaseProperty,1>* this)

00429a00  {
00429a05      class HashTableData<unsigned long,BaseProperty>* m_hashNext = this->m_iter.m_currElement->m_hashNext;
00429a0a      this->m_iter.m_currElement = m_hashNext;
00429a0a      
00429a0d      if (m_hashNext == 0)
00429a0d      {
00429a0f          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* m_currHashTable = this->m_iter.m_currHashTable;
00429a0f          
00429a23          while (true)
00429a23          {
00429a23              void* ecx_3 = &this->m_iter.m_currBucket[1];
00429a28              this->m_iter.m_currBucket = ecx_3;
00429a28              
00429a2b              if (ecx_3 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00429a2b                  break;
00429a2b              
00429a2d              class HashTableData<unsigned long,BaseProperty>* edi_1 = *(uint32_t*)ecx_3;
00429a2d              
00429a31              if (edi_1 != 0)
00429a31              {
00429a35                  this->m_iter.m_currElement = edi_1;
00429a35                  break;
00429a31              }
00429a23          }
00429a0d      }
00429a0d      
00429a39      return this;
00429a00  }

00429a1d                                                                                         8d 49 00                               .I.
00429a3a                                                                                90 90 90 90 90 90                            ......

00429a40  void __thiscall BaseProperty::GetSubDataIDs(class BaseProperty const* this, class QualifiedDataIDArray* arg2)

00429a40  {
00429a4f      int32_t* var_a0;
00429a4f      MasterPropertyGrabber::MasterPropertyGrabber(&var_a0);
00429a54      int32_t* ebp = var_a0;
00429a61      class IDClass<_tagDataID,32,0> __return;
00429a61      
00429a61      if (ebp != 0)
00429a77          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, ebp[0xa], 0), 0);
00429a77      
00429a7c      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
00429a80      uint32_t m_propertyType;
00429a80      
00429a80      if (m_pcPropertyDesc == 0)
00429a87          m_propertyType = 0;
00429a80      else
00429a82          m_propertyType = m_pcPropertyDesc->m_propertyType;
00429a82      
00429a8f      if ((m_propertyType - 8) > 0xa)
00429a8f      {
00429b58      label_429b58:
00429b58          
00429b5a          if (ebp != 0)
00429b61              *(uint32_t*)(*(uint32_t*)ebp + 0x14)();
00429a8f      }
00429a8f      else
00429a8f          switch (m_propertyType)
00429a8f          {
00429af2              case 8:
00429af2              {
00429af2                  void var_90;
00429af2                  StringInfo::StringInfo(&var_90);
00429af7                  class BasePropertyValue* m_pcPropertyValue_1 = this->m_pcPropertyValue;
00429af7                  
00429afc                  if ((m_pcPropertyValue_1 != 0 && m_pcPropertyValue_1->vtable->InqStringInfo(&var_90) != 0))
00429b14                      StringInfo::GetSubDataIDs(&var_90, arg2);
00429b14                  
00429b1d                  StringInfo::~StringInfo(&var_90);
00429b22                  goto label_429b58;
00429af2              }
00429a9c              case 9:
00429a9c              case 0xb:
00429a9c              case 0xc:
00429a9c              case 0xd:
00429a9c              case 0xe:
00429a9c              case 0xf:
00429a9c              case 0x10:
00429a9c              {
00429a9c                  goto label_429b58;
00429a9c              }
00429aa3              case 0xa:
00429aa3              {
00429aa3                  class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
00429aa3                  
00429aa8                  if ((m_pcPropertyValue != 0 && m_pcPropertyValue->vtable->InqDataID(&__return) != 0))
00429aa8                  {
00429ac3                      class BasePropertyDesc* m_pcPropertyDesc_1 = this->m_pcPropertyDesc;
00429ac7                      var_a0 = nullptr;
00429ac7                      
00429acf                      if (m_pcPropertyDesc_1 != 0)
00429ad6                          BasePropertyDesc::InqPatchFlags(m_pcPropertyDesc_1, &var_a0);
00429ad6                      
00429ae7                      QualifiedDataIDArray::AddDID(arg2, __return, var_a0);
00429aa8                  }
00429aa8                  
00429aa8                  goto label_429b58;
00429aa3              }
00429b24              case 0x11:
00429b24              {
00429b24                  class BasePropertyValue* m_pcPropertyValue_2 = this->m_pcPropertyValue;
00429b24                  
00429b29                  if (m_pcPropertyValue_2 != 0)
00429b29                  {
00429b31                      int32_t* eax_8 = m_pcPropertyValue_2->vtable->GetArray();
00429b31                      
00429b39                      if (eax_8 == 0)
00429b39                      {
00429bb7                          MasterPropertyGrabber::~MasterPropertyGrabber(&var_a0);
00429bc5                          return;
00429b39                      }
00429b39                      
00429b3b                      class BaseProperty* i = *(uint32_t*)eax_8;
00429b3b                      
00429b46                      for (void* edi_1 = &i[eax_8[2]]; i != edi_1; i = &i[1])
00429b4b                          BaseProperty::GetSubDataIDs(i, arg2);
00429b4b                      
00429b46                      goto label_429b58;
00429b29                  }
00429b29                  
00429bc8              label_429bc8:
00429bc8                  
00429bca                  if (ebp != 0)
00429bd1                      *(uint32_t*)(*(uint32_t*)ebp + 0x14)();
00429b24                  break;
00429b24              }
00429b70              case 0x12:
00429b70              {
00429b70                  class BasePropertyValue* m_pcPropertyValue_3 = this->m_pcPropertyValue;
00429b70                  
00429b75                  if (m_pcPropertyValue_3 == 0)
00429b75                      goto label_429bc8;
00429b75                  
00429b79                  class HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>* eax_12 = m_pcPropertyValue_3->vtable->GetHash();
00429b79                  
00429b81                  if (eax_12 == 0)
00429b81                  {
00429bb7                      MasterPropertyGrabber::~MasterPropertyGrabber(&var_a0);
00429bc5                      return;
00429b81                  }
00429b81                  
00429b8a                  HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>::begin(eax_12, &__return);
00429b95                  void* i_2;
00429b95                  
00429b95                  for (void* i_1 = i_2; i_1 != 0; i_1 = i_2)
00429b95                  {
00429b9b                      BaseProperty::GetSubDataIDs(((char*)i_1 + 8), arg2);
00429ba4                      HashIterator<unsigned long,BaseProperty,1>::operator++(&__return);
00429b95                  }
00429b95                  
00429b95                  goto label_429b58;
00429b70              }
00429a8f          }
00429a40  }

00429be0  uint32_t jump_table_429be0[0x5] = 
00429be0  {
00429be0      [0x0] =  0x00429aee
00429be4      [0x1] =  0x00429aa3
00429be8      [0x2] =  0x00429b24
00429bec      [0x3] =  0x00429b70
00429bf0      [0x4] =  0x00429b58
00429bf4  }
00429bf4  uint8_t lookup_table_429bf4[0xb] = 
00429bf4  {
00429bf4      [0x0] =  0x00
00429bf5      [0x1] =  0x04
00429bf6      [0x2] =  0x01
00429bf7      [0x3] =  0x04
00429bf8      [0x4] =  0x04
00429bf9      [0x5] =  0x04
00429bfa      [0x6] =  0x04
00429bfb      [0x7] =  0x04
00429bfc      [0x8] =  0x04
00429bfd      [0x9] =  0x02
00429bfe      [0xa] =  0x03
00429bff  }

00429bff                                                                                               90                                 .

00429c00  uint8_t __thiscall BaseProperty::ToFileNode(class BaseProperty const* this, class PFileNode* arg2)

00429c00  {
00429c01      class PFileNode* ebx = arg2;
00429c01      
00429c1b      if ((ebx != 0 && (this->m_pcPropertyDesc != 0 && this->m_pcPropertyValue != 0)))
00429c1b      {
00429c1d          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00429c28          arg2 = PStringBase<char>::s_NullBuffer_1;
00429c30          class PStringBase<char>* edx_1 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00429c32          class BasePropertyDesc* eax_2 = this->m_pcPropertyDesc;
00429c32          
00429c36          if (eax_2 != 0)
00429c38              eax_2 = eax_2->m_propertyName;
00429c38          
00429c3f          class PFileNode** var_10_2 = &arg2;
00429c40          class BasePropertyDesc* var_14_1 = eax_2;
00429c41          uint8_t eax_3;
00429c41          int32_t ecx;
00429c41          eax_3 = MasterProperty::InqPropertyNameStringStatic(eax_2, edx_1);
00429c4b          class PFileNode* eax_6;
00429c4b          
00429c4b          if (eax_3 != 0)
00429c4b          {
00429c51              int32_t var_10_3 = ecx;
00429c54              class PStringBase<char> var_10_4 = arg2;
00429c5e              InterlockedIncrement(&arg2[0]);
00429c62              eax_6 = PFileNode::MakeSubNode(ebx, var_10_4);
00429c4b          }
00429c4b          
00429c69          class PFileNode** ecx_3;
00429c69          
00429c69          if ((eax_3 == 0 || eax_6 == 0))
00429c8c              ecx_3 = &arg2;
00429c69          else
00429c69          {
00429c79              ecx_3 = &arg2;
00429c79              
00429c7d              if (this->m_pcPropertyValue->vtable->ToFileNode(this->m_pcPropertyDesc, eax_6) != 0)
00429c7d              {
00429c7f                  PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_3);
00429c84                  int32_t eax_9;
00429c84                  eax_9 = 1;
00429c89                  return 1;
00429c7d              }
00429c69          }
00429c69          
00429c90          PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_3);
00429c1b      }
00429c1b      
00429c97      class BasePropertyValue* eax;
00429c97      eax = 0;
00429c9a      return 0;
00429c00  }

00429c9d                                                                                         90 90 90                               ...

00429ca0  uint8_t __thiscall BaseProperty::ValueFromFileNode(class BaseProperty* this, class PFileNode const* arg2)

00429ca0  {
00429ca3      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
00429ca3      
00429caf      if ((m_pcPropertyDesc != 0 && this->m_pcPropertyValue != 0))
00429caf      {
00429cb6          if (m_pcPropertyDesc->m_propertyName != 0)
00429cba              BaseProperty::CheckCopyOnWrite(this);
00429cba          
00429cc6          class BasePropertyDesc* m_pcPropertyDesc_1 = this->m_pcPropertyDesc;
00429cc8          struct BasePropertyValue::VTable* vtable = this->m_pcPropertyValue->vtable;
00429cca          class PStringBase<char> var_c = arg2;
00429ccc          char eax;
00429ccc          class PStringBase<char> ecx_4;
00429ccc          eax = vtable->FromFileNode(m_pcPropertyDesc_1, var_c);
00429ccc          
00429cd1          if (eax != 0)
00429cf4              return 1;
00429cf4          
00429cd3          var_c = ecx_4;
00429cdb          PStringBase<char>::PStringBase<char>(&var_c, "unable to read property value");
00429ce1          PFileNode::ReportError(arg2, var_c);
00429caf      }
00429caf      
00429ce9      m_pcPropertyDesc = 0;
00429ced      return 0;
00429ca0  }

00429cf7                                                                       90 90 90 90 90 90 90 90 90                         .........

00429d00  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> > *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> > *,0>* this, uint32_t arg2)

00429d00  {
00429d0b      arg2 = arg2;
00429d0f      uint8_t edx = ((int8_t)arg2);
00429d13      this->m_buckets = nullptr;
00429d16      this->m_firstInterestingBucket = nullptr;
00429d19      this->m_numBuckets = 0;
00429d1c      this->m_numElements = 0;
00429d20      this->vtable = 0x797888;
00429d26      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00429d39      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00429d39      
00429d43      if (eax == bucketSizesEnd_1)
00429d45          eax -= 4;
00429d45      
00429d48      uint32_t eax_1 = *(uint32_t*)eax;
00429d4d      this->m_numBuckets = eax_1;
00429d4d      
00429d50      if (eax_1 > 0x17)
00429d66          this->m_buckets = operator new[]((eax_1 << 2));
00429d50      else
00429d55          this->m_buckets = &this->m_aInplaceBuckets;
00429d55      
00429d6c      class HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> >** m_buckets = this->m_buckets;
00429d6f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00429d75      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00429d86      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00429d00  }

00429d8f                                               90                                                                 .

00429d90  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> > *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> > *,0>* this)

00429d90  {
00429d98      if (this->m_numElements != 0)
00429d98      {
00429d9e          void* edi;
00429d9e          void* var_8_1 = edi;
00429d9e          
00429e1a          do
00429e1a          {
00429da6              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00429dac              int32_t* m_firstInterestingBucket_2;
00429dac              
00429dac              if (this->m_firstInterestingBucket == ecx_1)
00429dac              {
00429dc2              label_429dc2:
00429dc2                  m_firstInterestingBucket_2 = nullptr;
00429dc4                  edi = nullptr;
00429dac              }
00429dac              else
00429dac              {
00429db0                  while (true)
00429db0                  {
00429db0                      class HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
00429db0                      
00429db6                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00429db6                      {
00429dc8                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00429dcb                          edi = *(uint32_t*)m_firstInterestingBucket_1;
00429dcd                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00429dcd                          break;
00429db6                      }
00429db6                      
00429dbd                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00429dbd                      
00429dc0                      if (&m_firstInterestingBucket[1] == ecx_1)
00429dc0                          goto label_429dc2;
00429db0                  }
00429dac              }
00429dac              
00429dcf              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
00429dcf              
00429dd3              if (eax_3 == edi)
00429de5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00429dd3              else
00429dd3              {
00429ddc                  void* ecx_2;
00429ddc                  
00429ddc                  do
00429ddc                  {
00429dd5                      ecx_2 = eax_3;
00429dd7                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
00429ddc                  } while (eax_3 != edi);
00429ddc                  
00429de0                  if (ecx_2 != 0)
00429dec                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00429de0                  else
00429de5                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00429dd3              }
00429dd3              
00429df5              this->m_numElements -= 1;
00429df5              
00429df8              if (edi != 0)
00429df8              {
00429dfa                  int32_t* ecx_5 = *(uint32_t*)((char*)edi + 8);
00429dfa                  
00429dff                  if (ecx_5 != 0)
00429dff                  {
00429e01                      int32_t temp0_1 = ecx_5[1];
00429e01                      ecx_5[1] -= 1;
00429e01                      
00429e04                      if (temp0_1 == 1)
00429e0a                          **(uint32_t**)ecx_5(1);
00429dff                  }
00429dff                  
00429e0d                  operator delete(edi);
00429df8              }
00429e1a          } while (this->m_numElements != 0);
00429d98      }
00429d90  }

00429e1f                                                                                               90                                 .

00429e20  uint8_t __thiscall HashTable<unsigned long,IntrusiveSmartPointer<BasePropertyValue>,0>::add(class HashTable<unsigned long,IntrusiveSmartPointer<BasePropertyValue>,0>* this, uint32_t const* arg2, class IntrusiveSmartPointer<BasePropertyValue> const* arg3)

00429e20  {
00429e26      void* eax = operator new(0xc);
00429e30      void* esi;
00429e30      
00429e30      if (eax == 0)
00429e55          esi = nullptr;
00429e30      else
00429e30      {
00429e3c          *(uint32_t*)eax = *(uint32_t*)arg2;
00429e3e          *(uint32_t*)((char*)eax + 4) = 0;
00429e45          class BasePropertyValue* m_data = arg3->m_data;
00429e49          *(uint32_t*)((char*)eax + 8) = m_data;
00429e49          
00429e4c          if (m_data != 0)
00429e4e              m_data->m_cRef += 1;
00429e4e          
00429e51          esi = eax;
00429e30      }
00429e30      
00429e62      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
00429e8e          return 1;
00429e8e      
00429e66      if (esi != 0)
00429e66      {
00429e68          int32_t* ecx_3 = *(uint32_t*)((char*)esi + 8);
00429e68          
00429e6d          if (ecx_3 != 0)
00429e6d          {
00429e6f              int32_t temp1_1 = ecx_3[1];
00429e6f              ecx_3[1] -= 1;
00429e6f              
00429e72              if (temp1_1 == 1)
00429e78                  **(uint32_t**)ecx_3(1);
00429e6d          }
00429e6d          
00429e7b          operator delete(esi);
00429e66      }
00429e66      
00429e87      return 0;
00429e20  }

00429e91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00429ea0  class BasePropertyValue* __fastcall GetInitialPropertyValue(uint32_t arg1)

00429ea0  {
00429ea0      class BasePropertyValue* ecx;
00429ea0      class BasePropertyValue* var_4 = ecx;
00429ea1      uint32_t ecx_1 = arg1;
00429ea1      
00429eb9      for (int32_t* i = s_AllocatedDefaultPropertyValues.m_intrusiveTable.m_buckets[(COMBINE(0, ecx_1) % s_AllocatedDefaultPropertyValues.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00429eb9      {
00429ec2          if (*(uint32_t*)i == ecx_1)
00429ec2          {
00429f15              if ((i == 0 || i == 0xfffffff8))
00429f15                  break;
00429f15              
00429f17              void* eax_8 = i[2];
00429f19              *(uint32_t*)((char*)eax_8 + 4) += 1;
00429f1d              return eax_8;
00429ec2          }
00429eb9      }
00429eb9      
00429ecd      class BasePropertyValue* eax_2 = MasterProperty::AllocatePropertyValue(ecx_1);
00429ecd      
00429ed9      if (eax_2 != 0)
00429ed9      {
00429ee7          uint32_t eax_4 = (eax_2->m_cRef + 1);
00429eee          var_4 = eax_2;
00429ef2          eax_2->m_cRef = eax_4;
00429ef5          HashTable<unsigned long,IntrusiveSmartPointer<BasePropertyValue>,0>::add(&s_AllocatedDefaultPropertyValues, &arg1, &var_4);
00429efa          uint32_t m_cRef = eax_2->m_cRef;
00429efa          eax_2->m_cRef -= 1;
00429efa          
00429efd          if (m_cRef == 1)
00429eff              eax_2->vtable->__vecDelDtor(1);
00429ed9      }
00429ed9      
00429f0b      return eax_2;
00429ea0  }

00429ebd                                                                                         8d 49 00                               .I.
00429f1e                                                                                            90 90                                ..

00429f20  uint8_t __fastcall BaseProperty::InitToDefaultValue(class BaseProperty* this)

00429f20  {
00429f2a      class BasePropertyValue* eax;
00429f2a      
00429f2a      if (this->m_pcPropertyDesc != 0)
00429f2a      {
00429f2c          class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
00429f2c          
00429f31          if (m_pcPropertyValue != 0)
00429f31          {
00429f33              uint32_t m_cRef = m_pcPropertyValue->m_cRef;
00429f33              m_pcPropertyValue->m_cRef -= 1;
00429f33              
00429f36              if (m_cRef == 1)
00429f38                  m_pcPropertyValue->vtable->__vecDelDtor(1);
00429f38              
00429f3e              this->m_pcPropertyValue = nullptr;
00429f31          }
00429f31          
00429f41          class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
00429f43          class BasePropertyValue* m_defaultValue = m_pcPropertyDesc->m_defaultValue;
00429f43          
00429f48          if (m_defaultValue != 0)
00429f48          {
00429f4a              this->m_pcPropertyValue = m_defaultValue;
00429f53              m_defaultValue->m_cRef += 1;
00429f57              m_defaultValue = 1;
00429f5a              return 1;
00429f48          }
00429f48          
00429f5d          uint32_t m_propertyType;
00429f5d          
00429f5d          if (m_pcPropertyDesc == 0)
00429f64              m_propertyType = 0;
00429f5d          else
00429f5f              m_propertyType = m_pcPropertyDesc->m_propertyType;
00429f5f          
00429f66          uint32_t m_propertyType_1 = m_propertyType;
00429f67          eax = GetInitialPropertyValue(m_propertyType);
00429f71          this->m_pcPropertyValue = eax;
00429f71          
00429f74          if (eax != 0)
00429f74          {
00429f77              eax = 0;
00429f7a              return 0;
00429f74          }
00429f2a      }
00429f2a      
00429f7c      eax = 0;
00429f7f      return 0;
00429f20  }


00429f80  void* __thiscall HashTable<unsigned long,IntrusiveSmartPointer<BasePropertyValue>,0>::`scalar deleting destructor'(class HashTable<unsigned long,IntrusiveSmartPointer<BasePropertyValue>,0>* this, uint32_t arg2)

00429f80  {
00429f89      this->vtable = 0x7978b4;
00429f8f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> > *,0>::delete_contents(&this->m_intrusiveTable);
00429f94      class HashTableData<unsigned long,IntrusiveSmartPointer<BasePropertyValue> >** m_buckets = this->m_intrusiveTable.m_buckets;
00429f84      this->m_intrusiveTable.vtable = 0x797888;
00429f84      
00429fa2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00429fa5          operator delete[](m_buckets);
00429fa5      
00429f84      this->m_intrusiveTable.m_buckets = nullptr;
00429f84      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00429f84      this->m_intrusiveTable.m_numBuckets = 0;
00429f84      this->m_intrusiveTable.m_numElements = 0;
00429f84      
00429fc0      if ((arg2 & 1) != 0)
00429fc3          operator delete(this);
00429fc3      
00429fcf      return this;
00429f80  }

00429fd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00429fe0  uint8_t __thiscall BaseProperty::SetPropertyDesc(class BaseProperty* this, class BasePropertyDesc* arg2)

00429fe0  {
00429fe3      class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
00429fe3      
00429fe7      if (m_pcPropertyDesc != 0)
00429fe7      {
00429fe9          uint32_t m_cRef = m_pcPropertyDesc->m_cRef;
00429fe9          m_pcPropertyDesc->m_cRef -= 1;
00429fe9          
00429fec          if (m_cRef == 1)
00429fee              m_pcPropertyDesc->vtable->__vecDelDtor(1);
00429fee          
00429ff4          this->m_pcPropertyDesc = 0;
00429fe7      }
00429fe7      
00429ffa      class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
00429ffa      
00429fff      if (m_pcPropertyValue != 0)
00429fff      {
0042a001          uint32_t m_cRef_1 = m_pcPropertyValue->m_cRef;
0042a001          m_pcPropertyValue->m_cRef -= 1;
0042a001          
0042a004          if (m_cRef_1 == 1)
0042a006              m_pcPropertyValue->vtable->__vecDelDtor(1);
0042a006          
0042a00c          this->m_pcPropertyValue = nullptr;
00429fff      }
00429fff      
0042a019      if (arg2 != 0)
0042a019      {
0042a01b          this->m_pcPropertyDesc = arg2;
0042a01d          arg2->m_cRef += 1;
0042a022          BaseProperty::InitToDefaultValue(this);
0042a019      }
0042a019      
0042a027      class BasePropertyDesc* eax_2;
0042a027      eax_2 = 1;
0042a02a      return 1;
00429fe0  }

0042a02d                                         90 90 90                                                               ...

0042a030  uint8_t __thiscall BaseProperty::SetPropertyName(class BaseProperty* this, uint32_t const arg2)

0042a030  {
0042a031      uint32_t const ebx = arg2;
0042a037      class BasePropertyDesc* esi = nullptr;
0042a037      
0042a03e      if (ebx != 0)
0042a03e      {
0042a044          MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0042a049          uint32_t const edi_1 = arg2;
0042a04f          int32_t eax_1;
0042a04f          
0042a04f          if (edi_1 == 0)
0042a04f          {
0042a07d              eax_1 = 0;
0042a080              return 0;
0042a04f          }
0042a04f          
0042a059          esi = MasterProperty::AccessPropertyDesc(edi_1, ebx);
0042a059          
0042a05f          if (esi == 0)
0042a05f          {
0042a077              *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
0042a07d              eax_1 = 0;
0042a080              return 0;
0042a05f          }
0042a05f          
0042a063          *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
0042a03e      }
0042a03e      
0042a072      return BaseProperty::SetPropertyDesc(this, esi);
0042a030  }

0042a083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0042a090  void __thiscall BaseProperty::Serialize(class BaseProperty* this, class Archive* arg2)

0042a090  {
0042a096      uint32_t* eax;
0042a096      eax = arg2->m_flags;
0042a096      
0042a0a3      if ((1 & eax) != 0)
0042a0a3      {
0042a0a5          class BasePropertyDesc* m_pcPropertyDesc = this->m_pcPropertyDesc;
0042a0aa          uint32_t m_propertyName_1;
0042a0aa          
0042a0aa          if (m_pcPropertyDesc != 0)
0042a0b0              m_propertyName_1 = m_pcPropertyDesc->m_propertyName;
0042a0aa          else
0042a0ac              m_propertyName_1 = 0;
0042a0ac          
0042a0b7          Archive::CheckAlignment(arg2, 4);
0042a0c0          eax = Archive::GetBytes(arg2, 4);
0042a0c0          
0042a0cc          if ((eax != 0 && (arg2->m_flags & 1) != 0))
0042a0ce              *(uint32_t*)eax = m_propertyName_1;
0042a0a3      }
0042a0a3      
0042a0d1      eax = arg2->m_flags;
0042a0d4      eax = !(eax);
0042a0d4      
0042a0d8      if ((1 & eax) == 0)
0042a0d8      {
0042a149      label_42a149:
0042a149          class BasePropertyDesc* m_pcPropertyDesc_2 = this->m_pcPropertyDesc;
0042a149          
0042a14d          if (m_pcPropertyDesc_2 != 0)
0042a14d          {
0042a14f              uint32_t m_propertyName = m_pcPropertyDesc_2->m_propertyName;
0042a14f              
0042a154              if (m_propertyName != 0)
0042a154              {
0042a156                  class BasePropertyValue* m_pcPropertyValue_1 = this->m_pcPropertyValue;
0042a156                  
0042a15b                  if (m_pcPropertyValue_1 == 0)
0042a15b                  {
0042a15f                      Archive::RaiseError(arg2);
0042a167                      return;
0042a15b                  }
0042a15b                  
0042a16a                  m_pcPropertyValue_1->vtable->Serialize(arg2, m_propertyName);
0042a154              }
0042a14d          }
0042a14d          
0042a14d          return;
0042a0d8      }
0042a0d8      
0042a0de      Archive::CheckAlignment(arg2, 4);
0042a0e7      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
0042a0ee      class Archive* ecx_4;
0042a0ee      
0042a0ee      if (eax_1 == 0)
0042a101          ecx_4 = arg2;
0042a0ee      else if ((arg2->m_flags & 1) == 0)
0042a0fd          ecx_4 = *(uint32_t*)eax_1;
0042a0f3      else
0042a0f3      {
0042a0f5          ecx_4 = arg2;
0042a0f9          *(uint32_t*)eax_1 = ecx_4;
0042a0f3      }
0042a0f3      
0042a10f      if (BaseProperty::SetPropertyName(this, ecx_4) == 0)
0042a113          Archive::RaiseError(arg2);
0042a113      
0042a118      class BasePropertyDesc* m_pcPropertyDesc_1 = this->m_pcPropertyDesc;
0042a118      
0042a11c      if (m_pcPropertyDesc_1 != 0)
0042a11c      {
0042a123          if (m_pcPropertyDesc_1->m_propertyName != 0)
0042a123          {
0042a125              class BasePropertyValue* m_pcPropertyValue = this->m_pcPropertyValue;
0042a125              
0042a12a              if (m_pcPropertyValue != 0)
0042a12a              {
0042a12c                  uint32_t m_cRef = m_pcPropertyValue->m_cRef;
0042a12c                  
0042a131                  if (m_cRef != 1)
0042a131                  {
0042a134                      m_pcPropertyValue->m_cRef = (m_cRef - 1);
0042a134                      
0042a137                      if (m_cRef == 1)
0042a139                          m_pcPropertyValue->vtable->__vecDelDtor(1);
0042a139                      
0042a146                      this->m_pcPropertyValue = this->m_pcPropertyValue->vtable->Copy();
0042a131                  }
0042a12a              }
0042a123          }
0042a123          
0042a123          goto label_42a149;
0042a11c      }
0042a090  }

0042a177                                                                       90 90 90 90 90 90 90 90 90                         .........

0042a180  uint8_t __fastcall BaseProperty::FromFileNode(class BaseProperty* this, class PFileNode const* arg2)

0042a180  {
0042a180      class BaseProperty* this_1 = this;
0042a182      class PFileNode* this_4 = arg2;
0042a182      
0042a18b      if (this_4 != 0)
0042a18b      {
0042a191          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042a196          arg2 = PStringBase<char>::s_NullBuffer_1;
0042a19d          class PStringBase<char> this_2 = &PStringBase<char>::s_NullBuffer_1[-1];
0042a19e          InterlockedIncrement(this_2);
0042a1a8          this_2 = &arg2;
0042a1ab          class PStringBase<char>* eax_2;
0042a1ab          uint32_t* edx_1;
0042a1ab          eax_2 = PFileNode::GetNameAsPString(this_4, this_2);
0042a1b4          this_2 = &this_1;
0042a1b9          class PFileNode* this_5 = &arg2;
0042a1ba          uint8_t eax_3;
0042a1ba          class PFileNode* this_6;
0042a1ba          eax_3 = MasterProperty::InqPropertyNameEnumStatic(eax_2, edx_1);
0042a1ba          
0042a1c4          if (eax_3 != 0)
0042a1c4          {
0042a1e7              this_2 = this_1;
0042a1ea              uint8_t eax_6;
0042a1ea              class PStringBase<char> this_3;
0042a1ea              eax_6 = BaseProperty::SetPropertyName(this, this_2);
0042a1ea              
0042a1f1              if (eax_6 != 0)
0042a1f1              {
0042a232                  this_2 = this_4;
0042a23c                  class PFileNode const** ecx_8 = &arg2;
0042a23c                  
0042a240                  if (BaseProperty::ValueFromFileNode(this, this_2) == 0)
0042a240                  {
0042a242                      PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_8);
0042a247                      int32_t eax_8;
0042a247                      eax_8 = 0;
0042a24c                      return 0;
0042a240                  }
0042a240                  
0042a24f                  PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_8);
0042a255                  int32_t eax_9;
0042a255                  eax_9 = 1;
0042a259                  return 1;
0042a1f1              }
0042a1f1              
0042a1f3              this_2 = this_3;
0042a1f6              this_5 = "unable to initialize property";
0042a1fb              PStringBase<char>::PStringBase<char>(&this_2, this_5);
0042a200              this_5 = this_4;
0042a201              PFileNode::ReportError(this_5, this_2);
0042a1c4          }
0042a1c4          else
0042a1c4          {
0042a1ca              this_2 = arg2;
0042a1cb              this_5 = this_6;
0042a1d3              PStringBase<char>::PStringBase<char>(&this_5, "invalid property name '%s'");
0042a1d9              PFileNode::ReportError(this_4, this_5);
0042a1c4          }
0042a1c4          
0042a20d          void* __offset(PFileNode, -0x14) esi_1 = ((char*)arg2 - 0x14);
0042a213          this_2 = ((char*)esi_1 + 4);
0042a213          
0042a220          if ((InterlockedDecrement(this_2) == 0 && esi_1 != 0))
0042a220          {
0042a222              int32_t edx_2 = *(int32_t*)((char*)ADJ(esi_1) + -0x14);
0042a224              this_2 = 1;
0042a228              *(uint32_t*)edx_2(this_2);
0042a220          }
0042a18b      }
0042a18b      
0042a22a      int32_t eax;
0042a22a      eax = 0;
0042a22f      return 0;
0042a180  }

0042a25c                                                                                      90 90 90 90                              ....

0042a260  uint8_t __thiscall BasePropertyDesc::InqPropertyEnum(class BasePropertyDesc const* this, uint32_t const arg2, class PStringBase<char>* arg3)

0042a260  {
0042a260      uint32_t m_propertyType = this->m_propertyType;
0042a260      
0042a266      if (m_propertyType == 9)
0042a27e          return EnumMapper::GetStringByDID(this->m_data, arg2, arg3);
0042a27e      
0042a284      if (m_propertyType != 0x14)
0042a284      {
0042a29b          m_propertyType = 0;
0042a29d          return 0;
0042a284      }
0042a284      
0042a28e      class PStringBase<char>* var_4_1 = arg3;
0042a28f      uint32_t const var_8_1 = arg2;
0042a298      class PStringBase<char>* edx;
0042a298      return MasterProperty::InqPropertyNameStringStatic(arg3, edx);
0042a260  }


0042a2a0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>* this, uint32_t arg2)

0042a2a0  {
0042a2a3      class HashTableData<unsigned long,AvailableProperty>** m_buckets = this->m_buckets;
0042a2ab      this->vtable = 0x797908;
0042a2ab      
0042a2b1      if (m_buckets != &this->m_aInplaceBuckets)
0042a2b4          operator delete[](m_buckets);
0042a2b4      
0042a2be      this->m_buckets = nullptr;
0042a2c1      this->m_firstInterestingBucket = nullptr;
0042a2c4      this->m_numBuckets = 0;
0042a2c7      this->m_numElements = 0;
0042a2c7      
0042a2cf      if ((arg2 & 1) != 0)
0042a2d2          operator delete(this);
0042a2d2      
0042a2dd      return this;
0042a2a0  }


0042a2e0  void __thiscall BasePropertyDesc::GetSubDataIDs(class BasePropertyDesc const* this, class QualifiedDataIDArray* arg2)

0042a2e0  {
0042a2e3      void* eax = (this->m_propertyType - 9);
0042a2f5      void var_8;
0042a2f5      
0042a2f5      switch (eax)
0042a2f5      {
0042a303          case nullptr:
0042a303          case 6:
0042a303          case 7:
0042a303          case 0xb:
0042a303          {
0042a303              switch (eax)
0042a303              {
0042a320                  case nullptr:
0042a320                  case 6:
0042a320                  case 7:
0042a320                  case 0xb:
0042a320                  {
0042a320                      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->m_data, 0), 0);
0042a320                      break;
0042a320                  }
0042a303              }
0042a303              break;
0042a303          }
0042a2f5      }
0042a2e0  }

0042a32b                                   90                                                                         .
0042a32c  uint32_t jump_table_42a32c[0x2] = 
0042a32c  {
0042a32c      [0x0] =  0x0042a2fc
0042a330      [0x1] =  0x0042a325
0042a334  }
0042a334  uint8_t lookup_table_42a334[0xc] = 
0042a334  {
0042a334      [0x0] =  0x00
0042a335      [0x1] =  0x01
0042a336      [0x2] =  0x01
0042a337      [0x3] =  0x01
0042a338      [0x4] =  0x01
0042a339      [0x5] =  0x01
0042a33a      [0x6] =  0x00
0042a33b      [0x7] =  0x00
0042a33c      [0x8] =  0x01
0042a33d      [0x9] =  0x01
0042a33e      [0xa] =  0x01
0042a33f      [0xb] =  0x00
0042a340  }
0042a340  uint32_t jump_table_42a340[0x2] = 
0042a340  {
0042a340      [0x0] =  0x0042a30a
0042a344      [0x1] =  0x0042a325
0042a348  }
0042a348  uint8_t lookup_table_42a348[0xc] = 
0042a348  {
0042a348      [0x0] =  0x00
0042a349      [0x1] =  0x01
0042a34a      [0x2] =  0x01
0042a34b      [0x3] =  0x01
0042a34c      [0x4] =  0x01
0042a34d      [0x5] =  0x01
0042a34e      [0x6] =  0x00
0042a34f      [0x7] =  0x00
0042a350      [0x8] =  0x01
0042a351      [0x9] =  0x01
0042a352      [0xa] =  0x01
0042a353      [0xb] =  0x00
0042a354  }

0042a354                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0042a360  void __thiscall BasePropertyDesc::Serialize(class BasePropertyDesc* this, class Archive* arg2)

0042a360  {
0042a362      class Archive* esi = arg2;
0042a36d      Archive::CheckAlignment(esi, 4);
0042a376      uint8_t* eax = Archive::GetBytes(esi, 4);
0042a376      
0042a37d      if (eax != 0)
0042a37d      {
0042a383          if ((esi->m_flags & 1) == 0)
0042a38e              this->m_propertyName = *(uint32_t*)eax;
0042a383          else
0042a388              *(uint32_t*)eax = this->m_propertyName;
0042a37d      }
0042a37d      
0042a395      Archive::CheckAlignment(esi, 4);
0042a39e      uint8_t* eax_1 = Archive::GetBytes(esi, 4);
0042a39e      
0042a3a5      if (eax_1 != 0)
0042a3a5      {
0042a3ab          if ((esi->m_flags & 1) == 0)
0042a3b6              this->m_propertyType = *(uint32_t*)eax_1;
0042a3ab          else
0042a3b0              *(uint32_t*)eax_1 = this->m_propertyType;
0042a3a5      }
0042a3a5      
0042a3bd      Archive::CheckAlignment(esi, 4);
0042a3c6      uint8_t* eax_2 = Archive::GetBytes(esi, 4);
0042a3c6      
0042a3cd      if (eax_2 != 0)
0042a3cd      {
0042a3d3          if ((esi->m_flags & 1) == 0)
0042a3de              this->m_propertyGroup = *(uint32_t*)eax_2;
0042a3d3          else
0042a3d8              *(uint32_t*)eax_2 = this->m_propertyGroup;
0042a3cd      }
0042a3cd      
0042a3e5      Archive::CheckAlignment(esi, 4);
0042a3ee      uint8_t* eax_3 = Archive::GetBytes(esi, 4);
0042a3ee      
0042a3f5      if (eax_3 != 0)
0042a3f5      {
0042a3fb          if ((esi->m_flags & 1) == 0)
0042a406              this->m_propertyProvider = *(uint32_t*)eax_3;
0042a3fb          else
0042a400              *(uint32_t*)eax_3 = this->m_propertyProvider;
0042a3f5      }
0042a3f5      
0042a40d      Archive::CheckAlignment(esi, 4);
0042a416      uint8_t* eax_4 = Archive::GetBytes(esi, 4);
0042a416      
0042a41d      if (eax_4 != 0)
0042a41d      {
0042a423          if ((esi->m_flags & 1) == 0)
0042a42e              this->m_data = *(uint32_t*)eax_4;
0042a423          else
0042a428              *(uint32_t*)eax_4 = this->m_data;
0042a41d      }
0042a41d      
0042a435      Archive::CheckAlignment(esi, 4);
0042a43e      uint8_t* eax_5;
0042a43e      uint32_t edx_6;
0042a43e      eax_5 = Archive::GetBytes(esi, 4);
0042a43e      
0042a445      if (eax_5 != 0)
0042a445      {
0042a44b          if ((esi->m_flags & 1) == 0)
0042a456              this->m_ePatchFlags = *(uint32_t*)eax_5;
0042a44b          else
0042a450              *(uint32_t*)eax_5 = this->m_ePatchFlags;
0042a445      }
0042a445      
0042a459      eax_5 = esi->m_flags;
0042a459      
0042a45e      if ((eax_5 & 1) == 0)
0042a45e      {
0042a489          eax_5 = !(eax_5);
0042a489          
0042a48d          if ((eax_5 & 1) != 0)
0042a48d          {
0042a48f              class BasePropertyValue* m_defaultValue_1 = this->m_defaultValue;
0042a48f              
0042a494              if (m_defaultValue_1 != 0)
0042a494              {
0042a496                  uint32_t m_cRef = m_defaultValue_1->m_cRef;
0042a496                  m_defaultValue_1->m_cRef -= 1;
0042a496                  
0042a499                  if (m_cRef == 1)
0042a49b                      m_defaultValue_1->vtable->__vecDelDtor(1);
0042a49b                  
0042a4a1                  this->m_defaultValue = nullptr;
0042a494              }
0042a494              
0042a4ae              arg2 = 0;
0042a4b3              eax_5 = Serializer::SerializeObject(&arg2, esi);
0042a4b8              eax_5 = arg2;
0042a4b8              
0042a4c1              if (eax_5 != 0)
0042a4c1              {
0042a4c7                  eax_5 = MasterProperty::AllocatePropertyValue(this->m_propertyType);
0042a4d1                  this->m_defaultValue = eax_5;
0042a4d1                  
0042a4d4                  if (eax_5 != 0)
0042a4df                      eax_5 = *(uint32_t*)eax_5->Serialize(esi, this->m_propertyName);
0042a4c1              }
0042a48d          }
0042a45e      }
0042a45e      else
0042a45e      {
0042a469          class BasePropertyValue* eax_6;
0042a469          eax_6 = this->m_defaultValue != 0;
0042a46e          arg2 = eax_6;
0042a472          eax_5 = Serializer::SerializeObject(&arg2, esi);
0042a477          class BasePropertyValue* m_defaultValue = this->m_defaultValue;
0042a477          
0042a47f          if (m_defaultValue != 0)
0042a4df              eax_5 = m_defaultValue->vtable->Serialize(esi, this->m_propertyName);
0042a45e      }
0042a45e      
0042a4e2      eax_5 = esi->m_flags;
0042a4e2      
0042a4e7      if ((eax_5 & 1) == 0)
0042a4e7      {
0042a512          eax_5 = !(eax_5);
0042a512          
0042a516          if ((eax_5 & 1) != 0)
0042a516          {
0042a518              class BasePropertyValue* m_minValue_1 = this->m_minValue;
0042a518              
0042a51d              if (m_minValue_1 != 0)
0042a51d              {
0042a51f                  uint32_t m_cRef_1 = m_minValue_1->m_cRef;
0042a51f                  m_minValue_1->m_cRef -= 1;
0042a51f                  
0042a522                  if (m_cRef_1 == 1)
0042a524                      m_minValue_1->vtable->__vecDelDtor(1);
0042a524                  
0042a52a                  this->m_minValue = nullptr;
0042a51d              }
0042a51d              
0042a537              arg2 = 0;
0042a53c              eax_5 = Serializer::SerializeObject(&arg2, esi);
0042a541              eax_5 = arg2;
0042a541              
0042a54a              if (eax_5 != 0)
0042a54a              {
0042a550                  eax_5 = MasterProperty::AllocatePropertyValue(this->m_propertyType);
0042a55a                  this->m_minValue = eax_5;
0042a55a                  
0042a55d                  if (eax_5 != 0)
0042a568                      eax_5 = *(uint32_t*)eax_5->Serialize(esi, this->m_propertyName);
0042a54a              }
0042a516          }
0042a4e7      }
0042a4e7      else
0042a4e7      {
0042a4f2          edx_6 = this->m_minValue != 0;
0042a4f7          arg2 = edx_6;
0042a4fb          eax_5 = Serializer::SerializeObject(&arg2, esi);
0042a500          class BasePropertyValue* m_minValue = this->m_minValue;
0042a500          
0042a508          if (m_minValue != 0)
0042a568              eax_5 = m_minValue->vtable->Serialize(esi, this->m_propertyName);
0042a4e7      }
0042a4e7      
0042a56b      eax_5 = esi->m_flags;
0042a56b      
0042a570      if ((eax_5 & 1) == 0)
0042a570      {
0042a59b          eax_5 = !(eax_5);
0042a59b          
0042a59f          if ((eax_5 & 1) != 0)
0042a59f          {
0042a5a1              class BasePropertyValue* m_maxValue_1 = this->m_maxValue;
0042a5a1              
0042a5a6              if (m_maxValue_1 != 0)
0042a5a6              {
0042a5a8                  uint32_t m_cRef_2 = m_maxValue_1->m_cRef;
0042a5a8                  m_maxValue_1->m_cRef -= 1;
0042a5a8                  
0042a5ab                  if (m_cRef_2 == 1)
0042a5ad                      m_maxValue_1->vtable->__vecDelDtor(1);
0042a5ad                  
0042a5b3                  this->m_maxValue = nullptr;
0042a5a6              }
0042a5a6              
0042a5c0              arg2 = 0;
0042a5c5              Serializer::SerializeObject(&arg2, esi);
0042a5c5              
0042a5d3              if (arg2 != 0)
0042a5d3              {
0042a5d9                  struct BasePropertyValue::VTable** eax_16 = MasterProperty::AllocatePropertyValue(this->m_propertyType);
0042a5e3                  this->m_maxValue = eax_16;
0042a5e3                  
0042a5e6                  if (eax_16 != 0)
0042a5eb                      *(uint32_t*)eax_16->Serialize(esi, this->m_propertyName);
0042a5d3              }
0042a59f          }
0042a570      }
0042a570      else
0042a570      {
0042a57b          edx_6 = this->m_maxValue != 0;
0042a580          arg2 = edx_6;
0042a584          Serializer::SerializeObject(&arg2, esi);
0042a589          class BasePropertyValue* m_maxValue = this->m_maxValue;
0042a589          
0042a591          if (m_maxValue != 0)
0042a596              m_maxValue->vtable->Serialize(esi, this->m_propertyName);
0042a570      }
0042a570      
0042a5f8      Archive::CheckAlignment(esi, 4);
0042a601      uint8_t* eax_17 = Archive::GetBytes(esi, 4);
0042a601      
0042a608      if (eax_17 != 0)
0042a608      {
0042a60e          if ((esi->m_flags & 1) == 0)
0042a61c              this->m_fPredictionTimeout = *(uint32_t*)eax_17;
0042a60e          else
0042a616              *(uint32_t*)eax_17 = this->m_fPredictionTimeout;
0042a608      }
0042a608      
0042a622      int32_t ebx;
0042a622      ebx = this->m_inheritanceType;
0042a62c      Archive::CheckAlignment(esi, 1);
0042a635      uint8_t* eax_19 = Archive::GetBytes(esi, 1);
0042a635      
0042a63c      if (eax_19 != 0)
0042a63c      {
0042a642          if ((esi->m_flags & 1) == 0)
0042a648              ebx = *(uint8_t*)eax_19;
0042a642          else
0042a644              *(uint8_t*)eax_19 = ebx;
0042a63c      }
0042a63c      
0042a64e      if ((esi->m_flags & 5) == 0)
0042a653          this->m_inheritanceType = ((uint32_t)ebx);
0042a653      
0042a659      ebx = this->m_datFileType;
0042a663      Archive::CheckAlignment(esi, 1);
0042a66c      uint8_t* eax_20 = Archive::GetBytes(esi, 1);
0042a66c      
0042a673      if (eax_20 != 0)
0042a673      {
0042a679          if ((esi->m_flags & 1) == 0)
0042a67f              ebx = *(uint8_t*)eax_20;
0042a679          else
0042a67b              *(uint8_t*)eax_20 = ebx;
0042a673      }
0042a673      
0042a685      if ((esi->m_flags & 5) == 0)
0042a68a          this->m_datFileType = ((uint32_t)ebx);
0042a68a      
0042a690      ebx = this->m_propagationType;
0042a69a      Archive::CheckAlignment(esi, 1);
0042a6a3      uint8_t* eax_21 = Archive::GetBytes(esi, 1);
0042a6a3      
0042a6aa      if (eax_21 != 0)
0042a6aa      {
0042a6b0          if ((esi->m_flags & 1) == 0)
0042a6b6              ebx = *(uint8_t*)eax_21;
0042a6b0          else
0042a6b2              *(uint8_t*)eax_21 = ebx;
0042a6aa      }
0042a6aa      
0042a6bc      if ((esi->m_flags & 5) == 0)
0042a6c1          this->m_propagationType = ((uint32_t)ebx);
0042a6c1      
0042a6c7      ebx = this->m_cachingType;
0042a6d1      Archive::CheckAlignment(esi, 1);
0042a6da      uint8_t* eax_23 = Archive::GetBytes(esi, 1);
0042a6da      
0042a6e1      if (eax_23 != 0)
0042a6e1      {
0042a6e7          if ((esi->m_flags & 1) == 0)
0042a6ed              ebx = *(uint8_t*)eax_23;
0042a6e7          else
0042a6e9              *(uint8_t*)eax_23 = ebx;
0042a6e1      }
0042a6e1      
0042a6f3      if ((esi->m_flags & 5) == 0)
0042a6f8          this->m_cachingType = ((uint32_t)ebx);
0042a6f8      
0042a706      Serializer::SerializeObject(&this->m_bRequired, esi);
0042a713      Serializer::SerializeObject(&this->m_bReadOnly, esi);
0042a720      Serializer::SerializeObject(&this->m_bNoCheckpoint, esi);
0042a72d      Serializer::SerializeObject(&this->m_bRecorded, esi);
0042a73a      Serializer::SerializeObject(&this->m_bDoNotReplay, esi);
0042a747      Serializer::SerializeObject(&this->m_bAbsoluteTimeStamp, esi);
0042a754      Serializer::SerializeObject(&this->m_bGroupable, esi);
0042a761      Serializer::SerializeObject(&this->m_bPropagateToChildren, esi);
0042a76d      AvailablePropertySet::Serialize(&this->m_availableProperties, esi);
0042a360  }

0042a778                                                                          90 90 90 90 90 90 90 90                          ........

0042a780  void BasePropertyDesc::InitializeAllAvailablePropertySet()

0042a780  {
0042a788      int32_t* var_10;
0042a788      MasterPropertyGrabber::MasterPropertyGrabber(&var_10);
0042a78d      int32_t* ebp = var_10;
0042a78d      
0042a793      if (ebp != 0)
0042a793      {
0042a7a3          void __return;
0042a7a3          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_1;
0042a7a3          class HashTableData<unsigned long,DBOCache *>** m_buckets;
0042a7a3          eax_1 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&ebp[0x55], &__return);
0042a7a8          class HashTableData<unsigned long,DBOCache *>* i_1 = eax_1->m_currElement;
0042a7ad          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_1->m_currHashTable;
0042a7af          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_1->m_currBucket;
0042a7af          
0042a7b2          if (i_1 != 0)
0042a7b2          {
0042a7b4              while (true)
0042a7b4              {
0042a7b4                  uint32_t m_hashKey = i_1->m_hashKey;
0042a7b4                  
0042a7b8                  if (m_hashKey != 0)
0042a7b8                  {
0042a7ba                      uint32_t m_hashKey_1 = m_hashKey;
0042a7c0                      m_buckets = AvailablePropertySet::AddProperty(&BasePropertyDesc::s_allAvailableProperties, m_buckets);
0042a7b8                  }
0042a7b8                  
0042a7c5                  i_1 = i_1->m_hashNext;
0042a7c5                  
0042a7ca                  if (i_1 == 0)
0042a7ca                  {
0042a7cf                      m_buckets = m_currHashTable->m_buckets;
0042a7e0                      class HashTableData<unsigned long,DBOCache *>* i;
0042a7e0                      
0042a7e0                      do
0042a7e0                      {
0042a7d5                          m_currBucket = &m_currBucket[1];
0042a7d5                          
0042a7da                          if (m_currBucket == &m_buckets[m_currHashTable->m_numBuckets])
0042a7da                              goto label_42a7ed;
0042a7da                          
0042a7dc                          i = *(uint32_t*)m_currBucket;
0042a7e0                      } while (i == 0);
0042a7e0                      
0042a7e2                      i_1 = i;
0042a7e2                      
0042a7e6                      if (i_1 == 0)
0042a7e6                          break;
0042a7ca                  }
0042a7b4              }
0042a7b2          }
0042a7b2          
0042a7ed      label_42a7ed:
0042a7ed          *(uint32_t*)(*(uint32_t*)ebp + 0x14)();
0042a793      }
0042a780  }

0042a7f8                                                                          90 90 90 90 90 90 90 90                          ........

0042a800  class AvailablePropertySet* __fastcall BasePropertyDesc::GetAvailablePropertySet(class BasePropertyDesc const* this)

0042a800  {
0042a808      if (this->m_bAllAvailable == 0)
0042a821          return &this->m_availableProperties;
0042a821      
0042a811      if (BasePropertyDesc::s_allAvailableProperties.m_reqHash.m_intrusiveTable.m_numElements == 0)
0042a813          BasePropertyDesc::InitializeAllAvailablePropertySet();
0042a813      
0042a81d      return 0x817968;
0042a800  }

0042a822        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0042a830  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>* this, uint32_t arg2)

0042a830  {
0042a83b      arg2 = arg2;
0042a83f      uint8_t edx = ((int8_t)arg2);
0042a843      this->m_buckets = nullptr;
0042a846      this->m_firstInterestingBucket = nullptr;
0042a849      this->m_numBuckets = 0;
0042a84c      this->m_numElements = 0;
0042a850      this->vtable = 0x797908;
0042a856      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0042a869      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0042a869      
0042a873      if (eax == bucketSizesEnd_1)
0042a875          eax -= 4;
0042a875      
0042a878      uint32_t eax_1 = *(uint32_t*)eax;
0042a87d      this->m_numBuckets = eax_1;
0042a87d      
0042a880      if (eax_1 > 0x17)
0042a896          this->m_buckets = operator new[]((eax_1 << 2));
0042a880      else
0042a885          this->m_buckets = &this->m_aInplaceBuckets;
0042a885      
0042a89c      class HashTableData<unsigned long,AvailableProperty>** m_buckets = this->m_buckets;
0042a89f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0042a8a5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0042a8b6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0042a830  }

0042a8bf                                                                                               90                                 .

0042a8c0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>* this, uint32_t arg2)

0042a8c0  {
0042a8ca      if (arg2 == this->m_numBuckets)
0042a8ca      {
0042a8cc          uint32_t eax;
0042a8cc          eax = 0;
0042a8cf          return 0;
0042a8ca      }
0042a8ca      
0042a8d9      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >* m_hashNext_2 = nullptr;
0042a8d9      
0042a8de      while (this->m_numElements != 0)
0042a8de      {
0042a8e9          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0042a8ee          class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >* m_hashNext_3;
0042a8ee          int32_t* m_firstInterestingBucket_2;
0042a8ee          
0042a8ee          if (this->m_firstInterestingBucket == ecx_1)
0042a8ee          {
0042a901          label_42a901:
0042a901              m_firstInterestingBucket_2 = nullptr;
0042a903              m_hashNext_3 = nullptr;
0042a8ee          }
0042a8ee          else
0042a8ee          {
0042a8f0              while (true)
0042a8f0              {
0042a8f0                  class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0042a8f0                  
0042a8f5                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0042a8f5                  {
0042a907                      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0042a90a                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
0042a90c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0042a90c                      break;
0042a8f5                  }
0042a8f5                  
0042a8fc                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0042a8fc                  
0042a8ff                  if (&m_firstInterestingBucket[1] == ecx_1)
0042a8ff                      goto label_42a901;
0042a8f0              }
0042a8ee          }
0042a8ee          
0042a90e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0042a90e          
0042a912          if (eax_4 == m_hashNext_3)
0042a924              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0042a912          else
0042a912          {
0042a91b              void* edx_2;
0042a91b              
0042a91b              do
0042a91b              {
0042a914                  edx_2 = eax_4;
0042a916                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0042a91b              } while (eax_4 != m_hashNext_3);
0042a91b              
0042a91f              if (edx_2 != 0)
0042a92b                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0042a91f              else
0042a924                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0042a912          }
0042a912          
0042a92e          this->m_numElements -= 1;
0042a931          m_hashNext_3->m_hashNext = m_hashNext_2;
0042a937          m_hashNext_2 = m_hashNext_3;
0042a8de      }
0042a8de      
0042a93b      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_buckets = this->m_buckets;
0042a93b      
0042a943      if (m_buckets != &this->m_aInplaceBuckets)
0042a946          operator delete[](m_buckets);
0042a946      
0042a955      this->m_buckets = nullptr;
0042a958      this->m_firstInterestingBucket = nullptr;
0042a95b      this->m_numBuckets = 0;
0042a95e      this->m_numElements = 0;
0042a961      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
0042a968      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >* m_hashNext_1 = m_hashNext_2;
0042a96a      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** eax_7;
0042a96a      
0042a96a      if (m_hashNext_2 != 0)
0042a96a      {
0042a99a          class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >* m_hashNext;
0042a99a          
0042a99a          do
0042a99a          {
0042a97a              m_hashNext = m_hashNext_1->m_hashNext;
0042a97d              eax_7 = &this->m_buckets[(COMBINE(0, m_hashNext_1->m_hashKey) % this->m_numBuckets)];
0042a982              m_hashNext_1->m_hashNext = *(uint32_t*)eax_7;
0042a985              *(uint32_t*)eax_7 = m_hashNext_1;
0042a985              
0042a98a              if (eax_7 < this->m_firstInterestingBucket)
0042a98c                  this->m_firstInterestingBucket = eax_7;
0042a98c              
0042a995              this->m_numElements += 1;
0042a998              m_hashNext_1 = m_hashNext;
0042a99a          } while (m_hashNext != 0);
0042a96a      }
0042a96a      
0042a99f      eax_7 = 1;
0042a9a2      return 1;
0042a8c0  }

0042a9a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0042a9b0  void* __thiscall HashTable<unsigned long,AvailableProperty,0>::`scalar deleting destructor'(class HashTable<unsigned long,AvailableProperty,0>* this, uint32_t arg2)

0042a9b0  {
0042a9b9      this->vtable = 0x79790c;
0042a9bf      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0042a9c4      class HashTableData<unsigned long,AvailableProperty>** m_buckets = this->m_intrusiveTable.m_buckets;
0042a9b4      this->m_intrusiveTable.vtable = 0x797908;
0042a9b4      
0042a9d2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0042a9d5          operator delete[](m_buckets);
0042a9d5      
0042a9b4      this->m_intrusiveTable.m_buckets = nullptr;
0042a9b4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0042a9b4      this->m_intrusiveTable.m_numBuckets = 0;
0042a9b4      this->m_intrusiveTable.m_numElements = 0;
0042a9b4      
0042a9f0      if ((arg2 & 1) != 0)
0042a9f3          operator delete(this);
0042a9f3      
0042a9ff      return this;
0042a9b0  }

0042aa02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0042aa10  void __fastcall BasePropertyDesc::BasePropertyDesc(class BasePropertyDesc* this)

0042aa10  {
0042aa1b      this->m_cRef = 1;
0042aa1e      this->vtable = 0x797910;
0042aa24      this->m_propertyName = 0;
0042aa27      this->m_propertyType = 0;
0042aa2a      this->m_propertyGroup = 0;
0042aa2d      this->m_propertyProvider = 1;
0042aa30      __builtin_memset(&this->m_data, 0, 0x14);
0042aa44      this->m_availableProperties.m_reqHash.vtable = 0x79790c;
0042aa4b      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>(&this->m_availableProperties.m_reqHash.m_intrusiveTable, 0x17);
0042aa55      this->m_inheritanceType = Either;
0042aa5b      this->m_datFileType = SharedData;
0042aa61      this->m_propagationType = NetNotShared;
0042aa6b      this->m_cachingType = Global;
0042aa71      this->m_bRequired = 0;
0042aa77      this->m_bReadOnly = 0;
0042aa7d      this->m_bPropagateToChildren = 0;
0042aa83      this->m_bNoCheckpoint = 0;
0042aa89      this->m_bAbsoluteTimeStamp = 0;
0042aa8f      this->m_bGroupable = 0;
0042aa95      this->m_bAllAvailable = 0;
0042aa9b      this->m_bDoNotReplay = 0;
0042aaa1      this->m_bRecorded = 0;
0042aaa7      this->m_nMinElements = 0;
0042aaad      this->m_nMaxElements = 0xffff;
0042aab7      class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042aac2      this->m_strHelp.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0042aac8      InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0042aad4      this->m_fPredictionTimeout = 1.5f;
0042aa10  }

0042aadf                                                                                               90                                 .

0042aae0  void __fastcall BasePropertyDesc::~BasePropertyDesc(class BasePropertyDesc* this)

0042aae0  {
0042aae4      class BasePropertyValue* m_defaultValue = this->m_defaultValue;
0042aaec      this->vtable = 0x797910;
0042aaec      
0042aaf2      if (m_defaultValue != 0)
0042aaf2      {
0042aaf4          uint32_t m_cRef = m_defaultValue->m_cRef;
0042aaf4          m_defaultValue->m_cRef -= 1;
0042aaf4          
0042aaf7          if (m_cRef == 1)
0042aaf9              m_defaultValue->vtable->__vecDelDtor(1);
0042aaf9          
0042aaff          this->m_defaultValue = nullptr;
0042aaf2      }
0042aaf2      
0042ab02      class BasePropertyValue* m_minValue = this->m_minValue;
0042ab02      
0042ab07      if (m_minValue != 0)
0042ab07      {
0042ab09          uint32_t m_cRef_1 = m_minValue->m_cRef;
0042ab09          m_minValue->m_cRef -= 1;
0042ab09          
0042ab0c          if (m_cRef_1 == 1)
0042ab0e              m_minValue->vtable->__vecDelDtor(1);
0042ab0e          
0042ab14          this->m_minValue = nullptr;
0042ab07      }
0042ab07      
0042ab17      class BasePropertyValue* m_maxValue = this->m_maxValue;
0042ab17      
0042ab1c      if (m_maxValue != 0)
0042ab1c      {
0042ab1e          uint32_t m_cRef_2 = m_maxValue->m_cRef;
0042ab1e          m_maxValue->m_cRef -= 1;
0042ab1e          
0042ab21          if (m_cRef_2 == 1)
0042ab23              m_maxValue->vtable->__vecDelDtor(1);
0042ab23          
0042ab29          this->m_maxValue = nullptr;
0042ab1c      }
0042ab1c      
0042ab32      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_strHelp.m_charbuffer - 0x14);
0042ab32      
0042ab45      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0042ab4d          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0042ab4d      
0042ab54      this->m_availableProperties.m_reqHash.vtable = 0x79790c;
0042ab5b      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_availableProperties.m_reqHash.m_intrusiveTable);
0042ab60      class HashTableData<unsigned long,AvailableProperty>** m_buckets = this->m_availableProperties.m_reqHash.m_intrusiveTable.m_buckets;
0042ab4f      this->m_availableProperties.m_reqHash.m_intrusiveTable.vtable = 0x797908;
0042ab4f      
0042ab6e      if (m_buckets != &this->m_availableProperties.m_reqHash.m_intrusiveTable.m_aInplaceBuckets)
0042ab71          operator delete[](m_buckets);
0042ab71      
0042ab4f      this->m_availableProperties.m_reqHash.m_intrusiveTable.m_buckets = nullptr;
0042ab4f      this->m_availableProperties.m_reqHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0042ab4f      this->m_availableProperties.m_reqHash.m_intrusiveTable.m_numBuckets = 0;
0042ab4f      this->m_availableProperties.m_reqHash.m_intrusiveTable.m_numElements = 0;
0042ab86      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
0042aae0  }

0042ab8f                                               90                                                                 .

0042ab90  void* __thiscall BasePropertyDesc::`scalar deleting destructor'(class BasePropertyDesc* this, uint32_t arg2)

0042ab90  {
0042ab93      BasePropertyDesc::~BasePropertyDesc(this);
0042ab93      
0042ab9d      if ((arg2 & 1) != 0)
0042aba0          operator delete(this);
0042aba0      
0042abab      return this;
0042ab90  }

0042abae                                            90 90                                                                ..

0042abb0  uint8_t __thiscall Bitfield32PropertyValue::FromFileNode(class Bitfield32PropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

0042abb0  {
0042abb2      class PFileNode* esi = arg3;
0042abb2      
0042abbb      if (esi != 0)
0042abbb      {
0042abbd          class BasePropertyDesc* m_data_1 = arg2;
0042abc4          void* eax_2 = (m_data_1->m_propertyType - 9);
0042abca          arg3 = nullptr;
0042abdb          uint32_t* m_data;
0042abdb          
0042abdb          switch (eax_2)
0042abdb          {
0042abe5              case nullptr:
0042abe5              case 6:
0042abe5              case 7:
0042abe5              case 0xb:
0042abe5              {
0042abe5                  m_data = m_data_1->m_data;
0042abea                  uint8_t eax_4;
0042abea                  eax_4 = EnumeratedBitfield<unsigned __int64>::InitByDataID(&arg3, m_data);
0042abea                  
0042abf1                  if (eax_4 != 0)
0042abf1                  {
0042abf6                      m_data = &this->m_value;
0042abfc                      uint8_t eax_5 = EnumeratedBitfield<unsigned long>::FromFileNode(&arg3, esi, m_data);
0042ac01                      class PFileNode* ecx_3 = arg3;
0042ac07                      int32_t ebx;
0042ac07                      ebx = eax_5;
0042ac07                      
0042ac09                      if (ecx_3 != 0)
0042ac0b                          ecx_3->vtable->Serialize();
0042ac0b                      
0042ac15                      return ebx;
0042abf1                  }
0042abe5                  break;
0042abe5              }
0042abdb          }
0042abdb          
0042ac18          m_data = m_data_1;
0042ac20          PStringBase<char>::PStringBase<char>(&m_data, "There was a problem with the emp");
0042ac26          PFileNode::ReportError(esi, m_data);
0042ac2b          class PFileNode* ecx_5 = arg3;
0042ac2b          
0042ac34          if (ecx_5 != 0)
0042ac36              ecx_5->vtable->Serialize();
0042abbb      }
0042abbb      
0042ac3d      int32_t eax;
0042ac3d      eax = 0;
0042ac40      return 0;
0042abb0  }

0042ac43           90                                                                                         .
0042ac44  uint32_t jump_table_42ac44[0x2] = 
0042ac44  {
0042ac44      [0x0] =  0x0042abe2
0042ac48      [0x1] =  0x0042ac18
0042ac4c  }
0042ac4c  uint8_t lookup_table_42ac4c[0xc] = 
0042ac4c  {
0042ac4c      [0x0] =  0x00
0042ac4d      [0x1] =  0x01
0042ac4e      [0x2] =  0x01
0042ac4f      [0x3] =  0x01
0042ac50      [0x4] =  0x01
0042ac51      [0x5] =  0x01
0042ac52      [0x6] =  0x00
0042ac53      [0x7] =  0x00
0042ac54      [0x8] =  0x01
0042ac55      [0x9] =  0x01
0042ac56      [0xa] =  0x01
0042ac57      [0xb] =  0x00
0042ac58  }

0042ac58                                                                          90 90 90 90 90 90 90 90                          ........

0042ac60  uint8_t __thiscall Bitfield32PropertyValue::ToFileNode(class Bitfield32PropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

0042ac60  {
0042ac62      class PFileNode* m_data_2 = arg3;
0042ac62      
0042ac6b      if (m_data_2 != 0)
0042ac6b      {
0042ac6d          class BasePropertyDesc* m_data_1 = arg2;
0042ac74          void* eax_2 = (m_data_1->m_propertyType - 9);
0042ac7a          arg3 = nullptr;
0042ac8b          class PFileNode* m_data;
0042ac8b          
0042ac8b          switch (eax_2)
0042ac8b          {
0042ac95              case nullptr:
0042ac95              case 6:
0042ac95              case 7:
0042ac95              case 0xb:
0042ac95              {
0042ac95                  m_data = m_data_1->m_data;
0042ac9a                  uint8_t eax_4;
0042ac9a                  eax_4 = EnumeratedBitfield<unsigned __int64>::InitByDataID(&arg3, m_data);
0042ac9a                  
0042aca1                  if (eax_4 != 0)
0042aca1                  {
0042aca3                      uint32_t m_value = this->m_value;
0042aca6                      m_data = m_data_2;
0042acac                      uint8_t eax_5 = EnumeratedBitfield<unsigned long>::ToFileNode(&arg3, m_value, m_data);
0042acb1                      class PFileNode* ecx_3 = arg3;
0042acb7                      int32_t ebx;
0042acb7                      ebx = eax_5;
0042acb7                      
0042acb9                      if (ecx_3 != 0)
0042acbb                          ecx_3->vtable->Serialize();
0042acbb                      
0042acc5                      return ebx;
0042aca1                  }
0042ac95                  break;
0042ac95              }
0042ac8b          }
0042ac8b          
0042acc8          m_data = m_data_1;
0042acd0          PStringBase<char>::PStringBase<char>(&m_data, "There was a problem with the emp");
0042acd6          PFileNode::ReportError(m_data_2, m_data);
0042acdb          class PFileNode* ecx_5 = arg3;
0042acdb          
0042ace4          if (ecx_5 != 0)
0042ace6              ecx_5->vtable->Serialize();
0042ac6b      }
0042ac6b      
0042aced      int32_t eax;
0042aced      eax = 0;
0042acf0      return 0;
0042ac60  }

0042acf3                                                           90                                                         .
0042acf4  uint32_t jump_table_42acf4[0x2] = 
0042acf4  {
0042acf4      [0x0] =  0x0042ac92
0042acf8      [0x1] =  0x0042acc8
0042acfc  }
0042acfc  uint8_t lookup_table_42acfc[0xc] = 
0042acfc  {
0042acfc      [0x0] =  0x00
0042acfd      [0x1] =  0x01
0042acfe      [0x2] =  0x01
0042acff      [0x3] =  0x01
0042ad00      [0x4] =  0x01
0042ad01      [0x5] =  0x01
0042ad02      [0x6] =  0x00
0042ad03      [0x7] =  0x00
0042ad04      [0x8] =  0x01
0042ad05      [0x9] =  0x01
0042ad06      [0xa] =  0x01
0042ad07      [0xb] =  0x00
0042ad08  }

0042ad08                          90 90 90 90 90 90 90 90                                                          ........

0042ad10  class PStringBase<char>* __thiscall PStringBaseArray<char>::join(class PStringBaseArray<char> const* this, class PStringBase<char>* __return, class PStringBase<char> const* arg3)

0042ad10  {
0042ad10      class PStringBaseArray<char>* var_4 = this;
0042ad11      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042ad1e      var_4 = PStringBase<char>::s_NullBuffer_1;
0042ad29      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0042ad2b      uint32_t m_num = this->m_num;
0042ad2b      
0042ad30      if (m_num > 0)
0042ad30      {
0042ad3a          class PStringBase<char>* m_data;
0042ad3a          
0042ad3a          for (m_data = this->m_data; m_data != &m_data[(m_num - 1)]; m_data = &m_data[1])
0042ad3a          {
0042ad41              class PSRefBufferCharData<char>* m_charbuffer = m_data->m_charbuffer;
0042ad43              int32_t ecx = m_charbuffer->m_data[-4];
0042ad43              
0042ad49              if (ecx != 1)
0042ad52                  PStringBase<char>::append_n_chars(&var_4, m_charbuffer, (ecx - 1));
0042ad52              
0042ad57              class PSRefBufferCharData<char>* m_charbuffer_1 = arg3->m_charbuffer;
0042ad59              int32_t ecx_3 = m_charbuffer_1->m_data[-4];
0042ad59              
0042ad5f              if (ecx_3 != 1)
0042ad68                  PStringBase<char>::append_n_chars(&var_4, m_charbuffer_1, (ecx_3 - 1));
0042ad3a          }
0042ad3a          
0042ad75          class PSRefBufferCharData<char>* m_charbuffer_2 = m_data->m_charbuffer;
0042ad77          int32_t eax_1 = m_charbuffer_2->m_data[-4];
0042ad77          
0042ad7d          if (eax_1 != 1)
0042ad86              PStringBase<char>::append_n_chars(&var_4, m_charbuffer_2, (eax_1 - 1));
0042ad30      }
0042ad30      
0042ad8b      class PStringBaseArray<char>* eax_3 = var_4;
0042ad93      __return->m_charbuffer = eax_3;
0042ad99      InterlockedIncrement(&eax_3[-1]);
0042ad9f      void* __offset(PStringBaseArray<char>, -0x14) esi_2 = ((char*)var_4 - 0x14);
0042ad9f      
0042adb2      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0042adba          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0042adba      
0042adc2      return __return;
0042ad10  }

0042adc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0042add0  uint8_t __thiscall Bitfield32PropertyValue::GetValueAsString(class Bitfield32PropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

0042add0  {
0042add7      class BasePropertyDesc* ecx = arg2;
0042ade0      uint32_t eax_1 = (ecx->m_propertyType - 9);
0042ade6      class EnumeratedBitfield<unsigned __int64> var_14 = 0;
0042ade6      
0042adf7      switch (eax_1)
0042adf7      {
0042ae06          case 0:
0042ae06          case 6:
0042ae06          case 7:
0042ae06          case 0xb:
0042ae06          {
0042ae0d              if (EnumeratedBitfield<unsigned __int64>::InitByDataID(&var_14, ecx->m_data) != 0)
0042ae0d              {
0042ae13                  uint32_t m_value = this->m_value;
0042ae21                  class PStringBase<char>* var_c = nullptr;
0042ae25                  int32_t var_8 = 0;
0042ae29                  int32_t var_4 = 0;
0042ae2d                  EnumeratedBitfield<unsigned long>::InqStrings(&var_14, m_value, &var_c);
0042ae3b                  PStringBase<char>::PStringBase<char>(&arg2, &data_794098);
0042ae58                  class PStringBase<char> __return;
0042ae58                  PStringBase<unsigned short>::operator=(arg3, PStringBaseArray<char>::join(&var_c, &__return, &arg2));
0042ae67                  int32_t* esi_2 = (__return - 0x14);
0042ae67                  
0042ae76                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0042ae7e                      **(uint32_t**)esi_2(1);
0042ae7e                  
0042ae84                  void* __offset(BasePropertyDesc, -0x14) esi_4 = ((char*)arg2 - 0x14);
0042ae84                  
0042ae94                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0042ae9c                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0042ae9c                  
0042aeac                  if ((var_8 & 0x80000000) == 0x80000000)
0042aeac                  {
0042aeae                      class PStringBase<char>* ecx_10 = var_c;
0042aeae                      
0042aeb4                      if (ecx_10 != 0)
0042aeb8                          PStringBase<char>::`vector deleting destructor'(ecx_10, 3);
0042aeac                  }
0042aeac                  
0042aebd                  class EnumeratedBitfield<unsigned __int64> ecx_11 = var_14;
0042aebd                  
0042aec3                  if (ecx_11 != 0)
0042aec7                      *(uint32_t*)(*(uint32_t*)ecx_11 + 0x14)();
0042aec7                  
0042aecb                  void* eax_7;
0042aecb                  eax_7 = 1;
0042aed1                  return 1;
0042ae0d              }
0042ae0d              
0042aed4              class EnumeratedBitfield<unsigned __int64> ecx_12 = var_14;
0042aed4              
0042aeda              if (ecx_12 != 0)
0042aede                  *(uint32_t*)(*(uint32_t*)ecx_12 + 0x14)();
0042ae06              break;
0042ae06          }
0042adf7      }
0042adf7      
0042aee2      eax_1 = 0;
0042aee8      return 0;
0042add0  }

0042aeeb                                   90                                                                         .
0042aeec  uint32_t jump_table_42aeec[0x2] = 
0042aeec  {
0042aeec      [0x0] =  0x0042adfe
0042aef0      [0x1] =  0x0042aee1
0042aef4  }
0042aef4  uint8_t lookup_table_42aef4[0xc] = 
0042aef4  {
0042aef4      [0x0] =  0x00
0042aef5      [0x1] =  0x01
0042aef6      [0x2] =  0x01
0042aef7      [0x3] =  0x01
0042aef8      [0x4] =  0x01
0042aef9      [0x5] =  0x01
0042aefa      [0x6] =  0x00
0042aefb      [0x7] =  0x00
0042aefc      [0x8] =  0x01
0042aefd      [0x9] =  0x01
0042aefe      [0xa] =  0x01
0042aeff      [0xb] =  0x00
0042af00  }

0042af00  uint8_t __thiscall Bitfield64PropertyValue::FromFileNode(class Bitfield64PropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

0042af00  {
0042af02      class PFileNode* esi = arg3;
0042af02      
0042af0b      if (esi != 0)
0042af0b      {
0042af0d          class BasePropertyDesc* m_data_1 = arg2;
0042af14          void* eax_2 = (m_data_1->m_propertyType - 9);
0042af1a          arg3 = nullptr;
0042af2b          uint64_t* m_data;
0042af2b          
0042af2b          switch (eax_2)
0042af2b          {
0042af35              case nullptr:
0042af35              case 6:
0042af35              case 7:
0042af35              case 0xb:
0042af35              {
0042af35                  m_data = m_data_1->m_data;
0042af3a                  uint8_t eax_4;
0042af3a                  eax_4 = EnumeratedBitfield<unsigned __int64>::InitByDataID(&arg3, m_data);
0042af3a                  
0042af41                  if (eax_4 != 0)
0042af41                  {
0042af46                      m_data = &this->m_value;
0042af4c                      uint8_t eax_5 = EnumeratedBitfield<unsigned __int64>::FromFileNode(&arg3, esi, m_data);
0042af51                      class PFileNode* ecx_3 = arg3;
0042af57                      int32_t ebx;
0042af57                      ebx = eax_5;
0042af57                      
0042af59                      if (ecx_3 != 0)
0042af5b                          ecx_3->vtable->Serialize();
0042af5b                      
0042af65                      return ebx;
0042af41                  }
0042af35                  break;
0042af35              }
0042af2b          }
0042af2b          
0042af68          m_data = m_data_1;
0042af70          PStringBase<char>::PStringBase<char>(&m_data, "There was a problem with the emp");
0042af76          PFileNode::ReportError(esi, m_data);
0042af7b          class PFileNode* ecx_5 = arg3;
0042af7b          
0042af84          if (ecx_5 != 0)
0042af86              ecx_5->vtable->Serialize();
0042af0b      }
0042af0b      
0042af8d      int32_t eax;
0042af8d      eax = 0;
0042af90      return 0;
0042af00  }

0042af93                                                           90                                                         .
0042af94  uint32_t jump_table_42af94[0x2] = 
0042af94  {
0042af94      [0x0] =  0x0042af32
0042af98      [0x1] =  0x0042af68
0042af9c  }
0042af9c  uint8_t lookup_table_42af9c[0xc] = 
0042af9c  {
0042af9c      [0x0] =  0x00
0042af9d      [0x1] =  0x01
0042af9e      [0x2] =  0x01
0042af9f      [0x3] =  0x01
0042afa0      [0x4] =  0x01
0042afa1      [0x5] =  0x01
0042afa2      [0x6] =  0x00
0042afa3      [0x7] =  0x00
0042afa4      [0x8] =  0x01
0042afa5      [0x9] =  0x01
0042afa6      [0xa] =  0x01
0042afa7      [0xb] =  0x00
0042afa8  }

0042afa8                          90 90 90 90 90 90 90 90                                                          ........

0042afb0  uint8_t __thiscall Bitfield64PropertyValue::ToFileNode(class Bitfield64PropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

0042afb0  {
0042afb3      class PFileNode* m_data_2 = arg3;
0042afb3      
0042afbb      if (m_data_2 != 0)
0042afbb      {
0042afc1          class BasePropertyDesc* m_data_1 = arg2;
0042afc8          void* eax_2 = (m_data_1->m_propertyType - 9);
0042afce          arg3 = nullptr;
0042afdf          class PFileNode* m_data;
0042afdf          
0042afdf          switch (eax_2)
0042afdf          {
0042afe9              case nullptr:
0042afe9              case 6:
0042afe9              case 7:
0042afe9              case 0xb:
0042afe9              {
0042afe9                  m_data = m_data_1->m_data;
0042afee                  uint8_t eax_4;
0042afee                  eax_4 = EnumeratedBitfield<unsigned __int64>::InitByDataID(&arg3, m_data);
0042afee                  
0042aff5                  if (eax_4 != 0)
0042aff5                  {
0042aff7                      int32_t ecx_2 = *(uint32_t*)((char*)this->m_value)[4];
0042affa                      int32_t edx_1 = this->m_value;
0042affd                      m_data = m_data_2;
0042affe                      int32_t var_14_1 = ecx_2;
0042b004                      uint8_t eax_5 = EnumeratedBitfield<unsigned __int64>::ToFileNode(&arg3, edx_1, m_data);
0042b009                      class PFileNode* ecx_4 = arg3;
0042b00f                      int32_t ebx;
0042b00f                      ebx = eax_5;
0042b00f                      
0042b011                      if (ecx_4 != 0)
0042b013                          ecx_4->vtable->Serialize();
0042b013                      
0042b01d                      return ebx;
0042aff5                  }
0042afe9                  break;
0042afe9              }
0042afdf          }
0042afdf          
0042b020          m_data = m_data_1;
0042b028          PStringBase<char>::PStringBase<char>(&m_data, "There was a problem with the emp");
0042b02e          PFileNode::ReportError(m_data_2, m_data);
0042b033          class PFileNode* ecx_6 = arg3;
0042b033          
0042b03c          if (ecx_6 != 0)
0042b03e              ecx_6->vtable->Serialize();
0042afbb      }
0042afbb      
0042b045      int32_t eax;
0042b045      eax = 0;
0042b048      return 0;
0042afb0  }

0042b04b                                   90                                                                         .
0042b04c  uint32_t jump_table_42b04c[0x2] = 
0042b04c  {
0042b04c      [0x0] =  0x0042afe6
0042b050      [0x1] =  0x0042b020
0042b054  }
0042b054  uint8_t lookup_table_42b054[0xc] = 
0042b054  {
0042b054      [0x0] =  0x00
0042b055      [0x1] =  0x01
0042b056      [0x2] =  0x01
0042b057      [0x3] =  0x01
0042b058      [0x4] =  0x01
0042b059      [0x5] =  0x01
0042b05a      [0x6] =  0x00
0042b05b      [0x7] =  0x00
0042b05c      [0x8] =  0x01
0042b05d      [0x9] =  0x01
0042b05e      [0xa] =  0x01
0042b05f      [0xb] =  0x00
0042b060  }

0042b060  uint8_t __thiscall Bitfield64PropertyValue::GetValueAsString(class Bitfield64PropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

0042b060  {
0042b067      class BasePropertyDesc* ecx = arg2;
0042b070      uint32_t eax_1 = (ecx->m_propertyType - 9);
0042b076      class EnumeratedBitfield<unsigned __int64> var_14 = 0;
0042b076      
0042b087      switch (eax_1)
0042b087      {
0042b096          case 0:
0042b096          case 6:
0042b096          case 7:
0042b096          case 0xb:
0042b096          {
0042b09d              if (EnumeratedBitfield<unsigned __int64>::InitByDataID(&var_14, ecx->m_data) != 0)
0042b09d              {
0042b0a6                  int32_t eax_2 = this->m_value;
0042b0af                  int32_t var_28 = *(uint32_t*)((char*)this->m_value)[4];
0042b0b5                  class PStringBase<char>* var_c = nullptr;
0042b0b9                  int32_t var_8 = 0;
0042b0bd                  int32_t var_4 = 0;
0042b0c1                  EnumeratedBitfield<unsigned __int64>::InqStrings(&var_14, eax_2, &var_c);
0042b0cf                  PStringBase<char>::PStringBase<char>(&arg2, &data_794098);
0042b0ec                  class PStringBase<char> __return;
0042b0ec                  PStringBase<unsigned short>::operator=(arg3, PStringBaseArray<char>::join(&var_c, &__return, &arg2));
0042b0fb                  int32_t* esi_2 = (__return - 0x14);
0042b0fb                  
0042b10a                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0042b112                      **(uint32_t**)esi_2(1);
0042b112                  
0042b118                  void* __offset(BasePropertyDesc, -0x14) esi_4 = ((char*)arg2 - 0x14);
0042b118                  
0042b128                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0042b130                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0042b130                  
0042b140                  if ((var_8 & 0x80000000) == 0x80000000)
0042b140                  {
0042b142                      class PStringBase<char>* ecx_9 = var_c;
0042b142                      
0042b148                      if (ecx_9 != 0)
0042b14c                          PStringBase<char>::`vector deleting destructor'(ecx_9, 3);
0042b140                  }
0042b140                  
0042b151                  class EnumeratedBitfield<unsigned __int64> ecx_10 = var_14;
0042b151                  
0042b157                  if (ecx_10 != 0)
0042b15b                      *(uint32_t*)(*(uint32_t*)ecx_10 + 0x14)();
0042b15b                  
0042b15f                  void* eax_9;
0042b15f                  eax_9 = 1;
0042b165                  return 1;
0042b09d              }
0042b09d              
0042b168              class EnumeratedBitfield<unsigned __int64> ecx_11 = var_14;
0042b168              
0042b16e              if (ecx_11 != 0)
0042b172                  *(uint32_t*)(*(uint32_t*)ecx_11 + 0x14)();
0042b096              break;
0042b096          }
0042b087      }
0042b087      
0042b176      eax_1 = 0;
0042b17c      return 0;
0042b060  }

0042b17f                                                                                               90                                 .
0042b180  uint32_t jump_table_42b180[0x2] = 
0042b180  {
0042b180      [0x0] =  0x0042b08e
0042b184      [0x1] =  0x0042b175
0042b188  }
0042b188  uint8_t lookup_table_42b188[0xc] = 
0042b188  {
0042b188      [0x0] =  0x00
0042b189      [0x1] =  0x01
0042b18a      [0x2] =  0x01
0042b18b      [0x3] =  0x01
0042b18c      [0x4] =  0x01
0042b18d      [0x5] =  0x01
0042b18e      [0x6] =  0x00
0042b18f      [0x7] =  0x00
0042b190      [0x8] =  0x01
0042b191      [0x9] =  0x01
0042b192      [0xa] =  0x01
0042b193      [0xb] =  0x00
0042b194  }

0042b194                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0042b1a0  uint8_t __thiscall DataFilePropertyValue::GetValueAsString(class DataFilePropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

0042b1a0  {
0042b1a3      uint32_t id = this->m_value.id;
0042b1a3      
0042b1a9      if (id == 0)
0042b233          PStringBase<char>::sprintf(arg3, "<file unset>");
0042b1a9      else
0042b1a9      {
0042b1ab          class PStringBase<char>* edi_1 = arg3;
0042b1af          uint32_t id_1 = id;
0042b1b6          PStringBase<char>::sprintf(edi_1, "0x%08X");
0042b1b6          
0042b1c8          if (arg2->m_propertyType != 0xa)
0042b1c8          {
0042b223              class BasePropertyDesc* eax;
0042b223              eax = 0;
0042b226              return 0;
0042b1c8          }
0042b1c8          
0042b1d7          FileArray::GetRelativeFilePath(&arg3, this->m_value.id, arg2->m_data);
0042b1dc          class PStringBase<char>* eax_2 = arg3;
0042b1dc          
0042b1e9          if (eax_2->m_charbuffer != 1)
0042b1e9          {
0042b1eb              class PStringBase<char>* var_c_2 = eax_2;
0042b1f2              PStringBase<char>::sprintf(edi_1, &data_7945ac);
0042b1f7              eax_2 = arg3;
0042b1e9          }
0042b1e9          
0042b211          if ((InterlockedDecrement(&eax_2[-4]) == 0 && eax_2 != 0x14))
0042b211          {
0042b219              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
0042b21c              int32_t eax_5;
0042b21c              eax_5 = 1;
0042b21f              return 1;
0042b211          }
0042b1a9      }
0042b1a9      
0042b23c      int32_t eax_4;
0042b23c      eax_4 = 1;
0042b23f      return 1;
0042b1a0  }

0042b242        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0042b250  uint8_t __convention("regparm") FileNodeUtils::GetNameAsEnumByDID(class PFileNode const* arg1, class IDClass<_tagDataID,32,0> arg2, uint32_t* arg3)

0042b250  {
0042b250      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
0042b250      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
0042b251      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042b260      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0042b268      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0042b275      PFileNode::GetNameAsPString(arg1, &PStringBase<char>::s_NullBuffer_2);
0042b27e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0042b283      uint32_t* PStringBase<char>::s_NullBuffer_5 = arg3;
0042b28a      int32_t ebx;
0042b28a      ebx = 1;
0042b28c      PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
0042b28e      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
0042b295      uint8_t eax_2;
0042b295      uint32_t* PStringBase<char>::s_NullBuffer_7;
0042b295      eax_2 = EnumMapper::GetEnumByDID(arg2, PStringBase<char>::s_NullBuffer_5, arg3);
0042b295      
0042b29f      if (eax_2 == 0)
0042b29f      {
0042b2a1          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_4;
0042b2a2          PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_7;
0042b2aa          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_5, "invalid emp value '%s'");
0042b2b0          PFileNode::ReportError(arg1, PStringBase<char>::s_NullBuffer_5);
0042b2b8          ebx = 0;
0042b29f      }
0042b29f      
0042b2cd      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
0042b2d5          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
0042b2d5      
0042b2da      int32_t eax_3;
0042b2da      eax_3 = ebx;
0042b2de      return eax_3;
0042b250  }

0042b2df                                                                                               90                                 .

0042b2e0  uint8_t FileNodeUtils::GetLeafAsEnumByDID(class PFileNode const* arg1, class IDClass<_tagDataID,32,0> arg2, uint32_t* arg3)

0042b2e0  {
0042b2e7      class PFileNode* eax;
0042b2e7      uint32_t* ecx_1;
0042b2e7      class IDClass<_tagDataID,32,0> edx;
0042b2e7      eax = PFileNode::GetLeaf(arg1);
0042b2e7      
0042b2ee      if (eax != 0)
0042b2ee      {
0042b2f1          arg1 = eax;
0042b2f5          /* tailcall */
0042b2f5          return FileNodeUtils::GetNameAsEnumByDID(eax, edx, ecx_1);
0042b2ee      }
0042b2ee      
0042b2fa      uint32_t* var_8 = ecx_1;
0042b302      PStringBase<char>::PStringBase<char>(&var_8, "Expecting a leaf node");
0042b308      PFileNode::ReportError(arg1, var_8);
0042b310      int32_t eax_2;
0042b310      eax_2 = 0;
0042b313      return 0;
0042b2e0  }

0042b314                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0042b320  uint8_t __convention("regparm") FileNodeUtils::SetNameAsEnumByDID(class PFileNode* arg1, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

0042b320  {
0042b320      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
0042b320      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
0042b321      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042b32f      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0042b338      int32_t ebx;
0042b338      ebx = 0;
0042b33a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0042b33a      
0042b355      if (EnumMapper::GetStringByDID(arg2, arg3, &PStringBase<char>::s_NullBuffer_2) != 0)
0042b355      {
0042b357          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0042b361          int32_t var_18_3 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
0042b365          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
0042b36d          PFileNode::SetNameAsPString(arg1, InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]));
0042b36d          
0042b385          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
0042b38d              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
0042b38d          
0042b38f          ebx = 1;
0042b355      }
0042b355      
0042b395      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0042b395      
0042b3a8      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0042b3b0          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0042b3b0      
0042b3b5      int32_t eax_5;
0042b3b5      eax_5 = ebx;
0042b3b9      return eax_5;
0042b320  }

0042b3ba                                                                                90 90 90 90 90 90                            ......

0042b3c0  class PFileNode* FileNodeUtils::MakeSubNodeAsEnumByDID(class PFileNode* arg1, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

0042b3c0  {
0042b3ca      class PFileNode* result = *(int32_t*)((char*)arg1->vtable + 4)();
0042b3ca      
0042b3d1      if (result != 0)
0042b3d1      {
0042b3db          uint32_t var_c_1 = arg3;
0042b3dc          class IDClass<_tagDataID,32,0> var_10_1 = arg2;
0042b3dd          class PFileNode* result_1 = result;
0042b3dd          
0042b3e8          if (FileNodeUtils::SetNameAsEnumByDID(result, arg2, arg3) == 0)
0042b3e8          {
0042b3ed              PFileNode::RemoveSubNodePtr(arg1, result);
0042b3f6              return 0;
0042b3e8          }
0042b3d1      }
0042b3d1      
0042b3fb      return result;
0042b3c0  }

0042b3fc                                                                                      90 90 90 90                              ....

0042b400  uint8_t __fastcall EnumPropertyValue::FromFileNode(class EnumPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

0042b400  {
0042b400      class EnumPropertyValue* __return = this;
0042b405      class PFileNode* edi = arg3;
0042b40d      class BasePropertyDesc* eax;
0042b40d      
0042b40d      if (edi != 0)
0042b40d      {
0042b413          eax = arg2;
0042b413          
0042b429          switch ((eax->m_propertyType - 9))
0042b429          {
0042b430              case nullptr:
0042b430              case 6:
0042b430              case 7:
0042b430              case 0xb:
0042b430              {
0042b430                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042b436                  uint32_t m_data = eax->m_data;
0042b43c                  uint32_t* var_18 = &PStringBase<char>::s_NullBuffer_1[-1];
0042b43d                  arg3 = PStringBase<char>::s_NullBuffer_1;
0042b441                  InterlockedIncrement(var_18);
0042b449                  class PFileNode* eax_1;
0042b449                  uint32_t* ecx_4;
0042b449                  eax_1 = PFileNode::GetLeaf(edi);
0042b449                  
0042b450                  if (eax_1 != 0)
0042b450                  {
0042b456                      var_18 = &arg3;
0042b459                      uint8_t eax_2;
0042b459                      eax_2 = PFileNode::GetNameAsPString(eax_1, var_18);
0042b459                      
0042b460                      if (eax_2 != 0)
0042b460                      {
0042b4ab                          if (arg3->vtable == 1)
0042b4ab                          {
0042b540                              this->m_value = 0;
0042b547                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0042b54f                              int32_t eax_10;
0042b54f                              eax_10 = 1;
0042b553                              return 1;
0042b4ab                          }
0042b4ab                          
0042b4b1                          var_18 = 2;
0042b4ba                          DBCache::GetDIDFromEnumStatic(&__return, 0xf, var_18);
0042b4ba                          
0042b4c8                          if (m_data != __return)
0042b4c8                          {
0042b4cd                              var_18 = &this->m_value;
0042b4dc                              m_data = FileNodeUtils::GetLeafAsEnumByDID(edi, m_data, var_18);
0042b4de                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0042b4ea                              return m_data;
0042b4c8                          }
0042b4c8                          
0042b4f1                          PStringBase<char>::PStringBase<char>(&arg2);
0042b4f8                          class PFileNode* eax_7;
0042b4f8                          uint32_t* edx_3;
0042b4f8                          eax_7 = PFileNode::GetLeaf(edi);
0042b4f8                          
0042b4ff                          if (eax_7 != 0)
0042b4ff                          {
0042b505                              var_18 = &arg2;
0042b508                              eax_7 = PFileNode::GetNameAsPString(eax_7, var_18);
0042b4ff                          }
0042b4ff                          
0042b514                          var_18 = &this->m_value;
0042b515                          class BasePropertyDesc const** var_1c_3 = &arg2;
0042b522                          m_data = MasterProperty::InqPropertyNameEnumStatic(eax_7, edx_3);
0042b524                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0042b52d                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0042b539                          return m_data;
0042b460                      }
0042b460                      
0042b462                      PStringBase<char>::s_NullBuffer_1 = arg3;
0042b450                  }
0042b450                  
0042b466                  var_18 = ecx_4;
0042b46e                  PStringBase<char>::PStringBase<char>(&var_18, "Expected string.");
0042b474                  PFileNode::ReportError(edi, var_18);
0042b482                  var_18 = &PStringBase<char>::s_NullBuffer_1[-1];
0042b482                  
0042b48f                  if ((InterlockedDecrement(var_18) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0042b48f                  {
0042b491                      int32_t eax_3 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14);
0042b493                      var_18 = 1;
0042b497                      *(uint32_t*)eax_3(var_18);
0042b48f                  }
0042b430                  break;
0042b430              }
0042b429          }
0042b40d      }
0042b40d      
0042b499      eax = 0;
0042b4a0      return 0;
0042b400  }

0042b556                                                                    8b ff                                                ..
0042b558  uint32_t jump_table_42b558[0x2] = 
0042b558  {
0042b558      [0x0] =  0x0042b430
0042b55c      [0x1] =  0x0042b499
0042b560  }
0042b560  uint8_t lookup_table_42b560[0xc] = 
0042b560  {
0042b560      [0x0] =  0x00
0042b561      [0x1] =  0x01
0042b562      [0x2] =  0x01
0042b563      [0x3] =  0x01
0042b564      [0x4] =  0x01
0042b565      [0x5] =  0x01
0042b566      [0x6] =  0x00
0042b567      [0x7] =  0x00
0042b568      [0x8] =  0x01
0042b569      [0x9] =  0x01
0042b56a      [0xa] =  0x01
0042b56b      [0xb] =  0x00
0042b56c  }

0042b56c                                      90 90 90 90                                                              ....

0042b570  uint8_t __thiscall EnumPropertyValue::ToFileNode(class EnumPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

0042b570  {
0042b572      class PFileNode* edi = arg3;
0042b57a      class PFileNode* eax;
0042b57a      
0042b57a      if (edi != 0)
0042b57a      {
0042b581          class PStringBase<char> m_value;
0042b581          
0042b581          if (this->m_value == 0)
0042b581          {
0042b633              m_value = this;
0042b634              class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
0042b642              m_value = m_charbuffer;
0042b644              InterlockedIncrement(((char*)m_charbuffer - 0x10));
0042b64c              PFileNode::MakeSubNode(edi, m_value);
0042b652              eax = 1;
0042b655              return 1;
0042b581          }
0042b581          
0042b587          class BasePropertyDesc* ecx = arg2;
0042b58f          m_value = &arg3;
0042b58f          
0042b597          if (BasePropertyDesc::InqDataID(ecx, m_value) != 0)
0042b597          {
0042b599              m_value = 2;
0042b5a2              DBCache::GetDIDFromEnumStatic(&arg2, 0xf, m_value);
0042b5a7              class PFileNode* eax_2 = arg3;
0042b5a7              
0042b5b4              if (eax_2 == arg2)
0042b5b4              {
0042b5d3                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042b5d8                  arg3 = PStringBase<char>::s_NullBuffer_1;
0042b5df                  m_value = &PStringBase<char>::s_NullBuffer_1[-1];
0042b5e0                  int32_t eax_4;
0042b5e0                  class PStringBase<char>* edx_2;
0042b5e0                  eax_4 = InterlockedIncrement(m_value);
0042b5e6                  uint32_t m_value_1 = this->m_value;
0042b5ed                  m_value = &arg3;
0042b5ee                  uint32_t m_value_2 = m_value_1;
0042b5ef                  uint8_t eax_5;
0042b5ef                  class PStringBase<char> m_value_3;
0042b5ef                  eax_5 = MasterProperty::InqPropertyNameStringStatic(eax_4, edx_2);
0042b5f9                  class PFileNode** ecx_4;
0042b5f9                  
0042b5f9                  if (eax_5 == 0)
0042b623                      ecx_4 = &arg3;
0042b5f9                  else
0042b5f9                  {
0042b5fb                      m_value = m_value_3;
0042b603                      PStringBase<unsigned short>::PStringBase<unsigned short>(&m_value, &arg3);
0042b611                      ecx_4 = &arg3;
0042b611                      
0042b615                      if (PFileNode::MakeSubNode(edi, m_value) != 0)
0042b615                      {
0042b617                          PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_4);
0042b61c                          int32_t eax_7;
0042b61c                          eax_7 = 1;
0042b620                          return 1;
0042b615                      }
0042b5f9                  }
0042b5f9                  
0042b627                  PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_4);
0042b62c                  int32_t eax_8;
0042b62c                  eax_8 = 0;
0042b630                  return 0;
0042b5b4              }
0042b5b4              
0042b5b9              m_value = this->m_value;
0042b5b9              
0042b5c6              if (FileNodeUtils::MakeSubNodeAsEnumByDID(edi, eax_2, m_value) != 0)
0042b5c6              {
0042b652                  eax = 1;
0042b655                  return 1;
0042b5c6              }
0042b597          }
0042b57a      }
0042b57a      
0042b5cc      eax = 0;
0042b5d0      return 0;
0042b570  }

0042b658                                                                          90 90 90 90 90 90 90 90                          ........

0042b660  uint8_t __thiscall EnumPropertyValue::GetValueAsString(class EnumPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

0042b660  {
0042b660      class EnumPropertyValue* var_4 = this;
0042b661      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042b668      var_4 = PStringBase<char>::s_NullBuffer_1;
0042b672      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0042b68a      int32_t ebx;
0042b68a      ebx = BasePropertyDesc::InqPropertyEnum(arg2, this->m_value, &var_4);
0042b68a      
0042b68e      if (ebx == 0)
0042b68e      {
0042b6c5          uint32_t m_value_1 = this->m_value;
0042b6cc          PStringBase<char>::sprintf(arg3, "Unable to map Enum [0x%08X] to a…");
0042b68e      }
0042b68e      else
0042b68e      {
0042b694          class EnumPropertyValue* edx = var_4;
0042b694          
0042b69e          if (arg4 == 0)
0042b69e          {
0042b6ac              uint32_t m_value = this->m_value;
0042b6ad              class EnumPropertyValue* var_14_2 = edx;
0042b6b4              PStringBase<char>::sprintf(arg3, "%s [0x%08X]");
0042b69e          }
0042b69e          else
0042b69e          {
0042b6a0              class EnumPropertyValue* var_10_2 = edx;
0042b6cc              PStringBase<char>::sprintf(arg3, &data_7945ac);
0042b69e          }
0042b68e      }
0042b68e      
0042b6d8      void* __offset(EnumPropertyValue, -0x14) esi_2 = ((char*)var_4 - 0x14);
0042b6d8      
0042b6eb      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0042b6f3          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0042b6f3      
0042b6f6      int32_t eax_4;
0042b6f6      eax_4 = ebx;
0042b6fa      return eax_4;
0042b660  }

0042b6fd                                                                                         90 90 90                               ...

0042b700  uint8_t __thiscall ArrayPropertyValue::ToFileNode(class ArrayPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

0042b700  {
0042b70c      if (arg3 == 0)
0042b73b          return 0;
0042b73b      
0042b70e      uint32_t m_num = this->m_value.m_num;
0042b711      int32_t esi_1 = 0;
0042b711      
0042b715      if (m_num <= 0)
0042b732          return 1;
0042b732      
0042b71e      while (true)
0042b71e      {
0042b725          if (BaseProperty::ToFileNode(&this->m_value.m_data[esi_1], arg3) == 0)
0042b73b              return 0;
0042b73b          
0042b727          esi_1 += 1;
0042b727          
0042b72a          if (esi_1 >= m_num)
0042b732              return 1;
0042b71e      }
0042b700  }

0042b73e                                                                                            90 90                                ..

0042b740  void _STL::swap(class BaseProperty* arg1, class BaseProperty* arg2)

0042b740  {
0042b74e      int32_t* var_8 = nullptr;
0042b756      int32_t* var_4 = nullptr;
0042b75e      BaseProperty::operator=(&var_8, arg1);
0042b76a      BaseProperty::operator=(arg1, arg2);
0042b776      BaseProperty::operator=(arg2, &var_8);
0042b77b      int32_t* eax = var_8;
0042b77b      
0042b781      if (eax != 0)
0042b781      {
0042b78b          int32_t esi_2 = (eax[1] - 1);
0042b788          eax[1] = esi_2;
0042b788          
0042b792          if (esi_2 == 0)
0042b798              **(uint32_t**)eax(1);
0042b798          
0042b79a          var_8 = nullptr;
0042b781      }
0042b781      
0042b7a8      if (var_4 != 0)
0042b7a8      {
0042b7b2          int32_t esi_4 = (var_4[1] - 1);
0042b7af          var_4[1] = esi_4;
0042b7af          
0042b7b9          if (esi_4 == 0)
0042b7bf              **(uint32_t**)var_4(1);
0042b7a8      }
0042b740  }

0042b7c7                       90 90 90 90 90 90 90 90 90                                                         .........

0042b7d0  uint8_t __thiscall ArrayPropertyValue::Compare(class ArrayPropertyValue const* this, class BasePropertyValue const* arg2)

0042b7d0  {
0042b7e2      int32_t* edi = arg2->vtable->GetArray();
0042b7e6      int32_t* eax_1;
0042b7e6      
0042b7e6      if (edi != 0)
0042b7e6      {
0042b7e8          uint32_t m_num = this->m_value.m_num;
0042b7e8          
0042b7ee          if (m_num == edi[2])
0042b7ee          {
0042b7f0              int32_t esi_1 = 0;
0042b7f0              
0042b7f4              if (m_num > 0)
0042b7f4              {
0042b81d                  do
0042b81d                  {
0042b802                      int32_t eax_2 = (esi_1 << 3);
0042b802                      
0042b818                      if (BaseProperty::Compare((this->m_value.m_data + eax_2), (*(uint32_t*)edi + eax_2)) == 0)
0042b818                          goto label_42b82b;
0042b818                      
0042b81a                      esi_1 += 1;
0042b81d                  } while (esi_1 < m_num);
0042b7f4              }
0042b7f4              
0042b822              eax_1 = 1;
0042b825              return 1;
0042b7ee          }
0042b7e6      }
0042b7e6      
0042b82b  label_42b82b:
0042b82b      eax_1 = 0;
0042b82e      return 0;
0042b7d0  }

0042b7f8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0042b831                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0042b840  uint8_t __thiscall ArrayPropertyValue::SwapArrayElements(class ArrayPropertyValue* this, uint32_t const arg2, uint32_t const arg3)

0042b840  {
0042b840      class BaseProperty* m_data = this->m_value.m_data;
0042b853      _STL::swap(&m_data[arg2], &m_data[arg3]);
0042b85b      int32_t eax;
0042b85b      eax = 1;
0042b85d      return 1;
0042b840  }


0042b860  uint8_t __thiscall ArrayPropertyValue::GetValueAsString(class ArrayPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

0042b860  {
0042b866      if (arg4 != 0)
0042b866      {
0042b86f          uint32_t m_num = this->m_value.m_num;
0042b876          PStringBase<char>::sprintf(arg3, &data_794344);
0042b87e          int32_t eax_2;
0042b87e          eax_2 = 1;
0042b880          return 1;
0042b866      }
0042b866      
0042b88a      uint32_t m_num_1 = this->m_value.m_num;
0042b891      PStringBase<char>::sprintf(arg3, "Array [%d items]");
0042b899      int32_t eax_4;
0042b899      eax_4 = 1;
0042b89b      return 1;
0042b860  }

0042b89e                                                                                            90 90                                ..

0042b8a0  uint8_t __thiscall ArrayPropertyValue::FromFileNode(class ArrayPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

0042b8a0  {
0042b8b7      if (arg3 == 0)
0042b8b7      {
0042badf          int32_t eax;
0042badf          eax = 0;
0042bae5          return 0;
0042b8b7      }
0042b8b7      
0042b8bf      uint32_t eax_1 = PFileNode::GetNumSubNodes(arg3);
0042b8c6      enum ProgramType ProgramTypeSystem::s_eProgramType_1 = ProgramTypeSystem::s_eProgramType;
0042b8d4      char var_25_1;
0042b8d4      
0042b8d4      if (ProgramTypeSystem::s_eProgramType_1 != 0x80000002)
0042b8db          var_25_1 = 0;
0042b8db      
0042b8df      if ((ProgramTypeSystem::s_eProgramType_1 == 0x80000002 || ProgramTypeSystem::s_eProgramType_1 == 0x80000001))
0042b8e1          var_25_1 = 1;
0042b8e1      
0042b8e6      uint32_t eax_2 = 0;
0042b8ea      char var_26 = 1;
0042b8ef      uint32_t var_1c = 0;
0042b8ef      
0042b8f3      if (eax_1 > 0)
0042b8f3      {
0042baca          do
0042baca          {
0042b900              struct PFileNode::VTable* vtable = arg3->vtable;
0042b902              uint32_t var_3c = eax_2;
0042b905              int32_t* var_10 = nullptr;
0042b909              int32_t* var_c_1 = nullptr;
0042b90d              uint32_t eax_3;
0042b90d              class PFileNode* edx_1;
0042b90d              eax_3 = vtable->GetSubNode(var_3c);
0042b910              var_3c = eax_3;
0042b915              uint8_t eax_4;
0042b915              uint32_t ecx_4;
0042b915              eax_4 = BaseProperty::FromFileNode(&var_10, edx_1);
0042b915              
0042b91c              if (eax_4 == 0)
0042b91c              {
0042b91e                  var_3c = ecx_4;
0042b926                  PStringBase<char>::PStringBase<char>(&var_3c, "failed to read property");
0042b92c                  PFileNode::ReportError(arg3, var_3c);
0042b934                  var_26 = 0;
0042b91c              }
0042b91c              else if (var_25_1 == 0)
0042b941              {
0042b958              label_42b958:
0042b958                  uint32_t eax_6 = BaseProperty::GetPropertyName(&var_10);
0042b958                  
0042b966                  if (arg2->m_bAllAvailable != 0)
0042b966                  {
0042ba42                  label_42ba42:
0042ba42                      int32_t eax_15 = (this->m_value.m_sizeAndDeallocate & 0x7fffffff);
0042ba49                      uint8_t eax_18;
0042ba49                      
0042ba49                      if (this->m_value.m_num >= eax_15)
0042ba49                      {
0042ba4c                          var_3c = (eax_15 + 1);
0042ba54                          var_3c = SmartArray<unsigned long,1>::get_new_size(&this->m_value, var_3c);
0042ba57                          eax_18 = SmartArray<BaseProperty,1>::grow(&this->m_value, var_3c);
0042ba49                      }
0042ba49                      
0042ba5e                      if ((this->m_value.m_num < eax_15 || eax_18 != 0))
0042ba5e                      {
0042ba69                          var_3c = &var_10;
0042ba6d                          BaseProperty::operator=(&this->m_value.m_data[this->m_value.m_num], var_3c);
0042ba3f                          this->m_value.m_num += 1;
0042ba5e                      }
0042b966                  }
0042b966                  else
0042b966                  {
0042b96c                      var_3c = eax_6;
0042b96c                      
0042b983                      if ((AvailablePropertySet::contains(&arg2->m_availableProperties, var_3c) != 0 || arg2->m_bAllAvailable != 0))
0042b977                          goto label_42ba42;
0042b977                      
0042b989                      var_3c = "<UNKNOWN>";
0042b992                      class PStringBase<char> var_20;
0042b992                      PStringBase<char>::PStringBase<char>(&var_20, var_3c);
0042b997                      var_3c = "<UNKNOWN>";
0042b9a0                      class PStringBase<char> var_24;
0042b9a0                      uint32_t eax_8;
0042b9a0                      class PStringBase<char>* edx_2;
0042b9a0                      eax_8 = PStringBase<char>::PStringBase<char>(&var_24, var_3c);
0042b9a5                      uint32_t m_propertyName = arg2->m_propertyName;
0042b9ac                      var_3c = &var_24;
0042b9ad                      uint32_t m_propertyName_1 = m_propertyName;
0042b9ae                      class PStringBase<char>* edx_3 = MasterProperty::InqPropertyNameStringStatic(eax_8, edx_2);
0042b9ba                      var_3c = &var_20;
0042b9bf                      uint32_t eax_9 = BaseProperty::GetPropertyName(&var_10);
0042b9c4                      uint32_t var_40_3 = eax_9;
0042b9c5                      MasterProperty::InqPropertyNameStringStatic(eax_9, edx_3);
0042b9ce                      class PStringBase<char> ecx_12 = var_20;
0042b9d5                      var_3c = var_24;
0042b9d6                      class PStringBase<char> var_40_4 = ecx_12;
0042b9d7                      class PStringBase<char> var_44 = ecx_12;
0042b9df                      PStringBase<char>::PStringBase<char>(&var_44, "[%s] is not an available propert…");
0042b9e5                      PFileNode::ReportError(arg3, var_44);
0042b9ee                      int32_t* esi_3 = (var_24 - 0x14);
0042b9f7                      var_3c = &esi_3[1];
0042b9f8                      var_26 = 0;
0042b9f8                      
0042ba08                      if ((InterlockedDecrement(var_3c) == 0 && esi_3 != 0))
0042ba08                      {
0042ba0a                          int32_t eax_12 = *(uint32_t*)esi_3;
0042ba0c                          var_3c = 1;
0042ba10                          *(uint32_t*)eax_12(var_3c);
0042ba08                      }
0042ba08                      
0042ba16                      int32_t* esi_5 = (var_20 - 0x14);
0042ba1c                      var_3c = &esi_5[1];
0042ba1c                      
0042ba29                      if ((InterlockedDecrement(var_3c) == 0 && esi_5 != 0))
0042ba29                      {
0042ba2b                          int32_t edx_5 = *(uint32_t*)esi_5;
0042ba2d                          var_3c = 1;
0042ba31                          *(uint32_t*)edx_5(var_3c);
0042ba29                      }
0042b966                  }
0042b941              }
0042b941              else if (BaseProperty::IsToolOnly(&var_10) == 0)
0042b94e                  goto label_42b958;
0042b94e              
0042ba75              int32_t* eax_19 = var_10;
0042ba75              
0042ba7b              if (eax_19 != 0)
0042ba7b              {
0042ba85                  int32_t esi_9 = (eax_19[1] - 1);
0042ba82                  eax_19[1] = esi_9;
0042ba82                  
0042ba8c                  if (esi_9 == 0)
0042ba8c                  {
0042ba8e                      int32_t eax_21 = *(uint32_t*)eax_19;
0042ba90                      var_3c = 1;
0042ba92                      *(uint32_t*)eax_21(var_3c);
0042ba8c                  }
0042ba8c                  
0042ba94                  var_10 = nullptr;
0042ba7b              }
0042ba7b              
0042ba9e              if (var_c_1 != 0)
0042ba9e              {
0042baa8                  int32_t esi_11 = (var_c_1[1] - 1);
0042baa5                  var_c_1[1] = esi_11;
0042baa5                  
0042baaf                  if (esi_11 == 0)
0042baaf                  {
0042bab1                      int32_t edx_9 = *(uint32_t*)var_c_1;
0042bab3                      var_3c = 1;
0042bab5                      *(uint32_t*)edx_9(var_3c);
0042baaf                  }
0042baaf                  
0042bab7                  int32_t var_c_2 = 0;
0042ba9e              }
0042ba9e              
0042bac3              eax_2 = (var_1c + 1);
0042bac6              var_1c = eax_2;
0042baca          } while (eax_2 < eax_1);
0042b8f3      }
0042b8f3      
0042bad0      eax_2 = var_26;
0042bada      return eax_2;
0042b8a0  }

0042bae8                          90 90 90 90 90 90 90 90                                                          ........

0042baf0  class HashIterator<unsigned long,AvailableProperty,0>* __thiscall AvailablePropertySet::end(class AvailablePropertySet const* this, class HashIterator<unsigned long,AvailableProperty,0>* __return)

0042baf0  {
0042baf7      __return->m_iter.m_currHashTable = &this->m_reqHash.m_intrusiveTable;
0042bafb      __return->m_iter.m_currBucket = nullptr;
0042bafe      __return->m_iter.m_currElement = nullptr;
0042bb01      return __return;
0042baf0  }

0042bb04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0042bb10  uint8_t __thiscall AvailablePropertySet::contains(class AvailablePropertySet const* this, uint32_t arg2)

0042bb10  {
0042bb22      int32_t* eax_3 = this->m_reqHash.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_reqHash.m_intrusiveTable.m_numBuckets)];
0042bb24      bool cond:0 = eax_3 != 0;
0042bb24      
0042bb26      if (eax_3 != 0)
0042bb26      {
0042bb2a          while (*(uint32_t*)eax_3 != arg2)
0042bb2a          {
0042bb2c              eax_3 = eax_3[1];
0042bb2c              
0042bb31              if (eax_3 == 0)
0042bb31                  break;
0042bb2a          }
0042bb2a          
0042bb33          cond:0 = eax_3 != 0;
0042bb26      }
0042bb26      
0042bb35      eax_3 = cond:0;
0042bb39      return eax_3;
0042bb10  }

0042bb3c                                                                                      90 90 90 90                              ....

0042bb40  uint8_t __thiscall HashTable<unsigned long,AvailableProperty,0>::set(class HashTable<unsigned long,AvailableProperty,0>* this, uint32_t const* arg2, class AvailableProperty const* arg3)

0042bb40  {
0042bb46      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>* edi = &this->m_intrusiveTable;
0042bb49      uint32_t const ecx = *(uint32_t*)arg2;
0042bb49      
0042bb5c      for (int32_t* i = edi->m_buckets[(COMBINE(0, ecx) % edi->m_numBuckets)]; i != 0; i = i[1])
0042bb5c      {
0042bb62          if (*(uint32_t*)i == ecx)
0042bb62          {
0042bba6              if (i == 0)
0042bba6                  break;
0042bba6              
0042bbb0              AvailableProperty::AvailableProperty(&i[2], arg3);
0042bbb6              int32_t eax_6;
0042bbb6              eax_6 = 1;
0042bbb9              return 1;
0042bb62          }
0042bb5c      }
0042bb5c      
0042bb73      uint32_t* esi = operator new(0xc);
0042bb73      
0042bb7a      if (esi == 0)
0042bb7a      {
0042bbc1          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(edi, nullptr);
0042bbc8          int32_t eax_7;
0042bbc8          eax_7 = 1;
0042bbcb          return 1;
0042bb7a      }
0042bb7a      
0042bb86      *(uint32_t*)esi = *(uint32_t*)arg2;
0042bb88      esi[1] = 0;
0042bb8f      AvailableProperty::AvailableProperty(&esi[2], arg3);
0042bb97      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(edi, esi);
0042bb9e      int32_t eax_5;
0042bb9e      eax_5 = 1;
0042bba1      return 1;
0042bb40  }

0042bbce                                            90 90                                                                ..

0042bbd0  uint8_t __fastcall AvailablePropertySet::AddProperty(class AvailablePropertySet* this, uint32_t arg2)

0042bbd0  {
0042bbd0      class AvailablePropertySet* this_1 = this;
0042bbd8      AvailableProperty::AvailableProperty(&this_1);
0042bbed      this_1 = arg2;
0042bbf8      return HashTable<unsigned long,AvailableProperty,0>::set(this, &arg2, &this_1);
0042bbd0  }

0042bbfb                                                                                   90 90 90 90 90                             .....

0042bc00  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>,HashTableData<unsigned long,AvailableProperty> *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>* arg2, class Archive* arg3)

0042bc00  {
0042bc06      class Archive* esi = arg3;
0042bc06      
0042bc12      if ((!(esi->m_flags) & 1) != 0)
0042bc18          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
0042bc18      
0042bc26      int32_t ebx;
0042bc26      
0042bc26      if ((((int8_t)esi->m_flags) & 5) != 1)
0042bc65          ebx = arg3;
0042bc26      else
0042bc26      {
0042bc2f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0042bc35          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0042bc3d          arg3 = arg2->m_numBuckets;
0042bc4d          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0042bc4d          
0042bc57          if (eax_2 == bucketSizesEnd_1)
0042bc59              eax_2 -= 4;
0042bc59          
0042bc60          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
0042bc26      }
0042bc26      
0042bc6d      Archive::CheckAlignment(esi, 1);
0042bc76      char* eax_3 = Archive::GetBytes(esi, 1);
0042bc76      
0042bc7d      if (eax_3 != 0)
0042bc7d      {
0042bc83          if ((esi->m_flags & 1) == 0)
0042bc89              ebx = *(uint8_t*)eax_3;
0042bc83          else
0042bc85              *(uint8_t*)eax_3 = ebx;
0042bc7d      }
0042bc7d      
0042bc8f      if ((esi->m_flags & 5) == 0)
0042bc8f      {
0042bc97          uint32_t eax_4 = ((uint32_t)ebx);
0042bc97          
0042bc9c          if (eax_4 < 0x17)
0042bcb5              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
0042bc9c          else
0042bca0              Archive::RaiseError(esi);
0042bc8f      }
0042bc8f      
0042bcc1      if ((((int8_t)esi->m_flags) & 5) == 1)
0042bcca          arg3 = arg2->m_numElements;
0042bcca      
0042bcd9      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
0042bcd9      
0042bcea      if ((((int8_t)esi->m_flags) & 5) == 1)
0042bcea      {
0042bcf5          void __return;
0042bcf5          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0042bcfa          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0042bcfc          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
0042bcff          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
0042bcff          
0042bd04          while (i != 0)
0042bd04          {
0042bd3a              do
0042bd3a              {
0042bd0a                  Archive::CheckAlignment(esi, 4);
0042bd13                  uint8_t* eax_7 = Archive::GetBytes(esi, 4);
0042bd13                  
0042bd1a                  if (eax_7 != 0)
0042bd1a                  {
0042bd20                      if ((esi->m_flags & 1) == 0)
0042bd2a                          i->m_hashKey = *(uint32_t*)eax_7;
0042bd20                      else
0042bd24                          *(uint32_t*)eax_7 = i->m_hashKey;
0042bd1a                  }
0042bd1a                  
0042bd30                  AvailableProperty::Serialize(&i->m_data, esi);
0042bd35                  i = i->m_hashNext;
0042bd3a              } while (i != 0);
0042bd3a              
0042bd45              while (true)
0042bd45              {
0042bd45                  m_currBucket = &m_currBucket[1];
0042bd45                  
0042bd4a                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042bd4a                      break;
0042bd4a                  
0042bd4c                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0042bd4c                  
0042bd51                  if (i_1 != 0)
0042bd51                  {
0042bd53                      i = i_1;
0042bd55                      break;
0042bd51                  }
0042bd45              }
0042bd04          }
0042bcea      }
0042bcea      
0042bd5b      if ((esi->m_flags & 5) == 0)
0042bd5b      {
0042bd63          uint32_t eax_10 = Archive::GetSizeLeft(esi);
0042bd68          class Archive* ecx_17 = arg3;
0042bd68          
0042bd6e          if (ecx_17 > eax_10)
0042be01              Archive::RaiseError(esi);
0042bd6e          else
0042bd6e          {
0042bd74              void* ebx_3 = nullptr;
0042bd76              int32_t ebp_1 = 0;
0042bd76              
0042bd7a              if (ecx_17 > 0)
0042bd7a              {
0042bd87                  while (true)
0042bd87                  {
0042bd87                      void* edi_1 = operator new(0xc);
0042bd87                      
0042bd8e                      if (edi_1 == 0)
0042bda1                          edi_1 = nullptr;
0042bd8e                      else
0042bd8e                      {
0042bd93                          *(uint32_t*)((char*)edi_1 + 4) = 0;
0042bd9a                          AvailableProperty::AvailableProperty(((char*)edi_1 + 8));
0042bd8e                      }
0042bd8e                      
0042bda7                      Archive::CheckAlignment(esi, 4);
0042bdb0                      uint8_t* eax_12 = Archive::GetBytes(esi, 4);
0042bdb0                      
0042bdb7                      if (eax_12 != 0)
0042bdb7                      {
0042bdbd                          if ((esi->m_flags & 1) == 0)
0042bdc7                              *(uint32_t*)edi_1 = *(uint32_t*)eax_12;
0042bdbd                          else
0042bdc1                              *(uint32_t*)eax_12 = *(uint32_t*)edi_1;
0042bdb7                      }
0042bdb7                      
0042bdcd                      AvailableProperty::Serialize(((char*)edi_1 + 8), esi);
0042bdcd                      
0042bddb                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
0042be0d                          return;
0042be0d                      
0042bdea                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebx_3) == 0)
0042bdea                          break;
0042bdea                      
0042bdf0                      ebp_1 += 1;
0042bdf3                      ebx_3 = edi_1;
0042bdf3                      
0042bdf5                      if (ebp_1 >= arg3)
0042bdfe                          return;
0042bd87                  }
0042bd87                  
0042be01                  Archive::RaiseError(esi);
0042bd7a              }
0042bd6e          }
0042bd5b      }
0042bc00  }

0042be0e                                            90 90                                                                ..

0042be10  void __thiscall AvailablePropertySet::Serialize(class AvailablePropertySet* this, class Archive* arg2)

0042be10  {
0042be12      class Archive* edi = arg2;
0042be12      
0042be1f      if ((!(edi->m_flags) & 1) != 0)
0042be24          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_reqHash.m_intrusiveTable);
0042be24      
0042be33      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AvailableProperty> *,0>,HashTableData<unsigned long,AvailableProperty> *,SB_Default>(&arg2, &this->m_reqHash.m_intrusiveTable, edi);
0042be10  }


0042be40  uint8_t __thiscall StructPropertyValue::ToFileNode(class StructPropertyValue const* this, class BasePropertyDesc const* arg2, class PFileNode* arg3)

0042be40  {
0042be4d      if (arg3 == 0)
0042beb8          return 0;
0042beb8      
0042be57      void __return;
0042be57      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_1 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_value.m_intrusiveTable, &__return);
0042be5c      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_1->m_currElement;
0042be61      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_1->m_currHashTable;
0042be63      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_1->m_currBucket;
0042be63      
0042be66      if (i_1 != 0)
0042be66      {
0042be74          while (true)
0042be74          {
0042be7b              if (BaseProperty::ToFileNode(&i_1->m_data, arg3) == 0)
0042beb8                  return 0;
0042beb8              
0042be7d              i_1 = i_1->m_hashNext;
0042be7d              
0042be82              if (i_1 == 0)
0042be82              {
0042be9b                  class HashTableData<unsigned long,DBOCache *>* i;
0042be9b                  
0042be9b                  do
0042be9b                  {
0042be90                      m_currBucket = &m_currBucket[1];
0042be90                      
0042be95                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042be95                          goto label_42bea6;
0042be95                      
0042be97                      i = *(uint32_t*)m_currBucket;
0042be9b                  } while (i == 0);
0042be9b                  
0042be9d                  i_1 = i;
0042be9d                  
0042bea1                  if (i_1 == 0)
0042bea1                      break;
0042be82              }
0042be74          }
0042be66      }
0042be66      
0042bea6  label_42bea6:
0042bea6      eax_1 = 1;
0042beac      return 1;
0042be40  }

0042be6a                                8d 9b 00 00 00 00                                                            ......
0042bebb                                                                                   90 90 90 90 90                             .....

0042bec0  uint8_t __thiscall StructPropertyValue::GetValueAsString(class StructPropertyValue const* this, class BasePropertyDesc const* arg2, class PStringBase<char>* arg3, uint8_t arg4)

0042bec0  {
0042bec6      if (arg4 != 0)
0042bec6      {
0042becf          uint32_t m_numElements = this->m_value.m_intrusiveTable.m_numElements;
0042bed6          PStringBase<char>::sprintf(arg3, &data_794344);
0042bede          int32_t eax_2;
0042bede          eax_2 = 1;
0042bee0          return 1;
0042bec6      }
0042bec6      
0042beea      uint32_t m_numElements_1 = this->m_value.m_intrusiveTable.m_numElements;
0042bef1      PStringBase<char>::sprintf(arg3, "Struct [%d items]");
0042bef9      int32_t eax_4;
0042bef9      eax_4 = 1;
0042befb      return 1;
0042bec0  }

0042befe                                                                                            90 90                                ..

0042bf00  uint8_t __thiscall StructPropertyValue::Compare(class StructPropertyValue const* this, class BasePropertyValue const* arg2)

0042bf00  {
0042bf13      int32_t* edi = arg2->vtable->GetHash();
0042bf1f      int32_t* eax_1;
0042bf1f      
0042bf1f      if ((edi == 0 || this->m_value.m_intrusiveTable.m_numElements != edi[0x1c]))
0042bf1f      {
0042bf6c      label_42bf6c:
0042bf6c          eax_1 = 0;
0042bf72          return 0;
0042bf1f      }
0042bf1f      
0042bf29      void __return;
0042bf29      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_value.m_intrusiveTable, &__return);
0042bf2e      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax_2->m_currElement;
0042bf35      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
0042bf38      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
0042bf3c      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
0042bf40      class HashTableData<unsigned long,DBOCache *>* m_currElement_1 = m_currElement;
0042bf40      
0042bf44      for (; m_currElement != 0; m_currElement = m_currElement_1)
0042bf44      {
0042bf46          uint32_t m_hashKey = m_currElement->m_hashKey;
0042bf55          eax_1 = *(uint32_t*)(edi[0x19] + ((COMBINE(0, m_hashKey) % edi[0x1b]) << 2));
0042bf55          
0042bf59          if (eax_1 == 0)
0042bf59              goto label_42bf6c;
0042bf59          
0042bf62          while (*(uint32_t*)eax_1 != m_hashKey)
0042bf62          {
0042bf64              eax_1 = eax_1[1];
0042bf64              
0042bf69              if (eax_1 == 0)
0042bf69                  goto label_42bf6c;
0042bf62          }
0042bf62          
0042bf77          if (eax_1 == 0)
0042bf77              goto label_42bf6c;
0042bf77          
0042bf7e          if (eax_1 == 0xfffffff8)
0042bf7e              goto label_42bf6c;
0042bf7e          
0042bf8b          if (BaseProperty::Compare(&m_currElement->m_data, &eax_1[2]) == 0)
0042bf8b              goto label_42bf6c;
0042bf8b          
0042bf91          HashIterator<unsigned long,BaseProperty,1>::operator++(&m_currHashTable);
0042bf44      }
0042bf44      
0042bf9f      eax_2 = 1;
0042bfa5      return 1;
0042bf00  }

0042bf5d                                                                                         8d 49 00                               .I.
0042bfa8                          90 90 90 90 90 90 90 90                                                          ........

0042bfb0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::add(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>* this, class HashTableData<unsigned long,BaseProperty>* arg2)

0042bfb0  {
0042bfb8      uint32_t m_hashKey = arg2->m_hashKey;
0042bfbb      uint32_t m_numBuckets = this->m_numBuckets;
0042bfbb      
0042bfce      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0042bfce      {
0042bfd2          if (*(uint32_t*)i == m_hashKey)
0042bfd2          {
0042c01e              if (i == 0)
0042c01e                  break;
0042c01e              
0042c022              i = 0;
0042c025              return 0;
0042bfd2          }
0042bfce      }
0042bfce      
0042bfe4      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0042bfe8          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::grow(this);
0042bfe8      
0042bff1      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0042bff4      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_buckets;
0042bffa      arg2->m_hashNext = m_buckets[temp1_1];
0042bffd      m_buckets[temp1_1] = arg2;
0042c003      class HashTableData<unsigned long,BaseProperty>** eax_4 = &m_buckets[temp1_1];
0042c003      
0042c008      if (eax_4 < this->m_firstInterestingBucket)
0042c00a          this->m_firstInterestingBucket = eax_4;
0042c00a      
0042c012      this->m_numElements += 1;
0042c016      uint32_t eax_6;
0042c016      eax_6 = 1;
0042c019      return 1;
0042bfb0  }

0042c028                          90 90 90 90 90 90 90 90                                                          ........

0042c030  uint8_t __thiscall HashTable<unsigned long,BaseProperty,1>::add(class HashTable<unsigned long,BaseProperty,1>* this, uint32_t const* arg2, class BaseProperty const* arg3)

0042c030  {
0042c03c      void* esi = operator new(0x10);
0042c03c      
0042c045      if (esi == 0)
0042c066          esi = nullptr;
0042c045      else
0042c045      {
0042c051          *(uint32_t*)esi = *(uint32_t*)arg2;
0042c056          *(uint32_t*)((char*)esi + 4) = 0;
0042c05a          *(uint32_t*)((char*)esi + 8) = 0;
0042c05c          *(uint32_t*)((char*)esi + 0xc) = 0;
0042c05f          BaseProperty::operator=(((char*)esi + 8), arg3);
0042c045      }
0042c045      
0042c073      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::add(&this->m_intrusiveTable, esi) != 0)
0042c0b9          return 1;
0042c0b9      
0042c077      if (esi != 0)
0042c077      {
0042c079          int32_t* ecx_3 = *(uint32_t*)((char*)esi + 8);
0042c079          
0042c07e          if (ecx_3 != 0)
0042c07e          {
0042c080              int32_t temp1_1 = ecx_3[1];
0042c080              ecx_3[1] -= 1;
0042c080              
0042c083              if (temp1_1 == 1)
0042c089                  **(uint32_t**)ecx_3(1);
0042c089              
0042c08b              *(uint32_t*)((char*)esi + 8) = 0;
0042c07e          }
0042c07e          
0042c08e          int32_t* ecx_4 = *(uint32_t*)((char*)esi + 0xc);
0042c08e          
0042c093          if (ecx_4 != 0)
0042c093          {
0042c095              int32_t temp2_1 = ecx_4[1];
0042c095              ecx_4[1] -= 1;
0042c095              
0042c098              if (temp2_1 == 1)
0042c09e                  **(uint32_t**)ecx_4(1);
0042c09e              
0042c0a0              *(uint32_t*)((char*)esi + 0xc) = 0;
0042c093          }
0042c093          
0042c0a4          operator delete(esi);
0042c077      }
0042c077      
0042c0b1      return 0;
0042c030  }

0042c0bc                                                                                      90 90 90 90                              ....

0042c0c0  uint8_t __thiscall StructPropertyValue::FromFileNode(class StructPropertyValue* this, class BasePropertyDesc const* arg2, class PFileNode const* arg3)

0042c0c0  {
0042c0c6      class PFileNode* __return_11 = arg3;
0042c0c6      
0042c0d1      if (__return_11 != 0)
0042c0d1      {
0042c0db          char result = 1;
0042c0e0          int32_t* var_24;
0042c0e0          MasterPropertyGrabber::MasterPropertyGrabber(&var_24);
0042c0e0          
0042c0eb          if (var_24 != 0)
0042c0eb          {
0042c0f1              enum ProgramType ProgramTypeSystem::s_eProgramType_1 = ProgramTypeSystem::s_eProgramType;
0042c0fb              uint8_t var_25_1;
0042c0fb              
0042c0fb              if (ProgramTypeSystem::s_eProgramType_1 != 0x80000002)
0042c102                  var_25_1 = 0;
0042c102              
0042c107              if ((ProgramTypeSystem::s_eProgramType_1 == 0x80000002 || ProgramTypeSystem::s_eProgramType_1 == 0x80000001))
0042c109                  var_25_1 = 1;
0042c109              
0042c110              uint32_t eax_1 = PFileNode::GetNumSubNodes(__return_11);
0042c115              class BasePropertyDesc* edi = arg2;
0042c119              uint32_t ebx = eax_1;
0042c11b              uint32_t __return_6 = 0;
0042c11f              uint32_t __return_7;
0042c11f              uint32_t __return;
0042c11f              int32_t* var_18;
0042c11f              int32_t* var_14;
0042c11f              
0042c11f              if (ebx > 0)
0042c11f              {
0042c24c                  do
0042c24c                  {
0042c127                      var_18 = nullptr;
0042c12b                      var_14 = nullptr;
0042c12f                      struct PFileNode::VTable* vtable = __return_11->vtable;
0042c131                      __return = __return_6;
0042c134                      uint32_t __return_1;
0042c134                      class PFileNode* edx_1;
0042c134                      __return_1 = vtable->GetSubNode(__return);
0042c137                      __return = __return_1;
0042c13c                      uint8_t eax_2;
0042c13c                      uint32_t __return_3;
0042c13c                      eax_2 = BaseProperty::FromFileNode(&var_18, edx_1);
0042c143                      class PStringBase<char>* ecx_21;
0042c143                      
0042c143                      if (eax_2 == 0)
0042c143                      {
0042c2fb                          __return = __return_3;
0042c2fc                          ecx_21 = &__return;
0042c2fe                          __return_7 = "failed to read property";
0042c303                      label_42c303:
0042c303                          PStringBase<char>::PStringBase<char>(ecx_21, __return_7);
0042c308                          __return_7 = __return_11;
0042c309                          PFileNode::ReportError(__return_7, __return);
0042c311                          result = 0;
0042c1ff                      label_42c1ff:
0042c1ff                          int32_t* eax_7 = var_18;
0042c1ff                          
0042c205                          if (eax_7 != 0)
0042c205                          {
0042c20f                              int32_t edx_5 = (eax_7[1] - 1);
0042c20c                              eax_7[1] = edx_5;
0042c20c                              
0042c214                              if (edx_5 == 0)
0042c214                              {
0042c216                                  int32_t edx_6 = *(uint32_t*)eax_7;
0042c218                                  __return = 1;
0042c21a                                  *(uint32_t*)edx_6(__return);
0042c214                              }
0042c214                              
0042c21c                              var_18 = nullptr;
0042c205                          }
0042c205                          
0042c224                          eax_1 = var_14;
0042c224                          
0042c22a                          if (eax_1 != 0)
0042c22a                          {
0042c22c                              int32_t edx_7 = *(uint32_t*)(eax_1 + 4);
0042c237                              *(uint32_t*)(eax_1 + 4) = (edx_7 - 1);
0042c237                              
0042c239                              if (edx_7 == 1)
0042c239                              {
0042c23b                                  int32_t eax_9 = *(uint32_t*)eax_1;
0042c23d                                  __return = 1;
0042c23f                                  *(uint32_t*)eax_9(__return);
0042c239                              }
0042c239                              
0042c241                              var_14 = nullptr;
0042c22a                          }
0042c143                      }
0042c143                      else
0042c143                      {
0042c14f                          if (var_25_1 == 0)
0042c14f                          {
0042c170                          label_42c170:
0042c170                              uint32_t __return_2 = BaseProperty::GetPropertyName(&var_18);
0042c175                              int32_t** ecx_6;
0042c175                              ecx_6 = edi->m_bAllAvailable;
0042c17d                              uint8_t eax_4;
0042c17d                              
0042c17d                              if (ecx_6 == 0)
0042c17d                              {
0042c183                                  __return = __return_2;
0042c187                                  eax_4 = AvailablePropertySet::contains(&edi->m_availableProperties, __return);
0042c17d                              }
0042c17d                              
0042c18e                              if ((ecx_6 != 0 || eax_4 != 0))
0042c18e                              {
0042c2cf                                  uint32_t var_1c = BaseProperty::GetPropertyName(&var_18);
0042c2d7                                  __return = &var_18;
0042c2dc                                  __return_7 = &var_1c;
0042c2e4                                  uint8_t eax_15;
0042c2e4                                  uint32_t __return_4;
0042c2e4                                  eax_15 = HashTable<unsigned long,BaseProperty,1>::add(&this->m_value.vtable, __return_7, __return);
0042c2e4                                  
0042c2eb                                  if (eax_15 != 0)
0042c2eb                                      goto label_42c1ff;
0042c2eb                                  
0042c2f1                                  __return = __return_4;
0042c2f2                                  ecx_21 = &__return;
0042c2f4                                  __return_7 = "cannot add duplicates to Propert…";
0042c2f9                                  goto label_42c303;
0042c18e                              }
0042c18e                              
0042c194                              __return = "<UNKNOWN>";
0042c19d                              PStringBase<char>::PStringBase<char>(&arg2, __return);
0042c1a6                              __return = &arg2;
0042c1ab                              uint32_t __return_8 = BaseProperty::GetPropertyName(&var_18);
0042c1b0                              int32_t* ecx_10 = var_24;
0042c1b4                              __return_7 = __return_8;
0042c1b5                              uint32_t __return_10 = MasterProperty::InqPropertyNameString(ecx_10, __return_7, __return);
0042c1be                              __return = arg2;
0042c1bf                              __return_7 = __return_10;
0042c1c7                              PStringBase<char>::PStringBase<char>(&__return_7, "property '%s' is not an availabl…");
0042c1cd                              PFileNode::ReportError(__return_11, __return_7);
0042c1d6                              void* __offset(BasePropertyDesc, -0x14) esi_1 = ((char*)arg2 - 0x14);
0042c1df                              __return = ((char*)esi_1 + 4);
0042c1e0                              result = 0;
0042c1e0                              
0042c1f1                              if ((InterlockedDecrement(__return) == 0 && esi_1 != 0))
0042c1f1                              {
0042c1f3                                  int32_t edx_3 = *(int32_t*)((char*)ADJ(esi_1) + -0x14);
0042c1f5                                  __return = 1;
0042c1f9                                  *(uint32_t*)edx_3(__return);
0042c1f1                              }
0042c1f1                              
0042c1fb                              __return_11 = arg3;
0042c1fb                              goto label_42c1ff;
0042c14f                          }
0042c14f                          
0042c15c                          if (BaseProperty::IsToolOnly(&var_18) == 0)
0042c15c                              goto label_42c170;
0042c15c                          
0042c162                          BaseProperty::~BaseProperty(&var_18);
0042c143                      }
0042c249                      __return_6 += 1;
0042c24c                  } while (__return_6 < ebx);
0042c11f              }
0042c11f              
0042c252              eax_1 = edi->m_bAllAvailable;
0042c252              
0042c25a              if (eax_1 == 0)
0042c25a              {
0042c262                  class AvailablePropertySet* eax_10 = BasePropertyDesc::GetAvailablePropertySet(edi);
0042c26d                  __return = &var_18;
0042c270                  HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>::begin(eax_10, __return);
0042c279                  void var_c;
0042c279                  __return = &var_c;
0042c27c                  AvailablePropertySet::end(eax_10, __return);
0042c281                  int32_t* var_10;
0042c281                  int32_t* edi_1 = var_10;
0042c289                  int32_t var_4;
0042c289                  
0042c289                  if (edi_1 != var_4)
0042c289                  {
0042c28f                      int32_t* esi_3 = var_14;
0042c28f                      
0042c400                      do
0042c400                      {
0042c293                          int32_t j = *(uint32_t*)edi_1;
0042c295                          class MasterProperty* ebp = var_24;
0042c295                          
0042c2b0                          for (int32_t* i = ebp->m_properties.m_intrusiveTable.m_buckets[(COMBINE(0, j) % ebp->m_properties.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0042c2b0                          {
0042c2b8                              if (*(uint32_t*)i == j)
0042c2b8                              {
0042c31d                                  if (i != 0)
0042c31d                                  {
0042c323                                      void* eax_16 = i[2];
0042c323                                      
0042c328                                      if (eax_16 != 0)
0042c328                                      {
0042c32e                                          uint32_t edx_10;
0042c32e                                          edx_10 = *(uint8_t*)((char*)eax_16 + 0xb0);
0042c32e                                          
0042c336                                          if (edx_10 != 0)
0042c336                                          {
0042c34d                                              int32_t* eax_20 = this->m_value.m_intrusiveTable.m_buckets[(COMBINE(0, j) % this->m_value.m_intrusiveTable.m_numBuckets)];
0042c34d                                              
0042c351                                              if (eax_20 == 0)
0042c351                                              {
0042c364                                              label_42c364:
0042c364                                                  __return = "<UNKNOWN>";
0042c36d                                                  PStringBase<char>::PStringBase<char>(&arg2, __return);
0042c376                                                  uint32_t __return_9 = *(uint32_t*)var_10;
0042c37c                                                  __return = &arg2;
0042c37d                                                  __return_7 = __return_9;
0042c380                                                  MasterProperty::InqPropertyNameString(ebp, __return_7, __return);
0042c385                                                  class BasePropertyDesc* __return_5 = arg2;
0042c389                                                  __return = __return_5;
0042c38a                                                  __return_7 = __return_5;
0042c392                                                  PStringBase<char>::PStringBase<char>(&__return_7, "property '%s' is an available pr…");
0042c39c                                                  PFileNode::ReportError(arg3, __return_7);
0042c3a5                                                  void* __offset(BasePropertyDesc, -0x14) esi_5 = ((char*)arg2 - 0x14);
0042c3ae                                                  __return = ((char*)esi_5 + 4);
0042c3ae                                                  
0042c3bb                                                  if ((InterlockedDecrement(__return) == 0 && esi_5 != 0))
0042c3bb                                                  {
0042c3bd                                                      int32_t edx_15 = *(int32_t*)((char*)ADJ(esi_5) + -0x14);
0042c3bf                                                      __return = 1;
0042c3c3                                                      *(uint32_t*)edx_15(__return);
0042c3bb                                                  }
0042c3bb                                                  
0042c3c5                                                  esi_3 = var_14;
0042c3c9                                                  edi_1 = var_10;
0042c351                                              }
0042c351                                              else
0042c351                                              {
0042c355                                                  while (*(uint32_t*)eax_20 != j)
0042c355                                                  {
0042c357                                                      eax_20 = eax_20[1];
0042c357                                                      
0042c35c                                                      if (eax_20 == 0)
0042c35c                                                          goto label_42c364;
0042c355                                                  }
0042c355                                                  
0042c362                                                  if (eax_20 == 0)
0042c362                                                      goto label_42c364;
0042c351                                              }
0042c336                                          }
0042c328                                      }
0042c31d                                  }
0042c31d                                  
0042c31d                                  break;
0042c2b8                              }
0042c2b0                          }
0042c2b0                          
0042c3cd                          edi_1 = edi_1[1];
0042c3d2                          var_10 = edi_1;
0042c3d2                          
0042c3d6                          if (edi_1 == 0)
0042c3d6                          {
0042c3d8                              int32_t* eax_23 = var_18;
0042c3d8                              
0042c3e5                              while (true)
0042c3e5                              {
0042c3e5                                  esi_3 = &esi_3[1];
0042c3ea                                  var_14 = esi_3;
0042c3ea                                  
0042c3ee                                  if (esi_3 == (eax_23[0x18] + (eax_23[0x1a] << 2)))
0042c3ee                                      break;
0042c3ee                                  
0042c3f0                                  int32_t* ecx_27 = *(uint32_t*)esi_3;
0042c3f0                                  
0042c3f4                                  if (ecx_27 != 0)
0042c3f4                                  {
0042c3f6                                      edi_1 = ecx_27;
0042c3f8                                      var_10 = edi_1;
0042c3f8                                      break;
0042c3f4                                  }
0042c3e5                              }
0042c3d6                          }
0042c400                      } while (edi_1 != var_4);
0042c289                  }
0042c25a              }
0042c25a              
0042c40c              *(uint32_t*)(*(uint32_t*)var_24 + 0x14)();
0042c41a              return result;
0042c0eb          }
0042c0d1      }
0042c0d1      
0042c420      int32_t* eax;
0042c420      eax = 0;
0042c426      return 0;
0042c0c0  }

0042c429                             90 90 90 90 90 90 90                                                           .......

0042c430  void __thiscall AvailableProperty::AvailableProperty(class AvailableProperty* this, class AvailableProperty const* arg2)

0042c430  {
0042c438      if (this != arg2)
0042c43c          this->m_name = arg2->m_name;
0042c430  }

0042c441     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0042c450  void Random::Seed(int32_t arg1)

0042c450  {
0042c450      int32_t ecx = arg1;
0042c450      
0042c456      if (ecx == 0)
0042c458          ecx = 1;
0042c458      
0042c45e      Random::_idum2 = ecx;
0042c45e      
0042c4aa      for (int32_t* i = &KW_STRINGCOMMENT; i >= 0x836ea0; i -= 4)
0042c4aa      {
0042c477          int32_t ecx_1 = (ecx * 0x9c4e);
0042c487          int32_t edx_4 = ((ecx / 0xd1a4) * 0x7fffffab);
0042c48d          ecx = (ecx_1 - edx_4);
0042c48d          
0042c48f          if ((ecx_1 - edx_4) < 0)
0042c491              ecx += 0x7fffffab;
0042c491          
0042c49d          if (i < 0x836f20)
0042c49f              *(uint32_t*)i = ecx;
0042c4aa      }
0042c4aa      
0042c4b2      Random::_iy = Random::_iv[0];
0042c4b8      Random::_seed = ecx;
0042c450  }


0042c4c0  int32_t Random::rand()

0042c4c0  {
0042c4c0      int32_t Random::_seed_1 = Random::_seed;
0042c4cd      int32_t ecx = (Random::_seed_1 * 0x9c4e);
0042c4dd      int32_t edx_3 = ((Random::_seed_1 / 0xd1a4) * 0x7fffffab);
0042c4e7      int32_t edi = (ecx - edx_3);
0042c4e9      Random::_seed = edi;
0042c4e9      
0042c4ef      if ((ecx - edx_3) < 0)
0042c4ef      {
0042c4f1          edi += 0x7fffffab;
0042c4f7          Random::_seed = edi;
0042c4ef      }
0042c4ef      
0042c4fd      int32_t Random::_idum2_1 = Random::_idum2;
0042c50a      int32_t ecx_2 = (Random::_idum2_1 * 0x9ef4);
0042c51a      int32_t edx_7 = ((Random::_idum2_1 / 0xce26) * 0x7fffff07);
0042c522      int32_t esi = (ecx_2 - edx_7);
0042c524      Random::_idum2 = esi;
0042c524      
0042c52a      if ((ecx_2 - edx_7) < 0)
0042c52a      {
0042c52c          esi += 0x7fffff07;
0042c532          Random::_idum2 = esi;
0042c52a      }
0042c52a      
0042c54f      int32_t edx_11 = (Random::_iy / 0x3fffffe);
0042c558      int32_t result = (Random::_iv[edx_11] - esi);
0042c55d      Random::_iv[edx_11] = edi;
0042c565      Random::_iy = result;
0042c565      
0042c56b      if (result < 1)
0042c572          Random::_iy = (result + 0x7fffffaa);
0042c572      
0042c57d      long double x87_r7_1 = (((long double)Random::_iy) * ((long double)4.6566130573917691e-10));
0042c583      long double temp2 = ((long double)0.99999987999999995);
0042c583      (x87_r7_1 - temp2);
0042c589      result = ((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0x3800))));
0042c598      return result;
0042c4c0  }

0042c599                                                                             90 90 90 90 90 90 90                           .......

0042c5a0  void Random::Seed()

0042c5a0  {
0042c5a2      int32_t eax = time(0);
0042c5a9      Random::_seed = eax;
0042c5ae      Random::Seed(eax);
0042c5a0  }

0042c5b7                                                                       90 90 90 90 90 90 90 90 90                         .........

0042c5c0  int32_t Random::RollDice(int32_t const arg1, int32_t const arg2)

0042c5c0  {
0042c5ca      if (arg2 == arg1)
0042c5fd          return arg1;
0042c5fd      
0042c5d0      int32_t const edi_1 = arg1;
0042c5d0      
0042c5d2      if (arg2 < arg1)
0042c5d6          edi_1 = arg2;
0042c5d6      
0042c5d8      Random::rand();
0042c5f9      return (_ftol2() + edi_1);
0042c5c0  }

0042c5fe                                                                                            90 90                                ..

0042c600  int32_t Random::RollDice(float const arg1, float const arg2)

0042c600  {
0042c600      long double x87_r7 = ((long double)arg1);
0042c607      long double temp0 = ((long double)arg2);
0042c607      (x87_r7 - temp0);
0042c60b      int32_t eax;
0042c60b      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0042c60d      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0042c60d      
0042c610      if (!(p))
0042c619          return eax;
0042c619      
0042c61a      long double x87_r7_2 = ((long double)arg2);
0042c622      long double temp1 = ((long double)arg1);
0042c622      (x87_r7_2 - temp1);
0042c62a      float const var_4 = arg2;
0042c62e      float var_8 = arg1;
0042c632      float const eax_1;
0042c632      eax_1 = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
0042c634      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0042c634      
0042c637      if (!(p_1))
0042c637      {
0042c63f          var_4 = arg1;
0042c643          var_8 = arg2;
0042c637      }
0042c637      
0042c647      int32_t eax_3;
0042c647      long double st0;
0042c647      eax_3 = Random::rand();
0042c65d      return eax_3;
0042c600  }

0042c65e                                                                                            90 90                                ..

0042c660  uint8_t __thiscall PStringBase<unsigned short>::operator==(class PStringBase<unsigned short> const* this, class PStringBase<unsigned short> const* arg2)

0042c660  {
0042c664      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_charbuffer;
0042c666      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
0042c66f      int32_t eax;
0042c66f      
0042c66f      if (m_charbuffer->m_data[0x7ffffffffffffffe] == m_charbuffer_1->m_data[0x7ffffffffffffffe])
0042c66f      {
0042c671          eax = *(int32_t*)((char*)m_charbuffer + -8);
0042c674          int32_t esi_1 = *(int32_t*)((char*)m_charbuffer_1 + -8);
0042c674          
0042c683          if (((eax == esi_1 || eax == 0xffffffff) || esi_1 == 0xffffffff))
0042c683          {
0042c68d              int32_t eax_1 = wcscmp(m_charbuffer, m_charbuffer_1);
0042c696              int32_t eax_2 = -(eax_1);
0042c69c              return (((int8_t)(eax_2 - eax_2)) + 1);
0042c683          }
0042c66f      }
0042c66f      
0042c685      eax = 0;
0042c688      return 0;
0042c660  }

0042c69f                                                                                               90                                 .

0042c6a0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>* this, uint32_t arg2)

0042c6a0  {
0042c6a3      class HashTableData<unsigned long,StringInfoData *>** m_buckets = this->m_buckets;
0042c6ab      this->vtable = 0x797d68;
0042c6ab      
0042c6b1      if (m_buckets != &this->m_aInplaceBuckets)
0042c6b4          operator delete[](m_buckets);
0042c6b4      
0042c6be      this->m_buckets = nullptr;
0042c6c1      this->m_firstInterestingBucket = nullptr;
0042c6c4      this->m_numBuckets = 0;
0042c6c7      this->m_numElements = 0;
0042c6c7      
0042c6cf      if ((arg2 & 1) != 0)
0042c6d2          operator delete(this);
0042c6d2      
0042c6dd      return this;
0042c6a0  }


0042c6e0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<unsigned short> > *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<unsigned short> > *,0>* this, uint32_t arg2)

0042c6e0  {
0042c6e3      class HashTableData<unsigned long,PStringBase<unsigned short> >** m_buckets = this->m_buckets;
0042c6eb      this->vtable = 0x797d6c;
0042c6eb      
0042c6f1      if (m_buckets != &this->m_aInplaceBuckets)
0042c6f4          operator delete[](m_buckets);
0042c6f4      
0042c6fe      this->m_buckets = nullptr;
0042c701      this->m_firstInterestingBucket = nullptr;
0042c704      this->m_numBuckets = 0;
0042c707      this->m_numElements = 0;
0042c707      
0042c70f      if ((arg2 & 1) != 0)
0042c712          operator delete(this);
0042c712      
0042c71d      return this;
0042c6e0  }


0042c720  void __thiscall StringInfo::SetTableEnum(class StringInfo* this, int32_t arg2)

0042c720  {
0042c735      uint32_t id = DBObj::GetDIDByEnum(&arg2, arg2, 4)->id;
0042c735      
0042c743      if (MasterDBMap::DivineType(id) != 0x25)
0042c743      {
0042c74b          this->m_tableID.id = INVALID_DID.id;
0042c750          return;
0042c743      }
0042c743      
0042c753      this->m_tableID.id = id;
0042c720  }

0042c75b                                                                                   90 90 90 90 90                             .....

0042c760  void __thiscall StringInfo::SetStringIDandTableEnum(class StringInfo* this, uint32_t arg2, int32_t arg3)

0042c760  {
0042c774      this->m_stringID = arg2;
0042c77c      uint32_t id = DBObj::GetDIDByEnum(&arg2, arg3, 4)->id;
0042c77c      
0042c78a      if (MasterDBMap::DivineType(id) != 0x25)
0042c78a      {
0042c792          this->m_tableID.id = INVALID_DID.id;
0042c796          return;
0042c78a      }
0042c78a      
0042c799      this->m_tableID.id = id;
0042c760  }

0042c7a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0042c7b0  void __thiscall StringInfo::SetStringIDandTableID(class StringInfo* this, uint32_t arg2, class IDClass<_tagDataID,32,0> arg3)

0042c7b0  {
0042c7bd      this->m_stringID = arg2;
0042c7bd      
0042c7cb      if (MasterDBMap::DivineType(arg3) != 0x25)
0042c7cb      {
0042c7d4          this->m_tableID.id = INVALID_DID.id;
0042c7d8          return;
0042c7cb      }
0042c7cb      
0042c7db      this->m_tableID.id = arg3;
0042c7b0  }

0042c7e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0042c7f0  uint8_t __thiscall StringInfo::InqStringTableFile(class StringInfo const* this, class PStringBase<char>* arg2)

0042c7f0  {
0042c7f0      class StringInfo* __return = this;
0042c7f0      
0042c7fa      if (this->m_tableID.id == INVALID_DID.id)
0042c7fa      {
0042c7fc          uint32_t eax;
0042c7fc          eax = 0;
0042c7ff          return 0;
0042c7fa      }
0042c7fa      
0042c805      int32_t ebx;
0042c805      int32_t var_8 = ebx;
0042c806      int32_t ebp;
0042c806      int32_t var_c = ebp;
0042c807      int32_t esi;
0042c807      int32_t var_10 = esi;
0042c810      class PStringBase<char>* eax_1 = FileArray::GetRelativeFilePath(&__return, this->m_tableID.id, 0x25);
0042c821      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0042c821      
0042c82a      if (m_charbuffer != eax_1->m_charbuffer)
0042c82a      {
0042c82c          int32_t edi;
0042c82c          int32_t var_14_1 = edi;
0042c82c          
0042c83c          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0042c844              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0042c844          
0042c846          class PSRefBufferCharData<char>* m_charbuffer_1 = eax_1->m_charbuffer;
0042c848          arg2->m_charbuffer = m_charbuffer_1;
0042c84e          InterlockedIncrement(&m_charbuffer_1[-1]);
0042c82a      }
0042c82a      
0042c859      void* __offset(StringInfo, -0x14) esi_4 = ((char*)__return - 0x14);
0042c859      
0042c868      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0042c870          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0042c870      
0042c881      class PSRefBufferCharData<char>* eax_6;
0042c881      eax_6 = arg2->m_charbuffer->m_data[-4] != 1;
0042c885      return eax_6;
0042c7f0  }

0042c888                          90 90 90 90 90 90 90 90                                                          ........

0042c890  void __thiscall DBObjGrabber<StringTable>::DBObjGrabber<StringTable>(class DBObjGrabber<StringTable>* this, class IDClass<_tagDataID,32,0> arg2)

0042c890  {
0042c8a1      this->m_object = 0;
0042c8b2      void var_8;
0042c8b2      this->m_object = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x25));
0042c890  }


0042c8c0  class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* __thiscall IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::operator++(class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* this, class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* __return, int32_t arg3)

0042c8c0  {
0042c8c1      class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >** m_currBucket = this->m_currBucket;
0042c8c5      class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >* m_currElement = this->m_currElement;
0042c8c8      class HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > >* m_hashNext = m_currElement->m_hashNext;
0042c8ce      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>* m_currHashTable = this->m_currHashTable;
0042c8d0      this->m_currElement = m_hashNext;
0042c8d0      
0042c8d3      if (m_hashNext == 0)
0042c8d3      {
0042c8db          void* edx_2 = &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets];
0042c8db          
0042c8e3          while (true)
0042c8e3          {
0042c8e3              void* eax_2 = &this->m_currBucket[1];
0042c8e8              this->m_currBucket = eax_2;
0042c8e8              
0042c8eb              if (eax_2 == edx_2)
0042c8eb                  break;
0042c8eb              
0042c8f0              if (*(uint32_t*)eax_2 != 0)
0042c8f0              {
0042c8f4                  this->m_currElement = *(uint32_t*)eax_2;
0042c8f4                  break;
0042c8f0              }
0042c8e3          }
0042c8d3      }
0042c8d3      
0042c8fb      __return->m_currHashTable = m_currHashTable;
0042c8fe      __return->m_currElement = m_currElement;
0042c902      __return->m_currBucket = m_currBucket;
0042c906      return __return;
0042c8c0  }

0042c909                             90 90 90 90 90 90 90                                                           .......

0042c910  void SB_TypeAlloc<StringInfoDataResolver,SB_Default>::Serialize(int32_t const* arg1, class StringInfoData** arg2, class Archive* arg3)

0042c910  {
0042c91f      class Archive* edi;
0042c91f      
0042c91f      if ((arg3->m_flags & 1) == 0)
0042c92a          edi = arg3;
0042c91f      else
0042c924          edi = *(uint32_t*)arg2->m_eType;
0042c924      
0042c932      Archive::CheckAlignment(arg3, 2);
0042c93b      uint8_t* eax_2 = Archive::GetBytes(arg3, 2);
0042c93b      
0042c942      if (eax_2 != 0)
0042c942      {
0042c948          if ((arg3->m_flags & 1) == 0)
0042c951              edi = *(uint16_t*)eax_2;
0042c948          else
0042c94a              *(uint16_t*)eax_2 = edi;
0042c942      }
0042c942      
0042c95c      if ((!(arg3->m_flags) & 1) != 0)
0042c967          *(uint32_t*)arg2 = StringInfoData::Create(edi);
0042c967      
0042c96a      class StringInfoData* ecx_3 = *(uint32_t*)arg2;
0042c96a      
0042c96f      if (ecx_3 != 0)
0042c971          ecx_3->vtable->Serialize(arg3);
0042c910  }

0042c97b                                                                                   90 90 90 90 90                             .....

0042c980  void __thiscall StringInfo::SetLiteralValue(class StringInfo* this, class PStringBase<unsigned short> const* arg2, uint8_t arg3)

0042c980  {
0042c984      bool cond:0 = arg3 == 0;
0042c98b      this->m_Override = 1;
0042c98b      
0042c992      if (cond:0)
0042c992      {
0042ca0e          class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this->m_LiteralValue.m_charbuffer;
0042ca0e          
0042ca16          if (m_charbuffer_2 != arg2->m_charbuffer)
0042ca16          {
0042ca2b              if ((InterlockedDecrement(&m_charbuffer_2->m_data[-8]) == 0 && m_charbuffer_2 != 0x14))
0042ca33                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0042ca33              
0042ca35              class PStringBase<unsigned short> m_charbuffer_3 = arg2->m_charbuffer;
0042ca37              this->m_LiteralValue.m_charbuffer = m_charbuffer_3;
0042ca41              InterlockedIncrement((m_charbuffer_3 - 0x10));
0042ca16          }
0042c992      }
0042c992      else
0042c992      {
0042c99f          class PStringBase<unsigned short>* eax_2 = StringTableMetaLanguage::EscapeString(&arg3, arg2);
0042c9ac          class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_LiteralValue.m_charbuffer;
0042c9ac          
0042c9b9          if (m_charbuffer != eax_2->m_charbuffer)
0042c9b9          {
0042c9ca              if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0042c9d2                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0042c9d2              
0042c9d4              class PStringBase<unsigned short> m_charbuffer_1 = eax_2->m_charbuffer;
0042c9d6              this->m_LiteralValue.m_charbuffer = m_charbuffer_1;
0042c9e0              InterlockedIncrement((m_charbuffer_1 - 0x10));
0042c9b9          }
0042c9b9          
0042c9ea          int32_t* esi_2 = (arg3 - 0x14);
0042c9ea          
0042c9fa          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0042ca02              **(uint32_t**)esi_2(1);
0042c992      }
0042c980  }

0042ca4d                                         90 90 90                                                               ...

0042ca50  class PStringBase<unsigned short>* __thiscall StringInfo::GetLiteralValue(class StringInfo const* this, class PStringBase<unsigned short>* __return, uint8_t arg3)

0042ca50  {
0042ca50      class StringInfo* var_4 = this;
0042ca51      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this->m_LiteralValue.m_charbuffer;
0042ca60      var_4 = m_charbuffer_2;
0042ca69      InterlockedIncrement(&m_charbuffer_2->m_data[-8]);
0042ca69      
0042ca77      if (arg3 == 0)
0042ca77      {
0042ca83          class PStringBase<unsigned short>* eax_1 = StringTableMetaLanguage::StripMetaLetters(&arg3, &var_4);
0042ca8a          class StringInfo* eax_2 = var_4;
0042ca8a          
0042ca95          if (eax_2 != eax_1->m_charbuffer)
0042ca95          {
0042caa6              if ((InterlockedDecrement(&eax_2[0]) == 0 && eax_2 != 0x14))
0042caae                  *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
0042caae              
0042cab0              class PSRefBufferCharData<unsigned short>* m_charbuffer = eax_1->m_charbuffer;
0042cab2              var_4 = m_charbuffer;
0042caba              InterlockedIncrement(&m_charbuffer->m_data[-8]);
0042ca95          }
0042ca95          
0042cac0          int32_t* esi_3 = (arg3 - 0x14);
0042cac0          
0042cacf          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0042cad7              **(uint32_t**)esi_3(1);
0042ca77      }
0042ca77      
0042cae3      class PStringBase<unsigned short>* eax_7 = StringTableMetaLanguage::UnescapeString(&arg3, &var_4);
0042caea      class StringInfo* eax_8 = var_4;
0042caea      
0042caf5      if (eax_8 != eax_7->m_charbuffer)
0042caf5      {
0042cb06          if ((InterlockedDecrement(&eax_8[0]) == 0 && eax_8 != 0x14))
0042cb0e              *(uint32_t*)*(int32_t*)((char*)eax_8 + -0x14)(1);
0042cb0e          
0042cb10          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax_7->m_charbuffer;
0042cb12          var_4 = m_charbuffer_1;
0042cb1a          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
0042caf5      }
0042caf5      
0042cb20      int32_t* esi_6 = (arg3 - 0x14);
0042cb20      
0042cb2f      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0042cb37          **(uint32_t**)esi_6(1);
0042cb37      
0042cb39      class StringInfo* eax_13 = var_4;
0042cb41      __return->m_charbuffer = eax_13;
0042cb47      InterlockedIncrement(&eax_13[0]);
0042cb4d      void* __offset(StringInfo, -0x14) esi_8 = ((char*)var_4 - 0x14);
0042cb4d      
0042cb5c      if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
0042cb64          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
0042cb64      
0042cb6d      return __return;
0042ca50  }


0042cb70  class HashIterator<unsigned long,StringInfoData *,0>* __thiscall HashIterator<unsigned long,StringInfoData *,0>::operator++(class HashIterator<unsigned long,StringInfoData *,0>* this, class HashIterator<unsigned long,StringInfoData *,0>* __return, int32_t arg3)

0042cb70  {
0042cb74      class HashTableData<unsigned long,StringInfoData *>* m_currElement = this->m_iter.m_currElement;
0042cb78      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>* m_currHashTable = this->m_iter.m_currHashTable;
0042cb7b      class HashTableData<unsigned long,StringInfoData *>** m_currBucket = this->m_iter.m_currBucket;
0042cb85      void __return_1;
0042cb85      IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,CaseInsensitiveStringBase<PStringBase<char> > > *,1>::operator++(this, &__return_1, 0);
0042cb8a      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>** result = __return;
0042cb8e      result[1] = m_currBucket;
0042cb92      *(uint32_t*)result = m_currHashTable;
0042cb95      result[2] = m_currElement;
0042cb9c      return result;
0042cb70  }

0042cb9f                                                                                               90                                 .

0042cba0  void __fastcall HashIterator<unsigned long,StringInfoData *,0>::next(class HashIterator<unsigned long,StringInfoData *,0>* this)

0042cba0  {
0042cba3      class HashTableData<unsigned long,StringInfoData *>* m_hashNext = this->m_iter.m_currElement->m_hashNext;
0042cba8      this->m_iter.m_currElement = m_hashNext;
0042cba8      
0042cbab      if (m_hashNext == 0)
0042cbab      {
0042cbad          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>* m_currHashTable = this->m_iter.m_currHashTable;
0042cbad          
0042cbc3          while (true)
0042cbc3          {
0042cbc3              void* eax_2 = &this->m_iter.m_currBucket[1];
0042cbc8              this->m_iter.m_currBucket = eax_2;
0042cbc8              
0042cbcb              if (eax_2 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042cbcb                  break;
0042cbcb              
0042cbcd              class HashTableData<unsigned long,StringInfoData *>* edi_1 = *(uint32_t*)eax_2;
0042cbcd              
0042cbd1              if (edi_1 != 0)
0042cbd1              {
0042cbd5                  this->m_iter.m_currElement = edi_1;
0042cbd5                  break;
0042cbd1              }
0042cbc3          }
0042cbab      }
0042cba0  }

0042cbda                                                                                90 90 90 90 90 90                            ......

0042cbe0  uint8_t __thiscall StringInfo::IsValid(class StringInfo const* this, uint8_t arg2)

0042cbe0  {
0042cbe4      class StringInfo* this_1 = this;
0042cbe6      this = this_1->m_Override;
0042cbef      uint32_t id;
0042cbef      
0042cbef      if (this != 1)
0042cbef      {
0042cbf6          if (this_1->m_stringID != 0)
0042cbf8              id = this_1->m_tableID.id;
0042cbf8          
0042cc01          if ((this_1->m_stringID == 0 || id == INVALID_DID.id))
0042cc01          {
0042cc03              id = 0;
0042cc09              return 0;
0042cc01          }
0042cc01          
0042cc0f          if (this != 2)
0042cc0f          {
0042cc21              class DBObjGrabber<StringTable> var_1c;
0042cc21              DBObjGrabber<StringTable>::DBObjGrabber<StringTable>(&var_1c, id);
0042cc26              class DBObjGrabber<StringTable> edi = var_1c;
0042cc26              
0042cc2c              if (edi != 0)
0042cc2c              {
0042cc3b                  if (StringTable::GetStringTableString(edi, this_1->m_stringID) != 0)
0042cc3b                  {
0042cc51                      int32_t ebx_1 = arg2;
0042cc57                      void __return;
0042cc57                      void* var_10;
0042cc57                      void* eax_3;
0042cc57                      
0042cc57                      if (ebx_1 != 0)
0042cc57                      {
0042cc61                          HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>::begin(&this_1->m_variables, &__return);
0042cc66                          eax_3 = var_10;
0042cc57                      }
0042cc57                      
0042cc6c                      if ((ebx_1 == 0 || eax_3 == 0))
0042cc6c                      {
0042cc9d                      label_42cc9d:
0042cc9d                          *(uint32_t*)(*(uint32_t*)edi + 0x14)();
0042cca2                          int32_t eax_5;
0042cca2                          eax_5 = 1;
0042cca8                          return 1;
0042cc6c                      }
0042cc6c                      
0042cc70                      while (true)
0042cc70                      {
0042cc70                          int32_t* ecx_4 = *(uint32_t*)((char*)eax_3 + 8);
0042cc70                          
0042cc75                          if ((ecx_4 != 0 && *(uint32_t*)(*(uint32_t*)ecx_4 + 0xc)(ebx_1) == 0))
0042cc7f                              break;
0042cc7f                          
0042cc8c                          void __return_1;
0042cc8c                          HashIterator<unsigned long,StringInfoData *,0>::operator++(&__return, &__return_1, 0);
0042cc91                          eax_3 = var_10;
0042cc91                          
0042cc97                          if (eax_3 == 0)
0042cc97                              goto label_42cc9d;
0042cc70                      }
0042cc3b                  }
0042cc3b                  
0042cc41                  MasterPropertyGrabber::~MasterPropertyGrabber(&var_1c);
0042cc2c              }
0042cc2c              
0042cc48              int32_t eax;
0042cc48              eax = 0;
0042cc4e              return 0;
0042cc0f          }
0042cbef      }
0042cbef      
0042cc11      id = 1;
0042cc17      return 1;
0042cbe0  }

0042ccab                                   90 90 90 90 90                                                             .....

0042ccb0  void __thiscall StringInfo::GetSubDataIDs(class StringInfo const* this, class QualifiedDataIDArray* arg2)

0042ccb0  {
0042ccbd      if (this->m_Override != 1)
0042ccbd      {
0042ccda          void __return;
0042ccda          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, this->m_tableID.id, 0), 0);
0042cce7          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_3 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_variables.m_intrusiveTable, &__return);
0042ccec          class HashTableData<unsigned long,DBOCache *>* i_1 = eax_3->m_currElement;
0042ccf1          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_3->m_currHashTable;
0042ccf3          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_3->m_currBucket;
0042ccf3          
0042ccf6          if (i_1 != 0)
0042ccf6          {
0042ccf8              while (true)
0042ccf8              {
0042ccf8                  class DBOCache* m_data = i_1->m_data;
0042ccf8                  
0042ccfd                  if (m_data != 0)
0042ccff                      m_data->vtable->GetIfInMemory(arg2);
0042ccff                  
0042cd05                  i_1 = i_1->m_hashNext;
0042cd05                  
0042cd0a                  if (i_1 == 0)
0042cd0a                  {
0042cd20                      class HashTableData<unsigned long,DBOCache *>* i;
0042cd20                      
0042cd20                      do
0042cd20                      {
0042cd15                          m_currBucket = &m_currBucket[1];
0042cd15                          
0042cd1a                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042cd2f                              return;
0042cd2f                          
0042cd1c                          i = *(uint32_t*)m_currBucket;
0042cd20                      } while (i == 0);
0042cd20                      
0042cd22                      i_1 = i;
0042cd22                      
0042cd26                      if (i_1 == 0)
0042cd26                          break;
0042cd0a                  }
0042ccf8              }
0042ccf6          }
0042ccbd      }
0042ccb0  }

0042cd32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0042cd40  void __thiscall StringInfo::GetSubPrivateIDs(class StringInfo const* this, class QualifiedDataIDArray* arg2, class IDClass<_tagDataID,32,0> arg3)

0042cd40  {
0042cd4c      uint32_t id = this->m_tableID.id;
0042cd54      void __return;
0042cd54      
0042cd54      if (arg3 == id)
0042cd54      {
0042cd63          void var_14;
0042cd63          class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_14, id, 0x25));
0042cd63          
0042cd6f          if (eax_1 != 0)
0042cd6f          {
0042cd77              class StringTableString* eax_3 = StringTable::GetStringTableString(eax_1, this->m_stringID);
0042cd77              
0042cd7e              if (eax_3 != 0)
0042cd93                  QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, eax_3->m_table.id, 0), 0);
0042cd93              
0042cd98              eax_1->vtable->Release();
0042cd6f          }
0042cd54      }
0042cd54      
0042cda7      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_7 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_variables.m_intrusiveTable, &__return);
0042cdac      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_7->m_currElement;
0042cdb1      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_7->m_currHashTable;
0042cdb3      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_7->m_currBucket;
0042cdb3      
0042cdb6      if (i_1 != 0)
0042cdb6      {
0042cdb8          while (true)
0042cdb8          {
0042cdb8              class DBOCache* m_data = i_1->m_data;
0042cdb8              
0042cdbd              if (m_data != 0)
0042cdc3                  m_data->vtable->GetFreeObj(arg2, arg3);
0042cdc3              
0042cdca              i_1 = i_1->m_hashNext;
0042cdca              
0042cdcf              if (i_1 == 0)
0042cdcf              {
0042cdeb                  class HashTableData<unsigned long,DBOCache *>* i;
0042cdeb                  
0042cdeb                  do
0042cdeb                  {
0042cde0                      m_currBucket = &m_currBucket[1];
0042cde0                      
0042cde5                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042cdfa                          return;
0042cdfa                      
0042cde7                      i = *(uint32_t*)m_currBucket;
0042cdeb                  } while (i == 0);
0042cdeb                  
0042cded                  i_1 = i;
0042cded                  
0042cdf1                  if (i_1 == 0)
0042cdf1                      break;
0042cdcf              }
0042cdb8          }
0042cdb6      }
0042cd40  }

0042cdfd                                                                                         90 90 90                               ...

0042ce00  uint8_t __thiscall StringInfo::FromFileNode(class StringInfo* this, class PFileNode const* arg2)

0042ce00  {
0042ce06      class PFileNode* esi = arg2;
0042ce06      
0042ce0f      if (esi == 0)
0042ce0f      {
0042d17a          int32_t eax;
0042d17a          eax = 0;
0042d180          return 0;
0042ce0f      }
0042ce0f      
0042ce15      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042ce20      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0042ce27      class PFileNode* var_30 = &PStringBase<char>::s_NullBuffer_1[-1];
0042ce28      char var_1a = 1;
0042ce2d      InterlockedIncrement(var_30);
0042ce2f      var_30 = esi;
0042ce34      char var_19 = 0;
0042ce39      void var_c;
0042ce39      PFileNodeIter::PFileNodeIter(&var_c, var_30);
0042ce42      class PFileNode* i_1;
0042ce42      class PFileNode* ecx_2;
0042ce42      i_1 = PFileNodeIter::Curr(&var_c);
0042ce42      
0042ce4b      for (class PFileNode* i = i_1; i != 0; i = i_1)
0042ce4b      {
0042ce51          var_30 = &KW_STRINGTABLE;
0042ce61          char* var_34_1;
0042ce61          class PFileNode** ecx_7;
0042ce61          
0042ce61          if (PFileNode::IsKeyword(i, var_30) == 0)
0042ce61          {
0042ce8a              var_30 = &KW_STRINGTOKEN;
0042ce8a              
0042ce98              if (PFileNode::IsKeyword(i, var_30) == 0)
0042ce98              {
0042ced0                  var_30 = &KW_STRINGENGLISH;
0042ced0                  
0042cede                  if (PFileNode::IsKeyword(i, var_30) == 0)
0042cede                  {
0042cf33                      var_30 = &KW_STRINGCOMMENT;
0042cf33                      
0042cf41                      if (PFileNode::IsKeyword(i, var_30) == 0)
0042cf41                      {
0042cf85                          var_30 = &KW_LITERAL;
0042cf8a                          uint8_t eax_14;
0042cf8a                          class PFileNode* ecx_20;
0042cf8a                          eax_14 = PFileNode::IsKeyword(i, var_30);
0042cf8a                          
0042cf91                          if (eax_14 == 0)
0042cf91                          {
0042d009                              var_30 = ecx_20;
0042d011                              PStringBase<char>::PStringBase<char>(&var_30, "unknown keyword");
0042d017                              PFileNode::ReportWarning(i, var_30);
0042cf91                          }
0042cf91                          else
0042cf91                          {
0042cf97                              void var_14;
0042cf97                              PStringBase<char>::PStringBase<char>(&var_14);
0042cf9e                              class PFileNode* eax_15;
0042cf9e                              class PFileNode* ecx_23;
0042cf9e                              eax_15 = PFileNode::GetLeaf(i);
0042cfa5                              uint8_t eax_16;
0042cfa5                              
0042cfa5                              if (eax_15 != 0)
0042cfa5                              {
0042cfab                                  var_30 = &var_14;
0042cfae                                  eax_16 = PFileNode::GetNameAsPString(eax_15, var_30);
0042cfa5                              }
0042cfa5                              
0042cfb5                              if ((eax_15 == 0 || eax_16 == 0))
0042cfb5                              {
0042cfb7                                  var_30 = ecx_23;
0042cfbf                                  PStringBase<char>::PStringBase<char>(&var_30, "corrupt literal data");
0042cfc5                                  PFileNode::ReportError(i, var_30);
0042cfcd                                  var_1a = 0;
0042cfb5                              }
0042cfb5                              
0042cfd2                              var_30 = nullptr;
0042cfe2                              void __return_1;
0042cfe2                              var_30 = PStringBase<char>::to_wpstring(&var_14, &__return_1, var_30);
0042cfe9                              PStringBase<unsigned short>::operator=(&this->m_LiteralValue, var_30);
0042cff2                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0042cffb                              this->m_Override = 1;
0042d002                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14);
0042cf91                          }
0042cf41                      }
0042cf41                      else
0042cf41                      {
0042cf43                          class PFileNode* eax_12;
0042cf43                          class PFileNode* ecx_16;
0042cf43                          eax_12 = PFileNode::GetLeaf(i);
0042cf4a                          uint8_t eax_13;
0042cf4a                          
0042cf4a                          if (eax_12 != 0)
0042cf4a                          {
0042cf52                              var_30 = &this->m_strComment;
0042cf55                              eax_13 = PFileNode::GetNameAsPString(eax_12, var_30);
0042cf4a                          }
0042cf4a                          
0042cf5c                          if ((eax_12 == 0 || eax_13 == 0))
0042cf5c                          {
0042cf5e                              var_30 = ecx_16;
0042cf66                              PStringBase<char>::PStringBase<char>(&var_30, "corrupt string comment data");
0042cf6c                              PFileNode::ReportError(i, var_30);
0042cf74                              var_1a = 0;
0042cf5c                          }
0042cf5c                          
0042cf79                          this->m_Override = 2;
0042cf41                      }
0042cede                  }
0042cede                  else
0042cede                  {
0042cee0                      class PFileNode* eax_9;
0042cee0                      class PFileNode* ecx_12;
0042cee0                      eax_9 = PFileNode::GetLeaf(i);
0042cee7                      uint8_t eax_10;
0042cee7                      
0042cee7                      if (eax_9 != 0)
0042cee7                      {
0042ceef                          var_30 = &this->m_strEnglish;
0042cef2                          eax_10 = PFileNode::GetNameAsPString(eax_9, var_30);
0042cee7                      }
0042cee7                      
0042cef9                      if ((eax_9 != 0 && eax_10 != 0))
0042cef9                      {
0042cf22                          var_19 = 1;
0042cf27                          this->m_Override = 2;
0042cef9                      }
0042cef9                      else
0042cef9                      {
0042cefb                          var_30 = ecx_12;
0042cf03                          PStringBase<char>::PStringBase<char>(&var_30, "corrupt string english data");
0042cf09                          PFileNode::ReportError(i, var_30);
0042cf11                          var_1a = 0;
0042cf16                          this->m_Override = 2;
0042cef9                      }
0042cede                  }
0042ce98              }
0042ce98              else
0042ce98              {
0042ce9a                  class PFileNode* eax_6;
0042ce9a                  class PFileNode* ecx_9;
0042ce9a                  eax_6 = PFileNode::GetLeaf(i);
0042cea1                  uint8_t eax_7;
0042cea1                  
0042cea1                  if (eax_6 != 0)
0042cea1                  {
0042cea3                      var_30 = this;
0042cea6                      eax_7 = PFileNode::GetNameAsPString(eax_6, var_30);
0042cea1                  }
0042cea1                  
0042cead                  if ((eax_6 == 0 || eax_7 == 0))
0042cead                  {
0042ceb3                      var_30 = ecx_9;
0042ceb4                      ecx_7 = &var_30;
0042ceb6                      var_34_1 = "corrupt string token data";
0042ceb6                      goto label_42cebb;
0042cead                  }
0042ce98              }
0042ce61          }
0042ce61          else
0042ce61          {
0042ce63              class PFileNode* eax_3;
0042ce63              class PFileNode* ecx_5;
0042ce63              eax_3 = PFileNode::GetLeaf(i);
0042ce6a              uint8_t eax_4;
0042ce6a              
0042ce6a              if (eax_3 != 0)
0042ce6a              {
0042ce70                  var_30 = &PStringBase<char>::s_NullBuffer_2;
0042ce73                  eax_4 = PFileNode::GetNameAsPString(eax_3, var_30);
0042ce6a              }
0042ce6a              
0042ce7a              if ((eax_3 == 0 || eax_4 == 0))
0042ce7a              {
0042ce80                  var_30 = ecx_5;
0042ce81                  ecx_7 = &var_30;
0042ce83                  var_34_1 = "corrupt string table data";
0042cebb              label_42cebb:
0042cebb                  PStringBase<char>::PStringBase<char>(ecx_7, var_34_1);
0042cec1                  PFileNode::ReportError(i, var_30);
0042cec6                  var_1a = 0;
0042ce7a              }
0042ce61          }
0042d023          i_1 = PFileNodeIter::Next(&var_c);
0042ce4b      }
0042ce4b      
0042d032      i_1 = this->m_Override;
0042d032      
0042d044      if ((i_1 == 0 || i_1 == 2))
0042d044      {
0042d04a          class PSRefBufferCharData<char>* esi_1 = PStringBase<char>::s_NullBuffer_2;
0042d052          class PSRefBufferCharData<char>* m_charbuffer_8;
0042d052          
0042d052          if (esi_1->m_data[-4] != 1)
0042d052          {
0042d084              i_1 = var_19;
0042d084              
0042d08a              if ((i_1 != 0 && DBCache::IsRunTime() == 0))
0042d08a              {
0042d095                  class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_strComment.m_charbuffer;
0042d09b                  var_30 = ecx_2;
0042d09e                  var_30 = m_charbuffer_1;
0042d0a4                  int32_t ecx_34 = InterlockedIncrement(&m_charbuffer_1[-1]);
0042d0a6                  class PStringBase<char> m_charbuffer_2 = this->m_strEnglish.m_charbuffer;
0042d0ac                  int32_t var_34_13 = ecx_34;
0042d0b5                  int32_t ecx_35 = InterlockedIncrement((m_charbuffer_2 - 0x10));
0042d0b7                  class PStringBase<char> m_charbuffer_3 = this->m_strToken.m_charbuffer;
0042d0b9                  int32_t var_38_2 = ecx_35;
0042d0c1                  m_charbuffer_8 = (m_charbuffer_3 - 0x10);
0042d0c4                  m_charbuffer_8 = InterlockedIncrement(m_charbuffer_8);
0042d0c7                  m_charbuffer_8 = esi_1;
0042d0cd                  InterlockedIncrement(&esi_1[-1]);
0042d0d3                  class PStringBase<char>* eax_22;
0042d0d3                  int32_t ecx_38;
0042d0d3                  eax_22 = PFileNode::GetSourceFileName(arg2);
0042d0d8                  class PSRefBufferCharData<char>* m_charbuffer_4 = eax_22->m_charbuffer;
0042d0da                  int32_t var_40_3 = ecx_38;
0042d0e3                  InterlockedIncrement(&m_charbuffer_4[-1]);
0042d0e5                  MasterStringTableGen::AddString(m_charbuffer_4, m_charbuffer_8, m_charbuffer_3, m_charbuffer_2, var_30);
0042d08a              }
0042d08a              
0042d0ed              class PSRefBufferCharData<char>* m_charbuffer_7 = this->m_strToken.m_charbuffer;
0042d0ef              uint32_t eax_24 = *(int32_t*)((char*)m_charbuffer_7 + -8);
0042d0ef              
0042d0f5              if (eax_24 == 0xffffffff)
0042d0f5              {
0042d0f7                  var_30 = m_charbuffer_7;
0042d0f8                  eax_24 = compute_str_hash(var_30);
0042d100                  *(uint32_t*)((char*)m_charbuffer_7 - 8) = eax_24;
0042d0f5              }
0042d0f5              
0042d103              var_30 = nullptr;
0042d109              class PStringBase<unsigned short>* __return = &arg2;
0042d10e              this->m_stringID = eax_24;
0042d111              PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, __return, var_30);
0042d11a              void* __offset(PFileNode, -0x14) esi_4 = ((char*)arg2 - 0x14);
0042d120              var_30 = ((char*)esi_4 + 4);
0042d120              
0042d129              if ((InterlockedDecrement(var_30) == 0 && esi_4 != 0))
0042d129              {
0042d12b                  int32_t edx_2 = *(int32_t*)((char*)ADJ(esi_4) + -0x14);
0042d12d                  var_30 = 1;
0042d131                  *(uint32_t*)edx_2(var_30);
0042d129              }
0042d129              
0042d13c              if (this->m_tableID.id == INVALID_DID.id)
0042d13e                  var_1a = 0;
0042d052          }
0042d052          else
0042d052          {
0042d054              class PSRefBufferCharData<char>* m_charbuffer_5 = this->m_strComment.m_charbuffer;
0042d05a              class PSRefBufferCharData<char>* m_charbuffer_6 = this->m_strEnglish.m_charbuffer;
0042d060              class PSRefBufferCharData<char>* m_charbuffer = this->m_strToken.m_charbuffer;
0042d062              var_30 = m_charbuffer_5;
0042d063              class PSRefBufferCharData<char>* m_charbuffer_10 = m_charbuffer_6;
0042d064              class PSRefBufferCharData<char>* m_charbuffer_9 = m_charbuffer;
0042d065              m_charbuffer_8 = m_charbuffer_5;
0042d06d              PStringBase<char>::PStringBase<char>(&m_charbuffer_8, "failed parsing the stringtable n…");
0042d077              PFileNode::ReportError(arg2, m_charbuffer_8);
0042d13e              var_1a = 0;
0042d052          }
0042d044      }
0042d044      
0042d147      PFileNodeIter::~PFileNodeIter(&var_c);
0042d150      void* __offset(PSRefBufferCharData<char>, -0x14) esi_6 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0042d156      var_30 = ((char*)esi_6 + 4);
0042d156      
0042d15f      if ((InterlockedDecrement(var_30) == 0 && esi_6 != 0))
0042d15f      {
0042d161          int32_t edx_3 = *(int32_t*)((char*)ADJ(esi_6) + -0x14);
0042d163          var_30 = 1;
0042d167          *(uint32_t*)edx_3(var_30);
0042d15f      }
0042d15f      
0042d169      int32_t eax_28;
0042d169      eax_28 = var_1a;
0042d174      return eax_28;
0042ce00  }

0042d183           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0042d190  int32_t* __thiscall SmartArray<PStringBase<unsigned short>,1>::operator=(int32_t* arg1, int32_t* arg2)

0042d190  {
0042d194      int32_t* result = arg1;
0042d19a      int32_t* edi = arg2;
0042d1ae      int32_t* result_1 = result;
0042d1b2      uint8_t eax_2;
0042d1b2      
0042d1b2      if ((result[1] & 0x7fffffff) < (edi[1] & 0x7fffffff))
0042d1b2      {
0042d1b4          result[2] = 0;
0042d1c7          eax_2 = SmartArray<PStringBase<unsigned short>,1>::grow(result, (edi[1] & 0x7fffffff));
0042d1b2      }
0042d1b2      
0042d1ce      if (((result[1] & 0x7fffffff) >= (edi[1] & 0x7fffffff) || eax_2 != 0))
0042d1ce      {
0042d1d8          int32_t* ebx_1 = *(uint32_t*)result;
0042d1dc          int32_t* esi_1 = *(uint32_t*)edi;
0042d1de          void* ecx_3 = &esi_1[edi[2]];
0042d1e3          void* var_8_1 = ecx_3;
0042d1e3          
0042d1e7          while (esi_1 < ecx_3)
0042d1e7          {
0042d1f0              void* eax_4 = *(uint32_t*)ebx_1;
0042d1f0              
0042d1f4              if (eax_4 != *(uint32_t*)esi_1)
0042d1f4              {
0042d209                  if ((InterlockedDecrement(((char*)eax_4 - 0x10)) == 0 && eax_4 != 0x14))
0042d211                      **(uint32_t**)((char*)eax_4 - 0x14)(1);
0042d211                  
0042d213                  int32_t eax_6 = *(uint32_t*)esi_1;
0042d215                  *(uint32_t*)ebx_1 = eax_6;
0042d21b                  InterlockedIncrement((eax_6 - 0x10));
0042d221                  edi = arg2;
0042d225                  ecx_3 = var_8_1;
0042d1f4              }
0042d1f4              
0042d229              esi_1 = &esi_1[1];
0042d22c              ebx_1 = &ebx_1[1];
0042d1e7          }
0042d1e7          
0042d233          int32_t ebx_2 = edi[2];
0042d239          int32_t var_8_2 = ebx_2;
0042d239          
0042d23d          if (ebx_2 < result[2])
0042d23d          {
0042d245              while (true)
0042d245              {
0042d245                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042d24f                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0042d258                  class PSRefBufferCharData<unsigned short>** ebx_3 = (*(uint32_t*)result + (ebx_2 << 2));
0042d25b                  class PSRefBufferCharData<unsigned short>* eax_9 = *(uint32_t*)ebx_3;
0042d25b                  
0042d25f                  if (eax_9 != PStringBase<unsigned short>::s_NullBuffer_1)
0042d25f                  {
0042d274                      if ((InterlockedDecrement(&eax_9->m_data[-8]) == 0 && eax_9 != 0x14))
0042d27d                          *(uint32_t*)*(int32_t*)((char*)eax_9 + -0x14)(1);
0042d27d                      
0042d280                      *(uint32_t*)ebx_3 = PStringBase<unsigned short>::s_NullBuffer_1;
0042d282                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0042d288                      result = result_1;
0042d25f                  }
0042d25f                  
0042d29f                  if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
0042d2a7                      *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
0042d2a7                  
0042d2b1                  bool cond:3_1 = (var_8_2 + 1) < result[2];
0042d2b3                  var_8_2 += 1;
0042d2b3                  
0042d2b7                  if (!(cond:3_1))
0042d2b7                      break;
0042d2b7                  
0042d241                  ebx_2 = var_8_2;
0042d245              }
0042d245              
0042d2b9              edi = arg2;
0042d23d          }
0042d23d          
0042d2c1          result[2] = edi[2];
0042d1ce      }
0042d1ce      
0042d2cc      return result;
0042d190  }

0042d2cf                                               90                                                                 .

0042d2d0  class PStringBase<unsigned short>* operator+(class PStringBase<unsigned short>* __return, uint16_t const* arg2, class PStringBase<unsigned short> const* arg3)

0042d2d0  {
0042d2da      class PStringBase<unsigned short>* result = __return;
0042d2de      class PStringBase<unsigned short>* var_c = arg3;
0042d2df      class PStringBase<unsigned short>* result_1 = result;
0042d2e5      class PStringBase<unsigned short>* __return_1;
0042d2e5      class PStringBase<unsigned short>* edx;
0042d2e5      __return_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, arg2);
0042d2ec      PStringBase<unsigned short>::operator+(__return_1, __return_1, edx);
0042d2f5      void* __offset(PStringBase<unsigned short>, -0x14) esi_1 = &__return[-5];
0042d2f5      
0042d308      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0042d310          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0042d310      
0042d316      return result;
0042d2d0  }

0042d317                                                                       90 90 90 90 90 90 90 90 90                         .........

0042d320  uint8_t __thiscall StringInfo::operator==(class StringInfo const* this, class StringInfo const* arg2)

0042d320  {
0042d329      class StringInfo* this_1 = this;
0042d32d      class HashIterator<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>* m_currBucket;
0042d32d      
0042d32d      if (this_1 != arg2)
0042d32d      {
0042d333          this = this_1->m_Override;
0042d333          
0042d33c          if (this == 1)
0042d33c          {
0042d344              if (arg2->m_Override == this)
0042d361                  return PStringBase<unsigned short>::operator==(&this_1->m_LiteralValue, &arg2->m_LiteralValue);
0042d361              
0042d344              goto label_42d401;
0042d33c          }
0042d33c          
0042d382          if (((this_1->m_stringID != arg2->m_stringID || this_1->m_tableID.id != arg2->m_tableID.id) || this != arg2->m_Override))
0042d382          {
0042d401          label_42d401:
0042d401              m_currBucket = 0;
0042d407              return 0;
0042d382          }
0042d382          
0042d38e          if (PStringBase<char>::operator!=(this_1, arg2) != 0)
0042d38e              goto label_42d401;
0042d38e          
0042d3a4          if (PStringBase<char>::operator!=(&this_1->m_strEnglish, &arg2->m_strEnglish) != 0)
0042d3a4              goto label_42d401;
0042d3a4          
0042d3c2          if ((PStringBase<char>::operator!=(&this_1->m_strComment, &arg2->m_strComment) != 0 || this_1->m_variables.m_intrusiveTable.m_numElements != arg2->m_variables.m_intrusiveTable.m_numElements))
0042d3ba              goto label_42d401;
0042d3ba          
0042d3cc          void __return;
0042d3cc          HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>::begin(&this_1->m_variables, &__return);
0042d3d1          int32_t* var_4;
0042d3d1          int32_t* edi = var_4;
0042d3d1          
0042d3d7          if (edi != 0)
0042d3d7          {
0042d3e0              while (true)
0042d3e0              {
0042d3e0                  int32_t i = *(uint32_t*)edi;
0042d3ef                  m_currBucket = arg2->m_variables.m_intrusiveTable.m_buckets[(COMBINE(0, i) % arg2->m_variables.m_intrusiveTable.m_numBuckets)];
0042d3ef                  
0042d3f3                  if (m_currBucket == 0)
0042d3f3                      break;
0042d3f3                  
0042d3f7                  while (m_currBucket->m_iter.m_currHashTable != i)
0042d3f7                  {
0042d3f9                      m_currBucket = m_currBucket->m_iter.m_currBucket;
0042d3f9                      
0042d3fe                      if (m_currBucket == 0)
0042d3fe                          goto label_42d401;
0042d3f7                  }
0042d3f7                  
0042d40c                  if (m_currBucket == 0)
0042d40c                      break;
0042d40c                  
0042d420                  if (StringInfoData::Compare(m_currBucket->m_iter.m_currElement, edi[2]) == 0)
0042d420                      break;
0042d420                  
0042d426                  HashIterator<unsigned long,StringInfoData *,0>::next(&__return);
0042d42b                  edi = var_4;
0042d42b                  
0042d431                  if (edi == 0)
0042d431                      goto label_42d434;
0042d3e0              }
0042d3e0              
0042d3f3              goto label_42d401;
0042d3d7          }
0042d32d      }
0042d32d      
0042d434  label_42d434:
0042d434      m_currBucket = 1;
0042d43a      return 1;
0042d320  }

0042d43d                                                                                         90 90 90                               ...

0042d440  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>* this, uint32_t arg2)

0042d440  {
0042d44b      arg2 = arg2;
0042d44f      uint8_t edx = ((int8_t)arg2);
0042d453      this->m_buckets = nullptr;
0042d456      this->m_firstInterestingBucket = nullptr;
0042d459      this->m_numBuckets = 0;
0042d45c      this->m_numElements = 0;
0042d460      this->vtable = 0x797d68;
0042d466      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0042d479      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0042d479      
0042d483      if (eax == bucketSizesEnd_1)
0042d485          eax -= 4;
0042d485      
0042d488      uint32_t eax_1 = *(uint32_t*)eax;
0042d48d      this->m_numBuckets = eax_1;
0042d48d      
0042d490      if (eax_1 > 0x17)
0042d4a6          this->m_buckets = operator new[]((eax_1 << 2));
0042d490      else
0042d495          this->m_buckets = &this->m_aInplaceBuckets;
0042d495      
0042d4ac      class HashTableData<unsigned long,StringInfoData *>** m_buckets = this->m_buckets;
0042d4af      uint32_t ecx_3 = (this->m_numBuckets << 2);
0042d4b5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0042d4c6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0042d440  }

0042d4cf                                               90                                                                 .

0042d4d0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<unsigned short> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<unsigned short> > *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<unsigned short> > *,0>* this, uint32_t arg2)

0042d4d0  {
0042d4db      arg2 = arg2;
0042d4df      uint8_t edx = ((int8_t)arg2);
0042d4e3      this->m_buckets = nullptr;
0042d4e6      this->m_firstInterestingBucket = nullptr;
0042d4e9      this->m_numBuckets = 0;
0042d4ec      this->m_numElements = 0;
0042d4f0      this->vtable = 0x797d6c;
0042d4f6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0042d509      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0042d509      
0042d513      if (eax == bucketSizesEnd_1)
0042d515          eax -= 4;
0042d515      
0042d518      uint32_t eax_1 = *(uint32_t*)eax;
0042d51d      this->m_numBuckets = eax_1;
0042d51d      
0042d520      if (eax_1 > 0x17)
0042d536          this->m_buckets = operator new[]((eax_1 << 2));
0042d520      else
0042d525          this->m_buckets = &this->m_aInplaceBuckets;
0042d525      
0042d53c      class HashTableData<unsigned long,PStringBase<unsigned short> >** m_buckets = this->m_buckets;
0042d53f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0042d545      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0042d556      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0042d4d0  }

0042d55f                                                                                               90                                 .

0042d560  void ?SerializeIntrusiveHashTable@?$@HV?$IntrusiveHashTable@KPAV?$HashTableData@KPAVStringInfoData@@@@$0A@@@PAV?$HashTableData@KPAVStringInfoData@@@@USB_HashData@?$SB_Hash@USB_Default@@U?$SB_TypeAlloc@UStringInfoDataResolver@@USB_Default@@@@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABHAAV?$IntrusiveHashTable@KPAV?$HashTableData@KPAVStringInfoData@@@@$0A@@@AAVArchive@@@Z(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>* arg2, class Archive* arg3)

0042d560  {
0042d566      class Archive* esi = arg3;
0042d566      
0042d572      if ((!(esi->m_flags) & 1) != 0)
0042d578          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
0042d578      
0042d586      int32_t ebx;
0042d586      
0042d586      if ((((int8_t)esi->m_flags) & 5) != 1)
0042d5c5          ebx = arg3;
0042d586      else
0042d586      {
0042d58f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0042d595          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0042d59d          arg3 = arg2->m_numBuckets;
0042d5ad          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0042d5ad          
0042d5b7          if (eax_2 == bucketSizesEnd_1)
0042d5b9              eax_2 -= 4;
0042d5b9          
0042d5c0          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
0042d586      }
0042d586      
0042d5cd      Archive::CheckAlignment(esi, 1);
0042d5d6      char* eax_3 = Archive::GetBytes(esi, 1);
0042d5d6      
0042d5dd      if (eax_3 != 0)
0042d5dd      {
0042d5e3          if ((esi->m_flags & 1) == 0)
0042d5e9              ebx = *(uint8_t*)eax_3;
0042d5e3          else
0042d5e5              *(uint8_t*)eax_3 = ebx;
0042d5dd      }
0042d5dd      
0042d5ef      if ((esi->m_flags & 5) == 0)
0042d5ef      {
0042d5f7          uint32_t eax_4 = ((uint32_t)ebx);
0042d5f7          
0042d5fc          if (eax_4 < 0x17)
0042d615              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
0042d5fc          else
0042d600              Archive::RaiseError(esi);
0042d5ef      }
0042d5ef      
0042d621      if ((((int8_t)esi->m_flags) & 5) == 1)
0042d62a          arg3 = arg2->m_numElements;
0042d62a      
0042d639      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
0042d639      
0042d64a      if ((((int8_t)esi->m_flags) & 5) == 1)
0042d64a      {
0042d655          void __return;
0042d655          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0042d65a          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0042d65c          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
0042d65f          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
0042d65f          
0042d664          while (i != 0)
0042d664          {
0042d6a3              do
0042d6a3              {
0042d66a                  Archive::CheckAlignment(esi, 4);
0042d673                  uint32_t* eax_7 = Archive::GetBytes(esi, 4);
0042d673                  
0042d67a                  if (eax_7 != 0)
0042d67a                  {
0042d680                      if ((esi->m_flags & 1) == 0)
0042d68a                          i->m_hashKey = *(uint32_t*)eax_7;
0042d680                      else
0042d684                          *(uint32_t*)eax_7 = i->m_hashKey;
0042d67a                  }
0042d67a                  
0042d696                  SB_TypeAlloc<StringInfoDataResolver,SB_Default>::Serialize(arg1, &i->m_data, esi);
0042d69b                  i = i->m_hashNext;
0042d6a3              } while (i != 0);
0042d6a3              
0042d6b0              while (true)
0042d6b0              {
0042d6b0                  m_currBucket = &m_currBucket[1];
0042d6b0                  
0042d6b5                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042d6b5                      break;
0042d6b5                  
0042d6b7                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0042d6b7                  
0042d6bc                  if (i_1 != 0)
0042d6bc                  {
0042d6be                      i = i_1;
0042d6c0                      break;
0042d6bc                  }
0042d6b0              }
0042d664          }
0042d64a      }
0042d64a      
0042d6c6      if ((esi->m_flags & 5) == 0)
0042d6c6      {
0042d6ce          uint32_t eax_11 = Archive::GetSizeLeft(esi);
0042d6d3          class Archive* ecx_16 = arg3;
0042d6d3          
0042d6d9          if (ecx_16 > eax_11)
0042d76c              Archive::RaiseError(esi);
0042d6d9          else
0042d6d9          {
0042d6df              void* ebp_1 = nullptr;
0042d6e1              int32_t ebx_3 = 0;
0042d6e1              
0042d6e5              if (ecx_16 > 0)
0042d6e5              {
0042d6f2                  while (true)
0042d6f2                  {
0042d6f2                      void* eax_12 = operator new(0xc);
0042d6f7                      void* edi_1 = nullptr;
0042d6f7                      
0042d6fe                      if (eax_12 != 0)
0042d6fe                      {
0042d700                          *(uint32_t*)((char*)eax_12 + 4) = 0;
0042d703                          edi_1 = eax_12;
0042d6fe                      }
0042d6fe                      
0042d709                      Archive::CheckAlignment(esi, 4);
0042d712                      uint8_t* eax_13 = Archive::GetBytes(esi, 4);
0042d712                      
0042d719                      if (eax_13 != 0)
0042d719                      {
0042d71f                          if ((esi->m_flags & 1) == 0)
0042d729                              *(uint32_t*)edi_1 = *(uint32_t*)eax_13;
0042d71f                          else
0042d723                              *(uint32_t*)eax_13 = *(uint32_t*)edi_1;
0042d719                      }
0042d719                      
0042d735                      SB_TypeAlloc<StringInfoDataResolver,SB_Default>::Serialize(arg1, ((char*)edi_1 + 8), esi);
0042d735                      
0042d746                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
0042d778                          return;
0042d778                      
0042d755                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebp_1) == 0)
0042d755                          break;
0042d755                      
0042d75b                      ebx_3 += 1;
0042d75e                      ebp_1 = edi_1;
0042d75e                      
0042d760                      if (ebx_3 >= arg3)
0042d769                          return;
0042d6f2                  }
0042d6f2                  
0042d76c                  Archive::RaiseError(esi);
0042d6e5              }
0042d6d9          }
0042d6c6      }
0042d560  }

0042d6ed                                         8d 49 00                                                               .I.
0042d779                                                                             90 90 90 90 90 90 90                           .......

0042d780  uint8_t __thiscall HashTable<unsigned long,StringInfoData *,0>::set(class HashTable<unsigned long,StringInfoData *,0>* this, uint32_t const* arg2, class StringInfoData** arg3)

0042d780  {
0042d789      uint32_t const ecx = *(uint32_t*)arg2;
0042d789      
0042d79c      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, ecx) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0042d79c      {
0042d7a2          if (*(uint32_t*)i == ecx)
0042d7a2          {
0042d7de              if (i == 0)
0042d7de                  break;
0042d7de              
0042d7e7              i[2] = *(uint32_t*)arg3;
0042d7ea              i = 1;
0042d7ed              return 1;
0042d7a2          }
0042d79c      }
0042d79c      
0042d7ad      void* eax_3 = operator new(0xc);
0042d7ad      
0042d7b7      if (eax_3 == 0)
0042d7b7      {
0042d7f5          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, nullptr);
0042d7fb          int32_t eax_5;
0042d7fb          eax_5 = 1;
0042d7fe          return 1;
0042d7b7      }
0042d7b7      
0042d7bf      *(uint32_t*)eax_3 = *(uint32_t*)arg2;
0042d7c1      *(uint32_t*)((char*)eax_3 + 4) = 0;
0042d7ca      *(uint32_t*)((char*)eax_3 + 8) = *(uint32_t*)arg3;
0042d7d0      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, eax_3);
0042d7d6      int32_t eax_4;
0042d7d6      eax_4 = 1;
0042d7d9      return 1;
0042d780  }

0042d801     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0042d810  uint8_t __thiscall HashTable<unsigned long,PStringBase<unsigned short>,0>::set(class HashTable<unsigned long,PStringBase<unsigned short>,0>* this, uint32_t const* arg2, class PStringBase<unsigned short> const* arg3)

0042d810  {
0042d81a      uint32_t const i = *(uint32_t*)arg2;
0042d826      int32_t* esi = this->m_intrusiveTable.m_buckets[(COMBINE(0, i) % this->m_intrusiveTable.m_numBuckets)];
0042d82e      void* eax_7;
0042d82e      
0042d82e      if (esi == 0)
0042d82e      {
0042d842      label_42d842:
0042d842          uint32_t* esi_1 = operator new(0xc);
0042d842          
0042d849          if (esi_1 != 0)
0042d849          {
0042d851              *(uint32_t*)esi_1 = *(uint32_t*)arg2;
0042d853              esi_1[1] = 0;
0042d85a              class PSRefBufferCharData<unsigned short>* m_charbuffer = arg3->m_charbuffer;
0042d85c              esi_1[2] = m_charbuffer;
0042d863              InterlockedIncrement(&m_charbuffer->m_data[-8]);
0042d86c              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi_1);
0042d873              int32_t eax_6;
0042d873              eax_6 = 1;
0042d876              return 1;
0042d849          }
0042d849          
0042d8c1          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, nullptr);
0042d82e      }
0042d82e      else
0042d82e      {
0042d832          while (*(uint32_t*)esi != i)
0042d832          {
0042d834              esi = esi[1];
0042d834              
0042d839              if (esi == 0)
0042d839                  goto label_42d842;
0042d832          }
0042d832          
0042d87b          if (esi == 0)
0042d87b              goto label_42d842;
0042d87b          
0042d881          eax_7 = esi[2];
0042d881          
0042d886          if (eax_7 != arg3->m_charbuffer)
0042d886          {
0042d89b              if ((InterlockedDecrement(((char*)eax_7 - 0x10)) == 0 && eax_7 != 0x14))
0042d8a3                  **(uint32_t**)((char*)eax_7 - 0x14)(1);
0042d8a3              
0042d8a5              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg3->m_charbuffer;
0042d8a7              esi[2] = m_charbuffer_1;
0042d8ae              InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
0042d8b6              int32_t eax_10;
0042d8b6              eax_10 = 1;
0042d8b9              return 1;
0042d886          }
0042d82e      }
0042d82e      
0042d8c8      eax_7 = 1;
0042d8cb      return 1;
0042d810  }

0042d8ce                                            90 90                                                                ..

0042d8d0  void __fastcall StringInfo::ClearVars(class StringInfo* this)

0042d8d0  {
0042d8e1      void __return;
0042d8e1      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_variables.m_intrusiveTable, &__return);
0042d8e6      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
0042d8eb      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0042d8ed      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0042d8ed      
0042d8f0      if (i_1 != 0)
0042d8f0      {
0042d8f2          while (true)
0042d8f2          {
0042d8f2              class DBOCache* m_data = i_1->m_data;
0042d8f2              
0042d8f7              if (m_data != 0)
0042d8f9                  m_data->vtable->__vecDelDtor(1);
0042d8f9              
0042d8ff              i_1->m_data = nullptr;
0042d906              i_1 = i_1->m_hashNext;
0042d906              
0042d90b              if (i_1 == 0)
0042d90b              {
0042d921                  class HashTableData<unsigned long,DBOCache *>* i;
0042d921                  
0042d921                  do
0042d921                  {
0042d916                      m_currBucket = &m_currBucket[1];
0042d916                      
0042d91b                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042d91b                          goto label_42d92b;
0042d91b                      
0042d91d                      i = *(uint32_t*)m_currBucket;
0042d921                  } while (i == 0);
0042d921                  
0042d923                  i_1 = i;
0042d923                  
0042d927                  if (i_1 == 0)
0042d927                      break;
0042d90b              }
0042d8f2          }
0042d8f0      }
0042d8f0      
0042d92b  label_42d92b:
0042d92b      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_variables.m_intrusiveTable);
0042d8d0  }

0042d938                                                                          90 90 90 90 90 90 90 90                          ........

0042d940  void __fastcall StringInfo::AddVar(class StringInfo* this, class StringInfoData* arg2)

0042d940  {
0042d940      class StringInfo* m_eVarID = this;
0042d941      class StringInfoData* eax = arg2;
0042d941      
0042d94a      if (eax != 0)
0042d94a      {
0042d957          m_eVarID = eax->m_eVarID;
0042d95b          struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_2 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_variables.m_intrusiveTable, &m_eVarID);
0042d95b          
0042d962          if (eax_2 != 0)
0042d962          {
0042d965              class DLListData* dllist_next = eax_2->dllist_next;
0042d969              operator delete(eax_2);
0042d969              
0042d973              if (dllist_next != 0)
0042d975                  dllist_next->dllist_next->dllist_next(1);
0042d962          }
0042d962          
0042d98b          HashTable<unsigned long,StringInfoData *,0>::set(&this->m_variables, &m_eVarID, &arg2);
0042d94a      }
0042d940  }

0042d995                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0042d9a0  void* __thiscall HashTable<unsigned long,StringInfoData *,0>::`scalar deleting destructor'(class HashTable<unsigned long,StringInfoData *,0>* this, uint32_t arg2)

0042d9a0  {
0042d9a9      this->vtable = 0x797e5c;
0042d9af      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0042d9b4      class HashTableData<unsigned long,StringInfoData *>** m_buckets = this->m_intrusiveTable.m_buckets;
0042d9a4      this->m_intrusiveTable.vtable = 0x797d68;
0042d9a4      
0042d9c2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0042d9c5          operator delete[](m_buckets);
0042d9c5      
0042d9a4      this->m_intrusiveTable.m_buckets = nullptr;
0042d9a4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0042d9a4      this->m_intrusiveTable.m_numBuckets = 0;
0042d9a4      this->m_intrusiveTable.m_numElements = 0;
0042d9a4      
0042d9e0      if ((arg2 & 1) != 0)
0042d9e3          operator delete(this);
0042d9e3      
0042d9ef      return this;
0042d9a0  }

0042d9f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0042da00  void* __thiscall HashTable<unsigned long,PStringBase<unsigned short>,0>::`scalar deleting destructor'(class HashTable<unsigned long,PStringBase<unsigned short>,0>* this, uint32_t arg2)

0042da00  {
0042da09      this->vtable = 0x797e60;
0042da0f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&this->m_intrusiveTable);
0042da14      class HashTableData<unsigned long,PStringBase<unsigned short> >** m_buckets = this->m_intrusiveTable.m_buckets;
0042da04      this->m_intrusiveTable.vtable = 0x797d6c;
0042da04      
0042da22      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0042da25          operator delete[](m_buckets);
0042da25      
0042da04      this->m_intrusiveTable.m_buckets = nullptr;
0042da04      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0042da04      this->m_intrusiveTable.m_numBuckets = 0;
0042da04      this->m_intrusiveTable.m_numElements = 0;
0042da04      
0042da40      if ((arg2 & 1) != 0)
0042da43          operator delete(this);
0042da43      
0042da4f      return this;
0042da00  }

0042da52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0042da60  void __fastcall StringInfo::StringInfo(class StringInfo* this)

0042da60  {
0042da60      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042da66      class PSRefBufferCharData<char>** this_1 = this;
0042da75      *(uint32_t*)this_1 = PStringBase<char>::s_NullBuffer_1;
0042da77      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0042da79      this_1[1] = 0;
0042da86      this_1[2] = INVALID_DID.id;
0042da8e      this_1[3] = 0x797e5c;
0042da95      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>(&this_1[4], 0x17);
0042da9a      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042daa5      this_1[0x20] = PStringBase<unsigned short>::s_NullBuffer_1;
0042daab      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0042daad      this_1[0x21] = 0;
0042dab4      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0042dac0      this_1[0x22] = PStringBase<char>::s_NullBuffer_3;
0042dac6      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
0042dac8      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0042dad4      this_1[0x23] = PStringBase<char>::s_NullBuffer_2;
0042dada      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0042da60  }

0042dae1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0042daf0  void __fastcall StringInfo::Reset(class StringInfo* this)

0042daf0  {
0042db01      this->m_stringID = 0;
0042db0d      this->m_tableID.id = INVALID_DID.id;
0042db10      class PSRefBufferCharData<char>* m_charbuffer = this->m_strToken.m_charbuffer;
0042db12      this->m_Override = 0;
0042db12      
0042db20      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0042db20      {
0042db31          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0042db39              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0042db39          
0042db3b          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042db46          this->m_strToken.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0042db48          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0042db20      }
0042db20      
0042db4a      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_LiteralValue.m_charbuffer;
0042db4a      
0042db56      if (m_charbuffer_1 != PStringBase<unsigned short>::s_NullBuffer)
0042db56      {
0042db67          if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
0042db6f              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0042db6f          
0042db71          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042db7d          this->m_LiteralValue.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
0042db83          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0042db56      }
0042db56      
0042db85      class PSRefBufferCharData<char>* m_charbuffer_2 = this->m_strEnglish.m_charbuffer;
0042db85      
0042db91      if (m_charbuffer_2 != PStringBase<char>::s_NullBuffer)
0042db91      {
0042dba2          if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
0042dbaa              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0042dbaa          
0042dbac          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0042dbb7          this->m_strEnglish.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0042dbbd          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0042db91      }
0042db91      
0042dbbf      class PSRefBufferCharData<char>* m_charbuffer_3 = this->m_strComment.m_charbuffer;
0042dbbf      
0042dbcb      if (m_charbuffer_3 != PStringBase<char>::s_NullBuffer)
0042dbcb      {
0042dbdc          if ((InterlockedDecrement(&m_charbuffer_3[-1]) == 0 && m_charbuffer_3 != 0x14))
0042dbe4              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_3 + -0x14)(1);
0042dbe4          
0042dbe6          class PStringBase<char> PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0042dbf2          this->m_strComment.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0042dbf8          InterlockedIncrement((PStringBase<char>::s_NullBuffer_3 - 0x10));
0042dbcb      }
0042dbcb      
0042dc00      /* tailcall */
0042dc00      return StringInfo::ClearVars(this);
0042daf0  }

0042dc05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0042dc10  class StringInfo const& __thiscall StringInfo::operator=(class StringInfo* this, class StringInfo const& arg2)

0042dc10  {
0042dc1d      if (arg2 != this)
0042dc1d      {
0042dc23          class PSRefBufferCharData<char>* m_charbuffer = this->m_strToken.m_charbuffer;
0042dc23          
0042dc30          if (m_charbuffer != arg2->m_strToken.m_charbuffer)
0042dc30          {
0042dc45              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0042dc4d                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0042dc4d              
0042dc4f              class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_strToken.m_charbuffer;
0042dc51              this->m_strToken.m_charbuffer = m_charbuffer_1;
0042dc58              InterlockedIncrement(&m_charbuffer_1[-1]);
0042dc30          }
0042dc30          
0042dc5d          this->m_stringID = arg2->m_stringID;
0042dc63          this->m_tableID.id = arg2->m_tableID.id;
0042dc6c          this->m_Override = arg2->m_Override;
0042dc72          class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this->m_LiteralValue.m_charbuffer;
0042dc72          
0042dc7e          if (m_charbuffer_2 != arg2->m_LiteralValue.m_charbuffer)
0042dc7e          {
0042dc93              if ((InterlockedDecrement(&m_charbuffer_2->m_data[-8]) == 0 && m_charbuffer_2 != 0x14))
0042dc9b                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0042dc9b              
0042dc9d              class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = arg2->m_LiteralValue.m_charbuffer;
0042dca3              this->m_LiteralValue.m_charbuffer = m_charbuffer_3;
0042dcad              InterlockedIncrement(&m_charbuffer_3->m_data[-8]);
0042dc7e          }
0042dc7e          
0042dcaf          class PSRefBufferCharData<char>* m_charbuffer_4 = this->m_strEnglish.m_charbuffer;
0042dcaf          
0042dcbb          if (m_charbuffer_4 != arg2->m_strEnglish.m_charbuffer)
0042dcbb          {
0042dcd0              if ((InterlockedDecrement(&m_charbuffer_4[-1]) == 0 && m_charbuffer_4 != 0x14))
0042dcd8                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_4 + -0x14)(1);
0042dcd8              
0042dcda              class PSRefBufferCharData<char>* m_charbuffer_5 = arg2->m_strEnglish.m_charbuffer;
0042dce0              this->m_strEnglish.m_charbuffer = m_charbuffer_5;
0042dcea              InterlockedIncrement(&m_charbuffer_5[-1]);
0042dcbb          }
0042dcbb          
0042dcec          class PSRefBufferCharData<char>* m_charbuffer_7 = this->m_strComment.m_charbuffer;
0042dcec          
0042dcf8          if (m_charbuffer_7 != arg2->m_strComment.m_charbuffer)
0042dcf8          {
0042dd0d              if ((InterlockedDecrement(&m_charbuffer_7[-1]) == 0 && m_charbuffer_7 != 0x14))
0042dd15                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_7 + -0x14)(1);
0042dd15              
0042dd17              class PSRefBufferCharData<char>* m_charbuffer_6 = arg2->m_strComment.m_charbuffer;
0042dd1d              this->m_strComment.m_charbuffer = m_charbuffer_6;
0042dd27              InterlockedIncrement(&m_charbuffer_6[-1]);
0042dcf8          }
0042dcf8          
0042dd2b          StringInfo::ClearVars(this);
0042dd38          void __return;
0042dd38          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_14 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&arg2->m_variables.m_intrusiveTable, &__return);
0042dd3d          class HashTableData<unsigned long,DBOCache *>* i_1 = eax_14->m_currElement;
0042dd42          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_14->m_currHashTable;
0042dd44          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_14->m_currBucket;
0042dd44          
0042dd4b          if (i_1 != 0)
0042dd4b          {
0042dd54              while (true)
0042dd54              {
0042dd54                  class StringInfoData* eax_15 = StringInfoData::Copy(i_1->m_data);
0042dd54                  
0042dd60                  if (eax_15 != 0)
0042dd60                  {
0042dd64                      void* eax_16 = operator new(0xc);
0042dd6e                      void* edi_6;
0042dd6e                      
0042dd6e                      if (eax_16 == 0)
0042dd82                          edi_6 = nullptr;
0042dd6e                      else
0042dd6e                      {
0042dd70                          uint32_t m_hashKey = i_1->m_hashKey;
0042dd72                          *(uint32_t*)((char*)eax_16 + 8) = eax_15;
0042dd75                          *(uint32_t*)eax_16 = m_hashKey;
0042dd77                          *(uint32_t*)((char*)eax_16 + 4) = 0;
0042dd7e                          edi_6 = eax_16;
0042dd6e                      }
0042dd6e                      
0042dd93                      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_variables.m_intrusiveTable, edi_6) == 0 && edi_6 != 0))
0042dd96                          operator delete(edi_6);
0042dd60                  }
0042dd60                  
0042dd9e                  i_1 = i_1->m_hashNext;
0042dd9e                  
0042dda3                  if (i_1 == 0)
0042dda3                  {
0042ddbd                      class HashTableData<unsigned long,DBOCache *>* i;
0042ddbd                      
0042ddbd                      do
0042ddbd                      {
0042ddb2                          m_currBucket = &m_currBucket[1];
0042ddb2                          
0042ddb7                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042ddce                              return this;
0042ddce                          
0042ddb9                          i = *(uint32_t*)m_currBucket;
0042ddbd                      } while (i == 0);
0042ddbd                      
0042ddbf                      i_1 = i;
0042ddbf                      
0042ddc3                      if (i_1 == 0)
0042ddc3                          break;
0042dda3                  }
0042dd54              }
0042dd4b          }
0042dc1d      }
0042dc1d      
0042ddce      return this;
0042dc10  }

0042ddd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0042dde0  void __thiscall StringInfo::AddVariable_Int(class StringInfo* this, uint32_t arg2, int64_t arg3)

0042dde0  {
0042dde5      void* eax = operator new(0x18);
0042dde5      
0042ddef      if (eax != 0)
0042ddef      {
0042ddf8          void* eax_1 = LInt_StringInfoData::LInt_StringInfoData(eax, arg2);
0042ddf8          
0042ddff          if (eax_1 != 0)
0042ddff          {
0042de05              class StringInfoData* edx_1 = arg3;
0042de09              *(uint32_t*)((char*)eax_1 + 0x14) = *(uint32_t*)((char*)arg3)[4];
0042de0c              void* var_8_2 = eax_1;
0042de0f              *(uint32_t*)((char*)eax_1 + 0x10) = edx_1;
0042de12              StringInfo::AddVar(this, edx_1);
0042ddff          }
0042ddef      }
0042dde0  }

0042de1b                                                                                   90 90 90 90 90                             .....

0042de20  void __thiscall StringInfo::AddVariable_UInt(class StringInfo* this, uint32_t arg2, uint64_t arg3)

0042de20  {
0042de25      void* eax = operator new(0x18);
0042de25      
0042de2f      if (eax != 0)
0042de2f      {
0042de38          void* eax_1 = ULInt_StringInfoData::ULInt_StringInfoData(eax, arg2);
0042de38          
0042de3f          if (eax_1 != 0)
0042de3f          {
0042de45              class StringInfoData* edx_1 = arg3;
0042de49              *(uint32_t*)((char*)eax_1 + 0x14) = *(uint32_t*)((char*)arg3)[4];
0042de4c              void* var_8_2 = eax_1;
0042de4f              *(uint32_t*)((char*)eax_1 + 0x10) = edx_1;
0042de52              StringInfo::AddVar(this, edx_1);
0042de3f          }
0042de2f      }
0042de20  }

0042de5b                                                                                   90 90 90 90 90                             .....

0042de60  void __thiscall StringInfo::AddVariable_Float(class StringInfo* this, uint32_t arg2, double arg3, uint16_t arg4)

0042de60  {
0042de65      void* eax = operator new(0x20);
0042de65      
0042de6f      if (eax != 0)
0042de6f      {
0042de78          void* eax_1 = Double_StringInfoData::Double_StringInfoData(eax, arg2);
0042de78          
0042de7f          if (eax_1 != 0)
0042de7f          {
0042de89              *(uint32_t*)((char*)eax_1 + 0x10) = arg3;
0042de8c              class StringInfoData* edx_1;
0042de8c              edx_1 = arg4;
0042de91              *(uint32_t*)((char*)eax_1 + 0x14) = *(uint32_t*)((char*)arg3)[4];
0042de94              void* var_8_2 = eax_1;
0042de97              *(uint16_t*)((char*)eax_1 + 0x18) = edx_1;
0042de9b              StringInfo::AddVar(this, edx_1);
0042de7f          }
0042de6f      }
0042de60  }

0042dea4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0042deb0  void __thiscall StringInfo::Serialize(class StringInfo* this, class Archive* arg2)

0042deb0  {
0042deb0      class StringInfo* this_1 = this;
0042deb1      enum ProgramType ProgramTypeSystem::s_eProgramType_1 = ProgramTypeSystem::s_eProgramType;
0042deb1      
0042dec0      if (ProgramTypeSystem::s_eProgramType_1 != 0x80000001)
0042dec7          *(uint8_t*)((char*)this_1)[3] = 1;
0042dec7      
0042decc      if ((ProgramTypeSystem::s_eProgramType_1 == 0x80000001 || ProgramTypeSystem::s_eProgramType_1 == 0x80000002))
0042dece          *(uint8_t*)((char*)this_1)[3] = 0;
0042dece      
0042ded3      ProgramTypeSystem::s_eProgramType_1 = *(uint8_t*)((char*)this_1)[3];
0042ded9      int32_t ebx;
0042ded9      ebx = this->m_Override;
0042ded9      
0042dee4      if ((ProgramTypeSystem::s_eProgramType_1 == 0 && ebx == 2))
0042dee6          ebx = 0;
0042dee6      
0042dee8      class Archive* esi = arg2;
0042def0      Archive::CheckAlignment(esi, 1);
0042def9      uint8_t* eax = Archive::GetBytes(esi, 1);
0042def9      
0042df00      if (eax != 0)
0042df00      {
0042df06          if ((esi->m_flags & 1) == 0)
0042df0c              ebx = *(uint8_t*)eax;
0042df06          else
0042df08              *(uint8_t*)eax = ebx;
0042df00      }
0042df00      
0042df0e      eax = esi->m_flags;
0042df11      eax = !(eax);
0042df11      
0042df15      if ((eax & 1) != 0)
0042df17          this->m_Override = ebx;
0042df17      
0042df24      if (this->m_Override != 1)
0042df24      {
0042df38          Archive::CheckAlignment(esi, 4);
0042df41          uint8_t* eax_1 = Archive::GetBytes(esi, 4);
0042df41          
0042df48          if (eax_1 != 0)
0042df48          {
0042df4e              if ((esi->m_flags & 1) == 0)
0042df59                  this->m_stringID = *(uint32_t*)eax_1;
0042df4e              else
0042df53                  *(uint32_t*)eax_1 = this->m_stringID;
0042df48          }
0042df48          
0042df60          Archive::CheckAlignment(esi, 4);
0042df69          uint8_t* eax_2 = Archive::GetBytes(esi, 4);
0042df69          
0042df70          if (eax_2 != 0)
0042df70          {
0042df76              if ((esi->m_flags & 1) == 0)
0042df81                  this->m_tableID.id = *(uint32_t*)eax_2;
0042df76              else
0042df7b                  *(uint32_t*)eax_2 = this->m_tableID.id;
0042df70          }
0042df24      }
0042df24      else
0042df2d          PStringBase<unsigned short>::Serialize(&this->m_LiteralValue, esi);
0042df2d      
0042df84      ebx = *(uint8_t*)((char*)this_1)[3];
0042df8c      Archive::CheckAlignment(esi, 1);
0042df95      uint8_t* eax_3 = Archive::GetBytes(esi, 1);
0042df95      
0042df9c      if (eax_3 != 0)
0042df9c      {
0042dfa2          if ((esi->m_flags & 1) == 0)
0042dfaa              ebx = *(uint8_t*)eax_3;
0042dfa2          else
0042dfa6              *(uint8_t*)eax_3 = ebx;
0042df9c      }
0042df9c      
0042dfb0      if ((esi->m_flags & 5) != 0)
0042dfb0      {
0042dfc2      label_42dfc2:
0042dfc2          
0042dfc4          if (ebx != 0)
0042dfc4          {
0042dfc9              PStringBase<char>::Serialize(this, esi);
0042dfd5              PStringBase<char>::Serialize(&this->m_strEnglish, esi);
0042dfe1              PStringBase<char>::Serialize(&this->m_strComment, esi);
0042dfc4          }
0042dfb0      }
0042dfb0      else if (ebx != 0)
0042dfb4      {
0042dfb9          if (ebx != 1)
0042dfbd              Archive::RaiseError(esi);
0042dfbd          
0042dfb9          goto label_42dfc2;
0042dfb4      }
0042dfb4      
0042dfee      if ((!(esi->m_flags) & 1) != 0)
0042dff3          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_variables.m_intrusiveTable);
0042dff3      
0042e002      ?SerializeIntrusiveHashTable@?$@HV?$IntrusiveHashTable@KPAV?$HashTableData@KPAVStringInfoData@@@@$0A@@@PAV?$HashTableData@KPAVStringInfoData@@@@USB_HashData@?$SB_Hash@USB_Default@@U?$SB_TypeAlloc@UStringInfoDataResolver@@USB_Default@@@@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABHAAV?$IntrusiveHashTable@KPAV?$HashTableData@KPAVStringInfoData@@@@$0A@@@AAVArchive@@@Z(&arg2, &this->m_variables.m_intrusiveTable, esi);
0042deb0  }

0042e011                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0042e020  enum GetStringErrorCode __thiscall StringInfo::InqStringInternal(class StringInfo const* this, class PStringBase<unsigned short>* arg2, uint8_t arg3)

0042e020  {
0042e02a      uint8_t m_Override = this->m_Override;
0042e034      class PStringBase<unsigned short> __return;
0042e034      class PSRefBufferCharData<unsigned short>* m_charbuffer;
0042e034      class PStringBase<unsigned short>* edi_1;
0042e034      
0042e034      if (m_Override != 1)
0042e034      {
0042e07c          if (m_Override != 2)
0042e07c          {
0042e120              uint32_t id = this->m_tableID.id;
0042e121              uint32_t m_stringID = this->m_stringID;
0042e128              PStringBase<unsigned short>::sprintf(arg2, u"<string table error; token: 0x%0…");
0042e128              
0042e135              if (this->m_stringID != 0)
0042e135              {
0042e137                  class IDClass<_tagDataID,32,0> id_1 = this->m_tableID.id;
0042e137                  
0042e140                  if (id_1 != INVALID_DID.id)
0042e140                  {
0042e167                      DBObjGrabber<StringTable>::DBObjGrabber<StringTable>(&__return, id_1);
0042e16c                      class PStringBase<unsigned short> __return_4 = __return;
0042e16c                      
0042e172                      if (__return_4 == 0)
0042e183                          return 3;
0042e183                      
0042e18c                      int32_t var_74 = 0x797e60;
0042e194                      int32_t var_70;
0042e194                      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<unsigned short> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<unsigned short> > *,0>(&var_70, 0x17);
0042e1a1                      void* __return_2;
0042e1a1                      HashTable<unsigned long,CaseInsensitiveStringBase<PStringBase<char> >,1>::begin(&this->m_variables, &__return_2);
0042e1a6                      uint32_t* i_2;
0042e1a6                      uint32_t* i_1 = i_2;
0042e1ac                      class PStringBase<unsigned short> __return_1;
0042e1ac                      
0042e1ac                      if (i_1 != 0)
0042e1ac                      {
0042e1ae                          int32_t* var_7c;
0042e1ae                          int32_t* ebp = var_7c;
0042e1ae                          
0042e1b2                          while (true)
0042e1b2                          {
0042e1b2                              int32_t* ecx_12 = i_1[2];
0042e1b2                              
0042e1b7                              if (ecx_12 != 0)
0042e1b7                              {
0042e1c9                                  HashTable<unsigned long,PStringBase<unsigned short>,0>::set(&var_74, i_1, *(uint32_t*)(*(uint32_t*)ecx_12 + 0x14)(&__return_1));
0042e1d2                                  int32_t* edi_3 = (__return_1 - 0x14);
0042e1d2                                  
0042e1e5                                  if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
0042e1ed                                      **(uint32_t**)edi_3(1);
0042e1b7                              }
0042e1b7                              
0042e1ef                              i_1 = i_1[1];
0042e1ef                              
0042e1f4                              if (i_1 == 0)
0042e1f4                              {
0042e1f6                                  void* __return_3 = __return_2;
0042e20f                                  uint32_t* i;
0042e20f                                  
0042e20f                                  do
0042e20f                                  {
0042e203                                      ebp = &ebp[1];
0042e203                                      
0042e208                                      if (ebp == (*(uint32_t*)((char*)__return_3 + 0x60) + (*(uint32_t*)((char*)__return_3 + 0x68) << 2)))
0042e208                                          goto label_42e217;
0042e208                                      
0042e20a                                      i = *(uint32_t*)ebp;
0042e20f                                  } while (i == 0);
0042e20f                                  
0042e211                                  i_1 = i;
0042e211                                  
0042e215                                  if (i_1 == 0)
0042e215                                      break;
0042e1f4                              }
0042e1b2                          }
0042e1b2                          
0042e217                      label_42e217:
0042e217                          __return_4 = __return;
0042e1ac                      }
0042e1ac                      
0042e235                      enum GetStringErrorCode result = StringTable::GetString(__return_4, arg2, this->m_stringID, &var_74, 1);
0042e237                      enum GetStringErrorCode eax_16;
0042e237                      eax_16 = arg3;
0042e237                      
0042e240                      if (eax_16 == 0)
0042e240                      {
0042e25a                          PStringBase<unsigned short>::operator=(arg2, StringTableMetaLanguage::StripMetaLetters(&__return_1, arg2));
0042e263                          void* esi_8 = (__return_1 - 0x14);
0042e263                          
0042e278                          if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
0042e280                              **(uint32_t**)esi_8(1);
0042e240                      }
0042e240                      
0042e28a                      var_74 = 0x797e60;
0042e292                      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::delete_contents(&var_70);
0042e2a4                      var_70 = 0x797d6c;
0042e2ac                      void var_6c;
0042e2ac                      void* var_10;
0042e2ac                      
0042e2ac                      if (var_10 != &var_6c)
0042e2af                          operator delete[](var_10);
0042e2af                      
0042e2b7                      int32_t var_10_1 = 0;
0042e2be                      int32_t var_c = 0;
0042e2c5                      int32_t var_8 = 0;
0042e2cc                      int32_t var_4 = 0;
0042e2d8                      *(uint32_t*)(*(uint32_t*)__return_4 + 0x14)();
0042e2e7                      return result;
0042e140                  }
0042e135              }
0042e135              
0042e149              if (DBCache::IsClient() != 0)
0042e14b                  DBCache::IsRunTime();
0042e14b              
0042e15f              return 1;
0042e07c          }
0042e07c          
0042e094          edi_1 = arg2;
0042e09e          PStringBase<unsigned short>::operator=(edi_1, PStringBase<char>::to_wpstring(&this->m_strEnglish, &__return, 0));
0042e0ad          int32_t* esi_3 = (__return - 0x14);
0042e0ad          
0042e0bc          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0042e0c4              **(uint32_t**)esi_3(1);
0042e034      }
0042e034      else
0042e034      {
0042e036          edi_1 = arg2;
0042e03d          m_charbuffer = edi_1->m_charbuffer;
0042e03d          
0042e04b          if (m_charbuffer != this->m_LiteralValue.m_charbuffer)
0042e04b          {
0042e05c              if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0042e064                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0042e064              
0042e066              class PStringBase<unsigned short> m_charbuffer_1 = this->m_LiteralValue.m_charbuffer;
0042e06c              edi_1->m_charbuffer = m_charbuffer_1;
0042e072              InterlockedIncrement((m_charbuffer_1 - 0x10));
0042e04b          }
0042e034      }
0042e034      
0042e0c6      m_charbuffer = arg3;
0042e0c6      
0042e0cf      if (m_charbuffer == 0)
0042e0cf      {
0042e0e2          PStringBase<unsigned short>::operator=(edi_1, StringTableMetaLanguage::StripMetaLetters(&__return, edi_1));
0042e0eb          int32_t* esi_5 = (__return - 0x14);
0042e0eb          
0042e0fa          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0042e102              **(uint32_t**)esi_5(1);
0042e0cf      }
0042e0cf      
0042e110      return 0;
0042e020  }

0042e2ea                                90 90 90 90 90 90                                                            ......

0042e2f0  void __thiscall StringInfo::StringInfo(class StringInfo* this, class StringInfo const* arg2)

0042e2f0  {
0042e2f0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0042e2f6      class PSRefBufferCharData<char>** this_1 = this;
0042e305      *(uint32_t*)this_1 = PStringBase<char>::s_NullBuffer_2;
0042e307      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0042e30e      this_1[3] = 0x797e5c;
0042e315      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringInfoData *> *,0>(&this_1[4], 0x17);
0042e31a      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042e326      this_1[0x20] = PStringBase<unsigned short>::s_NullBuffer_1;
0042e32c      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0042e32e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0042e33a      this_1[0x22] = PStringBase<char>::s_NullBuffer_3;
0042e340      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
0042e342      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042e34d      this_1[0x23] = PStringBase<char>::s_NullBuffer_1;
0042e353      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0042e35c      StringInfo::operator=(this_1, arg2);
0042e2f0  }

0042e368                          90 90 90 90 90 90 90 90                                                          ........

0042e370  void __fastcall StringInfo::~StringInfo(class StringInfo* this)

0042e370  {
0042e376      StringInfo::Reset(this);
0042e387      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_strComment.m_charbuffer - 0x14);
0042e387      
0042e398      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0042e3a0          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0042e3a0      
0042e3a8      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->m_strEnglish.m_charbuffer - 0x14);
0042e3a8      
0042e3b7      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0042e3bf          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0042e3bf      
0042e3c7      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_5 = (this->m_LiteralValue.m_charbuffer - 0x14);
0042e3c7      
0042e3d6      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0042e3de          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0042e3de      
0042e3e5      this->m_variables.vtable = 0x797e5c;
0042e3ec      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_variables.m_intrusiveTable);
0042e3f1      class HashTableData<unsigned long,StringInfoData *>** m_buckets = this->m_variables.m_intrusiveTable.m_buckets;
0042e3e0      this->m_variables.m_intrusiveTable.vtable = 0x797d68;
0042e3e0      
0042e3ff      if (m_buckets != &this->m_variables.m_intrusiveTable.m_aInplaceBuckets)
0042e402          operator delete[](m_buckets);
0042e402      
0042e3e0      this->m_variables.m_intrusiveTable.m_buckets = nullptr;
0042e3e0      this->m_variables.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0042e3e0      this->m_variables.m_intrusiveTable.m_numBuckets = 0;
0042e3e0      this->m_variables.m_intrusiveTable.m_numElements = 0;
0042e418      void* __offset(PSRefBufferCharData<char>, -0x14) edi_2 = (this->m_strToken.m_charbuffer - 0x14);
0042e418      
0042e427      if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0042e42f          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0042e370  }

0042e436                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0042e440  void __thiscall StringInfo::AddVariable_StringInfo(class StringInfo* this, uint32_t arg2, class StringInfo const* arg3)

0042e440  {
0042e448      void* eax = operator new(0x9c);
0042e448      
0042e452      if (eax != 0)
0042e452      {
0042e45c          void* eax_1 = StringInfo_StringInfoData::StringInfo_StringInfoData(eax, arg2);
0042e45c          
0042e465          if (eax_1 != 0)
0042e465          {
0042e474              void* var_c_3 = eax_1;
0042e477              StringInfo::AddVar(this, StringInfo::operator=(((char*)eax_1 + 0xc), arg3));
0042e465          }
0042e452      }
0042e440  }

0042e481     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0042e490  uint8_t __thiscall StringInfo::InqString(class StringInfo const* this, class PStringBase<unsigned short>* arg2, uint8_t arg3)

0042e490  {
0042e494      int32_t esi;
0042e494      int32_t var_4 = esi;
0042e494      
0042e4a2      if (StringInfo::InqStringInternal(this, arg2, ((int8_t)arg3)) != gsSuccess)
0042e4a2      {
0042e512          enum GetStringErrorCode eax;
0042e512          eax = 0;
0042e515          return 0;
0042e4a2      }
0042e4a2      
0042e4a4      int32_t ebx;
0042e4a4      int32_t var_8_1 = ebx;
0042e4a5      int32_t ebp;
0042e4a5      int32_t var_c_1 = ebp;
0042e4ac      class PStringBase<unsigned short>* eax_1 = StringTableMetaLanguage::UnescapeString(&arg3, arg2);
0042e4b9      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0042e4b9      
0042e4c2      if (m_charbuffer != eax_1->m_charbuffer)
0042e4c2      {
0042e4c4          int32_t edi;
0042e4c4          int32_t var_10_1 = edi;
0042e4c4          
0042e4d4          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0042e4dc              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0042e4dc          
0042e4de          class PStringBase<unsigned short> m_charbuffer_1 = eax_1->m_charbuffer;
0042e4e0          arg2->m_charbuffer = m_charbuffer_1;
0042e4e6          InterlockedIncrement((m_charbuffer_1 - 0x10));
0042e4c2      }
0042e4c2      
0042e4f1      int32_t* esi_3 = (arg3 - 0x14);
0042e4f1      
0042e502      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0042e50a          **(uint32_t**)esi_3(1);
0042e50a      
0042e50c      int32_t eax_4;
0042e50c      eax_4 = 1;
0042e50f      return 1;
0042e490  }

0042e518                                                                          90 90 90 90 90 90 90 90                          ........

0042e520  class PStringBase<unsigned short>* __thiscall StringInfo::GetLogString(class StringInfo const* this, class PStringBase<unsigned short>* __return, uint8_t arg3)

0042e520  {
0042e523      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042e531      class PSRefBufferCharData<unsigned short>* var_10 = PStringBase<unsigned short>::s_NullBuffer_1;
0042e53c      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0042e54a      enum GetStringErrorCode eax_2 = StringInfo::InqStringInternal(this, &var_10, ((int8_t)arg3));
0042e54a      
0042e557      if (eax_2 != gsSuccess)
0042e557      {
0042e664          enum GetStringErrorCode var_24_11 = eax_2;
0042e668          uint32_t m_stringID = this->m_stringID;
0042e669          uint32_t id = this->m_tableID.id;
0042e674          PStringBase<unsigned short>::sprintf(&var_10, u"<could not render string: table …");
0042e557      }
0042e557      else
0042e557      {
0042e566          void* var_8;
0042e566          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, &data_797f60);
0042e57e          PStringBase<unsigned short>::allocate_ref_buffer(&arg3, wcslen(&data_797f5c));
0042e58d          int32_t __return_1;
0042e58d          class PStringBase<unsigned short>* edx_2;
0042e58d          __return_1 = wcscpy(arg3, &data_797f5c);
0042e59a          class PSRefBufferCharData<unsigned short>** var_24_3 = &var_10;
0042e59f          class PStringBase<unsigned short> var_c;
0042e59f          int32_t* var_28_2 = &var_c;
0042e5a4          PStringBase<unsigned short>::operator+(&arg3, __return_1, edx_2);
0042e5ad          int32_t* esi_2 = (arg3 - 0x14);
0042e5b4          int32_t __return_2;
0042e5b4          class PStringBase<unsigned short>* edx_4;
0042e5b4          __return_2 = InterlockedDecrement(&esi_2[1]);
0042e5b4          
0042e5bc          if ((__return_2 == 0 && esi_2 != 0))
0042e5c4              __return_2 = **(uint32_t**)esi_2(1);
0042e5c4          
0042e5ca          int32_t* var_24_5 = &var_8;
0042e5cf          void* var_4;
0042e5cf          int32_t* var_28_3 = &var_4;
0042e5d4          class PStringBase<unsigned short>* eax_5 = PStringBase<unsigned short>::operator+(&var_c, __return_2, edx_4);
0042e5db          class PSRefBufferCharData<unsigned short>* eax_6 = var_10;
0042e5db          
0042e5e1          if (eax_6 != eax_5->m_charbuffer)
0042e5e1          {
0042e5f2              if ((InterlockedDecrement(&eax_6->m_data[-8]) == 0 && eax_6 != 0x14))
0042e5fa                  *(uint32_t*)*(int32_t*)((char*)eax_6 + -0x14)(1);
0042e5fa              
0042e5fc              class PSRefBufferCharData<unsigned short>* m_charbuffer = eax_5->m_charbuffer;
0042e5fe              var_10 = m_charbuffer;
0042e606              InterlockedIncrement(&m_charbuffer->m_data[-8]);
0042e5e1          }
0042e5e1          
0042e60c          int32_t* esi_5 = ((char*)var_4 - 0x14);
0042e60c          
0042e61b          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0042e623              **(uint32_t**)esi_5(1);
0042e623          
0042e629          int32_t* esi_7 = (var_c - 0x14);
0042e629          
0042e638          if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
0042e640              **(uint32_t**)esi_7(1);
0042e640          
0042e646          int32_t* esi_9 = ((char*)var_8 - 0x14);
0042e646          
0042e655          if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
0042e65d              **(uint32_t**)esi_9(1);
0042e557      }
0042e557      
0042e67c      class PSRefBufferCharData<unsigned short>* eax_17 = var_10;
0042e684      __return->m_charbuffer = eax_17;
0042e68a      InterlockedIncrement(&eax_17->m_data[-8]);
0042e690      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_11 = &var_10->m_data[-0xa];
0042e690      
0042e69f      if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
0042e6a7          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
0042e6a7      
0042e6b2      return __return;
0042e520  }

0042e6b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0042e6c0  void __thiscall StringInfo::AddVariable_String(class StringInfo* this, uint32_t arg2, class PStringBase<unsigned short> arg3)

0042e6c0  {
0042e6ce      void var_90;
0042e6ce      StringInfo::StringInfo(&var_90);
0042e6e1      StringInfo::SetLiteralValue(&var_90, &arg3, 1);
0042e6eb      void* eax = operator new(0x9c);
0042e6eb      
0042e6f5      if (eax != 0)
0042e6f5      {
0042e701          void* eax_1 = StringInfo_StringInfoData::StringInfo_StringInfoData(eax, arg2);
0042e701          
0042e70a          if (eax_1 != 0)
0042e70a          {
0042e719              void* var_9c_3 = eax_1;
0042e71c              StringInfo::AddVar(this, StringInfo::operator=(((char*)eax_1 + 0xc), &var_90));
0042e70a          }
0042e6f5      }
0042e6f5      
0042e725      StringInfo::~StringInfo(&var_90);
0042e731      int32_t* esi_3 = (arg3 - 0x14);
0042e731      
0042e744      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0042e74c          **(uint32_t**)esi_3(1);
0042e6c0  }

0042e759                                                                             90 90 90 90 90 90 90                           .......

0042e760  class PStringBase<unsigned short>* __thiscall StringInfo::GetString(class StringInfo const* this, class PStringBase<unsigned short>* __return, uint8_t arg3)

0042e760  {
0042e760      class StringInfo* var_4 = this;
0042e761      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042e76f      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
0042e779      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0042e787      StringInfo::InqString(this, &var_4, arg3);
0042e78c      class StringInfo* eax_2 = var_4;
0042e794      __return->m_charbuffer = eax_2;
0042e79a      InterlockedIncrement(&eax_2[0]);
0042e7a0      void* __offset(StringInfo, -0x14) esi_2 = ((char*)var_4 - 0x14);
0042e7a0      
0042e7b3      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0042e7bb          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0042e7bb      
0042e7c3      return __return;
0042e760  }

0042e7c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0042e7d0  void __thiscall StringInfo::AddVariable_String(class StringInfo* this, uint32_t arg2, class PStringBase<char> arg3)

0042e7d0  {
0042e7d1      class StringInfo* __return = this;
0042e7dd      PStringBase<char>::to_wpstring(&arg3, &__return, 0);
0042e7e9      StringInfo::AddVariable_String(this, arg2, __return);
0042e7f2      int32_t* esi_2 = (arg3 - 0x14);
0042e7f8      __return = &esi_2[1];
0042e7f8      
0042e805      if ((InterlockedDecrement(__return) == 0 && esi_2 != 0))
0042e805      {
0042e807          int32_t eax_1 = *(uint32_t*)esi_2;
0042e809          __return = 1;
0042e80d          *(uint32_t*)eax_1(__return);
0042e805      }
0042e7d0  }

0042e813                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0042e820  void __thiscall StringInfo_StringInfoData::StringInfo_StringInfoData(class StringInfo_StringInfoData* this, uint32_t arg2)

0042e820  {
0042e82a      this->m_eType = 1;
0042e830      this->m_eVarID = arg2;
0042e833      this->vtable = 0x797fc0;
0042e839      StringInfo::StringInfo(&this->m_cVal);
0042e820  }

0042e844              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0042e850  void* __thiscall StringInfo_StringInfoData::`scalar deleting destructor'(class StringInfo_StringInfoData* this, uint32_t arg2)

0042e850  {
0042e856      this->vtable = 0x797fc0;
0042e85c      StringInfo::~StringInfo(&this->m_cVal);
0042e866      this->vtable = 0x797fa4;
0042e866      
0042e86c      if ((arg2 & 1) != 0)
0042e86f          operator delete(this);
0042e86f      
0042e87a      return this;
0042e850  }

0042e87d                                                                                         90 90 90                               ...

0042e880  uint8_t __thiscall StringInfo_StringInfoData::operator==(class StringInfo_StringInfoData const* this, class StringInfo_StringInfoData const* arg2)

0042e880  {
0042e894      if (((this->m_eType == arg2->m_eType && this->m_eVarID == arg2->m_eVarID) && StringInfo::operator==(&this->m_cVal, &arg2->m_cVal) != 0))
0042e8ab          return 1;
0042e8ab      
0042e8b0      return 0;
0042e880  }

0042e8b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0042e8c0  void __thiscall StringInfo_StringInfoData::GetSubDataIDs(class StringInfo_StringInfoData const* this, class QualifiedDataIDArray* arg2)

0042e8c0  {
0042e8c3      /* tailcall */
0042e8c3      return StringInfo::GetSubDataIDs(&this->m_cVal, arg2);
0042e8c0  }

0042e8c8                          90 90 90 90 90 90 90 90                                                          ........

0042e8d0  uint8_t __thiscall StringInfo_StringInfoData::IsValid(class StringInfo_StringInfoData const* this, uint8_t arg2)

0042e8d0  {
0042e8d3      /* tailcall */
0042e8d3      return StringInfo::IsValid(&this->m_cVal, arg2);
0042e8d0  }

0042e8d8                                                                          90 90 90 90 90 90 90 90                          ........

0042e8e0  void __thiscall Double_StringInfoData::Double_StringInfoData(class Double_StringInfoData* this, uint32_t arg2)

0042e8e0  {
0042e8e6      this->m_eVarID = arg2;
0042e8eb      this->m_eType = 2;
0042e8f1      this->vtable = 0x797fd8;
0042e8f7      this->m_fVal = 0f;
0042e8fa      *(uint32_t*)((char*)this->m_fVal)[4] = 0;
0042e8fd      this->m_iPrecision = 0;
0042e8e0  }

0042e904              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0042e910  uint8_t __thiscall Double_StringInfoData::operator==(class Double_StringInfoData const* this, class Double_StringInfoData const* arg2)

0042e910  {
0042e924      if ((this->m_eType == arg2->m_eType && this->m_eVarID == arg2->m_eVarID))
0042e924      {
0042e926          long double x87_r7_1 = ((long double)this->m_fVal);
0042e929          long double temp1_1 = ((long double)arg2->m_fVal);
0042e929          (x87_r7_1 - temp1_1);
0042e92c          uint32_t eax_1;
0042e92c          eax_1 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0042e92e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0042e92e          
0042e931          if (!(p_1))
0042e931          {
0042e933              this = this->m_iPrecision;
0042e933              
0042e93b              if (this == arg2->m_iPrecision)
0042e942                  return 1;
0042e931          }
0042e924      }
0042e924      
0042e947      return 0;
0042e910  }

0042e94a                                90 90 90 90 90 90                                                            ......

0042e950  void __thiscall LInt_StringInfoData::LInt_StringInfoData(class LInt_StringInfoData* this, uint32_t arg2)

0042e950  {
0042e956      this->m_eVarID = arg2;
0042e95b      this->m_eType = 4;
0042e961      this->vtable = 0x797ff0;
0042e967      this->m_iVal = 0;
0042e96a      *(uint32_t*)((char*)this->m_iVal)[4] = 0;
0042e950  }


0042e970  uint8_t __thiscall LInt_StringInfoData::operator==(class LInt_StringInfoData const* this, class LInt_StringInfoData const* arg2)

0042e970  {
0042e994      if ((this->m_eType == arg2->m_eType && (this->m_eVarID == arg2->m_eVarID && (this->m_iVal == arg2->m_iVal && *(uint32_t*)((char*)this->m_iVal)[4] == *(uint32_t*)((char*)arg2->m_iVal)[4]))))
0042e99b          return 1;
0042e99b      
0042e9a0      return 0;
0042e970  }

0042e9a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0042e9b0  void __thiscall ULInt_StringInfoData::ULInt_StringInfoData(class ULInt_StringInfoData* this, uint32_t arg2)

0042e9b0  {
0042e9b6      this->m_eVarID = arg2;
0042e9bb      this->m_eType = 6;
0042e9c1      this->vtable = 0x798008;
0042e9c7      this->m_iVal = 0;
0042e9ca      *(uint32_t*)((char*)this->m_iVal)[4] = 0;
0042e9b0  }


0042e9d0  void* __thiscall Double_StringInfoData::`scalar deleting destructor'(class Double_StringInfoData* this, uint32_t arg2)

0042e9d0  {
0042e9d8      this->vtable = 0x797fa4;
0042e9d8      
0042e9de      if ((arg2 & 1) != 0)
0042e9e1          operator delete(this);
0042e9e1      
0042e9ec      return this;
0042e9d0  }

0042e9ef                                               90                                                                 .

0042e9f0  void __thiscall Formatted_Double_StringInfoData::Formatted_Double_StringInfoData(class Formatted_Double_StringInfoData* this, uint32_t arg2)

0042e9f0  {
0042e9f6      this->m_eVarID = arg2;
0042e9fb      this->m_fVal = 0f;
0042e9fe      *(uint32_t*)((char*)this->m_fVal)[4] = 0;
0042ea01      this->m_iPrecision = 0;
0042ea05      this->vtable = &Formatted_StringInfoData::`vftable';
0042ea0c      this->m_bGrouping = 1;
0042ea10      this->m_iBase = 0xffff;
0042ea16      this->vtable = 0x798024;
0042ea1c      this->vtable = &Formatted_Double_StringInfoData::`vftable';
0042ea23      this->m_eType = 3;
0042e9f0  }

0042ea2c                                      90 90 90 90                                                              ....

0042ea30  void* __thiscall Formatted_Double_StringInfoData::`scalar deleting destructor'(class Formatted_Double_StringInfoData* this, uint32_t arg2)

0042ea30  {
0042ea38      this->vtable = &Formatted_Double_StringInfoData::`vftable';
0042ea3f      this->vtable = &Formatted_StringInfoData::`vftable';
0042ea46      this->vtable = 0x797fa4;
0042ea46      
0042ea4c      if ((arg2 & 1) != 0)
0042ea4f          operator delete(this);
0042ea4f      
0042ea5a      return this;
0042ea30  }

0042ea5d                                                                                         90 90 90                               ...

0042ea60  uint8_t __thiscall Formatted_Double_StringInfoData::operator==(class Formatted_Double_StringInfoData const* this, class Formatted_Double_StringInfoData const* arg2)

0042ea60  {
0042ea74      if ((this->m_eType == arg2->m_eType && this->m_eVarID == arg2->m_eVarID))
0042ea74      {
0042ea76          long double x87_r7_1 = ((long double)this->m_fVal);
0042ea79          long double temp1_1 = ((long double)arg2->m_fVal);
0042ea79          (x87_r7_1 - temp1_1);
0042ea7c          uint32_t eax_1;
0042ea7c          eax_1 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0042ea7e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0042ea7e          
0042ea81          if (!(p_1))
0042ea81          {
0042ea83              eax_1 = this->m_iPrecision;
0042ea83              
0042ea8b              if (eax_1 == arg2->m_iPrecision)
0042ea8b              {
0042ea8d                  eax_1 = this->m_bGrouping;
0042ea8d                  
0042ea93                  if (eax_1 == arg2->m_bGrouping)
0042ea93                  {
0042ea95                      this = this->m_iBase;
0042ea95                      
0042ea9d                      if (this == arg2->m_iBase)
0042eaa4                          return 1;
0042ea93                  }
0042ea8b              }
0042ea81          }
0042ea74      }
0042ea74      
0042eaa9      return 0;
0042ea60  }

0042eaac                                      90 90 90 90                                                              ....

0042eab0  void __thiscall Formatted_LInt_StringInfoData::Formatted_LInt_StringInfoData(class Formatted_LInt_StringInfoData* this, uint32_t arg2)

0042eab0  {
0042eab6      this->m_eVarID = arg2;
0042eabb      this->m_iVal = 0;
0042eabe      *(uint32_t*)((char*)this->m_iVal)[4] = 0;
0042eac1      this->vtable = &Formatted_StringInfoData::`vftable';
0042eac8      this->m_bGrouping = 1;
0042eacc      this->m_iBase = 0xffff;
0042ead2      this->vtable = 0x79803c;
0042ead8      this->vtable = &Formatted_LInt_StringInfoData::`vftable';
0042eadf      this->m_eType = 5;
0042eab0  }

0042eae8                          90 90 90 90 90 90 90 90                                                          ........

0042eaf0  void* __thiscall Formatted_ULInt_StringInfoData::`scalar deleting destructor'(class Formatted_ULInt_StringInfoData* this, uint32_t arg2)

0042eaf0  {
0042eaf8      this->vtable = &Formatted_LInt_StringInfoData::`vftable';
0042eaff      this->vtable = &Formatted_StringInfoData::`vftable';
0042eb06      this->vtable = 0x797fa4;
0042eb06      
0042eb0c      if ((arg2 & 1) != 0)
0042eb0f          operator delete(this);
0042eb0f      
0042eb1a      return this;
0042eaf0  }

0042eb1d                                                                                         90 90 90                               ...

0042eb20  uint8_t __thiscall Formatted_LInt_StringInfoData::operator==(class Formatted_LInt_StringInfoData const* this, class Formatted_LInt_StringInfoData const* arg2)

0042eb20  {
0042eb44      if ((this->m_eType == arg2->m_eType && (this->m_eVarID == arg2->m_eVarID && (this->m_iVal == arg2->m_iVal && *(uint32_t*)((char*)this->m_iVal)[4] == *(uint32_t*)((char*)arg2->m_iVal)[4]))))
0042eb44      {
0042eb46          int32_t edx_3;
0042eb46          edx_3 = this->m_bGrouping;
0042eb46          
0042eb4c          if (edx_3 == arg2->m_bGrouping)
0042eb4c          {
0042eb4e              this = this->m_iBase;
0042eb4e              
0042eb56              if (this == arg2->m_iBase)
0042eb5d                  return 1;
0042eb4c          }
0042eb44      }
0042eb44      
0042eb62      return 0;
0042eb20  }

0042eb65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0042eb70  class StringInfoData* StringInfoData::Create(uint16_t arg1)

0042eb70  {
0042eb7b      if ((((uint32_t)arg1) - 1) <= 6)
0042eb81          switch (arg1)
0042eb81          {
0042eb8d              case 1:
0042eb8d              {
0042eb8d                  void* eax_1 = operator new(0x9c);
0042eb8d                  
0042eb97                  if (eax_1 != 0)
0042eba2                      return StringInfo_StringInfoData::StringInfo_StringInfoData(eax_1, 0);
0042eb8d                  break;
0042eb8d              }
0042eba5              case 2:
0042eba5              {
0042eba5                  void* eax_3 = operator new(0x20);
0042eba5                  
0042ebaf                  if (eax_3 != 0)
0042ebba                      return Double_StringInfoData::Double_StringInfoData(eax_3, 0);
0042eba5                  break;
0042eba5              }
0042ebbd              case 3:
0042ebbd              {
0042ebbd                  void* eax_5 = operator new(0x28);
0042ebbd                  
0042ebc7                  if (eax_5 != 0)
0042ebd2                      return Formatted_Double_StringInfoData::Formatted_Double_StringInfoData(eax_5, 0);
0042ebbd                  break;
0042ebbd              }
0042ebd5              case 4:
0042ebd5              case 6:
0042ebd5              {
0042ebd5                  void* eax_7 = operator new(0x18);
0042ebd5                  
0042ebdf                  if (eax_7 != 0)
0042ebea                      return LInt_StringInfoData::LInt_StringInfoData(eax_7, 0);
0042ebd5                  break;
0042ebd5              }
0042ebed              case 5:
0042ebed              case 7:
0042ebed              {
0042ebed                  void* eax_9 = operator new(0x20);
0042ebed                  
0042ebf7                  if (eax_9 != 0)
0042ec02                      return Formatted_LInt_StringInfoData::Formatted_LInt_StringInfoData(eax_9, 0);
0042ebed                  break;
0042ebed              }
0042eb81          }
0042eb81      
0042ec05      return 0;
0042eb70  }

0042ec06                    8b ff                                                                                ..
0042ec08  uint32_t jump_table_42ec08[0x7] = 
0042ec08  {
0042ec08      [0x0] =  0x0042eb88
0042ec0c      [0x1] =  0x0042eba3
0042ec10      [0x2] =  0x0042ebbb
0042ec14      [0x3] =  0x0042ebd3
0042ec18      [0x4] =  0x0042ebeb
0042ec1c      [0x5] =  0x0042ebd3
0042ec20      [0x6] =  0x0042ebeb
0042ec24  }

0042ec24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0042ec30  void __thiscall StringInfo_StringInfoData::StringInfo_StringInfoData(class StringInfo_StringInfoData* this, class StringInfo_StringInfoData const* arg2)

0042ec30  {
0042ec35      class StringInfo_StringInfoData* this_1 = this;
0042ec37      this_1->vtable = 0x797fa4;
0042ec3d      this = arg2->m_eType;
0042ec41      this_1->m_eType = this;
0042ec4f      this_1->m_eVarID = arg2->m_eVarID;
0042ec52      this_1->vtable = 0x797fc0;
0042ec58      StringInfo::StringInfo(&this_1->m_cVal, &arg2->m_cVal);
0042ec30  }

0042ec63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0042ec70  void __thiscall Double_StringInfoData::Double_StringInfoData(class Double_StringInfoData* this, class Double_StringInfoData const* arg2)

0042ec70  {
0042ec76      this->vtable = 0x797fa4;
0042ec80      this->m_eType = arg2->m_eType;
0042ec87      this->m_eVarID = arg2->m_eVarID;
0042ec8a      this->vtable = 0x797fd8;
0042ec93      this->m_fVal = arg2->m_fVal;
0042ec99      *(uint32_t*)((char*)this->m_fVal)[4] = *(uint32_t*)((char*)arg2->m_fVal)[4];
0042ec9c      class Double_StringInfoData* ecx;
0042ec9c      ecx = arg2->m_iPrecision;
0042eca0      this->m_iPrecision = ecx;
0042ec70  }

0042eca7                       90 90 90 90 90 90 90 90 90                                                         .........

0042ecb0  void __thiscall Formatted_Double_StringInfoData::Formatted_Double_StringInfoData(class Formatted_Double_StringInfoData* this, class Formatted_Double_StringInfoData const* arg2)

0042ecb0  {
0042ecb6      this->vtable = 0x797fa4;
0042ecc0      this->m_eType = arg2->m_eType;
0042ecc4      uint32_t m_eVarID = arg2->m_eVarID;
0042ecc7      this->vtable = 0x797fd8;
0042eccd      this->m_eVarID = m_eVarID;
0042ecd3      this->m_fVal = arg2->m_fVal;
0042ecd9      *(uint32_t*)((char*)this->m_fVal)[4] = *(uint32_t*)((char*)arg2->m_fVal)[4];
0042ecdc      int32_t edx_2;
0042ecdc      edx_2 = arg2->m_iPrecision;
0042ece0      this->m_iPrecision = edx_2;
0042ece4      this->vtable = &Formatted_StringInfoData::`vftable';
0042eceb      edx_2 = arg2->m_bGrouping;
0042ecee      this->m_bGrouping = edx_2;
0042ecf1      class Formatted_Double_StringInfoData* ecx;
0042ecf1      ecx = arg2->m_iBase;
0042ecf5      this->m_iBase = ecx;
0042ecf9      this->vtable = 0x798024;
0042ecff      this->vtable = &Formatted_Double_StringInfoData::`vftable';
0042ecb0  }

0042ed09                             90 90 90 90 90 90 90                                                           .......

0042ed10  void __thiscall LInt_StringInfoData::LInt_StringInfoData(class LInt_StringInfoData* this, class LInt_StringInfoData const* arg2)

0042ed10  {
0042ed16      this->vtable = 0x797fa4;
0042ed20      this->m_eType = arg2->m_eType;
0042ed27      this->m_eVarID = arg2->m_eVarID;
0042ed2a      this->vtable = 0x797ff0;
0042ed33      this->m_iVal = arg2->m_iVal;
0042ed39      *(uint32_t*)((char*)this->m_iVal)[4] = *(uint32_t*)((char*)arg2->m_iVal)[4];
0042ed10  }

0042ed3f                                                                                               90                                 .

0042ed40  void __thiscall Formatted_LInt_StringInfoData::Formatted_LInt_StringInfoData(class Formatted_LInt_StringInfoData* this, class Formatted_LInt_StringInfoData const* arg2)

0042ed40  {
0042ed46      this->vtable = 0x797fa4;
0042ed50      this->m_eType = arg2->m_eType;
0042ed54      uint32_t m_eVarID = arg2->m_eVarID;
0042ed57      this->vtable = 0x797ff0;
0042ed5d      this->m_eVarID = m_eVarID;
0042ed63      this->m_iVal = arg2->m_iVal;
0042ed69      *(uint32_t*)((char*)this->m_iVal)[4] = *(uint32_t*)((char*)arg2->m_iVal)[4];
0042ed6c      this->vtable = &Formatted_StringInfoData::`vftable';
0042ed73      int32_t edx_2;
0042ed73      edx_2 = arg2->m_bGrouping;
0042ed76      this->m_bGrouping = edx_2;
0042ed79      class Formatted_LInt_StringInfoData* ecx;
0042ed79      ecx = arg2->m_iBase;
0042ed7d      this->m_iBase = ecx;
0042ed81      this->vtable = 0x79803c;
0042ed87      this->vtable = &Formatted_LInt_StringInfoData::`vftable';
0042ed40  }

0042ed91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0042eda0  void __thiscall ULInt_StringInfoData::ULInt_StringInfoData(class ULInt_StringInfoData* this, class ULInt_StringInfoData const* arg2)

0042eda0  {
0042eda6      this->vtable = 0x797fa4;
0042edb0      this->m_eType = arg2->m_eType;
0042edb7      this->m_eVarID = arg2->m_eVarID;
0042edba      this->vtable = 0x798008;
0042edc3      this->m_iVal = arg2->m_iVal;
0042edc9      *(uint32_t*)((char*)this->m_iVal)[4] = *(uint32_t*)((char*)arg2->m_iVal)[4];
0042eda0  }

0042edcf                                               90                                                                 .

0042edd0  void __thiscall Formatted_ULInt_StringInfoData::Formatted_ULInt_StringInfoData(class Formatted_ULInt_StringInfoData* this, class Formatted_ULInt_StringInfoData const* arg2)

0042edd0  {
0042edd6      this->vtable = 0x797fa4;
0042ede0      this->m_eType = arg2->m_eType;
0042ede4      uint32_t m_eVarID = arg2->m_eVarID;
0042ede7      this->vtable = 0x798008;
0042eded      this->m_eVarID = m_eVarID;
0042edf3      this->m_iVal = arg2->m_iVal;
0042edf9      *(uint32_t*)((char*)this->m_iVal)[4] = *(uint32_t*)((char*)arg2->m_iVal)[4];
0042edfc      this->vtable = &Formatted_StringInfoData::`vftable';
0042ee03      int32_t edx_2;
0042ee03      edx_2 = arg2->m_bGrouping;
0042ee06      this->m_bGrouping = edx_2;
0042ee09      class Formatted_ULInt_StringInfoData* ecx;
0042ee09      ecx = arg2->m_iBase;
0042ee0d      this->m_iBase = ecx;
0042ee11      this->vtable = 0x798058;
0042ee17      this->vtable = &Formatted_LInt_StringInfoData::`vftable';
0042edd0  }

0042ee21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0042ee30  uint8_t StringInfoData::Compare(class StringInfoData const* arg1, class StringInfoData const* arg2)

0042ee30  {
0042ee39      if (arg1 != 0)
0042ee39      {
0042ee3b          class Formatted_LInt_StringInfoData* ecx_1 = arg2;
0042ee3b          
0042ee41          if (ecx_1 != 0)
0042ee41          {
0042ee43              int32_t esi;
0042ee43              esi = arg1->m_eType;
0042ee43              
0042ee54              if ((esi == ecx_1->m_eType && (((uint32_t)esi) - 1) <= 6))
0042ee56                  switch (esi)
0042ee56                  {
0042ee64                      case 1:
0042ee64                      {
0042ee64                          return StringInfo_StringInfoData::operator==(ecx_1, arg1);
0042ee64                          break;
0042ee64                      }
0042ee6c                      case 2:
0042ee6c                      {
0042ee6c                          return Double_StringInfoData::operator==(ecx_1, arg1);
0042ee6c                          break;
0042ee6c                      }
0042ee74                      case 3:
0042ee74                      {
0042ee74                          return Formatted_Double_StringInfoData::operator==(ecx_1, arg1);
0042ee74                          break;
0042ee74                      }
0042ee7c                      case 4:
0042ee7c                      {
0042ee7c                          return LInt_StringInfoData::operator==(ecx_1, arg1);
0042ee7c                          break;
0042ee7c                      }
0042ee84                      case 5:
0042ee84                      {
0042ee84                          return Formatted_LInt_StringInfoData::operator==(ecx_1, arg1);
0042ee84                          break;
0042ee84                      }
0042ee8c                      case 6:
0042ee8c                      {
0042ee8c                          return LInt_StringInfoData::operator==(ecx_1, arg1);
0042ee8c                          break;
0042ee8c                      }
0042ee8e                      case 7:
0042ee8e                      {
0042ee8e                          return Formatted_LInt_StringInfoData::operator==(ecx_1, arg1);
0042ee8e                          break;
0042ee8e                      }
0042ee56                  }
0042ee41          }
0042ee39      }
0042ee39      
0042ee94      return 0;
0042ee30  }

0042ee95                                                                 8d 49 00                                               .I.
0042ee98  uint32_t jump_table_42ee98[0x7] = 
0042ee98  {
0042ee98      [0x0] =  0x0042ee5d
0042ee9c      [0x1] =  0x0042ee65
0042eea0      [0x2] =  0x0042ee6d
0042eea4      [0x3] =  0x0042ee75
0042eea8      [0x4] =  0x0042ee7d
0042eeac      [0x5] =  0x0042ee85
0042eeb0      [0x6] =  0x0042ee8d
0042eeb4  }

0042eeb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0042eec0  void __thiscall StringInfoData::Serialize(class StringInfoData* this, class Archive* arg2)

0042eec0  {
0042eecc      Archive::CheckAlignment(arg2, 2);
0042eed5      uint8_t* eax = Archive::GetBytes(arg2, 2);
0042eed5      
0042eedc      if (eax != 0)
0042eedc      {
0042eee2          if ((arg2->m_flags & 1) == 0)
0042eef0              this->m_eType = *(uint16_t*)eax;
0042eee2          else
0042eee8              *(uint16_t*)eax = this->m_eType;
0042eedc      }
0042eedc      
0042eef8      Archive::CheckAlignment(arg2, 4);
0042ef01      uint32_t* eax_1 = Archive::GetBytes(arg2, 4);
0042ef01      
0042ef08      if (eax_1 != 0)
0042ef08      {
0042ef0e          if ((arg2->m_flags & 1) != 0)
0042ef0e          {
0042ef14              *(uint32_t*)eax_1 = this->m_eVarID;
0042ef17              return;
0042ef0e          }
0042ef0e          
0042ef1c          this->m_eVarID = *(uint32_t*)eax_1;
0042ef08      }
0042eec0  }

0042ef24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0042ef30  void __thiscall StringInfo_StringInfoData::Serialize(class StringInfo_StringInfoData* this, class Archive* arg2)

0042ef30  {
0042ef39      StringInfoData::Serialize(this, arg2);
0042ef42      StringInfo::Serialize(&this->m_cVal, arg2);
0042ef30  }

0042ef4c                                      90 90 90 90                                                              ....

0042ef50  void __thiscall StringInfo_StringInfoData::GetSubPrivateIDs(class StringInfo_StringInfoData const* this, class QualifiedDataIDArray* arg2, class IDClass<_tagDataID,32,0> arg3)

0042ef50  {
0042ef53      /* tailcall */
0042ef53      return StringInfo::GetSubPrivateIDs(&this->m_cVal, arg2, arg3);
0042ef50  }

0042ef58                                                                          90 90 90 90 90 90 90 90                          ........

0042ef60  void __thiscall Double_StringInfoData::Serialize(class Double_StringInfoData* this, class Archive* arg2)

0042ef60  {
0042ef69      StringInfoData::Serialize(this, arg2);
0042ef72      Archive::CheckAlignment(arg2, 8);
0042ef7b      uint8_t* eax = Archive::GetBytes(arg2, 8);
0042ef7b      
0042ef82      if (eax != 0)
0042ef82      {
0042ef88          if ((arg2->m_flags & 1) == 0)
0042ef88          {
0042ef99              this->m_fVal = *(uint32_t*)eax;
0042ef9f              *(uint32_t*)((char*)this->m_fVal)[4] = *(uint32_t*)(eax + 4);
0042ef88          }
0042ef88          else
0042ef88          {
0042ef8d              *(uint32_t*)eax = this->m_fVal;
0042ef92              *(uint32_t*)(eax + 4) = *(uint32_t*)((char*)this->m_fVal)[4];
0042ef88          }
0042ef82      }
0042ef82      
0042efa6      Archive::CheckAlignment(arg2, 2);
0042efaf      uint16_t* eax_1 = Archive::GetBytes(arg2, 2);
0042efaf      
0042efb6      if (eax_1 != 0)
0042efb6      {
0042efbc          if ((arg2->m_flags & 1) != 0)
0042efbc          {
0042efc3              *(uint16_t*)eax_1 = this->m_iPrecision;
0042efc7              return;
0042efbc          }
0042efbc          
0042efcd          this->m_iPrecision = *(uint16_t*)eax_1;
0042efb6      }
0042ef60  }

0042efd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0042efe0  void __thiscall ULInt_StringInfoData::Serialize(class ULInt_StringInfoData* this, class Archive* arg2)

0042efe0  {
0042efe9      StringInfoData::Serialize(this, arg2);
0042eff2      Archive::CheckAlignment(arg2, 8);
0042effb      uint8_t* eax = Archive::GetBytes(arg2, 8);
0042effb      
0042f002      if (eax != 0)
0042f002      {
0042f008          if ((arg2->m_flags & 1) != 0)
0042f008          {
0042f00d              *(uint32_t*)eax = this->m_iVal;
0042f013              *(uint32_t*)(eax + 4) = *(uint32_t*)((char*)this->m_iVal)[4];
0042f017              return;
0042f008          }
0042f008          
0042f01c          this->m_iVal = *(uint32_t*)eax;
0042f022          *(uint32_t*)((char*)this->m_iVal)[4] = *(uint32_t*)(eax + 4);
0042f002      }
0042efe0  }

0042f02a                                90 90 90 90 90 90                                                            ......

0042f030  void __thiscall Formatted_StringInfoData::Serialize(class Formatted_StringInfoData* this, class Archive* arg2)

0042f030  {
0042f03d      Serializer::SerializeObject(&this->m_bGrouping, arg2);
0042f049      Archive::CheckAlignment(arg2, 2);
0042f052      uint16_t* eax_1 = Archive::GetBytes(arg2, 2);
0042f052      
0042f059      if (eax_1 != 0)
0042f059      {
0042f05f          if ((arg2->m_flags & 1) != 0)
0042f05f          {
0042f066              *(uint16_t*)eax_1 = this->m_iBase;
0042f06a              return;
0042f05f          }
0042f05f          
0042f070          this->m_iBase = *(uint16_t*)eax_1;
0042f059      }
0042f030  }

0042f079                                                                             90 90 90 90 90 90 90                           .......

0042f080  void __thiscall Formatted_Double_StringInfoData::Serialize(class Formatted_Double_StringInfoData* this, class Archive* arg2)

0042f080  {
0042f089      Double_StringInfoData::Serialize(this, arg2);
0042f093      Serializer::SerializeObject(&this->m_bGrouping, arg2);
0042f09f      Archive::CheckAlignment(arg2, 2);
0042f0a8      uint16_t* eax_1 = Archive::GetBytes(arg2, 2);
0042f0a8      
0042f0af      if (eax_1 != 0)
0042f0af      {
0042f0b5          if ((arg2->m_flags & 1) != 0)
0042f0b5          {
0042f0bc              *(uint16_t*)eax_1 = this->m_iBase;
0042f0c0              return;
0042f0b5          }
0042f0b5          
0042f0c6          this->m_iBase = *(uint16_t*)eax_1;
0042f0af      }
0042f080  }

0042f0cf                                               90                                                                 .

0042f0d0  void __thiscall Formatted_LInt_StringInfoData::Serialize(class Formatted_LInt_StringInfoData* this, class Archive* arg2)

0042f0d0  {
0042f0d9      StringInfoData::Serialize(this, arg2);
0042f0e2      Archive::CheckAlignment(arg2, 8);
0042f0eb      uint8_t* eax = Archive::GetBytes(arg2, 8);
0042f0eb      
0042f0f2      if (eax != 0)
0042f0f2      {
0042f0f8          if ((arg2->m_flags & 1) == 0)
0042f0f8          {
0042f109              this->m_iVal = *(uint32_t*)eax;
0042f10f              *(uint32_t*)((char*)this->m_iVal)[4] = *(uint32_t*)(eax + 4);
0042f0f8          }
0042f0f8          else
0042f0f8          {
0042f0fd              *(uint32_t*)eax = this->m_iVal;
0042f102              *(uint32_t*)(eax + 4) = *(uint32_t*)((char*)this->m_iVal)[4];
0042f0f8          }
0042f0f2      }
0042f0f2      
0042f117      Serializer::SerializeObject(&this->m_bGrouping, arg2);
0042f123      Archive::CheckAlignment(arg2, 2);
0042f12c      uint16_t* eax_2 = Archive::GetBytes(arg2, 2);
0042f12c      
0042f133      if (eax_2 != 0)
0042f133      {
0042f139          if ((arg2->m_flags & 1) != 0)
0042f139          {
0042f140              *(uint16_t*)eax_2 = this->m_iBase;
0042f144              return;
0042f139          }
0042f139          
0042f14a          this->m_iBase = *(uint16_t*)eax_2;
0042f133      }
0042f0d0  }

0042f153                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0042f160  void __thiscall Formatted_Double_StringInfoData::Serialize(class Formatted_Double_StringInfoData* this, class Archive* arg2)

0042f160  {
0042f163      /* tailcall */
0042f163      return Formatted_Double_StringInfoData::Serialize(((char*)this - 0x20), arg2);
0042f160  }

0042f168                          cc cc cc cc cc cc cc cc                                                          ........

0042f170  void __thiscall Formatted_LInt_StringInfoData::Serialize(class Formatted_LInt_StringInfoData* this, class Archive* arg2)

0042f170  {
0042f173      /* tailcall */
0042f173      return Formatted_LInt_StringInfoData::Serialize(((char*)this - 0x18), arg2);
0042f170  }

0042f178                                                                          cc cc cc cc cc cc cc cc                          ........

0042f180  class StringInfoData* StringInfoData::Copy(class StringInfoData const* arg1)

0042f180  {
0042f189      if (arg1 != 0)
0042f19d          switch ((((uint32_t)arg1->m_eType) - 1))
0042f19d          {
0042f1a9              case 0:
0042f1a9              {
0042f1a9                  class StringInfo_StringInfoData* eax_1 = operator new(0x9c);
0042f1a9                  
0042f1b3                  if (eax_1 != 0)
0042f1c2                      return StringInfo_StringInfoData::StringInfo_StringInfoData(eax_1, arg1);
0042f1a9                  break;
0042f1a9              }
0042f1c5              case 1:
0042f1c5              {
0042f1c5                  class Double_StringInfoData* eax_3 = operator new(0x20);
0042f1c5                  
0042f1cf                  if (eax_3 != 0)
0042f1de                      return Double_StringInfoData::Double_StringInfoData(eax_3, arg1);
0042f1c5                  break;
0042f1c5              }
0042f1e1              case 2:
0042f1e1              {
0042f1e1                  class Formatted_Double_StringInfoData* eax_5 = operator new(0x28);
0042f1e1                  
0042f1eb                  if (eax_5 != 0)
0042f1f6                      return Formatted_Double_StringInfoData::Formatted_Double_StringInfoData(eax_5, arg1);
0042f1e1                  break;
0042f1e1              }
0042f1f9              case 3:
0042f1f9              {
0042f1f9                  class LInt_StringInfoData* eax_7 = operator new(0x18);
0042f1f9                  
0042f203                  if (eax_7 != 0)
0042f20e                      return LInt_StringInfoData::LInt_StringInfoData(eax_7, arg1);
0042f1f9                  break;
0042f1f9              }
0042f211              case 4:
0042f211              {
0042f211                  class Formatted_LInt_StringInfoData* eax_9 = operator new(0x20);
0042f211                  
0042f21b                  if (eax_9 != 0)
0042f226                      return Formatted_LInt_StringInfoData::Formatted_LInt_StringInfoData(eax_9, arg1);
0042f211                  break;
0042f211              }
0042f229              case 5:
0042f229              {
0042f229                  class ULInt_StringInfoData* eax_11 = operator new(0x18);
0042f229                  
0042f233                  if (eax_11 != 0)
0042f23e                      return ULInt_StringInfoData::ULInt_StringInfoData(eax_11, arg1);
0042f229                  break;
0042f229              }
0042f241              case 6:
0042f241              {
0042f241                  class Formatted_ULInt_StringInfoData* eax_13 = operator new(0x20);
0042f241                  
0042f24b                  if (eax_13 != 0)
0042f256                      return Formatted_ULInt_StringInfoData::Formatted_ULInt_StringInfoData(eax_13, arg1);
0042f241                  break;
0042f241              }
0042f19d          }
0042f19d      
0042f25a      return 0;
0042f180  }

0042f25b                                                                                   90                                         .
0042f25c  uint32_t jump_table_42f25c[0x7] = 
0042f25c  {
0042f25c      [0x0] =  0x0042f1a4
0042f260      [0x1] =  0x0042f1c3
0042f264      [0x2] =  0x0042f1df
0042f268      [0x3] =  0x0042f1f7
0042f26c      [0x4] =  0x0042f20f
0042f270      [0x5] =  0x0042f227
0042f274      [0x6] =  0x0042f23f
0042f278  }

0042f278                                                                          90 90 90 90 90 90 90 90                          ........

0042f280  class PStringBase<unsigned short>* StringInfoDataHelper::NumToString(class PStringBase<unsigned short>* __return, double arg2, uint16_t arg3, uint8_t arg4, uint16_t arg5)

0042f280  {
0042f286      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042f294      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_1;
0042f29d      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0042f2a6      int32_t ebp = arg3;
0042f2ad      long double x87_r7_1 = fabsl(((long double)arg2));
0042f2af      double var_a0 = ((double)x87_r7_1);
0042f2b5      double var_b0 = ((double)x87_r7_1);
0042f2bb      long double temp2 = ((long double)1.0);
0042f2bb      (x87_r7_1 - temp2);
0042f2c1      int32_t edi_1 = -(ebp);
0042f2c3      int16_t var_2 = 0;
0042f2cb      int32_t esi = 0x3e;
0042f2d0      int32_t var_c8 = 0;
0042f2d4      int32_t eax_1;
0042f2d4      eax_1 = ((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0))));
0042f2d6      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0042f2d6      
0042f2d9      if (!(p))
0042f2d9      {
0042f2db          var_a0 = 0;
0042f2df          *(uint32_t*)((char*)var_a0)[4] = 0x3ff00000;
0042f2d9      }
0042f2d9      
0042f2e7      class CLanguageInfoInterface* CLanguageInfoInterface::m_instance_1 = CLanguageInfoInterface::m_instance;
0042f2e7      
0042f2ef      if (CLanguageInfoInterface::m_instance_1 != 0)
0042f2ef      {
0042f2f5          int32_t eax_2 = arg5;
0042f300          int32_t var_d4 = eax_2;
0042f300          
0042f304          if (eax_2 == 0xffff)
0042f304          {
0042f30b              CLanguageInfoInterface::GetBase(CLanguageInfoInterface::m_instance_1, &var_d4);
0042f310              CLanguageInfoInterface::m_instance_1 = CLanguageInfoInterface::m_instance;
0042f304          }
0042f304          
0042f326          if ((var_d4 > 1 && ebp <= 0x14))
0042f326          {
0042f331              uint8_t var_dd;
0042f331              CLanguageInfoInterface::GetLeadingZero(CLanguageInfoInterface::m_instance_1, &var_dd);
0042f341              uint16_t var_c4;
0042f341              CLanguageInfoInterface::GetNumDecDigits(CLanguageInfoInterface::m_instance, &var_c4);
0042f346              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0042f34b              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_2;
0042f353              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0042f360              CLanguageInfoInterface::GetNumerals(CLanguageInfoInterface::m_instance, &PStringBase<unsigned short>::s_NullBuffer_7);
0042f369              uint32_t eax_4 = ((uint32_t)var_d4);
0042f374              uint32_t var_dc = eax_4;
0042f374              
0042f378              if ((PStringBase<unsigned short>::s_NullBuffer_7->m_data[0x7ffffffffffffffe] - 1) < eax_4)
0042f378              {
0042f682                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_14 = PStringBase<unsigned short>::s_NullBuffer_6;
0042f686                  class PSRefBufferCharData<unsigned short>** __return_2 = __return;
0042f68d                  *(uint32_t*)__return_2 = PStringBase<unsigned short>::s_NullBuffer_14;
0042f693                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_14->m_data[-8]);
0042f699                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_7);
0042f6a2                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_6);
0042f6b3                  return __return_2;
0042f378              }
0042f378              
0042f38d              j__CIpow();
0042f392              double var_b8 = ((double)((long double)((int32_t)edi_1)));
0042f3a1              uint16_t var_bc;
0042f3a1              CLanguageInfoInterface::GetGroupingSize(CLanguageInfoInterface::m_instance, &var_bc);
0042f3a6              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
0042f3ab              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer_3;
0042f3b3              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0042f3c0              CLanguageInfoInterface::GetGroupingSeperator(CLanguageInfoInterface::m_instance, &PStringBase<unsigned short>::s_NullBuffer_8);
0042f3c5              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
0042f3ca              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_4;
0042f3d2              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
0042f3df              CLanguageInfoInterface::GetDecimalSeperator(CLanguageInfoInterface::m_instance, &PStringBase<unsigned short>::s_NullBuffer_9);
0042f3e4              uint32_t eax_7 = ((uint32_t)var_d4);
0042f3ed              int32_t eax_8;
0042f3ed              int32_t edx_3;
0042f3ed              edx_3 = HIGHD(((int64_t)eax_7));
0042f3ed              eax_8 = LOWD(((int64_t)eax_7));
0042f3fa              double var_90 = ((double)((long double)eax_7));
0042f3fa              int16_t top = 0xffff;
0042f3fe              int32_t edi_2 = edi_1;
0042f400              void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_f8_13;
0042f400              class PStringBase<unsigned short>* __return_1;
0042f400              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2;
0042f400              
0042f400              while (true)
0042f400              {
0042f400                  /* unimplemented  {fld st0, qword [esp+0x64]} */;
0042f409                  int32_t var_dc_3 = -(((int32_t)edi_2));
0042f40d                  /* unimplemented  {fild st0, dword [esp+0x18]} */;
0042f411                  j__CIpow();
0042f416                  /* unimplemented  {fmul st0, qword [esp+0x44]} */;
0042f41a                  /* unimplemented  {fadd qword [&data_798088]} */;
0042f420                  int32_t eax_11;
0042f420                  int32_t edx_4;
0042f420                  eax_11 = _ftol2();
0042f429                  int32_t var_f8_11 = edx_3;
0042f42e                  int32_t var_fc_1 = eax_8;
0042f42f                  int32_t var_100_1 = edx_4;
0042f430                  int32_t var_104_1 = eax_11;
0042f431                  int32_t eax_12;
0042f431                  int32_t edx_5;
0042f431                  eax_12 = _aullrem();
0042f43a                  class PSRefBufferCharData<unsigned short>* ebp_1;
0042f43a                  ebp_1 = PStringBase<unsigned short>::s_NullBuffer_7->m_data[eax_12];
0042f442                  int32_t var_98_1 = eax_12;
0042f446                  void var_80;
0042f446                  *(uint16_t*)(&var_80 + (((int32_t)esi) << 1)) = ebp_1;
0042f45a                  int32_t var_94_1 = (edx_5 & 0x7fffffff);
0042f45e                  int32_t var_84_1 = (edx_5 & 0x80000000);
0042f462                  int32_t var_88_1 = 0;
0042f46a                  /* unimplemented  {fild st0, qword [esp+0x5c]} */;
0042f472                  esi -= 1;
0042f473                  /* unimplemented  {fild st0, qword [esp+0x6c]} */;
0042f477                  int32_t ecx_13 = (var_c8 + 1);
0042f478                  edi_2 += 1;
0042f479                  var_c8 = ecx_13;
0042f47d                  /* unimplemented  {fchs } */;
0042f47f                  /* unimplemented  {faddp st1, st0} */;
0042f47f                  /* unimplemented  {faddp st1, st0} */;
0042f481                  /* unimplemented  {fmul st0, qword [esp+0x3c]} */;
0042f485                  /* unimplemented  {fsubr st0, qword [esp+0x44]} */;
0042f489                  double var_b0_1 = ((double)/* double var_b0_1 = fconvert.d(unimplemented  {fstp qword [esp+0x44], st0}) */);
0042f489                  /* unimplemented  {fstp qword [esp+0x44], st0} */;
0042f48d                  /* unimplemented  {fld st0, qword [esp+0x64]} */;
0042f491                  /* unimplemented  {fmul st0, qword [esp+0x3c]} */;
0042f495                  double var_b8_1 = ((double)/* double var_b8_1 = fconvert.d(unimplemented  {fst qword [esp+0x3c], st0}) */);
0042f499                  long double temp3_1 = ((long double)var_a0);
0042f499                  (/* unimplemented  {fcomp st0, qword [esp+0x54]} f- temp3_1 */ - temp3_1);
0042f499                  bool c0_1 = /* bool c0_1 = unimplemented  {fcomp st0, qword [esp+0x54]} f< temp3_1 */ < temp3_1;
0042f499                  bool c2_1 = (FCMP_UO(/* bool c2_1 = is_unordered.t(unimplemented  {fcomp st0, qword [esp+0x54]}, temp3_1) */, temp3_1));
0042f499                  bool c3_1 = /* bool c3_1 = unimplemented  {fcomp st0, qword [esp+0x54]} f== temp3_1 */ == temp3_1;
0042f499                  /* unimplemented  {fcomp st0, qword [esp+0x54]} */;
0042f499                  top -= 1;
0042f49d                  int32_t eax_14;
0042f49d                  eax_14 = ((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
0042f49d                  
0042f4a2                  if ((*(uint8_t*)((char*)eax_14)[1] & 0x41) == 0)
0042f4a2                  {
0042f4a4                      eax_14 = var_dd;
0042f4a4                      
0042f4ba                      if ((eax_14 == 0 || ((int32_t)ecx_13) >= ((uint32_t)var_c4)))
0042f4ba                      {
0042f55f                          uint16_t* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
0042f564                          uint16_t* PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_5;
0042f56c                          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5[-8]);
0042f579                          CLanguageInfoInterface::GetNegNumFormat(CLanguageInfoInterface::m_instance, &PStringBase<unsigned short>::s_NullBuffer_10);
0042f57e                          /* unimplemented  {fld st0, qword [esp+0xfc]} */;
0042f585                          long double temp4_1 = ((long double)0.0);
0042f585                          (/* unimplemented  {fcomp st0, qword [&data_794610]} f- temp4_1 */ - temp4_1);
0042f585                          bool c0_2 = /* bool c0_2 = unimplemented  {fcomp st0, qword [&data_794610]} f< temp4_1 */ < temp4_1;
0042f585                          bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcomp st0, qword [&data_794610]}, temp4_1) */, temp4_1));
0042f585                          bool c3_2 = /* bool c3_2 = unimplemented  {fcomp st0, qword [&data_794610]} f== temp4_1 */ == temp4_1;
0042f585                          /* unimplemented  {fcomp st0, qword [&data_794610]} */;
0042f58b                          int32_t eax_25;
0042f58b                          eax_25 = ((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
0042f58d                          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0042f590                          uint16_t* PStringBase<unsigned short>::s_NullBuffer_11;
0042f590                          int32_t __saved_edi;
0042f590                          
0042f590                          if (p_1)
0042f590                          {
0042f5ae                              void* var_f8_17 = ((&__saved_edi + (((int32_t)esi) << 1)) + 0x76);
0042f5ae                              
0042f5af                              if (var_d4 != 0x10)
0042f5b8                                  PStringBase<unsigned short>::s_NullBuffer_11 = &data_798070;
0042f5af                              else
0042f5b1                                  PStringBase<unsigned short>::s_NullBuffer_11 = u"0x%s";
0042f590                          }
0042f590                          else
0042f590                          {
0042f59d                              void* var_f8_16 = ((&__saved_edi + (((int32_t)esi) << 1)) + 0x76);
0042f59e                              PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_10;
0042f590                          }
0042f5c2                          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_6, PStringBase<unsigned short>::s_NullBuffer_11);
0042f5c7                          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_6;
0042f5cb                          __return_1 = __return;
0042f5d2                          __return_1->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_13;
0042f5dc                          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_13 - 0x10));
0042f5e8                          void* esi_4 = &PStringBase<unsigned short>::s_NullBuffer_10[-0xa];
0042f5e8                          
0042f5f7                          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0042f5ff                              **(uint32_t**)esi_4(1);
0042f5ff                          
0042f605                          esi_2 = &PStringBase<unsigned short>::s_NullBuffer_9->m_data[-0xa];
0042f60b                          var_f8_13 = ((char*)esi_2 + 4);
0042f5f3                          break;
0042f4ba                      }
0042f4a2                  }
0042f4a2                  
0042f4c3                  if (esi == 0)
0042f4c3                  {
0042f535                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_12 = PStringBase<unsigned short>::s_NullBuffer_6;
0042f539                      __return_1 = __return;
0042f540                      __return_1->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_12;
0042f547                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_12->m_data[-8]);
0042f553                      esi_2 = &PStringBase<unsigned short>::s_NullBuffer_9->m_data[-0xa];
0042f559                      var_f8_13 = ((char*)esi_2 + 4);
0042f55a                      break;
0042f4c3                  }
0042f4c3                  
0042f4c5                  eax_14 = arg4;
0042f4ce                  bool cond:3_1;
0042f4ce                  
0042f4ce                  if (eax_14 == 0)
0042f500                      cond:3_1 = edi_2 != 0;
0042f4ce                  else
0042f4ce                  {
0042f4d0                      int16_t temp5_1 = edi_2;
0042f4d0                      cond:3_1 = temp5_1 != 0;
0042f4d0                      
0042f4d3                      if (temp5_1 > 0)
0042f4d3                      {
0042f4e2                          if ((((int64_t)edi_2) % ((uint32_t)var_bc)) == 0)
0042f4e2                          {
0042f4e4                              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_16 = PStringBase<unsigned short>::s_NullBuffer_8;
0042f4e8                              int32_t eax_18 = PStringBase<unsigned short>::s_NullBuffer_16->m_data[0x7ffffffffffffffe];
0042f4eb                              int32_t eax_19 = (eax_18 - 2);
0042f4eb                              
0042f4ee                              if ((eax_18 - 2) >= 0)
0042f4ee                              {
0042f4fe                                  int32_t temp8_1;
0042f4fe                                  
0042f4fe                                  do
0042f4fe                                  {
0042f4f0                                      ebp_1 = PStringBase<unsigned short>::s_NullBuffer_16->m_data[eax_19];
0042f4f4                                      int32_t edx_9 = ((int32_t)esi);
0042f4f7                                      esi -= 1;
0042f4f8                                      temp8_1 = eax_19;
0042f4f8                                      eax_19 -= 1;
0042f4f9                                      *(uint16_t*)(&var_80 + (edx_9 << 1)) = ebp_1;
0042f4fe                                  } while ((temp8_1 - 1) >= 0);
0042f4ee                              }
0042f4e2                          }
0042f4e2                          
0042f500                          cond:3_1 = edi_2 != 0;
0042f4d3                      }
0042f4ce                  }
0042f4ce                  
0042f503                  if (!(cond:3_1))
0042f503                  {
0042f509                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_17 = PStringBase<unsigned short>::s_NullBuffer_9;
0042f50d                      int32_t eax_20 = PStringBase<unsigned short>::s_NullBuffer_17->m_data[0x7ffffffffffffffe];
0042f510                      int32_t eax_21 = (eax_20 - 2);
0042f510                      
0042f513                      if ((eax_20 - 2) >= 0)
0042f513                      {
0042f52e                          int32_t temp9_1;
0042f52e                          
0042f52e                          do
0042f52e                          {
0042f520                              ebp_1 = PStringBase<unsigned short>::s_NullBuffer_17->m_data[eax_21];
0042f524                              int32_t edx_10 = ((int32_t)esi);
0042f527                              esi -= 1;
0042f528                              temp9_1 = eax_21;
0042f528                              eax_21 -= 1;
0042f529                              *(uint16_t*)(&var_80 + (edx_10 << 1)) = ebp_1;
0042f52e                          } while ((temp9_1 - 1) >= 0);
0042f513                      }
0042f503                  }
0042f400              }
0042f400              
0042f614              if ((InterlockedDecrement(var_f8_13) == 0 && esi_2 != 0))
0042f61c                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0042f61c              
0042f622              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_7 = &PStringBase<unsigned short>::s_NullBuffer_8->m_data[-0xa];
0042f622              
0042f631              if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0042f639                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0042f639              
0042f63f              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_9 = &PStringBase<unsigned short>::s_NullBuffer_7->m_data[-0xa];
0042f63f              
0042f64e              if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
0042f656                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
0042f656              
0042f65c              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_11 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0042f65c              
0042f66b              if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
0042f673                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
0042f673              
0042f681              return __return_1;
0042f326          }
0042f2ef      }
0042f2ef      
0042f6b4      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_15 = PStringBase<unsigned short>::s_NullBuffer_6;
0042f6b8      class PSRefBufferCharData<unsigned short>** __return_3 = __return;
0042f6bf      *(uint32_t*)__return_3 = PStringBase<unsigned short>::s_NullBuffer_15;
0042f6c5      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_15->m_data[-8]);
0042f6cb      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_13 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0042f6cb      
0042f6de      if ((InterlockedDecrement(((char*)esi_13 + 4)) == 0 && esi_13 != 0))
0042f6e6          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_13) + -0x14)(1);
0042f6e6      
0042f6f4      return __return_3;
0042f280  }

0042f6f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0042f700  class PStringBase<unsigned short>* __thiscall StringInfo_StringInfoData::ToString(class StringInfo_StringInfoData const* this, class PStringBase<unsigned short>* __return)

0042f700  {
0042f703      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042f711      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0042f71c      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0042f71c      
0042f735      if (StringInfo::InqStringInternal(&this->m_cVal, &PStringBase<unsigned short>::s_NullBuffer_2, 1) != gsSuccess)
0042f735      {
0042f73d          uint32_t m_stringID = this->m_cVal.m_stringID;
0042f73e          uint32_t id = this->m_cVal.m_tableID.id;
0042f74b          void* var_4;
0042f74b          PStringBase<char>::PStringBase<char>(&var_4, Formatted, "Error: While rendering a StringI…");
0042f754          int32_t* esi_2 = ((char*)var_4 - 0x14);
0042f754          
0042f766          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0042f76e              **(uint32_t**)esi_2(1);
0042f735      }
0042f735      
0042f770      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0042f778      __return->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_3;
0042f77e      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0042f784      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0042f784      
0042f793      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0042f79b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0042f79b      
0042f7a6      return __return;
0042f700  }

0042f7a9                             90 90 90 90 90 90 90                                                           .......

0042f7b0  class PStringBase<unsigned short>* __thiscall Double_StringInfoData::ToString(class Double_StringInfoData const* this, class PStringBase<unsigned short>* __return)

0042f7b0  {
0042f7c9      int32_t var_14 = *(uint32_t*)((char*)this->m_fVal)[4];
0042f7cc      StringInfoDataHelper::NumToString(__return, this->m_fVal, this->m_iPrecision, 1, 0xffff);
0042f7d7      return __return;
0042f7b0  }

0042f7da                                                                                90 90 90 90 90 90                            ......

0042f7e0  class PStringBase<unsigned short>* __thiscall LInt_StringInfoData::ToString(class LInt_StringInfoData const* this, class PStringBase<unsigned short>* __return)

0042f7e0  {
0042f7f8      StringInfoDataHelper::NumToString(__return, ((double)((long double)this->m_iVal)), 0, 1, 0xffff);
0042f803      return __return;
0042f7e0  }

0042f806                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0042f810  class PStringBase<unsigned short>* __thiscall ULInt_StringInfoData::ToString(class ULInt_StringInfoData const* this, class PStringBase<unsigned short>* __return)

0042f810  {
0042f816      int32_t ecx = *(uint32_t*)((char*)this->m_iVal)[4];
0042f825      int32_t var_4 = (ecx & 0x7fffffff);
0042f837      int32_t var_4_1 = (ecx & 0x80000000);
0042f85b      StringInfoDataHelper::NumToString(__return, ((double)(((long double)this->m_iVal) + -(((long double)0)))), 0, 1, 0xffff);
0042f869      return __return;
0042f810  }

0042f86c                                      90 90 90 90                                                              ....

0042f870  class PStringBase<unsigned short>* __thiscall Formatted_Double_StringInfoData::ToString(class Formatted_Double_StringInfoData const* this, class PStringBase<unsigned short>* __return)

0042f870  {
0042f88f      int32_t var_14 = *(uint32_t*)((char*)this->m_fVal)[4];
0042f892      StringInfoDataHelper::NumToString(__return, this->m_fVal, this->m_iPrecision, this->m_bGrouping, this->m_iBase);
0042f89d      return __return;
0042f870  }


0042f8a0  class PStringBase<unsigned short>* __thiscall Formatted_LInt_StringInfoData::ToString(class Formatted_LInt_StringInfoData const* this, class PStringBase<unsigned short>* __return)

0042f8a0  {
0042f8be      StringInfoDataHelper::NumToString(__return, ((double)((long double)this->m_iVal)), 0, this->m_bGrouping, this->m_iBase);
0042f8c9      return __return;
0042f8a0  }

0042f8cc                                      90 90 90 90                                                              ....

0042f8d0  class PStringBase<unsigned short>* __thiscall Formatted_ULInt_StringInfoData::ToString(class Formatted_ULInt_StringInfoData const* this, class PStringBase<unsigned short>* __return)

0042f8d0  {
0042f8e7      int32_t ecx = *(uint32_t*)((char*)this->m_iVal)[4];
0042f8f6      int32_t var_4 = (ecx & 0x7fffffff);
0042f903      int32_t var_4_1 = (ecx & 0x80000000);
0042f921      StringInfoDataHelper::NumToString(__return, ((double)(((long double)this->m_iVal) + -(((long double)0)))), 0, this->m_bGrouping, this->m_iBase);
0042f92f      return __return;
0042f8d0  }

0042f932                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0042f940  uint8_t __thiscall PStringBase<char>::operator<(class PStringBase<char> const* this, class PStringBase<char> const* arg2)

0042f940  {
0042f944      int32_t ebx;
0042f944      int32_t var_4 = ebx;
0042f946      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0042f948      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
0042f948      
0042f950      while (true)
0042f950      {
0042f950          char edx = m_charbuffer->m_data[0];
0042f952          char ebx_1 = m_charbuffer_1->m_data[0];
0042f954          this = edx;
0042f956          bool c_1 = edx < ebx_1;
0042f956          
0042f958          if (edx == ebx_1)
0042f958          {
0042f95c              if (this == 0)
0042f95c                  break;
0042f95c              
0042f95e              edx = m_charbuffer->m_data[1];
0042f961              ebx_1 = m_charbuffer_1->m_data[1];
0042f964              this = edx;
0042f966              c_1 = edx < ebx_1;
0042f966              
0042f968              if (edx == ebx_1)
0042f968              {
0042f96a                  m_charbuffer = &m_charbuffer->m_data[2];
0042f96d                  m_charbuffer_1 = &m_charbuffer_1->m_data[2];
0042f96d                  
0042f972                  if (this == 0)
0042f972                      break;
0042f972                  
0042f972                  continue;
0042f968              }
0042f958          }
0042f958          
0042f984          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
0042f991          int32_t eax_2;
0042f991          eax_2 = (((char*)m_charbuffer - m_charbuffer) + 1) < 0;
0042f994          return eax_2;
0042f950      }
0042f950      
0042f97e      int32_t eax;
0042f97e      eax = 0;
0042f981      return 0;
0042f940  }

0042f997                                                                       90 90 90 90 90 90 90 90 90                         .........

0042f9a0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>* this, uint32_t arg2)

0042f9a0  {
0042f9a3      class HashTableData<unsigned long,StringTableString *>** m_buckets = this->m_buckets;
0042f9ab      this->vtable = 0x798124;
0042f9ab      
0042f9b1      if (m_buckets != &this->m_aInplaceBuckets)
0042f9b4          operator delete[](m_buckets);
0042f9b4      
0042f9be      this->m_buckets = nullptr;
0042f9c1      this->m_firstInterestingBucket = nullptr;
0042f9c4      this->m_numBuckets = 0;
0042f9c7      this->m_numElements = 0;
0042f9c7      
0042f9cf      if ((arg2 & 1) != 0)
0042f9d2          operator delete(this);
0042f9d2      
0042f9dd      return this;
0042f9a0  }


0042f9e0  void __thiscall SmartArray<unsigned long,1>::Serialize(class SmartArray<unsigned long,1>* this, class Archive* arg2)

0042f9e0  {
0042f9e9      uint32_t m_num = this->m_num;
0042f9f0      Archive::CheckAlignment(arg2, 4);
0042f9f9      uint8_t* eax = Archive::GetBytes(arg2, 4);
0042f9f9      
0042fa00      if (eax != 0)
0042fa00      {
0042fa06          if ((arg2->m_flags & 1) == 0)
0042fa0c              m_num = *(uint32_t*)eax;
0042fa06          else
0042fa08              *(uint32_t*)eax = m_num;
0042fa00      }
0042fa00      
0042fa0e      eax = arg2->m_flags;
0042fa11      eax = !(eax);
0042fa11      
0042fa15      if ((eax & 1) != 0)
0042fa15      {
0042fa20          if (m_num > Archive::GetSizeLeft(arg2))
0042fa20          {
0042fa24              Archive::RaiseError(arg2);
0042fa2c              return;
0042fa20          }
0042fa20          
0042fa34          this->m_num = 0;
0042fa3b          SmartArray<unsigned long,1>::SetNElements(this, m_num, 1);
0042fa15      }
0042fa15      
0042fa47      if (this->m_num > 0)
0042fa47      {
0042fa4a          int32_t i = 0;
0042fa4a          
0042fa83          do
0042fa83          {
0042fa52              void* ebp_1 = &this->m_data[i];
0042fa59              Archive::CheckAlignment(arg2, 4);
0042fa62              uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0042fa62              
0042fa69              if (eax_3 != 0)
0042fa69              {
0042fa6f                  if ((arg2->m_flags & 1) == 0)
0042fa7a                      *(uint32_t*)ebp_1 = *(uint32_t*)eax_3;
0042fa6f                  else
0042fa74                      *(uint32_t*)eax_3 = *(uint32_t*)ebp_1;
0042fa69              }
0042fa69              
0042fa80              i += 1;
0042fa83          } while (i < this->m_num);
0042fa47      }
0042f9e0  }

0042fa8c                                      90 90 90 90                                                              ....

0042fa90  void __thiscall StringTable::GetSubDataIDs(class StringTable const* this, class QualifiedDataIDArray* arg2)

0042fa90  {
0042fa9e      void __return;
0042fa9e      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_strings.m_intrusiveTable, &__return);
0042faa3      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
0042faa8      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0042faaa      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0042faaa      
0042faad      if (i_1 != 0)
0042faad      {
0042faca          while (true)
0042faca          {
0042faca              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, i_1->m_data->vtable, 0), 1);
0042facf              i_1 = i_1->m_hashNext;
0042facf              
0042fad4              if (i_1 == 0)
0042fad4              {
0042faeb                  class HashTableData<unsigned long,DBOCache *>* i;
0042faeb                  
0042faeb                  do
0042faeb                  {
0042fae0                      m_currBucket = &m_currBucket[1];
0042fae0                      
0042fae5                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0042fafa                          return;
0042fafa                      
0042fae7                      i = *(uint32_t*)m_currBucket;
0042faeb                  } while (i == 0);
0042faeb                  
0042faed                  i_1 = i;
0042faed                  
0042faf1                  if (i_1 == 0)
0042faf1                      break;
0042fad4              }
0042faca          }
0042faad      }
0042fa90  }

0042fafd                                                                                         90 90 90                               ...

0042fb00  void __fastcall StringTableString::StringTableString(class StringTableString* this)

0042fb00  {
0042fb06      uint32_t* this_1 = this;
0042fb08      *(uint32_t*)this_1 = INVALID_DID.id;
0042fb0a      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0042fb16      this_1[1] = PStringBase<char>::s_NullBuffer_1;
0042fb19      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0042fb21      __builtin_memset(&this_1[2], 0, 0x30);
0042fb45      this_1[0xe] = 1;
0042fb00  }


0042fb50  void __fastcall StringTableString::~StringTableString(class StringTableString* this)

0042fb50  {
0042fb60      if ((this->m_varNames.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0042fb60      {
0042fb62          class PStringBase<unsigned short>* m_data = this->m_varNames.m_data;
0042fb62          
0042fb67          if (m_data != 0)
0042fb6b              PStringBase<char>::`vector deleting destructor'(m_data, 3);
0042fb60      }
0042fb60      
0042fb7f      if ((this->m_variables.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0042fb85          operator delete[](this->m_variables.m_data);
0042fb85      
0042fb9a      if ((this->m_strings.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0042fb9a      {
0042fb9c          class PStringBase<unsigned short>* m_data_1 = this->m_strings.m_data;
0042fb9c          
0042fba1          if (m_data_1 != 0)
0042fba5              PStringBase<char>::`vector deleting destructor'(m_data_1, 3);
0042fb9a      }
0042fb9a      
0042fbb9      if ((this->m_comments.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0042fbb9      {
0042fbbb          class PStringBase<unsigned short>* m_data_2 = this->m_comments.m_data;
0042fbbb          
0042fbc0          if (m_data_2 != 0)
0042fbc4              PStringBase<char>::`vector deleting destructor'(m_data_2, 3);
0042fbb9      }
0042fbb9      
0042fbcc      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = (this->m_name.m_charbuffer - 0x14);
0042fbcc      
0042fbdf      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0042fbe7          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0042fb50  }

0042fbeb                                   90 90 90 90 90                                                             .....

0042fbf0  uint8_t __fastcall StringTableString::IsVarNameTableWorthPacking(class StringTableString const* this)

0042fbf0  {
0042fbfd      int32_t var_8 = 0;
0042fc01      int32_t var_c = 0;
0042fc01      
0042fc05      if (this->m_varNames.m_num > 0)
0042fc05      {
0042fc0d          int32_t edi;
0042fc0d          int32_t var_2c_1 = edi;
0042fe58          bool cond:2_1;
0042fe58          
0042fe58          do
0042fe58          {
0042fc25              class PStringBase<unsigned short> var_10;
0042fc25              PStringBase<unsigned short>::allocate_ref_buffer(&var_10, wcslen(&data_798148));
0042fc34              wcscpy(var_10, &data_798148);
0042fc41              class PStringBase<unsigned short> ecx_2 = var_10;
0042fc48              int32_t edi_3 = (var_c << 2);
0042fc4d              void* eax_5 = *(uint32_t*)(this->m_varNames.m_data + edi_3);
0042fc57              char ebx_1;
0042fc57              
0042fc57              if (*(uint32_t*)((char*)eax_5 - 4) != *(uint32_t*)(ecx_2 - 4))
0042fc57              {
0042fc97              label_42fc97:
0042fc97                  class PStringBase<unsigned short> var_18;
0042fc97                  PStringBase<unsigned short>::allocate_ref_buffer(&var_18, wcslen(u"NAME"));
0042fca6                  wcscpy(var_18, u"NAME");
0042fcaf                  class PStringBase<unsigned short> ecx_4 = var_18;
0042fcb8                  void* eax_12 = *(uint32_t*)(this->m_varNames.m_data + edi_3);
0042fcb8                  
0042fcc2                  if (*(uint32_t*)((char*)eax_12 - 4) == *(uint32_t*)(ecx_4 - 4))
0042fcc2                  {
0042fcc8                      int32_t edx_4 = *(uint32_t*)((char*)eax_12 - 8);
0042fccb                      int32_t esi_4 = *(uint32_t*)(ecx_4 - 8);
0042fccb                      
0042fcda                      if (((edx_4 == esi_4 || edx_4 == 0xffffffff) || esi_4 == 0xffffffff))
0042fcda                      {
0042fce2                          int32_t eax_13 = wcscmp(eax_12, ecx_4);
0042fce8                          ecx_4 = var_18;
0042fcf1                          ebx_1 = ((int8_t)-(eax_13));
0042fcf5                          ebx_1 = ((ebx_1 - ebx_1) + 1);
0042fcda                      }
0042fcda                      else
0042fcdc                          ebx_1 = 0;
0042fcc2                  }
0042fcc2                  else
0042fcc4                      ebx_1 = 0;
0042fcc4                  
0042fd0a                  if ((InterlockedDecrement((ecx_4 - 0x10)) == 0 && ecx_4 != 0x14))
0042fd12                      **(uint32_t**)(ecx_4 - 0x14)(1);
0042fd12                  
0042fd16                  if (ebx_1 != 0)
0042fe1f                      ebx_1 = 1;
0042fd16                  else
0042fd16                  {
0042fd2f                      class PStringBase<unsigned short> var_14;
0042fd2f                      PStringBase<unsigned short>::allocate_ref_buffer(&var_14, wcslen(&data_798134));
0042fd3e                      wcscpy(var_14, &data_798134);
0042fd47                      class PStringBase<unsigned short> ecx_7 = var_14;
0042fd50                      void* eax_20 = *(uint32_t*)(this->m_varNames.m_data + edi_3);
0042fd50                      
0042fd5a                      if (*(uint32_t*)((char*)eax_20 - 4) == *(uint32_t*)(ecx_7 - 4))
0042fd5a                      {
0042fd5c                          int32_t edx_7 = *(uint32_t*)((char*)eax_20 - 8);
0042fd5f                          int32_t esi_7 = *(uint32_t*)(ecx_7 - 8);
0042fd5f                          
0042fd6e                          if (((edx_7 == esi_7 || edx_7 == 0xffffffff) || esi_7 == 0xffffffff))
0042fd6e                          {
0042fd76                              int32_t eax_21 = wcscmp(eax_20, ecx_7);
0042fd7c                              ecx_7 = var_14;
0042fd85                              ebx_1 = ((int8_t)-(eax_21));
0042fd89                              ebx_1 = ((ebx_1 - ebx_1) + 1);
0042fd6e                          }
0042fd6e                          else
0042fd70                              ebx_1 = 0;
0042fd5a                      }
0042fd5a                      
0042fd9e                      if ((InterlockedDecrement((ecx_7 - 0x10)) == 0 && ecx_7 != 0x14))
0042fda6                          **(uint32_t**)(ecx_7 - 0x14)(1);
0042fda6                      
0042fdaa                      if (ebx_1 != 0)
0042fe1f                          ebx_1 = 1;
0042fdaa                      else
0042fdaa                      {
0042fdb5                          void* var_4;
0042fdb5                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, u"POST");
0042fdbd                          void* ecx_10 = var_4;
0042fdc6                          void* eax_26 = *(uint32_t*)(this->m_varNames.m_data + edi_3);
0042fdc6                          
0042fdcd                          if (*(uint32_t*)((char*)eax_26 - 4) == *(uint32_t*)((char*)ecx_10 - 4))
0042fdcd                          {
0042fdcf                              int32_t edx_10 = *(uint32_t*)((char*)eax_26 - 8);
0042fdd2                              int32_t esi_10 = *(uint32_t*)((char*)ecx_10 - 8);
0042fdd2                              
0042fde1                              if (((edx_10 == esi_10 || edx_10 == 0xffffffff) || esi_10 == 0xffffffff))
0042fde1                              {
0042fde9                                  int32_t eax_27 = wcscmp(eax_26, ecx_10);
0042fdef                                  ecx_10 = var_4;
0042fdf8                                  ebx_1 = ((int8_t)-(eax_27));
0042fdfc                                  ebx_1 = ((ebx_1 - ebx_1) + 1);
0042fde1                              }
0042fde1                              else
0042fde3                                  ebx_1 = 0;
0042fdcd                          }
0042fdcd                          
0042fe11                          if ((InterlockedDecrement(((char*)ecx_10 - 0x10)) == 0 && ecx_10 != 0x14))
0042fe19                              **(uint32_t**)((char*)ecx_10 - 0x14)(1);
0042fe19                          
0042fe1d                          if (ebx_1 != 0)
0042fe1f                              ebx_1 = 1;
0042fdaa                      }
0042fd16                  }
0042fc57              }
0042fc57              else
0042fc57              {
0042fc59                  int32_t edx_2 = *(uint32_t*)((char*)eax_5 - 8);
0042fc5c                  int32_t esi_2 = *(uint32_t*)(ecx_2 - 8);
0042fc5c                  
0042fc6b                  if (((edx_2 != esi_2 && edx_2 != 0xffffffff) && esi_2 != 0xffffffff))
0042fc61                      goto label_42fc97;
0042fc61                  
0042fc6f                  int32_t eax_6 = wcscmp(eax_5, ecx_2);
0042fc78                  char eax_7 = ((int8_t)-(eax_6));
0042fc7a                  eax_7 = (eax_7 - eax_7);
0042fc7e                  char var_19_1 = (eax_7 + 1);
0042fc7e                  
0042fc82                  if (eax_7 == 0xff)
0042fc82                      goto label_42fc97;
0042fc82                  
0042fe1f                  ebx_1 = 1;
0042fc57              }
0042fc57              
0042fe25              int32_t* esi_13 = (var_10 - 0x14);
0042fe25              
0042fe38              if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
0042fe40                  **(uint32_t**)esi_13(1);
0042fe40              
0042fe44              if (ebx_1 != 0)
0042fe46                  var_8 += 1;
0042fe46              
0042fe52              cond:2_1 = (var_c + 1) < this->m_varNames.m_num;
0042fe54              var_c += 1;
0042fe58          } while (cond:2_1);
0042fc05      }
0042fc05      
0042fe71      return var_8 >= 2;
0042fbf0  }

0042fe72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0042fe80  uint8_t __thiscall HashTable<unsigned long,PStringBase<char>,0>::find(class HashTable<unsigned long,PStringBase<char>,0> const* this, uint32_t const* arg2, class PStringBase<char>* arg3)

0042fe80  {
0042fe86      uint32_t const edi = *(uint32_t*)arg2;
0042fe86      
0042fe9a      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, edi) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0042fe9a      {
0042fea2          if (*(uint32_t*)i == edi)
0042fea2          {
0042feb4              if (i == 0)
0042feb4                  break;
0042feb4              
0042febe              class PSRefBufferCharData<char>* m_charbuffer = arg3->m_charbuffer;
0042febe              
0042fec2              if (m_charbuffer != i[2])
0042fec2              {
0042fed7                  if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0042fedf                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0042fedf                  
0042fee1                  class PStringBase<char> esi = i[2];
0042fee4                  arg3->m_charbuffer = esi;
0042feea                  InterlockedIncrement((esi - 0x10));
0042fec2              }
0042fec2              
0042fef2              m_charbuffer = 1;
0042fef5              return 1;
0042fea2          }
0042fe9a      }
0042fe9a      
0042feac      void* eax_1;
0042feac      eax_1 = 0;
0042feaf      return 0;
0042fe80  }

0042fef8                                                                          90 90 90 90 90 90 90 90                          ........

0042ff00  int32_t __convention("regparm") PStringBase<unsigned short>::sprintf_append(class PStringBase<unsigned short>* this, uint16_t const* arg2)

0042ff00  {
0042ff00      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3;
0042ff00      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_3;
0042ff01      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0042ff07      PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0042ff10      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0042ff24      int32_t result = PStringBase<unsigned short>::vsprintf(&PStringBase<unsigned short>::s_NullBuffer_2, arg2, &arg_c);
0042ff29      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0042ff2f      int32_t eax_1 = PStringBase<unsigned short>::s_NullBuffer_4->m_data[0x7ffffffffffffffe];
0042ff2f      
0042ff35      if (eax_1 != 1)
0042ff35      {
0042ff3e          PStringBase<unsigned short>::append_n_chars(this, PStringBase<unsigned short>::s_NullBuffer_4, (eax_1 - 1));
0042ff43          PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0042ff35      }
0042ff35      
0042ff5a      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_4 != 0x14))
0042ff62          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4 + -0x14)(1);
0042ff62      
0042ff69      return result;
0042ff00  }

0042ff6a                                90 90 90 90 90 90                                                            ......

0042ff70  void __thiscall SmartArray<PStringBase<unsigned short>,1>::Serialize(class SmartArray<PStringBase<unsigned short>,1>* this, class Archive* arg2)

0042ff70  {
0042ff79      uint32_t m_num = this->m_num;
0042ff80      Archive::CheckAlignment(arg2, 4);
0042ff89      uint8_t* eax = Archive::GetBytes(arg2, 4);
0042ff89      
0042ff90      if (eax != 0)
0042ff90      {
0042ff96          if ((arg2->m_flags & 1) == 0)
0042ff9c              m_num = *(uint32_t*)eax;
0042ff96          else
0042ff98              *(uint32_t*)eax = m_num;
0042ff90      }
0042ff90      
0042ff9e      eax = arg2->m_flags;
0042ffa1      eax = !(eax);
0042ffa1      
0042ffa5      if ((eax & 1) != 0)
0042ffa5      {
0042ffb0          if (m_num > Archive::GetSizeLeft(arg2))
0042ffb0          {
0042ffb4              Archive::RaiseError(arg2);
0042ffbc              return;
0042ffb0          }
0042ffb0          
0042ffc4          this->m_num = 0;
0042ffcb          SmartArray<PStringBase<unsigned short>,1>::SetNElements(this, m_num, 1);
0042ffa5      }
0042ffa5      
0042ffd3      int32_t i = 0;
0042ffd3      
0042ffd7      if (this->m_num > 0)
0042ffd7      {
0042fff1          do
0042fff1          {
0042ffe6              PStringBase<unsigned short>::Serialize(&this->m_data[i], arg2);
0042ffee              i += 1;
0042fff1          } while (i < this->m_num);
0042ffd7      }
0042ff70  }

0042fff9                                                                             90 90 90 90 90 90 90                           .......

00430000  class StringTableString* __thiscall StringTable::GetStringTableString(class StringTable const* this, uint32_t arg2)

00430000  {
0043001f      for (int32_t* i = this->m_strings.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_strings.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0043001f      {
00430023          if (*(uint32_t*)i == arg2)
00430023          {
00430035              if (i != 0)
0043003c                  return i[2];
0043003c              
00430035              break;
00430023          }
0043001f      }
0043001f      
00430030      return 0;
00430000  }

0043003f                                                                                               90                                 .

00430040  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>* this, uint32_t arg2)

00430040  {
0043004b      arg2 = arg2;
0043004f      uint8_t edx = ((int8_t)arg2);
00430053      this->m_buckets = nullptr;
00430056      this->m_firstInterestingBucket = nullptr;
00430059      this->m_numBuckets = 0;
0043005c      this->m_numElements = 0;
00430060      this->vtable = 0x798124;
00430066      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00430079      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00430079      
00430083      if (eax == bucketSizesEnd_1)
00430085          eax -= 4;
00430085      
00430088      uint32_t eax_1 = *(uint32_t*)eax;
0043008d      this->m_numBuckets = eax_1;
0043008d      
00430090      if (eax_1 > 0x17)
004300a6          this->m_buckets = operator new[]((eax_1 << 2));
00430090      else
00430095          this->m_buckets = &this->m_aInplaceBuckets;
00430095      
004300ac      class HashTableData<unsigned long,StringTableString *>** m_buckets = this->m_buckets;
004300af      uint32_t ecx_3 = (this->m_numBuckets << 2);
004300b5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004300c6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00430040  }

004300cf                                               90                                                                 .

004300d0  enum GetStringErrorCode __thiscall StringTable::GetString(class StringTable const* this, class PStringBase<unsigned short>* arg2, uint32_t arg3, class HashTable<unsigned long,PStringBase<unsigned short>,0> const* arg4, uint8_t arg5)

004300d0  {
004300d6      uint32_t i = arg3;
004300ea      int32_t i_1 = 0;
004300ef      int32_t* eax_3 = this->m_strings.m_intrusiveTable.m_buckets[(COMBINE(0, i) % this->m_strings.m_intrusiveTable.m_numBuckets)];
004300ef      
004300f3      if (eax_3 != 0)
004300f3      {
004300f7          while (*(uint32_t*)eax_3 != i)
004300f7          {
004300f9              eax_3 = eax_3[1];
004300f9              
004300fe              if (eax_3 == 0)
0043010b                  return 2;
004300f7          }
004300f7          
00430110          if (eax_3 != 0)
00430110          {
00430112              int32_t* esi_1 = eax_3[2];
00430112              
00430117              if (esi_1 != 0)
00430117              {
00430127                  class IDClass<_tagDataID,32,0> eax_6 = *(uint32_t*)esi_1;
0043012f                  class PStringBase<char>* var_24;
0043012f                  
0043012f                  if (eax_6 != INVALID_DID.id)
0043012f                  {
0043013e                      class DBObj* eax_8 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_24, eax_6, 0x25));
0043013e                      
0043014a                      if (eax_8 == 0)
00430157                          return 5;
00430157                      
00430160                      esi_1 = StringTable::GetStringTableString(eax_8, i);
00430160                      
00430164                      if (esi_1 == 0)
00430164                      {
00430166                          eax_8->vtable->Release();
00430176                          return 4;
00430164                      }
00430164                      
00430179                      eax_8->vtable->Release();
0043012f                  }
0043012f                  
0043017e                  eax_6.id = arg5;
0043017e                  
00430185                  if (eax_6.id == 0)
00430185                  {
004303b7                      class PStringBase<unsigned short>* ebx = arg2;
004303bd                      PStringBase<unsigned short>::clear(ebx);
004303c5                      int32_t eax_36;
004303c5                      eax_36 = 0;
004303c9                      arg5 = 0;
004303c9                      
004303cd                      if (esi_1[7] > 0)
004303cd                      {
00430461                          do
00430461                          {
004303d6                              int32_t edi_2 = (i_1 << 2);
004303df                              uint16_t* eax_39 = *(uint32_t*)(esi_1[5] + edi_2);
004303e1                              int32_t ecx_23 = *(uint32_t*)((char*)eax_39 - 4);
004303e1                              
004303e7                              if (ecx_23 != 1)
004303ee                                  PStringBase<unsigned short>::append_n_chars(ebx, eax_39, (ecx_23 - 1));
004303ee                              
004303f6                              if (i_1 < esi_1[0xa])
004303f6                              {
004303f8                                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004303fd                                  arg2 = PStringBase<unsigned short>::s_NullBuffer_2;
00430405                                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00430405                                  
00430421                                  if (HashTable<unsigned long,PStringBase<char>,0>::find(arg4, (esi_1[8] + edi_2), &arg2) == 0)
00430423                                      arg5 = 1;
00430423                                  
00430428                                  uint16_t* edi_3 = arg2;
0043042c                                  int32_t eax_44 = *(uint32_t*)((char*)edi_3 - 4);
0043042c                                  
00430432                                  if (eax_44 != 1)
00430439                                      PStringBase<unsigned short>::append_n_chars(ebx, edi_3, (eax_44 - 1));
00430439                                  
00430451                                  if ((InterlockedDecrement(&edi_3[-8]) == 0 && edi_3 != 0x14))
00430459                                      **(uint32_t**)((char*)edi_3 - 0x14)(1);
004303f6                              }
004303f6                              
0043045e                              i_1 += 1;
00430461                          } while (i_1 < esi_1[7]);
00430461                          
00430467                          eax_36 = arg5;
004303cd                      }
004303cd                      
0043046b                      char temp3 = eax_36;
0043046b                      eax_36 = -(eax_36);
00430479                      return ((eax_36 - eax_36) & 6);
00430185                  }
00430185                  
0043018b                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043019e                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004301a0                  bool cond:2 = esi_1[0xa] <= 0;
004301a3                  var_24 = nullptr;
004301a7                  int32_t var_20 = 0;
004301ab                  int32_t var_1c = 0;
004301af                  arg5 = 0;
004301af                  
004301b4                  if (!(cond:2))
004301b4                  {
00430222                      do
00430222                      {
004301c0                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004301c5                          arg3 = PStringBase<unsigned short>::s_NullBuffer_1;
004301cd                          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004301cd                          
004301e6                          if (HashTable<unsigned long,PStringBase<char>,0>::find(arg4, (esi_1[8] + (i_1 << 2)), &arg3) == 0)
004301e8                              arg5 = 1;
004301e8                          
004301f6                          SmartArray<PStringBase<unsigned short>,1>::AddToEnd(&var_24, &arg3);
004301ff                          int32_t* edi_1 = (arg3 - 0x14);
004301ff                          
00430212                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0043021a                              **(uint32_t**)edi_1(1);
0043021a                          
0043021f                          i_1 += 1;
00430222                      } while (i_1 < esi_1[0xa]);
00430222                      
00430224                      int32_t eax_18;
00430224                      eax_18 = arg5;
00430224                      
0043022a                      if (eax_18 != 0)
0043022a                      {
0043023a                          if ((var_20 & 0x80000000) == 0x80000000)
0043023a                          {
0043023c                              class PStringBase<char>* ecx_7 = var_24;
0043023c                              
00430242                              if (ecx_7 != 0)
00430246                                  PStringBase<char>::`vector deleting destructor'(ecx_7, 3);
0043023a                          }
0043023a                          
00430262                          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0043026a                              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0043026a                          
00430278                          return 6;
0043022a                      }
004301b4                  }
004301b4                  
0043027d                  class PStringBase<unsigned short>* edx_5 = arg2;
0043029b                  class PStringBase<char>* var_18 = nullptr;
0043029f                  int32_t var_14 = 0;
004302a3                  int32_t var_10 = 0;
004302b1                  void var_c;
004302b1                  
004302b1                  if (StringTableMetaLanguage::RenderString(&esi_1[5], &var_24, &esi_1[0xb], edx_5, &var_18, 1, &var_c) != 0)
004302b1                  {
004302c3                      if ((var_14 & 0x80000000) == 0x80000000)
004302c3                      {
004302c5                          class PStringBase<char>* ecx_10 = var_18;
004302c5                          
004302cb                          if (ecx_10 != 0)
004302cf                              PStringBase<char>::`vector deleting destructor'(ecx_10, 3);
004302c3                      }
004302c3                      
004302e2                      if ((var_20 & 0x80000000) == 0x80000000)
004302e2                      {
004302e4                          class PStringBase<char>* ecx_11 = var_24;
004302e4                          
004302ea                          if (ecx_11 != 0)
004302ee                              PStringBase<char>::`vector deleting destructor'(ecx_11, 3);
004302e2                      }
004302e2                      
0043030a                      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00430312                          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
00430312                      
0043031d                      return 0;
004302b1                  }
004302b1                  
00430320                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0043032a                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0043032a                  
00430341                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
00430349                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
00430349                  
00430359                  if ((var_14 & 0x80000000) == 0x80000000)
00430359                  {
0043035b                      class PStringBase<char>* ecx_16 = var_18;
0043035b                      
00430361                      if (ecx_16 != 0)
00430365                          PStringBase<char>::`vector deleting destructor'(ecx_16, 3);
00430359                  }
00430359                  
0043037a                  if ((var_20 & 0x80000000) == 0x80000000)
0043037a                  {
0043037c                      class PStringBase<char>* ecx_19 = var_24;
0043037c                      
00430382                      if (ecx_19 != 0)
00430386                          PStringBase<char>::`vector deleting destructor'(ecx_19, 3);
0043037a                  }
0043037a                  
0043039e                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
004303a6                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
004303a6                  
004303b4                  return 7;
00430117              }
00430110          }
004300f3      }
004300f3      
00430124      return 2;
004300d0  }

0043047c                                                                                      90 90 90 90                              ....

00430480  void __thiscall StringTableString::Serialize(class StringTableString* this, class Archive* arg2)

00430480  {
0043048d      Archive::CheckAlignment(arg2, 4);
00430496      uint8_t* eax = Archive::GetBytes(arg2, 4);
00430496      
0043049d      if (eax != 0)
0043049d      {
004304a3          if ((arg2->m_flags & 1) == 0)
004304ad              this->m_table.id = *(uint32_t*)eax;
004304a3          else
004304a7              *(uint32_t*)eax = this->m_table.id;
0043049d      }
0043049d      
004304b3      SmartArray<PStringBase<unsigned short>,1>::Serialize(&this->m_strings, arg2);
004304bc      SmartArray<unsigned long,1>::Serialize(&this->m_variables, arg2);
004304cc      int32_t ebx;
004304cc      ebx = StringTableString::IsVarNameTableWorthPacking(this);
004304ce      Archive::CheckAlignment(arg2, 1);
004304d7      uint8_t* eax_2 = Archive::GetBytes(arg2, 1);
004304d7      
004304de      if (eax_2 != 0)
004304de      {
004304e4          if ((arg2->m_flags & 1) == 0)
004304ea              ebx = *(uint8_t*)eax_2;
004304e4          else
004304e6              *(uint8_t*)eax_2 = ebx;
004304de      }
004304de      
004304f0      if ((arg2->m_flags & 5) != 0)
004304f0      {
00430502      label_430502:
00430502          
00430504          if (ebx != 0)
0043050a              SmartArray<PStringBase<unsigned short>,1>::Serialize(&this->m_varNames, arg2);
004304f0      }
004304f0      else if (ebx != 0)
004304f4      {
004304f9          if (ebx != 1)
004304fd              Archive::RaiseError(arg2);
004304fd          
004304f9          goto label_430502;
004304f4      }
00430480  }

00430515                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00430520  void __fastcall StringTable::Destroy(class StringTable* this)

00430520  {
0043052a      this->m_version = 0;
0043052d      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_description.m_charbuffer;
0043052d      
00430537      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
00430537      {
0043054c          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00430554              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00430554          
00430556          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00430561          this->m_description.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00430564          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00430537      }
00430537      
0043056a      this->m_language = 0;
0043056d      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>* ebx = &this->m_strings.m_intrusiveTable;
0043057b      void __return;
0043057b      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(ebx, &__return);
00430580      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_2->m_currElement;
00430585      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
00430587      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
00430587      
0043058a      if (i_1 != 0)
0043058a      {
00430590          while (true)
00430590          {
00430590              class DBOCache* m_data = i_1->m_data;
00430590              
00430595              if (m_data != 0)
00430595              {
00430599                  StringTableString::~StringTableString(m_data);
0043059f                  operator delete(m_data);
00430595              }
00430595              
004305a7              i_1->m_data = nullptr;
004305ae              i_1 = i_1->m_hashNext;
004305ae              
004305b3              if (i_1 == 0)
004305b3              {
004305cb                  class HashTableData<unsigned long,DBOCache *>* i;
004305cb                  
004305cb                  do
004305cb                  {
004305c0                      m_currBucket = &m_currBucket[1];
004305c0                      
004305c5                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004305c5                          goto label_4305d9;
004305c5                      
004305c7                      i = *(uint32_t*)m_currBucket;
004305cb                  } while (i == 0);
004305cb                  
004305cd                  i_1 = i;
004305cd                  
004305d1                  if (i_1 == 0)
004305d1                      break;
004305b3              }
00430590          }
0043058a      }
0043058a      
004305d9  label_4305d9:
004305d9      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(ebx);
00430520  }

004305e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004305f0  void* __thiscall HashTable<unsigned long,StringTableString *,0>::`scalar deleting destructor'(class HashTable<unsigned long,StringTableString *,0>* this, uint32_t arg2)

004305f0  {
004305f9      this->vtable = 0x798150;
004305ff      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00430604      class HashTableData<unsigned long,StringTableString *>** m_buckets = this->m_intrusiveTable.m_buckets;
004305f4      this->m_intrusiveTable.vtable = 0x798124;
004305f4      
00430612      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00430615          operator delete[](m_buckets);
00430615      
004305f4      this->m_intrusiveTable.m_buckets = nullptr;
004305f4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004305f4      this->m_intrusiveTable.m_numBuckets = 0;
004305f4      this->m_intrusiveTable.m_numElements = 0;
004305f4      
00430630      if ((arg2 & 1) != 0)
00430633          operator delete(this);
00430633      
0043063f      return this;
004305f0  }

00430642        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00430650  void __fastcall StringTable::StringTable(class StringTable* this)

00430650  {
00430659      DBObj::DBObj(this, INVALID_DID.id);
0043065e      this->vtable = 0x798158;
00430664      this->m_version = 0;
0043066b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00430677      this->m_description.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
0043067a      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00430680      this->m_language = 0;
0043068c      this->m_strings.vtable = 0x798150;
00430693      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>(&this->m_strings.m_intrusiveTable, 0x17);
00430650  }

0043069c                                                                                      90 90 90 90                              ....

004306a0  uint32_t StringTable::GetDBOType(class StringTable const* this @ ecx) __pure

004306a0  {
004306a5      return 0x25;
004306a0  }

004306a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004306b0  void __fastcall StringTable::~StringTable(class StringTable* this)

004306b0  {
004306b5      this->vtable = 0x798158;
004306bb      StringTable::Destroy(this);
004306c5      this->m_strings.vtable = 0x798150;
004306cc      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_strings.m_intrusiveTable);
004306d1      class HashTableData<unsigned long,StringTableString *>** m_buckets = this->m_strings.m_intrusiveTable.m_buckets;
004306c0      this->m_strings.m_intrusiveTable.vtable = 0x798124;
004306c0      
004306df      if (m_buckets != &this->m_strings.m_intrusiveTable.m_aInplaceBuckets)
004306e2          operator delete[](m_buckets);
004306e2      
004306c0      this->m_strings.m_intrusiveTable.m_buckets = nullptr;
004306c0      this->m_strings.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004306c0      this->m_strings.m_intrusiveTable.m_numBuckets = 0;
004306c0      this->m_strings.m_intrusiveTable.m_numElements = 0;
004306fb      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = (this->m_description.m_charbuffer - 0x14);
004306fb      
0043070e      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00430716          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00430716      
0043071d      /* tailcall */
0043071d      return DBObj::~DBObj(this);
004306b0  }

00430722        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00430730  void SerializeHashTableData<StringTable *,unsigned long,StringTableString *,SB_Default,SB_Alloc<SB_DefaultAllocator,0,SB_Default> >(class StringTable** arg1, class HashTableData<unsigned long,StringTableString *>* arg2, class Archive* arg3)

00430730  {
0043073a      Archive::CheckAlignment(arg3, 4);
00430743      uint8_t* eax;
00430743      uint32_t ecx_2;
00430743      eax = Archive::GetBytes(arg3, 4);
00430743      
0043074e      if (eax != 0)
0043074e      {
00430754          if ((arg3->m_flags & 1) == 0)
0043075e              arg2->m_hashKey = *(uint32_t*)eax;
00430754          else
00430758              *(uint32_t*)eax = arg2->m_hashKey;
0043074e      }
0043074e      
00430768      if ((((int8_t)(arg3->m_flags >> 2)) & 1) == 0)
00430768      {
0043076a          ecx_2 = arg3->m_flags;
0043076d          ecx_2 = !(ecx_2);
0043076d          
00430772          if ((ecx_2 & 1) != 0)
00430772          {
00430776              void* eax_3 = operator new(0x3c);
00430780              class StringTableString* eax_4;
00430780              
00430780              if (eax_3 == 0)
0043078b                  eax_4 = nullptr;
00430780              else
00430784                  eax_4 = StringTableString::StringTableString(eax_3);
00430784              
0043078d              arg2->m_data = eax_4;
00430772          }
00430772          
00430790          class StringTableString* m_data = arg2->m_data;
00430790          
00430795          if (m_data == 0)
0043079b              /* tailcall */
0043079b              return Archive::RaiseError(arg3);
0043079b          
004307a1          StringTableString::Serialize(m_data, arg3);
00430768      }
00430730  }

004307a9                             90 90 90 90 90 90 90                                                           .......

004307b0  class DBObj* StringTable::Allocate(class StringTable const* this @ ecx)

004307b0  {
004307b0      /* tailcall */
004307b0      return StringTable::Allocator();
004307b0  }

004307b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004307c0  class DBObj* StringTable::Allocator()

004307c0  {
004307c5      void* eax = operator new(0xb0);
004307c5      
004307cf      if (eax == 0)
004307da          return 0;
004307da      
004307d3      /* tailcall */
004307d3      return StringTable::StringTable(eax);
004307c0  }

004307db                                                                                   90 90 90 90 90                             .....

004307e0  void* __thiscall StringTable::`scalar deleting destructor'(class StringTable* this, uint32_t arg2)

004307e0  {
004307e3      StringTable::~StringTable(this);
004307e3      
004307ed      if ((arg2 & 1) != 0)
004307f0          operator delete(this);
004307f0      
004307fb      return this;
004307e0  }

004307fe                                                                                            90 90                                ..

00430800  void ?SerializeIntrusiveHashTable@?$@PAVStringTable@@V?$IntrusiveHashTable@KPAV?$HashTableData@KPAVStringTableString@@@@$0A@@@PAV?$HashTableData@KPAVStringTableString@@@@USB_HashData@?$SB_Hash@USB_Default@@U?$SB_Alloc@USB_DefaultAllocator@@$0A@USB_Default@@@@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABQAVStringTable@@AAV?$IntrusiveHashTable@KPAV?$HashTableData@KPAVStringTableString@@@@$0A@@@AAVArchive@@@Z(class StringTable** arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StringTableString *> *,0>* arg2, class Archive* arg3)

00430800  {
00430805      class Archive* ebp = arg3;
00430805      
00430812      if ((!(ebp->m_flags) & 1) != 0)
00430818          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
00430818      
00430826      int32_t ebx;
00430826      
00430826      if ((((int8_t)ebp->m_flags) & 5) != 1)
00430865          ebx = arg3;
00430826      else
00430826      {
0043082f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00430835          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0043083d          arg3 = arg2->m_numBuckets;
0043084d          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0043084d          
00430857          if (eax_2 == bucketSizesEnd_1)
00430859              eax_2 -= 4;
00430859          
00430860          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
00430826      }
00430826      
0043086d      Archive::CheckAlignment(ebp, 1);
00430876      char* eax_3 = Archive::GetBytes(ebp, 1);
00430876      
0043087d      if (eax_3 != 0)
0043087d      {
00430883          if ((ebp->m_flags & 1) == 0)
00430889              ebx = *(uint8_t*)eax_3;
00430883          else
00430885              *(uint8_t*)eax_3 = ebx;
0043087d      }
0043087d      
0043088f      if ((ebp->m_flags & 5) == 0)
0043088f      {
00430897          uint32_t eax_4 = ((uint32_t)ebx);
00430897          
0043089c          if (eax_4 < 0x17)
004308b5              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
0043089c          else
004308a0              Archive::RaiseError(ebp);
0043088f      }
0043088f      
004308c1      if ((((int8_t)ebp->m_flags) & 5) == 1)
004308ca          arg3 = arg2->m_numElements;
004308ca      
004308d9      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, ebp);
004308d9      
004308ea      if ((((int8_t)ebp->m_flags) & 5) == 1)
004308ea      {
004308f5          void __return;
004308f5          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
004308fa          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
004308fc          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
004308ff          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
004308ff          
00430904          while (i != 0)
00430904          {
0043091a              do
0043091a              {
0043090d                  SerializeHashTableData<StringTable *,unsigned long,StringTableString *,SB_Default,SB_Alloc<SB_DefaultAllocator,0,SB_Default> >(arg1, i, ebp);
00430912                  i = i->m_hashNext;
0043091a              } while (i != 0);
0043091a              
00430925              while (true)
00430925              {
00430925                  m_currBucket = &m_currBucket[1];
00430925                  
0043092a                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0043092a                      break;
0043092a                  
0043092c                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0043092c                  
00430930                  if (i_1 != 0)
00430930                  {
00430932                      i = i_1;
00430934                      break;
00430930                  }
00430925              }
00430904          }
004308ea      }
004308ea      
0043093a      if ((ebp->m_flags & 5) == 0)
0043093a      {
0043093e          uint32_t eax_9 = Archive::GetSizeLeft(ebp);
00430943          class Archive* ecx_13 = arg3;
00430943          
00430949          if (ecx_13 > eax_9)
004309a6              Archive::RaiseError(ebp);
00430949          else
00430949          {
0043094b              void* edi_1 = nullptr;
0043094d              int32_t ebx_3 = 0;
0043094d              
00430951              if (ecx_13 > 0)
00430951              {
00430955                  while (true)
00430955                  {
00430955                      void* eax_10 = operator new(0xc);
0043095a                      void* esi_1 = nullptr;
0043095a                      
00430961                      if (eax_10 != 0)
00430961                      {
00430963                          *(uint32_t*)((char*)eax_10 + 4) = 0;
00430966                          esi_1 = eax_10;
00430961                      }
00430961                      
0043096f                      SerializeHashTableData<StringTable *,unsigned long,StringTableString *,SB_Default,SB_Alloc<SB_DefaultAllocator,0,SB_Default> >(arg1, esi_1, ebp);
0043096f                      
00430980                      if ((((int8_t)(ebp->m_flags >> 2)) & 1) != 0)
004309b2                          return;
004309b2                      
0043098f                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, esi_1, edi_1) == 0)
0043098f                          break;
0043098f                      
00430995                      ebx_3 += 1;
00430998                      edi_1 = esi_1;
00430998                      
0043099a                      if (ebx_3 >= arg3)
004309a3                          return;
00430955                  }
00430955                  
004309a6                  Archive::RaiseError(ebp);
00430951              }
00430949          }
0043093a      }
00430800  }

004309b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004309c0  void __thiscall StringTable::Serialize(class StringTable* this, class Archive* arg2)

004309c0  {
004309c1      class Archive* esi = arg2;
004309c9      DBObj::Serialize(this, esi);
004309d2      Archive::CheckAlignment(esi, 4);
004309db      uint32_t* eax = Archive::GetBytes(esi, 4);
004309db      
004309e2      if (eax != 0)
004309e2      {
004309e8          if ((esi->m_flags & 1) == 0)
004309f3              this->m_version = *(uint32_t*)eax;
004309e8          else
004309ed              *(uint32_t*)eax = this->m_version;
004309e2      }
004309e2      
004309f6      eax = esi->m_flags;
004309f9      eax = !(eax);
004309f9      
004309fd      if ((eax & 1) != 0)
00430a02          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_strings.m_intrusiveTable);
00430a02      
00430a11      ?SerializeIntrusiveHashTable@?$@PAVStringTable@@V?$IntrusiveHashTable@KPAV?$HashTableData@KPAVStringTableString@@@@$0A@@@PAV?$HashTableData@KPAVStringTableString@@@@USB_HashData@?$SB_Hash@USB_Default@@U?$SB_Alloc@USB_DefaultAllocator@@$0A@USB_Default@@@@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABQAVStringTable@@AAV?$IntrusiveHashTable@KPAV?$HashTableData@KPAVStringTableString@@@@$0A@@@AAVArchive@@@Z(&arg2, &this->m_strings.m_intrusiveTable, esi);
004309c0  }

00430a1e                                                                                            90 90                                ..

00430a20  uint8_t MasterStringTableGen::AddString(class PStringBase<char> arg1, class PStringBase<char> arg2, class PStringBase<char> arg3, class PStringBase<char> arg4, class PStringBase<char> arg5)

00430a20  {
00430a20      int32_t ecx;
00430a20      int32_t var_4 = ecx;
00430a38      *(uint8_t*)((char*)var_4)[3] = 0;
00430a38      
00430a3d      if (MasterStringTableGen::s_pStringTableGen != 0)
00430a3d      {
00430a45          int32_t var_18_1 = ecx;
00430a54          int32_t var_18_3 = InterlockedIncrement((arg5 - 0x10), arg5);
00430a63          int32_t var_18_5 = InterlockedIncrement((arg5 - 0x10), arg5);
00430a6e          int32_t var_18_7 = InterlockedIncrement((arg3 - 0x10), arg3);
00430a79          int32_t var_18_9 = InterlockedIncrement((arg2 - 0x10), arg2);
00430a82          InterlockedIncrement((arg1 - 0x10), arg1);
00430a8f          *(uint8_t*)((char*)var_4)[3] = MasterStringTableGen::s_pStringTableGen->vtable->AddString();
00430a3d      }
00430a3d      
00430aa8      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
00430ab0          **(uint32_t**)(arg1 - 0x14)(1);
00430ab0      
00430ac1      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00430aca          **(uint32_t**)(arg2 - 0x14)(1);
00430aca      
00430adb      if ((InterlockedDecrement((arg3 - 0x10)) == 0 && arg3 != 0x14))
00430ae3          **(uint32_t**)(arg3 - 0x14)(1);
00430ae3      
00430af8      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
00430b00          **(uint32_t**)(arg4 - 0x14)(1);
00430b00      
00430b15      if ((InterlockedDecrement((arg5 - 0x10)) == 0 && arg5 != 0x14))
00430b1d          **(uint32_t**)(arg5 - 0x14)(1);
00430b1d      
00430b1f      int32_t eax_12;
00430b1f      eax_12 = *(uint8_t*)((char*)var_4)[3];
00430b28      return eax_12;
00430a20  }

00430b29                             90 90 90 90 90 90 90                                                           .......

00430b30  void __thiscall RGBAColor::SetColor32(class RGBAColor* this, uint32_t const arg2)

00430b30  {
00430b36      uint32_t edx_1 = (arg2 >> 0x18);
00430b3f      long double x87_r7 = ((long double)edx_1);
00430b3f      
00430b43      if (edx_1 < 0)
00430b45          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
00430b45      
00430b56      uint32_t edx_4 = ((uint32_t)((int8_t)(arg2 >> 0x10)));
00430b5e      this->a = ((float)(x87_r7 * ((long double)0.00392156886f)));
00430b65      long double x87_r7_2 = ((long double)edx_4);
00430b65      
00430b69      if (edx_4 < 0)
00430b6b          x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
00430b6b      
00430b7c      uint32_t edx_7 = ((uint32_t)((int8_t)(arg2 >> 8)));
00430b84      this->r = ((float)(x87_r7_2 * ((long double)0.00392156886f)));
00430b8a      long double x87_r7_4 = ((long double)edx_7);
00430b8a      
00430b8e      if (edx_7 < 0)
00430b90          x87_r7_4 = (x87_r7_4 + ((long double)4.2949673e+09f));
00430b90      
00430b9c      uint32_t eax = (arg2 & 0xff);
00430ba7      this->g = ((float)(x87_r7_4 * ((long double)0.00392156886f)));
00430baa      long double x87_r7_6 = ((long double)eax);
00430baa      
00430bae      if (eax < 0)
00430bb0          x87_r7_6 = (x87_r7_6 + ((long double)4.2949673e+09f));
00430bb0      
00430bbc      this->b = ((float)(x87_r7_6 * ((long double)0.00392156886f)));
00430b30  }

00430bc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00430bd0  uint8_t CIme::CleanupPreferences()

00430bd0  {
00430bd5      UserPreferences::UnregisterPreference(&International_UseIME);
00430bdd      int32_t eax;
00430bdd      eax = 1;
00430bdf      return 1;
00430bd0  }


00430be0  uint8_t __fastcall CIme::InitPreferences()

00430be0  {
00430be0      void* ecx;
00430be0      void* var_4 = ecx;
00430beb      PStringBase<char>::PStringBase<char>(&var_4, "A flag to use IME");
00430c07      uint32_t* esi;
00430c07      UserPreferences::RegisterPreference(&CIme::g_UseIme, &International_UseIME, &var_4, nullptr, nullptr, 0, nullptr, esi);
00430c10      int32_t* esi_2 = ((char*)var_4 - 0x14);
00430c10      
00430c23      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00430c2b          **(uint32_t**)esi_2(1);
00430c2b      
00430c2d      CIme::g_bOSImeEnabled = 1;
00430c34      int32_t eax;
00430c34      eax = 1;
00430c38      return 1;
00430be0  }

00430c39                                                                             90 90 90 90 90 90 90                           .......

00430c40  void* __thiscall ICIDM::`scalar deleting destructor'(class ICIDM* this, uint32_t arg2)

00430c40  {
00430c48      this->vtable = 0x798268;
00430c48      
00430c4e      if ((arg2 & 1) != 0)
00430c51          operator delete(this);
00430c51      
00430c5c      return this;
00430c40  }

00430c5f                                                                                               90                                 .

00430c60  uint8_t __fastcall CInputManager::OnStartup(class CInputManager* this, int32_t arg2)

00430c60  {
00430c67      int32_t ecx;
00430c67      ecx = Device::m_bIsActiveApp;
00430c70      int32_t eax_1;
00430c70      int32_t edx;
00430c70      eax_1 = this->vtable->Activate(ecx);
00430c73      class ActionMap* m_action_map = this->m_action_map;
00430c73      
00430c7b      if (m_action_map != 0)
00430c7b      {
00430c7f          eax_1 = m_action_map->vtable->Release();
00430c82          this->m_action_map = nullptr;
00430c7b      }
00430c7b      
00430c8c      int32_t var_8_1 = 0x27;
00430c8e      int32_t var_c = 8;
00430c90      int32_t var_10 = 1;
00430c92      class ActionMap* eax_2 = DBObj::GetByEnum(eax_1, edx, m_action_map);
00430c9e      this->m_action_map = eax_2;
00430ca7      eax_2 = eax_2 != 0;
00430caa      return eax_2;
00430c60  }

00430cad                                         90 90 90                                                               ...

00430cb0  uint8_t __thiscall CInputManager::SetActionMap(class CInputManager* this, uint32_t arg2)

00430cb0  {
00430cb3      class ActionMap* m_action_map = this->m_action_map;
00430cbb      int32_t eax;
00430cbb      int32_t edx;
00430cbb      
00430cbb      if (m_action_map != 0)
00430cbb      {
00430cbf          eax = m_action_map->vtable->Release();
00430cc2          this->m_action_map = nullptr;
00430cbb      }
00430cbb      
00430cd0      int32_t var_8 = 0x27;
00430cd2      int32_t var_c = 8;
00430cd4      uint32_t var_10 = arg2;
00430cd5      class ActionMap* eax_2 = DBObj::GetByEnum(eax, edx, arg2);
00430ce1      this->m_action_map = eax_2;
00430cea      eax_2 = eax_2 != 0;
00430ced      return eax_2;
00430cb0  }


00430cf0  void __thiscall CInputManager::OnSwitchMouseMode(class CInputManager* this, uint8_t arg2)

00430cf0  {
00430cf4      this->m_fInMouseLookMode = arg2;
00430cf0  }

00430cfa                                                                                90 90 90 90 90 90                            ......

00430d00  uint8_t __thiscall CInputManager::CallKeyHitHandler(class CInputManager* this, class QualifiedControl const* arg2, uint32_t* arg3)

00430d00  {
00430d00      class CInputHandler* m_pKeyHitHandler = this->m_pKeyHitHandler;
00430d00      
00430d05      if (m_pKeyHitHandler != 0)
00430d09          /* jump -> m_pKeyHitHandler->vtable->KeyHitHandler */
00430d09      
00430d0c      int32_t eax;
00430d0c      eax = 0;
00430d0e      return 0;
00430d00  }

00430d11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00430d20  void __thiscall CInputManager::StartAction(class CInputManager* this, class InputEvent* arg2)

00430d20  {
00430d24      arg2->m_fStart = 1;
00430d2e      /* jump -> this->vtable->SendActionToListeners */
00430d20  }

00430d34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00430d40  void __fastcall InputEvent::InputEvent(class InputEvent* this)

00430d40  {
00430d44      this->m_InputAction = 0;
00430d46      this->m_InputMapID = 0;
00430d49      this->m_InputKey.m_key.__inner0 = 0xffffffff;
00430d50      this->m_InputKey.m_metamode = 0;
00430d53      this->m_InputKey.m_activation = 0;
00430d56      this->m_InputExtent = -2f;
00430d5d      this->m_InputTimestamp = 0;
00430d60      this->m_ToggleType = 0;
00430d63      this->m_timeActionBegan = 0f;
00430d66      *(uint32_t*)((char*)this->m_timeActionBegan)[4] = 0;
00430d69      this->m_cRepeatDelta = 0;
00430d6c      this->m_cRepeatTotal = 0;
00430d6f      this->m_pcCallback = nullptr;
00430d40  }

00430d73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00430d80  void __fastcall SmartArray<ActionState::SingleKeyInfo,1>::Reset(class SmartArray<ActionState::SingleKeyInfo,1>* this)

00430d80  {
00430d86      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00430d95      this->m_num = 0;
00430d95      
00430d9c      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00430d9c      {
00430da1          operator delete[](this->m_data);
00430da9          this->m_data = 0;
00430daf          this->m_sizeAndDeallocate = 0;
00430dba          return;
00430d9c      }
00430d9c      
00430dbe      if (this->m_data != 0)
00430dbe      {
00430dc0          int32_t ecx_1 = (m_sizeAndDeallocate & 0x7fffffff);
00430dc6          int32_t ecx_2 = (ecx_1 - 1);
00430dc6          
00430dc7          if ((ecx_1 - 1) >= 0)
00430dc7          {
00430de3              int32_t temp1_1;
00430de3              
00430de3              do
00430de3              {
00430dd2                  void* eax_2 = &this->m_data[ecx_2];
00430dd5                  temp1_1 = ecx_2;
00430dd5                  ecx_2 -= 1;
00430dda                  *(uint32_t*)eax_2 = 0xffffffff;
00430de0                  int32_t var_4;
00430de0                  *(uint32_t*)((char*)eax_2 + 4) = var_4;
00430de3              } while ((temp1_1 - 1) >= 0);
00430dc7          }
00430dbe      }
00430d80  }

00430dea                                90 90 90 90 90 90                                                            ......

00430df0  void __fastcall ActionState::GetExtent(class ActionState const* this)

00430df0  {
00430df0      class ActionState* this_1 = this;
00430df3      uint32_t m_num = this->m_rgKeys.m_num;
00430df7      int32_t edi = 0xffffffff;
00430dfc      float var_4 = -2f;
00430dfc      
00430e04      if (m_num != 0)
00430e04      {
00430e06          int32_t edx_1 = 0;
00430e06          
00430e0a          if (m_num > 0)
00430e0a          {
00430e0c              struct ActionState::SingleKeyInfo* m_data = this->m_rgKeys.m_data;
00430e0f              float* ecx = &m_data->extent;
00430e0f              
00430e31              do
00430e31              {
00430e14                  long double x87_r7_2 = fabsl(((long double)ADJ(ecx)->extent));
00430e16                  long double temp0_1 = ((long double)var_4);
00430e16                  (x87_r7_2 - temp0_1);
00430e16                  
00430e1f                  if ((*(uint8_t*)((char*)((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00430e1f                  {
00430e21                      var_4 = ((float)x87_r7_2);
00430e25                      edi = edx_1;
00430e1f                  }
00430e1f                  
00430e2b                  edx_1 += 1;
00430e2c                  ecx = &ecx[2];
00430e31              } while (edx_1 < m_num);
00430e31              
00430e35              if (edi >= 0)
00430e37                  m_data[edi].extent;
00430e0a          }
00430e04      }
00430df0  }

00430e4b                                   90 90 90 90 90                                                             .....

00430e50  void __thiscall InputEvent::InputEvent(class InputEvent* this, class ActionState const* arg2)

00430e50  {
00430e5d      this->m_InputAction = arg2->m_hashKey;
00430e5f      this->m_InputMapID = 0;
00430e64      this->m_InputKey.m_key.__inner0 = 0xffffffff;
00430e6b      this->m_InputKey.m_metamode = 0;
00430e6e      this->m_InputKey.m_activation = 0;
00430e76      this->m_InputExtent = ((float)ActionState::GetExtent(arg2));
00430e79      this->m_InputTimestamp = 0;
00430e7f      this->m_ToggleType = arg2->m_toggle;
00430e85      this->m_timeActionBegan = arg2->m_timeActionBegan;
00430e8b      *(uint32_t*)((char*)this->m_timeActionBegan)[4] = *(uint32_t*)((char*)arg2->m_timeActionBegan)[4];
00430e8e      this->m_cRepeatDelta = 1;
00430e98      this->m_cRepeatTotal = arg2->m_cRepeatCount;
00430e9f      this->m_pcCallback = arg2->m_pcCallback;
00430e50  }

00430ea9                             90 90 90 90 90 90 90                                                           .......

00430eb0  void* __thiscall IntrusiveHashTable<unsigned long,ActionState *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,ActionState *,1>* this, uint32_t arg2)

00430eb0  {
00430eb3      class ActionState** m_buckets = this->m_buckets;
00430ebb      this->vtable = 0x798330;
00430ebb      
00430ec1      if (m_buckets != &this->m_aInplaceBuckets)
00430ec4          operator delete[](m_buckets);
00430ec4      
00430ece      this->m_buckets = nullptr;
00430ed1      this->m_firstInterestingBucket = nullptr;
00430ed4      this->m_numBuckets = 0;
00430ed7      this->m_numElements = 0;
00430ed7      
00430edf      if ((arg2 & 1) != 0)
00430ee2          operator delete(this);
00430ee2      
00430eed      return this;
00430eb0  }


00430ef0  void __thiscall UserPreferences::RegisterPreference(class UserPreferences* this, float* arg2, class PStringBase<char> const* arg3, class PStringBase<char> const* arg4, void (* arg5)(class PStringBase<char> const*), uint32_t const arg6, class PStringBase<char>* arg7, uint32_t const* arg8)

00430ef0  {
00430ef3      float* esi = arg2;
00430ef3      
00430ef7      if (this != 0)
00430f16          GlobalRegistry::RegisterVariableInternal(this, GRVDataType_Float32, esi, arg3, arg4, arg5, arg6, arg7);
00430f16      
00430f1e      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00430f1e      
00430f25      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00430f25      {
00430f2c          void* eax_4 = operator new(0x8100);
00430f2c          
00430f36          if (eax_4 == 0)
00430f41              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00430f36          else
00430f3a              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_4);
00430f3a          
00430f43          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00430f25      }
00430f25      
00430f58      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, esi, &arg2) != 0)
00430f58      {
00430f60          void* eax_6 = *(uint32_t*)(*(uint32_t*)arg2 + 0x44)();
00430f60          
00430f65          if (eax_6 != 0)
00430f67              *(uint8_t*)((char*)eax_6 + 0x28) = 1;
00430f58      }
00430ef0  }

00430f6e                                            90 90                                                                ..

00430f70  uint8_t __thiscall SmartArray<ActionState::SingleKeyInfo,1>::grow(class SmartArray<ActionState::SingleKeyInfo,1>* this, uint32_t arg2)

00430f70  {
00430f7c      void* eax;
00430f7c      
00430f7c      if (arg2 >= this->m_num)
00430f7c      {
00430f8c          int32_t eax_2;
00430f8c          
00430f8c          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
00430f8c          {
00431018              eax_2 = 1;
0043101b              return 1;
00430f8c          }
00430f8c          
00430f94          if (arg2 == 0)
00430f94          {
00430f96              SmartArray<ActionState::SingleKeyInfo,1>::Reset(this);
00430f9d              int32_t eax_3;
00430f9d              eax_3 = 1;
00430fa0              return 1;
00430f94          }
00430f94          
00430fab          eax = operator new[]((arg2 << 3));
00430fab          
00430fb7          if (eax != 0)
00430fb7          {
00430fc2              `vector constructor iterator'(eax, 8, arg2, DiskDev::DiskDev);
00430fc2              
00430fca              if (this->m_data != 0)
00430fca              {
00430fcc                  uint32_t m_num = this->m_num;
00430fcf                  int32_t edx_1 = (m_num - 1);
00430fcf                  
00430fd0                  if ((m_num - 1) >= 0)
00430fd0                  {
00430fec                      int32_t temp2_1;
00430fec                      
00430fec                      do
00430fec                      {
00430fd3                          struct ActionState::SingleKeyInfo* m_data = this->m_data;
00430fd5                          int32_t* ecx_1 = (edx_1 << 3);
00430fe1                          temp2_1 = edx_1;
00430fe1                          edx_1 -= 1;
00430fe2                          *(uint32_t*)((char*)ecx_1 + eax) = *(uint32_t*)((char*)m_data + ecx_1);
00430fe8                          *(uint32_t*)(((char*)ecx_1 + eax) + 4) = *(uint32_t*)(&m_data->extent + ecx_1);
00430fec                      } while ((temp2_1 - 1) >= 0);
00430fd0                  }
00430fd0                  
00430ffe                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00431003                      operator delete[](this->m_data);
00430fca              }
00430fca              
00431011              this->m_data = eax;
00431013              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00431018              eax_2 = 1;
0043101b              return 1;
00430fb7          }
00430f7c      }
00430f7c      
00431020      eax = 0;
00431023      return 0;
00430f70  }

00431026                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00431030  uint8_t __thiscall List<CInputHandler *>::insert(class List<CInputHandler *>* this, class ListNode<CInputHandler *>* arg2, class CInputHandler** arg3)

00431030  {
00431035      void* eax = operator new(0xc);
00431035      
0043103f      if (eax == 0)
0043103f      {
0043106d          eax = 0;
00431070          return 0;
0043103f      }
0043103f      
00431047      *(uint32_t*)eax = *(uint32_t*)arg3;
00431049      *(uint32_t*)((char*)eax + 4) = 0;
00431050      *(uint32_t*)((char*)eax + 8) = 0;
00431050      
0043105c      if (this->_head == 0)
0043105c      {
0043105e          this->_head = eax;
00431061          this->_tail = eax;
00431064          this->_num_elements += 1;
00431067          eax = 1;
0043106a          return 1;
0043105c      }
0043105c      
00431077      *(uint32_t*)((char*)eax + 4) = arg2;
0043107d      *(uint32_t*)((char*)eax + 8) = arg2->prev;
00431080      class ListNode<CInputHandler *>* prev = arg2->prev;
00431080      
00431085      if (prev == 0)
00431085      {
00431096          this->_head = eax;
00431099          arg2->prev = eax;
0043109c          this->_num_elements += 1;
0043109f          eax = 1;
004310a2          return 1;
00431085      }
00431085      
00431087      prev->next = eax;
0043108a      arg2->prev = eax;
0043108d      this->_num_elements += 1;
00431090      eax = 1;
00431093      return 1;
00431030  }

004310a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004310b0  uint8_t __thiscall List<CInputManager::InputMapEntry>::push_back(class List<CInputManager::InputMapEntry>* this, struct CInputManager::InputMapEntry const* arg2)

004310b0  {
004310b5      void* eax = operator new(0x14);
004310b5      
004310c1      if (eax == 0)
004310c1      {
004310f7          eax = 0;
004310fa          return 0;
004310c1      }
004310c1      
004310cb      uint32_t* edi = eax;
004310cd      *(uint32_t*)edi = arg2->m_mapID;
004310d2      edi[1] = arg2->m_pcCallback;
004310d8      edi[2] = arg2->m_nPriority;
004310db      *(uint32_t*)((char*)eax + 0xc) = 0;
004310de      *(uint32_t*)((char*)eax + 0x10) = 0;
004310de      
004310e6      if (this->_head == 0)
004310e6      {
004310e8          this->_head = eax;
004310eb          this->_tail = eax;
004310ee          this->_num_elements += 1;
004310f1          eax = 1;
004310f4          return 1;
004310e6      }
004310e6      
004310fd      class ListNode<CInputManager::InputMapEntry>* _tail = this->_tail;
00431100      _tail->next = eax;
00431103      *(uint32_t*)((char*)eax + 0x10) = _tail;
00431106      this->_tail = eax;
00431109      this->_num_elements += 1;
0043110c      eax = 1;
0043110f      return 1;
004310b0  }

00431112                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00431120  uint8_t __thiscall List<CInputManager::InputMapEntry>::insert(class List<CInputManager::InputMapEntry>* this, class ListNode<CInputManager::InputMapEntry>* arg2, struct CInputManager::InputMapEntry const* arg3)

00431120  {
00431125      void* eax = operator new(0x14);
00431125      
0043112f      if (eax == 0)
0043112f      {
0043116d          eax = 0;
00431170          return 0;
0043112f      }
0043112f      
00431138      uint32_t* edx = eax;
0043113a      *(uint32_t*)edx = arg3->m_mapID;
0043113f      edx[1] = arg3->m_pcCallback;
00431145      edx[2] = arg3->m_nPriority;
00431148      *(uint32_t*)((char*)eax + 0xc) = 0;
0043114f      *(uint32_t*)((char*)eax + 0x10) = 0;
0043114f      
0043115c      if (this->_head == 0)
0043115c      {
0043115e          this->_head = eax;
00431161          this->_tail = eax;
00431164          this->_num_elements += 1;
00431167          eax = 1;
0043116a          return 1;
0043115c      }
0043115c      
00431177      *(uint32_t*)((char*)eax + 0xc) = arg2;
0043117d      *(uint32_t*)((char*)eax + 0x10) = arg2->prev;
00431180      class ListNode<CInputManager::InputMapEntry>* prev = arg2->prev;
00431180      
00431185      if (prev == 0)
00431185      {
00431196          this->_head = eax;
00431199          arg2->prev = eax;
0043119c          this->_num_elements += 1;
0043119f          eax = 1;
004311a2          return 1;
00431185      }
00431185      
00431187      prev->next = eax;
0043118a      arg2->prev = eax;
0043118d      this->_num_elements += 1;
00431190      eax = 1;
00431193      return 1;
00431120  }

004311a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004311b0  void __thiscall CInputManager::CallCharacterHandler(class CInputManager* this, wchar16 arg2)

004311b0  {
004311bb      if ((this->m_characterList._head != 0 && this->m_textMode == 1))
004311bb      {
004311be          class ListNode<CInputHandler *>* i = this->m_characterList._head;
004311be          
004311c3          while (i != 0)
004311c3          {
004311d2              struct CInputHandler::VTable* vtable = i->data->vtable;
004311d4              i = i->next;
004311d8              vtable->CharacterHandler(arg2);
004311c3          }
004311bb      }
004311b0  }

004311e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004311f0  void __thiscall CInputManager::CallMouseMoveHandler(class CInputManager* this, int32_t arg2, int32_t arg3)

004311f0  {
004311f1      class ListNode<CInputHandler *>* i = this->m_mouseMoveList._head;
004311f1      
004311f6      while (i != 0)
004311f6      {
00431204          struct CInputHandler::VTable* vtable = i->data->vtable;
00431206          i = i->next;
0043120b          vtable->MouseMoveHandler(arg2, arg3);
004311f6      }
004311f0  }

00431218                                                                          90 90 90 90 90 90 90 90                          ........

00431220  void __thiscall CInputManager::CallMouseLookHandler(class CInputManager* this, int32_t arg2, int32_t arg3)

00431220  {
00431221      class ListNode<CInputHandler *>* i = this->m_mouseLookList._head;
00431221      
00431226      while (i != 0)
00431226      {
00431234          struct CInputHandler::VTable* vtable = i->data->vtable;
00431236          i = i->next;
0043123b          vtable->MouseLookHandler(arg2, arg3);
00431226      }
00431220  }

00431248                          90 90 90 90 90 90 90 90                                                          ........

00431250  void __thiscall CInputManager::CallFocusSwitchHandler(class CInputManager* this, uint8_t arg2)

00431250  {
00431253      bool cond:0 = this->m_focusSwitchList._head == 0;
00431256      int32_t ebx = arg2;
0043125a      this->m_lastFocus = ebx;
0043125a      
0043125d      if (!(cond:0))
0043125d      {
00431266          int32_t eax;
00431266          eax = this->m_textMode != 0;
0043126e          int32_t eax_1;
0043126e          eax_1 = this->m_fWantMouseLookMode;
00431273          int32_t edi_2;
00431273          
00431273          if (eax_1 == 0)
0043127a              edi_2 = ((eax + 1) | 0x10);
00431273          else
00431275              edi_2 = ((eax + 1) | 4);
00431275          
0043127d          class ListNode<CInputHandler *>* i = this->m_focusSwitchList._head;
0043127d          
00431282          while (i != 0)
00431282          {
00431286              struct CInputHandler::VTable* vtable = i->data->vtable;
00431288              i = i->next;
0043128d              vtable->FocusSwitchHandler(ebx, edi_2);
00431282          }
0043125d      }
00431250  }

0043129a                                                                                90 90 90 90 90 90                            ......

004312a0  void __thiscall CInputManager::SendActionToListeners(class CInputManager* this, class InputEvent* arg2)

004312a0  {
004312a8      class IInputActionCallback* m_pcCallback = arg2->m_pcCallback;
004312ad      uint8_t eax;
004312ad      
004312ad      if (m_pcCallback != 0)
004312b2          eax = m_pcCallback->vtable->OnAction(arg2);
004312b2      
004312be      if (((m_pcCallback == 0 || eax == 0) && this->m_lastFocus != 0))
004312be      {
004312c0          class ListNode<CInputHandler *>* i = this->m_actionList._head;
004312c0          
004312c5          while (i != 0)
004312c5          {
004312c9              struct CInputHandler::VTable* vtable = i->data->vtable;
004312cb              i = i->next;
004312cf              vtable->ActionHandler(arg2);
004312c5          }
004312be      }
004312a0  }

004312da                                                                                90 90 90 90 90 90                            ......

004312e0  uint8_t __thiscall List<CInputManager::InputMapEntry>::remove(class List<CInputManager::InputMapEntry>* this, class ListNode<CInputManager::InputMapEntry>* arg2)

004312e0  {
004312eb      if (arg2 != 0)
004312eb      {
004312ed          class ListNode<CInputManager::InputMapEntry>* _head = this->_head;
004312ed          
004312f2          if (_head != 0)
004312f2          {
004312fc              class ListNode<CInputManager::InputMapEntry>* next;
004312fc              
004312fc              if (arg2 != _head)
004312fc              {
0043130d                  arg2->prev->next = arg2->next;
00431317                  next = arg2->next;
00431317                  
0043131d                  if (next == 0)
0043132a                      this->_tail = arg2->prev;
0043131d                  else
00431322                      next->prev = arg2->prev;
004312fc              }
004312fc              else
004312fc              {
004312fe                  next = arg2->next;
00431303                  this->_head = next;
00431303                  
00431306                  if (next != 0)
00431322                      next->prev = nullptr;
00431306                  else
00431308                      this->_tail = nullptr;
004312fc              }
0043132e              operator delete(arg2);
0043133a              this->_num_elements -= 1;
0043133d              uint32_t eax_2;
0043133d              eax_2 = 1;
00431340              return 1;
004312f2          }
004312eb      }
004312eb      
004312f4      class ListNode<CInputManager::InputMapEntry>* eax;
004312f4      eax = 0;
004312f7      return 0;
004312e0  }

00431343           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00431350  uint8_t __thiscall List<CInputHandler *>::remove(class List<CInputHandler *>* this, class ListNode<CInputHandler *>* arg2)

00431350  {
0043135b      if (arg2 != 0)
0043135b      {
0043135d          class ListNode<CInputHandler *>* _head = this->_head;
0043135d          
00431362          if (_head != 0)
00431362          {
0043136c              class ListNode<CInputHandler *>* next;
0043136c              
0043136c              if (arg2 != _head)
0043136c              {
0043137d                  arg2->prev->next = arg2->next;
00431387                  next = arg2->next;
00431387                  
0043138d                  if (next == 0)
0043139a                      this->_tail = arg2->prev;
0043138d                  else
00431392                      next->prev = arg2->prev;
0043136c              }
0043136c              else
0043136c              {
0043136e                  next = arg2->next;
00431373                  this->_head = next;
00431373                  
00431376                  if (next != 0)
00431392                      next->prev = nullptr;
00431376                  else
00431378                      this->_tail = nullptr;
0043136c              }
0043139e              operator delete(arg2);
004313aa              this->_num_elements -= 1;
004313ad              uint32_t eax_2;
004313ad              eax_2 = 1;
004313b0              return 1;
00431362          }
0043135b      }
0043135b      
00431364      class ListNode<CInputHandler *>* eax;
00431364      eax = 0;
00431367      return 0;
00431350  }

004313b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004313c0  void __thiscall CInputManager::SetMouseLookMode(class CInputManager* this, uint8_t arg2)

004313c0  {
004313c0      int32_t eax_1 = arg2;
004313c0      
004313ca      if (eax_1 != this->m_fWantMouseLookMode)
004313ca      {
004313cc          struct CInputManager::VTable* vtable = this->vtable;
004313d1          this->m_fWantMouseLookMode = eax_1;
004313d4          vtable->OnSwitchMouseMode(eax_1);
004313ca      }
004313ca      
004313e2      CInputManager::CallFocusSwitchHandler(this, this->m_lastFocus);
004313c0  }

004313eb                                   90 90 90 90 90                                                             .....

004313f0  void __thiscall CInputManager::SetTextMode(class CInputManager* this, uint8_t arg2)

004313f0  {
004313f0      int32_t eax_1 = arg2;
004313f0      
004313fa      if (eax_1 != this->m_textMode)
004313fa      {
004313fc          struct CInputManager::VTable* vtable = this->vtable;
00431401          this->m_textMode = eax_1;
00431404          vtable->OnSwitchTextMode(eax_1);
004313fa      }
004313fa      
00431412      CInputManager::CallFocusSwitchHandler(this, this->m_lastFocus);
004313f0  }

0043141b                                                                                   90 90 90 90 90                             .....

00431420  void __thiscall ActionState::RemoveKeyPress(class ActionState* this, class InputEvent* arg2)

00431420  {
00431428      int32_t i_2 = 0xffffffff;
0043142b      int32_t ebx;
0043142b      ebx = 0;
0043142d      int32_t i = 0;
00431432      int32_t i_1 = 0xffffffff;
00431436      float var_10 = -2f;
00431436      
0043143e      if (this->m_rgKeys.m_num > 0)
0043143e      {
00431447          struct ActionState::SingleKeyInfo* m_data_1 = this->m_rgKeys.m_data;
00431447          
00431482          do
00431482          {
00431458              if (arg2->m_InputKey.m_key.__inner0 != m_data_1->key.__inner0)
00431458              {
00431463                  long double x87_r7_2 = fabsl(((long double)m_data_1->extent));
00431465                  long double temp1_1 = ((long double)var_10);
00431465                  (x87_r7_2 - temp1_1);
00431469                  union eax_3;
00431469                  *(uint16_t*)((char*)eax_3 + 0) = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
00431469                  
0043146e                  if ((*(uint8_t*)((char*)eax_3 + 1) & 0x41) == 0)
0043146e                  {
00431470                      var_10 = ((float)x87_r7_2);
00431474                      i_1 = i;
0043146e                  }
00431458              }
00431458              else
00431458              {
0043145a                  ebx = 1;
0043145c                  i_2 = i;
00431458              }
00431458              
0043147c              i += 1;
0043147d              m_data_1 = &m_data_1[1];
00431482          } while (i < this->m_rgKeys.m_num);
0043143e      }
0043143e      
0043148c      if (ebx != 0)
0043148c      {
00431494          if (i_1 < 0)
004314c3              this->m_pcCallback = nullptr;
00431494          else
00431494          {
0043149d              long double x87_r7_4 = fabsl(((long double)this->m_rgKeys.m_data[i_2].extent));
0043149f              long double x87_r6_1 = ((long double)var_10);
004314a3              (x87_r6_1 - x87_r7_4);
004314a5              int32_t eax_4;
004314a5              eax_4 = ((((x87_r6_1 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_4) ? 1 : 0) << 0xe) | 0))));
004314a7              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004314a7              
004314aa              if (!(p_1))
004314b4                  arg2->m_InputExtent = var_10;
00431494          }
00431494          
004314ca          uint32_t m_num = this->m_rgKeys.m_num;
004314ca          
004314cf          if (i_2 < m_num)
004314cf          {
004314d6              this->m_rgKeys.m_num = (m_num - 1);
004314d6              
004314d9              if (i_2 != (m_num - 1))
004314d9              {
004314db                  struct ActionState::SingleKeyInfo* m_data = this->m_rgKeys.m_data;
004314e1                  m_data[i_2].key.__inner0 = m_data[(m_num - 1)].key.__inner0;
004314e8                  m_data[i_2].extent = m_data[(m_num - 1)].extent;
004314f6                  void* eax_7 = &this->m_rgKeys.m_data[this->m_rgKeys.m_num];
004314f9                  *(uint32_t*)eax_7 = 0xffffffff;
004314ff                  int32_t var_4;
004314ff                  *(uint32_t*)((char*)eax_7 + 4) = var_4;
004314d9              }
004314cf          }
0043148c      }
00431420  }

0043150d                                         90 90 90                                                               ...

00431510  uint8_t __thiscall List<CInputManager::InputMapEntry>::insert_sort(class List<CInputManager::InputMapEntry>* this, struct CInputManager::InputMapEntry const* arg2)

00431510  {
00431510      class ListNode<CInputManager::InputMapEntry>* eax = this->_head;
00431510      
0043151a      if (eax != 0)
0043151a      {
00431523          while (arg2->m_nPriority < eax->data.m_nPriority)
00431523          {
00431525              eax = eax->next;
00431525              
0043152a              if (eax == 0)
00431533                  return List<CInputManager::InputMapEntry>::push_back(this, arg2);
00431523          }
00431523          
00431538          if (eax != 0)
0043154c              return List<CInputManager::InputMapEntry>::insert(this, eax, arg2);
0043151a      }
0043151a      
00431541      return List<CInputManager::InputMapEntry>::push_back(this, arg2);
00431510  }

0043154f                                               90                                                                 .

00431550  uint8_t __thiscall List<CInputManager::InputMapEntry>::contains(class List<CInputManager::InputMapEntry> const* this, struct CInputManager::InputMapEntry const* arg2)

00431550  {
00431556      class ListNode<CInputManager::InputMapEntry>* i;
00431556      
00431556      for (i = this->_head; i != 0; i = i->next)
00431556      {
00431572          if ((i->data.m_mapID == arg2->m_mapID && (i->data.m_pcCallback == arg2->m_pcCallback && i->data.m_nPriority == arg2->m_nPriority)))
00431572              goto label_431584;
00431556      }
00431556      
0043157b      i = nullptr;
00431584  label_431584:
00431584      i = i != 0;
00431587      return i;
00431550  }

0043158a                                90 90 90 90 90 90                                                            ......

00431590  void __fastcall List<CInputManager::InputMapEntry>::flush(class List<CInputManager::InputMapEntry>* this)

00431590  {
00431596      while (true)
00431596      {
00431596          class ListNode<CInputManager::InputMapEntry>* _head = this->_head;
00431596          
0043159b          if (_head == 0)
0043159b              break;
0043159b          
0043159d          class ListNode<CInputManager::InputMapEntry>* next = _head->next;
004315a2          this->_head = next;
004315a2          
004315a5          if (next == 0)
004315ac              this->_tail = nullptr;
004315a5          else
004315a7              next->prev = nullptr;
004315a7          
004315b1          if (_head != 0)
004315b4              operator delete(_head);
004315b4          
004315bc          this->_num_elements -= 1;
00431596      }
00431590  }

004315c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004315d0  uint8_t __thiscall CInputManager::UnregisterInputHandler(class CInputManager* this, class CInputHandler* arg2, uint32_t arg3)

004315d0  {
004315d1      int32_t ebx;
004315d1      ebx = arg3;
004315e0      int32_t* _head;
004315e0      
004315e0      if ((ebx & 1) != 0)
004315e0      {
004315e2          _head = this->m_actionList._head;
004315e8          class ListNode<CInputHandler *>* _head_1 = nullptr;
004315e8          
004315ec          if (_head != 0)
004315ec          {
004315fb              do
004315fb              {
004315f2                  if (*(uint32_t*)_head == arg2)
004315f4                      _head_1 = _head;
004315f4                  
004315f6                  _head = _head[1];
004315fb              } while (_head != 0);
004315fb              
004315ff              if (_head_1 != 0)
00431602                  List<CInputHandler *>::remove(&this->m_actionList, _head_1);
004315ec          }
004315e0      }
004315e0      
0043160a      if ((ebx & 2) != 0)
0043160a      {
0043160c          _head = this->m_characterList._head;
00431612          class ListNode<CInputHandler *>* _head_2 = nullptr;
00431612          
00431616          if (_head != 0)
00431616          {
00431623              do
00431623              {
0043161a                  if (*(uint32_t*)_head == arg2)
0043161c                      _head_2 = _head;
0043161c                  
0043161e                  _head = _head[1];
00431623              } while (_head != 0);
00431623              
00431627              if (_head_2 != 0)
0043162a                  List<CInputHandler *>::remove(&this->m_characterList, _head_2);
00431616          }
0043160a      }
0043160a      
00431632      if ((ebx & 0x10) != 0)
00431632      {
00431634          _head = this->m_mouseMoveList._head;
0043163a          class ListNode<CInputHandler *>* _head_3 = nullptr;
0043163a          
0043163e          if (_head != 0)
0043163e          {
0043164b              do
0043164b              {
00431642                  if (*(uint32_t*)_head == arg2)
00431644                      _head_3 = _head;
00431644                  
00431646                  _head = _head[1];
0043164b              } while (_head != 0);
0043164b              
0043164f              if (_head_3 != 0)
00431652                  List<CInputHandler *>::remove(&this->m_mouseMoveList, _head_3);
0043163e          }
00431632      }
00431632      
0043165a      if ((ebx & 4) != 0)
0043165a      {
0043165c          _head = this->m_mouseLookList._head;
00431662          class ListNode<CInputHandler *>* _head_4 = nullptr;
00431662          
00431666          if (_head != 0)
00431666          {
00431673              do
00431673              {
0043166a                  if (*(uint32_t*)_head == arg2)
0043166c                      _head_4 = _head;
0043166c                  
0043166e                  _head = _head[1];
00431673              } while (_head != 0);
00431673              
00431677              if (_head_4 != 0)
0043167a                  List<CInputHandler *>::remove(&this->m_mouseLookList, _head_4);
00431666          }
0043165a      }
0043165a      
00431682      if ((ebx & 8) != 0)
00431682      {
00431684          _head = this->m_focusSwitchList._head;
0043168a          class ListNode<CInputHandler *>* _head_5 = nullptr;
0043168a          
0043168e          if (_head != 0)
0043168e          {
0043169b              do
0043169b              {
00431692                  if (*(uint32_t*)_head == arg2)
00431694                      _head_5 = _head;
00431694                  
00431696                  _head = _head[1];
0043169b              } while (_head != 0);
0043169b              
0043169f              if (_head_5 != 0)
004316a2                  List<CInputHandler *>::remove(&this->m_focusSwitchList, _head_5);
0043168e          }
00431682      }
00431682      
004316aa      if ((ebx & 0x20) != 0)
004316aa      {
004316af          if (this->m_pKeyHitHandler != arg2)
004316af          {
004316b3              _head = 0;
004316b6              return 0;
004316af          }
004316af          
004316b9          this->m_pKeyHitHandler = nullptr;
004316aa      }
004316aa      
004316c2      _head = 1;
004316c5      return 1;
004315d0  }

004316c8                          90 90 90 90 90 90 90 90                                                          ........

004316d0  uint8_t __thiscall CInputManager::UnregisterInputMap(class CInputManager* this, uint32_t arg2, class IInputActionCallback* arg3)

004316d0  {
004316db      int32_t* _head = this->m_inputMapList._head;
004316e2      uint8_t result = 0;
004316e2      
004316e6      while (_head != 0)
004316e6      {
004316ef          if ((*(uint32_t*)_head == arg2 && _head[1] == arg3))
004316ef          {
004316f1              int32_t* _head_1 = _head;
004316f3              _head = _head[3];
004316f9              List<CInputManager::InputMapEntry>::remove(&this->m_inputMapList, _head_1);
004316fe              result = 1;
00431700              continue;
004316ef          }
004316ef          
00431702          _head = _head[3];
004316e6      }
004316e6      
0043170b      return result;
004316d0  }

0043170e                                            90 90                                                                ..

00431710  void __thiscall CInputManager::UnregisterCallback(class CInputManager* this, class IInputActionCallback* arg2)

00431710  {
00431724      uint32_t m_mapID;
00431724      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashActionStates, &m_mapID);
00431729      void* i_4;
00431729      void* i_2 = i_4;
0043172d      class IInputActionCallback* ebp = arg2;
0043172d      
00431735      if (i_2 != 0)
00431735      {
00431737          uint32_t m_mapID_1 = m_mapID;
0043173b          void** var_8;
0043173b          void** ecx_1 = var_8;
0043173b          
00431743          while (true)
00431743          {
00431743              if (*(uint32_t*)((char*)i_2 + 0x18) == ebp)
00431745                  *(uint32_t*)((char*)i_2 + 0x18) = 0;
00431745              
00431748              i_2 = *(uint32_t*)((char*)i_2 + 4);
00431748              
0043174d              if (i_2 == 0)
0043174d              {
00431763                  void* i;
00431763                  
00431763                  do
00431763                  {
00431758                      ecx_1 = &ecx_1[1];
00431758                      
0043175d                      if (ecx_1 == (*(uint32_t*)(m_mapID_1 + 0x60) + (*(uint32_t*)(m_mapID_1 + 0x68) << 2)))
0043175d                          goto label_43176b;
0043175d                      
0043175f                      i = *(uint32_t*)ecx_1;
00431763                  } while (i == 0);
00431763                  
00431765                  i_2 = i;
00431765                  
00431769                  if (i_2 == 0)
00431769                      break;
0043174d              }
00431743          }
00431735      }
00431735      
0043176b  label_43176b:
0043176b      class ListNode<CInputManager::InputMapEntry>* i_1 = this->m_inputMapList._head;
0043176b      
00431772      while (i_1 != 0)
00431772      {
0043177f          bool cond:0_1 = i_1->data.m_pcCallback != ebp;
00431781          int32_t m_nPriority = i_1->data.m_nPriority;
00431784          m_mapID = i_1->data.m_mapID;
00431788          int32_t m_nPriority_1 = m_nPriority;
00431788          
0043178c          if (cond:0_1)
004317fc              i_1 = i_1->next;
0043178c          else
0043178c          {
0043178e              class ListNode<CInputManager::InputMapEntry>* i_3 = i_1;
00431792              class ListNode<CInputManager::InputMapEntry>** eax_3 = &i_1->next;
00431795              i_1 = ADJ(eax_3)->next;
00431795              
00431797              if (i_3 != 0)
00431797              {
00431799                  class ListNode<CInputManager::InputMapEntry>* _head = this->m_inputMapList._head;
00431799                  
0043179e                  if (_head != 0)
0043179e                  {
004317a2                      if (i_3 != _head)
004317a2                      {
004317c9                          i_3->prev->next = ADJ(eax_3)->next;
004317cf                          class ListNode<CInputManager::InputMapEntry>* next = ADJ(eax_3)->next;
004317cf                          
004317d3                          if (next == 0)
004317e0                              this->m_inputMapList._tail = i_3->prev;
004317d3                          else
004317d8                              next->prev = i_3->prev;
004317d8                          
004317e4                          operator delete(i_3);
004317ec                          ebp = arg2;
004317f4                          this->m_inputMapList._num_elements -= 1;
004317a2                      }
004317a2                      else
004317a2                      {
004317a8                          this->m_inputMapList._head = i_1;
004317a8                          
004317ab                          if (i_1 == 0)
004317b2                              this->m_inputMapList._tail = nullptr;
004317ab                          else
004317ad                              i_1->prev = nullptr;
004317ad                          
004317b6                          operator delete(i_3);
004317c2                          this->m_inputMapList._num_elements -= 1;
004317a2                      }
0043179e                  }
00431797              }
0043178c          }
00431772      }
00431710  }

0043180e                                            90 90                                                                ..

00431810  void __fastcall CInputManager::RegisterPreferences(class CInputManager* this)

00431810  {
00431810      class CInputManager* this_1 = this;
0043181f      PStringBase<char>::PStringBase<char>(&this_1, "Mouse sensitivity when user is i…");
0043183c      uint32_t* edi;
0043183c      UserPreferences::RegisterPreference(&this->m_MouseLookSensitivity, &Input_MouseLookSensitivity, &this_1, nullptr, nullptr, 0, nullptr, edi);
0043184b      void* __offset(CInputManager, -0x14) edi_2 = ((char*)this_1 - 0x14);
0043184b      
0043185a      if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
00431862          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
00431862      
0043186d      PStringBase<char>::PStringBase<char>(&this_1, "Mouse look smoothing amount.");
0043188a      UserPreferences::RegisterPreference(&this->m_MouseLookSmoothingAmount, &Input_MouseLookSmoothingAmount, &this_1, nullptr, nullptr, 0, nullptr);
00431893      void* __offset(CInputManager, -0x14) edi_4 = ((char*)this_1 - 0x14);
00431893      
004318a2      if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
004318aa          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
004318aa      
004318b5      PStringBase<char>::PStringBase<char>(&this_1, "Invert mouse look vertical rotat…");
004318d2      UserPreferences::RegisterPreference(&this->m_InvertMouseLookYAxis, &Input_InvertMouseLookYAxis, &this_1, nullptr, nullptr, 0, nullptr);
004318db      void* __offset(CInputManager, -0x14) edi_6 = ((char*)this_1 - 0x14);
004318db      
004318ea      if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
004318f2          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_6) + -0x14)(1);
004318f2      
004318fd      PStringBase<char>::PStringBase<char>(&this_1, "Turn your character with the cam…");
0043191a      UserPreferences::RegisterPreference(&this->m_UseMouseTurning, &Input_UseMouseTurning, &this_1, nullptr, nullptr, 0, nullptr);
00431923      void* __offset(CInputManager, -0x14) esi_2 = ((char*)this_1 - 0x14);
00431923      
00431932      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0043193a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00431810  }

00431941     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00431950  uint8_t __thiscall CInputManager::IsActionInProgress(class CInputManager* this, uint32_t arg2)

00431950  {
00431968      int32_t* eax_3 = this->m_hashActionStates.m_buckets[(COMBINE(0, arg2) % this->m_hashActionStates.m_numBuckets)];
0043196a      bool cond:0 = eax_3 != 0;
0043196a      
0043196c      if (eax_3 != 0)
0043196c      {
00431972          while (*(uint32_t*)eax_3 != arg2)
00431972          {
00431974              eax_3 = eax_3[1];
00431974              
00431979              if (eax_3 == 0)
00431979                  break;
00431972          }
00431972          
0043197b          cond:0 = eax_3 != 0;
0043196c      }
0043196c      
0043197d      eax_3 = cond:0;
00431981      return eax_3;
00431950  }

00431984              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00431990  uint8_t __thiscall SmartArray<ActionState::SingleKeyInfo,1>::add(class SmartArray<ActionState::SingleKeyInfo,1>* this, struct ActionState::SingleKeyInfo const* arg2)

00431990  {
00431999      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00431999      
004319a0      if (this->m_num >= eax_1)
004319a0      {
004319ae          uint8_t result = SmartArray<ActionState::SingleKeyInfo,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
004319ae          
004319b5          if (result == 0)
004319b8              return result;
004319a0      }
004319a0      
004319c0      void* eax_5 = &this->m_data[this->m_num];
004319c9      *(uint32_t*)eax_5 = arg2->key.__inner0;
004319ce      *(uint32_t*)((char*)eax_5 + 4) = arg2->extent;
004319d1      this->m_num += 1;
004319d4      eax_5 = 1;
004319d7      return 1;
00431990  }

004319da                                                                                90 90 90 90 90 90                            ......

004319e0  void* __thiscall List<CInputHandler *>::`scalar deleting destructor'(class List<CInputHandler *>* this, uint32_t arg2)

004319e0  {
004319e3      this->vtable = 0x798318;
004319e9      List<StringTableMetaLanguage::Node const *>::flush(this);
004319e9      
004319f3      if ((arg2 & 1) != 0)
004319f6          operator delete(this);
004319f6      
00431a01      return this;
004319e0  }

00431a04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00431a10  void* __thiscall List<CInputManager::InputMapEntry>::`scalar deleting destructor'(class List<CInputManager::InputMapEntry>* this, uint32_t arg2)

00431a10  {
00431a13      this->vtable = 0x79831c;
00431a19      List<CInputManager::InputMapEntry>::flush(this);
00431a19      
00431a23      if ((arg2 & 1) != 0)
00431a26          operator delete(this);
00431a26      
00431a31      return this;
00431a10  }

00431a34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00431a40  void __fastcall CInputManager::~CInputManager(class CInputManager* this)

00431a40  {
00431a49      this->vtable = 0x7983e8;
00431a4f      UserPreferences::UnregisterPreference(&Input_MouseLookSensitivity);
00431a59      UserPreferences::UnregisterPreference(&Input_MouseLookSmoothingAmount);
00431a63      UserPreferences::UnregisterPreference(&Input_InvertMouseLookYAxis);
00431a6d      UserPreferences::UnregisterPreference(&Input_UseMouseTurning);
00431a72      class ActionMap* m_action_map = this->m_action_map;
00431a72      
00431a7f      if (m_action_map != 0)
00431a7f      {
00431a81          m_action_map->vtable->Release();
00431a86          this->m_action_map = nullptr;
00431a7f      }
00431a7f      
00431a8c      class ActionState** m_buckets = this->m_hashActionStates.m_buckets;
00431a9a      this->m_hashActionStates.vtable = 0x798330;
00431a9a      
00431aa4      if (m_buckets != &this->m_hashActionStates.m_aInplaceBuckets)
00431aa7          operator delete[](m_buckets);
00431aa7      
00431ab2      this->m_hashActionStates.m_buckets = nullptr;
00431ab8      this->m_hashActionStates.m_firstInterestingBucket = nullptr;
00431abe      this->m_hashActionStates.m_numBuckets = 0;
00431ac4      this->m_hashActionStates.m_numElements = 0;
00431aaf      this->m_inputMapList.vtable = 0x79831c;
00431ad0      List<CInputManager::InputMapEntry>::flush(&this->m_inputMapList);
00431ad5      this->m_focusSwitchList.vtable = 0x798318;
00431ade      List<StringTableMetaLanguage::Node const *>::flush(&this->m_focusSwitchList);
00431ae3      this->m_mouseMoveList.vtable = 0x798318;
00431aec      List<StringTableMetaLanguage::Node const *>::flush(&this->m_mouseMoveList);
00431af1      this->m_mouseLookList.vtable = 0x798318;
00431afa      List<StringTableMetaLanguage::Node const *>::flush(&this->m_mouseLookList);
00431aff      this->m_characterList.vtable = 0x798318;
00431b08      List<StringTableMetaLanguage::Node const *>::flush(&this->m_characterList);
00431b0d      this->m_actionList.vtable = 0x798318;
00431b16      List<StringTableMetaLanguage::Node const *>::flush(&this->m_actionList);
00431b1c      this->vtable = 0x798268;
00431a40  }

00431b24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00431b30  uint8_t __fastcall CInputManager::GetMouseLookMode(class CInputManager* this)

00431b30  {
00431b33      return this->m_fWantMouseLookMode;
00431b30  }

00431b34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00431b40  uint8_t __fastcall CInputManager::GetTextMode(class CInputManager* this)

00431b40  {
00431b43      return this->m_textMode;
00431b40  }

00431b44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00431b50  class ActionMap const* __fastcall CInputManager::GetActionMap(class CInputManager const* this)

00431b50  {
00431b56      return this->m_action_map;
00431b50  }

00431b57                                                                       90 90 90 90 90 90 90 90 90                         .........

00431b60  double __fastcall CInputManager::GetLastInputTimestamp(class CInputManager* this)

00431b60  {
00431b63      return ((int64_t)((long double)this->m_ttLastInputEvent));
00431b60  }

00431b64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00431b70  uint8_t __thiscall CInputManager::RegisterInputMap(class CInputManager* this, uint32_t arg2, class IInputActionCallback* arg3, int32_t arg4)

00431b70  {
00431b83      uint32_t var_c = arg2;
00431b8e      class IInputActionCallback* var_8 = arg3;
00431b92      int32_t var_4 = arg4;
00431b92      
00431b9d      if (List<CInputManager::InputMapEntry>::contains(&this->m_inputMapList, &var_c) == 0)
00431bb8          return List<CInputManager::InputMapEntry>::insert_sort(&this->m_inputMapList, &var_c);
00431bb8      
00431ba5      return 0;
00431b70  }

00431bbb                                                                                   90 90 90 90 90                             .....

00431bc0  void __fastcall CInputManager::UseTime(class CInputManager* this)

00431bc0  {
00431bc0      int32_t ebp;
00431bc0      int32_t var_4 = ebp;
00431bde      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
00431be5      int32_t var_ac = *(int32_t*)((char*)Timer::cur_time + 4);
00431bf2      void* var_bc = nullptr;
00431bf6      int32_t var_b8 = 0;
00431bfa      int32_t i_2 = 0;
00431bfe      SmartArray<unsigned long,1>::grow(&var_bc, this->m_hashActionStates.m_numElements);
00431c0e      void* __return;
00431c0e      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashActionStates, &__return);
00431c13      int32_t* i_4;
00431c13      int32_t* i_3 = i_4;
00431c13      
00431c19      if (i_3 != 0)
00431c19      {
00431c1b          int32_t** var_a0;
00431c1b          int32_t** edi_1 = var_a0;
00431c1b          
00431c20          while (true)
00431c20          {
00431c20              int32_t eax = i_3[5];
00431c20              
00431c2b              if ((eax >= 4 && eax <= 5))
00431c2b              {
00431c35                  int32_t eax_2 = (var_b8 & 0x7fffffff);
00431c35                  
00431c3c                  if (i_2 < eax_2)
00431c3c                  {
00431c61                      *(uint32_t*)((char*)var_bc + (i_2 << 2)) = *(uint32_t*)i_3;
00431c64                      i_2 += 1;
00431c3c                  }
00431c3c                  else if (SmartArray<unsigned long,1>::grow(&var_bc, SmartArray<unsigned long,1>::get_new_size(&var_bc, (eax_2 + 1))) != 0)
00431c55                  {
00431c61                      *(uint32_t*)((char*)var_bc + (i_2 << 2)) = *(uint32_t*)i_3;
00431c64                      i_2 += 1;
00431c55                  }
00431c2b              }
00431c2b              
00431c68              i_3 = i_3[1];
00431c68              
00431c6d              if (i_3 == 0)
00431c6d              {
00431c6f                  void* __return_1 = __return;
00431c8b                  int32_t* i;
00431c8b                  
00431c8b                  do
00431c8b                  {
00431c80                      edi_1 = &edi_1[1];
00431c80                      
00431c85                      if (edi_1 == (*(uint32_t*)((char*)__return_1 + 0x60) + (*(uint32_t*)((char*)__return_1 + 0x68) << 2)))
00431c85                          goto label_431c93;
00431c85                      
00431c87                      i = *(uint32_t*)edi_1;
00431c8b                  } while (i == 0);
00431c8b                  
00431c8d                  i_3 = i;
00431c8d                  
00431c91                  if (i_3 == 0)
00431c91                      break;
00431c6d              }
00431c20          }
00431c19      }
00431c19      
00431c93  label_431c93:
00431c93      int32_t i_1 = i_2;
00431c93      
00431c99      while (i_1 > 0)
00431c99      {
00431ca4          int32_t ecx_8 = *(uint32_t*)(((char*)var_bc + (i_1 << 2)) - 4);
00431ca8          i_1 -= 1;
00431ca8          
00431cc1          for (int32_t* j = this->m_hashActionStates.m_buckets[(COMBINE(0, ecx_8) % this->m_hashActionStates.m_numBuckets)]; j != 0; j = j[1])
00431cc1          {
00431cc9              if (*(uint32_t*)j == ecx_8)
00431cc9              {
00431cd9                  if (j != 0)
00431cd9                  {
00431cdf                      int32_t eax_12 = j[5];
00431cdf                      
00431ce5                      if (eax_12 == 4)
00431ce5                      {
00431d6c                          long double x87_r7_3 = (((long double)CInputManager::sm_timeKeyRepeatDelay) + ((long double)*(uint64_t*)((char*)j + 8)));
00431d6f                          long double x87_r6_1 = ((long double)Timer::cur_time_1);
00431d73                          (x87_r6_1 - x87_r7_3);
00431d75                          int32_t eax_13;
00431d75                          eax_13 = ((((x87_r6_1 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_3) ? 1 : 0) << 0xe) | 0x3800))));
00431d75                          
00431d7a                          if ((*(uint8_t*)((char*)eax_13)[1] & 1) == 0)
00431d7a                          {
00431d82                              CInputManager::sm_timeKeyRepeatSpeed;
00431d88                              int32_t eax_16 = _ftol2();
00431d8f                              int32_t ecx_13 = j[4];
00431d8f                              
00431d95                              if ((eax_16 + 1) > ecx_13)
00431d95                              {
00431da3                                  j[4] = (eax_16 + 1);
00431da6                                  void var_50;
00431da6                                  InputEvent::InputEvent(&var_50, j);
00431db8                                  int32_t var_20_1 = ((eax_16 + 1) - ecx_13);
00431dbf                                  char var_30_1 = 1;
00431dab                                  this->vtable->SendActionToListeners(&var_50);
00431d95                              }
00431d7a                          }
00431ce5                      }
00431ce5                      else if (eax_12 == 5)
00431ce8                      {
00431cf5                          int32_t edx_6 = (j[4] + 1);
00431cf6                          int32_t var_98 = *(uint32_t*)j;
00431cfc                          j[4] = edx_6;
00431d01                          int32_t var_94_1 = 0;
00431d05                          int32_t var_90_1 = 0xffffffff;
00431d0d                          int32_t var_8c_1 = 0;
00431d11                          int32_t var_88_1 = 0;
00431d1a                          float var_84_1 = ((float)ActionState::GetExtent(j));
00431d27                          int32_t var_6c_1 = j[3];
00431d2f                          int32_t var_70_1 = j[2];
00431d36                          int32_t var_58_1 = j[6];
00431d3d                          int32_t var_80_1 = 0;
00431d45                          int32_t var_7c_1 = 5;
00431d4d                          int32_t var_68_1 = 1;
00431d55                          int32_t var_64_1 = edx_6;
00431d59                          char var_78_1 = 1;
00431d33                          this->vtable->SendActionToListeners(&var_98);
00431ce8                      }
00431cd9                  }
00431cd9                  
00431cd9                  break;
00431cc9              }
00431cc1          }
00431c99      }
00431c99      
00431de9      if ((var_b8 & 0x80000000) == 0x80000000)
00431df0          operator delete[](var_bc);
00431df0      
00431bcd      var_4;
00431bc0  }


00431e00  void __thiscall ActionState::AddKeyPress(class ActionState* this, class InputEvent* arg2)

00431e00  {
00431e07      uint32_t m_num = this->m_rgKeys.m_num;
00431e11      union __inner0;
00431e11      
00431e11      if (m_num == 0)
00431e11      {
00431e13          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
00431e1e          *(uint32_t*)((char*)arg2->m_timeActionBegan)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00431e21          arg2->m_timeActionBegan = Timer::cur_time_1;
00431e26          this->m_timeActionBegan = Timer::cur_time_1;
00431e2c          *(uint32_t*)((char*)this->m_timeActionBegan)[4] = *(uint32_t*)((char*)arg2->m_timeActionBegan)[4];
00431e32          this->m_toggle = arg2->m_ToggleType;
00431e3f          float var_c = ((float)((long double)arg2->m_InputExtent));
00431e47          __inner0 = arg2->m_InputKey.m_key.__inner0;
00431e4b          SmartArray<ActionState::SingleKeyInfo,1>::add(&this->m_rgKeys, &__inner0);
00431e53          this->m_pcCallback = arg2->m_pcCallback;
00431e5e          return;
00431e11      }
00431e11      
00431e61      int32_t ebx;
00431e61      ebx = 0;
00431e63      int32_t i = 0;
00431e67      __inner0 = 0xc0000000;
00431e67      
00431e6f      if (m_num > 0)
00431e6f      {
00431eb2          do
00431eb2          {
00431e71              struct ActionState::SingleKeyInfo* m_data = this->m_rgKeys.m_data;
00431e78              void* ecx_4 = &m_data[i];
00431e7b              long double x87_r7_3 = fabsl(((long double)m_data[i].extent));
00431e7d              long double temp1_1 = ((long double)__inner0);
00431e7d              (x87_r7_3 - temp1_1);
00431e81              m_data = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
00431e81              
00431e86              if ((*(uint8_t*)((char*)m_data)[1] & 0x41) == 0)
00431e88                  __inner0 = ((float)x87_r7_3);
00431e88              
00431e95              if (arg2->m_InputKey.m_key.__inner0 == *(uint32_t*)ecx_4)
00431e95              {
00431e97                  long double x87_r7_4 = ((long double)*(uint32_t*)((char*)ecx_4 + 4));
00431e9a                  long double temp2_1 = ((long double)arg2->m_InputExtent);
00431e9a                  (x87_r7_4 - temp2_1);
00431e9d                  union eax_2;
00431e9d                  *(uint16_t*)((char*)eax_2 + 0) = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00431e9f                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00431e9f                  
00431ea2                  if (p_1)
00431ea7                      *(uint32_t*)((char*)ecx_4 + 4) = arg2->m_InputExtent;
00431ea7                  
00431eaa                  ebx = 1;
00431e95              }
00431e95              
00431eaf              i += 1;
00431eb2          } while (i < this->m_rgKeys.m_num);
00431e6f      }
00431e6f      
00431eb6      if ((m_num <= 0 || ebx == 0))
00431eb6      {
00431ec1          union __inner0_1 = arg2->m_InputKey.m_key.__inner0;
00431ec7          int32_t eax_6 = (this->m_rgKeys.m_sizeAndDeallocate & 0x7fffffff);
00431ece          float var_4_1 = ((float)((long double)arg2->m_InputExtent));
00431ed2          uint8_t eax_9;
00431ed2          
00431ed2          if (this->m_rgKeys.m_num >= eax_6)
00431ee0              eax_9 = SmartArray<ActionState::SingleKeyInfo,1>::grow(&this->m_rgKeys, SmartArray<unsigned long,1>::get_new_size(&this->m_rgKeys, (eax_6 + 1)));
00431ee0          
00431ee7          if ((this->m_rgKeys.m_num < eax_6 || eax_9 != 0))
00431ee7          {
00431eee              union { uint32_t m_dwKey; union __bitfield0; }* eax_10 = &this->m_rgKeys.m_data[this->m_rgKeys.m_num];
00431ef5              *(uint32_t*)eax_10 = __inner0_1;
00431ef7              eax_10[1] = var_4_1;
00431ec4              this->m_rgKeys.m_num += 1;
00431ee7          }
00431eb6      }
00431eb6      
00431f06      (((long double)__inner0) - fabsl(((long double)arg2->m_InputExtent)));
00431f0a      /* unimplemented  {test ah, 0x5} */;
00431e00  }

00431f22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00431f30  uint8_t __fastcall IntrusiveHashTable<unsigned long,ActionState *,1>::grow(class IntrusiveHashTable<unsigned long,ActionState *,1>* this)

00431f30  {
00431f30      class IntrusiveHashTable<unsigned long,ActionState *,1>* m_numBuckets = this;
00431f32      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00431f3e      m_numBuckets = this->m_numBuckets;
00431f55      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00431f55      
00431f5f      if (eax_2 != bucketSizesEnd_1)
00431f68          eax_2 = &eax_2[1];
00431f5f      else
00431f5f      {
00431f61          eax_2 -= 4;
00431f61          
00431f66          if (eax_2 != bucketSizesEnd_1)
00431f68              eax_2 = &eax_2[1];
00431f5f      }
00431f5f      
00431f78      return IntrusiveHashTable<unsigned long,ActionState *,1>::resize_internal(this, *(uint32_t*)eax_2);
00431f30  }

00431f79                                                                             90 90 90 90 90 90 90                           .......

00431f80  void* __thiscall CInputManager::`scalar deleting destructor'(class CInputManager* this, uint32_t arg2)

00431f80  {
00431f83      CInputManager::~CInputManager(this);
00431f83      
00431f8d      if ((arg2 & 1) != 0)
00431f90          operator delete(this);
00431f90      
00431f9b      return this;
00431f80  }

00431f9e                                                                                            90 90                                ..

00431fa0  uint8_t __thiscall CInputManager::RegisterInputHandler(class CInputManager* this, class CInputHandler* arg2, uint32_t arg3)

00431fa0  {
00431fa1      int32_t ebx;
00431fa1      ebx = arg3;
00431fb0      int32_t* m_pKeyHitHandler;
00431fb0      
00431fb0      if ((ebx & 1) != 0)
00431fb0      {
00431fb2          class ListNode<CInputHandler *>* _head = this->m_actionList._head;
00431fb8          m_pKeyHitHandler = _head;
00431fbc          arg3 = arg2;
00431fbc          
00431fc0          if (m_pKeyHitHandler == 0)
00431fc0          {
00431fd3          label_431fd3:
00431fd3              List<CInputHandler *>::insert(&this->m_actionList, _head, &arg3);
00431fc0          }
00431fc0          else
00431fc0          {
00431fc4              while (*(uint32_t*)m_pKeyHitHandler != arg2)
00431fc4              {
00431fc6                  m_pKeyHitHandler = m_pKeyHitHandler[1];
00431fc6                  
00431fcb                  if (m_pKeyHitHandler == 0)
00431fcb                      goto label_431fd3;
00431fc4              }
00431fc0          }
00431fb0      }
00431fb0      
00431fdb      if ((ebx & 2) != 0)
00431fdb      {
00431fdd          class ListNode<CInputHandler *>* _head_1 = this->m_characterList._head;
00431fe3          m_pKeyHitHandler = _head_1;
00431fe7          arg3 = arg2;
00431fe7          
00431feb          if (m_pKeyHitHandler == 0)
00431feb          {
00432001          label_432001:
00432001              List<CInputHandler *>::insert(&this->m_characterList, _head_1, &arg3);
00431feb          }
00431feb          else
00431feb          {
00431ff2              while (*(uint32_t*)m_pKeyHitHandler != arg2)
00431ff2              {
00431ff4                  m_pKeyHitHandler = m_pKeyHitHandler[1];
00431ff4                  
00431ff9                  if (m_pKeyHitHandler == 0)
00431ff9                      goto label_432001;
00431ff2              }
00431feb          }
00431fdb      }
00431fdb      
00432009      if ((ebx & 0x10) != 0)
00432009      {
0043200b          class ListNode<CInputHandler *>* _head_2 = this->m_mouseMoveList._head;
00432011          m_pKeyHitHandler = _head_2;
00432015          arg3 = arg2;
00432015          
00432019          if (m_pKeyHitHandler == 0)
00432019          {
00432031          label_432031:
00432031              List<CInputHandler *>::insert(&this->m_mouseMoveList, _head_2, &arg3);
00432019          }
00432019          else
00432019          {
00432022              while (*(uint32_t*)m_pKeyHitHandler != arg2)
00432022              {
00432024                  m_pKeyHitHandler = m_pKeyHitHandler[1];
00432024                  
00432029                  if (m_pKeyHitHandler == 0)
00432029                      goto label_432031;
00432022              }
00432019          }
00432009      }
00432009      
00432039      if ((ebx & 4) != 0)
00432039      {
0043203b          class ListNode<CInputHandler *>* _head_3 = this->m_mouseLookList._head;
00432041          m_pKeyHitHandler = _head_3;
00432045          arg3 = arg2;
00432045          
00432049          if (m_pKeyHitHandler == 0)
00432049          {
00432061          label_432061:
00432061              List<CInputHandler *>::insert(&this->m_mouseLookList, _head_3, &arg3);
00432049          }
00432049          else
00432049          {
00432052              while (*(uint32_t*)m_pKeyHitHandler != arg2)
00432052              {
00432054                  m_pKeyHitHandler = m_pKeyHitHandler[1];
00432054                  
00432059                  if (m_pKeyHitHandler == 0)
00432059                      goto label_432061;
00432052              }
00432049          }
00432039      }
00432039      
00432069      if ((ebx & 8) != 0)
00432069      {
0043206b          class ListNode<CInputHandler *>* _head_4 = this->m_focusSwitchList._head;
00432071          m_pKeyHitHandler = _head_4;
00432075          arg3 = arg2;
00432075          
00432079          if (m_pKeyHitHandler == 0)
00432079          {
00432091          label_432091:
00432091              List<CInputHandler *>::insert(&this->m_focusSwitchList, _head_4, &arg3);
00432079          }
00432079          else
00432079          {
00432082              while (*(uint32_t*)m_pKeyHitHandler != arg2)
00432082              {
00432084                  m_pKeyHitHandler = m_pKeyHitHandler[1];
00432084                  
00432089                  if (m_pKeyHitHandler == 0)
00432089                      goto label_432091;
00432082              }
00432079          }
00432069      }
00432069      
00432099      if ((ebx & 0x20) != 0)
00432099      {
0043209b          m_pKeyHitHandler = this->m_pKeyHitHandler;
0043209b          
004320a4          if ((m_pKeyHitHandler != 0 && m_pKeyHitHandler != arg2))
004320a4          {
004320a8              m_pKeyHitHandler = 0;
004320ab              return 0;
004320a4          }
004320a4          
004320ae          this->m_pKeyHitHandler = arg2;
00432099      }
00432099      
004320b3      m_pKeyHitHandler = 1;
004320b6      return 1;
00431fa0  }

0043201d                                                                                         8d 49 00                               .I.
0043204d                                         8d 49 00                                                               .I.
0043207d                                                                                         8d 49 00                               .I.
004320b9                                                                             90 90 90 90 90 90 90                           .......

004320c0  void __thiscall IntrusiveHashTable<unsigned long,ActionState *,1>::IntrusiveHashTable<unsigned long,ActionState *,1>(class IntrusiveHashTable<unsigned long,ActionState *,1>* this, uint32_t arg2)

004320c0  {
004320cb      arg2 = arg2;
004320cf      uint8_t edx = ((int8_t)arg2);
004320d3      this->m_buckets = nullptr;
004320d6      this->m_firstInterestingBucket = nullptr;
004320d9      this->m_numBuckets = 0;
004320dc      this->m_numElements = 0;
004320e0      this->vtable = 0x798330;
004320e6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004320f9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004320f9      
00432103      if (eax == bucketSizesEnd_1)
00432105          eax -= 4;
00432105      
00432108      uint32_t eax_1 = *(uint32_t*)eax;
0043210d      this->m_numBuckets = eax_1;
0043210d      
00432110      if (eax_1 > 0x17)
00432126          this->m_buckets = operator new[]((eax_1 << 2));
00432110      else
00432115          this->m_buckets = &this->m_aInplaceBuckets;
00432115      
0043212c      class ActionState** m_buckets = this->m_buckets;
0043212f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00432135      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00432146      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004320c0  }

0043214f                                               90                                                                 .

00432150  uint8_t __thiscall IntrusiveHashTable<unsigned long,ActionState *,1>::resize_internal(class IntrusiveHashTable<unsigned long,ActionState *,1>* this, uint32_t arg2)

00432150  {
00432151      uint32_t ebp = arg2;
00432151      
0043215b      if (ebp == this->m_numBuckets)
0043215b      {
0043215e          int32_t eax;
0043215e          eax = 0;
00432161          return 0;
0043215b      }
0043215b      
00432169      int32_t* i_1 = nullptr;
00432169      
0043216d      while (this->m_numElements != 0)
0043216d      {
00432176          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0043217c          int32_t* i_2;
0043217c          int32_t* m_firstInterestingBucket_2;
0043217c          
0043217c          if (this->m_firstInterestingBucket == ecx_1)
0043217c          {
00432192          label_432192:
00432192              m_firstInterestingBucket_2 = nullptr;
00432194              i_2 = nullptr;
0043217c          }
0043217c          else
0043217c          {
00432180              while (true)
00432180              {
00432180                  class ActionState** m_firstInterestingBucket = this->m_firstInterestingBucket;
00432180                  
00432186                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00432186                  {
00432198                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0043219b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0043219d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0043219d                      break;
00432186                  }
00432186                  
0043218d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0043218d                  
00432190                  if (&m_firstInterestingBucket[1] == ecx_1)
00432190                      goto label_432192;
00432180              }
0043217c          }
0043217c          
0043219f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0043219f          
004321a3          if (eax_4 == i_2)
004321b5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004321a3          else
004321a3          {
004321ac              void* edx_1;
004321ac              
004321ac              do
004321ac              {
004321a5                  edx_1 = eax_4;
004321a7                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
004321ac              } while (eax_4 != i_2);
004321ac              
004321b0              if (edx_1 != 0)
004321bc                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
004321b0              else
004321b5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004321a3          }
004321a3          
004321bf          this->m_numElements -= 1;
004321c2          i_2[1] = i_1;
004321ca          i_1 = i_2;
0043216d      }
0043216d      
004321ce      class ActionState** m_buckets = this->m_buckets;
004321ce      
004321d6      if (m_buckets != &this->m_aInplaceBuckets)
004321d9          operator delete[](m_buckets);
004321d9      
004321e6      this->m_buckets = nullptr;
004321e9      this->m_firstInterestingBucket = nullptr;
004321ec      this->m_numBuckets = 0;
004321ef      this->m_numElements = 0;
004321f2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
004321f9      void* eax_7;
004321f9      
004321f9      if (i_1 != 0)
004321f9      {
0043227b          int32_t* i;
0043227b          
0043227b          do
0043227b          {
00432200              uint32_t m_numBuckets = this->m_numBuckets;
00432206              i = i_1[1];
00432206              
0043220f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0043220f              {
00432211                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00432218                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0043221e                  arg2 = m_numBuckets;
0043222e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0043222e                  
00432238                  if (eax_8 != bucketSizesEnd_1)
00432241                      eax_8 = &eax_8[1];
00432238                  else
00432238                  {
0043223a                      eax_8 -= 4;
0043223a                      
0043223f                      if (eax_8 != bucketSizesEnd_1)
00432241                          eax_8 = &eax_8[1];
00432238                  }
00432238                  
00432249                  IntrusiveHashTable<unsigned long,ActionState *,1>::resize_internal(this, *(uint32_t*)eax_8);
0043220f              }
0043220f              
00432252              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
00432255              class ActionState** m_buckets_1 = this->m_buckets;
0043225b              i_1[1] = m_buckets_1[temp1_1];
0043225e              m_buckets_1[temp1_1] = i_1;
00432264              eax_7 = &m_buckets_1[temp1_1];
00432264              
00432269              if (eax_7 < this->m_firstInterestingBucket)
0043226b                  this->m_firstInterestingBucket = eax_7;
0043226b              
00432276              this->m_numElements += 1;
00432279              i_1 = i;
0043227b          } while (i != 0);
004321f9      }
004321f9      
00432280      eax_7 = 1;
00432283      return 1;
00432150  }

00432286                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00432290  void __fastcall CInputManager::CInputManager(class CInputManager* this)

00432290  {
00432299      this->vtable = 0x7983e8;
0043229f      this->m_ttLastInputEvent = 0f;
004322a2      *(uint32_t*)((char*)this->m_ttLastInputEvent)[4] = 0;
004322a5      this->m_fWantMouseLookMode = 0;
004322a8      this->m_fInMouseLookMode = 0;
004322ab      this->m_textMode = 0;
004322ae      this->m_lastFocus = 0;
004322b1      this->m_actionList._head = nullptr;
004322b4      this->m_actionList._tail = nullptr;
004322b7      this->m_actionList._num_elements = 0;
004322bf      this->m_actionList.vtable = 0x798318;
004322c2      this->m_characterList.vtable = 0x798318;
004322c5      this->m_characterList._head = nullptr;
004322c8      this->m_characterList._tail = nullptr;
004322cb      this->m_characterList._num_elements = 0;
004322ce      this->m_mouseLookList.vtable = 0x798318;
004322d1      this->m_mouseLookList._head = nullptr;
004322d4      this->m_mouseLookList._tail = nullptr;
004322d7      this->m_mouseLookList._num_elements = 0;
004322da      this->m_mouseMoveList.vtable = 0x798318;
004322dd      this->m_mouseMoveList._head = nullptr;
004322e0      this->m_mouseMoveList._tail = nullptr;
004322e3      this->m_mouseMoveList._num_elements = 0;
004322e6      this->m_focusSwitchList.vtable = 0x798318;
004322e9      this->m_focusSwitchList._head = nullptr;
004322ec      this->m_focusSwitchList._tail = nullptr;
004322ef      this->m_focusSwitchList._num_elements = 0;
004322f2      this->m_inputMapList.vtable = 0x79831c;
004322f9      this->m_inputMapList._head = nullptr;
004322fc      this->m_inputMapList._tail = nullptr;
004322ff      this->m_inputMapList._num_elements = 0;
0043230b      this->m_pKeyHitHandler = nullptr;
0043230e      this->m_MouseLookSensitivity = 0.25f;
00432318      this->m_MouseLookSmoothingAmount = 0f;
0043231e      this->m_InvertMouseLookYAxis = 0;
00432324      this->m_UseMouseTurning = 0;
0043232a      this->m_action_map = nullptr;
00432330      IntrusiveHashTable<unsigned long,ActionState *,1>::IntrusiveHashTable<unsigned long,ActionState *,1>(&this->m_hashActionStates, 0xa);
00432337      CInputManager::RegisterPreferences(this);
0043234f      int32_t pvParam;
0043234f      
0043234f      if (SystemParametersInfoA(SPI_GETKEYBOARDDELAY, 0, &pvParam, 0) != 0)
0043234f      {
00432355          long double x87_r7_1 = ((long double)pvParam);
00432355          
0043235b          if (pvParam < 0)
0043235d              x87_r7_1 = (x87_r7_1 + ((long double)4294967296.0));
0043235d          
0043236f          CInputManager::sm_timeKeyRepeatDelay = ((double)((x87_r7_1 + ((long double)1.0)) * ((long double)0.25)));
0043234f      }
0043234f      
00432382      if (SystemParametersInfoA(SPI_GETKEYBOARDSPEED, 0, &pvParam, 0) != 0)
00432382      {
00432384          int32_t pvParam_1 = pvParam;
00432384          
0043238b          if (pvParam_1 > 0x1f)
0043238b          {
00432391              (*(uint32_t*)CInputManager::sm_timeKeyRepeatSpeed) = 1.14437421e-28f;
0043239b              *(int32_t*)((char*)CInputManager::sm_timeKeyRepeatSpeed + 4) = 1.25833333f;
004323a9              return;
0043238b          }
0043238b          
004323ac          if (pvParam_1 > 0)
004323ac          {
004323b4              long double x87_r7_4 = ((long double)pvParam_1);
004323b4              
004323b8              if (pvParam_1 < 0)
004323ba                  x87_r7_4 = (x87_r7_4 + ((long double)4294967296.0));
004323ba              
004323d1              CInputManager::sm_timeKeyRepeatSpeed = ((double)(((long double)0.40000000000000002) - (x87_r7_4 * ((long double)0.011827956989247313))));
004323da              return;
004323ac          }
004323ac          
004323db          (*(uint32_t*)CInputManager::sm_timeKeyRepeatSpeed) = -1.58818684e-23f;
004323e5          *(int32_t*)((char*)CInputManager::sm_timeKeyRepeatSpeed + 4) = 1.69999993f;
00432382      }
00432290  }

004323f8                                                                          90 90 90 90 90 90 90 90                          ........

00432400  uint8_t __thiscall IntrusiveHashTable<unsigned long,ActionState *,1>::add(class IntrusiveHashTable<unsigned long,ActionState *,1>* this, class ActionState* arg2)

00432400  {
00432408      uint32_t m_hashKey = arg2->m_hashKey;
0043240b      uint32_t m_numBuckets = this->m_numBuckets;
0043240b      
0043241e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0043241e      {
00432422          if (*(uint32_t*)i == m_hashKey)
00432422          {
0043246e              if (i == 0)
0043246e                  break;
0043246e              
00432472              i = 0;
00432475              return 0;
00432422          }
0043241e      }
0043241e      
00432434      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00432438          IntrusiveHashTable<unsigned long,ActionState *,1>::grow(this);
00432438      
00432441      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
00432444      class ActionState** m_buckets = this->m_buckets;
0043244a      arg2->m_hashNext = m_buckets[temp1_1];
0043244d      m_buckets[temp1_1] = arg2;
00432453      class ActionState** eax_4 = &m_buckets[temp1_1];
00432453      
00432458      if (eax_4 < this->m_firstInterestingBucket)
0043245a          this->m_firstInterestingBucket = eax_4;
0043245a      
00432462      this->m_numElements += 1;
00432466      uint32_t eax_6;
00432466      eax_6 = 1;
00432469      return 1;
00432400  }

00432478                                                                          90 90 90 90 90 90 90 90                          ........

00432480  void __thiscall CInputManager::ToggleActionKey(class CInputManager* this, class InputEvent* arg2)

00432480  {
00432491      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_hashActionStates, arg2);
00432491      
0043249c      if (eax != 0)
0043249c      {
0043249e          arg2->m_fStart = 0;
004324a1          this->vtable->SendActionToListeners(arg2);
004324a1          
004324bb          if ((*(int32_t*)((char*)eax + 0x20) & 0x80000000) == 0x80000000)
004324c1              operator delete[](*(int32_t*)((char*)eax + 0x1c));
004324c1          
004324ca          operator delete(eax);
004324d6          return;
0043249c      }
0043249c      
004324db      void* eax_2 = operator new(0x28);
004324db      
004324e5      if (eax_2 == 0)
00432505          eax_2 = nullptr;
004324e5      else
004324e5      {
004324e9          *(uint32_t*)eax_2 = arg2->m_InputAction;
004324eb          *(uint32_t*)((char*)eax_2 + 4) = 0;
004324ee          *(uint32_t*)((char*)eax_2 + 8) = 0;
004324f1          *(uint32_t*)((char*)eax_2 + 0xc) = 0;
004324f4          *(uint32_t*)((char*)eax_2 + 0x10) = 0;
004324f7          *(uint32_t*)((char*)eax_2 + 0x18) = 0;
004324fa          *(uint32_t*)((char*)eax_2 + 0x1c) = 0;
004324fd          *(uint32_t*)((char*)eax_2 + 0x20) = 0;
00432500          *(uint32_t*)((char*)eax_2 + 0x24) = 0;
004324e5      }
004324e5      
0043250e      IntrusiveHashTable<unsigned long,ActionState *,1>::add(&this->m_hashActionStates, eax_2);
00432513      arg2->m_fStart = 1;
00432517      this->vtable->SendActionToListeners(arg2);
00432480  }

00432529                             90 90 90 90 90 90 90                                                           .......

00432530  void __thiscall CInputManager::DeactivateActionKey(class CInputManager* this, class InputEvent* arg2)

00432530  {
0043253a      uint32_t m_InputAction = arg2->m_InputAction;
0043254c      int32_t* esi = this->m_hashActionStates.m_buckets[(COMBINE(0, m_InputAction) % this->m_hashActionStates.m_numBuckets)];
0043254c      
00432551      if (esi != 0)
00432551      {
00432555          while (*(uint32_t*)esi != m_InputAction)
00432555          {
00432557              esi = esi[1];
00432557              
0043255c              if (esi == 0)
00432562                  return;
00432555          }
00432555          
00432567          if (esi != 0)
00432567          {
0043256c              int32_t eax_2;
0043256c              int80_t st0_1;
0043256c              st0_1 = ActionState::RemoveKeyPress(esi, arg2);
0043256c              
00432572              if (eax_2 == 1)
00432572              {
004325bb                  arg2->m_fStart = 1;
004325bf                  this->vtable->SendActionToListeners(arg2);
00432572              }
00432572              else if (eax_2 == 3)
00432577              {
0043257c                  IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_hashActionStates, arg2);
00432581                  arg2->m_fStart = 0;
00432585                  this->vtable->SendActionToListeners(arg2);
00432585                  
0043259d                  if ((esi[8] & 0x80000000) == 0x80000000)
004325a3                      operator delete[](esi[7]);
004325a3                  
004325ac                  operator delete(esi);
00432577              }
00432567          }
00432551      }
00432530  }

004325d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004325e0  void __fastcall CInputManager::TurnOffRunLock(class CInputManager* this)

004325e0  {
004325f2      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_hashActionStates, &MovementRunLock);
004325f2      
004325fb      if (eax != 0)
004325fb      {
00432602          void var_48;
00432602          InputEvent::InputEvent(&var_48, eax);
00432610          int32_t var_34_1 = 0;
00432618          char var_28_1 = 0;
00432607          this->vtable->SendActionToListeners(&var_48);
00432607          
00432632          if ((*(int32_t*)((char*)eax + 0x20) & 0x80000000) == 0x80000000)
00432638              operator delete[](*(int32_t*)((char*)eax + 0x1c));
00432638          
00432641          operator delete(eax);
004325fb      }
004325e0  }

0043264f                                               90                                                                 .

00432650  void __thiscall CInputManager::ActivateActionKey(class CInputManager* this, class InputEvent* arg2)

00432650  {
00432650      class CInputManager* this_1 = this;
00432663      uint32_t m_InputAction_1 = arg2->m_InputAction;
00432675      int32_t* eax_3 = this->m_hashActionStates.m_buckets[(COMBINE(0, m_InputAction_1) % this->m_hashActionStates.m_numBuckets)];
00432675      
00432679      if (eax_3 != 0)
00432679      {
00432682          while (*(uint32_t*)eax_3 != m_InputAction_1)
00432682          {
00432684              eax_3 = eax_3[1];
00432684              
00432689              if (eax_3 == 0)
00432689                  break;
00432682          }
00432679      }
00432679      
0043268d      int32_t* esi = eax_3;
0043268d      
0043268f      if (eax_3 == 0)
0043268f      {
00432693          void* eax_4 = operator new(0x28);
00432693          
0043269d          if (eax_4 == 0)
004326c0              esi = nullptr;
0043269d          else
0043269d          {
004326a2              *(uint32_t*)eax_4 = arg2->m_InputAction;
004326a4              *(uint32_t*)((char*)eax_4 + 4) = 0;
004326a7              *(uint32_t*)((char*)eax_4 + 8) = 0;
004326aa              *(uint32_t*)((char*)eax_4 + 0xc) = 0;
004326ad              *(uint32_t*)((char*)eax_4 + 0x10) = 0;
004326b0              *(uint32_t*)((char*)eax_4 + 0x18) = 0;
004326b3              *(uint32_t*)((char*)eax_4 + 0x1c) = 0;
004326b6              *(uint32_t*)((char*)eax_4 + 0x20) = 0;
004326b9              *(uint32_t*)((char*)eax_4 + 0x24) = 0;
004326bc              esi = eax_4;
0043269d          }
0043269d          
004326c5          IntrusiveHashTable<unsigned long,ActionState *,1>::add(&this->m_hashActionStates, esi);
0043268f      }
0043268f      
004326cd      int32_t eax_5;
004326cd      int80_t st0;
004326cd      st0 = ActionState::AddKeyPress(esi, arg2);
004326cd      
004326d4      if (eax_5 == 0)
004326d4      {
004326f4          uint32_t m_InputAction = arg2->m_InputAction;
004326f4          
00432704          if (((m_InputAction == 0x29 || m_InputAction == 0x2a) || m_InputAction == 0x2b))
00432704          {
0043270c              CInputManager::TurnOffRunLock(this);
004326dd              arg2->m_fStart = 1;
004326e1              this->vtable->SendActionToListeners(arg2);
00432704          }
00432704          else
00432704          {
004326d9          label_4326d9:
004326dd              arg2->m_fStart = 1;
004326e1              this->vtable->SendActionToListeners(arg2);
00432704          }
004326d4      }
004326d4      else if (eax_5 == 1)
004326d7          goto label_4326d9;
00432650  }

0043267d                                                                                         8d 49 00                               .I.
00432713                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00432720  void __thiscall CInputManager::FireActionEvent(class CInputManager* this, class InputEvent* arg2)

00432720  {
00432723      class ActionMap* m_action_map = this->m_action_map;
00432723      
0043272b      if (m_action_map != 0)
0043272b      {
00432739          uint32_t m_InputAction = arg2->m_InputAction;
0043273b          uint32_t m_InputMapID = arg2->m_InputMapID;
0043273d          uint32_t eax_2 = ActionMap::GetToggleType(m_action_map, m_InputAction, m_InputAction);
00432744          arg2->m_ToggleType = eax_2;
00432744          
00432747          if (eax_2 == 0)
00432749              arg2->m_ToggleType = 3;
00432749          
00432753          (((long double)arg2->m_InputExtent) - ((long double)0f));
0043275b          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0043275e          uint32_t m_ToggleType = arg2->m_ToggleType;
0043275e          
00432761          if (!(p_1))
00432761          {
00432766              if (m_ToggleType == 1)
00432766              {
00432775                  CInputManager::DeactivateActionKey(this, arg2);
0043277c                  return;
00432766              }
00432766              
00432770              if ((m_ToggleType > 3 && m_ToggleType <= 5))
00432775                  CInputManager::DeactivateActionKey(this, arg2);
00432761          }
00432761          else if ((m_ToggleType - 1) > 4)
004327c4              CInputManager::ActivateActionKey(this, arg2);
00432783          else
00432783              switch (m_ToggleType)
00432783              {
004327a9                  case 1:
004327a9                  {
004327a9                      CInputManager::ActivateActionKey(this, arg2);
004327a9                      
004327b2                      if ((arg2->m_InputKey.m_activation & 0xa9) == 0)
004327b7                          CInputManager::DeactivateActionKey(this, arg2);
004327a9                      break;
004327a9                  }
0043278f                  case 2:
0043278f                  {
0043278f                      CInputManager::ToggleActionKey(this, arg2);
0043278f                      break;
0043278f                  }
0043279c                  case 3:
0043279c                  {
0043279c                      CInputManager::StartAction(this, arg2);
0043279c                      break;
0043279c                  }
004327c4                  case 4:
004327c4                  case 5:
004327c4                  {
004327c4                      CInputManager::ActivateActionKey(this, arg2);
004327c4                      break;
004327c4                  }
00432783              }
0043272b      }
00432720  }

004327ce                                            8b ff                                                                ..
004327d0  uint32_t jump_table_4327d0[0x5] = 
004327d0  {
004327d0      [0x0] =  0x004327a6
004327d4      [0x1] =  0x0043278c
004327d8      [0x2] =  0x00432799
004327dc      [0x3] =  0x004327c1
004327e0      [0x4] =  0x004327c1
004327e4  }

004327e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004327f0  class TResult* __thiscall GlobalRegistryCommands::QueryInterface(class GlobalRegistryCommands* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

004327f0  {
004327fd      int32_t* key;
004327fd      
004327fd      if ((1 & (*(uint8_t*)$S102)) != 0)
00432837          key = Offsets[0].key;
004327fd      else
004327fd      {
00432807          key = &Interface_InterfaceType;
0043280c          $S102 |= 1;
00432812          Offsets[0].key = 0x7984e0;
00432817          Offsets[0].ofs = 0;
00432821          Offsets[1].key = 0;
0043282b          Offsets[1].ofs = 0;
004327fd      }
004327fd      
00432841      void* edx_3 = &Offsets;
00432841      
00432846      while (key != 0)
00432846      {
0043286a          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0043286a          {
0043288c              if (arg4 != 0)
0043288c              {
0043288e                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
00432898                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
0043289b                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
0043288c              }
0043288c              
004328a3              __return->m_val = 0;
004328aa              return __return;
0043286a          }
0043286a          
0043286c          key = *(uint32_t*)((char*)edx_3 + 8);
0043286f          edx_3 += 8;
00432846      }
00432846      
0043287c      __return->m_val = 0x80004002;
00432883      return __return;
004327f0  }

004328ad                                         90 90 90                                                               ...

004328b0  void* __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>* this, uint32_t arg2)

004328b0  {
004328b3      class HashTableData<PStringBase<char>,GRPCommand *>** m_buckets = this->m_buckets;
004328bb      this->vtable = 0x7984f4;
004328bb      
004328c1      if (m_buckets != &this->m_aInplaceBuckets)
004328c4          operator delete[](m_buckets);
004328c4      
004328ce      this->m_buckets = nullptr;
004328d1      this->m_firstInterestingBucket = nullptr;
004328d4      this->m_numBuckets = 0;
004328d7      this->m_numElements = 0;
004328d7      
004328df      if ((arg2 & 1) != 0)
004328e2          operator delete(this);
004328e2      
004328ed      return this;
004328b0  }


004328f0  void* __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>* this, uint32_t arg2)

004328f0  {
004328f3      class HashTableData<PStringBase<char>,GRPObject *>** m_buckets = this->m_buckets;
004328fb      this->vtable = 0x7984f8;
004328fb      
00432901      if (m_buckets != &this->m_aInplaceBuckets)
00432904          operator delete[](m_buckets);
00432904      
0043290e      this->m_buckets = nullptr;
00432911      this->m_firstInterestingBucket = nullptr;
00432914      this->m_numBuckets = 0;
00432917      this->m_numElements = 0;
00432917      
0043291f      if ((arg2 & 1) != 0)
00432922          operator delete(this);
00432922      
0043292d      return this;
004328f0  }


00432930  uint8_t __stdcall _STL::less<PStringBase<char> >::operator()(struct _STL::less<PStringBase<char> > const* this @ ecx, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3)

00432930  {
00432938      int32_t ebx;
00432938      int32_t var_4 = ebx;
0043293a      class PSRefBufferCharData<char>* m_charbuffer_1 = arg3->m_charbuffer;
0043293c      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0043293c      
00432940      while (true)
00432940      {
00432940          char edx = m_charbuffer->m_data[0];
00432942          ebx = m_charbuffer_1->m_data[0];
00432944          class PStringBase<char>* ecx;
00432944          ecx = edx;
00432946          bool c_1 = edx < ebx;
00432946          
00432948          if (edx == ebx)
00432948          {
0043294c              if (ecx == 0)
0043294c                  break;
0043294c              
0043294e              edx = m_charbuffer->m_data[1];
00432951              ebx = m_charbuffer_1->m_data[1];
00432954              ecx = edx;
00432956              c_1 = edx < ebx;
00432956              
00432958              if (edx == ebx)
00432958              {
0043295a                  m_charbuffer = &m_charbuffer->m_data[2];
0043295d                  m_charbuffer_1 = &m_charbuffer_1->m_data[2];
0043295d                  
00432962                  if (ecx == 0)
00432962                      break;
00432962                  
00432962                  continue;
00432958              }
00432948          }
00432948          
00432974          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00432981          int32_t eax_2;
00432981          eax_2 = (((char*)m_charbuffer - m_charbuffer) + 1) < 0;
00432984          return eax_2;
00432940      }
00432940      
0043296e      int32_t eax;
0043296e      eax = 0;
00432971      return 0;
00432930  }

00432987                       90 90 90 90 90 90 90 90 90                                                         .........

00432990  void __thiscall GRPTypedVariableObject::SetVariable(class GRPTypedVariableObject* this, bool const& arg2)

00432990  {
00432997      if (this->m_Type == GRVDataType_Bool)
00432997      {
004329a2          *(uint8_t*)this->m_pVariable = *(uint8_t*)arg2;
004329a2          
004329a9          if (this->m_OnChangedCallbackFunction != 0)
004329a9          {
004329ab              class PSRefBufferCharData<char>* m_charbuffer = this->m_Name.m_charbuffer;
004329ae              arg2 = m_charbuffer;
004329b6              InterlockedIncrement(&m_charbuffer[-1]);
004329c1              this->m_OnChangedCallbackFunction(&arg2);
004329c8              void* esi_2 = &arg2[0xffffffec];
004329c8              
004329de              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004329e6                  **(uint32_t**)esi_2(1);
004329a9          }
00432997      }
00432990  }

004329ec                                      90 90 90 90                                                              ....

004329f0  class PStringBase<char> const* _STL::__median(class PStringBase<char> const* arg1, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3, struct _STL::less<PStringBase<char> > arg4)

004329f0  {
004329f5      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
004329fe      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00432a00      int32_t ebx;
00432a00      int32_t var_10 = ebx;
00432a01      int32_t eax_1;
00432a01      
00432a01      while (true)
00432a01      {
00432a01          char edx = m_charbuffer->m_data[0];
00432a03          ebx = m_charbuffer_1->m_data[0];
00432a07          bool c_1 = edx < ebx;
00432a07          
00432a09          if (edx == ebx)
00432a09          {
00432a0d              if (edx == 0)
00432a0d              {
00432a25                  eax_1 = 0;
00432a27                  break;
00432a0d              }
00432a0d              
00432a0f              edx = m_charbuffer->m_data[1];
00432a12              ebx = m_charbuffer_1->m_data[1];
00432a17              c_1 = edx < ebx;
00432a17              
00432a19              if (edx == ebx)
00432a19              {
00432a1b                  m_charbuffer = &m_charbuffer->m_data[2];
00432a1e                  m_charbuffer_1 = &m_charbuffer_1->m_data[2];
00432a1e                  
00432a23                  if (edx != 0)
00432a23                      continue;
00432a23                  
00432a25                  eax_1 = 0;
00432a27                  break;
00432a19              }
00432a09          }
00432a09          
00432a29          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00432a2b          eax_1 = (((char*)m_charbuffer - m_charbuffer) + 1);
00432a2b          break;
00432a01      }
00432a01      
00432a35      struct _STL::less<PStringBase<char> >* ecx_1 = &arg4;
00432a35      
00432a3a      if (eax_1 >= 0)
00432a3a      {
00432a69          if (_STL::less<PStringBase<char> >::operator()(ecx_1, arg1, arg3) == 0)
00432a69          {
00432a7a              if (_STL::less<PStringBase<char> >::operator()(&arg4, arg2, arg3) != 0)
00432a81                  return arg3;
00432a81              
00432a7c              return arg2;
00432a69          }
00432a3a      }
00432a3a      else
00432a3a      {
00432a44          if (_STL::less<PStringBase<char> >::operator()(ecx_1, arg2, arg3) != 0)
00432a7c              return arg2;
00432a7c          
00432a53          if (_STL::less<PStringBase<char> >::operator()(&arg4, arg1, arg3) != 0)
00432a5a              return arg3;
00432a3a      }
00432a3a      
00432a60      return arg1;
004329f0  }

00432a82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00432a90  void _STL::swap(class PStringBase<char>* arg1, class PStringBase<char>* arg2)

00432a90  {
00432a97      class PSRefBufferCharData<char>* m_charbuffer_1 = arg1->m_charbuffer;
00432a9d      InterlockedIncrement(&m_charbuffer_1[-1]);
00432aa3      class PSRefBufferCharData<char>** ebx = arg2;
00432aa7      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
00432aa7      
00432aab      if (m_charbuffer != *(uint32_t*)ebx)
00432aab      {
00432ac1          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00432aca              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00432aca          
00432acc          class PStringBase<char> eax_3 = *(uint32_t*)ebx;
00432ace          arg1->m_charbuffer = eax_3;
00432ad4          InterlockedIncrement((eax_3 - 0x10));
00432aab      }
00432aab      
00432adb      class PSRefBufferCharData<char>* edi_1 = *(uint32_t*)ebx;
00432adb      
00432adf      if (edi_1 != m_charbuffer_1)
00432adf      {
00432af4          if ((InterlockedDecrement(&edi_1[-1]) == 0 && edi_1 != 0x14))
00432afc              *(uint32_t*)*(int32_t*)((char*)edi_1 + -0x14)(1);
00432afc          
00432b02          *(uint32_t*)ebx = m_charbuffer_1;
00432b04          InterlockedIncrement(&m_charbuffer_1[-1]);
00432adf      }
00432adf      
00432b1d      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00432b25          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00432a90  }

00432b2b                                   90 90 90 90 90                                                             .....

00432b30  void _STL::__unguarded_linear_insert(class PStringBase<char>* arg1, class PStringBase<char> arg2, struct _STL::less<PStringBase<char> > arg3)

00432b30  {
00432b30      class PStringBase<char> eax = arg2;
00432b35      class PStringBase<char>* ebx = arg1;
00432b3a      char* m_charbuffer_3 = ebx->m_charbuffer;
00432b3f      class PStringBase<char>* edi = &ebx[-1];
00432b42      char* m_charbuffer_4 = m_charbuffer_3;
00432b44      int32_t eax_2;
00432b44      char edx;
00432b44      
00432b44      while (true)
00432b44      {
00432b44          edx = *(uint8_t*)eax;
00432b48          char temp0_1 = *(uint8_t*)m_charbuffer_4;
00432b48          bool c_1 = edx < temp0_1;
00432b48          
00432b4a          if (edx == temp0_1)
00432b4a          {
00432b4e              if (edx == 0)
00432b4e              {
00432b64                  eax_2 = 0;
00432b66                  break;
00432b4e              }
00432b4e              
00432b50              edx = *(uint8_t*)(eax + 1);
00432b55              char temp3_1 = m_charbuffer_4[1];
00432b55              c_1 = edx < temp3_1;
00432b55              
00432b58              if (edx == temp3_1)
00432b58              {
00432b5a                  eax += 2;
00432b5d                  m_charbuffer_4 = &m_charbuffer_4[2];
00432b5d                  
00432b62                  if (edx != 0)
00432b62                      continue;
00432b62                  
00432b64                  eax_2 = 0;
00432b66                  break;
00432b58              }
00432b4a          }
00432b4a          
00432b68          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00432b6a          eax_2 = ((eax - eax) + 1);
00432b6a          break;
00432b44      }
00432b44      
00432b6f      if (eax_2 < 0)
00432b6f      {
00432b71          while (true)
00432b71          {
00432b71              class PSRefBufferCharData<char>* m_charbuffer = ebx->m_charbuffer;
00432b71              
00432b75              if (m_charbuffer != m_charbuffer_3)
00432b75              {
00432b8a                  if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00432b92                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00432b92                  
00432b94                  class PStringBase<char> m_charbuffer_1 = edi->m_charbuffer;
00432b96                  ebx->m_charbuffer = m_charbuffer_1;
00432b9c                  InterlockedIncrement((m_charbuffer_1 - 0x10));
00432b75              }
00432b75              
00432ba2              m_charbuffer_3 = edi->m_charbuffer;
00432ba5              class PStringBase<char> eax_6 = arg2;
00432ba9              ebx = edi;
00432bab              edi -= 4;
00432bae              char* m_charbuffer_5 = m_charbuffer_3;
00432bb0              int32_t eax_8;
00432bb0              
00432bb0              while (true)
00432bb0              {
00432bb0                  edx = *(uint8_t*)eax_6;
00432bb4                  char temp4_1 = *(uint8_t*)m_charbuffer_5;
00432bb4                  bool c_3 = edx < temp4_1;
00432bb4                  
00432bb6                  if (edx == temp4_1)
00432bb6                  {
00432bba                      if (edx == 0)
00432bba                      {
00432bd0                          eax_8 = 0;
00432bd2                          break;
00432bba                      }
00432bba                      
00432bbc                      edx = *(uint8_t*)(eax_6 + 1);
00432bc1                      char temp7_1 = m_charbuffer_5[1];
00432bc1                      c_3 = edx < temp7_1;
00432bc1                      
00432bc4                      if (edx == temp7_1)
00432bc4                      {
00432bc6                          eax_6 += 2;
00432bc9                          m_charbuffer_5 = &m_charbuffer_5[2];
00432bc9                          
00432bce                          if (edx != 0)
00432bce                              continue;
00432bce                          
00432bd0                          eax_8 = 0;
00432bd2                          break;
00432bc4                      }
00432bb6                  }
00432bb6                  
00432bd4                  bool c_4 = /* bool c_4 = unimplemented  {sbb eax, eax} */;
00432bd6                  eax_8 = ((eax_6 - eax_6) + 1);
00432bd6                  break;
00432bb0              }
00432bb0              
00432bdb              if (eax_8 >= 0)
00432bdb                  break;
00432b71          }
00432b6f      }
00432b6f      
00432bdd      class PSRefBufferCharData<char>* m_charbuffer_2 = ebx->m_charbuffer;
00432bdd      
00432be5      if (m_charbuffer_2 != arg2)
00432be5      {
00432bfa          if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
00432c02              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00432c02          
00432c08          ebx->m_charbuffer = arg2;
00432c0a          InterlockedIncrement((arg2 - 0x10));
00432be5      }
00432be5      
00432c23      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00432c2b          **(uint32_t**)(arg2 - 0x14)(1);
00432b30  }

00432c32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00432c40  void _STL::__push_heap(class PStringBase<char>* arg1, int32_t arg2, int32_t arg3, class PStringBase<char> arg4, struct _STL::less<PStringBase<char> > arg5)

00432c40  {
00432c46      int32_t ebp = arg2;
00432c4d      int32_t eax_1;
00432c4d      int32_t edx;
00432c4d      edx = HIGHD(((int64_t)(ebp - 1)));
00432c4d      eax_1 = LOWD(((int64_t)(ebp - 1)));
00432c4d      
00432c5c      if (ebp > arg3)
00432c5c      {
00432c5e          int32_t edi_2 = ((eax_1 - edx) >> 1);
00432c5e          
00432c60          while (true)
00432c60          {
00432c60              class PStringBase<char> esi_1 = arg4;
00432c64              char* m_charbuffer = arg1[edi_2].m_charbuffer;
00432c67              int32_t eax_5;
00432c67              
00432c67              while (true)
00432c67              {
00432c67                  edx = *(uint8_t*)m_charbuffer;
00432c6b                  char temp0_1 = *(uint8_t*)esi_1;
00432c6b                  bool c_1 = edx < temp0_1;
00432c6b                  
00432c6d                  if (edx == temp0_1)
00432c6d                  {
00432c71                      if (edx == 0)
00432c71                      {
00432c87                          eax_5 = 0;
00432c89                          break;
00432c71                      }
00432c71                      
00432c73                      edx = m_charbuffer[1];
00432c78                      char temp3_1 = *(uint8_t*)(esi_1 + 1);
00432c78                      c_1 = edx < temp3_1;
00432c78                      
00432c7b                      if (edx == temp3_1)
00432c7b                      {
00432c7d                          m_charbuffer = &m_charbuffer[2];
00432c80                          esi_1 += 2;
00432c80                          
00432c85                          if (edx != 0)
00432c85                              continue;
00432c85                          
00432c87                          eax_5 = 0;
00432c89                          break;
00432c7b                      }
00432c6d                  }
00432c6d                  
00432c8b                  bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00432c8d                  eax_5 = ((m_charbuffer - m_charbuffer) + 1);
00432c8d                  break;
00432c67              }
00432c67              
00432c92              if (eax_5 >= 0)
00432c92                  break;
00432c92              
00432c94              void* m_charbuffer_1 = arg1[ebp].m_charbuffer;
00432c94              
00432c9a              if (m_charbuffer_1 != arg1[edi_2].m_charbuffer)
00432c9a              {
00432caf                  if ((InterlockedDecrement(((char*)m_charbuffer_1 - 0x10)) == 0 && m_charbuffer_1 != 0x14))
00432cb7                      **(uint32_t**)((char*)m_charbuffer_1 - 0x14)(1);
00432cb7                  
00432cb9                  int32_t m_charbuffer_2 = arg1[edi_2].m_charbuffer;
00432cbc                  arg1[ebp].m_charbuffer = m_charbuffer_2;
00432cc3                  InterlockedIncrement((m_charbuffer_2 - 0x10));
00432c9a              }
00432c9a              
00432ccc              int32_t eax_10;
00432ccc              edx = HIGHD(((int64_t)(edi_2 - 1)));
00432ccc              eax_10 = LOWD(((int64_t)(edi_2 - 1)));
00432cd1              ebp = edi_2;
00432cd3              edi_2 = ((eax_10 - edx) >> 1);
00432cd3              
00432cd9              if (ebp <= arg3)
00432cd9                  break;
00432c60          }
00432c5c      }
00432c5c      
00432cdb      void* m_charbuffer_3 = arg1[ebp].m_charbuffer;
00432cdb      
00432ce4      if (m_charbuffer_3 != arg4)
00432ce4      {
00432cf9          if ((InterlockedDecrement(((char*)m_charbuffer_3 - 0x10)) == 0 && m_charbuffer_3 != 0x14))
00432d01              **(uint32_t**)((char*)m_charbuffer_3 - 0x14)(1);
00432d01          
00432d07          arg1[ebp].m_charbuffer = arg4;
00432d0a          InterlockedIncrement((arg4 - 0x10));
00432ce4      }
00432ce4      
00432d23      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
00432d2b          **(uint32_t**)(arg4 - 0x14)(1);
00432c40  }

00432d32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00432d40  class PStringBase<char>* _STL::__copy_backward(class PStringBase<char>* arg1, class PStringBase<char>* arg2, class PStringBase<char>* arg3, struct _STL::random_access_iterator_tag const* arg4, int32_t* arg5)

00432d40  {
00432d41      class PStringBase<char>* ebx = arg2;
00432d4e      int32_t eax_2 = (((char*)ebx - arg1) >> 2);
00432d4e      
00432d53      if (eax_2 <= 0)
00432daf          return arg3;
00432daf      
00432d5d      class PStringBase<char>* edi = arg3;
00432d61      arg2 = eax_2;
00432da0      class PStringBase<char>* i;
00432da0      
00432da0      do
00432da0      {
00432d65          void* m_charbuffer = edi->m_charbuffer;
00432d68          int32_t m_charbuffer_2 = ebx->m_charbuffer;
00432d6b          ebx -= 4;
00432d6e          edi -= 4;
00432d6e          
00432d73          if (m_charbuffer != m_charbuffer_2)
00432d73          {
00432d88              if ((InterlockedDecrement(((char*)m_charbuffer - 0x10)) == 0 && m_charbuffer != 0x14))
00432d90                  **(uint32_t**)((char*)m_charbuffer - 0x14)(1);
00432d90              
00432d92              class PSRefBufferCharData<char>* m_charbuffer_1 = ebx->m_charbuffer;
00432d94              edi->m_charbuffer = m_charbuffer_1;
00432d9a              InterlockedIncrement(&m_charbuffer_1[-1]);
00432d73          }
00432d73          
00432d9c          i = arg2;
00432d9c          arg2 -= 1;
00432da0      } while (i != 1);
00432da8      return edi;
00432d40  }


00432db0  uint8_t __fastcall GlobalRegistryInstance::IsEmpty(class GlobalRegistryInstance const* this)

00432db0  {
00432dbb      if (this->m_CommandHash.m_intrusiveTable.m_numElements > 0)
00432dbb      {
00432dbd          uint32_t eax;
00432dbd          eax = 0;
00432dc2          return 0;
00432dbb      }
00432dbb      
00432dd1      void __return;
00432dd1      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_1 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_ObjectHash.m_intrusiveTable.vtable, &__return);
00432dd6      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_1->m_currElement;
00432ddb      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_1->m_currHashTable;
00432ddd      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_1->m_currBucket;
00432ddd      
00432de0      if (i_1 != 0)
00432de0      {
00432de7          while (true)
00432de7          {
00432dec              if (i_1->m_data->vtable->RemoveObj_Internal() == 0)
00432dec              {
00432e1e                  int32_t eax_2;
00432e1e                  eax_2 = 0;
00432e24                  return 0;
00432dec              }
00432dec              
00432dee              i_1 = i_1->m_hashNext;
00432dee              
00432df3              if (i_1 == 0)
00432df3              {
00432e0b                  class HashTableData<unsigned long,DBOCache *>* i;
00432e0b                  
00432e0b                  do
00432e0b                  {
00432e00                      m_currBucket = &m_currBucket[1];
00432e00                      
00432e05                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00432e05                          goto label_432e15;
00432e05                      
00432e07                      i = *(uint32_t*)m_currBucket;
00432e0b                  } while (i == 0);
00432e0b                  
00432e0d                  i_1 = i;
00432e0d                  
00432e11                  if (i_1 == 0)
00432e11                      break;
00432df3              }
00432de7          }
00432de0      }
00432de0      
00432e15  label_432e15:
00432e15      eax_1 = 1;
00432e1b      return 1;
00432db0  }

00432e25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00432e30  void __fastcall GlobalRegistryInstance::CheckForLeakedData(class GlobalRegistryInstance* this)

00432e30  {
00432e43      void __return;
00432e43      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_CommandHash.m_intrusiveTable.vtable, &__return);
00432e48      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00432e4a      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00432e4d      class HashTableData<unsigned long,DBOCache *>* i_2 = eax->m_currElement;
00432e4d      
00432e52      if (i_2 != 0)
00432e52      {
00432e54          while (true)
00432e54          {
00432e54              i_2 = i_2->m_hashNext;
00432e54              
00432e59              if (i_2 == 0)
00432e59              {
00432e6f                  class HashTableData<unsigned long,DBOCache *>* i;
00432e6f                  
00432e6f                  do
00432e6f                  {
00432e64                      m_currBucket = &m_currBucket[1];
00432e64                      
00432e69                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00432e69                          goto label_432e89;
00432e69                      
00432e6b                      i = *(uint32_t*)m_currBucket;
00432e6f                  } while (i == 0);
00432e6f                  
00432e71                  i_2 = i;
00432e71                  
00432e75                  if (i_2 == 0)
00432e75                      break;
00432e59              }
00432e54          }
00432e52      }
00432e52      
00432e89  label_432e89:
00432e89      void* ecx_2 = &this->m_ObjectHash.m_intrusiveTable.m_buckets[this->m_ObjectHash.m_intrusiveTable.m_numBuckets];
00432e8e      void** m_firstInterestingBucket_1;
00432e8e      void* i_3;
00432e8e      
00432e8e      if (this->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket == ecx_2)
00432e8e      {
00432ea8      label_432ea8:
00432ea8          m_firstInterestingBucket_1 = nullptr;
00432eaa          i_3 = nullptr;
00432e8e      }
00432e8e      else
00432e8e      {
00432e90          while (true)
00432e90          {
00432e90              class HashTableData<PStringBase<char>,GRPObject *>** m_firstInterestingBucket = this->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket;
00432e90              
00432e99              if (*(uint32_t*)m_firstInterestingBucket != 0)
00432e99              {
00432eae                  m_firstInterestingBucket_1 = this->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket;
00432eb4                  i_3 = *(uint32_t*)m_firstInterestingBucket_1;
00432eb4                  break;
00432e99              }
00432e99              
00432ea0              this->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
00432ea0              
00432ea6              if (&m_firstInterestingBucket[1] == ecx_2)
00432ea6                  goto label_432ea8;
00432e90          }
00432e8e      }
00432e8e      
00432eb8      void** m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00432eb8      
00432eba      if (i_3 != 0)
00432eba      {
00432ec5          while (true)
00432ec5          {
00432eca              if (*(uint32_t*)(**(uint32_t**)((char*)i_3 + 8) + 0x3c)() == 0)
00432ed1                  *(uint32_t*)(**(uint32_t**)((char*)i_3 + 8) + 0x34)();
00432ed1              
00432ed4              i_3 = *(uint32_t*)((char*)i_3 + 4);
00432ed4              
00432ed9              if (i_3 == 0)
00432ed9              {
00432efb                  void* i_1;
00432efb                  
00432efb                  do
00432efb                  {
00432ef0                      m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
00432ef0                      
00432ef5                      if (m_firstInterestingBucket_2 == &this->m_ObjectHash.m_intrusiveTable.m_buckets[this->m_ObjectHash.m_intrusiveTable.m_numBuckets])
00432f09                          return;
00432f09                      
00432ef7                      i_1 = *(uint32_t*)m_firstInterestingBucket_2;
00432efb                  } while (i_1 == 0);
00432efb                  
00432efd                  i_3 = i_1;
00432efd                  
00432f01                  if (i_3 == 0)
00432f01                      break;
00432ed9              }
00432ec5          }
00432eba      }
00432e30  }

00432f0a                                90 90 90 90 90 90                                                            ......

00432f10  void _STL::__unguarded_insertion_sort_aux(class PStringBase<char>* arg1, class PStringBase<char>* arg2, class PStringBase<char>* arg3, struct _STL::less<PStringBase<char> > arg4)

00432f10  {
00432f1e      for (class PStringBase<char>* i = arg1; i != arg2; i = &i[1])
00432f1e      {
00432f30          class PStringBase<char> m_charbuffer = i->m_charbuffer;
00432f33          int32_t ecx;
00432f33          int32_t var_18_1 = ecx;
00432f3c          InterlockedIncrement((m_charbuffer - 0x10));
00432f3f          ecx = _STL::__unguarded_linear_insert(i, m_charbuffer, arg4);
00432f1e      }
00432f10  }

00432f53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00432f60  void _STL::__adjust_heap(class PStringBase<char>* arg1, int32_t arg2, int32_t arg3, class PStringBase<char> arg4, struct _STL::less<PStringBase<char> > arg5)

00432f60  {
00432f65      int32_t ebx = arg2;
00432f6f      int32_t esi = ((ebx * 2) + 2);
00432f73      bool cond:1 = esi != arg3;
00432f76      arg2 = ebx;
00432f7a      int32_t ecx;
00432f7a      
00432f7a      if (esi < arg3)
00432f7a      {
00432f80          while (true)
00432f80          {
00432f80              char* m_charbuffer_5 = arg1[(esi - 1)].m_charbuffer;
00432f84              char* m_charbuffer = arg1[esi].m_charbuffer;
00432f88              int32_t eax_1;
00432f88              
00432f88              while (true)
00432f88              {
00432f88                  char edx = *(uint8_t*)m_charbuffer;
00432f8a                  ecx = edx;
00432f8c                  char temp0_1 = *(uint8_t*)m_charbuffer_5;
00432f8c                  bool c_1 = edx < temp0_1;
00432f8c                  
00432f8e                  if (edx == temp0_1)
00432f8e                  {
00432f92                      if (ecx == 0)
00432f92                      {
00432fa8                          eax_1 = 0;
00432faa                          break;
00432f92                      }
00432f92                      
00432f94                      edx = m_charbuffer[1];
00432f97                      ecx = edx;
00432f99                      char temp3_1 = m_charbuffer_5[1];
00432f99                      c_1 = edx < temp3_1;
00432f99                      
00432f9c                      if (edx == temp3_1)
00432f9c                      {
00432f9e                          m_charbuffer = &m_charbuffer[2];
00432fa1                          m_charbuffer_5 = &m_charbuffer_5[2];
00432fa1                          
00432fa6                          if (ecx != 0)
00432fa6                              continue;
00432fa6                          
00432fa8                          eax_1 = 0;
00432faa                          break;
00432f9c                      }
00432f8e                  }
00432f8e                  
00432fac                  bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00432fae                  eax_1 = ((m_charbuffer - m_charbuffer) + 1);
00432fae                  break;
00432f88              }
00432f88              
00432fb3              if (eax_1 < 0)
00432fb5                  esi -= 1;
00432fb5              
00432fb6              void* m_charbuffer_1 = arg1[ebx].m_charbuffer;
00432fb6              
00432fbe              if (m_charbuffer_1 != arg1[esi].m_charbuffer)
00432fbe              {
00432fd3                  if ((InterlockedDecrement(((char*)m_charbuffer_1 - 0x10)) == 0 && m_charbuffer_1 != 0x14))
00432fdb                      **(uint32_t**)((char*)m_charbuffer_1 - 0x14)(1);
00432fdb                  
00432fdd                  int32_t m_charbuffer_2 = arg1[esi].m_charbuffer;
00432fe1                  arg1[ebx].m_charbuffer = m_charbuffer_2;
00432fe9                  ecx = InterlockedIncrement((m_charbuffer_2 - 0x10));
00432fbe              }
00432fbe              
00432ff3              ebx = esi;
00432ff5              esi = ((esi * 2) + 2);
00432ff5              
00432ffb              if (esi >= arg3)
00432ffb                  break;
00432f80          }
00432f80          
00432ffd          cond:1 = esi != arg3;
00432f7a      }
00432f7a      
00432fff      if (!(cond:1))
00432fff      {
00433001          void* m_charbuffer_3 = arg1[ebx].m_charbuffer;
00433001          
00433009          if (m_charbuffer_3 != arg1[(esi - 1)].m_charbuffer)
00433009          {
0043301e              if ((InterlockedDecrement(((char*)m_charbuffer_3 - 0x10)) == 0 && m_charbuffer_3 != 0x14))
00433026                  **(uint32_t**)((char*)m_charbuffer_3 - 0x14)(1);
00433026              
00433028              int32_t m_charbuffer_4 = arg1[(esi - 1)].m_charbuffer;
0043302c              arg1[ebx].m_charbuffer = m_charbuffer_4;
00433034              ecx = InterlockedIncrement((m_charbuffer_4 - 0x10));
00433009          }
00433009          
0043303a          ebx = (esi - 1);
00432fff      }
00432fff      
00433046      int32_t var_18 = ecx;
0043304f      InterlockedIncrement((arg4 - 0x10));
0043305c      _STL::__push_heap(arg1, ebx, arg2, arg4, arg5);
0043305c      
00433077      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
0043307f          **(uint32_t**)(arg4 - 0x14)(1);
00432f60  }

00433086                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00433090  void __fastcall GlobalRegistryCommands::~GlobalRegistryCommands(class GlobalRegistryCommands* this)

00433090  {
00433090      class GlobalRegistryCommands* this_1 = this;
00433093      this->vtable = 0x798534;
004330a2      PStringBase<char>::PStringBase<char>(&this_1, "Toggle");
004330ac      GlobalRegistry::UnregisterCommand(&this_1);
004330bb      void* __offset(GlobalRegistryCommands, -0x14) esi_1 = &this_1[-5];
004330bb      
004330cd      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004330d5          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004330d5      
004330e0      PStringBase<char>::PStringBase<char>(&this_1, &data_798528);
004330ea      GlobalRegistry::UnregisterCommand(&this_1);
004330f3      void* __offset(GlobalRegistryCommands, -0x14) esi_3 = &this_1[-5];
004330f3      
00433105      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0043310d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0043310d      
00433118      PStringBase<char>::PStringBase<char>(&this_1, "Dump");
00433122      GlobalRegistry::UnregisterCommand(&this_1);
0043312b      void* __offset(GlobalRegistryCommands, -0x14) esi_5 = &this_1[-5];
0043312b      
0043313d      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
00433145          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00433145      
00433150      PStringBase<char>::PStringBase<char>(&this_1, "Help");
0043315a      GlobalRegistry::UnregisterCommand(&this_1);
00433163      void* __offset(GlobalRegistryCommands, -0x14) esi_7 = &this_1[-5];
00433163      
00433175      if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0043317d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0043317d      
00433188      PStringBase<char>::PStringBase<char>(&this_1, "ListObjects");
00433192      GlobalRegistry::UnregisterCommand(&this_1);
0043319b      void* __offset(GlobalRegistryCommands, -0x14) esi_9 = &this_1[-5];
0043319b      
004331ad      if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
004331b5          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
004331b5      
004331c0      PStringBase<char>::PStringBase<char>(&this_1, "ListCommands");
004331ca      GlobalRegistry::UnregisterCommand(&this_1);
004331d3      void* __offset(GlobalRegistryCommands, -0x14) esi_11 = &this_1[-5];
004331d3      
004331e5      if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
004331ed          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
00433090  }

004331f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00433200  class PStringBase<char>* _STL::__unguarded_partition(class PStringBase<char>* arg1, class PStringBase<char>* arg2, class PStringBase<char> arg3, struct _STL::less<PStringBase<char> > arg4)

00433200  {
00433201      class PStringBase<char>* result = arg1;
0043320c      class PStringBase<char>* edi = arg2;
0043320c      
00433210      while (true)
00433210      {
00433210          class PSRefBufferCharData<char>* m_charbuffer = result->m_charbuffer;
00433212          class PStringBase<char> esi_1 = arg3;
00433214          int32_t eax_2;
00433214          char edx;
00433214          
00433214          while (true)
00433214          {
00433214              edx = m_charbuffer->m_data[0];
00433218              char temp0_1 = *(uint8_t*)esi_1;
00433218              bool c_1 = edx < temp0_1;
00433218              
0043321a              if (edx == temp0_1)
0043321a              {
0043321e                  if (edx == 0)
0043321e                  {
00433234                      eax_2 = 0;
00433236                      break;
0043321e                  }
0043321e                  
00433220                  edx = m_charbuffer->m_data[1];
00433225                  char temp3_1 = *(uint8_t*)(esi_1 + 1);
00433225                  c_1 = edx < temp3_1;
00433225                  
00433228                  if (edx == temp3_1)
00433228                  {
0043322a                      m_charbuffer = &m_charbuffer->m_data[2];
0043322d                      esi_1 += 2;
0043322d                      
00433232                      if (edx != 0)
00433232                          continue;
00433232                      
00433234                      eax_2 = 0;
00433236                      break;
00433228                  }
0043321a              }
0043321a              
00433238              bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
0043323a              eax_2 = (((char*)m_charbuffer - m_charbuffer) + 1);
0043323a              break;
00433214          }
00433214          
0043323f          if (eax_2 < 0)
0043323f          {
00433241              while (true)
00433241              {
00433241                  char* eax_3 = *(int32_t*)((char*)result + 4);
00433244                  result = &result[1];
00433247                  class PStringBase<char> esi_2 = arg3;
00433250                  int32_t eax_5;
00433250                  
00433250                  while (true)
00433250                  {
00433250                      edx = *(uint8_t*)eax_3;
00433254                      char temp5_1 = *(uint8_t*)esi_2;
00433254                      bool c_3 = edx < temp5_1;
00433254                      
00433256                      if (edx == temp5_1)
00433256                      {
0043325a                          if (edx == 0)
0043325a                          {
00433270                              eax_5 = 0;
00433272                              break;
0043325a                          }
0043325a                          
0043325c                          edx = eax_3[1];
00433261                          char temp11_1 = *(uint8_t*)(esi_2 + 1);
00433261                          c_3 = edx < temp11_1;
00433261                          
00433264                          if (edx == temp11_1)
00433264                          {
00433266                              eax_3 = &eax_3[2];
00433269                              esi_2 += 2;
00433269                              
0043326e                              if (edx != 0)
0043326e                                  continue;
0043326e                              
00433270                              eax_5 = 0;
00433272                              break;
00433264                          }
00433256                      }
00433256                      
00433274                      bool c_4 = /* bool c_4 = unimplemented  {sbb eax, eax} */;
00433276                      eax_5 = ((eax_3 - eax_3) + 1);
00433276                      break;
00433250                  }
00433250                  
0043327b                  if (eax_5 >= 0)
0043327b                      break;
00433241              }
0043323f          }
0043323f          
0043327d          char* m_charbuffer_1 = edi->m_charbuffer;
00433280          edi -= 4;
00433283          class PStringBase<char> eax_6 = arg3;
00433285          int32_t eax_8;
00433285          
00433285          while (true)
00433285          {
00433285              edx = *(uint8_t*)eax_6;
00433289              char temp4_1 = *(uint8_t*)m_charbuffer_1;
00433289              bool c_5 = edx < temp4_1;
00433289              
0043328b              if (edx == temp4_1)
0043328b              {
0043328f                  if (edx == 0)
0043328f                  {
004332a5                      eax_8 = 0;
004332a7                      break;
0043328f                  }
0043328f                  
00433291                  edx = *(uint8_t*)(eax_6 + 1);
00433296                  char temp10_1 = m_charbuffer_1[1];
00433296                  c_5 = edx < temp10_1;
00433296                  
00433299                  if (edx == temp10_1)
00433299                  {
0043329b                      eax_6 += 2;
0043329e                      m_charbuffer_1 = &m_charbuffer_1[2];
0043329e                      
004332a3                      if (edx != 0)
004332a3                          continue;
004332a3                      
004332a5                      eax_8 = 0;
004332a7                      break;
00433299                  }
0043328b              }
0043328b              
004332a9              bool c_6 = /* bool c_6 = unimplemented  {sbb eax, eax} */;
004332ab              eax_8 = ((eax_6 - eax_6) + 1);
004332ab              break;
00433285          }
00433285          
004332b0          if (eax_8 < 0)
004332b0          {
004332b2              while (true)
004332b2              {
004332b2                  char* m_charbuffer_2 = edi->m_charbuffer;
004332b5                  edi -= 4;
004332b8                  class PStringBase<char> eax_9 = arg3;
004332c0                  int32_t eax_11;
004332c0                  
004332c0                  while (true)
004332c0                  {
004332c0                      edx = *(uint8_t*)eax_9;
004332c4                      char temp12_1 = *(uint8_t*)m_charbuffer_2;
004332c4                      bool c_7 = edx < temp12_1;
004332c4                      
004332c6                      if (edx == temp12_1)
004332c6                      {
004332ca                          if (edx == 0)
004332ca                          {
004332e0                              eax_11 = 0;
004332e2                              break;
004332ca                          }
004332ca                          
004332cc                          edx = *(uint8_t*)(eax_9 + 1);
004332d1                          char temp15_1 = m_charbuffer_2[1];
004332d1                          c_7 = edx < temp15_1;
004332d1                          
004332d4                          if (edx == temp15_1)
004332d4                          {
004332d6                              eax_9 += 2;
004332d9                              m_charbuffer_2 = &m_charbuffer_2[2];
004332d9                              
004332de                              if (edx != 0)
004332de                                  continue;
004332de                              
004332e0                              eax_11 = 0;
004332e2                              break;
004332d4                          }
004332c6                      }
004332c6                      
004332e4                      bool c_8 = /* bool c_8 = unimplemented  {sbb eax, eax} */;
004332e6                      eax_11 = ((eax_9 - eax_9) + 1);
004332e6                      break;
004332c0                  }
004332c0                  
004332eb                  if (eax_11 >= 0)
004332eb                      break;
004332b2              }
004332b0          }
004332b0          
004332ef          if (result >= edi)
004332ef              break;
004332ef          
004332f3          _STL::swap(result, edi);
004332fb          result = &result[1];
00433210      }
00433210      
00433316      if ((InterlockedDecrement((arg3 - 0x10)) == 0 && arg3 != 0x14))
0043331e          **(uint32_t**)(arg3 - 0x14)(1);
0043331e      
00433326      return result;
00433200  }

00433327                       90 90 90 90 90 90 90 90 90                                                         .........

00433330  void _STL::__pop_heap(class PStringBase<char>* arg1, class PStringBase<char>* arg2, class PStringBase<char>* arg3, class PStringBase<char> arg4, struct _STL::less<PStringBase<char> > arg5, int32_t* arg6)

00433330  {
00433335      class PSRefBufferCharData<char>* m_charbuffer = arg3->m_charbuffer;
00433346      int32_t ecx;
00433346      
00433346      if (m_charbuffer != arg1->m_charbuffer)
00433346      {
0043335b          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00433363              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00433363          
00433365          class PStringBase<char> m_charbuffer_1 = arg1->m_charbuffer;
00433367          arg3->m_charbuffer = m_charbuffer_1;
0043336d          ecx = InterlockedIncrement((m_charbuffer_1 - 0x10));
00433346      }
00433346      
00433378      int32_t var_18 = ecx;
00433381      InterlockedIncrement((arg4 - 0x10));
00433390      _STL::__adjust_heap(arg1, 0, (((char*)arg2 - arg1) >> 2), arg4, arg5);
00433390      
004333ab      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
004333b3          **(uint32_t**)(arg4 - 0x14)(1);
00433330  }

004333ba                                                                                90 90 90 90 90 90                            ......

004333c0  void _STL::__make_heap(class PStringBase<char>* arg1, class PStringBase<char>* arg2, struct _STL::less<PStringBase<char> > arg3, class PStringBase<char>* arg4, int32_t* arg5)

004333c0  {
004333ce      int32_t ebx_2 = (((char*)arg2 - arg1) >> 2);
004333ce      
004333d4      if (ebx_2 >= 2)
004333d4      {
004333dd          int32_t eax_2;
004333dd          int32_t edx_1;
004333dd          edx_1 = HIGHD(((int64_t)(ebx_2 - 2)));
004333dd          eax_2 = LOWD(((int64_t)(ebx_2 - 2)));
004333e2          int32_t esi_2 = ((eax_2 - edx_1) >> 1);
004333e2          
004333e4          while (true)
004333e4          {
004333e4              class PStringBase<char> m_charbuffer = arg1[esi_2].m_charbuffer;
004333e8              int32_t ecx;
004333e8              int32_t var_18_1 = ecx;
004333f1              InterlockedIncrement((m_charbuffer - 0x10));
004333fa              ecx = _STL::__adjust_heap(arg1, esi_2, ebx_2, m_charbuffer, arg3);
004333fa              
00433404              if (esi_2 == 0)
00433404                  break;
00433404              
00433406              esi_2 -= 1;
004333e4          }
004333d4      }
004333c0  }

0043340e                                            90 90                                                                ..

00433410  uint8_t __thiscall GlobalRegistryInstance::FindCommandByName(class GlobalRegistryInstance* this, class PStringBase<char> const* arg2, class GRPCommand** arg3)

00433410  {
00433419      class GRPCommand** edi = arg3;
0043341d      *(uint32_t*)edi = nullptr;
00433423      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
00433425      arg3 = m_charbuffer;
0043342f      InterlockedIncrement(&m_charbuffer[-1]);
00433439      PStringBase<char>::break_reference(&arg3);
00433443      _strlwr(arg3);
0043345c      void __return;
0043345c      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&this->m_CommandHash.m_intrusiveTable, &__return, &arg3);
00433469      void* esi_2 = &arg3[-5];
0043346e      void* var_4;
0043346e      
0043346e      if (var_4 == 0)
0043346e      {
004334a9          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004334b1              **(uint32_t**)esi_2(1);
004334b1          
004334b4          int32_t eax_5;
004334b4          eax_5 = 0;
004334ba          return 0;
0043346e      }
0043346e      
00433477      *(uint32_t*)edi = *(uint32_t*)((char*)var_4 + 8);
00433477      
00433485      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0043348d          **(uint32_t**)esi_2(1);
0043348d      
00433490      int32_t eax_3;
00433490      eax_3 = 1;
00433496      return 1;
00433410  }

004334bd                                                                                         90 90 90                               ...

004334c0  uint8_t __thiscall GlobalRegistryInstance::FindObjectByName(class GlobalRegistryInstance* this, class PStringBase<char> const* arg2, class GRPObject** arg3)

004334c0  {
004334c9      class GRPObject** edi = arg3;
004334cd      *(uint32_t*)edi = nullptr;
004334d3      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004334d5      arg3 = m_charbuffer;
004334df      InterlockedIncrement(&m_charbuffer[-1]);
004334e9      PStringBase<char>::break_reference(&arg3);
004334f3      _strlwr(arg3);
0043350c      void __return;
0043350c      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&this->m_ObjectHash.m_intrusiveTable, &__return, &arg3);
00433519      void* esi_2 = &arg3[-5];
0043351e      void* var_4;
0043351e      
0043351e      if (var_4 == 0)
0043351e      {
00433559          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00433561              **(uint32_t**)esi_2(1);
00433561          
00433564          int32_t eax_5;
00433564          eax_5 = 0;
0043356a          return 0;
0043351e      }
0043351e      
00433527      *(uint32_t*)edi = *(uint32_t*)((char*)var_4 + 8);
00433527      
00433535      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0043353d          **(uint32_t**)esi_2(1);
0043353d      
00433540      int32_t eax_3;
00433540      eax_3 = 1;
00433546      return 1;
004334c0  }

0043356d                                         90 90 90                                                               ...

00433570  void __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>* this, uint32_t arg2)

00433570  {
0043357b      arg2 = arg2;
0043357f      uint8_t edx = ((int8_t)arg2);
00433583      this->m_buckets = nullptr;
00433586      this->m_firstInterestingBucket = nullptr;
00433589      this->m_numBuckets = 0;
0043358c      this->m_numElements = 0;
00433590      this->vtable = 0x7984f4;
00433596      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004335a9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004335a9      
004335b3      if (eax == bucketSizesEnd_1)
004335b5          eax -= 4;
004335b5      
004335b8      uint32_t eax_1 = *(uint32_t*)eax;
004335bd      this->m_numBuckets = eax_1;
004335bd      
004335c0      if (eax_1 > 0x17)
004335d6          this->m_buckets = operator new[]((eax_1 << 2));
004335c0      else
004335c5          this->m_buckets = &this->m_aInplaceBuckets;
004335c5      
004335dc      class HashTableData<PStringBase<char>,GRPCommand *>** m_buckets = this->m_buckets;
004335df      uint32_t ecx_3 = (this->m_numBuckets << 2);
004335e5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004335f6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00433570  }

004335ff                                                                                               90                                 .

00433600  void __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>* this, uint32_t arg2)

00433600  {
0043360b      arg2 = arg2;
0043360f      uint8_t edx = ((int8_t)arg2);
00433613      this->m_buckets = nullptr;
00433616      this->m_firstInterestingBucket = nullptr;
00433619      this->m_numBuckets = 0;
0043361c      this->m_numElements = 0;
00433620      this->vtable = 0x7984f8;
00433626      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00433639      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00433639      
00433643      if (eax == bucketSizesEnd_1)
00433645          eax -= 4;
00433645      
00433648      uint32_t eax_1 = *(uint32_t*)eax;
0043364d      this->m_numBuckets = eax_1;
0043364d      
00433650      if (eax_1 > 0x17)
00433666          this->m_buckets = operator new[]((eax_1 << 2));
00433650      else
00433655          this->m_buckets = &this->m_aInplaceBuckets;
00433655      
0043366c      class HashTableData<PStringBase<char>,GRPObject *>** m_buckets = this->m_buckets;
0043366f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00433675      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00433686      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00433600  }

0043368f                                               90                                                                 .

00433690  void _STL::__linear_insert(class PStringBase<char>* arg1, class PStringBase<char>* arg2, class PStringBase<char> arg3, struct _STL::less<PStringBase<char> > arg4)

00433690  {
00433691      class PStringBase<char>* ebx = arg1;
0043369b      class PSRefBufferCharData<char>* m_charbuffer_1 = ebx->m_charbuffer;
0043369e      class PStringBase<char> eax = arg3;
004336a0      int32_t eax_2;
004336a0      int32_t ecx;
004336a0      
004336a0      while (true)
004336a0      {
004336a0          char edx = *(uint8_t*)eax;
004336a2          ecx = edx;
004336a4          char temp0_1 = m_charbuffer_1->m_data[0];
004336a4          bool c_1 = edx < temp0_1;
004336a4          
004336a6          if (edx == temp0_1)
004336a6          {
004336aa              if (ecx == 0)
004336aa              {
004336c0                  eax_2 = 0;
004336c2                  break;
004336aa              }
004336aa              
004336ac              edx = *(uint8_t*)(eax + 1);
004336af              ecx = edx;
004336b1              char temp3_1 = m_charbuffer_1->m_data[1];
004336b1              c_1 = edx < temp3_1;
004336b1              
004336b4              if (edx == temp3_1)
004336b4              {
004336b6                  eax += 2;
004336b9                  m_charbuffer_1 = &m_charbuffer_1->m_data[2];
004336b9                  
004336be                  if (ecx != 0)
004336be                      continue;
004336be                  
004336c0                  eax_2 = 0;
004336c2                  break;
004336b4              }
004336a6          }
004336a6          
004336c4          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004336c6          eax_2 = ((eax - eax) + 1);
004336c6          break;
004336a0      }
004336a0      
004336d1      if (eax_2 >= 0)
004336d1      {
0043371e          int32_t var_18_1 = ecx;
00433727          InterlockedIncrement((arg3 - 0x10));
00433732          _STL::__unguarded_linear_insert(arg2, arg3, arg4);
004336d1      }
004336d1      else
004336d1      {
004336e4          _STL::__copy_backward(ebx, arg2, &arg2[1], &arg1, nullptr);
004336e9          class PSRefBufferCharData<char>* m_charbuffer = ebx->m_charbuffer;
004336e9          
004336f0          if (m_charbuffer != arg3)
004336f0          {
00433701              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00433709                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00433709              
0043370f              ebx->m_charbuffer = arg3;
00433711              InterlockedIncrement((arg3 - 0x10));
004336f0          }
004336d1      }
004336d1      
00433749      if ((InterlockedDecrement((arg3 - 0x10)) == 0 && arg3 != 0x14))
00433751          **(uint32_t**)(arg3 - 0x14)(1);
00433690  }

00433758                                                                          90 90 90 90 90 90 90 90                          ........

00433760  void _STL::sort_heap(class PStringBase<char>* arg1, class PStringBase<char>* arg2, struct _STL::less<PStringBase<char> > arg3)

00433760  {
00433776      if ((((char*)arg2 - arg1) & 0xfffffffc) > 4)
00433776      {
00433781          void* __offset(PStringBase<char>, -0x4) esi_1 = &arg2[-1];
004337b1          void* i;
004337b1          
004337b1          do
004337b1          {
00433786              class PStringBase<char> m_charbuffer = ADJ(esi_1)->m_charbuffer;
0043378b              void* i_1 = i;
00433794              InterlockedIncrement((m_charbuffer - 0x10));
0043379d              _STL::__pop_heap(arg1, esi_1, esi_1, m_charbuffer, arg3, nullptr);
004337a2              esi_1 -= 4;
004337a8              i = (((4 - arg1) + esi_1) & 0xfffffffc);
004337b1          } while (i > 4);
00433776      }
00433760  }

004337b8                                                                          90 90 90 90 90 90 90 90                          ........

004337c0  void _STL::__insertion_sort(class PStringBase<char>* arg1, class PStringBase<char>* arg2, struct _STL::less<PStringBase<char> > arg3)

004337c0  {
004337ce      if (arg1 != arg2)
004337ce      {
004337d5          for (void* __offset(PStringBase<char>, 0x4) i = &arg1[1]; i != arg2; i += 4)
004337d5          {
004337e0              class PStringBase<char> eax_1 = *(int32_t*)((char*)ADJ(i) + 4);
004337e3              int32_t ecx;
004337e3              int32_t var_18_1 = ecx;
004337ec              InterlockedIncrement((eax_1 - 0x10));
004337f4              ecx = _STL::__linear_insert(arg1, i, eax_1, arg3);
004337d5          }
004337ce      }
004337c0  }

004337dd                                                                                         8d 49 00                               .I.
00433808                          90 90 90 90 90 90 90 90                                                          ........

00433810  void _STL::__partial_sort(class PStringBase<char>* arg1, class PStringBase<char>* arg2, class PStringBase<char>* arg3, class PStringBase<char>* arg4, struct _STL::less<PStringBase<char> > arg5)

00433810  {
0043381a      class PStringBase<char>* ebp = arg2;
00433827      _STL::__make_heap(arg1, ebp, arg5, nullptr, nullptr);
00433827      
00433835      if (ebp < arg3)
00433835      {
00433837          while (true)
00433837          {
00433837              class PSRefBufferCharData<char>* m_charbuffer_1 = ebp->m_charbuffer;
0043383a              class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0043383c              class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
00433840              int32_t eax_2;
00433840              int32_t ecx;
00433840              
00433840              while (true)
00433840              {
00433840                  char edx_1 = m_charbuffer_2->m_data[0];
00433842                  ecx = edx_1;
00433844                  char temp0_1 = m_charbuffer->m_data[0];
00433844                  bool c_1 = edx_1 < temp0_1;
00433844                  
00433846                  if (edx_1 == temp0_1)
00433846                  {
0043384a                      if (ecx == 0)
0043384a                      {
00433860                          eax_2 = 0;
00433862                          break;
0043384a                      }
0043384a                      
0043384c                      edx_1 = m_charbuffer_2->m_data[1];
0043384f                      ecx = edx_1;
00433851                      char temp3_1 = m_charbuffer->m_data[1];
00433851                      c_1 = edx_1 < temp3_1;
00433851                      
00433854                      if (edx_1 == temp3_1)
00433854                      {
00433856                          m_charbuffer_2 = &m_charbuffer_2->m_data[2];
00433859                          m_charbuffer = &m_charbuffer->m_data[2];
00433859                          
0043385e                          if (ecx != 0)
0043385e                              continue;
0043385e                          
00433860                          eax_2 = 0;
00433862                          break;
00433854                      }
00433846                  }
00433846                  
00433864                  bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00433866                  eax_2 = (((char*)m_charbuffer_2 - m_charbuffer_2) + 1);
00433866                  break;
00433840              }
00433840              
0043386b              if (eax_2 < 0)
0043386b              {
00433874                  int32_t var_1c_1 = ecx;
0043387d                  InterlockedIncrement(&m_charbuffer_1[-1]);
0043388a                  _STL::__pop_heap(arg1, arg2, ebp, m_charbuffer_1, arg5, nullptr);
0043386b              }
0043386b              
00433896              ebp = &ebp[1];
00433896              
0043389b              if (ebp >= arg3)
0043389b                  break;
00433837          }
00433837          
0043389d          ebp = arg2;
00433835      }
00433835      
004338a8      _STL::sort_heap(arg1, ebp, arg5);
00433810  }

004338b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004338c0  void* __thiscall HashTable<PStringBase<char>,GRPCommand *,0>::`scalar deleting destructor'(class HashTable<PStringBase<char>,GRPCommand *,0>* this, uint32_t arg2)

004338c0  {
004338c9      this->vtable = 0x79854c;
004338cf      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_intrusiveTable);
004338d4      class HashTableData<PStringBase<char>,GRPCommand *>** m_buckets = this->m_intrusiveTable.m_buckets;
004338c4      this->m_intrusiveTable.vtable = 0x7984f4;
004338c4      
004338e2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004338e5          operator delete[](m_buckets);
004338e5      
004338c4      this->m_intrusiveTable.m_buckets = nullptr;
004338c4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004338c4      this->m_intrusiveTable.m_numBuckets = 0;
004338c4      this->m_intrusiveTable.m_numElements = 0;
004338c4      
00433900      if ((arg2 & 1) != 0)
00433903          operator delete(this);
00433903      
0043390f      return this;
004338c0  }

00433912                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00433920  void* __thiscall HashTable<PStringBase<char>,GRPObject *,0>::`scalar deleting destructor'(class HashTable<PStringBase<char>,GRPObject *,0>* this, uint32_t arg2)

00433920  {
00433929      this->vtable = &HashTable<class PStringBase<char>,class GRPObject*,0>::`vftable';
0043392f      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_intrusiveTable);
00433934      class HashTableData<PStringBase<char>,GRPObject *>** m_buckets = this->m_intrusiveTable.m_buckets;
00433924      this->m_intrusiveTable.vtable = 0x7984f8;
00433924      
00433942      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00433945          operator delete[](m_buckets);
00433945      
00433924      this->m_intrusiveTable.m_buckets = nullptr;
00433924      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00433924      this->m_intrusiveTable.m_numBuckets = 0;
00433924      this->m_intrusiveTable.m_numElements = 0;
00433924      
00433960      if ((arg2 & 1) != 0)
00433963          operator delete(this);
00433963      
0043396f      return this;
00433920  }

00433972                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00433980  void __convention("regparm") _STL::__introsort_loop(class PStringBase<char>* arg1, class PStringBase<char>* arg2, class PStringBase<char>* arg3, int32_t arg4, struct _STL::less<PStringBase<char> > arg5)

00433980  {
00433980      int32_t ebx;
00433980      int32_t var_4 = ebx;
00433985      int32_t ebp;
00433985      int32_t var_8 = ebp;
00433986      int32_t esi;
00433986      int32_t var_c = esi;
00433987      int32_t edi;
00433987      int32_t var_10 = edi;
00433987      int32_t* esp_1 = &var_10;
00433988      class PStringBase<char>* edi_1 = arg2;
00433988      
00433996      if ((((char*)edi_1 - arg1) & 0xfffffffc) > 0x40)
00433996      {
0043399c          int32_t ebp_1 = *(uint32_t*)((char*)arg5 + 0);
0043399c          
004339a0          while (true)
004339a0          {
004339a0              int32_t eax_3 = esp_1[8];
004339a6              *(uint32_t*)((char*)esp_1 - 4) = ebp_1;
004339a6              
004339a7              if (eax_3 == 0)
004339a7              {
00433a0b                  *(uint32_t*)((char*)esp_1 - 8) = 0;
00433a0d                  *(uint32_t*)((char*)esp_1 - 0xc) = edi_1;
00433a0e                  *(uint32_t*)((char*)esp_1 - 0x10) = edi_1;
00433a0f                  *(uint32_t*)((char*)esp_1 - 0x14) = arg1;
00433a10                  _STL::__partial_sort();
00433a15                  break;
004339a7              }
004339a7              
004339b2              int32_t ecx;
004339b2              *(uint32_t*)((char*)esp_1 - 8) = ecx;
004339b3              int32_t eax_7;
004339b3              int32_t edx_1;
004339b3              edx_1 = HIGHD(((int64_t)(((char*)edi_1 - arg1) >> 2)));
004339b3              eax_7 = LOWD(((int64_t)(((char*)edi_1 - arg1) >> 2)));
004339a6              esp_1[8] = (eax_3 - 1);
004339bd              *(uint32_t*)((char*)esp_1 - 0xc) = ebp_1;
004339c3              *(uint32_t*)((char*)esp_1 - 0x10) = &edi_1[-1];
004339c7              *(uint32_t*)((char*)esp_1 - 0x14) = &arg1[((eax_7 - edx_1) >> 1)];
004339c8              *(uint32_t*)((char*)esp_1 - 0x18) = arg1;
004339ce              int32_t eax_11 = *(uint32_t*)_STL::__median();
004339d0              *(uint32_t*)((char*)esp_1 - 8) = eax_11;
004339d8              *(uint32_t*)((char*)esp_1 - 0xc) = (eax_11 - 0x10);
004339d9              InterlockedIncrement();
004339df              *(uint32_t*)((char*)esp_1 - 0x10) = edi_1;
004339e0              *(uint32_t*)((char*)esp_1 - 0x14) = arg1;
004339e1              class PStringBase<char>* eax_13 = _STL::__unguarded_partition();
004339e8              int32_t eax_14 = esp_1[7];
004339ec              *(uint32_t*)((char*)esp_1 - 0x18) = ebp_1;
004339ed              *(uint32_t*)((char*)esp_1 - 0x1c) = eax_14;
004339ee              *(uint32_t*)((char*)esp_1 - 0x20) = 0;
004339f0              *(uint32_t*)((char*)esp_1 - 0x24) = edi_1;
004339f1              *(uint32_t*)((char*)esp_1 - 0x28) = eax_13;
004339f2              ecx = _STL::__introsort_loop();
004339f7              edi_1 = eax_13;
004339fe              esp_1 -= 4;
004339fe              
00433a04              if ((((char*)eax_13 - arg1) & 0xfffffffc) <= 0x40)
00433a04              {
00433a06                  *(uint32_t*)esp_1;
00433a06                  esp_1[1];
00433a06                  esp_1[2];
00433a06                  esp_1[3];
00433a0a                  return;
00433a04              }
004339a0          }
00433996      }
00433996      
00433a18      *(uint32_t*)esp_1;
00433a18      esp_1[1];
00433a18      esp_1[2];
00433a18      esp_1[3];
00433980  }

00433a1d                                                                                         90 90 90                               ...

00433a20  void __fastcall GlobalRegistryInstance::GlobalRegistryInstance(class GlobalRegistryInstance* this)

00433a20  {
00433a26      this->m_Characters.m_nStartIndex = 0;
00433a28      this->m_Characters.m_nEndIndex = 0;
00433a2b      this->m_Characters.m_nNumElements = 0;
00433a36      this->m_CommandHash.vtable = 0x79854c;
00433a40      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>(&this->m_CommandHash.m_intrusiveTable, 0x17);
00433a4d      this->m_ObjectHash.vtable = &HashTable<class PStringBase<char>,class GRPObject*,0>::`vftable';
00433a57      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>(&this->m_ObjectHash.m_intrusiveTable, 0x17);
00433a5c      this->m_ConsoleCallbackObjects.m_data = 0;
00433a62      this->m_ConsoleCallbackObjects.m_sizeAndDeallocate = 0;
00433a68      this->m_ConsoleCallbackObjects.m_num = 0;
00433a20  }

00433a73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00433a80  void __fastcall GlobalRegistryInstance::~GlobalRegistryInstance(class GlobalRegistryInstance* this)

00433a80  {
00433a96      void __return;
00433a96      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_ObjectHash.m_intrusiveTable, &__return);
00433a9b      class HashTableData<unsigned long,DBOCache *>* esi = eax->m_currElement;
00433aa0      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = eax->m_currHashTable;
00433aa2      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00433aa5      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_2 = m_currHashTable_1;
00433aa5      
00433aa9      if (esi != 0)
00433aa9      {
00433aba          while (true)
00433aba          {
00433abf              if (esi->m_data->vtable->RemoveObj_Internal() == 0)
00433abf              {
00433bab                  esi = esi->m_hashNext;
00433bab                  
00433bb0                  if (esi != 0)
00433bb0                      continue;
00433bb0                  else
00433bb0                  {
00433bcb                      class HashTableData<unsigned long,DBOCache *>* i;
00433bcb                      
00433bcb                      do
00433bcb                      {
00433bc0                          m_currBucket = &m_currBucket[1];
00433bc0                          
00433bc5                          if (m_currBucket == &m_currHashTable_1->m_buckets[m_currHashTable_1->m_numBuckets])
00433bc5                              goto label_433be6;
00433bc5                          
00433bc7                          i = *(uint32_t*)m_currBucket;
00433bcb                      } while (i == 0);
00433bcb                      
00433bcd                      esi = i;
00433bb0                  }
00433abf              }
00433abf              else
00433abf              {
00433ac5                  class DBOCache* m_data_1 = esi->m_data;
00433ac5                  
00433aca                  if (m_data_1 != 0)
00433aca                  {
00433acf                      void* __offset(IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::VTable, -0x14) edi_1 = (m_data_1->m_ObjTable.m_intrusiveTable.vtable - 0x14);
00433acf                      
00433ae2                      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00433aea                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00433aea                      
00433aef                      void* __offset(AutoGrowHashTable<IDClass<_tagDataID,32,0>,DBObj *>::VTable, -0x14) edi_3 = (m_data_1->m_ObjTable.vtable - 0x14);
00433aef                      
00433b02                      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
00433b0a                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
00433b0a                      
00433b0d                      operator delete(m_data_1);
00433aca                  }
00433aca                  
00433b19                  esi->m_data = nullptr;
00433b20                  class HashTableData<unsigned long,DBOCache *>* m_hashNext_1 = esi->m_hashNext;
00433b25                  class HashTableData<unsigned long,DBOCache *>* var_1c_1 = esi;
00433b29                  class HashTableData<unsigned long,DBOCache *>** m_currBucket_2 = m_currBucket;
00433b29                  
00433b2b                  if (m_hashNext_1 == 0)
00433b2b                  {
00433b36                      while (true)
00433b36                      {
00433b36                          m_currBucket_2 = &m_currBucket_2[1];
00433b36                          
00433b3b                          if (m_currBucket_2 == &m_currHashTable_2->m_buckets[m_currHashTable_2->m_numBuckets])
00433b3b                              break;
00433b3b                          
00433b3d                          class HashTableData<unsigned long,DBOCache *>* m_hashNext_2 = *(uint32_t*)m_currBucket_2;
00433b3d                          
00433b41                          if (m_hashNext_2 != 0)
00433b41                          {
00433b43                              m_hashNext_1 = m_hashNext_2;
00433b43                              break;
00433b41                          }
00433b36                      }
00433b2b                  }
00433b2b                  
00433b45                  class HashTableData<unsigned long,DBOCache *>* m_hashNext = *(uint32_t*)m_currBucket;
00433b45                  
00433b49                  if (m_hashNext == esi)
00433b60                      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00433b49                  else
00433b49                  {
00433b57                      class HashTableData<unsigned long,DBOCache *>* m_hashNext_3;
00433b57                      
00433b57                      do
00433b57                      {
00433b50                          m_hashNext_3 = m_hashNext;
00433b52                          m_hashNext = m_hashNext->m_hashNext;
00433b57                      } while (m_hashNext != esi);
00433b57                      
00433b5b                      if (m_hashNext_3 != 0)
00433b67                          m_hashNext_3->m_hashNext = m_hashNext->m_hashNext;
00433b5b                      else
00433b60                          *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00433b49                  }
00433b49                  
00433b74                  m_currHashTable_2->m_numElements -= 1;
00433b77                  esi = m_hashNext_1;
00433b79                  m_currBucket = m_currBucket_2;
00433b79                  
00433b7b                  if (var_1c_1 != 0)
00433b7b                  {
00433b7f                      int32_t* edi_5 = (var_1c_1->m_hashKey - 0x14);
00433b7f                      
00433b92                      if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
00433b9a                          **(uint32_t**)edi_5(1);
00433b9a                      
00433ba1                      operator delete(var_1c_1);
00433b7b                  }
00433abf              }
00433abf              
00433bd1              if (esi == 0)
00433bd1                  break;
00433bd1              
00433ab1              m_currHashTable_1 = m_currHashTable_2;
00433aba          }
00433aa9      }
00433aa9      
00433be6  label_433be6:
00433be6      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_14 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_CommandHash.m_intrusiveTable, &__return);
00433beb      class HashTableData<unsigned long,DBOCache *>* i_3 = eax_14->m_currElement;
00433bf0      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_14->m_currHashTable;
00433bf2      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = eax_14->m_currBucket;
00433bf5      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_3 = m_currHashTable;
00433bf5      
00433bf9      if (i_3 != 0)
00433bf9      {
00433c00          while (true)
00433c00          {
00433c00              class DBOCache* m_data = i_3->m_data;
00433c00              
00433c05              if (m_data != 0)
00433c05              {
00433c0a                  void* __offset(IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::VTable, -0x14) esi_2 = (m_data->m_ObjTable.m_intrusiveTable.vtable - 0x14);
00433c0a                  
00433c1d                  if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00433c25                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00433c25                  
00433c2a                  void* __offset(AutoGrowHashTable<IDClass<_tagDataID,32,0>,DBObj *>::VTable, -0x14) esi_4 = (m_data->m_ObjTable.vtable - 0x14);
00433c2a                  
00433c3d                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00433c45                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00433c45                  
00433c48                  operator delete(m_data);
00433c4d                  m_currHashTable = m_currHashTable_3;
00433c05              }
00433c05              
00433c54              i_3->m_data = nullptr;
00433c5b              i_3 = i_3->m_hashNext;
00433c5b              
00433c60              if (i_3 == 0)
00433c60              {
00433c7c                  class HashTableData<unsigned long,DBOCache *>* i_1;
00433c7c                  
00433c7c                  do
00433c7c                  {
00433c70                      m_currBucket_1 = &m_currBucket_1[1];
00433c70                      
00433c75                      if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00433c75                          goto label_433c92;
00433c75                      
00433c77                      i_1 = *(uint32_t*)m_currBucket_1;
00433c7c                  } while (i_1 == 0);
00433c7c                  
00433c7e                  i_3 = i_1;
00433c7e                  
00433c82                  if (i_3 == 0)
00433c82                      break;
00433c60              }
00433c00          }
00433bf9      }
00433bf9      
00433c92  label_433c92:
00433c92      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_CommandHash.m_intrusiveTable);
00433c97      class GlobalRegistryInstance* this_1 = this;
00433ca7      void* ecx_15 = &this_1->m_ObjectHash.m_intrusiveTable.m_buckets[this_1->m_ObjectHash.m_intrusiveTable.m_numBuckets];
00433cb0      int32_t* m_firstInterestingBucket_1;
00433cb0      void* i_4;
00433cb0      
00433cb0      if (this_1->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket == ecx_15)
00433cb0      {
00433cca      label_433cca:
00433cca          m_firstInterestingBucket_1 = nullptr;
00433ccc          i_4 = nullptr;
00433cb0      }
00433cb0      else
00433cb0      {
00433cb2          while (true)
00433cb2          {
00433cb2              class HashTableData<PStringBase<char>,GRPObject *>** m_firstInterestingBucket = this_1->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket;
00433cb2              
00433cbb              if (*(uint32_t*)m_firstInterestingBucket != 0)
00433cbb              {
00433cd0                  m_firstInterestingBucket_1 = this_1->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket;
00433cd6                  i_4 = *(uint32_t*)m_firstInterestingBucket_1;
00433cd6                  break;
00433cbb              }
00433cbb              
00433cc2              this_1->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
00433cc2              
00433cc8              if (&m_firstInterestingBucket[1] == ecx_15)
00433cc8                  goto label_433cca;
00433cb2          }
00433cb0      }
00433cb0      
00433cda      int32_t* m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00433cda      
00433cdc      if (i_4 != 0)
00433cdc      {
00433ce2          while (true)
00433ce2          {
00433ce2              void* ebx = *(uint32_t*)((char*)i_4 + 8);
00433ce2              
00433ce7              if (ebx != 0)
00433ce7              {
00433cec                  int32_t* esi_6 = (*(uint32_t*)((char*)ebx + 8) - 0x14);
00433cec                  
00433cff                  if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00433d07                      **(uint32_t**)esi_6(1);
00433d07                  
00433d0c                  int32_t* esi_8 = (*(uint32_t*)((char*)ebx + 4) - 0x14);
00433d0c                  
00433d1f                  if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
00433d27                      **(uint32_t**)esi_8(1);
00433d27                  
00433d2a                  operator delete(ebx);
00433d2f                  this_1 = this;
00433ce7              }
00433ce7              
00433d36              *(uint32_t*)((char*)i_4 + 8) = 0;
00433d3d              i_4 = *(uint32_t*)((char*)i_4 + 4);
00433d3d              
00433d42              if (i_4 == 0)
00433d42              {
00433d5f                  void* i_2;
00433d5f                  
00433d5f                  do
00433d5f                  {
00433d53                      m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
00433d53                      
00433d58                      if (m_firstInterestingBucket_2 == &this_1->m_ObjectHash.m_intrusiveTable.m_buckets[this_1->m_ObjectHash.m_intrusiveTable.m_numBuckets])
00433d58                          goto label_433d71;
00433d58                      
00433d5a                      i_2 = *(uint32_t*)m_firstInterestingBucket_2;
00433d5f                  } while (i_2 == 0);
00433d5f                  
00433d61                  i_4 = i_2;
00433d61                  
00433d65                  if (i_4 == 0)
00433d65                      break;
00433d42              }
00433ce2          }
00433cdc      }
00433cdc      
00433d71  label_433d71:
00433d71      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this_1->m_ObjectHash.m_intrusiveTable);
00433d76      uint32_t m_sizeAndDeallocate = this_1->m_ConsoleCallbackObjects.m_sizeAndDeallocate;
00433d8c      this_1->m_ConsoleCallbackObjects.m_num = 0;
00433d8c      
00433d92      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00433d92      {
00433d9b          operator delete[](this_1->m_ConsoleCallbackObjects.m_data);
00433da3          this_1->m_ConsoleCallbackObjects.m_data = 0;
00433da9          this_1->m_ConsoleCallbackObjects.m_sizeAndDeallocate = 0;
00433d92      }
00433d92      else if (this_1->m_ConsoleCallbackObjects.m_data != 0)
00433db7      {
00433db9          int32_t eax_28 = (m_sizeAndDeallocate & 0x7fffffff);
00433dbe          int32_t eax_29 = (eax_28 - 1);
00433dbe          
00433dbf          if ((eax_28 - 1) >= 0)
00433dbf          {
00433dcc              int32_t temp1_1;
00433dcc              
00433dcc              do
00433dcc              {
00433dc1                  temp1_1 = eax_29;
00433dc1                  eax_29 -= 1;
00433dc2                  this_1->m_ConsoleCallbackObjects.m_data[(eax_29 + 1)] = 0;
00433dcc              } while ((temp1_1 - 1) >= 0);
00433dbf          }
00433db7      }
00433db7      
00433de0      if ((this_1->m_ConsoleCallbackObjects.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00433de9          operator delete[](this_1->m_ConsoleCallbackObjects.m_data);
00433de9      
00433df1      this_1->m_ObjectHash.vtable = &HashTable<class PStringBase<char>,class GRPObject*,0>::`vftable';
00433e03      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this_1->m_ObjectHash.m_intrusiveTable);
00433e08      class HashTableData<PStringBase<char>,GRPObject *>** m_buckets = this_1->m_ObjectHash.m_intrusiveTable.m_buckets;
00433dfb      this_1->m_ObjectHash.m_intrusiveTable.vtable = 0x7984f8;
00433dfb      
00433e16      if (m_buckets != &this_1->m_ObjectHash.m_intrusiveTable.m_aInplaceBuckets)
00433e19          operator delete[](m_buckets);
00433e19      
00433dfb      this_1->m_ObjectHash.m_intrusiveTable.m_buckets = nullptr;
00433dfb      this_1->m_ObjectHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00433dfb      this_1->m_ObjectHash.m_intrusiveTable.m_numBuckets = 0;
00433dfb      this_1->m_ObjectHash.m_intrusiveTable.m_numElements = 0;
00433e33      this->m_CommandHash.vtable = 0x79854c;
00433e45      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_CommandHash.m_intrusiveTable);
00433e4a      class HashTableData<PStringBase<char>,GRPCommand *>** m_buckets_1 = this->m_CommandHash.m_intrusiveTable.m_buckets;
00433e3d      this->m_CommandHash.m_intrusiveTable.vtable = 0x7984f4;
00433e3d      
00433e58      if (m_buckets_1 != &this->m_CommandHash.m_intrusiveTable.m_aInplaceBuckets)
00433e5b          operator delete[](m_buckets_1);
00433e5b      
00433e3d      this->m_CommandHash.m_intrusiveTable.m_buckets = nullptr;
00433e3d      this->m_CommandHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00433e3d      this->m_CommandHash.m_intrusiveTable.m_numBuckets = 0;
00433e3d      this->m_CommandHash.m_intrusiveTable.m_numElements = 0;
00433a80  }

00433b4d                                         8d 49 00                                                               .I.
00433c6d                                         8d 49 00                                                               .I.
00433e77                                                                       90 90 90 90 90 90 90 90 90                         .........

00433e80  uint8_t __fastcall GlobalRegistryInstance::ConsoleCommand_Dump(class PStringBaseArray<char> const* arg1)

00433e80  {
00433e80      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6;
00433e80      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_6;
00433e82      class PStringBaseArray<char>* esi = arg1;
00433e82      
00433e8a      if (esi->m_num < 1)
00433e8a      {
00433e8c          int32_t eax;
00433e8c          eax = 0;
00433e90          return 0;
00433e8a      }
00433e8a      
00433e91      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00433e99      int32_t ebx;
00433e99      ebx = 1;
00433e99      
00433e9b      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00433e9b      {
00433ea2          void* eax_1 = operator new(0x8100);
00433ea2          
00433eac          if (eax_1 == 0)
00433eb7              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00433eac          else
00433eb0              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_1);
00433eb0          
00433eb9          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00433e9b      }
00433e9b      
00433ecf      int32_t eax_4;
00433ecf      void* __offset(PSRefBufferCharData<char>, -0x14) esi_5;
00433ecf      
00433ecf      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, esi->m_data, &arg1) == 0)
00433ecf      {
00433f71          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
00433f76          arg1 = PStringBase<char>::s_NullBuffer_3;
00433f7e          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
00433f88          class PSRefBufferCharData<char>* __saved_edi_2 = esi->m_data->m_charbuffer;
00433f93          PStringBase<char>::sprintf(&arg1, "Unrecognized object: %s\n\n");
00433f9d          GlobalRegistry::OutputText(&arg1);
00433fa6          esi_5 = ((char*)arg1 - 0x14);
00433fb0          ebx = 0;
00433fb2          eax_4 = InterlockedDecrement(((char*)esi_5 + 4));
00433fb8      label_433fb8:
00433fb8          
00433fbe          if ((eax_4 == 0 && esi_5 != 0))
00433fc6              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00433ecf      }
00433ecf      else
00433ecf      {
00433ed5          class PStringBaseArray<char>* ecx_3 = arg1;
00433ed9          int32_t eax_3;
00433ed9          eax_3 = ecx_3->m_data;
00433ed9          *(uint8_t*)((char*)eax_3)[1] = *(uint8_t*)((char*)ecx_3->m_data)[1];
00433ed9          *(uint8_t*)((char*)eax_3)[2] = *(uint8_t*)((char*)ecx_3->m_data)[2];
00433ed9          *(uint8_t*)((char*)eax_3)[3] = *(uint8_t*)((char*)ecx_3->m_data)[3];
00433ede          int32_t* esi_1 = *(uint32_t*)(eax_3 + 0x34)();
00433ede          
00433ee2          if (esi_1 != 0)
00433ee2          {
00433ee8              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00433ef4              PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_1;
00433efc              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00433f07              *(uint32_t*)(*(uint32_t*)esi_1 + 0x4c)(&PStringBase<char>::s_NullBuffer_4);
00433f0a              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00433f0f              arg1 = PStringBase<char>::s_NullBuffer_2;
00433f17              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00433f20              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
00433f21              int32_t var_18_1 = esi_1[1];
00433f2c              PStringBase<char>::sprintf(&arg1, "%s == %s\n\n");
00433f36              GlobalRegistry::OutputText(&arg1);
00433f45              void* __offset(PStringBaseArray<char>, -0x14) esi_3 = ((char*)arg1 - 0x14);
00433f45              
00433f57              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00433f5f                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00433f5f              
00433f65              esi_5 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
00433f6c              eax_4 = InterlockedDecrement(((char*)esi_5 + 4));
00433f6f              goto label_433fb8;
00433ee2          }
00433ecf      }
00433fc8      eax_4 = ebx;
00433fcd      return eax_4;
00433e80  }

00433fce                                            90 90                                                                ..

00433fd0  uint8_t GlobalRegistryInstance::ConsoleCommand_Set(class PStringBaseArray<char> const* arg1)

00433fd0  {
00433fd3      int32_t __saved_ebp_1;
00433fd3      int32_t __saved_ebp = __saved_ebp_1;
00433fd4      class PStringBaseArray<char>* ebp = arg1;
00433fd8      uint32_t m_num = ebp->m_num;
00433fd8      
00433fde      if (m_num < 1)
00433fde      {
00433fe0          m_num = 0;
00433fe6          return 0;
00433fde      }
00433fde      
00433fe7      class PStringBaseArray<char>* var_14;
00433fe7      
00433fe7      if (m_num == 1)
00433fe7      {
00433fe9          var_14 = ebp;
00433ff6          class PStringBaseArray<char>* ecx;
00433ff6          return GlobalRegistryInstance::ConsoleCommand_Dump(ecx);
00433fe7      }
00433fe7      
00433ff7      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00433ffe      arg1 = 1;
00433ffe      
00434003      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00434003      {
00434005          var_14 = 0x8100;
0043400a          void* eax_1 = operator new(var_14);
0043400a          
00434014          if (eax_1 == 0)
0043401f              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00434014          else
00434018              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_1);
00434018          
00434021          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00434003      }
00434003      
00434026      class PStringBase<char>* m_data = ebp->m_data;
00434029      class PStringBaseArray<char>* ebx;
00434029      var_14 = ebx;
0043402a      class PStringBaseArray<char>* esi;
0043402a      class PStringBaseArray<char>* var_18 = esi;
00434033      class PStringBaseArray<char>** esp_1 = &var_18;
0043403a      class GRPObject* PStringBase<char>::s_NullBuffer_6;
0043403a      int32_t eax_4;
0043403a      void* __offset(PSRefBufferCharData<char>, -0x14) esi_7;
0043403a      
0043403a      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, m_data, &PStringBase<char>::s_NullBuffer_6) == 0)
0043403a      {
004341f8          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
004341fd          PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_4;
00434205          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
00434210          class PSRefBufferCharData<char>* m_charbuffer = ebp->m_data->m_charbuffer;
00434215          char const* const var_20_10 = "Unrecognized object: %s\n\n";
0043421b          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_6, "Unrecognized object: %s\n\n");
00434225          GlobalRegistry::OutputText(&PStringBase<char>::s_NullBuffer_6);
0043422e          esi_7 = ((char*)PStringBase<char>::s_NullBuffer_6 - 0x14);
00434238          arg1 = 0;
0043423d          eax_4 = InterlockedDecrement(((char*)esi_7 + 4));
0043423d          esp_1 = &var_18;
00434243      label_434243:
00434243          
00434249          if ((eax_4 == 0 && esi_7 != 0))
00434249          {
0043424b              int32_t edx_7 = *(int32_t*)((char*)ADJ(esi_7) + -0x14);
0043424f              *(uint32_t*)((char*)esp_1 - 4) = 1;
00434251              *(uint32_t*)edx_7();
00434249          }
0043403a      }
0043403a      else
0043403a      {
00434046          eax_4 = PStringBase<char>::s_NullBuffer_6->vtable->AsVariableObject();
00434046          
0043404d          if (eax_4 != 0)
0043404d          {
00434053              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043405e              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_1;
00434062              int32_t edi;
00434062              int32_t var_1c_1 = edi;
00434067              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0043406c              int32_t i = 1;
0043406c              
00434073              if (ebp->m_num > 1)
00434073              {
004340e3                  do
004340e3                  {
00434078                      if (i > 1)
00434078                      {
0043407a                          void* const var_20_2 = &data_794098;
00434083                          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_6, &data_794098);
00434088                          class GRPObject* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_6;
0043408c                          int32_t vtable = PStringBase<char>::s_NullBuffer_7->vtable;
0043408c                          
00434092                          if (vtable != 1)
00434092                          {
0043409b                              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_5, PStringBase<char>::s_NullBuffer_7, (vtable - 1));
004340a0                              PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_6;
00434092                          }
00434092                          
004340b7                          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_7[-1]) == 0 && PStringBase<char>::s_NullBuffer_7 != 0x14))
004340b7                          {
004340bb                              int32_t var_20_5 = 1;
004340bf                              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_7 + -0x14)(1);
004340b7                          }
00434078                      }
00434078                      
004340c7                      char* m_charbuffer_1 = ebp->m_data[i].m_charbuffer;
004340c9                      int32_t ecx_8 = *(uint32_t*)(m_charbuffer_1 - 4);
004340c9                      
004340cf                      if (ecx_8 != 1)
004340d8                          PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_5, m_charbuffer_1, (ecx_8 - 1));
004340d8                      
004340e0                      i += 1;
004340e3                  } while (i < ebp->m_num);
00434073              }
00434073              
004340f9              if (*(uint32_t*)(*(uint32_t*)eax_4 + 0x50)(&PStringBase<char>::s_NullBuffer_5) == 0)
004340f9              {
004341a1                  char const* const var_1c_9 = "Error setting variable.  Make su…";
004341aa                  PStringBase<char>::PStringBase<char>(&arg_8, "Error setting variable.  Make su…");
004341b4                  GlobalRegistry::OutputText(&arg_8);
004341bd                  int32_t* esi_9 = ((char*)arg_8 - 0x14);
004341bd                  
004341d3                  if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
004341d3                  {
004341d7                      int32_t var_1c_12 = 1;
004341db                      **(uint32_t**)esi_9(1);
004341d3                  }
004341d3                  
004341e3                  arg_8 = 0;
004341e3                  goto label_4341ec;
004340f9              }
004340f9              
004340ff              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00434104              __return_addr = PStringBase<char>::s_NullBuffer_2;
0043410c              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00434117              *(uint32_t*)(*(uint32_t*)eax_4 + 0x4c)(&__return_addr);
0043411a              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0043411f              PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_3;
00434127              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
00434130              void* const __return_addr_1 = __return_addr;
00434131              int32_t var_20_8 = *(uint32_t*)(eax_4 + 4);
00434136              char const* const var_24_3 = "%s = %s\n\n";
0043413c              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_6, "%s = %s\n\n");
00434146              GlobalRegistry::OutputText(&PStringBase<char>::s_NullBuffer_6);
00434155              void* __offset(GRPObject, -0x14) esi_3 = ((char*)PStringBase<char>::s_NullBuffer_6 - 0x14);
00434155              
00434167              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00434167              {
0043416b                  int32_t var_1c_6 = 1;
0043416f                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00434167              }
00434167              
00434175              void* esi_5 = ((char*)__return_addr - 0x14);
00434175              
00434184              if ((InterlockedDecrement(((char*)esi_5 + 4)) != 0 || esi_5 == 0))
00434184              {
004341ec              label_4341ec:
004341ec                  void* var_8;
004341ec                  esi_7 = ((char*)var_8 - 0x14);
004341f3                  eax_4 = InterlockedDecrement(((char*)esi_7 + 4));
004341f5                  esp_1 = &var_14;
00434184              }
00434184              else
00434184              {
00434188                  int32_t var_1c_8 = 1;
0043418c                  **(uint32_t**)esi_5(1);
00434192                  esi_7 = &PStringBase<char>::s_NullBuffer_5->m_data[0xffffffec];
00434199                  eax_4 = InterlockedDecrement(((char*)esi_7 + 4));
0043419b                  esp_1 = &var_18;
00434184              }
00434184              
004340f9              goto label_434243;
0043404d          }
0043403a      }
00434253      eax_4 = esp_1[7];
00434257      *(uint32_t*)esp_1;
00434257      esp_1[1];
00434257      esp_1[2];
0043425d      return eax_4;
00433fd0  }

0043425e                                                                                            90 90                                ..

00434260  uint8_t GlobalRegistryInstance::ConsoleCommand_Toggle(class PStringBaseArray<char> const* arg1)

00434260  {
00434264      class PStringBaseArray<char>* esi = arg1;
00434264      
0043426c      if (esi->m_num < 1)
0043426c      {
0043426e          int32_t eax;
0043426e          eax = 0;
00434274          return 0;
0043426c      }
0043426c      
00434275      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
0043427b      int32_t ebx;
0043427b      ebx = 0;
0043427b      
0043427f      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043427f      {
00434286          void* eax_1 = operator new(0x8100);
00434286          
00434290          if (eax_1 == 0)
0043429b              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00434290          else
00434294              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_1);
00434294          
0043429d          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043427f      }
0043427f      
004342b3      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, esi->m_data, &arg1) == 0)
004342b3      {
00434391          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
00434396          arg1 = PStringBase<char>::s_NullBuffer_3;
0043439e          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
004343a8          class PSRefBufferCharData<char>* __saved_edi_3 = esi->m_data->m_charbuffer;
004343b3          PStringBase<char>::sprintf(&arg1, "Unrecognized object: %s\n\n");
004343bd          GlobalRegistry::OutputText(&arg1);
004343c6          void* __offset(PStringBaseArray<char>, -0x14) esi_3 = ((char*)arg1 - 0x14);
004343d0          ebx = 0;
004343d0          
004343de          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004343e6              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004342b3      }
004342b3      else
004342b3      {
004342c2          class GRPTypedVariableObject* esi_1 = *(int32_t*)((char*)arg1->m_data + 0x44)();
004342c2          
004342c6          if (esi_1 != 0)
004342c6          {
004342d0              if (esi_1->m_Type != GRVDataType_Bool)
004342d0              {
0043436c                  PStringBase<char>::PStringBase<char>(&arg1, "The variable's data type is not …");
00434376                  GlobalRegistry::OutputText(&arg1);
00434382                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg1);
00434389                  int32_t eax_8;
00434389                  eax_8 = 0;
00434390                  return 0;
004342d0              }
004342d0              
004342d9              ebx = *(uint8_t*)esi_1->m_pVariable;
004342e8              arg1 = ebx == 0;
004342ec              GRPTypedVariableObject::SetVariable(esi_1, &arg1);
004342f1              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004342fc              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_1;
00434304              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00434306              esi_1->vtable->ConvertToString(&PStringBase<char>::s_NullBuffer_5);
00434312              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00434317              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0043431f              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00434328              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_5;
00434329              class PSRefBufferCharData<char>* m_charbuffer = esi_1->m_Name.m_charbuffer;
00434334              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "%s = %s\n\n");
0043433e              GlobalRegistry::OutputText(&PStringBase<char>::s_NullBuffer_4);
0043434c              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_4);
00434355              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_5);
0043435b              int32_t eax_7;
0043435b              eax_7 = 1;
00434362              return 1;
004342c6          }
004342b3      }
004342b3      
004343e8      int32_t eax_4;
004343e8      eax_4 = ebx;
004343ef      return eax_4;
00434260  }


004343f0  uint8_t GlobalRegistryInstance::ConsoleCommand_ListCommands()

004343f0  {
00434400      uint32_t var_28;
00434400      PStringBase<char>::PStringBase<char>(&var_28, "Listing available commands:\n\n");
0043440a      GlobalRegistry::OutputText(&var_28);
00434413      int32_t* esi_1 = (var_28 - 0x14);
00434413      
00434429      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00434431          **(uint32_t**)esi_1(1);
00434431      
00434433      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00434438      int32_t ebp = 0;
0043443c      int32_t var_24 = 0;
00434440      int32_t var_20 = 0;
00434444      int32_t i_8 = 0;
00434444      
00434448      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00434448      {
0043444f          void* eax_1 = operator new(0x8100);
0043444f          
00434459          if (eax_1 == 0)
00434464              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00434459          else
0043445d              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_1);
0043445d          
00434466          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00434448      }
00434448      
00434476      void __return;
00434476      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&GlobalRegistry::s_pcGlobalRegistry_1->m_CommandHash.m_intrusiveTable, &__return);
0043447b      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
0043447d      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
00434480      class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>* m_currElement = eax_2->m_currElement;
0043448d      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
00434491      class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPCommand *> *,0>* i;
00434491      
00434491      if (GlobalRegistry::s_pcGlobalRegistry == 0)
00434491      {
00434498          void* eax_3;
00434498          eax_3 = operator new(0x8100);
00434498          
004344a2          if (eax_3 == 0)
004344b2              GlobalRegistry::s_pcGlobalRegistry = nullptr;
004344a2          else
004344a2          {
004344a6              class GlobalRegistryInstance* eax_4;
004344a6              eax_4 = GlobalRegistryInstance::GlobalRegistryInstance(eax_3);
004344ab              GlobalRegistry::s_pcGlobalRegistry = eax_4;
004344a2          }
00434491      }
00434491      
004344ba      if (m_currElement != 0)
004344ba      {
004344c8          while (true)
004344c8          {
004344c8              class HashTableData<PStringBase<char>,GRPCommand *>* ebx_1 = m_currElement->m_aInplaceBuckets[1];
004344cb              int32_t eax_6 = (var_20 & 0x7fffffff);
004344cb              
004344d2              if (i_8 < eax_6)
00434533                  i_8 += 1;
004344d2              else
004344d2              {
004344d4                  uint32_t edx_2 = (eax_6 + 1);
004344d4                  
004344da                  if (edx_2 <= 8)
004344dc                      edx_2 = 8;
004344da                  else if (edx_2 <= 0x4000)
004344e9                  {
004344ff                      var_28 = edx_2;
00434508                      int32_t eflags_1;
00434508                      char eax_10;
00434508                      eax_10 = __bsr_gprv_memv(var_28);
00434514                      int32_t edi = (1 << eax_10);
00434514                      
00434518                      if (edx_2 > edi)
0043451a                          edx_2 = (edi * 2);
0043451a                      
0043451d                      m_currBucket = m_currBucket_1;
004344e9                  }
004344e9                  else
004344e9                  {
004344ed                      int32_t eax_8 = (edx_2 & 0x3fff);
004344ed                      
004344f2                      if (eax_8 != 0)
004344fb                          edx_2 += (0x4000 - eax_8);
004344e9                  }
004344e9                  
0043452b                  bool cond:2_1 = SmartArray<PStringBase<char>,1>::grow(&var_24, edx_2) == 0;
0043452d                  ebp = var_24;
0043452d                  
00434531                  if (!(cond:2_1))
00434533                      i_8 += 1;
004344d2              }
004344d2              
00434541              class GRPCommand* m_data = ebx_1->m_data;
00434542              class HashTableData<PStringBase<char>,GRPCommand *>* m_hashNext = ebx_1->m_hashNext;
0043454d              PStringBase<char>::sprintf(((ebp + (i_8 << 2)) - 4), "%s - %s\n");
00434552              m_currElement = m_currElement->m_aInplaceBuckets[0];
00434552              
0043455a              if (m_currElement == 0)
0043455a              {
0043457f                  do
0043457f                  {
00434570                      m_currBucket = &m_currBucket[1];
00434575                      m_currBucket_1 = m_currBucket;
00434575                      
00434579                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00434579                          goto label_43458f;
00434579                      
0043457b                      i = *(uint32_t*)m_currBucket;
0043457f                  } while (i == 0);
0043457f                  
00434581                  m_currElement = i;
00434581                  
00434585                  if (m_currElement == 0)
00434585                      break;
0043455a              }
004344c8          }
004344ba      }
004344ba      
0043458f  label_43458f:
0043458f      class PStringBase<char>* edi_1 = (ebp + (i_8 << 2));
0043458f      
00434595      if (ebp != edi_1)
00434595      {
0043459b          int32_t i_6 = (((char*)edi_1 - ebp) >> 2);
0043459e          int32_t i_1 = i_6;
004345a0          class PStringBase<char>* ecx_11 = nullptr;
004345a0          
004345a5          while (i_1 != 1)
004345a5          {
004345a7              i_1 s>>= 1;
004345a9              ecx_11 = (&ecx_11->m_charbuffer + 1);
004345a5          }
004345a5          
004345af          uint32_t edx_6 = var_28;
004345b3          uint32_t var_3c_4 = edx_6;
004345b4          class PStringBase<char>* eax_16 = (ecx_11 * 2);
004345b7          class PStringBase<char>* var_40_1 = eax_16;
004345b8          int32_t var_44_1 = 0;
004345bc          _STL::__introsort_loop(eax_16, edx_6, ecx_11, ebp, edi_1);
004345bc          
004345c7          if (i_6 <= 0x10)
004345ee              _STL::__insertion_sort(ebp, edi_1, ((int8_t)var_28));
004345c7          else
004345c7          {
004345c9              uint8_t ebx_2 = ((int8_t)var_28);
004345d3              _STL::__insertion_sort(ebp, (ebp + 0x40), ebx_2);
004345dd              _STL::__unguarded_insertion_sort_aux((ebp + 0x40), edi_1, nullptr, ebx_2);
004345c7          }
00434595      }
00434595      
004345f6      int32_t i_7 = i_8;
004345f6      
004345fc      if (i_7 > 0)
004345fc      {
004345fe          int32_t esi_5 = ebp;
0043460d          int32_t i_2;
0043460d          
0043460d          do
0043460d          {
00434601              GlobalRegistry::OutputText(esi_5);
00434609              esi_5 += 4;
0043460c              i_2 = i_7;
0043460c              i_7 -= 1;
0043460d          } while (i_2 != 1);
004345fc      }
004345fc      
0043460f      void* const eax_17 = &data_794508;
0043460f      
0043461c      do
0043461c      {
00434617          i = *(uint8_t*)eax_17;
00434619          eax_17 += 1;
0043461c      } while (i != 0);
0043461c      
00434625      PStringBase<char>::allocate_ref_buffer(&var_28, ((char*)eax_17 - 0x794509));
0043462a      uint32_t edx_7 = var_28;
0043462e      uint8_t* ecx_14 = &data_794508;
0043463b      uint8_t i_3;
0043463b      
0043463b      do
0043463b      {
00434633          i_3 = *(uint8_t*)ecx_14;
00434635          ecx_14 = &ecx_14[1];
00434636          *(uint8_t*)edx_7 = i_3;
00434638          edx_7 += 1;
0043463b      } while (i_3 != 0);
00434642      GlobalRegistry::OutputText(&var_28);
0043464b      int32_t* esi_7 = (var_28 - 0x14);
0043464b      
00434661      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
00434669          **(uint32_t**)esi_7(1);
00434669      
0043467d      if (((var_20 & 0x80000000) == 0x80000000 && ebp != 0))
0043467d      {
0043467f          int32_t i_9 = *(uint32_t*)(ebp - 4);
00434685          int32_t edi_2 = (ebp + (i_9 << 2));
00434685          
0043468a          if ((i_9 - 1) >= 0)
0043468a          {
0043468c              int32_t i_5 = i_9;
004346b4              int32_t i_4;
004346b4              
004346b4              do
004346b4              {
00434690                  int32_t esi_8 = *(uint32_t*)(edi_2 - 4);
00434693                  edi_2 -= 4;
00434693                  
004346a9                  if ((InterlockedDecrement((esi_8 - 0x10)) == 0 && esi_8 != 0x14))
004346b1                      **(uint32_t**)(esi_8 - 0x14)(1);
004346b1                  
004346b3                  i_4 = i_5;
004346b3                  i_5 -= 1;
004346b4              } while (i_4 != 1);
0043468a          }
0043468a          
004346b7          operator delete[]((ebp - 4));
0043467d      }
0043467d      
004346c2      int32_t eax_22;
004346c2      eax_22 = 1;
004346c8      return 1;
004343f0  }

004346c9                             90 90 90 90 90 90 90                                                           .......

004346d0  uint8_t GlobalRegistryInstance::ConsoleCommand_ListObjects()

004346d0  {
004346e0      uint32_t var_28;
004346e0      PStringBase<char>::PStringBase<char>(&var_28, "Listing available objects:\n\n");
004346ea      GlobalRegistry::OutputText(&var_28);
004346f3      int32_t* esi_1 = (var_28 - 0x14);
004346f3      
00434709      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00434711          **(uint32_t**)esi_1(1);
00434711      
00434713      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00434718      int32_t ebp = 0;
0043471c      int32_t var_24 = 0;
00434720      int32_t var_20 = 0;
00434724      int32_t i_8 = 0;
00434724      
00434728      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00434728      {
0043472f          void* eax_1 = operator new(0x8100);
0043472f          
00434739          if (eax_1 == 0)
00434744              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00434739          else
0043473d              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_1);
0043473d          
00434746          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00434728      }
00434728      
00434756      void __return;
00434756      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&GlobalRegistry::s_pcGlobalRegistry_1->m_ObjectHash.m_intrusiveTable, &__return);
0043475b      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
0043475d      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
00434760      class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>* m_currElement = eax_2->m_currElement;
0043476d      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
00434771      class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>* i;
00434771      
00434771      if (GlobalRegistry::s_pcGlobalRegistry == 0)
00434771      {
00434778          void* eax_3;
00434778          eax_3 = operator new(0x8100);
00434778          
00434782          if (eax_3 == 0)
00434792              GlobalRegistry::s_pcGlobalRegistry = nullptr;
00434782          else
00434782          {
00434786              class GlobalRegistryInstance* eax_4;
00434786              eax_4 = GlobalRegistryInstance::GlobalRegistryInstance(eax_3);
0043478b              GlobalRegistry::s_pcGlobalRegistry = eax_4;
00434782          }
00434771      }
00434771      
0043479a      if (m_currElement != 0)
0043479a      {
004347a8          while (true)
004347a8          {
004347a8              class HashTableData<PStringBase<char>,GRPObject *>* ebx_1 = m_currElement->m_aInplaceBuckets[1];
004347ab              int32_t eax_6 = (var_20 & 0x7fffffff);
004347ab              
004347b2              if (i_8 < eax_6)
00434813                  i_8 += 1;
004347b2              else
004347b2              {
004347b4                  uint32_t edx_2 = (eax_6 + 1);
004347b4                  
004347ba                  if (edx_2 <= 8)
004347bc                      edx_2 = 8;
004347ba                  else if (edx_2 <= 0x4000)
004347c9                  {
004347df                      var_28 = edx_2;
004347e8                      int32_t eflags_1;
004347e8                      char eax_10;
004347e8                      eax_10 = __bsr_gprv_memv(var_28);
004347f4                      int32_t edi = (1 << eax_10);
004347f4                      
004347f8                      if (edx_2 > edi)
004347fa                          edx_2 = (edi * 2);
004347fa                      
004347fd                      m_currBucket = m_currBucket_1;
004347c9                  }
004347c9                  else
004347c9                  {
004347cd                      int32_t eax_8 = (edx_2 & 0x3fff);
004347cd                      
004347d2                      if (eax_8 != 0)
004347db                          edx_2 += (0x4000 - eax_8);
004347c9                  }
004347c9                  
0043480b                  bool cond:2_1 = SmartArray<PStringBase<char>,1>::grow(&var_24, edx_2) == 0;
0043480d                  ebp = var_24;
0043480d                  
00434811                  if (!(cond:2_1))
00434813                      i_8 += 1;
004347b2              }
004347b2              
00434821              class GRPObject* m_data = ebx_1->m_data;
00434822              class HashTableData<PStringBase<char>,GRPObject *>* m_hashNext = ebx_1->m_hashNext;
0043482d              PStringBase<char>::sprintf(((ebp + (i_8 << 2)) - 4), "%s - %s\n");
00434832              m_currElement = m_currElement->m_aInplaceBuckets[0];
00434832              
0043483a              if (m_currElement == 0)
0043483a              {
0043485f                  do
0043485f                  {
00434850                      m_currBucket = &m_currBucket[1];
00434855                      m_currBucket_1 = m_currBucket;
00434855                      
00434859                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00434859                          goto label_43486f;
00434859                      
0043485b                      i = *(uint32_t*)m_currBucket;
0043485f                  } while (i == 0);
0043485f                  
00434861                  m_currElement = i;
00434861                  
00434865                  if (m_currElement == 0)
00434865                      break;
0043483a              }
004347a8          }
0043479a      }
0043479a      
0043486f  label_43486f:
0043486f      class PStringBase<char>* edi_1 = (ebp + (i_8 << 2));
0043486f      
00434875      if (ebp != edi_1)
00434875      {
0043487b          int32_t i_6 = (((char*)edi_1 - ebp) >> 2);
0043487e          int32_t i_1 = i_6;
00434880          class PStringBase<char>* ecx_11 = nullptr;
00434880          
00434885          while (i_1 != 1)
00434885          {
00434887              i_1 s>>= 1;
00434889              ecx_11 = (&ecx_11->m_charbuffer + 1);
00434885          }
00434885          
0043488f          uint32_t edx_6 = var_28;
00434893          uint32_t var_3c_4 = edx_6;
00434894          class PStringBase<char>* eax_16 = (ecx_11 * 2);
00434897          class PStringBase<char>* var_40_1 = eax_16;
00434898          int32_t var_44_1 = 0;
0043489c          _STL::__introsort_loop(eax_16, edx_6, ecx_11, ebp, edi_1);
0043489c          
004348a7          if (i_6 <= 0x10)
004348ce              _STL::__insertion_sort(ebp, edi_1, ((int8_t)var_28));
004348a7          else
004348a7          {
004348a9              uint8_t ebx_2 = ((int8_t)var_28);
004348b3              _STL::__insertion_sort(ebp, (ebp + 0x40), ebx_2);
004348bd              _STL::__unguarded_insertion_sort_aux((ebp + 0x40), edi_1, nullptr, ebx_2);
004348a7          }
00434875      }
00434875      
004348d6      int32_t i_7 = i_8;
004348d6      
004348dc      if (i_7 > 0)
004348dc      {
004348de          int32_t esi_5 = ebp;
004348ed          int32_t i_2;
004348ed          
004348ed          do
004348ed          {
004348e1              GlobalRegistry::OutputText(esi_5);
004348e9              esi_5 += 4;
004348ec              i_2 = i_7;
004348ec              i_7 -= 1;
004348ed          } while (i_2 != 1);
004348dc      }
004348dc      
004348ef      void* const eax_17 = &data_794508;
004348ef      
004348fc      do
004348fc      {
004348f7          i = *(uint8_t*)eax_17;
004348f9          eax_17 += 1;
004348fc      } while (i != 0);
004348fc      
00434905      PStringBase<char>::allocate_ref_buffer(&var_28, ((char*)eax_17 - 0x794509));
0043490a      uint32_t edx_7 = var_28;
0043490e      uint8_t* ecx_14 = &data_794508;
0043491b      uint8_t i_3;
0043491b      
0043491b      do
0043491b      {
00434913          i_3 = *(uint8_t*)ecx_14;
00434915          ecx_14 = &ecx_14[1];
00434916          *(uint8_t*)edx_7 = i_3;
00434918          edx_7 += 1;
0043491b      } while (i_3 != 0);
00434922      GlobalRegistry::OutputText(&var_28);
0043492b      int32_t* esi_7 = (var_28 - 0x14);
0043492b      
00434941      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
00434949          **(uint32_t**)esi_7(1);
00434949      
0043495d      if (((var_20 & 0x80000000) == 0x80000000 && ebp != 0))
0043495d      {
0043495f          int32_t i_9 = *(uint32_t*)(ebp - 4);
00434965          int32_t edi_2 = (ebp + (i_9 << 2));
00434965          
0043496a          if ((i_9 - 1) >= 0)
0043496a          {
0043496c              int32_t i_5 = i_9;
00434994              int32_t i_4;
00434994              
00434994              do
00434994              {
00434970                  int32_t esi_8 = *(uint32_t*)(edi_2 - 4);
00434973                  edi_2 -= 4;
00434973                  
00434989                  if ((InterlockedDecrement((esi_8 - 0x10)) == 0 && esi_8 != 0x14))
00434991                      **(uint32_t**)(esi_8 - 0x14)(1);
00434991                  
00434993                  i_4 = i_5;
00434993                  i_5 -= 1;
00434994              } while (i_4 != 1);
0043496a          }
0043496a          
00434997          operator delete[]((ebp - 4));
0043495d      }
0043495d      
004349a2      int32_t eax_22;
004349a2      eax_22 = 1;
004349a8      return 1;
004346d0  }

004349a9                             90 90 90 90 90 90 90                                                           .......

004349b0  uint8_t __fastcall GlobalRegistryInstance::ConsoleCommand_Help(class PStringBaseArray<char> const* arg1)

004349b0  {
004349b0      class GRPCommand* ecx;
004349b0      class GRPCommand* var_4 = ecx;
004349b3      class PStringBaseArray<char>* esi = arg1;
004349bc      int32_t ebx;
004349bc      ebx = 1;
004349bc      
004349be      if (esi->m_num == 0)
004349be      {
004349c7          if ((GlobalRegistryInstance::ConsoleCommand_ListCommands() != 0 && GlobalRegistryInstance::ConsoleCommand_ListObjects() != 0))
004349d7              return 1;
004349d7          
004349dd          return 0;
004349be      }
004349be      
004349de      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
004349de      
004349e5      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
004349e5      {
004349ec          void* eax_2 = operator new(0x8100);
004349ec          
004349f6          if (eax_2 == 0)
00434a01              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
004349f6          else
004349fa              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_2);
004349fa          
00434a03          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
004349e5      }
004349e5      
00434a17      bool cond:1 = GlobalRegistryInstance::FindCommandByName(GlobalRegistry::s_pcGlobalRegistry_1, esi->m_data, &var_4) == 0;
00434a19      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00434a1e      arg1 = PStringBase<char>::s_NullBuffer_1;
00434a22      int32_t eax_10;
00434a22      void* __offset(PStringBaseArray<char>, -0x14) esi_5;
00434a22      
00434a22      if (cond:1)
00434a22      {
00434b02          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00434b0c          class PSRefBufferCharData<char>* __saved_edi_6 = esi->m_data->m_charbuffer;
00434b17          PStringBase<char>::sprintf(&arg1, "Can't provide help for unrecogni…");
00434b21          GlobalRegistry::OutputText(&arg1);
00434b2a          esi_5 = ((char*)arg1 - 0x14);
00434b34          ebx = 0;
00434b36          eax_10 = InterlockedDecrement(((char*)esi_5 + 4));
00434a22      }
00434a22      else
00434a22      {
00434a2c          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00434a32          class GRPCommand* esi_1 = var_4;
00434a39          class PSRefBufferCharData<char>* __saved_edi_2 = esi_1->m_Name.m_charbuffer;
00434a44          PStringBase<char>::sprintf(&arg1, "         Name: %s\n");
00434a4e          GlobalRegistry::OutputText(&arg1);
00434a53          class PSRefBufferCharData<char>* m_charbuffer = esi_1->m_Description.m_charbuffer;
00434a53          
00434a5f          if (m_charbuffer->m_data[-4] != 1)
00434a5f          {
00434a61              class PSRefBufferCharData<char>* __saved_edi_3 = m_charbuffer;
00434a6c              PStringBase<char>::sprintf(&arg1, "  Description: %s\n");
00434a76              GlobalRegistry::OutputText(&arg1);
00434a5f          }
00434a5f          
00434a82          void* eax_6 = esi_1->vtable->AsWithArgsCommand();
00434a82          
00434a87          if (eax_6 != 0)
00434a87          {
00434a89              void* __saved_edi_8 = *(uint32_t*)((char*)eax_6 + 0xc);
00434a89              
00434a90              if (*(uint32_t*)((char*)__saved_edi_8 - 4) != 1)
00434a90              {
00434a92                  void* __saved_edi_4 = __saved_edi_8;
00434a9d                  PStringBase<char>::sprintf(&arg1, "        Usage: %s\n\n");
00434aa7                  GlobalRegistry::OutputText(&arg1);
00434a90              }
00434a87          }
00434a87          
00434ab9          PStringBase<char>::PStringBase<char>(&var_4, &data_794508);
00434ac3          GlobalRegistry::OutputText(&var_4);
00434ad2          void* __offset(GRPCommand, -0x14) esi_3 = ((char*)var_4 - 0x14);
00434ad2          
00434ae4          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00434aec              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00434aec          
00434af2          esi_5 = ((char*)arg1 - 0x14);
00434af9          eax_10 = InterlockedDecrement(((char*)esi_5 + 4));
00434a22      }
00434a22      
00434b42      if ((eax_10 == 0 && esi_5 != 0))
00434b4a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00434b4a      
00434b4d      eax_10 = ebx;
00434b51      return eax_10;
004349b0  }

00434b52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00434b60  void __fastcall GlobalRegistryCommands::GlobalRegistryCommands(class GlobalRegistryCommands* this)

00434b60  {
00434b71      this->vtable = 0x798534;
00434b77      class PStringBase<char> var_8;
00434b77      PStringBase<char>::PStringBase<char>(&var_8, "Displays a list of each command …");
00434b85      class PStringBase<char> var_c;
00434b85      PStringBase<char>::PStringBase<char>(&var_c, "ListCommands");
00434b99      GlobalRegistry::RegisterCommand(GlobalRegistryInstance::ConsoleCommand_ListCommands, &var_c, &var_8);
00434ba8      int32_t* edi_1 = (var_c - 0x14);
00434ba8      
00434bba      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00434bc2          **(uint32_t**)edi_1(1);
00434bc2      
00434bc8      int32_t* edi_3 = (var_8 - 0x14);
00434bc8      
00434bd7      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00434bdf          **(uint32_t**)edi_3(1);
00434bdf      
00434bea      PStringBase<char>::PStringBase<char>(&var_c, "Displays a list of each object w…");
00434bf8      PStringBase<char>::PStringBase<char>(&var_8, "ListObjects");
00434c0c      GlobalRegistry::RegisterCommand(GlobalRegistryInstance::ConsoleCommand_ListObjects, &var_8, &var_c);
00434c15      int32_t* edi_5 = (var_8 - 0x14);
00434c15      
00434c27      if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
00434c2f          **(uint32_t**)edi_5(1);
00434c2f      
00434c35      int32_t* edi_7 = (var_c - 0x14);
00434c35      
00434c44      if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
00434c4c          **(uint32_t**)edi_7(1);
00434c4c      
00434c57      class PStringBase<char> var_4;
00434c57      PStringBase<char>::PStringBase<char>(&var_4, "Help [command name]  (if you omi…");
00434c65      PStringBase<char>::PStringBase<char>(&var_c, "Displays description and usage i…");
00434c73      PStringBase<char>::PStringBase<char>(&var_8, "Help");
00434c8c      GlobalRegistry::RegisterCommand(GlobalRegistryInstance::ConsoleCommand_Help, &var_8, &var_c, &var_4);
00434c95      int32_t* edi_9 = (var_8 - 0x14);
00434c95      
00434ca7      if ((InterlockedDecrement(&edi_9[1]) == 0 && edi_9 != 0))
00434caf          **(uint32_t**)edi_9(1);
00434caf      
00434cb5      int32_t* edi_11 = (var_c - 0x14);
00434cb5      
00434cc4      if ((InterlockedDecrement(&edi_11[1]) == 0 && edi_11 != 0))
00434ccc          **(uint32_t**)edi_11(1);
00434ccc      
00434cd2      int32_t* edi_13 = (var_4 - 0x14);
00434cd2      
00434ce1      if ((InterlockedDecrement(&edi_13[1]) == 0 && edi_13 != 0))
00434ce9          **(uint32_t**)edi_13(1);
00434ce9      
00434cf4      PStringBase<char>::PStringBase<char>(&var_c, "Dump <object name>");
00434d02      PStringBase<char>::PStringBase<char>(&var_8, "Displays information about an ob…");
00434d10      PStringBase<char>::PStringBase<char>(&var_4, "Dump");
00434d29      GlobalRegistry::RegisterCommand(GlobalRegistryInstance::ConsoleCommand_Dump, &var_4, &var_8, &var_c);
00434d32      int32_t* edi_15 = (var_4 - 0x14);
00434d32      
00434d44      if ((InterlockedDecrement(&edi_15[1]) == 0 && edi_15 != 0))
00434d4c          **(uint32_t**)edi_15(1);
00434d4c      
00434d52      int32_t* edi_17 = (var_8 - 0x14);
00434d52      
00434d61      if ((InterlockedDecrement(&edi_17[1]) == 0 && edi_17 != 0))
00434d69          **(uint32_t**)edi_17(1);
00434d69      
00434d6f      int32_t* edi_19 = (var_c - 0x14);
00434d6f      
00434d7e      if ((InterlockedDecrement(&edi_19[1]) == 0 && edi_19 != 0))
00434d86          **(uint32_t**)edi_19(1);
00434d86      
00434d91      PStringBase<char>::PStringBase<char>(&var_c, "Set <object name> [component nam…");
00434d9f      PStringBase<char>::PStringBase<char>(&var_8, "Sets the contents of an object");
00434dad      PStringBase<char>::PStringBase<char>(&var_4, &data_798528);
00434dc6      GlobalRegistry::RegisterCommand(GlobalRegistryInstance::ConsoleCommand_Set, &var_4, &var_8, &var_c);
00434dcf      int32_t* edi_21 = (var_4 - 0x14);
00434dcf      
00434de1      if ((InterlockedDecrement(&edi_21[1]) == 0 && edi_21 != 0))
00434de9          **(uint32_t**)edi_21(1);
00434de9      
00434def      int32_t* edi_23 = (var_8 - 0x14);
00434def      
00434dfe      if ((InterlockedDecrement(&edi_23[1]) == 0 && edi_23 != 0))
00434e06          **(uint32_t**)edi_23(1);
00434e06      
00434e0c      int32_t* edi_25 = (var_c - 0x14);
00434e0c      
00434e1b      if ((InterlockedDecrement(&edi_25[1]) == 0 && edi_25 != 0))
00434e23          **(uint32_t**)edi_25(1);
00434e23      
00434e2e      PStringBase<char>::PStringBase<char>(&var_c, "Toggle <object name>");
00434e3c      PStringBase<char>::PStringBase<char>(&var_8, "Toggles the contents of a boolea…");
00434e4a      PStringBase<char>::PStringBase<char>(&var_4, "Toggle");
00434e63      GlobalRegistry::RegisterCommand(GlobalRegistryInstance::ConsoleCommand_Toggle, &var_4, &var_8, &var_c);
00434e6c      int32_t* edi_27 = (var_4 - 0x14);
00434e6c      
00434e7e      if ((InterlockedDecrement(&edi_27[1]) == 0 && edi_27 != 0))
00434e86          **(uint32_t**)edi_27(1);
00434e86      
00434e8c      int32_t* edi_29 = (var_8 - 0x14);
00434e8c      
00434e9b      if ((InterlockedDecrement(&edi_29[1]) == 0 && edi_29 != 0))
00434ea3          **(uint32_t**)edi_29(1);
00434ea3      
00434ea9      int32_t* edi_31 = (var_c - 0x14);
00434ea9      
00434eb8      if ((InterlockedDecrement(&edi_31[1]) == 0 && edi_31 != 0))
00434ec0          **(uint32_t**)edi_31(1);
00434ec0      
00434ecb      PStringBase<char>::PStringBase<char>(&var_4, "Console initialized.\n\n");
00434ed5      GlobalRegistry::OutputText(&var_4);
00434ede      int32_t* edi_33 = (var_4 - 0x14);
00434ede      
00434ef0      if ((InterlockedDecrement(&edi_33[1]) == 0 && edi_33 != 0))
00434ef8          **(uint32_t**)edi_33(1);
00434b60  }

00434f03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00434f10  uint32_t __fastcall RefCountInterface<GlobalRegistryCommands>::Release(class RefCountInterface<GlobalRegistryCommands> const* this)

00434f10  {
00434f13      /* tailcall */
00434f13      return ReferenceCountTemplate<1048576,0>::Release(&this->vtable);
00434f10  }

00434f18                                                                          90 90 90 90 90 90 90 90                          ........

00434f20  void* __thiscall RefCountInterface<class GlobalRegistryCommands>::`vector deleting destructor'(RefCountInterface<class GlobalRegistryCommands>* this, uint32_t arg2)

00434f20  {
00434f23      RefCountInterface<GlobalRegistryCommands>::~RefCountInterface<GlobalRegistryCommands>(this);
00434f2d      void* result = ((char*)this - 4);
00434f2d      
00434f30      if ((arg2 & 1) == 0)
00434f3f          return result;
00434f3f      
00434f33      operator delete(result);
00434f3b      return ((char*)this - 4);
00434f20  }

00434f42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00434f50  void __fastcall RefCountInterface<GlobalRegistryCommands>::~RefCountInterface<GlobalRegistryCommands>(class RefCountInterface<GlobalRegistryCommands>* this)

00434f50  {
00434f53      int32_t eax = -(&this[0]);
00434f5c      this->vtable = &RefCountInterface<class GlobalRegistryCommands>::`vftable';
00434f55      this->vtable = 0x7988ec;
00434f68      *(uint32_t*)((eax - eax) & this) = 0x7942f4;
00434f70      /* tailcall */
00434f70      return GlobalRegistryCommands::~GlobalRegistryCommands(&this[0]);
00434f50  }

00434f75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00434f80  void __fastcall ClassRegistrarGlobalRegistryCommands_ClassType::ClassRegistrarGlobalRegistryCommands_ClassType(class ClassRegistrarGlobalRegistryCommands_ClassType* this)

00434f80  {
00434f80      class ClassRegistrarGlobalRegistryCommands_ClassType* __return = this;
00434f87      void* eax = operator new(0xc);
00434f87      
00434f93      if (eax != 0)
00434f93      {
00434f97          GlobalRegistryCommands::GlobalRegistryCommands(eax);
00434fa3          *(uint32_t*)((char*)eax + 4) = 0x7942f4;
00434faa          *(uint32_t*)((char*)eax + 8) = 1;
00434fb7          *(uint32_t*)eax = 0x7988ec;
00434fbd          *(uint32_t*)((char*)eax + 4) = &RefCountInterface<class GlobalRegistryCommands>::`vftable';
00434fcb          InterfaceSystem::RegisterClassA(InterfaceSystem::GetInstance(), &__return, &GlobalRegistryCommands_ClassType, eax, nullptr);
00434fd4          *(uint32_t*)(*(uint32_t*)eax + 0x14)();
00434f93      }
00434f80  }

00434fdd                                                                                         90 90 90                               ...

00434fe0  void GlobalRegistry::UnregisterConsoleCallbackObject(class IConsoleCallbackObject* arg1)

00434fe0  {
00434fe0      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00434fe0      
00434fe7      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00434fe7      {
00434fee          void* eax = operator new(0x8100);
00434fee          
00434ff8          if (eax == 0)
00435003              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00434ff8          else
00434ffc              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00434ffc          
00435005          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00434fe7      }
00434fe7      
00435015      SmartArray<IConsoleCallbackObject *,1>::RemoveUnOrdered(&GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects, &arg1);
00434fe0  }

0043501b                                                                                   90 90 90 90 90                             .....

00435020  void __fastcall GRPWithArgsCommand::~GRPWithArgsCommand(class GRPWithArgsCommand* this)

00435020  {
0043502e      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_Usage.m_charbuffer - 0x14);
0043502e      
0043503d      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00435045          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00435045      
0043504a      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->m_Description.m_charbuffer - 0x14);
0043504a      
00435059      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00435061          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00435061      
00435066      void* __offset(PSRefBufferCharData<char>, -0x14) esi_5 = (this->m_Name.m_charbuffer - 0x14);
00435066      
00435075      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0043507d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00435020  }

00435083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00435090  void __thiscall FixedArray<PStringBase<char> >::Create(class FixedArray<PStringBase<char> >* this, uint32_t arg2)

00435090  {
00435090      class FixedArray<PStringBase<char> >* this_1 = this;
004350a5      this->m_num = arg2;
004350a8      void* eax_1;
004350a8      int32_t ecx;
004350a8      eax_1 = operator new[](((arg2 << 2) + 4));
004350a8      
004350b2      if (eax_1 == 0)
004350b2      {
004350f7          this->m_data = 0;
004350fb          return;
004350b2      }
004350b2      
004350b8      *(uint32_t*)eax_1 = arg2;
004350c0      void* esi = ((char*)eax_1 + 4);
004350c0      
004350c2      if ((arg2 - 1) >= 0)
004350c2      {
004350ca          int32_t i_1 = arg2;
004350e4          int32_t i;
004350e4          
004350e4          do
004350e4          {
004350d0              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004350dc              *(uint32_t*)esi = PStringBase<char>::s_NullBuffer_1;
004350de              InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
004350e0              esi += 4;
004350e3              i = i_1;
004350e3              i_1 -= 1;
004350e4          } while (i != 1);
004350c2      }
004350c2      
004350eb      this->m_data = ((char*)eax_1 + 4);
00435090  }

004350fe                                                                                            90 90                                ..

00435100  void __fastcall GRPNoArgsCommand::GRPNoArgsCommand(class GRPNoArgsCommand* this)

00435100  {
00435103      this->vtable = 0x798930;
00435109      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043511b      this->m_Name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0043511e      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00435120      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0043512c      this->m_Description.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0043512f      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
00435132      this->vtable = 0x798978;
00435138      this->m_FunctionPointerNoArgs = nullptr;
00435100  }

00435143           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00435150  void __fastcall GRPWithArgsCommand::GRPWithArgsCommand(class GRPWithArgsCommand* this)

00435150  {
00435153      this->vtable = 0x798930;
00435159      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043516b      this->m_Name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0043516e      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00435170      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0043517c      this->m_Description.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0043517f      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
00435181      this->vtable = 0x7989c0;
00435187      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00435193      this->m_Usage.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00435196      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
00435199      this->m_FunctionPointerWithArgs = nullptr;
00435150  }

004351a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004351b0  void __fastcall GRPShadowVariableObject::GRPShadowVariableObject(class GRPShadowVariableObject* this)

004351b0  {
004351b3      this->vtable = 0x798930;
004351b9      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004351cb      this->m_Name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004351ce      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
004351d0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
004351dc      this->m_Description.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
004351df      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
004351e1      this->vtable = 0x798a08;
004351e7      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004351f3      this->m_ValueString.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
004351f6      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
004351b0  }

004351fd                                                                                         90 90 90                               ...

00435200  void __thiscall GRPShadowVariableObject::ConvertToString(class GRPShadowVariableObject const* this, class PStringBase<char>* arg2)

00435200  {
00435205      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
00435205      
0043520d      if (m_charbuffer == this->m_ValueString.m_charbuffer)
00435244          return;
00435244      
00435223      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0043522b          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0043522b      
0043522d      class PStringBase<char> m_charbuffer_1 = this->m_ValueString.m_charbuffer;
00435231      arg2->m_charbuffer = m_charbuffer_1;
00435238      arg2 = (m_charbuffer_1 - 0x10);
0043523c      /* tailcall */
0043523c      return InterlockedIncrement();
00435200  }

00435247                       90 90 90 90 90 90 90 90 90                                                         .........

00435250  uint8_t __thiscall GRPShadowVariableObject::SetFromString(class GRPShadowVariableObject* this, class PStringBase<char> const* arg2)

00435250  {
00435258      class PSRefBufferCharData<char>* m_charbuffer = this->m_ValueString.m_charbuffer;
00435258      
0043525d      if (m_charbuffer != arg2->m_charbuffer)
0043525d      {
00435273          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0043527b              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0043527b          
0043527d          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0043527f          this->m_ValueString.m_charbuffer = m_charbuffer_1;
00435286          InterlockedIncrement(&m_charbuffer_1[-1]);
0043525d      }
0043525d      
0043528e      m_charbuffer = 1;
00435291      return 1;
00435250  }

00435294                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004352a0  void GlobalRegistry::OutputText(class PStringBase<char> const* arg1)

004352a0  {
004352a0      uint32_t* ecx;
004352a0      uint32_t* var_4 = ecx;
004352a2      class PStringBase<char>* ebx = arg1;
004352a8      int32_t eax_1 = ebx->m_charbuffer->m_data[-4];
004352a8      
004352ad      if (eax_1 > 0)
004352ad      {
004352b8          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
004352be          int32_t i = 0;
004352be          
004352c2          if ((eax_1 - 1) > 0)
004352c2          {
0043536e              do
0043536e              {
004352c8                  class PSRefBufferCharData<char>* m_charbuffer = ebx->m_charbuffer;
004352ca                  int32_t edx_1 = m_charbuffer->m_data[-4];
004352cf                  void* esi_1 = &m_charbuffer->m_data[(edx_1 - 1)];
004352cf                  
004352d3                  if (i < edx_1)
004352d5                      esi_1 = &m_charbuffer->m_data[i];
004352d5                  
004352da                  if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
004352da                  {
004352e1                      void* eax_2 = operator new(0x8100);
004352e1                      
004352eb                      if (eax_2 == 0)
004352f6                          GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
004352eb                      else
004352ef                          GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_2);
004352ef                      
004352f8                      GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
004352da                  }
004352da                  
004352fd                  uint32_t m_nNumElements = GlobalRegistry::s_pcGlobalRegistry_1->m_Characters.m_nNumElements;
004352fd                  bool cond:2_1 = m_nNumElements >= 0x8000;
00435304                  uint32_t* edx_2 = &GlobalRegistry::s_pcGlobalRegistry_1->m_Characters.m_nNumElements;
00435307                  class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry_1;
00435307                  
00435309                  if (m_nNumElements == 0x8000)
00435309                  {
0043530d                      *(uint32768_t*)((char*)GlobalRegistry::s_pcGlobalRegistry_1->m_Characters)[0xc][GlobalRegistry::s_pcGlobalRegistry_1->m_Characters.m_nStartIndex] = 0;
00435312                      uint32_t m_nStartIndex = GlobalRegistry::s_pcGlobalRegistry_2->m_Characters.m_nStartIndex;
00435312                      
00435319                      if (m_nStartIndex != 0x7fff)
00435324                          GlobalRegistry::s_pcGlobalRegistry_2->m_Characters.m_nStartIndex = (m_nStartIndex + 1);
00435319                      else
0043531b                          GlobalRegistry::s_pcGlobalRegistry_2->m_Characters.m_nStartIndex = 0;
0043531b                      
00435328                      ebx = arg1;
00435364                      ADJ(edx_2)->m_Characters.m_nNumElements -= 1;
0043532f                      GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00435334                      cond:2_1 = ADJ(edx_2)->m_Characters.m_nNumElements >= 0x8000;
00435309                  }
00435309                  
0043533a                  if (!(cond:2_1))
0043533a                  {
0043533f                      var_4 = edx_2;
00435343                      edx_2 = *(uint8_t*)esi_1;
00435345                      *(uint32768_t*)((char*)GlobalRegistry::s_pcGlobalRegistry_2->m_Characters)[0xc][GlobalRegistry::s_pcGlobalRegistry_2->m_Characters.m_nEndIndex] = edx_2;
00435349                      uint32_t m_nEndIndex = GlobalRegistry::s_pcGlobalRegistry_2->m_Characters.m_nEndIndex;
00435349                      
00435355                      if (m_nEndIndex != 0x7fff)
00435361                          GlobalRegistry::s_pcGlobalRegistry_2->m_Characters.m_nEndIndex = (m_nEndIndex + 1);
00435355                      else
00435357                          GlobalRegistry::s_pcGlobalRegistry_2->m_Characters.m_nEndIndex = 0;
00435357                      
00435364                      ADJ(var_4)->m_Characters.m_nNumElements += 1;
00435366                      GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
0043533a                  }
0043533a                  
0043536b                  i += 1;
0043536e              } while (i < (eax_1 - 1));
004352c2          }
004352c2          
00435374          int32_t esi_2 = 0;
00435374          
00435378          while (true)
00435378          {
00435378              if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00435378              {
0043537f                  void* eax_8 = operator new(0x8100);
0043537f                  
00435389                  if (eax_8 == 0)
00435394                      GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00435389                  else
0043538d                      GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_8);
0043538d                  
00435396                  GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00435378              }
00435378              
004353a1              if (esi_2 >= GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects.m_num)
004353a1                  break;
004353a1              
004353a3              GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects.m_data[esi_2]->vtable->ConsoleCallback_OnTextAdded(ebx);
004353b1              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
004353b6              esi_2 += 1;
00435378          }
004352ad      }
004352a0  }

004353bf                                                                                               90                                 .

004353c0  void* __thiscall GRPNoArgsCommand::`scalar deleting destructor'(class GRPNoArgsCommand* this, uint32_t arg2)

004353c0  {
004353ce      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_Description.m_charbuffer - 0x14);
004353ce      
004353dd      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004353e5          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004353e5      
004353ea      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->m_Name.m_charbuffer - 0x14);
004353ea      
004353f9      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00435401          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00435401      
00435408      if ((arg2 & 1) != 0)
0043540b          operator delete(this);
0043540b      
00435418      return this;
004353c0  }

0043541b                                                                                   90 90 90 90 90                             .....

00435420  void __thiscall PStringBase<char>::trim(class PStringBase<char>* this, uint8_t arg2, uint8_t arg3, class PStringBase<char> arg4)

00435420  {
00435420      class PStringBase<char>* this_1 = this;
00435421      int32_t eax;
00435421      eax = arg2;
0043542f      class PSRefBufferCharData<char>* m_charbuffer_2 = this->m_charbuffer;
00435434      uint32_t i_1 = (m_charbuffer_2->m_data[-4] - 1);
0043543b      class PStringBase<char> ebx_1;
0043543b      
0043543b      if (eax == 0)
00435460          ebx_1 = arg4;
0043543b      else
0043543b      {
0043543d          eax = m_charbuffer_2->m_data[0];
0043543d          
00435441          if (eax == 0)
00435460              ebx_1 = arg4;
00435441          else
00435441          {
0043545c              do
0043545c              {
00435443                  ebx_1 = arg4;
00435443                  
00435453                  if (strchr(ebx_1, ((int32_t)eax)) == 0)
00435453                      break;
00435453                  
00435455                  eax = m_charbuffer_2->m_data[1];
00435458                  m_charbuffer_2 = &m_charbuffer_2->m_data[1];
00435459                  i_1 -= 1;
0043545c              } while (eax != 0);
00435441          }
0043543b      }
0043543b      
00435464      eax = arg3;
00435464      
0043546e      if ((eax != 0 && i_1 > 0))
0043546e      {
00435481          uint32_t i;
00435481          
00435481          do
00435481          {
0043547e              if (strchr(ebx_1, ((int32_t)m_charbuffer_2->m_data[(i_1 - 1)])) == 0)
0043547e                  break;
0043547e              
00435480              i = i_1;
00435480              i_1 -= 1;
00435481          } while (i != 1);
0043546e      }
0043546e      
00435487      class PSRefBufferCharData<char>* m_charbuffer = this->m_charbuffer;
00435487      
00435493      if ((m_charbuffer_2 == m_charbuffer && i_1 == (m_charbuffer->m_data[-4] - 1)))
00435493      {
004354ac          if ((InterlockedDecrement((ebx_1 - 0x10)) == 0 && ebx_1 != 0x14))
004354b8              **(uint32_t**)(ebx_1 - 0x14)(1);
004354b8          
004354ac          return;
00435493      }
00435493      
004354c8      InterlockedIncrement(&m_charbuffer[-1]);
004354d2      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_charbuffer;
004354d2      
004354da      if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer)
004354da      {
004354ef          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
004354f7              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
004354f7          
004354f9          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00435509          this->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0043550b          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
00435511          ebx_1 = arg4;
004354da      }
004354da      
00435517      if (i_1 != 0)
0043551f          PStringBase<char>::append_n_chars(this, m_charbuffer_2, i_1);
0043551f      
00435539      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00435541          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00435541      
00435552      if ((InterlockedDecrement((ebx_1 - 0x10)) == 0 && ebx_1 != 0x14))
0043555a          **(uint32_t**)(ebx_1 - 0x14)(1);
00435420  }

00435564              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00435570  void __fastcall GRPTypedVariableObject::GRPTypedVariableObject(class GRPTypedVariableObject* this)

00435570  {
00435573      this->vtable = 0x798930;
00435579      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043558b      this->m_Name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0043558e      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00435590      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0043559c      this->m_Description.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0043559f      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
004355a3      __builtin_memset(&this->m_pVariable, 0, 0x1d);
004355ac      this->vtable = 0x798a60;
00435570  }

004355c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004355d0  uint8_t __fastcall GRPTypedVariableObject::IsGlobal(class GRPTypedVariableObject const* this)

004355d0  {
004355d3      return this->m_IsGlobal;
004355d0  }

004355d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004355e0  void __thiscall GRPTypedVariableObject::ConvertToString(class GRPTypedVariableObject const* this, class PStringBase<char>* arg2)

004355e0  {
004355e6      class GRPTypedVariableObject* __return = this;
004355e6      
004355ef      if (this->m_Choices.m_num > 0)
004355ef      {
004355f4          int32_t eax_2 = (this->m_Type - 3);
004355f4          
004355fa          if (eax_2 <= 5)
004355fa          {
004355fc              uint32_t var_14_1;
004355fc              
004355fc              switch (eax_2)
004355fc              {
00435608                  case 0:
00435608                  {
00435608                      var_14_1 = *(uint32_t*)this->m_pVariable;
00435608                      break;
00435608                  }
00435610                  case 1:
00435610                  {
00435610                      var_14_1 = *(uint32_t*)this->m_pVariable;
00435610                      break;
00435610                  }
00435616                  case 2:
00435616                  {
00435633                      var_14_1 = ((int32_t)*(uint16_t*)this->m_pVariable);
00435616                      break;
00435616                  }
00435621                  case 3:
00435621                  {
00435621                      var_14_1 = ((uint32_t)*(uint16_t*)this->m_pVariable);
00435621                      break;
00435621                  }
0043562a                  case 4:
0043562a                  {
0043562a                      var_14_1 = ((int32_t)*(uint8_t*)this->m_pVariable);
0043562a                      break;
0043562a                  }
00435630                  case 5:
00435630                  {
00435633                      var_14_1 = ((uint32_t)*(uint8_t*)this->m_pVariable);
00435630                      break;
00435630                  }
004355fc              }
004355fc              
00435636              uint32_t eax_7 = GRPTypedVariableObject::GetChoiceIndexForValue(this, var_14_1);
00435636              
00435643              if ((eax_7 != 0xffffffff && eax_7 < this->m_Choices.m_num))
00435643              {
0043564f                  PStringBase<unsigned short>::operator=(arg2, &this->m_Choices.m_data[eax_7]);
00435658                  return;
00435643              }
004355fa          }
004355ef      }
004355ef      
00435668      int32_t var_20;
00435668      int32_t var_18;
00435668      uint32_t ecx_9;
00435668      
00435668      switch ((this->m_Type - 1))
00435668      {
00435677          case 0:
00435677          {
00435677              int32_t var_14_3 = *(uint32_t*)this->m_pVariable;
0043567e              PStringBase<char>::sprintf(arg2, "0x%08X");
00435677              break;
00435677          }
00435696          case 1:
00435696          {
00435696              if (*(uint8_t*)this->m_pVariable == 1)
00435696              {
0043569d                  PStringBase<char>::set(arg2, "True");
004356a6                  return;
00435696              }
00435696              
004356ae              PStringBase<char>::set(arg2, "False");
00435696              break;
00435696          }
004356bd          case 2:
004356bd          case 3:
004356bd          {
004356bd              ecx_9 = *(uint32_t*)this->m_pVariable;
004356c2          label_4356c2:
004356c2              uint32_t var_14_4 = ecx_9;
004356c9              PStringBase<char>::sprintf(arg2, &data_798ae0);
004356bd              break;
004356bd          }
004356db          case 4:
004356db          {
004356db              ecx_9 = ((int32_t)*(uint16_t*)this->m_pVariable);
004356de              goto label_4356c2;
004356db          }
004356e3          case 5:
004356e3          {
004356e3              ecx_9 = ((uint32_t)*(uint16_t*)this->m_pVariable);
004356e6              goto label_4356c2;
004356e3          }
004356eb          case 6:
004356eb          {
004356eb              ecx_9 = ((int32_t)*(uint8_t*)this->m_pVariable);
004356ee              goto label_4356c2;
004356eb          }
004356f3          case 7:
004356f3          {
004356f3              ecx_9 = ((uint32_t)*(uint8_t*)this->m_pVariable);
004356f6              goto label_4356c2;
004356f3          }
00435703          case 8:
00435703          {
00435703              var_18 = ((double)((long double)*(uint32_t*)this->m_pVariable));
0043570c              PStringBase<char>::sprintf(arg2, "%.2f");
00435703              break;
00435703          }
00435726          case 9:
00435726          {
00435726              var_18 = ((double)((long double)*(uint64_t*)this->m_pVariable));
0043572f              PStringBase<char>::sprintf(arg2, "%.2f");
00435726              break;
00435726          }
0043573e          case 0xa:
0043573e          {
0043573e              void* m_pVariable = this->m_pVariable;
0043574a              var_18 = ((double)((long double)*(uint32_t*)((char*)m_pVariable + 8)));
00435751              var_20 = ((double)((long double)*(uint32_t*)((char*)m_pVariable + 4)));
00435757              double var_28 = ((double)((long double)*(uint32_t*)m_pVariable));
00435760              PStringBase<char>::sprintf(arg2, "%.2f %.2f %.2f");
0043573e              break;
0043573e          }
0043576f          case 0xb:
0043576f          {
0043576f              void* m_pVariable_1 = this->m_pVariable;
0043577b              var_18 = ((double)((long double)*(uint32_t*)((char*)m_pVariable_1 + 0xc)));
00435782              var_20 = ((double)((long double)*(uint32_t*)((char*)m_pVariable_1 + 8)));
00435789              double var_28_1 = ((double)((long double)*(uint32_t*)((char*)m_pVariable_1 + 4)));
0043578f              int32_t var_30;
0043578f              var_30 = ((double)((long double)*(uint32_t*)m_pVariable_1));
00435798              PStringBase<char>::sprintf(arg2, "%.2f %.2f %.2f %.2f");
0043576f              break;
0043576f          }
004357ae          case 0xc:
004357ae          {
004357ae              PStringBase<unsigned short>::operator=(arg2, this->m_pVariable);
004357ae              break;
004357ae          }
004357cb          case 0xd:
004357cb          {
004357cb              PStringBase<unsigned short>::operator=(arg2, Waveform::ToString(this->m_pVariable, &__return));
004357d4              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004357cb              break;
004357cb          }
00435668      }
004355e0  }

004357e0  uint32_t jump_table_4357e0[0x6] = 
004357e0  {
004357e0      [0x0] =  0x00435603
004357e4      [0x1] =  0x0043560b
004357e8      [0x2] =  0x00435613
004357ec      [0x3] =  0x0043561b
004357f0      [0x4] =  0x00435624
004357f4      [0x5] =  0x0043562d
004357f8  }
004357f8  uint32_t jump_table_4357f8[0xe] = 
004357f8  {
004357f8      [0x0] =  0x0043566f
004357fc      [0x1] =  0x0043568d
00435800      [0x2] =  0x004356ba
00435804      [0x3] =  0x004356ba
00435808      [0x4] =  0x004356d8
0043580c      [0x5] =  0x004356e0
00435810      [0x6] =  0x004356e8
00435814      [0x7] =  0x004356f0
00435818      [0x8] =  0x004356f8
0043581c      [0x9] =  0x0043571b
00435820      [0xa] =  0x0043573e
00435824      [0xb] =  0x0043576f
00435828      [0xc] =  0x004357a7
0043582c      [0xd] =  0x004357ba
00435830  }

00435830  uint32_t __thiscall GRPTypedVariableObject::GetChoiceIndexForValue(class GRPTypedVariableObject const* this, uint32_t const arg2)

00435830  {
00435830      uint32_t m_num = this->m_ChoiceValues.m_num;
00435834      uint32_t m_num_1 = this->m_Choices.m_num;
00435839      uint32_t const result;
00435839      
00435839      if (m_num != m_num_1)
00435839      {
0043585b          result = arg2;
0043585b          
00435861          if (result >= m_num_1)
00435863              return 0xffffffff;
00435839      }
00435839      else
00435839      {
0043583b          result = 0;
0043583b          
0043583f          if (m_num <= 0)
00435863              return 0xffffffff;
00435863          
00435841          uint32_t* m_data = this->m_ChoiceValues.m_data;
00435841          
0043584a          while (arg2 != *(uint32_t*)m_data)
0043584a          {
0043584c              result += 1;
0043584d              m_data = &m_data[1];
0043584d              
00435852              if (result >= m_num)
00435858                  return 0xffffffff;
0043584a          }
00435839      }
00435839      
00435867      return result;
00435830  }

0043586a                                90 90 90 90 90 90                                                            ......

00435870  uint8_t __fastcall GRPTypedVariableObject::SetFromString(class GRPTypedVariableObject* this, class PStringBase<char> const* arg2)

00435870  {
00435873      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00435878      int32_t m_pVariable;
00435878      int32_t m_pVariable_3 = m_pVariable;
0043587b      class PSRefBufferCharData<char>* var_10 = PStringBase<char>::s_NullBuffer_1;
00435886      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0043588c      uint32_t m_num = this->m_Choices.m_num;
00435897      class PStringBase<char>* ebp = arg2;
0043589b      class PSRefBufferCharData<char>* eax_7;
0043589b      
0043589b      if (m_num <= 0)
0043589b      {
00435923          eax_7 = var_10;
00435923          
0043592a          if (eax_7 != ebp->m_charbuffer)
0043592a          {
0043593f              if ((InterlockedDecrement(&eax_7[-1]) == 0 && eax_7 != 0x14))
00435947                  **(uint32_t**)((char*)eax_7 - 0x14)(1);
00435947              
00435949              class PSRefBufferCharData<char>* m_charbuffer = ebp->m_charbuffer;
0043594c              var_10 = m_charbuffer;
00435954              InterlockedIncrement(&m_charbuffer[-1]);
0043595a              eax_7 = var_10;
0043592a          }
0043589b      }
0043589b      else
0043589b      {
004358a1          m_pVariable = 0;
004358a1          
004358a5          if (m_num <= 0)
004358a5          {
004358c3          label_4358c3:
004358c3              class PSRefBufferCharData<char>* m_charbuffer_2 = ebp->m_charbuffer;
004358cd              *(uint32_t*)_errno() = 0;
004358d3              int32_t m_pVariable_4 = strtol(m_charbuffer_2, 0, 0);
004358d3              
004358e3              if ((m_pVariable_4 < 0 || m_pVariable_4 >= this->m_Choices.m_num))
004358e9                  m_pVariable = 0;
004358e3              else
004358e5                  m_pVariable = m_pVariable_4;
004358a5          }
004358a5          else
004358a5          {
004358b2              while (PStringBase<char>::cmp(ebp, &this->m_Choices.m_data[m_pVariable], 0) != 0)
004358b2              {
004358be                  m_pVariable += 1;
004358be                  
004358c1                  if (m_pVariable >= this->m_Choices.m_num)
004358c1                      goto label_4358c3;
004358b2              }
004358a5          }
004358a5          
004358f1          if (this->m_ChoiceValues.m_num != this->m_Choices.m_num)
004358f1          {
0043590e              int32_t m_pVariable_2 = m_pVariable;
00435919              PStringBase<char>::sprintf(&var_10, &data_798ae0);
004358f1          }
004358f1          else
004358f1          {
004358f9              int32_t var_24_1 = this->m_ChoiceValues.m_data[m_pVariable];
00435904              PStringBase<char>::sprintf(&var_10, &data_798ae0);
004358f1          }
004358f1          
0043595a          eax_7 = var_10;
0043589b      }
0043589b      
00435961      m_pVariable = 0;
00435963      int32_t ecx_4 = (this->m_Type - 1);
00435963      
00435967      if (ecx_4 <= 0xd)
00435967      {
0043596d          uint8_t eax_14;
0043596d          int80_t x87_r0;
0043596d          
0043596d          switch (ecx_4)
0043596d          {
00435974              case 0:
00435974              case 3:
00435974              {
00435974                  m_pVariable = this->m_pVariable;
00435980                  *(uint32_t*)_errno() = 0;
0043598c                  *(uint32_t*)m_pVariable = strtoul(eax_7, 0, 0);
00435991                  m_pVariable = 1;
00435b1f              label_435b1f:
00435b1f                  
00435b21                  if (this->m_OnChangedCallbackFunction != 0)
00435b21                  {
00435b23                      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_Name.m_charbuffer;
00435b26                      arg2 = m_charbuffer_1;
00435b2e                      InterlockedIncrement(&m_charbuffer_1[-1]);
00435b39                      this->m_OnChangedCallbackFunction(&arg2);
00435b40                      void* __offset(PStringBase<char>, -0x14) esi_2 = &arg2[-5];
00435b40                      
00435b56                      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00435b5e                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00435b21                  }
00435974                  break;
00435974              }
004359a1              case 1:
004359a1              {
004359a1                  eax_14 = GRStrings::StringToBool(&var_10, this->m_pVariable);
00435b13              label_435b13:
00435b13                  m_pVariable = eax_14;
00435b13                  
00435b1a                  if (m_pVariable != 0)
00435b1a                      goto label_435b1f;
004359a1                  break;
004359a1              }
004359ab              case 2:
004359ab              {
004359ab                  m_pVariable = this->m_pVariable;
004359b7                  *(uint32_t*)_errno() = 0;
004359c3                  *(uint32_t*)m_pVariable = strtol(eax_7, 0, 0);
004359c8                  m_pVariable = 1;
004359ca                  goto label_435b1f;
004359ab              }
004359cf              case 4:
004359cf              {
004359cf                  m_pVariable = this->m_pVariable;
004359db                  *(uint32_t*)_errno() = 0;
004359e7                  *(uint16_t*)m_pVariable = strtol(eax_7, 0, 0);
004359ed                  m_pVariable = 1;
004359ef                  goto label_435b1f;
004359cf              }
004359f4              case 5:
004359f4              {
004359f4                  m_pVariable = this->m_pVariable;
00435a00                  *(uint32_t*)_errno() = 0;
00435a0c                  *(uint16_t*)m_pVariable = strtoul(eax_7, 0, 0);
00435a12                  m_pVariable = 1;
00435a14                  goto label_435b1f;
004359f4              }
00435a19              case 6:
00435a19              {
00435a19                  m_pVariable = this->m_pVariable;
00435a25                  *(uint32_t*)_errno() = 0;
00435a31                  *(uint8_t*)m_pVariable = strtol(eax_7, 0, 0);
00435a36                  m_pVariable = 1;
00435a38                  goto label_435b1f;
00435a19              }
00435a3d              case 7:
00435a3d              {
00435a3d                  m_pVariable = this->m_pVariable;
00435a49                  *(uint32_t*)_errno() = 0;
00435a55                  *(uint8_t*)m_pVariable = strtoul(eax_7, 0, 0);
00435a5a                  m_pVariable = 1;
00435a5c                  goto label_435b1f;
00435a3d              }
00435a61              case 8:
00435a61              {
00435a61                  m_pVariable = this->m_pVariable;
00435a6b                  *(uint32_t*)_errno() = 0;
00435a71                  strtod(eax_7, 0);
00435a77                  *(uint32_t*)m_pVariable = ((float)x87_r0);
00435a7c                  m_pVariable = 1;
00435a7e                  goto label_435b1f;
00435a61              }
00435a83              case 9:
00435a83              {
00435a83                  m_pVariable = this->m_pVariable;
00435a8d                  *(uint32_t*)_errno() = 0;
00435a93                  strtod(eax_7, 0);
00435a99                  *(uint64_t*)m_pVariable = ((double)x87_r0);
00435a9e                  m_pVariable = 1;
00435aa0                  goto label_435b1f;
00435a83              }
00435aa2              case 0xa:
00435aa2              {
00435aa2                  void* m_pVariable_1 = this->m_pVariable;
00435ac6                  int32_t var_c;
00435ac6                  int32_t var_8;
00435ac6                  int32_t var_4;
00435ac6                  
00435ac6                  if (sscanf(eax_7, "%f %f %f", &var_c, &var_8, &var_4) == 3)
00435ac6                  {
00435acc                      int32_t ecx_5 = var_8;
00435ad0                      int32_t edx_3 = var_4;
00435ad4                      *(uint32_t*)m_pVariable_1 = var_c;
00435ad6                      *(uint32_t*)((char*)m_pVariable_1 + 4) = ecx_5;
00435ad9                      *(uint32_t*)((char*)m_pVariable_1 + 8) = edx_3;
00435adc                      m_pVariable = 1;
00435ade                      goto label_435b1f;
00435ac6                  }
00435ac6                  
00435ae0                  m_pVariable = 0;
00435aa2                  break;
00435aa2              }
00435aed              case 0xb:
00435aed              {
00435aed                  eax_14 = GRStrings::StringToRGBAColor(&var_10, this->m_pVariable);
00435af2                  goto label_435b13;
00435aed              }
00435afc              case 0xc:
00435afc              {
00435afc                  PStringBase<unsigned short>::operator=(this->m_pVariable, &var_10);
00435b01                  m_pVariable = 1;
00435b03                  goto label_435b1f;
00435afc              }
00435b0e              case 0xd:
00435b0e              {
00435b0e                  eax_14 = GRStrings::StringToWaveform(&var_10, this->m_pVariable);
00435b0e                  goto label_435b13;
00435b0e              }
0043596d          }
0043596d          
00435b60          eax_7 = var_10;
00435967      }
00435967      
00435b77      if ((InterlockedDecrement(&eax_7[-1]) == 0 && eax_7 != 0x14))
00435b7f          *(uint32_t*)*(int32_t*)((char*)eax_7 + -0x14)(1);
00435b7f      
00435b84      int32_t eax_36;
00435b84      eax_36 = m_pVariable;
00435b8a      return eax_36;
00435870  }

00435b8d                                         8d 49 00                                                               .I.
00435b90  uint32_t jump_table_435b90[0xe] = 
00435b90  {
00435b90      [0x0] =  0x00435974
00435b94      [0x1] =  0x00435998
00435b98      [0x2] =  0x004359ab
00435b9c      [0x3] =  0x00435974
00435ba0      [0x4] =  0x004359cf
00435ba4      [0x5] =  0x004359f4
00435ba8      [0x6] =  0x00435a19
00435bac      [0x7] =  0x00435a3d
00435bb0      [0x8] =  0x00435a61
00435bb4      [0x9] =  0x00435a83
00435bb8      [0xa] =  0x00435aa2
00435bbc      [0xb] =  0x00435ae4
00435bc0      [0xc] =  0x00435af4
00435bc4      [0xd] =  0x00435b05
00435bc8  }

00435bc8                          90 90 90 90 90 90 90 90                                                          ........

00435bd0  uint8_t GRStrings::StringToRGBAColor(class PStringBase<char> const* arg1, class RGBAColor* arg2)

00435bd0  {
00435bf3      int32_t var_10;
00435bf3      float var_c;
00435bf3      float var_8;
00435bf3      float var_4;
00435bf3      int32_t eax = sscanf(arg1->m_charbuffer, "%f %f %f %f", &var_10, &var_c, &var_8, &var_4);
00435bf3      
00435bff      if (eax == 3)
00435c01          var_4 = 1f;
00435bff      else if (eax != 4)
00435c31      {
00435c33          eax = 0;
00435c38          return 0;
00435c31      }
00435c31      
00435c11      float edx_1 = var_c;
00435c15      arg2->r = var_10;
00435c17      float ecx_2 = var_8;
00435c1b      arg2->g = edx_1;
00435c1e      float edx_2 = var_4;
00435c22      arg2->b = ecx_2;
00435c25      arg2->a = edx_2;
00435c28      class RGBAColor* eax_1;
00435c28      eax_1 = 1;
00435c2d      return 1;
00435bd0  }

00435c39                                                                             90 90 90 90 90 90 90                           .......

00435c40  uint8_t GRStrings::StringToWaveform(class PStringBase<char> const* arg1, class Waveform* arg2)

00435c40  {
00435c45      class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
00435c50      *(uint32_t*)_errno() = 0;
00435c56      strtod(m_charbuffer, 0);
00435c63      long double x87_r0;
00435c63      arg2->base = ((float)x87_r0);
00435c66      arg2->type = 1;
00435c6c      class Waveform* eax_1;
00435c6c      eax_1 = 1;
00435c6f      return 1;
00435c40  }


00435c70  uint8_t GRStrings::StringToBool(class PStringBase<char> const* arg1, uint8_t* arg2)

00435c70  {
00435c73      int32_t ebx;
00435c73      int32_t var_14 = ebx;
00435c80      void* var_4;
00435c80      PStringBase<char>::PStringBase<char>(&var_4, "False");
00435c80      
00435c9f      if (PStringBase<char>::eq(arg1, &var_4, 0) != 0)
00435d62          ebx = 1;
00435c9f      else
00435c9f      {
00435cae          void* var_10;
00435cae          PStringBase<char>::PStringBase<char>(&var_10, &data_798b04);
00435cbc          uint8_t eax_1 = PStringBase<char>::eq(arg1, &var_10, 0);
00435cc5          int32_t* esi_2 = ((char*)var_10 - 0x14);
00435ccc          ebx = eax_1;
00435ccc          
00435cd6          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00435cde              **(uint32_t**)esi_2(1);
00435cde          
00435ce2          if (ebx != 0)
00435d62              ebx = 1;
00435ce2          else
00435ce2          {
00435ced              void* var_c;
00435ced              PStringBase<char>::PStringBase<char>(&var_c, &data_798b00);
00435cfb              uint8_t eax_4 = PStringBase<char>::eq(arg1, &var_c, 0);
00435d04              int32_t* esi_4 = ((char*)var_c - 0x14);
00435d0b              ebx = eax_4;
00435d0b              
00435d15              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00435d1d                  **(uint32_t**)esi_4(1);
00435d1d              
00435d21              if (ebx != 0)
00435d62                  ebx = 1;
00435d21              else
00435d21              {
00435d2c                  class PStringBase<char> var_8;
00435d2c                  PStringBase<char>::PStringBase<char>(&var_8, &data_798afc);
00435d3a                  uint8_t eax_7 = PStringBase<char>::eq(arg1, &var_8, 0);
00435d43                  int32_t* esi_6 = (var_8 - 0x14);
00435d4a                  ebx = eax_7;
00435d4a                  
00435d54                  if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00435d5c                      **(uint32_t**)esi_6(1);
00435d5c                  
00435d60                  if (ebx != 0)
00435d62                      ebx = 1;
00435d21              }
00435ce2          }
00435c9f      }
00435c9f      
00435d68      int32_t* esi_8 = ((char*)var_4 - 0x14);
00435d68      
00435d77      if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
00435d7f          **(uint32_t**)esi_8(1);
00435d7f      
00435d89      int32_t eax_10;
00435d89      eax_10 = ebx == 0;
00435d8d      *(uint8_t*)arg2 = eax_10;
00435d8f      eax_10 = 1;
00435d95      return 1;
00435c70  }

00435d96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00435da0  void __fastcall GRPTypedVariableObject::~GRPTypedVariableObject(class GRPTypedVariableObject* this)

00435da0  {
00435da8      operator delete[](this->m_ChoiceValues.m_data);
00435daf      this->m_ChoiceValues.m_data = 0;
00435db2      this->m_ChoiceValues.m_num = 0;
00435db5      class PStringBase<char>* m_data = this->m_Choices.m_data;
00435db5      
00435dbd      if (m_data != 0)
00435dc1          PStringBase<char>::`vector deleting destructor'(m_data, 3);
00435dc1      
00435dce      this->m_Choices.m_data = 0;
00435dd1      this->m_Choices.m_num = 0;
00435dd7      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_Description.m_charbuffer - 0x14);
00435dd7      
00435de6      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00435dee          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00435dee      
00435df3      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = (this->m_Name.m_charbuffer - 0x14);
00435df3      
00435e04      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00435e0c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00435da0  }

00435e11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00435e20  void GlobalRegistry::RegisterConsoleCallbackObject(class IConsoleCallbackObject* arg1)

00435e20  {
00435e20      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00435e20      
00435e27      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00435e27      {
00435e2e          void* eax = operator new(0x8100);
00435e2e          
00435e38          if (eax == 0)
00435e43              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00435e38          else
00435e3c              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00435e3c          
00435e45          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00435e27      }
00435e27      
00435e5a      int32_t eax_2 = (GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects.m_sizeAndDeallocate & 0x7fffffff);
00435e61      uint8_t eax_5;
00435e61      
00435e61      if (GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects.m_num >= eax_2)
00435e6f          eax_5 = SmartArray<unsigned long,1>::grow(&GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects, SmartArray<unsigned long,1>::get_new_size(&GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects, (eax_2 + 1)));
00435e6f      
00435e76      if ((GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects.m_num < eax_2 || eax_5 != 0))
00435e76      {
00435e51          GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects.m_data[GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects.m_num] = arg1;
00435e51          GlobalRegistry::s_pcGlobalRegistry_1->m_ConsoleCallbackObjects.m_num += 1;
00435e76      }
00435e20  }

00435e89                             90 90 90 90 90 90 90                                                           .......

00435e90  void GlobalRegistry::ProcessCommand(class PStringBase<char> const* arg1)

00435e90  {
00435e93      int32_t ebx;
00435e93      int32_t var_30 = ebx;
00435e9a      int32_t ebp;
00435e9a      int32_t var_34 = ebp;
00435e9b      int32_t esi;
00435e9b      int32_t var_38 = esi;
00435e9c      class PStringBase<char>* esi_1 = arg1;
00435ea0      class PSRefBufferCharData<char>* m_charbuffer = esi_1->m_charbuffer;
00435ea2      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
00435ea6      void* edi;
00435ea6      void* var_3c = edi;
00435eaa      void* __offset(PSRefBufferCharData<char>, -0x10) i_1 = &m_charbuffer[-1];
00435ead      i_1 = InterlockedIncrement(i_1);
00435eb0      void* const var_44 = &data_794098;
00435eb5      PStringBase<char>::PStringBase<char>(&i_1, &data_794098);
00435eba      int32_t var_44_1 = 1;
00435ebc      int32_t var_48 = 1;
00435ec2      PStringBase<char>::trim(&m_charbuffer_1, 1, 1, i_1);
00435ecb      struct List<PStringBase<char> >::VTable* const var_10;
00435ecb      i_1 = &var_10;
00435ecc      int32_t ebp_1 = 0;
00435ece      int32_t var_44_2 = 0x20;
00435ed6      var_10 = &List<class PStringBase<char> >::`vftable';
00435eda      int32_t* i_2 = nullptr;
00435ede      int32_t var_8 = 0;
00435ee2      int32_t var_4 = 0;
00435ef0      int32_t* esp_1;
00435ef0      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3;
00435ef0      bool cond:0_1;
00435ef0      
00435ef0      if (PSUtils::explode(esi_1, 0x20, i_1) != 0)
00435ef0      {
00435f11          if (var_4 < 1)
00435f11          {
00435f17              var_10 = &List<class PStringBase<char> >::`vftable';
00435f1b              List<PStringBase<char> >::flush(&var_10);
00435f24              esi_3 = &m_charbuffer_1->m_data[0xffffffec];
00435f2a              i_1 = ((char*)esi_3 + 4);
00435f2a              goto label_435f2b;
00435f11          }
00435f11          
00435f40          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00435f45          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_1;
00435f4c          i_1 = &PStringBase<char>::s_NullBuffer_1[-1];
00435f4d          InterlockedIncrement(i_1);
00435f4f          int32_t* i = i_2;
00435f53          int32_t var_1c = 0;
00435f57          int32_t var_18_1 = 0;
00435f5b          int32_t var_14_1 = 0;
00435f5b          
00435f62          while (i != 0)
00435f62          {
00435f66              if (ebp_1 != 0)
00435f66              {
00435f9f                  i_1 = i;
00435fa4                  SmartArray<PStringBase<char>,1>::AddToEnd(&var_1c, i_1);
00435f66              }
00435f66              else
00435f66              {
00435f68                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_4;
00435f68                  
00435f6e                  if (PStringBase<char>::s_NullBuffer_6 != *(uint32_t*)i)
00435f6e                  {
00435f76                      i_1 = &PStringBase<char>::s_NullBuffer_6[-1];
00435f76                      
00435f83                      if ((InterlockedDecrement(i_1) == 0 && PStringBase<char>::s_NullBuffer_6 != 0x14))
00435f83                      {
00435f85                          int32_t edx_1 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_6 + -0x14);
00435f87                          i_1 = 1;
00435f8b                          *(uint32_t*)edx_1(i_1);
00435f83                      }
00435f83                      
00435f8d                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = *(uint32_t*)i;
00435f8f                      PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_5;
00435f96                      i_1 = &PStringBase<char>::s_NullBuffer_5[-1];
00435f97                      InterlockedIncrement(i_1);
00435f99                      i = i[1];
00435f9c                      ebp_1 += 1;
00435f9d                      continue;
00435f6e                  }
00435f66              }
00435f66              
00435fa9              i = i[1];
00435fac              ebp_1 += 1;
00435f62          }
00435f62          
00435faf          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00435faf          
00435fb6          if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00435fb6          {
00435fb8              i_1 = 0x8100;
00435fbd              void* eax_8 = operator new(i_1);
00435fbd              
00435fc7              if (eax_8 == 0)
00435fd2                  GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00435fc7              else
00435fcb                  GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_8);
00435fcb              
00435fd4              GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00435fb6          }
00435fb6          
00435fdd          int32_t* var_28;
00435fdd          i_1 = &var_28;
00435fe5          void* __offset(PSRefBufferCharData<char>, -0x10)* esp_2 = &var_3c;
00435fec          void* __offset(PStringBase<char>, -0x14) esi_12;
00435fec          
00435fec          if (GlobalRegistryInstance::FindCommandByName(GlobalRegistry::s_pcGlobalRegistry_1, &PStringBase<char>::s_NullBuffer_4, i_1) == 0)
00435fec          {
00436148              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0043614d              arg1 = PStringBase<char>::s_NullBuffer_3;
00436154              i_1 = &PStringBase<char>::s_NullBuffer_3[-1];
00436155              InterlockedIncrement(i_1);
0043615b              i_1 = PStringBase<char>::s_NullBuffer_4;
00436160              char const* const var_44_7 = "Unrecognized command: %s\n\n";
00436166              PStringBase<char>::sprintf(&arg1, "Unrecognized command: %s\n\n");
00436170              GlobalRegistry::OutputText(&arg1);
00436179              esi_12 = &arg1[-5];
00436182              i_1 = ((char*)esi_12 + 4);
00436183              esp_2 = &var_3c;
00436183              
0043618f              if ((InterlockedDecrement(i_1) == 0 && esi_12 != 0))
0043618f              {
00436191                  i_1 = 1;
00436191                  esp_2 = &i_1;
00436197                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_12) + -0x14)();
0043618f              }
00435fec          }
00435fec          else
00435fec          {
00435ff8              int32_t eax_11 = *(uint32_t*)(*(uint32_t*)var_28 + 0x14)();
00436003              void* eax_12 = *(uint32_t*)(*(uint32_t*)var_28 + 0x1c)();
00436003              
0043600a              if (eax_11 != 0)
0043600a              {
00436011                  if (*(uint32_t*)(eax_11 + 0xc)() == 0)
00436011                      goto label_43602f;
0043600a              }
0043600a              else if (eax_12 == 0)
0043601a              {
0043602f              label_43602f:
0043602f                  i_1 = "Command failed.\n\n";
00436038                  class PStringBase<char> var_20;
00436038                  PStringBase<char>::PStringBase<char>(&var_20, i_1);
00436041                  i_1 = &var_20;
00436042                  GlobalRegistry::OutputText(i_1);
00436051                  int32_t* esi_8 = (var_20 - 0x14);
0043605a                  i_1 = &esi_8[1];
0043605a                  
00436063                  if ((InterlockedDecrement(i_1) == 0 && esi_8 != 0))
00436063                  {
00436065                      int32_t eax_16 = *(uint32_t*)esi_8;
00436067                      i_1 = 1;
0043606b                      *(uint32_t*)eax_16(i_1);
00436063                  }
00436063                  
0043606d                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00436072                  arg1 = PStringBase<char>::s_NullBuffer_2;
00436079                  i_1 = &PStringBase<char>::s_NullBuffer_2[-1];
0043607a                  InterlockedIncrement(i_1);
00436083                  i_1 = var_28[1];
00436088                  char const* const var_44_4 = "         Name: %s\n";
0043608e                  PStringBase<char>::sprintf(&arg1, "         Name: %s\n");
00436098                  GlobalRegistry::OutputText(&arg1);
004360a1                  void* i_3 = var_28[2];
004360a1                  
004360b1                  if (*(uint32_t*)((char*)i_3 - 4) != 1)
004360b1                  {
004360b3                      i_1 = i_3;
004360b8                      char const* const var_44_5 = "  Description: %s\n";
004360be                      PStringBase<char>::sprintf(&arg1, "  Description: %s\n");
004360c8                      GlobalRegistry::OutputText(&arg1);
004360b1                  }
004360b1                  
004360d2                  if (eax_12 != 0)
004360d2                  {
004360d4                      void* i_4 = *(uint32_t*)((char*)eax_12 + 0xc);
004360d4                      
004360da                      if (*(uint32_t*)((char*)i_4 - 4) != 1)
004360da                      {
004360dc                          i_1 = i_4;
004360e1                          char const* const var_44_6 = "        Usage: %s\n";
004360e7                          PStringBase<char>::sprintf(&arg1, "        Usage: %s\n");
004360f1                          GlobalRegistry::OutputText(&arg1);
004360da                      }
004360d2                  }
004360d2                  
004360f9                  i_1 = &data_794508;
00436102                  PStringBase<char>::PStringBase<char>(&var_20, i_1);
0043610b                  i_1 = &var_20;
0043610c                  GlobalRegistry::OutputText(i_1);
00436115                  int32_t* esi_10 = (var_20 - 0x14);
0043611e                  i_1 = &esi_10[1];
0043611e                  
00436127                  if ((InterlockedDecrement(i_1) == 0 && esi_10 != 0))
00436127                  {
00436129                      int32_t eax_19 = *(uint32_t*)esi_10;
0043612b                      i_1 = 1;
0043612e                      *(uint32_t*)eax_19(i_1);
00436127                  }
00436127                  
00436134                  esi_12 = &arg1[-5];
0043613a                  i_1 = ((char*)esi_12 + 4);
0043613b                  esp_2 = &var_3c;
0043613b                  
00436143                  if ((InterlockedDecrement(i_1) == 0 && esi_12 != 0))
00436143                  {
00436145                      i_1 = 1;
00436145                      esp_2 = &i_1;
00436197                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_12) + -0x14)();
00436143                  }
0043601a              }
0043601a              else
0043601a              {
00436020                  i_1 = &var_1c;
00436024                  esp_2 = &var_3c;
00436024                  
00436029                  if (*(uint32_t*)((char*)eax_12 + 0x10)(i_1) == 0)
00436029                      goto label_43602f;
0043601a              }
00435fec          }
00435fec          
004361a7          if ((esp_2[9] & 0x80000000) == 0x80000000)
004361a7          {
004361a9              int32_t ecx_20 = esp_2[8];
004361a9              
004361af              if (ecx_20 != 0)
004361af              {
004361b1                  *(uint32_t*)((char*)esp_2 - 4) = 3;
004361b3                  PStringBase<char>::`vector deleting destructor'(ecx_20);
004361af              }
004361a7          }
004361a7          
004361c2          int32_t* esi_15 = (esp_2[4] - 0x14);
004361c8          *(uint32_t*)((char*)esp_2 - 4) = &esi_15[1];
004361c9          void* esp_5 = esp_2;
004361c9          
004361d1          if ((InterlockedDecrement() == 0 && esi_15 != 0))
004361d1          {
004361d3              int32_t edx_8 = *(uint32_t*)esi_15;
004361d5              *(uint32_t*)((char*)esp_5 - 4) = 1;
004361d9              *(uint32_t*)edx_8();
004361d1          }
004361d1          
004361df          *(uint32_t*)((char*)esp_5 + 0x2c) = &List<class PStringBase<char> >::`vftable';
004361e7          List<PStringBase<char> >::flush(((char*)esp_5 + 0x2c));
004361f0          esi_3 = (*(uint32_t*)((char*)esp_5 + 0x18) - 0x14);
004361f6          *(uint32_t*)((char*)esp_5 - 4) = ((char*)esi_3 + 4);
004361f7          esp_1 = esp_5;
004361f7          
004361fb          if (InterlockedDecrement() == 0)
004361fb          {
004361fd              cond:0_1 = esi_3 == 0;
004361fd              goto label_4361ff;
004361fb          }
00435ef0      }
00435ef0      else
00435ef0      {
00435ef6          var_10 = &List<class PStringBase<char> >::`vftable';
00435efa          List<PStringBase<char> >::flush(&var_10);
00435f03          esi_3 = &m_charbuffer_1->m_data[0xffffffec];
00435f09          i_1 = ((char*)esi_3 + 4);
00435f2b      label_435f2b:
00435f2b          esp_1 = &var_3c;
00435f2b          
00435f33          if (InterlockedDecrement() == 0)
00435f33          {
00435f39              cond:0_1 = esi_3 == 0;
004361ff          label_4361ff:
004361ff              
004361ff              if (!(cond:0_1))
004361ff              {
00436201                  int32_t edx_9 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
00436205                  *(uint32_t*)((char*)esp_1 - 4) = 1;
00436207                  *(uint32_t*)edx_9();
004361ff              }
00435f33          }
00435ef0      }
00436209      *(uint32_t*)esp_1;
00436209      esp_1[1];
00436209      esp_1[2];
00436209      esp_1[3];
00435e90  }

00436211                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00436220  uint8_t __thiscall HashTable<PStringBase<char>,GRPCommand *,0>::remove(class HashTable<PStringBase<char>,GRPCommand *,0>* this, class PStringBase<char> const* arg2, class GRPCommand** arg3)

00436220  {
00436229      class HashTableData<PStringBase<char>,GRPObject *>* eax = IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>::remove(&this->m_intrusiveTable.vtable, arg2);
00436229      
00436232      if (eax == 0)
00436232      {
0043626d          eax = 0;
00436270          return 0;
00436232      }
00436232      
0043623c      *(uint32_t*)arg3 = eax->m_data;
00436240      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (eax->m_hashKey.m_charbuffer - 0x14);
00436240      
00436253      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0043625b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0043625b      
0043625e      operator delete(eax);
00436267      int32_t eax_3;
00436267      eax_3 = 1;
0043626a      return 1;
00436220  }

00436273                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00436280  void GlobalRegistry::RegisterCommand(uint8_t (* arg1)(), class PStringBase<char> const* arg2, class PStringBase<char> const* arg3)

00436280  {
0043628f      void* var_8;
0043628f      PStringBase<char>::PStringBase<char>(&var_8, &data_794098);
00436298      class PStringBase<char>* edi = arg2;
004362a0      int32_t eax_1 = strstr(edi->m_charbuffer, var_8);
004362ab      void* eax_2;
004362ab      
004362ab      if (eax_1 != 0)
004362b2          eax_2 = (eax_1 - edi->m_charbuffer);
004362ab      else
004362ad          eax_2 = 0xffffffff;
004362ad      
004362bb      int32_t ebx;
004362bb      ebx = eax_2 == 0xffffffff;
004362be      int32_t* esi_1 = ((char*)var_8 - 0x14);
004362be      
004362d1      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004362d9          **(uint32_t**)esi_1(1);
004362d9      
004362e9      if ((ebx != 0 && arg1 != 0))
004362e9      {
004362ef          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
004362ef          
004362f6          if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
004362f6          {
004362fd              void* eax_5 = operator new(0x8100);
004362fd              
00436307              if (eax_5 == 0)
00436312                  GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436307              else
0043630b                  GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_5);
0043630b              
00436314              GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
004362f6          }
004362f6          
00436328          void var_4;
00436328          
00436328          if (GlobalRegistryInstance::FindCommandByName(GlobalRegistry::s_pcGlobalRegistry_1, edi, &var_4) == 0)
00436328          {
00436330              void* eax_7 = operator new(0x10);
0043633a              class PStringBase<char>* esi_2;
0043633a              
0043633a              if (eax_7 == 0)
00436347                  esi_2 = nullptr;
0043633a              else
00436343                  esi_2 = GRPNoArgsCommand::GRPNoArgsCommand(eax_7);
00436343              
0043634d              PStringBase<unsigned short>::operator=(&esi_2[1], edi);
0043635a              PStringBase<unsigned short>::operator=(&esi_2[2], arg3);
0043635f              *(int32_t*)((char*)esi_2 + 0xc) = arg1;
00436362              class PSRefBufferCharData<char>* m_charbuffer = edi->m_charbuffer;
00436364              class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0043636c              InterlockedIncrement(&m_charbuffer[-1]);
00436376              PStringBase<char>::break_reference(&m_charbuffer_1);
00436380              _strlwr(m_charbuffer_1);
00436393              arg2 = esi_2;
00436393              
004363ab              if (HashTable<PStringBase<char>,unsigned long,0>::add(&GlobalRegistry::GetRegistry()->m_CommandHash.vtable, &m_charbuffer_1, &arg2) == 0)
004363b1                  GRPNoArgsCommand::`scalar deleting destructor'(esi_2, 1);
004363b1              
004363ba              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00436328          }
004362e9      }
00436280  }

004363c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004363d0  void GlobalRegistry::RegisterCommand(uint8_t (* arg1)(class PStringBaseArray<char> const*), class PStringBase<char> const* arg2, class PStringBase<char> const* arg3, class PStringBase<char> const* arg4)

004363d0  {
004363df      void* var_8;
004363df      PStringBase<char>::PStringBase<char>(&var_8, &data_794098);
004363e8      class PStringBase<char>* edi = arg2;
004363f0      int32_t eax_1 = strstr(edi->m_charbuffer, var_8);
004363fb      void* eax_2;
004363fb      
004363fb      if (eax_1 != 0)
00436402          eax_2 = (eax_1 - edi->m_charbuffer);
004363fb      else
004363fd          eax_2 = 0xffffffff;
004363fd      
0043640b      int32_t ebx;
0043640b      ebx = eax_2 == 0xffffffff;
0043640e      int32_t* esi_1 = ((char*)var_8 - 0x14);
0043640e      
00436421      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00436429          **(uint32_t**)esi_1(1);
00436429      
00436439      if ((ebx != 0 && arg1 != 0))
00436439      {
0043643f          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
0043643f          
00436446          if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00436446          {
0043644d              void* eax_5 = operator new(0x8100);
0043644d              
00436457              if (eax_5 == 0)
00436462                  GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436457              else
0043645b                  GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_5);
0043645b              
00436464              GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00436446          }
00436446          
00436478          void var_4;
00436478          
00436478          if (GlobalRegistryInstance::FindCommandByName(GlobalRegistry::s_pcGlobalRegistry_1, edi, &var_4) == 0)
00436478          {
00436480              void* eax_7 = operator new(0x14);
0043648a              class PStringBase<char>* esi_2;
0043648a              
0043648a              if (eax_7 == 0)
00436497                  esi_2 = nullptr;
0043648a              else
00436493                  esi_2 = GRPWithArgsCommand::GRPWithArgsCommand(eax_7);
00436493              
0043649d              PStringBase<unsigned short>::operator=(&esi_2[1], edi);
004364aa              PStringBase<unsigned short>::operator=(&esi_2[2], arg3);
004364b7              *(int32_t*)((char*)esi_2 + 0x10) = arg1;
004364ba              PStringBase<unsigned short>::operator=(&esi_2[3], arg4);
004364bf              class PSRefBufferCharData<char>* m_charbuffer = edi->m_charbuffer;
004364c1              class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
004364c9              InterlockedIncrement(&m_charbuffer[-1]);
004364d3              PStringBase<char>::break_reference(&m_charbuffer_1);
004364dd              _strlwr(m_charbuffer_1);
004364f0              arg2 = esi_2;
004364f0              
00436508              if (HashTable<PStringBase<char>,unsigned long,0>::add(&GlobalRegistry::GetRegistry()->m_CommandHash.vtable, &m_charbuffer_1, &arg2) == 0)
00436508              {
0043650c                  GRPWithArgsCommand::~GRPWithArgsCommand(esi_2);
00436512                  operator delete(esi_2);
00436508              }
00436508              
0043651e              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00436478          }
00436439      }
004363d0  }

0043652a                                90 90 90 90 90 90                                                            ......

00436530  void GlobalRegistry::UnregisterCommand(class PStringBase<char> const* arg1)

00436530  {
00436530      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00436530      
0043653a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043653a      {
00436541          void* eax = operator new(0x8100);
00436541          
0043654b          if (eax == 0)
00436556              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
0043654b          else
0043654f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
0043654f          
00436558          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043653a      }
0043653a      
00436571      class GRPCommand* var_8;
00436571      
00436571      if (GlobalRegistryInstance::FindCommandByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_8) != 0)
00436571      {
00436577          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
00436579          class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
00436581          InterlockedIncrement(&m_charbuffer[-1]);
0043658b          PStringBase<char>::break_reference(&m_charbuffer_1);
00436595          _strlwr(m_charbuffer_1);
0043659b          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry;
0043659b          
004365a5          if (GlobalRegistry::s_pcGlobalRegistry_2 == 0)
004365a5          {
004365ac              void* eax_3 = operator new(0x8100);
004365ac              
004365b6              if (eax_3 == 0)
004365c1                  GlobalRegistry::s_pcGlobalRegistry_2 = nullptr;
004365b6              else
004365ba                  GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistryInstance::GlobalRegistryInstance(eax_3);
004365ba              
004365c3              GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_2;
004365a5          }
004365a5          
004365da          void var_4;
004365da          HashTable<PStringBase<char>,GRPCommand *,0>::remove(&GlobalRegistry::s_pcGlobalRegistry_2->m_CommandHash, &m_charbuffer_1, &var_4);
004365df          class GRPCommand* eax_4 = var_8;
004365df          
004365ed          if (eax_4 != 0)
004365ed          {
004365f2              void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = (eax_4->m_Description.m_charbuffer - 0x14);
004365f2              
00436601              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00436609                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00436609              
0043660e              void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = (eax_4->m_Name.m_charbuffer - 0x14);
0043660e              
0043661d              if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00436625                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00436625              
00436628              operator delete(eax_4);
004365ed          }
004365ed          
00436634          void* __offset(PSRefBufferCharData<char>, -0x14) esi_6 = &m_charbuffer_1->m_data[0xffffffec];
0043663b          var_8 = nullptr;
0043663b          
0043664d          if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00436655              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00436571      }
00436571      
00436657      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_3 = GlobalRegistry::s_pcGlobalRegistry;
00436657      
0043665f      if ((GlobalRegistry::s_pcGlobalRegistry_3 != 0 && GlobalRegistryInstance::IsEmpty(GlobalRegistry::s_pcGlobalRegistry_3) != 0))
0043665f      {
0043666a          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_4 = GlobalRegistry::s_pcGlobalRegistry;
0043666a          
00436674          if (GlobalRegistry::s_pcGlobalRegistry_4 != 0)
00436674          {
00436676              GlobalRegistryInstance::~GlobalRegistryInstance(GlobalRegistry::s_pcGlobalRegistry_4);
0043667c              operator delete(GlobalRegistry::s_pcGlobalRegistry_4);
00436674          }
00436674          
00436684          GlobalRegistry::s_pcGlobalRegistry = nullptr;
0043665f      }
00436530  }

00436693                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004366a0  void GlobalRegistry::RegisterVariableInternal(void* arg1, enum GRVDataType const arg2, class PStringBase<char> const* arg3, class PStringBase<char> const* arg4, void (* arg5)(class PStringBase<char> const*), uint32_t const arg6, class PStringBase<char>* arg7, uint32_t const* arg8)

004366a0  {
004366a4      uint32_t const ebp = arg6;
004366a4      
004366b2      if ((ebp == 0 || arg7 != 0))
004366b2      {
004366c4          PStringBase<char>::PStringBase<char>(&arg6, &data_794098);
004366cd          class PStringBase<char>* edi_1 = arg3;
004366d5          int32_t eax_3 = strstr(edi_1->m_charbuffer, arg6);
004366e0          void* eax_4;
004366e0          
004366e0          if (eax_3 != 0)
004366e7              eax_4 = (eax_3 - edi_1->m_charbuffer);
004366e0          else
004366e2              eax_4 = 0xffffffff;
004366e2          
004366f0          int32_t ebx;
004366f0          ebx = eax_4 == 0xffffffff;
004366f3          int32_t* esi_2 = (arg6 - 0x14);
004366f3          
00436706          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0043670e              **(uint32_t**)esi_2(1);
0043670e          
0043672a          if ((ebx != 0 && (arg1 != 0 && arg2 != GRVDataType_Unknown)))
0043672a          {
0043673d              int32_t* var_8;
0043673d              uint8_t eax_10 = GlobalRegistryInstance::FindObjectByName(GlobalRegistry::GetRegistry(), edi_1, &var_8);
00436742              int32_t* ebx_1 = nullptr;
00436742              
00436746              if (eax_10 != 0)
00436751                  ebx_1 = *(uint32_t*)(*(uint32_t*)var_8 + 0x3c)();
00436751              
00436755              if ((eax_10 == 0 || ebx_1 != 0))
00436755              {
0043675d                  void* eax_12 = operator new(0x2c);
00436767                  int32_t* m_charbuffer_4;
00436767                  
00436767                  if (eax_12 == 0)
00436774                      m_charbuffer_4 = nullptr;
00436767                  else
00436770                      m_charbuffer_4 = GRPTypedVariableObject::GRPTypedVariableObject(eax_12);
00436770                  
0043677a                  PStringBase<unsigned short>::operator=(&m_charbuffer_4[1], edi_1);
00436787                  PStringBase<unsigned short>::operator=(&m_charbuffer_4[2], arg4);
0043679a                  m_charbuffer_4[3] = arg1;
0043679d                  m_charbuffer_4[4] = arg2;
004367a0                  m_charbuffer_4[5] = arg5;
004367a3                  m_charbuffer_4[0xa] = 0;
004367a3                  
004367a7                  if (ebp > 0)
004367a7                  {
004367ad                      FixedArray<PStringBase<char> >::Create(&m_charbuffer_4[6], ebp);
004367b2                      int32_t edi_2 = 0;
004367b2                      
004367b6                      if (ebp > 0)
004367b6                      {
004367dc                          do
004367dc                          {
004367c4                              int32_t eax_16 = (edi_2 << 2);
004367d4                              PStringBase<unsigned short>::operator=((m_charbuffer_4[6] + eax_16), (eax_16 + arg7));
004367d9                              edi_2 += 1;
004367dc                          } while (edi_2 < ebp);
004367b6                      }
004367b6                      
004367e4                      if (arg8 != 0)
004367e4                      {
004367ee                          m_charbuffer_4[9] = ebp;
004367f6                          m_charbuffer_4[8] = operator new[]((ebp << 2));
004367fc                          int32_t eax_19 = 0;
004367fc                          
00436800                          if (ebp > 0)
00436800                          {
0043680e                              do
0043680e                              {
00436808                                  *(uint32_t*)(m_charbuffer_4[8] + (eax_19 << 2)) = arg8[eax_19];
0043680b                                  eax_19 += 1;
0043680e                              } while (eax_19 < ebp);
00436800                          }
004367e4                      }
004367e4                      
00436810                      edi_1 = arg3;
004367a7                  }
004367a7                  
00436814                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043681f                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00436827                  arg6 = 0;
0043682c                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00436830                  class PSRefBufferCharData<char>* m_charbuffer_3;
00436830                  
00436830                  if (ebx_1 != 0)
00436830                  {
0043683a                      m_charbuffer_4[0xa] = 1;
00436843                      *(uint32_t*)(*(uint32_t*)ebx_1 + 0x4c)(&PStringBase<char>::s_NullBuffer_2);
00436846                      class PSRefBufferCharData<char>* m_charbuffer = edi_1->m_charbuffer;
00436848                      m_charbuffer_3 = m_charbuffer;
00436850                      arg6 = 1;
00436855                      InterlockedIncrement(&m_charbuffer[-1]);
0043685b                      PStringBase<char>::break_reference(&m_charbuffer_3);
00436865                      _strlwr(m_charbuffer_3);
0043686b                      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
0043686b                      
00436875                      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00436875                      {
0043687c                          void* eax_23 = operator new(0x8100);
0043687c                          
00436886                          if (eax_23 == 0)
00436891                              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436886                          else
0043688a                              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_23);
0043688a                          
00436893                          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00436875                      }
00436875                      
004368a8                      void var_4;
004368a8                      HashTable<PStringBase<char>,GRPCommand *,0>::remove(&GlobalRegistry::s_pcGlobalRegistry_1->m_ObjectHash, &m_charbuffer_3, &var_4);
004368af                      GRPWithArgsCommand::~GRPWithArgsCommand(ebx_1);
004368b5                      operator delete(ebx_1);
004368be                      void* __offset(PSRefBufferCharData<char>, -0x14) ebx_3 = &m_charbuffer_3->m_data[0xffffffec];
004368be                      
004368d4                      if ((InterlockedDecrement(((char*)ebx_3 + 4)) == 0 && ebx_3 != 0))
004368dc                          *(uint32_t*)*(int32_t*)((char*)ADJ(ebx_3) + -0x14)(1);
00436830                  }
00436830                  
004368de                  class PSRefBufferCharData<char>* m_charbuffer_1 = edi_1->m_charbuffer;
004368e0                  class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
004368e8                  InterlockedIncrement(&m_charbuffer_1[-1]);
004368ee                  PStringBase<char>::break_reference(&m_charbuffer_2);
004368f8                  _strlwr(m_charbuffer_2);
004368fe                  class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry;
00436908                  m_charbuffer_3 = m_charbuffer_4;
00436908                  
0043690c                  if (GlobalRegistry::s_pcGlobalRegistry_2 == 0)
0043690c                  {
00436913                      void* eax_28 = operator new(0x8100);
00436913                      
0043691d                      if (eax_28 == 0)
00436928                          GlobalRegistry::s_pcGlobalRegistry_2 = nullptr;
0043691d                      else
00436921                          GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistryInstance::GlobalRegistryInstance(eax_28);
00436921                      
0043692a                      GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_2;
0043690c                  }
0043690c                  
00436946                  void* __offset(PSRefBufferCharData<char>, -0x10) var_28_21;
00436946                  void* __offset(PSRefBufferCharData<char>, -0x14) esi_6;
00436946                  
00436946                  if (HashTable<PStringBase<char>,unsigned long,0>::add(&GlobalRegistry::s_pcGlobalRegistry_2->m_ObjectHash, &m_charbuffer_2, &m_charbuffer_3) != 0)
00436946                  {
0043698e                      if (arg6 != 0)
00436999                          *(uint32_t*)(*(uint32_t*)m_charbuffer_4 + 0x50)(&PStringBase<char>::s_NullBuffer_2);
00436999                      
004369a6                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_8 = &m_charbuffer_2->m_data[0xffffffec];
004369a6                      
004369b5                      if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
004369bd                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
004369bd                      
004369c3                      esi_6 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
004369c9                      var_28_21 = ((char*)esi_6 + 4);
00436946                  }
00436946                  else
00436946                  {
0043694a                      GRPTypedVariableObject::~GRPTypedVariableObject(m_charbuffer_4);
00436950                      operator delete(m_charbuffer_4);
0043695f                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &m_charbuffer_2->m_data[0xffffffec];
0043695f                      
00436971                      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00436979                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00436979                      
0043697f                      esi_6 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00436985                      var_28_21 = ((char*)esi_6 + 4);
00436946                  }
00436946                  
004369d2                  if ((InterlockedDecrement(var_28_21) == 0 && esi_6 != 0))
004369da                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00436755              }
0043672a          }
004366b2      }
004366a0  }

004367ba                                                                                8d 9b 00 00 00 00                            ......
004369e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004369f0  void GlobalRegistry::UnregisterVariable(class PStringBase<char> const* arg1)

004369f0  {
004369f0      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
004369f0      
004369fa      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
004369fa      {
00436a01          void* eax = operator new(0x8100);
00436a01          
00436a0b          if (eax == 0)
00436a16              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436a0b          else
00436a0f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00436a0f          
00436a18          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
004369fa      }
004369fa      
00436a33      class GRPObject* var_8;
00436a33      
00436a33      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_8) == 0)
00436a33      {
00436b76      label_436b76:
00436b76          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_3 = GlobalRegistry::s_pcGlobalRegistry;
00436b76          
00436b7e          if ((GlobalRegistry::s_pcGlobalRegistry_3 != 0 && GlobalRegistryInstance::IsEmpty(GlobalRegistry::s_pcGlobalRegistry_3) != 0))
00436b7e          {
00436b89              class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_4 = GlobalRegistry::s_pcGlobalRegistry;
00436b89              
00436b93              if (GlobalRegistry::s_pcGlobalRegistry_4 != 0)
00436b93              {
00436b95                  GlobalRegistryInstance::~GlobalRegistryInstance(GlobalRegistry::s_pcGlobalRegistry_4);
00436b9b                  operator delete(GlobalRegistry::s_pcGlobalRegistry_4);
00436b93              }
00436b93              
00436ba3              GlobalRegistry::s_pcGlobalRegistry = nullptr;
00436b7e          }
00436b7e          
00436b7e          return;
00436a33      }
00436a33      
00436a3f      int32_t* eax_2 = var_8->vtable->AsTypedVariableObject();
00436a3f      
00436a46      if (eax_2 != 0)
00436a46      {
00436a50          void* edi_1 = nullptr;
00436a50          
00436a57          if (*(uint32_t*)(*(uint32_t*)eax_2 + 0x48)() != 0)
00436a57          {
00436a5b              void* eax_5 = operator new(0x10);
00436a5b              
00436a65              if (eax_5 == 0)
00436a72                  edi_1 = nullptr;
00436a65              else
00436a6e                  edi_1 = GRPShadowVariableObject::GRPShadowVariableObject(eax_5);
00436a6e              
00436a7b              PStringBase<unsigned short>::operator=(((char*)edi_1 + 4), &eax_2[1]);
00436a87              PStringBase<unsigned short>::operator=(((char*)edi_1 + 8), &eax_2[2]);
00436a94              *(uint32_t*)(*(uint32_t*)eax_2 + 0x4c)(((char*)edi_1 + 0xc));
00436a57          }
00436a57          
00436a97          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
00436a99          class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
00436aa1          InterlockedIncrement(&m_charbuffer[-1]);
00436aab          PStringBase<char>::break_reference(&m_charbuffer_1);
00436ab5          _strlwr(m_charbuffer_1);
00436abb          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry;
00436abb          
00436ac5          if (GlobalRegistry::s_pcGlobalRegistry_2 == 0)
00436ac5          {
00436acc              void* eax_9 = operator new(0x8100);
00436acc              
00436ad6              if (eax_9 == 0)
00436ae1                  GlobalRegistry::s_pcGlobalRegistry_2 = nullptr;
00436ad6              else
00436ada                  GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistryInstance::GlobalRegistryInstance(eax_9);
00436ada              
00436ae3              GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_2;
00436ac5          }
00436ac5          
00436af8          void* var_4;
00436af8          HashTable<PStringBase<char>,GRPCommand *,0>::remove(&GlobalRegistry::s_pcGlobalRegistry_2->m_ObjectHash, &m_charbuffer_1, &var_4);
00436aff          GRPTypedVariableObject::~GRPTypedVariableObject(eax_2);
00436b05          operator delete(eax_2);
00436b05          
00436b0f          if (edi_1 != 0)
00436b0f          {
00436b1b              var_4 = edi_1;
00436b1b              
00436b33              if (HashTable<PStringBase<char>,unsigned long,0>::add(&GlobalRegistry::GetRegistry()->m_ObjectHash.vtable, &m_charbuffer_1, &var_4) == 0)
00436b33              {
00436b37                  GRPWithArgsCommand::~GRPWithArgsCommand(edi_1);
00436b3d                  operator delete(edi_1);
00436b49                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00436b54                  return;
00436b33              }
00436b0f          }
00436b0f          
00436b59          void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &m_charbuffer_1->m_data[0xffffffec];
00436b59          
00436b6c          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00436b74              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00436b74          
00436ac5          goto label_436b76;
00436a46      }
004369f0  }

00436bb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00436bc0  void GlobalRegistry::SetGlobalVariable(class PStringBase<char> const* arg1, class PStringBase<char> const* arg2)

00436bc0  {
00436bc0      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00436bc0      
00436bca      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00436bca      {
00436bd1          void* eax = operator new(0x8100);
00436bd1          
00436bdb          if (eax == 0)
00436be6              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436bdb          else
00436bdf              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00436bdf          
00436be8          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00436bca      }
00436bca      
00436c03      class GRPObject* var_8;
00436c03      
00436c03      if ((GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_8) != 0 && var_8->vtable->AsVariableObject() != 0))
00436c03      {
00436c18          int32_t* eax_4 = var_8->vtable->AsVariableObject();
00436c21          int32_t* eax_5 = *(uint32_t*)(*(uint32_t*)eax_4 + 0x44)();
00436c21          
00436c28          if ((eax_5 != 0 && *(uint32_t*)(*(uint32_t*)eax_5 + 0x48)() == 0))
00436c35              eax_5[0xa] = 1;
00436c35          
00436c42          *(uint32_t*)(*(uint32_t*)eax_4 + 0x50)(arg2);
00436c4b          return;
00436c03      }
00436c03      
00436c4e      void* eax_9 = operator new(0x10);
00436c58      void* esi_1;
00436c58      
00436c58      if (eax_9 == 0)
00436c65          esi_1 = nullptr;
00436c58      else
00436c61          esi_1 = GRPShadowVariableObject::GRPShadowVariableObject(eax_9);
00436c61      
00436c67      void* eax_11 = *(uint32_t*)((char*)esi_1 + 4);
00436c67      
00436c73      if (eax_11 != arg1->m_charbuffer)
00436c73      {
00436c88          if ((InterlockedDecrement(((char*)eax_11 - 0x10)) == 0 && eax_11 != 0x14))
00436c90              **(uint32_t**)((char*)eax_11 - 0x14)(1);
00436c90          
00436c92          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
00436c94          *(uint32_t*)((char*)esi_1 + 4) = m_charbuffer;
00436c9b          InterlockedIncrement(&m_charbuffer[-1]);
00436c73      }
00436c73      
00436c9d      void* eax_14 = *(uint32_t*)((char*)esi_1 + 8);
00436c9d      
00436ca6      if (eax_14 != PStringBase<char>::s_NullBuffer)
00436ca6      {
00436cbb          if ((InterlockedDecrement(((char*)eax_14 - 0x10)) == 0 && eax_14 != 0x14))
00436cc3              **(uint32_t**)((char*)eax_14 - 0x14)(1);
00436cc3          
00436cc5          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00436cd0          *(uint32_t*)((char*)esi_1 + 8) = PStringBase<char>::s_NullBuffer_1;
00436cd3          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00436ca6      }
00436ca6      
00436cde      *(uint32_t*)(*(uint32_t*)esi_1 + 0x50)(arg2);
00436ce1      class PSRefBufferCharData<char>* m_charbuffer_1 = arg1->m_charbuffer;
00436ceb      InterlockedIncrement(&m_charbuffer_1[-1]);
00436cf1      int32_t __saved_ebx;
00436cf1      PStringBase<char>::break_reference(&__saved_ebx);
00436cfb      _strlwr(m_charbuffer_1);
00436d01      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry;
00436d0b      void* var_4 = esi_1;
00436d0b      
00436d10      if (GlobalRegistry::s_pcGlobalRegistry_2 == 0)
00436d10      {
00436d17          void* eax_19 = operator new(0x8100);
00436d17          
00436d21          if (eax_19 == 0)
00436d2c              GlobalRegistry::s_pcGlobalRegistry_2 = nullptr;
00436d21          else
00436d25              GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistryInstance::GlobalRegistryInstance(eax_19);
00436d25          
00436d2e          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_2;
00436d10      }
00436d10      
00436d4a      class PStringBase<char> var_c;
00436d4a      
00436d4a      if (HashTable<PStringBase<char>,unsigned long,0>::add(&GlobalRegistry::s_pcGlobalRegistry_2->m_ObjectHash.vtable, &var_c, &var_4) != 0)
00436d4a      {
00436d88          int32_t* esi_5 = (var_c - 0x14);
00436d88          
00436d9b          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00436da3              **(uint32_t**)esi_5(1);
00436d4a      }
00436d4a      else
00436d4a      {
00436d4e          GRPWithArgsCommand::~GRPWithArgsCommand(esi_1);
00436d54          operator delete(esi_1);
00436d5d          int32_t* esi_3 = (var_c - 0x14);
00436d5d          
00436d73          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00436d7b              **(uint32_t**)esi_3(1);
00436d4a      }
00436bc0  }

00436dac                                      90 90 90 90                                                              ....

00436db0  void UserPreferences::UnregisterPreference(class PStringBase<char> const* arg1)

00436db0  {
00436db0      /* tailcall */
00436db0      return GlobalRegistry::UnregisterVariable(arg1);
00436db0  }

00436db5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00436dc0  uint8_t __convention("regparm") UserPreferences::IsPreferenceRegistered(class PStringBase<char> const* arg1, enum GRVDataType const arg2)

00436dc0  {
00436dc0      class GRPObject* ecx;
00436dc0      class GRPObject* var_4 = ecx;
00436dc1      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00436dc1      
00436dc8      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00436dc8      {
00436dcf          void* eax = operator new(0x8100);
00436dcf          
00436dd9          if (eax == 0)
00436de4              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436dd9          else
00436ddd              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00436ddd          
00436de6          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00436dc8      }
00436dc8      
00436dff      enum GRVDataType eax_1;
00436dff      
00436dff      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00436dff      {
00436e0a          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
00436e0a          
00436e0e          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && (arg2 == GRVDataType_Unknown || esi_1[4] == arg2))))
00436e0e          {
00436e28              eax_1 = 1;
00436e2c              return 1;
00436e0e          }
00436dff      }
00436dff      
00436e2d      eax_1 = 0;
00436e31      return 0;
00436dc0  }

00436e32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00436e40  uint8_t UserPreferences::FindPreference(class PStringBase<char> const* arg1, class GRPVariableObject** arg2)

00436e40  {
00436e42      class GRPVariableObject** edi = arg2;
00436e46      *(uint32_t*)edi = nullptr;
00436e4c      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00436e4c      
00436e53      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00436e53      {
00436e5a          void* eax = operator new(0x8100);
00436e5a          
00436e64          if (eax == 0)
00436e6f              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436e64          else
00436e68              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00436e68          
00436e71          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00436e53      }
00436e53      
00436e89      class GRPVariableObject* eax_1;
00436e89      
00436e89      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &arg2) != 0)
00436e89      {
00436e94          class GRPVariableObject* esi_1 = *(int32_t*)((char*)*(uint32_t*)arg2 + 0x34)();
00436e94          
00436e98          if ((esi_1 != 0 && esi_1->vtable->IsGlobal() != 0))
00436e98          {
00436ea5              *(uint32_t*)edi = esi_1;
00436ea8              eax_1 = 1;
00436eab              return 1;
00436e98          }
00436e89      }
00436e89      
00436ead      eax_1 = 0;
00436eb0      return 0;
00436e40  }

00436eb1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00436ec0  uint8_t UserPreferences::InqValue(class PStringBase<char> const* arg1, uint8_t* arg2)

00436ec0  {
00436ec0      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00436ec0      
00436eca      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00436eca      {
00436ed1          void* eax = operator new(0x8100);
00436ed1          
00436edb          if (eax == 0)
00436ee6              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436edb          else
00436edf              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00436edf          
00436ee8          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00436eca      }
00436eca      
00436f02      class GRPObject* var_4;
00436f02      
00436f02      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00436f02      {
00436f0d          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
00436f0d          
00436f11          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 2)))
00436f11          {
00436f32              class GRPVariableObject* var_8 = nullptr;
00436f3a              void* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
00436f3a              
00436f44              if (eax_3 != 0)
00436f44              {
00436f4f                  void* ecx_6 = *(int32_t*)((char*)var_8->vtable + 0x44)();
00436f53                  eax_3 = ecx_6 != 0;
00436f53                  
00436f62                  if ((eax_3 != 0 && (ecx_6 != 0 && *(uint32_t*)((char*)ecx_6 + 0x10) == 2)))
00436f6d                      *(uint8_t*)arg2 = **(uint8_t**)((char*)ecx_6 + 0xc);
00436f44              }
00436f44              
00436f74              return eax_3;
00436f11          }
00436f02      }
00436f02      
00436f25      int32_t* eax_1;
00436f25      eax_1 = 0;
00436f2b      return 0;
00436ec0  }

00436f75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00436f80  uint8_t UserPreferences::InqValue(class PStringBase<char> const* arg1, int32_t* arg2)

00436f80  {
00436f80      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00436f80      
00436f8a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00436f8a      {
00436f91          void* eax = operator new(0x8100);
00436f91          
00436f9b          if (eax == 0)
00436fa6              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00436f9b          else
00436f9f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00436f9f          
00436fa8          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00436f8a      }
00436f8a      
00436fc2      class GRPObject* var_4;
00436fc2      
00436fc2      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00436fc2      {
00436fcd          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
00436fcd          
00436fd1          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 3)))
00436fd1          {
00436ff2              class GRPVariableObject* var_8 = nullptr;
00436ffa              void* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
00436ffa              
00437004              if (eax_3 != 0)
00437004              {
0043700f                  void* ecx_6 = *(int32_t*)((char*)var_8->vtable + 0x44)();
00437013                  eax_3 = ecx_6 != 0;
00437013                  
00437022                  if ((eax_3 != 0 && (ecx_6 != 0 && *(uint32_t*)((char*)ecx_6 + 0x10) == 3)))
0043702d                      *(uint32_t*)arg2 = **(uint32_t**)((char*)ecx_6 + 0xc);
00437004              }
00437004              
00437034              return eax_3;
00436fd1          }
00436fc2      }
00436fc2      
00436fe5      int32_t* eax_1;
00436fe5      eax_1 = 0;
00436feb      return 0;
00436f80  }

00437035                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00437040  uint8_t UserPreferences::InqValue(class PStringBase<char> const* arg1, uint32_t* arg2)

00437040  {
00437040      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00437040      
0043704a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043704a      {
00437051          void* eax = operator new(0x8100);
00437051          
0043705b          if (eax == 0)
00437066              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
0043705b          else
0043705f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
0043705f          
00437068          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043704a      }
0043704a      
00437082      class GRPObject* var_4;
00437082      
00437082      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00437082      {
0043708d          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
0043708d          
00437091          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 4)))
00437091          {
004370b2              class GRPVariableObject* var_8 = nullptr;
004370ba              void* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
004370ba              
004370c4              if (eax_3 != 0)
004370c4              {
004370cf                  void* ecx_6 = *(int32_t*)((char*)var_8->vtable + 0x44)();
004370d3                  eax_3 = ecx_6 != 0;
004370d3                  
004370e2                  if ((eax_3 != 0 && (ecx_6 != 0 && *(uint32_t*)((char*)ecx_6 + 0x10) == 4)))
004370ed                      *(uint32_t*)arg2 = **(uint32_t**)((char*)ecx_6 + 0xc);
004370c4              }
004370c4              
004370f4              return eax_3;
00437091          }
00437082      }
00437082      
004370a5      int32_t* eax_1;
004370a5      eax_1 = 0;
004370ab      return 0;
00437040  }

004370f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00437100  uint8_t UserPreferences::InqValue(class PStringBase<char> const* arg1, float* arg2)

00437100  {
00437100      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00437100      
0043710a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043710a      {
00437111          void* eax = operator new(0x8100);
00437111          
0043711b          if (eax == 0)
00437126              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
0043711b          else
0043711f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
0043711f          
00437128          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043710a      }
0043710a      
00437142      class GRPObject* var_4;
00437142      
00437142      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00437142      {
0043714d          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
0043714d          
00437151          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 9)))
00437151          {
00437172              class GRPVariableObject* var_8 = nullptr;
0043717a              void* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
0043717a              
00437184              if (eax_3 != 0)
00437184              {
0043718f                  void* ecx_6 = *(int32_t*)((char*)var_8->vtable + 0x44)();
00437193                  eax_3 = ecx_6 != 0;
00437193                  
004371a2                  if ((eax_3 != 0 && (ecx_6 != 0 && *(uint32_t*)((char*)ecx_6 + 0x10) == 9)))
004371ad                      *(uint32_t*)arg2 = **(uint32_t**)((char*)ecx_6 + 0xc);
00437184              }
00437184              
004371b4              return eax_3;
00437151          }
00437142      }
00437142      
00437165      int32_t* eax_1;
00437165      eax_1 = 0;
0043716b      return 0;
00437100  }

004371b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004371c0  void __fastcall _STL::pair<PStringBase<char>,PStringBase<char> >::~pair<PStringBase<char>,PStringBase<char> >(struct _STL::pair<PStringBase<char>,PStringBase<char> >* this)

004371c0  {
004371ce      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->second.m_charbuffer - 0x14);
004371ce      
004371dd      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004371e5          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004371e5      
004371e9      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->first.m_charbuffer - 0x14);
004371e9      
004371f8      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00437200          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004371c0  }

00437206                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00437210  uint8_t __convention("regparm") UserPreferences::SetDefaultFile(class PStringBase<char> const* arg1)

00437210  {
00437210      class PSRefBufferCharData<char>* ecx;
00437210      class PSRefBufferCharData<char>* var_4 = ecx;
00437211      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043721f      var_4 = PStringBase<char>::s_NullBuffer_1;
00437228      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00437228      
00437244      if (PSUtils::GetLongPathNameA(arg1, &var_4) == 0)
00437244      {
00437246          class PSRefBufferCharData<char>* eax_2 = var_4;
00437246          
0043724c          if (eax_2 != arg1->m_charbuffer)
0043724c          {
0043725d              if ((InterlockedDecrement(&eax_2[-1]) == 0 && eax_2 != 0x14))
00437265                  *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00437265              
00437267              class PSRefBufferCharData<char>* m_charbuffer_1 = arg1->m_charbuffer;
00437269              var_4 = m_charbuffer_1;
00437271              InterlockedIncrement(&m_charbuffer_1[-1]);
0043724c          }
00437244      }
00437244      
0043727a      PSUtils::cleanup_filename(&var_4, 0);
0043727f      class PSRefBufferCharData<char>* m_charbuffer = UserPreferences::sm_strDefaultFile.m_charbuffer;
0043727f      
0043728d      if (m_charbuffer != var_4)
0043728d      {
0043729e          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
004372a6              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004372a6          
004372a8          class PSRefBufferCharData<char>* eax_5 = var_4;
004372ac          UserPreferences::sm_strDefaultFile.m_charbuffer = eax_5;
004372b5          InterlockedIncrement(&eax_5[-1]);
0043728d      }
0043728d      
004372bb      void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &var_4->m_data[0xffffffec];
004372bb      
004372ca      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004372d2          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004372d2      
004372d7      int32_t eax_8;
004372d7      eax_8 = 1;
004372db      return 1;
00437210  }

004372dc                                                                                      90 90 90 90                              ....

004372e0  void __thiscall GRPTypedVariableObject::SetVariable(class GRPTypedVariableObject* this, long const& arg2)

004372e0  {
004372e7      if (this->m_Type == GRVDataType_Int32)
004372e7      {
004372f2          *(uint32_t*)this->m_pVariable = *(uint32_t*)arg2;
004372f2          
004372f9          if (this->m_OnChangedCallbackFunction != 0)
004372f9          {
004372fb              class PSRefBufferCharData<char>* m_charbuffer = this->m_Name.m_charbuffer;
004372fe              arg2 = m_charbuffer;
00437306              InterlockedIncrement(&m_charbuffer[-1]);
00437311              this->m_OnChangedCallbackFunction(&arg2);
00437318              void* esi_2 = &arg2[-5];
00437318              
0043732e              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00437336                  **(uint32_t**)esi_2(1);
004372f9          }
004372e7      }
004372e0  }

0043733c                                                                                      90 90 90 90                              ....

00437340  void __thiscall GRPTypedVariableObject::SetVariable(class GRPTypedVariableObject* this, unsigned long const& arg2)

00437340  {
00437347      if (this->m_Type == GRVDataType_UInt32)
00437347      {
00437352          *(uint32_t*)this->m_pVariable = *(uint32_t*)arg2;
00437352          
00437359          if (this->m_OnChangedCallbackFunction != 0)
00437359          {
0043735b              class PSRefBufferCharData<char>* m_charbuffer = this->m_Name.m_charbuffer;
0043735e              arg2 = m_charbuffer;
00437366              InterlockedIncrement(&m_charbuffer[-1]);
00437371              this->m_OnChangedCallbackFunction(&arg2);
00437378              void* esi_2 = &arg2[-5];
00437378              
0043738e              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00437396                  **(uint32_t**)esi_2(1);
00437359          }
00437347      }
00437340  }

0043739c                                                                                      90 90 90 90                              ....

004373a0  void __thiscall GRPTypedVariableObject::SetVariable(class GRPTypedVariableObject* this, float const& arg2)

004373a0  {
004373a7      if (this->m_Type == GRVDataType_Float32)
004373a7      {
004373b2          *(uint32_t*)this->m_pVariable = *(uint32_t*)arg2;
004373b2          
004373b9          if (this->m_OnChangedCallbackFunction != 0)
004373b9          {
004373bb              class PSRefBufferCharData<char>* m_charbuffer = this->m_Name.m_charbuffer;
004373be              arg2 = m_charbuffer;
004373c6              InterlockedIncrement(&m_charbuffer[-1]);
004373d1              this->m_OnChangedCallbackFunction(&arg2);
004373d8              void* esi_2 = &arg2[-5];
004373d8              
004373ee              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004373f6                  **(uint32_t**)esi_2(1);
004373b9          }
004373a7      }
004373a0  }

004373fc                                                                                      90 90 90 90                              ....

00437400  void __thiscall GRPTypedVariableObject::SetVariable(class GRPTypedVariableObject* this, class PStringBase<char> const& arg2)

00437400  {
00437407      if (this->m_Type == GRVDataType_PString)
00437407      {
0043740e          class PStringBase<char>& ebp_1 = arg2;
00437416          void* m_pVariable = this->m_pVariable;
00437419          void* eax_1 = *(uint32_t*)m_pVariable;
00437419          
0043741d          if (eax_1 != ebp_1->m_charbuffer)
0043741d          {
00437433              if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
0043743b                  **(uint32_t**)((char*)eax_1 - 0x14)(1);
0043743b              
0043743d              class PSRefBufferCharData<char>* m_charbuffer = ebp_1->m_charbuffer;
00437440              *(uint32_t*)m_pVariable = m_charbuffer;
00437446              InterlockedIncrement(&m_charbuffer[-1]);
0043741d          }
0043741d          
00437454          if (this->m_OnChangedCallbackFunction != 0)
00437454          {
00437456              class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_Name.m_charbuffer;
00437459              arg2 = m_charbuffer_1;
00437461              InterlockedIncrement(&m_charbuffer_1[-1]);
0043746c              this->m_OnChangedCallbackFunction(&arg2);
00437473              void* __offset(PStringBase<char>, -0x14) esi_2 = &arg2[-5];
00437473              
00437489              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00437491                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00437454          }
00437407      }
00437400  }

00437497                                                                       90 90 90 90 90 90 90 90 90                         .........

004374a0  void __thiscall GRPTypedVariableObject::InqVariable(class GRPTypedVariableObject* this, class PStringBase<char>& arg2)

004374a0  {
004374a4      if (this->m_Type == GRVDataType_PString)
004374a4      {
004374ab          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004374ae          void* m_pVariable = this->m_pVariable;
004374ae          
004374b3          if (m_charbuffer != *(uint32_t*)m_pVariable)
004374b3          {
004374c9              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
004374d1                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004374d1              
004374d3              class PStringBase<char> eax_3 = *(uint32_t*)m_pVariable;
004374d6              arg2->m_charbuffer = eax_3;
004374dd              arg2 = (eax_3 - 0x10);
004374e1              /* tailcall */
004374e1              return InterlockedIncrement();
004374b3          }
004374a4      }
004374a0  }

004374ec                                      90 90 90 90                                                              ....

004374f0  void* __thiscall _STL::pair<PStringBase<char>,PStringBase<char> >::`vector deleting destructor'(struct _STL::pair<PStringBase<char>,PStringBase<char> >* this, uint32_t arg2)

004374f0  {
004374f0      struct _STL::pair<PStringBase<char>,PStringBase<char> >* var_4 = this;
004374f0      
004374f9      if ((arg2 & 2) == 0)
004374f9      {
00437571          _STL::pair<PStringBase<char>,PStringBase<char> >::~pair<PStringBase<char>,PStringBase<char> >(this);
00437571          
0043757b          if ((arg2 & 1) != 0)
0043757e              operator delete(this);
0043757e          
0043758a          return this;
004374f9      }
004374f9      
004374fb      int32_t first = this->first;
00437503      void* edi = &this[first];
00437503      
00437507      if ((first - 1) >= 0)
00437507      {
00437511          var_4 = first;
00437553          struct _STL::pair<PStringBase<char>,PStringBase<char> >* i;
00437553          
00437553          do
00437553          {
00437515              int32_t esi_1 = *(uint32_t*)((char*)edi - 4);
00437518              edi -= 8;
00437518              
0043752a              if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
00437532                  **(uint32_t**)(esi_1 - 0x14)(1);
00437532              
00437536              int32_t* esi_4 = (*(uint32_t*)edi - 0x14);
00437536              
00437545              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0043754d                  **(uint32_t**)esi_4(1);
0043754d              
0043754f              i = var_4;
0043754f              var_4 -= 1;
00437553          } while (i != 1);
00437507      }
00437507      
0043755b      if ((arg2 & 1) != 0)
0043755e          operator delete[](((char*)this - 4));
0043755e      
0043756c      return ((char*)this - 4);
004374f0  }

0043758d                                         90 90 90                                                               ...

00437590  int32_t* __thiscall _STL::pair<PStringBase<char>,PStringBase<char> >::operator=(int32_t* arg1, int32_t* arg2)

00437590  {
0043759f      void* eax = *(uint32_t*)arg1;
0043759f      
004375a4      if (eax != *(uint32_t*)arg2)
004375a4      {
004375b5          if ((InterlockedDecrement(((char*)eax - 0x10)) == 0 && eax != 0x14))
004375bd              **(uint32_t**)((char*)eax - 0x14)(1);
004375bd          
004375bf          int32_t eax_3 = *(uint32_t*)arg2;
004375c1          *(uint32_t*)arg1 = eax_3;
004375c7          InterlockedIncrement((eax_3 - 0x10));
004375a4      }
004375a4      
004375cd      void* eax_5 = arg1[1];
004375cd      
004375d3      if (eax_5 != arg2[1])
004375d3      {
004375e4          if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
004375ec              **(uint32_t**)((char*)eax_5 - 0x14)(1);
004375ec          
004375ee          int32_t eax_8 = arg2[1];
004375f1          arg1[1] = eax_8;
004375f8          InterlockedIncrement((eax_8 - 0x10));
004375d3      }
004375d3      
00437604      return arg1;
00437590  }

00437607                       90 90 90 90 90 90 90 90 90                                                         .........

00437610  void __fastcall _STL::pair<PStringBase<char>,PStringBase<char> >::pair<PStringBase<char>,PStringBase<char> >(struct _STL::pair<PStringBase<char>,PStringBase<char> >* this)

00437610  {
00437610      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00437616      class PSRefBufferCharData<char>** this_1 = this;
00437625      *(uint32_t*)this_1 = PStringBase<char>::s_NullBuffer_1;
00437627      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00437629      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00437635      this_1[1] = PStringBase<char>::s_NullBuffer_2;
00437638      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
00437610  }

0043763f                                                                                               90                                 .

00437640  void __fastcall SmartArray<_STL::pair<PStringBase<char>,PStringBase<char> >,1>::Reset(class SmartArray<_STL::pair<PStringBase<char>,PStringBase<char> >,1>* this)

00437640  {
00437647      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0043765a      this->m_num = 0;
0043765a      
0043765d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0043765d      {
0043765f          struct _STL::pair<PStringBase<char>,PStringBase<char> >* m_data = this->m_data;
0043765f          
00437663          if (m_data != 0)
00437667              _STL::pair<PStringBase<char>,PStringBase<char> >::`vector deleting destructor'(m_data, 3);
00437667          
0043766c          this->m_data = 0;
0043766e          this->m_sizeAndDeallocate = 0;
00437676          return;
0043765d      }
0043765d      
00437679      if (this->m_data != 0)
00437679      {
0043767f          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
00437685          int32_t var_c_1 = (eax - 1);
00437685          
00437689          if ((eax - 1) >= 0)
00437689          {
0043770f              int32_t temp1_1;
0043770f              
0043770f              do
0043770f              {
004376a0                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004376a5                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
004376ad                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004376af                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004376bc                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004376cc                  _STL::pair<PStringBase<char>,PStringBase<char> >::operator=(&this->m_data[var_c_1], &PStringBase<char>::s_NullBuffer_3);
004376cc                  
004376e4                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
004376ec                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
004376ec                  
004376f2                  void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
004376f2                  
00437701                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00437709                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00437709                  
0043770b                  temp1_1 = var_c_1;
0043770b                  var_c_1 -= 1;
0043770f              } while ((temp1_1 - 1) >= 0);
00437689          }
00437679      }
00437640  }

00437719                                                                             90 90 90 90 90 90 90                           .......

00437720  uint8_t UserPreferences::SetValue(class PStringBase<char> const* arg1, uint8_t const arg2)

00437720  {
00437720      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00437720      
0043772a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043772a      {
00437731          void* eax = operator new(0x8100);
00437731          
0043773b          if (eax == 0)
00437746              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
0043773b          else
0043773f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
0043773f          
00437748          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043772a      }
0043772a      
00437763      class GRPObject* var_4;
00437763      
00437763      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00437763      {
0043776e          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
0043776e          
00437772          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 2)))
00437772          {
00437794              class GRPVariableObject* var_8 = nullptr;
0043779c              class GRPTypedVariableObject* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
0043779c              
004377a6              if (eax_3 != 0)
004377a6              {
004377ae                  eax_3 = *(int32_t*)((char*)var_8->vtable + 0x44)();
004377b3                  int32_t ebx;
004377b3                  ebx = eax_3 != 0;
004377b3                  
004377bc                  if ((ebx != 0 && eax_3 != 0))
004377c5                      GRPTypedVariableObject::SetVariable(eax_3, &arg2);
004377c5                  
004377ca                  eax_3 = ebx;
004377a6              }
004377a6              
004377d2              return eax_3;
00437772          }
00437763      }
00437763      
00437787      int32_t* eax_1;
00437787      eax_1 = 0;
0043778d      return 0;
00437720  }

004377d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004377e0  uint8_t UserPreferences::SetValue(class PStringBase<char> const* arg1, int32_t const arg2)

004377e0  {
004377e0      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
004377e0      
004377ea      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
004377ea      {
004377f1          void* eax = operator new(0x8100);
004377f1          
004377fb          if (eax == 0)
00437806              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
004377fb          else
004377ff              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
004377ff          
00437808          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
004377ea      }
004377ea      
00437823      class GRPObject* var_4;
00437823      
00437823      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00437823      {
0043782e          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
0043782e          
00437832          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 3)))
00437832          {
00437854              class GRPVariableObject* var_8 = nullptr;
0043785c              class GRPTypedVariableObject* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
0043785c              
00437866              if (eax_3 != 0)
00437866              {
0043786e                  eax_3 = *(int32_t*)((char*)var_8->vtable + 0x44)();
00437873                  int32_t ebx;
00437873                  ebx = eax_3 != 0;
00437873                  
0043787c                  if ((ebx != 0 && eax_3 != 0))
00437885                      GRPTypedVariableObject::SetVariable(eax_3, &arg2);
00437885                  
0043788a                  eax_3 = ebx;
00437866              }
00437866              
00437892              return eax_3;
00437832          }
00437823      }
00437823      
00437847      int32_t* eax_1;
00437847      eax_1 = 0;
0043784d      return 0;
004377e0  }

00437893                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004378a0  uint8_t UserPreferences::SetValue(class PStringBase<char> const* arg1, uint32_t const arg2)

004378a0  {
004378a0      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
004378a0      
004378aa      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
004378aa      {
004378b1          void* eax = operator new(0x8100);
004378b1          
004378bb          if (eax == 0)
004378c6              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
004378bb          else
004378bf              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
004378bf          
004378c8          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
004378aa      }
004378aa      
004378e3      class GRPObject* var_4;
004378e3      
004378e3      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
004378e3      {
004378ee          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
004378ee          
004378f2          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 4)))
004378f2          {
00437914              class GRPVariableObject* var_8 = nullptr;
0043791c              class GRPTypedVariableObject* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
0043791c              
00437926              if (eax_3 != 0)
00437926              {
0043792e                  eax_3 = *(int32_t*)((char*)var_8->vtable + 0x44)();
00437933                  int32_t ebx;
00437933                  ebx = eax_3 != 0;
00437933                  
0043793c                  if ((ebx != 0 && eax_3 != 0))
00437945                      GRPTypedVariableObject::SetVariable(eax_3, &arg2);
00437945                  
0043794a                  eax_3 = ebx;
00437926              }
00437926              
00437952              return eax_3;
004378f2          }
004378e3      }
004378e3      
00437907      int32_t* eax_1;
00437907      eax_1 = 0;
0043790d      return 0;
004378a0  }

00437953                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00437960  uint8_t UserPreferences::SetValue(class PStringBase<char> const* arg1, float const arg2)

00437960  {
00437960      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00437960      
0043796a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043796a      {
00437971          void* eax = operator new(0x8100);
00437971          
0043797b          if (eax == 0)
00437986              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
0043797b          else
0043797f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
0043797f          
00437988          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043796a      }
0043796a      
004379a3      class GRPObject* var_4;
004379a3      
004379a3      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
004379a3      {
004379ae          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
004379ae          
004379b2          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 9)))
004379b2          {
004379d4              class GRPVariableObject* var_8 = nullptr;
004379dc              class GRPTypedVariableObject* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
004379dc              
004379e6              if (eax_3 != 0)
004379e6              {
004379ee                  eax_3 = *(int32_t*)((char*)var_8->vtable + 0x44)();
004379f3                  int32_t ebx;
004379f3                  ebx = eax_3 != 0;
004379f3                  
004379fc                  if ((ebx != 0 && eax_3 != 0))
00437a05                      GRPTypedVariableObject::SetVariable(eax_3, &arg2);
00437a05                  
00437a0a                  eax_3 = ebx;
004379e6              }
004379e6              
00437a12              return eax_3;
004379b2          }
004379a3      }
004379a3      
004379c7      int32_t* eax_1;
004379c7      eax_1 = 0;
004379cd      return 0;
00437960  }

00437a13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00437a20  uint8_t UserPreferences::SetValue(class PStringBase<char> const* arg1, class PStringBase<char> const* arg2)

00437a20  {
00437a20      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00437a20      
00437a2a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00437a2a      {
00437a31          void* eax = operator new(0x8100);
00437a31          
00437a3b          if (eax == 0)
00437a46              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00437a3b          else
00437a3f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00437a3f          
00437a48          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00437a2a      }
00437a2a      
00437a63      class GRPObject* var_4;
00437a63      
00437a63      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00437a63      {
00437a6e          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
00437a6e          
00437a72          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 0xd)))
00437a72          {
00437a94              class GRPVariableObject* var_8 = nullptr;
00437a9c              class GRPTypedVariableObject* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
00437a9c              
00437aa6              if (eax_3 != 0)
00437aa6              {
00437aae                  eax_3 = *(int32_t*)((char*)var_8->vtable + 0x44)();
00437ab3                  int32_t ebx;
00437ab3                  ebx = eax_3 != 0;
00437ab3                  
00437abc                  if ((ebx != 0 && eax_3 != 0))
00437ac5                      GRPTypedVariableObject::SetVariable(eax_3, arg2);
00437ac5                  
00437aca                  eax_3 = ebx;
00437aa6              }
00437aa6              
00437ad2              return eax_3;
00437a72          }
00437a63      }
00437a63      
00437a87      int32_t* eax_1;
00437a87      eax_1 = 0;
00437a8d      return 0;
00437a20  }

00437ad3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00437ae0  uint8_t UserPreferences::InqValue(class PStringBase<char> const* arg1, class PStringBase<char>* arg2)

00437ae0  {
00437ae0      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00437ae0      
00437aea      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00437aea      {
00437af1          void* eax = operator new(0x8100);
00437af1          
00437afb          if (eax == 0)
00437b06              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00437afb          else
00437aff              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00437aff          
00437b08          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00437aea      }
00437aea      
00437b23      class GRPObject* var_4;
00437b23      
00437b23      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00437b23      {
00437b2e          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
00437b2e          
00437b32          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 0xd)))
00437b32          {
00437b54              class GRPVariableObject* var_8 = nullptr;
00437b5c              class GRPTypedVariableObject* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
00437b5c              
00437b66              if (eax_3 != 0)
00437b66              {
00437b6e                  eax_3 = *(int32_t*)((char*)var_8->vtable + 0x44)();
00437b73                  int32_t ebx;
00437b73                  ebx = eax_3 != 0;
00437b73                  
00437b7c                  if ((ebx != 0 && eax_3 != 0))
00437b85                      GRPTypedVariableObject::InqVariable(eax_3, arg2);
00437b85                  
00437b8a                  eax_3 = ebx;
00437b66              }
00437b66              
00437b92              return eax_3;
00437b32          }
00437b23      }
00437b23      
00437b47      int32_t* eax_1;
00437b47      eax_1 = 0;
00437b4d      return 0;
00437ae0  }

00437b93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00437ba0  uint8_t __thiscall SmartArray<_STL::pair<PStringBase<char>,PStringBase<char> >,1>::grow(class SmartArray<_STL::pair<PStringBase<char>,PStringBase<char> >,1>* this, uint32_t arg2)

00437ba0  {
00437bac      void* eax;
00437bac      
00437bac      if (arg2 >= this->m_num)
00437bac      {
00437bbc          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
00437bbc          {
00437c51              eax = 1;
00437c54              return 1;
00437bbc          }
00437bbc          
00437bc4          if (arg2 == 0)
00437bc4          {
00437bc6              SmartArray<_STL::pair<PStringBase<char>,PStringBase<char> >,1>::Reset(this);
00437bcd              int32_t eax_2;
00437bcd              eax_2 = 1;
00437bd0              return 1;
00437bc4          }
00437bc4          
00437bdb          eax = operator new[](((arg2 << 3) + 4));
00437bdb          
00437be5          if (eax != 0)
00437be5          {
00437bed              void* ebp_1 = ((char*)eax + 4);
00437bf3              *(uint32_t*)eax = arg2;
00437bf5              `vector constructor iterator'(ebp_1, 8, arg2, _STL::pair<PStringBase<char>,PStringBase<char> >::pair<PStringBase<char>,PStringBase<char> >);
00437bf5              
00437bfc              if (ebp_1 != 0)
00437bfc              {
00437c01                  if (this->m_data != 0)
00437c01                  {
00437c04                      uint32_t m_num = this->m_num;
00437c07                      int32_t edi_1 = (m_num - 1);
00437c07                      
00437c08                      if ((m_num - 1) >= 0)
00437c08                      {
00437c25                          int32_t temp2_1;
00437c25                          
00437c25                          do
00437c25                          {
00437c12                              int32_t eax_3 = (edi_1 << 3);
00437c1f                              _STL::pair<PStringBase<char>,PStringBase<char> >::operator=((eax_3 + ebp_1), (this->m_data + eax_3));
00437c24                              temp2_1 = edi_1;
00437c24                              edi_1 -= 1;
00437c25                          } while ((temp2_1 - 1) >= 0);
00437c08                      }
00437c08                      
00437c35                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00437c35                      {
00437c37                          struct _STL::pair<PStringBase<char>,PStringBase<char> >* m_data = this->m_data;
00437c37                          
00437c3b                          if (m_data != 0)
00437c3f                              _STL::pair<PStringBase<char>,PStringBase<char> >::`vector deleting destructor'(m_data, 3);
00437c35                      }
00437c01                  }
00437c01                  
00437c4a                  this->m_data = ebp_1;
00437c4c                  this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00437c51                  eax = 1;
00437c54                  return 1;
00437bfc              }
00437be5          }
00437bac      }
00437bac      
00437c59      eax = 0;
00437c5c      return 0;
00437ba0  }

00437c5f                                                                                               90                                 .

00437c60  void __fastcall UserPreferences::Cleanup()

00437c60  {
00437c60      void* ecx;
00437c60      void* var_4 = ecx;
00437c6c      PStringBase<char>::PStringBase<char>(&var_4, "LoadPreferences");
00437c76      GlobalRegistry::UnregisterCommand(&var_4);
00437c85      int32_t* esi_1 = ((char*)var_4 - 0x14);
00437c85      
00437c97      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00437c9f          **(uint32_t**)esi_1(1);
00437c9f      
00437caa      PStringBase<char>::PStringBase<char>(&var_4, "SavePreferences");
00437cb4      GlobalRegistry::UnregisterCommand(&var_4);
00437cbd      int32_t* esi_3 = ((char*)var_4 - 0x14);
00437cbd      
00437ccf      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00437cd7          **(uint32_t**)esi_3(1);
00437c60  }

00437cdd                                                                                         90 90 90                               ...

00437ce0  uint8_t UserPreferences::FindDefaultFile(class PStringBase<char>* arg1)

00437ce0  {
00437cf0      void* var_10;
00437cf0      PStringBase<char>::PStringBase<char>(&var_10, "UserPreferences.ini");
00437cf5      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00437d00      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
00437d08      int32_t __return_1;
00437d08      class PStringBase<char>* edx;
00437d08      __return_1 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00437d0a      class PSRefBufferCharData<char>* m_charbuffer_3 = UserPreferences::sm_strDefaultFile.m_charbuffer;
00437d14      int32_t eax_6;
00437d14      char ebx;
00437d14      int32_t* esi_5;
00437d14      
00437d14      if (m_charbuffer_3->m_data[-4] == 1)
00437d14      {
00437d8a          __return_1 = UserPreferences::sm_bTools;
00437d91          void* var_28_7;
00437d91          int32_t* esi_7;
00437d91          
00437d91          if (__return_1 == 0)
00437d91          {
00437e08          label_437e08:
00437e08              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00437e0d              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
00437e15              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00437e1c              class PStringBase<char> __return;
00437e1c              PSUtils::get_process_name(&__return);
00437e2b              PSUtils::get_directory(&PStringBase<char>::s_NullBuffer_4, &__return);
00437e38              void* var_34_2 = var_10;
00437e39              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
00437e44              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "%s%s");
00437e50              PSUtils::cleanup_filename(&PStringBase<char>::s_NullBuffer_3, 0);
00437e59              class PSRefBufferCharData<char>* m_charbuffer_2 = arg1->m_charbuffer;
00437e59              
00437e6b              if (m_charbuffer_2 != PStringBase<char>::s_NullBuffer_3)
00437e6b              {
00437e7c                  if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
00437e84                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00437e84                  
00437e86                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_3;
00437e8a                  arg1->m_charbuffer = PStringBase<char>::s_NullBuffer_6;
00437e91                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_6[-1]);
00437e6b              }
00437e6b              
00437e9a              uint8_t eax_12 = PSUtils::check_access(&PStringBase<char>::s_NullBuffer_3, 0);
00437ea3              int32_t* esi_10 = (__return - 0x14);
00437ead              ebx = eax_12;
00437ead              
00437eb7              if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
00437ebf                  **(uint32_t**)esi_10(1);
00437ebf              
00437ec5              esi_7 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
00437ecb              var_28_7 = &esi_7[1];
00437d91          }
00437d91          else
00437d91          {
00437d93              __return_1 = ProjectSettings::sm_bInitialized;
00437d93              
00437d9a              if (__return_1 == 0)
00437d9a                  goto label_437e08;
00437d9a              
00437da0              int32_t var_28_5 = 0x837168;
00437da5              void* var_8;
00437da5              int32_t* var_2c_1 = &var_8;
00437da6              ProjectSettings::CompleteProjectPath(__return_1, edx);
00437db3              void* var_30_1 = var_10;
00437db4              void* var_34_1 = var_8;
00437dbf              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "%s\%s");
00437dcb              PSUtils::cleanup_filename(&PStringBase<char>::s_NullBuffer_3, 0);
00437ddc              PStringBase<unsigned short>::operator=(arg1, &PStringBase<char>::s_NullBuffer_3);
00437de8              uint8_t eax_7 = PSUtils::check_access(&PStringBase<char>::s_NullBuffer_3, 0);
00437dfa              esi_7 = ((char*)var_8 - 0x14);
00437e00              ebx = eax_7;
00437e02              var_28_7 = &esi_7[1];
00437d91          }
00437d91          
00437ed4          if ((InterlockedDecrement(var_28_7) == 0 && esi_7 != 0))
00437edc              **(uint32_t**)esi_7(1);
00437edc          
00437ee2          void* __offset(PSRefBufferCharData<char>, -0x14) esi_13 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
00437ee2          
00437ef1          if ((InterlockedDecrement(((char*)esi_13 + 4)) == 0 && esi_13 != 0))
00437ef9              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_13) + -0x14)(1);
00437ef9          
00437eff          esi_5 = ((char*)var_10 - 0x14);
00437f06          eax_6 = InterlockedDecrement(&esi_5[1]);
00437d14      }
00437d14      else
00437d14      {
00437d1a          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
00437d1a          
00437d24          if (m_charbuffer != m_charbuffer_3)
00437d24          {
00437d35              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00437d3d                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00437d3d              
00437d3f              class PSRefBufferCharData<char>* m_charbuffer_1 = UserPreferences::sm_strDefaultFile.m_charbuffer;
00437d4a              arg1->m_charbuffer = m_charbuffer_1;
00437d4c              InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
00437d24          }
00437d24          
00437d51          uint8_t eax_3 = PSUtils::check_access(arg1, 0);
00437d5a          void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
00437d64          ebx = eax_3;
00437d64          
00437d6e          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00437d76              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00437d76          
00437d7c          esi_5 = ((char*)var_10 - 0x14);
00437d83          eax_6 = InterlockedDecrement(&esi_5[1]);
00437d14      }
00437d14      
00437f0e      if ((eax_6 == 0 && esi_5 != 0))
00437f16          **(uint32_t**)esi_5(1);
00437f16      
00437f1b      eax_6 = ebx;
00437f21      return eax_6;
00437ce0  }

00437f22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00437f30  uint8_t UserPreferences::Save()

00437f30  {
00437f33      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00437f41      class PSRefBufferCharData<char>* lpFileName = PStringBase<char>::s_NullBuffer_1;
00437f49      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00437f55      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable;
00437f55      m_currHashTable = UserPreferences::FindDefaultFile(&lpFileName);
00437f5e      uint8_t var_39 = m_currHashTable;
00437f62      class PSRefBufferCharData<char>* lpString;
00437f62      
00437f62      if (m_currHashTable != 0)
00437f62      {
00437fd9      label_437fd9:
00437fd9          class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00437fe0          void* var_18 = nullptr;
00437fe4          int32_t var_14_1 = 0;
00437fe8          int32_t var_10_1 = 0;
00437fe8          
00437fec          if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00437fec          {
00437ff3              void* eax_7 = operator new(0x8100);
00437ff3              
00437ffd              if (eax_7 == 0)
00438008                  GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00437ffd              else
00438001                  GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_7);
00438001              
0043800a              GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00437fec          }
00437fec          
0043801b          void __return_2;
0043801b          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_8 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&GlobalRegistry::s_pcGlobalRegistry_1->m_ObjectHash.m_intrusiveTable, &__return_2);
00438020          m_currHashTable = eax_8->m_currHashTable;
00438022          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_8->m_currBucket;
00438025          class HashTableData<unsigned long,DBOCache *>* i_1 = eax_8->m_currElement;
00438025          
0043802e          if (GlobalRegistry::s_pcGlobalRegistry == 0)
0043802e          {
00438035              void* eax_9 = operator new(0x8100);
00438035              
0043803f              if (eax_9 == 0)
0043804f                  GlobalRegistry::s_pcGlobalRegistry = nullptr;
0043803f              else
00438048                  GlobalRegistry::s_pcGlobalRegistry = GlobalRegistryInstance::GlobalRegistryInstance(eax_9);
0043802e          }
0043802e          
00438057          if (i_1 != 0)
00438057          {
00438065              while (true)
00438065              {
00438065                  int32_t* eax_11 = i_1->m_data->vtable->ReloadObject();
00438065                  
0043806c                  if ((eax_11 != 0 && *(uint32_t*)(*(uint32_t*)eax_11 + 0x48)() != 0))
0043806c                  {
00438082                      int32_t eax_15 = (var_14_1 & 0x7fffffff);
00438082                      
00438089                      if (var_10_1 < eax_15)
00438089                      {
004380ac                          *(uint32_t*)((char*)var_18 + (var_10_1 << 2)) = eax_11;
004380af                          var_10_1 += 1;
00438089                      }
00438089                      else if (SmartArray<unsigned long,1>::grow(&var_18, SmartArray<unsigned long,1>::get_new_size(&var_18, (eax_15 + 1))) != 0)
004380a2                      {
004380ac                          *(uint32_t*)((char*)var_18 + (var_10_1 << 2)) = eax_11;
004380af                          var_10_1 += 1;
004380a2                      }
0043806c                  }
0043806c                  
004380b3                  i_1 = i_1->m_hashNext;
004380b3                  
004380b8                  if (i_1 == 0)
004380b8                  {
004380ce                      class HashTableData<unsigned long,DBOCache *>* i;
004380ce                      
004380ce                      do
004380ce                      {
004380c3                          m_currBucket = &m_currBucket[1];
004380c3                          
004380c8                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004380c8                              goto label_4380de;
004380c8                          
004380ca                          i = *(uint32_t*)m_currBucket;
004380ce                      } while (i == 0);
004380ce                      
004380d0                      i_1 = i;
004380d0                      
004380d4                      if (i_1 == 0)
004380d4                          break;
004380b8                  }
00438065              }
00438057          }
00438057          
004380de      label_4380de:
004380de          int32_t var_2c_1 = 0;
004380de          
004380e2          if (var_10_1 > 0)
004380e2          {
00438365              bool cond:6_1;
00438365              
00438365              do
00438365              {
004380f8                  int32_t* eax_23 = *(uint32_t*)((char*)var_18 + (var_2c_1 << 2));
004380f8                  
00438101                  if (eax_23 != 0)
00438101                  {
00438109                      m_currHashTable = eax_23[1];
00438110                      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
00438114                      InterlockedIncrement(&m_currHashTable[0]);
0043811a                      void* vtable = m_currHashTable->vtable;
00438120                      int32_t eax_50;
00438120                      void* __offset(IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>, -0x14) esi_6;
00438120                      
00438120                      if (vtable <= 1)
00438120                      {
00438339                          esi_6 = ((char*)m_currHashTable - 0x14);
00438340                          eax_50 = InterlockedDecrement(((char*)esi_6 + 4));
00438120                      }
00438120                      else
00438120                      {
00438126                          void* ecx_14 = ((char*)vtable - 2);
00438129                          void* ebp_2 = 0xffffffff;
00438129                          
0043812e                          if (ecx_14 >= 0)
0043812e                          {
00438141                              void* temp0_1;
00438141                              
00438141                              do
00438141                              {
00438132                                  void* edx_5 = (((char*)vtable + m_currHashTable) - 1);
00438132                                  
00438136                                  if (ecx_14 < vtable)
00438138                                      edx_5 = ((char*)ecx_14 + m_currHashTable);
00438138                                  
0043813e                                  if (*(uint8_t*)edx_5 == 0x2e)
0043813e                                  {
00438145                                      ebp_2 = ecx_14;
00438145                                      break;
0043813e                                  }
0043813e                                  
00438140                                  temp0_1 = ecx_14;
00438140                                  ecx_14 -= 1;
00438141                              } while (((char*)temp0_1 - 1) >= 0);
0043812e                          }
0043812e                          
00438147                          class PSRefBufferCharData<char>* lpKeyName = PStringBase<char>::s_NullBuffer;
00438151                          InterlockedIncrement(&lpKeyName[-1]);
00438157                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0043815c                          class PSRefBufferCharData<char>* lpAppName = PStringBase<char>::s_NullBuffer_3;
00438164                          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
00438164                          
0043816c                          if (ebp_2 <= 0)
0043816c                          {
00438266                              if (lpKeyName != m_currHashTable)
00438266                              {
0043827b                                  if ((InterlockedDecrement(&lpKeyName[-1]) == 0 && lpKeyName != 0x14))
00438283                                      *(uint32_t*)*(int32_t*)((char*)lpKeyName + -0x14)(1);
00438283                                  
00438286                                  lpKeyName = m_currHashTable;
00438288                                  InterlockedIncrement(&m_currHashTable[0]);
00438266                              }
00438266                              
00438297                              PStringBase<char>::set(&lpAppName, "Default");
004382a2                          label_4382a2:
004382a2                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
004382a7                              lpString = PStringBase<char>::s_NullBuffer_4;
004382af                              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
004382c0                              *(uint32_t*)(*(uint32_t*)eax_23 + 0x4c)(&lpString);
004382d3                              WritePrivateProfileStringA(lpAppName, lpKeyName, lpString, lpFileName);
004382dd                              void* __offset(PSRefBufferCharData<char>, -0x14) edi_9 = &lpString->m_data[0xffffffec];
004382dd                              
004382ee                              if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
004382f6                                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_9) + -0x14)(1);
0043816c                          }
0043816c                          else if (ebp_2 < (m_currHashTable->vtable - 2))
0043817a                          {
00438194                              void* __return;
00438194                              class PStringBase<char>* eax_29 = PStringBase<char>::substring(&m_currHashTable_1, &__return, ((char*)ebp_2 + 1), (m_currHashTable->vtable - 2));
00438194                              
0043819d                              if (lpKeyName != eax_29->m_charbuffer)
0043819d                              {
004381b2                                  if ((InterlockedDecrement(&lpKeyName[-1]) == 0 && lpKeyName != 0x14))
004381ba                                      *(uint32_t*)*(int32_t*)((char*)lpKeyName + -0x14)(1);
004381ba                                  
004381bc                                  lpKeyName = eax_29->m_charbuffer;
004381c2                                  InterlockedIncrement(&lpKeyName[-1]);
0043819d                              }
0043819d                              
004381cc                              int32_t* edi_4 = ((char*)__return - 0x14);
004381cc                              
004381df                              if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
004381e7                                  **(uint32_t**)edi_4(1);
004381e7                              
004381f6                              class PStringBase<char> __return_1;
004381f6                              class PStringBase<char>* eax_34 = PStringBase<char>::substring(&m_currHashTable_1, &__return_1, 0, ((char*)ebp_2 - 1));
004381fd                              class PSRefBufferCharData<char>* lpAppName_1 = lpAppName;
004381fd                              
00438204                              if (lpAppName_1 != eax_34->m_charbuffer)
00438204                              {
00438219                                  if ((InterlockedDecrement(&lpAppName_1[-1]) == 0 && lpAppName_1 != 0x14))
00438221                                      *(uint32_t*)*(int32_t*)((char*)lpAppName_1 + -0x14)(1);
00438221                                  
00438223                                  class PSRefBufferCharData<char>* m_charbuffer = eax_34->m_charbuffer;
00438226                                  lpAppName = m_charbuffer;
0043822e                                  InterlockedIncrement(&m_charbuffer[-1]);
00438204                              }
00438204                              
0043823e                              int32_t* edi_7 = (__return_1 - 0x14);
0043823e                              
0043824d                              if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
00438255                                  **(uint32_t**)edi_7(1);
00438255                              
004381db                              goto label_4382a2;
0043817a                          }
0043817a                          
004382fc                          void* __offset(PSRefBufferCharData<char>, -0x14) edi_11 = &lpAppName->m_data[0xffffffec];
004382fc                          
0043830b                          if ((InterlockedDecrement(((char*)edi_11 + 4)) == 0 && edi_11 != 0))
00438313                              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_11) + -0x14)(1);
00438313                          
00438324                          if ((InterlockedDecrement(&lpKeyName[-1]) == 0 && lpKeyName != 0x14))
0043832c                              *(uint32_t*)*(int32_t*)((char*)lpKeyName + -0x14)(1);
0043832c                          
0043832e                          esi_6 = ((char*)m_currHashTable - 0x14);
00438335                          eax_50 = InterlockedDecrement(((char*)esi_6 + 4));
00438120                      }
00438120                      
0043834c                      if ((eax_50 == 0 && esi_6 != 0))
00438354                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00438101                  }
00438101                  
0043835f                  cond:6_1 = (var_2c_1 + 1) < var_10_1;
00438361                  var_2c_1 += 1;
00438365              } while (cond:6_1);
004380e2          }
004380e2          
0043837c          if ((var_14_1 & 0x80000000) == 0x80000000)
00438383              operator delete[](var_18);
00438383          
0043838b          m_currHashTable = var_39;
00437f62      }
00437f62      else if (lpFileName->m_data[-4] != 1)
00437f6c      {
00437f72          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00437f77          lpString = PStringBase<char>::s_NullBuffer_2;
00437f7f          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00437f90          m_currHashTable = PSUtils::get_directory(&lpString, &lpFileName);
00437f97          var_39 = m_currHashTable;
00437f97          
00437f9b          if (m_currHashTable != 0)
00437f9b          {
00437fa2              uint8_t eax_4 = PSUtils::create_directory(&lpString);
00437faa              var_39 = eax_4;
00437fae              m_currHashTable = eax_4;
00437f9b          }
00437f9b          
00437fb4          void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &lpString->m_data[0xffffffec];
00437fb4          
00437fc7          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00437fcf              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00437fcf          
00437fd3          if (m_currHashTable != 0)
00437fd3              goto label_437fd9;
00437fd3          
0043838b          m_currHashTable = var_39;
00437f6c      }
00438393      void* __offset(PSRefBufferCharData<char>, -0x14) esi_8 = &lpFileName->m_data[0xffffffec];
00438393      
004383a6      if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
004383ae          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
004383ae      
004383b2      int32_t eax_56;
004383b2      eax_56 = m_currHashTable;
004383b8      return eax_56;
00437f30  }

004380ea                                8d 9b 00 00 00 00                                                            ......
004383b9                                                                             90 90 90 90 90 90 90                           .......

004383c0  uint8_t __fastcall UserPreferences::ConsoleCommand_SavePreferences()

004383c0  {
004383c0      void* ecx;
004383c0      void* var_4 = ecx;
004383cc      PStringBase<char>::PStringBase<char>(&var_4, "Saving preferences...\n");
004383d6      GlobalRegistry::OutputText(&var_4);
004383e5      int32_t* esi_1 = ((char*)var_4 - 0x14);
004383e5      
004383f7      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004383ff          **(uint32_t**)esi_1(1);
004383ff      
00438408      if (UserPreferences::Save() == 0)
00438408      {
00438413          PStringBase<char>::PStringBase<char>(&var_4, "Error while saving preferences!\n");
0043841d          GlobalRegistry::OutputText(&var_4);
00438426          void* esi_3 = ((char*)var_4 - 0x14);
00438426          
00438438          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00438440              **(uint32_t**)esi_3(1);
00438408      }
00438408      
00438443      int32_t eax_1;
00438443      eax_1 = 1;
00438447      return 1;
004383c0  }

00438448                          90 90 90 90 90 90 90 90                                                          ........

00438450  uint8_t UserPreferences::InqChoiceValues(class PStringBase<char> const* arg1, class SmartArray<unsigned long,1>* arg2)

00438450  {
00438450      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00438450      
0043845a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043845a      {
00438461          void* eax = operator new(0x8100);
00438461          
0043846b          if (eax == 0)
00438476              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
0043846b          else
0043846f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
0043846f          
00438478          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043845a      }
0043845a      
00438493      class GRPObject* var_4;
00438493      
00438493      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
00438493      {
0043849e          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
0043849e          
004384a2          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 4)))
004384a2          {
004384c4              class GRPVariableObject* var_8 = nullptr;
004384cc              class GRPVariableObject* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
004384cc              
004384d6              if (eax_3 != 0)
004384d6              {
004384e1                  class GRPVariableObject* ebp_1 = *(int32_t*)((char*)var_8->vtable + 0x44)();
004384e5                  bool ecx_6 = ebp_1 != 0;
004384ea                  bool var_9_1 = ecx_6;
004384ea                  
004384f2                  if ((ecx_6 != 0 && ebp_1 != 0))
004384f2                  {
004384f4                      eax_3 = *(int32_t*)((char*)ebp_1 + 0x24);
004384f7                      int32_t edi_1 = 0;
004384fb                      var_8 = eax_3;
004384fb                      
004384ff                      if (eax_3 > 0)
004384ff                      {
00438548                          do
00438548                          {
0043850c                              int32_t* ebx_1 = (*(int32_t*)((char*)ebp_1 + 0x20) + (edi_1 << 2));
00438512                              int32_t eax_6 = (arg2->m_sizeAndDeallocate & 0x7fffffff);
00438512                              
00438519                              if (arg2->m_num < eax_6)
00438519                              {
00438537                                  arg2->m_data[arg2->m_num] = *(uint32_t*)ebx_1;
0043853e                                  arg2->m_num += 1;
00438519                              }
00438519                              else
00438519                              {
0043852e                                  ecx_6 = var_9_1;
0043852e                                  
00438532                                  if (SmartArray<unsigned long,1>::grow(arg2, SmartArray<unsigned long,1>::get_new_size(arg2, (eax_6 + 1))) != 0)
00438532                                  {
00438537                                      arg2->m_data[arg2->m_num] = *(uint32_t*)ebx_1;
0043853e                                      arg2->m_num += 1;
00438532                                  }
00438519                              }
00438519                              
00438545                              edi_1 += 1;
00438548                          } while (edi_1 < var_8);
004384ff                      }
004384f2                  }
004384f2                  
0043854b                  eax_3 = ecx_6;
004384d6              }
004384d6              
00438553              return eax_3;
004384a2          }
00438493      }
00438493      
004384b7      int32_t* eax_1;
004384b7      eax_1 = 0;
004384bd      return 0;
00438450  }

00438554                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00438560  uint8_t UserPreferences::InqChoiceStrings(class PStringBase<char> const* arg1, class SmartArray<PStringBase<char>,1>* arg2)

00438560  {
00438560      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00438560      
0043856a      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043856a      {
00438571          void* eax = operator new(0x8100);
00438571          
0043857b          if (eax == 0)
00438586              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
0043857b          else
0043857f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
0043857f          
00438588          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043856a      }
0043856a      
004385a3      class GRPObject* var_4;
004385a3      
004385a3      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, arg1, &var_4) != 0)
004385a3      {
004385ae          int32_t* esi_1 = var_4->vtable->AsTypedVariableObject();
004385ae          
004385b2          if ((esi_1 != 0 && (*(uint32_t*)(*(uint32_t*)esi_1 + 0x48)() != 0 && esi_1[4] == 4)))
004385b2          {
004385d4              class GRPVariableObject* var_8 = nullptr;
004385dc              void* eax_3 = UserPreferences::FindPreference(arg1, &var_8);
004385dc              
004385e6              if (eax_3 != 0)
004385e6              {
004385f1                  void* edi_1 = *(int32_t*)((char*)var_8->vtable + 0x44)();
004385f5                  eax_3 = edi_1 != 0;
004385f5                  
00438602                  if ((eax_3 != 0 && edi_1 != 0))
00438602                  {
00438604                      int32_t ebp_1 = *(uint32_t*)((char*)edi_1 + 0x1c);
00438607                      int32_t esi_2 = 0;
00438607                      
0043860b                      if (ebp_1 > 0)
0043860b                      {
00438623                          do
00438623                          {
0043861b                              SmartArray<PStringBase<char>,1>::AddToEnd(arg2, (*(uint32_t*)((char*)edi_1 + 0x18) + (esi_2 << 2)));
00438620                              esi_2 += 1;
00438623                          } while (esi_2 < ebp_1);
00438623                          
00438625                          eax_3 = eax_3;
0043860b                      }
00438602                  }
004385e6              }
004385e6              
00438630              return eax_3;
004385b2          }
004385a3      }
004385a3      
004385c7      int32_t* eax_1;
004385c7      eax_1 = 0;
004385cd      return 0;
00438560  }

00438631                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00438640  uint8_t UserPreferences::Load()

00438640  {
00438640      int32_t ebp;
00438640      int32_t var_4 = ebp;
00438649      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043864f      int32_t* var_70 = &var_4;
00438657      class PSRefBufferCharData<char>* lpFileName = PStringBase<char>::s_NullBuffer_1;
00438662      UserPreferences::sm_bPrefsLoadedOK = 0;
00438668      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0043866f      uint8_t eax_1 = UserPreferences::FindDefaultFile(&lpFileName);
0043866f      
0043867d      if (eax_1 != 0)
0043867d      {
00438688          struct _STL::pair<PStringBase<char>,PStringBase<char> >* var_3c = nullptr;
0043868c          int32_t var_38_1 = 0;
00438690          int32_t var_34_1 = 0;
00438694          void* eax_2 = operator new[](0x4000);
004386a7          __builtin_memset(eax_2, 0, 0x4000);
004386b4          uint32_t eax_3 = GetPrivateProfileSectionNamesA(eax_2, 0x4000, lpFileName);
004386bc          void* __offset(PSRefBufferCharData<char>, -0x10) var_7c_4;
004386bc          void* __offset(PSRefBufferCharData<char>, -0x14) esi_3;
004386bc          
004386bc          if (eax_3 == 0)
004386bc          {
004386bf              operator delete[](eax_2);
004386bf              
004386d7              if ((var_38_1 & 0x80000000) == 0x80000000)
004386d7              {
004386d9                  struct _STL::pair<PStringBase<char>,PStringBase<char> >* ecx_2 = var_3c;
004386d9                  
004386df                  if (ecx_2 != 0)
004386e3                      _STL::pair<PStringBase<char>,PStringBase<char> >::`vector deleting destructor'(ecx_2, 3);
004386d7              }
004386d7              
004386ec              esi_3 = &lpFileName->m_data[0xffffffec];
004386f2              var_7c_4 = ((char*)esi_3 + 4);
004386f3              goto label_438768;
004386bc          }
004386bc          
004386fc          class PStringBase<char>* var_30 = nullptr;
00438700          int32_t var_2c_1 = 0;
00438704          int32_t var_28_1 = 0;
00438704          
00438713          if (PSUtils::explode(eax_2, eax_3, &var_30) == 0)
00438713          {
00438715              operator delete[](eax_2);
00438715              
0043872d              if ((var_2c_1 & 0x80000000) == 0x80000000)
0043872d              {
0043872f                  class PStringBase<char>* ecx_3 = var_30;
0043872f                  
00438735                  if (ecx_3 != 0)
00438739                      PStringBase<char>::`vector deleting destructor'(ecx_3, 3);
0043872d              }
0043872d              
0043874c              if ((var_38_1 & 0x80000000) == 0x80000000)
0043874c              {
0043874e                  struct _STL::pair<PStringBase<char>,PStringBase<char> >* ecx_4 = var_3c;
0043874e                  
00438754                  if (ecx_4 != 0)
00438758                      _STL::pair<PStringBase<char>,PStringBase<char> >::`vector deleting destructor'(ecx_4, 3);
0043874c              }
0043874c              
00438761              esi_3 = &lpFileName->m_data[0xffffffec];
00438767              var_7c_4 = ((char*)esi_3 + 4);
00438768          label_438768:
00438768              
00438774              if ((InterlockedDecrement(var_7c_4) == 0 && esi_3 != 0))
0043877c                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0043877c              
0043877e              int32_t eax_8;
0043877e              eax_8 = 0;
00438786              *(uint32_t*)var_70;
00438787              return 0;
00438713          }
00438713          
00438788          operator delete[](eax_2);
00438792          void* eax_9 = operator new[](0x4000);
004387a4          int32_t var_4c_1 = 0;
004387a4          
004387a8          if (var_28_1 > 0)
004387a8          {
00438ae8              bool cond:3_1;
00438ae8              
00438ae8              do
00438ae8              {
004387b8                  PSTR m_charbuffer_1 = var_30[var_4c_1].m_charbuffer;
004387bf                  InterlockedIncrement(&m_charbuffer_1[0xfffffff0]);
004387ce                  __builtin_memset(eax_9, 0, 0x4000);
004387dc                  uint32_t eax_13 = GetPrivateProfileSectionA(m_charbuffer_1, eax_9, 0x4000, lpFileName);
004387dc                  
004387e6                  if (eax_13 != 0)
004387e6                  {
004387f3                      class PStringBase<char>* var_24 = nullptr;
004387f7                      int32_t var_20_1 = 0;
004387fb                      int32_t var_1c_1 = 0;
004387ff                      uint8_t eax_14;
004387ff                      int32_t ecx_8;
004387ff                      eax_14 = PSUtils::explode(eax_9, eax_13, &var_24);
004387ff                      
00438809                      if (eax_14 == 0)
00438809                      {
00438ba2                          operator delete[](eax_9);
00438ba2                          
00438bb8                          if ((var_20_1 & 0x80000000) == 0x80000000)
00438bb8                          {
00438bba                              class PStringBase<char>* ecx_46 = var_24;
00438bba                              
00438bc0                              if (ecx_46 != 0)
00438bc4                                  PStringBase<char>::`vector deleting destructor'(ecx_46, 3);
00438bb8                          }
00438bb8                          
00438bde                          if ((InterlockedDecrement(&m_charbuffer_1[0xfffffff0]) == 0 && m_charbuffer_1 != 0x14))
00438be6                              **(uint32_t**)(m_charbuffer_1 - 0x14)(1);
00438be6                          
00438bf6                          if ((var_2c_1 & 0x80000000) == 0x80000000)
00438bf6                          {
00438bf8                              class PStringBase<char>* ecx_49 = var_30;
00438bf8                              
00438bfe                              if (ecx_49 != 0)
00438c02                                  PStringBase<char>::`vector deleting destructor'(ecx_49, 3);
00438bf6                          }
00438bf6                          
00438c17                          if ((var_38_1 & 0x80000000) == 0x80000000)
00438c17                          {
00438c19                              struct _STL::pair<PStringBase<char>,PStringBase<char> >* ecx_52 = var_3c;
00438c19                              
00438c1f                              if (ecx_52 != 0)
00438c23                                  _STL::pair<PStringBase<char>,PStringBase<char> >::`vector deleting destructor'(ecx_52, 3);
00438c17                          }
00438c17                          
00438c2c                          void* __offset(PSRefBufferCharData<char>, -0x14) esi_23 = &lpFileName->m_data[0xffffffec];
00438c2c                          
00438c3b                          if ((InterlockedDecrement(((char*)esi_23 + 4)) == 0 && esi_23 != 0))
00438c43                              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_23) + -0x14)(1);
00438c43                          
00438c46                          int32_t eax_60;
00438c46                          eax_60 = 0;
00438c4d                          *(uint32_t*)var_70;
00438c4e                          return 0;
00438809                      }
00438809                      
00438813                      int32_t var_50_1 = 0;
00438813                      
00438817                      if (var_1c_1 > 0)
00438817                      {
00438a97                          bool cond:5_1;
00438a97                          
00438a97                          do
00438a97                          {
00438828                              class PStringBase<char> m_charbuffer = var_24[var_50_1].m_charbuffer;
0043882b                              class PStringBase<char> m_charbuffer_3 = m_charbuffer;
00438833                              InterlockedIncrement((m_charbuffer - 0x10));
00438848                              struct List<PStringBase<char> >::VTable* const var_18 = &List<class PStringBase<char> >::`vftable';
0043884c                              char** i_1 = nullptr;
00438850                              int32_t var_10_1 = 0;
00438854                              int32_t var_c_1 = 0;
00438854                              
00438862                              if (PSUtils::explode(&m_charbuffer_3, 0x3d, &var_18) == 0)
00438862                              {
00438a30                              label_438a30:
00438a30                                  var_18 = &List<class PStringBase<char> >::`vftable';
00438a38                                  List<PStringBase<char> >::flush(&var_18);
00438a41                                  int32_t* esi_16 = (m_charbuffer_3 - 0x14);
00438a41                                  
00438a54                                  if ((InterlockedDecrement(&esi_16[1]) == 0 && esi_16 != 0))
00438a5c                                      **(uint32_t**)esi_16(1);
00438862                              }
00438862                              else
00438862                              {
00438868                                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0043886d                                  class PStringBase<char> PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_2;
00438875                                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00438877                                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0043887c                                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
00438884                                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
00438884                                  
0043888d                                  if (var_c_1 == 2)
0043888d                                  {
00438898                                      List<PStringBase<char> >::pop_front(&var_18, &PStringBase<char>::s_NullBuffer_6);
004388a6                                      List<PStringBase<char> >::pop_front(&var_18, &PStringBase<char>::s_NullBuffer_5);
00438905                                  label_438905:
00438905                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
0043890a                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_4;
00438912                                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
00438914                                      class PStringBase<char> PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_6;
00438918                                      class PStringBase<char> PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_10;
00438919                                      PSTR m_charbuffer_2 = m_charbuffer_1;
00438924                                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_7, "%s.%s");
00438929                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_7;
0043892d                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_8;
00438938                                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_8[-1]);
0043893a                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_5;
00438946                                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_9[-1]);
00438950                                      int32_t eax_26 = (var_38_1 & 0x7fffffff);
00438950                                      
00438957                                      if (var_34_1 < eax_26)
00438957                                      {
00438982                                          _STL::pair<PStringBase<char>,PStringBase<char> >::operator=(&var_3c[var_34_1], &PStringBase<char>::s_NullBuffer_12);
00438987                                          var_34_1 += 1;
00438957                                      }
00438957                                      else if (SmartArray<_STL::pair<PStringBase<char>,PStringBase<char> >,1>::grow(&var_3c, SmartArray<unsigned long,1>::get_new_size(&var_3c, (eax_26 + 1))) != 0)
00438970                                      {
00438982                                          _STL::pair<PStringBase<char>,PStringBase<char> >::operator=(&var_3c[var_34_1], &PStringBase<char>::s_NullBuffer_12);
00438987                                          var_34_1 += 1;
00438970                                      }
00438970                                      
004389a2                                      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_9[-1]) == 0 && PStringBase<char>::s_NullBuffer_9 != 0x14))
004389aa                                          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_9 + -0x14)(1);
004389aa                                      
004389b0                                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_9 = &PStringBase<char>::s_NullBuffer_12->m_data[0xffffffec];
004389b0                                      
004389c3                                      if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
004389cb                                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
004389cb                                      
004389d1                                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_11 = &PStringBase<char>::s_NullBuffer_7->m_data[0xffffffec];
004389d1                                      
004389e4                                      if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
004389ec                                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
004389ec                                      
004389f2                                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_13 = &PStringBase<char>::s_NullBuffer_5->m_data[0xffffffec];
004389f2                                      
00438a05                                      if ((InterlockedDecrement(((char*)esi_13 + 4)) == 0 && esi_13 != 0))
00438a0d                                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_13) + -0x14)(1);
00438a0d                                      
00438a22                                      if ((InterlockedDecrement((PStringBase<char>::s_NullBuffer_10 - 0x10)) == 0 && PStringBase<char>::s_NullBuffer_10 != 0x14))
00438a2a                                          **(uint32_t**)(PStringBase<char>::s_NullBuffer_10 - 0x14)(1);
00438a2a                                      
0043899e                                      goto label_438a30;
0043888d                                  }
0043888d                                  
004388ad                                  if (var_c_1 > 2)
004388ad                                  {
004388b8                                      List<PStringBase<char> >::pop_front(&var_18, &PStringBase<char>::s_NullBuffer_6);
004388b8                                      
004388c3                                      for (char** i = i_1; i != 0; i = i[1])
004388c3                                      {
004388c5                                          char* eax_21 = *(uint32_t*)i;
004388c7                                          int32_t ecx_13 = *(uint32_t*)(eax_21 - 4);
004388c7                                          
004388cd                                          if (ecx_13 != 1)
004388d6                                              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_5, eax_21, (ecx_13 - 1));
004388c3                                      }
004388c3                                      
004388c3                                      goto label_438905;
004388ad                                  }
004388ad                                  
004388e3                                  if (var_c_1 == 1)
004388e3                                  {
004388f2                                      List<PStringBase<char> >::pop_front(&var_18, &PStringBase<char>::s_NullBuffer_6);
00438900                                      PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_5, &data_7928af);
00438900                                      goto label_438905;
004388e3                                  }
004388e3                                  
00438a64                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_5);
00438a6d                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_6);
00438a76                                  var_18 = &List<class PStringBase<char> >::`vftable';
00438a7a                                  List<PStringBase<char> >::flush(&var_18);
00438a83                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_3);
00438862                              }
00438862                              
00438a91                              cond:5_1 = (var_50_1 + 1) < var_1c_1;
00438a93                              var_50_1 += 1;
00438a97                          } while (cond:5_1);
00438817                      }
00438817                      
00438aab                      if ((var_20_1 & 0x80000000) == 0x80000000)
00438aab                      {
00438aad                          class PStringBase<char>* ecx_36 = var_24;
00438aad                          
00438ab3                          if (ecx_36 != 0)
00438ab7                              PStringBase<char>::`vector deleting destructor'(ecx_36, 3);
00438aab                      }
004387e6                  }
004387e6                  
00438acf                  if ((InterlockedDecrement(&m_charbuffer_1[0xfffffff0]) == 0 && m_charbuffer_1 != 0x14))
00438ad7                      **(uint32_t**)(m_charbuffer_1 - 0x14)(1);
00438ad7                  
00438ae2                  cond:3_1 = (var_4c_1 + 1) < var_28_1;
00438ae4                  var_4c_1 += 1;
00438ae8              } while (cond:3_1);
004387a8          }
004387a8          
00438af5          operator delete[](eax_9);
00438b01          int32_t esi_18 = 0;
00438b01          
00438b05          if (var_34_1 > 0)
00438b05          {
00438b2b              do
00438b2b              {
00438b14                  void* eax_50 = &var_3c[esi_18];
00438b1c                  GlobalRegistry::SetGlobalVariable(eax_50, ((char*)eax_50 + 4));
00438b28                  esi_18 += 1;
00438b2b              } while (esi_18 < var_34_1);
00438b05          }
00438b05          
00438b3d          if ((var_2c_1 & 0x80000000) == 0x80000000)
00438b3d          {
00438b3f              class PStringBase<char>* ecx_42 = var_30;
00438b3f              
00438b45              if (ecx_42 != 0)
00438b49                  PStringBase<char>::`vector deleting destructor'(ecx_42, 3);
00438b3d          }
00438b3d          
00438b5c          if ((var_38_1 & 0x80000000) == 0x80000000)
00438b5c          {
00438b5e              struct _STL::pair<PStringBase<char>,PStringBase<char> >* ecx_43 = var_3c;
00438b5e              
00438b64              if (ecx_43 != 0)
00438b68                  _STL::pair<PStringBase<char>,PStringBase<char> >::`vector deleting destructor'(ecx_43, 3);
00438b5c          }
00438b5c          
00438b6d          UserPreferences::sm_bPrefsLoadedOK = 1;
0043867d      }
0043867d      
00438b78      void* __offset(PSRefBufferCharData<char>, -0x14) esi_20 = &lpFileName->m_data[0xffffffec];
00438b78      
00438b8b      if ((InterlockedDecrement(((char*)esi_20 + 4)) == 0 && esi_20 != 0))
00438b93          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_20) + -0x14)(1);
00438b93      
00438b95      int32_t eax_54;
00438b95      eax_54 = eax_1;
00438b9f      *(uint32_t*)var_70;
00438ba0      return eax_54;
00438640  }

00438b09                             8d a4 24 00 00 00 00                                                           ..$....
00438c4f                                               90                                                                 .

00438c50  uint8_t __fastcall UserPreferences::ConsoleCommand_LoadPreferences()

00438c50  {
00438c50      void* ecx;
00438c50      void* var_4 = ecx;
00438c5c      PStringBase<char>::PStringBase<char>(&var_4, "Loading preferences...\n");
00438c66      GlobalRegistry::OutputText(&var_4);
00438c75      int32_t* esi_1 = ((char*)var_4 - 0x14);
00438c75      
00438c87      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00438c8f          **(uint32_t**)esi_1(1);
00438c8f      
00438c98      if (UserPreferences::Load() != 0)
00438c98      {
00438ca3          PStringBase<char>::PStringBase<char>(&var_4, "Error while loading preferences!…");
00438cad          GlobalRegistry::OutputText(&var_4);
00438cb6          void* esi_3 = ((char*)var_4 - 0x14);
00438cb6          
00438cc8          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00438cd0              **(uint32_t**)esi_3(1);
00438c98      }
00438c98      
00438cd3      int32_t eax_1;
00438cd3      eax_1 = 1;
00438cd7      return 1;
00438c50  }

00438cd8                                                                          90 90 90 90 90 90 90 90                          ........

00438ce0  uint8_t UserPreferences::Initialize(uint8_t const arg1, class PStringBase<char> const* arg2)

00438ce0  {
00438cf3      UserPreferences::sm_bTools = arg1;
00438cf8      UserPreferences::sm_bPrefsLoadedOK = 1;
00438cff      class PStringBase<char> var_4;
00438cff      PStringBase<char>::PStringBase<char>(&var_4, "Loads user preferences from disk");
00438d0d      class PStringBase<char> var_8;
00438d0d      PStringBase<char>::PStringBase<char>(&var_8, "LoadPreferences");
00438d21      GlobalRegistry::RegisterCommand(UserPreferences::ConsoleCommand_LoadPreferences, &var_8, &var_4);
00438d30      int32_t* esi_1 = (var_8 - 0x14);
00438d30      
00438d42      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00438d4a          **(uint32_t**)esi_1(1);
00438d4a      
00438d50      int32_t* esi_3 = (var_4 - 0x14);
00438d50      
00438d5f      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00438d67          **(uint32_t**)esi_3(1);
00438d67      
00438d72      PStringBase<char>::PStringBase<char>(&var_8, "Saves user preferences to disk");
00438d80      PStringBase<char>::PStringBase<char>(&var_4, "SavePreferences");
00438d94      GlobalRegistry::RegisterCommand(UserPreferences::ConsoleCommand_SavePreferences, &var_4, &var_8);
00438d9d      int32_t* esi_5 = (var_4 - 0x14);
00438d9d      
00438daf      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00438db7          **(uint32_t**)esi_5(1);
00438db7      
00438dbd      int32_t* esi_7 = (var_8 - 0x14);
00438dbd      
00438dcc      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
00438dd4          **(uint32_t**)esi_7(1);
00438dd4      
00438dda      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
00438ddc      arg1 = m_charbuffer;
00438de4      int32_t eax_10 = InterlockedIncrement(&m_charbuffer[-1]);
00438de4      
00438df2      if (*(uint32_t*)(arg1 - 4) == 1)
00438df9          eax_10 = UserPreferences::FindDefaultFile(&arg1);
00438df9      
00438e05      uint8_t const* var_18_8 = &arg1;
00438e06      uint8_t eax_11 = UserPreferences::SetDefaultFile(eax_10);
00438e0f      int32_t* esi_9 = (arg1 - 0x14);
00438e19      int32_t ebx;
00438e19      ebx = eax_11;
00438e19      
00438e23      if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
00438e2b          **(uint32_t**)esi_9(1);
00438e2b      
00438e2f      int32_t eax_12;
00438e2f      eax_12 = ebx;
00438e35      return eax_12;
00438ce0  }

00438e36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00438e40  void __fastcall RenderDevicePresentation::RenderDevicePresentation(class RenderDevicePresentation* this)

00438e40  {
00438e44      this->hRenderWindow = 0;
00438e46      this->Width = 0x320;
00438e4d      this->Height = 0x258;
00438e54      this->FullScreen = 0;
00438e57      this->FSRefreshRate = 0;
00438e5a      this->FSBitsPerPixel = 0x20;
00438e61      this->FSTripleBuffering = 0;
00438e64      this->FSSyncToDisplayRefresh = 0;
00438e67      this->Antialiasing = 0;
00438e40  }

00438e6b                                   90 90 90 90 90                                                             .....

00438e70  void* __thiscall SurfaceWindow::`scalar deleting destructor'(class SurfaceWindow* this, uint32_t arg2)

00438e70  {
00438e73      this->vtable = 0x798d14;
00438e79      SurfaceWindow::End(this);
00438e79      
00438e83      if ((arg2 & 1) != 0)
00438e86          operator delete(this);
00438e86      
00438e91      return this;
00438e70  }

00438e94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00438ea0  uint8_t Device::DeviceDialogBoxGateway::ReportThread_OnDialogBoxBegin(class Device::DeviceDialogBoxGateway* this @ ecx)

00438ea0  {
00438ea1      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00438ea1      
00438eb2      if ((RenderDevice::render_device_1 == 0 || RenderDevice::render_device_1->m_presentation.FullScreen == 0))
00438edc          return 0;
00438edc      
00438ed3      int32_t __saved_ecx;
00438ed3      SendMessageTimeoutA(Device::m_hWnd, 0x112, 0xf020, nullptr, SMTO_NORMAL, 0x3e8, &__saved_ecx);
00438ed9      return 1;
00438ea0  }

00438edd                                                                                         90 90 90                               ...

00438ee0  void __stdcall Device::DeviceDialogBoxGateway::ReportThread_OnDialogBoxEnd(class Device::DeviceDialogBoxGateway* this @ ecx, uint8_t arg2)

00438ee0  {
00438ee6      if (arg2 != 0)
00438f07          SendMessageTimeoutA(Device::m_hWnd, 0x112, 0xf120, nullptr, SMTO_NORMAL, 0x3e8, &arg2);
00438ee0  }


00438f10  void __fastcall Device::DeviceDialogBoxGateway::DeviceDialogBoxGateway(class Device::DeviceDialogBoxGateway* this)

00438f10  {
00438f13      DialogBoxGateway::DialogBoxGateway(this);
00438f18      this->vtable = 0x798d18;
00438f10  }

00438f22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00438f30  void Device::Done()

00438f30  {
00438f30      Device::m_bIsDone = 1;
00438f30  }

00438f38                                                                          90 90 90 90 90 90 90 90                          ........

00438f40  int32_t Device::ForwardToInputManager(struct HWND__* arg1, uint32_t arg2, uint32_t arg3, int32_t arg4, uint8_t* arg5)

00438f40  {
00438f53      if ((Device::m_bIsInitialized == 0 || ICIDM::s_cidm == 0))
00438f53      {
00438f9c          *(uint8_t*)arg5 = 0;
00438fa4          return 0;
00438f53      }
00438f53      
00438f61      struct HWND__* var_1c = arg1;
00438f69      uint32_t var_18 = arg2;
00438f6d      uint32_t var_14 = arg3;
00438f71      int32_t var_10 = arg4;
00438f81      int32_t var_c = GetMessageTime();
00438f97      return ICIDM::s_cidm->vtable->OnMessage(&var_1c, arg5);
00438f40  }

00438fa5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00438fb0  void Device::DoFrameSleep()

00438fb0  {
00438fb6      uint32_t dwMilliseconds = 0;
00438fb6      
00438fc1      if (Device::m_bIsActiveApp == 0)
00438fc1      {
00438fc5          uint32_t eax_2 = (timeGetTime() - lastTime);
00438fc5          
00438fce          if (eax_2 < 0x63)
00438fd5              dwMilliseconds = (0x63 - eax_2);
00438fc1      }
00438fc1      
00438fd8      Sleep(dwMilliseconds);
00438fe1      lastTime = timeGetTime();
00438fb0  }

00438fe8                          90 90 90 90 90 90 90 90                                                          ........

00438ff0  void Device::Activate()

00438ff0  {
00438ff7      if (Device::m_bIsActiveApp == 0)
00438ff7      {
00438ff9          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00438ff9          
00439001          if (ICIDM::s_cidm_1 != 0)
00439003              ICIDM::s_cidm_1->vtable->Activate(1);
00439003          
0043900a          Device::m_bIsActiveApp = 1;
00438ff7      }
00438ff0  }

00439012                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00439020  void Device::Deactivate()

00439020  {
00439027      if (Device::m_bIsActiveApp != 0)
00439027      {
00439029          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00439031          Device::m_bIsActiveApp = 0;
00439031          
00439038          if (ICIDM::s_cidm_1 != 0)
0043903a              ICIDM::s_cidm_1->vtable->Activate(0);
0043903a          
00439041          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00439041          
00439048          if (RenderDevice::render_device_1 != 0)
0043904a              ICIDM::s_cidm_1 = RenderDevice::render_device_1->m_presentation.FullScreen;
0043904a          
0043904f          if ((RenderDevice::render_device_1 == 0 || ICIDM::s_cidm_1 == 0))
0043905f              SetCursor(LoadCursorA(nullptr, 0x7f00));
00439027      }
00439020  }

00439066                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00439070  uint8_t Device::LoadDisplayPreferences(class RenderDevicePresentation* arg1)

00439070  {
00439070      uint32_t Resolution = Device::m_DisplayPrefs.Resolution;
00439077      uint32_t ecx_1 = (Resolution >> 0x10);
0043907a      uint32_t eax = (Resolution & 0xffff);
0043907a      
0043908f      if ((ecx_1 < 0x320 || eax < 0x258))
0043908f      {
004390f5          eax = 0;
004390f7          return 0;
0043908f      }
0043908f      
00439095      arg1->Width = ecx_1;
00439098      arg1->Height = eax;
0043909b      ecx_1 = Device::m_DisplayPrefs.FullScreen;
004390a1      arg1->FullScreen = ecx_1;
004390aa      arg1->FSRefreshRate = Device::m_DisplayPrefs.RefreshRate;
004390ad      ecx_1 = Device::m_DisplayPrefs.TripleBuffering;
004390b3      arg1->FSTripleBuffering = ecx_1;
004390b6      uint32_t edx_1;
004390b6      edx_1 = Device::m_DisplayPrefs.SyncToRefresh;
004390bc      arg1->FSSyncToDisplayRefresh = edx_1;
004390bf      ecx_1 = Device::m_DisplayPrefs.Antialiasing;
004390c5      arg1->Antialiasing = ecx_1;
004390c8      ecx_1 = Device::m_bUseForcedResolution;
004390c8      
004390d0      if (ecx_1 != 0)
004390d0      {
004390d8          arg1->Width = Device::m_nForcedWidth;
004390e1          arg1->Height = Device::m_nForcedHeight;
004390d0      }
004390d0      
004390e4      ecx_1 = Device::m_bAllowFullScreenMode;
004390e4      
004390ec      if (ecx_1 == 0)
004390ee          arg1->FullScreen = 0;
004390ee      
004390f2      class RenderDevicePresentation* eax_1;
004390f2      eax_1 = 1;
004390f4      return 1;
00439070  }

004390f8                                                                          90 90 90 90 90 90 90 90                          ........

00439100  uint8_t Device::ShutdownGraphicsEngine()

00439100  {
00439107      if (Device::m_bIsActiveApp != 0)
00439107      {
00439109          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00439111          Device::m_bIsActiveApp = 0;
00439111          
00439118          if (ICIDM::s_cidm_1 != 0)
0043911a              ICIDM::s_cidm_1->vtable->Activate(0);
0043911a          
00439121          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00439121          
00439128          if (RenderDevice::render_device_1 != 0)
0043912a              ICIDM::s_cidm_1 = RenderDevice::render_device_1->m_presentation.FullScreen;
0043912a          
0043912f          if ((RenderDevice::render_device_1 == 0 || ICIDM::s_cidm_1 == 0))
0043913f              SetCursor(LoadCursorA(nullptr, 0x7f00));
00439107      }
00439107      
00439145      SceneTool::Shutdown();
0043914a      Render::ShutdownRenderingSystem();
0043914f      int32_t eax_3;
0043914f      eax_3 = 1;
00439151      return 1;
00439100  }

00439152                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00439160  class RenderSurface* Device::GetScreenshotSurface()

00439160  {
0043916c      int32_t* eax_1 = RenderDevice::render_device->vtable->GenerateSurfaceFromFrontBuffer();
0043916c      
00439175      if (eax_1 == 0)
0043917b          return eax_1;
0043917b      
00439188      if (RenderDevice::render_device->m_presentation.FullScreen != 0)
00439188      {
00439191          *(uint32_t*)(*(uint32_t*)eax_1 + 0x10)();
00439199          *(uint32_t*)(*(uint32_t*)eax_1 + 0x14)();
004391a3          return eax_1;
00439188      }
00439188      
004391a4      struct HWND__* Device::m_hWnd_1 = Device::m_hWnd;
004391ac      int32_t var_40 = 0;
004391b0      int32_t* lpPoint = nullptr;
004391ba      ClientToScreen(Device::m_hWnd_1, &lpPoint);
004391cb      void* lpRect;
004391cb      GetClientRect(Device::m_hWnd, &lpRect);
004391dd      int32_t* lpPoint_1 = lpPoint;
004391fb      lpRect += lpPoint_1;
004391ff      int32_t var_38;
004391ff      int32_t var_38_1 = (var_38 + var_40);
00439203      void* var_34;
00439203      void* var_34_1 = ((char*)var_34 + lpPoint_1);
00439207      int32_t var_30;
00439207      int32_t var_30_1 = (var_30 + var_40);
0043920b      int32_t var_2c;
0043920b      SurfaceWindow::SurfaceWindow(&var_2c, eax_1, &lpRect);
00439220      int32_t var_20;
00439220      int32_t var_18;
00439220      int32_t esi_3 = (var_18 - var_20);
00439222      int32_t var_1c;
00439222      int32_t var_14;
00439222      int32_t edi_3 = (var_14 - var_1c);
0043922c      int32_t* lpPoint_2;
0043922c      
0043922c      if ((esi_3 < 1 || edi_3 < 1))
00439263          lpPoint_2 = lpPoint;
0043922c      else
0043922c      {
00439239          lpPoint_2 = RenderDevice::render_device->vtable->CreateSurface();
00439239          
0043923d          if (lpPoint_2 != 0)
0043923d          {
00439255              int32_t* var_58_3 = &var_2c;
0043925c              SurfaceWindow::Blit(&lpPoint_2[0x2b], *(uint32_t*)(*(uint32_t*)lpPoint_2 + 0x58)(esi_3, edi_3, eax_1[0x37], 1));
0043923d          }
0043922c      }
0043922c      
0043926b      var_2c = 0x798d14;
00439273      SurfaceWindow::End(&var_2c);
0043927f      *(uint32_t*)(*(uint32_t*)eax_1 + 0x14)();
00439289      return lpPoint_2;
00439160  }

0043928a                                90 90 90 90 90 90                                                            ......

00439290  int32_t Device::Error(class PStringBase<char> const* arg1, class PStringBase<char> const* arg2, uint8_t arg3, int32_t arg4)

00439290  {
00439290      int32_t ebx;
00439290      int32_t var_4 = ebx;
00439291      ebx = arg3;
00439297      char const* const eax = "fatal";
00439297      
0043929c      if (ebx == 0)
0043929e          eax = "non-fatal";
0043929e      
004392a7      char const* const var_8 = eax;
004392b0      class PSRefBufferCharData<char>* m_charbuffer_1 = arg1->m_charbuffer;
004392b1      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004392b7      IError::ReportGenericError("%s: %s (%s)\n");
004392b7      
004392c2      if (ebx != 0)
004392c4          Device::m_bIsDone = 1;
004392c4      
004392cd      return 0;
00439290  }

004392ce                                            90 90                                                                ..

004392d0  uint8_t Device::SetCursorFromIcon(struct HICON__* arg1)

004392d0  {
004392d1      struct HICON__* esi = arg1;
004392d1      
004392d7      if (esi != 0)
004392d7      {
004392f3      label_4392f3:
004392f3          uint32_t hIcon = GetClassLongA(Device::m_hWnd, 0xfffffff4);
004392f3          
004392fb          if (hIcon != esi)
004392fe              DestroyIcon(hIcon);
004392fe          
0043930e          SetClassLongA(Device::m_hWnd, 0xfffffff4, esi);
00439315          SetCursor(esi);
004392d7      }
004392d7      else
004392d7      {
004392e5          esi = LoadCursorA(esi, 0x7f00);
004392e5          
004392e9          if (esi != 0)
004392e9              goto label_4392f3;
004392d7      }
004392d7      
0043931b      HCURSOR eax_1;
0043931b      eax_1 = 1;
0043931e      return 1;
004392d0  }

0043931f                                                                                               90                                 .

00439320  void Device::ShowCursor(uint8_t arg1)

00439320  {
00439326      int32_t ebx;
00439326      ebx = arg1;
00439326      
0043932c      if (Device::m_fMouseIsShown != ebx)
0043932c      {
00439332          ShowCursor(((uint32_t)ebx));
00439338          Device::m_fMouseIsShown = ebx;
0043932c      }
00439320  }


00439340  void __fastcall SmartArray<PrefDisplayModeType,1>::Reset(class SmartArray<PrefDisplayModeType,1>* this)

00439340  {
00439346      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0043935a      this->m_num = 0;
0043935a      
0043935d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0043935d      {
00439362          operator delete[](this->m_data);
0043936a          this->m_data = 0;
0043936c          this->m_sizeAndDeallocate = 0;
00439374          return;
0043935d      }
0043935d      
00439377      if (this->m_data != 0)
00439377      {
00439379          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00439379          
00439381          if ((i_2 - 1) >= 0)
00439381          {
0043938c              int32_t eax_1 = ((i_2 - 1) << 4);
0043938f              int32_t i_1 = i_2;
004393ac              int32_t i;
004393ac              
004393ac              do
004393ac              {
00439397                  void* ebx_2 = (this->m_data + eax_1);
00439399                  int32_t var_10;
00439399                  *(uint32_t*)ebx_2 = var_10;
0043939f                  int32_t var_c;
0043939f                  *(uint32_t*)((char*)ebx_2 + 4) = var_c;
004393a2                  int32_t var_8;
004393a2                  *(uint32_t*)((char*)ebx_2 + 8) = var_8;
004393a5                  eax_1 -= 0x10;
004393a8                  i = i_1;
004393a8                  i_1 -= 1;
004393a9                  int32_t var_4;
004393a9                  *(uint32_t*)((char*)ebx_2 + 0xc) = var_4;
004393ac              } while (i != 1);
00439381          }
00439377      }
00439340  }

004393b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004393c0  void _STL::__unguarded_linear_insert(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType arg2, struct _STL::less<PrefDisplayModeType> arg3)

004393c0  {
004393c0      struct PrefDisplayModeType* ecx = arg1;
004393c4      uint32_t nSize = arg2.nSize;
004393c8      void* __offset(PrefDisplayModeType, -0x10) eax = &ecx[-1];
004393c8      
004393cf      if (nSize < *(int32_t*)((char*)ADJ(eax) + -8))
004393cf      {
004393f4          int32_t esi_3;
004393f4          
004393f4          do
004393f4          {
004393d6              ecx->nWidth = *(int32_t*)((char*)ADJ(eax) + -0x10);
004393db              ecx->nHeight = *(int32_t*)((char*)ADJ(eax) + -0xc);
004393e1              ecx->nSize = *(int32_t*)((char*)ADJ(eax) + -8);
004393e7              ecx->nModeDesc = ADJ(eax)->nWidth;
004393ea              esi_3 = *(int32_t*)((char*)ADJ(eax) + -0x18);
004393ed              ecx = eax;
004393ef              eax -= 0x10;
004393f4          } while (nSize < esi_3);
004393cf      }
004393cf      
004393fb      ecx->nWidth = arg2.nWidth;
00439401      ecx->nHeight = arg2.nHeight;
00439404      ecx->nSize = nSize;
0043940b      ecx->nModeDesc = arg2.nModeDesc;
004393c0  }


00439410  void _STL::__push_heap(uint32_t* arg1, int32_t arg2, int32_t arg3, uint32_t arg4, struct _STL::less<unsigned long> arg5)

00439410  {
00439410      int32_t ecx = arg2;
00439417      int32_t eax_1;
00439417      int32_t edx;
00439417      edx = HIGHD(((int64_t)(ecx - 1)));
00439417      eax_1 = LOWD(((int64_t)(ecx - 1)));
0043941f      int32_t eax_3 = ((eax_1 - edx) >> 1);
0043941f      
00439423      if (ecx <= arg3)
00439423      {
00439455          arg1[ecx] = arg4;
00439459          return;
00439423      }
00439423      
00439444      do
00439444      {
00439430          int32_t edx_1 = arg1[eax_3];
00439430          
00439435          if (edx_1 >= arg4)
00439435              break;
00439435          
00439437          arg1[ecx] = edx_1;
0043943a          ecx = eax_3;
0043943d          int32_t eax_5;
0043943d          int32_t edx_2;
0043943d          edx_2 = HIGHD(((int64_t)(eax_3 - 1)));
0043943d          eax_5 = LOWD(((int64_t)(eax_3 - 1)));
00439440          eax_3 = ((eax_5 - edx_2) >> 1);
00439444      } while (ecx > arg3);
00439444      
00439446      arg1[ecx] = arg4;
00439410  }

0043945a                                                                                90 90 90 90 90 90                            ......

00439460  void _STL::__push_heap(struct PrefDisplayModeType* arg1, int32_t arg2, int32_t arg3, struct PrefDisplayModeType arg4, struct _STL::less<PrefDisplayModeType> arg5)

00439460  {
00439466      uint32_t nSize = arg4.nSize;
0043946b      int32_t esi = arg2;
00439472      int32_t eax_1;
00439472      int32_t edx;
00439472      edx = HIGHD(((int64_t)(esi - 1)));
00439472      eax_1 = LOWD(((int64_t)(esi - 1)));
00439475      int32_t eax_3 = ((eax_1 - edx) >> 1);
00439475      
0043947e      while (esi > arg3)
0043947e      {
00439482          int32_t ecx_2 = (eax_3 << 4);
00439489          void* ecx_3 = (ecx_2 + arg1);
00439489          
0043948d          if (*(uint32_t*)(&arg1->nSize + ecx_2) >= nSize)
0043948d              break;
0043948d          
00439494          void* esi_2 = &arg1[esi];
00439496          *(uint32_t*)esi_2 = *(uint32_t*)ecx_3;
0043949b          *(uint32_t*)((char*)esi_2 + 4) = *(uint32_t*)((char*)ecx_3 + 4);
004394a1          *(uint32_t*)((char*)esi_2 + 8) = *(uint32_t*)((char*)ecx_3 + 8);
004394a7          *(uint32_t*)((char*)esi_2 + 0xc) = *(uint32_t*)((char*)ecx_3 + 0xc);
004394aa          esi = eax_3;
004394ad          int32_t eax_5;
004394ad          int32_t edx_5;
004394ad          edx_5 = HIGHD(((int64_t)(eax_3 - 1)));
004394ad          eax_5 = LOWD(((int64_t)(eax_3 - 1)));
004394b0          eax_3 = ((eax_5 - edx_5) >> 1);
0043947e      }
0043947e      
004394c5      void* esi_4 = &arg1[esi];
004394c7      *(uint32_t*)esi_4 = arg4.nWidth;
004394c9      *(uint32_t*)((char*)esi_4 + 4) = arg4.nHeight;
004394cc      *(uint32_t*)((char*)esi_4 + 8) = nSize;
004394d0      *(uint32_t*)((char*)esi_4 + 0xc) = arg4.nModeDesc;
00439460  }

004394d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004394e0  struct PrefDisplayModeType* _STL::__copy_backward(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct PrefDisplayModeType* arg3, struct _STL::random_access_iterator_tag const* arg4, int32_t* arg5)

004394e0  {
004394e0      struct PrefDisplayModeType* ecx = arg2;
004394ed      int32_t i_2 = (((char*)ecx - arg1) >> 4);
004394ed      
004394f2      if (i_2 <= 0)
0043952c          return arg3;
0043952c      
004394f5      int32_t i_1 = i_2;
004394f7      struct PrefDisplayModeType* eax_2 = arg3;
00439521      int32_t i;
00439521      
00439521      do
00439521      {
00439500          ecx -= 0x10;
00439503          eax_2 -= 0x10;
00439506          i = i_1;
00439506          i_1 -= 1;
0043950d          eax_2->nWidth = ecx->nWidth;
00439512          eax_2->nHeight = ecx->nHeight;
00439518          eax_2->nSize = ecx->nSize;
0043951e          eax_2->nModeDesc = ecx->nModeDesc;
00439521      } while (i != 1);
00439526      return eax_2;
004394e0  }

0043952d                                         90 90 90                                                               ...

00439530  uint8_t ConsoleCommand_QuitCommand()

00439530  {
00439532      Device::m_bIsDone = 1;
00439537      return 1;
00439530  }

00439538                                                                          90 90 90 90 90 90 90 90                          ........

00439540  void* __thiscall Device::DeviceDialogBoxGateway::`scalar deleting destructor'(class Device::DeviceDialogBoxGateway* this, uint32_t arg2)

00439540  {
00439543      DialogBoxGateway::~DialogBoxGateway(this);
00439543      
0043954d      if ((arg2 & 1) != 0)
00439550          operator delete(this);
00439550      
0043955b      return this;
00439540  }

0043955e                                                                                            90 90                                ..

00439560  int32_t __stdcall Device::WndProc(struct HWND__* arg1, uint32_t arg2, uint32_t arg3, int32_t arg4)

00439560  {
00439566      LRESULT ebp = nullptr;
00439569      uint8_t var_16 = 1;
0043956e      char var_15 = 0;
00439573      int32_t var_14 = 0;
00439577      int32_t RenderDevice::render_device_1;
00439577      struct HWND__* ecx;
00439577      RenderDevice::render_device_1 = KeyStone::IsHelpFocused();
0043957e      int32_t lParam = arg4;
0043957e      
0043958a      if (RenderDevice::render_device_1 == 0)
0043958a      {
0043958c          ecx = arg1;
00439594          char* var_2c_1 = &var_15;
00439595          int32_t lParam_1 = lParam;
00439596          uint32_t var_34_1 = arg3;
00439597          uint32_t var_38_1 = arg2;
00439598          struct HWND__* var_3c_1 = ecx;
00439599          Client::You_Must_Not_Have_Multiple_Implementations_Of_AddRef_In_A_Hierarchy(ecx);
004395a1          var_14 = 0;
0043958a      }
0043958a      
004395ab      if (arg2 > 0x200)
004395ab      {
00439729          if ((arg2 - 0x201) > 0xa2)
00439729              goto label_4396b5;
00439729          
004395ba          uint32_t ecx_3;
004395ba          
004395ba          switch (arg2)
004395ba          {
004397ba              case 0x201:
004397ba              case 0x204:
004397ba              case 0x207:
004397ba              case 0x20b:
004397ba              {
004397ba                  SetFocus(Device::m_hWnd);
004397c0              label_4397c0:
004397c0                  RenderDevice::render_device_1 = Device::m_bTrackLeaveCalled;
004397c0                  
004397c7                  if (RenderDevice::render_device_1 == 0)
004397c7                  {
004397c9                      struct HWND__* Device::m_hWnd_1 = Device::m_hWnd;
004397d4                      Device::m_bTrackLeaveCalled = 1;
004397db                      int32_t lpEventTrack = 0x10;
004397e3                      int32_t var_c_1 = 2;
004397eb                      struct HWND__* Device::m_hWnd_2 = Device::m_hWnd_1;
004397ef                      _TrackMouseEvent(&lpEventTrack);
004397c7                  }
004397c7                  
004397c7                  goto label_4397fa;
004397ba              }
00439732              case 0x202:
00439732              case 0x203:
00439732              case 0x205:
00439732              case 0x206:
00439732              case 0x208:
00439732              case 0x209:
00439732              case 0x20a:
00439732              case 0x20c:
00439732              case 0x20d:
00439732              {
00439732                  goto label_4397c0;
00439732              }
00439732              case 0x20e:
00439732              case 0x20f:
00439732              case 0x210:
00439732              case 0x211:
00439732              case 0x212:
00439732              case 0x213:
00439732              case 0x214:
00439732              case 0x215:
00439732              case 0x216:
00439732              case 0x217:
00439732              case 0x21a:
00439732              case 0x21b:
00439732              case 0x21c:
00439732              case 0x21d:
00439732              case 0x21e:
00439732              case 0x21f:
00439732              case 0x220:
00439732              case 0x221:
00439732              case 0x222:
00439732              case 0x223:
00439732              case 0x224:
00439732              case 0x225:
00439732              case 0x226:
00439732              case 0x227:
00439732              case 0x228:
00439732              case 0x229:
00439732              case 0x22a:
00439732              case 0x22b:
00439732              case 0x22c:
00439732              case 0x22d:
00439732              case 0x22e:
00439732              case 0x22f:
00439732              case 0x230:
00439732              case 0x233:
00439732              case 0x234:
00439732              case 0x235:
00439732              case 0x236:
00439732              case 0x237:
00439732              case 0x238:
00439732              case 0x239:
00439732              case 0x23a:
00439732              case 0x23b:
00439732              case 0x23c:
00439732              case 0x23d:
00439732              case 0x23e:
00439732              case 0x23f:
00439732              case 0x240:
00439732              case 0x241:
00439732              case 0x242:
00439732              case 0x243:
00439732              case 0x244:
00439732              case 0x245:
00439732              case 0x246:
00439732              case 0x247:
00439732              case 0x248:
00439732              case 0x249:
00439732              case 0x24a:
00439732              case 0x24b:
00439732              case 0x24c:
00439732              case 0x24d:
00439732              case 0x24e:
00439732              case 0x24f:
00439732              case 0x250:
00439732              case 0x251:
00439732              case 0x252:
00439732              case 0x253:
00439732              case 0x254:
00439732              case 0x255:
00439732              case 0x256:
00439732              case 0x257:
00439732              case 0x258:
00439732              case 0x259:
00439732              case 0x25a:
00439732              case 0x25b:
00439732              case 0x25c:
00439732              case 0x25d:
00439732              case 0x25e:
00439732              case 0x25f:
00439732              case 0x260:
00439732              case 0x261:
00439732              case 0x262:
00439732              case 0x263:
00439732              case 0x264:
00439732              case 0x265:
00439732              case 0x266:
00439732              case 0x267:
00439732              case 0x268:
00439732              case 0x269:
00439732              case 0x26a:
00439732              case 0x26b:
00439732              case 0x26c:
00439732              case 0x26d:
00439732              case 0x26e:
00439732              case 0x26f:
00439732              case 0x270:
00439732              case 0x271:
00439732              case 0x272:
00439732              case 0x273:
00439732              case 0x274:
00439732              case 0x275:
00439732              case 0x276:
00439732              case 0x277:
00439732              case 0x278:
00439732              case 0x279:
00439732              case 0x27a:
00439732              case 0x27b:
00439732              case 0x27c:
00439732              case 0x27d:
00439732              case 0x27e:
00439732              case 0x27f:
00439732              case 0x280:
00439732              case 0x285:
00439732              case 0x286:
00439732              case 0x287:
00439732              case 0x288:
00439732              case 0x289:
00439732              case 0x28a:
00439732              case 0x28b:
00439732              case 0x28c:
00439732              case 0x28d:
00439732              case 0x28e:
00439732              case 0x28f:
00439732              case 0x290:
00439732              case 0x291:
00439732              case 0x292:
00439732              case 0x293:
00439732              case 0x294:
00439732              case 0x295:
00439732              case 0x296:
00439732              case 0x297:
00439732              case 0x298:
00439732              case 0x299:
00439732              case 0x29a:
00439732              case 0x29b:
00439732              case 0x29c:
00439732              case 0x29d:
00439732              case 0x29e:
00439732              case 0x29f:
00439732              case 0x2a0:
00439732              case 0x2a1:
00439732              case 0x2a2:
00439732              {
00439732                  goto label_4396b5;
00439732              }
00439777              case 0x218:
00439777              {
00439777                  if (arg3 != 0)
00439777                      goto label_4396b5;
00439777                  
0043977d                  ebp = 0x424d5144;
00439782                  goto label_4396ba;
00439777              }
00439732              case 0x219:
00439732              {
00439732                  goto label_439817;
00439732              }
00439739              case 0x231:
00439739              {
00439739                  RenderDevice::render_device_1 = RenderDevice::render_device;
00439739                  
00439740                  if (RenderDevice::render_device_1 == 0)
00439740                  {
0043974d                  label_43974d:
0043974d                      Device::Deactivate();
00439752                      goto label_4396ba;
00439740                  }
00439740                  
00439742                  ecx_3 = *(uint8_t*)(RenderDevice::render_device_1 + 0x10);
00439742                  
00439747                  if (ecx_3 != 0)
00439747                      goto label_4396ba;
00439747                  
00439747                  goto label_43974d;
00439739              }
00439757              case 0x232:
00439757              {
00439757                  RenderDevice::render_device_1 = RenderDevice::render_device;
00439757                  
0043975e                  if (RenderDevice::render_device_1 != 0)
00439760                      ecx_3 = *(uint8_t*)(RenderDevice::render_device_1 + 0x10);
00439760                  
00439765                  if ((RenderDevice::render_device_1 == 0 || ecx_3 == 0))
0043976b                      Device::Activate();
0043976b                  
00439765                  goto label_4396ba;
00439757              }
00439787              case 0x281:
00439787              case 0x282:
00439787              case 0x283:
00439787              case 0x284:
00439787              {
00439787              label_439787:
00439787                  RenderDevice::render_device_1 = var_15;
00439787                  
0043978d                  if (RenderDevice::render_device_1 == 0)
0043978d                  {
0043979b                      KeyStone::DispatchMessageA(arg2, arg3, lParam, &arg4);
0043979b                      
004397a9                      if (arg4 != 0)
004397a9                          goto label_4396ba;
004397a9                      
004397a9                      goto label_4396b5;
0043978d                  }
00439787                  break;
00439787              }
0043982b              case 0x2a3:
0043982b              {
0043982b                  Device::m_bTrackLeaveCalled = 0;
0043983a                  ebp = Device::ForwardToInputManager(arg1, arg2, arg3, lParam, &var_16);
0043983c                  goto label_4396ba;
0043982b              }
004395ba          }
004395ab      }
004395ab      else
004395ab      {
004395b1          if (arg2 == 0x200)
004395b1              goto label_4397c0;
004395b1          
004395ba          if (arg2 > 0x1f)
004395ba          {
0043968b              if ((arg2 - 0x51) > 0xc1)
0043968b                  goto label_4396b5;
0043968b              
004395ba              bool cond:4_1;
004395ba              
004395ba              switch (arg2)
004395ba              {
00439694                  case 0x51:
00439694                  case 0x10d:
00439694                  case 0x10e:
00439694                  case 0x10f:
00439694                  {
00439694                      goto label_439787;
00439694                  }
00439694                  case 0x52:
00439694                  case 0x53:
00439694                  case 0x54:
00439694                  case 0x55:
00439694                  case 0x56:
00439694                  case 0x57:
00439694                  case 0x58:
00439694                  case 0x59:
00439694                  case 0x5a:
00439694                  case 0x5b:
00439694                  case 0x5c:
00439694                  case 0x5d:
00439694                  case 0x5e:
00439694                  case 0x5f:
00439694                  case 0x60:
00439694                  case 0x61:
00439694                  case 0x62:
00439694                  case 0x63:
00439694                  case 0x64:
00439694                  case 0x65:
00439694                  case 0x66:
00439694                  case 0x67:
00439694                  case 0x68:
00439694                  case 0x69:
00439694                  case 0x6a:
00439694                  case 0x6b:
00439694                  case 0x6c:
00439694                  case 0x6d:
00439694                  case 0x6e:
00439694                  case 0x6f:
00439694                  case 0x70:
00439694                  case 0x71:
00439694                  case 0x72:
00439694                  case 0x73:
00439694                  case 0x74:
00439694                  case 0x75:
00439694                  case 0x76:
00439694                  case 0x77:
00439694                  case 0x78:
00439694                  case 0x79:
00439694                  case 0x7a:
00439694                  case 0x7b:
00439694                  case 0x7c:
00439694                  case 0x7d:
00439694                  case 0x7e:
00439694                  case 0x7f:
00439694                  case 0x80:
00439694                  case 0x81:
00439694                  case 0x82:
00439694                  case 0x83:
00439694                  case 0x84:
00439694                  case 0x85:
00439694                  case 0x86:
00439694                  case 0x87:
00439694                  case 0x88:
00439694                  case 0x89:
00439694                  case 0x8a:
00439694                  case 0x8b:
00439694                  case 0x8c:
00439694                  case 0x8d:
00439694                  case 0x8e:
00439694                  case 0x8f:
00439694                  case 0x90:
00439694                  case 0x91:
00439694                  case 0x92:
00439694                  case 0x93:
00439694                  case 0x94:
00439694                  case 0x95:
00439694                  case 0x96:
00439694                  case 0x97:
00439694                  case 0x98:
00439694                  case 0x99:
00439694                  case 0x9a:
00439694                  case 0x9b:
00439694                  case 0x9c:
00439694                  case 0x9d:
00439694                  case 0x9e:
00439694                  case 0x9f:
00439694                  case 0xa0:
00439694                  case 0xa1:
00439694                  case 0xa2:
00439694                  case 0xa3:
00439694                  case 0xa4:
00439694                  case 0xa5:
00439694                  case 0xa6:
00439694                  case 0xa7:
00439694                  case 0xa8:
00439694                  case 0xa9:
00439694                  case 0xaa:
00439694                  case 0xab:
00439694                  case 0xac:
00439694                  case 0xad:
00439694                  case 0xae:
00439694                  case 0xaf:
00439694                  case 0xb0:
00439694                  case 0xb1:
00439694                  case 0xb2:
00439694                  case 0xb3:
00439694                  case 0xb4:
00439694                  case 0xb5:
00439694                  case 0xb6:
00439694                  case 0xb7:
00439694                  case 0xb8:
00439694                  case 0xb9:
00439694                  case 0xba:
00439694                  case 0xbb:
00439694                  case 0xbc:
00439694                  case 0xbd:
00439694                  case 0xbe:
00439694                  case 0xbf:
00439694                  case 0xc0:
00439694                  case 0xc1:
00439694                  case 0xc2:
00439694                  case 0xc3:
00439694                  case 0xc4:
00439694                  case 0xc5:
00439694                  case 0xc6:
00439694                  case 0xc7:
00439694                  case 0xc8:
00439694                  case 0xc9:
00439694                  case 0xca:
00439694                  case 0xcb:
00439694                  case 0xcc:
00439694                  case 0xcd:
00439694                  case 0xce:
00439694                  case 0xcf:
00439694                  case 0xd0:
00439694                  case 0xd1:
00439694                  case 0xd2:
00439694                  case 0xd3:
00439694                  case 0xd4:
00439694                  case 0xd5:
00439694                  case 0xd6:
00439694                  case 0xd7:
00439694                  case 0xd8:
00439694                  case 0xd9:
00439694                  case 0xda:
00439694                  case 0xdb:
00439694                  case 0xdc:
00439694                  case 0xdd:
00439694                  case 0xde:
00439694                  case 0xdf:
00439694                  case 0xe0:
00439694                  case 0xe1:
00439694                  case 0xe2:
00439694                  case 0xe3:
00439694                  case 0xe4:
00439694                  case 0xe5:
00439694                  case 0xe6:
00439694                  case 0xe7:
00439694                  case 0xe8:
00439694                  case 0xe9:
00439694                  case 0xea:
00439694                  case 0xeb:
00439694                  case 0xec:
00439694                  case 0xed:
00439694                  case 0xee:
00439694                  case 0xef:
00439694                  case 0xf0:
00439694                  case 0xf1:
00439694                  case 0xf2:
00439694                  case 0xf3:
00439694                  case 0xf4:
00439694                  case 0xf5:
00439694                  case 0xf6:
00439694                  case 0xf7:
00439694                  case 0xf8:
00439694                  case 0xf9:
00439694                  case 0xfa:
00439694                  case 0xfb:
00439694                  case 0xfc:
00439694                  case 0xfd:
00439694                  case 0xfe:
00439694                  case 0xff:
00439694                  case 0x103:
00439694                  case 0x107:
00439694                  case 0x108:
00439694                  case 0x109:
00439694                  case 0x10a:
00439694                  case 0x10b:
00439694                  case 0x10c:
00439694                  case 0x110:
00439694                  case 0x111:
00439694                  {
00439694                      goto label_4396b5;
00439694                  }
004397fa                  case 0x100:
004397fa                  case 0x101:
004397fa                  case 0x102:
004397fa                  {
004397fa                  label_4397fa:
004397fa                      KeyStone::DispatchMessageA(arg2, arg3, lParam, nullptr);
00439817                  label_439817:
00439817                      ebp = Device::ForwardToInputManager(arg1, arg2, arg3, lParam, &var_16);
00439819                      goto label_4396ba;
004397fa                  }
004396ec                  case 0x104:
004396ec                  {
004396ec                      ebp = Device::ForwardToInputManager(arg1, arg2, arg3, lParam, &var_16);
004396ec                      
004396ee                      if (arg3 == 0x73)
004396ee                          goto label_4396b5;
004396ee                      
004396f3                      if (arg3 != 0xd)
004396f3                          goto label_439715;
004396f3                      
004396f5                      Device::m_bToggleFullScreenMode = 1;
004396b5                  label_4396b5:
004396b5                      var_16 = 0;
004396ba                  label_4396ba:
004396ba                      RenderDevice::render_device_1 = var_15;
004396ba                      
004396c0                      if (RenderDevice::render_device_1 == 0)
004396c0                      {
00439841                          RenderDevice::render_device_1 = var_16;
00439841                          
00439847                          if (RenderDevice::render_device_1 != 0)
00439862                              return ebp;
00439862                          
00439857                          return DefWindowProcA(arg1, arg2, arg3, lParam);
004396c0                      }
004396ec                      break;
004396ec                  }
00439713                  case 0x105:
00439713                  {
00439713                      ebp = Device::ForwardToInputManager(arg1, arg2, arg3, lParam, &var_16);
00439715                  label_439715:
00439715                      RenderDevice::render_device_1 = Device::m_bSysKeysEnabled;
0043971a                      cond:4_1 = RenderDevice::render_device_1 == 0;
004396b3                  label_4396b3:
004396b3                      
004396b3                      if (cond:4_1)
004396b3                          goto label_4396ba;
004396b3                      
004396b3                      goto label_4396b5;
00439713                  }
00439694                  case 0x106:
00439694                  {
00439694                      goto label_439817;
00439694                  }
0043969d                  case 0x112:
0043969d                  {
0043969d                      int32_t eax_4 = (arg3 & 0xfff0);
0043969d                      
004396a7                      if (eax_4 == 0xf060)
004396a7                      {
0043967a                      label_43967a:
0043967a                          Device::m_bIsDone = 1;
00439681                          goto label_4396ba;
004396a7                      }
004396a7                      
004396ae                      if (eax_4 == 0xf140)
004396ae                          goto label_4396ba;
004396ae                      
004396b0                      cond:4_1 = eax_4 == 0xf170;
004396b0                      goto label_4396b3;
0043969d                  }
004395ba              }
004395ba          }
004395ba          else
004395ba          {
004395c0              if (arg2 == 0x1f)
004395c0                  goto label_439817;
004395c0              
004395cc              if ((arg2 - 2) > 0x1a)
004395cc                  goto label_4396b5;
004395cc              
004395ba              switch (arg2)
004395ba              {
004395d9                  case 2:
004395d9                  case 0x10:
004395d9                  {
004395d9                      goto label_43967a;
004395d9                  }
004395d9                  case 3:
004395d9                  case 4:
004395d9                  case 9:
004395d9                  case 0xa:
004395d9                  case 0xb:
004395d9                  case 0xc:
004395d9                  case 0xd:
004395d9                  case 0xe:
004395d9                  case 0xf:
004395d9                  case 0x11:
004395d9                  case 0x12:
004395d9                  case 0x13:
004395d9                  case 0x15:
004395d9                  case 0x16:
004395d9                  case 0x17:
004395d9                  case 0x18:
004395d9                  case 0x19:
004395d9                  case 0x1a:
004395d9                  case 0x1b:
004395d9                  {
004395d9                      goto label_4396b5;
004395d9                  }
00439651                  case 5:
00439651                  {
00439651                      if (arg3 == 1)
00439651                      {
00439653                          Device::m_bIsMinimized = 1;
0043965a                          Device::Deactivate();
00439651                      }
00439651                      
00439651                      goto label_4396ba;
00439651                  }
004395e7                  case 6:
004395e7                  {
004395e7                      RenderDevice::render_device_1 = ((uint32_t)arg3);
004395ea                      ecx = (arg3 >> 0x10) != 0;
004395ef                      Device::m_bIsMinimized = ecx;
004395ef                      
004395f5                      if (RenderDevice::render_device_1 == 0)
004395f5                          goto label_43974d;
004395f5                      
0043960c                      if ((RenderDevice::render_device_1 > 0 && (RenderDevice::render_device_1 <= 2 && ecx == 0)))
00439612                          Device::Activate();
00439612                      
0043960c                      goto label_4396ba;
004395e7                  }
004395d9                  case 7:
004395d9                  case 8:
004395d9                  {
004395d9                      goto label_439817;
004395d9                  }
00439661                  case 0x14:
00439661                  {
00439661                      RenderDevice::render_device_1 = Device::m_bIsReady;
00439661                      
00439668                      if (RenderDevice::render_device_1 == 0)
00439668                          goto label_4396b5;
00439668                      
0043966a                      RenderDevice::render_device_1 = Device::m_bIsActiveApp;
0043966a                      
00439671                      if (RenderDevice::render_device_1 == 0)
00439671                          goto label_4396b5;
00439671                      
00439673                      ebp = 1;
00439678                      goto label_4396ba;
00439661                  }
0043961c                  case 0x1c:
0043961c                  {
00439623                      if (DiskConBase::Close(ecx) != 0)
00439623                      {
0043962a                          class IDClass<_tagDataID,32,0>* ecx_1;
0043962a                          ecx_1 = arg3 == 0;
0043962d                          class IDClass<_tagDataID,32,0>* var_2c_2 = ecx_1;
0043962e                          IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx_1);
00439623                      }
00439623                      
00439638                      if (arg3 == 0)
00439638                          goto label_43974d;
00439638                      
0043963e                      RenderDevice::render_device_1 = Device::m_bIsMinimized;
0043963e                      
00439645                      if (RenderDevice::render_device_1 == 0)
00439647                          Device::Activate();
00439647                      
00439645                      goto label_4396ba;
0043961c                  }
004395ba              }
004395ba          }
004395ab      }
004395ab      
004396d1      return var_14;
00439560  }

00439865                 8d 49 00                                                                               .I.
00439868  uint32_t jump_table_439868[0x7] = 
00439868  {
00439868      [0x0] =  0x0043967a
0043986c      [0x1] =  0x0043964e
00439870      [0x2] =  0x004395e0
00439874      [0x3] =  0x00439802
00439878      [0x4] =  0x00439661
0043987c      [0x5] =  0x0043961c
00439880      [0x6] =  0x004396b5
00439884  }
00439884  uint8_t lookup_table_439884[0x1b] = 
00439884  {
00439884      [0x00] =  0x00
00439885      [0x01] =  0x06
00439886      [0x02] =  0x06
00439887      [0x03] =  0x01
00439888      [0x04] =  0x02
00439889      [0x05] =  0x03
0043988a      [0x06] =  0x03
0043988b      [0x07] =  0x06
0043988c      [0x08] =  0x06
0043988d      [0x09] =  0x06
0043988e      [0x0a] =  0x06
0043988f      [0x0b] =  0x06
00439890      [0x0c] =  0x06
00439891      [0x0d] =  0x06
00439892      [0x0e] =  0x00
00439893      [0x0f] =  0x06
00439894      [0x10] =  0x06
00439895      [0x11] =  0x06
00439896      [0x12] =  0x04
00439897      [0x13] =  0x06
00439898      [0x14] =  0x06
00439899      [0x15] =  0x06
0043989a      [0x16] =  0x06
0043989b      [0x17] =  0x06
0043989c      [0x18] =  0x06
0043989d      [0x19] =  0x06
0043989e      [0x1a] =  0x05
0043989f  }

0043989f                                                                                               90                                 .
004398a0  uint32_t jump_table_4398a0[0x7] = 
004398a0  {
004398a0      [0x0] =  0x00439787
004398a4      [0x1] =  0x004397f5
004398a8      [0x2] =  0x004396d4
004398ac      [0x3] =  0x004396fe
004398b0      [0x4] =  0x00439802
004398b4      [0x5] =  0x0043969b
004398b8      [0x6] =  0x004396b5
004398bc  }
004398bc  uint8_t lookup_table_4398bc[0xc2] = 
004398bc  {
004398bc      [0x00] =  0x00
004398bd      [0x01] =  0x06
004398be      [0x02] =  0x06
004398bf      [0x03] =  0x06
004398c0      [0x04] =  0x06
004398c1      [0x05] =  0x06
004398c2      [0x06] =  0x06
004398c3      [0x07] =  0x06
004398c4      [0x08] =  0x06
004398c5      [0x09] =  0x06
004398c6      [0x0a] =  0x06
004398c7      [0x0b] =  0x06
004398c8      [0x0c] =  0x06
004398c9      [0x0d] =  0x06
004398ca      [0x0e] =  0x06
004398cb      [0x0f] =  0x06
004398cc      [0x10] =  0x06
004398cd      [0x11] =  0x06
004398ce      [0x12] =  0x06
004398cf      [0x13] =  0x06
004398d0      [0x14] =  0x06
004398d1      [0x15] =  0x06
004398d2      [0x16] =  0x06
004398d3      [0x17] =  0x06
004398d4      [0x18] =  0x06
004398d5      [0x19] =  0x06
004398d6      [0x1a] =  0x06
004398d7      [0x1b] =  0x06
004398d8      [0x1c] =  0x06
004398d9      [0x1d] =  0x06
004398da      [0x1e] =  0x06
004398db      [0x1f] =  0x06
004398dc      [0x20] =  0x06
004398dd      [0x21] =  0x06
004398de      [0x22] =  0x06
004398df      [0x23] =  0x06
004398e0      [0x24] =  0x06
004398e1      [0x25] =  0x06
004398e2      [0x26] =  0x06
004398e3      [0x27] =  0x06
004398e4      [0x28] =  0x06
004398e5      [0x29] =  0x06
004398e6      [0x2a] =  0x06
004398e7      [0x2b] =  0x06
004398e8      [0x2c] =  0x06
004398e9      [0x2d] =  0x06
004398ea      [0x2e] =  0x06
004398eb      [0x2f] =  0x06
004398ec      [0x30] =  0x06
004398ed      [0x31] =  0x06
004398ee      [0x32] =  0x06
004398ef      [0x33] =  0x06
004398f0      [0x34] =  0x06
004398f1      [0x35] =  0x06
004398f2      [0x36] =  0x06
004398f3      [0x37] =  0x06
004398f4      [0x38] =  0x06
004398f5      [0x39] =  0x06
004398f6      [0x3a] =  0x06
004398f7      [0x3b] =  0x06
004398f8      [0x3c] =  0x06
004398f9      [0x3d] =  0x06
004398fa      [0x3e] =  0x06
004398fb      [0x3f] =  0x06
004398fc      [0x40] =  0x06
004398fd      [0x41] =  0x06
004398fe      [0x42] =  0x06
004398ff      [0x43] =  0x06
00439900      [0x44] =  0x06
00439901      [0x45] =  0x06
00439902      [0x46] =  0x06
00439903      [0x47] =  0x06
00439904      [0x48] =  0x06
00439905      [0x49] =  0x06
00439906      [0x4a] =  0x06
00439907      [0x4b] =  0x06
00439908      [0x4c] =  0x06
00439909      [0x4d] =  0x06
0043990a      [0x4e] =  0x06
0043990b      [0x4f] =  0x06
0043990c      [0x50] =  0x06
0043990d      [0x51] =  0x06
0043990e      [0x52] =  0x06
0043990f      [0x53] =  0x06
00439910      [0x54] =  0x06
00439911      [0x55] =  0x06
00439912      [0x56] =  0x06
00439913      [0x57] =  0x06
00439914      [0x58] =  0x06
00439915      [0x59] =  0x06
00439916      [0x5a] =  0x06
00439917      [0x5b] =  0x06
00439918      [0x5c] =  0x06
00439919      [0x5d] =  0x06
0043991a      [0x5e] =  0x06
0043991b      [0x5f] =  0x06
0043991c      [0x60] =  0x06
0043991d      [0x61] =  0x06
0043991e      [0x62] =  0x06
0043991f      [0x63] =  0x06
00439920      [0x64] =  0x06
00439921      [0x65] =  0x06
00439922      [0x66] =  0x06
00439923      [0x67] =  0x06
00439924      [0x68] =  0x06
00439925      [0x69] =  0x06
00439926      [0x6a] =  0x06
00439927      [0x6b] =  0x06
00439928      [0x6c] =  0x06
00439929      [0x6d] =  0x06
0043992a      [0x6e] =  0x06
0043992b      [0x6f] =  0x06
0043992c      [0x70] =  0x06
0043992d      [0x71] =  0x06
0043992e      [0x72] =  0x06
0043992f      [0x73] =  0x06
00439930      [0x74] =  0x06
00439931      [0x75] =  0x06
00439932      [0x76] =  0x06
00439933      [0x77] =  0x06
00439934      [0x78] =  0x06
00439935      [0x79] =  0x06
00439936      [0x7a] =  0x06
00439937      [0x7b] =  0x06
00439938      [0x7c] =  0x06
00439939      [0x7d] =  0x06
0043993a      [0x7e] =  0x06
0043993b      [0x7f] =  0x06
0043993c      [0x80] =  0x06
0043993d      [0x81] =  0x06
0043993e      [0x82] =  0x06
0043993f      [0x83] =  0x06
00439940      [0x84] =  0x06
00439941      [0x85] =  0x06
00439942      [0x86] =  0x06
00439943      [0x87] =  0x06
00439944      [0x88] =  0x06
00439945      [0x89] =  0x06
00439946      [0x8a] =  0x06
00439947      [0x8b] =  0x06
00439948      [0x8c] =  0x06
00439949      [0x8d] =  0x06
0043994a      [0x8e] =  0x06
0043994b      [0x8f] =  0x06
0043994c      [0x90] =  0x06
0043994d      [0x91] =  0x06
0043994e      [0x92] =  0x06
0043994f      [0x93] =  0x06
00439950      [0x94] =  0x06
00439951      [0x95] =  0x06
00439952      [0x96] =  0x06
00439953      [0x97] =  0x06
00439954      [0x98] =  0x06
00439955      [0x99] =  0x06
00439956      [0x9a] =  0x06
00439957      [0x9b] =  0x06
00439958      [0x9c] =  0x06
00439959      [0x9d] =  0x06
0043995a      [0x9e] =  0x06
0043995b      [0x9f] =  0x06
0043995c      [0xa0] =  0x06
0043995d      [0xa1] =  0x06
0043995e      [0xa2] =  0x06
0043995f      [0xa3] =  0x06
00439960      [0xa4] =  0x06
00439961      [0xa5] =  0x06
00439962      [0xa6] =  0x06
00439963      [0xa7] =  0x06
00439964      [0xa8] =  0x06
00439965      [0xa9] =  0x06
00439966      [0xaa] =  0x06
00439967      [0xab] =  0x06
00439968      [0xac] =  0x06
00439969      [0xad] =  0x06
0043996a      [0xae] =  0x06
0043996b      [0xaf] =  0x01
0043996c      [0xb0] =  0x01
0043996d      [0xb1] =  0x01
0043996e      [0xb2] =  0x06
0043996f      [0xb3] =  0x02
00439970      [0xb4] =  0x03
00439971      [0xb5] =  0x04
00439972      [0xb6] =  0x06
00439973      [0xb7] =  0x06
00439974      [0xb8] =  0x06
00439975      [0xb9] =  0x06
00439976      [0xba] =  0x06
00439977      [0xbb] =  0x06
00439978      [0xbc] =  0x00
00439979      [0xbd] =  0x00
0043997a      [0xbe] =  0x00
0043997b      [0xbf] =  0x06
0043997c      [0xc0] =  0x06
0043997d      [0xc1] =  0x05
0043997e  }

0043997e                                                                                            8b ff                                ..
00439980  uint32_t jump_table_439980[0x9] = 
00439980  {
00439980      [0x0] =  0x004397b4
00439984      [0x1] =  0x004397c0
00439988      [0x2] =  0x00439775
0043998c      [0x3] =  0x00439802
00439990      [0x4] =  0x00439739
00439994      [0x5] =  0x00439757
00439998      [0x6] =  0x00439787
0043999c      [0x7] =  0x0043981e
004399a0      [0x8] =  0x004396b5
004399a4  }
004399a4  uint8_t lookup_table_4399a4[0xa3] = 
004399a4  {
004399a4      [0x00] =  0x00
004399a5      [0x01] =  0x01
004399a6      [0x02] =  0x01
004399a7      [0x03] =  0x00
004399a8      [0x04] =  0x01
004399a9      [0x05] =  0x01
004399aa      [0x06] =  0x00
004399ab      [0x07] =  0x01
004399ac      [0x08] =  0x01
004399ad      [0x09] =  0x01
004399ae      [0x0a] =  0x00
004399af      [0x0b] =  0x01
004399b0      [0x0c] =  0x01
004399b1      [0x0d] =  0x08
004399b2      [0x0e] =  0x08
004399b3      [0x0f] =  0x08
004399b4      [0x10] =  0x08
004399b5      [0x11] =  0x08
004399b6      [0x12] =  0x08
004399b7      [0x13] =  0x08
004399b8      [0x14] =  0x08
004399b9      [0x15] =  0x08
004399ba      [0x16] =  0x08
004399bb      [0x17] =  0x02
004399bc      [0x18] =  0x03
004399bd      [0x19] =  0x08
004399be      [0x1a] =  0x08
004399bf      [0x1b] =  0x08
004399c0      [0x1c] =  0x08
004399c1      [0x1d] =  0x08
004399c2      [0x1e] =  0x08
004399c3      [0x1f] =  0x08
004399c4      [0x20] =  0x08
004399c5      [0x21] =  0x08
004399c6      [0x22] =  0x08
004399c7      [0x23] =  0x08
004399c8      [0x24] =  0x08
004399c9      [0x25] =  0x08
004399ca      [0x26] =  0x08
004399cb      [0x27] =  0x08
004399cc      [0x28] =  0x08
004399cd      [0x29] =  0x08
004399ce      [0x2a] =  0x08
004399cf      [0x2b] =  0x08
004399d0      [0x2c] =  0x08
004399d1      [0x2d] =  0x08
004399d2      [0x2e] =  0x08
004399d3      [0x2f] =  0x08
004399d4      [0x30] =  0x04
004399d5      [0x31] =  0x05
004399d6      [0x32] =  0x08
004399d7      [0x33] =  0x08
004399d8      [0x34] =  0x08
004399d9      [0x35] =  0x08
004399da      [0x36] =  0x08
004399db      [0x37] =  0x08
004399dc      [0x38] =  0x08
004399dd      [0x39] =  0x08
004399de      [0x3a] =  0x08
004399df      [0x3b] =  0x08
004399e0      [0x3c] =  0x08
004399e1      [0x3d] =  0x08
004399e2      [0x3e] =  0x08
004399e3      [0x3f] =  0x08
004399e4      [0x40] =  0x08
004399e5      [0x41] =  0x08
004399e6      [0x42] =  0x08
004399e7      [0x43] =  0x08
004399e8      [0x44] =  0x08
004399e9      [0x45] =  0x08
004399ea      [0x46] =  0x08
004399eb      [0x47] =  0x08
004399ec      [0x48] =  0x08
004399ed      [0x49] =  0x08
004399ee      [0x4a] =  0x08
004399ef      [0x4b] =  0x08
004399f0      [0x4c] =  0x08
004399f1      [0x4d] =  0x08
004399f2      [0x4e] =  0x08
004399f3      [0x4f] =  0x08
004399f4      [0x50] =  0x08
004399f5      [0x51] =  0x08
004399f6      [0x52] =  0x08
004399f7      [0x53] =  0x08
004399f8      [0x54] =  0x08
004399f9      [0x55] =  0x08
004399fa      [0x56] =  0x08
004399fb      [0x57] =  0x08
004399fc      [0x58] =  0x08
004399fd      [0x59] =  0x08
004399fe      [0x5a] =  0x08
004399ff      [0x5b] =  0x08
00439a00      [0x5c] =  0x08
00439a01      [0x5d] =  0x08
00439a02      [0x5e] =  0x08
00439a03      [0x5f] =  0x08
00439a04      [0x60] =  0x08
00439a05      [0x61] =  0x08
00439a06      [0x62] =  0x08
00439a07      [0x63] =  0x08
00439a08      [0x64] =  0x08
00439a09      [0x65] =  0x08
00439a0a      [0x66] =  0x08
00439a0b      [0x67] =  0x08
00439a0c      [0x68] =  0x08
00439a0d      [0x69] =  0x08
00439a0e      [0x6a] =  0x08
00439a0f      [0x6b] =  0x08
00439a10      [0x6c] =  0x08
00439a11      [0x6d] =  0x08
00439a12      [0x6e] =  0x08
00439a13      [0x6f] =  0x08
00439a14      [0x70] =  0x08
00439a15      [0x71] =  0x08
00439a16      [0x72] =  0x08
00439a17      [0x73] =  0x08
00439a18      [0x74] =  0x08
00439a19      [0x75] =  0x08
00439a1a      [0x76] =  0x08
00439a1b      [0x77] =  0x08
00439a1c      [0x78] =  0x08
00439a1d      [0x79] =  0x08
00439a1e      [0x7a] =  0x08
00439a1f      [0x7b] =  0x08
00439a20      [0x7c] =  0x08
00439a21      [0x7d] =  0x08
00439a22      [0x7e] =  0x08
00439a23      [0x7f] =  0x08
00439a24      [0x80] =  0x06
00439a25      [0x81] =  0x06
00439a26      [0x82] =  0x06
00439a27      [0x83] =  0x06
00439a28      [0x84] =  0x08
00439a29      [0x85] =  0x08
00439a2a      [0x86] =  0x08
00439a2b      [0x87] =  0x08
00439a2c      [0x88] =  0x08
00439a2d      [0x89] =  0x08
00439a2e      [0x8a] =  0x08
00439a2f      [0x8b] =  0x08
00439a30      [0x8c] =  0x08
00439a31      [0x8d] =  0x08
00439a32      [0x8e] =  0x08
00439a33      [0x8f] =  0x08
00439a34      [0x90] =  0x08
00439a35      [0x91] =  0x08
00439a36      [0x92] =  0x08
00439a37      [0x93] =  0x08
00439a38      [0x94] =  0x08
00439a39      [0x95] =  0x08
00439a3a      [0x96] =  0x08
00439a3b      [0x97] =  0x08
00439a3c      [0x98] =  0x08
00439a3d      [0x99] =  0x08
00439a3e      [0x9a] =  0x08
00439a3f      [0x9b] =  0x08
00439a40      [0x9c] =  0x08
00439a41      [0x9d] =  0x08
00439a42      [0x9e] =  0x08
00439a43      [0x9f] =  0x08
00439a44      [0xa0] =  0x08
00439a45      [0xa1] =  0x08
00439a46      [0xa2] =  0x07
00439a47  }

00439a47                       90 90 90 90 90 90 90 90 90                                                         .........

00439a50  void Device::SendStringToClipboard(class PStringBase<unsigned short> arg1)

00439a50  {
00439a5d      class PStringBase<unsigned short> edi = arg1;
00439a61      void* esi = *(uint32_t*)(edi - 4);
00439a64      int32_t ebx;
00439a64      ebx = Device::m_nOSVersion != 2;
00439a64      
00439a69      if (ebx == 0)
00439a69      {
00439ab3          int32_t* hMem_1 = GlobalAlloc(GHND, ((esi * 2) + 2));
00439aba          arg1 = hMem_1;
00439abe          void* eax_3 = GlobalLock(hMem_1);
00439ac4          int32_t ecx_1 = 0;
00439ac4          
00439ac8          if (esi > 0)
00439ac8          {
00439acc              void* ebp_3 = (edi - eax_3);
00439acc              
00439aea              do
00439aea              {
00439ad0                  int32_t edx_3 = *(uint32_t*)(edi - 4);
00439ad5                  void* edx_4 = ((edi + (edx_3 << 1)) - 2);
00439ad5                  
00439ad9                  if (ecx_1 < edx_3)
00439adb                      edx_4 = ((char*)eax_3 + ebp_3);
00439adb                  
00439ade                  edx_4 = *(uint16_t*)edx_4;
00439ae1                  *(uint16_t*)eax_3 = edx_4;
00439ae4                  ecx_1 += 1;
00439ae5                  eax_3 += 2;
00439aea              } while (ecx_1 < esi);
00439ac8          }
00439a69      }
00439a69      else
00439a69      {
00439a71          int32_t* hMem = GlobalAlloc(GHND, ((char*)esi + 1));
00439a78          arg1 = hMem;
00439a7c          void* eax_1 = GlobalLock(hMem);
00439a82          char* ecx = nullptr;
00439a82          
00439a86          if (esi > 0)
00439a86          {
00439a88              class PStringBase<unsigned short> ebp_1 = edi;
00439a88              
00439aa8              do
00439aa8              {
00439a90                  int32_t edx_1 = *(uint32_t*)(edi - 4);
00439a95                  class PStringBase<unsigned short> edx_2 = ((edi + (edx_1 << 1)) - 2);
00439a95                  
00439a99                  if (ecx < edx_1)
00439a9b                      edx_2 = ebp_1;
00439a9b                  
00439a9d                  edx_2.m_charbuffer = *(uint8_t*)edx_2;
00439a9f                  *(uint8_t*)(ecx + eax_1) = edx_2.m_charbuffer;
00439aa2                  ecx = &ecx[1];
00439aa3                  ebp_1 += 2;
00439aa8              } while (ecx < esi);
00439a86          }
00439a69      }
00439a69      
00439af1      GlobalUnlock(arg1);
00439afd      OpenClipboard(Device::m_hWnd);
00439b03      EmptyClipboard();
00439b09      char temp0 = ebx;
00439b09      ebx = -(ebx);
00439b15      SetClipboardData((((ebx - ebx) & 0xfffffff4) + 0xd), arg1);
00439b1b      CloseClipboard();
00439b1b      
00439b34      if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
00439b3c          **(uint32_t**)(edi - 0x14)(1);
00439a50  }

00439b43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00439b50  uint8_t Device::DoEventLoop()

00439b50  {
00439b67      Device::m_bIsWithinEventLoop = 1;
00439b72      struct HWND__* lpMsg;
00439b72      int32_t i;
00439b72      
00439b72      if (PeekMessageA(&lpMsg, nullptr, 0, 0, PM_REMOVE) != 0)
00439b72      {
00439b87          while (i != 0x12)
00439b87          {
00439b8d              int32_t* var_2c_1 = &lpMsg;
00439b8d              
00439b98              if ((DiskConBase::Close(&lpMsg) == 0 && KeyStone::TranslateAcceleratorA(lpMsg, nullptr, &lpMsg) == 0))
00439b98              {
00439bb7                  TranslateMessage(&lpMsg);
00439bbe                  DispatchMessageA(&lpMsg);
00439b98              }
00439b98              
00439bd1              if (PeekMessageA(&lpMsg, nullptr, 0, 0, PM_REMOVE) == 0)
00439bd1                  break;
00439b87          }
00439b72      }
00439bd5      BOOL eax;
00439bd5      eax = Device::m_bToggleFullScreenMode;
00439bd5      
00439bdd      if (eax != 0)
00439bdd      {
00439be6          if (Render::m_pRenderer != 0)
00439be6          {
00439be8              eax = Device::m_bIsActiveApp;
00439be8              
00439bef              if (eax != 0)
00439bef              {
00439bf1                  eax = Device::m_bAllowFullScreenMode;
00439bf1                  
00439bf8                  if (eax == 0)
00439c07                      eax = 0;
00439bf8                  else
00439bf8                  {
00439bfa                      eax = Device::m_DisplayPrefs.FullScreen;
00439bfa                      
00439c01                      if (eax != 0)
00439c07                          eax = 0;
00439c01                      else
00439c03                          eax = 1;
00439bf8                  }
00439bf8                  
00439c09                  Device::m_DisplayPrefs.FullScreen = eax;
00439bef              }
00439be6          }
00439be6          
00439c0e          Device::m_bToggleFullScreenMode = 0;
00439bdd      }
00439bdd      
00439c15      Device::m_bIsWithinEventLoop = 0;
00439c1c      eax = Device::m_bIsDone;
00439c24      return eax;
00439b50  }

00439c25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00439c30  uint8_t __convention("regparm") Device::SetCursorFromImage(uint32_t const arg1, uint32_t const arg2, class RenderSurface const* arg3)

00439c30  {
00439c30      struct HICON__* ecx;
00439c30      struct HICON__* var_4 = ecx;
00439c30      
00439c4f      if (CreateIconFromRenderSurface(arg1, arg2, arg3, &var_4) == 0)
00439c65          return 0;
00439c65      
00439c56      Device::SetCursorFromIcon(var_4);
00439c5e      int32_t eax_2;
00439c5e      eax_2 = 1;
00439c61      return 1;
00439c30  }

00439c66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00439c70  uint8_t __convention("regparm") PSUtils::is_uint32(class PStringBase<char> arg1)

00439c70  {
00439c70      char* ecx;
00439c70      char* var_4 = ecx;
00439c7a      var_4 = nullptr;
00439c88      *(uint32_t*)_errno() = 0;
00439c96      strtoul(arg1, &var_4, 0);
00439ca7      int32_t ebx;
00439ca7      
00439ca7      if (*(uint8_t*)var_4 != 0)
00439cb4          ebx = 0;
00439ca7      else if (*(uint32_t*)_errno() == 0x22)
00439cb4          ebx = 0;
00439cae      else
00439cb0          ebx = 1;
00439cb0      
00439cc9      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
00439cd1          **(uint32_t**)(arg1 - 0x14)(1);
00439cd1      
00439cd5      int32_t eax_3;
00439cd5      eax_3 = ebx;
00439cd9      return eax_3;
00439c70  }

00439cda                                                                                90 90 90 90 90 90                            ......

00439ce0  uint8_t __thiscall SmartArray<PrefDisplayModeType,1>::grow(class SmartArray<PrefDisplayModeType,1>* this, uint32_t arg2)

00439ce0  {
00439ce1      uint32_t ebx = arg2;
00439cec      void* eax;
00439cec      
00439cec      if (ebx >= this->m_num)
00439cec      {
00439cfc          if (ebx <= (this->m_sizeAndDeallocate & 0x7fffffff))
00439cfc          {
00439d8f              eax = 1;
00439d92              return 1;
00439cfc          }
00439cfc          
00439d04          if (ebx == 0)
00439d04          {
00439d06              SmartArray<PrefDisplayModeType,1>::Reset(this);
00439d0d              int32_t eax_2;
00439d0d              eax_2 = 1;
00439d10              return 1;
00439d04          }
00439d04          
00439d1e          void* edi_1 = operator new[]((ebx << 4));
00439d1e          
00439d25          if (edi_1 != 0)
00439d25          {
00439d2a              if (this->m_data != 0)
00439d2a              {
00439d2c                  uint32_t m_num = this->m_num;
00439d2c                  
00439d30                  if ((m_num - 1) >= 0)
00439d30                  {
00439d34                      void* eax_4 = ((m_num - 1) << 4);
00439d37                      int32_t ecx_3 = m_num;
00439d61                      int32_t i;
00439d61                      
00439d61                      do
00439d61                      {
00439d42                          void* edx_2 = (this->m_data + eax_4);
00439d46                          void* ebx_1 = ((char*)eax_4 + edi_1);
00439d49                          *(uint32_t*)ebx_1 = *(uint32_t*)edx_2;
00439d4e                          *(uint32_t*)((char*)ebx_1 + 4) = *(uint32_t*)((char*)edx_2 + 4);
00439d54                          *(uint32_t*)((char*)ebx_1 + 8) = *(uint32_t*)((char*)edx_2 + 8);
00439d5a                          eax_4 -= 0x10;
00439d5d                          i = ecx_3;
00439d5d                          ecx_3 -= 1;
00439d5e                          *(uint32_t*)((char*)ebx_1 + 0xc) = *(uint32_t*)((char*)edx_2 + 0xc);
00439d61                      } while (i != 1);
00439d63                      ebx = arg2;
00439d30                  }
00439d30                  
00439d75                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00439d7a                      operator delete[](this->m_data);
00439d2a              }
00439d2a              
00439d88              this->m_data = edi_1;
00439d8a              this->m_sizeAndDeallocate = (ebx | 0x80000000);
00439d8f              eax = 1;
00439d92              return 1;
00439d25          }
00439cec      }
00439cec      
00439d97      eax = 0;
00439d9a      return 0;
00439ce0  }

00439d9d                                                                                         90 90 90                               ...

00439da0  void _STL::__unguarded_insertion_sort_aux(uint32_t* arg1, uint32_t* arg2, uint32_t* arg3, struct _STL::less<unsigned long> arg4)

00439da0  {
00439da6      uint32_t* edi = arg1;
00439da6      
00439dac      while (edi != arg2)
00439dac      {
00439db0          uint32_t esi_1 = *(uint32_t*)edi;
00439db2          uint32_t ecx_1 = edi[-1];
00439db7          void* eax_1 = &edi[-1];
00439dba          uint32_t* edx_1 = edi;
00439dba          
00439dbc          while (esi_1 < ecx_1)
00439dbc          {
00439dc0              *(uint32_t*)edx_1 = ecx_1;
00439dc2              ecx_1 = *(uint32_t*)((char*)eax_1 - 4);
00439dc5              edx_1 = eax_1;
00439dc7              eax_1 -= 4;
00439dbc          }
00439dbc          
00439dce          edi = &edi[1];
00439dd3          *(uint32_t*)edx_1 = esi_1;
00439dac      }
00439da0  }

00439ddb                                                                                   90 90 90 90 90                             .....

00439de0  void _STL::__unguarded_insertion_sort_aux(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct PrefDisplayModeType* arg3, struct _STL::less<PrefDisplayModeType> arg4)

00439de0  {
00439ded      for (struct PrefDisplayModeType* i = arg1; i != arg2; i = &i[1])
00439ded      {
00439e02          uint32_t nHeight = i->nHeight;
00439e0b          uint32_t nSize = i->nSize;
00439e0f          uint32_t nModeDesc = i->nModeDesc;
00439e12          _STL::__unguarded_linear_insert(i, i->nWidth, arg4);
00439ded      }
00439de0  }

00439e25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00439e30  void _STL::__adjust_heap(uint32_t* arg1, int32_t arg2, int32_t arg3, uint32_t arg4, struct _STL::less<unsigned long> arg5)

00439e30  {
00439e30      int32_t ecx = arg2;
00439e3d      int32_t eax = ((ecx * 2) + 2);
00439e41      bool cond:1 = eax != arg3;
00439e44      int32_t edi = ecx;
00439e44      
00439e46      while (eax < arg3)
00439e46      {
00439e57          if (arg1[eax] < arg1[(eax - 1)])
00439e59              eax -= 1;
00439e59          
00439e5d          arg1[ecx] = arg1[eax];
00439e60          ecx = eax;
00439e62          eax = ((eax * 2) + 2);
00439e66          cond:1 = eax != arg3;
00439e46      }
00439e46      
00439e6b      if (!(cond:1))
00439e6b      {
00439e71          arg1[ecx] = arg1[(eax - 1)];
00439e74          ecx = (eax - 1);
00439e6b      }
00439e6b      
00439e84      _STL::__push_heap(arg1, ecx, edi, arg4, arg5);
00439e30  }

00439e8f                                               90                                                                 .

00439e90  void _STL::__adjust_heap(struct PrefDisplayModeType* arg1, int32_t arg2, int32_t arg3, struct PrefDisplayModeType arg4, struct _STL::less<PrefDisplayModeType> arg5)

00439e90  {
00439e90      int32_t ecx = arg2;
00439ea0      int32_t eax = ((ecx * 2) + 2);
00439ea4      bool cond:1 = eax != arg3;
00439ea6      int32_t ebx = ecx;
00439ea6      
00439ea8      while (eax < arg3)
00439ea8      {
00439eb2          int32_t esi_2 = (eax << 4);
00439eb2          
00439ebe          if (*(uint32_t*)(&arg1->nSize + esi_2) < *(uint32_t*)((esi_2 + arg1) - 8))
00439ec0              eax -= 1;
00439ec0          
00439ec9          void* esi_6 = &arg1[eax];
00439ecd          void* ecx_2 = &arg1[ecx];
00439ecf          *(uint32_t*)ecx_2 = *(uint32_t*)esi_6;
00439ed4          *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)esi_6 + 4);
00439eda          *(uint32_t*)((char*)ecx_2 + 8) = *(uint32_t*)((char*)esi_6 + 8);
00439ee0          *(uint32_t*)((char*)ecx_2 + 0xc) = *(uint32_t*)((char*)esi_6 + 0xc);
00439ee3          ecx = eax;
00439ee5          eax = ((eax * 2) + 2);
00439ee9          cond:1 = eax != arg3;
00439ea8      }
00439ea8      
00439eed      if (!(cond:1))
00439eed      {
00439efd          void* ecx_4 = &arg1[ecx];
00439eff          *(uint32_t*)ecx_4 = arg1[(eax - 1)].nWidth;
00439f04          *(uint32_t*)((char*)ecx_4 + 4) = *(uint32_t*)(&arg1[eax] - 0xc);
00439f0a          *(uint32_t*)((char*)ecx_4 + 8) = *(uint32_t*)(&arg1[eax] - 8);
00439f10          *(uint32_t*)((char*)ecx_4 + 0xc) = *(uint32_t*)(&arg1[eax] - 4);
00439f13          ecx = (eax - 1);
00439eed      }
00439eed      
00439f2a      uint32_t nHeight = arg4.nHeight;
00439f32      uint32_t nSize = arg4.nSize;
00439f3b      uint32_t nModeDesc = arg4.nModeDesc;
00439f3e      _STL::__push_heap(arg1, ecx, ebx, arg4.nWidth, arg5);
00439e90  }

00439f4b                                   90 90 90 90 90                                                             .....

00439f50  uint32_t* _STL::__unguarded_partition(uint32_t* arg1, uint32_t* arg2, uint32_t arg3, struct _STL::less<unsigned long> arg4)

00439f50  {
00439f54      uint32_t* ecx = arg2;
00439f58      uint32_t* result = arg1;
00439f5d      int32_t edi;
00439f5d      int32_t var_8 = edi;
00439f5d      
00439f62      while (true)
00439f62      {
00439f62          if (*(uint32_t*)result < arg3)
00439f62          {
00439f6c              int32_t esi_1;
00439f6c              
00439f6c              do
00439f6c              {
00439f64                  esi_1 = result[1];
00439f67                  result = &result[1];
00439f6c              } while (esi_1 < arg3);
00439f62          }
00439f62          
00439f6e          int32_t esi_2 = ecx[-1];
00439f71          ecx -= 4;
00439f71          
00439f76          if (arg3 < esi_2)
00439f76          {
00439f80              int32_t esi_3;
00439f80              
00439f80              do
00439f80              {
00439f78                  esi_3 = ecx[-1];
00439f7b                  ecx -= 4;
00439f80              } while (arg3 < esi_3);
00439f76          }
00439f76          
00439f84          if (result >= ecx)
00439f84              break;
00439f84          
00439f86          uint32_t esi_4 = *(uint32_t*)result;
00439f8a          *(uint32_t*)result = *(uint32_t*)ecx;
00439f8c          *(uint32_t*)ecx = esi_4;
00439f8e          result = &result[1];
00439f62      }
00439f62      
00439f95      return result;
00439f50  }

00439f96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00439fa0  struct PrefDisplayModeType* _STL::__unguarded_partition(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct PrefDisplayModeType arg3, struct _STL::less<PrefDisplayModeType> arg4)

00439fa0  {
00439fa0      struct PrefDisplayModeType* ecx = arg2;
00439fa4      struct PrefDisplayModeType* result = arg1;
00439fa4      
00439faf      while (true)
00439faf      {
00439faf          uint32_t nSize = arg3.nSize;
00439faf          
00439fb6          if (result->nSize < nSize)
00439fb6          {
00439fc0              int32_t esi_1;
00439fc0              
00439fc0              do
00439fc0              {
00439fb8                  esi_1 = *(int32_t*)((char*)result + 0x18);
00439fbb                  result = &result[1];
00439fc0              } while (esi_1 < nSize);
00439fb6          }
00439fb6          
00439fc2          int32_t esi_2 = *(int32_t*)((char*)ecx + -8);
00439fc5          ecx -= 0x10;
00439fc5          
00439fca          if (nSize < esi_2)
00439fca          {
00439fd8              int32_t esi_3;
00439fd8              
00439fd8              do
00439fd8              {
00439fd0                  esi_3 = *(int32_t*)((char*)ecx + -8);
00439fd3                  ecx -= 0x10;
00439fd8              } while (nSize < esi_3);
00439fca          }
00439fca          
00439fdc          if (result >= ecx)
00439fdc              break;
00439fdc          
00439fe0          uint32_t nWidth = result->nWidth;
00439fe2          uint32_t nHeight = result->nHeight;
00439fe5          uint32_t nSize_1 = result->nSize;
00439fe8          uint32_t nModeDesc = result->nModeDesc;
00439ff3          int32_t* edi_2 = ecx;
00439ff9          result->nWidth = *(uint32_t*)edi_2;
00439ffe          result->nHeight = edi_2[1];
0043a004          result->nSize = edi_2[2];
0043a00a          result->nModeDesc = edi_2[3];
0043a00d          uint32_t* edi_4 = ecx;
0043a00f          *(uint32_t*)edi_4 = nWidth;
0043a015          edi_4[1] = nHeight;
0043a018          edi_4[2] = nSize_1;
0043a01f          edi_4[3] = nModeDesc;
0043a022          result = &result[1];
00439faf      }
00439faf      
0043a02e      return result;
00439fa0  }

0043a02f                                               90                                                                 .

0043a030  void _STL::__make_heap(uint32_t* arg1, uint32_t* arg2, struct _STL::less<unsigned long> arg3, uint32_t* arg4, int32_t* arg5)

0043a030  {
0043a03c      int32_t ebx_2 = (((char*)arg2 - arg1) >> 2);
0043a03c      
0043a042      if (ebx_2 >= 2)
0043a042      {
0043a045          struct _STL::less<unsigned long> ebp_1 = arg3;
0043a04d          int32_t eax_2;
0043a04d          int32_t edx_1;
0043a04d          edx_1 = HIGHD(((int64_t)(ebx_2 - 2)));
0043a04d          eax_2 = LOWD(((int64_t)(ebx_2 - 2)));
0043a052          int32_t i = ((eax_2 - edx_1) >> 1);
0043a05c          _STL::__adjust_heap(arg1, i, ebx_2, arg1[i], ebp_1);
0043a05c          
0043a066          while (i != 0)
0043a066          {
0043a068              uint32_t ecx_1 = arg1[(i - 1)];
0043a06c              i -= 1;
0043a072              _STL::__adjust_heap(arg1, i, ebx_2, ecx_1, ebp_1);
0043a066          }
0043a042      }
0043a030  }

0043a083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0043a090  void _STL::__make_heap(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct _STL::less<PrefDisplayModeType> arg3, struct PrefDisplayModeType* arg4, int32_t* arg5)

0043a090  {
0043a09e      int32_t edi_2 = (((char*)arg2 - arg1) >> 4);
0043a09e      
0043a0a4      if (edi_2 >= 2)
0043a0a4      {
0043a0ad          int32_t eax_2;
0043a0ad          int32_t edx_1;
0043a0ad          edx_1 = HIGHD(((int64_t)(edi_2 - 2)));
0043a0ad          eax_2 = LOWD(((int64_t)(edi_2 - 2)));
0043a0b2          int32_t i = ((eax_2 - edx_1) >> 1);
0043a0ba          void* ebx_1 = &arg1[i];
0043a0cb          int32_t var_20_1 = *(uint32_t*)((char*)ebx_1 + 4);
0043a0d5          int32_t var_1c_1 = *(uint32_t*)((char*)ebx_1 + 8);
0043a0da          int32_t var_18_1 = *(uint32_t*)((char*)ebx_1 + 0xc);
0043a0dd          _STL::__adjust_heap(arg1, i, edi_2, *(uint32_t*)ebx_1, arg3);
0043a0dd          
0043a0e7          while (i != 0)
0043a0e7          {
0043a0f8              ebx_1 -= 0x10;
0043a106              int32_t var_20_2 = *(uint32_t*)((char*)ebx_1 + 4);
0043a110              i -= 1;
0043a111              int32_t var_1c_2 = *(uint32_t*)((char*)ebx_1 + 8);
0043a116              int32_t var_18_2 = *(uint32_t*)((char*)ebx_1 + 0xc);
0043a119              _STL::__adjust_heap(arg1, i, edi_2, *(uint32_t*)ebx_1, arg3);
0043a0e7          }
0043a0a4      }
0043a090  }

0043a12a                                90 90 90 90 90 90                                                            ......

0043a130  void __fastcall Device::Cleanup()

0043a130  {
0043a130      void* ecx;
0043a130      void* var_4 = ecx;
0043a130      
0043a13b      if (Device::m_bIsInitialized != 0)
0043a13b      {
0043a14c          PStringBase<char>::PStringBase<char>(&var_4, "Exit");
0043a156          GlobalRegistry::UnregisterCommand(&var_4);
0043a165          int32_t* esi_2 = ((char*)var_4 - 0x14);
0043a165          
0043a177          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0043a17f              **(uint32_t**)esi_2(1);
0043a17f          
0043a18a          PStringBase<char>::PStringBase<char>(&var_4, "Quit");
0043a194          GlobalRegistry::UnregisterCommand(&var_4);
0043a19d          int32_t* esi_4 = ((char*)var_4 - 0x14);
0043a19d          
0043a1af          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0043a1b7              **(uint32_t**)esi_4(1);
0043a1b7          
0043a1c2          PStringBase<char>::PStringBase<char>(&var_4, "UpdatePresentation");
0043a1cc          GlobalRegistry::UnregisterCommand(&var_4);
0043a1d5          void* esi_6 = ((char*)var_4 - 0x14);
0043a1d5          
0043a1e7          if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
0043a1ef              **(uint32_t**)esi_6(1);
0043a1ef          
0043a1fa          PStringBase<char>::PStringBase<char>(&var_4, "ForceDisplayResolution");
0043a204          GlobalRegistry::UnregisterCommand(&var_4);
0043a20d          void* esi_8 = ((char*)var_4 - 0x14);
0043a20d          
0043a21f          if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
0043a227              **(uint32_t**)esi_8(1);
0043a227          
0043a229          Device::Deactivate();
0043a22e          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0043a234          Device::m_bIsReady = 0;
0043a23a          ICIDM::s_cidm_1->vtable->OnShutdown();
0043a241          ICIDM::s_cidm_1->vtable->__vecDelDtor(1);
0043a249          ICIDM::s_cidm = nullptr;
0043a24f          Device::ShutdownGraphicsEngine();
0043a254          struct HWND__* Device::m_hWnd_1 = Device::m_hWnd;
0043a254          
0043a25d          if (Device::m_hWnd_1 != 0)
0043a25d          {
0043a260              DestroyWindow(Device::m_hWnd_1);
0043a260              
0043a26c              if (Device::m_bIsChildWnd == 0)
0043a26f                  PostQuitMessage(0);
0043a26f              
0043a275              Device::m_hWnd = nullptr;
0043a25d          }
0043a25d          
0043a280          UserPreferences::UnregisterPreference(&Display_Resolution);
0043a28a          UserPreferences::UnregisterPreference(&Display_FullScreen);
0043a294          UserPreferences::UnregisterPreference(&Display_RefreshRate);
0043a29e          UserPreferences::UnregisterPreference(&Display_SyncToRefresh);
0043a2a3          class Device::DeviceDialogBoxGateway* Device::sm_pDeviceDialogGateway_1 = Device::sm_pDeviceDialogGateway;
0043a2a3          
0043a2ae          if (Device::sm_pDeviceDialogGateway_1 != 0)
0043a2b0              Device::sm_pDeviceDialogGateway_1->vtable->__vecDelDtor(1);
0043a2b0          
0043a2bb          Device::sm_pDeviceDialogGateway = nullptr;
0043a2c1          SetThreadExecutionState(ES_CONTINUOUS);
0043a2c7          Device::m_bIsInitialized = 0;
0043a13b      }
0043a130  }


0043a2d0  uint8_t Device::ChangePresentation()

0043a2d0  {
0043a2da      int32_t ebx;
0043a2da      int32_t var_6c = ebx;
0043a2db      int32_t ebp;
0043a2db      int32_t var_70 = ebp;
0043a2dc      int32_t esi;
0043a2dc      int32_t var_74 = esi;
0043a2dd      int32_t edi;
0043a2dd      int32_t var_78 = edi;
0043a2de      class Render* eax;
0043a2de      
0043a2de      if (Render::m_pRenderer != 0)
0043a2de      {
0043a2e4          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0043a2f5          int32_t var_38;
0043a2f5          __builtin_memcpy(&var_38, &RenderDevice::render_device_1->m_presentation, 0x1c);
0043a304          uint32_t var_1c;
0043a304          __builtin_memcpy(&var_1c, &var_38, 0x1c);
0043a309          struct HWND__* hFocusWindow = RenderDevice::render_device_1->m_config.hFocusWindow;
0043a30d          struct HWND__ X_4;
0043a30d          X_4.unused = RenderDevice::render_device_1->m_config.bUseStencilBuffer;
0043a30d          *(uint8_t*)((char*)X_4.unused)[1] = RenderDevice::render_device_1->m_config.bSoftwareVertexProcessing;
0043a30d          *(uint8_t*)((char*)X_4.unused)[2] = RenderDevice::render_device_1->m_config.bUsePureDevice;
0043a314          class RenderDevicePresentation* var_7c_1 = &var_1c;
0043a315          struct HWND__ X_3 = X_4;
0043a315          
0043a323          if (Device::LoadDisplayPreferences(var_7c_1) != 0)
0043a323          {
0043a329              char var_10;
0043a329              eax = var_10;
0043a333              char temp0 = eax;
0043a333              eax = -(eax);
0043a341              int32_t var_7c_2 = ((((char*)eax - eax) & 0x7f360000) + 0x12ca0000);
0043a342              int32_t var_80 = 0xfffffff0;
0043a344              struct HWND__* Device::m_hWnd_1 = Device::m_hWnd;
0043a345              user32_SetWindowLongA_Ptr(Device::m_hWnd_1, var_80);
0043a34b              struct HWND__* Device::m_hWnd_2 = Device::m_hWnd;
0043a351              enum SET_WINDOW_POS_FLAGS uFlags = 0x27;
0043a353              Device::m_hWnd_1 = nullptr;
0043a355              uint32_t var_88 = 0;
0043a357              enum SYSTEM_PARAMETERS_INFO_ACTION var_8c = 0;
0043a35e              SetWindowPos(Device::m_hWnd_2, 0xfffffffe, 0, var_8c, var_88, Device::m_hWnd_1, uFlags);
0043a368              void var_54;
0043a368              void* var_80_1 = &var_54;
0043a36d              void var_20;
0043a36d              Device::m_hWnd_1 = &var_20;
0043a36e              uint8_t eax_4 = Render::RestartRenderingSystem(Device::m_hWnd_1, var_80_1);
0043a385              __builtin_memcpy(&var_20, &RenderDevice::render_device->m_presentation, 0x1c);
0043a38b              uint32_t edi_1 = var_1c;
0043a38f              *(uint8_t*)((char*)var_6c)[3] = eax_4;
0043a39a              int32_t X_1 = 0;
0043a39c              int32_t ebp_1 = 0;
0043a3a0              struct HWND__* Device::m_hWnd_6;
0043a3a0              struct HWND__* Device::m_hWnd_4 = Device::m_hWnd_6;
0043a3a4              uint8_t var_14;
0043a3a4              
0043a3a4              if (var_14 == 0)
0043a3a4              {
0043a3b2                  int32_t eax_5 = GetSystemMetrics(SM_CXDLGFRAME);
0043a3ba                  int32_t eax_6 = GetSystemMetrics(SM_CYDLGFRAME);
0043a3c2                  int32_t eax_7 = GetSystemMetrics(SM_CYCAPTION);
0043a3c9                  int32_t eax_8 = GetSystemMetrics(SM_CXSCREEN);
0043a3d1                  int32_t eax_9 = GetSystemMetrics(SM_CYSCREEN);
0043a3e1                  edi_1 += (eax_5 << 1);
0043a3eb                  char var_30;
0043a3eb                  int32_t eax_11;
0043a3eb                  eax_11 = var_30;
0043a3ef                  void* Device::m_hWnd_7 = ((char*)Device::m_hWnd_4 + (eax_7 + (eax_6 << 1)));
0043a3f3                  Device::m_hWnd_4 = Device::m_hWnd_7;
0043a3f7                  void* eax_17;
0043a3f7                  int32_t ebx_1;
0043a3f7                  
0043a3f7                  if (eax_11 == 0)
0043a3f7                  {
0043a414                      int32_t var_3c;
0043a414                      int32_t* lpRect = &var_3c;
0043a415                      Device::m_hWnd_1 = Device::m_hWnd;
0043a415                      
0043a41e                      if (GetWindowRect(Device::m_hWnd_1, lpRect) != 0)
0043a41e                      {
0043a42c                          int32_t var_34;
0043a42c                          int32_t eax_22;
0043a42c                          int32_t edx_5;
0043a42c                          edx_5 = HIGHD(((int64_t)((var_34 - edi_1) + var_3c)));
0043a42c                          eax_22 = LOWD(((int64_t)((var_34 - edi_1) + var_3c)));
0043a433                          ebx_1 = (eax_22 - edx_5);
0043a43b                          eax_17 = ((var_30 - Device::m_hWnd_7) + var_38);
0043a43b                          goto label_43a43d;
0043a41e                      }
0043a3f7                  }
0043a3f7                  else
0043a3f7                  {
0043a3ff                      int32_t eax_14;
0043a3ff                      int32_t edx_3;
0043a3ff                      edx_3 = HIGHD(((int64_t)(eax_8 - edi_1)));
0043a3ff                      eax_14 = LOWD(((int64_t)(eax_8 - edi_1)));
0043a402                      ebx_1 = (eax_14 - edx_3);
0043a406                      eax_17 = (eax_9 - Device::m_hWnd_7);
0043a43d                  label_43a43d:
0043a43d                      int32_t eax_26;
0043a43d                      int32_t edx_7;
0043a43d                      edx_7 = HIGHD(((int64_t)eax_17));
0043a43d                      eax_26 = LOWD(((int64_t)eax_17));
0043a442                      X_1 = (ebx_1 >> 1);
0043a444                      ebp_1 = ((eax_26 - edx_7) >> 1);
0043a3f7                  }
0043a446                  enum SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS fWinIni = 0;
0043a44c                  Device::m_hWnd_1 = &X_3;
0043a44d                  var_88 = 0x10;
0043a44f                  var_8c = SPI_GETWORKAREA;
0043a44f                  
0043a459                  if (SystemParametersInfoA(var_8c, var_88, Device::m_hWnd_1, fWinIni) != 0)
0043a459                  {
0043a45f                      struct HWND__ X_2 = X_3;
0043a467                      int32_t var_48;
0043a467                      int32_t esi_5 = var_48;
0043a46b                      int32_t var_44;
0043a46b                      int32_t eax_30 = (var_44 - X_2);
0043a46d                      int32_t var_40;
0043a46d                      int32_t ecx_6 = (var_40 - esi_5);
0043a46d                      
0043a471                      if (edi_1 > eax_30)
0043a48e                          X_1 = (X_2 - eax_5);
0043a471                      else
0043a471                      {
0043a47a                          if ((edi_1 + X_1) > var_44)
0043a47e                              X_1 = (eax_30 - edi_1);
0043a47e                          
0043a482                          esi_5 = var_48;
0043a482                          
0043a486                          if (X_1 < X_2)
0043a48e                              X_1 = X_2;
0043a471                      }
0043a471                      
0043a496                      if ((Device::m_hWnd_4 <= ecx_6 && ((char*)Device::m_hWnd_4 + ebp_1) > var_40))
0043a4a3                          ebp_1 = (ecx_6 - Device::m_hWnd_4);
0043a4a3                      
0043a4a7                      if ((Device::m_hWnd_4 > ecx_6 || ebp_1 < esi_5))
0043a4a9                          ebp_1 = esi_5;
0043a459                  }
0043a3a4              }
0043a3a4              
0043a4af              struct HWND__* Device::m_hWnd_3 = Device::m_hWnd;
0043a4b5              enum SET_WINDOW_POS_FLAGS uFlags_1 = SWP_NOCOPYBITS;
0043a4ba              Device::m_hWnd_1 = Device::m_hWnd_4;
0043a4bb              var_88 = edi_1;
0043a4bc              var_8c = ebp_1;
0043a4bd              int32_t X = X_1;
0043a4be              X_1 = var_14;
0043a4c6              int32_t ecx_8;
0043a4c6              ecx_8 = X_1 != 0;
0043a4ce              struct HWND__* Device::m_hWnd_5 = SetWindowPos(Device::m_hWnd_3, (ecx_8 - 2), X, var_8c, var_88, Device::m_hWnd_1, uFlags_1);
0043a4d4              X_1 = *(uint8_t*)((char*)var_6c)[3];
0043a4da              int32_t var_80_7 = 0;
0043a4da              
0043a4dc              if (X_1 != 0)
0043a4dc              {
0043a4de                  class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0043a4e4                  Device::m_hWnd_1 = 0xe;
0043a4e6                  UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance_1, Device::m_hWnd_1, var_80_7);
0043a4f4                  return X_1;
0043a4dc              }
0043a4dc              
0043a4f5              Device::m_hWnd_1 = Device::m_hWnd_5;
0043a4f8              var_88 = 0x794320;
0043a502              var_88 = PStringBase<unsigned short>::PStringBase<unsigned short>(&Device::m_hWnd_1, var_88);
0043a505              var_8c = 0x794320;
0043a50f              var_8c = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_88, var_8c);
0043a517              uint16_t eax_35;
0043a517              class PStringBase<unsigned short> ecx_15;
0043a517              class PStringBase<unsigned short> edx_9;
0043a517              eax_35 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8c, &data_794320);
0043a521              PlatformString::DisplayString(eax_35, edx_9, ecx_15, 0x80, var_8c);
0043a52b              exit(1);
0043a52b              /* no return */
0043a323          }
0043a2de      }
0043a2de      
0043a534      eax = 0;
0043a53a      return 0;
0043a2d0  }

0043a53b                                                                                   90 90 90 90 90                             .....

0043a540  uint8_t Device::SaveScreenshot(class PStringBase<char>* arg1)

0043a540  {
0043a54a      if (Render::m_pRenderer == 0)
0043a54a      {
0043a54c          class Render* eax;
0043a54c          eax = 0;
0043a551          return 0;
0043a54a      }
0043a54a      
0043a553      class RenderSurface* eax_1 = Device::GetScreenshotSurface();
0043a553      
0043a55c      if (eax_1 == 0)
0043a55c      {
0043a69b          eax_1 = 0;
0043a6a1          return 0;
0043a55c      }
0043a55c      
0043a562      class PSRefBufferCharData<char>* m_charbuffer = UserPreferences::sm_strDefaultFile.m_charbuffer;
0043a56f      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0043a577      InterlockedIncrement(&m_charbuffer[-1]);
0043a579      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0043a57e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_1;
0043a586      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0043a592      PSUtils::get_directory(&PStringBase<char>::s_NullBuffer_4, &m_charbuffer_2);
0043a597      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0043a59c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0043a5a7      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0043a5a7      
0043a5df      for (int32_t i = 0; i < 0x186a0; i += 1)
0043a5df      {
0043a5b4          int32_t __saved_ebp_4 = i;
0043a5b5          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
0043a5c0          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "%sScreenShot%05d.jpg");
0043a5c0          
0043a5d6          if (PSUtils::check_access(&PStringBase<char>::s_NullBuffer_3, 0) == 0)
0043a5d6              break;
0043a5df      }
0043a5df      
0043a5e9      uint8_t eax_6 = RenderSurface::SaveJPG(eax_1, &PStringBase<char>::s_NullBuffer_3);
0043a5e9      
0043a5fa      if (eax_6 != 0)
0043a5fa      {
0043a600          class PSRefBufferCharData<char>* m_charbuffer_1 = arg1->m_charbuffer;
0043a600          
0043a606          if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer_3)
0043a606          {
0043a617              if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0043a61f                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0043a61f              
0043a621              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_3;
0043a629              *(uint32_t*)arg1 = PStringBase<char>::s_NullBuffer_6;
0043a62f              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_6[-1]);
0043a606          }
0043a5fa      }
0043a5fa      
0043a631      eax_1->vtable->Release();
0043a63c      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
0043a63c      
0043a64b      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0043a653          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0043a653      
0043a659      void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
0043a659      
0043a668      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0043a670          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0043a670      
0043a676      void* __offset(PSRefBufferCharData<char>, -0x14) esi_6 = &m_charbuffer_2->m_data[0xffffffec];
0043a676      
0043a686      if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
0043a68e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
0043a68e      
0043a690      int32_t eax_15;
0043a690      eax_15 = eax_6;
0043a69a      return eax_15;
0043a540  }

0043a5ad                                         8d 49 00                                                               .I.
0043a6a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0043a6b0  void __fastcall Device::Show16BitWarning()

0043a6b0  {
0043a6b0      int32_t var_4 = 1;
0043a6b2      int32_t ecx;
0043a6b2      int32_t var_8 = ecx;
0043a6b5      uint16_t* var_c = &data_794320;
0043a6bf      var_c = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, var_c);
0043a6c2      uint16_t* var_10 = &data_794320;
0043a6cc      var_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, var_10);
0043a6d4      uint16_t eax;
0043a6d4      class PStringBase<unsigned short> ecx_6;
0043a6d4      class PStringBase<unsigned short> edx;
0043a6d4      eax = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, &data_794320);
0043a6db      PlatformString::DisplayString(eax, edx, ecx_6, 0x7b, var_10);
0043a6b0  }

0043a6e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0043a6f0  uint8_t __thiscall SmartArray<PrefDisplayModeType,1>::AddToEnd(class SmartArray<PrefDisplayModeType,1>* this, struct PrefDisplayModeType const* arg2)

0043a6f0  {
0043a6f9      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
0043a6f9      
0043a700      if (this->m_num >= eax_1)
0043a700      {
0043a70e          uint8_t result = SmartArray<PrefDisplayModeType,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
0043a70e          
0043a715          if (result == 0)
0043a718              return result;
0043a700      }
0043a700      
0043a723      void* eax_6 = &this->m_data[this->m_num];
0043a72b      *(uint32_t*)eax_6 = arg2->nWidth;
0043a730      *(uint32_t*)((char*)eax_6 + 4) = arg2->nHeight;
0043a736      *(uint32_t*)((char*)eax_6 + 8) = arg2->nSize;
0043a73c      *(uint32_t*)((char*)eax_6 + 0xc) = arg2->nModeDesc;
0043a73f      this->m_num += 1;
0043a742      eax_6 = 1;
0043a745      return 1;
0043a6f0  }

0043a748                          90 90 90 90 90 90 90 90                                                          ........

0043a750  void Device::ForceDisplayResolution(uint8_t const arg1, uint32_t const arg2, uint32_t const arg3)

0043a750  {
0043a758      uint8_t Device::m_bUseForcedResolution_1 = Device::m_bUseForcedResolution;
0043a75e      Device::m_nForcedWidth = arg2;
0043a768      Device::m_nForcedHeight = arg3;
0043a777      bool cond:0 = Render::m_pRenderer == 0;
0043a779      Device::m_bUseForcedResolution = arg1;
0043a779      
0043a77e      if (!(cond:0))
0043a77e      {
0043a780          class Render* edx_1;
0043a780          edx_1 = Device::m_bIsInitialized;
0043a780          
0043a788          if (edx_1 == 0)
0043a788          {
0043a808          label_43a808:
0043a808              
0043a80a              if (Render::m_pRenderer != 0)
0043a80a              {
0043a80c                  class Render* eax_6;
0043a80c                  eax_6 = Device::m_bIsInitialized;
0043a80c                  
0043a813                  if (eax_6 != 0)
0043a81c                      /* tailcall */
0043a81c                      return Device::ChangePresentation();
0043a80a              }
0043a788          }
0043a788          else
0043a788          {
0043a78c              if (arg1 != 0)
0043a78c              {
0043a7a7                  if ((RenderDevice::GetDisplayWidth(RenderDevice::render_device) == Device::m_nForcedWidth && RenderDevice::GetDisplayHeight(RenderDevice::render_device) == Device::m_nForcedHeight))
0043a7bf                      return;
0043a7bf                  
0043a7a7                  goto label_43a808;
0043a78c              }
0043a78c              
0043a790              if (Device::m_bUseForcedResolution_1 != 0)
0043a790              {
0043a7c5                  int32_t var_18_1 = 0x320;
0043a7cd                  int32_t var_14_1 = 0x258;
0043a7df                  void var_1c;
0043a7df                  
0043a7df                  if (Device::LoadDisplayPreferences(&var_1c) == 0)
0043a7df                      goto label_43a808;
0043a7df                  
0043a7f0                  if (RenderDevice::GetDisplayWidth(RenderDevice::render_device) != var_18_1)
0043a7f0                      goto label_43a808;
0043a7f0                  
0043a801                  if (RenderDevice::GetDisplayHeight(RenderDevice::render_device) != var_14_1)
0043a801                      goto label_43a808;
0043a790              }
0043a788          }
0043a77e      }
0043a750  }

0043a821     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0043a830  uint8_t Device::ConsoleCommand_ForceDisplayResolution(class PStringBaseArray<char> const* arg1)

0043a830  {
0043a835      uint32_t m_num = arg1->m_num;
0043a835      
0043a83b      if (m_num == 0)
0043a83b      {
0043a84c          Device::ForceDisplayResolution(0, Device::m_nForcedWidth, Device::m_nForcedHeight);
0043a854          int32_t eax_1;
0043a854          eax_1 = 1;
0043a858          return 1;
0043a83b      }
0043a83b      
0043a85c      if (m_num >= 2)
0043a85c      {
0043a860          class PSRefBufferCharData<char>* m_charbuffer = arg1->m_data->m_charbuffer;
0043a868          int32_t ecx;
0043a868          int32_t var_c_2 = ecx;
0043a86b          class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0043a873          int32_t ecx_2;
0043a873          m_num = PSUtils::is_uint32(InterlockedIncrement(&m_charbuffer[-1]));
0043a873          
0043a87d          if (m_num != 0)
0043a87d          {
0043a881              int32_t eax_5 = *(int32_t*)((char*)arg1->m_data + 4);
0043a884              int32_t var_c_3 = ecx_2;
0043a887              int32_t var_c_4 = eax_5;
0043a887              
0043a899              if (PSUtils::is_uint32(InterlockedIncrement((eax_5 - 0x10))) != 0)
0043a899              {
0043a89b                  class PStringBase<char>* m_data = arg1->m_data;
0043a8a0                  uint32_t eax_8 = PStringBase<char>::to_uint32(&m_data[1]);
0043a8b0                  Device::ForceDisplayResolution(1, PStringBase<char>::to_uint32(m_data), eax_8);
0043a8b8                  int32_t eax_10;
0043a8b8                  eax_10 = 1;
0043a8bc                  return 1;
0043a899              }
0043a87d          }
0043a85c      }
0043a85c      
0043a8be      m_num = 0;
0043a8c1      return 0;
0043a830  }

0043a8c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0043a8d0  void Device::AllowFullScreenMode(uint8_t const arg1)

0043a8d0  {
0043a8d6      bool cond:0 = Render::m_pRenderer == 0;
0043a8dc      Device::m_bAllowFullScreenMode = arg1;
0043a8dc      
0043a8e1      if (!(cond:0))
0043a8e1      {
0043a8e3          class Render* ecx;
0043a8e3          ecx = Device::m_bIsInitialized;
0043a8e3          
0043a8fc          if ((ecx != 0 && (RenderDevice::render_device->m_presentation.FullScreen != 0 && arg1 == 0)))
0043a8fe              /* tailcall */
0043a8fe              return Device::ChangePresentation();
0043a8e1      }
0043a8d0  }

0043a904              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0043a910  uint8_t Device::GetStringFromClipboard(class PStringBase<unsigned short>* arg1)

0043a910  {
0043a918      int32_t ebx;
0043a918      ebx = Device::m_nOSVersion != 2;
0043a91b      int32_t eax;
0043a91b      eax = ebx;
0043a91d      char temp0 = eax;
0043a91d      eax = -(eax);
0043a91d      
0043a933      if (user32_IsClipboardFormatAvailable_Ptr((((eax - eax) & 0xfffffff4) + 0xd)) == 0)
0043a933      {
0043a936          int32_t eax_4;
0043a936          eax_4 = 0;
0043a939          return 0;
0043a933      }
0043a933      
0043a943      OpenClipboard(Device::m_hWnd);
0043a94a      int32_t* hMem = user32_GetClipboardData_Ptr((((eax - eax) & 0xfffffff4) + 0xd));
0043a953      uint32_t* eax_5 = GlobalSize(hMem);
0043a95e      void* eax_6;
0043a95e      void* esi_1;
0043a95e      
0043a95e      if (ebx == 0)
0043a95e      {
0043a9a0          uint32_t i_1 = (eax_5 >> 1);
0043a9a2          eax_6 = GlobalLock(hMem);
0043a9a2          
0043a9ac          if (eax_6 != 0)
0043a9ac          {
0043a9b2              void* eax_9 = operator new[]((i_1 * 2));
0043a9b7              esi_1 = eax_9;
0043a9b7              
0043a9c2              if ((esi_1 != 0 && i_1 > 0))
0043a9c2              {
0043a9db                  uint32_t i;
0043a9db                  
0043a9db                  do
0043a9db                  {
0043a9d4                      *(uint16_t*)eax_9 = *(uint16_t*)(((char*)eax_6 - esi_1) + eax_9);
0043a9d7                      eax_9 += 2;
0043a9da                      i = i_1;
0043a9da                      i_1 -= 1;
0043a9db                  } while (i != 1);
0043a9c2              }
0043a9c2              
0043a9de          label_43a9de:
0043a9de              GlobalUnlock(hMem);
0043a9e4              CloseClipboard();
0043a9f1              PStringBase<unsigned short>::set(arg1, esi_1);
0043a9f7              operator delete[](esi_1);
0043aa0f              class PSRefBufferCharData<unsigned short>* eax_10;
0043aa0f              eax_10 = arg1->m_charbuffer->m_data[0x7ffffffffffffffe] != 1;
0043aa12              return eax_10;
0043a9ac          }
0043a95e      }
0043a95e      else
0043a95e      {
0043a960          eax_6 = GlobalLock(hMem);
0043a960          
0043a96a          if (eax_6 != 0)
0043a96a          {
0043a97c              esi_1 = operator new[]((eax_5 * 2));
0043a97c              
0043a983              if (esi_1 != 0)
0043a983              {
0043a985                  void* eax_8 = nullptr;
0043a985                  
0043a989                  if (eax_5 > 0)
0043a989                  {
0043a99c                      do
0043a99c                      {
0043a995                          *(uint16_t*)((char*)esi_1 + (eax_8 << 1)) = ((int16_t)*(uint8_t*)((char*)eax_8 + eax_6));
0043a999                          eax_8 += 1;
0043a99c                      } while (eax_8 < eax_5);
0043a989                  }
0043a983              }
0043a983              
0043a983              goto label_43a9de;
0043a96a          }
0043a95e      }
0043a96f      eax_6 = 0;
0043a972      return 0;
0043a910  }

0043a98d                                         8d 49 00                                                               .I.
0043a9ca                                8d 9b 00 00 00 00                                                            ......
0043aa13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0043aa20  uint8_t Device::StartupGraphicsEngine(int32_t arg1, int32_t arg2, uint8_t arg3)

0043aa20  {
0043aa2e      PSTR hdc_1;
0043aa2e      
0043aa2e      if (arg3 != 0)
0043aa2e      {
0043aa30          struct DEVMODEA* pdm = nullptr;
0043aa31          hdc_1 = nullptr;
0043aa32          PSTR pszDevice = nullptr;
0043aa33          char const* const pszDriver = "Display";
0043aa38          CreatedHDC hdc = CreateICA(pszDriver, pszDevice, hdc_1, pdm);
0043aa40          enum GET_DEVICE_CAPS_INDEX index = BITSPIXEL;
0043aa42          hdc_1 = hdc;
0043aa43          int32_t eax_1 = GetDeviceCaps(hdc_1, index);
0043aa4c          PSTR hdc_2 = DeleteDC(hdc);
0043aa4c          
0043aa55          if (eax_1 == 0x10)
0043aa9b              Device::Show16BitWarning();
0043aa55          else
0043aa55          {
0043aa5a              if (eax_1 != 0x20)
0043aa5a              {
0043aa5c                  int32_t var_34_2 = 0;
0043aa5d                  hdc_1 = hdc_2;
0043aa60                  pszDevice = &data_794320;
0043aa6a                  pszDevice = PStringBase<unsigned short>::PStringBase<unsigned short>(&hdc_1, pszDevice);
0043aa6d                  pszDriver = &data_794320;
0043aa77                  pszDriver = PStringBase<unsigned short>::PStringBase<unsigned short>(&pszDevice, pszDriver);
0043aa7f                  uint16_t eax_2;
0043aa7f                  class PStringBase<unsigned short> ecx_6;
0043aa7f                  class PStringBase<unsigned short> edx;
0043aa7f                  eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&pszDriver, &data_794320);
0043aa86                  PlatformString::DisplayString(eax_2, edx, ecx_6, 0x7d, pszDriver);
0043aa90                  exit(1);
0043aa90                  /* no return */
0043aa5a              }
0043aa5a              
0043aa99              if (eax_1 <= 0x10)
0043aa9b                  Device::Show16BitWarning();
0043aa55          }
0043aa2e      }
0043aa2e      
0043aaa8      int32_t var_18 = arg1;
0043aaac      bool cond:1 = Device::m_bAllowFullScreenMode == 0;
0043aab2      struct HWND__* Device::m_hWnd_3 = nullptr;
0043aab6      int32_t var_c = 0;
0043aaba      int32_t var_8 = 0x20;
0043aac2      char var_4 = 0;
0043aac6      char var_3 = 0;
0043aaca      char var_2 = 0;
0043aace      struct HWND__* Device::m_hWnd_2 = nullptr;
0043aad2      char var_20 = 1;
0043aad7      char var_1f = 0;
0043aadb      char var_1e = 1;
0043aae0      int32_t var_14 = arg2;
0043aae0      
0043aae4      if (!(cond:1))
0043aaea          char var_10_1 = 1;
0043aaea      
0043aaef      if ((cond:1 || arg3 != 0))
0043aaf1          char var_10_2 = 0;
0043aaf1      
0043ab04      if (Device::LoadDisplayPreferences(&Device::m_hWnd_3) != 0)
0043ab04      {
0043ab06          struct HWND__* Device::m_hWnd_1 = Device::m_hWnd;
0043ab0b          Device::m_hWnd_3 = Device::m_hWnd_1;
0043ab0f          Device::m_hWnd_2 = Device::m_hWnd_1;
0043ab17          class RenderDeviceConfig* var_34_5 = &Device::m_hWnd_2;
0043ab1c          hdc_1 = &Device::m_hWnd_3;
0043ab1c          
0043ab27          if ((Render::StartupRenderingDevice(hdc_1, var_34_5) != 0 && SceneTool::Startup() != 0))
0043ab27          {
0043ab32              Render::Init();
0043ab37              int32_t eax_5;
0043ab37              eax_5 = 1;
0043ab3f              return 1;
0043ab27          }
0043ab04      }
0043ab04      
0043ab48      return 0;
0043aa20  }

0043ab49                             90 90 90 90 90 90 90                                                           .......

0043ab50  uint8_t Device::InitWindow(int32_t arg1, int32_t arg2, uint8_t arg3)

0043ab50  {
0043ab5f      Device::m_bIsReady = 0;
0043ab5f      
0043ab70      if (Device::StartupGraphicsEngine(arg1, arg2, arg3) == 0)
0043ab7c          return 0;
0043ab7c      
0043ab74      Device::m_bIsReady = 1;
0043ab79      return 1;
0043ab50  }

0043ab7d                                                                                         90 90 90                               ...

0043ab80  void _STL::__insertion_sort(uint32_t* arg1, uint32_t* arg2, struct _STL::less<unsigned long> arg3)

0043ab80  {
0043ab8b      if (arg1 != arg2)
0043ab8b      {
0043ab8e          void* esi_1 = &arg1[1];
0043ab8e          
0043ab93          if (esi_1 != arg2)
0043ab93          {
0043ab9b              int32_t edi;
0043ab9b              int32_t var_10_1 = edi;
0043ab9b              
0043abea              do
0043abea              {
0043aba0                  uint32_t edi_2 = *(uint32_t*)esi_1;
0043aba0                  
0043aba4                  if (edi_2 >= *(uint32_t*)arg1)
0043aba4                  {
0043abc5                      uint32_t ecx_4 = *(uint32_t*)((char*)esi_1 - 4);
0043abca                      void* eax_1 = ((char*)esi_1 - 4);
0043abcd                      uint32_t* edx_1 = esi_1;
0043abcd                      
0043abcf                      while (edi_2 < ecx_4)
0043abcf                      {
0043abd1                          *(uint32_t*)edx_1 = ecx_4;
0043abd3                          ecx_4 = *(uint32_t*)((char*)eax_1 - 4);
0043abd6                          edx_1 = eax_1;
0043abd8                          eax_1 -= 4;
0043abcf                      }
0043abcf                      
0043abdf                      *(uint32_t*)edx_1 = edi_2;
0043aba4                  }
0043aba4                  else
0043aba4                  {
0043abac                      if ((((char*)esi_1 + (4 - arg1)) - 4) > 0)
0043abb8                          memmove((((char*)esi_1 - (((char*)esi_1 + (4 - arg1)) - 4)) + 4), arg1, (((char*)esi_1 + (4 - arg1)) - 4));
0043abb8                      
0043abc1                      *(uint32_t*)arg1 = edi_2;
0043aba4                  }
0043aba4                  
0043abe5                  esi_1 += 4;
0043abea              } while (esi_1 != arg2);
0043ab93          }
0043ab8b      }
0043ab80  }

0043abf1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0043ac00  void _STL::__linear_insert(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct PrefDisplayModeType arg3, struct _STL::less<PrefDisplayModeType> arg4)

0043ac00  {
0043ac01      struct PrefDisplayModeType* esi = arg1;
0043ac09      uint32_t nSize = arg3.nSize;
0043ac09      
0043ac0f      if (nSize >= esi->nSize)
0043ac0f      {
0043ac5c          uint32_t nHeight = arg3.nHeight;
0043ac63          uint32_t nSize_1 = nSize;
0043ac67          uint32_t nModeDesc = arg3.nModeDesc;
0043ac6a          _STL::__unguarded_linear_insert(arg2, arg3.nWidth, arg4);
0043ac74          return;
0043ac0f      }
0043ac0f      
0043ac22      _STL::__copy_backward(esi, arg2, &arg2[1], &arg1, nullptr);
0043ac33      esi->nWidth = arg3.nWidth;
0043ac35      esi->nHeight = arg3.nHeight;
0043ac38      esi->nSize = nSize;
0043ac3e      esi->nModeDesc = arg3.nModeDesc;
0043ac00  }

0043ac75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0043ac80  void _STL::sort_heap(uint32_t* arg1, uint32_t* arg2, struct _STL::less<unsigned long> arg3)

0043ac80  {
0043ac89      void* eax = ((char*)arg2 - arg1);
0043ac89      
0043ac93      if ((eax & 0xfffffffc) > 4)
0043ac93      {
0043acca          void* edi_1;
0043acca          
0043acca          do
0043acca          {
0043aca0              uint32_t ecx_2 = *(uint32_t*)(((char*)arg1 + eax) - 4);
0043aca6              edi_1 = ((char*)eax - 4);
0043aca9              *(uint32_t*)(((char*)arg1 + eax) - 4) = *(uint32_t*)arg1;
0043acb8              _STL::__adjust_heap(arg1, 0, (edi_1 >> 2), ecx_2, arg3);
0043acbd              eax = edi_1;
0043acca          } while ((edi_1 & 0xfffffffc) > 4);
0043ac93      }
0043ac80  }

0043ac9d                                                                                         8d 49 00                               .I.

0043acd0  void _STL::sort_heap(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct _STL::less<PrefDisplayModeType> arg3)

0043acd0  {
0043acde      void* ecx = ((char*)arg2 - arg1);
0043acde      
0043ace9      if ((ecx & 0xfffffff0) > 0x10)
0043ace9      {
0043ad5c          void* edi_5;
0043ad5c          
0043ad5c          do
0043ad5c          {
0043acf6              int32_t edx_1 = *(uint32_t*)(((char*)arg1 + ecx) - 0x10);
0043acf8              int32_t ebx_1 = *(uint32_t*)(((char*)arg1 + ecx) - 0xc);
0043acfb              int32_t ebp_1 = *(uint32_t*)(((char*)arg1 + ecx) - 8);
0043acfe              int32_t edi_2 = *(uint32_t*)(((char*)arg1 + ecx) - 4);
0043ad0d              *(uint32_t*)(((char*)arg1 + ecx) - 0x10) = arg1->nWidth;
0043ad12              *(uint32_t*)(((char*)arg1 + ecx) - 0xc) = arg1->nHeight;
0043ad18              *(uint32_t*)(((char*)arg1 + ecx) - 8) = arg1->nSize;
0043ad1e              *(uint32_t*)(((char*)arg1 + ecx) - 4) = arg1->nModeDesc;
0043ad21              edi_5 = ((char*)ecx - 0x10);
0043ad38              int32_t var_30_1 = ebx_1;
0043ad3b              int32_t var_2c_1 = ebp_1;
0043ad3e              int32_t var_28_1 = edi_2;
0043ad4a              _STL::__adjust_heap(arg1, 0, (edi_5 >> 4), edx_1, arg3);
0043ad4f              ecx = edi_5;
0043ad5c          } while ((edi_5 & 0xfffffff0) > 0x10);
0043ace9      }
0043acd0  }

0043aced                                         8d 49 00                                                               .I.
0043ad66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0043ad70  void _STL::__insertion_sort(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct _STL::less<PrefDisplayModeType> arg3)

0043ad70  {
0043ad7e      if (arg1 != arg2)
0043ad7e      {
0043ad85          for (void* __offset(PrefDisplayModeType, 0x10) i = &arg1[1]; i != arg2; i += 0x10)
0043ad85          {
0043ad9f              int32_t var_20_1 = *(int32_t*)((char*)ADJ(i) + 0x14);
0043ada8              int32_t var_1c_1 = *(int32_t*)((char*)ADJ(i) + 0x18);
0043adad              int32_t var_18_1 = *(int32_t*)((char*)ADJ(i) + 0x1c);
0043adb0              _STL::__linear_insert(arg1, i, *(int32_t*)((char*)ADJ(i) + 0x10), arg3);
0043ad85          }
0043ad7e      }
0043ad70  }

0043ad8d                                         8d 49 00                                                               .I.
0043adc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0043add0  void _STL::__partial_sort(uint32_t* arg1, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4, struct _STL::less<unsigned long> arg5)

0043add0  {
0043add6      struct _STL::less<unsigned long> ebp = arg5;
0043ade7      _STL::__make_heap(arg1, arg2, ebp, nullptr, nullptr);
0043adf5      uint32_t* edi = arg2;
0043adf5      
0043adf7      if (arg2 < arg3)
0043adf7      {
0043ae28          do
0043ae28          {
0043ae00              uint32_t eax_1 = *(uint32_t*)edi;
0043ae02              uint32_t ecx_1 = *(uint32_t*)arg1;
0043ae02              
0043ae06              if (eax_1 < ecx_1)
0043ae06              {
0043ae15                  *(uint32_t*)edi = ecx_1;
0043ae17                  _STL::__adjust_heap(arg1, 0, (((char*)arg2 - arg1) >> 2), eax_1, ebp);
0043ae06              }
0043ae06              
0043ae23              edi = &edi[1];
0043ae28          } while (edi < arg3);
0043adf7      }
0043adf7      
0043ae2d      _STL::sort_heap(arg1, arg2, ebp);
0043add0  }

0043ae3a                                                                                90 90 90 90 90 90                            ......

0043ae40  void _STL::__partial_sort(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct PrefDisplayModeType* arg3, struct PrefDisplayModeType* arg4, struct _STL::less<PrefDisplayModeType> arg5)

0043ae40  {
0043ae44      struct PrefDisplayModeType* ebx = arg2;
0043ae49      struct _STL::less<PrefDisplayModeType> ebp = arg5;
0043ae5a      _STL::__make_heap(arg1, ebx, ebp, nullptr, nullptr);
0043ae68      struct PrefDisplayModeType* edi = ebx;
0043ae68      
0043ae6a      if (ebx < arg3)
0043ae6a      {
0043aee4          do
0043aee4          {
0043ae76              if (edi->nSize < arg1->nSize)
0043ae76              {
0043ae7a                  uint32_t nWidth = edi->nWidth;
0043ae7c                  uint32_t nHeight = edi->nHeight;
0043ae7f                  uint32_t nSize = edi->nSize;
0043ae82                  uint32_t nModeDesc = edi->nModeDesc;
0043ae93                  edi->nWidth = arg1->nWidth;
0043ae98                  edi->nHeight = arg1->nHeight;
0043ae9e                  edi->nSize = arg1->nSize;
0043aea4                  ebp = arg5;
0043aea8                  edi->nModeDesc = arg1->nModeDesc;
0043aeab                  ebx = arg2;
0043aebb                  uint32_t nHeight_1 = nHeight;
0043aec2                  uint32_t nSize_1 = nSize;
0043aec5                  uint32_t nModeDesc_1 = nModeDesc;
0043aed3                  _STL::__adjust_heap(arg1, 0, (((char*)ebx - arg1) >> 4), nWidth, ebp);
0043ae76              }
0043ae76              
0043aedf              edi = &edi[1];
0043aee4          } while (edi < arg3);
0043ae6a      }
0043ae6a      
0043aee9      _STL::sort_heap(arg1, ebx, ebp);
0043ae40  }

0043aef9                                                                             90 90 90 90 90 90 90                           .......

0043af00  void _STL::__introsort_loop(uint32_t* arg1, uint32_t* arg2, uint32_t* arg3, int32_t arg4, struct _STL::less<unsigned long> arg5)

0043af00  {
0043af01      uint32_t* ebx = arg2;
0043af01      
0043af14      if ((((char*)ebx - arg1) & 0xfffffffc) > 0x40)
0043af14      {
0043af1b          int32_t i = arg4;
0043af1b          
0043af22          while (i != 0)
0043af22          {
0043af24              uint32_t ecx_1 = *(uint32_t*)arg1;
0043af2d              int32_t eax_6;
0043af2d              int32_t edx_1;
0043af2d              edx_1 = HIGHD(((int64_t)(((char*)ebx - arg1) >> 2)));
0043af2d              eax_6 = LOWD(((int64_t)(((char*)ebx - arg1) >> 2)));
0043af30              int32_t eax_8 = ((eax_6 - edx_1) >> 1);
0043af32              int32_t edx_2 = arg1[eax_8];
0043af38              void* eax_9 = &arg1[eax_8];
0043af42              int32_t ebp_2 = ebx[-1];
0043af42              
0043af44              if (ecx_1 >= edx_2)
0043af44              {
0043af52                  if (ecx_1 < ebp_2)
0043af54                      eax_9 = arg1;
0043af52                  else if (edx_2 < ebp_2)
0043af5c                      eax_9 = &ebx[-1];
0043af44              }
0043af44              else if (edx_2 >= ebp_2)
0043af48              {
0043af4c                  if (ecx_1 >= ebp_2)
0043af54                      eax_9 = arg1;
0043af4c                  else
0043af5c                      eax_9 = &ebx[-1];
0043af48              }
0043af48              
0043af5e              struct _STL::less<unsigned long> ebp_3 = arg5;
0043af68              uint32_t* eax_10 = _STL::__unguarded_partition(arg1, ebx, *(uint32_t*)eax_9, ebp_3);
0043af6e              i -= 1;
0043af79              _STL::__introsort_loop(eax_10, ebx, nullptr, i, ebp_3);
0043af7e              ebx = eax_10;
0043af7e              
0043af8b              if ((((char*)eax_10 - arg1) & 0xfffffffc) <= 0x40)
0043af91                  return;
0043af22          }
0043af22          
0043af9c          _STL::__partial_sort(arg1, ebx, ebx, nullptr, arg5);
0043af14      }
0043af00  }

0043afa9                             90 90 90 90 90 90 90                                                           .......

0043afb0  void _STL::__introsort_loop(struct PrefDisplayModeType* arg1, struct PrefDisplayModeType* arg2, struct PrefDisplayModeType* arg3, int32_t arg4, struct _STL::less<PrefDisplayModeType> arg5)

0043afb0  {
0043afb1      struct PrefDisplayModeType* ebx = arg2;
0043afb1      
0043afc8      if ((((char*)ebx - arg1) & 0xfffffff0) > 0x100)
0043afc8      {
0043afce          int32_t i = arg4;
0043afce          
0043afd4          while (i != 0)
0043afd4          {
0043afda              uint32_t nSize = arg1->nSize;
0043afe4              int32_t eax_6;
0043afe4              int32_t edx_1;
0043afe4              edx_1 = HIGHD(((int64_t)(((char*)ebx - arg1) >> 4)));
0043afe4              eax_6 = LOWD(((int64_t)(((char*)ebx - arg1) >> 4)));
0043afe9              int32_t eax_9 = (((eax_6 - edx_1) >> 1) << 4);
0043afec              int32_t edx_2 = *(uint32_t*)(&arg1->nSize + eax_9);
0043aff0              void* eax_10 = (eax_9 + arg1);
0043affc              int32_t ebp_2 = *(int32_t*)((char*)ebx + -8);
0043affc              
0043afff              if (nSize >= edx_2)
0043afff              {
0043b00d                  if (nSize < ebp_2)
0043b00f                      eax_10 = arg1;
0043b00d                  else if (edx_2 < ebp_2)
0043b017                      eax_10 = &ebx[-1];
0043afff              }
0043afff              else if (edx_2 >= ebp_2)
0043b003              {
0043b007                  if (nSize >= ebp_2)
0043b00f                      eax_10 = arg1;
0043b007                  else
0043b017                      eax_10 = &ebx[-1];
0043b003              }
0043b003              
0043b019              struct _STL::less<PrefDisplayModeType> ebp_3 = arg5;
0043b02a              int32_t var_20_1 = *(uint32_t*)((char*)eax_10 + 4);
0043b033              int32_t var_1c_1 = *(uint32_t*)((char*)eax_10 + 8);
0043b038              int32_t var_18_1 = *(uint32_t*)((char*)eax_10 + 0xc);
0043b03b              struct PrefDisplayModeType* eax_12 = _STL::__unguarded_partition(arg1, ebx, *(uint32_t*)eax_10, ebp_3);
0043b041              i -= 1;
0043b04c              _STL::__introsort_loop(eax_12, ebx, nullptr, i, ebp_3);
0043b051              ebx = eax_12;
0043b051              
0043b061              if ((((char*)eax_12 - arg1) & 0xfffffff0) <= 0x100)
0043b06b                  return;
0043afd4          }
0043afd4          
0043b076          _STL::__partial_sort(arg1, ebx, ebx, nullptr, arg5);
0043afc8      }
0043afb0  }

0043b083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0043b090  uint8_t Device::InitializeDisplayPreferences()

0043b090  {
0043b094      class Render* Render::m_pRenderer_1 = Render::m_pRenderer;
0043b09a      uint32_t* edx = nullptr;
0043b09a      
0043b09e      if (Render::m_pRenderer_1 == 0)
0043b09e      {
0043b815          int32_t eax;
0043b815          eax = 0;
0043b81b          return 0;
0043b09e      }
0043b09e      
0043b0a6      int32_t* s_2 = nullptr;
0043b0a8      uint32_t i_12 = 0;
0043b0ad      int32_t* s;
0043b0ad      __builtin_memset(&s, 0, 0x18);
0043b0c5      uint32_t m_num = Render::m_pRenderer_1->m_DisplayModes.m_num;
0043b0ce      uint8_t* var_7c = nullptr;
0043b0d2      class PStringBase<char>* var_74;
0043b0d2      int32_t* var_6c;
0043b0d2      void* var_60;
0043b0d2      uint32_t i_2;
0043b0d2      void* var_44;
0043b0d2      
0043b0d2      if ((m_num + 1) > 0)
0043b0d2      {
0043b0d8          int32_t* esi_1 = nullptr;
0043b0da          var_6c = nullptr;
0043b0da          
0043b1d8          do
0043b1d8          {
0043b0e4              void* ecx_5;
0043b0e4              int32_t edx_1;
0043b0e4              
0043b0e4              if (var_7c >= m_num)
0043b0e4              {
0043b147                  ecx_5 = 0x400;
0043b14c                  edx_1 = 0x300;
0043b151                  var_74 = nullptr;
0043b15e              label_43b15e:
0043b15e                  int32_t var_58_1 = (edx_1 * ecx_5);
0043b169                  int32_t var_54_1 = ((ecx_5 << 0x10) | edx_1);
0043b16d                  int32_t eax_10 = 0;
0043b171                  var_60 = ecx_5;
0043b175                  int32_t var_5c_1 = edx_1;
0043b175                  
0043b179                  if (i_12 > 0)
0043b179                  {
0043b17b                      int32_t* s_3 = s_2;
0043b17b                      
0043b187                      while ((*(uint32_t*)s_3 != ecx_5 || s_3[1] != edx_1))
0043b187                      {
0043b189                          eax_10 += 1;
0043b18a                          s_3 = &s_3[4];
0043b18a                          
0043b18f                          if (eax_10 >= i_12)
0043b18f                              goto label_43b1a1;
0043b187                      }
0043b179                  }
0043b179                  
0043b196                  if ((i_12 <= 0 || eax_10 == 0xffffffff))
0043b196                  {
0043b1a1                  label_43b1a1:
0043b1a1                      SmartArray<PrefDisplayModeType,1>::AddToEnd(&s, &var_60);
0043b196                  }
0043b196                  
0043b1af                  SmartArray<unsigned long,1>::add_unique(&var_44, &var_74);
0043b1b4                  i_12 = i_2;
0043b1b8                  s_2 = s;
0043b1bc                  esi_1 = var_6c;
0043b0e4              }
0043b0e4              else
0043b0e4              {
0043b0e6                  class RenderDisplayModeType* m_data = Render::m_pRenderer_1->m_DisplayModes.m_data;
0043b0e6                  
0043b101                  if ((*(uint32_t*)((char*)esi_1 + m_data) >= 0x320 && *(uint32_t*)(&m_data->nHeight + esi_1) >= 0x258))
0043b101                  {
0043b10b                      void var_38;
0043b10b                      AvailableProperty::AvailableProperty(&var_38);
0043b11b                      PixelFormatDesc::SetFormat(&var_38, *(uint32_t*)(&Render::m_pRenderer_1->m_DisplayModes.m_data->Format + esi_1));
0043b125                      s_2 = s;
0043b129                      i_12 = i_2;
0043b12d                      char var_2c;
0043b12d                      
0043b12d                      if (var_2c >= 0x20)
0043b12d                      {
0043b133                          class RenderDisplayModeType* m_data_1 = Render::m_pRenderer_1->m_DisplayModes.m_data;
0043b135                          ecx_5 = *(uint32_t*)((char*)esi_1 + m_data_1);
0043b138                          void* eax_3 = ((char*)esi_1 + m_data_1);
0043b13b                          edx_1 = *(uint32_t*)((char*)eax_3 + 4);
0043b141                          var_74 = *(uint32_t*)((char*)eax_3 + 0xc);
0043b145                          goto label_43b15e;
0043b12d                      }
0043b101                  }
0043b0e4              }
0043b1c4              m_num = Render::m_pRenderer_1->m_DisplayModes.m_num;
0043b1c8              esi_1 = &esi_1[4];
0043b1d0              var_7c = &var_7c[1];
0043b1d4              var_6c = esi_1;
0043b1d8          } while (&var_7c[1] < (m_num + 1));
0043b1d8          
0043b1de          edx = var_44;
0043b0d2      }
0043b0d2      
0043b1e7      void* esi_4 = &s_2[(i_12 * 4)];
0043b1e7      
0043b1eb      if (s_2 != esi_4)
0043b1eb      {
0043b1ef          int32_t edi_3 = ((char*)esi_4 - s_2);
0043b1f3          int32_t i = (edi_3 >> 4);
0043b1f6          int32_t ecx_11 = 0;
0043b1f6          
0043b1fb          if (i != 1)
0043b1fb          {
0043b1fd              ecx_11 = 0;
0043b1fd              
0043b206              do
0043b206              {
0043b200                  i s>>= 1;
0043b202                  ecx_11 += 1;
0043b206              } while (i != 1);
0043b1fb          }
0043b1fb          
0043b214          _STL::__introsort_loop(s_2, esi_4, nullptr, (ecx_11 * 2), ((int8_t)var_6c));
0043b214          
0043b225          if ((edi_3 & 0xfffffff0) <= 0x100)
0043b24f              _STL::__insertion_sort(s_2, esi_4, ((int8_t)var_6c));
0043b225          else
0043b225          {
0043b227              char ebx = ((int8_t)var_6c);
0043b234              _STL::__insertion_sort(s_2, &s_2[0x40], ebx);
0043b23e              _STL::__unguarded_insertion_sort_aux(&s_2[0x40], esi_4, nullptr, ebx);
0043b225          }
0043b225          
0043b257          edx = var_44;
0043b1eb      }
0043b1eb      
0043b25f      uint32_t var_3c;
0043b25f      class PStringBase<char>* edi_6 = &edx[var_3c];
0043b25f      
0043b266      if (edx != edi_6)
0043b266      {
0043b26a          void* esi_6 = ((char*)edi_6 - edx);
0043b26e          int32_t i_1 = (esi_6 >> 2);
0043b271          int32_t ecx_13 = 0;
0043b271          
0043b276          while (i_1 != 1)
0043b276          {
0043b278              i_1 s>>= 1;
0043b27a              ecx_13 += 1;
0043b276          }
0043b276          
0043b28c          _STL::__introsort_loop(edx, edi_6, nullptr, (ecx_13 * 2), ((int8_t)var_6c));
0043b28c          
0043b29a          if ((esi_6 & 0xfffffffc) <= 0x40)
0043b2c1              _STL::__insertion_sort(edx, edi_6, ((int8_t)var_6c));
0043b29a          else
0043b29a          {
0043b29c              char ebp = ((int8_t)var_6c);
0043b2a6              _STL::__insertion_sort(edx, &edx[0x10], ebp);
0043b2b0              _STL::__unguarded_insertion_sort_aux(&edx[0x10], edi_6, nullptr, ebp);
0043b29a          }
0043b266      }
0043b266      
0043b2d4      var_74 = nullptr;
0043b2d8      int32_t var_70 = 0;
0043b2dc      FixedArray<PStringBase<char> >::Create(&var_74, i_2);
0043b2ed      void* eax_17 = operator new[]((i_2 << 2));
0043b2ff      var_6c = 0xffffffff;
0043b307      var_7c = nullptr;
0043b307      
0043b30b      if (i_2 > 0)
0043b30b      {
0043b30d          void* ebp_1 = eax_17;
0043b315          edi_6 = nullptr;
0043b317          void* ebx_3 = ((char*)var_74 - ebp_1);
0043b317          
0043b37a          do
0043b37a          {
0043b320              int32_t* s_1 = s;
0043b32b              void* esi_9 = ((char*)edi_6 + s_1);
0043b32e              int32_t var_90_12 = *(uint32_t*)(((char*)edi_6 + s_1) + 4);
0043b32f              int32_t var_94_7 = *(uint32_t*)((char*)edi_6 + s_1);
0043b339              PStringBase<char>::sprintf(((char*)ebx_3 + ebp_1), "%ix%i");
0043b346              *(uint32_t*)ebp_1 = *(uint32_t*)(((char*)edi_6 + s) + 0xc);
0043b346              
0043b35c              if ((*(uint32_t*)esi_9 == 0x400 && *(uint32_t*)((char*)esi_9 + 4) == 0x300))
0043b361                  var_6c = *(uint32_t*)((char*)esi_9 + 0xc);
0043b361              
0043b36e              edi_6 = &edi_6[4];
0043b371              ebp_1 += 4;
0043b376              var_7c = &var_7c[1];
0043b37a          } while (&var_7c[1] < i_2);
0043b30b      }
0043b30b      
0043b380      int32_t esi_10 = 0;
0043b387      var_7c = nullptr;
0043b38b      int32_t var_78 = 0;
0043b38f      FixedArray<PStringBase<char> >::Create(&var_7c, var_3c);
0043b3a0      void* eax_25 = operator new[]((var_3c << 2));
0043b3a5      class PStringBase<char>* ebp_2 = var_7c;
0043b3a9      var_60 = eax_25;
0043b3a9      
0043b3b6      if (var_3c > 0)
0043b3b6      {
0043b3bc          int32_t* ebx_5 = ((char*)var_60 - ebp_2);
0043b3bc          
0043b3fd          do
0043b3fd          {
0043b3c4              int32_t eax_27 = *(uint32_t*)((char*)var_44 + (esi_10 << 2));
0043b3c9              edi_6 = &ebp_2[esi_10];
0043b3c9              
0043b3cd              if (eax_27 != 0)
0043b3cd              {
0043b3dd                  int32_t var_90_15 = eax_27;
0043b3e4                  PStringBase<char>::sprintf(edi_6, "%ihz");
0043b3cd              }
0043b3cd              else
0043b3d6                  PStringBase<char>::set(edi_6, "Auto");
0043b3d6              
0043b3f3              *(uint32_t*)((char*)ebx_5 + edi_6) = *(uint32_t*)((char*)var_44 + (esi_10 << 2));
0043b3fa              esi_10 += 1;
0043b3fd          } while (esi_10 < var_3c);
0043b3b6      }
0043b3b6      
0043b3ff      int32_t* ecx_24 = var_6c;
0043b403      char const* const eax_30 = "Selects display resolution";
0043b408      Device::m_DisplayPrefs.FullScreen = 1;
0043b40f      Device::m_DisplayPrefs.Resolution = ecx_24;
0043b415      Device::m_DisplayPrefs.RefreshRate = 0;
0043b415      
0043b427      do
0043b427      {
0043b422          ecx_24 = *(uint8_t*)eax_30;
0043b424          eax_30 = &eax_30[1];
0043b427      } while (ecx_24 != 0);
0043b427      
0043b430      PStringBase<char>::allocate_ref_buffer(&var_7c, (eax_30 - "elects display resolution"));
0043b435      uint8_t* edx_10 = var_7c;
0043b439      char const* const ecx_26 = "Selects display resolution";
0043b448      uint8_t i_3;
0043b448      
0043b448      do
0043b448      {
0043b440          i_3 = *(uint8_t*)ecx_26;
0043b442          ecx_26 = &ecx_26[1];
0043b443          *(uint8_t*)edx_10 = i_3;
0043b445          edx_10 = &edx_10[1];
0043b448      } while (i_3 != 0);
0043b46c      GlobalRegistry::RegisterVariableInternal(&Device::m_DisplayPrefs, GRVDataType_UInt32, &Display_Resolution, &var_7c, nullptr, i_2, var_74, eax_17);
0043b471      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
0043b471      
0043b47b      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
0043b47b      {
0043b482          void* eax_33 = operator new(0x8100);
0043b482          
0043b48c          if (eax_33 == 0)
0043b497              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
0043b48c          else
0043b490              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_33);
0043b490          
0043b499          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
0043b47b      }
0043b47b      
0043b4b1      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, &Display_Resolution, &var_6c) != 0)
0043b4b1      {
0043b4b9          void* eax_35 = *(uint32_t*)(*(uint32_t*)var_6c + 0x44)();
0043b4b9          
0043b4be          if (eax_35 != 0)
0043b4c0              *(uint8_t*)((char*)eax_35 + 0x28) = 1;
0043b4b1      }
0043b4b1      
0043b4ce      void* esi_12 = &var_7c[0xffffffec];
0043b4ce      
0043b4dd      if ((InterlockedDecrement(((char*)esi_12 + 4)) == 0 && esi_12 != 0))
0043b4e5          **(uint32_t**)esi_12(1);
0043b4e5      
0043b4e7      char const* const eax_38 = "Enables full screen mode";
0043b4f5      char const i_4;
0043b4f5      
0043b4f5      do
0043b4f5      {
0043b4f0          i_4 = *(uint8_t*)eax_38;
0043b4f2          eax_38 = &eax_38[1];
0043b4f5      } while (i_4 != 0);
0043b4fe      PStringBase<char>::allocate_ref_buffer(&var_7c, (eax_38 - "nables full screen mode"));
0043b503      uint8_t* edx_14 = var_7c;
0043b507      char const* const ecx_33 = "Enables full screen mode";
0043b518      uint8_t i_5;
0043b518      
0043b518      do
0043b518      {
0043b510          i_5 = *(uint8_t*)ecx_33;
0043b512          ecx_33 = &ecx_33[1];
0043b513          *(uint8_t*)edx_14 = i_5;
0043b515          edx_14 = &edx_14[1];
0043b518      } while (i_5 != 0);
0043b533      GlobalRegistry::RegisterVariableInternal(&Device::m_DisplayPrefs.FullScreen, GRVDataType_Bool, &Display_FullScreen, &var_7c, nullptr, 0, nullptr, nullptr);
0043b538      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry;
0043b538      
0043b542      if (GlobalRegistry::s_pcGlobalRegistry_2 == 0)
0043b542      {
0043b549          void* eax_40 = operator new(0x8100);
0043b549          
0043b553          if (eax_40 == 0)
0043b55e              GlobalRegistry::s_pcGlobalRegistry_2 = nullptr;
0043b553          else
0043b557              GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistryInstance::GlobalRegistryInstance(eax_40);
0043b557          
0043b560          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_2;
0043b542      }
0043b542      
0043b578      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_2, &Display_FullScreen, &var_6c) != 0)
0043b578      {
0043b580          void* eax_42 = *(uint32_t*)(*(uint32_t*)var_6c + 0x44)();
0043b580          
0043b585          if (eax_42 != 0)
0043b587              *(uint8_t*)((char*)eax_42 + 0x28) = 1;
0043b578      }
0043b578      
0043b58f      void* esi_14 = &var_7c[0xffffffec];
0043b58f      
0043b59e      if ((InterlockedDecrement(((char*)esi_14 + 4)) == 0 && esi_14 != 0))
0043b5a6          **(uint32_t**)esi_14(1);
0043b5a6      
0043b5a8      char const* const eax_45 = "Selects full screen refresh rate…";
0043b5b5      char const i_6;
0043b5b5      
0043b5b5      do
0043b5b5      {
0043b5b0          i_6 = *(uint8_t*)eax_45;
0043b5b2          eax_45 = &eax_45[1];
0043b5b5      } while (i_6 != 0);
0043b5be      PStringBase<char>::allocate_ref_buffer(&var_7c, (eax_45 - "elects full screen refresh rate."));
0043b5c3      uint8_t* edx_17 = var_7c;
0043b5c7      char const* const ecx_39 = "Selects full screen refresh rate…";
0043b5d8      uint8_t i_7;
0043b5d8      
0043b5d8      do
0043b5d8      {
0043b5d0          i_7 = *(uint8_t*)ecx_39;
0043b5d2          ecx_39 = &ecx_39[1];
0043b5d3          *(uint8_t*)edx_17 = i_7;
0043b5d5          edx_17 = &edx_17[1];
0043b5d8      } while (i_7 != 0);
0043b5da      void* ebx_6 = var_60;
0043b5f8      GlobalRegistry::RegisterVariableInternal(&Device::m_DisplayPrefs.RefreshRate, GRVDataType_UInt32, &Display_RefreshRate, &var_7c, nullptr, var_3c, ebp_2, ebx_6);
0043b5fd      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_3 = GlobalRegistry::s_pcGlobalRegistry;
0043b5fd      
0043b607      if (GlobalRegistry::s_pcGlobalRegistry_3 == 0)
0043b607      {
0043b60e          void* eax_48 = operator new(0x8100);
0043b60e          
0043b618          if (eax_48 == 0)
0043b623              GlobalRegistry::s_pcGlobalRegistry_3 = nullptr;
0043b618          else
0043b61c              GlobalRegistry::s_pcGlobalRegistry_3 = GlobalRegistryInstance::GlobalRegistryInstance(eax_48);
0043b61c          
0043b625          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_3;
0043b607      }
0043b607      
0043b63d      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_3, &Display_RefreshRate, &var_6c) != 0)
0043b63d      {
0043b645          void* eax_51 = *(uint32_t*)(*(uint32_t*)var_6c + 0x44)();
0043b645          
0043b64a          if (eax_51 != 0)
0043b64c              *(uint8_t*)((char*)eax_51 + 0x28) = 1;
0043b63d      }
0043b63d      
0043b654      void* esi_16 = &var_7c[0xffffffec];
0043b654      
0043b663      if ((InterlockedDecrement(((char*)esi_16 + 4)) == 0 && esi_16 != 0))
0043b66b          **(uint32_t**)esi_16(1);
0043b66b      
0043b66d      char const* const eax_53 = "Syncs frames with the display's …";
0043b67a      char const i_8;
0043b67a      
0043b67a      do
0043b67a      {
0043b675          i_8 = *(uint8_t*)eax_53;
0043b677          eax_53 = &eax_53[1];
0043b67a      } while (i_8 != 0);
0043b683      PStringBase<char>::allocate_ref_buffer(&var_7c, (eax_53 - "yncs frames with the display's v…"));
0043b688      uint8_t* edx_19 = var_7c;
0043b68c      char const* const ecx_46 = "Syncs frames with the display's …";
0043b699      uint8_t i_9;
0043b699      
0043b699      do
0043b699      {
0043b691          i_9 = *(uint8_t*)ecx_46;
0043b693          ecx_46 = &ecx_46[1];
0043b694          *(uint8_t*)edx_19 = i_9;
0043b696          edx_19 = &edx_19[1];
0043b699      } while (i_9 != 0);
0043b6b4      GlobalRegistry::RegisterVariableInternal(&Device::m_DisplayPrefs.SyncToRefresh, GRVDataType_Bool, &Display_SyncToRefresh, &var_7c, nullptr, 0, nullptr, nullptr);
0043b6b9      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_4 = GlobalRegistry::s_pcGlobalRegistry;
0043b6b9      
0043b6c3      if (GlobalRegistry::s_pcGlobalRegistry_4 == 0)
0043b6c3      {
0043b6ca          class GlobalRegistryInstance* eax_55 = operator new(0x8100);
0043b6ca          
0043b6d4          if (eax_55 == 0)
0043b6df              GlobalRegistry::s_pcGlobalRegistry_4 = nullptr;
0043b6d4          else
0043b6d8              GlobalRegistry::s_pcGlobalRegistry_4 = GlobalRegistryInstance::GlobalRegistryInstance(eax_55);
0043b6d8          
0043b6e1          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_4;
0043b6c3      }
0043b6c3      
0043b6f9      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_4, &Display_SyncToRefresh, &var_6c) != 0)
0043b6f9      {
0043b701          void* eax_57 = *(uint32_t*)(*(uint32_t*)var_6c + 0x44)();
0043b701          
0043b706          if (eax_57 != 0)
0043b708              *(uint8_t*)((char*)eax_57 + 0x28) = 1;
0043b6f9      }
0043b6f9      
0043b710      void* esi_18 = &var_7c[0xffffffec];
0043b710      
0043b71f      if ((InterlockedDecrement(((char*)esi_18 + 4)) == 0 && esi_18 != 0))
0043b727          **(uint32_t**)esi_18(1);
0043b727      
0043b72a      operator delete[](ebx_6);
0043b72a      
0043b734      if (ebp_2 != 0)
0043b734      {
0043b736          int32_t m_charbuffer = ebp_2->m_charbuffer;
0043b73c          void* edi_9 = &ebp_2[m_charbuffer];
0043b73c          
0043b741          if ((m_charbuffer - 1) >= 0)
0043b741          {
0043b743              int32_t ebp_3 = m_charbuffer;
0043b76a              int32_t i_10;
0043b76a              
0043b76a              do
0043b76a              {
0043b746                  int32_t esi_19 = *(uint32_t*)((char*)edi_9 - 4);
0043b749                  edi_9 -= 4;
0043b749                  
0043b75f                  if ((InterlockedDecrement((esi_19 - 0x10)) == 0 && esi_19 != 0x14))
0043b767                      **(uint32_t**)(esi_19 - 0x14)(1);
0043b767                  
0043b769                  i_10 = ebp_3;
0043b769                  ebp_3 -= 1;
0043b76a              } while (i_10 != 1);
0043b741          }
0043b741          
0043b76d          operator delete[](&ebp_2[-1]);
0043b734      }
0043b734      
0043b77a      operator delete[](eax_17);
0043b77f      class PStringBase<char>* eax_64 = var_74;
0043b77f      
0043b788      if (eax_64 != 0)
0043b788      {
0043b78c          int32_t m_charbuffer_1 = eax_64->m_charbuffer;
0043b792          void* edi_11 = &eax_64[m_charbuffer_1];
0043b792          
0043b796          if ((m_charbuffer_1 - 1) >= 0)
0043b796          {
0043b798              int32_t ebp_4 = m_charbuffer_1;
0043b7c4              int32_t i_11;
0043b7c4              
0043b7c4              do
0043b7c4              {
0043b7a0                  int32_t esi_21 = *(uint32_t*)((char*)edi_11 - 4);
0043b7a3                  edi_11 -= 4;
0043b7a3                  
0043b7b9                  if ((InterlockedDecrement((esi_21 - 0x10)) == 0 && esi_21 != 0x14))
0043b7c1                      **(uint32_t**)(esi_21 - 0x14)(1);
0043b7c1                  
0043b7c3                  i_11 = ebp_4;
0043b7c3                  ebp_4 -= 1;
0043b7c4              } while (i_11 != 1);
0043b796          }
0043b796          
0043b7c7          operator delete[](&eax_64[-1]);
0043b788      }
0043b788      
0043b7e0      int32_t var_40;
0043b7e0      
0043b7e0      if ((var_40 & 0x80000000) == 0x80000000)
0043b7e7          operator delete[](var_44);
0043b7e7      
0043b7ff      int32_t var_4c;
0043b7ff      
0043b7ff      if ((var_4c & 0x80000000) == 0x80000000)
0043b806          operator delete[](s);
0043b806      
0043b80e      int32_t eax_68;
0043b80e      eax_68 = 1;
0043b814      return 1;
0043b090  }

0043b79d                                                                                         8d 49 00                               .I.
0043b81c                                                                                      90 90 90 90                              ....

0043b820  uint8_t Device::Init(uint8_t arg1, class PStringBase<char> const* arg2, int32_t arg3, int32_t arg4, uint8_t arg5, class PStringBase<char> const* arg6)

0043b820  {
0043b831      if (Device::m_bIsInitialized == 0)
0043b831      {
0043b83d          HMENU eax_2 = GetMenu(Device::m_hWnd);
0043b83d          
0043b845          if (eax_2 == 0)
0043b847              Device::m_bSysKeysEnabled = eax_2;
0043b847          
0043b850          int32_t var_94;
0043b850          int32_t* lpVersionInformation = &var_94;
0043b851          var_94 = 0x94;
0043b859          BOOL eax_3;
0043b859          class PStringBase<char>* Device::m_hWnd_4;
0043b859          eax_3 = GetVersionExA(lpVersionInformation);
0043b861          uint8_t (* var_118)(class PStringBaseArray<char> const*);
0043b861          uint16_t* nWidth_2;
0043b861          class PStringBase<char>* Device::m_hWnd_1;
0043b861          uint16_t eax_5;
0043b861          class PStringBase<unsigned short> ecx_6;
0043b861          class PStringBase<unsigned short> edx_1;
0043b861          
0043b861          if (eax_3 == 0)
0043b861          {
0043bd62              int32_t var_10c_34 = 0;
0043bd64              Device::m_hWnd_1 = Device::m_hWnd_4;
0043bd67              nWidth_2 = &data_794320;
0043bd71              nWidth_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&Device::m_hWnd_1, nWidth_2);
0043bd74              var_118 = &data_794320;
0043bd7e              var_118 = PStringBase<unsigned short>::PStringBase<unsigned short>(&nWidth_2, var_118);
0043bd86              eax_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, &data_794320);
0043bd8d              PlatformString::DisplayString(eax_5, edx_1, ecx_6, 0x6b, var_118);
0043bd95              Device::m_bIsDone = 1;
0043b861          }
0043b861          else
0043b861          {
0043b86e              int32_t X = 0;
0043b872              uint32_t var_84;
0043b872              Device::m_nOSVersion = var_84;
0043b872              
0043b877              if (var_84 != 0)
0043b877              {
0043b8af                  class PSRefBufferCharData<char>* m_charbuffer_1 = arg6->m_charbuffer;
0043b8b4                  int32_t eax_7 = (m_charbuffer_1->m_data[-4] - 1);
0043b8b5                  int32_t eax_8 = -(eax_7);
0043b8bc                  HINSTANCE Device::m_hWnd_3 = GetModuleHandleA(((eax_8 - eax_8) & m_charbuffer_1));
0043b8bc                  
0043b8d4                  if (arg6->m_charbuffer->m_data[-4] != 1)
0043b8d6                      Device::m_bIsChildWnd = 1;
0043b8d6                  
0043b8e1                  if (Render::m_pRenderer == 0)
0043b8e1                  {
0043b8e7                      class PStringBase<char> var_f0 = 1;
0043b8e7                      
0043b8fa                      if ((Render::StartupRenderingSystem(&var_f0) != 0 && Device::InitializeDisplayPreferences() != 0))
0043b8fa                      {
0043b911                          void var_d8;
0043b911                          RenderDevicePresentation::RenderDevicePresentation(&var_d8);
0043b911                          
0043b925                          if (Device::LoadDisplayPreferences(&var_d8) != 0)
0043b925                          {
0043b932                              if (Device::m_bAllowFullScreenMode != 0)
0043b93a                                  arg1 = 0;
0043b93a                              
0043b942                              uint8_t var_cc;
0043b942                              
0043b942                              if ((Device::m_bAllowFullScreenMode == 0 || var_cc == 0))
0043b944                                  arg1 = 1;
0043b944                              
0043b94c                              PSTR lpIconName = 0x65;
0043b94e                              Device::m_hWnd_1 = Device::m_hWnd_3;
0043b94f                              int32_t (__stdcall* var_b8_1)(struct HWND__* arg1, uint32_t arg2, uint32_t arg3, int32_t arg4) = Device::WndProc;
0043b957                              int32_t var_b4_1 = 0;
0043b95b                              int32_t var_b0_1 = 0;
0043b95f                              HINSTANCE Device::m_hWnd_6 = Device::m_hWnd_3;
0043b963                              int32_t lpWndClass = 0;
0043b96d                              enum GET_STOCK_OBJECT_FLAGS i = BLACK_BRUSH;
0043b96f                              HICON var_a8_1 = LoadIconA(Device::m_hWnd_1, lpIconName);
0043b980                              HGDIOBJ var_a0_1 = GetStockObject(i);
0043b98b                              class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0043b98f                              int32_t var_a4_1 = 0;
0043b993                              char const* const var_98_1 = "Turbine Device Class";
0043b99b                              enum WIN32_ERROR eax_14;
0043b99b                              int32_t edx_4;
0043b99b                              eax_14 = RegisterClassA(&lpWndClass);
0043b9a4                              class PStringBase<char>* Device::m_hWnd_5;
0043b9a4                              
0043b9a4                              if (eax_14 != 0)
0043b9a4                              {
0043b9b9                              label_43b9b9:
0043b9b9                                  edx_4 = arg1;
0043b9c0                                  eax_14 = arg5;
0043b9c7                                  char temp1_1 = edx_4;
0043b9c7                                  edx_4 = -(edx_4);
0043b9d9                                  class PStringBase<char> dwStyle_1 = (((edx_4 - edx_4) & 0x80ca0000) - 0x7e000000);
0043b9d9                                  
0043b9dd                                  if (eax_14 != 0)
0043b9e6                                      dwStyle_1 = ((((edx_4 - edx_4) & 0x80ca0000) - 0x7e000000) | 0x10000000);
0043b9e6                                  
0043b9ea                                  eax_14 = arg1;
0043b9f1                                  uint16_t* nWidth_1;
0043b9f1                                  int32_t nWidth = nWidth_1;
0043b9f5                                  int32_t var_d0;
0043b9f5                                  int32_t nHeight = var_d0;
0043b9f9                                  int32_t Y = 0;
0043b9fd                                  class PStringBase<char> var_f4;
0043b9fd                                  
0043b9fd                                  if (eax_14 != 0)
0043b9fd                                  {
0043ba0b                                      class PStringBase<char> eax_16 = GetSystemMetrics(SM_CXDLGFRAME);
0043ba0f                                      enum SYSTEM_METRICS_INDEX nIndex = SM_CYDLGFRAME;
0043ba11                                      var_f0 = eax_16;
0043ba15                                      int32_t eax_17 = GetSystemMetrics(nIndex);
0043ba1b                                      int32_t eax_18 = GetSystemMetrics(SM_CYCAPTION);
0043ba27                                      int32_t eax_20;
0043ba27                                      int32_t edx_8;
0043ba27                                      edx_8 = HIGHD(((int64_t)GetSystemMetrics(SM_CXSCREEN)));
0043ba27                                      eax_20 = LOWD(((int64_t)GetSystemMetrics(SM_CXSCREEN)));
0043ba30                                      nWidth = &nWidth_1[eax_16];
0043ba39                                      int32_t eax_23;
0043ba39                                      int32_t edx_9;
0043ba39                                      edx_9 = HIGHD(((int64_t)nWidth));
0043ba39                                      eax_23 = LOWD(((int64_t)nWidth));
0043ba42                                      nHeight = ((eax_18 + (eax_17 << 1)) + var_d0);
0043ba44                                      X = (((eax_20 - edx_8) >> 1) - ((eax_23 - edx_9) >> 1));
0043ba48                                      int32_t eax_27;
0043ba48                                      int32_t edx_10;
0043ba48                                      edx_10 = HIGHD(((int64_t)GetSystemMetrics(SM_CYSCREEN)));
0043ba48                                      eax_27 = LOWD(((int64_t)GetSystemMetrics(SM_CYSCREEN)));
0043ba4f                                      int32_t eax_30;
0043ba4f                                      int32_t edx_11;
0043ba4f                                      edx_11 = HIGHD(((int64_t)nHeight));
0043ba4f                                      eax_30 = LOWD(((int64_t)nHeight));
0043ba52                                      enum SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS fWinIni = 0;
0043ba58                                      class PStringBase<char> X_2;
0043ba58                                      Device::m_hWnd_1 = &X_2;
0043ba59                                      nWidth_2 = 0x10;
0043ba5f                                      var_118 = 0x30;
0043ba61                                      Y = (((eax_27 - edx_10) >> 1) - ((eax_30 - edx_11) >> 1));
0043ba61                                      
0043ba6b                                      if (SystemParametersInfoA(var_118, nWidth_2, Device::m_hWnd_1, fWinIni) != 0)
0043ba6b                                      {
0043ba75                                          int32_t Y_2;
0043ba75                                          int32_t Y_1 = Y_2;
0043ba79                                          int32_t var_e4;
0043ba79                                          int32_t eax_35 = (var_e4 - X_2);
0043ba7f                                          int32_t var_e0;
0043ba7f                                          class PStringBase<char> ecx_13 = (var_e0 - Y_1);
0043ba83                                          var_f4 = ecx_13;
0043ba83                                          
0043ba87                                          if (nWidth > eax_35)
0043bab0                                              X = (X_2 - var_f0);
0043ba87                                          else
0043ba87                                          {
0043ba92                                              if ((nWidth + X) > var_e4)
0043ba96                                                  X = (eax_35 - nWidth);
0043ba96                                              
0043ba98                                              class PStringBase<char> X_1 = X_2;
0043ba9e                                              ecx_13 = var_f4;
0043baa2                                              Y_1 = Y_2;
0043baa2                                              
0043baa6                                              if (X < X_1)
0043baa8                                                  X = X_1;
0043ba87                                          }
0043ba87                                          
0043bab6                                          if ((nHeight <= ecx_13 && (Y + nHeight) > var_e0))
0043bac3                                              Y = (ecx_13 - nHeight);
0043bac3                                          
0043bac7                                          if ((nHeight > ecx_13 || Y < Y_1))
0043bac9                                              Y = Y_1;
0043ba6b                                      }
0043b9fd                                  }
0043b9fd                                  
0043bacf                                  class PStringBase<char> dwStyle = dwStyle_1;
0043bada                                  void* lpParam = nullptr;
0043badc                                  Device::m_hWnd_1 = Device::m_hWnd_3;
0043badd                                  class PSRefBufferCharData<char>* m_charbuffer_2 = arg2->m_charbuffer;
0043badf                                  nWidth_2 = nullptr;
0043bae1                                  var_118 = nullptr;
0043baf0                                  HWND eax_39;
0043baf0                                  eax_39 = CreateWindowExA(WS_EX_LEFT, "Turbine Device Class", m_charbuffer_2, dwStyle, X, Y, nWidth, nHeight, var_118, nWidth_2, Device::m_hWnd_1, lpParam);
0043baf8                                  Device::m_hWnd = eax_39;
0043baf8                                  
0043bafd                                  if (eax_39 == 0)
0043bafd                                  {
0043baff                                      HWND var_10c_12 = eax_39;
0043baff                                      goto label_43bb00;
0043bafd                                  }
0043bafd                                  
0043bb33                                  void* eax_40 = operator new(0x3f8);
0043bb3d                                  class ICIDM* eax_41;
0043bb3d                                  
0043bb3d                                  if (eax_40 == 0)
0043bb48                                      eax_41 = nullptr;
0043bb3d                                  else
0043bb41                                      eax_41 = CInputManager_WIN32::CInputManager_WIN32(eax_40);
0043bb41                                  
0043bb4a                                  struct HWND__* Device::m_hWnd_2 = Device::m_hWnd;
0043bb50                                  ICIDM::s_cidm = eax_41;
0043bb50                                  
0043bb5f                                  if (eax_41->vtable->OnStartup(Device::m_hWnd_2) == 1)
0043bb5f                                  {
0043bb6e                                      if (arg5 != 0)
0043bb6e                                      {
0043bb76                                          enum SHOW_WINDOW_CMD nCmdShow = SW_SHOWNORMAL;
0043bb78                                          Device::m_hWnd_1 = Device::m_hWnd;
0043bb79                                          ShowWindow(Device::m_hWnd_1, nCmdShow);
0043bb85                                          UpdateWindow(Device::m_hWnd);
0043bb92                                          SetForegroundWindow(Device::m_hWnd);
0043bb9f                                          SetActiveWindow(Device::m_hWnd);
0043bba5                                          HWND eax_43;
0043bba5                                          eax_43 = arg1;
0043bbac                                          enum SET_WINDOW_POS_FLAGS uFlags = 0x153;
0043bbb1                                          char temp2_1 = eax_43;
0043bbb1                                          eax_43 = -(eax_43);
0043bbb3                                          Device::m_hWnd_1 = nullptr;
0043bbb5                                          nWidth_2 = nullptr;
0043bbb7                                          var_118 = nullptr;
0043bbc5                                          SetWindowPos(Device::m_hWnd, ((eax_43 - eax_43) - 1), 0, var_118, nWidth_2, Device::m_hWnd_1, uFlags);
0043bb6e                                      }
0043bb6e                                      
0043bbdb                                      Device::m_hWnd_1 = var_d0;
0043bbdc                                      nWidth_2 = nWidth_1;
0043bbdc                                      
0043bbe7                                      if (Device::InitWindow(nWidth_2, Device::m_hWnd_1, arg1) != 0)
0043bbe7                                      {
0043bbef                                          void* eax_48 = operator new(8);
0043bbef                                          
0043bbf9                                          if (eax_48 == 0)
0043bc09                                              Device::sm_pDeviceDialogGateway = nullptr;
0043bbf9                                          else
0043bc02                                              Device::sm_pDeviceDialogGateway = Device::DeviceDialogBoxGateway::DeviceDialogBoxGateway(eax_48);
0043bc02                                          
0043bc1c                                          PStringBase<char>::PStringBase<char>(&dwStyle_1, "Exits the application");
0043bc2a                                          PStringBase<char>::PStringBase<char>(&var_f4, "Exit");
0043bc33                                          class PStringBase<char>* var_10c_22 = &dwStyle_1;
0043bc38                                          Device::m_hWnd_1 = &var_f4;
0043bc39                                          nWidth_2 = ConsoleCommand_QuitCommand;
0043bc3e                                          GlobalRegistry::RegisterCommand(nWidth_2, Device::m_hWnd_1, var_10c_22);
0043bc4a                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_f4);
0043bc53                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&dwStyle_1);
0043bc61                                          PStringBase<char>::PStringBase<char>(&dwStyle_1, "Exits the application");
0043bc6f                                          PStringBase<char>::PStringBase<char>(&var_f4, "Quit");
0043bc78                                          class PStringBase<char>* var_10c_25 = &dwStyle_1;
0043bc7d                                          Device::m_hWnd_1 = &var_f4;
0043bc7e                                          nWidth_2 = ConsoleCommand_QuitCommand;
0043bc83                                          GlobalRegistry::RegisterCommand(nWidth_2, Device::m_hWnd_1, var_10c_25);
0043bc8f                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_f4);
0043bc98                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&dwStyle_1);
0043bca6                                          PStringBase<char>::PStringBase<char>(&dwStyle_1, "Restarts the rendering engine an…");
0043bcb4                                          PStringBase<char>::PStringBase<char>(&var_f4, "UpdatePresentation");
0043bcbd                                          class PStringBase<char>* var_10c_28 = &dwStyle_1;
0043bcc2                                          Device::m_hWnd_1 = &var_f4;
0043bcc3                                          nWidth_2 = Device::ChangePresentation;
0043bcc8                                          GlobalRegistry::RegisterCommand(nWidth_2, Device::m_hWnd_1, var_10c_28);
0043bcd4                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_f4);
0043bcdd                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&dwStyle_1);
0043bceb                                          PStringBase<char>::PStringBase<char>(&var_f0, "ForceDisplayResolution [<Width> …");
0043bcf9                                          PStringBase<char>::PStringBase<char>(&dwStyle_1, "Forces the display resolution to…");
0043bd07                                          PStringBase<char>::PStringBase<char>(&var_f4, "ForceDisplayResolution");
0043bd10                                          class PStringBase<char>* var_10c_32 = &var_f0;
0043bd15                                          Device::m_hWnd_1 = &dwStyle_1;
0043bd1a                                          nWidth_2 = &var_f4;
0043bd1b                                          var_118 = Device::ConsoleCommand_ForceDisplayResolution;
0043bd20                                          GlobalRegistry::RegisterCommand(var_118, nWidth_2, Device::m_hWnd_1, var_10c_32);
0043bd2c                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_f4);
0043bd35                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&dwStyle_1);
0043bd3e                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_f0);
0043bd48                                          SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
0043bd4e                                          Device::m_bIsInitialized = 1;
0043bd55                                          enum EXECUTION_STATE eax_50;
0043bd55                                          eax_50 = 1;
0043bd61                                          return 1;
0043bbe7                                      }
0043bb5f                                  }
0043b9a4                              }
0043b9a4                              else
0043b9a4                              {
0043b9a6                                  eax_14 = GetLastError();
0043b9a6                                  
0043b9b1                                  if (eax_14 == ERROR_CLASS_ALREADY_EXISTS)
0043b9b1                                      goto label_43b9b9;
0043b9b1                                  
0043b9b3                                  int32_t var_10c_7 = 0;
0043bb00                              label_43bb00:
0043bb00                                  Device::m_hWnd_1 = Device::m_hWnd_5;
0043bb03                                  nWidth_2 = &data_794320;
0043bb0d                                  nWidth_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&Device::m_hWnd_1, nWidth_2);
0043bb10                                  var_118 = &data_794320;
0043bb1a                                  var_118 = PStringBase<unsigned short>::PStringBase<unsigned short>(&nWidth_2, var_118);
0043bb22                                  eax_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, &data_794320);
0043bd8d                                  PlatformString::DisplayString(eax_5, edx_1, ecx_6, 0x7f, var_118);
0043bd95                                  Device::m_bIsDone = 1;
0043b9a4                              }
0043b925                          }
0043b8fa                      }
0043b8e1                  }
0043b877              }
0043b877              else
0043b877              {
0043b879                  int32_t var_10c_2 = 0;
0043b87a                  Device::m_hWnd_1 = Device::m_hWnd_4;
0043b87d                  nWidth_2 = &data_794320;
0043b887                  nWidth_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&Device::m_hWnd_1, nWidth_2);
0043b88a                  var_118 = &data_794320;
0043b894                  var_118 = PStringBase<unsigned short>::PStringBase<unsigned short>(&nWidth_2, var_118);
0043b89c                  eax_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, &data_794320);
0043bd8d                  PlatformString::DisplayString(eax_5, edx_1, ecx_6, 0x6a, var_118);
0043bd95                  Device::m_bIsDone = 1;
0043b877              }
0043b861          }
0043b831      }
0043b831      
0043bda8      return 0;
0043b820  }

0043bda9                             90 90 90 90 90 90 90                                                           .......

0043bdb0  struct HBITMAP__* CreateScreenCompatibleBitmapFromRGBA(uint32_t arg1, uint32_t arg2, struct SourceImageData const* arg3)

0043bdb0  {
0043bdb5      struct SourceImageData* esi = arg3;
0043bdb9      uint32_t cxImage = esi->cxImage;
0043bdbc      uint32_t cyImage = esi->cyImage;
0043bdbf      uint32_t cyImage_2 = cyImage;
0043bdce      int32_t var_18 = ((cyImage * cxImage) << 2);
0043bdd7      uint32_t cxImage_1 = cxImage;
0043bde4      int32_t pbmi = 0x28;
0043bdec      int16_t var_20 = 1;
0043bdf3      int16_t var_1e = 0x20;
0043bdfa      int32_t var_1c = 0;
0043bdfe      int32_t var_14 = 0;
0043be02      int32_t var_10 = 0;
0043be06      int32_t var_c = 0;
0043be0a      int32_t var_8 = 0;
0043be0e      int32_t* ppvBits = nullptr;
0043be12      HBITMAP eax_2 = CreateDIBSection(nullptr, &pbmi, DIB_RGB_COLORS, &ppvBits, nullptr, 0);
0043be12      
0043be1e      if (eax_2 == 0)
0043bf7b          return 0;
0043bf7b      
0043be24      uint32_t cyImage_1 = esi->cyImage;
0043be27      int32_t* ppvBits_1 = ppvBits;
0043be2c      int32_t ebx = 0;
0043be2c      
0043be30      if (cyImage_1 > 0)
0043be30      {
0043be80          do
0043be80          {
0043be3e              void* edi_1 = &esi->pData[((((cyImage_1 - ebx) - 1) * esi->pitch) >> 2)];
0043be44              int32_t i = 0;
0043be44              
0043be48              if (esi->cxImage > 0)
0043be48              {
0043be76                  do
0043be76                  {
0043be50                      int32_t eax_8 = *(uint32_t*)((char*)edi_1 + (i << 2));
0043be50                      
0043be61                      if ((eax_8 & 0xff000000) >= 0x40000000)
0043be6b                          *(uint32_t*)ppvBits_1 = eax_8;
0043be61                      else
0043be63                          *(uint32_t*)ppvBits_1 = 0;
0043be63                      
0043be70                      ppvBits_1 = &ppvBits_1[1];
0043be73                      i += 1;
0043be76                  } while (i < esi->cxImage);
0043be48              }
0043be48              
0043be7a              cyImage_1 = esi->cyImage;
0043be7d              ebx += 1;
0043be80          } while (ebx < cyImage_1);
0043be30      }
0043be30      
0043be8f      HDC ebx_1 = GetDC(nullptr);
0043be96      CreatedHDC hdc = CreateCompatibleDC(ebx_1);
0043bea1      HDC ebp_3 = CreateCompatibleDC(ebx_1);
0043beaa      HBITMAP ho = CreateCompatibleBitmap(ebx_1, arg1, arg2);
0043beb2      arg3 = ho;
0043beb2      
0043beba      if ((hdc == 0 || ebp_3 == 0))
0043beba      {
0043bf2a          if (ho != 0)
0043bf2a          {
0043bf2d              DeleteObject(ho);
0043bf33              arg3 = nullptr;
0043bf2a          }
0043beba      }
0043beba      else if (ho != 0)
0043bebe      {
0043becc          HGDIOBJ h = SelectObject(ebp_3, eax_2);
0043bed8          HGDIOBJ h_1 = SelectObject(hdc, arg3);
0043beef          PatBlt(hdc, 0, 0, arg1, arg2, BLACKNESS);
0043bf0c          BitBlt(hdc, 0, 0, esi->cxImage, esi->cyImage, ebp_3, 0, 0, SRCCOPY);
0043bf18          SelectObject(hdc, h_1);
0043bf20          SelectObject(ebp_3, h);
0043bebe      }
0043bebe      
0043bf3d      if (ebx_1 != 0)
0043bf42          ReleaseDC(nullptr, ebx_1);
0043bf42      
0043bf51      if (ebp_3 != 0)
0043bf54          DeleteDC(ebp_3);
0043bf54      
0043bf58      if (hdc != 0)
0043bf5b          DeleteDC(hdc);
0043bf5b      
0043bf62      DeleteObject(eax_2);
0043bf72      return arg3;
0043bdb0  }

0043bf7c                                                                                      90 90 90 90                              ....

0043bf80  struct HBITMAP__* CreateMonoBitmapFromRGBA(uint32_t arg1, uint32_t arg2, struct SourceImageData const* arg3, uint8_t const arg4)

0043bf80  {
0043bf8d      uint32_t nHeight = arg2;
0043bf8d      
0043bf91      if (arg4 != 0)
0043bf95          nHeight = (arg2 * 2);
0043bf95      
0043bfa4      uint32_t esi_2 = ((arg1 >> 3) * nHeight);
0043bfa9      int32_t ebx;
0043bfa9      ebx = 0xff;
0043bfa9      
0043bfba      if ((esi_2 == 0 || (arg1 & 7) != 0))
0043c1dc          return 0;
0043c1dc      
0043bfc3      void* s = operator new[](esi_2);
0043bfc8      struct SourceImageData* ebp = arg3;
0043bfd8      void* lpBits = s;
0043bfe3      __builtin_memset(__builtin_memset(s, 0xffffffff, ((esi_2 >> 2) << 2)), 0xff, (esi_2 & 3));
0043bfe5      uint32_t cxImage_2 = arg1;
0043bfe9      uint32_t cxImage = ebp->cxImage;
0043bff1      uint32_t cxImage_1 = cxImage_2;
0043bff1      
0043bff5      if (cxImage < cxImage_2)
0043bff5      {
0043bff7          cxImage_1 = cxImage;
0043bffb          cxImage_2 = cxImage;
0043bff5      }
0043bff5      
0043c001      uint32_t cyImage = ebp->cyImage;
0043c001      
0043c00a      if (cyImage < arg2)
0043c00c          arg2 = cyImage;
0043c00c      
0043c014      void* lpBits_1 = lpBits;
0043c018      int32_t eax_3 = 0;
0043c01c      int32_t var_8 = 0;
0043c01c      
0043c020      if (arg2 > 0)
0043c020      {
0043c0a3          do
0043c0a3          {
0043c032              void* ebp_1 = &ebp->pData[((ebp->pitch * eax_3) >> 2)];
0043c035              int32_t esi_3 = 0;
0043c037              int32_t eax_5 = 0;
0043c037              
0043c03b              if (cxImage_2 > 0)
0043c03b              {
0043c068                  do
0043c068                  {
0043c043                      if (esi_3 == 8)
0043c043                      {
0043c045                          *(uint8_t*)lpBits_1 = ebx;
0043c047                          lpBits_1 += 1;
0043c048                          ebx = 0xff;
0043c04b                          esi_3 = 0;
0043c043                      }
0043c043                      
0043c057                      esi_3 += 1;
0043c05e                      int32_t edx_7;
0043c05e                      edx_7 = (*(uint32_t*)((char*)ebp_1 + (eax_5 << 2)) & 0xff000000) < 0x40000000;
0043c061                      ebx <<= 1;
0043c063                      ebx |= edx_7;
0043c065                      eax_5 += 1;
0043c068                  } while (eax_5 < cxImage_2);
0043c03b              }
0043c03b              
0043c06d              if ((cxImage_2 <= 0 || esi_3 < 8))
0043c06d              {
0043c074                  int32_t i_2 = (8 - esi_3);
0043c07c                  int32_t i;
0043c07c                  
0043c07c                  do
0043c07c                  {
0043c076                      ebx <<= 1;
0043c078                      ebx |= 1;
0043c07b                      i = i_2;
0043c07b                      i_2 -= 1;
0043c07c                  } while (i != 1);
0043c06d              }
0043c06d              
0043c082              *(uint8_t*)lpBits_1 = ebx;
0043c084              lpBits_1 += 1;
0043c084              
0043c087              if (arg1 > cxImage_2)
0043c08e                  lpBits_1 += ((arg1 - cxImage_2) >> 3);
0043c08e              
0043c098              ebp = arg3;
0043c09c              eax_3 = (var_8 + 1);
0043c09f              var_8 = eax_3;
0043c0a3          } while (eax_3 < arg2);
0043c020      }
0043c020      
0043c0a9      eax_3 = arg4;
0043c0a9      
0043c0af      if (eax_3 != 0)
0043c0af      {
0043c0bf          int32_t eax_11;
0043c0bf          int32_t edx_9;
0043c0bf          edx_9 = HIGHD(((int64_t)esi_2));
0043c0bf          eax_11 = LOWD(((int64_t)esi_2));
0043c0c4          int32_t edx_10 = 0;
0043c0c6          void* eax_14 = (((eax_11 - edx_9) >> 1) + lpBits);
0043c0ca          arg4 = 0;
0043c0ca          
0043c0ce          if (arg2 > 0)
0043c0ce          {
0043c0ec              while (true)
0043c0ec              {
0043c0ec                  int32_t edi_4 = 0;
0043c0ee                  void* edx_12 = &ebp->pData[((ebp->pitch * edx_10) >> 2)];
0043c0f1                  int32_t ebp_2 = 0;
0043c0f1                  
0043c0f9                  if (cxImage_2 > 0)
0043c0f9                  {
0043c15c                      do
0043c15c                      {
0043c103                          if (edi_4 == 8)
0043c103                          {
0043c105                              *(uint8_t*)eax_14 = ebx;
0043c107                              eax_14 += 1;
0043c108                              ebx = 0xff;
0043c10b                              edi_4 = 0;
0043c103                          }
0043c103                          
0043c111                          uint32_t ecx_6 = *(uint32_t*)((char*)edx_12 + (ebp_2 << 2));
0043c11c                          edi_4 += 1;
0043c11d                          ebx <<= 1;
0043c11d                          
0043c125                          if ((ecx_6 & 0xff000000) < 0x40000000)
0043c151                              ecx_6 = 0;
0043c125                          else
0043c125                          {
0043c12c                              uint32_t esi_8 = ((uint32_t)*(uint8_t*)((char*)ecx_6)[1]);
0043c12f                              uint32_t edx_17 = ((uint32_t)((int8_t)(ecx_6 >> 0x10)));
0043c132                              uint32_t var_8_1 = ecx_6;
0043c136                              ecx_6 &= 0xff;
0043c136                              
0043c13e                              if (edx_17 <= esi_8)
0043c140                                  edx_17 = esi_8;
0043c140                              
0043c144                              if (edx_17 <= ecx_6)
0043c146                                  edx_17 = ecx_6;
0043c146                              
0043c14b                              if (edx_17 <= 0x40)
0043c151                                  ecx_6 = 0;
0043c14b                              else
0043c14d                                  ecx_6 = 1;
0043c125                          }
0043c125                          
0043c153                          ebx |= ecx_6;
0043c159                          ebp_2 += 1;
0043c15c                      } while (ebp_2 < cxImage_1);
0043c0f9                  }
0043c0f9                  
0043c161                  if ((cxImage_2 <= 0 || edi_4 < 8))
0043c161                  {
0043c168                      int32_t i_3 = (8 - edi_4);
0043c176                      int32_t i_1;
0043c176                      
0043c176                      do
0043c176                      {
0043c170                          ebx <<= 1;
0043c172                          ebx |= 1;
0043c175                          i_1 = i_3;
0043c175                          i_3 -= 1;
0043c176                      } while (i_1 != 1);
0043c161                  }
0043c161                  
0043c180                  *(uint8_t*)eax_14 = ebx;
0043c182                  eax_14 += 1;
0043c182                  
0043c185                  if (arg1 > cxImage_1)
0043c18c                      eax_14 += ((arg1 - cxImage_1) >> 3);
0043c18c                  
0043c196                  edx_10 = (arg4 + 1);
0043c199                  arg4 = edx_10;
0043c199                  
0043c19d                  if (edx_10 >= arg2)
0043c19d                      break;
0043c19d                  
0043c0d6                  cxImage_2 = cxImage_1;
0043c0da                  ebp = arg3;
0043c0ec              }
0043c0ce          }
0043c0af      }
0043c0af      
0043c1b6      HBITMAP result = CreateBitmap(arg1, nHeight, 1, 1, lpBits);
0043c1c3      operator delete[](lpBits);
0043c1d4      return result;
0043bf80  }

0043c0fd                                                                                         8d 49 00                               .I.
0043c1dd                                                                                         90 90 90                               ...

0043c1e0  struct HICON__* CreateIconFromRGBA(struct SourceImageData const* arg1, int32_t arg2, int32_t arg3, uint8_t const arg4)

0043c1e0  {
0043c1ef      HICON result = nullptr;
0043c1f1      struct HBITMAP__* ho_1 = nullptr;
0043c1f1      
0043c1f5      if (arg4 == 0)
0043c204          ho_1 = CreateScreenCompatibleBitmapFromRGBA(0x20, 0x20, arg1);
0043c204      
0043c20c      struct HBITMAP__* ho = CreateMonoBitmapFromRGBA(0x20, 0x20, arg1, arg4);
0043c20c      
0043c218      if (ho != 0)
0043c218      {
0043c227          int32_t piconinfo = 0;
0043c22f          struct HBITMAP__* ho_3 = ho_1;
0043c233          struct HBITMAP__* ho_2 = ho;
0043c237          int32_t var_10_1 = arg2;
0043c23b          int32_t var_c_1 = arg3;
0043c245          result = CreateIconIndirect(&piconinfo);
0043c218      }
0043c218      
0043c24e      DeleteObject(ho_1);
0043c251      DeleteObject(ho);
0043c25c      return result;
0043c1e0  }

0043c25d                                                                                         90 90 90                               ...

0043c260  uint8_t CreateIconFromRenderSurface(uint32_t arg1, uint32_t arg2, class RenderSurface const* arg3, struct HICON__** arg4)

0043c260  {
0043c265      struct HICON__** ebp = arg4;
0043c26a      class RenderSurface* edi = arg3;
0043c26e      *(uint32_t*)ebp = nullptr;
0043c280      int32_t ebx;
0043c280      ebx = 0;
0043c280      
0043c29e      if ((edi->width > 0x20 || (edi->height > 0x20 || edi->m_pSurfaceBits != 0)))
0043c29e      {
0043c3c6          void* eax;
0043c3c6          eax = 0;
0043c3cc          return 0;
0043c29e      }
0043c29e      
0043c2ad      int32_t* eax_2 = RenderDevice::render_device->vtable->CreateSurface();
0043c2ad      
0043c2c3      if (*(uint32_t*)(*(uint32_t*)eax_2 + 0x58)(0x20, 0x20, 0x15, 1) != 0)
0043c2c3      {
0043c2d4          SurfaceWindow::Fill(&eax_2[0x2b], &RGBAColor_Null);
0043c2fd          class SurfaceWindow* var_64_2 = &edi->window;
0043c302          int32_t var_2c;
0043c302          SurfaceWindow::Blit(&var_2c, SurfaceWindow::SurfaceWindow(&var_2c, eax_2, 0, 0, (edi->width - 1), (edi->height - 1)));
0043c313          int32_t var_40_1 = eax_2[0x29];
0043c329          int32_t var_44_1 = eax_2[0x28];
0043c32d          int32_t edx_3 = *(uint32_t*)eax_2;
0043c332          int32_t var_48_1 = 0;
0043c336          int32_t var_4c = 0;
0043c336          
0043c33f          if (*(uint32_t*)(edx_3 + 0x60)(&var_4c, 2, &arg3, &arg4) != 0)
0043c33f          {
0043c345              int32_t edx_4 = eax_2[0x28];
0043c34b              int32_t eax_8 = eax_2[0x29];
0043c351              struct HICON__** var_3c = arg4;
0043c359              int32_t var_38_1 = edx_4;
0043c363              class RenderSurface* var_30_1 = arg3;
0043c373              int32_t var_34_1 = eax_8;
0043c377              eax_8 = *(int32_t*)((char*)RenderDevice::render_device + 0x324) == 0;
0043c393              *(uint32_t*)ebp = CreateIconFromRGBA(&var_3c, arg1, arg2, eax_8);
0043c39d              *(uint32_t*)(*(uint32_t*)eax_2 + 0x64)();
0043c3a0              ebx = 1;
0043c33f          }
0043c33f          
0043c3a6          var_2c = 0x798d14;
0043c3ae          SurfaceWindow::End(&var_2c);
0043c2c3      }
0043c2c3      
0043c3b7      *(uint32_t*)(*(uint32_t*)eax_2 + 0x14)();
0043c3c3      return ebx;
0043c260  }

0043c3cd                                         90 90 90                                                               ...

0043c3d0  void __fastcall NoticeHandler::~NoticeHandler(class NoticeHandler* this)

0043c3d0  {
0043c3d3      this->vtable = 0x7cbd20;
0043c3d9      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0043c3d9      
0043c3e0      if (eax != 0)
0043c3e2          eax->vtable->UnRegisterAllNoticeHandlers(this);
0043c3e2      
0043c3ea      class CObjectMaint* CObjectMaint::s_pcInstance_1 = CObjectMaint::s_pcInstance;
0043c3ea      
0043c3f2      if (CObjectMaint::s_pcInstance_1 != 0)
0043c3f5          CObjectMaint::UnRegisterAllNoticeHandlers(CObjectMaint::s_pcInstance_1, this);
0043c3d0  }

0043c3fc                                                                                      90 90 90 90                              ....

0043c400  void __fastcall GlobalEventHandler::GlobalEventHandler(class GlobalEventHandler* this)

0043c400  {
0043c403      NoticeRegistrar::NoticeRegistrar(this);
0043c408      this->vtable = 0x798fc4;
0043c40e      GlobalEventHandler::geh = this;
0043c400  }

0043c418                                                                          90 90 90 90 90 90 90 90                          ........

0043c420  void __fastcall GlobalEventHandler::~GlobalEventHandler(class GlobalEventHandler* this)

0043c420  {
0043c420      this->vtable = 0x798fc4;
0043c426      GlobalEventHandler::geh = nullptr;
0043c430      /* tailcall */
0043c430      return NoticeRegistrar::~NoticeRegistrar(this);
0043c420  }

0043c435                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0043c440  class GlobalEventHandler* GlobalEventHandler::GetGlobalEventHandler()

0043c440  {
0043c445      return GlobalEventHandler::geh;
0043c440  }

0043c446                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0043c450  void* __thiscall GlobalEventHandler::`scalar deleting destructor'(class GlobalEventHandler* this, uint32_t arg2)

0043c450  {
0043c453      this->vtable = 0x798fc4;
0043c459      GlobalEventHandler::geh = nullptr;
0043c463      NoticeRegistrar::~NoticeRegistrar(this);
0043c463      
0043c46d      if ((arg2 & 1) != 0)
0043c470          operator delete(this);
0043c470      
0043c47b      return this;
0043c450  }

0043c47e                                                                                            90 90                                ..

0043c480  void __fastcall NoticeRegistrar::NoticeRegistrar(class NoticeRegistrar* this)

0043c480  {
0043c482      this->vtable = 0x798fd8;
0043c488      this->m_handlers = nullptr;
0043c480  }


0043c490  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>::~IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>* this)

0043c490  {
0043c493      class HashTableData<unsigned long,List<NoticeHandler *> *>** m_buckets = this->m_buckets;
0043c49b      this->vtable = 0x798ff0;
0043c49b      
0043c4a1      if (m_buckets != &this->m_aInplaceBuckets)
0043c4a4          operator delete[](m_buckets);
0043c4a4      
0043c4ae      this->m_buckets = nullptr;
0043c4b1      this->m_firstInterestingBucket = nullptr;
0043c4b4      this->m_numBuckets = 0;
0043c4b7      this->m_numElements = 0;
0043c490  }

0043c4bc                                                                                      90 90 90 90                              ....

0043c4c0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>* this, uint32_t arg2)

0043c4c0  {
0043c4c3      class HashTableData<unsigned long,List<NoticeHandler *> *>** m_buckets = this->m_buckets;
0043c4cb      this->vtable = 0x798ff0;
0043c4cb      
0043c4d1      if (m_buckets != &this->m_aInplaceBuckets)
0043c4d4          operator delete[](m_buckets);
0043c4d4      
0043c4de      this->m_buckets = nullptr;
0043c4e1      this->m_firstInterestingBucket = nullptr;
0043c4e4      this->m_numBuckets = 0;
0043c4e7      this->m_numElements = 0;
0043c4e7      
0043c4ef      if ((arg2 & 1) != 0)
0043c4f2          operator delete(this);
0043c4f2      
0043c4fd      return this;
0043c4c0  }


0043c500  void __fastcall NoticeRegistrar::DestroyHandlers(class NoticeRegistrar* this)

0043c500  {
0043c506      class HashTable<unsigned long,List<NoticeHandler *> *,0>* m_handlers = this->m_handlers;
0043c506      
0043c50b      if (m_handlers != 0)
0043c50b      {
0043c518          void __return;
0043c518          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&m_handlers->m_intrusiveTable, &__return);
0043c51d          class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
0043c522          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0043c524          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0043c524          
0043c527          if (i_1 != 0)
0043c527          {
0043c530              while (true)
0043c530              {
0043c530                  class DBOCache* m_data = i_1->m_data;
0043c530                  
0043c535                  if (m_data != 0)
0043c537                      m_data->vtable->__vecDelDtor(1);
0043c537                  
0043c53d                  i_1 = i_1->m_hashNext;
0043c53d                  
0043c542                  if (i_1 == 0)
0043c542                  {
0043c55b                      class HashTableData<unsigned long,DBOCache *>* i;
0043c55b                      
0043c55b                      do
0043c55b                      {
0043c550                          m_currBucket = &m_currBucket[1];
0043c550                          
0043c555                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0043c555                              goto label_43c563;
0043c555                          
0043c557                          i = *(uint32_t*)m_currBucket;
0043c55b                      } while (i == 0);
0043c55b                      
0043c55d                      i_1 = i;
0043c55d                      
0043c561                      if (i_1 == 0)
0043c561                          break;
0043c542                  }
0043c530              }
0043c527          }
0043c527          
0043c563      label_43c563:
0043c563          class HashTable<unsigned long,List<NoticeHandler *> *,0>* m_handlers_1 = this->m_handlers;
0043c563          
0043c56b          if (m_handlers_1 != 0)
0043c56d              m_handlers_1->vtable->__vecDelDtor(1);
0043c56d          
0043c573          this->m_handlers = nullptr;
0043c50b      }
0043c500  }

0043c57f                                                                                               90                                 .

0043c580  class List<NoticeHandler *>** __thiscall HashTable<unsigned long,List<NoticeHandler *> *,0>::find(class HashTable<unsigned long,List<NoticeHandler *> *,0> const* this, uint32_t const* arg2)

0043c580  {
0043c585      uint32_t const esi = *(uint32_t*)arg2;
0043c585      
0043c598      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0043c598      {
0043c5a2          if (*(uint32_t*)i == esi)
0043c5a2          {
0043c5b3              if (i != 0)
0043c5b9                  return &i[2];
0043c5b9              
0043c5b3              break;
0043c5a2          }
0043c598      }
0043c598      
0043c5ae      return 0;
0043c580  }

0043c5bc                                                                                      90 90 90 90                              ....

0043c5c0  void* __thiscall List<NoticeHandler *>::`scalar deleting destructor'(class List<NoticeHandler *>* this, uint32_t arg2)

0043c5c0  {
0043c5c0      class List<NoticeHandler *>* this_1 = this;
0043c5c4      this->vtable = 0x798fec;
0043c5c4      
0043c5d5      while (this->_head != 0)
0043c5de          List<AsyncCache::CAsyncRequest *>::pop_head(this, &this_1);
0043c5de      
0043c5ea      if ((arg2 & 1) != 0)
0043c5ed          operator delete(this);
0043c5ed      
0043c5f9      return this;
0043c5c0  }

0043c5fc                                                                                      90 90 90 90                              ....

0043c600  uint8_t __thiscall List<AsyncCache::CAsyncRequest *>::pop_head(class List<AsyncCache::CAsyncRequest *>* this, struct AsyncCache::CAsyncRequest** arg2)

0043c600  {
0043c603      class ListNode<AsyncCache::CAsyncRequest *>* _head = this->_head;
0043c603      
0043c60a      if (_head == 0)
0043c60a      {
0043c60c          int32_t eax;
0043c60c          eax = 0;
0043c60f          return 0;
0043c60a      }
0043c60a      
0043c612      class ListNode<AsyncCache::CAsyncRequest *>* next = _head->next;
0043c617      this->_head = next;
0043c617      
0043c61a      if (next == 0)
0043c621          this->_tail = nullptr;
0043c61a      else
0043c61c          next->prev = nullptr;
0043c61c      
0043c62b      *(uint32_t*)arg2 = _head->data;
0043c62d      operator delete(_head);
0043c639      this->_num_elements -= 1;
0043c63c      uint32_t eax_3;
0043c63c      eax_3 = 1;
0043c63f      return 1;
0043c600  }

0043c642        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0043c650  void __fastcall NoticeRegistrar::~NoticeRegistrar(class NoticeRegistrar* this)

0043c650  {
0043c650      this->vtable = 0x798fd8;
0043c656      /* tailcall */
0043c656      return NoticeRegistrar::DestroyHandlers(this);
0043c650  }

0043c65b                                                                                   90 90 90 90 90                             .....

0043c660  uint8_t __thiscall NoticeRegistrar::UnRegisterNoticeHandler(class NoticeRegistrar* this, uint32_t arg2, class NoticeHandler* arg3)

0043c660  {
0043c667      class List<CInputHandler *>* eax_1 = this->vtable->GetNoticeHandlers(arg2);
0043c667      
0043c66c      if (eax_1 != 0)
0043c66c      {
0043c66e          int32_t* _head = eax_1->_head;
0043c66e          
0043c673          if (_head != 0)
0043c673          {
0043c682              while (*(uint32_t*)_head != arg3)
0043c682              {
0043c684                  _head = _head[1];
0043c684                  
0043c689                  if (_head == 0)
0043c689                  {
0043c68b                      eax_1 = 1;
0043c68d                      return 1;
0043c689                  }
0043c682              }
0043c682              
0043c693              List<CInputHandler *>::remove(eax_1, _head);
0043c673          }
0043c66c      }
0043c66c      
0043c698      eax_1 = 1;
0043c69a      return 1;
0043c660  }

0043c69d                                                                                         90 90 90                               ...

0043c6a0  uint8_t __thiscall NoticeRegistrar::UnRegisterAllNoticeHandlers(class NoticeRegistrar* this, class NoticeHandler* arg2)

0043c6a0  {
0043c6a0      class HashTable<unsigned long,List<NoticeHandler *> *,0>* m_handlers = this->m_handlers;
0043c6a0      
0043c6a9      if (m_handlers != 0)
0043c6a9      {
0043c6b6          void __return;
0043c6b6          m_handlers = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&m_handlers->m_intrusiveTable, &__return);
0043c6bb          void* (__thiscall* __vecDelDtor_1)(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>* this, uint32_t) = m_handlers->m_intrusiveTable.m_aInplaceBuckets[0];
0043c6c0          struct HashTable<unsigned long,List<NoticeHandler *> *,0>::VTable* vtable = m_handlers->vtable;
0043c6c2          struct IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>::VTable* vtable_1 = m_handlers->m_intrusiveTable.vtable;
0043c6c2          
0043c6c5          if (__vecDelDtor_1 != 0)
0043c6c5          {
0043c6d0              while (true)
0043c6d0              {
0043c6d0                  class List<CInputHandler *>* ecx_1 = *(uint32_t*)((char*)__vecDelDtor_1 + 8);
0043c6d0                  
0043c6d8                  for (int32_t* _head = ecx_1->_head; _head != 0; _head = _head[1])
0043c6d8                  {
0043c6e2                      if (*(uint32_t*)_head == arg2)
0043c6e2                      {
0043c6ee                          List<CInputHandler *>::remove(ecx_1, _head);
0043c6ee                          break;
0043c6e2                      }
0043c6d8                  }
0043c6d8                  
0043c6f3                  __vecDelDtor_1 = *(uint32_t*)((char*)__vecDelDtor_1 + 4);
0043c6f3                  
0043c6f8                  if (__vecDelDtor_1 == 0)
0043c6f8                  {
0043c70e                      void* (__thiscall* __vecDelDtor)(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>* this, uint32_t);
0043c70e                      
0043c70e                      do
0043c70e                      {
0043c703                          vtable_1 = &vtable_1[1];
0043c703                          
0043c708                          if (vtable_1 == (*(int32_t*)((char*)vtable + 0x60) + (*(int32_t*)((char*)vtable + 0x68) << 2)))
0043c708                              goto label_43c719;
0043c708                          
0043c70a                          __vecDelDtor = vtable_1->__vecDelDtor;
0043c70e                      } while (__vecDelDtor == 0);
0043c70e                      
0043c710                      __vecDelDtor_1 = __vecDelDtor;
0043c710                      
0043c714                      if (__vecDelDtor_1 == 0)
0043c714                          break;
0043c6f8                  }
0043c6d0              }
0043c6c5          }
0043c6a9      }
0043c6a9      
0043c719  label_43c719:
0043c719      m_handlers = 1;
0043c71f      return 1;
0043c6a0  }

0043c6cd                                         8d 49 00                                                               .I.
0043c722        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0043c730  class List<NoticeHandler *>* __fastcall NoticeRegistrar::GetNoticeHandlers(class NoticeRegistrar* this, uint32_t arg2)

0043c730  {
0043c730      class HashTable<unsigned long,List<NoticeHandler *> *,0>* m_handlers = this->m_handlers;
0043c730      
0043c735      if (m_handlers != 0)
0043c735      {
0043c73c          class List<NoticeHandler *>** eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(m_handlers, &arg2);
0043c73c          
0043c743          if (eax_1 != 0)
0043c74c              return *(uint32_t*)eax_1;
0043c735      }
0043c735      
0043c747      return 0;
0043c730  }

0043c74f                                               90                                                                 .

0043c750  void* __thiscall NoticeRegistrar::`scalar deleting destructor'(class NoticeRegistrar* this, uint32_t arg2)

0043c750  {
0043c753      this->vtable = 0x798fd8;
0043c759      NoticeRegistrar::DestroyHandlers(this);
0043c759      
0043c763      if ((arg2 & 1) != 0)
0043c766          operator delete(this);
0043c766      
0043c771      return this;
0043c750  }

0043c774                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0043c780  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>* this, uint32_t arg2)

0043c780  {
0043c78b      arg2 = arg2;
0043c78f      uint8_t edx = ((int8_t)arg2);
0043c793      this->m_buckets = nullptr;
0043c796      this->m_firstInterestingBucket = nullptr;
0043c799      this->m_numBuckets = 0;
0043c79c      this->m_numElements = 0;
0043c7a0      this->vtable = 0x798ff0;
0043c7a6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0043c7b9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0043c7b9      
0043c7c3      if (eax == bucketSizesEnd_1)
0043c7c5          eax -= 4;
0043c7c5      
0043c7c8      uint32_t eax_1 = *(uint32_t*)eax;
0043c7cd      this->m_numBuckets = eax_1;
0043c7cd      
0043c7d0      if (eax_1 > 0x17)
0043c7e6          this->m_buckets = operator new[]((eax_1 << 2));
0043c7d0      else
0043c7d5          this->m_buckets = &this->m_aInplaceBuckets;
0043c7d5      
0043c7ec      class HashTableData<unsigned long,List<NoticeHandler *> *>** m_buckets = this->m_buckets;
0043c7ef      uint32_t ecx_3 = (this->m_numBuckets << 2);
0043c7f5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0043c806      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0043c780  }

0043c80f                                               90                                                                 .

0043c810  uint8_t __thiscall HashTable<ControlSpecification,enum ControlType,0>::add(class HashTable<ControlSpecification,enum ControlType,0>* this, class ControlSpecification const* arg2, enum ControlType const* arg3)

0043c810  {
0043c816      void* eax = operator new(0xc);
0043c820      void* esi;
0043c820      
0043c820      if (eax == 0)
0043c83e          esi = nullptr;
0043c820      else
0043c820      {
0043c82c          *(uint32_t*)eax = arg2->__inner0;
0043c82e          *(uint32_t*)((char*)eax + 4) = 0;
0043c837          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
0043c83a          esi = eax;
0043c820      }
0043c820      
0043c84b      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
0043c865          return 1;
0043c865      
0043c84f      if (esi != 0)
0043c852          operator delete(esi);
0043c852      
0043c85e      return 0;
0043c810  }

0043c868                          90 90 90 90 90 90 90 90                                                          ........

0043c870  uint8_t __fastcall NoticeRegistrar::RegisterNoticeHandler(class NoticeRegistrar* this, uint32_t arg2, class NoticeHandler* arg3)

0043c870  {
0043c870      class NoticeRegistrar* this_1 = this;
0043c870      
0043c87d      if (this->m_handlers == 0)
0043c87d      {
0043c886          void* esi_1 = operator new(0x74);
0043c886          
0043c88d          if (esi_1 == 0)
0043c8a1              esi_1 = nullptr;
0043c88d          else
0043c88d          {
0043c894              *(uint32_t*)esi_1 = 0x798ff4;
0043c89a              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>(((char*)esi_1 + 4), 0x17);
0043c88d          }
0043c88d          
0043c8a7          this->m_handlers = esi_1;
0043c8a7          
0043c8aa          if (esi_1 == 0)
0043c8aa          {
0043c976              void* eax_7;
0043c976              eax_7 = 0;
0043c97a              return 0;
0043c8aa          }
0043c87d      }
0043c87d      
0043c8b9      void* eax_3 = this->vtable->GetNoticeHandlers(arg2);
0043c8b9      
0043c8c0      if (eax_3 == 0)
0043c8c0      {
0043c8c4          void* this_2 = operator new(0x10);
0043c8c4          
0043c8ce          if (this_2 == 0)
0043c8e1              this_2 = nullptr;
0043c8ce          else
0043c8ce          {
0043c8d0              *(uint32_t*)this_2 = 0x798fec;
0043c8d6              *(uint32_t*)((char*)this_2 + 4) = 0;
0043c8d9              *(uint32_t*)((char*)this_2 + 8) = 0;
0043c8dc              *(uint32_t*)((char*)this_2 + 0xc) = 0;
0043c8ce          }
0043c8ce          
0043c8ea          this_1 = this_2;
0043c8ee          List<PFileNode *>::push_back(this_2, &arg3);
0043c900          HashTable<ControlSpecification,enum ControlType,0>::add(this->m_handlers, &arg2, &this_1);
0043c907          int32_t eax_4;
0043c907          eax_4 = 1;
0043c90b          return 1;
0043c8c0      }
0043c8c0      
0043c90e      int32_t* i = *(uint32_t*)((char*)eax_3 + 4);
0043c913      class NoticeHandler* edi_1 = arg3;
0043c913      
0043c917      for (; i != 0; i = i[1])
0043c917      {
0043c922          if (*(uint32_t*)i == edi_1)
0043c922              goto label_43c96d;
0043c917      }
0043c917      
0043c92d      i = operator new(0xc);
0043c92d      
0043c937      if (i != 0)
0043c937      {
0043c939          *(uint32_t*)i = edi_1;
0043c93b          i[1] = 0;
0043c93e          i[2] = 0;
0043c93e          
0043c944          if (*(uint32_t*)((char*)eax_3 + 4) == 0)
0043c944          {
0043c946              *(uint32_t*)((char*)eax_3 + 4) = i;
0043c949              *(uint32_t*)((char*)eax_3 + 8) = i;
0043c951              *(uint32_t*)((char*)eax_3 + 0xc) += 1;
0043c955              int32_t eax_6;
0043c955              eax_6 = 1;
0043c959              return 1;
0043c944          }
0043c944          
0043c95c          void* ecx_7 = *(uint32_t*)((char*)eax_3 + 8);
0043c95f          *(uint32_t*)((char*)ecx_7 + 4) = i;
0043c962          i[2] = ecx_7;
0043c965          *(uint32_t*)((char*)eax_3 + 8) = i;
0043c968          *(uint32_t*)((char*)eax_3 + 0xc) += 1;
0043c937      }
0043c937      
0043c96d  label_43c96d:
0043c96d      i = 1;
0043c971      return 1;
0043c870  }

0043c97d                                                                                         90 90 90                               ...

0043c980  void* __thiscall HashTable<unsigned long,List<NoticeHandler *> *,0>::`scalar deleting destructor'(class HashTable<unsigned long,List<NoticeHandler *> *,0>* this, uint32_t arg2)

0043c980  {
0043c989      this->vtable = 0x798ff4;
0043c98f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0043c996      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>::~IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<NoticeHandler *> *> *,0>(&this->m_intrusiveTable);
0043c996      
0043c9a0      if ((arg2 & 1) != 0)
0043c9a3          operator delete(this);
0043c9a3      
0043c9af      return this;
0043c980  }

0043c9b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0043c9c0  class PStringBase<unsigned short>* __stdcall PlatformString::StringAccessor::GetString(class PlatformString::StringAccessor* this @ ecx, class PStringBase<unsigned short>* __return, uint16_t arg3)

0043c9c0  {
0043c9d0      HINSTANCE hInstance = *(uint32_t*)_chkstk();
0043c9d5      int32_t edi;
0043c9d5      int32_t var_10 = edi;
0043c9d6      class PStringBase<unsigned short>* __return_1;
0043c9d6      class PStringBase<unsigned short> __saved_ebp;
0043c9d6      class PSRefBufferCharData<unsigned short>* __saved_ebp_1;
0043c9d6      
0043c9d6      if (hInstance == 0)
0043c9d6      {
0043caae          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0043cac1          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0043cac7          uint32_t var_14_7 = ((uint32_t)arg3);
0043cad2          PStringBase<unsigned short>::sprintf(&__saved_ebp, u"<corestrings.dll not found. Trie…");
0043cad7          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0043cadb          __return_1 = __return;
0043cade          __return_1->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_3;
0043cae7          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
0043cae7          
0043cb00          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]) == 0 && __saved_ebp_1 != 0x14))
0043cb08              *(uint32_t*)*(int32_t*)((char*)__saved_ebp_1 + -0x14)(1);
0043c9d6      }
0043c9d6      else
0043c9d6      {
0043c9dc          uint32_t uID = ((uint32_t)arg3);
0043c9dc          
0043c9f4          if (LoadStringA(hInstance, uID, &__return_addr, 0x1000) != 0)
0043c9f4          {
0043c9f8              arg_1000 = 0;
0043ca10              int32_t var_14_1 = 0x1000;
0043ca1c              int16_t* var_18_1 = &arg_1000;
0043ca1d              int32_t var_1c_1 = 0xffffffff;
0043ca1f              *(uint16_t*)__builtin_memset(&s, 0, 0x1ffc) = 0;
0043ca2a              kernel32_MultiByteToWideChar_Ptr(0, 1, &__return_addr, var_1c_1);
0043ca3d              PStringBase<unsigned short>::PStringBase<unsigned short>(__return, &arg_ff8);
0043ca49              return __return;
0043c9f4          }
0043c9f4          
0043ca4c          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0043ca5f          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0043ca61          uint32_t uID_1 = uID;
0043ca6c          PStringBase<unsigned short>::sprintf(&__saved_ebp, u"<corestrings.dll is missing stri…");
0043ca75          __return_1 = __return;
0043ca78          __return_1->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
0043ca81          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0043ca81          
0043ca9a          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && __saved_ebp_1 != 0x14))
0043caa2              *(uint32_t*)*(int32_t*)((char*)__saved_ebp_1 + -0x14)(1);
0043c9d6      }
0043cb11      return __return_1;
0043c9c0  }

0043cb14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0043cb20  class PStringBase<unsigned short>* PlatformString::GetString(class PStringBase<unsigned short>* __return, uint16_t arg2, class PStringBase<unsigned short> arg3, class PStringBase<unsigned short> arg4, class PStringBase<unsigned short> arg5)

0043cb20  {
0043cb36      class PStringBase<unsigned short> __return_1;
0043cb36      PlatformString::StringAccessor::GetString(&g_StringAccessor, &__return_1, arg2);
0043cb50      class PStringBase<unsigned short> var_4;
0043cb50      PStringBase<unsigned short>::allocate_ref_buffer(&var_4, wcslen(&data_7990dc));
0043cb65      wcscpy(var_4, &data_7990dc);
0043cb78      PStringBase<unsigned short>::replace(&__return_1, &var_4, &arg3);
0043cb87      int32_t* esi_1 = (var_4 - 0x14);
0043cb87      
0043cb96      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0043cb9e          **(uint32_t**)esi_1(1);
0043cb9e      
0043cbaf      PStringBase<unsigned short>::allocate_ref_buffer(&var_4, wcslen(&data_7990d4));
0043cbbe      wcscpy(var_4, &data_7990d4);
0043cbd1      PStringBase<unsigned short>::replace(&__return_1, &var_4, &arg4);
0043cbda      int32_t* esi_3 = (var_4 - 0x14);
0043cbda      
0043cbe9      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0043cbf1          **(uint32_t**)esi_3(1);
0043cbf1      
0043cc02      PStringBase<unsigned short>::allocate_ref_buffer(&var_4, wcslen(&data_7990cc));
0043cc11      wcscpy(var_4, &data_7990cc);
0043cc24      PStringBase<unsigned short>::replace(&__return_1, &var_4, &arg5);
0043cc2d      int32_t* esi_5 = (var_4 - 0x14);
0043cc2d      
0043cc3c      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0043cc44          **(uint32_t**)esi_5(1);
0043cc44      
0043cc46      class PStringBase<unsigned short> __return_2 = __return_1;
0043cc4e      __return->m_charbuffer = __return_2;
0043cc54      InterlockedIncrement((__return_2 - 0x10));
0043cc5e      int32_t* esi_7 = (__return_1 - 0x14);
0043cc5e      
0043cc6d      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
0043cc75          **(uint32_t**)esi_7(1);
0043cc75      
0043cc7b      int32_t* esi_9 = (arg3 - 0x14);
0043cc7b      
0043cc8a      if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
0043cc92          **(uint32_t**)esi_9(1);
0043cc92      
0043cc98      int32_t* esi_11 = (arg4 - 0x14);
0043cc98      
0043cca7      if ((InterlockedDecrement(&esi_11[1]) == 0 && esi_11 != 0))
0043ccaf          **(uint32_t**)esi_11(1);
0043ccaf      
0043ccb5      int32_t* esi_13 = (arg5 - 0x14);
0043ccb5      
0043ccc4      if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
0043cccc          **(uint32_t**)esi_13(1);
0043cccc      
0043ccd7      return __return;
0043cb20  }

0043ccd8                                                                          90 90 90 90 90 90 90 90                          ........

0043cce0  void PlatformString::DisplayFinalString(class PStringBase<unsigned short> arg1, enum PlatformString::DisplayStringMode arg2)

0043cce0  {
0043cce7      uint16_t* eax;
0043cce7      wchar16* edx;
0043cce7      eax = DialogBoxGateways::ReportThread_PrepareForDialogBox();
0043ccf2      int32_t eax_1;
0043ccf2      class PStringBase<unsigned short> edx_1;
0043ccf2      eax_1 = DialogBoxGateways::DialogThread_PrepareForDialogBox();
0043ccf7      wchar16 const* const var_30 = u"ERROR";
0043cd0d      var_30 = wcslen(var_30);
0043cd12      class PStringBase<unsigned short> var_1c;
0043cd12      PStringBase<unsigned short>::allocate_ref_buffer(&var_1c, var_30);
0043cd17      class PStringBase<unsigned short> eax_3 = var_1c;
0043cd1b      var_30 = u"ERROR";
0043cd20      uint16_t* var_34 = eax_3;
0043cd21      wcscpy(var_34, var_30);
0043cd27      enum PlatformString::DisplayStringMode eax_4 = arg2;
0043cd37      wchar16* ecx_1 = 0x50000;
0043cd3c      class PStringBase<unsigned short> var_38;
0043cd3c      
0043cd3c      if (eax_4 == dsError)
0043cd3c      {
0043ce17          var_30 = 0x50000;
0043ce1a          var_34 = &data_794320;
0043ce24          var_34 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_30, var_34);
0043ce27          var_38 = 0x794320;
0043ce31          var_38 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_34, var_38);
0043ce39          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_38, &data_794320);
0043ce4d          class PStringBase<unsigned short> __return_1;
0043ce4d          var_30 = PlatformString::GetString(&__return_1, 0xb, var_38, var_34, var_30);
0043ce52          PStringBase<unsigned short>::operator=(&var_1c, var_30);
0043ce5b          int32_t* esi_6 = (__return_1 - 0x14);
0043ce61          var_30 = &esi_6[1];
0043ce61          
0043ce6a          if ((InterlockedDecrement(var_30) == 0 && esi_6 != 0))
0043ce6a          {
0043ce6c              int32_t eax_16 = *(uint32_t*)esi_6;
0043ce6e              var_30 = 1;
0043ce72              *(uint32_t*)eax_16(var_30);
0043ce6a          }
0043ce6a          
0043ce74          ecx_1 = 0x50010;
0043cd3c      }
0043cd3c      else if (eax_4 == 1)
0043cd43      {
0043cdb3          var_30 = 0x50000;
0043cdb6          var_34 = &data_794320;
0043cdc0          var_34 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_30, var_34);
0043cdc3          var_38 = 0x794320;
0043cdcd          var_38 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_34, var_38);
0043cdd5          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_38, &data_794320);
0043cde9          class PStringBase<unsigned short> __return;
0043cde9          var_30 = PlatformString::GetString(&__return, 0xc, var_38, var_34, var_30);
0043cdee          PStringBase<unsigned short>::operator=(&var_1c, var_30);
0043cdf7          int32_t* esi_4 = (__return - 0x14);
0043cdfd          var_30 = &esi_4[1];
0043cdfd          
0043ce06          if ((InterlockedDecrement(var_30) == 0 && esi_4 != 0))
0043ce06          {
0043ce08              int32_t eax_13 = *(uint32_t*)esi_4;
0043ce0a              var_30 = 1;
0043ce0e              *(uint32_t*)eax_13(var_30);
0043ce06          }
0043ce06          
0043ce10          ecx_1 = 0x50030;
0043cd43      }
0043cd43      else if (eax_4 == 2)
0043cd46      {
0043cd4c          var_30 = 0x50000;
0043cd4f          var_34 = &data_794320;
0043cd59          var_34 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_30, var_34);
0043cd5c          var_38 = 0x794320;
0043cd66          var_38 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_34, var_38);
0043cd6e          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_38, &data_794320);
0043cd82          var_30 = PlatformString::GetString(&arg2, 0xd, var_38, var_34, var_30);
0043cd87          PStringBase<unsigned short>::operator=(&var_1c, var_30);
0043cd90          int32_t* esi_2 = (arg2 - 0x14);
0043cd96          var_30 = &esi_2[1];
0043cd96          
0043cd9f          if ((InterlockedDecrement(var_30) == 0 && esi_2 != 0))
0043cd9f          {
0043cda1              int32_t eax_10 = *(uint32_t*)esi_2;
0043cda3              var_30 = 1;
0043cda7              *(uint32_t*)eax_10(var_30);
0043cd9f          }
0043cd9f          
0043cda9          ecx_1 = 0x50040;
0043cd46      }
0043cd46      
0043ce7d      var_30 = ecx_1;
0043ce82      var_34 = var_1c;
0043ce83      var_38 = arg1;
0043ce86      user32_MessageBoxW_Ptr(0, var_38, var_34, var_30);
0043ce90      var_30 = edx;
0043ce91      var_34 = eax;
0043ce92      DialogBoxGateways::DialogThread_DoneWithDialogBox(var_34);
0043ce9f      var_38 = edx_1;
0043cea1      DialogBoxGateways::ReportThread_DoneWithDialogBox(eax_1);
0043ceaa      int32_t* esi_8 = (var_1c - 0x14);
0043ceb3      var_30 = &esi_8[1];
0043ceb3      
0043cebc      if ((InterlockedDecrement(var_30) == 0 && esi_8 != 0))
0043cebc      {
0043cebe          int32_t eax_19 = *(uint32_t*)esi_8;
0043cec0          var_30 = 1;
0043cec4          *(uint32_t*)eax_19(var_30);
0043cebc      }
0043cebc      
0043cecc      var_30 = (arg1 - 0x10);
0043cecc      
0043ced5      if ((InterlockedDecrement(var_30) == 0 && arg1 != 0x14))
0043ced5      {
0043ced7          int32_t edx_7 = *(uint32_t*)(arg1 - 0x14);
0043ced9          var_30 = 1;
0043cedd          *(uint32_t*)edx_7(var_30);
0043ced5      }
0043cce0  }

0043cee7                       90 90 90 90 90 90 90 90 90                                                         .........

0043cef0  void __convention("regparm") PlatformString::DisplayString(uint16_t arg1, class PStringBase<unsigned short> arg2, class PStringBase<unsigned short> arg3, class PStringBase<unsigned short> arg4, enum PlatformString::DisplayStringMode arg5)

0043cef0  {
0043cef4      int32_t ebx;
0043cef4      int32_t var_4 = ebx;
0043cefe      enum PlatformString::DisplayStringMode var_14 = arg5;
0043ceff      class PStringBase<unsigned short> ecx;
0043ceff      class PStringBase<unsigned short> var_18 = ecx;
0043cf02      class PStringBase<unsigned short> var_1c = ecx;
0043cf07      arg5 = &var_18;
0043cf18      int32_t var_1c_2 = InterlockedIncrement((arg4 - 0x10), arg4);
0043cf2e      int32_t var_1c_4 = InterlockedIncrement((arg4 - 0x10), arg4);
0043cf37      InterlockedIncrement((arg4 - 0x10), arg4);
0043cf43      class PStringBase<unsigned short> edi;
0043cf43      PlatformString::GetString(__return, arg4.m_charbuffer, var_18, var_14, edi);
0043cf4b      enum PlatformString::DisplayStringMode ebp;
0043cf4b      class PStringBase<unsigned short> esi;
0043cf4b      PlatformString::DisplayFinalString(esi, ebp);
0043cf4b      
0043cf68      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
0043cf70          **(uint32_t**)(arg4 - 0x14)(1);
0043cf70      
0043cf7e      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
0043cf86          **(uint32_t**)(arg4 - 0x14)(1);
0043cf86      
0043cf94      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
0043cf9d          **(uint32_t**)(arg4 - 0x14)(1);
0043cef0  }

0043cfa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0043cfb0  void __fastcall PixelFormatDesc::CalcBitOffsets(class PixelFormatDesc* this)

0043cfb0  {
0043cfb5      class PixelFormatDesc* this_1 = this;
0043cfb8      uint32_t redBitMask = this_1->redBitMask;
0043cfbc      this = 0;
0043cfbc      
0043cfc9      while ((((int8_t)(redBitMask >> this)) & 1) == 0)
0043cfc9      {
0043cfcb          this += 1;
0043cfcb          
0043cfd0          if (this >= 0x20)
0043cfd0          {
0043cfd2              this = 0;
0043cfd2              break;
0043cfd0          }
0043cfc9      }
0043cfc9      
0043cfd4      uint32_t greenBitMask = this_1->greenBitMask;
0043cfd7      char var_10 = this;
0043cfdb      this_1->redBitOffset = this;
0043cfde      this = 0;
0043cfde      
0043cfeb      while ((((int8_t)(greenBitMask >> this)) & 1) == 0)
0043cfeb      {
0043cfed          this += 1;
0043cfed          
0043cff2          if (this >= 0x20)
0043cff2          {
0043cff4              this = 0;
0043cff4              break;
0043cff2          }
0043cfeb      }
0043cfeb      
0043cff6      uint32_t blueBitMask = this_1->blueBitMask;
0043cff9      char var_f = this;
0043cffd      this_1->greenBitOffset = this;
0043d000      this = 0;
0043d000      
0043d00d      while ((((int8_t)(blueBitMask >> this)) & 1) == 0)
0043d00d      {
0043d00f          this += 1;
0043d00f          
0043d014          if (this >= 0x20)
0043d014          {
0043d016              this = 0;
0043d016              break;
0043d014          }
0043d00d      }
0043d00d      
0043d018      uint32_t alphaBitMask = this_1->alphaBitMask;
0043d01b      char var_e = this;
0043d01f      this_1->blueBitOffset = this;
0043d022      this = 0;
0043d022      
0043d02b      while ((((int8_t)(alphaBitMask >> this)) & 1) == 0)
0043d02b      {
0043d02d          this += 1;
0043d02d          
0043d032          if (this >= 0x20)
0043d032          {
0043d034              this = 0;
0043d034              break;
0043d032          }
0043d02b      }
0043d02b      
0043d036      uint8_t edx_8 = 0;
0043d03c      this_1->alphaBitOffset = this;
0043d03f      int32_t esi = 0;
0043d041      int32_t i_4 = 0x20;
0043d055      int32_t i;
0043d055      
0043d055      do
0043d055      {
0043d051          edx_8 += (((int8_t)(redBitMask >> esi)) & 1);
0043d053          esi += 1;
0043d054          i = i_4;
0043d054          i_4 -= 1;
0043d055      } while (i != 1);
0043d057      this_1->redBitCount = edx_8;
0043d05a      edx_8 = 0;
0043d05c      int32_t esi_1 = 0;
0043d05e      int32_t i_5 = 0x20;
0043d072      int32_t i_1;
0043d072      
0043d072      do
0043d072      {
0043d06e          edx_8 += (((int8_t)(greenBitMask >> esi_1)) & 1);
0043d070          esi_1 += 1;
0043d071          i_1 = i_5;
0043d071          i_5 -= 1;
0043d072      } while (i_1 != 1);
0043d074      this_1->greenBitCount = edx_8;
0043d077      edx_8 = 0;
0043d079      int32_t esi_2 = 0;
0043d07b      int32_t i_6 = 0x20;
0043d08f      int32_t i_2;
0043d08f      
0043d08f      do
0043d08f      {
0043d08b          edx_8 += (((int8_t)(blueBitMask >> esi_2)) & 1);
0043d08d          esi_2 += 1;
0043d08e          i_2 = i_6;
0043d08e          i_6 -= 1;
0043d08f      } while (i_2 != 1);
0043d091      this_1->blueBitCount = edx_8;
0043d094      edx_8 = 0;
0043d096      int32_t esi_3 = 0;
0043d098      int32_t i_7 = 0x20;
0043d0ad      int32_t i_3;
0043d0ad      
0043d0ad      do
0043d0ad      {
0043d0a9          edx_8 += (((int8_t)(alphaBitMask >> esi_3)) & 1);
0043d0ab          esi_3 += 1;
0043d0ac          i_3 = i_7;
0043d0ac          i_7 -= 1;
0043d0ad      } while (i_3 != 1);
0043d0b3      this_1->alphaBitCount = edx_8;
0043d0c0      this_1->redMax = (redBitMask >> var_10);
0043d0cd      this_1->greenMax = (greenBitMask >> var_f);
0043d0dc      this_1->blueMax = (blueBitMask >> var_e);
0043d0df      this_1->alphaMax = (alphaBitMask >> this);
0043cfb0  }

0043d0ea                                90 90 90 90 90 90                                                            ......

0043d0f0  uint8_t __thiscall PixelFormatDesc::SetFormat(class PixelFormatDesc* this, enum PixelFormatID const arg2)

0043d0f0  {
0043d0fa      this->format = arg2;
0043d0fc      this->flags = 0;
0043d0ff      this->fourCC = 0;
0043d102      this->bitsPerPixel = 0;
0043d105      this->alphaBitMask = 0;
0043d108      this->blueBitMask = 0;
0043d10b      this->greenBitMask = 0;
0043d10e      this->redBitMask = 0;
0043d111      this->alphaBitOffset = 0;
0043d114      this->blueBitOffset = 0;
0043d117      this->greenBitOffset = 0;
0043d11a      this->redBitOffset = 0;
0043d122      enum PixelFormatID eax;
0043d122      
0043d122      if (arg2 <= PFID_P8)
0043d122      {
0043d128          if (arg2 == PFID_P8)
0043d128          {
0043d291              this->flags = 0x40;
0043d298              this->bitsPerPixel = 8;
0043d29c              PixelFormatDesc::CalcBitOffsets(this);
0043d2a1              int32_t eax_7;
0043d2a1              eax_7 = 1;
0043d2a4              return 1;
0043d128          }
0043d128          
0043d138          if ((arg2 - 0x14) > 0xf)
0043d138          {
0043d4e7              eax = 0;
0043d4ea              return 0;
0043d138          }
0043d138          
0043d4c7          switch (arg2)
0043d4c7          {
0043d411              case PFID_R8G8B8:
0043d411              {
0043d411              label_43d411:
0043d411                  this->bitsPerPixel = 0x18;
0043d415                  this->flags = 1;
0043d411                  break;
0043d411              }
0043d145              case PFID_A8R8G8B8:
0043d145              {
0043d145                  this->flags = 3;
0043d14c                  this->bitsPerPixel = 0x20;
0043d150                  this->alphaBitMask = 0xff000000;
0043d145                  break;
0043d145              }
0043d15c              case PFID_X8R8G8B8:
0043d15c              {
0043d15c                  this->bitsPerPixel = 0x20;
0043d415                  this->flags = 1;
0043d15c                  break;
0043d15c              }
0043d165              case PFID_R5G6B5:
0043d165              {
0043d165                  this->flags = 1;
0043d168                  this->redBitMask = 0xf800;
0043d16f                  this->greenBitMask = 0x7e0;
0043d176                  this->bitsPerPixel = 0x10;
0043d17a                  this->blueBitMask = 0x1f;
0043d181                  PixelFormatDesc::CalcBitOffsets(this);
0043d186                  int32_t eax_1;
0043d186                  eax_1 = 1;
0043d189                  return 1;
0043d165                  break;
0043d165              }
0043d18c              case PFID_X1R5G5B5:
0043d18c              {
0043d18c                  this->flags = 1;
0043d19f              label_43d19f:
0043d19f                  this->redBitMask = 0x7c00;
0043d1a6                  this->greenBitMask = 0x3e0;
0043d1ad                  this->bitsPerPixel = 0x10;
0043d1b1                  this->blueBitMask = 0x1f;
0043d1b8                  PixelFormatDesc::CalcBitOffsets(this);
0043d1bd                  int32_t eax_2;
0043d1bd                  eax_2 = 1;
0043d1c0                  return 1;
0043d18c                  break;
0043d18c              }
0043d191              case PFID_A1R5G5B5:
0043d191              {
0043d191                  this->flags = 3;
0043d198                  this->alphaBitMask = 0x8000;
0043d198                  goto label_43d19f;
0043d191              }
0043d1c3              case PFID_A4R4G4B4:
0043d1c3              {
0043d1c3                  this->flags = 3;
0043d1ca                  this->alphaBitMask = 0xf000;
0043d1d6              label_43d1d6:
0043d1d6                  this->bitsPerPixel = 0x10;
0043d1da                  this->redBitMask = 0xf00;
0043d1e1                  this->greenBitMask = 0xf0;
0043d1e8                  this->blueBitMask = 0xf;
0043d1eb                  PixelFormatDesc::CalcBitOffsets(this);
0043d1f0                  int32_t eax_3;
0043d1f0                  eax_3 = 1;
0043d1f3                  return 1;
0043d1c3                  break;
0043d1c3              }
0043d4e7              case PFID_R3G3B2:
0043d4e7              case PFID_A8R3G3B2:
0043d4e7              case 0x22:
0043d4e7              {
0043d4e7                  eax = 0;
0043d4ea                  return 0;
0043d4e7                  break;
0043d4e7              }
0043d45f              case PFID_A8:
0043d45f              {
0043d45f              label_43d45f:
0043d45f                  this->flags = 2;
0043d466                  this->alphaBitMask = 0xff;
0043d46d                  this->bitsPerPixel = 8;
0043d471                  PixelFormatDesc::CalcBitOffsets(this);
0043d476                  int32_t eax_19;
0043d476                  eax_19 = 1;
0043d479                  return 1;
0043d45f                  break;
0043d45f              }
0043d1d3              case PFID_X4R4G4B4:
0043d1d3              {
0043d1d3                  this->flags = 1;
0043d1d3                  goto label_43d1d6;
0043d1d3              }
0043d1f6              case PFID_A2B10G10R10:
0043d1f6              {
0043d1f6                  this->flags = 3;
0043d1fd                  this->bitsPerPixel = 0x20;
0043d201                  this->alphaBitMask = 0xc0000000;
0043d208                  this->blueBitMask = 0x3ff00000;
0043d20f                  this->greenBitMask = 0xffc00;
0043d216                  this->redBitMask = 0x3ff;
0043d21d                  PixelFormatDesc::CalcBitOffsets(this);
0043d222                  int32_t eax_4;
0043d222                  eax_4 = 1;
0043d225                  return 1;
0043d1f6                  break;
0043d1f6              }
0043d228              case PFID_A8B8G8R8:
0043d228              {
0043d228                  this->flags = 3;
0043d22f                  this->alphaBitMask = 0xff000000;
0043d23b              label_43d23b:
0043d23b                  this->bitsPerPixel = 0x20;
0043d23f                  this->blueBitMask = 0xff0000;
0043d246                  this->greenBitMask = 0xff00;
0043d24d                  this->redBitMask = 0xff;
0043d254                  PixelFormatDesc::CalcBitOffsets(this);
0043d259                  int32_t eax_5;
0043d259                  eax_5 = 1;
0043d25c                  return 1;
0043d228                  break;
0043d228              }
0043d238              case PFID_X8B8G8R8:
0043d238              {
0043d238                  this->flags = 1;
0043d238                  goto label_43d23b;
0043d238              }
0043d25f              case PFID_A2R10G10B10:
0043d25f              {
0043d25f                  this->flags = 3;
0043d266                  this->bitsPerPixel = 0x20;
0043d26a                  this->alphaBitMask = 0xc0000000;
0043d271                  this->redBitMask = 0x3ff00000;
0043d278                  this->greenBitMask = 0xffc00;
0043d27f                  this->blueBitMask = 0x3ff;
0043d286                  PixelFormatDesc::CalcBitOffsets(this);
0043d28b                  int32_t eax_6;
0043d28b                  eax_6 = 1;
0043d28e                  return 1;
0043d25f                  break;
0043d25f              }
0043d4c7          }
0043d4c7          
0043d418          this->redBitMask = 0xff0000;
0043d41f          this->greenBitMask = 0xff00;
0043d426          this->blueBitMask = 0xff;
0043d42d          PixelFormatDesc::CalcBitOffsets(this);
0043d432          int32_t eax_17;
0043d432          eax_17 = 1;
0043d435          return 1;
0043d122      }
0043d122      
0043d2ac      if (arg2 <= PFID_CUSTOM_A8B8G8R8)
0043d2ac      {
0043d2b2          if (arg2 == PFID_CUSTOM_A8B8G8R8)
0043d2b2          {
0043d3b7              this->flags = 3;
0043d3be              this->bitsPerPixel = 0x20;
0043d3c2              this->redBitMask = 0xff;
0043d3c9              this->greenBitMask = 0xff00;
0043d3d0              this->blueBitMask = 0xff0000;
0043d3d7              this->alphaBitMask = 0xff000000;
0043d3de              PixelFormatDesc::CalcBitOffsets(this);
0043d3e3              int32_t eax_15;
0043d3e3              eax_15 = 1;
0043d3e6              return 1;
0043d2b2          }
0043d2b2          
0043d2c0          if ((arg2 - 0x3c) <= 0xb4)
0043d4c7              switch (arg2)
0043d4c7              {
0043d2ea                  case 0x3c:
0043d2ea                  {
0043d2ea                      this->flags = 9;
0043d2f1                      this->bitsPerPixel = 0x10;
0043d2f5                      this->redBitMask = 0xff00;
0043d2fc                      this->greenBitMask = 0xff;
0043d303                      this->blueBitMask = 0;
0043d306                      PixelFormatDesc::CalcBitOffsets(this);
0043d30b                      int32_t eax_9;
0043d30b                      eax_9 = 1;
0043d30e                      return 1;
0043d2ea                      break;
0043d2ea                  }
0043d34b                  case 0x46:
0043d34b                  case 0x50:
0043d34b                  {
0043d34b                      this->flags = 2;
0043d352                      this->bitsPerPixel = 0x10;
0043d356                      this->alphaBitMask = 0xffff;
0043d35d                      PixelFormatDesc::CalcBitOffsets(this);
0043d362                      int32_t eax_12;
0043d362                      eax_12 = 1;
0043d365                      return 1;
0043d34b                      break;
0043d34b                  }
0043d311                  case 0x47:
0043d311                  {
0043d311                      this->flags = 2;
0043d318                      this->bitsPerPixel = 0x20;
0043d31c                      this->alphaBitMask = 0xffffffff;
0043d323                      PixelFormatDesc::CalcBitOffsets(this);
0043d328                      int32_t eax_10;
0043d328                      eax_10 = 1;
0043d32b                      return 1;
0043d311                      break;
0043d311                  }
0043d32e                  case 0x49:
0043d32e                  {
0043d32e                      this->flags = 2;
0043d335                      this->bitsPerPixel = 0x10;
0043d339                      this->alphaBitMask = 0xfffe;
0043d340                      PixelFormatDesc::CalcBitOffsets(this);
0043d345                      int32_t eax_11;
0043d345                      eax_11 = 1;
0043d348                      return 1;
0043d32e                      break;
0043d32e                  }
0043d368                  case 0x4b:
0043d368                  case 0x4d:
0043d368                  case 0x4f:
0043d368                  {
0043d368                      this->flags = 2;
0043d36f                      this->bitsPerPixel = 0x20;
0043d373                      this->alphaBitMask = 0xffffff00;
0043d37a                      PixelFormatDesc::CalcBitOffsets(this);
0043d37f                      int32_t eax_13;
0043d37f                      eax_13 = 1;
0043d382                      return 1;
0043d368                      break;
0043d368                  }
0043d2d4                  case 0x65:
0043d2d4                  {
0043d2d4                      this->flags = 0x40;
0043d2db                      this->bitsPerPixel = 0x10;
0043d2df                      PixelFormatDesc::CalcBitOffsets(this);
0043d2e4                      int32_t eax_8;
0043d2e4                      eax_8 = 1;
0043d2e7                      return 1;
0043d2d4                      break;
0043d2d4                  }
0043d385                  case 0xf0:
0043d385                  {
0043d385                      this->flags = 3;
0043d38c                      this->bitsPerPixel = 0x20;
0043d390                      this->redBitMask = 0xff000000;
0043d397                      this->greenBitMask = 0xff0000;
0043d39e                      this->blueBitMask = 0xff00;
0043d3a5                      this->alphaBitMask = 0xff;
0043d3ac                      PixelFormatDesc::CalcBitOffsets(this);
0043d3b1                      int32_t eax_14;
0043d3b1                      eax_14 = 1;
0043d3b4                      return 1;
0043d385                      break;
0043d385                  }
0043d4c7              }
0043d4c7          
0043d4e7          eax = 0;
0043d4ea          return 0;
0043d2ac      }
0043d2ac      
0043d3ee      if (arg2 > PFID_DXT1)
0043d3ee      {
0043d4b9          if (arg2 == PFID_DXT4)
0043d4b9          {
0043d4d7              this->fourCC = 0x34545844;
0043d4de              goto label_43d4f4;
0043d4b9          }
0043d4b9          
0043d4c0          if (arg2 == PFID_DXT2)
0043d4c0          {
0043d4ce              this->fourCC = 0x32545844;
0043d4d5              goto label_43d4f4;
0043d4c0          }
0043d4c0          
0043d4c7          if (arg2 == PFID_DXT3)
0043d4c7          {
0043d4c9              this->fourCC = arg2;
0043d4cc              goto label_43d4f4;
0043d4c7          }
0043d4c7          
0043d4e5          if (arg2 == PFID_DXT5)
0043d4e5          {
0043d4ed              this->fourCC = 0x35545844;
0043d4f4          label_43d4f4:
0043d4f4              this->flags = 4;
0043d4fb              this->bitsPerPixel = 8;
0043d4ff              PixelFormatDesc::CalcBitOffsets(this);
0043d504              int32_t eax_22;
0043d504              eax_22 = 1;
0043d507              return 1;
0043d4e5          }
0043d4e5          
0043d4e7          eax = 0;
0043d4ea          return 0;
0043d3ee      }
0043d3ee      
0043d3f4      if (arg2 == PFID_DXT1)
0043d3f4      {
0043d49a          this->flags = 4;
0043d49d          this->fourCC = 0x31545844;
0043d4a4          this->bitsPerPixel = 4;
0043d4a7          PixelFormatDesc::CalcBitOffsets(this);
0043d4ac          int32_t eax_21;
0043d4ac          eax_21 = 1;
0043d4af          return 1;
0043d3f4      }
0043d3f4      
0043d3ff      if (arg2 > PFID_CUSTOM_LSCAPE_ALPHA)
0043d3ff      {
0043d481          if (arg2 != PFID_CUSTOM_RAW_JPEG)
0043d481          {
0043d4e7              eax = 0;
0043d4ea              return 0;
0043d481          }
0043d481          
0043d483          this->flags = 0x11;
0043d48a          PixelFormatDesc::CalcBitOffsets(this);
0043d48f          int32_t eax_20;
0043d48f          eax_20 = 1;
0043d492          return 1;
0043d3ff      }
0043d3ff      
0043d401      if (arg2 == PFID_CUSTOM_LSCAPE_ALPHA)
0043d401          goto label_43d45f;
0043d401      
0043d408      if (arg2 != PFID_CUSTOM_B8G8R8)
0043d408      {
0043d40b          if (arg2 != 0xf3)
0043d40b          {
0043d4e7              eax = 0;
0043d4ea              return 0;
0043d40b          }
0043d40b          
0043d40b          goto label_43d411;
0043d408      }
0043d408      
0043d438      this->flags = 1;
0043d43b      this->bitsPerPixel = 0x18;
0043d43f      this->redBitMask = 0xff;
0043d446      this->greenBitMask = 0xff00;
0043d44d      this->blueBitMask = 0xff0000;
0043d454      PixelFormatDesc::CalcBitOffsets(this);
0043d459      int32_t eax_18;
0043d459      eax_18 = 1;
0043d45c      return 1;
0043d0f0  }

0043d50a                                8b ff                                                                        ..
0043d50c  uint32_t jump_table_43d50c[0x10] = 
0043d50c  {
0043d50c      [0x0] =  0x0043d411
0043d510      [0x1] =  0x0043d145
0043d514      [0x2] =  0x0043d15c
0043d518      [0x3] =  0x0043d165
0043d51c      [0x4] =  0x0043d18c
0043d520      [0x5] =  0x0043d191
0043d524      [0x6] =  0x0043d1c3
0043d528      [0x7] =  0x0043d4e7
0043d52c      [0x8] =  0x0043d45f
0043d530      [0x9] =  0x0043d4e7
0043d534      [0xa] =  0x0043d1d3
0043d538      [0xb] =  0x0043d1f6
0043d53c      [0xc] =  0x0043d228
0043d540      [0xd] =  0x0043d238
0043d544      [0xe] =  0x0043d4e7
0043d548      [0xf] =  0x0043d25f
0043d54c  }
0043d54c  uint32_t jump_table_43d54c[0x8] = 
0043d54c  {
0043d54c      [0x0] =  0x0043d2ea
0043d550      [0x1] =  0x0043d34b
0043d554      [0x2] =  0x0043d311
0043d558      [0x3] =  0x0043d32e
0043d55c      [0x4] =  0x0043d368
0043d560      [0x5] =  0x0043d2d4
0043d564      [0x6] =  0x0043d385
0043d568      [0x7] =  0x0043d4e7
0043d56c  }
0043d56c  uint8_t lookup_table_43d56c[0xb5] = 
0043d56c  {
0043d56c      [0x00] =  0x00
0043d56d      [0x01] =  0x07
0043d56e      [0x02] =  0x07
0043d56f      [0x03] =  0x07
0043d570      [0x04] =  0x07
0043d571      [0x05] =  0x07
0043d572      [0x06] =  0x07
0043d573      [0x07] =  0x07
0043d574      [0x08] =  0x07
0043d575      [0x09] =  0x07
0043d576      [0x0a] =  0x01
0043d577      [0x0b] =  0x02
0043d578      [0x0c] =  0x07
0043d579      [0x0d] =  0x03
0043d57a      [0x0e] =  0x07
0043d57b      [0x0f] =  0x04
0043d57c      [0x10] =  0x07
0043d57d      [0x11] =  0x04
0043d57e      [0x12] =  0x07
0043d57f      [0x13] =  0x04
0043d580      [0x14] =  0x01
0043d581      [0x15] =  0x07
0043d582      [0x16] =  0x07
0043d583      [0x17] =  0x07
0043d584      [0x18] =  0x07
0043d585      [0x19] =  0x07
0043d586      [0x1a] =  0x07
0043d587      [0x1b] =  0x07
0043d588      [0x1c] =  0x07
0043d589      [0x1d] =  0x07
0043d58a      [0x1e] =  0x07
0043d58b      [0x1f] =  0x07
0043d58c      [0x20] =  0x07
0043d58d      [0x21] =  0x07
0043d58e      [0x22] =  0x07
0043d58f      [0x23] =  0x07
0043d590      [0x24] =  0x07
0043d591      [0x25] =  0x07
0043d592      [0x26] =  0x07
0043d593      [0x27] =  0x07
0043d594      [0x28] =  0x07
0043d595      [0x29] =  0x05
0043d596      [0x2a] =  0x07
0043d597      [0x2b] =  0x07
0043d598      [0x2c] =  0x07
0043d599      [0x2d] =  0x07
0043d59a      [0x2e] =  0x07
0043d59b      [0x2f] =  0x07
0043d59c      [0x30] =  0x07
0043d59d      [0x31] =  0x07
0043d59e      [0x32] =  0x07
0043d59f      [0x33] =  0x07
0043d5a0      [0x34] =  0x07
0043d5a1      [0x35] =  0x07
0043d5a2      [0x36] =  0x07
0043d5a3      [0x37] =  0x07
0043d5a4      [0x38] =  0x07
0043d5a5      [0x39] =  0x07
0043d5a6      [0x3a] =  0x07
0043d5a7      [0x3b] =  0x07
0043d5a8      [0x3c] =  0x07
0043d5a9      [0x3d] =  0x07
0043d5aa      [0x3e] =  0x07
0043d5ab      [0x3f] =  0x07
0043d5ac      [0x40] =  0x07
0043d5ad      [0x41] =  0x07
0043d5ae      [0x42] =  0x07
0043d5af      [0x43] =  0x07
0043d5b0      [0x44] =  0x07
0043d5b1      [0x45] =  0x07
0043d5b2      [0x46] =  0x07
0043d5b3      [0x47] =  0x07
0043d5b4      [0x48] =  0x07
0043d5b5      [0x49] =  0x07
0043d5b6      [0x4a] =  0x07
0043d5b7      [0x4b] =  0x07
0043d5b8      [0x4c] =  0x07
0043d5b9      [0x4d] =  0x07
0043d5ba      [0x4e] =  0x07
0043d5bb      [0x4f] =  0x07
0043d5bc      [0x50] =  0x07
0043d5bd      [0x51] =  0x07
0043d5be      [0x52] =  0x07
0043d5bf      [0x53] =  0x07
0043d5c0      [0x54] =  0x07
0043d5c1      [0x55] =  0x07
0043d5c2      [0x56] =  0x07
0043d5c3      [0x57] =  0x07
0043d5c4      [0x58] =  0x07
0043d5c5      [0x59] =  0x07
0043d5c6      [0x5a] =  0x07
0043d5c7      [0x5b] =  0x07
0043d5c8      [0x5c] =  0x07
0043d5c9      [0x5d] =  0x07
0043d5ca      [0x5e] =  0x07
0043d5cb      [0x5f] =  0x07
0043d5cc      [0x60] =  0x07
0043d5cd      [0x61] =  0x07
0043d5ce      [0x62] =  0x07
0043d5cf      [0x63] =  0x07
0043d5d0      [0x64] =  0x07
0043d5d1      [0x65] =  0x07
0043d5d2      [0x66] =  0x07
0043d5d3      [0x67] =  0x07
0043d5d4      [0x68] =  0x07
0043d5d5      [0x69] =  0x07
0043d5d6      [0x6a] =  0x07
0043d5d7      [0x6b] =  0x07
0043d5d8      [0x6c] =  0x07
0043d5d9      [0x6d] =  0x07
0043d5da      [0x6e] =  0x07
0043d5db      [0x6f] =  0x07
0043d5dc      [0x70] =  0x07
0043d5dd      [0x71] =  0x07
0043d5de      [0x72] =  0x07
0043d5df      [0x73] =  0x07
0043d5e0      [0x74] =  0x07
0043d5e1      [0x75] =  0x07
0043d5e2      [0x76] =  0x07
0043d5e3      [0x77] =  0x07
0043d5e4      [0x78] =  0x07
0043d5e5      [0x79] =  0x07
0043d5e6      [0x7a] =  0x07
0043d5e7      [0x7b] =  0x07
0043d5e8      [0x7c] =  0x07
0043d5e9      [0x7d] =  0x07
0043d5ea      [0x7e] =  0x07
0043d5eb      [0x7f] =  0x07
0043d5ec      [0x80] =  0x07
0043d5ed      [0x81] =  0x07
0043d5ee      [0x82] =  0x07
0043d5ef      [0x83] =  0x07
0043d5f0      [0x84] =  0x07
0043d5f1      [0x85] =  0x07
0043d5f2      [0x86] =  0x07
0043d5f3      [0x87] =  0x07
0043d5f4      [0x88] =  0x07
0043d5f5      [0x89] =  0x07
0043d5f6      [0x8a] =  0x07
0043d5f7      [0x8b] =  0x07
0043d5f8      [0x8c] =  0x07
0043d5f9      [0x8d] =  0x07
0043d5fa      [0x8e] =  0x07
0043d5fb      [0x8f] =  0x07
0043d5fc      [0x90] =  0x07
0043d5fd      [0x91] =  0x07
0043d5fe      [0x92] =  0x07
0043d5ff      [0x93] =  0x07
0043d600      [0x94] =  0x07
0043d601      [0x95] =  0x07
0043d602      [0x96] =  0x07
0043d603      [0x97] =  0x07
0043d604      [0x98] =  0x07
0043d605      [0x99] =  0x07
0043d606      [0x9a] =  0x07
0043d607      [0x9b] =  0x07
0043d608      [0x9c] =  0x07
0043d609      [0x9d] =  0x07
0043d60a      [0x9e] =  0x07
0043d60b      [0x9f] =  0x07
0043d60c      [0xa0] =  0x07
0043d60d      [0xa1] =  0x07
0043d60e      [0xa2] =  0x07
0043d60f      [0xa3] =  0x07
0043d610      [0xa4] =  0x07
0043d611      [0xa5] =  0x07
0043d612      [0xa6] =  0x07
0043d613      [0xa7] =  0x07
0043d614      [0xa8] =  0x07
0043d615      [0xa9] =  0x07
0043d616      [0xaa] =  0x07
0043d617      [0xab] =  0x07
0043d618      [0xac] =  0x07
0043d619      [0xad] =  0x07
0043d61a      [0xae] =  0x07
0043d61b      [0xaf] =  0x07
0043d61c      [0xb0] =  0x07
0043d61d      [0xb1] =  0x07
0043d61e      [0xb2] =  0x07
0043d61f      [0xb3] =  0x07
0043d620      [0xb4] =  0x06
0043d621  }

0043d621     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0043d630  void __thiscall PixelFormatDesc::PixelFormatDesc(class PixelFormatDesc* this, enum PixelFormatID const arg2)

0043d630  {
0043d638      PixelFormatDesc::SetFormat(this, arg2);
0043d630  }

0043d643           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0043d650  int32_t LandDefs::in_bounds(int32_t arg1, int32_t arg2) __pure

0043d650  {
0043d66d      if ((arg1 >= 0 && (arg2 >= 0 && (arg1 < 0x7f8 && arg2 < 0x7f8))))
0043d674          return 1;
0043d674      
0043d677      return 0;
0043d650  }

0043d678                                                                          90 90 90 90 90 90 90 90                          ........

0043d680  int32_t LandDefs::blockid_to_lcoord(uint32_t arg1, int32_t* arg2, int32_t* arg3)

0043d680  {
0043d686      if (arg1 != 0)
0043d686      {
0043d698          *(uint32_t*)arg2 = ((arg1 >> 0x15) & 0x7f8);
0043d6a4          int32_t eax_5 = (((uint32_t)((int8_t)(arg1 >> 0x10))) << 3);
0043d6a7          *(uint32_t*)arg3 = eax_5;
0043d6a9          int32_t ecx_2 = *(uint32_t*)arg2;
0043d6a9          
0043d6c0          if ((ecx_2 >= 0 && (eax_5 >= 0 && (ecx_2 < 0x7f8 && eax_5 < 0x7f8))))
0043d6c7              return 1;
0043d686      }
0043d686      
0043d6ca      return 0;
0043d680  }

0043d6cb                                   90 90 90 90 90                                                             .....

0043d6d0  uint8_t AreFloatEqual(float const arg1, float const arg2, float const arg3)

0043d6d0  {
0043d6d8      long double x87_r7_1 = fabsl((((long double)arg1) - ((long double)arg2)));
0043d6da      long double temp0 = ((long double)arg3);
0043d6da      (x87_r7_1 - temp0);
0043d6de      int32_t eax;
0043d6de      eax = ((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0))));
0043d6e0      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0043d6e0      
0043d6e3      if (p)
0043d6ed          return 0;
0043d6ed      
0043d6ea      return 1;
0043d6d0  }

0043d6ee                                            90 90                                                                ..

0043d6f0  void __thiscall Vector3::operator*=(class Vector3* this, float const arg2)

0043d6f0  {
0043d6f6      this->x = ((float)(((long double)arg2) * ((long double)this->x)));
0043d6ff      this->y = ((float)(((long double)arg2) * ((long double)this->y)));
0043d709      this->z = ((float)(((long double)arg2) * ((long double)this->z)));
0043d6f0  }

0043d70f                                               90                                                                 .

0043d710  class Vector3* __thiscall Vector3::operator+(class Vector3 const* this, class Vector3* __return, class Vector3 const* arg3)

0043d710  {
0043d71b      long double x87_r6_1 = (((long double)arg3->y) + ((long double)this->y));
0043d721      float* result = __return;
0043d725      long double x87_r5_1 = (((long double)arg3->z) + ((long double)this->z));
0043d72a      *(uint32_t*)result = ((float)(((long double)arg3->x) + ((long double)this->x)));
0043d72c      result[1] = ((float)x87_r6_1);
0043d72f      result[2] = ((float)x87_r5_1);
0043d732      return result;
0043d710  }

0043d735                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0043d740  class Vector3* __thiscall Vector3::operator-(class Vector3 const* this, class Vector3* __return, class Vector3 const* arg3)

0043d740  {
0043d742      float* eax = arg3;
0043d74b      long double x87_r6_1 = (((long double)this->y) - ((long double)eax[1]));
0043d751      long double x87_r5_1 = (((long double)this->z) - ((long double)eax[2]));
0043d75a      __return->x = ((float)(((long double)this->x) - ((long double)*(uint32_t*)eax)));
0043d75c      __return->y = ((float)x87_r6_1);
0043d75f      __return->z = ((float)x87_r5_1);
0043d762      return __return;
0043d740  }

0043d765                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0043d770  class Vector3* __thiscall Vector3::operator*(class Vector3 const* this, class Vector3* __return, float const arg3)

0043d770  {
0043d77e      long double x87_r6_1 = (((long double)arg3) * ((long double)this->y));
0043d785      long double x87_r5_1 = (((long double)arg3) * ((long double)this->z));
0043d78a      __return->x = ((float)(((long double)arg3) * ((long double)this->x)));
0043d78c      __return->y = ((float)x87_r6_1);
0043d78f      __return->z = ((float)x87_r5_1);
0043d792      return __return;
0043d770  }

0043d795                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0043d7a0  void __thiscall Matrix4::TransformVector_C(class Matrix4 const* this, class Vector3 const* arg2, class Vector3* arg3)

0043d7a0  {
0043d7c0      long double x87_r7_5 = (((long double)1f) / ((((((long double)this->_14) * ((long double)arg2->x)) + (((long double)this->_34) * ((long double)arg2->z))) + (((long double)this->_24) * ((long double)arg2->y))) + ((long double)this->_44)));
0043d7df      arg3->x = ((float)(((((((long double)this->_31) * ((long double)arg2->z)) + (((long double)this->_21) * ((long double)arg2->y))) + (((long double)arg2->x) * ((long double)this->_11))) + ((long double)this->_41)) * x87_r7_5));
0043d7fb      arg3->y = ((float)(((((((long double)this->_12) * ((long double)arg2->x)) + (((long double)this->_32) * ((long double)arg2->z))) + (((long double)this->_22) * ((long double)arg2->y))) + ((long double)this->_42)) * x87_r7_5));
0043d818      arg3->z = ((float)(((((((long double)this->_13) * ((long double)arg2->x)) + (((long double)this->_33) * ((long double)arg2->z))) + (((long double)this->_23) * ((long double)arg2->y))) + ((long double)this->_43)) * x87_r7_5));
0043d7a0  }


0043d820  void __thiscall Matrix4::Multiply_C(class Matrix4* this, class Matrix4 const* arg2, class Matrix4 const* arg3)

0043d820  {
0043d844      this->_11 = ((float)((((((long double)arg2->_11) * ((long double)arg3->_11)) + (((long double)arg3->_31) * ((long double)arg2->_13))) + (((long double)arg2->_12) * ((long double)arg3->_21))) + (((long double)arg2->_14) * ((long double)arg3->_41))));
0043d863      this->_12 = ((float)((((((long double)arg3->_32) * ((long double)arg2->_13)) + (((long double)arg2->_11) * ((long double)arg3->_12))) + (((long double)arg2->_12) * ((long double)arg3->_22))) + (((long double)arg3->_42) * ((long double)arg2->_14))));
0043d883      this->_13 = ((float)((((((long double)arg2->_11) * ((long double)arg3->_13)) + (((long double)arg3->_33) * ((long double)arg2->_13))) + (((long double)arg2->_12) * ((long double)arg3->_23))) + (((long double)arg3->_43) * ((long double)arg2->_14))));
0043d8a3      this->_14 = ((float)((((((long double)arg2->_12) * ((long double)arg3->_24)) + (((long double)arg2->_14) * ((long double)arg3->_44))) + (((long double)arg3->_14) * ((long double)arg2->_11))) + (((long double)arg3->_34) * ((long double)arg2->_13))));
0043d8c3      this->_21 = ((float)((((((long double)arg2->_22) * ((long double)arg3->_21)) + (((long double)arg3->_31) * ((long double)arg2->_23))) + (((long double)arg2->_24) * ((long double)arg3->_41))) + (((long double)arg2->_21) * ((long double)arg3->_11))));
0043d8e4      this->_22 = ((float)((((((long double)arg2->_21) * ((long double)arg3->_12)) + (((long double)arg3->_22) * ((long double)arg2->_22))) + (((long double)arg3->_32) * ((long double)arg2->_23))) + (((long double)arg3->_42) * ((long double)arg2->_24))));
0043d905      this->_23 = ((float)((((((long double)arg2->_22) * ((long double)arg3->_23)) + (((long double)arg3->_33) * ((long double)arg2->_23))) + (((long double)arg3->_43) * ((long double)arg2->_24))) + (((long double)arg2->_21) * ((long double)arg3->_13))));
0043d926      this->_24 = ((float)((((((long double)arg2->_21) * ((long double)arg3->_14)) + (((long double)arg2->_24) * ((long double)arg3->_44))) + (((long double)arg2->_23) * ((long double)arg3->_34))) + (((long double)arg2->_22) * ((long double)arg3->_24))));
0043d946      this->_31 = ((float)((((((long double)arg2->_32) * ((long double)arg3->_21)) + (((long double)arg3->_31) * ((long double)arg2->_33))) + (((long double)arg2->_34) * ((long double)arg3->_41))) + (((long double)arg2->_31) * ((long double)arg3->_11))));
0043d967      this->_32 = ((float)((((((long double)arg2->_31) * ((long double)arg3->_12)) + (((long double)arg3->_22) * ((long double)arg2->_32))) + (((long double)arg3->_42) * ((long double)arg2->_34))) + (((long double)arg3->_32) * ((long double)arg2->_33))));
0043d988      this->_33 = ((float)((((((long double)arg2->_32) * ((long double)arg3->_23)) + (((long double)arg3->_43) * ((long double)arg2->_34))) + (((long double)arg3->_33) * ((long double)arg2->_33))) + (((long double)arg2->_31) * ((long double)arg3->_13))));
0043d9a9      this->_34 = ((float)((((((long double)arg2->_31) * ((long double)arg3->_14)) + (((long double)arg2->_34) * ((long double)arg3->_44))) + (((long double)arg2->_33) * ((long double)arg3->_34))) + (((long double)arg2->_32) * ((long double)arg3->_24))));
0043d9c9      this->_41 = ((float)((((((long double)arg2->_42) * ((long double)arg3->_21)) + (((long double)arg3->_31) * ((long double)arg2->_43))) + (((long double)arg2->_44) * ((long double)arg3->_41))) + (((long double)arg2->_41) * ((long double)arg3->_11))));
0043d9ea      this->_42 = ((float)((((((long double)arg2->_41) * ((long double)arg3->_12)) + (((long double)arg3->_22) * ((long double)arg2->_42))) + (((long double)arg3->_42) * ((long double)arg2->_44))) + (((long double)arg3->_32) * ((long double)arg2->_43))));
0043da0b      this->_43 = ((float)((((((long double)arg2->_42) * ((long double)arg3->_23)) + (((long double)arg3->_43) * ((long double)arg2->_44))) + (((long double)arg3->_33) * ((long double)arg2->_43))) + (((long double)arg2->_41) * ((long double)arg3->_13))));
0043da2c      this->_44 = ((float)((((((long double)arg2->_41) * ((long double)arg3->_14)) + (((long double)arg2->_44) * ((long double)arg3->_44))) + (((long double)arg2->_43) * ((long double)arg3->_34))) + (((long double)arg2->_42) * ((long double)arg3->_24))));
0043d820  }

0043da32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0043da40  uint32_t RGBAColor::MakeRGBA(float arg1, float arg2, float arg3, float arg4)

0043da40  {
0043da84      int32_t esi_5 = (((((_ftol2() << 8) | _ftol2()) << 8) | _ftol2()) << 8);
0043da8f      return (_ftol2() | esi_5);
0043da40  }


0043da90  float const* _STL::min(float const* arg1, float const* arg2)

0043da90  {
0043da9a      (((long double)*(uint32_t*)arg2) - ((long double)*(uint32_t*)arg1));
0043da9e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0043da9e      
0043daa3      if (!(p))
0043daa7          return arg2;
0043daa7      
0043daa5      return arg1;
0043da90  }

0043daa8                          90 90 90 90 90 90 90 90                                                          ........

0043dab0  void __thiscall MaterialLayer::SetDiffuse(class MaterialLayer* this, class RGBAColor const* arg2)

0043dab0  {
0043dab6      this->m_cDiffuse.r = arg2->r;
0043dab6      this->m_cDiffuse.g = arg2->g;
0043dab6      this->m_cDiffuse.b = arg2->b;
0043dab6      this->m_cDiffuse.a = arg2->a;
0043dab0  }


0043dad0  void SceneTool::BeginScene()

0043dad0  {
0043dad0      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0043dad0      
0043dae1      if (RenderDevice::render_device_1->m_bOpenScene == 0)
0043dae1      {
0043daf3          SceneTool::sceneTimestamp += 1;
0043daf8          int32_t var_10 = 0;
0043db00          int32_t var_c_1 = 0;
0043db08          int32_t var_8_1 = 0;
0043db10          int32_t var_4_1 = 0x3f800000;
0043db18          RenderDevice::render_device_1->vtable->Clear(7, &var_10, 0x3f800000);
0043db1f          RenderDevice::render_device->vtable->BeginScene(var_10, var_c_1, var_8_1, var_4_1);
0043dae1      }
0043dad0  }

0043db2e                                            90 90                                                                ..

0043db30  void SceneTool::ViewportToClip(int32_t const arg1, int32_t const arg2, float* arg3, float* arg4)

0043db30  {
0043db30      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0043db3f      long double x87_r7_1 = (((long double)1f) / ((long double)RenderDevice::render_device_1->m_viewportWidth));
0043db4f      long double x87_r6_1 = (((long double)1f) / ((long double)RenderDevice::render_device_1->m_viewportHeight));
0043db59      long double x87_r5_1 = (((long double)arg1) * x87_r7_1);
0043db63      *(uint32_t*)arg3 = ((float)((x87_r5_1 + x87_r5_1) - ((long double)1f)));
0043db69      long double x87_r5_5 = (((long double)arg2) * x87_r6_1);
0043db75      *(uint32_t*)arg4 = ((float)-(((x87_r5_5 + x87_r5_5) - ((long double)1f))));
0043db7b      *(uint32_t*)arg3 = ((float)(((long double)*(uint32_t*)arg3) - x87_r7_1));
0043db81      *(uint32_t*)arg4 = ((float)(((long double)*(uint32_t*)arg4) - x87_r6_1));
0043db30  }

0043db88                          90 90 90 90 90 90 90 90                                                          ........

0043db90  uint8_t SceneTool::BuildCylinderMesh(class RenderMesh* arg1)

0043db90  {
0043db9a      if (((*(uint8_t*)$S218) & 1) == 0)
0043db9a      {
0043db9c          $S218 |= 1;
0043dba3          (*(uint32_t*)RAD_STEP) = 1.59156999e+33f;
0043dbad          *(int32_t*)((char*)RAD_STEP + 4) = 1.78207958f;
0043db9a      }
0043db9a      
0043dbb7      long double x87_r7 = ((long double)0.0);
0043dbda      int32_t* var_54;
0043dbda      
0043dbda      for (int32_t i = 0; i < 0xa; )
0043dbda      {
0043dbc2          i += 1;
0043dbc6          long double st0_1;
0043dbc6          bool c2_1;
0043dbc6          st0_1 = __fcos(x87_r7);
0043dbc8          int32_t __saved_esi;
0043dbc8          &__saved_esi[(i * 2)] = ((float)st0_1);
0043dbce          long double st0_2;
0043dbce          bool c2_2;
0043dbce          st0_2 = __fsin(x87_r7);
0043dbd0          &var_54[(i * 2)] = ((float)st0_2);
0043dbd4          x87_r7 = (x87_r7 + ((long double)0.0));
0043dbda      }
0043dbda      
0043dc01      if (RenderMesh::CreateLODBatch(arg1, 0, nullptr, PRIMTYPE_TRIANGLELIST, 0xffffffff, 0x6c, 2, 1, 1, &var_54) == 0)
0043e49a          return 0;
0043e49a      
0043dc12      int32_t* eax_2 = *(uint32_t*)(*(uint32_t*)var_54 + 0xc)(0, 0x6c);
0043dc19      int32_t var_4c;
0043dc19      eax_2[1] = var_4c;
0043dc20      int32_t var_50;
0043dc20      *(uint32_t*)eax_2 = var_50;
0043dc2b      eax_2[2] = 0x3f000000;
0043dc2e      int32_t var_48;
0043dc2e      eax_2[3] = var_48;
0043dc35      int32_t var_44;
0043dc35      eax_2[4] = var_44;
0043dc38      eax_2[5] = 0x3f000000;
0043dc42      int32_t var_40;
0043dc3f      eax_2[6] = var_40;
0043dc49      int32_t var_3c;
0043dc3f      eax_2[7] = var_3c;
0043dc3f      eax_2[8] = 0x3f000000;
0043dc3f      eax_2[9] = var_50;
0043dc3f      eax_2[0xa] = var_4c;
0043dc3f      eax_2[0xb] = 0x3f000000;
0043dc3f      eax_2[0xc] = var_40;
0043dc3f      eax_2[0xd] = var_3c;
0043dc3f      eax_2[0xe] = 0x3f000000;
0043dc7e      int32_t var_38;
0043dc3f      eax_2[0xf] = var_38;
0043dc85      int32_t var_34;
0043dc3f      eax_2[0x10] = var_34;
0043dc3f      eax_2[0x11] = 0x3f000000;
0043dc3f      eax_2[0x12] = var_50;
0043dc3f      eax_2[0x13] = var_4c;
0043dc3f      eax_2[0x14] = 0x3f000000;
0043dc3f      eax_2[0x15] = var_38;
0043dc3f      eax_2[0x16] = var_34;
0043dc3f      eax_2[0x17] = 0x3f000000;
0043dcba      int32_t var_30;
0043dc3f      eax_2[0x18] = var_30;
0043dcc1      int32_t var_2c;
0043dc3f      eax_2[0x19] = var_2c;
0043dc3f      eax_2[0x1a] = 0x3f000000;
0043dc3f      eax_2[0x1b] = var_50;
0043dc3f      eax_2[0x1c] = var_4c;
0043dc3f      eax_2[0x1d] = 0x3f000000;
0043dc3f      eax_2[0x1e] = var_30;
0043dc3f      eax_2[0x1f] = var_2c;
0043dc3f      eax_2[0x20] = 0x3f000000;
0043dcf9      int32_t var_28;
0043dc3f      eax_2[0x21] = var_28;
0043dcff      int32_t var_24;
0043dc3f      eax_2[0x22] = var_24;
0043dc3f      eax_2[0x23] = 0x3f000000;
0043dc3f      eax_2[0x24] = var_50;
0043dc3f      eax_2[0x26] = 0x3f000000;
0043dc3f      eax_2[0x25] = var_4c;
0043dc3f      eax_2[0x29] = 0x3f000000;
0043dc3f      eax_2[0x27] = var_28;
0043dc3f      eax_2[0x28] = var_24;
0043dd30      int32_t var_20;
0043dc3f      eax_2[0x2a] = var_20;
0043dc3f      eax_2[0x2c] = 0x3f000000;
0043dd3a      int32_t var_1c;
0043dc3f      eax_2[0x2b] = var_1c;
0043dc3f      eax_2[0x2d] = var_50;
0043dc3f      eax_2[0x2e] = var_4c;
0043dc3f      eax_2[0x2f] = 0x3f000000;
0043dc3f      eax_2[0x30] = var_20;
0043dc3f      eax_2[0x31] = var_1c;
0043dc3f      eax_2[0x32] = 0x3f000000;
0043dd6c      int32_t var_18;
0043dc3f      eax_2[0x33] = var_18;
0043dd73      int32_t var_14;
0043dc3f      eax_2[0x34] = var_14;
0043dc3f      eax_2[0x35] = 0x3f000000;
0043dc3f      eax_2[0x36] = var_50;
0043dc3f      eax_2[0x37] = var_4c;
0043dc3f      eax_2[0x38] = 0x3f000000;
0043dc3f      eax_2[0x39] = var_18;
0043dc3f      eax_2[0x3a] = var_14;
0043dc3f      eax_2[0x3b] = 0x3f000000;
0043dda8      int32_t var_10;
0043dc3f      eax_2[0x3c] = var_10;
0043ddaf      int32_t var_c;
0043dc3f      eax_2[0x3d] = var_c;
0043dc3f      eax_2[0x3e] = 0x3f000000;
0043dc3f      eax_2[0x3f] = var_50;
0043dc3f      eax_2[0x40] = var_4c;
0043dc3f      eax_2[0x41] = 0x3f000000;
0043dc3f      eax_2[0x42] = var_10;
0043dc3f      eax_2[0x43] = var_c;
0043dc3f      eax_2[0x44] = 0x3f000000;
0043dde8      int32_t var_8;
0043dc3f      eax_2[0x45] = var_8;
0043ddf2      int32_t var_4;
0043dc3f      eax_2[0x46] = var_4;
0043dc3f      eax_2[0x47] = 0x3f000000;
0043dc3f      eax_2[0x48] = var_40;
0043dc3f      eax_2[0x49] = var_3c;
0043dc3f      eax_2[0x4a] = 0xbf000000;
0043dc3f      eax_2[0x4b] = var_48;
0043dc3f      eax_2[0x4c] = var_44;
0043dc3f      eax_2[0x4d] = 0xbf000000;
0043dc3f      eax_2[0x50] = 0xbf000000;
0043dc3f      eax_2[0x4e] = var_50;
0043dc3f      eax_2[0x4f] = var_4c;
0043dc3f      eax_2[0x51] = var_38;
0043dc3f      eax_2[0x53] = 0xbf000000;
0043dc3f      eax_2[0x52] = var_34;
0043dc3f      eax_2[0x54] = var_40;
0043dc3f      eax_2[0x55] = var_3c;
0043dc3f      eax_2[0x56] = 0xbf000000;
0043dc3f      eax_2[0x57] = var_50;
0043dc3f      eax_2[0x58] = var_4c;
0043dc3f      eax_2[0x59] = 0xbf000000;
0043dc3f      eax_2[0x5a] = var_30;
0043dc3f      eax_2[0x5b] = var_2c;
0043dc3f      eax_2[0x5c] = 0xbf000000;
0043dc3f      eax_2[0x5d] = var_38;
0043dc3f      eax_2[0x5e] = var_34;
0043dc3f      eax_2[0x5f] = 0xbf000000;
0043dc3f      eax_2[0x60] = var_50;
0043dc3f      eax_2[0x61] = var_4c;
0043dc3f      eax_2[0x62] = 0xbf000000;
0043dc3f      eax_2[0x63] = var_28;
0043dc3f      eax_2[0x64] = var_24;
0043dc3f      eax_2[0x65] = 0xbf000000;
0043dc3f      eax_2[0x66] = var_30;
0043dc3f      eax_2[0x67] = var_2c;
0043dc3f      eax_2[0x68] = 0xbf000000;
0043dc3f      eax_2[0x69] = var_50;
0043dc3f      eax_2[0x6a] = var_4c;
0043dc3f      eax_2[0x6b] = 0xbf000000;
0043dc3f      eax_2[0x6c] = var_20;
0043dc3f      eax_2[0x6d] = var_1c;
0043dc3f      eax_2[0x6e] = 0xbf000000;
0043dc3f      eax_2[0x6f] = var_28;
0043dc3f      eax_2[0x70] = var_24;
0043dc3f      eax_2[0x71] = 0xbf000000;
0043dc3f      eax_2[0x72] = var_50;
0043dc3f      eax_2[0x73] = var_4c;
0043dc3f      eax_2[0x74] = 0xbf000000;
0043dc3f      eax_2[0x75] = var_18;
0043dc3f      eax_2[0x77] = 0xbf000000;
0043dc3f      eax_2[0x76] = var_14;
0043dc3f      eax_2[0x7a] = 0xbf000000;
0043dc3f      eax_2[0x78] = var_20;
0043dc3f      eax_2[0x79] = var_1c;
0043dc3f      eax_2[0x7b] = var_50;
0043dc3f      eax_2[0x7d] = 0xbf000000;
0043dc3f      eax_2[0x7c] = var_4c;
0043dc3f      eax_2[0x7e] = var_10;
0043dc3f      eax_2[0x80] = 0xbf000000;
0043dc3f      eax_2[0x7f] = var_c;
0043dc3f      eax_2[0x81] = var_18;
0043dc3f      eax_2[0x82] = var_14;
0043dc3f      eax_2[0x83] = 0xbf000000;
0043dc3f      eax_2[0x84] = var_50;
0043dc3f      eax_2[0x85] = var_4c;
0043dc3f      eax_2[0x86] = 0xbf000000;
0043dc3f      eax_2[0x87] = var_8;
0043dc3f      eax_2[0x88] = var_4;
0043dc3f      eax_2[0x89] = 0xbf000000;
0043dc3f      eax_2[0x8a] = var_10;
0043dc3f      eax_2[0x8b] = var_c;
0043dc3f      eax_2[0x8c] = 0xbf000000;
0043dc3f      eax_2[0x8d] = var_50;
0043dc3f      eax_2[0x8e] = var_4c;
0043dc3f      eax_2[0x8f] = 0xbf000000;
0043dc3f      eax_2[0x90] = var_50;
0043dc3f      eax_2[0x91] = var_4c;
0043dc3f      eax_2[0x92] = 0xbf000000;
0043dc3f      eax_2[0x93] = var_48;
0043dc3f      eax_2[0x94] = var_44;
0043dc3f      eax_2[0x95] = 0x3f000000;
0043dc3f      eax_2[0x96] = var_50;
0043dc3f      eax_2[0x97] = var_4c;
0043dc3f      eax_2[0x98] = 0x3f000000;
0043dc3f      eax_2[0x99] = var_50;
0043dc3f      eax_2[0x9a] = var_4c;
0043dc3f      eax_2[0x9b] = 0xbf000000;
0043dc3f      eax_2[0x9c] = var_48;
0043dc3f      eax_2[0x9d] = var_44;
0043dc3f      eax_2[0x9e] = 0xbf000000;
0043dc3f      eax_2[0xa1] = 0x3f000000;
0043dc3f      eax_2[0x9f] = var_48;
0043dc3f      eax_2[0xa0] = var_44;
0043dc3f      eax_2[0xa2] = var_48;
0043dc3f      eax_2[0xa4] = 0xbf000000;
0043dc3f      eax_2[0xa3] = var_44;
0043dc3f      eax_2[0xa5] = var_40;
0043dc3f      eax_2[0xa7] = 0x3f000000;
0043dc3f      eax_2[0xa6] = var_3c;
0043dc3f      eax_2[0xa8] = var_48;
0043dc3f      eax_2[0xa9] = var_44;
0043dc3f      eax_2[0xaa] = 0x3f000000;
0043dc3f      eax_2[0xab] = var_48;
0043dc3f      eax_2[0xac] = var_44;
0043dc3f      eax_2[0xad] = 0xbf000000;
0043dc3f      eax_2[0xae] = var_40;
0043dc3f      eax_2[0xaf] = var_3c;
0043dc3f      eax_2[0xb0] = 0xbf000000;
0043dc3f      eax_2[0xb1] = var_40;
0043dc3f      eax_2[0xb2] = var_3c;
0043dc3f      eax_2[0xb3] = 0x3f000000;
0043dc3f      eax_2[0xb4] = var_40;
0043dc3f      eax_2[0xb5] = var_3c;
0043dc3f      eax_2[0xb6] = 0xbf000000;
0043dc3f      eax_2[0xb7] = var_38;
0043dc3f      eax_2[0xb8] = var_34;
0043dc3f      eax_2[0xb9] = 0x3f000000;
0043dc3f      eax_2[0xba] = var_40;
0043dc3f      eax_2[0xbb] = var_3c;
0043dc3f      eax_2[0xbc] = 0x3f000000;
0043dc3f      eax_2[0xbd] = var_40;
0043dc3f      eax_2[0xbe] = var_3c;
0043dc3f      eax_2[0xbf] = 0xbf000000;
0043dc3f      eax_2[0xc0] = var_38;
0043dc3f      eax_2[0xc1] = var_34;
0043dc3f      eax_2[0xc2] = 0xbf000000;
0043dc3f      eax_2[0xc3] = var_38;
0043dc3f      eax_2[0xc4] = var_34;
0043dc3f      eax_2[0xc5] = 0x3f000000;
0043dc3f      eax_2[0xc6] = var_38;
0043dc3f      eax_2[0xc8] = 0xbf000000;
0043dc3f      eax_2[0xc7] = var_34;
0043dc3f      eax_2[0xcb] = 0x3f000000;
0043dc3f      eax_2[0xc9] = var_30;
0043dc3f      eax_2[0xca] = var_2c;
0043dc3f      eax_2[0xcc] = var_38;
0043dc3f      eax_2[0xce] = 0x3f000000;
0043dc3f      eax_2[0xcd] = var_34;
0043dc3f      eax_2[0xcf] = var_38;
0043dc3f      eax_2[0xd1] = 0xbf000000;
0043dc3f      eax_2[0xd0] = var_34;
0043dc3f      eax_2[0xd2] = var_30;
0043dc3f      eax_2[0xd3] = var_2c;
0043dc3f      eax_2[0xd4] = 0xbf000000;
0043dc3f      eax_2[0xd5] = var_30;
0043dc3f      eax_2[0xd6] = var_2c;
0043dc3f      eax_2[0xd7] = 0x3f000000;
0043dc3f      eax_2[0xd8] = var_30;
0043dc3f      eax_2[0xd9] = var_2c;
0043dc3f      eax_2[0xda] = 0xbf000000;
0043dc3f      eax_2[0xdb] = var_28;
0043dc3f      eax_2[0xdc] = var_24;
0043dc3f      eax_2[0xdd] = 0x3f000000;
0043dc3f      eax_2[0xde] = var_30;
0043dc3f      eax_2[0xdf] = var_2c;
0043dc3f      eax_2[0xe0] = 0x3f000000;
0043dc3f      eax_2[0xe1] = var_30;
0043dc3f      eax_2[0xe2] = var_2c;
0043dc3f      eax_2[0xe3] = 0xbf000000;
0043dc3f      eax_2[0xe4] = var_28;
0043dc3f      eax_2[0xe5] = var_24;
0043dc3f      eax_2[0xe6] = 0xbf000000;
0043dc3f      eax_2[0xe7] = var_28;
0043dc3f      eax_2[0xe8] = var_24;
0043dc3f      eax_2[0xe9] = 0x3f000000;
0043dc3f      eax_2[0xea] = var_28;
0043dc3f      eax_2[0xeb] = var_24;
0043dc3f      eax_2[0xec] = 0xbf000000;
0043dc3f      eax_2[0xed] = var_20;
0043dc3f      eax_2[0xee] = var_1c;
0043dc3f      eax_2[0xef] = 0x3f000000;
0043dc3f      eax_2[0xf2] = 0x3f000000;
0043dc3f      eax_2[0xf0] = var_28;
0043dc3f      eax_2[0xf1] = var_24;
0043dc3f      eax_2[0xf3] = var_28;
0043dc3f      eax_2[0xf5] = 0xbf000000;
0043dc3f      eax_2[0xf4] = var_24;
0043dc3f      eax_2[0xf6] = var_20;
0043dc3f      eax_2[0xf8] = 0xbf000000;
0043dc3f      eax_2[0xf7] = var_1c;
0043dc3f      eax_2[0xf9] = var_20;
0043dc3f      eax_2[0xfa] = var_1c;
0043dc3f      eax_2[0xfb] = 0x3f000000;
0043dc3f      eax_2[0xfc] = var_20;
0043dc3f      eax_2[0xfd] = var_1c;
0043dc3f      eax_2[0xfe] = 0xbf000000;
0043dc3f      eax_2[0xff] = var_18;
0043dc3f      eax_2[0x100] = var_14;
0043dc3f      eax_2[0x101] = 0x3f000000;
0043dc3f      eax_2[0x102] = var_20;
0043dc3f      eax_2[0x103] = var_1c;
0043dc3f      eax_2[0x104] = 0x3f000000;
0043dc3f      eax_2[0x105] = var_20;
0043dc3f      eax_2[0x106] = var_1c;
0043dc3f      eax_2[0x107] = 0xbf000000;
0043dc3f      eax_2[0x108] = var_18;
0043dc3f      eax_2[0x109] = var_14;
0043dc3f      eax_2[0x10a] = 0xbf000000;
0043dc3f      eax_2[0x10b] = var_18;
0043dc3f      eax_2[0x10c] = var_14;
0043dc3f      eax_2[0x10d] = 0x3f000000;
0043dc3f      eax_2[0x10e] = var_18;
0043dc3f      eax_2[0x10f] = var_14;
0043dc3f      eax_2[0x110] = 0xbf000000;
0043dc3f      eax_2[0x111] = var_10;
0043dc3f      eax_2[0x112] = var_c;
0043dc3f      eax_2[0x113] = 0x3f000000;
0043dc3f      eax_2[0x114] = var_18;
0043dc3f      eax_2[0x115] = var_14;
0043dc3f      eax_2[0x116] = 0x3f000000;
0043dc3f      eax_2[0x117] = var_18;
0043dc3f      eax_2[0x119] = 0xbf000000;
0043dc3f      eax_2[0x118] = var_14;
0043dc3f      eax_2[0x11c] = 0xbf000000;
0043dc3f      eax_2[0x11a] = var_10;
0043dc3f      eax_2[0x11b] = var_c;
0043dc3f      eax_2[0x11d] = var_10;
0043dc3f      eax_2[0x11f] = 0x3f000000;
0043dc3f      eax_2[0x11e] = var_c;
0043dc3f      eax_2[0x120] = var_10;
0043dc3f      eax_2[0x122] = 0xbf000000;
0043dc3f      eax_2[0x121] = var_c;
0043dc3f      eax_2[0x123] = var_8;
0043dc3f      eax_2[0x124] = var_4;
0043dc3f      eax_2[0x125] = 0x3f000000;
0043dc3f      eax_2[0x126] = var_10;
0043dc3f      eax_2[0x127] = var_c;
0043dc3f      eax_2[0x128] = 0x3f000000;
0043dc3f      eax_2[0x129] = var_10;
0043dc3f      eax_2[0x12a] = var_c;
0043dc3f      eax_2[0x12b] = 0xbf000000;
0043dc3f      eax_2[0x12c] = var_8;
0043dc3f      eax_2[0x12d] = var_4;
0043dc3f      eax_2[0x12e] = 0xbf000000;
0043dc3f      eax_2[0x12f] = var_8;
0043dc3f      eax_2[0x130] = var_4;
0043dc3f      eax_2[0x131] = 0x3f000000;
0043dc3f      eax_2[0x132] = var_8;
0043dc3f      eax_2[0x133] = var_4;
0043dc3f      eax_2[0x134] = 0xbf000000;
0043dc3f      eax_2[0x135] = var_50;
0043dc3f      eax_2[0x136] = var_4c;
0043dc3f      eax_2[0x137] = 0x3f000000;
0043dc3f      eax_2[0x138] = var_8;
0043dc3f      eax_2[0x139] = var_4;
0043dc3f      eax_2[0x13a] = 0x3f000000;
0043dc3f      eax_2[0x13b] = var_8;
0043dc3f      eax_2[0x13c] = var_4;
0043dc3f      eax_2[0x13d] = 0xbf000000;
0043dc3f      eax_2[0x13e] = var_50;
0043dc3f      eax_2[0x13f] = var_4c;
0043dc3f      eax_2[0x140] = 0xbf000000;
0043dc3f      eax_2[0x141] = var_50;
0043dc3f      eax_2[0x142] = var_4c;
0043dc3f      eax_2[0x143] = 0x3f000000;
0043e482      *(uint32_t*)(*(uint32_t*)var_54 + 0x10)(0, 0);
0043e487      RenderMesh::UpdateCachedData(arg1);
0043e48d      int32_t eax_110;
0043e48d      eax_110 = 1;
0043e493      return 1;
0043db90  }

0043e49b                                                                                   90 90 90 90 90                             .....

0043e4a0  void SceneTool::StoreMatrices()

0043e4a0  {
0043e4a0      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0043e4b7      __builtin_memcpy(0x8376f8, &RenderDevice::render_device_1->m_GState, 0x40);
0043e4c9      __builtin_memcpy(0x837678, &RenderDevice::render_device_1->m_GState.WorldToViewMatrix, 0x40);
0043e4db      __builtin_memcpy(0x8376b8, &RenderDevice::render_device_1->m_GState.ViewToClipMatrix, 0x40);
0043e4de      g_bMatrixStored = 1;
0043e4a0  }

0043e4e7                       90 90 90 90 90 90 90 90 90                                                         .........

0043e4f0  void SceneTool::PrepareGraphicsDevice()

0043e4f0  {
0043e4f0      Render::CheckForLostDevice();
0043e4f5      /* tailcall */
0043e4f5      return Render::UpdateFromPreferences();
0043e4f0  }

0043e4fa                                                                                90 90 90 90 90 90                            ......

0043e500  void SceneTool::StartFrame()

0043e500  {
0043e500      /* tailcall */
0043e500      return SceneTool::BeginScene();
0043e500  }

0043e505                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0043e510  void SceneTool::UpdateFPSCounter()

0043e510  {
0043e510      Timer::compute_local_time();
0043e515      SceneTool::m_LastFlipTime;
0043e51d      void* i = nullptr;
0043e51f      long double x87_r6 = ((long double)0.0);
0043e51f      
0043e572      do
0043e572      {
0043e530          long double x87_r6_1 = (x87_r6 + ((long double)*(uint32_t*)((char*)i + 0x8373b8)));
0043e536          i += 0x28;
0043e55a          long double x87_r6_7 = ((((((x87_r6_1 + ((long double)*(uint32_t*)((char*)i + 0x837394))) + ((long double)*(uint32_t*)((char*)i + 0x837398))) + ((long double)*(uint32_t*)((char*)i + 0x83739c))) + ((long double)*(uint32_t*)((char*)i + 0x8373a0))) + ((long double)*(uint32_t*)((char*)i + 0x8373a4))) + ((long double)*(uint32_t*)((char*)i + 0x8373a8)));
0043e56c          x87_r6 = (((x87_r6_7 + ((long double)*(uint32_t*)((char*)i + 0x8373ac))) + ((long double)*(uint32_t*)((char*)i + 0x8373b0))) + ((long double)*(uint32_t*)((char*)i + 0x8373b4)));
0043e572      } while (i < 0x50);
0043e572      
0043e574      long double x87_r5 = ((long double)0.000199999995f);
0043e57a      SceneTool::m_FramesPerSecond = 0f;
0043e586      (x87_r6 - x87_r5);
0043e588      i = ((((x87_r6 < x87_r5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r5))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r5) ? 1 : 0) << 0xe) | 0x3000))));
0043e588      
0043e58d      if ((*(uint8_t*)((char*)i)[1] & 0x41) == 0)
0043e597          SceneTool::m_FramesPerSecond = ((float)(((long double)20.0) / x87_r6));
0043e597      
0043e59f      int32_t* i_1 = &SceneTool::m_LastFrameTimes[0x13];
0043e59f      
0043e5b1      do
0043e5b1      {
0043e5a7          *(uint32_t*)i_1 = i_1[-1];
0043e5a9          i_1 -= 4;
0043e5b1      } while (i_1 > 0x8373b8);
0043e5b1      
0043e5b3      SceneTool::m_LastFrameTimes[0] = ((float)x87_r6);
0043e5b9      long double x87_r0;
0043e5b9      SceneTool::m_LastFlipTime = ((double)x87_r0);
0043e510  }

0043e527                       8d a4 24 00 00 00 00 8b ff                                                         ..$......

0043e5c0  void SceneTool::PurgeOldGraphicsResources()

0043e5c0  {
0043e5c8      int32_t ecx = *(int32_t*)((char*)Timer::local_time + 4);
0043e5ce      int32_t Timer::local_time_1 = (*(uint32_t*)Timer::local_time);
0043e5da      long double x87_r7_1 = (((long double)Timer::local_time_1) - ((long double)SceneTool::m_dLastOldResourcePurgeTime));
0043e5e0      long double temp0 = ((long double)5.0);
0043e5e0      (x87_r7_1 - temp0);
0043e5e6      int32_t eax;
0043e5e6      eax = ((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0))));
0043e5e6      
0043e5eb      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0043e5eb      {
0043e5fa          if (RenderDeviceD3D::IsAvailableVideoMemoryLow(RenderDevice::render_device) != 0)
0043e5fa          {
0043e5fc              int32_t var_c_1 = 0x405e0000;
0043e603              GraphicsResource::PurgeOldResources(0f);
0043e5fa          }
0043e5fa          
0043e613          (*(uint32_t*)SceneTool::m_dLastOldResourcePurgeTime) = Timer::local_time_1;
0043e619          *(int32_t*)((char*)SceneTool::m_dLastOldResourcePurgeTime + 4) = ecx;
0043e5eb      }
0043e5c0  }

0043e622        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0043e630  class AC1Legacy::Vector3* LandDefs::get_block_offset(class AC1Legacy::Vector3* __return, uint32_t arg2, uint32_t arg3)

0043e630  {
0043e63d      uint32_t eax_1 = (arg2 >> 0x10);
0043e640      uint32_t edx_1 = (arg3 >> 0x10);
0043e640      
0043e645      if (eax_1 == edx_1)
0043e645      {
0043e64d          float* __return_1 = __return;
0043e651          *(uint32_t*)__return_1 = ((float)((long double)Legacy_Vector3_ZeroVector__.x));
0043e659          __return_1[1] = Legacy_Vector3_ZeroVector__.y;
0043e662          __return_1[2] = Legacy_Vector3_ZeroVector__.z;
0043e666          return __return_1;
0043e645      }
0043e645      
0043e66a      uint32_t ecx_2;
0043e66a      int32_t edi;
0043e66a      
0043e66a      if (arg2 == 0)
0043e66a      {
0043e681          edi = arg2;
0043e685          ecx_2 = arg2;
0043e66a      }
0043e66a      else
0043e66a      {
0043e674          ecx_2 = ((arg2 >> 0x15) & 0x7f8);
0043e67d          edi = ((eax_1 & 0xff) << 3);
0043e66a      }
0043e66a      
0043e68b      uint32_t eax_4;
0043e68b      int32_t edx_4;
0043e68b      
0043e68b      if (arg3 == 0)
0043e68b      {
0043e6a3          edx_4 = arg2;
0043e6a7          eax_4 = arg2;
0043e68b      }
0043e68b      else
0043e68b      {
0043e69c          eax_4 = ((arg3 >> 0x15) & 0x7f8);
0043e69e          edx_4 = ((edx_1 & 0xff) << 3);
0043e68b      }
0043e68b      
0043e6c6      __return->z = 0f;
0043e6ce      __return->x = ((float)(((long double)(eax_4 - ecx_2)) * ((long double)24f)));
0043e6da      __return->y = ((float)(((long double)(edx_4 - edi)) * ((long double)24f)));
0043e6dd      return __return;
0043e630  }

0043e6de                                                                                            90 90                                ..

0043e6e0  void __fastcall Vector3::Normalize(class Vector3* this)

0043e6e0  {
0043e6e0      this->z;
0043e6e3      this->y;
0043e700      long double x87_r7_1 = (((long double)1f) / ((long double)this->x));
0043e70a      this->x = ((float)(x87_r7_1 * ((long double)this->x)));
0043e711      this->y = ((float)(x87_r7_1 * ((long double)this->y)));
0043e717      this->z = ((float)(x87_r7_1 * ((long double)this->z)));
0043e6e0  }

0043e71b                                                                                   90 90 90 90 90                             .....

0043e720  class Position& __thiscall Position::operator=(class Position* this, class Position const& arg2)

0043e720  {
0043e72d      this->objcell_id = arg2->objcell_id;
0043e734      Frame::operator=(&this->frame, &arg2->frame);
0043e73c      return this;
0043e720  }

0043e73f                                                                                               90                                 .

0043e740  void SceneTool::SetupCamera(class Position const* arg1)

0043e740  {
0043e74a      SceneTool::m_CameraPosition.objcell_id = arg1->objcell_id;
0043e756      Frame::operator=(&SceneTool::m_CameraPosition.frame, &arg1->frame);
0043e740  }

0043e75c                                                                                      90 90 90 90                              ....

0043e760  void SceneTool::SwapMatrixForwardAndUp(class Matrix4* arg1)

0043e760  {
0043e767      float _21 = arg1->_21;
0043e76a      long double x87_r7 = ((long double)arg1->_12);
0043e76d      float _22 = arg1->_22;
0043e777      arg1->_12 = ((float)((long double)arg1->_13));
0043e77a      float _23 = arg1->_23;
0043e781      arg1->_13 = ((float)x87_r7);
0043e78b      float _33 = arg1->_33;
0043e792      float _32 = arg1->_32;
0043e799      float _42 = arg1->_42;
0043e7a0      float _43 = arg1->_43;
0043e7b3      arg1->_21 = arg1->_31;
0043e7ba      arg1->_22 = _33;
0043e7c1      arg1->_23 = _32;
0043e7c8      arg1->_31 = _21;
0043e7cf      arg1->_32 = _23;
0043e7d6      arg1->_33 = _22;
0043e7dd      arg1->_42 = _43;
0043e7e0      arg1->_43 = _42;
0043e760  }

0043e7e7                       90 90 90 90 90 90 90 90 90                                                         .........

0043e7f0  void SceneTool::SwapTransposedMatrixForwardAndUp(class Matrix4* arg1)

0043e7f0  {
0043e7f7      float _12 = arg1->_12;
0043e7fa      long double x87_r7 = ((long double)arg1->_21);
0043e7fd      float _22 = arg1->_22;
0043e807      arg1->_21 = ((float)((long double)arg1->_31));
0043e80a      float _32 = arg1->_32;
0043e811      arg1->_31 = ((float)x87_r7);
0043e81b      float _33 = arg1->_33;
0043e822      float _23 = arg1->_23;
0043e829      float _42 = arg1->_42;
0043e830      float _43 = arg1->_43;
0043e843      arg1->_12 = arg1->_13;
0043e84a      arg1->_22 = _33;
0043e851      arg1->_32 = _23;
0043e858      arg1->_13 = _12;
0043e85f      arg1->_23 = _32;
0043e866      arg1->_33 = _22;
0043e86d      arg1->_42 = _43;
0043e870      arg1->_43 = _42;
0043e7f0  }

0043e877                                                                       90 90 90 90 90 90 90 90 90                         .........

0043e880  void SceneTool::DrawLine(class Vector3 const* arg1, class Vector3 const* arg2, class RGBAColor const* arg3, enum DepthTestMode arg4, uint8_t arg5)

0043e880  {
0043e88d      float* eax_1 = SceneTool::m_pPrimVertexBuffer->vtable->Lock(0, 2);
0043e898      *(uint32_t*)eax_1 = arg1->x;
0043e89d      eax_1[1] = arg1->y;
0043e8a3      eax_1[2] = arg1->z;
0043e8ac      eax_1[5] = arg2->x;
0043e8ac      eax_1[6] = arg2->y;
0043e8ac      eax_1[7] = arg2->z;
0043e8bd      SceneTool::m_pPrimVertexBuffer->vtable->Unlock(0, 0);
0043e8d5      class MaterialLayer* esi_2 = *(uint32_t*)SceneTool::m_pPrimMaterial->layers.m_data;
0043e8de      LayerStage::SetTexture(*(uint32_t*)esi_2->m_Stages.m_data, nullptr);
0043e8e6      *(uint32_t*)esi_2->m_Stages.m_data->m_FFColorOp = TEXOP_SELECTARG2;
0043e8f5      *(uint32_t*)esi_2->m_Stages.m_data->m_FFAlphaOp = TEXOP_SELECTARG2;
0043e910      esi_2->m_SourceBlend = BLEND_SRCALPHA;
0043e917      esi_2->m_DestBlend = BLEND_INVSRCALPHA;
0043e91e      esi_2->m_DepthWrite = arg5;
0043e921      esi_2->m_DepthTest = arg4;
0043e924      esi_2->m_CullMode = CULLMODE_NONE;
0043e92b      class RenderMaterial* SceneTool::m_pPrimMaterial_1 = SceneTool::m_pPrimMaterial;
0043e93e      RenderVertexBuffer::RenderUsingMaterial(SceneTool::m_pPrimVertexBuffer, PRIMTYPE_LINELIST, 0, 1, SceneTool::m_pPrimMaterial_1, SceneTool::m_pPrimMaterial_1, RenderPass_Default, arg3, &RGBAColor_Black, nullptr, nullptr);
0043e880  }

0043e945                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0043e950  void SceneTool::DrawTexturedTriangle(class Vector3 const* arg1, class Vector3 const* arg2, class Vector3 const* arg3, struct TexCoordPair const* arg4, struct TexCoordPair const* arg5, struct TexCoordPair const* arg6, class RenderTexture const* arg7, class RGBAColor const* arg8, uint8_t const arg9, uint8_t const arg10, enum CullModeType const arg11, enum BlendMode const arg12, enum BlendMode const arg13, uint8_t const arg14)

0043e950  {
0043e95e      float* eax_1 = SceneTool::m_pPrimVertexBuffer->vtable->Lock(0, 3);
0043e96f      *(uint32_t*)eax_1 = arg1->x;
0043e974      eax_1[1] = arg1->y;
0043e97a      eax_1[2] = arg1->z;
0043e983      eax_1[5] = arg2->x;
0043e983      eax_1[6] = arg2->y;
0043e983      eax_1[7] = arg2->z;
0043e99a      eax_1[0xa] = arg3->x;
0043e99a      eax_1[0xb] = arg3->y;
0043e99a      eax_1[0xc] = arg3->z;
0043e99a      
0043e9ab      if (arg7 != 0)
0043e9ab      {
0043e9b3          eax_1[3] = arg4->u;
0043e9b9          eax_1[4] = arg4->v;
0043e9c2          eax_1[8] = arg5->u;
0043e9c8          eax_1[9] = arg5->v;
0043e9d1          eax_1[0xd] = arg6->u;
0043e9d7          eax_1[0xe] = arg6->v;
0043e9ab      }
0043e9ab      
0043e9da      SceneTool::m_pPrimVertexBuffer->vtable->Unlock(0, 0);
0043e9f1      class MaterialLayer* esi_6 = *(uint32_t*)SceneTool::m_pPrimMaterial->layers.m_data;
0043e9f9      LayerStage::SetTexture(*(uint32_t*)esi_6->m_Stages.m_data, arg7);
0043ea03      class LayerStage** ecx_15;
0043ea03      ecx_15 = arg14;
0043ea0b      int32_t eax_3;
0043ea0b      eax_3 = arg7 != 0;
0043ea01      *(uint32_t*)esi_6->m_Stages.m_data->m_FFColorOp = (eax_3 + 3);
0043ea2a      int32_t eax_5;
0043ea2a      eax_5 = ecx_15 != 0;
0043ea24      *(uint32_t*)esi_6->m_Stages.m_data->m_FFAlphaOp = (eax_5 + 3);
0043ea37      class LayerStage* edx_9;
0043ea37      edx_9 = arg10;
0043ea3b      esi_6->m_SourceBlend = arg12;
0043ea3e      esi_6->m_DestBlend = arg13;
0043ea41      enum BlendMode ecx_17;
0043ea41      ecx_17 = arg9;
0043ea4d      int32_t eax_8;
0043ea4d      eax_8 = ecx_17 == 0;
0043ea50      esi_6->m_DepthWrite = edx_9;
0043ea5a      esi_6->m_CullMode = arg11;
0043ea64      esi_6->m_DepthTest = ((eax_8 << 2) + 4);
0043ea67      class RenderMaterial* SceneTool::m_pPrimMaterial_1 = SceneTool::m_pPrimMaterial;
0043ea7a      RenderVertexBuffer::RenderUsingMaterial(SceneTool::m_pPrimVertexBuffer, PRIMTYPE_TRIANGLELIST, 0, 1, SceneTool::m_pPrimMaterial_1, SceneTool::m_pPrimMaterial_1, RenderPass_Default, arg8, &RGBAColor_Black, nullptr, nullptr);
0043e950  }

0043ea82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0043ea90  void SceneTool::DrawTriangle(class Vector3 const* arg1, class Vector3 const* arg2, class Vector3 const* arg3, class RGBAColor const* arg4, uint8_t const arg5, uint8_t const arg6, enum CullModeType const arg7, enum BlendMode const arg8, enum BlendMode const arg9)

0043ea90  {
0043ead3      int32_t var_4 = 0;
0043eadb      int32_t var_8 = 0;
0043eae3      SceneTool::DrawTexturedTriangle(arg1, arg2, arg3, &var_8, &var_8, &var_8, nullptr, arg4, arg5, arg6, arg7, arg8, arg9, 0);
0043ea90  }

0043eaec                                      90 90 90 90                                                              ....

0043eaf0  void SceneTool::DrawPolygon(class Vector3* arg1, uint32_t const arg2, class RGBAColor const* arg3, uint8_t const arg4, uint8_t const arg5, enum CullModeType const arg6, enum BlendMode const arg7, enum BlendMode const arg8)

0043eaf0  {
0043eb03      if ((arg2 - 1) > 1)
0043eb03      {
0043eb08          int32_t var_c_1 = 0;
0043eb10          int32_t var_10 = 0;
0043eb18          void* __offset(Vector3, 0xc) eax_1 = &arg1[1];
0043eb1e          int32_t i_1 = (arg2 - 2);
0043eb5c          int32_t i;
0043eb5c          
0043eb5c          do
0043eb5c          {
0043eb51              SceneTool::DrawTexturedTriangle(arg1, eax_1, ((char*)eax_1 + 0xc), &var_10, &var_10, &var_10, nullptr, arg3, arg4, arg5, arg6, arg7, arg8, 0);
0043eb59              i = i_1;
0043eb59              i_1 -= 1;
0043eb5a              eax_1 += 0xc;
0043eb5c          } while (i != 1);
0043eb03      }
0043eaf0  }

0043eb65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0043eb70  void SceneTool::DrawTexturedPolygon(class Vector3* arg1, uint32_t const arg2, struct TexCoordPair const* arg3, class RenderTexture const* arg4, class RGBAColor const* arg5, uint8_t const arg6, uint8_t const arg7, enum CullModeType const arg8, enum BlendMode const arg9, enum BlendMode const arg10, uint8_t const arg11)

0043eb70  {
0043eb78      if ((arg2 - 1) > 1)
0043eb78      {
0043eb86          void* __offset(Vector3, 0xc) ecx_1 = &arg1[1];
0043eb89          void* __offset(TexCoordPair, 0x8) eax_2 = &arg3[1];
0043eb8c          int32_t i_1 = (arg2 - 2);
0043ebd5          int32_t i;
0043ebd5          
0043ebd5          do
0043ebd5          {
0043ebc8              SceneTool::DrawTexturedTriangle(arg1, ecx_1, ((char*)ecx_1 + 0xc), arg3, eax_2, ((char*)eax_2 + 8), arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
0043ebd0              i = i_1;
0043ebd0              i_1 -= 1;
0043ebd1              eax_2 += 8;
0043ebd3              ecx_1 += 0xc;
0043ebd5          } while (i != 1);
0043eb78      }
0043eb70  }

0043ebdc                                                                                      90 90 90 90                              ....

0043ebe0  void SceneTool::BuildSphereMesh(class RenderMesh* arg1)

0043ebe0  {
0043ebe0      uint32_t $S219_1 = $S219;
0043ebe0      
0043ebed      if (($S219_1 & 1) == 0)
0043ebed      {
0043ebef          $S219_1 |= 1;
0043ebf2          $S219 = $S219_1;
0043ebf7          XMAX.x = 0x3f800000;
0043ec01          XMAX.y = 0f;
0043ec0b          XMAX.z = 0f;
0043ebed      }
0043ebed      
0043ec17      if (($S219_1 & 2) == 0)
0043ec17      {
0043ec19          $S219_1 |= 2;
0043ec1c          $S219 = $S219_1;
0043ec21          XMIN.x = 0xbf800000;
0043ec2b          XMIN.y = 0f;
0043ec35          XMIN.z = 0f;
0043ec17      }
0043ec17      
0043ec41      if (($S219_1 & 4) == 0)
0043ec41      {
0043ec43          $S219_1 |= 4;
0043ec46          $S219 = $S219_1;
0043ec4b          YMAX.x = 0;
0043ec55          YMAX.y = 1f;
0043ec5f          YMAX.z = 0f;
0043ec41      }
0043ec41      
0043ec6b      if (($S219_1 & 8) == 0)
0043ec6b      {
0043ec6d          $S219_1 |= 8;
0043ec70          $S219 = $S219_1;
0043ec75          YMIN.x = 0;
0043ec7f          YMIN.y = -1f;
0043ec89          YMIN.z = 0f;
0043ec6b      }
0043ec6b      
0043ec95      if (($S219_1 & 0x10) == 0)
0043ec95      {
0043ec97          $S219_1 |= 0x10;
0043ec9a          $S219 = $S219_1;
0043ec9f          ZMAX.x = 0;
0043eca9          ZMAX.y = 0f;
0043ecb3          ZMAX.z = 1f;
0043ec95      }
0043ec95      
0043ecbf      if (($S219_1 & 0x20) == 0)
0043ecbf      {
0043ecc1          $S219_1 |= 0x20;
0043ecc4          $S219 = $S219_1;
0043ecc9          ZMIN.x = 0;
0043ecd3          ZMIN.y = 0f;
0043ecdd          ZMIN.z = -1f;
0043ecbf      }
0043ecbf      
0043ece9      if (($S219_1 & 0x40) == 0)
0043ece9      {
0043ecef          float y = YMAX.y;
0043ecf5          float z = YMAX.z;
0043ecfe          $S219 = ($S219_1 | 0x40);
0043ed08          octahedron[0].x = YMAX.x;
0043ed12          octahedron[0].y = y;
0043ed1e          octahedron[0].z = z;
0043ed2a          octahedron[1].x = ZMAX.x;
0043ed34          octahedron[1].y = ZMAX.y;
0043ed40          octahedron[1].z = ZMAX.z;
0043ed4c          octahedron[2].x = XMAX.x;
0043ed56          octahedron[2].y = XMAX.y;
0043ed62          octahedron[2].z = XMAX.z;
0043ed6e          octahedron[3].x = XMIN.x;
0043ed78          octahedron[3].y = XMIN.y;
0043ed84          octahedron[3].z = XMIN.z;
0043ed90          octahedron[4].x = ZMAX.x;
0043ed9a          octahedron[4].y = ZMAX.y;
0043eda6          octahedron[4].z = ZMAX.z;
0043edb2          octahedron[5].x = YMAX.x;
0043edbc          octahedron[5].y = YMAX.y;
0043edc8          octahedron[5].z = YMAX.z;
0043edd4          octahedron[6].x = YMIN.x;
0043edde          octahedron[6].y = YMIN.y;
0043edea          octahedron[6].z = YMIN.z;
0043edf6          octahedron[7].x = ZMAX.x;
0043ee00          octahedron[7].y = ZMAX.y;
0043ee0c          octahedron[7].z = ZMAX.z;
0043ee18          octahedron[8].x = XMIN.x;
0043ee22          octahedron[8].y = XMIN.y;
0043ee2e          octahedron[8].z = XMIN.z;
0043ee3a          octahedron[9].x = XMAX.x;
0043ee44          octahedron[9].y = XMAX.y;
0043ee50          octahedron[9].z = XMAX.z;
0043ee5c          octahedron[0xa].x = ZMAX.x;
0043ee66          octahedron[0xa].y = ZMAX.y;
0043ee72          octahedron[0xa].z = ZMAX.z;
0043ee7e          octahedron[0xb].x = YMIN.x;
0043ee88          octahedron[0xb].y = YMIN.y;
0043ee94          octahedron[0xb].z = YMIN.z;
0043eea0          octahedron[0xc].x = ZMIN.x;
0043eeaa          octahedron[0xc].y = ZMIN.y;
0043eeb0          octahedron[0xc].z = ZMIN.z;
0043eec2          octahedron[0xd].x = YMAX.x;
0043eecc          octahedron[0xd].y = YMAX.y;
0043eed8          octahedron[0xd].z = YMAX.z;
0043eee4          octahedron[0xe].x = XMAX.x;
0043eeee          octahedron[0xe].y = XMAX.y;
0043eefa          octahedron[0xe].z = XMAX.z;
0043ef06          octahedron[0xf].x = ZMIN.x;
0043ef10          octahedron[0xf].y = ZMIN.y;
0043ef1c          octahedron[0xf].z = ZMIN.z;
0043ef28          octahedron[0x10].x = XMIN.x;
0043ef32          octahedron[0x10].y = XMIN.y;
0043ef3e          octahedron[0x10].z = XMIN.z;
0043ef4a          octahedron[0x11].x = YMAX.x;
0043ef54          octahedron[0x11].y = YMAX.y;
0043ef60          octahedron[0x11].z = YMAX.z;
0043ef6c          octahedron[0x12].x = ZMIN.x;
0043ef76          octahedron[0x12].y = ZMIN.y;
0043ef82          octahedron[0x12].z = ZMIN.z;
0043ef8e          octahedron[0x13].x = YMIN.x;
0043ef98          octahedron[0x13].y = YMIN.y;
0043efa4          octahedron[0x13].z = YMIN.z;
0043efb0          octahedron[0x14].x = XMIN.x;
0043efba          octahedron[0x14].y = XMIN.y;
0043efc6          octahedron[0x14].z = XMIN.z;
0043efd2          octahedron[0x15].x = ZMIN.x;
0043efdc          octahedron[0x15].y = ZMIN.y;
0043efe8          octahedron[0x15].z = ZMIN.z;
0043eff4          octahedron[0x16].x = XMAX.x;
0043effe          octahedron[0x16].y = XMAX.y;
0043f00a          octahedron[0x16].z = XMAX.z;
0043f016          octahedron[0x17].x = YMIN.x;
0043f01b          octahedron[0x17].y = YMIN.y;
0043f021          octahedron[0x17].z = YMIN.z;
0043ece9      }
0043ece9      
0043f02a      int32_t i = 1;
0043f030      void* var_90 = &octahedron;
0043f038      int32_t edi = 8;
0043f03d      int32_t i_1 = 1;
0043f39b      void* ebx_1;
0043f39b      int32_t esi_9;
0043f39b      
0043f39b      do
0043f39b      {
0043f041          esi_9 = (edi << 2);
0043f060          ebx_1 = operator new[]((esi_9 * 0x24));
0043f060          
0043f066          if (edi > 0)
0043f066          {
0043f070              void* eax_30 = ((char*)var_90 + 0x10);
0043f079              int32_t var_80_1 = edi;
0043f07d              void* ecx_25 = ((char*)ebx_1 + 0x84);
0043f369              bool cond:1_1;
0043f369              
0043f369              do
0043f369              {
0043f0a1                  float var_48_1 = ((float)((((long double)*(uint32_t*)((char*)eax_30 + 8)) + ((long double)*(uint32_t*)((char*)eax_30 - 0x10))) * ((long double)0.5f)));
0043f0a9                  float var_a8_1 = var_48_1;
0043f0b3                  float var_68_1 = var_48_1;
0043f0be                  long double x87_r6_6 = (((long double)((float)(((long double)*(uint32_t*)((char*)eax_30 + 0x10)) + ((long double)*(uint32_t*)((char*)eax_30 - 8))))) * ((long double)0.5f));
0043f0f8                  long double x87_r7_6 = (((long double)1f) / x87_r6_6);
0043f104                  float var_a8_2 = ((float)(((long double)var_48_1) * x87_r7_6));
0043f10e                  float var_a4_2 = ((float)(((long double)((float)((((long double)*(uint32_t*)((char*)eax_30 + 0xc)) + ((long double)*(uint32_t*)((char*)eax_30 - 0xc))) * ((long double)0.5f)))) * x87_r7_6));
0043f118                  float var_a0_2 = ((float)(((long double)((float)x87_r6_6)) * x87_r7_6));
0043f13e                  float var_3c_1 = ((float)((((long double)*(uint32_t*)((char*)eax_30 - 4)) + ((long double)*(uint32_t*)((char*)eax_30 - 0x10))) * ((long double)0.5f)));
0043f146                  float var_74_1 = var_3c_1;
0043f150                  float var_8c_1 = var_3c_1;
0043f15b                  long double x87_r6_18 = (((long double)((float)(((long double)*(uint32_t*)((char*)eax_30 + 4)) + ((long double)*(uint32_t*)((char*)eax_30 - 8))))) * ((long double)0.5f));
0043f198                  long double x87_r7_12 = (((long double)1f) / x87_r6_18);
0043f1a4                  float var_8c_2 = ((float)(((long double)var_3c_1) * x87_r7_12));
0043f1ae                  float var_88_2 = ((float)(((long double)((float)((((long double)*(uint32_t*)((char*)eax_30 - 0xc)) + ((long double)*(uint32_t*)eax_30)) * ((long double)0.5f)))) * x87_r7_12));
0043f1b8                  float var_84_2 = ((float)(((long double)((float)x87_r6_18)) * x87_r7_12));
0043f1e2                  float var_30_1 = ((float)((((long double)*(uint32_t*)((char*)eax_30 + 8)) + ((long double)*(uint32_t*)((char*)eax_30 - 4))) * ((long double)0.5f)));
0043f1f0                  float var_9c_1 = var_30_1;
0043f1fa                  float var_54_1 = var_30_1;
0043f205                  long double x87_r6_30 = (((long double)((float)(((long double)*(uint32_t*)((char*)eax_30 + 0x10)) + ((long double)*(uint32_t*)((char*)eax_30 + 4))))) * ((long double)0.5f));
0043f20d                  float var_50_1 = ((float)((((long double)*(uint32_t*)((char*)eax_30 + 0xc)) + ((long double)*(uint32_t*)eax_30)) * ((long double)0.5f)));
0043f219                  float var_4c_1 = ((float)x87_r6_30);
0043f23b                  *(uint32_t*)((char*)ecx_25 - 0x84) = *(uint32_t*)((char*)eax_30 - 0x10);
0043f242                  *(uint32_t*)((char*)ecx_25 - 0x80) = *(uint32_t*)((char*)eax_30 - 0xc);
0043f24a                  *(uint32_t*)((char*)ecx_25 - 0x7c) = *(uint32_t*)((char*)eax_30 - 8);
0043f260                  *(uint32_t*)((char*)ecx_25 - 0x78) = var_8c_2;
0043f262                  *(uint32_t*)((char*)ecx_25 - 0x74) = var_88_2;
0043f265                  *(uint32_t*)((char*)ecx_25 - 0x70) = var_84_2;
0043f26e                  long double x87_r7_18 = (((long double)1f) / x87_r6_30);
0043f27d                  float var_9c_2 = ((float)(((long double)var_30_1) * x87_r7_18));
0043f287                  float var_98_2 = ((float)(((long double)var_50_1) * x87_r7_18));
0043f291                  float var_94_2 = ((float)(((long double)var_4c_1) * x87_r7_18));
0043f29e                  *(uint32_t*)((char*)ecx_25 - 0x6c) = var_a8_2;
0043f2a4                  *(uint32_t*)((char*)ecx_25 - 0x68) = var_a4_2;
0043f2ab                  *(uint32_t*)((char*)ecx_25 - 0x64) = var_a0_2;
0043f2b1                  *(uint32_t*)((char*)ecx_25 - 0x60) = var_8c_2;
0043f2b3                  *(uint32_t*)((char*)ecx_25 - 0x5c) = var_88_2;
0043f2b6                  *(uint32_t*)((char*)ecx_25 - 0x58) = var_84_2;
0043f2bf                  *(uint32_t*)((char*)ecx_25 - 0x54) = *(uint32_t*)((char*)eax_30 - 4);
0043f2c3                  *(uint32_t*)((char*)ecx_25 - 0x50) = *(uint32_t*)eax_30;
0043f2c9                  *(uint32_t*)((char*)ecx_25 - 0x4c) = *(uint32_t*)((char*)eax_30 + 4);
0043f2d3                  *(uint32_t*)((char*)ecx_25 - 0x48) = var_9c_2;
0043f2d9                  *(uint32_t*)((char*)ecx_25 - 0x44) = var_98_2;
0043f2e0                  *(uint32_t*)((char*)ecx_25 - 0x40) = var_94_2;
0043f2ec                  *(uint32_t*)((char*)ecx_25 - 0x3c) = var_a8_2;
0043f2f3                  *(uint32_t*)((char*)ecx_25 - 0x38) = var_a4_2;
0043f2fa                  *(uint32_t*)((char*)ecx_25 - 0x34) = var_a0_2;
0043f300                  *(uint32_t*)((char*)ecx_25 - 0x30) = var_8c_2;
0043f303                  *(uint32_t*)((char*)ecx_25 - 0x2c) = var_88_2;
0043f30a                  *(uint32_t*)((char*)ecx_25 - 0x28) = var_84_2;
0043f31a                  *(uint32_t*)((char*)ecx_25 - 0x24) = var_9c_2;
0043f31c                  *(uint32_t*)((char*)ecx_25 - 0x20) = var_98_2;
0043f31f                  *(uint32_t*)((char*)ecx_25 - 0x1c) = var_94_2;
0043f329                  *(uint32_t*)((char*)ecx_25 - 0x18) = var_a8_2;
0043f32f                  *(uint32_t*)((char*)ecx_25 - 0x14) = var_a4_2;
0043f332                  *(uint32_t*)((char*)ecx_25 - 0x10) = var_a0_2;
0043f338                  *(uint32_t*)((char*)ecx_25 - 0xc) = var_9c_2;
0043f33e                  *(uint32_t*)((char*)ecx_25 - 8) = var_98_2;
0043f341                  *(uint32_t*)((char*)ecx_25 - 4) = var_94_2;
0043f349                  *(uint32_t*)ecx_25 = *(uint32_t*)((char*)eax_30 + 8);
0043f34e                  *(uint32_t*)((char*)ecx_25 + 4) = *(uint32_t*)((char*)eax_30 + 0xc);
0043f354                  *(uint32_t*)((char*)ecx_25 + 8) = *(uint32_t*)((char*)eax_30 + 0x10);
0043f35b                  eax_30 += 0x24;
0043f35e                  ecx_25 += 0x90;
0043f364                  cond:1_1 = var_80_1 != 1;
0043f365                  var_80_1 -= 1;
0043f369              } while (cond:1_1);
0043f377              i = i_1;
0043f066          }
0043f066          
0043f37e          if (i > 1)
0043f385              operator delete[](var_90);
0043f385          
0043f38d          i += 1;
0043f391          var_90 = ebx_1;
0043f395          edi = esi_9;
0043f397          i_1 = i;
0043f39b      } while (i < 3);
0043f39b      
0043f3b3      int32_t edi_5 = (esi_9 * 3);
0043f3c8      int32_t* var_7c;
0043f3c8      
0043f3c8      if (RenderMesh::CreateLODBatch(arg1, 0, nullptr, PRIMTYPE_TRIANGLELIST, 0xffffffff, edi_5, 2, 1, 1, &var_7c) == 0)
0043f424          return;
0043f424      
0043f3d9      int32_t ecx_29 = (esi_9 * 0x24);
0043f3e5      int32_t esi_11;
0043f3e5      int32_t edi_7;
0043f3e5      edi_7 = __builtin_memcpy(*(uint32_t*)(*(uint32_t*)var_7c + 0xc)(0, edi_5), ebx_1, ((ecx_29 >> 2) << 2));
0043f3ec      __builtin_memcpy(edi_7, esi_11, (ecx_29 & 3));
0043f3f8      *(uint32_t*)(*(uint32_t*)var_7c + 0x10)(0, 0);
0043f3fc      operator delete[](ebx_1);
0043f406      RenderMesh::UpdateCachedData(arg1);
0043f40e      int32_t eax_35;
0043f40e      eax_35 = 1;
0043ebe0  }

0043f425                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0043f430  void SceneTool::IdentityMatrices()

0043f430  {
0043f438      int32_t var_74 = 0;
0043f440      int32_t var_78 = 0;
0043f448      int32_t var_7c = 0;
0043f450      int32_t var_64 = 0;
0043f458      int32_t var_68 = 0;
0043f460      int32_t var_70 = 0;
0043f468      int32_t var_54 = 0;
0043f470      int32_t var_5c = 0;
0043f478      int32_t var_60 = 0;
0043f480      int32_t var_48 = 0;
0043f488      int32_t var_4c = 0;
0043f490      int32_t var_50 = 0;
0043f498      int32_t var_44 = 0x3f800000;
0043f4a0      int32_t var_58 = 0x3f800000;
0043f4a8      int32_t var_6c = 0x3f800000;
0043f4b0      int32_t var_80 = 0x3f800000;
0043f4c6      __builtin_memcpy(0x8375b8, &var_80, 0x40);
0043f4d9      void var_40;
0043f4d9      void* var_8c = &var_40;
0043f4da      __builtin_memcpy(&var_40, &var_80, 0x40);
0043f4dc      SceneTool::SwapMatrixForwardAndUp(var_8c);
0043f4ef      RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device, &var_40);
0043f502      __builtin_memcpy(0x8375f8, &var_80, 0x40);
0043f515      void* var_8c_2 = &var_40;
0043f516      __builtin_memcpy(&var_40, &var_80, 0x40);
0043f518      SceneTool::SwapTransposedMatrixForwardAndUp(var_8c_2);
0043f52b      RenderDeviceD3D::SetWorldToViewMatrix(RenderDevice::render_device, &var_40);
0043f53e      __builtin_memcpy(0x837638, &var_80, 0x40);
0043f54b      RenderDeviceD3D::SetViewToClipMatrix(RenderDevice::render_device, &SceneTool::m_projMatrix);
0043f430  }

0043f559                                                                             90 90 90 90 90 90 90                           .......

0043f560  void SceneTool::RestoreMatrices()

0043f560  {
0043f574      __builtin_memcpy(0x8375b8, 0x8376f8, 0x40);
0043f588      void var_40;
0043f588      void* var_4c = &var_40;
0043f589      g_bMatrixStored = 0;
0043f590      __builtin_memcpy(&var_40, 0x8376f8, 0x40);
0043f592      SceneTool::SwapMatrixForwardAndUp(var_4c);
0043f5a5      RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device, &var_40);
0043f5b9      __builtin_memcpy(0x8375f8, 0x837678, 0x40);
0043f5cd      void* var_4c_2 = &var_40;
0043f5ce      __builtin_memcpy(&var_40, 0x837678, 0x40);
0043f5d0      SceneTool::SwapTransposedMatrixForwardAndUp(var_4c_2);
0043f5e3      RenderDeviceD3D::SetWorldToViewMatrix(RenderDevice::render_device, &var_40);
0043f5f7      __builtin_memcpy(0x837638, 0x8376b8, 0x40);
0043f604      RenderDeviceD3D::SetViewToClipMatrix(RenderDevice::render_device, &SceneTool::m_projMatrix);
0043f560  }

0043f60f                                               90                                                                 .

0043f610  uint8_t SceneTool::Think()

0043f610  {
0043f610      SceneTool::PurgeOldGraphicsResources();
0043f615      class DebugConsole* SceneTool::m_pDebugConsole_1 = SceneTool::m_pDebugConsole;
0043f615      
0043f61d      if (SceneTool::m_pDebugConsole_1 != 0)
0043f61f          DebugConsole::Think(SceneTool::m_pDebugConsole_1);
0043f61f      
0043f624      class ProfilerUI* SceneTool::m_pProfilerUI_1 = SceneTool::m_pProfilerUI;
0043f624      
0043f62c      if (SceneTool::m_pProfilerUI_1 != 0)
0043f62e          ProfilerUI::Think(SceneTool::m_pProfilerUI_1);
0043f62e      
0043f638      int32_t ecx = *(int32_t*)((char*)Timer::local_time + 4);
0043f63e      (*(uint32_t*)s_LastThinkLocalTime) = (*(uint32_t*)Timer::local_time);
0043f643      *(int32_t*)((char*)s_LastThinkLocalTime + 4) = ecx;
0043f649      int32_t eax;
0043f649      eax = 1;
0043f64b      return 1;
0043f610  }

0043f64c                                      90 90 90 90                                                              ....

0043f650  void SceneTool::RenderDebugHUD()

0043f650  {
0043f65d      if (SceneTool::m_DebugHUDVisible != 0)
0043f65d      {
0043f66f          RenderDeviceD3D::SetFillMode(RenderDevice::render_device, FILLMODE_SOLID);
0043f674          SceneTool::IdentityMatrices();
0043f679          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0043f68a          long double x87_r7_2 = (((long double)1f) / ((long double)RenderDevice::render_device_1->m_viewportWidth));
0043f694          int32_t var_2c_1 = 0;
0043f69f          int32_t var_20_1 = 0;
0043f6aa          int32_t var_14_1 = 0;
0043f6b5          int32_t var_8_1 = 0;
0043f6c0          float var_78 = 0f;
0043f6c8          int32_t var_74_1 = 0x3d75c28f;
0043f6d0          int32_t var_70_1 = 0x3dcccccd;
0043f6d8          int32_t var_6c_1 = 0x3f19999a;
0043f6e0          float var_90_1 = ((float)x87_r7_2);
0043f6f0          int32_t eax_2 = (*(int32_t*)((char*)RenderDevice::render_device_1 + 0x810) + 3);
0043f6f3          long double x87_r6_2 = (((long double)1f) / ((long double)RenderDevice::render_device_1->m_viewportHeight));
0043f70f          float var_68_1 = ((float)(((((long double)var_90_1) * ((long double)0f)) - ((long double)1f)) - ((long double)var_90_1)));
0043f71f          float var_30 = var_68_1;
0043f730          float __return = ((float)(-(((((long double)0f) * x87_r6_2) - ((long double)1f))) - x87_r6_2));
0043f734          float __return_1 = __return;
0043f738          float __return_4 = __return_1;
0043f743          float var_90_2 = ((float)x87_r7_2);
0043f747          float var_64_1 = ((float)x87_r6_2);
0043f75b          long double x87_r7_7 = (((((long double)var_90_2) * ((long double)1200f)) - ((long double)1f)) - ((long double)var_90_2));
0043f76f          long double x87_r6_6 = (((long double)eax_2) * ((long double)var_64_1));
0043f774          float var_24_1 = var_68_1;
0043f787          float __return_5 = __return_1;
0043f796          long double x87_r6_10 = (-(((x87_r6_6 + x87_r6_6) - ((long double)1f))) - ((long double)var_64_1));
0043f79a          float var_1c_1 = ((float)x87_r6_10);
0043f7a3          float var_18_1 = ((float)x87_r7_7);
0043f7aa          float var_10_1 = ((float)x87_r6_10);
0043f7b1          float var_c_1 = ((float)x87_r7_7);
0043f7b8          SceneTool::DrawPolygon(&var_30, 4, &var_78, 0, 0, CULLMODE_CW, BLEND_SRCALPHA, BLEND_INVSRCALPHA);
0043f7c6          RenderDeviceD3D::BeginRenderingDebugText(RenderDevice::render_device);
0043f7cb          float __return_2 = __return;
0043f7cf          float __return_3 = __return;
0043f7cf          
0043faa9          for (int32_t i = 8; i < 9; i += 1)
0043faa9          {
0043f7e3              uint32_t eax_4;
0043f7e3              
0043f7e3              if (i > 8)
0043f86a                  eax_4 = 0xffaacce0;
0043f7e3              else
0043f7e9                  switch (i)
0043f7e9                  {
0043f7f0                      case 0:
0043f7f0                      {
0043f7f0                          __return_2 = 0f;
0043f7f2                          __return_3 = 0f;
0043f7f4                          eax_4 = 0xff000000;
0043f7f0                          break;
0043f7f0                      }
0043f7fb                      case 1:
0043f7fb                      {
0043f7fb                          __return_2 = 2.80259693e-45f;
0043f800                          __return_3 = 2.80259693e-45f;
0043f802                          eax_4 = 0xff000000;
0043f7fb                          break;
0043f7fb                      }
0043f809                      case 2:
0043f809                      {
0043f809                          __return_2 = 0f;
0043f80b                          __return_3 = 2.80259693e-45f;
0043f810                          eax_4 = 0xff000000;
0043f809                          break;
0043f809                      }
0043f817                      case 3:
0043f817                      {
0043f817                          __return_2 = 2.80259693e-45f;
0043f81c                          __return_3 = 0f;
0043f81e                          eax_4 = 0xff000000;
0043f817                          break;
0043f817                      }
0043f825                      case 4:
0043f825                      {
0043f825                          __return_2 = 1.40129846e-45f;
0043f82a                          __return_3 = 0f;
0043f82c                          eax_4 = 0xff000000;
0043f825                          break;
0043f825                      }
0043f833                      case 5:
0043f833                      {
0043f833                          __return_2 = 0f;
0043f835                          __return_3 = 1.40129846e-45f;
0043f83a                          eax_4 = 0xff000000;
0043f833                          break;
0043f833                      }
0043f841                      case 6:
0043f841                      {
0043f841                          __return_2 = 2.80259693e-45f;
0043f846                          __return_3 = 1.40129846e-45f;
0043f84b                          eax_4 = 0xff000000;
0043f841                          break;
0043f841                      }
0043f852                      case 7:
0043f852                      {
0043f852                          __return_2 = 1.40129846e-45f;
0043f857                          __return_3 = 2.80259693e-45f;
0043f85c                          eax_4 = 0xff000000;
0043f852                          break;
0043f852                      }
0043f863                      case 8:
0043f863                      {
0043f863                          __return_2 = 1.40129846e-45f;
0043f868                          __return_3 = 1.40129846e-45f;
0043f86a                          eax_4 = 0xffaacce0;
0043f863                          break;
0043f863                      }
0043f7e9                  }
0043f7e9              
0043f87d              RenderDeviceD3D::RenderDebugText(RenderDevice::render_device, __return_2, __return_3, "FPS:", eax_4);
0043f882              SceneTool::m_FramesPerSecond;
0043f888              int32_t eax_5 = _ftol2();
0043f890              float var_88_1;
0043f890              float var_84_1;
0043f890              
0043f890              if (eax_5 < 0xa)
0043f890              {
0043f8ba                  var_88_1 = 1f;
0043f8c2                  var_84_1 = 0.200000003f;
0043f890              }
0043f890              else if (eax_5 < 0x14)
0043f8de              {
0043f908                  __builtin_strncpy(&var_88_1, "fff?", 4);
0043f910                  var_84_1 = 0.5f;
0043f8de              }
0043f8de              else if (eax_5 >= 0x1e)
0043f91d              {
0043f959                  var_78 = 0.850000024f;
0043f981                  var_88_1 = var_78;
0043f989                  var_84_1 = 0.850000024f;
0043f91d              }
0043f91d              else
0043f947                  __builtin_strncpy(&var_88_1, "fff?fff?", 8);
0043f9a0              float var_7c_1 = 1f;
0043f9a4              sprintf(0x8378d0, &data_798ae0, eax_5);
0043f9b0              uint32_t ebx_1;
0043f9b0              
0043f9b0              if (i >= 8)
0043fa04                  ebx_1 = ((((((_ftol2() << 8) | _ftol2()) << 8) | _ftol2()) << 8) | _ftol2());
0043f9b0              else
0043f9b2                  ebx_1 = 0xff000000;
0043f9b2              
0043fa17              RenderDeviceD3D::RenderDebugText(RenderDevice::render_device, (__return_2 + 0x22), __return_3, &txt, ebx_1);
0043fa23              int32_t eax_14;
0043fa23              
0043fa23              if (SceneTool::m_CameraPosition.objcell_id == 0)
0043fa77                  eax_14 = sprintf(0x8378d0, "Camera pos: <none>");
0043fa23              else
0043fa23              {
0043fa41                  sprintf(0x8378d0, "Camera pos: %s", Position::ToDisplayString((&SceneTool::m_CameraPosition), &__return)->m_charbuffer);
0043fa4b                  int32_t* ebx_9 = (__return - 0x14);
0043fa55                  eax_14 = InterlockedDecrement(&ebx_9[1]);
0043fa55                  
0043fa61                  if ((eax_14 == 0 && ebx_9 != 0))
0043fa69                      eax_14 = **(uint32_t**)ebx_9(1);
0043fa23              }
0043fa23              
0043faa0              RenderDeviceD3D::RenderDebugText(RenderDevice::render_device, (__return_2 + 0x78), __return_3, &txt, (((eax_14 - eax_14) & 0xff553320) - 0x553320));
0043faa9          }
0043faa9          
0043fab5          RenderDeviceD3D::EndRenderingDebugText(RenderDevice::render_device);
0043faba          class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0043fac0          int32_t edx_3;
0043fac0          edx_3 = RenderDevice::render_device_2->m_WireframeMode;
0043fac6          char temp1_1 = edx_3;
0043fac6          edx_3 = -(edx_3);
0043face          RenderDeviceD3D::SetFillMode(RenderDevice::render_device_2, ((edx_3 - edx_3) + 3));
0043f65d      }
0043f650  }

0043f7da                                                                                8d 9b 00 00 00 00                            ......
0043f8cf                                               83 fd 08 73 96 b8 00 00 00 ff eb 94                                ...s........
0043fade                                                                                            8b ff                                ..
0043fae0  uint32_t jump_table_43fae0[0x9] = 
0043fae0  {
0043fae0      [0x0] =  0x0043f7f0
0043fae4      [0x1] =  0x0043f7fb
0043fae8      [0x2] =  0x0043f809
0043faec      [0x3] =  0x0043f817
0043faf0      [0x4] =  0x0043f825
0043faf4      [0x5] =  0x0043f833
0043faf8      [0x6] =  0x0043f841
0043fafc      [0x7] =  0x0043f852
0043fb00      [0x8] =  0x0043f863
0043fb04  }

0043fb04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0043fb10  void SceneTool::DrawLine(class Vector3 const* arg1, class Vector3 const* arg2, class RGBAColor const* arg3, uint8_t const arg4, uint8_t const arg5)

0043fb10  {
0043fb18      int32_t ecx;
0043fb18      ecx = arg4 == 0;
0043fb22      arg4 = ((ecx << 2) + 4);
0043fb26      /* tailcall */
0043fb26      return SceneTool::DrawLine(arg1, arg2, arg3, arg4, arg5);
0043fb10  }

0043fb2b                                   90 90 90 90 90                                                             .....

0043fb30  void SceneTool::EndFrame(uint8_t const arg1)

0043fb30  {
0043fb30      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0043fb30      
0043fb41      if (RenderDevice::render_device_1->m_bOpenScene == 0)
0043fc22          return;
0043fc22      
0043fb47      uint32_t m_viewportWidth = RenderDevice::render_device_1->m_viewportWidth;
0043fb4d      uint32_t m_viewportHeight = RenderDevice::render_device_1->m_viewportHeight;
0043fb54      uint32_t m_viewportY = RenderDevice::render_device_1->m_viewportY;
0043fb5d      uint32_t m_viewportX = RenderDevice::render_device_1->m_viewportX;
0043fb67      float m_ViewportAspectRatio = RenderDevice::render_device_1->m_ViewportAspectRatio;
0043fb6f      struct RenderDevice::VTable* vtable = RenderDevice::render_device_1->vtable;
0043fb7b      uint32_t eax_1 = RenderDevice::GetDisplayHeight(RenderDevice::render_device_1);
0043fb93      vtable->SetViewport(0, 0, RenderDevice::GetDisplayWidth(RenderDevice::render_device), eax_1, 0);
0043fb93      
0043fba5      if ((arg1 != 0 && SceneTool::m_RenderUIObjects != 0))
0043fba5      {
0043fba7          RenderUI::RenderObjects();
0043fbac          KeyStone::Update();
0043fba5      }
0043fba5      
0043fbb1      class ProfilerUI* SceneTool::m_pProfilerUI_1 = SceneTool::m_pProfilerUI;
0043fbb1      
0043fbb9      if (SceneTool::m_pProfilerUI_1 != 0)
0043fbbb          ProfilerUI::Render(SceneTool::m_pProfilerUI_1);
0043fbbb      
0043fbc0      class DebugConsole* SceneTool::m_pDebugConsole_1 = SceneTool::m_pDebugConsole;
0043fbc0      
0043fbc8      if (SceneTool::m_pDebugConsole_1 != 0)
0043fbca          DebugConsole::Render(SceneTool::m_pDebugConsole_1);
0043fbca      
0043fbcf      SceneTool::RenderDebugHUD();
0043fbd8      RenderDevice::render_device->vtable->SetViewport(m_viewportX, m_viewportY, m_viewportWidth, m_viewportHeight, 0);
0043fbf1      RenderDevice::render_device->m_ViewportAspectRatio = ((float)((long double)m_ViewportAspectRatio));
0043fbfd      RenderDevice::render_device->vtable->EndScene();
0043fc08      RenderDevice::render_device->vtable->Flip();
0043fc1a      /* tailcall */
0043fc1a      return SceneTool::UpdateFPSCounter();
0043fb30  }

0043fc23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0043fc30  void __fastcall SceneTool::Shutdown()

0043fc30  {
0043fc30      void* ecx;
0043fc30      void* var_4 = ecx;
0043fc30      
0043fc3b      if (st_init != 0)
0043fc3b      {
0043fc4c          PStringBase<char>::PStringBase<char>(&var_4, "SceneTool.ScreenshotWidthScale");
0043fc56          GlobalRegistry::UnregisterVariable(&var_4);
0043fc65          int32_t* esi_2 = ((char*)var_4 - 0x14);
0043fc65          
0043fc77          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0043fc7f              **(uint32_t**)esi_2(1);
0043fc7f          
0043fc8a          PStringBase<char>::PStringBase<char>(&var_4, "SceneTool.ScreenshotHeightScale");
0043fc94          GlobalRegistry::UnregisterVariable(&var_4);
0043fc9d          int32_t* esi_4 = ((char*)var_4 - 0x14);
0043fc9d          
0043fcaf          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0043fcb7              **(uint32_t**)esi_4(1);
0043fcb7          
0043fcc2          PStringBase<char>::PStringBase<char>(&var_4, "SceneTool.RenderUIObjects");
0043fccc          GlobalRegistry::UnregisterVariable(&var_4);
0043fcd5          void* esi_6 = ((char*)var_4 - 0x14);
0043fcd5          
0043fce7          if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
0043fcef              **(uint32_t**)esi_6(1);
0043fcef          
0043fcf6          Render::UnlinkRGRCallback(ArgumentParser::OnCommandLineEvaluationDone);
0043fcfb          class ProfilerUI* SceneTool::m_pProfilerUI_1 = SceneTool::m_pProfilerUI;
0043fcfb          
0043fd05          if (SceneTool::m_pProfilerUI_1 != 0)
0043fd05          {
0043fd0f              uint32_t esi_8 = (SceneTool::m_pProfilerUI_1->m_cRef - 1);
0043fd0c              SceneTool::m_pProfilerUI_1->m_cRef = esi_8;
0043fd0c              
0043fd16              if (esi_8 == 0)
0043fd18                  SceneTool::m_pProfilerUI_1->vtable->__vecDelDtor(1);
0043fd18              
0043fd1e              SceneTool::m_pProfilerUI = nullptr;
0043fd05          }
0043fd05          
0043fd24          class DebugConsole* SceneTool::m_pDebugConsole_1 = SceneTool::m_pDebugConsole;
0043fd24          
0043fd2b          if (SceneTool::m_pDebugConsole_1 != 0)
0043fd2b          {
0043fd35              uint32_t esi_10 = (SceneTool::m_pDebugConsole_1->m_cRef - 1);
0043fd32              SceneTool::m_pDebugConsole_1->m_cRef = esi_10;
0043fd32              
0043fd3c              if (esi_10 == 0)
0043fd3e                  SceneTool::m_pDebugConsole_1->vtable->__vecDelDtor(1);
0043fd3e              
0043fd44              SceneTool::m_pDebugConsole = nullptr;
0043fd2b          }
0043fd2b          
0043fd4a          class RenderVertexBuffer* SceneTool::m_pPrimVertexBuffer_1 = SceneTool::m_pPrimVertexBuffer;
0043fd4a          
0043fd51          if (SceneTool::m_pPrimVertexBuffer_1 != 0)
0043fd51          {
0043fd5b              uint32_t esi_12 = (SceneTool::m_pPrimVertexBuffer_1->m_cRef - 1);
0043fd58              SceneTool::m_pPrimVertexBuffer_1->m_cRef = esi_12;
0043fd58              
0043fd62              if (esi_12 == 0)
0043fd64                  SceneTool::m_pPrimVertexBuffer_1->vtable->__vecDelDtor(1);
0043fd64              
0043fd6a              SceneTool::m_pPrimVertexBuffer = nullptr;
0043fd51          }
0043fd51          
0043fd70          class RenderMesh* SceneTool::m_pCylinderMesh_1 = SceneTool::m_pCylinderMesh;
0043fd70          
0043fd7a          if (SceneTool::m_pCylinderMesh_1 != 0)
0043fd7a          {
0043fd7c              SceneTool::m_pCylinderMesh_1->vtable->Release();
0043fd81              SceneTool::m_pCylinderMesh = nullptr;
0043fd7a          }
0043fd7a          
0043fd87          class RenderMesh* SceneTool::m_pSphereMesh_1 = SceneTool::m_pSphereMesh;
0043fd87          
0043fd8f          if (SceneTool::m_pSphereMesh_1 != 0)
0043fd8f          {
0043fd91              SceneTool::m_pSphereMesh_1->vtable->Release();
0043fd96              SceneTool::m_pSphereMesh = nullptr;
0043fd8f          }
0043fd8f          
0043fd9c          class RenderMaterial* SceneTool::m_pDefaultMaterial_1 = SceneTool::m_pDefaultMaterial;
0043fd9c          
0043fda4          if (SceneTool::m_pDefaultMaterial_1 != 0)
0043fda4          {
0043fda6              SceneTool::m_pDefaultMaterial_1->vtable->Release();
0043fdab              SceneTool::m_pDefaultMaterial = nullptr;
0043fda4          }
0043fda4          
0043fdb1          class RenderMaterial* SceneTool::m_pPrimMaterial_1 = SceneTool::m_pPrimMaterial;
0043fdb1          
0043fdb9          if (SceneTool::m_pPrimMaterial_1 != 0)
0043fdb9          {
0043fdbb              SceneTool::m_pPrimMaterial_1->vtable->Release();
0043fdc0              SceneTool::m_pPrimMaterial = nullptr;
0043fdb9          }
0043fdb9          
0043fdc6          class RenderMaterial* SceneTool::m_pPrimObjectMaterial_1 = SceneTool::m_pPrimObjectMaterial;
0043fdc6          
0043fdce          if (SceneTool::m_pPrimObjectMaterial_1 != 0)
0043fdce          {
0043fdd0              SceneTool::m_pPrimObjectMaterial_1->vtable->Release();
0043fdd5              SceneTool::m_pPrimObjectMaterial = nullptr;
0043fdce          }
0043fdce          
0043fddb          class RenderSurface* SceneTool::m_pScreenShotSurface_1 = SceneTool::m_pScreenShotSurface;
0043fddb          
0043fde3          if (SceneTool::m_pScreenShotSurface_1 != 0)
0043fde3          {
0043fde5              SceneTool::m_pScreenShotSurface_1->vtable->Release();
0043fdea              SceneTool::m_pScreenShotSurface = nullptr;
0043fde3          }
0043fde3          
0043fdf0          st_init = 0;
0043fc3b      }
0043fc30  }

0043fdf9                                                                             90 90 90 90 90 90 90                           .......

0043fe00  void __thiscall MaterialLayer::InsertStage(class MaterialLayer* this, uint32_t const arg2, class LayerStage* arg3)

0043fe00  {
0043fe0d      SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&this->m_Stages.m_data, &arg3, arg2);
0043fe00  }

0043fe15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0043fe20  void __thiscall RenderMaterial::InsertLayer(class RenderMaterial* this, uint32_t const arg2, class MaterialLayer* arg3)

0043fe20  {
0043fe2d      SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&this->layers.m_data, &arg3, arg2);
0043fe20  }

0043fe35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0043fe40  uint8_t __fastcall SceneTool::CreateDefaultMaterial()

0043fe40  {
0043fe40      void* ecx;
0043fe40      void* var_4 = ecx;
0043fe41      class RenderMaterial* SceneTool::m_pDefaultMaterial_1 = SceneTool::m_pDefaultMaterial;
0043fe41      
0043fe4f      if (SceneTool::m_pDefaultMaterial_1 != 0)
0043fe4f      {
0043fe51          SceneTool::m_pDefaultMaterial_1->vtable->Release();
0043fe56          SceneTool::m_pDefaultMaterial = nullptr;
0043fe4f      }
0043fe4f      
0043fe5c      class RenderMaterial* SceneTool::m_pPrimMaterial_1 = SceneTool::m_pPrimMaterial;
0043fe5c      
0043fe64      if (SceneTool::m_pPrimMaterial_1 != 0)
0043fe64      {
0043fe66          SceneTool::m_pPrimMaterial_1->vtable->Release();
0043fe6b          SceneTool::m_pPrimMaterial = nullptr;
0043fe64      }
0043fe64      
0043fe71      class RenderMaterial* SceneTool::m_pPrimObjectMaterial_1 = SceneTool::m_pPrimObjectMaterial;
0043fe71      
0043fe79      if (SceneTool::m_pPrimObjectMaterial_1 != 0)
0043fe79      {
0043fe7b          SceneTool::m_pPrimObjectMaterial_1->vtable->Release();
0043fe80          SceneTool::m_pPrimObjectMaterial = nullptr;
0043fe79      }
0043fe79      
0043fe8b      void* eax_3 = operator new(0x4e0);
0043fe8b      
0043fe95      if (eax_3 == 0)
004400ff          SceneTool::m_pDefaultMaterial = nullptr;
0043fe95      else
0043fe95      {
0043fe9d          eax_3 = RenderMaterial::RenderMaterial(eax_3);
0043fea4          SceneTool::m_pDefaultMaterial = eax_3;
0043fea4          
0043fea9          if (eax_3 != 0)
0043fea9          {
0043feb4              eax_3 = operator new(0xd8);
0043feb4              
0043febe              if (eax_3 != 0)
0043febe              {
0043fecb                  void* esi_1 = MaterialLayer::MaterialLayer(eax_3);
0043fecb                  
0043fecf                  if (esi_1 != 0)
0043fecf                  {
0043fed7                      eax_3 = operator new(0x48);
0043fed7                      
0043fee1                      if (eax_3 != 0)
0043fee1                      {
0043fee9                          eax_3 = LayerStage::LayerStage(eax_3);
0043fee9                          
0043fef0                          if (eax_3 != 0)
0043fef0                          {
0043ff09                              __builtin_memcpy(((char*)eax_3 + 0x28), "\x03\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00", 0x18);
0043ff1b                              var_4 = eax_3;
0043ff1f                              SmartArray<LayerModifier *,1>::InsertOrderedByIndex(((char*)esi_1 + 0x1c), &var_4, 0);
0043ff24                              *(uint32_t*)((char*)esi_1 + 0x34) = 5;
0043ff2b                              *(uint32_t*)((char*)esi_1 + 0x38) = 6;
0043ff41                              var_4 = esi_1;
0043ff45                              SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&SceneTool::m_pDefaultMaterial->layers, &var_4, 0);
0043ff50                              RenderMaterial::Optimize(SceneTool::m_pDefaultMaterial);
0043ff5a                              void* eax_4 = operator new(0x4e0);
0043ff5a                              
0043ff64                              if (eax_4 == 0)
0043ff64                              {
0044010d                                  SceneTool::m_pPrimMaterial = nullptr;
00440116                                  eax_4 = 0;
0044011a                                  return 0;
0043ff64                              }
0043ff64                              
0043ff6c                              eax_3 = RenderMaterial::RenderMaterial(eax_4);
0043ff73                              SceneTool::m_pPrimMaterial = eax_3;
0043ff73                              
0043ff78                              if (eax_3 != 0)
0043ff78                              {
0043ff83                                  eax_3 = operator new(0xd8);
0043ff83                                  
0043ff8d                                  if (eax_3 != 0)
0043ff8d                                  {
0043ff9a                                      void* edi_1 = MaterialLayer::MaterialLayer(eax_3);
0043ff9a                                      
0043ff9e                                      if (edi_1 != 0)
0043ff9e                                      {
0043ffa6                                          eax_3 = operator new(0x48);
0043ffa6                                          
0043ffb0                                          if (eax_3 != 0)
0043ffb0                                          {
0043ffb8                                              eax_3 = LayerStage::LayerStage(eax_3);
0043ffb8                                              
0043ffc1                                              if (eax_3 != 0)
0043ffc1                                              {
0043ffd1                                                  var_4 = eax_3;
0043ffd5                                                  SmartArray<LayerModifier *,1>::InsertOrderedByIndex(((char*)edi_1 + 0x1c), &var_4, 0);
0043ffea                                                  var_4 = edi_1;
0043ffee                                                  SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&SceneTool::m_pPrimMaterial->layers, &var_4, 0);
0043fffa                                                  *(uint32_t*)((char*)edi_1 + 0x34) = 5;
00440001                                                  *(uint32_t*)((char*)edi_1 + 0x38) = 6;
00440008                                                  MaterialLayer::SetDiffuse(edi_1, &RGBAColor_White);
0044000d                                                  __builtin_memcpy(((char*)eax_3 + 0x28), "\x03\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00", 0x18);
00440025                                                  RenderMaterial::Optimize(SceneTool::m_pPrimMaterial);
0044002f                                                  void* eax_5 = operator new(0x4e0);
0044002f                                                  
00440039                                                  if (eax_5 == 0)
00440039                                                  {
0044011e                                                      SceneTool::m_pPrimObjectMaterial = nullptr;
00440128                                                      eax_5 = 0;
0044012c                                                      return 0;
00440039                                                  }
00440039                                                  
00440041                                                  eax_3 = RenderMaterial::RenderMaterial(eax_5);
00440048                                                  SceneTool::m_pPrimObjectMaterial = eax_3;
00440048                                                  
0044004d                                                  if (eax_3 != 0)
0044004d                                                  {
00440058                                                      eax_3 = operator new(0xd8);
00440058                                                      
00440062                                                      if (eax_3 != 0)
00440062                                                      {
0044006f                                                          void* edi_2 = MaterialLayer::MaterialLayer(eax_3);
0044006f                                                          
00440073                                                          if (edi_2 != 0)
00440073                                                          {
0044007b                                                              eax_3 = operator new(0x48);
0044007b                                                              
00440085                                                              if (eax_3 != 0)
00440085                                                              {
00440089                                                                  eax_3 = LayerStage::LayerStage(eax_3);
00440089                                                                  
00440092                                                                  if (eax_3 != 0)
00440092                                                                  {
0044009e                                                                      var_4 = eax_3;
004400a2                                                                      SmartArray<LayerModifier *,1>::InsertOrderedByIndex(((char*)edi_2 + 0x1c), &var_4, 0);
004400b7                                                                      var_4 = edi_2;
004400bb                                                                      SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&SceneTool::m_pPrimObjectMaterial->layers, &var_4, 0);
004400c7                                                                      *(uint32_t*)((char*)edi_2 + 0x34) = 5;
004400ce                                                                      *(uint32_t*)((char*)edi_2 + 0x38) = 6;
004400d5                                                                      MaterialLayer::SetDiffuse(edi_2, &RGBAColor_White);
004400da                                                                      __builtin_memcpy(((char*)eax_3 + 0x28), "\x03\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00", 0x18);
004400f2                                                                      RenderMaterial::Optimize(SceneTool::m_pPrimObjectMaterial);
004400fa                                                                      int32_t eax_6;
004400fa                                                                      eax_6 = 1;
004400fe                                                                      return 1;
00440092                                                                  }
00440085                                                              }
00440073                                                          }
00440062                                                      }
0044004d                                                  }
0043ffc1                                              }
0043ffb0                                          }
0043ff9e                                      }
0043ff8d                                  }
0043ff78                              }
0043fef0                          }
0043fee1                      }
0043fecf                  }
0043febe              }
0043fea9          }
0043fe95      }
0043fe95      
00440108      eax_3 = 0;
0044010c      return 0;
0043fe40  }

0044012d                                         90 90 90                                                               ...

00440130  uint8_t SceneTool::Startup()

00440130  {
00440143      __builtin_memset(0x8373b8, 0, 0x50);
00440149      SceneTool::m_pDefaultMaterial = nullptr;
0044014f      SceneTool::m_pPrimMaterial = nullptr;
00440155      SceneTool::m_pPrimObjectMaterial = nullptr;
0044015b      SceneTool::m_pPrimVertexBuffer = nullptr;
00440161      SceneTool::m_FramesPerSecond = 0f;
00440166      SceneTool::m_worldMatrix._14 = 0f;
0044016b      SceneTool::m_worldMatrix._13 = 0f;
00440170      SceneTool::m_worldMatrix._12 = 0f;
00440175      SceneTool::m_worldMatrix._24 = 0f;
0044017a      SceneTool::m_worldMatrix._23 = 0f;
0044017f      SceneTool::m_worldMatrix._21 = 0f;
00440184      SceneTool::m_worldMatrix._34 = 0f;
00440189      SceneTool::m_worldMatrix._32 = 0f;
0044018e      SceneTool::m_worldMatrix._31 = 0f;
00440193      SceneTool::m_worldMatrix._43 = 0f;
00440198      SceneTool::m_worldMatrix._42 = 0f;
0044019d      SceneTool::m_worldMatrix._41 = 0f;
004401a2      SceneTool::m_worldMatrix._44 = 1f;
004401ac      SceneTool::m_worldMatrix._33 = 1f;
004401b6      SceneTool::m_worldMatrix._22 = 1f;
004401c0      SceneTool::m_worldMatrix._11 = 0x3f800000;
004401ca      SceneTool::m_viewMatrix._14 = 0f;
004401cf      SceneTool::m_viewMatrix._13 = 0f;
004401d4      SceneTool::m_viewMatrix._12 = 0f;
004401d9      SceneTool::m_viewMatrix._24 = 0f;
004401de      SceneTool::m_viewMatrix._23 = 0f;
004401e3      SceneTool::m_viewMatrix._21 = 0f;
004401e8      SceneTool::m_viewMatrix._34 = 0f;
004401ed      SceneTool::m_viewMatrix._32 = 0f;
004401f2      SceneTool::m_viewMatrix._31 = 0f;
004401f7      SceneTool::m_viewMatrix._43 = 0f;
004401fc      SceneTool::m_viewMatrix._42 = 0f;
00440201      SceneTool::m_viewMatrix._41 = 0f;
00440206      SceneTool::m_viewMatrix._44 = 1f;
00440210      SceneTool::m_viewMatrix._33 = 1f;
0044021a      SceneTool::m_viewMatrix._22 = 1f;
00440224      SceneTool::m_viewMatrix._11 = 0x3f800000;
0044022e      SceneTool::m_projMatrix._14 = 0f;
00440233      SceneTool::m_projMatrix._13 = 0f;
00440238      SceneTool::m_projMatrix._12 = 0f;
0044023d      SceneTool::m_projMatrix._24 = 0f;
00440242      SceneTool::m_projMatrix._23 = 0f;
00440247      SceneTool::m_projMatrix._21 = 0f;
0044024c      SceneTool::m_projMatrix._34 = 0f;
00440251      SceneTool::m_projMatrix._32 = 0f;
00440256      SceneTool::m_projMatrix._31 = 0f;
0044025b      SceneTool::m_projMatrix._43 = 0f;
00440260      SceneTool::m_projMatrix._42 = 0f;
00440265      SceneTool::m_projMatrix._41 = 0f;
0044026a      SceneTool::m_projMatrix._44 = 1f;
00440274      SceneTool::m_projMatrix._33 = 1f;
0044027e      SceneTool::m_projMatrix._22 = 1f;
00440288      SceneTool::m_projMatrix._11 = 0x3f800000;
00440292      int32_t var_48 = 0x796910;
0044029a      uint32_t var_44 = 0;
0044029e      int32_t var_40 = 0x3f800000;
004402a6      int32_t var_3c = 0;
004402aa      int32_t var_38 = 0;
004402ae      int32_t var_34 = 0;
004402b2      int32_t var_c = 0;
004402b6      int32_t var_8 = 0;
004402ba      int32_t var_4 = 0;
004402be      Frame::cache(&var_40);
004402d1      SceneTool::m_WorldPosition.objcell_id = var_44;
004402d6      Frame::operator=(&SceneTool::m_WorldPosition.frame, &var_40);
004402e2      class RenderVertexBuffer* eax_1;
004402e2      
004402e2      if (SceneTool::CreateDefaultMaterial() != 0)
004402e2      {
004402ed          st_init = 1;
004402f4          void* eax_2 = operator new(0xb0);
004402fe          class RenderMesh* eax_3;
004402fe          
004402fe          if (eax_2 == 0)
00440309              eax_3 = nullptr;
004402fe          else
00440302              eax_3 = RenderMesh::RenderMesh(eax_2);
00440302          
0044030c          SceneTool::m_pCylinderMesh = eax_3;
0044030c          
0044031b          if (SceneTool::BuildCylinderMesh(eax_3) != 0)
0044031b          {
00440326              void* eax_4 = operator new(0xb0);
00440330              class RenderMesh* eax_5;
00440330              
00440330              if (eax_4 == 0)
0044033b                  eax_5 = nullptr;
00440330              else
00440334                  eax_5 = RenderMesh::RenderMesh(eax_4);
00440334              
0044033e              SceneTool::m_pSphereMesh = eax_5;
00440343              int80_t st0_1;
00440343              st0_1 = SceneTool::BuildSphereMesh(eax_5);
00440343              
0044034d              if (eax_1 != 0)
0044034d              {
0044035b                  eax_1 = RenderDevice::render_device->vtable->CreateVertexBuffer();
00440360                  SceneTool::m_pPrimVertexBuffer = eax_1;
00440365                  void __return;
00440365                  
00440365                  if ((((eax_1 != 0 && eax_1->vtable->Startup(3, 0x102, 0, 0, 0xffffffff) != 0) && DebugConsole::Create(&__return, (&SceneTool::m_pDebugConsole))->vtable >= 0) && ProfilerUI::Create(&__return, (&SceneTool::m_pProfilerUI))->vtable >= 0))
00440365                  {
004403c2                      Render::LinkRGRCallback(ArgumentParser::OnCommandLineEvaluationDone);
004403ca                      SceneTool::IdentityMatrices();
004403d9                      SceneTool::SetupCamera(Position::Position(&var_48));
004403ef                      SceneTool::m_ScreenShotWidth = 1;
004403f9                      SceneTool::m_ScreenShotHeight = 1;
00440403                      SceneTool::m_ScreenShotMinX = 0;
00440409                      SceneTool::m_ScreenShotMinY = 0;
0044040f                      SceneTool::m_ScreenShotMaxX = 9;
00440414                      SceneTool::m_ScreenShotMaxY = 9;
00440419                      PStringBase<char>::PStringBase<char>(&__return, "Number of horizontal screen shot…");
00440427                      void var_50;
00440427                      PStringBase<char>::PStringBase<char>(&var_50, "SceneTool.ScreenShotWidthScale");
00440441                      GlobalRegistry::RegisterVariableInternal(&SceneTool::m_ScreenShotWidth, GRVDataType_UInt32, &var_50, &__return, nullptr, 0, nullptr, nullptr);
0044044d                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
00440456                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00440464                      PStringBase<char>::PStringBase<char>(&var_50, "Number of vertical screen shot s…");
00440472                      PStringBase<char>::PStringBase<char>(&__return, "SceneTool.ScreenShotHeightScale");
0044048c                      GlobalRegistry::RegisterVariableInternal(&SceneTool::m_ScreenShotHeight, GRVDataType_UInt32, &__return, &var_50, nullptr, 0, nullptr, nullptr);
00440498                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004404a1                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
004404af                      PStringBase<char>::PStringBase<char>(&var_50, "Zero-based index of first horizo…");
004404bd                      PStringBase<char>::PStringBase<char>(&__return, "SceneTool.ScreenShotMinX");
004404d7                      GlobalRegistry::RegisterVariableInternal(&SceneTool::m_ScreenShotMinX, GRVDataType_UInt32, &__return, &var_50, nullptr, 0, nullptr, nullptr);
004404e3                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004404ec                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
004404fa                      PStringBase<char>::PStringBase<char>(&var_50, "Zero-based index of first vertic…");
00440508                      PStringBase<char>::PStringBase<char>(&__return, "SceneTool.ScreenShotMinY");
00440522                      GlobalRegistry::RegisterVariableInternal(&SceneTool::m_ScreenShotMinY, GRVDataType_UInt32, &__return, &var_50, nullptr, 0, nullptr, nullptr);
0044052e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00440537                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
00440545                      PStringBase<char>::PStringBase<char>(&var_50, "Zero-based index of last horizon…");
00440553                      PStringBase<char>::PStringBase<char>(&__return, "SceneTool.ScreenShotMaxX");
0044056d                      GlobalRegistry::RegisterVariableInternal(&SceneTool::m_ScreenShotMaxX, GRVDataType_UInt32, &__return, &var_50, nullptr, 0, nullptr, nullptr);
00440579                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00440582                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
00440590                      PStringBase<char>::PStringBase<char>(&var_50, "Zero-based index of last vertica…");
0044059e                      PStringBase<char>::PStringBase<char>(&__return, "SceneTool.ScreenShotMaxY");
004405b8                      GlobalRegistry::RegisterVariableInternal(&SceneTool::m_ScreenShotMaxY, GRVDataType_UInt32, &__return, &var_50, nullptr, 0, nullptr, nullptr);
004405c4                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004405cd                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
004405db                      PStringBase<char>::PStringBase<char>(&var_50, "Toggles drawing of UI objects");
004405e9                      PStringBase<char>::PStringBase<char>(&__return, "SceneTool.RenderUIObjects");
00440603                      GlobalRegistry::RegisterVariableInternal(&SceneTool::m_RenderUIObjects, GRVDataType_Bool, &__return, &var_50, nullptr, 0, nullptr, nullptr);
0044060f                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00440618                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
00440618                      
0044062a                      if (SceneTool::m_ScreenShotWidth > 0xa)
0044062c                          SceneTool::m_ScreenShotWidth = 0xa;
0044062c                      
00440637                      if (SceneTool::m_ScreenShotHeight > 0xa)
00440639                          SceneTool::m_ScreenShotHeight = 0xa;
00440639                      
0044063f                      int32_t eax_7;
0044063f                      eax_7 = 1;
00440645                      return 1;
00440365                  }
0044034d              }
0044031b          }
004402e2      }
004402e2      
00440647      eax_1 = 0;
0044064d      return 0;
00440130  }

0044064e                                            90 90                                                                ..

00440650  void __fastcall UISurface::UISurface(class UISurface* this)

00440650  {
00440654      this->m_cRef = 1;
0044065b      this->vtable = 0x7995b0;
00440661      __builtin_memset(&this->m_pLocalTexture, 0, 0x11);
00440670      this->m_nPhysicalWidth = 0;
00440673      this->m_nPhysicalHeight = 0;
00440676      this->m_IsInitialized = 0;
00440650  }

0044067a                                                                                90 90 90 90 90 90                            ......

00440680  uint8_t __fastcall UISurface::SetupVertexBuffer(class UISurface* this)

00440680  {
00440680      class UISurface* this_1 = this;
00440684      class RenderVertexBuffer* m_pVertexBuffer = this->m_pVertexBuffer;
00440684      
0044068c      if (m_pVertexBuffer != 0)
0044068c      {
0044068e          uint32_t m_cRef = m_pVertexBuffer->m_cRef;
0044068e          m_pVertexBuffer->m_cRef -= 1;
0044068e          
00440691          if (m_cRef == 1)
00440693              m_pVertexBuffer->vtable->__vecDelDtor(1);
00440693          
00440699          this->m_pVertexBuffer = nullptr;
0044068c      }
0044068c      
0044069c      class RenderVertexBuffer* eax_2 = RenderVertexBuffer::AllocateVertexBuffer();
004406ac      this->m_pVertexBuffer = eax_2;
004406b8      bool cond:0 = eax_2->vtable->Startup(4, 0x102, 1, 1, 0xffffffff) != 0;
004406ba      class RenderVertexBuffer* m_pVertexBuffer_1 = this->m_pVertexBuffer;
004406ba      
004406bd      if (!(cond:0))
004406bd      {
004406c1          if (m_pVertexBuffer_1 != 0)
004406c1          {
004406c3              uint32_t m_cRef_1 = m_pVertexBuffer_1->m_cRef;
004406c3              m_pVertexBuffer_1->m_cRef -= 1;
004406c3              
004406c6              if (m_cRef_1 == 1)
004406c8                  m_pVertexBuffer_1->vtable->__vecDelDtor(1);
004406c8              
004406ce              this->m_pVertexBuffer = nullptr;
004406c1          }
004406c1          
004406d6          return 0;
004406bd      }
004406bd      
004406de      int32_t* eax_6 = m_pVertexBuffer_1->vtable->Lock(0, m_pVertexBuffer_1->numVertices);
004406e4      class RenderTexture* m_pLocalTexture = this->m_pLocalTexture;
004406e7      int32_t edx_3 = (this->m_nPhysicalWidth - 1);
004406ee      long double x87_r7 = ((long double)edx_3);
004406ee      
004406f2      if (edx_3 < 0)
004406f4          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
004406f4      
00440700      int32_t edx_5 = (m_pLocalTexture->m_nWidth - 1);
00440707      long double x87_r6 = ((long double)edx_5);
00440707      
0044070b      if (edx_5 < 0)
0044070d          x87_r6 = (x87_r6 + ((long double)4.2949673e+09f));
0044070d      
00440716      long double x87_r7_1 = (x87_r7 / x87_r6);
00440718      int32_t edx_7 = (this->m_nPhysicalHeight - 1);
0044071f      long double x87_r6_1 = ((long double)edx_7);
0044071f      
00440723      if (edx_7 < 0)
00440725          x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
00440725      
00440731      int32_t ecx_3 = (m_pLocalTexture->m_nHeight - 1);
00440738      long double x87_r5 = ((long double)ecx_3);
00440738      
0044073c      if (ecx_3 < 0)
0044073e          x87_r5 = (x87_r5 + ((long double)4.2949673e+09f));
0044073e      
00440744      long double x87_r6_2 = (x87_r6_1 / x87_r5);
00440746      eax_6[1] = 0;
00440749      eax_6[3] = 0;
0044074c      eax_6[4] = 0;
00440754      *(uint32_t*)eax_6 = 0xbf000000;
0044075b      eax_6[2] = 0x3f000000;
0044075e      eax_6[5] = 0x3f000000;
00440761      eax_6[6] = 0;
00440764      eax_6[7] = 0x3f000000;
00440767      eax_6[9] = 0;
0044076f      eax_6[8] = ((float)x87_r7_1);
00440772      eax_6[0xa] = 0xbf000000;
00440775      eax_6[0xb] = 0;
00440778      eax_6[0xc] = 0xbf000000;
0044077b      eax_6[0xe] = ((float)x87_r6_2);
0044077e      eax_6[0xd] = 0;
00440783      eax_6[0xf] = 0x3f000000;
00440786      eax_6[0x10] = 0;
00440789      eax_6[0x11] = 0xbf000000;
0044078c      eax_6[0x12] = ((float)x87_r7_1);
0044078f      eax_6[0x13] = ((float)x87_r6_2);
00440792      this->m_pVertexBuffer->vtable->Unlock(1, 0);
0044079b      int32_t eax_7;
0044079b      eax_7 = 1;
0044079f      return 1;
00440680  }


004407a0  void __fastcall UISurface::DestroySurface(class UISurface* this)

004407a0  {
004407a7      class RenderTexture* m_pLocalTexture = this->m_pLocalTexture;
004407ae      this->m_IsInitialized = 0;
004407ae      
004407b1      if (m_pLocalTexture != 0)
004407b1      {
004407b4          uint32_t m_nHeight = m_pLocalTexture->m_nHeight;
004407bb          uint32_t m_nWidth = m_pLocalTexture->m_nWidth;
004407ce          void var_38;
004407ce          uint32_t eax_2 = ((uint32_t)*(uint8_t*)(PixelFormatDesc::PixelFormatDesc(&var_38, m_pLocalTexture->m_PixelFormat) + 0xc));
004407e4          UISurface::s_nBytesConsumed -= (((eax_2 * m_nHeight) * m_nWidth) >> 3);
004407b1      }
004407b1      
004407eb      class RenderTexture* m_pRemoteTexture = this->m_pRemoteTexture;
004407eb      
004407f0      if (m_pRemoteTexture != 0)
004407f0      {
004407fe          m_pRemoteTexture->m_LastManagedReleaseTime = ((double)(((long double)Timer::local_time) - ((long double)1000.0)));
00440801          class RenderTexture* m_pRemoteTexture_1 = this->m_pRemoteTexture;
00440801          
00440806          if (m_pRemoteTexture_1 != 0)
00440806          {
00440808              m_pRemoteTexture_1->vtable->Release();
0044080d              this->m_pRemoteTexture = nullptr;
00440806          }
004407f0      }
004407f0      
00440810      class RenderVertexBuffer* m_pVertexBuffer = this->m_pVertexBuffer;
00440810      
00440815      if (m_pVertexBuffer != 0)
00440815      {
00440817          uint32_t m_cRef = m_pVertexBuffer->m_cRef;
00440817          m_pVertexBuffer->m_cRef -= 1;
00440817          
0044081a          if (m_cRef == 1)
0044081c              m_pVertexBuffer->vtable->__vecDelDtor(1);
0044081c          
00440822          this->m_pVertexBuffer = nullptr;
00440815      }
00440815      
00440825      class RenderSurface* m_pLocalSurface = this->m_pLocalSurface;
00440825      
0044082a      if (m_pLocalSurface != 0)
0044082a      {
0044082c          m_pLocalSurface->vtable->Release();
00440831          this->m_pLocalSurface = nullptr;
0044082a      }
0044082a      
00440834      class RenderTexture* m_pLocalTexture_1 = this->m_pLocalTexture;
00440834      
00440839      if (m_pLocalTexture_1 != 0)
00440839      {
0044083b          m_pLocalTexture_1->vtable->Release();
00440840          this->m_pLocalTexture = nullptr;
00440839      }
004407a0  }

00440849                             90 90 90 90 90 90 90                                                           .......

00440850  uint8_t UISurface::GetBestWidthHeight(uint32_t const arg1, uint32_t const arg2, uint32_t* arg3, uint32_t* arg4, uint8_t const arg5)

00440850  {
00440850      uint32_t ecx;
00440850      uint32_t const var_4 = ecx;
00440856      ecx = RenderDevice::render_device->m_caps.bSimpleNonPowerOfTwoTextures;
00440856      
0044085b      if (ecx != 0)
0044085b      {
0044085d          class RenderDevice* eax;
0044085d          eax = arg5;
0044085d          
00440863          if (eax == 0)
00440863          {
00440871              *(uint32_t*)arg3 = arg1;
00440877              *(uint32_t*)arg4 = arg2;
00440879              uint32_t* eax_1;
00440879              eax_1 = 1;
0044087c              return 1;
00440863          }
0044085b      }
0044085b      
00440884      if (arg1 <= 0)
0044088a          *(uint32_t*)arg3 = 0;
00440884      else if (arg1 < 0x800)
00440897      {
004408a9          *(uint32_t*)arg3 = arg1;
004408b4          int32_t eflags_1;
004408b4          char eax_5;
004408b4          eax_5 = __bsr_gprv_memv(arg1);
004408c2          int32_t edx_3 = (1 << eax_5);
004408c2          
004408c6          if (*(uint32_t*)arg3 > edx_3)
004408cb              *(uint32_t*)arg3 = (edx_3 * 2);
00440897      }
00440897      else
0044089d          *(uint32_t*)arg3 = 0x800;
0044089d      
004408d3      if (arg2 <= 0)
004408d3      {
004408d9          *(uint32_t*)arg4 = 0;
004408e0          uint32_t const eax_7;
004408e0          eax_7 = 1;
004408e3          return 1;
004408d3      }
004408d3      
004408e9      if (arg2 >= 0x800)
004408e9      {
004408ef          *(uint32_t*)arg4 = 0x800;
004408f6          uint32_t* eax_8;
004408f6          eax_8 = 1;
004408f9          return 1;
004408e9      }
004408e9      
004408fe      *(uint32_t*)arg4 = arg2;
00440909      int32_t eflags_2;
00440909      char eax_10;
00440909      eax_10 = __bsr_gprv_memv(arg2);
00440917      int32_t edx_5 = (1 << eax_10);
00440917      
0044091b      if (*(uint32_t*)arg4 > edx_5)
00440920          *(uint32_t*)arg4 = (edx_5 * 2);
00440920      
00440923      uint32_t eax_11;
00440923      eax_11 = 1;
00440926      return 1;
00440850  }

00440927                       90 90 90 90 90 90 90 90 90                                                         .........

00440930  uint8_t UISurface::IsPowerOfTwo(uint32_t const arg1, uint32_t const arg2)

00440930  {
0044094b      uint32_t var_8 = 0;
00440953      int32_t var_4 = 0;
0044095b      UISurface::GetBestWidthHeight(arg1, arg2, &var_8, &var_4, 1);
0044095b      
0044096f      if ((arg1 == var_8 && arg2 == var_4))
0044097b          return 1;
0044097b      
00440983      return 0;
00440930  }

00440984              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00440990  uint8_t __thiscall UISurface::CreateSurface(class UISurface* this, uint32_t const arg2, uint32_t const arg3, uint32_t const arg4)

00440990  {
004409a2      class RenderDevice* eax;
004409a2      
004409a2      if (RenderDevice::render_device != 0)
004409a2      {
004409a8          eax = arg2;
004409a8          
004409d1          if ((eax <= 0x800 && (arg3 <= 0x800 && (eax != 0 && arg3 != 0))))
004409d1          {
004409d7              this->m_nPhysicalWidth = eax;
004409e2              this->m_nPhysicalHeight = arg3;
004409e9              uint32_t m_nPhysicalHeight = this->m_nPhysicalHeight;
004409ec              uint32_t m_nPhysicalWidth = this->m_nPhysicalWidth;
004409f4              uint32_t ecx;
004409f4              ecx = RenderDevice::render_device->m_caps.bSimpleNonPowerOfTwoTextures;
004409fe              uint32_t m_nPhysicalWidth_1;
004409fe              
004409fe              if (ecx == 0)
004409fe              {
00440a06                  if (m_nPhysicalWidth <= 0)
00440a08                      m_nPhysicalWidth_1 = 0;
00440a06                  else if (m_nPhysicalWidth < 0x800)
00440a12                  {
00440a1b                      m_nPhysicalWidth_1 = m_nPhysicalWidth;
00440a26                      int32_t eflags_1;
00440a26                      eax = __bsr_gprv_memv(m_nPhysicalWidth);
00440a2f                      int32_t esi_1 = (1 << eax);
00440a2f                      
00440a33                      if (m_nPhysicalWidth > esi_1)
00440a35                          m_nPhysicalWidth_1 = (esi_1 * 2);
00440a12                  }
00440a12                  else
00440a14                      m_nPhysicalWidth_1 = 0x800;
00440a14                  
00440a3a                  if (m_nPhysicalHeight <= 0)
00440a3c                      m_nPhysicalHeight = 0;
00440a3a                  else if (m_nPhysicalHeight < 0x800)
00440a46                  {
00440a58                      int32_t eflags_2;
00440a58                      eax = __bsr_gprv_memv(m_nPhysicalHeight);
00440a61                      int32_t edx_2 = (1 << eax);
00440a61                      
00440a65                      if (m_nPhysicalHeight > edx_2)
00440a67                          m_nPhysicalHeight = (edx_2 * 2);
00440a46                  }
00440a46                  else
00440a48                      m_nPhysicalHeight = 0x800;
004409fe              }
004409fe              else
00440a00                  m_nPhysicalWidth_1 = m_nPhysicalWidth;
00440a00              
00440a74              if ((m_nPhysicalWidth_1 > 0 && m_nPhysicalHeight > 0))
00440a74              {
00440a89                  enum PixelFormatID esi_2 = RenderDevice::GetUISurfaceFormat(RenderDevice::render_device);
00440a8b                  this->m_bHasAlpha = 0;
00440a8b                  
00440a93                  if ((arg4 & 1) != 0)
00440a93                  {
00440a99                      this->m_bHasAlpha = 1;
00440aa7                      esi_2 = RenderDevice::GetUISurfaceFormat(RenderDevice::render_device);
00440a93                  }
00440a93                  
00440ab8                  this->m_pLocalTexture = RenderDevice::render_device->vtable->CreateTexture();
00440abf                  class RenderTexture* m_pLocalTexture_1 = this->m_pLocalTexture;
00440abf                  
00440ac4                  if ((m_pLocalTexture_1 != 0 && m_pLocalTexture_1->vtable->Create2D(m_nPhysicalWidth_1, m_nPhysicalHeight, 1, esi_2, 2) != 0))
00440ac4                  {
00440aea                      void* eax_9 = this->m_pLocalTexture->vtable->GetLevelRef(0, 0);
00440aef                      class RenderSurface* eax_10;
00440aef                      
00440aef                      if (eax_9 == 0)
00440af6                          eax_10 = nullptr;
00440aef                      else
00440af1                          eax_10 = ((char*)eax_9 - 0x30);
00440af1                      
00440afc                      this->m_pLocalSurface = eax_10;
00440afc                      
00440b08                      if ((this->m_pLocalSurface != 0 && UISurface::SetupVertexBuffer(this) != 0))
00440b08                      {
00440b17                          this->m_pLocalSurface->m_IsDirty = 1;
00440b24                          class RenderTexture* m_pLocalTexture = this->m_pLocalTexture;
00440b27                          uint32_t m_nWidth = m_pLocalTexture->m_nWidth;
00440b2d                          uint32_t m_nHeight = m_pLocalTexture->m_nHeight;
00440b40                          void var_38;
00440b40                          uint32_t eax_14 = ((uint32_t)*(uint8_t*)(PixelFormatDesc::PixelFormatDesc(&var_38, m_pLocalTexture->m_PixelFormat) + 0xc));
00440b5b                          UISurface::s_nBytesConsumed += (((eax_14 * m_nWidth) * m_nHeight) >> 3);
00440b62                          this->m_IsInitialized = 1;
00440b65                          uint32_t eax_17;
00440b65                          eax_17 = 1;
00440b6b                          return 1;
00440b08                      }
00440ac4                  }
00440a74              }
004409d1          }
004409a2      }
004409a2      
00440b71      eax = 0;
00440b77      return 0;
00440990  }

00440b7a                                                                                90 90 90 90 90 90                            ......

00440b80  uint8_t __fastcall UISurface::PrepareSurface(class UISurface* this)

00440b80  {
00440b81      class UISurface* this_1 = this;
00440b83      class RenderDevice* eax;
00440b83      eax = this_1->m_IsInitialized;
00440b83      
00440b91      if ((eax != 0 && RenderDevice::render_device != 0))
00440b91      {
00440b96          this = this_1->m_pLocalTexture->m_caps.MaxSimultaneousRenderTargets;
00440b96          
00440b9b          if (this == 0)
00440ba0              eax = this_1->m_pLocalSurface->m_bIsLost;
00440ba0          
00440ba5          bool cond:0_1;
00440ba5          
00440ba5          if ((this != 0 || eax != 0))
00440ba5          {
00440ba8              int32_t ebx;
00440ba8              ebx = this_1->m_bHasAlpha;
00440bac              uint32_t m_nPhysicalHeight = this_1->m_nPhysicalHeight;
00440bb0              uint32_t m_nPhysicalWidth = this_1->m_nPhysicalWidth;
00440bb5              UISurface::DestroySurface(this_1);
00440bbe              uint32_t edx_1;
00440bbe              edx_1 = ebx != 0;
00440bcb              cond:0_1 = UISurface::CreateSurface(this_1, m_nPhysicalWidth, m_nPhysicalHeight, edx_1) == 0;
00440ba5          }
00440ba5          
00440bd0          if (((this == 0 && eax == 0) || !(cond:0_1)))
00440bd0          {
00440bd2              eax = 1;
00440bd5              return 1;
00440bd0          }
00440b91      }
00440b91      
00440bd6      eax = 0;
00440bd9      return 0;
00440b80  }

00440bda                                                                                90 90 90 90 90 90                            ......

00440be0  void* __thiscall UISurface::`scalar deleting destructor'(class UISurface* this, uint32_t arg2)

00440be0  {
00440be3      this->vtable = 0x7995b0;
00440be9      UISurface::DestroySurface(this);
00440bf3      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00440bf3      
00440bf9      if ((arg2 & 1) != 0)
00440bfc          operator delete(this);
00440bfc      
00440c07      return this;
00440be0  }

00440c0a                                90 90 90 90 90 90                                                            ......

00440c10  uint8_t __thiscall UISurface::Resize(class UISurface* this, uint32_t const arg2, uint32_t const arg3)

00440c10  {
00440c3a      if ((this->m_IsInitialized != 0 && (arg2 <= 0x800 && (arg3 <= 0x800 && (arg2 != 0 && arg3 != 0)))))
00440c3a      {
00440c44          if ((arg2 == this->m_nPhysicalWidth && arg3 == this->m_nPhysicalHeight))
00440ca7              return 1;
00440ca7          
00440c46          class RenderTexture* m_pLocalTexture = this->m_pLocalTexture;
00440c46          
00440c57          if ((arg2 >= m_pLocalTexture->m_nWidth || arg3 >= m_pLocalTexture->m_nHeight))
00440c57          {
00440c73              int32_t ebx;
00440c73              ebx = this->m_bHasAlpha;
00440c78              UISurface::DestroySurface(this);
00440c81              uint32_t eax_1;
00440c81              eax_1 = ebx != 0;
00440c81              
00440c91              if (UISurface::CreateSurface(this, arg2, arg3, eax_1) != 0)
00440ca7                  return 1;
00440ca7              
00440c95              UISurface::DestroySurface(this);
00440c9c              int32_t eax_2;
00440c9c              eax_2 = 0;
00440c9f              return 0;
00440c57          }
00440c57          
00440c5b          this->m_nPhysicalWidth = arg2;
00440c5e          this->m_nPhysicalHeight = arg3;
00440c5e          
00440c68          if (UISurface::SetupVertexBuffer(this) != 0)
00440ca7              return 1;
00440c3a      }
00440c3a      
00440c6f      return 0;
00440c10  }

00440caa                                90 90 90 90 90 90                                                            ......

00440cb0  uint8_t __fastcall UISurface::RefreshHardware(class UISurface* this)

00440cb0  {
00440cb4      class RenderSurface* m_pLocalSurface;
00440cb4      m_pLocalSurface = this->m_IsInitialized;
00440cb4      
00440cbb      if ((m_pLocalSurface != 0 && UISurface::PrepareSurface(this) != 0))
00440cbb      {
00440cce          m_pLocalSurface = this->m_pLocalSurface;
00440cce          
00440cdc          if ((m_pLocalSurface != 0 && this->m_pLocalTexture != 0))
00440cdc          {
00440ce8              if (m_pLocalSurface->m_IsDirty == 0)
00440ce8              {
00440d8f                  m_pLocalSurface = 1;
00440d92                  return 1;
00440ce8              }
00440ce8              
00440cee              class RenderTexture* m_pRemoteTexture = this->m_pRemoteTexture;
00440cee              
00440cf3              if (m_pRemoteTexture != 0)
00440cf3              {
00440cf8                  if (m_pRemoteTexture->m_bIsLost == 0)
00440cf8                      goto label_440d7e;
00440cf8                  
00440cfc                  if (m_pRemoteTexture != 0)
00440cfc                  {
00440d0a                      m_pRemoteTexture->m_LastManagedReleaseTime = ((double)(((long double)Timer::local_time) - ((long double)1000.0)));
00440d0d                      class RenderTexture* m_pRemoteTexture_1 = this->m_pRemoteTexture;
00440d0d                      
00440d12                      if (m_pRemoteTexture_1 != 0)
00440d12                      {
00440d14                          m_pRemoteTexture_1->vtable->Release();
00440d19                          this->m_pRemoteTexture = nullptr;
00440d12                      }
00440cfc                  }
00440cfc                  
00440cfc                  goto label_440d24;
00440cf3              }
00440cf3              
00440d24          label_440d24:
00440d24              m_pLocalSurface = RenderDevice::render_device->vtable->CreateTexture();
00440d29              this->m_pRemoteTexture = m_pLocalSurface;
00440d29              
00440d2c              if (m_pLocalSurface != 0)
00440d2c              {
00440d2e                  class RenderTexture* m_pLocalTexture = this->m_pLocalTexture;
00440d52                  bool cond:1_1 = m_pLocalSurface->vtable->Create(m_pLocalTexture->m_nWidth, m_pLocalTexture->m_nHeight, m_pLocalTexture->m_nNumLevels, m_pLocalTexture->m_PixelFormat, 0) != 0;
00440d54                  class RenderTexture* m_pRemoteTexture_2 = this->m_pRemoteTexture;
00440d54                  
00440d59                  if (cond:1_1)
00440d59                  {
00440d72                      m_pRemoteTexture_2->m_AllowManagement = 0;
00440d7e                  label_440d7e:
00440d7e                      
00440d83                      if (this->m_pRemoteTexture->vtable->LoadTexture(this->m_pLocalTexture) != 0)
00440d83                      {
00440d85                          this->m_pLocalSurface->m_IsDirty = 0;
00440d8f                          m_pLocalSurface = 1;
00440d92                          return 1;
00440d83                      }
00440d59                  }
00440d59                  else if (m_pRemoteTexture_2 != 0)
00440d5d                  {
00440d5f                      m_pRemoteTexture_2->vtable->Release();
00440d64                      this->m_pRemoteTexture = nullptr;
00440d5d                  }
00440d2c              }
00440cdc          }
00440cbb      }
00440cbb      
00440d6c      m_pLocalSurface = 0;
00440d6f      return 0;
00440cb0  }

00440d93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00440da0  uint8_t __fastcall SurfaceWindow::End(class SurfaceWindow* this)

00440da0  {
00440da5      uint32_t eax;
00440da5      eax = this->lockCount == 0;
00440da8      return eax;
00440da0  }

00440da9                             90 90 90 90 90 90 90                                                           .......

00440db0  void __thiscall SurfaceWindow::Attach(class SurfaceWindow* this, class RenderSurface* arg2, struct tagRECT const* arg3)

00440db0  {
00440dbc      this->surface = arg2;
00440dc1      this->parent = nullptr;
00440dc6      this->rect.left = arg3->left;
00440dc6      this->rect.top = arg3->top;
00440dc6      this->rect.right = arg3->right;
00440dc6      this->rect.bottom = arg3->bottom;
00440dc6      
00440de1      if (this->rect.left < 0)
00440dc6          this->rect.left = 0;
00440dc6      
00440de8      if (this->rect.top < 0)
00440dea          this->rect.top = 0;
00440dea      
00440ded      uint32_t width = arg2->width;
00440ded      
00440df6      if (this->rect.right > width)
00440df8          this->rect.right = width;
00440df8      
00440dfb      uint32_t height = arg2->height;
00440dfb      
00440e04      if (this->rect.bottom > height)
00440e06          this->rect.bottom = height;
00440e06      
00440e13      if (this->rect.right < 1)
00440e15          this->rect.right = 1;
00440e15      
00440e1b      if (this->rect.bottom < 1)
00440e1d          this->rect.bottom = 1;
00440e1d      
00440e22      int32_t right = this->rect.right;
00440e22      
00440e2b      if (this->rect.left >= right)
00440dc6          this->rect.left = (right - 1);
00440dc6      
00440e30      int32_t bottom = this->rect.bottom;
00440e30      
00440e36      if (this->rect.top >= bottom)
00440e39          this->rect.top = (bottom - 1);
00440db0  }

00440e3f                                                                                               90                                 .

00440e40  void __thiscall SurfaceWindow::Attach(class SurfaceWindow* this, class RenderSurface* arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6)

00440e40  {
00440e4b      uint32_t const var_10 = arg3;
00440e53      uint32_t const var_c = arg4;
00440e5d      int32_t var_8 = (arg5 + 1);
00440e65      int32_t var_4 = (arg6 + 1);
00440e6f      SurfaceWindow::Attach(this, arg2, &var_10);
00440e40  }

00440e7a                                                                                90 90 90 90 90 90                            ......

00440e80  void __thiscall SurfaceWindow::Attach(class SurfaceWindow* this, class SurfaceWindow* arg2, struct tagRECT const* arg3)

00440e80  {
00440e88      int32_t top = arg3->top;
00440e90      int32_t left = arg2->rect.left;
00440e98      int32_t var_10 = (arg3->left + left);
00440e9c      int32_t top_1 = arg2->rect.top;
00440ea1      int32_t var_c = (top + top_1);
00440eb3      int32_t var_4 = (arg3->bottom + top_1);
00440ebc      int32_t var_8 = (arg3->right + left);
00440ec0      SurfaceWindow::Attach(this, arg2->surface, &var_10);
00440ec6      this->parent = arg2;
00440e80  }

00440ed1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00440ee0  void __thiscall SurfaceWindow::WindowToClip(class SurfaceWindow const* this, int32_t const arg2, int32_t const arg3, float* arg4, float* arg5)

00440ee0  {
00440ee4      class RenderSurface* surface = this->surface;
00440f0b      RenderDeviceD3D::TransformPixelToClipPoint((this->rect.left + arg2), (this->rect.top + arg3), surface->width, surface->height, arg4, arg5);
00440ee0  }

00440f16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00440f20  uint8_t __thiscall SurfaceWindow::Lock(class SurfaceWindow* this, uint8_t const arg2)

00440f20  {
00440f24      class RenderSurface* surface = this->surface;
00440f2a      uint32_t eax;
00440f2a      
00440f2a      if (surface != 0)
00440f2a      {
00440f30          eax = this->lockCount;
00440f35          int32_t ebx;
00440f35          
00440f35          if (eax <= 0)
00440f35          {
00440f5a              eax = this->parent;
00440f5a              
00440f5f              if (eax != 0)
00440f5f              {
00440f68                  SurfaceWindow::Lock(eax, arg2);
00440f70                  uint32_t ecx_3 = (this->lockCount + 1);
00440f76                  this->writable = arg2 == 0;
00440f79                  class SurfaceWindow* parent = this->parent;
00440f7c                  this->lockCount = ecx_3;
00440f88                  int32_t ecx_5 = (this->rect.left - parent->rect.left);
00440f8d                  int32_t edi_3 = (this->rect.top - parent->rect.top);
00440f94                  this->data = parent->data;
00440f9a                  this->pitch = parent->pitch;
00440f9a                  
00440f9d                  if (ecx_5 != 0)
00440f9d                  {
00440faf                      int32_t eax_5;
00440faf                      int32_t edx_5;
00440faf                      edx_5 = HIGHD(((int64_t)(((uint32_t)this->surface->pfDesc.bitsPerPixel) * ecx_5)));
00440faf                      eax_5 = LOWD(((int64_t)(((uint32_t)this->surface->pfDesc.bitsPerPixel) * ecx_5)));
00440fba                      this->data += ((eax_5 + (edx_5 & 7)) >> 3);
00440f9d                  }
00440f9d                  
00440fbf                  if (edi_3 == 0)
00440fbf                  {
00441015                      eax = 1;
00441018                      return 1;
00440fbf                  }
00440fbf                  
00440fcd                  this->data += (this->pitch * edi_3);
00440fd1                  int32_t eax_8;
00440fd1                  eax_8 = 1;
00440fd4                  return 1;
00440f5f              }
00440f5f              
00440fd7              eax = surface->locked;
00440fd7              
00440fdf              if (eax == 0)
00440fdf              {
00440fe1                  ebx = arg2;
00440fef                  int32_t* eax_10;
00440fef                  eax_10 = ebx;
00440ff1                  char temp1_1 = eax_10;
00440ff1                  eax_10 = -(eax_10);
00440ff1                  
00441002                  if (surface->vtable->Lock(&this->rect, (((char*)eax_10 - eax_10) & 2), &this->pitch, &this->data) != 0)
00441002                  {
0044100a                      this->lockCount += 1;
0044100d                      uint32_t ecx_11;
0044100d                      ecx_11 = ebx == 0;
00441010                      this->writable = ecx_11;
00441015                      eax = 1;
00441018                      return 1;
00441002                  }
00440fdf              }
00440f35          }
00440f35          else
00440f35          {
00440f37              ebx = arg2;
00440f43              int32_t ecx;
00440f43              ecx = ebx == 0;
00440f43              
00440f48              if (ecx == ((uint32_t)this->writable))
00440f48              {
00440f50                  this->lockCount = (eax + 1);
00440f54                  uint32_t eax_1;
00440f54                  eax_1 = 1;
00440f57                  return 1;
00440f48              }
00440f35          }
00440f2a      }
00440f2a      
0044101d      eax = 0;
00441020      return 0;
00440f20  }

00441023           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00441030  uint8_t __fastcall SurfaceWindow::Unlock(class SurfaceWindow* this)

00441030  {
00441031      class SurfaceWindow* this_1 = this;
00441033      class RenderSurface* surface = this_1->surface;
00441038      uint32_t lockCount;
00441038      
00441038      if (surface != 0)
00441038      {
0044103a          lockCount = this_1->lockCount;
0044103a          
0044103f          if (lockCount > 0)
0044103f          {
00441041              this = surface->locked;
00441041              
00441049              if (this != 0)
00441049              {
0044104b                  class SurfaceWindow* parent = this_1->parent;
0044104b                  
00441050                  if (parent == 0)
00441050                  {
00441061                      lockCount = this_1->writable;
00441061                      
00441066                      if (lockCount != 0)
00441068                          surface->m_IsDirty = 1;
00441068                      
0044106f                      uint32_t lockCount_1 = this_1->lockCount;
0044106f                      this_1->lockCount -= 1;
0044106f                      
00441072                      if (lockCount_1 == 1)
00441074                          this_1->surface->vtable->Unlock();
00441050                  }
00441050                  else
00441050                  {
00441055                      this_1->lockCount = (lockCount - 1);
00441055                      
00441058                      if (lockCount == 1)
0044105a                          SurfaceWindow::Unlock(parent);
00441050                  }
00441050                  
00441081                  if (this_1->lockCount == 0)
00441081                  {
00441083                      this_1->pitch = 0;
0044108a                      this_1->data = nullptr;
00441091                      this_1->writable = 0;
00441081                  }
00441081                  
00441095                  uint32_t eax_2;
00441095                  eax_2 = 1;
00441098                  return 1;
00441049              }
0044103f          }
00441038      }
00441038      
00441099      lockCount = 0;
0044109c      return 0;
00441030  }

0044109d                                                                                         90 90 90                               ...

004410a0  uint8_t __thiscall SurfaceWindowLocker::Lock(class SurfaceWindowLocker* this, uint8_t arg2)

004410a0  {
004410a3      uint8_t m_bLocked = this->m_bLocked;
004410a3      
004410a8      if (m_bLocked != 0)
004410ad          return 1;
004410ad      
004410b0      class SurfaceWindow* m_pSurface = this->m_pSurface;
004410b0      
004410b4      if (m_pSurface != 0)
004410b4      {
004410bb          m_bLocked = SurfaceWindow::Lock(m_pSurface, arg2);
004410bb          
004410c2          if (m_bLocked != 0)
004410c2          {
004410c9              this->m_bLocked = 1;
004410cd              return m_bLocked;
004410c2          }
004410b4      }
004410b4      
004410d2      this->m_bLocked = 0;
004410d6      return m_bLocked;
004410a0  }

004410d9                                                                             90 90 90 90 90 90 90                           .......

004410e0  uint8_t __thiscall SurfaceWindow::CopyAlpha(class SurfaceWindow* this, class SurfaceWindow const* arg2)

004410e0  {
004410e9      if ((this != 0 && SurfaceWindow::Lock(this, 0) != 0))
004410e9      {
00441104          if ((arg2 != 0 && SurfaceWindow::Lock(arg2, 1) != 0))
00441104          {
0044111b              class RenderSurface* surface = this->surface;
00441120              int32_t ecx_1;
00441120              
00441120              if (surface == 0)
00441140                  ecx_1 = 0xffffffff;
00441120              else
00441120              {
00441122                  enum PixelFormatID format = surface->pfDesc.format;
00441122                  
0044112b                  if (format == PFID_A8R8G8B8)
00441139                      ecx_1 = 2;
0044112b                  else if (format != PFID_A8)
00441140                      ecx_1 = 0xffffffff;
00441130                  else
00441132                      ecx_1 = 1;
00441120              }
00441120              
00441149              int32_t pitch_1 = this->pitch;
0044114d              class RenderSurface* surface_1 = arg2->surface;
00441152              int32_t var_14_1 = ecx_1;
00441156              void* data = this->data;
0044115a              int32_t eax_3;
0044115a              
0044115a              if (surface_1 == 0)
0044117a                  eax_3 = 0xffffffff;
0044115a              else
0044115a              {
0044115c                  enum PixelFormatID format_1 = surface_1->pfDesc.format;
0044115c                  
00441165                  if (format_1 == PFID_A8R8G8B8)
00441173                      eax_3 = 2;
00441165                  else if (format_1 != PFID_A8)
0044117a                      eax_3 = 0xffffffff;
0044116a                  else
0044116c                      eax_3 = 1;
0044115a              }
0044115a              
00441183              int32_t pitch = arg2->pitch;
00441187              void* data_1 = arg2->data;
0044118a              int32_t var_20 = eax_3;
0044118e              void* data_2 = data_1;
0044118e              
00441197              if ((ecx_1 != 0xffffffff && eax_3 != 0xffffffff))
00441197              {
004411a2                  int32_t edx_4 = (arg2->rect.right - arg2->rect.left);
004411a7                  int32_t ecx_4 = (arg2->rect.bottom - arg2->rect.top);
004411ad                  int32_t eax_6 = (this->rect.bottom - this->rect.top);
004411b2                  int32_t var_8 = edx_4;
004411b6                  int32_t var_4 = ecx_4;
004411b6                  
004411ba                  if (ecx_4 > eax_6)
004411bc                      int32_t var_4_1 = eax_6;
004411bc                  
004411c6                  int32_t eax_8 = (this->rect.right - this->rect.left);
004411c6                  
004411cb                  if (edx_4 > eax_8)
004411cd                      int32_t var_8_1 = eax_8;
004411cd                  
004411d6                  AlphaConvert(&var_20);
004411e0                  SurfaceWindow::Unlock(arg2);
004411e7                  SurfaceWindow::Unlock(this);
004411ed                  int32_t eax_9;
004411ed                  eax_9 = 1;
004411f3                  return 1;
00441197              }
00441197              
004411f8              SurfaceWindow::Unlock(arg2);
00441104          }
00441104          
004411ff          SurfaceWindow::Unlock(this);
004410e9      }
004410e9      
0044120b      return 0;
004410e0  }

0044120e                                            90 90                                                                ..

00441210  uint8_t __thiscall SurfaceWindow::DrawLine(class SurfaceWindow* this, class RGBAColor const* arg2, int32_t const arg3, int32_t const arg4, int32_t const arg5, int32_t const arg6)

00441210  {
0044121b      int32_t const ebp = arg3;
00441224      int32_t eax_1 = (this->rect.right - this->rect.left);
00441227      int32_t edx_1 = (this->rect.bottom - this->rect.top);
00441227      
00441247      if ((((ebp <= eax_1 || arg5 <= eax_1) && (ebp >= 0 || arg5 >= 0)) && ((arg4 <= edx_1 || arg6 <= edx_1) && (arg4 >= 0 || arg6 >= 0))))
00441247      {
00441265          uint32_t eax_2 = RGBAColor::GetColor32(arg2);
00441275          class RenderSurface* eax_3;
00441275          eax_3 = this->surface->pfDesc.bitsPerPixel;
0044127b          eax_3 u>>= 3;
00441280          arg3 = eax_3;
00441280          
0044128b          if (SurfaceWindow::Lock(this, 0) != 0)
0044128b          {
0044129d              void* data = this->data;
004412a2              int32_t eax_5 = (arg5 - ebp);
004412a2              
004412a8              if ((arg5 - ebp) < 0)
004412b4                  arg5 = (ebp - arg5);
004412a8              else
004412aa                  arg5 = eax_5;
004412aa              
004412ba              int32_t ecx_6 = (arg6 - arg4);
004412bc              int32_t edx_2;
004412bc              
004412bc              if ((arg6 - arg4) < 0)
004412c4                  edx_2 = (arg4 - arg6);
004412bc              else
004412be                  edx_2 = ecx_6;
004412be              
004412ca              int32_t esi_3 = (arg5 - edx_2);
004412ca              
004412d2              if (eax_5 <= 0)
004412d2              {
004412e2                  int32_t edx_4;
004412e2                  edx_4 = eax_5 < 0;
004412e7                  arg6 = -(edx_4);
004412d2              }
004412d2              else
004412d4                  arg6 = 1;
004412d4              
004412f1              if (ecx_6 <= 0)
004412f1              {
00441301                  int32_t eax_6;
00441301                  eax_6 = ecx_6 < 0;
00441306                  arg2 = -(eax_6);
004412f1              }
004412f1              else
004412f3                  arg2 = 1;
004412f3              
0044130a              int32_t const edi_2 = arg5;
00441310              int32_t const ecx_7 = ebp;
00441312              int32_t const eax_8 = arg4;
00441312              
00441314              if (edi_2 < edx_2)
00441314              {
0044137a                  arg4 = edx_2;
0044137e                  int32_t const edi_6 = edi_2;
0044137e                  
00441392                  while (true)
00441392                  {
00441392                      if ((ecx_7 >= 0 && (eax_8 >= 0 && (ecx_7 < eax_1 && eax_8 < edx_1))))
00441392                      {
004413b0                          *(uint32_t*)((this->pitch * eax_8) + ((char*)data + (((uint32_t)arg3) * ecx_7))) = eax_2;
004413b3                          edi_6 = arg5;
00441392                      }
00441392                      
004413b9                      if (esi_3 >= 0)
004413b9                      {
004413bb                          ecx_7 += arg6;
004413bf                          int32_t temp3_1 = esi_3;
004413bf                          esi_3 -= edx_2;
004413bf                          
004413c1                          if ((temp3_1 - edx_2) >= 0)
004413c1                              continue;
004413b9                      }
004413b9                      
004413ca                      bool cond:5_1 = arg4 == 0;
004413cc                      arg4 -= 1;
004413cc                      
004413d0                      if (cond:5_1)
004413d0                          break;
004413d0                      
004413d2                      eax_8 += arg2;
004413d6                      esi_3 += edi_6;
00441392                  }
00441314              }
00441314              else
00441314              {
00441316                  arg4 = edi_2;
00441316                  
00441332                  while (true)
00441332                  {
00441332                      if ((ecx_7 >= 0 && (eax_8 >= 0 && (ecx_7 < eax_1 && eax_8 < edx_1))))
00441332                      {
00441350                          *(uint32_t*)((this->pitch * eax_8) + ((char*)data + (((uint32_t)arg3) * ecx_7))) = eax_2;
00441353                          edi_2 = arg5;
00441332                      }
00441332                      
00441359                      if (esi_3 >= 0)
00441359                      {
00441362                          bool cond:6_1 = arg4 == 0;
00441364                          arg4 -= 1;
00441364                          
00441368                          if (cond:6_1)
00441368                              break;
00441368                          
0044136a                          ecx_7 += arg6;
0044136e                          int32_t temp4_1 = esi_3;
0044136e                          esi_3 -= edx_2;
0044136e                          
00441370                          if ((temp4_1 - edx_2) >= 0)
00441370                              continue;
00441359                      }
00441359                      
00441372                      eax_8 += arg2;
00441376                      esi_3 += edi_2;
00441332                  }
00441314              }
00441314              
004413de              SurfaceWindow::Unlock(this);
004413e6              int32_t eax_9;
004413e6              eax_9 = 1;
004413ec              return 1;
0044128b          }
00441247      }
00441247      
00441290      eax_1 = 0;
00441296      return 0;
00441210  }

004413ef                                               90                                                                 .

004413f0  uint8_t __thiscall SurfaceWindow::DrawBox(class SurfaceWindow* this, class RGBAColor const* arg2, int32_t const arg3, int32_t const arg4, int32_t const arg5, int32_t const arg6)

004413f0  {
0044140c      uint8_t result = SurfaceWindow::DrawLine(this, arg2, arg3, arg4, arg5, arg4);
0044140c      
00441413      if (result == 0)
00441418          return result;
00441418      
00441432      if ((SurfaceWindow::DrawLine(this, arg2, arg3, arg6, arg5, arg6) != 0 && SurfaceWindow::DrawLine(this, arg2, arg3, arg4, arg3, arg6) != 0))
0044146e          return SurfaceWindow::DrawLine(this, arg2, arg5, arg4, arg5, arg6) != 0;
0044146e      
0044143a      return 0;
004413f0  }

00441471                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00441480  void __convention("regparm") CreateCharRectPair(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, int32_t arg8, int32_t arg9, int32_t arg10, struct tagRECT* arg11, struct tagRECT* arg12)

00441480  {
00441492      int32_t edx;
00441492      *(uint32_t*)arg9 = (arg1 - edx);
0044149f      *(uint32_t*)(arg9 + 4) = (arg2 - arg8);
004414ae      *(uint32_t*)(arg9 + 8) = ((arg1 + arg3) + edx);
004414b9      *(uint32_t*)(arg9 + 0xc) = ((arg2 + arg4) + arg8);
004414c8      int32_t ebx;
004414c8      *(uint32_t*)(arg10 + 4) = (ebx - arg8);
004414d3      *(uint32_t*)(arg10 + 8) = ((arg3 + arg5) + edx);
004414dc      int32_t esi_7 = (arg5 - edx);
004414e2      *(uint32_t*)arg10 = esi_7;
004414e4      *(uint32_t*)(arg10 + 0xc) = ((arg4 + ebx) + edx);
004414e4      
004414e7      if (esi_7 < 0)
004414e7      {
004414e9          *(uint32_t*)arg9 -= esi_7;
004414eb          *(uint32_t*)arg10 = 0;
004414e7      }
004414e7      
004414f1      int32_t edx_1 = *(uint32_t*)(arg10 + 4);
004414f1      
004414f6      if (edx_1 < 0)
004414f6      {
004414f8          *(uint32_t*)(arg9 + 4) -= edx_1;
004414fb          *(uint32_t*)(arg10 + 4) = 0;
004414f6      }
004414f6      
00441502      int32_t esi_8 = *(uint32_t*)(arg10 + 8);
00441502      
0044150b      if (esi_8 > arg6)
0044150b      {
00441511          *(uint32_t*)(arg9 + 8) += (arg6 - esi_8);
00441514          *(uint32_t*)(arg10 + 8) = arg6;
0044150b      }
0044150b      
00441517      int32_t esi_9 = *(uint32_t*)(arg10 + 0xc);
00441517      
00441520      if (esi_9 > arg7)
00441520      {
00441526          *(uint32_t*)(arg9 + 0xc) += (arg7 - esi_9);
00441529          *(uint32_t*)(arg10 + 0xc) = arg7;
00441520      }
00441480  }


00441530  uint8_t __thiscall SurfaceWindow::ReplaceColor(class SurfaceWindow* this, class RGBAColor const* arg2, class RGBAColor const* arg3)

00441530  {
00441535      uint8_t result = SurfaceWindow::Lock(this, 0);
00441535      
0044153c      if (result == 0)
0044153f          return result;
0044153f      
0044154b      int32_t ebx_1 = (this->rect.right - this->rect.left);
00441557      arg2 = RGBAColor::GetColor32(arg2);
0044155b      uint32_t eax_1 = RGBAColor::GetColor32(arg3);
00441563      int32_t edi_1 = (this->rect.bottom - this->rect.top);
00441566      int32_t edi_2 = (edi_1 - 1);
0044156b      void* data = this->data;
0044156b      
0044156e      if ((edi_1 - 1) >= 0)
0044156e      {
00441594          int32_t temp2_1;
00441594          
00441594          do
00441594          {
00441578              int32_t edx_1 = (ebx_1 - 1);
0044157a              void* ecx_4 = ((this->pitch * edi_2) + data);
0044157a              
0044157e              if (edx_1 >= 0)
0044157e              {
00441591                  int32_t temp3_1;
00441591                  
00441591                  do
00441591                  {
00441587                      if (*(uint32_t*)((char*)ecx_4 + (edx_1 << 2)) == arg2)
0044158d                          *(uint32_t*)((char*)ecx_4 + (edx_1 << 2)) = eax_1;
0044158d                      
00441590                      temp3_1 = edx_1;
00441590                      edx_1 -= 1;
00441591                  } while ((temp3_1 - 1) >= 0);
0044157e              }
0044157e              
00441593              temp2_1 = edi_2;
00441593              edi_2 -= 1;
00441594          } while ((temp2_1 - 1) >= 0);
0044156e      }
0044156e      
00441599      SurfaceWindow::Unlock(this);
004415a0      int32_t eax_2;
004415a0      eax_2 = 1;
004415a3      return 1;
00441530  }

004415a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004415b0  uint8_t __thiscall SurfaceWindow::ReplaceColor(class SurfaceWindow* this, class RGBAColor const* arg2, class SurfaceWindow const* arg3)

004415b0  {
004415b5      class SurfaceWindow* ebp = arg3;
004415b5      
004415e1      if ((((ebp->rect.right - ebp->rect.left) >= (this->rect.right - this->rect.left) && (ebp->rect.bottom - ebp->rect.top) >= (this->rect.bottom - this->rect.top)) && SurfaceWindow::Lock(this, 0) != 0))
004415e1      {
004415fb          if (SurfaceWindow::Lock(ebp, 1) != 0)
004415fb          {
0044161a              int32_t i_2 = (this->rect.right - this->rect.left);
0044161c              uint32_t eax_4 = RGBAColor::GetColor32(arg2);
00441627              void* data = ebp->data;
0044162a              arg2 = this->data;
0044162e              int32_t esi_3 = (this->rect.bottom - this->rect.top);
00441631              int32_t esi_4 = (esi_3 - 1);
00441631              
0044163a              if ((esi_3 - 1) >= 0)
0044163a              {
0044167c                  int32_t temp2_1;
0044167c                  
0044167c                  do
0044167c                  {
0044164e                      void* ecx_9 = ((this->pitch * esi_4) + arg2);
0044164e                      
0044165a                      if ((i_2 - 1) >= 0)
0044165a                      {
0044165c                          void* edi_4 = ((char*)ecx_9 + ((i_2 - 1) << 2));
0044165f                          void* edx_8 = (((ebp->pitch * esi_4) + data) - ecx_9);
00441661                          int32_t i_1 = i_2;
00441675                          int32_t i;
00441675                          
00441675                          do
00441675                          {
0044166a                              if (*(uint32_t*)edi_4 == eax_4)
0044166f                                  *(uint32_t*)edi_4 = *(uint32_t*)((char*)edx_8 + edi_4);
0044166f                              
00441671                              edi_4 -= 4;
00441674                              i = i_1;
00441674                              i_1 -= 1;
00441675                          } while (i != 1);
00441677                          ebp = arg3;
0044165a                      }
0044165a                      
0044167b                      temp2_1 = esi_4;
0044167b                      esi_4 -= 1;
0044167c                  } while ((temp2_1 - 1) >= 0);
0044163a              }
0044163a              
00441680              SurfaceWindow::Unlock(this);
00441687              SurfaceWindow::Unlock(ebp);
0044168f              int32_t eax_6;
0044168f              eax_6 = 1;
00441695              return 1;
004415fb          }
004415fb          
004415ff          SurfaceWindow::Unlock(this);
004415e1      }
004415e1      
00441607      int32_t eax_1;
00441607      eax_1 = 0;
0044160d      return 0;
004415b0  }

00441698                                                                          90 90 90 90 90 90 90 90                          ........

004416a0  uint8_t __thiscall SurfaceWindow::PointTestOverlay(class SurfaceWindow* this, int32_t const arg2, int32_t const arg3)

004416a0  {
004416c7      if (((arg2 >= 0 && (arg3 >= 0 && (arg2 < (this->rect.right - this->rect.left) && arg3 < (this->rect.bottom - this->rect.top)))) && SurfaceWindow::Lock(this, 1) != 0))
004416c7      {
004416d6          class RenderSurface* surface = this->surface;
004416f1          int32_t edi_2 = *(uint32_t*)((((((uint32_t)surface->pfDesc.bitsPerPixel) >> 3) * arg2) + (this->pitch * arg3)) + this->data);
004416f1          
004416fb          if ((surface->pfDesc.flags & 2) != 0)
00441705              edi_2 &= !(surface->pfDesc.alphaBitMask);
00441705          
00441709          SurfaceWindow::Unlock(this);
00441716          return edi_2 != 0;
004416c7      }
004416c7      
0044171b      int32_t eax;
0044171b      eax = 0;
0044171e      return 0;
004416a0  }

00441721     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00441730  uint8_t __thiscall SurfaceWindow::GetColorFromPoint(class SurfaceWindow* this, class RGBAColor* arg2, int32_t const arg3, int32_t const arg4)

00441730  {
00441757      if (((arg3 >= 0 && (arg4 >= 0 && (arg3 < (this->rect.right - this->rect.left) && arg4 < (this->rect.bottom - this->rect.top)))) && SurfaceWindow::Lock(this, 1) != 0))
00441757      {
00441781          uint32_t edi_2 = *(uint32_t*)((((((uint32_t)this->surface->pfDesc.bitsPerPixel) >> 3) * arg3) + (this->pitch * arg4)) + this->data);
00441786          SurfaceWindow::Unlock(this);
00441790          RGBAColor::SetColor32(arg2, edi_2);
00441797          int32_t eax_6;
00441797          eax_6 = 1;
0044179a          return 1;
00441757      }
00441757      
0044179f      int32_t eax;
0044179f      eax = 0;
004417a2      return 0;
00441730  }

004417a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004417b0  uint8_t __thiscall SurfaceWindow::SearchForColor(class SurfaceWindow* this, int32_t* arg2, int32_t* arg3, class RGBAColor const* arg4, uint8_t arg5)

004417b0  {
004417b8      uint8_t var_3d = 0;
004417bd      uint8_t eax = SurfaceWindow::Lock(this, 1);
004417bd      
004417c4      if (eax == 0)
004417ca          return eax;
004417ca      
004417d1      float r = arg4->r;
004417d3      arg4->g;
004417de      arg4->b;
004417f0      float a = arg4->a;
00441826      int32_t esi_3 = (((_ftol2() << 8) | _ftol2()) << 8);
00441829      int32_t eax_4;
00441829      int32_t* ecx_1;
00441829      eax_4 = _ftol2();
00441837      int32_t esi_4 = (esi_3 | eax_4);
0044183c      int32_t eax_6 = (this->rect.bottom - this->rect.top);
0044183e      int32_t edx_3 = (this->rect.right - this->rect.left);
00441840      int32_t ebx_1 = 0;
00441844      int32_t var_3c = esi_4;
00441848      int32_t var_34 = edx_3;
0044184c      int32_t var_38 = eax_6;
00441850      arg4 = 0xffffffff;
00441850      
00441858      if (eax_6 > 0)
00441858      {
0044198e          do
0044198e          {
00441860              ecx_1 = var_3d;
00441860              
00441866              if (ecx_1 != 0)
00441866                  break;
00441866              
0044186c              int32_t ebp_1 = 0;
0044186c              
00441870              if (edx_3 > 0)
00441870              {
0044196e                  do
0044196e                  {
0044189b                      ecx_1 = *(uint32_t*)((((((uint32_t)this->surface->pfDesc.bitsPerPixel) >> 3) * ebp_1) + (this->pitch * ebx_1)) + this->data);
004418a8                      uint32_t eax_15 = ((((ecx_1 << 8) | ecx_1) << 8) | ecx_1);
004418a8                      
004418ac                      if (eax_15 == esi_4)
004418ac                      {
0044197e                          *(uint32_t*)arg2 = ebp_1;
00441980                          *(uint32_t*)arg3 = ebx_1;
00441982                          var_3d = 1;
00441982                          break;
004418ac                      }
004418ac                      
004418b2                      ecx_1 = arg5;
004418b2                      
004418b8                      if (ecx_1 != 0)
004418b8                      {
004418c3                          float var_10;
004418c3                          RGBAColor::SetColor32(&var_10, eax_15);
004418f0                          float r_1 = r;
004418fc                          int32_t var_14_1 = 0;
00441943                          int32_t esi_8 = (((_ftol2() << 8) | _ftol2()) << 8);
00441946                          int32_t eax_19;
00441946                          eax_19 = _ftol2();
0044194b                          class RGBAColor* esi_9 = (esi_8 | eax_19);
0044194b                          
00441951                          if (esi_9 < arg4)
00441951                          {
0044195b                              *(uint32_t*)arg2 = ebp_1;
0044195d                              arg4 = esi_9;
00441961                              *(uint32_t*)arg3 = ebx_1;
00441951                          }
00441951                          
00441963                          esi_4 = var_3c;
004418b8                      }
004418b8                      
00441967                      edx_3 = var_34;
0044196b                      ebp_1 += 1;
0044196e                  } while (ebp_1 < edx_3);
0044196e                  
00441987                  eax_6 = var_38;
00441870              }
00441870              
0044198b              ebx_1 += 1;
0044198e          } while (ebx_1 < eax_6);
00441858      }
00441858      
00441996      SurfaceWindow::Unlock(this);
00441996      
004419a6      if (arg5 != 0)
004419b0          return 1;
004419b0      
004419a8      return var_3d;
004417b0  }

00441878                                                                          8d a4 24 00 00 00 00 90                          ..$.....
004419b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004419c0  uint8_t PixelOp<unsigned long>::ConvertPixel(class PixelFormatDesc const* arg1, uint32_t const arg2, class PixelFormatDesc const* arg3, uint32_t* arg4)

004419c0  {
004419c9      class PixelFormatDesc* esi = arg1;
004419d1      enum PixelFormatID eax;
004419d1      
004419d1      if (esi->format == arg3->format)
004419d1      {
004419dc          *(uint32_t*)arg4 = arg2;
004419de          eax = 1;
004419e1          return 1;
004419d1      }
004419d1      
004419e2      enum PixelFormatID ecx;
004419e2      ecx = arg3->flags;
004419e5      eax = 4;
004419e5      
004419f2      if (((4 & ecx) != 0 || (esi->flags & 4) != 0))
004419f2      {
00441b25          eax = 0;
00441b28          return 0;
004419f2      }
004419f2      
004419f8      uint32_t* eax_1 = arg4;
004419fc      *(uint32_t*)eax_1 = 0;
004419fc      
00441a11      if (((esi->flags & 1) != 0 && (arg3->flags & 1) != 0))
00441a11      {
00441a1a          ecx = esi->redBitOffset;
00441a27          uint32_t edx_4 = ((esi->redBitMask & arg2) >> ecx);
00441a29          ecx = esi->greenBitOffset;
00441a31          uint32_t ebx_3 = ((esi->greenBitMask & arg2) >> ecx);
00441a37          ecx = esi->blueBitOffset;
00441a3a          uint32_t edi_4 = ((esi->blueBitMask & arg2) >> ecx);
00441a3c          ecx = esi->redBitCount;
00441a41          arg1 = edx_4;
00441a41          
00441a4a          if ((ecx != 0 && ecx != arg3->redBitCount))
00441a4a          {
00441a57              arg1 = (COMBINE(0, (arg3->redMax * edx_4)) / esi->redMax);
00441a5b              eax_1 = arg4;
00441a5f              edx_4 = arg1;
00441a4a          }
00441a4a          
00441a63          ecx = esi->greenBitCount;
00441a63          
00441a6d          if ((ecx != 0 && ecx != arg3->greenBitCount))
00441a6d          {
00441a7a              edx_4 = arg1;
00441a7e              ebx_3 = (COMBINE(0, (arg3->greenMax * ebx_3)) / esi->greenMax);
00441a80              eax_1 = arg4;
00441a6d          }
00441a6d          
00441a84          ecx = esi->blueBitCount;
00441a84          
00441a8e          if ((ecx != 0 && ecx != arg3->blueBitCount))
00441a8e          {
00441a9b              edx_4 = arg1;
00441a9f              edi_4 = (COMBINE(0, (arg3->blueMax * edi_4)) / esi->blueMax);
00441aa1              eax_1 = arg4;
00441a8e          }
00441a8e          
00441aa5          ecx = arg3->redBitOffset;
00441aaa          uint32_t edx_9 = ((edx_4 << ecx) & arg3->redBitMask);
00441aad          *(uint32_t*)eax_1 = edx_9;
00441aaf          ecx = arg3->greenBitOffset;
00441ab7          uint32_t ebx_6 = (((ebx_3 << ecx) & arg3->greenBitMask) | edx_9);
00441ab9          *(uint32_t*)eax_1 = ebx_6;
00441abb          ecx = arg3->blueBitOffset;
00441ac7          *(uint32_t*)eax_1 = (((edi_4 << ecx) & arg3->blueBitMask) | ebx_6);
00441a11      }
00441a11      
00441aca      uint32_t edx;
00441aca      edx = arg3->flags;
00441aca      
00441ad1      if ((2 & edx) != 0)
00441ad1      {
00441ad6          if ((esi->flags & 2) != 0)
00441ad6          {
00441ae1              uint32_t const ecx_2;
00441ae1              ecx_2 = esi->alphaBitOffset;
00441ae4              uint32_t edx_12 = ((esi->alphaBitMask & arg2) >> ecx_2);
00441ae6              ecx_2 = esi->alphaBitCount;
00441ae6              
00441af0              if ((ecx_2 != 0 && ecx_2 != arg3->alphaBitCount))
00441af0              {
00441afd                  edx_12 = (COMBINE(0, (arg3->alphaMax * edx_12)) / esi->alphaMax);
00441aff                  eax_1 = arg4;
00441af0              }
00441af0              
00441b03              ecx_2 = arg3->alphaBitOffset;
00441b13              *(uint32_t*)eax_1 |= ((edx_12 << ecx_2) & arg3->alphaBitMask);
00441b15              eax_1 = 1;
00441b18              return 1;
00441ad6          }
00441ad6          
00441b1c          *(uint32_t*)eax_1 |= arg3->alphaBitMask;
00441ad1      }
00441ad1      
00441b20      eax_1 = 1;
00441b23      return 1;
004419c0  }

00441b29                             90 90 90 90 90 90 90                                                           .......

00441b30  void __fastcall SurfaceWindow::SurfaceWindow(class SurfaceWindow* this)

00441b30  {
00441b34      this->vtable = 0x798d14;
00441b3a      __builtin_memset(&this->surface, 0, 0x1d);
00441b4f      this->pitch = 0;
00441b52      this->data = nullptr;
00441b30  }

00441b59                                                                             90 90 90 90 90 90 90                           .......

00441b60  void __thiscall SurfaceWindow::SurfaceWindow(class SurfaceWindow* this, class RenderSurface* arg2, struct tagRECT const* arg3)

00441b60  {
00441b66      __builtin_memset(&this->surface, 0, 0x1d);
00441b7b      this->pitch = 0;
00441b7e      this->data = nullptr;
00441b8a      this->vtable = 0x798d14;
00441b90      SurfaceWindow::Attach(this, arg2, arg3);
00441b60  }

00441b9a                                                                                90 90 90 90 90 90                            ......

00441ba0  void __thiscall SurfaceWindow::SurfaceWindow(class SurfaceWindow* this, class RenderSurface* arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6)

00441ba0  {
00441ba9      __builtin_memset(&this->surface, 0, 0x1d);
00441bbe      this->pitch = 0;
00441bc1      this->data = nullptr;
00441bcb      uint32_t const var_10 = arg3;
00441bd3      uint32_t const var_c = arg4;
00441bdd      int32_t var_8 = (arg5 + 1);
00441be5      int32_t var_4 = (arg6 + 1);
00441bef      this->vtable = 0x798d14;
00441bf5      SurfaceWindow::Attach(this, arg2, &var_10);
00441ba0  }

00441c02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00441c10  void __thiscall SurfaceWindow::SurfaceWindow(class SurfaceWindow* this, class SurfaceWindow* arg2, struct tagRECT const* arg3)

00441c10  {
00441c16      __builtin_memset(&this->surface, 0, 0x1d);
00441c2b      this->pitch = 0;
00441c2e      this->data = nullptr;
00441c3a      this->vtable = 0x798d14;
00441c40      SurfaceWindow::Attach(this, arg2, arg3);
00441c10  }

00441c4a                                90 90 90 90 90 90                                                            ......

00441c50  uint8_t __thiscall SurfaceWindow::LegacyBlit(class SurfaceWindow* this, class SurfaceWindow const* arg2, uint32_t const arg3, float const arg4, class RGBAColor* arg5, class SurfaceWindow const* arg6)

00441c50  {
00441c63      class RenderSurface* surface_3 = this->surface;
00441c66      int32_t i_5 = (this->rect.right - this->rect.left);
00441c6b      int32_t ecx_2 = (this->rect.bottom - this->rect.top);
00441c7f      int32_t ecx_4 = (arg2->rect.right - arg2->rect.left);
00441c8b      int32_t ecx_6 = (arg2->rect.bottom - arg2->rect.top);
00441c8d      enum PixelFormatID format_2 = surface_3->pfDesc.format;
00441c97      class PixelFormatDesc* edi_1 = &arg2->surface->pfDesc;
00441ca7      enum PixelFormatID format_1 = edi_1->format;
00441cab      bool var_88 = format_1 == format_2;
00441cbe      class PixelFormatDesc* var_8 = &surface_3->pfDesc;
00441cc5      int32_t i_4 = i_5;
00441cc9      char var_84 = 0;
00441cc9      
00441cd3      if ((format_1 == PFID_X8R8G8B8 && format_2 == PFID_A8R8G8B8))
00441cd3      {
00441ce2      label_441ce2:
00441ce2          var_88 = true;
00441ce2          
00441ce7          if (surface_3->pfDesc.format == PFID_A8R8G8B8)
00441ce9              var_84 = 1;
00441cd3      }
00441cd3      else if ((format_1 == PFID_A8R8G8B8 && surface_3->pfDesc.format == PFID_X8R8G8B8))
00441cdd          goto label_441ce2;
00441cdd      
00441cf2      char var_7c_1;
00441cf2      
00441cf2      if ((edi_1->flags & 4) == 0)
00441cf8          var_7c_1 = 0;
00441cf8      
00441cfd      if (((edi_1->flags & 4) != 0 || (surface_3->pfDesc.flags & 4) != 0))
00441cff          var_7c_1 = 1;
00441cff      
00441d08      char var_83_1;
00441d08      
00441d08      if (ecx_4 == i_5)
00441d12          var_83_1 = 0;
00441d12      
00441d17      if ((ecx_4 != i_5 || ecx_6 != ecx_2))
00441d19          var_83_1 = 1;
00441d19      
00441d1e      char edx_3 = arg3;
00441d28      char var_82_1;
00441d28      
00441d28      if ((edx_3 & 4) != 0)
00441d28      {
00441d2a          i_5 = var_88;
00441d30          var_82_1 = 1;
00441d28      }
00441d28      
00441d35      if (((edx_3 & 4) == 0 || i_5 != 0))
00441d37          var_82_1 = 0;
00441d37      
00441d44      if (((edx_3 & 0x10) != 0 && format_1 == PFID_A8R8G8B8))
00441d46          i_5 = var_88;
00441d46      
00441d4c      if ((((edx_3 & 0x10) == 0 || format_1 != PFID_A8R8G8B8) || i_5 == 0))
00441d52          i_5 = 0;
00441d4c      else
00441d4e          i_5 = 1;
00441d4e      
00441d5c      char var_81 = i_5;
00441d64      char var_85_1;
00441d64      
00441d64      if (((edx_3 & 0x50) == 0x50 && i_5 != 0))
00441d69          var_85_1 = 1;
00441d69      
00441d6e      if ((((edx_3 & 0x50) != 0x50 || i_5 == 0) || surface_3->pfDesc.format != PFID_A8R8G8B8))
00441d70          var_85_1 = 0;
00441d70      
00441d92      char var_89;
00441d92      uint8_t var_87;
00441d92      
00441d92      if ((((edx_3 & 0x20) == 0 || var_88 == 0) || arg5 == 0))
00441d92      {
00441db7          var_89 = 0;
00441dbc          var_87 = 0;
00441d92      }
00441d92      else
00441d92      {
00441d96          var_89 = 1;
00441d96          
00441d9b          if (arg6 == 0)
00441dbc              var_87 = 0;
00441d9b          else
00441d9b          {
00441da0              enum PixelFormatID format = arg6->surface->pfDesc.format;
00441da0              
00441dae              if ((format == PFID_A8R8G8B8 || format == PFID_A8))
00441db0                  var_87 = 1;
00441dae              else
00441dbc                  var_87 = 0;
00441d9b          }
00441d92      }
00441d92      
00441dcc      if (SurfaceWindow::Lock(arg2, 1) != 0)
00441dcc      {
00441ddd          if (SurfaceWindow::Lock(this, 0) == 0)
00441ddd          {
00441de1              SurfaceWindow::Unlock(arg2);
00441de9              int32_t eax_4;
00441de9              eax_4 = 0;
00441df2              return 0;
00441ddd          }
00441ddd          
00441dff          class PixelFormatDesc* ebx;
00441dff          ebx = surface_3->pfDesc.bitsPerPixel;
00441e08          void* data_2 = this->data;
00441e0b          uint8_t eax_3 = (edi_1->bitsPerPixel >> 3);
00441e12          void* data_1 = arg2->data;
00441e15          ebx u>>= 3;
00441e18          char var_7b_1 = ebx;
00441e29          void* var_40_1 = _ftol2();
00441e2d          void* eax_5;
00441e2d          eax_5 = var_89;
00441e33          void* data = nullptr;
00441e3b          void* var_6c;
00441e3b          int32_t var_5c;
00441e3b          int32_t var_58;
00441e3b          
00441e3b          if (eax_5 != 0)
00441e3b          {
00441e44              uint32_t eax_6 = RGBAColor::GetColor32(arg5);
00441e4e              uint32_t edx_5 = ((uint32_t)*(uint8_t*)((char*)eax_6)[1]);
00441e51              uint32_t var_78_1 = eax_6;
00441e55              int32_t eax_7 = (eax_6 & 0xff);
00441e5a              uint32_t ecx_16 = ((uint32_t)((int8_t)(eax_6 >> 0x10)));
00441e63              eax_5 = ecx_16 != 0;
00441e68              var_6c = (ecx_16 + eax_5);
00441e70              int32_t ecx_18;
00441e70              ecx_18 = edx_5 != 0;
00441e75              var_58 = (edx_5 + ecx_18);
00441e7d              int32_t edx_7;
00441e7d              edx_7 = eax_7 != 0;
00441e82              var_5c = (eax_7 + edx_7);
00441e3b          }
00441e3b          
00441e86          eax_5 = var_87;
00441e86          
00441e8c          if (eax_5 == 0)
00441e8c              goto label_441ee2;
00441e8c          
00441ea0          if (SurfaceWindow::Lock(arg6, 1) != 0)
00441ea0          {
00441ec2              class RenderSurface* surface_1 = arg6->surface;
00441ec5              data = arg6->data;
00441ec9              eax_5 = surface_1->pfDesc.bitsPerPixel;
00441ecf              eax_5 u>>= 3;
00441ed2              char var_7a = eax_5;
00441edd              bool var_79 = surface_1->pfDesc.format == PFID_A8;
00441ee2          label_441ee2:
00441ee2              eax_5 = var_7c_1;
00441ee2              
00441ee8              if (eax_5 == 0)
00441ee8              {
00441f0e                  eax_5 = var_88;
00441f0e                  
00441f14                  if (eax_5 == 0)
00441f14                  {
00441fe7                  label_441fe7:
00441fe7                      
00441ff5                      if ((eax_3 < 3 || ebx < 3))
00441ff5                      {
0044252c                          int32_t ecx_70 = (ecx_2 - 1);
0044252f                          int32_t var_78_4 = ecx_70;
0044252f                          
00442533                          if (ecx_70 >= 0)
00442533                          {
004425a4                              int32_t temp2_1;
004425a4                              
004425a4                              do
004425a4                              {
00442565                                  if ((i_4 - 1) >= 0)
00442565                                  {
00442567                                      uint32_t ebx_12 = ((uint32_t)var_7b_1);
0044256c                                      uint32_t edi_21 = ((uint32_t)eax_3);
00442576                                      char* ecx_73 = (((i_4 - 1) * ebx_12) + ((this->pitch * ecx_70) + data_2));
00442585                                      int32_t esi_21 = -(ebx_12);
00442589                                      void* eax_138 = (((i_4 - 1) * edi_21) + ((arg2->pitch * ecx_70) + data_1));
0044258b                                      int32_t i_3 = i_4;
00442599                                      int32_t i;
00442599                                      
00442599                                      do
00442599                                      {
00442590                                          ebx_12 = *(uint8_t*)eax_138;
00442592                                          *(uint8_t*)ecx_73 = ebx_12;
00442594                                          eax_138 += -(edi_21);
00442596                                          ecx_73 = &ecx_73[esi_21];
00442598                                          i = i_3;
00442598                                          i_3 -= 1;
00442599                                      } while (i != 1);
0044259b                                      ecx_70 = var_78_4;
00442565                                  }
00442565                                  
0044259f                                  temp2_1 = ecx_70;
0044259f                                  ecx_70 -= 1;
004425a0                                  var_78_4 = ecx_70;
004425a4                              } while ((temp2_1 - 1) >= 0);
00442533                          }
00441ff5                      }
00441ff5                      else
00441ff5                      {
00442002                          int32_t i_2 = (ecx_2 - 1);
00442002                          
00442006                          if ((ecx_2 - 1) >= 0)
00442006                          {
0044200c                              int32_t i_1 = (ecx_2 - 1);
00442014                              int32_t esi_6 = (i_1 * ecx_6);
00442019                              int32_t var_78_3 = esi_6;
00442019                              
0044251d                              do
0044251d                              {
00442033                                  int32_t ebp_1 = (((int64_t)esi_6) / ecx_2);
00442046                                  void* ebx_3 = ((arg2->pitch * ebp_1) + data_1);
00442054                                  int32_t edi_13 = (i_4 - 1);
00442057                                  int32_t var_34_1 = ebp_1;
0044205b                                  void* var_2c_1 = ebx_3;
0044205f                                  int32_t var_38_1 = edi_13;
0044205f                                  
00442063                                  if (edi_13 >= 0)
00442063                                  {
00442069                                      int32_t edx_15 = ((uint32_t)var_7b_1);
00442075                                      int32_t esi_8 = -(edx_15);
00442096                                      int32_t ecx_39 = (edi_13 * ecx_4);
0044209b                                      void* esi_13 = ((edi_13 * edx_15) + ((this->pitch * i_1) + data_2));
0044209d                                      int32_t var_28_1 = ecx_39;
004420a1                                      int32_t var_10_1 = edx_15;
004420a8                                      void* var_64_1 = esi_13;
004420a8                                      
004420b2                                      while (true)
004420b2                                      {
004420b2                                          edx_15 = var_83_1;
004420b8                                          int32_t eax_26 = edi_13;
004420ba                                          int32_t var_30_1 = eax_26;
004420ba                                          
004420be                                          if (edx_15 != 0)
004420be                                          {
004420c3                                              eax_26 = (((int64_t)ecx_39) / i_4);
004420c7                                              var_30_1 = eax_26;
004420be                                          }
004420be                                          
004420d2                                          void* ecx_42 = ((eax_26 * ((uint32_t)eax_3)) + ebx_3);
004420d2                                          
004420dc                                          if ((eax_26 >= 0 && eax_26 < ecx_4))
004420dc                                          {
004420f0                                          label_4420f0:
004420f0                                              edx_15 = var_82_1;
004420f6                                              int32_t var_80;
004420f6                                              
004420f6                                              if (edx_15 == 0)
004420f6                                              {
0044215c                                                  edx_15 = var_81;
0044215c                                                  
00442162                                                  if (edx_15 == 0)
00442162                                                  {
004423b0                                                      edx_15 = var_89;
004423b0                                                      
004423b6                                                      if (edx_15 == 0)
004423b6                                                      {
004424be                                                          eax_26 = var_84;
004424be                                                          
004424c4                                                          if (eax_26 == 0)
004424d4                                                              *(uint32_t*)esi_13 = *(uint32_t*)ecx_42;
004424c4                                                          else
004424ce                                                              *(uint32_t*)esi_13 = (*(uint32_t*)ecx_42 | 0xff000000);
004423b6                                                      }
004423b6                                                      else
004423b6                                                      {
004423bc                                                          int32_t edx_63 = *(uint32_t*)ecx_42;
004423be                                                          var_80 = edx_63;
004423c2                                                          uint32_t esi_17 = ((uint32_t)*(uint8_t*)((char*)var_80)[2]);
004423c9                                                          uint32_t edi_17 = ((uint32_t)*(uint8_t*)((char*)edx_63)[1]);
004423d2                                                          int32_t ebx_7 = (edx_63 & 0xff);
004423d4                                                          int32_t edx_64;
004423d4                                                          edx_64 = var_87;
004423dd                                                          uint32_t ebx_8;
004423dd                                                          int32_t esi_18;
004423dd                                                          int32_t edi_18;
004423dd                                                          
004423dd                                                          if (edx_64 == 0)
004423dd                                                          {
00442490                                                              esi_18 = ((esi_17 * var_6c) >> 8);
00442493                                                              edi_18 = ((edi_17 * var_58) >> 8);
00442496                                                              ebx_8 = ((ebx_7 * var_5c) >> 8);
004423dd                                                          }
004423dd                                                          else
004423dd                                                          {
00442400                                                              int32_t edx_66;
00442400                                                              edx_66 = var_79;
00442404                                                              void* eax_108 = ((arg6->pitch * var_34_1) + ((char*)data + (((uint32_t)var_7a) * eax_26)));
00442408                                                              uint32_t ebp_12;
00442408                                                              
00442408                                                              if (edx_66 == 0)
0044240f                                                                  ebp_12 = ((uint32_t)*(uint8_t*)((char*)eax_108 + 3));
00442408                                                              else
0044240a                                                                  ebp_12 = ((uint32_t)*(uint8_t*)eax_108);
0044240a                                                              
00442417                                                              int32_t edx_67;
00442417                                                              edx_67 = ebp_12 != 0;
0044241c                                                              int32_t ebp_13 = (ebp_12 + edx_67);
0044242d                                                              int32_t eax_112;
0044242d                                                              char edx_71;
0044242d                                                              edx_71 = HIGHD(((int64_t)((esi_17 - ((esi_17 * var_6c) >> 8)) * ebp_13)));
0044242d                                                              eax_112 = LOWD(((int64_t)((esi_17 - ((esi_17 * var_6c) >> 8)) * ebp_13)));
0044243b                                                              esi_18 = (esi_17 + -(((eax_112 + ((uint32_t)edx_71)) >> 8)));
0044244e                                                              int32_t eax_119;
0044244e                                                              char edx_76;
0044244e                                                              edx_76 = HIGHD(((int64_t)((edi_17 - ((edi_17 * var_58) >> 8)) * ebp_13)));
0044244e                                                              eax_119 = LOWD(((int64_t)((edi_17 - ((edi_17 * var_58) >> 8)) * ebp_13)));
00442463                                                              edi_18 = (edi_17 + -(((eax_119 + ((uint32_t)edx_76)) >> 8)));
0044246f                                                              int32_t eax_126;
0044246f                                                              char edx_81;
0044246f                                                              edx_81 = HIGHD(((int64_t)((ebx_7 - ((ebx_7 * var_5c) >> 8)) * ebp_13)));
0044246f                                                              eax_126 = LOWD(((int64_t)((ebx_7 - ((ebx_7 * var_5c) >> 8)) * ebp_13)));
0044247d                                                              ebx_8 = (ebx_7 + -(((eax_126 + ((uint32_t)edx_81)) >> 8)));
004423dd                                                          }
004423dd                                                          
004424a7                                                          edi_13 = var_38_1;
004424ae                                                          int32_t ecx_65 = (((((((edx_63 >> 0x18) << 8) | esi_18) << 8) | edi_18) << 8) | ebx_8);
004424b0                                                          ebx_3 = var_2c_1;
004424b4                                                          var_80 = ecx_65;
004424b8                                                          *(uint32_t*)var_64_1 = ecx_65;
004424ba                                                          esi_13 = var_64_1;
004423b6                                                      }
00442162                                                  }
00442162                                                  else
00442162                                                  {
00442168                                                      int32_t ecx_46 = *(uint32_t*)ecx_42;
0044216c                                                      uint32_t ebp_3 = (ecx_46 >> 0x18);
00442171                                                      var_80 = ecx_46;
00442171                                                      
00442181                                                      if ((ebp_3 != 0 && var_40_1 != 0))
00442181                                                      {
00442187                                                          edx_15 = var_89;
0044218b                                                          int32_t eax_36 = *(uint32_t*)esi_13;
0044218d                                                          uint32_t ebp_4 = (ebp_3 + 1);
0044219f                                                          void* edx_19;
0044219f                                                          
0044219f                                                          if ((edx_15 != 0 || ebp_4 != 0x100))
0044219f                                                          {
004421ce                                                              edx_19 = var_40_1;
004421ce                                                              
004421d8                                                              if (edx_19 != 0x100)
004421d8                                                              {
004421dd                                                              label_4421dd:
004421dd                                                                  ebp_4 = ((ebp_4 * edx_19) >> 8);
004421d8                                                              }
004421d8                                                              
004421e0                                                              uint32_t esi_14 = ((uint32_t)*(uint8_t*)((char*)eax_36)[2]);
004421e8                                                              uint32_t edx_24 = ((uint32_t)*(uint8_t*)((char*)ecx_46)[1]);
004421eb                                                              int32_t ecx_48 = (ecx_46 & 0xff);
004421f7                                                              uint32_t edi_14 = ((uint32_t)*(uint8_t*)((char*)eax_36)[1]);
004421ff                                                              int32_t ebx_4 = (eax_36 & 0xff);
00442201                                                              int32_t eax_37;
00442201                                                              eax_37 = var_85_1;
00442205                                                              uint32_t ecx_50 = (eax_36 >> 0x18);
0044220e                                                              int32_t eax_59;
0044220e                                                              uint32_t ebx_5;
0044220e                                                              int32_t esi_15;
0044220e                                                              int32_t edi_15;
0044220e                                                              
0044220e                                                              if (eax_37 == 0)
0044220e                                                              {
00442278                                                                  int32_t eax_63;
00442278                                                                  char edx_37;
00442278                                                                  edx_37 = HIGHD(((int64_t)((esi_14 - ((uint32_t)*(uint8_t*)((char*)var_80)[2])) * ebp_4)));
00442278                                                                  eax_63 = LOWD(((int64_t)((esi_14 - ((uint32_t)*(uint8_t*)((char*)var_80)[2])) * ebp_4)));
0044228a                                                                  esi_15 = (esi_14 + -(((eax_63 + ((uint32_t)edx_37)) >> 8)));
00442293                                                                  int32_t eax_70;
00442293                                                                  char edx_40;
00442293                                                                  edx_40 = HIGHD(((int64_t)((edi_14 - edx_24) * ebp_4)));
00442293                                                                  eax_70 = LOWD(((int64_t)((edi_14 - edx_24) * ebp_4)));
004422a5                                                                  edi_15 = (edi_14 + -(((eax_70 + ((uint32_t)edx_40)) >> 8)));
004422ae                                                                  int32_t eax_77;
004422ae                                                                  char edx_43;
004422ae                                                                  edx_43 = HIGHD(((int64_t)((ebx_4 - ecx_48) * ebp_4)));
004422ae                                                                  eax_77 = LOWD(((int64_t)((ebx_4 - ecx_48) * ebp_4)));
004422bc                                                                  ebx_5 = (ebx_4 + -(((eax_77 + ((uint32_t)edx_43)) >> 8)));
0044220e                                                              }
0044220e                                                              else
0044220e                                                              {
00442214                                                                  int32_t eax_38;
00442214                                                                  eax_38 = ecx_50 != 0;
00442217                                                                  int32_t ecx_51 = (ecx_50 + eax_38);
0044221e                                                                  int32_t eax_41;
0044221e                                                                  char edx_25;
0044221e                                                                  edx_25 = HIGHD(((int64_t)(ecx_51 * ebp_4)));
0044221e                                                                  eax_41 = LOWD(((int64_t)(ecx_51 * ebp_4)));
0044222e                                                                  int32_t ecx_52 = (ecx_51 + (ebp_4 - ((eax_41 + ((uint32_t)edx_25)) >> 8)));
00442243                                                                  esi_15 = (esi_14 - (((int64_t)((esi_14 - ((uint32_t)*(uint8_t*)((char*)var_80)[2])) * ebp_4)) / ecx_52));
00442253                                                                  edi_15 = (edi_14 - (((int64_t)((edi_14 - edx_24) * ebp_4)) / ecx_52));
0044225f                                                                  ebx_5 = (ebx_4 - (((int64_t)((ebx_4 - ecx_48) * ebp_4)) / ecx_52));
00442265                                                                  eax_59 = ecx_52 != 0;
00442268                                                                  ecx_50 = (ecx_52 - eax_59);
0044220e                                                              }
0044220e                                                              
004422be                                                              eax_59 = var_87;
004422be                                                              
004422c4                                                              if (eax_59 == 0)
004422c4                                                              {
0044236a                                                                  eax_59 = var_89;
0044236a                                                                  
00442370                                                                  if (eax_59 != 0)
00442370                                                                  {
00442381                                                                      esi_15 = ((esi_15 * var_6c) >> 8);
00442384                                                                      edi_15 = ((edi_15 * var_58) >> 8);
00442387                                                                      ebx_5 = ((ebx_5 * var_5c) >> 8);
00442370                                                                  }
004422c4                                                              }
004422c4                                                              else
004422c4                                                              {
004422e9                                                                  int32_t edx_46;
004422e9                                                                  edx_46 = var_79;
004422ed                                                                  void* eax_83 = ((arg6->pitch * var_34_1) + ((char*)data + (((uint32_t)var_7a) * var_30_1)));
004422f1                                                                  uint32_t ebp_8;
004422f1                                                                  
004422f1                                                                  if (edx_46 == 0)
004422f8                                                                      ebp_8 = ((uint32_t)*(uint8_t*)((char*)eax_83 + 3));
004422f1                                                                  else
004422f3                                                                      ebp_8 = ((uint32_t)*(uint8_t*)eax_83);
004422f3                                                                  
00442300                                                                  int32_t edx_47;
00442300                                                                  edx_47 = ebp_8 != 0;
00442305                                                                  int32_t ebp_9 = (ebp_8 + edx_47);
00442316                                                                  int32_t eax_87;
00442316                                                                  char edx_51;
00442316                                                                  edx_51 = HIGHD(((int64_t)((esi_15 - ((esi_15 * var_6c) >> 8)) * ebp_9)));
00442316                                                                  eax_87 = LOWD(((int64_t)((esi_15 - ((esi_15 * var_6c) >> 8)) * ebp_9)));
00442324                                                                  esi_15 += -(((eax_87 + ((uint32_t)edx_51)) >> 8));
00442337                                                                  int32_t eax_94;
00442337                                                                  char edx_56;
00442337                                                                  edx_56 = HIGHD(((int64_t)((edi_15 - ((edi_15 * var_58) >> 8)) * ebp_9)));
00442337                                                                  eax_94 = LOWD(((int64_t)((edi_15 - ((edi_15 * var_58) >> 8)) * ebp_9)));
0044234c                                                                  edi_15 += -(((eax_94 + ((uint32_t)edx_56)) >> 8));
00442358                                                                  int32_t eax_101;
00442358                                                                  char edx_61;
00442358                                                                  edx_61 = HIGHD(((int64_t)((ebx_5 - ((ebx_5 * var_5c) >> 8)) * ebp_9)));
00442358                                                                  eax_101 = LOWD(((int64_t)((ebx_5 - ((ebx_5 * var_5c) >> 8)) * ebp_9)));
00442366                                                                  ebx_5 += -(((eax_101 + ((uint32_t)edx_61)) >> 8));
004422c4                                                              }
004422c4                                                              
0044238f                                                              esi_13 = var_64_1;
00442398                                                              edi_13 = var_38_1;
0044239f                                                              ecx_46 = ((((((ecx_50 << 8) | esi_15) << 8) | edi_15) << 8) | ebx_5);
004423a1                                                              ebx_3 = var_2c_1;
004423a5                                                              var_80 = ecx_46;
004423a9                                                              *(uint32_t*)esi_13 = ecx_46;
0044219f                                                          }
0044219f                                                          else
0044219f                                                          {
004421a1                                                              edx_19 = var_40_1;
004421a1                                                              
004421a7                                                              if (edx_19 != ebp_4)
004421a7                                                                  goto label_4421dd;
004421a7                                                              
004421a9                                                              edx_19 = var_85_1;
004421a9                                                              
004421af                                                              if (edx_19 != 0)
004423a9                                                                  *(uint32_t*)esi_13 = ecx_46;
004421af                                                              else
004421af                                                              {
004421bf                                                                  int32_t edx_23 = (((eax_36 ^ ecx_46) & 0xffffff) ^ eax_36);
004421c3                                                                  var_80 = edx_23;
004421c7                                                                  *(uint32_t*)esi_13 = edx_23;
004421af                                                              }
0044219f                                                          }
00442181                                                      }
00442162                                                  }
004420f6                                              }
004420f6                                              else
004420f6                                              {
00442110                                                  PixelOp<unsigned long>::ConvertPixel(edi_1, *(uint32_t*)ecx_42, var_8, &var_80);
00442110                                                  
00442122                                                  if (var_10_1 == 2)
00442154                                                      *(uint16_t*)esi_13 = var_80;
00442122                                                  else if (var_10_1 == 3)
00442125                                                  {
0044213e                                                      int32_t eax_32;
0044213e                                                      eax_32 = *(uint8_t*)((char*)var_80)[2];
00442144                                                      *(uint16_t*)esi_13 = var_80;
00442147                                                      *(uint8_t*)((char*)esi_13 + 2) = eax_32;
00442125                                                  }
00442125                                                  else if (var_10_1 == 4)
00442132                                                      *(uint32_t*)esi_13 = var_80;
004420f6                                              }
004420dc                                          }
004420dc                                          else if ((ebp_1 >= 0 && ebp_1 < ecx_6))
004420ea                                              goto label_4420f0;
004420ea                                          
004424e8                                          edi_13 -= 1;
004424e9                                          ecx_39 = (var_28_1 + -(ecx_4));
004424eb                                          esi_13 += esi_8;
004424ef                                          var_38_1 = edi_13;
004424f3                                          var_28_1 = ecx_39;
004424f7                                          var_64_1 = esi_13;
004424f7                                          
004424fb                                          if (edi_13 < 0)
004424fb                                              break;
004424fb                                          
004420ae                                          ebp_1 = var_34_1;
004420b2                                      }
004420b2                                      
00442501                                      i_1 = i_2;
00442505                                      esi_6 = var_78_3;
00442063                                  }
00442063                                  
00442510                                  i_1 -= 1;
00442511                                  esi_6 += -(ecx_6);
00442515                                  i_2 = i_1;
00442519                                  var_78_3 = esi_6;
0044251d                              } while (i_1 >= 0);
00442006                          }
00441ff5                      }
00441f14                  }
00441f14                  else
00441f14                  {
00441f1a                      eax_5 = var_84;
00441f1a                      
00441f20                      if (eax_5 != 0)
00441f20                          goto label_441fe7;
00441f20                      
00441f26                      eax_5 = var_83_1;
00441f26                      
00441f2c                      if (eax_5 != 0)
00441f2c                          goto label_441fe7;
00441f2c                      
00441f32                      eax_5 = var_82_1;
00441f32                      
00441f38                      if (eax_5 != 0)
00441f38                          goto label_441fe7;
00441f38                      
00441f3e                      eax_5 = var_81;
00441f3e                      
00441f44                      if (eax_5 != 0)
00441f44                          goto label_441fe7;
00441f44                      
00441f4a                      eax_5 = var_89;
00441f4a                      
00441f50                      if (eax_5 != 0)
00441f50                          goto label_441fe7;
00441f50                      
00441f5c                      int32_t edi_8 = (this->rect.right - this->rect.left);
00441f5e                      class RenderSurface* surface_2 = this->surface;
00441f5e                      
00441f77                      if ((edi_8 != surface_2->width || (this->rect.bottom - this->rect.top) != surface_2->height))
00441f67                          goto label_441fe7;
00441f67                      
00441f79                      class RenderSurface* surface = arg2->surface;
00441f7c                      uint32_t size_1 = surface_2->size;
00441f7c                      
00441f8c                      if (size_1 != surface->size)
00441f8c                          goto label_441fe7;
00441f8c                      
00441f94                      int32_t edx_11 = (arg2->rect.right - arg2->rect.left);
00441f94                      
00441fc6                      if ((((edx_11 != surface->width || (arg2->rect.bottom - arg2->rect.top) != surface->height) || this->pitch != (((uint32_t)ebx) * edi_8)) || arg2->pitch != (((uint32_t)eax_3) * edx_11)))
00441f9c                          goto label_441fe7;
00441f9c                      
00441fd9                      int32_t esi_4;
00441fd9                      int32_t edi_10;
00441fd9                      edi_10 = __builtin_memcpy(data_2, data_1, ((size_1 >> 2) << 2));
00441fe0                      __builtin_memcpy(edi_10, esi_4, (size_1 & 3));
00441f14                  }
00441ee8              }
00441ee8              else
00441ee8              {
00441eed                  uint32_t size = this->surface->size;
00441f00                  int32_t esi_2;
00441f00                  int32_t edi_6;
00441f00                  edi_6 = __builtin_memcpy(data_2, data_1, ((size >> 2) << 2));
00441f07                  __builtin_memcpy(edi_6, esi_2, (size & 3));
00441ee8              }
00441ee8              
004425aa              SurfaceWindow::Unlock(this);
004425b6              SurfaceWindow::Unlock(arg2);
004425b6              
004425c1              if (var_87 != 0)
004425ca                  SurfaceWindow::Unlock(arg6);
004425ca              
004425db              return 1;
00441ea0          }
00441ea0          
00441ea4          SurfaceWindow::Unlock(arg2);
00441eab          SurfaceWindow::Unlock(this);
00441dcc      }
00441dcc      
00441ebc      return 0;
00441c50  }

004425de                                                                                            90 90                                ..

004425e0  uint8_t __thiscall SurfaceWindow::NotColorBits(class SurfaceWindow* this, int32_t const arg2, int32_t const arg3, int32_t const arg4, int32_t const arg5)

004425e0  {
004425ef      bool cond:0 = arg2 < 0;
004425f1      int32_t right = 0;
004425f5      int32_t* eax_1 = &right;
004425f5      
004425f9      if (!(cond:0))
004425fb          eax_1 = &arg2;
004425fb      
00442604      bool cond:1 = this->rect.right < arg4;
00442608      arg2 = *(uint32_t*)eax_1;
0044260c      int32_t* eax_3 = &this->rect.right;
0044260c      
0044260f      if (!(cond:1))
00442611          eax_3 = &arg4;
00442611      
00442617      right = ADJ(eax_3)->rect.right;
0044261b      bool cond:2 = arg3 < 0;
0044261f      arg4 = 0;
00442623      int32_t const* eax_5 = &arg4;
00442623      
00442627      if (!(cond:2))
00442629          eax_5 = &arg3;
00442629      
0044262d      int32_t const ebp = *(uint32_t*)eax_5;
00442636      int32_t* eax_6 = &this->rect.bottom;
00442636      
00442639      if (this->rect.bottom >= arg5)
0044263b          eax_6 = &arg5;
0044263b      
0044263f      int32_t bottom = ADJ(eax_6)->rect.bottom;
00442641      class RenderSurface* surface = this->surface;
00442652      uint32_t esi_2 = ((surface->pfDesc.blueBitMask | surface->pfDesc.greenBitMask) | surface->pfDesc.redBitMask);
0044265e      arg3 = surface->pfDesc.alphaBitMask;
0044265e      
0044266d      if (((surface->pfDesc.flags & 4) == 0 && SurfaceWindow::Lock(this, 0) != 0))
0044266d      {
0044268a          class RenderSurface* eax_7;
0044268a          eax_7 = this->surface->pfDesc.bitsPerPixel;
00442690          eax_7 u>>= 3;
00442695          int32_t const ecx_1 = ebp;
00442697          arg4 = ecx_1;
00442697          
0044269b          if (ebp < bottom)
0044269b          {
0044269d              uint32_t ebx = ((uint32_t)eax_7);
004426a2              int32_t edx_5 = (ebx * arg2);
004426a7              arg5 = edx_5;
004426a7              
004426f8              do
004426f8              {
004426bb                  int32_t right_1 = right;
004426bf                  void* eax_11 = (((this->pitch * ecx_1) + this->data) + edx_5);
004426bf                  
004426c5                  if (arg2 < right_1)
004426c5                  {
004426cd                      int32_t i_1 = (right_1 - arg2);
004426e3                      int32_t i;
004426e3                      
004426e3                      do
004426e3                      {
004426d0                          int32_t ecx_3 = *(uint32_t*)eax_11;
004426de                          *(uint32_t*)eax_11 = ((!(ecx_3) & esi_2) | (ecx_3 & arg3));
004426e0                          eax_11 += ebx;
004426e2                          i = i_1;
004426e2                          i_1 -= 1;
004426e3                      } while (i != 1);
004426e5                      ecx_1 = arg4;
004426e9                      edx_5 = arg5;
004426c5                  }
004426c5                  
004426f1                  ecx_1 += 1;
004426f4                  arg4 = ecx_1;
004426f8              } while (ecx_1 < bottom);
0044269b          }
0044269b          
004426fc          SurfaceWindow::Unlock(this);
00442704          int32_t eax_13;
00442704          eax_13 = 1;
0044270a          return 1;
0044266d      }
0044266d      
0044267e      surface = 0;
00442684      return 0;
004425e0  }

004426ad                                         8d 49 00                                                               .I.
0044270d                                         90 90 90                                                               ...

00442710  void __fastcall SmartArray<unsigned char,0>::Reset(class SmartArray<unsigned char,0>* this)

00442710  {
0044271b      bool cond:0 = (this->m_sizeAndDeallocate & 0x80000000) != 0x80000000;
00442720      this->m_num = 0;
00442720      
00442727      if (!(cond:0))
00442727      {
0044272c          operator delete[](this->m_data);
00442734          this->m_data = 0;
0044273a          this->m_sizeAndDeallocate = 0;
00442727      }
00442710  }

00442743           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00442750  uint8_t __thiscall SurfaceWindow::BlitAndColor(class SurfaceWindow* this, class SurfaceWindow const* arg2, enum BlitMode arg3, float arg4, class SurfaceWindow const* arg5, enum BlitMode arg6, uint32_t const arg7)

00442750  {
00442758      class SurfaceWindow* esi = arg2;
00442761      class SurfaceWindow* var_5c = esi;
00442765      uint8_t var_58 = 0;
0044276a      class SurfaceWindow* var_54 = arg5;
0044276e      uint8_t var_50 = 0;
0044276e      
00442773      if ((this != 0 && SurfaceWindow::Lock(this, 0) != 0))
00442773      {
0044278a          class RenderSurface* surface = this->surface;
0044278f          int32_t eax_3;
0044278f          
0044278f          if (surface == 0)
004427b4              eax_3 = 0xffffffff;
0044278f          else
0044278f          {
00442791              enum PixelFormatID format = surface->pfDesc.format;
00442791              
0044279a              if (format == PFID_R8G8B8)
004427ad                  eax_3 = 2;
0044279a              else if (format == 0x15)
004427a9                  eax_3 = 0;
0044279d              else if (format != 0x16)
004427b4                  eax_3 = 0xffffffff;
004427a0              else
004427a2                  eax_3 = 1;
0044278f          }
0044278f          
004427c5          int32_t pitch_2 = this->pitch;
004427c9          void* data_2 = this->data;
004427cd          enum BlitMode var_28 = Blit_NOP;
004427e2          int32_t ebx_3;
004427e2          int32_t ebp_1;
004427e2          int32_t var_c;
004427e2          int32_t var_8;
004427e2          
004427e2          if ((esi == 0 || arg3 == Blit_NOP))
004427e2          {
0044292e              ebx_3 = var_8;
00442932              ebp_1 = var_c;
004427e2          }
004427e2          else if (SurfaceWindowLocker::Lock(&var_5c, 1) == 0)
004427f5          {
0044292e              ebx_3 = var_8;
00442932              ebp_1 = var_c;
004427f5          }
004427f5          else
004427f5          {
004427fb              class RenderSurface* surface_1 = esi->surface;
00442800              var_28 = arg3;
00442800              
00442804              if (surface_1 == 0)
00442835                  arg2 = 0xffffffff;
00442804              else
00442804              {
00442806                  enum PixelFormatID format_1 = surface_1->pfDesc.format;
00442806                  
0044280f                  if (format_1 == PFID_R8G8B8)
0044282b                      arg2 = 2;
0044280f                  else if (format_1 == 0x15)
00442821                      arg2 = nullptr;
00442812                  else if (format_1 != 0x16)
00442835                      arg2 = 0xffffffff;
00442815                  else
00442817                      arg2 = 1;
00442804              }
00442804              
00442857              class SurfaceWindow* var_24_1 = arg2;
0044285e              int32_t pitch_1 = esi->pitch;
00442862              ebp_1 = (esi->rect.right - esi->rect.left);
00442865              ebx_3 = (esi->rect.bottom - esi->rect.top);
00442867              void* data_1 = esi->data;
0044286b              int32_t var_c_1 = ebp_1;
0044286f              int32_t var_8_1 = ebx_3;
0044287b              char var_4_1 = _ftol2();
00442882              int32_t eax_12 = (this->rect.right - this->rect.left);
00442882              
00442886              if (ebp_1 > eax_12)
00442886              {
00442888                  ebp_1 = eax_12;
0044288a                  int32_t var_c_2 = ebp_1;
00442886              }
00442886              
00442891              int32_t eax_14 = (this->rect.bottom - this->rect.top);
00442891              
00442896              if (ebx_3 > eax_14)
00442896              {
00442898                  ebx_3 = eax_14;
0044289a                  int32_t var_8_2 = ebx_3;
00442896              }
00442896              
004428ad              if ((eax_3 == 0xffffffff || arg2 == 0xffffffff))
004428ad              {
004428ba                  uint32_t ebx_4 = 4;
004428ba                  
004428bf                  if (arg3 == Blit_3Alpha)
004428c1                      ebx_4 = 0x14;
004428bf                  else if (arg3 == Blit_4Alpha)
004428cd                      ebx_4 = 0x54;
004428cd                  
004428da                  if (arg6 != Blit_NOP)
004428dc                      ebx_4 |= 0x20;
004428dc                  
004428eb                  RGBAColor::SetColor32(&var_54, arg7);
00442908                  ebx_4 = SurfaceWindow::LegacyBlit(this, esi, ebx_4, arg4, &var_54, arg5);
00442908                  
00442910                  if (var_58 != 0)
00442916                      SurfaceWindow::Unlock(var_5c);
00442916                  
0044291d                  SurfaceWindow::Unlock(this);
0044292b                  return ebx_4;
004428ad              }
004427f5          }
00442940          enum BlitMode var_44 = arg6;
00442940          
00442944          if (arg6 != Blit_NOP)
00442944          {
00442950              if (arg5 == 0)
00442950              {
004429f4                  int32_t var_3c_2 = 0;
004429fc                  int32_t var_30_2 = ebp_1;
00442a00                  int32_t var_2c_2 = ebx_3;
00442950              }
00442950              else
00442950              {
00442963                  int32_t eax_21;
00442963                  
00442963                  if (SurfaceWindowLocker::Lock(&var_54, 1) == 0)
00442963                  {
00442965                  label_442965:
00442965                      eax_21 = var_50;
00442965                      
0044296b                      if (eax_21 != 0)
00442971                          SurfaceWindow::Unlock(var_54);
00442971                      
00442976                      eax_21 = var_58;
00442976                      
0044297c                      if (eax_21 != 0)
00442982                          SurfaceWindow::Unlock(var_5c);
00442982                      
00442989                      SurfaceWindow::Unlock(this);
00442991                      int32_t eax_22;
00442991                      eax_22 = 0;
00442997                      return 0;
00442963                  }
00442963                  
0044299a                  class RenderSurface* surface_2 = arg5->surface;
0044299a                  
0044299f                  if (surface_2 == 0)
004429bf                      eax_21 = 0xffffffff;
0044299f                  else
0044299f                  {
004429a1                      enum PixelFormatID format_2 = surface_2->pfDesc.format;
004429a1                      
004429aa                      if (format_2 == PFID_A8R8G8B8)
004429b8                          eax_21 = 2;
004429aa                      else if (format_2 != PFID_A8)
004429bf                          eax_21 = 0xffffffff;
004429af                      else
004429b1                          eax_21 = 1;
0044299f                  }
0044299f                  
004429ce                  ebp_1 = (arg5->rect.right - arg5->rect.left);
004429d3                  void* data = arg5->data;
004429d7                  ebx_3 = (arg5->rect.bottom - arg5->rect.top);
004429dd                  int32_t var_3c_1 = eax_21;
004429e1                  int32_t pitch = arg5->pitch;
004429e5                  int32_t var_30_1 = ebp_1;
004429e9                  int32_t var_2c_1 = ebx_3;
004429e9                  
004429ed                  if (eax_21 == 0xffffffff)
004429ed                      goto label_442965;
00442950              }
00442950              
00442a0e              uint32_t const var_40_1 = arg7;
00442a15              int32_t eax_25 = (this->rect.right - this->rect.left);
00442a15              
00442a19              if (ebp_1 > eax_25)
00442a1b                  int32_t var_30_3 = eax_25;
00442a1b              
00442a22              int32_t eax_27 = (this->rect.bottom - this->rect.top);
00442a22              
00442a27              if (ebx_3 > eax_27)
00442a29                  int32_t var_2c_3 = eax_27;
00442944          }
00442944          
00442a37          SoftwareBlitAndColor(&var_28, &var_44);
00442a37          
00442a45          if (var_50 != 0)
00442a4b              SurfaceWindow::Unlock(var_54);
00442a4b          
00442a56          if (var_58 != 0)
00442a5c              SurfaceWindow::Unlock(var_5c);
00442a5c          
00442a63          SurfaceWindow::Unlock(this);
00442a6b          int32_t eax_29;
00442a6b          eax_29 = 1;
00442a71          return 1;
00442773      }
00442773      
00442781      class SurfaceWindow* eax;
00442781      eax = 0;
00442787      return 0;
00442750  }

00442a74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00442a80  uint8_t __thiscall SmartArray<unsigned char,0>::grow(class SmartArray<unsigned char,0>* this, uint32_t arg2)

00442a80  {
00442a8e      uint32_t eax;
00442a8e      
00442a8e      if (arg2 >= this->m_num)
00442a8e      {
00442a9a          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
00442a9a          {
00442afb              eax = 1;
00442afe              return 1;
00442a9a          }
00442a9a          
00442a9e          if (arg2 == 0)
00442a9e          {
00442aa0              SmartArray<unsigned char,0>::Reset(this);
00442aa7              int32_t eax_2;
00442aa7              eax_2 = 1;
00442aaa              return 1;
00442a9e          }
00442a9e          
00442ab3          uint32_t ebx_1 = operator new[](arg2);
00442ab3          
00442aba          if (ebx_1 != 0)
00442aba          {
00442abf              if (this->m_data != 0)
00442abf              {
00442ac1                  uint32_t m_num = this->m_num;
00442ac4                  int32_t eax_3 = (m_num - 1);
00442ac4                  
00442ac5                  if ((m_num - 1) >= 0)
00442ac5                  {
00442ad2                      int32_t temp2_1;
00442ad2                      
00442ad2                      do
00442ad2                      {
00442ac7                          temp2_1 = eax_3;
00442ac7                          eax_3 -= 1;
00442ace                          *(uint8_t*)((eax_3 + ebx_1) + 1) = this->m_data[(eax_3 + 1)];
00442ad2                      } while ((temp2_1 - 1) >= 0);
00442ac5                  }
00442ac5                  
00442ae1                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00442ae6                      operator delete[](this->m_data);
00442abf              }
00442abf              
00442af4              this->m_data = ebx_1;
00442af6              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00442afb              eax = 1;
00442afe              return 1;
00442aba          }
00442a8e      }
00442a8e      
00442b03      eax = 0;
00442b06      return 0;
00442a80  }

00442b09                             90 90 90 90 90 90 90                                                           .......

00442b10  uint8_t __thiscall SurfaceWindow::Blit(class SurfaceWindow* this, class SurfaceWindow const* arg2, enum BlitMode arg3, float arg4)

00442b10  {
00442b2d      return SurfaceWindow::BlitAndColor(this, arg2, arg3, arg4, nullptr, Blit_NOP, 0xff000000);
00442b10  }


00442b30  uint8_t __thiscall SurfaceWindow::Color(class SurfaceWindow* this, class SurfaceWindow const* arg2, enum BlitMode arg3, class RGBAColor const* arg4)

00442b30  {
00442b36      arg4->a;
00442b42      int32_t eax = _ftol2();
00442b47      arg4->r;
00442b54      int32_t eax_1 = _ftol2();
00442b59      arg4->g;
00442b67      int32_t eax_2 = _ftol2();
00442b6c      arg4->b;
00442b9f      return SurfaceWindow::BlitAndColor(this, nullptr, Blit_NOP, 1f, arg2, arg3, ((((((eax << 8) | eax_1) << 8) | eax_2) << 8) | _ftol2()));
00442b30  }

00442ba2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00442bb0  uint8_t __thiscall SurfaceWindow::Color(class SurfaceWindow* this, class SurfaceWindow const* arg2, enum BlitMode arg3, uint32_t arg4)

00442bb0  {
00442bcd      return SurfaceWindow::BlitAndColor(this, nullptr, Blit_NOP, 1f, arg2, arg3, arg4);
00442bb0  }


00442bd0  uint32_t __thiscall SurfaceWindow::DrawCharacter(class SurfaceWindow* this, int32_t const arg2, int32_t const arg3, class Font const* arg4, uint16_t const arg5, uint32_t arg6, uint32_t const arg7, uint32_t arg8)

00442bd0  {
00442bf0      if ((arg4 != 0 && this->lockCount > 0))
00442bf0      {
00442c00          class FontCharDesc* eax_3 = Font::GetCharDesc(arg4, arg5);
00442c00          
00442c07          if (eax_3 != 0)
00442c07          {
00442c0d              uint32_t m_Height = ((uint32_t)eax_3->m_Height);
00442c11              uint32_t m_Width = ((uint32_t)eax_3->m_Width);
00442c20              int32_t m_HorizontalOffsetBefore_1 = 0;
00442c29              uint32_t result;
00442c29              
00442c29              if ((arg7 & 1) != 0)
00442c2f                  result = (arg4->maxCharWidth + 1);
00442c29              else if ((*(uint8_t*)((char*)arg7)[1] & 0x10) == 0)
00442c4e                  result = m_Width;
00442c38              else
00442c38              {
00442c3a                  int32_t m_HorizontalOffsetBefore = ((int32_t)eax_3->m_HorizontalOffsetBefore);
00442c46                  result = ((((int32_t)eax_3->m_HorizontalOffsetAfter) + m_HorizontalOffsetBefore) + m_Width);
00442c4a                  m_HorizontalOffsetBefore_1 = m_HorizontalOffsetBefore;
00442c38              }
00442c38              
00442c5d              int32_t edx_3 = (m_HorizontalOffsetBefore_1 + arg2);
00442c59              eax_3->m_VerticalOffsetBefore;
00442c59              
00442c6d              if ((arg7 & 2) != 0)
00442c6f                  arg4->m_BaselineOffset;
00442c6f              
00442c7b              int32_t esi_5 = (this->rect.right - this->rect.left);
00442c80              uint8_t ecx_2 = (((int8_t)(arg7 >> 8)) & 1);
00442c87              int32_t var_98;
00442c87              int32_t* var_c8_2 = &var_98;
00442c9d              int32_t edi_2 = (this->rect.bottom - this->rect.top);
00442c9f              int32_t m_OffsetY = ((uint32_t)eax_3->m_OffsetY);
00442ca3              uint32_t m_OffsetX = ((uint32_t)eax_3->m_OffsetX);
00442cc0              void var_10;
00442cc0              CreateCharRectPair(m_OffsetX, 0, m_OffsetY, m_OffsetX, m_OffsetY, m_Width, m_Height, edx_3, esi_5, edi_2, nullptr, &var_10);
00442ce0              int32_t var_94;
00442ce0              int32_t var_90;
00442ce0              int32_t var_8c;
00442ce0              
00442ce0              if ((var_98 < var_90 && var_94 < var_8c))
00442ce0              {
00442ce6                  int32_t ecx_6 = arg4;
00442d02                  void var_88;
00442d02                  void* var_84;
00442d02                  void var_5c;
00442d02                  
00442d02                  if ((*(uint32_t*)(ecx_6 + 0x60) != 0 && (*(uint8_t*)((char*)arg7)[1] & 0x40) != 0))
00442d02                  {
00442d0f                      void var_30;
00442d0f                      void* var_c8_3 = &var_30;
00442d3a                      void var_20;
00442d3a                      CreateCharRectPair(m_OffsetX, *(uint32_t*)(ecx_6 + 0x40), ecx_6, m_OffsetX, m_OffsetY, m_Width, m_Height, edx_3, esi_5, edi_2, *(uint32_t*)(ecx_6 + 0x44), &var_20);
00442d5e                      SurfaceWindow::SurfaceWindow(&var_88, &arg4->m_pBackgroundSurface->window, &var_20);
00442d70                      SurfaceWindow::SurfaceWindow(&var_5c, this, &var_30);
00442d70                      
00442d7b                      if (ecx_2 != 0)
00442d86                          SurfaceWindow::CopyAlpha(&var_5c, &var_88);
00442d7b                      else if ((*(uint32_t*)((char*)var_84 + 0xdc) == 0x1c || *(uint8_t*)((char*)arg7)[1] < 0))
00442ddb                          SurfaceWindow::Color(&var_5c, &var_88, Blit_4Alpha, arg8);
00442da3                      else
00442dc1                          SurfaceWindow::BlitAndColor(&var_5c, &var_88, Blit_4Alpha, 1f, nullptr, Blit_NOP, 0xff000000);
00442d02                  }
00442d02                  
00442dea                  if ((*(uint8_t*)((char*)arg7)[1] & 0x20) == 0)
00442dea                  {
00442df7                      class RenderSurface* m_pForegroundSurface = arg4->m_pForegroundSurface;
00442df7                      
00442dfc                      if (m_pForegroundSurface != 0)
00442dfc                      {
00442e14                          SurfaceWindow::SurfaceWindow(&var_88, &m_pForegroundSurface->window, &var_10);
00442e23                          SurfaceWindow::SurfaceWindow(&var_5c, this, &var_98);
00442e23                          
00442e2e                          if (ecx_2 != 0)
00442e2e                          {
00442e39                              SurfaceWindow::CopyAlpha(&var_5c, &var_88);
00442e4c                              return result;
00442e2e                          }
00442e2e                          
00442e65                          if ((*(uint32_t*)((char*)var_84 + 0xdc) != 0x1c && *(uint8_t*)((char*)arg7)[1] >= 0))
00442e65                          {
00442e83                              SurfaceWindow::BlitAndColor(&var_5c, &var_88, Blit_4Alpha, 1f, nullptr, Blit_NOP, 0xff000000);
00442e96                              return result;
00442e65                          }
00442e65                          
00442eac                          SurfaceWindow::Color(&var_5c, &var_88, Blit_4Alpha, arg6);
00442dfc                      }
00442dea                  }
00442ce0              }
00442ce0              
00442ebf              return result;
00442c07          }
00442bf0      }
00442bf0      
00442ece      return 0;
00442bd0  }

00442ed1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00442ee0  uint8_t __thiscall SurfaceWindow::Fill(class SurfaceWindow* this, class RGBAColor const* arg2)

00442ee0  {
00442ee0      class SurfaceWindow* this_1 = this;
00442ee5      class RenderSurface* surface = this->surface;
00442ee5      
00442efc      if ((((surface->pfDesc.flags & 4) == 0 && surface->pfDesc.bitsPerPixel == 0x20) && SurfaceWindow::Lock(this, 0) != 0))
00442efc      {
00442f1f          int32_t i_4 = (this->rect.bottom - this->rect.top);
00442f21          uint32_t bitsPerPixel = ((uint32_t)surface->pfDesc.bitsPerPixel);
00442f25          int32_t esi_1 = (this->rect.right - this->rect.left);
00442f30          uint32_t eax_2 = (bitsPerPixel >> 3);
00442f33          uint32_t ebx_3 = ((bitsPerPixel * esi_1) >> 3);
00442f45          uint32_t edx = RGBAColor::GetColor32(arg2);
00442f47          arg2 = edx;
00442f47          
00442f4b          if (esi_1 <= 0x100)
00442f4b          {
00443019              uint32_t* data_1 = this->data;
00443019              
0044301f              if ((i_4 - 1) >= 0)
0044301f              {
00443022                  int32_t i_3 = i_4;
0044303d                  int32_t i;
0044303d                  
0044303d                  do
0044303d                  {
00443025                      uint32_t* data_2 = data_1;
00443025                      
00443027                      if ((esi_1 - 1) >= 0)
00443027                      {
00443029                          int32_t j_1 = esi_1;
00443037                          int32_t j;
00443037                          
00443037                          do
00443037                          {
00443030                              *(uint32_t*)data_2 = edx;
00443032                              data_2 += eax_2;
00443036                              j = j_1;
00443036                              j_1 -= 1;
00443037                          } while (j != 1);
00443027                      }
00443027                      
00443039                      data_1 += this->pitch;
0044303c                      i = i_3;
0044303c                      i_3 -= 1;
0044303d                  } while (i != 1);
0044301f              }
00442f4b          }
00442f4b          else
00442f4b          {
00442f58              if (((*(uint8_t*)$S99) & 1) == 0)
00442f58              {
00442f6a                  $S99 |= 1;
00442f70                  refRow.m_data = 0;
00442f75                  refRow.m_sizeAndDeallocate = 0;
00442f7a                  refRow.m_num = 0;
00442f7f                  atexit($E100);
00442f84                  edx = arg2;
00442f58              }
00442f58              
00442f97              bool cond:1_1;
00442f97              
00442f97              if ((refRow.m_sizeAndDeallocate & 0x7fffffff) < ebx_3)
00442f97              {
00442fa4                  cond:1_1 = SmartArray<unsigned char,0>::grow(&refRow, ebx_3) == 0;
00442fa6                  edx = arg2;
00442f97              }
00442f97              
00442faa              if (((refRow.m_sizeAndDeallocate & 0x7fffffff) >= ebx_3 || !(cond:1_1)))
00442fac                  refRow.m_num = ebx_3;
00442fac              
00442fb2              uint32_t* m_data = refRow.m_data;
00442fb2              
00442fba              if ((esi_1 - 1) >= 0)
00442fba              {
00442fbc                  int32_t i_2 = esi_1;
00442fc9                  int32_t i_1;
00442fc9                  
00442fc9                  do
00442fc9                  {
00442fc4                      *(uint32_t*)m_data = edx;
00442fc6                      m_data += eax_2;
00442fc8                      i_1 = i_2;
00442fc8                      i_2 -= 1;
00442fc9                  } while (i_1 != 1);
00442fba              }
00442fba              
00442fcb              void* data = this->data;
00442fcb              
00442fd1              if ((i_4 - 1) >= 0)
00442fd1              {
00442fd4                  arg2 = i_4;
00443006                  bool cond:3_1;
00443006                  
00443006                  do
00443006                  {
00442fef                      int32_t esi_5;
00442fef                      int32_t edi_4;
00442fef                      edi_4 = __builtin_memcpy(data, refRow.m_data, ((ebx_3 >> 2) << 2));
00442ff6                      __builtin_memcpy(edi_4, esi_5, (ebx_3 & 3));
00442fff                      data += this->pitch;
00443001                      cond:3_1 = arg2 != 1;
00443002                      arg2 -= 1;
00443006                  } while (cond:3_1);
0044300a                  SurfaceWindow::Unlock(this);
00443012                  int32_t eax_7;
00443012                  eax_7 = 1;
00443016                  return 1;
00442fd1              }
00442f4b          }
00442f4b          
00443041          SurfaceWindow::Unlock(this);
00443049          int32_t eax_8;
00443049          eax_8 = 1;
0044304d          return 1;
00442efc      }
00442efc      
00442f0e      return 0;
00442ee0  }

00442fda                                                                                8d 9b 00 00 00 00                            ......

00443050  uint8_t __thiscall SurfaceWindow::FillArea(class SurfaceWindow* this, class RGBAColor const* arg2, struct tagRECT const* arg3)

00443050  {
00443058      int32_t left = this->rect.left;
0044305b      int32_t s;
0044305b      __builtin_memset(&s, 0, 0x1d);
00443077      int32_t var_4 = 0;
0044307b      int32_t var_8 = 0;
0044308c      int32_t top_1 = arg3->top;
0044308f      int32_t var_3c = (arg3->left + left);
00443093      int32_t top = this->rect.top;
00443098      int32_t var_38 = (top_1 + top);
004430a2      int32_t edi_2 = (arg3->right + left);
004430a4      int32_t eax_2 = (arg3->bottom + top);
004430a6      class RenderSurface* surface = this->surface;
004430b3      int32_t var_2c = 0x798d14;
004430bb      int32_t var_34 = edi_2;
004430bf      int32_t var_30 = eax_2;
004430c3      SurfaceWindow::Attach(&var_2c, surface, &var_3c);
004430d1      class SurfaceWindow* this_1 = this;
004430df      return SurfaceWindow::Fill(&var_2c, arg2);
00443050  }

004430e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004430f0  uint8_t __thiscall SurfaceWindow::FillArea(class SurfaceWindow* this, class RGBAColor const* arg2, int32_t const arg3, int32_t const arg4, int32_t const arg5, int32_t const arg6)

004430f0  {
004430fb      int32_t const var_10 = arg3;
00443103      int32_t const var_c = arg4;
0044310d      int32_t var_8 = (arg5 + 1);
00443115      int32_t var_4 = (arg6 + 1);
00443127      return SurfaceWindow::FillArea(this, arg2, &var_10);
004430f0  }

0044312a                                90 90 90 90 90 90                                                            ......

00443130  uint8_t __fastcall SurfaceWindow::Blit(class SurfaceWindow* this, class SurfaceWindow const* arg2)

00443130  {
0044313b      if ((this != 0 && SurfaceWindow::Lock(this, 0) != 0))
0044313b      {
00443150          class SurfaceWindow* ebx_1 = arg2;
00443150          
00443156          if (ebx_1 != 0)
00443156          {
00443160              uint8_t eax_1;
00443160              uint32_t ecx_1;
00443160              eax_1 = SurfaceWindow::Lock(ebx_1, 1);
00443160              
00443167              if (eax_1 != 0)
00443167              {
0044316d                  class RenderSurface* surface_1 = ebx_1->surface;
00443177                  class RenderSurface* surface = this->surface;
00443177                  
0044317a                  if ((surface_1->pfDesc.flags & 4) == 0)
0044317a                  {
00443190                      if (this->pitch == ebx_1->pitch)
00443196                          ecx_1 = 1;
00443190                      else
00443192                          ecx_1 = 0;
0044317a                  }
0044317a                  else if ((surface->size == surface_1->size || this->pitch == ebx_1->pitch))
00443196                      ecx_1 = 1;
00443190                  else
00443192                      ecx_1 = 0;
00443192                  
004431b6                  if ((surface_1->pfDesc.format == surface->pfDesc.format && (ecx_1 != 0 && (this->rect.left == 0 && this->rect.top == 0))))
004431b6                  {
004431b8                      int32_t right = this->rect.right;
004431b8                      
004431be                      if (ebx_1->rect.right == right)
004431be                      {
004431c0                          int32_t bottom = this->rect.bottom;
004431c0                          
004431d6                          if ((ebx_1->rect.bottom == bottom && (right == surface->width && bottom == surface->height)))
004431d6                          {
004431d8                              uint32_t size = surface->size;
004431e9                              int32_t esi_1;
004431e9                              int32_t edi_2;
004431e9                              edi_2 = __builtin_memcpy(this->data, ebx_1->data, ((size >> 2) << 2));
004431f0                              __builtin_memcpy(edi_2, esi_1, (size & 3));
004431f4                              SurfaceWindow::Unlock(ebx_1);
004431fb                              SurfaceWindow::Unlock(this);
00443203                              int32_t eax_3;
00443203                              eax_3 = 1;
00443209                              return 1;
004431d6                          }
004431be                      }
004431b6                  }
004431b6                  
00443219                  enum PixelFormatID format = surface->pfDesc.format;
0044321f                  uint8_t eax_4;
0044321f                  
0044321f                  if (surface_1->pfDesc.format == PFID_A8)
0044321f                  {
00443263                      if (format != PFID_A8)
00443263                      {
00443274                          int32_t eax_7 = (ebx_1->rect.bottom - ebx_1->rect.top);
00443279                          int32_t ecx_14 = (this->rect.bottom - this->rect.top);
0044327e                          int32_t edx_5 = (ebx_1->rect.right - ebx_1->rect.left);
00443283                          int32_t esi_4 = (this->rect.right - this->rect.left);
00443285                          int32_t var_c = ecx_14;
0044328b                          arg2 = eax_7;
0044328f                          int32_t var_8 = edx_5;
00443293                          int32_t var_4 = esi_4;
00443297                          int32_t* ecx_15 = &arg2;
00443297                          
0044329b                          if (eax_7 >= ecx_14)
0044329d                              ecx_15 = &var_c;
0044329d                          
004432a3                          int32_t* eax_8 = &var_8;
004432a3                          
004432a7                          if (edx_5 >= esi_4)
004432a9                              eax_8 = &var_4;
004432a9                          
004432c0                          SurfaceWindow::FillArea(this, &RGBAColor_Black, 0, 0, (*(uint32_t*)eax_8 - 1), (*(uint32_t*)ecx_15 - 1));
00443263                      }
00443263                      
004432c8                      eax_4 = SurfaceWindow::CopyAlpha(this, ebx_1);
0044321f                  }
0044321f                  else if (format == PFID_A8)
004432c8                      eax_4 = SurfaceWindow::CopyAlpha(this, ebx_1);
00443223                  else
0044323c                      eax_4 = SurfaceWindow::BlitAndColor(this, ebx_1, Blit_Normal, 1f, nullptr, Blit_NOP, 0xff000000);
0044323c                  
00443243                  arg2 = eax_4;
00443247                  SurfaceWindow::Unlock(ebx_1);
0044324e                  SurfaceWindow::Unlock(this);
0044325e                  return arg2;
00443167              }
00443156          }
00443156          
004432d4          SurfaceWindow::Unlock(this);
0044313b      }
0044313b      
004432e2      return 0;
00443130  }

004432e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004432f0  void __fastcall Font::End(class Font* this)

004432f0  {
004432f3      this->vtable->ReleaseSubObjects();
004432f8      uint16_t* characterMap = this->characterMap;
004432f8      
004432fd      if (characterMap != 0)
004432fd      {
00443300          operator delete[](characterMap);
00443308          this->characterMap = nullptr;
004432fd      }
004432fd      
0044330f      class FontCharDesc* charDescs = this->charDescs;
0044330f      
00443314      if (charDescs != 0)
00443314      {
00443317          operator delete[](charDescs);
0044331f          this->charDescs = nullptr;
00443314      }
004432f0  }

00443328                          90 90 90 90 90 90 90 90                                                          ........

00443330  uint8_t __fastcall Font::ReleaseSubObjects(class Font* this)

00443330  {
00443333      class RenderSurface* m_pForegroundSurface = this->m_pForegroundSurface;
00443333      
00443338      if (m_pForegroundSurface != 0)
00443338      {
0044333a          m_pForegroundSurface->vtable->Release();
0044333f          this->m_pForegroundSurface = nullptr;
00443338      }
00443338      
00443346      class RenderSurface* m_pBackgroundSurface = this->m_pBackgroundSurface;
00443346      
0044334b      if (m_pBackgroundSurface != 0)
0044334b      {
0044334d          m_pBackgroundSurface->vtable->Release();
00443352          this->m_pBackgroundSurface = nullptr;
0044334b      }
0044334b      
00443359      int32_t eax;
00443359      eax = 1;
0044335c      return 1;
00443330  }

0044335d                                                                                         90 90 90                               ...

00443360  class FontCharDesc const* __thiscall Font::GetCharDesc(class Font const* this, uint16_t const arg2)

00443360  {
00443362      class FontCharDesc* charDescs = this->charDescs;
00443362      
00443369      if (charDescs != 0)
00443369      {
0044336b          uint16_t* characterMap = this->characterMap;
0044336e          uint16_t const edi_1 = arg2;
0044336e          
00443374          while (true)
00443374          {
00443374              void* eax;
00443374              
00443374              if (characterMap == 0)
00443374              {
004433b1                  uint32_t numCharacters = this->numCharacters;
004433b4                  eax = nullptr;
004433b4                  
004433b8                  if (numCharacters > 0)
004433b8                  {
004433ba                      int16_t* charDescs_1 = charDescs;
004433ba                      
004433cb                      do
004433cb                      {
004433c3                          if (*(uint16_t*)charDescs_1 == edi_1)
004433ae                              return ((eax * 0xb) + charDescs);
004433ae                          
004433c5                          eax += 1;
004433c6                          charDescs_1 += 0xb;
004433cb                      } while (eax < numCharacters);
004433b8                  }
00443374              }
00443374              else
00443374              {
00443376                  eax = this->minUnicodeChar;
00443376                  
00443383                  if ((edi_1 >= eax && edi_1 <= this->maxUnicodeChar))
00443383                  {
00443390                      uint32_t edx_2;
00443390                      edx_2 = characterMap[(((uint32_t)edi_1) - ((uint32_t)eax))];
00443394                      uint32_t eax_2 = ((uint32_t)edx_2);
00443394                      
00443399                      if (eax_2 >= this->numCharacters)
00443399                          break;
00443399                      
004433a0                      if ((eax_2 * 0xb) != -(charDescs))
004433ae                          return ((((uint32_t)edx_2) * 0xb) + charDescs);
00443383                  }
00443374              }
00443374              
004433d1              if (edi_1 == 0x3f)
004433d1                  break;
004433d1              
004433d3              edi_1 = 0x3f;
00443374          }
00443369      }
00443369      
004433e0      return 0;
00443360  }

004433e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004433f0  uint8_t const __thiscall Font::GetCharWidthA(class Font const* this, uint16_t const arg2)

004433f0  {
004433f5      class FontCharDesc* eax = Font::GetCharDesc(this, arg2);
004433f5      
004433fe      if (eax != 0)
00443412          return ((eax->m_HorizontalOffsetAfter + eax->m_HorizontalOffsetBefore) + eax->m_Width);
00443412      
00443415      eax = 0;
00443417      return 0;
004433f0  }

0044341a                                                                                90 90 90 90 90 90                            ......

00443420  uint8_t const __thiscall Font::ContainsChar(class Font const* this, uint16_t const arg2)

00443420  {
00443421      class FontCharDesc* charDescs = this->charDescs;
00443421      
00443428      if (charDescs != 0)
00443428      {
0044342a          uint16_t* characterMap = this->characterMap;
0044342f          char result = 1;
0044342f          
00443431          if (characterMap == 0)
00443464              return result;
00443464          
00443433          uint16_t minUnicodeChar = this->minUnicodeChar;
00443437          int32_t esi;
00443437          esi = arg2;
00443437          
00443445          if ((esi >= minUnicodeChar && esi <= this->maxUnicodeChar))
00443445          {
0044344f              uint32_t edx_1 = ((uint32_t)characterMap[(((uint32_t)esi) - ((uint32_t)minUnicodeChar))]);
0044344f              
0044345d              if ((edx_1 < this->numCharacters && (edx_1 * 0xb) != -(charDescs)))
00443464                  return result;
00443445          }
00443428      }
00443428      
0044345f      return 0;
00443420  }

00443467                       90 90 90 90 90 90 90 90 90                                                         .........

00443470  uint8_t __fastcall Font::GenerateCharacterMap(class Font* this)

00443470  {
00443473      class FontCharDesc* charDescs = this->charDescs;
00443479      uint32_t i;
00443479      
00443479      if (charDescs != 0)
00443479      {
00443482          int32_t ecx = 0;
00443484          bool cond:1_1 = this->numCharacters <= 0;
00443486          this->minUnicodeChar = 0xffff;
0044348c          this->maxUnicodeChar = 0;
0044348c          
00443492          if (!(cond:1_1))
00443492          {
00443494              i = 0;
00443494              
004434c4              do
004434c4              {
004434a3                  int16_t* eax;
004434a3                  eax = *(uint16_t*)((i * 0xb) + charDescs);
004434a3                  
004434ab                  if (eax < this->minUnicodeChar)
004434ad                      this->minUnicodeChar = eax;
004434ad                  
004434b5                  if (eax > this->maxUnicodeChar)
004434b7                      this->maxUnicodeChar = eax;
004434b7                  
004434be                  ecx += 1;
004434bf                  i = ((uint32_t)ecx);
004434c4              } while (i < this->numCharacters);
00443492          }
00443492          
004434c6          i = this->maxUnicodeChar;
004434ca          ecx = this->minUnicodeChar;
004434ca          
004434d1          if (i >= ecx)
004434d1          {
004434e0              this->unicodeRangeLength = ((((uint32_t)i) - ((uint32_t)ecx)) + 1);
004434e3              void* s = operator new[]((((((uint32_t)i) - ((uint32_t)ecx)) + 1) * 2));
004434eb              uint32_t ecx_3 = (this->unicodeRangeLength << 1);
004434f6              this->characterMap = s;
00443500              __builtin_memset(__builtin_memset(s, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00443508              int32_t eax_4 = 0;
00443508              
0044350c              if (this->numCharacters > 0)
0044350c              {
0044350e                  uint32_t i_1 = 0;
0044350e                  
00443530                  do
00443530                  {
00443520                      this->characterMap[(((uint32_t)*(uint16_t*)((i_1 * 0xb) + this->charDescs)) - ((uint32_t)this->minUnicodeChar))] = eax_4;
0044352a                      eax_4 += 1;
0044352b                      i_1 = ((uint32_t)eax_4);
00443530                  } while (i_1 < this->numCharacters);
0044350c              }
0044350c              
00443533              eax_4 = 1;
00443536              return 1;
004434d1          }
00443479      }
00443479      
00443538      i = 0;
0044353b      return 0;
00443470  }

00443498                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0044353c                                                                                      90 90 90 90                              ....

00443540  uint8_t __fastcall Font::LockSurfaces(class Font const* this)

00443540  {
00443543      class RenderSurface* m_pForegroundSurface = this->m_pForegroundSurface;
00443543      
00443548      if (m_pForegroundSurface == 0)
00443548      {
0044355b      label_44355b:
0044355b          class RenderSurface* m_pBackgroundSurface = this->m_pBackgroundSurface;
0044355b          
00443560          if (m_pBackgroundSurface != 0)
0044356a              m_pForegroundSurface = SurfaceWindow::Lock(&m_pBackgroundSurface->window, 1);
0044356a          
00443571          if ((m_pBackgroundSurface == 0 || m_pForegroundSurface != 0))
00443571          {
00443577              m_pForegroundSurface = 1;
0044357a              return 1;
00443571          }
00443548      }
00443548      else
00443548      {
00443552          m_pForegroundSurface = SurfaceWindow::Lock(&m_pForegroundSurface->window, 1);
00443552          
00443559          if (m_pForegroundSurface != 0)
00443559              goto label_44355b;
00443548      }
00443548      
00443573      m_pForegroundSurface = 0;
00443576      return 0;
00443540  }

0044357b                                                                                   90 90 90 90 90                             .....

00443580  uint8_t __fastcall Font::UnlockSurfaces(class Font const* this)

00443580  {
00443583      class RenderSurface* m_pForegroundSurface = this->m_pForegroundSurface;
00443583      
00443588      if (m_pForegroundSurface == 0)
00443588      {
00443599      label_443599:
00443599          class RenderSurface* m_pBackgroundSurface = this->m_pBackgroundSurface;
00443599          
0044359e          if (m_pBackgroundSurface != 0)
004435a6              m_pForegroundSurface = SurfaceWindow::Unlock(&m_pBackgroundSurface->window);
004435a6          
004435ad          if ((m_pBackgroundSurface == 0 || m_pForegroundSurface != 0))
004435ad          {
004435b3              m_pForegroundSurface = 1;
004435b6              return 1;
004435ad          }
00443588      }
00443588      else
00443588      {
00443590          m_pForegroundSurface = SurfaceWindow::Unlock(&m_pForegroundSurface->window);
00443590          
00443597          if (m_pForegroundSurface != 0)
00443597              goto label_443599;
00443588      }
00443588      
004435af      m_pForegroundSurface = 0;
004435b2      return 0;
00443580  }

004435b7                                                                       90 90 90 90 90 90 90 90 90                         .........

004435c0  uint8_t __fastcall Font::InitLoad(class Font* this)

004435c0  {
004435c3      uint8_t result = Font::GenerateCharacterMap(this);
004435c3      
004435ca      if (result != 0)
004435d1          return 1;
004435d1      
004435cd      return result;
004435c0  }

004435d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004435e0  uint8_t __fastcall Font::GetSubObjects(class Font* this)

004435e0  {
004435e7      uint32_t id = this->m_ForegroundSurfaceDataID.id;
004435f0      int32_t ebx;
004435f0      ebx = 1;
004435f2      void var_8;
004435f2      
004435f2      if (id != INVALID_DID.id)
004435f2      {
00443601          class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0xc));
0044360b          this->m_pForegroundSurface = eax_1;
0044360b          
0044360e          if (eax_1 == 0)
00443610              ebx = 0;
004435f2      }
004435f2      
00443612      class RenderSurface* id_1 = this->m_BackgroundSurfaceDataID.id;
00443612      
0044361b      if (id_1 != INVALID_DID.id)
0044361b      {
0044362a          id_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id_1, 0xc));
00443634          this->m_pBackgroundSurface = id_1;
00443634          
00443637          if (id_1 == 0)
00443637          {
0044363a              id_1 = 0;
00443640              return 0;
00443637          }
0044361b      }
0044361b      
00443642      id_1 = ebx;
00443648      return id_1;
004435e0  }

00443649                             90 90 90 90 90 90 90                                                           .......

00443650  void __thiscall Font::Serialize(class Font* this, class Archive* arg2)

00443650  {
00443659      DBObj::Serialize(this, arg2);
00443662      Archive::CheckAlignment(arg2, 4);
0044366b      uint8_t* eax = Archive::GetBytes(arg2, 4);
0044366b      
00443672      if (eax != 0)
00443672      {
00443678          if ((arg2->m_flags & 1) == 0)
00443683              this->maxCharHeight = *(uint32_t*)eax;
00443678          else
0044367d              *(uint32_t*)eax = this->maxCharHeight;
00443672      }
00443672      
0044368a      Archive::CheckAlignment(arg2, 4);
00443693      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
00443693      
0044369a      if (eax_1 != 0)
0044369a      {
004436a0          if ((arg2->m_flags & 1) == 0)
004436ab              this->maxCharWidth = *(uint32_t*)eax_1;
004436a0          else
004436a5              *(uint32_t*)eax_1 = this->maxCharWidth;
0044369a      }
0044369a      
004436b2      Archive::CheckAlignment(arg2, 4);
004436bb      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
004436bb      
004436c2      if (eax_2 != 0)
004436c2      {
004436c8          if ((arg2->m_flags & 1) == 0)
004436d3              this->numCharacters = *(uint32_t*)eax_2;
004436c8          else
004436cd              *(uint32_t*)eax_2 = this->numCharacters;
004436c2      }
004436c2      
004436d6      eax_2 = arg2->m_flags;
004436dd      eax_2 = !(eax_2);
004436df      uint32_t esi_1 = (this->numCharacters * 0xb);
004436df      
004436e5      if ((eax_2 & 1) != 0)
004436f0          this->charDescs = operator new[](esi_1);
004436f0      
004436f3      class FontCharDesc* charDescs = this->charDescs;
004436f9      uint8_t* eax_4 = Archive::GetBytes(arg2, esi_1);
004436f9      
00443700      if (eax_4 != 0)
00443700      {
00443708          uint32_t ecx_12;
00443708          int32_t esi_3;
00443708          int32_t edi_1;
00443708          
00443708          if ((arg2->m_flags & 1) == 0)
00443708          {
00443720              edi_1 = __builtin_memcpy(charDescs, eax_4, ((esi_1 >> 2) << 2));
00443722              ecx_12 = esi_1;
00443708          }
00443708          else
00443708          {
00443713              edi_1 = __builtin_memcpy(eax_4, charDescs, ((esi_1 >> 2) << 2));
00443715              ecx_12 = esi_1;
00443708          }
00443708          
00443727          __builtin_memcpy(edi_1, esi_3, (ecx_12 & 3));
00443700      }
00443700      
0044372d      Archive::CheckAlignment(arg2, 4);
00443736      uint8_t* eax_6 = Archive::GetBytes(arg2, 4);
00443736      
0044373f      if (eax_6 != 0)
0044373f      {
00443745          if ((arg2->m_flags & 1) == 0)
00443750              this->m_NumHorizontalBorderPixels = *(uint32_t*)eax_6;
00443745          else
0044374a              *(uint32_t*)eax_6 = this->m_NumHorizontalBorderPixels;
0044373f      }
0044373f      
00443757      Archive::CheckAlignment(arg2, 4);
00443760      uint8_t* eax_7 = Archive::GetBytes(arg2, 4);
00443760      
00443767      if (eax_7 != 0)
00443767      {
0044376d          if ((arg2->m_flags & 1) == 0)
00443778              this->m_NumVerticalBorderPixels = *(uint32_t*)eax_7;
0044376d          else
00443772              *(uint32_t*)eax_7 = this->m_NumVerticalBorderPixels;
00443767      }
00443767      
0044377f      Archive::CheckAlignment(arg2, 4);
00443788      uint8_t* eax_8 = Archive::GetBytes(arg2, 4);
00443788      
0044378f      if (eax_8 != 0)
0044378f      {
00443795          if ((arg2->m_flags & 1) == 0)
004437a0              this->m_BaselineOffset = *(uint32_t*)eax_8;
00443795          else
0044379a              *(uint32_t*)eax_8 = this->m_BaselineOffset;
0044378f      }
0044378f      
004437a7      Archive::CheckAlignment(arg2, 4);
004437b0      uint8_t* eax_9 = Archive::GetBytes(arg2, 4);
004437b0      
004437b7      if (eax_9 != 0)
004437b7      {
004437bd          if ((arg2->m_flags & 1) == 0)
004437c8              this->m_ForegroundSurfaceDataID.id = *(uint32_t*)eax_9;
004437bd          else
004437c2              *(uint32_t*)eax_9 = this->m_ForegroundSurfaceDataID.id;
004437b7      }
004437b7      
004437cf      Archive::CheckAlignment(arg2, 4);
004437d8      uint32_t* eax_10 = Archive::GetBytes(arg2, 4);
004437d8      
004437df      if (eax_10 != 0)
004437df      {
004437e5          if ((arg2->m_flags & 1) != 0)
004437e5          {
004437eb              *(uint32_t*)eax_10 = this->m_BackgroundSurfaceDataID.id;
004437ee              return;
004437e5          }
004437e5          
004437f3          this->m_BackgroundSurfaceDataID.id = *(uint32_t*)eax_10;
004437df      }
00443650  }

004437fb                                                                                   90 90 90 90 90                             .....

00443800  void __fastcall Font::Begin(class Font* this)

00443800  {
0044380e      __builtin_memset(&this->maxCharHeight, 0, 0x18);
00443820      class PSRefBufferCharData<char>* m_charbuffer = this->m_ForegroundSurfaceFileName.m_charbuffer;
00443820      
00443829      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
00443829      {
0044383a          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00443842              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00443842          
00443844          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044384f          this->m_ForegroundSurfaceFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00443852          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
00443829      }
00443829      
0044385e      this->m_ForegroundSurfaceDataID.id = INVALID_DID.id;
00443861      this->m_pForegroundSurface = nullptr;
00443864      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_BackgroundSurfaceFileName.m_charbuffer;
00443864      
0044386d      if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer)
0044386d      {
0044387e          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00443886              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00443886          
00443888          class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00443893          this->m_BackgroundSurfaceFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00443896          InterlockedIncrement((PStringBase<char>::s_NullBuffer_2 - 0x10));
0044386d      }
0044386d      
004438a2      this->m_pBackgroundSurface = nullptr;
004438a5      this->minUnicodeChar = 0;
004438a9      this->maxUnicodeChar = 0;
004438ad      this->unicodeRangeLength = 0;
004438b0      this->characterMap = nullptr;
004438b4      this->m_BackgroundSurfaceDataID.id = INVALID_DID.id;
00443800  }

004438bb                                                                                   90 90 90 90 90                             .....

004438c0  void __fastcall Font::Destroy(class Font* this)

004438c0  {
004438c3      this->vtable->ReleaseSubObjects();
004438c8      uint16_t* characterMap = this->characterMap;
004438c8      
004438cd      if (characterMap != 0)
004438cd      {
004438d0          operator delete[](characterMap);
004438d8          this->characterMap = nullptr;
004438cd      }
004438cd      
004438df      class FontCharDesc* charDescs = this->charDescs;
004438df      
004438e4      if (charDescs != 0)
004438e4      {
004438e7          operator delete[](charDescs);
004438ef          this->charDescs = nullptr;
004438e4      }
004438e4      
004438f9      /* tailcall */
004438f9      return Font::Begin(this);
004438c0  }

004438fe                                                                                            90 90                                ..

00443900  void __thiscall Font::GetSubDataIDs(class Font const* this, class QualifiedDataIDArray* arg2)

00443900  {
00443906      uint32_t id = this->m_ForegroundSurfaceDataID.id;
00443914      void var_8;
00443914      
00443914      if (id != INVALID_DID.id)
00443927          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, id, 0), 0);
00443927      
0044392c      uint32_t id_1 = this->m_BackgroundSurfaceDataID.id;
0044392c      
00443935      if (id_1 != INVALID_DID.id)
00443948          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, id_1, 0), 0);
00443900  }

00443955                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00443960  uint8_t RenderSurface::IsD3DFormat(enum PixelFormatID arg1)

00443960  {
0044396c      uint32_t eax;
0044396c      
0044396c      if ((arg1 - 0x29) <= 0xcb)
00443975          switch (arg1)
00443975          {
0044397c              case 0x29:
0044397c              case 0x65:
0044397c              case 0xf3:
0044397c              case 0xf4:
0044397c              {
0044397c                  eax = 0;
0044397e                  return 0;
0044397c                  break;
0044397c              }
00443975          }
00443975      
0044397f      eax = 1;
00443981      return 1;
00443960  }

00443982        8b ff                                                                                        ..
00443984  uint32_t jump_table_443984[0x2] = 
00443984  {
00443984      [0x0] =  0x0044397c
00443988      [0x1] =  0x0044397f
0044398c  }
0044398c  uint8_t lookup_table_44398c[0xcc] = 
0044398c  {
0044398c      [0x00] =  0x00
0044398d      [0x01] =  0x01
0044398e      [0x02] =  0x01
0044398f      [0x03] =  0x01
00443990      [0x04] =  0x01
00443991      [0x05] =  0x01
00443992      [0x06] =  0x01
00443993      [0x07] =  0x01
00443994      [0x08] =  0x01
00443995      [0x09] =  0x01
00443996      [0x0a] =  0x01
00443997      [0x0b] =  0x01
00443998      [0x0c] =  0x01
00443999      [0x0d] =  0x01
0044399a      [0x0e] =  0x01
0044399b      [0x0f] =  0x01
0044399c      [0x10] =  0x01
0044399d      [0x11] =  0x01
0044399e      [0x12] =  0x01
0044399f      [0x13] =  0x01
004439a0      [0x14] =  0x01
004439a1      [0x15] =  0x01
004439a2      [0x16] =  0x01
004439a3      [0x17] =  0x01
004439a4      [0x18] =  0x01
004439a5      [0x19] =  0x01
004439a6      [0x1a] =  0x01
004439a7      [0x1b] =  0x01
004439a8      [0x1c] =  0x01
004439a9      [0x1d] =  0x01
004439aa      [0x1e] =  0x01
004439ab      [0x1f] =  0x01
004439ac      [0x20] =  0x01
004439ad      [0x21] =  0x01
004439ae      [0x22] =  0x01
004439af      [0x23] =  0x01
004439b0      [0x24] =  0x01
004439b1      [0x25] =  0x01
004439b2      [0x26] =  0x01
004439b3      [0x27] =  0x01
004439b4      [0x28] =  0x01
004439b5      [0x29] =  0x01
004439b6      [0x2a] =  0x01
004439b7      [0x2b] =  0x01
004439b8      [0x2c] =  0x01
004439b9      [0x2d] =  0x01
004439ba      [0x2e] =  0x01
004439bb      [0x2f] =  0x01
004439bc      [0x30] =  0x01
004439bd      [0x31] =  0x01
004439be      [0x32] =  0x01
004439bf      [0x33] =  0x01
004439c0      [0x34] =  0x01
004439c1      [0x35] =  0x01
004439c2      [0x36] =  0x01
004439c3      [0x37] =  0x01
004439c4      [0x38] =  0x01
004439c5      [0x39] =  0x01
004439c6      [0x3a] =  0x01
004439c7      [0x3b] =  0x01
004439c8      [0x3c] =  0x00
004439c9      [0x3d] =  0x01
004439ca      [0x3e] =  0x01
004439cb      [0x3f] =  0x01
004439cc      [0x40] =  0x01
004439cd      [0x41] =  0x01
004439ce      [0x42] =  0x01
004439cf      [0x43] =  0x01
004439d0      [0x44] =  0x01
004439d1      [0x45] =  0x01
004439d2      [0x46] =  0x01
004439d3      [0x47] =  0x01
004439d4      [0x48] =  0x01
004439d5      [0x49] =  0x01
004439d6      [0x4a] =  0x01
004439d7      [0x4b] =  0x01
004439d8      [0x4c] =  0x01
004439d9      [0x4d] =  0x01
004439da      [0x4e] =  0x01
004439db      [0x4f] =  0x01
004439dc      [0x50] =  0x01
004439dd      [0x51] =  0x01
004439de      [0x52] =  0x01
004439df      [0x53] =  0x01
004439e0      [0x54] =  0x01
004439e1      [0x55] =  0x01
004439e2      [0x56] =  0x01
004439e3      [0x57] =  0x01
004439e4      [0x58] =  0x01
004439e5      [0x59] =  0x01
004439e6      [0x5a] =  0x01
004439e7      [0x5b] =  0x01
004439e8      [0x5c] =  0x01
004439e9      [0x5d] =  0x01
004439ea      [0x5e] =  0x01
004439eb      [0x5f] =  0x01
004439ec      [0x60] =  0x01
004439ed      [0x61] =  0x01
004439ee      [0x62] =  0x01
004439ef      [0x63] =  0x01
004439f0      [0x64] =  0x01
004439f1      [0x65] =  0x01
004439f2      [0x66] =  0x01
004439f3      [0x67] =  0x01
004439f4      [0x68] =  0x01
004439f5      [0x69] =  0x01
004439f6      [0x6a] =  0x01
004439f7      [0x6b] =  0x01
004439f8      [0x6c] =  0x01
004439f9      [0x6d] =  0x01
004439fa      [0x6e] =  0x01
004439fb      [0x6f] =  0x01
004439fc      [0x70] =  0x01
004439fd      [0x71] =  0x01
004439fe      [0x72] =  0x01
004439ff      [0x73] =  0x01
00443a00      [0x74] =  0x01
00443a01      [0x75] =  0x01
00443a02      [0x76] =  0x01
00443a03      [0x77] =  0x01
00443a04      [0x78] =  0x01
00443a05      [0x79] =  0x01
00443a06      [0x7a] =  0x01
00443a07      [0x7b] =  0x01
00443a08      [0x7c] =  0x01
00443a09      [0x7d] =  0x01
00443a0a      [0x7e] =  0x01
00443a0b      [0x7f] =  0x01
00443a0c      [0x80] =  0x01
00443a0d      [0x81] =  0x01
00443a0e      [0x82] =  0x01
00443a0f      [0x83] =  0x01
00443a10      [0x84] =  0x01
00443a11      [0x85] =  0x01
00443a12      [0x86] =  0x01
00443a13      [0x87] =  0x01
00443a14      [0x88] =  0x01
00443a15      [0x89] =  0x01
00443a16      [0x8a] =  0x01
00443a17      [0x8b] =  0x01
00443a18      [0x8c] =  0x01
00443a19      [0x8d] =  0x01
00443a1a      [0x8e] =  0x01
00443a1b      [0x8f] =  0x01
00443a1c      [0x90] =  0x01
00443a1d      [0x91] =  0x01
00443a1e      [0x92] =  0x01
00443a1f      [0x93] =  0x01
00443a20      [0x94] =  0x01
00443a21      [0x95] =  0x01
00443a22      [0x96] =  0x01
00443a23      [0x97] =  0x01
00443a24      [0x98] =  0x01
00443a25      [0x99] =  0x01
00443a26      [0x9a] =  0x01
00443a27      [0x9b] =  0x01
00443a28      [0x9c] =  0x01
00443a29      [0x9d] =  0x01
00443a2a      [0x9e] =  0x01
00443a2b      [0x9f] =  0x01
00443a2c      [0xa0] =  0x01
00443a2d      [0xa1] =  0x01
00443a2e      [0xa2] =  0x01
00443a2f      [0xa3] =  0x01
00443a30      [0xa4] =  0x01
00443a31      [0xa5] =  0x01
00443a32      [0xa6] =  0x01
00443a33      [0xa7] =  0x01
00443a34      [0xa8] =  0x01
00443a35      [0xa9] =  0x01
00443a36      [0xaa] =  0x01
00443a37      [0xab] =  0x01
00443a38      [0xac] =  0x01
00443a39      [0xad] =  0x01
00443a3a      [0xae] =  0x01
00443a3b      [0xaf] =  0x01
00443a3c      [0xb0] =  0x01
00443a3d      [0xb1] =  0x01
00443a3e      [0xb2] =  0x01
00443a3f      [0xb3] =  0x01
00443a40      [0xb4] =  0x01
00443a41      [0xb5] =  0x01
00443a42      [0xb6] =  0x01
00443a43      [0xb7] =  0x01
00443a44      [0xb8] =  0x01
00443a45      [0xb9] =  0x01
00443a46      [0xba] =  0x01
00443a47      [0xbb] =  0x01
00443a48      [0xbc] =  0x01
00443a49      [0xbd] =  0x01
00443a4a      [0xbe] =  0x01
00443a4b      [0xbf] =  0x01
00443a4c      [0xc0] =  0x01
00443a4d      [0xc1] =  0x01
00443a4e      [0xc2] =  0x01
00443a4f      [0xc3] =  0x01
00443a50      [0xc4] =  0x01
00443a51      [0xc5] =  0x01
00443a52      [0xc6] =  0x01
00443a53      [0xc7] =  0x01
00443a54      [0xc8] =  0x01
00443a55      [0xc9] =  0x01
00443a56      [0xca] =  0x00
00443a57      [0xcb] =  0x00
00443a58  }

00443a58                                                                          90 90 90 90 90 90 90 90                          ........

00443a60  void __fastcall RenderSurface::Begin(class RenderSurface* this)

00443a60  {
00443a6a      this->sourceData.width = 0;
00443a6d      this->sourceData.height = 0;
00443a70      this->sourceData.imageSize = 0;
00443a73      this->sourceData.sourceBits = nullptr;
00443a76      PixelFormatDesc::SetFormat(&this->sourceData.pfDesc, PFID_UNKNOWN);
00443a82      this->width = 0;
00443a88      this->height = 0;
00443a8e      this->size = 0;
00443a94      this->locked = 0;
00443a9a      PixelFormatDesc::SetFormat(&this->pfDesc, PFID_UNKNOWN);
00443a9f      this->m_pSurfaceBits = nullptr;
00443aaa      this->m_IsDirty = 0;
00443ab0      this->m_ReadOnlyLock = 0;
00443ab6      this->m_didPalatte.id = INVALID_DID.id;
00443a60  }

00443abf                                                                                               90                                 .

00443ac0  uint8_t __fastcall RenderSurface::InitLoad(class RenderSurface* this)

00443ac0  {
00443aca      if (DBCache::IsRunTime() != 0)
00443aca      {
00443ad0          uint8_t result = this->vtable->CreateFromSourceData();
00443ad0          
00443ad5          if (result == 0)
00443ad8              return result;
00443aca      }
00443aca      
00443adc      return 1;
00443ac0  }

00443add                                                                                         90 90 90                               ...

00443ae0  uint8_t __thiscall RenderSurface::Lock(class RenderSurface* this, struct tagRECT const* arg2, uint32_t const arg3, int32_t* arg4, void** arg5)

00443ae0  {
00443ae8      if (this->locked != 0)
00443b57          return 0;
00443b57      
00443af2      if (this->m_pSurfaceBits != 0)
00443af2      {
00443b09          int32_t esi_3 = ((this->width * ((uint32_t)this->pfDesc.bitsPerPixel)) >> 3);
00443b0c          *(uint32_t*)arg4 = esi_3;
00443b16          int32_t* edi_1 = arg2;
00443b1d          int32_t eax_5;
00443b1d          int32_t edx_2;
00443b1d          edx_2 = HIGHD(((int64_t)(((uint32_t)this->pfDesc.bitsPerPixel) * *(uint32_t*)edi_1)));
00443b1d          eax_5 = LOWD(((int64_t)(((uint32_t)this->pfDesc.bitsPerPixel) * *(uint32_t*)edi_1)));
00443b39          *(uint32_t*)arg5 = ((((eax_5 + (edx_2 & 7)) >> 3) + (edi_1[1] * esi_3)) + this->m_pSurfaceBits);
00443af2      }
00443af2      
00443b46      this->m_ReadOnlyLock = (((int8_t)(arg3 >> 1)) & 1);
00443b4c      this->locked = 1;
00443b52      return 1;
00443ae0  }

00443b5a                                                                                90 90 90 90 90 90                            ......

00443b60  void __fastcall RenderSurface::Unlock(class RenderSurface* this)

00443b60  {
00443b6a      if (this->locked != 0)
00443b6a      {
00443b72          if (this->m_ReadOnlyLock == 0)
00443b74              this->m_IsDirty = 1;
00443b74          
00443b7b          this->locked = 0;
00443b81          this->m_ReadOnlyLock = 0;
00443b6a      }
00443b60  }

00443b88                          90 90 90 90 90 90 90 90                                                          ........

00443b90  enum PixelFormatID __thiscall RenderSurface::SelectSurfaceFormat(class RenderSurface const* this, enum PixelFormatID const arg2)

00443b90  {
00443ba8      if ((DBCache::IsRunTime() != 0 && Render::m_pRenderer != 0))
00443ba8      {
00443bae          class Render* eax_1;
00443bae          eax_1 = HACK_formatConversion;
00443bae          
00443bb5          if (eax_1 != 0)
00443bb5          {
00443bca              if (RenderSurface::IsD3DFormat(arg2) == 0)
00443bd0                  return arg2;
00443bd0              
00443bd3              uint32_t m_dataCategory = this->m_dataCategory;
00443bd3              
00443bd9              if (m_dataCategory == 6)
00443be8                  return RenderDevice::GetUISurfaceFormat(RenderDevice::render_device);
00443be8              
00443bf0              if (m_dataCategory != 0xa)
00443bf0              {
00443bf2                  uint32_t flags = this->sourceData.pfDesc.flags;
00443bf2                  
00443bf8                  if ((flags & 4) == 0)
00443bf8                  {
00443c11                      int32_t edx_2 = (flags & 2);
00443c11                      
00443c19                      if ((edx_2 != 0 && (flags & 1) != 0))
00443c25                          return RenderDevice::render_device->m_displayInfo.pfARGBTextures;
00443c25                      
00443c2a                      if (edx_2 != 0)
00443c37                          return RenderDevice::render_device->m_displayInfo.pfAlphaTextures;
00443c37                      
00443c3d                      if ((flags & 1) != 0)
00443c4a                          return RenderDevice::render_device->m_displayInfo.pfRGBTextures;
00443bf8                  }
00443bf8                  else
00443bf8                  {
00443bfa                      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00443bfa                      
00443c05                      if (RenderDevice::render_device_1->m_caps.bCompressedTextures == 0)
00443c0c                          return RenderDevice::render_device_1->m_displayInfo.pfARGBTextures;
00443bf8                  }
00443bf0              }
00443bb5          }
00443ba8      }
00443ba8      
00443c4d      return arg2;
00443b90  }

00443c56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00443c60  uint8_t RenderSurface::SaveJPG(class RenderSurface const* this @ ecx, class PStringBase<char> const* arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00443c60  {
00443c65      int32_t* ecx = _chkstk();
00443c6a      int32_t esi;
00443c6a      int32_t var_4 = esi;
00443c6b      int32_t edi;
00443c6b      int32_t var_8 = edi;
00443c6b      int32_t* esp = &var_8;
00443c75      int32_t* esi_1 = ecx;
00443c77      void* var_18;
00443c77      
00443c77      if (ecx[0x37] == 0x14)
00443c77      {
00443cc3      label_443cc3:
00443cc3          void* const* var_c_3 = &__return_addr;
00443cc8          class PStringBase<char> const** var_10_2 = &arg2;
00443cc9          int32_t var_14_2 = 2;
00443cd1          __return_addr = nullptr;
00443cd9          int32_t edx_2 = *(uint32_t*)esi_1;
00443cdb          var_18 = &ecx[0x2e];
00443cdb          esp = &var_18;
00443cdb          
00443cef          if ((*(uint32_t*)(edx_2 + 0x60)(var_18, var_14_2, var_10_2, var_c_3) != 0 && var_10_2 != 0))
00443cef          {
00443cfa              esp = &var_18;
00443cfa              
00443d01              if (_ijlInit@4(&var_8) == 0)
00443d01              {
00443d11                  __return_addr = esi_1[0x28];
00443d1b                  arg2 = esi_1[0x29];
00443d23                  class PStringBase<char> const** var_4_1 = var_10_2;
00443d41                  arg_8 = ((char*)var_c_3 - ((((uint32_t)esi_1[0x3a]) * esi_1[0x28]) >> 3));
00443d51                  arg_18 = *(uint32_t*)arg_4e64;
00443d55                  arg_c = (((uint32_t)esi_1[0x3a]) >> 3);
00443d59                  arg_10 = 2;
00443d6c                  arg_24 = esi_1[0x28];
00443d76                  arg_2c = 3;
00443d7a                  arg_30 = 3;
00443d85                  arg_28 = esi_1[0x29];
00443d89                  arg_34 = 1;
00443d91                  arg_48 = 0x5a;
00443d99                  esp = &var_18;
00443d99                  
00443da0                  if (_ijlWrite@8(&var_8, 8) == IJL_OK)
00443da0                  {
00443dc4                      if (_ijlFree@4(&var_8) != 0)
00443dc4                      {
00443dc8                          *(uint32_t*)(*(uint32_t*)esi_1 + 0x64)();
00443dcc                          int32_t eax_11;
00443dcc                          eax_11 = 0;
00443dd5                          return 0;
00443dc4                      }
00443dc4                      
00443dda                      *(uint32_t*)(*(uint32_t*)esi_1 + 0x64)();
00443dda                      
00443ddf                      if (esi_1 != ecx)
00443de5                          *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
00443de5                      
00443de9                      int32_t eax_13;
00443de9                      eax_13 = 1;
00443df2                      return 1;
00443da0                  }
00443da0                  
00443da6                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x64)();
00443d01              }
00443cef          }
00443c77      }
00443c77      else
00443c77      {
00443c84          esi_1 = RenderDevice::render_device->vtable->CreateSurface();
00443c84          
00443c88          if (esi_1 != 0)
00443c88          {
00443c8e              int32_t eax_2 = ecx[0x29];
00443c9a              int32_t edx_1 = *(uint32_t*)esi_1;
00443c9c              int32_t var_c_1 = 1;
00443c9e              int32_t var_10_1 = 0x14;
00443ca1              var_18 = ecx[0x28];
00443ca4              esp = &var_8;
00443ca4              
00443ca9              if (*(uint32_t*)(edx_1 + 0x58)(var_18, eax_2, var_10_1, var_c_1) != 0)
00443ca9              {
00443cb4                  esp = &var_8;
00443cb4                  
00443cb9                  if (*(uint32_t*)(*(uint32_t*)esi_1 + 0x68)(ecx) != 0)
00443cb9                      goto label_443cc3;
00443ca9              }
00443c88          }
00443c77      }
00443da9      *(uint32_t*)esp;
00443daa      class PStringBase<char> const** eax_1;
00443daa      eax_1 = 0;
00443da9      esp[1];
00443db3      return 0;
00443c60  }

00443df5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00443e00  uint8_t __thiscall RenderSurface::Convert(class RenderSurface* this, class RenderSurface const* arg2)

00443e00  {
00443e08      enum PixelFormatID format_1 = arg2->pfDesc.format;
00443e10      enum PixelFormatID format = this->pfDesc.format;
00443e10      
00443e26      if ((format_1 == format && arg2->width == this->width))
00443e26      {
00443e28          uint32_t height = arg2->height;
00443e28          
00443e34          if (height == this->height)
00443e34          {
00443e3c              class SurfaceWindow* var_14 = &arg2->window;
00443e4c              return SurfaceWindow::Blit(&this->window, height);
00443e34          }
00443e26      }
00443e26      
00443e5a      int32_t* eax_1;
00443e5a      
00443e5a      if ((RenderSurface::IsD3DFormat(format) != 0 && RenderSurface::IsD3DFormat(format_1) != 0))
00443e5a      {
00443e69          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00443e69          
00443e71          if (RenderDevice::render_device_1 != 0)
00443e71          {
00443e7b              int32_t* this_1;
00443e7b              
00443e7b              if (this->m_pSurfaceBits == 0)
00443e7b              {
00443eb8                  this_1 = this;
00443eb4                  this->vtable->AddRef();
00443ec3              label_443ec3:
00443ec5                  int32_t* ebx_1;
00443ec5                  
00443ec5                  if (arg2->m_pSurfaceBits == 0)
00443ec5                  {
00443f1b                      ebx_1 = arg2;
00443f17                      arg2->vtable->AddRef();
00443f26                  label_443f26:
00443f26                      class SurfaceWindow* edx_6;
00443f26                      eax_1 = *(uint32_t*)(*(uint32_t*)this_1 + 0x68)(ebx_1);
00443f26                      
00443f2b                      if (eax_1 != 0)
00443f2b                      {
00443f39                          if (this->m_pSurfaceBits != 0)
00443f39                          {
00443f41                              void* var_14_5 = &this_1[0x2b];
00443f48                              eax_1 = SurfaceWindow::Blit(&this->window, edx_6);
00443f39                          }
00443f39                          
00443f4f                          if ((this->m_pSurfaceBits == 0 || eax_1 != 0))
00443f4f                          {
00443f59                              *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
00443f61                              *(uint32_t*)(*(uint32_t*)this_1 + 0x14)();
00443f67                              int32_t eax_13;
00443f67                              eax_13 = 1;
00443f6a                              return 1;
00443f4f                          }
00443f2b                      }
00443ec5                  }
00443ec5                  else
00443ec5                  {
00443ed2                      ebx_1 = RenderDevice::render_device->vtable->CreateSurface();
00443ed2                      
00443ed6                      if (ebx_1 != 0)
00443ed6                      {
00443ef3                          class SurfaceWindow* edx_4;
00443ef3                          eax_1 = *(uint32_t*)(*(uint32_t*)ebx_1 + 0x58)(arg2->width, arg2->height, arg2->pfDesc.format, 0);
00443ef3                          
00443ef8                          if (eax_1 != 0)
00443ef8                          {
00443f00                              class SurfaceWindow* var_14_3 = &arg2->window;
00443f07                              uint8_t result = SurfaceWindow::Blit(&ebx_1[0x2b], edx_4);
00443f07                              
00443f0e                              if (result == 0)
00443f14                                  return result;
00443f14                              
00443f0e                              goto label_443f26;
00443ef8                          }
00443ed6                      }
00443ec5                  }
00443e7b              }
00443e7b              else
00443e7b              {
00443e82                  this_1 = RenderDevice::render_device_1->vtable->CreateSurface();
00443e82                  
00443e86                  if ((this_1 != 0 && *(uint32_t*)(*(uint32_t*)this_1 + 0x58)(this->width, this->height, this->pfDesc.format, 0) != 0))
00443ea9                      goto label_443ec3;
00443e7b              }
00443e71          }
00443e5a      }
00443e5a      
00443eae      eax_1 = 0;
00443eb1      return 0;
00443e00  }

00443f6d                                         90 90 90                                                               ...

00443f70  void __fastcall RenderSurface::DestroySourceSurfaceBits(class RenderSurface* this)

00443f70  {
00443f73      uint8_t* sourceBits = this->sourceData.sourceBits;
00443f73      
00443f78      if (sourceBits != 0)
00443f78      {
00443f7b          operator delete[](sourceBits);
00443f83          this->sourceData.sourceBits = nullptr;
00443f78      }
00443f70  }

00443f8c                                      90 90 90 90                                                              ....

00443f90  void __fastcall RenderSurface::RenderSurface(class RenderSurface* this)

00443f90  {
00443f9a      DBObj::DBObj(this, INVALID_DID.id);
00443fa4      GraphicsResource::GraphicsResource(&this->vtable);
00443fac      this->vtable = 0x799690;
00443f9f      this->vtable = &RenderSurface::`vftable';
00443fb8      AvailableProperty::AvailableProperty(&this->sourceData.pfDesc);
00443fc3      SurfaceWindow::SurfaceWindow(&this->window);
00443fce      AvailableProperty::AvailableProperty(&this->pfDesc);
00443fd5      RenderSurface::Begin(this);
00443f90  }

00443fdf                                                                                               90                                 .

00443fe0  void* __thiscall RenderSurface::`vector deleting destructor'(class RenderSurface* this, uint32_t arg2)

00443fe0  {
00443fe3      /* tailcall */
00443fe3      return RenderSurface::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00443fe0  }

00443fe8                          cc cc cc cc cc cc cc cc                                                          ........

00443ff0  uint8_t __thiscall RenderSurface::Create(class RenderSurface* this, uint32_t arg2, uint32_t arg3, enum PixelFormatID arg4, uint8_t arg5)

00443ff0  {
00444000      this->height = arg3;
0044400d      this->width = arg2;
00444013      this->locked = 0;
0044401a      this->m_IsDirty = 0;
00444021      PixelFormatDesc::SetFormat(&this->pfDesc, arg4);
0044402d      uint32_t width = this->width;
00444033      uint32_t height = this->height;
00444051      this->size = (((((uint32_t)this->pfDesc.bitsPerPixel) * width) * height) >> 3);
00444057      SurfaceWindow::Attach(&this->window, this, 0, 0, (width - 1), (height - 1));
00444062      void* eax_2;
00444062      
00444062      if (arg5 != 0)
00444062      {
00444078      label_444078:
00444078          eax_2 = operator new[](this->size);
00444082          this->m_pSurfaceBits = eax_2;
00444082          
00444088          if (eax_2 == 0)
00444088          {
00444092              eax_2 = 0;
00444095              return 0;
00444088          }
00444062      }
00444062      else if (RenderSurface::IsD3DFormat(arg4) == 0)
0044406f          goto label_444078;
0044406f      
0044408b      eax_2 = 1;
0044408e      return 1;
00443ff0  }

00444098                                                                          90 90 90 90 90 90 90 90                          ........

004440a0  uint8_t RenderSurface::CreateFromSourceData(class RenderSurface* this @ ecx)

004440a0  {
004440a0      int32_t ebp;
004440a0      int32_t var_4 = ebp;
004440ab      int32_t* ecx = _chkstk();
004440b1      int32_t* var_10 = &var_4;
004440b1      
004440c8      if ((ecx[0x19] != 0 && RenderDevice::render_device != 0))
004440c8      {
004440ce          enum PixelFormatID esi_1 = ecx[0x1a];
004440dd          arg_4 = ecx[0x16];
004440e1          __return_addr = ecx[0x17];
004440e1          
004440e5          if (esi_1 != PFID_CUSTOM_RAW_JPEG)
004440e5          {
00444163          label_444163:
00444163              *(uint8_t*)((char*)var_4)[3] = 0;
00444168              enum PixelFormatID eax_5 = RenderSurface::SelectSurfaceFormat(ecx, esi_1);
00444173              int32_t* ebx_1;
00444173              
00444173              if (eax_5 == esi_1)
00444173              {
0044419c                  ebx_1 = ecx;
004441a0                  arg_10 = ebx_1;
004441a4                  *(uint32_t*)(*(uint32_t*)ecx + 0x10)();
00444173              }
00444173              else
00444173              {
0044417d                  *(uint8_t*)((char*)var_4)[3] = 1;
00444185                  ebx_1 = RenderDevice::render_device->vtable->CreateSurface();
00444189                  arg_10 = ebx_1;
00444189                  
0044418d                  if (ebx_1 == 0)
0044418d                  {
0044418f                      int32_t* eax_6;
0044418f                      eax_6 = 0;
00444197                      *(uint32_t*)var_10;
00444198                      return 0;
0044418d                  }
00444173              }
00444173              
004441bd              if (*(uint32_t*)(*(uint32_t*)ebx_1 + 0x58)(arg_4, __return_addr, esi_1, 1) == 0)
004441bd              {
00444373              label_444373:
00444373                  *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
00444376                  int32_t eax_27;
00444376                  eax_27 = 0;
0044437e                  *(uint32_t*)var_10;
0044437f                  return 0;
004441bd              }
004441bd              
004441df              if (*(uint32_t*)(*(uint32_t*)ebx_1 + 0x60)(&ebx_1[0x2e], 1, &arg_8, &arg_18) == 0)
004441df                  goto label_444373;
004441df              
004441e5              int32_t edx_3 = arg_18;
004441e5              
004441eb              if (edx_3 == 0)
004441eb              {
004441f1                  *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004441f4                  int32_t eax_13;
004441f4                  eax_13 = 0;
004441fc                  *(uint32_t*)var_10;
004441fd                  return 0;
004441eb              }
004441eb              
00444205              if (ecx[0x1a] != 0x1f4)
00444205              {
0044429a                  int32_t esi_2 = ecx[0x19];
0044429a                  
0044429d                  if ((ecx[0x1b] & 4) == 0)
0044429d                  {
004442c0                      uint32_t eax_20 = ((((uint32_t)ecx[0x1d]) * ecx[0x16]) >> 3);
004442c5                      arg_c = esi_2;
004442c5                      
004442c9                      if (arg_8 != eax_20)
004442c9                      {
004442e5                          arg_14 = 0;
004442e5                          
004442ed                          if (ecx[0x17] > 0)
004442ed                          {
00444329                              bool cond:7_1;
00444329                              
00444329                              do
00444329                              {
004442f8                                  uint32_t ecx_28 = ((((uint32_t)ecx[0x1d]) * ecx[0x16]) >> 3);
00444302                                  int32_t esi_5;
00444302                                  int32_t edi_6;
00444302                                  edi_6 = __builtin_memcpy(edx_3, esi_2, ((ecx_28 >> 2) << 2));
00444309                                  __builtin_memcpy(edi_6, esi_5, (ecx_28 & 3));
00444316                                  edx_3 += arg_8;
0044431c                                  esi_2 = (arg_c + eax_20);
0044431f                                  cond:7_1 = (arg_14 + 1) < ecx[0x17];
00444321                                  arg_c = esi_2;
00444325                                  arg_14 += 1;
00444329                              } while (cond:7_1);
0044432b                              ebx_1 = arg_10;
004442ed                          }
004442c9                      }
004442c9                      else
004442c9                      {
004442cb                          int32_t ecx_21 = ecx[0x18];
004442d5                          int32_t esi_4;
004442d5                          int32_t edi_4;
004442d5                          edi_4 = __builtin_memcpy(edx_3, esi_2, ((ecx_21 >> 2) << 2));
004442dc                          __builtin_memcpy(edi_4, esi_4, (ecx_21 & 3));
004442c9                      }
0044429d                  }
0044429d                  else
0044429d                  {
0044429f                      int32_t ecx_16 = ecx[0x18];
004442a9                      int32_t esi_3;
004442a9                      int32_t edi_2;
004442a9                      edi_2 = __builtin_memcpy(edx_3, esi_2, ((ecx_16 >> 2) << 2));
004442b0                      __builtin_memcpy(edi_2, esi_3, (ecx_16 & 3));
0044429d                  }
0044429d                  
00444333              label_444333:
00444333                  *(uint32_t*)(*(uint32_t*)ebx_1 + 0x64)();
00444338                  RenderSurface::DestroySourceSurfaceBits(ecx);
00444338                  
00444343                  if (*(uint8_t*)((char*)var_4)[3] == 0)
00444343                  {
00444384                  label_444384:
00444384                      *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
00444388                      int32_t eax_29;
00444388                      eax_29 = 1;
0044438f                      *(uint32_t*)var_10;
00444390                      return 1;
00444343                  }
00444343                  
00444360                  if ((*(uint32_t*)(*(uint32_t*)ecx + 0x58)(arg_4, __return_addr, eax_5, 1) != 0 && *(uint32_t*)(*(uint32_t*)ecx + 0x68)(ebx_1) != 0))
0044436d                      goto label_444384;
0044436d                  
00444343                  goto label_444373;
00444205              }
00444205              
0044420f              AvailableProperty::AvailableProperty(&arg_20);
00444219              PixelFormatDesc::SetFormat(&arg_20, esi_1);
0044422e              arg_60 = arg_4;
0044423b              __return_addr_1 = __return_addr;
00444249              arg_6c = 3;
00444250              arg_70 = 2;
0044425b              arg_68 = (arg_8 - ((((uint32_t)arg_2c) * arg_4) >> 3));
00444262              arg_5c = arg_18;
00444266              arg_90 = 3;
00444266              
00444274              if (_ijlRead@8(&s, 3) == 0)
00444274              {
00444286                  if (_ijlFree@4(&s) == 0)
00444286                      goto label_444333;
00444286                  
0044428c                  int32_t eax_17;
0044428c                  eax_17 = 0;
00444294                  *(uint32_t*)var_10;
00444295                  return 0;
00444274              }
004440e5          }
004440e5          else
004440e5          {
004440f6              void* var_1c_1 = &s;
004440f7              __builtin_memset(&s, 0, 0x4e68);
004440f7              
00444100              if (_ijlInit@4(var_1c_1) == 0)
00444100              {
0044410f                  arg_7c = ecx[0x19];
00444116                  arg_80 = ecx[0x18];
00444116                  
00444124                  if (_ijlRead@8(&s, 1) == 0)
00444124                  {
00444134                      arg_4 = arg_84;
00444146                      __return_addr = __return_addr_2;
0044414a                      esi_1 = PFID_R8G8B8;
0044414a                      
0044414f                      if (arg_8c == 3)
0044414f                          goto label_444163;
00444124                  }
00444100              }
004440e5          }
004440c8      }
004440c8      
00444151      class RenderDevice* eax_1;
00444151      eax_1 = 0;
00444159      *(uint32_t*)var_10;
0044415a      return 0;
004440a0  }

00444391                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004443a0  class DBObj* RenderSurface::Allocator()

004443a0  {
004443a7      if (DBCache::IsRunTime() == 0)
004443a7      {
004443c2          void* eax_2 = operator new(0x120);
004443c2          
004443cc          if (eax_2 != 0)
004443d0              /* tailcall */
004443d0              return RenderSurface::RenderSurface(eax_2);
004443a7      }
004443a7      else if (Render::m_pRenderer != 0)
004443ba          /* jump -> RenderDevice::render_device->vtable->CreateSurface */
004443ba      
004443d7      return 0;
004443a0  }

004443d8                                                                          90 90 90 90 90 90 90 90                          ........

004443e0  void __fastcall RenderSurface::Destroy(class RenderSurface* this)

004443e0  {
004443e3      uint8_t* sourceBits = this->sourceData.sourceBits;
004443e3      
004443e8      if (sourceBits != 0)
004443e8      {
004443eb          operator delete[](sourceBits);
004443f3          this->sourceData.sourceBits = nullptr;
004443e8      }
004443e8      
004443fa      void* m_pSurfaceBits = this->m_pSurfaceBits;
004443fa      
00444402      if (m_pSurfaceBits != 0)
00444402      {
00444405          operator delete[](m_pSurfaceBits);
0044440d          this->m_pSurfaceBits = nullptr;
00444402      }
00444402      
0044441a      /* tailcall */
0044441a      return RenderSurface::Begin(this);
004443e0  }

0044441f                                                                                               90                                 .

00444420  void __fastcall RenderSurface::~RenderSurface(class RenderSurface* this)

00444420  {
00444423      uint8_t* sourceBits = this->sourceData.sourceBits;
0044442c      this->vtable = 0x799690;
00444429      this->vtable = &RenderSurface::`vftable';
00444429      
00444438      if (sourceBits != 0)
00444438      {
0044443b          operator delete[](sourceBits);
00444443          this->sourceData.sourceBits = nullptr;
00444438      }
00444438      
0044444a      void* m_pSurfaceBits = this->m_pSurfaceBits;
0044444a      
00444452      if (m_pSurfaceBits != 0)
00444452      {
00444455          operator delete[](m_pSurfaceBits);
0044445d          this->m_pSurfaceBits = nullptr;
00444452      }
00444452      
00444467      this->window.vtable = 0x798d14;
00444473      SurfaceWindow::End(&this->window);
0044447a      GraphicsResource::~GraphicsResource(&this->vtable);
00444483      /* tailcall */
00444483      return DBObj::~DBObj(this);
00444420  }

00444488                          90 90 90 90 90 90 90 90                                                          ........

00444490  void __thiscall RenderSurface::GetSubDataIDs(class RenderSurface const* this, class QualifiedDataIDArray* arg2)

00444490  {
004444ac      void var_8;
004444ac      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->m_didPalatte.id, 0), 0);
00444490  }

004444b7                                                                       90 90 90 90 90 90 90 90 90                         .........

004444c0  void* __thiscall RenderSurface::`scalar deleting destructor'(class RenderSurface* this, uint32_t arg2)

004444c0  {
004444c3      RenderSurface::~RenderSurface(this);
004444c3      
004444cd      if ((arg2 & 1) != 0)
004444d0          operator delete(this);
004444d0      
004444db      return this;
004444c0  }

004444de                                                                                            90 90                                ..

004444e0  void __thiscall RenderSurface::Serialize(class RenderSurface* this, class Archive* arg2)

004444e0  {
004444e2      class Archive* ebp = arg2;
004444eb      DBObj::Serialize(this, ebp);
004444f4      Archive::CheckAlignment(ebp, 4);
004444fd      uint8_t* eax = Archive::GetBytes(ebp, 4);
004444fd      
00444504      if (eax != 0)
00444504      {
0044450a          if ((ebp->m_flags & 1) == 0)
00444515              this->sourceData.width = *(uint32_t*)eax;
0044450a          else
0044450f              *(uint32_t*)eax = this->sourceData.width;
00444504      }
00444504      
0044451c      Archive::CheckAlignment(ebp, 4);
00444525      uint8_t* eax_1 = Archive::GetBytes(ebp, 4);
00444525      
0044452c      if (eax_1 != 0)
0044452c      {
00444532          if ((ebp->m_flags & 1) == 0)
0044453d              this->sourceData.height = *(uint32_t*)eax_1;
00444532          else
00444537              *(uint32_t*)eax_1 = this->sourceData.height;
0044452c      }
0044452c      
00444540      enum PixelFormatID format = this->sourceData.pfDesc.format;
00444547      arg2 = format;
0044454b      enum PixelFormatID format_1 = format;
0044454d      Archive::CheckAlignment(ebp, 4);
00444556      uint8_t* eax_2 = Archive::GetBytes(ebp, 4);
00444556      
0044455d      if (eax_2 != 0)
0044455d      {
00444563          if ((ebp->m_flags & 1) == 0)
00444569              format_1 = *(uint32_t*)eax_2;
00444563          else
00444565              *(uint32_t*)eax_2 = format;
0044455d      }
0044455d      
0044456f      if ((ebp->m_flags & 5) == 0)
0044456f      {
00444571          arg2 = format_1;
00444575          format = format_1;
0044456f      }
0044456f      
0044457b      Archive::CheckAlignment(ebp, 4);
00444584      uint8_t* eax_3 = Archive::GetBytes(ebp, 4);
00444584      
0044458b      if (eax_3 != 0)
0044458b      {
00444591          if ((ebp->m_flags & 1) == 0)
0044459c              this->sourceData.imageSize = *(uint32_t*)eax_3;
00444591          else
00444596              *(uint32_t*)eax_3 = this->sourceData.imageSize;
0044458b      }
0044458b      
0044459f      eax_3 = ebp->m_flags;
004445a2      eax_3 = !(eax_3);
004445a2      
004445a6      if ((eax_3 & 1) != 0)
004445a6      {
004445a8          uint32_t m_dataCategory = this->m_dataCategory;
004445a8          
004445b3          if ((m_dataCategory == 6 || m_dataCategory == 0xa))
004445b9              m_dataCategory = 1;
004445b3          else
004445b5              m_dataCategory = 0;
004445b5          
004445bf          this->m_AllowedInFreeList = m_dataCategory;
004445c2          PixelFormatDesc::SetFormat(&this->sourceData.pfDesc, format);
004445c2          
004445e1          if (((this->sourceData.pfDesc.flags & 0x10) == 0 && this->sourceData.imageSize != (((((uint32_t)this->sourceData.pfDesc.bitsPerPixel) * this->sourceData.height) * this->sourceData.width) >> 3)))
004445e1          {
004445e5              Archive::RaiseError(ebp);
004445ee              return;
004445e1          }
004445e1          
004445f1          uint8_t* sourceBits = this->sourceData.sourceBits;
004445f1          
004445f6          if (sourceBits != 0)
004445f6          {
004445f9              operator delete[](sourceBits);
00444601              this->sourceData.sourceBits = nullptr;
004445f6          }
004445f6          
00444614          this->sourceData.sourceBits = operator new[](this->sourceData.imageSize);
004445a6      }
004445a6      
00444617      uint32_t imageSize = this->sourceData.imageSize;
0044461a      uint8_t* sourceBits_1 = this->sourceData.sourceBits;
00444620      uint8_t* eax_6 = Archive::GetBytes(ebp, imageSize);
00444620      
00444627      if (eax_6 != 0)
00444627      {
0044462f          uint32_t imageSize_1;
0044462f          int32_t esi_1;
0044462f          int32_t edi_1;
0044462f          
0044462f          if ((ebp->m_flags & 1) == 0)
0044462f          {
00444647              edi_1 = __builtin_memcpy(sourceBits_1, eax_6, ((imageSize >> 2) << 2));
00444649              imageSize_1 = imageSize;
0044462f          }
0044462f          else
0044462f          {
0044463a              edi_1 = __builtin_memcpy(eax_6, sourceBits_1, ((imageSize >> 2) << 2));
0044463c              imageSize_1 = imageSize;
0044462f          }
0044462f          
0044464e          __builtin_memcpy(edi_1, esi_1, (imageSize_1 & 3));
00444627      }
00444627      
0044465c      if ((arg2 == 0x29 || arg2 == 0x65))
0044465c      {
00444662          Archive::CheckAlignment(ebp, 4);
0044466b          uint8_t* eax_9 = Archive::GetBytes(ebp, 4);
0044466b          
00444672          if (eax_9 != 0)
00444672          {
00444678              if ((ebp->m_flags & 1) != 0)
00444678              {
00444683                  *(uint32_t*)eax_9 = this->m_didPalatte.id;
00444686                  return;
00444678              }
00444678              
0044468b              this->m_didPalatte.id = *(uint32_t*)eax_9;
00444672          }
0044465c      }
004444e0  }

00444698                                                                          90 90 90 90 90 90 90 90                          ........

004446a0  void __fastcall FileNodeName_Binary::FileNodeName_Binary(class FileNodeName_Binary* this)

004446a0  {
004446a6      this->vtable = 0x799750;
004446ac      SmartBuffer::SmartBuffer(&this->m_name);
004446a0  }

004446b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004446c0  class IFileNodeName* __fastcall FileNodeName_Binary::Clone(class FileNodeName_Binary const* this)

004446c0  {
004446c6      void* result = operator new(0x10);
004446c6      
004446d2      if (result == 0)
004446ef          return 0;
004446ef      
004446db      *(uint32_t*)result = 0x799750;
004446e1      SmartBuffer::SmartBuffer(((char*)result + 4), &this->m_name);
004446ea      return result;
004446c0  }


004446f0  void* __thiscall FileNodeName_Binary::`scalar deleting destructor'(class FileNodeName_Binary* this, uint32_t arg2)

004446f0  {
004446f6      this->vtable = 0x799750;
004446fc      SmartBuffer::~SmartBuffer(&this->m_name);
00444706      this->vtable = 0x79602c;
00444706      
0044470c      if ((arg2 & 1) != 0)
0044470f          operator delete(this);
0044470f      
0044471a      return this;
004446f0  }

0044471d                                                                                         90 90 90                               ...

00444720  enum Sidedness __thiscall Plane::which_side(class Plane const* this, class AC1Legacy::Vector3 const* arg2, float arg3)

00444720  {
00444738      long double x87_r7_4 = ((((((long double)arg2->z) * ((long double)this->N.z)) + (((long double)arg2->y) * ((long double)this->N.y))) + (((long double)arg2->x) * ((long double)this->N.x))) + ((long double)this->d));
0044473b      long double temp1 = ((long double)arg3);
0044473b      (x87_r7_4 - temp1);
0044473f      class AC1Legacy::Vector3* eax;
0044473f      eax = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0044473f      
00444744      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0044474a          return 0;
0044474a      
00444755      (x87_r7_4 - -(((long double)arg3)));
00444759      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00444759      
00444761      if (!(p))
00444768          return 1;
00444768      
00444763      return 2;
00444720  }

0044476b                                   90 90 90 90 90                                                             .....

00444770  void __fastcall _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>(struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>* this)

00444770  {
00444772      this->second = nullptr;
00444770  }

0044477a                                                                                90 90 90 90 90 90                            ......

00444780  void __thiscall FileNodeName_Binary::Serialize(class FileNodeName_Binary* this, class Archive* arg2)

00444780  {
00444789      Serializer::SerializeObject(&this->m_name, arg2);
00444780  }

00444794                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004447a0  void Serializer::SerializeObject(class SmartBuffer* arg1, class Archive* arg2)

004447a0  {
004447a4      class Archive* ebx = arg2;
004447a4      
004447b4      if ((((int8_t)ebx->m_flags) & 5) == 1)
004447bd          arg2 = SmartBuffer::GetSize(arg1);
004447bd      
004447c7      Serializer::SerializeObject(&arg2, ebx);
004447c7      
004447d4      if ((ebx->m_flags & 5) == 0)
004447d4      {
004447d8          uint32_t eax_3 = Archive::GetSizeLeft(ebx);
004447d8          
004447e1          if (arg2 > eax_3)
004447e1          {
004447fd              Archive::RaiseError(ebx);
00444807              return;
004447e1          }
004447e1          
004447ee          if (SmartBuffer::GetSize(arg1) < arg2)
004447ee          {
004447f9              if (SmartBuffer::CanGrow(arg1) == 0)
004447f9              {
004447fd                  Archive::RaiseError(ebx);
00444807                  return;
004447f9              }
004447f9              
00444811              SmartBuffer::ReconfigureAllocation(arg1, arg2, 1);
004447ee          }
004447d4      }
004447d4      
00444817      class Archive* esi = arg2;
0044481e      uint8_t* eax_6 = SmartBuffer::GetBuffer(arg1);
00444828      uint8_t* eax_7 = Archive::GetBytes(ebx, esi);
00444828      
0044482f      if (eax_7 != 0)
0044482f      {
00444837          class Archive* ecx_11;
00444837          int32_t esi_2;
00444837          int32_t edi_2;
00444837          
00444837          if ((ebx->m_flags & 1) == 0)
00444837          {
0044484f              edi_2 = __builtin_memcpy(eax_6, eax_7, ((esi >> 2) << 2));
00444851              ecx_11 = esi;
00444837          }
00444837          else
00444837          {
00444842              edi_2 = __builtin_memcpy(eax_7, eax_6, ((esi >> 2) << 2));
00444844              ecx_11 = esi;
00444837          }
00444837          
00444856          __builtin_memcpy(edi_2, esi_2, (ecx_11 & 3));
0044482f      }
0044482f      
0044486e      void __return;
0044486e      SmartBuffer::operator=(arg1, SmartBuffer::MakeWindow(arg1, &__return, 0, arg2));
00444877      SmartBuffer::~SmartBuffer(&__return);
004447a0  }

00444884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00444890  void Serializer::SerializeObject(uint32_t* arg1, class Archive* arg2)

00444890  {
00444899      Archive::CheckAlignment(arg2, 4);
004448a2      uint8_t* eax = Archive::GetBytes(arg2, 4);
004448a2      
004448a9      if (eax != 0)
004448a9      {
004448b3          if ((arg2->m_flags & 1) != 0)
004448b3          {
004448b7              *(uint32_t*)eax = *(uint32_t*)arg1;
004448ba              return;
004448b3          }
004448b3          
004448bd          *(uint32_t*)arg1 = *(uint32_t*)eax;
004448a9      }
00444890  }

004448c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004448d0  uint8_t __fastcall RenderMesh::GetMaterialsFromDatabase(class RenderMesh* this)

004448d0  {
004448d3      class RenderMeshMaterialArray* m_pMaterialArray = this->m_pMaterialArray;
004448e2      char var_d = 1;
004448e2      
004448e6      if (m_pMaterialArray != 0)
004448e6      {
004448eb          int32_t i = 0;
004448eb          
004448ef          if (m_pMaterialArray->m_Materials.m_num > 0)
004448ef          {
00444945              do
00444945              {
004448fc                  void* esi_1 = &m_pMaterialArray->m_Materials.m_data[i];
004448ff                  class IDClass<_tagDataID,32,0> eax_1 = *(uint32_t*)esi_1;
004448ff                  
00444903                  if (eax_1 != INVALID_DID.id)
00444903                  {
00444912                      void var_8;
00444912                      class DBObj* eax_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, eax_1, 0x21));
00444912                      
0044491e                      if (eax_3 != 0)
0044491e                      {
00444926                          int32_t* ecx_3 = *(uint32_t*)((char*)esi_1 + 4);
00444926                          
0044492b                          if (ecx_3 != 0)
0044492b                          {
0044492f                              *(uint32_t*)(*(uint32_t*)ecx_3 + 0x14)();
00444932                              *(uint32_t*)((char*)esi_1 + 4) = 0;
0044492b                          }
0044492b                          
00444935                          *(uint32_t*)((char*)esi_1 + 4) = eax_3;
0044491e                      }
0044491e                      else
00444920                          var_d = 0;
00444903                  }
00444903                  
0044493c                  m_pMaterialArray = this->m_pMaterialArray;
00444942                  i += 1;
00444945              } while (i < m_pMaterialArray->m_Materials.m_num);
00444945              
00444947              m_pMaterialArray = var_d;
00444952              return m_pMaterialArray;
004448ef          }
004448e6      }
004448e6      
00444954      m_pMaterialArray = 1;
0044495a      return 1;
004448d0  }

0044495b                                                                                   90 90 90 90 90                             .....

00444960  uint8_t __fastcall RenderMesh::ReleaseSubObjects(class RenderMesh* this)

00444960  {
00444963      class RenderMeshMaterialArray* m_pMaterialArray = this->m_pMaterialArray;
00444963      
00444969      if (m_pMaterialArray != 0)
00444969      {
0044496e          int32_t i = 0;
0044496e          
00444972          if (m_pMaterialArray->m_Materials.m_num > 0)
00444972          {
00444998              do
00444998              {
00444975                  struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>* m_data = m_pMaterialArray->m_Materials.m_data;
00444978                  int32_t* second = m_data[i].second;
00444978                  
00444981                  if (second != 0)
00444981                  {
00444985                      *(uint32_t*)(*(uint32_t*)second + 0x14)();
0044497e                      m_data[i].second = 0;
00444981                  }
00444981                  
0044498f                  m_pMaterialArray = this->m_pMaterialArray;
00444995                  i += 1;
00444998              } while (i < m_pMaterialArray->m_Materials.m_num);
00444972          }
00444969      }
00444969      
0044499c      m_pMaterialArray = 1;
0044499f      return 1;
00444960  }


004449a0  void __fastcall RenderMesh::CacheHasSkeletalData(class RenderMesh* this)

004449a0  {
004449a0      class RenderMesh* this_1 = this;
004449a4      bool cond:0 = this->m_RenderLODFragmentIndices.m_num <= 0;
004449a6      this->m_CachedHasSkeletalData = 0;
004449aa      int32_t var_4 = 0;
004449aa      
004449b2      if (!(cond:0))
004449b2      {
004449b5          uint32_t* m_data = this->m_RenderLODFragmentIndices.m_data;
004449c5          int32_t eax_2;
004449c5          void* edx_2;
004449c5          int32_t edi_1;
004449c5          
004449c5          while (true)
004449c5          {
004449c5              edx_2 = this->m_Fragments.m_data[*(uint32_t*)m_data];
004449c8              edi_1 = *(uint32_t*)((char*)edx_2 + 0x14);
004449cb              eax_2 = 0;
004449cb              
004449cf              if (edi_1 > 0)
004449cf                  break;
004449cf              
004449fd          label_4449fd:
004449fd              m_data = &m_data[1];
00444a00              bool cond:1_1 = (var_4 + 1) < this->m_RenderLODFragmentIndices.m_num;
00444a02              var_4 += 1;
00444a02              
00444a06              if (!(cond:1_1))
00444a0d                  return;
004449c5          }
004449c5          
004449d1          int32_t* esi_1 = *(uint32_t*)((char*)edx_2 + 0xc);
004449d1          
004449d4          while (true)
004449d4          {
004449d4              void* edx_3 = *(uint32_t*)esi_1;
004449d4              
004449eb              if (*(uint32_t*)(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)edx_3 + 0xc) + 0x3c) + 8) + (*(uint32_t*)((char*)edx_3 + 0x14) << 2)) + 0x20) > 0)
004449eb              {
00444a11                  this->m_CachedHasSkeletalData = 1;
00444a15                  break;
004449eb              }
004449eb              
004449ed              eax_2 += 1;
004449ee              esi_1 = &esi_1[1];
004449ee              
004449f3              if (eax_2 >= edi_1)
004449f3                  goto label_4449fd;
004449d4          }
004449b2      }
004449a0  }

004449bd                                                                                         8d 49 00                               .I.
00444a18                                                                          90 90 90 90 90 90 90 90                          ........

00444a20  void __fastcall RenderMesh::CacheRenderBoundingBox(class RenderMesh* this)

00444a20  {
00444a29      if (this->m_RenderLODFragmentIndices.m_num == 0)
00444a29      {
00444a38          __builtin_memcpy(&this->m_CachedRenderBoundingBox, 0x8ee170, 0x18);
00444a3c          return;
00444a29      }
00444a29      
00444a43      BBox::InitForAdjustment(&this->m_CachedRenderBoundingBox);
00444a50      void* edi_1 = this->m_Fragments.m_data[*(uint32_t*)this->m_RenderLODFragmentIndices.m_data];
00444a56      int32_t i = 0;
00444a56      
00444a5a      if (*(uint32_t*)((char*)edi_1 + 0x14) > 0)
00444a5a      {
00444a87          do
00444a87          {
00444a63              void* eax_4 = *(uint32_t*)(*(uint32_t*)((char*)edi_1 + 0xc) + (i << 2));
00444a7c              BBox::BuildBoundingBox((*(uint32_t*)(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)eax_4 + 0xc) + 0x3c) + 8) + (*(uint32_t*)((char*)eax_4 + 0x14) << 2)) + 0x88), &this->m_CachedRenderBoundingBox);
00444a84              i += 1;
00444a87          } while (i < *(uint32_t*)((char*)edi_1 + 0x14));
00444a5a      }
00444a20  }

00444a8d                                         90 90 90                                                               ...

00444a90  uint8_t __thiscall RenderMesh::DrawSubset(class RenderMesh* this, uint32_t const arg2)

00444a90  {
00444a93      uint32_t m_num = this->m_Fragments.m_num;
00444a99      int32_t eax = 0;
00444a9e      char var_11 = 0;
00444a9e      
00444aa3      if (m_num > 0)
00444aa3      {
00444aa5          class RenderMeshFragment** m_data = this->m_Fragments.m_data;
00444aac          class RenderMeshFragment** m_data_1 = m_data;
00444aac          
00444ab5          while (*(uint32_t*)m_data_1->m_AttribID != arg2)
00444ab5          {
00444ab7              eax += 1;
00444ab8              m_data_1 = &m_data_1[1];
00444ab8              
00444abd              if (eax >= m_num)
00444abd              {
00444ac2                  eax = 0;
00444ac8                  return 0;
00444abd              }
00444ab5          }
00444ab5          
00444acb          void* edi_3 = m_data[eax];
00444ad0          void* var_c_1 = edi_3;
00444ad0          
00444ad4          if (edi_3 != 0)
00444ad4          {
00444ae5              int32_t i = 0;
00444ae9              int32_t i_1 = 0;
00444ae9              
00444aed              if (*(uint32_t*)((char*)edi_3 + 0x14) > 0)
00444aed              {
00444bda                  do
00444bda                  {
00444af6                      void* esi_1 = *(uint32_t*)(*(uint32_t*)((char*)edi_3 + 0xc) + (i << 2));
00444b08                      int32_t* ebx_2 = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)esi_1 + 0xc) + 0x3c) + 8) + (*(uint32_t*)((char*)esi_1 + 0x14) << 2));
00444b0b                      arg2 = *(uint32_t*)((char*)esi_1 + 0x2c);
00444b12                      int32_t var_10 = *(uint32_t*)((char*)esi_1 + 0x30);
00444b16                      int32_t eax_3 = *(uint32_t*)((char*)esi_1 + 0x18);
00444b16                      
00444b1c                      if (eax_3 != 0xffffffff)
00444b1c                      {
00444b27                          class RenderIndexBuffer* edi_4 = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)esi_1 + 0xc) + 0x40) + 8) + (eax_3 << 2));
00444b2c                          RenderIndexBuffer::RecalculateMinMaxIndices(edi_4);
00444b31                          uint32_t m_nMaxVertexIndex = edi_4->m_nMaxVertexIndex;
00444b36                          RenderIndexBuffer::RecalculateMinMaxIndices(edi_4);
00444b3b                          uint32_t m_nMinVertexIndex = edi_4->m_nMinVertexIndex;
00444b44                          RenderIndexBuffer::RecalculateMinMaxIndices(edi_4);
00444b76                          char eax_8 = *(uint32_t*)(*(uint32_t*)ebx_2 + 0x14)(*(uint32_t*)((char*)esi_1 + 8), *(uint32_t*)((char*)esi_1 + 0x1c), *(uint32_t*)((char*)esi_1 + 0x20), edi_4->m_nMinVertexIndex, ((m_nMaxVertexIndex - m_nMinVertexIndex) + 1), 0, edi_4, 0, &arg2, &var_10, 1);
00444b7b                          edi_3 = var_c_1;
00444b7b                          
00444b7f                          if (eax_8 == 0)
00444b7f                              goto label_444bb2;
00444b7f                          
00444b81                          var_11 = 1;
00444b86                          goto label_444bb8;
00444b1c                      }
00444b1c                      
00444ba5                      if (*(uint32_t*)(*(uint32_t*)ebx_2 + 0x18)(*(uint32_t*)((char*)esi_1 + 8), 0, *(uint32_t*)((char*)esi_1 + 0x20), &arg2, &var_10) == 0)
00444ba5                      {
00444bb2                      label_444bb2:
00444bb2                          
00444bb4                          if (var_11 != 0)
00444bb4                              goto label_444bb8;
00444ba5                      }
00444ba5                      else
00444ba5                      {
00444ba7                          var_11 = 1;
00444bb8                      label_444bb8:
00444bb8                          *(uint32_t*)((char*)esi_1 + 0x24) = 0;
00444bbb                          *(uint32_t*)((char*)esi_1 + 0x28) = 0;
00444bc2                          *(uint32_t*)((char*)esi_1 + 0x2c) = arg2;
00444bc9                          *(uint32_t*)((char*)esi_1 + 0x30) = var_10;
00444ba5                      }
00444ba5                      
00444bd3                      i = (i_1 + 1);
00444bd6                      i_1 = i;
00444bda                  } while (i < *(uint32_t*)((char*)edi_3 + 0x14));
00444aed              }
00444aed              
00444be0              i = var_11;
00444beb              return i;
00444ad4          }
00444aa3      }
00444aa3      
00444ad9      eax = 0;
00444adf      return 0;
00444a90  }

00444bee                                            90 90                                                                ..

00444bf0  void __fastcall RenderMesh::GenerateTopologyForFragments(class RenderMesh* this)

00444bf0  {
00444bf4      RenderMesh::GetMaterialsFromDatabase(this);
00444bfc      int32_t i = 0;
00444bfc      
00444c00      if (this->m_RenderLODFragmentIndices.m_num > 0)
00444c00      {
00444c20          do
00444c20          {
00444c0b              class RenderMeshFragment* ecx_1 = this->m_Fragments.m_data[this->m_RenderLODFragmentIndices.m_data[i]];
00444c0b              
00444c13              if (ecx_1->m_pTopology == 0)
00444c15                  RenderMeshFragment::GenerateTopology(ecx_1);
00444c15              
00444c1d              i += 1;
00444c20          } while (i < this->m_RenderLODFragmentIndices.m_num);
00444c00      }
00444bf0  }

00444c25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00444c30  void __fastcall RenderMesh::OrganizeFragmentBatches(class RenderMesh* this)

00444c30  {
00444c34      RenderMesh::GetMaterialsFromDatabase(this);
00444c3c      int32_t i = 0;
00444c3c      
00444c40      if (this->m_RenderLODFragmentIndices.m_num > 0)
00444c40      {
00444c59          do
00444c59          {
00444c4e              RenderMeshFragment::OrganizeMaterialBatches(this->m_Fragments.m_data[this->m_RenderLODFragmentIndices.m_data[i]]);
00444c56              i += 1;
00444c59          } while (i < this->m_RenderLODFragmentIndices.m_num);
00444c40      }
00444c30  }

00444c5e                                                                                            90 90                                ..

00444c60  void __fastcall SmartArray<_STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>,1>::Reset(class SmartArray<_STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>,1>* this)

00444c60  {
00444c66      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00444c7a      this->m_num = 0;
00444c7a      
00444c7d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00444c7d      {
00444c7f          struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>* m_data = this->m_data;
00444c7f          
00444c83          if (m_data != 0)
00444c89              operator delete[](((char*)m_data - 4));
00444c89          
00444c91          this->m_data = 0;
00444c93          this->m_sizeAndDeallocate = 0;
00444c9b          return;
00444c7d      }
00444c7d      
00444c9e      if (this->m_data != 0)
00444c9e      {
00444ca0          int32_t eax_1 = (m_sizeAndDeallocate & 0x7fffffff);
00444ca5          int32_t eax_2 = (eax_1 - 1);
00444ca5          
00444ca6          if ((eax_1 - 1) >= 0)
00444ca6          {
00444cbb              int32_t temp1_1;
00444cbb              
00444cbb              do
00444cbb              {
00444cb0                  temp1_1 = eax_2;
00444cb0                  eax_2 -= 1;
00444cb1                  struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>* m_data_1 = this->m_data;
00444cb3                  int32_t var_8;
00444cb3                  m_data_1[(eax_2 + 1)].first.id = var_8;
00444cb7                  *(uint32_t*)(&m_data_1[eax_2] + 0xc) = 0;
00444cbb              } while ((temp1_1 - 1) >= 0);
00444ca6          }
00444c9e      }
00444c60  }

00444cc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00444cd0  uint8_t __thiscall SmartArray<_STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>,1>::grow(class SmartArray<_STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>,1>* this, uint32_t arg2)

00444cd0  {
00444cdc      uint32_t* m_data;
00444cdc      
00444cdc      if (arg2 >= this->m_num)
00444cdc      {
00444cec          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
00444cec          {
00444d83              m_data = 1;
00444d86              return 1;
00444cec          }
00444cec          
00444cf4          if (arg2 == 0)
00444cf4          {
00444cf6              SmartArray<_STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>,1>::Reset(this);
00444cfd              int32_t eax_1;
00444cfd              eax_1 = 1;
00444d00              return 1;
00444cf4          }
00444cf4          
00444d0b          m_data = operator new[](((arg2 << 3) + 4));
00444d0b          
00444d15          if (m_data != 0)
00444d15          {
00444d1d              void* edi_1 = &m_data[1];
00444d23              *(uint32_t*)m_data = arg2;
00444d25              `vector constructor iterator'(edi_1, 8, arg2, _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>);
00444d25              
00444d2c              if (edi_1 != 0)
00444d2c              {
00444d31                  if (this->m_data != 0)
00444d31                  {
00444d33                      uint32_t m_num = this->m_num;
00444d36                      int32_t eax_2 = (m_num - 1);
00444d36                      
00444d37                      if ((m_num - 1) >= 0)
00444d37                      {
00444d53                          int32_t temp2_1;
00444d53                          
00444d53                          do
00444d53                          {
00444d40                              temp2_1 = eax_2;
00444d40                              eax_2 -= 1;
00444d41                              struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>* m_data_1 = this->m_data;
00444d47                              *(uint32_t*)(((char*)edi_1 + (eax_2 << 3)) + 8) = m_data_1[(eax_2 + 1)].first.id;
00444d4f                              *(uint32_t*)(((char*)edi_1 + (eax_2 << 3)) + 0xc) = *(uint32_t*)(&m_data_1[eax_2] + 0xc);
00444d53                          } while ((temp2_1 - 1) >= 0);
00444d37                      }
00444d37                      
00444d62                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00444d62                      {
00444d64                          m_data = this->m_data;
00444d64                          
00444d68                          if (m_data != 0)
00444d6e                              operator delete[](&m_data[-1]);
00444d62                      }
00444d31                  }
00444d31                  
00444d7c                  this->m_data = edi_1;
00444d7e                  this->m_sizeAndDeallocate = (arg2 | 0x80000000);
00444d83                  m_data = 1;
00444d86                  return 1;
00444d2c              }
00444d15          }
00444cdc      }
00444cdc      
00444d8b      m_data = 0;
00444d8e      return 0;
00444cd0  }

00444d91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00444da0  uint8_t __thiscall PFileNode::GetNameAsBinary(class PFileNode const* this, class SmartBuffer* arg2)

00444da0  {
00444da0      class PFileNode* this_1 = this;
00444da5      class IFileNodeName* m_pcName = this->m_pcName;
00444da8      int32_t ebx;
00444da8      ebx = 0;
00444da8      
00444dac      if (m_pcName != 0)
00444dac      {
00444db7          bool cond:0_1 = m_pcName->vtable->GetType() != 9;
00444dba          class IFileNodeName* m_pcName_1 = this->m_pcName;
00444dba          
00444dbd          if (!(cond:0_1))
00444dbd          {
00444dc7              SmartBuffer::operator=(arg2, &m_pcName_1[1]);
00444dcd              class SmartBuffer* eax_3;
00444dcd              eax_3 = 1;
00444dd1              return 1;
00444dbd          }
00444dbd          
00444dd4          m_pcName_1->vtable->ToPString(&this_1);
00444de6          class IFileNodeName* edi_1 = operator new(0x10);
00444de6          
00444ded          if (edi_1 == 0)
00444dff              edi_1 = nullptr;
00444ded          else
00444ded          {
00444df2              edi_1->vtable = 0x799750;
00444df8              SmartBuffer::SmartBuffer(&edi_1[1]);
00444ded          }
00444ded          
00444e0f          if (edi_1->vtable->FromPString(&this_1) == 0)
00444e32              edi_1->vtable->__vecDelDtor(1);
00444e0f          else
00444e0f          {
00444e19              SmartBuffer::operator=(arg2, &edi_1[1]);
00444e1e              class IFileNodeName* m_pcName_2 = this->m_pcName;
00444e1e              
00444e23              if (m_pcName_2 != 0)
00444e25                  m_pcName_2->vtable->__vecDelDtor(1);
00444e25              
00444e2b              this->m_pcName = edi_1;
00444e2e              ebx = 1;
00444e0f          }
00444e0f          
00444e3e          void* __offset(PFileNode, -0x14) esi_2 = ((char*)this_1 - 0x14);
00444e3e          
00444e52          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00444e5a              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00444dac      }
00444dac      
00444e5d      int32_t eax;
00444e5d      eax = ebx;
00444e61      return eax;
00444da0  }

00444e64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00444e70  void __fastcall RenderMeshMaterialArray::~RenderMeshMaterialArray(class RenderMeshMaterialArray* this)

00444e70  {
00444e77      int32_t i = 0;
00444e79      bool cond:0 = this->m_Materials.m_num <= 0;
00444e7b      this->vtable = 0x799770;
00444e7b      
00444e81      if (!(cond:0))
00444e81      {
00444ea4          do
00444ea4          {
00444e86              int32_t* second = this->m_Materials.m_data[i].second;
00444e86              
00444e8c              if (second != 0)
00444e8c              {
00444e90                  *(uint32_t*)(*(uint32_t*)second + 0x14)();
00444e93                  this->m_Materials.m_data[i].second = 0;
00444e8c              }
00444e8c              
00444ea1              i += 1;
00444ea4          } while (i < this->m_Materials.m_num);
00444e81      }
00444e81      
00444eab      SmartArray<_STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>,1>::Reset(&this->m_Materials);
00444eab      
00444ebf      if ((this->m_Materials.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00444ebf      {
00444ec1          struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>* m_data = this->m_Materials.m_data;
00444ec1          
00444ec5          if (m_data != 0)
00444ecb              operator delete[](((char*)m_data - 4));
00444ebf      }
00444ebf      
00444ed4      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00444e70  }

00444edc                                                                                      90 90 90 90                              ....

00444ee0  void __fastcall RenderMeshVerticesArray::~RenderMeshVerticesArray(class RenderMeshVerticesArray* this)

00444ee0  {
00444ee7      int32_t i = 0;
00444ee9      bool cond:0 = this->m_VertexArrays.m_num <= 0;
00444eeb      this->vtable = 0x799774;
00444eeb      
00444ef1      if (!(cond:0))
00444ef1      {
00444f18          do
00444f18          {
00444ef6              int32_t* ecx = this->m_VertexArrays.m_data[i];
00444ef6              
00444efb              if (ecx != 0)
00444efb              {
00444efd                  int32_t temp0_1 = ecx[1];
00444efd                  ecx[1] -= 1;
00444efd                  
00444f00                  if (temp0_1 == 1)
00444f06                      **(uint32_t**)ecx(1);
00444f06                  
00444f08                  this->m_VertexArrays.m_data[i] = 0;
00444efb              }
00444efb              
00444f15              i += 1;
00444f18          } while (i < this->m_VertexArrays.m_num);
00444ef1      }
00444ef1      
00444f1a      uint32_t m_sizeAndDeallocate = this->m_VertexArrays.m_sizeAndDeallocate;
00444f2b      this->m_VertexArrays.m_num = 0;
00444f2b      
00444f32      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00444f32      {
00444f38          operator delete[](this->m_VertexArrays.m_data);
00444f40          this->m_VertexArrays.m_data = 0;
00444f47          this->m_VertexArrays.m_sizeAndDeallocate = 0;
00444f32      }
00444f32      else if (this->m_VertexArrays.m_data != 0)
00444f55      {
00444f57          int32_t eax_4 = (m_sizeAndDeallocate & 0x7fffffff);
00444f5c          int32_t eax_5 = (eax_4 - 1);
00444f5c          
00444f5d          if ((eax_4 - 1) >= 0)
00444f5d          {
00444f6c              int32_t temp2_1;
00444f6c              
00444f6c              do
00444f6c              {
00444f60                  temp2_1 = eax_5;
00444f60                  eax_5 -= 1;
00444f61                  this->m_VertexArrays.m_data[(eax_5 + 1)] = 0;
00444f6c              } while ((temp2_1 - 1) >= 0);
00444f5d          }
00444f55      }
00444f55      
00444f7d      if ((this->m_VertexArrays.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00444f83          operator delete[](this->m_VertexArrays.m_data);
00444f83      
00444f8c      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00444ee0  }

00444f94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00444fa0  void __fastcall RenderMeshIndicesArray::~RenderMeshIndicesArray(class RenderMeshIndicesArray* this)

00444fa0  {
00444fa7      int32_t i = 0;
00444fa9      bool cond:0 = this->m_IndexArrays.m_num <= 0;
00444fab      this->vtable = &RenderMeshIndicesArray::`vftable';
00444fab      
00444fb1      if (!(cond:0))
00444fb1      {
00444fd3          do
00444fd3          {
00444fb6              int32_t* ecx = this->m_IndexArrays.m_data[i];
00444fb6              
00444fbb              if (ecx != 0)
00444fc1                  **(uint32_t**)ecx(1);
00444fc1              
00444fc3              this->m_IndexArrays.m_data[i] = 0;
00444fd0              i += 1;
00444fd3          } while (i < this->m_IndexArrays.m_num);
00444fb1      }
00444fb1      
00444fd5      uint32_t m_sizeAndDeallocate = this->m_IndexArrays.m_sizeAndDeallocate;
00444fe6      this->m_IndexArrays.m_num = 0;
00444fe6      
00444fed      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00444fed      {
00444ff3          operator delete[](this->m_IndexArrays.m_data);
00444ffb          this->m_IndexArrays.m_data = 0;
00445002          this->m_IndexArrays.m_sizeAndDeallocate = 0;
00444fed      }
00444fed      else if (this->m_IndexArrays.m_data != 0)
00445010      {
00445012          int32_t eax_4 = (m_sizeAndDeallocate & 0x7fffffff);
00445017          int32_t eax_5 = (eax_4 - 1);
00445017          
00445018          if ((eax_4 - 1) >= 0)
00445018          {
0044502c              int32_t temp1_1;
0044502c              
0044502c              do
0044502c              {
00445020                  temp1_1 = eax_5;
00445020                  eax_5 -= 1;
00445021                  this->m_IndexArrays.m_data[(eax_5 + 1)] = 0;
0044502c              } while ((temp1_1 - 1) >= 0);
00445018          }
00445010      }
00445010      
0044503d      if ((this->m_IndexArrays.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00445043          operator delete[](this->m_IndexArrays.m_data);
00445043      
0044504c      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00444fa0  }

00445054                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00445060  void __fastcall RenderMesh::RenderMesh(class RenderMesh* this)

00445060  {
00445069      DBObj::DBObj(this, INVALID_DID.id);
0044506e      this->vtable = 0x799780;
00445074      this->m_InstanceFlags = 7;
0044507d      __builtin_memset(&this->m_MeshAppearanceType, 0, 0x34);
004450a4      this->m_CachedSupportsLighting = 0;
004450a7      this->m_CachedSupportsMultiPassLighting = 0;
004450aa      this->m_CachedSupportsCombinedAmbientPass = 0;
004450ad      this->m_CachedIsGlowing = 0;
004450b0      this->m_CachedNeedAlphaBlendPass = 0;
004450b3      this->m_CachedHasSkeletalData = 0;
004450b6      this->m_CachedAllSkeletalLODsWereBlended = 0;
004450bc      this->m_ShadowLODFragmentIndex = 0xffffffff;
004450bf      this->m_CachedSkeletalRenderLODIndex = 0xffffffff;
004450c2      this->m_CachedSkeletalShadowVolumeLODIndex = 0xffffffff;
004450cb      this->m_CachedRenderBoundingBox.m_vMin.x = BBox::s_cZeroAABB.m_vMin.x;
004450d4      this->m_CachedRenderBoundingBox.m_vMin.y = BBox::s_cZeroAABB.m_vMin.y;
004450e0      this->m_CachedRenderBoundingBox.m_vMin.z = BBox::s_cZeroAABB.m_vMin.z;
004450ec      this->m_CachedRenderBoundingBox.m_vMax.x = BBox::s_cZeroAABB.m_vMax.x;
004450f8      this->m_CachedRenderBoundingBox.m_vMax.y = BBox::s_cZeroAABB.m_vMax.y;
00445104      this->m_CachedRenderBoundingBox.m_vMax.z = BBox::s_cZeroAABB.m_vMax.z;
00445110      this->m_CachedSkinnedBoundingBox.m_vMin.x = BBox::s_cZeroAABB.m_vMin.x;
0044511c      this->m_CachedSkinnedBoundingBox.m_vMin.y = BBox::s_cZeroAABB.m_vMin.y;
00445128      this->m_CachedSkinnedBoundingBox.m_vMin.z = BBox::s_cZeroAABB.m_vMin.z;
00445134      this->m_CachedSkinnedBoundingBox.m_vMax.x = BBox::s_cZeroAABB.m_vMax.x;
00445140      this->m_CachedSkinnedBoundingBox.m_vMax.y = BBox::s_cZeroAABB.m_vMax.y;
0044514c      this->m_CachedSkinnedBoundingBox.m_vMax.z = BBox::s_cZeroAABB.m_vMax.z;
00445152      this->m_IsSkinnedBoundingBoxValid = 0;
00445060  }

0044515c                                                                                      90 90 90 90                              ....

00445160  uint32_t RenderMesh::GetDBOType(class RenderMesh const* this @ ecx) __pure

00445160  {
00445165      return 0x43;
00445160  }

00445166                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00445170  void __fastcall RenderMesh::ReleaseFragments(class RenderMesh* this)

00445170  {
0044517a      int32_t i = 0;
0044517c      bool cond:0 = this->m_Fragments.m_num <= 0;
0044517e      this->m_InstanceFlags = 7;
0044517e      
00445185      if (!(cond:0))
00445185      {
004451a8          do
004451a8          {
0044518a              int32_t* ecx = this->m_Fragments.m_data[i];
0044518a              
0044518f              if (ecx != 0)
0044518f              {
00445191                  int32_t temp0_1 = ecx[1];
00445191                  ecx[1] -= 1;
00445191                  
00445194                  if (temp0_1 == 1)
0044519a                      **(uint32_t**)ecx(1);
0044519a                  
0044519c                  this->m_Fragments.m_data[i] = 0;
0044518f              }
0044518f              
004451a5              i += 1;
004451a8          } while (i < this->m_Fragments.m_num);
00445185      }
00445185      
004451aa      uint32_t m_sizeAndDeallocate = this->m_Fragments.m_sizeAndDeallocate;
004451bb      this->m_Fragments.m_num = 0;
004451bb      
004451be      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004451be      {
004451c4          operator delete[](this->m_Fragments.m_data);
004451cc          this->m_Fragments.m_data = 0;
004451cf          this->m_Fragments.m_sizeAndDeallocate = 0;
004451be      }
004451be      else if (this->m_Fragments.m_data != 0)
004451d7      {
004451d9          int32_t eax_4 = (m_sizeAndDeallocate & 0x7fffffff);
004451de          int32_t eax_5 = (eax_4 - 1);
004451de          
004451df          if ((eax_4 - 1) >= 0)
004451df          {
004451e9              int32_t temp2_1;
004451e9              
004451e9              do
004451e9              {
004451e1                  temp2_1 = eax_5;
004451e1                  eax_5 -= 1;
004451e2                  this->m_Fragments.m_data[(eax_5 + 1)] = 0;
004451e9              } while ((temp2_1 - 1) >= 0);
004451df          }
004451d7      }
004451d7      
004451eb      uint32_t m_sizeAndDeallocate_1 = this->m_RenderLODFragmentIndices.m_sizeAndDeallocate;
004451fc      this->m_RenderLODFragmentIndices.m_num = 0;
004451fc      
004451ff      if ((m_sizeAndDeallocate_1 & 0x80000000) == 0x80000000)
004451ff      {
00445205          operator delete[](this->m_RenderLODFragmentIndices.m_data);
0044520d          this->m_RenderLODFragmentIndices.m_data = 0;
00445210          this->m_RenderLODFragmentIndices.m_sizeAndDeallocate = 0;
004451ff      }
004451ff      else if (this->m_RenderLODFragmentIndices.m_data != 0)
00445218      {
0044521a          int32_t eax_7 = (m_sizeAndDeallocate_1 & 0x7fffffff);
0044521f          int32_t eax_8 = (eax_7 - 1);
0044521f          
00445220          if ((eax_7 - 1) >= 0)
00445220          {
0044522a              int32_t temp4_1;
0044522a              
0044522a              do
0044522a              {
00445222                  temp4_1 = eax_8;
00445222                  eax_8 -= 1;
00445223                  this->m_RenderLODFragmentIndices.m_data[(eax_8 + 1)] = 0;
0044522a              } while ((temp4_1 - 1) >= 0);
00445220          }
00445218      }
00445218      
0044522c      uint32_t m_sizeAndDeallocate_2 = this->m_OccluderFragmentIndices.m_sizeAndDeallocate;
0044523d      this->m_OccluderFragmentIndices.m_num = 0;
0044523d      
00445240      if ((m_sizeAndDeallocate_2 & 0x80000000) == 0x80000000)
00445240      {
00445246          operator delete[](this->m_OccluderFragmentIndices.m_data);
0044524e          this->m_OccluderFragmentIndices.m_data = 0;
00445251          this->m_OccluderFragmentIndices.m_sizeAndDeallocate = 0;
00445255          this->m_ShadowLODFragmentIndex = 0xffffffff;
0044525e          return;
00445240      }
00445240      
00445262      if (this->m_OccluderFragmentIndices.m_data != 0)
00445262      {
00445264          int32_t eax_10 = (m_sizeAndDeallocate_2 & 0x7fffffff);
00445269          int32_t eax_11 = (eax_10 - 1);
00445269          
0044526a          if ((eax_10 - 1) >= 0)
0044526a          {
00445278              int32_t temp6_1;
00445278              
00445278              do
00445278              {
00445270                  temp6_1 = eax_11;
00445270                  eax_11 -= 1;
00445271                  this->m_OccluderFragmentIndices.m_data[(eax_11 + 1)] = 0;
00445278              } while ((temp6_1 - 1) >= 0);
0044526a          }
00445262      }
00445262      
0044527b      this->m_ShadowLODFragmentIndex = 0xffffffff;
00445170  }

00445285                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00445290  void __fastcall RenderMesh::Destroy(class RenderMesh* this)

00445290  {
00445299      SmartArray<unsigned long,1>::Reset(&this->m_RenderLODFragmentIndices);
004452a1      SmartArray<unsigned long,1>::Reset(&this->m_OccluderFragmentIndices);
004452ab      this->m_ShadowLODFragmentIndex = 0xffffffff;
004452ae      RenderMesh::ReleaseFragments(this);
004452b3      this->m_InstanceFlags |= 1;
004452b7      class RenderMeshMaterialArray* m_pMaterialArray = this->m_pMaterialArray;
004452b7      
004452be      if (m_pMaterialArray != 0)
004452be      {
004452c0          uint32_t m_cRef = m_pMaterialArray->m_cRef;
004452c0          m_pMaterialArray->m_cRef -= 1;
004452c0          
004452c3          if (m_cRef == 1)
004452c5              m_pMaterialArray->vtable->__vecDelDtor(1);
004452c5          
004452cb          this->m_pMaterialArray = nullptr;
004452be      }
004452be      
004452ce      this->m_InstanceFlags |= 2;
004452d2      class RenderMeshVerticesArray* m_pVerticesArray = this->m_pVerticesArray;
004452d2      
004452d7      if (m_pVerticesArray != 0)
004452d7      {
004452d9          uint32_t m_cRef_1 = m_pVerticesArray->m_cRef;
004452d9          m_pVerticesArray->m_cRef -= 1;
004452d9          
004452dc          if (m_cRef_1 == 1)
004452de              m_pVerticesArray->vtable->__vecDelDtor(1);
004452de          
004452e4          this->m_pVerticesArray = nullptr;
004452d7      }
004452d7      
004452e7      this->m_InstanceFlags |= 4;
004452eb      class RenderMeshIndicesArray* m_pIndicesArray = this->m_pIndicesArray;
004452eb      
004452f0      if (m_pIndicesArray != 0)
004452f0      {
004452f2          uint32_t m_cRef_2 = m_pIndicesArray->m_cRef;
004452f2          m_pIndicesArray->m_cRef -= 1;
004452f2          
004452f5          if (m_cRef_2 == 1)
004452f7              m_pIndicesArray->vtable->__vecDelDtor(1);
004452f7          
004452fd          this->m_pIndicesArray = nullptr;
004452f0      }
004452f0      
00445300      this->m_CachedSkeletalRenderLODIndex = 0xffffffff;
00445303      this->m_CachedSkeletalShadowVolumeLODIndex = 0xffffffff;
00445306      this->m_MeshAppearanceType = 0;
00445309      this->m_CachedSupportsLighting = 0;
0044530c      this->m_CachedSupportsMultiPassLighting = 0;
0044530f      this->m_CachedSupportsCombinedAmbientPass = 0;
00445312      this->m_CachedIsGlowing = 0;
00445315      this->m_CachedNeedAlphaBlendPass = 0;
00445318      this->m_CachedHasSkeletalData = 0;
0044531b      this->m_CachedAllSkeletalLODsWereBlended = 0;
0044532b      __builtin_memcpy(&this->m_CachedRenderBoundingBox, 0x8ee170, 0x18);
0044533d      __builtin_memcpy(&this->m_CachedSkinnedBoundingBox, 0x8ee170, 0x18);
00445341      this->m_IsSkinnedBoundingBoxValid = 0;
00445290  }

0044534a                                90 90 90 90 90 90                                                            ......

00445350  void __thiscall RenderMesh::GetSubDataIDs(class RenderMesh const* this, class QualifiedDataIDArray* arg2)

00445350  {
00445356      class RenderMeshMaterialArray* m_pMaterialArray = this->m_pMaterialArray;
00445356      
0044535b      if (m_pMaterialArray != 0)
0044535b      {
00445361          int32_t i = 0;
00445361          
00445365          if (m_pMaterialArray->m_Materials.m_num > 0)
00445365          {
004453a1              do
004453a1              {
0044537c                  class IDClass<_tagDataID,32,0> id = m_pMaterialArray->m_Materials.m_data[i].first.id;
00445380                  void var_8;
00445380                  
00445380                  if (id != INVALID_DID.id)
00445393                      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, id, 0), 0);
00445398                  m_pMaterialArray = this->m_pMaterialArray;
0044539e                  i += 1;
004453a1              } while (i < m_pMaterialArray->m_Materials.m_num);
00445365          }
0044535b      }
00445350  }

004453ac                                      90 90 90 90                                                              ....

004453b0  class DBObj* RenderMesh::Allocate(class RenderMesh const* this @ ecx)

004453b0  {
004453b0      /* tailcall */
004453b0      return RenderMesh::Allocator();
004453b0  }

004453b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004453c0  class DBObj* RenderMesh::Allocator()

004453c0  {
004453c5      void* eax = operator new(0xb0);
004453c5      
004453cf      if (eax == 0)
004453da          return 0;
004453da      
004453d3      /* tailcall */
004453d3      return RenderMesh::RenderMesh(eax);
004453c0  }

004453db                                                                                   90 90 90 90 90                             .....

004453e0  void* __thiscall RenderMeshMaterialArray::`scalar deleting destructor'(class RenderMeshMaterialArray* this, uint32_t arg2)

004453e0  {
004453e3      RenderMeshMaterialArray::~RenderMeshMaterialArray(this);
004453e3      
004453ed      if ((arg2 & 1) != 0)
004453f0          operator delete(this);
004453f0      
004453fb      return this;
004453e0  }

004453fe                                                                                            90 90                                ..

00445400  void* __thiscall RenderMeshVerticesArray::`scalar deleting destructor'(class RenderMeshVerticesArray* this, uint32_t arg2)

00445400  {
00445403      RenderMeshVerticesArray::~RenderMeshVerticesArray(this);
00445403      
0044540d      if ((arg2 & 1) != 0)
00445410          operator delete(this);
00445410      
0044541b      return this;
00445400  }

0044541e                                                                                            90 90                                ..

00445420  void* __thiscall RenderMeshIndicesArray::`scalar deleting destructor'(class RenderMeshIndicesArray* this, uint32_t arg2)

00445420  {
00445423      RenderMeshIndicesArray::~RenderMeshIndicesArray(this);
00445423      
0044542d      if ((arg2 & 1) != 0)
00445430          operator delete(this);
00445430      
0044543b      return this;
00445420  }

0044543e                                                                                            90 90                                ..

00445440  void __fastcall RenderMesh::~RenderMesh(class RenderMesh* this)

00445440  {
00445443      this->vtable = 0x799780;
00445449      RenderMesh::Destroy(this);
00445449      
0044545b      if ((this->m_OccluderFragmentIndices.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00445461          operator delete[](this->m_OccluderFragmentIndices.m_data);
00445461      
00445478      if ((this->m_RenderLODFragmentIndices.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044547e          operator delete[](this->m_RenderLODFragmentIndices.m_data);
0044547e      
00445495      if ((this->m_Fragments.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044549b          operator delete[](this->m_Fragments.m_data);
0044549b      
004454a6      /* tailcall */
004454a6      return DBObj::~DBObj(this);
00445440  }

004454ab                                   90 90 90 90 90                                                             .....

004454b0  void* __thiscall RenderMesh::`scalar deleting destructor'(class RenderMesh* this, uint32_t arg2)

004454b0  {
004454b3      RenderMesh::~RenderMesh(this);
004454b3      
004454bd      if ((arg2 & 1) != 0)
004454c0          operator delete(this);
004454c0      
004454cb      return this;
004454b0  }

004454ce                                            90 90                                                                ..

004454d0  uint32_t __thiscall RenderMesh::AddMaterial(class RenderMesh* this, struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *> arg2)

004454d0  {
004454db      if (this->m_pMaterialArray == 0)
004454db      {
004454df          class RenderMeshMaterialArray* eax_1 = operator new(0x14);
004454df          
004454e9          if (eax_1 == 0)
00445503              eax_1 = nullptr;
004454e9          else
004454e9          {
004454eb              eax_1->m_cRef = 1;
004454f2              eax_1->vtable = 0x799770;
004454f8              eax_1->m_Materials.m_data = 0;
004454fb              eax_1->m_Materials.m_sizeAndDeallocate = 0;
004454fe              eax_1->m_Materials.m_num = 0;
004454e9          }
004454e9          
00445505          this->m_pMaterialArray = eax_1;
004454db      }
004454db      
00445508      class RenderMeshMaterialArray* m_pMaterialArray = this->m_pMaterialArray;
0044550b      uint32_t m_num_1 = m_pMaterialArray->m_Materials.m_num;
00445517      int32_t eax_3 = (m_pMaterialArray->m_Materials.m_sizeAndDeallocate & 0x7fffffff);
0044551e      uint8_t eax_6;
0044551e      
0044551e      if (m_pMaterialArray->m_Materials.m_num >= eax_3)
0044552c          eax_6 = SmartArray<_STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>,1>::grow(&m_pMaterialArray->m_Materials, SmartArray<unsigned long,1>::get_new_size(&m_pMaterialArray->m_Materials, (eax_3 + 1)));
0044552c      
00445533      if ((m_pMaterialArray->m_Materials.m_num < eax_3 || eax_6 != 0))
00445533      {
00445535          uint32_t m_num = m_pMaterialArray->m_Materials.m_num;
00445538          struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>* m_data = m_pMaterialArray->m_Materials.m_data;
0044553e          m_data[m_num].first.id = arg2.first.id;
00445545          m_data[m_num].second = arg2.second;
00445511          m_pMaterialArray->m_Materials.m_num += 1;
00445533      }
00445533      
00445550      return m_num_1;
004454d0  }

00445553                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00445560  uint32_t __thiscall RenderMesh::AddVertexArray(class RenderMesh* this, class RenderVertexBuffer* arg2)

00445560  {
0044556b      if (this->m_pVerticesArray == 0)
0044556b      {
0044556f          class RenderMeshVerticesArray* eax_1 = operator new(0x14);
0044556f          
00445579          if (eax_1 == 0)
00445593              eax_1 = nullptr;
00445579          else
00445579          {
0044557b              eax_1->m_cRef = 1;
00445582              eax_1->vtable = 0x799774;
00445588              eax_1->m_VertexArrays.m_data = 0;
0044558b              eax_1->m_VertexArrays.m_sizeAndDeallocate = 0;
0044558e              eax_1->m_VertexArrays.m_num = 0;
00445579          }
00445579          
00445595          this->m_pVerticesArray = eax_1;
0044556b      }
0044556b      
00445598      class RenderMeshVerticesArray* m_pVerticesArray = this->m_pVerticesArray;
0044559b      uint32_t m_num = m_pVerticesArray->m_VertexArrays.m_num;
004455a7      int32_t eax_3 = (m_pVerticesArray->m_VertexArrays.m_sizeAndDeallocate & 0x7fffffff);
004455ae      uint8_t eax_6;
004455ae      
004455ae      if (m_pVerticesArray->m_VertexArrays.m_num >= eax_3)
004455bc          eax_6 = SmartArray<unsigned long,1>::grow(&m_pVerticesArray->m_VertexArrays, SmartArray<unsigned long,1>::get_new_size(&m_pVerticesArray->m_VertexArrays, (eax_3 + 1)));
004455bc      
004455c3      if ((m_pVerticesArray->m_VertexArrays.m_num < eax_3 || eax_6 != 0))
004455c3      {
004455a1          m_pVerticesArray->m_VertexArrays.m_data[m_pVerticesArray->m_VertexArrays.m_num] = arg2;
004455a1          m_pVerticesArray->m_VertexArrays.m_num += 1;
004455c3      }
004455c3      
004455d8      return m_num;
00445560  }

004455db                                                                                   90 90 90 90 90                             .....

004455e0  uint32_t __thiscall RenderMesh::AddIndexArray(class RenderMesh* this, class RenderIndexBuffer* arg2)

004455e0  {
004455eb      if (this->m_pIndicesArray == 0)
004455eb      {
004455ef          class RenderMeshIndicesArray* eax_1 = operator new(0x14);
004455ef          
004455f9          if (eax_1 == 0)
00445613              eax_1 = nullptr;
004455f9          else
004455f9          {
004455fb              eax_1->m_cRef = 1;
00445602              eax_1->vtable = &RenderMeshIndicesArray::`vftable';
00445608              eax_1->m_IndexArrays.m_data = 0;
0044560b              eax_1->m_IndexArrays.m_sizeAndDeallocate = 0;
0044560e              eax_1->m_IndexArrays.m_num = 0;
004455f9          }
004455f9          
00445615          this->m_pIndicesArray = eax_1;
004455eb      }
004455eb      
00445618      class RenderMeshIndicesArray* m_pIndicesArray = this->m_pIndicesArray;
0044561b      uint32_t m_num = m_pIndicesArray->m_IndexArrays.m_num;
00445627      int32_t eax_3 = (m_pIndicesArray->m_IndexArrays.m_sizeAndDeallocate & 0x7fffffff);
0044562e      uint8_t eax_6;
0044562e      
0044562e      if (m_pIndicesArray->m_IndexArrays.m_num >= eax_3)
0044563c          eax_6 = SmartArray<unsigned long,1>::grow(&m_pIndicesArray->m_IndexArrays, SmartArray<unsigned long,1>::get_new_size(&m_pIndicesArray->m_IndexArrays, (eax_3 + 1)));
0044563c      
00445643      if ((m_pIndicesArray->m_IndexArrays.m_num < eax_3 || eax_6 != 0))
00445643      {
00445621          m_pIndicesArray->m_IndexArrays.m_data[m_pIndicesArray->m_IndexArrays.m_num] = arg2;
00445621          m_pIndicesArray->m_IndexArrays.m_num += 1;
00445643      }
00445643      
00445658      return m_num;
004455e0  }

0044565b                                                                                   90 90 90 90 90                             .....

00445660  void __thiscall RenderMesh::Serialize(class RenderMesh* this, class Archive* arg2)

00445660  {
00445674      int32_t ebx;
00445674      ebx = Archive::UsingDBLoader(arg2);
00445678      char var_19 = ebx;
0044567c      class Archive* this_1;
0044567c      
0044567c      if (ebx == 0)
0044567c      {
00445686          this_1 = arg2;
00445687          DBObj::Serialize(this, this_1);
0044567c      }
0044567c      
00445690      __builtin_strncpy(&this_1, "TVMR", 4);
00445695      uint32_t eax_2;
00445695      uint32_t ecx_3;
00445695      int32_t edx;
00445695      eax_2 = Archive::GetVersionByToken(arg2, this_1);
00445695      
0044569d      if (eax_2 <= 1)
0044569d      {
004456a5          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
004456a5          
004456a5          if (ebx == 0)
004456a5          {
00445768              this_1 = arg2;
0044576d              Serializer::SerializeObject(&this->m_MeshAppearanceType, this_1);
004456a5          }
004456a5          else
004456a5          {
004456ab              this_1 = 0x24;
004456ad              int32_t var_34_1 = 1;
004456af              int32_t var_38_1 = 8;
004456c5              class DBObj* esi_1 = DBObj::GetByEnum(eax_2, edx, ecx_3);
004456c5              
004456c7              if ((!(arg2->m_flags) & 1) == 0)
004456c7              {
00445716                  this_1 = &data_7928af;
0044571f                  PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_3, this_1);
0044571f                  
00445726                  if (esi_1 != 0)
00445726                  {
0044572c                      uint32_t m_MeshAppearanceType = this->m_MeshAppearanceType;
00445733                      this_1 = &PStringBase<char>::s_NullBuffer_3;
00445737                      EnumMapper::GetString(esi_1, m_MeshAppearanceType, this_1);
00445726                  }
00445726                  
00445740                  this_1 = arg2;
00445745                  PStringBase<char>::Serialize(&PStringBase<char>::s_NullBuffer_3, this_1);
004456c7              }
004456c7              else
004456c7              {
004456c9                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004456ce                  PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
004456d5                  this_1 = &PStringBase<char>::s_NullBuffer_1[-1];
004456d6                  InterlockedIncrement(this_1);
004456e0                  this_1 = arg2;
004456e5                  PStringBase<char>::Serialize(&PStringBase<char>::s_NullBuffer_3, this_1);
004456f0                  this->m_MeshAppearanceType = 0;
004456f0                  
004456f7                  if (esi_1 != 0)
004456f7                  {
004456f9                      this_1 = this;
00445701                      PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, &PStringBase<char>::s_NullBuffer_3);
00445708                      uint32_t eax_6;
00445708                      eax_6 = EnumMapper::GetEnum(esi_1, this_1);
00445711                      this->m_MeshAppearanceType = eax_6;
004456f7                  }
004456c7              }
004456c7              
0044574e              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_3);
0044574e              
00445755              if (esi_1 != 0)
00445757                  esi_1->vtable->Release();
004456a5          }
004456a5          
00445779          class RenderMeshMaterialArray* m_pMaterialArray = this->m_pMaterialArray;
0044577c          uint32_t m_num_1 = 0;
00445780          uint32_t m_num_4 = 0;
00445780          
00445784          if (m_pMaterialArray != 0)
00445784          {
00445786              m_num_1 = m_pMaterialArray->m_Materials.m_num;
00445789              m_num_4 = m_num_1;
00445784          }
00445784          
00445791          this_1 = 4;
00445793          Archive::CheckAlignment(arg2, this_1);
0044579c          this_1 = 4;
0044579e          uint32_t* eax_10;
0044579e          uint32_t ecx_18;
0044579e          eax_10 = Archive::GetBytes(arg2, this_1);
0044579e          
004457a5          if (eax_10 != 0)
004457a5          {
004457af              if ((*(uint8_t*)((char*)arg2 + 4) & 1) == 0)
004457af              {
004457b5                  m_num_1 = *(uint32_t*)eax_10;
004457b7                  m_num_4 = m_num_1;
004457af              }
004457af              else
004457b1                  *(uint32_t*)eax_10 = m_num_1;
004457a5          }
004457a5          
004457bb          int32_t eax_11 = 0;
004457bf          int32_t var_c_1 = 0;
004457c3          class Archive* __return_1;
004457c3          
004457c3          if (m_num_1 > 0)
004457c3          {
004457e0              while (true)
004457e0              {
004457e0                  ecx_18 = var_19;
004457e6                  uint32_t id = INVALID_DID.id;
004457ec                  int32_t eax_14;
004457ec                  
004457ec                  if (ecx_18 == 0)
004457ec                  {
004458af                      ecx_18 = arg2->m_flags;
004458b2                      ecx_18 = !(ecx_18);
004458b2                      
004458b7                      if ((ecx_18 & 1) == 0)
004458c3                          id = this->m_pMaterialArray->m_Materials.m_data[eax_11].first.id;
004458c3                      
004458c6                      this_1 = 4;
004458ca                      Archive::CheckAlignment(arg2, this_1);
004458d3                      this_1 = 4;
004458d5                      eax_14 = Archive::GetBytes(arg2, this_1);
004458d5                      
004458dc                      if (eax_14 != 0)
004458dc                      {
004458e6                          if ((arg2->m_flags & 1) == 0)
004458ec                              id = *(uint32_t*)eax_14;
004458e6                          else
004458e8                              *(uint32_t*)eax_14 = id;
004458dc                      }
004457ec                  }
004457ec                  else
004457ec                  {
004457f6                      ecx_18 = arg2->m_flags;
004457f9                      ecx_18 = !(ecx_18);
004457f9                      
004457fe                      if ((ecx_18 & 1) == 0)
004457fe                      {
0044586b                          id = this->m_pMaterialArray->m_Materials.m_data[eax_11].first.id;
0044586e                          this_1 = 0x21;
00445876                          FileArray::GetRelativeFilePath(&__return_1, id, this_1);
00445882                          this_1 = arg2;
00445887                          PStringBase<char>::Serialize(&__return_1, this_1);
00445890                          void* __offset(Archive, -0x14) esi_5 = ((char*)__return_1 - 0x14);
00445896                          this_1 = ((char*)esi_5 + 4);
00445896                          
0044589f                          if ((InterlockedDecrement(this_1) == 0 && esi_5 != 0))
0044589f                          {
004458a1                              int32_t edx_9 = *(int32_t*)((char*)ADJ(esi_5) + -0x14);
004458a3                              this_1 = 1;
004458a7                              *(uint32_t*)edx_9(this_1);
0044589f                          }
004457fe                      }
004457fe                      else
004457fe                      {
00445800                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00445805                          PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0044580c                          this_1 = &PStringBase<char>::s_NullBuffer_2[-1];
0044580d                          InterlockedIncrement(this_1);
00445817                          this_1 = arg2;
0044581c                          PStringBase<char>::Serialize(&PStringBase<char>::s_NullBuffer_3, this_1);
00445821                          this_1 = 0x21;
00445836                          void __return;
00445836                          id = FileArray::GetDID(&__return, &PStringBase<char>::s_NullBuffer_3, this_1)->id;
00445838                          void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
00445841                          this_1 = ((char*)esi_3 + 4);
00445841                          
0044584e                          if ((InterlockedDecrement(this_1) == 0 && esi_3 != 0))
0044584e                          {
00445854                              int32_t eax_15 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
00445856                              this_1 = 1;
0044585a                              *(uint32_t*)eax_15(this_1);
0044584e                          }
004457fe                      }
004457ec                  }
004457ec                  
004458f2                  eax_14 = arg2->m_flags;
004458f5                  eax_14 = !(eax_14);
004458f5                  
004458f9                  if ((eax_14 & 1) != 0)
004458f9                  {
00445908                      if (this->m_pMaterialArray == 0)
00445908                      {
0044590a                          this_1 = 0x14;
0044590c                          void* eax_18 = operator new(this_1);
0044590c                          
00445916                          if (eax_18 == 0)
00445930                              eax_18 = nullptr;
00445916                          else
00445916                          {
00445918                              *(uint32_t*)((char*)eax_18 + 4) = 1;
0044591f                              *(uint32_t*)eax_18 = 0x799770;
00445925                              *(uint32_t*)((char*)eax_18 + 8) = 0;
00445928                              *(uint32_t*)((char*)eax_18 + 0xc) = 0;
0044592b                              *(uint32_t*)((char*)eax_18 + 0x10) = 0;
00445916                          }
00445916                          
00445936                          this->m_pMaterialArray = eax_18;
00445908                      }
00445908                      
0044593d                      class RenderMeshMaterialArray* m_pMaterialArray_1 = this->m_pMaterialArray;
00445949                      void* eax_21 = (m_pMaterialArray_1->m_Materials.m_sizeAndDeallocate & 0x7fffffff);
00445950                      uint8_t eax_24;
00445950                      
00445950                      if (m_pMaterialArray_1->m_Materials.m_num >= eax_21)
00445950                      {
00445953                          this_1 = ((char*)eax_21 + 1);
0044595b                          this_1 = SmartArray<unsigned long,1>::get_new_size(&m_pMaterialArray_1->m_Materials, this_1);
0044595e                          eax_24 = SmartArray<_STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>,1>::grow(&m_pMaterialArray_1->m_Materials, this_1);
00445950                      }
00445950                      
00445965                      if ((m_pMaterialArray_1->m_Materials.m_num < eax_21 || eax_24 != 0))
00445965                      {
00445967                          uint32_t m_num = m_pMaterialArray_1->m_Materials.m_num;
0044596a                          struct _STL::pair<IDClass<_tagDataID,32,0>,MaterialInstance *>* m_data = m_pMaterialArray_1->m_Materials.m_data;
0044596c                          m_data[m_num].first.id = id;
0044596f                          m_data[m_num].second = 0;
00445946                          m_pMaterialArray_1->m_Materials.m_num += 1;
00445965                      }
004458f9                  }
004458f9                  
0044597f                  bool cond:9_1 = (var_c_1 + 1) < m_num_4;
00445981                  var_c_1 += 1;
00445981                  
00445985                  if (!(cond:9_1))
00445985                      break;
00445985                  
004457d1                  eax_11 = var_c_1;
004457e0              }
004457c3          }
004457c3          
0044598f          class RenderMeshVerticesArray* m_pVerticesArray = this->m_pVerticesArray;
00445992          uint32_t m_num_2 = 0;
00445996          uint32_t m_num_5 = 0;
00445996          
0044599a          if (m_pVerticesArray != 0)
0044599a          {
0044599c              m_num_2 = m_pVerticesArray->m_VertexArrays.m_num;
0044599f              m_num_5 = m_num_2;
0044599a          }
0044599a          
004459a7          this_1 = 4;
004459a9          Archive::CheckAlignment(arg2, this_1);
004459b2          this_1 = 4;
004459b4          uint32_t* eax_28;
004459b4          class Archive* ecx_36;
004459b4          eax_28 = Archive::GetBytes(arg2, this_1);
004459b4          
004459bb          if (eax_28 != 0)
004459bb          {
004459c5              if ((arg2->m_flags & 1) == 0)
004459c5              {
004459cb                  m_num_2 = *(uint32_t*)eax_28;
004459cd                  m_num_5 = m_num_2;
004459c5              }
004459c5              else
004459c7                  *(uint32_t*)eax_28 = m_num_2;
004459bb          }
004459bb          
004459d1          int32_t ebp_1 = 0;
004459d1          
004459d5          if (m_num_2 > 0)
004459d5          {
00445acd              do
00445acd              {
004459e4                  eax_28 = arg2->m_flags;
004459e7                  eax_28 = !(eax_28);
004459e7                  
004459eb                  if ((eax_28 & 1) != 0)
004459eb                  {
004459f1                      class RenderVertexBuffer* eax_29 = RenderVertexBuffer::AllocateVertexBuffer();
004459f1                      
00445a01                      if (this->m_pVerticesArray == 0)
00445a01                      {
00445a03                          this_1 = 0x14;
00445a05                          void* eax_30 = operator new(this_1);
00445a05                          
00445a0f                          if (eax_30 == 0)
00445a29                              eax_30 = nullptr;
00445a0f                          else
00445a0f                          {
00445a11                              *(uint32_t*)((char*)eax_30 + 4) = 1;
00445a18                              *(uint32_t*)eax_30 = 0x799774;
00445a1e                              *(uint32_t*)((char*)eax_30 + 8) = 0;
00445a21                              *(uint32_t*)((char*)eax_30 + 0xc) = 0;
00445a24                              *(uint32_t*)((char*)eax_30 + 0x10) = 0;
00445a0f                          }
00445a0f                          
00445a2f                          this->m_pVerticesArray = eax_30;
00445a01                      }
00445a01                      
00445a36                      class RenderMeshVerticesArray* m_pVerticesArray_2 = this->m_pVerticesArray;
00445a42                      void* eax_33 = (m_pVerticesArray_2->m_VertexArrays.m_sizeAndDeallocate & 0x7fffffff);
00445a49                      uint8_t eax_38;
00445a49                      
00445a49                      if (m_pVerticesArray_2->m_VertexArrays.m_num >= eax_33)
00445a49                      {
00445a4b                          class Archive* __return_2 = ((char*)eax_33 + 1);
00445a4b                          
00445a51                          if (__return_2 <= 8)
00445a53                              __return_2 = 8;
00445a51                          else if (__return_2 <= 0x4000)
00445a60                          {
00445a76                              __return_1 = __return_2;
00445a7f                              int32_t eflags_1;
00445a7f                              char eax_37;
00445a7f                              eax_37 = __bsr_gprv_memv(__return_1);
00445a8b                              int32_t edi_1 = (1 << eax_37);
00445a8b                              
00445a8f                              if (__return_2 > edi_1)
00445a91                                  __return_2 = (edi_1 * 2);
00445a60                          }
00445a60                          else
00445a60                          {
00445a64                              void* eax_35 = (__return_2 & 0x3fff);
00445a64                              
00445a69                              if (eax_35 != 0)
00445a72                                  __return_2 += (0x4000 - eax_35);
00445a60                          }
00445a60                          
00445a94                          this_1 = __return_2;
00445a97                          eax_38 = SmartArray<unsigned long,1>::grow(&m_pVerticesArray_2->m_VertexArrays, this_1);
00445a49                      }
00445a49                      
00445a9e                      if ((m_pVerticesArray_2->m_VertexArrays.m_num < eax_33 || eax_38 != 0))
00445a9e                      {
00445a3f                          m_pVerticesArray_2->m_VertexArrays.m_data[m_pVerticesArray_2->m_VertexArrays.m_num] = eax_29;
00445a3f                          m_pVerticesArray_2->m_VertexArrays.m_num += 1;
00445a9e                      }
004459eb                  }
004459eb                  
00445ab7                  class RenderMeshVerticesArray* m_pVerticesArray_1 = this->m_pVerticesArray;
00445aba                  this_1 = arg2;
00445ac1                  VertexArray::Serialize(m_pVerticesArray_1->m_VertexArrays.m_data[ebp_1], this_1);
00445aca                  ebp_1 += 1;
00445acd              } while (ebp_1 < m_num_5);
004459d5          }
004459d5          
00445ad7          class RenderMeshIndicesArray* m_pIndicesArray = this->m_pIndicesArray;
00445ada          uint32_t m_num_3 = 0;
00445ade          uint32_t i = 0;
00445ade          
00445ae2          if (m_pIndicesArray != 0)
00445ae2          {
00445ae4              m_num_3 = m_pIndicesArray->m_IndexArrays.m_num;
00445ae7              i = m_num_3;
00445ae2          }
00445ae2          
00445aef          this_1 = 4;
00445af1          Archive::CheckAlignment(arg2, this_1);
00445afa          this_1 = 4;
00445afc          uint32_t* eax_42 = Archive::GetBytes(arg2, this_1);
00445afc          
00445b03          if (eax_42 != 0)
00445b03          {
00445b0d              if ((arg2->m_flags & 1) == 0)
00445b0d              {
00445b13                  m_num_3 = *(uint32_t*)eax_42;
00445b15                  i = m_num_3;
00445b0d              }
00445b0d              else
00445b0f                  *(uint32_t*)eax_42 = m_num_3;
00445b03          }
00445b03          
00445b1b          __return_1 = nullptr;
00445b1b          
00445b23          if (m_num_3 > 0)
00445b23          {
00445c1f              class Archive* __return_3;
00445c1f              
00445c1f              do
00445c1f              {
00445b34                  eax_42 = arg2->m_flags;
00445b37                  eax_42 = !(eax_42);
00445b37                  
00445b3b                  if ((eax_42 & 1) != 0)
00445b3b                  {
00445b41                      class RenderIndexBuffer* eax_43 = RenderIndexBuffer::AllocateIndexBuffer();
00445b41                      
00445b4f                      if (this->m_pIndicesArray == 0)
00445b4f                      {
00445b51                          this_1 = 0x14;
00445b53                          void* eax_44 = operator new(this_1);
00445b53                          
00445b5d                          if (eax_44 == 0)
00445b77                              eax_44 = nullptr;
00445b5d                          else
00445b5d                          {
00445b5f                              *(uint32_t*)((char*)eax_44 + 4) = 1;
00445b66                              *(uint32_t*)eax_44 = &RenderMeshIndicesArray::`vftable';
00445b6c                              *(uint32_t*)((char*)eax_44 + 8) = 0;
00445b6f                              *(uint32_t*)((char*)eax_44 + 0xc) = 0;
00445b72                              *(uint32_t*)((char*)eax_44 + 0x10) = 0;
00445b5d                          }
00445b5d                          
00445b7d                          this->m_pIndicesArray = eax_44;
00445b4f                      }
00445b4f                      
00445b84                      class RenderMeshIndicesArray* m_pIndicesArray_2 = this->m_pIndicesArray;
00445b90                      void* eax_47 = (m_pIndicesArray_2->m_IndexArrays.m_sizeAndDeallocate & 0x7fffffff);
00445b97                      uint8_t eax_52;
00445b97                      
00445b97                      if (m_pIndicesArray_2->m_IndexArrays.m_num >= eax_47)
00445b97                      {
00445b99                          class Archive* this_2 = ((char*)eax_47 + 1);
00445b99                          
00445b9f                          if (this_2 <= 8)
00445ba1                              this_2 = 8;
00445b9f                          else if (this_2 <= 0x4000)
00445bae                          {
00445bcd                              int32_t eflags_2;
00445bcd                              char eax_51;
00445bcd                              eax_51 = __bsr_gprv_memv(this_2);
00445bd9                              int32_t edi_2 = (1 << eax_51);
00445bd9                              
00445bdd                              if (this_2 > edi_2)
00445bdf                                  this_2 = (edi_2 * 2);
00445bae                          }
00445bae                          else
00445bae                          {
00445bb2                              void* eax_49 = (this_2 & 0x3fff);
00445bb2                              
00445bb7                              if (eax_49 != 0)
00445bc0                                  this_2 += (0x4000 - eax_49);
00445bae                          }
00445bae                          
00445be2                          this_1 = this_2;
00445be5                          eax_52 = SmartArray<unsigned long,1>::grow(&m_pIndicesArray_2->m_IndexArrays, this_1);
00445b97                      }
00445b97                      
00445bec                      if ((m_pIndicesArray_2->m_IndexArrays.m_num < eax_47 || eax_52 != 0))
00445bec                      {
00445b8d                          m_pIndicesArray_2->m_IndexArrays.m_data[m_pIndicesArray_2->m_IndexArrays.m_num] = eax_43;
00445b8d                          m_pIndicesArray_2->m_IndexArrays.m_num += 1;
00445bec                      }
00445b3b                  }
00445b3b                  
00445c01                  class RenderMeshIndicesArray* m_pIndicesArray_1 = this->m_pIndicesArray;
00445c04                  __return_3 = __return_1;
00445c08                  this_1 = arg2;
00445c0f                  RenderIndexBuffer::Serialize(m_pIndicesArray_1->m_IndexArrays.m_data[__return_3], this_1);
00445c1b                  __return_1 = (&__return_3->vtable + 1);
00445c1f              } while ((&__return_3->vtable + 1) < i);
00445b23          }
00445b23          
00445c29          uint32_t __return_4 = this->m_Fragments.m_num;
00445c30          this_1 = 4;
00445c32          __return_1 = __return_4;
00445c36          Archive::CheckAlignment(arg2, this_1);
00445c3f          this_1 = 4;
00445c41          class Archive* eax_54 = Archive::GetBytes(arg2, this_1);
00445c41          
00445c48          if (eax_54 != 0)
00445c48          {
00445c52              if ((arg2->m_flags & 1) == 0)
00445c52              {
00445c58                  __return_4 = eax_54->vtable;
00445c5a                  __return_1 = __return_4;
00445c52              }
00445c52              else
00445c54                  eax_54->vtable = __return_4;
00445c48          }
00445c48          
00445c5e          int32_t ebx_1 = 0;
00445c5e          
00445c62          if (__return_4 > 0)
00445c62          {
00445d2e              do
00445d2e              {
00445c74                  eax_54 = arg2->m_flags;
00445c77                  eax_54 = !(eax_54);
00445c77                  
00445c7b                  if ((eax_54 & 1) != 0)
00445c7b                  {
00445c81                      this_1 = 0x20;
00445c83                      void* eax_55 = operator new(this_1);
00445c8d                      int32_t ebp_3;
00445c8d                      
00445c8d                      if (eax_55 == 0)
00445c9a                          ebp_3 = 0;
00445c8d                      else
00445c96                          ebp_3 = RenderMeshFragment::RenderMeshFragment(eax_55);
00445c96                      
00445ca9                      void* eax_58 = (this->m_Fragments.m_sizeAndDeallocate & 0x7fffffff);
00445cb0                      uint8_t eax_63;
00445cb0                      
00445cb0                      if (this->m_Fragments.m_num >= eax_58)
00445cb0                      {
00445cb2                          class Archive* this_3 = ((char*)eax_58 + 1);
00445cb2                          
00445cb8                          if (this_3 <= 8)
00445cba                              this_3 = 8;
00445cb8                          else if (this_3 <= 0x4000)
00445cc7                          {
00445ce6                              int32_t eflags_3;
00445ce6                              char eax_62;
00445ce6                              eax_62 = __bsr_gprv_memv(this_3);
00445cf2                              int32_t esi_11 = (1 << eax_62);
00445cf2                              
00445cf6                              if (this_3 > esi_11)
00445cf8                                  this_3 = (esi_11 * 2);
00445cc7                          }
00445cc7                          else
00445cc7                          {
00445ccb                              void* eax_60 = (this_3 & 0x3fff);
00445ccb                              
00445cd0                              if (eax_60 != 0)
00445cd9                                  this_3 += (0x4000 - eax_60);
00445cc7                          }
00445cc7                          
00445cfb                          this_1 = this_3;
00445cfe                          eax_63 = SmartArray<unsigned long,1>::grow(&this->m_Fragments, this_1);
00445cb0                      }
00445cb0                      
00445d05                      if ((this->m_Fragments.m_num < eax_58 || eax_63 != 0))
00445d05                      {
00445ca6                          this->m_Fragments.m_data[this->m_Fragments.m_num] = ebp_3;
00445ca6                          this->m_Fragments.m_num += 1;
00445d05                      }
00445c7b                  }
00445c7b                  
00445d1a                  class RenderMeshFragment** m_data_1 = this->m_Fragments.m_data;
00445d1d                  this_1 = this;
00445d22                  RenderMeshFragment::Serialize(m_data_1[ebx_1], arg2, this_1);
00445d2b                  ebx_1 += 1;
00445d2e              } while (ebx_1 < __return_1);
00445c62          }
0044569d      }
00445660  }

004457d7                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
00445b2d                                         8d 49 00                                                               .I.
00445c6a                                8d 9b 00 00 00 00                                                            ......
00445d3e                                                                                            90 90                                ..

00445d40  uint8_t __thiscall RenderMesh::ParseFromFileNode(class RenderMesh* this, class PFileNode const* arg2)

00445d40  {
00445d40      class PFileNode* this_2 = arg2;
00445d40      
00445d4f      if (this_2 != 0)
00445d4f      {
00445d55          class PFileNode* this_1 = this_2;
00445d5a          void var_c;
00445d5a          PFileNodeIter::PFileNodeIter(&var_c, this_1);
00445d68          class PFileNode* edi_1 = PFileNodeIter::Curr(&var_c);
00445d68          
00445d6c          if (edi_1 == 0)
00445d6c          {
00445ed0          label_445ed0:
00445ed0              PFileNodeIter::~PFileNodeIter(&var_c);
00445ed5              int32_t eax_16;
00445ed5              eax_16 = 1;
00445ede              return 1;
00445d6c          }
00445d6c          
00445d80          while (true)
00445d80          {
00445d80              this_1 = &MeshAppearanceType;
00445d80              
00445d8e              if (PFileNode::IsKeyword(edi_1, this_1) == 0)
00445d8e              {
00445e08                  this_1 = &Fragment;
00445e08                  
00445e16                  if (PFileNode::IsKeyword(edi_1, this_1) == 0)
00445e16                  {
00445e57                      this_1 = &ExportMeshAppearanceType;
00445e57                      
00445e65                      if (PFileNode::IsKeyword(edi_1, this_1) != 0)
00445e65                      {
00445f18                          PFileNodeIter::~PFileNodeIter(&var_c);
00445f18                          break;
00445e65                      }
00445e65                      
00445e6b                      this_1 = &BinaryVertexArray;
00445e6b                      
00445e79                      if (PFileNode::IsKeyword(edi_1, this_1) != 0)
00445e79                      {
00445f18                          PFileNodeIter::~PFileNodeIter(&var_c);
00445f18                          break;
00445e79                      }
00445e79                      
00445e7f                      this_1 = &VertexArray;
00445e7f                      
00445e8d                      if (PFileNode::IsKeyword(edi_1, this_1) != 0)
00445e8d                      {
00445f18                          PFileNodeIter::~PFileNodeIter(&var_c);
00445f18                          break;
00445e8d                      }
00445e8d                      
00445e93                      this_1 = &Render;
00445e9a                      uint8_t eax_14;
00445e9a                      class PFileNode* this_5;
00445e9a                      eax_14 = PFileNode::IsKeyword(edi_1, this_1);
00445e9a                      
00445ea1                      if (eax_14 != 0)
00445ea1                      {
00445f18                          PFileNodeIter::~PFileNodeIter(&var_c);
00445f18                          break;
00445ea1                      }
00445ea1                      
00445ea3                      this_1 = this_5;
00445eab                      PStringBase<char>::PStringBase<char>(&this_1, "Unrecognized keyword in mesh fil…");
00445eb1                      PFileNode::ReportWarning(edi_1, this_1);
00445e16                  }
00445e16                  else
00445e16                  {
00445e18                      this_1 = 0x20;
00445e1a                      void* eax_8 = operator new(this_1);
00445e24                      class RenderMeshFragment* esi_2;
00445e24                      
00445e24                      if (eax_8 == 0)
00445e31                          esi_2 = nullptr;
00445e24                      else
00445e2d                          esi_2 = RenderMeshFragment::RenderMeshFragment(eax_8);
00445e2d                      
00445e33                      this_1 = this;
00445e37                      arg2 = esi_2;
00445e3b                      uint8_t eax_10;
00445e3b                      class PFileNode* this_4;
00445e3b                      eax_10 = RenderMeshFragment::ParseFromFileNode(esi_2, edi_1, this_1);
00445e3b                      
00445e42                      if (eax_10 == 0)
00445e42                      {
00445f29                          this_1 = this_4;
00445f31                          PStringBase<char>::PStringBase<char>(&this_1, "Error parsing mesh fragment");
00445f37                          PFileNode::ReportError(edi_1, this_1);
00445f37                          
00445f41                          if (esi_2 != 0)
00445f41                          {
00445f43                              uint32_t m_cRef = esi_2->m_cRef;
00445f43                              esi_2->m_cRef -= 1;
00445f43                              
00445f46                              if (m_cRef == 1)
00445f46                              {
00445f48                                  struct RenderMeshFragment::VTable* vtable = esi_2->vtable;
00445f4a                                  this_1 = 1;
00445f4e                                  vtable->__vecDelDtor(this_1);
00445f46                              }
00445f41                          }
00445f41                          
00445f18                          PFileNodeIter::~PFileNodeIter(&var_c);
00445f18                          break;
00445e42                      }
00445e42                      
00445e4c                      this_1 = &arg2;
00445e50                      SmartArray<unsigned long,1>::AddToEnd(&this->m_Fragments, this_1);
00445e16                  }
00445d8e              }
00445d8e              else
00445d8e              {
00445d90                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00445d99                  this_1 = &PStringBase<char>::s_NullBuffer_1[-1];
00445d9a                  arg2 = PStringBase<char>::s_NullBuffer_1;
00445d9e                  InterlockedIncrement(this_1);
00445da0                  struct PFileNode::VTable* vtable_1 = edi_1->vtable;
00445da2                  this_1 = nullptr;
00445da6                  class PFileNode* eax_3;
00445da6                  int32_t ecx_4;
00445da6                  eax_3 = vtable_1->GetSubNode(this_1);
00445da6                  
00445dab                  if (eax_3 != 0)
00445dab                  {
00445db1                      this_1 = &arg2;
00445db4                      ecx_4 = PFileNode::GetNameAsPString(eax_3, this_1);
00445db9                      PStringBase<char>::s_NullBuffer_1 = arg2;
00445dab                  }
00445dab                  
00445dc0                  this_1 = &this->m_MeshAppearanceType;
00445dc1                  int32_t var_24_1 = ecx_4;
00445dca                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00445dce                  uint8_t eax_5;
00445dce                  class PFileNode* this_3;
00445dce                  eax_5 = EnumMapper::GetEnum(8, PStringBase<char>::s_NullBuffer_1, this_1);
00445dce                  
00445dd8                  if (eax_5 == 0)
00445dd8                  {
00445ee1                      this_1 = this_3;
00445ee9                      PStringBase<char>::PStringBase<char>(&this_1, "Invalid mesh appearance type nam…");
00445eef                      PFileNode::ReportError(edi_1, this_1);
00445efd                      this_1 = &PStringBase<char>::s_NullBuffer_1[-1];
00445efd                      
00445f0a                      if ((InterlockedDecrement(this_1) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00445f0a                      {
00445f0c                          int32_t edx_3 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14);
00445f0e                          this_1 = 1;
00445f12                          *(uint32_t*)edx_3(this_1);
00445f0a                      }
00445f0a                      
00445f18                      PFileNodeIter::~PFileNodeIter(&var_c);
00445f18                      break;
00445dd8                  }
00445dd8                  
00445de4                  this_1 = &PStringBase<char>::s_NullBuffer_1[-1];
00445de4                  
00445df5                  if ((InterlockedDecrement(this_1) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00445df5                  {
00445dfb                      int32_t edx_2 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14);
00445dfd                      this_1 = 1;
00445e01                      *(uint32_t*)edx_2(this_1);
00445df5                  }
00445d8e              }
00445d8e              
00445ec2              edi_1 = PFileNodeIter::Next(&var_c);
00445ec2              
00445ec6              if (edi_1 == 0)
00445ec6                  goto label_445ed0;
00445d80          }
00445d4f      }
00445d4f      
00445f20      this_2 = 0;
00445f26      return 0;
00445d40  }

00445d7a                                                                                8d 9b 00 00 00 00                            ......
00445f52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00445f60  void __fastcall RenderMesh::GenerateFragmentIndexLists(class RenderMesh* this)

00445f60  {
00445f6b      SmartArray<unsigned long,1>::Reset(&this->m_RenderLODFragmentIndices);
00445f75      SmartArray<unsigned long,1>::Reset(&this->m_OccluderFragmentIndices);
00445f7d      uint32_t i = 0;
00445f7f      bool cond:0 = this->m_Fragments.m_num <= 0;
00445f81      this->m_ShadowLODFragmentIndex = 0xffffffff;
00445f81      
00445f88      if (!(cond:0))
00445f88      {
00446013          do
00446013          {
00445f96              int32_t m_Type = this->m_Fragments.m_data[i]->m_Type;
00445f96              
00445f9c              if (m_Type == 1)
00445f9c              {
00445fa4                  int32_t eax_4 = (this->m_RenderLODFragmentIndices.m_sizeAndDeallocate & 0x7fffffff);
00445fab                  uint8_t eax_7;
00445fab                  
00445fab                  if (this->m_RenderLODFragmentIndices.m_num >= eax_4)
00445fb9                      eax_7 = SmartArray<unsigned long,1>::grow(&this->m_RenderLODFragmentIndices, SmartArray<unsigned long,1>::get_new_size(&this->m_RenderLODFragmentIndices, (eax_4 + 1)));
00445fb9                  
00445fc0                  if ((this->m_RenderLODFragmentIndices.m_num < eax_4 || eax_7 != 0))
00445fc0                  {
00445f65                      this->m_RenderLODFragmentIndices.m_data[this->m_RenderLODFragmentIndices.m_num] = i;
00445f65                      this->m_RenderLODFragmentIndices.m_num += 1;
00445fc0                  }
00445f9c              }
00445f9c              else if (m_Type == 2)
00445fd2              {
00445fda                  int32_t eax_9 = (this->m_OccluderFragmentIndices.m_sizeAndDeallocate & 0x7fffffff);
00445fe1                  uint8_t eax_12;
00445fe1                  
00445fe1                  if (this->m_OccluderFragmentIndices.m_num >= eax_9)
00445fef                      eax_12 = SmartArray<unsigned long,1>::grow(&this->m_OccluderFragmentIndices, SmartArray<unsigned long,1>::get_new_size(&this->m_OccluderFragmentIndices, (eax_9 + 1)));
00445fef                  
00445ff6                  if ((this->m_OccluderFragmentIndices.m_num < eax_9 || eax_12 != 0))
00445ff6                  {
00445f70                      this->m_OccluderFragmentIndices.m_data[this->m_OccluderFragmentIndices.m_num] = i;
00445f70                      this->m_OccluderFragmentIndices.m_num += 1;
00445ff6                  }
00445fd2              }
00445fd2              else if (m_Type == 4)
0044600a                  this->m_ShadowLODFragmentIndex = i;
0044600a              
00446010              i += 1;
00446013          } while (i < this->m_Fragments.m_num);
00445f88      }
00445f60  }

0044601e                                                                                            90 90                                ..

00446020  uint8_t __thiscall RenderMesh::AddBatchToRenderLOD(class RenderMesh* this, uint32_t const arg2, class RenderMeshBatch* arg3)

00446020  {
00446020      class RenderMesh* m_num = this;
00446024      uint32_t m_num_1 = this->m_RenderLODFragmentIndices.m_num;
00446028      uint32_t const edi = arg2;
00446028      
0044602e      if (edi >= m_num_1)
0044602e      {
00446030          if (edi != m_num_1)
00446030          {
00446096              m_num_1 = 0;
0044609a              return 0;
00446030          }
00446030          
00446034          void* eax = operator new(0x20);
0044603e          uint32_t eax_1;
0044603e          
0044603e          if (eax == 0)
00446049              eax_1 = 0;
0044603e          else
00446042              eax_1 = RenderMeshFragment::RenderMeshFragment(eax);
00446042          
0044604f          arg2 = eax_1;
00446053          *(uint32_t*)(eax_1 + 8) = 1;
00446061          m_num = this->m_Fragments.m_num;
00446065          SmartArray<unsigned long,1>::AddToEnd(&this->m_RenderLODFragmentIndices, &m_num);
00446072          SmartArray<unsigned long,1>::AddToEnd(&this->m_Fragments, &arg2);
0044602e      }
0044602e      
00446088      RenderMeshFragment::AddMaterialBatch(this->m_Fragments.m_data[this->m_RenderLODFragmentIndices.m_data[edi]], arg3);
0044608e      int32_t eax_5;
0044608e      eax_5 = 1;
00446092      return 1;
00446020  }

0044609d                                                                                         90 90 90                               ...

004460a0  void __fastcall RenderMesh::CacheMaterialAttributes(class RenderMesh* this)

004460a0  {
004460a9      int32_t i = 0;
004460ab      char edx = 0;
004460ad      bool cond:0 = this->m_RenderLODFragmentIndices.m_num <= 0;
004460af      this->m_CachedSupportsLighting = 0;
004460b3      this->m_CachedSupportsMultiPassLighting = 0;
004460b7      this->m_CachedIsGlowing = 0;
004460bb      this->m_CachedNeedAlphaBlendPass = 0;
004460bf      this->m_CachedSupportsCombinedAmbientPass = 1;
004460c3      int32_t i_1 = 0;
004460c3      
004460c7      if (!(cond:0))
004460c7      {
00446416          do
00446416          {
004460df              void* esi_2 = this->m_Fragments.m_data[this->m_RenderLODFragmentIndices.m_data[i]];
004460e5              int32_t j = 0;
004460e9              void* var_4_1 = esi_2;
004460ed              int32_t j_1 = 0;
004460ed              
004460f1              if (*(uint32_t*)((char*)esi_2 + 0x14) > 0)
004460f1              {
00446402                  do
00446402                  {
004460fa                      void* eax_1 = *(uint32_t*)(*(uint32_t*)((char*)esi_2 + 0xc) + (j << 2));
004460fd                      int32_t ecx_4 = *(uint32_t*)((char*)eax_1 + 0x10);
004460fd                      
00446103                      if (ecx_4 != 0xffffffff)
00446103                      {
00446112                          int32_t eax_5 = *(uint32_t*)((*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)eax_1 + 0xc) + 0x38) + 8) + (ecx_4 << 3)) + 4);
00446112                          
00446118                          if (eax_5 != 0)
00446118                          {
00446120                              void* esi_3 = *(uint32_t*)(eax_5 + 0x50);
00446123                              ecx_4 = *(uint8_t*)((char*)esi_3 + 0x9d);
00446129                              eax_5 = *(uint8_t*)((char*)esi_3 + 0x9e);
00446133                              char var_26_1 = ecx_4;
00446137                              char var_25_1 = eax_5;
00446137                              
0044613b                              if (edx != 0)
0044613b                              {
00446144                                  class PSRefBufferCharData<char>* m_charbuffer_5;
00446144                                  
00446144                                  if (this->m_CachedSupportsMultiPassLighting != eax_5)
00446144                                  {
0044614a                                      class PSRefBufferCharData<char>* m_charbuffer_1 = PStringBase<char>::null_string.m_charbuffer;
0044614f                                      m_charbuffer_5 = m_charbuffer_1;
00446157                                      InterlockedIncrement(&m_charbuffer_1[-1]);
00446157                                      
00446165                                      if (m_charbuffer_5->m_data[-4] == 1)
00446165                                      {
00446174                                          void* __return;
00446174                                          class PStringBase<char>* eax_8 = FileArray::GetFileNameForDummies(&__return, this->m_DID.id);
0044617b                                          class PSRefBufferCharData<char>* m_charbuffer_7 = m_charbuffer_5;
0044617b                                          
00446186                                          if (m_charbuffer_7 != eax_8->m_charbuffer)
00446186                                          {
00446197                                              if ((InterlockedDecrement(&m_charbuffer_7[-1]) == 0 && m_charbuffer_7 != 0x14))
0044619f                                                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_7 + -0x14)(1);
0044619f                                              
004461a1                                              class PSRefBufferCharData<char>* m_charbuffer_3 = eax_8->m_charbuffer;
004461a3                                              m_charbuffer_5 = m_charbuffer_3;
004461ab                                              InterlockedIncrement(&m_charbuffer_3[-1]);
00446186                                          }
00446186                                          
004461b5                                          int32_t* esi_6 = ((char*)__return - 0x14);
004461b5                                          
004461c4                                          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004461cc                                              **(uint32_t**)esi_6(1);
004461cc                                          
004461d6                                          if (m_charbuffer_5->m_data[-4] == 1)
004461d6                                          {
004461de                                              uint32_t id = this->m_DID.id;
004461de                                              
004461e7                                              if (id == INVALID_DID.id)
004461ff                                                  PStringBase<char>::set(&m_charbuffer_5, "Unknown");
004461e7                                              else
004461e7                                              {
004461e9                                                  uint32_t id_2 = id;
004461f0                                                  PStringBase<char>::sprintf(&m_charbuffer_5, "DataID:0x%08X");
004461e7                                              }
004461d6                                          }
00446165                                      }
00446165                                      
00446204                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00446209                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
00446211                                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0044621d                                      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
00446228                                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "Mesh [%s] is assigned to materia…");
00446231                                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_8 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
00446231                                      
00446243                                      if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
0044624b                                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
0044624b                                      
00446251                                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_10 = &m_charbuffer_5->m_data[0xffffffec];
00446258                                      eax_5 = InterlockedDecrement(((char*)esi_10 + 4));
00446258                                      
00446260                                      if ((eax_5 == 0 && esi_10 != 0))
00446268                                          eax_5 = *(uint32_t*)*(int32_t*)((char*)ADJ(esi_10) + -0x14)(1);
00446144                                  }
00446144                                  
0044626a                                  eax_5 = this->m_CachedSupportsMultiPassLighting;
0044626a                                  
0044626f                                  if (eax_5 != 0)
0044626f                                  {
0044627d                                  label_44627d:
0044627d                                      eax_5 = var_26_1;
0044627d                                      
00446284                                      if (this->m_CachedSupportsLighting != eax_5)
00446284                                      {
0044628a                                          class PSRefBufferCharData<char>* m_charbuffer_2 = PStringBase<char>::null_string.m_charbuffer;
0044628f                                          m_charbuffer_5 = m_charbuffer_2;
00446297                                          InterlockedIncrement(&m_charbuffer_2[-1]);
00446297                                          
004462a5                                          if (m_charbuffer_5->m_data[-4] == 1)
004462a5                                          {
004462b4                                              class PStringBase<char> __return_1;
004462b4                                              class PStringBase<char>* eax_18 = FileArray::GetFileNameForDummies(&__return_1, this->m_DID.id);
004462bb                                              class PSRefBufferCharData<char>* m_charbuffer_8 = m_charbuffer_5;
004462bb                                              
004462c6                                              if (m_charbuffer_8 != eax_18->m_charbuffer)
004462c6                                              {
004462d7                                                  if ((InterlockedDecrement(&m_charbuffer_8[-1]) == 0 && m_charbuffer_8 != 0x14))
004462df                                                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer_8 + -0x14)(1);
004462df                                                  
004462e1                                                  class PSRefBufferCharData<char>* m_charbuffer_4 = eax_18->m_charbuffer;
004462e3                                                  m_charbuffer_5 = m_charbuffer_4;
004462eb                                                  InterlockedIncrement(&m_charbuffer_4[-1]);
004462c6                                              }
004462c6                                              
004462f5                                              int32_t* esi_13 = (__return_1 - 0x14);
004462f5                                              
00446304                                              if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
0044630c                                                  **(uint32_t**)esi_13(1);
0044630c                                              
00446316                                              if (m_charbuffer_5->m_data[-4] == 1)
00446316                                              {
0044631e                                                  uint32_t id_1 = this->m_DID.id;
0044631e                                                  
00446327                                                  if (id_1 == INVALID_DID.id)
0044633f                                                      PStringBase<char>::set(&m_charbuffer_5, "Unknown");
00446327                                                  else
00446327                                                  {
00446329                                                      uint32_t id_3 = id_1;
00446330                                                      PStringBase<char>::sprintf(&m_charbuffer_5, "DataID:0x%08X");
00446327                                                  }
00446316                                              }
004462a5                                          }
004462a5                                          
00446344                                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00446349                                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
00446351                                          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0044635b                                          class PSRefBufferCharData<char>* m_charbuffer_6 = m_charbuffer_5;
00446366                                          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "All materials used within a mesh…");
0044636f                                          void* __offset(PSRefBufferCharData<char>, -0x14) esi_15 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
0044636f                                          
00446381                                          if ((InterlockedDecrement(((char*)esi_15 + 4)) == 0 && esi_15 != 0))
00446389                                              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_15) + -0x14)(1);
00446389                                          
0044638f                                          void* __offset(PSRefBufferCharData<char>, -0x14) esi_17 = &m_charbuffer_5->m_data[0xffffffec];
00446396                                          eax_5 = InterlockedDecrement(((char*)esi_17 + 4));
00446396                                          
0044639e                                          if ((eax_5 == 0 && esi_17 != 0))
004463a6                                              eax_5 = *(uint32_t*)*(int32_t*)((char*)ADJ(esi_17) + -0x14)(1);
00446284                                      }
0044626f                                  }
0044626f                                  else
0044626f                                  {
00446271                                      eax_5 = var_25_1;
00446271                                      
00446277                                      if (eax_5 != 0)
00446277                                          goto label_44627d;
0044626f                                  }
0044613b                              }
0044613b                              
004463a8                              eax_5 = var_26_1;
004463a8                              
004463ae                              if (eax_5 != 0)
004463b0                                  this->m_CachedSupportsLighting = 1;
004463b0                              
004463b4                              eax_5 = var_25_1;
004463b4                              
004463be                              if (eax_5 != 0)
004463be                              {
004463c0                                  this->m_CachedSupportsMultiPassLighting = 1;
004463c4                                  ecx_4 = *(uint8_t*)((char*)esi_3 + 0x9f);
004463c4                                  
004463cc                                  if (ecx_4 == 0)
004463ce                                      this->m_CachedSupportsCombinedAmbientPass = 0;
004463be                              }
004463be                              
004463d2                              ecx_4 = *(uint8_t*)((char*)esi_3 + 0xa0);
004463d2                              
004463da                              if (ecx_4 != 0)
004463dc                                  this->m_CachedIsGlowing = 1;
004463dc                              
004463e0                              ecx_4 = *(uint8_t*)((char*)esi_3 + 0xa1);
004463e0                              
004463e8                              if (ecx_4 != 0)
004463ea                                  this->m_CachedNeedAlphaBlendPass = 1;
004463ea                              
004463ee                              esi_2 = var_4_1;
004463f2                              j = j_1;
004463f6                              edx = 1;
00446118                          }
00446103                      }
00446103                      
004463fb                      j += 1;
004463fe                      j_1 = j;
00446402                  } while (j < *(uint32_t*)((char*)esi_2 + 0x14));
00446402                  
00446408                  i = i_1;
004460f1              }
004460f1              
0044640f              i += 1;
00446412              i_1 = i;
00446416          } while (i < this->m_RenderLODFragmentIndices.m_num);
004460c7      }
004460a0  }

00446424              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00446430  void __fastcall RenderMesh::UpdateCachedData(class RenderMesh* this)

00446430  {
00446433      RenderMesh::CacheMaterialAttributes(this);
0044643a      RenderMesh::CacheHasSkeletalData(this);
00446442      /* tailcall */
00446442      return RenderMesh::CacheRenderBoundingBox(this);
00446430  }

00446447                       90 90 90 90 90 90 90 90 90                                                         .........

00446450  uint8_t __fastcall RenderMesh::GetSubObjects(class RenderMesh* this)

00446450  {
00446453      uint8_t result = RenderMesh::GetMaterialsFromDatabase(this);
00446453      
0044645a      if (result == 0)
0044645d          return result;
0044645d      
00446465      if (DBCache::IsRunTime() != 0)
00446469          RenderMesh::CacheMaterialAttributes(this);
00446469      
00446471      return 1;
00446450  }

00446472                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00446480  uint8_t __fastcall RenderMesh::Refresh(class RenderMesh* this, class IDClass<_tagDataID,32,0> arg2)

00446480  {
00446483      RenderMesh::CacheMaterialAttributes(this);
0044648a      RenderMesh::CacheHasSkeletalData(this);
00446491      RenderMesh::CacheRenderBoundingBox(this);
00446496      int32_t eax;
00446496      eax = 1;
00446499      return 1;
00446480  }

0044649c                                                                                      90 90 90 90                              ....

004464a0  uint8_t __thiscall RenderMesh::CreateLODBatch(class RenderMesh* this, uint32_t const arg2, class MaterialInstance* arg3, enum PrimType arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7, uint8_t const arg8, uint8_t const arg9, class RenderVertexBuffer** arg10)

004464a0  {
004464a6      void* eax = operator new(0x34);
004464b0      class RenderMeshBatch* esi;
004464b0      
004464b0      if (eax == 0)
004464bd          esi = nullptr;
004464b0      else
004464b9          esi = RenderMeshBatch::RenderMeshBatch(eax);
004464b9      
004464e9      esi->m_pContainerMesh = this;
004464f3      uint32_t m_cRef;
004464f3      
004464f3      if (RenderMeshBatch::InitRenderBatch(esi, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) != 0)
004464f3      {
0044651a          bool cond:0_1 = RenderMesh::AddBatchToRenderLOD(this, arg2, esi) == 0;
0044651c          m_cRef = esi->m_cRef;
0044651c          
0044651f          if (!(cond:0_1))
0044651f          {
00446522              esi->m_cRef = (m_cRef - 1);
00446522              
00446525              if (m_cRef == 1)
00446527                  esi->vtable->__vecDelDtor(1);
00446527              
00446530              uint32_t eax_9;
00446530              eax_9 = 1;
00446533              return 1;
0044651f          }
004464f3      }
004464f3      else
004464f5          m_cRef = esi->m_cRef;
004464f5      
004464f9      esi->m_cRef = (m_cRef - 1);
004464f9      
004464fc      if (m_cRef == 1)
004464fe          esi->vtable->__vecDelDtor(1);
004464fe      
00446507      uint32_t eax_6;
00446507      eax_6 = 0;
0044650a      return 0;
004464a0  }

00446536                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00446540  void __fastcall AutoStoreVersionArchive::~AutoStoreVersionArchive(class AutoStoreVersionArchive* this)

00446540  {
00446543      this->vtable = &AutoStoreVersionArchive::`vftable';
00446543      
00446556      if ((this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044655c          operator delete[](this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_data);
0044655c      
00446567      /* tailcall */
00446567      return Archive::~Archive(this);
00446540  }

0044656c                                      90 90 90 90                                                              ....

00446570  void __thiscall AutoStoreVersionArchive::InitForPacking(class AutoStoreVersionArchive* this, class ArchiveInitializer const* arg2, class SmartBuffer const* arg3)

00446570  {
00446570      this->m_bOnSerializingDoneCalled = 0;
00446577      /* tailcall */
00446577      return Archive::InitForPacking(this, arg2, arg3);
00446570  }

0044657c                                                                                      90 90 90 90                              ....

00446580  void __thiscall AutoStoreVersionArchive::InitForUnpacking(class AutoStoreVersionArchive* this, class ArchiveInitializer const* arg2, class SmartBuffer const* arg3)

00446580  {
00446580      this->m_bOnSerializingDoneCalled = 0;
00446587      /* tailcall */
00446587      return Archive::InitForUnpacking(this, arg2, arg3);
00446580  }

0044658c                                      90 90 90 90                                                              ....

00446590  void __thiscall AutoStoreVersionArchive::InitForPacking(class AutoStoreVersionArchive* this, class SmartBuffer const* arg2)

00446590  {
004465a2      int32_t var_50 = 0x794430;
004465aa      void var_40;
004465aa      void* var_4c = &var_40;
004465ae      int32_t var_48 = 8;
004465b6      int32_t var_44 = 0;
004465be      SmartArray<ArchiveVersionRow::VersionEntry,1>::operator=(&this->m_SerializeVersionRow.m_rowInitialData.m_aVersions, &var_4c);
004465be      
004465d3      if ((var_48 & 0x80000000) == 0x80000000)
004465da          operator delete[](var_4c);
004465da      
004465f1      ArchiveVersionRow::SetVersion(&this->m_SerializeVersionRow.m_rowInitialData, 0x436f7265, 2);
00446601      Archive::InitForPacking(this, &this->m_SerializeVersionRow.vtable, arg2);
00446590  }

0044660d                                         90 90 90                                                               ...

00446610  void __thiscall AutoStoreVersionArchive::InitForUnpacking(class AutoStoreVersionArchive* this, class SmartBuffer const* arg2)

00446610  {
00446622      int32_t var_50 = 0x794430;
0044662a      void var_40;
0044662a      void* var_4c = &var_40;
0044662e      int32_t var_48 = 8;
00446636      int32_t var_44 = 0;
0044663e      SmartArray<ArchiveVersionRow::VersionEntry,1>::operator=(&this->m_SerializeVersionRow.m_rowInitialData.m_aVersions, &var_4c);
0044663e      
00446653      if ((var_48 & 0x80000000) == 0x80000000)
0044665a          operator delete[](var_4c);
0044665a      
0044666d      Archive::InitForUnpacking(this, &this->m_SerializeVersionRow.vtable, arg2);
00446610  }

00446679                                                                             90 90 90 90 90 90 90                           .......

00446680  void __thiscall AutoStoreVersionArchive::InitForPacking(class AutoStoreVersionArchive* this, uint32_t arg2, class SmartBuffer const* arg3)

00446680  {
00446692      int32_t var_50 = 0x794430;
0044669a      void var_40;
0044669a      void* var_4c = &var_40;
0044669e      int32_t var_48 = 8;
004466a6      int32_t var_44 = 0;
004466ae      SmartArray<ArchiveVersionRow::VersionEntry,1>::operator=(&this->m_SerializeVersionRow.m_rowInitialData.m_aVersions, &var_4c);
004466ae      
004466c3      if ((var_48 & 0x80000000) == 0x80000000)
004466ca          operator delete[](var_4c);
004466ca      
004466df      ArchiveVersionRow::SetVersion(&this->m_SerializeVersionRow.m_rowInitialData, 0x436f7265, arg2);
004466ef      Archive::InitForPacking(this, &this->m_SerializeVersionRow.vtable, arg3);
00446680  }

004466fb                                                                                   90 90 90 90 90                             .....

00446700  void __thiscall AutoStoreVersionArchive::InitForPacking(class AutoStoreVersionArchive* this, class ArchiveVersionRow const* arg2, class SmartBuffer const* arg3)

00446700  {
0044670e      SmartArray<ArchiveVersionRow::VersionEntry,1>::operator=(&this->m_SerializeVersionRow.m_rowInitialData.m_aVersions, &arg2->m_aVersions);
0044671e      Archive::InitForPacking(this, &this->m_SerializeVersionRow.vtable, arg3);
00446700  }

00446727                       90 90 90 90 90 90 90 90 90                                                         .........

00446730  uint8_t __fastcall RenderMesh::InitLoad(class RenderMesh* this)

00446730  {
00446733      RenderMesh::GenerateFragmentIndexLists(this);
00446733      
0044673d      if (this->m_RenderLODFragmentIndices.m_num <= 0)
0044673d      {
0044676f          uint32_t eax;
0044676f          eax = 0;
00446772          return 0;
0044673d      }
0044673d      
00446741      RenderMesh::OrganizeFragmentBatches(this);
00446748      RenderMesh::CacheMaterialAttributes(this);
0044674f      RenderMesh::CacheHasSkeletalData(this);
00446756      RenderMesh::CacheRenderBoundingBox(this);
00446756      
00446762      if (DBCache::IsRunTime() == 0)
00446766          RenderMesh::GenerateTopologyForFragments(this);
00446766      
0044676e      return 1;
00446730  }

00446773                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00446780  void __thiscall AutoStoreVersionArchive::AutoStoreVersionArchive(class AutoStoreVersionArchive* this, enum Archive::tagUnpacking arg2, class SmartBuffer const* arg3)

00446780  {
00446786      this->vtable = 0x792b3c;
0044678c      this->m_flags = 0;
00446792      this->m_hrError.m_val = 0;
00446795      SmartBuffer::SmartBuffer(&this->m_buffer);
0044679e      this->m_currOffset = 0;
004467a1      this->m_pcUserDataHash = nullptr;
004467a4      this->m_pVersionStack = nullptr;
004467a7      this->vtable = &AutoStoreVersionArchive::`vftable';
004467ad      this->m_SerializeVersionRow.vtable = 0x799a90;
004467b4      this->m_SerializeVersionRow.m_rowInitialData.vtable = 0x794430;
004467bf      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_data = &this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_aPrimitiveInplaceMemory;
004467c2      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_sizeAndDeallocate = 8;
004467c9      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_num = 0;
004467ce      this->m_bOnSerializingDoneCalled = 1;
004467d5      AutoStoreVersionArchive::InitForUnpacking(this, arg3);
00446780  }

004467e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004467f0  uint8_t __thiscall RenderMesh::ParseFromVersionedFileNode(class RenderMesh* this, class PFileNode const* arg2)

004467f0  {
00446804      class PFileNode* eax;
00446804      class PStringBase<char> ecx_1;
00446804      eax = PFileNode::GetLeaf(arg2);
0044680d      class PStringBase<char> var_a0;
0044680d      
0044680d      if (eax == 0)
0044680d      {
0044680f          var_a0 = ecx_1;
00446817          PStringBase<char>::PStringBase<char>(&var_a0, "Expected binary mesh data, got n…");
0044681d          PFileNode::ReportError(arg2, var_a0);
00446825          int32_t eax_1;
00446825          eax_1 = 0;
00446830          return 0;
0044680d      }
0044680d      
00446837      void var_90;
00446837      SmartBuffer::SmartBuffer(&var_90);
00446840      var_a0 = &var_90;
00446843      uint8_t eax_2;
00446843      class PStringBase<char> ecx_5;
00446843      eax_2 = PFileNode::GetNameAsBinary(eax, var_a0);
00446843      
0044684a      if (eax_2 == 0)
0044684a      {
0044684c          var_a0 = ecx_5;
00446854          PStringBase<char>::PStringBase<char>(&var_a0, "Failed retrieving binary mesh da…");
0044685a          PFileNode::ReportError(arg2, var_a0);
00446866          SmartBuffer::~SmartBuffer(&var_90);
0044686b          int32_t eax_3;
0044686b          eax_3 = 0;
00446876          return 0;
0044684a      }
0044684a      
0044687d      var_a0 = &var_90;
00446884      struct AutoStoreVersionArchive::VTable* const var_84;
00446884      AutoStoreVersionArchive::AutoStoreVersionArchive(&var_84, Unpacking, var_a0);
00446889      var_a0 = 1;
0044688f      Archive::SetDBLoader(&var_84, var_a0.m_charbuffer);
00446894      struct RenderMesh::VTable* vtable = this->vtable;
0044689a      var_a0 = &var_84;
0044689d      vtable->Serialize(var_a0);
004468a4      AutoStoreVersionArchive::OnSerializingDone(&var_84);
004468c5      var_84 = &AutoStoreVersionArchive::`vftable';
004468cd      int32_t var_4c;
004468cd      
004468cd      if ((var_4c & 0x80000000) == 0x80000000)
004468cd      {
004468d3          class PStringBase<char> var_50;
004468d3          var_a0 = var_50;
004468d4          operator delete[](var_a0);
004468cd      }
004468cd      
004468e0      Archive::~Archive(&var_84);
004468e9      SmartBuffer::~SmartBuffer(&var_90);
004468f9      int32_t var_80;
004468f9      return (!(((int8_t)(var_80 >> 2))) & 1);
004467f0  }

004468fc                                                                                      90 90 90 90                              ....

00446900  uint8_t __thiscall RenderMesh::FromFileNode(class RenderMesh* this, class PFileNode const* arg2)

00446900  {
0044690d      if (arg2 != 0)
0044690d      {
0044690f          class PFileNode* var_18 = arg2;
00446914          void var_c;
00446914          PFileNodeIter::PFileNodeIter(&var_c, var_18);
00446922          class PFileNode* esi_1 = PFileNodeIter::Curr(&var_c);
00446922          
00446926          if (esi_1 == 0)
00446926          {
004469b8          label_4469b8:
004469b8              RenderMesh::GenerateFragmentIndexLists(this);
004469b8              
004469c2              if (this->m_RenderLODFragmentIndices.m_num > 0)
004469c2              {
004469c6                  RenderMesh::GetMaterialsFromDatabase(this);
004469ce                  int32_t i = 0;
004469ce                  
004469d2                  if (this->m_RenderLODFragmentIndices.m_num > 0)
004469d2                  {
004469eb                      do
004469eb                      {
004469e0                          RenderMeshFragment::OrganizeMaterialBatches(this->m_Fragments.m_data[this->m_RenderLODFragmentIndices.m_data[i]]);
004469e8                          i += 1;
004469eb                      } while (i < this->m_RenderLODFragmentIndices.m_num);
004469d2                  }
004469d2                  
004469ef                  RenderMesh::CacheMaterialAttributes(this);
004469f6                  RenderMesh::CacheHasSkeletalData(this);
004469fd                  RenderMesh::CacheRenderBoundingBox(this);
004469fd                  
00446a09                  if (DBCache::IsRunTime() == 0)
00446a0d                      RenderMesh::GenerateTopologyForFragments(this);
00446a0d                  
00446a16                  PFileNodeIter::~PFileNodeIter(&var_c);
00446a1c                  int32_t eax_13;
00446a1c                  eax_13 = 1;
00446a22                  return 1;
004469c2              }
00446926          }
00446926          else
00446926          {
00446930              while (true)
00446930              {
00446930                  var_18 = &PreprocHeader;
00446930                  
0044693e                  if (PFileNode::IsKeyword(esi_1, var_18) == 0)
0044693e                  {
00446940                      var_18 = &RenderMesh;
00446940                      
0044694e                      if (PFileNode::IsKeyword(esi_1, var_18) == 0)
0044694e                      {
0044696f                          var_18 = &RenderMeshVersion;
00446976                          uint8_t eax_5;
00446976                          class PFileNode* ecx_7;
00446976                          eax_5 = PFileNode::IsKeyword(esi_1, var_18);
00446976                          
0044697d                          if (eax_5 == 0)
0044697d                          {
0044698d                              var_18 = ecx_7;
00446995                              PStringBase<char>::PStringBase<char>(&var_18, "Unknown keyword in mesh");
0044699b                              PFileNode::ReportWarning(esi_1, var_18);
0044697d                          }
0044697d                          else
0044697d                          {
0044697f                              var_18 = esi_1;
0044697f                              
00446989                              if (RenderMesh::ParseFromVersionedFileNode(this, var_18) == 0)
00446989                                  break;
0044697d                          }
0044694e                      }
0044694e                      else
0044694e                      {
00446950                          var_18 = esi_1;
00446950                          
0044695a                          if (RenderMesh::ParseFromFileNode(this, var_18) == 0)
0044695a                              break;
0044694e                      }
0044693e                  }
0044693e                  
004469ac                  esi_1 = PFileNodeIter::Next(&var_c);
004469ac                  
004469b0                  if (esi_1 == 0)
004469b0                      goto label_4469b8;
00446930              }
00446926          }
00446926          
00446960          PFileNodeIter::~PFileNodeIter(&var_c);
0044690d      }
0044690d      
00446965      class PFileNode* eax_4;
00446965      eax_4 = 0;
0044696c      return 0;
00446900  }

00446a25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00446a30  uint8_t __thiscall GraphicsResource::CopyInto(class GraphicsResource const* this, class GraphicsResource* arg2)

00446a30  {
00446a37      arg2->m_bIsLost = this->m_bIsLost;
00446a3d      arg2->m_bIsThrashable = this->m_bIsThrashable;
00446a43      arg2->m_AutoRestore = this->m_AutoRestore;
00446a49      arg2->m_nResourceSize = this->m_nResourceSize;
00446a4f      arg2->m_TimeUsed = this->m_TimeUsed;
00446a55      *(uint32_t*)((char*)arg2->m_TimeUsed)[4] = *(uint32_t*)((char*)this->m_TimeUsed)[4];
00446a5b      arg2->m_FrameUsed = this->m_FrameUsed;
00446a5e      class GraphicsResource* eax;
00446a5e      eax = 1;
00446a60      return 1;
00446a30  }

00446a63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00446a70  void __thiscall GraphicsResource::SetResourceSize(class GraphicsResource* this, uint32_t const arg2)

00446a70  {
00446a74      this->m_nResourceSize = arg2;
00446a70  }

00446a7a                                                                                90 90 90 90 90 90                            ......

00446a80  void __thiscall GraphicsResource::SetResourceIsThrashable(class GraphicsResource* this, uint8_t const arg2)

00446a80  {
00446a84      this->m_bIsThrashable = arg2;
00446a80  }

00446a8a                                90 90 90 90 90 90                                                            ......

00446a90  void __thiscall GraphicsResource::SetAutoRestore(class GraphicsResource* this, uint8_t const arg2)

00446a90  {
00446a94      this->m_AutoRestore = arg2;
00446a90  }

00446a9a                                                                                90 90 90 90 90 90                            ......

00446aa0  void __fastcall GraphicsResource::MarkResourceAsNotLost(class GraphicsResource const* this)

00446aa0  {
00446aa0      this->m_bIsLost = 0;
00446aa0  }

00446aa5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00446ab0  void __fastcall GraphicsResource::MarkResourceAsLost(class GraphicsResource const* this)

00446ab0  {
00446ab0      this->m_bIsLost = 1;
00446ab0  }

00446ab5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00446ac0  uint8_t __fastcall GraphicsResource::RestoreResource(class GraphicsResource* this)

00446ac0  {
00446ac8      return this->m_bIsLost != 0;
00446ac0  }

00446ac9                             90 90 90 90 90 90 90                                                           .......

00446ad0  uint8_t __thiscall SmartArray<GraphicsResource *,1>::RemoveUnOrderedByIndex(class SmartArray<GraphicsResource *,1>* this, uint32_t arg2)

00446ad0  {
00446ad0      uint32_t m_num = this->m_num;
00446ad0      
00446ada      if (arg2 >= m_num)
00446ada      {
00446afe          m_num = 0;
00446b01          return 0;
00446ada      }
00446ada      
00446adf      this->m_num = (m_num - 1);
00446adf      
00446ae2      if (arg2 != (m_num - 1))
00446ae2      {
00446ae4          class GraphicsResource** m_data = this->m_data;
00446ae9          m_data[arg2] = m_data[(m_num - 1)];
00446af1          *(uint32_t*)(this->m_data + (this->m_num << 2)) = 0;
00446ae2      }
00446ae2      
00446af8      uint32_t eax;
00446af8      eax = 1;
00446afb      return 1;
00446ad0  }

00446b04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00446b10  void _STL::__push_heap(class GraphicsResource** arg1, int32_t arg2, int32_t arg3, class GraphicsResource* arg4, class MySTLSortFunction_LRU arg5)

00446b10  {
00446b17      int32_t esi = arg2;
00446b1e      int32_t eax_1;
00446b1e      int32_t edx;
00446b1e      edx = HIGHD(((int64_t)(esi - 1)));
00446b1e      eax_1 = LOWD(((int64_t)(esi - 1)));
00446b23      int32_t ecx_1 = ((eax_1 - edx) >> 1);
00446b23      
00446b28      if (esi <= arg3)
00446b28      {
00446b66          arg1[esi] = arg4;
00446b6c          return;
00446b28      }
00446b28      
00446b53      do
00446b53      {
00446b32          void* edx_1 = arg1[ecx_1];
00446b35          long double x87_r7_1 = ((long double)*(uint64_t*)((char*)edx_1 + 0x10));
00446b38          long double temp0_1 = ((long double)arg4->m_TimeUsed);
00446b38          (x87_r7_1 - temp0_1);
00446b3b          int32_t eax_2;
00446b3b          eax_2 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00446b3d          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00446b3d          
00446b40          if (p_1)
00446b40              break;
00446b40          
00446b45          arg1[esi] = edx_1;
00446b48          int32_t eax_4;
00446b48          int32_t edx_2;
00446b48          edx_2 = HIGHD(((int64_t)(ecx_1 - 1)));
00446b48          eax_4 = LOWD(((int64_t)(ecx_1 - 1)));
00446b4b          esi = ecx_1;
00446b51          ecx_1 = ((eax_4 - edx_2) >> 1);
00446b53      } while (esi > arg3);
00446b53      
00446b55      arg1[esi] = arg4;
00446b10  }

00446b6d                                         90 90 90                                                               ...

00446b70  void GraphicsResource::UnlinkResource(class GraphicsResource* arg1)

00446b70  {
00446b75      uint32_t m_ListIndex = arg1->m_ListIndex;
00446b75      
00446b7b      if (m_ListIndex != 0xffffffff)
00446b7b      {
00446b7d          uint32_t m_num = GraphicsResource::s_Resources.m_num;
00446b7d          
00446b88          if ((m_num != 0 && m_ListIndex < m_num))
00446b88          {
00446b8d              if (m_ListIndex < (m_num - 1))
00446b8d              {
00446b90                  class GraphicsResource** m_data = GraphicsResource::s_Resources.m_data;
00446b96                  void* edx_1 = m_data[(m_num - 1)];
00446b99                  m_data[m_ListIndex] = edx_1;
00446b9c                  *(uint32_t*)((char*)edx_1 + 0x24) = m_ListIndex;
00446b8d              }
00446b8d              
00446ba0              arg1->m_ListIndex = 0xffffffff;
00446ba7              GraphicsResource::s_Resources.m_data[(m_num - 1)] = 0;
00446bba              SmartArray<GraphicsResource *,1>::RemoveUnOrderedByIndex(&GraphicsResource::s_Resources, (m_num - 1));
00446b88          }
00446b7b      }
00446b70  }

00446bc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00446bd0  uint8_t GraphicsResource::PurgeResources()

00446bd0  {
00446bd6      int32_t i = 0;
00446bd6      
00446bda      if (GraphicsResource::s_Resources.m_num > 0)
00446bda      {
00446c0d          do
00446c0d          {
00446be5              int32_t* esi_1 = GraphicsResource::s_Resources.m_data[i];
00446be5              
00446bea              if (esi_1 != 0)
00446bea              {
00446bec                  class GraphicsResource** eax;
00446bec                  eax = esi_1[2];
00446bec                  
00446bf1                  if ((eax == 0 && *(uint32_t*)(*(uint32_t*)esi_1 + 8)() != 0))
00446bf1                  {
00446bfe                      esi_1[2] = 1;
00446c02                      i = 0xffffffff;
00446bf1                  }
00446bea              }
00446bea              
00446c0a              i += 1;
00446c0d          } while (i < GraphicsResource::s_Resources.m_num);
00446bda      }
00446bda      
00446c10      uint32_t eax_2;
00446c10      eax_2 = 1;
00446c13      return 1;
00446bd0  }

00446c14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00446c20  uint8_t GraphicsResource::RestoreLostResources()

00446c20  {
00446c26      int32_t i = 0;
00446c26      
00446c2a      if (GraphicsResource::s_Resources.m_num > 0)
00446c2a      {
00446c5a          do
00446c5a          {
00446c35              int32_t* ecx_1 = GraphicsResource::s_Resources.m_data[i];
00446c38              class GraphicsResource** eax;
00446c38              eax = ecx_1[2];
00446c38              
00446c3d              if (eax != 0)
00446c3d              {
00446c3f                  eax = *(uint8_t*)((char*)ecx_1 + 0x1d);
00446c3f                  
00446c44                  if ((eax != 0 && *(uint32_t*)(*(uint32_t*)ecx_1 + 0xc)() != 0))
00446c4f                      i = 0xffffffff;
00446c3d              }
00446c3d              
00446c57              i += 1;
00446c5a          } while (i < GraphicsResource::s_Resources.m_num);
00446c2a      }
00446c2a      
00446c5c      uint32_t eax_2;
00446c5c      eax_2 = 1;
00446c5f      return 1;
00446c20  }


00446c60  void GraphicsResource::PurgeOldResources(double const arg1)

00446c60  {
00446c63      int32_t Timer::local_time_1 = (*(uint32_t*)Timer::local_time);
00446c78      int32_t i = 0;
00446c7c      int32_t var_4 = *(int32_t*)((char*)Timer::local_time + 4);
00446c7c      
00446c80      if (GraphicsResource::s_Resources.m_num > 0)
00446c80      {
00446cde          do
00446cde          {
00446c89              int32_t* esi_1 = GraphicsResource::s_Resources.m_data[i];
00446c8c              uint32_t eax;
00446c8c              eax = esi_1[2];
00446c8c              
00446c91              if (eax == 0)
00446c91              {
00446c93                  eax = esi_1[7];
00446c93                  
00446cb0                  if ((eax != 0 && (esi_1[6] != RenderDevice::render_device->m_nFrameStamp && esi_1[8] > 0)))
00446cb0                  {
00446cb5                      long double x87_r7_2 = (((long double)Timer::local_time_1) - ((long double)*(uint64_t*)((char*)esi_1 + 0x10)));
00446cb9                      long double temp0_1 = ((long double)arg1);
00446cb9                      (x87_r7_2 - temp0_1);
00446cbd                      int32_t eax_2;
00446cbd                      eax_2 = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00446cbd                      
00446cc2                      if (((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0 && *(uint32_t*)(*(uint32_t*)esi_1 + 8)() != 0))
00446cc2                      {
00446ccf                          esi_1[2] = 1;
00446cd3                          i = 0xffffffff;
00446cc2                      }
00446cb0                  }
00446c91              }
00446c91              
00446cdb              i += 1;
00446cde          } while (i < GraphicsResource::s_Resources.m_num);
00446c80      }
00446c60  }

00446ce6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00446cf0  void _STL::__unguarded_insertion_sort_aux(class GraphicsResource** arg1, class GraphicsResource** arg2, class GraphicsResource** arg3, class MySTLSortFunction_LRU arg4)

00446cf0  {
00446cf5      class GraphicsResource** edi = arg1;
00446cf5      
00446cfb      while (edi != arg2)
00446cfb      {
00446d00          class GraphicsResource* ebx_1 = *(uint32_t*)edi;
00446d02          void* edx_1 = edi;
00446d04          void* ecx_1 = &edi[-1];
00446d04          
00446d07          while (true)
00446d07          {
00446d07              void* esi_1 = *(uint32_t*)ecx_1;
00446d09              long double x87_r7_1 = ((long double)*(uint64_t*)((char*)esi_1 + 0x10));
00446d0c              long double temp0_1 = ((long double)ebx_1->m_TimeUsed);
00446d0c              (x87_r7_1 - temp0_1);
00446d0f              class GraphicsResource** eax;
00446d0f              eax = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00446d0f              
00446d14              if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
00446d14                  break;
00446d14              
00446d16              *(uint32_t*)edx_1 = esi_1;
00446d18              edx_1 = ecx_1;
00446d1a              ecx_1 -= 4;
00446d07          }
00446d07          
00446d23          edi = &edi[1];
00446d28          *(uint32_t*)edx_1 = ebx_1;
00446cfb      }
00446cf0  }


00446d30  void _STL::__adjust_heap(class GraphicsResource** arg1, int32_t arg2, int32_t arg3, class GraphicsResource* arg4, class MySTLSortFunction_LRU arg5)

00446d30  {
00446d30      int32_t edx = arg2;
00446d3f      int32_t ecx = ((edx * 2) + 2);
00446d43      bool cond:1 = ecx != arg3;
00446d45      int32_t ebx = edx;
00446d45      
00446d47      while (ecx < arg3)
00446d47      {
00446d53          long double x87_r7_1 = ((long double)arg1[ecx]->m_TimeUsed);
00446d5a          long double x87_r6_1 = ((long double)arg1[(ecx - 1)]->m_TimeUsed);
00446d5d          (x87_r6_1 - x87_r7_1);
00446d5f          void* eax_2;
00446d5f          eax_2 = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
00446d5f          
00446d64          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
00446d66              ecx -= 1;
00446d66          
00446d6a          arg1[edx] = arg1[ecx];
00446d6d          edx = ecx;
00446d6f          ecx = ((ecx * 2) + 2);
00446d73          cond:1 = ecx != arg3;
00446d47      }
00446d47      
00446d77      if (!(cond:1))
00446d77      {
00446d7d          arg1[edx] = arg1[(ecx - 1)];
00446d80          edx = (ecx - 1);
00446d77      }
00446d77      
00446d90      _STL::__push_heap(arg1, edx, ebx, arg4, arg5);
00446d30  }

00446d9c                                                                                      90 90 90 90                              ....

00446da0  void __fastcall GraphicsResource::~GraphicsResource(class GraphicsResource* this)

00446da0  {
00446da1      this->vtable = &GraphicsResource::`vftable';
00446da7      GraphicsResource::UnlinkResource(this);
00446da0  }

00446dae                                            90 90                                                                ..

00446db0  class GraphicsResource** _STL::__unguarded_partition(class GraphicsResource** arg1, class GraphicsResource** arg2, class GraphicsResource* arg3, class MySTLSortFunction_LRU arg4)

00446db0  {
00446db0      class GraphicsResource** edx = arg2;
00446db4      class GraphicsResource** result = arg1;
00446dbd      int32_t edi;
00446dbd      int32_t var_8 = edi;
00446dbd      
00446dc2      while (true)
00446dc2      {
00446dc2          long double x87_r7_1 = ((long double)*(uint32_t*)result->m_TimeUsed);
00446dc5          long double temp0_1 = ((long double)arg3->m_TimeUsed);
00446dc5          (x87_r7_1 - temp0_1);
00446dc8          class GraphicsResource* eax_1;
00446dc8          eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00446dca          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00446dca          
00446dcd          if (p_1)
00446dcd          {
00446de5              void* eax_2;
00446de5              
00446de5              do
00446de5              {
00446dd7                  long double x87_r7_2 = ((long double)edx[-1]->m_TimeUsed);
00446dda                  edx -= 4;
00446ddd                  long double temp1_1 = ((long double)arg3->m_TimeUsed);
00446ddd                  (x87_r7_2 - temp1_1);
00446de0                  eax_2 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00446de5              } while ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0);
00446de5              
00446de9              if (result >= edx)
00446de9                  break;
00446de9              
00446deb              class GraphicsResource* eax_3 = *(uint32_t*)result;
00446def              *(uint32_t*)result = *(uint32_t*)edx;
00446df1              *(uint32_t*)edx = eax_3;
00446df3              result = &result[1];
00446dcd          }
00446dcd          else
00446dcf              result = &result[1];
00446dc2      }
00446dc2      
00446dfc      return result;
00446db0  }

00446dfd                                                                                         90 90 90                               ...

00446e00  void _STL::__make_heap(class GraphicsResource** arg1, class GraphicsResource** arg2, class MySTLSortFunction_LRU arg3, class GraphicsResource** arg4, int32_t* arg5)

00446e00  {
00446e0c      int32_t ebx_2 = (((char*)arg2 - arg1) >> 2);
00446e0c      
00446e12      if (ebx_2 >= 2)
00446e12      {
00446e15          class MySTLSortFunction_LRU ebp_1 = arg3;
00446e1d          int32_t eax_2;
00446e1d          int32_t edx_1;
00446e1d          edx_1 = HIGHD(((int64_t)(ebx_2 - 2)));
00446e1d          eax_2 = LOWD(((int64_t)(ebx_2 - 2)));
00446e22          int32_t i = ((eax_2 - edx_1) >> 1);
00446e2c          _STL::__adjust_heap(arg1, i, ebx_2, arg1[i], ebp_1);
00446e2c          
00446e36          while (i != 0)
00446e36          {
00446e38              class GraphicsResource* ecx_1 = arg1[(i - 1)];
00446e3c              i -= 1;
00446e42              _STL::__adjust_heap(arg1, i, ebx_2, ecx_1, ebp_1);
00446e36          }
00446e12      }
00446e00  }

00446e53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00446e60  void* __thiscall GraphicsResource::`scalar deleting destructor'(class GraphicsResource* this, uint32_t arg2)

00446e60  {
00446e64      this->vtable = &GraphicsResource::`vftable';
00446e6a      GraphicsResource::UnlinkResource(this);
00446e6a      
00446e78      if ((arg2 & 1) != 0)
00446e7b          operator delete(this);
00446e7b      
00446e86      return this;
00446e60  }

00446e89                             90 90 90 90 90 90 90                                                           .......

00446e90  void GraphicsResource::ShutdownResourceManager()

00446e90  {
00446e95      /* tailcall */
00446e95      return SmartArray<unsigned long,1>::Reset(&GraphicsResource::s_Resources);
00446e90  }

00446e9a                                                                                90 90 90 90 90 90                            ......

00446ea0  void _STL::__insertion_sort(class GraphicsResource** arg1, class GraphicsResource** arg2, class MySTLSortFunction_LRU arg3)

00446ea0  {
00446ea6      int32_t ecx;
00446ea6      int32_t var_c = ecx;
00446eac      class GraphicsResource** esi = arg1;
00446eac      
00446eb2      if (esi != arg2)
00446eb2      {
00446eb4          void* edi_1 = &esi[1];
00446eb4          
00446eb9          if (edi_1 != arg2)
00446eb9          {
00446ebd              int32_t ebx_2 = ((char*)edi_1 - esi);
00446ebd              
00446f30              do
00446f30              {
00446ec2                  class GraphicsResource* ecx_1 = *(uint32_t*)edi_1;
00446ec4                  long double x87_r7_1 = ((long double)*(uint32_t*)esi->m_TimeUsed);
00446ec7                  long double temp0_1 = ((long double)ecx_1->m_TimeUsed);
00446ec7                  (x87_r7_1 - temp0_1);
00446ece                  class GraphicsResource* eax_1;
00446ece                  eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00446ece                  
00446ed3                  if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) != 0)
00446ed3                  {
00446ef4                      void* edx_1 = edi_1;
00446ef6                      void* ecx_5 = (((char*)esi + ebx_2) - 4);
00446ef6                      
00446f00                      while (true)
00446f00                      {
00446f00                          void* esi_1 = *(uint32_t*)ecx_5;
00446f06                          long double x87_r7_2 = ((long double)*(uint64_t*)((char*)esi_1 + 0x10));
00446f09                          long double temp1_1 = ((long double)ecx_1->m_TimeUsed);
00446f09                          (x87_r7_2 - temp1_1);
00446f0c                          class GraphicsResource* eax_2;
00446f0c                          eax_2 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00446f0c                          
00446f11                          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
00446f11                              break;
00446f11                          
00446f13                          *(uint32_t*)edx_1 = esi_1;
00446f15                          edx_1 = ecx_5;
00446f17                          ecx_5 -= 4;
00446f00                      }
00446f00                      
00446f20                      esi = arg1;
00446f23                      *(uint32_t*)edx_1 = ecx_1;
00446ed3                  }
00446ed3                  else
00446ed3                  {
00446ed7                      if (ebx_2 > 0)
00446ee3                          memmove((((char*)edi_1 - ebx_2) + 4), esi, ebx_2);
00446ee3                      
00446ef0                      *(uint32_t*)esi = ecx_1;
00446ed3                  }
00446ed3                  
00446f28                  edi_1 += 4;
00446f2b                  ebx_2 += 4;
00446f30              } while (edi_1 != arg2);
00446eb9          }
00446eb2      }
00446ea0  }

00446f39                                                                             90 90 90 90 90 90 90                           .......

00446f40  void _STL::sort_heap(class GraphicsResource** arg1, class GraphicsResource** arg2, class MySTLSortFunction_LRU arg3)

00446f40  {
00446f49      void* eax = ((char*)arg2 - arg1);
00446f49      
00446f53      if ((eax & 0xfffffffc) > 4)
00446f53      {
00446f8a          void* edi_1;
00446f8a          
00446f8a          do
00446f8a          {
00446f60              class GraphicsResource* ecx_2 = *(uint32_t*)(((char*)arg1 + eax) - 4);
00446f66              edi_1 = ((char*)eax - 4);
00446f69              *(uint32_t*)(((char*)arg1 + eax) - 4) = *(uint32_t*)arg1;
00446f78              _STL::__adjust_heap(arg1, 0, (edi_1 >> 2), ecx_2, arg3);
00446f7d              eax = edi_1;
00446f8a          } while ((edi_1 & 0xfffffffc) > 4);
00446f53      }
00446f40  }

00446f5d                                                                                         8d 49 00                               .I.

00446f90  void GraphicsResource::LinkResource(class GraphicsResource* arg1)

00446f90  {
00446f95      uint32_t m_num = GraphicsResource::s_Resources.m_num;
00446f9b      int32_t eax = (GraphicsResource::s_Resources.m_sizeAndDeallocate & 0x7fffffff);
00446fa3      uint32_t m_num_1 = m_num;
00446fa3      
00446fa5      if (m_num >= eax)
00446fa5      {
00446fc0          if (SmartArray<unsigned long,1>::grow(&GraphicsResource::s_Resources, SmartArray<unsigned long,1>::get_new_size(&GraphicsResource::s_Resources, (eax + 1))) == 0)
00446fc0          {
00446fe4              arg1->m_ListIndex = m_num_1;
00446fe8              return;
00446fc0          }
00446fc0          
00446fc2          m_num = GraphicsResource::s_Resources.m_num;
00446fa5      }
00446fa5      
00446fcc      GraphicsResource::s_Resources.m_data[m_num] = arg1;
00446fd5      GraphicsResource::s_Resources.m_num += 1;
00446fdb      arg1->m_ListIndex = m_num_1;
00446f90  }

00446fe9                             90 90 90 90 90 90 90                                                           .......

00446ff0  void _STL::__final_insertion_sort(class GraphicsResource** arg1, class GraphicsResource** arg2, class MySTLSortFunction_LRU arg3)

00446ff0  {
00447003      if ((((char*)arg2 - arg1) & 0xfffffffc) <= 0x40)
00447003      {
0044702e          _STL::__insertion_sort(arg1, arg2, arg3);
00447037          return;
00447003      }
00447003      
00447007      class MySTLSortFunction_LRU edi = arg3;
00447011      _STL::__insertion_sort(arg1, &arg1[0x10], edi);
0044701b      _STL::__unguarded_insertion_sort_aux(&arg1[0x10], arg2, nullptr, edi);
00446ff0  }

00447038                                                                          90 90 90 90 90 90 90 90                          ........

00447040  void _STL::__partial_sort(class GraphicsResource** arg1, class GraphicsResource** arg2, class GraphicsResource** arg3, class GraphicsResource** arg4, class MySTLSortFunction_LRU arg5)

00447040  {
00447056      _STL::__make_heap(arg1, arg2, arg5, nullptr, nullptr);
00447064      class GraphicsResource** edi = arg2;
00447064      
00447066      if (arg2 < arg3)
00447066      {
0044709f          do
0044709f          {
00447068              class GraphicsResource* ecx_1 = *(uint32_t*)edi;
0044706a              long double x87_r7_1 = ((long double)ecx_1->m_TimeUsed);
0044706d              class GraphicsResource* edx_1 = *(uint32_t*)arg1;
0044706f              long double x87_r6_1 = ((long double)edx_1->m_TimeUsed);
00447072              (x87_r6_1 - x87_r7_1);
00447074              class GraphicsResource** eax;
00447074              eax = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
00447074              
00447079              if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00447079              {
0044707b                  *(uint32_t*)edi = edx_1;
0044708e                  _STL::__adjust_heap(arg1, 0, (((char*)arg2 - arg1) >> 2), ecx_1, arg5);
00447079              }
00447079              
0044709a              edi = &edi[1];
0044709f          } while (edi < arg3);
00447066      }
00447066      
004470a8      _STL::sort_heap(arg1, arg2, arg5);
00447040  }

004470b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004470c0  void __fastcall GraphicsResource::GraphicsResource(class GraphicsResource* this)

004470c0  {
004470c8      this->m_TimeUsed = 0f;
004470cb      *(uint32_t*)((char*)this->m_TimeUsed)[4] = 0;
004470ce      this->vtable = &GraphicsResource::`vftable';
004470d4      this->m_bIsLost = 0;
004470d7      this->m_bIsThrashable = 0;
004470da      this->m_AutoRestore = 0;
004470dd      this->m_nResourceSize = 0;
004470e0      this->m_FrameUsed = 0xffffffff;
004470e3      this->m_ListIndex = 0xffffffff;
004470f2      this->m_TimeUsed = (*(uint32_t*)Timer::local_time);
004470f5      *(uint32_t*)((char*)this->m_TimeUsed)[4] = *(int32_t*)((char*)Timer::local_time + 4);
004470f8      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
004470f8      
00447100      if (RenderDevice::render_device_1 != 0)
00447108          this->m_FrameUsed = RenderDevice::render_device_1->m_nFrameStamp;
00447108      
0044710c      GraphicsResource::LinkResource(this);
004470c0  }

00447118                                                                          90 90 90 90 90 90 90 90                          ........

00447120  void _STL::__introsort_loop(class GraphicsResource** arg1, class GraphicsResource** arg2, class GraphicsResource** arg3, int32_t arg4, class MySTLSortFunction_LRU arg5)

00447120  {
00447126      int32_t ecx;
00447126      int32_t var_c = ecx;
00447128      class GraphicsResource** ebx = arg2;
00447128      
0044713a      if ((((char*)ebx - arg1) & 0xfffffffc) > 0x40)
0044713a      {
00447145          while (arg4 != 0)
00447145          {
0044714b              class GraphicsResource* ecx_1 = *(uint32_t*)arg1;
0044715a              arg4 -= 1;
0044715d              int32_t eax_7;
0044715d              int32_t edx_3;
0044715d              edx_3 = HIGHD(((int64_t)(((char*)ebx - arg1) >> 2)));
0044715d              eax_7 = LOWD(((int64_t)(((char*)ebx - arg1) >> 2)));
00447160              int32_t eax_9 = ((eax_7 - edx_3) >> 1);
00447162              void* edx_4 = arg1[eax_9];
00447168              (((long double)ecx_1->m_TimeUsed) - ((long double)*(uint64_t*)((char*)edx_4 + 0x10)));
00447174              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00447177              void* eax_11 = ebx[-1];
00447179              class GraphicsResource** eax_13;
00447179              
00447179              if (p_1)
00447179              {
0044719b                  long double x87_r7_4 = ((long double)ecx_1->m_TimeUsed);
0044719e                  long double temp1_1 = ((long double)*(uint64_t*)((char*)eax_11 + 0x10));
0044719e                  (x87_r7_4 - temp1_1);
004471a1                  eax_11 = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004471a3                  bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
004471a3                  
004471a6                  if (p_4)
004471a6                  {
004471b1                      (((long double)*(uint64_t*)((char*)edx_4 + 0x10)) - ((long double)ebx[-1]->m_TimeUsed));
004471b6                      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
004471b9                      eax_13 = &ebx[-1];
004471b9                      
004471bb                      if (p_5)
004471bd                          eax_13 = &arg1[eax_9];
004471a6                  }
004471a6                  else
004471a8                      eax_13 = arg1;
00447179              }
00447179              else
00447179              {
0044717b                  long double x87_r7_2 = ((long double)*(uint64_t*)((char*)edx_4 + 0x10));
0044717e                  long double temp2_1 = ((long double)*(uint64_t*)((char*)eax_11 + 0x10));
0044717e                  (x87_r7_2 - temp2_1);
00447181                  eax_11 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00447183                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00447183                  
00447186                  if (!(p_2))
004471bd                      eax_13 = &arg1[eax_9];
00447186                  else
00447186                  {
0044718a                      long double x87_r7_3 = ((long double)ecx_1->m_TimeUsed);
0044718d                      long double temp4_1 = ((long double)ebx[-1]->m_TimeUsed);
0044718d                      (x87_r7_3 - temp4_1);
00447190                      void* eax_12;
00447190                      eax_12 = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00447192                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00447192                      
00447195                      if (p_3)
004471a8                          eax_13 = arg1;
00447195                      else
00447197                          eax_13 = &ebx[-1];
00447186                  }
00447179              }
00447179              
004471ca              class GraphicsResource** eax_15 = _STL::__unguarded_partition(arg1, ebx, *(uint32_t*)eax_13, arg5);
004471dd              _STL::__introsort_loop(eax_15, ebx, nullptr, arg4, arg5);
004471e2              ebx = eax_15;
004471e2              
004471ef              if ((((char*)eax_15 - arg1) & 0xfffffffc) <= 0x40)
004471fb                  return;
00447145          }
00447145          
00447205          _STL::__partial_sort(arg1, ebx, ebx, nullptr, arg5);
0044713a      }
00447120  }

00447214                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00447220  void _STL::sort(class GraphicsResource** arg1, class GraphicsResource** arg2, class MySTLSortFunction_LRU arg3)

00447220  {
0044722c      if (arg1 != arg2)
0044722c      {
00447232          int32_t i = (((char*)arg2 - arg1) >> 2);
00447235          int32_t ecx_1 = 0;
00447235          
0044723a          while (i != 1)
0044723a          {
00447240              i s>>= 1;
00447242              ecx_1 += 1;
0044723a          }
0044723a          
00447249          class MySTLSortFunction_LRU ebx_1 = arg3;
00447256          _STL::__introsort_loop(arg1, arg2, nullptr, (ecx_1 * 2), ebx_1);
0044725e          _STL::__final_insertion_sort(arg1, arg2, ebx_1);
0044722c      }
00447220  }

0044726a                                90 90 90 90 90 90                                                            ......

00447270  uint8_t GraphicsResource::DiscardResourceBytes(uint32_t const arg1)

00447270  {
0044727b      class GraphicsResource** m_data = GraphicsResource::s_Resources.m_data;
00447285      _STL::sort(m_data, &m_data[GraphicsResource::s_Resources.m_num], arg1);
0044728a      uint32_t m_num = GraphicsResource::s_Resources.m_num;
00447293      uint32_t const eax = 0;
00447293      
00447297      if (m_num > 0)
00447297      {
004472b5          do
004472b5          {
004472a0              GraphicsResource::s_Resources.m_data[eax]->m_ListIndex = eax;
004472ac              m_num = GraphicsResource::s_Resources.m_num;
004472b2              eax += 1;
004472b5          } while (eax < m_num);
00447297      }
00447297      
004472bb      int32_t ebx = 0;
004472bd      int32_t i = 0;
004472bd      
004472c1      if (m_num > 0)
004472c1      {
00447315          do
00447315          {
004472c8              int32_t* esi_1 = GraphicsResource::s_Resources.m_data[i];
004472cb              class GraphicsResource** eax_1;
004472cb              eax_1 = esi_1[7];
004472cb              
004472d0              if (eax_1 != 0)
004472d0              {
004472d2                  eax_1 = esi_1[2];
004472d2                  
004472d7                  if (eax_1 == 0)
004472d7                  {
004472d9                      int32_t ebp_1 = esi_1[8];
004472d9                      
004472ef                      if (((ebp_1 > 0 && esi_1[6] != RenderDevice::render_device->m_nFrameStamp) && *(uint32_t*)(*(uint32_t*)esi_1 + 8)() != 0))
004472ef                      {
00447300                          ebx += ebp_1;
00447304                          esi_1[2] = 1;
00447304                          
00447308                          if (ebx >= arg1)
00447308                              goto label_447320;
00447308                          
0044730a                          i = 0xffffffff;
004472ef                      }
004472d7                  }
004472d0              }
004472d0              
00447312              i += 1;
00447315          } while (i < GraphicsResource::s_Resources.m_num);
004472c1      }
004472c1      
0044731b      if (ebx < arg1)
0044731b      {
00447327          eax = 0;
0044732a          return 0;
0044731b      }
0044731b      
00447320  label_447320:
00447320      eax = 1;
00447323      return 1;
00447270  }

0044732b                                   90 90 90 90 90                                                             .....

00447330  void __fastcall RGBAColor::CapHigh(class RGBAColor* this)

00447330  {
00447330      long double x87_r7 = ((long double)this->a);
00447338      long double temp0 = ((long double)1f);
00447338      (x87_r7 - temp0);
00447338      
00447343      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00447345          this->a = 1f;
00447345      
00447348      long double x87_r7_1 = ((long double)this->r);
0044734a      long double temp1 = ((long double)1f);
0044734a      (x87_r7_1 - temp1);
0044734a      
00447355      if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00447357          this->r = 0x3f800000;
00447357      
00447359      long double x87_r7_2 = ((long double)this->g);
0044735c      long double temp2 = ((long double)1f);
0044735c      (x87_r7_2 - temp2);
0044735c      
00447367      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00447369          this->g = 1f;
00447369      
0044736c      long double x87_r7_3 = ((long double)this->b);
0044736f      long double temp3 = ((long double)1f);
0044736f      (x87_r7_3 - temp3);
0044736f      
0044737a      if ((*(uint8_t*)((char*)((((x87_r7_3 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp3) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0044737c          this->b = 1f;
00447330  }


00447380  void __fastcall RenderVertexBuffer::Begin(class RenderVertexBuffer* this)

00447380  {
00447396      this->m_UseVirtualArray = 0;
0044739c      this->m_pVirtualArray = nullptr;
004473a2      this->m_IsVirtualArrayLocked = 0;
004473a8      this->m_NeedRefreshVirtualArray = 1;
004473af      __builtin_memcpy(&this->m_VirtualArrayBoundingBox, 0x8ee170, 0x18);
004473b2      this->m_IsVirtualArrayBoundingBoxValid = 0;
00447380  }

004473ba                                                                                90 90 90 90 90 90                            ......

004473c0  void __fastcall RenderVertexBuffer::End(class RenderVertexBuffer* this)

004473c0  {
004473c3      void* m_pVirtualArray = this->m_pVirtualArray;
004473c3      
004473cb      if (m_pVirtualArray != 0)
004473cb      {
004473ce          operator delete[](m_pVirtualArray);
004473d6          this->m_pVirtualArray = nullptr;
004473cb      }
004473c0  }

004473e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004473f0  uint8_t __thiscall RenderVertexBuffer::Startup(class RenderVertexBuffer* this, uint32_t const arg2, uint32_t const arg3, uint8_t const arg4, uint8_t const arg5, uint32_t const arg6)

004473f0  {
00447417      void* eax;
00447417      
00447417      if (VertexArray::Startup(this, arg2, arg3, arg4, arg5, arg6) != 0)
00447417      {
00447419          uint32_t format = this->vertexFormat.format;
0044741e          uint8_t const m_bStripHWExtraTexCoords = this->m_bStripHWExtraTexCoords;
00447424          eax = arg4 == 0;
00447427          this->m_UseVirtualArray = eax;
0044742f          int32_t eax_2 = (format & 0x52);
00447434          this->m_HardwareVertexFormat.format = eax_2;
00447434          
0044743c          if (m_bStripHWExtraTexCoords == 0)
00447434              this->m_HardwareVertexFormat.format = ((format & 0xf00) | eax_2);
0044743c          else if (this->vertexFormat.numTCPairs > 0)
00447434              this->m_HardwareVertexFormat.format = (eax_2 | 0x100);
00447434          
00447434          this->m_HardwareVertexFormat.format &= arg6;
0044745a          VertexFormatInfo::GenerateOffsets(&this->m_HardwareVertexFormat.format);
0044745f          eax = this->m_UseVirtualArray;
0044745f          
00447467          if (eax == 0)
00447467          {
0044749f          label_44749f:
0044749f              __builtin_memcpy(&this->m_VirtualArrayBoundingBox, 0x8ee170, 0x18);
004474a3              this->m_IsVirtualArrayBoundingBoxValid = 0;
004474ab              eax = 1;
004474ae              return 1;
00447467          }
00447467          
00447474          eax = operator new[]((this->m_HardwareVertexFormat.size * this->numVertices));
0044747e          this->m_pVirtualArray = eax;
0044747e          
00447484          if (eax != 0)
00447484              goto label_44749f;
00447417      }
00447417      
00447488      eax = 0;
0044748b      return 0;
004473f0  }

004474b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004474c0  void __fastcall RenderVertexBuffer::Shutdown(class RenderVertexBuffer* this)

004474c0  {
004474c4      void* m_pVirtualArray = this->m_pVirtualArray;
004474c4      
004474d0      if (m_pVirtualArray != 0)
004474d0      {
004474d3          operator delete[](m_pVirtualArray);
004474db          this->m_pVirtualArray = nullptr;
004474d0      }
004474d0      
004474e3      VertexArray::Shutdown(this);
004474e8      this->m_UseVirtualArray = 0;
004474ee      this->m_pVirtualArray = nullptr;
004474f4      this->m_IsVirtualArrayLocked = 0;
00447500      this->m_NeedRefreshVirtualArray = 1;
00447511      __builtin_memcpy(&this->m_VirtualArrayBoundingBox, 0x8ee170, 0x18);
00447515      this->m_IsVirtualArrayBoundingBoxValid = 0;
004474c0  }

0044751e                                                                                            90 90                                ..

00447520  void __fastcall RenderVertexBuffer::UnlockVirtualArray(class RenderVertexBuffer* this)

00447520  {
00447532      if ((this->m_UseVirtualArray != 0 && this->m_IsVirtualArrayLocked != 0))
00447534          this->m_IsVirtualArrayLocked = 0;
00447520  }

0044753c                                                                                      90 90 90 90                              ....

00447540  void __thiscall RenderVertexBuffer::Unlock(class RenderVertexBuffer* this, uint8_t const arg2, uint8_t const arg3)

00447540  {
0044754f      VertexArray::Unlock(this, arg2, arg3);
0044754f      
0044755c      if (this->m_UseVirtualArray != 0)
0044755e          this->m_NeedRefreshVirtualArray = 1;
00447540  }

00447569                             90 90 90 90 90 90 90                                                           .......

00447570  void RenderVertexBuffer::TransferVertices(void const* arg1, class VertexFormatInfo const* arg2, void* arg3, class VertexFormatInfo const* arg4, uint32_t const arg5, uint8_t const arg6)

00447570  {
00447574      class VertexFormatInfo* ebp = arg2;
00447578      uint32_t format_1 = ebp->format;
0044757d      class VertexFormatInfo* edi = arg4;
00447581      uint32_t format = edi->format;
00447581      
0044758d      if ((format_1 == format && arg6 == 0))
0044758d      {
00447592          int32_t ecx_1 = (edi->size * arg5);
004475a4          int32_t esi_1;
004475a4          int32_t edi_2;
004475a4          edi_2 = __builtin_memcpy(arg3, arg1, ((ecx_1 >> 2) << 2));
004475ab          __builtin_memcpy(edi_2, esi_1, (ecx_1 & 3));
004475b3          return;
0044758d      }
0044758d      
004475b4      uint32_t numTCPairs = ebp->numTCPairs;
004475b8      uint32_t numTCPairs_1 = edi->numTCPairs;
004475bd      uint32_t numTCPairs_2 = numTCPairs_1;
004475bd      
004475c1      if (numTCPairs < numTCPairs_1)
004475c1      {
004475c3          numTCPairs_1 = numTCPairs;
004475c5          numTCPairs_2 = numTCPairs_1;
004475c1      }
004475c1      
004475c9      uint32_t numWeights_1 = edi->numWeights;
004475cc      uint32_t numWeights = ebp->numWeights;
004475d1      uint32_t numWeights_2 = numWeights_1;
004475d1      
004475d5      if (numWeights < numWeights_1)
004475d5      {
004475d7          numWeights_1 = numWeights;
004475d9          numWeights_2 = numWeights_1;
004475d5      }
004475d5      
004475e9      char var_20_1;
004475e9      
004475e9      if ((format & 0x10) != 0)
004475ee          var_20_1 = 1;
004475ee      
004475f2      if (((format & 0x10) == 0 || (format_1 & 0x10) == 0))
004475f4          var_20_1 = 0;
004475f4      
004475fc      char var_1f_1;
004475fc      
004475fc      if ((format & 0x20) != 0)
00447601          var_1f_1 = 1;
00447601      
00447605      if (((format & 0x20) == 0 || (format_1 & 0x20) == 0))
00447607          var_1f_1 = 0;
00447607      
0044760f      char var_1e_1;
0044760f      
0044760f      if ((format & 0x40) != 0)
00447614          var_1e_1 = 1;
00447614      
00447618      if (((format & 0x40) == 0 || (format_1 & 0x40) == 0))
0044761a          var_1e_1 = 0;
0044761a      
00447621      char var_1d_1;
00447621      
00447621      if (format < 0)
00447625          var_1d_1 = 1;
00447625      
00447629      if ((format >= 0 || format_1 >= 0))
0044762b          var_1d_1 = 0;
0044762b      
0044763d      char var_1c_1;
0044763d      
0044763d      if ((format & 0x10000000) != 0)
00447645          var_1c_1 = 1;
00447645      
00447649      if (((format & 0x10000000) == 0 || (format_1 & 0x10000000) == 0))
0044764b          var_1c_1 = 0;
0044764b      
00447656      char var_1b_1;
00447656      
00447656      if ((format & 0x20000000) != 0)
0044765e          var_1b_1 = 1;
0044765e      
00447662      if (((format & 0x20000000) == 0 || (format_1 & 0x20000000) == 0))
00447664          var_1b_1 = 0;
00447664      
0044766f      void const* ecx_5 = arg1;
00447673      uint32_t* eax_2 = arg3;
00447673      
00447677      if (arg5 > 0)
00447677      {
0044767d          uint32_t const var_8_1 = arg5;
00447924          bool cond:12_1;
00447924          
00447924          do
00447924          {
00447681              uint32_t const edx;
00447681              edx = arg6;
00447681              
00447687              if (edx == 0)
00447687              {
004476a6                  *(uint32_t*)eax_2 = *(uint32_t*)ecx_5;
004476ab                  eax_2[1] = *(uint32_t*)((char*)ecx_5 + 4);
004476b1                  eax_2[2] = *(uint32_t*)((char*)ecx_5 + 8);
00447687              }
00447687              else
00447687              {
0044768b                  *(uint32_t*)eax_2 = *(uint32_t*)ecx_5;
0044768d                  long double x87_r7_1 = ((long double)*(uint32_t*)((char*)ecx_5 + 4));
00447690                  eax_2[1] = ((float)x87_r7_1);
00447693                  long double x87_r6_1 = ((long double)*(uint32_t*)((char*)ecx_5 + 8));
00447698                  eax_2[2] = ((float)x87_r7_1);
0044769b                  eax_2[1] = ((float)x87_r6_1);
00447687              }
00447687              
004476b4              uint32_t edx_1;
004476b4              edx_1 = numWeights_1 > 0;
004476b4              
004476ba              if (edx_1 != 0)
004476ba              {
004476c0                  uint32_t numWeights_3 = numWeights_2;
004476c4                  int32_t esi_3 = 0;
004476c9                  int32_t var_14_1 = 0;
004476c9                  
004476cd                  if (numWeights_3 >= 4)
004476cd                  {
004476d3                      int32_t var_10_1 = 3;
004476db                      edx_1 = 8;
00447768                      int32_t edi_9;
00447768                      
00447768                      do
00447768                      {
004476f9                          *(uint32_t*)((edi->offsetWeight0 + (edx_1 - 8)) + eax_2) = *(uint32_t*)(((edx_1 - 8) + ecx_5) + ebp->offsetWeight0);
00447711                          *(uint32_t*)((char*)eax_2 + (arg4->offsetWeight0 + (edx_1 - 4))) = *(uint32_t*)(((edx_1 - 4) + ecx_5) + arg2->offsetWeight0);
00447726                          *(uint32_t*)((char*)eax_2 + (arg4->offsetWeight0 + edx_1)) = *(uint32_t*)((edx_1 + ecx_5) + arg2->offsetWeight0);
00447742                          numWeights_3 = numWeights_2;
00447746                          *(uint32_t*)((char*)eax_2 + (arg4->offsetWeight0 + (edx_1 + 4))) = *(uint32_t*)(((edx_1 + 4) + ecx_5) + arg2->offsetWeight0);
0044774d                          ebp = arg2;
00447751                          edi_9 = (var_10_1 + 4);
00447754                          esi_3 = (var_14_1 + 4);
00447757                          edx_1 += 0x10;
0044775a                          var_10_1 = edi_9;
00447760                          edi = arg4;
00447764                          var_14_1 = esi_3;
00447768                      } while (edi_9 < numWeights_3);
004476cd                  }
004476cd                  
00447770                  if (esi_3 < numWeights_3)
00447770                  {
00447799                      do
00447799                      {
00447778                          int32_t edx_3 = (esi_3 << 2);
00447784                          int32_t edx_4 = *(uint32_t*)((edx_3 + ecx_5) + ebp->offsetWeight0);
00447787                          ebp = arg2;
0044778b                          *(uint32_t*)((edi->offsetWeight0 + edx_3) + eax_2) = edx_4;
00447792                          edi = arg4;
00447796                          esi_3 += 1;
00447799                      } while (esi_3 < numWeights_2);
00447770                  }
004476ba              }
004476ba              
0044779b              edx_1 = var_20_1;
0044779b              
004477a1              if (edx_1 != 0)
004477a1              {
004477a3                  edx_1 = arg6;
004477a3                  
004477a9                  if (edx_1 == 0)
004477a9                  {
004477d3                      void* edx_7 = (ebp->offsetNormal + ecx_5);
004477d7                      void* esi_15 = (edi->offsetNormal + eax_2);
004477d9                      *(uint32_t*)esi_15 = *(uint32_t*)edx_7;
004477de                      *(uint32_t*)((char*)esi_15 + 4) = *(uint32_t*)((char*)edx_7 + 4);
004477e4                      *(uint32_t*)((char*)esi_15 + 8) = *(uint32_t*)((char*)edx_7 + 8);
004477a9                  }
004477a9                  else
004477a9                  {
004477ab                      uint32_t offsetNormal = ebp->offsetNormal;
004477b4                      void* esi_13 = (offsetNormal + ecx_5);
004477b6                      edx_1 = (edi->offsetNormal + eax_2);
004477b8                      *(uint32_t*)edx_1 = *(uint32_t*)(offsetNormal + ecx_5);
004477ba                      long double x87_r7_3 = ((long double)*(uint32_t*)((char*)esi_13 + 4));
004477bd                      *(uint32_t*)(edx_1 + 4) = ((float)x87_r7_3);
004477c0                      long double x87_r6_3 = ((long double)*(uint32_t*)((char*)esi_13 + 8));
004477c5                      *(uint32_t*)(edx_1 + 8) = ((float)x87_r7_3);
004477c8                      *(uint32_t*)(edx_1 + 4) = ((float)x87_r6_3);
004477a9                  }
004477a1              }
004477a1              
004477e7              edx_1 = var_1f_1;
004477e7              
004477ed              if (edx_1 != 0)
004477f8                  *(uint32_t*)((char*)eax_2 + edi->offsetPointSize) = *(uint32_t*)((char*)ecx_5 + ebp->offsetPointSize);
004477f8              
004477fb              edx_1 = var_1e_1;
004477fb              
00447801              if (edx_1 != 0)
0044780c                  *(uint32_t*)((char*)eax_2 + edi->offsetDiffuse) = *(uint32_t*)((char*)ecx_5 + ebp->offsetDiffuse);
0044780c              
0044780f              edx_1 = var_1d_1;
0044780f              
00447815              if (edx_1 != 0)
00447820                  *(uint32_t*)((char*)eax_2 + edi->offsetSpecular) = *(uint32_t*)((char*)ecx_5 + ebp->offsetSpecular);
00447820              
00447823              edx_1 = numTCPairs_1 > 0;
00447823              
00447831              if ((edx_1 != 0 && numTCPairs_2 > 0))
00447831              {
00447835                  edx_1 = &edi->offsetTCPair;
00447838                  int32_t esi_20 = ((char*)ebp - edi);
0044783a                  uint32_t var_10_2 = edx_1;
0044783e                  int32_t var_4_1 = esi_20;
00447842                  uint32_t numTCPairs_3 = numTCPairs_2;
00447842                  
00447850                  while (true)
00447850                  {
00447850                      int32_t* esi_21 = *(uint32_t*)(esi_20 + edx_1);
00447856                      int32_t* edx_11 = *(uint32_t*)edx_1;
00447858                      *(uint32_t*)((char*)edx_11 + eax_2) = *(uint32_t*)((char*)esi_21 + ecx_5);
0044785f                      *(uint32_t*)(((char*)edx_11 + eax_2) + 4) = *(uint32_t*)(((char*)esi_21 + ecx_5) + 4);
0044786b                      edx_1 = (var_10_2 + 4);
0044786e                      bool cond:13_1 = numTCPairs_3 != 1;
0044786f                      var_10_2 = edx_1;
00447873                      numTCPairs_3 -= 1;
00447873                      
00447877                      if (!(cond:13_1))
00447877                          break;
00447877                      
00447848                      esi_20 = var_4_1;
00447850                  }
00447831              }
00447831              
00447879              edx_1 = var_1c_1;
00447879              
0044787f              if (edx_1 != 0)
0044787f              {
00447881                  edx_1 = arg6;
00447881                  
00447887                  if (edx_1 == 0)
00447887                  {
004478b1                      void* edx_15 = (ebp->offsetVectorS + ecx_5);
004478b5                      int32_t* esi_27 = (edi->offsetVectorS + eax_2);
004478b7                      *(uint32_t*)esi_27 = *(uint32_t*)edx_15;
004478bc                      esi_27[1] = *(uint32_t*)((char*)edx_15 + 4);
004478c2                      esi_27[2] = *(uint32_t*)((char*)edx_15 + 8);
00447887                  }
00447887                  else
00447887                  {
00447889                      int32_t* offsetVectorS = ebp->offsetVectorS;
00447892                      void* esi_25 = ((char*)offsetVectorS + ecx_5);
00447894                      edx_1 = (edi->offsetVectorS + eax_2);
00447896                      *(uint32_t*)edx_1 = *(uint32_t*)((char*)offsetVectorS + ecx_5);
00447898                      long double x87_r7_5 = ((long double)*(uint32_t*)((char*)esi_25 + 4));
0044789b                      *(uint32_t*)(edx_1 + 4) = ((float)x87_r7_5);
0044789e                      long double x87_r6_5 = ((long double)*(uint32_t*)((char*)esi_25 + 8));
004478a3                      *(uint32_t*)(edx_1 + 8) = ((float)x87_r7_5);
004478a6                      *(uint32_t*)(edx_1 + 4) = ((float)x87_r6_5);
00447887                  }
0044787f              }
0044787f              
004478c5              edx_1 = var_1b_1;
004478c5              
004478cb              if (edx_1 != 0)
004478cb              {
004478cd                  edx_1 = arg6;
004478cd                  
004478d3                  if (edx_1 == 0)
004478d3                  {
004478fd                      void* edx_19 = (ebp->offsetVectorT + ecx_5);
00447901                      void* esi_30 = (edi->offsetVectorT + eax_2);
00447903                      *(uint32_t*)esi_30 = *(uint32_t*)edx_19;
00447908                      *(uint32_t*)((char*)esi_30 + 4) = *(uint32_t*)((char*)edx_19 + 4);
0044790e                      *(uint32_t*)((char*)esi_30 + 8) = *(uint32_t*)((char*)edx_19 + 8);
004478d3                  }
004478d3                  else
004478d3                  {
004478d5                      uint32_t offsetVectorT = ebp->offsetVectorT;
004478de                      void* esi_28 = (offsetVectorT + ecx_5);
004478e0                      void* edx_17 = (edi->offsetVectorT + eax_2);
004478e2                      *(uint32_t*)edx_17 = *(uint32_t*)(offsetVectorT + ecx_5);
004478e4                      long double x87_r7_7 = ((long double)*(uint32_t*)((char*)esi_28 + 4));
004478e7                      *(uint32_t*)((char*)edx_17 + 4) = ((float)x87_r7_7);
004478ea                      long double x87_r6_7 = ((long double)*(uint32_t*)((char*)esi_28 + 8));
004478ef                      *(uint32_t*)((char*)edx_17 + 8) = ((float)x87_r7_7);
004478f2                      *(uint32_t*)((char*)edx_17 + 4) = ((float)x87_r6_7);
004478d3                  }
004478cb              }
004478cb              
0044791b              ecx_5 += ebp->size;
0044791d              eax_2 += edi->size;
0044791f              cond:12_1 = var_8_1 != 1;
00447920              var_8_1 -= 1;
00447924          } while (cond:12_1);
00447677      }
00447570  }

00447932                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00447940  void __thiscall RenderVertexBuffer::RenderIndexedUsingMaterial(class RenderVertexBuffer* this, enum PrimType const arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7, class RenderIndexBuffer* arg8, class RenderMaterial const* arg9, class RenderMaterial const* arg10, enum RenderPassType const arg11, class RGBAColor const* arg12, class RGBAColor const* arg13, uint8_t const arg14, uint8_t const arg15, uint32_t* arg16, uint32_t* arg17, uint8_t const arg18)

00447940  {
00447944      long double x87_r7 = ((long double)arg12->a);
0044794a      long double temp1 = ((long double)0f);
0044794a      (x87_r7 - temp1);
00447953      class RGBAColor* eax;
00447953      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00447955      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00447955      
00447958      if (p)
00447958      {
0044795e          class RenderMaterial* edx_1 = arg10;
00447962          long double x87_r7_1 = ((long double)edx_1->m_Opacity);
00447968          long double temp2_1 = ((long double)0f);
00447968          (x87_r7_1 - temp2_1);
0044796e          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00447970          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00447970          
00447973          if (p_1)
00447973          {
0044798a              char var_5 = 0;
0044798e              char* var_4 = nullptr;
0044798e              
004479aa              while (true)
004479aa              {
004479b7                  char* eax_3;
004479b7                  eax_3 = *(uint8_t*)(((((SceneTool::m_CachedMaterialConditions + (arg11 << 3)) + 0x38) * 3) + var_4) + edx_1);
004479b7                  
004479bc                  if (eax_3 == 0xff)
004479bc                  {
00447a5b                      eax_3 = var_5;
00447a66                      return;
004479bc                  }
004479bc                  
004479c8                  int32_t* ecx_4 = (((uint32_t)eax_3) << 2);
004479cb                  class MaterialLayer* edx_3 = *(uint32_t*)((char*)ecx_4 + edx_1->layers.m_data);
004479ce                  long double x87_r7_2 = ((long double)edx_3->m_cDiffuse.a);
004479d4                  long double temp3_1 = ((long double)0f);
004479d4                  (x87_r7_2 - temp3_1);
004479da                  eax_3 = ((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004479dc                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
004479dc                  
004479df                  if (!(p_2))
004479df                  {
00447a5b                      eax_3 = var_5;
00447a66                      return;
004479df                  }
004479df                  
00447a05                  RenderDeviceD3D::SetupState(RenderDevice::render_device, *(uint32_t*)(arg9->layers.m_data + ecx_4), edx_3, this->m_HardwareVertexFormat.format, arg12, arg13, arg14);
00447a05                  
00447a42                  if (this->vtable->RenderIndexedPrimitives(arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg15, arg16, arg17, arg18) != 0)
00447a44                      var_5 = 1;
00447a44                  
00447a51                  var_4 = &var_4[1];
00447a51                  
00447a55                  if (&var_4[1] >= 3)
00447a55                  {
00447a5b                      eax_3 = var_5;
00447a66                      return;
00447a55                  }
00447a55                  
00447994                  edx_1 = arg10;
004479aa              }
00447973          }
00447958      }
00447958      
00447a69      eax = 0;
00447940  }

0044799a                                                                                8d 9b 00 00 00 00                            ......
00447a72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00447a80  void __thiscall RenderVertexBuffer::RenderUsingMaterial(class RenderVertexBuffer* this, enum PrimType const arg2, uint32_t const arg3, uint32_t const arg4, class RenderMaterial const* arg5, class RenderMaterial const* arg6, enum RenderPassType const arg7, class RGBAColor const* arg8, class RGBAColor const* arg9, uint32_t* arg10, uint32_t* arg11)

00447a80  {
00447a84      long double x87_r7 = ((long double)arg8->a);
00447a8a      long double temp1 = ((long double)0f);
00447a8a      (x87_r7 - temp1);
00447a93      class RGBAColor* eax;
00447a93      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00447a95      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00447a95      
00447a98      if (p)
00447a98      {
00447a9e          class RenderMaterial* edx_1 = arg6;
00447aa2          long double x87_r7_1 = ((long double)edx_1->m_Opacity);
00447aa8          long double temp2_1 = ((long double)0f);
00447aa8          (x87_r7_1 - temp2_1);
00447aae          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00447ab0          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00447ab0          
00447ab3          if (p_1)
00447ab3          {
00447ac8              char var_5 = 0;
00447acd              char* var_4 = nullptr;
00447acd              
00447aea              while (true)
00447aea              {
00447af7                  char* eax_3;
00447af7                  eax_3 = *(uint8_t*)(((((SceneTool::m_CachedMaterialConditions + (arg7 << 3)) + 0x38) * 3) + var_4) + edx_1);
00447af7                  
00447afc                  if (eax_3 == 0xff)
00447afc                  {
00447b76                      eax_3 = var_5;
00447b81                      return;
00447afc                  }
00447afc                  
00447b04                  int32_t* ecx_4 = (((uint32_t)eax_3) << 2);
00447b07                  class MaterialLayer* edx_3 = *(uint32_t*)((char*)ecx_4 + edx_1->layers.m_data);
00447b0a                  long double x87_r7_2 = ((long double)edx_3->m_cDiffuse.a);
00447b10                  long double temp3_1 = ((long double)0f);
00447b10                  (x87_r7_2 - temp3_1);
00447b16                  eax_3 = ((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0))));
00447b18                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
00447b18                  
00447b1b                  if (!(p_2))
00447b1b                  {
00447b76                      eax_3 = var_5;
00447b81                      return;
00447b1b                  }
00447b1b                  
00447b3e                  RenderDeviceD3D::SetupState(RenderDevice::render_device, *(uint32_t*)(arg5->layers.m_data + ecx_4), edx_3, this->m_HardwareVertexFormat.format, arg8, arg9, 0);
00447b3e                  
00447b5d                  if (this->vtable->RenderPrimitives(arg2, arg3, arg4, arg10, arg11) != 0)
00447b5f                      var_5 = 1;
00447b5f                  
00447b6c                  var_4 = &var_4[1];
00447b6c                  
00447b70                  if (&var_4[1] >= 3)
00447b70                  {
00447b76                      eax_3 = var_5;
00447b81                      return;
00447b70                  }
00447b70                  
00447ad7                  edx_1 = arg6;
00447aea              }
00447ab3          }
00447a98      }
00447a98      
00447b84      eax = 0;
00447a80  }

00447add                                                                                         8d 49 00                               .I.
00447b8d                                         90 90 90                                                               ...

00447b90  void __fastcall VertexArray::~VertexArray(class VertexArray* this)

00447b90  {
00447b93      this->vtable = 0x79afe8;
00447b99      VertexArray::End(this);
00447b99      
00447bae      if ((this->m_InfluencedBoneIndexArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00447bb7          operator delete[](this->m_InfluencedBoneIndexArray.m_data);
00447bb7      
00447bbf      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00447b90  }

00447bc7                       90 90 90 90 90 90 90 90 90                                                         .........

00447bd0  void* __thiscall VertexArray::`scalar deleting destructor'(class VertexArray* this, uint32_t arg2)

00447bd0  {
00447bd3      this->vtable = 0x79afe8;
00447bd9      VertexArray::End(this);
00447bd9      
00447bee      if ((this->m_InfluencedBoneIndexArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00447bf7          operator delete[](this->m_InfluencedBoneIndexArray.m_data);
00447bf7      
00447c04      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00447c04      
00447c0a      if ((arg2 & 1) != 0)
00447c0d          operator delete(this);
00447c0d      
00447c18      return this;
00447bd0  }

00447c1b                                                                                   90 90 90 90 90                             .....

00447c20  void __fastcall RenderVertexBuffer::RenderVertexBuffer(class RenderVertexBuffer* this)

00447c20  {
00447c25      this->m_cRef = 1;
00447c2c      this->vtable = 0x79afe8;
00447c36      this->m_InfluencedBoneIndexArray.m_data = 0;
00447c3c      this->m_InfluencedBoneIndexArray.m_sizeAndDeallocate = 0;
00447c42      this->m_InfluencedBoneIndexArray.m_num = 0;
00447c48      VertexArray::Begin(this);
00447c4d      this->m_UseVirtualArray = 0;
00447c53      this->m_pVirtualArray = nullptr;
00447c59      this->m_IsVirtualArrayLocked = 0;
00447c65      this->vtable = 0x79affc;
00447c6c      this->m_NeedRefreshVirtualArray = 1;
00447c7d      __builtin_memcpy(&this->m_VirtualArrayBoundingBox, 0x8ee170, 0x18);
00447c81      this->m_IsVirtualArrayBoundingBoxValid = 0;
00447c20  }

00447c8c                                      90 90 90 90                                                              ....

00447c90  uint8_t RenderVertexBuffer::RenderIndexedPrimitives(class RenderVertexBuffer* this @ ecx, enum PrimType const arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7, class RenderIndexBuffer* arg8, uint8_t const arg9, uint32_t* arg10, uint32_t* arg11, uint8_t const arg12) __pure

00447c90  {
00447c90      int32_t eax;
00447c90      eax = 0;
00447c92      return 0;
00447c90  }

00447c95                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00447ca0  uint8_t RenderVertexBuffer::RenderPrimitives(class RenderVertexBuffer* this @ ecx, enum PrimType const arg2, uint32_t const arg3, uint32_t const arg4, uint32_t* arg5, uint32_t* arg6) __pure

00447ca0  {
00447ca0      int32_t eax;
00447ca0      eax = 0;
00447ca2      return 0;
00447ca0  }

00447ca5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00447cb0  void* __thiscall RenderVertexBuffer::`scalar deleting destructor'(class RenderVertexBuffer* this, uint32_t arg2)

00447cb0  {
00447cb3      this->vtable = 0x79affc;
00447cb9      RenderVertexBuffer::End(this);
00447cc0      VertexArray::~VertexArray(this);
00447cc0      
00447cca      if ((arg2 & 1) != 0)
00447ccd          operator delete(this);
00447ccd      
00447cd8      return this;
00447cb0  }

00447cdb                                                                                   90 90 90 90 90                             .....

00447ce0  class RenderVertexBuffer* RenderVertexBuffer::AllocateVertexBuffer()

00447ce0  {
00447ce7      if (Render::m_pRenderer != 0)
00447cf1          /* jump -> RenderDevice::render_device->vtable->CreateVertexBuffer */
00447cf1      
00447cf9      void* eax_1 = operator new(0x14c);
00447cf9      
00447d03      if (eax_1 == 0)
00447d0e          return 0;
00447d0e      
00447d07      /* tailcall */
00447d07      return RenderVertexBuffer::RenderVertexBuffer(eax_1);
00447ce0  }

00447d0f                                               90                                                                 .

00447d10  void __fastcall RenderVertexBuffer::RefreshVirtualArray(class RenderVertexBuffer* this)

00447d10  {
00447d25      if ((this->m_UseVirtualArray != 0 && this->m_NeedRefreshVirtualArray != 0))
00447d25      {
00447d52          RenderVertexBuffer::TransferVertices(this->vertices, &this->vertexFormat, this->m_pVirtualArray, &this->m_HardwareVertexFormat, this->numVertices, this->m_IsYAndZSwapped == 0);
00447d6b          __builtin_memcpy(&this->m_VirtualArrayBoundingBox, &this->m_BoundingBox, 0x18);
00447d6e          this->m_IsVirtualArrayBoundingBoxValid = 1;
00447d75          this->m_NeedRefreshVirtualArray = 0;
00447d25      }
00447d10  }

00447d7f                                                                                               90                                 .

00447d80  void* __thiscall RenderVertexBuffer::LockVirtualArray(class RenderVertexBuffer* this, uint32_t const arg2, uint32_t const arg3)

00447d80  {
00447d8f      if (this->m_UseVirtualArray != 0)
00447d8f      {
00447d91          RenderVertexBuffer::RefreshVirtualArray(this);
00447d91          
00447d9e          if (this->m_IsVirtualArrayLocked == 0)
00447d9e          {
00447da8              uint32_t const var_4_1 = arg3;
00447dac              uint32_t const eax_2;
00447dac              eax_2 = this->staticVertices;
00447db4              this->m_IsVirtualArrayLocked = 1;
00447dbb              uint32_t const var_8 = arg2;
00447dbf              char eax_3;
00447dbf              
00447dbf              if (eax_2 != 0)
00447dca                  eax_3 = this->vtable->AddDirtyRange(&var_8);
00447dca              
00447dcf              if ((eax_2 == 0 || eax_3 != 0))
00447de7                  return ((this->m_HardwareVertexFormat.size * arg2) + this->m_pVirtualArray);
00447d9e          }
00447d8f      }
00447d8f      
00447df1      return 0;
00447d80  }

00447df4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00447e00  uint8_t __fastcall LayerStage::ReleaseSubObjects(class LayerStage* this)

00447e00  {
00447e04      Render::SafelyStopUsingAndReleaseTexture(&this->m_pTexture);
00447e0c      int32_t eax;
00447e0c      eax = 1;
00447e0e      return 1;
00447e00  }

00447e0f                                               90                                                                 .

00447e10  void __fastcall LayerStage::Begin(class LayerStage* this)

00447e10  {
00447e1b      class PSRefBufferCharData<char>* m_charbuffer = this->m_SamplerName.m_charbuffer;
00447e1b      
00447e28      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
00447e28      {
00447e39          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00447e41              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00447e41          
00447e43          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00447e4e          this->m_SamplerName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00447e50          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00447e28      }
00447e28      
00447e56      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_TextureFileName.m_charbuffer;
00447e56      
00447e5f      if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer)
00447e5f      {
00447e70          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00447e78              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00447e78          
00447e7a          class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00447e86          this->m_TextureFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00447e89          InterlockedIncrement((PStringBase<char>::s_NullBuffer_2 - 0x10));
00447e5f      }
00447e5f      
00447e94      this->m_TextureDID.id = INVALID_DID.id;
00447e9c      __builtin_memcpy(&this->m_AddressModeU, "\x01\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x02\x00\x00\x00", 0x1c);
00447ead      this->m_pTexture = nullptr;
00447eb0      this->m_SpecialTexture = 0;
00447eb3      this->m_FFColorArg2 = 0;
00447eb6      this->m_FFAlphaArg2 = 0;
00447eb9      this->m_FFTexCoordIndex = 0;
00447ebc      this->m_FFUseProjection = 0;
00447ece      this->m_FFAlphaOp = TEXOP_SELECTARG2;
00447ed1      this->m_FFAlphaArg1 = 2;
00447e10  }

00447ed8                                                                          90 90 90 90 90 90 90 90                          ........

00447ee0  uint8_t __thiscall LayerStage::CopyInto(class LayerStage const* this, uint8_t const arg2, class LayerStage* arg3)

00447ee0  {
00447eee      if (arg2 == 0)
00447eee      {
00447ef0          class PSRefBufferCharData<char>* m_charbuffer = arg3->m_SamplerName.m_charbuffer;
00447ef0          
00447efc          if (m_charbuffer != this->m_SamplerName.m_charbuffer)
00447efc          {
00447f0d              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00447f15                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00447f15              
00447f17              class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_SamplerName.m_charbuffer;
00447f19              arg3->m_SamplerName.m_charbuffer = m_charbuffer_1;
00447f1f              InterlockedIncrement(&m_charbuffer_1[-1]);
00447efc          }
00447efc          
00447f25          class PSRefBufferCharData<char>* m_charbuffer_3 = arg3->m_TextureFileName.m_charbuffer;
00447f25          
00447f2b          if (m_charbuffer_3 != this->m_TextureFileName.m_charbuffer)
00447f2b          {
00447f3c              if ((InterlockedDecrement(&m_charbuffer_3[-1]) == 0 && m_charbuffer_3 != 0x14))
00447f44                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_3 + -0x14)(1);
00447f44              
00447f46              class PStringBase<char> m_charbuffer_2 = this->m_TextureFileName.m_charbuffer;
00447f49              arg3->m_TextureFileName.m_charbuffer = m_charbuffer_2;
00447f50              InterlockedIncrement((m_charbuffer_2 - 0x10));
00447f2b          }
00447eee      }
00447eee      
00447f5b      arg3->m_TextureDID.id = this->m_TextureDID.id;
00447f5e      arg3->m_pTexture = nullptr;
00447f65      class RenderTexture* m_pTexture_1 = this->m_pTexture;
00447f65      
00447f6a      if (m_pTexture_1 != 0)
00447f6a      {
00447f6e          class IDClass<_tagDataID,32,0>* ecx_2 = m_pTexture_1->vtable->AddRef();
00447f71          class RenderTexture* m_pTexture = this->m_pTexture;
00447f74          class RenderTexture* __saved_ebx_1 = m_pTexture;
00447f75          arg3->m_pTexture = m_pTexture;
00447f78          IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx_2);
00447f6a      }
00447f6a      
00447f83      arg3->m_SpecialTexture = this->m_SpecialTexture;
00447f89      arg3->m_AddressModeU = this->m_AddressModeU;
00447f8f      arg3->m_AddressModeV = this->m_AddressModeV;
00447f95      arg3->m_MinFilterMode = this->m_MinFilterMode;
00447f9b      arg3->m_MagFilterMode = this->m_MagFilterMode;
00447fa1      arg3->m_MipFilterMode = this->m_MipFilterMode;
00447fa7      arg3->m_FFColorOp = this->m_FFColorOp;
00447fad      arg3->m_FFColorArg1 = this->m_FFColorArg1;
00447fb3      arg3->m_FFColorArg2 = this->m_FFColorArg2;
00447fb9      arg3->m_FFAlphaOp = this->m_FFAlphaOp;
00447fbf      arg3->m_FFAlphaArg1 = this->m_FFAlphaArg1;
00447fc5      arg3->m_FFAlphaArg2 = this->m_FFAlphaArg2;
00447fcb      arg3->m_FFTexCoordIndex = this->m_FFTexCoordIndex;
00447fce      uint32_t ecx_6;
00447fce      ecx_6 = this->m_FFUseProjection;
00447fd1      arg3->m_FFUseProjection = ecx_6;
00447fd5      uint32_t eax_12;
00447fd5      eax_12 = 1;
00447fd8      return 1;
00447ee0  }

00447fdb                                                                                   90 90 90 90 90                             .....

00447fe0  uint8_t __thiscall LayerStage::SetTexture(class LayerStage* this, class PStringBase<char> const* arg2, class IDClass<_tagDataID,32,0> arg3)

00447fe0  {
00447feb      class PSRefBufferCharData<char>* m_charbuffer = this->m_TextureFileName.m_charbuffer;
00447feb      
00447ff1      if (m_charbuffer != arg2->m_charbuffer)
00447ff1      {
00448006          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0044800e              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0044800e          
00448010          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00448012          this->m_TextureFileName.m_charbuffer = m_charbuffer_1;
00448019          InterlockedIncrement(&m_charbuffer_1[-1]);
00447ff1      }
00447ff1      
0044801f      uint32_t id = this->m_TextureDID.id;
0044801f      
00448028      if (id != arg3)
00448028      {
00448039      label_448039:
00448039          this->m_TextureDID.id = arg3;
00448042          class DBObj* edi_2 = nullptr;
00448042          
00448046          if (arg3 != INVALID_DID.id)
00448046          {
00448055              void var_8;
00448055              class DBObj* eax_5;
00448055              class IDClass<_tagDataID,32,0>* ecx_4;
00448055              eax_5 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg3, 0x1e));
0044805a              edi_2 = eax_5;
0044805a              
00448061              if (edi_2 == 0)
00448061              {
0044808b                  eax_5 = 0;
00448091                  return 0;
00448061              }
00448061              
00448063              class DBObj* var_18_4 = edi_2;
00448064              IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx_4);
00448046          }
00448046          
00448070          Render::SafelyStopUsingAndReleaseTexture(&this->m_pTexture);
00448070          
0044807a          if (edi_2 != 0)
0044806c              this->m_pTexture = edi_2;
00448028      }
00448028      else if ((id != INVALID_DID.id && this->m_pTexture == 0))
00448037          goto label_448039;
00448037      
00448080      class IDClass<_tagDataID,32,0> eax_3;
00448080      eax_3.id = 1;
00448086      return 1;
00447fe0  }

00448094                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004480a0  uint8_t __thiscall LayerStage::SetTexture(class LayerStage* this, class RenderTexture* arg2)

004480a0  {
004480ab      if (arg2 == 0)
004480cb          this->m_TextureDID.id = INVALID_DID.id;
004480ab      else
004480ab      {
004480b4          class RenderTexture* __saved_ebx_1 = arg2;
004480b5          IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(arg2->vtable->AddRef());
004480c0          this->m_TextureDID.id = arg2->m_DID.id;
004480ab      }
004480ab      
004480d2      Render::SafelyStopUsingAndReleaseTexture(&this->m_pTexture);
004480d7      class PSRefBufferCharData<char>* m_charbuffer = this->m_TextureFileName.m_charbuffer;
004480d7      
004480e5      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
004480e5      {
004480fb          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00448103              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00448103          
00448105          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00448111          this->m_TextureFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00448114          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
004480e5      }
004480e5      
004480ce      this->m_pTexture = arg2;
00448120      m_charbuffer = 1;
00448123      return 1;
004480a0  }

00448126                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00448130  uint8_t __thiscall PFileNode::GetNameAsUInt32(class PFileNode const* this, uint32_t* arg2)

00448130  {
00448130      class PFileNode* this_1 = this;
00448135      class IFileNodeName* m_pcName = this->m_pcName;
00448138      int32_t ebx;
00448138      ebx = 0;
00448138      
0044813c      if (m_pcName != 0)
0044813c      {
00448147          bool cond:0_1 = m_pcName->vtable->GetType() != 1;
0044814a          class IFileNodeName* m_pcName_1 = this->m_pcName;
0044814a          
0044814d          if (!(cond:0_1))
0044814d          {
00448157              *(uint32_t*)arg2 = *(int32_t*)((char*)m_pcName_1 + 4);
00448159              uint32_t* eax_3;
00448159              eax_3 = 1;
0044815d              return 1;
0044814d          }
0044814d          
00448160          m_pcName_1->vtable->ToPString(&this_1);
0044816d          void* eax_4 = operator new(8);
00448177          class IFileNodeName* edi_1;
00448177          
00448177          if (eax_4 == 0)
00448183              edi_1 = nullptr;
00448177          else
00448177          {
00448179              *(uint32_t*)eax_4 = 0x797108;
0044817f              edi_1 = eax_4;
00448177          }
00448177          
00448193          if (edi_1->vtable->FromPString(&this_1) == 0)
004481b2              edi_1->vtable->__vecDelDtor(1);
00448193          else
00448193          {
0044819c              *(uint32_t*)arg2 = *(int32_t*)((char*)edi_1 + 4);
0044819e              class IFileNodeName* m_pcName_2 = this->m_pcName;
0044819e              
004481a3              if (m_pcName_2 != 0)
004481a5                  m_pcName_2->vtable->__vecDelDtor(1);
004481a5              
004481ab              this->m_pcName = edi_1;
004481ae              ebx = 1;
00448193          }
00448193          
004481be          void* __offset(PFileNode, -0x14) esi_2 = ((char*)this_1 - 0x14);
004481be          
004481d2          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004481da              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0044813c      }
0044813c      
004481dd      int32_t eax;
004481dd      eax = ebx;
004481e1      return eax;
00448130  }

004481e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004481f0  void __fastcall LayerStage::LayerStage(class LayerStage* this)

004481f0  {
004481f0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004481f6      class PSRefBufferCharData<char>** this_1 = this;
00448205      *(uint32_t*)this_1 = PStringBase<char>::s_NullBuffer_1;
00448207      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00448209      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00448215      this_1[1] = PStringBase<char>::s_NullBuffer_2;
00448218      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0044821c      LayerStage::Begin(this_1);
004481f0  }

00448226                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00448230  void __fastcall LayerStage::~LayerStage(class LayerStage* this)

00448230  {
00448239      Render::SafelyStopUsingAndReleaseTexture(&this->m_pTexture);
00448243      LayerStage::Begin(this);
00448251      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_TextureFileName.m_charbuffer - 0x14);
00448251      
00448260      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00448268          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00448268      
0044826c      void* __offset(PSRefBufferCharData<char>, -0x14) edi_2 = (this->m_SamplerName.m_charbuffer - 0x14);
0044826c      
0044827b      if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
00448283          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
00448230  }

00448289                             90 90 90 90 90 90 90                                                           .......

00448290  class LayerStage* __thiscall LayerStage::Copy(class LayerStage const* this, uint8_t const arg2)

00448290  {
00448296      void* eax = operator new(0x48);
00448296      
004482a2      if (eax == 0)
004482ef          return 0;
004482ef      
004482a4      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004482b6      *(uint32_t*)eax = PStringBase<char>::s_NullBuffer_1;
004482b8      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
004482ba      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004482c6      *(uint32_t*)((char*)eax + 4) = PStringBase<char>::s_NullBuffer_2;
004482c9      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
004482cd      LayerStage::Begin(eax);
004482da      int32_t eax_3 = LayerStage::CopyInto(this, arg2, eax);
004482df      char temp1 = eax_3;
004482df      eax_3 = -(eax_3);
004482e8      return ((eax_3 - eax_3) & eax);
00448290  }

004482f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00448300  uint8_t __fastcall LayerStage::GetSubObjects(class LayerStage* this)

00448300  {
00448300      class LayerStage* var_4 = this;
00448300      
0044830e      if (this->m_TextureDID.id != INVALID_DID.id)
0044830e      {
00448310          class PSRefBufferCharData<char>* m_charbuffer = this->m_TextureFileName.m_charbuffer;
00448317          var_4 = m_charbuffer;
0044831b          InterlockedIncrement(&m_charbuffer[-1]);
0044831b          
00448336          if (LayerStage::SetTexture(this, &var_4, this->m_TextureDID.id) == 0)
00448336          {
00448348              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00448350                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00448350              
00448353              int32_t eax_2;
00448353              eax_2 = 0;
00448357              return 0;
00448336          }
00448336          
00448368          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00448370              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0044830e      }
0044830e      
00448373      uint32_t eax;
00448373      eax = 1;
00448377      return 1;
00448300  }

00448378                                                                          90 90 90 90 90 90 90 90                          ........

00448380  void __thiscall LayerStage::Serialize(class LayerStage* this, class Archive* arg2)

00448380  {
00448389      PStringBase<char>::Serialize(this, arg2);
00448392      Archive::CheckAlignment(arg2, 4);
0044839b      uint8_t* eax = Archive::GetBytes(arg2, 4);
0044839b      
004483a2      if (eax != 0)
004483a2      {
004483a8          if ((arg2->m_flags & 1) == 0)
004483b3              this->m_TextureDID.id = *(uint32_t*)eax;
004483a8          else
004483ad              *(uint32_t*)eax = this->m_TextureDID.id;
004483a2      }
004483a2      
004483ba      Archive::CheckAlignment(arg2, 4);
004483c3      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
004483c3      
004483ca      if (eax_1 != 0)
004483ca      {
004483d0          if ((arg2->m_flags & 1) == 0)
004483db              this->m_SpecialTexture = *(uint32_t*)eax_1;
004483d0          else
004483d5              *(uint32_t*)eax_1 = this->m_SpecialTexture;
004483ca      }
004483ca      
004483df      int32_t ebx;
004483df      ebx = this->m_AddressModeU;
004483e6      Archive::CheckAlignment(arg2, 1);
004483ef      uint8_t* eax_2 = Archive::GetBytes(arg2, 1);
004483ef      
004483f6      if (eax_2 != 0)
004483f6      {
004483fc          if ((arg2->m_flags & 1) == 0)
00448402              ebx = *(uint8_t*)eax_2;
004483fc          else
004483fe              *(uint8_t*)eax_2 = ebx;
004483f6      }
004483f6      
00448408      if ((arg2->m_flags & 5) == 0)
0044840d          this->m_AddressModeU = ((uint32_t)ebx);
0044840d      
00448410      ebx = this->m_AddressModeV;
00448417      Archive::CheckAlignment(arg2, 1);
00448420      uint8_t* eax_4 = Archive::GetBytes(arg2, 1);
00448420      
00448427      if (eax_4 != 0)
00448427      {
0044842d          if ((arg2->m_flags & 1) == 0)
00448433              ebx = *(uint8_t*)eax_4;
0044842d          else
0044842f              *(uint8_t*)eax_4 = ebx;
00448427      }
00448427      
00448439      if ((arg2->m_flags & 5) == 0)
0044843e          this->m_AddressModeV = ((uint32_t)ebx);
0044843e      
00448441      ebx = this->m_MinFilterMode;
00448448      Archive::CheckAlignment(arg2, 1);
00448451      uint8_t* eax_5 = Archive::GetBytes(arg2, 1);
00448451      
00448458      if (eax_5 != 0)
00448458      {
0044845e          if ((arg2->m_flags & 1) == 0)
00448464              ebx = *(uint8_t*)eax_5;
0044845e          else
00448460              *(uint8_t*)eax_5 = ebx;
00448458      }
00448458      
0044846a      if ((arg2->m_flags & 5) == 0)
0044846f          this->m_MinFilterMode = ((uint32_t)ebx);
0044846f      
00448472      ebx = this->m_MagFilterMode;
00448479      Archive::CheckAlignment(arg2, 1);
00448482      uint8_t* eax_6 = Archive::GetBytes(arg2, 1);
00448482      
00448489      if (eax_6 != 0)
00448489      {
0044848f          if ((arg2->m_flags & 1) == 0)
00448495              ebx = *(uint8_t*)eax_6;
0044848f          else
00448491              *(uint8_t*)eax_6 = ebx;
00448489      }
00448489      
0044849b      if ((arg2->m_flags & 5) == 0)
004484a0          this->m_MagFilterMode = ((uint32_t)ebx);
004484a0      
004484a3      ebx = this->m_MipFilterMode;
004484aa      Archive::CheckAlignment(arg2, 1);
004484b3      uint8_t* eax_8 = Archive::GetBytes(arg2, 1);
004484b3      
004484ba      if (eax_8 != 0)
004484ba      {
004484c0          if ((arg2->m_flags & 1) == 0)
004484c6              ebx = *(uint8_t*)eax_8;
004484c0          else
004484c2              *(uint8_t*)eax_8 = ebx;
004484ba      }
004484ba      
004484cc      if ((arg2->m_flags & 5) == 0)
004484d1          this->m_MipFilterMode = ((uint32_t)ebx);
004484d1      
004484d4      ebx = this->m_FFColorOp;
004484db      Archive::CheckAlignment(arg2, 1);
004484e4      uint8_t* eax_9 = Archive::GetBytes(arg2, 1);
004484e4      
004484eb      if (eax_9 != 0)
004484eb      {
004484f1          if ((arg2->m_flags & 1) == 0)
004484f7              ebx = *(uint8_t*)eax_9;
004484f1          else
004484f3              *(uint8_t*)eax_9 = ebx;
004484eb      }
004484eb      
004484fd      if ((arg2->m_flags & 5) == 0)
00448502          this->m_FFColorOp = ((uint32_t)ebx);
00448502      
00448509      Archive::CheckAlignment(arg2, 4);
00448512      uint8_t* eax_10 = Archive::GetBytes(arg2, 4);
00448512      
00448519      if (eax_10 != 0)
00448519      {
0044851f          if ((arg2->m_flags & 1) == 0)
0044852a              this->m_FFColorArg1 = *(uint32_t*)eax_10;
0044851f          else
00448524              *(uint32_t*)eax_10 = this->m_FFColorArg1;
00448519      }
00448519      
00448531      Archive::CheckAlignment(arg2, 4);
0044853a      uint8_t* eax_11 = Archive::GetBytes(arg2, 4);
0044853a      
00448541      if (eax_11 != 0)
00448541      {
00448547          if ((arg2->m_flags & 1) == 0)
00448552              this->m_FFColorArg2 = *(uint32_t*)eax_11;
00448547          else
0044854c              *(uint32_t*)eax_11 = this->m_FFColorArg2;
00448541      }
00448541      
00448555      ebx = this->m_FFAlphaOp;
0044855c      Archive::CheckAlignment(arg2, 1);
00448565      uint8_t* eax_12 = Archive::GetBytes(arg2, 1);
00448565      
0044856c      if (eax_12 != 0)
0044856c      {
00448572          if ((arg2->m_flags & 1) == 0)
00448578              ebx = *(uint8_t*)eax_12;
00448572          else
00448574              *(uint8_t*)eax_12 = ebx;
0044856c      }
0044856c      
0044857e      if ((arg2->m_flags & 5) == 0)
00448583          this->m_FFAlphaOp = ((uint32_t)ebx);
00448583      
0044858a      Archive::CheckAlignment(arg2, 4);
00448593      uint32_t* eax_14 = Archive::GetBytes(arg2, 4);
00448593      
0044859b      if (eax_14 != 0)
0044859b      {
004485a1          if ((arg2->m_flags & 1) == 0)
004485ac              this->m_FFAlphaArg1 = *(uint32_t*)eax_14;
004485a1          else
004485a6              *(uint32_t*)eax_14 = this->m_FFAlphaArg1;
0044859b      }
0044859b      
004485b3      Archive::CheckAlignment(arg2, 4);
004485bc      uint32_t* eax_15 = Archive::GetBytes(arg2, 4);
004485bc      
004485c3      if (eax_15 != 0)
004485c3      {
004485c9          if ((arg2->m_flags & 1) == 0)
004485d4              this->m_FFAlphaArg2 = *(uint32_t*)eax_15;
004485c9          else
004485ce              *(uint32_t*)eax_15 = this->m_FFAlphaArg2;
004485c3      }
004485c3      
004485db      Archive::CheckAlignment(arg2, 4);
004485e4      uint32_t* eax_16 = Archive::GetBytes(arg2, 4);
004485e4      
004485eb      if (eax_16 != 0)
004485eb      {
004485f1          if ((arg2->m_flags & 1) != 0)
004485f1          {
004485fb              *(uint32_t*)eax_16 = this->m_FFTexCoordIndex;
004485fd              Serializer::SerializeObject(&this->m_FFUseProjection, arg2);
00448607              return;
004485f1          }
004485f1          
0044860c          this->m_FFTexCoordIndex = *(uint32_t*)eax_16;
004485eb      }
004485eb      
00448614      Serializer::SerializeObject(&this->m_FFUseProjection, arg2);
00448380  }

00448621     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00448630  uint8_t RenderUI::CreateUISurfaceIndexBuffer()

00448630  {
00448630      class RenderIndexBuffer* RenderUI::s_pUISurfaceIB_1 = RenderUI::s_pUISurfaceIB;
00448630      
00448638      if (RenderUI::s_pUISurfaceIB_1 != 0)
0044863a          RenderUI::s_pUISurfaceIB_1->vtable->__vecDelDtor(1);
0044863a      
00448640      RenderUI::s_pUISurfaceIB = nullptr;
0044864a      class RenderIndexBuffer* eax_2 = Render::CreateIndexBuffer();
00448651      RenderUI::s_pUISurfaceIB = eax_2;
00448651      
00448656      if ((eax_2 != 0 && eax_2->vtable->Startup(6, 2, 1, 1, 1) != 0))
00448656      {
00448673          uint8_t* eax_3 = RenderIndexBuffer::Lock(RenderUI::s_pUISurfaceIB);
00448678          *(uint16_t*)eax_3 = 0;
0044867d          *(uint16_t*)(eax_3 + 2) = 2;
00448683          *(uint16_t*)(eax_3 + 4) = 1;
00448689          *(uint16_t*)(eax_3 + 6) = 1;
0044868f          *(uint16_t*)(eax_3 + 8) = 2;
00448695          *(uint16_t*)(eax_3 + 0xa) = 3;
004486a1          RenderIndexBuffer::Unlock(RenderUI::s_pUISurfaceIB);
004486a6          int32_t eax_4;
004486a6          eax_4 = 1;
004486a8          return 1;
00448656      }
00448656      
004486a9      eax_2 = 0;
004486ab      return 0;
00448630  }

004486ac                                      90 90 90 90                                                              ....

004486b0  uint8_t RenderUI::Startup()

004486b0  {
004486ba      return RenderUI::CreateUISurfaceIndexBuffer() != 0;
004486b0  }

004486bb                                                                                   90 90 90 90 90                             .....

004486c0  void* __thiscall IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, uint32_t arg2)

004486c0  {
004486c3      struct HashList<UIObject *,UIObject *,1>::HashListData** m_buckets = this->m_buckets;
004486cb      this->vtable = 0x79b09c;
004486cb      
004486d1      if (m_buckets != &this->m_aInplaceBuckets)
004486d4          operator delete[](m_buckets);
004486d4      
004486de      this->m_buckets = nullptr;
004486e1      this->m_firstInterestingBucket = nullptr;
004486e4      this->m_numBuckets = 0;
004486e7      this->m_numElements = 0;
004486e7      
004486ef      if ((arg2 & 1) != 0)
004486f2          operator delete(this);
004486f2      
004486fd      return this;
004486c0  }


00448700  void RenderUI::RenderObjects()

00448700  {
00448709      void* i = nullptr;
0044870b      bool cond:0 = RenderUI::s_hlObjects.m_ihlIntrusive.m_hash.m_numElements <= 0;
0044870d      RenderUI::s_bCurrentlyRendering = 1;
00448714      RenderUI::s_sceneID = 0;
0044871e      int32_t* ecx = &RenderUI::s_hlObjects;
00448723      uint32_t head_;
00448723      
00448723      if (!(cond:0))
00448723      {
00448725          head_ = RenderUI::s_hlObjects.m_ihlIntrusive.m_list.head_;
00448725          
0044872c          if (head_ == 0)
00448733              i = nullptr;
0044872c          else
0044872e              i = (head_ - 8);
00448723      }
00448723      
00448737      int32_t var_4 = 0x8392c8;
0044873b      void* esi;
0044873b      
0044873b      for (; i != 0; i = ((char*)esi - 8))
0044873b      {
00448740          ecx = *(uint32_t*)((char*)i + 0x10);
00448743          head_ = ecx[2];
00448743          
00448748          if (head_ != 0)
0044874c              head_ = *(uint32_t*)(*(uint32_t*)ecx + 4)();
0044874c          
0044874f          esi = *(uint32_t*)((char*)i + 8);
0044874f          
00448754          if (esi == 0)
00448754              break;
0044873b      }
0044873b      
0044875d      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx);
00448762      RenderUI::s_bCurrentlyRendering = 0;
00448700  }

0044876e                                            90 90                                                                ..

00448770  void RenderUI::ComputeGameViewport(uint32_t* arg1, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4)

00448770  {
0044877d      *(uint32_t*)arg1 = 0;
00448784      *(uint32_t*)arg2 = 0;
0044879a      *(uint32_t*)arg3 = RenderDevice::GetDisplayWidth(RenderDevice::render_device);
004487ab      *(uint32_t*)arg4 = RenderDevice::GetDisplayHeight(RenderDevice::render_device);
004487b3      uint32_t ebp = 0;
004487c2      int32_t edi_1 = (RenderDevice::GetDisplayWidth(RenderDevice::render_device) - 1);
004487c3      uint32_t ebx = 0;
004487d2      int32_t esi_1 = (RenderDevice::GetDisplayHeight(RenderDevice::render_device) - 1);
004487d3      void* __offset(DLListData, -0x8) i_1 = nullptr;
004487d3      
004487dc      if (RenderUI::s_hlObjects.m_ihlIntrusive.m_hash.m_numElements > 0)
004487dc      {
004487de          class DLListData* head_ = RenderUI::s_hlObjects.m_ihlIntrusive.m_list.head_;
004487de          
004487e5          if (head_ == 0)
004487ec              i_1 = nullptr;
004487e5          else
004487e7              i_1 = &head_[-1];
004487dc      }
004487dc      
004487f0      void* __offset(DLListData, -0x8) i = i_1;
004487f2      int32_t var_4 = 0x8392c8;
004487f2      
004487f6      if (i_1 != 0)
004487f6      {
00448850          do
00448850          {
004487f8              void* eax_4 = *(int32_t*)((char*)ADJ(i) + 8);
004487fb              uint32_t ecx_6;
004487fb              ecx_6 = *(uint8_t*)((char*)eax_4 + 8);
004487fb              
00448800              if (ecx_6 != 0)
0044880b                  switch ((*(uint32_t*)((char*)eax_4 + 0xc) - 1))
0044880b                  {
0044882f                      case 0:
0044882f                      {
0044882f                          ecx_6 = (*(uint32_t*)((char*)eax_4 + 0x2c) + *(uint32_t*)((char*)eax_4 + 0x24));
0044882f                          
00448834                          if (ecx_6 > ebx)
00448836                              ebx = ecx_6;
0044882f                          break;
0044882f                      }
0044883d                      case 1:
0044883d                      {
0044883d                          int32_t eax_8 = (*(uint32_t*)((char*)eax_4 + 0x24) - 1);
0044883d                          
00448840                          if (eax_8 < esi_1)
00448842                              esi_1 = eax_8;
0044883d                          break;
0044883d                      }
00448815                      case 2:
00448815                      {
00448815                          ecx_6 = (*(uint32_t*)((char*)eax_4 + 0x28) + *(uint32_t*)((char*)eax_4 + 0x20));
00448815                          
0044881a                          if (ecx_6 > ebp)
0044881c                              ebp = ecx_6;
00448815                          break;
00448815                      }
00448823                      case 3:
00448823                      {
00448823                          int32_t eax_6 = (*(uint32_t*)((char*)eax_4 + 0x20) - 1);
00448823                          
00448826                          if (eax_6 < edi_1)
00448828                              edi_1 = eax_6;
00448823                          break;
00448823                      }
0044880b                  }
0044880b              
00448844              class DLListData* dllist_next = ADJ(i)->dllist_next;
00448844              
00448849              if (dllist_next == 0)
00448849                  break;
00448849              
0044884b              i = &dllist_next[-1];
00448850          } while (i != 0);
004487f6      }
004487f6      
00448862      if (ebp >= (RenderDevice::GetDisplayWidth(RenderDevice::render_device) - 2))
00448871          ebp = (RenderDevice::GetDisplayWidth(RenderDevice::render_device) - 2);
00448871      
00448884      if (ebx >= (RenderDevice::GetDisplayHeight(RenderDevice::render_device) - 2))
00448893          ebx = (RenderDevice::GetDisplayHeight(RenderDevice::render_device) - 2);
00448893      
00448898      if (edi_1 <= ebp)
0044889a          edi_1 = (ebp + 1);
0044889a      
0044889f      if (esi_1 <= ebx)
004488a1          esi_1 = (ebx + 1);
004488a1      
004488b2      *(uint32_t*)arg1 = ebp;
004488bb      *(uint32_t*)arg2 = ebx;
004488bd      *(uint32_t*)arg3 = ((edi_1 - ebp) + 1);
004488c1      *(uint32_t*)arg4 = ((esi_1 - ebx) + 1);
00448770  }

004488ca                                8b ff                                                                        ..
004488cc  uint32_t jump_table_4488cc[0x4] = 
004488cc  {
004488cc      [0x0] =  0x0044882c
004488d0      [0x1] =  0x0044883a
004488d4      [0x2] =  0x00448812
004488d8      [0x3] =  0x00448820
004488dc  }

004488dc                                                                                      90 90 90 90                              ....

004488e0  void __thiscall IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>(class IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, uint32_t arg2)

004488e0  {
004488eb      arg2 = arg2;
004488ef      uint8_t edx = ((int8_t)arg2);
004488f3      this->m_buckets = nullptr;
004488f6      this->m_firstInterestingBucket = nullptr;
004488f9      this->m_numBuckets = 0;
004488fc      this->m_numElements = 0;
00448900      this->vtable = 0x79b09c;
00448906      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00448919      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00448919      
00448923      if (eax == bucketSizesEnd_1)
00448925          eax -= 4;
00448925      
00448928      uint32_t eax_1 = *(uint32_t*)eax;
0044892d      this->m_numBuckets = eax_1;
0044892d      
00448930      if (eax_1 > 0x17)
00448946          this->m_buckets = operator new[]((eax_1 << 2));
00448930      else
00448935          this->m_buckets = &this->m_aInplaceBuckets;
00448935      
0044894c      struct HashList<UIObject *,UIObject *,1>::HashListData** m_buckets = this->m_buckets;
0044894f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00448955      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00448966      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004488e0  }

0044896f                                               90                                                                 .

00448970  uint8_t __thiscall IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, uint32_t arg2)

00448970  {
0044897a      if (arg2 == this->m_numBuckets)
0044897a      {
0044897c          uint32_t eax;
0044897c          eax = 0;
0044897f          return 0;
0044897a      }
0044897a      
00448989      struct HashList<UIObject *,UIObject *,1>::HashListData* m_hashNext_2 = nullptr;
00448989      
0044898e      while (this->m_numElements != 0)
0044898e      {
00448999          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0044899e          struct HashList<UIObject *,UIObject *,1>::HashListData* m_hashNext_3;
0044899e          int32_t* m_firstInterestingBucket_2;
0044899e          
0044899e          if (this->m_firstInterestingBucket == ecx_1)
0044899e          {
004489b1          label_4489b1:
004489b1              m_firstInterestingBucket_2 = nullptr;
004489b3              m_hashNext_3 = nullptr;
0044899e          }
0044899e          else
0044899e          {
004489a0              while (true)
004489a0              {
004489a0                  struct HashList<UIObject *,UIObject *,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
004489a0                  
004489a5                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004489a5                  {
004489b7                      struct HashList<UIObject *,UIObject *,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004489ba                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
004489bc                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004489bc                      break;
004489a5                  }
004489a5                  
004489ac                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004489ac                  
004489af                  if (&m_firstInterestingBucket[1] == ecx_1)
004489af                      goto label_4489b1;
004489a0              }
0044899e          }
0044899e          
004489be          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
004489be          
004489c2          if (eax_4 == m_hashNext_3)
004489d4              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004489c2          else
004489c2          {
004489cb              void* edx_2;
004489cb              
004489cb              do
004489cb              {
004489c4                  edx_2 = eax_4;
004489c6                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
004489cb              } while (eax_4 != m_hashNext_3);
004489cb              
004489cf              if (edx_2 != 0)
004489db                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
004489cf              else
004489d4                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004489c2          }
004489c2          
004489de          this->m_numElements -= 1;
004489e1          m_hashNext_3->m_hashNext = m_hashNext_2;
004489e7          m_hashNext_2 = m_hashNext_3;
0044898e      }
0044898e      
004489eb      struct HashList<UIObject *,UIObject *,1>::HashListData** m_buckets = this->m_buckets;
004489eb      
004489f3      if (m_buckets != &this->m_aInplaceBuckets)
004489f6          operator delete[](m_buckets);
004489f6      
00448a05      this->m_buckets = nullptr;
00448a08      this->m_firstInterestingBucket = nullptr;
00448a0b      this->m_numBuckets = 0;
00448a0e      this->m_numElements = 0;
00448a11      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
00448a18      struct HashList<UIObject *,UIObject *,1>::HashListData* m_hashNext_1 = m_hashNext_2;
00448a18      
00448a1a      if (m_hashNext_2 != 0)
00448a1a      {
00448a2f          struct HashList<UIObject *,UIObject *,1>::HashListData* m_hashNext;
00448a2f          
00448a2f          do
00448a2f          {
00448a20              m_hashNext = m_hashNext_1->m_hashNext;
00448a26              IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::add_internal(this, m_hashNext_1);
00448a2d              m_hashNext_1 = m_hashNext;
00448a2f          } while (m_hashNext != 0);
00448a1a      }
00448a1a      
00448a34      m_hashNext_1 = 1;
00448a37      return 1;
00448970  }

00448a3a                                                                                90 90 90 90 90 90                            ......

00448a40  void RenderUI::RecalculateClampedPosition()

00448a40  {
00448a5b      uint32_t var_10;
00448a5b      uint32_t var_c;
00448a5b      uint32_t var_8;
00448a5b      uint32_t var_4;
00448a5b      RenderUI::ComputeGameViewport(&var_4, &var_8, &var_c, &var_10);
00448a60      uint32_t esi = var_10;
00448a64      uint32_t edi = var_c;
00448a68      uint32_t ebx = var_8;
00448a72      uint32_t ebp = var_4;
00448a6c      RenderDevice::render_device->vtable->SetViewport(ebp, ebx, edi, esi, 0);
00448a88      ECM_UI::SendNotice_UpdateGameView(ebp, ebx, edi, esi);
00448a40  }

00448a98                                                                          90 90 90 90 90 90 90 90                          ........

00448aa0  uint8_t __fastcall IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::grow(class IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this)

00448aa0  {
00448aa0      class IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* m_numBuckets = this;
00448aa2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00448aae      m_numBuckets = this->m_numBuckets;
00448ac5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00448ac5      
00448acf      if (eax_2 != bucketSizesEnd_1)
00448ad8          eax_2 = &eax_2[1];
00448acf      else
00448acf      {
00448ad1          eax_2 -= 4;
00448ad1          
00448ad6          if (eax_2 != bucketSizesEnd_1)
00448ad8              eax_2 = &eax_2[1];
00448acf      }
00448acf      
00448ae8      return IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
00448aa0  }

00448ae9                             90 90 90 90 90 90 90                                                           .......

00448af0  struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* __thiscall IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(class IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, class IDClass<_tagDataID,32,0>* arg2)

00448af0  {
00448af9      uint32_t id = arg2->id;
00448b05      int32_t* result = this->m_hash.m_buckets[(COMBINE(0, id) % this->m_hash.m_numBuckets)];
00448b05      
00448b0d      if (result != 0)
00448b0d      {
00448b12          while (*(uint32_t*)result != id)
00448b12          {
00448b14              result = result[1];
00448b14              
00448b19              if (result == 0)
00448b20                  return result;
00448b12          }
00448b12          
00448b25          if (result != 0)
00448b25          {
00448b2e              DLListBase::Remove(&this->m_list, &result[2]);
00448b36              IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, arg2);
00448b25          }
00448b0d      }
00448b0d      
00448b40      return result;
00448af0  }

00448b43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00448b50  void __thiscall IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::add_internal(class IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, struct HashList<UIObject *,UIObject *,1>::HashListData* arg2)

00448b50  {
00448b5e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
00448b62          IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::grow(this);
00448b62      
00448b75      struct HashList<UIObject *,UIObject *,1>::HashListData** eax_4 = &this->m_buckets[(COMBINE(0, arg2->m_hashKey) % this->m_numBuckets)];
00448b7a      arg2->m_hashNext = *(uint32_t*)eax_4;
00448b7d      *(uint32_t*)eax_4 = arg2;
00448b7d      
00448b82      if (eax_4 < this->m_firstInterestingBucket)
00448b84          this->m_firstInterestingBucket = eax_4;
00448b84      
00448b87      this->m_numElements += 1;
00448b50  }

00448b8e                                            90 90                                                                ..

00448b90  void __fastcall HashList<ControlSpecification,unsigned long,1>::flush(class HashList<ControlSpecification,unsigned long,1>* this)

00448b90  {
00448b99  label_448b99:
00448b99      void* __offset(DLListData, -0x8) ebp_1 = nullptr;
00448b99      
00448b9d      if (this->m_ihlIntrusive.m_hash.m_numElements <= 0)
00448c55          return;
00448c55      
00448ba3      class DLListData* head_ = this->m_ihlIntrusive.m_list.head_;
00448ba3      
00448ba8      if (head_ != 0)
00448ba8      {
00448baa          class DLListData* dllist_prev = head_->dllist_prev;
00448baa          
00448baf          if (dllist_prev == 0)
00448baf          {
00448bb7              class DLListData* dllist_next = head_->dllist_next;
00448bbb              this->m_ihlIntrusive.m_list.head_ = dllist_next;
00448bbb              
00448bbe              if (dllist_next != 0)
00448bc0                  dllist_next->dllist_prev = nullptr;
00448baf          }
00448baf          else
00448bb3              dllist_prev->dllist_next = head_->dllist_next;
00448bb3          
00448bc3          class DLListData* dllist_next_1 = head_->dllist_next;
00448bc3          
00448bc7          if (dllist_next_1 == 0)
00448bc7          {
00448bd4              class DLListData* dllist_prev_1 = this->m_ihlIntrusive.m_list.tail_->dllist_prev;
00448bd9              this->m_ihlIntrusive.m_list.tail_ = dllist_prev_1;
00448bd9              
00448bdc              if (dllist_prev_1 != 0)
00448bde                  dllist_prev_1->dllist_next = 0;
00448bc7          }
00448bc7          else
00448bcc              dllist_next_1->dllist_prev = head_->dllist_prev;
00448bcc          
00448be2          head_->dllist_next = 0;
00448be4          head_->dllist_prev = nullptr;
00448be4          
00448be7          if (head_ != 0)
00448be9              ebp_1 = &head_[-1];
00448ba8      }
00448ba8      
00448bec      int32_t i = *(int32_t*)((char*)ADJ(ebp_1) + -8);
00448bf3      uint32_t temp1_1 = (COMBINE(0, i) % this->m_ihlIntrusive.m_hash.m_numBuckets);
00448bf6      struct HashList<ControlSpecification,unsigned long,1>::HashListData** m_buckets = this->m_ihlIntrusive.m_hash.m_buckets;
00448bf9      int32_t* ecx_1 = m_buckets[temp1_1];
00448bff      int32_t* eax_3 = ecx_1;
00448bff      
00448c03      if (eax_3 != 0)
00448c03      {
00448c07          while (*(uint32_t*)eax_3 != i)
00448c07          {
00448c09              eax_3 = eax_3[1];
00448c09              
00448c0e              if (eax_3 == 0)
00448c0e              {
00448c11                  operator delete(ebp_1);
00448c19                  goto label_448b99;
00448c0e              }
00448c07          }
00448c07          
00448c20          if (eax_3 != 0)
00448c20          {
00448c24              if (ecx_1 == eax_3)
00448bfc                  m_buckets[temp1_1] = ecx_1[1];
00448c24              else
00448c24              {
00448c2d                  int32_t* edx_5;
00448c2d                  
00448c2d                  do
00448c2d                  {
00448c26                      edx_5 = ecx_1;
00448c28                      ecx_1 = ecx_1[1];
00448c2d                  } while (ecx_1 != eax_3);
00448c2d                  
00448c31                  if (edx_5 != 0)
00448c3d                      edx_5[1] = ecx_1[1];
00448c31                  else
00448bfc                      m_buckets[temp1_1] = ecx_1[1];
00448c24              }
00448c24              
00448c40              this->m_ihlIntrusive.m_hash.m_numElements -= 1;
00448c20          }
00448c03      }
00448c03      
00448c44      operator delete(ebp_1);
00448c4c      goto label_448b99;
00448b90  }

00448c56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00448c60  uint8_t __thiscall IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::add(class IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, struct HashList<UIObject *,UIObject *,1>::HashListData* arg2)

00448c60  {
00448c68      class UIObject* m_hashKey = arg2->m_hashKey;
00448c6b      uint32_t m_numBuckets = this->m_numBuckets;
00448c6b      
00448c7e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
00448c7e      {
00448c82          if (*(uint32_t*)i == m_hashKey)
00448c82          {
00448cce              if (i == 0)
00448cce                  break;
00448cce              
00448cd2              i = 0;
00448cd5              return 0;
00448c82          }
00448c7e      }
00448c7e      
00448c94      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00448c98          IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::grow(this);
00448c98      
00448ca1      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
00448ca4      struct HashList<UIObject *,UIObject *,1>::HashListData** m_buckets = this->m_buckets;
00448caa      arg2->m_hashNext = m_buckets[temp1_1];
00448cad      m_buckets[temp1_1] = arg2;
00448cb3      struct HashList<UIObject *,UIObject *,1>::HashListData** eax_4 = &m_buckets[temp1_1];
00448cb3      
00448cb8      if (eax_4 < this->m_firstInterestingBucket)
00448cba          this->m_firstInterestingBucket = eax_4;
00448cba      
00448cc2      this->m_numElements += 1;
00448cc6      uint32_t eax_6;
00448cc6      eax_6 = 1;
00448cc9      return 1;
00448c60  }

00448cd8                                                                          90 90 90 90 90 90 90 90                          ........

00448ce0  uint8_t __thiscall IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::place_at_head(class IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, struct HashList<UIObject *,UIObject *,1>::HashListData* arg2)

00448ce0  {
00448ce8      class UIObject* m_hashKey = arg2->m_hashKey;
00448cf7      int32_t* eax_3 = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)];
00448cf7      
00448cfb      if (eax_3 == 0)
00448cfb      {
00448d0e      label_448d0e:
00448d0e          IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::add(this, arg2);
00448cfb      }
00448cfb      else
00448cfb      {
00448d02          while (*(uint32_t*)eax_3 != m_hashKey)
00448d02          {
00448d04              eax_3 = eax_3[1];
00448d04              
00448d09              if (eax_3 == 0)
00448d09                  goto label_448d0e_1;
00448d02          }
00448d02          
00448d38          if (eax_3 == 0)
00448d38          {
00448d0e          label_448d0e_1:
00448d0e              IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::add(this, arg2);
00448d38          }
00448d38          else
00448d41              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
00448cfb      }
00448cfb      
00448d16      arg2->dllist_next = this->m_list.head_;
00448d1b      class DLListData* head_ = this->m_list.head_;
00448d20      class DLListData** eax_4;
00448d20      
00448d20      if (head_ != 0)
00448d20      {
00448d22          head_->dllist_prev = &arg2->dllist_next;
00448d25          this->m_list.head_ = &arg2->dllist_next;
00448d16          arg2->dllist_prev = 0;
00448d30          eax_4 = 1;
00448d33          return 1;
00448d20      }
00448d20      
00448d48      this->m_list.tail_ = &arg2->dllist_next;
00448d4b      this->m_list.head_ = &arg2->dllist_next;
00448d16      arg2->dllist_prev = 0;
00448d56      eax_4 = 1;
00448d59      return 1;
00448ce0  }

00448d5c                                                                                      90 90 90 90                              ....

00448d60  void RenderUI::Shutdown()

00448d60  {
00448d60      uint32_t m_numElements = RenderUI::s_hlObjects.m_ihlIntrusive.m_hash.m_numElements;
00448d60      
00448d6a      if (m_numElements != 0)
00448d6a      {
00448d6d          void* __offset(DLListData, -0x8) i = nullptr;
00448d6d          
00448d76          if (m_numElements > 0)
00448d76          {
00448d78              class DLListData* head_ = RenderUI::s_hlObjects.m_ihlIntrusive.m_list.head_;
00448d78              
00448d7f              if (head_ == 0)
00448d86                  i = nullptr;
00448d7f              else
00448d81                  i = &head_[-1];
00448d76          }
00448d76          
00448d8a          int32_t var_4_1 = 0x8392c8;
00448d8e          class DLListData* dllist_next;
00448d8e          
00448d8e          for (; i != 0; i = &dllist_next[-1])
00448d8e          {
00448d90              int32_t* ecx_1 = *(int32_t*)((char*)ADJ(i) + 8);
00448d93              int32_t temp0_1 = ecx_1[1];
00448d93              ecx_1[1] -= 1;
00448d93              
00448d96              if (temp0_1 == 1)
00448d9c                  **(uint32_t**)ecx_1(1);
00448d9c              
00448d9e              dllist_next = ADJ(i)->dllist_next;
00448d9e              
00448da3              if (dllist_next == 0)
00448da3                  break;
00448d8e          }
00448d8e          
00448db1          HashList<ControlSpecification,unsigned long,1>::flush(&RenderUI::s_hlObjects);
00448d6a      }
00448d6a      
00448db7      class RenderIndexBuffer* RenderUI::s_pUISurfaceIB_1 = RenderUI::s_pUISurfaceIB;
00448db7      
00448dbf      if (RenderUI::s_pUISurfaceIB_1 != 0)
00448dc1          RenderUI::s_pUISurfaceIB_1->vtable->__vecDelDtor(1);
00448dc1      
00448dc7      RenderUI::s_pUISurfaceIB = nullptr;
00448d60  }

00448dd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00448de0  void RenderUI::UnlinkObject(class UIObject* arg1)

00448de0  {
00448de1      class UIObject* esi = arg1;
00448de1      
00448de7      if (esi != 0)
00448de7      {
00448df3          struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_1 = IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&RenderUI::s_hlObjects, &arg1);
00448df3          
00448dfa          if (eax_1 != 0)
00448dfa          {
00448dfd              operator delete(eax_1);
00448e02              uint32_t m_cRef = esi->m_cRef;
00448e09              esi->m_cRef = (m_cRef - 1);
00448e09              
00448e0c              if (m_cRef == 1)
00448e0e                  esi->vtable->__vecDelDtor(1);
00448dfa          }
00448de7      }
00448de0  }

00448e18                                                                          90 90 90 90 90 90 90 90                          ........

00448e20  uint8_t __thiscall HashList<UIObject *,UIObject *,1>::move_to_head(class HashList<UIObject *,UIObject *,1>* this, class UIObject** arg2)

00448e20  {
00448e25      class UIObject* i = *(uint32_t*)arg2;
00448e34      int32_t* eax_3 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
00448e34      
00448e38      if (eax_3 != 0)
00448e38      {
00448e42          while (*(uint32_t*)eax_3 != i)
00448e42          {
00448e44              eax_3 = eax_3[1];
00448e44              
00448e49              if (eax_3 == 0)
00448e49              {
00448e4b                  eax_3 = 0;
00448e4e                  return 0;
00448e49              }
00448e42          }
00448e42          
00448e53          if (eax_3 != 0)
00448e60              /* tailcall */
00448e60              return IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::place_at_head(this, eax_3);
00448e38      }
00448e38      
00448e55      eax_3 = 0;
00448e58      return 0;
00448e20  }

00448e65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00448e70  uint8_t __thiscall IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::push_head(class IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, struct HashList<UIObject *,UIObject *,1>::HashListData* arg2)

00448e70  {
00448e78      class UIObject* m_hashKey = arg2->m_hashKey;
00448e78      
00448e8b      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
00448e8b      {
00448e92          if (*(uint32_t*)i == m_hashKey)
00448e92          {
00448ec8              if (i == 0)
00448ec8                  break;
00448ec8              
00448ecb              i = 0;
00448ece              return 0;
00448e92          }
00448e8b      }
00448e8b      
00448e9e      IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::add(this, arg2);
00448ea6      arg2->dllist_next = this->m_list.head_;
00448eab      class DLListData* head_ = this->m_list.head_;
00448eb0      class DLListData** eax_3;
00448eb0      
00448eb0      if (head_ != 0)
00448eb0      {
00448eb2          head_->dllist_prev = &arg2->dllist_next;
00448eb5          this->m_list.head_ = &arg2->dllist_next;
00448ea6          arg2->dllist_prev = nullptr;
00448ec0          eax_3 = 1;
00448ec3          return 1;
00448eb0      }
00448eb0      
00448ed1      this->m_list.tail_ = &arg2->dllist_next;
00448ed4      this->m_list.head_ = &arg2->dllist_next;
00448ea6      arg2->dllist_prev = nullptr;
00448edf      eax_3 = 1;
00448ee2      return 1;
00448e70  }

00448ee5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00448ef0  uint8_t __thiscall IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::insert_after(class IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, struct HashList<UIObject *,UIObject *,1>::HashListData* arg2, struct HashList<UIObject *,UIObject *,1>::HashListData* arg3)

00448ef0  {
00448efa      if (arg2 == 0)
00448f08          return IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::push_head(this, arg3);
00448f08      
00448f18      if (HashList<unsigned long,ActionMapValue,1>::contains(this, arg3) != 0)
00448f1f          return 0;
00448f1f      
00448f25      IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::add(this, arg3);
00448f25      
00448f2f      if (arg3 != 0)
00448f2f      {
00448f39          DLListBase::InsertAfter(&this->m_list, &arg3->dllist_next, &arg2->dllist_next);
00448f40          int32_t eax_4;
00448f40          eax_4 = 1;
00448f43          return 1;
00448f2f      }
00448f2f      
00448f4d      DLListBase::InsertAfter(&this->m_list, nullptr, &arg2->dllist_next);
00448f54      int32_t eax_5;
00448f54      eax_5 = 1;
00448f57      return 1;
00448ef0  }

00448f5a                                                                                90 90 90 90 90 90                            ......

00448f60  uint8_t __thiscall IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::place_after(class IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>* this, struct HashList<UIObject *,UIObject *,1>::HashListData* arg2, struct HashList<UIObject *,UIObject *,1>::HashListData* arg3)

00448f60  {
00448f6a      if (arg2 == 0)
00448f78          return IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::place_at_head(this, arg3);
00448f78      
00448f88      if (HashList<unsigned long,ActionMapValue,1>::contains(this, arg3) == 0)
00448fac          IntrusiveHashTable<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::add(this, arg3);
00448f88      else if (arg3 == 0)
00448fa2          DLListBase::Remove(&this->m_list, nullptr);
00448f8c      else
00448f95          DLListBase::Remove(&this->m_list, &arg3->dllist_next);
00448f95      
00448fb6      if (arg3 == 0)
00448fb6      {
00448fd4          DLListBase::InsertAfter(&this->m_list, nullptr, &arg2->dllist_next);
00448fdb          int32_t eax_6;
00448fdb          eax_6 = 1;
00448fde          return 1;
00448fb6      }
00448fb6      
00448fc0      DLListBase::InsertAfter(&this->m_list, &arg3->dllist_next, &arg2->dllist_next);
00448fc7      int32_t eax_5;
00448fc7      eax_5 = 1;
00448fca      return 1;
00448f60  }

00448fe1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00448ff0  uint8_t __thiscall HashList<UIObject *,UIObject *,1>::push_head(class HashList<UIObject *,UIObject *,1>* this, class UIObject** arg2, class UIObject** arg3)

00448ff0  {
00448ff8      class UIObject* ecx = *(uint32_t*)arg2;
00448ff8      
00449009      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ecx) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
00449009      {
00449012          if (*(uint32_t*)i == ecx)
00449012          {
00449051              if (i != 0)
0044905d                  return HashList<UIObject *,UIObject *,1>::move_to_head(this, arg2);
0044905d              
00449051              break;
00449012          }
00449009      }
00449009      
0044901d      void* eax_2 = operator new(0x14);
00449027      void* esi_1;
00449027      
00449027      if (eax_2 == 0)
00449060          esi_1 = nullptr;
00449027      else
00449027      {
0044902f          *(uint32_t*)eax_2 = *(uint32_t*)arg2;
00449031          *(uint32_t*)((char*)eax_2 + 4) = 0;
00449038          *(uint32_t*)((char*)eax_2 + 8) = 0;
0044903f          *(uint32_t*)((char*)eax_2 + 0xc) = 0;
00449048          *(uint32_t*)((char*)eax_2 + 0x10) = *(uint32_t*)arg3;
0044904b          esi_1 = eax_2;
00449027      }
00449027      
0044906b      int32_t ebx;
0044906b      ebx = IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::push_head(this, esi_1);
0044906b      
00449073      if ((ebx == 0 && esi_1 != 0))
00449076          operator delete(esi_1);
00449076      
00449083      return ebx;
00448ff0  }

0044900d                                         8d 49 00                                                               .I.
00449086                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00449090  uint8_t __thiscall HashList<UIObject *,UIObject *,1>::move_to_middle(class HashList<UIObject *,UIObject *,1>* this, class UIObject** arg2, class UIObject** arg3)

00449090  {
00449095      class UIObject* i = *(uint32_t*)arg2;
0044909a      uint32_t m_numBuckets = this->m_ihlIntrusive.m_hash.m_numBuckets;
004490a3      struct HashList<UIObject *,UIObject *,1>::HashListData** m_buckets = this->m_ihlIntrusive.m_hash.m_buckets;
004490a6      int32_t* esi = m_buckets[(COMBINE(0, i) % m_numBuckets)];
004490a6      
004490b0      if (esi != 0)
004490b0      {
004490b4          while (*(uint32_t*)esi != i)
004490b4          {
004490b6              esi = esi[1];
004490b6              
004490bb              if (esi == 0)
004490bb                  break;
004490b4          }
004490b0      }
004490b0      
004490c1      class UIObject* i_1 = *(uint32_t*)arg3;
004490cd      int32_t* eax_4 = m_buckets[(COMBINE(0, i_1) % m_numBuckets)];
004490cd      
004490d1      if (eax_4 != 0)
004490d1      {
004490d5          while (*(uint32_t*)eax_4 != i_1)
004490d5          {
004490d7              eax_4 = eax_4[1];
004490d7              
004490dc              if (eax_4 == 0)
004490dc                  break;
004490d5          }
004490d1      }
004490d1      
004490e4      if ((esi != 0 && eax_4 != 0))
004490f1          return IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::place_after(this, esi, eax_4);
004490f1      
004490f7      eax_4 = 0;
004490fa      return 0;
00449090  }

004490fd                                                                                         90 90 90                               ...

00449100  uint8_t __thiscall HashList<UIObject *,UIObject *,1>::insert_after(class HashList<UIObject *,UIObject *,1>* this, class UIObject** arg2, class UIObject** arg3, class UIObject** arg4)

00449100  {
00449108      class UIObject* i = *(uint32_t*)arg2;
00449114      int32_t* edx_2 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
00449119      struct HashList<UIObject *,UIObject *,1>::HashListData** eax_1;
00449119      
00449119      if (edx_2 != 0)
00449119      {
00449122          while (*(uint32_t*)edx_2 != i)
00449122          {
00449124              edx_2 = edx_2[1];
00449124              
00449129              if (edx_2 == 0)
00449129              {
0044912c                  eax_1 = 0;
0044912f                  return 0;
00449129              }
00449122          }
00449122          
00449134          if (edx_2 != 0)
00449134          {
0044914c              if (HashList<unsigned long,ActionMapValue,1>::contains(this, arg3) != 0)
0044915a                  return HashList<UIObject *,UIObject *,1>::move_to_middle(this, arg2, arg3);
0044915a              
0044915f              void* eax_4 = operator new(0x14);
00449169              void* edi_1;
00449169              
00449169              if (eax_4 == 0)
00449191                  edi_1 = nullptr;
00449169              else
00449169              {
00449171                  *(uint32_t*)eax_4 = *(uint32_t*)arg3;
00449173                  *(uint32_t*)((char*)eax_4 + 4) = 0;
0044917a                  *(uint32_t*)((char*)eax_4 + 8) = 0;
00449181                  *(uint32_t*)((char*)eax_4 + 0xc) = 0;
0044918a                  *(uint32_t*)((char*)eax_4 + 0x10) = *(uint32_t*)arg4;
0044918d                  edi_1 = eax_4;
00449169              }
00449169              
00449193              class UIObject* ecx_4 = *(uint32_t*)arg2;
004491a4              struct HashList<UIObject *,UIObject *,1>::HashListData** eax_6;
004491a4              
004491a4              for (int32_t* i_1 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ecx_4) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
004491a4              {
004491a8                  if (*(uint32_t*)i_1 == ecx_4)
004491a8                  {
004491c8                      if ((i_1 != 0 && IntrusiveHashList<UIObject *,HashList<UIObject *,UIObject *,1>::HashListData *,1>::insert_after(this, i_1, edi_1) != 0))
004491c8                      {
004491d9                          eax_6 = 1;
004491dc                          return 1;
004491c8                      }
004491c8                      
004491c8                      break;
004491a8                  }
004491a4              }
004491a4              
004491b3              if (edi_1 != 0)
004491b6                  operator delete(edi_1);
004491b6              
004491c0              eax_6 = 0;
004491c3              return 0;
00449134          }
00449119      }
00449119      
00449137      eax_1 = 0;
0044913a      return 0;
00449100  }

0044911d                                                                                         8d 49 00                               .I.
004491df                                                                                               90                                 .

004491e0  void RenderUI::LinkObject(class UIObject* arg1)

004491e0  {
004491eb      class UIObject* edi = arg1;
004491eb      
004491f0      if (edi != 0)
004491f0      {
004491f7          void* __offset(DLListData, -0x8) ecx_1 = nullptr;
004491f7          
004491fb          if (RenderUI::s_hlObjects.m_ihlIntrusive.m_hash.m_numElements > 0)
004491fb          {
004491fd              class DLListData* tail_ = RenderUI::s_hlObjects.m_ihlIntrusive.m_list.tail_;
004491fd              
00449204              if (tail_ == 0)
0044920b                  ecx_1 = nullptr;
00449204              else
00449206                  ecx_1 = &tail_[-1];
004491fb          }
004491fb          
00449214          int32_t var_c_1 = 0x8392c8;
00449218          uint8_t eax_3;
00449218          
00449218          if (ecx_1 == 0)
00449218          {
00449281          label_449281:
00449281              eax_3 = HashList<UIObject *,UIObject *,1>::push_head(&RenderUI::s_hlObjects, &arg1, &arg1);
00449218          }
00449218          else
00449218          {
0044921a              int32_t m_nDepth = edi->m_nDepth;
0044921d              void* __offset(DLListData, -0x8) ecx_2 = ecx_1;
0044921d              
00449220              while (true)
00449220              {
00449220                  void* edx_1 = *(int32_t*)((char*)ADJ(ecx_2) + 8);
00449223                  int32_t eax_2 = *(uint32_t*)((char*)edx_1 + 0x10);
00449228                  void* var_10 = edx_1;
00449228                  
0044922c                  if (eax_2 != m_nDepth)
0044922c                  {
0044925f                      eax_2 = eax_2 < m_nDepth;
0044925f                      
00449264                      if (eax_2 == 0)
00449264                      {
0044924d                          eax_3 = HashList<UIObject *,UIObject *,1>::insert_after(&RenderUI::s_hlObjects, &var_10, &arg1, &arg1);
0044924d                          break;
00449264                      }
0044922c                  }
0044922c                  else
0044922c                  {
0044922e                      long double x87_r7_1 = ((long double)*(uint64_t*)((char*)edx_1 + 0x18));
00449231                      long double temp0_1 = ((long double)edi->m_tTouchTime);
00449231                      (x87_r7_1 - temp0_1);
00449234                      eax_2 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00449234                      
00449239                      if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
00449239                      {
0044924d                          eax_3 = HashList<UIObject *,UIObject *,1>::insert_after(&RenderUI::s_hlObjects, &var_10, &arg1, &arg1);
0044924d                          break;
00449239                      }
0044922c                  }
0044922c                  
00449266                  class DLListData* dllist_prev = ADJ(ecx_2)->dllist_prev;
00449266                  
0044926b                  if (dllist_prev == 0)
0044926b                      goto label_449281;
0044926b                  
0044926d                  ecx_2 = &dllist_prev[-1];
0044926d                  
00449272                  if (ecx_2 == 0)
00449272                      goto label_449281;
00449220              }
00449218          }
00449218          
00449254          if (eax_3 != 0)
00449256              edi->m_cRef += 1;
004491f0      }
004491e0  }

00449288                          90 90 90 90 90 90 90 90                                                          ........

00449290  void RenderUI::LinkObjectAfter(class UIObject* arg1, class UIObject* arg2)

00449290  {
00449291      class UIObject* esi = arg1;
00449291      
00449297      if (esi != 0)
00449297      {
0044929f          if (arg2 != 0)
0044929f          {
004492cd          label_4492cd:
004492cd              
004492d4              if (HashList<UIObject *,UIObject *,1>::insert_after(&RenderUI::s_hlObjects, &arg2, &arg1, &arg1) != 0)
004492d6                  esi->m_cRef += 1;
0044929f          }
0044929f          else
0044929f          {
004492b7              if (HashList<UIObject *,UIObject *,1>::push_head(&RenderUI::s_hlObjects, &arg1, &arg1) == 0)
004492b7                  goto label_4492cd;
004492b7              
004492d6              esi->m_cRef += 1;
0044929f          }
00449297      }
00449290  }

004492db                                                                                   90 90 90 90 90                             .....

004492e0  uint8_t __thiscall RenderMaterial::CheckOutputField(class RenderMaterial const* this, class PStringBase<char>* arg2, enum RMFieldType const arg3, enum RMDataType const arg4, uint32_t const arg5, uint32_t const arg6)

004492e0  {
004492e3      uint32_t m_num = this->properties.properties.m_num;
004492ec      int32_t var_8 = 0;
004492f4      uint32_t m_num_2 = m_num;
004492f4      
004492f8      if (m_num > 0)
004492f8      {
004492fa          class MaterialProperty** m_data_1 = this->properties.properties.m_data;
00449346          bool cond:1_1;
00449346          
00449346          do
00449346          {
00449300              class MaterialProperty* edi_1 = *(uint32_t*)m_data_1;
00449302              uint32_t m_num_1 = edi_1->fields.m_num;
00449305              int32_t ecx_1 = 0;
00449305              
00449309              if (m_num_1 > 0)
00449309              {
0044930b                  class MaterialField** m_data = edi_1->fields.m_data;
0044930b                  
00449332                  do
00449332                  {
00449310                      class MaterialField* eax = *(uint32_t*)m_data;
00449310                      
0044932a                      if ((eax->fieldType == arg3 && (eax->layerIndex == arg5 && eax->__inner3 == arg6)))
0044932a                      {
00449354                          int32_t* ebx_1 = arg2;
00449358                          int32_t eax_1 = *(uint32_t*)ebx_1;
00449358                          
0044935c                          if (eax_1 != edi_1->name.m_charbuffer)
0044935c                          {
00449371                              if ((InterlockedDecrement((eax_1 - 0x10)) == 0 && eax_1 != 0x14))
00449379                                  **(uint32_t**)(eax_1 - 0x14)(1);
00449379                              
0044937b                              class PSRefBufferCharData<char>* m_charbuffer = edi_1->name.m_charbuffer;
0044937d                              *(uint32_t*)ebx_1 = m_charbuffer;
00449383                              InterlockedIncrement(&m_charbuffer[-1]);
0044935c                          }
0044935c                          
0044938c                          eax_1 = 1;
00449392                          return 1;
0044932a                      }
0044932a                      
0044932c                      ecx_1 += 1;
0044932d                      m_data = &m_data[1];
00449332                  } while (ecx_1 < m_num_1);
00449332                  
00449334                  m_num = m_num_2;
00449309              }
00449309              
0044933d              m_data_1 = &m_data_1[1];
00449340              cond:1_1 = (var_8 + 1) < m_num;
00449342              var_8 += 1;
00449346          } while (cond:1_1);
004492f8      }
004492f8      
0044934b      m_num = 0;
00449351      return 0;
004492e0  }

00449395                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004493a0  void __fastcall RenderMaterial::Optimize(class RenderMaterial* this)

004493a0  {
004493ab      int32_t j;
004493ab      j = 0;
004493b8      __builtin_memset(&this->m_LayerIndices, 0xffffffff, 0x438);
004493c0      int32_t i = 0;
004493c4      char var_19 = 0;
004493c9      char var_1a = 0;
004493cd      char var_18 = 0;
004493d1      char var_17 = 0;
004493d5      uint8_t var_16 = 0;
004493d9      char var_15 = 0;
004493dd      char* var_c = 0x3f800000;
004493e5      int32_t i_1 = 0;
004493e9      char* ecx;
004493e9      
004493e9      if (this->layers.m_num > 0)
004493e9      {
00449556          do
00449556          {
004493f3              void* edi_1 = this->layers.m_data[i];
004493f9              int32_t esi_1 = *(uint32_t*)((char*)edi_1 + 0xc);
004493fc              int32_t var_4_1 = esi_1;
004493fc              
0044940a              if ((((*(uint8_t*)edi_1 & 0x82) != 0 || esi_1 == 1) || esi_1 == 2))
0044940c                  var_19 = 1;
0044940c              
00449419              if ((esi_1 == 1 || esi_1 == 2))
0044941b                  var_1a = 1;
0044941b              
00449428              if ((esi_1 == 4 || esi_1 == 5))
0044942a                  var_18 = 1;
0044942a              
00449437              if ((esi_1 == 7 || esi_1 == 8))
00449439                  var_17 = 1;
00449439              
00449441              if (esi_1 == 0xa)
00449443                  var_16 = 1;
00449443              
0044944c              if ((*(uint8_t*)((char*)edi_1 + 4) & 3) != 0)
0044944e                  var_15 = 1;
0044944e              
00449453              long double x87_r7_1 = ((long double)*(uint32_t*)((char*)edi_1 + 0x88));
00449459              long double temp0_1 = ((long double)var_c);
00449459              (x87_r7_1 - temp0_1);
0044945d              class MaterialLayer** eax_1;
0044945d              eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0044945f              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0044945f              
00449462              if (!(p_1))
0044946a                  var_c = *(uint32_t*)((char*)edi_1 + 0x88);
0044946a              
00449475              if (DBCache::IsRunTime() != 0)
00449475              {
0044947b                  j = 0;
0044947d                  int32_t j_1 = 0;
0044947d                  
0044953f                  do
0044953f                  {
00449481                      int32_t ebx = *(uint32_t*)((char*)edi_1 + 8);
00449484                      uint32_t eax_2;
00449484                      eax_2 = j;
00449486                      eax_2 &= 1;
00449488                      char var_1c_1 = eax_2;
00449490                      int32_t edx = *(uint32_t*)((char*)edi_1 + 4);
00449498                      ecx = ((j >> 2) & 1);
0044949b                      eax_2 = ((j >> 1) & 1);
0044949f                      char var_1b_1 = 1;
0044949f                      
004494a8                      if (edx != 0)
004494a8                      {
004494bb                          if ((((edx & 1) != 0 && eax_2 != 1) || ((edx & 2) != 0 && ecx != 1)))
004494d2                              var_1b_1 = 0;
004494bb                          else if ((edx & 4) == 0)
004494c0                          {
004494d0                              if ((edx & 8) != 0)
004494d2                                  var_1b_1 = 0;
004494c0                          }
004494c0                          else if ((var_1c_1 != 1 || (edx & 8) != 0))
004494d2                              var_1b_1 = 0;
004494a8                      }
004494a8                      
004494d9                      int32_t j_2;
004494d9                      
004494d9                      if (ebx == 0)
004494d9                      {
004494fa                      label_4494fa:
004494fa                          eax_2 = var_1b_1;
004494fa                          
00449500                          if (eax_2 == 0)
00449533                              j_2 = j_1;
00449500                          else
00449500                          {
00449502                              j_2 = j_1;
0044950a                              ecx = (((j_2 + (esi_1 << 3)) + 0x38) * 3);
0044950d                              eax_2 = 0;
0044950d                              
00449516                              while (true)
00449516                              {
00449516                                  if ((ecx + this)[eax_2] == 0xff)
00449516                                  {
00449524                                      esi_1 = var_4_1;
00449528                                      ecx = &ecx[eax_2];
0044952a                                      eax_2 = i_1;
0044952e                                      *(uint8_t*)(ecx + this) = eax_2;
00449531                                      break;
00449516                                  }
00449516                                  
00449518                                  eax_2 += 1;
00449518                                  
0044951c                                  if (eax_2 >= 3)
0044951c                                  {
0044951e                                      esi_1 = var_4_1;
00449522                                      break;
0044951c                                  }
00449516                              }
00449500                          }
004494d9                      }
004494d9                      else if (((ebx & 1) != 0 && eax_2 == 1))
00449533                          j_2 = j_1;
004494e2                      else if ((ebx & 2) == 0)
004494e7                      {
004494f8                          if (((ebx & 4) == 0 || var_1c_1 != 1))
004494f1                              goto label_4494fa;
004494f1                          
00449533                          j_2 = j_1;
004494e7                      }
004494e7                      else
004494e7                      {
004494f8                          if ((ecx != 1 && ((ebx & 4) == 0 || var_1c_1 != 1)))
004494ec                              goto label_4494fa;
004494ec                          
00449533                          j_2 = j_1;
004494e7                      }
004494e7                      
00449537                      j = (j_2 + 1);
0044953b                      j_1 = j;
0044953f                  } while (j < 8);
0044953f                  
00449545                  i = i_1;
00449475              }
00449475              
0044954f              i += 1;
00449552              i_1 = i;
00449556          } while (i < this->layers.m_num);
00449556          
0044955c          j = var_1a;
004493e9      }
004493e9      
00449563      ecx = var_19;
00449567      this->m_SupportsLighting = ecx;
0044956d      this->m_SupportsMultiPassLighting = j;
00449573      uint32_t eax;
00449573      
00449573      if (j != 0)
00449575          eax = var_18;
00449575      
0044957b      uint8_t eax_4;
0044957b      
0044957b      if ((j == 0 || eax == 0))
00449584          eax_4 = 0;
0044957b      else
0044957d          eax_4 = 1;
0044957d      
00449586      j = var_17;
0044958a      ecx = var_15;
0044958e      this->m_SupportsCombinedAmbientPass = eax_4;
00449598      this->m_SupportsGlowing = j;
004495a3      this->m_NeedsAlphaBlendPass = var_16;
004495a9      this->m_UsesVideoPost = ecx;
004495af      this->m_Opacity = var_c;
004495b5      this->m_IsOptimized = 1;
004493a0  }

004495c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004495d0  void __thiscall RenderMaterial::GetSubDataIDs(class RenderMaterial const* this, class QualifiedDataIDArray* arg2)

004495d0  {
004495e1      int32_t i = 0;
004495e5      void var_10;
004495e5      
004495e5      if (this->properties.properties.m_num > 0)
004495e5      {
00449625          do
00449625          {
004495f3              void* eax_2 = this->properties.properties.m_data[i];
004495f3              
004495f9              if (*(uint32_t*)((char*)eax_2 + 8) == 0xbb8)
004495f9              {
004495fe                  class IDClass<_tagDataID,32,0> eax_4 = **(uint32_t**)((char*)eax_2 + 0x10);
004495fe                  
00449606                  if (eax_4 != INVALID_DID.id)
0044961a                      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, eax_4, 0), 0);
004495f9              }
004495f9              
00449622              i += 1;
00449625          } while (i < this->properties.properties.m_num);
004495e5      }
004495e5      
0044962d      int32_t i_1 = 0;
0044962d      
00449631      if (this->layers.m_num > 0)
00449631      {
0044968c          do
0044968c          {
00449636              void* eax_8 = &this->layers.m_data[i_1];
00449639              void* ecx_3 = *(uint32_t*)eax_8;
00449639              
0044963d              if (ecx_3 != 0)
0044963d              {
00449642                  int32_t j = 0;
00449642                  
00449646                  if (*(uint32_t*)((char*)ecx_3 + 0x24) > 0)
00449646                  {
00449681                      class MaterialLayer** m_data;
00449681                      
00449681                      do
00449681                      {
00449650                          class IDClass<_tagDataID,32,0> eax_11 = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)eax_8 + 0x1c) + (j << 2)) + 8);
00449650                          
00449659                          if (eax_11 != INVALID_DID.id)
0044966d                              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, eax_11, 0), 0);
0044966d                          
00449672                          m_data = this->layers.m_data;
00449678                          eax_8 = &m_data[i_1];
0044967e                          j += 1;
00449681                      } while (j < m_data[i_1]->m_Stages.m_num);
00449646                  }
0044963d              }
0044963d              
00449689              i_1 += 1;
0044968c          } while (i_1 < this->layers.m_num);
00449631      }
004495d0  }

00449697                                                                       90 90 90 90 90 90 90 90 90                         .........

004496a0  void __fastcall RenderMaterial::RenderMaterial(class RenderMaterial* this)

004496a0  {
004496aa      DBObj::DBObj(this, INVALID_DID.id);
004496b2      this->vtable = 0x79b0b8;
004496b8      MaterialModifier::MaterialModifier(&this->properties);
004496bf      __builtin_memset(&this->layers, 0, 0x2b);
004496ef      this->m_IsInstance = 0;
00449725      this->m_Opacity = 1f;
00449734      __builtin_memset(&this->m_LayerIndices, 0xffffffff, 0x438);
004496a0  }

0044973b                                                                                   90 90 90 90 90                             .....

00449740  uint32_t RenderMaterial::GetDBOType(class RenderMaterial const* this @ ecx) __pure

00449740  {
00449745      return 0x1f;
00449740  }

00449746                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00449750  uint8_t __fastcall RenderMaterial::ReleaseSubObjects(class RenderMaterial* this)

00449750  {
00449750      class RenderMaterial* this_1 = this;
00449756      *(uint8_t*)((char*)this_1)[3] = 1;
00449756      
00449762      if (DBCache::IsRunTime() != 0)
00449762      {
00449770          int32_t i = 0;
00449770          
00449774          if (this->layers.m_num > 0)
00449774          {
00449796              do
00449796              {
00449779                  class MaterialLayer* ecx = this->layers.m_data[i];
00449779                  
0044977e                  if (ecx == 0)
0044977e                  {
004497f4                      class MaterialLayer** eax_7;
004497f4                      eax_7 = 0;
004497f8                      return 0;
0044977e                  }
0044977e                  
00449787                  if (MaterialLayer::ReleaseSubObjects(ecx) == 0)
00449789                      *(uint8_t*)((char*)this_1)[3] = 0;
00449789                  
00449793                  i += 1;
00449796              } while (i < this->layers.m_num);
00449774          }
00449774          
0044979e          SmartArray<PStringBase<char>,1>::Reset(&this->m_MaterialShaderConstantNames);
004497a9          int32_t i_1 = 0;
004497a9          
004497ad          if (this->m_MaterialShaderConstants.m_num > 0)
004497ad          {
004497dc              do
004497dc              {
004497b6                  int32_t* m_pPropertyValue = this->m_MaterialShaderConstants.m_data[i_1].m_pPropertyValue;
004497b6                  
004497bc                  if (m_pPropertyValue != 0)
004497bc                  {
004497be                      int32_t temp0_1 = m_pPropertyValue[1];
004497be                      m_pPropertyValue[1] -= 1;
004497be                      
004497c1                      if (temp0_1 == 1)
004497c7                          **(uint32_t**)m_pPropertyValue(1);
004497c7                      
004497c9                      this->m_MaterialShaderConstants.m_data[i_1].m_pPropertyValue = 0;
004497bc                  }
004497bc                  
004497d9                  i_1 += 1;
004497dc              } while (i_1 < this->m_MaterialShaderConstants.m_num);
004497ad          }
004497ad          
004497e4          SmartArray<VertexRange,1>::Reset(&this->m_MaterialShaderConstants.m_data);
00449762      }
00449762      
004497f1      return *(uint8_t*)((char*)this_1)[3];
00449750  }

004497f9                                                                             90 90 90 90 90 90 90                           .......

00449800  class DBObj* RenderMaterial::Allocate(class RenderMaterial const* this @ ecx)

00449800  {
00449800      /* tailcall */
00449800      return RenderMaterial::Allocator();
00449800  }

00449805                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00449810  class DBObj* RenderMaterial::Allocator()

00449810  {
00449815      void* eax = operator new(0x4e0);
00449815      
0044981f      if (eax == 0)
0044982a          return 0;
0044982a      
00449823      /* tailcall */
00449823      return RenderMaterial::RenderMaterial(eax);
00449810  }

0044982b                                   90 90 90 90 90                                                             .....

00449830  void __fastcall RenderMaterial::End(class RenderMaterial* this)

00449830  {
00449836      RenderMaterial::ReleaseSubObjects(this);
00449843      int32_t i = 0;
00449843      
00449847      if (this->layers.m_num > 0)
00449847      {
00449873          do
00449873          {
00449853              class MaterialLayer* edi_1 = this->layers.m_data[i];
00449853              
00449858              if (edi_1 != 0)
00449858              {
0044985c                  MaterialLayer::~MaterialLayer(edi_1);
00449862                  operator delete(edi_1);
00449858              }
00449858              
00449870              i += 1;
00449873          } while (i < this->layers.m_num);
00449847      }
00449847      
00449875      uint32_t m_sizeAndDeallocate = this->layers.m_sizeAndDeallocate;
00449886      this->layers.m_num = 0;
00449886      
0044988c      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044988c      {
00449892          operator delete[](this->layers.m_data);
0044989a          this->layers.m_data = 0;
0044989d          this->layers.m_sizeAndDeallocate = 0;
0044988c      }
0044988c      else if (this->layers.m_data != 0)
004498a5      {
004498a7          int32_t eax_3 = (m_sizeAndDeallocate & 0x7fffffff);
004498ac          int32_t eax_4 = (eax_3 - 1);
004498ac          
004498ad          if ((eax_3 - 1) >= 0)
004498ad          {
004498b8              int32_t temp1_1;
004498b8              
004498b8              do
004498b8              {
004498b0                  temp1_1 = eax_4;
004498b0                  eax_4 -= 1;
004498b1                  this->layers.m_data[(eax_4 + 1)] = 0;
004498b8              } while ((temp1_1 - 1) >= 0);
004498ad          }
004498a5      }
004498a5      
004498ba      this->properties.vtable->Destroy();
004498c9      SmartArray<PStringBase<char>,1>::Reset(&this->m_MaterialShaderConstantNames);
004498d4      int32_t i_1 = 0;
004498d4      
004498d8      if (this->m_MaterialShaderConstants.m_num > 0)
004498d8      {
0044990c          do
0044990c          {
004498e6              int32_t* m_pPropertyValue = this->m_MaterialShaderConstants.m_data[i_1].m_pPropertyValue;
004498e6              
004498ec              if (m_pPropertyValue != 0)
004498ec              {
004498ee                  int32_t temp2_1 = m_pPropertyValue[1];
004498ee                  m_pPropertyValue[1] -= 1;
004498ee                  
004498f1                  if (temp2_1 == 1)
004498f7                      **(uint32_t**)m_pPropertyValue(1);
004498f7                  
004498f9                  this->m_MaterialShaderConstants.m_data[i_1].m_pPropertyValue = 0;
004498ec              }
004498ec              
00449909              i_1 += 1;
0044990c          } while (i_1 < this->m_MaterialShaderConstants.m_num);
004498d8      }
004498d8      
00449918      /* tailcall */
00449918      return SmartArray<VertexRange,1>::Reset(&this->m_MaterialShaderConstants);
00449830  }

0044991d                                                                                         90 90 90                               ...

00449920  uint8_t __thiscall RenderMaterial::CopyInto(class RenderMaterial const* this, class DBObj* arg2)

00449920  {
00449929      void* __offset(DBObj, 0x30) esi = &arg2[1];
0044992c      class RenderMaterial* this_1 = this;
00449939      void* __offset(DBObj, 0x30) var_14 = esi;
00449939      
0044993d      if (*(int8_t*)((char*)ADJ(esi) + 0x30) == 0)
0044993d      {
00449949          char result = this->properties.vtable->CopyInto(((char*)arg2 + 0x38));
00449949          
0044994e          if (result == 0)
00449955              return result;
00449955          
00449958          this = this_1;
0044993d      }
0044993d      
0044995f      if (*(int8_t*)((char*)ADJ(esi) + 0x30) == 0)
0044995f      {
0044996e          SmartArray<PStringBase<char>,1>::operator=(((char*)arg2 + 0x84), &this->m_MaterialShaderConstantNames);
00449973          this = this_1;
0044995f      }
0044995f      
0044997e      int32_t i = 0;
0044997e      
00449983      if (this->m_MaterialShaderConstants.m_num > 0)
00449983      {
00449a2e          do
00449a2e          {
00449990              class MaterialShaderConstant* m_data = this->m_MaterialShaderConstants.m_data;
00449996              int32_t m_PropertyType = m_data[i].m_PropertyType;
004499a3              int32_t eax_5 = m_data[i].m_pPropertyValue->vtable->Copy();
004499b0              int32_t eax_7 = (*(int32_t*)((char*)arg2 + 0x94) & 0x7fffffff);
004499b7              uint8_t eax_12;
004499b7              
004499b7              if (*(int32_t*)((char*)arg2 + 0x98) >= eax_7)
004499b7              {
004499b9                  uint32_t edx_3 = (eax_7 + 1);
004499b9                  
004499bf                  if (edx_3 <= 8)
004499c1                      edx_3 = 8;
004499bf                  else if (edx_3 <= 0x4000)
004499ce                  {
004499ed                      int32_t eflags_1;
004499ed                      char eax_11;
004499ed                      eax_11 = __bsr_gprv_memv(edx_3);
004499f9                      int32_t edi_1 = (1 << eax_11);
004499f9                      
004499fd                      if (edx_3 > edi_1)
004499ff                          edx_3 = (edi_1 * 2);
004499ce                  }
004499ce                  else
004499ce                  {
004499d2                      int32_t eax_9 = (edx_3 & 0x3fff);
004499d2                      
004499d7                      if (eax_9 != 0)
004499e0                          edx_3 += (0x4000 - eax_9);
004499ce                  }
004499ce                  
00449a05                  eax_12 = SmartArray<VertexRange,1>::grow(&arg2[3], edx_3);
004499b7              }
004499b7              
00449a0c              if ((*(int32_t*)((char*)arg2 + 0x98) < eax_7 || eax_12 != 0))
00449a0c              {
00449a0e                  int32_t edx_4 = *(int32_t*)((char*)arg2 + 0x98);
00449a11                  int32_t eax_13 = *(int32_t*)((char*)arg2 + 0x90);
00449a17                  *(uint32_t*)(eax_13 + (edx_4 << 3)) = m_PropertyType;
00449a1a                  *(uint32_t*)((eax_13 + (edx_4 << 3)) + 4) = eax_5;
00449a1e                  *(int32_t*)((char*)arg2 + 0x98) += 1;
00449a0c              }
00449a0c              
00449a21              this = this_1;
00449a2b              i += 1;
00449a2e          } while (i < this->m_MaterialShaderConstants.m_num);
00449a2e          
00449a38          esi = var_14;
00449983      }
00449983      
00449a42      int32_t eax_15 = 0;
00449a46      int32_t var_10_2 = 0;
00449a46      
00449a4a      if (this->layers.m_num > 0)
00449a4a      {
00449af6          while (true)
00449af6          {
00449af6              class MaterialLayer* ecx_11 = this->layers.m_data[eax_15];
00449af6              
00449afb              if (ecx_11 == 0)
00449afb              {
00449ba5                  eax_15 = 0;
00449bab                  return 0;
00449afb              }
00449afb              
00449b06              class MaterialLayer* eax_20 = MaterialLayer::Copy(ecx_11, *(int8_t*)((char*)ADJ(esi) + 0x30));
00449b19              int32_t eax_22 = (*(int32_t*)((char*)arg2 + 0x7c) & 0x7fffffff);
00449b20              uint8_t eax_27;
00449b20              
00449b20              if (*(int32_t*)((char*)arg2 + 0x80) >= eax_22)
00449b20              {
00449b22                  uint32_t edx_10 = (eax_22 + 1);
00449b22                  
00449b28                  if (edx_10 <= 8)
00449b2a                      edx_10 = 8;
00449b28                  else if (edx_10 <= 0x4000)
00449b37                  {
00449b56                      int32_t eflags_2;
00449b56                      char eax_26;
00449b56                      eax_26 = __bsr_gprv_memv(edx_10);
00449b62                      int32_t edi_3 = (1 << eax_26);
00449b62                      
00449b66                      if (edx_10 > edi_3)
00449b68                          edx_10 = (edi_3 * 2);
00449b37                  }
00449b37                  else
00449b37                  {
00449b3b                      int32_t eax_24 = (edx_10 & 0x3fff);
00449b3b                      
00449b40                      if (eax_24 != 0)
00449b49                          edx_10 += (0x4000 - eax_24);
00449b37                  }
00449b37                  
00449b6e                  eax_27 = SmartArray<unsigned long,1>::grow(((char*)arg2 + 0x78), edx_10);
00449b20              }
00449b20              
00449b75              if ((*(int32_t*)((char*)arg2 + 0x80) < eax_22 || eax_27 != 0))
00449b75              {
00449b7c                  *(uint32_t*)(*(int32_t*)((char*)arg2 + 0x78) + (*(int32_t*)((char*)arg2 + 0x80) << 2)) = eax_20;
00449b7f                  *(int32_t*)((char*)arg2 + 0x80) += 1;
00449b75              }
00449b75              
00449b86              this = this_1;
00449b90              eax_15 = (var_10_2 + 1);
00449b93              var_10_2 = eax_15;
00449b93              
00449b97              if (eax_15 >= this->layers.m_num)
00449b97                  break;
00449b97              
00449aef              esi = var_14;
00449af6          }
00449a4a      }
00449a4a      
00449a50      this = this->m_IsOptimized;
00449a56      *(int32_t*)((char*)arg2 + 0x9c) = this;
00449a60      eax_15 = this_1->m_SupportsLighting;
00449a66      *(int32_t*)((char*)arg2 + 0x9d) = eax_15;
00449a70      class RenderMaterial* edx_6;
00449a70      edx_6 = this_1->m_SupportsMultiPassLighting;
00449a76      *(int32_t*)((char*)arg2 + 0x9e) = edx_6;
00449a80      class RenderMaterial* ecx_9;
00449a80      ecx_9 = this_1->m_SupportsCombinedAmbientPass;
00449a86      *(int32_t*)((char*)arg2 + 0x9f) = ecx_9;
00449a90      class RenderMaterial* eax_16;
00449a90      eax_16 = this_1->m_SupportsGlowing;
00449a96      *(int32_t*)((char*)arg2 + 0xa0) = eax_16;
00449aa0      class RenderMaterial* edx_7;
00449aa0      edx_7 = this_1->m_NeedsAlphaBlendPass;
00449aa6      *(int32_t*)((char*)arg2 + 0xa1) = edx_7;
00449ab0      class RenderMaterial* ecx_10;
00449ab0      ecx_10 = this_1->m_UsesVideoPost;
00449ab6      *(int32_t*)((char*)arg2 + 0xa2) = ecx_10;
00449ac6      *(int32_t*)((char*)arg2 + 0xa4) = this_1->m_Opacity;
00449ae1      __builtin_memcpy(((char*)arg2 + 0xa8), &this_1->m_LayerIndices, 0x438);
00449ae6      float eax_18;
00449ae6      eax_18 = 1;
00449aec      return 1;
00449920  }

00449bae                                            90 90                                                                ..

00449bb0  void __fastcall RenderMaterial::Destroy(class RenderMaterial* this)

00449bb0  {
00449bb4      RenderMaterial::End(this);
00449bbb      this->m_IsInstance = 0;
00449bbe      this->m_IsOptimized = 0;
00449bc4      this->m_SupportsLighting = 0;
00449bca      this->m_SupportsMultiPassLighting = 0;
00449bd0      this->m_SupportsCombinedAmbientPass = 0;
00449bd6      this->m_SupportsGlowing = 0;
00449bdc      this->m_NeedsAlphaBlendPass = 0;
00449be2      this->m_UsesVideoPost = 0;
00449bee      this->m_Opacity = 1f;
00449c00      __builtin_memset(&this->m_LayerIndices, 0xffffffff, 0x438);
00449bb0  }

00449c05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00449c10  void __thiscall RenderMaterial::Serialize(class RenderMaterial* this, class Archive* arg2)

00449c10  {
00449c10      class RenderMaterial* this_1 = this;
00449c14      class Archive* edi = arg2;
00449c1b      DBObj::Serialize(this, edi);
00449c20      this->properties.vtable->Serialize(edi);
00449c2a      uint32_t m_num = this->layers.m_num;
00449c34      arg2 = m_num;
00449c38      Archive::CheckAlignment(edi, 4);
00449c41      uint32_t* eax_1 = Archive::GetBytes(edi, 4);
00449c41      
00449c48      if (eax_1 != 0)
00449c48      {
00449c4e          if ((edi->m_flags & 1) == 0)
00449c56              arg2 = *(uint32_t*)eax_1;
00449c4e          else
00449c50              *(uint32_t*)eax_1 = m_num;
00449c48      }
00449c48      
00449c5e      int32_t eax_2 = 0;
00449c62      int32_t var_4 = 0;
00449c62      
00449c66      if (arg2 > 0)
00449c66      {
00449cf6          do
00449cf6          {
00449c78              class MaterialLayer* ebp_1;
00449c78              
00449c78              if ((!(edi->m_flags) & 1) == 0)
00449c9d                  ebp_1 = this->layers.m_data[eax_2];
00449c78              else
00449c78              {
00449c7f                  void* eax_3 = operator new(0xd8);
00449c7f                  
00449c89                  if (eax_3 == 0)
00449c96                      ebp_1 = nullptr;
00449c89                  else
00449c92                      ebp_1 = MaterialLayer::MaterialLayer(eax_3);
00449c78              }
00449c78              
00449ca3              MaterialLayer::Serialize(ebp_1, edi);
00449ca3              
00449cb0              if ((!(edi->m_flags) & 1) != 0)
00449cb0              {
00449cbe                  int32_t eax_6 = (this->layers.m_sizeAndDeallocate & 0x7fffffff);
00449cc5                  uint8_t eax_9;
00449cc5                  
00449cc5                  if (this->layers.m_num >= eax_6)
00449cd3                      eax_9 = SmartArray<unsigned long,1>::grow(&this->layers, SmartArray<unsigned long,1>::get_new_size(&this->layers, (eax_6 + 1)));
00449cd3                  
00449cda                  if ((this->layers.m_num < eax_6 || eax_9 != 0))
00449cda                  {
00449cbb                      this->layers.m_data[this->layers.m_num] = ebp_1;
00449cbb                      this->layers.m_num += 1;
00449cda                  }
00449cb0              }
00449cb0              
00449cef              eax_2 = (var_4 + 1);
00449cf2              var_4 = eax_2;
00449cf6          } while (eax_2 < arg2);
00449c66      }
00449c10  }

00449d04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00449d10  void __fastcall RenderMaterial::~RenderMaterial(class RenderMaterial* this)

00449d10  {
00449d13      this->vtable = 0x79b0b8;
00449d19      RenderMaterial::Destroy(this);
00449d19      
00449d2e      if ((this->m_MaterialShaderConstants.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00449d37          operator delete[](this->m_MaterialShaderConstants.m_data);
00449d37      
00449d51      if ((this->m_MaterialShaderConstantNames.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00449d51      {
00449d53          class PStringBase<char>* m_data = this->m_MaterialShaderConstantNames.m_data;
00449d53          
00449d5b          if (m_data != 0)
00449d5f              PStringBase<char>::`vector deleting destructor'(m_data, 3);
00449d51      }
00449d51      
00449d71      if ((this->layers.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00449d77          operator delete[](this->layers.m_data);
00449d77      
00449d82      MaterialModifier::~MaterialModifier(&this->properties);
00449d8a      /* tailcall */
00449d8a      return DBObj::~DBObj(this);
00449d10  }

00449d8f                                               90                                                                 .

00449d90  uint8_t __fastcall RenderMaterial::GetSubObjects(class RenderMaterial* this)

00449d90  {
00449d98      uint8_t result = 1;
00449d98      
00449da4      if (DBCache::IsRunTime() != 0)
00449da4      {
00449db0          void var_40;
00449db0          MaterialModifier::MaterialModifier(&var_40);
00449db9          this->properties.vtable->CopyInto(&var_40);
00449dc7          class RenderMaterial* this_1 = this;
00449dd1          int32_t i = 0;
00449dd1          
00449dd5          if (this_1->layers.m_num > 0)
00449dd5          {
00449e3e              do
00449e3e              {
00449dda                  char* esi_1 = this_1->layers.m_data[i];
00449dda                  
00449de0                  if ((*(uint8_t*)esi_1 & 1) == 0)
00449e37                      i += 1;
00449de0                  else
00449de0                  {
00449de4                      if (esi_1 != 0)
00449de4                      {
00449de8                          MaterialLayer::~MaterialLayer(esi_1);
00449dee                          operator delete(esi_1);
00449df3                          this_1 = this;
00449de4                      }
00449de4                      
00449dfa                      uint32_t m_num = this_1->layers.m_num;
00449dfa                      
00449e05                      if (i < m_num)
00449e05                      {
00449e0a                          class MaterialLayer** m_data_1 = this_1->layers.m_data;
00449e0c                          void* edi_1 = &m_data_1[i];
00449e0f                          void* ecx_6 = &m_data_1[(m_num - 1)];
00449e02                          this_1->layers.m_num = (m_num - 1);
00449e02                          
00449e17                          if (edi_1 < ecx_6)
00449e23                              __builtin_memcpy(edi_1, ((char*)edi_1 + 4), ((((((char*)ecx_6 - edi_1) - 1) >> 2) + 1) << 2));
00449e23                          
00449e02                          this_1->layers.m_data[this_1->layers.m_num] = 0;
00449e31                          this_1 = this;
00449e05                      }
00449de0                  }
00449e3e              } while (i < this_1->layers.m_num);
00449dd5          }
00449dd5          
00449e40          uint32_t m_num_2 = this_1->properties.properties.m_num;
00449e43          int32_t ecx_12 = 0;
00449e47          int32_t var_4c_1 = 0;
00449e47          
00449e4b          if (m_num_2 > 0)
00449e4b          {
00449e51              void* var_44;
00449e51              void* esi_3 = var_44;
00449e5a              int32_t var_48;
00449e5a              int32_t ebx_2 = var_48;
00449e5a              
0044a02e              do
0044a02e              {
00449e63                  void* ebp_1 = this_1->properties.properties.m_data[ecx_12];
00449e66                  ecx_12 = *(uint8_t*)((char*)ebp_1 + 0x18);
00449e66                  
00449e6b                  if (ecx_12 != 0)
00449e6b                  {
00449e71                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00449e76                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00449e7e                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00449e7e                      
00449e99                      if (EnumMapper::GetString(6, *(uint32_t*)((char*)ebp_1 + 4), &PStringBase<char>::s_NullBuffer_2) != 0)
00449e99                      {
00449eae                          SmartArray<PStringBase<char>,1>::AddToEnd(&this->m_MaterialShaderConstantNames, &PStringBase<char>::s_NullBuffer_2);
00449eb3                          int32_t eax_7 = *(uint32_t*)((char*)ebp_1 + 8);
00449eb3                          
00449ebb                          if (eax_7 == 0x3e8)
00449ebb                          {
00449f34                              ebx_2 = 0xb;
00449f3e                              esi_3 = operator new(0x34);
00449f3e                              
00449f45                              if (esi_3 == 0)
00449f67                                  esi_3 = nullptr;
00449f45                              else
00449f45                              {
00449f4c                                  *(uint32_t*)((char*)esi_3 + 4) = 1;
00449f53                                  *(uint32_t*)esi_3 = &WaveformPropertyValue::`vftable';
00449f59                                  Waveform::Waveform(((char*)esi_3 + 8));
00449f60                                  Waveform::SetDefaults(((char*)esi_3 + 8));
00449f45                              }
00449f45                              
00449f71                              *(uint32_t*)(*(uint32_t*)esi_3 + 0xbc)(*(uint32_t*)((char*)ebp_1 + 0x10));
00449ebb                          }
00449ebb                          else if (eax_7 == 0x7d0)
00449ec2                          {
00449eca                              ebx_2 = 6;
00449ecf                              void* eax_8 = operator new(0x18);
00449ecf                              
00449ed9                              if (eax_8 == 0)
00449ed9                              {
00449f23                                  esi_3 = nullptr;
00449f2a                                  *(uint32_t*)(*nullptr + 0x9c)(*(uint32_t*)((char*)ebp_1 + 0x10));
00449ed9                              }
00449ed9                              else
00449ed9                              {
00449edb                                  *(uint32_t*)((char*)eax_8 + 4) = 1;
00449ee2                                  *(uint32_t*)eax_8 = &ColorPropertyValue::`vftable';
00449ef1                                  *(uint32_t*)((char*)eax_8 + 8) = RGBAColor_Black.r;
00449ef9                                  *(uint32_t*)((char*)eax_8 + 0xc) = RGBAColor_Black.g;
00449f02                                  *(uint32_t*)((char*)eax_8 + 0x10) = RGBAColor_Black.b;
00449f0b                                  *(uint32_t*)((char*)eax_8 + 0x14) = RGBAColor_Black.a;
00449f11                                  esi_3 = eax_8;
00449f18                                  *(uint32_t*)(*(uint32_t*)esi_3 + 0x9c)(*(uint32_t*)((char*)ebp_1 + 0x10));
00449ed9                              }
00449ec2                          }
00449ec2                          
00449f8d                          int32_t eax_14 = (this->m_MaterialShaderConstants.m_sizeAndDeallocate & 0x7fffffff);
00449f94                          uint8_t eax_19;
00449f94                          
00449f94                          if (this->m_MaterialShaderConstants.m_num >= eax_14)
00449f94                          {
00449f96                              uint32_t edx_8 = (eax_14 + 1);
00449f96                              
00449f9c                              if (edx_8 <= 8)
00449f9e                                  edx_8 = 8;
00449f9c                              else if (edx_8 <= 0x4000)
00449fab                              {
00449fca                                  int32_t eflags_1;
00449fca                                  char eax_18;
00449fca                                  eax_18 = __bsr_gprv_memv(edx_8);
00449fd6                                  int32_t edi_3 = (1 << eax_18);
00449fd6                                  
00449fda                                  if (edx_8 > edi_3)
00449fdc                                      edx_8 = (edi_3 * 2);
00449fab                              }
00449fab                              else
00449fab                              {
00449faf                                  int32_t eax_16 = (edx_8 & 0x3fff);
00449faf                                  
00449fb4                                  if (eax_16 != 0)
00449fbd                                      edx_8 += (0x4000 - eax_16);
00449fab                              }
00449fab                              
00449fe2                              eax_19 = SmartArray<VertexRange,1>::grow(&this->m_MaterialShaderConstants, edx_8);
00449f94                          }
00449f94                          
00449fe9                          if ((this->m_MaterialShaderConstants.m_num < eax_14 || eax_19 != 0))
00449fe9                          {
00449feb                              uint32_t m_num_1 = this->m_MaterialShaderConstants.m_num;
00449fee                              class MaterialShaderConstant* m_data = this->m_MaterialShaderConstants.m_data;
00449ff1                              m_data[m_num_1].m_PropertyType = ebx_2;
00449ff4                              m_data[m_num_1].m_pPropertyValue = esi_3;
00449f87                              this->m_MaterialShaderConstants.m_num += 1;
00449fe9                          }
00449e99                      }
00449e99                      
00449fff                      void* __offset(PSRefBufferCharData<char>, -0x14) edi_5 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00449fff                      
0044a012                      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
0044a01a                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
0044a01a                      
0044a01c                      this_1 = this;
00449e6b                  }
00449e6b                  
0044a024                  m_num_2 = this_1->properties.properties.m_num;
0044a027                  ecx_12 = (var_4c_1 + 1);
0044a02a                  var_4c_1 = ecx_12;
0044a02e              } while (ecx_12 < m_num_2);
00449e4b          }
00449e4b          
0044a03b          int32_t i_1 = 0;
0044a03b          
0044a041          if (this_1->layers.m_num > 0)
0044a041          {
0044a06d              do
0044a06d              {
0044a046                  class MaterialLayer* ecx_32 = this_1->layers.m_data[i_1];
0044a046                  
0044a04b                  if (ecx_32 == 0)
0044a04b                  {
0044a0b0                      MaterialModifier::~MaterialModifier(&var_40);
0044a0b5                      int32_t eax_23;
0044a0b5                      eax_23 = 0;
0044a0bb                      return 0;
0044a04b                  }
0044a04b                  
0044a052                  class SmartArray<PStringBase<char>,1>* __saved_ebp_1 = &this_1->m_MaterialShaderConstantNames;
0044a053                  uint8_t result_1;
0044a053                  result_1 = MaterialLayer::GetSubObjects(ecx_32, m_num_2);
0044a053                  
0044a05a                  if (result_1 == 0)
0044a05c                      result = result_1;
0044a05c                  
0044a060                  this_1 = this;
0044a06a                  i_1 += 1;
0044a06d              } while (i_1 < this_1->layers.m_num);
0044a041          }
0044a041          
0044a072          int32_t i_2 = 0;
0044a072          
0044a076          if (this_1->properties.properties.m_num > 0)
0044a076          {
0044a08f              do
0044a08f              {
0044a07b                  class MaterialProperty* ecx_35 = this_1->properties.properties.m_data[i_2];
0044a080                  MaterialProperty::Apply(ecx_35, this_1, ecx_35);
0044a085                  this_1 = this;
0044a08c                  i_2 += 1;
0044a08f              } while (i_2 < this_1->properties.properties.m_num);
0044a076          }
0044a076          
0044a095          MaterialModifier::~MaterialModifier(&var_40);
00449da4      }
00449da4      
0044a09e      RenderMaterial::Optimize(this);
0044a0ab      return result;
00449d90  }

0044a0bc                                                                                      90 90 90 90                              ....

0044a0c0  uint8_t __thiscall RenderMaterial::CheckParseField(class RenderMaterial* this, class PStringBase<char> const* arg2, enum RMFieldType const arg3, enum RMDataType const arg4, uint32_t const arg5, uint32_t const arg6)

0044a0c0  {
0044a0c4      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0044a0c9      arg2 = m_charbuffer;
0044a0d1      void* __offset(PSRefBufferCharData<char>, -0x10) var_14 = &m_charbuffer[-1];
0044a0d4      InterlockedIncrement(var_14);
0044a0da      class PStringBase<char>* ecx = arg2;
0044a0de      int32_t m_charbuffer_1 = ecx->m_charbuffer;
0044a0de      
0044a0e3      if (m_charbuffer_1 != 0)
0044a0e3      {
0044a0e5          class PStringBase<char>* eax_1 = ((m_charbuffer_1 + ecx) - 1);
0044a0e5          
0044a0e9          if (m_charbuffer_1 > 0)
0044a0eb              eax_1 = ecx;
0044a0eb          
0044a0f0          if (eax_1->m_charbuffer == 0x24)
0044a0f0          {
0044a0f2              var_14 = ecx;
0044a0f9              PStringBase<char>::allocate_ref_buffer(&var_14, 1);
0044a100              *(int8_t*)((char*)ADJ(var_14) + -0x10) = 0x24;
0044a10d              *(int8_t*)((char*)ADJ(var_14) + -0xf) = 0;
0044a111              PStringBase<char>::trim(&arg2, 1, 0, var_14);
0044a119              int32_t i = 0;
0044a119              
0044a11d              if (this->properties.properties.m_num > 0)
0044a11d              {
0044a14b                  do
0044a14b                  {
0044a128                      int32_t* esi_1 = this->properties.properties.m_data[i];
0044a12d                      class PStringBase<char>* ecx_4 = arg2;
0044a131                      var_14 = *(uint32_t*)esi_1;
0044a131                      
0044a143                      if ((_stricmp(ecx_4, var_14) == 0 && arg4 == esi_1[2]))
0044a143                      {
0044a177                          var_14 = 0x10;
0044a179                          void* eax_8 = operator new(var_14);
0044a17e                          enum RMDataType edx_4 = arg4;
0044a186                          *(uint32_t*)eax_8 = arg3;
0044a18c                          *(uint32_t*)((char*)eax_8 + 4) = edx_4;
0044a193                          *(uint32_t*)((char*)eax_8 + 8) = arg5;
0044a199                          *(uint32_t*)((char*)eax_8 + 0xc) = arg6;
0044a19c                          arg4 = eax_8;
0044a1a3                          var_14 = esi_1[9];
0044a1ac                          SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&esi_1[7], &arg4, var_14);
0044a1b5                          void* __offset(PStringBase<char>, -0x14) esi_4 = &arg2[-5];
0044a1bb                          var_14 = ((char*)esi_4 + 4);
0044a1bb                          
0044a1c8                          if ((InterlockedDecrement(var_14) == 0 && esi_4 != 0))
0044a1c8                          {
0044a1ca                              class PStringBase<char> eax_11 = *(int32_t*)((char*)ADJ(esi_4) + -0x14);
0044a1cc                              var_14 = 1;
0044a1d0                              *(uint32_t*)eax_11(var_14);
0044a1c8                          }
0044a1c8                          
0044a1d5                          int32_t eax_10;
0044a1d5                          eax_10 = 1;
0044a1d8                          return 1;
0044a143                      }
0044a143                      
0044a148                      i += 1;
0044a14b                  } while (i < this->properties.properties.m_num);
0044a11d              }
0044a11d              
0044a14d              ecx = arg2;
0044a0f0          }
0044a0e3      }
0044a0e3      
0044a157      var_14 = &ecx[-4];
0044a157      
0044a164      if ((InterlockedDecrement(var_14) == 0 && ecx != 0x14))
0044a164      {
0044a166          class PStringBase<char> edx_3 = *(int32_t*)((char*)ecx + -0x14);
0044a168          var_14 = 1;
0044a16c          *(uint32_t*)edx_3(var_14);
0044a164      }
0044a164      
0044a16e      int32_t eax_7;
0044a16e      eax_7 = 0;
0044a174      return 0;
0044a0c0  }

0044a1db                                                                                   90 90 90 90 90                             .....

0044a1e0  void* __thiscall RenderMaterial::`scalar deleting destructor'(class RenderMaterial* this, uint32_t arg2)

0044a1e0  {
0044a1e3      RenderMaterial::~RenderMaterial(this);
0044a1e3      
0044a1ed      if ((arg2 & 1) != 0)
0044a1f0          operator delete(this);
0044a1f0      
0044a1fb      return this;
0044a1e0  }

0044a1fe                                                                                            90 90                                ..

0044a200  uint8_t __fastcall MaterialLayer::GetSubObjects(class MaterialLayer* this, class SmartArray<PStringBase<char>,1> const* arg2)

0044a200  {
0044a208      int32_t i = 0;
0044a20c      int32_t ebx;
0044a20c      ebx = 1;
0044a20c      
0044a20e      if (this->m_Stages.m_num > 0)
0044a20e      {
0044a227          do
0044a227          {
0044a21d              if (LayerStage::GetSubObjects(this->m_Stages.m_data[i]) == 0)
0044a21f                  ebx = 0;
0044a21f              
0044a224              i += 1;
0044a227          } while (i < this->m_Stages.m_num);
0044a20e      }
0044a20e      
0044a22b      uint32_t eax;
0044a22b      eax = ebx;
0044a22e      return eax;
0044a200  }

0044a231                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0044a240  uint8_t __fastcall MaterialLayer::ReleaseSubObjects(class MaterialLayer* this)

0044a240  {
0044a248      int32_t i = 0;
0044a24c      int32_t ebx;
0044a24c      ebx = 1;
0044a24c      
0044a24e      if (this->m_Stages.m_num > 0)
0044a24e      {
0044a267          do
0044a267          {
0044a25d              if (LayerStage::ReleaseSubObjects(this->m_Stages.m_data[i]) == 0)
0044a25f                  ebx = 0;
0044a25f              
0044a264              i += 1;
0044a267          } while (i < this->m_Stages.m_num);
0044a24e      }
0044a24e      
0044a26b      uint32_t eax;
0044a26b      eax = ebx;
0044a26e      return eax;
0044a240  }

0044a26f                                               90                                                                 .

0044a270  void __fastcall ShaderResourceType::ShaderResourceType(struct ShaderResourceType* this)

0044a270  {
0044a270      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044a285      this->VertexShaderFunctionName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0044a288      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0044a28a      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0044a296      this->PixelShaderFunctionName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0044a299      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0044a29e      SmartBuffer::SmartBuffer(&this->BinaryVertexShaderData);
0044a2a6      SmartBuffer::SmartBuffer(&this->BinaryPixelShaderData);
0044a270  }


0044a2b0  void __fastcall ShaderResourceType::~ShaderResourceType(struct ShaderResourceType* this)

0044a2b0  {
0044a2b8      SmartBuffer::~SmartBuffer(&this->BinaryPixelShaderData);
0044a2c0      SmartBuffer::~SmartBuffer(&this->BinaryVertexShaderData);
0044a2ce      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->PixelShaderFunctionName.m_charbuffer - 0x14);
0044a2ce      
0044a2dd      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0044a2e5          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0044a2e5      
0044a2ea      void* __offset(PSRefBufferCharData<char>, -0x14) edi_2 = (this->VertexShaderFunctionName.m_charbuffer - 0x14);
0044a2ea      
0044a2f9      if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0044a301          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0044a2b0  }

0044a307                       90 90 90 90 90 90 90 90 90                                                         .........

0044a310  struct ShaderResourceType& __thiscall ShaderResourceType::operator=(struct ShaderResourceType* this, struct ShaderResourceType const& arg2)

0044a310  {
0044a320      enum ShaderVersionType* result = this;
0044a322      *(uint32_t*)result = arg2->Version;
0044a324      void* eax_1 = result[1];
0044a324      
0044a32a      if (eax_1 != arg2->VertexShaderFunctionName.m_charbuffer)
0044a32a      {
0044a33b          if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
0044a343              **(uint32_t**)((char*)eax_1 - 0x14)(1);
0044a343          
0044a345          class PSRefBufferCharData<char>* m_charbuffer = arg2->VertexShaderFunctionName.m_charbuffer;
0044a348          result[1] = m_charbuffer;
0044a34f          InterlockedIncrement(&m_charbuffer[-1]);
0044a32a      }
0044a32a      
0044a355      void* eax_4 = result[2];
0044a355      
0044a35b      if (eax_4 != arg2->PixelShaderFunctionName.m_charbuffer)
0044a35b      {
0044a36c          if ((InterlockedDecrement(((char*)eax_4 - 0x10)) == 0 && eax_4 != 0x14))
0044a374              **(uint32_t**)((char*)eax_4 - 0x14)(1);
0044a374          
0044a376          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->PixelShaderFunctionName.m_charbuffer;
0044a379          result[2] = m_charbuffer_1;
0044a380          InterlockedIncrement(&m_charbuffer_1[-1]);
0044a35b      }
0044a35b      
0044a38d      SmartBuffer::operator=(&result[3], &arg2->BinaryVertexShaderData);
0044a399      SmartBuffer::operator=(&result[6], &arg2->BinaryPixelShaderData);
0044a3a4      return result;
0044a310  }

0044a3a7                       90 90 90 90 90 90 90 90 90                                                         .........

0044a3b0  void __fastcall MaterialLayer::End(class MaterialLayer* this)

0044a3b0  {
0044a3ba      int32_t i = 0;
0044a3ba      
0044a3be      if (this->m_Stages.m_num > 0)
0044a3be      {
0044a3d1          do
0044a3d1          {
0044a3c6              LayerStage::ReleaseSubObjects(this->m_Stages.m_data[i]);
0044a3ce              i += 1;
0044a3d1          } while (i < this->m_Stages.m_num);
0044a3be      }
0044a3be      
0044a3d6      int32_t i_1 = 0;
0044a3d6      
0044a3da      if (this->m_Stages.m_num > 0)
0044a3da      {
0044a406          do
0044a406          {
0044a3e3              class LayerStage* ebx_1 = this->m_Stages.m_data[i_1];
0044a3e3              
0044a3e8              if (ebx_1 != 0)
0044a3e8              {
0044a3ec                  LayerStage::~LayerStage(ebx_1);
0044a3f2                  operator delete(ebx_1);
0044a3e8              }
0044a3e8              
0044a3fa              this->m_Stages.m_data[i_1] = 0;
0044a403              i_1 += 1;
0044a406          } while (i_1 < this->m_Stages.m_num);
0044a3da      }
0044a3da      
0044a409      uint32_t m_sizeAndDeallocate = this->m_Stages.m_sizeAndDeallocate;
0044a41a      this->m_Stages.m_num = 0;
0044a41a      
0044a41d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044a41d      {
0044a423          operator delete[](this->m_Stages.m_data);
0044a42b          this->m_Stages.m_data = 0;
0044a42e          this->m_Stages.m_sizeAndDeallocate = 0;
0044a41d      }
0044a41d      else if (this->m_Stages.m_data != 0)
0044a436      {
0044a438          int32_t eax_5 = (m_sizeAndDeallocate & 0x7fffffff);
0044a43d          int32_t eax_6 = (eax_5 - 1);
0044a43d          
0044a43e          if ((eax_5 - 1) >= 0)
0044a43e          {
0044a448              int32_t temp1_1;
0044a448              
0044a448              do
0044a448              {
0044a440                  temp1_1 = eax_6;
0044a440                  eax_6 -= 1;
0044a441                  this->m_Stages.m_data[(eax_6 + 1)] = 0;
0044a448              } while ((temp1_1 - 1) >= 0);
0044a43e          }
0044a436      }
0044a436      
0044a44d      int32_t i_2 = 0;
0044a44d      
0044a451      if (this->m_FFModifiers.m_num > 0)
0044a451      {
0044a46e          do
0044a46e          {
0044a45a              operator delete(this->m_FFModifiers.m_data[i_2]);
0044a45f              this->m_FFModifiers.m_data[i_2] = 0;
0044a46b              i_2 += 1;
0044a46e          } while (i_2 < this->m_FFModifiers.m_num);
0044a451      }
0044a451      
0044a470      uint32_t m_sizeAndDeallocate_1 = this->m_FFModifiers.m_sizeAndDeallocate;
0044a481      this->m_FFModifiers.m_num = 0;
0044a481      
0044a484      if ((m_sizeAndDeallocate_1 & 0x80000000) == 0x80000000)
0044a484      {
0044a48a          operator delete[](this->m_FFModifiers.m_data);
0044a493          this->m_FFModifiers.m_data = 0;
0044a496          this->m_FFModifiers.m_sizeAndDeallocate = 0;
0044a49b          return;
0044a484      }
0044a484      
0044a49f      if (this->m_FFModifiers.m_data != 0)
0044a49f      {
0044a4a1          int32_t eax_11 = (m_sizeAndDeallocate_1 & 0x7fffffff);
0044a4a6          int32_t eax_12 = (eax_11 - 1);
0044a4a6          
0044a4a7          if ((eax_11 - 1) >= 0)
0044a4a7          {
0044a4b8              int32_t temp3_1;
0044a4b8              
0044a4b8              do
0044a4b8              {
0044a4b0                  temp3_1 = eax_12;
0044a4b0                  eax_12 -= 1;
0044a4b1                  this->m_FFModifiers.m_data[(eax_12 + 1)] = 0;
0044a4b8              } while ((temp3_1 - 1) >= 0);
0044a4a7          }
0044a49f      }
0044a3b0  }

0044a4be                                                                                            90 90                                ..

0044a4c0  void* __thiscall ShaderResourceType::`vector deleting destructor'(struct ShaderResourceType* this, uint32_t arg2)

0044a4c0  {
0044a4c0      struct ShaderResourceType* var_4 = this;
0044a4c0      
0044a4c9      if ((arg2 & 2) == 0)
0044a4c9      {
0044a55c          ShaderResourceType::~ShaderResourceType(this);
0044a55c          
0044a566          if ((arg2 & 1) != 0)
0044a569              operator delete(this);
0044a569          
0044a575          return this;
0044a4c9      }
0044a4c9      
0044a4cf      int32_t Version = this->Version;
0044a4cf      
0044a4dd      if ((Version - 1) >= 0)
0044a4dd      {
0044a4e8          void* edi_1 = &this[Version].BinaryVertexShaderData;
0044a4eb          var_4 = Version;
0044a53e          struct ShaderResourceType* i;
0044a53e          
0044a53e          do
0044a53e          {
0044a4f0              edi_1 -= 0x24;
0044a4f6              SmartBuffer::~SmartBuffer(((char*)edi_1 + 0xc));
0044a4fd              SmartBuffer::~SmartBuffer(edi_1);
0044a505              int32_t* esi_2 = (*(uint32_t*)((char*)edi_1 - 4) - 0x14);
0044a505              
0044a514              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0044a51c                  **(uint32_t**)esi_2(1);
0044a51c              
0044a521              int32_t* esi_4 = (*(uint32_t*)((char*)edi_1 - 8) - 0x14);
0044a521              
0044a530              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0044a538                  **(uint32_t**)esi_4(1);
0044a538              
0044a53a              i = var_4;
0044a53a              var_4 -= 1;
0044a53e          } while (i != 1);
0044a4dd      }
0044a4dd      
0044a547      if ((arg2 & 1) != 0)
0044a54a          operator delete[](((char*)this - 4));
0044a54a      
0044a557      return ((char*)this - 4);
0044a4c0  }

0044a578                                                                          90 90 90 90 90 90 90 90                          ........

0044a580  void __fastcall SmartArray<ShaderResourceType,1>::Reset(class SmartArray<ShaderResourceType,1>* this)

0044a580  {
0044a587      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0044a59a      this->m_num = 0;
0044a59a      
0044a59d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044a59d      {
0044a59f          struct ShaderResourceType* m_data = this->m_data;
0044a59f          
0044a5a3          if (m_data != 0)
0044a5a7              ShaderResourceType::`vector deleting destructor'(m_data, 3);
0044a5a7          
0044a5ac          this->m_data = 0;
0044a5ae          this->m_sizeAndDeallocate = 0;
0044a5b6          return;
0044a59d      }
0044a59d      
0044a5b9      if (this->m_data != 0)
0044a5b9      {
0044a5bb          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
0044a5bb          
0044a5c1          if ((i_2 - 1) >= 0)
0044a5c1          {
0044a5ce              int32_t esi_2 = ((i_2 - 1) * 0x24);
0044a5d1              int32_t i_1 = i_2;
0044a61f              int32_t i;
0044a61f              
0044a61f              do
0044a61f              {
0044a5d4                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044a5d9                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
0044a5e1                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0044a5e3                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0044a5e8                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0044a5f0                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0044a5f6                  void var_18;
0044a5f6                  SmartBuffer::SmartBuffer(&var_18);
0044a5ff                  void var_c;
0044a5ff                  SmartBuffer::SmartBuffer(&var_c);
0044a60d                  void var_24;
0044a60d                  ShaderResourceType::operator=((this->m_data + esi_2), &var_24);
0044a616                  ShaderResourceType::~ShaderResourceType(&var_24);
0044a61b                  esi_2 -= 0x24;
0044a61e                  i = i_1;
0044a61e                  i_1 -= 1;
0044a61f              } while (i != 1);
0044a5c1          }
0044a5b9      }
0044a580  }

0044a629                             90 90 90 90 90 90 90                                                           .......

0044a630  uint8_t __thiscall SmartArray<LayerModifier *,1>::InsertOrderedByIndex(class SmartArray<LayerModifier *,1>* this, class LayerModifier** arg2, uint32_t arg3)

0044a630  {
0044a633      uint32_t m_num = this->m_num;
0044a633      
0044a63d      if (arg3 <= m_num)
0044a63d      {
0044a642          int32_t eax_2 = (this->m_sizeAndDeallocate & 0x7fffffff);
0044a649          uint8_t eax;
0044a649          
0044a649          if (m_num >= eax_2)
0044a657              eax = SmartArray<unsigned long,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_2 + 1)));
0044a657          
0044a65e          if ((m_num < eax_2 || eax != 0))
0044a65e          {
0044a660              uint32_t m_num_1 = this->m_num;
0044a660              
0044a665              if (m_num_1 > 0)
0044a665              {
0044a667                  class LayerModifier** m_data = this->m_data;
0044a667                  
0044a672                  for (void* i = &m_data[(m_num_1 - 1)]; i >= &m_data[arg3]; i -= 4)
0044a676                      *(uint32_t*)((char*)i + 4) = *(uint32_t*)i;
0044a665              }
0044a665              
0044a680              this->m_data[arg3] = *(uint32_t*)arg2;
0044a68b              this->m_num += 1;
0044a68f              class LayerModifier** eax_5;
0044a68f              eax_5 = 1;
0044a692              return 1;
0044a65e          }
0044a63d      }
0044a63d      
0044a699      return 0;
0044a630  }

0044a69c                                                                                      90 90 90 90                              ....

0044a6a0  uint8_t __thiscall SmartArray<ShaderResourceType,1>::grow(class SmartArray<ShaderResourceType,1>* this, uint32_t arg2)

0044a6a0  {
0044a6a2      uint32_t ebp = arg2;
0044a6ac      uint32_t* eax;
0044a6ac      
0044a6ac      if (ebp >= this->m_num)
0044a6ac      {
0044a6bc          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044a6bc          {
0044a767              eax = 1;
0044a76a              return 1;
0044a6bc          }
0044a6bc          
0044a6c4          if (ebp == 0)
0044a6c4          {
0044a6c6              SmartArray<ShaderResourceType,1>::Reset(this);
0044a6cd              int32_t eax_2;
0044a6cd              eax_2 = 1;
0044a6d0              return 1;
0044a6c4          }
0044a6c4          
0044a6df          eax = operator new[](((ebp * 0x24) + 4));
0044a6df          
0044a6e9          if (eax != 0)
0044a6e9          {
0044a6f5              void* ebx_1 = &eax[1];
0044a6fb              *(uint32_t*)eax = ebp;
0044a6fd              int32_t ecx_1;
0044a6fd              eax = `vector constructor iterator'(ebx_1, 0x24, ebp, ShaderResourceType::ShaderResourceType);
0044a6fd              
0044a704              if (ebx_1 != 0)
0044a704              {
0044a709                  if (this->m_data != 0)
0044a709                  {
0044a70b                      uint32_t m_num = this->m_num;
0044a70b                      
0044a70f                      if ((m_num - 1) >= 0)
0044a70f                      {
0044a715                          void* esi_2 = ((m_num - 1) * 0x24);
0044a719                          arg2 = m_num;
0044a739                          bool cond:0_1;
0044a739                          
0044a739                          do
0044a739                          {
0044a728                              ShaderResourceType::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
0044a731                              esi_2 -= 0x24;
0044a734                              cond:0_1 = arg2 != 1;
0044a735                              arg2 -= 1;
0044a739                          } while (cond:0_1);
0044a70f                      }
0044a70f                      
0044a74b                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044a74b                      {
0044a74d                          struct ShaderResourceType* m_data = this->m_data;
0044a74d                          
0044a751                          if (m_data != 0)
0044a755                              ShaderResourceType::`vector deleting destructor'(m_data, 3);
0044a74b                      }
0044a709                  }
0044a709                  
0044a760                  this->m_data = ebx_1;
0044a762                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
0044a767                  eax = 1;
0044a76a                  return 1;
0044a704              }
0044a6e9          }
0044a6ac      }
0044a6ac      
0044a76f      eax = 0;
0044a772      return 0;
0044a6a0  }

0044a775                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0044a780  void __fastcall MaterialLayer::~MaterialLayer(class MaterialLayer* this)

0044a780  {
0044a783      MaterialLayer::End(this);
0044a783      
0044a795      if ((this->m_FFModifiers.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044a79b          operator delete[](this->m_FFModifiers.m_data);
0044a79b      
0044a7b2      if ((this->m_Stages.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044a7b8          operator delete[](this->m_Stages.m_data);
0044a7b8      
0044a7cf      if ((this->m_ShaderResources.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044a7cf      {
0044a7d1          struct ShaderResourceType* m_data = this->m_ShaderResources.m_data;
0044a7d1          
0044a7d6          if (m_data != 0)
0044a7da              ShaderResourceType::`vector deleting destructor'(m_data, 3);
0044a7cf      }
0044a780  }

0044a7e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0044a7f0  void __fastcall MaterialLayer::Begin(class MaterialLayer* this)

0044a7f0  {
0044a7fc      this->m_Options = 0;
0044a7fe      this->m_TrueFlags = 0;
0044a801      this->m_FalseFlags = 0;
0044a804      this->m_RenderPass = RenderPass_Default;
0044a807      SmartArray<ShaderResourceType,1>::Reset(&this->m_ShaderResources);
0044a816      __builtin_memcpy(&this->m_SourceBlend, "\x02\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x01", 0x11);
0044a819      this->m_CullMode = CULLMODE_CW;
0044a835      this->m_AlphaTest = 0;
0044a838      void var_2c;
0044a838      int32_t* eax = Waveform::Waveform(&var_2c, 0.899999976f);
0044a83f      this->m_AlphaTestRef.type = *(uint32_t*)eax;
0044a845      this->m_AlphaTestRef.base = eax[1];
0044a84b      this->m_AlphaTestRef.base_vel = eax[2];
0044a851      this->m_AlphaTestRef.amplitude = eax[3];
0044a857      this->m_AlphaTestRef.amplitude_vel = eax[4];
0044a85d      this->m_AlphaTestRef.phase = eax[5];
0044a863      this->m_AlphaTestRef.phase_vel = eax[6];
0044a869      this->m_AlphaTestRef.frequency = eax[7];
0044a86f      this->m_AlphaTestRef.frequency_vel = eax[8];
0044a875      this->m_AlphaTestRef.roughness = eax[9];
0044a87b      this->m_AlphaTestRef.roughness_vel = eax[0xa];
0044a884      this->m_cDiffuse.r = RGBAColor_White.r;
0044a884      this->m_cDiffuse.g = RGBAColor_White.g;
0044a884      this->m_cDiffuse.b = RGBAColor_White.b;
0044a884      this->m_cDiffuse.a = RGBAColor_White.a;
0044a8a8      this->m_cSpecular.r = RGBAColor_White.r;
0044a8a8      this->m_cSpecular.g = RGBAColor_White.g;
0044a8a8      this->m_cSpecular.b = RGBAColor_White.b;
0044a8c6      this->m_wSpecularPower.base = 0f;
0044a8a8      this->m_cSpecular.a = RGBAColor_White.a;
0044a8d5      this->m_cDye.r = RGBAColor_White.r;
0044a8d5      this->m_cDye.g = RGBAColor_White.g;
0044a8d5      this->m_cDye.b = RGBAColor_White.b;
0044a8d5      this->m_cDye.a = RGBAColor_White.a;
0044a7f0  }

0044a8fd                                                                                         90 90 90                               ...

0044a900  void __fastcall MaterialLayer::MaterialLayer(class MaterialLayer* this)

0044a900  {
0044a905      __builtin_memset(&this->m_ShaderResources, 0, 0x24);
0044a923      Waveform::Waveform(&this->m_AlphaTestRef);
0044a92e      Waveform::Waveform(&this->m_wSpecularPower);
0044a935      MaterialLayer::Begin(this);
0044a900  }

0044a93e                                                                                            90 90                                ..

0044a940  uint8_t __thiscall MaterialLayer::CopyInto(class MaterialLayer const* this, uint8_t const arg2, class MaterialLayer* arg3)

0044a940  {
0044a94e      uint32_t m_num_3;
0044a94e      uint32_t m_num_4 = m_num_3;
0044a94f      MaterialLayer::End(arg3);
0044a95e      *(uint32_t*)arg3 = this->m_Options;
0044a96b      arg3->m_TrueFlags = this->m_TrueFlags;
0044a979      arg3->m_FalseFlags = this->m_FalseFlags;
0044a987      arg3->m_RenderPass = this->m_RenderPass;
0044a991      SmartArray<ShaderResourceType,1>::Reset(&arg3->m_ShaderResources);
0044a99c      class LayerStage* var_20;
0044a99c      
0044a99c      if (arg2 == 0)
0044a99c      {
0044a9a9          int32_t* esi_1 = nullptr;
0044a9ab          bool cond:0_1 = this->m_ShaderResources.m_num <= 0;
0044a9ad          var_20 = nullptr;
0044a9ad          
0044a9b1          if (!(cond:0_1))
0044a9b1          {
0044ab0d              bool cond:5_1;
0044ab0d              
0044ab0d              do
0044ab0d              {
0044a9cd                  int32_t eax_7 = (arg3->m_ShaderResources.m_sizeAndDeallocate & 0x7fffffff);
0044a9cd                  
0044a9d4                  if (arg3->m_ShaderResources.m_num < eax_7)
0044a9ca                      arg3->m_ShaderResources.m_num += 1;
0044a9d4                  else if (SmartArray<ShaderResourceType,1>::grow(&arg3->m_ShaderResources, SmartArray<unsigned long,1>::get_new_size(&arg3->m_ShaderResources, (eax_7 + 1))) != 0)
0044a9ca                      arg3->m_ShaderResources.m_num += 1;
0044a9ca                  
0044a9ff                  *(uint32_t*)((char*)esi_1 + arg3->m_ShaderResources.m_data) = *(uint32_t*)((char*)esi_1 + this->m_ShaderResources.m_data);
0044aa10                  void* edi_2 = (&this->m_ShaderResources.m_data->VertexShaderFunctionName + esi_1);
0044aa16                  void* ebp_1 = (&arg3->m_ShaderResources.m_data->VertexShaderFunctionName + esi_1);
0044aa1a                  void* eax_14 = *(uint32_t*)ebp_1;
0044aa1a                  
0044aa1f                  if (eax_14 != *(uint32_t*)edi_2)
0044aa1f                  {
0044aa34                      if ((InterlockedDecrement(((char*)eax_14 - 0x10)) == 0 && eax_14 != 0x14))
0044aa3c                          **(uint32_t**)((char*)eax_14 - 0x14)(1);
0044aa3c                      
0044aa3e                      int32_t eax_16 = *(uint32_t*)edi_2;
0044aa40                      *(uint32_t*)ebp_1 = eax_16;
0044aa47                      InterlockedIncrement((eax_16 - 0x10));
0044aa1f                  }
0044aa1f                  
0044aa5b                  void* edi_3 = (&this->m_ShaderResources.m_data->PixelShaderFunctionName + esi_1);
0044aa61                  void* ebp_2 = (&arg3->m_ShaderResources.m_data->PixelShaderFunctionName + esi_1);
0044aa65                  void* eax_20 = *(uint32_t*)ebp_2;
0044aa65                  
0044aa6a                  if (eax_20 != *(uint32_t*)edi_3)
0044aa6a                  {
0044aa7f                      if ((InterlockedDecrement(((char*)eax_20 - 0x10)) == 0 && eax_20 != 0x14))
0044aa87                          **(uint32_t**)((char*)eax_20 - 0x14)(1);
0044aa87                      
0044aa89                      int32_t eax_22 = *(uint32_t*)edi_3;
0044aa8b                      *(uint32_t*)ebp_2 = eax_22;
0044aa92                      InterlockedIncrement((eax_22 - 0x10));
0044aa6a                  }
0044aa6a                  
0044aaba                  void __return;
0044aaba                  SmartBuffer::operator=((&arg3->m_ShaderResources.m_data->BinaryVertexShaderData + esi_1), SmartBuffer::Clone((&this->m_ShaderResources.m_data->BinaryVertexShaderData + esi_1), &__return));
0044aac3                  SmartBuffer::~SmartBuffer(&__return);
0044aaea                  void __return_1;
0044aaea                  SmartBuffer::operator=((&arg3->m_ShaderResources.m_data->BinaryPixelShaderData + esi_1), SmartBuffer::Clone((&this->m_ShaderResources.m_data->BinaryPixelShaderData + esi_1), &__return_1));
0044aaf3                  SmartBuffer::~SmartBuffer(&__return_1);
0044ab04                  esi_1 = &esi_1[9];
0044ab07                  cond:5_1 = (&var_20->m_SamplerName.m_charbuffer + 1) < this->m_ShaderResources.m_num;
0044ab09                  var_20 = (&var_20->m_SamplerName.m_charbuffer + 1);
0044ab0d              } while (cond:5_1);
0044a9b1          }
0044a99c      }
0044a99c      
0044ab1e      arg3->m_SourceBlend = this->m_SourceBlend;
0044ab2c      arg3->m_DestBlend = this->m_DestBlend;
0044ab3a      arg3->m_BlendOp = this->m_BlendOp;
0044ab48      arg3->m_DepthTest = this->m_DepthTest;
0044ab4f      enum DepthTestMode ecx_33;
0044ab4f      ecx_33 = this->m_DepthWrite;
0044ab56      arg3->m_DepthWrite = ecx_33;
0044ab64      arg3->m_CullMode = this->m_CullMode;
0044ab6b      enum CullModeType ecx_34;
0044ab6b      ecx_34 = this->m_AlphaTest;
0044ab72      arg3->m_AlphaTest = ecx_34;
0044ab80      arg3->m_AlphaTestRef.type = this->m_AlphaTestRef.type;
0044ab86      arg3->m_AlphaTestRef.base = this->m_AlphaTestRef.base;
0044ab8c      arg3->m_AlphaTestRef.base_vel = this->m_AlphaTestRef.base_vel;
0044ab95      arg3->m_AlphaTestRef.amplitude = this->m_AlphaTestRef.amplitude;
0044ab95      arg3->m_AlphaTestRef.amplitude_vel = this->m_AlphaTestRef.amplitude_vel;
0044ab95      arg3->m_AlphaTestRef.phase = this->m_AlphaTestRef.phase;
0044ab95      arg3->m_AlphaTestRef.phase_vel = this->m_AlphaTestRef.phase_vel;
0044ab95      arg3->m_AlphaTestRef.frequency = this->m_AlphaTestRef.frequency;
0044ab95      arg3->m_AlphaTestRef.frequency_vel = this->m_AlphaTestRef.frequency_vel;
0044ab95      arg3->m_AlphaTestRef.roughness = this->m_AlphaTestRef.roughness;
0044ab95      arg3->m_AlphaTestRef.roughness_vel = this->m_AlphaTestRef.roughness_vel;
0044abd2      arg3->m_cDiffuse.r = this->m_cDiffuse.r;
0044abd2      arg3->m_cDiffuse.g = this->m_cDiffuse.g;
0044abd2      arg3->m_cDiffuse.b = this->m_cDiffuse.b;
0044abd2      arg3->m_cDiffuse.a = this->m_cDiffuse.a;
0044abf9      arg3->m_cSpecular.r = this->m_cSpecular.r;
0044abf9      arg3->m_cSpecular.g = this->m_cSpecular.g;
0044abf9      arg3->m_cSpecular.b = this->m_cSpecular.b;
0044abf9      arg3->m_cSpecular.a = this->m_cSpecular.a;
0044ac21      arg3->m_wSpecularPower.type = this->m_wSpecularPower.type;
0044ac2a      arg3->m_wSpecularPower.base = this->m_wSpecularPower.base;
0044ac2a      arg3->m_wSpecularPower.base_vel = this->m_wSpecularPower.base_vel;
0044ac2a      arg3->m_wSpecularPower.amplitude = this->m_wSpecularPower.amplitude;
0044ac2a      arg3->m_wSpecularPower.amplitude_vel = this->m_wSpecularPower.amplitude_vel;
0044ac2a      arg3->m_wSpecularPower.phase = this->m_wSpecularPower.phase;
0044ac2a      arg3->m_wSpecularPower.phase_vel = this->m_wSpecularPower.phase_vel;
0044ac2a      arg3->m_wSpecularPower.frequency = this->m_wSpecularPower.frequency;
0044ac2a      arg3->m_wSpecularPower.frequency_vel = this->m_wSpecularPower.frequency_vel;
0044ac2a      arg3->m_wSpecularPower.roughness = this->m_wSpecularPower.roughness;
0044ac2a      arg3->m_wSpecularPower.roughness_vel = this->m_wSpecularPower.roughness_vel;
0044ac79      arg3->m_cDye.r = this->m_cDye.r;
0044ac79      arg3->m_cDye.g = this->m_cDye.g;
0044ac79      arg3->m_cDye.b = this->m_cDye.b;
0044ac79      arg3->m_cDye.a = this->m_cDye.a;
0044ac9a      SmartArray<unsigned long,1>::Reset(&arg3->m_Stages);
0044ac9f      class MaterialLayer* this_1 = this;
0044aca8      int32_t i = 0;
0044aca8      
0044acac      if (this_1->m_Stages.m_num > 0)
0044acac      {
0044ace7          do
0044ace7          {
0044acb8              m_num_3 = arg3->m_Stages.m_num;
0044accb              var_20 = LayerStage::Copy(this_1->m_Stages.m_data[i], arg2);
0044acd8              SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&arg3->m_Stages, &var_20, m_num_3);
0044acdd              this_1 = this;
0044ace4              i += 1;
0044ace7          } while (i < this_1->m_Stages.m_num);
0044acac      }
0044acac      
0044aced      uint32_t m_sizeAndDeallocate = arg3->m_FFModifiers.m_sizeAndDeallocate;
0044acf0      arg3->m_FFModifiers.m_num = 0;
0044acf0      
0044ad04      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044ad04      {
0044ad09          operator delete[](arg3->m_FFModifiers.m_data);
0044acf0          arg3->m_FFModifiers.m_data = 0;
0044acf0          arg3->m_FFModifiers.m_sizeAndDeallocate = 0;
0044ad04      }
0044ad04      else if (arg3->m_FFModifiers.m_data != 0)
0044ad1a      {
0044ad1c          int32_t eax_53 = (m_sizeAndDeallocate & 0x7fffffff);
0044ad21          int32_t eax_54 = (eax_53 - 1);
0044ad21          
0044ad22          if ((eax_53 - 1) >= 0)
0044ad22          {
0044ad2b              int32_t temp2_1;
0044ad2b              
0044ad2b              do
0044ad2b              {
0044ad24                  temp2_1 = eax_54;
0044ad24                  eax_54 -= 1;
0044acf0                  arg3->m_FFModifiers.m_data[(eax_54 + 1)] = 0;
0044ad2b              } while ((temp2_1 - 1) >= 0);
0044ad22          }
0044ad1a      }
0044ad1a      
0044ad2d      class MaterialLayer* this_2 = this;
0044ad34      void* __offset(LayerStage, 0x1) ecx_59 = nullptr;
0044ad36      bool cond:2 = this_2->m_FFModifiers.m_num <= 0;
0044ad38      var_20 = nullptr;
0044ad38      
0044ad3c      if (!(cond:2))
0044ad3c      {
0044ae06          bool cond:4_1;
0044ae06          
0044ae06          do
0044ae06          {
0044ad4e              uint32_t m_num_2 = arg3->m_FFModifiers.m_num;
0044ad51              int32_t eax_56 = this_2->m_FFModifiers.m_data[ecx_59]->vtable->Copy();
0044ad5d              uint32_t m_num = arg3->m_FFModifiers.m_num;
0044ad5d              
0044ad62              if (m_num_2 <= m_num)
0044ad62              {
0044ad6b                  int32_t ecx_62 = (arg3->m_FFModifiers.m_sizeAndDeallocate & 0x7fffffff);
0044ad73                  uint8_t eax_61;
0044ad73                  
0044ad73                  if (m_num >= ecx_62)
0044ad73                  {
0044ad75                      uint32_t edx_52 = (ecx_62 + 1);
0044ad75                      
0044ad7b                      if (edx_52 <= 8)
0044ad7d                          edx_52 = 8;
0044ad7b                      else if (edx_52 <= 0x4000)
0044ad8a                      {
0044ada9                          int32_t eflags_1;
0044ada9                          char eax_60;
0044ada9                          eax_60 = __bsr_gprv_memv(edx_52);
0044adb5                          m_num_3 = (1 << eax_60);
0044adb5                          
0044adb9                          if (edx_52 > m_num_3)
0044adbb                              edx_52 = (m_num_3 * 2);
0044ad8a                      }
0044ad8a                      else
0044ad8a                      {
0044ad8e                          int32_t eax_58 = (edx_52 & 0x3fff);
0044ad8e                          
0044ad93                          if (eax_58 != 0)
0044ad9c                              edx_52 += (0x4000 - eax_58);
0044ad8a                      }
0044ad8a                      
0044adc1                      eax_61 = SmartArray<unsigned long,1>::grow(&arg3->m_FFModifiers.m_data, edx_52);
0044ad73                  }
0044ad73                  
0044adc8                  if ((m_num < ecx_62 || eax_61 != 0))
0044adc8                  {
0044adca                      uint32_t m_num_1 = arg3->m_FFModifiers.m_num;
0044adca                      
0044adcf                      if (m_num_1 > 0)
0044adcf                      {
0044add1                          class LayerModifier** m_data = arg3->m_FFModifiers.m_data;
0044add1                          
0044addc                          for (void* i_1 = &m_data[(m_num_1 - 1)]; i_1 >= &m_data[m_num_2]; i_1 -= 4)
0044ade2                              *(uint32_t*)((char*)i_1 + 4) = *(uint32_t*)i_1;
0044adcf                      }
0044adcf                      
0044ad58                      arg3->m_FFModifiers.m_data[m_num_2] = eax_56;
0044ad58                      arg3->m_FFModifiers.m_num += 1;
0044adc8                  }
0044ad62              }
0044ad62              
0044adf8              this_2 = this;
0044adff              ecx_59 = (&var_20->m_SamplerName.m_charbuffer + 1);
0044ae00              cond:4_1 = ecx_59 < this_2->m_FFModifiers.m_num;
0044ae02              var_20 = ecx_59;
0044ae06          } while (cond:4_1);
0044ad3c      }
0044ad3c      
0044ae0f      this_2 = 1;
0044ae15      return 1;
0044a940  }

0044a9b9                                                                             8d a4 24 00 00 00 00                           ..$....
0044ae18                                                                          90 90 90 90 90 90 90 90                          ........

0044ae20  void __thiscall MaterialLayer::Serialize(class MaterialLayer* this, class Archive* arg2)

0044ae20  {
0044ae2d      Archive::CheckAlignment(arg2, 4);
0044ae38      uint8_t* eax = Archive::GetBytes(arg2, 4);
0044ae38      
0044ae3f      if (eax != 0)
0044ae3f      {
0044ae49          if ((arg2->m_flags & 1) == 0)
0044ae5b              this->m_Options = *(uint32_t*)eax;
0044ae49          else
0044ae51              *(uint32_t*)eax = this->m_Options;
0044ae3f      }
0044ae3f      
0044ae6e      Archive::CheckAlignment(arg2, 4);
0044ae79      uint32_t* eax_2 = Archive::GetBytes(arg2, 4);
0044ae79      
0044ae80      if (eax_2 != 0)
0044ae80      {
0044ae8a          if ((arg2->m_flags & 1) == 0)
0044ae6b              this->m_TrueFlags = *(uint32_t*)eax_2;
0044ae8a          else
0044ae8e              *(uint32_t*)eax_2 = this->m_TrueFlags;
0044ae80      }
0044ae80      
0044aea3      Archive::CheckAlignment(arg2, 4);
0044aeae      uint32_t* eax_4 = Archive::GetBytes(arg2, 4);
0044aeae      
0044aeb5      if (eax_4 != 0)
0044aeb5      {
0044aebf          if ((arg2->m_flags & 1) == 0)
0044aea0              this->m_FalseFlags = *(uint32_t*)eax_4;
0044aebf          else
0044aec3              *(uint32_t*)eax_4 = this->m_FalseFlags;
0044aeb5      }
0044aeb5      
0044aed8      Archive::CheckAlignment(arg2, 4);
0044aee3      enum RenderPassType* eax_6 = Archive::GetBytes(arg2, 4);
0044aee3      
0044aeea      if (eax_6 != 0)
0044aeea      {
0044aef4          if ((arg2->m_flags & 1) == 0)
0044aed5              this->m_RenderPass = *(uint32_t*)eax_6;
0044aef4          else
0044aef8              *(uint32_t*)eax_6 = this->m_RenderPass;
0044aeea      }
0044aeea      
0044af04      uint32_t m_num_4 = this->m_ShaderResources.m_num;
0044af0d      Archive::CheckAlignment(arg2, 4);
0044af18      uint32_t* eax_8;
0044af18      char ecx_16;
0044af18      eax_8 = Archive::GetBytes(arg2, 4);
0044af18      
0044af1f      if (eax_8 != 0)
0044af1f      {
0044af29          if ((arg2->m_flags & 1) == 0)
0044af2f              m_num_4 = *(uint32_t*)eax_8;
0044af29          else
0044af2b              *(uint32_t*)eax_8 = m_num_4;
0044af1f      }
0044af1f      
0044af33      if (m_num_4 > 0)
0044af33      {
0044af39          int32_t edi_1 = 0;
0044af3b          uint32_t ebx_1 = m_num_4;
0044afd6          uint32_t i;
0044afd6          
0044afd6          do
0044afd6          {
0044af4c              if ((!(arg2->m_flags) & 1) != 0)
0044af4c              {
0044af5b                  int32_t eax_11 = (this->m_ShaderResources.m_sizeAndDeallocate & 0x7fffffff);
0044af62                  uint8_t eax_14;
0044af62                  
0044af62                  if (this->m_ShaderResources.m_num >= eax_11)
0044af70                      eax_14 = SmartArray<ShaderResourceType,1>::grow(&this->m_ShaderResources, SmartArray<unsigned long,1>::get_new_size(&this->m_ShaderResources, (eax_11 + 1)));
0044af70                  
0044af77                  if ((this->m_ShaderResources.m_num < eax_11 || eax_14 != 0))
0044af58                      this->m_ShaderResources.m_num += 1;
0044af4c              }
0044af4c              
0044af89              void* esi_9 = (this->m_ShaderResources.m_data + edi_1);
0044af8b              Archive::CheckAlignment(arg2, 4);
0044af96              uint8_t* eax_15 = Archive::GetBytes(arg2, 4);
0044af96              
0044af9d              if (eax_15 != 0)
0044af9d              {
0044afa7                  if ((arg2->m_flags & 1) == 0)
0044afb1                      *(uint32_t*)esi_9 = *(uint32_t*)eax_15;
0044afa7                  else
0044afab                      *(uint32_t*)eax_15 = *(uint32_t*)esi_9;
0044af9d              }
0044af9d              
0044afbc              Serializer::SerializeObject(((char*)esi_9 + 0xc), arg2);
0044afca              Serializer::SerializeObject(((char*)esi_9 + 0x18), arg2);
0044afd2              edi_1 += 0x24;
0044afd5              i = ebx_1;
0044afd5              ebx_1 -= 1;
0044afd6          } while (i != 1);
0044af33      }
0044af33      
0044afe0      uint32_t m_num_3 = this->m_Stages.m_num;
0044afe9      Archive::CheckAlignment(arg2, 4);
0044aff4      uint8_t* eax_18 = Archive::GetBytes(arg2, 4);
0044aff4      
0044affb      if (eax_18 != 0)
0044affb      {
0044b005          if ((arg2->m_flags & 1) == 0)
0044b00b              m_num_3 = *(uint32_t*)eax_18;
0044b005          else
0044b007              *(uint32_t*)eax_18 = m_num_3;
0044affb      }
0044affb      
0044b00d      int32_t edi_2 = 0;
0044b011      class LayerModifier* m_num_6;
0044b011      
0044b011      if (m_num_3 > 0)
0044b011      {
0044b07d          do
0044b07d          {
0044b01f              class LayerModifier* m_num_7;
0044b01f              
0044b01f              if ((!(arg2->m_flags) & 1) == 0)
0044b045                  m_num_7 = this->m_Stages.m_data[edi_2];
0044b01f              else
0044b01f              {
0044b023                  void* eax_20 = operator new(0x48);
0044b023                  
0044b02d                  if (eax_20 == 0)
0044b03a                      m_num_7 = nullptr;
0044b02d                  else
0044b036                      m_num_7 = LayerStage::LayerStage(eax_20);
0044b01f              }
0044b01f              
0044b04f              LayerStage::Serialize(m_num_7, arg2);
0044b04f              
0044b05f              if ((!(arg2->m_flags) & 1) != 0)
0044b05f              {
0044b065                  uint32_t m_num = this->m_Stages.m_num;
0044b071                  m_num_6 = m_num_7;
0044b075                  SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&this->m_Stages.m_data, &m_num_6, m_num);
0044b05f              }
0044b05f              
0044b07a              edi_2 += 1;
0044b07d          } while (edi_2 < m_num_3);
0044b011      }
0044b011      
0044b083      uint32_t m_num_5 = this->m_FFModifiers.m_num;
0044b08c      m_num_6 = m_num_5;
0044b090      Archive::CheckAlignment(arg2, 4);
0044b09b      uint32_t* eax_26;
0044b09b      class Archive* m_num_2;
0044b09b      eax_26 = Archive::GetBytes(arg2, 4);
0044b09b      
0044b0a2      if (eax_26 != 0)
0044b0a2      {
0044b0ac          if ((arg2->m_flags & 1) == 0)
0044b0ac          {
0044b0b2              m_num_5 = *(uint32_t*)eax_26;
0044b0b4              m_num_6 = m_num_5;
0044b0ac          }
0044b0ac          else
0044b0ae              *(uint32_t*)eax_26 = m_num_5;
0044b0a2      }
0044b0a2      
0044b0b8      int32_t eax_27 = 0;
0044b0bc      int32_t var_c = 0;
0044b0bc      
0044b0c0      if (m_num_5 > 0)
0044b0c0      {
0044b23a          do
0044b23a          {
0044b0ca              m_num_2 = arg2->m_flags;
0044b0cd              m_num_2 = !(m_num_2);
0044b0d2              int32_t* ebp_1;
0044b0d2              
0044b0d2              if ((m_num_2 & 1) == 0)
0044b16c                  ebp_1 = this->m_FFModifiers.m_data[eax_27];
0044b0d2              else
0044b0d2              {
0044b0ec                  int32_t eax_31 = (((uint32_t)*(uint8_t*)Archive::PeekBytes(arg2, Archive::GetCurrentPosition(arg2), 1)) - 1);
0044b0ec                  
0044b0f0                  if (eax_31 > 3)
0044b49a                      return;
0044b49a                  
0044b0f6                  switch (eax_31)
0044b0f6                  {
0044b0ff                      case 0:
0044b0ff                      {
0044b0ff                          class LM_UVTranslate* eax_32 = operator new(0x60);
0044b0ff                          
0044b109                          if (eax_32 == 0)
0044b148                              ebp_1 = nullptr;
0044b109                          else
0044b112                              ebp_1 = LM_UVTranslate::LM_UVTranslate(eax_32);
0044b0ff                          break;
0044b0ff                      }
0044b118                      case 1:
0044b118                      {
0044b118                          class LM_UVRotate* eax_34 = operator new(0x34);
0044b118                          
0044b122                          if (eax_34 == 0)
0044b148                              ebp_1 = nullptr;
0044b122                          else
0044b12b                              ebp_1 = LM_UVRotate::LM_UVRotate(eax_34);
0044b118                          break;
0044b118                      }
0044b131                      case 2:
0044b131                      {
0044b131                          class LM_UVScale* eax_36 = operator new(0x60);
0044b131                          
0044b13b                          if (eax_36 == 0)
0044b148                              ebp_1 = nullptr;
0044b13b                          else
0044b144                              ebp_1 = LM_UVScale::LM_UVScale(eax_36);
0044b131                          break;
0044b131                      }
0044b14e                      case 3:
0044b14e                      {
0044b14e                          void* eax_38 = operator new(0x48);
0044b14e                          
0044b158                          if (eax_38 == 0)
0044b148                              ebp_1 = nullptr;
0044b158                          else
0044b161                              ebp_1 = LM_UVTransform::LM_UVTransform(eax_38);
0044b14e                          break;
0044b14e                      }
0044b0f6                  }
0044b0d2              }
0044b0d2              
0044b179              *(uint32_t*)(*(uint32_t*)ebp_1 + 0x1c)(arg2);
0044b179              
0044b187              if ((!(arg2->m_flags) & 1) != 0)
0044b187              {
0044b191                  m_num_3 = this->m_FFModifiers.m_num;
0044b194                  uint32_t m_num_1 = this->m_FFModifiers.m_num;
0044b194                  
0044b19c                  if (m_num_3 <= m_num_1)
0044b19c                  {
0044b1a5                      int32_t eax_43 = (this->m_FFModifiers.m_sizeAndDeallocate & 0x7fffffff);
0044b1ac                      uint8_t eax_48;
0044b1ac                      
0044b1ac                      if (m_num_1 >= eax_43)
0044b1ac                      {
0044b1ae                          uint32_t edx_14 = (eax_43 + 1);
0044b1ae                          
0044b1b4                          if (edx_14 <= 8)
0044b1b6                              edx_14 = 8;
0044b1b4                          else if (edx_14 <= 0x4000)
0044b1c3                          {
0044b1e2                              int32_t eflags_1;
0044b1e2                              char eax_47;
0044b1e2                              eax_47 = __bsr_gprv_memv(edx_14);
0044b1ee                              int32_t edi_3 = (1 << eax_47);
0044b1ee                              
0044b1f2                              if (edx_14 > edi_3)
0044b1f4                                  edx_14 = (edi_3 * 2);
0044b1c3                          }
0044b1c3                          else
0044b1c3                          {
0044b1c7                              int32_t eax_45 = (edx_14 & 0x3fff);
0044b1c7                              
0044b1cc                              if (eax_45 != 0)
0044b1d5                                  edx_14 += (0x4000 - eax_45);
0044b1c3                          }
0044b1c3                          
0044b1fa                          eax_48 = SmartArray<unsigned long,1>::grow(&this->m_FFModifiers, edx_14);
0044b1ac                      }
0044b1ac                      
0044b201                      if ((m_num_1 < eax_43 || eax_48 != 0))
0044b201                      {
0044b203                          m_num_2 = this->m_FFModifiers.m_num;
0044b203                          
0044b208                          if (m_num_2 > 0)
0044b208                          {
0044b20a                              class LayerModifier** m_data = this->m_FFModifiers.m_data;
0044b20a                              
0044b215                              for (void* i_1 = &m_data[((char*)m_num_2 - 1)]; i_1 >= &m_data[m_num_3]; i_1 -= 4)
0044b219                                  *(uint32_t*)((char*)i_1 + 4) = *(uint32_t*)i_1;
0044b208                          }
0044b208                          
0044b197                          this->m_FFModifiers.m_data[m_num_3] = ebp_1;
0044b197                          this->m_FFModifiers.m_num += 1;
0044b201                      }
0044b19c                  }
0044b187              }
0044b187              
0044b233              eax_27 = (var_c + 1);
0044b236              var_c = eax_27;
0044b23a          } while (eax_27 < m_num_6);
0044b0c0      }
0044b0c0      
0044b248      m_num_3 = this->m_SourceBlend;
0044b250      Archive::CheckAlignment(arg2, 1);
0044b25b      uint8_t* eax_51 = Archive::GetBytes(arg2, 1);
0044b25b      
0044b262      if (eax_51 != 0)
0044b262      {
0044b26c          if ((arg2->m_flags & 1) == 0)
0044b272              m_num_3 = *(uint8_t*)eax_51;
0044b26c          else
0044b26e              *(uint8_t*)eax_51 = m_num_3;
0044b262      }
0044b262      
0044b27c      if ((arg2->m_flags & 5) == 0)
0044b24b          this->m_SourceBlend = ((uint32_t)m_num_3);
0044b24b      
0044b28b      m_num_3 = this->m_DestBlend;
0044b293      Archive::CheckAlignment(arg2, 1);
0044b29e      uint8_t* eax_53 = Archive::GetBytes(arg2, 1);
0044b29e      
0044b2a5      if (eax_53 != 0)
0044b2a5      {
0044b2af          if ((arg2->m_flags & 1) == 0)
0044b2b5              m_num_3 = *(uint8_t*)eax_53;
0044b2af          else
0044b2b1              *(uint8_t*)eax_53 = m_num_3;
0044b2a5      }
0044b2a5      
0044b2bf      if ((arg2->m_flags & 5) == 0)
0044b28e          this->m_DestBlend = ((uint32_t)m_num_3);
0044b28e      
0044b2ce      m_num_3 = this->m_BlendOp;
0044b2d6      Archive::CheckAlignment(arg2, 1);
0044b2e1      uint8_t* eax_55 = Archive::GetBytes(arg2, 1);
0044b2e1      
0044b2e8      if (eax_55 != 0)
0044b2e8      {
0044b2f2          if ((arg2->m_flags & 1) == 0)
0044b2f8              m_num_3 = *(uint8_t*)eax_55;
0044b2f2          else
0044b2f4              *(uint8_t*)eax_55 = m_num_3;
0044b2e8      }
0044b2e8      
0044b302      if ((arg2->m_flags & 5) == 0)
0044b2d1          this->m_BlendOp = ((uint32_t)m_num_3);
0044b2d1      
0044b311      m_num_3 = this->m_DepthTest;
0044b319      Archive::CheckAlignment(arg2, 1);
0044b324      uint8_t* eax_57 = Archive::GetBytes(arg2, 1);
0044b324      
0044b32b      if (eax_57 != 0)
0044b32b      {
0044b335          if ((arg2->m_flags & 1) == 0)
0044b33b              m_num_3 = *(uint8_t*)eax_57;
0044b335          else
0044b337              *(uint8_t*)eax_57 = m_num_3;
0044b32b      }
0044b32b      
0044b345      if ((arg2->m_flags & 5) == 0)
0044b314          this->m_DepthTest = ((uint32_t)m_num_3);
0044b314      
0044b354      m_num_3 = this->m_DepthWrite;
0044b35c      Archive::CheckAlignment(arg2, 1);
0044b367      uint8_t* eax_59 = Archive::GetBytes(arg2, 1);
0044b367      
0044b36e      if (eax_59 != 0)
0044b36e      {
0044b378          if ((arg2->m_flags & 1) == 0)
0044b37e              m_num_3 = *(uint8_t*)eax_59;
0044b378          else
0044b37a              *(uint8_t*)eax_59 = m_num_3;
0044b36e      }
0044b36e      
0044b388      bool cond:2_1;
0044b388      
0044b388      if ((arg2->m_flags & 5) != 0)
0044b398          cond:2_1 = m_num_3 != 0;
0044b388      else
0044b388      {
0044b38a          char temp2_1 = m_num_3;
0044b38a          cond:2_1 = temp2_1 != 0;
0044b38a          
0044b38c          if (temp2_1 != 0)
0044b38c          {
0044b391              if (m_num_3 != 1)
0044b393                  Archive::RaiseError(arg2);
0044b393              
0044b398              cond:2_1 = m_num_3 != 0;
0044b38c          }
0044b388      }
0044b388      
0044b357      this->m_DepthWrite = cond:2_1;
0044b3a7      m_num_3 = this->m_CullMode;
0044b3af      Archive::CheckAlignment(arg2, 1);
0044b3ba      uint8_t* eax_60 = Archive::GetBytes(arg2, 1);
0044b3ba      
0044b3c1      if (eax_60 != 0)
0044b3c1      {
0044b3cb          if ((arg2->m_flags & 1) == 0)
0044b3d1              m_num_3 = *(uint8_t*)eax_60;
0044b3cb          else
0044b3cd              *(uint8_t*)eax_60 = m_num_3;
0044b3c1      }
0044b3c1      
0044b3db      if ((arg2->m_flags & 5) == 0)
0044b3aa          this->m_CullMode = ((uint32_t)m_num_3);
0044b3aa      
0044b3ea      m_num_3 = this->m_AlphaTest;
0044b3f2      Archive::CheckAlignment(arg2, 1);
0044b3fd      char* eax_62 = Archive::GetBytes(arg2, 1);
0044b3fd      
0044b404      if (eax_62 != 0)
0044b404      {
0044b40e          if ((arg2->m_flags & 1) == 0)
0044b414              m_num_3 = *(uint8_t*)eax_62;
0044b40e          else
0044b410              *(uint8_t*)eax_62 = m_num_3;
0044b404      }
0044b404      
0044b41e      bool cond:3_1;
0044b41e      
0044b41e      if ((arg2->m_flags & 5) != 0)
0044b42e          cond:3_1 = m_num_3 != 0;
0044b41e      else
0044b41e      {
0044b420          char temp3_1 = m_num_3;
0044b420          cond:3_1 = temp3_1 != 0;
0044b420          
0044b422          if (temp3_1 != 0)
0044b422          {
0044b427              if (m_num_3 != 1)
0044b429                  Archive::RaiseError(arg2);
0044b429              
0044b42e              cond:3_1 = m_num_3 != 0;
0044b422          }
0044b41e      }
0044b41e      
0044b3ed      this->m_AlphaTest = cond:3_1;
0044b441      Waveform::Serialize(&this->m_AlphaTestRef, arg2);
0044b452      RGBAColor::Serialize(&this->m_cDiffuse, arg2);
0044b466      RGBAColor::Serialize(&this->m_cSpecular, arg2);
0044b47a      Waveform::Serialize(&this->m_wSpecularPower, arg2);
0044b48e      RGBAColor::Serialize(&this->m_cDye, arg2);
0044ae20  }

0044b49d                                                                                         8d 49 00                               .I.
0044b4a0  uint32_t jump_table_44b4a0[0x4] = 
0044b4a0  {
0044b4a0      [0x0] =  0x0044b0fd
0044b4a4      [0x1] =  0x0044b116
0044b4a8      [0x2] =  0x0044b12f
0044b4ac      [0x3] =  0x0044b14c
0044b4b0  }

0044b4b0  class MaterialLayer* __thiscall MaterialLayer::Copy(class MaterialLayer const* this, uint8_t const arg2)

0044b4b0  {
0044b4b9      void* eax = operator new(0xd8);
0044b4b9      
0044b4c7      if (eax == 0)
0044b51a          return 0;
0044b51a      
0044b4c9      __builtin_memset(((char*)eax + 0x10), 0, 0x24);
0044b4e7      Waveform::Waveform(((char*)eax + 0x50));
0044b4f2      Waveform::Waveform(((char*)eax + 0x9c));
0044b4f9      MaterialLayer::Begin(eax);
0044b506      int32_t eax_2 = MaterialLayer::CopyInto(this, arg2, eax);
0044b50b      char temp1 = eax_2;
0044b50b      eax_2 = -(eax_2);
0044b513      return ((eax_2 - eax_2) & eax);
0044b4b0  }

0044b51d                                                                                         90 90 90                               ...

0044b520  class Font* Font::Get(class IDClass<_tagDataID,32,0> arg1)

0044b520  {
0044b53c      void var_8;
0044b53c      return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0x2e));
0044b520  }

0044b53d                                                                                         90 90 90                               ...

0044b540  class Font* FontLocal::GetGlobalOrLocalFont(class IDClass<_tagDataID,32,0> arg1)

0044b540  {
0044b549      uint32_t eax = MasterDBMap::DivineType(arg1);
0044b554      uint32_t var_10_1;
0044b554      
0044b554      if (eax == 0x2e)
0044b564          var_10_1 = 0x2e;
0044b554      else
0044b554      {
0044b557          if (eax != 0x2f)
0044b55f              return 0;
0044b55f          
0044b560          var_10_1 = 0x2f;
0044b554      }
0044b554      
0044b57d      void var_8;
0044b57d      return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, var_10_1));
0044b540  }

0044b57e                                                                                            90 90                                ..

0044b580  uint8_t __thiscall SmartArray<FontReference,1>::grow(class SmartArray<FontReference,1>* this, uint32_t arg2)

0044b580  {
0044b58c      uint32_t* m_data;
0044b58c      
0044b58c      if (arg2 >= this->m_num)
0044b58c      {
0044b59c          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044b59c          {
0044b633              m_data = 1;
0044b636              return 1;
0044b59c          }
0044b59c          
0044b5a4          if (arg2 == 0)
0044b5a4          {
0044b5a6              SmartArray<FontReference,1>::Reset(this);
0044b5ad              int32_t eax_1;
0044b5ad              eax_1 = 1;
0044b5b0              return 1;
0044b5a4          }
0044b5a4          
0044b5bb          m_data = operator new[](((arg2 << 3) + 4));
0044b5bb          
0044b5c5          if (m_data != 0)
0044b5c5          {
0044b5cd              void* edi_1 = &m_data[1];
0044b5d3              *(uint32_t*)m_data = arg2;
0044b5d5              `vector constructor iterator'(edi_1, 8, arg2, Vector3::Vector3);
0044b5d5              
0044b5dc              if (edi_1 != 0)
0044b5dc              {
0044b5e1                  if (this->m_data != 0)
0044b5e1                  {
0044b5e3                      uint32_t m_num = this->m_num;
0044b5e6                      int32_t eax_2 = (m_num - 1);
0044b5e6                      
0044b5e7                      if ((m_num - 1) >= 0)
0044b5e7                      {
0044b603                          int32_t temp2_1;
0044b603                          
0044b603                          do
0044b603                          {
0044b5f0                              temp2_1 = eax_2;
0044b5f0                              eax_2 -= 1;
0044b5f1                              class FontReference* m_data_1 = this->m_data;
0044b5f7                              *(uint32_t*)(((char*)edi_1 + (eax_2 << 3)) + 8) = m_data_1[(eax_2 + 1)].dataID.id;
0044b5ff                              *(uint32_t*)(((char*)edi_1 + (eax_2 << 3)) + 0xc) = *(uint32_t*)(&m_data_1[eax_2] + 0xc);
0044b603                          } while ((temp2_1 - 1) >= 0);
0044b5e7                      }
0044b5e7                      
0044b612                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044b612                      {
0044b614                          m_data = this->m_data;
0044b614                          
0044b618                          if (m_data != 0)
0044b61e                              operator delete[](&m_data[-1]);
0044b612                      }
0044b5e1                  }
0044b5e1                  
0044b62c                  this->m_data = edi_1;
0044b62e                  this->m_sizeAndDeallocate = (arg2 | 0x80000000);
0044b633                  m_data = 1;
0044b636                  return 1;
0044b5dc              }
0044b5c5          }
0044b58c      }
0044b58c      
0044b63b      m_data = 0;
0044b63e      return 0;
0044b580  }

0044b641     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0044b650  uint8_t FontMapper::Startup()

0044b650  {
0044b655      SmartArray<FontReference,1>::Reset(&FontMapper::fonts);
0044b65a      int32_t eax;
0044b65a      eax = 1;
0044b65c      return 1;
0044b650  }

0044b65d                                                                                         90 90 90                               ...

0044b660  void FontMapper::Shutdown()

0044b660  {
0044b666      int32_t i = 0;
0044b666      
0044b66a      if (FontMapper::fonts.m_num > 0)
0044b66a      {
0044b697          do
0044b697          {
0044b675              int32_t* font = FontMapper::fonts.m_data[i].font;
0044b675              
0044b67b              if (font != 0)
0044b67b              {
0044b67f                  *(uint32_t*)(*(uint32_t*)font + 0x14)();
0044b682                  FontMapper::fonts.m_data[i].font = 0;
0044b67b              }
0044b67b              
0044b694              i += 1;
0044b697          } while (i < FontMapper::fonts.m_num);
0044b66a      }
0044b66a      
0044b69f      /* tailcall */
0044b69f      return SmartArray<FontReference,1>::Reset(&FontMapper::fonts);
0044b660  }

0044b6a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0044b6b0  class Font const* FontMapper::GetFontByDataID(class IDClass<_tagDataID,32,0> arg1)

0044b6b0  {
0044b6bf      if (arg1 == INVALID_DID.id)
0044b6c7          return 0;
0044b6c7      
0044b6c8      uint32_t m_num = FontMapper::fonts.m_num;
0044b6ce      int32_t eax_1 = 0;
0044b6ce      
0044b6d3      if (m_num > 0)
0044b6d3      {
0044b6d5          class FontReference* m_data = FontMapper::fonts.m_data;
0044b6d5          
0044b6e8          do
0044b6e8          {
0044b6e3              if (m_data[eax_1].dataID.id == arg1)
0044b708                  return m_data[eax_1].font;
0044b708              
0044b6e5              eax_1 += 1;
0044b6e8          } while (eax_1 < m_num);
0044b6d3      }
0044b6d3      
0044b6eb      uint32_t eax_2 = MasterDBMap::DivineType(arg1);
0044b6f6      uint32_t var_14_1;
0044b6f6      
0044b6f6      if (eax_2 == 0x2e)
0044b6f6      {
0044b709          var_14_1 = 0x2e;
0044b716      label_44b716:
0044b716          void var_8;
0044b716          class DBObj* result = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, var_14_1));
0044b716          
0044b722          if (result != 0)
0044b722          {
0044b737              int32_t eax_9 = (FontMapper::fonts.m_sizeAndDeallocate & 0x7fffffff);
0044b73e              uint8_t eax_12;
0044b73e              
0044b73e              if (FontMapper::fonts.m_num >= eax_9)
0044b752                  eax_12 = SmartArray<FontReference,1>::grow(&FontMapper::fonts, SmartArray<unsigned long,1>::get_new_size(&FontMapper::fonts, (eax_9 + 1)));
0044b752              
0044b759              if ((FontMapper::fonts.m_num < eax_9 || eax_12 != 0))
0044b759              {
0044b75b                  FontMapper::fonts.m_data[FontMapper::fonts.m_num].dataID.id = arg1;
0044b76f                  FontMapper::fonts.m_data[FontMapper::fonts.m_num].font = result;
0044b778                  FontMapper::fonts.m_num += 1;
0044b759              }
0044b759              
0044b785              return result;
0044b722          }
0044b6f6      }
0044b6f6      else if (eax_2 == 0x2f)
0044b6f9      {
0044b6fb          var_14_1 = 0x2f;
0044b6fd          goto label_44b716;
0044b6f9      }
0044b72b      return 0;
0044b6b0  }

0044b6dd                                                                                         8d 49 00                               .I.
0044b786                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0044b790  uint8_t __thiscall RenderTexture::Create2D(class RenderTexture* this, uint32_t const arg2, uint32_t const arg3, uint32_t const arg4, enum PixelFormatID const arg5, uint32_t const arg6)

0044b790  {
0044b79a      if (((arg6 & 2) != 0 && (arg6 & 1) != 0))
0044b79a      {
0044b79c          uint32_t const eax;
0044b79c          eax = 0;
0044b79e          return 0;
0044b79a      }
0044b79a      
0044b7a5      this->m_nNumLevels = arg4;
0044b7ac      this->m_PixelFormat = arg5;
0044b7b3      this->m_Flags = arg6;
0044b7ba      this->m_TextureType = TEXTURETYPE_2D;
0044b7c1      this->m_nWidth = arg2;
0044b7c7      this->m_nHeight = arg3;
0044b7d0      GraphicsResource::MarkResourceAsNotLost(&this->vtable);
0044b7d5      uint32_t const eax_1;
0044b7d5      eax_1 = 1;
0044b7d7      return 1;
0044b790  }

0044b7da                                                                                90 90 90 90 90 90                            ......

0044b7e0  uint8_t __thiscall RenderTexture::CreateCube(class RenderTexture* this, uint32_t const arg2, uint32_t const arg3, enum PixelFormatID const arg4, uint32_t const arg5)

0044b7e0  {
0044b7ea      class RenderDevice* eax;
0044b7ea      
0044b7ea      if (RenderDevice::render_device->m_caps.bCubeTextures != 0)
0044b7ea      {
0044b7ec          eax = arg5;
0044b7ec          
0044b7f6          if (((eax & 2) == 0 || (eax & 1) == 0))
0044b7f6          {
0044b7fc              this->m_nNumLevels = arg3;
0044b803              this->m_Flags = eax;
0044b80a              this->m_TextureType = TEXTURETYPE_CUBE;
0044b811              this->m_PixelFormat = arg4;
0044b814              this->m_nEdgeLength = arg2;
0044b81d              GraphicsResource::MarkResourceAsNotLost(&this->vtable);
0044b822              uint32_t const eax_1;
0044b822              eax_1 = 1;
0044b824              return 1;
0044b7f6          }
0044b7ea      }
0044b7ea      
0044b827      eax = 0;
0044b829      return 0;
0044b7e0  }

0044b82c                                      90 90 90 90                                                              ....

0044b830  uint8_t RenderTexture::ShouldDropHighDetail()

0044b830  {
0044b843      int32_t eax_1 = *(int32_t*)((char*)DBCache::s_pCache->vtable + 0x44)(0x69466948, 1);
0044b846      char temp0 = eax_1;
0044b846      eax_1 = -(eax_1);
0044b84b      return (((int8_t)(eax_1 - eax_1)) + 1);
0044b830  }

0044b84c                                      90 90 90 90                                                              ....

0044b850  uint8_t __fastcall RenderTexture::Refresh(class RenderTexture* this, class IDClass<_tagDataID,32,0> arg2)

0044b850  {
0044b85a      if (this->vtable->ReleaseSubObjects() == 0)
0044b86f          return 0;
0044b86f      
0044b869      return this->vtable->GetSubObjects() != 0;
0044b850  }

0044b872                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0044b880  enum PixelFormatID RenderTexture::SelectTextureFormat(enum PixelFormatID const arg1)

0044b880  {
0044b88d      void var_38;
0044b88d      PixelFormatDesc::PixelFormatDesc(&var_38, arg1);
0044b88d      
0044b8a2      if ((DBCache::IsRunTime() != 0 && Render::m_pRenderer != 0))
0044b8a2      {
0044b8a4          class Render* eax_1;
0044b8a4          eax_1 = HACK_formatConversion;
0044b8b4          int32_t var_34;
0044b8b4          
0044b8b4          if ((eax_1 != 0 && (var_34 & 4) == 0))
0044b8b4          {
0044b8b8              int32_t eax_3 = (var_34 & 2);
0044b8b8              
0044b8c0              if ((eax_3 != 0 && (var_34 & 1) != 0))
0044b8d0                  return RenderDevice::render_device->m_displayInfo.pfARGBTextures;
0044b8d0              
0044b8d3              if (eax_3 != 0)
0044b8e4                  return RenderDevice::render_device->m_displayInfo.pfAlphaTextures;
0044b8e4              
0044b8e8              if ((var_34 & 1) != 0)
0044b8f0                  return RenderDevice::render_device->m_displayInfo.pfRGBTextures;
0044b8b4          }
0044b8a2      }
0044b8a2      
0044b8f9      return arg1;
0044b880  }

0044b8fa                                                                                90 90 90 90 90 90                            ......

0044b900  void __fastcall RenderTexture::ReleaseSourceLevelReferences(class RenderTexture* this)

0044b900  {
0044b900      class RenderTexture* this_1 = this;
0044b90f      int32_t var_4 = 0;
0044b90f      
0044b913      if (this->m_SourceLevels.m_num > 0)
0044b913      {
0044b917          int32_t esi_1 = 0;
0044b953          bool cond:1_1;
0044b953          
0044b953          do
0044b953          {
0044b920              int32_t i_1 = 6;
0044b940              int32_t i;
0044b940              
0044b940              do
0044b940              {
0044b928                  int32_t* ecx = *(uint32_t*)(&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[8] + esi_1);
0044b928                  
0044b92e                  if (ecx != 0)
0044b92e                  {
0044b932                      *(uint32_t*)(*(uint32_t*)ecx + 0x14)();
0044b938                      *(uint32_t*)(&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[8] + esi_1) = 0;
0044b92e                  }
0044b92e                  
0044b93c                  esi_1 += 0xc;
0044b93f                  i = i_1;
0044b93f                  i_1 -= 1;
0044b940              } while (i != 1);
0044b94d              cond:1_1 = (var_4 + 1) < this->m_SourceLevels.m_num;
0044b94f              var_4 += 1;
0044b953          } while (cond:1_1);
0044b913      }
0044b900  }

0044b95b                                                                                   90 90 90 90 90                             .....

0044b960  uint8_t __fastcall RenderTexture::ReleaseSubObjects(class RenderTexture* this)

0044b960  {
0044b96a      if (DBCache::IsRunTime() != 0)
0044b96e          RenderTexture::ReleaseSourceLevelReferences(this);
0044b96e      
0044b976      return 1;
0044b960  }

0044b977                                                                       90 90 90 90 90 90 90 90 90                         .........

0044b980  uint8_t __fastcall RenderTexture::LoadLevelResources(class RenderTexture* this)

0044b980  {
0044b980      int32_t ebp;
0044b980      int32_t var_4 = ebp;
0044b98a      int32_t* var_28 = &var_4;
0044b993      char var_19 = 1;
0044b998      int32_t eax;
0044b998      
0044b998      if (this->m_TextureType != TEXTURETYPE_MOVIE2D)
0044b998      {
0044b9a8          if (this->m_SourceLevels.m_num <= 0)
0044b9a8          {
0044ba5b              uint32_t eax_1;
0044ba5b              eax_1 = 0;
0044ba62              *(uint32_t*)var_28;
0044ba63              return 0;
0044b9a8          }
0044b9a8          
0044b9ae          int32_t var_14_1 = 0;
0044b9b2          eax = 0;
0044ba48          bool cond:2_1;
0044ba48          
0044ba48          do
0044ba48          {
0044b9c0              int32_t edi_1 = eax;
0044b9c2              int32_t var_18_1 = 6;
0044ba33              bool cond:1_1;
0044ba33              
0044ba33              do
0044ba33              {
0044b9d0                  class DBLevelInfo* m_data = this->m_SourceLevels.m_data;
0044b9dd                  void* esi_1 = ((char*)m_data + edi_1);
0044b9dd                  
0044b9e1                  if (*(uint32_t*)(&*(uint32_t*)((char*)m_data->m_Resources[0])[4] + edi_1) != INVALID_DID.id)
0044b9e1                  {
0044b9e3                      enum TextureType m_TextureType = this->m_TextureType;
0044b9ee                      bool cond:3_1;
0044b9ee                      
0044b9ee                      if ((m_TextureType == TEXTURETYPE_2D || m_TextureType == TEXTURETYPE_CUBE))
0044b9ee                      {
0044b9f5                          int32_t* ecx_1 = *(uint32_t*)((char*)esi_1 + 8);
0044b9f5                          
0044b9fa                          if (ecx_1 != 0)
0044b9fa                          {
0044b9fe                              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0044ba01                              *(uint32_t*)((char*)esi_1 + 8) = 0;
0044b9fa                          }
0044b9fa                          
0044ba14                          void var_10;
0044ba14                          class DBObj* eax_5 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)((char*)esi_1 + 4), 0xc));
0044ba1c                          *(uint32_t*)((char*)esi_1 + 8) = eax_5;
0044ba1f                          cond:3_1 = eax_5 != 0;
0044b9ee                      }
0044b9ee                      else
0044b9f0                          cond:3_1 = m_TextureType != TEXTURETYPE_3D;
0044b9f0                      
0044ba21                      if (!(cond:3_1))
0044ba23                          var_19 = 0;
0044b9e1                  }
0044b9e1                  
0044ba2b                  edi_1 += 0xc;
0044ba2e                  cond:1_1 = var_18_1 != 1;
0044ba2f                  var_18_1 -= 1;
0044ba33              } while (cond:1_1);
0044ba40              cond:2_1 = (var_14_1 + 1) < this->m_SourceLevels.m_num;
0044ba42              var_14_1 += 1;
0044ba46              eax = edi_1;
0044ba48          } while (cond:2_1);
0044b998      }
0044b998      
0044ba4e      eax = var_19;
0044ba58      *(uint32_t*)var_28;
0044ba59      return eax;
0044b980  }

0044b9b6                                                                    8d a4 24 00 00 00 00 8d 49 00                        ..$.....I.
0044ba64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0044ba70  uint8_t __fastcall RenderTexture::ConstructTexture(class RenderTexture* this)

0044ba70  {
0044ba86      GraphicsResource::SetResourceIsThrashable(&this->vtable, (!(((int8_t)(this->m_Flags >> 1))) & 1));
0044ba8b      enum TextureType eax_3 = this->m_TextureType;
0044ba8b      
0044ba91      if (eax_3 != TEXTURETYPE_MOVIE2D)
0044ba91      {
0044ba93          uint32_t m_num = this->m_SourceLevels.m_num;
0044ba93          
0044baa0          if ((m_num == 0 || m_num < 1))
0044baa0          {
0044baa2              eax_3 = 0;
0044baa8              return 0;
0044baa0          }
0044ba91      }
0044ba91      
0044baaf      if (eax_3 == TEXTURETYPE_2D)
0044baaf      {
0044bab8          eax_3 = this->m_SourceLevels.m_data->m_Resources[0].m_pResource;
0044bab8          
0044babd          if (eax_3 != 0)
0044babd          {
0044bac3              int32_t esi_1 = *(uint32_t*)(eax_3 + 0xa0);
0044bac9              int32_t ebp_1 = *(uint32_t*)(eax_3 + 0xa4);
0044bade              enum PixelFormatID eax_5 = RenderTexture::SelectTextureFormat(*(uint32_t*)(eax_3 + 0xdc));
0044baf2              eax_3 = RenderDevice::render_device->vtable->CreateTexture();
0044baf2              
0044baf9              if (eax_3 != 0)
0044baf9              {
0044bb18                  if (*(uint32_t*)(*(uint32_t*)eax_3 + 0x58)(esi_1, ebp_1, this->m_SourceLevels.m_num, eax_5, 2) != 0)
0044bb18                  {
0044bb24                      int32_t i = 0;
0044bb24                      
0044bb28                      if (this->m_SourceLevels.m_num > 0)
0044bb28                      {
0044bb2a                          int32_t var_18_1 = 0;
0044bb2a                          
0044bb8f                          do
0044bb8f                          {
0044bb37                              int32_t eax_10 = *(uint32_t*)(&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[8] + var_18_1);
0044bb37                              
0044bb43                              if (eax_10 == 0)
0044bb43                              {
0044bbd3                                  *(uint32_t*)(*(uint32_t*)eax_3 + 0x14)();
0044bbd3                                  goto label_44bbd9;
0044bb43                              }
0044bb43                              
0044bb4e                              void* eax_11 = *(uint32_t*)(*(uint32_t*)eax_3 + 0x64)(i, 0);
0044bb4e                              
0044bb53                              if (eax_11 == 0)
0044bb53                                  goto label_44bbe9;
0044bb53                              
0044bb5e                              if (eax_11 == 0x30)
0044bb5e                                  goto label_44bbe9;
0044bb5e                              
0044bb74                              if (*(uint32_t*)(*(uint32_t*)((char*)eax_11 - 0x30) + 0x68)(eax_10) == 0)
0044bb74                              {
0044bbe2                                  *(uint32_t*)(*(uint32_t*)((char*)eax_11 - 0x30) + 0x14)();
0044bbe2                                  goto label_44bbe9;
0044bb74                              }
0044bb74                              
0044bb78                              *(uint32_t*)(*(uint32_t*)((char*)eax_11 - 0x30) + 0x14)();
0044bb85                              i += 1;
0044bb8b                              var_18_1 += 0x48;
0044bb8f                          } while (i < this->m_SourceLevels.m_num);
0044bb28                      }
0044bb28                      
0044bbb2                      if (this->vtable->Create2D(esi_1, ebp_1, this->m_SourceLevels.m_num, eax_5, 0) != 0)
0044bbb2                      {
0044bbc0                          if (this->vtable->LoadTexture(eax_3) == 0)
0044bbc0                          {
0044bbc4                              *(uint32_t*)(*(uint32_t*)eax_3 + 0x14)();
0044bbca                              int32_t eax_20;
0044bbca                              eax_20 = 0;
0044bbd0                              return 0;
0044bbc0                          }
0044bbc0                          
0044bbf8                          *(uint32_t*)(*(uint32_t*)eax_3 + 0x14)();
0044bbfd                          RenderTexture::ReleaseSourceLevelReferences(this);
0044bc05                          int32_t eax_25;
0044bc05                          eax_25 = 1;
0044bc0b                          return 1;
0044bbb2                      }
0044bb18                  }
0044bb18                  
0044bbe9              label_44bbe9:
0044bbe9                  *(uint32_t*)(*(uint32_t*)eax_3 + 0x14)();
0044bbef                  int32_t eax_23;
0044bbef                  eax_23 = 0;
0044bbf5                  return 0;
0044baf9              }
0044babd          }
0044baaf      }
0044baaf      else if (eax_3 == TEXTURETYPE_CUBE)
0044bc0f      {
0044bc18          eax_3 = this->m_SourceLevels.m_data->m_Resources[0].m_pResource;
0044bc18          
0044bc1d          if (eax_3 != 0)
0044bc1d          {
0044bc1f              int32_t ebx_2 = *(uint32_t*)(eax_3 + 0xa0);
0044bc1f              
0044bc2f              if (ebx_2 == *(uint32_t*)(eax_3 + 0xa4))
0044bc2f              {
0044bc45                  enum PixelFormatID esi_3 = RenderTexture::SelectTextureFormat(*(uint32_t*)(eax_3 + 0xdc));
0044bc4e                  eax_3 = RenderDevice::render_device->vtable->CreateTexture();
0044bc4e                  
0044bc55                  if (eax_3 != 0)
0044bc55                  {
0044bc70                      if (*(uint32_t*)(*(uint32_t*)eax_3 + 0x5c)(ebx_2, this->m_SourceLevels.m_num, esi_3, 2) != 0)
0044bc70                      {
0044bc80                          int32_t var_14_2 = 0;
0044bc80                          
0044bc84                          if (this->m_SourceLevels.m_num > 0)
0044bc84                          {
0044bc8a                              int32_t var_10_2 = 0;
0044bd18                              bool cond:11_1;
0044bd18                              
0044bd18                              do
0044bd18                              {
0044bc96                                  int32_t var_18_2 = var_10_2;
0044bc96                                  
0044bcfa                                  for (int32_t i_1 = 0; i_1 < 6; )
0044bcfa                                  {
0044bca7                                      int32_t eax_31 = *(uint32_t*)(&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[8] + var_18_2);
0044bca7                                      
0044bcb3                                      if (eax_31 == 0)
0044bcb3                                          goto label_44bd76;
0044bcb3                                      
0044bcc2                                      void* eax_33 = *(uint32_t*)(*(uint32_t*)eax_3 + 0x64)(var_14_2, i_1);
0044bcc2                                      
0044bcd2                                      if ((eax_33 == 0 || eax_33 == 0x30))
0044bcc7                                          goto label_44bd58;
0044bcc7                                      
0044bce4                                      if (*(uint32_t*)(*(uint32_t*)((char*)eax_33 - 0x30) + 0x68)(eax_31) == 0)
0044bce4                                      {
0044bd50                                          *(uint32_t*)(*(uint32_t*)((char*)eax_33 - 0x30) + 0x14)();
0044bd58                                      label_44bd58:
0044bd58                                          *(uint32_t*)(*(uint32_t*)eax_3 + 0x14)();
0044bd5e                                          int32_t eax_43;
0044bd5e                                          eax_43 = 0;
0044bd64                                          return 0;
0044bce4                                      }
0044bce4                                      
0044bce8                                      *(uint32_t*)(*(uint32_t*)((char*)eax_33 - 0x30) + 0x14)();
0044bcef                                      i_1 += 1;
0044bcf6                                      var_18_2 += 0xc;
0044bcfa                                  }
0044bcfa                                  
0044bd0e                                  cond:11_1 = (var_14_2 + 1) < this->m_SourceLevels.m_num;
0044bd10                                  var_14_2 += 1;
0044bd14                                  var_10_2 += 0x48;
0044bd18                              } while (cond:11_1);
0044bc84                          }
0044bc84                          
0044bd3a                          if (this->vtable->CreateCube(ebx_2, this->m_SourceLevels.m_num, esi_3, 0) != 0)
0044bd3a                          {
0044bd71                              if (this->vtable->LoadTexture(eax_3) == 0)
0044bd71                              {
0044bd76                              label_44bd76:
0044bd76                                  *(uint32_t*)(*(uint32_t*)eax_3 + 0x14)();
0044bd7c                                  int32_t eax_46;
0044bd7c                                  eax_46 = 0;
0044bd82                                  return 0;
0044bd71                              }
0044bd71                              
0044bd86                              *(uint32_t*)(*(uint32_t*)eax_3 + 0x14)();
0044bd8b                              RenderTexture::ReleaseSourceLevelReferences(this);
0044bd93                              int32_t eax_47;
0044bd93                              eax_47 = 1;
0044bd99                              return 1;
0044bd3a                          }
0044bc70                      }
0044bc70                      
0044bd41                      *(uint32_t*)(*(uint32_t*)eax_3 + 0x14)();
0044bd47                      int32_t eax_41;
0044bd47                      eax_41 = 0;
0044bd4d                      return 0;
0044bc55                  }
0044bc2f              }
0044bc1d          }
0044bc0f      }
0044bc0f      else if (eax_3 == TEXTURETYPE_MOVIE2D)
0044bd9d      {
0044bda5          RenderTexture::ReleaseSourceLevelReferences(this);
0044bdad          int32_t eax_48;
0044bdad          eax_48 = 1;
0044bdb3          return 1;
0044bd9d      }
0044bd9d      
0044bbd9  label_44bbd9:
0044bbd9      eax_3 = 0;
0044bbdf      return 0;
0044ba70  }

0044bdb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0044bdc0  uint8_t __fastcall RenderTexture::GetSubObjects(class RenderTexture* this)

0044bdc0  {
0044bdca      if (DBCache::IsRunTime() == 0)
0044bdcf          return 1;
0044bdcf      
0044bdd7      if ((Render::m_pRenderer != 0 && RenderTexture::LoadLevelResources(this) != 0))
0044bdf1          return RenderTexture::ConstructTexture(this) != 0;
0044bdf1      
0044bdf2      class Render* eax_1;
0044bdf2      eax_1 = 0;
0044bdf5      return 0;
0044bdc0  }

0044bdf6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0044be00  class DBLevelInfo& __thiscall DBLevelInfo::operator=(class DBLevelInfo* this, class DBLevelInfo const& arg2)

0044be00  {
0044be00      class DBLevelInfo* this_2 = this;
0044be09      class DBLevelInfo* this_1 = this;
0044be0d      class DBLevelInfo* this_3 = this;
0044be0f      int32_t* edi_1 = ((char*)arg2 - this);
0044be11      int32_t i_1 = 6;
0044be5f      int32_t i;
0044be5f      
0044be5f      do
0044be5f      {
0044be16          class PSRefBufferCharData<char>* m_charbuffer = this_3->m_Resources[0].m_Name.m_charbuffer;
0044be16          
0044be1b          if (m_charbuffer != *(uint32_t*)((char*)edi_1 + this_3))
0044be1b          {
0044be30              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0044be38                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0044be38              
0044be3a              int32_t eax_3 = *(uint32_t*)((char*)edi_1 + this_3);
0044be3d              this_3->m_Resources[0].m_Name.m_charbuffer = eax_3;
0044be43              InterlockedIncrement((eax_3 - 0x10));
0044be49              this = this_1;
0044be1b          }
0044be1b          
0044be51          this_3->m_Resources[0].m_LevelID.id = *(uint32_t*)(&*(uint32_t*)((char*)this_3->m_Resources[0])[4] + edi_1);
0044be58          this_3->m_Resources[0].m_pResource = *(uint32_t*)(&*(uint32_t*)((char*)this_3->m_Resources[0])[8] + edi_1);
0044be5b          this_3 = &this_3->m_Resources[1];
0044be5e          i = i_1;
0044be5e          i_1 -= 1;
0044be5f      } while (i != 1);
0044be68      return this;
0044be00  }

0044be6b                                   90 90 90 90 90                                                             .....

0044be70  void __fastcall DBLevelInfo::DBLevelInfo(class DBLevelInfo* this)

0044be70  {
0044be70      class DBLevelInfo* this_2 = this;
0044be7a      class DBLevelInfo* this_1 = this;
0044be7e      class DBLevelInfo* this_3 = this;
0044be80      int32_t i_1 = 6;
0044bea8      int32_t i;
0044bea8      
0044bea8      do
0044bea8      {
0044be85          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044be90          this_3->m_Resources[0].m_Name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0044be92          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0044be9a          this_3->m_Resources[0].m_LevelID.id = INVALID_DID.id;
0044be9d          this_3->m_Resources[0].m_pResource = nullptr;
0044bea4          this_3 = &this_3->m_Resources[1];
0044bea7          i = i_1;
0044bea7          i_1 -= 1;
0044bea8      } while (i != 1);
0044be70  }

0044beb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0044bec0  void __fastcall DBLevelInfo::~DBLevelInfo(class DBLevelInfo* this)

0044bec0  {
0044bec0      class DBLevelInfo* this_1 = this;
0044beca      void* __offset(DBLevelInfo, 0x48) edi = &this[1];
0044becd      int32_t i_1 = 6;
0044bf0a      int32_t i;
0044bf0a      
0044bf0a      do
0044bf0a      {
0044bed5          class RenderSurface* m_pResource = ADJ(edi)->m_Resources[5].m_pResource;
0044bed8          edi -= 0xc;
0044bed8          
0044bedd          if (m_pResource != 0)
0044bedd          {
0044bedf              m_pResource->vtable->Release();
0044bee4              *(int32_t*)((char*)ADJ(edi) + 0x50) = 0;
0044bedd          }
0044bedd          
0044beed          int32_t* esi_2 = (*(int32_t*)((char*)ADJ(edi) + 0x48) - 0x14);
0044beed          
0044befc          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0044bf04              **(uint32_t**)esi_2(1);
0044bf04          
0044bf06          i = i_1;
0044bf06          i_1 -= 1;
0044bf0a      } while (i != 1);
0044bec0  }

0044bf11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0044bf20  void __fastcall SmartArray<DBLevelInfo,1>::~SmartArray<DBLevelInfo,1>(class SmartArray<DBLevelInfo,1>* this)

0044bf20  {
0044bf2d      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044bf2d      {
0044bf2f          class DBLevelInfo* m_data = this->m_data;
0044bf2f          
0044bf33          if (m_data != 0)
0044bf33          {
0044bf35              int32_t m_charbuffer = m_data->m_Resources[0x1555555555555555].m_Name.m_charbuffer;
0044bf41              void* esi_1 = &m_data[m_charbuffer];
0044bf41              
0044bf44              if ((m_charbuffer - 1) >= 0)
0044bf44              {
0044bf47                  int32_t edi_1 = m_charbuffer;
0044bf5b                  int32_t i;
0044bf5b                  
0044bf5b                  do
0044bf5b                  {
0044bf50                      esi_1 -= 0x48;
0044bf55                      DBLevelInfo::~DBLevelInfo(esi_1);
0044bf5a                      i = edi_1;
0044bf5a                      edi_1 -= 1;
0044bf5b                  } while (i != 1);
0044bf44              }
0044bf44              
0044bf5f              operator delete[](&m_data->m_Resources[0]);
0044bf33          }
0044bf2d      }
0044bf20  }

0044bf6a                                90 90 90 90 90 90                                                            ......

0044bf70  void __fastcall SmartArray<DBLevelInfo,1>::Reset(class SmartArray<DBLevelInfo,1>* this)

0044bf70  {
0044bf78      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0044bf89      this->m_num = 0;
0044bf89      
0044bf90      if ((m_sizeAndDeallocate & 0x80000000) != 0x80000000)
0044bf90      {
0044bfde          if (this->m_data != 0)
0044bfde          {
0044bfe0              int32_t i_3 = (m_sizeAndDeallocate & 0x7fffffff);
0044bfe0              
0044bfe6              if ((i_3 - 1) >= 0)
0044bfe6              {
0044bfeb                  int32_t esi_3 = ((i_3 - 1) * 0x48);
0044bfee                  int32_t i_2 = i_3;
0044c011                  int32_t i;
0044c011                  
0044c011                  do
0044c011                  {
0044bff5                      void var_48;
0044bff5                      class DBLevelInfo* eax_2 = DBLevelInfo::DBLevelInfo(&var_48);
0044bfff                      DBLevelInfo::operator=((this->m_data + esi_3), eax_2);
0044c008                      DBLevelInfo::~DBLevelInfo(&var_48);
0044c00d                      esi_3 -= 0x48;
0044c010                      i = i_2;
0044c010                      i_2 -= 1;
0044c011                  } while (i != 1);
0044bfe6              }
0044bfde          }
0044bfde          
0044c019          return;
0044bf90      }
0044bf90      
0044bf92      class DBLevelInfo* m_data = this->m_data;
0044bf92      
0044bf96      if (m_data != 0)
0044bf96      {
0044bf98          int32_t m_charbuffer = m_data->m_Resources[0x1555555555555555].m_Name.m_charbuffer;
0044bfa3          void* esi_1 = &m_data[m_charbuffer];
0044bfa3          
0044bfa6          if ((m_charbuffer - 1) >= 0)
0044bfa6          {
0044bfa8              int32_t ebx_1 = m_charbuffer;
0044bfbb              int32_t i_1;
0044bfbb              
0044bfbb              do
0044bfbb              {
0044bfb0                  esi_1 -= 0x48;
0044bfb5                  DBLevelInfo::~DBLevelInfo(esi_1);
0044bfba                  i_1 = ebx_1;
0044bfba                  ebx_1 -= 1;
0044bfbb              } while (i_1 != 1);
0044bfa6          }
0044bfa6          
0044bfbe          operator delete[](&m_data->m_Resources[0]);
0044bf96      }
0044bf96      
0044bfc7      this->m_data = 0;
0044bfcd      this->m_sizeAndDeallocate = 0;
0044bf70  }

0044bfad                                         8d 49 00                                                               .I.
0044c01a                                                                                90 90 90 90 90 90                            ......

0044c020  uint8_t __thiscall SmartArray<DBLevelInfo,1>::grow(class SmartArray<DBLevelInfo,1>* this, uint32_t arg2)

0044c020  {
0044c020      class SmartArray<DBLevelInfo,1>* this_1 = this;
0044c023      uint32_t ebp = arg2;
0044c02d      uint32_t* eax;
0044c02d      
0044c02d      if (ebp >= this->m_num)
0044c02d      {
0044c03d          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044c03d          {
0044c11b              eax = 1;
0044c11f              return 1;
0044c03d          }
0044c03d          
0044c045          if (ebp == 0)
0044c045          {
0044c047              SmartArray<DBLevelInfo,1>::Reset(this);
0044c04e              int32_t eax_2;
0044c04e              eax_2 = 1;
0044c052              return 1;
0044c045          }
0044c045          
0044c061          eax = operator new[](((ebp * 0x48) + 4));
0044c061          
0044c06b          if (eax != 0)
0044c06b          {
0044c077              void* ebx_1 = &eax[1];
0044c07d              *(uint32_t*)eax = ebp;
0044c07f              `vector constructor iterator'(ebx_1, 0x48, ebp, DBLevelInfo::DBLevelInfo);
0044c07f              
0044c086              if (ebx_1 != 0)
0044c086              {
0044c08f                  if (this->m_data != 0)
0044c08f                  {
0044c091                      uint32_t m_num = this->m_num;
0044c091                      
0044c096                      if ((m_num - 1) >= 0)
0044c096                      {
0044c09b                          void* esi_2 = ((m_num - 1) * 0x48);
0044c09f                          arg2 = m_num;
0044c0bc                          bool cond:1_1;
0044c0bc                          
0044c0bc                          do
0044c0bc                          {
0044c0ab                              DBLevelInfo::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
0044c0b4                              esi_2 -= 0x48;
0044c0b7                              cond:1_1 = arg2 != 1;
0044c0b8                              arg2 -= 1;
0044c0bc                          } while (cond:1_1);
0044c096                      }
0044c096                      
0044c0cd                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044c0cd                      {
0044c0cf                          class DBLevelInfo* m_data = this->m_data;
0044c0cf                          
0044c0d3                          if (m_data != 0)
0044c0d3                          {
0044c0d5                              int32_t m_charbuffer = m_data->m_Resources[0x1555555555555555].m_Name.m_charbuffer;
0044c0e3                              void* esi_3 = &m_data[m_charbuffer];
0044c0e3                              
0044c0e6                              if ((m_charbuffer - 1) >= 0)
0044c0e6                              {
0044c0e9                                  arg2 = m_charbuffer;
0044c0fe                                  uint32_t i;
0044c0fe                                  
0044c0fe                                  do
0044c0fe                                  {
0044c0f0                                      esi_3 -= 0x48;
0044c0f5                                      DBLevelInfo::~DBLevelInfo(esi_3);
0044c0fa                                      i = arg2;
0044c0fa                                      arg2 -= 1;
0044c0fe                                  } while (i != 1);
0044c0e6                              }
0044c0e6                              
0044c105                              operator delete[](&m_data->m_Resources[0]);
0044c0d3                          }
0044c0cd                      }
0044c08f                  }
0044c08f                  
0044c114                  this->m_data = ebx_1;
0044c116                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
0044c11b                  eax = 1;
0044c11f                  return 1;
0044c086              }
0044c06b          }
0044c02d      }
0044c02d      
0044c124      eax = 0;
0044c128      return 0;
0044c020  }

0044c12b                                   90 90 90 90 90                                                             .....

0044c130  int32_t* __thiscall SmartArray<DBLevelInfo,1>::operator=(int32_t* arg1, int32_t* arg2)

0044c130  {
0044c14e      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
0044c14e      {
0044c16c      label_44c16c:
0044c171          class DBLevelInfo* esi_1 = *(uint32_t*)arg2;
0044c173          class DBLevelInfo* ebx_1 = *(uint32_t*)arg1;
0044c178          void* ebp_1 = &esi_1[arg2[2]];
0044c178          
0044c17d          while (esi_1 < ebp_1)
0044c17d          {
0044c183              DBLevelInfo::operator=(ebx_1, esi_1);
0044c188              esi_1 = &esi_1[1];
0044c18b              ebx_1 = &ebx_1[1];
0044c17d          }
0044c17d          
0044c196          int32_t i = arg2[2];
0044c196          
0044c19c          if (i < arg1[2])
0044c19c          {
0044c1a1              int32_t ebx_3 = (i * 0x48);
0044c1a1              
0044c1c9              do
0044c1c9              {
0044c1a8                  void var_48;
0044c1a8                  class DBLevelInfo* eax_5 = DBLevelInfo::DBLevelInfo(&var_48);
0044c1b2                  DBLevelInfo::operator=((*(uint32_t*)arg1 + ebx_3), eax_5);
0044c1bb                  DBLevelInfo::~DBLevelInfo(&var_48);
0044c1c3                  i += 1;
0044c1c4                  ebx_3 += 0x48;
0044c1c9              } while (i < arg1[2]);
0044c19c          }
0044c19c          
0044c1cf          arg1[2] = arg2[2];
0044c14e      }
0044c14e      else
0044c14e      {
0044c150          arg1[2] = 0;
0044c150          
0044c16a          if (SmartArray<DBLevelInfo,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
0044c16a              goto label_44c16c;
0044c14e      }
0044c14e      
0044c1da      return arg1;
0044c130  }

0044c1dd                                                                                         90 90 90                               ...

0044c1e0  uint8_t __thiscall SmartArray<DBLevelInfo,1>::SetNElements(class SmartArray<DBLevelInfo,1>* this, uint32_t const arg2, uint8_t arg3)

0044c1e0  {
0044c1f5      uint32_t eax_1;
0044c1f5      
0044c1f5      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
0044c1f5      {
0044c223          uint32_t const i = arg2;
0044c223          
0044c225          if (arg2 < this->m_num)
0044c225          {
0044c22c              uint32_t edi_2 = (arg2 * 0x48);
0044c22c              
0044c255              do
0044c255              {
0044c234                  void var_48;
0044c234                  class DBLevelInfo* eax_3 = DBLevelInfo::DBLevelInfo(&var_48);
0044c23e                  DBLevelInfo::operator=((this->m_data + edi_2), eax_3);
0044c247                  DBLevelInfo::~DBLevelInfo(&var_48);
0044c24f                  i += 1;
0044c250                  edi_2 += 0x48;
0044c255              } while (i < this->m_num);
0044c225          }
0044c1f5      }
0044c1f5      else
0044c1f5      {
0044c1f7          eax_1 = arg3;
0044c1fd          uint32_t const eax_2;
0044c1fd          
0044c1fd          if (eax_1 == 0)
0044c206              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
0044c1fd          else
0044c1ff              eax_2 = arg2;
0044c1ff          
0044c20e          eax_1 = SmartArray<DBLevelInfo,1>::grow(this, eax_2);
0044c20e          
0044c215          if (eax_1 == 0)
0044c21c              return eax_1;
0044c1f5      }
0044c1f5      
0044c259      this->m_num = arg2;
0044c25d      eax_1 = 1;
0044c263      return 1;
0044c1e0  }

0044c266                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0044c270  void __fastcall RenderTexture::RenderTexture(class RenderTexture* this)

0044c270  {
0044c27b      DBObj::DBObj(this, INVALID_DID.id);
0044c285      GraphicsResource::GraphicsResource(&this->vtable);
0044c294      this->vtable = 0x79b1a8;
0044c280      this->vtable = &RenderTexture::`vftable';
0044c2a0      this->m_ManagedRefCount = 0;
0044c2a3      this->m_LastManagedReleaseTime = 0f;
0044c2a6      *(uint32_t*)((char*)this->m_LastManagedReleaseTime)[4] = 0;
0044c2a9      this->m_AllowManagement = 1;
0044c291      this->m_SourceLevels.m_data = 0;
0044c291      this->m_SourceLevels.m_sizeAndDeallocate = 0;
0044c291      this->m_SourceLevels.m_num = 0;
0044c2b4      this->m_TextureType = TEXTURETYPE_UNDEFINED;
0044c2b7      this->m_nNumLevels = 0;
0044c2ba      this->m_PixelFormat = PFID_UNKNOWN;
0044c2bd      this->m_Flags = 0;
0044c2c0      this->m_bDropLevelsCalled = 0;
0044c2c3      SmartArray<DBLevelInfo,1>::Reset(&this->m_SourceLevels);
0044c2c9      this->m_nWidth = 0;
0044c2cf      this->m_nHeight = 0;
0044c2d5      this->m_nEdgeLength = 0;
0044c270  }


0044c2e0  uint32_t RenderTexture::GetDBOType(class RenderTexture const* this @ ecx) __pure

0044c2e0  {
0044c2e5      return 0x1e;
0044c2e0  }

0044c2e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0044c2f0  void* __thiscall RenderTexture::`vector deleting destructor'(class RenderTexture* this, uint32_t arg2)

0044c2f0  {
0044c2f3      /* tailcall */
0044c2f3      return RenderTexture::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0044c2f0  }

0044c2f8                                                                          cc cc cc cc cc cc cc cc                          ........

0044c300  void __fastcall RenderTexture::End(class RenderTexture* this)

0044c300  {
0044c30a      if (DBCache::IsRunTime() != 0)
0044c30e          RenderTexture::ReleaseSourceLevelReferences(this);
0044c30e      
0044c315      RenderTexture::ReleaseSourceLevelReferences(this);
0044c31e      /* tailcall */
0044c31e      return SmartArray<DBLevelInfo,1>::Reset(&this->m_SourceLevels);
0044c300  }

0044c323           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0044c330  void __fastcall RenderTexture::Destroy(class RenderTexture* this)

0044c330  {
0044c33c      if (DBCache::IsRunTime() != 0)
0044c340          RenderTexture::ReleaseSourceLevelReferences(this);
0044c340      
0044c347      RenderTexture::ReleaseSourceLevelReferences(this);
0044c351      SmartArray<DBLevelInfo,1>::Reset(&this->m_SourceLevels);
0044c35a      this->m_TextureType = TEXTURETYPE_UNDEFINED;
0044c361      this->m_nNumLevels = 0;
0044c364      this->m_PixelFormat = PFID_UNKNOWN;
0044c367      this->m_Flags = 0;
0044c36a      this->m_bDropLevelsCalled = 0;
0044c36d      SmartArray<DBLevelInfo,1>::Reset(&this->m_SourceLevels);
0044c373      this->m_nWidth = 0;
0044c379      this->m_nHeight = 0;
0044c37f      this->m_nEdgeLength = 0;
0044c330  }

0044c388                          90 90 90 90 90 90 90 90                                                          ........

0044c390  uint8_t __fastcall RenderTexture::DropUnwantedLevels(class RenderTexture* this)

0044c390  {
0044c39c      if (this->m_bDropLevelsCalled != 0)
0044c3a5          return 1;
0044c3a5      
0044c3a7      this->m_bDropLevelsCalled = 1;
0044c3b0      int32_t edi = 0;
0044c3b0      
0044c3b4      if (Render::m_pRenderer == 0)
0044c3b4      {
0044c485          class Render* eax_1;
0044c485          eax_1 = 0;
0044c48b          return 0;
0044c3b4      }
0044c3b4      
0044c3c8      uint32_t m_num;
0044c3c8      int32_t esi_1;
0044c3c8      
0044c3c8      switch (Render::m_RenderPrefs.EnvironmentTextureDetail)
0044c3c8      {
0044c3e4          case 0:
0044c3e4          {
0044c3eb              if (RenderTexture::ShouldDropHighDetail() != 0)
0044c3eb                  goto label_44c3f1;
0044c3e4              break;
0044c3e4          }
0044c3f1          case 1:
0044c3f1          {
0044c3f1          label_44c3f1:
0044c3f1              esi_1 = 1;
0044c3f1              goto label_44c3f6;
0044c3f1          }
0044c3dd          case 2:
0044c3dd          {
0044c3dd              esi_1 = 2;
0044c3e2              goto label_44c3f6;
0044c3dd          }
0044c3d6          case 3:
0044c3d6          {
0044c3d6              esi_1 = 3;
0044c3db              goto label_44c3f6;
0044c3d6          }
0044c3cf          case 4:
0044c3cf          {
0044c3cf              esi_1 = 4;
0044c3f6          label_44c3f6:
0044c3f6              m_num = this->m_SourceLevels.m_num;
0044c3f6              
0044c3ff              if (m_num > 1)
0044c3ff              {
0044c403                  if (esi_1 >= m_num)
0044c405                      esi_1 = (m_num - 1);
0044c405                  
0044c40b                  uint32_t i_1 = (m_num - esi_1);
0044c414                  void* var_c = nullptr;
0044c418                  int32_t var_8 = 0;
0044c41c                  int32_t var_4 = 0;
0044c420                  SmartArray<DBLevelInfo,1>::SetNElements(&var_c, i_1, 1);
0044c420                  
0044c427                  if (i_1 > 0)
0044c427                  {
0044c42c                      int32_t esi_3 = (esi_1 * 0x48);
0044c448                      uint32_t i;
0044c448                      
0044c448                      do
0044c448                      {
0044c43c                          DBLevelInfo::operator=(((char*)var_c + edi), (this->m_SourceLevels.m_data + esi_3));
0044c441                          edi += 0x48;
0044c444                          esi_3 += 0x48;
0044c447                          i = i_1;
0044c447                          i_1 -= 1;
0044c448                      } while (i != 1);
0044c427                  }
0044c427                  
0044c44c                  RenderTexture::ReleaseSourceLevelReferences(this);
0044c456                  SmartArray<DBLevelInfo,1>::Reset(&this->m_SourceLevels.m_data);
0044c462                  SmartArray<DBLevelInfo,1>::operator=(&this->m_SourceLevels.m_data, &var_c);
0044c46b                  SmartArray<DBLevelInfo,1>::~SmartArray<DBLevelInfo,1>(&var_c);
0044c473                  int32_t eax_5;
0044c473                  eax_5 = 1;
0044c479                  return 1;
0044c3ff              }
0044c3cf              break;
0044c3cf          }
0044c3c8      }
0044c3c8      
0044c47c      m_num = 1;
0044c482      return 1;
0044c390  }

0044c48c  uint32_t jump_table_44c48c[0x5] = 
0044c48c  {
0044c48c      [0x0] =  0x0044c3e4
0044c490      [0x1] =  0x0044c3f1
0044c494      [0x2] =  0x0044c3dd
0044c498      [0x3] =  0x0044c3d6
0044c49c      [0x4] =  0x0044c3cf
0044c4a0  }

0044c4a0  class DBObj* RenderTexture::Allocator()

0044c4a0  {
0044c4a7      if (DBCache::IsRunTime() == 0)
0044c4a7      {
0044c4c2          void* eax_2 = operator new(0x98);
0044c4c2          
0044c4cc          if (eax_2 != 0)
0044c4d0              /* tailcall */
0044c4d0              return RenderTexture::RenderTexture(eax_2);
0044c4a7      }
0044c4a7      else if (Render::m_pRenderer != 0)
0044c4ba          /* jump -> RenderDevice::render_device->vtable->CreateTexture */
0044c4ba      
0044c4d7      return 0;
0044c4a0  }

0044c4d8                                                                          90 90 90 90 90 90 90 90                          ........

0044c4e0  void* __thiscall RenderTexture::`scalar deleting destructor'(class RenderTexture* this, uint32_t arg2)

0044c4e0  {
0044c4e3      RenderTexture::~RenderTexture(this);
0044c4e3      
0044c4ed      if ((arg2 & 1) != 0)
0044c4f0          operator delete(this);
0044c4f0      
0044c4fb      return this;
0044c4e0  }

0044c4fe                                                                                            90 90                                ..

0044c500  void __fastcall RenderTexture::~RenderTexture(class RenderTexture* this)

0044c500  {
0044c508      this->vtable = 0x79b1a8;
0044c504      this->vtable = &RenderTexture::`vftable';
0044c504      
0044c51b      if (DBCache::IsRunTime() != 0)
0044c51f          RenderTexture::ReleaseSourceLevelReferences(this);
0044c51f      
0044c526      RenderTexture::ReleaseSourceLevelReferences(this);
0044c530      SmartArray<DBLevelInfo,1>::Reset(&this->m_SourceLevels);
0044c537      SmartArray<DBLevelInfo,1>::~SmartArray<DBLevelInfo,1>(&this->m_SourceLevels);
0044c53e      GraphicsResource::~GraphicsResource(&this->vtable);
0044c548      /* tailcall */
0044c548      return DBObj::~DBObj(this);
0044c500  }

0044c54d                                         90 90 90                                                               ...

0044c550  uint8_t __thiscall RenderTexture::CopyInto(class RenderTexture const* this, class DBObj* arg2)

0044c550  {
0044c554      class DBObj* ebp = arg2;
0044c55d      void* __offset(DBObj, 0x30) eax;
0044c55d      
0044c55d      if (ebp == 0)
0044c564          eax = nullptr;
0044c55d      else
0044c55f          eax = &ebp[1];
0044c55f      
0044c56a      uint8_t result = GraphicsResource::CopyInto(&this->vtable, eax);
0044c56a      
0044c571      if (result == 0)
0044c578          return result;
0044c578      
0044c57e      *(int32_t*)((char*)ebp + 0x58) = this->m_TextureType;
0044c584      *(int32_t*)((char*)ebp + 0x5c) = this->m_nNumLevels;
0044c58a      *(int32_t*)((char*)ebp + 0x60) = this->m_PixelFormat;
0044c590      *(int32_t*)((char*)ebp + 0x64) = this->m_Flags;
0044c593      uint32_t ecx_1;
0044c593      ecx_1 = this->m_bDropLevelsCalled;
0044c597      *(int32_t*)((char*)ebp + 0x68) = ecx_1;
0044c59a      uint32_t m_num = this->m_SourceLevels.m_num;
0044c5a3      RenderTexture::ReleaseSourceLevelReferences(ebp);
0044c5ad      SmartArray<DBLevelInfo,1>::Reset(((char*)ebp + 0x7c));
0044c5b7      SmartArray<DBLevelInfo,1>::SetNElements(((char*)ebp + 0x7c), m_num, 1);
0044c5c2      int32_t esi_1 = 0;
0044c5c6      int32_t var_8 = 0;
0044c5c6      
0044c5ca      if (this->m_SourceLevels.m_num > 0)
0044c5ca      {
0044c682          bool cond:3_1;
0044c682          
0044c682          do
0044c682          {
0044c5d0              int32_t var_c_1 = 6;
0044c66b              bool cond:2_1;
0044c66b              
0044c66b              do
0044c66b              {
0044c5e0                  class DBLevelInfo* m_data = this->m_SourceLevels.m_data;
0044c5e9                  int32_t* ebp_1 = *(int32_t*)((char*)ebp + 0x7c);
0044c5eb                  void* eax_5 = *(uint32_t*)((char*)ebp_1 + esi_1);
0044c5eb                  
0044c5f5                  if (eax_5 != *(uint32_t*)((char*)m_data + esi_1))
0044c5f5                  {
0044c612                      if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
0044c618                          **(uint32_t**)((char*)eax_5 - 0x14)(1);
0044c618                      
0044c61a                      int32_t ebx_1 = *(uint32_t*)((char*)m_data + esi_1);
0044c61c                      *(uint32_t*)((char*)ebp_1 + esi_1) = ebx_1;
0044c623                      InterlockedIncrement((ebx_1 - 0x10));
0044c5f5                  }
0044c5f5                  
0044c63a                  *(uint32_t*)((esi_1 + *(int32_t*)((char*)arg2 + 0x7c)) + 4) = *(uint32_t*)(&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[4] + esi_1);
0044c647                  *(uint32_t*)((esi_1 + *(int32_t*)((char*)arg2 + 0x7c)) + 8) = *(uint32_t*)(&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[8] + esi_1);
0044c64e                  int32_t* ecx_10 = *(uint32_t*)(&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[8] + esi_1);
0044c64e                  
0044c654                  if (ecx_10 != 0)
0044c658                      *(uint32_t*)(*(uint32_t*)ecx_10 + 0x10)();
0044c658                  
0044c65f                  ebp = arg2;
0044c663                  esi_1 += 0xc;
0044c666                  cond:2_1 = var_c_1 != 1;
0044c667                  var_c_1 -= 1;
0044c66b              } while (cond:2_1);
0044c67c              cond:3_1 = (var_8 + 1) < this->m_SourceLevels.m_num;
0044c67e              var_8 += 1;
0044c682          } while (cond:3_1);
0044c5ca      }
0044c5ca      
0044c68e      *(int32_t*)((char*)ebp + 0x88) = this->m_nWidth;
0044c69b      *(int32_t*)((char*)ebp + 0x8c) = this->m_nHeight;
0044c6a8      *(int32_t*)((char*)ebp + 0x90) = this->m_nEdgeLength;
0044c6af      uint32_t eax_17;
0044c6af      eax_17 = 1;
0044c6b5      return 1;
0044c550  }

0044c5da                                                                                8d 9b 00 00 00 00                            ......
0044c6b8                                                                          90 90 90 90 90 90 90 90                          ........

0044c6c0  void __thiscall RenderTexture::GetSubDataIDs(class RenderTexture const* this, class QualifiedDataIDArray* arg2)

0044c6c0  {
0044c6d5      if (DBCache::IsRunTime() != 0)
0044c6d9          RenderTexture::DropUnwantedLevels(this);
0044c6d9      
0044c6e4      int32_t i = 0;
0044c6e4      
0044c6e8      if (this->m_SourceLevels.m_num > 0)
0044c6e8      {
0044c750          do
0044c750          {
0044c6f3              int32_t esi_2 = (i * 0x48);
0044c6f6              int32_t var_14_1 = 6;
0044c745              bool cond:0_1;
0044c745              
0044c745              do
0044c745              {
0044c703                  class IDClass<_tagDataID,32,0> eax_3 = *(uint32_t*)(&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[4] + esi_2);
0044c703                  
0044c70d                  if (eax_3 != INVALID_DID.id)
0044c70d                  {
0044c70f                      uint32_t ecx_1 = 0;
0044c70f                      
0044c71c                      if ((i == 0 && this->m_SourceLevels.m_num > 1))
0044c71e                          ecx_1 = 4;
0044c71e                      
0044c734                      void var_10;
0044c734                      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, eax_3, 0), ecx_1);
0044c70d                  }
0044c70d                  
0044c73d                  esi_2 += 0xc;
0044c740                  cond:0_1 = var_14_1 != 1;
0044c741                  var_14_1 -= 1;
0044c745              } while (cond:0_1);
0044c74d              i += 1;
0044c750          } while (i < this->m_SourceLevels.m_num);
0044c6e8      }
0044c6c0  }

0044c75b                                                                                   90 90 90 90 90                             .....

0044c760  uint8_t __fastcall RenderTexture::InitLoad(class RenderTexture* this)

0044c760  {
0044c76a      if (DBCache::IsRunTime() != 0)
0044c77d          return RenderTexture::DropUnwantedLevels(this) != 0;
0044c77d      
0044c76f      return 1;
0044c760  }

0044c77e                                                                                            90 90                                ..

0044c780  void __thiscall RenderTexture::Serialize(class RenderTexture* this, class Archive* arg2)

0044c780  {
0044c786      class Archive* esi = arg2;
0044c78e      DBObj::Serialize(this, esi);
0044c793      int32_t ebx;
0044c793      ebx = this->m_TextureType;
0044c79a      Archive::CheckAlignment(esi, 1);
0044c7a3      uint8_t* eax = Archive::GetBytes(esi, 1);
0044c7a3      
0044c7aa      if (eax != 0)
0044c7aa      {
0044c7b0          if ((esi->m_flags & 1) == 0)
0044c7b6              ebx = *(uint8_t*)eax;
0044c7b0          else
0044c7b2              *(uint8_t*)eax = ebx;
0044c7aa      }
0044c7aa      
0044c7bc      if ((esi->m_flags & 5) == 0)
0044c7c1          this->m_TextureType = ((uint32_t)ebx);
0044c7c1      
0044c7c4      uint32_t m_num = this->m_SourceLevels.m_num;
0044c7ce      Archive::CheckAlignment(esi, 4);
0044c7d7      uint8_t* eax_2 = Archive::GetBytes(esi, 4);
0044c7d7      
0044c7de      if (eax_2 != 0)
0044c7de      {
0044c7e4          if ((esi->m_flags & 1) == 0)
0044c7ea              m_num = *(uint32_t*)eax_2;
0044c7e4          else
0044c7e6              *(uint32_t*)eax_2 = m_num;
0044c7de      }
0044c7de      
0044c7f4      if ((!(esi->m_flags) & 1) != 0)
0044c7f4      {
0044c7f8          RenderTexture::ReleaseSourceLevelReferences(this);
0044c802          SmartArray<DBLevelInfo,1>::Reset(&this->m_SourceLevels);
0044c80c          SmartArray<DBLevelInfo,1>::SetNElements(&this->m_SourceLevels, m_num, 1);
0044c811          this->m_bDropLevelsCalled = 0;
0044c7f4      }
0044c7f4      
0044c817      if (m_num > 0)
0044c817      {
0044c819          int32_t ebx_2 = 0;
0044c81b          int32_t var_8_1 = 0;
0044c81f          uint32_t m_num_1 = m_num;
0044c88f          bool cond:0_1;
0044c88f          
0044c88f          do
0044c88f          {
0044c82b              int32_t eax_3;
0044c82b              eax_3 = this->m_TextureType != TEXTURETYPE_CUBE;
0044c82f              void* eax_5 = ((eax_3 - 1) & 5);
0044c82f              
0044c833              if (eax_5 != 0xffffffff)
0044c833              {
0044c835                  arg2 = ((char*)eax_5 + 1);
0044c879                  bool cond:1_1;
0044c879                  
0044c879                  do
0044c879                  {
0044c847                      void* edi = (&*(uint32_t*)((char*)this->m_SourceLevels.m_data->m_Resources[0])[4] + ebx_2);
0044c84b                      Archive::CheckAlignment(esi, 4);
0044c854                      uint8_t* eax_7 = Archive::GetBytes(esi, 4);
0044c854                      
0044c85b                      if (eax_7 != 0)
0044c85b                      {
0044c861                          if ((esi->m_flags & 1) == 0)
0044c86b                              *(uint32_t*)edi = *(uint32_t*)eax_7;
0044c861                          else
0044c865                              *(uint32_t*)eax_7 = *(uint32_t*)edi;
0044c85b                      }
0044c85b                      
0044c871                      ebx_2 += 0xc;
0044c874                      cond:1_1 = arg2 != 1;
0044c875                      arg2 -= 1;
0044c879                  } while (cond:1_1);
0044c833              }
0044c833              
0044c883              ebx_2 = (var_8_1 + 0x48);
0044c886              cond:0_1 = m_num_1 != 1;
0044c887              var_8_1 = ebx_2;
0044c88b              m_num_1 -= 1;
0044c88f          } while (cond:0_1);
0044c817      }
0044c780  }

0044c89b                                                                                   90 90 90 90 90                             .....

0044c8a0  void __fastcall RenderIndexBuffer::Begin(class RenderIndexBuffer* this)

0044c8a0  {
0044c8a2      this->m_nNumIndices = 0;
0044c8a5      this->m_nActualNumIndices = 0;
0044c8a8      this->indexSize = 2;
0044c8ac      this->indices = nullptr;
0044c8af      this->staticData = 0;
0044c8b2      this->m_OnlyWriteOnce = 0;
0044c8b5      this->locked = 0;
0044c8b8      this->needRefresh = 0;
0044c8bb      this->m_bUseIndexCaching = 1;
0044c8bf      this->m_nMinVertexIndex = 0;
0044c8c2      this->m_nMaxVertexIndex = 0;
0044c8c5      this->m_bNeedRecalcMinMax = 0;
0044c8a0  }

0044c8c9                             90 90 90 90 90 90 90                                                           .......

0044c8d0  void __fastcall RenderIndexBuffer::End(class RenderIndexBuffer* this)

0044c8d0  {
0044c8d3      uint8_t* indices = this->indices;
0044c8d3      
0044c8db      if (indices != 0)
0044c8db      {
0044c8de          operator delete[](indices);
0044c8e6          this->indices = nullptr;
0044c8db      }
0044c8db      
0044c8e9      this->m_nNumIndices = 0;
0044c8ec      this->m_nActualNumIndices = 0;
0044c8d0  }

0044c8f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0044c900  uint8_t __thiscall RenderIndexBuffer::Startup(class RenderIndexBuffer* this, uint32_t const arg2, uint8_t const arg3, uint8_t const arg4, uint8_t const arg5, uint8_t const arg6)

0044c900  {
0044c909      class RenderIndexBuffer* this_1 = this;
0044c90b      this = arg3;
0044c912      this_1->staticData = arg4;
0044c919      this_1->m_nActualNumIndices = arg2;
0044c91c      this_1->m_nNumIndices = arg2;
0044c91f      this_1->indexSize = this;
0044c922      this_1->m_OnlyWriteOnce = arg5;
0044c925      uint32_t var_8;
0044c925      
0044c925      if (this != 2)
0044c933          var_8 = (arg2 << 2);
0044c925      else
0044c929          var_8 = (arg2 * 2);
0044c929      
0044c93d      this_1->indices = operator new[](var_8);
0044c945      this_1->locked = 0;
0044c948      this_1->needRefresh = 0;
0044c94b      this_1->m_nMinVertexIndex = 0;
0044c94e      this_1->m_nMaxVertexIndex = 0;
0044c951      this_1->m_bNeedRecalcMinMax = 0;
0044c954      this_1->m_bUseIndexCaching = arg6;
0044c957      int32_t eax_3;
0044c957      eax_3 = 1;
0044c95a      return 1;
0044c900  }

0044c95d                                                                                         90 90 90                               ...

0044c960  void __fastcall RenderIndexBuffer::Shutdown(class RenderIndexBuffer* this)

0044c960  {
0044c964      uint8_t* indices = this->indices;
0044c964      
0044c96b      if (indices != 0)
0044c96b      {
0044c96e          operator delete[](indices);
0044c976          this->indices = nullptr;
0044c96b      }
0044c96b      
0044c979      this->m_nNumIndices = 0;
0044c97c      this->m_nActualNumIndices = 0;
0044c97f      this->indices = nullptr;
0044c982      this->staticData = 0;
0044c985      this->m_OnlyWriteOnce = 0;
0044c988      this->locked = 0;
0044c98b      this->needRefresh = 0;
0044c98e      this->m_nMinVertexIndex = 0;
0044c991      this->m_nMaxVertexIndex = 0;
0044c994      this->m_bNeedRecalcMinMax = 0;
0044c997      this->indexSize = 2;
0044c99b      this->m_bUseIndexCaching = 1;
0044c960  }

0044c9a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0044c9b0  uint8_t* __fastcall RenderIndexBuffer::Lock(class RenderIndexBuffer* this)

0044c9b0  {
0044c9b0      uint8_t* indices = this->indices;
0044c9b3      this->locked = 1;
0044c9b7      return indices;
0044c9b0  }

0044c9b8                                                                          90 90 90 90 90 90 90 90                          ........

0044c9c0  void __fastcall RenderIndexBuffer::Unlock(class RenderIndexBuffer* this)

0044c9c0  {
0044c9c2      this->locked = 0;
0044c9c6      this->needRefresh = 1;
0044c9c9      this->m_bNeedRecalcMinMax = 1;
0044c9c0  }

0044c9cd                                         90 90 90                                                               ...

0044c9d0  void __fastcall RenderIndexBuffer::RecalculateMinMaxIndices(class RenderIndexBuffer const* this)

0044c9d0  {
0044c9e1      if ((this->m_bNeedRecalcMinMax != 0 && this->m_bUseIndexCaching != 0))
0044c9e1      {
0044c9e7          uint8_t* indices = this->indices;
0044c9ec          this->m_nMaxVertexIndex = 0;
0044c9ef          this->m_nMinVertexIndex = 0;
0044c9ef          
0044c9f2          if (indices != 0)
0044c9f2          {
0044c9f4              uint32_t m_nNumIndices = this->m_nNumIndices;
0044c9f4              
0044c9f9              if (m_nNumIndices != 0)
0044c9f9              {
0044c9fc                  int32_t i = 0;
0044c9fe                  bool cond:1_1 = this->indexSize != 2;
0044ca02                  this->m_nMinVertexIndex = 0xffffffff;
0044ca09                  this->m_nMaxVertexIndex = 0;
0044ca09                  
0044ca0c                  if (cond:1_1)
0044ca0c                  {
0044ca3b                      if (m_nNumIndices > 0)
0044ca3b                      {
0044ca5d                          do
0044ca5d                          {
0044ca40                              uint32_t edx_4 = *(uint32_t*)indices;
0044ca40                              
0044ca45                              if (edx_4 < this->m_nMinVertexIndex)
0044ca47                                  this->m_nMinVertexIndex = edx_4;
0044ca47                              
0044ca4a                              uint32_t edx_5 = *(uint32_t*)indices;
0044ca4a                              
0044ca4f                              if (edx_5 > this->m_nMaxVertexIndex)
0044ca51                                  this->m_nMaxVertexIndex = edx_5;
0044ca51                              
0044ca57                              i += 1;
0044ca58                              indices = &indices[4];
0044ca5d                          } while (i < this->m_nNumIndices);
0044ca3b                      }
0044ca0c                  }
0044ca0c                  else if (m_nNumIndices > 0)
0044ca10                  {
0044ca31                      do
0044ca31                      {
0044ca12                          uint32_t edx_1 = ((uint32_t)*(uint16_t*)indices);
0044ca12                          
0044ca18                          if (edx_1 < this->m_nMinVertexIndex)
0044ca1a                              this->m_nMinVertexIndex = edx_1;
0044ca1a                          
0044ca1d                          uint32_t edx_2 = ((uint32_t)*(uint16_t*)indices);
0044ca1d                          
0044ca23                          if (edx_2 > this->m_nMaxVertexIndex)
0044ca25                              this->m_nMaxVertexIndex = edx_2;
0044ca25                          
0044ca2b                          i += 1;
0044ca2c                          indices = &indices[2];
0044ca31                      } while (i < this->m_nNumIndices);
0044ca31                      
0044ca34                      this->m_bNeedRecalcMinMax = 0;
0044ca38                      return;
0044ca10                  }
0044ca10                  
0044ca5f                  this->m_bNeedRecalcMinMax = 0;
0044c9f9              }
0044c9f2          }
0044c9e1      }
0044c9d0  }

0044ca65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0044ca70  void* __thiscall RenderIndexBuffer::`scalar deleting destructor'(class RenderIndexBuffer* this, uint32_t arg2)

0044ca70  {
0044ca73      this->vtable = 0x79b26c;
0044ca79      RenderIndexBuffer::End(this);
0044ca79      
0044ca83      if ((arg2 & 1) != 0)
0044ca86          operator delete(this);
0044ca86      
0044ca91      return this;
0044ca70  }

0044ca94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0044caa0  class RenderIndexBuffer* RenderIndexBuffer::AllocateIndexBuffer()

0044caa0  {
0044caaa      if (Render::m_pRenderer != 0)
0044cab5          /* jump -> RenderDevice::render_device->vtable->CreateIndexBuffer */
0044cab5      
0044caba      void* result = operator new(0x28);
0044caba      
0044cac4      if (result == 0)
0044caf7          return 0;
0044caf7      
0044cac6      *(uint32_t*)((char*)result + 4) = 0;
0044cac9      *(uint32_t*)((char*)result + 8) = 0;
0044cacc      *(uint32_t*)((char*)result + 0x10) = 0;
0044cacf      *(uint8_t*)((char*)result + 0x14) = 0;
0044cad2      *(uint8_t*)((char*)result + 0x15) = 0;
0044cad5      *(uint8_t*)((char*)result + 0x16) = 0;
0044cad8      *(uint8_t*)((char*)result + 0x17) = 0;
0044cadb      *(uint32_t*)((char*)result + 0x1c) = 0;
0044cade      *(uint32_t*)((char*)result + 0x20) = 0;
0044cae1      *(uint8_t*)((char*)result + 0x24) = 0;
0044cae4      *(uint32_t*)result = 0x79b26c;
0044caea      *(uint8_t*)((char*)result + 0xc) = 2;
0044caee      *(uint8_t*)((char*)result + 0x18) = 1;
0044caf3      return result;
0044caa0  }

0044caf8                                                                          90 90 90 90 90 90 90 90                          ........

0044cb00  uint8_t __thiscall RenderIndexBuffer::SetRenderIndexBuffer(class RenderIndexBuffer* this, class RenderIndexBuffer const* arg2)

0044cb00  {
0044cb02      class RenderIndexBuffer* esi = arg2;
0044cb09      arg2 = esi->m_OnlyWriteOnce;
0044cb0f      int32_t eax_1;
0044cb0f      eax_1 = esi->m_bUseIndexCaching;
0044cb1e      int32_t eax_2;
0044cb1e      eax_2 = esi->staticData;
0044cb23      int32_t ecx_1;
0044cb23      ecx_1 = esi->indexSize;
0044cb2e      char result = this->vtable->Startup(esi->m_nActualNumIndices, ecx_1, eax_2, arg2, eax_1);
0044cb2e      
0044cb33      if (result == 0)
0044cb37          return result;
0044cb37      
0044cb3a      uint32_t m_nNumIndices = esi->m_nNumIndices;
0044cb3d      uint32_t m_nActualNumIndices = this->m_nActualNumIndices;
0044cb3d      
0044cb44      if (m_nNumIndices <= m_nActualNumIndices)
0044cb44      {
0044cb46          this->m_nNumIndices = m_nNumIndices;
0044cb49          this->m_bNeedRecalcMinMax = 1;
0044cb4c          this->needRefresh = 1;
0044cb44      }
0044cb44      
0044cb50      uint8_t* indices = this->indices;
0044cb55      this->locked = 1;
0044cb55      
0044cb58      if (indices == 0)
0044cb58      {
0044cb5a          this->vtable->Shutdown();
0044cb63          int32_t eax_4;
0044cb63          eax_4 = 0;
0044cb66          return 0;
0044cb58      }
0044cb58      
0044cb70      int32_t ecx_5 = (((uint32_t)this->indexSize) * m_nActualNumIndices);
0044cb78      int32_t esi_2;
0044cb78      int32_t edi;
0044cb78      edi = __builtin_memcpy(indices, esi->indices, ((ecx_5 >> 2) << 2));
0044cb7f      __builtin_memcpy(edi, esi_2, (ecx_5 & 3));
0044cb83      this->locked = 0;
0044cb87      this->needRefresh = 1;
0044cb8a      this->m_bNeedRecalcMinMax = 1;
0044cb8e      return 1;
0044cb00  }

0044cb91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0044cba0  void __thiscall RenderIndexBuffer::Serialize(class RenderIndexBuffer* this, class Archive* arg2)

0044cba0  {
0044cbad      Archive::CheckAlignment(arg2, 4);
0044cbb6      uint8_t* eax = Archive::GetBytes(arg2, 4);
0044cbb6      
0044cbc2      if (eax != 0)
0044cbc2      {
0044cbc7          if ((arg2->m_flags & 1) == 0)
0044cbd2              this->m_nActualNumIndices = *(uint32_t*)eax;
0044cbc7          else
0044cbcc              *(uint32_t*)eax = this->m_nActualNumIndices;
0044cbc2      }
0044cbc2      
0044cbd5      eax = arg2->m_flags;
0044cbd8      eax = !(eax);
0044cbdc      char eax_2;
0044cbdc      
0044cbdc      if ((1 & eax) != 0)
0044cbeb          eax_2 = this->vtable->Startup(this->m_nActualNumIndices, 2, 1, 1, 1);
0044cbeb      
0044cbf0      if (((1 & eax) == 0 || eax_2 != 0))
0044cbf0      {
0044cbf2          uint8_t* indices = this->indices;
0044cbf7          this->locked = 1;
0044cbf7          
0044cbfa          if (indices != 0)
0044cbfa          {
0044cc14              Serializer::SerializeBytes(indices, (((uint32_t)this->indexSize) * this->m_nNumIndices), arg2);
0044cc1d              this->needRefresh = 1;
0044cc20              this->m_bNeedRecalcMinMax = 1;
0044cc23              this->locked = 0;
0044cc29              return;
0044cbfa          }
0044cbf0      }
0044cbf0      
0044cbfe      Archive::RaiseError(arg2);
0044cba0  }

0044cc2c                                      90 90 90 90                                                              ....

0044cc30  class RenderIndexBuffer* __fastcall RenderIndexBuffer::Duplicate(class RenderIndexBuffer const* this)

0044cc30  {
0044cc37      void* result_1 = operator new(0x28);
0044cc43      void* result;
0044cc43      
0044cc43      if (result_1 == 0)
0044cc75          result = nullptr;
0044cc43      else
0044cc43      {
0044cc45          *(uint32_t*)result_1 = 0x79b26c;
0044cc4b          *(uint32_t*)((char*)result_1 + 4) = 0;
0044cc4e          *(uint32_t*)((char*)result_1 + 8) = 0;
0044cc51          *(uint8_t*)((char*)result_1 + 0xc) = 2;
0044cc55          *(uint32_t*)((char*)result_1 + 0x10) = 0;
0044cc58          *(uint8_t*)((char*)result_1 + 0x14) = 0;
0044cc5b          *(uint8_t*)((char*)result_1 + 0x15) = 0;
0044cc5e          *(uint8_t*)((char*)result_1 + 0x16) = 0;
0044cc61          *(uint8_t*)((char*)result_1 + 0x17) = 0;
0044cc64          *(uint8_t*)((char*)result_1 + 0x18) = 1;
0044cc68          *(uint32_t*)((char*)result_1 + 0x1c) = 0;
0044cc6b          *(uint32_t*)((char*)result_1 + 0x20) = 0;
0044cc6e          *(uint8_t*)((char*)result_1 + 0x24) = 0;
0044cc71          result = result_1;
0044cc43      }
0044cc43      
0044cc81      if (RenderIndexBuffer::SetRenderIndexBuffer(result, this) != 0)
0044cc9a          return result;
0044cc9a      
0044cc85      if (result != 0)
0044cc8d          **(uint32_t**)result(1);
0044cc8d      
0044cc94      return 0;
0044cc30  }

0044cc9b                                                                                   90 90 90 90 90                             .....

0044cca0  void __fastcall AutoStoreVersionArchive::AutoStoreVersionArchive(class AutoStoreVersionArchive* this)

0044cca0  {
0044cca6      this->vtable = 0x792b3c;
0044ccac      this->m_flags = 0;
0044ccb2      this->m_hrError.m_val = 0;
0044ccb5      SmartBuffer::SmartBuffer(&this->m_buffer);
0044ccba      this->m_currOffset = 0;
0044ccbd      this->m_pcUserDataHash = nullptr;
0044ccc0      this->m_pVersionStack = nullptr;
0044ccc3      this->vtable = &AutoStoreVersionArchive::`vftable';
0044ccc9      this->m_SerializeVersionRow.vtable = 0x799a90;
0044ccd0      this->m_SerializeVersionRow.m_rowInitialData.vtable = 0x794430;
0044ccda      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_num = 0;
0044ccdd      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_data = &this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_aPrimitiveInplaceMemory;
0044cce0      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_sizeAndDeallocate = 8;
0044cce8      this->m_bOnSerializingDoneCalled = 1;
0044cca0  }

0044ccf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0044cd00  uint8_t __thiscall RenderIndexBuffer::FromFileNode(class RenderIndexBuffer* this, class PFileNode const* arg2)

0044cd00  {
0044cd15      if (arg2 != 0)
0044cd15      {
0044cd1b          class PStringBase<char> i_1 = "IndexArray";
0044cd24          void* const var_94;
0044cd24          PStringBase<char>::PStringBase<char>(&var_94, i_1);
0044cd2d          i_1 = &var_94;
0044cd30          uint8_t eax_1 = PFileNode::IsKeyword(arg2, i_1);
0044cd3f          int32_t* edi_2 = ((char*)var_94 - 0x14);
0044cd45          i_1 = &edi_2[1];
0044cd46          uint8_t var_98 = eax_1;
0044cd46          
0044cd52          if ((InterlockedDecrement(i_1) == 0 && edi_2 != 0))
0044cd52          {
0044cd54              int32_t edx_1 = *(uint32_t*)edi_2;
0044cd56              i_1 = 1;
0044cd5a              *(uint32_t*)edx_1(i_1);
0044cd52          }
0044cd52          
0044cd5c          int32_t eax_2;
0044cd5c          eax_2 = var_98;
0044cd62          char ebx;
0044cd62          
0044cd62          if (eax_2 != 0)
0044cd62          {
0044cd64              ebx = 1;
0044cdb5          label_44cdb5:
0044cdb5              struct AutoStoreVersionArchive::VTable* const var_84;
0044cdb5              AutoStoreVersionArchive::AutoStoreVersionArchive(&var_84);
0044cdbc              uint32_t* edi_5;
0044cdbc              
0044cdbc              if (ebx == 0)
0044cdbc              {
0044cdd3                  void var_90;
0044cdd3                  SmartBuffer::SmartBuffer(&var_90);
0044cdda                  class PFileNode* eax_6;
0044cdda                  class PStringBase<char> i_4;
0044cdda                  eax_6 = PFileNode::GetLeaf(arg2);
0044cde1                  uint8_t eax_7;
0044cde1                  
0044cde1                  if (eax_6 != 0)
0044cde1                  {
0044cde7                      i_1 = &var_90;
0044cdea                      eax_7 = PFileNode::GetNameAsBinary(eax_6, i_1);
0044cde1                  }
0044cde1                  
0044cdf1                  if ((eax_6 == 0 || eax_7 == 0))
0044cdf1                  {
0044cdf3                      i_1 = i_4;
0044cdfb                      PStringBase<char>::PStringBase<char>(&i_1, "corrupt index data");
0044ce01                      PFileNode::ReportError(arg2, i_1);
0044ce0d                      SmartBuffer::~SmartBuffer(&var_90);
0044ce16                      AutoStoreVersionArchive::~AutoStoreVersionArchive(&var_84);
0044ce1b                      int32_t eax_8;
0044ce1b                      eax_8 = 0;
0044ce27                      return 0;
0044cdf1                  }
0044cdf1                  
0044ce2e                  i_1 = &var_90;
0044ce33                  AutoStoreVersionArchive::InitForUnpacking(&var_84, i_1);
0044ce3c                  i_1 = &var_84;
0044ce3d                  edi_5 = &this->m_nActualNumIndices;
0044ce41                  Serializer::SerializeObject(edi_5, i_1);
0044ce4d                  SmartBuffer::~SmartBuffer(&var_90);
0044cdbc              }
0044cdbc              else
0044cdbc              {
0044cdc0                  edi_5 = &this->m_nActualNumIndices;
0044cec5                  ADJ(edi_5)->m_nActualNumIndices = PFileNode::GetNumSubNodes(arg2);
0044cdbc              }
0044cdbc              
0044ce52              uint32_t m_nActualNumIndices = ADJ(edi_5)->m_nActualNumIndices;
0044ce52              
0044ce56              if (m_nActualNumIndices > 0)
0044ce56              {
0044ce5c                  struct RenderIndexBuffer::VTable* vtable_1 = this->vtable;
0044ce5e                  i_1 = 1;
0044ce5e                  
0044ce6e                  if (vtable_1->Startup(m_nActualNumIndices, 2, 1, 1, i_1) == 0)
0044ce6e                  {
0044ceed                  label_44ceed:
0044ceed                      AutoStoreVersionArchive::~AutoStoreVersionArchive(&var_84);
0044cef2                      int32_t eax_14;
0044cef2                      eax_14 = 0;
0044cefe                      return 0;
0044ce6e                  }
0044ce6e                  
0044ce73                  bool cond:2_1 = this->indices == 0;
0044ce75                  this->locked = 1;
0044ce75                  
0044ce79                  if (cond:2_1)
0044ce79                      goto label_44ceed;
0044ce79                  
0044ce7b                  uint32_t m_nNumIndices = this->m_nNumIndices;
0044ce7e                  class PStringBase<char> i = 0;
0044ce7e                  
0044ce82                  if (ebx == 0)
0044ce82                  {
0044cf03                      if (m_nNumIndices > 0)
0044cf03                      {
0044cf29                          do
0044cf29                          {
0044cf09                              i_1 = &var_84;
0044cf0f                              Serializer::SerializeObject(&var_98, i_1);
0044cf1f                              *(uint16_t*)(this->indices + (i << 1)) = var_98;
0044cf26                              i += 1;
0044cf29                          } while (i < this->m_nNumIndices);
0044cf03                      }
0044ce82                  }
0044ce82                  else if (m_nNumIndices > 0)
0044ce86                  {
0044ce90                      while (true)
0044ce90                      {
0044ce90                          struct PFileNode::VTable* vtable = arg2->vtable;
0044ce93                          i_1 = i;
0044ce96                          var_94 = nullptr;
0044ce9e                          class PFileNode* eax_11 = vtable->GetSubNode(i_1);
0044cea5                          i_1 = &var_94;
0044cea8                          int16_t eax_12;
0044cea8                          class PStringBase<char> i_5;
0044cea8                          eax_12 = PFileNode::GetNameAsUInt32(eax_11, i_1);
0044cea8                          
0044ceaf                          if (eax_12 == 0)
0044ceaf                          {
0044cec7                              i_1 = i_5;
0044cecf                              PStringBase<char>::PStringBase<char>(&i_1, "unable to parse indices");
0044ced5                              PFileNode::ReportError(arg2, i_1);
0044cedd                              this->locked = 0;
0044cee1                              this->needRefresh = 1;
0044cee5                              this->m_bNeedRecalcMinMax = 1;
0044cee5                              break;
0044ceaf                          }
0044ceaf                          
0044ceb9                          *(uint16_t*)(this->indices + (i << 1)) = var_94;
0044cec0                          i += 1;
0044cec0                          
0044cec3                          if (i >= this->m_nNumIndices)
0044cec3                              goto label_44cf2b;
0044ce90                      }
0044ce90                      
0044ceaf                      goto label_44ceed;
0044ce86                  }
0044ce86                  
0044cf2b              label_44cf2b:
0044cf2b                  this->locked = 0;
0044cf2f                  this->needRefresh = 1;
0044cf33                  this->m_bNeedRecalcMinMax = 1;
0044ce56              }
0044ce56              
0044cf3b              AutoStoreVersionArchive::OnSerializingDone(&var_84);
0044cf50              var_84 = &AutoStoreVersionArchive::`vftable';
0044cf58              int32_t var_4c;
0044cf58              
0044cf58              if ((var_4c & 0x80000000) == 0x80000000)
0044cf58              {
0044cf5e                  class PStringBase<char> i_2;
0044cf5e                  i_1 = i_2;
0044cf5f                  operator delete[](i_1);
0044cf58              }
0044cf58              
0044cf6b              Archive::~Archive(&var_84);
0044cf70              int32_t eax_18;
0044cf70              eax_18 = 1;
0044cf7c              return 1;
0044cd62          }
0044cd62          
0044cd68          i_1 = "BinaryIndexArray";
0044cd71          PStringBase<char>::PStringBase<char>(&var_94, i_1);
0044cd7a          i_1 = &var_94;
0044cd7d          uint8_t eax_3 = PFileNode::IsKeyword(arg2, i_1);
0044cd86          void* edi_4 = ((char*)var_94 - 0x14);
0044cd8c          i_1 = ((char*)edi_4 + 4);
0044cd8d          var_98 = eax_3;
0044cd91          int32_t eax_4;
0044cd91          class PStringBase<char> i_3;
0044cd91          eax_4 = InterlockedDecrement(i_1);
0044cd91          
0044cd99          if ((eax_4 == 0 && edi_4 != 0))
0044cd99          {
0044cd9b              int32_t edx_2 = *(uint32_t*)edi_4;
0044cd9d              i_1 = 1;
0044cda1              eax_4 = *(uint32_t*)edx_2(i_1);
0044cd99          }
0044cd99          
0044cda3          eax_4 = var_98;
0044cda3          
0044cda9          if (eax_4 != 0)
0044cda9          {
0044cdaf              ebx = 0;
0044cdaf              goto label_44cdb5;
0044cda9          }
0044cda9          
0044cf7f          i_1 = i_3;
0044cf87          PStringBase<char>::PStringBase<char>(&i_1, "unable to parse indices");
0044cf8d          PFileNode::ReportError(arg2, i_1);
0044cd15      }
0044cd15      
0044cf98      int32_t eax;
0044cf98      eax = 0;
0044cfa1      return 0;
0044cd00  }

0044cfa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0044cfb0  uint8_t __fastcall MaterialInstance::Refresh(class MaterialInstance* this, class IDClass<_tagDataID,32,0> arg2)

0044cfb0  {
0044cfb2      this->m_bNeedRefresh = 1;
0044cfb5      return 1;
0044cfb0  }

0044cfb8                                                                          90 90 90 90 90 90 90 90                          ........

0044cfc0  void __fastcall MaterialInstance::Begin(class MaterialInstance* this)

0044cfc0  {
0044cfc4      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0044cfd0      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0044cfd6      class PSRefBufferCharData<char>* m_charbuffer = this->m_materialName.m_charbuffer;
0044cfd6      
0044cfdb      if (m_charbuffer != PStringBase<char>::s_NullBuffer_2)
0044cfdb      {
0044cff0          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0044cff8              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0044cff8          
0044cffb          this->m_materialName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0044cffe          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0044cfdb      }
0044cfdb      
0044d019      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
0044d021          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
0044d021      
0044d028      this->m_materialID.id = INVALID_DID.id;
0044d02b      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_materialTypeName.m_charbuffer;
0044d02b      
0044d034      if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer)
0044d034      {
0044d045          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0044d04d              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0044d04d          
0044d04f          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044d05a          this->m_materialTypeName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0044d05d          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0044d034      }
0044d034      
0044d066      this->m_materialType = 2;
0044d06d      this->m_AllowStencilShadows = 1;
0044d071      this->m_WantDiscardGeometry = 0;
0044d075      this->m_pMaterial = nullptr;
0044d078      this->m_pModifiedMaterial = nullptr;
0044d07b      this->m_bNeedRefresh = 1;
0044cfc0  }

0044d083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0044d090  void __thiscall MaterialInstance::GetSubDataIDs(class MaterialInstance const* this, class QualifiedDataIDArray* arg2)

0044d090  {
0044d09b      uint32_t id = this->m_materialID.id;
0044d0a5      void var_8;
0044d0a5      
0044d0a5      if (id != INVALID_DID.id)
0044d0b8          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, id, 0), 0);
0044d0b8      
0044d0c0      int32_t i = 0;
0044d0c0      
0044d0c4      if (this->m_aModifierRefs.m_num > 0)
0044d0c4      {
0044d0f7          do
0044d0f7          {
0044d0c9              void* eax_3 = this->m_aModifierRefs.m_data[i];
0044d0c9              
0044d0ce              if (eax_3 != 0)
0044d0ce              {
0044d0d0                  class IDClass<_tagDataID,32,0> eax_4 = *(uint32_t*)((char*)eax_3 + 4);
0044d0d0                  
0044d0d9                  if (eax_4 != INVALID_DID.id)
0044d0ec                      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, eax_4, 0), 0);
0044d0ce              }
0044d0ce              
0044d0f4              i += 1;
0044d0f7          } while (i < this->m_aModifierRefs.m_num);
0044d0c4      }
0044d090  }

0044d102        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0044d110  uint8_t __fastcall MaterialInstance::ReleaseSubObjects(class MaterialInstance* this)

0044d110  {
0044d114      class RenderMaterial* m_pModifiedMaterial = this->m_pModifiedMaterial;
0044d114      
0044d11b      if (m_pModifiedMaterial != 0)
0044d11b      {
0044d11d          m_pModifiedMaterial->vtable->Release();
0044d122          this->m_pModifiedMaterial = nullptr;
0044d11b      }
0044d11b      
0044d125      class RenderMaterial* m_pMaterial = this->m_pMaterial;
0044d125      
0044d12a      if (m_pMaterial != 0)
0044d12a      {
0044d12c          m_pMaterial->vtable->Release();
0044d131          this->m_pMaterial = nullptr;
0044d12a      }
0044d12a      
0044d13c      if (this->m_aModifiers.m_num > 0)
0044d13c      {
0044d13e          int32_t i = 0;
0044d13e          
0044d15b          do
0044d15b          {
0044d143              int32_t* ecx = this->m_aModifiers.m_data[i];
0044d143              
0044d148              if (ecx != 0)
0044d148              {
0044d14c                  *(uint32_t*)(*(uint32_t*)ecx + 0x14)();
0044d14f                  this->m_aModifiers.m_data[i] = 0;
0044d148              }
0044d148              
0044d158              i += 1;
0044d15b          } while (i < this->m_aModifiers.m_num);
0044d13c      }
0044d13c      
0044d15d      uint32_t m_sizeAndDeallocate = this->m_aModifiers.m_sizeAndDeallocate;
0044d16e      this->m_aModifiers.m_num = 0;
0044d16e      
0044d172      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044d172      {
0044d178          operator delete[](this->m_aModifiers.m_data);
0044d180          this->m_aModifiers.m_data = 0;
0044d183          this->m_aModifiers.m_sizeAndDeallocate = 0;
0044d187          int32_t eax_6;
0044d187          eax_6 = 1;
0044d18a          return 1;
0044d172      }
0044d172      
0044d18e      if (this->m_aModifiers.m_data != 0)
0044d18e      {
0044d190          int32_t eax_7 = (m_sizeAndDeallocate & 0x7fffffff);
0044d195          m_sizeAndDeallocate = (eax_7 - 1);
0044d195          
0044d196          if ((eax_7 - 1) >= 0)
0044d196          {
0044d1a0              uint32_t m_sizeAndDeallocate_1;
0044d1a0              
0044d1a0              do
0044d1a0              {
0044d198                  m_sizeAndDeallocate_1 = m_sizeAndDeallocate;
0044d198                  m_sizeAndDeallocate -= 1;
0044d199                  this->m_aModifiers.m_data[(m_sizeAndDeallocate + 1)] = 0;
0044d1a0              } while ((m_sizeAndDeallocate_1 - 1) >= 0);
0044d196          }
0044d18e      }
0044d18e      
0044d1a3      m_sizeAndDeallocate = 1;
0044d1a6      return 1;
0044d110  }

0044d1a7                       90 90 90 90 90 90 90 90 90                                                         .........

0044d1b0  void __fastcall MaterialInstance::MaterialInstance(class MaterialInstance* this)

0044d1b0  {
0044d1ba      DBObj::DBObj(this, INVALID_DID.id);
0044d1c5      this->vtable = 0x79b2e0;
0044d1cb      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0044d1d7      this->m_materialName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0044d1da      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0044d1dc      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044d1e7      this->m_materialTypeName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0044d1ea      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0044d1ee      this->m_aModifierRefs.m_data = 0;
0044d1f1      this->m_aModifierRefs.m_sizeAndDeallocate = 0;
0044d1f4      this->m_aModifierRefs.m_num = 0;
0044d1f9      this->m_aModifiers.m_data = 0;
0044d1fc      this->m_aModifiers.m_sizeAndDeallocate = 0;
0044d1ff      this->m_aModifiers.m_num = 0;
0044d202      MaterialInstance::Begin(this);
0044d1b0  }

0044d20c                                      90 90 90 90                                                              ....

0044d210  uint32_t MaterialInstance::GetDBOType(class MaterialInstance const* this @ ecx) __pure

0044d210  {
0044d215      return 0x21;
0044d210  }

0044d216                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0044d220  class DBObj* MaterialInstance::Allocate(class MaterialInstance const* this @ ecx)

0044d220  {
0044d220      /* tailcall */
0044d220      return MaterialInstance::Allocator();
0044d220  }

0044d225                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0044d230  class DBObj* MaterialInstance::Allocator()

0044d230  {
0044d232      void* eax = operator new(0x68);
0044d232      
0044d23c      if (eax == 0)
0044d247          return 0;
0044d247      
0044d240      /* tailcall */
0044d240      return MaterialInstance::MaterialInstance(eax);
0044d230  }

0044d248                          90 90 90 90 90 90 90 90                                                          ........

0044d250  void __fastcall MaterialInstance::End(class MaterialInstance* this)

0044d250  {
0044d254      MaterialInstance::ReleaseSubObjects(this);
0044d259      class RenderMaterial* m_pModifiedMaterial = this->m_pModifiedMaterial;
0044d259      
0044d260      if (m_pModifiedMaterial != 0)
0044d260      {
0044d262          m_pModifiedMaterial->vtable->Release();
0044d267          this->m_pModifiedMaterial = nullptr;
0044d260      }
0044d260      
0044d26e      int32_t i = 0;
0044d26e      
0044d272      if (this->m_aModifierRefs.m_num > 0)
0044d272      {
0044d2b5          do
0044d2b5          {
0044d278              int32_t* ebx_1 = this->m_aModifierRefs.m_data[i];
0044d278              
0044d27d              if (ebx_1 != 0)
0044d27d              {
0044d281                  int32_t* edi_2 = (*(uint32_t*)ebx_1 - 0x14);
0044d281                  
0044d294                  if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0044d29c                      **(uint32_t**)edi_2(1);
0044d29c                  
0044d29f                  operator delete(ebx_1);
0044d27d              }
0044d27d              
0044d2a9              this->m_aModifierRefs.m_data[i] = 0;
0044d2b2              i += 1;
0044d2b5          } while (i < this->m_aModifierRefs.m_num);
0044d272      }
0044d272      
0044d2b8      uint32_t m_sizeAndDeallocate = this->m_aModifierRefs.m_sizeAndDeallocate;
0044d2c9      this->m_aModifierRefs.m_num = 0;
0044d2c9      
0044d2cd      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044d2cd      {
0044d2d3          operator delete[](this->m_aModifierRefs.m_data);
0044d2db          this->m_aModifierRefs.m_data = 0;
0044d2de          this->m_aModifierRefs.m_sizeAndDeallocate = 0;
0044d2e3          return;
0044d2cd      }
0044d2cd      
0044d2e7      if (this->m_aModifierRefs.m_data != 0)
0044d2e7      {
0044d2e9          int32_t eax_7 = (m_sizeAndDeallocate & 0x7fffffff);
0044d2ee          int32_t eax_8 = (eax_7 - 1);
0044d2ee          
0044d2ef          if ((eax_7 - 1) >= 0)
0044d2ef          {
0044d2f9              int32_t temp1_1;
0044d2f9              
0044d2f9              do
0044d2f9              {
0044d2f1                  temp1_1 = eax_8;
0044d2f1                  eax_8 -= 1;
0044d2f2                  this->m_aModifierRefs.m_data[(eax_8 + 1)] = 0;
0044d2f9              } while ((temp1_1 - 1) >= 0);
0044d2ef          }
0044d2e7      }
0044d250  }

0044d2fe                                                                                            90 90                                ..

0044d300  uint8_t __thiscall MaterialInstance::CopyInto(class MaterialInstance const* this, class DBObj* arg2)

0044d300  {
0044d30e      class MaterialInstance* this_1 = this;
0044d31a      void* eax_1 = *(int32_t*)((char*)arg2 + 0x30);
0044d31a      
0044d31e      if (eax_1 != this->m_materialName.m_charbuffer)
0044d31e      {
0044d333          if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
0044d33b              **(uint32_t**)((char*)eax_1 - 0x14)(1);
0044d33b          
0044d33d          class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_materialName.m_charbuffer;
0044d33f          *(int32_t*)((char*)arg2 + 0x30) = m_charbuffer_1;
0044d345          InterlockedIncrement(&m_charbuffer_1[-1]);
0044d34b          this = this_1;
0044d31e      }
0044d31e      
0044d352      *(int32_t*)((char*)arg2 + 0x34) = this->m_materialID.id;
0044d359      void* eax_5 = *(int32_t*)((char*)arg2 + 0x38);
0044d359      
0044d364      if (eax_5 != this_1->m_materialTypeName.m_charbuffer)
0044d364      {
0044d379          if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
0044d381              **(uint32_t**)((char*)eax_5 - 0x14)(1);
0044d381          
0044d383          class PSRefBufferCharData<char>* m_charbuffer = this_1->m_materialTypeName.m_charbuffer;
0044d385          *(int32_t*)((char*)arg2 + 0x38) = m_charbuffer;
0044d38c          InterlockedIncrement(&m_charbuffer[-1]);
0044d364      }
0044d364      
0044d399      *(int32_t*)((char*)arg2 + 0x3c) = this_1->m_materialType;
0044d3a0      class MaterialInstance* eax_8;
0044d3a0      eax_8 = this_1->m_AllowStencilShadows;
0044d3a3      *(int32_t*)((char*)arg2 + 0x4c) = eax_8;
0044d3aa      class MaterialInstance* edx_3;
0044d3aa      edx_3 = this_1->m_WantDiscardGeometry;
0044d3ad      *(int32_t*)((char*)arg2 + 0x4d) = edx_3;
0044d3b0      class MaterialInstance* this_2 = this_1;
0044d3b7      int32_t i = 0;
0044d3bb      int32_t i_2 = 0;
0044d3bf      class ModifierRef** eax_9;
0044d3bf      
0044d3bf      if (this_2->m_aModifierRefs.m_num > 0)
0044d3bf      {
0044d48a          do
0044d48a          {
0044d3d7              if (this_2->m_aModifierRefs.m_data[i] == 0)
0044d3d7                  goto label_44d5c5;
0044d3d7              
0044d3df              eax_9 = operator new(8);
0044d3df              
0044d3eb              if (eax_9 == 0)
0044d3eb                  goto label_44d5c5;
0044d3eb              
0044d3f1              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044d3fd              *(uint32_t*)eax_9 = PStringBase<char>::s_NullBuffer_1;
0044d3ff              InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0044d40c              int32_t* edi_3 = this_1->m_aModifierRefs.m_data[i];
0044d40f              class ModifierRef* eax_11 = *(uint32_t*)eax_9;
0044d40f              
0044d413              if (eax_11 != *(uint32_t*)edi_3)
0044d413              {
0044d428                  if ((InterlockedDecrement(&eax_11[-2]) == 0 && eax_11 != 0x14))
0044d430                      *(uint32_t*)*(int32_t*)((char*)eax_11 + -0x14)(1);
0044d430                  
0044d432                  class ModifierRef* eax_14 = *(uint32_t*)edi_3;
0044d434                  *(uint32_t*)eax_9 = eax_14;
0044d43a                  InterlockedIncrement(&eax_14[-2]);
0044d440                  i = i_2;
0044d413              }
0044d413              
0044d44a              eax_9[1] = edi_3[1];
0044d453              int32_t eax_17 = (*(int32_t*)((char*)((char*)arg2 + 0x40) + 4) & 0x7fffffff);
0044d453              
0044d45a              if (*(int32_t*)((char*)((char*)arg2 + 0x40) + 8) < eax_17)
0044d45a              {
0044d476                  *(uint32_t*)(((char*)arg2 + 0x40)->m_charbuffer + (*(int32_t*)((char*)((char*)arg2 + 0x40) + 8) << 2)) = eax_9;
0044d479                  *(int32_t*)((char*)((char*)arg2 + 0x40) + 8) += 1;
0044d45a              }
0044d45a              else if (SmartArray<unsigned long,1>::grow(((char*)arg2 + 0x40), SmartArray<unsigned long,1>::get_new_size(((char*)arg2 + 0x40), (eax_17 + 1))) != 0)
0044d46f              {
0044d476                  *(uint32_t*)(((char*)arg2 + 0x40)->m_charbuffer + (*(int32_t*)((char*)((char*)arg2 + 0x40) + 8) << 2)) = eax_9;
0044d479                  *(int32_t*)((char*)((char*)arg2 + 0x40) + 8) += 1;
0044d46f              }
0044d46f              
0044d47c              this_2 = this_1;
0044d483              i += 1;
0044d486              i_2 = i;
0044d48a          } while (i < this_2->m_aModifierRefs.m_num);
0044d3bf      }
0044d3bf      
0044d490      *(int32_t*)((char*)arg2 + 0x50) = 0;
0044d49b      class RenderMaterial* m_pMaterial = this_1->m_pMaterial;
0044d49b      
0044d4a0      if (m_pMaterial == 0)
0044d4a0          goto label_44d4b9;
0044d4a0      
0044d4a9      if (m_pMaterial->vtable->AddRef() != 0)
0044d4a9      {
0044d4b6          *(int32_t*)((char*)arg2 + 0x50) = this_1->m_pMaterial;
0044d4b9      label_44d4b9:
0044d4b9          class MaterialInstance* this_3 = this_1;
0044d4c0          int32_t i_1 = 0;
0044d4c4          int32_t i_3 = 0;
0044d4c4          
0044d4c8          if (this_3->m_aModifiers.m_num > 0)
0044d4c8          {
0044d581              do
0044d581              {
0044d4d3                  int32_t esi_4 = (i_1 << 2);
0044d4da                  int32_t* ecx_16 = *(uint32_t*)(esi_4 + this_3->m_aModifiers.m_data);
0044d4da                  
0044d4df                  if (ecx_16 != 0)
0044d4df                  {
0044d4ec                      if (*(uint32_t*)(*(uint32_t*)ecx_16 + 0x10)() == 0)
0044d4ec                          goto label_44d5c5;
0044d4ec                      
0044d4ff                      void* ebx_4 = (this_1->m_aModifiers.m_data + esi_4);
0044d504                      int32_t eax_25 = (*(int32_t*)((char*)arg2 + 0x58) & 0x7fffffff);
0044d504                      
0044d50b                      if (*(int32_t*)((char*)arg2 + 0x5c) < eax_25)
0044d50b                      {
0044d569                          *(uint32_t*)(*(int32_t*)((char*)arg2 + 0x54) + (*(int32_t*)((char*)arg2 + 0x5c) << 2)) = *(uint32_t*)ebx_4;
0044d56c                          *(int32_t*)((char*)arg2 + 0x5c) += 1;
0044d50b                      }
0044d50b                      else
0044d50b                      {
0044d50d                          uint32_t edx_11 = (eax_25 + 1);
0044d50d                          
0044d513                          if (edx_11 <= 8)
0044d515                              edx_11 = 8;
0044d513                          else if (edx_11 <= 0x4000)
0044d522                          {
0044d541                              int32_t eflags_1;
0044d541                              char eax_29;
0044d541                              eax_29 = __bsr_gprv_memv(edx_11);
0044d54d                              int32_t edi_5 = (1 << eax_29);
0044d54d                              
0044d551                              if (edx_11 > edi_5)
0044d553                                  edx_11 = (edi_5 * 2);
0044d522                          }
0044d522                          else
0044d522                          {
0044d526                              int32_t eax_27 = (edx_11 & 0x3fff);
0044d526                              
0044d52b                              if (eax_27 != 0)
0044d534                                  edx_11 += (0x4000 - eax_27);
0044d522                          }
0044d522                          
0044d560                          if (SmartArray<unsigned long,1>::grow(((char*)arg2 + 0x54), edx_11) != 0)
0044d560                          {
0044d569                              *(uint32_t*)(*(int32_t*)((char*)arg2 + 0x54) + (*(int32_t*)((char*)arg2 + 0x5c) << 2)) = *(uint32_t*)ebx_4;
0044d56c                              *(int32_t*)((char*)arg2 + 0x5c) += 1;
0044d560                          }
0044d50b                      }
0044d4df                  }
0044d4df                  
0044d573                  this_3 = this_1;
0044d57a                  i_1 = (i_3 + 1);
0044d57d                  i_3 = i_1;
0044d581              } while (i_1 < this_3->m_aModifiers.m_num);
0044d4c8          }
0044d4c8          
0044d587          *(int32_t*)((char*)arg2 + 0x60) = 0;
0044d592          class RenderMaterial* m_pModifiedMaterial = this_1->m_pModifiedMaterial;
0044d592          
0044d597          if (m_pModifiedMaterial == 0)
0044d597              goto label_44d5b0;
0044d597          
0044d5a0          if (m_pModifiedMaterial->vtable->AddRef() != 0)
0044d5a0          {
0044d5a9              *(int32_t*)((char*)arg2 + 0x60) = this_1->properties.m_DID.id;
0044d5b0          label_44d5b0:
0044d5b0              m_pModifiedMaterial = this_1->m_bNeedRefresh;
0044d5b5              *(int32_t*)((char*)arg2 + 0x64) = m_pModifiedMaterial;
0044d5b9              class MaterialInstance* eax_33;
0044d5b9              eax_33 = 1;
0044d5bf              return 1;
0044d5a0          }
0044d4a9      }
0044d4a9      
0044d5c5  label_44d5c5:
0044d5c5      eax_9 = 0;
0044d5cb      return 0;
0044d300  }

0044d3c7                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
0044d5ce                                            90 90                                                                ..

0044d5d0  void __fastcall MaterialInstance::Destroy(class MaterialInstance* this)

0044d5d0  {
0044d5d3      MaterialInstance::End(this);
0044d5db      /* tailcall */
0044d5db      return MaterialInstance::Begin(this);
0044d5d0  }


0044d5e0  uint8_t __fastcall MaterialInstance::GetSubObjects(class MaterialInstance* this)

0044d5e0  {
0044d5e7      uint32_t id = this->m_materialID.id;
0044d5f0      int32_t ebx;
0044d5f0      ebx = 1;
0044d5f0      
0044d5f2      if (id == INVALID_DID.id)
0044d5f2      {
0044d679          id = 0;
0044d67f          return 0;
0044d5f2      }
0044d5f2      
0044d605      class DBObj* var_10;
0044d605      class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_10, id, 0x1f));
0044d60f      this->m_pMaterial = eax_1;
0044d60f      
0044d612      if (eax_1 == 0)
0044d614          ebx = 0;
0044d614      
0044d61a      int32_t i = 0;
0044d61a      
0044d61e      if (this->m_aModifierRefs.m_num > 0)
0044d61e      {
0044d669          do
0044d669          {
0044d623              void* eax_4 = this->m_aModifierRefs.m_data[i];
0044d623              
0044d628              if (eax_4 != 0)
0044d628              {
0044d62a                  class IDClass<_tagDataID,32,0> eax_5 = *(uint32_t*)((char*)eax_4 + 4);
0044d62a                  
0044d633                  if (eax_5 != INVALID_DID.id)
0044d633                  {
0044d642                      void var_8;
0044d642                      class DBObj* eax_7 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, eax_5, 0x20));
0044d64c                      var_10 = eax_7;
0044d64c                      
0044d650                      if (eax_7 != 0)
0044d65e                          SmartArray<unsigned long,1>::AddToEnd(&this->m_aModifiers, &var_10);
0044d650                      else
0044d652                          ebx = 0;
0044d633                  }
0044d628              }
0044d628              
0044d666              i += 1;
0044d669          } while (i < this->m_aModifierRefs.m_num);
0044d61e      }
0044d61e      
0044d66c      this->m_bNeedRefresh = 1;
0044d671      uint32_t eax_2;
0044d671      eax_2 = ebx;
0044d677      return eax_2;
0044d5e0  }


0044d680  void __thiscall MaterialInstance::Serialize(class MaterialInstance* this, class Archive* arg2)

0044d680  {
0044d680      class MaterialInstance* this_1 = this;
0044d681      void* ebx;
0044d681      void* var_8 = ebx;
0044d684      class Archive* esi = arg2;
0044d68c      DBObj::Serialize(this, esi);
0044d695      Archive::CheckAlignment(esi, 4);
0044d69e      uint8_t* eax = Archive::GetBytes(esi, 4);
0044d69e      
0044d6a5      if (eax != 0)
0044d6a5      {
0044d6ab          if ((esi->m_flags & 1) == 0)
0044d6b6              this->m_materialID.id = *(uint32_t*)eax;
0044d6ab          else
0044d6b0              *(uint32_t*)eax = this->m_materialID.id;
0044d6a5      }
0044d6a5      
0044d6bd      Archive::CheckAlignment(esi, 4);
0044d6c6      uint8_t* eax_1 = Archive::GetBytes(esi, 4);
0044d6c6      
0044d6cd      if (eax_1 != 0)
0044d6cd      {
0044d6d3          if ((esi->m_flags & 1) == 0)
0044d6de              this->m_materialType = *(uint32_t*)eax_1;
0044d6d3          else
0044d6d8              *(uint32_t*)eax_1 = this->m_materialType;
0044d6cd      }
0044d6cd      
0044d6e1      uint32_t m_num = this->m_aModifierRefs.m_num;
0044d6e8      uint32_t i = m_num;
0044d6ec      Archive::CheckAlignment(esi, 4);
0044d6f5      uint32_t* eax_2;
0044d6f5      uint32_t ecx_8;
0044d6f5      eax_2 = Archive::GetBytes(esi, 4);
0044d6f5      
0044d6fc      if (eax_2 != 0)
0044d6fc      {
0044d702          if ((esi->m_flags & 1) == 0)
0044d702          {
0044d708              uint32_t eax_3 = *(uint32_t*)eax_2;
0044d70a              i = eax_3;
0044d70e              m_num = eax_3;
0044d702          }
0044d702          else
0044d704              *(uint32_t*)eax_2 = m_num;
0044d6fc      }
0044d6fc      
0044d712      arg2 = nullptr;
0044d712      
0044d71a      if (m_num > 0)
0044d71a      {
0044d7d2          do
0044d7d2          {
0044d720              ecx_8 = esi->m_flags;
0044d723              ecx_8 = !(ecx_8);
0044d723              
0044d728              if ((ecx_8 & 1) == 0)
0044d75d                  ebx = this->m_aModifierRefs.m_data[arg2];
0044d728              else
0044d728              {
0044d72c                  void* eax_4 = operator new(8);
0044d72c                  
0044d738                  if (eax_4 == 0)
0044d752                      ebx = nullptr;
0044d738                  else
0044d738                  {
0044d73a                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044d746                      *(uint32_t*)eax_4 = PStringBase<char>::s_NullBuffer_1;
0044d748                      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0044d74e                      ebx = eax_4;
0044d738                  }
0044d728              }
0044d728              
0044d764              Archive::CheckAlignment(esi, 4);
0044d76d              uint8_t* eax_7 = Archive::GetBytes(esi, 4);
0044d76d              
0044d774              if (eax_7 != 0)
0044d774              {
0044d77a                  if ((esi->m_flags & 1) == 0)
0044d785                      *(uint32_t*)((char*)ebx + 4) = *(uint32_t*)eax_7;
0044d77a                  else
0044d77f                      *(uint32_t*)eax_7 = *(uint32_t*)((char*)ebx + 4);
0044d774              }
0044d774              
0044d788              eax_7 = esi->m_flags;
0044d78b              eax_7 = !(eax_7);
0044d78b              
0044d78f              if ((eax_7 & 1) != 0)
0044d78f              {
0044d79a                  int32_t eax_9 = (this->m_aModifierRefs.m_sizeAndDeallocate & 0x7fffffff);
0044d7a1                  uint8_t eax_12;
0044d7a1                  
0044d7a1                  if (this->m_aModifierRefs.m_num >= eax_9)
0044d7af                      eax_12 = SmartArray<unsigned long,1>::grow(&this->m_aModifierRefs, SmartArray<unsigned long,1>::get_new_size(&this->m_aModifierRefs, (eax_9 + 1)));
0044d7af                  
0044d7b6                  if ((this->m_aModifierRefs.m_num < eax_9 || eax_12 != 0))
0044d7b6                  {
0044d797                      this->m_aModifierRefs.m_data[this->m_aModifierRefs.m_num] = ebx;
0044d797                      this->m_aModifierRefs.m_num += 1;
0044d7b6                  }
0044d78f              }
0044d78f              
0044d7ce              arg2 = (&arg2->vtable + 1);
0044d7d2          } while ((&arg2->vtable + 1) < i);
0044d71a      }
0044d71a      
0044d7d8      ebx = this->m_AllowStencilShadows;
0044d7df      Archive::CheckAlignment(esi, 1);
0044d7e8      char* eax_15 = Archive::GetBytes(esi, 1);
0044d7e8      
0044d7ef      if (eax_15 != 0)
0044d7ef      {
0044d7f5          if ((esi->m_flags & 1) == 0)
0044d7fb              ebx = *(uint8_t*)eax_15;
0044d7f5          else
0044d7f7              *(uint8_t*)eax_15 = ebx;
0044d7ef      }
0044d7ef      
0044d801      bool cond:1_1;
0044d801      
0044d801      if ((esi->m_flags & 5) != 0)
0044d813          cond:1_1 = ebx != 0;
0044d801      else
0044d801      {
0044d803          char temp1_1 = ebx;
0044d803          cond:1_1 = temp1_1 != 0;
0044d803          
0044d805          if (temp1_1 != 0)
0044d805          {
0044d80a              if (ebx != 1)
0044d80e                  Archive::RaiseError(esi);
0044d80e              
0044d813              cond:1_1 = ebx != 0;
0044d805          }
0044d801      }
0044d801      
0044d815      eax_15 = cond:1_1;
0044d818      this->m_AllowStencilShadows = eax_15;
0044d81b      ebx = this->m_WantDiscardGeometry;
0044d822      Archive::CheckAlignment(esi, 1);
0044d82b      char* eax_16;
0044d82b      class Archive* ecx_22;
0044d82b      eax_16 = Archive::GetBytes(esi, 1);
0044d82b      
0044d832      if (eax_16 != 0)
0044d832      {
0044d838          if ((esi->m_flags & 1) == 0)
0044d83e              ebx = *(uint8_t*)eax_16;
0044d838          else
0044d83a              *(uint8_t*)eax_16 = ebx;
0044d832      }
0044d832      
0044d844      bool cond:3_1;
0044d844      
0044d844      if ((esi->m_flags & 5) != 0)
0044d856          cond:3_1 = ebx != 0;
0044d844      else
0044d844      {
0044d846          char temp2_1 = ebx;
0044d846          cond:3_1 = temp2_1 != 0;
0044d846          
0044d848          if (temp2_1 != 0)
0044d848          {
0044d84d              if (ebx != 1)
0044d851                  Archive::RaiseError(esi);
0044d851              
0044d856              cond:3_1 = ebx != 0;
0044d848          }
0044d844      }
0044d844      
0044d859      ecx_22 = cond:3_1;
0044d85d      this->m_WantDiscardGeometry = ecx_22;
0044d680  }

0044d866                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0044d870  void __fastcall MaterialInstance::~MaterialInstance(class MaterialInstance* this)

0044d870  {
0044d875      this->vtable = 0x79b2e0;
0044d87b      MaterialInstance::End(this);
0044d87b      
0044d88d      if ((this->m_aModifiers.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044d893          operator delete[](this->m_aModifiers.m_data);
0044d893      
0044d8aa      if ((this->m_aModifierRefs.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044d8b0          operator delete[](this->m_aModifierRefs.m_data);
0044d8b0      
0044d8c1      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_materialTypeName.m_charbuffer - 0x14);
0044d8c1      
0044d8d0      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0044d8d8          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0044d8d8      
0044d8dd      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->m_materialName.m_charbuffer - 0x14);
0044d8dd      
0044d8ec      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0044d8f4          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0044d8f4      
0044d8fb      /* tailcall */
0044d8fb      return DBObj::~DBObj(this);
0044d870  }


0044d900  void* __thiscall MaterialInstance::`scalar deleting destructor'(class MaterialInstance* this, uint32_t arg2)

0044d900  {
0044d903      MaterialInstance::~MaterialInstance(this);
0044d903      
0044d90d      if ((arg2 & 1) != 0)
0044d910          operator delete(this);
0044d910      
0044d91b      return this;
0044d900  }

0044d91e                                                                                            90 90                                ..

0044d920  uint32_t __thiscall SmartArray<Vector3,1>::WhatNum(class SmartArray<Vector3,1> const* this, class Vector3 const* arg2)

0044d920  {
0044d922      uint32_t m_num = this->m_num;
0044d925      int32_t result = 0;
0044d925      
0044d929      if (m_num > 0)
0044d929      {
0044d92b          class Vector3* m_data = this->m_data;
0044d92b          
0044d974          do
0044d974          {
0044d935              long double x87_r7_3 = fabsl((((long double)m_data->x) - ((long double)arg2->x)));
0044d937              long double temp1_1 = ((long double)0.000199999995f);
0044d937              (x87_r7_3 - temp1_1);
0044d93d              int32_t eax;
0044d93d              eax = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0044d93f              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0044d93f              
0044d942              if (!(p_1))
0044d942              {
0044d94a                  long double x87_r7_6 = fabsl((((long double)m_data->y) - ((long double)arg2->y)));
0044d94c                  long double temp2_1 = ((long double)0.000199999995f);
0044d94c                  (x87_r7_6 - temp2_1);
0044d952                  eax = ((((x87_r7_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0044d954                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0044d954                  
0044d957                  if (!(p_2))
0044d957                  {
0044d95f                      long double x87_r7_9 = fabsl((((long double)m_data->z) - ((long double)arg2->z)));
0044d961                      long double temp3_1 = ((long double)0.000199999995f);
0044d961                      (x87_r7_9 - temp3_1);
0044d967                      eax = ((((x87_r7_9 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0044d969                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
0044d969                      
0044d96c                      if (!(p_3))
0044d982                          return result;
0044d957                  }
0044d942              }
0044d942              
0044d96e              result += 1;
0044d96f              m_data = &m_data[1];
0044d974          } while (result < m_num);
0044d929      }
0044d929      
0044d97b      return 0xffffffff;
0044d920  }

0044d985                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0044d990  void __thiscall RenderMeshFragmentTopology::TopTriangleType::Serialize(class RenderMeshFragmentTopology::TopTriangleType* this, class Archive* arg2)

0044d990  {
0044d9fe      for (int32_t i = 0; i < 3; i += 1)
0044d9fe      {
0044d9a4          Archive::CheckAlignment(arg2, 2);
0044d9ad          uint8_t* eax_1 = Archive::GetBytes(arg2, 2);
0044d9ad          
0044d9b4          if (eax_1 != 0)
0044d9b4          {
0044d9b9              if ((arg2->m_flags & 1) == 0)
0044d9c8                  this->m_TopVertexIndices[i] = *(uint16_t*)eax_1;
0044d9b9              else
0044d9c0                  *(uint16_t*)eax_1 = this->m_TopVertexIndices[i];
0044d9b4          }
0044d9b4          
0044d9d1          Archive::CheckAlignment(arg2, 2);
0044d9da          uint8_t* eax_2 = Archive::GetBytes(arg2, 2);
0044d9da          
0044d9e1          if (eax_2 != 0)
0044d9e1          {
0044d9e6              if ((arg2->m_flags & 1) == 0)
0044d9f5                  this->m_TopEdgeIndices[i] = *(uint16_t*)eax_2;
0044d9e6              else
0044d9ed                  *(uint16_t*)eax_2 = this->m_TopEdgeIndices[i];
0044d9e1          }
0044d9fe      }
0044d990  }

0044da07                       90 90 90 90 90 90 90 90 90                                                         .........

0044da10  void __thiscall RenderMeshFragmentTopology::TopEdgeType::Serialize(class RenderMeshFragmentTopology::TopEdgeType* this, class Archive* arg2)

0044da10  {
0044da7e      for (int32_t i = 0; i < 2; i += 1)
0044da7e      {
0044da24          Archive::CheckAlignment(arg2, 2);
0044da2d          uint8_t* eax_1 = Archive::GetBytes(arg2, 2);
0044da2d          
0044da34          if (eax_1 != 0)
0044da34          {
0044da39              if ((arg2->m_flags & 1) == 0)
0044da48                  this->m_TopVertexIndices[i] = *(uint16_t*)eax_1;
0044da39              else
0044da40                  *(uint16_t*)eax_1 = this->m_TopVertexIndices[i];
0044da34          }
0044da34          
0044da51          Archive::CheckAlignment(arg2, 2);
0044da5a          uint8_t* eax_2 = Archive::GetBytes(arg2, 2);
0044da5a          
0044da61          if (eax_2 != 0)
0044da61          {
0044da66              if ((arg2->m_flags & 1) == 0)
0044da75                  this->m_NeighbourTopTriangleIndices[i] = *(uint16_t*)eax_2;
0044da66              else
0044da6d                  *(uint16_t*)eax_2 = this->m_NeighbourTopTriangleIndices[i];
0044da61          }
0044da7e      }
0044da10  }

0044da87                       90 90 90 90 90 90 90 90 90                                                         .........

0044da90  void __fastcall SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::Reset(class SmartArray<RenderMeshFragmentTopology::TopVertexType,1>* this)

0044da90  {
0044da94      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0044daa5      this->m_num = 0;
0044daa5      
0044daac      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044daac      {
0044dab1          operator delete[](this->m_data);
0044dab9          this->m_data = 0;
0044dabf          this->m_sizeAndDeallocate = 0;
0044dac8          return;
0044daac      }
0044daac      
0044dacc      if (this->m_data != 0)
0044dacc      {
0044dace          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
0044dad3          int32_t eax_1 = (eax - 1);
0044dad3          
0044dad4          if ((eax - 1) >= 0)
0044dad4          {
0044dae7              int32_t temp1_1;
0044dae7              
0044dae7              do
0044dae7              {
0044dae0                  temp1_1 = eax_1;
0044dae0                  eax_1 -= 1;
0044dae1                  this->m_data[(eax_1 + 1)].m_BatchIndex = this;
0044dae7              } while ((temp1_1 - 1) >= 0);
0044dad4          }
0044dacc      }
0044da90  }

0044daec                                      90 90 90 90                                                              ....

0044daf0  uint8_t __thiscall SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::grow(class SmartArray<RenderMeshFragmentTopology::TopVertexType,1>* this, uint32_t arg2)

0044daf0  {
0044dafe      uint32_t eax;
0044dafe      
0044dafe      if (arg2 >= this->m_num)
0044dafe      {
0044db0a          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044db0a          {
0044db76              eax = 1;
0044db79              return 1;
0044db0a          }
0044db0a          
0044db0e          if (arg2 == 0)
0044db0e          {
0044db10              SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::Reset(this);
0044db17              int32_t eax_2;
0044db17              eax_2 = 1;
0044db1a              return 1;
0044db0e          }
0044db0e          
0044db2a          uint32_t ebx_1 = operator new[]((arg2 << 2));
0044db2a          
0044db31          if (ebx_1 != 0)
0044db31          {
0044db36              if (this->m_data != 0)
0044db36              {
0044db38                  uint32_t m_num = this->m_num;
0044db3b                  eax = (m_num - 1);
0044db3b                  
0044db3c                  if ((m_num - 1) >= 0)
0044db3c                  {
0044db4b                      uint32_t temp2_1;
0044db4b                      
0044db4b                      do
0044db4b                      {
0044db40                          temp2_1 = eax;
0044db40                          eax -= 1;
0044db47                          *(uint32_t*)((ebx_1 + (eax << 2)) + 4) = this->m_data[(eax + 1)].m_BatchIndex;
0044db4b                      } while ((temp2_1 - 1) >= 0);
0044db3c                  }
0044db3c                  
0044db5c                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044db61                      operator delete[](this->m_data);
0044db36              }
0044db36              
0044db6f              this->m_data = ebx_1;
0044db71              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
0044db76              eax = 1;
0044db79              return 1;
0044db31          }
0044dafe      }
0044dafe      
0044db7e      eax = 0;
0044db81      return 0;
0044daf0  }

0044db84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0044db90  uint8_t __thiscall SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::SetNElements(class SmartArray<RenderMeshFragmentTopology::TopVertexType,1>* this, uint32_t const arg2, uint8_t arg3)

0044db90  {
0044dba2      uint32_t const i;
0044dba2      
0044dba2      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
0044dba2      {
0044dbcc          i = arg2;
0044dbcc          
0044dbce          if (arg2 < this->m_num)
0044dbce          {
0044dbdf              do
0044dbdf              {
0044dbd4                  this->m_data[i].m_BatchIndex = arg3;
0044dbdc                  i += 1;
0044dbdf              } while (i < this->m_num);
0044dbce          }
0044dba2      }
0044dba2      else
0044dba2      {
0044dba4          int32_t eax_1;
0044dba4          eax_1 = arg3;
0044dbaa          uint32_t const eax_2;
0044dbaa          
0044dbaa          if (eax_1 == 0)
0044dbb3              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
0044dbaa          else
0044dbac              eax_2 = arg2;
0044dbac          
0044dbbb          i = SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::grow(this, eax_2);
0044dbbb          
0044dbc2          if (i == 0)
0044dbc6              return i;
0044dba2      }
0044dba2      
0044dbe1      this->m_num = arg2;
0044dbe5      i = 1;
0044dbe8      return 1;
0044db90  }

0044dbeb                                   90 90 90 90 90                                                             .....

0044dbf0  uint8_t __thiscall SmartArray<Vector3,1>::grow(class SmartArray<Vector3,1>* this, uint32_t arg2)

0044dbf0  {
0044dbf1      uint32_t ebx = arg2;
0044dbfc      void* eax;
0044dbfc      
0044dbfc      if (ebx >= this->m_num)
0044dbfc      {
0044dc0c          int32_t eax_2;
0044dc0c          
0044dc0c          if (ebx <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044dc0c          {
0044dcad              eax_2 = 1;
0044dcb0              return 1;
0044dc0c          }
0044dc0c          
0044dc14          if (ebx == 0)
0044dc14          {
0044dc16              SmartArray<Vector3,1>::Reset(this);
0044dc1d              int32_t eax_3;
0044dc1d              eax_3 = 1;
0044dc20              return 1;
0044dc14          }
0044dc14          
0044dc2a          eax = operator new[]((ebx * 0xc));
0044dc2a          
0044dc36          if (eax != 0)
0044dc36          {
0044dc41              `vector constructor iterator'(eax, 0xc, ebx, Vector3::Vector3);
0044dc41              
0044dc49              if (this->m_data != 0)
0044dc49              {
0044dc4b                  uint32_t m_num = this->m_num;
0044dc4b                  
0044dc4f                  if ((m_num - 1) >= 0)
0044dc4f                  {
0044dc54                      void* eax_5 = ((m_num - 1) * 0xc);
0044dc58                      arg2 = m_num;
0044dc83                      bool cond:1_1;
0044dc83                      
0044dc83                      do
0044dc83                      {
0044dc62                          void* edx_2 = (this->m_data + eax_5);
0044dc66                          void* ecx_5 = ((char*)eax_5 + eax);
0044dc69                          *(uint32_t*)ecx_5 = *(uint32_t*)edx_2;
0044dc6e                          *(uint32_t*)((char*)ecx_5 + 4) = *(uint32_t*)((char*)edx_2 + 4);
0044dc74                          *(uint32_t*)((char*)ecx_5 + 8) = *(uint32_t*)((char*)edx_2 + 8);
0044dc7b                          eax_5 -= 0xc;
0044dc7e                          cond:1_1 = arg2 != 1;
0044dc7f                          arg2 -= 1;
0044dc83                      } while (cond:1_1);
0044dc4f                  }
0044dc4f                  
0044dc93                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044dc98                      operator delete[](this->m_data);
0044dc49              }
0044dc49              
0044dca6              this->m_data = eax;
0044dca8              this->m_sizeAndDeallocate = (ebx | 0x80000000);
0044dcad              eax_2 = 1;
0044dcb0              return 1;
0044dc36          }
0044dbfc      }
0044dbfc      
0044dcb5      eax = 0;
0044dcb8      return 0;
0044dbf0  }

0044dcbb                                                                                   90 90 90 90 90                             .....

0044dcc0  void __fastcall RenderMeshFragmentTopology::TopBatchType::TopBatchType(class RenderMeshFragmentTopology::TopBatchType* this)

0044dcc0  {
0044dcc4      this->m_BatchVertexToTopVertexIndices.m_data = 0;
0044dcc7      this->m_BatchVertexToTopVertexIndices.m_sizeAndDeallocate = 0;
0044dcca      this->m_BatchVertexToTopVertexIndices.m_num = 0;
0044dcc0  }

0044dcce                                            90 90                                                                ..

0044dcd0  void __fastcall SmartArray<unsigned short,1>::Reset(class SmartArray<unsigned short,1>* this)

0044dcd0  {
0044dcd3      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0044dce4      this->m_num = 0;
0044dce4      
0044dceb      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044dceb      {
0044dcf0          operator delete[](this->m_data);
0044dcf8          this->m_data = 0;
0044dcfe          this->m_sizeAndDeallocate = 0;
0044dd06          return;
0044dceb      }
0044dceb      
0044dd0a      if (this->m_data != 0)
0044dd0a      {
0044dd0c          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
0044dd11          int32_t eax_1 = (eax - 1);
0044dd11          
0044dd12          if ((eax - 1) >= 0)
0044dd12          {
0044dd1e              int32_t temp1_1;
0044dd1e              
0044dd1e              do
0044dd1e              {
0044dd14                  temp1_1 = eax_1;
0044dd14                  eax_1 -= 1;
0044dd15                  this->m_data[(eax_1 + 1)] = 0;
0044dd1e              } while ((temp1_1 - 1) >= 0);
0044dd12          }
0044dd0a      }
0044dcd0  }

0044dd22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0044dd30  void __fastcall RenderMeshFragment::RenderMeshFragment(class RenderMeshFragment* this)

0044dd30  {
0044dd34      this->m_cRef = 1;
0044dd3b      this->vtable = 0x79b340;
0044dd41      __builtin_memset(&this->m_Type, 0, 0x14);
0044dd50      this->m_AttribID = 0xffffffff;
0044dd30  }

0044dd58                                                                          90 90 90 90 90 90 90 90                          ........

0044dd60  void __fastcall RenderMeshFragment::~RenderMeshFragment(class RenderMeshFragment* this)

0044dd60  {
0044dd64      class RenderMeshFragmentTopology* m_pTopology = this->m_pTopology;
0044dd6b      this->vtable = 0x79b340;
0044dd6b      
0044dd71      if (m_pTopology != 0)
0044dd71      {
0044dd73          uint32_t m_cRef = m_pTopology->m_cRef;
0044dd73          m_pTopology->m_cRef -= 1;
0044dd73          
0044dd76          if (m_cRef == 1)
0044dd78              m_pTopology->vtable->__vecDelDtor(1);
0044dd78          
0044dd7e          this->m_pTopology = nullptr;
0044dd71      }
0044dd71      
0044dd85      int32_t i = 0;
0044dd85      
0044dd89      if (this->m_MaterialBatches.m_num > 0)
0044dd89      {
0044ddb1          do
0044ddb1          {
0044dd93              int32_t* ecx_1 = this->m_MaterialBatches.m_data[i];
0044dd93              
0044dd98              if (ecx_1 != 0)
0044dd98              {
0044dd9a                  int32_t temp2_1 = ecx_1[1];
0044dd9a                  ecx_1[1] -= 1;
0044dd9a                  
0044dd9d                  if (temp2_1 == 1)
0044dda3                      **(uint32_t**)ecx_1(1);
0044dda3                  
0044dda5                  this->m_MaterialBatches.m_data[i] = 0;
0044dd98              }
0044dd98              
0044ddae              i += 1;
0044ddb1          } while (i < this->m_MaterialBatches.m_num);
0044dd89      }
0044dd89      
0044ddb3      uint32_t m_sizeAndDeallocate = this->m_MaterialBatches.m_sizeAndDeallocate;
0044ddc4      this->m_MaterialBatches.m_num = 0;
0044ddc4      
0044ddc8      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044ddc8      {
0044ddce          operator delete[](this->m_MaterialBatches.m_data);
0044ddd6          this->m_MaterialBatches.m_data = 0;
0044ddd9          this->m_MaterialBatches.m_sizeAndDeallocate = 0;
0044ddc8      }
0044ddc8      else if (this->m_MaterialBatches.m_data != 0)
0044dde1      {
0044dde3          int32_t eax_5 = (m_sizeAndDeallocate & 0x7fffffff);
0044dde8          int32_t eax_6 = (eax_5 - 1);
0044dde8          
0044dde9          if ((eax_5 - 1) >= 0)
0044dde9          {
0044ddf8              int32_t temp3_1;
0044ddf8              
0044ddf8              do
0044ddf8              {
0044ddf0                  temp3_1 = eax_6;
0044ddf0                  eax_6 -= 1;
0044ddf1                  this->m_MaterialBatches.m_data[(eax_6 + 1)] = 0;
0044ddf8              } while ((temp3_1 - 1) >= 0);
0044dde9          }
0044dde1      }
0044dde1      
0044ddfa      this->m_Type = 0;
0044ddfa      
0044de0c      if ((this->m_MaterialBatches.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044de12          operator delete[](this->m_MaterialBatches.m_data);
0044de12      
0044de1a      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
0044dd60  }

0044dd8d                                         8d 49 00                                                               .I.
0044dded                                         8d 49 00                                                               .I.
0044de23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0044de30  void __fastcall RenderMeshFragmentTopology::~RenderMeshFragmentTopology(class RenderMeshFragmentTopology* this)

0044de30  {
0044de33      this->vtable = 0x79b344;
0044de33      
0044de46      if ((this->m_TopEdges.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044de4c          operator delete[](this->m_TopEdges.m_data);
0044de4c      
0044de63      if ((this->m_TopTriangles.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044de69          operator delete[](this->m_TopTriangles.m_data);
0044de69      
0044de80      if ((this->m_TopVertices.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044de86          operator delete[](this->m_TopVertices.m_data);
0044de86      
0044de8e      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
0044de30  }

0044de96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0044dea0  void __thiscall SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::Serialize(class SmartArray<RenderMeshFragmentTopology::TopVertexType,1>* this, class Archive* arg2)

0044dea0  {
0044deaa      uint32_t m_num = this->m_num;
0044deb1      Archive::CheckAlignment(arg2, 4);
0044deba      uint8_t* eax = Archive::GetBytes(arg2, 4);
0044debf      int32_t i = 0;
0044debf      
0044dec3      if (eax != 0)
0044dec3      {
0044dec9          if ((arg2->m_flags & 1) == 0)
0044decf              m_num = *(uint32_t*)eax;
0044dec9          else
0044decb              *(uint32_t*)eax = m_num;
0044dec3      }
0044dec3      
0044ded1      eax = arg2->m_flags;
0044ded4      eax = !(eax);
0044ded4      
0044ded8      if ((eax & 1) != 0)
0044ded8      {
0044dee3          if (m_num > Archive::GetSizeLeft(arg2))
0044dee3          {
0044dee7              Archive::RaiseError(arg2);
0044def0              return;
0044dee3          }
0044dee3          
0044def8          this->m_num = 0;
0044defb          SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::SetNElements(this, m_num, 1);
0044ded8      }
0044ded8      
0044df05      if (this->m_num > 0)
0044df05      {
0044df65          do
0044df65          {
0044df0a              void* edi = &this->m_data[i];
0044df11              Archive::CheckAlignment(arg2, 1);
0044df1a              uint8_t* eax_3 = Archive::GetBytes(arg2, 1);
0044df1a              
0044df21              if (eax_3 != 0)
0044df21              {
0044df27                  if ((arg2->m_flags & 1) == 0)
0044df27                  {
0044df2f                      eax_3 = *(uint8_t*)eax_3;
0044df31                      *(uint8_t*)edi = eax_3;
0044df27                  }
0044df27                  else
0044df2b                      *(uint8_t*)eax_3 = *(uint8_t*)edi;
0044df21              }
0044df21              
0044df37              Archive::CheckAlignment(arg2, 2);
0044df40              uint8_t* eax_4 = Archive::GetBytes(arg2, 2);
0044df40              
0044df47              if (eax_4 != 0)
0044df47              {
0044df4d                  if ((arg2->m_flags & 1) == 0)
0044df5b                      *(uint16_t*)((char*)edi + 2) = *(uint16_t*)eax_4;
0044df4d                  else
0044df53                      *(uint16_t*)eax_4 = *(uint16_t*)((char*)edi + 2);
0044df47              }
0044df47              
0044df62              i += 1;
0044df65          } while (i < this->m_num);
0044df05      }
0044dea0  }

0044df6e                                            90 90                                                                ..

0044df70  uint8_t __thiscall SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::grow(class SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>* this, uint32_t arg2)

0044df70  {
0044df71      uint32_t ebx = arg2;
0044df7c      void* eax;
0044df7c      
0044df7c      if (ebx >= this->m_num)
0044df7c      {
0044df8c          if (ebx <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044df8c          {
0044e01d              eax = 1;
0044e020              return 1;
0044df8c          }
0044df8c          
0044df94          if (ebx == 0)
0044df94          {
0044df96              SmartArray<Vector3,1>::Reset(this);
0044df9d              int32_t eax_2;
0044df9d              eax_2 = 1;
0044dfa0              return 1;
0044df94          }
0044df94          
0044dfaf          void* edi_1 = operator new[]((ebx * 0xc));
0044dfaf          
0044dfb6          if (edi_1 != 0)
0044dfb6          {
0044dfbb              if (this->m_data != 0)
0044dfbb              {
0044dfbd                  uint32_t m_num = this->m_num;
0044dfbd                  
0044dfc1                  if ((m_num - 1) >= 0)
0044dfc1                  {
0044dfc6                      void* eax_4 = ((m_num - 1) * 0xc);
0044dfca                      arg2 = m_num;
0044dff3                      bool cond:1_1;
0044dff3                      
0044dff3                      do
0044dff3                      {
0044dfd2                          void* edx_2 = (this->m_data + eax_4);
0044dfd6                          void* ecx_4 = ((char*)eax_4 + edi_1);
0044dfd9                          *(uint32_t*)ecx_4 = *(uint32_t*)edx_2;
0044dfde                          *(uint32_t*)((char*)ecx_4 + 4) = *(uint32_t*)((char*)edx_2 + 4);
0044dfe4                          *(uint32_t*)((char*)ecx_4 + 8) = *(uint32_t*)((char*)edx_2 + 8);
0044dfeb                          eax_4 -= 0xc;
0044dfee                          cond:1_1 = arg2 != 1;
0044dfef                          arg2 -= 1;
0044dff3                      } while (cond:1_1);
0044dfc1                  }
0044dfc1                  
0044e003                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044e008                      operator delete[](this->m_data);
0044dfbb              }
0044dfbb              
0044e016              this->m_data = edi_1;
0044e018              this->m_sizeAndDeallocate = (ebx | 0x80000000);
0044e01d              eax = 1;
0044e020              return 1;
0044dfb6          }
0044df7c      }
0044df7c      
0044e025      eax = 0;
0044e028      return 0;
0044df70  }

0044e02b                                   90 90 90 90 90                                                             .....

0044e030  uint8_t __thiscall SmartArray<VertexRange,1>::grow(class SmartArray<VertexRange,1>* this, uint32_t arg2)

0044e030  {
0044e03c      void* eax;
0044e03c      
0044e03c      if (arg2 >= this->m_num)
0044e03c      {
0044e04c          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044e04c          {
0044e0bc              eax = 1;
0044e0bf              return 1;
0044e04c          }
0044e04c          
0044e050          if (arg2 == 0)
0044e050          {
0044e052              SmartArray<VertexRange,1>::Reset(this);
0044e059              int32_t eax_2;
0044e059              eax_2 = 1;
0044e05c              return 1;
0044e050          }
0044e050          
0044e06c          void* edi_1 = operator new[]((arg2 << 3));
0044e06c          
0044e073          if (edi_1 != 0)
0044e073          {
0044e078              if (this->m_data != 0)
0044e078              {
0044e07a                  uint32_t m_num = this->m_num;
0044e07d                  int32_t eax_3 = (m_num - 1);
0044e07d                  
0044e07e                  if ((m_num - 1) >= 0)
0044e07e                  {
0044e093                      int32_t temp2_1;
0044e093                      
0044e093                      do
0044e093                      {
0044e080                          temp2_1 = eax_3;
0044e080                          eax_3 -= 1;
0044e081                          class VertexRange* m_data = this->m_data;
0044e087                          *(uint32_t*)(((char*)edi_1 + (eax_3 << 3)) + 8) = m_data[(eax_3 + 1)].m_nFirstVertex;
0044e08f                          *(uint32_t*)(((char*)edi_1 + (eax_3 << 3)) + 0xc) = *(uint32_t*)(&m_data[eax_3] + 0xc);
0044e093                      } while ((temp2_1 - 1) >= 0);
0044e07e                  }
0044e07e                  
0044e0a2                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044e0a7                      operator delete[](this->m_data);
0044e078              }
0044e078              
0044e0b5              this->m_data = edi_1;
0044e0b7              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
0044e0bc              eax = 1;
0044e0bf              return 1;
0044e073          }
0044e03c      }
0044e03c      
0044e0c4      eax = 0;
0044e0c7      return 0;
0044e030  }

0044e0ca                                90 90 90 90 90 90                                                            ......

0044e0d0  uint8_t __thiscall SmartArray<unsigned short,1>::grow(class SmartArray<unsigned short,1>* this, uint32_t arg2)

0044e0d0  {
0044e0de      uint32_t eax;
0044e0de      
0044e0de      if (arg2 >= this->m_num)
0044e0de      {
0044e0ea          if (arg2 <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044e0ea          {
0044e158              eax = 1;
0044e15b              return 1;
0044e0ea          }
0044e0ea          
0044e0ee          if (arg2 == 0)
0044e0ee          {
0044e0f0              SmartArray<unsigned short,1>::Reset(this);
0044e0f7              int32_t eax_2;
0044e0f7              eax_2 = 1;
0044e0fa              return 1;
0044e0ee          }
0044e0ee          
0044e106          uint32_t ebx_1 = operator new[]((arg2 * 2));
0044e106          
0044e10d          if (ebx_1 != 0)
0044e10d          {
0044e112              if (this->m_data != 0)
0044e112              {
0044e114                  uint32_t m_num = this->m_num;
0044e117                  eax = (m_num - 1);
0044e117                  
0044e118                  if ((m_num - 1) >= 0)
0044e118                  {
0044e12d                      uint32_t temp2_1;
0044e12d                      
0044e12d                      do
0044e12d                      {
0044e120                          temp2_1 = eax;
0044e120                          eax -= 1;
0044e128                          *(uint16_t*)((ebx_1 + (eax << 1)) + 2) = this->m_data[(eax + 1)];
0044e12d                      } while ((temp2_1 - 1) >= 0);
0044e118                  }
0044e118                  
0044e13e                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044e143                      operator delete[](this->m_data);
0044e112              }
0044e112              
0044e151              this->m_data = ebx_1;
0044e153              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
0044e158              eax = 1;
0044e15b              return 1;
0044e10d          }
0044e0de      }
0044e0de      
0044e160      eax = 0;
0044e163      return 0;
0044e0d0  }

0044e166                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0044e170  uint8_t __thiscall SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::SetNElements(class SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>* this, uint32_t const arg2, uint8_t arg3)

0044e170  {
0044e17a      uint32_t const i_1 = arg2;
0044e185      uint32_t eax_1;
0044e185      
0044e185      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= i_1)
0044e185      {
0044e1b2          uint32_t const i = i_1;
0044e1b2          
0044e1b4          if (i_1 < this->m_num)
0044e1b4          {
0044e1c7              eax_1 = (i_1 * 0xc);
0044e1c7              
0044e1e6              do
0044e1e6              {
0044e1d2                  void* ebp_2 = (this->m_data + eax_1);
0044e1d4                  int32_t var_c;
0044e1d4                  *(uint32_t*)ebp_2 = var_c;
0044e1d7                  int32_t var_8;
0044e1d7                  *(uint32_t*)((char*)ebp_2 + 4) = var_8;
0044e1da                  int32_t var_4;
0044e1da                  *(uint32_t*)((char*)ebp_2 + 8) = var_4;
0044e1e0                  i += 1;
0044e1e1                  eax_1 += 0xc;
0044e1e6              } while (i < this->m_num);
0044e1e6              
0044e1e8              i_1 = arg2;
0044e1b4          }
0044e185      }
0044e185      else
0044e185      {
0044e187          eax_1 = arg3;
0044e18d          uint32_t const i_2;
0044e18d          
0044e18d          if (eax_1 == 0)
0044e196              i_2 = SmartArray<unsigned long,1>::get_new_size(this, i_1);
0044e18d          else
0044e18f              i_2 = i_1;
0044e18f          
0044e19e          eax_1 = SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::grow(this, i_2);
0044e19e          
0044e1a5          if (eax_1 == 0)
0044e1ac              return eax_1;
0044e185      }
0044e185      
0044e1ee      this->m_num = i_1;
0044e1f2      eax_1 = 1;
0044e1f8      return 1;
0044e170  }

0044e1fb                                                                                   90 90 90 90 90                             .....

0044e200  int32_t* __thiscall SmartArray<unsigned long,1>::operator=(int32_t* arg1, int32_t* arg2)

0044e200  {
0044e21b      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
0044e21b      {
0044e239      label_44e239:
0044e239          int32_t* eax_3 = *(uint32_t*)arg2;
0044e23e          void* edx_3 = &eax_3[arg2[2]];
0044e243          int32_t* ecx_4 = *(uint32_t*)arg1;
0044e243          
0044e245          while (eax_3 < edx_3)
0044e245          {
0044e24a              *(uint32_t*)ecx_4 = *(uint32_t*)eax_3;
0044e24c              eax_3 = &eax_3[1];
0044e24f              ecx_4 = &ecx_4[1];
0044e245          }
0044e245          
0044e25d          for (int32_t i = arg2[2]; i < arg1[2]; i += 1)
0044e262              *(uint32_t*)(*(uint32_t*)arg1 + (i << 2)) = 0;
0044e262          
0044e274          arg1[2] = arg2[2];
0044e21b      }
0044e21b      else
0044e21b      {
0044e21d          arg1[2] = 0;
0044e21d          
0044e237          if (SmartArray<unsigned long,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
0044e237              goto label_44e239;
0044e21b      }
0044e21b      
0044e27b      return arg1;
0044e200  }

0044e27e                                                                                            90 90                                ..

0044e280  int32_t* __thiscall SmartArray<unsigned short,1>::operator=(int32_t* arg1, int32_t* arg2)

0044e280  {
0044e29b      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
0044e29b      {
0044e2b9      label_44e2b9:
0044e2b9          int16_t* eax_3 = *(uint32_t*)arg2;
0044e2be          void* edx_3 = &eax_3[arg2[2]];
0044e2c3          int16_t* ecx_4 = *(uint32_t*)arg1;
0044e2c3          
0044e2c5          if (eax_3 < edx_3)
0044e2c5          {
0044e2c7              int32_t ebx;
0044e2c7              int32_t var_c_2 = ebx;
0044e2c7              
0044e2de              do
0044e2de              {
0044e2d0                  ebx = *(uint16_t*)eax_3;
0044e2d3                  *(uint16_t*)ecx_4 = ebx;
0044e2d6                  eax_3 = &eax_3[1];
0044e2d9                  ecx_4 = &ecx_4[1];
0044e2de              } while (eax_3 < edx_3);
0044e2c5          }
0044e2c5          
0044e2e7          for (int32_t i = arg2[2]; i < arg1[2]; i += 1)
0044e2f2              *(uint16_t*)(*(uint32_t*)arg1 + (i << 1)) = 0;
0044e2f2          
0044e303          arg1[2] = arg2[2];
0044e29b      }
0044e29b      else
0044e29b      {
0044e29d          arg1[2] = 0;
0044e29d          
0044e2b7          if (SmartArray<unsigned short,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
0044e2b7              goto label_44e2b9;
0044e29b      }
0044e29b      
0044e30a      return arg1;
0044e280  }

0044e2ca                                8d 9b 00 00 00 00                                                            ......
0044e30d                                         90 90 90                                                               ...

0044e310  void* __thiscall RenderMeshFragment::`scalar deleting destructor'(class RenderMeshFragment* this, uint32_t arg2)

0044e310  {
0044e313      RenderMeshFragment::~RenderMeshFragment(this);
0044e313      
0044e31d      if ((arg2 & 1) != 0)
0044e320          operator delete(this);
0044e320      
0044e32b      return this;
0044e310  }

0044e32e                                            90 90                                                                ..

0044e330  void* __thiscall RenderMeshFragmentTopology::`scalar deleting destructor'(class RenderMeshFragmentTopology* this, uint32_t arg2)

0044e330  {
0044e333      RenderMeshFragmentTopology::~RenderMeshFragmentTopology(this);
0044e333      
0044e33d      if ((arg2 & 1) != 0)
0044e340          operator delete(this);
0044e340      
0044e34b      return this;
0044e330  }

0044e34e                                            90 90                                                                ..

0044e350  void __thiscall SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::Serialize(class SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>* this, class Archive* arg2)

0044e350  {
0044e35a      uint32_t m_num = this->m_num;
0044e361      Archive::CheckAlignment(arg2, 4);
0044e36a      uint8_t* eax = Archive::GetBytes(arg2, 4);
0044e36f      int32_t ebp = 0;
0044e36f      
0044e373      if (eax != 0)
0044e373      {
0044e379          if ((arg2->m_flags & 1) == 0)
0044e37f              m_num = *(uint32_t*)eax;
0044e379          else
0044e37b              *(uint32_t*)eax = m_num;
0044e373      }
0044e373      
0044e381      eax = arg2->m_flags;
0044e384      eax = !(eax);
0044e384      
0044e388      if ((eax & 1) != 0)
0044e388      {
0044e393          if (m_num > Archive::GetSizeLeft(arg2))
0044e393          {
0044e397              Archive::RaiseError(arg2);
0044e3a0              return;
0044e393          }
0044e393          
0044e3a8          this->m_num = 0;
0044e3ab          SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::SetNElements(this, m_num, 1);
0044e388      }
0044e388      
0044e3b3      int32_t i = 0;
0044e3b3      
0044e3b7      if (this->m_num > 0)
0044e3b7      {
0044e3d3          do
0044e3d3          {
0044e3c5              RenderMeshFragmentTopology::TopTriangleType::Serialize((this->m_data + ebp), arg2);
0044e3cd              i += 1;
0044e3ce              ebp += 0xc;
0044e3d3          } while (i < this->m_num);
0044e3b7      }
0044e350  }

0044e3dc                                                                                      90 90 90 90                              ....

0044e3e0  void __thiscall SmartArray<RenderMeshFragmentTopology::TopEdgeType,1>::Serialize(class SmartArray<RenderMeshFragmentTopology::TopEdgeType,1>* this, class Archive* arg2)

0044e3e0  {
0044e3e9      uint32_t m_num = this->m_num;
0044e3f0      Archive::CheckAlignment(arg2, 4);
0044e3f9      uint8_t* eax = Archive::GetBytes(arg2, 4);
0044e3f9      
0044e400      if (eax != 0)
0044e400      {
0044e406          if ((arg2->m_flags & 1) == 0)
0044e40c              m_num = *(uint32_t*)eax;
0044e406          else
0044e408              *(uint32_t*)eax = m_num;
0044e400      }
0044e400      
0044e40e      eax = arg2->m_flags;
0044e411      eax = !(eax);
0044e411      
0044e415      if ((eax & 1) != 0)
0044e415      {
0044e420          if (m_num > Archive::GetSizeLeft(arg2))
0044e420          {
0044e424              Archive::RaiseError(arg2);
0044e42c              return;
0044e420          }
0044e420          
0044e434          this->m_num = 0;
0044e43b          SmartArray<RenderMeshFragmentTopology::TopEdgeType,1>::SetNElements(this, m_num, 1);
0044e415      }
0044e415      
0044e443      int32_t i = 0;
0044e443      
0044e447      if (this->m_num > 0)
0044e447      {
0044e461          do
0044e461          {
0044e456              RenderMeshFragmentTopology::TopEdgeType::Serialize(&this->m_data[i], arg2);
0044e45e              i += 1;
0044e461          } while (i < this->m_num);
0044e447      }
0044e3e0  }

0044e469                             90 90 90 90 90 90 90                                                           .......

0044e470  void* __thiscall RenderMeshFragmentTopology::TopBatchType::`vector deleting destructor'(class RenderMeshFragmentTopology::TopBatchType* this, uint32_t arg2)

0044e470  {
0044e471      int32_t ebx;
0044e471      ebx = arg2;
0044e471      
0044e47b      if ((ebx & 2) == 0)
0044e47b      {
0044e4db          if ((this->m_BatchVertexToTopVertexIndices.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044e4e1              operator delete[](this->m_BatchVertexToTopVertexIndices.m_data);
0044e4e1          
0044e4ec          if ((ebx & 1) != 0)
0044e4ef              operator delete(this);
0044e4ef          
0044e4fb          return this;
0044e47b      }
0044e47b      
0044e47d      int32_t m_pBatch = this->m_pBatch;
0044e47d      
0044e48c      if ((m_pBatch - 1) >= 0)
0044e48c      {
0044e48f          void* esi_1 = &this[m_pBatch].m_BatchVertexToTopVertexIndices;
0044e492          int32_t ebp_1 = m_pBatch;
0044e4b3          int32_t i;
0044e4b3          
0044e4b3          do
0044e4b3          {
0044e495              int32_t eax_4 = *(uint32_t*)((char*)esi_1 - 0xc);
0044e498              esi_1 -= 0x10;
0044e498              
0044e4a5              if ((eax_4 & 0x80000000) == 0x80000000)
0044e4aa                  operator delete[](*(uint32_t*)esi_1);
0044e4aa              
0044e4b2              i = ebp_1;
0044e4b2              ebp_1 -= 1;
0044e4b3          } while (i != 1);
0044e48c      }
0044e48c      
0044e4b9      if ((ebx & 1) != 0)
0044e4bc          operator delete[](((char*)this - 4));
0044e4bc      
0044e4c9      return ((char*)this - 4);
0044e470  }

0044e4fe                                                                                            90 90                                ..

0044e500  void __fastcall SmartArray<RenderMeshFragmentTopology::TopBatchType,1>::Reset(class SmartArray<RenderMeshFragmentTopology::TopBatchType,1>* this)

0044e500  {
0044e507      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0044e51a      this->m_num = 0;
0044e51a      
0044e51d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044e51d      {
0044e51f          class RenderMeshFragmentTopology::TopBatchType* m_data = this->m_data;
0044e51f          
0044e523          if (m_data != 0)
0044e527              RenderMeshFragmentTopology::TopBatchType::`vector deleting destructor'(m_data, 3);
0044e527          
0044e52c          this->m_data = 0;
0044e52e          this->m_sizeAndDeallocate = 0;
0044e536          return;
0044e51d      }
0044e51d      
0044e539      if (this->m_data != 0)
0044e539      {
0044e53b          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
0044e53b          
0044e541          if ((i_2 - 1) >= 0)
0044e541          {
0044e544              int32_t var_c = 0;
0044e548              int32_t var_8_1 = 0;
0044e54c              int32_t var_4_1 = 0;
0044e557              int32_t esi_2 = ((i_2 - 1) << 4);
0044e55a              int32_t i_1 = i_2;
0044e577              int32_t i;
0044e577              
0044e577              do
0044e577              {
0044e562                  void* eax_2 = (this->m_data + esi_2);
0044e56c                  int32_t var_10;
0044e56c                  *(uint32_t*)eax_2 = var_10;
0044e56e                  SmartArray<unsigned short,1>::operator=(((char*)eax_2 + 4), &var_c);
0044e573                  esi_2 -= 0x10;
0044e576                  i = i_1;
0044e576                  i_1 -= 1;
0044e577              } while (i != 1);
0044e541          }
0044e539      }
0044e500  }

0044e581     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0044e590  void __thiscall RenderMeshFragment::AddMaterialBatch(class RenderMeshFragment* this, class RenderMeshBatch* arg2)

0044e590  {
0044e596      arg2->m_cRef += 1;
0044e5a2      int32_t eax_1 = (this->m_MaterialBatches.m_sizeAndDeallocate & 0x7fffffff);
0044e5a9      uint8_t eax_4;
0044e5a9      
0044e5a9      if (this->m_MaterialBatches.m_num >= eax_1)
0044e5b7          eax_4 = SmartArray<unsigned long,1>::grow(&this->m_MaterialBatches, SmartArray<unsigned long,1>::get_new_size(&this->m_MaterialBatches, (eax_1 + 1)));
0044e5b7      
0044e5be      if ((this->m_MaterialBatches.m_num < eax_1 || eax_4 != 0))
0044e5be      {
0044e59c          this->m_MaterialBatches.m_data[this->m_MaterialBatches.m_num] = arg2;
0044e59c          this->m_MaterialBatches.m_num += 1;
0044e5be      }
0044e590  }


0044e5d0  uint8_t __thiscall RenderMeshFragment::ParseFromFileNode(class RenderMeshFragment* this, class PFileNode const* arg2, class RenderMesh* arg3)

0044e5d0  {
0044e5de      if (arg2 != 0)
0044e5de      {
0044e5e4          class PFileNode* var_1c = arg2;
0044e5e9          void var_c;
0044e5e9          PFileNodeIter::PFileNodeIter(&var_c, var_1c);
0044e5f7          class PFileNode* esi_1 = PFileNodeIter::Curr(&var_c);
0044e5f7          
0044e5fb          if (esi_1 == 0)
0044e5fb          {
0044e71f          label_44e71f:
0044e71f              PFileNodeIter::~PFileNodeIter(&var_c);
0044e724              int32_t eax_14;
0044e724              eax_14 = 1;
0044e72c              return 1;
0044e5fb          }
0044e5fb          
0044e601          while (true)
0044e601          {
0044e601              var_1c = &FragmentType;
0044e601              
0044e611              if (PFileNode::IsKeyword(esi_1, var_1c) == 0)
0044e611              {
0044e69b                  var_1c = &MaterialBatch;
0044e6a0                  uint8_t eax_9;
0044e6a0                  class PFileNode* ecx_11;
0044e6a0                  eax_9 = PFileNode::IsKeyword(esi_1, var_1c);
0044e6a0                  
0044e6a7                  if (eax_9 == 0)
0044e6a7                  {
0044e6f2                      var_1c = ecx_11;
0044e6fa                      PStringBase<char>::PStringBase<char>(&var_1c, "Unrecognized keyword in mesh fil…");
0044e700                      PFileNode::ReportWarning(esi_1, var_1c);
0044e6a7                  }
0044e6a7                  else
0044e6a7                  {
0044e6a9                      var_1c = 0x34;
0044e6ab                      void* eax_10 = operator new(var_1c);
0044e6b5                      class RenderMeshBatch* edi_1;
0044e6b5                      
0044e6b5                      if (eax_10 == 0)
0044e6c2                          edi_1 = nullptr;
0044e6b5                      else
0044e6be                          edi_1 = RenderMeshBatch::RenderMeshBatch(eax_10);
0044e6be                      
0044e6c8                      edi_1->m_pContainerMesh = arg3;
0044e6cb                      var_1c = esi_1;
0044e6ce                      uint8_t eax_12;
0044e6ce                      class PFileNode* ecx_15;
0044e6ce                      eax_12 = RenderMeshBatch::ParseFromFileNode(edi_1, var_1c);
0044e6ce                      
0044e6d5                      if (eax_12 == 0)
0044e6d5                      {
0044e759                          var_1c = ecx_15;
0044e761                          PStringBase<char>::PStringBase<char>(&var_1c, "Error parsing mesh batch");
0044e767                          PFileNode::ReportError(esi_1, var_1c);
0044e76c                          uint32_t m_cRef = edi_1->m_cRef;
0044e773                          edi_1->m_cRef = (m_cRef - 1);
0044e773                          
0044e776                          if (m_cRef != 1)
0044e776                          {
0044e749                              PFileNodeIter::~PFileNodeIter(&var_c);
0044e749                              break;
0044e776                          }
0044e776                          
0044e778                          struct RenderMeshBatch::VTable* vtable_2 = edi_1->vtable;
0044e77a                          var_1c = 1;
0044e77e                          vtable_2->__vecDelDtor(var_1c);
0044e784                          PFileNodeIter::~PFileNodeIter(&var_c);
0044e78b                          int32_t eax_17;
0044e78b                          eax_17 = 0;
0044e791                          return 0;
0044e6d5                      }
0044e6d5                      
0044e6db                      var_1c = edi_1;
0044e6de                      RenderMeshFragment::AddMaterialBatch(this, var_1c);
0044e6e3                      uint32_t m_cRef_1 = edi_1->m_cRef;
0044e6e3                      edi_1->m_cRef -= 1;
0044e6e3                      
0044e6e6                      if (m_cRef_1 == 1)
0044e6e6                      {
0044e6e8                          struct RenderMeshBatch::VTable* vtable_4 = edi_1->vtable;
0044e6ea                          var_1c = 1;
0044e6ee                          vtable_4->__vecDelDtor(var_1c);
0044e6e6                      }
0044e6a7                  }
0044e611              }
0044e611              else
0044e611              {
0044e617                  this->m_Type = 0;
0044e617                  
0044e625                  if (PFileNode::GetNumSubNodes(esi_1) <= 0)
0044e625                  {
0044e749                      PFileNodeIter::~PFileNodeIter(&var_c);
0044e749                      break;
0044e625                  }
0044e625                  
0044e62b                  struct PFileNode::VTable* vtable = esi_1->vtable;
0044e62d                  var_1c = &FragmentType_LevelOfDetailModel;
0044e62d                  
0044e642                  if (PFileNode::IsKeyword(vtable->GetSubNode(0), var_1c) == 0)
0044e642                  {
0044e650                      struct PFileNode::VTable* vtable_3 = esi_1->vtable;
0044e652                      var_1c = &FragmentType_OccludeModel;
0044e652                      
0044e667                      if (PFileNode::IsKeyword(vtable_3->GetSubNode(0), var_1c) == 0)
0044e667                      {
0044e675                          struct PFileNode::VTable* vtable_1 = esi_1->vtable;
0044e677                          var_1c = &FragmentType_ShadowLODModel;
0044e685                          uint8_t eax_8;
0044e685                          class PFileNode* ecx_10;
0044e685                          eax_8 = PFileNode::IsKeyword(vtable_1->GetSubNode(0), var_1c);
0044e685                          
0044e68c                          if (eax_8 == 0)
0044e68c                          {
0044e72f                              var_1c = ecx_10;
0044e737                              PStringBase<char>::PStringBase<char>(&var_1c, "Unrecognized mesh fragment type");
0044e73d                              PFileNode::ReportError(esi_1, var_1c);
0044e749                              PFileNodeIter::~PFileNodeIter(&var_c);
0044e749                              break;
0044e68c                          }
0044e68c                          
0044e692                          this->m_Type = 4;
0044e667                      }
0044e667                      else
0044e669                          this->m_Type = 2;
0044e642                  }
0044e642                  else
0044e644                      this->m_Type = 1;
0044e611              }
0044e611              
0044e711              esi_1 = PFileNodeIter::Next(&var_c);
0044e711              
0044e715              if (esi_1 == 0)
0044e715                  goto label_44e71f;
0044e601          }
0044e5de      }
0044e5de      
0044e74e      class PFileNode* eax_15;
0044e74e      eax_15 = 0;
0044e756      return 0;
0044e5d0  }

0044e794                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0044e7a0  void __fastcall RenderMeshFragment::OrganizeMaterialBatches(class RenderMeshFragment* this)

0044e7a0  {
0044e7ae      if (this->m_pTopology == 0)
0044e7ae      {
0044e7be          void* var_c = nullptr;
0044e7c2          int32_t var_8_1 = 0;
0044e7c6          int32_t var_4_1 = 0;
0044e7ca          SmartArray<unsigned long,1>::operator=(&var_c, &this->m_MaterialBatches);
0044e7d3          int32_t ebx_1 = 0;
0044e7d7          this->m_MaterialBatches.m_num = 0;
0044e7da          void* var_18 = nullptr;
0044e7de          int32_t var_14_1 = 0;
0044e7e2          int32_t var_10_1 = 0;
0044e7e2          
0044e7e6          if (var_4_1 > 0)
0044e7e6          {
0044e89c              do
0044e89c              {
0044e7f4                  void* edi_1 = *(uint32_t*)((char*)var_c + (ebx_1 << 2));
0044e7f7                  int32_t eax_3 = *(uint32_t*)((char*)edi_1 + 0x10);
0044e7f7                  
0044e7fd                  if (eax_3 == 0xffffffff)
0044e7fd                  {
0044e86c                  label_44e86c:
0044e86c                      int32_t eax_13 = (this->m_MaterialBatches.m_sizeAndDeallocate & 0x7fffffff);
0044e873                      uint8_t eax_16;
0044e873                      
0044e873                      if (this->m_MaterialBatches.m_num >= eax_13)
0044e881                          eax_16 = SmartArray<unsigned long,1>::grow(&this->m_MaterialBatches, SmartArray<unsigned long,1>::get_new_size(&this->m_MaterialBatches.m_data, (eax_13 + 1)));
0044e881                      
0044e888                      if ((this->m_MaterialBatches.m_num < eax_13 || eax_16 != 0))
0044e888                      {
0044e7b6                          this->m_MaterialBatches.m_data[this->m_MaterialBatches.m_num] = edi_1;
0044e7b6                          this->m_MaterialBatches.m_num += 1;
0044e888                      }
0044e7fd                  }
0044e7fd                  else
0044e7fd                  {
0044e808                      void* eax_4 = *(uint32_t*)((*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)edi_1 + 0xc) + 0x38) + 8) + (eax_3 << 3)) + 4);
0044e808                      
0044e80e                      if (eax_4 == 0)
0044e80e                          goto label_44e86c;
0044e80e                      
0044e810                      void* eax_5 = *(uint32_t*)((char*)eax_4 + 0x50);
0044e810                      
0044e829                      if (((eax_5 == 0 || *(uint32_t*)((char*)eax_5 + 0x80) <= 0) || (*(uint8_t*)((char*)((int16_t)***(uint32_t***)((char*)eax_5 + 0x78)))[1] & 1) == 0))
0044e815                          goto label_44e86c;
0044e815                      
0044e833                      int32_t eax_8 = (var_14_1 & 0x7fffffff);
0044e833                      
0044e83a                      if (var_10_1 < eax_8)
0044e83a                      {
0044e85d                          *(uint32_t*)((char*)var_18 + (var_10_1 << 2)) = edi_1;
0044e860                          var_10_1 += 1;
0044e83a                      }
0044e83a                      else if (SmartArray<unsigned long,1>::grow(&var_18, SmartArray<unsigned long,1>::get_new_size(&var_18, (eax_8 + 1))) != 0)
0044e853                      {
0044e85d                          *(uint32_t*)((char*)var_18 + (var_10_1 << 2)) = edi_1;
0044e860                          var_10_1 += 1;
0044e853                      }
0044e7fd                  }
0044e7fd                  
0044e899                  ebx_1 += 1;
0044e89c              } while (ebx_1 < var_4_1);
0044e7e6          }
0044e7e6          
0044e8ac          SmartArray<unsigned long,1>::grow(&this->m_MaterialBatches, (this->m_MaterialBatches.m_num + var_10_1));
0044e8b5          int32_t eax_20 = (var_10_1 - 1);
0044e8b5          
0044e8b8          if (eax_20 >= 0)
0044e8b8          {
0044e8d2              int32_t temp0_1;
0044e8d2              
0044e8d2              do
0044e8d2              {
0044e8c7                  int32_t edi_3 = *(uint32_t*)((char*)var_18 + (eax_20 << 2));
0044e8cc                  int32_t ecx_14 = (this->m_MaterialBatches.m_num + eax_20);
0044e8ce                  temp0_1 = eax_20;
0044e8ce                  eax_20 -= 1;
0044e7b6                  this->m_MaterialBatches.m_data[ecx_14] = edi_3;
0044e8d2              } while ((temp0_1 - 1) >= 0);
0044e8b8          }
0044e8b8          
0044e7b6          this->m_MaterialBatches.m_num += var_10_1;
0044e7b6          
0044e8f2          if ((var_14_1 & 0x80000000) == 0x80000000)
0044e8f9              operator delete[](var_18);
0044e8f9          
0044e90f          if ((var_8_1 & 0x80000000) == 0x80000000)
0044e916              operator delete[](var_c);
0044e7ae      }
0044e7a0  }

0044e924              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0044e930  void __thiscall RenderMeshFragment::GenerateAdjacencyGraph(class RenderMeshFragment* this, class SmartArray<RenderMeshFragmentTopology::TopBatchType,1> const* arg2)

0044e930  {
0044e93d      uint32_t m_num_2 = arg2->m_num;
0044e943      uint32_t esi = 0;
0044e943      
0044e947      if (m_num_2 > 0)
0044e947      {
0044e94e          class RenderMeshFragmentTopology::TopBatchType* m_data_1 = arg2->m_data;
0044e971          uint32_t i;
0044e971          
0044e971          do
0044e971          {
0044e950              class RenderMeshBatch* m_pBatch = m_data_1->m_pBatch;
0044e966              int32_t eax_2;
0044e966              int32_t edx_5;
0044e966              edx_5 = HIGHD((0xaaaaaaab * m_pBatch->m_pContainerMesh->m_pIndicesArray->m_IndexArrays.m_data[m_pBatch->m_IndexArrayIndex]->m_nNumIndices));
0044e966              eax_2 = LOWD((0xaaaaaaab * m_pBatch->m_pContainerMesh->m_pIndicesArray->m_IndexArrays.m_data[m_pBatch->m_IndexArrayIndex]->m_nNumIndices));
0044e96b              esi += (edx_5 >> 1);
0044e96d              m_data_1 = &m_data_1[1];
0044e970              i = m_num_2;
0044e970              m_num_2 -= 1;
0044e971          } while (i != 1);
0044e971          
0044e975          if (esi != 0)
0044e975          {
0044e982              SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::grow(&this->m_pTopology->m_TopTriangles, esi);
0044e995              SmartArray<VertexRange,1>::grow(&this->m_pTopology->m_TopEdges, (esi * 3));
0044e99a              class SmartArray<RenderMeshFragmentTopology::TopBatchType,1>* edi_1 = arg2;
0044e9a1              int32_t var_c_1 = 0;
0044e9a1              
0044e9a5              if (edi_1->m_num > 0)
0044e9a5              {
0044e9ab                  int32_t var_18_1 = 0;
0044ec5d                  bool cond:1_1;
0044ec5d                  
0044ec5d                  do
0044ec5d                  {
0044e9b4                      class RenderMeshFragmentTopology::TopBatchType* m_data = edi_1->m_data;
0044e9b6                      void* eax_4 = *(uint32_t*)((char*)m_data + var_18_1);
0044e9b9                      void* ebx = ((char*)m_data + var_18_1);
0044e9c7                      void* ecx_6 = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)eax_4 + 0xc) + 0x40) + 8) + (*(uint32_t*)((char*)eax_4 + 0x18) << 2));
0044e9d2                      int32_t eax_6;
0044e9d2                      int32_t edx_10;
0044e9d2                      edx_10 = HIGHD((0xaaaaaaab * *(uint32_t*)((char*)ecx_6 + 4)));
0044e9d2                      eax_6 = LOWD((0xaaaaaaab * *(uint32_t*)((char*)ecx_6 + 4)));
0044e9d5                      uint32_t edx_11 = (edx_10 >> 1);
0044e9d9                      void* var_1c_1 = ebx;
0044e9d9                      
0044e9dd                      if (edx_11 > 0)
0044e9dd                      {
0044e9e3                          int16_t* ebp_1 = *(uint32_t*)((char*)ecx_6 + 0x10);
0044e9e5                          int16_t* var_24_1 = ebp_1;
0044e9e9                          uint32_t var_10_1 = edx_11;
0044e9e9                          
0044e9f7                          while (true)
0044e9f7                          {
0044e9f7                              class RenderMeshFragmentTopology* m_pTopology = this->m_pTopology;
0044e9fa                              uint32_t m_num = m_pTopology->m_TopTriangles.m_num;
0044ea06                              int32_t eax_8 = (m_pTopology->m_TopTriangles.m_sizeAndDeallocate & 0x7fffffff);
0044ea11                              uint8_t eax_13;
0044ea11                              
0044ea11                              if (m_pTopology->m_TopTriangles.m_num >= eax_8)
0044ea11                              {
0044ea13                                  uint32_t edx_12 = (eax_8 + 1);
0044ea13                                  
0044ea19                                  if (edx_12 <= 8)
0044ea1b                                      edx_12 = 8;
0044ea19                                  else if (edx_12 <= 0x4000)
0044ea28                                  {
0044ea47                                      int32_t eflags_1;
0044ea47                                      char eax_12;
0044ea47                                      eax_12 = __bsr_gprv_memv(edx_12);
0044ea53                                      int32_t esi_2 = (1 << eax_12);
0044ea53                                      
0044ea57                                      if (edx_12 > esi_2)
0044ea59                                          edx_12 = (esi_2 * 2);
0044ea28                                  }
0044ea28                                  else
0044ea28                                  {
0044ea2c                                      int32_t eax_10 = (edx_12 & 0x3fff);
0044ea2c                                      
0044ea31                                      if (eax_10 != 0)
0044ea3a                                          edx_12 += (0x4000 - eax_10);
0044ea28                                  }
0044ea28                                  
0044ea5f                                  eax_13 = SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::grow(&m_pTopology->m_TopTriangles, edx_12);
0044ea11                              }
0044ea11                              
0044ea66                              if ((m_pTopology->m_TopTriangles.m_num < eax_8 || eax_13 != 0))
0044ea00                                  m_pTopology->m_TopTriangles.m_num += 1;
0044ea00                              
0044ea7c                              void* ecx_13 = &this->m_pTopology->m_TopTriangles.m_data[m_num];
0044ea7f                              int32_t eax_16 = 0;
0044ea85                              int32_t var_14_2 = 0;
0044ea85                              
0044ea93                              while (true)
0044ea93                              {
0044ea93                                  uint32_t var_2c;
0044ea93                                  uint32_t var_28;
0044ea93                                  int32_t eax_22;
0044ea93                                  
0044ea93                                  if (eax_16 == 0)
0044ea93                                  {
0044eacd                                      eax_22 = *(uint32_t*)((char*)ebx + 4);
0044ead8                                      var_2c = ((uint32_t)*(uint16_t*)(eax_22 + (((uint32_t)*(uint16_t*)ebp_1) << 1)));
0044eae0                                      var_28 = ((uint32_t)*(uint16_t*)(eax_22 + (((uint32_t)ebp_1[1]) << 1)));
0044ea93                                  }
0044ea93                                  else if (eax_16 == 1)
0044ea96                                  {
0044eabc                                      eax_22 = *(uint32_t*)((char*)ebx + 4);
0044ead8                                      var_2c = ((uint32_t)*(uint16_t*)(eax_22 + (((uint32_t)ebp_1[1]) << 1)));
0044eae0                                      var_28 = ((uint32_t)*(uint16_t*)(eax_22 + (((uint32_t)ebp_1[2]) << 1)));
0044ea96                                  }
0044ea96                                  else if (eax_16 == 2)
0044ea99                                  {
0044ea9f                                      int32_t eax_20 = *(uint32_t*)((char*)ebx + 4);
0044eaae                                      var_2c = ((uint32_t)*(uint16_t*)(eax_20 + (((uint32_t)ebp_1[2]) << 1)));
0044eab2                                      var_28 = ((uint32_t)*(uint16_t*)(eax_20 + (((uint32_t)*(uint16_t*)ebp_1) << 1)));
0044ea99                                  }
0044eae8                                  class RenderMeshFragmentTopology* m_pTopology_1 = this->m_pTopology;
0044eaeb                                  uint32_t m_num_1 = m_pTopology_1->m_TopEdges.m_num;
0044eaee                                  uint32_t m_num_4 = 0;
0044eaee                                  
0044eaf2                                  if (m_num_1 <= 0)
0044eaf2                                      goto label_44eb3d;
0044eaf2                                  
0044eaf4                                  class RenderMeshFragmentTopology::TopEdgeType* m_data_2 = m_pTopology_1->m_TopEdges.m_data;
0044eaf7                                  class RenderMeshFragmentTopology::TopEdgeType* m_data_3 = m_data_2;
0044eaf7                                  
0044eb19                                  while ((((uint32_t)m_data_3->m_TopVertexIndices[0]) != var_28 || (((uint32_t)m_data_3->m_TopVertexIndices[1]) != var_2c || m_data_3->m_NeighbourTopTriangleIndices[1] != 0xffff)))
0044eb19                                  {
0044eb1b                                      m_num_4 += 1;
0044eb1c                                      m_data_3 = &m_data_3[1];
0044eb1c                                      
0044eb21                                      if (m_num_4 >= m_num_1)
0044eb21                                          goto label_44eb30;
0044eb19                                  }
0044eb19                                  
0044eb2a                                  uint32_t m_num_3;
0044eb2a                                  
0044eb2a                                  if (m_num_4 != 0xffff)
0044eb2a                                  {
0044ebcf                                      m_data_3 = m_num;
0044ebd4                                      ebp_1 = var_24_1;
0044ebd8                                      m_num_3 = m_num_4;
0044ebda                                      m_data_2[m_num_4].m_NeighbourTopTriangleIndices[1] = m_data_3;
0044eb2a                                  }
0044eb2a                                  else
0044eb2a                                  {
0044eb30                                  label_44eb30:
0044eb30                                      ebp_1 = var_24_1;
0044eb3d                                  label_44eb3d:
0044eb3d                                      int32_t eax_24 = (m_pTopology_1->m_TopEdges.m_sizeAndDeallocate & 0x7fffffff);
0044eb44                                      m_num_3 = m_num_1;
0044eb46                                      uint8_t eax_29;
0044eb46                                      
0044eb46                                      if (m_pTopology_1->m_TopEdges.m_num >= eax_24)
0044eb46                                      {
0044eb48                                          uint32_t edx_19 = (eax_24 + 1);
0044eb48                                          
0044eb4e                                          if (edx_19 <= 8)
0044eb50                                              edx_19 = 8;
0044eb4e                                          else if (edx_19 <= 0x4000)
0044eb5d                                          {
0044eb7c                                              int32_t eflags_2;
0044eb7c                                              char eax_28;
0044eb7c                                              eax_28 = __bsr_gprv_memv(edx_19);
0044eb88                                              int32_t esi_3 = (1 << eax_28);
0044eb88                                              
0044eb8c                                              if (edx_19 > esi_3)
0044eb8e                                                  edx_19 = (esi_3 * 2);
0044eb5d                                          }
0044eb5d                                          else
0044eb5d                                          {
0044eb61                                              int32_t eax_26 = (edx_19 & 0x3fff);
0044eb61                                              
0044eb66                                              if (eax_26 != 0)
0044eb6f                                                  edx_19 += (0x4000 - eax_26);
0044eb5d                                          }
0044eb5d                                          
0044eb94                                          eax_29 = SmartArray<VertexRange,1>::grow(&m_pTopology_1->m_TopEdges, edx_19);
0044eb46                                      }
0044eb46                                      
0044eb9b                                      if ((m_pTopology_1->m_TopEdges.m_num < eax_24 || eax_29 != 0))
0044eb3a                                          m_pTopology_1->m_TopEdges.m_num += 1;
0044eb3a                                      
0044ebaa                                      class RenderMeshFragment* edx_20;
0044ebaa                                      edx_20 = var_2c;
0044ebaf                                      void* eax_31 = &this->m_pTopology->m_TopEdges.m_data[m_num_3];
0044ebb2                                      class RenderMeshFragmentTopology::TopEdgeType* ecx_23;
0044ebb2                                      ecx_23 = var_28;
0044ebb7                                      *(uint16_t*)eax_31 = edx_20;
0044ebba                                      edx_20 = m_num;
0044ebbf                                      *(uint16_t*)((char*)eax_31 + 2) = ecx_23;
0044ebc3                                      *(uint16_t*)((char*)eax_31 + 4) = edx_20;
0044ebc7                                      *(uint16_t*)((char*)eax_31 + 6) = 0xffff;
0044eb2a                                  }
0044eb2a                                  
0044ebe7                                  *(uint16_t*)(((char*)ecx_13 + (var_14_2 << 1)) + 6) = m_num_3;
0044ebec                                  eax_16 = (var_14_2 + 1);
0044ebf0                                  var_14_2 = eax_16;
0044ebf0                                  
0044ebf4                                  if (eax_16 >= 3)
0044ebf4                                      break;
0044ebf4                                  
0044ea8b                                  ebx = var_1c_1;
0044ea93                              }
0044ea93                              
0044ec05                              uint32_t edx_21;
0044ec05                              edx_21 = *(uint16_t*)(*(uint32_t*)((char*)var_1c_1 + 4) + (((uint32_t)*(uint16_t*)ebp_1) << 1));
0044ec09                              *(uint16_t*)ecx_13 = edx_21;
0044ec13                              uint32_t edx_22;
0044ec13                              edx_22 = *(uint16_t*)(*(uint32_t*)((char*)var_1c_1 + 4) + (((uint32_t)ebp_1[1]) << 1));
0044ec17                              *(uint16_t*)((char*)ecx_13 + 2) = edx_22;
0044ec22                              uint32_t edx_23;
0044ec22                              edx_23 = *(uint16_t*)(*(uint32_t*)((char*)var_1c_1 + 4) + (((uint32_t)ebp_1[2]) << 1));
0044ec2a                              ebp_1 = &ebp_1[3];
0044ec2d                              bool cond:6_1 = var_10_1 != 1;
0044ec2e                              *(uint16_t*)((char*)ecx_13 + 4) = edx_23;
0044ec32                              var_24_1 = ebp_1;
0044ec36                              var_10_1 -= 1;
0044ec36                              
0044ec3a                              if (!(cond:6_1))
0044ec3a                                  break;
0044ec3a                              
0044e9ef                              ebx = var_1c_1;
0044e9f7                          }
0044e9f7                          
0044ec40                          edi_1 = arg2;
0044e9dd                      }
0044e9dd                      
0044ec53                      cond:1_1 = (var_c_1 + 1) < edi_1->m_num;
0044ec55                      var_c_1 += 1;
0044ec59                      var_18_1 += 0x10;
0044ec5d                  } while (cond:1_1);
0044e9a5              }
0044e975          }
0044e947      }
0044e930  }

0044ec6d                                         90 90 90                                                               ...

0044ec70  uint8_t __thiscall SmartArray<RenderMeshFragmentTopology::TopBatchType,1>::grow(class SmartArray<RenderMeshFragmentTopology::TopBatchType,1>* this, uint32_t arg2)

0044ec70  {
0044ec72      uint32_t ebp = arg2;
0044ec7c      void* eax;
0044ec7c      
0044ec7c      if (ebp >= this->m_num)
0044ec7c      {
0044ec8c          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
0044ec8c          {
0044ed3f              eax = 1;
0044ed42              return 1;
0044ec8c          }
0044ec8c          
0044ec94          if (ebp == 0)
0044ec94          {
0044ec96              SmartArray<RenderMeshFragmentTopology::TopBatchType,1>::Reset(this);
0044ec9d              int32_t eax_2;
0044ec9d              eax_2 = 1;
0044eca0              return 1;
0044ec94          }
0044ec94          
0044ecac          eax = operator new[](((ebp << 4) + 4));
0044ecac          
0044ecb6          if (eax != 0)
0044ecb6          {
0044ecc2              void* edi_1 = ((char*)eax + 4);
0044ecc8              *(uint32_t*)eax = ebp;
0044ecca              `vector constructor iterator'(edi_1, 0x10, ebp, RenderMeshFragmentTopology::TopBatchType::TopBatchType);
0044ecca              
0044ecd1              if (edi_1 != 0)
0044ecd1              {
0044ecd6                  if (this->m_data != 0)
0044ecd6                  {
0044ecd8                      uint32_t m_num = this->m_num;
0044ecd8                      
0044ecdc                      if ((m_num - 1) >= 0)
0044ecdc                      {
0044ece1                          int32_t* esi_2 = ((m_num - 1) << 4);
0044ece5                          arg2 = m_num;
0044ed13                          bool cond:1_1;
0044ed13                          
0044ed13                          do
0044ed13                          {
0044ecf0                              class RenderMeshFragmentTopology::TopBatchType* m_data = this->m_data;
0044ecff                              *(uint32_t*)((char*)esi_2 + edi_1) = *(uint32_t*)((char*)m_data + esi_2);
0044ed02                              SmartArray<unsigned short,1>::operator=((((char*)esi_2 + edi_1) + 4), (&m_data->m_BatchVertexToTopVertexIndices + esi_2));
0044ed0b                              esi_2 -= 0x10;
0044ed0e                              cond:1_1 = arg2 != 1;
0044ed0f                              arg2 -= 1;
0044ed13                          } while (cond:1_1);
0044ecdc                      }
0044ecdc                      
0044ed23                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044ed23                      {
0044ed25                          class RenderMeshFragmentTopology::TopBatchType* m_data_1 = this->m_data;
0044ed25                          
0044ed29                          if (m_data_1 != 0)
0044ed2d                              RenderMeshFragmentTopology::TopBatchType::`vector deleting destructor'(m_data_1, 3);
0044ed23                      }
0044ecd6                  }
0044ecd6                  
0044ed38                  this->m_data = edi_1;
0044ed3a                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
0044ed3f                  eax = 1;
0044ed42                  return 1;
0044ecd1              }
0044ecb6          }
0044ec7c      }
0044ec7c      
0044ed47      eax = 0;
0044ed4a      return 0;
0044ec70  }

0044ed4d                                         90 90 90                                                               ...

0044ed50  void __thiscall RenderMeshFragment::Serialize(class RenderMeshFragment* this, class Archive* arg2, class RenderMesh* arg3)

0044ed50  {
0044ed50      class RenderMeshFragment* this_1 = this;
0044ed54      class Archive* edi = arg2;
0044ed58      class RenderMeshFragment* this_2 = this;
0044ed5e      class RenderMeshFragment* this_3 = this_2;
0044ed62      Archive::CheckAlignment(edi, 4);
0044ed6b      uint8_t* eax = Archive::GetBytes(edi, 4);
0044ed6b      
0044ed72      if (eax != 0)
0044ed72      {
0044ed78          if ((edi->m_flags & 1) == 0)
0044ed83              this_2->m_Type = *(uint32_t*)eax;
0044ed78          else
0044ed7d              *(uint32_t*)eax = this_2->m_Type;
0044ed72      }
0044ed72      
0044ed86      uint32_t m_num = this_2->m_MaterialBatches.m_num;
0044ed8d      arg2 = m_num;
0044ed91      Archive::CheckAlignment(edi, 4);
0044ed9a      uint32_t* eax_1 = Archive::GetBytes(edi, 4);
0044ed9a      
0044eda1      if (eax_1 != 0)
0044eda1      {
0044eda7          if ((edi->m_flags & 1) == 0)
0044eda7          {
0044edad              uint32_t m_num_1 = *(uint32_t*)eax_1;
0044edaf              arg2 = m_num_1;
0044edb3              m_num = m_num_1;
0044eda7          }
0044eda7          else
0044eda9              *(uint32_t*)eax_1 = m_num;
0044eda1      }
0044eda1      
0044edb6      int32_t ebp = 0;
0044edb6      
0044edba      if (m_num > 0)
0044edba      {
0044edbc          class SmartArray<RenderMeshBatch *,1>* esi = &this_2->m_MaterialBatches;
0044edbc          
0044ee2f          do
0044ee2f          {
0044edc8              if ((!(edi->m_flags) & 1) != 0)
0044edc8              {
0044edcc                  void* eax_2 = operator new(0x34);
0044edd6                  int32_t ebx;
0044edd6                  
0044edd6                  if (eax_2 == 0)
0044ede3                      ebx = 0;
0044edd6                  else
0044eddf                      ebx = RenderMeshBatch::RenderMeshBatch(eax_2);
0044eddf                  
0044edeb                  int32_t eax_5 = (esi->m_sizeAndDeallocate & 0x7fffffff);
0044edf2                  uint8_t eax_8;
0044edf2                  
0044edf2                  if (esi->m_num >= eax_5)
0044ee00                      eax_8 = SmartArray<unsigned long,1>::grow(esi, SmartArray<unsigned long,1>::get_new_size(esi, (eax_5 + 1)));
0044ee00                  
0044ee07                  if ((esi->m_num < eax_5 || eax_8 != 0))
0044ee07                  {
0044ee0c                      esi->m_data[esi->m_num] = ebx;
0044ee11                      esi->m_num += 1;
0044ee07                  }
0044ee07                  
0044ee14                  this_2 = this_3;
0044edc8              }
0044edc8              
0044ee23              RenderMeshBatch::Serialize(esi->m_data[ebp], edi, arg3);
0044ee2c              ebp += 1;
0044ee2f          } while (ebp < arg2);
0044edba      }
0044edba      
0044ee3a      this_2 = this_2->m_pTopology != 0;
0044ee3d      Archive::CheckAlignment(edi, 1);
0044ee46      uint8_t* eax_11 = Archive::GetBytes(edi, 1);
0044ee46      
0044ee50      if (eax_11 != 0)
0044ee50      {
0044ee56          if ((edi->m_flags & 1) == 0)
0044ee5c              this_2 = *(uint8_t*)eax_11;
0044ee56          else
0044ee58              *(uint8_t*)eax_11 = this_2;
0044ee50      }
0044ee50      
0044ee62      if ((edi->m_flags & 5) != 0)
0044ee62      {
0044ee74      label_44ee74:
0044ee74          
0044ee76          if (this_2 != 0)
0044ee76          {
0044ee78              eax_11 = edi->m_flags;
0044ee7b              eax_11 = !(eax_11);
0044ee7b              
0044ee7f              if ((eax_11 & 1) != 0)
0044ee7f              {
0044ee83                  class RenderMeshFragmentTopology* eax_12 = operator new(0x2c);
0044ee83                  
0044ee8d                  if (eax_12 == 0)
0044eeb9                      eax_12 = nullptr;
0044ee8d                  else
0044ee8d                  {
0044ee8f                      eax_12->m_cRef = 1;
0044ee96                      eax_12->vtable = 0x79b344;
0044ee9c                      __builtin_memset(&eax_12->m_TopVertices, 0, 0x24);
0044ee8d                  }
0044ee8d                  
0044eebf                  this_3->m_pTopology = eax_12;
0044ee7f              }
0044ee7f              
0044eec6              class RenderMeshFragmentTopology* m_pTopology = this_3->m_pTopology;
0044eecd              SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::Serialize(&m_pTopology->m_TopVertices, edi);
0044eed6              SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::Serialize(&m_pTopology->m_TopTriangles, edi);
0044eedf              SmartArray<RenderMeshFragmentTopology::TopEdgeType,1>::Serialize(&m_pTopology->m_TopEdges, edi);
0044ee76          }
0044ee62      }
0044ee62      else if (this_2 != 0)
0044ee66      {
0044ee6b          if (this_2 != 1)
0044ee6f              Archive::RaiseError(edi);
0044ee6f          
0044ee6b          goto label_44ee74;
0044ee66      }
0044ed50  }

0044eeeb                                   90 90 90 90 90                                                             .....

0044eef0  void __thiscall RenderMeshFragment::GenerateTopologyVertices(class RenderMeshFragment* this, class SmartArray<Vector3,1>* arg2, class SmartArray<RenderMeshFragmentTopology::TopBatchType,1>* arg3)

0044eef0  {
0044eef3      class RenderMeshFragment* this_1 = this;
0044eefa      int32_t i = 0;
0044eefe      int32_t i_1 = 0;
0044eefe      
0044ef02      if (this->m_MaterialBatches.m_num > 0)
0044ef02      {
0044f189          do
0044f189          {
0044ef13              void* esi_1 = this->m_MaterialBatches.m_data[i];
0044ef16              int32_t eax = *(uint32_t*)((char*)esi_1 + 0x10);
0044ef16              
0044ef1c              if (eax == 0xffffffff)
0044ef1c              {
0044ef51              label_44ef51:
0044ef51                  void* edi_1 = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)esi_1 + 0xc) + 0x3c) + 8) + (*(uint32_t*)((char*)esi_1 + 0x14) << 2));
0044ef5e                  int32_t eax_5 = (arg3->m_sizeAndDeallocate & 0x7fffffff);
0044ef65                  void* var_c_1 = edi_1;
0044ef65                  
0044ef69                  if (arg3->m_num < eax_5)
0044ef84                      arg3->m_num += 1;
0044ef69                  else if (SmartArray<RenderMeshFragmentTopology::TopBatchType,1>::grow(arg3, SmartArray<unsigned long,1>::get_new_size(arg3, (eax_5 + 1))) != 0)
0044ef84                      arg3->m_num += 1;
0044ef84                  
0044ef93                  void* eax_10 = &arg3[-1].m_data[arg3->m_num];
0044ef97                  *(uint32_t*)eax_10 = esi_1;
0044ef9c                  int32_t ebx_1 = 0;
0044ef9c                  
0044efa0                  if (*(uint32_t*)((char*)edi_1 + 0x7c) > 0)
0044efa0                  {
0044efbf                      while (true)
0044efbf                      {
0044efbf                          class SmartArray<Vector3,1>* edi_2 = arg2;
0044efc3                          int32_t* esi_4 = ((*(uint32_t*)((char*)edi_1 + 0xc) * ebx_1) + *(uint32_t*)((char*)edi_1 + 0x80));
0044efcd                          uint32_t m_num = SmartArray<Vector3,1>::WhatNum(edi_2, esi_4);
0044efcd                          
0044efd2                          if (m_num == 0xffffffff)
0044efd2                          {
0044efde                              int32_t eax_14 = (edi_2->m_sizeAndDeallocate & 0x7fffffff);
0044efde                              
0044efe5                              if (edi_2->m_num < eax_14)
0044efe5                                  goto label_44f044;
0044efe5                              
0044efe7                              uint32_t edx_9 = (eax_14 + 1);
0044efe7                              
0044efed                              if (edx_9 <= 8)
0044efef                                  edx_9 = 8;
0044efed                              else if (edx_9 <= 0x4000)
0044effc                              {
0044f01b                                  int32_t eflags_1;
0044f01b                                  char eax_18;
0044f01b                                  eax_18 = __bsr_gprv_memv(edx_9);
0044f027                                  int32_t edi_3 = (1 << eax_18);
0044f027                                  
0044f02b                                  if (edx_9 > edi_3)
0044f02d                                      edx_9 = (edi_3 * 2);
0044f02d                                  
0044f030                                  edi_2 = arg2;
0044effc                              }
0044effc                              else
0044effc                              {
0044f000                                  int32_t eax_16 = (edx_9 & 0x3fff);
0044f000                                  
0044f005                                  if (eax_16 != 0)
0044f00e                                      edx_9 += (0x4000 - eax_16);
0044effc                              }
0044effc                              
0044f037                              uint8_t eax_19;
0044f037                              void* ecx_11;
0044f037                              eax_19 = SmartArray<Vector3,1>::grow(edi_2, edx_9);
0044f037                              
0044f03e                              if (eax_19 != 0)
0044f03e                              {
0044f040                                  edi_2 = arg2;
0044f044                              label_44f044:
0044f04c                                  ecx_11 = &edi_2->m_data[edi_2->m_num];
0044f051                                  *(uint32_t*)ecx_11 = *(uint32_t*)esi_4;
0044f056                                  *(uint32_t*)((char*)ecx_11 + 4) = esi_4[1];
0044f05c                                  *(uint32_t*)((char*)ecx_11 + 8) = esi_4[2];
0044f063                                  arg2->m_num += 1;
0044f03e                              }
0044f03e                              
0044f06a                              class RenderMeshFragmentTopology* m_pTopology = this_1->m_pTopology;
0044f06d                              m_num = m_pTopology->m_TopVertices.m_num;
0044f070                              ecx_11 = i_1;
0044f081                              int32_t eax_26 = (m_pTopology->m_TopVertices.m_sizeAndDeallocate & 0x7fffffff);
0044f088                              int16_t var_e_1 = ebx_1;
0044f08d                              uint8_t eax_31;
0044f08d                              
0044f08d                              if (m_pTopology->m_TopVertices.m_num >= eax_26)
0044f08d                              {
0044f08f                                  uint32_t edx_13 = (eax_26 + 1);
0044f08f                                  
0044f095                                  if (edx_13 <= 8)
0044f097                                      edx_13 = 8;
0044f095                                  else if (edx_13 <= 0x4000)
0044f0a4                                  {
0044f0c3                                      int32_t eflags_2;
0044f0c3                                      char eax_30;
0044f0c3                                      eax_30 = __bsr_gprv_memv(edx_13);
0044f0cf                                      int32_t esi_5 = (1 << eax_30);
0044f0cf                                      
0044f0d3                                      if (edx_13 > esi_5)
0044f0d5                                          edx_13 = (esi_5 * 2);
0044f0a4                                  }
0044f0a4                                  else
0044f0a4                                  {
0044f0a8                                      int32_t eax_28 = (edx_13 & 0x3fff);
0044f0a8                                      
0044f0ad                                      if (eax_28 != 0)
0044f0b6                                          edx_13 += (0x4000 - eax_28);
0044f0a4                                  }
0044f0a4                                  
0044f0db                                  eax_31 = SmartArray<RenderMeshFragmentTopology::TopVertexType,1>::grow(&m_pTopology->m_TopVertices, edx_13);
0044f08d                              }
0044f08d                              
0044f0e2                              if ((m_pTopology->m_TopVertices.m_num < eax_26 || eax_31 != 0))
0044f0e2                              {
0044f074                                  m_pTopology->m_TopVertices.m_data[m_pTopology->m_TopVertices.m_num].m_BatchIndex = ecx_11;
0044f074                                  m_pTopology->m_TopVertices.m_num += 1;
0044f0e2                              }
0044efd2                          }
0044efd2                          
0044f0fd                          int32_t eax_34 = (*(uint32_t*)((char*)eax_10 + 8) & 0x7fffffff);
0044f104                          uint8_t eax_39;
0044f104                          
0044f104                          if (*(uint32_t*)((char*)eax_10 + 0xc) >= eax_34)
0044f104                          {
0044f106                              uint32_t edx_15 = (eax_34 + 1);
0044f106                              
0044f10c                              if (edx_15 <= 8)
0044f10e                                  edx_15 = 8;
0044f10c                              else if (edx_15 <= 0x4000)
0044f11b                              {
0044f13a                                  int32_t eflags_3;
0044f13a                                  char eax_38;
0044f13a                                  eax_38 = __bsr_gprv_memv(edx_15);
0044f146                                  int32_t esi_6 = (1 << eax_38);
0044f146                                  
0044f14a                                  if (edx_15 > esi_6)
0044f14c                                      edx_15 = (esi_6 * 2);
0044f11b                              }
0044f11b                              else
0044f11b                              {
0044f11f                                  int32_t eax_36 = (edx_15 & 0x3fff);
0044f11f                                  
0044f124                                  if (eax_36 != 0)
0044f12d                                      edx_15 += (0x4000 - eax_36);
0044f11b                              }
0044f11b                              
0044f152                              eax_39 = SmartArray<unsigned short,1>::grow(((char*)eax_10 + 4), edx_15);
0044f104                          }
0044f104                          
0044f159                          if ((*(uint32_t*)((char*)eax_10 + 0xc) < eax_34 || eax_39 != 0))
0044f159                          {
0044f160                              *(uint16_t*)(*(uint32_t*)((char*)eax_10 + 4) + (*(uint32_t*)((char*)eax_10 + 0xc) << 1)) = m_num;
0044f164                              *(uint32_t*)((char*)eax_10 + 0xc) += 1;
0044f159                          }
0044f159                          
0044f16e                          ebx_1 += 1;
0044f16e                          
0044f171                          if (ebx_1 >= *(uint32_t*)((char*)var_c_1 + 0x7c))
0044f171                              break;
0044f171                          
0044efaf                          edi_1 = var_c_1;
0044efbf                      }
0044efa0                  }
0044efa0                  
0044f177                  this = this_1;
0044ef1c              }
0044ef1c              else
0044ef1c              {
0044ef27                  void* eax_1 = *(uint32_t*)((*(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)esi_1 + 0xc) + 0x38) + 8) + (eax << 3)) + 4);
0044ef27                  
0044ef2d                  if (eax_1 == 0)
0044ef2d                      goto label_44ef51;
0044ef2d                  
0044ef2f                  int32_t edx_4;
0044ef2f                  edx_4 = *(uint8_t*)((char*)eax_1 + 0x4c);
0044ef2f                  
0044ef34                  if (edx_4 != 0)
0044ef34                  {
0044ef3a                      edx_4 = *(uint8_t*)((char*)eax_1 + 0x4d);
0044ef3a                      
0044ef3f                      if (edx_4 == 0)
0044ef3f                          goto label_44ef51;
0044ef34                  }
0044ef1c              }
0044ef1c              
0044f182              i = (i_1 + 1);
0044f185              i_1 = i;
0044f189          } while (i < this->m_MaterialBatches.m_num);
0044ef02      }
0044eef0  }

0044f199                                                                             90 90 90 90 90 90 90                           .......

0044f1a0  void __fastcall RenderMeshFragment::GenerateTopology(class RenderMeshFragment* this)

0044f1a0  {
0044f1a7      class RenderMeshFragmentTopology* m_pTopology = this->m_pTopology;
0044f1a7      
0044f1ae      if (m_pTopology != 0)
0044f1ae      {
0044f1b0          uint32_t m_cRef = m_pTopology->m_cRef;
0044f1b0          m_pTopology->m_cRef -= 1;
0044f1b0          
0044f1b3          if (m_cRef == 1)
0044f1b5              m_pTopology->vtable->__vecDelDtor(1);
0044f1b5          
0044f1bb          this->m_pTopology = nullptr;
0044f1ae      }
0044f1ae      
0044f1c0      class RenderMeshFragmentTopology* eax_2 = operator new(0x2c);
0044f1c0      
0044f1ca      if (eax_2 == 0)
0044f1f6          eax_2 = nullptr;
0044f1ca      else
0044f1ca      {
0044f1cc          eax_2->m_cRef = 1;
0044f1d3          eax_2->vtable = 0x79b344;
0044f1d9          __builtin_memset(&eax_2->m_TopVertices, 0, 0x24);
0044f1ca      }
0044f1ca      
0044f204      this->m_pTopology = eax_2;
0044f207      class RenderMeshFragmentTopology::TopBatchType* s;
0044f207      __builtin_memset(&s, 0, 0x18);
0044f21f      void* var_c;
0044f21f      RenderMeshFragment::GenerateTopologyVertices(this, &var_c, &s);
0044f22b      RenderMeshFragment::GenerateAdjacencyGraph(this, &s);
0044f240      int32_t var_8;
0044f240      
0044f240      if ((var_8 & 0x80000000) == 0x80000000)
0044f247          operator delete[](var_c);
0044f247      
0044f25d      int32_t var_14;
0044f25d      
0044f25d      if ((var_14 & 0x80000000) == 0x80000000)
0044f25d      {
0044f25f          class RenderMeshFragmentTopology::TopBatchType* s_1 = s;
0044f25f          
0044f265          if (s_1 != 0)
0044f269              RenderMeshFragmentTopology::TopBatchType::`vector deleting destructor'(s_1, 3);
0044f25d      }
0044f1a0  }

0044f274                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0044f280  void __fastcall RenderMeshBatch::RenderMeshBatch(class RenderMeshBatch* this)

0044f280  {
0044f287      this->m_cRef = 1;
0044f28e      this->vtable = 0x79b38c;
0044f294      this->m_PrimitivesType = PRIMTYPE_INVALID;
0044f29b      this->m_pContainerMesh = nullptr;
0044f29e      this->m_MaterialIndex = 0xffffffff;
0044f2a1      this->m_VertexArrayIndex = 0xffffffff;
0044f2a4      this->m_IndexArrayIndex = 0xffffffff;
0044f2a7      this->m_FirstIndex = 0;
0044f2aa      this->m_NumPrimitives = 0;
0044f2ad      this->m_pIBTrickUserObjectPointer = nullptr;
0044f2b0      this->m_IBTrickVertexSkinningID = 0;
0044f2b3      this->m_IBTrickStreamFrameID = 0xffffffff;
0044f2b6      this->m_IBTrickBaseVertexIndex = 0xffffffff;
0044f280  }

0044f2ba                                                                                90 90 90 90 90 90                            ......

0044f2c0  void* __thiscall RenderMeshBatch::`scalar deleting destructor'(class RenderMeshBatch* this, uint32_t arg2)

0044f2c0  {
0044f2c8      this->m_pContainerMesh = nullptr;
0044f2cf      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
0044f2cf      
0044f2d5      if ((arg2 & 1) != 0)
0044f2d8          operator delete(this);
0044f2d8      
0044f2e3      return this;
0044f2c0  }

0044f2e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0044f2f0  uint8_t __thiscall RenderMeshBatch::InitRenderBatch(class RenderMeshBatch* this, class MaterialInstance* arg2, enum PrimType arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6, uint8_t const arg7, uint8_t const arg8, class RenderVertexBuffer** arg9)

0044f2f0  {
0044f303      *(uint32_t*)arg9 = nullptr;
0044f303      
0044f309      if (arg4 == 0xffffffff)
0044f309      {
0044f30b          class RenderVertexBuffer* eax_1 = RenderVertexBuffer::AllocateVertexBuffer();
0044f321          *(uint32_t*)arg9 = eax_1;
0044f321          
0044f32d          if (eax_1->vtable->Startup(arg5, arg6, arg7, arg8, 0xffffffff) == 0)
0044f32d          {
0044f32f              class RenderVertexBuffer* ecx_4 = *(uint32_t*)arg9;
0044f32f              
0044f333              if (ecx_4 != 0)
0044f333              {
0044f335                  uint32_t m_cRef = ecx_4->m_cRef;
0044f335                  ecx_4->m_cRef -= 1;
0044f335                  
0044f338                  if (m_cRef == 1)
0044f33a                      ecx_4->vtable->__vecDelDtor(1);
0044f33a                  
0044f340                  *(uint32_t*)arg9 = nullptr;
0044f333              }
0044f333              
0044f34c              return 0;
0044f32d          }
0044f309      }
0044f309      
0044f359      this->m_PrimitivesType = arg3;
0044f359      
0044f35c      if (arg2 != 0)
0044f35c      {
0044f35e          arg2->vtable->AddRef();
0044f372          class MaterialInstance* var_14_1 = arg2;
0044f37d          this->m_MaterialIndex = RenderMesh::AddMaterial(this->m_pContainerMesh, INVALID_DID.id);
0044f35c      }
0044f35c      
0044f380      uint32_t eax_5 = arg4;
0044f380      
0044f387      if (eax_5 == 0xffffffff)
0044f38f          eax_5 = RenderMesh::AddVertexArray(this->m_pContainerMesh, *(uint32_t*)arg9);
0044f38f      
0044f394      this->m_VertexArrayIndex = eax_5;
0044f399      this->m_FirstIndex = 0;
0044f39c      this->m_NumPrimitives = 0;
0044f3a8      int32_t eax_7;
0044f3a8      
0044f3a8      switch ((this->m_PrimitivesType - 1))
0044f3a8      {
0044f3e2          case 0:
0044f3e2          {
0044f3e2              this->m_NumPrimitives = arg5;
0044f3e2              break;
0044f3e2          }
0044f3b1          case 1:
0044f3b1          {
0044f3b1              this->m_NumPrimitives = (arg5 >> 1);
0044f3b4              eax_7 = 1;
0044f3ba              return 1;
0044f3b1              break;
0044f3b1          }
0044f3be          case 2:
0044f3be          {
0044f3be              this->m_NumPrimitives = (arg5 - 1);
0044f3c1              eax_7 = 1;
0044f3c7              return 1;
0044f3be              break;
0044f3be          }
0044f3cf          case 3:
0044f3cf          {
0044f3d3              this->m_NumPrimitives = (arg5 / 3);
0044f3d6              int32_t eax_8;
0044f3d6              eax_8 = 1;
0044f3dc              return 1;
0044f3cf              break;
0044f3cf          }
0044f3df          case 4:
0044f3df          case 5:
0044f3df          {
0044f3e2              this->m_NumPrimitives = (arg5 - 2);
0044f3df              break;
0044f3df          }
0044f3a8      }
0044f3a8      
0044f3e8      eax_7 = 1;
0044f3eb      return 1;
0044f2f0  }

0044f3ee                                            8b ff                                                                ..
0044f3f0  uint32_t jump_table_44f3f0[0x6] = 
0044f3f0  {
0044f3f0      [0x0] =  0x0044f3e2
0044f3f4      [0x1] =  0x0044f3af
0044f3f8      [0x2] =  0x0044f3bd
0044f3fc      [0x3] =  0x0044f3ca
0044f400      [0x4] =  0x0044f3df
0044f404      [0x5] =  0x0044f3df
0044f408  }

0044f408                          90 90 90 90 90 90 90 90                                                          ........

0044f410  void __thiscall RenderMeshBatch::Serialize(class RenderMeshBatch* this, class Archive* arg2, class RenderMesh* arg3)

0044f410  {
0044f41f      if ((!(arg2->m_flags) & 1) != 0)
0044f425          this->m_pContainerMesh = arg3;
0044f425      
0044f429      int32_t ebx;
0044f429      ebx = this->m_PrimitivesType;
0044f430      Archive::CheckAlignment(arg2, 1);
0044f439      uint8_t* eax_1 = Archive::GetBytes(arg2, 1);
0044f439      
0044f440      if (eax_1 != 0)
0044f440      {
0044f446          if ((arg2->m_flags & 1) == 0)
0044f44c              ebx = *(uint8_t*)eax_1;
0044f446          else
0044f448              *(uint8_t*)eax_1 = ebx;
0044f440      }
0044f440      
0044f452      if ((arg2->m_flags & 5) == 0)
0044f457          this->m_PrimitivesType = ((uint32_t)ebx);
0044f457      
0044f45e      Archive::CheckAlignment(arg2, 4);
0044f467      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
0044f467      
0044f46f      if (eax_2 != 0)
0044f46f      {
0044f475          if ((arg2->m_flags & 1) == 0)
0044f480              this->m_MaterialIndex = *(uint32_t*)eax_2;
0044f475          else
0044f47a              *(uint32_t*)eax_2 = this->m_MaterialIndex;
0044f46f      }
0044f46f      
0044f487      Archive::CheckAlignment(arg2, 4);
0044f490      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0044f490      
0044f497      if (eax_3 != 0)
0044f497      {
0044f49d          if ((arg2->m_flags & 1) == 0)
0044f4a8              this->m_VertexArrayIndex = *(uint32_t*)eax_3;
0044f49d          else
0044f4a2              *(uint32_t*)eax_3 = this->m_VertexArrayIndex;
0044f497      }
0044f497      
0044f4af      Archive::CheckAlignment(arg2, 4);
0044f4b8      uint8_t* eax_4 = Archive::GetBytes(arg2, 4);
0044f4b8      
0044f4bf      if (eax_4 != 0)
0044f4bf      {
0044f4c5          if ((arg2->m_flags & 1) == 0)
0044f4d0              this->m_IndexArrayIndex = *(uint32_t*)eax_4;
0044f4c5          else
0044f4ca              *(uint32_t*)eax_4 = this->m_IndexArrayIndex;
0044f4bf      }
0044f4bf      
0044f4d7      Archive::CheckAlignment(arg2, 4);
0044f4e0      uint32_t* eax_5 = Archive::GetBytes(arg2, 4);
0044f4e0      
0044f4e7      if (eax_5 != 0)
0044f4e7      {
0044f4ed          if ((arg2->m_flags & 1) == 0)
0044f4f8              this->m_FirstIndex = *(uint32_t*)eax_5;
0044f4ed          else
0044f4f2              *(uint32_t*)eax_5 = this->m_FirstIndex;
0044f4e7      }
0044f4e7      
0044f4ff      Archive::CheckAlignment(arg2, 4);
0044f508      uint32_t* eax_6 = Archive::GetBytes(arg2, 4);
0044f508      
0044f50f      if (eax_6 != 0)
0044f50f      {
0044f515          if ((arg2->m_flags & 1) != 0)
0044f515          {
0044f51b              *(uint32_t*)eax_6 = this->m_NumPrimitives;
0044f51e              return;
0044f515          }
0044f515          
0044f523          this->m_NumPrimitives = *(uint32_t*)eax_6;
0044f50f      }
0044f410  }

0044f52b                                   90 90 90 90 90                                                             .....

0044f530  uint8_t __thiscall RenderMeshBatch::ParseFromFileNode(class RenderMeshBatch* this, class PFileNode const* arg2)

0044f530  {
0044f530      class PFileNode* eax_15 = arg2;
0044f53c      int32_t __saved_edi;
0044f53c      int32_t* esp = &__saved_edi;
0044f53c      
0044f53f      if (eax_15 != 0)
0044f53f      {
0044f545          class PFileNode* var_24 = eax_15;
0044f54a          void var_c;
0044f54a          PFileNodeIter::PFileNodeIter(&var_c, var_24);
0044f54a          esp = &__saved_edi;
0044f54a          
0044f55c          for (class PFileNode* i = PFileNodeIter::Curr(&var_c); i != 0; i = PFileNodeIter::Next(&var_c))
0044f55c          {
0044f570              var_24 = &PrimitivesType;
0044f570              
0044f580              if (PFileNode::IsKeyword(i, var_24) == 0)
0044f580              {
0044f643                  var_24 = &Material;
0044f64f                  struct RenderIndexBuffer::VTable* vtable_4;
0044f64f                  
0044f64f                  if (PFileNode::IsKeyword(i, var_24) == 0)
0044f64f                  {
0044f73b                      var_24 = &Vertices;
0044f73b                      
0044f749                      if (PFileNode::IsKeyword(i, var_24) == 0)
0044f749                      {
0044f779                          var_24 = &Indices;
0044f780                          uint8_t eax_24;
0044f780                          class PFileNode* ecx_25;
0044f780                          eax_24 = PFileNode::IsKeyword(i, var_24);
0044f780                          
0044f787                          if (eax_24 == 0)
0044f787                          {
0044f7b7                              var_24 = ecx_25;
0044f7bf                              PStringBase<char>::PStringBase<char>(&var_24, "Unrecognized keyword in mesh fil…");
0044f7c5                              PFileNode::ReportWarning(i, var_24);
0044f7ca                              esp = &__saved_edi;
0044f787                          }
0044f787                          else
0044f787                          {
0044f789                              class RenderIndexBuffer* eax_25 = RenderIndexBuffer::AllocateIndexBuffer();
0044f790                              struct PFileNode::VTable* vtable_1 = i->vtable;
0044f792                              var_24 = nullptr;
0044f799                              var_24 = vtable_1->GetSubNode(var_24);
0044f79c                              uint8_t eax_27;
0044f79c                              class PFileNode* ecx_28;
0044f79c                              eax_27 = RenderIndexBuffer::FromFileNode(eax_25, var_24);
0044f79c                              
0044f7a3                              if (eax_27 == 0)
0044f7a3                              {
0044f85b                                  var_24 = ecx_28;
0044f863                                  PStringBase<char>::PStringBase<char>(&var_24, "Error loading index array");
0044f869                                  PFileNode::ReportError(i, var_24);
0044f86e                                  esp = &__saved_edi;
0044f86e                                  
0044f873                                  if (eax_25 == 0)
0044f873                                      goto label_44f6d1;
0044f873                                  
0044f879                                  vtable_4 = eax_25->vtable;
0044f87b                                  var_24 = 1;
0044f87b                                  esp = &var_24;
0044f6cb                                  vtable_4->__vecDelDtor();
0044f6cb                                  goto label_44f6d1;
0044f7a3                              }
0044f7a3                              
0044f7a9                              class RenderMesh* m_pContainerMesh_1 = this->m_pContainerMesh;
0044f7ac                              var_24 = eax_25;
0044f7ad                              esp = &__saved_edi;
0044f7b2                              this->m_IndexArrayIndex = RenderMesh::AddIndexArray(m_pContainerMesh_1, var_24);
0044f787                          }
0044f749                      }
0044f749                      else
0044f749                      {
0044f74b                          class RenderVertexBuffer* eax_20 = RenderVertexBuffer::AllocateVertexBuffer();
0044f750                          struct PFileNode::VTable* vtable_5 = i->vtable;
0044f752                          var_24 = nullptr;
0044f75b                          var_24 = vtable_5->GetSubNode(var_24);
0044f75e                          uint8_t eax_22;
0044f75e                          class PFileNode* ecx_23;
0044f75e                          eax_22 = VertexArray::FromFileNode(eax_20, var_24);
0044f75e                          
0044f765                          if (eax_22 == 0)
0044f765                          {
0044f827                              var_24 = ecx_23;
0044f82f                              PStringBase<char>::PStringBase<char>(&var_24, "Error loading vertex array");
0044f835                              PFileNode::ReportError(i, var_24);
0044f83a                              esp = &__saved_edi;
0044f83a                              
0044f83f                              if (eax_20 != 0)
0044f83f                              {
0044f845                                  uint32_t m_cRef = eax_20->m_cRef;
0044f845                                  eax_20->m_cRef -= 1;
0044f845                                  
0044f848                                  if (m_cRef == 1)
0044f848                                  {
0044f84e                                      struct RenderVertexBuffer::VTable* vtable_2 = eax_20->vtable;
0044f850                                      var_24 = 1;
0044f854                                      vtable_2->__vecDelDtor(var_24);
0044f854                                      esp = &__saved_edi;
0044f848                                  }
0044f83f                              }
0044f83f                              
0044f83f                              goto label_44f6d1;
0044f765                          }
0044f765                          
0044f76b                          class RenderMesh* m_pContainerMesh = this->m_pContainerMesh;
0044f76e                          var_24 = eax_20;
0044f76f                          esp = &__saved_edi;
0044f774                          this->m_VertexArrayIndex = RenderMesh::AddVertexArray(m_pContainerMesh, var_24);
0044f749                      }
0044f64f                  }
0044f64f                  else
0044f64f                  {
0044f655                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044f65a                      arg2 = PStringBase<char>::s_NullBuffer_1;
0044f661                      var_24 = &PStringBase<char>::s_NullBuffer_1[-1];
0044f662                      InterlockedIncrement(var_24);
0044f668                      struct PFileNode::VTable* vtable_3 = i->vtable;
0044f66a                      var_24 = nullptr;
0044f66e                      class PFileNode* eax_11;
0044f66e                      class PFileNode* ecx_12;
0044f66e                      eax_11 = vtable_3->GetSubNode(var_24);
0044f66e                      
0044f673                      if (eax_11 != 0)
0044f673                      {
0044f679                          var_24 = &arg2;
0044f67c                          ecx_12 = PFileNode::GetNameAsPString(eax_11, var_24);
0044f673                      }
0044f673                      
0044f689                      uint32_t id = INVALID_DID.id;
0044f689                      
0044f68f                      if (arg2->vtable == 1)
0044f68f                      {
0044f6e2                          var_24 = ecx_12;
0044f6ea                          PStringBase<char>::PStringBase<char>(&var_24, "Material file name is empty!");
0044f6f0                          PFileNode::ReportWarning(i, var_24);
0044f68f                      }
0044f68f                      else
0044f68f                      {
0044f691                          var_24 = 0x21;
0044f6a2                          void __return;
0044f6a2                          id = FileArray::GetDID(&__return, &arg2, var_24)->id;
0044f6a2                          
0044f6ae                          if (id == INVALID_DID.id)
0044f6ae                          {
0044f6b4                              void* __offset(PFileNode, -0x14) esi_3 = ((char*)arg2 - 0x14);
0044f6ba                              var_24 = ((char*)esi_3 + 4);
0044f6bb                              esp = &__saved_edi;
0044f6bb                              
0044f6bf                              if (InterlockedDecrement(var_24) != 0)
0044f6bf                                  goto label_44f6d1;
0044f6bf                              
0044f6c3                              if (esi_3 == 0)
0044f6c3                                  goto label_44f6d1;
0044f6c3                              
0044f6c5                              vtable_4 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
0044f6c7                              var_24 = 1;
0044f6c7                              esp = &var_24;
0044f6cb                              vtable_4->__vecDelDtor();
0044f6cb                              goto label_44f6d1;
0044f6ae                          }
0044f68f                      }
0044f68f                      
0044f6ff                      var_24 = nullptr;
0044f709                      uint32_t eax_16 = RenderMesh::AddMaterial(this->m_pContainerMesh, id);
0044f712                      void* __offset(PFileNode, -0x14) esi_6 = ((char*)arg2 - 0x14);
0044f718                      var_24 = ((char*)esi_6 + 4);
0044f719                      this->m_MaterialIndex = eax_16;
0044f71c                      esp = &__saved_edi;
0044f71c                      
0044f728                      if ((InterlockedDecrement(var_24) == 0 && esi_6 != 0))
0044f728                      {
0044f72e                          int32_t eax_18 = *(int32_t*)((char*)ADJ(esi_6) + -0x14);
0044f730                          var_24 = 1;
0044f734                          *(uint32_t*)eax_18(var_24);
0044f734                          esp = &__saved_edi;
0044f728                      }
0044f64f                  }
0044f580              }
0044f580              else
0044f580              {
0044f586                  struct PFileNode::VTable* vtable = i->vtable;
0044f588                  var_24 = nullptr;
0044f58a                  class PFileNode* eax_2 = vtable->GetSubNode(var_24);
0044f58a                  esp = &__saved_edi;
0044f58a                  
0044f591                  if (eax_2 == 0)
0044f591                      goto label_44f6d1;
0044f591                  
0044f597                  var_24 = &PrimitivesType_PointList;
0044f59e                  esp = &__saved_edi;
0044f59e                  
0044f5a5                  if (PFileNode::IsKeyword(eax_2, var_24) == 0)
0044f5a5                  {
0044f5b3                      var_24 = &PrimitivesType_LineList;
0044f5ba                      esp = &__saved_edi;
0044f5ba                      
0044f5c1                      if (PFileNode::IsKeyword(eax_2, var_24) == 0)
0044f5c1                      {
0044f5cf                          var_24 = &PrimitivesType_LineStrip;
0044f5d6                          esp = &__saved_edi;
0044f5d6                          
0044f5dd                          if (PFileNode::IsKeyword(eax_2, var_24) == 0)
0044f5dd                          {
0044f5eb                              var_24 = &PrimitivesType_TriangleList;
0044f5f2                              esp = &__saved_edi;
0044f5f2                              
0044f5f9                              if (PFileNode::IsKeyword(eax_2, var_24) == 0)
0044f5f9                              {
0044f607                                  var_24 = &PrimitivesType_TriangleStrip;
0044f60e                                  esp = &__saved_edi;
0044f60e                                  
0044f615                                  if (PFileNode::IsKeyword(eax_2, var_24) == 0)
0044f615                                  {
0044f623                                      var_24 = &PrimitivesType_TriangleFan;
0044f62a                                      uint8_t eax_8;
0044f62a                                      class PFileNode* ecx_10;
0044f62a                                      eax_8 = PFileNode::IsKeyword(eax_2, var_24);
0044f62a                                      esp = &__saved_edi;
0044f62a                                      
0044f631                                      if (eax_8 == 0)
0044f631                                      {
0044f80c                                          var_24 = ecx_10;
0044f814                                          PStringBase<char>::PStringBase<char>(&var_24, "Unrecognized primitives type");
0044f81a                                          PFileNode::ReportError(eax_2, var_24);
0044f81f                                          esp = &__saved_edi;
0044f822                                          goto label_44f6d1;
0044f631                                      }
0044f631                                      
0044f637                                      this->m_PrimitivesType = PRIMTYPE_TRIANGLEFAN;
0044f615                                  }
0044f615                                  else
0044f617                                      this->m_PrimitivesType = PRIMTYPE_TRIANGLESTRIP;
0044f5f9                              }
0044f5f9                              else
0044f5fb                                  this->m_PrimitivesType = PRIMTYPE_TRIANGLELIST;
0044f5dd                          }
0044f5dd                          else
0044f5df                              this->m_PrimitivesType = PRIMTYPE_LINESTRIP;
0044f5c1                      }
0044f5c1                      else
0044f5c3                          this->m_PrimitivesType = PRIMTYPE_LINELIST;
0044f5a5                  }
0044f5a5                  else
0044f5a7                      this->m_PrimitivesType = PRIMTYPE_POINTLIST;
0044f580              }
0044f55c          }
0044f55c          
0044f7f1          if ((this->m_VertexArrayIndex != 0xffffffff && this->m_PrimitivesType != PRIMTYPE_INVALID))
0044f7f1          {
0044f7fb              PFileNodeIter::~PFileNodeIter(&var_c);
0044f803              int32_t eax_30;
0044f803              eax_30 = 1;
0044f809              return 1;
0044f7f1          }
0044f7f1          
0044f6d1      label_44f6d1:
0044f6d1          PFileNodeIter::~PFileNodeIter(&esp[5]);
0044f53f      }
0044f53f      
0044f6d6      eax_15 = 0;
0044f6d8      *(uint32_t*)esp;
0044f6d8      esp[1];
0044f6d8      esp[2];
0044f6d8      esp[3];
0044f6df      return 0;
0044f530  }

0044f56a                                8d 9b 00 00 00 00                                                            ......
0044f884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0044f890  void __thiscall LM_UVScale::SetUScale(class LM_UVScale* this, class Waveform const* arg2)

0044f890  {
0044f896      this->uScale.type = arg2->type;
0044f89c      this->uScale.base = arg2->base;
0044f8a2      this->uScale.base_vel = arg2->base_vel;
0044f8a8      this->uScale.amplitude = arg2->amplitude;
0044f8ae      this->uScale.amplitude_vel = arg2->amplitude_vel;
0044f8b4      this->uScale.phase = arg2->phase;
0044f8ba      this->uScale.phase_vel = arg2->phase_vel;
0044f8c0      this->uScale.frequency = arg2->frequency;
0044f8c6      this->uScale.frequency_vel = arg2->frequency_vel;
0044f8cc      this->uScale.roughness = arg2->roughness;
0044f8d2      this->uScale.roughness_vel = arg2->roughness_vel;
0044f890  }

0044f8d8                                                                          90 90 90 90 90 90 90 90                          ........

0044f8e0  void __thiscall LM_UVScale::SetVScale(class LM_UVScale* this, class Waveform const* arg2)

0044f8e0  {
0044f8e6      this->vScale.type = arg2->type;
0044f8ec      this->vScale.base = arg2->base;
0044f8f2      this->vScale.base_vel = arg2->base_vel;
0044f8f8      this->vScale.amplitude = arg2->amplitude;
0044f8fe      this->vScale.amplitude_vel = arg2->amplitude_vel;
0044f904      this->vScale.phase = arg2->phase;
0044f90a      this->vScale.phase_vel = arg2->phase_vel;
0044f910      this->vScale.frequency = arg2->frequency;
0044f916      this->vScale.frequency_vel = arg2->frequency_vel;
0044f91c      this->vScale.roughness = arg2->roughness;
0044f922      this->vScale.roughness_vel = arg2->roughness_vel;
0044f8e0  }

0044f928                          90 90 90 90 90 90 90 90                                                          ........

0044f930  void __thiscall MaterialLayer::SetAlphaTestRef(class MaterialLayer* this, class Waveform const* arg2)

0044f930  {
0044f936      this->m_AlphaTestRef.type = arg2->type;
0044f93c      this->m_AlphaTestRef.base = arg2->base;
0044f942      this->m_AlphaTestRef.base_vel = arg2->base_vel;
0044f948      this->m_AlphaTestRef.amplitude = arg2->amplitude;
0044f94e      this->m_AlphaTestRef.amplitude_vel = arg2->amplitude_vel;
0044f954      this->m_AlphaTestRef.phase = arg2->phase;
0044f95a      this->m_AlphaTestRef.phase_vel = arg2->phase_vel;
0044f960      this->m_AlphaTestRef.frequency = arg2->frequency;
0044f966      this->m_AlphaTestRef.frequency_vel = arg2->frequency_vel;
0044f96c      this->m_AlphaTestRef.roughness = arg2->roughness;
0044f972      this->m_AlphaTestRef.roughness_vel = arg2->roughness_vel;
0044f930  }

0044f978                                                                          90 90 90 90 90 90 90 90                          ........

0044f980  void __thiscall MaterialLayer::SetSpecularPower(class MaterialLayer* this, class Waveform const* arg2)

0044f980  {
0044f986      this->m_wSpecularPower.type = arg2->type;
0044f98f      this->m_wSpecularPower.base = arg2->base;
0044f998      this->m_wSpecularPower.base_vel = arg2->base_vel;
0044f9a1      this->m_wSpecularPower.amplitude = arg2->amplitude;
0044f9aa      this->m_wSpecularPower.amplitude_vel = arg2->amplitude_vel;
0044f9b3      this->m_wSpecularPower.phase = arg2->phase;
0044f9bc      this->m_wSpecularPower.phase_vel = arg2->phase_vel;
0044f9c5      this->m_wSpecularPower.frequency = arg2->frequency;
0044f9ce      this->m_wSpecularPower.frequency_vel = arg2->frequency_vel;
0044f9d7      this->m_wSpecularPower.roughness = arg2->roughness;
0044f9e0      this->m_wSpecularPower.roughness_vel = arg2->roughness_vel;
0044f980  }

0044f9e9                             90 90 90 90 90 90 90                                                           .......

0044f9f0  uint8_t __fastcall MaterialProperty::ReleaseSubObjects(class MaterialProperty* this)

0044f9f0  {
0044f9fa      if (DBCache::IsRunTime() != 0)
0044fa00          Render::SafelyStopUsingAndReleaseTexture(&this->m_pCachedTexture);
0044fa00      
0044fa0b      return 1;
0044f9f0  }

0044fa0c                                      90 90 90 90                                                              ....

0044fa10  void __fastcall MaterialProperty::Begin(class MaterialProperty* this)

0044fa10  {
0044fa1b      class PSRefBufferCharData<char>* m_charbuffer = this->name.m_charbuffer;
0044fa1b      
0044fa28      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0044fa28      {
0044fa39          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0044fa41              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0044fa41          
0044fa43          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044fa4e          this->name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0044fa50          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0044fa28      }
0044fa28      
0044fa56      this->nameID = 0;
0044fa59      this->dataType = RMDATA_INVALID;
0044fa60      this->dataLength = 0;
0044fa63      this->data = nullptr;
0044fa66      class PSRefBufferCharData<char>* m_charbuffer_1 = this->dataName.m_charbuffer;
0044fa66      
0044fa6f      if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer)
0044fa6f      {
0044fa80          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0044fa88              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0044fa88          
0044fa8a          class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0044fa96          this->dataName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0044fa99          InterlockedIncrement((PStringBase<char>::s_NullBuffer_2 - 0x10));
0044fa6f      }
0044fa6f      
0044faa0      this->m_pCachedTexture = nullptr;
0044fa10  }

0044faa7                       90 90 90 90 90 90 90 90 90                                                         .........

0044fab0  void __thiscall MaterialProperty::Apply(class MaterialProperty* this, class RenderMaterial* arg2, class MaterialProperty const* arg3)

0044fab0  {
0044fab8      if (this->m_IsShaderConstant == 0)
0044fab8      {
0044fac6          int32_t i = 0;
0044fac6          
0044faca          if (arg3->fields.m_num > 0)
0044faca          {
0044fc8f              do
0044fc8f              {
0044fad9                  int32_t* edx_2 = arg3->fields.m_data[i];
0044fae0                  int32_t ecx_2 = edx_2[2];
0044fae9                  class MaterialLayer* eax_2 = nullptr;
0044fae9                  
0044faed                  if (arg2->layers.m_num > ecx_2)
0044faf2                      eax_2 = arg2->layers.m_data[ecx_2];
0044faf2                  
0044faf5                  class LayerStage* ebx_2 = nullptr;
0044faf5                  
0044faf9                  if (eax_2 != 0)
0044faf9                  {
0044fafb                      int32_t ecx_3 = edx_2[3];
0044fafb                      
0044fb01                      if (eax_2->m_Stages.m_num > ecx_3)
0044fb06                          ebx_2 = eax_2->m_Stages.m_data[ecx_3];
0044faf9                  }
0044faf9                  
0044fb09                  class LM_UVScale* ecx_5 = nullptr;
0044fb09                  
0044fb0d                  if (eax_2 != 0)
0044fb0d                  {
0044fb0f                      int32_t edi_3 = edx_2[3];
0044fb0f                      
0044fb15                      if (eax_2->m_FFModifiers.m_num > edi_3)
0044fb1a                          ecx_5 = eax_2->m_FFModifiers.m_data[edi_3];
0044fb0d                  }
0044fb0d                  
0044fb2f                  class RGBAColor* eax_5;
0044fb2f                  uint32_t edx_4;
0044fb2f                  
0044fb2f                  switch (*(uint32_t*)edx_2)
0044fb2f                  {
0044fb36                      case nullptr:
0044fb36                      {
0044fb36                          void* data = this->data;
0044fb3b                          eax_2->m_cDiffuse.r = *(uint32_t*)data;
0044fb3b                          eax_2->m_cDiffuse.g = *(uint32_t*)((char*)data + 4);
0044fb3b                          eax_2->m_cDiffuse.b = *(uint32_t*)((char*)data + 8);
0044fb3b                          eax_2->m_cDiffuse.a = *(uint32_t*)((char*)data + 0xc);
0044fb36                          break;
0044fb36                      }
0044fb57                      case 1:
0044fb57                      {
0044fb57                          eax_5 = &eax_2->m_cSpecular;
0044fb73                      label_44fb73:
0044fb73                          int32_t* data_1 = this->data;
0044fb78                          eax_5->r = *(uint32_t*)data_1;
0044fb7d                          eax_5->g = data_1[1];
0044fb83                          eax_5->b = data_1[2];
0044fb89                          eax_5->a = data_1[3];
0044fb57                          break;
0044fb57                      }
0044fb64                      case 2:
0044fb64                      {
0044fb64                          MaterialLayer::SetSpecularPower(eax_2, this->data);
0044fb64                          break;
0044fb64                      }
0044fb6e                      case 3:
0044fb6e                      {
0044fb6e                          eax_5 = &eax_2->m_cDye;
0044fb6e                          goto label_44fb73;
0044fb6e                      }
0044fb9a                      case 4:
0044fb9a                      {
0044fb9a                          int32_t edx_9;
0044fb9a                          edx_9 = *(uint32_t*)this->data == 0;
0044fb9e                          eax_2->m_CullMode = (edx_9 + 1);
0044fb9a                          break;
0044fb9a                      }
0044fbaf                      case 5:
0044fbaf                      {
0044fbaf                          int32_t edx_11;
0044fbaf                          edx_11 = *(uint32_t*)this->data == 0;
0044fbb9                          eax_2->m_DepthTest = ((edx_11 << 2) + 4);
0044fbaf                          break;
0044fbaf                      }
0044fbc7                      case 6:
0044fbc7                      {
0044fbc7                          edx_4 = *(uint32_t*)this->data != 0;
0044fbca                          eax_2->m_DepthWrite = edx_4;
0044fbc7                          break;
0044fbc7                      }
0044fbd8                      case 7:
0044fbd8                      {
0044fbd8                          edx_4 = *(uint32_t*)this->data != 0;
0044fbdb                          eax_2->m_AlphaTest = edx_4;
0044fbd8                          break;
0044fbd8                      }
0044fbe9                      case 8:
0044fbe9                      {
0044fbe9                          MaterialLayer::SetAlphaTestRef(eax_2, this->data);
0044fbe9                          break;
0044fbe9                      }
0044fbf3                      case 9:
0044fbf3                      {
0044fbf3                          enum RMDataType dataType = this->dataType;
0044fbf3                          
0044fbfb                          if (dataType == RMDATA_TEXTURE)
0044fc09                              LayerStage::SetTexture(ebx_2, &this->dataName, *(uint32_t*)this->data);
0044fbfb                          else if (dataType == RMDATA_TEXTURE_PTR)
0044fc1f                              LayerStage::SetTexture(ebx_2, *(uint32_t*)this->data);
0044fbf3                          break;
0044fbf3                      }
0044fc2f                      case 0xa:
0044fc2f                      {
0044fc2f                          int32_t ecx_21;
0044fc2f                          ecx_21 = *(uint32_t*)this->data == 0;
0044fc36                          ebx_2->m_AddressModeU = ((ecx_21 * 2) + 1);
0044fc2f                          break;
0044fc2f                      }
0044fc44                      case 0xb:
0044fc44                      {
0044fc44                          int32_t eax_9;
0044fc44                          eax_9 = *(uint32_t*)this->data == 0;
0044fc4b                          ebx_2->m_AddressModeV = ((eax_9 * 2) + 1);
0044fc44                          break;
0044fc44                      }
0044fc54                      case 0x20:
0044fc54                      {
0044fc54                          LM_UVScale::SetUScale(ecx_5, this->data);
0044fc54                          break;
0044fc54                      }
0044fc5f                      case 0x21:
0044fc5f                      {
0044fc5f                          LM_UVScale::SetVScale(ecx_5, this->data);
0044fc5f                          break;
0044fc5f                      }
0044fc6a                      case 0x22:
0044fc6a                      {
0044fc6a                          LM_UVScale::SetUScale(ecx_5, this->data);
0044fc6a                          break;
0044fc6a                      }
0044fc75                      case 0x23:
0044fc75                      {
0044fc75                          LM_UVScale::SetUScale(ecx_5, this->data);
0044fc75                          break;
0044fc75                      }
0044fc80                      case 0x24:
0044fc80                      {
0044fc80                          LM_UVScale::SetVScale(ecx_5, this->data);
0044fc80                          break;
0044fc80                      }
0044fb2f                  }
0044fb2f                  
0044fc8c                  i += 1;
0044fc8f              } while (i < arg3->fields.m_num);
0044faca          }
0044fab8      }
0044fab0  }

0044fc9c  uint32_t jump_table_44fc9c[0x12] = 
0044fc9c  {
0044fc9c      [0x00] =  0x0044fb36
0044fca0      [0x01] =  0x0044fb57
0044fca4      [0x02] =  0x0044fb5e
0044fca8      [0x03] =  0x0044fb6e
0044fcac      [0x04] =  0x0044fb91
0044fcb0      [0x05] =  0x0044fba6
0044fcb4      [0x06] =  0x0044fbc1
0044fcb8      [0x07] =  0x0044fbd2
0044fcbc      [0x08] =  0x0044fbe3
0044fcc0      [0x09] =  0x0044fbf3
0044fcc4      [0x0a] =  0x0044fc26
0044fcc8      [0x0b] =  0x0044fc3b
0044fccc      [0x0c] =  0x0044fc50
0044fcd0      [0x0d] =  0x0044fc5b
0044fcd4      [0x0e] =  0x0044fc66
0044fcd8      [0x0f] =  0x0044fc71
0044fcdc      [0x10] =  0x0044fc7c
0044fce0      [0x11] =  0x0044fc85
0044fce4  }
0044fce4  uint8_t lookup_table_44fce4[0x25] = 
0044fce4  {
0044fce4      [0x00] =  0x00
0044fce5      [0x01] =  0x01
0044fce6      [0x02] =  0x02
0044fce7      [0x03] =  0x03
0044fce8      [0x04] =  0x04
0044fce9      [0x05] =  0x05
0044fcea      [0x06] =  0x06
0044fceb      [0x07] =  0x07
0044fcec      [0x08] =  0x08
0044fced      [0x09] =  0x09
0044fcee      [0x0a] =  0x0a
0044fcef      [0x0b] =  0x0b
0044fcf0      [0x0c] =  0x11
0044fcf1      [0x0d] =  0x11
0044fcf2      [0x0e] =  0x11
0044fcf3      [0x0f] =  0x11
0044fcf4      [0x10] =  0x11
0044fcf5      [0x11] =  0x11
0044fcf6      [0x12] =  0x11
0044fcf7      [0x13] =  0x11
0044fcf8      [0x14] =  0x11
0044fcf9      [0x15] =  0x11
0044fcfa      [0x16] =  0x11
0044fcfb      [0x17] =  0x11
0044fcfc      [0x18] =  0x11
0044fcfd      [0x19] =  0x11
0044fcfe      [0x1a] =  0x11
0044fcff      [0x1b] =  0x11
0044fd00      [0x1c] =  0x11
0044fd01      [0x1d] =  0x11
0044fd02      [0x1e] =  0x11
0044fd03      [0x1f] =  0x11
0044fd04      [0x20] =  0x0c
0044fd05      [0x21] =  0x0d
0044fd06      [0x22] =  0x0e
0044fd07      [0x23] =  0x0f
0044fd08      [0x24] =  0x10
0044fd09  }

0044fd09                             90 90 90 90 90 90 90                                                           .......

0044fd10  uint8_t __fastcall MaterialProperty::GetSubObjects(class MaterialProperty* this)

0044fd10  {
0044fd29      class RenderTexture* eax;
0044fd29      
0044fd29      if ((DBCache::IsRunTime() != 0 && this->dataType == RMDATA_TEXTURE))
0044fd29      {
0044fd2e          eax = *(uint32_t*)this->data;
0044fd2e          
0044fd36          if (eax != INVALID_DID.id)
0044fd36          {
0044fd45              void var_8;
0044fd45              class IDClass<_tagDataID,32,0>* ecx_1;
0044fd45              eax = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, eax, 0x1e));
0044fd4f              this->m_pCachedTexture = eax;
0044fd4f              
0044fd52              if (eax == 0)
0044fd52              {
0044fd66                  eax = 0;
0044fd6c                  return 0;
0044fd52              }
0044fd52              
0044fd54              class RenderTexture* var_14_2 = eax;
0044fd55              IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx_1);
0044fd36          }
0044fd29      }
0044fd29      
0044fd5e      eax = 1;
0044fd64      return 1;
0044fd10  }

0044fd6d                                         90 90 90                                                               ...

0044fd70  void __fastcall MaterialProperty::MaterialProperty(class MaterialProperty* this)

0044fd70  {
0044fd70      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044fd76      class PSRefBufferCharData<char>** this_1 = this;
0044fd85      *(uint32_t*)this_1 = PStringBase<char>::s_NullBuffer_1;
0044fd87      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0044fd89      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0044fd95      this_1[5] = PStringBase<char>::s_NullBuffer_2;
0044fd98      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0044fd9e      this_1[7] = 0;
0044fda1      this_1[8] = 0;
0044fda4      this_1[9] = 0;
0044fda7      MaterialProperty::Begin(this_1);
0044fd70  }

0044fdb1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0044fdc0  void __fastcall MaterialProperty::End(class MaterialProperty* this)

0044fdc0  {
0044fdcc      if (DBCache::IsRunTime() != 0)
0044fdd2          Render::SafelyStopUsingAndReleaseTexture(&this->m_pCachedTexture);
0044fdd2      
0044fdda      class PSRefBufferCharData<char>* m_charbuffer = this->name.m_charbuffer;
0044fdda      
0044fde6      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0044fde6      {
0044fdfb          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0044fe03              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0044fe03          
0044fe05          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0044fe10          this->name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0044fe12          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0044fde6      }
0044fde6      
0044fe1c      operator delete[](this->data);
0044fe27      int32_t i = 0;
0044fe29      bool cond:0 = this->fields.m_num <= 0;
0044fe2b      this->data = nullptr;
0044fe2e      this->dataLength = 0;
0044fe2e      
0044fe31      if (!(cond:0))
0044fe31      {
0044fe4e          do
0044fe4e          {
0044fe3a              operator delete(this->fields.m_data[i]);
0044fe3f              this->fields.m_data[i] = 0;
0044fe4b              i += 1;
0044fe4e          } while (i < this->fields.m_num);
0044fe31      }
0044fe31      
0044fe50      uint32_t m_sizeAndDeallocate = this->fields.m_sizeAndDeallocate;
0044fe61      this->fields.m_num = 0;
0044fe61      
0044fe64      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044fe64      {
0044fe6a          operator delete[](this->fields.m_data);
0044fe73          this->fields.m_data = 0;
0044fe76          this->fields.m_sizeAndDeallocate = 0;
0044fe7b          return;
0044fe64      }
0044fe64      
0044fe7f      if (this->fields.m_data != 0)
0044fe7f      {
0044fe81          int32_t eax_6 = (m_sizeAndDeallocate & 0x7fffffff);
0044fe86          int32_t eax_7 = (eax_6 - 1);
0044fe86          
0044fe87          if ((eax_6 - 1) >= 0)
0044fe87          {
0044fe98              int32_t temp1_1;
0044fe98              
0044fe98              do
0044fe98              {
0044fe90                  temp1_1 = eax_7;
0044fe90                  eax_7 -= 1;
0044fe91                  this->fields.m_data[(eax_7 + 1)] = 0;
0044fe98              } while ((temp1_1 - 1) >= 0);
0044fe87          }
0044fe7f      }
0044fdc0  }

0044fe9e                                                                                            90 90                                ..

0044fea0  void __thiscall MaterialProperty::GetSubDataIDs(class MaterialProperty const* this, class QualifiedDataIDArray* arg2)

0044fea0  {
0044feab      if (this->dataType == RMDATA_TEXTURE)
0044feab      {
0044feb0          class IDClass<_tagDataID,32,0> eax_1 = *(uint32_t*)this->data;
0044feb8          void var_8;
0044feb8          
0044feb8          if (eax_1 != INVALID_DID.id)
0044fecd              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, eax_1, 0), 0);
0044feab      }
0044fea0  }

0044fed8                                                                          90 90 90 90 90 90 90 90                          ........

0044fee0  void __fastcall MaterialProperty::~MaterialProperty(class MaterialProperty* this)

0044fee0  {
0044fee5      MaterialProperty::End(this);
0044fee5      
0044fef7      if ((this->fields.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0044fefd          operator delete[](this->fields.m_data);
0044fefd      
0044ff0e      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->dataName.m_charbuffer - 0x14);
0044ff0e      
0044ff1d      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0044ff25          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0044ff25      
0044ff29      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->name.m_charbuffer - 0x14);
0044ff29      
0044ff38      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0044ff40          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0044fee0  }

0044ff46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0044ff50  uint8_t __thiscall MaterialProperty::CopyInto(class MaterialProperty const* this, class MaterialProperty* arg2)

0044ff50  {
0044ff52      class MaterialProperty* ebp = arg2;
0044ff56      class PSRefBufferCharData<char>* m_charbuffer = ebp->name.m_charbuffer;
0044ff56      
0044ff5f      if (m_charbuffer != this->name.m_charbuffer)
0044ff5f      {
0044ff74          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0044ff7c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0044ff7c          
0044ff7e          class PSRefBufferCharData<char>* m_charbuffer_1 = this->name.m_charbuffer;
0044ff80          ebp->name.m_charbuffer = m_charbuffer_1;
0044ff87          InterlockedIncrement(&m_charbuffer_1[-1]);
0044ff5f      }
0044ff5f      
0044ff90      ebp->nameID = this->nameID;
0044ff96      ebp->dataType = this->dataType;
0044ff9c      ebp->dataLength = this->dataLength;
0044ffa4      uint32_t dataLength;
0044ffa4      
0044ffa4      if (this->data != 0)
0044ffa4      {
0044ffa6          dataLength = this->dataLength;
0044ffa6          
0044ffab          if (dataLength <= 0)
0044ffab          {
004500d7          label_4500d7:
004500d7              dataLength = 0;
004500da              return 0;
0044ffab          }
0044ffab          
0044ffb2          dataLength = operator new[](dataLength);
0044ffbc          ebp->data = dataLength;
0044ffbc          
0044ffbf          if (dataLength == 0)
0044ffbf              goto label_4500d7;
0044ffbf          
0044ffc5          uint32_t dataLength_1 = this->dataLength;
0044ffd2          int32_t esi_3;
0044ffd2          int32_t edi_2;
0044ffd2          edi_2 = __builtin_memcpy(dataLength, this->data, ((dataLength_1 >> 2) << 2));
0044ffd9          __builtin_memcpy(edi_2, esi_3, (dataLength_1 & 3));
0044ffa4      }
0044ffa4      
0044ffdb      class PSRefBufferCharData<char>* m_charbuffer_3 = ebp->dataName.m_charbuffer;
0044ffdb      
0044ffe1      if (m_charbuffer_3 != this->dataName.m_charbuffer)
0044ffe1      {
0044fff6          if ((InterlockedDecrement(&m_charbuffer_3[-1]) == 0 && m_charbuffer_3 != 0x14))
0044fffe              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_3 + -0x14)(1);
0044fffe          
00450000          class PSRefBufferCharData<char>* m_charbuffer_2 = this->dataName.m_charbuffer;
00450003          ebp->dataName.m_charbuffer = m_charbuffer_2;
0045000a          InterlockedIncrement(&m_charbuffer_2[-1]);
0044ffe1      }
0044ffe1      
00450010      void* eax_4;
00450010      eax_4 = this->m_IsShaderConstant;
00450013      ebp->m_IsShaderConstant = eax_4;
00450019      bool cond:1_1 = this->fields.m_num <= 0;
0045001b      arg2 = nullptr;
0045001b      
00450023      if (!(cond:1_1))
00450023      {
0045009b          bool cond:3_1;
0045009b          
0045009b          do
0045009b          {
00450027              dataLength = operator new(0x10);
00450027              
00450033              if (dataLength == 0)
00450033                  goto label_4500d7;
00450033              
00450040              int32_t* eax_8 = this->fields.m_data[arg2];
00450047              *(uint32_t*)dataLength = *(uint32_t*)eax_8;
0045004c              *(uint32_t*)(dataLength + 4) = eax_8[1];
00450052              *(uint32_t*)(dataLength + 8) = eax_8[2];
00450058              *(uint32_t*)(dataLength + 0xc) = eax_8[3];
00450064              int32_t eax_11 = (ebp->fields.m_sizeAndDeallocate & 0x7fffffff);
0045006b              uint8_t eax_14;
0045006b              
0045006b              if (ebp->fields.m_num >= eax_11)
00450079                  eax_14 = SmartArray<unsigned long,1>::grow(&ebp->fields, SmartArray<unsigned long,1>::get_new_size(&ebp->fields, (eax_11 + 1)));
00450079              
00450080              if ((ebp->fields.m_num < eax_11 || eax_14 != 0))
00450080              {
00450061                  ebp->fields.m_data[ebp->fields.m_num] = dataLength;
00450061                  ebp->fields.m_num += 1;
00450080              }
00450080              
00450095              cond:3_1 = (&arg2->name.m_charbuffer + 1) < this->fields.m_num;
00450097              arg2 = (&arg2->name.m_charbuffer + 1);
0045009b          } while (cond:3_1);
00450023      }
00450023      
0045009d      class RenderTexture* m_pCachedTexture_1 = this->m_pCachedTexture;
0045009d      
004500a2      if (m_pCachedTexture_1 != 0)
004500a2      {
004500a7          arg2 = ebp->m_pCachedTexture;
004500ab          ebp->m_pCachedTexture = m_pCachedTexture_1;
004500b2          class IDClass<_tagDataID,32,0>* ecx_15 = m_pCachedTexture_1->vtable->AddRef();
004500b8          class RenderTexture* m_pCachedTexture = ebp->m_pCachedTexture;
004500b9          IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx_15);
004500c3          Render::SafelyStopUsingAndReleaseTexture(&arg2);
004500a2      }
004500a2      
004500ce      uint32_t eax_7;
004500ce      eax_7 = 1;
004500d1      return 1;
0044ff50  }

004500dd                                                                                         90 90 90                               ...

004500e0  void __thiscall MaterialProperty::Serialize(class MaterialProperty* this, class Archive* arg2)

004500e0  {
004500e0      class MaterialProperty* this_1 = this;
004500e3      class Archive* ebp = arg2;
004500ef      Archive::CheckAlignment(ebp, 4);
004500f8      uint8_t* eax = Archive::GetBytes(ebp, 4);
004500f8      
004500ff      if (eax != 0)
004500ff      {
00450105          if ((ebp->m_flags & 1) == 0)
00450110              this->nameID = *(uint32_t*)eax;
00450105          else
0045010a              *(uint32_t*)eax = this->nameID;
004500ff      }
004500ff      
00450113      int32_t esi;
00450113      esi = this->dataType;
0045011b      Archive::CheckAlignment(ebp, 2);
00450124      uint8_t* eax_1 = Archive::GetBytes(ebp, 2);
00450124      
0045012b      if (eax_1 != 0)
0045012b      {
00450131          if ((ebp->m_flags & 1) == 0)
00450138              esi = *(uint16_t*)eax_1;
00450131          else
00450133              *(uint16_t*)eax_1 = esi;
0045012b      }
0045012b      
0045013f      if ((ebp->m_flags & 5) == 0)
00450144          this->dataType = ((uint32_t)esi);
00450144      
0045014b      Archive::CheckAlignment(ebp, 4);
00450154      uint8_t* eax_3 = Archive::GetBytes(ebp, 4);
00450154      
0045015b      if (eax_3 != 0)
0045015b      {
00450161          if ((ebp->m_flags & 1) == 0)
0045016c              this->dataLength = *(uint32_t*)eax_3;
00450161          else
00450166              *(uint32_t*)eax_3 = this->dataLength;
0045015b      }
0045015b      
0045016f      eax_3 = ebp->m_flags;
00450172      eax_3 = !(eax_3);
00450172      
00450176      if ((eax_3 & 1) != 0)
00450184          this->data = operator new[](this->dataLength);
00450184      
00450187      uint32_t dataLength = this->dataLength;
0045018a      void* data = this->data;
00450190      uint8_t* eax_5 = Archive::GetBytes(ebp, dataLength);
00450190      
00450197      if (eax_5 != 0)
00450197      {
0045019f          uint32_t dataLength_1;
0045019f          int32_t esi_2;
0045019f          int32_t edi_1;
0045019f          
0045019f          if ((ebp->m_flags & 1) == 0)
0045019f          {
004501b7              edi_1 = __builtin_memcpy(data, eax_5, ((dataLength >> 2) << 2));
004501b9              dataLength_1 = dataLength;
0045019f          }
0045019f          else
0045019f          {
004501aa              edi_1 = __builtin_memcpy(eax_5, data, ((dataLength >> 2) << 2));
004501ac              dataLength_1 = dataLength;
0045019f          }
0045019f          
004501be          __builtin_memcpy(edi_1, esi_2, (dataLength_1 & 3));
00450197      }
00450197      
004501c0      class SmartArray<MaterialField *,1>* m_num = this->fields.m_num;
004501c7      class SmartArray<MaterialField *,1>* i = m_num;
004501cb      Archive::CheckAlignment(ebp, 4);
004501d4      uint8_t* eax_7 = Archive::GetBytes(ebp, 4);
004501d4      
004501db      if (eax_7 != 0)
004501db      {
004501e1          if ((ebp->m_flags & 1) == 0)
004501e1          {
004501e7              class SmartArray<MaterialField *,1>* ecx_16 = *(uint32_t*)eax_7;
004501e9              i = ecx_16;
004501ed              m_num = ecx_16;
004501e1          }
004501e1          else
004501e3              *(uint32_t*)eax_7 = m_num;
004501db      }
004501db      
004501f4      Serializer::SerializeObject(&this->m_IsShaderConstant, ebp);
004501fe      arg2 = nullptr;
004501fe      
00450206      if (m_num > 0)
00450206      {
00450331          do
00450331          {
00450210              void* __offset(Archive, 0x1) eax_8;
00450210              eax_8 = ebp->m_flags;
00450213              eax_8 = !(eax_8);
00450217              void* edi_2;
00450217              
00450217              if ((eax_8 & 1) == 0)
0045022e                  edi_2 = this->fields.m_data[arg2];
00450217              else
00450223                  edi_2 = operator new(0x10);
00450223              
00450231              m_num = *(uint16_t*)edi_2;
00450238              Archive::CheckAlignment(ebp, 2);
00450241              uint8_t* eax_10 = Archive::GetBytes(ebp, 2);
00450241              
00450248              if (eax_10 != 0)
00450248              {
0045024e                  if ((ebp->m_flags & 1) == 0)
00450255                      m_num = *(uint16_t*)eax_10;
0045024e                  else
00450250                      *(uint16_t*)eax_10 = m_num;
00450248              }
00450248              
0045025c              if ((ebp->m_flags & 5) == 0)
00450261                  *(uint32_t*)edi_2 = ((uint32_t)m_num);
00450261              
00450263              m_num = *(uint16_t*)((char*)edi_2 + 4);
0045026b              Archive::CheckAlignment(ebp, 2);
00450274              uint8_t* eax_12 = Archive::GetBytes(ebp, 2);
00450274              
0045027b              if (eax_12 != 0)
0045027b              {
00450281                  if ((ebp->m_flags & 1) == 0)
00450288                      m_num = *(uint16_t*)eax_12;
00450281                  else
00450283                      *(uint16_t*)eax_12 = m_num;
0045027b              }
0045027b              
0045028f              if ((ebp->m_flags & 5) == 0)
00450294                  *(uint32_t*)((char*)edi_2 + 4) = ((uint32_t)m_num);
00450294              
0045029b              Archive::CheckAlignment(ebp, 4);
004502a4              uint8_t* eax_13 = Archive::GetBytes(ebp, 4);
004502a4              
004502ab              if (eax_13 != 0)
004502ab              {
004502b1                  if ((ebp->m_flags & 1) == 0)
004502bc                      *(uint32_t*)((char*)edi_2 + 8) = *(uint32_t*)eax_13;
004502b1                  else
004502b6                      *(uint32_t*)eax_13 = *(uint32_t*)((char*)edi_2 + 8);
004502ab              }
004502ab              
004502c3              Archive::CheckAlignment(ebp, 4);
004502cc              uint8_t* eax_15 = Archive::GetBytes(ebp, 4);
004502cc              
004502d3              if (eax_15 != 0)
004502d3              {
004502d9                  if ((ebp->m_flags & 1) == 0)
004502e4                      *(uint32_t*)((char*)edi_2 + 0xc) = *(uint32_t*)eax_15;
004502d9                  else
004502de                      *(uint32_t*)eax_15 = *(uint32_t*)((char*)edi_2 + 0xc);
004502d3              }
004502d3              
004502e7              eax_15 = ebp->m_flags;
004502ea              eax_15 = !(eax_15);
004502ea              
004502ee              if ((eax_15 & 1) != 0)
004502ee              {
004502f9                  int32_t eax_17 = (this->fields.m_sizeAndDeallocate & 0x7fffffff);
00450300                  uint8_t eax_20;
00450300                  
00450300                  if (this->fields.m_num >= eax_17)
0045030e                      eax_20 = SmartArray<unsigned long,1>::grow(&this->fields, SmartArray<unsigned long,1>::get_new_size(&this->fields, (eax_17 + 1)));
0045030e                  
00450315                  if ((this->fields.m_num < eax_17 || eax_20 != 0))
00450315                  {
004502f6                      this->fields.m_data[this->fields.m_num] = edi_2;
004502f6                      this->fields.m_num += 1;
00450315                  }
004502ee              }
004502ee              
0045032d              arg2 = (&arg2->vtable + 1);
00450331          } while ((&arg2->vtable + 1) < i);
00450206      }
004500e0  }

0045033f                                                                                               90                                 .

00450340  class MaterialProperty* __fastcall MaterialProperty::Copy(class MaterialProperty const* this)

00450340  {
00450346      void* eax = operator new(0x2c);
00450346      
00450352      if (eax == 0)
004503ad          return 0;
004503ad      
00450354      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00450366      *(uint32_t*)eax = PStringBase<char>::s_NullBuffer_1;
00450368      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0045036a      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00450376      *(uint32_t*)((char*)eax + 0x14) = PStringBase<char>::s_NullBuffer_2;
00450379      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0045037d      *(uint32_t*)((char*)eax + 0x1c) = 0;
00450384      *(uint32_t*)((char*)eax + 0x20) = 0;
0045038b      *(uint32_t*)((char*)eax + 0x24) = 0;
00450392      MaterialProperty::Begin(eax);
0045039a      int32_t eax_3 = MaterialProperty::CopyInto(this, eax);
0045039f      char temp0 = eax_3;
0045039f      eax_3 = -(eax_3);
004503a8      return ((eax_3 - eax_3) & eax);
00450340  }

004503ae                                            90 90                                                                ..

004503b0  void __thiscall MaterialModifier::GetSubDataIDs(class MaterialModifier const* this, class QualifiedDataIDArray* arg2)

004503b0  {
004503b7      int32_t i = 0;
004503b7      
004503bb      if (this->properties.m_num > 0)
004503bb      {
004503d4          do
004503d4          {
004503c9              MaterialProperty::GetSubDataIDs(this->properties.m_data[i], arg2);
004503d1              i += 1;
004503d4          } while (i < this->properties.m_num);
004503bb      }
004503b0  }

004503dc                                                                                      90 90 90 90                              ....

004503e0  uint8_t __fastcall MaterialModifier::GetSubObjects(class MaterialModifier* this)

004503e0  {
004503e8      int32_t i = 0;
004503ec      int32_t ebx;
004503ec      ebx = 1;
004503ec      
004503ee      if (this->properties.m_num > 0)
004503ee      {
00450407          do
00450407          {
004503fd              if (MaterialProperty::GetSubObjects(this->properties.m_data[i]) == 0)
004503ff                  ebx = 0;
004503ff              
00450404              i += 1;
00450407          } while (i < this->properties.m_num);
004503ee      }
004503ee      
0045040b      uint32_t eax;
0045040b      eax = ebx;
0045040e      return eax;
004503e0  }

0045040f                                               90                                                                 .

00450410  uint8_t __fastcall MaterialModifier::ReleaseSubObjects(class MaterialModifier* this)

00450410  {
00450418      int32_t i = 0;
0045041c      int32_t ebx;
0045041c      ebx = 1;
0045041c      
0045041e      if (this->properties.m_num > 0)
0045041e      {
00450437          do
00450437          {
0045042d              if (MaterialProperty::ReleaseSubObjects(this->properties.m_data[i]) == 0)
0045042f                  ebx = 0;
0045042f              
00450434              i += 1;
00450437          } while (i < this->properties.m_num);
0045041e      }
0045041e      
0045043b      uint32_t eax;
0045043b      eax = ebx;
0045043e      return eax;
00450410  }

0045043f                                                                                               90                                 .

00450440  void __fastcall MaterialModifier::MaterialModifier(class MaterialModifier* this)

00450440  {
00450449      DBObj::DBObj(this, INVALID_DID.id);
00450450      this->vtable = 0x79b458;
00450456      this->properties.m_data = 0;
00450459      this->properties.m_sizeAndDeallocate = 0;
0045045c      this->properties.m_num = 0;
00450440  }

00450463           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00450470  uint32_t MaterialModifier::GetDBOType(class MaterialModifier const* this @ ecx) __pure

00450470  {
00450475      return 0x20;
00450470  }

00450476                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00450480  void __fastcall MaterialModifier::End(class MaterialModifier* this)

00450480  {
00450487      int32_t i = 0;
00450487      
0045048b      if (this->properties.m_num > 0)
0045048b      {
004504a1          do
004504a1          {
00450496              MaterialProperty::ReleaseSubObjects(this->properties.m_data[i]);
0045049e              i += 1;
004504a1          } while (i < this->properties.m_num);
0045048b      }
0045048b      
004504a6      int32_t i_1 = 0;
004504a6      
004504aa      if (this->properties.m_num > 0)
004504aa      {
004504da          do
004504da          {
004504b3              class MaterialProperty* ebx_1 = this->properties.m_data[i_1];
004504b3              
004504b8              if (ebx_1 != 0)
004504b8              {
004504bc                  MaterialProperty::~MaterialProperty(ebx_1);
004504c2                  operator delete(ebx_1);
004504b8              }
004504b8              
004504ca              this->properties.m_data[i_1] = 0;
004504d7              i_1 += 1;
004504da          } while (i_1 < this->properties.m_num);
004504aa      }
004504aa      
004504dd      uint32_t m_sizeAndDeallocate = this->properties.m_sizeAndDeallocate;
004504ee      this->properties.m_num = 0;
004504ee      
004504f5      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004504f5      {
004504fb          operator delete[](this->properties.m_data);
00450504          this->properties.m_data = 0;
0045050b          this->properties.m_sizeAndDeallocate = 0;
00450513          return;
004504f5      }
004504f5      
00450519      if (this->properties.m_data != 0)
00450519      {
0045051b          int32_t eax_5 = (m_sizeAndDeallocate & 0x7fffffff);
00450520          int32_t eax_6 = (eax_5 - 1);
00450520          
00450521          if ((eax_5 - 1) >= 0)
00450521          {
0045052f              int32_t temp1_1;
0045052f              
0045052f              do
0045052f              {
00450523                  temp1_1 = eax_6;
00450523                  eax_6 -= 1;
00450524                  this->properties.m_data[(eax_6 + 1)] = 0;
0045052f              } while ((temp1_1 - 1) >= 0);
00450521          }
00450519      }
00450480  }

00450534                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00450540  void __fastcall MaterialModifier::Destroy(class MaterialModifier* this)

00450540  {
00450540      /* tailcall */
00450540      return MaterialModifier::End(this);
00450540  }

00450545                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00450550  class DBObj* MaterialModifier::Allocate(class MaterialModifier const* this @ ecx)

00450550  {
00450550      /* tailcall */
00450550      return MaterialModifier::Allocator();
00450550  }

00450555                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00450560  class DBObj* MaterialModifier::Allocator()

00450560  {
00450563      void* result = operator new(0x40);
00450563      
0045056f      if (result == 0)
004505a0          return 0;
004505a0      
00450579      DBObj::DBObj(result, INVALID_DID.id);
0045057e      *(uint32_t*)result = 0x79b458;
00450584      *(uint32_t*)((char*)result + 0x30) = 0;
0045058b      *(uint32_t*)((char*)result + 0x34) = 0;
00450592      *(uint32_t*)((char*)result + 0x38) = 0;
0045059c      return result;
00450560  }

004505a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004505b0  void __fastcall MaterialModifier::~MaterialModifier(class MaterialModifier* this)

004505b0  {
004505b3      this->vtable = 0x79b458;
004505b9      MaterialModifier::End(this);
004505b9      
004505cb      if ((this->properties.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004505d1          operator delete[](this->properties.m_data);
004505d1      
004505dc      /* tailcall */
004505dc      return DBObj::~DBObj(this);
004505b0  }

004505e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004505f0  void* __thiscall MaterialModifier::`scalar deleting destructor'(class MaterialModifier* this, uint32_t arg2)

004505f0  {
004505f3      this->vtable = 0x79b458;
004505f9      MaterialModifier::End(this);
004505f9      
0045060b      if ((this->properties.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00450611          operator delete[](this->properties.m_data);
00450611      
0045061b      DBObj::~DBObj(this);
0045061b      
00450625      if ((arg2 & 1) != 0)
00450628          operator delete(this);
00450628      
00450633      return this;
004505f0  }

00450636                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00450640  uint8_t __thiscall MaterialModifier::CopyInto(class MaterialModifier const* this, class DBObj* arg2)

00450640  {
00450648      int32_t i = 0;
00450648      
0045064d      if (this->properties.m_num > 0)
0045064d      {
0045069d          do
0045069d          {
00450653              class MaterialProperty* ecx = this->properties.m_data[i];
00450653              
00450658              if (ecx == 0)
00450658              {
004506ab                  class MaterialProperty** eax_7;
004506ab                  eax_7 = 0;
004506ae                  return 0;
00450658              }
00450658              
0045065a              class MaterialProperty* eax_1 = MaterialProperty::Copy(ecx);
0045066e              int32_t eax_3 = (*(int32_t*)((char*)arg2 + 0x34) & 0x7fffffff);
0045066e              
00450675              if (*(int32_t*)((char*)arg2 + 0x38) < eax_3)
00450675              {
00450691                  *(uint32_t*)(*(int32_t*)((char*)arg2 + 0x30) + (*(int32_t*)((char*)arg2 + 0x38) << 2)) = eax_1;
00450694                  *(int32_t*)((char*)arg2 + 0x38) += 1;
00450675              }
00450675              else if (SmartArray<unsigned long,1>::grow(&arg2[1], SmartArray<unsigned long,1>::get_new_size(&arg2[1], (eax_3 + 1))) != 0)
0045068a              {
00450691                  *(uint32_t*)(*(int32_t*)((char*)arg2 + 0x30) + (*(int32_t*)((char*)arg2 + 0x38) << 2)) = eax_1;
00450694                  *(int32_t*)((char*)arg2 + 0x38) += 1;
0045068a              }
0045068a              
0045069a              i += 1;
0045069d          } while (i < this->properties.m_num);
0045064d      }
0045064d      
004506a2      uint32_t eax;
004506a2      eax = 1;
004506a5      return 1;
00450640  }

004506b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004506c0  void __thiscall MaterialModifier::Serialize(class MaterialModifier* this, class Archive* arg2)

004506c0  {
004506c0      class MaterialModifier* this_1 = this;
004506c2      class Archive* ebx = arg2;
004506cb      DBObj::Serialize(this, ebx);
004506d0      uint32_t m_num = this->properties.m_num;
004506d7      arg2 = m_num;
004506db      Archive::CheckAlignment(ebx, 4);
004506e4      uint32_t* eax = Archive::GetBytes(ebx, 4);
004506e4      
004506eb      if (eax != 0)
004506eb      {
004506f1          if ((ebx->m_flags & 1) == 0)
004506f9              arg2 = *(uint32_t*)eax;
004506f1          else
004506f3              *(uint32_t*)eax = m_num;
004506eb      }
004506eb      
00450701      int32_t eax_2 = 0;
00450705      int32_t var_4 = 0;
00450705      
00450709      if (arg2 > 0)
00450709      {
0045078f          do
0045078f          {
00450710              class Archive* ecx_2;
00450710              ecx_2 = ebx->m_flags;
00450713              ecx_2 = !(ecx_2);
00450718              class MaterialProperty* edi_1;
00450718              
00450718              if ((ecx_2 & 1) == 0)
0045073a                  edi_1 = this->properties.m_data[eax_2];
00450718              else
00450718              {
0045071c                  void* eax_3 = operator new(0x2c);
0045071c                  
00450726                  if (eax_3 == 0)
00450733                      edi_1 = nullptr;
00450726                  else
0045072f                      edi_1 = MaterialProperty::MaterialProperty(eax_3);
00450718              }
00450718              
00450740              MaterialProperty::Serialize(edi_1, ebx);
00450740              
0045074c              if ((!(ebx->m_flags) & 1) != 0)
0045074c              {
00450757                  int32_t eax_7 = (this->properties.m_sizeAndDeallocate & 0x7fffffff);
0045075e                  uint8_t eax_10;
0045075e                  
0045075e                  if (this->properties.m_num >= eax_7)
0045076c                      eax_10 = SmartArray<unsigned long,1>::grow(&this->properties, SmartArray<unsigned long,1>::get_new_size(&this->properties, (eax_7 + 1)));
0045076c                  
00450773                  if ((this->properties.m_num < eax_7 || eax_10 != 0))
00450773                  {
00450754                      this->properties.m_data[this->properties.m_num] = edi_1;
00450754                      this->properties.m_num += 1;
00450773                  }
0045074c              }
0045074c              
00450788              eax_2 = (var_4 + 1);
0045078b              var_4 = eax_2;
0045078f          } while (eax_2 < arg2);
00450709      }
004506c0  }

0045079d                                                                                         90 90 90                               ...

004507a0  void __fastcall LM_UVTranslate::LM_UVTranslate(class LM_UVTranslate* this)

004507a0  {
004507aa      this->vtable = 0x79b4b4;
004507b0      Waveform::Waveform(&this->uTranslate);
004507ba      Waveform::Waveform(&this->vTranslate);
004507c1      this->texCoordIndex = 0;
004507c8      Waveform::SetDefaults(&this->uTranslate);
004507cf      Waveform::SetDefaults(&this->vTranslate);
004507a0  }

004507da                                                                                90 90 90 90 90 90                            ......

004507e0  uint32_t const LM_UVTranslate::GetSize(class LM_UVTranslate const* this @ ecx) __pure

004507e0  {
004507e5      return 0x60;
004507e0  }

004507e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004507f0  void __thiscall LM_UVTranslate::ApplyTextureTransform(class LM_UVTranslate const* this, class Matrix4* arg2)

004507f0  {
004507f6      int32_t Timer::local_time_1 = (*(uint32_t*)Timer::local_time);
004507fe      int32_t ecx = *(int32_t*)((char*)Timer::local_time + 4);
00450807      int32_t var_94 = ecx;
0045081d      int32_t var_94_1 = Waveform::GetValue(&this->vTranslate, Timer::local_time_1);
00450825      int32_t var_98_1 = ecx;
0045082f      int32_t var_98_2 = Waveform::GetValue(&this->uTranslate, Timer::local_time_1);
00450837      void var_80;
00450837      long double x87_r0;
00450837      long double x87_r1;
00450837      Matrix4::Translate3(&var_80, ((float)x87_r1), ((float)x87_r0));
0045084d      void var_40;
0045084d      Matrix4::Multiply_C(&var_40, arg2, &var_80);
0045085b      __builtin_memcpy(arg2, &var_40, 0x40);
004507f0  }

00450868                          90 90 90 90 90 90 90 90                                                          ........

00450870  void __fastcall LM_UVRotate::LM_UVRotate(class LM_UVRotate* this)

00450870  {
00450879      this->vtable = 0x79b4dc;
0045087f      Waveform::Waveform(&this->rotate);
00450886      this->texCoordIndex = 0;
0045088d      Waveform::SetDefaults(&this->rotate);
00450870  }

00450897                                                                       90 90 90 90 90 90 90 90 90                         .........

004508a0  uint32_t const LM_UVRotate::GetSize(class LM_UVRotate const* this @ ecx) __pure

004508a0  {
004508a5      return 0x34;
004508a0  }

004508a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004508b0  void __thiscall LM_UVRotate::ApplyTextureTransform(class LM_UVRotate const* this, class Matrix4* arg2)

004508b0  {
004508c3      int32_t var_8c = *(int32_t*)((char*)Timer::local_time + 4);
004508d3      int32_t var_8c_1 = Waveform::GetValue(&this->rotate, (*(uint32_t*)Timer::local_time));
004508db      void var_80;
004508db      long double x87_r0;
004508db      Matrix4::RotateZ(&var_80, ((float)(x87_r0 * ((long double)0.0174532924f))));
004508f1      void var_40;
004508f1      Matrix4::Multiply_C(&var_40, arg2, &var_80);
004508ff      __builtin_memcpy(arg2, &var_40, 0x40);
004508b0  }

0045090c                                      90 90 90 90                                                              ....

00450910  void __fastcall LM_UVScale::LM_UVScale(class LM_UVScale* this)

00450910  {
0045091a      this->vtable = 0x79b508;
00450920      Waveform::Waveform(&this->uScale);
0045092a      Waveform::Waveform(&this->vScale);
00450931      this->texCoordIndex = 0;
00450938      Waveform::SetDefaults(&this->uScale);
00450944      this->uScale.base = 1f;
00450947      Waveform::SetDefaults(&this->vScale);
0045094c      this->vScale.base = 1f;
00450910  }

00450955                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00450960  void __thiscall LM_UVScale::ApplyTextureTransform(class LM_UVScale const* this, class Matrix4* arg2)

00450960  {
00450966      int32_t Timer::local_time_1 = (*(uint32_t*)Timer::local_time);
0045096f      int32_t ecx = *(int32_t*)((char*)Timer::local_time + 4);
0045097c      int32_t var_98 = ecx;
00450992      int32_t var_98_1 = Waveform::GetValue(&this->vScale, Timer::local_time_1);
0045099a      int32_t var_9c_1 = ecx;
004509a4      int32_t var_9c_2 = Waveform::GetValue(&this->uScale, Timer::local_time_1);
004509ac      void var_80;
004509ac      long double x87_r0;
004509ac      long double x87_r1;
004509ac      Matrix4::Scale(&var_80, ((float)x87_r1), ((float)x87_r0), 1f);
004509c2      void var_40;
004509c2      Matrix4::Multiply_C(&var_40, arg2, &var_80);
004509d0      __builtin_memcpy(arg2, &var_40, 0x40);
00450960  }

004509dd                                                                                         90 90 90                               ...

004509e0  void __fastcall LM_UVTransform::LM_UVTransform(class LM_UVTransform* this)

004509e0  {
004509e2      this->vtable = 0x79b530;
004509ea      this->m_nStageIndex = 0;
004509ed      this->m_mTransform._14 = 0f;
004509f0      this->m_mTransform._13 = 0f;
004509f3      this->m_mTransform._12 = 0f;
004509f6      this->m_mTransform._24 = 0f;
004509f9      this->m_mTransform._23 = 0f;
004509fc      this->m_mTransform._21 = 0f;
004509ff      this->m_mTransform._34 = 0f;
00450a02      this->m_mTransform._32 = 0f;
00450a05      this->m_mTransform._31 = 0f;
00450a08      this->m_mTransform._43 = 0f;
00450a0b      this->m_mTransform._42 = 0f;
00450a0e      this->m_mTransform._41 = 0f;
00450a16      this->m_mTransform._44 = 1f;
00450a19      this->m_mTransform._33 = 1f;
00450a1c      this->m_mTransform._22 = 1f;
00450a1f      this->m_mTransform._11 = 0x3f800000;
004509e0  }

00450a23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00450a30  uint32_t const LM_UVTransform::GetSize(class LM_UVTransform const* this @ ecx) __pure

00450a30  {
00450a35      return 0x48;
00450a30  }

00450a36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00450a40  void __thiscall LM_UVTransform::ApplyTextureTransform(class LM_UVTransform const* this, class Matrix4* arg2)

00450a40  {
00450a52      void var_40;
00450a52      Matrix4::Multiply_C(&var_40, arg2, &this->m_mTransform);
00450a60      __builtin_memcpy(arg2, &var_40, 0x40);
00450a40  }

00450a6a                                90 90 90 90 90 90                                                            ......

00450a70  class LM_UVScale& __thiscall LM_UVScale::operator=(class LM_UVScale* this, class LM_UVScale const& arg2)

00450a70  {
00450a79      this->texCoordIndex = arg2->texCoordIndex;
00450a7f      this->uScale.type = arg2->uScale.type;
00450a85      this->uScale.base = arg2->uScale.base;
00450a8b      this->uScale.base_vel = arg2->uScale.base_vel;
00450a91      this->uScale.amplitude = arg2->uScale.amplitude;
00450a97      this->uScale.amplitude_vel = arg2->uScale.amplitude_vel;
00450a9d      this->uScale.phase = arg2->uScale.phase;
00450aa3      this->uScale.phase_vel = arg2->uScale.phase_vel;
00450aa9      this->uScale.frequency = arg2->uScale.frequency;
00450aaf      this->uScale.frequency_vel = arg2->uScale.frequency_vel;
00450ab5      this->uScale.roughness = arg2->uScale.roughness;
00450abb      this->uScale.roughness_vel = arg2->uScale.roughness_vel;
00450ac1      this->vScale.type = arg2->vScale.type;
00450ac7      this->vScale.base = arg2->vScale.base;
00450acd      this->vScale.base_vel = arg2->vScale.base_vel;
00450ad3      this->vScale.amplitude = arg2->vScale.amplitude;
00450ad9      this->vScale.amplitude_vel = arg2->vScale.amplitude_vel;
00450adf      this->vScale.phase = arg2->vScale.phase;
00450ae5      this->vScale.phase_vel = arg2->vScale.phase_vel;
00450aeb      this->vScale.frequency = arg2->vScale.frequency;
00450af1      this->vScale.frequency_vel = arg2->vScale.frequency_vel;
00450af7      this->vScale.roughness = arg2->vScale.roughness;
00450afd      this->vScale.roughness_vel = arg2->vScale.roughness_vel;
00450b00      return this;
00450a70  }

00450b03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00450b10  class LayerModifier* __fastcall LM_UVRotate::Copy(class LM_UVRotate const* this)

00450b10  {
00450b16      void* result = operator new(0x34);
00450b16      
00450b22      if (result == 0)
00450b55          return 0;
00450b55      
00450b2a      *(uint32_t*)result = 0x79b4dc;
00450b30      Waveform::Waveform(((char*)result + 8));
00450b37      *(uint32_t*)((char*)result + 4) = 0;
00450b3e      Waveform::SetDefaults(((char*)result + 8));
00450b46      BodyPartSelectionData::operator=(result, this);
00450b50      return result;
00450b10  }

00450b56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00450b60  class LayerModifier* __fastcall LM_UVScale::Copy(class LM_UVScale const* this)

00450b60  {
00450b66      void* eax = operator new(0x60);
00450b66      
00450b70      if (eax != 0)
00450b70      {
00450b74          class LM_UVScale* result = LM_UVScale::LM_UVScale(eax);
00450b74          
00450b7d          if (result != 0)
00450b7d          {
00450b82              LM_UVScale::operator=(result, this);
00450b8b              return result;
00450b7d          }
00450b70      }
00450b70      
00450b90      return 0;
00450b60  }

00450b91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00450ba0  class LayerModifier* __fastcall LM_UVTransform::Copy(class LM_UVTransform const* this)

00450ba0  {
00450ba5      void* result = operator new(0x48);
00450ba5      
00450bb1      if (result == 0)
00450c0a          return 0;
00450c0a      
00450bb3      *(uint32_t*)((char*)result + 4) = 0;
00450bb6      *(uint32_t*)result = 0x79b530;
00450bc0      *(uint32_t*)((char*)result + 0x14) = 0;
00450bc3      *(uint32_t*)((char*)result + 0x10) = 0;
00450bc6      *(uint32_t*)((char*)result + 0xc) = 0;
00450bc9      *(uint32_t*)((char*)result + 0x24) = 0;
00450bcc      *(uint32_t*)((char*)result + 0x20) = 0;
00450bcf      *(uint32_t*)((char*)result + 0x18) = 0;
00450bd2      *(uint32_t*)((char*)result + 0x34) = 0;
00450bd5      *(uint32_t*)((char*)result + 0x2c) = 0;
00450bd8      *(uint32_t*)((char*)result + 0x28) = 0;
00450bdb      *(uint32_t*)((char*)result + 0x40) = 0;
00450bde      *(uint32_t*)((char*)result + 0x3c) = 0;
00450be1      *(uint32_t*)((char*)result + 0x38) = 0;
00450be9      *(uint32_t*)((char*)result + 0x44) = 0x3f800000;
00450bec      *(uint32_t*)((char*)result + 0x30) = 0x3f800000;
00450bef      *(uint32_t*)((char*)result + 0x1c) = 0x3f800000;
00450bf2      *(uint32_t*)((char*)result + 8) = 0x3f800000;
00450bf7      *(uint32_t*)((char*)result + 4) = this->m_nStageIndex;
00450c02      __builtin_memcpy(((char*)result + 8), &this->m_mTransform, 0x40);
00450c06      return result;
00450ba0  }

00450c0b                                   90 90 90 90 90                                                             .....

00450c10  class LayerModifier* __fastcall LM_UVTranslate::Copy(class LM_UVTranslate const* this)

00450c10  {
00450c16      void* result = operator new(0x60);
00450c16      
00450c22      if (result == 0)
00450c68          return 0;
00450c68      
00450c2b      *(uint32_t*)result = 0x79b4b4;
00450c31      Waveform::Waveform(((char*)result + 8));
00450c3b      Waveform::Waveform(((char*)result + 0x34));
00450c42      *(uint32_t*)((char*)result + 4) = 0;
00450c49      Waveform::SetDefaults(((char*)result + 8));
00450c50      Waveform::SetDefaults(((char*)result + 0x34));
00450c58      LM_UVScale::operator=(result, this);
00450c63      return result;
00450c10  }

00450c69                             90 90 90 90 90 90 90                                                           .......

00450c70  uint8_t __thiscall LM_UVTranslate::SaveToFileNode(class LM_UVTranslate const* this, class PFileNode* arg2, class RenderMaterial* arg3, uint32_t const arg4, uint32_t const arg5)

00450c70  {
00450c73      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00450c81      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00450c8e      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00450c96      class PFileNode* eax_2 = *(int32_t*)((char*)arg2->vtable + 4)();
00450c99      class PSRefBufferCharData<char>* m_charbuffer = ModType_UVTranslate.m_charbuffer;
00450ca7      int32_t var_1c_2 = InterlockedIncrement(&m_charbuffer[-1]);
00450cab      class PSRefBufferCharData<char>* m_charbuffer_3 = m_charbuffer;
00450cb1      PFileNode::SetNameAsPString(eax_2, InterlockedIncrement(&m_charbuffer[-1]));
00450cb1      
00450cc9      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00450cd1          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00450cd1      
00450cd7      class PFileNode* eax_5 = *(int32_t*)((char*)eax_2->vtable + 4)();
00450cda      class PSRefBufferCharData<char>* m_charbuffer_1 = Mod_UVTranslate_texCoordIndex.m_charbuffer;
00450cec      int32_t var_1c_5 = InterlockedIncrement(&m_charbuffer_1[-1]);
00450cf4      class PSRefBufferCharData<char>* m_charbuffer_4 = m_charbuffer_1;
00450cfa      PFileNode::SetNameAsPString(eax_5, InterlockedIncrement(&m_charbuffer_1[-1]));
00450cfa      
00450d12      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00450d1b          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00450d1b      
00450d21      void* eax_9 = *(int32_t*)((char*)eax_5->vtable + 4)();
00450d26      int32_t* ecx_11 = *(uint32_t*)((char*)eax_9 + 8);
00450d2f      uint32_t texCoordIndex = this->texCoordIndex;
00450d2f      
00450d32      if (ecx_11 != 0)
00450d38          **(uint32_t**)ecx_11(1);
00450d38      
00450d3c      *(uint32_t*)((char*)eax_9 + 8) = 0;
00450d43      int32_t* eax_11 = operator new(8);
00450d43      
00450d4d      if (eax_11 == 0)
00450d5a          eax_11 = nullptr;
00450d4d      else
00450d4d      {
00450d4f          *(uint32_t*)eax_11 = 0x797108;
00450d55          eax_11[1] = texCoordIndex;
00450d4d      }
00450d4d      
00450d5c      *(uint32_t*)((char*)eax_9 + 8) = eax_11;
00450d63      class PFileNode* eax_13 = *(int32_t*)((char*)eax_2->vtable + 4)();
00450d66      class PSRefBufferCharData<char>* m_charbuffer_2 = Mod_UVTranslate_translate.m_charbuffer;
00450d76      int32_t var_1c_8 = InterlockedIncrement(&m_charbuffer_2[-1]);
00450d7a      class PSRefBufferCharData<char>* m_charbuffer_5 = m_charbuffer_2;
00450d80      PFileNode::SetNameAsPString(eax_13, InterlockedIncrement(&m_charbuffer_2[-1]));
00450d80      
00450d98      if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
00450da0          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00450da0      
00450dc3      if (RenderMaterial::CheckOutputField(arg3, &PStringBase<char>::s_NullBuffer_2, RMFIELD_LAYER_MOD_UVTRANSLATE_UTRANSLATE, RMDATA_WAVEFORM, arg4, arg5) == 0)
00450e12          Waveform::Output(&this->uTranslate, eax_13);
00450dc3      else
00450dc3      {
00450dc9          class PFileNode* eax_18 = *(int32_t*)((char*)eax_13->vtable + 4)();
00450dcc          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00450dda          int32_t var_1c_12 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
00450dde          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
00450de6          PFileNode::SetNameAsPString(eax_18, InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]));
00450de6          
00450dfe          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_3[-1]) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
00450e06              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x14)(1);
00450dc3      }
00450dc3      
00450e38      if (RenderMaterial::CheckOutputField(arg3, &PStringBase<char>::s_NullBuffer_2, RMFIELD_LAYER_MOD_UVTRANSLATE_VTRANSLATE, RMDATA_WAVEFORM, arg4, arg5) == 0)
00450e83          Waveform::Output(&this->vTranslate, eax_13);
00450e38      else
00450e38      {
00450e3e          class PFileNode* eax_23 = *(int32_t*)((char*)eax_13->vtable + 4)();
00450e41          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
00450e4d          int32_t var_1c_17 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
00450e51          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_4;
00450e57          PFileNode::SetNameAsPString(eax_23, InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]));
00450e57          
00450e6f          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
00450e77              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
00450e38      }
00450e38      
00450e8c      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00450e8c      
00450e9f      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00450ea7          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00450ea7      
00450eac      int32_t eax_26;
00450eac      eax_26 = 1;
00450eb2      return 1;
00450c70  }

00450eb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00450ec0  void __thiscall LM_UVRotate::Serialize(class LM_UVRotate* this, class Archive* arg2)

00450ec0  {
00450ed1      int32_t ebx;
00450ed1      ebx = this->vtable->GetType();
00450ed3      Archive::CheckAlignment(arg2, 1);
00450edc      uint8_t* eax_2 = Archive::GetBytes(arg2, 1);
00450edc      
00450ee9      if ((eax_2 != 0 && (arg2->m_flags & 1) != 0))
00450eeb          *(uint8_t*)eax_2 = ebx;
00450eeb      
00450ef1      Archive::CheckAlignment(arg2, 4);
00450efa      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
00450efa      
00450f01      if (eax_3 != 0)
00450f01      {
00450f07          if ((arg2->m_flags & 1) != 0)
00450f07          {
00450f0c              *(uint32_t*)eax_3 = this->texCoordIndex;
00450f12              Waveform::Serialize(&this->rotate, arg2);
00450f1a              return;
00450f07          }
00450f07          
00450f1f          this->texCoordIndex = *(uint32_t*)eax_3;
00450f01      }
00450f01      
00450f26      Waveform::Serialize(&this->rotate, arg2);
00450ec0  }

00450f31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00450f40  uint8_t __thiscall LM_UVRotate::SaveToFileNode(class LM_UVRotate const* this, class PFileNode* arg2, class RenderMaterial* arg3, uint32_t const arg4, uint32_t const arg5)

00450f40  {
00450f43      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00450f51      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00450f5e      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00450f66      class PFileNode* eax_2 = *(int32_t*)((char*)arg2->vtable + 4)();
00450f69      class PSRefBufferCharData<char>* m_charbuffer = ModType_UVRotate.m_charbuffer;
00450f77      int32_t var_1c_2 = InterlockedIncrement(&m_charbuffer[-1]);
00450f7b      class PSRefBufferCharData<char>* m_charbuffer_3 = m_charbuffer;
00450f81      PFileNode::SetNameAsPString(eax_2, InterlockedIncrement(&m_charbuffer[-1]));
00450f81      
00450f99      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00450fa1          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00450fa1      
00450fa7      class PFileNode* eax_5 = *(int32_t*)((char*)eax_2->vtable + 4)();
00450faa      class PSRefBufferCharData<char>* m_charbuffer_2 = Mod_UVRotate_texCoordIndex.m_charbuffer;
00450fbc      int32_t var_1c_5 = InterlockedIncrement(&m_charbuffer_2[-1]);
00450fc4      class PSRefBufferCharData<char>* m_charbuffer_4 = m_charbuffer_2;
00450fca      PFileNode::SetNameAsPString(eax_5, InterlockedIncrement(&m_charbuffer_2[-1]));
00450fca      
00450fe2      if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
00450feb          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00450feb      
00450ff1      void* eax_9 = *(int32_t*)((char*)eax_5->vtable + 4)();
00450ff6      int32_t* ecx_11 = *(uint32_t*)((char*)eax_9 + 8);
00450fff      uint32_t texCoordIndex = this->texCoordIndex;
00450fff      
00451002      if (ecx_11 != 0)
00451008          **(uint32_t**)ecx_11(1);
00451008      
0045100c      *(uint32_t*)((char*)eax_9 + 8) = 0;
00451013      int32_t* eax_11 = operator new(8);
00451013      
0045101d      if (eax_11 == 0)
0045102a          eax_11 = nullptr;
0045101d      else
0045101d      {
0045101f          *(uint32_t*)eax_11 = 0x797108;
00451025          eax_11[1] = texCoordIndex;
0045101d      }
0045101d      
0045102c      *(uint32_t*)((char*)eax_9 + 8) = eax_11;
00451033      class PFileNode* eax_13 = *(int32_t*)((char*)eax_2->vtable + 4)();
00451036      class PSRefBufferCharData<char>* m_charbuffer_1 = Mod_UVRotate_rotate.m_charbuffer;
00451044      int32_t var_1c_8 = InterlockedIncrement(&m_charbuffer_1[-1]);
00451048      class PSRefBufferCharData<char>* m_charbuffer_5 = m_charbuffer_1;
0045104e      PFileNode::SetNameAsPString(eax_13, InterlockedIncrement(&m_charbuffer_1[-1]));
0045104e      
00451066      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0045106e          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0045106e      
00451091      if (RenderMaterial::CheckOutputField(arg3, &PStringBase<char>::s_NullBuffer_2, RMFIELD_LAYER_MOD_UVROTATE_ROTATE, RMDATA_WAVEFORM, arg4, arg5) == 0)
004510dc          Waveform::Output(&this->rotate, eax_13);
00451091      else
00451091      {
00451097          class PFileNode* eax_18 = *(int32_t*)((char*)eax_13->vtable + 4)();
0045109a          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004510a6          int32_t var_1c_12 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
004510aa          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
004510b0          PFileNode::SetNameAsPString(eax_18, InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]));
004510b0          
004510c8          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_3[-1]) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
004510d0              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x14)(1);
00451091      }
00451091      
004510e5      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
004510e5      
004510f8      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00451100          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00451100      
00451105      int32_t eax_21;
00451105      eax_21 = 1;
0045110b      return 1;
00450f40  }

0045110e                                            90 90                                                                ..

00451110  void __thiscall LM_UVScale::Serialize(class LM_UVScale* this, class Archive* arg2)

00451110  {
00451121      int32_t ebx;
00451121      ebx = this->vtable->GetType();
00451123      Archive::CheckAlignment(arg2, 1);
0045112c      uint8_t* eax_2 = Archive::GetBytes(arg2, 1);
0045112c      
00451139      if ((eax_2 != 0 && (arg2->m_flags & 1) != 0))
0045113b          *(uint8_t*)eax_2 = ebx;
0045113b      
00451141      Archive::CheckAlignment(arg2, 4);
0045114a      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0045114a      
00451151      if (eax_3 != 0)
00451151      {
00451157          if ((arg2->m_flags & 1) == 0)
00451162              this->texCoordIndex = *(uint32_t*)eax_3;
00451157          else
0045115c              *(uint32_t*)eax_3 = this->texCoordIndex;
00451151      }
00451151      
00451169      Waveform::Serialize(&this->uScale, arg2);
00451172      Waveform::Serialize(&this->vScale, arg2);
00451110  }

0045117d                                                                                         90 90 90                               ...

00451180  uint8_t __thiscall LM_UVScale::SaveToFileNode(class LM_UVScale const* this, class PFileNode* arg2, class RenderMaterial* arg3, uint32_t const arg4, uint32_t const arg5)

00451180  {
00451183      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00451191      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0045119e      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004511a6      class PFileNode* eax_2 = *(int32_t*)((char*)arg2->vtable + 4)();
004511a9      class PSRefBufferCharData<char>* m_charbuffer = ModType_UVScale.m_charbuffer;
004511b7      int32_t var_1c_2 = InterlockedIncrement(&m_charbuffer[-1]);
004511bb      class PSRefBufferCharData<char>* m_charbuffer_3 = m_charbuffer;
004511c1      PFileNode::SetNameAsPString(eax_2, InterlockedIncrement(&m_charbuffer[-1]));
004511c1      
004511d9      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
004511e1          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004511e1      
004511e7      class PFileNode* eax_5 = *(int32_t*)((char*)eax_2->vtable + 4)();
004511ea      class PSRefBufferCharData<char>* m_charbuffer_1 = Mod_UVScale_texCoordIndex.m_charbuffer;
004511fc      int32_t var_1c_5 = InterlockedIncrement(&m_charbuffer_1[-1]);
00451204      class PSRefBufferCharData<char>* m_charbuffer_4 = m_charbuffer_1;
0045120a      PFileNode::SetNameAsPString(eax_5, InterlockedIncrement(&m_charbuffer_1[-1]));
0045120a      
00451222      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0045122b          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0045122b      
00451231      void* eax_9 = *(int32_t*)((char*)eax_5->vtable + 4)();
00451236      int32_t* ecx_11 = *(uint32_t*)((char*)eax_9 + 8);
0045123f      uint32_t texCoordIndex = this->texCoordIndex;
0045123f      
00451242      if (ecx_11 != 0)
00451248          **(uint32_t**)ecx_11(1);
00451248      
0045124c      *(uint32_t*)((char*)eax_9 + 8) = 0;
00451253      int32_t* eax_11 = operator new(8);
00451253      
0045125d      if (eax_11 == 0)
0045126a          eax_11 = nullptr;
0045125d      else
0045125d      {
0045125f          *(uint32_t*)eax_11 = 0x797108;
00451265          eax_11[1] = texCoordIndex;
0045125d      }
0045125d      
0045126c      *(uint32_t*)((char*)eax_9 + 8) = eax_11;
00451273      class PFileNode* eax_13 = *(int32_t*)((char*)eax_2->vtable + 4)();
00451276      class PSRefBufferCharData<char>* m_charbuffer_2 = Mod_UVScale_scale.m_charbuffer;
00451286      int32_t var_1c_8 = InterlockedIncrement(&m_charbuffer_2[-1]);
0045128a      class PSRefBufferCharData<char>* m_charbuffer_5 = m_charbuffer_2;
00451290      PFileNode::SetNameAsPString(eax_13, InterlockedIncrement(&m_charbuffer_2[-1]));
00451290      
004512a8      if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
004512b0          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
004512b0      
004512d3      if (RenderMaterial::CheckOutputField(arg3, &PStringBase<char>::s_NullBuffer_2, RMFIELD_LAYER_MOD_UVSCALE_USCALE, RMDATA_WAVEFORM, arg4, arg5) == 0)
00451322          Waveform::Output(&this->uScale, eax_13);
004512d3      else
004512d3      {
004512d9          class PFileNode* eax_18 = *(int32_t*)((char*)eax_13->vtable + 4)();
004512dc          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004512ea          int32_t var_1c_12 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
004512ee          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
004512f6          PFileNode::SetNameAsPString(eax_18, InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]));
004512f6          
0045130e          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_3[-1]) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
00451316              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x14)(1);
004512d3      }
004512d3      
00451348      if (RenderMaterial::CheckOutputField(arg3, &PStringBase<char>::s_NullBuffer_2, RMFIELD_LAYER_MOD_UVSCALE_VSCALE, RMDATA_WAVEFORM, arg4, arg5) == 0)
00451393          Waveform::Output(&this->vScale, eax_13);
00451348      else
00451348      {
0045134e          class PFileNode* eax_23 = *(int32_t*)((char*)eax_13->vtable + 4)();
00451351          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0045135d          int32_t var_1c_17 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
00451361          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_4;
00451367          PFileNode::SetNameAsPString(eax_23, InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]));
00451367          
0045137f          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
00451387              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
00451348      }
00451348      
0045139c      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0045139c      
004513af      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004513b7          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004513b7      
004513bc      int32_t eax_26;
004513bc      eax_26 = 1;
004513c2      return 1;
00451180  }

004513c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004513d0  void __thiscall LM_UVTransform::Serialize(class LM_UVTransform* this, class Archive* arg2)

004513d0  {
004513e1      int32_t ebx;
004513e1      ebx = this->vtable->GetType();
004513e3      Archive::CheckAlignment(arg2, 1);
004513ec      uint8_t* eax_2 = Archive::GetBytes(arg2, 1);
004513ec      
004513f9      if ((eax_2 != 0 && (arg2->m_flags & 1) != 0))
004513fb          *(uint8_t*)eax_2 = ebx;
004513fb      
00451401      Archive::CheckAlignment(arg2, 4);
0045140a      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0045140a      
00451411      if (eax_3 != 0)
00451411      {
00451417          if ((arg2->m_flags & 1) == 0)
00451422              this->m_nStageIndex = *(uint32_t*)eax_3;
00451417          else
0045141c              *(uint32_t*)eax_3 = this->m_nStageIndex;
00451411      }
00451411      
0045142c      Archive::CheckAlignment(arg2, 0x40);
00451435      uint8_t* eax_4 = Archive::GetBytes(arg2, 0x40);
00451435      
0045143c      if (eax_4 != 0)
0045143c      {
00451447          if ((arg2->m_flags & 1) != 0)
00451447          {
0045144d              __builtin_memcpy(eax_4, &this->m_mTransform, 0x40);
00451452              return;
00451447          }
00451447          
00451457          __builtin_memcpy(&this->m_mTransform, eax_4, 0x40);
0045143c      }
004513d0  }

0045145f                                                                                               90                                 .

00451460  uint8_t __thiscall LM_UVTranslate::LoadFromFileNode(class LM_UVTranslate* this, class PFileNode const* arg2, class RenderMaterial* arg3, uint32_t const arg4, uint32_t const arg5)

00451460  {
00451463      class PFileNode* eax = arg2;
00451471      char result = 1;
00451471      
00451476      if (eax == 0)
00451476      {
00451682          eax = 0;
00451688          return 0;
00451476      }
00451476      
0045147c      class PFileNode* var_2c = eax;
00451481      void var_c;
00451481      PFileNodeIter::PFileNodeIter(&var_c, var_2c);
00451486      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0045148f      var_2c = &PStringBase<char>::s_NullBuffer_3[-1];
00451490      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
00451494      InterlockedIncrement(var_2c);
004514a3      class PFileNode* i = PFileNodeIter::Curr(&var_c);
004514a3      
004514a7      if (i != 0)
004514a7      {
004514ad          uint32_t const ebp_1 = arg5;
004514ad          
00451641          do
00451641          {
004514c0              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004514c5              arg5 = PStringBase<char>::s_NullBuffer_1;
004514cc              var_2c = &PStringBase<char>::s_NullBuffer_1[-1];
004514cd              InterlockedIncrement(var_2c);
004514d7              var_2c = &arg5;
004514da              PFileNode::GetNameAsPString(i, var_2c);
004514df              var_2c = &Mod_UVTranslate_texCoordIndex;
004514df              
004514ef              if (PFileNode::IsKeyword(i, var_2c) == 0)
004514ef              {
0045151a                  var_2c = &Mod_UVTranslate_translate;
0045151f                  uint8_t eax_6;
0045151f                  class PFileNode* ecx_9;
0045151f                  eax_6 = PFileNode::IsKeyword(i, var_2c);
0045151f                  
00451526                  if (eax_6 == 0)
00451526                  {
004515f8                      var_2c = ecx_9;
00451600                      PStringBase<char>::PStringBase<char>(&var_2c, "Invalid UVTranslate keyword");
00451606                      PFileNode::ReportError(i, var_2c);
0045160e                      result = 0;
00451526                  }
00451526                  else
00451526                  {
0045152c                      struct PFileNode::VTable* vtable_2 = i->vtable;
0045152e                      var_2c = nullptr;
00451532                      class PFileNode* eax_7 = vtable_2->GetSubNode(var_2c);
0045153b                      var_2c = &PStringBase<char>::s_NullBuffer_4;
0045153e                      PFileNode::GetNameAsPString(eax_7, var_2c);
00451543                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00451548                      arg2 = PStringBase<char>::s_NullBuffer_2;
0045154f                      var_2c = &PStringBase<char>::s_NullBuffer_2[-1];
00451550                      InterlockedIncrement(var_2c);
0045155a                      var_2c = &arg2;
0045155d                      PFileNode::GetNameAsPString(eax_7, var_2c);
00451566                      var_2c = ebp_1;
00451566                      
0045157b                      if (RenderMaterial::CheckParseField(arg3, &arg2, RMFIELD_LAYER_MOD_UVTRANSLATE_UTRANSLATE, RMDATA_WAVEFORM, arg4, var_2c) == 0)
0045157b                      {
00451581                          var_2c = eax_7;
00451585                          Waveform::Parse(&this->uTranslate, var_2c);
0045157b                      }
0045157b                      
0045158a                      struct PFileNode::VTable* vtable = i->vtable;
0045158c                      var_2c = 1;
00451590                      class PFileNode* eax_10 = vtable->GetSubNode(var_2c);
00451599                      var_2c = &PStringBase<char>::s_NullBuffer_4;
0045159c                      PFileNode::GetNameAsPString(eax_10, var_2c);
004515a5                      var_2c = &arg2;
004515a8                      PFileNode::GetNameAsPString(eax_10, var_2c);
004515b1                      var_2c = ebp_1;
004515b1                      
004515c6                      if (RenderMaterial::CheckParseField(arg3, &arg2, RMFIELD_LAYER_MOD_UVTRANSLATE_VTRANSLATE, RMDATA_WAVEFORM, arg4, var_2c) == 0)
004515c6                      {
004515cc                          var_2c = eax_10;
004515d0                          Waveform::Parse(&this->vTranslate, var_2c);
004515c6                      }
004515c6                      
004515d9                      void* __offset(PFileNode, -0x14) esi_3 = ((char*)arg2 - 0x14);
004515df                      var_2c = ((char*)esi_3 + 4);
004515df                      
004515ec                      if ((InterlockedDecrement(var_2c) == 0 && esi_3 != 0))
004515ec                      {
004515ee                          int32_t edx_1 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
004515f0                          var_2c = 1;
004515f4                          *(uint32_t*)edx_1(var_2c);
004515ec                      }
00451526                  }
004514ef              }
004514ef              else
004514ef              {
004514f1                  struct PFileNode::VTable* vtable_1 = i->vtable;
004514f3                  var_2c = nullptr;
004514f5                  class PFileNode* eax_5 = vtable_1->GetSubNode(var_2c);
004514fe                  var_2c = &PStringBase<char>::s_NullBuffer_4;
00451501                  PFileNode::GetNameAsPString(eax_5, var_2c);
0045150d                  var_2c = &this->texCoordIndex;
00451510                  PFileNode::GetNameAsUInt32(eax_5, var_2c);
004514ef              }
004514ef              
00451617              int32_t* esi_5 = (arg5 - 0x14);
0045161d              var_2c = &esi_5[1];
0045161d              
0045162a              if ((InterlockedDecrement(var_2c) == 0 && esi_5 != 0))
0045162a              {
0045162c                  int32_t edx_2 = *(uint32_t*)esi_5;
0045162e                  var_2c = 1;
00451632                  *(uint32_t*)edx_2(var_2c);
0045162a              }
0045162a              
0045163d              i = PFileNodeIter::Next(&var_c);
00451641          } while (i != 0);
00451641          
00451647          PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_4;
004514a7      }
004514a7      
00451651      var_2c = &PStringBase<char>::s_NullBuffer_3[-1];
00451651      
0045165e      if ((InterlockedDecrement(var_2c) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
0045165e      {
00451660          int32_t edx_3 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x14);
00451662          var_2c = 1;
00451666          *(uint32_t*)edx_3(var_2c);
0045165e      }
0045165e      
0045166c      PFileNodeIter::~PFileNodeIter(&var_c);
0045167c      return result;
00451460  }

004514b7                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
0045168b                                   90 90 90 90 90                                                             .....

00451690  uint8_t __thiscall LM_UVRotate::LoadFromFileNode(class LM_UVRotate* this, class PFileNode const* arg2, class RenderMaterial* arg3, uint32_t const arg4, uint32_t const arg5)

00451690  {
00451693      class PFileNode* eax = arg2;
004516a1      char result = 1;
004516a1      
004516a6      if (eax == 0)
004516a6      {
0045181f          eax = 0;
00451825          return 0;
004516a6      }
004516a6      
004516ac      class PFileNode* var_2c = eax;
004516b1      void var_c;
004516b1      PFileNodeIter::PFileNodeIter(&var_c, var_2c);
004516b6      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004516c5      var_2c = &PStringBase<char>::s_NullBuffer_2[-1];
004516c6      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004516ca      InterlockedIncrement(var_2c);
004516d5      class PFileNode* i = PFileNodeIter::Curr(&var_c);
004516d5      
004516d9      if (i != 0)
004516d9      {
004517de          do
004517de          {
004516f0              var_2c = &Mod_UVRotate_texCoordIndex;
004516f0              
00451700              if (PFileNode::IsKeyword(i, var_2c) == 0)
00451700              {
0045172b                  var_2c = &Mod_UVRotate_rotate;
00451730                  uint8_t eax_5;
00451730                  class PFileNode* ecx_8;
00451730                  eax_5 = PFileNode::IsKeyword(i, var_2c);
00451730                  
00451737                  if (eax_5 == 0)
00451737                  {
004517b6                      var_2c = ecx_8;
004517be                      PStringBase<char>::PStringBase<char>(&var_2c, "Invalid UVRotate keyword");
004517c4                      PFileNode::ReportError(i, var_2c);
004517cc                      result = 0;
00451737                  }
00451737                  else
00451737                  {
00451739                      struct PFileNode::VTable* vtable_1 = i->vtable;
0045173b                      var_2c = nullptr;
0045173f                      class PFileNode* eax_6 = vtable_1->GetSubNode(var_2c);
00451748                      var_2c = &PStringBase<char>::s_NullBuffer_3;
0045174b                      PFileNode::GetNameAsPString(eax_6, var_2c);
00451750                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00451755                      arg2 = PStringBase<char>::s_NullBuffer_1;
0045175c                      var_2c = &PStringBase<char>::s_NullBuffer_1[-1];
0045175d                      InterlockedIncrement(var_2c);
00451763                      var_2c = &arg2;
00451766                      PFileNode::GetNameAsPString(eax_6, var_2c);
0045176f                      var_2c = arg5;
0045176f                      
00451784                      if (RenderMaterial::CheckParseField(arg3, &arg2, RMFIELD_LAYER_MOD_UVROTATE_ROTATE, RMDATA_WAVEFORM, arg4, var_2c) == 0)
00451784                      {
0045178a                          var_2c = eax_6;
0045178e                          Waveform::Parse(&this->rotate, var_2c);
00451784                      }
00451784                      
00451797                      void* __offset(PFileNode, -0x14) esi_3 = ((char*)arg2 - 0x14);
0045179d                      var_2c = ((char*)esi_3 + 4);
0045179d                      
004517aa                      if ((InterlockedDecrement(var_2c) == 0 && esi_3 != 0))
004517aa                      {
004517ac                          int32_t edx_1 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
004517ae                          var_2c = 1;
004517b2                          *(uint32_t*)edx_1(var_2c);
004517aa                      }
00451737                  }
00451700              }
00451700              else
00451700              {
00451702                  struct PFileNode::VTable* vtable = i->vtable;
00451704                  var_2c = nullptr;
00451706                  class PFileNode* eax_4 = vtable->GetSubNode(var_2c);
0045170f                  var_2c = &PStringBase<char>::s_NullBuffer_3;
00451712                  PFileNode::GetNameAsPString(eax_4, var_2c);
0045171e                  var_2c = &this->texCoordIndex;
00451721                  PFileNode::GetNameAsUInt32(eax_4, var_2c);
00451700              }
00451700              
004517da              i = PFileNodeIter::Next(&var_c);
004517de          } while (i != 0);
004517de          
004517e4          PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
004516d9      }
004516d9      
004517ee      var_2c = &PStringBase<char>::s_NullBuffer_2[-1];
004517ee      
004517fb      if ((InterlockedDecrement(var_2c) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
004517fb      {
004517fd          int32_t edx_2 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14);
004517ff          var_2c = 1;
00451803          *(uint32_t*)edx_2(var_2c);
004517fb      }
004517fb      
00451809      PFileNodeIter::~PFileNodeIter(&var_c);
00451819      return result;
00451690  }

004516e9                             8d a4 24 00 00 00 00                                                           ..$....
00451828                          90 90 90 90 90 90 90 90                                                          ........

00451830  uint8_t __thiscall LM_UVScale::LoadFromFileNode(class LM_UVScale* this, class PFileNode const* arg2, class RenderMaterial* arg3, uint32_t const arg4, uint32_t const arg5)

00451830  {
00451833      class PFileNode* eax = arg2;
00451841      char result = 1;
00451841      
00451846      if (eax == 0)
00451846      {
00451a12          eax = 0;
00451a18          return 0;
00451846      }
00451846      
0045184c      class PFileNode* var_2c = eax;
00451851      void var_c;
00451851      PFileNodeIter::PFileNodeIter(&var_c, var_2c);
00451856      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0045185f      var_2c = &PStringBase<char>::s_NullBuffer_2[-1];
00451860      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00451864      InterlockedIncrement(var_2c);
00451873      class PFileNode* i = PFileNodeIter::Curr(&var_c);
00451873      
00451877      if (i != 0)
00451877      {
004519d1          do
004519d1          {
00451890              var_2c = &Mod_UVScale_texCoordIndex;
00451890              
004518a0              if (PFileNode::IsKeyword(i, var_2c) == 0)
004518a0              {
004518cb                  var_2c = &Mod_UVScale_scale;
004518d0                  uint8_t eax_5;
004518d0                  class PFileNode* ecx_8;
004518d0                  eax_5 = PFileNode::IsKeyword(i, var_2c);
004518d0                  
004518d7                  if (eax_5 == 0)
004518d7                  {
004519a9                      var_2c = ecx_8;
004519b1                      PStringBase<char>::PStringBase<char>(&var_2c, "Invalid UVScale keyword");
004519b7                      PFileNode::ReportError(i, var_2c);
004519bf                      result = 0;
004518d7                  }
004518d7                  else
004518d7                  {
004518dd                      struct PFileNode::VTable* vtable_2 = i->vtable;
004518df                      var_2c = nullptr;
004518e3                      class PFileNode* eax_6 = vtable_2->GetSubNode(var_2c);
004518ec                      var_2c = &PStringBase<char>::s_NullBuffer_3;
004518ef                      PFileNode::GetNameAsPString(eax_6, var_2c);
004518f4                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004518f9                      arg2 = PStringBase<char>::s_NullBuffer_1;
00451900                      var_2c = &PStringBase<char>::s_NullBuffer_1[-1];
00451901                      InterlockedIncrement(var_2c);
0045190b                      var_2c = &arg2;
0045190e                      PFileNode::GetNameAsPString(eax_6, var_2c);
00451917                      var_2c = arg5;
00451917                      
0045192c                      if (RenderMaterial::CheckParseField(arg3, &arg2, RMFIELD_LAYER_MOD_UVSCALE_USCALE, RMDATA_WAVEFORM, arg4, var_2c) == 0)
0045192c                      {
00451932                          var_2c = eax_6;
00451936                          Waveform::Parse(&this->uScale, var_2c);
0045192c                      }
0045192c                      
0045193b                      struct PFileNode::VTable* vtable = i->vtable;
0045193d                      var_2c = 1;
00451941                      class PFileNode* eax_9 = vtable->GetSubNode(var_2c);
0045194a                      var_2c = &PStringBase<char>::s_NullBuffer_3;
0045194d                      PFileNode::GetNameAsPString(eax_9, var_2c);
00451956                      var_2c = &arg2;
00451959                      PFileNode::GetNameAsPString(eax_9, var_2c);
00451962                      var_2c = arg5;
00451962                      
00451977                      if (RenderMaterial::CheckParseField(arg3, &arg2, RMFIELD_LAYER_MOD_UVSCALE_VSCALE, RMDATA_WAVEFORM, arg4, var_2c) == 0)
00451977                      {
0045197d                          var_2c = eax_9;
00451981                          Waveform::Parse(&this->vScale, var_2c);
00451977                      }
00451977                      
0045198a                      void* __offset(PFileNode, -0x14) esi_3 = ((char*)arg2 - 0x14);
00451990                      var_2c = ((char*)esi_3 + 4);
00451990                      
0045199d                      if ((InterlockedDecrement(var_2c) == 0 && esi_3 != 0))
0045199d                      {
0045199f                          int32_t edx_1 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
004519a1                          var_2c = 1;
004519a5                          *(uint32_t*)edx_1(var_2c);
0045199d                      }
004518d7                  }
004518a0              }
004518a0              else
004518a0              {
004518a2                  struct PFileNode::VTable* vtable_1 = i->vtable;
004518a4                  var_2c = nullptr;
004518a6                  class PFileNode* eax_4 = vtable_1->GetSubNode(var_2c);
004518af                  var_2c = &PStringBase<char>::s_NullBuffer_3;
004518b2                  PFileNode::GetNameAsPString(eax_4, var_2c);
004518be                  var_2c = &this->texCoordIndex;
004518c1                  PFileNode::GetNameAsUInt32(eax_4, var_2c);
004518a0              }
004518a0              
004519cd              i = PFileNodeIter::Next(&var_c);
004519d1          } while (i != 0);
004519d1          
004519d7          PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
00451877      }
00451877      
004519e1      var_2c = &PStringBase<char>::s_NullBuffer_2[-1];
004519e1      
004519ee      if ((InterlockedDecrement(var_2c) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
004519ee      {
004519f0          int32_t edx_2 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14);
004519f2          var_2c = 1;
004519f6          *(uint32_t*)edx_2(var_2c);
004519ee      }
004519ee      
004519fc      PFileNodeIter::~PFileNodeIter(&var_c);
00451a0c      return result;
00451830  }

00451887                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
00451a1b                                                                                   90 90 90 90 90                             .....

00451a20  void __thiscall RGBColor::SetColor32(class RGBColor* this, uint32_t const arg2)

00451a20  {
00451a29      uint32_t edx_2 = ((uint32_t)((int8_t)(arg2 >> 0x10)));
00451a35      long double x87_r7 = ((long double)edx_2);
00451a35      
00451a39      if (edx_2 < 0)
00451a3b          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
00451a3b      
00451a4c      uint32_t edx_5 = ((uint32_t)((int8_t)(arg2 >> 8)));
00451a54      this->r = ((float)(x87_r7 * ((long double)0.00392156886f)));
00451a5a      long double x87_r7_2 = ((long double)edx_5);
00451a5a      
00451a5e      if (edx_5 < 0)
00451a60          x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
00451a60      
00451a6c      uint32_t eax = (arg2 & 0xff);
00451a77      this->g = ((float)(x87_r7_2 * ((long double)0.00392156886f)));
00451a7a      long double x87_r7_4 = ((long double)eax);
00451a7a      
00451a7e      if (eax < 0)
00451a80          x87_r7_4 = (x87_r7_4 + ((long double)4.2949673e+09f));
00451a80      
00451a8c      this->b = ((float)(x87_r7_4 * ((long double)0.00392156886f)));
00451a20  }

00451a92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00451aa0  void __thiscall Vector3::operator/=(class Vector3* this, float const arg2)

00451aa0  {
00451aa6      long double x87_r7 = (((long double)1f) / ((long double)arg2));
00451aae      this->x = ((float)(x87_r7 * ((long double)this->x)));
00451ab5      this->y = ((float)(x87_r7 * ((long double)this->y)));
00451abb      this->z = ((float)(x87_r7 * ((long double)this->z)));
00451aa0  }

00451ac1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00451ad0  int32_t CPhysicsObj::is_newer(uint16_t arg1, uint16_t arg2) __pure

00451ad0  {
00451ad6      int32_t esi;
00451ad6      esi = arg2;
00451ae3      int32_t eax_2;
00451ae3      int32_t edx_1;
00451ae3      edx_1 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)arg1))));
00451ae3      eax_2 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)arg1))));
00451ae6      int32_t eax_4 = ((eax_2 ^ edx_1) - edx_1);
00451ae6      
00451aed      if (eax_4 > 0x7fff)
00451b00          return -((eax_4 - eax_4));
00451b00      
00451af7      return -((eax_4 - eax_4));
00451ad0  }

00451b01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00451b10  int32_t __thiscall CPhysicsObj::newer_event(class CPhysicsObj* this, enum PhysicsTimeStamp arg2, uint16_t arg3)

00451b10  {
00451b16      int32_t esi;
00451b16      esi = this->update_times[arg2];
00451b1f      int32_t edi;
00451b1f      edi = arg3;
00451b2c      int32_t eax_2;
00451b2c      int32_t edx_1;
00451b2c      edx_1 = HIGHD(((int64_t)(((uint32_t)edi) - ((uint32_t)esi))));
00451b2c      eax_2 = LOWD(((int64_t)(((uint32_t)edi) - ((uint32_t)esi))));
00451b2f      int32_t eax_4 = ((eax_2 ^ edx_1) - edx_1);
00451b36      bool c;
00451b36      
00451b36      if (eax_4 > 0x7fff)
00451b3d          c = edi < esi;
00451b36      else
00451b38          c = esi < edi;
00451b38      
00451b46      if (-((eax_4 - eax_4)) == 0)
00451b60          return 0;
00451b60      
00451b48      this->update_times[arg2] = edi;
00451b58      return 1;
00451b10  }

00451b63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00451b70  enum NetBlobProcessedStatus SmartBox::DispatchSmartBoxEvent(class SmartBox* this @ ecx, class NetBlob* arg2) __pure

00451b70  {
00451b75      return 3;
00451b70  }

00451b78                                                                          90 90 90 90 90 90 90 90                          ........

00451b80  class VisualDesc* __thiscall SmartBox::get_player_visualdesc(class SmartBox const* this)

00451b80  {
00451b88      /* jump -> this->m_pObjMaint->vtable->GetPlayerVisualDesc */
00451b80  }

00451b8b                                   90 90 90 90 90                                                             .....

00451b90  void __thiscall SmartBox::QueueBlobForObject(class SmartBox* this, uint32_t arg2, class NetBlob* arg3)

00451b90  {
00451b96      /* tailcall */
00451b96      return CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg2, arg3);
00451b90  }

00451b9b                                                                                   90 90 90 90 90                             .....

00451ba0  void SmartBox::set_selected_object_id(uint32_t arg1)

00451ba0  {
00451ba4      CPhysicsPart::viewcone_check_object_id = arg1;
00451ba0  }

00451baa                                90 90 90 90 90 90                                                            ......

00451bb0  uint8_t SmartBox::is_selected_object_in_view()

00451bb0  {
00451bb7      int32_t eax;
00451bb7      eax = CPhysicsPart::selected_object_in_view != 0;
00451bba      return eax;
00451bb0  }

00451bbb                                                                                   90 90 90 90 90                             .....

00451bc0  void __thiscall SmartBox::SetOverrideFovDistance(class SmartBox* this, uint8_t arg2, float arg3)

00451bc0  {
00451bc8      this->m_bUseViewDistance = arg2;
00451bce      this->m_fViewDistFOV = arg3;
00451bc0  }

00451bd7                                                                       90 90 90 90 90 90 90 90 90                         .........

00451be0  uint8_t __fastcall SmartBox::GetOverrideFovDistance(class SmartBox* this)

00451be0  {
00451be0      uint8_t m_bUseViewDistance = this->m_bUseViewDistance;
00451be0      
00451be8      if (m_bUseViewDistance != 0)
00451be8      {
00451bea          this->m_fViewDistFOV;
00451bf0          return m_bUseViewDistance;
00451be8      }
00451be8      
00451bf1      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00451c0e      long double st0;
00451c0e      bool c2;
00451c0e      st0 = __fptan(((((long double)this->m_fGameFOV) / (((long double)RenderDevice::render_device_1->m_ViewportAspectRatio) - ((long double)0.100000001f))) * ((long double)0.5)));
00451c10      /* unimplemented  {fstp st0, st0} */;
00451c10      /* unimplemented  {fstp st0, st0} */;
00451c12      /* unimplemented  {fdivr st0, qword [&data_7928c0]} */;
00451c18      return RenderDevice::render_device_1;
00451be0  }

00451c19                                                                             90 90 90 90 90 90 90                           .......

00451c20  uint8_t __fastcall SmartBox::teleport_in_progress(class SmartBox* this)

00451c20  {
00451c32      if ((this->player != 0 && this->position_update_complete == 0))
00451c39          return 1;
00451c39      
00451c3c      return 0;
00451c20  }

00451c3d                                                                                         90 90 90                               ...

00451c40  int32_t __fastcall SmartBox::teleport_occured(class SmartBox* this)

00451c40  {
00451c40      int32_t has_been_teleported = this->has_been_teleported;
00451c46      this->has_been_teleported = 0;
00451c50      return has_been_teleported;
00451c40  }

00451c51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00451c60  uint8_t SmartBox::find_object(uint32_t arg1, uint32_t arg2)

00451c60  {
00451c68      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00451c6e      SmartBox::m_cxWindowFindPos = arg1;
00451c73      SmartBox::m_cyWindowFindPos = arg2;
00451c79      SmartBox::click_object_id = 0;
00451c83      SmartBox::click_object_index = 0xffffffff;
00451c8d      uint32_t eax = (arg1 - RenderDevice::render_device_1->m_viewportX);
00451c93      uint32_t ecx_1 = (arg2 - RenderDevice::render_device_1->m_viewportY);
00451c93      
00451ca7      if ((eax >= RenderDevice::render_device_1->m_viewportWidth || ecx_1 >= RenderDevice::render_device_1->m_viewportHeight))
00451ca7      {
00451cc9          Render::clear_selection_cursor();
00451cce          int32_t eax_2;
00451cce          eax_2 = 0;
00451cd0          return 0;
00451ca7      }
00451ca7      
00451cad      Render::set_selection_cursor(eax, ecx_1, 1);
00451cb5      CPhysicsPart::selected_object_in_view = 0;
00451cbf      SmartBox::lookingForObject = 1;
00451cc6      int32_t eax_1;
00451cc6      eax_1 = 1;
00451cc8      return 1;
00451c60  }

00451cd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00451ce0  uint32_t SmartBox::get_found_object_id()

00451ce0  {
00451ce5      return SmartBox::click_object_id;
00451ce0  }

00451ce6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00451cf0  void SmartBox::set_found_object(uint32_t arg1, uint32_t arg2)

00451cf0  {
00451cf9      SmartBox::click_object_id = arg1;
00451cfe      SmartBox::click_object_index = arg2;
00451d04      ECM_UI::SendNotice_SmartBoxObjectFound(arg1);
00451cf0  }

00451d0b                                   90 90 90 90 90                                                             .....

00451d10  void __thiscall SmartBox::SetTargettingCallback(class SmartBox* this, void (* arg2)(uint32_t, enum ObjectSelectStatus, struct tagRECT const*, float const))

00451d10  {
00451d14      this->target_callback = arg2;
00451d10  }

00451d1d                                                                                         90 90 90                               ...

00451d20  void __thiscall SmartBox::SetTargetObjectID(class SmartBox* this, uint32_t arg2)

00451d20  {
00451d24      this->target_object_id = arg2;
00451d20  }

00451d2d                                         90 90 90                                                               ...

00451d30  void __fastcall SmartBox::Show(class SmartBox* this)

00451d30  {
00451d30      this->hidden = 0;
00451d30  }

00451d3b                                                                                   90 90 90 90 90                             .....

00451d40  void __fastcall SmartBox::Hide(class SmartBox* this)

00451d40  {
00451d40      this->hidden = 1;
00451d40  }

00451d4b                                   90 90 90 90 90                                                             .....

00451d50  int32_t __stdcall SmartBox::SetMode(class SmartBox* this @ ecx, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00451d50  {
00451d71      if (Render::Set3DView(arg2, arg3, arg4, arg5) == 0)
00451d97          return 0;
00451d97      
00451d73      int32_t eax_1;
00451d73      eax_1 = SmartBox::lookingForObject;
00451d73      
00451d7a      if (eax_1 != 0)
00451d7a      {
00451d7c          uint32_t SmartBox::m_cxWindowFindPos_1 = SmartBox::m_cxWindowFindPos;
00451d83          SmartBox::find_object(SmartBox::m_cxWindowFindPos_1, SmartBox::m_cxWindowFindPos_1);
00451d7a      }
00451d7a      
00451d91      return 1;
00451d50  }

00451d9a                                                                                90 90 90 90 90 90                            ......

00451da0  void SmartBox::DisableDegrades(int32_t arg1)

00451da0  {
00451da4      degrades_disabled = arg1;
00451da0  }

00451daa                                90 90 90 90 90 90                                                            ......

00451db0  void SmartBox::DisableFogging(int32_t arg1)

00451db0  {
00451dc0      RenderDeviceD3D::SetFFFogSystemDisabled(RenderDevice::render_device, ((int8_t)arg1 != 0));
00451db0  }

00451dc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00451dd0  void __stdcall SmartBox::EnableWeather(class SmartBox* this @ ecx, int32_t arg2)

00451dd0  {
00451dd6      int32_t eax;
00451dd6      eax = arg2 != 0;
00451dd9      LScape::weather_enabled = eax;
00451dd0  }

00451de1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00451df0  uint8_t __thiscall SmartBox::SetDetailTexturing(class SmartBox* this, uint8_t arg2, uint8_t arg3)

00451df0  {
00451df0      class LScape* lscape = this->lscape;
00451df0      
00451dfa      if (lscape == 0)
00451e10          return 0;
00451e10      
00451dfc      uint32_t eax_1 = ((uint32_t)arg3);
00451e0b      return LScape::SetDetailTexturing(lscape, ((uint32_t)arg2), eax_1, eax_1, 0);
00451df0  }

00451e13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00451e20  int32_t __stdcall SmartBox::HandleRenderOption(class SmartBox* this @ ecx, int32_t arg2, char** arg3, char const** arg4, char const** arg5)

00451e20  {
00451e2a      *(uint32_t*)arg4 = nullptr;
00451e34      *(uint32_t*)arg5 = nullptr;
00451e40      int32_t eax_2 = GraphicsOptions::HandleRenderOption(arg2, arg3, arg4, arg5);
00451e48      char temp1 = eax_2;
00451e48      eax_2 = -(eax_2);
00451e4e      return -((eax_2 - eax_2));
00451e20  }

00451e51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00451e60  void __thiscall SmartBox::SetDefaultFov(class SmartBox* this, float arg2)

00451e60  {
00451e6a      this->m_fGameFOV = ((float)(((long double)arg2) * ((long double)0.017453292519943295)));
00451e60  }

00451e73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00451e80  int32_t __fastcall SmartBox::is_player_outside(class SmartBox const* this)

00451e80  {
00451e80      class CPhysicsObj* player = this->player;
00451e80      
00451e88      if (player == 0)
00451e9e          return 0;
00451e9e      
00451e8d      uint32_t eax_1 = ((uint32_t)((int16_t)player->m_position.objcell_id));
00451e9b      return -((eax_1 - eax_1));
00451e80  }

00451e9f                                                                                               90                                 .

00451ea0  enum NetBlobProcessedStatus __thiscall SmartBox::HandleDeleteObject(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, uint16_t arg4)

00451ea0  {
00451eae      if (arg3 == this->player_id)
00451eb7          return 3;
00451eb7      
00451ec2      class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(this->m_pObjMaint, arg3);
00451ec2      
00451ec9      if (eax_1 != 0)
00451ec9      {
00451ecb          uint16_t ecx_1 = eax_1->update_times[8];
00451ed2          int32_t esi;
00451ed2          esi = arg4;
00451edf          int32_t eax_4;
00451edf          int32_t edx_2;
00451edf          edx_2 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)ecx_1))));
00451edf          eax_4 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)ecx_1))));
00451ee2          int32_t eax_6 = ((eax_4 ^ edx_2) - edx_2);
00451ee9          bool c_1;
00451ee9          
00451ee9          if (eax_6 > 0x7fff)
00451ef0              c_1 = esi < ecx_1;
00451ee9          else
00451eeb              c_1 = ecx_1 < esi;
00451eeb          
00451ef9          if (-((eax_6 - eax_6)) == 0)
00451ef9          {
00451efe              if (ecx_1 != esi)
00451f1f                  return 2;
00451f1f              
00451f00              this->m_pObjMaint->vtable->RecvNotice_SetSelectedItem(arg3);
00451f14              return 1;
00451ef9          }
00451ec9      }
00451ec9      
00451f2e      CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg3, arg2);
00451f3b      return 4;
00451ea0  }

00451f3e                                                                                            90 90                                ..

00451f40  int32_t __thiscall SmartBox::UpdateVisualDesc(class SmartBox* this, class CPhysicsObj* arg2, class VisualDesc const* arg3, uint16_t arg4)

00451f40  {
00451f47      int32_t edi;
00451f47      edi = arg2->update_times[7];
00451f4e      class SmartBox* this_1 = this;
00451f50      this = arg4;
00451f5d      int32_t eax_2;
00451f5d      int32_t edx_1;
00451f5d      edx_1 = HIGHD(((int64_t)(((uint32_t)this) - ((uint32_t)edi))));
00451f5d      eax_2 = LOWD(((int64_t)(((uint32_t)this) - ((uint32_t)edi))));
00451f60      int32_t eax_4 = ((eax_2 ^ edx_1) - edx_1);
00451f67      bool c;
00451f67      
00451f67      if (eax_4 > 0x7fff)
00451f6e          c = this < edi;
00451f67      else
00451f69          c = edi < this;
00451f69      
00451f77      if (-((eax_4 - eax_4)) == 0)
00451fb5          return 0;
00451fb5      
00451f7d      arg2->update_times[7] = this;
00451f84      this_1->m_pObjMaint->vtable->SetVisualDesc(arg2, arg3);
00451f84      
00451f97      if (arg2 == this_1->player)
00451f99          this_1->m_pObjMaint->vtable->SetPlayerVisualDesc(arg3);
00451f99      
00451fad      return 1;
00451f40  }

00451fb8                                                                          90 90 90 90 90 90 90 90                          ........

00451fc0  enum NetBlobProcessedStatus __thiscall SmartBox::HandleSoundEvent(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, int32_t arg4, float arg5)

00451fc0  {
00451fcf      class CPhysicsObj* eax = CObjectMaint::GetObjectA(this->m_pObjMaint, arg3);
00451fcf      
00451fd6      if (eax == 0)
00451fd6      {
00451fe4          CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg3, arg2);
00451ff0          return 4;
00451fd6      }
00451fd6      
00451fff      int32_t eax_3;
00451fff      int80_t st0;
00451fff      st0 = CPhysicsObj::play_sound(eax, arg4, arg5);
00452004      int32_t eax_4 = -(eax_3);
00452010      return (((eax_4 - eax_4) & 0xfffffffe) + 3);
00451fc0  }

00452013                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00452020  enum NetBlobProcessedStatus __thiscall SmartBox::HandlePlayScriptID(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, class IDClass<_tagDataID,32,0> arg4)

00452020  {
0045202f      class CPhysicsObj* eax = CObjectMaint::GetObjectA(this->m_pObjMaint, arg3);
0045202f      
00452036      if (eax == 0)
00452036      {
00452044          CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg3, arg2);
00452050          return 4;
00452036      }
00452036      
0045205a      int32_t eax_3 = CPhysicsObj::play_script(eax, arg4);
0045205f      int32_t eax_4 = -(eax_3);
0045206b      return (((eax_4 - eax_4) & 0xfffffffe) + 3);
00452020  }

0045206e                                            90 90                                                                ..

00452070  enum NetBlobProcessedStatus __thiscall SmartBox::HandlePlayScriptType(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, int32_t arg4, float arg5)

00452070  {
0045207f      class CPhysicsObj* eax = CObjectMaint::GetObjectA(this->m_pObjMaint, arg3);
0045207f      
00452086      if (eax == 0)
00452086      {
00452094          CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg3, arg2);
004520a0          return 4;
00452086      }
00452086      
004520af      int32_t eax_3 = CPhysicsObj::play_script(eax, arg4, arg5);
004520b4      int32_t eax_4 = -(eax_3);
004520c0      return (((eax_4 - eax_4) & 0xfffffffe) + 3);
00452070  }

004520c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004520d0  void __thiscall SmartBox::DoSetState(class SmartBox* this, class CPhysicsObj* arg2, uint32_t arg3, uint16_t arg4)

004520d0  {
004520d2      int32_t esi;
004520d2      esi = arg4;
004520dc      class SmartBox* this_1 = this;
004520de      this = arg2->update_times[2];
004520ed      int32_t eax_2;
004520ed      int32_t edx_1;
004520ed      edx_1 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)this))));
004520ed      eax_2 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)this))));
004520f0      int32_t eax_4 = ((eax_2 ^ edx_1) - edx_1);
004520f7      bool c;
004520f7      
004520f7      if (eax_4 > 0x7fff)
004520fe          c = esi < this;
004520f7      else
004520f9          c = this < esi;
004520f9      
00452107      if (-((eax_4 - eax_4)) != 0)
00452107      {
00452112          arg2->update_times[2] = esi;
00452119          CPhysicsObj::set_state(arg2, arg3, 1);
00452119          
00452139          if ((arg2 == this_1->player && (this_1->waiting_for_teleport != 0 && (*(uint8_t*)((char*)((int16_t)arg2->state))[1] & 0x40) == 0)))
0045213b              this_1->waiting_for_teleport = 0;
00452107      }
004520d0  }

0045214b                                   90 90 90 90 90                                                             .....

00452150  enum NetBlobProcessedStatus __thiscall SmartBox::HandlePlayerTeleport(class SmartBox* this, class NetBlob* arg2, uint16_t arg3)

00452150  {
00452150      class CPhysicsObj* player = this->player;
00452150      
00452158      if (player == 0)
004521b0          return 1;
004521b0      
0045215b      int32_t esi;
0045215b      esi = player->update_times[4];
00452163      int32_t edi;
00452163      edi = arg3;
00452170      int32_t eax_2;
00452170      int32_t edx_2;
00452170      edx_2 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)edi))));
00452170      eax_2 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)edi))));
00452173      int32_t eax_4 = ((eax_2 ^ edx_2) - edx_2);
0045217a      bool c_1;
0045217a      
0045217a      if (eax_4 > 0x7fff)
00452181          c_1 = esi < edi;
0045217a      else
0045217c          c_1 = edi < esi;
0045217c      
00452186      int32_t result = -((eax_4 - eax_4));
00452186      
00452191      if (result != 0)
004521b5          return result;
004521b5      
00452193      this->position_update_complete = 0;
0045219d      this->has_been_teleported = 0;
004521a7      this->waiting_for_teleport = 1;
004521ad      return result;
00452150  }

004521b8                                                                          90 90 90 90 90 90 90 90                          ........

004521c0  void __thiscall SmartBox::DoVectorUpdate(class SmartBox* this, class CPhysicsObj* arg2, class AC1Legacy::Vector3 const* arg3, class AC1Legacy::Vector3 const* arg4, uint16_t arg5)

004521c0  {
004521c6      int32_t esi;
004521c6      esi = arg2->update_times[3];
004521ce      int32_t edi;
004521ce      edi = arg5;
004521db      int32_t eax_2;
004521db      int32_t edx_1;
004521db      edx_1 = HIGHD(((int64_t)(((uint32_t)edi) - ((uint32_t)esi))));
004521db      eax_2 = LOWD(((int64_t)(((uint32_t)edi) - ((uint32_t)esi))));
004521de      int32_t eax_4 = ((eax_2 ^ edx_1) - edx_1);
004521e5      bool c;
004521e5      
004521e5      if (eax_4 > 0x7fff)
004521ec          c = edi < esi;
004521e5      else
004521e7          c = esi < edi;
004521e7      
004521f5      if (-((eax_4 - eax_4)) != 0)
004521f5      {
004521f7          arg2->update_times[3] = edi;
004521f7          
00452204          if (arg2 != this->player)
00452204          {
0045221e              CPhysicsObj::set_velocity(arg2, arg3, 1);
0045222c              CPhysicsObj::set_omega(arg2, arg4, 1);
00452204          }
00452204          else if (this->cmdinterp->vtable->UsePositionFromServer() != 0)
00452213          {
0045221e              CPhysicsObj::set_velocity(arg2, arg3, 1);
0045222c              CPhysicsObj::set_omega(arg2, arg4, 1);
00452213          }
004521f5      }
004521c0  }

00452237                                                                       90 90 90 90 90 90 90 90 90                         .........

00452240  void __stdcall SmartBox::DoPickupEvent(class SmartBox* this @ ecx, class CPhysicsObj* arg2, uint16_t arg3)

00452240  {
00452241      int32_t esi;
00452241      esi = arg3;
0045224b      this = arg2->update_times[0];
0045225a      int32_t eax_2;
0045225a      int32_t edx_1;
0045225a      edx_1 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)this))));
0045225a      eax_2 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)this))));
0045225d      int32_t eax_4 = ((eax_2 ^ edx_1) - edx_1);
00452264      bool c;
00452264      
00452264      if (eax_4 > 0x7fff)
0045226b          c = esi < this;
00452264      else
00452266          c = this < esi;
00452266      
00452274      if (-((eax_4 - eax_4)) != 0)
00452274      {
00452278          arg2->update_times[0] = esi;
0045227f          CPhysicsObj::unset_parent(arg2);
00452286          CPhysicsObj::leave_world(arg2);
00452274      }
00452240  }


00452290  void __thiscall SmartBox::DoParentEvent(class SmartBox* this, class CPhysicsObj* arg2, class CPhysicsObj* arg3, uint32_t arg4, uint32_t arg5, uint16_t arg6)

00452290  {
00452296      int32_t esi;
00452296      esi = arg2->update_times[0];
0045229e      int32_t edi;
0045229e      edi = arg6;
004522ab      int32_t eax_2;
004522ab      int32_t edx_1;
004522ab      edx_1 = HIGHD(((int64_t)(((uint32_t)edi) - ((uint32_t)esi))));
004522ab      eax_2 = LOWD(((int64_t)(((uint32_t)edi) - ((uint32_t)esi))));
004522ae      int32_t eax_4 = ((eax_2 ^ edx_1) - edx_1);
004522b5      bool c;
004522b5      
004522b5      if (eax_4 > 0x7fff)
004522bc          c = edi < esi;
004522b5      else
004522b7          c = esi < edi;
004522b7      
004522c5      if (-((eax_4 - eax_4)) != 0)
004522c5      {
004522ca          bool cond:0_1 = arg2->parent != 0;
004522d0          arg2->update_times[0] = edi;
004522d0          
004522d7          if (!(cond:0_1))
004522d7          {
004522d9              uint32_t id = arg3->id;
004522d9              
004522e2              if (id != this->player_id)
004522e2              {
004522eb                  class CWeenieObject* eax_8 = CObjectMaint::GetWeenieObject(this->m_pObjMaint, id);
004522eb                  
004522f2                  if (eax_8 != 0)
004522f4                      eax_8->vtable->SetParentedState(1);
004522e2              }
004522d7          }
004522d7          
00452305          CPhysicsObj::set_parent(arg2, arg3, arg4);
00452313          CPhysicsObj::SetPlacementFrame(arg2, arg5, 1);
004522c5      }
00452290  }

0045231e                                                                                            90 90                                ..

00452320  uint8_t __fastcall CreatureMode::InitializeScene(class CreatureMode* this)

00452320  {
00452328      void* eax = operator new(0x148);
00452328      
00452332      if (eax == 0)
00452332      {
0045234f          this->creature_cell = nullptr;
00452355          int32_t eax_2;
00452355          eax_2 = 0;
00452358          return 0;
00452332      }
00452332      
00452336      class CEnvCell* eax_1 = CEnvCell::CEnvCell(eax);
0045233f      this->creature_cell = eax_1;
00452345      eax_1 = eax_1 != 0;
00452348      return eax_1;
00452320  }

00452359                                                                             90 90 90 90 90 90 90                           .......

00452360  void __thiscall CreatureMode::SetCameraPosition(class CreatureMode* this, class AC1Legacy::Vector3 const* arg2)

00452360  {
00452366      this->creature_view_frame.m_fOrigin.x = arg2->x;
00452366      this->creature_view_frame.m_fOrigin.y = arg2->y;
00452366      this->creature_view_frame.m_fOrigin.z = arg2->z;
00452360  }

0045237a                                                                                90 90 90 90 90 90                            ......

00452380  void __fastcall CreatureMode::UseSmartboxFOV(class CreatureMode* this)

00452380  {
00452380      this->m_bUseSmartboxFOV = 1;
00452380  }

00452385                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00452390  void __fastcall CreatureMode::UseSharpMode(class CreatureMode* this)

00452390  {
00452390      this->m_bUseSharpMode = 1;
00452390  }

00452395                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004523a0  int32_t MathLib::Clamp(float const arg1, float const arg2, float const arg3)

004523a0  {
004523a0      long double x87_r7 = ((long double)arg1);
004523a4      long double temp0 = ((long double)arg3);
004523a4      (x87_r7 - temp0);
004523a8      int16_t result = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
004523a8      
004523ad      if ((*(uint8_t*)((char*)result)[1] & 0x41) == 0)
004523b3          return result;
004523b3      
004523b4      long double x87_r7_2 = ((long double)arg1);
004523b8      long double temp1 = ((long double)arg2);
004523b8      (x87_r7_2 - temp1);
004523be      /* unimplemented  {test ah, 0x5} */;
004523c7      return ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
004523a0  }

004523cd                                         90 90 90                                                               ...

004523d0  float __fastcall AC1Legacy::Vector3::magnitude(class AC1Legacy::Vector3 const* this)

004523d0  {
004523d0      this->z;
004523d3      this->y;
004523f0      return ((long double)this->x);
004523d0  }

004523f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00452400  class AC1Legacy::Vector3* __thiscall AC1Legacy::Vector3::normalize(class AC1Legacy::Vector3* this, class AC1Legacy::Vector3* __return)

00452400  {
00452400      this->z;
00452407      this->y;
00452424      long double x87_r7_1 = (((long double)1f) / ((long double)this->x));
0045242c      long double x87_r6_3 = (x87_r7_1 * ((long double)this->x));
0045242e      this->x = ((float)x87_r6_3);
00452435      this->y = ((float)(x87_r7_1 * ((long double)this->y)));
0045243d      this->z = ((float)(x87_r7_1 * ((long double)this->z)));
00452440      __return->x = ((float)x87_r6_3);
00452445      __return->y = this->y;
0045244b      __return->z = this->z;
0045244e      return __return;
00452400  }

00452451                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00452460  int32_t __fastcall AC1Legacy::Vector3::normalize_check_small(class AC1Legacy::Vector3* this)

00452460  {
00452460      this->z;
00452463      this->y;
00452466      long double x87_r5 = ((long double)this->x);
00452480      long double temp0 = ((long double)0.000199999995f);
00452480      (x87_r5 - temp0);
00452486      int32_t eax;
00452486      eax = ((((x87_r5 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, temp0))) ? 1 : 0) << 0xa) | ((((x87_r5 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
00452488      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00452488      
0045248b      if (!(p))
00452494          return 1;
00452494      
00452495      long double x87_r7_1 = (((long double)1f) / x87_r5);
004524a1      this->x = ((float)(x87_r7_1 * ((long double)this->x)));
004524a8      this->y = ((float)(x87_r7_1 * ((long double)this->y)));
004524ae      this->z = ((float)(x87_r7_1 * ((long double)this->z)));
004524b1      return 0;
00452460  }

004524b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004524c0  class AC1Legacy::Vector3* __thiscall AC1Legacy::Vector3::operator-(class AC1Legacy::Vector3 const* this, class AC1Legacy::Vector3* __return, class AC1Legacy::Vector3 const* arg3)

004524c0  {
004524c7      long double x87_r7 = (((long double)this->z) - ((long double)arg3->z));
004524cd      long double x87_r6_1 = (((long double)this->y) - ((long double)arg3->y));
004524d8      __return->x = ((float)(((long double)this->x) - ((long double)arg3->x)));
004524da      __return->y = ((float)x87_r6_1);
004524dd      __return->z = ((float)x87_r7);
004524e0      return __return;
004524c0  }

004524e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004524f0  class AC1Legacy::Vector3* __thiscall Frame::localtoglobalvec(class Frame const* this, class AC1Legacy::Vector3* __return, class AC1Legacy::Vector3 const* arg3)

004524f0  {
00452507      long double x87_r7_3 = (((((long double)this->m_fl2gv[8]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[2]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[5]) * ((long double)arg3->y)));
0045251c      long double x87_r6_7 = (((((long double)this->m_fl2gv[7]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[1]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[4]) * ((long double)arg3->y)));
00452531      float* result = __return;
00452537      *(uint32_t*)result = ((float)(((((long double)this->m_fl2gv[6]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[0]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[3]) * ((long double)arg3->y))));
00452539      result[1] = ((float)x87_r6_7);
0045253c      result[2] = ((float)x87_r7_3);
0045253f      return result;
004524f0  }

00452542        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00452550  class AC1Legacy::Vector3* __thiscall Frame::globaltolocalvec(class Frame const* this, class AC1Legacy::Vector3* __return, class AC1Legacy::Vector3 const* arg3)

00452550  {
00452567      long double x87_r7_3 = (((((long double)this->m_fl2gv[8]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[6]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[7]) * ((long double)arg3->y)));
0045257c      long double x87_r6_7 = (((((long double)this->m_fl2gv[5]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[3]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[4]) * ((long double)arg3->y)));
00452591      float* result = __return;
00452597      *(uint32_t*)result = ((float)(((((long double)this->m_fl2gv[2]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[0]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[1]) * ((long double)arg3->y))));
00452599      result[1] = ((float)x87_r6_7);
0045259c      result[2] = ((float)x87_r7_3);
0045259f      return result;
00452550  }

004525a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004525b0  void __thiscall Frame::rotate(class Frame* this, class AC1Legacy::Vector3 const* arg2)

004525b0  {
004525cc      float var_c = ((float)(((((long double)this->m_fl2gv[6]) * ((long double)arg2->z)) + (((long double)this->m_fl2gv[0]) * ((long double)arg2->x))) + (((long double)this->m_fl2gv[3]) * ((long double)arg2->y))));
004525e5      float var_8 = ((float)(((((long double)this->m_fl2gv[7]) * ((long double)arg2->z)) + (((long double)this->m_fl2gv[1]) * ((long double)arg2->x))) + (((long double)this->m_fl2gv[4]) * ((long double)arg2->y))));
00452603      float var_4 = ((float)(((((long double)this->m_fl2gv[8]) * ((long double)arg2->z)) + (((long double)this->m_fl2gv[2]) * ((long double)arg2->x))) + (((long double)this->m_fl2gv[5]) * ((long double)arg2->y))));
00452607      Frame::grotate(this, &var_c);
004525b0  }

00452612                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00452620  class AC1Legacy::Vector3* __thiscall Frame::localtoglobal(class Frame const* this, class AC1Legacy::Vector3* __return, class AC1Legacy::Vector3 const* arg3)

00452620  {
00452639      long double x87_r7_4 = ((((((long double)this->m_fl2gv[8]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[2]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[5]) * ((long double)arg3->y))) + ((long double)this->m_fOrigin.z));
00452651      long double x87_r6_8 = ((((((long double)this->m_fl2gv[7]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[1]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[4]) * ((long double)arg3->y))) + ((long double)this->m_fOrigin.y));
00452667      float* result = __return;
0045266d      long double x87_r5_8 = ((((((long double)this->m_fl2gv[6]) * ((long double)arg3->z)) + (((long double)this->m_fl2gv[0]) * ((long double)arg3->x))) + (((long double)this->m_fl2gv[3]) * ((long double)arg3->y))) + ((long double)this->m_fOrigin.x));
00452670      *(uint32_t*)result = ((float)x87_r5_8);
00452672      result[1] = ((float)x87_r6_8);
00452675      result[2] = ((float)x87_r7_4);
00452678      return result;
00452620  }

0045267b                                                                                   90 90 90 90 90                             .....

00452680  class AC1Legacy::Vector3* __thiscall Frame::globaltolocal(class Frame const* this, class AC1Legacy::Vector3* __return, class AC1Legacy::Vector3 const* arg3)

00452680  {
0045268c      float var_c = ((float)(((long double)arg3->x) - ((long double)this->m_fOrigin.x)));
00452696      float var_8 = ((float)(((long double)arg3->y) - ((long double)this->m_fOrigin.y)));
0045269d      float* result = __return;
004526a1      long double x87_r7_5 = (((long double)arg3->z) - ((long double)this->m_fOrigin.z));
004526a4      float var_4 = ((float)x87_r7_5);
004526bb      long double x87_r7_8 = (((x87_r7_5 * ((long double)this->m_fl2gv[8])) + (((long double)var_c) * ((long double)this->m_fl2gv[6]))) + (((long double)var_8) * ((long double)this->m_fl2gv[7])));
004526d4      long double x87_r6_7 = (((((long double)var_4) * ((long double)this->m_fl2gv[5])) + (((long double)var_c) * ((long double)this->m_fl2gv[3]))) + (((long double)var_8) * ((long double)this->m_fl2gv[4])));
004526ef      *(uint32_t*)result = ((float)(((((long double)var_4) * ((long double)this->m_fl2gv[2])) + (((long double)var_c) * ((long double)this->m_fl2gv[0]))) + (((long double)var_8) * ((long double)this->m_fl2gv[1]))));
004526f1      result[1] = ((float)x87_r6_7);
004526f4      result[2] = ((float)x87_r7_8);
004526fa      return result;
00452680  }

004526fd                                                                                         90 90 90                               ...

00452700  void __thiscall LIGHTINFO::SetDirection(class LIGHTINFO* this, class AC1Legacy::Vector3 const* arg2)

00452700  {
00452700      int32_t type = this->type;
00452700      
0045270d      if ((type == 1 || type == 2))
0045270d      {
00452713          long double x87_r7_1 = ((long double)arg2->x);
00452719          long double x87_r6_1 = ((long double)arg2->y);
0045271c          float z = arg2->z;
0045273d          long double x87_r5_6 = (((long double)1f) / sqrtl((((x87_r7_1 * x87_r7_1) + (((long double)z) * ((long double)z))) + (x87_r6_1 * x87_r6_1))));
00452743          arg2 = ((float)x87_r5_6);
00452749          float var_c = ((float)(x87_r5_6 * x87_r7_1));
00452753          float var_8_1 = ((float)(((long double)arg2) * x87_r6_1));
00452763          float var_4_2 = ((float)(((long double)arg2) * ((long double)z)));
00452767          Frame::set_vector_heading(&this->offset, &var_c);
0045270d      }
00452700  }

00452772                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00452780  void __thiscall Position::Position(class Position* this, uint32_t arg2, class Frame const* arg3)

00452780  {
0045278f      this->vtable = 0x796910;
00452795      this->objcell_id = arg2;
00452798      Frame::operator=(&this->frame, arg3);
00452780  }

004527a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004527b0  uint32_t __fastcall Position::get_outside_cell_id(class Position const* this)

004527b0  {
004527b6      float y = this->frame.m_fOrigin.y;
004527b9      float x = this->frame.m_fOrigin.x;
004527bd      uint32_t* z = this->frame.m_fOrigin.z;
004527c3      float y_1 = y;
004527cb      uint32_t* z_1 = z;
004527cf      float* var_14 = &x;
004527d4      uint32_t objcell_id;
004527d4      uint32_t* var_18 = &objcell_id;
004527d5      objcell_id = this->objcell_id;
004527d9      int32_t eax_1 = LandDefs::adjust_to_outside(z, y);
004527e2      int32_t eax_2 = -(eax_1);
004527eb      return ((eax_2 - eax_2) & objcell_id);
004527b0  }

004527ec                                      90 90 90 90                                                              ....

004527f0  class AC1Legacy::Vector3* __thiscall Position::localtolocal(class Position const* this, class AC1Legacy::Vector3* __return, class Position const* arg3, class AC1Legacy::Vector3 const* arg4)

004527f0  {
00452818      long double x87_r7_4 = ((((((long double)arg3->frame.m_fl2gv[3]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[0]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[6]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.x));
00452834      long double x87_r7_9 = ((((((long double)arg3->frame.m_fl2gv[4]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[1]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[7]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.y));
00452853      long double x87_r7_14 = ((((((long double)arg3->frame.m_fl2gv[5]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[2]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[8]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.z));
00452860      float __return_1;
00452860      LandDefs::get_block_offset(&__return_1, this->objcell_id, arg3->objcell_id);
00452897      float var_4;
00452897      float var_4_1 = ((float)(((long double)var_4) + ((long double)((float)x87_r7_14))));
0045289b      __return_1 = ((float)(((long double)__return_1) + ((long double)((float)x87_r7_4))));
0045289f      float var_8;
0045289f      float var_8_1 = ((float)(((long double)var_8) + ((long double)((float)x87_r7_9))));
004528a3      Frame::globaltolocal(&this->frame, __return, &__return_1);
004528af      return __return;
004527f0  }

004528b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004528c0  class AC1Legacy::Vector3* __thiscall Position::localtoglobal(class Position const* this, class AC1Legacy::Vector3* __return, class Position const* arg3)

004528c0  {
004528d5      float __return_1;
004528d5      LandDefs::get_block_offset(&__return_1, this->objcell_id, arg3->objcell_id);
004528ec      float var_8;
004528ec      long double x87_r6_1 = (((long double)var_8) + ((long double)arg3->frame.m_fOrigin.y));
004528f3      float var_4;
004528f3      long double x87_r5_1 = (((long double)var_4) + ((long double)arg3->frame.m_fOrigin.z));
004528f9      __return->x = ((float)(((long double)__return_1) + ((long double)arg3->frame.m_fOrigin.x)));
004528fb      __return->y = ((float)x87_r6_1);
004528fe      __return->z = ((float)x87_r5_1);
00452904      return __return;
004528c0  }

00452907                       90 90 90 90 90 90 90 90 90                                                         .........

00452910  class Frame const* __fastcall CPhysicsObj::get_frame(class CPhysicsObj const* this) __pure

00452910  {
00452913      return &this->m_position.frame;
00452910  }

00452914                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00452920  void __fastcall Ambient::FlushSoundTables(class Ambient* this)

00452920  {
00452927      int32_t i = 0;
00452929      bool cond:0 = this->num_sounds <= 0;
0045292b      this->total_sound_count = 0f;
0045292b      
00452932      if (!(cond:0))
00452932      {
00452968          do
00452968          {
00452935              this->sounds.data[i]->vtable->ResetCount();
00452945              void* desc = this->sounds.data[i]->desc;
00452948              int32_t* ecx_2 = *(uint32_t*)((char*)desc + 0x14);
00452948              
00452954              if ((ecx_2 != 0 && *(uint32_t*)((char*)desc + 0x18) == 0))
00452954              {
00452958                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x14)();
0045295b                  *(uint32_t*)((char*)desc + 0x14) = 0;
00452954              }
00452954              
00452965              i += 1;
00452968          } while (i < this->num_sounds);
00452932      }
00452920  }

0045296e                                            90 90                                                                ..

00452970  class AC1Legacy::Vector3* __thiscall PhysicsDesc::get_omega(class PhysicsDesc const* this, class AC1Legacy::Vector3* __return)

00452970  {
00452976      float* result = __return;
0045297a      *(uint32_t*)result = this->omega.x;
00452982      result[1] = this->omega.y;
0045298b      result[2] = this->omega.z;
0045298e      return result;
00452970  }

00452991                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004529a0  void __thiscall Position::Position(class Position* this, class Position const* arg2)

004529a0  {
004529a7      this->vtable = 0x796910;
004529b3      this->objcell_id = arg2->objcell_id;
004529ba      Frame::operator=(&this->frame, &arg2->frame);
004529a0  }

004529c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004529d0  void __fastcall CreatureMode::Render(class CreatureMode const* this)

004529d0  {
004529da      class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
004529da      
004529f0      if (SmartBox::smartbox_2->creature_mode == 0)
004529f0      {
004529f8          SmartBox::smartbox_2->game_degrades_disabled = degrades_disabled;
004529fe          degrades_disabled = 1;
004529e6          SmartBox::smartbox_2->creature_mode = 1;
004529f0      }
004529f0      
00452a11      if (this->creature_cell != 0)
00452a11      {
00452a1a          char var_d1_1 = 0;
00452a1a          
00452a27          if ((this->m_bUseSharpMode != 0 && Render::m_RenderPrefs.TextureFiltering < 2))
00452a27          {
00452a34              RenderDeviceD3D::SetMipmapLODBiasForAllSamplers(RenderDevice::render_device, -1.39999998f);
00452a39              var_d1_1 = 1;
00452a27          }
00452a27          
00452a3e          uint32_t objcell_id = SoundManager::player_position_.objcell_id;
00452a56          int32_t var_48 = 0x796910;
00452a5d          uint32_t objcell_id_1 = objcell_id;
00452a64          void var_40;
00452a64          Frame::operator=(&var_40, &SoundManager::player_position_.frame);
00452a71          int32_t var_90 = 0x796910;
00452a75          int32_t var_8c_1 = 0;
00452a79          void var_88;
00452a79          Frame::operator=(&var_88, &this->creature_view_frame);
00452a83          SoundManager::SetPlayerPosition(&var_90);
00452a8e          int32_t i = 0;
00452a8e          
00452a92          if (this->creature_mode_objects.m_num > 0)
00452a92          {
00452aa4              do
00452aa4              {
00452a99                  CPhysicsObj::update_position(this->creature_mode_objects.m_data[i]);
00452aa1                  i += 1;
00452aa4              } while (i < this->creature_mode_objects.m_num);
00452a92          }
00452a92          
00452aae          SoundManager::SetPlayerPosition(&var_48);
00452ab8          Render::world_lights.ambient_color.r = this->m_clrAmbientLight.r;
00452ac1          Render::world_lights.ambient_color.g = this->m_clrAmbientLight.g;
00452acb          Render::world_lights.ambient_color.b = this->m_clrAmbientLight.b;
00452ad1          Render::useSunlightSet(1);
00452ad7          Render::world_lights.num_static_lights = 0;
00452add          Render::world_lights.num_dynamic_lights = 0;
00452ae3          Render::useSunlightSet(0);
00452ae3          
00452af0          if (this->m_bUseSmartboxFOV == 0)
00452b2f              Render::SetFOVRad(this->m_fFOVRadians);
00452af0          else
00452af0          {
00452af2              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00452af2              
00452afd              if (SmartBox::smartbox_1->m_bUseViewDistance == 0)
00452afd              {
00452b0d                  class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00452b19                  class RenderDevice* RenderDevice::render_device_3 = RenderDevice::render_device_1;
00452b2f                  Render::SetFOVRad(((float)(((long double)SmartBox::smartbox_1->m_fGameFOV) / (((long double)RenderDevice::render_device_1->m_ViewportAspectRatio) - ((long double)0.100000001f)))));
00452afd              }
00452afd              else
00452b06                  Render::set_vdst(SmartBox::smartbox_1->m_fViewDistFOV);
00452af0          }
00452af0          
00452b3b          int32_t var_d0 = 0x3f800000;
00452b43          int32_t var_cc_1 = 0;
00452b4b          int32_t var_c8_1 = 0;
00452b53          int32_t var_c4_1 = 0;
00452b5b          int32_t var_9c_1 = 0;
00452b63          int32_t var_98_1 = 0;
00452b6b          int32_t var_94_1 = 0;
00452b73          Frame::cache(&var_d0);
00452b7b          int32_t i_1 = 0;
00452b7b          
00452b7f          if (this->creature_mode_lights.m_num > 0)
00452b7f          {
00452b9c              do
00452b9c              {
00452b8e                  Render::add_static_light(this->creature_mode_lights.m_data[i_1], 0, &var_d0);
00452b99                  i_1 += 1;
00452b9c              } while (i_1 < this->creature_mode_lights.m_num);
00452b7f          }
00452b7f          
00452ba1          int32_t __saved_ebp_3 = CObjCell::add_lights(this->creature_cell);
00452ba1          
00452bb1          if (RenderDevice::render_device->m_bOpenScene != 0)
00452bb1          {
00452bb4              Render::update_viewpoint(&this->creature_view_frame);
00452bb9              Render::set_default_view();
00452bd3              Render::framePush(3, &var_d0, ((Render::FramePushCount - Render::pushLevelOffset) - 1));
00452bd8              class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
00452be1              RenderDevice::render_device_2->vtable->DrawObjCellForDummies(RenderDevice::render_device_2, this->creature_cell);
00452bea              Render::framePop();
00452bf0              __saved_ebp_3 = D3DPolyRender::FlushAlphaList(0f);
00452bb1          }
00452bb1          
00452bfe          if (var_d1_1 != 0)
00452bfe          {
00452c0b              int32_t __saved_ebp_1 = __saved_ebp_3;
00452c15              RenderDeviceD3D::SetMipmapLODBiasForAllSamplers(RenderDevice::render_device, ((float)((long double)*(int32_t*)((char*)Render::m_pRenderer + 0x98))));
00452bfe          }
00452bfe          
00452c1c          Render::useSunlightSet(1);
00452c22          Render::world_lights.num_static_lights = 0;
00452c28          Render::world_lights.num_dynamic_lights = 0;
00452c2e          Render::useSunlightSet(0);
00452a11      }
004529d0  }

00452c3f                                                                                               90                                 .

00452c40  void __thiscall SmartBox::set_viewer(class SmartBox* this, class Position const* arg2, int32_t arg3)

00452c40  {
00452c50      this->viewer.objcell_id = arg2->objcell_id;
00452c5d      Frame::operator=(&this->viewer.frame, &arg2->frame);
00452c5d      
00452c68      if (arg3 != 0)
00452c68      {
00452c6d          this->viewer_sought_position.objcell_id = arg2->objcell_id;
00452c74          Frame::operator=(&this->viewer_sought_position.frame, &arg2->frame);
00452c68      }
00452c68      
00452c7b      this->viewer_cell = nullptr;
00452c83      float SmartBox::s_fViewerLightIntensity_1 = SmartBox::s_fViewerLightIntensity;
00452c89      viewer_light.falloff = SmartBox::s_fViewerLightFalloff;
00452c8e      Render::world_lights.num_dynamic_lights = 0;
00452c94      viewer_light.intensity = SmartBox::s_fViewerLightIntensity_1;
00452ca0      int32_t type = viewer_light.type;
00452cad      uint32_t objcell_id;
00452cad      class Frame* var_20_2;
00452cad      
00452cad      if (this->player == 0)
00452cad      {
00452cfc          if ((type == 0 || type == 2))
00452cfc          {
00452d0a              viewer_light.offset.m_fOrigin.x = 0;
00452d0f              viewer_light.offset.m_fOrigin.y = 0f;
00452d15              viewer_light.offset.m_fOrigin.z = 0f;
00452cfc          }
00452cfc          
00452d21          var_20_2 = &this->viewer.frame;
00452d22          objcell_id = this->viewer.objcell_id;
00452cad      }
00452cad      else
00452cad      {
00452cbe          if ((type == 0 || type == 2))
00452cbe          {
00452ccc              viewer_light.offset.m_fOrigin.x = 0;
00452cd2              viewer_light.offset.m_fOrigin.y = 0f;
00452cd8              viewer_light.offset.m_fOrigin.z = 2f;
00452cbe          }
00452cbe          
00452cdd          class CPhysicsObj* player = this->player;
00452ce9          var_20_2 = &player->m_position.frame;
00452cea          objcell_id = player->m_position.objcell_id;
00452cad      }
00452cad      
00452d28      Render::add_dynamic_light(&viewer_light, objcell_id, var_20_2);
00452d30      CObjCell::add_dynamic_lights();
00452d36      SoundManager::SetPlayerPosition(&this->viewer);
00452d45      LScape::set_sky_position(this->lscape, &this->viewer);
00452d4b      SceneTool::SetupCamera(&this->viewer);
00452c40  }

00452d5d                                                                                         90 90 90                               ...

00452d60  void __fastcall SmartBox::PlayerPhysicsUpdatedCallback(class SmartBox* this)

00452d60  {
00452d75      void __return;
00452d75      void* eax_1;
00452d75      int80_t st0;
00452d75      st0 = CameraManager::UpdateCamera(this->camera_manager, &__return, &this->viewer);
00452d84      this->viewer_sought_position.objcell_id = *(uint32_t*)((char*)eax_1 + 4);
00452d87      Frame::operator=(&this->viewer_sought_position.frame, ((char*)eax_1 + 8));
00452d60  }

00452d91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00452da0  int32_t __thiscall SmartBox::convert_to_player_space(class SmartBox const* this, class CPhysicsObj* arg2, class AC1Legacy::Vector3* arg3)

00452da0  {
00452da0      class CPhysicsObj* player = this->player;
00452da0      
00452dbd      if ((player == 0 || (arg2 == 0 || arg2->cell == 0)))
00452dc4          return 0;
00452dc4      
00452dd8      int32_t var_18 = 0;
00452de0      int32_t var_14 = 0;
00452de8      int32_t var_10 = 0;
00452df0      void __return;
00452df0      class AC1Legacy::Vector3* eax_4 = Position::localtolocal(&player->m_position, &__return, &arg2->m_position, &var_18);
00452df7      int32_t* ecx_1 = arg3;
00452dfb      *(uint32_t*)ecx_1 = eax_4->x;
00452e00      ecx_1[1] = eax_4->y;
00452e06      ecx_1[2] = eax_4->z;
00452e11      return 1;
00452da0  }

00452e14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00452e20  enum ObjectSelectStatus __thiscall SmartBox::GetObjectBoundingBox(class SmartBox const* this, uint32_t arg2, struct tagRECT* arg3, float* arg4)

00452e20  {
00452e2f      class CPhysicsObj* eax = CObjectMaint::GetObjectA(this->m_pObjMaint, arg2);
00452e2f      
00452e38      if (eax == 0)
00452e43          return 3;
00452e43      
00452e48      int32_t result = 0;
00452e4a      Render::set_default_view();
00452e52      float x = 1f;
00452e79      Render::object_scale_vec.x = x;
00452e7f      Render::object_scale_vec.y = 1f;
00452e85      Render::object_scale_vec.z = 1f;
00452e8a      Render::object_scale = 1f;
00452e94      Render::positionPush(3, &eax->m_position);
00452ea3      int32_t x_3;
00452ea3      int32_t x_1 = CPhysicsObj::GetSelectionSphere(eax, &x_3);
00452ea3      
00452eaa      if (x_1 == 0)
00452eaa      {
00452eba          x = x_1;
00452ebe          int32_t x_2 = x_1;
00452ec2          x_3 = x_1;
00452ec6          int32_t x_4 = x_1;
00452eca          int32_t var_8_1 = 0x3dcccccd;
00452ece          int32_t var_4_1 = 0x3dcccccd;
00452eaa      }
00452eaa      
00452edb      int32_t eax_2;
00452edb      int80_t st0_1;
00452edb      st0_1 = Render::viewconeCheck(&x_3);
00452ee7      int32_t esi_1 = eax_2;
00452ee9      float var_48;
00452ee9      Vector3::Vector3(&var_48);
00452ef2      float var_50;
00452ef2      Vector3::Vector3(&var_50);
00452ef2      
00452ef9      if (esi_1 == 0)
00452ef9      {
00452faa      label_452faa:
00452faa          void __return;
00452faa          class AC1Legacy::Vector3* eax_11 = Position::localtolocal(&Render::viewer_pos, &__return, &eax->m_position, &x_3);
00452fb1          float y = eax_11->y;
00452fb4          x = eax_11->x;
00452fb8          float z = eax_11->z;
00452fb8          
00452fce          if (AC1Legacy::Vector3::normalize_check_small(&x) == 0)
00452fce          {
00452fdc              long double x87_r7_5 = ((long double)y);
00452fe0              long double temp1_1 = ((long double)0f);
00452fe0              (x87_r7_5 - temp1_1);
00452fe6              int32_t eax_12;
00452fe6              eax_12 = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00452fe6              
00452feb              if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) != 0)
00452feb              {
00453032                  arg2 = ((float)(((long double)450.0) - (__fpatan(((long double)x), ((long double)0.0)) * ((long double)57.295779513082323))));
0045303c                  j__CIfmod();
00453045                  *(uint32_t*)arg4 = ((float)((long double)360.0));
00452feb              }
00452feb              else
00452feb              {
00453003                  arg2 = ((float)(((long double)450.0) - (__fpatan(((long double)x), ((long double)z)) * ((long double)57.295779513082323))));
0045300d                  j__CIfmod();
00453016                  *(uint32_t*)arg4 = ((float)((long double)360.0));
00452feb              }
00452fce          }
00452fce          else
00452fd4              *(uint32_t*)arg4 = 0f;
00452fd4          
00453047          result = 2;
00452ef9      }
00452ef9      else
00452ef9      {
00452f0e          void var_34;
00452f0e          void var_28;
00452f0e          Render::GetViewerBBox(&x_3, &var_34, &var_28);
00452f0e          
00452f2d          if (Render::m_pRenderer->vtable->xformPointInternal(&var_34, &var_48) == 0)
00452f2f              esi_1 = 0;
00452f2f          
00452f4c          if ((Render::m_pRenderer->vtable->xformPointInternal(&var_28, &var_50) == 0 || esi_1 == 0))
00452f48              goto label_452faa;
00452f48          
00452f57          if ((esi_1 > 0 && esi_1 <= 2))
00452f57          {
00452f6e              arg3->left = _ftol2();
00452f79              arg3->right = _ftol2();
00452f85              arg3->top = _ftol2();
00452f8d              arg3->bottom = _ftol2();
00452f90              result = 1;
00452f57          }
00452ef9      }
00452ef9      
0045304c      Render::framePop();
00453055      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&var_50);
0045305e      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&var_48);
0045306b      return result;
00452e20  }

0045306e                                            90 90                                                                ..

00453070  uint8_t SmartBox::ResetDetailTexturing()

00453070  {
00453070      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00453070      
0045307a      if (SmartBox::smartbox_1 != 0)
0045307a      {
0045307c          class LScape* lscape = SmartBox::smartbox_1->lscape;
0045307c          
00453084          if (lscape != 0)
00453084          {
00453086              uint32_t EnvironmentDetailTextures = ((uint32_t)Render::m_RenderPrefs.EnvironmentDetailTextures);
00453093              return LScape::SetDetailTexturing(lscape, 0, EnvironmentDetailTextures, EnvironmentDetailTextures, 0);
00453084          }
0045307a      }
0045307a      
00453098      return 0;
00453070  }

00453099                                                                             90 90 90 90 90 90 90                           .......

004530a0  void __thiscall SmartBox::SetWorldAmbientLight(class SmartBox* this, float arg2, uint32_t arg3)

004530a0  {
004530a4      int32_t creature_mode = this->creature_mode;
004530aa      this->game_ambient_level = arg2;
004530b9      this->game_ambient_color = arg3;
004530b9      
004530bf      if (creature_mode == 0)
004530bf      {
004530c6          float var_c;
004530c6          RGBColor::SetColor32(&var_c, arg3);
004530d3          var_c = ((float)(((long double)var_c) * ((long double)arg2)));
004530df          Render::world_lights.ambient_color.r = var_c;
004530f5          float var_8;
004530f5          Render::world_lights.ambient_color.g = ((float)(((long double)var_8) * ((long double)arg2)));
00453107          float var_4;
00453107          Render::world_lights.ambient_color.b = ((float)(((long double)var_4) * ((long double)arg2)));
004530bf      }
004530a0  }

00453112                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00453120  int32_t __fastcall SmartBox::SetNormalMode(class SmartBox* this)

00453120  {
00453128      if (this->creature_mode != 0)
00453128      {
0045312a          int32_t game_degrades_disabled = this->game_degrades_disabled;
00453130          this->creature_mode = 0;
0045313a          degrades_disabled = game_degrades_disabled;
0045314d          SmartBox::SetWorldAmbientLight(this, this->game_ambient_level, this->game_ambient_color);
00453152          Render::world_lights.num_static_lights = 0;
0045315c          Render::world_lights.num_dynamic_lights = 0;
00453166          CEnvCell::flush_cells();
00453128      }
00453128      
00453170      return 1;
00453120  }

00453171                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00453180  int32_t __thiscall SmartBox::set_mid_radius(class SmartBox* this, int32_t arg2)

00453180  {
00453184      class CellManager* cell_manager = this->cell_manager;
0045318a      int32_t ebx;
0045318a      ebx = cell_manager->blocking_for_cells;
0045318d      CellManager::Reset(cell_manager);
004531a4      class LScape* ecx;
004531a4      ecx = LScape::SetMidRadius(this->lscape, arg2) != 0;
004531a9      arg2 = ecx;
004531a9      
004531b1      if ((ecx != 0 && ebx != 0))
004531b1      {
004531b3          class CPhysicsObj* player = this->player;
004531b3          
004531c2          if ((player != 0 && player->m_position.objcell_id != 0))
004531c2          {
004531d0              CellManager::ChangePosition(this->cell_manager, &player->m_position, 1);
004531d5              ecx = arg2;
004531c2          }
004531b1      }
004531b1      
004531de      return ((uint32_t)ecx);
00453180  }

004531e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004531f0  int32_t __thiscall SmartBox::SetRegion(class SmartBox* this, uint32_t arg2)

004531f0  {
004531fa      CellManager::Reset(this->cell_manager);
00453209      uint32_t result = ((uint32_t)CRegionDesc::SetRegion(arg2));
00453209      
00453211      if (result != 0)
00453211      {
00453219          LScape::ChangeRegion(this->lscape);
00453227          SmartBox::set_mid_radius(this, Render::m_RenderPrefs.LandscapeDrawDistance);
00453211      }
00453211      
00453230      return result;
004531f0  }

00453233                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00453240  void __fastcall SmartBox::set_viewer_home(class SmartBox* this)

00453240  {
00453246      class CPhysicsObj* player = this->player;
00453246      
0045324e      if (player != 0)
0045324e      {
00453260          CameraManager::SetPivotObject(this->camera_manager, player->id, 0xffffffff);
0045326b          class AC1Legacy::Vector3* ecx_2 = &this->camera_manager->pivot_offset;
0045326e          int32_t var_c = 0;
0045327a          ecx_2->x = var_c;
00453288          ecx_2->y = 0f;
00453297          ecx_2->z = 1.5f;
004532a0          CameraManager::ClearTarget(this->camera_manager);
004532ad          CameraManager::SetTarget(this->camera_manager, LOOK_AT_PIVOT);
004532b2          class CameraManager* camera_manager = this->camera_manager;
004532bd          var_c = 0;
004532c5          int32_t var_8_1 = 0x3f800000;
004532cd          int32_t var_4_1 = 0;
004532d5          CameraManager::SetTargetDirection(camera_manager, &var_c);
004532e2          CameraManager::SetTarget(this->camera_manager, LOOK_IN_DIRECTION);
004532ef          CameraManager::SetTarget(this->camera_manager, ALIGN_WITH_PLANE);
004532f4          class CameraManager* camera_manager_1 = this->camera_manager;
004532fa          long double x87_r7_1 = ((long double)camera_manager_1->scale);
004532fd          var_c = 0;
00453311          camera_manager_1->viewer_offset.x = var_c;
00453311          camera_manager_1->viewer_offset.y = ((float)(((long double)-2.5f) * x87_r7_1));
00453311          camera_manager_1->viewer_offset.z = ((float)(x87_r7_1 * ((long double)0.75f)));
0045324e      }
00453240  }

00453337                                                                       90 90 90 90 90 90 90 90 90                         .........

00453340  enum NetBlobProcessedStatus __thiscall SmartBox::HandleObjDescEvent(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, class VisualDesc const* arg4, class PhysicsTimestampPack const* arg5)

00453340  {
00453346      int32_t ebp;
00453346      ebp = arg5->ts2;
0045334b      int32_t esi;
0045334b      esi = arg5->ts1;
0045335d      class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(this->m_pObjMaint, arg3);
0045335d      
00453366      if (eax_1 != 0)
00453366      {
00453368          int32_t ebx;
00453368          ebx = eax_1->update_times[8];
00453377          int32_t eax_4;
00453377          int32_t edx_2;
00453377          edx_2 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)ebx))));
00453377          eax_4 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)ebx))));
0045337a          int32_t eax_6 = ((eax_4 ^ edx_2) - edx_2);
00453381          bool c_1;
00453381          
00453381          if (eax_6 > 0x7fff)
00453388              c_1 = esi < ebx;
00453381          else
00453383              c_1 = ebx < esi;
00453383          
00453391          if (-((eax_6 - eax_6)) == 0)
00453391          {
00453396              if (ebx != esi)
004533bb                  return 2;
004533bb              
004533a1              SmartBox::UpdateVisualDesc(this, eax_1, arg4, ebp);
004533af              return 1;
00453391          }
00453366      }
00453366      
004533ce      CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg3, arg2);
004533dc      return 4;
00453340  }

004533df                                                                                               90                                 .

004533e0  enum NetBlobProcessedStatus __thiscall SmartBox::HandleSetState(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, uint32_t arg4, class PhysicsTimestampPack const* arg5)

004533e0  {
004533e6      int32_t ebp;
004533e6      ebp = arg5->ts2;
004533eb      int32_t esi;
004533eb      esi = arg5->ts1;
004533fd      class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(this->m_pObjMaint, arg3);
004533fd      
00453406      if (eax_1 != 0)
00453406      {
00453408          int32_t ebx;
00453408          ebx = eax_1->update_times[8];
00453417          int32_t eax_4;
00453417          int32_t edx_2;
00453417          edx_2 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)ebx))));
00453417          eax_4 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)ebx))));
0045341a          int32_t eax_6 = ((eax_4 ^ edx_2) - edx_2);
00453421          bool c_1;
00453421          
00453421          if (eax_6 > 0x7fff)
00453428              c_1 = esi < ebx;
00453421          else
00453423              c_1 = ebx < esi;
00453423          
00453431          if (-((eax_6 - eax_6)) == 0)
00453431          {
00453436              if (ebx != esi)
0045345b                  return 2;
0045345b              
00453441              SmartBox::DoSetState(this, eax_1, arg4, ebp);
0045344f              return 1;
00453431          }
00453406      }
00453406      
0045346e      CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg3, arg2);
0045347c      return 4;
004533e0  }

0045347f                                                                                               90                                 .

00453480  enum NetBlobProcessedStatus __thiscall SmartBox::HandleVectorUpdate(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, class AC1Legacy::Vector3 const* arg4, class AC1Legacy::Vector3 const* arg5, class PhysicsTimestampPack const* arg6)

00453480  {
00453486      int32_t ebp;
00453486      ebp = arg6->ts2;
0045348b      int32_t esi;
0045348b      esi = arg6->ts1;
0045349d      class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(this->m_pObjMaint, arg3);
0045349d      
004534a6      if (eax_1 != 0)
004534a6      {
004534a8          int32_t ebx;
004534a8          ebx = eax_1->update_times[8];
004534b7          int32_t eax_4;
004534b7          int32_t edx_2;
004534b7          edx_2 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)ebx))));
004534b7          eax_4 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)ebx))));
004534ba          int32_t eax_6 = ((eax_4 ^ edx_2) - edx_2);
004534c1          bool c_1;
004534c1          
004534c1          if (eax_6 > 0x7fff)
004534c8              c_1 = esi < ebx;
004534c1          else
004534c3              c_1 = ebx < esi;
004534c3          
004534d1          if (-((eax_6 - eax_6)) == 0)
004534d1          {
004534d6              if (ebx != esi)
00453500                  return 2;
00453500              
004534e6              SmartBox::DoVectorUpdate(this, eax_1, arg4, arg5, ebp);
004534f4              return 1;
004534d1          }
004534a6      }
004534a6      
00453513      CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg3, arg2);
00453521      return 4;
00453480  }

00453524              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00453530  enum NetBlobProcessedStatus __thiscall SmartBox::HandlePickupEvent(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, class PhysicsTimestampPack const* arg4)

00453530  {
00453536      int32_t ebp;
00453536      ebp = arg4->ts2;
0045353b      int32_t esi;
0045353b      esi = arg4->ts1;
0045354d      class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(this->m_pObjMaint, arg3);
0045354d      
00453556      if (eax_1 != 0)
00453556      {
00453558          int32_t ebx;
00453558          ebx = eax_1->update_times[8];
00453567          int32_t eax_4;
00453567          int32_t edx_2;
00453567          edx_2 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)ebx))));
00453567          eax_4 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)ebx))));
0045356a          int32_t eax_6 = ((eax_4 ^ edx_2) - edx_2);
00453571          bool c_1;
00453571          
00453571          if (eax_6 > 0x7fff)
00453578              c_1 = esi < ebx;
00453571          else
00453573              c_1 = ebx < esi;
00453573          
00453581          if (-((eax_6 - eax_6)) == 0)
00453581          {
00453586              if (ebx != esi)
004535a6                  return 2;
004535a6              
0045358c              SmartBox::DoPickupEvent(this, eax_1, ebp);
0045359a              return 1;
00453581          }
00453556      }
00453556      
004535b9      CObjectMaint::QueueBlobForObject(this->m_pObjMaint, arg3, arg2);
004535c7      return 4;
00453530  }

004535ca                                90 90 90 90 90 90                                                            ......

004535d0  enum NetBlobProcessedStatus __thiscall SmartBox::HandleParentEvent(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, class PhysicsTimestampPack const* arg7)

004535d0  {
004535d5      int32_t ebx;
004535d5      ebx = arg7->ts1;
004535d9      class PhysicsTimestampPack* eax;
004535d9      eax = arg7->ts2;
004535de      uint32_t ebp = arg3;
004535ed      arg7 = eax;
004535f2      class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(this->m_pObjMaint, ebp);
004535fb      int32_t eax_6;
004535fb      bool c_1;
004535fb      
004535fb      if (eax_1 != 0)
004535fb      {
004535fd          uint16_t ecx_1 = eax_1->update_times[8];
0045360c          int32_t eax_4;
0045360c          int32_t edx_2;
0045360c          edx_2 = HIGHD(((int64_t)(((uint32_t)ebx) - ((uint32_t)ecx_1))));
0045360c          eax_4 = LOWD(((int64_t)(((uint32_t)ebx) - ((uint32_t)ecx_1))));
0045360f          eax_6 = ((eax_4 ^ edx_2) - edx_2);
0045360f          
00453616          if (eax_6 > 0x7fff)
0045361d              c_1 = ebx < ecx_1;
00453616          else
00453618              c_1 = ecx_1 < ebx;
004535fb      }
004535fb      
00453626      class NetBlob* var_14_2;
00453626      
00453626      if ((eax_1 == 0 || -((eax_6 - eax_6)) != 0))
00453680          var_14_2 = arg2;
00453626      else
00453626      {
00453628          ebp = arg4;
00453633          class CPhysicsObj* eax_9 = CObjectMaint::GetObjectA(this->m_pObjMaint, ebp);
00453633          
0045363a          if (eax_9 != 0)
0045363a          {
0045364a              if (eax_1->update_times[8] != ebx)
00453679                  return 2;
00453679              
0045365f              SmartBox::DoParentEvent(this, eax_9, eax_1, arg5, arg6, arg7);
0045366d              return 1;
0045363a          }
0045363a          
00453640          var_14_2 = arg2;
00453626      }
00453626      
00453688      CObjectMaint::QueueBlobForObject(this->m_pObjMaint, ebp, var_14_2);
00453696      return 4;
004535d0  }

00453699                                                                             90 90 90 90 90 90 90                           .......

004536a0  uint8_t __thiscall CreatureMode::RemoveObject(class CreatureMode* this, class CPhysicsObj const* arg2)

004536a0  {
004536a6      int32_t ebx;
004536a6      int32_t var_4 = ebx;
004536ab      int32_t* m_data_2;
004536ab      
004536ab      if (arg2 != 0)
004536ab      {
004536b0          int32_t i = 0;
004536b0          
004536b4          if (this->creature_mode_objects.m_num > 0)
004536b4          {
004536b6              class CPhysicsObj** m_data = this->creature_mode_objects.m_data;
004536b8              m_data_2 = m_data;
004536b8              
004536cd              do
004536cd              {
004536c2                  if (*(uint32_t*)m_data_2 == arg2)
004536c2                  {
004536de                      CPhysicsObj::RemoveObjectFromSingleCell(m_data[i], this->creature_cell);
004536e3                      uint32_t m_num = this->creature_mode_objects.m_num;
004536e3                      
004536e8                      if (i < m_num)
004536e8                      {
004536ed                          this->creature_mode_objects.m_num = (m_num - 1);
004536ed                          
004536f0                          if (i != (m_num - 1))
004536f0                          {
004536f2                              class CPhysicsObj** m_data_1 = this->creature_mode_objects.m_data;
004536f7                              m_data_1[i] = m_data_1[(m_num - 1)];
004536fd                              this->creature_mode_objects.m_data[this->creature_mode_objects.m_num] = 0;
004536f0                          }
004536e8                      }
004536e8                      
00453708                      m_num = 1;
0045370b                      return 1;
004536c2                  }
004536c2                  
004536c7                  i += 1;
004536c8                  m_data_2 = &m_data_2[1];
004536cd              } while (i < this->creature_mode_objects.m_num);
004536b4          }
004536ab      }
004536ab      
004536d1      m_data_2 = 0;
004536d4      return 0;
004536a0  }

0045370e                                            90 90                                                                ..

00453710  class CPhysicsObj* __thiscall CreatureMode::GetObjectByIndex(class CreatureMode* this, uint32_t arg2)

00453710  {
00453717      if (arg2 < this->creature_mode_objects.m_num)
00453723          return this->creature_mode_objects.m_data[arg2];
00453723      
0045371b      return 0;
00453710  }

00453726                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00453730  void __thiscall CreatureMode::SetCameraDirection(class CreatureMode* this, class AC1Legacy::Vector3 const* arg2)

00453730  {
0045373e      Frame::euler_set_rotate(&this->creature_view_frame, 0f, 0f, 0f, 0);
0045374a      Frame::rotate(&this->creature_view_frame, arg2);
00453730  }

00453753                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00453760  void __thiscall CreatureMode::SetCameraDirection_Degrees(class CreatureMode* this, class AC1Legacy::Vector3 const* arg2)

00453760  {
00453771      Frame::euler_set_rotate(&this->creature_view_frame, 0f, 0f, 0f, 0);
0045378c      long double x87_r6_1 = (((long double)arg2->y) * ((long double)0.0174532924f));
004537a5      float var_10 = ((float)(((long double)arg2->z) * ((long double)0.0174532924f)));
004537a9      float var_18 = ((float)(((long double)arg2->x) * ((long double)0.0174532924f)));
004537ad      float var_14 = ((float)x87_r6_1);
004537b1      Frame::rotate(&this->creature_view_frame, &var_18);
00453760  }

004537bd                                                                                         90 90 90                               ...

004537c0  void __thiscall NIList<NetBlob *>::AddToTail(class NIList<NetBlob *>* this, class NetBlob* arg2)

004537c0  {
004537c5      class NIListElement<NetBlob *>* eax = operator new(8);
004537c5      
004537cf      if (eax == 0)
004537e0          eax = nullptr;
004537cf      else
004537cf      {
004537d5          eax->data_ = arg2;
004537d7          eax->next_ = nullptr;
004537cf      }
004537cf      
004537e2      class NIListElement<NetBlob *>* tail_ = this->tail_;
004537e2      
004537e7      if (tail_ == 0)
004537e7      {
004537e9          this->head_ = eax;
004537eb          this->tail_ = eax;
004537ef          return;
004537e7      }
004537e7      
004537f2      tail_->next_ = eax;
004537fb      this->tail_ = this->tail_->next_;
004537c0  }

00453802        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00453810  class Position* __thiscall PhysicsDesc::get_position(class PhysicsDesc const* this, class Position* __return)

00453810  {
00453815      __return->vtable = 0x796910;
00453825      __return->objcell_id = this->pos.objcell_id;
00453828      Frame::operator=(&__return->frame, &this->pos.frame);
00453830      return __return;
00453810  }

00453833                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00453840  void SmartBox::Cleanup(class SmartBox* arg1)

00453840  {
00453845      Render::UnlinkRGRCallback(SmartBox::ResetDetailTexturing);
0045384a      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0045384a      
00453855      if (SmartBox::smartbox_1 != 0)
00453857          SmartBox::smartbox_1->vtable->__vecDelDtor(1);
00453857      
0045385d      SmartBox::smartbox = nullptr;
00453840  }

00453868                          90 90 90 90 90 90 90 90                                                          ........

00453870  void __thiscall SmartBox::PlayerPositionUpdated(class SmartBox* this, int32_t arg2, float arg3)

00453870  {
00453873      class CPhysicsObj* player_1 = this->player;
00453873      
0045387b      if (player_1 != 0)
0045387b      {
0045388c          if (arg2 == 0)
0045388c          {
004538c0              int32_t eax_2;
004538c0              long double st0_1;
004538c0              eax_2 = CPhysicsObj::GetAutonomyBlipDistance(player_1);
004538c5              long double temp1_1 = ((long double)arg3);
004538c5              (st0_1 - temp1_1);
004538c9              eax_2 = ((((st0_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004538cb              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004538cb              
004538ce              if (!(p_1))
004538ce              {
004538d5                  SmartBox::set_viewer(this, &player_1->m_position, 1);
004538e2                  LScape::update_viewpoint(this->lscape, 0);
004538ce              }
0045388c          }
0045388c          else
0045388c          {
0045388e              int32_t var_10_1 = 1;
00453890              this->position_update_complete = 0;
0045389a              this->waiting_for_teleport = 0;
004538a4              this->has_been_teleported = 0;
004538ae              int32_t edx;
004538ae              CPhysicsObj::teleport_hook(player_1, edx);
004538b3              this->cmdinterp->vtable->PlayerTeleported();
004538d5              SmartBox::set_viewer(this, &player_1->m_position, 1);
004538e2              LScape::update_viewpoint(this->lscape, 0);
0045388c          }
0045388c          
004538e7          class CPhysicsObj* player = this->player;
004538e7          
004538f6          if ((player != 0 && player->m_position.objcell_id != 0))
00453903              CellManager::ChangePosition(this->cell_manager, &player->m_position, arg2);
0045387b      }
00453870  }

0045390e                                            90 90                                                                ..

00453910  void __thiscall SmartBox::TeleportPlayer(class SmartBox* this, class Position const* arg2)

00453910  {
00453913      class CPhysicsObj* player = this->player;
00453913      
0045391b      if (player != 0)
0045391b      {
00453924          CPhysicsObj::SetPositionSimple(player, arg2, 1);
00453932          SmartBox::PlayerPositionUpdated(this, 1, 3.40282347e+38f);
0045391b      }
00453910  }

0045393b                                                                                   90 90 90 90 90                             .....

00453940  void __thiscall SmartBox::BlipPlayer(class SmartBox* this, class Position const* arg2)

00453940  {
00453943      class CPhysicsObj* player = this->player;
00453943      
0045394b      if (player != 0)
0045394b      {
0045394e          class Position* edi_1 = arg2;
0045395b          arg2 = ((float)Position::distance(&player->m_position, edi_1));
00453968          CPhysicsObj::SetPositionSimple(this->player, edi_1, 1);
00453976          SmartBox::PlayerPositionUpdated(this, 0, arg2);
0045394b      }
00453940  }


00453980  void __thiscall SmartBox::QueueNetBlob(class SmartBox* this, class NetBlob* arg2)

00453980  {
0045398b      if (this->netblob_list == 0)
0045398b      {
0045398f          class NIList<NetBlob *>* eax_1 = operator new(8);
0045398f          
00453999          if (eax_1 == 0)
004539aa              eax_1 = nullptr;
00453999          else
00453999          {
0045399b              eax_1->head_ = 0;
004539a1              eax_1->tail_ = nullptr;
00453999          }
00453999          
004539ac          this->netblob_list = eax_1;
0045398b      }
0045398b      
004539bb      InterlockedIncrement(&arg2->m_cRef);
004539c1      class NIList<NetBlob *>* netblob_list = this->netblob_list;
004539c9      class NIListElement<NetBlob *>* eax_3 = operator new(8);
004539c9      
004539d3      if (eax_3 == 0)
004539e0          eax_3 = nullptr;
004539d3      else
004539d3      {
004539d5          eax_3->data_ = arg2;
004539d7          eax_3->next_ = nullptr;
004539d3      }
004539d3      
004539e2      class NIListElement<NetBlob *>* tail_ = netblob_list->tail_;
004539e2      
004539e8      if (tail_ == 0)
004539e8      {
004539ea          netblob_list->head_ = eax_3;
004539ec          netblob_list->tail_ = eax_3;
004539f0          return;
004539e8      }
004539e8      
004539f3      tail_->next_ = eax_3;
004539fc      netblob_list->tail_ = netblob_list->tail_->next_;
00453980  }

00453a03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00453a10  void __fastcall SmartBox::DestroyQueuedNetBlobs(class SmartBox* this)

00453a10  {
00453a13      class NIList<NetBlob *>* netblob_list = this->netblob_list;
00453a13      
00453a1b      if (netblob_list != 0)
00453a1b      {
00453a25          if (netblob_list->head_ != 0)
00453a25          {
00453a76              do
00453a76              {
00453a30                  class NIList<NetBlob *>* netblob_list_1 = this->netblob_list;
00453a36                  class NIListElement<NetBlob *>* head_ = netblob_list_1->head_;
00453a3a                  class NetBlob* data_;
00453a3a                  
00453a3a                  if (head_ != 0)
00453a3a                  {
00453a40                      class NIListElement<NetBlob *>* next_ = head_->next_;
00453a45                      netblob_list_1->head_ = next_;
00453a45                      
00453a47                      if (next_ == 0)
00453a49                          netblob_list_1->tail_ = next_;
00453a49                      
00453a4c                      data_ = head_->data_;
00453a4f                      operator delete(head_);
00453a3a                  }
00453a3a                  else
00453a3c                      data_ = nullptr;
00453a3c                  
00453a63                  if ((InterlockedDecrement(&data_->m_cRef) == 0 && data_ != 0))
00453a65                      data_->vtable->__vecDelDtor(data_, 1);
00453a76              } while (this->netblob_list->head_ != 0);
00453a25          }
00453a25          
00453a79          class NIList<NetBlob *>* netblob_list_2 = this->netblob_list;
00453a79          
00453a81          if (netblob_list_2 != 0)
00453a81          {
00453a85              NIList<NetBlob *>::DeleteContents(netblob_list_2);
00453a8b              operator delete(netblob_list_2);
00453a81          }
00453a81          
00453a93          this->netblob_list = nullptr;
00453a1b      }
00453a10  }


00453aa0  void __fastcall SmartBox::RenderNormalMode(class SmartBox* this)

00453aa0  {
00453aa0      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00453aa9      class SmartBox* this_1 = this;
00453aab      this = RenderDevice::render_device_1->m_bOpenScene;
00453aab      
00453ab3      if (this != 0)
00453ab3      {
00453ac9          int32_t edi;
00453ac9          int32_t var_20_1 = edi;
00453acc          int32_t edi_2 = -((edi - edi));
00453adb          int32_t ebx_1;
00453adb          
00453adb          if ((edi_2 != 0 || this_1->viewer_cell->seen_outside != 0))
00453ae1              ebx_1 = 1;
00453adb          else
00453add              ebx_1 = 0;
00453add          
00453ae6          uint32_t ecx_1;
00453ae6          ecx_1 = this_1->m_bUseViewDistance;
00453ae6          
00453aee          if (ecx_1 == 0)
00453aee          {
00453b04              uint32_t var_24_2 = ecx_1;
00453b14              Render::SetFOVRad(((float)(((long double)this_1->m_fGameFOV) / (((long double)RenderDevice::render_device_1->m_ViewportAspectRatio) - ((long double)0.100000001f)))));
00453aee          }
00453aee          else
00453af7              Render::set_vdst(this_1->m_fViewDistFOV);
00453af7          
00453b1e          if (edi_2 == 0)
00453b1e          {
00453b56              if (ebx_1 != 0)
00453b56              {
00453b5b                  uint32_t eax_1 = Position::get_outside_cell_id(&this_1->viewer);
00453b67                  LScape::update_viewpoint(this_1->lscape, eax_1);
00453b56              }
00453b56              
00453b70              Render::update_viewpoint(&this_1->viewer);
00453b75              class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
00453b7e              RenderDevice::render_device_2->vtable->DrawInside(RenderDevice::render_device_2, this_1->viewer_cell);
00453b1e          }
00453b1e          else
00453b1e          {
00453b2a              LScape::update_viewpoint(this_1->lscape, this_1->viewer.objcell_id);
00453b33              Render::update_viewpoint(&this_1->viewer);
00453b38              Render::set_default_view();
00453b3f              Render::useSunlightSet(1);
00453b4d              LScape::draw(this_1->lscape);
00453b1e          }
00453ab3      }
00453ab3      
00453b8b      D3DPolyRender::FlushAlphaList(0f);
00453b90      uint32_t target_object_id = this_1->target_object_id;
00453b90      
00453ba5      if ((target_object_id != 0 && this_1->target_callback != 0))
00453ba5      {
00453bb4          float var_14;
00453bb4          void var_10;
00453bb4          enum ObjectSelectStatus eax_4 = SmartBox::GetObjectBoundingBox(this_1, target_object_id, &var_10, &var_14);
00453bcb          this_1->target_callback(this_1->target_object_id, eax_4, &var_10, var_14);
00453ba5      }
00453ba5      
00453bd4      void (* m_renderingCallback)() = this_1->m_renderingCallback;
00453bd4      
00453bdc      if (m_renderingCallback != 0)
00453bde          m_renderingCallback();
00453aa0  }

00453be5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00453bf0  void __thiscall SmartBox::Reset(class SmartBox* this, int32_t arg2)

00453bf0  {
00453bf6      degrades_disabled = 0;
00453bfc      class CPhysics* physics = this->physics;
00453c04      this->player = nullptr;
00453c04      
00453c0a      if (physics != 0)
00453c0d          QuickWindow::SetWindowID(physics, 0);
00453c0d      
00453c12      class CommandInterpreter* cmdinterp = this->cmdinterp;
00453c12      
00453c1a      if (cmdinterp != 0)
00453c1c          cmdinterp->vtable->SetSmartBox(cmdinterp, this);
00453c1c      
00453c22      class CellManager* cell_manager = this->cell_manager;
00453c22      
00453c2a      if (cell_manager != 0)
00453c2c          CellManager::Reset(cell_manager);
00453c2c      
00453c35      this->viewer_cell = nullptr;
00453c38      this->position_update_complete = 0;
00453c3e      this->has_been_teleported = 0;
00453c3e      
00453c44      if (arg2 != 0)
00453c44      {
00453c46          class CObjectMaint* m_pObjMaint = this->m_pObjMaint;
00453c4e          this->player_id = 0;
00453c4e          
00453c54          if (m_pObjMaint != 0)
00453c54          {
00453c56              m_pObjMaint->vtable->SetPlayerVisualDesc(m_pObjMaint, nullptr);
00453c62              CObjectMaint::DestroyObjects(this->m_pObjMaint);
00453c54          }
00453c54          
00453c69          SmartBox::DestroyQueuedNetBlobs(this);
00453c44      }
00453bf0  }

00453c73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00453c80  void __thiscall SmartBox::init_player(class SmartBox* this, class CPhysicsObj* arg2, int32_t arg3)

00453c80  {
00453c87      this->player = arg2;
00453c8d      SmartBox::set_viewer_home(this);
00453c9f      QuickWindow::SetWindowID(this->physics, this->player);
00453cab      CPhysicsObj::SetPlayer(this->player);
00453cbd      CPhysicsPart::player_iid = this->player->id;
00453cc3      class CommandInterpreter* cmdinterp = this->cmdinterp;
00453cc9      cmdinterp->vtable->NewPlayer(cmdinterp, arg3);
00453c80  }

00453cd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00453ce0  void __fastcall SmartBox::update_viewer(class SmartBox* this)

00453ce0  {
00453ce9      class CPhysicsObj* player = this->player;
00453ce9      
00453cf4      if (player != 0)
00453cf4      {
00453d00          if (player->cell == 0)
00453d00          {
00453d02              CPhysicsObj::reenter_visibility(player);
00453d07              player = this->player;
00453d07              
00453d13              if (player->cell == 0)
00453d13              {
00453d1d                  SmartBox::set_viewer(this, &player->m_position, 1);
00453d22                  this->viewer_cell = nullptr;
00453d2d                  return;
00453d13              }
00453d00          }
00453d00          
00453d3a          Render::player_pos.objcell_id = player->m_position.objcell_id;
00453d3f          Frame::operator=(&Render::player_pos.frame, &player->m_position.frame);
00453d3f          
00453d4a          if (static_camera == 0)
00453d4a          {
00453d58              uint32_t objcell_id = this->viewer_sought_position.objcell_id;
00453d66              int32_t var_120 = 0x796910;
00453d6a              void var_118;
00453d6a              Frame::operator=(&var_118, &this->viewer_sought_position.frame);
00453d6f              class CameraManager* camera_manager = this->camera_manager;
00453d75              class CObjCell* cell_1 = nullptr;
00453d79              int32_t pivot_part_index = camera_manager->pivot_part_index;
00453d7f              class CPartArray* part_array;
00453d7f              class CPhysicsObj* player_1;
00453d7f              
00453d7f              if (pivot_part_index != 0xffffffff)
00453d7f              {
00453d81                  player_1 = this->player;
00453d87                  part_array = player_1->part_array;
00453d7f              }
00453d7f              
00453d8d              class Frame* var_188_2;
00453d8d              
00453d8d              if ((pivot_part_index == 0xffffffff || pivot_part_index >= part_array->num_parts))
00453d8d              {
00453d9b                  player_1 = this->player;
00453da4                  var_188_2 = &player_1->m_position.frame;
00453d8d              }
00453d8d              else
00453d98                  var_188_2 = &part_array->parts[pivot_part_index]->pos.frame;
00453d98              
00453da9              void var_16c;
00453da9              Frame::operator=(&var_16c, var_188_2);
00453dbb              void __return;
00453dbb              class AC1Legacy::Vector3* eax_3 = Frame::localtoglobalvec(&var_16c, &__return, &camera_manager->pivot_offset);
00453dd5              float var_138;
00453dd5              float var_138_1 = ((float)(((long double)var_138) + ((long double)eax_3->x)));
00453de0              float var_134;
00453de0              float var_134_1 = ((float)(((long double)var_134) + ((long double)eax_3->y)));
00453deb              float var_130;
00453deb              float var_130_1 = ((float)(((long double)var_130) + ((long double)eax_3->z)));
00453def              class CObjCell* cell;
00453def              
00453def              if (((uint32_t)((int16_t)player_1->m_position.objcell_id)) >= 0x100)
00453def              {
00453dfd                  uint32_t objcell_id_1 = player_1->m_position.objcell_id;
00453e0c                  int32_t var_90 = 0x796910;
00453e13                  uint32_t objcell_id_2 = objcell_id_1;
00453e1a                  void var_88;
00453e1a                  Frame::operator=(&var_88, &var_16c);
00453e1a                  
00453e3f                  if (CPhysicsObj::AdjustPosition(&var_90, &viewer_sphere, &cell_1, 0, 1) != 0)
00453e53                      cell = cell_1;
00453e3f                  else
00453e3f                  {
00453e47                      cell = this->player->cell;
00453e4d                      cell_1 = cell;
00453e3f                  }
00453def              }
00453def              else
00453def              {
00453df1                  cell = player_1->cell;
00453df7                  cell_1 = cell;
00453def              }
00453def              
00453e57              uint32_t id = cell->m_DID.id;
00453e66              int32_t var_d8 = 0x796910;
00453e6d              uint32_t id_2 = id;
00453e74              void var_d0;
00453e74              Frame::operator=(&var_d0, &var_16c);
00453e8a              class AC1Legacy::Vector3* eax_6 = Position::localtoglobal(&var_d8, &__return, &var_120);
00453e91              float x = eax_6->x;
00453e9b              float y = eax_6->y;
00453ea9              float z = eax_6->z;
00453eb0              uint32_t id_1 = cell->m_DID.id;
00453ebb              int32_t var_48 = 0x796910;
00453ec2              uint32_t id_3 = id_1;
00453ec9              void var_40;
00453ec9              Frame::operator=(&var_40, &var_118);
00453ece              class CTransition* eax_8 = CTransition::makeTransition();
00453ece              
00453ed9              if (eax_8 != 0)
00453ed9              {
00453eea                  CTransition::init_object(eax_8, this->player, 0x5c);
00453efd                  CTransition::init_sphere(eax_8, 1, &viewer_sphere, 1f);
00453f19                  CTransition::init_path(eax_8, cell_1, &var_d8, &var_48);
00453f19                  
00453f27                  if (CTransition::find_valid_position(eax_8) != 0)
00453f27                  {
00453f33                      SmartBox::set_viewer(this, &eax_8->sphere_path.curr_pos, 0);
00453f3f                      this->viewer_cell = eax_8->sphere_path.curr_cell;
00453f42                      CTransition::cleanupTransition(eax_8);
00453f54                      return;
00453f27                  }
00453f27                  
00453f67                  class CObjCell* var_170 = nullptr;
00453f67                  
00453f75                  if (CPhysicsObj::AdjustPosition(&var_120, &viewer_sphere, &var_170, 0, 1) != 0)
00453f75                  {
00453f7f                      SmartBox::set_viewer(this, &var_120, 0);
00453f89                      this->viewer_cell = var_170;
00453f8c                      CTransition::cleanupTransition(eax_8);
00453f9e                      return;
00453f75                  }
00453f75                  
00453fad                  SmartBox::set_viewer(this, &this->player->m_position, 1);
00453fb3                  this->viewer_cell = nullptr;
00453fb6                  CTransition::cleanupTransition(eax_8);
00453ed9              }
00453d4a          }
00453cf4      }
00453ce0  }

00453fc9                             90 90 90 90 90 90 90                                                           .......

00453fd0  void __thiscall SmartBox::HandleReceivedPosition(class SmartBox* this, class CPhysicsObj* arg2, class Position const* arg3, uint32_t arg4, int32_t arg5, class AC1Legacy::Vector3 const* arg6, uint16_t arg7, uint16_t arg8, uint16_t arg9)

00453fd0  {
00453fd8      int32_t ebp;
00453fd8      int32_t var_5c = ebp;
00453fe3      uint32_t objcell_id = arg3->objcell_id;
00453fec      int32_t var_48 = 0x796910;
00453ff4      void var_40;
00453ff4      Frame::operator=(&var_40, &arg3->frame);
00453ff9      class CPhysicsObj* player = this->player;
00453ff9      
0045400c      if ((arg2 == player && CPhysicsObj::newer_event(player, FORCE_POSITION_TS, arg9) != 0))
0045400c      {
00454025          class CPhysicsObj* player_1 = this->player;
0045402b          ebp = player_1->update_times[4];
0045403a          int32_t eax_5;
0045403a          int32_t edx_3;
0045403a          edx_3 = HIGHD(((int64_t)(((uint32_t)ebp) - ((uint32_t)arg8))));
0045403a          eax_5 = LOWD(((int64_t)(((uint32_t)ebp) - ((uint32_t)arg8))));
0045403d          int32_t eax_7 = ((eax_5 ^ edx_3) - edx_3);
00454044          bool c_1;
00454044          
00454044          if (eax_7 > 0x7fff)
0045404b              c_1 = ebp < arg8;
00454044          else
00454046              c_1 = arg8 < ebp;
00454046          
00454054          if (-((eax_7 - eax_7)) == 0)
00454054          {
00454056              CPhysicsObj::get_heading(player_1);
00454068              long double x87_r0;
00454068              Frame::set_heading(&var_40, ((float)x87_r0));
00454074              SmartBox::BlipPlayer(this, &var_48);
00454079              this->player->update_times[0] = arg7;
0045408b              class CommandInterpreter* cmdinterp = this->cmdinterp;
00454091              cmdinterp->vtable->SendPositionEvent(cmdinterp);
0045409d              return;
00454054          }
0045400c      }
0045400c      
004540a4      ebp = arg2->update_times[0];
004540a4      
004540b7      if (CPhysicsObj::newer_event(arg2, POSITION_TS, arg7) == 0)
004540b7      {
00454281          class CPhysicsObj* esi;
00454281          esi = arg2->update_times[4];
00454290          int32_t eax_37;
00454290          int32_t edx_12;
00454290          edx_12 = HIGHD(((int64_t)(((uint32_t)arg8) - ((uint32_t)esi))));
00454290          eax_37 = LOWD(((int64_t)(((uint32_t)arg8) - ((uint32_t)esi))));
00454293          int32_t eax_39 = ((eax_37 ^ edx_12) - edx_12);
0045429a          bool c_4;
0045429a          
0045429a          if (eax_39 > 0x7fff)
004542a1              c_4 = arg8 < esi;
0045429a          else
0045429c              c_4 = esi < arg8;
0045429c          
004542aa          if (-((eax_39 - eax_39)) != 0)
004542ac              error_count += 1;
004542ac          
004542aa          return;
004540b7      }
004540b7      
004540bd      class CPhysicsObj* ecx_4;
004540bd      ecx_4 = arg2->update_times[4];
004540cc      int32_t eax_16;
004540cc      int32_t edx_7;
004540cc      edx_7 = HIGHD(((int64_t)(((uint32_t)ecx_4) - ((uint32_t)arg8))));
004540cc      eax_16 = LOWD(((int64_t)(((uint32_t)ecx_4) - ((uint32_t)arg8))));
004540cf      int32_t eax_18 = ((eax_16 ^ edx_7) - edx_7);
004540d6      bool c_2;
004540d6      
004540d6      if (eax_18 > 0x7fff)
004540dd          c_2 = ecx_4 < arg8;
004540d6      else
004540d8          c_2 = arg8 < ecx_4;
004540d8      
004540e6      if (-((eax_18 - eax_18)) != 0)
004540e6      {
004540e9          arg2->update_times[0] = ebp;
004540f6          return;
004540e6      }
004540e6      
004540f9      class CPhysicsObj* parent = arg2->parent;
004540f9      
00454109      if ((parent != 0 && parent->id != this->player_id))
00454109      {
00454115          class CWeenieObject* eax_22 = CObjectMaint::GetWeenieObject(this->m_pObjMaint, arg2->id);
00454115          
0045411c          if (eax_22 != 0)
0045411e              eax_22->vtable->SetParentedState(eax_22, 0);
00454109      }
00454109      
00454129      CPhysicsObj::unset_parent(arg2);
00454129      
00454137      if (CPhysicsObj::HasAnims(arg2) == 0)
00454142          CPhysicsObj::SetPlacementFrame(arg2, arg4, 1);
00454142      
0045414d      if (arg2 != this->player)
0045414d      {
00454254          if (CPhysicsObj::MoveOrTeleport(arg2, &var_48, arg8, arg5, arg6) != 0)
00454254          {
00454258              int32_t ecx_26;
00454258              long double st0_6;
00454258              ecx_26 = CPhysicsObj::GetMaxConstraintDistance(arg2);
0045425d              int32_t var_68_14 = ecx_26;
00454263              int32_t ecx_28;
00454263              long double st0_7;
00454263              ecx_28 = CPhysicsObj::GetStartConstraintDistance(arg2);
00454268              int32_t var_6c_9 = ecx_28;
00454272              CPhysicsObj::ConstrainTo(arg2, &arg2->m_position, ((float)st0_7), ((float)st0_6));
00454254          }
00454254          
00454254          return;
0045414d      }
0045414d      
0045415f      if (CPhysicsObj::newer_event(arg2, TELEPORT_TS, arg8) != 0)
0045415f      {
00454168          SmartBox::TeleportPlayer(this, &var_48);
0045416f          int32_t ecx_14;
0045416f          long double st0_1;
0045416f          ecx_14 = CPhysicsObj::GetMaxConstraintDistance(arg2);
00454174          int32_t var_68_8 = ecx_14;
0045417a          int32_t ecx_16;
0045417a          long double st0_2;
0045417a          ecx_16 = CPhysicsObj::GetStartConstraintDistance(arg2);
0045417f          int32_t var_6c_2 = ecx_16;
0045418a          CPhysicsObj::ConstrainTo(arg2, &var_48, ((float)st0_2), ((float)st0_1));
0045418f          class CPhysicsObj* player_2 = this->player;
0045419c          int32_t var_54 = 0;
004541a4          int32_t var_50 = 0;
004541ac          int32_t var_4c = 0;
004541b4          CPhysicsObj::set_velocity(player_2, &var_54, 1);
004541c0          return;
0045415f      }
0045415f      
004541c9      int32_t ecx_19;
004541c9      long double st0_4;
004541c9      ecx_19 = CPhysicsObj::GetMaxConstraintDistance(this->player);
004541ce      int32_t var_68_10 = ecx_19;
004541d8      int32_t ecx_21;
004541d8      long double st0_5;
004541d8      ecx_21 = CPhysicsObj::GetStartConstraintDistance(this->player);
004541dd      int32_t var_6c_5 = ecx_21;
004541ec      CPhysicsObj::ConstrainTo(this->player, &var_48, ((float)st0_5), ((float)st0_4));
004541f1      class CommandInterpreter* cmdinterp_1 = this->cmdinterp;
004541f1      
0045420a      if ((cmdinterp_1->vtable->UsePositionFromServer(cmdinterp_1) != 0 && arg5 != 0))
0045420a      {
00454210          class CommandInterpreter* cmdinterp_2 = this->cmdinterp;
00454218          uint32_t eax_29 = cmdinterp_2->vtable->GetAutonomyLevel(cmdinterp_2);
0045421e          int32_t eax_30 = -(eax_29);
0045422c          CPhysicsObj::InterpolateTo(arg2, &var_48, -((eax_30 - eax_30)));
0045420a      }
00453fd0  }

004542bc                                                                                      90 90 90 90                              ....

004542c0  enum NetBlobProcessedStatus __thiscall SmartBox::UnpackPositionEvent(class SmartBox* this, uint32_t arg2, void** arg3, uint32_t arg4)

004542c0  {
004542cc      void var_68;
004542cc      PositionPack::PositionPack(&var_68);
004542e2      PositionPack::UnPack(&var_68, arg3, arg4);
004542f2      class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(this->m_pObjMaint, arg2);
004542f2      
004542fb      if (eax_1 != 0)
004542fb      {
004542fd          uint16_t ecx_4 = eax_1->update_times[8];
00454304          int16_t var_64;
00454304          int32_t esi;
00454304          esi = var_64;
00454311          int32_t eax_4;
00454311          int32_t edx_2;
00454311          edx_2 = HIGHD(((int64_t)(((uint32_t)esi) - ((uint32_t)ecx_4))));
00454311          eax_4 = LOWD(((int64_t)(((uint32_t)esi) - ((uint32_t)ecx_4))));
00454314          int32_t eax_6 = ((eax_4 ^ edx_2) - edx_2);
0045431b          bool c_1;
0045431b          
0045431b          if (eax_6 > 0x7fff)
00454322              c_1 = esi < ecx_4;
0045431b          else
0045431d              c_1 = ecx_4 < esi;
0045431d          
0045432b          if (-((eax_6 - eax_6)) == 0)
0045432b          {
00454330              if (ecx_4 != esi)
00454376                  return 2;
00454376              
00454358              uint16_t var_62;
00454358              uint16_t var_60;
00454358              int32_t var_5e;
00454358              void var_14;
00454358              uint32_t var_8;
00454358              int32_t var_4;
00454358              SmartBox::HandleReceivedPosition(this, eax_1, &*(uint32_t*)((char*)var_5e)[2], var_8, var_4, &var_14, var_62, var_60, ((int16_t)var_5e));
00454368              return 1;
0045432b          }
004542fb      }
004542fb      
00454384      return 4;
004542c0  }

00454387                       90 90 90 90 90 90 90 90 90                                                         .........

00454390  void __fastcall CreatureMode::CreatureMode(class CreatureMode* this)

00454390  {
00454396      __builtin_memset(this, 0, 0x1c);
004543a7      this->creature_view_frame.qw = 0x3f800000;
004543a7      this->creature_view_frame.qx = 0f;
004543a7      this->creature_view_frame.qy = 0f;
004543a7      this->creature_view_frame.qz = 0f;
004543a7      this->creature_view_frame.m_fOrigin.x = 0;
004543a7      this->creature_view_frame.m_fOrigin.y = 0f;
004543a7      this->creature_view_frame.m_fOrigin.z = 0f;
004543c5      Frame::cache(&this->creature_view_frame);
004543cf      __builtin_memcpy(&this->m_clrAmbientLight, "\x9a\x99\x99\x3e\x9a\x99\x99\x3e\x9a\x99\x99\x3e\xdb\x0f\x49\x3f\x00", 0x11);
004543db      this->m_bUseSharpMode = 0;
00454390  }

004543ea                                90 90 90 90 90 90                                                            ......

004543f0  void __fastcall CreatureMode::RemoveAllObjects(class CreatureMode* this)

004543f0  {
004543f8      if (this->creature_cell != 0)
004543f8      {
004543fe          int32_t i = 0;
004543fe          
00454402          if (this->creature_mode_objects.m_num > 0)
00454402          {
00454418              do
00454418              {
0045440d                  CPhysicsObj::RemoveObjectFromSingleCell(this->creature_mode_objects.m_data[i], this->creature_cell);
00454415                  i += 1;
00454418              } while (i < this->creature_mode_objects.m_num);
00454402          }
00454402          
00454422          CPartCell::remove_shadows(&this->creature_cell->vtable, 1);
004543f8      }
004543f8      
0045442b      /* tailcall */
0045442b      return SmartArray<unsigned long,1>::Reset(this);
004543f0  }


00454430  void __fastcall CreatureMode::RemoveAllLights(class CreatureMode* this)

00454430  {
00454437      int32_t i = 0;
00454437      
0045443b      if (this->creature_mode_lights.m_num > 0)
0045443b      {
00454459          do
00454459          {
00454443              void* eax_2 = this->creature_mode_lights.m_data[i];
00454443              
00454448              if (eax_2 != 0)
0045444b                  operator delete(eax_2);
0045444b              
00454456              i += 1;
00454459          } while (i < this->creature_mode_lights.m_num);
0045443b      }
0045443b      
0045445b      uint32_t m_sizeAndDeallocate = this->creature_mode_lights.m_sizeAndDeallocate;
0045446c      this->creature_mode_lights.m_num = 0;
0045446c      
00454473      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00454473      {
00454479          operator delete[](this->creature_mode_lights.m_data);
00454482          this->creature_mode_lights.m_data = 0;
00454489          this->creature_mode_lights.m_sizeAndDeallocate = 0;
00454491          return;
00454473      }
00454473      
00454497      if (this->creature_mode_lights.m_data != 0)
00454497      {
00454499          int32_t eax_4 = (m_sizeAndDeallocate & 0x7fffffff);
0045449e          int32_t eax_5 = (eax_4 - 1);
0045449e          
0045449f          if ((eax_4 - 1) >= 0)
0045449f          {
004544ad              int32_t temp1_1;
004544ad              
004544ad              do
004544ad              {
004544a1                  temp1_1 = eax_5;
004544a1                  eax_5 -= 1;
004544a2                  this->creature_mode_lights.m_data[(eax_5 + 1)] = 0;
004544ad              } while ((temp1_1 - 1) >= 0);
0045449f          }
00454497      }
00454430  }

004544b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004544c0  uint8_t __thiscall CreatureMode::SetLightDirection(class CreatureMode* this, uint32_t arg2, class AC1Legacy::Vector3 const* arg3)

004544c0  {
004544c7      if (arg2 >= this->creature_mode_lights.m_num)
004544c7      {
004544de          uint32_t eax_1;
004544de          eax_1 = 0;
004544e0          return 0;
004544c7      }
004544c7      
004544d4      int32_t eax;
004544d4      int80_t st0;
004544d4      eax = LIGHTINFO::SetDirection(this->creature_mode_lights.m_data[arg2], arg3);
004544d9      eax = 1;
004544db      return 1;
004544c0  }

004544e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004544f0  class TResult __thiscall InterfacePtr<class CObjectMaint>::_QueryInterface(InterfacePtr<class CObjectMaint>* this, class InterfacePtr<class Interface> arg2)

004544f0  {
004544f0      InterfacePtr<class CObjectMaint>* this_1 = this;
004544f5      int32_t* edi = arg_8;
004544ff      int32_t ebx;
004544ff      
004544ff      if (edi == 0)
004544ff      {
00454562          int32_t* ecx_4 = *(uint32_t*)this;
00454562          
00454566          if (ecx_4 != 0)
00454566          {
00454568              *(uint32_t*)this = 0;
0045456c              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
0045456f              *(uint32_t*)((char*)this + 4) = 0;
00454566          }
00454566          
00454572          ebx = 0x80004002;
004544ff      }
004544ff      else
004544ff      {
00454501          int32_t eax_1 = *(uint32_t*)edi;
00454514          arg_8 = nullptr;
0045451b          ebx = *(uint32_t*)*(uint32_t*)(eax_1 + 0xc)(&this_1, 0x79b5e8, &arg_8);
0045451f          int32_t* ecx_1 = *(uint32_t*)this;
0045451f          
00454521          if (ebx < 0)
00454521          {
00454525              if (ecx_1 != 0)
00454529                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
00454529              
0045452c              *(uint32_t*)this = 0;
0045452e              *(uint32_t*)((char*)this + 4) = 0;
00454531              int32_t* esi_1 = arg2;
00454535              *(uint32_t*)esi_1 = ebx;
0045453b              *(uint32_t*)(*(uint32_t*)edi + 0x14)();
00454545              return esi_1;
00454521          }
00454521          
0045454a          int32_t* ebp_1 = arg_8;
0045454a          
0045454e          if (ecx_1 != 0)
00454552              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
00454552          
00454555          *(uint32_t*)this = ebp_1;
00454557          *(uint32_t*)((char*)this + 4) = 0;
004544ff      }
004544ff      
00454579      int32_t* esi_2 = arg2;
0045457d      *(uint32_t*)esi_2 = ebx;
0045457d      
0045457f      if (edi != 0)
00454585          *(uint32_t*)(*(uint32_t*)edi + 0x14)();
00454585      
0045458f      return esi_2;
004544f0  }

00454592                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004545a0  void __fastcall SmartBox::SmartBox(class SmartBox* this, class NIList<NetBlob *>* arg2)

004545a0  {
004545aa      this->vtable = 0x79b76c;
004545b0      this->testMode = 0;
004545b6      this->viewer.objcell_id = 0;
004545bf      this->viewer.vtable = 0x796910;
004545b3      this->viewer.frame.qw = 0x3f800000;
004545b3      this->viewer.frame.qx = 0f;
004545b3      this->viewer.frame.qy = 0f;
004545b3      this->viewer.frame.qz = 0f;
004545b3      this->viewer.frame.m_fOrigin.x = 0;
004545b3      this->viewer.frame.m_fOrigin.y = 0f;
004545b3      this->viewer.frame.m_fOrigin.z = 0f;
004545da      Frame::cache(&this->viewer.frame);
004545df      this->viewer_cell = nullptr;
004545e2      this->head_index = 0x10;
004545ec      this->viewer_sought_position.vtable = 0x796910;
004545ef      this->viewer_sought_position.objcell_id = 0;
004545e9      this->viewer_sought_position.frame.qw = 0x3f800000;
004545e9      this->viewer_sought_position.frame.qx = 0f;
004545e9      this->viewer_sought_position.frame.qy = 0f;
004545e9      this->viewer_sought_position.frame.qz = 0f;
004545e9      this->viewer_sought_position.frame.m_fOrigin.x = 0;
004545e9      this->viewer_sought_position.frame.m_fOrigin.y = 0f;
004545e9      this->viewer_sought_position.frame.m_fOrigin.z = 0f;
0045460a      Frame::cache(&this->viewer_sought_position.frame);
00454613      this->in_queue = arg2;
00454619      __builtin_memset(&this->camera_manager, 0, 0x20);
00454649      this->m_fGameFOV = 1.57079637f;
00454653      this->m_fViewDistFOV = 0f;
00454659      this->m_bUseViewDistance = 0;
0045465f      this->game_ambient_level = 0f;
00454665      __builtin_memset(&this->game_degrades_disabled, 0, 0x14);
00454683      __builtin_memset(&this->netblob_list, 0, 0x2c);
004546c7      viewer_sphere.center.x = 0;
004546da      int32_t var_4c = 0;
004546de      int32_t var_48 = 0;
004546e2      int32_t var_44 = 0;
004546e6      viewer_sphere.center.y = 0f;
004546ec      viewer_sphere.center.z = 0f;
004546f1      viewer_sphere.radius = 0.300000012f;
004546fb      void* var_50;
004546fb      PStringBase<char>::PStringBase<char>(&var_50, "The intensity of the player ligh…");
00454709      PStringBase<char>::PStringBase<char>(&arg2, "SmartBox.ViewerLightIntensity");
00454723      GlobalRegistry::RegisterVariableInternal(&SmartBox::s_fViewerLightIntensity, GRVDataType_Float32, &arg2, &var_50, nullptr, 0, nullptr, nullptr);
00454735      void* __offset(NIList<NetBlob *>, -0x14) edi_1 = ((char*)arg2 - 0x14);
00454735      
00454747      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0045474f          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0045474f      
00454755      int32_t* edi_3 = ((char*)var_50 - 0x14);
00454755      
00454764      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
0045476c          **(uint32_t**)edi_3(1);
0045476c      
00454777      PStringBase<char>::PStringBase<char>(&var_50, "The falloff distance of the play…");
00454785      PStringBase<char>::PStringBase<char>(&arg2, "SmartBox.ViewerLightFalloff");
0045479f      GlobalRegistry::RegisterVariableInternal(&SmartBox::s_fViewerLightFalloff, GRVDataType_Float32, &arg2, &var_50, nullptr, 0, nullptr, nullptr);
004547ab      void* __offset(NIList<NetBlob *>, -0x14) edi_5 = ((char*)arg2 - 0x14);
004547ab      
004547bd      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
004547c5          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
004547c5      
004547cb      void* edi_7 = ((char*)var_50 - 0x14);
004547cb      
004547da      if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
004547e2          **(uint32_t**)edi_7(1);
004547e2      
004547e8      viewer_light.type = 0;
004547ee      int32_t var_40 = 0x3f800000;
004547f6      int32_t var_3c = 0;
004547fe      int32_t var_38 = 0;
00454806      int32_t var_34 = 0;
0045480e      int32_t var_c = 0;
00454816      int32_t var_8 = 0;
0045481e      int32_t var_4 = 0;
00454826      Frame::cache(&var_40);
00454835      Frame::operator=(&viewer_light.offset, &var_40);
00454841      RGBColor::SetColor32(&viewer_light.color, 0xffffffff);
0045484c      float SmartBox::s_fViewerLightFalloff_1 = SmartBox::s_fViewerLightFalloff;
00454857      viewer_light.intensity = SmartBox::s_fViewerLightIntensity;
0045485d      viewer_light.falloff = SmartBox::s_fViewerLightFalloff_1;
00454863      viewer_light.cone_angle = 360f;
004545a0  }

00454874                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00454880  void __fastcall SmartBox::~SmartBox(class SmartBox* this)

00454880  {
00454880      class SmartBox* this_1 = this;
00454889      this->vtable = 0x79b76c;
0045488f      SmartBox::Reset(this, 1);
0045489d      PStringBase<char>::PStringBase<char>(&this_1, "SmartBox.ViewerLightIntensity");
004548a7      GlobalRegistry::UnregisterVariable(&this_1);
004548b6      void* __offset(SmartBox, -0x14) edi_1 = ((char*)this_1 - 0x14);
004548b6      
004548ca      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
004548d2          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
004548d2      
004548dd      PStringBase<char>::PStringBase<char>(&this_1, "SmartBox.ViewerLightFalloff");
004548e7      GlobalRegistry::UnregisterVariable(&this_1);
004548f0      void* __offset(SmartBox, -0x14) edi_3 = ((char*)this_1 - 0x14);
004548f0      
00454902      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0045490a          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0045490a      
0045490c      class CameraManager* camera_manager = this->camera_manager;
0045490c      
00454914      if (camera_manager != 0)
00454914      {
00454916          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00454916          
0045491e          if (ICIDM::s_cidm_1 != 0)
00454920              ICIDM::s_cidm_1->vtable->UnregisterInputHandler(ICIDM::s_cidm_1, camera_manager, 4);
00454920          
00454928          class CameraManager* camera_manager_1 = this->camera_manager;
00454928          
00454930          if (camera_manager_1 != 0)
00454932              camera_manager_1->vtable->__vecDelDtor(&camera_manager_1->vtable, 1);
00454932          
0045493b          this->camera_manager = nullptr;
00454914      }
00454914      
00454941      class CellManager* cell_manager = this->cell_manager;
00454941      
00454949      if (cell_manager != 0)
00454949      {
0045494b          cell_manager->ambient_sounds = nullptr;
0045494e          class CellManager* cell_manager_1 = this->cell_manager;
0045494e          
00454956          if (cell_manager_1 != 0)
00454956          {
0045495a              CellManager::~CellManager(cell_manager_1);
00454960              operator delete(cell_manager_1);
00454956          }
00454956          
00454968          this->cell_manager = nullptr;
00454949      }
00454949      
0045496e      class CommandInterpreter* cmdinterp = this->cmdinterp;
0045496e      
00454976      if (cmdinterp != 0)
00454976      {
00454978          cmdinterp->vtable->SetSmartBox(cmdinterp, nullptr);
0045497e          class CommandInterpreter* cmdinterp_1 = this->cmdinterp;
0045497e          
00454986          if (cmdinterp_1 != 0)
00454988              cmdinterp_1->vtable->__vecDelDtor(cmdinterp_1, 1);
00454988          
0045498e          this->cmdinterp = nullptr;
00454976      }
00454976      
00454995      CObjCell::SetObjectMaintainer(nullptr);
0045499b      CPhysicsObj::SetObjectMaintainer(nullptr);
004549a0      CWeenieObject::objMaint = nullptr;
004549a6      CObjCell::landscape = nullptr;
004549ac      class Ambient* ambient_sounds = this->ambient_sounds;
004549ac      
004549b7      if (ambient_sounds != 0)
004549b7      {
004549b9          Ambient::FlushSoundTables(ambient_sounds);
004549be          class Ambient* ambient_sounds_1 = this->ambient_sounds;
004549be          
004549c6          if (ambient_sounds_1 != 0)
004549c6          {
004549ca              Ambient::~Ambient(ambient_sounds_1);
004549d0              operator delete(ambient_sounds_1);
004549c6          }
004549c6          
004549d8          this->ambient_sounds = nullptr;
004549b7      }
004549b7      
004549de      class LScape* lscape = this->lscape;
004549de      
004549e6      if (lscape != 0)
004549e6      {
004549ea          LScape::~LScape(lscape);
004549f0          operator delete(lscape);
004549f8          this->lscape = nullptr;
004549e6      }
004549e6      
004549fe      class CPhysics* physics = this->physics;
004549fe      
00454a06      if (physics != 0)
00454a06      {
00454a0a          CPhysics::~CPhysics(physics);
00454a10          operator delete(physics);
00454a18          this->physics = nullptr;
00454a06      }
00454a06      
00454a1e      class CObjectMaint* m_pObjMaint = this->m_pObjMaint;
00454a1e      
00454a26      if (m_pObjMaint != 0)
00454a26      {
00454a28          m_pObjMaint->vtable->Release(m_pObjMaint);
00454a2d          this->m_pObjMaint = nullptr;
00454a26      }
00454a26      
00454a33      CRegionDesc::RemoveCurrentRegion();
00454a38      class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
00454a38      
00454a40      if (GameTime::current_game_time_1 != 0)
00454a40      {
00454a44          GameTime::~GameTime(GameTime::current_game_time_1);
00454a4a          operator delete(GameTime::current_game_time_1);
00454a52          GameTime::current_game_time = nullptr;
00454a40      }
00454a40      
00454a5e      this->viewer_sought_position.vtable = 0x79285c;
00454a61      this->viewer.vtable = 0x79285c;
00454880  }

00454a69                             90 90 90 90 90 90 90                                                           .......

00454a70  void __fastcall SmartBox::ProcessNetBlobs(class SmartBox* this)

00454a70  {
00454a70      int32_t edi;
00454a70      int32_t var_4 = edi;
00454a70      int32_t* esp_10 = &var_4;
00454a73      class NIList<NetBlob *>* netblob_list = this->netblob_list;
00454a73      
00454a7b      if (netblob_list != 0)
00454a7b      {
00454a81          bool cond:0_1 = netblob_list->head_ == 0;
00454a84          int32_t esi;
00454a84          int32_t var_8 = esi;
00454a84          int32_t* esp_1 = &var_8;
00454a84          
00454a85          if (!(cond:0_1))
00454a85          {
00454a87              int32_t ebp;
00454a87              int32_t var_c = ebp;
00454a87              int32_t* esp_2 = &var_c;
00454a87              
00454af1              do
00454af1              {
00454a90                  class NIList<NetBlob *>* netblob_list_1 = this->netblob_list;
00454a96                  class NIListElement<NetBlob *>* head_ = netblob_list_1->head_;
00454a9a                  class NetBlob* data_;
00454a9a                  
00454a9a                  if (head_ != 0)
00454a9a                  {
00454aa0                      class NIListElement<NetBlob *>* next_ = head_->next_;
00454aa5                      netblob_list_1->head_ = next_;
00454aa5                      
00454aa7                      if (next_ == 0)
00454aa9                          netblob_list_1->tail_ = next_;
00454aa9                      
00454aac                      data_ = head_->data_;
00454aae                      *(uint32_t*)((char*)esp_2 - 4) = head_;
00454aaf                      operator delete();
00454a9a                  }
00454a9a                  else
00454a9c                      data_ = nullptr;
00454a9c                  
00454ab7                  struct SmartBox::VTable* vtable = this->vtable;
00454ab9                  *(uint32_t*)((char*)esp_2 - 4) = data_;
00454abf                  bool cond:2_1 = vtable->IsReadyToDispatchEvent() != 0;
00454ac3                  *(uint32_t*)((char*)esp_2 - 4) = data_;
00454ac3                  void* esp_6 = ((char*)esp_2 - 4);
00454ac3                  
00454ac4                  if (cond:2_1)
00454acd                      this->vtable->DispatchSmartBoxEvent();
00454ac4                  else
00454ac4                  {
00454ac6                      SmartBox::QueueNetBlob(this);
00454ac6                      esp_6 += 4;
00454ac4                  }
00454ac4                  
00454ad5                  *(uint32_t*)((char*)esp_6 - 4) = &data_->m_cRef;
00454ad6                  esp_2 = esp_6;
00454ad6                  
00454ade                  if ((InterlockedDecrement() == 0 && data_ != 0))
00454ade                  {
00454ae0                      struct NetBlob::VTable* vtable_1 = data_->vtable;
00454ae2                      *(uint32_t*)((char*)esp_2 - 4) = 1;
00454ae6                      vtable_1->__vecDelDtor();
00454ade                  }
00454af1              } while (this->netblob_list->head_ != 0);
00454af1              
00454af3              *(uint32_t*)esp_2;
00454af3              esp_1 = &esp_2[1];
00454a85          }
00454a85          
00454af4          class NIList<NetBlob *>* netblob_list_2 = this->netblob_list;
00454af4          
00454afc          if (netblob_list_2 != 0)
00454afc          {
00454b00              NIList<NetBlob *>::DeleteContents(netblob_list_2);
00454b05              *(uint32_t*)((char*)esp_1 - 4) = netblob_list_2;
00454b06              operator delete();
00454afc          }
00454afc          
00454b0e          this->netblob_list = nullptr;
00454b18          *(uint32_t*)esp_1;
00454b18          esp_10 = &esp_1[1];
00454a7b      }
00454a7b      
00454b19      *(uint32_t*)esp_10;
00454a70  }

00454b1b                                                                                   90 90 90 90 90                             .....

00454b20  void __stdcall SmartBox::ProcessObjectNetBlobs(class SmartBox* this @ ecx, class CPhysicsObj* arg2)

00454b20  {
00454b20      class SmartBox* this_2 = this;
00454b21      int32_t ebp;
00454b21      int32_t var_8 = ebp;
00454b22      int32_t esi;
00454b22      int32_t var_c = esi;
00454b22      int32_t* esp_1 = &var_c;
00454b27      class SmartBox* this_1 = this;
00454b2b      class CWeenieObject* weenie_obj = arg2->weenie_obj;
00454b2b      
00454b35      if (weenie_obj != 0)
00454b37          weenie_obj->vtable->process_netblobs(weenie_obj);
00454b37      
00454b3c      class NIList<NetBlob *>* netblob_list = arg2->netblob_list;
00454b3c      
00454b41      if (netblob_list != 0)
00454b41      {
00454b47          class NIListElement<NetBlob *>* head_ = netblob_list->head_;
00454b49          int32_t ebx;
00454b49          int32_t var_10_1 = ebx;
00454b4a          int32_t edi;
00454b4a          int32_t var_14 = edi;
00454b4a          int32_t* esp_2 = &var_14;
00454b4b          class NetBlob** i = nullptr;
00454b4d          class NetBlob** i_5 = nullptr;
00454b4d          
00454b51          if (head_ != 0)
00454b51          {
00454ba5              do
00454ba5              {
00454b57                  class NIListElement<NetBlob *>* head__1 = netblob_list->head_;
00454b5b                  class NetBlob* data_;
00454b5b                  
00454b5b                  if (head__1 != 0)
00454b5b                  {
00454b61                      class NIListElement<NetBlob *>* next_ = head__1->next_;
00454b66                      netblob_list->head_ = next_;
00454b66                      
00454b68                      if (next_ == 0)
00454b6a                          netblob_list->tail_ = nullptr;
00454b6a                      
00454b6d                      data_ = head__1->data_;
00454b70                      operator delete(head__1);
00454b5b                  }
00454b5b                  else
00454b5d                      data_ = nullptr;
00454b5d                  
00454b78                  int32_t var_18_2 = 8;
00454b7a                  class NetBlob** i_2 = operator new(8);
00454b7f                  esp_2 = &var_14;
00454b7f                  
00454b84                  if (i_2 == 0)
00454b8d                      i_2 = nullptr;
00454b84                  else
00454b84                  {
00454b86                      *(uint32_t*)i_2 = data_;
00454b88                      i_2[1] = 0;
00454b84                  }
00454b84                  
00454b91                  if (i_5 != 0)
00454b97                      i_5[1] = i_2;
00454b91                  else
00454b93                      i = i_2;
00454b93                  
00454b9e                  i_5 = i_2;
00454ba0                  netblob_list = arg2->netblob_list;
00454ba5              } while (netblob_list->head_ != 0);
00454ba5              
00454ba9              while (i != 0)
00454ba9              {
00454bb1                  class NetBlob** i_3 = i;
00454bb3                  i = i[1];
00454bb6                  class NetBlob* esi_2 = *(uint32_t*)i_3;
00454bb8                  *(uint32_t*)((char*)esp_2 - 4) = i_3;
00454bb9                  operator delete();
00454bc2                  int32_t edx_1 = *(uint32_t*)esp_2[4];
00454bc7                  *(uint32_t*)((char*)esp_2 - 4) = esi_2;
00454bcb                  bool cond:2_1 = *(uint32_t*)(edx_1 + 4)() != 0;
00454bcd                  int32_t* ecx_2 = esp_2[4];
00454bd1                  *(uint32_t*)((char*)esp_2 - 4) = esi_2;
00454bd1                  void* esp_7 = ((char*)esp_2 - 4);
00454bd1                  
00454bd2                  if (cond:2_1)
00454bdd                      *(uint32_t*)(*(uint32_t*)ecx_2 + 8)();
00454bd2                  else
00454bd2                  {
00454bd4                      SmartBox::QueueNetBlob(ecx_2);
00454bd4                      esp_7 += 4;
00454bd2                  }
00454bd2                  
00454be3                  *(uint32_t*)((char*)esp_7 - 4) = &esi_2->m_cRef;
00454be4                  esp_2 = esp_7;
00454be4                  
00454bec                  if ((InterlockedDecrement() == 0 && esi_2 != 0))
00454bec                  {
00454bee                      struct NetBlob::VTable* vtable = esi_2->vtable;
00454bf0                      *(uint32_t*)((char*)esp_2 - 4) = 1;
00454bf4                      vtable->__vecDelDtor();
00454bec                  }
00454ba9              }
00454b51          }
00454b51          
00454bfa          class NetBlob** i_1 = i;
00454bfe          *(uint32_t*)esp_2;
00454bfe          esp_2[1];
00454bff          esp_1 = &esp_2[2];
00454bff          
00454c00          if (i != 0)
00454c00          {
00454c12              do
00454c12              {
00454c02                  class NetBlob** i_4 = i_1;
00454c04                  i_1 = i_1[1];
00454c07                  *(uint32_t*)((char*)esp_1 - 4) = i_4;
00454c08                  operator delete();
00454c12              } while (i_1 != 0);
00454c00          }
00454b41      }
00454b41      
00454c14      *(uint32_t*)esp_1;
00454c14      esp_1[1];
00454c14      esp_1[2];
00454b20  }

00454c1a                                                                                90 90 90 90 90 90                            ......

00454c20  void __fastcall SmartBox::DrawNoBlit(class SmartBox* this)

00454c20  {
00454c23      SmartBox::SetNormalMode(this);
00454c30      class CPhysicsObj* eax;
00454c30      
00454c30      if (this->player != 0)
00454c30      {
00454c34          SmartBox::update_viewer(this);
00454c3e          int80_t st0_1;
00454c3e          
00454c3e          if (this->viewer_cell != 0)
00454c42              eax = SmartBox::RenderNormalMode(this);
00454c30      }
00454c30      
00454c47      eax = SmartBox::lookingForObject;
00454c47      
00454c4e      if (eax != 0)
00454c4e      {
00454c50          int32_t eax_1 = Render::GetMouseSelectionPartIndex();
00454c57          uint32_t eax_2 = Render::GetMouseSelectionObjectID();
00454c5d          SmartBox::click_object_id = eax_2;
00454c62          SmartBox::click_object_index = eax_1;
00454c68          ECM_UI::SendNotice_SmartBoxObjectFound(eax_2);
00454c70          SmartBox::lookingForObject = 0;
00454c4e      }
00454c4e      
00454c78      /* tailcall */
00454c78      return Render::clear_selection_cursor();
00454c20  }

00454c7d                                                                                         90 90 90                               ...

00454c80  enum NetBlobProcessedStatus __thiscall SmartBox::HandleCreateObject(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, class VisualDesc const* arg4, class PhysicsDesc const* arg5, class WeenieDesc const* arg6, int32_t arg7)

00454c80  {
00454c97      class CPhysicsObj* var_b0 = nullptr;
00454c9b      class CPhysicsObj* var_bc = nullptr;
00454c9f      class CWeenieObject* var_b8 = nullptr;
00454ca3      uint32_t eax = PhysicsDesc::get_parent_id(arg5);
00454cac      int32_t result;
00454cac      
00454cac      if (eax != 0)
00454cac      {
00454cb5          class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(this->m_pObjMaint, eax);
00454cbc          var_b0 = eax_1;
00454cbc          
00454cc0          if (eax_1 == 0)
00454cc0          {
00454cd1              CObjectMaint::QueueBlobForObject(this->m_pObjMaint, eax, arg2);
00454ce5              return result;
00454cc0          }
00454cac      }
00454cac      
00454d07      int32_t __return_2;
00454d07      class CPhysicsObj* eax_5;
00454d07      
00454d07      if (CObjectMaint::GetObjectA(this->m_pObjMaint, arg3, &var_bc, &var_b8) == 0)
00454d07      {
00454fa2      label_454fa2:
00454fa2          eax_5 = var_bc;
00454fa6      label_454fa6:
00454fa6          
00454fb0          if ((eax_5 == 0 && var_b8 == 0))
00454fa8              goto label_454fcc;
00454fa8          
00454fb2      label_454fb2:
00454fb2          class CObjectMaint* m_pObjMaint_1 = this->m_pObjMaint;
00454fbb          uint32_t edi;
00454fb8          m_pObjMaint_1->vtable->RecvNotice_SetSelectedItem(m_pObjMaint_1, arg3, edi);
00454fcc      label_454fcc:
00454fcc          class CObjectMaint* m_pObjMaint_2 = this->m_pObjMaint;
00454fd8          class CPhysicsObj* eax_39 = m_pObjMaint_2->vtable->CreateObject(m_pObjMaint_2, arg3, arg4, arg5, arg6);
00454fdd          var_bc = eax_39;
00454fdd          
00454fe1          if (eax_39 == 0)
00454ff2              return result;
00454ff2          
00454ffd          void var_94;
00454ffd          
00454ffd          if (arg3 != this->player_id)
00454ffd          {
004550bd              if (PhysicsDesc::get_parent_id(arg5) == 0)
004550bd              {
004550bf                  uint32_t objcell_id = arg5->pos.objcell_id;
004550ce                  Frame::operator=(&var_94, &arg5->pos.frame);
004550ce                  
004550d9                  if (objcell_id != 0)
004550d9                  {
004550e2                      class Position* eax_46 = PhysicsDesc::get_position(arg5, &__return_2);
004550ec                      CPhysicsObj::enter_world(var_bc, eax_46);
004550d9                  }
004550bd              }
00454ffd          }
00454ffd          else
00454ffd          {
00455003              int32_t eax_41 = PhysicsDesc::get_autonomous_movement(arg5);
00455010              SmartBox::init_player(this, var_bc, eax_41);
00455015              uint32_t objcell_id_2 = arg5->pos.objcell_id;
00455028              int32_t var_48 = 0x796910;
0045502f              uint32_t objcell_id_5 = objcell_id_2;
00455036              void var_40;
00455036              Frame::operator=(&var_40, &arg5->pos.frame);
00455047              CPhysicsObj::store_position(var_bc, &var_48);
0045504c              class CPhysicsObj* player = this->player;
0045504c              
0045505b              if ((player != 0 && player->m_position.objcell_id != 0))
00455069                  CellManager::ChangePosition(this->cell_manager, &player->m_position, 1);
00455069              
0045506e              uint32_t objcell_id_3 = arg5->pos.objcell_id;
00455079              __return_2 = 0x796910;
0045507d              uint32_t objcell_id_4 = objcell_id_3;
00455081              Frame::operator=(&var_94, &arg5->pos.frame);
00455086              class CPhysicsObj* player_1 = this->player;
00455086              
0045508e              if (player_1 != 0)
0045508e              {
00455095                  CPhysicsObj::enter_world(player_1, &__return_2);
004550a3                  SmartBox::PlayerPositionUpdated(this, 1, 3.40282347e+38f);
0045508e              }
0045508e              
004550a8              class CObjectMaint* m_pObjMaint_3 = this->m_pObjMaint;
004550ae              m_pObjMaint_3->vtable->SetPlayerVisualDesc(m_pObjMaint_3, arg4);
00454ffd          }
004550f8          SmartBox::ProcessObjectNetBlobs(this, var_bc);
00454d07      }
00454d07      else
00454d07      {
00454d0d          eax_5 = var_bc;
00454d0d          
00454d13          if (eax_5 == 0)
00454d13          {
00454fb0              if (var_b8 == 0)
00454fb0                  goto label_454fcc;
00454fb0              
00454fb0              goto label_454fb2;
00454d13          }
00454d13          
00454d22          if (arg7 != 0)
00454d22              goto label_454fa6;
00454d22          
00454d28          eax_5 = eax_5->update_times[8];
00454d33          int16_t __return = eax_5;
00454d38          uint16_t eax_6 = PhysicsDesc::get_timestamp(arg5, INSTANCE_TS);
00454d38          
00454d4d          if (CPhysicsObj::is_newer(((int16_t)__return), eax_6) != 0)
00454d4d              goto label_454fa2;
00454d4d          
00454d5c          CPhysicsObj::GetSetupID(var_bc, &__return);
00454d68          void __return_1;
00454d68          PhysicsDesc::get_setup_id(arg5, &__return_1);
00454d71          uint32_t ebp;
00454d71          ebp = var_bc->update_times[8];
00454d71          
00454d84          if (ebp != PhysicsDesc::get_timestamp(arg5, INSTANCE_TS))
00454f9f              return result;
00454f9f          
00454d8e          uint16_t eax_9 = PhysicsDesc::get_timestamp(arg5, OBJDESC_TS);
00454da3          SmartBox::UpdateVisualDesc(this, var_bc, arg4, eax_9);
00454dac          uint16_t eax_11 = PhysicsDesc::get_timestamp(arg5, POSITION_TS);
00454db5          float x;
00454db5          
00454db5          if (eax != 0)
00454db5          {
00454e31              uint32_t eax_17 = EffectInfoRegion::GetStat(arg5);
00454e39              uint32_t eax_18 = PhysicsDesc::get_parent_location_id(arg5);
00454e4b              SmartBox::DoParentEvent(this, var_bc, var_b0, eax_18, eax_17, eax_11);
00454db5          }
00454db5          else
00454db5          {
00454dbb              uint16_t eax_12 = PhysicsDesc::get_timestamp(arg5, TELEPORT_TS);
00454dd2              __return = PhysicsDesc::get_timestamp(arg5, FORCE_POSITION_TS);
00454dd6              PhysicsDesc::get_position(arg5, &__return_2);
00454de1              int32_t var_98;
00454de1              
00454de1              if (var_98 == 0)
00454e29                  SmartBox::DoPickupEvent(this, var_bc, eax_11);
00454de1              else
00454de1              {
00454de6                  float y = arg5->velocity.y;
00454de9                  float z_1 = arg5->velocity.z;
00454dec                  x = arg5->velocity.x;
00454df0                  int16_t edx_2 = ((int16_t)__return);
00454df6                  float y_2 = y;
00454e00                  float z_2 = z_1;
00454e08                  uint32_t eax_15 = EffectInfoRegion::GetStat(arg5);
00454e1a                  SmartBox::HandleReceivedPosition(this, var_bc, &__return_2, eax_15, 1, &x, eax_11, eax_12, edx_2);
00454de1              }
00454db5          }
00454db5          
00454e59          if (DiskConBase::GetSubset(arg5) > 0)
00454e59          {
00454e5d              int32_t eax_20 = PhysicsDesc::get_autonomous_movement(arg5);
00454e67              uint16_t eax_21 = PhysicsDesc::get_timestamp(arg5, SERVER_CONTROLLED_MOVE_TS);
00454e71              uint16_t eax_22 = PhysicsDesc::get_timestamp(arg5, MOVEMENT_TS);
00454e79              uint32_t eax_23 = DiskConBase::GetSubset(arg5);
00454e81              int32_t eax_24 = CInputManager::GetMouseY(arg5);
00454e92              CPhysics::SetObjectMovement(this->physics, var_bc, eax_24, eax_23, eax_22, eax_21, eax_20);
00454e59          }
00454e59          
00454e9b          uint16_t eax_26 = PhysicsDesc::get_timestamp(arg5, STATE_TS);
00454eac          SmartBox::DoSetState(this, var_bc, arg5->state, eax_26);
00454eb5          uint16_t eax_27 = PhysicsDesc::get_timestamp(arg5, VECTOR_TS);
00454ebd          float y_1 = arg5->velocity.y;
00454ec0          x = arg5->velocity.x;
00454ec7          float y_3 = y_1;
00454ed0          float z = arg5->velocity.z;
00454ed7          void __return_3;
00454ed7          class AC1Legacy::Vector3* eax_28 = PhysicsDesc::get_omega(arg5, &__return_3);
00454ee9          result = SmartBox::DoVectorUpdate(this, var_bc, &x, eax_28, eax_27);
00454eee          class CWeenieObject* eax_29 = var_b8;
00454eee          
00454ef4          if (eax_29 != 0)
00454ef4          {
00454efd              class CObjectMaint* m_pObjMaint = this->m_pObjMaint;
00454f03              m_pObjMaint->vtable->SetWeenieDesc(m_pObjMaint, eax_29, arg6, 1);
00454f0c              eax_29 = var_b8;
00454ef4          }
00454ef4          
00454f10          class CPhysicsObj* ecx_39 = var_bc;
00454f14          uint32_t objcell_id_1 = ecx_39->m_position.objcell_id;
00454f14          
00454f19          if (objcell_id_1 != 0)
00454f19          {
00454f23              if (ecx_39->cell == 0)
00454f23              {
00454f50                  CObjectMaint::AddObjectToBeDestroyed(this->m_pObjMaint, ecx_39->id);
00454f64                  return result;
00454f23              }
00454f23              
00454f2e              uint32_t id = ecx_39->id;
00454f2f              CObjectMaint::RemoveObjectToBeDestroyed(this->m_pObjMaint, objcell_id_1);
00454f43              return result;
00454f19          }
00454f19          
00454f69          if (eax_29 == 0)
00454f79              CObjectMaint::AddObjectToBeDestroyed(this->m_pObjMaint, ecx_39->id);
00454d07      }
0045510c      return result;
00454c80  }

0045510f                                               90                                                                 .

00455110  enum NetBlobProcessedStatus __thiscall SmartBox::HandleCreatePlayer(class SmartBox* this, class NetBlob* arg2, uint32_t arg3)

00455110  {
0045511b      if (this->player_id != 0)
00455123          return 3;
00455123      
0045512c      this->player_id = arg3;
00455132      SmartBox::ProcessNetBlobs(this);
00455137      class CommandInterpreter* cmdinterp = this->cmdinterp;
0045513d      cmdinterp->vtable->Enable(cmdinterp);
0045514b      return 1;
00455110  }

0045514e                                            90 90                                                                ..

00455150  void __fastcall CreatureMode::~CreatureMode(class CreatureMode* this)

00455150  {
00455153      CreatureMode::RemoveAllObjects(this);
00455158      class CEnvCell* creature_cell = this->creature_cell;
00455158      
0045515d      if (creature_cell != 0)
0045515f          creature_cell->vtable->__vecDelDtor(creature_cell, 1);
0045515f      
00455166      this->creature_cell = nullptr;
00455166      
0045517c      if ((this->creature_mode_lights.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00455182          operator delete[](this->creature_mode_lights.m_data);
00455182      
00455197      if ((this->creature_mode_objects.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0045519c          operator delete[](this->creature_mode_objects.m_data);
00455150  }

004551a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004551b0  void __thiscall InterfacePtr<CObjectMaint>::InterfacePtr<CObjectMaint>(class InterfacePtr<CObjectMaint>* this, class InterfacePtr<Interface> const* arg2)

004551b0  {
004551b4      int32_t esi;
004551b4      int32_t var_4 = esi;
004551b9      this->m_pInterface = 0;
004551bb      this->m_trStatus.m_val = 0;
004551c0      class Interface* m_pInterface;
004551c0      int32_t* esp_1 = &m_pInterface;
004551c5      m_pInterface = arg2->m_pInterface;
004551c7      int32_t var_8 = 0;
004551ca      class Interface* m_pInterface_1 = m_pInterface;
004551ca      
004551ce      if (m_pInterface_1 != 0)
004551ce      {
004551d0          m_pInterface_1->vtable->AddRef(m_pInterface_1);
004551d4          esp_1 = &var_4;
004551ce      }
004551ce      
004551db      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[4];
004551e5      this->m_trStatus.m_val = InterfacePtr<class CObjectMaint>::_QueryInterface(this)->m_val;
004551ea      *(uint32_t*)esp_1;
004551b0  }

004551ee                                            90 90                                                                ..

004551f0  uint8_t __fastcall SmartBox::InitInternal(class SmartBox* this, class NIList<NetBlob *>* arg2)

004551f0  {
004551fa      class Interface* m_pObjMaint_3;
004551fa      int32_t* var_24 = &m_pObjMaint_3;
004551fd      class Interface* m_pObjMaint = nullptr;
0045520f      m_pObjMaint_3 = nullptr;
0045521a      class TResult __return;
0045521a      InterfaceSystem::CreateInstance(InterfaceSystem::GetInstance(), &__return, &CObjectMaint_Factory_ClassType, &Interface_InterfaceType, m_pObjMaint, var_24);
0045521f      class Interface* m_pObjMaint_2 = m_pObjMaint_3;
00455228      m_pObjMaint = m_pObjMaint_2;
0045522a      int32_t var_24_1 = 0;
0045522d      class Interface* m_pObjMaint_1 = m_pObjMaint;
00455233      int32_t var_8 = 0;
00455237      int32_t var_4 = 0;
00455237      
0045523b      if (m_pObjMaint_1 != 0)
0045523d          m_pObjMaint_1->vtable->AddRef(m_pObjMaint_1);
0045523d      
0045524d      void var_c;
0045524d      InterfacePtr<class CObjectMaint>::_QueryInterface(&var_8, &var_c);
0045524d      class Interface** esp = &m_pObjMaint;
0045524d      
00455254      if (m_pObjMaint_2 != 0)
00455256          m_pObjMaint_2->vtable->Release(m_pObjMaint_2);
00455256      
0045525d      class TResult eax_2 = __return;
0045525d      
00455263      if (eax_2 != 0)
00455263      {
00455269          bool cond:1_1 = this->testMode == 0;
0045526c          this->m_pObjMaint = eax_2;
0045526c          
00455272          if (!(cond:1_1))
00455274              *(uint32_t*)(eax_2 + 0x10) = 0;
00455274          
00455279          void* eax_1 = operator new(0x10);
0045527e          esp = &m_pObjMaint;
0045527e          
00455283          if (eax_1 == 0)
00455296              eax_2 = 0;
00455283          else
00455283          {
0045528f              eax_2 = CPhysics::CPhysics(eax_1, this->m_pObjMaint, this);
0045528f              esp = &m_pObjMaint;
00455283          }
00455283          
0045529a          this->physics = eax_2;
0045529a          
004552a0          if (eax_2 != 0)
004552a0          {
004552a8              void* eax_3 = operator new(0x34);
004552ad              esp = &m_pObjMaint;
004552ad              
004552b2              if (eax_3 == 0)
004552bd                  eax_2 = 0;
004552b2              else
004552b6                  eax_2 = LScape::LScape(eax_3);
004552b6              
004552c1              this->lscape = eax_2;
004552c1              
004552c7              if (eax_2 != 0)
004552c7              {
004552cf                  void* eax_4 = operator new(0x74);
004552d4                  esp = &m_pObjMaint;
004552d4                  
004552d9                  if (eax_4 == 0)
004552e4                      eax_2 = 0;
004552d9                  else
004552dd                      eax_2 = Ambient::Ambient(eax_4);
004552dd                  
004552e8                  this->ambient_sounds = eax_2;
004552e8                  
004552ee                  if (eax_2 != 0)
004552ee                  {
004552f4                      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00455300                      RenderDevice::render_device_1->vtable->SetLandscape(RenderDevice::render_device_1, this->lscape);
0045530d                      CObjCell::SetObjectMaintainer(this->m_pObjMaint);
00455318                      m_pObjMaint = this->m_pObjMaint;
00455319                      CPhysicsObj::SetObjectMaintainer(m_pObjMaint);
00455324                      CWeenieObject::objMaint = this->m_pObjMaint;
0045532f                      class Interface* __saved_edi;
0045532f                      esp = &__saved_edi;
00455332                      CObjCell::landscape = this->lscape;
00455338                      eax_2 = CFactory::MakeCommandInterpreter();
0045533f                      this->cmdinterp = eax_2;
0045533f                      
00455345                      if (eax_2 != 0)
00455345                      {
00455356                          *(uint32_t*)(*(uint32_t*)eax_2 + 0x5c)(SmartBox::smartbox);
00455359                          class CommandInterpreter* cmdinterp = this->cmdinterp;
00455364                          cmdinterp->vtable->SetAutonomyLevel(cmdinterp, command_line_autonomy_level);
0045536f                          void* eax_8 = operator new(0x78);
00455374                          esp = &__saved_edi;
00455374                          
00455379                          if (eax_8 == 0)
00455384                              eax_2 = 0;
00455379                          else
0045537d                              eax_2 = CellManager::CellManager(eax_8);
0045537d                          
00455388                          this->cell_manager = eax_2;
00455388                          
0045538e                          if (eax_2 != 0)
0045538e                          {
00455396                              *(uint32_t*)eax_2 = this->lscape;
004553a4                              uint32_t var_24_6 = 0xc0;
00455398                              this->cell_manager->ambient_sounds = this->ambient_sounds;
004553ac                              void* eax_10 = operator new(var_24_6);
004553b1                              esp = &__saved_edi;
004553b1                              
004553b6                              if (eax_10 == 0)
004553c1                                  eax_2 = 0;
004553b6                              else
004553ba                                  eax_2 = CameraManager::CameraManager(eax_10);
004553ba                              
004553c5                              this->camera_manager = eax_2;
004553c5                              
004553cb                              if (eax_2 != 0)
004553cb                              {
004553cd                                  class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004553cd                                  
004553d5                                  if (ICIDM::s_cidm_1 != 0)
004553d5                                  {
004553e2                                      struct ICIDM::VTable* vtable = ICIDM::s_cidm_1->vtable;
004553e4                                      uint32_t var_24_7 = 4;
004553e6                                      m_pObjMaint = eax_2;
004553e7                                      vtable->RegisterInputHandler(ICIDM::s_cidm_1, m_pObjMaint, var_24_7);
004553ec                                      char result = SmartBox::set_viewer_home(this);
004553f7                                      this->hidden = 1;
00455402                                      return result;
004553d5                                  }
004553cb                              }
0045538e                          }
00455345                      }
004552ee                  }
004552c7              }
004552a0          }
00455263      }
00455263      
004553d7      eax_2.m_val = 0;
004553d9      *(uint32_t*)esp;
004553d9      esp[1];
004553d9      esp[2];
004553df      return 0;
004551f0  }

00455405                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00455410  void __fastcall SmartBox::UseTime(class SmartBox* this)

00455410  {
00455410      int32_t esi;
00455410      int32_t var_4 = esi;
00455410      int32_t* esp_1 = &var_4;
00455413      class CellManager* cell_manager = this->cell_manager;
0045541e      class Position* var_c;
0045541e      
0045541e      if (cell_manager->blocking_for_cells == 0)
0045541e      {
0045542f          if ((cell_manager->all_cells_available == 0 && CellManager::CheckPrefetchStatus(cell_manager) != 0))
00455440              CellManager::UpdateLoadPoint(this->cell_manager);
00455440          
00455445          class CPhysicsObj* player = this->player;
00455445          
00455454          if ((player != 0 && player->m_position.objcell_id != 0))
00455454          {
00455456              class CellManager* cell_manager_1 = this->cell_manager;
0045545c              int32_t var_8_1 = 0;
00455461              var_c = &player->m_position;
00455462              CellManager::ChangePosition(cell_manager_1, var_c, var_8_1);
00455462              esp_1 = &var_4;
00455454          }
00455454          
00455483          if ((this->player != 0 && (this->waiting_for_teleport == 0 && this->position_update_complete == 0)))
00455483          {
0045548a              this->position_update_complete = 1;
00455490              this->has_been_teleported = 1;
00455483          }
00455483          
0045549c          CObjectMaint::UseTime(this->m_pObjMaint);
004554a7          CPhysics::UseTime(this->physics);
004554ac          class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
004554ac          
004554b4          if (GameTime::current_game_time_1 != 0)
004554b4          {
004554b6              GameTime::UseTime(GameTime::current_game_time_1);
004554c1              LScape::UseTime(this->lscape);
004554b4          }
004554b4          
004554cc          Ambient::UseTime(this->ambient_sounds);
0045541e      }
0045541e      else
00455420          CellManager::CheckPrefetchStatus(cell_manager);
00455420      
004554d1      SceneTool::Think();
004554d1      
004554de      if (this->in_queue != 0)
004554de      {
004554e0          int32_t ebp;
004554e0          int32_t var_8_2 = ebp;
004554e7          class Position* edi;
004554e7          var_c = edi;
004554e7          int32_t* esp_2 = &var_c;
004554e7          
004554f0          while (true)
004554f0          {
004554f0              class NIList<NetBlob *>* in_queue = this->in_queue;
004554f6              class NIListElement<NetBlob *>* head_ = in_queue->head_;
004554fa              class NetBlob* data_;
004554fa              
004554fa              if (head_ != 0)
004554fa              {
00455500                  class NIListElement<NetBlob *>* next_ = head_->next_;
00455505                  in_queue->head_ = next_;
00455505                  
00455507                  if (next_ == 0)
00455509                      in_queue->tail_ = next_;
00455509                  
0045550c                  data_ = head_->data_;
0045550e                  *(uint32_t*)((char*)esp_2 - 4) = head_;
0045550f                  operator delete();
004554fa              }
004554fa              else
004554fc                  data_ = nullptr;
004554fc              
00455519              if (data_ == 0)
00455519                  break;
00455519              
0045551b              struct SmartBox::VTable* vtable = this->vtable;
0045551d              *(uint32_t*)((char*)esp_2 - 4) = data_;
00455523              bool cond:1_1 = vtable->IsReadyToDispatchEvent() != 0;
00455527              *(uint32_t*)((char*)esp_2 - 4) = data_;
00455527              void* esp_6 = ((char*)esp_2 - 4);
00455527              
00455528              if (cond:1_1)
00455531                  this->vtable->DispatchSmartBoxEvent();
00455528              else
00455528              {
0045552a                  SmartBox::QueueNetBlob(this);
0045552a                  esp_6 += 4;
00455528              }
00455528              
00455539              *(uint32_t*)((char*)esp_6 - 4) = &data_->m_cRef;
0045553a              esp_2 = esp_6;
0045553a              
0045553e              if (InterlockedDecrement() == 0)
0045553e              {
00455540                  struct NetBlob::VTable* vtable_1 = data_->vtable;
00455542                  *(uint32_t*)((char*)esp_2 - 4) = 1;
00455546                  vtable_1->__vecDelDtor();
0045553e              }
004554f0          }
004554f0          
0045554a          *(uint32_t*)esp_2;
0045554a          esp_2[1];
0045554b          esp_1 = &esp_2[2];
004554de      }
004554de      
00455551      if (this->testMode == 0)
00455553          this->cmdinterp->vtable->UseTime();
00455553      
00455561      *(uint32_t*)esp_1;
00455562      /* tailcall */
00455562      return Render::CalcDegLevel();
00455410  }

004554ea                                8d 9b 00 00 00 00                                                            ......
00455567                       90 90 90 90 90 90 90 90 90                                                         .........

00455570  void __fastcall SmartBox::Draw(class SmartBox* this)

00455570  {
00455578      if (this->hidden != 0)
0045557f          return;
0045557f      
0045557a      /* tailcall */
0045557a      return SmartBox::DrawNoBlit(this);
00455570  }


00455580  int80_t __thiscall SmartBox::HandleUpdateObject(class SmartBox* this, class NetBlob* arg2, uint32_t arg3, class VisualDesc const* arg4, class PhysicsDesc const* arg5, class WeenieDesc const* arg6)

00455580  {
004555a0      return SmartBox::HandleCreateObject(this, arg2, arg3, arg4, arg5, arg6, 1);
00455580  }

004555a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004555b0  void __thiscall CreatureMode::AddLight(class CreatureMode* this, enum LIGHTINFO::LightType arg2, float arg3)

004555b0  {
004555be      void* esi = operator new(0x68);
004555be      
004555c7      if (esi == 0)
004555eb          esi = nullptr;
004555c7      else
004555c7      {
004555cc          *(uint32_t*)((char*)esi + 4) = 0x3f800000;
004555d2          *(uint32_t*)((char*)esi + 8) = 0;
004555d5          *(uint32_t*)((char*)esi + 0xc) = 0;
004555d8          *(uint32_t*)((char*)esi + 0x10) = 0;
004555db          *(uint32_t*)((char*)esi + 0x38) = 0;
004555de          *(uint32_t*)((char*)esi + 0x3c) = 0;
004555e1          *(uint32_t*)((char*)esi + 0x40) = 0;
004555e4          Frame::cache(((char*)esi + 4));
004555c7      }
004555c7      
004555f8      *(uint32_t*)esi = arg2;
004555fa      int32_t var_c = 0x3f800000;
00455602      int32_t var_8 = 0x3f800000;
0045560a      int32_t var_4 = 0x3f800000;
00455612      LIGHTINFO::SetDirection(esi, &var_c);
00455620      *(uint32_t*)((char*)esi + 0x5c) = arg3;
00455623      RGBColor::SetColor32(((char*)esi + 0x50), 0xffffffff);
0045562b      *(uint32_t*)((char*)esi + 0x60) = 0x7f7fffff;
00455632      *(uint32_t*)((char*)esi + 0x64) = 0x43b40000;
0045563f      int32_t eax_3 = (this->creature_mode_lights.m_sizeAndDeallocate & 0x7fffffff);
00455646      uint8_t eax_6;
00455646      
00455646      if (this->creature_mode_lights.m_num >= eax_3)
00455654          eax_6 = SmartArray<unsigned long,1>::grow(&this->creature_mode_lights, SmartArray<unsigned long,1>::get_new_size(&this->creature_mode_lights, (eax_3 + 1)));
00455654      
0045565b      if ((this->creature_mode_lights.m_num < eax_3 || eax_6 != 0))
0045565b      {
00455628          this->creature_mode_lights.m_data[this->creature_mode_lights.m_num] = esi;
00455628          this->creature_mode_lights.m_num += 1;
0045565b      }
004555b0  }


00455670  class SmartBox* SmartBox::Init(class NIList<NetBlob *>* arg1, int32_t arg2)

00455670  {
00455676      class SmartBox* result;
00455676      class NIList<NetBlob *>* edx;
00455676      result = CFactory::MakeSmartBox(arg1);
00455680      SmartBox::smartbox = result;
00455680      
00455685      if (result != 0)
00455685      {
0045568b          result->testMode = arg2;
00455694          class NIList<NetBlob *>* var_8_1 = arg1;
00455695          result = SmartBox::InitInternal(SmartBox::smartbox, edx);
00455695          
0045569c          if (result != 0)
0045569c          {
004556a3              Render::LinkRGRCallback(SmartBox::ResetDetailTexturing);
004556b1              return SmartBox::smartbox;
0045569c          }
0045569c          
004556b2          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004556b2          
004556ba          if (SmartBox::smartbox_1 != 0)
004556c0              result = SmartBox::smartbox_1->vtable->__vecDelDtor(1);
004556c0          
004556c4          SmartBox::smartbox = nullptr;
00455685      }
00455685      
004556ca      return result;
00455670  }

004556cb                                   90 90 90 90 90                                                             .....

004556d0  uint8_t __thiscall CreatureMode::AddObject(class CreatureMode* this, class CPhysicsObj* arg2)

004556d0  {
004556d1      class CPhysicsObj* esi = arg2;
004556d1      
004556da      if ((esi != 0 && SmartArray<unsigned long,1>::add_unique(this, &arg2) != 0))
004556da      {
004556f0          CPhysicsObj::AddObjectToSingleCell(esi, this->creature_cell);
004556fb          CPhysicsObj::SetPlacementFrame(esi, 0, 1);
00455701          int32_t eax_1;
00455701          eax_1 = 1;
00455704          return 1;
004556da      }
004556da      
0045570b      return 0;
004556d0  }

0045570e                                            90 90                                                                ..

00455710  void __fastcall CellManager::UpdateLoadPoint(class CellManager* this)

00455710  {
00455710      uint32_t objcell_id = this->load_pos.objcell_id;
00455710      
00455725      if ((objcell_id != 0 && ((uint32_t)objcell_id) < 0x100))
0045572a          LScape::update_loadpoint(this->lscape, objcell_id);
00455710  }


00455730  float LScape::calc_object_light()

00455730  {
00455766      return ((int32_t)((sqrtl((((((long double)LScape::sunlight.z) * ((long double)LScape::sunlight.z)) + (((long double)LScape::sunlight.y) * ((long double)LScape::sunlight.y))) + (((long double)LScape::sunlight.x) * ((long double)LScape::sunlight.x)))) * ((long double)0.200000003f)) + ((long double)LScape::ambient_level)));
00455730  }

00455767                       90 90 90 90 90 90 90 90 90                                                         .........

00455770  void __fastcall Ambient::ReleaseSoundTables(class Ambient* this)

00455770  {
0045577b      if (this->num_sounds > 0)
0045577b      {
0045577e          int32_t i = 0;
0045577e          
004557a9          do
004557a9          {
00455786              void* desc = this->sounds.data[i]->desc;
00455789              int32_t* ecx_1 = *(uint32_t*)((char*)desc + 0x14);
00455789              
00455795              if ((ecx_1 != 0 && *(uint32_t*)((char*)desc + 0x18) == 0))
00455795              {
00455799                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0045579c                  *(uint32_t*)((char*)desc + 0x14) = 0;
00455795              }
00455795              
004557a6              i += 1;
004557a9          } while (i < this->num_sounds);
0045577b      }
00455770  }

004557af                                               90                                                                 .

004557b0  void __fastcall CellManager::CellManager(class CellManager* this)

004557b0  {
004557b6      this->lscape = 0;
004557b8      this->last_prefetch_cell_id = 0;
004557bb      this->last_prefetch_check = 0f;
004557be      *(uint32_t*)((char*)this->last_prefetch_check)[4] = 0;
004557c1      this->blocking_for_cells = 0;
004557c4      this->all_cells_available = 1;
004557c8      this->num_cells_waiting = 0;
004557cb      this->total_num_cells_waiting = 0;
004557ce      this->curr_cell = nullptr;
004557d4      this->load_pos.vtable = 0x796910;
004557db      this->load_pos.objcell_id = 0;
004557d1      this->load_pos.frame.qw = 0x3f800000;
004557d1      this->load_pos.frame.qx = 0f;
004557d1      this->load_pos.frame.qy = 0f;
004557d1      this->load_pos.frame.qz = 0f;
004557d1      this->load_pos.frame.m_fOrigin.x = 0;
004557d1      this->load_pos.frame.m_fOrigin.y = 0f;
004557d1      this->load_pos.frame.m_fOrigin.z = 0f;
004557f6      Frame::cache(&this->load_pos.frame);
004557fb      this->keep_lscape_loaded = 0;
004557b0  }

00455803           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00455810  void __fastcall CellManager::~CellManager(class CellManager* this)

00455810  {
00455810      this->load_pos.vtable = 0x79285c;
00455810  }

00455818                                                                          90 90 90 90 90 90 90 90                          ........

00455820  int32_t __thiscall CellManager::PreFetchCells(class CellManager* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

00455820  {
00455820      class CellManager* this_1 = this;
00455820      
00455831      if (DBCache::s_pCache->vtable->IsLoader() != 0)
0045583a          return 1;
0045583a      
0045584a      uint32_t ecx_2 = 0;
0045585a      this_1 = nullptr;
0045585e      int32_t eax_7;
0045585e      
0045585e      if (((uint32_t)arg2.id) >= 0x100)
0045585e      {
004558a3          eax_7 = CEnvCell::PreFetchCells(arg2, &this_1);
00455891      label_455891:
00455891          ecx_2 = this_1;
00455891          
00455895          if (eax_7 == 0)
004558ad              this->all_cells_available = 0;
00455895          else
00455897              this->all_cells_available = 1;
0045585e      }
0045585e      else
0045585e      {
00455873          if (((arg3 != 0 || this->all_cells_available == 0) || ((this->last_prefetch_cell_id ^ arg2) & 0xffff0000) != 0))
00455873          {
0045588a              eax_7 = LScape::PreFetchCells(this->lscape, (arg2 | 0xffff), &this_1);
0045588a              goto label_455891;
00455873          }
00455873          
00455875          this->all_cells_available = 1;
0045585e      }
004558b2      this->last_prefetch_cell_id = arg2;
004558b2      
004558b5      if (arg3 != 0)
004558b5      {
004558b9          if (ecx_2 != 0)
004558b9          {
004558bb              uint32_t total_num_cells_waiting = this->total_num_cells_waiting;
004558c0              uint32_t var_1c_3;
004558c0              uint32_t total_num_cells_waiting_2;
004558c0              
004558c0              if (total_num_cells_waiting != 0)
004558c0              {
004558cb                  if (ecx_2 > total_num_cells_waiting)
004558cd                      this->total_num_cells_waiting = ecx_2;
004558cd                  
004558d0                  uint32_t total_num_cells_waiting_1 = this->total_num_cells_waiting;
004558d5                  uint32_t eax_9 = (total_num_cells_waiting_1 - ecx_2);
004558d7                  total_num_cells_waiting_2 = total_num_cells_waiting_1;
004558d8                  this->num_cells_waiting = eax_9;
004558db                  var_1c_3 = eax_9;
004558c0              }
004558c0              else
004558c0              {
004558c2                  total_num_cells_waiting_2 = ecx_2;
004558c3                  this->total_num_cells_waiting = ecx_2;
004558c6                  var_1c_3 = 0;
004558c0              }
004558c0              
004558de              ECM_DDD::SendNotice_RuntimeDDDStatus(1, var_1c_3, total_num_cells_waiting_2);
004558b9          }
004558b9          
004558e9          if (this->all_cells_available != 0)
004558e9              goto label_455905;
004558e9          
004558ee          if (this->blocking_for_cells == 0)
004558ee          {
004558f0              uint32_t all_cells_available = ((uint32_t)this->all_cells_available);
004558f7              this->blocking_for_cells = 1;
004558fd              return all_cells_available;
004558ee          }
004558b5      }
004558b5      else if (this->all_cells_available != 0)
00455903      {
00455905      label_455905:
00455905          
00455908          if (this->blocking_for_cells != 0)
00455908          {
0045590d              this->blocking_for_cells = 0;
00455910              ECM_DDD::SendNotice_RuntimeDDDStatus(0, 0, 0);
00455918              this->num_cells_waiting = 0;
0045591b              this->total_num_cells_waiting = 0;
00455908          }
00455903      }
00455903      
00455927      return ((uint32_t)this->all_cells_available);
00455820  }

0045592a                                90 90 90 90 90 90                                                            ......

00455930  void __fastcall CellManager::Reset(class CellManager* this)

00455930  {
00455937      class CObjCell* curr_cell = this->curr_cell;
00455944      int32_t ebx;
00455944      ebx = ((uint32_t)((int16_t)this->load_pos.objcell_id)) < 0x100;
00455944      
0045594c      if (curr_cell != 0)
0045594c      {
0045594e          curr_cell->vtable->release_cells();
00455953          this->curr_cell->vtable->Release();
00455953          
00455964          if (this->curr_cell->seen_outside != 0)
00455966              ebx = 1;
00455966          
00455968          this->curr_cell = nullptr;
0045596b          CEnvCell::flush_cells();
0045594c      }
0045594c      
00455972      if (ebx != 0)
00455976          LScape::release_all(this->lscape);
00455976      
0045597e      Ambient::FlushSoundTables(this->ambient_sounds);
00455988      this->load_pos.objcell_id = 0;
00455988      
0045598b      if (this->blocking_for_cells != 0)
0045598b      {
00455990          this->blocking_for_cells = 0;
00455994          ECM_DDD::SendNotice_RuntimeDDDStatus(0, 0, 0);
0045599c          this->num_cells_waiting = 0;
0045599f          this->total_num_cells_waiting = 0;
0045598b      }
0045598b      
004559a3      this->all_cells_available = 1;
00455930  }

004559aa                                90 90 90 90 90 90                                                            ......

004559b0  void __thiscall CellManager::ChangePosition(class CellManager* this, class Position const* arg2, int32_t arg3)

004559b0  {
004559b5      class Position* ebp = arg2;
004559b9      uint32_t objcell_id = ebp->objcell_id;
004559b9      
004559c3      if (objcell_id == 0)
004559c3      {
004559c5          CellManager::Reset(this);
004559d0          return;
004559c3      }
004559c3      
004559d7      int32_t edi = 1;
004559d7      
004559dc      if (this->blocking_for_cells == 0)
004559de          edi = arg3;
004559de      
004559ea      if ((this->load_pos.objcell_id != objcell_id || this->curr_cell == 0))
004559ea      {
004559f4          CellManager::PreFetchCells(this, objcell_id, edi);
004559f9          class CObjCell* curr_cell_2 = this->curr_cell;
004559f9          
004559fe          if (curr_cell_2 != 0)
004559fe          {
00455a00              curr_cell_2->vtable->release_cells();
00455a05              this->curr_cell->vtable->Release();
00455a0d              this->curr_cell = nullptr;
004559fe          }
004559fe          
00455a10          uint32_t objcell_id_1 = ebp->objcell_id;
00455a23          int32_t ebp_2 = -(((char*)ebp - ebp));
00455a23          
00455a27          if (edi != 0)
00455a8e              LScape::release_all(this->lscape);
00455a27          else
00455a27          {
00455a2b              if (ebp_2 != 0)
00455a30                  LScape::update_loadpoint(this->lscape, objcell_id_1);
00455a30              
00455a3d              class CObjCell* eax_2 = CObjCell::Get(arg2->objcell_id);
00455a3d              
00455a49              if (eax_2 != 0)
00455a49              {
00455a4d                  if (ebp_2 != 0)
00455a4d                  {
00455a80                      eax_2->vtable->grab_visible_cells();
00455a87                      this->curr_cell = eax_2;
00455a4d                  }
00455a4d                  else if ((eax_2->seen_outside != 0 || this->keep_lscape_loaded != 0))
00455a5a                  {
00455a73                      uint32_t eax_3 = Position::get_outside_cell_id(arg2);
00455a7b                      LScape::update_loadpoint(this->lscape, eax_3);
00455a80                      eax_2->vtable->grab_visible_cells();
00455a87                      this->curr_cell = eax_2;
00455a5a                  }
00455a5a                  else
00455a5a                  {
00455a5e                      LScape::release_all(this->lscape);
00455a63                      eax_2->vtable->grab_visible_cells();
00455a6a                      this->curr_cell = eax_2;
00455a5a                  }
00455a49              }
00455a27          }
00455a27          
00455a96          if (this->curr_cell != 0)
00455a96          {
00455a98              CEnvCell::master_incell_timestamp += 1;
00455a9e              Render::world_lights.num_static_lights = 0;
00455aa4              Render::world_lights.num_dynamic_lights = 0;
00455aaa              class CObjCell* curr_cell = this->curr_cell;
00455ab6              Render::player_pos.objcell_id = curr_cell->pos.objcell_id;
00455ac2              Frame::operator=(&Render::player_pos.frame, &curr_cell->pos.frame);
00455a96          }
00455a96          
00455ac7          CEnvCell::flush_cells();
00455acc          class CObjCell* curr_cell_1 = this->curr_cell;
00455acc          
00455ad1          if (curr_cell_1 != 0)
00455ad1          {
00455add              int32_t ebp_3;
00455add              
00455add              if ((ebp_2 != 0 || curr_cell_1->seen_outside != 0))
00455add              {
00455b51                  float x = LScape::sunlight.x;
00455b57                  float z = LScape::sunlight.z;
00455b5d                  float y = LScape::sunlight.y;
00455b62                  float x_1 = x;
00455b66                  Render::world_lights.sunlight.x = x;
00455b76                  Render::world_lights.sunlight.z = z;
00455b81                  ebp_3 = 1;
00455b8a                  Render::world_lights.sunlight.y = y;
00455b8f                  RGBColor::SetColor32(&x_1, LScape::sunlight_color.__inner0);
00455b94                  class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
00455ba8                  Render::world_lights.sunlight_color.r = x_1;
00455bad                  Render::world_lights.sunlight_color.g = y;
00455bb3                  Render::world_lights.sunlight_color.b = z;
00455bb9                  Render::world_lights.m_bSunlightValid = 0;
00455bb9                  
00455bbf                  if (SmartBox::smartbox_2 != 0)
00455bbf                  {
00455bd0                      float y_1 = y;
00455af4                      SmartBox::SetWorldAmbientLight(SmartBox::smartbox_2, ((float)LScape::calc_object_light()), LScape::ambient_color.__inner0);
00455bbf                  }
00455add              }
00455add              else
00455add              {
00455adf                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00455ae5                  ebp_3 = 0;
00455ae5                  
00455ae9                  if (SmartBox::smartbox_1 != 0)
00455af4                      SmartBox::SetWorldAmbientLight(SmartBox::smartbox_1, 0.200000003f, 0xffffffff);
00455add              }
00455add              
00455b01              Ambient::InitSounds(this->ambient_sounds, arg2);
00455b06              class Ambient* ambient_sounds = this->ambient_sounds;
00455b09              class Ambient* ambient_sounds_1 = ambient_sounds;
00455b0a              IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ambient_sounds);
00455b0a              
00455b14              if (ebp_3 != 0)
00455b1c                  LScape::add_ambient_sounds(this->lscape, this->ambient_sounds);
00455b1c              
00455b24              Ambient::UpdatePlayQueue(this->ambient_sounds);
00455b2c              Ambient::ReleaseSoundTables(this->ambient_sounds);
00455ad1          }
00455ad1          
00455b31          ebp = arg2;
004559ea      }
004559ea      
00455b3f      this->load_pos.objcell_id = ebp->objcell_id;
00455b42      Frame::operator=(&this->load_pos.frame, &ebp->frame);
004559b0  }

00455bdb                                                                                   90 90 90 90 90                             .....

00455be0  int32_t __fastcall CellManager::CheckPrefetchStatus(class CellManager* this)

00455be0  {
00455be9      long double x87_r7 = (((long double)Timer::cur_time) - ((long double)this->last_prefetch_check));
00455bee      long double temp0 = ((long double)5.0);
00455bee      (x87_r7 - temp0);
00455bee      
00455bf9      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00455c28          return 0;
00455c28      
00455c06      int32_t eax_2 = CellManager::PreFetchCells(this, this->load_pos.objcell_id, ((uint32_t)this->blocking_for_cells));
00455c17      int32_t eax_3 = -(eax_2);
00455c1b      this->last_prefetch_check = (*(uint32_t*)Timer::cur_time);
00455c1e      *(uint32_t*)((char*)this->last_prefetch_check)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00455c24      return -((eax_3 - eax_3));
00455be0  }

00455c29                             90 90 90 90 90 90 90                                                           .......

00455c30  uint8_t GraphicsOptions::HandleRenderOption(int32_t arg1, char** arg2, char const** arg3, char const** arg4)

00455c30  {
00455c38      if (arg1 < 2)
00455c38      {
00455c3e          *(uint32_t*)arg4 = "Usage:\n@render <option> <value>…";
00455c44          char const** eax;
00455c44          eax = 0;
00455c47          return 0;
00455c38      }
00455c38      
00455c64      if (_stricmp(arg2[1], "usage") == 0)
00455c64      {
00455c6c          *(uint32_t*)arg4 = "Usage:\n@render <option> <value>…";
00455c72          int32_t eax_1;
00455c72          eax_1 = 0;
00455c75          return 0;
00455c64      }
00455c64      
00455c86      if (_stricmp(arg2[1], "radius") == 0)
00455c86      {
00455c8b          if (arg1 >= 3)
00455c8b          {
00455ca1              int32_t eax_4 = atoi(arg2[2]);
00455ca1              
00455cb2              if ((eax_4 < 5 || eax_4 > 0x19))
00455cb2              {
00455cd8                  *(uint32_t*)arg3 = "Radius must be between 5 and 25";
00455cde                  eax_4 = 1;
00455ce1                  return 1;
00455cb2              }
00455cb2              
00455cba              UIPreferences::ModifyPreference(&Render_LandscapeDrawDistance, eax_4);
00455cc8              *(uint32_t*)arg3 = "Landscape radius set";
00455cce              char const** eax_5;
00455cce              eax_5 = 1;
00455cd1              return 1;
00455c8b          }
00455c8b          
00455c93          *(uint32_t*)arg3 = "Must specify a radius";
00455c99          int32_t eax_3;
00455c99          eax_3 = 1;
00455c9c          return 1;
00455c86      }
00455c86      
00455cf2      if (_stricmp(arg2[1], &data_79b974) == 0)
00455cf2      {
00455cf7          if (arg1 < 3)
00455cf7          {
00455cff              *(uint32_t*)arg3 = "Must specify a field of view";
00455d05              char const** eax_7;
00455d05              eax_7 = 1;
00455d08              return 1;
00455cf7          }
00455cf7          
00455d0d          int32_t eax_8;
00455d0d          int32_t ecx_4;
00455d0d          eax_8 = atoi(arg2[2]);
00455d0d          
00455d20          if ((eax_8 >= 0xa && eax_8 <= 0xa0))
00455d20          {
00455d28              long double x87_r7 = ((long double)eax_8);
00455d28              
00455d2c              if (eax_8 < 0)
00455d2e                  x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
00455d2e              
00455d34              int32_t var_10_4 = ecx_4;
00455d3d              UIPreferences::ModifyPreference(&Render_FieldOfView, ((float)x87_r7));
00455d4b              *(uint32_t*)arg3 = "Field of view set";
00455d51              int32_t eax_9;
00455d51              eax_9 = 1;
00455d54              return 1;
00455d20          }
00455d20          
00455d59          *(uint32_t*)arg3 = "Field of view must be between 10…";
00455cf2      }
00455cf2      
00455d61      int32_t eax_6;
00455d61      eax_6 = 1;
00455d64      return 1;
00455c30  }

00455d65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00455d70  int32_t Frame::close_rotation(class Frame const* arg1, class Frame const* arg2, float const arg3)

00455d70  {
00455d76      float* edx = arg2;
00455d7c      long double x87_r7_2 = fabsl((((long double)arg1->qw) - ((long double)*(uint32_t*)edx)));
00455d7e      long double x87_r6 = ((long double)arg3);
00455d82      (x87_r6 - x87_r7_2);
00455d82      
00455d89      if ((*(uint8_t*)((char*)((((x87_r6 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_2) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00455d89      {
00455d91          long double x87_r7_5 = fabsl((((long double)arg1->qx) - ((long double)edx[1])));
00455d93          long double x87_r6_1 = ((long double)arg3);
00455d97          (x87_r6_1 - x87_r7_5);
00455d97          
00455d9e          if ((*(uint8_t*)((char*)((((x87_r6_1 < x87_r7_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_5))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_5) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00455d9e          {
00455da6              long double x87_r7_8 = fabsl((((long double)arg1->qy) - ((long double)edx[2])));
00455da8              long double x87_r6_2 = ((long double)arg3);
00455dac              (x87_r6_2 - x87_r7_8);
00455dac              
00455db3              if ((*(uint8_t*)((char*)((((x87_r6_2 < x87_r7_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_8))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_8) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00455db3              {
00455dbb                  long double x87_r7_11 = fabsl((((long double)arg1->qz) - ((long double)edx[3])));
00455dbd                  long double x87_r6_3 = ((long double)arg3);
00455dc1                  (x87_r6_3 - x87_r7_11);
00455dc1                  
00455dc8                  if ((*(uint8_t*)((char*)((((x87_r6_3 < x87_r7_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_11))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_11) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00455dcf                      return 1;
00455db3              }
00455d9e          }
00455d89      }
00455d89      
00455dd2      return 0;
00455d70  }

00455dd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00455de0  class Vector3* __thiscall Vector3::operator/(class Vector3 const* this, class Vector3* __return, float const arg3)

00455de0  {
00455dea      long double x87_r7 = (((long double)1f) / ((long double)arg3));
00455dee      arg3 = ((float)x87_r7);
00455df8      long double x87_r6_1 = (((long double)arg3) * ((long double)this->y));
00455dff      long double x87_r5_1 = (((long double)arg3) * ((long double)this->z));
00455e04      __return->x = ((float)(x87_r7 * ((long double)this->x)));
00455e06      __return->y = ((float)x87_r6_1);
00455e09      __return->z = ((float)x87_r5_1);
00455e0c      return __return;
00455de0  }

00455e0f                                               90                                                                 .

00455e10  class Vector3* operator*(class Vector3* __return, float const arg2, class Vector3 const* arg3)

00455e10  {
00455e1e      long double x87_r6_1 = (((long double)arg2) * ((long double)arg3->y));
00455e25      long double x87_r5_1 = (((long double)arg2) * ((long double)arg3->z));
00455e28      float* result = __return;
00455e2e      *(uint32_t*)result = ((float)(((long double)arg2) * ((long double)arg3->x)));
00455e30      result[1] = ((float)x87_r6_1);
00455e33      result[2] = ((float)x87_r5_1);
00455e36      return result;
00455e10  }

00455e37                                                                       90 90 90 90 90 90 90 90 90                         .........

00455e40  void __fastcall CameraSet::ToggleLookDown(class CameraSet* this)

00455e40  {
00455e47      int32_t eax;
00455e47      eax = this->looking_down == 0;
00455e4b      CameraSet::LookDown(this, eax);
00455e40  }

00455e51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00455e60  void __fastcall CameraSet::ToggleMapMode(class CameraSet* this)

00455e60  {
00455e67      int32_t eax;
00455e67      eax = this->in_map_mode == 0;
00455e6b      CameraSet::SetMapMode(this, eax);
00455e60  }

00455e71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00455e80  void __fastcall CameraManager::ClearTarget(class CameraManager* this)

00455e80  {
00455e80      this->target_status = INVALID_TARGET;
00455e80  }

00455e88                          90 90 90 90 90 90 90 90                                                          ........

00455e90  void __thiscall CameraManager::SetTarget(class CameraManager* this, enum CameraTarget arg2)

00455e90  {
00455e99      this->target_status |= arg2;
00455e90  }

00455e9f                                                                                               90                                 .

00455ea0  void __thiscall CameraManager::SetPivotObject(class CameraManager* this, uint32_t arg2, int32_t arg3)

00455ea0  {
00455ea8      this->pivot_object_id = arg2;
00455eab      this->pivot_part_index = arg3;
00455ea0  }

00455eb1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00455ec0  int32_t __thiscall CameraManager::SetTranslationalStiffness(class CameraManager* this, float arg2)

00455ec0  {
00455ec4      (((long double)arg2) - ((long double)0.0));
00455ecc      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00455ecc      
00455ecf      if (p)
00455ecf      {
00455ed1          long double x87_r7_1 = ((long double)arg2);
00455ed5          long double temp2_1 = ((long double)1.0);
00455ed5          (x87_r7_1 - temp2_1);
00455ed5          
00455ee0          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00455ee0          {
00455ee6              this->t_stiffness = arg2;
00455eee              return 1;
00455ee0          }
00455ecf      }
00455ecf      
00455ef3      return 0;
00455ec0  }

00455ef6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00455f00  int32_t __thiscall CameraManager::SetRotationalStiffness(class CameraManager* this, float arg2)

00455f00  {
00455f04      (((long double)arg2) - ((long double)0.0));
00455f0c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00455f0c      
00455f0f      if (p)
00455f0f      {
00455f11          long double x87_r7_1 = ((long double)arg2);
00455f15          long double temp2_1 = ((long double)1.0);
00455f15          (x87_r7_1 - temp2_1);
00455f15          
00455f20          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00455f20          {
00455f26              this->r_stiffness = arg2;
00455f2e              return 1;
00455f20          }
00455f0f      }
00455f0f      
00455f33      return 0;
00455f00  }

00455f36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00455f40  void __thiscall CameraManager::OnAction(class CameraManager* this, class InputEvent const* arg2)

00455f40  {
00455f46      uint32_t m_InputAction = arg2->m_InputAction;
00455f50      int32_t eax;
00455f50      
00455f50      if ((m_InputAction - 0x33) > 0xb)
00455f50      {
00456108          eax = 0;
0045610b          return;
00455f50      }
00455f50      
00455f56      switch (m_InputAction)
00455f56      {
00455fb7          case 0x33:
00455fb7          {
00455fb7              class CameraSet* ecx_4 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00455fb7              
00455fbf              if (ecx_4 != 0)
00455fbf              {
00455fc1                  eax = arg2->m_fStart;
00455fc1                  
00455fc6                  if (eax != 0)
00455fc6                  {
00455fcf                      int32_t eax_1;
00455fcf                      int80_t st0_2;
00455fcf                      eax_1 = CameraSet::Closer(ecx_4, 1, 1f);
00455fd5                      eax_1 = 1;
00455fd8                      return;
00455fc6                  }
00455fc6                  
00455fdb                  CameraSet::StopCloser(ecx_4);
00455fbf              }
00455fbf              
00455fe1              eax = 1;
00455fe4              return;
00455fb7              break;
00455fb7          }
00455fe7          case 0x34:
00455fe7          {
00455fe7              class CameraSet* ecx_5 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00455fe7              
00455fef              if (ecx_5 != 0)
00455fef              {
00455ff1                  eax = arg2->m_fStart;
00455ff1                  
00455ff6                  if (eax != 0)
00455ff6                  {
00455fff                      int32_t eax_2;
00455fff                      int80_t st0_3;
00455fff                      eax_2 = CameraSet::Farther(ecx_5, 1, 1f);
00456005                      eax_2 = 1;
00456008                      return;
00455ff6                  }
00455ff6                  
0045600b                  CameraSet::StopFarther(ecx_5);
00455fef              }
00455fef              
00456011              eax = 1;
00456014              return;
00455fe7              break;
00455fe7          }
00456017          case 0x35:
00456017          case 0x36:
00456017          {
00456017              class CameraSet* ecx_6 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00456017              
0045601f              if (ecx_6 != 0)
0045601f              {
00456021                  bool cond:1_1 = m_InputAction == 0x35;
00456024                  m_InputAction = arg2->m_fStart;
00456027                  eax = cond:1_1;
00456027                  
0045602c                  if (m_InputAction != 0)
0045602c                  {
0045603b                      CameraSet::Rotate(ecx_6, ((uint32_t)eax), 1, 1f, 1);
00456041                      int32_t eax_4;
00456041                      eax_4 = 1;
00456044                      return;
0045602c                  }
0045602c                  
00456047                  int32_t edx = ((uint32_t)eax);
0045604a                  int32_t var_c_1 = edx;
0045604b                  CameraSet::StopRotating(ecx_6, edx);
0045601f              }
0045601f              
00456051              eax = 1;
00456054              return;
00456017              break;
00456017          }
00456087          case 0x37:
00456087          {
00456087              class CameraSet* ecx_8 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00456087              
0045608f              if (ecx_8 != 0)
0045608f              {
00456091                  eax = arg2->m_fStart;
00456091                  
00456096                  if (eax != 0)
00456096                  {
0045609f                      CameraSet::Raise(ecx_8, 1, 1f);
004560a5                      int32_t eax_6;
004560a5                      eax_6 = 1;
004560a8                      return;
00456096                  }
00456096                  
004560ab                  CameraSet::StopRaising(ecx_8);
0045608f              }
0045608f              
004560b1              eax = 1;
004560b4              return;
00456087              break;
00456087          }
00456057          case 0x38:
00456057          {
00456057              class CameraSet* ecx_7 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00456057              
0045605f              if (ecx_7 != 0)
0045605f              {
00456061                  eax = arg2->m_fStart;
00456061                  
00456066                  if (eax != 0)
00456066                  {
0045606f                      CameraSet::Lower(ecx_7, 1, 1f);
00456075                      int32_t eax_5;
00456075                      eax_5 = 1;
00456078                      return;
00456066                  }
00456066                  
0045607b                  CameraSet::StopLowering(ecx_7);
0045605f              }
0045605f              
00456081              eax = 1;
00456084              return;
00456057              break;
00456057          }
00455f5d          case 0x39:
00455f5d          {
00455f5d              class CameraSet* ecx = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00455f65              int80_t st0_1;
00455f65              
00455f65              if (ecx != 0)
00455f69                  eax = CameraSet::SetDefaultOffsets(ecx, 1);
00455f6f              eax = 1;
00455f72              return;
00455f5d              break;
00455f5d          }
00455f75          case 0x3a:
00455f75          {
00455f75              class CameraSet* ecx_1 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00455f75              
00455f7d              if (ecx_1 != 0)
00455f7f                  CameraSet::SetInHead(ecx_1);
00455f7f              
00455f85              eax = 1;
00455f88              return;
00455f75              break;
00455f75          }
00455f8b          case 0x3b:
00455f8b          {
00455f8b              class CameraSet* ecx_2 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00455f8b              
00455f93              if (ecx_2 != 0)
00455f95                  CameraSet::ToggleLookDown(ecx_2);
00455f95              
00455f9b              eax = 1;
00455f9e              return;
00455f8b              break;
00455f8b          }
00455fa1          case 0x3c:
00455fa1          {
00455fa1              class CameraSet* ecx_3 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
00455fa1              
00455fa9              if (ecx_3 != 0)
00455fab                  CameraSet::ToggleMapMode(ecx_3);
00455fab              
00455fb1              eax = 1;
00455fb4              return;
00455fa1              break;
00455fa1          }
004560ec          case 0x3d:
004560ec          {
004560ec          label_4560ec:
004560ec              class CameraSet* ecx_9 = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
004560ec              
004560f4              if (ecx_9 != 0)
004560fb                  CameraSet::ToggleMouseLook(ecx_9, ((uint32_t)arg2->m_fStart));
004560fb              
00456101              eax = 1;
00456104              return;
004560ec              break;
004560ec          }
004560b7          case 0x3e:
004560b7          {
004560b7              class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004560b7              
004560bf              if (ICIDM::s_cidm_1 != 0)
004560bf              {
004560c1                  eax = arg2->m_fStart;
004560c4                  struct ICIDM::VTable* vtable = ICIDM::s_cidm_1->vtable;
004560c4                  
004560cb                  if (eax == 0)
004560cb                  {
004560e0                      int32_t eax_11 = -(((char*)this - 4));
004560e9                      vtable->UnregisterInputMap(6, ((eax_11 - eax_11) & this));
004560cb                  }
004560cb                  else
004560cb                  {
004560cd                      int32_t eax_8 = -(((char*)this - 4));
004560db                      vtable->RegisterInputMap(6, ((eax_8 - eax_8) & this), 0x7d0);
004560cb                  }
004560bf              }
004560bf              
004560bf              goto label_4560ec;
004560b7          }
00455f56      }
00455f40  }

0045610e                                            8b ff                                                                ..
00456110  uint32_t jump_table_456110[0xc] = 
00456110  {
00456110      [0x0] =  0x00455fb7
00456114      [0x1] =  0x00455fe7
00456118      [0x2] =  0x00456017
0045611c      [0x3] =  0x00456017
00456120      [0x4] =  0x00456087
00456124      [0x5] =  0x00456057
00456128      [0x6] =  0x00455f5d
0045612c      [0x7] =  0x00455f75
00456130      [0x8] =  0x00455f8b
00456134      [0x9] =  0x00455fa1
00456138      [0xa] =  0x004560ec
0045613c      [0xb] =  0x004560b7
00456140  }

00456140  void __thiscall CameraManager::MouseLookHandler(class CameraManager* this, int32_t arg2, int32_t arg3)

00456140  {
00456140      class CameraSet* m_pCurrentCameraSet = this->m_pCurrentCameraSet;
00456140      
00456148      if (m_pCurrentCameraSet == 0)
0045614f          return;
0045614f      
0045614a      /* tailcall */
0045614a      return CameraSet::MouseLookHandler(m_pCurrentCameraSet, arg2, arg3);
00456140  }

00456152                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00456160  void __thiscall CameraManager::ToggleMouseLook(class CameraManager* this, int32_t arg2)

00456160  {
00456160      class CameraSet* m_pCurrentCameraSet = this->m_pCurrentCameraSet;
00456160      
00456168      if (m_pCurrentCameraSet == 0)
0045616f          return;
0045616f      
0045616a      /* tailcall */
0045616a      return CameraSet::ToggleMouseLook(m_pCurrentCameraSet, arg2);
00456160  }

00456172                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00456180  class AC1Legacy::Vector3* __thiscall Position::localtoglobal(class Position const* this, class AC1Legacy::Vector3* __return, class Position const* arg3, class AC1Legacy::Vector3 const* arg4)

00456180  {
004561a3      long double x87_r7_4 = ((((((long double)arg3->frame.m_fl2gv[3]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[0]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[6]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.x));
004561bf      long double x87_r7_9 = ((((((long double)arg3->frame.m_fl2gv[4]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[1]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[7]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.y));
004561df      long double x87_r7_14 = ((((((long double)arg3->frame.m_fl2gv[5]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[2]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[8]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.z));
004561ec      float __return_1;
004561ec      LandDefs::get_block_offset(&__return_1, this->objcell_id, arg3->objcell_id);
004561f9      float* result = __return;
0045620f      *(uint32_t*)result = ((float)(((long double)__return_1) + ((long double)((float)x87_r7_4))));
00456211      float var_8;
00456211      result[1] = ((float)(((long double)var_8) + ((long double)((float)x87_r7_9))));
00456214      float var_4;
00456214      result[2] = ((float)(((long double)var_4) + ((long double)((float)x87_r7_14))));
0045621a      return result;
00456180  }

0045621d                                                                                         90 90 90                               ...

00456220  class AC1Legacy::Vector3* __thiscall Position::localtoglobalvec(class Position const* this, class AC1Legacy::Vector3* __return, class AC1Legacy::Vector3 const* arg3)

00456220  {
00456237      long double x87_r7_3 = (((((long double)this->frame.m_fl2gv[5]) * ((long double)arg3->y)) + (((long double)this->frame.m_fl2gv[2]) * ((long double)arg3->x))) + (((long double)this->frame.m_fl2gv[8]) * ((long double)arg3->z)));
0045624c      long double x87_r6_7 = (((((long double)this->frame.m_fl2gv[4]) * ((long double)arg3->y)) + (((long double)this->frame.m_fl2gv[1]) * ((long double)arg3->x))) + (((long double)this->frame.m_fl2gv[7]) * ((long double)arg3->z)));
00456261      float* result = __return;
00456267      *(uint32_t*)result = ((float)(((((long double)this->frame.m_fl2gv[3]) * ((long double)arg3->y)) + (((long double)this->frame.m_fl2gv[0]) * ((long double)arg3->x))) + (((long double)this->frame.m_fl2gv[6]) * ((long double)arg3->z))));
00456269      result[1] = ((float)x87_r6_7);
0045626c      result[2] = ((float)x87_r7_3);
0045626f      return result;
00456220  }

00456272                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00456280  void __fastcall CameraManager::~CameraManager(class CameraManager* this)

00456280  {
00456284      int32_t* edi = this->m_bEnabled*(int32_t*)((char*)this + 0xb8);
0045628c      *(uint32_t*)((char*)this - 4) = 0x79baac;
00456293      this->vtable = 0x79baa0;
00456293      
00456299      if (edi != 0)
00456299      {
004562ab          if ((InterlockedDecrement(&edi[1]) == 0 && edi != 0))
004562b3              **(uint32_t**)edi(1);
004562b3          
004562b5          this->m_bEnabled*(int32_t*)((char*)this + 0xb8) = 0;
00456299      }
00456299      
004562c4      UserPreferences::UnregisterPreference(&Camera_AlignToSlope);
004562ce      UserPreferences::UnregisterPreference(&Camera_Stiffness);
004562d8      UserPreferences::UnregisterPreference(&Camera_AdjustmentSpeed);
004562e3      int32_t eax_4 = -(((char*)this - 4));
004562e7      void* eax_6 = ((eax_4 - eax_4) & this);
004562e9      *(uint32_t*)eax_6 = 0x794824;
004562ef      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004562ef      
004562f9      if (ICIDM::s_cidm_1 != 0)
004562fb          ICIDM::s_cidm_1->vtable->UnregisterCallback(eax_6);
00456280  }

00456302        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00456310  void __thiscall CameraManager::SetCameraSet(class CameraManager* this, class CameraSet* arg2)

00456310  {
00456314      class CameraSet* m_pCurrentCameraSet_1 = this->m_pCurrentCameraSet;
00456314      
0045631c      if (m_pCurrentCameraSet_1 != 0)
0045631c      {
0045632e          if ((InterlockedDecrement(&m_pCurrentCameraSet_1->m_cRef) == 0 && m_pCurrentCameraSet_1 != 0))
00456330              m_pCurrentCameraSet_1->vtable->__vecDelDtor(1);
00456330          
00456338          this->m_pCurrentCameraSet = nullptr;
0045631c      }
0045631c      
00456348      this->m_pCurrentCameraSet = arg2;
00456348      
0045634e      if (arg2 != 0)
0045634e      {
00456354          InterlockedIncrement(&arg2->m_cRef);
0045635a          class CameraSet* m_pCurrentCameraSet = this->m_pCurrentCameraSet;
0045635a          
00456362          if (m_pCurrentCameraSet != 0)
0045636d              /* tailcall */
0045636d              return CameraSet::SetStiffness(m_pCurrentCameraSet, this->m_rCameraStiffness);
0045634e      }
00456310  }

00456377                                                                       90 90 90 90 90 90 90 90 90                         .........

00456380  void __thiscall CameraManager::SetTargetObject(class CameraManager* this, uint32_t arg2, int32_t arg3)

00456380  {
00456388      this->target_object_id = arg2;
0045638b      this->target_part_index = arg3;
0045638e      this->target_status = LOOK_AT_OBJECT;
00456380  }

00456398                                                                          90 90 90 90 90 90 90 90                          ........

004563a0  void __thiscall CameraManager::SetTargetDirection(class CameraManager* this, class AC1Legacy::Vector3 const* arg2)

004563a0  {
004563a7      float y = arg2->y;
004563af      float z = arg2->z;
004563b2      float x = arg2->x;
004563b2      
004563c9      if (AC1Legacy::Vector3::normalize_check_small(&x) == 0)
004563c9      {
004563d7          this->direction.x = x;
004563d7          this->direction.y = y;
004563d7          this->direction.z = z;
004563c9      }
004563a0  }

004563e9                             90 90 90 90 90 90 90                                                           .......

004563f0  void __thiscall CameraManager::FlagsToVector(class CameraManager const* this, class AC1Legacy::Vector3* __return, uint32_t arg3)

004563f0  {
004563f7      long double x87_r7 = ((long double)0f);
004563ff      int32_t eax_1 = (arg3 & 3);
00456405      float m_rMovementSpeed = 0f;
0045640d      float m_rMovementSpeed_1 = 0f;
0045640d      
00456415      if (eax_1 == 2)
0045641a          m_rMovementSpeed = this->m_rMovementSpeed;
00456415      else if (eax_1 == 1)
0045642a          m_rMovementSpeed = ((float)-(((long double)this->m_rMovementSpeed)));
0045642a      
00456430      int32_t eax_4 = (arg3 & 0xc);
00456430      
00456436      if (eax_4 == 4)
0045643b          m_rMovementSpeed_1 = this->m_rMovementSpeed;
00456436      else if (eax_4 == 8)
0045644b          m_rMovementSpeed_1 = ((float)-(((long double)this->m_rMovementSpeed)));
0045644b      
00456451      int32_t eax_7 = (arg3 & 0x30);
00456451      
00456457      if (eax_7 == 0x10)
0045645b          x87_r7 = ((long double)this->m_rMovementSpeed);
00456457      else if (eax_7 == 0x20)
0045646a          x87_r7 = -(((long double)this->m_rMovementSpeed));
0045646a      
0045646c      float* __return_1 = __return;
00456478      *(uint32_t*)__return_1 = ((float)((long double)m_rMovementSpeed));
0045647a      __return_1[1] = m_rMovementSpeed_1;
0045647d      __return_1[2] = ((float)x87_r7);
004563f0  }

00456486                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00456490  void CameraManager::OnStiffnessChanged(class PStringBase<char> const* arg1)

00456490  {
00456490      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00456490      
00456497      if (SmartBox::smartbox_1 != 0)
00456497      {
00456499          class CameraManager* camera_manager = SmartBox::smartbox_1->camera_manager;
00456499          
004564a1          if (camera_manager != 0)
004564a1          {
004564a3              class CameraSet* m_pCurrentCameraSet = camera_manager->m_pCurrentCameraSet;
004564a3              
004564ab              if (m_pCurrentCameraSet != 0)
004564b1                  CameraSet::SetStiffness(m_pCurrentCameraSet, camera_manager->m_rCameraStiffness);
004564a1          }
00456497      }
00456490  }

004564b7                                                                       90 90 90 90 90 90 90 90 90                         .........

004564c0  void* __thiscall CameraManager::`vector deleting destructor'(class CameraManager* this, uint32_t arg2)

004564c0  {
004564c3      CameraManager::~CameraManager(this);
004564cd      void* __offset(CameraManager, -0x4) result = ((char*)this - 4);
004564cd      
004564d0      if ((arg2 & 1) == 0)
004564df          return result;
004564df      
004564d3      operator delete(result);
004564db      return ((char*)this - 4);
004564c0  }

004564e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004564f0  int32_t __thiscall CameraManager::QueryPivotPosition(class CameraManager const* this, class Position* arg2)

004564f0  {
00456501      int32_t var_48 = 0x796910;
00456509      uint32_t var_44 = 0;
00456511      int32_t var_40 = 0x3f800000;
00456519      int32_t var_3c = 0;
00456521      int32_t var_38 = 0;
00456529      int32_t var_34 = 0;
00456531      int32_t var_c = 0;
00456539      int32_t var_8 = 0;
00456541      int32_t var_4 = 0;
00456549      Frame::cache(&var_40);
0045655e      arg2->objcell_id = var_44;
00456561      Frame::operator=(&arg2->frame, &var_40);
0045656a      class CPhysicsObj* eax_1 = CPhysicsObj::GetObjectA(this->pivot_object_id);
0045656a      
00456574      if (eax_1 != 0)
00456574      {
0045657d          arg2->objcell_id = eax_1->m_position.objcell_id;
00456580          int32_t pivot_part_index = this->pivot_part_index;
00456586          class CPartArray* part_array;
00456586          
00456586          if (pivot_part_index != 0xffffffff)
00456588              part_array = eax_1->part_array;
00456588          
0045658e          float __return;
0045658e          
0045658e          if ((pivot_part_index == 0xffffffff || pivot_part_index >= part_array->num_parts))
0045658e          {
004565e4              long double x87_r7_3 = (((((long double)eax_1->m_position.frame.m_fl2gv[3]) * ((long double)this->pivot_offset.y)) + (((long double)eax_1->m_position.frame.m_fl2gv[0]) * ((long double)this->pivot_offset.x))) + (((long double)eax_1->m_position.frame.m_fl2gv[6]) * ((long double)this->pivot_offset.z)));
004565ec              __return = ((float)(x87_r7_3 + ((long double)eax_1->m_position.frame.m_fOrigin.x)));
00456608              long double x87_r7_8 = (((((long double)eax_1->m_position.frame.m_fl2gv[4]) * ((long double)this->pivot_offset.y)) + (((long double)eax_1->m_position.frame.m_fl2gv[1]) * ((long double)this->pivot_offset.x))) + (((long double)eax_1->m_position.frame.m_fl2gv[7]) * ((long double)this->pivot_offset.z)));
0045662f              long double x87_r7_13 = (((((long double)eax_1->m_position.frame.m_fl2gv[5]) * ((long double)this->pivot_offset.y)) + (((long double)eax_1->m_position.frame.m_fl2gv[2]) * ((long double)this->pivot_offset.x))) + (((long double)eax_1->m_position.frame.m_fl2gv[8]) * ((long double)this->pivot_offset.z)));
004565d0              arg2->frame.m_fOrigin.x = __return;
004565d0              arg2->frame.m_fOrigin.y = ((float)(x87_r7_8 + ((long double)eax_1->m_position.frame.m_fOrigin.y)));
004565d0              arg2->frame.m_fOrigin.z = ((float)(x87_r7_13 + ((long double)eax_1->m_position.frame.m_fOrigin.z)));
0045664f              return 1;
0045658e          }
0045658e          
00456593          void* ecx_3 = part_array->parts[pivot_part_index];
00456593          
00456598          if (ecx_3 != 0)
00456598          {
004565aa              class AC1Legacy::Vector3* eax_2 = Frame::localtoglobal(((char*)ecx_3 + 0x38), &__return, &this->pivot_offset);
004565b1              arg2->frame.m_fOrigin.x = eax_2->x;
004565b1              arg2->frame.m_fOrigin.y = eax_2->y;
004565b1              arg2->frame.m_fOrigin.z = eax_2->z;
004565ca              return 1;
00456598          }
00456574      }
00456574      
0045665a      return 0;
004564f0  }

0045665d                                                                                         90 90 90                               ...

00456660  void __thiscall CameraManager::UpdateCamera(class CameraManager* this, class Position* __return, class Position const* arg3)

00456660  {
00456672      if (this->m_bEnabled == 0)
00456672      {
00456682          __return->vtable = 0x796910;
0045668e          __return->objcell_id = arg3->objcell_id;
00456695          Frame::operator=(&__return->frame, &arg3->frame);
004566a4          return;
00456672      }
00456672      
004566bb      *(uint32_t*)((char*)this->last_update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004566be      uint32_t m_dwCameraOffsetMovement = this->m_dwCameraOffsetMovement;
004566c3      double var_178 = ((double)(((long double)Timer::cur_time) - ((long double)this->last_update_time)));
004566c7      this->last_update_time = (*(uint32_t*)Timer::cur_time);
004566ca      float x_3;
004566ca      float var_18c;
004566ca      float var_188;
004566ca      
004566ca      if (m_dwCameraOffsetMovement != 0)
004566ca      {
004566d4          CameraManager::FlagsToVector(this, &x_3, m_dwCameraOffsetMovement);
004566d9          long double x87_r7_2 = ((long double)var_178);
004566e9          var_18c = ((float)(((long double)var_18c) * x87_r7_2));
004566f3          var_188 = ((float)(((long double)var_188) * x87_r7_2));
004566fa          this->viewer_offset.x = ((float)((((long double)x_3) * x87_r7_2) + ((long double)this->viewer_offset.x)));
00456706          this->viewer_offset.y = ((float)(((long double)var_18c) + ((long double)this->viewer_offset.y)));
00456710          this->viewer_offset.z = ((float)(((long double)var_188) + ((long double)this->viewer_offset.z)));
004566ca      }
004566ca      
00456713      uint32_t m_dwPivotOffsetMovement = this->m_dwPivotOffsetMovement;
00456713      
00456718      if (m_dwPivotOffsetMovement != 0)
00456718      {
00456722          CameraManager::FlagsToVector(this, &x_3, m_dwPivotOffsetMovement);
00456727          long double x87_r7_7 = ((long double)var_178);
00456748          this->pivot_offset.x = ((float)((((long double)x_3) * x87_r7_7) + ((long double)this->pivot_offset.x)));
00456754          this->pivot_offset.y = ((float)(((long double)((float)(((long double)var_18c) * x87_r7_7))) + ((long double)this->pivot_offset.y)));
0045675e          this->pivot_offset.z = ((float)(((long double)((float)(((long double)var_188) * x87_r7_7))) + ((long double)this->pivot_offset.z)));
00456718      }
00456718      
00456766      class CPhysicsObj* eax_6 = CPhysicsObj::GetObjectA(this->pivot_object_id);
00456772      int32_t var_110;
00456772      int32_t eax_7;
00456772      
00456772      if (eax_6 != 0)
00456772      {
0045677f          var_110 = 0x796910;
0045678a          int32_t var_10c_1 = 0;
00456795          int32_t var_108 = 0x3f800000;
004567a0          int32_t var_104_1 = 0;
004567ab          int32_t var_100_1 = 0;
004567b6          int32_t var_fc_1 = 0;
004567c1          int32_t var_d4_1 = 0;
004567cc          int32_t var_d0_1 = 0;
004567d7          int32_t var_cc_1 = 0;
004567e2          Frame::cache(&var_108);
004567f1          eax_7 = CameraManager::QueryPivotPosition(this, &var_110);
00456772      }
00456772      
004567f8      class Frame* __saved_edi_8;
004567f8      uint32_t objcell_id;
004567f8      int32_t* __return_4;
004567f8      
004567f8      if ((eax_6 == 0 || eax_7 == 0))
004567f8      {
00457050          __return_4 = __return;
0045705e          *(uint32_t*)__return_4 = 0x796910;
00457064          objcell_id = arg3->objcell_id;
0045706a          __saved_edi_8 = &arg3->frame;
004567f8      }
004567f8      else
004567f8      {
004567fe          class Position* ebx_1 = arg3;
00456815          int32_t __return_3;
00456815          class AC1Legacy::Vector3* eax_8 = Position::localtoglobal(ebx_1, &__return_3, &var_110);
0045681c          float y_3 = eax_8->y;
0045681f          x_3 = eax_8->x;
00456823          float z_5 = eax_8->z;
00456826          bool cond:1_1 = (this->target_status & 2) == 0;
00456832          float x = 0f;
0045683a          float var_1bc_1 = 0f;
00456842          float var_1b8_1 = 0f;
0045684a          float x_2;
0045684a          float y_6;
0045684a          float z_6;
0045684a          float var_170;
0045684a          void var_88;
0045684a          
0045684a          if (!(cond:1_1))
0045684a          {
00456854              eax_8 = CPhysicsObj::GetObjectA(this->target_object_id);
00456854              
0045685e              if (eax_8 != 0)
0045685e              {
00456864                  int32_t target_part_index = this->target_part_index;
0045686a                  void* edx_2;
0045686a                  
0045686a                  if (target_part_index != 0xffffffff)
0045686c                      edx_2 = *(int32_t*)((char*)eax_8 + 0x10);
0045686c                  
00456872                  class Position* var_1d8_3;
00456872                  class AC1Legacy::Vector3* var_1d4_4;
00456872                  
00456872                  if ((target_part_index == 0xffffffff || target_part_index >= *(uint32_t*)((char*)edx_2 + 0x58)))
00456872                  {
0045689f                      var_1d4_4 = &this->target_offset;
004568a3                      var_1d8_3 = &eax_8[6];
00456872                  }
00456872                  else
00456872                  {
00456889                      Position::Position(&var_88, *(int32_t*)((char*)eax_8 + 0x4c), (*(uint32_t*)(*(uint32_t*)((char*)edx_2 + 0x5c) + (target_part_index << 2)) + 0x38));
00456891                      var_1d4_4 = &this->target_offset;
00456899                      var_1d8_3 = &var_88;
00456872                  }
00456872                  
004568ab                  class AC1Legacy::Vector3* eax_12 = Position::localtoglobal(ebx_1, &__return_3, var_1d8_3, var_1d4_4);
004568b2                  float y_4 = eax_12->y;
004568b5                  float z_3 = eax_12->z;
004568b8                  x_2 = eax_12->x;
004568c4                  y_6 = y_4;
004568c8                  z_6 = z_3;
004568d0                  var_170 = ((float)(((long double)x_2) - ((long double)x_3)));
004568dc                  float var_16c_1 = ((float)(((long double)y_6) - ((long double)y_3)));
004568e8                  float var_168_1 = ((float)(((long double)z_6) - ((long double)z_5)));
004568e8                  
004568f3                  if (AC1Legacy::Vector3::normalize_check_small(&var_170) == 0)
004568f3                  {
004568fd                      x = ((float)(((long double)var_170) + ((long double)x)));
00456909                      var_1bc_1 = ((float)(((long double)var_16c_1) + ((long double)var_1bc_1)));
00456915                      var_1b8_1 = ((float)(((long double)var_168_1) + ((long double)var_1b8_1)));
004568f3                  }
0045685e              }
0045684a          }
0045684a          
00456919          eax_8 = this->m_bAlignCameraToSlope;
00456928          float __return_2;
00456928          float x_1;
00456928          
00456928          if ((eax_8 != 0 && (this->target_status & 0x10) != 0))
00456928          {
00456935              CPhysicsObj::get_velocity(eax_6, &x_2);
00456944              this->old_velocities[0].x = this->old_velocities[1].x;
00456944              this->old_velocities[0].y = this->old_velocities[1].y;
00456944              this->old_velocities[0].z = this->old_velocities[1].z;
0045693e              this->old_velocities[1].x = this->old_velocities[2].x;
00456979              float var_1a0_1 = ((float)(((long double)z_6) + ((long double)this->old_velocities[0].z)));
0045693e              this->old_velocities[1].y = this->old_velocities[2].y;
0045693e              this->old_velocities[1].z = this->old_velocities[2].z;
0045698f              x_1 = ((float)((((long double)x_2) + ((long double)this->old_velocities[0].x)) + ((long double)this->old_velocities[1].x)));
0045696d              this->old_velocities[2].x = this->old_velocities[3].x;
0045696d              this->old_velocities[2].y = this->old_velocities[3].y;
0045696d              this->old_velocities[2].z = this->old_velocities[3].z;
004569bd              x_1 = ((float)(((long double)x_1) + ((long double)this->old_velocities[2].x)));
004569c6              float var_1a4_1 = ((float)(((((long double)y_6) + ((long double)this->old_velocities[0].y)) + ((long double)this->old_velocities[1].y)) + ((long double)this->old_velocities[2].y)));
0045699d              this->old_velocities[3].x = this->old_velocities[4].x;
0045699d              this->old_velocities[3].y = this->old_velocities[4].y;
0045699d              this->old_velocities[3].z = this->old_velocities[4].z;
004569eb              x_1 = ((float)(((long double)x_1) + ((long double)this->old_velocities[3].x)));
004569f6              float var_1a4_2 = ((float)(((long double)var_1a4_1) + ((long double)this->old_velocities[3].y)));
004569fd              int32_t old_velocity_num = this->old_velocity_num;
004569fd              
00456a06              if (old_velocity_num < 5)
00456a09                  this->old_velocity_num = (old_velocity_num + 1);
00456a09              
004569cd              this->old_velocities[4].x = x_2;
00456a1f              long double x87_r6_20 = (((long double)1f) / ((long double)this->old_velocity_num));
004569cd              this->old_velocities[4].y = y_6;
004569cd              this->old_velocities[4].z = z_6;
00456a3f              float z_10 = ((float)((((((long double)var_1a0_1) + ((long double)this->old_velocities[1].z)) + ((long double)this->old_velocities[2].z)) + ((long double)this->old_velocities[3].z)) * x87_r6_20));
00456a47              float z_9 = z_10;
00456a4b              __return_2 = ((float)(((long double)x_1) * x87_r6_20));
00456a59              float y_9 = ((float)(((long double)var_1a4_2) * x87_r6_20));
00456a67              x_2 = __return_2;
00456a76              class AC1Legacy::Vector3* __return_1;
00456a76              class AC1Legacy::Vector3* var_1d4_9;
00456a76              class AC1Legacy::Vector3* eax_28;
00456a76              class Position* ecx_27;
00456a76              
00456a76              if (AC1Legacy::Vector3::normalize_check_small(&x_2) != 0)
00456a76              {
00456dba              label_456dba:
00456dba                  
00456dbe                  if ((this->target_status & 1) != 0)
00456dbe                  {
00456dc7                      var_1d4_9 = &this->direction;
00456dcc                      __return_1 = &__return_3;
00456dcd                      ecx_27 = &eax_6->m_position;
00456dd0                  label_456dd0:
00456dd0                      eax_28 = Position::localtoglobalvec(ecx_27, __return_1, var_1d4_9);
00456ddb                  label_456ddb:
00456ddb                      x = ((float)(((long double)x) + ((long double)eax_28->x)));
00456de6                      var_1bc_1 = ((float)(((long double)var_1bc_1) + ((long double)eax_28->y)));
00456c76                      var_1b8_1 = ((float)(((long double)var_1b8_1) + ((long double)eax_28->z)));
00456dbe                  }
00456a76              }
00456a76              else
00456a76              {
00456a7c                  long double x87_r7_33 = ((long double)0.000199999995f);
00456a86                  long double x87_r6_23 = fabsl(((long double)x_2));
00456a88                  (x87_r6_23 - x87_r7_33);
00456a8a                  int32_t eax_19;
00456a8a                  eax_19 = ((((x87_r6_23 < x87_r7_33) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_23, x87_r7_33))) ? 1 : 0) << 0xa) | ((((x87_r6_23 == x87_r7_33) ? 1 : 0) << 0xe) | 0x3800))));
00456a8c                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00456a8c                  
00456a8f                  if (!(p_1))
00456a8f                      goto label_456dba;
00456a8f                  
00456a99                  long double x87_r6_25 = fabsl(((long double)y_9));
00456a9b                  (x87_r6_25 - x87_r7_33);
00456a9d                  eax_19 = ((((x87_r6_25 < x87_r7_33) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_25, x87_r7_33))) ? 1 : 0) << 0xa) | ((((x87_r6_25 == x87_r7_33) ? 1 : 0) << 0xe) | 0x3800))));
00456aa1                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00456aa1                  
00456aa4                  if (!(p_2))
00456aa4                      goto label_456dba;
00456aa4                  
00456ab1                  float y_1;
00456ab1                  float z_1;
00456ab1                  
00456ab1                  if ((eax_6->transient_state & 1) == 0)
00456ab1                  {
00456ae0                      float var_194_1 = ((float)(((long double)z_10) * ((long double)0.100000001f)));
00456ae0                      
00456aeb                      if (AC1Legacy::Vector3::normalize_check_small(&x_2) == 0)
00456aeb                      {
00456b26                          Frame::Frame(&var_88);
00456b37                          Frame::set_vector_heading(&var_88, &x_2);
00456b51                          float var_60;
00456b51                          __return_2 = var_60;
00456b55                          float y_7;
00456b55                          y_9 = y_7;
00456b59                          float z_7;
00456b59                          z_9 = z_7;
00456b5d                          x_1 = var_60;
00456b61                          y_1 = y_7;
00456b65                          z_1 = z_7;
00456aeb                      }
00456aeb                      else
00456aeb                      {
00456aed                          __return_2 = 0f;
00456af9                          y_9 = 0f;
00456b05                          z_9 = 1f;
00456b11                          x_1 = __return_2;
00456b15                          y_1 = 0f;
00456b19                          z_1 = 1f;
00456aeb                      }
00456ab1                  }
00456ab1                  else
00456ab1                  {
00456ac1                      x_1 = eax_6->contact_plane.N.x;
00456ac5                      y_1 = eax_6->contact_plane.N.y;
00456ac9                      z_1 = eax_6->contact_plane.N.z;
00456ab1                  }
00456ab1                  
00456b78                  __return_3 = 0;
00456b80                  int32_t var_180_1 = 0x3f800000;
00456b88                  int32_t var_17c_1 = 0;
00456b90                  Position::localtoglobalvec(&eax_6->m_position, &__return_2, &__return_3);
00456baa                  class Position* var_1d8_5 = &eax_6->m_position;
00456bbf                  float* eax_24 = operator*(&__return_3, ((float)(((((long double)__return_2) * ((long double)x_1)) + (((long double)z_1) * ((long double)z_9))) + (((long double)y_1) * ((long double)y_9)))), &x_1);
00456bc6                  long double x87_r6_30 = ((long double)eax_24[1]);
00456bc9                  float edx_18 = eax_24[2];
00456bdd                  var_170 = ((float)(((long double)__return_2) - ((long double)*(uint32_t*)eax_24)));
00456be7                  float var_16c_2 = ((float)(((long double)y_9) - x87_r6_30));
00456bf7                  float var_168_2 = ((float)(((long double)z_9) - ((long double)edx_18)));
00456c00                  bool cond:2_1 = AC1Legacy::Vector3::normalize_check_small(&var_170) == 0;
00456c02                  int32_t eax_25;
00456c02                  eax_25 = this->target_status;
00456c02                  
00456c05                  if (cond:2_1)
00456c05                  {
00456c1d                      if ((eax_25 & 1) != 0)
00456c1d                      {
00456c26                          Frame::Frame(&var_88);
00456c37                          Frame::set_vector_heading(&var_88, &var_170);
00456c4c                          eax_28 = Frame::localtoglobalvec(&var_88, &__return_3, &this->direction);
00456c51                          goto label_456ddb;
00456c1d                      }
00456c1d                      
00456c5e                      x = ((float)(((long double)var_170) + ((long double)x)));
00456c6a                      var_1bc_1 = ((float)(((long double)var_16c_2) + ((long double)var_1bc_1)));
00456c76                      var_1b8_1 = ((float)(((long double)var_168_2) + ((long double)var_1b8_1)));
00456c05                  }
00456c05                  else if ((eax_25 & 1) != 0)
00456c09                  {
00456c12                      var_1d4_9 = &this->direction;
00456c13                      __return_1 = &__return_3;
00456c14                      ecx_27 = &eax_6->m_position;
00456c16                      goto label_456dd0;
00456c09                  }
00456a76              }
00456c7a              ebx_1 = arg3;
00456928          }
00456928          else if ((this->target_status & 1) != 0)
00456dfa          {
00456e0c              class AC1Legacy::Vector3* eax_38 = Position::localtoglobalvec(&eax_6->m_position, &__return_3, &this->direction);
00456e17              x = ((float)(((long double)x) + ((long double)eax_38->x)));
00456e22              var_1bc_1 = ((float)(((long double)var_1bc_1) + ((long double)eax_38->y)));
00456e2d              var_1b8_1 = ((float)(((long double)var_1b8_1) + ((long double)eax_38->z)));
00456dfa          }
00456dfa          
00456c8d          float var_160_1 = var_1bc_1;
00456c95          float x_4 = x;
00456c99          float var_15c_1 = var_1b8_1;
00456c99          
00456ca4          if (AC1Legacy::Vector3::normalize_check_small(&x_4) != 0)
00456ca4          {
00456cb2              class AC1Legacy::Vector3* eax_32 = Position::localtoglobalvec(&eax_6->m_position, &__return_3, &this->direction);
00456cb9              x_4 = eax_32->x;
00456cc0              float y_2 = eax_32->y;
00456cc7              float z_2 = eax_32->z;
00456ca4          }
00456ca4          
00456cd7          float x_5 = x_3;
00456ce2          float y_8 = y_3;
00456cf1          float z_8 = z_5;
00456cf8          void var_40;
00456cf8          Frame::set_vector_heading(&var_40, &x_4);
00456d0d          class AC1Legacy::Vector3* eax_34 = Frame::localtoglobal(&var_40, &__return_3, &this->viewer_offset);
00456d1b          float y_5 = eax_34->y;
00456d25          float z_4 = eax_34->z;
00456d25          
00456d33          if ((this->target_status & 4) != 0)
00456d33          {
00456d44              __return_2 = ((float)(((long double)x_3) - ((long double)eax_34->x)));
00456d50              x_4 = __return_2;
00456d5f              float var_1b0_1 = ((float)(((long double)y_3) - ((long double)y_5)));
00456d76              float var_1ac_1 = ((float)(((long double)z_5) - ((long double)z_4)));
00456d89              float eax_37;
00456d89              float ecx_42;
00456d89              float edx_24;
00456d89              
00456d89              if (AC1Legacy::Vector3::normalize_check_small(&x_4) == 0)
00456d89              {
00456e36                  ecx_42 = x_4;
00456e3a                  edx_24 = var_1b0_1;
00456e3e                  eax_37 = var_1ac_1;
00456d89              }
00456d89              else
00456d89              {
00456d8f                  __return_2 = 0f;
00456d97                  ecx_42 = __return_2;
00456da3                  edx_24 = 0f;
00456daf                  eax_37 = 0f;
00456d89              }
00456d89              
00456e42              x = ecx_42;
00456e46              float var_1bc_2 = edx_24;
00456e4a              float var_1b8_2 = eax_37;
00456d33          }
00456d33          
00456e59          if (AC1Legacy::Vector3::normalize_check_small(&x) != 0)
00456e59          {
00456e67              class AC1Legacy::Vector3* eax_40 = Position::localtoglobalvec(&eax_6->m_position, &__return_3, &this->direction);
00456e6e              x = eax_40->x;
00456e75              float y = eax_40->y;
00456e7c              float z = eax_40->z;
00456e59          }
00456e59          
00456e8c          void var_c8;
00456e8c          Frame::set_vector_heading(&var_c8, &x);
00456e94          x_1 = ((double)((long double)this->t_stiffness));
00456e9e          long double x87_r7_69 = (((long double)1.0) - ((long double)0.000199999995f));
00456ea4          long double x87_r6_31 = ((long double)x_1);
00456ea8          (x87_r6_31 - x87_r7_69);
00456eaf          int32_t edi_6;
00456eaf          
00456eaf          if ((*(uint8_t*)((char*)((((x87_r6_31 < x87_r7_69) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_31, x87_r7_69))) ? 1 : 0) << 0xa) | ((((x87_r6_31 == x87_r7_69) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
00456eaf          {
00456ebc              edi_6 = 0;
00456ec2              long double x87_r6_34 = ((((long double)x_1) * ((long double)var_178)) * ((long double)10.0));
00456ec8              x_1 = ((float)x87_r6_34);
00456ecc              long double temp1_1 = ((long double)1.0);
00456ecc              (x87_r6_34 - temp1_1);
00456ecc              
00456ed7              if ((*(uint8_t*)((char*)((((x87_r6_34 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_34, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_34 == temp1_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00456ed9                  x_1 = 1f;
00456eaf          }
00456eaf          else
00456eaf          {
00456eb1              edi_6 = 1;
00456ed9              x_1 = 1f;
00456eaf          }
00456eaf          
00456ee1          long double x87_r6_35 = ((long double)this->r_stiffness);
00456ee4          x_2 = ((double)x87_r6_35);
00456ee8          (x87_r6_35 - x87_r7_69);
00456ef1          int32_t ebp_1;
00456ef1          
00456ef1          if ((*(uint8_t*)((char*)((((x87_r6_35 < x87_r7_69) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_35, x87_r7_69))) ? 1 : 0) << 0xa) | ((((x87_r6_35 == x87_r7_69) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
00456ef1          {
00456efe              ebp_1 = 0;
00456f04              long double x87_r7_72 = ((((long double)x_2) * ((long double)var_178)) * ((long double)10.0));
00456f0a              var_178 = ((float)x87_r7_72);
00456f0e              long double temp2_1 = ((long double)1.0);
00456f0e              (x87_r7_72 - temp2_1);
00456f0e              
00456f19              if ((*(uint8_t*)((char*)((((x87_r7_72 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_72, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_72 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00456f1b                  var_178 = 0x3f800000;
00456ef1          }
00456ef1          else
00456ef1          {
00456ef3              ebp_1 = 1;
00456f1b              var_178 = 0x3f800000;
00456ef1          }
00456ef1          
00456f2a          int32_t var_158 = 0x796910;
00456f32          int32_t var_154_1 = 0;
00456f3a          int32_t var_150 = 0x3f800000;
00456f45          int32_t var_14c_1 = 0;
00456f50          int32_t var_148_1 = 0;
00456f5b          int32_t var_144_1 = 0;
00456f66          int32_t var_11c_1 = 0;
00456f71          int32_t var_118_1 = 0;
00456f7c          int32_t var_114_1 = 0;
00456f87          Frame::cache(&var_150);
00456f90          uint32_t objcell_id_1 = ebx_1->objcell_id;
00456fae          Frame::interpolate_origin(&var_150, &ebx_1->frame, &var_c8, x_1);
00456fc8          Frame::interpolate_rotation(&var_150, &ebx_1->frame, &var_c8, var_178);
00456fcd          long double x87_r7_73 = ((long double)0.000199999995f);
00456fdd          x_1 = 0.000199999995f;
00456fe1          var_178 = ((float)(x87_r7_73 + x87_r7_73));
00456fe1          
00456fe6          if (edi_6 == 0)
00456fe6          {
00456fed              class AC1Legacy::Vector3* eax_44;
00456fed              long double st0_3;
00456fed              eax_44 = Position::distance(&var_158, ebx_1);
00456ff2              long double temp3_1 = ((long double)var_178);
00456ff2              (st0_3 - temp3_1);
00456ff6              eax_44 = ((((st0_3 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_3, temp3_1))) ? 1 : 0) << 0xa) | ((((st0_3 == temp3_1) ? 1 : 0) << 0xe) | 0))));
00456ff8              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00456ff8              
00456fff              if (((!(p_3) && ebp_1 == 0) && Frame::close_rotation(&var_150, &ebx_1->frame, x_1) != 0))
00456fff              {
00457025                  Position::Position(__return, ebx_1);
00457035                  return;
00456fff              }
00456fe6          }
00456fe6          
00457038          __return_4 = __return;
0045703f          objcell_id = objcell_id_1;
00457047          *(uint32_t*)__return_4 = 0x796910;
0045704d          __saved_edi_8 = &var_150;
004567f8      }
004567f8      
0045706b      __return_4[1] = objcell_id;
00457071      Frame::operator=(&__return_4[2], __saved_edi_8);
00456660  }

00457084              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00457090  void __fastcall CameraManager::CameraManager(class CameraManager* this)

00457090  {
00457098      this->vtable = &IInputActionCallback::`vftable';
0045709f      this->vtable = 0x79baac;
004570a5      this->vtable = &CameraManager::`vftable';
004570b1      this->t_stiffness = 0.449999988f;
004570b4      this->r_stiffness = 0.449999988f;
004570ba      this->pivot_object_id = 0;
004570c0      this->pivot_part_index = 0xffffffff;
004570c3      this->pivot_offset.x = 0;
004570c6      this->pivot_offset.y = 0f;
004570c9      this->pivot_offset.z = 0f;
004570cc      this->target_part_index = 0xffffffff;
004570cf      this->target_object_id = 0;
004570d2      this->target_offset.x = 0;
004570d5      this->target_offset.y = 0f;
004570d8      this->target_offset.z = 0f;
004570db      this->direction.x = 0;
004570de      this->direction.z = 0f;
004570e6      this->direction.y = 1f;
004570e9      this->target_status = LOOK_IN_DIRECTION;
004570f0      this->viewer_offset.x = 0;
004570f3      this->viewer_offset.y = -3f;
004570fa      this->viewer_offset.z = 0f;
004570fd      this->m_rCameraStiffness = 0.449999988f;
00457100      this->m_rMovementSpeed = 1f;
00457103      this->scale = 1f;
00457106      this->m_bAlignCameraToSlope = 1;
0045710a      this->m_rCameraAdjustmentSpeed = 40f;
00457111      this->m_dwPivotOffsetMovement = 0;
00457114      this->m_dwCameraOffsetMovement = 0;
00457117      __builtin_memset(&this->last_update_time, 0, 0x48);
00457123      this->m_bEnabled = 1;
0045712a      this->m_pCurrentCameraSet = nullptr;
0045716f      int32_t var_c = 0;
00457173      int32_t var_8 = 0;
00457177      int32_t var_4 = 0;
0045717b      int32_t var_c_1 = 0;
0045717f      int32_t var_8_1 = 0;
00457183      int32_t var_4_1 = 0;
00457187      int32_t var_c_2 = 0;
0045718b      int32_t var_8_2 = 0;
0045718f      int32_t var_4_2 = 0;
00457196      int32_t var_c_3 = 0;
0045719a      int32_t var_8_3 = 0;
0045719e      int32_t var_4_3 = 0;
004571a5      int32_t var_c_4 = 0;
004571a9      int32_t var_8_4 = 0;
004571ad      int32_t var_4_4 = 0;
004571ca      class PStringBase<char> var_14;
004571ca      PStringBase<char>::PStringBase<char>(&var_14, "Whether the camera should align …");
004571ca      
004571d1      if (this != 0xffffffac)
004571e4          GlobalRegistry::RegisterVariableInternal(&this->m_bAlignCameraToSlope, GRVDataType_Bool, &Camera_AlignToSlope, &var_14, nullptr, 0, nullptr, nullptr);
004571e4      
004571ec      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
004571ec      
004571f3      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
004571f3      {
004571fa          void* eax_2 = operator new(0x8100);
004571fa          
00457204          if (eax_2 == 0)
0045720f              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00457204          else
00457208              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_2);
00457208          
00457211          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
004571f3      }
004571f3      
00457229      class GRPObject* var_10;
00457229      
00457229      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, &Camera_AlignToSlope, &var_10) != 0)
00457229      {
00457231          void* eax_5 = var_10->vtable->AsTypedVariableObject();
00457231          
00457236          if (eax_5 != 0)
00457238              *(uint8_t*)((char*)eax_5 + 0x28) = 1;
00457229      }
00457229      
00457240      int32_t* ebp_2 = (var_14 - 0x14);
00457240      
00457253      if ((InterlockedDecrement(&ebp_2[1]) == 0 && ebp_2 != 0))
0045725c          **(uint32_t**)ebp_2(1);
0045725c      
00457267      PStringBase<char>::PStringBase<char>(&var_14, "How quickly the camera responds …");
00457267      
0045726e      if (this != 0xffffffa8)
00457285          GlobalRegistry::RegisterVariableInternal(&this->m_rCameraStiffness, GRVDataType_Float32, &Camera_Stiffness, &var_14, CameraManager::OnStiffnessChanged, 0, nullptr, nullptr);
00457285      
0045728d      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry;
0045728d      
00457294      if (GlobalRegistry::s_pcGlobalRegistry_2 == 0)
00457294      {
0045729b          void* eax_7 = operator new(0x8100);
0045729b          
004572a5          if (eax_7 == 0)
004572b0              GlobalRegistry::s_pcGlobalRegistry_2 = nullptr;
004572a5          else
004572a9              GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistryInstance::GlobalRegistryInstance(eax_7);
004572a9          
004572b2          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_2;
00457294      }
00457294      
004572ca      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_2, &Camera_Stiffness, &var_10) != 0)
004572ca      {
004572d2          void* eax_9 = var_10->vtable->AsTypedVariableObject();
004572d2          
004572d7          if (eax_9 != 0)
004572d9              *(uint8_t*)((char*)eax_9 + 0x28) = 1;
004572ca      }
004572ca      
004572e7      int32_t* ebx_2 = (var_14 - 0x14);
004572e7      
004572f6      if ((InterlockedDecrement(&ebx_2[1]) == 0 && ebx_2 != 0))
004572fe          **(uint32_t**)ebx_2(1);
004572fe      
00457309      PStringBase<char>::PStringBase<char>(&var_14, "How quickly the camera moves in …");
00457309      
00457313      if (this != 0xffffffa4)
00457326          GlobalRegistry::RegisterVariableInternal(&this->m_rCameraAdjustmentSpeed, GRVDataType_Float32, &Camera_AdjustmentSpeed, &var_14, nullptr, 0, nullptr, nullptr);
00457326      
0045732e      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_3 = GlobalRegistry::s_pcGlobalRegistry;
0045732e      
00457335      if (GlobalRegistry::s_pcGlobalRegistry_3 == 0)
00457335      {
0045733c          class GlobalRegistryInstance* eax_13 = operator new(0x8100);
0045733c          
00457346          if (eax_13 == 0)
00457351              GlobalRegistry::s_pcGlobalRegistry_3 = nullptr;
00457346          else
0045734a              GlobalRegistry::s_pcGlobalRegistry_3 = GlobalRegistryInstance::GlobalRegistryInstance(eax_13);
0045734a          
00457353          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_3;
00457335      }
00457335      
0045736b      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_3, &Camera_AdjustmentSpeed, &var_10) != 0)
0045736b      {
00457373          void* eax_16 = var_10->vtable->AsTypedVariableObject();
00457373          
00457378          if (eax_16 != 0)
0045737a              *(uint8_t*)((char*)eax_16 + 0x28) = 1;
0045736b      }
0045736b      
00457382      int32_t* ebx_4 = (var_14 - 0x14);
00457382      
00457391      if ((InterlockedDecrement(&ebx_4[1]) == 0 && ebx_4 != 0))
00457399          **(uint32_t**)ebx_4(1);
00457399      
0045739b      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045739b      
004573a3      if (ICIDM::s_cidm_1 != 0)
004573a5          ICIDM::s_cidm_1->vtable->RegisterInputMap(5, &this->vtable, 0x3e8);
00457090  }

004573bf                                                                                               90                                 .

004573c0  uint8_t __thiscall CameraManager::SetStiffness(class CameraManager* this, float arg2)

004573c0  {
004573d0      int32_t eax;
004573d0      
004573d0      if ((CameraManager::SetTranslationalStiffness(this, arg2) != 0 && CameraManager::SetRotationalStiffness(this, arg2) != 0))
004573d0      {
004573df          eax = 1;
004573e2          return 1;
004573d0      }
004573d0      
004573e6      eax = 0;
004573e9      return 0;
004573c0  }

004573ec                                      90 90 90 90                                                              ....

004573f0  void __fastcall CameraSet::StopRotating(class CameraSet* this, int32_t arg2)

004573f0  {
004573f2      this->rot_left = 0;
004573f5      this->rot_right = 0;
004573f8      this->m_ttLastRotate = 0f;
004573fb      *(uint32_t*)((char*)this->m_ttLastRotate)[4] = 0;
004573f0  }

00457401     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00457410  void __fastcall CameraSet::StopRaising(class CameraSet* this)

00457410  {
00457412      this->raise = 0;
00457415      this->m_ttLastRaiseOrLower = 0f;
00457418      *(uint32_t*)((char*)this->m_ttLastRaiseOrLower)[4] = 0;
00457410  }

0045741c                                                                                      90 90 90 90                              ....

00457420  void __fastcall CameraSet::StopLowering(class CameraSet* this)

00457420  {
00457422      this->lower = 0;
00457425      this->m_ttLastRaiseOrLower = 0f;
00457428      *(uint32_t*)((char*)this->m_ttLastRaiseOrLower)[4] = 0;
00457420  }

0045742c                                      90 90 90 90                                                              ....

00457430  void __fastcall CameraSet::StopCloser(class CameraSet* this)

00457430  {
00457432      this->closer = 0;
00457435      this->m_ttLastZoom = 0f;
00457438      *(uint32_t*)((char*)this->m_ttLastZoom)[4] = 0;
00457430  }

0045743c                                                                                      90 90 90 90                              ....

00457440  void __fastcall CameraSet::StopFarther(class CameraSet* this)

00457440  {
00457442      this->farther = 0;
00457445      this->m_ttLastZoom = 0f;
00457448      *(uint32_t*)((char*)this->m_ttLastZoom)[4] = 0;
00457440  }

0045744c                                      90 90 90 90                                                              ....

00457450  int32_t __stdcall CameraSet::InHead(class CameraSet* this @ ecx, class AC1Legacy::Vector3 arg2)

00457450  {
00457450      long double x87_r7 = ((long double)arg2.x);
00457454      long double temp1 = ((long double)0f);
00457454      (x87_r7 - temp1);
0045745a      int32_t eax;
0045745a      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0045745c      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0045745c      
0045745f      if (!(p))
0045745f      {
00457461          long double x87_r7_1 = ((long double)arg2.y);
00457465          long double temp2_1 = ((long double)0.180000007f);
00457465          (x87_r7_1 - temp2_1);
0045746b          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0045746d          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0045746d          
00457470          if (!(p_1))
00457470          {
00457472              long double x87_r7_2 = ((long double)arg2.z);
00457476              long double temp3_1 = ((long double)0f);
00457476              (x87_r7_2 - temp3_1);
0045747c              eax = ((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0045747e              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0045747e              
00457481              if (!(p_2))
00457488                  return 1;
00457470          }
0045745f      }
0045745f      
0045748d      return 0;
00457450  }


00457490  void __thiscall CameraSet::ToggleMouseLook(class CameraSet* this, int32_t arg2)

00457490  {
0045749d      if (this->mouselook_active != arg2)
0045749d      {
004574a3          class SmartBox* sbox = this->sbox;
004574a7          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004574ad          this->mouselook_active = arg2;
004574b0          sbox->cmdinterp->vtable->SetMouseLookActive(arg2);
004574b0          
004574c4          if (this->mouselook_active != 0)
004574c4          {
004574c6              this->mouselook_x_extent = 0;
004574cc              this->mouselook_y_extent = 0;
004574c4          }
004574c4          
004574d7          int32_t ecx_1;
004574d7          ecx_1 = arg2 != 0;
004574d2          ICIDM::s_cidm_1->vtable->SetMouseLookMode(ecx_1);
004574d2          
004574e9          if (*(int32_t*)((char*)ICIDM::s_cidm_1 + 0x89) != 0)
004574e9          {
004574eb              this->sbox->cmdinterp->vtable->MovePlayer(0xc0000c1, arg2, 0x3f800000, 1, 1);
004574eb              
0045750d              if (arg2 == 0)
0045750f                  this->sbox->cmdinterp->vtable->ApplyCurrentMovement();
0045750f              
0045751d              this->sbox->cmdinterp->vtable->SendMovementEvent();
004574e9          }
0045749d      }
00457490  }


00457530  void __stdcall CameraSet::FilterMouseInput(class CameraSet* this @ ecx, float const arg2, float const arg3, float const arg4, float* arg5, float* arg6)

00457530  {
00457530      Timer::compute_local_time();
0045753b      long double x87_r0;
0045753b      long double x87_r7_1 = (x87_r0 - ((long double)s_LastFilterRealLocalTime));
0045753d      long double temp1 = ((long double)0.25);
0045753d      (x87_r7_1 - temp1);
00457548      long double x87_r6;
00457548      long double x87_r7_2;
00457548      
00457548      if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00457548      {
0045755e          x87_r7_2 = ((((long double)s_LastDeltaX) + ((long double)arg2)) * ((long double)0.5f));
0045756e          x87_r6 = ((((long double)s_LastDeltaY) + ((long double)arg3)) * ((long double)0.5f));
00457548      }
00457548      else
00457548      {
0045754a          x87_r7_2 = ((long double)arg2);
0045754e          x87_r6 = ((long double)arg3);
00457548      }
00457548      
0045757e      long double x87_r5_1 = (((long double)1f) - ((long double)arg4));
00457596      *(uint32_t*)arg5 = ((float)((((long double)arg2) * x87_r5_1) + (x87_r7_2 * ((long double)arg4))));
004575a4      long double x87_r7_10 = ((x87_r5_1 * ((long double)arg3)) + (x87_r6 * ((long double)arg4)));
004575a8      *(uint32_t*)arg6 = ((float)x87_r7_10);
004575ac      s_LastDeltaX = *(uint32_t*)arg5;
004575b2      s_LastDeltaY = ((float)x87_r7_10);
004575b8      s_LastFilterRealLocalTime = ((double)x87_r0);
00457530  }

004575c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004575d0  int32_t __fastcall AC1Legacy::Vector3::get_heading(class AC1Legacy::Vector3 const* this)

004575d0  {
004575d5      float y = this->y;
004575e0      float x = this->x;
004575e4      int32_t var_4 = 0;
004575ec      int32_t result = AC1Legacy::Vector3::normalize_check_small(&x);
004575ec      
004575f3      if (result == 0)
00457627          return j__CIfmod(((float)(((long double)450.0) - (__fpatan(((long double)x), ((long double)y)) * ((long double)57.295779513082323)))));
00457627      
004575fe      return result;
004575d0  }

00457628                          90 90 90 90 90 90 90 90                                                          ........

00457630  int32_t __fastcall AC1Legacy::Vector3::get_pitch(class AC1Legacy::Vector3 const* this)

00457630  {
00457635      float y = this->y;
00457638      float x = this->x;
0045763c      this->z;
00457643      float y_1 = y;
0045764b      int32_t result = AC1Legacy::Vector3::normalize_check_small(&x);
0045764b      
00457652      if (result == 0)
00457670          return j__CIasin();
00457670      
0045765d      return result;
00457630  }

00457671                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00457680  int32_t __fastcall CameraSet::InHead(class CameraSet* this)

00457680  {
00457683      class CameraManager* cm = this->cm;
00457686      long double x87_r7 = ((long double)cm->viewer_offset.x);
0045768c      long double temp0 = ((long double)0f);
0045768c      (x87_r7 - temp0);
004576a0      class AC1Legacy::Vector3* eax;
004576a0      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
004576a2      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004576a2      
004576a5      if (!(p))
004576a5      {
004576a7          long double x87_r7_1 = ((long double)cm->viewer_offset.y);
004576ab          long double temp1_1 = ((long double)0.180000007f);
004576ab          (x87_r7_1 - temp1_1);
004576b1          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004576b3          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004576b3          
004576b6          if (!(p_1))
004576b6          {
004576b8              long double x87_r7_2 = ((long double)cm->viewer_offset.z);
004576bc              long double temp2_1 = ((long double)0f);
004576bc              (x87_r7_2 - temp2_1);
004576c2              eax = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
004576c4              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
004576c4              
004576c7              if (!(p_2))
004576d1                  return 1;
004576b6          }
004576a5      }
004576a5      
004576d7      return 0;
00457680  }

004576d8                                                                          90 90 90 90 90 90 90 90                          ........

004576e0  void __thiscall CameraSet::SetTargetForOffset(class CameraSet* this, class AC1Legacy::Vector3 arg2)

004576e0  {
004576e6      CameraManager::ClearTarget(this->cm);
004576e6      
004576f0      if (this->looking_down == 0)
004576f0      {
004576f2          long double x87_r7_1 = ((long double)arg2.x);
004576f6          long double temp1_1 = ((long double)0f);
004576f6          (x87_r7_1 - temp1_1);
004576fc          int32_t eax;
004576fc          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004576fe          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004576fe          
00457701          if (p_1)
00457701          {
00457740          label_457740:
00457740              
00457742              if (this->targeting != 0)
00457742              {
00457749                  CameraManager::SetTarget(this->cm, 0x6);
0045774f                  return;
00457742              }
00457742              
00457752              long double x87_r7_4 = ((long double)arg2.x);
00457756              long double temp3 = ((long double)1.0);
00457756              (x87_r7_4 - temp3);
0045775c              int32_t eax_1;
0045775c              eax_1 = ((((x87_r7_4 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3) ? 1 : 0) << 0xe) | 0))));
0045775e              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
0045775e              
00457761              if (p_4)
004577e2                  CameraManager::SetTarget(this->cm, LOOK_AT_PIVOT);
00457761              else
00457761              {
00457763                  long double x87_r7_5 = ((long double)arg2.x);
00457767                  long double temp5_1 = ((long double)-1.0);
00457767                  (x87_r7_5 - temp5_1);
0045776d                  eax_1 = ((((x87_r7_5 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp5_1) ? 1 : 0) << 0xe) | 0))));
0045776d                  
00457772                  if ((*(uint8_t*)((char*)eax_1)[1] & 1) != 0)
004577e2                      CameraManager::SetTarget(this->cm, LOOK_AT_PIVOT);
00457772                  else
00457772                  {
00457774                      long double x87_r7_6 = ((long double)arg2.y);
00457778                      long double temp6_1 = ((long double)0.0);
00457778                      (x87_r7_6 - temp6_1);
0045777e                      eax_1 = ((((x87_r7_6 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp6_1) ? 1 : 0) << 0xe) | 0))));
00457780                      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
00457780                      
00457783                      if (p_5)
004577e2                          CameraManager::SetTarget(this->cm, LOOK_AT_PIVOT);
00457783                      else
00457783                      {
0045778a                          CameraManager::SetTarget(this->cm, ALIGN_WITH_PLANE);
00457793                          (((long double)arg2.y) - ((long double)-0.5f));
0045779b                          bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x41} */;
0045779b                          
0045779e                          if (!(p_6))
0045779e                          {
004577a0                              long double x87_r7_8 = ((long double)arg2.z);
004577a4                              long double temp9_1 = ((long double)-0.5f);
004577a4                              (x87_r7_8 - temp9_1);
004577a4                              
004577af                              if ((*(uint8_t*)((char*)((((x87_r7_8 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp9_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004577b6                                  CameraManager::SetTarget(this->cm, LOOK_IN_DIRECTION);
0045779e                          }
0045779e                          
004577bb                          long double x87_r7_9 = ((long double)arg2.z);
004577bf                          long double temp8_1 = ((long double)0.75f);
004577bf                          (x87_r7_9 - temp8_1);
004577bf                          
004577ca                          if ((*(uint8_t*)((char*)((((x87_r7_9 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp8_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
004577e2                              CameraManager::SetTarget(this->cm, LOOK_AT_PIVOT);
004577ca                          else
004577ca                          {
004577d0                              (((long double)arg2.z) - ((long double)-0.5f));
004577d8                              bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
004577d8                              
004577db                              if (!(p_7))
004577e2                                  CameraManager::SetTarget(this->cm, LOOK_AT_PIVOT);
004577ca                          }
00457783                      }
00457772                  }
00457761              }
00457761              
004577e8              return;
00457701          }
00457701          
00457703          long double x87_r7_2 = ((long double)arg2.y);
00457707          long double temp2_1 = ((long double)0.180000007f);
00457707          (x87_r7_2 - temp2_1);
0045770d          eax = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0045770f          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0045770f          
00457712          if (p_2)
00457712              goto label_457740;
00457712          
00457714          long double x87_r7_3 = ((long double)arg2.z);
00457718          long double temp4_1 = ((long double)0f);
00457718          (x87_r7_3 - temp4_1);
0045771e          eax = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00457720          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
00457720          
00457723          if (p_3)
00457723              goto label_457740;
00457723          
0045772a          CameraManager::SetTarget(this->cm, ALIGN_WITH_PLANE);
004576f0      }
004576f0      
00457734      CameraManager::SetTarget(this->cm, LOOK_IN_DIRECTION);
004576e0  }

004577eb                                   90 90 90 90 90                                                             .....

004577f0  void __thiscall CameraSet::SetStiffness(class CameraSet* this, float arg2)

004577f0  {
004577f8      this->current_stiffness = arg2;
004577f8      
00457802      if (CameraSet::InHead(this) != 0)
00457802      {
0045782c          CameraManager::SetRotationalStiffness(this->cm, arg2);
0045782c          return;
00457802      }
00457802      
00457804      class CameraManager* cm = this->cm;
00457804      
00457815      if (CameraManager::SetTranslationalStiffness(cm, arg2) != 0)
0045781a          CameraManager::SetRotationalStiffness(cm, arg2);
004577f0  }

00457836                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00457840  void __thiscall CameraSet::SetScale(class CameraSet* this, float arg2)

00457840  {
0045784e      if (CameraSet::InHead(this) == 0)
0045784e      {
00457854          class CameraManager* cm_1 = this->cm;
0045785a          float scale = cm_1->scale;
0045785e          long double x87_r7_1 = ((long double)scale);
00457862          long double temp1_1 = ((long double)arg2);
00457862          (x87_r7_1 - temp1_1);
00457866          float eax_1;
00457866          eax_1 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00457868          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00457868          
0045786b          if (p_1)
0045786b          {
00457871              long double x87_r7_2 = ((long double)cm_1->viewer_offset.x);
00457877              long double x87_r6_1 = ((long double)scale);
0045787e              long double temp2_1 = ((long double)1f);
0045787e              (x87_r6_1 - temp2_1);
00457884              float y = cm_1->viewer_offset.y;
00457888              float z = cm_1->viewer_offset.z;
0045788c              eax_1 = ((((x87_r6_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
0045788e              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0045788e              
00457891              if (!(p_2))
00457891                  goto label_4578d4;
00457891              
0045789d              long double x87_r7_3 = (((long double)1f) / ((long double)scale));
004578a1              float var_c_1 = ((float)(x87_r7_2 * x87_r7_3));
004578ab              y = ((float)(((long double)y) * x87_r7_3));
004578b5              z = ((float)(((long double)z) * x87_r7_3));
004578bb              long double x87_r7_4 = ((long double)arg2);
004578bf              long double temp3_1 = ((long double)1f);
004578bf              (x87_r7_4 - temp3_1);
004578c5              eax_1 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004578c7              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
004578c7              
004578ca              if (p_3)
004578ca              {
004578cc                  x87_r7_2 = ((long double)var_c_1);
004578d4              label_4578d4:
004578d4                  var_c_1 = ((float)(x87_r7_2 * ((long double)arg2)));
004578e0                  y = ((float)(((long double)y) * ((long double)arg2)));
004578ec                  z = ((float)(((long double)z) * ((long double)arg2)));
004578ca              }
004578ca              
004578fe              if (CameraManager::SetTranslationalStiffness(cm_1, 1f) != 0)
00457907                  CameraManager::SetRotationalStiffness(cm_1, 1f);
00457907              
0045790c              this->cm->scale = arg2;
00457921              int32_t* edx_3 = &this->cm->viewer_offset;
00457924              *(uint32_t*)edx_3 = var_c_1;
0045792a              edx_3[1] = y;
00457931              edx_3[2] = z;
00457943              float z_1 = z;
00457948              float y_1 = y;
0045794b              CameraSet::SetTargetForOffset(this, var_c_1);
00457950              float current_stiffness = this->current_stiffness;
00457953              class CameraManager* cm = this->cm;
0045795b              arg2 = current_stiffness;
0045795b              
00457966              if (CameraManager::SetTranslationalStiffness(cm, current_stiffness) != 0)
0045796b                  CameraManager::SetRotationalStiffness(cm, current_stiffness);
0045786b          }
0045784e      }
00457840  }

00457978                                                                          90 90 90 90 90 90 90 90                          ........

00457980  void __thiscall CameraSet::Raise(class CameraSet* this, int32_t arg2, float arg3)

00457980  {
00457992      this->raise = arg2;
00457995      this->lower = 0;
00457998      long double x87_r7 = ((long double)Timer::cur_time);
0045799e      double var_28 = ((double)x87_r7);
004579a3      long double x87_r6 = ((long double)this->m_ttLastRaiseOrLower);
004579a6      long double temp1 = ((long double)0.0);
004579a6      (x87_r6 - temp1);
004579ac      int32_t eax;
004579ac      eax = ((((x87_r6 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
004579ae      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004579ae      
004579b1      if (!(p))
004579c1          this->m_ttLastRaiseOrLower = ((double)(x87_r7 - (((long double)1.0) / ((long double)SceneTool::m_FramesPerSecond))));
004579c1      
004579c4      long double x87_r7_1 = (x87_r7 - ((long double)this->m_ttLastRaiseOrLower));
004579c7      long double x87_r6_4 = ((long double)0.000199999995f);
004579cd      (x87_r6_4 - x87_r7_1);
004579cf      eax = ((((x87_r6_4 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
004579cf      
004579d4      if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
004579d4      {
004579da          class CameraManager* cm = this->cm;
004579e6          float y = cm->viewer_offset.y;
004579ea          bool cond:0_1 = this->looking_down == 0;
004579ed          float x = cm->viewer_offset.x;
004579f1          float z = cm->viewer_offset.z;
004579f1          
004579f8          if (!(cond:0_1))
004579f8          {
00457a06              long double x87_r7_4 = -((((long double)10f) - ((long double)0.200000003f)));
00457a08              long double temp2_1 = ((long double)y);
00457a08              (x87_r7_4 - temp2_1);
00457a0c              float eax_1;
00457a0c              eax_1 = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00457a0e              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00457a0e              
00457a11              if (!(p_1))
00457a11              {
004579e0                  cm->viewer_offset.x = x;
004579e0                  cm->viewer_offset.y = ((float)(((long double)y) - ((long double)0.200000003f)));
004579e0                  cm->viewer_offset.z = z;
00457a11              }
00457a11              
00457a11              goto label_457cd4;
004579f8          }
004579f8          
00457a51          float z_1 = z;
00457a56          float y_2 = y;
00457a56          
00457a60          if (CameraSet::InHead(this, x) != 0)
00457a60          {
00457a62              class CameraManager* cm_1 = this->cm;
00457a68              x = cm_1->direction.x;
00457a6f              float y_1 = cm_1->direction.y;
00457a76              long double x87_r7_8 = (((long double)cm_1->direction.z) - ((long double)0.200000003f));
00457a80              long double temp4_1 = ((long double)0.800000012f);
00457a80              (x87_r7_8 - temp4_1);
00457a86              float eax_5;
00457a86              eax_5 = ((((x87_r7_8 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00457a86              
00457a8b              if ((*(uint8_t*)((char*)eax_5)[1] & 0x41) != 0)
00457a8b              {
00457aac                  long double x87_r7_10 = -(((long double)0.800000012f));
00457aae                  long double x87_r6_5 = ((long double)((float)x87_r7_8));
00457ab2                  (x87_r6_5 - x87_r7_10);
00457ab4                  eax_5 = ((((x87_r6_5 < x87_r7_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, x87_r7_10))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == x87_r7_10) ? 1 : 0) << 0xe) | 0x3800))));
00457ab6                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00457ab6                  
00457ab9                  if (p_2)
00457ad5                      CameraManager::SetTargetDirection(cm_1, &x);
00457ab9                  else
00457ab9                  {
00457abf                      float var_c_4 = ((float)x87_r7_10);
00457ac4                      CameraManager::SetTargetDirection(cm_1, &x);
00457ab9                  }
00457a8b              }
00457a8b              else
00457a8b              {
00457a98                  int32_t var_c_3 = 0x3f4ccccd;
00457a9c                  CameraManager::SetTargetDirection(cm_1, &x);
00457a8b              }
00457a8b              
00457a8b              goto label_457cd4;
00457a60          }
00457a60          
00457adf          long double x87_r7_11 = ((long double)var_28);
00457ae3          class CameraManager* cm_2 = this->cm;
00457aed          float x_1 = x;
00457b00          var_28 = ((double)(((long double)cm_2->m_rCameraAdjustmentSpeed) * (x87_r7_11 - ((long double)this->m_ttLastRaiseOrLower))));
00457b04          long double x87_r6_8 = ((long double)arg3);
00457b07          long double temp3_1 = ((long double)1f);
00457b07          (x87_r6_8 - temp3_1);
00457b0d          int32_t eax_4;
00457b0d          eax_4 = ((((x87_r6_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r6_8 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00457b0f          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
00457b0f          
00457b12          if (p_3)
00457b17              var_28 = ((double)((long double)arg3));
00457b17          
00457b26          if (*(int32_t*)((char*)ICIDM::s_cidm + 0x89) != 0)
00457b32              var_28 = ((double)(((long double)var_28) * ((long double)0.25)));
00457b32          
00457b36          this->m_ttLastRaiseOrLower = ((double)x87_r7_11);
00457b5b          float var_38_1 = ((float)sqrtl((((((long double)z) * ((long double)z)) + (((long double)x) * ((long double)x))) + (((long double)y) * ((long double)y)))));
00457b5f          AC1Legacy::Vector3::get_heading(&x);
00457b6e          long double x87_r0;
00457b6e          float var_34_1 = ((float)(x87_r0 * ((long double)0.0174532924f)));
00457b77          long double x87_r1_2 = (AC1Legacy::Vector3::get_pitch(&x) * ((long double)0.0174532924f));
00457b83          long double x87_r0_4 = (((long double)0f) * ((long double)var_28));
00457b87          var_28 = ((float)x87_r0_4);
00457b8f          long double st0_2;
00457b8f          bool c2_6;
00457b8f          st0_2 = __fcos((x87_r1_2 + x87_r0_4));
00457b95          long double st0_3;
00457b95          bool c2_7;
00457b95          st0_3 = __fsin(((long double)var_34_1));
00457b9d          x = ((float)((st0_3 * ((long double)var_38_1)) * st0_2));
00457ba5          long double st0_4;
00457ba5          bool c2_8;
00457ba5          st0_4 = __fcos(((long double)var_34_1));
00457bad          float var_10_2 = ((float)((st0_4 * ((long double)var_38_1)) * st0_2));
00457bb3          long double st0_5;
00457bb3          bool c2_9;
00457bb3          st0_5 = __fsin(st0_2);
00457bb9          float var_c_5 = ((float)(st0_5 * ((long double)var_38_1)));
00457bc1          (((long double)y) - ((long double)0f));
00457bc9          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
00457bc9          
00457bcc          if (p_4)
00457bcc          {
00457be5              long double x87_r1_9 = ((long double)y);
00457be9              long double temp6_1 = ((long double)0f);
00457be9              (x87_r1_9 - temp6_1);
00457be9              
00457bf4              if ((*(uint8_t*)((char*)((((x87_r1_9 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_9, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r1_9 == temp6_1) ? 1 : 0) << 0xe) | 0x1000)))))[1] & 0x41) != 0)
00457bf4              {
00457c0f              label_457c0f:
00457c0f                  (((long double)x_1) - ((long double)0f));
00457c17                  bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
00457c17                  
00457c1a                  if (p_6)
00457c1a                  {
00457c33                      long double x87_r1_13 = ((long double)x_1);
00457c37                      long double temp10_1 = ((long double)0f);
00457c37                      (x87_r1_13 - temp10_1);
00457c37                      
00457c42                      if ((*(uint8_t*)((char*)((((x87_r1_13 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_13, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r1_13 == temp10_1) ? 1 : 0) << 0xe) | 0x1000)))))[1] & 0x41) != 0)
00457c42                      {
00457c59                      label_457c59:
00457c59                          long double x87_r1_15 = ((long double)var_c_5);
00457c5d                          long double temp12_1 = ((long double)-1.79999995f);
00457c5d                          (x87_r1_15 - temp12_1);
00457c5d                          
00457c68                          if ((*(uint8_t*)((char*)((((x87_r1_15 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_15, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r1_15 == temp12_1) ? 1 : 0) << 0xe) | 0x1000)))))[1] & 0x41) == 0)
00457c70                              CameraManager::SetStiffness(cm_2, this->current_stiffness);
00457c70                          
00457c7d                          var_28 = 0;
00457c85                          *(uint32_t*)((char*)var_28)[4] = 0x3f800000;
00457c8d                          int32_t var_20_1 = 0;
00457c95                          CameraManager::SetTargetDirection(this->cm, &var_28);
00457ca5                          int32_t* eax_9 = &this->cm->viewer_offset;
00457ca8                          *(uint32_t*)eax_9 = x;
00457cae                          eax_9[1] = var_10_2;
00457cb1                          float x_2 = x;
00457cb5                          eax_9[2] = var_c_5;
00457cc7                          float var_50_1 = var_10_2;
00457ccc                          float var_4c_6 = var_c_5;
00457ccf                          CameraSet::SetTargetForOffset(this, x_2);
00457cd4                      label_457cd4:
00457cd4                          
00457cd7                          if (arg2 == 0)
00457cd7                          {
00457cd9                              this->raise = 0;
00457cdc                              this->m_ttLastRaiseOrLower = 0f;
00457cdf                              *(uint32_t*)((char*)this->m_ttLastRaiseOrLower)[4] = 0;
00457cd7                          }
00457c42                      }
00457c42                      else
00457c42                      {
00457c48                          (((long double)x) - ((long double)0f));
00457c50                          bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x41} */;
00457c50                          
00457c53                          if (p_7)
00457c53                              goto label_457c59;
00457c42                      }
00457c1a                  }
00457c1a                  else
00457c1a                  {
00457c1c                      long double x87_r1_12 = ((long double)x);
00457c20                      long double temp11_1 = ((long double)0f);
00457c20                      (x87_r1_12 - temp11_1);
00457c20                      
00457c2b                      if ((*(uint8_t*)((char*)((((x87_r1_12 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_12, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r1_12 == temp11_1) ? 1 : 0) << 0xe) | 0x1000)))))[1] & 1) != 0)
00457c2b                          goto label_457c59;
00457c1a                  }
00457bf4              }
00457bf4              else
00457bf4              {
00457bfa                  (((long double)var_10_2) - ((long double)0f));
00457c02                  bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
00457c02                  
00457c05                  if (p_5)
00457c05                      goto label_457c0f;
00457bf4              }
00457bcc          }
00457bcc          else
00457bcc          {
00457bce              long double x87_r1_8 = ((long double)var_10_2);
00457bd2              long double temp7_1 = ((long double)0f);
00457bd2              (x87_r1_8 - temp7_1);
00457bd2              
00457bdd              if ((*(uint8_t*)((char*)((((x87_r1_8 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_8, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r1_8 == temp7_1) ? 1 : 0) << 0xe) | 0x1000)))))[1] & 1) != 0)
00457bdd                  goto label_457c0f;
00457bcc          }
004579d4      }
00457980  }

00457ceb                                   90 90 90 90 90                                                             .....

00457cf0  void __thiscall CameraSet::Lower(class CameraSet* this, int32_t arg2, float arg3)

00457cf0  {
00457d02      this->lower = arg2;
00457d05      this->raise = 0;
00457d08      long double x87_r7 = ((long double)Timer::cur_time);
00457d0e      double var_28 = ((double)x87_r7);
00457d13      long double x87_r6 = ((long double)this->m_ttLastRaiseOrLower);
00457d16      long double temp1 = ((long double)0.0);
00457d16      (x87_r6 - temp1);
00457d1c      int32_t eax;
00457d1c      eax = ((((x87_r6 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
00457d1e      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00457d1e      
00457d21      if (!(p))
00457d31          this->m_ttLastRaiseOrLower = ((double)(x87_r7 - (((long double)1.0) / ((long double)SceneTool::m_FramesPerSecond))));
00457d31      
00457d34      long double x87_r7_1 = (x87_r7 - ((long double)this->m_ttLastRaiseOrLower));
00457d37      long double x87_r6_4 = ((long double)0.000199999995f);
00457d3d      (x87_r6_4 - x87_r7_1);
00457d3f      eax = ((((x87_r6_4 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
00457d3f      
00457d44      if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
00457d44      {
00457d4a          class CameraManager* cm = this->cm;
00457d56          float y = cm->viewer_offset.y;
00457d5a          bool cond:0_1 = this->looking_down == 0;
00457d5d          float x = cm->viewer_offset.x;
00457d61          float z = cm->viewer_offset.z;
00457d61          
00457d68          if (!(cond:0_1))
00457d68          {
00457d6a              long double x87_r7_2 = ((long double)y);
00457d6e              long double temp2_1 = ((long double)0.80000000000000004);
00457d6e              (x87_r7_2 - temp2_1);
00457d74              float eax_1;
00457d74              eax_1 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00457d76              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00457d76              
00457d79              if (!(p_1))
00457d79              {
00457d50                  cm->viewer_offset.x = x;
00457d50                  cm->viewer_offset.y = ((float)(((long double)0.200000003f) + ((long double)y)));
00457d50                  cm->viewer_offset.z = z;
00457d79              }
00457d79              
00457d79              goto label_457fce;
00457d68          }
00457d68          
00457db9          float z_1 = z;
00457dbe          float y_2 = y;
00457dbe          
00457dc8          if (CameraSet::InHead(this, x) != 0)
00457dc8          {
00457dca              class CameraManager* cm_1 = this->cm;
00457dd0              x = cm_1->direction.x;
00457dd7              float y_1 = cm_1->direction.y;
00457dde              long double x87_r7_6 = (((long double)cm_1->direction.z) + ((long double)0.200000003f));
00457de8              long double temp4_1 = ((long double)0.800000012f);
00457de8              (x87_r7_6 - temp4_1);
00457dee              float eax_5;
00457dee              eax_5 = ((((x87_r7_6 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00457dee              
00457df3              if ((*(uint8_t*)((char*)eax_5)[1] & 0x41) != 0)
00457df3              {
00457e14                  long double x87_r7_8 = -(((long double)0.800000012f));
00457e16                  long double x87_r6_5 = ((long double)((float)x87_r7_6));
00457e1a                  (x87_r6_5 - x87_r7_8);
00457e1c                  eax_5 = ((((x87_r6_5 < x87_r7_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, x87_r7_8))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == x87_r7_8) ? 1 : 0) << 0xe) | 0x3800))));
00457e1e                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00457e1e                  
00457e21                  if (p_2)
00457e3d                      CameraManager::SetTargetDirection(cm_1, &x);
00457e21                  else
00457e21                  {
00457e27                      float var_c_4 = ((float)x87_r7_8);
00457e2c                      CameraManager::SetTargetDirection(cm_1, &x);
00457e21                  }
00457df3              }
00457df3              else
00457df3              {
00457e00                  int32_t var_c_3 = 0x3f4ccccd;
00457e04                  CameraManager::SetTargetDirection(cm_1, &x);
00457df3              }
00457df3              
00457df3              goto label_457fce;
00457dc8          }
00457dc8          
00457e47          long double x87_r7_9 = ((long double)var_28);
00457e4b          class CameraManager* cm_2 = this->cm;
00457e58          var_28 = ((double)(((long double)cm_2->m_rCameraAdjustmentSpeed) * (x87_r7_9 - ((long double)this->m_ttLastRaiseOrLower))));
00457e5c          long double x87_r6_8 = ((long double)arg3);
00457e5f          long double temp3_1 = ((long double)1f);
00457e5f          (x87_r6_8 - temp3_1);
00457e65          int32_t eax_4;
00457e65          eax_4 = ((((x87_r6_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r6_8 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00457e67          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
00457e67          
00457e6a          if (p_3)
00457e6f              var_28 = ((double)((long double)arg3));
00457e6f          
00457e7f          if (*(int32_t*)((char*)ICIDM::s_cidm + 0x89) != 0)
00457e8b              var_28 = ((double)(((long double)var_28) * ((long double)0.25)));
00457e8b          
00457e8f          this->m_ttLastRaiseOrLower = ((double)x87_r7_9);
00457eb4          float var_30_1 = ((float)sqrtl((((((long double)z) * ((long double)z)) + (((long double)x) * ((long double)x))) + (((long double)y) * ((long double)y)))));
00457eb8          AC1Legacy::Vector3::get_heading(&x);
00457ec7          long double x87_r0;
00457ec7          float var_2c_1 = ((float)(x87_r0 * ((long double)0.0174532924f)));
00457ed0          long double x87_r1_2 = (AC1Legacy::Vector3::get_pitch(&x) * ((long double)0.0174532924f));
00457edc          long double x87_r0_4 = (((long double)0f) * ((long double)var_28));
00457ee0          var_28 = ((float)x87_r0_4);
00457ee8          long double st0_2;
00457ee8          bool c2_6;
00457ee8          st0_2 = __fcos((x87_r1_2 - x87_r0_4));
00457eee          long double st0_3;
00457eee          bool c2_7;
00457eee          st0_3 = __fsin(((long double)var_2c_1));
00457ef6          x = ((float)((st0_3 * ((long double)var_30_1)) * st0_2));
00457efe          long double st0_4;
00457efe          bool c2_8;
00457efe          st0_4 = __fcos(((long double)var_2c_1));
00457f06          float var_10_2 = ((float)((st0_4 * ((long double)var_30_1)) * st0_2));
00457f0c          long double st0_5;
00457f0c          bool c2_9;
00457f0c          st0_5 = __fsin(st0_2);
00457f12          float var_c_5 = ((float)(st0_5 * ((long double)var_30_1)));
00457f26          long double x87_r1_9 = ((((long double)x) * ((long double)x)) + (((long double)var_10_2) * ((long double)var_10_2)));
00457f2e          long double x87_r0_10 = (((long double)1.20000005f) * ((long double)1.20000005f));
00457f34          (x87_r0_10 - x87_r1_9);
00457f3b          bool p_4;
00457f3b          
00457f3b          if ((*(uint8_t*)((char*)((((x87_r0_10 < x87_r1_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_10, x87_r1_9))) ? 1 : 0) << 0xa) | ((((x87_r0_10 == x87_r1_9) ? 1 : 0) << 0xe) | 0x1000)))))[1] & 0x41) == 0)
00457f3b          {
00457f41              (((long double)var_c_5) - ((long double)0f));
00457f49              p_4 = /* p_4 = unimplemented  {test ah, 0x5} */;
00457f3b          }
00457f3b          
00457f4c          if (((*(uint8_t*)((char*)((((x87_r0_10 < x87_r1_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_10, x87_r1_9))) ? 1 : 0) << 0xa) | ((((x87_r0_10 == x87_r1_9) ? 1 : 0) << 0xe) | 0x1000)))))[1] & 0x41) != 0 || p_4))
00457f4c          {
00457f56              (((long double)var_c_5) - ((long double)-1.79999995f));
00457f5e              bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
00457f5e              
00457f61              if (!(p_5))
00457f6a                  CameraManager::SetStiffness(cm_2, 1f);
00457f6a              
00457f77              var_28 = 0;
00457f7f              *(uint32_t*)((char*)var_28)[4] = 0x3f800000;
00457f87              int32_t var_20_1 = 0;
00457f8f              CameraManager::SetTargetDirection(this->cm, &var_28);
00457f9f              class AC1Legacy::Vector3* eax_8 = &this->cm->viewer_offset;
00457fa2              eax_8->x = x;
00457fa8              eax_8->y = var_10_2;
00457fab              float x_1 = x;
00457faf              eax_8->z = var_c_5;
00457fc1              float var_48_1 = var_10_2;
00457fc6              float var_44_5 = var_c_5;
00457fc9              CameraSet::SetTargetForOffset(this, x_1);
00457fce          label_457fce:
00457fce              
00457fd1              if (arg2 == 0)
00457fd1              {
00457fd3                  this->lower = 0;
00457fd6                  this->m_ttLastRaiseOrLower = 0f;
00457fd9                  *(uint32_t*)((char*)this->m_ttLastRaiseOrLower)[4] = 0;
00457fd1              }
00457f4c          }
00457d44      }
00457cf0  }

00457fe5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00457ff0  void __thiscall CameraSet::LookDown(class CameraSet* this, int32_t arg2)

00457ff0  {
00457fff      if (arg2 != this->looking_down)
00457fff      {
00458007          this->looking_down = arg2;
0045800a          float x;
0045800a          float y_4;
0045800a          float z_4;
0045800a          
0045800a          if (arg2 == 0)
0045800a          {
004580fe              if (this->in_map_mode == 0)
004580fe              {
0045814a                  float y_2 = this->lookdown_saved_offset.y;
00458150                  float z_2 = this->lookdown_saved_offset.z;
00458150                  
0045815c                  if (CameraSet::InHead(this, this->lookdown_saved_offset.x) != 0)
00458166                      CameraManager::SetStiffness(this->cm, 1f);
004580fe              }
004580fe              else
004580fe              {
00458100                  this->in_map_mode = 0;
0045810f                  float y_1 = this->lookdown_saved_offset.y;
00458115                  float z_1 = this->lookdown_saved_offset.z;
00458115                  
00458121                  if (CameraSet::InHead(this, this->lookdown_saved_offset.x) == 0)
0045812a                      CameraManager::SetStiffness(this->cm, this->current_stiffness);
0045812a                  
00458131                  SmartBox::DisableDegrades(0);
00458138                  SmartBox::DisableFogging(0);
004580fe              }
004580fe              
00458172              CameraManager::SetTargetDirection(this->cm, &this->lookdown_saved_target_dir);
0045817a              float y_3 = this->lookdown_saved_offset.y;
0045817d              float z_3 = this->lookdown_saved_offset.z;
00458180              x = this->lookdown_saved_offset.x;
00458184              y_4 = y_3;
00458188              z_4 = z_3;
0045800a          }
0045800a          else
0045800a          {
00458010              class CameraManager* cm = this->cm;
00458018              this->lookdown_saved_offset.x = cm->viewer_offset.x;
00458018              this->lookdown_saved_offset.y = cm->viewer_offset.y;
00458018              this->lookdown_saved_offset.z = cm->viewer_offset.z;
00458030              this->lookdown_saved_target_dir.x = cm->direction.x;
00458030              this->lookdown_saved_target_dir.y = cm->direction.y;
00458030              this->lookdown_saved_target_dir.z = cm->direction.z;
00458046              x = 0f;
0045804e              int32_t var_8_1 = 0x3f000000;
00458056              int32_t var_4_1 = 0xbfe66666;
0045805e              CameraManager::SetTargetDirection(cm, &x);
00458066              bool cond:3_1 = this->in_map_mode == 0;
00458068              z_4 = 0.75f;
00458070              x = 0f;
00458070              
00458078              if (cond:3_1)
00458078              {
004580c7                  float y = this->lookdown_saved_offset.y;
004580cd                  float z = this->lookdown_saved_offset.z;
004580cd                  
004580d9                  if (CameraSet::InHead(this, this->lookdown_saved_offset.x) != 0)
004580e2                      CameraManager::SetStiffness(this->cm, this->current_stiffness);
004580e2                  
004580e7                  y_4 = -2f;
00458078              }
00458078              else
00458078              {
00458080                  class CameraManager* cm_1 = this->cm;
0045808c                  y_4 = ((float)-(((long double)450f)));
0045808c                  
00458097                  if (CameraManager::SetTranslationalStiffness(cm_1, 1f) != 0)
004580a0                      CameraManager::SetRotationalStiffness(cm_1, 1f);
004580a0                  
004580a7                  SmartBox::DisableDegrades(1);
004580ae                  SmartBox::DisableFogging(1);
00458078              }
0045800a          }
0045800a          
00458197          class AC1Legacy::Vector3* eax_11 = &this->cm->viewer_offset;
0045819a          eax_11->x = x;
004581a0          eax_11->y = y_4;
004581a3          float x_1 = x;
004581a7          eax_11->z = z_4;
004581b9          float y_5 = y_4;
004581be          float z_5 = z_4;
004581c1          CameraSet::SetTargetForOffset(this, x_1);
00457fff      }
00457ff0  }

004581cf                                               90                                                                 .

004581d0  void __thiscall CameraSet::SetMapMode(class CameraSet* this, int32_t arg2)

004581d0  {
004581de      if (arg2 != this->in_map_mode)
004581de      {
004581e6          if (arg2 != 0)
004581e8              this->in_map_mode = arg2;
004581e8          
004581f0          if (this->in_map_mode != 0)
004581f0          {
004581f3              class CameraManager* cm_1 = this->cm;
004581f3              
00458204              if (CameraManager::SetTranslationalStiffness(cm_1, 1f) != 0)
0045820d                  CameraManager::SetRotationalStiffness(cm_1, 1f);
004581f0          }
004581f0          
00458216          CameraSet::LookDown(this, arg2);
00458216          
00458220          if (this->in_map_mode != 0)
00458220          {
00458222              class CameraManager* cm = this->cm;
0045822b              float x = cm->viewer_offset.x;
00458230              float z = cm->viewer_offset.z;
00458244              SmartBox::DisableDegrades(1);
0045824b              SmartBox::DisableFogging(1);
0045825e              class AC1Legacy::Vector3* eax_6 = &this->cm->viewer_offset;
00458261              eax_6->x = x;
00458267              eax_6->y = ((float)-(((long double)450f)));
0045826a              eax_6->z = z;
00458220          }
004581de      }
004581d0  }

00458275                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00458280  void __thiscall CameraSet::TrackTarget(class CameraSet* this, uint32_t arg2)

00458280  {
0045828c      if (arg2 != 0)
0045828c      {
00458293          class CameraManager* cm_1 = this->cm;
00458299          this->targeting = 1;
004582a0          CameraManager::SetTargetObject(cm_1, arg2, 0xffffffff);
004582b4          class AC1Legacy::Vector3* eax_1 = &this->cm->target_offset;
004582b7          eax_1->x = 0;
004582d1          eax_1->y = 0f;
004582d4          eax_1->z = 0.5f;
0045828c      }
0045828c      else
0045828e          this->targeting = arg2;
0045828e      
004582d7      class CameraManager* cm = this->cm;
004582ea      float y = cm->viewer_offset.y;
004582f0      float z = cm->viewer_offset.z;
004582f5      CameraSet::SetTargetForOffset(this, cm->viewer_offset.x);
00458280  }

00458301     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00458310  void __thiscall CameraSet::Rotate(class CameraSet* this, int32_t arg2, int32_t arg3, float arg4, int32_t arg5)

00458310  {
00458322      int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
0045832f      class CPhysicsObj* player = this->sbox->player;
00458336      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045833c      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0045834a      void var_30;
0045834a      InterpretedMotionState::InterpretedMotionState(&var_30, CPhysicsObj::InqInterpretedMotionState(player));
00458352      (((long double)this->m_ttLastRotate) - ((long double)0.0));
0045835a      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0045835a      
0045835d      if (!(p))
0045836f          this->m_ttLastRotate = ((double)(((long double)Timer::cur_time_1) - (((long double)1.0) / ((long double)SceneTool::m_FramesPerSecond))));
0045836f      
00458376      long double x87_r7_5 = (((long double)Timer::cur_time_1) - ((long double)this->m_ttLastRotate));
00458379      long double x87_r6 = ((long double)0.000199999995f);
0045837f      (x87_r6 - x87_r7_5);
0045837f      
00458386      if ((*(uint8_t*)((char*)((((x87_r6 < x87_r7_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_5))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_5) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00458386      {
00458393          if (this->looking_down != 0)
00458398              CameraSet::LookDown(this, 0);
00458398          
0045839d          class CameraManager* cm = this->cm;
004583a0          float x = cm->viewer_offset.x;
004583a3          float y = cm->viewer_offset.y;
004583ad          float z = cm->viewer_offset.z;
004583c7          float eax_4;
004583c7          
004583c7          if ((*(int32_t*)((char*)ICIDM::s_cidm_1 + 0x89) == 0 || arg5 != 0))
004583c7          {
004584b3              long double x87_r7_11 = ((long double)x);
004584b7              long double temp2_1 = ((long double)0f);
004584b7              (x87_r7_11 - temp2_1);
004584bd              eax_4 = ((((x87_r7_11 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp2_1) ? 1 : 0) << 0xe) | 0))));
004584bf              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
004584bf              
004584c2              if (p_3)
004584c2              {
00458591              label_458591:
00458591                  long double x87_r7_14 = ((long double)x);
004585a4                  long double x87_r6_5 = (((long double)cm->m_rCameraAdjustmentSpeed) * (((long double)Timer::cur_time_1) - ((long double)this->m_ttLastRotate)));
004585a6                  long double x87_r5_4 = ((long double)arg4);
004585a9                  long double temp3_1 = ((long double)1f);
004585a9                  (x87_r5_4 - temp3_1);
004585af                  int32_t eax_11;
004585af                  eax_11 = ((((x87_r5_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r5_4 == temp3_1) ? 1 : 0) << 0xe) | 0x3000))));
004585b1                  float var_3c_2;
004585b1                  long double x87_r6_9;
004585b1                  
004585b1                  if (arg2 == 0)
004585b1                  {
004585f1                      bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x44} */;
004585f1                      
004585f4                      if (p_8)
004585f4                      {
004585f6                          x87_r7_14 = x87_r6_5;
004585f8                          x87_r6_5 = ((long double)arg4);
004585f4                      }
004585f4                      
004585fb                      long double x87_r6_10 = (x87_r6_5 * ((long double)0f));
00458601                      this->rot_right = arg3;
00458604                      this->rot_left = 0;
00458609                      long double st0_3;
00458609                      bool c2_15;
00458609                      st0_3 = __fsin(x87_r6_10);
0045860d                      long double st0_4;
0045860d                      bool c2_16;
0045860d                      st0_4 = __fcos(x87_r6_10);
0045861d                      var_3c_2 = ((float)((((long double)x) * st0_4) - (st0_3 * ((long double)y))));
00458629                      x87_r6_9 = ((st0_4 * ((long double)y)) + (st0_3 * x87_r7_14));
004585b1                  }
004585b1                  else
004585b1                  {
004585b3                      bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x44} */;
004585b3                      
004585b6                      if (p_7)
004585b6                      {
004585b8                          x87_r7_14 = x87_r6_5;
004585ba                          x87_r6_5 = ((long double)arg4);
004585b6                      }
004585b6                      
004585bd                      long double x87_r6_6 = (x87_r6_5 * ((long double)0f));
004585c3                      this->rot_left = arg3;
004585c6                      this->rot_right = 0;
004585cb                      long double st0_1;
004585cb                      bool c2_13;
004585cb                      st0_1 = __fsin(x87_r6_6);
004585cf                      long double st0_2;
004585cf                      bool c2_14;
004585cf                      st0_2 = __fcos(x87_r6_6);
004585e1                      var_3c_2 = ((float)((((long double)x) * st0_2) - -((st0_1 * ((long double)y)))));
004585ed                      x87_r6_9 = ((st0_2 * ((long double)y)) - (st0_1 * x87_r7_14));
004585b1                  }
004585b1                  
0045862f                  float var_38_2 = ((float)x87_r6_9);
00458637                  this->m_ttLastRotate = Timer::cur_time_1;
00458641                  *(uint32_t*)((char*)this->m_ttLastRotate)[4] = ecx;
00458644                  Timer::cur_time_1 = 0;
0045864c                  int32_t var_4c_1 = 0x3f800000;
00458654                  int32_t var_48_1 = 0;
0045865c                  CameraManager::SetTargetDirection(cm, &Timer::cur_time_1);
0045866c                  int32_t* eax_14 = &this->cm->viewer_offset;
0045866f                  *(uint32_t*)eax_14 = var_3c_2;
00458675                  eax_14[1] = var_38_2;
0045867c                  eax_14[2] = z;
0045868e                  float var_68_2 = var_38_2;
00458693                  float z_1 = z;
00458696                  CameraSet::SetTargetForOffset(this, var_3c_2);
004584c2              }
004584c2              else
004584c2              {
004584c8                  long double x87_r7_12 = ((long double)y);
004584cc                  long double temp4_1 = ((long double)0.180000007f);
004584cc                  (x87_r7_12 - temp4_1);
004584d2                  eax_4 = ((((x87_r7_12 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp4_1) ? 1 : 0) << 0xe) | 0))));
004584d4                  bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
004584d4                  
004584d7                  if (p_4)
004584d7                      goto label_458591;
004584d7                  
004584dd                  long double x87_r7_13 = ((long double)z);
004584e1                  long double temp5_1 = ((long double)0f);
004584e1                  (x87_r7_13 - temp5_1);
004584e7                  eax_4 = ((((x87_r7_13 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp5_1) ? 1 : 0) << 0xe) | 0))));
004584e9                  bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x44} */;
004584e9                  
004584ec                  if (p_5)
004584ec                      goto label_458591;
004584ec                  
004584f5                  class CPhysicsObj* player_1 = this->sbox->player;
004584f5                  
004584fd                  if (player_1 != 0)
004584fd                  {
00458503                      CPhysicsObj::get_heading(player_1);
00458508                      long double x87_r0;
00458508                      float var_54_2 = ((float)x87_r0);
0045850f                      long double x87_r0_4;
0045850f                      
0045850f                      if (arg2 == 0)
0045850f                      {
00458546                          this->rot_right = arg3;
00458549                          x87_r0_4 = (((long double)var_54_2) - ((long double)8f));
0045854f                          this->rot_left = 0;
00458552                          (x87_r0_4 - ((long double)0f));
0045855a                          bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
0045855a                          
0045855d                          if (!(p_6))
0045856d                              x87_r0_4 = ((((long double)360f) - ((long double)8f)) + ((long double)var_54_2));
0045850f                      }
0045850f                      else
0045850f                      {
00458517                          this->rot_left = arg3;
0045851a                          x87_r0_4 = (((long double)8f) + ((long double)var_54_2));
0045851e                          this->rot_right = 0;
00458521                          long double temp11_1 = ((long double)360f);
00458521                          (x87_r0_4 - temp11_1);
00458521                          
0045852c                          if ((*(uint8_t*)((char*)((((x87_r0_4 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_4, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r0_4 == temp11_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0045853c                              x87_r0_4 = (((long double)var_54_2) - (((long double)360f) - ((long double)8f)));
0045850f                      }
0045850f                      
00458571                      this->sbox->cmdinterp->vtable->TurnToHeading(((float)x87_r0_4), 0);
004584fd                  }
004584c2              }
004583c7          }
004583c7          else
004583c7          {
004583cd              class SmartBox* sbox_1 = this->sbox;
004583cd              
004583d6              if (sbox_1->player != 0)
004583d6              {
004583e3                  long double x87_r7_8 = ((((long double)Timer::cur_time_1) - ((long double)this->m_ttLastRotate)) * ((long double)cm->m_rCameraAdjustmentSpeed));
004583e6                  long double x87_r6_1 = ((long double)arg4);
004583e9                  long double temp6_1 = ((long double)1f);
004583e9                  (x87_r6_1 - temp6_1);
004583ef                  eax_4 = ((((x87_r6_1 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp6_1) ? 1 : 0) << 0xe) | 0x3800))));
004583f1                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004583f1                  
004583f4                  if (p_1)
004583f8                      x87_r7_8 = ((long double)arg4);
004583f8                  
004583fb                  long double temp7_1 = ((long double)0.02);
004583fb                  (x87_r7_8 - temp7_1);
00458401                  eax_4 = ((((x87_r7_8 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp7_1) ? 1 : 0) << 0xe) | 0x3800))));
00458403                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00458403                  
00458406                  if (!(p_2))
00458406                  {
00458408                      long double temp9_1 = ((long double)-0.02);
00458408                      (x87_r7_8 - temp9_1);
0045840e                      eax_4 = ((((x87_r7_8 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp9_1) ? 1 : 0) << 0xe) | 0x3800))));
0045840e                      
00458413                      if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) == 0)
00458413                      {
00458415                          sbox_1->cmdinterp->vtable->StopDrift();
00458429                          InterpretedMotionState::~InterpretedMotionState(&var_30);
00458434                          return;
00458413                      }
00458406                  }
00458406                  
00458437                  long double x87_r7_9 = (x87_r7_8 + x87_r7_8);
00458439                  float var_54_1 = ((float)x87_r7_9);
0045843d                  long double temp8_1 = ((long double)1.5);
0045843d                  (x87_r7_9 - temp8_1);
00458443                  eax_4 = ((((x87_r7_9 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp8_1) ? 1 : 0) << 0xe) | 0))));
00458443                  
00458448                  if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) == 0)
0045844a                      var_54_1 = 1.5f;
0045844a                  
0045846a                  int32_t var_74_1;
0045846a                  
0045846a                  if (arg2 == 0)
00458473                      var_74_1 = 0x6500000e;
0045846a                  else
0045846c                      var_74_1 = 0x6500000d;
0045846c                  
00458452                  sbox_1->cmdinterp->vtable->MovePlayer(var_74_1, 1, var_54_1, 1, 1);
0045847e                  long double x87_r7_10 = ((long double)Timer::cur_time_1);
00458482                  this->m_ttLastRotate = ((double)x87_r7_10);
00458488                  long double x87_r6_3 = (((long double)this->m_LastServerMessage) + ((long double)0.5));
00458490                  (x87_r7_10 - x87_r6_3);
00458490                  
00458497                  if ((*(uint8_t*)((char*)((((x87_r7_10 < x87_r6_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, x87_r6_3))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == x87_r6_3) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00458497                  {
0045849d                      class SmartBox* sbox = this->sbox;
004584a0                      this->m_LastServerMessage = ((double)x87_r7_10);
004584a3                      sbox->cmdinterp->vtable->SendMovementEvent();
00458497                  }
004583d6              }
004583c7          }
004583c7          
004586a1          if (arg3 == 0)
004586a1          {
004586a3              this->rot_left = 0;
004586a6              this->rot_right = 0;
004586a9              this->m_ttLastRotate = 0f;
004586ac              *(uint32_t*)((char*)this->m_ttLastRotate)[4] = 0;
004586a1          }
00458386      }
00458386      
004586b3      InterpretedMotionState::~InterpretedMotionState(&var_30);
00458310  }

004586c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004586d0  void __thiscall CameraSet::Closer(class CameraSet* this, int32_t arg2, float arg3)

004586d0  {
004586d0      long double x87_r7 = ((long double)arg3);
004586d7      long double temp1 = ((long double)0f);
004586d7      (x87_r7 - temp1);
004586e2      int32_t eax;
004586e2      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
004586e4      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004586e4      
004586e7      if (p)
004586e7      {
004586f6          bool cond:0_1 = this->looking_down == 0;
004586f8          this->closer = arg2;
004586fb          this->farther = 0;
004586fb          
004586fe          if (!(cond:0_1))
00458701              CameraSet::LookDown(this, 0);
00458701          
00458706          class CameraManager* cm = this->cm;
00458709          float x = cm->viewer_offset.x;
0045870c          float y = cm->viewer_offset.y;
00458713          long double x87_r7_1 = ((long double)x);
00458717          long double temp2_1 = ((long double)0f);
00458717          (x87_r7_1 - temp2_1);
00458720          float z = cm->viewer_offset.z;
00458728          float eax_2;
00458728          eax_2 = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0045872a          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0045872a          
0045872d          if (p_1)
0045872d          {
00458755          label_458755:
00458755              long double x87_r7_4 = ((long double)Timer::cur_time);
0045875b              long double x87_r6_1 = ((long double)this->m_ttLastZoom);
0045875e              long double temp3_1 = ((long double)0.0);
0045875e              (x87_r6_1 - temp3_1);
00458764              eax_2 = ((((x87_r6_1 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00458766              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
00458766              
00458769              if (!(p_4))
00458779                  this->m_ttLastZoom = ((double)(x87_r7_4 - (((long double)1.0) / ((long double)SceneTool::m_FramesPerSecond))));
00458779              
0045877e              long double x87_r6_6 = (x87_r7_4 - ((long double)this->m_ttLastZoom));
00458781              long double x87_r5_1 = ((long double)0.000199999995f);
00458789              (x87_r6_6 - x87_r5_1);
0045878b              eax_2 = ((((x87_r6_6 < x87_r5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_6, x87_r5_1))) ? 1 : 0) << 0xa) | ((((x87_r6_6 == x87_r5_1) ? 1 : 0) << 0xe) | 0x3000))));
0045878d              bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
0045878d              
00458790              if (p_5)
00458790              {
00458796                  long double x87_r6_7 = (x87_r6_6 * ((long double)cm->m_rCameraAdjustmentSpeed));
00458799                  long double x87_r5_2 = ((long double)arg3);
0045879d                  long double temp6_1 = ((long double)1f);
0045879d                  (x87_r5_2 - temp6_1);
004587a3                  eax_2 = ((((x87_r5_2 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_2, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r5_2 == temp6_1) ? 1 : 0) << 0xe) | 0x3000))));
004587a5                  bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x44} */;
004587a5                  
004587a8                  if (p_6)
004587a8                  {
004587aa                      x87_r7_4 = x87_r6_7;
004587b2                      x87_r6_7 = (((long double)1f) / ((long double)arg3));
004587a8                  }
004587a8                  
004587bc                  long double x87_r6_10 = (((long double)1.0) - (x87_r6_7 * ((long double)0.200000003f)));
004587c8                  float var_c_2 = ((float)(((long double)x) * x87_r6_10));
004587d2                  float var_8_2 = ((float)(((long double)y) * x87_r6_10));
004587da                  float var_4_1 = ((float)(x87_r6_10 * ((long double)z)));
004587de                  this->m_ttLastZoom = ((double)x87_r7_4);
004587fd                  long double x87_r7_9 = sqrtl((((((long double)var_8_2) * ((long double)var_8_2)) + (((long double)var_c_2) * ((long double)var_c_2))) + (((long double)var_4_1) * ((long double)var_4_1))));
004587ff                  long double temp7_1 = ((long double)0.5f);
004587ff                  (x87_r7_9 - temp7_1);
00458805                  eax_2 = ((((x87_r7_9 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp7_1) ? 1 : 0) << 0xe) | 0))));
00458807                  bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
00458807                  
0045880a                  if (p_7)
0045880a                  {
0045880c                      long double x87_r7_10 = ((long double)var_4_1);
00458810                      long double temp8_1 = ((long double)-1.79999995f);
00458810                      (x87_r7_10 - temp8_1);
00458816                      eax_2 = ((((x87_r7_10 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp8_1) ? 1 : 0) << 0xe) | 0))));
0045881b                      float current_stiffness;
0045881b                      
0045881b                      if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
00458823                          current_stiffness = 1f;
0045881b                      else
00458820                          current_stiffness = this->current_stiffness;
00458820                      
00458828                      CameraManager::SetStiffness(cm, current_stiffness);
00458838                      class AC1Legacy::Vector3* eax_4 = &this->cm->viewer_offset;
0045883b                      eax_4->x = var_c_2;
00458841                      eax_4->y = var_8_2;
00458848                      eax_4->z = var_4_1;
0045885a                      float var_20_1 = var_8_2;
0045885f                      float var_1c_1 = var_4_1;
00458862                      CameraSet::SetTargetForOffset(this, var_c_2);
00458862                      
00458869                      if (arg2 == 0)
00458869                      {
0045886b                          this->closer = 0;
0045886e                          this->m_ttLastZoom = 0f;
00458871                          *(uint32_t*)((char*)this->m_ttLastZoom)[4] = 0;
00458869                      }
0045880a                  }
00458790              }
0045872d          }
0045872d          else
0045872d          {
0045872f              long double x87_r7_2 = ((long double)y);
00458733              long double temp4_1 = ((long double)0.180000007f);
00458733              (x87_r7_2 - temp4_1);
00458739              eax_2 = ((((x87_r7_2 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0045873b              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0045873b              
0045873e              if (p_2)
0045873e                  goto label_458755;
0045873e              
00458740              long double x87_r7_3 = ((long double)z);
00458744              long double temp5_1 = ((long double)0f);
00458744              (x87_r7_3 - temp5_1);
0045874a              eax_2 = ((((x87_r7_3 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp5_1) ? 1 : 0) << 0xe) | 0))));
0045874c              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
0045874c              
0045874f              if (p_3)
0045874f                  goto label_458755;
0045872d          }
004586e7      }
004586d0  }

0045888a                                90 90 90 90 90 90                                                            ......

00458890  void __thiscall CameraSet::Farther(class CameraSet* this, int32_t arg2, float arg3)

00458890  {
004588a2      bool cond:0 = this->looking_down == 0;
004588a4      this->farther = arg2;
004588a7      this->closer = 0;
004588a7      
004588aa      if (!(cond:0))
004588ad          CameraSet::LookDown(this, 0);
004588ad      
004588b2      long double x87_r7 = ((long double)Timer::cur_time);
004588b8      long double x87_r6 = ((long double)this->m_ttLastZoom);
004588bb      long double temp1 = ((long double)0.0);
004588bb      (x87_r6 - temp1);
004588c1      int32_t eax;
004588c1      eax = ((((x87_r6 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
004588c3      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004588c3      
004588c6      if (!(p))
004588d6          this->m_ttLastZoom = ((double)(x87_r7 - (((long double)1.0) / ((long double)SceneTool::m_FramesPerSecond))));
004588d6      
004588db      long double x87_r6_5 = (x87_r7 - ((long double)this->m_ttLastZoom));
004588de      long double x87_r5 = ((long double)0.000199999995f);
004588e6      (x87_r6_5 - x87_r5);
004588e8      eax = ((((x87_r6_5 < x87_r5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, x87_r5))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == x87_r5) ? 1 : 0) << 0xe) | 0x3000))));
004588ea      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004588ea      
004588ed      if (p_1)
004588ed      {
004588f3          class CameraManager* cm = this->cm;
004588f9          float y = cm->viewer_offset.y;
004588fc          float x = cm->viewer_offset.x;
00458900          long double x87_r5_1 = ((long double)x);
00458904          long double temp2_1 = ((long double)0f);
00458904          (x87_r5_1 - temp2_1);
0045890d          float z = cm->viewer_offset.z;
00458915          float eax_2;
00458915          eax_2 = ((((x87_r5_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == temp2_1) ? 1 : 0) << 0xe) | 0x3000))));
00458917          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0045891a          float var_14_2;
0045891a          float var_10_1;
0045891a          
0045891a          if (!(p_2))
0045891a          {
00458920              long double x87_r5_2 = ((long double)y);
00458924              long double temp4_1 = ((long double)0.180000007f);
00458924              (x87_r5_2 - temp4_1);
0045892a              eax_2 = ((((x87_r5_2 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_2, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r5_2 == temp4_1) ? 1 : 0) << 0xe) | 0x3000))));
0045892c              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
0045892c              
0045892f              if (p_3)
0045892f                  goto label_458a1e;
0045892f              
00458935              long double x87_r5_3 = ((long double)z);
00458939              long double temp5_1 = ((long double)0f);
00458939              (x87_r5_3 - temp5_1);
0045893f              eax_2 = ((((x87_r5_3 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_3, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r5_3 == temp5_1) ? 1 : 0) << 0xe) | 0x3000))));
00458941              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
00458941              
00458944              if (p_4)
00458944                  goto label_458a1e;
00458944              
0045894a              class SmartBox* sbox = this->sbox;
0045894f              this->m_ttLastZoom = ((double)x87_r6_5);
00458952              uint32_t player_id = sbox->player_id;
0045895a              var_14_2 = -0.600000024f;
00458962              var_10_1 = 0.5f;
00458962              
0045896a              if (player_id != 0)
0045896a              {
0045896f                  CameraManager::SetPivotObject(cm, player_id, 0xffffffff);
00458988                  class AC1Legacy::Vector3* ecx_1 = &this->cm->pivot_offset;
0045898f                  ecx_1->x = 0;
004589a1                  ecx_1->y = 0f;
004589a4                  ecx_1->z = 1.5f;
0045896a              }
0045896a              
004589a7              float current_stiffness = this->current_stiffness;
004589aa              class CameraManager* cm_1 = this->cm;
004589b2              arg3 = current_stiffness;
004589b2              
004589bd              if (CameraManager::SetTranslationalStiffness(cm_1, current_stiffness) != 0)
004589c2                  CameraManager::SetRotationalStiffness(cm_1, current_stiffness);
004589c2              
004589bd              goto label_4589d4;
0045891a          }
0045891a          
00458a1e      label_458a1e:
00458a1e          long double x87_r6_6 = (x87_r6_5 * ((long double)cm->m_rCameraAdjustmentSpeed));
00458a21          long double x87_r5_4 = ((long double)arg3);
00458a25          long double temp3_1 = ((long double)1f);
00458a25          (x87_r5_4 - temp3_1);
00458a2b          eax_2 = ((((x87_r5_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r5_4 == temp3_1) ? 1 : 0) << 0xe) | 0x3000))));
00458a2d          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x44} */;
00458a2d          
00458a30          if (p_5)
00458a30          {
00458a32              x87_r7 = x87_r6_6;
00458a34              x87_r6_6 = ((long double)arg3);
00458a30          }
00458a30          
00458a3e          long double x87_r6_8 = ((x87_r6_6 * ((long double)0.200000003f)) + ((long double)1.0));
00458a4a          x = ((float)(((long double)x) * x87_r6_8));
00458a54          var_14_2 = ((float)(((long double)y) * x87_r6_8));
00458a5c          var_10_1 = ((float)(x87_r6_8 * ((long double)z)));
00458a60          this->m_ttLastZoom = ((double)x87_r7);
00458a67          long double x87_r7_3 = fabsl(((long double)x));
00458a69          long double x87_r6_10 = ((long double)10f);
00458a6f          (x87_r6_10 - x87_r7_3);
00458a71          eax_2 = ((((x87_r6_10 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == x87_r7_3) ? 1 : 0) << 0xe) | 0))));
00458a73          bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
00458a73          
00458a76          if (p_6)
00458a76          {
00458a7c              long double x87_r7_5 = fabsl(((long double)var_14_2));
00458a7e              long double x87_r6_11 = ((long double)10f);
00458a84              (x87_r6_11 - x87_r7_5);
00458a86              eax_2 = ((((x87_r6_11 < x87_r7_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, x87_r7_5))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == x87_r7_5) ? 1 : 0) << 0xe) | 0))));
00458a88              bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
00458a88              
00458a8b              if (p_7)
00458a8b              {
00458a8d                  long double x87_r7_6 = ((long double)var_10_1);
00458a91                  long double temp6_1 = ((long double)450f);
00458a91                  (x87_r7_6 - temp6_1);
00458a97                  eax_2 = ((((x87_r7_6 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp6_1) ? 1 : 0) << 0xe) | 0))));
00458a97                  
00458a9c                  if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
00458a9c                  {
00458a9e                      long double x87_r7_7 = ((long double)var_10_1);
00458aa2                      long double temp7_1 = ((long double)-1.79999995f);
00458aa2                      (x87_r7_7 - temp7_1);
00458aa8                      eax_2 = ((((x87_r7_7 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp7_1) ? 1 : 0) << 0xe) | 0))));
00458aa8                      
00458aad                      if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
00458ac2                          CameraManager::SetStiffness(cm, 1f);
00458aad                      else
00458ab3                          CameraManager::SetStiffness(cm, this->current_stiffness);
00458ab3                      
004589d4                  label_4589d4:
004589d4                      class AC1Legacy::Vector3* eax_5 = &this->cm->viewer_offset;
004589d7                      eax_5->x = x;
004589dd                      eax_5->y = var_14_2;
004589e4                      eax_5->z = var_10_1;
004589f6                      float var_30_2 = var_14_2;
004589fb                      float var_2c_3 = var_10_1;
004589fe                      CameraSet::SetTargetForOffset(this, x);
004589fe                      
00458a05                      if (arg2 == 0)
00458a05                      {
00458a0b                          this->farther = 0;
00458a0e                          this->m_ttLastZoom = 0f;
00458a11                          *(uint32_t*)((char*)this->m_ttLastZoom)[4] = 0;
00458a05                      }
00458a9c                  }
00458a8b              }
00458a76          }
004588ed      }
00458890  }

00458ada                                                                                90 90 90 90 90 90                            ......

00458ae0  void __fastcall CameraSet::UpdateCamera(class CameraSet* this)

00458ae0  {
00458af9      if (this->sbox->cmdinterp->vtable->GetMouseLookActive() == 0)
00458af9      {
00458b04          if (this->rot_left != 0)
00458b04          {
00458b06              int32_t var_50_1 = 1;
00458b08              int32_t var_54_1 = 0x3f800000;
00458b0d              int32_t var_58_1 = 1;
00458b27              CameraSet::Rotate(this, 1, 1, 1f, 1);
00458b04          }
00458b04          else if (this->rot_right != 0)
00458b18          {
00458b1a              int32_t var_50_2 = 1;
00458b1c              int32_t var_54_2 = 0x3f800000;
00458b21              int32_t var_58_2 = 1;
00458b27              CameraSet::Rotate(this, 0, 1, 1f, 1);
00458b18          }
00458b18          
00458b31          if (this->closer != 0)
00458b3c              CameraSet::Closer(this, 1, 1f);
00458b31          else if (this->farther != 0)
00458b53              CameraSet::Farther(this, 1, 1f);
00458b53          
00458b5d          if (this->raise != 0)
00458b68              CameraSet::Raise(this, 1, 1f);
00458b5d          else if (this->lower != 0)
00458b7f              CameraSet::Lower(this, 1, 1f);
00458b7f          
00458b8f          if (this->sbox->player != 0)
00458b8f          {
00458b9e              if (CameraSet::InHead(this) != 0)
00458b9e              {
00458ba3                  class CPhysicsObj* player = this->sbox->player;
00458bae                  t = 1f;
00458bb8                  CPhysicsObj::SetTranslucencyHierarchical(player, 1f);
00458bc1                  return;
00458b9e              }
00458b9e              
00458bc6              void var_48;
00458bc6              Position::Position(&var_48);
00458bc6              
00458bda              if (CameraManager::QueryPivotPosition(this->cm, &var_48) == 0)
00458bda              {
00458cab                  long double x87_r7_5 = ((long double)t);
00458cb1                  long double temp0_1 = ((long double)0f);
00458cb1                  (x87_r7_5 - temp0_1);
00458cb7                  int32_t eax_10;
00458cb7                  eax_10 = ((((x87_r7_5 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00458cb7                  
00458cbc                  if ((*(uint8_t*)((char*)eax_10)[1] & 0x41) == 0)
00458cbc                  {
00458cc1                      class CPhysicsObj* player_2 = this->sbox->player;
00458cc9                      t = 0f;
00458cd3                      CPhysicsObj::SetTranslucencyHierarchical(player_2, 0f);
00458cbc                  }
00458bda              }
00458bda              else
00458bda              {
00458beb                  long double st0_3 = Position::distance(&var_48, &this->sbox->viewer);
00458bf0                  (st0_3 - ((long double)0.449999988f));
00458bf8                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00458bf8                  
00458bfb                  if (!(p_1))
00458bfb                  {
00458c19                      t = ((float)(((long double)1f) - ((((long double)0.200000003f) - st0_3) / (((long double)0.200000003f) - ((long double)0.449999988f)))));
00458c27                      (((long double)t) - ((long double)0f));
00458c2f                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00458c2f                      
00458c32                      if (p_2)
00458c32                      {
00458c40                          long double x87_r7_3 = ((long double)t);
00458c46                          long double temp4_1 = ((long double)1f);
00458c46                          (x87_r7_3 - temp4_1);
00458c46                          
00458c51                          if ((*(uint8_t*)((char*)((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00458c53                              t = 1f;
00458c32                      }
00458c32                      else
00458c34                          t = 0f;
00458c34                      
00458c6d                      CPhysicsObj::SetTranslucencyHierarchical(this->sbox->player, t);
00458c76                      return;
00458bfb                  }
00458bfb                  
00458c79                  long double x87_r7_4 = ((long double)t);
00458c7f                  long double temp2_1 = ((long double)0f);
00458c7f                  (x87_r7_4 - temp2_1);
00458c7f                  
00458c8a                  if ((*(uint8_t*)((char*)((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00458c8a                  {
00458c8f                      class CPhysicsObj* player_1 = this->sbox->player;
00458c97                      t = 0f;
00458ca1                      CPhysicsObj::SetTranslucencyHierarchical(player_1, 0f);
00458c8a                  }
00458bda              }
00458b8f          }
00458af9      }
00458ae0  }

00458cdd                                                                                         90 90 90                               ...

00458ce0  void __fastcall CameraSet::SetInHead(class CameraSet* this)

00458ce0  {
00458ceb      if (this->looking_down != 0)
00458cef          CameraSet::LookDown(this, 0);
00458cef      
00458cfc      CameraManager::SetTranslationalStiffness(this->cm, 1f);
00458d01      class CameraManager* cm = this->cm;
00458d09      int32_t var_c = 0;
00458d11      int32_t var_8 = 0x3f800000;
00458d19      int32_t var_4 = 0;
00458d21      CameraManager::SetTargetDirection(cm, &var_c);
00458d26      long double x87_r7 = ((long double)0.180000007f);
00458d2f      float var_8_1 = ((float)x87_r7);
00458d33      long double x87_r6 = ((long double)0f);
00458d3d      class AC1Legacy::Vector3* ecx_2 = &this->cm->viewer_offset;
00458d40      float var_4_1 = ((float)x87_r6);
00458d44      var_c = 0;
00458d52      ecx_2->x = var_c;
00458d58      ecx_2->y = var_8_1;
00458d5b      ecx_2->z = var_4_1;
00458d63      float var_18 = ((float)x87_r7);
00458d6e      float var_14_1 = ((float)x87_r6);
00458d71      CameraSet::SetTargetForOffset(this, 0);
00458ce0  }

00458d7b                                                                                   90 90 90 90 90                             .....

00458d80  void __thiscall CameraSet::MouseLookHandler(class CameraSet* this, int32_t arg2, int32_t arg3)

00458d80  {
00458d85      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00458d8b      float eax = *(int32_t*)((char*)ICIDM::s_cidm_1 + 0x84);
00458d8b      
00458da5      if ((arg2 == 0 && arg3 == 0))
00458da5      {
00458da7          int32_t eax_2;
00458da7          eax_2 = *(int32_t*)((char*)ICIDM::s_cidm_1 + 0x89);
00458da7          
00458daf          if (eax_2 != 0)
00458daf          {
00458db5              int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
00458dbb              int32_t edx_1 = *(int32_t*)((char*)Timer::cur_time + 4);
00458dc1              this->sbox->cmdinterp->vtable->StopDrift();
00458ddd              long double x87_r7_2 = (((long double)this->m_LastServerMessage) + ((long double)0.5));
00458de3              long double temp2_1 = ((long double)Timer::cur_time_1);
00458de3              (x87_r7_2 - temp2_1);
00458de7              int32_t eax_4;
00458de7              eax_4 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00458de9              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00458de9              
00458dec              if (!(p_1))
00458dec              {
00458df9                  this->m_LastServerMessage = Timer::cur_time_1;
00458dfc                  *(uint32_t*)((char*)this->m_LastServerMessage)[4] = edx_1;
00458df6                  this->sbox->cmdinterp->vtable->SendMovementEvent();
00458dec              }
00458dec              
00458dec              goto label_458e2d;
00458daf          }
00458daf          
00458daf          return;
00458da5      }
00458da5      
00458e2d  label_458e2d:
00458e2d      int16_t eax_8;
00458e2d      int32_t ecx_4;
00458e2d      eax_8 = CameraSet::FilterMouseInput(this, ((float)((long double)arg2)), ((float)((long double)arg3)), eax, &arg3, &arg2);
00458e32      long double x87_r7_5 = ((long double)*(int32_t*)((char*)ICIDM::s_cidm_1 + 0x80));
00458e38      eax_8 = *(int32_t*)((char*)ICIDM::s_cidm_1 + 0x88);
00458e4c      arg3 = ((float)((((long double)arg3) * x87_r7_5) * ((long double)0.0666666701f)));
00458e5a      arg2 = ((float)((x87_r7_5 * ((long double)arg2)) * ((long double)0.0666666701f)));
00458e5a      
00458e5e      if (eax_8 != 0)
00458e5e      {
00458e66          arg2 = ((float)-(((long double)arg2)));
00458e70          arg3 = ((float)-(((long double)arg3)));
00458e5e      }
00458e5e      
00458e78      (((long double)arg3) - ((long double)0f));
00458e80      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
00458e80      
00458e83      if (p_2)
00458e83      {
00458e8d          this->mouselook_x_extent += 1;
00458e8d          
00458e96          if (this->mouselook_x_extent > 5)
00458e96          {
00458e98              long double x87_r7_13 = ((long double)arg3);
00458e9c              long double temp4_1 = ((long double)0f);
00458e9c              (x87_r7_13 - temp4_1);
00458ea7              float var_1c_3;
00458ea7              
00458ea7              if ((*(uint8_t*)((char*)((((x87_r7_13 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00458ea7              {
00458ecb                  (((long double)arg3) - ((long double)0f));
00458ed3                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00458ed3                  
00458ed6                  if (!(p_3))
00458ed6                  {
00458eda                      int32_t eax_10;
00458eda                      int32_t ecx_9;
00458eda                      eax_10 = CameraSet::InHead(this);
00458ee7                      int32_t var_18_3 = 0;
00458ee9                      int32_t var_1c_4 = ecx_9;
00458eea                      var_1c_3 = ((float)fabsl(((long double)arg3)));
00458eef                      int32_t var_20_3 = 0;
00458eef                      
00458ef1                      if (eax_10 == 0)
00458ef9                          ecx_4 = CameraSet::Rotate(this, 1, 0, var_1c_3, 0);
00458ef1                      else
00458ef9                          ecx_4 = CameraSet::Rotate(this, 0, 0, var_1c_3, 0);
00458ed6                  }
00458ea7              }
00458ea7              else
00458ea7              {
00458eab                  int32_t eax_9;
00458eab                  int32_t ecx_6;
00458eab                  eax_9 = CameraSet::InHead(this);
00458eb8                  int32_t var_18_2 = 0;
00458eba                  int32_t var_1c_2 = ecx_6;
00458ebb                  var_1c_3 = ((float)fabsl(((long double)arg3)));
00458ec0                  int32_t var_20_2 = 0;
00458ec0                  
00458ec2                  if (eax_9 != 0)
00458ef9                      ecx_4 = CameraSet::Rotate(this, 1, 0, var_1c_3, 0);
00458ec2                  else
00458ef9                      ecx_4 = CameraSet::Rotate(this, eax_9, 0, var_1c_3, 0);
00458ea7              }
00458e96          }
00458e83      }
00458e83      else
00458e85          this->mouselook_x_extent = 0;
00458e85      
00458f02      (((long double)arg2) - ((long double)0f));
00458f0a      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
00458f0a      
00458f0d      if (!(p_4))
00458f0d      {
00458f10          this->mouselook_y_extent = 0;
00458f1a          return;
00458f0d      }
00458f0d      
00458f1d      this->mouselook_y_extent += 1;
00458f1d      
00458f26      if (this->mouselook_y_extent > 5)
00458f26      {
00458f28          long double x87_r7_20 = ((long double)arg2);
00458f2c          long double temp6_1 = ((long double)0f);
00458f2c          (x87_r7_20 - temp6_1);
00458f2c          
00458f37          if ((*(uint8_t*)((char*)((((x87_r7_20 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_20, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_20 == temp6_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00458f37          {
00458f42              CameraSet::Lower(this, 0, arg2);
00458f4c              return;
00458f37          }
00458f37          
00458f53          (((long double)arg2) - ((long double)0f));
00458f5b          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
00458f5b          
00458f5e          if (!(p_5))
00458f5e          {
00458f64              int32_t var_18_5 = ecx_4;
00458f6e              CameraSet::Raise(this, 0, ((float)fabsl(((long double)arg2))));
00458f5e          }
00458f26      }
00458d80  }

00458f7b                                                                                   90 90 90 90 90                             .....

00458f80  void __thiscall CameraSet::SetDefaultOffsets(class CameraSet* this, int32_t arg2)

00458f80  {
00458f8e      if (arg2 != 0)
00458f8e      {
00458f99          if (this->looking_down != 0)
00458f9d              CameraSet::LookDown(this, 0);
00458f9d          
00458fab          if (CameraSet::InHead(this) != 0)
00458fb6              CameraSet::Farther(this, 0, 1f);
00458fb6          
00458fbb          class CameraManager* cm = this->cm;
00458fc4          arg2 = cm->scale;
00458fc8          uint32_t player_id = this->sbox->player_id;
00458fd0          int32_t var_c;
00458fd0          
00458fd0          if (player_id != 0)
00458fd0          {
00458fd5              CameraManager::SetPivotObject(cm, player_id, 0xffffffff);
00458fda              class CameraManager* cm_1 = this->cm;
00458fe2              var_c = 0;
00458fee              cm_1->pivot_offset.x = var_c;
00458fee              cm_1->pivot_offset.y = 0f;
00458fee              cm_1->pivot_offset.z = 1.5f;
00458fd0          }
00458fd0          
0045900d          class CameraManager* cm_2 = this->cm;
00459015          var_c = 0;
0045901d          int32_t var_8_1 = 0x3f800000;
00459025          int32_t var_4_2 = 0;
0045902d          CameraManager::SetTargetDirection(cm_2, &var_c);
00459032          float current_stiffness = this->current_stiffness;
00459035          class CameraManager* cm_3 = this->cm;
0045903a          float current_stiffness_1 = current_stiffness;
0045903a          
00459048          if (CameraManager::SetTranslationalStiffness(cm_3, current_stiffness) != 0)
0045904d              CameraManager::SetRotationalStiffness(cm_3, current_stiffness);
0045904d          
0045905b          long double x87_r7_2 = (((long double)-2.5f) * ((long double)arg2));
0045905f          class AC1Legacy::Vector3* edx_5 = &this->cm->viewer_offset;
00459062          float var_8_2 = ((float)x87_r7_2);
00459070          var_c = 0;
00459078          long double x87_r6_2 = (((long double)0.75f) * ((long double)arg2));
00459080          edx_5->x = var_c;
00459082          float var_4_3 = ((float)x87_r6_2);
0045908c          edx_5->y = var_8_2;
0045908f          edx_5->z = var_4_3;
00459097          float var_24_2 = ((float)x87_r7_2);
0045909c          float var_20_4 = ((float)x87_r6_2);
004590a5          CameraSet::SetTargetForOffset(this, 0);
00458f8e      }
00458f80  }

004590b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004590c0  void __thiscall CameraSet::CameraSet(class CameraSet* this, class SmartBox* arg2)

004590c0  {
004590c9      this->m_cRef = 1;
004590d0      this->vtable = 0x79bc84;
004590d6      this->sbox = arg2;
004590d9      __builtin_memset(&this->looking_down, 0, 0x2c);
004590fa      this->mouselook_x_extent = 0;
004590fe      this->mouselook_y_extent = 0;
00459102      __builtin_memset(&this->m_ttLastRotate, 0, 0x28);
00459126      class CameraManager* camera_manager = arg2->camera_manager;
0045912d      this->cm = camera_manager;
00459130      CameraManager::SetCameraSet(camera_manager, this);
0045913d      this->current_stiffness = ((float)((long double)this->cm->t_stiffness));
00459142      CameraSet::SetDefaultOffsets(this, 1);
004590c0  }

0045914d                                         90 90 90                                                               ...

00459150  void* __thiscall CameraSet::`scalar deleting destructor'(class CameraSet* this, uint32_t arg2)

00459150  {
00459155      __builtin_memset(&this->rot_left, 0, 0x18);
0045916c      this->vtable = 0x7942f4;
0045916c      
00459172      if ((arg2 & 1) != 0)
00459175          operator delete(this);
00459175      
00459180      return this;
00459150  }

00459183           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00459190  class UIObject* __fastcall UIRegion::GetObjectA(class UIRegion const* this)

00459190  {
004591a2      do
004591a2      {
00459190          class UIObject* m_object = this->m_object;
00459190          
00459198          if (m_object != 0)
004591ab              return m_object;
004591ab          
0045919a          this = this->m_parent;
004591a2      } while (this != 0);
004591a2      
004591a9      return nullptr;
00459190  }

004591ac                                      90 90 90 90                                                              ....

004591b0  void __thiscall UIElement::SetActivatable(class UIElement* this, uint8_t arg2)

004591b0  {
004591b5      union __inner23 = this->__inner23;
004591c5      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 2) ^ __inner23) & 4));
004591b0  }

004591ce                                            90 90                                                                ..

004591d0  void __thiscall UIElement::SetObjectIsTemporary(class UIElement* this, uint8_t arg2)

004591d0  {
004591d5      union __inner23 = this->__inner23;
004591e7      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 0xf) ^ __inner23) & 0x8000));
004591d0  }


004591f0  void UIElementManager::DestroyUIElementManager()

004591f0  {
004591f0      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004591f0      
004591f7      if (UIElementManager::s_pInstance_1 != 0)
004591f9          UIElementManager::s_pInstance_1->vtable->__vecDelDtor(1);
004591f9      
00459202      UIElementManager::s_pInstance = nullptr;
004591f0  }

0045920d                                         90 90 90                                                               ...

00459210  class DBObj* LayoutDesc::Allocate(class LayoutDesc const* this @ ecx)

00459210  {
00459210      /* tailcall */
00459210      return LayoutDesc::Allocator();
00459210  }

00459215                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00459220  class DBObj* LayoutDesc::Allocator()

00459220  {
00459225      void* eax = operator new(0xc0);
00459225      
0045922f      if (eax == 0)
0045923a          return 0;
0045923a      
00459233      /* tailcall */
00459233      return LayoutDesc::LayoutDesc(eax);
00459220  }

0045923b                                                                                   90 90 90 90 90                             .....

00459240  uint32_t LayoutDesc::GetDBOType(class LayoutDesc const* this @ ecx) __pure

00459240  {
00459245      return 0x23;
00459240  }

00459246                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00459250  void __thiscall UIElementManager::StartHover(class UIElementManager* this, int32_t arg2, int32_t arg3)

00459250  {
0045925b      if (this->m_bHoverStarted == 0)
00459272          this->m_bHoverStarted = this->m_pElementLastEntered->vtable->MouseHover(arg2, arg3);
00459250  }

0045927c                                                                                      90 90 90 90                              ....

00459280  void __fastcall UIElementManager::StopHover(class UIElementManager* this)

00459280  {
0045928b      if (this->m_bHoverStarted != 0)
0045928b      {
0045928d          class UIElement* m_pElementLastEntered = this->m_pElementLastEntered;
00459295          this->m_bHoverStarted = 0;
00459295          
0045929c          if (m_pElementLastEntered != 0)
0045929e              m_pElementLastEntered->vtable->MouseUnhover();
0045928b      }
0045928b      
004592a3      class UIElement* m_pTooltipElement = this->m_pTooltipElement;
004592a3      
004592ab      if (m_pTooltipElement != 0)
004592ab      {
004592ad          UIElement::AddToDeleteQueue(m_pTooltipElement);
004592b2          this->m_pTooltipElement = nullptr;
004592ab      }
00459280  }

004592be                                                                                            90 90                                ..

004592c0  void __thiscall UIElementManager::SetDurationForCurrentTooltip(class UIElementManager* this, float arg2)

004592c0  {
004592d0      this->m_tooltipStart = ((double)((((long double)Timer::local_time) - ((long double)this->m_tooltipDuration)) + ((long double)arg2)));
004592c0  }

004592d9                                                                             90 90 90 90 90 90 90                           .......

004592e0  uint8_t __fastcall UIElementManager::ClearDragandDrop(class UIElementManager* this)

004592e0  {
004592e4      class UIElement* m_dragElement = this->m_dragElement;
004592e4      
004592fb      if ((m_dragElement != 0 && (((int8_t)(m_dragElement->__inner23 >> 0xf)) & 1) != 0))
004592fb      {
004592fd          UIElement::AddToDeleteQueue(m_dragElement);
00459302          this->m_dragElement = nullptr;
004592fb      }
004592fb      
00459308      this->m_bDragStarted = 0;
0045930e      this->m_dragOwner = nullptr;
00459314      this->m_pcPotentialDragElement = nullptr;
0045931e      return 1;
004592e0  }

0045931f                                                                                               90                                 .

00459320  void __thiscall UIElementManager::SetVisible(class UIElementManager* this, uint8_t arg2)

00459320  {
00459328      class ContextMenu* m_pCSM = this->m_pCSM;
00459328      
00459330      if (m_pCSM != 0)
00459333          ContextMenu::SetVisible(m_pCSM, arg2);
00459333      
0045933a      if (arg2 == 0)
0045933a      {
0045933c          class UIElement* m_pTooltipElement = this->m_pTooltipElement;
00459344          this->m_pTooltipOwner = nullptr;
00459344          
0045934e          if (m_pTooltipElement != 0)
0045934e          {
00459350              UIElement::AddToDeleteQueue(m_pTooltipElement);
00459355              this->m_pTooltipElement = nullptr;
0045934e          }
0045933a      }
00459320  }

00459364              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00459370  uint8_t MouseHitTester<MouseOverCriteria>::Recurse(class UIElement* arg1, int32_t arg2, int32_t arg3, class UIElement** arg4)

00459370  {
00459382      uint32_t i_1;
00459382      
00459382      if (((arg1->__bitfield164 >> 1) & 1) != 0)
00459382      {
0045938a          int32_t ecx_2;
0045938a          i_1 = UIElement::GetLastChildElement(arg1);
0045938a          
00459393          for (uint32_t i = i_1; i != 0; i = UIElement::GetPrevChildElement(arg1, i))
00459393          {
004593ab              if ((UIRegion::PointIsOverRegion(i, arg2, arg3) != 0 && MouseHitTester<MouseOverCriteria>::Recurse(i, (arg2 - *(uint32_t*)(i + 0x7c)), (arg3 - *(uint32_t*)(i + 0x80)), arg4) != 0))
004593d0                  goto label_459401;
00459393          }
00459393          
004593e0          i_1 = arg1->m_bIsMouseVisible;
004593e0          
004593f6          if ((i_1 != 0 || (((int8_t)(arg1->__bitfield164 >> 6)) & 1) != 0))
004593f6          {
004593fc              *(uint32_t*)arg4 = arg1;
00459401          label_459401:
00459401              i_1 = 1;
00459404              return 1;
004593f6          }
00459382      }
00459382      
00459408      i_1 = 0;
0045940b      return 0;
00459370  }

0045940c                                      90 90 90 90                                                              ....

00459410  uint8_t __thiscall SmartArray<UIElement *,1>::RemoveOrdered(class SmartArray<UIElement *,1>* this, class UIElement** arg2)

00459410  {
00459417      class UIElement** m_data = this->m_data;
00459417      
0045941e      for (void* ecx_1 = &m_data[this->m_num]; m_data < ecx_1; m_data = &m_data[1])
0045941e      {
00459428          if (*(uint32_t*)m_data == *(uint32_t*)arg2)
00459428          {
0045943d              if (m_data < ((char*)ecx_1 - 4))
00459449                  __builtin_memcpy(m_data, &m_data[1], (((((((char*)ecx_1 - 4) - m_data) - 1) >> 2) + 1) << 2));
00459449              
0045944e              uint32_t ecx_8 = (this->m_num - 1);
0045944f              this->m_num = ecx_8;
00459452              this->m_data[ecx_8] = 0;
0045945c              class UIElement** eax_1;
0045945c              eax_1 = 1;
0045945f              return 1;
00459428          }
0045941e      }
0045941e      
00459432      class SmartArray<UIElement *,1>* eax;
00459432      eax = 0;
00459435      return 0;
00459410  }

00459462        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00459470  uint8_t __thiscall SmartArray<UIElement *,1>::RemoveOrderedByIndex(class SmartArray<UIElement *,1>* this, uint32_t arg2)

00459470  {
00459472      uint32_t m_num = this->m_num;
00459472      
0045947c      if (arg2 >= m_num)
0045947c      {
004594ae          m_num = 0;
004594b1          return 0;
0045947c      }
0045947c      
0045947e      class UIElement** m_data = this->m_data;
00459482      void* edi = &m_data[arg2];
00459485      void* ecx = &m_data[(m_num - 1)];
0045948a      this->m_num = (m_num - 1);
0045948a      
0045948d      if (edi < ecx)
00459499          __builtin_memcpy(edi, ((char*)edi + 4), ((((((char*)ecx - edi) - 1) >> 2) + 1) << 2));
00459499      
0045949e      this->m_data[this->m_num] = 0;
004594a8      uint32_t eax_1;
004594a8      eax_1 = 1;
004594ab      return 1;
00459470  }

004594b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004594c0  void __fastcall SmartArray<Box2D,1>::Reset(class SmartArray<Box2D,1>* this)

004594c0  {
004594c6      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004594da      this->m_num = 0;
004594da      
004594dd      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004594dd      {
004594e2          operator delete[](this->m_data);
004594ea          this->m_data = 0;
004594ec          this->m_sizeAndDeallocate = 0;
004594f4          return;
004594dd      }
004594dd      
004594f7      if (this->m_data != 0)
004594f7      {
004594f9          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
004594f9          
004594ff          if ((i_2 - 1) >= 0)
004594ff          {
00459503              int32_t ecx_3 = ((i_2 - 1) << 4);
00459506              int32_t i_1 = i_2;
00459509              int32_t ebx;
00459509              int32_t var_1c_2 = ebx;
0045952b              int32_t i;
0045952b              
0045952b              do
0045952b              {
00459512                  void* eax_2 = (this->m_data + ecx_3);
0045951a                  void var_10;
0045951a                  
0045951a                  if (eax_2 != &var_10)
0045951a                  {
0045951c                      *(uint32_t*)eax_2 = 0;
0045951e                      *(uint32_t*)((char*)eax_2 + 8) = 0;
00459521                      *(uint32_t*)((char*)eax_2 + 4) = 0;
00459524                      *(uint32_t*)((char*)eax_2 + 0xc) = 0;
0045951a                  }
0045951a                  
00459527                  ecx_3 -= 0x10;
0045952a                  i = i_1;
0045952a                  i_1 -= 1;
0045952b              } while (i != 1);
004594ff          }
004594f7      }
004594c0  }

00459534                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00459540  void __fastcall SmartArray<VertexRange,1>::Reset(class SmartArray<VertexRange,1>* this)

00459540  {
00459546      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0045955a      this->m_num = 0;
0045955a      
0045955d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0045955d      {
00459562          operator delete[](this->m_data);
0045956a          this->m_data = 0;
0045956c          this->m_sizeAndDeallocate = 0;
00459574          return;
0045955d      }
0045955d      
00459577      if (this->m_data != 0)
00459577      {
00459579          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
0045957e          int32_t eax_1 = (eax - 1);
0045957e          
0045957f          if ((eax - 1) >= 0)
0045957f          {
0045959b              int32_t temp1_1;
0045959b              
0045959b              do
0045959b              {
00459590                  temp1_1 = eax_1;
00459590                  eax_1 -= 1;
00459591                  class VertexRange* m_data = this->m_data;
00459593                  int32_t var_8;
00459593                  m_data[(eax_1 + 1)].m_nFirstVertex = var_8;
00459597                  int32_t var_4;
00459597                  *(uint32_t*)(&m_data[eax_1] + 0xc) = var_4;
0045959b              } while ((temp1_1 - 1) >= 0);
0045957f          }
00459577      }
00459540  }

004595a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004595b0  void __thiscall UIElementMessageInfo::UIElementMessageInfo(struct UIElementMessageInfo* this, uint32_t arg2, class UIElement* arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, int32_t arg8, int32_t arg9, int32_t arg10)

004595b0  {
004595ba      this->idElement = arg2;
004595c0      this->pElement = arg3;
004595c7      this->idMessage = arg4;
004595ce      this->dwParam1 = arg5;
004595d5      this->dwParam2 = arg6;
004595dc      this->tsSerialNumber.m_timestamp = 0;
004595e3      this->ptWindow.x = arg7;
004595ea      this->ptWindow.y = arg8;
004595f1      this->ptElement.x = arg9;
004595f4      this->ptElement.y = arg10;
004595b0  }

004595fa                                                                                90 90 90 90 90 90                            ......

00459600  void* __thiscall LayoutDesc::`scalar deleting destructor'(class LayoutDesc* this, uint32_t arg2)

00459600  {
00459603      LayoutDesc::~LayoutDesc(this);
00459603      
0045960d      if ((arg2 & 1) != 0)
00459610          operator delete(this);
00459610      
0045961b      return this;
00459600  }

0045961e                                                                                            90 90                                ..

00459620  void* __thiscall ElementDesc::`scalar deleting destructor'(class ElementDesc* this, uint32_t arg2)

00459620  {
00459623      ElementDesc::~ElementDesc(this);
00459623      
0045962d      if ((arg2 & 1) != 0)
00459630          operator delete(this);
00459630      
0045963b      return this;
00459620  }

0045963e                                                                                            90 90                                ..

00459640  void __fastcall UIElementManager::ProcessUIMessageRemovalData(class UIElementManager* this)

00459640  {
00459649      int32_t i = 0;
0045964d      int32_t i_1 = 0;
0045964d      
00459651      if (this->m_aUIMessageRemovalData.m_num <= 0)
00459651      {
004596eb          this->m_aUIMessageRemovalData.m_num = 0;
004596f4          return;
00459651      }
00459651      
004596d7      do
004596d7      {
00459660          struct UIMessageRemovalData* m_data = this->m_aUIMessageRemovalData.m_data;
0045966c          int32_t* pListenerArray = m_data[i].pListenerArray;
0045966f          int32_t ebx_1 = pListenerArray[2];
00459672          int32_t j = 0;
00459672          
00459676          if (ebx_1 > 0)
00459676          {
00459678              int32_t* edi_1 = *(uint32_t*)pListenerArray;
0045967a              int32_t* esi_1 = edi_1;
0045967a              
0045968b              do
0045968b              {
00459682                  if (*(uint32_t*)esi_1 == m_data[i].pListener)
00459682                  {
00459698                      if ((esi_1[1] == 0 && j < ebx_1))
00459698                      {
0045969f                          pListenerArray[2] = (ebx_1 - 1);
0045969f                          
004596a2                          if (j != (ebx_1 - 1))
004596a2                          {
004596a7                              edi_1[(j * 2)] = edi_1[((ebx_1 - 1) * 2)];
004596ae                              edi_1[((j * 2) + 1)] = edi_1[(((ebx_1 - 1) * 2) + 1)];
004596b2                              int32_t edx_1 = pListenerArray[2];
004596b5                              int32_t eax_1 = *(uint32_t*)pListenerArray;
004596bb                              *(uint32_t*)(eax_1 + (edx_1 << 3)) = i_1;
004596c2                              int32_t var_4;
004596c2                              *(uint32_t*)((eax_1 + (edx_1 << 3)) + 4) = var_4;
004596a2                          }
00459698                      }
00459698                      
00459698                      break;
00459682                  }
00459682                  
00459684                  j += 1;
00459685                  esi_1 = &esi_1[2];
0045968b              } while (j < pListenerArray[2]);
00459676          }
00459676          
004596d0          i = (i_1 + 1);
004596d3          i_1 = i;
004596d7      } while (i < this->m_aUIMessageRemovalData.m_num);
004596d7      
004596dc      this->m_aUIMessageRemovalData.m_num = 0;
00459640  }

0045965d                                                                                         8d 49 00                               .I.
004596f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00459700  void __thiscall UIElementManager::StartTooltip(class UIElementManager* this, class UIElement* arg2, class UIElement* arg3)

00459700  {
00459706      class UIElement* esi = arg3;
0045970f      int32_t eax = UIRegion::GetWidth(esi);
00459718      int32_t eax_1 = UIRegion::GetHeight(esi);
00459729      void* eax_3 = ICIDM::s_cidm->vtable->GetMouseX();
00459732      struct ICIDM::VTable* vtable = ICIDM::s_cidm->vtable;
00459739      arg3 = ((char*)eax_3 + 0x20);
0045973d      void* eax_4;
0045973d      uint8_t edx;
0045973d      eax_4 = vtable->GetMouseY();
00459747      class UIElement* var_c = ((char*)eax_4 + 0x20);
0045974b      int32_t var_8 = 0;
0045974f      int32_t* ecx_4 = &var_8;
0045974f      
00459753      if (((char*)eax_3 + 0x20) >= 0)
00459755          ecx_4 = &arg3;
00459755      
0045975d      arg3 = *(uint32_t*)ecx_4;
00459761      var_8 = 0;
00459765      int32_t* eax_6 = &var_8;
00459765      
00459769      if (((char*)eax_4 + 0x20) >= 0)
0045976b          eax_6 = &var_c;
0045976b      
0045976f      class UIElement* edi_2 = *(uint32_t*)eax_6;
00459771      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00459777      var_c = edi_2;
0045977b      uint32_t eax_7 = RenderDevice::GetDisplayWidth(RenderDevice::render_device_1);
00459780      class UIElement* ecx_6 = arg3;
00459784      int32_t eax_8 = (eax_7 - eax);
00459786      var_8 = eax_8;
0045978c      int32_t* eax_9 = &var_8;
0045978c      
00459790      if (eax_8 >= ecx_6)
00459792          eax_9 = &arg3;
00459792      
0045979c      int32_t ebp_1 = *(uint32_t*)eax_9;
004597a3      int32_t eax_11 = (RenderDevice::GetDisplayHeight(RenderDevice::render_device) - eax_1);
004597a7      arg3 = eax_11;
004597ad      class UIElement** eax_12 = &arg3;
004597ad      
004597b1      if (eax_11 >= edi_2)
004597b3          eax_12 = &var_c;
004597b3      
004597bd      class UIElement* edi_3 = *(uint32_t*)eax_12;
004597c5      esi->__inner23 |= 0x8000;
004597cb      int32_t var_20 = 1;
004597cf      UIElement::SetShouldOwnObject(esi, edx);
004597d8      UIElement::SetIsRootElement(esi, 1);
004597dd      esi->vtable->MoveTo(ebp_1, edi_3);
004597e6      this->m_pTooltipElement = esi;
004597fa      this->m_tooltipStart = (*(uint32_t*)Timer::local_time);
00459800      *(uint32_t*)((char*)this->m_tooltipStart)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00459700  }

0045980d                                         90 90 90                                                               ...

00459810  void __fastcall UIElementManager::StopDragandDrop(class UIElementManager* this)

00459810  {
0045981e      if (this->m_dragElement != 0)
0045981e      {
00459827          void* eax_1 = operator new(0x18);
00459831          void* esi_1;
00459831          
00459831          if (eax_1 == 0)
00459850              esi_1 = nullptr;
00459831          else
00459831          {
00459833              *(uint32_t*)((char*)eax_1 + 4) = 1;
0045983a              *(uint32_t*)eax_1 = 0x7c9870;
00459840              *(uint32_t*)((char*)eax_1 + 8) = 0;
00459843              *(uint32_t*)((char*)eax_1 + 0xc) = 0;
00459846              *(uint32_t*)((char*)eax_1 + 0x10) = 0;
00459849              *(uint8_t*)((char*)eax_1 + 0x14) = 0;
0045984c              esi_1 = eax_1;
00459831          }
00459831          
00459858          *(uint32_t*)((char*)esi_1 + 8) = this->m_dragElement;
00459861          *(uint32_t*)((char*)esi_1 + 0x10) = this->m_pElementLastDragCursorOver;
0045986a          *(uint32_t*)((char*)esi_1 + 0xc) = this->m_dragOwner;
0045986d          *(uint8_t*)((char*)esi_1 + 0x14) = 1;
00459871          class UIElement* m_pElementLastDragCursorOver = this->m_pElementLastDragCursorOver;
00459871          
00459879          if (m_pElementLastDragCursorOver == 0)
00459889              *(uint8_t*)((char*)esi_1 + 0x14) = 0;
00459879          else
00459884              *(uint8_t*)((char*)esi_1 + 0x14) = *(int32_t*)((char*)m_pElementLastDragCursorOver->vtable + 0xd8)(esi_1);
00459884          
0045988c          class UIElement* m_dragOwner = this->m_dragOwner;
0045988c          
00459894          if (m_dragOwner != 0)
00459899              *(int32_t*)((char*)m_dragOwner->vtable + 0xe0)(esi_1);
00459899          
004598ab          if (InterlockedDecrement(((char*)esi_1 + 4)) == 0)
004598b3              **(uint32_t**)esi_1(1);
0045981e      }
0045981e      
004598b6      class UIElement* m_dragElement = this->m_dragElement;
004598b6      
004598cb      if ((m_dragElement != 0 && (((int8_t)(m_dragElement->__inner23 >> 0xf)) & 1) != 0))
004598cb      {
004598cd          UIElement::AddToDeleteQueue(m_dragElement);
004598d2          this->m_dragElement = nullptr;
004598cb      }
004598cb      
004598d8      this->m_bDragStarted = 0;
004598de      this->m_dragOwner = nullptr;
004598e4      this->m_pcPotentialDragElement = nullptr;
00459810  }

004598ed                                         90 90 90                                                               ...

004598f0  void __thiscall UIElementManager::UnregisterActivatable(class UIElementManager* this, class UIElement* arg2)

004598f0  {
004598f6      if (arg2 != 0)
00459903          SmartArray<UIElement *,1>::RemoveOrdered(&this->m_activatableElements, &arg2);
004598f0  }

0045990b                                   90 90 90 90 90                                                             .....

00459910  void __fastcall UIElementManager::ActivateNext(class UIElementManager* this, uint8_t arg2)

00459910  {
00459914      uint32_t m_num = this->m_activatableElements.m_num;
00459920      class UIElement* i = this->m_activatableElements.m_data[(m_num - 1)];
00459920      
00459927      if (i != 0)
00459927      {
0045992a          int32_t ebx_1 = ((m_num - 1) << 2);
0045992a          
00459955          do
00459955          {
0045993a              if (UIElement::IsVisible(i) != 0)
0045993a                  break;
0045993a              
00459942              i = *(uint32_t*)((ebx_1 + this->m_activatableElements.m_data) - 4);
0045994c              ebx_1 -= 4;
0045994c              
00459951              if (i == this->m_pRootElement)
00459951                  break;
00459955          } while (i != 0);
00459955          
00459957          i->vtable->Activate();
00459927      }
00459910  }

00459967                       90 90 90 90 90 90 90 90 90                                                         .........

00459970  void __fastcall SurfaceUsageSummary::SurfaceUsageSummary(struct SurfaceUsageSummary* this)

00459970  {
00459970      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0045997e      this->Name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00459981      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00459970  }

0045998b                                   90 90 90 90 90                                                             .....

00459990  class UIElement* __thiscall UIElementManager::GetElement(class UIElementManager* this, uint32_t arg2)

00459990  {
00459993      uint32_t m_num = this->m_elementList.m_num;
00459998      int32_t edx = 0;
00459998      
0045999c      if (m_num <= 0)
004599c6          return nullptr;
004599c6      
0045999e      class UIElement** m_data = this->m_elementList.m_data;
0045999e      
004599b9      do
004599b9      {
004599a5          class UIElement* result = *(uint32_t*)m_data;
004599a5          
004599b1          if ((result != 0 && result->m_desc.m_elementID == arg2))
004599c1              return result;
004599c1          
004599b3          edx += 1;
004599b4          m_data = &m_data[1];
004599b9      } while (edx < m_num);
004599b9      
004599be      return 0;
00459990  }

004599c9                             90 90 90 90 90 90 90                                                           .......

004599d0  uint8_t __thiscall DBObjGrabber<LayoutDesc>::set(class DBObjGrabber<LayoutDesc>* this, class IDClass<_tagDataID,32,0> arg2)

004599d0  {
004599db      class LayoutDesc* m_object = this->m_object;
004599f4      void var_8;
004599f4      this->m_object = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x23));
004599f4      
004599f6      if (m_object != 0)
004599f8          m_object->vtable->Release();
004599f8      
00459a03      class DBObj* eax_1;
00459a03      eax_1 = this->m_object != 0;
00459a0a      return eax_1;
004599d0  }

00459a0d                                         90 90 90                                                               ...

00459a10  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>* this, uint32_t arg2)

00459a10  {
00459a13      class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_buckets = this->m_buckets;
00459a1b      this->vtable = 0x79bd5c;
00459a1b      
00459a21      if (m_buckets != &this->m_aInplaceBuckets)
00459a24          operator delete[](m_buckets);
00459a24      
00459a2e      this->m_buckets = nullptr;
00459a31      this->m_firstInterestingBucket = nullptr;
00459a34      this->m_numBuckets = 0;
00459a37      this->m_numElements = 0;
00459a37      
00459a3f      if ((arg2 & 1) != 0)
00459a42          operator delete(this);
00459a42      
00459a4d      return this;
00459a10  }


00459a50  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>* this, uint32_t arg2)

00459a50  {
00459a53      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_buckets = this->m_buckets;
00459a5b      this->vtable = 0x79bd60;
00459a5b      
00459a61      if (m_buckets != &this->m_aInplaceBuckets)
00459a64          operator delete[](m_buckets);
00459a64      
00459a6e      this->m_buckets = nullptr;
00459a71      this->m_firstInterestingBucket = nullptr;
00459a74      this->m_numBuckets = 0;
00459a77      this->m_numElements = 0;
00459a77      
00459a7f      if ((arg2 & 1) != 0)
00459a82          operator delete(this);
00459a82      
00459a8d      return this;
00459a50  }


00459a90  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>* this, uint32_t arg2)

00459a90  {
00459a93      class HashTableData<unsigned long,SmartArray<UIElement *,1> >** m_buckets = this->m_buckets;
00459a9b      this->vtable = 0x79bd64;
00459a9b      
00459aa1      if (m_buckets != &this->m_aInplaceBuckets)
00459aa4          operator delete[](m_buckets);
00459aa4      
00459aae      this->m_buckets = nullptr;
00459ab1      this->m_firstInterestingBucket = nullptr;
00459ab4      this->m_numBuckets = 0;
00459ab7      this->m_numElements = 0;
00459ab7      
00459abf      if ((arg2 & 1) != 0)
00459ac2          operator delete(this);
00459ac2      
00459acd      return this;
00459a90  }


00459ad0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)> *,0>* this, uint32_t arg2)

00459ad0  {
00459ad3      class HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)>** m_buckets = this->m_buckets;
00459adb      this->vtable = 0x79bd68;
00459adb      
00459ae1      if (m_buckets != &this->m_aInplaceBuckets)
00459ae4          operator delete[](m_buckets);
00459ae4      
00459aee      this->m_buckets = nullptr;
00459af1      this->m_firstInterestingBucket = nullptr;
00459af4      this->m_numBuckets = 0;
00459af7      this->m_numElements = 0;
00459af7      
00459aff      if ((arg2 & 1) != 0)
00459b02          operator delete(this);
00459b02      
00459b0d      return this;
00459ad0  }


00459b10  void* __thiscall IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>* this, uint32_t arg2)

00459b10  {
00459b13      class HashSetData<unsigned long>** m_buckets = this->m_buckets;
00459b1b      this->vtable = 0x79bd6c;
00459b1b      
00459b21      if (m_buckets != &this->m_aInplaceBuckets)
00459b24          operator delete[](m_buckets);
00459b24      
00459b2e      this->m_buckets = nullptr;
00459b31      this->m_firstInterestingBucket = nullptr;
00459b34      this->m_numBuckets = 0;
00459b37      this->m_numElements = 0;
00459b37      
00459b3f      if ((arg2 & 1) != 0)
00459b42          operator delete(this);
00459b42      
00459b4d      return this;
00459b10  }


00459b50  void* __thiscall SurfaceUsageSummary::`vector deleting destructor'(struct SurfaceUsageSummary* this, uint32_t arg2)

00459b50  {
00459b50      struct SurfaceUsageSummary* var_4 = this;
00459b50      
00459b5a      if ((arg2 & 2) == 0)
00459b5a      {
00459bc2          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = (this->Name.m_charbuffer - 0x14);
00459bc2          
00459bd5          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00459bdd              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00459bdd          
00459be4          if ((arg2 & 1) != 0)
00459be7              operator delete(this);
00459be7          
00459bf4          return this;
00459b5a      }
00459b5a      
00459b5c      int32_t Bytes = this->Bytes;
00459b5c      
00459b6a      if ((Bytes - 1) >= 0)
00459b6a      {
00459b74          void* edi_1 = &this[Bytes].Name;
00459b77          var_4 = Bytes;
00459ba3          struct SurfaceUsageSummary* i;
00459ba3          
00459ba3          do
00459ba3          {
00459b80              int32_t esi_1 = *(uint32_t*)((char*)edi_1 - 0x18);
00459b83              edi_1 -= 0x18;
00459b83              
00459b95              if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
00459b9d                  **(uint32_t**)(esi_1 - 0x14)(1);
00459b9d              
00459b9f              i = var_4;
00459b9f              var_4 -= 1;
00459ba3          } while (i != 1);
00459b6a      }
00459b6a      
00459bab      if ((arg2 & 1) != 0)
00459bae          operator delete[](((char*)this - 4));
00459bae      
00459bbc      return ((char*)this - 4);
00459b50  }

00459b7d                                                                                         8d 49 00                               .I.
00459bf7                                                                       90 90 90 90 90 90 90 90 90                         .........

00459c00  struct SurfaceUsageSummary& __thiscall SurfaceUsageSummary::operator=(struct SurfaceUsageSummary* this, struct SurfaceUsageSummary const& arg2)

00459c00  {
00459c08      uint32_t* result = this;
00459c0a      *(uint32_t*)result = arg2->Bytes;
00459c0c      void* eax_1 = result[1];
00459c0c      
00459c12      if (eax_1 != arg2->Name.m_charbuffer)
00459c12      {
00459c28          if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
00459c30              **(uint32_t**)((char*)eax_1 - 0x14)(1);
00459c30          
00459c32          class PSRefBufferCharData<char>* m_charbuffer = arg2->Name.m_charbuffer;
00459c35          result[1] = m_charbuffer;
00459c3c          InterlockedIncrement(&m_charbuffer[-1]);
00459c12      }
00459c12      
00459c46      result[2] = arg2->ElementWidth;
00459c4c      result[3] = arg2->ElementHeight;
00459c52      result[4] = arg2->SurfaceWidth;
00459c58      result[5] = arg2->SurfaceHeight;
00459c5f      return result;
00459c00  }

00459c62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00459c70  void __thiscall UIElementMessageInfo::UIElementMessageInfo(struct UIElementMessageInfo* this, struct UIElementMessageInfo const* arg2)

00459c70  {
00459c78      this->idElement = arg2->idElement;
00459c7d      this->pElement = arg2->pElement;
00459c83      this->idMessage = arg2->idMessage;
00459c89      this->dwParam1 = arg2->dwParam1;
00459c8f      this->dwParam2 = arg2->dwParam2;
00459c95      this->ptWindow.x = arg2->ptWindow.x;
00459c9b      this->ptWindow.y = arg2->ptWindow.y;
00459ca1      this->ptElement.x = arg2->ptElement.x;
00459ca7      this->ptElement.y = arg2->ptElement.y;
00459cad      this->tsSerialNumber.m_timestamp = arg2->tsSerialNumber.m_timestamp;
00459c70  }

00459cb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00459cc0  uint8_t __thiscall SmartArray<Box2D,1>::grow(class SmartArray<Box2D,1>* this, uint32_t arg2)

00459cc0  {
00459cc1      uint32_t ebx = arg2;
00459ccc      void* eax;
00459ccc      
00459ccc      if (ebx >= this->m_num)
00459ccc      {
00459cdc          uint32_t eax_2;
00459cdc          
00459cdc          if (ebx <= (this->m_sizeAndDeallocate & 0x7fffffff))
00459cdc          {
00459d9c              eax_2 = 1;
00459d9f              return 1;
00459cdc          }
00459cdc          
00459ce4          if (ebx == 0)
00459ce4          {
00459ce6              SmartArray<Box2D,1>::Reset(this);
00459ced              int32_t eax_3;
00459ced              eax_3 = 1;
00459cf0              return 1;
00459ce4          }
00459ce4          
00459cf9          eax = operator new[]((ebx << 4));
00459cf9          
00459d05          if (eax != 0)
00459d05          {
00459d14              `vector constructor iterator'(eax, 0x10, ebx, Box2D::Box2D);
00459d14              
00459d1c              if (this->m_data != 0)
00459d1c              {
00459d1e                  uint32_t m_num = this->m_num;
00459d1e                  
00459d22                  if ((m_num - 1) >= 0)
00459d22                  {
00459d29                      void* ecx_2 = ((((m_num - 1) << 4) + eax) + 4);
00459d35                      arg2 = m_num;
00459d70                      bool cond:1_1;
00459d70                      
00459d70                      do
00459d70                      {
00459d45                          void* eax_6 = (((0xfffffffc - eax) + ecx_2) + this->m_data);
00459d45                          
00459d4c                          if (((char*)ecx_2 - 4) != eax_6)
00459d4c                          {
00459d50                              *(uint32_t*)((char*)ecx_2 - 4) = *(uint32_t*)eax_6;
00459d56                              *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_6 + 8);
00459d5c                              *(uint32_t*)ecx_2 = *(uint32_t*)((char*)eax_6 + 4);
00459d61                              *(uint32_t*)((char*)ecx_2 + 8) = *(uint32_t*)((char*)eax_6 + 0xc);
00459d4c                          }
00459d4c                          
00459d68                          ecx_2 -= 0x10;
00459d6b                          cond:1_1 = arg2 != 1;
00459d6c                          arg2 -= 1;
00459d70                      } while (cond:1_1);
00459d22                  }
00459d22                  
00459d82                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00459d87                      operator delete[](this->m_data);
00459d1c              }
00459d1c              
00459d95              this->m_data = eax;
00459d97              this->m_sizeAndDeallocate = (ebx | 0x80000000);
00459d9c              eax_2 = 1;
00459d9f              return 1;
00459d05          }
00459ccc      }
00459ccc      
00459da4      eax = 0;
00459da7      return 0;
00459cc0  }

00459daa                                90 90 90 90 90 90                                                            ......

00459db0  uint8_t __thiscall List<UIElementMessageInfo>::pop_front(class List<UIElementMessageInfo>* this, struct UIElementMessageInfo* arg2)

00459db0  {
00459db3      class ListNode<UIElementMessageInfo>* _head = this->_head;
00459db3      
00459dba      if (_head == 0)
00459dba      {
00459dbc          _head = 0;
00459dbf          return 0;
00459dba      }
00459dba      
00459dc2      class ListNode<UIElementMessageInfo>* next = _head->next;
00459dc7      this->_head = next;
00459dc7      
00459dca      if (next == 0)
00459dd1          this->_tail = nullptr;
00459dca      else
00459dcc          next->prev = nullptr;
00459dcc      
00459dd6      uint32_t* ecx = arg2;
00459dda      *(uint32_t*)ecx = _head->data.idElement;
00459ddf      ecx[1] = _head->data.pElement;
00459de5      ecx[2] = _head->data.idMessage;
00459deb      ecx[3] = _head->data.dwParam1;
00459df1      ecx[4] = _head->data.dwParam2;
00459df7      ecx[5] = _head->data.ptWindow.x;
00459dfd      ecx[6] = _head->data.ptWindow.y;
00459e03      ecx[7] = _head->data.ptElement.x;
00459e09      ecx[8] = _head->data.ptElement.y;
00459e10      ecx[9] = _head->data.tsSerialNumber.m_timestamp;
00459e13      operator delete(_head);
00459e1f      this->_num_elements -= 1;
00459e22      uint32_t eax_1;
00459e22      eax_1 = 1;
00459e25      return 1;
00459db0  }

00459e28                          90 90 90 90 90 90 90 90                                                          ........

00459e30  void __fastcall SmartArray<SurfaceUsageSummary,1>::Reset(class SmartArray<SurfaceUsageSummary,1>* this)

00459e30  {
00459e36      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00459e4a      this->m_num = 0;
00459e4a      
00459e4d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00459e4d      {
00459e4f          struct SurfaceUsageSummary* m_data = this->m_data;
00459e4f          
00459e53          if (m_data != 0)
00459e57              SurfaceUsageSummary::`vector deleting destructor'(m_data, 3);
00459e57          
00459e5c          this->m_data = 0;
00459e5e          this->m_sizeAndDeallocate = 0;
00459e66          return;
00459e4d      }
00459e4d      
00459e69      if (this->m_data != 0)
00459e69      {
00459e6b          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
00459e6b          
00459e71          if ((eax - 1) >= 0)
00459e71          {
00459e7e              int32_t edi_2 = ((eax - 1) * 0x18);
00459e82              int32_t var_1c_1 = eax;
00459eda              bool cond:1_1;
00459eda              
00459eda              do
00459eda              {
00459e90                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00459e9d                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00459ea8                  void var_18;
00459ea8                  SurfaceUsageSummary::operator=((this->m_data + edi_2), &var_18);
00459ea8                  
00459ec4                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00459ecc                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
00459ecc                  
00459ed2                  edi_2 -= 0x18;
00459ed5                  cond:1_1 = var_1c_1 != 1;
00459ed6                  var_1c_1 -= 1;
00459eda              } while (cond:1_1);
00459e71          }
00459e69      }
00459e30  }

00459e88                          8d a4 24 00 00 00 00 90                                                          ..$.....
00459ee4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00459ef0  void _STL::swap(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2)

00459ef0  {
00459efa      uint32_t Bytes = arg1->Bytes;
00459efe      class PSRefBufferCharData<char>* m_charbuffer = arg1->Name.m_charbuffer;
00459f0a      InterlockedIncrement(&m_charbuffer[-1]);
00459f1d      uint32_t ElementWidth = arg1->ElementWidth;
00459f24      uint32_t SurfaceHeight = arg1->SurfaceHeight;
00459f2b      uint32_t ElementHeight = arg1->ElementHeight;
00459f2f      uint32_t SurfaceWidth = arg1->SurfaceWidth;
00459f33      SurfaceUsageSummary::operator=(arg1, arg2);
00459f3f      SurfaceUsageSummary::operator=(arg2, &Bytes);
00459f3f      
00459f5b      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00459f63          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00459ef0  }

00459f6b                                   90 90 90 90 90                                                             .....

00459f70  void _STL::__unguarded_linear_insert(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary arg2, struct _STL::less<SurfaceUsageSummary> arg3)

00459f70  {
00459f71      uint32_t Bytes = arg2.Bytes;
00459f76      struct SurfaceUsageSummary* ebp = arg1;
00459f7c      void* __offset(SurfaceUsageSummary, -0x18) edi = ((char*)ebp - 0x18);
00459f7c      
00459f80      while (true)
00459f80      {
00459f80          int32_t edx_1 = *(int32_t*)((char*)ADJ(edi) + -0x18);
00459f80          
00459f84          if (Bytes >= edx_1)
00459f84          {
00459f86              if (Bytes != edx_1)
00459f86              {
0045a02a              label_45a02a:
0045a02a                  SurfaceUsageSummary::operator=(ebp, &arg2);
0045a033                  void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &arg2.Name.m_charbuffer->m_data[0xffffffec];
0045a033                  
0045a046                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0045a04e                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0045a04e                  
0045a054                  return;
00459f86              }
00459f86              
00459f8c              char* esi_1 = *(int32_t*)((char*)ADJ(edi) + -0x14);
00459f8f              class PSRefBufferCharData<char>* m_charbuffer = arg2.Name.m_charbuffer;
00459f93              int32_t eax_2;
00459f93              
00459f93              while (true)
00459f93              {
00459f93                  Bytes = m_charbuffer->m_data[0];
00459f95                  uint32_t ecx;
00459f95                  ecx = Bytes;
00459f97                  char temp0_1 = *(uint8_t*)esi_1;
00459f97                  bool c_1 = Bytes < temp0_1;
00459f97                  
00459f99                  if (Bytes == temp0_1)
00459f99                  {
00459f9d                      if (ecx == 0)
00459f9d                      {
00459fb3                          eax_2 = 0;
00459fb5                          break;
00459f9d                      }
00459f9d                      
00459f9f                      Bytes = m_charbuffer->m_data[1];
00459fa2                      ecx = Bytes;
00459fa4                      char temp3_1 = esi_1[1];
00459fa4                      c_1 = Bytes < temp3_1;
00459fa4                      
00459fa7                      if (Bytes == temp3_1)
00459fa7                      {
00459fa9                          m_charbuffer = &m_charbuffer->m_data[2];
00459fac                          esi_1 = &esi_1[2];
00459fac                          
00459fb1                          if (ecx != 0)
00459fb1                              continue;
00459fb1                          
00459fb3                          eax_2 = 0;
00459fb5                          break;
00459fa7                      }
00459f99                  }
00459f99                  
00459fb7                  bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00459fb9                  eax_2 = (((char*)m_charbuffer - m_charbuffer) + 1);
00459fb9                  break;
00459f93              }
00459f93              
00459fbe              eax_2 = eax_2 < 0;
00459fbe              
00459fc3              if (eax_2 == 0)
00459fc3                  goto label_45a02a;
00459fc3              
00459fc5              Bytes = arg2.Bytes;
00459f84          }
00459f84          
00459fc9          ebp->Bytes = edx_1;
00459fcc          class PSRefBufferCharData<char>* m_charbuffer_1 = ebp->Name.m_charbuffer;
00459fcc          
00459fd2          if (m_charbuffer_1 != *(int32_t*)((char*)ADJ(edi) + -0x14))
00459fd2          {
00459fe7              if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00459fef                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00459fef              
00459ff1              class PStringBase<char> eax_5 = *(int32_t*)((char*)ADJ(edi) + -0x14);
00459ff4              ebp->Name.m_charbuffer = eax_5;
00459ffb              InterlockedIncrement((eax_5 - 0x10));
00459fd2          }
00459fd2          
0045a004          ebp->ElementWidth = *(int32_t*)((char*)ADJ(edi) + -0x10);
0045a00a          ebp->ElementHeight = *(int32_t*)((char*)ADJ(edi) + -0xc);
0045a010          ebp->SurfaceWidth = *(int32_t*)((char*)ADJ(edi) + -8);
0045a016          ebp->SurfaceHeight = ADJ(edi)->Bytes;
0045a019          ebp = edi;
0045a01b          edi -= 0x18;
00459f80      }
00459f70  }

0045a055                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0045a060  void _STL::__push_heap(struct SurfaceUsageSummary* arg1, int32_t arg2, int32_t arg3, struct SurfaceUsageSummary arg4, struct _STL::less<SurfaceUsageSummary> arg5)

0045a060  {
0045a061      int32_t ebp = arg2;
0045a068      int32_t eax_1;
0045a068      int32_t edx;
0045a068      edx = HIGHD(((int64_t)(ebp - 1)));
0045a068      eax_1 = LOWD(((int64_t)(ebp - 1)));
0045a071      int32_t edx_2 = ((eax_1 - edx) >> 1);
0045a076      arg2 = edx_2;
0045a076      
0045a07a      if (ebp > arg3)
0045a07a      {
0045a080          int32_t* ebx;
0045a080          int32_t* var_c_1 = ebx;
0045a080          
0045a097          while (true)
0045a097          {
0045a097              void* edi_1 = &arg1[edx_2];
0045a09a              int32_t eax_5 = *(uint32_t*)edi_1;
0045a09c              uint32_t Bytes = arg4.Bytes;
0045a09c              
0045a0a2              if (eax_5 >= Bytes)
0045a0a2              {
0045a0a4                  if (eax_5 != Bytes)
0045a0a4                      break;
0045a0a4                  
0045a0aa                  class PSRefBufferCharData<char>* m_charbuffer = arg4.Name.m_charbuffer;
0045a0ae                  char* eax_6 = *(uint32_t*)((char*)edi_1 + 4);
0045a0b1                  int32_t eax_8;
0045a0b1                  
0045a0b1                  while (true)
0045a0b1                  {
0045a0b1                      ebx = *(uint8_t*)eax_6;
0045a0b3                      Bytes = ebx;
0045a0b5                      char temp0_1 = m_charbuffer->m_data[0];
0045a0b5                      bool c_1 = ebx < temp0_1;
0045a0b5                      
0045a0b7                      if (ebx == temp0_1)
0045a0b7                      {
0045a0bb                          if (Bytes == 0)
0045a0bb                          {
0045a0d1                              eax_8 = 0;
0045a0d3                              break;
0045a0bb                          }
0045a0bb                          
0045a0bd                          ebx = eax_6[1];
0045a0c0                          Bytes = ebx;
0045a0c2                          char temp3_1 = m_charbuffer->m_data[1];
0045a0c2                          c_1 = ebx < temp3_1;
0045a0c2                          
0045a0c5                          if (ebx == temp3_1)
0045a0c5                          {
0045a0c7                              eax_6 = &eax_6[2];
0045a0ca                              m_charbuffer = &m_charbuffer->m_data[2];
0045a0ca                              
0045a0cf                              if (Bytes != 0)
0045a0cf                                  continue;
0045a0cf                              
0045a0d1                              eax_8 = 0;
0045a0d3                              break;
0045a0c5                          }
0045a0b7                      }
0045a0b7                      
0045a0d5                      bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
0045a0d7                      eax_8 = ((eax_6 - eax_6) + 1);
0045a0d7                      break;
0045a0b1                  }
0045a0b1                  
0045a0dc                  eax_8 = eax_8 < 0;
0045a0dc                  
0045a0e1                  if (eax_8 == 0)
0045a0e1                      break;
0045a0a2              }
0045a0a2              
0045a0eb              void* esi_1 = &arg1[ebp];
0045a0f0              *(uint32_t*)esi_1 = *(uint32_t*)edi_1;
0045a0f2              void* eax_11 = *(uint32_t*)((char*)esi_1 + 4);
0045a0f2              
0045a0f8              if (eax_11 != *(uint32_t*)((char*)edi_1 + 4))
0045a0f8              {
0045a10d                  if ((InterlockedDecrement(((char*)eax_11 - 0x10)) == 0 && eax_11 != 0x14))
0045a115                      **(uint32_t**)((char*)eax_11 - 0x14)(1);
0045a115                  
0045a117                  int32_t eax_13 = *(uint32_t*)((char*)edi_1 + 4);
0045a11a                  *(uint32_t*)((char*)esi_1 + 4) = eax_13;
0045a121                  InterlockedIncrement((eax_13 - 0x10));
0045a127                  edx_2 = arg2;
0045a0f8              }
0045a0f8              
0045a12e              *(uint32_t*)((char*)esi_1 + 8) = *(uint32_t*)((char*)edi_1 + 8);
0045a134              *(uint32_t*)((char*)esi_1 + 0xc) = *(uint32_t*)((char*)edi_1 + 0xc);
0045a13a              *(uint32_t*)((char*)esi_1 + 0x10) = *(uint32_t*)((char*)edi_1 + 0x10);
0045a140              ebp = edx_2;
0045a145              int32_t eax_18;
0045a145              int32_t edx_4;
0045a145              edx_4 = HIGHD(((int64_t)(edx_2 - 1)));
0045a145              eax_18 = LOWD(((int64_t)(edx_2 - 1)));
0045a14a              arg2 = ((eax_18 - edx_4) >> 1);
0045a152              *(uint32_t*)((char*)esi_1 + 0x14) = *(uint32_t*)((char*)edi_1 + 0x14);
0045a152              
0045a155              if (ebp <= arg3)
0045a155                  break;
0045a155              
0045a084              edx_2 = arg2;
0045a097          }
0045a07a      }
0045a07a      
0045a16d      SurfaceUsageSummary::operator=(&arg1[ebp], &arg4);
0045a176      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &arg4.Name.m_charbuffer->m_data[0xffffffec];
0045a176      
0045a189      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0045a191          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0045a060  }

0045a08a                                8d 9b 00 00 00 00                                                            ......
0045a196                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045a1a0  struct SurfaceUsageSummary* _STL::__copy_backward(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct SurfaceUsageSummary* arg3, struct _STL::random_access_iterator_tag const* arg4, int32_t* arg5)

0045a1a0  {
0045a1a6      struct SurfaceUsageSummary* esi = arg2;
0045a1bd      int32_t edx_2 = (((char*)esi - arg1) / 0x18);
0045a1bd      
0045a1c1      if (edx_2 <= 0)
0045a23f          return arg3;
0045a23f      
0045a1cb      struct SurfaceUsageSummary* edi = arg3;
0045a1cf      arg2 = edx_2;
0045a230      bool cond:0_1;
0045a230      
0045a230      do
0045a230      {
0045a1d3          int32_t ecx_2 = *(int32_t*)((char*)esi + -0x18);
0045a1d6          esi -= 0x18;
0045a1d9          edi -= 0x18;
0045a1dc          edi->Bytes = ecx_2;
0045a1de          class PSRefBufferCharData<char>* m_charbuffer = edi->Name.m_charbuffer;
0045a1de          
0045a1e4          if (m_charbuffer != esi->Name.m_charbuffer)
0045a1e4          {
0045a1f9              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0045a201                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0045a201              
0045a203              class PSRefBufferCharData<char>* m_charbuffer_1 = esi->Name.m_charbuffer;
0045a206              edi->Name.m_charbuffer = m_charbuffer_1;
0045a20d              InterlockedIncrement(&m_charbuffer_1[-1]);
0045a1e4          }
0045a1e4          
0045a212          edi->ElementWidth = esi->ElementWidth;
0045a218          edi->ElementHeight = esi->ElementHeight;
0045a21e          edi->SurfaceWidth = esi->SurfaceWidth;
0045a228          cond:0_1 = arg2 != 1;
0045a229          edi->SurfaceHeight = esi->SurfaceHeight;
0045a22c          arg2 -= 1;
0045a230      } while (cond:0_1);
0045a238      return edi;
0045a1a0  }


0045a240  void __fastcall UIElementManager::CleanDeleteQueue(class UIElementManager* this)

0045a240  {
0045a248      while (this->m_deleteQueue.m_num != 0)
0045a248      {
0045a253          class UIElement* edi_1 = *(uint32_t*)this->m_deleteQueue.m_data;
0045a253          
0045a257          if (edi_1 != 0)
0045a257          {
0045a259              edi_1->vtable->SetParent(0);
0045a262              uint32_t m_num = this->m_deleteQueue.m_num;
0045a262              
0045a267              if (m_num > 0)
0045a267              {
0045a26c                  this->m_deleteQueue.m_num = (m_num - 1);
0045a26c                  
0045a26f                  if (m_num != 1)
0045a26f                  {
0045a271                      class UIElement** m_data = this->m_deleteQueue.m_data;
0045a277                      *(uint32_t*)m_data = m_data[(m_num - 1)];
0045a27c                      this->m_deleteQueue.m_data[this->m_deleteQueue.m_num] = 0;
0045a26f                  }
0045a267              }
0045a267              
0045a286              edi_1->vtable->__vecDelDtor(1);
0045a257          }
0045a248      }
0045a240  }

0045a24d                                         8d 49 00                                                               .I.
0045a298                                                                          90 90 90 90 90 90 90 90                          ........

0045a2a0  uint8_t __thiscall List<UIElementMessageInfo>::remove(class List<UIElementMessageInfo>* this, class ListNode<UIElementMessageInfo>* arg2)

0045a2a0  {
0045a2ab      if (arg2 != 0)
0045a2ab      {
0045a2ad          class ListNode<UIElementMessageInfo>* _head = this->_head;
0045a2ad          
0045a2b2          if (_head != 0)
0045a2b2          {
0045a2bc              class ListNode<UIElementMessageInfo>* next;
0045a2bc              
0045a2bc              if (arg2 != _head)
0045a2bc              {
0045a2cd                  arg2->prev->next = arg2->next;
0045a2d7                  next = arg2->next;
0045a2d7                  
0045a2dd                  if (next == 0)
0045a2ea                      this->_tail = arg2->prev;
0045a2dd                  else
0045a2e2                      next->prev = arg2->prev;
0045a2bc              }
0045a2bc              else
0045a2bc              {
0045a2be                  next = arg2->next;
0045a2c3                  this->_head = next;
0045a2c3                  
0045a2c6                  if (next != 0)
0045a2e2                      next->prev = nullptr;
0045a2c6                  else
0045a2c8                      this->_tail = nullptr;
0045a2bc              }
0045a2ee              operator delete(arg2);
0045a2fa              this->_num_elements -= 1;
0045a2fd              uint32_t eax_2;
0045a2fd              eax_2 = 1;
0045a300              return 1;
0045a2b2          }
0045a2ab      }
0045a2ab      
0045a2b4      class ListNode<UIElementMessageInfo>* eax;
0045a2b4      eax = 0;
0045a2b7      return 0;
0045a2a0  }

0045a303           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0045a310  int32_t* __thiscall SmartArray<Box2D,1>::operator=(int32_t* arg1, int32_t* arg2)

0045a310  {
0045a331      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
0045a331      {
0045a34e      label_45a34e:
0045a34e          int32_t* eax_3 = *(uint32_t*)arg2;
0045a350          int32_t* ecx_3 = *(uint32_t*)arg1;
0045a355          void* edx_5 = &eax_3[(arg2[2] * 4)];
0045a355          
0045a35a          while (eax_3 < edx_5)
0045a35a          {
0045a362              if (ecx_3 != eax_3)
0045a362              {
0045a366                  *(uint32_t*)ecx_3 = *(uint32_t*)eax_3;
0045a36b                  ecx_3[2] = eax_3[2];
0045a371                  ecx_3[1] = eax_3[1];
0045a377                  ecx_3[3] = eax_3[3];
0045a362              }
0045a362              
0045a37a              eax_3 = &eax_3[4];
0045a37d              ecx_3 = &ecx_3[4];
0045a35a          }
0045a35a          
0045a384          int32_t i = arg2[2];
0045a384          
0045a38a          if (i < arg1[2])
0045a38a          {
0045a38e              int32_t edx_7 = (i << 4);
0045a38e              
0045a3b1              do
0045a3b1              {
0045a393                  int32_t* eax_5 = (*(uint32_t*)arg1 + edx_7);
0045a39b                  void var_10;
0045a39b                  
0045a39b                  if (eax_5 != &var_10)
0045a39b                  {
0045a39d                      *(uint32_t*)eax_5 = 0;
0045a39f                      eax_5[2] = 0;
0045a3a2                      eax_5[1] = 0;
0045a3a5                      eax_5[3] = 0;
0045a39b                  }
0045a39b                  
0045a3ab                  i += 1;
0045a3ac                  edx_7 += 0x10;
0045a3b1              } while (i < arg1[2]);
0045a38a          }
0045a38a          
0045a3b6          arg1[2] = arg2[2];
0045a331      }
0045a331      else
0045a331      {
0045a333          arg1[2] = 0;
0045a333          
0045a349          if (SmartArray<Box2D,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
0045a349              goto label_45a34e;
0045a331      }
0045a331      
0045a3c2      return arg1;
0045a310  }

0045a3c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0045a3d0  int32_t* __thiscall SmartArray<UIMessageData,1>::operator=(int32_t* arg1, int32_t* arg2)

0045a3d0  {
0045a3ee      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
0045a3ee      {
0045a40c      label_45a40c:
0045a40c          int32_t* eax_3 = *(uint32_t*)arg2;
0045a411          void* edx_3 = &eax_3[(arg2[2] * 2)];
0045a416          int32_t* ecx_4 = *(uint32_t*)arg1;
0045a416          
0045a419          while (eax_3 < edx_3)
0045a419          {
0045a422              *(uint32_t*)ecx_4 = *(uint32_t*)eax_3;
0045a427              ecx_4[1] = eax_3[1];
0045a42a              eax_3 = &eax_3[2];
0045a42d              ecx_4 = &ecx_4[2];
0045a419          }
0045a419          
0045a43a          for (int32_t i = arg2[2]; i < arg1[2]; i += 1)
0045a43a          {
0045a444              int32_t ebx_3 = *(uint32_t*)arg1;
0045a446              int32_t var_8;
0045a446              *(uint32_t*)(ebx_3 + (i << 3)) = var_8;
0045a449              int32_t var_4;
0045a449              *(uint32_t*)((ebx_3 + (i << 3)) + 4) = var_4;
0045a43a          }
0045a43a          
0045a458          arg1[2] = arg2[2];
0045a3ee      }
0045a3ee      else
0045a3ee      {
0045a3f0          arg1[2] = 0;
0045a3f0          
0045a40a          if (SmartArray<VertexRange,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
0045a40a              goto label_45a40c;
0045a3ee      }
0045a3ee      
0045a463      return arg1;
0045a3d0  }

0045a41d                                                                                         8d 49 00                               .I.
0045a466                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0045a470  uint8_t __thiscall SmartArray<SurfaceUsageSummary,1>::grow(class SmartArray<SurfaceUsageSummary,1>* this, uint32_t arg2)

0045a470  {
0045a472      uint32_t ebp = arg2;
0045a47c      uint32_t* eax;
0045a47c      
0045a47c      if (ebp >= this->m_num)
0045a47c      {
0045a48c          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
0045a48c          {
0045a537              eax = 1;
0045a53a              return 1;
0045a48c          }
0045a48c          
0045a494          if (ebp == 0)
0045a494          {
0045a496              SmartArray<SurfaceUsageSummary,1>::Reset(this);
0045a49d              int32_t eax_2;
0045a49d              eax_2 = 1;
0045a4a0              return 1;
0045a494          }
0045a494          
0045a4af          eax = operator new[](((ebp * 0x18) + 4));
0045a4af          
0045a4b9          if (eax != 0)
0045a4b9          {
0045a4c5              void* ebx_1 = &eax[1];
0045a4cb              *(uint32_t*)eax = ebp;
0045a4cd              int32_t ecx_1;
0045a4cd              eax = `vector constructor iterator'(ebx_1, 0x18, ebp, SurfaceUsageSummary::SurfaceUsageSummary);
0045a4cd              
0045a4d4              if (ebx_1 != 0)
0045a4d4              {
0045a4d9                  if (this->m_data != 0)
0045a4d9                  {
0045a4db                      uint32_t m_num = this->m_num;
0045a4db                      
0045a4df                      if ((m_num - 1) >= 0)
0045a4df                      {
0045a4e5                          void* esi_2 = ((m_num - 1) * 0x18);
0045a4e9                          arg2 = m_num;
0045a509                          bool cond:0_1;
0045a509                          
0045a509                          do
0045a509                          {
0045a4f8                              SurfaceUsageSummary::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
0045a501                              esi_2 -= 0x18;
0045a504                              cond:0_1 = arg2 != 1;
0045a505                              arg2 -= 1;
0045a509                          } while (cond:0_1);
0045a4df                      }
0045a4df                      
0045a51b                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0045a51b                      {
0045a51d                          struct SurfaceUsageSummary* m_data = this->m_data;
0045a51d                          
0045a521                          if (m_data != 0)
0045a525                              SurfaceUsageSummary::`vector deleting destructor'(m_data, 3);
0045a51b                      }
0045a4d9                  }
0045a4d9                  
0045a530                  this->m_data = ebx_1;
0045a532                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
0045a537                  eax = 1;
0045a53a                  return 1;
0045a4d4              }
0045a4b9          }
0045a47c      }
0045a47c      
0045a53f      eax = 0;
0045a542      return 0;
0045a470  }

0045a545                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0045a550  struct SurfaceUsageSummary const* _STL::__median(struct SurfaceUsageSummary const* arg1, struct SurfaceUsageSummary const* arg2, struct SurfaceUsageSummary const* arg3, struct _STL::less<SurfaceUsageSummary> arg4)

0045a550  {
0045a554      struct SurfaceUsageSummary* eax = arg2;
0045a55b      uint32_t Bytes_2 = arg1->Bytes;
0045a55e      uint32_t Bytes_3 = eax->Bytes;
0045a55e      
0045a562      if (Bytes_2 < Bytes_3)
0045a562          goto label_45a57a;
0045a562      
0045a564      uint8_t eax_2;
0045a564      
0045a564      if (Bytes_2 == Bytes_3)
0045a56d          eax_2 = PStringBase<char>::operator<(&arg1->Name, &eax->Name);
0045a56d      
0045a574      if ((Bytes_2 != Bytes_3 || eax_2 == 0))
0045a574      {
0045a5c5          uint32_t Bytes_1 = arg3->Bytes;
0045a5c5          
0045a5ca          if (Bytes_2 >= Bytes_1)
0045a5ca          {
0045a5cc              uint8_t eax_8;
0045a5cc              
0045a5cc              if (Bytes_2 == Bytes_1)
0045a5d9                  eax_8 = PStringBase<char>::operator<(&arg1->Name, &arg3->Name);
0045a5d9              
0045a5e0              if ((Bytes_2 != Bytes_1 || eax_8 == 0))
0045a5e0              {
0045a5e4                  if (Bytes_3 < Bytes_1)
0045a5b7                      return arg3;
0045a5b7                  
0045a5e6                  if (Bytes_3 != Bytes_1)
0045a5fc                      return arg2;
0045a5fc                  
0045a5fa                  if (PStringBase<char>::operator<(&arg2->Name, &arg3->Name) != 0)
0045a5b7                      return arg3;
0045a5b7                  
0045a5fc                  return arg2;
0045a5e0              }
0045a5ca          }
0045a574      }
0045a574      else
0045a574      {
0045a576          eax = arg2;
0045a57a      label_45a57a:
0045a57e          uint32_t Bytes = arg3->Bytes;
0045a57e          
0045a583          if (Bytes_3 < Bytes)
0045a604              return eax;
0045a604          
0045a585          uint8_t eax_3;
0045a585          
0045a585          if (Bytes_3 == Bytes)
0045a58e              eax_3 = PStringBase<char>::operator<(&eax->Name, &arg3->Name);
0045a58e          
0045a595          if ((Bytes_3 == Bytes && eax_3 != 0))
0045a5fc              return arg2;
0045a5fc          
0045a599          if (Bytes_2 < Bytes)
0045a5b7              return arg3;
0045a5b7          
0045a59b          if ((Bytes_2 == Bytes && PStringBase<char>::operator<(&arg1->Name, &arg3->Name) != 0))
0045a5b7              return arg3;
0045a574      }
0045a574      
0045a5c0      return arg1;
0045a550  }

0045a605                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0045a610  void _STL::__unguarded_insertion_sort_aux(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct SurfaceUsageSummary* arg3, struct _STL::less<SurfaceUsageSummary> arg4)

0045a610  {
0045a61c      if (arg1 != arg2)
0045a61c      {
0045a622          uint32_t* esi_1 = &arg1->ElementWidth;
0045a622          
0045a66f          do
0045a66f          {
0045a625              uint32_t Bytes = ADJ(esi_1)->Bytes;
0045a633              class PSRefBufferCharData<char>* m_charbuffer = ADJ(esi_1)->Name.m_charbuffer;
0045a636              class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0045a63d              InterlockedIncrement(&m_charbuffer[-1]);
0045a645              uint32_t ElementWidth = ADJ(esi_1)->ElementWidth;
0045a64b              uint32_t ElementHeight = ADJ(esi_1)->ElementHeight;
0045a651              uint32_t SurfaceWidth = ADJ(esi_1)->SurfaceWidth;
0045a658              uint32_t SurfaceHeight = ADJ(esi_1)->SurfaceHeight;
0045a65b              _STL::__unguarded_linear_insert(&esi_1[-2], Bytes, arg4);
0045a664              esi_1 = &esi_1[6];
0045a66f          } while (&esi_1[-2] != arg2);
0045a61c      }
0045a610  }

0045a676                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045a680  void _STL::__adjust_heap(struct SurfaceUsageSummary* arg1, int32_t arg2, int32_t arg3, struct SurfaceUsageSummary arg4, struct _STL::less<SurfaceUsageSummary> arg5)

0045a680  {
0045a686      int32_t ebp = arg2;
0045a68a      int32_t ebx = ((ebp * 2) + 2);
0045a68e      bool cond:1 = ebx != arg3;
0045a692      arg2 = ebp;
0045a692      
0045a696      if (ebx < arg3)
0045a696      {
0045a6a4          while (true)
0045a6a4          {
0045a6a4              int32_t eax = (ebx * 3);
0045a6a7              int32_t edx_1 = *(uint32_t*)(((char*)arg1 + (eax << 3)) - 0x18);
0045a6ab              void* eax_1 = ((char*)arg1 + (eax << 3));
0045a6ae              int32_t ecx_2 = *(uint32_t*)eax_1;
0045a6ae              
0045a6b2              if (ecx_2 < edx_1)
0045a6f6                  ebx -= 1;
0045a6b2              else if (ecx_2 == edx_1)
0045a6b4              {
0045a6bc                  char* esi_1 = *(uint32_t*)((char*)eax_1 + 4);
0045a6be                  char* edi_2 = *(uint32_t*)((char*)eax_1 - 0x14);
0045a6c0                  int32_t eax_4;
0045a6c0                  
0045a6c0                  while (true)
0045a6c0                  {
0045a6c0                      edx_1 = *(uint8_t*)esi_1;
0045a6c2                      ecx_2 = *(uint8_t*)edi_2;
0045a6c4                      char* eax_2;
0045a6c4                      eax_2 = edx_1;
0045a6c6                      bool c_1 = edx_1 < ecx_2;
0045a6c6                      
0045a6c8                      if (edx_1 == ecx_2)
0045a6c8                      {
0045a6cc                          if (eax_2 == 0)
0045a6cc                          {
0045a6e4                              eax_4 = 0;
0045a6e6                              break;
0045a6cc                          }
0045a6cc                          
0045a6ce                          ecx_2 = esi_1[1];
0045a6d1                          edx_1 = edi_2[1];
0045a6d4                          eax_2 = ecx_2;
0045a6d6                          c_1 = ecx_2 < edx_1;
0045a6d6                          
0045a6d8                          if (ecx_2 == edx_1)
0045a6d8                          {
0045a6da                              esi_1 = &esi_1[2];
0045a6dd                              edi_2 = &edi_2[2];
0045a6dd                              
0045a6e2                              if (eax_2 != 0)
0045a6e2                                  continue;
0045a6e2                              
0045a6e4                              eax_4 = 0;
0045a6e6                              break;
0045a6d8                          }
0045a6c8                      }
0045a6c8                      
0045a6e8                      bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
0045a6ea                      eax_4 = ((eax_2 - eax_2) + 1);
0045a6ea                      break;
0045a6c0                  }
0045a6c0                  
0045a6ef                  eax_4 = eax_4 < 0;
0045a6ef                  
0045a6f4                  if (eax_4 != 0)
0045a6f6                      ebx -= 1;
0045a6b4              }
0045a6b4              
0045a6fb              int32_t edx_2 = (ebx * 3);
0045a701              void* esi_2 = ((char*)arg1 + (edx_2 << 3));
0045a708              void* edi_4 = &arg1[ebp];
0045a70b              *(uint32_t*)edi_4 = *(uint32_t*)((char*)arg1 + (edx_2 << 3));
0045a70d              void* eax_6 = *(uint32_t*)((char*)edi_4 + 4);
0045a70d              
0045a713              if (eax_6 != *(uint32_t*)((char*)esi_2 + 4))
0045a713              {
0045a728                  if ((InterlockedDecrement(((char*)eax_6 - 0x10)) == 0 && eax_6 != 0x14))
0045a731                      **(uint32_t**)((char*)eax_6 - 0x14)(1);
0045a731                  
0045a733                  int32_t eax_9 = *(uint32_t*)((char*)esi_2 + 4);
0045a736                  *(uint32_t*)((char*)edi_4 + 4) = eax_9;
0045a73d                  InterlockedIncrement((eax_9 - 0x10));
0045a713              }
0045a713              
0045a746              *(uint32_t*)((char*)edi_4 + 8) = *(uint32_t*)((char*)esi_2 + 8);
0045a74c              *(uint32_t*)((char*)edi_4 + 0xc) = *(uint32_t*)((char*)esi_2 + 0xc);
0045a752              *(uint32_t*)((char*)edi_4 + 0x10) = *(uint32_t*)((char*)esi_2 + 0x10);
0045a75c              ebp = ebx;
0045a75e              ebx = ((ebx * 2) + 2);
0045a764              *(uint32_t*)((char*)edi_4 + 0x14) = *(uint32_t*)((char*)esi_2 + 0x14);
0045a764              
0045a767              if (ebx >= arg3)
0045a767                  break;
0045a6a4          }
0045a6a4          
0045a76d          cond:1 = ebx != arg3;
0045a696      }
0045a696      
0045a76f      if (!(cond:1))
0045a76f      {
0045a784          SurfaceUsageSummary::operator=(&arg1[ebp], (&arg1[ebx] - 0x18));
0045a789          ebp = (ebx - 1);
0045a76f      }
0045a76f      
0045a790      class PSRefBufferCharData<char>* m_charbuffer = arg4.Name.m_charbuffer;
0045a7a4      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0045a7a7      InterlockedIncrement(&m_charbuffer[-1]);
0045a7b9      uint32_t ElementHeight = arg4.ElementHeight;
0045a7c1      uint32_t SurfaceWidth = arg4.SurfaceWidth;
0045a7c8      uint32_t ElementWidth = arg4.ElementWidth;
0045a7d1      uint32_t SurfaceHeight = arg4.SurfaceHeight;
0045a7d4      _STL::__push_heap(arg1, ebp, arg2, arg4.Bytes, arg5);
0045a7d4      
0045a7ef      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0045a7f7          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0045a680  }

0045a7fe                                                                                            90 90                                ..

0045a800  void __thiscall UIElementManager::SetCursor(class UIElementManager* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3, int32_t arg4, uint8_t arg5)

0045a800  {
0045a817      if (arg5 != 0)
0045a817      {
0045a819          this->m_defaultCursorDID.id = arg2;
0045a81f          this->m_defaultCursorHotX = arg3;
0045a825          this->m_defaultCursorHotY = arg4;
0045a817      }
0045a817      
0045a849      if ((arg2 != INVALID_DID.id && ((arg2 != this->m_lastCursorDID.id || arg3 != this->m_lastCursorHotX) || arg4 != this->m_lastCursorHotY)))
0045a849      {
0045a84e          this->m_lastCursorDID.id = arg2;
0045a854          this->m_lastCursorHotX = arg3;
0045a85a          this->m_lastCursorHotY = arg4;
0045a86b          void var_8;
0045a86b          class DBObj* eax_3;
0045a86b          class RenderSurface* ecx_1;
0045a86b          uint32_t edx_1;
0045a86b          eax_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0xc));
0045a86b          
0045a877          if (eax_3 != 0)
0045a877          {
0045a879              class DBObj* var_18_2 = eax_3;
0045a87a              int32_t var_1c_2 = arg4;
0045a87b              int32_t var_20_1 = arg3;
0045a87c              Device::SetCursorFromImage(eax_3, edx_1, ecx_1);
0045a881              eax_3->vtable->Release();
0045a877          }
0045a849      }
0045a800  }

0045a894                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0045a8a0  uint8_t __thiscall List<UIElementMessageInfo>::push_back(class List<UIElementMessageInfo>* this, struct UIElementMessageInfo const* arg2)

0045a8a0  {
0045a8a5      void* eax = operator new(0x30);
0045a8a5      
0045a8b1      if (eax == 0)
0045a8b1      {
0045a90d          eax = 0;
0045a910          return 0;
0045a8b1      }
0045a8b1      
0045a8ba      *(uint32_t*)eax = arg2->idElement;
0045a8bf      *(uint32_t*)((char*)eax + 4) = arg2->pElement;
0045a8c5      *(uint32_t*)((char*)eax + 8) = arg2->idMessage;
0045a8cb      *(uint32_t*)((char*)eax + 0xc) = arg2->dwParam1;
0045a8d1      *(uint32_t*)((char*)eax + 0x10) = arg2->dwParam2;
0045a8d7      *(uint32_t*)((char*)eax + 0x14) = arg2->ptWindow.x;
0045a8dd      *(uint32_t*)((char*)eax + 0x18) = arg2->ptWindow.y;
0045a8e3      *(uint32_t*)((char*)eax + 0x1c) = arg2->ptElement.x;
0045a8e9      *(uint32_t*)((char*)eax + 0x20) = arg2->ptElement.y;
0045a8ef      *(uint32_t*)((char*)eax + 0x24) = arg2->tsSerialNumber.m_timestamp;
0045a8f2      *(uint32_t*)((char*)eax + 0x28) = 0;
0045a8f5      *(uint32_t*)((char*)eax + 0x2c) = 0;
0045a8f5      
0045a8fc      if (this->_head == 0)
0045a8fc      {
0045a8fe          this->_head = eax;
0045a901          this->_tail = eax;
0045a904          this->_num_elements += 1;
0045a907          eax = 1;
0045a90a          return 1;
0045a8fc      }
0045a8fc      
0045a913      class ListNode<UIElementMessageInfo>* _tail = this->_tail;
0045a916      _tail->next = eax;
0045a919      *(uint32_t*)((char*)eax + 0x2c) = _tail;
0045a91c      this->_tail = eax;
0045a91f      this->_num_elements += 1;
0045a922      eax = 1;
0045a925      return 1;
0045a8a0  }

0045a928                          90 90 90 90 90 90 90 90                                                          ........

0045a930  struct SurfaceUsageSummary* _STL::__unguarded_partition(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct SurfaceUsageSummary arg3, struct _STL::less<SurfaceUsageSummary> arg4)

0045a930  {
0045a931      uint32_t Bytes_1 = arg3.Bytes;
0045a936      struct SurfaceUsageSummary* ebp = arg2;
0045a93c      struct SurfaceUsageSummary* result = arg1;
0045a93c      
0045a940      while (true)
0045a940      {
0045a940          uint32_t Bytes = result->Bytes;
0045a940          
0045a944          if (Bytes >= Bytes_1)
0045a944          {
0045a946              int32_t eax_2;
0045a946              char edx;
0045a946              
0045a946              if (Bytes == Bytes_1)
0045a946              {
0045a948                  class PSRefBufferCharData<char>* m_charbuffer_2 = arg3.Name.m_charbuffer;
0045a94c                  class PSRefBufferCharData<char>* m_charbuffer = result->Name.m_charbuffer;
0045a94c                  
0045a950                  while (true)
0045a950                  {
0045a950                      edx = m_charbuffer->m_data[0];
0045a954                      char temp0_1 = m_charbuffer_2->m_data[0];
0045a954                      bool c_1 = edx < temp0_1;
0045a954                      
0045a956                      if (edx == temp0_1)
0045a956                      {
0045a95a                          if (edx == 0)
0045a95a                          {
0045a970                              eax_2 = 0;
0045a972                              break;
0045a95a                          }
0045a95a                          
0045a95c                          edx = m_charbuffer->m_data[1];
0045a961                          char temp4_1 = m_charbuffer_2->m_data[1];
0045a961                          c_1 = edx < temp4_1;
0045a961                          
0045a964                          if (edx == temp4_1)
0045a964                          {
0045a966                              m_charbuffer = &m_charbuffer->m_data[2];
0045a969                              m_charbuffer_2 = &m_charbuffer_2->m_data[2];
0045a969                              
0045a96e                              if (edx != 0)
0045a96e                                  continue;
0045a96e                              
0045a970                              eax_2 = 0;
0045a972                              break;
0045a964                          }
0045a956                      }
0045a956                      
0045a974                      bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
0045a976                      eax_2 = (((char*)m_charbuffer - m_charbuffer) + 1);
0045a976                      break;
0045a950                  }
0045a950                  
0045a97b                  eax_2 = eax_2 < 0;
0045a946              }
0045a946              
0045a980              if ((Bytes != Bytes_1 || eax_2 == 0))
0045a980              {
0045a987                  while (true)
0045a987                  {
0045a987                      int32_t eax_3 = *(int32_t*)((char*)ebp + -0x18);
0045a98a                      ebp -= 0x18;
0045a98a                      
0045a98f                      if (Bytes_1 >= eax_3)
0045a98f                      {
0045a991                          if (Bytes_1 != eax_3)
0045a991                              break;
0045a991                          
0045a993                          class PSRefBufferCharData<char>* m_charbuffer_3 = ebp->Name.m_charbuffer;
0045a996                          void* m_charbuffer_1 = arg3.Name.m_charbuffer;
0045a9a0                          int32_t eax_5;
0045a9a0                          
0045a9a0                          while (true)
0045a9a0                          {
0045a9a0                              edx = *(uint8_t*)m_charbuffer_1;
0045a9a4                              char temp3_1 = m_charbuffer_3->m_data[0];
0045a9a4                              bool c_3 = edx < temp3_1;
0045a9a4                              
0045a9a6                              if (edx == temp3_1)
0045a9a6                              {
0045a9aa                                  if (edx == 0)
0045a9aa                                  {
0045a9c0                                      eax_5 = 0;
0045a9c2                                      break;
0045a9aa                                  }
0045a9aa                                  
0045a9ac                                  edx = *(uint8_t*)((char*)m_charbuffer_1 + 1);
0045a9b1                                  char temp7_1 = m_charbuffer_3->m_data[1];
0045a9b1                                  c_3 = edx < temp7_1;
0045a9b1                                  
0045a9b4                                  if (edx == temp7_1)
0045a9b4                                  {
0045a9b6                                      m_charbuffer_1 += 2;
0045a9b9                                      m_charbuffer_3 = &m_charbuffer_3->m_data[2];
0045a9b9                                      
0045a9be                                      if (edx != 0)
0045a9be                                          continue;
0045a9be                                      
0045a9c0                                      eax_5 = 0;
0045a9c2                                      break;
0045a9b4                                  }
0045a9a6                              }
0045a9a6                              
0045a9c4                              bool c_4 = /* bool c_4 = unimplemented  {sbb eax, eax} */;
0045a9c6                              eax_5 = (((char*)m_charbuffer_1 - m_charbuffer_1) + 1);
0045a9c6                              break;
0045a9a0                          }
0045a9a0                          
0045a9cb                          eax_5 = eax_5 < 0;
0045a9cb                          
0045a9d0                          if (eax_5 == 0)
0045a9d0                              break;
0045a98f                      }
0045a987                  }
0045a987                  
0045a9d4                  if (result >= ebp)
0045a9d4                      break;
0045a9d4                  
0045a9d8                  _STL::swap(result, ebp);
0045a9e0                  result = &result[1];
0045a9e3                  continue;
0045a980              }
0045a944          }
0045a944          
0045a982          result = &result[1];
0045a940      }
0045a940      
0045a9ff      if ((InterlockedDecrement(&arg3.Name.m_charbuffer[-1]) == 0 && arg3.Name.m_charbuffer != 0x14))
0045aa07          *(uint32_t*)*(int32_t*)((char*)arg3.Name.m_charbuffer + -0x14)(1);
0045aa07      
0045aa0f      return result;
0045a930  }


0045aa10  void _STL::__pop_heap(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct SurfaceUsageSummary* arg3, struct SurfaceUsageSummary arg4, struct _STL::less<SurfaceUsageSummary> arg5, int32_t* arg6)

0045aa10  {
0045aa1c      SurfaceUsageSummary::operator=(arg3, arg1);
0045aa25      class PSRefBufferCharData<char>* m_charbuffer = arg4.Name.m_charbuffer;
0045aa39      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0045aa3c      InterlockedIncrement(&m_charbuffer[-1]);
0045aa4e      uint32_t ElementWidth = arg4.ElementWidth;
0045aa55      uint32_t ElementHeight = arg4.ElementHeight;
0045aa5c      uint32_t SurfaceHeight = arg4.SurfaceHeight;
0045aa61      uint32_t SurfaceWidth = arg4.SurfaceWidth;
0045aa79      _STL::__adjust_heap(arg1, 0, (((char*)arg2 - arg1) / 0x18), arg4.Bytes, arg5);
0045aa79      
0045aa94      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0045aa9c          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0045aa10  }

0045aaa2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0045aab0  void _STL::__make_heap(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct _STL::less<SurfaceUsageSummary> arg3, struct SurfaceUsageSummary* arg4, int32_t* arg5)

0045aab0  {
0045aacd      int32_t edx_2 = (((char*)arg2 - arg1) / 0x18);
0045aacd      
0045aad4      if (edx_2 >= 2)
0045aad4      {
0045aad9          int32_t eax_4;
0045aad9          int32_t edx_3;
0045aad9          edx_3 = HIGHD(((int64_t)(edx_2 - 2)));
0045aad9          eax_4 = LOWD(((int64_t)(edx_2 - 2)));
0045aade          int32_t ebx_2 = ((eax_4 - edx_3) >> 1);
0045aae3          void* edi_1 = &arg1[ebx_2].ElementWidth;
0045aae3          
0045aaeb          while (true)
0045aaeb          {
0045aaeb              int32_t eax_6 = *(uint32_t*)((char*)edi_1 - 8);
0045aaf6              int32_t eax_7 = *(uint32_t*)((char*)edi_1 - 4);
0045aaf9              int32_t var_28_1 = eax_7;
0045ab00              InterlockedIncrement((eax_7 - 0x10));
0045ab08              int32_t var_24_1 = *(uint32_t*)edi_1;
0045ab0e              int32_t var_20_1 = *(uint32_t*)((char*)edi_1 + 4);
0045ab19              int32_t var_1c_1 = *(uint32_t*)((char*)edi_1 + 8);
0045ab21              int32_t var_18_1 = *(uint32_t*)((char*)edi_1 + 0xc);
0045ab24              _STL::__adjust_heap(arg1, ebx_2, edx_2, eax_6, arg3);
0045ab24              
0045ab2e              if (ebx_2 == 0)
0045ab2e                  break;
0045ab2e              
0045ab30              ebx_2 -= 1;
0045ab31              edi_1 -= 0x18;
0045aaeb          }
0045aad4      }
0045aab0  }

0045ab3b                                                                                   90 90 90 90 90                             .....

0045ab40  uint8_t __thiscall UIElementManager::BroadcastElementMessage(class UIElementManager* this, struct UIElementMessageInfo const* arg2)

0045ab40  {
0045ab4b      uint32_t m_timestamp;
0045ab4b      
0045ab4b      if (((*(uint8_t*)$S216) & 1) != 0)
0045ab58          m_timestamp = s_tsMsgSerialNumber.m_timestamp;
0045ab4b      else
0045ab4b      {
0045ab4d          $S216 |= 1;
0045ab54          m_timestamp = 0;
0045ab4b      }
0045ab4b      
0045ab63      s_tsMsgSerialNumber.m_timestamp = (m_timestamp + 1);
0045ab69      arg2->tsSerialNumber.m_timestamp = (m_timestamp + 1);
0045ab6c      class CTimestamp<unsigned long,0> ecx;
0045ab6c      ecx.m_timestamp = this->m_bBroadcastingMessage;
0045ab72      int32_t ebx;
0045ab72      ebx = 0;
0045ab72      
0045ab76      if (ecx.m_timestamp != 0)
0045ab76      {
0045ab7f          List<UIElementMessageInfo>::push_back(&this->m_listQueuedElementMessages, arg2);
0045ab85          int32_t eax_1;
0045ab85          eax_1 = 0;
0045ab88          return 0;
0045ab76      }
0045ab76      
0045ab8b      this->m_bBroadcastingMessage = 1;
0045ab92      class UIElement* pElement = arg2->pElement;
0045ab92      
0045ab97      if ((pElement != 0 && *(int32_t*)((char*)pElement->vtable + 0xc)(arg2) != 0))
0045aba3          ebx = 1;
0045aba3      
0045aba6      class ListNode<UIElementMessageInfo>* i = this->m_listQueuedElementMessages._head;
0045aba6      
0045abb5      while (i != 0)
0045abb5      {
0045abb7          class UIElement* pElement_1 = i->data.pElement;
0045abb7          
0045abbc          if (pElement_1 != 0)
0045abc1              *(int32_t*)((char*)pElement_1->vtable + 0xc)(i);
0045abc1          
0045abc4          class ListNode<UIElementMessageInfo>* i_1 = i;
0045abc6          i = i->next;
0045abcc          List<UIElementMessageInfo>::remove(&this->m_listQueuedElementMessages, i_1);
0045abb5      }
0045abb5      
0045abd7      this->m_bBroadcastingMessage = 0;
0045abdf      struct UIElementMessageInfo* eax;
0045abdf      eax = ebx;
0045abe2      return eax;
0045ab40  }

0045abe5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0045abf0  void __fastcall UIElementManager::CheckCursor(class UIElementManager* this)

0045abf0  {
0045abf3      class UIElement* m_pElementWithMouseCapture = this->m_pElementWithMouseCapture;
0045abfb      char eax_2;
0045abfb      
0045abfb      if (m_pElementWithMouseCapture != 0)
0045abff          eax_2 = m_pElementWithMouseCapture->vtable->HasCursor();
0045abff      
0045ac04      class UIElement* eax_3;
0045ac04      
0045ac04      if ((m_pElementWithMouseCapture == 0 || eax_2 == 0))
0045ac04      {
0045ac0e          class UIElement* m_pElementLastEntered = this->m_pElementLastEntered;
0045ac0e          
0045ac16          if ((m_pElementLastEntered != 0 && m_pElementLastEntered->vtable->HasCursor() != 0))
0045ac16          {
0045ac21              eax_3 = this->m_pElementLastEntered;
0045ac21              goto label_45ac27;
0045ac16          }
0045ac04      }
0045ac04      else
0045ac04      {
0045ac06          eax_3 = this->m_pElementWithMouseCapture;
0045ac27      label_45ac27:
0045ac27          
0045ac29          if (eax_3 != 0)
0045ac29          {
0045ac44              UIElementManager::SetCursor(this, eax_3->m_cursorDID.id, eax_3->m_cursorHotX, eax_3->m_cursorHotY, 0);
0045ac4a              return;
0045ac29          }
0045ac04      }
0045ac64      UIElementManager::SetCursor(this, this->m_defaultCursorDID.id, this->m_defaultCursorHotX, this->m_defaultCursorHotY, 1);
0045abf0  }

0045ac6b                                   90 90 90 90 90                                                             .....

0045ac70  void __stdcall UIElementManager::DrawRegionWithObject(class UIElementManager* this @ ecx, class UIElement* arg2, class UIObject** arg3)

0045ac70  {
0045ac7a      class UIObject* m_object = arg2->m_object;
0045ac7a      
0045ac84      if (m_object == 0)
0045ac84      {
0045ac86          class UIRegion* m_parent = arg2->m_parent;
0045ac86          
0045ac8e          if (m_parent != 0)
0045ac8e          {
0045ac99              m_object = UIRegion::GetObjectA(m_parent);
0045ac99              
0045ac9d              if (m_object != 0)
0045ac9d                  goto label_45aca7;
0045ac8e          }
0045ac8e          
0045ac8e          return;
0045ac84      }
0045ac84      
0045aca7  label_45aca7:
0045aca7      
0045acaf      if (arg2->vtable->GetParent() != 0)
0045acaf      {
0045acb7          RenderUI::UnlinkObject(m_object);
0045acc4          RenderUI::LinkObjectAfter(m_object, *(uint32_t*)arg3);
0045acc9          *(uint32_t*)arg3 = m_object;
0045acc9          
0045acd4          if (m_object->m_dirtyRects.m_num != 0)
0045acd4          {
0045acde              void* var_1c = nullptr;
0045ace2              int32_t var_18_1 = 0;
0045ace6              int32_t var_14_1 = 0;
0045acea              SmartArray<Box2D,1>::operator=(&var_1c, &m_object->m_dirtyRects);
0045acf3              m_object->m_dirtyRects.m_num = 0;
0045acf6              void* eax_6 = *(int32_t*)((char*)m_object->vtable + 0x1c)();
0045acf6              
0045acfb              if (eax_6 != 0)
0045acfb              {
0045acfd                  int32_t esi = *(uint32_t*)((char*)eax_6 + 0x110);
0045acfd                  
0045ad05                  if (esi != 0)
0045ad05                  {
0045ad10                      void var_10;
0045ad07                      arg2->vtable->GetSurfaceBox(&var_10);
0045ad13                      arg2->vtable->DrawHere(&var_10, &var_10, &var_1c, esi);
0045ad05                  }
0045acfb              }
0045acfb              
0045ad3a              if ((var_18_1 & 0x80000000) == 0x80000000)
0045ad41                  operator delete[](var_1c);
0045acd4          }
0045acaf      }
0045ac70  }

0045ad52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0045ad60  uint8_t __thiscall SmartArray<unsigned long,1>::add_unique(class SmartArray<unsigned long,1>* this, uint32_t const* arg2)

0045ad60  {
0045ad69      uint32_t m_num = this->m_num;
0045ad6c      int32_t eax = 0;
0045ad6c      
0045ad71      if (m_num > 0)
0045ad71      {
0045ad75          uint32_t* m_data = this->m_data;
0045ad75          
0045ad79          while (*(uint32_t*)m_data != *(uint32_t*)arg2)
0045ad79          {
0045ad7e              eax += 1;
0045ad7f              m_data = &m_data[1];
0045ad7f              
0045ad84              if (eax >= this->m_num)
0045ad84                  goto label_45ad90;
0045ad79          }
0045ad71      }
0045ad71      
0045ad8b      if ((m_num <= 0 || eax == 0xffffffff))
0045ad8b      {
0045ad90      label_45ad90:
0045ad90          int32_t eax_2 = (this->m_sizeAndDeallocate & 0x7fffffff);
0045ad90          
0045ad97          if (m_num >= eax_2)
0045ada5              eax = SmartArray<unsigned long,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_2 + 1)));
0045ada5          
0045adac          if ((m_num < eax_2 || eax != 0))
0045adac          {
0045adbc              this->m_data[this->m_num] = *(uint32_t*)arg2;
0045adc6              this->m_num += 1;
0045adcb              uint32_t eax_7;
0045adcb              eax_7 = 1;
0045adce              return 1;
0045adac          }
0045ad8b      }
0045ad8b      
0045adb1      eax = 0;
0045adb4      return 0;
0045ad60  }

0045add1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0045ade0  int32_t HierarchyNotifier<MouseOverNotificationLogic>::CallFunctions(class UIElement* arg1, class UIElement* arg2)

0045ade0  {
0045ade5      int32_t ebx = 0;
0045ade9      class UIElement* i = arg1;
0045aded      int32_t ebp = 0;
0045adfd      void* s;
0045adfd      __builtin_memset(&s, 0, 0x18);
0045ae09      void* var_c;
0045ae09      int32_t var_8;
0045ae09      
0045ae09      for (; i != 0; i = i->vtable->GetParent())
0045ae09      {
0045ae14          int32_t eax_2 = (var_8 & 0x7fffffff);
0045ae1b          int32_t var_4_1;
0045ae1b          
0045ae1b          if (ebp < eax_2)
0045ae1b          {
0045ae7c          label_45ae7c:
0045ae7c              *(uint32_t*)((char*)var_c + (ebp << 2)) = i;
0045ae7f              ebp += 1;
0045ae80              var_4_1 = ebp;
0045ae1b          }
0045ae1b          else
0045ae1b          {
0045ae1d              uint32_t edx_1 = (eax_2 + 1);
0045ae1d              
0045ae23              if (edx_1 <= 8)
0045ae25                  edx_1 = 8;
0045ae23              else if (edx_1 <= 0x4000)
0045ae32              {
0045ae51                  int32_t eflags_1;
0045ae51                  char eax_6;
0045ae51                  eax_6 = __bsr_gprv_memv(edx_1);
0045ae5d                  int32_t esi_1 = (1 << eax_6);
0045ae5d                  
0045ae61                  if (edx_1 > esi_1)
0045ae63                      edx_1 = (esi_1 * 2);
0045ae32              }
0045ae32              else
0045ae32              {
0045ae36                  int32_t eax_4 = (edx_1 & 0x3fff);
0045ae36                  
0045ae3b                  if (eax_4 != 0)
0045ae44                      edx_1 += (0x4000 - eax_4);
0045ae32              }
0045ae32              
0045ae72              ebp = var_4_1;
0045ae72              
0045ae76              if (SmartArray<unsigned long,1>::grow(&var_c, edx_1) != 0)
0045ae76                  goto label_45ae7c;
0045ae1b          }
0045ae09      }
0045ae09      
0045ae9e      int32_t var_14;
0045ae9e      
0045ae9e      for (class UIElement* i_1 = arg2; i_1 != 0; i_1 = i_1->vtable->GetParent())
0045ae9e      {
0045aea8          int32_t eax_11 = (var_14 & 0x7fffffff);
0045aeaf          int32_t var_10_1;
0045aeaf          
0045aeaf          if (ebx < eax_11)
0045aeaf          {
0045af10          label_45af10:
0045af10              *(uint32_t*)((char*)s + (ebx << 2)) = i_1;
0045af13              ebx += 1;
0045af14              var_10_1 = ebx;
0045aeaf          }
0045aeaf          else
0045aeaf          {
0045aeb1              uint32_t edx_3 = (eax_11 + 1);
0045aeb1              
0045aeb7              if (edx_3 <= 8)
0045aeb9                  edx_3 = 8;
0045aeb7              else if (edx_3 <= 0x4000)
0045aec6              {
0045aee5                  int32_t eflags_2;
0045aee5                  char eax_15;
0045aee5                  eax_15 = __bsr_gprv_memv(edx_3);
0045aef1                  int32_t esi_2 = (1 << eax_15);
0045aef1                  
0045aef5                  if (edx_3 > esi_2)
0045aef7                      edx_3 = (esi_2 * 2);
0045aec6              }
0045aec6              else
0045aec6              {
0045aeca                  int32_t eax_13 = (edx_3 & 0x3fff);
0045aeca                  
0045aecf                  if (eax_13 != 0)
0045aed8                      edx_3 += (0x4000 - eax_13);
0045aec6              }
0045aec6              
0045af06              ebx = var_10_1;
0045af06              
0045af0a              if (SmartArray<unsigned long,1>::grow(&s, edx_3) != 0)
0045af0a                  goto label_45af10;
0045aeaf          }
0045ae9e      }
0045ae9e      
0045af2c      int32_t esi_3 = (ebp - 1);
0045af2f      int32_t i_2 = (ebx - 1);
0045af2f      
0045af32      if (esi_3 > 0)
0045af32      {
0045af42          while (i_2 > 0)
0045af42          {
0045af4a              if (*(uint32_t*)((char*)var_c + (esi_3 << 2)) != *(uint32_t*)((char*)s + (i_2 << 2)))
0045af4a                  break;
0045af4a              
0045af4c              esi_3 -= 1;
0045af4d              i_2 -= 1;
0045af4d              
0045af50              if (esi_3 <= 0)
0045af50                  break;
0045af42          }
0045af32      }
0045af32      
0045af58      if (arg1 != 0)
0045af58      {
0045af5a          int32_t edi = 0;
0045af5a          
0045af5e          if (esi_3 >= 0)
0045af5e          {
0045af71              do
0045af71              {
0045af6b                  *(uint32_t*)(**(uint32_t**)((char*)var_c + (edi << 2)) + 0x50)(0);
0045af6e                  edi += 1;
0045af71              } while (edi <= esi_3);
0045af5e          }
0045af58      }
0045af58      
0045af79      if (arg2 != 0)
0045af79      {
0045af7b          int32_t esi_4 = 0;
0045af7b          
0045af7f          if (i_2 >= 0)
0045af7f          {
0045af92              do
0045af92              {
0045af8c                  *(uint32_t*)(**(uint32_t**)((char*)s + (esi_4 << 2)) + 0x50)(1);
0045af8f                  esi_4 += 1;
0045af92              } while (esi_4 <= i_2);
0045af7f          }
0045af79      }
0045af79      
0045afa6      if ((var_14 & 0x80000000) == 0x80000000)
0045afad          operator delete[](s);
0045afad      
0045afb9      int32_t result = (var_8 & 0x80000000);
0045afb9      
0045afc3      if (result != 0x80000000)
0045afd5          return result;
0045afd5      
0045afca      return operator delete[](var_c);
0045ade0  }

0045afd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045afe0  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::grow(class IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>* this)

0045afe0  {
0045afe0      class IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>* m_numBuckets = this;
0045afe2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045afee      m_numBuckets = this->m_numBuckets;
0045b005      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0045b005      
0045b00f      if (eax_2 != bucketSizesEnd_1)
0045b018          eax_2 = &eax_2[1];
0045b00f      else
0045b00f      {
0045b011          eax_2 -= 4;
0045b011          
0045b016          if (eax_2 != bucketSizesEnd_1)
0045b018              eax_2 = &eax_2[1];
0045b00f      }
0045b00f      
0045b028      return IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::resize_internal(this, *(uint32_t*)eax_2);
0045afe0  }

0045b029                             90 90 90 90 90 90 90                                                           .......

0045b030  void __fastcall List<UIElementMessageInfo>::~List<UIElementMessageInfo>(class List<UIElementMessageInfo>* this)

0045b030  {
0045b036      this->vtable = 0x79bd58;
0045b036      
0045b045      while (this->_head != 0)
0045b045      {
0045b04e          int32_t var_4_1 = 0;
0045b056          void var_28;
0045b056          List<UIElementMessageInfo>::pop_front(this, &var_28);
0045b045      }
0045b030  }

0045b062        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0045b070  class HashListIterator<HashList<UIRegion *,UIRegion *,1> >* __thiscall HashList<UIRegion *,UIRegion *,1>::begin(class HashList<UIRegion *,UIRegion *,1> const* this, class HashListIterator<HashList<UIRegion *,UIRegion *,1> >* __return)

0045b070  {
0045b077      if (this->m_ihlIntrusive.m_hash.m_numElements > 0)
0045b077      {
0045b079          class DLListData* head_ = this->m_ihlIntrusive.m_list.head_;
0045b079          
0045b07e          if (head_ != 0)
0045b07e          {
0045b083              void** __return_1 = __return;
0045b087              *(uint32_t*)__return_1 = &head_[-1];
0045b089              __return_1[1] = this;
0045b08c              return __return_1;
0045b07e          }
0045b077      }
0045b077      
0045b095      __return->m_iter.m_pData = 0;
0045b097      __return->m_iter.m_pHashList = this;
0045b09a      return __return;
0045b070  }

0045b09d                                                                                         90 90 90                               ...

0045b0a0  void* __thiscall List<UIElementMessageInfo>::`scalar deleting destructor'(class List<UIElementMessageInfo>* this, uint32_t arg2)

0045b0a0  {
0045b0a3      List<UIElementMessageInfo>::~List<UIElementMessageInfo>(this);
0045b0a3      
0045b0ad      if ((arg2 & 1) != 0)
0045b0b0          operator delete(this);
0045b0b0      
0045b0bb      return this;
0045b0a0  }

0045b0be                                                                                            90 90                                ..

0045b0c0  class UIElement* __thiscall UIElementManager::CreateElementRecursiveFromFullDesc(class UIElementManager* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0045b0c0  {
0045b0c5      class ElementDesc* edi = arg3;
0045b0cb      uint32_t m_type = edi->m_type;
0045b0e4      int32_t* eax_3 = this->m_classCreateMethodTable.m_intrusiveTable.m_buckets[(COMBINE(0, m_type) % this->m_classCreateMethodTable.m_intrusiveTable.m_numBuckets)];
0045b0e8      int32_t eax_4;
0045b0e8      
0045b0e8      if (eax_3 == 0)
0045b0e8      {
0045b108      label_45b108:
0045b108          uint32_t m_engineType = edi->m_engineType;
0045b108          
0045b110          if (m_engineType == 0)
0045b155              return 0;
0045b155          
0045b125          int32_t* eax_8 = this->m_classCreateMethodTable.m_intrusiveTable.m_buckets[(COMBINE(0, m_engineType) % this->m_classCreateMethodTable.m_intrusiveTable.m_numBuckets)];
0045b125          
0045b129          if (eax_8 == 0)
0045b155              return 0;
0045b155          
0045b132          while (*(uint32_t*)eax_8 != m_engineType)
0045b132          {
0045b134              eax_8 = eax_8[1];
0045b134              
0045b139              if (eax_8 == 0)
0045b140                  return eax_8;
0045b132          }
0045b132          
0045b145          if (eax_8 == 0)
0045b155              return 0;
0045b155          
0045b147          eax_4 = eax_8[2];
0045b147          
0045b14c          if (eax_4 == 0)
0045b155              return 0;
0045b0e8      }
0045b0e8      else
0045b0e8      {
0045b0f2          while (*(uint32_t*)eax_3 != m_type)
0045b0f2          {
0045b0f4              eax_3 = eax_3[1];
0045b0f4              
0045b0f9              if (eax_3 == 0)
0045b0f9                  goto label_45b108;
0045b0f2          }
0045b0f2          
0045b0ff          if (eax_3 == 0)
0045b0ff              goto label_45b108;
0045b0ff          
0045b101          eax_4 = eax_3[2];
0045b101          
0045b106          if (eax_4 == 0)
0045b106              goto label_45b108;
0045b0e8      }
0045b0e8      
0045b15f      class ElementDesc* eax_10 = eax_4(arg2, edi);
0045b168      arg3 = eax_10;
0045b168      
0045b16c      if (eax_10 == 0)
0045b267          return 0;
0045b267      
0045b17b      SmartArray<unsigned long,1>::AddToEnd(&this->m_elementList.m_data, &arg3);
0045b191      arg3 = *(int32_t*)((char*)eax_10 + 0x2e4);
0045b195      class List<NoticeHandler *>** eax_12 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_elementListenerTable, &arg3);
0045b195      
0045b19e      if (eax_12 != 0)
0045b19e      {
0045b1ae          if (HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(eax_12, &Element_mouse_press_UIElementMessage) != 0)
0045b1e7              *(int32_t*)((char*)eax_10->vtable + 0x110)(1);
0045b1ae          else if (HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(eax_12, &Element_mouse_release_UIElementMessage) != 0)
0045b1e7              *(int32_t*)((char*)eax_10->vtable + 0x110)(1);
0045b1be          else if (HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(eax_12, &Element_mouse_click_UIElementMessage) != 0)
0045b1e7              *(int32_t*)((char*)eax_10->vtable + 0x110)(1);
0045b1ce          else if (HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(eax_12, &Element_mouse_tap_UIElementMessage) != 0)
0045b1e7              *(int32_t*)((char*)eax_10->vtable + 0x110)(1);
0045b19e      }
0045b19e      
0045b1f8      void __return;
0045b1f8      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_17 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&edi->m_children.m_intrusiveTable, &__return);
0045b1fd      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_17->m_currElement;
0045b202      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_17->m_currHashTable;
0045b204      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_17->m_currBucket;
0045b204      
0045b20b      if (i_1 != 0)
0045b20b      {
0045b21b          while (true)
0045b21b          {
0045b21b              class UIElement* eax_19 = UIElementManager::CreateElement(this, arg2, &i_1->m_data);
0045b21b              
0045b222              if (eax_19 != 0)
0045b224                  eax_19->vtable->SetParent(eax_10);
0045b224              
0045b22c              i_1 = i_1->m_hashNext;
0045b22c              
0045b231              if (i_1 == 0)
0045b231              {
0045b24b                  class HashTableData<unsigned long,DBOCache *>* i;
0045b24b                  
0045b24b                  do
0045b24b                  {
0045b240                      m_currBucket = &m_currBucket[1];
0045b240                      
0045b245                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0045b25c                          return eax_10;
0045b25c                      
0045b247                      i = *(uint32_t*)m_currBucket;
0045b24b                  } while (i == 0);
0045b24b                  
0045b24d                  i_1 = i;
0045b24d                  
0045b251                  if (i_1 == 0)
0045b251                      break;
0045b231              }
0045b21b          }
0045b20b      }
0045b20b      
0045b25c      return eax_10;
0045b0c0  }

0045b12d                                         8d 49 00                                                               .I.
0045b26a                                90 90 90 90 90 90                                                            ......

0045b270  void __thiscall UIElementManager::AddElementToDeleteQueue(class UIElementManager* this, class UIElement* arg2)

0045b270  {
0045b271      class UIElement* esi = arg2;
0045b271      
0045b277      if ((esi != 0 && SmartArray<unsigned long,1>::add_unique(&this->m_deleteQueue.m_data, &arg2) != 0))
0045b277      {
0045b290          uint8_t edx_2 = esi->vtable->SetVisible(0);
0045b290          
0045b29c          if (UIElement::GetShouldOwnObject(esi) != 0)
0045b29c          {
0045b29e              int32_t var_8_2 = 0;
0045b2a2              UIElement::SetShouldOwnObject(esi, edx_2);
0045b29c          }
0045b29c          
0045b2a7          esi->vtable->SetParent(0);
0045b277      }
0045b270  }

0045b2b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0045b2c0  uint8_t __thiscall UIElementManager::BroadcastElementMessage(class UIElementManager* this, uint32_t arg2, class UIElement* arg3, uint32_t arg4, int32_t arg5)

0045b2c0  {
0045b2d7      int32_t ebx;
0045b2d7      ebx = 0;
0045b2dd      int32_t* eax_3 = this->m_elementListenerTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_elementListenerTable.m_intrusiveTable.m_numBuckets)];
0045b2dd      
0045b2e1      if (eax_3 != 0)
0045b2e1      {
0045b2e5          while (*(uint32_t*)eax_3 != arg2)
0045b2e5          {
0045b2e7              eax_3 = eax_3[1];
0045b2e7              
0045b2ec              if (eax_3 == 0)
0045b2ec              {
0045b2f1                  eax_3 = 0;
0045b2f4                  return 0;
0045b2ec              }
0045b2e5          }
0045b2e5          
0045b300          if ((eax_3 != 0 && eax_3 != 0xfffffff8))
0045b300          {
0045b30e              int32_t* esi_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&eax_3[2], &arg4);
0045b30e              
0045b312              if (esi_1 != 0)
0045b312              {
0045b317                  int32_t i = 0;
0045b317                  
0045b31b                  if (esi_1[2] > 0)
0045b31b                  {
0045b35e                      do
0045b35e                      {
0045b321                          int32_t edx_2 = *(uint32_t*)esi_1;
0045b323                          int32_t* ecx_1 = *(uint32_t*)(edx_2 + (i << 3));
0045b323                          
0045b332                          if ((ecx_1 != 0 && *(uint32_t*)((edx_2 + (i << 3)) + 4) > 0))
0045b332                          {
0045b346                              eax_3 = *(uint32_t*)(*(uint32_t*)ecx_1 + 0x10)(arg2, arg3, arg4, arg5);
0045b346                              
0045b34f                              if ((ebx == 0 && eax_3 != 0))
0045b351                                  ebx = 1;
0045b351                              
0045b356                              if (eax_3 == 2)
0045b356                                  break;
0045b332                          }
0045b332                          
0045b35b                          i += 1;
0045b35e                      } while (i < esi_1[2]);
0045b31b                  }
0045b312              }
0045b300          }
0045b2e1      }
0045b2e1      
0045b363      eax_3 = ebx;
0045b366      return eax_3;
0045b2c0  }

0045b369                             90 90 90 90 90 90 90                                                           .......

0045b370  uint8_t __thiscall UIElementManager::BroadcastElementMessage(class UIElementManager* this, class UIElement* arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5)

0045b370  {
0045b37b      if (arg2 == 0)
0045b37b      {
0045b37d          class UIElement* eax;
0045b37d          eax = 0;
0045b382          return 0;
0045b37b      }
0045b37b      
0045b386      uint32_t m_elementID = arg2->m_desc.m_elementID;
0045b38c      class UIElement* var_24 = arg2;
0045b394      uint32_t var_20 = arg3;
0045b3a0      int32_t s;
0045b3a0      __builtin_memset(&s, 0, 0x14);
0045b3b0      uint32_t var_1c = arg4;
0045b3bd      uint32_t m_elementID_1 = m_elementID;
0045b3c1      uint32_t var_18 = arg5;
0045b3ce      return UIElementManager::BroadcastElementMessage(this, &m_elementID_1);
0045b370  }

0045b3d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0045b3e0  void __thiscall UIElementManager::BroadcastGlobalMessage(class UIElementManager* this, uint32_t arg2, int32_t arg3)

0045b3e0  {
0045b3f8      int32_t* eax_3 = this->m_globalMessageListenerTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_globalMessageListenerTable.m_intrusiveTable.m_numBuckets)];
0045b3f8      
0045b3fc      if (eax_3 != 0)
0045b3fc      {
0045b402          while (*(uint32_t*)eax_3 != arg2)
0045b402          {
0045b404              eax_3 = eax_3[1];
0045b404              
0045b409              if (eax_3 == 0)
0045b40c                  return;
0045b402          }
0045b402          
0045b411          if (eax_3 != 0)
0045b411          {
0045b419              int32_t edi;
0045b419              int32_t var_c_1 = edi;
0045b419              
0045b41a              if (eax_3 != 0xfffffff8)
0045b41a              {
0045b41f                  int32_t i = 0;
0045b41f                  
0045b423                  if (eax_3[4] > 0)
0045b423                  {
0045b44f                      do
0045b44f                      {
0045b432                          int32_t* eax_5 = (eax_3[2] + (i << 3));
0045b435                          int32_t* ecx_1 = *(uint32_t*)eax_5;
0045b435                          
0045b440                          if ((ecx_1 != 0 && eax_5[1] > 0))
0045b446                              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)(arg2, arg3);
0045b446                          
0045b44c                          i += 1;
0045b44f                      } while (i < eax_3[4]);
0045b423                  }
0045b41a              }
0045b411          }
0045b3fc      }
0045b3e0  }

0045b458                                                                          90 90 90 90 90 90 90 90                          ........

0045b460  void __thiscall UIElementManager::UnRegisterForMessageInternal(class UIElementManager* this, class UIListener* arg2, class AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >* arg3, uint32_t arg4)

0045b460  {
0045b465      class UIListener* i = arg2;
0045b465      
0045b46d      if (i != 0)
0045b46d      {
0045b46f          class AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >* ecx = arg3;
0045b46f          
0045b475          if (ecx != 0)
0045b475          {
0045b47c              class List<NoticeHandler *>** eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(ecx, &arg4);
0045b47c              
0045b483              if (eax_1 != 0)
0045b483              {
0045b486                  int32_t esi_1 = eax_1[2];
0045b489                  int32_t edx_1 = 0;
0045b489                  
0045b48d                  if (esi_1 > 0)
0045b48d                  {
0045b48f                      class List<NoticeHandler *>* ecx_1 = *(uint32_t*)eax_1;
0045b48f                      
0045b493                      while (ecx_1->vtable != i)
0045b493                      {
0045b495                          edx_1 += 1;
0045b496                          ecx_1 = &ecx_1->_tail;
0045b496                          
0045b49b                          if (edx_1 >= esi_1)
0045b4a3                              return;
0045b493                      }
0045b493                      
0045b4a9                      void* __offset(ListNode<NoticeHandler *>, -0x1) edx_3 = (ecx_1->_head - 1);
0045b4aa                      arg2 = edx_3;
0045b4b0                      arg3 = nullptr;
0045b4b8                      class ListNode<NoticeHandler *>** edx_4 = &arg2;
0045b4b8                      
0045b4bc                      if (edx_3 <= 0)
0045b4be                          edx_4 = &arg3;
0045b4be                      
0045b4c2                      class ListNode<NoticeHandler *>* edx_5 = *(uint32_t*)edx_4;
0045b4c6                      ecx_1->_head = edx_5;
0045b4c6                      
0045b4c9                      if (edx_5 == 0)
0045b4c9                      {
0045b4d6                          class UIListener* i_1 = i;
0045b4da                          class List<NoticeHandler *>** var_4_1 = eax_1;
0045b4de                          SmartArray<VertexRange,1>::AddToEnd(&this->m_aUIMessageRemovalData, &i_1);
0045b4c9                      }
0045b48d                  }
0045b483              }
0045b475          }
0045b46d      }
0045b460  }

0045b4ec                                      90 90 90 90                                                              ....

0045b4f0  void __thiscall UIElementManager::UnRegisterForAllMessagesInternal(class UIElementManager* this, class UIListener* arg2, class SmartArray<UIMessageData,1>* arg3)

0045b4f0  {
0045b4f6      uint32_t m_num_1 = arg3->m_num;
0045b4f9      int32_t edx = 0;
0045b4f9      
0045b4fd      if (m_num_1 > 0)
0045b4fd      {
0045b4ff          struct UIMessageData* m_data = arg3->m_data;
0045b4ff          
0045b508          while (m_data->pListener != arg2)
0045b508          {
0045b50a              edx += 1;
0045b50b              m_data = &m_data[1];
0045b50b              
0045b510              if (edx >= m_num_1)
0045b515                  return;
0045b508          }
0045b508          
0045b51e          m_data->nCount = 0;
0045b52b          int32_t eax_2 = (this->m_aUIMessageRemovalData.m_sizeAndDeallocate & 0x7fffffff);
0045b532          uint8_t eax_5;
0045b532          
0045b532          if (this->m_aUIMessageRemovalData.m_num >= eax_2)
0045b540              eax_5 = SmartArray<VertexRange,1>::grow(&this->m_aUIMessageRemovalData, SmartArray<unsigned long,1>::get_new_size(&this->m_aUIMessageRemovalData, (eax_2 + 1)));
0045b540          
0045b547          if ((this->m_aUIMessageRemovalData.m_num < eax_2 || eax_5 != 0))
0045b547          {
0045b549              uint32_t m_num = this->m_aUIMessageRemovalData.m_num;
0045b54c              struct UIMessageRemovalData* m_data_1 = this->m_aUIMessageRemovalData.m_data;
0045b54e              m_data_1[m_num].pListener = arg2;
0045b551              m_data_1[m_num].pListenerArray = arg3;
0045b518              this->m_aUIMessageRemovalData.m_num += 1;
0045b547          }
0045b4fd      }
0045b4f0  }

0045b55e                                                                                            90 90                                ..

0045b560  void __thiscall UIElementManager::SwitchMouseOver(class UIElementManager* this, class UIElement* arg2)

0045b560  {
0045b56f      class UIElement* edi = nullptr;
0045b56f      
0045b573      if (arg2 != this->m_pElementLastOver)
0045b575          this->m_pElementLastOver = arg2;
0045b575      
0045b57d      if (arg2 != 0)
0045b57d      {
0045b57f          class UIElement* m_pElementWithMouseCapture = this->m_pElementWithMouseCapture;
0045b57f          
0045b587          if (m_pElementWithMouseCapture == 0)
0045b587          {
0045b58f              m_pElementWithMouseCapture = arg2->m_bIsMouseVisible;
0045b58f              
0045b597              if (m_pElementWithMouseCapture != 0)
0045b599                  edi = arg2;
0045b587          }
0045b587          else if (m_pElementWithMouseCapture == arg2)
0045b599              edi = arg2;
0045b57d      }
0045b57d      
0045b59b      class UIElement* m_pElementLastEntered = this->m_pElementLastEntered;
0045b59b      
0045b5a3      if (edi != m_pElementLastEntered)
0045b5a3      {
0045b5a7          HierarchyNotifier<MouseOverNotificationLogic>::CallFunctions(m_pElementLastEntered, edi);
0045b5a7          
0045b5b7          if (this->m_pElementLastEntered != 0)
0045b5b7          {
0045b5bb              UIElementManager::StopHover(this);
0045b5c0              this->m_pElementLastEntered->vtable->MouseOverTop(0);
0045b5b7          }
0045b5b7          
0045b5cf          class UIElement* eax_1;
0045b5cf          
0045b5cf          if (edi != 0)
0045b5d1              eax_1 = edi->m_bIsMouseVisible;
0045b5d1          
0045b5d9          if ((edi == 0 || eax_1 == 0))
0045b5ec              this->m_pElementLastEntered = nullptr;
0045b5d9          else
0045b5d9          {
0045b5db              this->m_pElementLastEntered = edi;
0045b5e1              edi->vtable->MouseOverTop(1);
0045b5d9          }
0045b5d9          
0045b5f8          UIElementManager::CheckCursor(this);
0045b5a3      }
0045b5a3      
0045b5fd      class UIElement* edi_1 = nullptr;
0045b5fd      
0045b601      if (arg2 != 0)
0045b601      {
0045b603          m_pElementLastEntered = this->m_bDragStarted;
0045b603          
0045b60b          if (m_pElementLastEntered != 0)
0045b60b          {
0045b60d              class UIElement* m_dragElement = this->m_dragElement;
0045b60d              
0045b615              if (m_dragElement != 0)
0045b622                  edi_1 = arg2->vtable->GetDragAndDropCatcher(m_dragElement);
0045b60b          }
0045b601      }
0045b601      
0045b624      class UIElement* m_pElementLastDragCursorOver = this->m_pElementLastDragCursorOver;
0045b624      
0045b62c      if (edi_1 != m_pElementLastDragCursorOver)
0045b62c      {
0045b630          if (m_pElementLastDragCursorOver != 0)
0045b63b              UIElementManager::BroadcastElementMessage(this, m_pElementLastDragCursorOver, 0x3e, 0, 0);
0045b63b          
0045b642          if (edi_1 != 0)
0045b64d              UIElementManager::BroadcastElementMessage(this, edi_1, 0x3e, 1, 0);
0045b64d          
0045b652          this->m_pElementLastDragCursorOver = edi_1;
0045b62c      }
0045b560  }

0045b65e                                                                                            90 90                                ..

0045b660  uint8_t __thiscall UIElementManager::DoVisibilityToggleAction(class UIElementManager* this, uint32_t arg2)

0045b660  {
0045b680      int32_t* i;
0045b680      
0045b680      for (i = this->m_elementInputActionListenerTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_elementInputActionListenerTable.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0045b680      {
0045b684          if (*(uint32_t*)i == arg2)
0045b684          {
0045b69e              if ((i == 0 || i == 0xfffffff8))
0045b69e                  break;
0045b69e              
0045b6a4              int32_t j = 0;
0045b6a4              
0045b6a8              if (i[4] > 0)
0045b6a8              {
0045b6cc                  do
0045b6cc                  {
0045b6b2                      class UIElement* eax_4 = *(uint32_t*)(i[2] + (j << 2));
0045b6b2                      
0045b6b7                      if (eax_4 != 0)
0045b6c1                          UIElementManager::BroadcastElementMessage(this, eax_4, 0x31, arg2, 0);
0045b6c1                      
0045b6c9                      j += 1;
0045b6cc                  } while (j < i[4]);
0045b6a8              }
0045b6a8              
0045b6d1              int32_t eax_3;
0045b6d1              eax_3 = 1;
0045b6d4              return 1;
0045b684          }
0045b680      }
0045b680      
0045b68f      i = 0;
0045b692      return 0;
0045b660  }

0045b6d7                                                                       90 90 90 90 90 90 90 90 90                         .........

0045b6e0  void __fastcall UIElementManager::CheckTooltip(class UIElementManager* this)

0045b6e0  {
0045b6f1      int32_t Timer::local_time_1 = (*(uint32_t*)Timer::local_time);
0045b6f5      int32_t eax;
0045b6f5      eax = this->m_bHoverStarted;
0045b6fd      int32_t var_4 = *(int32_t*)((char*)Timer::local_time + 4);
0045b6fd      
0045b701      if (eax != 0)
0045b701      {
0045b77c      label_45b77c:
0045b77c          class UIElement* m_pTooltipElement = this->m_pTooltipElement;
0045b77c          
0045b784          if (m_pTooltipElement != 0)
0045b784          {
0045b78a              long double x87_r7_4 = (((long double)Timer::local_time_1) - ((long double)this->m_tooltipStart));
0045b790              long double x87_r6_1 = ((long double)this->m_tooltipDuration);
0045b796              (x87_r6_1 - x87_r7_4);
0045b798              eax = ((((x87_r6_1 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_4) ? 1 : 0) << 0xe) | 0))));
0045b79a              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0045b79a              
0045b79d              if (!(p_2))
0045b79d              {
0045b79f                  UIElement::AddToDeleteQueue(m_pTooltipElement);
0045b7a8                  this->m_pTooltipElement = nullptr;
0045b7b2                  UIElementManager::SwitchMouseOver(this, nullptr);
0045b79d              }
0045b784          }
0045b701      }
0045b701      else
0045b701      {
0045b703          eax = this->m_bMouseHasLeftTheWindow;
0045b703          
0045b70b          if (eax != 0)
0045b70b              goto label_45b77c;
0045b70b          
0045b715          if (this->m_pElementWithMouseCapture == 0)
0045b715          {
0045b71b              class UIElement* m_pElementLastEntered = this->m_pElementLastEntered;
0045b71b              
0045b723              if (m_pElementLastEntered != 0)
0045b723              {
0045b737                  float m_tooltipDelay;
0045b737                  
0045b737                  if (UIElement::GetAttribute_Float(m_pElementLastEntered, 0x50, &m_tooltipDelay) == 0)
0045b73f                      m_tooltipDelay = this->m_tooltipDelay;
0045b73f                  
0045b747                  long double x87_r7_2 = (((long double)m_tooltipDelay) + ((long double)this->m_lastMouseMoveTime));
0045b74d                  long double temp0_1 = ((long double)Timer::local_time_1);
0045b74d                  (x87_r7_2 - temp0_1);
0045b751                  float eax_2;
0045b751                  eax_2 = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0045b753                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0045b753                  
0045b756                  if (!(p_1))
0045b756                  {
0045b759                      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045b771                      UIElementManager::StartHover(this, ICIDM::s_cidm_1->vtable->GetMouseX(ICIDM::s_cidm_1->vtable->GetMouseY()));
0045b756                  }
0045b723              }
0045b715          }
0045b701      }
0045b6e0  }

0045b7bc                                                                                      90 90 90 90                              ....

0045b7c0  void __thiscall UIElementManager::DrawRegion(class UIElementManager* this, class UIElement* arg2, class UIObject** arg3)

0045b7c0  {
0045b7d2      if ((((int8_t)(arg2->__bitfield164 >> 1)) & 1) != 0)
0045b7d2      {
0045b7e1          if ((*(uint8_t*)((char*)arg2->__inner23 + 2) & 1) != 0)
0045b7e5              UIElementManager::DrawRegionWithObject(this, arg2, arg3);
0045b7e5          
0045b7f5          for (class UIElement* i = UIElement::GetFirstChildElement(arg2); i != 0; i = UIElement::GetNextChildElement(arg2, i))
0045b7fb              UIElementManager::DrawRegion(this, i, arg3);
0045b7d2      }
0045b7c0  }

0045b815                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0045b820  void __fastcall UIElementManager::DrawDirtyRegions(class UIElementManager* this)

0045b820  {
0045b82d      class HashList<UIRegion *,UIRegion *,1>* eax_1 = &this->m_pRootElement->m_children;
0045b832      int32_t var_c = 0;
0045b83d      void* __offset(DLListData, -0x8) i = nullptr;
0045b83d      
0045b841      if (eax_1->m_ihlIntrusive.m_hash.m_numElements > 0)
0045b841      {
0045b843          class DLListData* head_ = eax_1->m_ihlIntrusive.m_list.head_;
0045b843          
0045b848          if (head_ == 0)
0045b84f              i = nullptr;
0045b848          else
0045b84a              i = &head_[-1];
0045b841      }
0045b841      
0045b853      class HashList<UIRegion *,UIRegion *,1>* var_4 = eax_1;
0045b857      class DLListData* dllist_next;
0045b857      
0045b857      for (; i != 0; i = &dllist_next[-1])
0045b857      {
0045b86b          UIElementManager::DrawRegion(this, *(int32_t*)((char*)ADJ(i) + 8), &var_c);
0045b870          dllist_next = ADJ(i)->dllist_next;
0045b870          
0045b875          if (dllist_next == 0)
0045b875              break;
0045b857      }
0045b820  }

0045b884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0045b890  void __thiscall UIElementManager::SetFocusElement(class UIElementManager* this, class UIElement* arg2)

0045b890  {
0045b893      class UIElement* m_focusElement = this->m_focusElement;
0045b893      
0045b8a0      if (m_focusElement != arg2)
0045b8a0      {
0045b8a4          if (m_focusElement != 0)
0045b8a4          {
0045b8ad              UIElementManager::BroadcastElementMessage(this, m_focusElement, 0x2f, 0, 0);
0045b8b2              this->m_focusElement->vtable->UnregisterInputMaps();
0045b8a4          }
0045b8a4          
0045b8c2          this->m_focusElement = arg2;
0045b8c2          
0045b8c8          if (arg2 != 0)
0045b8c8          {
0045b8d3              UIElementManager::BroadcastElementMessage(this, arg2, 0x2f, 1, 0);
0045b8e2              arg2 = 0xbb8;
0045b8ea              /* jump -> this->m_focusElement->vtable->RegisterInputMaps */
0045b8c8          }
0045b8a0      }
0045b890  }

0045b8f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0045b900  uint8_t __thiscall SmartArray<SurfaceUsageSummary,1>::add(class SmartArray<SurfaceUsageSummary,1>* this, struct SurfaceUsageSummary const* arg2)

0045b900  {
0045b909      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
0045b909      
0045b910      if (this->m_num >= eax_1)
0045b910      {
0045b91e          uint8_t result = SmartArray<SurfaceUsageSummary,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
0045b91e          
0045b925          if (result == 0)
0045b928              return result;
0045b910      }
0045b910      
0045b93b      SurfaceUsageSummary::operator=(&this->m_data[this->m_num], arg2);
0045b940      this->m_num += 1;
0045b943      struct SurfaceUsageSummary* eax_6;
0045b943      eax_6 = 1;
0045b946      return 1;
0045b900  }

0045b949                             90 90 90 90 90 90 90                                                           .......

0045b950  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)> *,0>* this, uint32_t arg2)

0045b950  {
0045b95b      arg2 = arg2;
0045b95f      uint8_t edx = ((int8_t)arg2);
0045b963      this->m_buckets = nullptr;
0045b966      this->m_firstInterestingBucket = nullptr;
0045b969      this->m_numBuckets = 0;
0045b96c      this->m_numElements = 0;
0045b970      this->vtable = 0x79bd68;
0045b976      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045b989      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0045b989      
0045b993      if (eax == bucketSizesEnd_1)
0045b995          eax -= 4;
0045b995      
0045b998      uint32_t eax_1 = *(uint32_t*)eax;
0045b99d      this->m_numBuckets = eax_1;
0045b99d      
0045b9a0      if (eax_1 > 0x17)
0045b9b6          this->m_buckets = operator new[]((eax_1 << 2));
0045b9a0      else
0045b9a5          this->m_buckets = &this->m_aInplaceBuckets;
0045b9a5      
0045b9bc      class HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)>** m_buckets = this->m_buckets;
0045b9bf      uint32_t ecx_3 = (this->m_numBuckets << 2);
0045b9c5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0045b9d6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0045b950  }

0045b9df                                                                                               90                                 .

0045b9e0  void __thiscall IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>(class IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>* this, uint32_t arg2)

0045b9e0  {
0045b9eb      arg2 = arg2;
0045b9ef      uint8_t edx = ((int8_t)arg2);
0045b9f3      this->m_buckets = nullptr;
0045b9f6      this->m_firstInterestingBucket = nullptr;
0045b9f9      this->m_numBuckets = 0;
0045b9fc      this->m_numElements = 0;
0045ba00      this->vtable = 0x79bd6c;
0045ba06      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045ba19      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0045ba19      
0045ba23      if (eax == bucketSizesEnd_1)
0045ba25          eax -= 4;
0045ba25      
0045ba28      uint32_t eax_1 = *(uint32_t*)eax;
0045ba2d      this->m_numBuckets = eax_1;
0045ba2d      
0045ba30      if (eax_1 > 0x17)
0045ba46          this->m_buckets = operator new[]((eax_1 << 2));
0045ba30      else
0045ba35          this->m_buckets = &this->m_aInplaceBuckets;
0045ba35      
0045ba4c      class HashSetData<unsigned long>** m_buckets = this->m_buckets;
0045ba4f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0045ba55      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0045ba66      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0045b9e0  }

0045ba6f                                               90                                                                 .

0045ba70  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>* this, uint32_t arg2)

0045ba70  {
0045ba7b      arg2 = arg2;
0045ba7f      uint8_t edx = ((int8_t)arg2);
0045ba83      this->m_buckets = nullptr;
0045ba86      this->m_firstInterestingBucket = nullptr;
0045ba89      this->m_numBuckets = 0;
0045ba8c      this->m_numElements = 0;
0045ba90      this->vtable = 0x79bd5c;
0045ba96      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045baa9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0045baa9      
0045bab3      if (eax == bucketSizesEnd_1)
0045bab5          eax -= 4;
0045bab5      
0045bab8      uint32_t eax_1 = *(uint32_t*)eax;
0045babd      this->m_numBuckets = eax_1;
0045babd      
0045bac0      if (eax_1 > 0x17)
0045bad6          this->m_buckets = operator new[]((eax_1 << 2));
0045bac0      else
0045bac5          this->m_buckets = &this->m_aInplaceBuckets;
0045bac5      
0045badc      class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_buckets = this->m_buckets;
0045badf      uint32_t ecx_3 = (this->m_numBuckets << 2);
0045bae5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0045baf6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0045ba70  }

0045baff                                                                                               90                                 .

0045bb00  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>* this, uint32_t arg2)

0045bb00  {
0045bb0b      arg2 = arg2;
0045bb0f      uint8_t edx = ((int8_t)arg2);
0045bb13      this->m_buckets = nullptr;
0045bb16      this->m_firstInterestingBucket = nullptr;
0045bb19      this->m_numBuckets = 0;
0045bb1c      this->m_numElements = 0;
0045bb20      this->vtable = 0x79bd60;
0045bb26      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045bb39      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0045bb39      
0045bb43      if (eax == bucketSizesEnd_1)
0045bb45          eax -= 4;
0045bb45      
0045bb48      uint32_t eax_1 = *(uint32_t*)eax;
0045bb4d      this->m_numBuckets = eax_1;
0045bb4d      
0045bb50      if (eax_1 > 0x17)
0045bb66          this->m_buckets = operator new[]((eax_1 << 2));
0045bb50      else
0045bb55          this->m_buckets = &this->m_aInplaceBuckets;
0045bb55      
0045bb6c      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_buckets = this->m_buckets;
0045bb6f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0045bb75      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0045bb86      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0045bb00  }

0045bb8f                                               90                                                                 .

0045bb90  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>* this, uint32_t arg2)

0045bb90  {
0045bb9b      arg2 = arg2;
0045bb9f      uint8_t edx = ((int8_t)arg2);
0045bba3      this->m_buckets = nullptr;
0045bba6      this->m_firstInterestingBucket = nullptr;
0045bba9      this->m_numBuckets = 0;
0045bbac      this->m_numElements = 0;
0045bbb0      this->vtable = 0x79bd64;
0045bbb6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045bbc9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0045bbc9      
0045bbd3      if (eax == bucketSizesEnd_1)
0045bbd5          eax -= 4;
0045bbd5      
0045bbd8      uint32_t eax_1 = *(uint32_t*)eax;
0045bbdd      this->m_numBuckets = eax_1;
0045bbdd      
0045bbe0      if (eax_1 > 0x17)
0045bbf6          this->m_buckets = operator new[]((eax_1 << 2));
0045bbe0      else
0045bbe5          this->m_buckets = &this->m_aInplaceBuckets;
0045bbe5      
0045bbfc      class HashTableData<unsigned long,SmartArray<UIElement *,1> >** m_buckets = this->m_buckets;
0045bbff      uint32_t ecx_3 = (this->m_numBuckets << 2);
0045bc05      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0045bc16      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0045bb90  }

0045bc1f                                                                                               90                                 .

0045bc20  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::grow(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>* this)

0045bc20  {
0045bc20      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>* m_numBuckets = this;
0045bc22      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045bc2e      m_numBuckets = this->m_numBuckets;
0045bc45      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0045bc45      
0045bc4f      if (eax_2 != bucketSizesEnd_1)
0045bc58          eax_2 = &eax_2[1];
0045bc4f      else
0045bc4f      {
0045bc51          eax_2 -= 4;
0045bc51          
0045bc56          if (eax_2 != bucketSizesEnd_1)
0045bc58              eax_2 = &eax_2[1];
0045bc4f      }
0045bc4f      
0045bc68      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::resize_internal(this, *(uint32_t*)eax_2);
0045bc20  }

0045bc69                             90 90 90 90 90 90 90                                                           .......

0045bc70  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::grow(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>* this)

0045bc70  {
0045bc70      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>* m_numBuckets = this;
0045bc72      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045bc7e      m_numBuckets = this->m_numBuckets;
0045bc95      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0045bc95      
0045bc9f      if (eax_2 != bucketSizesEnd_1)
0045bca8          eax_2 = &eax_2[1];
0045bc9f      else
0045bc9f      {
0045bca1          eax_2 -= 4;
0045bca1          
0045bca6          if (eax_2 != bucketSizesEnd_1)
0045bca8              eax_2 = &eax_2[1];
0045bc9f      }
0045bc9f      
0045bcb8      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::resize_internal(this, *(uint32_t*)eax_2);
0045bc70  }

0045bcb9                                                                             90 90 90 90 90 90 90                           .......

0045bcc0  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::grow(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>* this)

0045bcc0  {
0045bcc0      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>* m_numBuckets = this;
0045bcc2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045bcce      m_numBuckets = this->m_numBuckets;
0045bce5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0045bce5      
0045bcef      if (eax_2 != bucketSizesEnd_1)
0045bcf8          eax_2 = &eax_2[1];
0045bcef      else
0045bcef      {
0045bcf1          eax_2 -= 4;
0045bcf1          
0045bcf6          if (eax_2 != bucketSizesEnd_1)
0045bcf8              eax_2 = &eax_2[1];
0045bcef      }
0045bcef      
0045bd08      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::resize_internal(this, *(uint32_t*)eax_2);
0045bcc0  }

0045bd09                             90 90 90 90 90 90 90                                                           .......

0045bd10  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>* this, uint32_t arg2)

0045bd10  {
0045bd11      uint32_t ebp = arg2;
0045bd11      
0045bd1b      if (ebp == this->m_numBuckets)
0045bd1b      {
0045bd1e          int32_t eax;
0045bd1e          eax = 0;
0045bd21          return 0;
0045bd1b      }
0045bd1b      
0045bd29      int32_t* i_1 = nullptr;
0045bd29      
0045bd2d      while (this->m_numElements != 0)
0045bd2d      {
0045bd36          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0045bd3c          int32_t* i_2;
0045bd3c          int32_t* m_firstInterestingBucket_2;
0045bd3c          
0045bd3c          if (this->m_firstInterestingBucket == ecx_1)
0045bd3c          {
0045bd52          label_45bd52:
0045bd52              m_firstInterestingBucket_2 = nullptr;
0045bd54              i_2 = nullptr;
0045bd3c          }
0045bd3c          else
0045bd3c          {
0045bd40              while (true)
0045bd40              {
0045bd40                  class HashSetData<unsigned long>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0045bd40                  
0045bd46                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0045bd46                  {
0045bd58                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0045bd5b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0045bd5d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0045bd5d                      break;
0045bd46                  }
0045bd46                  
0045bd4d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0045bd4d                  
0045bd50                  if (&m_firstInterestingBucket[1] == ecx_1)
0045bd50                      goto label_45bd52;
0045bd40              }
0045bd3c          }
0045bd3c          
0045bd5f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0045bd5f          
0045bd63          if (eax_4 == i_2)
0045bd75              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0045bd63          else
0045bd63          {
0045bd6c              void* edx_1;
0045bd6c              
0045bd6c              do
0045bd6c              {
0045bd65                  edx_1 = eax_4;
0045bd67                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0045bd6c              } while (eax_4 != i_2);
0045bd6c              
0045bd70              if (edx_1 != 0)
0045bd7c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0045bd70              else
0045bd75                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0045bd63          }
0045bd63          
0045bd7f          this->m_numElements -= 1;
0045bd82          i_2[1] = i_1;
0045bd8a          i_1 = i_2;
0045bd2d      }
0045bd2d      
0045bd8e      class HashSetData<unsigned long>** m_buckets = this->m_buckets;
0045bd8e      
0045bd96      if (m_buckets != &this->m_aInplaceBuckets)
0045bd99          operator delete[](m_buckets);
0045bd99      
0045bda6      this->m_buckets = nullptr;
0045bda9      this->m_firstInterestingBucket = nullptr;
0045bdac      this->m_numBuckets = 0;
0045bdaf      this->m_numElements = 0;
0045bdb2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
0045bdb9      void* eax_7;
0045bdb9      
0045bdb9      if (i_1 != 0)
0045bdb9      {
0045be3b          int32_t* i;
0045be3b          
0045be3b          do
0045be3b          {
0045bdc0              uint32_t m_numBuckets = this->m_numBuckets;
0045bdc6              i = i_1[1];
0045bdc6              
0045bdcf              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0045bdcf              {
0045bdd1                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0045bdd8                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045bdde                  arg2 = m_numBuckets;
0045bdee                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0045bdee                  
0045bdf8                  if (eax_8 != bucketSizesEnd_1)
0045be01                      eax_8 = &eax_8[1];
0045bdf8                  else
0045bdf8                  {
0045bdfa                      eax_8 -= 4;
0045bdfa                      
0045bdff                      if (eax_8 != bucketSizesEnd_1)
0045be01                          eax_8 = &eax_8[1];
0045bdf8                  }
0045bdf8                  
0045be09                  IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::resize_internal(this, *(uint32_t*)eax_8);
0045bdcf              }
0045bdcf              
0045be12              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
0045be15              class HashSetData<unsigned long>** m_buckets_1 = this->m_buckets;
0045be1b              i_1[1] = m_buckets_1[temp1_1];
0045be1e              m_buckets_1[temp1_1] = i_1;
0045be24              eax_7 = &m_buckets_1[temp1_1];
0045be24              
0045be29              if (eax_7 < this->m_firstInterestingBucket)
0045be2b                  this->m_firstInterestingBucket = eax_7;
0045be2b              
0045be36              this->m_numElements += 1;
0045be39              i_1 = i;
0045be3b          } while (i != 0);
0045bdb9      }
0045bdb9      
0045be40      eax_7 = 1;
0045be43      return 1;
0045bd10  }

0045be46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0045be50  void _STL::__linear_insert(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct SurfaceUsageSummary arg3, struct _STL::less<SurfaceUsageSummary> arg4)

0045be50  {
0045be51      struct SurfaceUsageSummary* esi = arg1;
0045be55      uint32_t Bytes = esi->Bytes;
0045be58      uint32_t Bytes_1 = arg3.Bytes;
0045be5e      uint8_t eax_1;
0045be5e      
0045be5e      if ((Bytes_1 >= Bytes && Bytes_1 == Bytes))
0045be6a          eax_1 = PStringBase<char>::operator<(&arg3.Name, &esi->Name);
0045be6a      
0045be71      class PSRefBufferCharData<char>* m_charbuffer;
0045be71      
0045be71      if ((Bytes_1 >= Bytes && (Bytes_1 != Bytes || eax_1 == 0)))
0045be71      {
0045beaa          m_charbuffer = arg3.Name.m_charbuffer;
0045beb2          class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0045beb5          InterlockedIncrement(&m_charbuffer[-1]);
0045bec7          uint32_t ElementHeight = arg3.ElementHeight;
0045bece          uint32_t ElementWidth = arg3.ElementWidth;
0045bed6          uint32_t SurfaceWidth = arg3.SurfaceWidth;
0045bed9          uint32_t SurfaceHeight = arg3.SurfaceHeight;
0045bedc          _STL::__unguarded_linear_insert(arg2, Bytes_1, arg4);
0045be71      }
0045be71      else
0045be71      {
0045be84          _STL::__copy_backward(esi, arg2, &arg2[1], &arg1, nullptr);
0045be93          SurfaceUsageSummary::operator=(esi, &arg3);
0045be98          m_charbuffer = arg3.Name.m_charbuffer;
0045be71      }
0045be71      
0045bef7      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0045beff          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0045be50  }

0045bf04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0045bf10  void _STL::sort_heap(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct _STL::less<SurfaceUsageSummary> arg3)

0045bf10  {
0045bf34      if ((((char*)arg2 - arg1) / 0x18) > 1)
0045bf34      {
0045bf3b          void* __offset(SurfaceUsageSummary, -0x10) esi_1 = &arg2[0];
0045bf3b          
0045bfa7          do
0045bfa7          {
0045bf48              int32_t edx_3 = *(int32_t*)((char*)ADJ(esi_1) + -0x18);
0045bf58              int32_t eax_4 = *(int32_t*)((char*)ADJ(esi_1) + -0x14);
0045bf5b              int32_t var_2c_1 = eax_4;
0045bf62              InterlockedIncrement((eax_4 - 0x10));
0045bf6a              int32_t var_28_1 = *(int32_t*)((char*)ADJ(esi_1) + -0x10);
0045bf70              int32_t var_24_1 = *(int32_t*)((char*)ADJ(esi_1) + -0xc);
0045bf77              int32_t var_20_1 = *(int32_t*)((char*)ADJ(esi_1) + -8);
0045bf7f              int32_t Bytes = ADJ(esi_1)->Bytes;
0045bf82              _STL::__pop_heap(arg1, ((char*)esi_1 - 8), ((char*)esi_1 - 8), edx_3, arg3, nullptr);
0045bf8b              esi_1 -= 0x18;
0045bfa7          } while ((((0x10 - arg1) + esi_1) / 0x18) > 1);
0045bf34      }
0045bf10  }

0045bfae                                            90 90                                                                ..

0045bfb0  class UIElement* __thiscall UIElementManager::CreateElementRecursiveFromPartialDesc(class UIElementManager* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0045bfb0  {
0045bfbd      void var_1c4;
0045bfbd      ElementDesc::ElementDesc(&var_1c4);
0045bfd4      void* var_1d0 = nullptr;
0045bfdc      int32_t var_1cc = 0;
0045bfe4      int32_t var_1c8 = 0;
0045bfe4      
0045bff6      if (LayoutDesc::InqFullDesc(arg3, &var_1c4, &var_1d0) == 0)
0045bff6      {
0045c006          if ((var_1cc & 0x80000000) == 0x80000000)
0045c006          {
0045c008              void* eax_3 = var_1d0;
0045c008              
0045c00e              if (eax_3 != 0)
0045c014                  operator delete[](((char*)eax_3 - 4));
0045c006          }
0045c006          
0045c020          ElementDesc::~ElementDesc(&var_1c4);
0045c02e          return 0;
0045bff6      }
0045bff6      
0045c040      class UIElement* result = UIElementManager::CreateElementRecursiveFromFullDesc(this, arg2, &var_1c4);
0045c040      
0045c055      if ((var_1cc & 0x80000000) == 0x80000000)
0045c055      {
0045c057          void* eax_8 = var_1d0;
0045c057          
0045c05d          if (eax_8 != 0)
0045c063              operator delete[](((char*)eax_8 - 4));
0045c055      }
0045c055      
0045c06f      ElementDesc::~ElementDesc(&var_1c4);
0045c07d      return result;
0045bfb0  }


0045c080  void __thiscall UIElementManager::RemoveAndDeleteRootElement(class UIElementManager* this, class UIElement* arg2)

0045c080  {
0045c081      class UIElement* esi = arg2;
0045c087      arg2 = esi;
0045c087      
0045c08b      if ((esi != 0 && SmartArray<unsigned long,1>::add_unique(&this->m_deleteQueue.m_data, &arg2) != 0))
0045c08b      {
0045c0a4          uint8_t edx_2 = esi->vtable->SetVisible(0);
0045c0a4          
0045c0b0          if (UIElement::GetShouldOwnObject(esi) != 0)
0045c0b0          {
0045c0b2              int32_t var_8_2 = 0;
0045c0b6              UIElement::SetShouldOwnObject(esi, edx_2);
0045c0b0          }
0045c0b0          
0045c0bb          esi->vtable->SetParent(0);
0045c08b      }
0045c080  }

0045c0c8                          90 90 90 90 90 90 90 90                                                          ........

0045c0d0  void __thiscall UIElementManager::UnRegisterForElementMessage(class UIElementManager* this, class UIListener* arg2, uint32_t arg3, uint32_t arg4)

0045c0d0  {
0045c0da      if (arg2 != 0)
0045c0da      {
0045c0e7          class List<NoticeHandler *>** eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_elementListenerTable, &arg3);
0045c0e7          
0045c0ee          if (eax_1 != 0)
0045c0f9              UIElementManager::UnRegisterForMessageInternal(this, arg2, eax_1, arg4);
0045c0da      }
0045c0d0  }

0045c103           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0045c110  void __thiscall UIElementManager::UnRegisterForGlobalMessage(class UIElementManager* this, class UIListener* arg2, uint32_t arg3)

0045c110  {
0045c116      if (arg2 != 0)
0045c125          UIElementManager::UnRegisterForMessageInternal(this, arg2, &this->m_globalMessageListenerTable, arg3);
0045c110  }

0045c12d                                         90 90 90                                                               ...

0045c130  void __thiscall UIElementManager::UnRegisterForAllMessages(class UIElementManager* this, class UIListener* arg2)

0045c130  {
0045c13c      if (arg2 != 0)
0045c13c      {
0045c144          void** edi;
0045c144          void** var_28_1 = edi;
0045c150          void __return;
0045c150          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_elementListenerTable.m_intrusiveTable, &__return);
0045c155          class HashTableData<unsigned long,DBOCache *>* i_3 = eax->m_currElement;
0045c15a          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0045c15c          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0045c163          class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
0045c163          
0045c167          if (i_3 != 0)
0045c167          {
0045c176              while (true)
0045c176              {
0045c176                  int32_t ecx_3 = (*(int32_t*)((char*)i_3 + 0x6c) + (*(int32_t*)((char*)i_3 + 0x74) << 2));
0045c17c                  void** eax_4;
0045c17c                  void* i_4;
0045c17c                  
0045c17c                  if (*(int32_t*)((char*)i_3 + 0x70) == ecx_3)
0045c17c                  {
0045c192                  label_45c192:
0045c192                      eax_4 = nullptr;
0045c194                      i_4 = nullptr;
0045c17c                  }
0045c17c                  else
0045c17c                  {
0045c180                      while (true)
0045c180                      {
0045c180                          int32_t* eax_2 = *(int32_t*)((char*)i_3 + 0x70);
0045c180                          
0045c186                          if (*(uint32_t*)eax_2 != 0)
0045c186                          {
0045c198                              eax_4 = *(int32_t*)((char*)i_3 + 0x70);
0045c19b                              i_4 = *(uint32_t*)eax_4;
0045c19b                              break;
0045c186                          }
0045c186                          
0045c18d                          *(int32_t*)((char*)i_3 + 0x70) = &eax_2[1];
0045c18d                          
0045c190                          if (&eax_2[1] == ecx_3)
0045c190                              goto label_45c192;
0045c180                      }
0045c17c                  }
0045c17c                  
0045c19f                  edi = eax_4;
0045c19f                  
0045c1a1                  if (i_4 != 0)
0045c1a1                  {
0045c1ae                      while (true)
0045c1ae                      {
0045c1ae                          UIElementManager::UnRegisterForAllMessagesInternal(this, arg2, ((char*)i_4 + 8));
0045c1b3                          i_4 = *(uint32_t*)((char*)i_4 + 4);
0045c1b3                          
0045c1b8                          if (i_4 == 0)
0045c1b8                          {
0045c1ce                              void* i;
0045c1ce                              
0045c1ce                              do
0045c1ce                              {
0045c1c3                                  edi = &edi[1];
0045c1c3                                  
0045c1c8                                  if (edi == (*(int32_t*)((char*)i_3 + 0x6c) + (*(int32_t*)((char*)i_3 + 0x74) << 2)))
0045c1c8                                      goto label_45c1d6;
0045c1c8                                  
0045c1ca                                  i = *(uint32_t*)edi;
0045c1ce                              } while (i == 0);
0045c1ce                              
0045c1d0                              i_4 = i;
0045c1d0                              
0045c1d4                              if (i_4 == 0)
0045c1d4                                  break;
0045c1b8                          }
0045c1ae                      }
0045c1ae                      
0045c1d6                  label_45c1d6:
0045c1d6                      m_currBucket = m_currBucket_1;
0045c1a1                  }
0045c1a1                  
0045c1da                  i_3 = i_3->m_hashNext;
0045c1da                  
0045c1df                  if (i_3 == 0)
0045c1df                  {
0045c1ff                      class HashTableData<unsigned long,DBOCache *>* i_1;
0045c1ff                      
0045c1ff                      do
0045c1ff                      {
0045c1f0                          m_currBucket = &m_currBucket[1];
0045c1f5                          m_currBucket_1 = m_currBucket;
0045c1f5                          
0045c1f9                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0045c1f9                              goto label_45c21d;
0045c1f9                          
0045c1fb                          i_1 = *(uint32_t*)m_currBucket;
0045c1ff                      } while (i_1 == 0);
0045c1ff                      
0045c201                      i_3 = i_1;
0045c201                      
0045c205                      if (i_3 == 0)
0045c205                          break;
0045c1df                  }
0045c176              }
0045c167          }
0045c167          
0045c21d      label_45c21d:
0045c21d          void* ecx_8 = &this->m_globalMessageListenerTable.m_intrusiveTable.m_buckets[this->m_globalMessageListenerTable.m_intrusiveTable.m_numBuckets];
0045c222          int32_t* m_firstInterestingBucket_1;
0045c222          void* i_5;
0045c222          
0045c222          if (this->m_globalMessageListenerTable.m_intrusiveTable.m_firstInterestingBucket == ecx_8)
0045c222          {
0045c23c          label_45c23c:
0045c23c              m_firstInterestingBucket_1 = nullptr;
0045c23e              i_5 = nullptr;
0045c222          }
0045c222          else
0045c222          {
0045c224              while (true)
0045c224              {
0045c224                  class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_firstInterestingBucket = this->m_globalMessageListenerTable.m_intrusiveTable.m_firstInterestingBucket;
0045c224                  
0045c22d                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0045c22d                  {
0045c242                      m_firstInterestingBucket_1 = this->m_globalMessageListenerTable.m_intrusiveTable.m_firstInterestingBucket;
0045c248                      i_5 = *(uint32_t*)m_firstInterestingBucket_1;
0045c248                      break;
0045c22d                  }
0045c22d                  
0045c234                  this->m_globalMessageListenerTable.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
0045c234                  
0045c23a                  if (&m_firstInterestingBucket[1] == ecx_8)
0045c23a                      goto label_45c23c;
0045c224              }
0045c222          }
0045c222          
0045c24c          int32_t* m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0045c24c          
0045c24e          if (i_5 != 0)
0045c24e          {
0045c25b              while (true)
0045c25b              {
0045c25b                  UIElementManager::UnRegisterForAllMessagesInternal(this, arg2, ((char*)i_5 + 8));
0045c260                  i_5 = *(uint32_t*)((char*)i_5 + 4);
0045c260                  
0045c265                  if (i_5 == 0)
0045c265                  {
0045c281                      void* i_2;
0045c281                      
0045c281                      do
0045c281                      {
0045c276                          m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
0045c276                          
0045c27b                          if (m_firstInterestingBucket_2 == &this->m_globalMessageListenerTable.m_intrusiveTable.m_buckets[this->m_globalMessageListenerTable.m_intrusiveTable.m_numBuckets])
0045c290                              return;
0045c290                          
0045c27d                          i_2 = *(uint32_t*)m_firstInterestingBucket_2;
0045c281                      } while (i_2 == 0);
0045c281                      
0045c283                      i_5 = i_2;
0045c283                      
0045c287                      if (i_5 == 0)
0045c287                          break;
0045c265                  }
0045c25b              }
0045c24e          }
0045c13c      }
0045c130  }

0045c293                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0045c2a0  void __fastcall UIElementManager::MouseLeaveEvent(class UIElementManager* this)

0045c2a0  {
0045c2a2      this->m_bMouseHasLeftTheWindow = 1;
0045c2a9      UIElementManager::SwitchMouseOver(this, nullptr);
0045c2a0  }

0045c2af                                               90                                                                 .

0045c2b0  void __thiscall UIElementManager::UpdateMouseOver(class UIElementManager* this, int32_t arg2, int32_t arg3)

0045c2b0  {
0045c2b0      class UIElementManager* this_1 = this;
0045c2b2      class UIElementManager* this_2 = this;
0045c2b4      this = this_2->m_bMouseHasLeftTheWindow;
0045c2ba      class UIElementManager* this_3 = nullptr;
0045c2ba      
0045c2be      if (this == 0)
0045c2be      {
0045c2c8          this_1 = nullptr;
0045c2da          MouseHitTester<MouseOverCriteria>::Recurse(this_2->m_pRootElement, arg2, arg3, &this_1);
0045c2df          this_3 = this_1;
0045c2be      }
0045c2be      
0045c2e9      UIElementManager::SwitchMouseOver(this_2, this_3);
0045c2b0  }

0045c2f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0045c300  void __thiscall UIElementManager::KeyPressEvent(class UIElementManager* this, uint32_t arg2, float arg3)

0045c300  {
0045c306      class UIElementManager* this_1 = this;
0045c308      this = SceneTool::m_pDebugConsole->m_IsInputActive;
0045c308      
0045c30d      if (this == 0)
0045c30d      {
0045c30f          class UIElement* ecx = this_1->m_focusElement;
0045c30f          
0045c31c          if (ecx != 0)
0045c31c          {
0045c330          label_45c330:
0045c330              
0045c338              if (ecx->vtable->KeyDown(arg2, arg3) == 0)
0045c33f                  UIElementManager::BroadcastGlobalMessage(this_1, 1, arg2);
0045c31c          }
0045c31c          else
0045c31c          {
0045c31e              ecx = this_1->m_activeElement;
0045c31e              
0045c326              if (ecx != 0)
0045c326                  goto label_45c330;
0045c326              
0045c33f              UIElementManager::BroadcastGlobalMessage(this_1, 1, arg2);
0045c31c          }
0045c31c          
0045c347          UIElementManager::DoVisibilityToggleAction(this_1, arg2);
0045c30d      }
0045c300  }

0045c351                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0045c360  void __fastcall UIElementManager::ResetTooltip(class UIElementManager* this)

0045c360  {
0045c363      class UIElement* m_pTooltipElement = this->m_pTooltipElement;
0045c363      
0045c36b      if (m_pTooltipElement != 0)
0045c36b      {
0045c36d          UIElement::AddToDeleteQueue(m_pTooltipElement);
0045c372          this->m_pTooltipElement = nullptr;
0045c36b      }
0045c36b      
0045c384      if (this->m_bHoverStarted != 0)
0045c384      {
0045c386          class UIElement* m_pElementLastEntered = this->m_pElementLastEntered;
0045c38e          this->m_bHoverStarted = 0;
0045c38e          
0045c395          if (m_pElementLastEntered != 0)
0045c397              m_pElementLastEntered->vtable->MouseUnhover();
0045c384      }
0045c384      
0045c39c      class UIElement* m_pTooltipElement_1 = this->m_pTooltipElement;
0045c39c      
0045c3a4      if (m_pTooltipElement_1 != 0)
0045c3a4      {
0045c3a6          UIElement::AddToDeleteQueue(m_pTooltipElement_1);
0045c3ab          this->m_pTooltipElement = nullptr;
0045c3a4      }
0045c3a4      
0045c3b8      /* tailcall */
0045c3b8      return UIElementManager::CheckTooltip(this);
0045c360  }

0045c3bd                                                                                         90 90 90                               ...

0045c3c0  void __thiscall UIElementManager::RegisterActivatable(class UIElementManager* this, class UIElement* arg2)

0045c3c0  {
0045c3c7      uint32_t m_num = this->m_activatableElements.m_num;
0045c3ca      int32_t eax = 0;
0045c3ca      
0045c3d3      if (m_num > 0)
0045c3d3      {
0045c3d5          int32_t* m_data = this->m_activatableElements.m_data;
0045c3d5          
0045c3e2          do
0045c3e2          {
0045c3da              if (*(uint32_t*)m_data == arg2)
0045c3da              {
0045c3e9                  if (eax != 0xffffffff)
0045c3e9                  {
0045c3eb                      uint32_t m_num_1 = this->m_activatableElements.m_num;
0045c3eb                      
0045c3f0                      if (eax < m_num_1)
0045c3f0                      {
0045c3f2                          class UIElement** m_data_1 = this->m_activatableElements.m_data;
0045c3c1                          this->m_activatableElements.m_num = (m_num_1 - 1);
0045c3f9                          void* edi_1 = &m_data_1[eax];
0045c3fc                          void* ecx_1 = &m_data_1[(m_num_1 - 1)];
0045c3fc                          
0045c401                          if (edi_1 < ecx_1)
0045c40d                              __builtin_memcpy(edi_1, ((char*)edi_1 + 4), ((((((char*)ecx_1 - edi_1) - 1) >> 2) + 1) << 2));
0045c40d                          
0045c3c1                          this->m_activatableElements.m_data[this->m_activatableElements.m_num] = 0;
0045c3f0                      }
0045c3e9                  }
0045c3e9                  
0045c3e9                  break;
0045c3da              }
0045c3da              
0045c3dc              eax += 1;
0045c3dd              m_data = &m_data[1];
0045c3e2          } while (eax < m_num);
0045c3d3      }
0045c3d3      
0045c423      int32_t eax_3 = (this->m_activatableElements.m_sizeAndDeallocate & 0x7fffffff);
0045c42a      uint8_t eax_6;
0045c42a      
0045c42a      if (this->m_activatableElements.m_num >= eax_3)
0045c438          eax_6 = SmartArray<unsigned long,1>::grow(&this->m_activatableElements, SmartArray<unsigned long,1>::get_new_size(&this->m_activatableElements, (eax_3 + 1)));
0045c438      
0045c43f      if ((this->m_activatableElements.m_num < eax_3 || eax_6 != 0))
0045c43f      {
0045c3c1          this->m_activatableElements.m_data[this->m_activatableElements.m_num] = arg2;
0045c3c1          this->m_activatableElements.m_num += 1;
0045c43f      }
0045c3c0  }

0045c451                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0045c460  void __thiscall UIElementManager::ActivationAlert(class UIElementManager* this, class UIElement* arg2, uint8_t arg3)

0045c460  {
0045c46a      if (arg2 != 0)
0045c46a      {
0045c476          class UIElement* m_activeElement = this->m_activeElement;
0045c476          
0045c47c          if (arg3 == 0)
0045c47c          {
0045c4ec              if (m_activeElement == arg2)
0045c4ec              {
0045c4ee                  class UIElement* m_focusElement = this->m_focusElement;
0045c4f6                  this->m_activeElement = nullptr;
0045c4f6                  
0045c500                  if (m_focusElement != 0)
0045c500                  {
0045c50b                      UIElementManager::BroadcastElementMessage(this, m_focusElement, 0x2f, 0, 0);
0045c510                      this->m_focusElement->vtable->UnregisterInputMaps();
0045c51e                      this->m_focusElement = nullptr;
0045c500                  }
0045c4ec              }
0045c47c          }
0045c47c          else if (arg2 != m_activeElement)
0045c480          {
0045c486              class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045c486              
0045c48e              if (ICIDM::s_cidm_1 != 0)
0045c490                  ICIDM::s_cidm_1->vtable->OnUIElementActivationChanging();
0045c490              
0045c495              class UIElement* m_activeElement_1 = this->m_activeElement;
0045c49d              this->m_activeElement = arg2;
0045c49d              
0045c4a3              if (m_activeElement_1 != 0)
0045c4a5                  m_activeElement_1->vtable->Deactivate();
0045c4a5              
0045c4ad              class UIElement* m_activeElement_2 = this->m_activeElement;
0045c4ad              
0045c4b5              if (m_activeElement_2 != 0)
0045c4b5              {
0045c4b7                  m_activeElement_2->vtable->RegisterInputMaps(0x7d0);
0045c4b7                  
0045c4d4                  if (this->m_activeElement->vtable->GetActivatable() == 0)
0045c4e0                      UIElement::SetAttribute_Bool(this->m_activeElement, 0x33, 1);
0045c4b5              }
0045c480          }
0045c46a      }
0045c460  }

0045c52d                                         90 90 90                                                               ...

0045c530  uint8_t __fastcall UIElementManager::RefreshEvent(class UIElementManager* this)

0045c530  {
0045c537      UIElementManager::BroadcastGlobalMessage(this, 5, 0);
0045c537      
0045c544      if (this->m_pRootElement == 0)
0045c544      {
0045c5bc          class UIElement* eax;
0045c5bc          eax = 0;
0045c5bf          return 0;
0045c544      }
0045c544      
0045c546      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0045c54f      uint32_t edi = 0x320;
0045c554      uint32_t eax_1 = 0x258;
0045c554      
0045c559      if (RenderDevice::render_device_1 != 0)
0045c559      {
0045c566          edi = RenderDevice::GetDisplayWidth(RenderDevice::render_device_1);
0045c568          eax_1 = RenderDevice::GetDisplayHeight(RenderDevice::render_device);
0045c559      }
0045c559      
0045c56d      this->m_pRootElement->vtable->ResizeTo(edi, eax_1);
0045c582      UIRegion::ForceUpdate(this->m_pRootElement, 7);
0045c58c      uint32_t id = this->m_lastCursorDID.id;
0045c594      this->m_lastCursorDID.id = INVALID_DID.id;
0045c59a      UIElementManager::DrawDirtyRegions(this);
0045c5b2      UIElementManager::SetCursor(this, id, this->m_lastCursorHotX, this->m_lastCursorHotY, 0);
0045c5b8      int32_t eax_4;
0045c5b8      eax_4 = 1;
0045c5bb      return 1;
0045c530  }


0045c5c0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::add(class IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>* this, class HashSetData<unsigned long>* arg2)

0045c5c0  {
0045c5c8      uint32_t m_hashKey = arg2->m_hashKey;
0045c5cb      uint32_t m_numBuckets = this->m_numBuckets;
0045c5cb      
0045c5de      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0045c5de      {
0045c5e2          if (*(uint32_t*)i == m_hashKey)
0045c5e2          {
0045c62e              if (i == 0)
0045c62e                  break;
0045c62e              
0045c632              i = 0;
0045c635              return 0;
0045c5e2          }
0045c5de      }
0045c5de      
0045c5f4      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0045c5f8          IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::grow(this);
0045c5f8      
0045c601      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0045c604      class HashSetData<unsigned long>** m_buckets = this->m_buckets;
0045c60a      arg2->m_hashNext = m_buckets[temp1_1];
0045c60d      m_buckets[temp1_1] = arg2;
0045c613      class HashSetData<unsigned long>** eax_4 = &m_buckets[temp1_1];
0045c613      
0045c618      if (eax_4 < this->m_firstInterestingBucket)
0045c61a          this->m_firstInterestingBucket = eax_4;
0045c61a      
0045c622      this->m_numElements += 1;
0045c626      uint32_t eax_6;
0045c626      eax_6 = 1;
0045c629      return 1;
0045c5c0  }

0045c638                                                                          90 90 90 90 90 90 90 90                          ........

0045c640  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>* this, uint32_t arg2)

0045c640  {
0045c641      uint32_t ebp = arg2;
0045c641      
0045c64b      if (ebp == this->m_numBuckets)
0045c64b      {
0045c64e          int32_t eax;
0045c64e          eax = 0;
0045c651          return 0;
0045c64b      }
0045c64b      
0045c659      int32_t* i_1 = nullptr;
0045c659      
0045c65d      while (this->m_numElements != 0)
0045c65d      {
0045c666          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0045c66c          int32_t* i_2;
0045c66c          int32_t* m_firstInterestingBucket_2;
0045c66c          
0045c66c          if (this->m_firstInterestingBucket == ecx_1)
0045c66c          {
0045c682          label_45c682:
0045c682              m_firstInterestingBucket_2 = nullptr;
0045c684              i_2 = nullptr;
0045c66c          }
0045c66c          else
0045c66c          {
0045c670              while (true)
0045c670              {
0045c670                  class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0045c670                  
0045c676                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0045c676                  {
0045c688                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0045c68b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0045c68d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0045c68d                      break;
0045c676                  }
0045c676                  
0045c67d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0045c67d                  
0045c680                  if (&m_firstInterestingBucket[1] == ecx_1)
0045c680                      goto label_45c682;
0045c670              }
0045c66c          }
0045c66c          
0045c68f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0045c68f          
0045c693          if (eax_4 == i_2)
0045c6a5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0045c693          else
0045c693          {
0045c69c              void* edx_1;
0045c69c              
0045c69c              do
0045c69c              {
0045c695                  edx_1 = eax_4;
0045c697                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0045c69c              } while (eax_4 != i_2);
0045c69c              
0045c6a0              if (edx_1 != 0)
0045c6ac                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0045c6a0              else
0045c6a5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0045c693          }
0045c693          
0045c6af          this->m_numElements -= 1;
0045c6b2          i_2[1] = i_1;
0045c6ba          i_1 = i_2;
0045c65d      }
0045c65d      
0045c6be      class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_buckets = this->m_buckets;
0045c6be      
0045c6c6      if (m_buckets != &this->m_aInplaceBuckets)
0045c6c9          operator delete[](m_buckets);
0045c6c9      
0045c6d6      this->m_buckets = nullptr;
0045c6d9      this->m_firstInterestingBucket = nullptr;
0045c6dc      this->m_numBuckets = 0;
0045c6df      this->m_numElements = 0;
0045c6e2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
0045c6e9      void* eax_7;
0045c6e9      
0045c6e9      if (i_1 != 0)
0045c6e9      {
0045c76b          int32_t* i;
0045c76b          
0045c76b          do
0045c76b          {
0045c6f0              uint32_t m_numBuckets = this->m_numBuckets;
0045c6f6              i = i_1[1];
0045c6f6              
0045c6ff              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0045c6ff              {
0045c701                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0045c708                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045c70e                  arg2 = m_numBuckets;
0045c71e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0045c71e                  
0045c728                  if (eax_8 != bucketSizesEnd_1)
0045c731                      eax_8 = &eax_8[1];
0045c728                  else
0045c728                  {
0045c72a                      eax_8 -= 4;
0045c72a                      
0045c72f                      if (eax_8 != bucketSizesEnd_1)
0045c731                          eax_8 = &eax_8[1];
0045c728                  }
0045c728                  
0045c739                  IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::resize_internal(this, *(uint32_t*)eax_8);
0045c6ff              }
0045c6ff              
0045c742              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
0045c745              class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_buckets_1 = this->m_buckets;
0045c74b              i_1[1] = m_buckets_1[temp1_1];
0045c74e              m_buckets_1[temp1_1] = i_1;
0045c754              eax_7 = &m_buckets_1[temp1_1];
0045c754              
0045c759              if (eax_7 < this->m_firstInterestingBucket)
0045c75b                  this->m_firstInterestingBucket = eax_7;
0045c75b              
0045c766              this->m_numElements += 1;
0045c769              i_1 = i;
0045c76b          } while (i != 0);
0045c6e9      }
0045c6e9      
0045c770      eax_7 = 1;
0045c773      return 1;
0045c640  }

0045c776                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045c780  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>* this, uint32_t arg2)

0045c780  {
0045c781      uint32_t ebp = arg2;
0045c781      
0045c78b      if (ebp == this->m_numBuckets)
0045c78b      {
0045c78e          int32_t eax;
0045c78e          eax = 0;
0045c791          return 0;
0045c78b      }
0045c78b      
0045c799      int32_t* i_1 = nullptr;
0045c799      
0045c79d      while (this->m_numElements != 0)
0045c79d      {
0045c7a6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0045c7ac          int32_t* i_2;
0045c7ac          int32_t* m_firstInterestingBucket_2;
0045c7ac          
0045c7ac          if (this->m_firstInterestingBucket == ecx_1)
0045c7ac          {
0045c7c2          label_45c7c2:
0045c7c2              m_firstInterestingBucket_2 = nullptr;
0045c7c4              i_2 = nullptr;
0045c7ac          }
0045c7ac          else
0045c7ac          {
0045c7b0              while (true)
0045c7b0              {
0045c7b0                  class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0045c7b0                  
0045c7b6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0045c7b6                  {
0045c7c8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0045c7cb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0045c7cd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0045c7cd                      break;
0045c7b6                  }
0045c7b6                  
0045c7bd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0045c7bd                  
0045c7c0                  if (&m_firstInterestingBucket[1] == ecx_1)
0045c7c0                      goto label_45c7c2;
0045c7b0              }
0045c7ac          }
0045c7ac          
0045c7cf          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0045c7cf          
0045c7d3          if (eax_4 == i_2)
0045c7e5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0045c7d3          else
0045c7d3          {
0045c7dc              void* edx_1;
0045c7dc              
0045c7dc              do
0045c7dc              {
0045c7d5                  edx_1 = eax_4;
0045c7d7                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0045c7dc              } while (eax_4 != i_2);
0045c7dc              
0045c7e0              if (edx_1 != 0)
0045c7ec                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0045c7e0              else
0045c7e5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0045c7d3          }
0045c7d3          
0045c7ef          this->m_numElements -= 1;
0045c7f2          i_2[1] = i_1;
0045c7fa          i_1 = i_2;
0045c79d      }
0045c79d      
0045c7fe      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_buckets = this->m_buckets;
0045c7fe      
0045c806      if (m_buckets != &this->m_aInplaceBuckets)
0045c809          operator delete[](m_buckets);
0045c809      
0045c816      this->m_buckets = nullptr;
0045c819      this->m_firstInterestingBucket = nullptr;
0045c81c      this->m_numBuckets = 0;
0045c81f      this->m_numElements = 0;
0045c822      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
0045c829      void* eax_7;
0045c829      
0045c829      if (i_1 != 0)
0045c829      {
0045c8ab          int32_t* i;
0045c8ab          
0045c8ab          do
0045c8ab          {
0045c830              uint32_t m_numBuckets = this->m_numBuckets;
0045c836              i = i_1[1];
0045c836              
0045c83f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0045c83f              {
0045c841                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0045c848                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045c84e                  arg2 = m_numBuckets;
0045c85e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0045c85e                  
0045c868                  if (eax_8 != bucketSizesEnd_1)
0045c871                      eax_8 = &eax_8[1];
0045c868                  else
0045c868                  {
0045c86a                      eax_8 -= 4;
0045c86a                      
0045c86f                      if (eax_8 != bucketSizesEnd_1)
0045c871                          eax_8 = &eax_8[1];
0045c868                  }
0045c868                  
0045c879                  IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::resize_internal(this, *(uint32_t*)eax_8);
0045c83f              }
0045c83f              
0045c882              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
0045c885              class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_buckets_1 = this->m_buckets;
0045c88b              i_1[1] = m_buckets_1[temp1_1];
0045c88e              m_buckets_1[temp1_1] = i_1;
0045c894              eax_7 = &m_buckets_1[temp1_1];
0045c894              
0045c899              if (eax_7 < this->m_firstInterestingBucket)
0045c89b                  this->m_firstInterestingBucket = eax_7;
0045c89b              
0045c8a6              this->m_numElements += 1;
0045c8a9              i_1 = i;
0045c8ab          } while (i != 0);
0045c829      }
0045c829      
0045c8b0      eax_7 = 1;
0045c8b3      return 1;
0045c780  }

0045c8b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045c8c0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>* this, uint32_t arg2)

0045c8c0  {
0045c8c1      uint32_t ebp = arg2;
0045c8c1      
0045c8cb      if (ebp == this->m_numBuckets)
0045c8cb      {
0045c8ce          int32_t eax;
0045c8ce          eax = 0;
0045c8d1          return 0;
0045c8cb      }
0045c8cb      
0045c8d9      int32_t* i_1 = nullptr;
0045c8d9      
0045c8dd      while (this->m_numElements != 0)
0045c8dd      {
0045c8e6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0045c8ec          int32_t* i_2;
0045c8ec          int32_t* m_firstInterestingBucket_2;
0045c8ec          
0045c8ec          if (this->m_firstInterestingBucket == ecx_1)
0045c8ec          {
0045c902          label_45c902:
0045c902              m_firstInterestingBucket_2 = nullptr;
0045c904              i_2 = nullptr;
0045c8ec          }
0045c8ec          else
0045c8ec          {
0045c8f0              while (true)
0045c8f0              {
0045c8f0                  class HashTableData<unsigned long,SmartArray<UIElement *,1> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0045c8f0                  
0045c8f6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0045c8f6                  {
0045c908                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0045c90b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0045c90d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0045c90d                      break;
0045c8f6                  }
0045c8f6                  
0045c8fd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0045c8fd                  
0045c900                  if (&m_firstInterestingBucket[1] == ecx_1)
0045c900                      goto label_45c902;
0045c8f0              }
0045c8ec          }
0045c8ec          
0045c90f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0045c90f          
0045c913          if (eax_4 == i_2)
0045c925              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0045c913          else
0045c913          {
0045c91c              void* edx_1;
0045c91c              
0045c91c              do
0045c91c              {
0045c915                  edx_1 = eax_4;
0045c917                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0045c91c              } while (eax_4 != i_2);
0045c91c              
0045c920              if (edx_1 != 0)
0045c92c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0045c920              else
0045c925                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0045c913          }
0045c913          
0045c92f          this->m_numElements -= 1;
0045c932          i_2[1] = i_1;
0045c93a          i_1 = i_2;
0045c8dd      }
0045c8dd      
0045c93e      class HashTableData<unsigned long,SmartArray<UIElement *,1> >** m_buckets = this->m_buckets;
0045c93e      
0045c946      if (m_buckets != &this->m_aInplaceBuckets)
0045c949          operator delete[](m_buckets);
0045c949      
0045c956      this->m_buckets = nullptr;
0045c959      this->m_firstInterestingBucket = nullptr;
0045c95c      this->m_numBuckets = 0;
0045c95f      this->m_numElements = 0;
0045c962      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
0045c969      void* eax_7;
0045c969      
0045c969      if (i_1 != 0)
0045c969      {
0045c9eb          int32_t* i;
0045c9eb          
0045c9eb          do
0045c9eb          {
0045c970              uint32_t m_numBuckets = this->m_numBuckets;
0045c976              i = i_1[1];
0045c976              
0045c97f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0045c97f              {
0045c981                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0045c988                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045c98e                  arg2 = m_numBuckets;
0045c99e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0045c99e                  
0045c9a8                  if (eax_8 != bucketSizesEnd_1)
0045c9b1                      eax_8 = &eax_8[1];
0045c9a8                  else
0045c9a8                  {
0045c9aa                      eax_8 -= 4;
0045c9aa                      
0045c9af                      if (eax_8 != bucketSizesEnd_1)
0045c9b1                          eax_8 = &eax_8[1];
0045c9a8                  }
0045c9a8                  
0045c9b9                  IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::resize_internal(this, *(uint32_t*)eax_8);
0045c97f              }
0045c97f              
0045c9c2              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
0045c9c5              class HashTableData<unsigned long,SmartArray<UIElement *,1> >** m_buckets_1 = this->m_buckets;
0045c9cb              i_1[1] = m_buckets_1[temp1_1];
0045c9ce              m_buckets_1[temp1_1] = i_1;
0045c9d4              eax_7 = &m_buckets_1[temp1_1];
0045c9d4              
0045c9d9              if (eax_7 < this->m_firstInterestingBucket)
0045c9db                  this->m_firstInterestingBucket = eax_7;
0045c9db              
0045c9e6              this->m_numElements += 1;
0045c9e9              i_1 = i;
0045c9eb          } while (i != 0);
0045c969      }
0045c969      
0045c9f0      eax_7 = 1;
0045c9f3      return 1;
0045c8c0  }

0045c9f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045ca00  void _STL::__insertion_sort(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct _STL::less<SurfaceUsageSummary> arg3)

0045ca00  {
0045ca0e      if (arg1 != arg2)
0045ca0e      {
0045ca15          for (void* __offset(SurfaceUsageSummary, 0x18) i = &arg1[1]; i != arg2; i += 0x18)
0045ca15          {
0045ca1b              int32_t ecx_1 = *(int32_t*)((char*)ADJ(i) + 0x18);
0045ca25              int32_t eax_2 = *(int32_t*)((char*)ADJ(i) + 0x1c);
0045ca28              int32_t var_28_1 = eax_2;
0045ca2f              InterlockedIncrement((eax_2 - 0x10));
0045ca38              int32_t var_24_1 = *(int32_t*)((char*)ADJ(i) + 0x20);
0045ca3e              int32_t var_20_1 = *(int32_t*)((char*)ADJ(i) + 0x24);
0045ca44              int32_t var_1c_1 = *(int32_t*)((char*)ADJ(i) + 0x28);
0045ca4c              int32_t var_18_1 = *(int32_t*)((char*)ADJ(i) + 0x2c);
0045ca4f              _STL::__linear_insert(arg1, i, ecx_1, arg3);
0045ca15          }
0045ca0e      }
0045ca00  }

0045ca63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0045ca70  void _STL::__partial_sort(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct SurfaceUsageSummary* arg3, struct SurfaceUsageSummary* arg4, struct _STL::less<SurfaceUsageSummary> arg5)

0045ca70  {
0045ca75      struct SurfaceUsageSummary* ebx = arg2;
0045ca87      _STL::__make_heap(arg1, ebx, arg5, nullptr, nullptr);
0045ca87      
0045ca95      if (ebx < arg3)
0045ca95      {
0045caa9          class PStringBase<char>* edi_1 = &ebx->Name;
0045caac          arg3 = (((((char*)arg3 - ebx) - 1) / 0x18) + 1);
0045caac          
0045cab0          while (true)
0045cab0          {
0045cab0              uint32_t Bytes_1 = ADJ(edi_1)->Bytes;
0045cab3              uint32_t Bytes = arg1->Bytes;
0045cab3              
0045cab8              if (Bytes_1 < Bytes)
0045cab8              {
0045cb09              label_45cb09:
0045cb09                  class PSRefBufferCharData<char>* m_charbuffer_1 = edi_1->m_charbuffer;
0045cb0b                  class PSRefBufferCharData<char>* m_charbuffer_3 = m_charbuffer_1;
0045cb12                  InterlockedIncrement(&m_charbuffer_1[-1]);
0045cb1b                  uint32_t var_28_1 = *(int32_t*)((char*)edi_1 + 4);
0045cb21                  uint32_t var_24_1 = *(int32_t*)((char*)edi_1 + 8);
0045cb2b                  uint32_t var_20_1 = *(int32_t*)((char*)edi_1 + 0xc);
0045cb33                  uint32_t var_1c_1 = *(int32_t*)((char*)edi_1 + 0x10);
0045cb36                  _STL::__pop_heap(arg1, ebx, &edi_1[-1], Bytes_1, arg5, nullptr);
0045cab8              }
0045cab8              else if (Bytes_1 == Bytes)
0045caba              {
0045cac0                  class PSRefBufferCharData<char>* m_charbuffer_2 = arg1->Name.m_charbuffer;
0045cac3                  class PSRefBufferCharData<char>* m_charbuffer = edi_1->m_charbuffer;
0045cac5                  int32_t eax_2;
0045cac5                  
0045cac5                  while (true)
0045cac5                  {
0045cac5                      ebx = m_charbuffer->m_data[0];
0045cac7                      int32_t ecx_2;
0045cac7                      ecx_2 = ebx;
0045cac9                      char temp1_1 = m_charbuffer_2->m_data[0];
0045cac9                      bool c_1 = ebx < temp1_1;
0045cac9                      
0045cacb                      if (ebx == temp1_1)
0045cacb                      {
0045cacf                          if (ecx_2 == 0)
0045cacf                          {
0045cae5                              eax_2 = 0;
0045cae7                              break;
0045cacf                          }
0045cacf                          
0045cad1                          ebx = m_charbuffer->m_data[1];
0045cad4                          ecx_2 = ebx;
0045cad6                          char temp4_1 = m_charbuffer_2->m_data[1];
0045cad6                          c_1 = ebx < temp4_1;
0045cad6                          
0045cad9                          if (ebx == temp4_1)
0045cad9                          {
0045cadb                              m_charbuffer = &m_charbuffer->m_data[2];
0045cade                              m_charbuffer_2 = &m_charbuffer_2->m_data[2];
0045cade                              
0045cae3                              if (ecx_2 != 0)
0045cae3                                  continue;
0045cae3                              
0045cae5                              eax_2 = 0;
0045cae7                              break;
0045cad9                          }
0045cacb                      }
0045cacb                      
0045cae9                      bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
0045caeb                      eax_2 = (((char*)m_charbuffer - m_charbuffer) + 1);
0045caeb                      break;
0045cac5                  }
0045cac5                  
0045caee                  ebx = arg2;
0045caf4                  eax_2 = eax_2 < 0;
0045caf4                  
0045caf9                  if (eax_2 != 0)
0045caf9                      goto label_45cb09;
0045caba              }
0045caba              
0045cb42              edi_1 = &edi_1[6];
0045cb45              bool cond:1_1 = arg3 != 1;
0045cb46              arg3 -= 1;
0045cb46              
0045cb4a              if (!(cond:1_1))
0045cb4a                  break;
0045cab0          }
0045ca95      }
0045ca95      
0045cb57      _STL::sort_heap(arg1, ebx, arg5);
0045ca70  }

0045cb64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0045cb70  class UIElement* __thiscall UIElementManager::CreateElement(class UIElementManager* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0045cb70  {
0045cb7b      class UIElement* result = UIElementManager::CreateElementRecursiveFromPartialDesc(this, arg2, arg3);
0045cb7b      
0045cb84      if (result != 0)
0045cb86          result->vtable->Initialize();
0045cb86      
0045cb93      return result;
0045cb70  }

0045cb96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045cba0  void UIElementManager::HandlePreferenceCallback(class PStringBase<char> const* arg1)

0045cba0  {
0045cba1      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0045cba1      
0045cba9      if (UIElementManager::s_pInstance_1 != 0)
0045cba9      {
0045cbc8          if (_stricmp(arg1->m_charbuffer, Misc_TooltipDelay.m_charbuffer) == 0)
0045cbcf              /* tailcall */
0045cbcf              return UIElementManager::CheckTooltip(UIElementManager::s_pInstance_1);
0045cbcf          
0045cbe7          if (_stricmp(arg1->m_charbuffer, Misc_TooltipEnable.m_charbuffer) == 0)
0045cbec              /* tailcall */
0045cbec              return UIElementManager::ResetTooltip(UIElementManager::s_pInstance_1);
0045cba9      }
0045cba0  }

0045cbf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0045cc00  void __thiscall UIElementManager::ActionHandler(class UIElementManager* this, class InputEvent const* arg2)

0045cc00  {
0045cc05      class UIElementManager* this_1 = this;
0045cc07      this = arg2->m_fStart;
0045cc07      
0045cc0c      if (this != 0)
0045cc0c      {
0045cc17          UIElementManager::KeyPressEvent(this_1, arg2->m_InputAction, arg2->m_InputExtent);
0045cc1d          return;
0045cc0c      }
0045cc0c      
0045cc21      int32_t m_InputAction = arg2->m_InputAction;
0045cc28      this = SceneTool::m_pDebugConsole->m_IsInputActive;
0045cc28      
0045cc2d      if (this == 0)
0045cc2d      {
0045cc2f          class UIElement* ecx_2 = this_1->m_focusElement;
0045cc2f          
0045cc37          if (ecx_2 != 0)
0045cc37          {
0045cc46          label_45cc46:
0045cc46              
0045cc4e              if (ecx_2->vtable->KeyUp(m_InputAction) == 0)
0045cc55                  UIElementManager::BroadcastGlobalMessage(this_1, 2, m_InputAction);
0045cc37          }
0045cc37          else
0045cc37          {
0045cc39              ecx_2 = this_1->m_activeElement;
0045cc39              
0045cc41              if (ecx_2 != 0)
0045cc41                  goto label_45cc46;
0045cc41              
0045cc55              UIElementManager::BroadcastGlobalMessage(this_1, 2, m_InputAction);
0045cc37          }
0045cc2d      }
0045cc00  }

0045cc5f                                                                                               90                                 .

0045cc60  void __fastcall UIElementManager::DoMouseUpdate(class UIElementManager* this)

0045cc60  {
0045cc60      class UIElementManager* this_1 = this;
0045cc65      this->m_bPerformMouseHitTest = 0;
0045cc6c      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045cc6c      
0045cc74      if (ICIDM::s_cidm_1 != 0)
0045cc74      {
0045cc7b          int32_t eax_2 = ICIDM::s_cidm_1->vtable->GetMouseX();
0045cc84          int32_t eax_3 = ICIDM::s_cidm_1->vtable->GetMouseY();
0045cc8d          class UIElementManager* this_2 = nullptr;
0045cc8d          
0045cc91          if (this->m_bMouseHasLeftTheWindow == 0)
0045cc91          {
0045cc93              class UIElement* m_pRootElement = this->m_pRootElement;
0045cc99              this_1 = nullptr;
0045cca5              MouseHitTester<MouseOverCriteria>::Recurse(m_pRootElement, eax_2, eax_3, &this_1);
0045ccaa              this_2 = this_1;
0045cc91          }
0045cc91          
0045ccb4          UIElementManager::SwitchMouseOver(this, this_2);
0045cc74      }
0045cc60  }

0045ccbe                                                                                            90 90                                ..

0045ccc0  uint8_t RefreshEvent_g()

0045ccc0  {
0045ccc0      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0045ccc0      
0045ccc8      if (UIElementManager::s_pInstance_1 != 0)
0045ccca          /* tailcall */
0045ccca          return UIElementManager::RefreshEvent(UIElementManager::s_pInstance_1);
0045ccca      
0045cccf      int32_t eax;
0045cccf      eax = 0;
0045ccd1      return 0;
0045ccc0  }

0045ccd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0045cce0  uint8_t __thiscall HashSet<unsigned long>::add(class HashSet<unsigned long>* this, uint32_t const* arg2)

0045cce0  {
0045cce9      uint32_t const ecx = *(uint32_t*)arg2;
0045cce9      
0045ccfc      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, ecx) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0045ccfc      {
0045cd02          if (*(uint32_t*)i == ecx)
0045cd02          {
0045cd35              if (i == 0)
0045cd35                  break;
0045cd35              
0045cd38              i = 0;
0045cd3b              return 0;
0045cd02          }
0045ccfc      }
0045ccfc      
0045cd0d      void* eax_3 = operator new(8);
0045cd0d      
0045cd17      if (eax_3 == 0)
0045cd17      {
0045cd43          IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::add(&this->m_intrusiveTable, nullptr);
0045cd49          int32_t eax_5;
0045cd49          eax_5 = 1;
0045cd4c          return 1;
0045cd17      }
0045cd17      
0045cd1b      *(uint32_t*)eax_3 = *(uint32_t*)arg2;
0045cd20      *(uint32_t*)((char*)eax_3 + 4) = 0;
0045cd27      IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::add(&this->m_intrusiveTable, eax_3);
0045cd2d      int32_t eax_4;
0045cd2d      eax_4 = 1;
0045cd30      return 1;
0045cce0  }

0045cd4f                                               90                                                                 .

0045cd50  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::add(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>* this, class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >* arg2)

0045cd50  {
0045cd58      uint32_t m_hashKey = arg2->m_hashKey;
0045cd5b      uint32_t m_numBuckets = this->m_numBuckets;
0045cd5b      
0045cd6e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0045cd6e      {
0045cd72          if (*(uint32_t*)i == m_hashKey)
0045cd72          {
0045cdbe              if (i == 0)
0045cdbe                  break;
0045cdbe              
0045cdc2              i = 0;
0045cdc5              return 0;
0045cd72          }
0045cd6e      }
0045cd6e      
0045cd84      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0045cd88          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::grow(this);
0045cd88      
0045cd91      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0045cd94      class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_buckets = this->m_buckets;
0045cd9a      arg2->m_hashNext = m_buckets[temp1_1];
0045cd9d      m_buckets[temp1_1] = arg2;
0045cda3      class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** eax_4 = &m_buckets[temp1_1];
0045cda3      
0045cda8      if (eax_4 < this->m_firstInterestingBucket)
0045cdaa          this->m_firstInterestingBucket = eax_4;
0045cdaa      
0045cdb2      this->m_numElements += 1;
0045cdb6      uint32_t eax_6;
0045cdb6      eax_6 = 1;
0045cdb9      return 1;
0045cd50  }

0045cdc8                          90 90 90 90 90 90 90 90                                                          ........

0045cdd0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::add(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>* this, class HashTableData<unsigned long,SmartArray<UIMessageData,1> >* arg2)

0045cdd0  {
0045cdd8      uint32_t m_hashKey = arg2->m_hashKey;
0045cddb      uint32_t m_numBuckets = this->m_numBuckets;
0045cddb      
0045cdee      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0045cdee      {
0045cdf2          if (*(uint32_t*)i == m_hashKey)
0045cdf2          {
0045ce3e              if (i == 0)
0045ce3e                  break;
0045ce3e              
0045ce42              i = 0;
0045ce45              return 0;
0045cdf2          }
0045cdee      }
0045cdee      
0045ce04      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0045ce08          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::grow(this);
0045ce08      
0045ce11      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0045ce14      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_buckets = this->m_buckets;
0045ce1a      arg2->m_hashNext = m_buckets[temp1_1];
0045ce1d      m_buckets[temp1_1] = arg2;
0045ce23      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** eax_4 = &m_buckets[temp1_1];
0045ce23      
0045ce28      if (eax_4 < this->m_firstInterestingBucket)
0045ce2a          this->m_firstInterestingBucket = eax_4;
0045ce2a      
0045ce32      this->m_numElements += 1;
0045ce36      uint32_t eax_6;
0045ce36      eax_6 = 1;
0045ce39      return 1;
0045cdd0  }

0045ce48                          90 90 90 90 90 90 90 90                                                          ........

0045ce50  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>* this)

0045ce50  {
0045ce58      if (this->m_numElements != 0)
0045ce58      {
0045ce5e          void* edi;
0045ce5e          void* var_8_1 = edi;
0045ce5e          
0045cee3          do
0045cee3          {
0045ce66              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0045ce6c              int32_t* m_firstInterestingBucket_2;
0045ce6c              
0045ce6c              if (this->m_firstInterestingBucket == ecx_1)
0045ce6c              {
0045ce82              label_45ce82:
0045ce82                  m_firstInterestingBucket_2 = nullptr;
0045ce84                  edi = nullptr;
0045ce6c              }
0045ce6c              else
0045ce6c              {
0045ce70                  while (true)
0045ce70                  {
0045ce70                      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0045ce70                      
0045ce76                      if (*(uint32_t*)m_firstInterestingBucket != 0)
0045ce76                      {
0045ce88                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0045ce8b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
0045ce8d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0045ce8d                          break;
0045ce76                      }
0045ce76                      
0045ce7d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0045ce7d                      
0045ce80                      if (&m_firstInterestingBucket[1] == ecx_1)
0045ce80                          goto label_45ce82;
0045ce70                  }
0045ce6c              }
0045ce6c              
0045ce8f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0045ce8f              
0045ce93              if (eax_3 == edi)
0045cea5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0045ce93              else
0045ce93              {
0045ce9c                  void* ecx_2;
0045ce9c                  
0045ce9c                  do
0045ce9c                  {
0045ce95                      ecx_2 = eax_3;
0045ce97                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0045ce9c                  } while (eax_3 != edi);
0045ce9c                  
0045cea0                  if (ecx_2 != 0)
0045ceac                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
0045cea0                  else
0045cea5                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0045ce93              }
0045ce93              
0045ceb5              this->m_numElements -= 1;
0045ceb5              
0045ceb8              if (edi != 0)
0045ceb8              {
0045cec7                  if ((*(uint32_t*)((char*)edi + 0xc) & 0x80000000) == 0x80000000)
0045cecd                      operator delete[](*(uint32_t*)((char*)edi + 8));
0045cecd                  
0045ced6                  operator delete(edi);
0045ceb8              }
0045cee3          } while (this->m_numElements != 0);
0045ce58      }
0045ce50  }

0045ceec                                      90 90 90 90                                                              ....

0045cef0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::add(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>* this, class HashTableData<unsigned long,SmartArray<UIElement *,1> >* arg2)

0045cef0  {
0045cef8      uint32_t m_hashKey = arg2->m_hashKey;
0045cefb      uint32_t m_numBuckets = this->m_numBuckets;
0045cefb      
0045cf0e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0045cf0e      {
0045cf12          if (*(uint32_t*)i == m_hashKey)
0045cf12          {
0045cf5e              if (i == 0)
0045cf5e                  break;
0045cf5e              
0045cf62              i = 0;
0045cf65              return 0;
0045cf12          }
0045cf0e      }
0045cf0e      
0045cf24      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0045cf28          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::grow(this);
0045cf28      
0045cf31      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0045cf34      class HashTableData<unsigned long,SmartArray<UIElement *,1> >** m_buckets = this->m_buckets;
0045cf3a      arg2->m_hashNext = m_buckets[temp1_1];
0045cf3d      m_buckets[temp1_1] = arg2;
0045cf43      class HashTableData<unsigned long,SmartArray<UIElement *,1> >** eax_4 = &m_buckets[temp1_1];
0045cf43      
0045cf48      if (eax_4 < this->m_firstInterestingBucket)
0045cf4a          this->m_firstInterestingBucket = eax_4;
0045cf4a      
0045cf52      this->m_numElements += 1;
0045cf56      uint32_t eax_6;
0045cf56      eax_6 = 1;
0045cf59      return 1;
0045cef0  }

0045cf68                          90 90 90 90 90 90 90 90                                                          ........

0045cf70  void _STL::__final_insertion_sort(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct _STL::less<SurfaceUsageSummary> arg3)

0045cf70  {
0045cf92      if ((((char*)arg2 - arg1) / 0x18) <= 0x10)
0045cf92      {
0045cfc1          _STL::__insertion_sort(arg1, arg2, arg3);
0045cfcb          return;
0045cf92      }
0045cf92      
0045cf95      struct _STL::less<SurfaceUsageSummary> ebp = arg3;
0045cfa3      _STL::__insertion_sort(arg1, &arg1[0x10], ebp);
0045cfad      _STL::__unguarded_insertion_sort_aux(&arg1[0x10], arg2, nullptr, ebp);
0045cf70  }

0045cfcc                                      90 90 90 90                                                              ....

0045cfd0  void __fastcall UIElementManager::UseTime(class UIElementManager* this)

0045cfd0  {
0045cfd3      UIElementManager::CleanDeleteQueue(this);
0045cfda      UIElementManager::ProcessUIMessageRemovalData(this);
0045cfda      
0045cfe7      if (this->m_bPerformMouseHitTest != 0)
0045cfe9          UIElementManager::DoMouseUpdate(this);
0045cfe9      
0045cff0      UIElementManager::CheckTooltip(this);
0045cffb      UIElementManager::BroadcastGlobalMessage(this, 3, 0);
0045d000      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045d000      
0045d008      if (ICIDM::s_cidm_1 != 0)
0045d00a          ICIDM::s_cidm_1->vtable->UseTime();
0045d00a      
0045d012      /* tailcall */
0045d012      return UIElementManager::DrawDirtyRegions(this);
0045cfd0  }

0045d017                                                                       90 90 90 90 90 90 90 90 90                         .........

0045d020  class UIElement* __thiscall UIElementManager::CreateRootElement(class UIElementManager* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0045d020  {
0045d02b      class UIElement* result = UIElementManager::CreateElementRecursiveFromPartialDesc(this, arg2, arg3);
0045d02b      
0045d034      if (result != 0)
0045d034      {
0045d040          int32_t var_8_1 = 1;
0045d044          UIElement::SetShouldOwnObject(result, result->vtable->Initialize());
0045d04d          UIElement::SetIsRootElement(result, 1);
0045d052          result->vtable->PostInit();
0045d052          
0045d065          if (UIElement::IsVisible(result) != 0)
0045d067              result->vtable->UpdateForParentVisibilityChange(1);
0045d034      }
0045d034      
0045d076      return result;
0045d020  }

0045d079                                                                             90 90 90 90 90 90 90                           .......

0045d080  class UIElement* __thiscall UIElementManager::CreateChildElement(class UIElementManager* this, class UIElement* arg2, class LayoutDesc const* arg3, class ElementDesc const* arg4)

0045d080  {
0045d08c      class UIElement* result = UIElementManager::CreateElementRecursiveFromPartialDesc(this, arg3, arg4);
0045d08c      
0045d095      if (result != 0)
0045d095      {
0045d097          result->vtable->Initialize();
0045d0a5          result->vtable->SetParent(arg2);
0045d0ad          result->vtable->PostInit();
0045d0ad          
0045d0b9          if ((arg2 != 0 && UIElement::IsVisible(arg2) != 0))
0045d0c6              result->vtable->UpdateForParentVisibilityChange(1);
0045d095      }
0045d095      
0045d0d6      return result;
0045d080  }

0045d0d9                                                                             90 90 90 90 90 90 90                           .......

0045d0e0  class UIElement* __thiscall UIElementManager::CreateHollowElement(class UIElementManager* this, class UIElement* arg2)

0045d0e0  {
0045d0e5      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0045d0ee      uint32_t edi = 0x320;
0045d0f3      uint32_t ebx = 0x258;
0045d0f3      
0045d0f8      if (RenderDevice::render_device_1 != 0)
0045d0f8      {
0045d105          edi = RenderDevice::GetDisplayWidth(RenderDevice::render_device_1);
0045d10c          ebx = RenderDevice::GetDisplayHeight(RenderDevice::render_device);
0045d0f8      }
0045d0f8      
0045d116      if (this->m_pHollowLayoutDesc == 0)
0045d116      {
0045d11d          void* eax_4 = operator new(0xc0);
0045d129          void* eax_5;
0045d129          
0045d129          if (eax_4 == 0)
0045d13d              eax_5 = nullptr;
0045d129          else
0045d129          {
0045d12d              LayoutDesc::LayoutDesc(eax_4);
0045d132              *(uint32_t*)eax_4 = 0x800ad0;
0045d139              eax_5 = eax_4;
0045d129          }
0045d129          
0045d13f          this->m_pHollowLayoutDesc = eax_5;
0045d145          *(uint32_t*)((char*)eax_5 + 0x30) = edi;
0045d148          this->m_pHollowLayoutDesc->m_displayHeight = ebx;
0045d116      }
0045d116      
0045d159      if (this->m_pHollowElementDesc == 0)
0045d159      {
0045d164          void* eax_8 = operator new(0x1c4);
0045d170          void* eax_9;
0045d170          
0045d170          if (eax_8 == 0)
0045d184              eax_9 = nullptr;
0045d170          else
0045d170          {
0045d174              ElementDesc::ElementDesc(eax_8);
0045d179              *(uint32_t*)eax_8 = 0x79bd34;
0045d180              eax_9 = eax_8;
0045d170          }
0045d170          
0045d186          this->m_pHollowElementDesc = eax_9;
0045d191          *(uint32_t*)((char*)eax_9 + 0xa8) = 8;
0045d197          this->m_pHollowElementDesc->m_type = 3;
0045d1a7          class ElementDesc* m_pHollowElementDesc = this->m_pHollowElementDesc;
0045d1ad          m_pHollowElementDesc->m_width = edi;
0045d1b0          m_pHollowElementDesc->m_uiIncorporationFlags |= 8;
0045d1b3          class ElementDesc* m_pHollowElementDesc_1 = this->m_pHollowElementDesc;
0045d1b9          m_pHollowElementDesc_1->m_height = ebx;
0045d1bc          m_pHollowElementDesc_1->m_uiIncorporationFlags |= 0x10;
0045d1c0          this->m_pHollowElementDesc->m_leftEdge = 1;
0045d1d1          this->m_pHollowElementDesc->m_rightEdge = 1;
0045d1dd          this->m_pHollowElementDesc->m_topEdge = 1;
0045d1e9          this->m_pHollowElementDesc->m_bottomEdge = 1;
0045d159      }
0045d159      
0045d1f5      class LayoutDesc* m_pHollowLayoutDesc = this->m_pHollowLayoutDesc;
0045d1f5      
0045d1fd      if (m_pHollowLayoutDesc != 0)
0045d1fd      {
0045d1ff          class ElementDesc* m_pHollowElementDesc_2 = this->m_pHollowElementDesc;
0045d1ff          
0045d207          if (m_pHollowElementDesc_2 != 0)
0045d21b              return UIElementManager::CreateChildElement(this, arg2, m_pHollowLayoutDesc, m_pHollowElementDesc_2);
0045d1fd      }
0045d1fd      
0045d224      return 0;
0045d0e0  }

0045d227                       90 90 90 90 90 90 90 90 90                                                         .........

0045d230  void __fastcall UIElementManager::RegisterElementClass(class UIElementManager* this, uint32_t arg2, class UIElement* (* arg3)(class LayoutDesc const*, class ElementDesc const*))

0045d230  {
0045d230      class UIElementManager* this_1 = this;
0045d230      
0045d23f      if (((arg2 != 0 && arg3 != 0) && HashTable<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &),0>::find(&this->m_classCreateMethodTable, &arg2, &this_1) == 0))
0045d266          HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_classCreateMethodTable, &arg2, &arg3);
0045d230  }


0045d270  void __thiscall UIElementManager::SetMouseCapture(class UIElementManager* this, class UIElement* arg2)

0045d270  {
0045d27d      if (this->m_pElementWithMouseCapture != arg2)
0045d27d      {
0045d285          this->m_nMouseCapture = 0;
0045d28f          this->m_pElementWithMouseCapture = arg2;
0045d295          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_setActionsTriggeringCapture.m_intrusiveTable);
0045d27d      }
0045d27d      
0045d2a2      if (this->m_pElementWithMouseCapture != 0)
0045d2a4          this->m_nMouseCapture += 1;
0045d270  }

0045d2ae                                            90 90                                                                ..

0045d2b0  void __thiscall UIElementManager::ReleaseMouseCapture(class UIElementManager* this, class UIElement* arg2)

0045d2b0  {
0045d2b3      class UIElement* m_pElementWithMouseCapture = this->m_pElementWithMouseCapture;
0045d2b3      
0045d2c1      if ((m_pElementWithMouseCapture != 0 && m_pElementWithMouseCapture == arg2))
0045d2c1      {
0045d2ce          *(uint32_t*)((char*)this->m_lastMouseMoveTime)[4] = *(int32_t*)((char*)Timer::local_time + 4);
0045d2da          this->m_lastMouseMoveTime = (*(uint32_t*)Timer::local_time);
0045d2e0          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_setActionsTriggeringCapture.m_intrusiveTable);
0045d2e5          uint32_t m_nMouseCapture = this->m_nMouseCapture;
0045d2e5          this->m_nMouseCapture -= 1;
0045d2e5          
0045d2eb          if (m_nMouseCapture == 1)
0045d2ed              this->m_pElementWithMouseCapture = nullptr;
0045d2c1      }
0045d2b0  }

0045d2fb                                                                                   90 90 90 90 90                             .....

0045d300  uint8_t __thiscall HashTable<unsigned long,SmartArray<UIMessageData,1>,1>::add(class HashTable<unsigned long,SmartArray<UIMessageData,1>,1>* this, uint32_t const* arg2, class SmartArray<UIMessageData,1> const* arg3)

0045d300  {
0045d30b      void* esi = operator new(0x14);
0045d30b      
0045d312      if (esi == 0)
0045d346          esi = nullptr;
0045d312      else
0045d312      {
0045d31e          *(uint32_t*)esi = *(uint32_t*)arg2;
0045d323          *(uint32_t*)((char*)esi + 4) = 0;
0045d32b          *(uint32_t*)((char*)esi + 8) = 0;
0045d331          *(uint32_t*)((char*)esi + 0xc) = 0;
0045d338          *(uint32_t*)((char*)esi + 0x10) = 0;
0045d33f          SmartArray<UIMessageData,1>::operator=(((char*)esi + 8), arg3);
0045d312      }
0045d312      
0045d353      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::add(&this->m_intrusiveTable, esi) != 0)
0045d388          return 1;
0045d388      
0045d357      if (esi != 0)
0045d357      {
0045d366          if ((*(uint32_t*)((char*)esi + 0xc) & 0x80000000) == 0x80000000)
0045d36c              operator delete[](*(uint32_t*)((char*)esi + 8));
0045d36c          
0045d375          operator delete(esi);
0045d357      }
0045d357      
0045d381      return 0;
0045d300  }

0045d38b                                   90 90 90 90 90                                                             .....

0045d390  uint8_t __thiscall HashTable<unsigned long,SmartArray<UIElement *,1>,1>::add(class HashTable<unsigned long,SmartArray<UIElement *,1>,1>* this, uint32_t const* arg2, class SmartArray<UIElement *,1> const* arg3)

0045d390  {
0045d39b      void* esi = operator new(0x14);
0045d39b      
0045d3a2      if (esi == 0)
0045d3d6          esi = nullptr;
0045d3a2      else
0045d3a2      {
0045d3ae          *(uint32_t*)esi = *(uint32_t*)arg2;
0045d3b3          *(uint32_t*)((char*)esi + 4) = 0;
0045d3bb          *(uint32_t*)((char*)esi + 8) = 0;
0045d3c1          *(uint32_t*)((char*)esi + 0xc) = 0;
0045d3c8          *(uint32_t*)((char*)esi + 0x10) = 0;
0045d3cf          SmartArray<unsigned long,1>::operator=(((char*)esi + 8), arg3);
0045d3a2      }
0045d3a2      
0045d3e3      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::add(&this->m_intrusiveTable, esi) != 0)
0045d418          return 1;
0045d418      
0045d3e7      if (esi != 0)
0045d3e7      {
0045d3f6          if ((*(uint32_t*)((char*)esi + 0xc) & 0x80000000) == 0x80000000)
0045d3fc              operator delete[](*(uint32_t*)((char*)esi + 8));
0045d3fc          
0045d405          operator delete(esi);
0045d3e7      }
0045d3e7      
0045d411      return 0;
0045d390  }

0045d41b                                                                                   90 90 90 90 90                             .....

0045d420  void* __thiscall AutoGrowHashTable<unsigned long,SmartArray<UIElement *,1> >::`scalar deleting destructor'(class AutoGrowHashTable<unsigned long,SmartArray<UIElement *,1> >* this, uint32_t arg2)

0045d420  {
0045d429      this->vtable = 0x79bd78;
0045d42f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(&this->m_intrusiveTable);
0045d434      class HashTableData<unsigned long,SmartArray<UIElement *,1> >** m_buckets = this->m_intrusiveTable.m_buckets;
0045d424      this->m_intrusiveTable.vtable = 0x79bd64;
0045d424      
0045d442      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0045d445          operator delete[](m_buckets);
0045d445      
0045d424      this->m_intrusiveTable.m_buckets = nullptr;
0045d424      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045d424      this->m_intrusiveTable.m_numBuckets = 0;
0045d424      this->m_intrusiveTable.m_numElements = 0;
0045d424      
0045d460      if ((arg2 & 1) != 0)
0045d463          operator delete(this);
0045d463      
0045d46f      return this;
0045d420  }

0045d472                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0045d480  void* __thiscall HashTable<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &),0>::`scalar deleting destructor'(class HashTable<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &),0>* this, uint32_t arg2)

0045d480  {
0045d489      this->vtable = 0x79bd70;
0045d48f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0045d494      class HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)>** m_buckets = this->m_intrusiveTable.m_buckets;
0045d484      this->m_intrusiveTable.vtable = 0x79bd68;
0045d484      
0045d4a2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0045d4a5          operator delete[](m_buckets);
0045d4a5      
0045d484      this->m_intrusiveTable.m_buckets = nullptr;
0045d484      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045d484      this->m_intrusiveTable.m_numBuckets = 0;
0045d484      this->m_intrusiveTable.m_numElements = 0;
0045d484      
0045d4c0      if ((arg2 & 1) != 0)
0045d4c3          operator delete(this);
0045d4c3      
0045d4cf      return this;
0045d480  }

0045d4d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0045d4e0  void* __thiscall HashSet<unsigned long>::`scalar deleting destructor'(class HashSet<unsigned long>* this, uint32_t arg2)

0045d4e0  {
0045d4e9      this->vtable = 0x79bd74;
0045d4ef      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0045d4f4      class HashSetData<unsigned long>** m_buckets = this->m_intrusiveTable.m_buckets;
0045d4e4      this->m_intrusiveTable.vtable = 0x79bd6c;
0045d4e4      
0045d502      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0045d505          operator delete[](m_buckets);
0045d505      
0045d4e4      this->m_intrusiveTable.m_buckets = nullptr;
0045d4e4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045d4e4      this->m_intrusiveTable.m_numBuckets = 0;
0045d4e4      this->m_intrusiveTable.m_numElements = 0;
0045d4e4      
0045d520      if ((arg2 & 1) != 0)
0045d523          operator delete(this);
0045d523      
0045d52f      return this;
0045d4e0  }

0045d532                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0045d540  void* __thiscall HashTable<unsigned long,SmartArray<UIMessageData,1>,1>::operator=(void* arg1, uint32_t arg2)

0045d540  {
0045d544      uint32_t edi = arg2;
0045d544      
0045d550      if (arg1 == edi)
0045d68a          return arg1;
0045d68a      
0045d55e      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(((char*)arg1 + 4));
0045d566      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0045d56c      arg2 = *(uint32_t*)(edi + 0x6c);
0045d584      uint32_t* eax_3 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0045d584      
0045d58e      if (eax_3 == bucketSizesEnd_1)
0045d590          eax_3 -= 4;
0045d590      
0045d598      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::resize_internal(((char*)arg1 + 4), *(uint32_t*)eax_3);
0045d5a5      void* ebp_1 = nullptr;
0045d5a7      void __return;
0045d5a7      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin((edi + 4), &__return);
0045d5ac      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
0045d5ae      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_4->m_currElement;
0045d5ba      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
0045d5ba      
0045d5be      if (i_1 != 0)
0045d5be      {
0045d5cf          while (true)
0045d5cf          {
0045d5cf              void* esi_2 = operator new(0x14);
0045d5cf              
0045d5d6              if (esi_2 == 0)
0045d5f5                  esi_2 = nullptr;
0045d5d6              else
0045d5d6              {
0045d5dd                  *(uint32_t*)esi_2 = i_1->m_hashKey;
0045d5df                  *(uint32_t*)((char*)esi_2 + 4) = 0;
0045d5e6                  *(uint32_t*)((char*)esi_2 + 8) = 0;
0045d5e8                  *(uint32_t*)((char*)esi_2 + 0xc) = 0;
0045d5eb                  *(uint32_t*)((char*)esi_2 + 0x10) = 0;
0045d5ee                  SmartArray<UIMessageData,1>::operator=(((char*)esi_2 + 8), &i_1->m_data);
0045d5d6              }
0045d5d6              
0045d5fb              int32_t ebx_1 = *(uint32_t*)((char*)arg1 + 0x6c);
0045d605              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)esi_2) % ebx_1);
0045d605              
0045d60b              if (ebp_1 == 0)
0045d60b              {
0045d62b              label_45d62b:
0045d62b                  void** eax_13 = (*(uint32_t*)((char*)arg1 + 0x64) + (temp1_1 << 2));
0045d62e                  *(uint32_t*)eax_13 = esi_2;
0045d62e                  
0045d630                  if (ebp_1 == 0)
0045d632                      *(uint32_t*)((char*)arg1 + 0x68) = eax_13;
0045d632                  
0045d640                  *(uint32_t*)((char*)arg1 + 0x70) += 1;
0045d60b              }
0045d60b              else
0045d60b              {
0045d612                  uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)ebp_1) % ebx_1);
0045d612                  
0045d616                  if (temp1_1 == temp1_2)
0045d616                  {
0045d618                      *(uint32_t*)((char*)ebp_1 + 4) = esi_2;
0045d640                      *(uint32_t*)((char*)arg1 + 0x70) += 1;
0045d616                  }
0045d616                  else if (temp1_1 > temp1_2)
0045d61d                      goto label_45d62b;
0045d60b              }
0045d60b              
0045d643              i_1 = i_1->m_hashNext;
0045d648              ebp_1 = esi_2;
0045d648              
0045d64a              if (i_1 == 0)
0045d64a              {
0045d673                  class HashTableData<unsigned long,DBOCache *>* i;
0045d673                  
0045d673                  do
0045d673                  {
0045d664                      void* m_currBucket_1 = &m_currBucket[1];
0045d669                      m_currBucket = m_currBucket_1;
0045d669                      
0045d66d                      if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0045d67f                          return arg1;
0045d67f                      
0045d66f                      i = *(uint32_t*)m_currBucket_1;
0045d673                  } while (i == 0);
0045d673                  
0045d675                  i_1 = i;
0045d675                  
0045d679                  if (i_1 == 0)
0045d679                      break;
0045d64a              }
0045d5cf          }
0045d5be      }
0045d5be      
0045d67f      return arg1;
0045d540  }

0045d68d                                         90 90 90                                                               ...

0045d690  void _STL::__introsort_loop(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2, struct SurfaceUsageSummary* arg3, int32_t arg4, struct _STL::less<SurfaceUsageSummary> arg5)

0045d690  {
0045d690      int32_t ebx;
0045d690      int32_t var_4 = ebx;
0045d695      int32_t ebp;
0045d695      int32_t var_8 = ebp;
0045d6b2      int32_t esi;
0045d6b2      int32_t var_c = esi;
0045d6b3      int32_t edi;
0045d6b3      int32_t var_10 = edi;
0045d6b3      int32_t* esp_1 = &var_10;
0045d6b3      
0045d6b4      if ((((char*)arg2 - arg1) / 0x18) > 0x10)
0045d6b4      {
0045d6ba          struct SurfaceUsageSummary* ebx_2 = arg2;
0045d6ba          
0045d6c0          while (true)
0045d6c0          {
0045d6c0              int32_t eax_3 = esp_1[8];
0045d6c0              
0045d6c6              if (eax_3 == 0)
0045d6c6              {
0045d780                  *(uint32_t*)((char*)esp_1 - 4) = esp_1[9];
0045d781                  *(uint32_t*)((char*)esp_1 - 8) = 0;
0045d783                  *(uint32_t*)((char*)esp_1 - 0xc) = ebx_2;
0045d784                  *(uint32_t*)((char*)esp_1 - 0x10) = ebx_2;
0045d785                  *(uint32_t*)((char*)esp_1 - 0x14) = arg1;
0045d786                  _STL::__partial_sort();
0045d78b                  break;
0045d6c6              }
0045d6c6              
0045d6ce              int32_t eax_4 = esp_1[9];
0045d6d2              *(uint32_t*)((char*)esp_1 - 4) = eax_4;
0045d6d3              *(uint32_t*)((char*)esp_1 - 8) = eax_4;
0045d6d8              *(uint32_t*)((char*)esp_1 - 0xc) = ((char*)ebx_2 - 0x18);
0045d6d2              esp_1[8] = (eax_3 - 1);
0045d6f4              int32_t eax_8;
0045d6f4              int32_t edx_7;
0045d6f4              edx_7 = HIGHD(((int64_t)(((char*)ebx_2 - arg1) / 0x18)));
0045d6f4              eax_8 = LOWD(((int64_t)(((char*)ebx_2 - arg1) / 0x18)));
0045d700              *(uint32_t*)((char*)esp_1 - 0x10) = &arg1[((eax_8 - edx_7) >> 1)];
0045d701              *(uint32_t*)((char*)esp_1 - 0x14) = arg1;
0045d702              int32_t* eax_12 = _STL::__median();
0045d710              *(uint32_t*)((char*)esp_1 - 0x1c) = *(uint32_t*)eax_12;
0045d712              int32_t eax_13 = eax_12[1];
0045d715              *(uint32_t*)((char*)esp_1 - 0x18) = eax_13;
0045d71b              *(uint32_t*)((char*)esp_1 - 0x20) = (eax_13 - 0x10);
0045d71c              InterlockedIncrement();
0045d725              *(uint32_t*)((char*)esp_1 - 0x14) = eax_12[2];
0045d72b              *(uint32_t*)((char*)esp_1 - 0x10) = eax_12[3];
0045d731              *(uint32_t*)((char*)esp_1 - 0xc) = eax_12[4];
0045d734              int32_t edx_10 = eax_12[5];
0045d737              *(uint32_t*)((char*)esp_1 - 4) = ebx_2;
0045d738              *(uint32_t*)((char*)esp_1 - 8) = arg1;
0045d739              *(uint32_t*)((char*)esp_1 - 8) = edx_10;
0045d73c              struct SurfaceUsageSummary* eax_16 = _STL::__unguarded_partition();
0045d741              int32_t ecx_9 = esp_1[0xf];
0045d74b              *(uint32_t*)((char*)esp_1 - 0xc) = esp_1[0x10];
0045d74c              *(uint32_t*)((char*)esp_1 - 0x10) = ecx_9;
0045d74d              *(uint32_t*)((char*)esp_1 - 0x14) = 0;
0045d74f              *(uint32_t*)((char*)esp_1 - 0x18) = ebx_2;
0045d750              *(uint32_t*)((char*)esp_1 - 0x1c) = eax_16;
0045d751              _STL::__introsort_loop();
0045d756              ebx_2 = eax_16;
0045d76b              esp_1 = &esp_1[7];
0045d76b              
0045d771              if ((((char*)eax_16 - arg1) / 0x18) <= 0x10)
0045d771              {
0045d777                  *(uint32_t*)esp_1;
0045d777                  esp_1[1];
0045d777                  esp_1[2];
0045d777                  esp_1[3];
0045d77b                  return;
0045d771              }
0045d6c0          }
0045d6b4      }
0045d6b4      
0045d78e      *(uint32_t*)esp_1;
0045d78e      esp_1[1];
0045d78e      esp_1[2];
0045d78e      esp_1[3];
0045d690  }

0045d793                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0045d7a0  class UIElement* __thiscall UIElementManager::CreateRootElement(class UIElementManager* this, class LayoutDesc const* arg2, uint32_t arg3)

0045d7a0  {
0045d7af      class ElementDesc* result = LayoutDesc::AccessElementDesc(arg2, arg3);
0045d7af      
0045d7b6      if (result != 0)
0045d7c8          return UIElementManager::CreateRootElement(this, arg2, result);
0045d7c8      
0045d7ba      return result;
0045d7a0  }

0045d7cb                                   90 90 90 90 90                                                             .....

0045d7d0  class UIElement* __thiscall UIElementManager::CreateChildElement(class UIElementManager* this, class UIElement* arg2, class LayoutDesc const* arg3, uint32_t arg4)

0045d7d0  {
0045d7df      class ElementDesc* result = LayoutDesc::AccessElementDesc(arg3, arg4);
0045d7df      
0045d7e6      if (result != 0)
0045d7fd          return UIElementManager::CreateChildElement(this, arg2, arg3, result);
0045d7fd      
0045d7ea      return result;
0045d7d0  }


0045d800  void __thiscall UIElementManager::RegisterElementForInputAction(class UIElementManager* this, uint32_t arg2, class UIElement* arg3)

0045d800  {
0045d811      if ((arg2 != 0 && arg3 != 0))
0045d811      {
0045d821          class List<NoticeHandler *>** eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_elementInputActionListenerTable.vtable, &arg2);
0045d82c          class UIElement** var_14_2 = &arg3;
0045d82c          
0045d82d          if (eax_1 != 0)
0045d87d              SmartArray<unsigned long,1>::add_unique(eax_1, var_14_2);
0045d82d          else
0045d82d          {
0045d833              class List<NoticeHandler *>** var_c = eax_1;
0045d83b              class List<NoticeHandler *>** var_4_1 = eax_1;
0045d83f              SmartArray<unsigned long,1>::AddToEnd(&var_c, var_14_2);
0045d850              HashTable<unsigned long,SmartArray<UIElement *,1>,1>::add(&this->m_elementInputActionListenerTable, &arg2, &var_c);
0045d850              
0045d865              if ((eax_1 & 0x80000000) == 0x80000000)
0045d86c                  operator delete[](var_c);
0045d82d          }
0045d811      }
0045d800  }

0045d889                             90 90 90 90 90 90 90                                                           .......

0045d890  void __thiscall UIElementManager::UnRegisterElementForAllInputActions(class UIElementManager* this, class UIElement* arg2)

0045d890  {
0045d893      int32_t* __return_1;
0045d893      int32_t* __return_2 = __return_1;
0045d8a6      int32_t* __return;
0045d8a6      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_elementInputActionListenerTable.m_intrusiveTable, &__return);
0045d8ab      class HashTableData<unsigned long,DBOCache *>* i_3 = eax->m_currElement;
0045d8ae      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0045d8b0      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0045d8bb      void* var_24 = nullptr;
0045d8bf      int32_t var_20 = 0;
0045d8c3      int32_t var_1c = 0;
0045d8c3      
0045d8c7      if (i_3 != 0)
0045d8c7      {
0045d8d8          while (true)
0045d8d8          {
0045d8d8              __return = nullptr;
0045d8dc              int32_t var_14_1 = 0;
0045d8e0              int32_t var_10_1 = 0;
0045d8e4              SmartArray<unsigned long,1>::operator=(&__return, &i_3->m_data);
0045d8e9              __return_1 = __return;
0045d8ed              int32_t edx_2 = var_10_1;
0045d8f1              void* ecx_3 = &__return_1[edx_2];
0045d8f6              int32_t* __return_3 = __return_1;
0045d8f6              
0045d8f8              if (__return_1 < ecx_3)
0045d8f8              {
0045d909                  do
0045d909                  {
0045d902                      if (*(uint32_t*)__return_3 == arg2)
0045d902                      {
0045d90d                          int32_t ecx_4 = __return_1[(edx_2 - 1)];
0045d911                          edx_2 -= 1;
0045d912                          *(uint32_t*)__return_3 = ecx_4;
0045d914                          __return_1[edx_2] = 0;
0045d914                          break;
0045d902                      }
0045d902                      
0045d904                      __return_3 = &__return_3[1];
0045d909                  } while (__return_3 < ecx_3);
0045d8f8              }
0045d8f8              
0045d91f              if (edx_2 == 0)
0045d91f              {
0045d92d                  int32_t eax_2 = (var_20 & 0x7fffffff);
0045d92d                  
0045d934                  if (var_1c < eax_2)
0045d934                  {
0045d999                      *(uint32_t*)((char*)var_24 + (var_1c << 2)) = i_3->m_hashKey;
0045d99d                      var_1c += 1;
0045d934                  }
0045d934                  else
0045d934                  {
0045d936                      uint32_t edx_3 = (eax_2 + 1);
0045d936                      
0045d93c                      if (edx_3 <= 8)
0045d93e                          edx_3 = 8;
0045d93c                      else if (edx_3 <= 0x4000)
0045d94b                      {
0045d96a                          int32_t eflags_1;
0045d96a                          char eax_6;
0045d96a                          eax_6 = __bsr_gprv_memv(edx_3);
0045d976                          int32_t esi_2 = (1 << eax_6);
0045d976                          
0045d97a                          if (edx_3 > esi_2)
0045d97c                              edx_3 = (esi_2 * 2);
0045d94b                      }
0045d94b                      else
0045d94b                      {
0045d94f                          int32_t eax_4 = (edx_3 & 0x3fff);
0045d94f                          
0045d954                          if (eax_4 != 0)
0045d95d                              edx_3 += (0x4000 - eax_4);
0045d94b                      }
0045d94b                      
0045d98d                      if (SmartArray<unsigned long,1>::grow(&var_24, edx_3) != 0)
0045d98d                      {
0045d999                          *(uint32_t*)((char*)var_24 + (var_1c << 2)) = i_3->m_hashKey;
0045d99d                          var_1c += 1;
0045d98d                      }
0045d934                  }
0045d91f              }
0045d91f              
0045d9b1              if ((var_14_1 & 0x80000000) == 0x80000000)
0045d9b4                  operator delete[](__return_1);
0045d9b4              
0045d9bc              i_3 = i_3->m_hashNext;
0045d9bc              
0045d9c1              if (i_3 == 0)
0045d9c1              {
0045d9e0                  class HashTableData<unsigned long,DBOCache *>* i;
0045d9e0                  
0045d9e0                  do
0045d9e0                  {
0045d9d4                      m_currBucket = &m_currBucket[1];
0045d9d4                      
0045d9d9                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0045d9d9                          goto label_45d9f0;
0045d9d9                      
0045d9db                      i = *(uint32_t*)m_currBucket;
0045d9e0                  } while (i == 0);
0045d9e0                  
0045d9e2                  i_3 = i;
0045d9e2                  
0045d9e6                  if (i_3 == 0)
0045d9e6                      break;
0045d9c1              }
0045d8d8          }
0045d8c7      }
0045d8c7      
0045d9f0  label_45d9f0:
0045d9f0      int32_t ebp = 0;
0045d9f0      
0045d9f4      if (var_1c > 0)
0045d9f4      {
0045da8a          do
0045da8a          {
0045da04              int32_t edi = *(uint32_t*)((char*)var_24 + (ebp << 2));
0045da1b              void* ebx_1 = &this->m_elementInputActionListenerTable.m_intrusiveTable.m_buckets[(COMBINE(0, edi) % this->m_elementInputActionListenerTable.m_intrusiveTable.m_numBuckets)];
0045da1e              int32_t* i_2 = *(uint32_t*)ebx_1;
0045da1e              
0045da24              for (int32_t* i_1 = i_2; i_1 != 0; i_1 = i_1[1])
0045da24              {
0045da28                  if (*(uint32_t*)i_1 == edi)
0045da28                  {
0045da35                      if (i_1 != 0)
0045da35                      {
0045da39                          if (i_2 == i_1)
0045da50                              *(uint32_t*)ebx_1 = i_2[1];
0045da39                          else
0045da39                          {
0045da47                              int32_t* i_4;
0045da47                              
0045da47                              do
0045da47                              {
0045da40                                  i_4 = i_2;
0045da42                                  i_2 = i_2[1];
0045da47                              } while (i_2 != i_1);
0045da47                              
0045da4b                              if (i_4 != 0)
0045da57                                  i_4[1] = i_2[1];
0045da4b                              else
0045da50                                  *(uint32_t*)ebx_1 = i_2[1];
0045da39                          }
0045da39                          
0045da0b                          this->m_elementInputActionListenerTable.m_intrusiveTable.m_numElements -= 1;
0045da0b                          
0045da6c                          if ((i_1[3] & 0x80000000) == 0x80000000)
0045da72                              operator delete[](i_1[2]);
0045da72                          
0045da7b                          operator delete(i_1);
0045da35                      }
0045da35                      
0045da35                      break;
0045da28                  }
0045da24              }
0045da24              
0045da87              ebp += 1;
0045da8a          } while (ebp < var_1c);
0045d9f4      }
0045d9f4      
0045daa2      if ((var_20 & 0x80000000) == 0x80000000)
0045daa9          operator delete[](var_24);
0045d890  }

0045da3d                                                                                         8d 49 00                               .I.
0045dab7                                                                       90 90 90 90 90 90 90 90 90                         .........

0045dac0  void __stdcall UIElementManager::RegisterForMessageInternal(class UIElementManager const* this @ ecx, class UIListener* arg2, class AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >* arg3, uint32_t arg4)

0045dac0  {
0045dad3      if ((arg2 != 0 && arg3 != 0))
0045dad3      {
0045dadc          class List<NoticeHandler *>** eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(arg3, &arg4);
0045dae3          class List<NoticeHandler *>** var_c;
0045dae3          
0045dae3          if (eax_1 != 0)
0045dae3          {
0045db12          label_45db12:
0045db12              int32_t ecx_3 = eax_1[2];
0045db15              int32_t edx_1 = 0;
0045db15              
0045db19              if (ecx_3 > 0)
0045db19              {
0045db1b                  int32_t* esi_2 = *(uint32_t*)eax_1;
0045db1b                  
0045db2a                  do
0045db2a                  {
0045db22                      if (*(uint32_t*)esi_2 == arg2)
0045db22                      {
0045db50                          esi_2[1] += 1;
0045db58                          return;
0045db22                      }
0045db22                      
0045db24                      edx_1 += 1;
0045db25                      esi_2 = &esi_2[2];
0045db2a                  } while (edx_1 < ecx_3);
0045db19              }
0045db19              
0045db33              var_c = arg2;
0045db37              int32_t var_8_2 = 1;
0045db3f              SmartArray<VertexRange,1>::AddToEnd(eax_1, &var_c);
0045dae3          }
0045dae3          else
0045dae3          {
0045daf1              var_c = eax_1;
0045daf5              class List<NoticeHandler *>** var_8_1 = eax_1;
0045daf9              class List<NoticeHandler *>** var_4_1 = eax_1;
0045dafd              HashTable<unsigned long,SmartArray<UIMessageData,1>,1>::add(arg3, &arg4, &var_c);
0045db09              eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(arg3, &arg4);
0045db09              
0045db10              if (eax_1 != 0)
0045db10                  goto label_45db12;
0045dae3          }
0045dad3      }
0045dac0  }

0045db5b                                                                                   90 90 90 90 90                             .....

0045db60  void __fastcall UIElementManager::MouseDownEvent(class UIElementManager* this, uint32_t arg2, float arg3)

0045db60  {
0045db66      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045db66      
0045db6e      if (ICIDM::s_cidm_1 != 0)
0045db6e      {
0045db79          int32_t eax_2 = ICIDM::s_cidm_1->vtable->GetMouseX();
0045db86          int32_t eax_3 = ICIDM::s_cidm->vtable->GetMouseY();
0045db86          
0045db9a          if (UIRegion::PointIsOverRegion(this->m_pRootElement, eax_2, eax_3) != 0)
0045db9c              this->m_bMouseHasLeftTheWindow = 0;
0045db9c          
0045dba9          class UIElement* eax_5 = nullptr;
0045dba9          
0045dbad          if (this->m_bMouseHasLeftTheWindow == 0)
0045dbad          {
0045dbaf              class UIElement* m_pRootElement = this->m_pRootElement;
0045dbb5              class UIElement* var_4 = nullptr;
0045dbc1              MouseHitTester<MouseOverCriteria>::Recurse(m_pRootElement, eax_2, eax_3, &var_4);
0045dbc6              eax_5 = var_4;
0045dbad          }
0045dbad          
0045dbd0          uint32_t edx_2 = UIElementManager::SwitchMouseOver(this, eax_5);
0045dbd5          uint32_t edi_1 = arg2;
0045dbe1          char var_5_1;
0045dbe1          
0045dbe1          if ((edi_1 != 0xd && edi_1 != 0xf))
0045dbe6              var_5_1 = 0;
0045dbe6          
0045dbeb          if (((edi_1 == 0xd || edi_1 == 0xf) || edi_1 == 0xe))
0045dbed              var_5_1 = 1;
0045dbed          
0045dbff          if ((this->m_bDragStarted == 0 && edi_1 == 7))
0045dbff          {
0045dc03              edx_2 = UIElementManager::ClearDragandDrop(this);
0045dc08              this->m_dragX = eax_2;
0045dc0e              this->m_dragY = eax_3;
0045dbff          }
0045dbff          
0045dc1c          class UIElement* m_pElementLastEntered;
0045dc1c          
0045dc1c          if (this->m_pElementWithMouseCapture == 0)
0045dc1c          {
0045dc22              m_pElementLastEntered = this->m_pElementLastEntered;
0045dc22              
0045dc32              if ((m_pElementLastEntered != 0 && var_5_1 == 0))
0045dc32              {
0045dc37                  UIElementManager::SetMouseCapture(this, m_pElementLastEntered);
0045dc47                  m_pElementLastEntered = HashSet<unsigned long>::add(&this->m_setActionsTriggeringCapture, &arg2);
0045dc4c                  m_pElementLastEntered = this->m_bDragStarted;
0045dc4c                  
0045dc59                  if ((m_pElementLastEntered == 0 && edi_1 == 7))
0045dc61                      this->m_pcPotentialDragElement = this->m_pElementLastEntered;
0045dc32              }
0045dc32              
0045dc67              class UIElement* m_pElementLastOver = this->m_pElementLastOver;
0045dc67              
0045dc6f              if (m_pElementLastOver == 0)
0045dc6f              {
0045dce2                  class UIElement* m_activeElement_1 = this->m_activeElement;
0045dce2                  
0045dcea                  if (m_activeElement_1 != 0)
0045dcee                      m_pElementLastEntered = m_activeElement_1->vtable->Deactivate();
0045dc6f              }
0045dc6f              else
0045dc6f              {
0045dc71                  m_pElementLastEntered = UIElement::GetRootElement(m_pElementLastOver);
0045dc76                  class UIElement* m_pElementLastEntered_1 = m_pElementLastEntered;
0045dc76                  
0045dc7e                  if (m_pElementLastEntered_1 != this->m_activeElement)
0045dc7e                  {
0045dc82                      if (m_pElementLastEntered_1 != 0)
0045dc88                          m_pElementLastEntered = m_pElementLastEntered_1->vtable->GetActivatable();
0045dc88                      
0045dc90                      if ((m_pElementLastEntered_1 == 0 || m_pElementLastEntered == 0))
0045dc90                      {
0045dcce                          class UIElement* m_activeElement = this->m_activeElement;
0045dcce                          
0045dcd6                          if (m_activeElement != 0)
0045dcda                              m_pElementLastEntered = m_activeElement->vtable->Deactivate();
0045dc90                      }
0045dc90                      else
0045dc96                          m_pElementLastEntered = m_pElementLastEntered_1->vtable->Activate();
0045dc7e                  }
0045dc7e                  
0045dc9c                  edi_1 = arg2;
0045dc6f              }
0045dc6f              
0045dc6f              goto label_45dca0;
0045dc1c          }
0045dc1c          
0045dcfe          if (this->m_setActionsTriggeringCapture.m_intrusiveTable.m_numElements == 0)
0045dcfe          {
0045dca0          label_45dca0:
0045dca0              m_pElementLastEntered = var_5_1;
0045dca0              
0045dca6              if (m_pElementLastEntered == 0)
0045dca6                  goto label_45dd18;
0045dca6              
0045dca6              goto label_45dca8;
0045dcfe          }
0045dcfe          
0045dd00          m_pElementLastEntered = var_5_1;
0045dd00          
0045dd06          if (m_pElementLastEntered != 0)
0045dd06          {
0045dca8          label_45dca8:
0045dca8              class UIElement* ecx_10 = this->m_pElementWithMouseCapture;
0045dca8              
0045dcb0              if (ecx_10 != 0)
0045dcb0              {
0045dcbc              label_45dcbc:
0045dcbc                  uint32_t var_1c_6 = edi_1;
0045dcbd                  int32_t var_20_3 = eax_3;
0045dcbe                  int32_t var_24_2 = eax_2;
0045dcbf                  UIRegion::NotifyMouseTap(ecx_10, m_pElementLastEntered, edx_2, ecx_10);
0045dccb                  return;
0045dcb0              }
0045dcb0              
0045dcb2              ecx_10 = this->m_pElementLastEntered;
0045dcb2              
0045dcba              if (ecx_10 != 0)
0045dcba                  goto label_45dcbc;
0045dd06          }
0045dd06          else
0045dd06          {
0045dd13              HashSet<unsigned long>::add(&this->m_setActionsTriggeringCapture, &arg2);
0045dd18          label_45dd18:
0045dd18              class UIRegion* m_pElementWithMouseCapture = this->m_pElementWithMouseCapture;
0045dd18              
0045dd20              if (m_pElementWithMouseCapture != 0)
0045dd20              {
0045dd25                  UIRegion::NotifyMouseDown(m_pElementWithMouseCapture, eax_2, eax_3, edi_1);
0045dd31                  return;
0045dd20              }
0045dd06          }
0045dd06          
0045dd34          class UIElement* m_focusElement = this->m_focusElement;
0045dd34          
0045dd3c          if (m_focusElement != 0)
0045dd3e              m_focusElement->vtable->RelinquishFocus();
0045db6e      }
0045db60  }


0045dd50  void __fastcall UIElementManager::MouseUpEvent(class UIElementManager* this, uint32_t arg2, class IInputActionCallback* arg3)

0045dd50  {
0045dd50      class UIElementManager* this_1 = this;
0045dd54      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045dd54      
0045dd5c      if (ICIDM::s_cidm_1 != 0)
0045dd5c      {
0045dd67          int32_t eax_2 = ICIDM::s_cidm_1->vtable->GetMouseX();
0045dd74          int32_t eax_3 = ICIDM::s_cidm->vtable->GetMouseY();
0045dd81          uint8_t eax_4;
0045dd81          class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* ecx_2;
0045dd81          eax_4 = UIRegion::PointIsOverRegion(this->m_pRootElement, eax_2, eax_3);
0045dd81          
0045dd88          if (eax_4 != 0)
0045dd8a              this->m_bMouseHasLeftTheWindow = 0;
0045dd8a          
0045dd91          class UIElement* m_pElementWithMouseCapture = this->m_pElementWithMouseCapture;
0045dd99          class UIElement* m_pElementLastEntered = this->m_pElementLastEntered;
0045dd99          
0045dd9f          if (m_pElementWithMouseCapture != 0)
0045dd9f          {
0045dda1              m_pElementLastEntered = m_pElementWithMouseCapture;
0045dda1              
0045ddab              if (this->m_setActionsTriggeringCapture.m_intrusiveTable.m_numElements != 0)
0045ddab              {
0045ddb8                  struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_6 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_setActionsTriggeringCapture.m_intrusiveTable.vtable, &arg2);
0045ddb8                  
0045ddbf                  if (eax_6 != 0)
0045ddbf                  {
0045ddc2                      operator delete(eax_6);
0045ddc2                      
0045ddd2                      if (this->m_setActionsTriggeringCapture.m_intrusiveTable.m_numElements == 0)
0045dddd                          UIElementManager::ReleaseMouseCapture(this, this->m_pElementWithMouseCapture);
0045ddbf                  }
0045ddab              }
0045dd9f          }
0045dd9f          
0045dde2          ecx_2 = this->m_bMouseHasLeftTheWindow;
0045dde8          class UIElementManager* this_2 = nullptr;
0045dde8          
0045ddec          if (ecx_2 == 0)
0045ddec          {
0045ddf4              this_1 = nullptr;
0045de00              MouseHitTester<MouseOverCriteria>::Recurse(this->m_pRootElement, eax_2, eax_3, &this_1);
0045de05              this_2 = this_1;
0045ddec          }
0045ddec          
0045de0f          UIElementManager::SwitchMouseOver(this, this_2);
0045de0f          
0045de19          if (arg2 == 7)
0045de19          {
0045de23              if (this->m_bDragStarted != 0)
0045de23              {
0045de2d                  if (this->m_dragElement != 0)
0045de2d                  {
0045de2f                      class UIElement* m_pElementWithMouseCapture_1 = this->m_pElementWithMouseCapture;
0045de35                      m_pElementLastEntered = nullptr;
0045de35                      
0045de39                      if (m_pElementWithMouseCapture_1 != 0)
0045de39                      {
0045de3e                          UIElementManager::ReleaseMouseCapture(this, m_pElementWithMouseCapture_1);
0045de4c                          UIElementManager::SwitchMouseOver(this, this->m_pElementLastOver);
0045de39                      }
0045de39                      
0045de51                      class UIRegion* m_dragOwner = this->m_dragOwner;
0045de51                      
0045de59                      if (m_dragOwner != 0)
0045de5f                          UIRegion::NotifyMouseUp(m_dragOwner, eax_2, eax_3, 7);
0045de2d                  }
0045de2d                  
0045de66                  UIElementManager::StopDragandDrop(this);
0045de23              }
0045de23              
0045de6b              this->m_pcPotentialDragElement = nullptr;
0045de19          }
0045de19          
0045de77          if (m_pElementLastEntered != 0)
0045de82              UIRegion::NotifyMouseUp(m_pElementLastEntered, eax_2, eax_3, arg2);
0045dd5c      }
0045dd50  }

0045de8f                                               90                                                                 .

0045de90  void __thiscall UIElementManager::StartTooltip(class UIElementManager* this, class StringInfo const* arg2, class UIElement* arg3, uint32_t arg4, class IDClass<_tagDataID,32,0> arg5, uint32_t arg6)

0045de90  {
0045de97      class UIElement* m_pTooltipElement = this->m_pTooltipElement;
0045de97      
0045dea6      if (m_pTooltipElement != 0)
0045dea6      {
0045dea8          UIElement::AddToDeleteQueue(m_pTooltipElement);
0045dead          this->m_pTooltipElement = nullptr;
0045dea6      }
0045dea6      
0045deb9      if (arg3 != 0)
0045deb9      {
0045dec0          class StringInfo* ebx_1 = arg2;
0045dec0          
0045decf          if (StringInfo::IsValid(ebx_1, 1) != 0)
0045decf          {
0045dede              this->m_pTooltipOwner = arg3;
0045dee4              arg2 = nullptr;
0045dee8              DBObjGrabber<LayoutDesc>::set(&arg2, arg5);
0045deed              class StringInfo* edi_1 = arg2;
0045deed              
0045def3              if (edi_1 != 0)
0045def3              {
0045df00                  class ElementDesc* eax_3 = LayoutDesc::AccessElementDesc(edi_1, arg4);
0045df07                  class UIElement* eax_4;
0045df07                  
0045df07                  if (eax_3 != 0)
0045df0d                      eax_4 = UIElementManager::CreateRootElement(this, edi_1, eax_3);
0045df0d                  
0045df16                  if ((eax_3 == 0 || eax_4 == 0))
0045df16                  {
0045df1c                      *(int32_t*)((char*)edi_1->m_strToken.m_charbuffer + 0x14)();
0045df26                      return;
0045df16                  }
0045df16                  
0045df2f                  uint32_t var_10 = arg6;
0045df2f                  
0045df33                  if (arg6 != 0)
0045df33                  {
0045df52                  label_45df52:
0045df52                      class UIElement* eax_7 = UIElement::GetChildRecursive(eax_4, var_10);
0045df52                      
0045df59                      if (eax_7 != 0)
0045df59                      {
0045df65                          class UIElement_Text* eax_8 = eax_7->vtable->DynamicCast(0xc);
0045df65                          
0045df6f                          if (eax_8 != 0)
0045df6f                          {
0045df78                              UIElement_Text::SetStringInfo(eax_8, ebx_1);
0045df8b                              int32_t var_c;
0045df8b                              int32_t var_8;
0045df8b                              UIElement_Text::InqSizewMargins(eax_8, ebx_1, &var_c, &var_8, UITS_MAX_WIDTH);
0045df92                              int32_t eax_9 = UIRegion::GetWidth(eax_8);
0045dfa8                              int32_t ebx_3 = (UIRegion::GetWidth(eax_4) + (var_c - eax_9));
0045dfaa                              int32_t eax_11 = UIRegion::GetHeight(eax_8);
0045dfbc                              eax_4->vtable->ResizeTo(ebx_3, (UIRegion::GetHeight(eax_4) + (var_8 - eax_11)));
0045dfc9                              UIElement_Text::RecalculateGlyphList(eax_8);
0045dfd7                              arg5 = UIRegion::GetWidth(eax_4);
0045dfe8                              int32_t ebp_5 = UIRegion::GetHeight(eax_4);
0045dfe8                              
0045dff1                              if (eax_8->m_iScrollableHeight > UIRegion::GetHeight(eax_8))
0045e00b                                  ebp_5 = ((eax_8->m_iScrollableHeight - UIRegion::GetHeight(eax_8)) + UIRegion::GetHeight(eax_4));
0045e00b                              
0045e011                              eax_4->vtable->ResizeTo(arg5, ebp_5);
0045e024                              UIElementManager::StartTooltip(this, arg3, eax_4);
0045df6f                          }
0045df59                      }
0045df33                  }
0045df33                  else if (UIElement::GetAttribute_Enum(eax_4, 0x4a, &var_10) != 0)
0045df45                      goto label_45df52;
0045df45                  
0045e02d                  MasterPropertyGrabber::~MasterPropertyGrabber(&arg2);
0045def3              }
0045decf          }
0045deb9      }
0045de90  }

0045e03c                                                                                      90 90 90 90                              ....

0045e040  uint8_t __thiscall UIElementManager::StartDragandDrop(class UIElementManager* this, class UIElement* arg2, int32_t arg3, int32_t arg4)

0045e040  {
0045e047      class UIElement* edi = arg2;
0045e05c      class RenderDevice* eax;
0045e05c      
0045e05c      if ((edi != 0 && RenderDevice::render_device != 0))
0045e05c      {
0045e062          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045e062          
0045e06a          if ((ICIDM::s_cidm_1 != 0 && (CInputManager::IsActionInProgress(ICIDM::s_cidm_1, 7) != 0 && (this->m_dragX >= 0 && this->m_dragY >= 0))))
0045e06a          {
0045e0a3              eax = RenderDevice::GetDisplayWidth(RenderDevice::render_device);
0045e0a3              
0045e0ae              if (this->m_dragX <= eax)
0045e0ae              {
0045e0ba                  eax = RenderDevice::GetDisplayHeight(RenderDevice::render_device);
0045e0ba                  
0045e0c5                  if (this->m_dragY <= eax)
0045e0c5                  {
0045e0cf                      int32_t eax_2 = ICIDM::s_cidm_1->vtable->GetMouseX();
0045e0d8                      int32_t eax_3 = ICIDM::s_cidm_1->vtable->GetMouseY();
0045e0eb                      eax = (eax_2 - this->m_dragX);
0045e0ef                      int32_t ecx_7 = (eax_3 - this->m_dragY);
0045e0f1                      int32_t edx_2;
0045e0f1                      edx_2 = this->m_bDragStarted;
0045e0f1                      
0045e10e                      if ((edx_2 != 0 || ((ecx_7 * ecx_7) + (eax * eax)) >= 0x10))
0045e10e                      {
0045e116                          UIElementManager::ClearDragandDrop(this);
0045e124                          this->m_bDragStarted = 1;
0045e12b                          arg2 = 0;
0045e130                          UIElement::GetAttribute_Bool(edi, 0x3a, &arg2);
0045e13b                          struct UIElement::VTable* vtable = edi->vtable;
0045e13b                          
0045e13f                          if (arg2 != 0)
0045e13f                          {
0045e1b3                              class UIElement* var_34 = edi;
0045e1b7                              eax = vtable->GetParent();
0045e1b7                              
0045e1c3                              if (eax == 0)
0045e1c3                              {
0045e1d8                              label_45e1d8:
0045e1d8                                  class UIElement* ecx_21 = var_34;
0045e1d8                                  
0045e1e2                                  if ((ecx_21 != 0 && edi != ecx_21))
0045e1e2                                  {
0045e1e6                                      uint8_t edx_10 = UIElement::SetObjectIsTemporary(ecx_21, 1);
0045e1ef                                      int32_t var_48_5 = 1;
0045e1f1                                      UIElement::SetShouldOwnObject(var_34, edx_10);
0045e1f6                                      var_34->vtable->SetMouseVisible(0);
0045e20a                                      UIElement::SetIsRootElement(var_34, 1);
0045e213                                      var_34->vtable->MoveTo((eax_2 - arg3), (eax_3 - arg4));
0045e233                                      UIElement::BringChildToTop(this->m_pRootElement, var_34);
0045e238                                      class UIElement* ebx_5 = var_34;
0045e238                                      
0045e245                                      if (UIRegion::GetObjectA(ebx_5) != 0)
0045e245                                      {
0045e24f                                          this->m_dragY = eax_3;
0045e257                                          this->m_dragX = eax_2;
0045e267                                          this->m_dragBaseX = UIRegion::GetObjectA(ebx_5)->m_nVirtualX;
0045e279                                          this->m_dragBaseY = UIRegion::GetObjectA(ebx_5)->m_nVirtualY;
0045e27f                                          class UIElement* m_pElementWithMouseCapture = this->m_pElementWithMouseCapture;
0045e287                                          this->m_dragElement = ebx_5;
0045e28d                                          this->m_dragOwner = eax;
0045e28d                                          
0045e293                                          if (m_pElementWithMouseCapture == edi)
0045e293                                          {
0045e298                                              UIElementManager::ReleaseMouseCapture(this, m_pElementWithMouseCapture);
0045e2a6                                              UIElementManager::SetMouseCapture(this, this->m_dragElement);
0045e293                                          }
0045e293                                          
0045e2b3                                          UIElementManager::UpdateMouseOver(this, eax_2, eax_3);
0045e2c1                                          return 1;
0045e245                                      }
0045e1e2                                  }
0045e1c3                              }
0045e1c3                              else if (*(int32_t*)((char*)eax->vtable + 0xe8)(&var_34) != 0)
0045e1d6                                  goto label_45e1d8;
0045e13f                          }
0045e13f                          else
0045e13f                          {
0045e141                              class UIElement* eax_6 = vtable->GetParent();
0045e149                              uint8_t eax_7;
0045e149                              
0045e149                              if (eax_6 != 0)
0045e165                                  eax_7 = UIElementManager::StartDragandDrop(this, eax_6, (edi->m_box.m_x0 + arg3), (edi->m_box.m_y0 + arg4));
0045e165                              
0045e16c                              if ((eax_6 != 0 && eax_7 != 0))
0045e2c1                                  return 1;
0045e2c1                              
0045e196                              void var_28;
0045e196                              UIElementMessageInfo::UIElementMessageInfo(&var_28, edi->m_desc.m_elementID, edi, 0x21, 0, 0, this->m_dragX, this->m_dragY, 0, 0);
0045e1a2                              UIElementManager::BroadcastElementMessage(this, &var_28);
0045e13f                          }
0045e10e                      }
0045e0c5                  }
0045e0ae              }
0045e06a          }
0045e05c      }
0045e05c      
0045e1aa      eax = 0;
0045e1b0      return 0;
0045e040  }

0045e2c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0045e2d0  void* __thiscall AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >::`scalar deleting destructor'(class AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >* this, uint32_t arg2)

0045e2d0  {
0045e2d9      this->vtable = 0x79bd7c;
0045e2df      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(&this->m_intrusiveTable);
0045e2e4      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_buckets = this->m_intrusiveTable.m_buckets;
0045e2d4      this->m_intrusiveTable.vtable = 0x79bd60;
0045e2d4      
0045e2f2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0045e2f5          operator delete[](m_buckets);
0045e2f5      
0045e2d4      this->m_intrusiveTable.m_buckets = nullptr;
0045e2d4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045e2d4      this->m_intrusiveTable.m_numBuckets = 0;
0045e2d4      this->m_intrusiveTable.m_numElements = 0;
0045e2d4      
0045e310      if ((arg2 & 1) != 0)
0045e313          operator delete(this);
0045e313      
0045e31f      return this;
0045e2d0  }

0045e322        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0045e330  void _STL::sort(struct SurfaceUsageSummary* arg1, struct SurfaceUsageSummary* arg2)

0045e330  {
0045e33c      if (arg1 != arg2)
0045e33c      {
0045e351          int32_t i = (((char*)arg2 - arg1) / 0x18);
0045e353          int32_t eax_4 = 0;
0045e353          
0045e358          while (i != 1)
0045e358          {
0045e360              i s>>= 1;
0045e362              eax_4 += 1;
0045e358          }
0045e358          
0045e375          _STL::__introsort_loop(arg1, arg2, nullptr, (eax_4 * 2), arg1);
0045e381          _STL::__final_insertion_sort(arg1, arg2, arg1);
0045e33c      }
0045e330  }

0045e38c                                      90 90 90 90                                                              ....

0045e390  void __fastcall AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >::~AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >(class AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >* this)

0045e390  {
0045e394      this->vtable = 0x79bd7c;
0045e39c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(&this->m_intrusiveTable);
0045e3a1      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >** m_buckets = this->m_intrusiveTable.m_buckets;
0045e391      this->m_intrusiveTable.vtable = 0x79bd60;
0045e391      
0045e3af      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0045e3b2          operator delete[](m_buckets);
0045e3b2      
0045e391      this->m_intrusiveTable.m_buckets = nullptr;
0045e391      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045e391      this->m_intrusiveTable.m_numBuckets = 0;
0045e391      this->m_intrusiveTable.m_numElements = 0;
0045e390  }

0045e3ca                                90 90 90 90 90 90                                                            ......

0045e3d0  class UIElement* __thiscall UIElementManager::CreateRootElementByDataID(class UIElementManager* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

0045e3d0  {
0045e3e8      void var_8;
0045e3e8      class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x23));
0045e3e8      
0045e3f6      if (eax_1 == 0)
0045e434          return nullptr;
0045e434      
0045e3ff      class ElementDesc* eax_3 = LayoutDesc::AccessElementDesc(eax_1, arg3);
0045e3ff      
0045e406      if (eax_3 == 0)
0045e406      {
0045e408          eax_1->vtable->Release();
0045e418          return 0;
0045e406      }
0045e406      
0045e41f      class UIElement* result = UIElementManager::CreateRootElement(this, eax_1, eax_3);
0045e424      eax_1->vtable->Release();
0045e42d      return result;
0045e3d0  }

0045e437                                                                       90 90 90 90 90 90 90 90 90                         .........

0045e440  class UIElement* __thiscall UIElementManager::CreateChildElementByEnum(class UIElementManager* this, class UIElement* arg2, uint32_t const arg3, uint32_t arg4)

0045e440  {
0045e446      int32_t var_c = 0x23;
0045e448      int32_t var_10 = 5;
0045e44a      uint32_t const var_14 = arg3;
0045e44d      int32_t edx;
0045e44d      class DBObj* eax = DBObj::GetByEnum(arg3, edx, this);
0045e44d      
0045e459      if (eax == 0)
0045e45d          return eax;
0045e45d      
0045e467      class ElementDesc* eax_1 = LayoutDesc::AccessElementDesc(eax, arg4);
0045e467      
0045e46e      if (eax_1 == 0)
0045e46e      {
0045e470          eax->vtable->Release();
0045e47d          return 0;
0045e46e      }
0045e46e      
0045e489      class UIElement* eax_4 = UIElementManager::CreateChildElement(this, arg2, eax, eax_1);
0045e490      eax->vtable->Release();
0045e49b      return eax_4;
0045e440  }

0045e49e                                                                                            90 90                                ..

0045e4a0  class UIElement* __thiscall UIElementManager::CreateChildElementByDid(class UIElementManager* this, class UIElement* arg2, class IDClass<_tagDataID,32,0> arg3, uint32_t arg4)

0045e4a0  {
0045e4b8      void var_8;
0045e4b8      class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg3, 0x23));
0045e4b8      
0045e4c4      if (eax_1 == 0)
0045e4cb          return eax_1;
0045e4cb      
0045e4d5      class ElementDesc* eax_2 = LayoutDesc::AccessElementDesc(eax_1, arg4);
0045e4d5      
0045e4dc      if (eax_2 == 0)
0045e4dc      {
0045e4de          eax_1->vtable->Release();
0045e4ee          return 0;
0045e4dc      }
0045e4dc      
0045e4fa      class UIElement* eax_5 = UIElementManager::CreateChildElement(this, arg2, eax_1, eax_2);
0045e501      eax_1->vtable->Release();
0045e50f      return eax_5;
0045e4a0  }

0045e512                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0045e520  void __thiscall UIElementManager::DeletingElement(class UIElementManager* this, class UIElement* arg2)

0045e520  {
0045e522      class UIElement* ebp = arg2;
0045e522      
0045e52d      if (ebp != 0)
0045e52d      {
0045e534          UIElementManager::UnRegisterElementForAllInputActions(this, ebp);
0045e541          SmartArray<IConsoleCallbackObject *,1>::RemoveUnOrdered(&this->m_elementList.m_data, &arg2);
0045e551          arg2 = ebp;
0045e555          SmartArray<UIElement *,1>::RemoveOrdered(&this->m_activatableElements, &arg2);
0045e55a          class UIElement* m_focusElement_1 = this->m_focusElement;
0045e55a          
0045e562          if (m_focusElement_1 == ebp)
0045e564              m_focusElement_1->vtable->RelinquishFocus();
0045e564          
0045e56c          class UIElement* m_activeElement = this->m_activeElement;
0045e56c          
0045e578          if ((m_activeElement == ebp && m_activeElement != 0))
0045e578          {
0045e57a              class UIElement* m_focusElement = this->m_focusElement;
0045e582              this->m_activeElement = nullptr;
0045e582              
0045e588              if (m_focusElement != 0)
0045e588              {
0045e591                  UIElementManager::BroadcastElementMessage(this, m_focusElement, 0x2f, 0, 0);
0045e596                  this->m_focusElement->vtable->UnregisterInputMaps();
0045e5a4                  this->m_focusElement = nullptr;
0045e588              }
0045e578          }
0045e578          
0045e5b0          if (this->m_pElementWithMouseCapture == ebp)
0045e5b0          {
0045e5b2              this->m_pElementWithMouseCapture = nullptr;
0045e5b8              this->m_bPerformMouseHitTest = 1;
0045e5b0          }
0045e5b0          
0045e5c5          if (this->m_pElementLastOver == ebp)
0045e5c5          {
0045e5ca              UIElementManager::SwitchMouseOver(this, nullptr);
0045e5cf              this->m_pElementLastEntered = nullptr;
0045e5d5              this->m_pElementLastOver = nullptr;
0045e5db              this->m_pElementLastDragCursorOver = nullptr;
0045e5e1              this->m_bPerformMouseHitTest = 1;
0045e5c5          }
0045e5c5          
0045e5ee          if (this->m_pcPotentialDragElement == ebp)
0045e5f0              this->m_pcPotentialDragElement = nullptr;
0045e5f0          
0045e5fc          if (this->m_dragOwner == ebp)
0045e600              UIElementManager::ClearDragandDrop(this);
0045e600          
0045e60b          if (this->m_pTooltipOwner == ebp)
0045e60b          {
0045e60d              class UIElement* m_pTooltipElement = this->m_pTooltipElement;
0045e615              this->m_pTooltipOwner = nullptr;
0045e615              
0045e61b              if (m_pTooltipElement != 0)
0045e61b              {
0045e61d                  UIElement::AddToDeleteQueue(m_pTooltipElement);
0045e622                  this->m_pTooltipElement = nullptr;
0045e61b              }
0045e60b          }
0045e60b          
0045e628          class ContextMenu* m_pCSM = this->m_pCSM;
0045e628          
0045e638          if ((m_pCSM != 0 && m_pCSM->m_pParentDisplay == ebp))
0045e638          {
0045e63a              m_pCSM->vtable->__vecDelDtor(1);
0045e640              this->m_pCSM = nullptr;
0045e638          }
0045e638          
0045e64d          class ListNode<UIElementMessageInfo>* i = this->m_listQueuedElementMessages._head;
0045e64d          
0045e652          while (i != 0)
0045e652          {
0045e657              if (i->data.pElement != ebp)
0045e668                  i = i->next;
0045e657              else
0045e657              {
0045e659                  class ListNode<UIElementMessageInfo>* i_1 = i;
0045e65b                  i = i->next;
0045e661                  List<UIElementMessageInfo>::remove(&this->m_listQueuedElementMessages, i_1);
0045e657              }
0045e652          }
0045e52d      }
0045e520  }

0045e676                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045e680  void __thiscall UIElementManager::RegisterForGlobalMessage(class UIElementManager* this, class UIListener* arg2, uint32_t arg3)

0045e680  {
0045e686      if (arg2 != 0)
0045e695          UIElementManager::RegisterForMessageInternal(this, arg2, &this->m_globalMessageListenerTable, arg3);
0045e680  }

0045e69d                                                                                         90 90 90                               ...

0045e6a0  uint8_t __thiscall UIElementManager::OnAction(class UIElementManager* this, class InputEvent const* arg2)

0045e6a0  {
0045e6a9      uint32_t m_InputAction = arg2->m_InputAction;
0045e6a9      
0045e6ac      if (arg2->m_fStart != 0)
0045e6ac      {
0045e6b1          if (m_InputAction == 4)
0045e6b1          {
0045e6f0              m_InputAction = 1;
0045e6f3              return 1;
0045e6b1          }
0045e6b1          
0045e6b8          if ((m_InputAction > 4 && m_InputAction <= 0xf))
0045e6b8          {
0045e6ba              float m_InputExtent = arg2->m_InputExtent;
0045e6bd              float m_InputExtent_1 = m_InputExtent;
0045e6c2              UIElementManager::MouseDownEvent(((char*)this - 4), m_InputExtent, m_InputAction);
0045e6c7              int32_t eax_1;
0045e6c7              eax_1 = 1;
0045e6ca              return 1;
0045e6b8          }
0045e6ac      }
0045e6ac      else if ((m_InputAction - 4) <= 0xb)
0045e6d3      {
0045e6d3          switch (m_InputAction)
0045e6d3          {
0045e6e3              case 5:
0045e6e3              case 6:
0045e6e3              case 7:
0045e6e3              case 8:
0045e6e3              case 9:
0045e6e3              case 0xa:
0045e6e3              case 0xb:
0045e6e3              case 0xc:
0045e6e3              {
0045e6e3                  uint32_t m_pcCallback = arg2->m_pcCallback;
0045e6e6                  uint32_t m_pcCallback_1 = m_pcCallback;
0045e6eb                  UIElementManager::MouseUpEvent(((char*)this - 4), m_pcCallback, m_InputAction);
0045e6e3                  break;
0045e6e3              }
0045e6d3          }
0045e6d3          
0045e6f0          m_InputAction = 1;
0045e6f3          return 1;
0045e6d3      }
0045e6d3      
0045e6f6      m_InputAction = 0;
0045e6f9      return 0;
0045e6a0  }

0045e6fc  uint32_t jump_table_45e6fc[0x2] = 
0045e6fc  {
0045e6fc      [0x0] =  0x0045e6f0
0045e700      [0x1] =  0x0045e6e3
0045e704  }
0045e704  uint8_t lookup_table_45e704[0xc] = 
0045e704  {
0045e704      [0x0] =  0x00
0045e705      [0x1] =  0x01
0045e706      [0x2] =  0x01
0045e707      [0x3] =  0x01
0045e708      [0x4] =  0x01
0045e709      [0x5] =  0x01
0045e70a      [0x6] =  0x01
0045e70b      [0x7] =  0x01
0045e70c      [0x8] =  0x01
0045e70d      [0x9] =  0x00
0045e70e      [0xa] =  0x00
0045e70f      [0xb] =  0x00
0045e710  }

0045e710  void __thiscall UIElementManager::MouseMoveHandler(class UIElementManager* this, int32_t arg2, int32_t arg3)

0045e710  {
0045e71c      int32_t edi = arg3;
0045e729      *(uint32_t*)((char*)this->m_lastMouseMoveTime)[4] = *(int32_t*)((char*)Timer::local_time + 4);
0045e736      this->m_lastMouseMoveTime = (*(uint32_t*)Timer::local_time);
0045e736      
0045e743      if (UIRegion::PointIsOverRegion(this->m_pRootElement, arg2, edi) != 0)
0045e745          this->m_bMouseHasLeftTheWindow = 0;
0045e745      
0045e752      int32_t eax_1 = 0;
0045e752      
0045e756      if (this->m_bMouseHasLeftTheWindow == 0)
0045e756      {
0045e75e          arg3 = 0;
0045e76a          MouseHitTester<MouseOverCriteria>::Recurse(this->m_pRootElement, arg2, edi, &arg3);
0045e76f          eax_1 = arg3;
0045e756      }
0045e756      
0045e779      class UIElement* eax_3;
0045e779      int32_t edx;
0045e779      eax_3 = UIElementManager::SwitchMouseOver(this, eax_1);
0045e77e      eax_3 = this->m_bDragStarted;
0045e786      class UIElement* m_pcPotentialDragElement;
0045e786      
0045e786      if (eax_3 == 0)
0045e788          m_pcPotentialDragElement = this->m_pcPotentialDragElement;
0045e788      
0045e790      if ((eax_3 != 0 || m_pcPotentialDragElement == 0))
0045e790      {
0045e7bc          class UIElement* m_dragElement = this->m_dragElement;
0045e7bc          
0045e7c4          if (m_dragElement != 0)
0045e7c4          {
0045e7c6              eax_3 = m_dragElement->m_object;
0045e7c6              
0045e7ce              if (eax_3 != 0)
0045e80d                  eax_3 = *(int32_t*)((char*)eax_3->vtable + 0xc)(((this->m_dragBaseX - this->m_dragX) + arg2), ((this->m_dragBaseY - this->m_dragY) + edi), eax_3->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7], eax_3->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8]);
0045e7ce              else
0045e7ce              {
0045e7d0                  class UIRegion* m_parent = m_dragElement->m_parent;
0045e7d0                  
0045e7d8                  if (m_parent != 0)
0045e7d8                  {
0045e7da                      eax_3 = UIRegion::GetObjectA(m_parent);
0045e7da                      
0045e7e1                      if (eax_3 != 0)
0045e80d                          eax_3 = *(int32_t*)((char*)eax_3->vtable + 0xc)(((this->m_dragBaseX - this->m_dragX) + arg2), ((this->m_dragBaseY - this->m_dragY) + edi), eax_3->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7], eax_3->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8]);
0045e7d8                  }
0045e7ce              }
0045e7c4          }
0045e790      }
0045e790      else
0045e790      {
0045e799          int32_t ecx_5 = (edi - UIRegion::GetScreenY0(m_pcPotentialDragElement));
0045e7a9          int32_t edx_2 = (arg2 - UIRegion::GetScreenX0(this->m_pcPotentialDragElement));
0045e7b5          eax_3 = UIElementManager::StartDragandDrop(this, this->m_pcPotentialDragElement, edx_2, ecx_5);
0045e790      }
0045e790      
0045e810      class UIElement* ecx_17 = this->m_pElementWithMouseCapture;
0045e810      
0045e818      if (ecx_17 != 0)
0045e818      {
0045e838      label_45e838:
0045e838          int32_t var_10_5 = edi;
0045e839          int32_t var_14_4 = arg2;
0045e83a          UIRegion::NotifyMouseMove(ecx_17, eax_3, edx);
0045e83a          return;
0045e818      }
0045e818      
0045e81a      eax_3 = this->m_bDragStarted;
0045e81a      
0045e822      if (eax_3 == 0)
0045e822      {
0045e82e      label_45e82e:
0045e82e          ecx_17 = this->m_pElementLastEntered;
0045e82e          
0045e836          if (ecx_17 != 0)
0045e836              goto label_45e838;
0045e822      }
0045e822      else
0045e822      {
0045e824          eax_3 = this->m_dragElement;
0045e824          
0045e82c          if (eax_3 == 0)
0045e82c              goto label_45e82e;
0045e822      }
0045e710  }

0045e845                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0045e850  uint8_t UIElementManager::ConsoleCommand_PrintUISurfaceUsage()

0045e850  {
0045e850      int32_t ebp;
0045e850      int32_t var_4 = ebp;
0045e85c      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0045e862      int32_t* var_90 = &var_4;
0045e862      
0045e869      if (UIElementManager::s_pInstance_1 == 0)
0045e869      {
0045ed3a          UIElementManager::s_pInstance_1 = 0;
0045ed41          *(uint32_t*)var_90;
0045ed42          return 0;
0045e869      }
0045e869      
0045e86f      class SmartArray<UIElement *,1>* eax = &UIElementManager::s_pInstance_1->m_elementList;
0045e872      struct SurfaceUsageSummary* var_64 = nullptr;
0045e876      int32_t var_60 = 0;
0045e87a      int32_t var_5c = 0;
0045e87e      uint32_t m_num = eax->m_num;
0045e883      class PStringBase<char> PStringBase<char>::s_NullBuffer_10 = 0;
0045e887      void* var_80 = nullptr;
0045e88b      class SmartArray<UIElement *,1>* var_70 = eax;
0045e88f      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_11;
0045e88f      void* __offset(PSRefBufferCharData<char>, -0x14) esi_12;
0045e88f      bool cond:2_1;
0045e88f      
0045e88f      if (m_num <= 0)
0045e88f      {
0045ea8e      label_45ea8e:
0045ea8e          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_11, "No Root Elements w/ UISurfaces\n");
0045ea98          GlobalRegistry::OutputText(&PStringBase<char>::s_NullBuffer_11);
0045eaa1          esi_12 = &PStringBase<char>::s_NullBuffer_11->m_data[0xffffffec];
0045eaa1          
0045eab3          if (InterlockedDecrement(((char*)esi_12 + 4)) == 0)
0045eab3          {
0045eab9              cond:2_1 = esi_12 == 0;
0045ecc7          label_45ecc7:
0045ecc7              
0045ecc7              if (!(cond:2_1))
0045eccf                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_12) + -0x14)(1);
0045eab3          }
0045e88f      }
0045e88f      else
0045e88f      {
0045e8a3          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_9;
0045e8a3          uint32_t var_78;
0045e8a3          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_12;
0045e8a3          
0045e8a3          while (true)
0045e8a3          {
0045e8a3              class UIRegion* ebp_1 = eax[0].m_data[m_num];
0045e8a7              class UIElement** eax_1;
0045e8a7              eax_1 = *(int32_t*)((char*)ebp_1 + 0x556);
0045e8ad              m_num -= 1;
0045e8b0              var_78 = m_num;
0045e8b0              
0045e8b4              if ((eax_1 & 1) != 0)
0045e8b4              {
0045e8ba                  class UIObject* m_object = ebp_1->m_object;
0045e8ba                  
0045e8c2                  if (m_object != 0)
0045e8c2                  {
0045e8e3                  label_45e8e3:
0045e8e3                      void* eax_2 = *(int32_t*)((char*)m_object->vtable + 0x1c)();
0045e8e3                      
0045e8e8                      if (eax_2 != 0)
0045e8e8                      {
0045e8ee                          void* edi_1 = *(uint32_t*)((char*)eax_2 + 0x110);
0045e8ee                          
0045e8f6                          if (edi_1 != 0)
0045e8f6                          {
0045e8fc                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0045e901                              int32_t esi = *(int32_t*)((char*)ebp_1 + 0x2e4);
0045e907                              PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_1;
0045e90f                              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0045e911                              int32_t var_9c_2 = esi;
0045e91c                              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_9, "0x%08X");
0045e921                              void* edi_2 = *(uint32_t*)((char*)edi_1 + 8);
0045e92a                              enum PixelFormatID eax_4 = *(uint32_t*)((char*)edi_2 + 0x60);
0045e92d                              int32_t edx_2 = *(uint32_t*)((char*)edi_2 + 0x8c);
0045e936                              PStringBase<char>::s_NullBuffer_12 = *(uint32_t*)((char*)edi_2 + 0x88);
0045e951                              void var_40;
0045e951                              int32_t esi_3 = ((((uint32_t)*(uint8_t*)(PixelFormatDesc::PixelFormatDesc(&var_40, eax_4) + 0xc)) * edx_2) * PStringBase<char>::s_NullBuffer_12);
0045e956                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0045e95b                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_13 = PStringBase<char>::s_NullBuffer_2;
0045e963                              uint32_t esi_4 = (esi_3 >> 3);
0045e966                              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0045e971                              uint32_t var_58 = esi_4;
0045e975                              PStringBase<unsigned short>::operator=(&PStringBase<char>::s_NullBuffer_13, &PStringBase<char>::s_NullBuffer_9);
0045e983                              int32_t var_4c_1 = UIRegion::GetHeight(ebp_1);
0045e998                              int32_t var_50_1 = UIRegion::GetWidth(ebp_1);
0045e9a0                              int32_t var_44_1 = *(uint32_t*)((char*)edi_2 + 0x8c);
0045e9a9                              int32_t var_48_1 = *(uint32_t*)((char*)edi_2 + 0x88);
0045e9ad                              SmartArray<SurfaceUsageSummary,1>::add(&var_64, &var_58);
0045e9b2                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0045e9b7                              PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_3;
0045e9bf                              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
0045e9c1                              uint32_t var_9c_8 = esi_4;
0045e9cc                              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_11, &data_794344);
0045e9d5                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_15 = PStringBase<char>::s_NullBuffer_9->m_data[-4];
0045e9d8                              class PStringBase<char> PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_10;
0045e9df                              PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_15;
0045e9e5                              int32_t* eax_10 = &PStringBase<char>::s_NullBuffer_12;
0045e9e5                              
0045e9e9                              if (PStringBase<char>::s_NullBuffer_17 >= PStringBase<char>::s_NullBuffer_15)
0045e9eb                                  eax_10 = &PStringBase<char>::s_NullBuffer_10;
0045e9eb                              
0045e9f1                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_18 = PStringBase<char>::s_NullBuffer_11;
0045e9f5                              void* edx_5 = var_80;
0045e9f9                              PStringBase<char>::s_NullBuffer_10 = *(uint32_t*)eax_10;
0045e9fd                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_16 = PStringBase<char>::s_NullBuffer_18->m_data[-4];
0045ea00                              PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_16;
0045ea06                              int32_t* eax_12 = &PStringBase<char>::s_NullBuffer_12;
0045ea06                              
0045ea0a                              if (edx_5 >= PStringBase<char>::s_NullBuffer_16)
0045ea0c                                  eax_12 = &var_80;
0045ea0c                              
0045ea1f                              var_80 = *(uint32_t*)eax_12;
0045ea1f                              
0045ea2b                              if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_18[-1]) == 0 && PStringBase<char>::s_NullBuffer_18 != 0x14))
0045ea33                                  *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_18 + -0x14)(1);
0045ea33                              
0045ea39                              void* __offset(PSRefBufferCharData<char>, -0x14) esi_7 = &PStringBase<char>::s_NullBuffer_13->m_data[0xffffffec];
0045ea39                              
0045ea48                              if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0045ea50                                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0045ea50                              
0045ea56                              void* __offset(PSRefBufferCharData<char>, -0x14) esi_9 = &PStringBase<char>::s_NullBuffer_9->m_data[0xffffffec];
0045ea56                              
0045ea65                              if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
0045ea6d                                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
0045ea6d                              
0045ea6f                              m_num = var_78;
0045e8f6                          }
0045e8e8                      }
0045e8c2                  }
0045e8c2                  else
0045e8c2                  {
0045e8c4                      class UIRegion* m_parent = ebp_1->m_parent;
0045e8c4                      
0045e8cc                      if (m_parent != 0)
0045e8cc                      {
0045e8d2                          m_object = UIRegion::GetObjectA(m_parent);
0045e8d2                          
0045e8d9                          if (m_object != 0)
0045e8d9                              goto label_45e8e3;
0045e8cc                      }
0045e8c2                  }
0045e8b4              }
0045e8b4              
0045ea77              if (m_num <= 0)
0045ea77                  break;
0045ea77              
0045e89d              eax = var_70;
0045e8a3          }
0045e8a3          
0045ea83          if (var_5c == 0)
0045ea83              goto label_45ea8e;
0045ea83          
0045eac0          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
0045eac5          PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_4;
0045ead1          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
0045ead3          int32_t var_9c_15 = var_5c;
0045eade          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_11, &data_794344);
0045eae3          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer;
0045eaec          int32_t edi_3 = PStringBase<char>::s_NullBuffer_11->m_data[-4];
0045eaef          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_5;
0045eafa          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_5[-1]);
0045eafc          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer;
0045eb01          var_78 = PStringBase<char>::s_NullBuffer_6;
0045eb09          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_6[-1]);
0045eb13          char const* const var_9c_18 = "d bytes, %.02fMB e:(%4dx%4d) s:(…";
0045eb18          void* var_a0_1 = var_80;
0045eb19          char const* const var_a4_4 = "s - %";
0045eb1e          class PStringBase<char> PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_10;
0045eb1f          char const* const var_ac_1 = "d.) %";
0045eb24          int32_t var_b0_1 = edi_3;
0045eb25          void* const var_b4_1 = &data_79bdc0;
0045eb34          PStringBase<char>::sprintf(&var_78, "%s%d%s%d%s%d%s");
0045eb40          struct SurfaceUsageSummary* eax_25 = var_64;
0045eb49          _STL::sort(eax_25, &eax_25[var_5c]);
0045eb4e          int32_t ebp_2 = 0;
0045eb53          int32_t edi_4 = 0;
0045eb53          
0045eb57          if (var_5c > 0)
0045eb57          {
0045eb5d              var_80 = nullptr;
0045eb5d              
0045ec04              do
0045ec04              {
0045eb69                  void* esi_13 = ((char*)var_80 + var_64);
0045eb6c                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer;
0045eb71                  int32_t edx_13 = *(uint32_t*)esi_13;
0045eb73                  PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_7;
0045eb7b                  edi_4 += edx_13;
0045eb7d                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_7[-1]);
0045eb85                  int32_t eax_28 = *(uint32_t*)esi_13;
0045eb87                  int32_t var_9c_20 = *(uint32_t*)((char*)esi_13 + 0x14);
0045eb8b                  var_a0_1 = *(uint32_t*)((char*)esi_13 + 0x10);
0045eb8f                  ebp_2 += 1;
0045eb92                  int32_t var_a4_5 = *(uint32_t*)((char*)esi_13 + 0xc);
0045eb97                  long double x87_r7_1 = ((long double)eax_28);
0045eb9b                  int32_t var_a8_1 = *(uint32_t*)((char*)esi_13 + 8);
0045eb9b                  
0045eb9c                  if (eax_28 < 0)
0045eb9e                      x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0045eb9e                  
0045ebb5                  var_b0_1 = ((double)(x87_r7_1 * ((long double)9.53674316e-07f)));
0045ebb8                  int32_t var_b4_2 = eax_28;
0045ebbc                  int32_t var_b8_1 = *(uint32_t*)((char*)esi_13 + 4);
0045ebbd                  int32_t var_bc_2 = ebp_2;
0045ebc0                  PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_10, var_78);
0045ebca                  GlobalRegistry::OutputText(&PStringBase<char>::s_NullBuffer_10);
0045ebd3                  int32_t* esi_15 = (PStringBase<char>::s_NullBuffer_10 - 0x14);
0045ebd3                  
0045ebe9                  if ((InterlockedDecrement(&esi_15[1]) == 0 && esi_15 != 0))
0045ebf1                      **(uint32_t**)esi_15(1);
0045ebf1                  
0045ec00                  var_80 += 0x18;
0045ec04              } while (ebp_2 < var_5c);
0045eb57          }
0045eb57          
0045ec0c          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer;
0045ec11          PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_8;
0045ec19          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_8[-1]);
0045ec21          long double x87_r7_3 = ((long double)edi_4);
0045ec21          
0045ec25          if (edi_4 < 0)
0045ec27              x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
0045ec27          
0045ec3a          var_a0_1 = ((double)(x87_r7_3 * ((long double)9.53674316e-07f)));
0045ec3d          int32_t var_a4_6 = edi_4;
0045ec3e          int32_t var_a8_2 = var_5c;
0045ec45          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_9, " %d elements, %d bytes tot, %.02…");
0045ec4f          GlobalRegistry::OutputText(&PStringBase<char>::s_NullBuffer_9);
0045ec5e          void* __offset(PSRefBufferCharData<char>, -0x14) esi_17 = &PStringBase<char>::s_NullBuffer_9->m_data[0xffffffec];
0045ec5e          
0045ec70          if ((InterlockedDecrement(((char*)esi_17 + 4)) == 0 && esi_17 != 0))
0045ec78              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_17) + -0x14)(1);
0045ec78          
0045ec7e          int32_t* esi_19 = (var_78 - 0x14);
0045ec7e          
0045ec8d          if ((InterlockedDecrement(&esi_19[1]) == 0 && esi_19 != 0))
0045ec95              **(uint32_t**)esi_19(1);
0045ec95          
0045ec9b          void* __offset(PSRefBufferCharData<char>, -0x14) esi_21 = &PStringBase<char>::s_NullBuffer_12->m_data[0xffffffec];
0045ec9b          
0045ecaa          if ((InterlockedDecrement(((char*)esi_21 + 4)) == 0 && esi_21 != 0))
0045ecb2              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_21) + -0x14)(1);
0045ecb2          
0045ecb8          esi_12 = &PStringBase<char>::s_NullBuffer_11->m_data[0xffffffec];
0045ecb8          
0045ecc3          if (InterlockedDecrement(((char*)esi_12 + 4)) == 0)
0045ecc3          {
0045ecc5              cond:2_1 = esi_12 == 0;
0045ecc5              goto label_45ecc7;
0045ecc3          }
0045e88f      }
0045e88f      
0045ecdf      if ((var_60 & 0x80000000) == 0x80000000)
0045ecdf      {
0045ece1          struct SurfaceUsageSummary* ecx_28 = var_64;
0045ece1          
0045ece7          if (ecx_28 != 0)
0045ece7          {
0045ece9              int32_t Bytes = ecx_28->Bytes;
0045ece9              
0045ecf6              if ((Bytes - 1) >= 0)
0045ecf6              {
0045ecfb                  int32_t ebx_1 = Bytes;
0045ecfe                  void* edi_6 = &ecx_28[Bytes].Name;
0045ed24                  int32_t i;
0045ed24                  
0045ed24                  do
0045ed24                  {
0045ed00                      int32_t esi_23 = *(uint32_t*)((char*)edi_6 - 0x18);
0045ed03                      edi_6 -= 0x18;
0045ed03                      
0045ed19                      if ((InterlockedDecrement((esi_23 - 0x10)) == 0 && esi_23 != 0x14))
0045ed21                          **(uint32_t**)(esi_23 - 0x14)(1);
0045ed21                      
0045ed23                      i = ebx_1;
0045ed23                      ebx_1 -= 1;
0045ed24                  } while (i != 1);
0045ecf6              }
0045ecf6              
0045ed27              operator delete[](((char*)ecx_28 - 4));
0045ece7          }
0045ecdf      }
0045ecdf      
0045ed2f      int32_t eax_41;
0045ed2f      eax_41 = 1;
0045ed37      *(uint32_t*)var_90;
0045ed38      return 1;
0045e850  }

0045ed43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0045ed50  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>* this)

0045ed50  {
0045ed5b      while (this->m_numElements != 0)
0045ed5b      {
0045ed69          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0045ed6f          class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_firstInterestingBucket_2;
0045ed6f          void* edi_1;
0045ed6f          
0045ed6f          if (this->m_firstInterestingBucket == ecx_1)
0045ed6f          {
0045ed82          label_45ed82:
0045ed82              m_firstInterestingBucket_2 = nullptr;
0045ed84              edi_1 = nullptr;
0045ed6f          }
0045ed6f          else
0045ed6f          {
0045ed71              while (true)
0045ed71              {
0045ed71                  class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0045ed71                  
0045ed76                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0045ed76                  {
0045ed88                      class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0045ed8b                      edi_1 = *(uint32_t*)m_firstInterestingBucket_1;
0045ed8d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0045ed8d                      break;
0045ed76                  }
0045ed76                  
0045ed7d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0045ed7d                  
0045ed80                  if (&m_firstInterestingBucket[1] == ecx_1)
0045ed80                      goto label_45ed82;
0045ed71              }
0045ed6f          }
0045ed6f          
0045ed8f          class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0045ed8f          
0045ed93          if (m_hashNext == edi_1)
0045eda5              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0045ed93          else
0045ed93          {
0045ed9c              class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >* m_hashNext_1;
0045ed9c              
0045ed9c              do
0045ed9c              {
0045ed95                  m_hashNext_1 = m_hashNext;
0045ed97                  m_hashNext = m_hashNext->m_hashNext;
0045ed9c              } while (m_hashNext != edi_1);
0045ed9c              
0045eda0              if (m_hashNext_1 != 0)
0045edac                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0045eda0              else
0045eda5                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0045ed93          }
0045ed93          
0045edb5          this->m_numElements -= 1;
0045edb5          
0045edb8          if (edi_1 != 0)
0045edb8          {
0045edbf              *(uint32_t*)((char*)edi_1 + 8) = 0x79bd7c;
0045edc6              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(((char*)edi_1 + 0xc));
0045edcb              void* eax_4 = *(uint32_t*)((char*)edi_1 + 0x6c);
0045edd3              *(uint32_t*)((char*)edi_1 + 0xc) = 0x79bd60;
0045edd3              
0045edd9              if (eax_4 != ((char*)edi_1 + 0x10))
0045eddc                  operator delete[](eax_4);
0045eddc              
0045ede5              *(uint32_t*)((char*)edi_1 + 0x6c) = 0;
0045ede8              *(uint32_t*)((char*)edi_1 + 0x70) = 0;
0045edeb              *(uint32_t*)((char*)edi_1 + 0x74) = 0;
0045edee              *(uint32_t*)((char*)edi_1 + 0x78) = 0;
0045edf1              operator delete(edi_1);
0045edb8          }
0045ed5b      }
0045ed50  }

0045ee07                       90 90 90 90 90 90 90 90 90                                                         .........

0045ee10  uint8_t __fastcall UIElementManager::Init(class UIElementManager* this)

0045ee10  {
0045ee21      void* var_8;
0045ee21      PStringBase<char>::PStringBase<char>(&var_8, "Tooltip Delay");
0045ee41      uint32_t* edi;
0045ee41      UserPreferences::RegisterPreference(&this->m_tooltipDelay, &Misc_TooltipDelay, &var_8, UIElementManager::HandlePreferenceCallback, nullptr, 0, nullptr, edi);
0045ee50      int32_t* edi_2 = ((char*)var_8 - 0x14);
0045ee50      
0045ee5f      if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0045ee67          **(uint32_t**)edi_2(1);
0045ee67      
0045ee72      PStringBase<char>::PStringBase<char>(&var_8, "Tooltip Enable");
0045ee92      UserPreferences::RegisterPreference(&this->m_tooltipEnable, &Misc_TooltipEnable, &var_8, UIElementManager::HandlePreferenceCallback, nullptr, 0, nullptr);
0045ee9b      void* edi_4 = ((char*)var_8 - 0x14);
0045ee9b      
0045eeaa      if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
0045eeb2          **(uint32_t**)edi_4(1);
0045eeb2      
0045eeb9      Render::LinkRGRCallback(RefreshEvent_g);
0045eec1      Timer::Init();
0045eec6      UIElement_Field::Register();
0045eecb      UIElement_Button::Register();
0045eed0      UIElement_Text::Register();
0045eed5      UIElement_Scrollbar::Register();
0045eeda      UIElement_Meter::Register();
0045eedf      UIElement_ListBox::Register();
0045eee4      UIElement_Menu::Register();
0045eee9      UIElement_Dragbar::Register();
0045eeee      UIElement_Panel::Register();
0045eef3      UIElement_Viewport::Register();
0045eef8      UIElement_Resizebar::Register();
0045eefd      UIElement_Browser::Register();
0045ef02      UIElement_ColorPicker::Register();
0045ef07      UIElement_GroupBox::Register();
0045ef0c      ConfirmationDialog::Register();
0045ef11      ConfirmationMenuDialog::Register();
0045ef16      ConfirmationTextInputDialog::Register();
0045ef1b      MenuDialog::Register();
0045ef20      MessageDialog::Register();
0045ef25      TextInputDialog::Register();
0045ef2a      WaitDialog::Register();
0045ef33      class UIElement* eax_2 = UIElementManager::CreateHollowElement(this, nullptr);
0045ef3a      this->m_pRootElement = eax_2;
0045ef3a      
0045ef40      if (eax_2 == 0)
0045ef40      {
0045ef44          eax_2 = 0;
0045ef4a          return 0;
0045ef40      }
0045ef40      
0045ef4b      eax_2->__inner23 |= 4;
0045ef5a      SmartArray<unsigned long,1>::Reset(&this->m_activatableElements);
0045ef65      int32_t eax_4 = (this->m_activatableElements.m_sizeAndDeallocate & 0x7fffffff);
0045ef6c      uint8_t eax_7;
0045ef6c      
0045ef6c      if (this->m_activatableElements.m_num >= eax_4)
0045ef7a          eax_7 = SmartArray<unsigned long,1>::grow(&this->m_activatableElements, SmartArray<unsigned long,1>::get_new_size(&this->m_activatableElements, (eax_4 + 1)));
0045ef7a      
0045ef81      if ((this->m_activatableElements.m_num < eax_4 || eax_7 != 0))
0045ef81      {
0045ef52          this->m_activatableElements.m_data[this->m_activatableElements.m_num] = this->m_pRootElement;
0045ef52          this->m_activatableElements.m_num += 1;
0045ef81      }
0045ef81      
0045ef94      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045ef94      
0045ef9c      if (ICIDM::s_cidm_1 != 0)
0045ef9c      {
0045ef9e          ICIDM::s_cidm_1->vtable->RegisterInputHandler(this, 0x11);
0045efa6          ICIDM::s_cidm->vtable->RegisterInputMap(3, &this->vtable, 0);
0045efb9          ICIDM::s_cidm->vtable->RegisterInputMap(0xd, &this->vtable, 0xfa0);
0045ef9c      }
0045ef9c      
0045efd5      class PStringBase<char> __return;
0045efd5      PStringBase<char>::PStringBase<char>(&__return, "The UIElementManager will tell y…");
0045efe3      PStringBase<char>::PStringBase<char>(&var_8, "UIElementManager.PrintUISurfaceU…");
0045eff7      GlobalRegistry::RegisterCommand(UIElementManager::ConsoleCommand_PrintUISurfaceUsage, &var_8, &__return);
0045f000      void* edi_8 = ((char*)var_8 - 0x14);
0045f000      
0045f012      if ((InterlockedDecrement(((char*)edi_8 + 4)) == 0 && edi_8 != 0))
0045f01a          **(uint32_t**)edi_8(1);
0045f01a      
0045f020      int32_t* edi_10 = (__return - 0x14);
0045f020      
0045f02f      if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
0045f037          **(uint32_t**)edi_10(1);
0045f037      
0045f04d      this->m_debugFontDID.id = DBObj::GetDIDByEnum(&__return, 0x17, 9)->id;
0045f054      class IDClass<_tagDataID,32,0>* eax_15;
0045f054      eax_15 = 1;
0045f05a      return 1;
0045ee10  }

0045f05b                                                                                   90 90 90 90 90                             .....

0045f060  uint8_t __thiscall HashTable<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >,1>::add(class HashTable<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >,1>* this, uint32_t const* arg2, class AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > const* arg3)

0045f060  {
0045f060      class HashTable<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >,1>* this_1 = this;
0045f06f      void* esi = operator new(0x7c);
0045f06f      
0045f078      if (esi == 0)
0045f0b0          esi = nullptr;
0045f078      else
0045f078      {
0045f085          *(uint32_t*)esi = *(uint32_t*)arg2;
0045f087          *(uint32_t*)((char*)esi + 4) = 0;
0045f08d          *(uint32_t*)((char*)esi + 8) = 0x79bd7c;
0045f09a          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>(((char*)esi + 0xc), arg3->m_intrusiveTable.m_numBuckets);
0045f0a2          HashTable<unsigned long,SmartArray<UIMessageData,1>,1>::operator=(((char*)esi + 8), arg3);
0045f0a7          *(uint32_t*)((char*)esi + 8) = 0x79bd7c;
0045f078      }
0045f078      
0045f0c1      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::add(&this->m_intrusiveTable, esi) != 0)
0045f115          return 1;
0045f115      
0045f0c5      if (esi != 0)
0045f0c5      {
0045f0cc          *(uint32_t*)((char*)esi + 8) = 0x79bd7c;
0045f0d3          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(((char*)esi + 0xc));
0045f0d8          void* eax_3 = *(uint32_t*)((char*)esi + 0x6c);
0045f0e0          *(uint32_t*)((char*)esi + 0xc) = 0x79bd60;
0045f0e0          
0045f0e6          if (eax_3 != ((char*)esi + 0x10))
0045f0e9              operator delete[](eax_3);
0045f0e9          
0045f0f2          *(uint32_t*)((char*)esi + 0x6c) = 0;
0045f0f5          *(uint32_t*)((char*)esi + 0x70) = 0;
0045f0f8          *(uint32_t*)((char*)esi + 0x74) = 0;
0045f0fb          *(uint32_t*)((char*)esi + 0x78) = 0;
0045f0fe          operator delete(esi);
0045f0c5      }
0045f0c5      
0045f10c      return 0;
0045f060  }

0045f118                                                                          90 90 90 90 90 90 90 90                          ........

0045f120  void __fastcall UIElementManager::Cleanup(class UIElementManager* this)

0045f120  {
0045f120      class UIElementManager* this_1 = this;
0045f125      class ContextMenu* m_pCSM = this->m_pCSM;
0045f125      
0045f12f      if (m_pCSM != 0)
0045f131          m_pCSM->vtable->__vecDelDtor(1);
0045f131      
0045f137      class UIElement* m_dragElement = this->m_dragElement;
0045f13f      this->m_pCSM = nullptr;
0045f13f      
0045f153      if ((m_dragElement != 0 && (((int8_t)(m_dragElement->__inner23 >> 0xf)) & 1) != 0))
0045f153      {
0045f155          UIElement::AddToDeleteQueue(m_dragElement);
0045f15a          this->m_dragElement = nullptr;
0045f153      }
0045f153      
0045f160      class UIElement* m_pTooltipElement = this->m_pTooltipElement;
0045f168      this->m_bDragStarted = 0;
0045f16e      this->m_dragOwner = nullptr;
0045f174      this->m_pcPotentialDragElement = nullptr;
0045f174      
0045f17a      if (m_pTooltipElement != 0)
0045f17a      {
0045f17c          UIElement::AddToDeleteQueue(m_pTooltipElement);
0045f181          this->m_pTooltipElement = nullptr;
0045f17a      }
0045f17a      
0045f189      UIElementManager::CleanDeleteQueue(this);
0045f193      UserPreferences::UnregisterPreference(&Misc_TooltipDelay);
0045f19d      UserPreferences::UnregisterPreference(&Misc_TooltipEnable);
0045f1a2      class UIElement* m_pRootElement = this->m_pRootElement;
0045f1a2      
0045f1ad      if (m_pRootElement != 0)
0045f1af          m_pRootElement->vtable->__vecDelDtor(1);
0045f1af      
0045f1bb      this->m_pRootElement = nullptr;
0045f1c1      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::delete_contents(&this->m_elementListenerTable.m_intrusiveTable);
0045f1cc      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(&this->m_globalMessageListenerTable.m_intrusiveTable);
0045f1d4      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_classCreateMethodTable.m_intrusiveTable);
0045f1df      SmartArray<unsigned long,1>::Reset(&this->m_activatableElements);
0045f1e9      Render::UnlinkRGRCallback(RefreshEvent_g);
0045f1ee      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045f1ee      
0045f1f9      if (ICIDM::s_cidm_1 != 0)
0045f1f9      {
0045f1fb          ICIDM::s_cidm_1->vtable->UnregisterInputHandler(this, 0x11);
0045f203          ICIDM::s_cidm->vtable->UnregisterInputMap(3, &this->vtable);
0045f214          ICIDM::s_cidm->vtable->UnregisterInputMap(0xd, &this->vtable);
0045f1f9      }
0045f1f9      
0045f22c      PStringBase<char>::PStringBase<char>(&this_1, "UIElementManager.ShowDebggingWin…");
0045f236      GlobalRegistry::UnregisterCommand(&this_1);
0045f245      void* __offset(UIElementManager, -0x14) esi_3 = ((char*)this_1 - 0x14);
0045f245      
0045f257      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0045f25f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0045f25f      
0045f26a      PStringBase<char>::PStringBase<char>(&this_1, "UIElementManager.PrintUISurfaceU…");
0045f274      GlobalRegistry::UnregisterCommand(&this_1);
0045f27d      void* __offset(UIElementManager, -0x14) esi_5 = ((char*)this_1 - 0x14);
0045f27d      
0045f290      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0045f298          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0045f120  }

0045f29e                                                                                            90 90                                ..

0045f2a0  void __thiscall UIElementManager::RegisterForElementMessage(class UIElementManager* this, class UIListener* arg2, uint32_t arg3, uint32_t arg4)

0045f2a0  {
0045f2ad      if (arg2 != 0)
0045f2ad      {
0045f2c4          class List<NoticeHandler *>** eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_elementListenerTable, &arg3);
0045f2c4          
0045f2cb          if (eax_1 == 0)
0045f2cb          {
0045f2d2              int32_t var_74 = 0x79bd7c;
0045f2da              void var_70;
0045f2da              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>(&var_70, eax_1);
0045f2ee              var_74 = 0x79bd7c;
0045f2f6              HashTable<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >,1>::add(&this->m_elementListenerTable.vtable, &arg3, &var_74);
0045f2ff              AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >::~AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >(&var_74);
0045f30e              eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_elementListenerTable, &arg3);
0045f2cb          }
0045f2cb          
0045f31f          UIElementManager::RegisterForMessageInternal(this, arg2, eax_1, arg4);
0045f31f          
0045f336          if ((((arg4 == 0x1c || arg4 == 0x1d) || arg4 == 0x19) || arg4 == 0x40))
0045f336          {
0045f338              uint32_t m_num = this->m_elementList.m_num;
0045f338              
0045f33d              if (m_num > 0)
0045f33d              {
0045f33f                  uint32_t ebx_1 = arg3;
0045f33f                  
0045f36e                  do
0045f36e                  {
0045f353                      int32_t* ecx_7 = this->m_elementList.m_data[(m_num - 1)];
0045f35d                      m_num -= 1;
0045f35d                      
0045f360                      if (ecx_7[0xb9] == ebx_1)
0045f366                          *(uint32_t*)(*(uint32_t*)ecx_7 + 0x110)(1);
0045f36e                  } while (m_num > 0);
0045f33d              }
0045f336          }
0045f2ad      }
0045f2a0  }

0045f348                          8d a4 24 00 00 00 00 90                                                          ..$.....
0045f379                                                                             90 90 90 90 90 90 90                           .......

0045f380  void __fastcall UIElementManager::~UIElementManager(class UIElementManager* this)

0045f380  {
0045f384      *(uint32_t*)((char*)this - 4) = 0x79bef4;
0045f38b      this->vtable = 0x79bee8;
0045f38b      
0045f3a2      if ((this->m_activatableElements.m_data & 0x80000000) == 0x80000000)
0045f3ab          operator delete[](this->m_activeElement);
0045f3ab      
0045f3bb      this->m_pElementLastDragCursorOver = &HashSet<unsigned long>::`vftable';
0045f3c5      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_setActionsTriggeringCapture);
0045f3ca      class HashSetData<unsigned long>* eax_2 = this->m_setActionsTriggeringCapture.m_intrusiveTable.m_aInplaceBuckets[0x16];
0045f3b3      this->m_setActionsTriggeringCapture.vtable = 0x79bd6c;
0045f3b3      
0045f3d8      if (eax_2 != &this->m_setActionsTriggeringCapture.m_intrusiveTable)
0045f3db          operator delete[](eax_2);
0045f3db      
0045f3b3      this->m_setActionsTriggeringCapture.m_intrusiveTable.m_aInplaceBuckets[0x16] = nullptr;
0045f3b3      this->m_setActionsTriggeringCapture.m_intrusiveTable.m_buckets = nullptr;
0045f3b3      this->m_setActionsTriggeringCapture.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045f3b3      this->m_setActionsTriggeringCapture.m_intrusiveTable.m_numBuckets = 0;
0045f3f7      List<UIElementMessageInfo>::~List<UIElementMessageInfo>(&this->m_elementInputActionListenerTable.m_intrusiveTable.m_numElements);
0045f404      this->m_aUIMessageRemovalData.m_num = 0x79bd78;
0045f40e      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(&this->m_elementInputActionListenerTable);
0045f413      class HashTableData<unsigned long,SmartArray<UIElement *,1> >* eax_3 = this->m_elementInputActionListenerTable.m_intrusiveTable.m_aInplaceBuckets[0x16];
0045f3fc      this->m_elementInputActionListenerTable.vtable = 0x79bd64;
0045f3fc      
0045f421      if (eax_3 != &this->m_elementInputActionListenerTable.m_intrusiveTable)
0045f424          operator delete[](eax_3);
0045f424      
0045f3fc      this->m_elementInputActionListenerTable.m_intrusiveTable.m_aInplaceBuckets[0x16] = nullptr;
0045f3fc      this->m_elementInputActionListenerTable.m_intrusiveTable.m_buckets = nullptr;
0045f3fc      this->m_elementInputActionListenerTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045f3fc      this->m_elementInputActionListenerTable.m_intrusiveTable.m_numBuckets = 0;
0045f3fc      
0045f44a      if ((this->m_aUIMessageRemovalData.m_data & 0x80000000) == 0x80000000)
0045f453          operator delete[](this->m_globalMessageListenerTable.m_intrusiveTable.m_numElements);
0045f453      
0045f463      this->m_elementListenerTable.m_intrusiveTable.m_numElements = 0x79bd7c;
0045f46d      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::delete_contents(&this->m_globalMessageListenerTable);
0045f472      class HashTableData<unsigned long,SmartArray<UIMessageData,1> >* eax_5 = this->m_globalMessageListenerTable.m_intrusiveTable.m_aInplaceBuckets[0x16];
0045f45b      this->m_globalMessageListenerTable.vtable = 0x79bd60;
0045f45b      
0045f480      if (eax_5 != &this->m_globalMessageListenerTable.m_intrusiveTable)
0045f483          operator delete[](eax_5);
0045f483      
0045f45b      this->m_globalMessageListenerTable.m_intrusiveTable.m_aInplaceBuckets[0x16] = nullptr;
0045f45b      this->m_globalMessageListenerTable.m_intrusiveTable.m_buckets = nullptr;
0045f45b      this->m_globalMessageListenerTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045f45b      this->m_globalMessageListenerTable.m_intrusiveTable.m_numBuckets = 0;
0045f49f      this->m_vGlobalScale.z = 1.11806297e-38f;
0045f4a9      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::delete_contents(&this->m_elementListenerTable);
0045f4ae      class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >* eax_6 = this->m_elementListenerTable.m_intrusiveTable.m_aInplaceBuckets[0x16];
0045f497      this->m_elementListenerTable.vtable = 0x79bd5c;
0045f497      
0045f4bc      if (eax_6 != &this->m_elementListenerTable.m_intrusiveTable)
0045f4bf          operator delete[](eax_6);
0045f4bf      
0045f497      this->m_elementListenerTable.m_intrusiveTable.m_aInplaceBuckets[0x16] = nullptr;
0045f497      this->m_elementListenerTable.m_intrusiveTable.m_buckets = nullptr;
0045f497      this->m_elementListenerTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045f497      this->m_elementListenerTable.m_intrusiveTable.m_numBuckets = 0;
0045f4d8      this->m_elementList.m_num = 0x79bd70;
0045f4df      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_classCreateMethodTable);
0045f4e4      class HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)>* eax_7 = this->m_classCreateMethodTable.m_intrusiveTable.m_aInplaceBuckets[0x16];
0045f4d3      this->m_classCreateMethodTable.vtable = 0x79bd68;
0045f4d3      
0045f4f2      if (eax_7 != &this->m_classCreateMethodTable.m_intrusiveTable)
0045f4f5          operator delete[](eax_7);
0045f4f5      
0045f4d3      this->m_classCreateMethodTable.m_intrusiveTable.m_aInplaceBuckets[0x16] = nullptr;
0045f4d3      this->m_classCreateMethodTable.m_intrusiveTable.m_buckets = nullptr;
0045f4d3      this->m_classCreateMethodTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045f4d3      this->m_classCreateMethodTable.m_intrusiveTable.m_numBuckets = 0;
0045f4d3      
0045f518      if ((this->m_elementList.m_data & 0x80000000) == 0x80000000)
0045f51e          operator delete[](this->m_deleteQueue.m_num);
0045f51e      
0045f535      if ((this->m_deleteQueue.m_data & 0x80000000) == 0x80000000)
0045f53b          operator delete[](this->vtable);
0045f53b      
0045f546      int32_t eax_10 = -(((char*)this - 4));
0045f54a      void* eax_12 = ((eax_10 - eax_10) & this);
0045f54d      *(uint32_t*)eax_12 = 0x794824;
0045f553      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045f553      
0045f55d      if (ICIDM::s_cidm_1 != 0)
0045f55f          ICIDM::s_cidm_1->vtable->UnregisterCallback(eax_12);
0045f380  }

0045f566                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0045f570  void* __thiscall HashTable<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >,1>::`scalar deleting destructor'(class HashTable<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> >,1>* this, uint32_t arg2)

0045f570  {
0045f579      this->vtable = 0x79bf0c;
0045f57f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::delete_contents(&this->m_intrusiveTable);
0045f584      class HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > >** m_buckets = this->m_intrusiveTable.m_buckets;
0045f574      this->m_intrusiveTable.vtable = 0x79bd5c;
0045f574      
0045f592      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0045f595          operator delete[](m_buckets);
0045f595      
0045f574      this->m_intrusiveTable.m_buckets = nullptr;
0045f574      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0045f574      this->m_intrusiveTable.m_numBuckets = 0;
0045f574      this->m_intrusiveTable.m_numElements = 0;
0045f574      
0045f5b0      if ((arg2 & 1) != 0)
0045f5b3          operator delete(this);
0045f5b3      
0045f5bf      return this;
0045f570  }

0045f5c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0045f5d0  void __fastcall UIElementManager::UIElementManager(class UIElementManager* this)

0045f5d0  {
0045f5d4      this->vtable = &IInputActionCallback::`vftable';
0045f5db      this->vtable = 0x79bef4;
0045f5e1      this->vtable = &UIElementManager::`vftable';
0045f5ea      __builtin_memset(&this->m_deleteQueue, 0, 0x18);
0045f601      this->m_classCreateMethodTable.vtable = 0x79bd70;
0045f608      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &)> *,0>(&this->m_classCreateMethodTable.m_intrusiveTable, 0x17);
0045f60d      this->m_pHollowLayoutDesc = nullptr;
0045f613      this->m_pHollowElementDesc = nullptr;
0045f620      this->m_elementListenerTable.vtable = 0x79bf0c;
0045f62a      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,AutoGrowHashTable<unsigned long,SmartArray<UIMessageData,1> > > *,1>(&this->m_elementListenerTable.m_intrusiveTable, 0);
0045f62f      this->m_elementListenerTable.vtable = 0x79bf0c;
0045f640      this->m_globalMessageListenerTable.vtable = 0x79bd7c;
0045f64a      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIMessageData,1> > *,1>(&this->m_globalMessageListenerTable.m_intrusiveTable, 0);
0045f64f      this->m_globalMessageListenerTable.vtable = 0x79bd7c;
0045f659      this->m_aUIMessageRemovalData.m_data = 0;
0045f65f      this->m_aUIMessageRemovalData.m_sizeAndDeallocate = 0;
0045f665      this->m_aUIMessageRemovalData.m_num = 0;
0045f672      this->m_elementInputActionListenerTable.vtable = 0x79bd78;
0045f67c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SmartArray<UIElement *,1> > *,1>(&this->m_elementInputActionListenerTable.m_intrusiveTable, 0);
0045f681      this->m_elementInputActionListenerTable.vtable = 0x79bd78;
0045f68b      this->m_listQueuedElementMessages.vtable = 0x79bd58;
0045f695      this->m_listQueuedElementMessages._head = nullptr;
0045f69b      this->m_listQueuedElementMessages._tail = nullptr;
0045f6a1      this->m_listQueuedElementMessages._num_elements = 0;
0045f6a7      this->m_bBroadcastingMessage = 0;
0045f6b2      this->m_defaultCursorDID.id = INVALID_DID.id;
0045f6b8      this->m_defaultCursorHotX = 0;
0045f6be      this->m_defaultCursorHotY = 0;
0045f6ca      this->m_lastCursorDID.id = INVALID_DID.id;
0045f6d0      this->m_lastCursorHotX = 0;
0045f6d6      this->m_lastCursorHotY = 0;
0045f6dc      this->m_bPerformMouseHitTest = 0;
0045f6e2      this->m_pElementLastOver = nullptr;
0045f6e8      this->m_pElementLastEntered = nullptr;
0045f6ee      this->m_pElementWithMouseCapture = nullptr;
0045f6f4      this->m_pElementLastDragCursorOver = nullptr;
0045f702      this->m_setActionsTriggeringCapture.vtable = 0x79bd74;
0045f70c      IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>(&this->m_setActionsTriggeringCapture.m_intrusiveTable, 0x17);
0045f71c      this->m_nMouseCapture = 0;
0045f722      this->m_bDoVisualMouseDebugging = 0;
0045f72e      this->m_debugFontDID.id = INVALID_DID.id;
0045f736      this->m_lastMouseMoveTime = 0f;
0045f73e      this->m_bMouseHasLeftTheWindow = 0;
0045f744      *(uint32_t*)((char*)this->m_lastMouseMoveTime)[4] = 0xbff00000;
0045f74a      this->m_tooltipStart = 0f;
0045f750      *(uint32_t*)((char*)this->m_tooltipStart)[4] = 0xbff00000;
0045f756      this->m_tooltipEnable = 1;
0045f75d      this->m_tooltipDelay = 0.25f;
0045f767      this->m_tooltipDuration = 10f;
0045f771      this->m_pTooltipOwner = nullptr;
0045f777      this->m_pTooltipElement = nullptr;
0045f77d      this->m_dragX = 0;
0045f783      this->m_dragY = 0;
0045f789      this->m_pcPotentialDragElement = nullptr;
0045f78f      this->m_dragElement = nullptr;
0045f795      this->m_bDragStarted = 0;
0045f79b      this->m_bHoverStarted = 0;
0045f7a1      __builtin_memset(&this->m_focusElement, 0, 0x18);
0045f7cb      this->m_vGlobalScale.x = Vector3_OneVector__.x;
0045f7cb      this->m_vGlobalScale.y = Vector3_OneVector__.y;
0045f7cb      this->m_vGlobalScale.z = Vector3_OneVector__.z;
0045f5d0  }

0045f7e9                             90 90 90 90 90 90 90                                                           .......

0045f7f0  void* __thiscall UIElementManager::`vector deleting destructor'(class UIElementManager* this, uint32_t arg2)

0045f7f0  {
0045f7f3      UIElementManager::~UIElementManager(this);
0045f7fd      void* __offset(UIElementManager, -0x4) result = ((char*)this - 4);
0045f7fd      
0045f800      if ((arg2 & 1) == 0)
0045f80f          return result;
0045f80f      
0045f803      operator delete(result);
0045f80b      return ((char*)this - 4);
0045f7f0  }

0045f812                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0045f820  void UIElementManager::CreateUIElementManager()

0045f820  {
0045f827      if (UIElementManager::s_pInstance == 0)
0045f827      {
0045f82e          void* eax = operator new(0x340);
0045f82e          
0045f838          if (eax != 0)
0045f838          {
0045f841              UIElementManager::s_pInstance = UIElementManager::UIElementManager(eax);
0045f846              return;
0045f838          }
0045f838          
0045f847          UIElementManager::s_pInstance = nullptr;
0045f827      }
0045f820  }

0045f852                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0045f860  void __thiscall Box2D::Box2D(class Box2D* this, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

0045f860  {
0045f86f      this->m_x0 = arg2;
0045f875      this->m_x1 = ((arg2 + arg4) - 1);
0045f87c      this->m_y0 = arg3;
0045f883      this->m_y1 = ((arg3 + arg5) - 1);
0045f860  }

0045f88a                                90 90 90 90 90 90                                                            ......

0045f890  void __thiscall UIRegion::MouseOver(class UIRegion* this, uint8_t arg2)

0045f890  {
0045f895      union __bitfield164 = this->__bitfield164;
0045f8a5      this->__bitfield164 = (__bitfield164 ^ (((((uint32_t)arg2) << 4) ^ __bitfield164) & 0x10));
0045f890  }

0045f8ae                                            90 90                                                                ..

0045f8b0  void __thiscall UIRegion::MouseOverTop(class UIRegion* this, uint8_t arg2)

0045f8b0  {
0045f8b0      union __bitfield164 = this->__bitfield164;
0045f8b8      int32_t eax;
0045f8b8      eax = arg2;
0045f8c3      this->__bitfield164 = (__bitfield164 ^ ((eax ^ __bitfield164) & 1));
0045f8b0  }

0045f8cc                                      90 90 90 90                                                              ....

0045f8d0  void __thiscall UIRegion::SetTooltipOn(class UIRegion* this, uint8_t arg2)

0045f8d0  {
0045f8d5      union __bitfield164 = this->__bitfield164;
0045f8e5      this->__bitfield164 = (__bitfield164 ^ (((((uint32_t)arg2) << 5) ^ __bitfield164) & 0x20));
0045f8d0  }

0045f8ee                                            90 90                                                                ..

0045f8f0  void __thiscall UIElement::SetDragable(class UIElement* this, uint8_t arg2)

0045f8f0  {
0045f8f5      union __inner23 = this->__inner23;
0045f904      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 1) ^ __inner23) & 2));
0045f8f0  }

0045f90d                                         90 90 90                                                               ...

0045f910  void __thiscall UIElement::SetActivateOnShow(class UIElement* this, uint8_t arg2)

0045f910  {
0045f915      union __inner23 = this->__inner23;
0045f925      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 3) ^ __inner23) & 8));
0045f910  }

0045f92e                                            90 90                                                                ..

0045f930  void __thiscall UIElement::SetSaveLocation(class UIElement* this, uint8_t arg2)

0045f930  {
0045f935      union __inner23 = this->__inner23;
0045f945      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 4) ^ __inner23) & 0x10));
0045f930  }

0045f94e                                            90 90                                                                ..

0045f950  void __thiscall UIElement::SetSaveSize(class UIElement* this, uint8_t arg2)

0045f950  {
0045f955      union __inner23 = this->__inner23;
0045f965      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 5) ^ __inner23) & 0x20));
0045f950  }

0045f96e                                            90 90                                                                ..

0045f970  void __thiscall UIElement::SetNotifyOnResize(class UIElement* this, uint8_t arg2)

0045f970  {
0045f975      union __inner23 = this->__inner23;
0045f987      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 9) ^ __inner23) & 0x200));
0045f970  }


0045f990  void __thiscall UIElement::SetNotifyOnMove(class UIElement* this, uint8_t arg2)

0045f990  {
0045f995      union __inner23 = this->__inner23;
0045f9a7      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 0xa) ^ __inner23) & 0x400));
0045f990  }


0045f9b0  void __thiscall UIElement::SetContextMenu(class UIElement* this, uint8_t arg2)

0045f9b0  {
0045f9b5      union __inner23 = this->__inner23;
0045f9c7      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 7) ^ __inner23) & 0x80));
0045f9b0  }


0045f9d0  void __thiscall UIElement::SetNotifyOnCreate(class UIElement* this, uint8_t arg2)

0045f9d0  {
0045f9d5      union __inner23 = this->__inner23;
0045f9e7      this->__inner23 = (__inner23 ^ (((((uint32_t)arg2) << 0xc) ^ __inner23) & 0x1000));
0045f9d0  }


0045f9f0  uint8_t __thiscall Vector3::operator!=(class Vector3 const* this, class Vector3 const* arg2)

0045f9f0  {
0045f9f2      float* edx = arg2;
0045f9f8      long double x87_r7_1 = fabsl((((long double)this->x) - ((long double)*(uint32_t*)edx)));
0045f9fa      long double temp1 = ((long double)0.000199999995f);
0045f9fa      (x87_r7_1 - temp1);
0045fa00      int32_t eax;
0045fa00      eax = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
0045fa02      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0045fa02      
0045fa05      if (!(p))
0045fa05      {
0045fa0d          long double x87_r7_4 = fabsl((((long double)this->y) - ((long double)edx[1])));
0045fa0f          long double temp2_1 = ((long double)0.000199999995f);
0045fa0f          (x87_r7_4 - temp2_1);
0045fa15          eax = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0045fa17          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0045fa17          
0045fa1a          if (!(p_1))
0045fa1a          {
0045fa22              long double x87_r7_7 = fabsl((((long double)this->z) - ((long double)edx[2])));
0045fa24              long double temp3_1 = ((long double)0.000199999995f);
0045fa24              (x87_r7_7 - temp3_1);
0045fa2a              eax = ((((x87_r7_7 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0045fa2c              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0045fa2c              
0045fa2f              if (!(p_2))
0045fa2f              {
0045fa3d                  int32_t eax_1;
0045fa3d                  eax_1 = 0;
0045fa3f                  return 0;
0045fa2f              }
0045fa1a          }
0045fa05      }
0045fa05      
0045fa4b      int32_t eax_2;
0045fa4b      eax_2 = 1;
0045fa4d      return 1;
0045f9f0  }


0045fa50  class UIElement* __fastcall UIElement::GetRootElement(class UIElement* this)

0045fa50  {
0045fa51      class UIElement* result = this;
0045fa55      int32_t* result_1 = result->vtable->GetParent();
0045fa55      
0045fa67      while ((((int8_t)(result->__inner23 >> 0x15)) & 1) == 0)
0045fa67      {
0045fa72          if (result_1 == 0)
0045fa95              return 0;
0045fa95          
0045fa78          result = result_1;
0045fa7a          result_1 = *(uint32_t*)(*(uint32_t*)result_1 + 0xa0)();
0045fa67      }
0045fa67      
0045fa91      return result;
0045fa50  }

0045fa96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0045faa0  class UIElement* __thiscall UIElement::GetAncestorByID(class UIElement const* this, uint32_t const arg2)

0045faa0  {
0045faa2      int32_t* result = this->vtable->GetParent();
0045faa2      
0045faaa      if (result != 0)
0045faaa      {
0045fab7          while (result[0xb9] != arg2)
0045fab7          {
0045fabd              result = *(uint32_t*)(*(uint32_t*)result + 0xa0)();
0045fabd              
0045fac5              if (result == 0)
0045fac5                  break;
0045fab7          }
0045faaa      }
0045faaa      
0045fac8      return result;
0045faa0  }

0045facb                                   90 90 90 90 90                                                             .....

0045fad0  uint8_t __thiscall UIElement::IsAncestorOfMe(class UIElement const* this, class UIElement const* arg2)

0045fad0  {
0045fad2      int32_t* eax = this->vtable->GetParent();
0045fad8      bool cond:0 = eax != 0;
0045fad8      
0045fada      if (eax != 0)
0045fada      {
0045fae3          while (eax != arg2)
0045fae3          {
0045fae9              eax = *(uint32_t*)(*(uint32_t*)eax + 0xa0)();
0045fae9              
0045faf1              if (eax == 0)
0045faf1                  break;
0045fae3          }
0045fae3          
0045faf4          cond:0 = eax != 0;
0045fada      }
0045fada      
0045faf6      eax = cond:0;
0045faf9      return eax;
0045fad0  }

0045fafc                                                                                      90 90 90 90                              ....

0045fb00  uint8_t __thiscall UIElement::RegisterInputMaps(class UIElement* this, int32_t arg2)

0045fb00  {
0045fb0a      if (ICIDM::s_cidm == 0)
0045fb0a      {
0045fb0c          class ICIDM* eax;
0045fb0c          eax = 0;
0045fb0f          return 0;
0045fb0a      }
0045fb0a      
0045fb23      if (this->vtable->GetParent() != 0)
0045fb37          *(uint32_t*)(*(uint32_t*)this->vtable->GetParent() + 0xb0)((arg2 - 1));
0045fb37      
0045fb3d      uint32_t m_idInputMap = this->m_idInputMap;
0045fb3d      
0045fb45      if (m_idInputMap != 0)
0045fb57          return ICIDM::s_cidm->vtable->RegisterInputMap(m_idInputMap, this, arg2);
0045fb57      
0045fb5b      m_idInputMap = 0;
0045fb5e      return 0;
0045fb00  }

0045fb61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0045fb70  uint8_t __fastcall UIElement::UnregisterInputMaps(class UIElement* this)

0045fb70  {
0045fb7a      class ICIDM* m_idInputMap;
0045fb7a      
0045fb7a      if (ICIDM::s_cidm != 0)
0045fb7a      {
0045fb86          if (this->vtable->GetParent() != 0)
0045fb96              *(uint32_t*)(*(uint32_t*)this->vtable->GetParent() + 0xb4)();
0045fb96          
0045fb9c          m_idInputMap = this->m_idInputMap;
0045fb9c          
0045fba4          if (m_idInputMap != 0)
0045fbb4              return ICIDM::s_cidm->vtable->UnregisterInputMap(m_idInputMap, this);
0045fb7a      }
0045fb7a      
0045fbb5      m_idInputMap = 0;
0045fbb8      return 0;
0045fb70  }

0045fbb9                                                                             90 90 90 90 90 90 90                           .......

0045fbc0  uint8_t __thiscall UIElement::OnAction(class UIElement* this, class InputEvent const* arg2)

0045fbc0  {
0045fbcd      if (this->vtable->GetParent() != 0)
0045fbea          return *(uint32_t*)(*(uint32_t*)this->vtable->GetParent() + 0xb8)(this, arg2);
0045fbea      
0045fbed      int32_t eax_1;
0045fbed      eax_1 = 0;
0045fbf0      return 0;
0045fbc0  }

0045fbf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0045fc00  uint8_t __thiscall UIElement::OnChildAction(class UIElement* this, class UIElement const* arg2, class InputEvent const* arg3)

0045fc00  {
0045fc0d      if (this->vtable->GetParent() != 0)
0045fc1e          /* jump -> *(uint32_t*)(*(uint32_t*)this->vtable->GetParent() + 0xb8) */
0045fc1e      
0045fc24      int32_t eax_1;
0045fc24      eax_1 = 0;
0045fc27      return 0;
0045fc00  }

0045fc2a                                90 90 90 90 90 90                                                            ......

0045fc30  uint8_t __stdcall UIElement::DefElementMessageHandler(class UIElement* this @ ecx, struct UIElementMessageInfo const* arg2)

0045fc30  {
0045fc30      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0045fc30      
0045fc38      if (UIElementManager::s_pInstance_1 != 0)
0045fc52          return UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, arg2->idElement, arg2->pElement, arg2->idMessage, arg2->dwParam1);
0045fc52      
0045fc55      int32_t eax;
0045fc55      eax = 0;
0045fc57      return 0;
0045fc30  }

0045fc5a                                                                                90 90 90 90 90 90                            ......

0045fc60  int32_t __thiscall UIElement::CompareZLevel(class UIElement const* this, class UIRegion const* arg2)

0045fc60  {
0045fc69      int32_t result = UIRegion::CompareZLevel(this, arg2);
0045fc69      
0045fc70      if (result != 0)
0045fc98          return result;
0045fc98      
0045fc72      uint32_t m_uiReadOrder = this->m_desc.m_uiReadOrder;
0045fc78      int32_t ecx = *(int32_t*)((char*)arg2 + 0x3f4);
0045fc78      
0045fc80      if (m_uiReadOrder < ecx)
0045fc89          return 1;
0045fc89      
0045fc90      int32_t edx_1;
0045fc90      edx_1 = m_uiReadOrder == ecx;
0045fc94      return (edx_1 - 1);
0045fc60  }

0045fc9b                                                                                   90 90 90 90 90                             .....

0045fca0  void __thiscall UIElement::StartResizing(class UIElement* this, enum BorderLocation arg2, int32_t arg3, int32_t arg4)

0045fca0  {
0045fca3      union __inner23 = this->__inner23;
0045fca3      
0045fcbc      if (((((int8_t)(__inner23 >> 0x13)) & 1) == 0 && (((int8_t)(__inner23 >> 0x12)) & 1) == 0))
0045fcbc      {
0045fcc5          int32_t m_y0 = this->m_box.m_y0;
0045fccd          this->m_DragStartX = this->m_box.m_x0;
0045fcd3          this->m_DragStartY = m_y0;
0045fce0          this->m_DragStartHeight = UIRegion::GetHeight(this);
0045fce6          int32_t eax_2 = UIRegion::GetWidth(this);
0045fceb          int32_t ecx_4 = arg3;
0045fcf3          this->m_DragStartWidth = eax_2;
0045fcff          this->m_mouseInitialX = ecx_4;
0045fd05          this->m_mouseInitialY = arg4;
0045fd05          
0045fd0b          if (arg2 != BORDER_NONE)
0045fd0b          {
0045fd13              union edx_4 = (this->__inner23 | 0x80000);
0045fd19              ecx_4 = *(uint8_t*)((char*)edx_4 + 0);
0045fd1e              this->m_currentBorder = arg2;
0045fd24              this->__inner23 = edx_4;
0045fd24              
0045fd33              if (((ecx_4 & 1) != 0 && (((int8_t)(edx_4 >> 0x10)) & 1) != 0))
0045fd33              {
0045fd35                  struct UIElement::VTable* vtable = this->vtable;
0045fd3e                  arg3 = 0;
0045fd46                  vtable->MakeUIObject(&arg3);
0045fd50                  this->vtable->SetUIObject(arg3);
0045fd33              }
0045fd0b          }
0045fcbc      }
0045fca0  }

0045fd5f                                                                                               90                                 .

0045fd60  void __fastcall UIElement::StopResizing(class UIElement* this)

0045fd60  {
0045fd60      class UIElement* this_1 = this;
0045fd62      class UIElement* this_2 = this;
0045fd6a      union edx_1 = (this_2->__inner23 & 0xfff7ffff);
0045fd70      this = *(uint8_t*)((char*)edx_1 + 0);
0045fd75      this_2->__inner23 = edx_1;
0045fd75      
0045fd84      if (((this & 1) != 0 && (((int8_t)(edx_1 >> 0x10)) & 1) != 0))
0045fd84      {
0045fd86          struct UIElement::VTable* vtable = this_2->vtable;
0045fd8f          this_1 = nullptr;
0045fd97          vtable->MakeUIObject(&this_1);
0045fda1          this_2->vtable->SetUIObject(this_1);
0045fd84      }
0045fd60  }

0045fdaf                                               90                                                                 .

0045fdb0  void __thiscall UIElement::StartMovement(class UIElement* this, int32_t arg2, int32_t arg3)

0045fdb0  {
0045fdb3      union __inner23 = this->__inner23;
0045fdb3      
0045fdc8      if (((((int8_t)(__inner23 >> 0x13)) & 1) == 0 && (((int8_t)(__inner23 >> 0x12)) & 1) == 0))
0045fdc8      {
0045fdce          int32_t m_x0 = this->m_box.m_x0;
0045fdd5          this->m_mouseInitialX = arg2;
0045fddb          int32_t m_y0 = this->m_box.m_y0;
0045fde1          this->m_DragStartX = m_x0;
0045fde9          this->m_mouseInitialY = arg3;
0045fdef          this->m_DragStartY = m_y0;
0045fdfc          this->m_DragStartHeight = UIRegion::GetHeight(this);
0045fe07          this->m_DragStartWidth = UIRegion::GetWidth(this);
0045fe0d          this->__inner23 |= 0x40000;
0045fdc8      }
0045fdb0  }

0045fe1b                                                                                   90 90 90 90 90                             .....

0045fe20  void __fastcall UIElement::StopMovement(class UIElement* this)

0045fe20  {
0045fe20      this->__inner23 &= 0xfffbffff;
0045fe20  }

0045fe2b                                   90 90 90 90 90                                                             .....

0045fe30  void __thiscall UIElement::MouseMoveElement(class UIElement* this, int32_t arg2, int32_t arg3)

0045fe30  {
0045fe35      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0045fe3e      char eax;
0045fe3e      
0045fe3e      if (ICIDM::s_cidm_1 == 0)
0045fe47          eax = 0;
0045fe3e      else
0045fe42          eax = ICIDM::s_cidm_1->vtable->ShiftKeyDown();
0045fe42      
0045fe6d      int32_t ebx_2 = ((this->m_DragStartX - this->m_mouseInitialX) + arg2);
0045fe6f      int32_t edi_2 = ((this->m_DragStartY - this->m_mouseInitialY) + arg3);
0045fe6f      
0045fe73      if (eax != 0)
0045fe73      {
0045fe7d          int32_t temp1_1 = (((int64_t)ebx_2) % 0xa);
0045fe7d          
0045fe81          if (temp1_1 != 0)
0045fe83              ebx_2 -= temp1_1;
0045fe83          
0045fea3          if (edi_2 < (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
0045fea3          {
0045fead              int32_t temp1_2 = (((int64_t)edi_2) % 0xa);
0045fead              
0045feb1              if (temp1_2 != 0)
0045feb3                  edi_2 -= temp1_2;
0045fea3          }
0045fe73      }
0045fe73      
0045feb7      if (ebx_2 < 0)
0045feb9          ebx_2 = 0;
0045feb9      
0045fed9      if (ebx_2 > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
0045fef5          ebx_2 = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
0045fef5      
0045fef9      if (edi_2 < 0)
0045fefb          edi_2 = 0;
0045fefb      
0045ff1b      if (edi_2 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
0045ff37          edi_2 = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
0045ff37      
0045ff39      this->vtable->MoveTo(ebx_2, edi_2);
0045fe30  }

0045ff49                             90 90 90 90 90 90 90                                                           .......

0045ff50  void __thiscall UIElement::SetCursor(class UIElement* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3, int32_t arg4)

0045ff50  {
0045ff58      this->m_cursorDID.id = arg2;
0045ff62      this->m_cursorHotX = arg3;
0045ff68      this->m_cursorHotY = arg4;
0045ff74      UIElementManager::CheckCursor(UIElementManager::s_pInstance);
0045ff50  }

0045ff7c                                                                                      90 90 90 90                              ....

0045ff80  void __fastcall UIElement::UnSetCursor(class UIElement* this)

0045ff80  {
0045ff85      this->m_cursorDID.id = INVALID_DID.id;
0045ff8d      this->m_cursorHotX = 0;
0045ff93      this->m_cursorHotY = 0;
0045ff9f      /* tailcall */
0045ff9f      return UIElementManager::CheckCursor(UIElementManager::s_pInstance);
0045ff80  }

0045ffa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0045ffb0  uint8_t const __thiscall UIElement::InqImageSize(class UIElement* this, int32_t* arg2, int32_t* arg3)

0045ffb0  {
0045ffb1      class Graphic* m_image = this->m_image;
0045ffb1      
0045ffb9      if (m_image == 0)
0045ffb9      {
0045ffbb          int32_t eax;
0045ffbb          eax = 0;
0045ffbe          return 0;
0045ffb9      }
0045ffb9      
0045ffcc      *(uint32_t*)arg2 = Graphic::GetWidth(m_image);
0045ffd9      *(uint32_t*)arg3 = Graphic::GetHeight(m_image);
0045ffdb      int32_t eax_2;
0045ffdb      eax_2 = 1;
0045ffde      return 1;
0045ffb0  }

0045ffe1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0045fff0  void __thiscall UIElement::CenterAt(class UIElement* this, int32_t const arg2, int32_t const arg3)

0045fff0  {
0045fff4      struct UIElement::VTable* vtable = this->vtable;
0045ffff      int32_t eax_1;
0045ffff      int32_t edx;
0045ffff      edx = HIGHD(((int64_t)UIRegion::GetHeight(this)));
0045ffff      eax_1 = LOWD(((int64_t)UIRegion::GetHeight(this)));
0046000e      int32_t eax_5;
0046000e      int32_t edx_1;
0046000e      edx_1 = HIGHD(((int64_t)UIRegion::GetWidth(this)));
0046000e      eax_5 = LOWD(((int64_t)UIRegion::GetWidth(this)));
0046001c      vtable->MoveTo((arg2 - ((eax_5 - edx_1) >> 1)), (arg3 - ((eax_1 - edx) >> 1)));
0045fff0  }

00460024              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00460030  void __thiscall UIElement::GetOriginalPosition(class UIElement* this, class Box2D* arg2, int32_t* arg3)

00460030  {
00460036      int32_t m_y = this->m_desc.m_y;
00460042      int32_t m_x = this->m_desc.m_x;
00460053      int32_t ebx = ((this->m_desc.m_height + m_y) - 1);
00460057      int32_t* eax_1 = arg2;
00460061      void var_10;
00460061      
00460061      if (eax_1 == &var_10)
00460061      {
00460091          *(uint32_t*)arg3 = this->m_desc.m_zLevel;
00460097          return;
00460061      }
00460061      
00460063      eax_1[2] = ((this->m_desc.m_width + m_x) - 1);
00460067      *(uint32_t*)eax_1 = m_x;
00460069      eax_1[1] = m_y;
00460070      eax_1[3] = ebx;
0046007b      *(uint32_t*)arg3 = this->m_desc.m_zLevel;
00460030  }

0046009a                                                                                90 90 90 90 90 90                            ......

004600a0  void __thiscall UIElement::GetCurrentPosition(class UIElement* this, class Box2D* arg2, int32_t* arg3)

004600a0  {
004600a9      if (arg2 == &this->m_box)
004600a9      {
004600dc          *(uint32_t*)arg3 = this->m_zlevel;
004600de          return;
004600a9      }
004600a9      
004600ae      arg2->m_x0 = this->m_box.m_x0;
004600b3      arg2->m_x1 = this->m_box.m_x1;
004600b9      arg2->m_y0 = this->m_box.m_y0;
004600bf      arg2->m_y1 = this->m_box.m_y1;
004600cc      *(uint32_t*)arg3 = this->m_zlevel;
004600a0  }

004600e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004600f0  uint8_t __fastcall UIElement::GetShouldOwnObject(class UIElement const* this)

004600f0  {
004600fc      return (((int8_t)(this->__inner23 >> 0xe)) & 1);
004600f0  }

004600fd                                                                                         90 90 90                               ...

00460100  void __thiscall UIElement::SetIsRootElement(class UIElement* this, uint8_t arg2)

00460100  {
00460101      int32_t ebx;
00460101      ebx = arg2;
00460108      union __inner23 = this->__inner23;
00460119      struct UIElement::VTable* vtable = this->vtable;
00460122      this->__inner23 = (__inner23 ^ (((((uint32_t)ebx) << 0x15) ^ __inner23) & 0x200000));
0046012e      class UIElement* m_pRootElement = UIElementManager::s_pInstance->m_pRootElement;
0046013e      int32_t eax_4;
0046013e      eax_4 = vtable->GetParent() == m_pRootElement;
0046013e      
00460143      if (eax_4 == 0)
00460143      {
0046015a          if (ebx != 0)
0046015c              this->vtable->SetParent(m_pRootElement);
00460143      }
00460143      else if (ebx == 0)
00460149          this->vtable->SetParent(0);
00460100  }

0046016a                                90 90 90 90 90 90                                                            ......

00460170  void __fastcall UIElement::AddToDeleteQueue(class UIElement* this)

00460170  {
00460170      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00460170      
00460177      if (UIElementManager::s_pInstance_1 != 0)
0046017c          UIElementManager::AddElementToDeleteQueue(UIElementManager::s_pInstance_1, this);
00460170  }

00460182        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00460190  void UIElement::RegisterElementClass(uint32_t arg1, class UIElement* (* arg2)(class LayoutDesc const*, class ElementDesc const*))

00460190  {
00460190      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00460190      
00460198      if (UIElementManager::s_pInstance_1 != 0)
00460198      {
004601a2          class UIElement* (* var_4_1)(class LayoutDesc const*, class ElementDesc const*) = arg2;
004601a4          UIElementManager::RegisterElementClass(UIElementManager::s_pInstance_1, arg1, arg1);
00460198      }
00460190  }

004601aa                                90 90 90 90 90 90                                                            ......

004601b0  uint8_t __fastcall UIElement::GetShouldBeMouseVisible(class UIElement* this)

004601b0  {
004601bb      if (((((int8_t)(this->__inner23 >> 7)) & 1) == 0 && StringInfo::IsValid(&this->m_TTText, 1) == 0))
004601d0          return 0;
004601d0      
004601d6      return 1;
004601b0  }

004601d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004601e0  uint8_t __fastcall UIElement::TakeFocus(class UIElement* this)

004601e0  {
004601e9      class UIElement* edi = UIElement::GetRootElement(this);
004601ed      class UIElement* eax;
004601ed      
004601ed      if (edi == 0)
004601ed      {
00460221          eax = 0;
00460224          return 0;
004601ed      }
004601ed      
004601ef      this->__inner23 |= 0x400000;
00460202      eax = 0;
00460202      
00460207      if ((((int8_t)(edi->__inner23 >> 0x14)) & 1) != 0)
00460207      {
00460210          UIElementManager::SetFocusElement(UIElementManager::s_pInstance, this);
00460215          eax = 1;
00460207      }
00460207      
00460217      edi->m_pFocusElement = this;
0046021f      return eax;
004601e0  }

00460225                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00460230  uint8_t __fastcall UIElement::GetHasFocus(class UIElement const* this)

00460230  {
00460230      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00460230      
00460237      if (UIElementManager::s_pInstance_1 != 0)
00460237      {
00460247          UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance_1->m_focusElement == this;
0046024a          return UIElementManager::s_pInstance_1;
00460237      }
00460237      
0046024b      UIElementManager::s_pInstance_1 = 0;
0046024d      return 0;
00460230  }

0046024e                                            90 90                                                                ..

00460250  class UIElement* __fastcall UIElement::GetFocusDescendant(class UIElement* this)

00460250  {
00460256      return this->m_pFocusElement;
00460250  }

00460257                                                                       90 90 90 90 90 90 90 90 90                         .........

00460260  void __fastcall UIElement::UpdateMouseVisibility(class UIElement* this)

00460260  {
0046026b      if ((this->m_bShouldBeMouseVisible == 0 && this->vtable->GetShouldBeMouseVisible() == 0))
0046026b      {
0046027b          this->m_bIsMouseVisible = 0;
00460282          return;
0046026b      }
0046026b      
00460288      this->m_bIsMouseVisible = 1;
00460260  }


00460290  void __thiscall UIElement::SetClampGameViewEdge(class UIElement* this, uint32_t arg2)

00460290  {
00460296      if (arg2 != 0)
00460296      {
0046029e          bool cond:0_1 = this->m_object != 0;
004602a0          this->m_eClampGameView = arg2;
004602a0          
004602b0          if ((cond:0_1 || this->m_parent != 0))
004602b6              /* tailcall */
004602b6              return UIRegion::SetClampGameViewEdge(this, arg2);
00460296      }
00460290  }

004602be                                                                                            90 90                                ..

004602c0  uint8_t __fastcall UIElement::IsVisible(class UIElement const* this)

004602c0  {
004602c0      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004602c8      class UIElement* this_1 = this;
004602c8      
004602ca      if (UIElementManager::s_pInstance_1 == 0)
004602ca      {
004602cc          UIElementManager::s_pInstance_1 = 0;
004602cf          return 0;
004602ca      }
004602ca      
004602d1      class UIElement* m_pRootElement = UIElementManager::s_pInstance_1->m_pRootElement;
004602d1      
004602d9      if (m_pRootElement == 0)
004602d9      {
004602dc          UIElementManager::s_pInstance_1 = 0;
004602df          return 0;
004602d9      }
004602d9      
004602e5      class UIElement* this_2 = this_1->vtable->GetParent();
004602f3      uint8_t i = (((int8_t)(this_1->__bitfield164 >> 1)) & 1);
004602f3      
004602f6      while (i != 0)
004602f6      {
004602fa          if (this_2 == 0)
004602fa          {
00460323              if ((i != 0 && this_1 == m_pRootElement))
0046032d                  return 1;
0046032d              
00460323              break;
004602fa          }
004602fa          
00460308          i = (((int8_t)(this_2->__bitfield164 >> 1)) & 1);
0046030b          this_1 = this_2;
0046030d          this_2 = this_2->vtable->GetParent();
004602f6      }
004602f6      
0046031c      return 0;
004602c0  }

0046032e                                            90 90                                                                ..

00460330  uint8_t __thiscall UIElement::BroadcastElementMessage(class UIElement* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00460330  {
0046033d      uint32_t m_elementID = this->m_desc.m_elementID;
00460341      uint32_t eax_1 = arg4;
00460345      class UIElement* this_1 = this;
0046034d      uint32_t var_20 = arg2;
00460351      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00460357      uint32_t var_18 = eax_1;
0046035f      uint32_t var_1c = arg3;
00460367      int32_t s;
00460367      __builtin_memset(&s, 0, 0x14);
00460367      
00460377      if (UIElementManager::s_pInstance_1 != 0)
0046037e          eax_1 = UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID);
0046037e      
00460386      return eax_1;
00460330  }

00460389                             90 90 90 90 90 90 90                                                           .......

00460390  uint8_t __thiscall UIElement::SetAttribute_Enum(class UIElement* this, uint32_t arg2, uint32_t arg3)

00460390  {
004603a2      char var_9 = 0;
004603a6      int32_t* var_8 = nullptr;
004603aa      int32_t* var_4 = nullptr;
004603aa      
004603bb      if ((BaseProperty::SetPropertyName(&var_8, arg2) != 0 && var_4 != 0))
004603bb      {
004603c1          BaseProperty::CheckCopyOnWrite(&var_8);
004603c1          
004603d9          if ((*(uint32_t*)(*(uint32_t*)var_4 + 0xac)(arg3) != 0 && this->vtable->SetProperty(&var_8) != 0))
004603ee              var_9 = 1;
004603bb      }
004603bb      
004603f3      int32_t* eax_5 = var_8;
004603f3      
004603f9      if (eax_5 != 0)
004603f9      {
00460403          int32_t esi_2 = (eax_5[1] - 1);
00460400          eax_5[1] = esi_2;
00460400          
0046040a          if (esi_2 == 0)
00460410              **(uint32_t**)eax_5(1);
00460410          
00460412          var_8 = nullptr;
004603f9      }
004603f9      
0046041c      if (var_4 != 0)
0046041c      {
00460426          int32_t esi_4 = (var_4[1] - 1);
00460423          var_4[1] = esi_4;
00460423          
0046042d          if (esi_4 == 0)
00460433              **(uint32_t**)var_4(1);
0046041c      }
0046041c      
00460435      int32_t* eax_7;
00460435      eax_7 = var_9;
0046043e      return eax_7;
00460390  }

00460441     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00460450  uint8_t __thiscall UIElement::SetAttribute_InstanceID(class UIElement* this, uint32_t arg2, uint32_t arg3)

00460450  {
00460462      char var_9 = 0;
00460466      int32_t* var_8 = nullptr;
0046046a      int32_t* var_4 = nullptr;
0046046a      
0046047b      if ((BaseProperty::SetPropertyName(&var_8, arg2) != 0 && var_4 != 0))
0046047b      {
00460481          BaseProperty::CheckCopyOnWrite(&var_8);
00460481          
00460499          if ((*(uint32_t*)(*(uint32_t*)var_4 + 0xcc)(arg3) != 0 && this->vtable->SetProperty(&var_8) != 0))
004604ae              var_9 = 1;
0046047b      }
0046047b      
004604b3      int32_t* eax_5 = var_8;
004604b3      
004604b9      if (eax_5 != 0)
004604b9      {
004604c3          int32_t esi_2 = (eax_5[1] - 1);
004604c0          eax_5[1] = esi_2;
004604c0          
004604ca          if (esi_2 == 0)
004604d0              **(uint32_t**)eax_5(1);
004604d0          
004604d2          var_8 = nullptr;
004604b9      }
004604b9      
004604dc      if (var_4 != 0)
004604dc      {
004604e6          int32_t esi_4 = (var_4[1] - 1);
004604e3          var_4[1] = esi_4;
004604e3          
004604ed          if (esi_4 == 0)
004604f3              **(uint32_t**)var_4(1);
004604dc      }
004604dc      
004604f5      int32_t* eax_7;
004604f5      eax_7 = var_9;
004604fe      return eax_7;
00460450  }

00460501     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00460510  uint8_t __thiscall UIElement::SetAttribute_StringInfo(class UIElement* this, uint32_t arg2, class StringInfo arg3)

00460510  {
00460522      char result = 0;
00460526      int32_t* var_8 = nullptr;
0046052a      int32_t* var_4 = nullptr;
0046052a      
0046053b      if ((BaseProperty::SetPropertyName(&var_8, arg2) != 0 && var_4 != 0))
0046053b      {
00460541          BaseProperty::CheckCopyOnWrite(&var_8);
00460541          
00460559          if ((*(uint32_t*)(*(uint32_t*)var_4 + 0xc4)(&arg3) != 0 && this->vtable->SetProperty(&var_8) != 0))
0046056e              result = 1;
0046053b      }
0046053b      
00460573      int32_t* eax_4 = var_8;
00460573      
00460579      if (eax_4 != 0)
00460579      {
00460583          int32_t esi_2 = (eax_4[1] - 1);
00460580          eax_4[1] = esi_2;
00460580          
0046058a          if (esi_2 == 0)
00460590              **(uint32_t**)eax_4(1);
00460590          
00460592          var_8 = nullptr;
00460579      }
00460579      
0046059c      if (var_4 != 0)
0046059c      {
004605a6          int32_t esi_4 = (var_4[1] - 1);
004605a3          var_4[1] = esi_4;
004605a3          
004605ad          if (esi_4 == 0)
004605b3              **(uint32_t**)var_4(1);
004605b3          
004605b5          int32_t var_4_1 = 0;
0046059c      }
0046059c      
004605bd      StringInfo::~StringInfo(&arg3);
004605cb      return result;
00460510  }

004605ce                                            90 90                                                                ..

004605d0  uint8_t __thiscall UIElement::SetAttribute_Int(class UIElement* this, uint32_t arg2, int32_t arg3)

004605d0  {
004605e2      char var_9 = 0;
004605e6      int32_t* var_8 = nullptr;
004605ea      int32_t* var_4 = nullptr;
004605ea      
004605fb      if ((BaseProperty::SetPropertyName(&var_8, arg2) != 0 && var_4 != 0))
004605fb      {
00460601          BaseProperty::CheckCopyOnWrite(&var_8);
00460601          
00460616          if ((*(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(arg3) != 0 && this->vtable->SetProperty(&var_8) != 0))
0046062b              var_9 = 1;
004605fb      }
004605fb      
00460630      int32_t* eax_5 = var_8;
00460630      
00460636      if (eax_5 != 0)
00460636      {
00460640          int32_t esi_2 = (eax_5[1] - 1);
0046063d          eax_5[1] = esi_2;
0046063d          
00460647          if (esi_2 == 0)
0046064d              **(uint32_t**)eax_5(1);
0046064d          
0046064f          var_8 = nullptr;
00460636      }
00460636      
00460659      if (var_4 != 0)
00460659      {
00460663          int32_t esi_4 = (var_4[1] - 1);
00460660          var_4[1] = esi_4;
00460660          
0046066a          if (esi_4 == 0)
00460670              **(uint32_t**)var_4(1);
00460659      }
00460659      
00460672      int32_t* eax_7;
00460672      eax_7 = var_9;
0046067b      return eax_7;
004605d0  }

0046067e                                                                                            90 90                                ..

00460680  uint8_t __thiscall UIElement::SetAttribute_Float(class UIElement* this, uint32_t arg2, float arg3)

00460680  {
00460692      char var_9 = 0;
00460696      int32_t* var_8 = nullptr;
0046069a      int32_t* var_4 = nullptr;
0046069a      
004606ab      if ((BaseProperty::SetPropertyName(&var_8, arg2) != 0 && var_4 != 0))
004606ab      {
004606b1          BaseProperty::CheckCopyOnWrite(&var_8);
004606b1          
004606c9          if ((*(uint32_t*)(*(uint32_t*)var_4 + 0x8c)(arg3) != 0 && this->vtable->SetProperty(&var_8) != 0))
004606de              var_9 = 1;
004606ab      }
004606ab      
004606e3      int32_t* eax_5 = var_8;
004606e3      
004606e9      if (eax_5 != 0)
004606e9      {
004606f3          int32_t esi_2 = (eax_5[1] - 1);
004606f0          eax_5[1] = esi_2;
004606f0          
004606fa          if (esi_2 == 0)
00460700              **(uint32_t**)eax_5(1);
00460700          
00460702          var_8 = nullptr;
004606e9      }
004606e9      
0046070c      if (var_4 != 0)
0046070c      {
00460716          int32_t esi_4 = (var_4[1] - 1);
00460713          var_4[1] = esi_4;
00460713          
0046071d          if (esi_4 == 0)
00460723              **(uint32_t**)var_4(1);
0046070c      }
0046070c      
00460725      int32_t* eax_7;
00460725      eax_7 = var_9;
0046072e      return eax_7;
00460680  }

00460731                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00460740  uint8_t __thiscall UIElement::SetAttribute_Bool(class UIElement* this, uint32_t arg2, uint8_t arg3)

00460740  {
00460752      char var_9 = 0;
00460756      int32_t* var_8 = nullptr;
0046075a      int32_t* var_4 = nullptr;
0046075a      
0046076b      if ((BaseProperty::SetPropertyName(&var_8, arg2) != 0 && var_4 != 0))
0046076b      {
00460771          BaseProperty::CheckCopyOnWrite(&var_8);
00460771          
00460786          if ((*(uint32_t*)(*(uint32_t*)var_4 + 0x74)(arg3) != 0 && this->vtable->SetProperty(&var_8) != 0))
0046079b              var_9 = 1;
0046076b      }
0046076b      
004607a0      int32_t* eax_5 = var_8;
004607a0      
004607a6      if (eax_5 != 0)
004607a6      {
004607b0          int32_t esi_2 = (eax_5[1] - 1);
004607ad          eax_5[1] = esi_2;
004607ad          
004607b7          if (esi_2 == 0)
004607bd              **(uint32_t**)eax_5(1);
004607bd          
004607bf          var_8 = nullptr;
004607a6      }
004607a6      
004607c9      if (var_4 != 0)
004607c9      {
004607d3          int32_t esi_4 = (var_4[1] - 1);
004607d0          var_4[1] = esi_4;
004607d0          
004607da          if (esi_4 == 0)
004607e0              **(uint32_t**)var_4(1);
004607c9      }
004607c9      
004607e2      int32_t* eax_7;
004607e2      eax_7 = var_9;
004607eb      return eax_7;
00460740  }

004607ee                                            90 90                                                                ..

004607f0  uint8_t __thiscall UIElement::SetAttribute_DataID(class UIElement* this, uint32_t arg2, class IDClass<_tagDataID,32,0> arg3)

004607f0  {
00460802      char var_9 = 0;
00460806      int32_t* var_8 = nullptr;
0046080a      int32_t* var_4 = nullptr;
0046080a      
0046081b      if ((BaseProperty::SetPropertyName(&var_8, arg2) != 0 && var_4 != 0))
0046081b      {
00460821          BaseProperty::CheckCopyOnWrite(&var_8);
00460821          
00460839          if ((*(uint32_t*)(*(uint32_t*)var_4 + 0xb4)(arg3) != 0 && this->vtable->SetProperty(&var_8) != 0))
0046084e              var_9 = 1;
0046081b      }
0046081b      
00460853      int32_t* eax_5 = var_8;
00460853      
00460859      if (eax_5 != 0)
00460859      {
00460863          int32_t esi_2 = (eax_5[1] - 1);
00460860          eax_5[1] = esi_2;
00460860          
0046086a          if (esi_2 == 0)
00460870              **(uint32_t**)eax_5(1);
00460870          
00460872          var_8 = nullptr;
00460859      }
00460859      
0046087c      if (var_4 != 0)
0046087c      {
00460886          int32_t esi_4 = (var_4[1] - 1);
00460883          var_4[1] = esi_4;
00460883          
0046088d          if (esi_4 == 0)
00460893              **(uint32_t**)var_4(1);
0046087c      }
0046087c      
00460895      int32_t* eax_7;
00460895      eax_7 = var_9;
0046089e      return eax_7;
004607f0  }

004608a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004608b0  uint8_t __thiscall UIElement::GetAttribute_Enum(class UIElement const* this, uint32_t arg2, uint32_t* arg3)

004608b0  {
004608c3      char var_9 = 0;
004608c7      void* var_8 = nullptr;
004608cb      int32_t* var_4 = nullptr;
004608d7      int32_t* ecx;
004608d7      
004608d7      if (this->vtable->InqProperty(arg2, &var_8) == 0)
004608d7      {
00460957          if (BaseProperty::SetPropertyName(&var_8, arg2) == 0)
00460957          {
0046096e              ecx = var_4;
00460972              *(uint32_t*)arg3 = 0;
00460957          }
00460957          else
00460957          {
00460959              ecx = var_4;
00460959              
0046095f              if (ecx == 0)
00460972                  *(uint32_t*)arg3 = 0;
0046095f              else if (*(uint32_t*)(*(uint32_t*)ecx + 0xa8)(arg3) != 0)
004608f7                  ecx = var_4;
0046096c              else
0046096c              {
0046096e                  ecx = var_4;
00460972                  *(uint32_t*)arg3 = 0;
0046096c              }
00460957          }
004608d7      }
004608d7      else
004608d7      {
004608d9          ecx = var_4;
004608d9          
004608df          if (ecx != 0)
004608df          {
004608f0              if (*(uint32_t*)(*(uint32_t*)ecx + 0xa8)(arg3) != 0)
004608f2                  var_9 = 1;
004608f2              
004608f7              ecx = var_4;
004608df          }
004608d7      }
004608d7      
004608fb      void* eax_4 = var_8;
004608fb      
00460901      if (eax_4 != 0)
00460901      {
00460903          int32_t esi_1 = *(uint32_t*)((char*)eax_4 + 4);
00460910          *(uint32_t*)((char*)eax_4 + 4) = (esi_1 - 1);
00460910          
00460912          if (esi_1 == 1)
00460918              **(uint32_t**)eax_4(1);
00460918          
0046091a          ecx = var_4;
0046091e          var_8 = nullptr;
00460901      }
00460901      
00460924      if (ecx != 0)
00460924      {
0046092c          int32_t esi_4 = (ecx[1] - 1);
00460929          ecx[1] = esi_4;
00460929          
00460933          if (esi_4 == 0)
00460939              **(uint32_t**)ecx(1);
00460924      }
00460924      
0046093b      eax_4 = var_9;
00460944      return eax_4;
004608b0  }

00460976                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00460980  uint8_t __thiscall UIElement::GetAttribute_InstanceID(class UIElement const* this, uint32_t arg2, uint32_t* arg3)

00460980  {
00460993      char var_9 = 0;
00460997      void* var_8 = nullptr;
0046099b      int32_t* var_4 = nullptr;
004609a7      int32_t* ecx;
004609a7      
004609a7      if (this->vtable->InqProperty(arg2, &var_8) == 0)
004609a7      {
00460a27          if (BaseProperty::SetPropertyName(&var_8, arg2) == 0)
00460a27          {
00460a3e              ecx = var_4;
00460a42              *(uint32_t*)arg3 = 0;
00460a27          }
00460a27          else
00460a27          {
00460a29              ecx = var_4;
00460a29              
00460a2f              if (ecx == 0)
00460a42                  *(uint32_t*)arg3 = 0;
00460a2f              else if (*(uint32_t*)(*(uint32_t*)ecx + 0xc8)(arg3) != 0)
004609c7                  ecx = var_4;
00460a3c              else
00460a3c              {
00460a3e                  ecx = var_4;
00460a42                  *(uint32_t*)arg3 = 0;
00460a3c              }
00460a27          }
004609a7      }
004609a7      else
004609a7      {
004609a9          ecx = var_4;
004609a9          
004609af          if (ecx != 0)
004609af          {
004609c0              if (*(uint32_t*)(*(uint32_t*)ecx + 0xc8)(arg3) != 0)
004609c2                  var_9 = 1;
004609c2              
004609c7              ecx = var_4;
004609af          }
004609a7      }
004609a7      
004609cb      void* eax_4 = var_8;
004609cb      
004609d1      if (eax_4 != 0)
004609d1      {
004609d3          int32_t esi_1 = *(uint32_t*)((char*)eax_4 + 4);
004609e0          *(uint32_t*)((char*)eax_4 + 4) = (esi_1 - 1);
004609e0          
004609e2          if (esi_1 == 1)
004609e8              **(uint32_t**)eax_4(1);
004609e8          
004609ea          ecx = var_4;
004609ee          var_8 = nullptr;
004609d1      }
004609d1      
004609f4      if (ecx != 0)
004609f4      {
004609fc          int32_t esi_4 = (ecx[1] - 1);
004609f9          ecx[1] = esi_4;
004609f9          
00460a03          if (esi_4 == 0)
00460a09              **(uint32_t**)ecx(1);
004609f4      }
004609f4      
00460a0b      eax_4 = var_9;
00460a14      return eax_4;
00460980  }

00460a46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00460a50  uint8_t __thiscall UIElement::GetAttribute_Int(class UIElement const* this, uint32_t arg2, int32_t* arg3)

00460a50  {
00460a63      char var_9 = 0;
00460a67      void* var_8 = nullptr;
00460a6b      int32_t* var_4 = nullptr;
00460a77      int32_t* ecx;
00460a77      
00460a77      if (this->vtable->InqProperty(arg2, &var_8) == 0)
00460a77      {
00460af4          if (BaseProperty::SetPropertyName(&var_8, arg2) == 0)
00460af4          {
00460b08              ecx = var_4;
00460b0c              *(uint32_t*)arg3 = 0;
00460af4          }
00460af4          else
00460af4          {
00460af6              ecx = var_4;
00460af6              
00460afc              if (ecx == 0)
00460b0c                  *(uint32_t*)arg3 = 0;
00460afc              else if (*(uint32_t*)(*(uint32_t*)ecx + 0x78)(arg3) != 0)
00460a94                  ecx = var_4;
00460b06              else
00460b06              {
00460b08                  ecx = var_4;
00460b0c                  *(uint32_t*)arg3 = 0;
00460b06              }
00460af4          }
00460a77      }
00460a77      else
00460a77      {
00460a79          ecx = var_4;
00460a79          
00460a7f          if (ecx != 0)
00460a7f          {
00460a8d              if (*(uint32_t*)(*(uint32_t*)ecx + 0x78)(arg3) != 0)
00460a8f                  var_9 = 1;
00460a8f              
00460a94              ecx = var_4;
00460a7f          }
00460a77      }
00460a77      
00460a98      void* eax_4 = var_8;
00460a98      
00460a9e      if (eax_4 != 0)
00460a9e      {
00460aa0          int32_t esi_1 = *(uint32_t*)((char*)eax_4 + 4);
00460aad          *(uint32_t*)((char*)eax_4 + 4) = (esi_1 - 1);
00460aad          
00460aaf          if (esi_1 == 1)
00460ab5              **(uint32_t**)eax_4(1);
00460ab5          
00460ab7          ecx = var_4;
00460abb          var_8 = nullptr;
00460a9e      }
00460a9e      
00460ac1      if (ecx != 0)
00460ac1      {
00460ac9          int32_t esi_4 = (ecx[1] - 1);
00460ac6          ecx[1] = esi_4;
00460ac6          
00460ad0          if (esi_4 == 0)
00460ad6              **(uint32_t**)ecx(1);
00460ac1      }
00460ac1      
00460ad8      eax_4 = var_9;
00460ae1      return eax_4;
00460a50  }


00460b10  uint8_t __thiscall UIElement::GetAttribute_Float(class UIElement const* this, uint32_t arg2, float* arg3)

00460b10  {
00460b23      char var_9 = 0;
00460b27      void* var_8 = nullptr;
00460b2b      int32_t* var_4 = nullptr;
00460b37      int32_t* ecx;
00460b37      
00460b37      if (this->vtable->InqProperty(arg2, &var_8) == 0)
00460b37      {
00460bb7          if (BaseProperty::SetPropertyName(&var_8, arg2) == 0)
00460bb7          {
00460bce              ecx = var_4;
00460bd2              *(uint32_t*)arg3 = 0f;
00460bb7          }
00460bb7          else
00460bb7          {
00460bb9              ecx = var_4;
00460bb9              
00460bbf              if (ecx == 0)
00460bd2                  *(uint32_t*)arg3 = 0f;
00460bbf              else if (*(uint32_t*)(*(uint32_t*)ecx + 0x88)(arg3) != 0)
00460b57                  ecx = var_4;
00460bcc              else
00460bcc              {
00460bce                  ecx = var_4;
00460bd2                  *(uint32_t*)arg3 = 0f;
00460bcc              }
00460bb7          }
00460b37      }
00460b37      else
00460b37      {
00460b39          ecx = var_4;
00460b39          
00460b3f          if (ecx != 0)
00460b3f          {
00460b50              if (*(uint32_t*)(*(uint32_t*)ecx + 0x88)(arg3) != 0)
00460b52                  var_9 = 1;
00460b52              
00460b57              ecx = var_4;
00460b3f          }
00460b37      }
00460b37      
00460b5b      void* eax_4 = var_8;
00460b5b      
00460b61      if (eax_4 != 0)
00460b61      {
00460b63          int32_t esi_1 = *(uint32_t*)((char*)eax_4 + 4);
00460b70          *(uint32_t*)((char*)eax_4 + 4) = (esi_1 - 1);
00460b70          
00460b72          if (esi_1 == 1)
00460b78              **(uint32_t**)eax_4(1);
00460b78          
00460b7a          ecx = var_4;
00460b7e          var_8 = nullptr;
00460b61      }
00460b61      
00460b84      if (ecx != 0)
00460b84      {
00460b8c          int32_t esi_4 = (ecx[1] - 1);
00460b89          ecx[1] = esi_4;
00460b89          
00460b93          if (esi_4 == 0)
00460b99              **(uint32_t**)ecx(1);
00460b84      }
00460b84      
00460b9b      eax_4 = var_9;
00460ba4      return eax_4;
00460b10  }

00460bd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00460be0  uint8_t __thiscall UIElement::GetAttribute_Bool(class UIElement const* this, uint32_t arg2, uint8_t* arg3)

00460be0  {
00460bf3      char var_9 = 0;
00460bf7      void* var_8 = nullptr;
00460bfb      int32_t* var_4 = nullptr;
00460c07      int32_t* ecx;
00460c07      
00460c07      if (this->vtable->InqProperty(arg2, &var_8) == 0)
00460c07      {
00460c84          if (BaseProperty::SetPropertyName(&var_8, arg2) == 0)
00460c84          {
00460c98              ecx = var_4;
00460c9c              *(uint8_t*)arg3 = 0;
00460c84          }
00460c84          else
00460c84          {
00460c86              ecx = var_4;
00460c86              
00460c8c              if (ecx == 0)
00460c9c                  *(uint8_t*)arg3 = 0;
00460c8c              else if (*(uint32_t*)(*(uint32_t*)ecx + 0x70)(arg3) != 0)
00460c24                  ecx = var_4;
00460c96              else
00460c96              {
00460c98                  ecx = var_4;
00460c9c                  *(uint8_t*)arg3 = 0;
00460c96              }
00460c84          }
00460c07      }
00460c07      else
00460c07      {
00460c09          ecx = var_4;
00460c09          
00460c0f          if (ecx != 0)
00460c0f          {
00460c1d              if (*(uint32_t*)(*(uint32_t*)ecx + 0x70)(arg3) != 0)
00460c1f                  var_9 = 1;
00460c1f              
00460c24              ecx = var_4;
00460c0f          }
00460c07      }
00460c07      
00460c28      void* eax_4 = var_8;
00460c28      
00460c2e      if (eax_4 != 0)
00460c2e      {
00460c30          int32_t esi_1 = *(uint32_t*)((char*)eax_4 + 4);
00460c3d          *(uint32_t*)((char*)eax_4 + 4) = (esi_1 - 1);
00460c3d          
00460c3f          if (esi_1 == 1)
00460c45              **(uint32_t**)eax_4(1);
00460c45          
00460c47          ecx = var_4;
00460c4b          var_8 = nullptr;
00460c2e      }
00460c2e      
00460c51      if (ecx != 0)
00460c51      {
00460c59          int32_t esi_4 = (ecx[1] - 1);
00460c56          ecx[1] = esi_4;
00460c56          
00460c60          if (esi_4 == 0)
00460c66              **(uint32_t**)ecx(1);
00460c51      }
00460c51      
00460c68      eax_4 = var_9;
00460c71      return eax_4;
00460be0  }


00460ca0  uint8_t __thiscall UIElement::GetAttribute_DataID(class UIElement const* this, uint32_t arg2, class IDClass<_tagDataID,32,0>* arg3)

00460ca0  {
00460cb3      char var_9 = 0;
00460cb7      void* var_8 = nullptr;
00460cbb      int32_t* var_4 = nullptr;
00460cc7      int32_t* ecx;
00460cc7      
00460cc7      if (this->vtable->InqProperty(arg2, &var_8) == 0)
00460cc7      {
00460d47          if (BaseProperty::SetPropertyName(&var_8, arg2) == 0)
00460d47          {
00460d5e              ecx = var_4;
00460d68              arg3->id = INVALID_DID.id;
00460d47          }
00460d47          else
00460d47          {
00460d49              ecx = var_4;
00460d49              
00460d4f              if (ecx == 0)
00460d68                  arg3->id = INVALID_DID.id;
00460d4f              else if (*(uint32_t*)(*(uint32_t*)ecx + 0xb0)(arg3) != 0)
00460ce7                  ecx = var_4;
00460d5c              else
00460d5c              {
00460d5e                  ecx = var_4;
00460d68                  arg3->id = INVALID_DID.id;
00460d5c              }
00460d47          }
00460cc7      }
00460cc7      else
00460cc7      {
00460cc9          ecx = var_4;
00460cc9          
00460ccf          if (ecx != 0)
00460ccf          {
00460ce0              if (*(uint32_t*)(*(uint32_t*)ecx + 0xb0)(arg3) != 0)
00460ce2                  var_9 = 1;
00460ce2              
00460ce7              ecx = var_4;
00460ccf          }
00460cc7      }
00460cc7      
00460ceb      void* eax_4 = var_8;
00460ceb      
00460cf1      if (eax_4 != 0)
00460cf1      {
00460cf3          int32_t esi_1 = *(uint32_t*)((char*)eax_4 + 4);
00460d00          *(uint32_t*)((char*)eax_4 + 4) = (esi_1 - 1);
00460d00          
00460d02          if (esi_1 == 1)
00460d08              **(uint32_t**)eax_4(1);
00460d08          
00460d0a          ecx = var_4;
00460d0e          var_8 = nullptr;
00460cf1      }
00460cf1      
00460d14      if (ecx != 0)
00460d14      {
00460d1c          int32_t esi_4 = (ecx[1] - 1);
00460d19          ecx[1] = esi_4;
00460d19          
00460d23          if (esi_4 == 0)
00460d29              **(uint32_t**)ecx(1);
00460d14      }
00460d14      
00460d2b      eax_4 = var_9;
00460d34      return eax_4;
00460ca0  }

00460d6f                                               90                                                                 .

00460d70  class UIElement* __thiscall UIElement::StartTooltipAtMouse(class UIElement* this, double arg2)

00460d70  {
00460d77      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00460d77      
00460d82      if (UIElementManager::s_pInstance_1 != 0)
00460d82      {
00460d8d          void var_90;
00460d8d          StringInfo::StringInfo(&var_90);
00460d8d          
00460da3          if (StringInfo::IsValid(&this->m_TTText, 1) == 0)
00460da3          {
00460db4              struct UIElement::VTable* vtable = this->vtable;
00460dbf              int32_t* var_a0 = nullptr;
00460dc7              int32_t* var_9c_1 = nullptr;
00460dd7              int32_t* ecx_4 = var_9c_1;
00460dd7              
00460ddf              if ((vtable->InqProperty(0x49, &var_a0) != 0 && ecx_4 != 0))
00460ddf              {
00460de8                  *(uint32_t*)(*(uint32_t*)ecx_4 + 0xc0)(&var_90);
00460dee                  ecx_4 = var_9c_1;
00460ddf              }
00460ddf              
00460df2              int32_t* eax_3 = var_a0;
00460df2              
00460df8              if (eax_3 != 0)
00460df8              {
00460e02                  int32_t edi_3 = (eax_3[1] - 1);
00460dff                  eax_3[1] = edi_3;
00460dff                  
00460e09                  if (edi_3 == 0)
00460e0f                      **(uint32_t**)eax_3(1);
00460e0f                  
00460e11                  ecx_4 = var_9c_1;
00460e15                  var_a0 = nullptr;
00460df8              }
00460df8              
00460e1f              if (ecx_4 != 0)
00460e1f              {
00460e27                  int32_t edi_5 = (ecx_4[1] - 1);
00460e24                  ecx_4[1] = edi_5;
00460e24                  
00460e2e                  if (edi_5 == 0)
00460e34                      **(uint32_t**)ecx_4(1);
00460e1f              }
00460da3          }
00460da3          else
00460daa              StringInfo::operator=(&var_90, &this->m_TTText);
00460daa          
00460e44          uint32_t var_94;
00460e44          
00460e44          if ((StringInfo::IsValid(&var_90, 1) != 0 && UIElement::GetAttribute_Enum(this, 0x47, &var_94) != 0))
00460e44          {
00460e67              uint32_t id = INVALID_DID.id;
00460e6b              UIElement::GetAttribute_DataID(this, 0x48, &id);
00460e70              uint32_t id_1 = id;
00460e74              uint32_t id_2 = INVALID_DID.id;
00460e74              
00460e7c              if (id_1 != id_2)
00460e7c              {
00460eb9              label_460eb9:
00460eb9                  int32_t eax_10;
00460eb9                  int32_t __saved_edi_5;
00460eb9                  eax_10 = UIElementManager::StartTooltip(UIElementManager::s_pInstance_1, &var_90, this, var_94, id_1, 0);
00460ebe                  class UIElement* m_pTooltipElement = UIElementManager::s_pInstance_1->m_pTooltipElement;
00460ebe                  
00460ec6                  if (m_pTooltipElement != 0)
00460ec6                  {
00460ec8                      long double x87_r7_1 = ((long double)arg2);
00460ecf                      long double temp1_1 = ((long double)0.0);
00460ecf                      (x87_r7_1 - temp1_1);
00460ed5                      eax_10 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00460ed7                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00460ed7                      
00460eda                      if (p_1)
00460eda                      {
00460ee3                          int32_t __saved_edi_3 = __saved_edi_5;
00460ee9                          UIElementManager::SetDurationForCurrentTooltip(UIElementManager::s_pInstance_1, ((float)((long double)arg2)));
00460eda                      }
00460ec6                  }
00460ec6                  
00460ef2                  StringInfo::~StringInfo(&var_90);
00460f01                  return m_pTooltipElement;
00460e7c              }
00460e7c              
00460e7e              class LayoutDesc* m_layout = this->m_layout;
00460e7e              
00460e86              if (m_layout != 0)
00460e86              {
00460e88                  id_1 = m_layout->m_DID.id;
00460e8b                  id = id_1;
00460e86              }
00460e86              
00460e91              if (id_1 != id_2)
00460e91                  goto label_460eb9;
00460e44          }
00460e44          
00460e97          StringInfo::~StringInfo(&var_90);
00460d82      }
00460d82      
00460ea6      return 0;
00460d70  }

00460f04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00460f10  void __thiscall UIElement::MouseDown(class UIElement* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00460f10  {
00460f23      uint32_t var_3c = arg4;
00460f28      uint32_t edx;
00460f28      UIRegion::MouseDown(this, edx, arg2, arg3);
00460f2d      uint32_t m_elementID = this->m_desc.m_elementID;
00460f42      int32_t edi_1 = (arg3 - UIRegion::GetScreenY0(this));
00460f55      uint32_t var_1c = arg4;
00460f5b      int32_t var_c = (arg2 - UIRegion::GetScreenX0(this));
00460f5f      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00460f67      uint32_t m_elementID_1 = m_elementID;
00460f6b      class UIElement* this_1 = this;
00460f6f      int32_t var_20 = 0x1c;
00460f77      int32_t var_18 = 0;
00460f7b      int32_t var_4 = 0;
00460f7f      uint32_t var_14 = arg2;
00460f83      uint32_t var_10 = arg3;
00460f87      int32_t var_8 = edi_1;
00460f87      
00460f8b      if (UIElementManager::s_pInstance_1 != 0)
00460f8b      {
00460f92          UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID_1);
00460f97          UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00460f8b      }
00460f8b      
00460fb3      if (((((int8_t)(this->__inner23 >> 7)) & 1) != 0 && arg4 == 8))
00460fb3      {
00460fb7          int32_t var_20_1 = 0x27;
00460fb7          
00460fbf          if (UIElementManager::s_pInstance_1 != 0)
00460fc6              UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID_1);
00460fb3      }
00460f10  }

00460fd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00460fe0  void __thiscall UIElement::MouseTap(class UIElement* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00460fe0  {
00460fe8      uint32_t m_elementID = this->m_desc.m_elementID;
0046100f      int32_t var_8 = (arg3 - UIRegion::GetScreenY0(this));
00461014      class UIElement* this_1 = this;
00461019      uint32_t var_1c = arg4;
0046101f      int32_t var_c = (arg2 - UIRegion::GetScreenX0(this));
00461023      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046102b      uint32_t var_10 = arg3;
00461030      uint32_t m_elementID_1 = m_elementID;
00461034      int32_t var_20 = 0x40;
0046103c      int32_t var_18 = 0;
00461040      int32_t var_4 = 0;
00461044      uint32_t var_14 = arg2;
00461044      
00461049      if (UIElementManager::s_pInstance_1 != 0)
00461050          UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID_1);
00460fe0  }

0046105b                                                                                   90 90 90 90 90                             .....

00461060  uint8_t __thiscall UIElement::KeyUp(class UIElement* this, uint32_t arg2)

00461060  {
00461063      uint32_t m_elementID = this->m_desc.m_elementID;
00461069      class UIElement* this_1 = this;
00461071      uint32_t m_elementID_1 = m_elementID;
00461077      uint32_t var_1c = arg2;
0046107b      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00461083      int32_t var_20 = 0x42;
0046108b      int32_t s;
0046108b      __builtin_memset(&s, 0, 0x18);
0046108b      
004610a3      if (UIElementManager::s_pInstance_1 != 0)
004610aa          m_elementID = UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID_1);
004610aa      
004610b2      return m_elementID;
00461060  }

004610b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004610c0  uint8_t __thiscall UIElement::KeyDown(class UIElement* this, uint32_t arg2, float arg3)

004610c0  {
004610d3      class UIElement* this_1 = this;
004610db      uint32_t m_elementID = this->m_desc.m_elementID;
004610df      int32_t var_20 = 0x41;
004610e7      uint32_t var_1c = arg2;
004610eb      int32_t eax_1 = _ftol2();
004610f0      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004610f6      int32_t var_18 = eax_1;
00461102      int32_t s;
00461102      __builtin_memset(&s, 0, 0x14);
00461102      
00461112      if (UIElementManager::s_pInstance_1 != 0)
00461119          eax_1 = UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID);
00461119      
00461121      return eax_1;
004610c0  }

00461124              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00461130  void __thiscall UIElement::MouseResizeElement(class UIElement* this, int32_t arg2, int32_t arg3)

00461130  {
0046113e      if (this->m_currentBorder != BORDER_NONE)
0046113e      {
00461144          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0046114c          char var_1d_1;
0046114c          
0046114c          if (ICIDM::s_cidm_1 == 0)
00461159              var_1d_1 = 0;
0046114c          else
00461153              var_1d_1 = ICIDM::s_cidm_1->vtable->ShiftKeyDown();
00461153          
00461169          int32_t m_DragStartX = this->m_DragStartX;
00461170          int32_t eax_4 = (arg2 - this->m_mouseInitialX);
00461184          int32_t eax_6 = (arg3 - this->m_mouseInitialY);
00461187          int32_t m_DragStartY = this->m_DragStartY;
004611a2          int32_t var_1c_1 = (this->m_DragStartWidth + m_DragStartX);
004611a6          int32_t esi_2 = (this->m_DragStartHeight + m_DragStartY);
004611b6          int32_t var_18;
004611b6          arg3 = UIElement::GetAttribute_Int(this, 0x3f, &var_18);
004611ba          int32_t var_4;
004611ba          uint8_t eax_10 = UIElement::GetAttribute_Int(this, 0x3d, &var_4);
004611da          int32_t var_10;
004611da          arg2 = UIElement::GetAttribute_Int(this, 0x3e, &var_10);
004611ed          int32_t var_c;
004611ed          char edx_2 = UIElement::GetAttribute_Int(this, 0x3c, &var_c);
004611f9          int32_t eax_12;
004611f9          bool cond:4_1;
004611f9          bool cond:5_1;
004611f9          
004611f9          switch ((this->m_currentBorder - 1))
004611f9          {
00461208              case 0:
00461208              {
00461208                  eax_12 = arg3;
0046120c                  m_DragStartY += eax_6;
00461212                  m_DragStartX += eax_4;
00461212                  
00461216                  if (eax_12 != 0)
00461216                  {
00461218                      eax_12 = var_18;
00461218                      
00461222                      if ((var_1c_1 - m_DragStartX) < eax_12)
00461226                          m_DragStartX = (var_1c_1 - eax_12);
00461216                  }
00461216                  
00461228                  eax_12 = eax_10;
00461228                  
0046122e                  if (eax_12 != 0)
0046122e                  {
00461230                      eax_12 = var_4;
00461230                      
0046123a                      if ((var_1c_1 - m_DragStartX) > eax_12)
0046123e                          m_DragStartX = (var_1c_1 - eax_12);
0046122e                  }
0046122e                  
00461240                  eax_12 = arg2;
00461240                  
00461246                  if (eax_12 != 0)
00461246                  {
00461248                      eax_12 = var_10;
00461248                      
00461252                      if ((esi_2 - m_DragStartY) < eax_12)
00461256                          m_DragStartY = (esi_2 - eax_12);
00461246                  }
00461246                  
00461258                  eax_12 = edx_2;
0046125c                  cond:4_1 = eax_12 == 0;
00461355              label_461355:
00461355                  
00461355                  if (!(cond:4_1))
00461355                  {
0046135b                      eax_12 = var_c;
0046135b                      
00461365                      if ((esi_2 - m_DragStartY) > eax_12)
0046136d                          m_DragStartY = (esi_2 - eax_12);
00461355                  }
00461208                  break;
00461208              }
00461339              case 1:
00461339              {
00461339                  eax_12 = arg2;
0046133d                  m_DragStartY += eax_6;
0046133d                  
00461341                  if (eax_12 != 0)
00461341                  {
00461343                      eax_12 = var_10;
00461343                      
0046134d                      if ((esi_2 - m_DragStartY) < eax_12)
00461351                          m_DragStartY = (esi_2 - eax_12);
00461341                  }
00461341                  
00461353                  cond:4_1 = edx_2 == 0;
00461353                  goto label_461355;
00461339              }
004612ba              case 2:
004612ba              {
004612ba                  eax_12 = (var_1c_1 + eax_4);
004612bc                  int32_t ecx_14;
004612bc                  ecx_14 = arg3;
004612c0                  m_DragStartY += eax_6;
004612c4                  var_1c_1 = eax_12;
004612c4                  
004612c8                  if (ecx_14 != 0)
004612c8                  {
004612ca                      ecx_14 = var_18;
004612ca                      
004612d4                      if ((eax_12 - m_DragStartX) < ecx_14)
004612d4                      {
004612d6                          ecx_14 += m_DragStartX;
004612d8                          var_1c_1 = ecx_14;
004612dc                          eax_12 = ecx_14;
004612d4                      }
004612c8                  }
004612c8                  
004612de                  ecx_14 = eax_10;
004612de                  
004612e4                  if (ecx_14 != 0)
004612e4                  {
004612e6                      int32_t ecx_15 = eax_12;
004612e8                      eax_12 = var_4;
004612e8                      
004612f0                      if ((ecx_15 - m_DragStartX) > eax_12)
004612f4                          var_1c_1 = (eax_12 + m_DragStartX);
004612e4                  }
004612e4                  
004612f8                  eax_12 = arg2;
004612f8                  
004612fe                  if (eax_12 != 0)
004612fe                  {
00461300                      eax_12 = var_10;
00461300                      
0046130a                      if ((esi_2 - m_DragStartY) < eax_12)
0046130e                          m_DragStartY = (esi_2 - eax_12);
004612fe                  }
004612fe                  
00461310                  eax_12 = edx_2;
00461310                  
00461316                  if (eax_12 != 0)
00461316                  {
0046131c                      eax_12 = var_c;
0046131c                      
00461326                      if ((esi_2 - m_DragStartY) > eax_12)
0046132e                          m_DragStartY = (esi_2 - eax_12);
00461316                  }
004612ba                  break;
004612ba              }
00461470              case 3:
00461470              {
00461470                  int32_t ecx_5;
00461470                  ecx_5 = arg3;
00461474                  eax_12 = (var_1c_1 + eax_4);
00461478                  var_1c_1 = eax_12;
00461478                  
0046147c                  if (ecx_5 != 0)
0046147c                  {
0046147e                      int32_t ecx_33 = eax_12;
00461480                      eax_12 = var_18;
00461480                      
00461488                      if ((ecx_33 - m_DragStartX) < eax_12)
0046148c                          var_1c_1 = (eax_12 + m_DragStartX);
0046147c                  }
0046147c                  
00461490                  eax_12 = eax_10;
00461490                  
00461496                  if (eax_12 != 0)
00461496                  {
0046149c                      eax_12 = var_4;
0046149c                      
004614a4                      if ((var_1c_1 - m_DragStartX) > eax_12)
004614a8                          var_1c_1 = (eax_12 + m_DragStartX);
00461496                  }
00461470                  break;
00461470              }
004613f9              case 4:
004613f9              {
004613f9                  int32_t ecx_28 = (var_1c_1 + eax_4);
004613fe                  esi_2 = ((m_DragStartY + eax_6) + this->m_DragStartHeight);
00461404                  eax_12 = arg3;
0046140a                  var_1c_1 = ecx_28;
0046140a                  
00461418                  if ((eax_12 != 0 && (ecx_28 - m_DragStartX) < var_18))
00461418                  {
0046141e                      ecx_28 = (var_18 + m_DragStartX);
00461420                      var_1c_1 = ecx_28;
00461418                  }
00461418                  
00461424                  eax_12 = eax_10;
00461424                  
0046142a                  if (eax_12 != 0)
0046142a                  {
0046142c                      eax_12 = var_4;
0046142c                      
00461434                      if ((ecx_28 - m_DragStartX) > eax_12)
00461438                          var_1c_1 = (eax_12 + m_DragStartX);
0046142a                  }
0046142a                  
0046142a                  goto label_46143c;
004613f9              }
004613e9              case 5:
004613e9              {
004613e9                  esi_2 = ((m_DragStartY + eax_6) + this->m_DragStartHeight);
0046143c              label_46143c:
0046143c                  eax_12 = arg2;
0046143c                  
00461442                  if (eax_12 != 0)
00461442                  {
00461444                      eax_12 = var_10;
00461444                      
0046144e                      if ((esi_2 - m_DragStartY) < eax_12)
00461450                          esi_2 = (eax_12 + m_DragStartY);
00461442                  }
00461442                  
00461453                  cond:5_1 = edx_2 == 0;
00461453                  goto label_461455;
004613e9              }
00461385              case 6:
00461385              {
00461385                  eax_12 = arg3;
00461389                  esi_2 = ((m_DragStartY + eax_6) + this->m_DragStartHeight);
0046138f                  m_DragStartX += eax_4;
0046138f                  
00461393                  if (eax_12 != 0)
00461393                  {
00461395                      eax_12 = var_18;
00461395                      
0046139f                      if ((var_1c_1 - m_DragStartX) < eax_12)
004613a3                          m_DragStartX = (var_1c_1 - eax_12);
00461393                  }
00461393                  
004613a5                  eax_12 = eax_10;
004613a5                  
004613ab                  if (eax_12 != 0)
004613ab                  {
004613ad                      eax_12 = var_4;
004613ad                      
004613b7                      if ((var_1c_1 - m_DragStartX) > eax_12)
004613bb                          m_DragStartX = (var_1c_1 - eax_12);
004613ab                  }
004613ab                  
004613bd                  eax_12 = arg2;
004613bd                  
004613c3                  if (eax_12 != 0)
004613c3                  {
004613c5                      eax_12 = var_10;
004613c5                      
004613cf                      if ((esi_2 - m_DragStartY) < eax_12)
004613d1                          esi_2 = (eax_12 + m_DragStartY);
004613c3                  }
004613c3                  
004613d4                  eax_12 = edx_2;
004613d8                  cond:5_1 = eax_12 == 0;
00461455              label_461455:
00461455                  
00461455                  if (!(cond:5_1))
00461455                  {
00461457                      eax_12 = var_c;
00461457                      
00461461                      if ((esi_2 - m_DragStartY) > eax_12)
00461463                          esi_2 = (eax_12 + m_DragStartY);
00461455                  }
00461385                  break;
00461385              }
00461267              case 7:
00461267              {
00461267                  eax_12 = arg3;
0046126b                  m_DragStartX += eax_4;
0046126b                  
0046126f                  if (eax_12 != 0)
0046126f                  {
00461275                      int32_t ecx_11 = var_18;
00461275                      
0046127f                      if ((var_1c_1 - m_DragStartX) < ecx_11)
00461283                          m_DragStartX = (var_1c_1 - ecx_11);
0046126f                  }
0046126f                  
00461285                  eax_12 = eax_10;
00461285                  
0046128b                  if (eax_12 != 0)
0046128b                  {
00461295                      eax_12 = var_4;
00461295                      
0046129d                      if ((var_1c_1 - m_DragStartX) > eax_12)
004612a7                          m_DragStartX = (var_1c_1 - eax_12);
0046128b                  }
00461267                  break;
00461267              }
004611f9          }
004611f9          
004614ac          eax_12 = var_1d_1;
004614ac          
004614b2          if (eax_12 != 0)
004614b2          {
004614bc              int32_t temp1_1 = (((int64_t)m_DragStartX) % 0xa);
004614bc              
004614c0              if (temp1_1 != 0)
004614c2                  m_DragStartX -= temp1_1;
004614c2              
004614cc              int32_t temp1_2 = (((int64_t)m_DragStartY) % 0xa);
004614cc              
004614d0              if (temp1_2 != 0)
004614d2                  m_DragStartY -= temp1_2;
004614d2              
004614de              int32_t temp1_3 = (((int64_t)var_1c_1) % 0xa);
004614de              
004614e2              if (temp1_3 != 0)
004614e4                  var_1c_1 -= temp1_3;
004614e4              
004614f0              int32_t temp1_4 = (((int64_t)esi_2) % 0xa);
004614f0              
004614f4              if (temp1_4 != 0)
004614f6                  esi_2 -= temp1_4;
004614b2          }
004614b2          
004614fa          if (m_DragStartX < 0)
004614fc              m_DragStartX = 0;
004614fc          
00461500          if (m_DragStartY < 0)
00461502              m_DragStartY = 0;
00461502          
00461519          if (var_1c_1 > UIRegion::GetWidth(this->vtable->GetParent()))
0046152c              var_1c_1 = UIRegion::GetWidth(this->vtable->GetParent());
0046152c          
00461543          if (esi_2 > UIRegion::GetHeight(this->vtable->GetParent()))
00461556              esi_2 = UIRegion::GetHeight(this->vtable->GetParent());
00461556          
0046155c          this->vtable->ResizeTo((var_1c_1 - m_DragStartX), (esi_2 - m_DragStartY));
00461569          this->vtable->MoveTo(m_DragStartX, m_DragStartY);
0046113e      }
00461130  }

0046157c  uint32_t jump_table_46157c[0x8] = 
0046157c  {
0046157c      [0x0] =  0x00461200
00461580      [0x1] =  0x00461335
00461584      [0x2] =  0x004612ae
00461588      [0x3] =  0x00461468
0046158c      [0x4] =  0x004613ed
00461590      [0x5] =  0x004613dc
00461594      [0x6] =  0x00461374
00461598      [0x7] =  0x00461263
0046159c  }

0046159c                                                                                      90 90 90 90                              ....

004615a0  void __thiscall UIElement::MouseOver(class UIElement* this, uint8_t arg2)

004615a0  {
004615a0      uint32_t eax = ((uint32_t)arg2);
004615a6      union __bitfield164 = this->__bitfield164;
004615bd      this->__bitfield164 = (__bitfield164 ^ (((eax << 4) ^ __bitfield164) & 0x10));
004615c3      UIElement::BroadcastElementMessage(this, 0x1f, eax, 0);
004615a0  }

004615cc                                      90 90 90 90                                                              ....

004615d0  void __thiscall UIElement::MouseOverTop(class UIElement* this, uint8_t arg2)

004615d0  {
004615d0      uint32_t eax = ((uint32_t)arg2);
004615ee      this->__bitfield164 ^= ((this->__bitfield164 ^ eax) & 1);
004615f4      UIElement::BroadcastElementMessage(this, 0x1b, eax, 0);
004615d0  }

004615fd                                                                                         90 90 90                               ...

00461600  uint8_t __thiscall UIElement::DragItem(class UIElement* this, class UIElement** arg2)

00461600  {
00461614      uint8_t var_1c9;
00461614      UIElement::GetAttribute_Bool(this, 0x39, &var_1c9);
00461614      
00461621      if (var_1c9 != 0)
0046162e          return 0;
0046162e      
00461632      uint32_t* ebp = arg2;
00461639      uint32_t eax_1 = *(uint32_t*)ebp;
00461639      
0046163e      if (eax_1 != 0)
0046163e      {
00461644          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00461644          
0046164c          if (UIElementManager::s_pInstance_1 != 0)
0046164c          {
00461652              class LayoutDesc* esi_1 = *(uint32_t*)(eax_1 + 0x238);
00461652              
0046165a              if (esi_1 != 0)
0046165a              {
00461666                  void var_1c4;
00461666                  ElementDesc::ElementDesc(&var_1c4, (eax_1 + 0x23c));
00461674                  int32_t var_104_1 = 0;
0046167b                  int32_t var_100_1 = 0;
00461682                  int32_t var_fc_1 = 0;
00461689                  int32_t var_f8_1 = 0;
00461695                  uint32_t esi_2 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance_1, nullptr, esi_1, &var_1c4);
00461695                  
00461699                  if (esi_2 != 0)
00461699                  {
004616a3                      *(uint32_t*)(*(uint32_t*)esi_2 + 0xf0)(*(uint32_t*)ebp);
004616b1                      *(uint32_t*)ebp = esi_2;
004616b4                      UIElement::BroadcastElementMessage(this, 0x14, esi_2, 0);
004616bd                      ElementDesc::~ElementDesc(&var_1c4);
004616c5                      int32_t eax_5;
004616c5                      eax_5 = 1;
004616ce                      return 1;
00461699                  }
00461699                  
004616d5                  ElementDesc::~ElementDesc(&var_1c4);
0046165a              }
0046164c          }
0046163e      }
0046163e      
004616dd      eax_1 = 0;
004616e6      return 0;
00461600  }

004616e9                             90 90 90 90 90 90 90                                                           .......

004616f0  class UIElement* __fastcall UIElement::GetDragAndDropCatcher(class UIElement* this, class UIElement* arg2)

004616f0  {
004616f0      class UIElement* this_1 = this;
004616f3      class UIElement* edi = arg2;
004616f3      
004616ff      if ((edi != 0 && edi != this))
004616ff      {
00461708          UIElement::GetAttribute_Bool(this, 0x36, &arg2);
00461716          UIElement::GetAttribute_Bool(this, 0x38, &*(uint32_t*)((char*)this_1)[3]);
00461716          
00461729          if ((arg2 != 0 && *(uint8_t*)((char*)this_1)[3] == 0))
00461729          {
0046172d              int32_t eax_2 = this->m_dragDropCallback(edi, this);
00461736              char temp1 = eax_2;
00461736              eax_2 = -(eax_2);
0046173f              return ((eax_2 - eax_2) & this);
00461729          }
00461729          
0046174e          if (this->vtable->GetParent() != 0)
00461768              return *(uint32_t*)(*(uint32_t*)this->vtable->GetParent() + 0xec)(edi);
004616ff      }
004616ff      
00461770      return 0;
004616f0  }

00461773                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00461780  uint8_t __thiscall UIElement::CatchDroppedItem(class UIElement* this, class DragDropInfo* arg2)

00461780  {
00461789      UIElement::BroadcastElementMessage(this, 0x15, arg2, 0);
0046178e      int32_t eax;
0046178e      eax = 1;
00461790      return 1;
00461780  }

00461793                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004617a0  void __thiscall UIElement::DragAndDropComplete(class UIElement* this, class DragDropInfo* arg2)

004617a0  {
004617a5      int32_t ebx;
004617a5      ebx = arg2->success;
004617ac      int32_t edx;
004617ac      edx = ebx != 0;
004617b6      UIElement::BroadcastElementMessage(this, (edx + 0x15), arg2, 0);
004617a0  }

004617bf                                                                                               90                                 .

004617c0  void __thiscall UIElement::SetTooltip(class UIElement* this, class StringInfo const* arg2)

004617c0  {
004617d9      if (StringInfo::operator==(&this->m_TTText, arg2) == 0)
004617d9      {
004617de          StringInfo::operator=(&this->m_TTText, arg2);
004617e3          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004617e3          
004617eb          if (UIElementManager::s_pInstance_1 != 0)
004617eb          {
004617fd              if ((UIElementManager::s_pInstance_1->m_pTooltipOwner == this && UIElementManager::s_pInstance_1->m_pTooltipElement != 0))
004617ff                  UIElementManager::ResetTooltip(UIElementManager::s_pInstance_1);
004617ff              
00461804              class StringInfo* eax_1;
00461804              eax_1 = this->m_bShouldBeMouseVisible;
00461804              
0046180c              if ((eax_1 == 0 && this->vtable->GetShouldBeMouseVisible() == 0))
0046180c              {
0046181e                  this->m_bIsMouseVisible = 0;
00461827                  return;
0046180c              }
0046180c              
0046182f              this->m_bIsMouseVisible = 1;
004617eb          }
004617d9      }
004617c0  }

0046183b                                                                                   90 90 90 90 90                             .....

00461840  uint8_t __thiscall UIElement::MakeUIObject(class UIElement* this, class UIObject** arg2)

00461840  {
00461849      union __inner23 = this->__inner23;
00461849      
00461857      if ((((int8_t)(__inner23 >> 0xe)) & 1) != 0)
00461857      {
0046186b          class UIObject** esi_1;
0046186b          
0046186b          if (((((int8_t)(__inner23 >> 0x13)) & 1) == 0 || (*(uint8_t*)((char*)this->__inner23 + 0) & 1) == 0))
0046186b          {
004618c4              class UISurfaceObject* eax_1 = operator new(0x130);
004618ce              class UIObject* var_30_1;
004618ce              
004618ce              if (eax_1 == 0)
004618dd                  var_30_1 = nullptr;
004618ce              else
004618d7                  var_30_1 = UISurfaceObject::UISurfaceObject(eax_1);
004618d7              
004618e7              __inner23 = operator new(0x28);
004618e7              
004618f1              if (__inner23 != 0)
004618f1              {
004618fe                  union esi_2 = UISurface::UISurface(__inner23);
004618fe                  
0046190e                  if ((esi_2 != 0 && var_30_1 != 0))
0046190e                  {
0046191d                      int32_t m_width = UIRegion::GetWidth(this);
00461930                      int32_t m_height_1 = UIRegion::GetHeight(this);
00461939                      int32_t var_34;
00461939                      
00461939                      if (UIElement::GetAttribute_Enum(this, 0xcd, &var_34) == 0)
004619b4                          var_34 = 3;
00461939                      else
00461939                      {
0046193b                          int32_t eax_6 = var_34;
0046193b                          
00461947                          if ((eax_6 == 1 || eax_6 == 2))
00461947                          {
00461957                              if (this->vtable->DynamicCast(0x10) != 0)
004619b4                                  var_34 = 3;
00461957                              else
00461957                              {
00461959                                  class StateDesc* m_curStateDesc = this->m_curStateDesc;
00461959                                  
00461961                                  if (m_curStateDesc == 0)
00461961                                  {
00461975                                      m_width = this->m_desc.m_width;
0046197b                                      m_height_1 = this->m_desc.m_height;
00461961                                  }
00461961                                  else
00461961                                  {
00461963                                      m_width = m_curStateDesc->m_width;
00461963                                      
00461968                                      if (m_width == 0)
00461968                                      {
00461975                                          m_width = this->m_desc.m_width;
0046197b                                          m_height_1 = this->m_desc.m_height;
00461968                                      }
00461968                                      else
00461968                                      {
0046196a                                          int32_t m_height = m_curStateDesc->m_height;
0046196a                                          
0046196f                                          if (m_height == 0)
0046196f                                          {
00461975                                              m_width = this->m_desc.m_width;
0046197b                                              m_height_1 = this->m_desc.m_height;
0046196f                                          }
0046196f                                          else
00461971                                              m_height_1 = m_height;
00461968                                      }
00461961                                  }
00461961                                  
00461986                                  if (var_34 == 2)
00461986                                  {
00461988                                      class Graphic* m_image = this->m_image;
00461988                                      
00461990                                      if (m_image != 0)
00461990                                      {
0046199d                                          m_width = Graphic::GetWidth(m_image);
004619a4                                          m_height_1 = Graphic::GetHeight(this->m_image);
00461990                                      }
00461990                                      
004619b2                                      if (UISurface::IsPowerOfTwo(m_width, m_height_1) == 0)
004619b4                                          var_34 = 3;
00461986                                  }
00461957                              }
00461947                          }
00461939                      }
00461939                      
004619c9                      if (UISurface::CreateSurface(esi_2, m_width, m_height_1, 1) != 0)
004619c9                      {
004619f4                          int32_t eax_12;
004619f4                          eax_12 = var_34 == 2;
004619fb                          *(int32_t*)((char*)var_30_1->vtable + 0x38)(esi_2, eax_12);
00461a00                          UISurface::PrepareSurface(esi_2);
00461a08                          int32_t ebp_2 = *(uint32_t*)(*(uint32_t*)(esi_2 + 0xc) + 0xa4);
00461a10                          UISurface::PrepareSurface(esi_2);
00461a18                          int32_t eax_13 = *(uint32_t*)(*(uint32_t*)(esi_2 + 0xc) + 0xa0);
00461a24                          UISurface::PrepareSurface(esi_2);
00461a3d                          int32_t var_2c;
00461a3d                          SurfaceWindow::SurfaceWindow(&var_2c, *(uint32_t*)(esi_2 + 0xc), 0, 0, (eax_13 - 1), (ebp_2 - 1));
00461a4b                          SurfaceWindow::Fill(&var_2c, &RGBAColor_Null);
00461a52                          ReferenceCountTemplate<1048576,1>::Release(esi_2);
00461a57                          esi_1 = arg2;
00461a5f                          *(uint32_t*)esi_1 = var_30_1;
00461a61                          var_2c = 0x798d14;
00461a69                          SurfaceWindow::End(&var_2c);
00461a69                          goto label_461a6e;
004619c9                      }
004619c9                      
004619cd                      ReferenceCountTemplate<1048576,1>::Release(esi_2);
004619d6                      ReferenceCountTemplate<1048576,1>::Release(var_30_1);
0046190e                  }
004618f1              }
0046186b          }
0046186b          else
0046186b          {
0046186f              __inner23 = operator new(0x60);
0046186f              
00461879              if (__inner23 != 0)
00461879              {
00461881                  __inner23 = UIRectangleObject::UIRectangleObject(__inner23);
00461881                  
00461888                  if (__inner23 != 0)
00461888                  {
00461894                      esi_1 = arg2;
0046189b                      *(uint32_t*)(__inner23 + 0x50) = RGBAColor_White.r;
004618a3                      *(uint32_t*)(__inner23 + 0x54) = RGBAColor_White.g;
004618ac                      *(uint32_t*)(__inner23 + 0x58) = RGBAColor_White.b;
004618b5                      *(uint32_t*)(__inner23 + 0x5c) = RGBAColor_White.a;
004618b8                      *(uint32_t*)esi_1 = __inner23;
00461a6e                  label_461a6e:
00461a6e                      __inner23 = *(uint32_t*)esi_1;
00461a6e                      
00461a72                      if (__inner23 != 0)
00461a72                      {
00461a84                          *(uint8_t*)(__inner23 + 9) = (((int8_t)(this->__inner23 >> 0xf)) & 1);
00461a87                          class UIObject* eax_14 = *(uint32_t*)esi_1;
00461a8c                          uint32_t m_nVirtualY = eax_14->m_nVirtualY;
00461a8f                          struct UIObject::VTable* vtable = eax_14->vtable;
00461a93                          arg2 = eax_14->m_nVirtualX;
00461a97                          int32_t eax_15 = UIRegion::GetHeight(this);
00461a9f                          int32_t eax_16 = UIRegion::GetWidth(this);
00461aa4                          *(uint32_t*)esi_1;
00461aad                          vtable->SetVirtualScreenPosition(arg2, m_nVirtualY, eax_16, eax_15);
00461ab3                          int32_t eax_18;
00461ab3                          eax_18 = 1;
00461ab9                          return 1;
00461a72                      }
00461888                  }
00461879              }
0046186b          }
00461857      }
00461857      
004619de      *(uint8_t*)((char*)__inner23 + 0) = 0;
004619e4      return 0;
00461840  }

00461abc                                                                                      90 90 90 90                              ....

00461ac0  uint8_t __thiscall UIElement::SetUIObject(class UIElement* this, class UIObject* arg2)

00461ac0  {
00461ac3      class UIObject* m_object = this->m_object;
00461aca      class UIObject* edi = arg2;
00461aca      
00461ad0      if (edi != m_object)
00461ad0      {
00461ae4          this->__inner23 &= 0xfffeffff;
00461ae4          
00461aea          if (m_object != 0)
00461aea          {
00461aec              m_object->m_pOwner = nullptr;
00461afa              RenderUI::UnlinkObject(this->m_object);
00461aff              class UIObject* m_object_1 = this->m_object;
00461aff              
00461b0a              if (m_object_1 != 0)
00461b0a              {
00461b0c                  uint32_t m_cRef = m_object_1->m_cRef;
00461b0c                  m_object_1->m_cRef -= 1;
00461b0c                  
00461b0f                  if (m_cRef == 1)
00461b11                      m_object_1->vtable->__vecDelDtor(1);
00461b11                  
00461b17                  this->m_object = nullptr;
00461b0a              }
00461aea          }
00461aea          
00461b23          if (edi != 0)
00461b23          {
00461b2c              int32_t eax_1 = UIRegion::GetWidth(this);
00461b35              int32_t eax_2 = UIRegion::GetHeight(this);
00461b3d              arg2 = edi->vtable;
00461b44              int32_t eax_3 = UIRegion::GetScreenY0(this);
00461b58              arg2->m_eClampGameView(UIRegion::GetScreenX0(this), eax_3, eax_1, eax_2);
00461b65              edi->m_bVisible = (((int8_t)(this->__bitfield164 >> 1)) & 1);
00461b65              
00461b6e              if (edi->m_eClampGameView != 0)
00461b70                  RenderUI::RecalculateClampedPosition();
00461b70              
00461b7b              edi->m_nDepth = this->m_zlevel;
00461b8a              edi->m_tTouchTime = (*(uint32_t*)Timer::local_time);
00461b8d              *(uint32_t*)((char*)edi->m_tTouchTime)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00461b90              RenderUI::LinkObject(edi);
00461b95              this->__inner23 |= 0x10000;
00461b9f              this->m_object = edi;
00461ba5              edi->m_pOwner = this;
00461bae              this->vtable->SetClampGameViewEdge(this->m_eClampGameView);
00461bbb              UIRegion::MakeRootDirtyHere(this);
00461b23          }
00461ad0      }
00461ad0      
00461bc1      m_object = 1;
00461bc4      return 1;
00461ac0  }

00461bc7                       90 90 90 90 90 90 90 90 90                                                         .........

00461bd0  void __fastcall UIElement::SetShouldOwnObject(class UIElement* this, uint8_t arg2)

00461bd0  {
00461bd0      class UIElement* this_1 = this;
00461bd1      uint8_t eax = arg2;
00461bd8      union __inner23_1 = this->__inner23;
00461bf0      this->__inner23 = (__inner23_1 ^ (((((uint32_t)eax) << 0xe) ^ __inner23_1) & 0x4000));
00461bf0      
00461bf6      if ((eax != 0 && UIElement::GetAttribute_Enum(this, 0xcd, &this_1) != 0))
00461bf6      {
00461c13          class UIElement* eax_2;
00461c13          eax_2 = this_1 != 0;
00461c19          union __inner23 = this->__inner23;
00461c2c          this->__inner23 = (__inner23 ^ (((((uint32_t)eax_2) << 0xe) ^ __inner23) & 0x4000));
00461bf6      }
00461bf6      
00461c3d      arg2 = 0;
00461c3d      
00461c52      if (((((int8_t)(this->__bitfield164 >> 1)) & 1) != 0 && (((int8_t)(this->__inner23 >> 0xe)) & 1) != 0))
00461c54          this->vtable->MakeUIObject(&arg2);
00461c54      
00461c67      this->vtable->SetUIObject(arg2);
00461bd0  }

00461c77                                                                       90 90 90 90 90 90 90 90 90                         .........

00461c80  uint8_t __thiscall UIElement::Activate(class UIElement* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00461c80  {
00461c8f      uint8_t ebx_1 = (!(((int8_t)(this->__inner23 >> 0x14))) & 1);
00461c99      class UIElement* eax;
00461c99      
00461c99      if (UIElement::IsVisible(this) != 0)
00461c99      {
00461c9b          union __inner23 = this->__inner23;
00461c9b          
00461cab          if ((((int8_t)(__inner23 >> 0x15)) & 1) != 0)
00461cab          {
00461ccd              this->__inner23 = (__inner23 | 0x100000);
00461cd3              this->vtable->RegisterInputMaps(0);
00461cdd              class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00461cdd              
00461ce5              if (UIElementManager::s_pInstance_1 == 0)
00461ce5              {
00461d44                  int32_t eax_3;
00461d44                  eax_3 = 0;
00461d47                  return 0;
00461ce5              }
00461ce5              
00461cec              UIElementManager::ActivationAlert(UIElementManager::s_pInstance_1, this, 1);
00461cf4              UIElementManager::RegisterActivatable(UIElementManager::s_pInstance_1, this);
00461cf4              
00461d05              if (this->vtable->GetParent() != 0)
00461d16                  *(uint32_t*)(*(uint32_t*)this->vtable->GetParent() + 0x48)(this);
00461d16              
00461d1b              if (ebx_1 != 0)
00461d1b              {
00461d25                  UIElement::BroadcastElementMessage(this, 0x29, 0, 0);
00461d2a                  class UIElement* m_pFocusElement = this->m_pFocusElement;
00461d2a                  
00461d32                  if (m_pFocusElement != 0)
00461d37                      UIElementManager::SetFocusElement(UIElementManager::s_pInstance_1, m_pFocusElement);
00461d1b              }
00461d1b              
00461d3e              int32_t eax_4;
00461d3e              eax_4 = 1;
00461d41              return 1;
00461cab          }
00461cab          
00461cad          eax = UIElement::GetRootElement(this);
00461cad          
00461cb4          if (eax != 0)
00461cbc              /* jump -> eax->vtable->Activate */
00461c99      }
00461c99      
00461cc3      eax = 0;
00461cc6      return 0;
00461c80  }

00461d48                          90 90 90 90 90 90 90 90                                                          ........

00461d50  uint8_t __thiscall UIElement::Deactivate(class UIElement* this)

00461d50  {
00461d53      union __inner23 = this->__inner23;
00461d53      
00461d63      if ((((int8_t)(__inner23 >> 0x15)) & 1) == 0)
00461d63      {
00461d65          class UIElement* eax = UIElement::GetRootElement(this);
00461d65          
00461d6c          if (eax == 0)
00461d6c          {
00461d79              eax = 0;
00461d7c              return 0;
00461d6c          }
00461d6c          
00461d73          /* jump -> eax->vtable->Deactivate */
00461d63      }
00461d63      
00461d85      this->__inner23 = (__inner23 & 0xffefffff);
00461d8b      this->vtable->UnregisterInputMaps();
00461d9a      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00461d9a      
00461da2      if (UIElementManager::s_pInstance_1 == 0)
00461da2      {
00461dda          int32_t eax_3;
00461dda          eax_3 = 0;
00461ddd          return 0;
00461da2      }
00461da2      
00461da9      UIElementManager::ActivationAlert(UIElementManager::s_pInstance_1, this, 0);
00461da9      
00461db0      if ((((int8_t)(__inner23 >> 0x14)) & 1) != 0)
00461db0      {
00461dba          UIElement::BroadcastElementMessage(this, 0x2a, 0, 0);
00461dba          
00461dc7          if (this->m_pFocusElement != 0)
00461dcd              UIElementManager::SetFocusElement(UIElementManager::s_pInstance_1, nullptr);
00461db0      }
00461db0      
00461dd4      class UIElement* eax_4;
00461dd4      eax_4 = 1;
00461dd7      return 1;
00461d50  }

00461dde                                                                                            90 90                                ..

00461de0  uint8_t __fastcall UIElement::RelinquishFocus(class UIElement* this)

00461de0  {
00461de3      class UIElement* eax = UIElement::GetRootElement(this);
00461de3      
00461dea      if (eax != 0)
00461dea      {
00461dec          eax->m_pFocusElement = nullptr;
00461df6          this->__inner23 &= 0xffbfffff;
00461e00          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00461e00          
00461e08          if (UIElementManager::s_pInstance_1 != 0)
00461e08          {
00461e10              eax = UIElementManager::s_pInstance_1->m_focusElement == this;
00461e10              
00461e15              if (eax != 0)
00461e19                  UIElementManager::SetFocusElement(UIElementManager::s_pInstance_1, nullptr);
00461e08          }
00461dea      }
00461dea      
00461e1e      eax = 1;
00461e21      return 1;
00461de0  }

00461e22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00461e30  void __thiscall UIElement::SetMouseVisible(class UIElement* this, uint8_t arg2)

00461e30  {
00461e3d      int32_t ebx;
00461e3d      ebx = this->m_bIsMouseVisible;
00461e43      this->m_bShouldBeMouseVisible = arg2;
00461e49      uint8_t eax_3;
00461e49      
00461e49      if (arg2 != 0)
00461e5b          eax_3 = 1;
00461e49      else if (this->vtable->GetShouldBeMouseVisible() != 0)
00461e5b          eax_3 = 1;
00461e55      else
00461e57          eax_3 = 0;
00461e57      
00461e62      this->m_bIsMouseVisible = eax_3;
00461e62      
00461e68      if (ebx != eax_3)
00461e68      {
00461e6a          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00461e6a          
00461e72          if (UIElementManager::s_pInstance_1 != 0)
00461e72          {
00461e74              class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00461e74              
00461e7c              if (ICIDM::s_cidm_1 != 0)
00461e7c              {
00461e84                  int32_t eax_4 = ICIDM::s_cidm_1->vtable->GetMouseY();
00461e8d                  int32_t eax_6 = ICIDM::s_cidm_1->vtable->GetMouseX();
00461e99                  void __return;
00461e99                  class Box2D* eax_7 = UIRegion::GetScreenClipBox(this, &__return);
00461e99                  
00461eaa                  if (((eax_6 < eax_7->m_x0 || eax_6 > eax_7->m_x1) || eax_4 < eax_7->m_y0))
00461eaa                  {
00461eb8                      if ((*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0)
00461eba                          UIElementManager::s_pInstance_1->m_bPerformMouseHitTest = 1;
00461eaa                  }
00461eaa                  else if ((eax_4 <= eax_7->m_y1 || (*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0))
00461eba                      UIElementManager::s_pInstance_1->m_bPerformMouseHitTest = 1;
00461e7c              }
00461e72          }
00461e68      }
00461e30  }

00461ecb                                   90 90 90 90 90                                                             .....

00461ed0  void __thiscall UIElement::GetCurrentUIObjectMode(class UIElement const* this, uint32_t* arg2)

00461ed0  {
00461ed0      class UIElement* this_1 = this;
00461ed2      class UIElement* this_2 = this;
00461ed2      
00461edf      if ((((int8_t)(this_2->__inner23 >> 0xe)) & 1) == 0)
00461edf      {
00461f06          class UIElement* this_3;
00461f06          
00461f06          do
00461f06          {
00461ee9              if (this_2->m_parent == 0)
00461f57                  return;
00461f57              
00461eef              this_3 = this_2->vtable->GetParent();
00461eef              
00461ef7              if (this_3 == 0)
00461f57                  return;
00461f57              
00461ef9              this_2 = this_3;
00461f06          } while ((((int8_t)(this_3->__inner23 >> 0xe)) & 1) == 0);
00461edf      }
00461edf      
00461f16      if (this_2->vtable->DynamicCast(0x10) != 0)
00461f16      {
00461f1c          *(uint32_t*)arg2 = 3;
00461f24          return;
00461f16      }
00461f16      
00461f3a      if (UIElement::GetAttribute_Enum(this_2, 0xcd, &this_1) == 0)
00461f3a      {
00461f4f          *(uint32_t*)arg2 = 3;
00461f57          return;
00461f3a      }
00461f3a      
00461f44      *(uint32_t*)arg2 = this_1;
00461ed0  }

00461f5a                                                                                90 90 90 90 90 90                            ......

00461f60  class Vector3* __thiscall UIElement::GetObjectScale(class UIElement const* this, class Vector3* __return)

00461f60  {
00461f60      class UIElement* this_1 = this;
00461f69      this_1 = 3;
00461f71      UIElement::GetCurrentUIObjectMode(this, &this_1);
00461f76      class UIElement* this_2 = this_1;
00461f76      
00461f82      if ((this_2 != 2 && this_2 != 3))
00461f82      {
00461f84          class UIObject* m_object = this->m_object;
00461f84          
00461f8c          if (m_object != 0)
00461f8c          {
00461fa4          label_461fa4:
00461fa4              int32_t* __return_2 = __return;
00461fa8              *(uint32_t*)__return_2 = m_object->m_vScale.x;
00461fad              __return_2[1] = m_object->m_vScale.y;
00461fb3              __return_2[2] = m_object->m_vScale.z;
00461fba              return __return_2;
00461f8c          }
00461f8c          
00461f8e          class UIRegion* m_parent = this->m_parent;
00461f8e          
00461f96          if (m_parent != 0)
00461f96          {
00461f98              m_object = UIRegion::GetObjectA(m_parent);
00461f98              
00461f9f              if (m_object != 0)
00461f9f                  goto label_461fa4;
00461f96          }
00461f82      }
00461f82      
00461fc3      float* __return_1 = __return;
00461fc7      *(uint32_t*)__return_1 = ((float)((long double)Vector3_OneVector__.x));
00461fcf      __return_1[1] = Vector3_OneVector__.y;
00461fd8      __return_1[2] = Vector3_OneVector__.z;
00461fdd      return __return_1;
00461f60  }


00461fe0  uint8_t __fastcall UIElement::UpdateObjectScale(class UIElement* this)

00461fe0  {
00461fe8      class UIObject* m_object = this->m_object;
00461fee      char ebx = 0;
00461fee      
00461ff2      if (m_object != 0)
00461ff2          goto label_462009;
00461ff2      
00461ff4      class UIRegion* m_parent = this->m_parent;
00461ff4      
00461ffc      if (m_parent != 0)
00461ffc      {
00462002          m_object = UIRegion::GetObjectA(m_parent);
00462009      label_462009:
00462009          
0046200b          if (m_object != 0)
0046200b          {
00462018              float var_28 = 4.20389539e-45f;
00462020              UIElement::GetCurrentUIObjectMode(this, &var_28);
00462025              float eax = var_28;
00462025              
00462035              if ((eax == 2 || eax == 3))
00462035              {
00462131                  eax = 0;
00462137                  return 0;
00462035              }
00462035              
0046203e              float y = m_object->m_vScale.y;
00462041              float z = m_object->m_vScale.z;
00462044              class Vector3* esi_2 = &m_object->m_vScale;
00462047              float x = m_object->m_vScale.x;
0046204f              float y_1 = y;
0046205b              float z_1 = z;
0046205f              float var_1c = 0f;
00462063              int32_t var_18_1 = 0;
00462067              int32_t var_14_1 = 0;
0046206b              int32_t var_10_1 = 0;
0046206f              int32_t var_20;
0046206f              UIElement::GetOriginalPosition(this, &var_1c, &var_20);
00462083              float var_2c_1;
00462083              
00462083              if ((var_14_1 - var_1c) != 0xffffffff)
004620a2                  var_2c_1 = ((float)(((long double)UIRegion::GetWidth(this)) / ((long double)((var_14_1 - var_1c) + 1))));
00462083              else
00462085                  var_2c_1 = 0f;
00462085              
004620b1              var_20 = ((var_10_1 - var_18_1) + 1);
004620b5              long double x87_r7_3;
004620b5              
004620b5              if ((var_10_1 - var_18_1) != 0xffffffff)
004620ce                  x87_r7_3 = (((long double)UIRegion::GetHeight(this)) / ((long double)var_20));
004620b5              else
004620b7                  x87_r7_3 = ((long double)0f);
004620b7              
004620d6              var_28 = ((float)x87_r7_3);
004620de              float var_18_2 = ((float)x87_r7_3);
004620e7              var_1c = var_2c_1;
004620eb              int32_t var_14_2 = 0x3f800000;
004620eb              
004620fa              if (Vector3::operator!=(&x, &var_1c) != 0)
004620fa              {
00462100                  float eax_10 = var_28;
00462106                  var_1c = var_2c_1;
0046210c                  float var_18_3 = eax_10;
0046211c                  esi_2->x = var_2c_1;
0046211e                  esi_2->y = eax_10;
00462121                  esi_2->z = 1f;
00462124                  ebx = 1;
004620fa              }
0046200b          }
00461ffc      }
00461ffc      
00462128      m_object = ebx;
0046212e      return m_object;
00461fe0  }

00462138                                                                          90 90 90 90 90 90 90 90                          ........

00462140  class Box2D* __thiscall UIElement::GetSurfaceBox(class UIElement const* this, class Box2D* __return)

00462140  {
00462147      if ((*(uint8_t*)((char*)this->__inner23 + 2) & 1) != 0)
00462147      {
0046214e          class Box2D* __return_2 = __return;
0046214f          class Box2D* __return_1;
0046214f          UIRegion::GetSurfaceBox(this, __return_1);
00462157          return __return;
00462147      }
00462147      
00462166      if (__return != &this->m_surfaceBox)
00462166      {
0046216a          __return->m_x0 = this->m_surfaceBox.m_x0;
0046216f          __return->m_x1 = this->m_surfaceBox.m_x1;
00462175          __return->m_y0 = this->m_surfaceBox.m_y0;
0046217b          __return->m_y1 = this->m_surfaceBox.m_y1;
00462166      }
00462166      
0046217e      return __return;
00462140  }

00462181     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00462190  uint8_t __thiscall UIElement::UpdateSurfaceBox(class UIElement* this, uint8_t const arg2)

00462190  {
004621a1      if (((this->__inner23 >> 0xe) & 1) == 0)
004621a1      {
004621b1          float __return;
004621b1          UIElement::GetObjectScale(this, &__return);
004621b6          int32_t m_x0 = this->m_surfaceBox.m_x0;
004621bc          int32_t m_y0 = this->m_surfaceBox.m_y0;
004621d2          int32_t eax_2;
004621d2          eax_2 = arg2;
004621d8          int32_t edi_3 = ((this->m_surfaceBox.m_x1 - m_x0) + 1);
004621d9          int32_t ebx_3 = ((this->m_surfaceBox.m_y1 - m_y0) + 1);
004621e0          int32_t m_y0_1;
004621e0          
004621e0          if (eax_2 == 0)
004621e0          {
00462208              arg2 = UIRegion::GetWidth(this);
0046221b              edi_3 = _ftol2();
00462222              arg2 = UIRegion::GetHeight(this);
00462233              ebx_3 = _ftol2();
00462235              m_y0_1 = m_y0;
004621e0          }
004621e0          else
004621e0          {
004621e2              this->m_box;
004621e9              int32_t m_x0_1 = _ftol2();
004621ee              this->m_box;
004621f4              m_x0 = m_x0_1;
004621fa              m_y0_1 = _ftol2();
004621e0          }
004621e0          
00462239          this->m_surfaceBox.m_y0 = m_y0_1;
00462241          this->m_surfaceBox.m_x0 = m_x0;
0046224b          this->m_surfaceBox.m_x1 = ((m_x0 + edi_3) - 1);
0046225d          this->m_surfaceBox.m_y1 = ((this->m_surfaceBox.m_y0 + ebx_3) - 1);
004621a1      }
004621a1      
00462264      int32_t eax_1;
00462264      eax_1 = 1;
0046226a      return 1;
00462190  }

0046226d                                         90 90 90                                                               ...

00462270  void* __thiscall IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>* this, uint32_t arg2)

00462270  {
00462273      class HashSetData<UIListener *>** m_buckets = this->m_buckets;
0046227b      this->vtable = &IntrusiveHashTable<class UIListener*,class HashSetData<class UIListener*>*,1>::`vftable';
0046227b      
00462281      if (m_buckets != &this->m_aInplaceBuckets)
00462284          operator delete[](m_buckets);
00462284      
0046228e      this->m_buckets = nullptr;
00462291      this->m_firstInterestingBucket = nullptr;
00462294      this->m_numBuckets = 0;
00462297      this->m_numElements = 0;
00462297      
0046229f      if ((arg2 & 1) != 0)
004622a2          operator delete(this);
004622a2      
004622ad      return this;
00462270  }


004622b0  void __thiscall UIElement::SetVisible(class UIElement* this, uint8_t arg2)

004622b0  {
004622b0      class UIElement* this_1 = this;
004622b4      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004622c7      *(uint8_t*)((char*)this_1)[3] = UIElement::IsVisible(this);
004622d4      uint8_t ebx_1 = (((int8_t)(this->__bitfield164 >> 1)) & 1);
004622d7      UIRegion::SetVisible(this, arg2);
004622de      uint8_t eax_2 = UIElement::IsVisible(this);
004622ef      uint8_t eax_4 = (((int8_t)(this->__bitfield164 >> 1)) & 1);
004622ef      
004622f3      if (eax_4 != ebx_1)
004622ff          UIElement::BroadcastElementMessage(this, 0x18, ((uint32_t)eax_4), 0);
004622ff      
0046230c      if (*(uint8_t*)((char*)this_1)[3] != eax_2)
0046230c      {
0046231d          if (((((int8_t)(this->__inner23 >> 6)) & 1) != 0 && UIElementManager::s_pInstance_1 != 0))
00462325              UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance_1, 7, 0);
00462325          
0046232e          this->vtable->UpdateForParentVisibilityChange(eax_2);
0046230c      }
004622b0  }


00462340  enum UIElementMessageListenResult __thiscall UIElement::ListenToElementMessage(class UIElement* this, struct UIElementMessageInfo const* arg2)

00462340  {
00462342      struct UIElementMessageInfo* edi = arg2;
00462342      
0046234d      if (edi->pElement == this)
00462362          switch ((edi->idMessage - 0x29))
00462362          {
00462369              case 0:
00462369              {
00462369                  uint32_t m_state = this->m_state;
00462369                  
00462376                  if ((m_state == 0 || m_state == 1))
0046237c                      this->vtable->SetState(5);
00462369                  break;
00462369              }
004623a1              case 1:
004623a1              {
004623a1                  if (this->m_state == 5)
004623a7                      this->vtable->SetState(1);
004623a1                  break;
004623a1              }
004623c5              case 6:
004623c5              {
004623c5                  uint32_t dwParam1 = edi->dwParam1;
004623ca                  uint32_t m_state_1 = this->m_state;
004623ca                  
004623d0                  if ((dwParam1 != 0 && ((m_state_1 == 0 || m_state_1 == 1) || m_state_1 == 5)))
004623d0                  {
004623e0                      this->vtable->SetState(4);
004623fb                      return this->vtable->ForwardElementMessage(edi, 0);
004623d0                  }
004623d0                  
00462400                  if (((dwParam1 == 0 || dwParam1 == 0) && m_state_1 == 4))
00462415                      this->vtable->SetState(((((this->__inner23 >> 0x14) & 1) << 2) | 1));
004623c5                  break;
004623c5              }
00462447              case 8:
00462447              {
00462447                  arg2 = nullptr;
0046244f                  UIElement::GetAttribute_Enum(this, 0x58, &arg2);
00462454                  struct UIElementMessageInfo* eax_14 = arg2;
00462454                  
00462459                  if (eax_14 == 1)
00462459                  {
00462488                      uint32_t eax_21;
00462488                      eax_21 = !((this->__bitfield164 >> 1));
00462490                      this->vtable->SetVisible((eax_21 & 0xffffff01));
00462459                  }
00462459                  else
00462459                  {
0046245c                      if (eax_14 == 2)
0046245c                      {
00462465                          this->vtable->SetVisible(1);
0046247d                          return this->vtable->ForwardElementMessage(edi, 0);
0046245c                      }
0046245c                      
0046245f                      if (eax_14 == 3)
00462490                          this->vtable->SetVisible(0);
00462459                  }
00462447                  break;
00462447              }
00462362          }
00462362      
004624a6      return this->vtable->ForwardElementMessage(edi, 0);
00462340  }

004624a9                             8d 49 00                                                                       .I.
004624ac  uint32_t jump_table_4624ac[0x9] = 
004624ac  {
004624ac      [0x0] =  0x00462369
004624b0      [0x1] =  0x0046239a
004624b4      [0x2] =  0x00462497
004624b8      [0x3] =  0x00462497
004624bc      [0x4] =  0x00462497
004624c0      [0x5] =  0x00462497
004624c4      [0x6] =  0x004623c5
004624c8      [0x7] =  0x00462497
004624cc      [0x8] =  0x0046243e
004624d0  }

004624d0  uint8_t __thiscall UIElement::InqAvailableProperties(class UIElement const* this, class AvailablePropertySet* arg2)

004624d0  {
004624d0      class UIElement* this_1 = this;
004624d7      int32_t ebx;
004624d7      ebx = 1;
004624d9      MasterPropertyGrabber::MasterPropertyGrabber(&this_1);
004624de      class UIElement* this_2 = this_1;
004624de      
004624e4      if (this_2 == 0)
004624e4      {
004624e7          int32_t eax;
004624e7          eax = 0;
004624eb          return 0;
004624e4      }
004624e4      
004624fe      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(this_2, 8, arg2) == 0)
00462500          ebx = 0;
00462500      
00462502      this_2->vtable->ListenToGlobalMessage();
0046250e      return ebx;
004624d0  }

00462511                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00462520  uint8_t __thiscall UIElement::MouseHover(class UIElement* this, int32_t arg2, int32_t arg3)

00462520  {
00462523      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00462539      char var_29 = 0;
00462539      
0046254c      if (((1 & ((int8_t)(this->__bitfield164 >> 5))) != 0 && (UIElementManager::s_pInstance_1 != 0 && UIElementManager::s_pInstance_1->m_tooltipEnable != 0)))
0046254c      {
0046254e          int32_t __saved_ebp_1 = 0;
00462554          UIElement::StartTooltipAtMouse(this, 0f);
00462559          var_29 = 1;
0046254c      }
0046254c      
00462563      if ((*(uint8_t*)((char*)this->__inner23 + 3) & 1) != 0)
00462563      {
00462566          uint32_t m_elementID = this->m_desc.m_elementID;
0046257c          int32_t edi_2 = (arg3 - UIRegion::GetScreenY0(this));
0046258d          int32_t var_c_1 = (arg2 - UIRegion::GetScreenX0(this));
00462591          class UIElementManager* UIElementManager::s_pInstance_2 = UIElementManager::s_pInstance;
00462599          int32_t var_8_1 = edi_2;
0046259e          uint32_t m_elementID_1 = m_elementID;
004625a2          class UIElement* this_1 = this;
004625a6          int32_t var_20_1 = 0x20;
004625ae          int32_t var_1c_1 = 0;
004625b2          int32_t var_18_1 = 0;
004625b6          int32_t var_4_1 = 0;
004625ba          int32_t var_14_1 = arg2;
004625be          int32_t var_10_1 = arg3;
004625be          
004625c3          if (UIElementManager::s_pInstance_2 != 0)
004625ca              UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_2, &m_elementID_1);
00462563      }
00462563      
004625cf      UIElementManager::s_pInstance_1 = var_29;
004625d8      return UIElementManager::s_pInstance_1;
00462520  }

004625db                                                                                   90 90 90 90 90                             .....

004625e0  void __fastcall UIElement::ClearTooltip(class UIElement* this)

004625e0  {
004625ed      void var_90;
004625ed      StringInfo::StringInfo(&var_90);
004625f9      UIElement::SetTooltip(this, &var_90);
00462606      char eax_1;
00462606      
00462606      if (this->m_bShouldBeMouseVisible == 0)
0046260c          eax_1 = this->vtable->GetShouldBeMouseVisible();
0046260c      
00462614      uint8_t eax_2;
00462614      
00462614      if ((this->m_bShouldBeMouseVisible != 0 || eax_1 != 0))
0046261a          eax_2 = 1;
00462614      else
00462616          eax_2 = 0;
00462616      
00462623      this->m_bIsMouseVisible = eax_2;
00462629      StringInfo::~StringInfo(&var_90);
004625e0  }

00462636                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00462640  uint8_t __fastcall UIElement::UpdateForParentSizeChange(class UIElement* this)

00462640  {
0046264d      int32_t ebp = 0;
0046264d      
00462651      if (this->m_layout == 0)
00462651      {
004629f1          class LayoutDesc* eax;
004629f1          eax = 0;
004629f7          return 0;
00462651      }
00462651      
00462665      int32_t m_x0_1 = 0;
00462669      int32_t m_y0_1 = 0;
0046266d      int32_t m_x1_3 = 0;
00462671      int32_t m_y1_3 = 0;
00462675      int32_t var_44;
00462675      UIElement::GetOriginalPosition(this, &m_x0_1, &var_44);
00462686      int32_t m_x0 = m_x0_1;
00462692      struct UIElement::VTable* vtable = this->vtable;
00462694      int32_t m_y0 = m_y0_1;
004626ae      int32_t s;
004626ae      __builtin_memset(&s, 0, 0x20);
004626be      class UIElement* eax_2 = vtable->GetParent();
004626d6      int32_t var_50;
004626d6      int32_t var_18_1;
004626d6      int32_t var_c_1;
004626d6      int32_t var_4_1;
004626d6      int32_t eax_3;
004626d6      int32_t ecx_7;
004626d6      int32_t edi_1;
004626d6      
004626d6      if ((eax_2 == 0 || (((int8_t)(this->__inner23 >> 0x15)) & 1) != 0))
004626d6      {
0046270c          class LayoutDesc* m_layout = this->m_layout;
0046271e          edi_1 = (m_layout->m_displayWidth - 1);
00462720          var_c_1 = 0;
00462724          var_4_1 = (m_layout->m_displayHeight - 1);
00462728          uint32_t eax_6 = RenderDevice::GetDisplayHeight(RenderDevice::render_device);
0046273c          ecx_7 = 0;
0046273e          var_18_1 = (RenderDevice::GetDisplayWidth(RenderDevice::render_device) - 1);
00462742          s = 0;
00462746          eax_3 = (eax_6 - 1);
004626d6      }
004626d6      else
004626d6      {
004626e4          int32_t var_10;
004626e4          UIElement::GetOriginalPosition(eax_2, &var_10, &var_50);
004626f5          UIElement::GetCurrentPosition(eax_2, &s, &var_50);
004626fa          int32_t var_8;
004626fa          edi_1 = var_8;
004626fe          ebp = var_10;
00462702          int32_t var_14;
00462702          eax_3 = var_14;
00462706          int32_t var_1c;
00462706          ecx_7 = var_1c;
004626d6      }
004626d6      
00462752      int32_t eax_9 = (eax_3 - ecx_7);
00462762      int32_t ecx_12 = ((eax_9 - var_4_1) + var_c_1);
00462766      int32_t ebx_6 = (((var_18_1 - edi_1) - s) + ebp);
0046276b      var_50 = eax_9;
0046276f      int32_t var_54 = ecx_12;
0046276f      
00462777      if ((edi_1 - ebp) != 0xffffffff)
00462794          float var_58 = ((float)(((long double)((var_18_1 - s) + 1)) / ((long double)((edi_1 - ebp) + 1))));
00462777      else
00462779          var_58 = ((edi_1 - ebp) + 1);
00462779      
004627be      uint32_t m_leftEdge = this->m_desc.m_leftEdge;
004627be      
004627c7      if (m_leftEdge == 2)
00462817          m_x0 = (ebx_6 + m_x0_1);
004627c7      else if (m_leftEdge == 3)
004627ca      {
004627f5          int32_t eax_18;
004627f5          int32_t edx_7;
004627f5          edx_7 = HIGHD(((int64_t)((var_18_1 - s) + 1)));
004627f5          eax_18 = LOWD(((int64_t)((var_18_1 - s) + 1)));
00462803          int32_t eax_23;
00462803          int32_t edx_8;
00462803          edx_8 = HIGHD(((int64_t)((m_x1_3 - m_x0_1) + 1)));
00462803          eax_23 = LOWD(((int64_t)((m_x1_3 - m_x0_1) + 1)));
0046280a          m_x0 = (((eax_18 - edx_7) >> 1) - ((eax_23 - edx_8) >> 1));
004627ca      }
004627ca      else if (m_leftEdge == 4)
004627cd      {
004627dc          ecx_12 = var_54;
004627e0          m_x0 = _ftol2();
004627cd      }
004627cd      
0046281b      uint32_t m_rightEdge = this->m_desc.m_rightEdge;
00462822      int32_t m_x1_2;
00462822      
00462822      if (m_rightEdge == 1)
00462877          m_x1_2 = (m_x1_3 + ebx_6);
00462822      else if (m_rightEdge == 3)
00462827      {
0046284c          int32_t eax_34;
0046284c          int32_t edx_10;
0046284c          edx_10 = HIGHD(((int64_t)((var_18_1 - s) + 1)));
0046284c          eax_34 = LOWD(((int64_t)((var_18_1 - s) + 1)));
0046285e          int32_t eax_39;
0046285e          int32_t edx_12;
0046285e          edx_12 = HIGHD(((int64_t)((m_x1_3 - m_x0_1) + 1)));
0046285e          eax_39 = LOWD(((int64_t)((m_x1_3 - m_x0_1) + 1)));
00462877          m_x1_2 = ((((eax_34 - edx_10) >> 1) + ((eax_39 - edx_12) >> 1)) - 1);
00462827      }
00462827      else if (m_rightEdge != 4)
00462877          m_x1_2 = m_x1_3;
0046282a      else
0046282a      {
00462839          ecx_12 = var_54;
0046283d          m_x1_2 = _ftol2();
0046282a      }
0046282a      
0046287b      uint32_t m_topEdge = this->m_desc.m_topEdge;
0046287b      
00462884      if (m_topEdge == 2)
004628c3          m_y0 = (m_y0_1 + ecx_12);
00462884      else if (m_topEdge == 3)
00462887      {
004628a8          int32_t eax_50;
004628a8          int32_t edx_16;
004628a8          edx_16 = HIGHD(((int64_t)((m_y1_3 - m_y0_1) + 1)));
004628a8          eax_50 = LOWD(((int64_t)((m_y1_3 - m_y0_1) + 1)));
004628b4          int32_t eax_54;
004628b4          int32_t edx_17;
004628b4          edx_17 = HIGHD(((int64_t)(var_50 + 1)));
004628b4          eax_54 = LOWD(((int64_t)(var_50 + 1)));
004628c3          m_y0 = (((eax_54 - edx_17) >> 1) - ((eax_50 - edx_16) >> 1));
00462887      }
00462887      else if (m_topEdge == 4)
0046288a      {
00462897          ecx_12 = var_54;
004628c3          m_y0 = _ftol2();
0046288a      }
0046288a      
004628c7      uint32_t m_bottomEdge = this->m_desc.m_bottomEdge;
004628ce      int32_t m_y1_2;
004628ce      
004628ce      if (m_bottomEdge == 1)
00462915          m_y1_2 = (m_y1_3 + ecx_12);
004628ce      else if (m_bottomEdge == 3)
004628d3      {
004628f0          int32_t eax_65;
004628f0          int32_t edx_18;
004628f0          edx_18 = HIGHD(((int64_t)((m_y1_3 - m_y0_1) + 1)));
004628f0          eax_65 = LOWD(((int64_t)((m_y1_3 - m_y0_1) + 1)));
004628fc          int32_t eax_69;
004628fc          int32_t edx_19;
004628fc          edx_19 = HIGHD(((int64_t)(var_50 + 1)));
004628fc          eax_69 = LOWD(((int64_t)(var_50 + 1)));
00462915          m_y1_2 = ((((eax_65 - edx_18) >> 1) + ((eax_69 - edx_19) >> 1)) - 1);
004628d3      }
004628d3      else if (m_bottomEdge != 4)
00462915          m_y1_2 = m_y1_3;
004628d6      else
004628e3          m_y1_2 = _ftol2();
004628e3      
0046291d      int32_t eax_74 = UIRegion::GetWidth(this);
00462924      int32_t eax_75;
00462924      
00462924      if (eax_74 == 0)
00462928          eax_75 = UIRegion::GetHeight(this);
00462928      
0046293d      if (((eax_74 != 0 || eax_75 != 0) || (((int8_t)(this->__inner23 >> 0x11)) & 1) != 0))
0046293d      {
0046294d          int32_t m_x1 = this->m_box.m_x1;
00462953          int32_t m_y1 = this->m_box.m_y1;
00462953          
00462959          if (this->m_desc.m_leftEdge == 0)
0046295e              m_x0 = this->m_box.m_x0;
0046295e          
0046296a          if (this->m_desc.m_topEdge == 0)
0046296c              m_y0 = this->m_box.m_y0;
0046296c          
00462978          if (this->m_desc.m_rightEdge == 0)
00462978          {
0046297a              int32_t m_x1_1 = m_x1;
0046297e              m_x1_2 = m_x1;
00462978          }
00462978          
00462988          if (this->m_desc.m_bottomEdge == 0)
00462988          {
0046298a              int32_t m_y1_1 = m_y1;
0046298e              m_y1_2 = m_y1;
00462988          }
0046293d      }
0046293d      
00462998      this->vtable->MoveTo(m_x0, m_y0);
004629a1      this->vtable->ResizeTo(((m_x1_2 - m_x0) + 1), ((m_y1_2 - m_y0) + 1));
004629b4      int32_t ebx_9 = var_44;
004629be      int32_t* eax_80;
004629be      
004629be      if (ebx_9 != this->m_zlevel)
004629be      {
004629c4          eax_80 = this->vtable->GetParent();
004629ce          this->m_zlevel = ebx_9;
004629ce          
004629d4          if (eax_80 != 0)
004629d4          {
004629db              *(uint32_t*)(*(uint32_t*)eax_80 + 0x70)(this);
004629e3              *(uint32_t*)(*(uint32_t*)eax_80 + 0x6c)(this);
004629d4          }
004629be      }
004629be      
004629e9      eax_80 = 1;
004629ef      return 1;
00462640  }

004629f8                                                                          90 90 90 90 90 90 90 90                          ........

00462a00  uint8_t __thiscall CTimestamp<unsigned long,0>::operator<(class CTimestamp<unsigned long,0> const* this, class CTimestamp<unsigned long,0> const* arg2)

00462a00  {
00462a04      uint32_t m_timestamp = arg2->m_timestamp;
00462a06      uint32_t m_timestamp_1 = this->m_timestamp;
00462a06      
00462a0b      if (m_timestamp_1 == m_timestamp)
00462a0b      {
00462a13          int32_t eax;
00462a13          eax = false;
00462a17          return 0;
00462a0b      }
00462a0b      
00462a1c      uint32_t edx_1 = (m_timestamp_1 - m_timestamp);
00462a20      int32_t esi = 1;
00462a20      
00462a25      if (m_timestamp_1 < m_timestamp)
00462a25      {
00462a29          edx_1 = (m_timestamp - m_timestamp_1);
00462a2b          esi = 0xffffffff;
00462a25      }
00462a25      
00462a34      if (edx_1 > 0x7fffffff)
00462a36          esi = -(esi);
00462a36      
00462a40      return esi < 0;
00462a00  }

00462a43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00462a50  void __thiscall UIElement::SetParent(class UIElement* this, class UIRegion* arg2)

00462a50  {
00462a50      class UIElement* this_1 = this;
00462a59      int32_t eax_1 = this->vtable->GetParent();
00462a63      int32_t eax_2 = UIRegion::GetScreenX0(this);
00462a6c      int32_t eax_3 = UIRegion::GetScreenY0(this);
00462a6c      
00462a7b      if (eax_1 != arg2)
00462a7b      {
00462a83          class UIElement* eax_4 = UIElement::GetRootElement(this);
00462a83          
00462a8a          if (eax_4 != 0)
00462a8a          {
00462a8c              class UIElement* m_pFocusElement = eax_4->m_pFocusElement;
00462a8c              
00462a94              if (m_pFocusElement != 0)
00462a94              {
00462a98                  uint8_t eax_5;
00462a98                  
00462a98                  if (m_pFocusElement != this)
00462a9d                      eax_5 = UIElement::IsAncestorOfMe(m_pFocusElement, this);
00462a9d                  
00462aa4                  if ((m_pFocusElement == this || eax_5 != 0))
00462aa6                      m_pFocusElement->vtable->RelinquishFocus();
00462a94              }
00462a8a          }
00462a8a          
00462ab3          UIRegion::SetParent(this, arg2);
00462ab3          
00462ac3          if ((((int8_t)(this->__inner23 >> 0xb)) & 1) != 0)
00462ad6              UIElement::BroadcastElementMessage(this, 0x26, this->vtable->GetParent(0));
00462ad6          
00462add          UIElement::UpdateForParentSizeChange(this);
00462ae4          int32_t eax_9 = UIRegion::GetScreenX0(this);
00462aeb          int32_t eax_10;
00462aeb          
00462aeb          if (eax_2 == eax_9)
00462aef              eax_10 = UIRegion::GetScreenY0(this);
00462aef          
00462af8          if ((eax_2 != eax_9 || eax_3 != eax_10))
00462afa              this->vtable->UpdateForScreenPositionChange();
00462afa          
00462b0a          this->vtable->SetClampGameViewEdge(this->m_eClampGameView);
00462a7b      }
00462a50  }

00462b1a                                                                                90 90 90 90 90 90                            ......

00462b20  enum UIElementMessageListenResult __thiscall UIElement::ForwardElementMessage(class UIElement* this, struct UIElementMessageInfo const* arg2, enum UIElementMessageListenResult arg3)

00462b20  {
00462b26      enum UIElementMessageListenResult m_timestamp_1 = arg3;
00462b39      arg3 = m_timestamp_1;
00462b3d      void __return;
00462b3d      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashListeners.m_intrusiveTable, &__return);
00462b4d      this->m_iterListeners.m_iter.m_currHashTable = eax->m_currHashTable;
00462b53      this->m_iterListeners.m_iter.m_currElement = eax->m_currElement;
00462b59      this->m_iterListeners.m_iter.m_currBucket = eax->m_currBucket;
00462b59      
00462b5f      if (m_timestamp_1 != lrStopProcessing)
00462b5f      {
00462b6a          enum UIElementMessageListenResult m_timestamp_2 = m_timestamp_1;
00462b6a          
00462b70          while (true)
00462b70          {
00462b70              class HashSetData<UIListener *>* m_currElement = this->m_iterListeners.m_iter.m_currElement;
00462b70              
00462b78              if (m_currElement == 0)
00462b78                  break;
00462b78              
00462b7e              class UIListener* m_hashKey = m_currElement->m_hashKey;
00462b82              class HashSetData<UIListener *>* m_hashNext = m_currElement->m_hashNext;
00462b87              this->m_iterListeners.m_iter.m_currElement = m_hashNext;
00462b87              
00462b8d              if (m_hashNext == 0)
00462b8d              {
00462b8f                  class IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>* m_currHashTable = this->m_iterListeners.m_iter.m_currHashTable;
00462b8f                  
00462ba6                  while (true)
00462ba6                  {
00462ba6                      void* ebx_2 = &this->m_iterListeners.m_iter.m_currBucket[1];
00462bad                      this->m_iterListeners.m_iter.m_currBucket = ebx_2;
00462bad                      
00462bb3                      if (ebx_2 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00462bb3                          break;
00462bb3                      
00462bb5                      class HashSetData<UIListener *>* edi_1 = *(uint32_t*)ebx_2;
00462bb5                      
00462bb9                      if (edi_1 != 0)
00462bb9                      {
00462bbd                          this->m_iterListeners.m_iter.m_currElement = edi_1;
00462bbd                          break;
00462bb9                      }
00462ba6                  }
00462b8d              }
00462b8d              
00462bc3              uint32_t m_timestamp = arg2->tsSerialNumber.m_timestamp;
00462bc6              m_timestamp_1 = m_hashKey->m_tsSerialNumberLastListenedTo.m_timestamp;
00462bc6              
00462bcb              if (m_timestamp_1 != m_timestamp)
00462bcb              {
00462bcf                  int32_t eax_5 = (m_timestamp_1 - m_timestamp);
00462bd3                  int32_t ebx_3 = 1;
00462bd3                  
00462bd8                  if (m_timestamp_1 < m_timestamp)
00462bd8                  {
00462bdc                      eax_5 = (m_timestamp - m_timestamp_1);
00462bde                      ebx_3 = 0xffffffff;
00462bd8                  }
00462bd8                  
00462be6                  if (eax_5 > 0x7fffffff)
00462be8                      ebx_3 = -(ebx_3);
00462be8                  
00462bec                  if (ebx_3 < 0)
00462bec                  {
00462bee                      m_hashKey->m_tsSerialNumberLastListenedTo.m_timestamp = m_timestamp;
00462bf4                      enum UIElementMessageListenResult eax_8 = *(int32_t*)((char*)m_hashKey->vtable + 0xc)(arg2);
00462bf4                      
00462bf9                      if (eax_8 != lrDefault)
00462bfb                          arg3 = eax_8;
00462bec                  }
00462bcb              }
00462bcb              
00462bff              m_timestamp_2 = arg3;
00462bff              
00462c06              if (m_timestamp_2 == lrStopProcessing)
00462c15                  return m_timestamp_2;
00462b70          }
00462b70          
00462c1b          if (m_timestamp_2 != lrStopProcessing)
00462c1b          {
00462c21              void* eax_10 = this->vtable->GetParent();
00462c21              
00462c29              if (eax_10 != 0)
00462c29              {
00462c3b                  if (CTimestamp<unsigned long,0>::operator<(((char*)eax_10 + 0x78), &arg2->tsSerialNumber) != 0)
00462c3b                  {
00462c3f                      *(uint32_t*)((char*)eax_10 + 0x78) = arg2->tsSerialNumber.m_timestamp;
00462c50                      enum UIElementMessageListenResult eax_14 = *(uint32_t*)(*(uint32_t*)this->vtable->GetParent() + 0xc)(arg2);
00462c50                      
00462c55                      if (eax_14 != lrDefault)
00462c55                      {
00462c5a                          arg3 = eax_14;
00462c62                          return eax_14;
00462c55                      }
00462c3b                  }
00462c29              }
00462c29              else if ((m_timestamp_2 == lrDefault && this->vtable->DefElementMessageHandler(arg2) != 0))
00462c78                  return lrDontDoDefault;
00462c1b          }
00462b5f      }
00462b5f      
00462c8b      return arg3;
00462b20  }

00462c8e                                            90 90                                                                ..

00462c90  void __fastcall UIElement::Initialize(class UIElement* this)

00462c90  {
00462ca6      MediaMachine::Reset(&this->m_mediaMachine, &this->m_desc.m_media);
00462cb1      uint32_t m_defaultState = this->m_desc.m_defaultState;
00462cb7      struct UIElement::VTable* vtable = this->vtable;
00462cc2      this->__inner23 |= 0x20000;
00462cc8      vtable->SetState(m_defaultState);
00462cd9      void __return;
00462cd9      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_1 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_desc.m_properties.m_hashProperties.m_intrusiveTable, &__return);
00462cde      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_1->m_currElement;
00462ce3      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_1->m_currHashTable;
00462ce3      
00462ce8      if (i_1 != 0)
00462ce8      {
00462cea          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_1->m_currBucket;
00462cea          
00462cf8          while (true)
00462cf8          {
00462cf0              this->vtable->OnSetAttribute(&i_1->m_data);
00462cfe              i_1 = i_1->m_hashNext;
00462cfe              
00462d03              if (i_1 == 0)
00462d03              {
00462d1b                  class HashTableData<unsigned long,DBOCache *>* i;
00462d1b                  
00462d1b                  do
00462d1b                  {
00462d10                      m_currBucket = &m_currBucket[1];
00462d10                      
00462d15                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00462d15                          goto label_462d23;
00462d15                      
00462d17                      i = *(uint32_t*)m_currBucket;
00462d1b                  } while (i == 0);
00462d1b                  
00462d1d                  i_1 = i;
00462d1d                  
00462d21                  if (i_1 == 0)
00462d21                      break;
00462d03              }
00462cf8          }
00462ce8      }
00462ce8      
00462d23  label_462d23:
00462d23      eax_1 = this->m_bShouldBeMouseVisible;
00462d2b      char eax_4;
00462d2b      
00462d2b      if (eax_1 == 0)
00462d31          eax_4 = this->vtable->GetShouldBeMouseVisible();
00462d31      
00462d39      uint8_t eax_5;
00462d39      
00462d39      if ((eax_1 != 0 || eax_4 != 0))
00462d3f          eax_5 = 1;
00462d39      else
00462d3b          eax_5 = 0;
00462d3b      
00462d4d      bool cond:1 = (((int8_t)(this->__inner23 >> 0xc)) & 1) == 0;
00462d50      this->m_bIsMouseVisible = eax_5;
00462d50      
00462d56      if (!(cond:1))
00462d56      {
00462d58          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00462d58          
00462d60          if (UIElementManager::s_pInstance_1 != 0)
00462d65              UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance_1, 6, this);
00462d56      }
00462c90  }

00462d72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00462d80  void __thiscall UIElement::OnSetAttribute(class UIElement* this, class BaseProperty const* arg2)

00462d80  {
00462d84      class BaseProperty* esi = arg2;
00462da7      int32_t x;
00462da7      
00462da7      switch ((BaseProperty::GetPropertyName(esi) - 0x33))
00462da7      {
00462e80          case nullptr:
00462e80          {
00462e80              class BasePropertyValue* m_pcPropertyValue_5 = esi->m_pcPropertyValue;
00462e80              
00462e85              if (m_pcPropertyValue_5 != 0)
00462e87                  m_pcPropertyValue_5->vtable->InqBool(&arg2);
00462e87              
00462e98              UIElement::SetActivatable(this, ((int8_t)arg2));
00462e80              break;
00462e80          }
00462ea5          case 1:
00462ea5          {
00462ea5              class BasePropertyValue* m_pcPropertyValue_6 = esi->m_pcPropertyValue;
00462ea5              
00462eaa              if (m_pcPropertyValue_6 != 0)
00462eac                  m_pcPropertyValue_6->vtable->InqBool(&arg2);
00462eac              
00462ebd              UIElement::SetActivateOnShow(this, ((int8_t)arg2));
00462ea5              break;
00462ea5          }
00462f5e          case 4:
00462f5e          {
00462f5e              class BasePropertyValue* m_pcPropertyValue_11 = esi->m_pcPropertyValue;
00462f5e              
00462f63              if (m_pcPropertyValue_11 != 0)
00462f65                  m_pcPropertyValue_11->vtable->InqBool(&arg2);
00462f65              
00462f76              UIElement::SetContextMenu(this, ((int8_t)arg2));
00462f7d              UIElement::UpdateMouseVisibility(this);
00462f5e              break;
00462f5e          }
00462e5b          case 7:
00462e5b          {
00462e5b              class BasePropertyValue* m_pcPropertyValue_4 = esi->m_pcPropertyValue;
00462e5b              
00462e60              if (m_pcPropertyValue_4 != 0)
00462e62                  m_pcPropertyValue_4->vtable->InqBool(&arg2);
00462e62              
00462e73              UIElement::SetDragable(this, ((int8_t)arg2));
00462e5b              break;
00462e5b          }
00462dae          case 8:
00462dae          {
00462dae              class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
00462dae              
00462db3              if (m_pcPropertyValue != 0)
00462db5                  m_pcPropertyValue->vtable->InqBool(&arg2);
00462db5              
00462dbf              uint32_t eax_2;
00462dbf              eax_2 = arg2;
00462dc7              eax_2 = eax_2 == 0;
00462dc3              this->vtable->SetVisible(eax_2);
00462dae              break;
00462dae          }
00462dd8          case 0xd:
00462dd8          {
00462dd8              class BasePropertyValue* m_pcPropertyValue_1 = esi->m_pcPropertyValue;
00462ddd              arg2 = 0;
00462ddd              
00462de2              if (m_pcPropertyValue_1 != 0)
00462de4                  m_pcPropertyValue_1->vtable->InqBool(&arg2);
00462de4              
00462df2              this->vtable->SetShouldBlockClicks(arg2);
00462dd8              break;
00462dd8          }
00462f14          case 0xe:
00462f14          {
00462f14              class BasePropertyValue* m_pcPropertyValue_9 = esi->m_pcPropertyValue;
00462f14              
00462f19              if (m_pcPropertyValue_9 != 0)
00462f1b                  m_pcPropertyValue_9->vtable->InqBool(&arg2);
00462f1b              
00462f2c              UIElement::SetNotifyOnResize(this, ((int8_t)arg2));
00462f14              break;
00462f14          }
00462f39          case 0xf:
00462f39          {
00462f39              class BasePropertyValue* m_pcPropertyValue_10 = esi->m_pcPropertyValue;
00462f39              
00462f3e              if (m_pcPropertyValue_10 != 0)
00462f40                  m_pcPropertyValue_10->vtable->InqBool(&arg2);
00462f40              
00462f51              UIElement::SetNotifyOnMove(this, ((int8_t)arg2));
00462f39              break;
00462f39          }
00462f8a          case 0x10:
00462f8a          {
00462f8a              class BasePropertyValue* m_pcPropertyValue_12 = esi->m_pcPropertyValue;
00462f8a              
00462f8f              if (m_pcPropertyValue_12 != 0)
00462f91                  m_pcPropertyValue_12->vtable->InqBool(&arg2);
00462f91              
00462fa2              UIElement::SetNotifyOnCreate(this, ((int8_t)arg2));
00462f8a              break;
00462f8a          }
00462e27          case 0x11:
00462e27          {
00462e27              class BasePropertyValue* m_pcPropertyValue_3 = esi->m_pcPropertyValue;
00462e27              
00462e2c              if (m_pcPropertyValue_3 != 0)
00462e2e                  m_pcPropertyValue_3->vtable->InqBool(&arg2);
00462e2e              
00462e38              union __inner23 = this->__inner23;
00462e40              int32_t ecx_5;
00462e40              ecx_5 = arg2;
00462e4d              this->__inner23 = (__inner23 ^ ((ecx_5 ^ __inner23) & 1));
00462e27              break;
00462e27          }
00462eca          case 0x12:
00462eca          {
00462eca              class BasePropertyValue* m_pcPropertyValue_7 = esi->m_pcPropertyValue;
00462eca              
00462ecf              if (m_pcPropertyValue_7 != 0)
00462ed1                  m_pcPropertyValue_7->vtable->InqBool(&arg2);
00462ed1              
00462ee2              UIElement::SetSaveLocation(this, ((int8_t)arg2));
00462eca              break;
00462eca          }
00462eef          case 0x13:
00462eef          {
00462eef              class BasePropertyValue* m_pcPropertyValue_8 = esi->m_pcPropertyValue;
00462eef              
00462ef4              if (m_pcPropertyValue_8 != 0)
00462ef6                  m_pcPropertyValue_8->vtable->InqBool(&arg2);
00462ef6              
00462f07              UIElement::SetSaveSize(this, ((int8_t)arg2));
00462eef              break;
00462eef          }
00462e02          case 0x18:
00462e02          {
00462e02              class BasePropertyValue* m_pcPropertyValue_2 = esi->m_pcPropertyValue;
00462e02              
00462e07              if (m_pcPropertyValue_2 != 0)
00462e09                  m_pcPropertyValue_2->vtable->InqBool(&arg2);
00462e09              
00462e1a              UIRegion::SetTooltipOn(this, ((int8_t)arg2));
00462e02              break;
00462e02          }
00462faf          case 0x1a:
00462faf          {
00462faf              class BasePropertyValue* m_pcPropertyValue_13 = esi->m_pcPropertyValue;
00462faf              
00462fb4              if (m_pcPropertyValue_13 != 0)
00462fb6                  m_pcPropertyValue_13->vtable->InqFloat(&arg2);
00462fb6              
00462fca              UIRegion::SetAlphaBlendMod(this, arg2);
00462faf              break;
00462faf          }
00462fe0          case 0x1b:
00462fe0          {
00462fe0              BaseProperty::InqEnum(esi, &this->m_idInputMap);
00462fe0              break;
00462fe0          }
00462fed          case 0x1e:
00462fed          {
00462fed              class BasePropertyValue* m_pcPropertyValue_14 = esi->m_pcPropertyValue;
00462ff2              arg2 = 0;
00462ff2              
00462ff7              if (m_pcPropertyValue_14 != 0)
00462ff9                  m_pcPropertyValue_14->vtable->InqBool(&arg2);
00462ff9              
00463007              this->vtable->SetShouldEraseBackground(arg2);
00462fed              break;
00462fed          }
00463017          case 0x1f:
00463017          {
00463017              class BasePropertyValue* m_pcPropertyValue_15 = esi->m_pcPropertyValue;
0046301c              arg2 = nullptr;
0046301c              
00463024              if (m_pcPropertyValue_15 != 0)
00463026                  m_pcPropertyValue_15->vtable->InqEnum(&arg2);
00463026              
00463037              this->vtable->SetClampGameViewEdge(arg2);
00463017              break;
00463017          }
00463083          case 0x20:
00463083          {
00463083              class BasePropertyValue* m_pcPropertyValue_17 = esi->m_pcPropertyValue;
00463088              arg2 = 0;
00463088              
0046308d              if (m_pcPropertyValue_17 != 0)
0046308f                  m_pcPropertyValue_17->vtable->InqBool(&arg2);
0046308f              
004630a6              this->__bitfield164 |= 0x80;
004630ac              UIRegion::MakeRootDirtyHere(this);
00463083              break;
00463083          }
00463145          case 0x21:
00463145          {
00463145              class BasePropertyValue* m_pcPropertyValue_20 = esi->m_pcPropertyValue;
00463145              
0046314a              if ((m_pcPropertyValue_20 != 0 && m_pcPropertyValue_20->vtable->InqInteger(&arg2) != 0))
0046314a              {
00463168                  int32_t y = this->m_ptTilingOffset.y;
0046316e                  class BaseProperty* x_1 = arg2;
00463172                  x = this->m_ptTilingOffset.x;
0046317d                  int32_t y_2 = y;
00463181                  x = x_1;
00463185                  UIRegion::SetTilingOffset(this, &x);
0046314a              }
00463145              break;
00463145          }
00463192          case 0x22:
00463192          {
00463192              class BasePropertyValue* m_pcPropertyValue_21 = esi->m_pcPropertyValue;
00463192              
00463197              if ((m_pcPropertyValue_21 != 0 && m_pcPropertyValue_21->vtable->InqInteger(&arg2) != 0))
00463197              {
004631ad                  int32_t y_1 = this->m_ptTilingOffset.y;
004631b3                  class BaseProperty* eax_14 = arg2;
004631b7                  x = this->m_ptTilingOffset.x;
004631c0                  int32_t y_3 = y_1;
004631c6                  class BaseProperty* var_4_1 = eax_14;
004631ca                  UIRegion::SetTilingOffset(this, &x);
00463197              }
00463192              break;
00463192          }
004630b9          case 0x23:
004630b9          {
004630b9              class BasePropertyValue* m_pcPropertyValue_18 = esi->m_pcPropertyValue;
004630be              x = 0;
004630c6              int32_t var_4 = 0;
004630ce              int32_t var_10 = 0;
004630d6              int32_t var_c = 0;
004630d6              
004630de              if ((m_pcPropertyValue_18 != 0 && m_pcPropertyValue_18->vtable->InqStructElement(0x54, &x) != 0))
004630de              {
004630f3                  class BasePropertyValue* m_pcPropertyValue_19 = esi->m_pcPropertyValue;
004630f3                  
004630f8                  if ((m_pcPropertyValue_19 != 0 && m_pcPropertyValue_19->vtable->InqStructElement(0x55, &var_10) != 0))
004630f8                  {
0046310d                      this->vtable->OnSetAttribute(&x);
0046311c                      this->vtable->OnSetAttribute(&var_10);
004630f8                  }
004630de              }
004630de              
0046312f              BaseProperty::~BaseProperty(&var_10);
00463138              BaseProperty::~BaseProperty(&x);
004630b9              break;
004630b9          }
004631d7          case 0x24:
004631d7          {
004631d7              class BasePropertyValue* m_pcPropertyValue_22 = esi->m_pcPropertyValue;
004631d7              
004631dc              if ((m_pcPropertyValue_22 != 0 && m_pcPropertyValue_22->vtable->InqEnum(&arg2) != 0))
004631fb                  UIElementManager::RegisterElementForInputAction(UIElementManager::s_pInstance, arg2, this);
004631d7              break;
004631d7          }
00463047          case 0x9a:
00463047          {
00463047              class BasePropertyValue* m_pcPropertyValue_16 = esi->m_pcPropertyValue;
0046304c              arg2 = 3;
00463054              uint8_t edx;
00463054              
00463054              if (m_pcPropertyValue_16 != 0)
0046305d                  edx = m_pcPropertyValue_16->vtable->InqEnum(&arg2);
0046305d              
00463069              class BaseProperty* ecx_32;
00463069              ecx_32 = arg2 != 0;
0046306c              class BaseProperty* var_1c_34 = ecx_32;
0046306f              UIElement::SetShouldOwnObject(this, edx);
00463076              UIElement::UpdateForParentSizeChange(this);
00463047              break;
00463047          }
00462da7      }
00462d80  }

00463208  uint32_t jump_table_463208[0x18] = 
00463208  {
00463208      [0x00] =  0x00462e80
0046320c      [0x01] =  0x00462ea5
00463210      [0x02] =  0x00462f5e
00463214      [0x03] =  0x00462e5b
00463218      [0x04] =  0x00462dae
0046321c      [0x05] =  0x00462dd8
00463220      [0x06] =  0x00462f14
00463224      [0x07] =  0x00462f39
00463228      [0x08] =  0x00462f8a
0046322c      [0x09] =  0x00462e27
00463230      [0x0a] =  0x00462eca
00463234      [0x0b] =  0x00462eef
00463238      [0x0c] =  0x00462e02
0046323c      [0x0d] =  0x00462faf
00463240      [0x0e] =  0x00462fd7
00463244      [0x0f] =  0x00462fed
00463248      [0x10] =  0x00463017
0046324c      [0x11] =  0x00463083
00463250      [0x12] =  0x00463145
00463254      [0x13] =  0x00463192
00463258      [0x14] =  0x004630b9
0046325c      [0x15] =  0x004631d7
00463260      [0x16] =  0x00463047
00463264      [0x17] =  0x00463200
00463268  }
00463268  uint8_t lookup_table_463268[0x9b] = 
00463268  {
00463268      [0x00] =  0x00
00463269      [0x01] =  0x01
0046326a      [0x02] =  0x17
0046326b      [0x03] =  0x17
0046326c      [0x04] =  0x02
0046326d      [0x05] =  0x17
0046326e      [0x06] =  0x17
0046326f      [0x07] =  0x03
00463270      [0x08] =  0x04
00463271      [0x09] =  0x17
00463272      [0x0a] =  0x17
00463273      [0x0b] =  0x17
00463274      [0x0c] =  0x17
00463275      [0x0d] =  0x05
00463276      [0x0e] =  0x06
00463277      [0x0f] =  0x07
00463278      [0x10] =  0x08
00463279      [0x11] =  0x09
0046327a      [0x12] =  0x0a
0046327b      [0x13] =  0x0b
0046327c      [0x14] =  0x17
0046327d      [0x15] =  0x17
0046327e      [0x16] =  0x17
0046327f      [0x17] =  0x17
00463280      [0x18] =  0x0c
00463281      [0x19] =  0x17
00463282      [0x1a] =  0x0d
00463283      [0x1b] =  0x0e
00463284      [0x1c] =  0x17
00463285      [0x1d] =  0x17
00463286      [0x1e] =  0x0f
00463287      [0x1f] =  0x10
00463288      [0x20] =  0x11
00463289      [0x21] =  0x12
0046328a      [0x22] =  0x13
0046328b      [0x23] =  0x14
0046328c      [0x24] =  0x15
0046328d      [0x25] =  0x17
0046328e      [0x26] =  0x17
0046328f      [0x27] =  0x17
00463290      [0x28] =  0x17
00463291      [0x29] =  0x17
00463292      [0x2a] =  0x17
00463293      [0x2b] =  0x17
00463294      [0x2c] =  0x17
00463295      [0x2d] =  0x17
00463296      [0x2e] =  0x17
00463297      [0x2f] =  0x17
00463298      [0x30] =  0x17
00463299      [0x31] =  0x17
0046329a      [0x32] =  0x17
0046329b      [0x33] =  0x17
0046329c      [0x34] =  0x17
0046329d      [0x35] =  0x17
0046329e      [0x36] =  0x17
0046329f      [0x37] =  0x17
004632a0      [0x38] =  0x17
004632a1      [0x39] =  0x17
004632a2      [0x3a] =  0x17
004632a3      [0x3b] =  0x17
004632a4      [0x3c] =  0x17
004632a5      [0x3d] =  0x17
004632a6      [0x3e] =  0x17
004632a7      [0x3f] =  0x17
004632a8      [0x40] =  0x17
004632a9      [0x41] =  0x17
004632aa      [0x42] =  0x17
004632ab      [0x43] =  0x17
004632ac      [0x44] =  0x17
004632ad      [0x45] =  0x17
004632ae      [0x46] =  0x17
004632af      [0x47] =  0x17
004632b0      [0x48] =  0x17
004632b1      [0x49] =  0x17
004632b2      [0x4a] =  0x17
004632b3      [0x4b] =  0x17
004632b4      [0x4c] =  0x17
004632b5      [0x4d] =  0x17
004632b6      [0x4e] =  0x17
004632b7      [0x4f] =  0x17
004632b8      [0x50] =  0x17
004632b9      [0x51] =  0x17
004632ba      [0x52] =  0x17
004632bb      [0x53] =  0x17
004632bc      [0x54] =  0x17
004632bd      [0x55] =  0x17
004632be      [0x56] =  0x17
004632bf      [0x57] =  0x17
004632c0      [0x58] =  0x17
004632c1      [0x59] =  0x17
004632c2      [0x5a] =  0x17
004632c3      [0x5b] =  0x17
004632c4      [0x5c] =  0x17
004632c5      [0x5d] =  0x17
004632c6      [0x5e] =  0x17
004632c7      [0x5f] =  0x17
004632c8      [0x60] =  0x17
004632c9      [0x61] =  0x17
004632ca      [0x62] =  0x17
004632cb      [0x63] =  0x17
004632cc      [0x64] =  0x17
004632cd      [0x65] =  0x17
004632ce      [0x66] =  0x17
004632cf      [0x67] =  0x17
004632d0      [0x68] =  0x17
004632d1      [0x69] =  0x17
004632d2      [0x6a] =  0x17
004632d3      [0x6b] =  0x17
004632d4      [0x6c] =  0x17
004632d5      [0x6d] =  0x17
004632d6      [0x6e] =  0x17
004632d7      [0x6f] =  0x17
004632d8      [0x70] =  0x17
004632d9      [0x71] =  0x17
004632da      [0x72] =  0x17
004632db      [0x73] =  0x17
004632dc      [0x74] =  0x17
004632dd      [0x75] =  0x17
004632de      [0x76] =  0x17
004632df      [0x77] =  0x17
004632e0      [0x78] =  0x17
004632e1      [0x79] =  0x17
004632e2      [0x7a] =  0x17
004632e3      [0x7b] =  0x17
004632e4      [0x7c] =  0x17
004632e5      [0x7d] =  0x17
004632e6      [0x7e] =  0x17
004632e7      [0x7f] =  0x17
004632e8      [0x80] =  0x17
004632e9      [0x81] =  0x17
004632ea      [0x82] =  0x17
004632eb      [0x83] =  0x17
004632ec      [0x84] =  0x17
004632ed      [0x85] =  0x17
004632ee      [0x86] =  0x17
004632ef      [0x87] =  0x17
004632f0      [0x88] =  0x17
004632f1      [0x89] =  0x17
004632f2      [0x8a] =  0x17
004632f3      [0x8b] =  0x17
004632f4      [0x8c] =  0x17
004632f5      [0x8d] =  0x17
004632f6      [0x8e] =  0x17
004632f7      [0x8f] =  0x17
004632f8      [0x90] =  0x17
004632f9      [0x91] =  0x17
004632fa      [0x92] =  0x17
004632fb      [0x93] =  0x17
004632fc      [0x94] =  0x17
004632fd      [0x95] =  0x17
004632fe      [0x96] =  0x17
004632ff      [0x97] =  0x17
00463300      [0x98] =  0x17
00463301      [0x99] =  0x17
00463302      [0x9a] =  0x16
00463303  }

00463303           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00463310  void __thiscall UIElement::MouseMove(class UIElement* this, int32_t arg2, int32_t arg3)

00463310  {
00463320      union __inner23 = this->__inner23;
00463320      
0046332e      if ((((int8_t)(__inner23 >> 0x13)) & 1) != 0)
00463334          UIElement::MouseResizeElement(this, arg2, arg3);
0046332e      else if ((((int8_t)(__inner23 >> 0x12)) & 1) != 0)
00463346          UIElement::MouseMoveElement(this, arg2, arg3);
00463346      
00463362      if ((this->m_mouseDownTable.m_intrusiveTable.m_numElements != 0 || (((int8_t)(this->__inner23 >> 0xd)) & 1) != 0))
00463362      {
00463364          uint32_t m_elementID = this->m_desc.m_elementID;
0046337a          int32_t edi_2 = (arg3 - UIRegion::GetScreenY0(this));
00463383          int32_t ecx_8 = (arg2 - UIRegion::GetScreenX0(this));
00463389          int32_t m_elementID_1 = m_elementID;
0046338f          int32_t var_c_1 = ecx_8;
00463393          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046339b          int32_t var_8_1 = edi_2;
0046339f          class UIElement* this_1 = this;
004633a3          int32_t var_20_1 = 0x1e;
004633ab          int32_t var_1c_1 = 0;
004633af          int32_t var_18_1 = 0;
004633b3          int32_t var_4_1 = 0;
004633b7          int32_t var_14_1 = arg2;
004633bb          int32_t var_10_1 = arg3;
004633bb          
004633c0          if (UIElementManager::s_pInstance_1 != 0)
004633c7              UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID_1);
00463362      }
00463310  }

004633d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004633e0  void __thiscall UIElement::MoveTo(class UIElement* this, int32_t const arg2, int32_t const arg3)

004633e0  {
004633e8      int32_t eax = UIRegion::GetScreenX0(this);
004633f3      int32_t eax_1 = UIRegion::GetScreenY0(this);
00463408      UIRegion::MoveTo(this, arg2, arg3);
00463408      
00463414      if ((*(uint8_t*)((char*)this->__inner23 + 2) & 1) == 0)
00463414      {
00463491          UIElement::UpdateSurfaceBox(this, 1);
0046349a          UIRegion::ForceUpdate(this, 1);
00463414      }
00463414      else
00463414      {
00463416          class UIObject* m_object = this->m_object;
00463416          
0046341e          if (m_object != 0)
0046341e          {
00463439          label_463439:
00463441              int32_t eax_9;
00463441              int32_t ebx_1;
00463441              
00463441              if (this->vtable->GetParent() == 0)
00463441              {
00463469                  ebx_1 = 0;
0046346b                  eax_9 = 0;
00463441              }
00463441              else
00463441              {
00463458                  ebx_1 = UIRegion::GetScreenX0(this->vtable->GetParent());
00463462                  eax_9 = UIRegion::GetScreenY0(this->vtable->GetParent());
00463441              }
00463441              
00463470              m_object->vtable->SetVirtualScreenPosition((this->m_box.m_x0 + ebx_1), (this->m_box.m_y0 + eax_9), m_object->m_nVirtualWidth, m_object->m_nVirtualHeight);
0046341e          }
0046341e          else
0046341e          {
00463420              class UIRegion* m_parent = this->m_parent;
00463420              
00463428              if (m_parent != 0)
00463428              {
0046342f                  m_object = UIRegion::GetObjectA(m_parent);
0046342f                  
00463433                  if (m_object != 0)
00463433                      goto label_463439;
00463428              }
0046341e          }
00463414      }
00463414      
004634a1      int32_t eax_12 = UIRegion::GetScreenX0(this);
004634aa      int32_t eax_13 = UIRegion::GetScreenY0(this);
004634aa      
004634bb      if ((eax != eax_12 || eax_1 != eax_13))
004634bb      {
004634cd          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004634cd          
004634d7          if (((((int8_t)(this->__inner23 >> 4)) & 1) != 0 && UIElementManager::s_pInstance_1 != 0))
004634d7          {
004634dd              UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance_1, 7, 0);
004634e2              UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004634d7          }
004634d7          
004634fe          if (((((int8_t)(this->__inner23 >> 0xa)) & 1) != 0 || this->m_mouseDownTable.m_intrusiveTable.m_numElements != 0))
004634fe          {
00463508              int32_t m_x0 = this->m_box.m_x0;
0046350b              uint32_t m_elementID = this->m_desc.m_elementID;
00463515              class UIElement* this_1 = this;
00463519              int32_t var_20_1 = 0x25;
00463521              int32_t var_1c_1 = 0;
00463529              int32_t var_18_1 = 0;
00463531              int32_t var_4_1 = 0;
00463539              int32_t var_14_1 = eax_12;
0046353d              int32_t var_10_1 = eax_13;
00463541              int32_t m_x0_1 = m_x0;
00463545              int32_t m_y0 = this->m_box.m_y0;
00463545              
00463549              if (UIElementManager::s_pInstance_1 != 0)
00463550                  UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID);
004634fe          }
004634fe          
00463555          this->vtable->UpdateForScreenPositionChange();
004634bb      }
004633e0  }

00463568                          90 90 90 90 90 90 90 90                                                          ........

00463570  uint8_t __thiscall IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::contains(class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1> const* this, class UIRegion** arg2)

00463570  {
00463575      class UIRegion* i = *(uint32_t*)arg2;
0046358e      int32_t* eax_5 = this->m_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % this->m_numBuckets)];
00463590      bool cond:0 = eax_5 != 0;
00463590      
00463592      if (eax_5 != 0)
00463592      {
00463596          while (*(uint32_t*)eax_5 != i)
00463596          {
00463598              eax_5 = eax_5[1];
00463598              
0046359d              if (eax_5 == 0)
0046359d                  break;
00463596          }
00463596          
0046359f          cond:0 = eax_5 != 0;
00463592      }
00463592      
004635a1      eax_5 = cond:0;
004635a5      return eax_5;
00463570  }

004635a8                          90 90 90 90 90 90 90 90                                                          ........

004635b0  class UIElement* __fastcall UIElement::GetLastChildElement(class UIElement* this)

004635b0  {
004635b6      void* __offset(DLListData, -0x8) eax = nullptr;
004635b6      
004635ba      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
004635ba      {
004635bc          class DLListData* tail_ = this->m_children.m_ihlIntrusive.m_list.tail_;
004635bc          
004635c4          if (tail_ == 0)
004635cb              eax = nullptr;
004635c4          else
004635c6              eax = &tail_[-1];
004635ba      }
004635ba      
004635cf      if (eax == 0)
004635d7          return 0;
004635d7      
004635d4      return *(int32_t*)((char*)ADJ(eax) + 8);
004635b0  }

004635d8                                                                          90 90 90 90 90 90 90 90                          ........

004635e0  uint8_t __thiscall HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(class HashTable<IDClass<_tagDataID,32,0>,DBObj *,1> const* this, class IDClass<_tagDataID,32,0>* arg2)

004635e0  {
004635e5      uint32_t id = arg2->id;
004635f4      int32_t* eax_2 = this->m_intrusiveTable.m_buckets[(COMBINE(0, id) % this->m_intrusiveTable.m_numBuckets)];
004635f6      bool cond:0 = eax_2 != 0;
004635f6      
004635f8      if (eax_2 != 0)
004635f8      {
00463602          while (*(uint32_t*)eax_2 != id)
00463602          {
00463604              eax_2 = eax_2[1];
00463604              
00463609              if (eax_2 == 0)
00463609                  break;
00463602          }
00463602          
0046360b          cond:0 = eax_2 != 0;
004635f8      }
004635f8      
0046360d      eax_2 = cond:0;
00463611      return eax_2;
004635e0  }

00463614                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00463620  uint8_t __thiscall HashTable<unsigned long,BaseProperty,1>::find(class HashTable<unsigned long,BaseProperty,1> const* this, uint32_t const* arg2, class BaseProperty* arg3)

00463620  {
00463625      uint32_t const esi = *(uint32_t*)arg2;
00463638      int32_t* i;
00463638      
00463638      for (i = this->m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00463638      {
00463642          if (*(uint32_t*)i == esi)
00463642          {
00463653              if (i == 0)
00463653                  break;
00463653              
0046365d              BaseProperty::operator=(arg3, &i[2]);
00463662              class BaseProperty* eax_3;
00463662              eax_3 = 1;
00463665              return 1;
00463642          }
00463638      }
00463638      
0046364b      i = 0;
0046364e      return 0;
00463620  }

00463668                          90 90 90 90 90 90 90 90                                                          ........

00463670  uint8_t __fastcall IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::grow(class IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>* this)

00463670  {
00463670      class IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>* m_numBuckets = this;
00463672      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0046367e      m_numBuckets = this->m_numBuckets;
00463695      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00463695      
0046369f      if (eax_2 != bucketSizesEnd_1)
004636a8          eax_2 = &eax_2[1];
0046369f      else
0046369f      {
004636a1          eax_2 -= 4;
004636a1          
004636a6          if (eax_2 != bucketSizesEnd_1)
004636a8              eax_2 = &eax_2[1];
0046369f      }
0046369f      
004636b8      return IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00463670  }

004636b9                                                                             90 90 90 90 90 90 90                           .......

004636c0  uint8_t __thiscall UIRegion::IsMouseDown(class UIRegion const* this, uint32_t arg2)

004636c0  {
004636d8      int32_t* eax_3 = this->m_mouseDownTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_mouseDownTable.m_intrusiveTable.m_numBuckets)];
004636da      bool cond:0 = eax_3 != 0;
004636da      
004636dc      if (eax_3 != 0)
004636dc      {
004636e2          while (*(uint32_t*)eax_3 != arg2)
004636e2          {
004636e4              eax_3 = eax_3[1];
004636e4              
004636e9              if (eax_3 == 0)
004636e9                  break;
004636e2          }
004636e2          
004636eb          cond:0 = eax_3 != 0;
004636dc      }
004636dc      
004636ed      eax_3 = cond:0;
004636f1      return eax_3;
004636c0  }

004636f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00463700  void __thiscall UIElement::OnVisibilityChanged(class UIElement* this, uint8_t arg2)

00463700  {
00463709      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00463717      void* __return;
00463717      
00463717      if (arg2 != 0)
00463717      {
0046377a          if ((((int8_t)(this->__inner23 >> 0xe)) & 1) != 0)
0046377a          {
0046377c              struct UIElement::VTable* vtable = this->vtable;
00463785              int32_t var_14 = 0;
00463789              vtable->MakeUIObject(&var_14);
00463793              this->vtable->SetUIObject(var_14);
00463793              
004637a7              if (UIElement::UpdateObjectScale(this) != 0)
004637a7              {
004637b4                  HashList<UIRegion *,UIRegion *,1>::begin(&this->m_children, &__return);
004637bf                  void* edi_1;
004637bf                  
004637bf                  for (void* i = __return; i != 0; i = ((char*)edi_1 - 8))
004637bf                  {
004637c1                      class UIElement* ecx_10 = *(uint32_t*)((char*)i + 0x10);
004637c1                      
004637c6                      if (ecx_10 != 0)
004637c8                          UIElement::UpdateForParentSizeChange(ecx_10);
004637c8                      
004637cd                      edi_1 = *(uint32_t*)((char*)i + 8);
004637cd                      
004637d2                      if (edi_1 == 0)
004637d2                          break;
004637bf                  }
004637a7              }
0046377a          }
0046377a          
004637e7          if ((((int8_t)(this->__inner23 >> 3)) & 1) != 0)
004637e9              this->vtable->Activate();
004637e9          
004637fc          arg2 = 0;
004637fc          
0046380d          if ((UIElement::GetAttribute_Bool(this, 0x35, &arg2) != 0 && arg2 != 0))
0046380f              this->vtable->TakeFocus();
00463717      }
00463717      else
00463717      {
0046371c          UIElementManager::UnregisterActivatable(UIElementManager::s_pInstance_1, this);
0046371c          
0046372c          if ((((int8_t)(this->__inner23 >> 0x14)) & 1) != 0)
0046372c          {
00463732              uint8_t edx_2 = this->vtable->Deactivate();
00463732              
00463743              if ((((int8_t)(this->__inner23 >> 0x15)) & 1) != 0)
00463743              {
00463745                  int32_t var_28_2 = 0;
00463748                  UIElementManager::ActivateNext(UIElementManager::s_pInstance_1, edx_2);
00463743              }
0046372c          }
0046372c          
00463759          if ((((int8_t)(this->__inner23 >> 0xe)) & 1) != 0)
0046375f              this->vtable->SetUIObject(0);
00463717      }
00463717      
00463819      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00463819      
00463821      if (ICIDM::s_cidm_1 != 0)
00463821      {
00463827          int32_t eax_12 = ICIDM::s_cidm_1->vtable->GetMouseY();
00463830          int32_t eax_13 = ICIDM::s_cidm_1->vtable->GetMouseX();
0046383c          class Box2D* eax_14 = UIRegion::GetScreenClipBox(this, &__return);
0046383c          
0046384d          if (((eax_13 < eax_14->m_x0 || eax_13 > eax_14->m_x1) || eax_12 < eax_14->m_y0))
0046384d          {
0046385b              if ((*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0)
0046385d                  UIElementManager::s_pInstance_1->m_bPerformMouseHitTest = 1;
0046384d          }
0046384d          else if ((eax_12 <= eax_14->m_y1 || (*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0))
0046385d              UIElementManager::s_pInstance_1->m_bPerformMouseHitTest = 1;
00463821      }
00463700  }

0046386e                                            90 90                                                                ..

00463870  void __fastcall UIElement::PostInit(class UIElement* this)

00463870  {
0046387d      void* __offset(DLListData, -0x8) i = nullptr;
0046387d      
00463881      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00463881      {
00463883          class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
00463883          
00463888          if (head_ == 0)
0046388f              i = nullptr;
00463888          else
0046388a              i = &head_[-1];
00463881      }
00463881      
00463893      class HashList<UIRegion *,UIRegion *,1>* var_4 = &this->m_children;
00463897      class DLListData* dllist_next;
00463897      
00463897      for (; i != 0; i = &dllist_next[-1])
00463897      {
004638a0          int32_t* ecx_1 = *(int32_t*)((char*)ADJ(i) + -8);
004638a0          
004638a4          if (ecx_1 != 0)
004638a8              *(uint32_t*)(*(uint32_t*)ecx_1 + 0xc0)();
004638a8          
004638ae          dllist_next = ADJ(i)->dllist_next;
004638ae          
004638b3          if (dllist_next == 0)
004638b3              break;
00463897      }
00463870  }

004638c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004638d0  uint8_t __thiscall UIElement::InqProperty(class UIElement const* this, uint32_t const arg2, class BaseProperty* arg3)

004638d0  {
004638d8      uint32_t const edi = arg2;
004638ec      arg2 = edi;
004638f0      uint8_t eax = HashTable<unsigned long,BaseProperty,1>::find(&this->m_instanceProperties.m_hashProperties, &arg2, arg3);
004638f0      
004638f7      if (eax == 0)
004638f7      {
00463902          class StateDesc* m_curStateDesc = this->m_curStateDesc;
00463902          
0046390a          if (m_curStateDesc != 0)
0046390e              eax = StateDesc::InqProperty(m_curStateDesc, edi, arg3);
0046390e          
00463915          if ((m_curStateDesc == 0 || eax == 0))
00463915          {
00463928              if (StateDesc::InqProperty(&this->m_desc, edi, arg3) != 0)
00463930                  return 1;
00463930              
0046392a              return 0;
00463915          }
004638f7      }
004638f7      
004638ff      return 1;
004638d0  }

00463933                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00463940  void __thiscall UIElement::MouseUp(class UIElement* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00463940  {
0046394e      uint32_t temp1 = (COMBINE(0, arg4) % this->m_mouseDownTable.m_intrusiveTable.m_numBuckets);
0046395d      int32_t* eax_3 = this->m_mouseDownTable.m_intrusiveTable.m_buckets[temp1];
0046395d      
00463961      if (eax_3 != 0)
00463961      {
00463965          while (*(uint32_t*)eax_3 != arg4)
00463965          {
00463967              eax_3 = eax_3[1];
00463967              
0046396c              if (eax_3 == 0)
0046396c                  break;
00463965          }
00463961      }
00463961      
00463979      uint32_t var_40 = arg4;
00463985      UIRegion::MouseUp(this, temp1, arg2, arg3);
0046398a      uint32_t m_elementID = this->m_desc.m_elementID;
0046399f      int32_t edi_1 = (arg3 - UIRegion::GetScreenY0(this));
004639ac      int32_t ecx_5 = (arg2 - UIRegion::GetScreenX0(this));
004639b2      int32_t var_8 = edi_1;
004639b7      uint32_t m_elementID_1 = m_elementID;
004639bd      int32_t var_c = ecx_5;
004639c1      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004639c9      uint32_t var_10 = arg3;
004639ce      uint32_t var_14 = arg2;
004639d2      class UIElement* this_1 = this;
004639d6      int32_t var_20 = 0x1d;
004639e2      int32_t var_18 = 0;
004639e6      int32_t var_4 = 0;
004639e6      
004639eb      if (UIElementManager::s_pInstance_1 != 0)
004639eb      {
004639f2          UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID_1);
004639fb          UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004639eb      }
004639eb      
00463a10      if (((*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0 && eax_3 != 0 != 0))
00463a10      {
00463a17          int32_t var_20_2;
00463a17          uint32_t var_1c_1;
00463a17          uint32_t eax_6;
00463a17          
00463a17          if (arg4 == 0xa)
00463a17          {
00463a2d              eax_6 = 7;
00463a3b          label_463a3b:
00463a3b              
00463a3e              if ((((int8_t)(this->__inner23 >> 0x17)) & 1) == 0)
00463a3e              {
00463a4a                  var_20_2 = 0x19;
00463a52                  var_1c_1 = eax_6;
00463a3e              }
00463a3e              else
00463a40                  int32_t var_20_1 = 0x1a;
00463a17          }
00463a17          else
00463a17          {
00463a1a              if (arg4 == 0xb)
00463a1a              {
00463a26                  eax_6 = 8;
00463a2b                  goto label_463a3b;
00463a1a              }
00463a1a              
00463a1d              if (arg4 == 0xc)
00463a1d              {
00463a1f                  eax_6 = 9;
00463a24                  goto label_463a3b;
00463a1d              }
00463a1d              
00463a4a              var_20_2 = 0x19;
00463a52              var_1c_1 = arg4;
00463a17          }
00463a17          
00463a58          if (UIElementManager::s_pInstance_1 != 0)
00463a5f              UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_1, &m_elementID_1);
00463a10      }
00463940  }

00463a6b                                   90 90 90 90 90                                                             .....

00463a70  class UIElement* __thiscall UIElement::GetChild(class UIElement const* this, uint32_t arg2)

00463a70  {
00463a81      void* __offset(DLListData, -0x8) ecx = nullptr;
00463a81      
00463a85      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00463a85      {
00463a87          class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
00463a87          
00463a8c          if (head_ == 0)
00463a93              ecx = nullptr;
00463a8c          else
00463a8e              ecx = &head_[-1];
00463a85      }
00463a85      
00463a97      class HashList<UIRegion *,UIRegion *,1>* var_4 = &this->m_children;
00463a97      
00463a9b      if (ecx != 0)
00463a9b      {
00463aa1          while (true)
00463aa1          {
00463aa1              void* result = *(int32_t*)((char*)ADJ(ecx) + 8);
00463aa1              
00463aae              if ((result != 0 && *(uint32_t*)((char*)result + 0x2e4) == arg2))
00463ac5                  return result;
00463ac5              
00463ab0              class DLListData* dllist_next = ADJ(ecx)->dllist_next;
00463ab0              
00463ab5              if (dllist_next == 0)
00463ab5                  break;
00463ab5              
00463ab7              ecx = &dllist_next[-1];
00463ab7              
00463abc              if (ecx == 0)
00463ac2                  return 0;
00463aa1          }
00463a9b      }
00463a9b      
00463acb      return nullptr;
00463a70  }

00463ace                                            90 90                                                                ..

00463ad0  class UIElement* __thiscall UIElement::GetChildRecursive(class UIElement const* this, uint32_t arg2)

00463ad0  {
00463add      class UIElement* eax = UIElement::GetChild(this, arg2);
00463add      
00463ae6      if (eax != 0)
00463b44          return eax;
00463b44      
00463af5      void* __offset(DLListData, -0x8) i = nullptr;
00463af5      
00463af9      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00463af9      {
00463afb          class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
00463afb          
00463b00          if (head_ == 0)
00463b07              i = nullptr;
00463b00          else
00463b02              i = &head_[-1];
00463af9      }
00463af9      
00463b0b      class HashList<UIRegion *,UIRegion *,1>* var_4 = &this->m_children;
00463b0f      class DLListData* dllist_next;
00463b0f      
00463b0f      for (; i != 0; i = &dllist_next[-1])
00463b0f      {
00463b11          class UIElement* ecx_1 = *(int32_t*)((char*)ADJ(i) + 8);
00463b11          
00463b16          if (ecx_1 != 0)
00463b16          {
00463b19              class UIElement* eax_2 = UIElement::GetChildRecursive(ecx_1, arg2);
00463b19              
00463b20              if (eax_2 != 0)
00463b39                  return eax_2;
00463b16          }
00463b16          
00463b22          dllist_next = ADJ(i)->dllist_next;
00463b22          
00463b27          if (dllist_next == 0)
00463b27              break;
00463b0f      }
00463b0f      
00463b30      return eax;
00463ad0  }

00463b47                       90 90 90 90 90 90 90 90 90                                                         .........

00463b50  void __thiscall UIElement::SetMediaImage(class UIElement* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

00463b50  {
00463b55      void* eax = operator new(0x10);
00463b55      
00463b5f      if (eax != 0)
00463b5f      {
00463b64          void* eax_1 = MD_Data_Image::MD_Data_Image(eax);
00463b64          
00463b6d          if (eax_1 != 0)
00463b6d          {
00463b78              *(uint32_t*)((char*)eax_1 + 0xc) = arg3;
00463b84              *(uint32_t*)((char*)eax_1 + 8) = arg2;
00463b87              MediaMachine::Cleanup(&this->m_mediaMachine);
00463b9e              int32_t eax_4 = (this->m_mediaMachine.m_array.m_sizeAndDeallocate & 0x7fffffff);
00463ba5              uint8_t eax_7;
00463ba5              
00463ba5              if (this->m_mediaMachine.m_array.m_num >= eax_4)
00463bb3                  eax_7 = SmartArray<unsigned long,1>::grow(&this->m_mediaMachine.m_array, SmartArray<unsigned long,1>::get_new_size(&this->m_mediaMachine.m_array, (eax_4 + 1)));
00463bb3              
00463bba              if ((this->m_mediaMachine.m_array.m_num < eax_4 || eax_7 != 0))
00463bba              {
00463b98                  this->m_mediaMachine.m_array.m_data[this->m_mediaMachine.m_array.m_num] = eax_1;
00463b98                  this->m_mediaMachine.m_array.m_num += 1;
00463bba              }
00463bba              
00463bc9              this->m_mediaMachine.m_curIndex = 0;
00463bd3              MediaMachine::Update(&this->m_mediaMachine);
00463b6d          }
00463b5f      }
00463b50  }

00463bdf                                                                                               90                                 .

00463be0  void __thiscall UIElement::SetMediaImageForState(class UIElement* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, uint32_t arg4)

00463be0  {
00463bef      class StateDesc* eax = ElementDesc::AccessStateDesc(&this->m_desc, arg4);
00463bef      
00463bf6      if (eax != 0)
00463bf6      {
00463c06          StateDesc::SetMediaImage(eax, arg2, arg3);
00463c06          
00463c11          if (this->m_state == arg4)
00463c17              UIElement::SetMediaImage(this, arg2, arg3);
00463bf6      }
00463be0  }

00463c23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00463c30  void __thiscall UIElement::ResizeTo(class UIElement* this, int32_t const arg2, int32_t const arg3)

00463c30  {
00463c38      int32_t eax = UIRegion::GetWidth(this);
00463c43      int32_t eax_1 = UIRegion::GetHeight(this);
00463c48      int32_t const ebx = arg2;
00463c4c      int32_t const ebp = arg3;
00463c64      int32_t var_44;
00463c64      
00463c64      if (UIElement::GetAttribute_Int(this, 0x3c, &var_44) != 0)
00463c64      {
00463c66          int32_t eax_3 = var_44;
00463c66          
00463c6c          if (ebp > eax_3)
00463c6e              ebp = eax_3;
00463c64      }
00463c64      
00463c80      int32_t var_40;
00463c80      
00463c80      if (UIElement::GetAttribute_Int(this, 0x3e, &var_40) != 0)
00463c80      {
00463c82          int32_t eax_5 = var_40;
00463c82          
00463c88          if (ebp < eax_5)
00463c8a              ebp = eax_5;
00463c80      }
00463c80      
00463c9c      int32_t var_3c;
00463c9c      
00463c9c      if (UIElement::GetAttribute_Int(this, 0x3d, &var_3c) != 0)
00463c9c      {
00463c9e          int32_t eax_7 = var_3c;
00463c9e          
00463ca6          if (arg2 > eax_7)
00463ca8              ebx = eax_7;
00463c9c      }
00463c9c      
00463cba      int32_t var_38;
00463cba      
00463cba      if (UIElement::GetAttribute_Int(this, 0x3f, &var_38) != 0)
00463cba      {
00463cbc          int32_t eax_9 = var_38;
00463cbc          
00463cc2          if (ebx < eax_9)
00463cc4              ebx = eax_9;
00463cba      }
00463cba      
00463cd0      if ((eax != ebx || eax_1 != ebp))
00463cd0      {
00463cdb          UIRegion::ResizeTo(this, ebx, ebp);
00463ce0          class UIObject* m_object = this->m_object;
00463ce0          
00463ce8          if (m_object == 0)
00463ce8          {
00463cea              class UIRegion* m_parent = this->m_parent;
00463cea              
00463cf2              if (m_parent == 0)
00463cfd                  m_object = nullptr;
00463cf2              else
00463cf9                  m_object = UIRegion::GetObjectA(m_parent);
00463ce8          }
00463ce8          
00463d06          if ((*(uint8_t*)((char*)this->__inner23 + 2) & 1) == 0)
00463d06          {
00463d6d              UIElement::UpdateSurfaceBox(this, 0);
00463d76              UIRegion::ForceUpdate(this, 1);
00463d06          }
00463d06          else if (m_object != 0)
00463d0a          {
00463d13              arg2 = 3;
00463d1b              UIElement::GetCurrentUIObjectMode(this, &arg2);
00463d1b              
00463d25              if (arg2 == 3)
00463d25              {
00463d27                  m_object->vtable->SetPhysicalSize(ebx, ebp);
00463d34                  UIRegion::ForceUpdate(this, 1);
00463d25              }
00463d25              
00463d39              uint32_t m_nVirtualX = m_object->m_nVirtualX;
00463d3c              uint32_t m_nVirtualY = m_object->m_nVirtualY;
00463d3f              struct UIObject::VTable* vtable = m_object->vtable;
00463d47              int32_t eax_11 = UIRegion::GetHeight(this);
00463d5d              vtable->SetVirtualScreenPosition(m_nVirtualX, m_nVirtualY, UIRegion::GetWidth(this), eax_11);
00463d62              UIElement::UpdateObjectScale(this);
00463d0a          }
00463d0a          
00463d87          if ((((int8_t)(this->__inner23 >> 5)) & 1) != 0)
00463d87          {
00463d89              class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00463d89              
00463d91              if (UIElementManager::s_pInstance_1 != 0)
00463d97                  UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance_1, 7, 0);
00463d87          }
00463d87          
00463da7          if ((((int8_t)(this->__inner23 >> 9)) & 1) != 0)
00463da7          {
00463da9              uint32_t m_elementID = this->m_desc.m_elementID;
00463db1              int32_t eax_15 = UIRegion::GetHeight(this);
00463dba              int32_t eax_16 = UIRegion::GetWidth(this);
00463dca              arg2 = UIRegion::GetHeight(this);
00463dce              int32_t eax_18 = UIRegion::GetWidth(this);
00463dd9              int32_t const var_10_1 = arg2;
00463ddd              class UIElementManager* UIElementManager::s_pInstance_2 = UIElementManager::s_pInstance;
00463de5              uint32_t m_elementID_1 = m_elementID;
00463de9              class UIElement* this_1 = this;
00463ded              int32_t var_20_1 = 0x24;
00463df5              int32_t var_1c_1 = 0;
00463df9              int32_t var_18_1 = 0;
00463dfd              int32_t var_4_1 = 0;
00463e01              int32_t var_14_1 = eax_18;
00463e05              int32_t var_c_1 = eax_16;
00463e09              int32_t var_8_1 = eax_15;
00463e09              
00463e0d              if (UIElementManager::s_pInstance_2 != 0)
00463e14                  UIElementManager::BroadcastElementMessage(UIElementManager::s_pInstance_2, &m_elementID_1);
00463da7          }
00463da7          
00463e25          void* __offset(DLListData, -0x8) i = nullptr;
00463e25          
00463e29          if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00463e29          {
00463e2b              class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
00463e2b              
00463e30              if (head_ == 0)
00463e37                  i = nullptr;
00463e30              else
00463e32                  i = &head_[-1];
00463e29          }
00463e29          
00463e3b          class HashList<UIRegion *,UIRegion *,1>* var_2c_1 = &this->m_children;
00463e3f          class DLListData* dllist_next;
00463e3f          
00463e3f          for (; i != 0; i = &dllist_next[-1])
00463e3f          {
00463e41              class UIElement* ecx_22 = *(int32_t*)((char*)ADJ(i) + 8);
00463e41              
00463e46              if (ecx_22 != 0)
00463e48                  UIElement::UpdateForParentSizeChange(ecx_22);
00463e48              
00463e4d              dllist_next = ADJ(i)->dllist_next;
00463e4d              
00463e52              if (dllist_next == 0)
00463e52                  break;
00463e3f          }
00463e3f          
00463e5f          int32_t* eax_21 = this->vtable->GetParent();
00463e5f          
00463e68          if (eax_21 != 0)
00463e6f              *(uint32_t*)(*(uint32_t*)eax_21 + 0xf4)(this);
00463cd0      }
00463c30  }

00463e7e                                                                                            90 90                                ..

00463e80  void __fastcall UIElement::UpdateForScreenPositionChange(class UIElement* this)

00463e80  {
00463e8d      if ((*(uint8_t*)((char*)this->__inner23 + 2) & 1) != 0)
00463e8d      {
00463e90          class UIObject* m_object = this->m_object;
00463e90          
00463e98          if (m_object != 0)
00463e98          {
00463eb4          label_463eb4:
00463ebc              int32_t eax_8;
00463ebc              int32_t ebx_1;
00463ebc              
00463ebc              if (this->vtable->GetParent() == 0)
00463ebc              {
00463ee4                  ebx_1 = 0;
00463ee6                  eax_8 = 0;
00463ebc              }
00463ebc              else
00463ebc              {
00463ecf                  ebx_1 = UIRegion::GetScreenX0(this->vtable->GetParent());
00463edd                  eax_8 = UIRegion::GetScreenY0(this->vtable->GetParent());
00463ebc              }
00463ebc              
00463eeb              m_object->vtable->SetVirtualScreenPosition((this->m_box.m_x0 + ebx_1), (this->m_box.m_y0 + eax_8), m_object->m_nVirtualWidth, m_object->m_nVirtualHeight);
00463e98          }
00463e98          else
00463e98          {
00463e9a              class UIRegion* m_parent = this->m_parent;
00463e9a              
00463ea2              if (m_parent != 0)
00463ea2              {
00463ea9                  m_object = UIRegion::GetObjectA(m_parent);
00463ea9                  
00463ead                  if (m_object != 0)
00463ead                      goto label_463eb4;
00463ea2              }
00463e98          }
00463e8d      }
00463e8d      
00463f14      void* __offset(DLListData, -0x8) i_1 = nullptr;
00463f14      
00463f18      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00463f18      {
00463f1a          class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
00463f1a          
00463f1f          if (head_ == 0)
00463f26              i_1 = nullptr;
00463f1f          else
00463f21              i_1 = &head_[-1];
00463f18      }
00463f18      
00463f2a      void* __offset(DLListData, -0x8) i = i_1;
00463f2c      class HashList<UIRegion *,UIRegion *,1>* var_4 = &this->m_children;
00463f2c      
00463f30      if (i_1 != 0)
00463f30      {
00463f4d          do
00463f4d          {
00463f32              int32_t* ecx_11 = *(int32_t*)((char*)ADJ(i) + 8);
00463f32              
00463f37              if (ecx_11 != 0)
00463f3b                  *(uint32_t*)(*(uint32_t*)ecx_11 + 0x114)();
00463f3b              
00463f41              class DLListData* dllist_next = ADJ(i)->dllist_next;
00463f41              
00463f46              if (dllist_next == 0)
00463f46                  break;
00463f46              
00463f48              i = &dllist_next[-1];
00463f4d          } while (i != 0);
00463f30      }
00463e80  }

00463f54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00463f60  void __thiscall UIElement::UpdateForParentVisibilityChange(class UIElement* this, uint8_t arg2)

00463f60  {
00463f64      int32_t ebx = arg2;
00463f6c      this->vtable->OnVisibilityChanged(ebx);
00463f81      void* i = nullptr;
00463f81      
00463f85      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00463f85      {
00463f87          uint32_t head_ = this->m_children.m_ihlIntrusive.m_list.head_;
00463f87          
00463f8c          if (head_ == 0)
00463f93              i = nullptr;
00463f8c          else
00463f8e              i = (head_ - 8);
00463f85      }
00463f85      
00463f97      class HashList<UIRegion *,UIRegion *,1>* var_4 = &this->m_children;
00463f9b      void* esi;
00463f9b      
00463f9b      for (; i != 0; i = ((char*)esi - 8))
00463f9b      {
00463fa0          int32_t* ecx_1 = *(uint32_t*)((char*)i + 0x10);
00463fa0          
00463fb2          if ((ecx_1 != 0 && (((int8_t)(ecx_1[0x29] >> 1)) & 1) != 0))
00463fb7              *(uint32_t*)(*(uint32_t*)ecx_1 + 0xf8)(ebx);
00463fb7          
00463fbd          esi = *(uint32_t*)((char*)i + 8);
00463fbd          
00463fc2          if (esi == 0)
00463fc2              break;
00463f9b      }
00463f60  }

00463fd4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00463fe0  class UIElement* __fastcall UIElement::GetFirstChildElement(class UIElement* this)

00463fe0  {
00463fe8      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00463fe8      {
00463fea          class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
00463fea          
00463ff9          if ((head_ != 0 && head_ != 8))
00463ffe              return *(int32_t*)((char*)head_ + 8);
00463fe8      }
00463fe8      
00464001      return 0;
00463fe0  }

00464002        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00464010  void __thiscall IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>(class IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>* this, uint32_t arg2)

00464010  {
0046401b      arg2 = arg2;
0046401f      uint8_t edx = ((int8_t)arg2);
00464023      this->m_buckets = nullptr;
00464026      this->m_firstInterestingBucket = nullptr;
00464029      this->m_numBuckets = 0;
0046402c      this->m_numElements = 0;
00464030      this->vtable = &IntrusiveHashTable<class UIListener*,class HashSetData<class UIListener*>*,1>::`vftable';
00464036      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00464049      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00464049      
00464053      if (eax == bucketSizesEnd_1)
00464055          eax -= 4;
00464055      
00464058      uint32_t eax_1 = *(uint32_t*)eax;
0046405d      this->m_numBuckets = eax_1;
0046405d      
00464060      if (eax_1 > 0x17)
00464076          this->m_buckets = operator new[]((eax_1 << 2));
00464060      else
00464065          this->m_buckets = &this->m_aInplaceBuckets;
00464065      
0046407c      class HashSetData<UIListener *>** m_buckets = this->m_buckets;
0046407f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00464085      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00464096      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00464010  }

0046409f                                                                                               90                                 .

004640a0  uint8_t __thiscall IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::resize_internal(class IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>* this, uint32_t arg2)

004640a0  {
004640a1      uint32_t ebp = arg2;
004640a1      
004640ab      if (ebp == this->m_numBuckets)
004640ab      {
004640ae          int32_t eax;
004640ae          eax = 0;
004640b1          return 0;
004640ab      }
004640ab      
004640b9      int32_t* i_1 = nullptr;
004640b9      
004640bd      while (this->m_numElements != 0)
004640bd      {
004640c6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004640cc          int32_t* i_2;
004640cc          int32_t* m_firstInterestingBucket_2;
004640cc          
004640cc          if (this->m_firstInterestingBucket == ecx_1)
004640cc          {
004640e2          label_4640e2:
004640e2              m_firstInterestingBucket_2 = nullptr;
004640e4              i_2 = nullptr;
004640cc          }
004640cc          else
004640cc          {
004640d0              while (true)
004640d0              {
004640d0                  class HashSetData<UIListener *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
004640d0                  
004640d6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004640d6                  {
004640e8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004640eb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
004640ed                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004640ed                      break;
004640d6                  }
004640d6                  
004640dd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004640dd                  
004640e0                  if (&m_firstInterestingBucket[1] == ecx_1)
004640e0                      goto label_4640e2;
004640d0              }
004640cc          }
004640cc          
004640ef          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
004640ef          
004640f3          if (eax_4 == i_2)
00464105              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004640f3          else
004640f3          {
004640fc              void* edx_1;
004640fc              
004640fc              do
004640fc              {
004640f5                  edx_1 = eax_4;
004640f7                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
004640fc              } while (eax_4 != i_2);
004640fc              
00464100              if (edx_1 != 0)
0046410c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
00464100              else
00464105                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004640f3          }
004640f3          
0046410f          this->m_numElements -= 1;
00464112          i_2[1] = i_1;
0046411a          i_1 = i_2;
004640bd      }
004640bd      
0046411e      class HashSetData<UIListener *>** m_buckets = this->m_buckets;
0046411e      
00464126      if (m_buckets != &this->m_aInplaceBuckets)
00464129          operator delete[](m_buckets);
00464129      
00464136      this->m_buckets = nullptr;
00464139      this->m_firstInterestingBucket = nullptr;
0046413c      this->m_numBuckets = 0;
0046413f      this->m_numElements = 0;
00464142      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00464149      void* eax_7;
00464149      
00464149      if (i_1 != 0)
00464149      {
004641cb          int32_t* i;
004641cb          
004641cb          do
004641cb          {
00464150              uint32_t m_numBuckets = this->m_numBuckets;
00464156              i = i_1[1];
00464156              
0046415f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0046415f              {
00464161                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00464168                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0046416e                  arg2 = m_numBuckets;
0046417e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0046417e                  
00464188                  if (eax_8 != bucketSizesEnd_1)
00464191                      eax_8 = &eax_8[1];
00464188                  else
00464188                  {
0046418a                      eax_8 -= 4;
0046418a                      
0046418f                      if (eax_8 != bucketSizesEnd_1)
00464191                          eax_8 = &eax_8[1];
00464188                  }
00464188                  
00464199                  IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
0046415f              }
0046415f              
004641a2              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
004641a5              class HashSetData<UIListener *>** m_buckets_1 = this->m_buckets;
004641ab              i_1[1] = m_buckets_1[temp1_1];
004641ae              m_buckets_1[temp1_1] = i_1;
004641b4              eax_7 = &m_buckets_1[temp1_1];
004641b4              
004641b9              if (eax_7 < this->m_firstInterestingBucket)
004641bb                  this->m_firstInterestingBucket = eax_7;
004641bb              
004641c6              this->m_numElements += 1;
004641c9              i_1 = i;
004641cb          } while (i != 0);
00464149      }
00464149      
004641d0      eax_7 = 1;
004641d3      return 1;
004640a0  }

004641d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004641e0  uint8_t __thiscall IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, uint32_t arg2)

004641e0  {
004641ea      if (arg2 == this->m_numBuckets)
004641ea      {
004641ec          uint32_t eax;
004641ec          eax = 0;
004641ef          return 0;
004641ea      }
004641ea      
004641f9      struct HashList<UIRegion *,UIRegion *,1>::HashListData* m_hashNext_2 = nullptr;
004641f9      
004641fe      while (this->m_numElements != 0)
004641fe      {
00464209          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0046420e          struct HashList<UIRegion *,UIRegion *,1>::HashListData* m_hashNext_3;
0046420e          int32_t* m_firstInterestingBucket_2;
0046420e          
0046420e          if (this->m_firstInterestingBucket == ecx_1)
0046420e          {
00464221          label_464221:
00464221              m_firstInterestingBucket_2 = nullptr;
00464223              m_hashNext_3 = nullptr;
0046420e          }
0046420e          else
0046420e          {
00464210              while (true)
00464210              {
00464210                  struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
00464210                  
00464215                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00464215                  {
00464227                      struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0046422a                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
0046422c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0046422c                      break;
00464215                  }
00464215                  
0046421c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0046421c                  
0046421f                  if (&m_firstInterestingBucket[1] == ecx_1)
0046421f                      goto label_464221;
00464210              }
0046420e          }
0046420e          
0046422e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0046422e          
00464232          if (eax_4 == m_hashNext_3)
00464244              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00464232          else
00464232          {
0046423b              void* edx_2;
0046423b              
0046423b              do
0046423b              {
00464234                  edx_2 = eax_4;
00464236                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0046423b              } while (eax_4 != m_hashNext_3);
0046423b              
0046423f              if (edx_2 != 0)
0046424b                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0046423f              else
00464244                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00464232          }
00464232          
0046424e          this->m_numElements -= 1;
00464251          m_hashNext_3->m_hashNext = m_hashNext_2;
00464257          m_hashNext_2 = m_hashNext_3;
004641fe      }
004641fe      
0046425b      struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_buckets = this->m_buckets;
0046425b      
00464263      if (m_buckets != &this->m_aInplaceBuckets)
00464266          operator delete[](m_buckets);
00464266      
00464275      this->m_buckets = nullptr;
00464278      this->m_firstInterestingBucket = nullptr;
0046427b      this->m_numBuckets = 0;
0046427e      this->m_numElements = 0;
00464281      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
00464288      struct HashList<UIRegion *,UIRegion *,1>::HashListData* m_hashNext_1 = m_hashNext_2;
00464288      
0046428a      if (m_hashNext_2 != 0)
0046428a      {
0046429f          struct HashList<UIRegion *,UIRegion *,1>::HashListData* m_hashNext;
0046429f          
0046429f          do
0046429f          {
00464290              m_hashNext = m_hashNext_1->m_hashNext;
00464296              IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add_internal(this, m_hashNext_1);
0046429d              m_hashNext_1 = m_hashNext;
0046429f          } while (m_hashNext != 0);
0046428a      }
0046428a      
004642a4      m_hashNext_1 = 1;
004642a7      return 1;
004641e0  }

004642aa                                90 90 90 90 90 90                                                            ......

004642b0  uint8_t __thiscall PropertyCollection::ContainsProperty(class PropertyCollection const* this, uint32_t const arg2)

004642b0  {
004642c6      for (int32_t* i = this->m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_hashProperties.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
004642c6      {
004642ca          if (*(uint32_t*)i == arg2)
004642ca          {
004642e4              if (i == 0)
004642e4                  break;
004642e4              
004642f0              void* eax_4;
004642f0              eax_4 = i != 0xfffffff8;
004642f3              return eax_4;
004642ca          }
004642c6      }
004642c6      
004642dc      int32_t eax_3;
004642dc      eax_3 = 0;
004642df      return 0;
004642b0  }

004642f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00464300  uint8_t __thiscall UIElement::ContainsProperty(class UIElement const* this, uint32_t const arg2)

00464300  {
00464312      uint8_t eax = PropertyCollection::ContainsProperty(&this->m_instanceProperties, arg2);
00464312      
00464319      if (eax == 0)
00464319      {
00464323          class StateDesc* m_curStateDesc = this->m_curStateDesc;
00464323          
0046432b          if (m_curStateDesc != 0)
0046432e              eax = StateDesc::ContainsProperty(m_curStateDesc, arg2);
0046432e          
00464335          if ((m_curStateDesc == 0 || eax == 0))
00464335          {
00464347              if (StateDesc::ContainsProperty(&this->m_desc, arg2) != 0)
0046434e                  return 1;
0046434e              
00464349              return 0;
00464335          }
00464319      }
00464319      
00464320      return 1;
00464300  }

00464351                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00464360  class UIElement* __thiscall UIElement::GetNextChildElement(class UIElement* this, class UIElement* arg2)

00464360  {
00464382      int32_t* eax_5 = this->m_children.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((arg2 << 0x18) | (arg2 >> 8))) % this->m_children.m_ihlIntrusive.m_hash.m_numBuckets)];
00464382      
00464386      if (eax_5 != 0)
00464386      {
0046438a          while (*(uint32_t*)eax_5 != arg2)
0046438a          {
0046438c              eax_5 = eax_5[1];
0046438c              
00464391              if (eax_5 == 0)
00464391                  break;
0046438a          }
00464386      }
00464386      
00464396      if (eax_5 != 0)
00464396      {
00464398          void* eax_6 = eax_5[2];
00464398          
004643a4          if ((eax_6 != 0 && eax_6 != 8))
004643a9              return *(uint32_t*)((char*)eax_6 + 8);
00464396      }
00464396      
004643ae      return 0;
00464360  }

004643b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004643c0  class UIElement* __thiscall UIElement::GetPrevChildElement(class UIElement* this, class UIElement* arg2)

004643c0  {
004643e2      int32_t* eax_5 = this->m_children.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((arg2 << 0x18) | (arg2 >> 8))) % this->m_children.m_ihlIntrusive.m_hash.m_numBuckets)];
004643e2      
004643e6      if (eax_5 != 0)
004643e6      {
004643ea          while (*(uint32_t*)eax_5 != arg2)
004643ea          {
004643ec              eax_5 = eax_5[1];
004643ec              
004643f1              if (eax_5 == 0)
004643f1                  break;
004643ea          }
004643e6      }
004643e6      
004643f6      if (eax_5 != 0)
004643f6      {
004643f8          void* eax_6 = eax_5[3];
004643f8          
00464404          if ((eax_6 != 0 && eax_6 != 8))
00464409              return *(uint32_t*)((char*)eax_6 + 8);
004643f6      }
004643f6      
0046440e      return 0;
004643c0  }

00464411                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00464420  uint8_t __thiscall IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::add(class IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>* this, class HashSetData<UIListener *>* arg2)

00464420  {
00464428      class UIListener* m_hashKey = arg2->m_hashKey;
0046442b      uint32_t m_numBuckets = this->m_numBuckets;
0046442b      
0046443e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0046443e      {
00464442          if (*(uint32_t*)i == m_hashKey)
00464442          {
0046448e              if (i == 0)
0046448e                  break;
0046448e              
00464492              i = 0;
00464495              return 0;
00464442          }
0046443e      }
0046443e      
00464454      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00464458          IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::grow(this);
00464458      
00464461      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
00464464      class HashSetData<UIListener *>** m_buckets = this->m_buckets;
0046446a      arg2->m_hashNext = m_buckets[temp1_1];
0046446d      m_buckets[temp1_1] = arg2;
00464473      class HashSetData<UIListener *>** eax_4 = &m_buckets[temp1_1];
00464473      
00464478      if (eax_4 < this->m_firstInterestingBucket)
0046447a          this->m_firstInterestingBucket = eax_4;
0046447a      
00464482      this->m_numElements += 1;
00464486      uint32_t eax_6;
00464486      eax_6 = 1;
00464489      return 1;
00464420  }

00464498                                                                          90 90 90 90 90 90 90 90                          ........

004644a0  struct HashList<UIRegion *,UIRegion *,1>::HashListData* __thiscall IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::remove(class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, class UIRegion** arg2)

004644a0  {
004644a7      class UIRegion* edi = *(uint32_t*)arg2;
004644b7      uint32_t temp1 = (COMBINE(0, ((edi << 0x18) | (edi >> 8))) % this->m_numBuckets);
004644ba      struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_buckets = this->m_buckets;
004644ba      
004644c7      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
004644c7      {
004644d2          if (*(uint32_t*)i == edi)
004644d2          {
004644e5              if (i == 0)
004644e5                  break;
004644e5              
004644ee              void* var_14 = &m_buckets[temp1];
004644f1              int32_t* i_1 = i;
004644f4              IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, this);
004644fe              return i;
004644d2          }
004644c7      }
004644c7      
004644e0      return 0;
004644a0  }

00464501     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00464510  uint8_t __fastcall IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::grow(class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this)

00464510  {
00464510      class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* m_numBuckets = this;
00464512      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0046451e      m_numBuckets = this->m_numBuckets;
00464535      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00464535      
0046453f      if (eax_2 != bucketSizesEnd_1)
00464548          eax_2 = &eax_2[1];
0046453f      else
0046453f      {
00464541          eax_2 -= 4;
00464541          
00464546          if (eax_2 != bucketSizesEnd_1)
00464548              eax_2 = &eax_2[1];
0046453f      }
0046453f      
00464558      return IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
00464510  }

00464559                                                                             90 90 90 90 90 90 90                           .......

00464560  class UIElement* __thiscall UIElement::FindRelative(class UIElement const* this, uint32_t arg2)

00464560  {
00464562      uint32_t ebp = arg2;
00464570      class UIElement* i = UIElement::GetChildRecursive(this, ebp);
00464570      
00464574      if (i == 0)
00464574      {
00464584          class UIElement* this_1 = this;
00464586          class UIElement* edi_1 = this->vtable->GetParent();
00464588          arg2 = this_1;
00464588          
00464598          while (true)
00464598          {
00464598              if (this_1->m_desc.m_elementID == ebp)
00464635                  return this_1;
00464635              
004645a0              if (edi_1 == 0)
004645a0                  break;
004645a0              
004645ae              if (edi_1->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
004645ae              {
004645b0                  class DLListData* head_ = edi_1->m_children.m_ihlIntrusive.m_list.head_;
004645b0                  
004645bf                  if ((head_ != 0 && head_ != 8))
004645bf                  {
004645c1                      class UIElement* dllist_next = head_[1].dllist_next;
004645c1                      
004645c6                      if (dllist_next != 0)
004645c6                      {
004645d2                          while (i == 0)
004645d2                          {
004645da                              if (dllist_next->m_desc.m_elementID == ebp)
004645dc                                  i = dllist_next;
004645da                              else if (dllist_next != this_1)
004645ec                                  i = UIElement::GetChildRecursive(dllist_next, ebp);
004645ec                              
004645f6                              dllist_next = UIElement::GetNextChildElement(edi_1, dllist_next);
004645f6                              
004645fa                              if (dllist_next == 0)
004645fa                                  break;
004645fa                              
004645ca                              this_1 = arg2;
004645d2                          }
004645c6                      }
004645bf                  }
004645ae              }
004645ae              
00464608              arg2 = edi_1;
00464608              
0046460c              if ((((int8_t)(edi_1->__inner23 >> 0x15)) & 1) == 0)
0046461c                  edi_1 = edi_1->vtable->GetParent();
0046460c              else
0046460e                  edi_1 = nullptr;
0046460e              
00464620              if (i != 0)
00464620                  break;
00464620              
0046458e              this_1 = arg2;
00464598          }
00464574      }
00464574      
0046462c      return i;
00464560  }

00464638                                                                          90 90 90 90 90 90 90 90                          ........

00464640  uint8_t __thiscall HashSet<UIListener *>::add(class HashSet<UIListener *>* this, class UIListener** arg2)

00464640  {
00464649      class UIListener* ecx = *(uint32_t*)arg2;
00464649      
0046465c      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, ecx) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0046465c      {
00464662          if (*(uint32_t*)i == ecx)
00464662          {
00464695              if (i == 0)
00464695                  break;
00464695              
00464698              i = 0;
0046469b              return 0;
00464662          }
0046465c      }
0046465c      
0046466d      void* eax_3 = operator new(8);
0046466d      
00464677      if (eax_3 == 0)
00464677      {
004646a3          IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::add(&this->m_intrusiveTable, nullptr);
004646a9          int32_t eax_5;
004646a9          eax_5 = 1;
004646ac          return 1;
00464677      }
00464677      
0046467b      *(uint32_t*)eax_3 = *(uint32_t*)arg2;
00464680      *(uint32_t*)((char*)eax_3 + 4) = 0;
00464687      IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::add(&this->m_intrusiveTable, eax_3);
0046468d      int32_t eax_4;
0046468d      eax_4 = 1;
00464690      return 1;
00464640  }

004646af                                               90                                                                 .

004646b0  void* __thiscall HashSet<UIListener *>::`scalar deleting destructor'(class HashSet<UIListener *>* this, uint32_t arg2)

004646b0  {
004646b9      this->vtable = 0x79bf1c;
004646bf      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
004646c4      class HashSetData<UIListener *>** m_buckets = this->m_intrusiveTable.m_buckets;
004646b4      this->m_intrusiveTable.vtable = &IntrusiveHashTable<class UIListener*,class HashSetData<class UIListener*>*,1>::`vftable';
004646b4      
004646d2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004646d5          operator delete[](m_buckets);
004646d5      
004646b4      this->m_intrusiveTable.m_buckets = nullptr;
004646b4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004646b4      this->m_intrusiveTable.m_numBuckets = 0;
004646b4      this->m_intrusiveTable.m_numElements = 0;
004646b4      
004646f0      if ((arg2 & 1) != 0)
004646f3          operator delete(this);
004646f3      
004646ff      return this;
004646b0  }

00464702        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00464710  struct HashList<UIRegion *,UIRegion *,1>::HashListData* __thiscall IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::remove(class IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, class UIRegion** arg2)

00464710  {
00464719      class UIRegion* i = *(uint32_t*)arg2;
0046472f      int32_t* result = this->m_hash.m_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % this->m_hash.m_numBuckets)];
0046472f      
00464737      if (result != 0)
00464737      {
00464742          while (*(uint32_t*)result != i)
00464742          {
00464744              result = result[1];
00464744              
00464749              if (result == 0)
00464750                  return result;
00464742          }
00464742          
00464755          if (result != 0)
00464755          {
0046475e              DLListBase::Remove(&this->m_list, &result[2]);
00464766              IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::remove(this, arg2);
00464755          }
00464737      }
00464737      
00464770      return result;
00464710  }

00464773                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00464780  void __thiscall IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add_internal(class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg2)

00464780  {
0046478e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
00464792          IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::grow(this);
00464792      
0046479c      class UIRegion* m_hashKey = arg2->m_hashKey;
004647aa      uint32_t temp1 = (COMBINE(0, ((m_hashKey << 0x18) | (m_hashKey >> 8))) % this->m_numBuckets);
004647ad      struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_buckets = this->m_buckets;
004647b3      arg2->m_hashNext = m_buckets[temp1];
004647b6      m_buckets[temp1] = arg2;
004647bd      struct HashList<UIRegion *,UIRegion *,1>::HashListData** eax_5 = &m_buckets[temp1];
004647bd      
004647c2      if (eax_5 < this->m_firstInterestingBucket)
004647c4          this->m_firstInterestingBucket = eax_5;
004647c4      
004647c7      this->m_numElements += 1;
00464780  }

004647ce                                            90 90                                                                ..

004647d0  void __thiscall UIElement::UIElement(class UIElement* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004647d0  {
004647dc      UIRegion::UIRegion(this, nullptr, 0, 0, 0, 0);
004647e7      this->vtable = 0x79bf20;
004647ed      this->m_itemDragged = nullptr;
004647f3      this->m_pFocusElement = nullptr;
004647f9      MediaMachine::MediaMachine(&this->m_mediaMachine);
00464809      this->m_layout = nullptr;
0046480f      ElementDesc::ElementDesc(&this->m_desc, arg3);
0046481a      this->m_state = 0;
00464820      this->m_curStateDesc = nullptr;
00464826      PropertyCollection::PropertyCollection(&this->m_instanceProperties);
00464831      this->m_currentBorder = BORDER_NONE;
00464837      UILocationData::UILocationData(&this->m_defaultLocation);
00464842      StringInfo::StringInfo(&this->m_TTText);
00464847      this->m_bShouldBeMouseVisible = 0;
0046484d      this->m_bIsMouseVisible = 0;
00464853      this->m_cursorHotX = 0;
00464859      this->m_cursorHotY = 0;
00464865      this->m_cursorDID.id = INVALID_DID.id;
0046486b      __builtin_memset(&this->__inner23, 0, 0x18);
00464897      this->m_hashListeners.vtable = 0x79bf1c;
004648a1      IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>::IntrusiveHashTable<UIListener *,HashSetData<UIListener *> *,1>(&this->m_hashListeners.m_intrusiveTable, 0x17);
004648aa      this->m_iterListeners.m_iter.m_currHashTable = 0;
004648b0      this->m_iterListeners.m_iter.m_currBucket = nullptr;
004648b6      this->m_iterListeners.m_iter.m_currElement = nullptr;
004648bc      this->m_idInputMap = 0;
004648c2      this->m_layout = arg2;
004648c8      arg2->vtable->AddRef();
004648dd      UIElement::MoveTo(this, this->m_desc.m_x, this->m_desc.m_y);
004648f2      UIElement::ResizeTo(this, this->m_desc.m_width, this->m_desc.m_height);
004648f7      int32_t m_zLevel = this->m_desc.m_zLevel;
004648f7      
00464903      if (m_zLevel != this->m_zlevel)
00464903      {
0046490a          int32_t* eax_3 = this->vtable->GetParent();
00464914          this->m_zlevel = m_zLevel;
00464914          
0046491a          if (eax_3 != 0)
0046491a          {
00464921              *(uint32_t*)(*(uint32_t*)eax_3 + 0x70)(this);
00464929              *(uint32_t*)(*(uint32_t*)eax_3 + 0x6c)(this);
0046491a          }
00464903      }
00464903      
0046492d      this->m_dragDropCallback = ArgumentParser::OnCommandLineEvaluationDone;
00464937      this->m_mediaMachine.m_owner = this;
004647d0  }

00464945                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00464950  void __thiscall UIRegion::SetShouldEraseBackground(class UIRegion* this, uint8_t arg2)

00464950  {
00464955      union __bitfield164 = this->__bitfield164;
00464965      this->__bitfield164 = (__bitfield164 ^ (((((uint32_t)arg2) << 3) ^ __bitfield164) & 8));
00464950  }

0046496e                                            90 90                                                                ..

00464970  uint8_t __fastcall UIElement::GetActivatable(class UIElement const* this)

00464970  {
0046497c      return (((int8_t)(this->__inner23 >> 2)) & 1);
00464970  }

0046497d                                                                                         90 90 90                               ...

00464980  uint8_t __fastcall UIElement::HasCursor(class UIElement const* this)

00464980  {
00464993      return this->m_cursorDID.id != INVALID_DID.id;
00464980  }

00464994                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004649a0  void __fastcall UIElement::RegisterForElementMessages(class UIElement* this, class UIListener* arg2)

004649a0  {
004649ae      class UIElement* edx = HashSet<UIListener *>::add(&this->m_hashListeners, &arg2);
004649b7      class UIElement* this_1 = this;
004649b8      UIListener::OnRegisteredWithElement(arg2, edx);
004649a0  }

004649c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004649d0  void __thiscall UIElement::UnregisterForElementMessages(class UIElement* this, class UIListener* arg2)

004649d0  {
004649d3      class HashSetData<UIListener *>* m_currElement = this->m_iterListeners.m_iter.m_currElement;
004649dc      class UIListener* edi = arg2;
004649dc      
004649e4      if ((m_currElement != 0 && m_currElement->m_hashKey == edi))
004649ec          HashIterator<unsigned long,BaseProperty,1>::operator++(&this->m_iterListeners);
004649ec      
004649fc      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax;
004649fc      class UIElement* edx;
004649fc      eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_hashListeners.m_intrusiveTable, &arg2);
004649fc      
00464a03      if (eax != 0)
00464a06          edx = operator delete(eax);
00464a06      
00464a0e      class UIElement* this_1 = this;
00464a11      UIListener::OnUnregisteredWithElement(edi, edx);
004649d0  }

00464a1b                                                                                   90 90 90 90 90                             .....

00464a20  void __fastcall HashList<UIRegion *,UIRegion *,1>::flush(class HashList<UIRegion *,UIRegion *,1>* this)

00464a20  {
00464a2a      while (this->m_ihlIntrusive.m_hash.m_numElements > 0)
00464a2a      {
00464a2c          class DLListData* head_ = this->m_ihlIntrusive.m_list.head_;
00464a2c          
00464a31          if (head_ != 0)
00464a31          {
00464a33              class DLListData* dllist_prev = head_->dllist_prev;
00464a33              
00464a38              if (dllist_prev == 0)
00464a38              {
00464a40                  class DLListData* dllist_next = head_->dllist_next;
00464a44                  this->m_ihlIntrusive.m_list.head_ = dllist_next;
00464a44                  
00464a47                  if (dllist_next != 0)
00464a49                      dllist_next->dllist_prev = nullptr;
00464a38              }
00464a38              else
00464a3c                  dllist_prev->dllist_next = head_->dllist_next;
00464a3c              
00464a4c              class DLListData* dllist_next_1 = head_->dllist_next;
00464a4c              
00464a50              if (dllist_next_1 == 0)
00464a50              {
00464a5d                  class DLListData* dllist_prev_1 = this->m_ihlIntrusive.m_list.tail_->dllist_prev;
00464a62                  this->m_ihlIntrusive.m_list.tail_ = dllist_prev_1;
00464a62                  
00464a65                  if (dllist_prev_1 != 0)
00464a67                      dllist_prev_1->dllist_next = 0;
00464a50              }
00464a50              else
00464a55                  dllist_next_1->dllist_prev = head_->dllist_prev;
00464a55              
00464a6b              head_->dllist_next = 0;
00464a6d              head_->dllist_prev = nullptr;
00464a31          }
00464a31          
00464a70          void* __offset(DLListData, -0x8) esi_1;
00464a70          
00464a70          if ((head_ == 0 || head_ == 0))
00464a77              esi_1 = nullptr;
00464a70          else
00464a72              esi_1 = &head_[-1];
00464a72          
00464a7c          IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::remove(this, esi_1);
00464a7c          
00464a83          if (esi_1 != 0)
00464a86              operator delete(esi_1);
00464a2a      }
00464a20  }

00464a94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00464aa0  uint8_t __thiscall IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg2)

00464aa0  {
00464aa6      class UIRegion* m_hashKey = arg2->m_hashKey;
00464aa6      
00464ac3      for (int32_t* i = this->m_buckets[(COMBINE(0, ((m_hashKey << 0x18) | (m_hashKey >> 8))) % this->m_numBuckets)]; i != 0; i = i[1])
00464ac3      {
00464ac7          if (*(uint32_t*)i == m_hashKey)
00464ac7          {
00464adf              if (i == 0)
00464adf                  break;
00464adf              
00464ae2              i = 0;
00464ae5              return 0;
00464ac7          }
00464ac3      }
00464ac3      
00464ad1      IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add_internal(this, arg2);
00464ad7      int32_t eax_5;
00464ad7      eax_5 = 1;
00464ada      return 1;
00464aa0  }

00464ae8                          90 90 90 90 90 90 90 90                                                          ........

00464af0  uint8_t __thiscall IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::place_at_tail(class IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg2)

00464af0  {
00464af8      class UIRegion* m_hashKey = arg2->m_hashKey;
00464b11      int32_t* eax_5 = this->m_hash.m_buckets[(COMBINE(0, ((m_hashKey << 0x18) | (m_hashKey >> 8))) % this->m_hash.m_numBuckets)];
00464b11      
00464b15      if (eax_5 == 0)
00464b15      {
00464b25      label_464b25:
00464b25          IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(this, arg2);
00464b15      }
00464b15      else
00464b15      {
00464b19          while (*(uint32_t*)eax_5 != m_hashKey)
00464b19          {
00464b1b              eax_5 = eax_5[1];
00464b1b              
00464b20              if (eax_5 == 0)
00464b20                  goto label_464b25_1;
00464b19          }
00464b19          
00464b43          if (eax_5 == 0)
00464b43          {
00464b25          label_464b25_1:
00464b25              IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(this, arg2);
00464b43          }
00464b43          else
00464b4c              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
00464b15      }
00464b15      
00464b35      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
00464b3b      int32_t eax_7;
00464b3b      eax_7 = 1;
00464b3e      return 1;
00464af0  }

00464b53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00464b60  uint8_t __thiscall UIElement::SetProperty(class UIElement* this, class BaseProperty const* arg2)

00464b60  {
00464b63      class BaseProperty* edi = arg2;
00464b70      arg2 = BaseProperty::GetPropertyName(edi);
00464b85      int32_t ebx;
00464b85      ebx = HashTable<unsigned long,BaseProperty,1>::set(&this->m_instanceProperties.m_hashProperties.vtable, &arg2, edi);
00464b85      
00464b89      if (ebx != 0)
00464b8b          this->vtable->OnSetAttribute(edi);
00464b8b      
00464b9b      return ebx;
00464b60  }

00464b9e                                                                                            90 90                                ..

00464ba0  void __fastcall UIElement::DeleteChildren(class UIElement* this)

00464ba0  {
00464bb1      void* __offset(DLListData, -0x8) i = nullptr;
00464bb1      
00464bb5      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00464bb5      {
00464bb7          class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
00464bb7          
00464bbc          if (head_ == 0)
00464bc3              i = nullptr;
00464bbc          else
00464bbe              i = &head_[-1];
00464bb5      }
00464bb5      
00464bc7      class HashList<UIRegion *,UIRegion *,1>* var_4 = &this->m_children;
00464bc7      
00464bcb      while (i != 0)
00464bcb      {
00464bd0          int32_t* ecx_1 = *(int32_t*)((char*)ADJ(i) + -8);
00464bd2          class DLListData* dllist_next = ADJ(i)->dllist_next;
00464bd2          
00464bd7          if (dllist_next == 0)
00464bde              i = nullptr;
00464bd7          else
00464bd9              i = &dllist_next[-1];
00464bd9          
00464be2          if (ecx_1 != 0)
00464be8              **(uint32_t**)ecx_1(1);
00464bcb      }
00464bcb      
00464bf5      /* tailcall */
00464bf5      return HashList<UIRegion *,UIRegion *,1>::flush(&this->m_children);
00464ba0  }

00464bfa                                                                                90 90 90 90 90 90                            ......

00464c00  uint8_t __thiscall HashList<UIRegion *,UIRegion *,1>::move_to_tail(class HashList<UIRegion *,UIRegion *,1>* this, class UIRegion** arg2)

00464c00  {
00464c05      class UIRegion* i = *(uint32_t*)arg2;
00464c1e      int32_t* eax_5 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
00464c1e      
00464c22      if (eax_5 != 0)
00464c22      {
00464c26          while (*(uint32_t*)eax_5 != i)
00464c26          {
00464c28              eax_5 = eax_5[1];
00464c28              
00464c2d              if (eax_5 == 0)
00464c2d              {
00464c2f                  eax_5 = 0;
00464c32                  return 0;
00464c2d              }
00464c26          }
00464c26          
00464c37          if (eax_5 != 0)
00464c44              /* tailcall */
00464c44              return IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::place_at_tail(this, eax_5);
00464c22      }
00464c22      
00464c39      eax_5 = 0;
00464c3c      return 0;
00464c00  }

00464c49                             90 90 90 90 90 90 90                                                           .......

00464c50  uint8_t __thiscall IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::push_tail(class IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg2)

00464c50  {
00464c58      class UIRegion* m_hashKey = arg2->m_hashKey;
00464c58      
00464c75      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, ((m_hashKey << 0x18) | (m_hashKey >> 8))) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
00464c75      {
00464c79          if (*(uint32_t*)i == m_hashKey)
00464c79          {
00464ca3              if (i == 0)
00464ca3                  break;
00464ca3              
00464ca6              i = 0;
00464ca9              return 0;
00464c79          }
00464c75      }
00464c75      
00464c85      IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(this, arg2);
00464c95      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
00464c9b      int32_t eax_6;
00464c9b      eax_6 = 1;
00464c9e      return 1;
00464c50  }

00464cac                                      90 90 90 90                                                              ....

00464cb0  void* __thiscall PropertyCollection::`scalar deleting destructor'(class PropertyCollection* this, uint32_t arg2)

00464cb0  {
00464cb3      PropertyCollection::~PropertyCollection(this);
00464cb3      
00464cbd      if ((arg2 & 1) != 0)
00464cc0          operator delete(this);
00464cc0      
00464ccb      return this;
00464cb0  }

00464cce                                            90 90                                                                ..

00464cd0  void __fastcall UIElement::~UIElement(class UIElement* this)

00464cd0  {
00464cd8      this->vtable = 0x79bf20;
00464cde      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00464ce4      UIElement::DeleteChildren(this);
00464ce9      union __inner23 = this->__inner23;
00464ce9      
00464cf7      if ((((int8_t)(__inner23 >> 0x12)) & 1) != 0)
00464cfe          this->__inner23 = (__inner23 & 0xfffbffff);
00464cfe      
00464d10      if ((((int8_t)(this->__inner23 >> 0x13)) & 1) != 0)
00464d14          UIElement::StopResizing(this);
00464d14      
00464d19      class HashTableData<unsigned long,DBOCache *>* m_hashNext_2 = nullptr;
00464d19      
00464d1d      if (UIElementManager::s_pInstance_1 != 0)
00464d22          UIElementManager::DeletingElement(UIElementManager::s_pInstance_1, this);
00464d22      
00464d2b      UIElement::SetUIObject(this, nullptr);
00464d33      UIElement::SetParent(this, nullptr);
00464d43      void __return;
00464d43      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_1 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashListeners.m_intrusiveTable, &__return);
00464d48      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax_1->m_currElement;
00464d4d      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_1->m_currHashTable;
00464d4f      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_1->m_currBucket;
00464d4f      
00464d56      if (m_currElement != 0)
00464d56      {
00464dd3          do
00464dd3          {
00464d58              m_hashNext_2 = m_currElement->m_hashNext;
00464d5d              uint32_t m_hashKey = m_currElement->m_hashKey;
00464d67              class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
00464d67              
00464d69              if (m_hashNext_2 == 0)
00464d69              {
00464d78                  while (true)
00464d78                  {
00464d78                      m_currBucket_1 = &m_currBucket_1[1];
00464d78                      
00464d7d                      if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00464d7d                          break;
00464d7d                      
00464d7f                      class HashTableData<unsigned long,DBOCache *>* m_hashNext_3 = *(uint32_t*)m_currBucket_1;
00464d7f                      
00464d83                      if (m_hashNext_3 != 0)
00464d83                      {
00464d85                          m_hashNext_2 = m_hashNext_3;
00464d85                          break;
00464d83                      }
00464d78                  }
00464d69              }
00464d69              
00464d87              class HashTableData<unsigned long,DBOCache *>* m_hashNext = *(uint32_t*)m_currBucket;
00464d8c              class HashTableData<unsigned long,DBOCache *>* m_hashNext_1;
00464d8c              
00464d8c              if (m_hashNext == m_currElement)
00464d8c              {
00464d9d                  m_hashNext_1 = m_hashNext->m_hashNext;
00464da0                  *(uint32_t*)m_currBucket = m_hashNext_1;
00464d8c              }
00464d8c              else
00464d8c              {
00464d97                  do
00464d97                  {
00464d90                      m_hashNext_1 = m_hashNext;
00464d92                      m_hashNext = m_hashNext->m_hashNext;
00464d97                  } while (m_hashNext != m_currElement);
00464d97                  
00464d9b                  if (m_hashNext_1 != 0)
00464da8                      m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
00464d9b                  else
00464d9b                  {
00464d9d                      m_hashNext_1 = m_hashNext->m_hashNext;
00464da0                      *(uint32_t*)m_currBucket = m_hashNext_1;
00464d9b                  }
00464d8c              }
00464d8c              
00464daf              m_currHashTable->m_numElements -= 1;
00464db2              class HashTableData<unsigned long,DBOCache *>* m_currElement_1 = m_currElement;
00464db8              m_currElement = m_hashNext_2;
00464dba              m_currBucket = m_currBucket_1;
00464dba              
00464dbc              if (m_currElement_1 != 0)
00464dbf                  m_hashNext_1 = operator delete(m_currElement_1);
00464dbf              
00464dcb              class UIElement* this_1 = this;
00464dcc              UIListener::OnUnregisteredWithElement(m_hashKey, m_hashNext_1);
00464dd3          } while (m_hashNext_2 != 0);
00464d56      }
00464d56      
00464dd5      class LayoutDesc* m_layout = this->m_layout;
00464dd5      
00464dde      if (m_layout != m_hashNext_2)
00464dde      {
00464de0          m_layout->vtable->Release();
00464de5          this->m_layout = m_hashNext_2;
00464dde      }
00464dde      
00464df3      this->m_hashListeners.vtable = 0x79bf1c;
00464dfd      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashListeners.m_intrusiveTable.vtable);
00464e02      void* m_buckets = this->m_hashListeners.m_intrusiveTable.m_buckets;
00464deb      this->m_hashListeners.m_intrusiveTable.vtable = &IntrusiveHashTable<class UIListener*,class HashSetData<class UIListener*>*,1>::`vftable';
00464deb      
00464e10      if (m_buckets != &this->m_hashListeners.m_intrusiveTable.m_aInplaceBuckets)
00464e13          operator delete[](m_buckets);
00464e13      
00464deb      this->m_hashListeners.m_intrusiveTable.m_buckets = m_hashNext_2;
00464deb      this->m_hashListeners.m_intrusiveTable.m_firstInterestingBucket = m_hashNext_2;
00464deb      this->m_hashListeners.m_intrusiveTable.m_numBuckets = m_hashNext_2;
00464deb      this->m_hashListeners.m_intrusiveTable.m_numElements = m_hashNext_2;
00464e2d      StringInfo::~StringInfo(&this->m_TTText);
00464e38      PropertyCollection::~PropertyCollection(&this->m_instanceProperties);
00464e43      ElementDesc::~ElementDesc(&this->m_desc);
00464e4e      MediaMachine::~MediaMachine(&this->m_mediaMachine);
00464e55      UIRegion::~UIRegion(this);
00464cd0  }

00464e61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00464e70  uint8_t __thiscall UIElement::SetState(class UIElement* this, uint32_t arg2)

00464e70  {
00464e77      class UIElement* this_1 = this;
00464e80      uint32_t edi = arg2;
00464e8e      class UIElement* this_2 = this_1;
00464e92      class StateDesc* m_curStateDesc = this_1->m_curStateDesc;
00464e96      class StateDesc* eax_1 = ElementDesc::AccessStateDesc(&this_1->m_desc, edi);
00464e9d      class StateDesc* var_100 = eax_1;
00464e9d      
00464ea1      if (eax_1 == 0)
00464ea3          edi = 0;
00464ea3      
00464eab      if (edi != this_1->m_state)
00464eab      {
00464eb3          this_1->m_curStateDesc = eax_1;
00464eb9          this_1->m_state = edi;
00464eb9          
00464ebf          if (eax_1 == 0)
00464ebf          {
00464eca              eax_1 = this_1->m_desc.m_bPassToChildren;
00464eca              
00464ed2              if (eax_1 != 0)
00464ed2              {
00464ee3              label_464ee3:
00464ee3                  void* __offset(DLListData, -0x8) i = nullptr;
00464ee3                  
00464ee7                  if (this_2->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00464ee7                  {
00464ee9                      class DLListData* head_ = this_2->m_children.m_ihlIntrusive.m_list.head_;
00464ee9                      
00464eee                      if (head_ == 0)
00464ef5                          i = nullptr;
00464eee                      else
00464ef0                          i = &head_[-1];
00464ee7                  }
00464ee7                  
00464ef9                  class HashList<UIRegion *,UIRegion *,1>* var_f8_1 = &this_2->m_children;
00464efd                  class DLListData* dllist_next;
00464efd                  
00464efd                  for (; i != 0; i = &dllist_next[-1])
00464efd                  {
00464f00                      int32_t* ecx_2 = *(int32_t*)((char*)ADJ(i) + -8);
00464f00                      
00464f04                      if (ecx_2 != 0)
00464f09                          *(uint32_t*)(*(uint32_t*)ecx_2 + 0x9c)(edi);
00464f09                      
00464f0f                      dllist_next = ADJ(i)->dllist_next;
00464f0f                      
00464f14                      if (dllist_next == 0)
00464f14                          break;
00464efd                  }
00464efd                  
00464f1d                  this_1 = this_2;
00464ed2              }
00464ebf          }
00464ebf          else
00464ebf          {
00464ec1              class ElementDesc* ecx;
00464ec1              ecx = eax_1->m_bPassToChildren;
00464ec1              
00464ec6              if (ecx != 0)
00464ec6                  goto label_464ee3;
00464ebf          }
00464ebf          
00464f36          int32_t var_78 = 0x79c058;
00464f3d          int32_t var_74_1 = 0x797700;
00464f44          void var_70;
00464f44          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&var_70, 0);
00464f5c          int32_t var_74_2 = 0x797700;
00464f63          PropertyCollection::operator=(&var_78, &this_1->m_desc.m_properties);
00464f68          int32_t var_ec_1 = 0x797700;
00464f73          int32_t var_f0 = 0x79c058;
00464f77          void var_e8;
00464f77          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&var_e8, 0);
00464f81          int32_t var_ec_2 = 0x797700;
00464f85          PropertyCollection::operator=(&var_f0, &this_1->m_desc.m_properties);
00464f8a          class StateDesc* m_curStateDesc_1 = m_curStateDesc;
00464f8a          
00464f90          if (m_curStateDesc_1 != 0)
00464f9f              PropertyCollection::UpdateCollection(&var_78, &m_curStateDesc_1->m_properties, 1);
00464f9f          
00464faa          if (var_100 != 0)
00464fb6              PropertyCollection::UpdateCollection(&var_f0, &var_100->m_properties, 1);
00464fb6          
00464fcf          PropertyCollection::UpdateCollection(&var_78, &this_2->m_instanceProperties, 1);
00464fdb          PropertyCollection::UpdateCollection(&var_f0, &this_2->m_instanceProperties, 1);
00464fec          void __return;
00464fec          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_7 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&var_70, &__return);
00464ff1          class HashTableData<unsigned long,DBOCache *>* i_4 = eax_7->m_currElement;
00464ff6          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_7->m_currHashTable;
00464ff8          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_7->m_currBucket;
00464ffb          int32_t var_88;
00464ffb          int32_t var_80;
00464ffb          
00464ffb          if (i_4 != 0)
00464ffb          {
00465001              while (true)
00465001              {
00465001                  m_curStateDesc = nullptr;
00465005                  int32_t* var_104_1 = nullptr;
00465009                  uint32_t m_hashKey = i_4->m_hashKey;
00465020                  int32_t* eax_11 = *(uint32_t*)(var_88 + ((COMBINE(0, m_hashKey) % var_80) << 2));
00465020                  
00465024                  if (eax_11 == 0)
00465024                  {
0046503a                  label_46503a:
0046503a                      BaseProperty::SetPropertyName(&m_curStateDesc, m_hashKey);
00465043                      this_2->vtable->OnSetAttribute(&m_curStateDesc);
00465024                  }
00465024                  else
00465024                  {
00465028                      while (*(uint32_t*)eax_11 != m_hashKey)
00465028                      {
0046502e                          eax_11 = eax_11[1];
0046502e                          
00465033                          if (eax_11 == 0)
00465033                              goto label_46503a;
00465028                      }
00465028                      
004650fa                      if (eax_11 == 0)
004650fa                          goto label_46503a;
004650fa                      
00465108                      BaseProperty::operator=(&m_curStateDesc, &eax_11[2]);
00465108                      
0046511c                      if (BaseProperty::Compare(&m_curStateDesc, &i_4->m_data) == 0)
00465043                          this_2->vtable->OnSetAttribute(&m_curStateDesc);
00465024                  }
00465024                  
00465050                  class StateDesc* m_curStateDesc_2 = m_curStateDesc;
00465050                  
00465056                  if (m_curStateDesc_2 != 0)
00465056                  {
00465060                      uint32_t edx_6 = (m_curStateDesc_2->m_uiIncorporationFlags - 1);
0046505d                      m_curStateDesc_2->m_uiIncorporationFlags = edx_6;
0046505d                      
00465065                      if (edx_6 == 0)
00465067                          m_curStateDesc_2->vtable->__vecDelDtor(1);
00465067                      
0046506d                      m_curStateDesc = nullptr;
00465056                  }
00465056                  
00465077                  if (var_104_1 != 0)
00465077                  {
00465081                      int32_t edx_9 = (var_104_1[1] - 1);
0046507e                      var_104_1[1] = edx_9;
0046507e                      
00465086                      if (edx_9 == 0)
0046508c                          **(uint32_t**)var_104_1(1);
0046508c                      
0046508e                      int32_t var_104_2 = 0;
00465077                  }
00465077                  
00465092                  i_4 = i_4->m_hashNext;
00465092                  
00465097                  if (i_4 == 0)
00465097                  {
004650b1                      class HashTableData<unsigned long,DBOCache *>* i_1;
004650b1                      
004650b1                      do
004650b1                      {
004650a6                          m_currBucket = &m_currBucket[1];
004650a6                          
004650ab                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004650ab                              goto label_4650cb;
004650ab                          
004650ad                          i_1 = *(uint32_t*)m_currBucket;
004650b1                      } while (i_1 == 0);
004650b1                      
004650b3                      i_4 = i_1;
004650b3                      
004650b7                      if (i_4 == 0)
004650b7                          break;
00465097                  }
00465001              }
00464ffb          }
00464ffb          
004650cb      label_4650cb:
004650cb          int32_t ecx_18 = (var_88 + (var_80 << 2));
004650ce          int32_t* var_84;
004650ce          int32_t* eax_18 = var_84;
004650d7          int32_t* i_2;
004650d7          
004650d7          if (eax_18 == ecx_18)
004650d7          {
004650f2          label_4650f2:
004650f2              eax_18 = nullptr;
004650f4              i_2 = nullptr;
004650d7          }
004650d7          else
004650d7          {
004650e2              while (*(uint32_t*)eax_18 == 0)
004650e2              {
004650e4                  eax_18 = &eax_18[1];
004650e9                  int32_t* var_84_1 = eax_18;
004650e9                  
004650f0                  if (eax_18 == ecx_18)
004650f0                      goto label_4650f2;
004650e2              }
004650e2              
00465127              i_2 = *(uint32_t*)eax_18;
004650d7          }
004650d7          
0046512b          int32_t* edi_1 = eax_18;
0046512b          
0046512d          if (i_2 != 0)
0046512d          {
0046517d              do
0046517d              {
00465130              label_465130:
00465130                  int32_t j = *(uint32_t*)i_2;
00465147                  int32_t var_10;
00465147                  int32_t var_8;
00465147                  int32_t* eax_24 = *(uint32_t*)(var_10 + ((COMBINE(0, j) % var_8) << 2));
00465147                  
0046514b                  if (eax_24 == 0)
0046514b                  {
00465172                  label_465172:
0046516c                      this_2->vtable->OnSetAttribute(&i_2[2]);
0046514b                  }
0046514b                  else
0046514b                  {
00465152                      while (*(uint32_t*)eax_24 != j)
00465152                      {
00465154                          eax_24 = eax_24[1];
00465154                          
00465159                          if (eax_24 == 0)
00465159                              goto label_465172_1;
00465152                      }
00465152                      
00465166                      if ((eax_24 == 0 || eax_24 == 0xfffffff8))
00465166                      {
00465172                      label_465172_1:
0046516c                          this_2->vtable->OnSetAttribute(&i_2[2]);
00465166                      }
0046514b                  }
0046514b                  
00465178                  i_2 = i_2[1];
0046517d              } while (i_2 != 0);
0046517d              
00465190              while (true)
00465190              {
00465190                  edi_1 = &edi_1[1];
00465190                  
00465195                  if (edi_1 == (var_88 + (var_80 << 2)))
00465195                      break;
00465195                  
00465197                  int32_t* i_3 = *(uint32_t*)edi_1;
00465197                  
0046519b                  if (i_3 != 0)
0046519b                  {
0046519d                      i_2 = i_3;
0046519d                      
004651a1                      if (i_2 != 0)
004651a1                          goto label_465130;
004651a1                      
004651a1                      goto label_4651a7;
0046519b                  }
00465190              }
0046512d          }
0046512d          
004651a7      label_4651a7:
004651a9          class SmartArray<MediaDesc *,1>* eax_29;
004651a9          
004651a9          if (var_100 == 0)
004651b6              eax_29 = &this_2->m_desc.m_media;
004651a9          else
004651ab              eax_29 = &var_100->m_media;
004651ab          
004651c0          if (eax_29->m_num != 0)
004651cd              MediaMachine::Reset(&this_2->m_mediaMachine, eax_29);
004651cd          
004651d6          PropertyCollection::~PropertyCollection(&var_f0);
004651e2          PropertyCollection::~PropertyCollection(&var_78);
00464eab      }
00464eab      
004651e8      eax_1 = 1;
004651f1      return 1;
00464e70  }

004651f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00465200  void __thiscall UIElement::MatchElement(class UIElement* this, class UIElement const* arg2)

00465200  {
00465212      int32_t var_78 = 0x79c058;
0046521a      int32_t var_74 = 0x797700;
00465222      void var_70;
00465222      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&var_70, 0);
00465238      int32_t var_74_1 = 0x797700;
00465240      PropertyCollection::operator=(&var_78, &arg2->m_instanceProperties);
0046524e      void __return;
0046524e      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&var_70, &__return);
00465253      class HashTableData<unsigned long,DBOCache *>* i_4 = eax_2->m_currElement;
00465258      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
0046525a      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
0046525a      
0046525d      if (i_4 != 0)
0046525d      {
00465269          while (true)
00465269          {
00465260              this->vtable->SetProperty(&i_4->m_data);
0046526f              i_4 = i_4->m_hashNext;
0046526f              
00465274              if (i_4 == 0)
00465274              {
0046528b                  class HashTableData<unsigned long,DBOCache *>* i;
0046528b                  
0046528b                  do
0046528b                  {
00465280                      m_currBucket = &m_currBucket[1];
00465280                      
00465285                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00465285                          goto label_4652a7;
00465285                      
00465287                      i = *(uint32_t*)m_currBucket;
0046528b                  } while (i == 0);
0046528b                  
0046528d                  i_4 = i;
0046528d                  
00465291                  if (i_4 == 0)
00465291                      break;
00465274              }
00465269          }
0046525d      }
0046525d      
004652a7  label_4652a7:
004652a7      MediaMachine::Reset(&this->m_mediaMachine, &arg2->m_mediaMachine.m_array);
004652a7      
004652b4      if (this->m_mediaMachine.m_array.m_num == 0)
004652b4      {
004652b6          class Graphic* m_image = arg2->m_image;
004652b6          
004652be          if (m_image != 0)
004652be          {
004652c0              class RenderSurface* m_image_1 = m_image->m_image;
004652c0              
004652c5              if (m_image_1 != 0)
004652c5              {
004652c9                  UIRegion::ClearImage(this);
004652d0                  void* eax_7 = operator new(0xc);
004652da                  class Graphic* eax_8;
004652da                  
004652da                  if (eax_7 == 0)
004652e6                      eax_8 = nullptr;
004652da                  else
004652df                      eax_8 = Graphic::Graphic(eax_7, m_image_1);
004652df                  
004652eb                  UIRegion::SetImage(this, eax_8);
004652c5              }
004652be          }
004652b4      }
004652b4      
004652fc      void* __offset(DLListData, -0x8) i_1 = nullptr;
004652fc      
00465300      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00465300      {
00465302          class DLListData* head__1 = this->m_children.m_ihlIntrusive.m_list.head_;
00465302          
00465307          if (head__1 == 0)
0046530e              i_1 = nullptr;
00465307          else
00465309              i_1 = &head__1[-1];
00465300      }
00465300      
00465312      class HashList<UIRegion *,UIRegion *,1>* var_80 = &this->m_children;
00465316      class DLListData* dllist_next;
00465316      
00465316      for (; i_1 != 0; i_1 = &dllist_next[-1])
00465316      {
00465318          int32_t* esi = *(int32_t*)((char*)ADJ(i_1) + 8);
00465318          
0046531d          if (esi != 0)
0046531d          {
00465328              class UIElement* eax_10 = UIElement::GetChild(arg2, esi[0xb9]);
00465328              
0046532f              if (eax_10 == 0)
0046532f              {
0046533e                  class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046533e                  
00465346                  if (UIElementManager::s_pInstance_1 != 0)
00465349                      UIElementManager::AddElementToDeleteQueue(UIElementManager::s_pInstance_1, esi);
0046532f              }
0046532f              else
00465336                  *(uint32_t*)(*(uint32_t*)esi + 0xf0)(eax_10);
0046531d          }
0046531d          
0046534e          dllist_next = ADJ(i_1)->dllist_next;
0046534e          
00465353          if (dllist_next == 0)
00465353              break;
00465316      }
00465316      
0046535c      class UIElementManager* UIElementManager::s_pInstance_2 = UIElementManager::s_pInstance;
0046535c      
00465364      if (UIElementManager::s_pInstance_2 != 0)
00465364      {
0046537d          void* __offset(DLListData, -0x8) i_3 = nullptr;
0046537d          
00465381          if (arg2->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
00465381          {
00465383              class DLListData* head_ = arg2->m_children.m_ihlIntrusive.m_list.head_;
00465383              
00465388              if (head_ == 0)
0046538f                  i_3 = nullptr;
00465388              else
0046538a                  i_3 = &head_[-1];
00465381          }
00465381          
00465393          void* __offset(DLListData, -0x8) i_2 = i_3;
00465395          class HashList<UIRegion *,UIRegion *,1>* var_80_1 = &arg2->m_children;
00465395          
00465399          if (i_3 != 0)
00465399          {
004653ee              do
004653ee              {
004653a0                  void* esi_1 = *(int32_t*)((char*)ADJ(i_2) + 8);
004653a0                  
004653a5                  if ((esi_1 != 0 && UIElement::GetChild(this, *(uint32_t*)((char*)esi_1 + 0x2e4)) == 0))
004653a5                  {
004653b9                      class LayoutDesc* eax_13 = *(uint32_t*)((char*)esi_1 + 0x238);
004653b9                      
004653c1                      if (eax_13 != 0)
004653c1                      {
004653ce                          class UIElement* eax_14 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance_2, this, eax_13, ((char*)esi_1 + 0x23c));
004653ce                          
004653d5                          if (eax_14 != 0)
004653d7                              eax_14->vtable->MatchElement(esi_1);
004653c1                      }
004653a5                  }
004653a5                  
004653e2                  class DLListData* dllist_next_1 = ADJ(i_2)->dllist_next;
004653e2                  
004653e7                  if (dllist_next_1 == 0)
004653e7                      break;
004653e7                  
004653e9                  i_2 = &dllist_next_1[-1];
004653ee              } while (i_2 != 0);
00465399          }
00465399          
004653fd          this->vtable->SetState(arg2->m_state);
00465364      }
00465364      
0046540d      PropertyCollection::~PropertyCollection(&var_78);
00465200  }

0046539d                                                                                         8d 49 00                               .I.
0046541f                                                                                               90                                 .

00465420  uint8_t __thiscall HashList<UIRegion *,UIRegion *,1>::push_tail(class HashList<UIRegion *,UIRegion *,1>* this, class UIRegion** arg2, class UIRegion** arg3)

00465420  {
00465428      class UIRegion* ecx = *(uint32_t*)arg2;
00465428      
00465443      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((ecx << 0x18) | (ecx >> 8))) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
00465443      {
00465447          if (*(uint32_t*)i == ecx)
00465447          {
00465486              if (i != 0)
00465492                  return HashList<UIRegion *,UIRegion *,1>::move_to_tail(this, arg2);
00465492              
00465486              break;
00465447          }
00465443      }
00465443      
00465452      void* eax_4 = operator new(0x14);
0046545c      void* esi_1;
0046545c      
0046545c      if (eax_4 == 0)
00465495          esi_1 = nullptr;
0046545c      else
0046545c      {
00465464          *(uint32_t*)eax_4 = *(uint32_t*)arg2;
00465466          *(uint32_t*)((char*)eax_4 + 4) = 0;
0046546d          *(uint32_t*)((char*)eax_4 + 8) = 0;
00465474          *(uint32_t*)((char*)eax_4 + 0xc) = 0;
0046547d          *(uint32_t*)((char*)eax_4 + 0x10) = *(uint32_t*)arg3;
00465480          esi_1 = eax_4;
0046545c      }
0046545c      
004654a0      int32_t ebx;
004654a0      ebx = IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::push_tail(this, esi_1);
004654a0      
004654a8      if ((ebx == 0 && esi_1 != 0))
004654ab          operator delete(esi_1);
004654ab      
004654b8      return ebx;
00465420  }

004654bb                                                                                   90 90 90 90 90                             .....

004654c0  void* __thiscall UIElement::`scalar deleting destructor'(class UIElement* this, uint32_t arg2)

004654c0  {
004654c3      UIElement::~UIElement(this);
004654c3      
004654cd      if ((arg2 & 1) != 0)
004654d0          operator delete(this);
004654d0      
004654db      return this;
004654c0  }

004654de                                                                                            90 90                                ..

004654e0  void __thiscall UIElement::BringChildToTop(class UIElement* this, class UIElement* arg2)

004654e0  {
004654f2      arg2 = arg2;
004654f6      struct HashList<UIRegion *,UIRegion *,1>::HashListData* eax = IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::remove(&this->m_children, &arg2);
004654f6      
004654fd      if (eax != 0)
004654fd      {
00465500          operator delete(eax);
00465514          HashList<UIRegion *,UIRegion *,1>::push_tail(&this->m_children, &arg2, &arg2);
004654fd      }
004654e0  }

0046551d                                                                                         90 90 90                               ...

00465520  uint8_t __thiscall MediaMachine::Update_Pause(class MediaMachine* this, class MD_Data_Pause* arg2)

00465520  {
00465524      class MD_Data_Pause* esi = arg2;
00465524      
00465531      if ((esi == 0 || this->m_owner == 0))
00465531      {
0046559c          class UIElement* eax;
0046559c          eax = 0;
004655a2          return 0;
00465531      }
00465531      
00465533      Timer::compute_time();
00465538      long double x87_r0;
00465538      double var_8 = ((double)x87_r0);
0046553f      (((long double)esi->m_endTime) - ((long double)-1.0));
00465547      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00465547      
0046554a      if (!(p))
0046554a      {
0046554c          float m_maxDuration = esi->m_maxDuration;
0046554f          float m_minDuration = esi->m_minDuration;
00465554          arg2 = m_maxDuration;
0046555c          float m_minDuration_1 = m_minDuration;
0046556c          esi->m_endTime = ((double)(Random::RollDice(m_minDuration, m_maxDuration) + ((long double)var_8)));
0046554a      }
0046554a      
0046556f      long double x87_r0_4 = ((long double)var_8);
00465573      char ecx = 0;
00465575      long double temp2 = ((long double)esi->m_endTime);
00465575      (x87_r0_4 - temp2);
00465575      
0046557d      if ((*(uint8_t*)((char*)((((x87_r0_4 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_4, temp2))) ? 1 : 0) << 0xa) | ((((x87_r0_4 == temp2) ? 1 : 0) << 0xe) | 0x800)))))[1] & 1) == 0)
0046557d      {
0046558b          esi->m_endTime = 0f;
0046558e          *(uint32_t*)((char*)esi->m_endTime)[4] = 0xbff00000;
00465591          ecx = 1;
0046557d      }
0046557d      
00465593      int16_t eax_1;
00465593      eax_1 = ecx;
00465599      return eax_1;
00465520  }

004655a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004655b0  uint8_t __thiscall MediaMachine::Update_Jump(class MediaMachine* this, class MD_Data_Jump* arg2)

004655b0  {
004655b2      class MD_Data_Jump* edi = arg2;
004655b2      
004655c1      if ((edi == 0 || this->m_owner == 0))
004655c1      {
004655f6          class UIElement* eax;
004655f6          eax = 0;
004655f9          return 0;
004655c1      }
004655c1      
004655cd      arg2 = edi->m_probability;
004655d1      int32_t eax_2;
004655d1      long double st0;
004655d1      eax_2 = Random::RollDice(0f, 1f);
004655d6      long double temp1 = ((long double)arg2);
004655d6      (st0 - temp1);
004655dd      eax_2 = ((((st0 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp1))) ? 1 : 0) << 0xa) | ((((st0 == temp1) ? 1 : 0) << 0xe) | 0))));
004655df      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
004655df      
004655e2      if (!(p))
004655e8          this->m_curIndex = (edi->m_jumpItemIndex - 1);
004655e8      
004655ef      eax_2 = 1;
004655f2      return 1;
004655b0  }

004655fc                                                                                      90 90 90 90                              ....

00465600  uint8_t __thiscall MediaMachine::Update_Message(class MediaMachine* this, class MD_Data_Message* arg2)

00465600  {
00465602      class MD_Data_Message* edi = arg2;
0046560a      class UIElement* m_owner;
0046560a      
0046560a      if (edi != 0)
0046560a      {
0046560c          m_owner = this->m_owner;
0046560c          
0046561e          if ((m_owner != 0 && ((m_owner->__inner23 >> 0x11) & 1) != 0))
0046561e          {
0046562a              arg2 = edi->m_probability;
0046562e              int32_t eax_1;
0046562e              long double st0;
0046562e              eax_1 = Random::RollDice(0f, 1f);
00465633              long double temp1 = ((long double)arg2);
00465633              (st0 - temp1);
0046563a              eax_1 = ((((st0 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp1))) ? 1 : 0) << 0xa) | ((((st0 == temp1) ? 1 : 0) << 0xe) | 0))));
0046563c              bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0046563c              
0046563f              if (!(p))
0046564c                  UIElement::BroadcastElementMessage(this->m_owner, edi->m_messageID, 0, 0);
0046564c              
00465652              eax_1 = 1;
00465655              return 1;
0046561e          }
0046560a      }
0046560a      
00465659      m_owner = 0;
0046565c      return 0;
00465600  }

0046565f                                                                                               90                                 .

00465660  uint8_t __thiscall MediaMachine::Update_State(class MediaMachine* this, class MD_Data_State* arg2)

00465660  {
00465662      class MD_Data_State* edi = arg2;
00465671      class UIElement* eax;
00465671      
00465671      if ((edi != 0 && this->m_owner != 0))
00465671      {
0046567d          arg2 = edi->m_probability;
00465681          long double st0_1;
00465681          eax = Random::RollDice(0f, 1f);
00465686          long double temp1_1 = ((long double)arg2);
00465686          (st0_1 - temp1_1);
0046568d          eax = ((((st0_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0046568f          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0046568f          
00465692          if (!(p_1))
00465694              this->m_owner->vtable->SetState(edi->m_stateID);
00465671      }
00465671      
004656a4      eax = 0;
004656a7      return 0;
00465660  }

004656aa                                90 90 90 90 90 90                                                            ......

004656b0  uint8_t __thiscall MediaMachine::Update_Movie(class MediaMachine* this, class MD_Data_Movie* arg2)

004656b0  {
004656b8      class MediaMachine* m_owner;
004656b8      
004656b8      if (arg2 != 0)
004656b8      {
004656ba          m_owner = this->m_owner;
004656ba          
004656cd          if ((m_owner != 0 && (((int8_t)(*(int32_t*)((char*)m_owner + 0x554) >> 0x11)) & 1) != 0))
004656d3              /* tailcall */
004656d3              return MD_Data_Movie::Update(arg2, m_owner);
004656b8      }
004656b8      
004656d8      m_owner = 0;
004656da      return 0;
004656b0  }

004656dd                                                                                         90 90 90                               ...

004656e0  uint8_t __thiscall MediaMachine::Update_Anim(class MediaMachine* this, class MD_Data_Anim* arg2)

004656e0  {
004656e5      class MD_Data_Anim* esi = arg2;
004656e5      
004656f8      if ((esi == 0 || this->m_owner == 0))
004656f8      {
0046581e          class UIElement* eax;
0046581e          eax = 0;
00465824          return 0;
004656f8      }
004656f8      
004656fe      Timer::compute_time();
00465703      long double x87_r0;
00465703      double var_8 = ((double)x87_r0);
00465707      long double x87_r7 = ((long double)esi->m_StartTime);
0046570a      long double temp1 = ((long double)-1.0);
0046570a      (x87_r7 - temp1);
00465710      int32_t eax_1;
00465710      eax_1 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00465712      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00465715      long double x87_r1;
00465715      
00465715      if (p)
00465723          x87_r1 = x87_r0;
00465715      else
00465715      {
00465717          esi->m_StartTime = ((double)x87_r0);
0046571a          esi->m_displayedFrameNum = 0xffffffff;
00465715      }
00465715      
00465725      esi->vtable->GetDuration();
0046572e      long double x87_r0_2 = fabsl(x87_r1);
00465730      long double temp2 = ((long double)0.000199999995f);
00465730      (x87_r0_2 - temp2);
00465736      int32_t eax_3;
00465736      eax_3 = ((((x87_r0_2 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_2, temp2))) ? 1 : 0) << 0xa) | ((((x87_r0_2 == temp2) ? 1 : 0) << 0xe) | 0x800))));
00465738      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0046573b      long double x87_r1_1;
0046573b      
0046573b      if (p_1)
0046573b      {
0046574b          long double x87_r0_4 = (((long double)var_8) - ((long double)esi->m_StartTime));
0046574e          x87_r1_1 = (x87_r0_4 / x87_r0_4);
0046573b      }
0046573b      else
0046573f          x87_r1_1 = ((long double)0f);
0046573f      
00465750      arg2 = ((float)x87_r1_1);
00465754      var_8 = 0;
0046575c      (x87_r1_1 - ((long double)0f));
00465764      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00465767      double* eax_4 = &var_8;
00465767      
0046576b      if (p_2)
0046576d          eax_4 = &arg2;
0046576d      
00465779      arg2 = *(uint32_t*)eax_4;
0046577d      (((long double)1f) - ((long double)arg2));
00465781      var_8 = 0x3f800000;
0046578b      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0046578e      double* eax_5 = &var_8;
0046578e      
00465792      if (p_3)
00465794          eax_5 = &arg2;
00465794      
0046579a      uint32_t m_num = esi->m_frames.m_num;
0046579f      arg2 = *(uint32_t*)eax_5;
004657a3      class MD_Data_Anim* ecx_1;
004657a3      
004657a3      if (m_num != 0)
004657a3      {
004657a8          var_8 = (m_num - 1);
004657c3          m_num = _ftol2();
004657c8          int32_t m_num_1 = m_num;
004657c8          
004657cd          if (m_num_1 != esi->m_displayedFrameNum)
004657cd          {
004657dd              m_num = UIRegion::SetImageByDID(this->m_owner, esi->m_frames.m_data[m_num_1].id, esi->m_drawMode);
004657e2              esi->m_displayedFrameNum = m_num_1;
004657cd          }
004657a3      }
004657a3      
004657e6      long double x87_r1_6 = ((long double)arg2);
004657ea      ecx_1 = 0;
004657ec      long double temp5 = ((long double)1f);
004657ec      (x87_r1_6 - temp5);
004657f2      m_num = ((((x87_r1_6 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_6, temp5))) ? 1 : 0) << 0xa) | ((((x87_r1_6 == temp5) ? 1 : 0) << 0xe) | 0x1000))));
004657f4      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
004657f4      
004657f7      if (!(p_4))
004657f7      {
00465804          *(uint32_t*)((char*)esi->m_StartTime)[4] = 0xbff00000;
00465807          esi->m_StartTime = 0f;
0046580a          esi->m_displayedFrameNum = 0xffffffff;
00465811          ecx_1 = 1;
004657f7      }
004657f7      
00465814      m_num = ecx_1;
0046581a      return m_num;
004656e0  }

00465827                       90 90 90 90 90 90 90 90 90                                                         .........

00465830  uint8_t __thiscall MediaMachine::Update_Alpha(class MediaMachine* this, class MD_Data_Alpha* arg2)

00465830  {
00465836      if (arg2 != 0)
00465836      {
00465838          class UIElement* m_owner = this->m_owner;
00465838          
0046583d          if (m_owner != 0)
0046583d          {
0046583f              uint32_t id = arg2->m_file.id;
0046583f              
00465848              if (id != INVALID_DID.id)
00465848              {
0046584b                  UIRegion::SetAlphaImageByDID(m_owner, id);
00465850                  int32_t eax;
00465850                  eax = 1;
00465852                  return 1;
00465848              }
00465848              
00465855              UIRegion::ClearAlphaImage(m_owner);
0046585a              int32_t eax_1;
0046585a              eax_1 = 1;
0046585c              return 1;
0046583d          }
00465836      }
00465836      
0046585f      class MD_Data_Alpha* eax_2;
0046585f      eax_2 = 0;
00465861      return 0;
00465830  }

00465864              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00465870  uint8_t __thiscall MediaMachine::Update_Image(class MediaMachine* this, class MD_Data_Image* arg2)

00465870  {
00465876      if (arg2 != 0)
00465876      {
00465878          class UIElement* m_owner = this->m_owner;
00465878          
0046587d          if (m_owner != 0)
0046587d          {
0046587f              uint32_t id = arg2->m_file.id;
0046587f              
00465888              if (id == INVALID_DID.id)
00465888              {
0046588a                  UIRegion::ClearImage(m_owner);
0046588f                  int32_t eax_1;
0046588f                  eax_1 = 1;
00465891                  return 1;
00465888              }
00465888              
00465899              UIRegion::SetImageByDID(m_owner, id, arg2->m_drawMode);
0046589e              int32_t eax_2;
0046589e              eax_2 = 1;
004658a0              return 1;
0046587d          }
00465876      }
00465876      
004658a3      int32_t eax;
004658a3      eax = 0;
004658a5      return 0;
00465870  }

004658a8                          90 90 90 90 90 90 90 90                                                          ........

004658b0  uint8_t __thiscall MediaMachine::Update_Sound(class MediaMachine* this, class MD_Data_Sound* arg2)

004658b0  {
004658c1      if ((arg2 == 0 || this->m_owner == 0))
004658c1      {
0046591a          class UIElement* eax;
0046591a          eax = 0;
00465920          return 0;
004658c1      }
004658c1      
004658c3      enum SoundType m_stype = arg2->m_stype;
004658c3      
004658c8      if (m_stype == Sound_Invalid)
004658c8      {
004658fc          float id = arg2->m_file.id;
004658fc          
00465901          if (id != 0)
00465901          {
00465903              int32_t var_10_3 = 0x3f800000;
00465909              SoundManager::PlaySoundFromCenter(m_stype, id);
00465901          }
004658c8      }
004658c8      else
004658c8      {
004658da          void var_8;
004658da          m_stype = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2->m_file.id, 0x22));
004658da          
004658e4          if (m_stype != Sound_Invalid)
004658e4          {
004658eb              int32_t eax_4;
004658eb              int80_t st0;
004658eb              eax_4 = SoundManager::PlaySoundFromCenter(arg2->m_stype, m_stype);
004658f3              eax_4 = 1;
004658f9              return 1;
004658e4          }
004658c8      }
004658c8      
00465911      m_stype = 1;
00465917      return 1;
004658b0  }

00465923           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00465930  uint8_t __thiscall MediaMachine::Update_Fade(class MediaMachine* this, class MD_Data_Fade* arg2)

00465930  {
00465935      class MD_Data_Fade* edi = arg2;
00465935      
00465948      if ((edi == 0 || this->m_owner == 0))
00465948      {
00465a75          class UIElement* eax;
00465a75          eax = 0;
00465a7b          return 0;
00465948      }
00465948      
0046594e      Timer::compute_time();
00465953      long double x87_r0;
00465953      double var_8 = ((double)x87_r0);
00465957      class UIElement* m_owner = this->m_owner;
0046595a      class UIObject* m_object = m_owner->m_object;
00465962      class UIRegion* m_parent;
00465962      class UIRegion* esi_1;
00465962      
00465962      if (m_object == 0)
00465962      {
00465968          m_parent = m_owner->m_parent;
00465968          
00465970          if (m_parent != 0)
00465970          {
00465974              m_parent = UIRegion::GetObjectA(m_parent);
00465974              goto label_465979;
00465970          }
00465970          
00465988          esi_1 = nullptr;
00465962      }
00465962      else
00465962      {
00465964          m_parent = m_object;
00465979      label_465979:
00465979          
0046597b          if (m_parent == 0)
00465988              esi_1 = nullptr;
0046597b          else
00465984              esi_1 = m_parent->vtable->SetShouldBlockClicks();
00465962      }
00465962      
0046598a      long double x87_r0_1 = ((long double)edi->m_startTime);
0046598d      long double temp1 = ((long double)-1.0);
0046598d      (x87_r0_1 - temp1);
00465993      m_parent = ((((x87_r0_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r0_1 == temp1) ? 1 : 0) << 0xe) | 0x800))));
00465995      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00465995      
00465998      if (!(p))
00465998      {
004659a2          edi->m_startTime = var_8;
004659a5          *(uint32_t*)((char*)edi->m_startTime)[4] = *(uint32_t*)((char*)var_8)[4];
00465998      }
00465998      
004659a8      edi->vtable->GetDuration();
004659b1      long double x87_r1;
004659b1      long double x87_r0_3 = fabsl(x87_r1);
004659b3      long double temp2 = ((long double)0.000199999995f);
004659b3      (x87_r0_3 - temp2);
004659b9      int32_t eax_2;
004659b9      eax_2 = ((((x87_r0_3 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_3, temp2))) ? 1 : 0) << 0xa) | ((((x87_r0_3 == temp2) ? 1 : 0) << 0xe) | 0x800))));
004659bb      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
004659be      long double x87_r1_1;
004659be      
004659be      if (p_1)
004659be      {
004659ce          long double x87_r0_5 = (((long double)var_8) - ((long double)edi->m_startTime));
004659d1          x87_r1_1 = (x87_r0_5 / x87_r0_5);
004659be      }
004659be      else
004659c2          x87_r1_1 = ((long double)1f);
004659c2      
004659d3      arg2 = ((float)x87_r1_1);
004659d7      var_8 = 0;
004659df      (x87_r1_1 - ((long double)0f));
004659e7      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
004659ea      double* eax_3 = &var_8;
004659ea      
004659ee      if (p_2)
004659f0          eax_3 = &arg2;
004659f0      
004659fc      arg2 = *(uint32_t*)eax_3;
00465a00      (((long double)1f) - ((long double)arg2));
00465a04      var_8 = 0x3f800000;
00465a0e      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00465a11      double* eax_5 = &var_8;
00465a11      
00465a15      if (p_3)
00465a17          eax_5 = &arg2;
00465a17      
00465a1d      long double x87_r1_3 = ((long double)edi->m_startAlpha);
00465a20      class MD_Data_Fade* ecx_4 = *(uint32_t*)eax_5;
00465a22      arg2 = ecx_4;
00465a22      
00465a26      if (esi_1 != 0)
00465a26      {
00465a2f          class MD_Data_Fade* var_14_1 = ecx_4;
00465a3d          eax_5 = *(int32_t*)((char*)esi_1->vtable + 0x48)(((float)(((((long double)edi->m_endAlpha) - x87_r1_3) * ((long double)arg2)) + x87_r1_3)));
00465a26      }
00465a26      
00465a44      long double x87_r1_4 = ((long double)arg2);
00465a48      ecx_4 = 0;
00465a4a      long double temp5 = ((long double)1f);
00465a4a      (x87_r1_4 - temp5);
00465a50      eax_5 = ((((x87_r1_4 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_4, temp5))) ? 1 : 0) << 0xa) | ((((x87_r1_4 == temp5) ? 1 : 0) << 0xe) | 0x1000))));
00465a52      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
00465a52      
00465a55      if (!(p_4))
00465a55      {
00465a62          *(uint32_t*)((char*)edi->m_startTime)[4] = 0xbff00000;
00465a65          edi->m_startTime = 0f;
00465a68          ecx_4 = 1;
00465a55      }
00465a55      
00465a6b      eax_5 = ecx_4;
00465a71      return eax_5;
00465930  }

00465a7e                                                                                            90 90                                ..

00465a80  uint8_t __thiscall MediaMachine::Update_Cursor(class MediaMachine* this, class MD_Data_Cursor* arg2)

00465a80  {
00465a86      if (arg2 != 0)
00465a86      {
00465a88          class UIElement* m_owner = this->m_owner;
00465a88          
00465a8d          if (m_owner != 0)
00465a8d          {
00465a8f              uint32_t id = arg2->m_file.id;
00465a8f              
00465a99              if (id != INVALID_DID.id)
00465a99              {
00465aa4                  UIElement::SetCursor(m_owner, id, arg2->m_xHotspot, arg2->m_yHotspot);
00465aa9                  int32_t eax_1;
00465aa9                  eax_1 = 1;
00465aac                  return 1;
00465a99              }
00465a99              
00465aaf              UIElement::UnSetCursor(m_owner);
00465ab4              int32_t eax_2;
00465ab4              eax_2 = 1;
00465ab7              return 1;
00465a8d          }
00465a86      }
00465a86      
00465aba      class MD_Data_Cursor* eax_3;
00465aba      eax_3 = 0;
00465abc      return 0;
00465a80  }

00465abf                                                                                               90                                 .

00465ac0  void __fastcall MediaMachine::MediaMachine(class MediaMachine* this)

00465ac0  {
00465ac3      UIListener::UIListener(this);
00465aca      this->m_owner = nullptr;
00465acd      this->vtable = &MediaMachine::`vftable';
00465ad3      this->m_array.m_data = 0;
00465ad9      this->m_array.m_sizeAndDeallocate = 0;
00465adf      this->m_array.m_num = 0;
00465ae5      this->m_curIndex = 0;
00465ac0  }

00465aef                                               90                                                                 .

00465af0  void __fastcall MediaMachine::Cleanup(class MediaMachine* this)

00465af0  {
00465afa      int32_t i = 0;
00465afa      
00465afe      if (this->m_array.m_num > 0)
00465afe      {
00465b1c          do
00465b1c          {
00465b06              int32_t* ecx = this->m_array.m_data[i];
00465b06              
00465b0b              if (ecx != 0)
00465b11                  **(uint32_t**)ecx(1);
00465b11              
00465b19              i += 1;
00465b1c          } while (i < this->m_array.m_num);
00465afe      }
00465afe      
00465b1e      uint32_t m_sizeAndDeallocate = this->m_array.m_sizeAndDeallocate;
00465b32      this->m_array.m_num = 0;
00465b32      
00465b3c      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00465b3c      {
00465b45          operator delete[](this->m_array.m_data);
00465b4e          this->m_array.m_data = 0;
00465b58          this->m_array.m_sizeAndDeallocate = 0;
00465b63          return;
00465b3c      }
00465b3c      
00465b6c      if (this->m_array.m_data != 0)
00465b6c      {
00465b6e          int32_t eax_3 = (m_sizeAndDeallocate & 0x7fffffff);
00465b73          int32_t eax_4 = (eax_3 - 1);
00465b73          
00465b74          if ((eax_3 - 1) >= 0)
00465b74          {
00465b8f              int32_t temp1_1;
00465b8f              
00465b8f              do
00465b8f              {
00465b80                  temp1_1 = eax_4;
00465b80                  eax_4 -= 1;
00465b81                  this->m_array.m_data[(eax_4 + 1)] = 0;
00465b8f              } while ((temp1_1 - 1) >= 0);
00465b74          }
00465b6c      }
00465af0  }

00465b78                                                                          8d a4 24 00 00 00 00 90                          ..$.....
00465b94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00465ba0  void __fastcall MediaMachine::Update(class MediaMachine* this)

00465ba0  {
00465ba5      UIListener::UnRegisterForGlobalMessage(this, 3);
00465ba5      
00465bb6      if (this->m_curIndex < this->m_array.m_num)
00465bb6      {
00465bcc          while (true)
00465bcc          {
00465bcc              int32_t* ecx_1 = this->m_array.m_data[this->m_curIndex];
00465bcc              
00465bd1              if (ecx_1 != 0)
00465bd1              {
00465bda                  int32_t eax_2 = (ecx_1[1] - 1);
00465bda                  
00465bde                  if (eax_2 <= 0xa)
00465bde                  {
00465be4                      uint8_t eax_5;
00465be4                      
00465be4                      switch (eax_2)
00465be4                      {
00465c80                          case 0:
00465c80                          {
00465c80                              eax_5 = MediaMachine::Update_Movie(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x50)());
00465c80                              break;
00465c80                          }
00465c05                          case 1:
00465c05                          {
00465c05                              eax_5 = MediaMachine::Update_Alpha(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x20)());
00465c05                              break;
00465c05                          }
00465bf3                          case 2:
00465bf3                          {
00465bf3                              eax_5 = MediaMachine::Update_Anim(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x10)());
00465bf3                              break;
00465bf3                          }
00465c8f                          case 3:
00465c8f                          {
00465c8f                              eax_5 = MediaMachine::Update_Cursor(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x58)());
00465c8f                              break;
00465c8f                          }
00465c26                          case 4:
00465c26                          {
00465c26                              eax_5 = MediaMachine::Update_Image(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x18)());
00465c26                              break;
00465c26                          }
00465c44                          case 5:
00465c44                          {
00465c44                              eax_5 = MediaMachine::Update_Jump(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x30)());
00465c44                              break;
00465c44                          }
00465c62                          case 6:
00465c62                          {
00465c62                              eax_5 = MediaMachine::Update_Message(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x38)());
00465c62                              break;
00465c62                          }
00465c17                          case 7:
00465c17                          {
00465c17                              eax_5 = MediaMachine::Update_Pause(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x28)());
00465c17                              break;
00465c17                          }
00465c35                          case 8:
00465c35                          {
00465c35                              eax_5 = MediaMachine::Update_Sound(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x40)());
00465c35                              break;
00465c35                          }
00465c71                          case 9:
00465c71                          {
00465c71                              eax_5 = MediaMachine::Update_State(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x48)());
00465c71                              break;
00465c71                          }
00465c53                          case 0xa:
00465c53                          {
00465c53                              eax_5 = MediaMachine::Update_Fade(this, *(uint32_t*)(*(uint32_t*)ecx_1 + 0x60)());
00465c53                              break;
00465c53                          }
00465be4                      }
00465be4                      
00465c96                      if (eax_5 == 0)
00465c96                          break;
00465bde                  }
00465bd1              }
00465bd1              
00465c9e              uint32_t ecx_14 = (this->m_curIndex + 1);
00465c9f              this->m_curIndex = ecx_14;
00465c9f              
00465cab              if (ecx_14 >= this->m_array.m_num)
00465cb2                  return;
00465bcc          }
00465bcc          
00465cb7          UIListener::RegisterForGlobalMessage(this, 3);
00465bb6      }
00465ba0  }

00465cbe                                                                                            8b ff                                ..
00465cc0  uint32_t jump_table_465cc0[0xb] = 
00465cc0  {
00465cc0      [0x0] =  0x00465c78
00465cc4      [0x1] =  0x00465bfd
00465cc8      [0x2] =  0x00465beb
00465ccc      [0x3] =  0x00465c87
00465cd0      [0x4] =  0x00465c1e
00465cd4      [0x5] =  0x00465c3c
00465cd8      [0x6] =  0x00465c5a
00465cdc      [0x7] =  0x00465c0f
00465ce0      [0x8] =  0x00465c2d
00465ce4      [0x9] =  0x00465c69
00465ce8      [0xa] =  0x00465c4b
00465cec  }

00465cec                                      90 90 90 90                                                              ....

00465cf0  void __thiscall MediaMachine::ListenToGlobalMessage(class MediaMachine* this, uint32_t arg2, int32_t arg3)

00465cf0  {
00465cf5      if (arg2 == 3)
00465cf7          MediaMachine::Update(this);
00465cf0  }

00465cff                                                                                               90                                 .

00465d00  void __fastcall MediaMachine::~MediaMachine(class MediaMachine* this)

00465d00  {
00465d03      this->vtable = &MediaMachine::`vftable';
00465d09      MediaMachine::Cleanup(this);
00465d09      
00465d1e      if ((this->m_array.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00465d27          operator delete[](this->m_array.m_data);
00465d27      
00465d32      /* tailcall */
00465d32      return UIListener::~UIListener(this);
00465d00  }

00465d37                                                                       90 90 90 90 90 90 90 90 90                         .........

00465d40  void* __thiscall MediaMachine::`scalar deleting destructor'(class MediaMachine* this, uint32_t arg2)

00465d40  {
00465d43      this->vtable = &MediaMachine::`vftable';
00465d49      MediaMachine::Cleanup(this);
00465d49      
00465d5e      if ((this->m_array.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00465d67          operator delete[](this->m_array.m_data);
00465d67      
00465d71      UIListener::~UIListener(this);
00465d71      
00465d7b      if ((arg2 & 1) != 0)
00465d7e          operator delete(this);
00465d7e      
00465d89      return this;
00465d40  }

00465d8c                                      90 90 90 90                                                              ....

00465d90  void __thiscall MediaMachine::Reset(class MediaMachine* this, class SmartArray<MediaDesc *,1> const* arg2)

00465d90  {
00465d94      MediaMachine::Cleanup(this);
00465d99      class SmartArray<MediaDesc *,1>* eax = arg2;
00465da0      int32_t i = 0;
00465da0      
00465da4      if (eax->m_num > 0)
00465da4      {
00465e05          do
00465e05          {
00465daa              class MediaDesc* eax_2 = eax->m_data[i];
00465daa              
00465daf              if (eax_2 != 0)
00465daf              {
00465db2                  class MediaDesc* eax_3 = MediaDesc::CreateMediaType(eax_2);
00465db2                  
00465dbe                  if (eax_3 != 0)
00465dbe                  {
00465dd2                      int32_t eax_5 = (this->m_array.m_sizeAndDeallocate & 0x7fffffff);
00465dd9                      uint8_t eax_8;
00465dd9                      
00465dd9                      if (this->m_array.m_num >= eax_5)
00465de7                          eax_8 = SmartArray<unsigned long,1>::grow(&this->m_array, SmartArray<unsigned long,1>::get_new_size(&this->m_array, (eax_5 + 1)));
00465de7                      
00465dee                      if ((this->m_array.m_num < eax_5 || eax_8 != 0))
00465dee                      {
00465dcc                          this->m_array.m_data[this->m_array.m_num] = eax_3;
00465dcc                          this->m_array.m_num += 1;
00465dee                      }
00465dbe                  }
00465daf              }
00465daf              
00465dfb              eax = arg2;
00465e02              i += 1;
00465e05          } while (i < eax->m_num);
00465da4      }
00465da4      
00465e0b      this->m_curIndex = 0;
00465e15      MediaMachine::Update(this);
00465d90  }

00465e1f                                                                                               90                                 .

00465e20  void __thiscall UIListener::RegisterForElementMessage(class UIListener* this, uint32_t arg2, uint32_t arg3)

00465e20  {
00465e20      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00465e20      
00465e27      if (UIElementManager::s_pInstance_1 != 0)
00465e36          UIElementManager::RegisterForElementMessage(UIElementManager::s_pInstance_1, this, arg2, arg3);
00465e20  }

00465e3e                                                                                            90 90                                ..

00465e40  void __thiscall UIListener::UnRegisterForElementMessage(class UIListener* this, uint32_t arg2, uint32_t arg3)

00465e40  {
00465e40      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00465e40      
00465e47      if (UIElementManager::s_pInstance_1 != 0)
00465e56          UIElementManager::UnRegisterForElementMessage(UIElementManager::s_pInstance_1, this, arg2, arg3);
00465e40  }

00465e5e                                                                                            90 90                                ..

00465e60  void __thiscall UIListener::RegisterForGlobalMessage(class UIListener* this, uint32_t arg2)

00465e60  {
00465e60      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00465e60      
00465e67      if (UIElementManager::s_pInstance_1 != 0)
00465e71          UIElementManager::RegisterForGlobalMessage(UIElementManager::s_pInstance_1, this, arg2);
00465e60  }

00465e79                                                                             90 90 90 90 90 90 90                           .......

00465e80  void __thiscall UIListener::UnRegisterForGlobalMessage(class UIListener* this, uint32_t arg2)

00465e80  {
00465e80      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00465e80      
00465e87      if (UIElementManager::s_pInstance_1 != 0)
00465e91          UIElementManager::UnRegisterForGlobalMessage(UIElementManager::s_pInstance_1, this, arg2);
00465e80  }

00465e99                                                                             90 90 90 90 90 90 90                           .......

00465ea0  void* __thiscall IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>* this, uint32_t arg2)

00465ea0  {
00465ea3      class HashSetData<UIElement *>** m_buckets = this->m_buckets;
00465eab      this->vtable = 0x79c0d4;
00465eab      
00465eb1      if (m_buckets != &this->m_aInplaceBuckets)
00465eb4          operator delete[](m_buckets);
00465eb4      
00465ebe      this->m_buckets = nullptr;
00465ec1      this->m_firstInterestingBucket = nullptr;
00465ec4      this->m_numBuckets = 0;
00465ec7      this->m_numElements = 0;
00465ec7      
00465ecf      if ((arg2 & 1) != 0)
00465ed2          operator delete(this);
00465ed2      
00465edd      return this;
00465ea0  }


00465ee0  uint8_t __fastcall IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::grow(class IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>* this)

00465ee0  {
00465ee0      class IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>* m_numBuckets = this;
00465ee2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00465eee      m_numBuckets = this->m_numBuckets;
00465f05      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00465f05      
00465f0f      if (eax_2 != bucketSizesEnd_1)
00465f18          eax_2 = &eax_2[1];
00465f0f      else
00465f0f      {
00465f11          eax_2 -= 4;
00465f11          
00465f16          if (eax_2 != bucketSizesEnd_1)
00465f18              eax_2 = &eax_2[1];
00465f0f      }
00465f0f      
00465f28      return IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00465ee0  }

00465f29                             90 90 90 90 90 90 90                                                           .......

00465f30  void __thiscall IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>(class IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>* this, uint32_t arg2)

00465f30  {
00465f3b      arg2 = arg2;
00465f3f      uint8_t edx = ((int8_t)arg2);
00465f43      this->m_buckets = nullptr;
00465f46      this->m_firstInterestingBucket = nullptr;
00465f49      this->m_numBuckets = 0;
00465f4c      this->m_numElements = 0;
00465f50      this->vtable = 0x79c0d4;
00465f56      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00465f69      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00465f69      
00465f73      if (eax == bucketSizesEnd_1)
00465f75          eax -= 4;
00465f75      
00465f78      uint32_t eax_1 = *(uint32_t*)eax;
00465f7d      this->m_numBuckets = eax_1;
00465f7d      
00465f80      if (eax_1 > 0x17)
00465f96          this->m_buckets = operator new[]((eax_1 << 2));
00465f80      else
00465f85          this->m_buckets = &this->m_aInplaceBuckets;
00465f85      
00465f9c      class HashSetData<UIElement *>** m_buckets = this->m_buckets;
00465f9f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00465fa5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00465fb6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00465f30  }

00465fbf                                                                                               90                                 .

00465fc0  uint8_t __thiscall IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::resize_internal(class IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>* this, uint32_t arg2)

00465fc0  {
00465fc1      uint32_t ebp = arg2;
00465fc1      
00465fcb      if (ebp == this->m_numBuckets)
00465fcb      {
00465fce          int32_t eax;
00465fce          eax = 0;
00465fd1          return 0;
00465fcb      }
00465fcb      
00465fd9      int32_t* i_1 = nullptr;
00465fd9      
00465fdd      while (this->m_numElements != 0)
00465fdd      {
00465fe6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00465fec          int32_t* i_2;
00465fec          int32_t* m_firstInterestingBucket_2;
00465fec          
00465fec          if (this->m_firstInterestingBucket == ecx_1)
00465fec          {
00466002          label_466002:
00466002              m_firstInterestingBucket_2 = nullptr;
00466004              i_2 = nullptr;
00465fec          }
00465fec          else
00465fec          {
00465ff0              while (true)
00465ff0              {
00465ff0                  class HashSetData<UIElement *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00465ff0                  
00465ff6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00465ff6                  {
00466008                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0046600b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0046600d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0046600d                      break;
00465ff6                  }
00465ff6                  
00465ffd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00465ffd                  
00466000                  if (&m_firstInterestingBucket[1] == ecx_1)
00466000                      goto label_466002;
00465ff0              }
00465fec          }
00465fec          
0046600f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0046600f          
00466013          if (eax_4 == i_2)
00466025              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00466013          else
00466013          {
0046601c              void* edx_1;
0046601c              
0046601c              do
0046601c              {
00466015                  edx_1 = eax_4;
00466017                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0046601c              } while (eax_4 != i_2);
0046601c              
00466020              if (edx_1 != 0)
0046602c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
00466020              else
00466025                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00466013          }
00466013          
0046602f          this->m_numElements -= 1;
00466032          i_2[1] = i_1;
0046603a          i_1 = i_2;
00465fdd      }
00465fdd      
0046603e      class HashSetData<UIElement *>** m_buckets = this->m_buckets;
0046603e      
00466046      if (m_buckets != &this->m_aInplaceBuckets)
00466049          operator delete[](m_buckets);
00466049      
00466056      this->m_buckets = nullptr;
00466059      this->m_firstInterestingBucket = nullptr;
0046605c      this->m_numBuckets = 0;
0046605f      this->m_numElements = 0;
00466062      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00466069      void* eax_7;
00466069      
00466069      if (i_1 != 0)
00466069      {
004660eb          int32_t* i;
004660eb          
004660eb          do
004660eb          {
00466070              uint32_t m_numBuckets = this->m_numBuckets;
00466076              i = i_1[1];
00466076              
0046607f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0046607f              {
00466081                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00466088                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0046608e                  arg2 = m_numBuckets;
0046609e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0046609e                  
004660a8                  if (eax_8 != bucketSizesEnd_1)
004660b1                      eax_8 = &eax_8[1];
004660a8                  else
004660a8                  {
004660aa                      eax_8 -= 4;
004660aa                      
004660af                      if (eax_8 != bucketSizesEnd_1)
004660b1                          eax_8 = &eax_8[1];
004660a8                  }
004660a8                  
004660b9                  IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
0046607f              }
0046607f              
004660c2              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
004660c5              class HashSetData<UIElement *>** m_buckets_1 = this->m_buckets;
004660cb              i_1[1] = m_buckets_1[temp1_1];
004660ce              m_buckets_1[temp1_1] = i_1;
004660d4              eax_7 = &m_buckets_1[temp1_1];
004660d4              
004660d9              if (eax_7 < this->m_firstInterestingBucket)
004660db                  this->m_firstInterestingBucket = eax_7;
004660db              
004660e6              this->m_numElements += 1;
004660e9              i_1 = i;
004660eb          } while (i != 0);
00466069      }
00466069      
004660f0      eax_7 = 1;
004660f3      return 1;
00465fc0  }

004660f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00466100  uint8_t __thiscall IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::add(class IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>* this, class HashSetData<UIElement *>* arg2)

00466100  {
00466108      class UIElement* m_hashKey = arg2->m_hashKey;
0046610b      uint32_t m_numBuckets = this->m_numBuckets;
0046610b      
0046611e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0046611e      {
00466122          if (*(uint32_t*)i == m_hashKey)
00466122          {
0046616e              if (i == 0)
0046616e                  break;
0046616e              
00466172              i = 0;
00466175              return 0;
00466122          }
0046611e      }
0046611e      
00466134      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00466138          IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::grow(this);
00466138      
00466141      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
00466144      class HashSetData<UIElement *>** m_buckets = this->m_buckets;
0046614a      arg2->m_hashNext = m_buckets[temp1_1];
0046614d      m_buckets[temp1_1] = arg2;
00466153      class HashSetData<UIElement *>** eax_4 = &m_buckets[temp1_1];
00466153      
00466158      if (eax_4 < this->m_firstInterestingBucket)
0046615a          this->m_firstInterestingBucket = eax_4;
0046615a      
00466162      this->m_numElements += 1;
00466166      uint32_t eax_6;
00466166      eax_6 = 1;
00466169      return 1;
00466100  }

00466178                                                                          90 90 90 90 90 90 90 90                          ........

00466180  uint8_t __thiscall HashSet<UIElement *>::add(class HashSet<UIElement *>* this, class UIElement** arg2)

00466180  {
00466189      class UIElement* ecx = *(uint32_t*)arg2;
00466189      
0046619c      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, ecx) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0046619c      {
004661a2          if (*(uint32_t*)i == ecx)
004661a2          {
004661d5              if (i == 0)
004661d5                  break;
004661d5              
004661d8              i = 0;
004661db              return 0;
004661a2          }
0046619c      }
0046619c      
004661ad      void* eax_3 = operator new(8);
004661ad      
004661b7      if (eax_3 == 0)
004661b7      {
004661e3          IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::add(&this->m_intrusiveTable, nullptr);
004661e9          int32_t eax_5;
004661e9          eax_5 = 1;
004661ec          return 1;
004661b7      }
004661b7      
004661bb      *(uint32_t*)eax_3 = *(uint32_t*)arg2;
004661c0      *(uint32_t*)((char*)eax_3 + 4) = 0;
004661c7      IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::add(&this->m_intrusiveTable, eax_3);
004661cd      int32_t eax_4;
004661cd      eax_4 = 1;
004661d0      return 1;
00466180  }

004661ef                                               90                                                                 .

004661f0  void* __thiscall HashSet<UIElement *>::`scalar deleting destructor'(class HashSet<UIElement *>* this, uint32_t arg2)

004661f0  {
004661f9      this->vtable = 0x79c0d8;
004661ff      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00466204      class HashSetData<UIElement *>** m_buckets = this->m_intrusiveTable.m_buckets;
004661f4      this->m_intrusiveTable.vtable = 0x79c0d4;
004661f4      
00466212      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00466215          operator delete[](m_buckets);
00466215      
004661f4      this->m_intrusiveTable.m_buckets = nullptr;
004661f4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004661f4      this->m_intrusiveTable.m_numBuckets = 0;
004661f4      this->m_intrusiveTable.m_numElements = 0;
004661f4      
00466230      if ((arg2 & 1) != 0)
00466233          operator delete(this);
00466233      
0046623f      return this;
004661f0  }

00466242        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00466250  void __fastcall UIListener::UIListener(class UIListener* this)

00466250  {
00466253      this->vtable = &UIListener::`vftable';
0046625e      this->m_hashElementsRegisteredWith.vtable = 0x79c0d8;
00466265      IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>(&this->m_hashElementsRegisteredWith.m_intrusiveTable, 0x17);
0046626a      this->m_tsSerialNumberLastListenedTo.m_timestamp = 0;
00466250  }

00466275                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00466280  void __fastcall UIListener::~UIListener(class UIListener* this)

00466280  {
00466286      this->vtable = &UIListener::`vftable';
0046628c      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046628c      
00466294      if (UIElementManager::s_pInstance_1 != 0)
00466297          UIElementManager::UnRegisterForAllMessages(UIElementManager::s_pInstance_1, this);
00466297      
004662a7      void __return;
004662a7      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashElementsRegisteredWith.m_intrusiveTable, &__return);
004662ac      class HashTableData<unsigned long,DBOCache *>* i = eax->m_currElement;
004662b1      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
004662b3      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
004662b3      
004662b6      while (i != 0)
004662b6      {
004662b8          uint32_t m_hashKey = i->m_hashKey;
004662ba          i = i->m_hashNext;
004662ba          
004662bf          if (i == 0)
004662bf          {
004662d0              while (true)
004662d0              {
004662d0                  m_currBucket = &m_currBucket[1];
004662d0                  
004662d5                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004662d5                      break;
004662d5                  
004662d7                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
004662d7                  
004662db                  if (i_1 != 0)
004662db                  {
004662dd                      i = i_1;
004662dd                      break;
004662db                  }
004662d0              }
004662bf          }
004662bf          
004662e0          UIElement::UnregisterForElementMessages(m_hashKey, this);
004662b6      }
004662b6      
004662ee      this->m_hashElementsRegisteredWith.vtable = 0x79c0d8;
004662f5      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashElementsRegisteredWith.m_intrusiveTable);
004662fa      class HashSetData<UIElement *>** m_buckets = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_buckets;
004662e9      this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable = 0x79c0d4;
004662e9      
00466308      if (m_buckets != &this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets)
0046630b          operator delete[](m_buckets);
0046630b      
004662e9      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_buckets = nullptr;
004662e9      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004662e9      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_numBuckets = 0;
004662e9      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_numElements = 0;
00466322      this->vtable = 0x794824;
00466328      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00466328      
00466332      if (ICIDM::s_cidm_1 != 0)
00466334          ICIDM::s_cidm_1->vtable->UnregisterCallback(this);
00466280  }

0046633f                                                                                               90                                 .

00466340  void __fastcall UIListener::OnRegisteredWithElement(class UIListener* this, class UIElement* arg2)

00466340  {
00466348      HashSet<UIElement *>::add(&this->m_hashElementsRegisteredWith, &arg2);
00466340  }


00466350  void __fastcall UIListener::OnUnregisteredWithElement(class UIListener* this, class UIElement* arg2)

00466350  {
00466358      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_hashElementsRegisteredWith.m_intrusiveTable, &arg2);
00466358      
0046635f      if (eax != 0)
00466362          operator delete(eax);
00466350  }

0046636b                                   90 90 90 90 90                                                             .....

00466370  void* __thiscall UIListener::`scalar deleting destructor'(class UIListener* this, uint32_t arg2)

00466370  {
00466373      UIListener::~UIListener(this);
00466373      
0046637d      if ((arg2 & 1) != 0)
00466380          operator delete(this);
00466380      
0046638b      return this;
00466370  }

0046638e                                            90 90                                                                ..

00466390  uint8_t __fastcall Box2D::IsValid(class Box2D const* this)

00466390  {
004663a3      if ((((this->m_x1 - this->m_x0) + 1) > 0 && ((this->m_y1 - this->m_y0) + 1) > 0))
004663aa          return 1;
004663aa      
004663ad      return 0;
00466390  }

004663ae                                            90 90                                                                ..

004663b0  uint8_t NameInputFilter(uint16_t arg1)

004663b0  {
004663b1      int32_t esi;
004663b1      esi = arg1;
004663bb      int32_t eax_2;
004663bb      
004663bb      if (esi < 0x100)
004663c1          eax_2 = isalpha(((uint32_t)esi));
004663c1      
004663de      if (((esi >= 0x100 || eax_2 == 0) && (esi != 0x27 && (esi != 0x20 && esi != 0x2d))))
004663e3          return 0;
004663e3      
004663ea      return 1;
004663b0  }

004663eb                                   90 90 90 90 90                                                             .....

004663f0  uint8_t NumberInputFilter(uint16_t arg1)

004663f0  {
00466401      int32_t eax;
00466401      eax = isdigit(((uint32_t)arg1)) != 0;
00466404      return eax;
004663f0  }

00466405                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00466410  uint8_t __fastcall UIElement_Text::ClearSelection(class UIElement_Text* this)

00466410  {
00466415      UIElement_Text::SetSelecting(this, 0);
0046641a      this->m_nSelectionStart = 0;
00466424      this->m_nSelectionEnd = 0;
0046642e      int32_t eax;
0046642e      eax = 1;
00466431      return 1;
00466410  }

00466432                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00466440  void __thiscall UIElement_Text::ScrollPage(class UIElement_Text* this, uint8_t arg2)

00466440  {
00466450      int32_t eax_1 = this->vtable->InqScrollDelta(1, arg2, 1);
0046646a      UIElement_Scrollable::SetScrollableXY(this, this->m_iScrollableX, (this->m_iScrollableY + eax_1), 0);
00466440  }

00466473                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00466480  void* __thiscall ListIterator<Glyph>::`scalar deleting destructor'(class ListIterator<Glyph>* this, uint32_t arg2)

00466480  {
00466488      this->vtable = 0x79c13c;
00466488      
0046648e      if ((arg2 & 1) != 0)
00466491          operator delete(this);
00466491      
0046649c      return this;
00466480  }

0046649f                                                                                               90                                 .

004664a0  void __fastcall SmartArray<Glyph,1>::Reset(class SmartArray<Glyph,1>* this)

004664a0  {
004664a8      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004664b9      this->m_num = 0;
004664b9      
004664c0      if ((m_sizeAndDeallocate & 0x80000000) != 0x80000000)
004664c0      {
0046650e          if (this->m_data != 0)
0046650e          {
00466510              int32_t i_5 = (m_sizeAndDeallocate & 0x7fffffff);
00466510              
00466516              if ((i_5 - 1) >= 0)
00466516              {
0046651b                  int32_t esi_3 = ((i_5 - 1) * 0x24);
0046651e                  int32_t i_3 = i_5;
00466541                  int32_t i;
00466541                  
00466541                  do
00466541                  {
00466525                      void var_24;
00466525                      class Glyph* eax_2 = Glyph::Glyph(&var_24);
0046652f                      Glyph::operator=((this->m_data + esi_3), eax_2);
00466538                      Glyph::~Glyph(&var_24);
0046653d                      esi_3 -= 0x24;
00466540                      i = i_3;
00466540                      i_3 -= 1;
00466541                  } while (i != 1);
00466516              }
0046650e          }
0046650e          
00466549          return;
004664c0      }
004664c0      
004664c2      class Glyph* m_data = this->m_data;
004664c2      
004664c6      if (m_data != 0)
004664c6      {
004664c8          int32_t i_4 = *(uint32_t*)((char*)m_data->m_data)[-4];
004664d3          void* esi_1 = &m_data[i_4];
004664d3          
004664d6          if ((i_4 - 1) >= 0)
004664d6          {
004664d8              int32_t i_2 = i_4;
004664eb              int32_t i_1;
004664eb              
004664eb              do
004664eb              {
004664e0                  esi_1 -= 0x24;
004664e5                  Glyph::~Glyph(esi_1);
004664ea                  i_1 = i_2;
004664ea                  i_2 -= 1;
004664eb              } while (i_1 != 1);
004664d6          }
004664d6          
004664ee          operator delete[](((char*)m_data - 4));
004664c6      }
004664c6      
004664f7      this->m_data = 0;
004664fd      this->m_sizeAndDeallocate = 0;
004664a0  }

004664dd                                                                                         8d 49 00                               .I.
0046654a                                90 90 90 90 90 90                                                            ......

00466550  uint8_t __fastcall Box2D::Intersection(class Box2D const* this, class Box2D const* arg2, class Box2D* arg3)

00466550  {
00466550      class Box2D* var_4 = this;
00466551      int32_t m_x0_1 = this->m_x0;
00466556      class Box2D* esi = arg2;
0046655a      int32_t m_x0 = esi->m_x0;
0046655c      arg2 = m_x0;
00466563      var_4 = m_x0_1;
00466567      class Box2D const** eax = &arg2;
00466567      
0046656b      if (m_x0_1 >= m_x0)
0046656d          eax = &var_4;
0046656d      
00466571      class Box2D* ebx = *(uint32_t*)eax;
00466573      class Box2D* edx = arg3;
00466577      edx->m_x0 = ebx;
00466579      int32_t m_y0 = esi->m_y0;
0046657c      int32_t m_y0_1 = this->m_y0;
0046657f      arg2 = m_y0;
00466585      arg3 = m_y0_1;
00466589      class Box2D const** eax_1 = &arg2;
00466589      
0046658d      if (m_y0_1 >= m_y0)
0046658f          eax_1 = &arg3;
0046658f      
00466593      class Box2D* ebp = *(uint32_t*)eax_1;
00466595      edx->m_y0 = ebp;
00466598      int32_t m_x1 = esi->m_x1;
0046659b      int32_t m_x1_1 = this->m_x1;
0046659e      arg2 = m_x1;
004665a4      arg3 = m_x1_1;
004665a8      class Box2D const** eax_2 = &arg2;
004665a8      
004665ac      if (m_x1 >= m_x1_1)
004665ae          eax_2 = &arg3;
004665ae      
004665b2      class Box2D* eax_3 = *(uint32_t*)eax_2;
004665b4      edx->m_x1 = eax_3;
004665b7      int32_t m_y1 = this->m_y1;
004665ba      int32_t m_y1_1 = esi->m_y1;
004665bd      arg3 = m_y1;
004665c3      arg2 = m_y1_1;
004665c7      class Box2D const** ecx = &arg2;
004665c7      
004665cb      if (m_y1_1 >= m_y1)
004665cd          ecx = &arg3;
004665cd      
004665d1      int32_t ecx_1 = *(uint32_t*)ecx;
004665d8      edx->m_y1 = ecx_1;
004665d8      
004665e2      if (((((char*)eax_3 - ebx) + 1) > 0 && ((ecx_1 - ebp) + 1) > 0))
004665ee          return 1;
004665ee      
004665f8      return 0;
00466550  }

004665fb                                                                                   90 90 90 90 90                             .....

00466600  void __thiscall UIElement_Text::SetNoIme(class UIElement_Text* this, uint8_t arg2)

00466600  {
00466606      uint32_t m_bitField = this->m_bitField;
00466606      
0046660c      if (arg2 != 0)
0046660c      {
00466611          this->m_bitField = (m_bitField | 8);
00466617          return;
0046660c      }
0046660c      
0046661d      this->m_bitField = (m_bitField & 0xfffffff7);
00466600  }

00466626                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00466630  void __thiscall UIElement_Text::SetOutline(class UIElement_Text* this, uint8_t arg2)

00466630  {
00466636      uint32_t m_bitField = this->m_bitField;
00466636      
0046663c      if (arg2 != 0)
0046663c      {
00466641          this->m_bitField = (m_bitField | 0x10);
00466647          return;
0046663c      }
0046663c      
0046664d      this->m_bitField = (m_bitField & 0xffffffef);
00466630  }

00466656                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00466660  uint8_t __fastcall UIElement_Text::IMETurnOn(class UIElement_Text* this)

00466660  {
0046666d      if ((this->m_bitField & 8) != 0)
0046666d      {
0046666f          int32_t eax;
0046666f          eax = 0;
00466675          return 0;
0046666d      }
0046666d      
00466688      void __return;
00466688      class Box2D* var_18_1 = UIRegion::GetScreenClipBox(this, &__return);
0046668f      class RGBAColor* var_1c = &this->m_curFontColor;
00466690      class Font* m_curFontObj = this->m_curFontObj;
0046669d      return ArgumentParser::OnCommandLineEvaluationDone(&this->m_curFontColor);
00466660  }

0046669e                                                                                            90 90                                ..

004666a0  void __fastcall UIElement_Text::CleanupStringDownloads(class UIElement_Text* this)

004666a0  {
004666a3      uint32_t m_num = this->m_downloadQueue.m_num;
004666a3      
004666ab      if (m_num != 0)
004666ab      {
004666ae          int32_t i = 0;
004666ae          
004666b2          if (m_num > 0)
004666b2          {
004666de              do
004666de              {
004666ba                  int32_t* ecx = this->m_downloadQueue.m_data[i];
004666ba                  
004666bf                  if (ecx != 0)
004666c5                      *(uint32_t*)(*(uint32_t*)ecx + 8)(1);
004666c5                  
004666c8                  this->m_downloadQueue.m_data[i] = 0;
004666db                  i += 1;
004666de              } while (i < this->m_downloadQueue.m_num);
004666b2          }
004666b2          
004666e4          this->m_downloadQueue.m_num = 0;
004666ee          UIListener::UnRegisterForGlobalMessage(this, 3);
004666ab      }
004666a0  }

004666f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00466700  class PStringBase<unsigned short>* __thiscall UIElement_Text::GetText(class UIElement_Text const* this, class PStringBase<unsigned short>* __return)

00466700  {
00466700      class UIElement_Text* var_4 = this;
00466701      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0046670f      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00466719      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00466728      GlyphList::InqText(&this->m_glyphList, 0, &var_4);
0046672d      class UIElement_Text* eax_1 = var_4;
00466735      __return->m_charbuffer = eax_1;
0046673b      InterlockedIncrement(((char*)eax_1 - 0x10));
00466741      void* __offset(UIElement_Text, -0x14) esi_2 = ((char*)var_4 - 0x14);
00466741      
00466754      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0046675c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0046675c      
00466764      return __return;
00466700  }

00466767                       90 90 90 90 90 90 90 90 90                                                         .........

00466770  class PStringBase<unsigned short>* __thiscall UIElement_Text::GetPreParsedText(class UIElement_Text const* this, class PStringBase<unsigned short>* __return)

00466770  {
00466770      class UIElement_Text* var_4 = this;
00466771      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0046677f      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00466789      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00466798      GlyphList::InqText(&this->m_glyphList, 1, &var_4);
0046679d      class UIElement_Text* eax_1 = var_4;
004667a5      __return->m_charbuffer = eax_1;
004667ab      InterlockedIncrement(((char*)eax_1 - 0x10));
004667b1      void* __offset(UIElement_Text, -0x14) esi_2 = ((char*)var_4 - 0x14);
004667b1      
004667c4      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004667cc          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004667cc      
004667d4      return __return;
00466770  }

004667d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004667e0  void __thiscall UIElement_Text::SetSelecting(class UIElement_Text* this, uint8_t arg2)

004667e0  {
004667e1      class UIElement_Text* this_1 = this;
004667f1      this = (((int8_t)this_1->m_bitField) & 0x80) == 0x80;
004667f1      
004667f6      if (arg2 != this)
004667f6      {
004667fa          if (arg2 != 0)
004667fa          {
004667fc              this_1->m_bitField |= 0x80;
00466807              return;
004667fa          }
004667fa          
00466810          uint32_t ecx_1 = (this_1->m_bitField & 0xffffff7f);
0046681a          this_1->m_bitField = ecx_1;
0046681a          
00466820          if ((ecx_1 & 0x40) != 0)
00466827              this_1->m_bitField = (ecx_1 & 0xffffffbf);
00466827          
00466831          UIElement_Text::SetSelecting(this_1, 0);
00466836          this_1->m_nSelectionStart = 0;
00466840          this_1->m_nSelectionEnd = 0;
004667f6      }
004667e0  }

0046684e                                            90 90                                                                ..

00466850  void __thiscall UIElement_Text::SetDirty(class UIElement_Text* this, uint8_t arg2)

00466850  {
00466860      int32_t eax;
00466860      eax = arg2;
00466860      
00466869      if (eax != (this->m_bitField & 0x100) == 0x100)
00466869      {
0046686d          uint32_t m_bitField = this->m_bitField;
0046686d          
00466873          if (eax == 0)
00466873          {
0046688d              this->m_bitField = (m_bitField & 0xfffffeff);
00466893              return;
00466873          }
00466873          
0046687a          this->m_bitField = (m_bitField | 0x100);
00466880          UIRegion::MakeRootDirtyHere(this);
00466869      }
00466850  }

00466896                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004668a0  void __fastcall UIElement_Text::DetermineMarginValues(class UIElement_Text* this)

004668a0  {
004668b0      int32_t var_10;
004668a6      this->vtable->GetSurfaceBox(&var_10);
004668cd      int32_t var_8;
004668cd      int32_t ecx_3 = ((var_8 - var_10) + 1);
004668d5      int32_t var_c;
004668d5      int32_t var_4;
004668d5      bool cond:0 = ((var_4 - var_c) + 1) < this->m_margU;
004668d7      int32_t var_14 = ecx_3;
004668db      int32_t var_18 = ((var_4 - var_c) + 1);
004668df      int32_t* edx_2 = &var_18;
004668df      
004668e3      if (!(cond:0))
004668e5          edx_2 = &this->m_margU;
004668e5      
004668e7      int32_t m_margU = ADJ(edx_2)->m_margU;
004668e9      int32_t eax_5 = (((var_4 - var_c) + 1) - m_margU);
004668ce      this->m_margU = m_margU;
004668ed      int32_t m_margD = this->m_margD;
004668f9      var_18 = eax_5;
004668ff      int32_t* eax_6 = &var_18;
004668ff      
00466903      if (eax_5 >= m_margD)
00466905          eax_6 = &this->m_margD;
00466905      
004668f3      this->m_margD = *(uint32_t*)eax_6;
00466919      int32_t* eax_9 = &var_14;
00466919      
0046691d      if (ecx_3 >= this->m_margL)
0046691f          eax_9 = &this->m_margL;
0046691f      
00466921      int32_t eax_10 = *(uint32_t*)eax_9;
00466923      int32_t ecx_4 = (ecx_3 - eax_10);
00466911      this->m_margL = eax_10;
00466927      bool cond:3 = ecx_4 >= this->m_margR;
0046692d      var_14 = ecx_4;
0046692d      
00466931      if (!(cond:3))
00466931      {
0046693a          this->m_margR = var_14;
00466944          return;
00466931      }
00466931      
0046694c      this->m_margR = this->m_margR;
004668a0  }

00466957                                                                       90 90 90 90 90 90 90 90 90                         .........

00466960  void __thiscall UIElement_Text::SetFontDIDHelper(class UIElement_Text* this, uint32_t arg2, class Font** arg3, uint32_t arg4)

00466960  {
00466965      class Font** edi = arg3;
00466965      
0046696f      if (*(uint32_t*)edi != 0)
0046696f      {
00466975          struct UIElement_Text::VTable* vtable = this->vtable;
0046697d          uint32_t edx_1 = arg2;
00466982          int32_t* var_10 = nullptr;
00466986          int32_t* var_c_1 = nullptr;
00466986          
00466992          if (vtable->InqProperty(edx_1, &var_10) != 0)
00466992          {
0046699e              if (var_c_1 == 0)
0046699e              {
00466aa4                  BaseProperty::~BaseProperty(&var_10);
00466aaf                  return;
0046699e              }
0046699e              
004669b3              if (*(uint32_t*)(*(uint32_t*)var_c_1 + 0xf0)(&arg3) == 0)
004669b3              {
00466aa4                  BaseProperty::~BaseProperty(&var_10);
00466aaf                  return;
004669b3              }
004669b3              
004669c1              if (arg4 < arg3)
004669c1              {
004669cd                  int32_t var_8 = 0;
004669d1                  int32_t* var_4_1 = nullptr;
004669d1                  
004669d5                  if (var_c_1 == 0)
004669d5                  {
00466a9b                  label_466a9b:
00466a9b                      BaseProperty::~BaseProperty(&var_8);
00466aa4                      BaseProperty::~BaseProperty(&var_10);
00466aaf                      return;
004669d5                  }
004669d5                  
004669f7                  if ((*(uint32_t*)(*(uint32_t*)var_c_1 + 0xf4)(arg4, &var_8) == 0 || var_4_1 == 0))
004669eb                      goto label_466a9b;
004669eb                  
00466a0c                  if (*(uint32_t*)(*(uint32_t*)var_4_1 + 0xb0)(&arg2) == 0)
00466a0c                      goto label_466a9b;
00466a0c                  
00466a12                  uint32_t eax_8 = arg2;
00466a12                  
00466a23                  if ((eax_8 != INVALID_DID.id && eax_8 != *(uint32_t*)edi->m_DID.id))
00466a23                  {
00466a26                      class Font* eax_9 = FontLocal::GetGlobalOrLocalFont(eax_8);
00466a26                      
00466a32                      if (eax_9 != 0)
00466a32                      {
00466a34                          class Font* ecx_4 = *(uint32_t*)edi;
00466a34                          
00466a38                          if (ecx_4 != 0)
00466a38                          {
00466a3a                              ecx_4->vtable->Release();
00466a3f                              *(uint32_t*)edi = nullptr;
00466a38                          }
00466a38                          
00466a41                          *(uint32_t*)edi = eax_9;
00466a32                      }
00466a23                  }
00466a23                  
00466a47                  BaseProperty::~BaseProperty(&var_8);
004669c1              }
00466992          }
00466992          
00466a4c          int32_t* eax_10 = var_10;
00466a4c          
00466a52          if (eax_10 != 0)
00466a52          {
00466a5c              int32_t esi_3 = (eax_10[1] - 1);
00466a59              eax_10[1] = esi_3;
00466a59              
00466a63              if (esi_3 == 0)
00466a69                  **(uint32_t**)eax_10(1);
00466a69              
00466a6b              var_10 = nullptr;
00466a52          }
00466a52          
00466a75          if (var_c_1 != 0)
00466a75          {
00466a7f              int32_t esi_5 = (var_c_1[1] - 1);
00466a7c              var_c_1[1] = esi_5;
00466a7c              
00466a86              if (esi_5 == 0)
00466a8c                  **(uint32_t**)var_c_1(1);
00466a75          }
0046696f      }
00466960  }

00466ab2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00466ac0  void __thiscall UIElement_Text::SetFontColorHelper(class UIElement_Text* this, uint32_t arg2, class RGBAColor* arg3, uint32_t arg4)

00466ac0  {
00466ad3      int32_t* var_10 = nullptr;
00466ad7      int32_t* var_c = nullptr;
00466ae3      void* eax_12;
00466ae3      int32_t* ecx;
00466ae3      
00466ae3      if (this->vtable->InqProperty(arg2, &var_10) == 0)
00466ae3      {
00466b54      label_466b54:
00466b54          int32_t* eax_8 = var_10;
00466b54          
00466b5a          if (eax_8 != 0)
00466b5a          {
00466b64              int32_t esi_2 = (eax_8[1] - 1);
00466b61              eax_8[1] = esi_2;
00466b61              
00466b6b              if (esi_2 == 0)
00466b71                  **(uint32_t**)eax_8(1);
00466b71              
00466b73              var_10 = nullptr;
00466b5a          }
00466b5a          
00466b7d          if (var_c != 0)
00466b7d          {
00466b7f              ecx = var_c;
00466b81              eax_12 = &var_c[1];
00466b86          label_466b86:
00466b86              int32_t esi_4 = (*(uint32_t*)eax_12 - 1);
00466b87              *(uint32_t*)eax_12 = esi_4;
00466b87              
00466b8d              if (esi_4 == 0)
00466b93                  **(uint32_t**)ecx(1);
00466b7d          }
00466b7d          
00466b7d          return;
00466ae3      }
00466ae3      
00466ae5      ecx = var_c;
00466ae5      
00466aeb      if (ecx == 0)
00466aeb          goto label_466bbb;
00466aeb      
00466b00      if (*(uint32_t*)(*(uint32_t*)ecx + 0xf0)(&arg2) != 0)
00466b00      {
00466b0e          if (arg4 < arg2)
00466b0e          {
00466b16              int32_t var_8 = 0;
00466b1a              int32_t* var_4_1 = nullptr;
00466b1a              
00466b1e              if (var_c == 0)
00466b1e              {
00466ba1              label_466ba1:
00466ba1                  BaseProperty::~BaseProperty(&var_8);
00466baa                  BaseProperty::~BaseProperty(&var_10);
00466bb4                  return;
00466b1e              }
00466b1e              
00466b38              if ((*(uint32_t*)(*(uint32_t*)var_c + 0xf4)(arg4, &var_8) == 0 || var_4_1 == 0))
00466b30                  goto label_466ba1;
00466b30              
00466b49              if (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x98)(arg3) == 0)
00466b49                  goto label_466ba1;
00466b49              
00466b4f              BaseProperty::~BaseProperty(&var_8);
00466b0e          }
00466b0e          
00466b0e          goto label_466b54;
00466b00      }
00466b00      
00466bb7      ecx = var_c;
00466bbb  label_466bbb:
00466bbb      int32_t* eax_13 = var_10;
00466bbb      
00466bc1      if (eax_13 != 0)
00466bc1      {
00466bcb          int32_t esi_6 = (eax_13[1] - 1);
00466bc8          eax_13[1] = esi_6;
00466bc8          
00466bd2          if (esi_6 == 0)
00466bd8              **(uint32_t**)eax_13(1);
00466bd8          
00466bda          ecx = var_c;
00466bde          var_10 = nullptr;
00466bc1      }
00466bc1      
00466be4      if (ecx != 0)
00466be4      {
00466be6          eax_12 = &ecx[1];
00466be9          goto label_466b86;
00466be4      }
00466ac0  }

00466beb                                   90 90 90 90 90                                                             .....

00466bf0  void __thiscall UIElement_Text::SetFontDID(class UIElement_Text* this, class IDClass<_tagDataID,32,0> arg2)

00466bf0  {
00466bff      int32_t* var_10 = nullptr;
00466c03      int32_t* var_c = nullptr;
00466c0e      void* eax_10;
00466c0e      int32_t* ecx_1;
00466c0e      
00466c0e      if (BaseProperty::SetPropertyName(&var_10, 0x18) == 0)
00466c0e      {
00466cf9          int32_t* eax_11 = var_10;
00466cf9          
00466cff          if (eax_11 != 0)
00466cff          {
00466d09              int32_t esi_4 = (eax_11[1] - 1);
00466d06              eax_11[1] = esi_4;
00466d06              
00466d10              if (esi_4 == 0)
00466d16                  **(uint32_t**)eax_11(1);
00466d16              
00466d18              var_10 = nullptr;
00466cff          }
00466cff          
00466d22          if (var_c != 0)
00466d22          {
00466d24              ecx_1 = var_c;
00466d26              eax_10 = &var_c[1];
00466d2b          label_466d2b:
00466d2b              int32_t esi_6 = (*(uint32_t*)eax_10 - 1);
00466d2c              *(uint32_t*)eax_10 = esi_6;
00466d2c              
00466d32              if (esi_6 == 0)
00466d38                  **(uint32_t**)ecx_1(1);
00466d22          }
00466d22          
00466d22          return;
00466c0e      }
00466c0e      
00466c14      ecx_1 = var_c;
00466c14      
00466c1a      if (ecx_1 != 0)
00466c1a      {
00466c24          BaseProperty::CheckCopyOnWrite(&var_10);
00466c24          
00466c3c          if (*(uint32_t*)(*(uint32_t*)var_c + 0xb4)(arg2) != 0)
00466c3c          {
00466c48              int32_t var_8 = 0;
00466c4c              int32_t* var_4 = nullptr;
00466c5d              int32_t* ecx_8;
00466c5d              
00466c5d              if ((BaseProperty::SetPropertyName(&var_8, 0x1a) == 0 || var_4 == 0))
00466cab                  ecx_8 = &var_8;
00466c5d              else
00466c5d              {
00466c63                  BaseProperty::CheckCopyOnWrite(&var_8);
00466c63                  
00466c7c                  if (*(uint32_t*)(*(uint32_t*)var_4 + 0xf8)(0, &var_10) == 0)
00466cab                      ecx_8 = &var_8;
00466c7c                  else
00466c7c                  {
00466c8f                      ecx_8 = &var_8;
00466c8f                      
00466c93                      if (this->vtable->SetProperty(&var_8) != 0)
00466c93                      {
00466c95                          BaseProperty::~BaseProperty(ecx_8);
00466c9e                          BaseProperty::~BaseProperty(&var_10);
00466ca8                          return;
00466c93                      }
00466c7c                  }
00466c5d              }
00466c5d              
00466caf              BaseProperty::~BaseProperty(ecx_8);
00466cb8              BaseProperty::~BaseProperty(&var_10);
00466cc2              return;
00466c3c          }
00466c3c          
00466cc5          ecx_1 = var_c;
00466c1a      }
00466c1a      
00466cc9      int32_t* eax_8 = var_10;
00466cc9      
00466ccf      if (eax_8 != 0)
00466ccf      {
00466cd9          int32_t esi_2 = (eax_8[1] - 1);
00466cd6          eax_8[1] = esi_2;
00466cd6          
00466ce0          if (esi_2 == 0)
00466ce6              **(uint32_t**)eax_8(1);
00466ce6          
00466ce8          ecx_1 = var_c;
00466cec          var_10 = nullptr;
00466ccf      }
00466ccf      
00466cf2      if (ecx_1 != 0)
00466cf2      {
00466cf4          eax_10 = &ecx_1[1];
00466cf7          goto label_466d2b;
00466cf2      }
00466bf0  }

00466d42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00466d50  void __thiscall UIElement_Text::SetFontDIDWithoutChangingExistingText(class UIElement_Text* this, class IDClass<_tagDataID,32,0> arg2)

00466d50  {
00466d55      s_bChangeTextInDoFontRest = 0;
00466d5c      UIElement_Text::SetFontDID(this, arg2);
00466d61      s_bChangeTextInDoFontRest = 1;
00466d50  }

00466d6b                                   90 90 90 90 90                                                             .....

00466d70  void __thiscall UIElement_Text::ChangeExistingTextToNewFont(class UIElement_Text* this, class Font* arg2)

00466d70  {
00466d7e      GlyphList::ChangeExistingGlyphsToNewFont(&this->m_glyphList, arg2);
00466d83      uint32_t m_bitField = this->m_bitField;
00466d83      
00466d90      if ((0x100 & m_bitField) == 0)
00466d90      {
00466d94          this->m_bitField = (m_bitField | 0x100);
00466d9c          UIRegion::MakeRootDirtyHere(this);
00466d90      }
00466d70  }

00466da5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00466db0  uint8_t __thiscall UIElement_Text::MoveBeginEndLine(class UIElement_Text* this, uint8_t arg2, uint32_t arg3, uint32_t* arg4)

00466db0  {
00466dcf      int32_t var_4 = 0;
00466dd7      uint32_t var_8 = 0;
00466ddf      uint8_t result = GlyphList::FindCurrentLine(&this->m_glyphList, arg3, &var_4, &var_8);
00466ddf      
00466de6      if (result != 0)
00466de6      {
00466dee          if (arg2 != 0)
00466dee          {
00466dfa              *(uint32_t*)arg4 = var_8;
00466e00              return result;
00466dee          }
00466dee          
00466e10          arg2 = 0;
00466e18          result = GlyphList::FindNextLine(&this->m_glyphList, arg3, &arg2, &var_8);
00466e18          
00466e1f          if (result != 0)
00466e1f          {
00466e32              if (var_4 == (this->m_glyphList.m_glyphLines.m_num - 1))
00466e32              {
00466e3c                  *(uint32_t*)arg4 = this->m_glyphList.m_glyphList._num_elements;
00466e42                  return result;
00466e32              }
00466e32              
00466e4a              *(uint32_t*)arg4 = (var_8 - 1);
00466e1f          }
00466de6      }
00466de6      
00466e52      return result;
00466db0  }

00466e55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00466e60  uint8_t __thiscall UIElement_Text::SetSelectionStart(class UIElement_Text* this, uint32_t arg2)

00466e60  {
00466e68      if (this->m_bitField >= 0)
00466eb9          return 0;
00466eb9      
00466e6e      this->m_nSelectionStart = arg2;
00466e76      uint32_t _num_elements = this->m_glyphList.m_glyphList._num_elements;
00466e7e      arg2 = _num_elements;
00466e82      uint32_t* edx_1 = &arg2;
00466e82      
00466e86      if (_num_elements >= this->m_nSelectionStart)
00466e88          edx_1 = &this->m_nSelectionStart;
00466e88      
00466e8a      uint32_t edx_2 = *(uint32_t*)edx_1;
00466e6e      this->m_nSelectionStart = edx_2;
00466e90      uint32_t m_bitField = this->m_bitField;
00466e96      this->m_nSelectionEnd = edx_2;
00466e96      
00466ea3      if ((0x100 & m_bitField) == 0)
00466ea3      {
00466ea7          this->m_bitField = (m_bitField | 0x100);
00466ead          UIRegion::MakeRootDirtyHere(this);
00466ea3      }
00466ea3      
00466eb2      int32_t eax_3;
00466eb2      eax_3 = 1;
00466eb4      return 1;
00466e60  }

00466ebc                                                                                      90 90 90 90                              ....

00466ec0  uint8_t __thiscall UIElement_Text::SetSelectionEnd(class UIElement_Text* this, uint32_t arg2)

00466ec0  {
00466ec8      if (this->m_bitField >= 0)
00466f11          return 0;
00466f11      
00466ece      this->m_nSelectionEnd = arg2;
00466ed6      uint32_t _num_elements = this->m_glyphList.m_glyphList._num_elements;
00466ede      arg2 = _num_elements;
00466ee2      uint32_t* edx_1 = &arg2;
00466ee2      
00466ee6      if (_num_elements >= this->m_nSelectionEnd)
00466ee8          edx_1 = &this->m_nSelectionEnd;
00466ee8      
00466ece      this->m_nSelectionEnd = *(uint32_t*)edx_1;
00466eee      uint32_t m_bitField = this->m_bitField;
00466eee      
00466efb      if ((0x100 & m_bitField) == 0)
00466efb      {
00466eff          this->m_bitField = (m_bitField | 0x100);
00466f05          UIRegion::MakeRootDirtyHere(this);
00466efb      }
00466efb      
00466f0a      int32_t eax_2;
00466f0a      eax_2 = 1;
00466f0c      return 1;
00466ec0  }

00466f14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00466f20  uint8_t __thiscall UIElement_Text::GetSelection(class UIElement_Text const* this, uint32_t* arg2, uint32_t* arg3)

00466f20  {
00466f2a      *(uint32_t*)arg2 = 0;
00466f30      *(uint32_t*)arg3 = 0;
00466f40      uint8_t result = (((int8_t)this->m_bitField) & 0x80) == 0x80;
00466f40      
00466f45      if (result != 0)
00466f45      {
00466f54          uint32_t* ecx = &this->m_nSelectionStart;
00466f5f          uint32_t* esi_2 = &this->m_nSelectionEnd;
00466f5f          
00466f61          if (this->m_nSelectionEnd >= this->m_nSelectionStart)
00466f63              esi_2 = ecx;
00466f63          
00466f67          *(uint32_t*)arg2 = *(uint32_t*)esi_2;
00466f67          
00466f6f          if (ADJ(ecx)->m_nSelectionEnd < this->m_nSelectionEnd)
00466f71              ecx = &this->m_nSelectionEnd;
00466f71          
00466f75          *(uint32_t*)arg3 = ADJ(ecx)->m_nSelectionEnd;
00466f45      }
00466f45      
00466f79      return result;
00466f20  }

00466f7c                                                                                      90 90 90 90                              ....

00466f80  void __thiscall UIElement_Text::RecalculateTruncation(class UIElement_Text* this, int32_t* arg2, int32_t* arg3)

00466f80  {
00466f94      char var_a1;
00466f94      UIElement::GetAttribute_Bool(this, 0xd0, &var_a1);
00466fa2      int32_t eax;
00466fa2      
00466fa2      if ((this->m_bitField & 2) == 0)
00466fab          eax = UIRegion::GetHeight(this);
00466fa2      else
00466fa4          eax = UIRegion::GetWidth(this);
00466fa4      
00466fb9      int32_t eax_1;
00466fb9      
00466fb9      if ((this->m_bitField & 2) == 0)
00466fcd          eax_1 = *(uint32_t*)arg3;
00466fb9      else
00466fc2          eax_1 = *(uint32_t*)arg2;
00466fc2      
00466fd1      if (eax_1 <= eax)
00466fd1      {
00466fd6          this->m_nTruncationPos = 0xffffffff;
00466fdc          this->m_cxAdjustedLineNumber = 0xffffffff;
00466fdc          
00466fe8          if (var_a1 != 0)
00466fe8          {
00466ff9              this->__bitfield164 &= 0xffffffdf;
00466fff              UIElement::ClearTooltip(this);
00466fe8          }
00466fe8          
00466fe8          return;
00466fd1      }
00466fd1      
0046700f      eax_1 = var_a1;
00467014      int32_t ebx_1 = 0;
00467019      void* __return;
00467019      
00467019      if (eax_1 != 0)
00467019      {
0046701f          void var_90;
0046701f          StringInfo::StringInfo(&var_90);
00467037          StringInfo::SetLiteralValue(&var_90, UIElement_Text::GetText(this, &__return), 1);
00467040          int32_t* edi_2 = ((char*)__return - 0x14);
00467040          
00467053          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0046705b              **(uint32_t**)edi_2(1);
0046705b          
00467064          UIElement::SetTooltip(this, &var_90);
00467076          this->__bitfield164 |= 0x20;
0046707c          StringInfo::~StringInfo(&var_90);
00467019      }
00467019      
00467081      bool cond:2_1 = (this->m_bitField & 2) != 0;
00467088      uint32_t var_98 = 0;
00467088      
0046708c      if (!(cond:2_1))
0046709a          GlyphList::FindCompleteLineFromY(&this->m_glyphList, eax, &var_98);
0046709a      
004670a1      int32_t eax_9 = UIRegion::GetWidth(this);
004670d4      GlyphList::FindPosFromLineAndPixels(&this->m_glyphList, var_98, (((eax_9 - this->m_margR) - this->m_margL) - this->m_cxTrailer), 0, &this->m_nTruncationPos);
004670d4      
004670e0      if ((this->m_bitField & 2) != 0)
004670e0      {
004670ec          GlyphList::FindPixelsFromPos(&this->m_glyphList, this->m_nTruncationPos, &__return);
004670fd          int32_t m_cxTrailer = this->m_cxTrailer;
00467103          void* __return_1 = __return;
00467107          int32_t ecx_17 = (this->m_margR + this->m_margL);
0046710a          this->m_cxAdjustedLineNumber = 0;
00467110          void* eax_13 = ((char*)__return_1 + m_cxTrailer);
0046711a          this->m_cxAdjustedLineSize = eax_13;
00467123          *(uint32_t*)arg2 = (ecx_17 + eax_13);
0046712c          return;
004670e0      }
004670e0      
0046712f      uint32_t ecx_19 = var_98;
00467133      int32_t var_94 = 0;
00467137      int32_t ebp_2 = 0;
00467139      __return = nullptr;
0046713d      uint32_t ecx_20 = ecx_19;
0046713d      
004671ad      do
004671ad      {
00467146          void* edi_7 = (this->m_glyphList.m_glyphLines.m_data + __return);
0046714c          int32_t var_9c;
0046714c          int32_t eax_15;
0046714c          
0046714c          if (ebx_1 != ecx_20)
0046717d              eax_15 = *(uint32_t*)((char*)edi_7 + 8);
0046714c          else
0046714c          {
00467160              GlyphList::FindPixelsFromPos(&this->m_glyphList, this->m_nTruncationPos, &var_9c);
0046716f              eax_15 = (var_9c + this->m_cxTrailer);
00467171              ecx_20 = var_98;
00467175              this->m_cxAdjustedLineSize = eax_15;
0046714c          }
0046714c          
00467180          int32_t edx_6 = var_94;
00467184          var_9c = eax_15;
0046718a          int32_t* eax_16 = &var_9c;
0046718a          
0046718e          if (edx_6 >= eax_15)
00467190              eax_16 = &var_94;
00467190          
00467196          int32_t eax_17 = *(uint32_t*)((char*)edi_7 + 0xc);
00467199          var_94 = *(uint32_t*)eax_16;
004671a1          ebp_2 += eax_17;
004671a3          ebx_1 += 1;
004671a9          __return += 0x10;
004671ad      } while (ebx_1 <= ecx_20);
004671ad      
004671bb      int32_t edx_10 = var_94;
004671bf      int32_t eax_19 = (this->m_margR + this->m_margL);
004671c1      this->m_cxAdjustedLineNumber = ecx_20;
004671d0      *(uint32_t*)arg2 = (eax_19 + edx_10);
004671ea      *(uint32_t*)arg3 = ((this->m_margD + this->m_margU) + ebp_2);
00466f80  }

004671f8                                                                          90 90 90 90 90 90 90 90                          ........

00467200  uint8_t const __thiscall UIElement_Text::SetHorizontalJustification(class UIElement_Text* this, uint32_t arg2)

00467200  {
00467204      uint32_t m_bitField = this->m_bitField;
0046720a      this->m_eHorizontalJustification = arg2;
0046720a      
00467217      if ((0x100 & m_bitField) == 0)
00467217      {
0046721b          this->m_bitField = (m_bitField | 0x100);
00467221          UIRegion::MakeRootDirtyHere(this);
00467217      }
00467217      
00467226      int32_t eax;
00467226      eax = 1;
00467228      return 1;
00467200  }

0046722b                                   90 90 90 90 90                                                             .....

00467230  uint8_t const __thiscall UIElement_Text::SetVerticalJustification(class UIElement_Text* this, uint32_t arg2)

00467230  {
00467234      uint32_t m_bitField = this->m_bitField;
0046723a      this->m_eVerticalJustification = arg2;
0046723a      
00467247      if ((0x100 & m_bitField) == 0)
00467247      {
0046724b          this->m_bitField = (m_bitField | 0x100);
00467251          UIRegion::MakeRootDirtyHere(this);
00467247      }
00467247      
00467256      int32_t eax;
00467256      eax = 1;
00467258      return 1;
00467230  }

0046725b                                                                                   90 90 90 90 90                             .....

00467260  int32_t __thiscall UIElement_Text::CalcJustification(class UIElement_Text* this, uint32_t arg2, uint8_t arg3)

00467260  {
00467264      int32_t ebx;
00467264      ebx = arg3;
0046726a      int32_t edi = 0;
00467270      int32_t eax_5;
00467270      uint32_t ecx_5;
00467270      int32_t var_24;
00467270      
00467270      if (ebx == 0)
00467270      {
004672c3          void var_10;
004672c3          void* eax_6 = this->vtable->GetSurfaceBox(&var_10);
004672cc          int32_t m_iScrollableHeight = this->m_iScrollableHeight;
004672d4          int32_t ecx_9 = ((*(uint32_t*)((char*)eax_6 + 0xc) - *(uint32_t*)((char*)eax_6 + 4)) + 1);
004672d5          var_24 = m_iScrollableHeight;
004672db          arg3 = ecx_9;
004672df          int32_t* eax_7 = &arg3;
004672df          
004672e3          if (m_iScrollableHeight >= ecx_9)
004672e5              eax_7 = &var_24;
004672e5          
004672f9          eax_5 = ((*(uint32_t*)eax_7 - this->m_margD) - this->m_margU);
004672fb          ecx_5 = this->m_eVerticalJustification;
00467270      }
00467270      else
00467270      {
0046727b          void var_20;
0046727b          int32_t* eax_1 = this->vtable->GetSurfaceBox(&var_20);
00467283          int32_t m_iScrollableWidth = this->m_iScrollableWidth;
0046728b          int32_t ecx_3 = ((eax_1[2] - *(uint32_t*)eax_1) + 1);
0046728c          var_24 = m_iScrollableWidth;
00467292          arg3 = ecx_3;
00467296          int32_t* eax_2 = &arg3;
00467296          
0046729a          if (m_iScrollableWidth >= ecx_3)
0046729c              eax_2 = &var_24;
0046729c          
004672b0          eax_5 = ((*(uint32_t*)eax_2 - this->m_margR) - this->m_margL);
004672b2          ecx_5 = this->m_eHorizontalJustification;
00467270      }
00467270      
00467302      if (ecx_5 == 1)
0046731e          edi = ((eax_5 >> 1) - (arg2 >> 1));
00467302      else if ((ecx_5 == 3 || ecx_5 == 5))
0046731e          edi = (eax_5 - arg2);
0046731e      
00467322      if (ebx == 0)
00467345          return (this->m_margU + edi);
00467345      
00467333      return (this->m_margL + edi);
00467260  }

00467348                          90 90 90 90 90 90 90 90                                                          ........

00467350  uint8_t __thiscall UIElement_Text::RegisterInputMaps(class UIElement_Text* this, int32_t arg2)

00467350  {
00467353      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00467353      
0046735b      if (ICIDM::s_cidm_1 == 0)
0046735b      {
0046735d          int32_t eax;
0046735d          eax = 0;
00467360          return 0;
0046735b      }
0046735b      
00467363      ICIDM::s_cidm_1->vtable->UnregisterCallback(this);
00467377      int32_t ebx;
00467377      ebx = UIElement_Scrollable::RegisterInputMaps(this, arg2);
00467377      
00467380      if ((this->m_bitField & 1) != 0)
00467380      {
004673a0          ebx |= ICIDM::s_cidm->vtable->RegisterInputMap(1, this, (arg2 - 0xa));
004673a5          ebx |= ICIDM::s_cidm->vtable->RegisterInputMap(7, this, arg2);
00467380      }
00467380      
004673ae      if ((this->m_bitField & 5) != 0)
004673bf          ebx |= ICIDM::s_cidm->vtable->RegisterInputMap(8, this, arg2);
004673bf      
004673c6      return ebx;
00467350  }

004673c9                             90 90 90 90 90 90 90                                                           .......

004673d0  uint8_t __fastcall UIElement_Text::UnregisterInputMaps(class UIElement_Text* this)

004673d0  {
004673da      if (ICIDM::s_cidm == 0)
004673da      {
004673dc          class ICIDM* eax;
004673dc          eax = 0;
004673df          return 0;
004673da      }
004673da      
004673e8      int32_t ebx;
004673e8      ebx = UIElement_Scrollable::UnregisterInputMaps(this);
004673e8      
004673f1      if ((this->m_bitField & 1) != 0)
004673f1      {
0046740c          ebx |= ICIDM::s_cidm->vtable->UnregisterInputMap(1, this);
00467411          ebx |= ICIDM::s_cidm->vtable->UnregisterInputMap(7, this);
004673f1      }
004673f1      
0046741a      if ((this->m_bitField & 5) != 0)
0046742a          ebx |= ICIDM::s_cidm->vtable->UnregisterInputMap(8, this);
0046742a      
00467430      return ebx;
004673d0  }

00467431                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00467440  void __fastcall UIElement_Text::AdjustToScrollableXYChange(class UIElement_Text* this)

00467440  {
00467440      uint32_t m_bitField = this->m_bitField;
00467440      
0046744d      if ((0x100 & m_bitField) != 0)
0046745c          return;
0046745c      
00467451      this->m_bitField = (m_bitField | 0x100);
00467457      /* tailcall */
00467457      return UIRegion::MakeRootDirtyHere(this);
00467440  }

0046745d                                                                                         90 90 90                               ...

00467460  uint8_t __fastcall UIElement_Text::GetShouldBeMouseVisible(class UIElement_Text* this)

00467460  {
00467467      if ((this->m_bitField & 5) == 0)
00467469          /* tailcall */
00467469          return UIElement::GetShouldBeMouseVisible(this);
00467469      
0046746e      int32_t eax;
0046746e      eax = 1;
00467470      return 1;
00467460  }

00467471                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00467480  void __thiscall UIElement_Text::SetTruncateTextToFit(class UIElement_Text* this, uint8_t arg2)

00467480  {
00467480      uint8_t eax = arg2;
00467480      
0046748f      if ((eax != 0 && (this->m_bitField & 5) != 0))
00467491          eax = 0;
00467491      
004674a5      int32_t edx_1;
004674a5      edx_1 = (this->m_bitField & 0x800) == 0x800;
004674a5      
004674aa      if (eax != edx_1)
004674aa      {
004674ae          uint32_t m_bitField = this->m_bitField;
004674b4          uint32_t eax_1;
004674b4          
004674b4          if (eax == 0)
004674bd              eax_1 = (m_bitField & 0xfffff7ff);
004674b4          else
004674b6              eax_1 = (m_bitField | 0x800);
004674b6          
004674c2          this->m_bitField = eax_1;
004674c8          uint32_t m_bitField_1 = this->m_bitField;
004674c8          
004674d5          if ((0x100 & m_bitField_1) == 0)
004674d5          {
004674d9              this->m_bitField = (m_bitField_1 | 0x100);
004674df              UIRegion::MakeRootDirtyHere(this);
004674d5          }
004674aa      }
00467480  }

004674e7                       90 90 90 90 90 90 90 90 90                                                         .........

004674f0  void __thiscall UIElement_Text::SetLoseFocusOnEscape(class UIElement_Text* this, uint8_t arg2)

004674f0  {
004674f6      uint32_t m_bitField = this->m_bitField;
004674f6      
004674fc      if (arg2 != 0)
004674fc      {
00467503          this->m_bitField = (m_bitField | 0x1000);
00467509          return;
004674fc      }
004674fc      
00467511      this->m_bitField = (m_bitField & 0xffffefff);
004674f0  }

0046751a                                                                                90 90 90 90 90 90                            ......

00467520  void __thiscall UIElement_Text::SetLoseFocusOnAcceptInput(class UIElement_Text* this, uint8_t arg2)

00467520  {
00467526      uint32_t m_bitField = this->m_bitField;
00467526      
0046752c      if (arg2 != 0)
0046752c      {
00467533          this->m_bitField = (m_bitField | 0x2000);
00467539          return;
0046752c      }
0046752c      
00467541      this->m_bitField = (m_bitField & 0xffffdfff);
00467520  }

0046754a                                90 90 90 90 90 90                                                            ......

00467550  void __fastcall UIElement_Text::ResizeToPaper(class UIElement_Text* this)

00467550  {
00467564      uint32_t var_c;
00467564      uint32_t eax_1;
00467564      
00467564      if (UIElement::GetAttribute_Int(this, 0x3d, &var_c) != 0)
00467577          eax_1 = var_c;
00467564      else
00467564      {
0046756c          eax_1 = RenderDevice::GetDisplayWidth(RenderDevice::render_device);
00467571          var_c = eax_1;
00467564      }
00467564      
004675b3      int32_t var_8;
004675b3      int32_t var_4;
004675b3      
004675b3      if (GlyphList::Recalculate(&this->m_glyphList, ((eax_1 - this->m_margR) - this->m_margL), (((int8_t)this->m_bitField) & 2) == 2, &var_8, &var_4) != 0)
004675b3      {
004675cd          int32_t eax_7 = (var_8 + (this->m_margR + this->m_margL));
004675d9          int32_t ecx_7 = (var_4 + (this->m_margD + this->m_margU));
004675db          struct UIElement_Text::VTable* vtable = this->vtable;
004675de          var_4 = ecx_7;
004675e5          var_8 = eax_7;
004675e9          vtable->ResizeTo(eax_7, ecx_7);
004675b3      }
00467550  }

004675f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00467600  void __fastcall SmartArray<Glyph,1>::~SmartArray<Glyph,1>(class SmartArray<Glyph,1>* this)

00467600  {
0046760d      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0046760d      {
0046760f          class Glyph* m_data = this->m_data;
0046760f          
00467613          if (m_data != 0)
00467613          {
00467615              int32_t i_2 = *(uint32_t*)((char*)m_data->m_data)[-4];
00467621              void* esi_1 = &m_data[i_2];
00467621              
00467624              if ((i_2 - 1) >= 0)
00467624              {
00467627                  int32_t i_1 = i_2;
0046763b                  int32_t i;
0046763b                  
0046763b                  do
0046763b                  {
00467630                      esi_1 -= 0x24;
00467635                      Glyph::~Glyph(esi_1);
0046763a                      i = i_1;
0046763a                      i_1 -= 1;
0046763b                  } while (i != 1);
00467624              }
00467624              
0046763f              operator delete[](((char*)m_data - 4));
00467613          }
0046760d      }
00467600  }

0046764a                                90 90 90 90 90 90                                                            ......

00467650  uint8_t __thiscall SmartArray<Glyph,1>::grow(class SmartArray<Glyph,1>* this, uint32_t arg2)

00467650  {
00467650      class SmartArray<Glyph,1>* this_1 = this;
00467653      uint32_t ebp = arg2;
0046765d      uint32_t* eax;
0046765d      
0046765d      if (ebp >= this->m_num)
0046765d      {
0046766d          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
0046766d          {
0046774b              eax = 1;
0046774f              return 1;
0046766d          }
0046766d          
00467675          if (ebp == 0)
00467675          {
00467677              SmartArray<Glyph,1>::Reset(this);
0046767e              int32_t eax_2;
0046767e              eax_2 = 1;
00467682              return 1;
00467675          }
00467675          
00467691          eax = operator new[](((ebp * 0x24) + 4));
00467691          
0046769b          if (eax != 0)
0046769b          {
004676a7              void* ebx_1 = &eax[1];
004676ad              *(uint32_t*)eax = ebp;
004676af              `vector constructor iterator'(ebx_1, 0x24, ebp, Glyph::Glyph);
004676af              
004676b6              if (ebx_1 != 0)
004676b6              {
004676bf                  if (this->m_data != 0)
004676bf                  {
004676c1                      uint32_t m_num = this->m_num;
004676c1                      
004676c6                      if ((m_num - 1) >= 0)
004676c6                      {
004676cb                          void* esi_2 = ((m_num - 1) * 0x24);
004676cf                          arg2 = m_num;
004676ec                          bool cond:1_1;
004676ec                          
004676ec                          do
004676ec                          {
004676db                              Glyph::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
004676e4                              esi_2 -= 0x24;
004676e7                              cond:1_1 = arg2 != 1;
004676e8                              arg2 -= 1;
004676ec                          } while (cond:1_1);
004676c6                      }
004676c6                      
004676fd                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004676fd                      {
004676ff                          class Glyph* m_data = this->m_data;
004676ff                          
00467703                          if (m_data != 0)
00467703                          {
00467705                              int32_t eax_7 = *(uint32_t*)((char*)m_data->m_data)[-4];
00467713                              void* esi_3 = &m_data[eax_7];
00467713                              
00467716                              if ((eax_7 - 1) >= 0)
00467716                              {
00467719                                  arg2 = eax_7;
0046772e                                  uint32_t i;
0046772e                                  
0046772e                                  do
0046772e                                  {
00467720                                      esi_3 -= 0x24;
00467725                                      Glyph::~Glyph(esi_3);
0046772a                                      i = arg2;
0046772a                                      arg2 -= 1;
0046772e                                  } while (i != 1);
00467716                              }
00467716                              
00467735                              operator delete[](((char*)m_data - 4));
00467703                          }
004676fd                      }
004676bf                  }
004676bf                  
00467744                  this->m_data = ebx_1;
00467746                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
0046774b                  eax = 1;
0046774f                  return 1;
004676b6              }
0046769b          }
0046765d      }
0046765d      
00467754      eax = 0;
00467758      return 0;
00467650  }

0046775b                                                                                   90 90 90 90 90                             .....

00467760  void __fastcall UIElement_Text::~UIElement_Text(class UIElement_Text* this)

00467760  {
00467764      this->vtable = 0x79c140;
0046776a      this->vtable = &UIOption_Menu::`vftable';
00467774      UIElement_Text::CleanupStringDownloads(this);
00467781      GlyphList::Flush(&this->m_glyphList);
00467786      class Font* m_curFontObj = this->m_curFontObj;
00467786      
0046778e      if (m_curFontObj != 0)
0046778e      {
00467790          m_curFontObj->vtable->Release();
00467795          this->m_curFontObj = nullptr;
0046778e      }
0046778e      
004677b1      if ((this->m_downloadQueue.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004677ba          operator delete[](this->m_downloadQueue.m_data);
004677ba      
004677c8      GlyphList::~GlyphList(&this->m_glTruncate);
004677cf      GlyphList::~GlyphList(&this->m_glyphList);
004677d8      /* tailcall */
004677d8      return UIElement_Scrollable::~UIElement_Scrollable(this);
00467760  }

004677dd                                                                                         90 90 90                               ...

004677e0  class UIElement* __thiscall UIElement_Text::DynamicCast(class UIElement_Text* this, uint32_t arg2) __pure

004677e0  {
004677e9      if (arg2 == 0xc)
004677f6          return this;
004677f6      
004677f0      int32_t edx_1;
004677f0      edx_1 = arg2 != 0xa;
004677f4      return (this & (edx_1 - 1));
004677e0  }

004677f9                                                                             90 90 90 90 90 90 90                           .......

00467800  uint8_t __thiscall UIElement_Text::InqAvailableProperties(class UIElement_Text const* this, class AvailablePropertySet* arg2)

00467800  {
00467803      class AvailablePropertySet* edi = arg2;
00467808      int32_t ebx;
00467808      ebx = 1;
00467808      
00467811      if (UIElement_Scrollable::InqAvailableProperties(this, edi) == 0)
00467813          ebx = 0;
00467813      
00467819      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046781e      class AvailablePropertySet* esi = arg2;
0046781e      
00467824      if (esi == 0)
00467824      {
00467828          int32_t eax_1;
00467828          eax_1 = 0;
0046782b          return 0;
00467824      }
00467824      
0046783a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0x13, edi) == 0)
0046783c          ebx = 0;
0046783c      
00467842      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046784a      return ebx;
00467800  }

0046784d                                         90 90 90                                                               ...

00467850  void __fastcall UIElement_Text::ClearAllText(class UIElement_Text* this)

00467850  {
00467853      UIElement_Text::CleanupStringDownloads(this);
0046785e      GlyphList::Flush(&this->m_glyphList);
00467869      uint32_t edx = 0;
00467869      
0046786d      if (this->m_bitField < 0)
0046786d      {
00467875          uint32_t ecx_2 = (this->m_bitField & 0xffffff7f);
0046787f          this->m_bitField = ecx_2;
0046787f          
00467885          if ((ecx_2 & 0x40) != 0)
0046788c              this->m_bitField = (ecx_2 & 0xffffffbf);
0046788c          
00467895          edx = UIElement_Text::SetSelecting(this, 0);
0046789a          this->m_nSelectionStart = edx;
004678a0          this->m_nSelectionEnd = edx;
0046786d      }
0046786d      
004678a6      uint32_t m_bitField = this->m_bitField;
004678b3      this->m_nCursorPos = edx;
004678b3      
004678b9      if ((0x100 & m_bitField) != 0)
004678cc          return;
004678cc      
004678bd      this->m_bitField = (m_bitField | 0x100);
004678c6      /* tailcall */
004678c6      return UIRegion::MakeRootDirtyHere(this);
00467850  }

004678cd                                         90 90 90                                                               ...

004678d0  void __fastcall UIElement_Text::SelectAll(class UIElement_Text* this)

004678d0  {
004678d3      uint32_t m_bitField = this->m_bitField;
004678d3      
004678db      if ((m_bitField & 4) != 0)
004678db      {
004678df          if (m_bitField >= 0)
004678e6              this->m_bitField = (m_bitField | 0x80);
004678e6          
004678f0          UIElement_Text::SetSelectionStart(this, 0);
004678fe          UIElement_Text::SetSelectionEnd(this, this->m_glyphList.m_glyphList._num_elements);
00467903          uint32_t m_bitField_1 = this->m_bitField;
00467903          
00467910          if ((0x100 & m_bitField_1) == 0)
00467910          {
00467914              this->m_bitField = (m_bitField_1 | 0x100);
0046791d              /* tailcall */
0046791d              return UIRegion::MakeRootDirtyHere(this);
00467910          }
004678db      }
004678d0  }

00467924              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00467930  void __fastcall UIElement_Text::Deselect(class UIElement_Text* this)

00467930  {
00467930      class UIElement_Text* this_1 = this;
00467930      
0046793a      if (this_1->m_bitField < 0)
0046793a      {
00467942          uint32_t ecx_1 = (this_1->m_bitField & 0xffffff7f);
0046794c          this_1->m_bitField = ecx_1;
0046794c          
00467952          if ((ecx_1 & 0x40) != 0)
00467959              this_1->m_bitField = (ecx_1 & 0xffffffbf);
00467959          
00467963          this_1 = UIElement_Text::SetSelecting(this_1, 0);
00467968          this_1->m_nSelectionStart = 0;
00467972          this_1->m_nSelectionEnd = 0;
0046793a      }
0046793a      
0046797c      uint32_t m_bitField = this_1->m_bitField;
0046797c      
00467989      if ((0x100 & m_bitField) != 0)
0046799a          return;
0046799a      
0046798d      this_1->m_bitField = (m_bitField | 0x100);
00467995      /* tailcall */
00467995      return UIRegion::MakeRootDirtyHere(this_1);
00467930  }

0046799b                                                                                   90 90 90 90 90                             .....

004679a0  class PStringBase<unsigned short>* __thiscall UIElement_Text::GetSelectedText(class UIElement_Text const* this, class PStringBase<unsigned short>* __return)

004679a0  {
004679a3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004679b0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004679bb      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004679d0      uint32_t var_8;
004679d0      uint32_t var_4;
004679d0      
004679d0      if (UIElement_Text::GetSelection(this, &var_4, &var_8) != 0)
004679e9          GlyphList::InqText(&this->m_glyphList, var_4, var_8, 0, &PStringBase<unsigned short>::s_NullBuffer_2);
004679e9      
004679ee      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
004679f6      __return->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_3;
004679fc      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
00467a02      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
00467a02      
00467a15      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00467a1d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00467a1d      
00467a27      return __return;
004679a0  }

00467a2a                                90 90 90 90 90 90                                                            ......

00467a30  void __thiscall UIElement_Text::ResizeTo(class UIElement_Text* this, int32_t const arg2, int32_t const arg3)

00467a30  {
00467a35      int32_t eax = UIRegion::GetWidth(this);
00467a3e      int32_t eax_1 = UIRegion::GetHeight(this);
00467a51      UIElement_Scrollable::ResizeTo(this, arg2, arg3);
00467a58      int32_t eax_3 = UIRegion::GetWidth(this);
00467a5f      int32_t eax_4;
00467a5f      
00467a5f      if (eax == eax_3)
00467a63          eax_4 = UIRegion::GetHeight(this);
00467a63      
00467a6a      if ((eax != eax_3 || eax_1 != eax_4))
00467a6a      {
00467a6e          UIElement_Text::DetermineMarginValues(this);
00467a73          uint32_t m_bitField = this->m_bitField;
00467a73          
00467a80          if ((0x100 & m_bitField) == 0)
00467a80          {
00467a84              this->m_bitField = (m_bitField | 0x100);
00467a8c              UIRegion::MakeRootDirtyHere(this);
00467a80          }
00467a6a      }
00467a30  }

00467a97                                                                       90 90 90 90 90 90 90 90 90                         .........

00467aa0  void __thiscall UIElement_Text::DrawSelf(class UIElement_Text* this, class Box2D const* arg2, class Box2D const* arg3, class SmartArray<Box2D,1> const* arg4, class UISurface* arg5)

00467aa0  {
00467ac9      UIRegion::DrawSelf(this, arg2, arg3, arg4, arg5);
00467ac9      
00467ad0      if (arg5 != 0)
00467ad0      {
00467ad6          int32_t m_x0_1 = arg3->m_x0;
00467adc          int32_t m_x0 = arg2->m_x0;
00467ade          int32_t m_y0_2 = arg2->m_y0;
00467ade          
00467aee          if (((arg3->m_x1 - m_x0_1) + 1) > 0)
00467aee          {
00467af4              int32_t m_y0_1 = arg3->m_y0;
00467af4              
00467aff              if (((arg3->m_y1 - m_y0_1) + 1) > 0)
00467aff              {
00467b0d                  int32_t m_iScrollableY = this->m_iScrollableY;
00467b13                  int32_t var_7c = ((m_x0 - this->m_iScrollableX) - m_x0_1);
00467b2d                  int32_t var_6c;
00467b2d                  uint32_t var_68;
00467b2d                  uint8_t eax_5 = UIElement_Text::GetSelection(this, &var_68, &var_6c);
00467b2d                  
00467b40                  if (this->m_glyphList.m_glyphLines.m_num != 0)
00467b40                  {
00467b46                      int32_t m_x1 = arg3->m_x1;
00467b49                      int32_t m_x0_2 = arg3->m_x0;
00467b4c                      int32_t m_y1 = arg3->m_y1;
00467b4f                      int32_t var_5c = 0;
00467b53                      int32_t var_58_1 = 0;
00467b5e                      int32_t m_y0 = arg3->m_y0;
00467b69                      int32_t var_50_1 = (m_y1 - m_y0);
00467b77                      int32_t var_54_1 = (m_x1 - m_x0_2);
00467b7e                      int32_t var_b4 = m_y0;
00467b82                      UISurface::PrepareSurface(arg5);
00467ba1                      int32_t var_4c;
00467ba1                      SurfaceWindow::SurfaceWindow(&var_4c, arg5->m_pLocalSurface, m_x0_2, var_b4, m_x1, m_y1);
00467ba1                      
00467bb7                      if (SurfaceWindow::Lock(&var_4c, 0) != 0)
00467bb7                      {
00467bbf                          UISurface::PrepareSurface(arg5);
00467bcb                          int32_t var_b0_1 = 1;
00467bcb                          
00467bd3                          if ((this->m_bitField & 0x10) != 0)
00467bd5                              var_b0_1 = 0;
00467bd5                          
00467bd9                          class Font* m_curFontObj = this->m_curFontObj;
00467bdf                          int32_t ecx_8 = 0;
00467be1                          int32_t ebx_4 = 0;
00467be5                          int32_t var_a0_1 = 0;
00467be9                          int32_t var_84_1 = 0;
00467bed                          uint32_t maxCharHeight_1;
00467bed                          
00467bed                          if (m_curFontObj == 0)
00467bf4                              maxCharHeight_1 = 0;
00467bed                          else
00467bef                              maxCharHeight_1 = m_curFontObj->maxCharHeight;
00467bef                          
00467bf6                          uint32_t maxCharHeight = maxCharHeight_1;
00467bff                          int32_t var_94;
00467bff                          void var_20;
00467bff                          
00467bff                          if (var_b0_1 < 2)
00467bff                          {
00467f72                              bool cond:5_1;
00467f72                              
00467f72                              do
00467f72                              {
00467c0b                                  int32_t eax_9;
00467c0b                                  
00467c0b                                  if (this->m_cxAdjustedLineNumber != 0)
00467c1b                                      eax_9 = this->m_glyphList.m_glyphLines.m_data->m_nLineWidth;
00467c0b                                  else
00467c0d                                      eax_9 = this->m_cxAdjustedLineSize;
00467c0d                                  
00467c23                                  int32_t eax_10 = UIElement_Text::CalcJustification(this, eax_9, 1);
00467c2e                                  class Font* m_curFontObj_1 = this->m_curFontObj;
00467c34                                  int32_t edi_3 = (eax_10 + var_7c);
00467c38                                  uint32_t maxCharHeight_2;
00467c38                                  
00467c38                                  if (m_curFontObj_1 == 0)
00467c3f                                      maxCharHeight_2 = 0xc;
00467c38                                  else
00467c3a                                      maxCharHeight_2 = m_curFontObj_1->maxCharHeight;
00467c3a                                  
00467c44                                  int32_t m_iScrollableHeight = this->m_iScrollableHeight;
00467c4a                                  var_b4 = maxCharHeight_2;
00467c50                                  int32_t m_iScrollableHeight_1 = m_iScrollableHeight;
00467c54                                  int32_t* eax_11 = &var_b4;
00467c54                                  
00467c58                                  if (m_iScrollableHeight >= maxCharHeight_2)
00467c5a                                      eax_11 = &m_iScrollableHeight_1;
00467c5a                                  
00467c64                                  int32_t eax_12 = UIElement_Text::CalcJustification(this, *(uint32_t*)eax_11, 0);
00467c6d                                  int16_t* _head = this->m_glyphList.m_glyphList._head;
00467c7e                                  int32_t ecx_13 = (eax_12 + ((m_y0_2 - m_iScrollableY) - m_y0_1));
00467c80                                  uint32_t edx_10 = 0;
00467c84                                  int32_t var_c0_1 = ecx_13;
00467c88                                  int32_t var_9c_1 = 0;
00467c8c                                  uint32_t var_a8_1 = 0;
00467c90                                  int32_t m_nLineHeight = this->m_glyphList.m_glyphLines.m_data->m_nLineHeight;
00467c94                                  char var_c1_1 = 0;
00467c94                                  
00467c98                                  if (_head != 0)
00467c98                                  {
00467c9e                                      m_iScrollableHeight_1 = 0;
00467c9e                                      
00467ee6                                      do
00467ee6                                      {
00467ca8                                          if (edx_10 == this->m_nTruncationPos)
00467ca8                                          {
00467caa                                              _head = this->m_glTruncate.m_glyphList._head;
00467cb0                                              var_c1_1 = 1;
00467ca8                                          }
00467ca8                                          
00467cb5                                          class Font* ebp_1 = *(uint32_t*)((char*)_head + 0x1c);
00467cba                                          class Font* var_a4_1 = ebp_1;
00467cba                                          
00467cbe                                          if (ebp_1 != 0)
00467cbe                                          {
00467cc4                                              uint32_t eax_14;
00467cc4                                              eax_14 = var_c1_1;
00467cc4                                              
00467cd9                                              if ((eax_14 == 0 && this->m_glyphList.m_glyphLines.m_num > (var_9c_1 + 1)))
00467cd9                                              {
00467ce5                                                  void* ebp_2 = ((this->m_glyphList.m_glyphLines.m_data + m_iScrollableHeight_1) + 0x10);
00467ce5                                                  
00467cf0                                                  if (var_a8_1 >= *(uint32_t*)((char*)ebp_2 + 4))
00467cf0                                                  {
00467d01                                                      m_iScrollableHeight_1 += 0x10;
00467d0d                                                      bool cond:9_1 = (var_9c_1 + 1) != this->m_cxAdjustedLineNumber;
00467d0f                                                      var_9c_1 += 1;
00467d13                                                      var_c0_1 += m_nLineHeight;
00467d17                                                      int32_t m_cxAdjustedLineSize;
00467d17                                                      
00467d17                                                      if (cond:9_1)
00467d21                                                          m_cxAdjustedLineSize = *(uint32_t*)((char*)ebp_2 + 8);
00467d17                                                      else
00467d19                                                          m_cxAdjustedLineSize = this->m_cxAdjustedLineSize;
00467d19                                                      
00467d30                                                      edi_3 = (UIElement_Text::CalcJustification(this, m_cxAdjustedLineSize, 1) + var_7c);
00467d37                                                      m_nLineHeight = *(uint32_t*)((char*)ebp_2 + 0xc);
00467cf0                                                  }
00467cf0                                                  
00467d3b                                                  ebp_1 = var_a4_1;
00467cd9                                              }
00467cd9                                              
00467d49                                              if (var_a8_1 == this->m_nCursorPos)
00467d49                                              {
00467d52                                                  var_a0_1 = edi_3;
00467d56                                                  var_84_1 = var_c0_1;
00467d5a                                                  maxCharHeight = ebp_1->maxCharHeight;
00467d49                                              }
00467d49                                              
00467d67                                              if (Glyph::IsNewLine(_head) == 0)
00467d67                                              {
00467d73                                                  uint32_t var_98;
00467d73                                                  
00467d73                                                  if (var_b0_1 != 0)
00467d73                                                  {
00467e21                                                      ebp_1 = *(uint16_t*)_head;
00467e4b                                                      var_98 = SurfaceWindow::DrawCharacter(&var_4c, edi_3, var_c0_1, var_a4_1, ebp_1, RGBAColor::GetColor32(&_head[6]), 0x1000, this->m_curOutlineColor);
00467e4f                                                      eax_14 = eax_5;
00467e4f                                                      
00467e69                                                      if ((eax_14 != 0 && (var_a8_1 >= var_68 && var_a8_1 < var_6c)))
00467e69                                                      {
00467e71                                                          var_94 = 0;
00467e75                                                          int32_t var_90_1 = 0;
00467e79                                                          int32_t var_8c_1 = 0;
00467e7d                                                          int32_t var_88_1 = 0;
00467e99                                                          int32_t* var_d8_6 = &var_94;
00467e99                                                          
00467eb0                                                          if (Box2D::Intersection(&var_5c, Box2D::Box2D(&var_20, edi_3, var_c0_1, var_98, m_nLineHeight), &var_20) != 0)
00467ecf                                                              SurfaceWindow::NotColorBits(&var_4c, var_94, var_90_1, (var_8c_1 + 1), (var_88_1 + 1));
00467e69                                                      }
00467d73                                                  }
00467d73                                                  else if (ebp_1->m_pBackgroundSurface == 0)
00467d7e                                                  {
00467db9                                                      int32_t j = 0xffffffff;
00467dbc                                                      var_b4 = 0xffffffff;
00467dbc                                                      
00467e14                                                      do
00467e14                                                      {
00467e0a                                                          for (int32_t k = 0xffffffff; k <= 1; k += 1)
00467e0a                                                          {
00467dc9                                                              if ((k != 0 || j != 0))
00467dc9                                                              {
00467df9                                                                  eax_14 = SurfaceWindow::DrawCharacter(&var_4c, (edi_3 + k), (j + var_c0_1), var_a4_1, *(uint16_t*)_head, this->m_curOutlineColor, 0x9000, 0xff000000);
00467dfe                                                                  j = var_b4;
00467e02                                                                  var_98 = eax_14;
00467dc9                                                              }
00467e0a                                                          }
00467e0a                                                          
00467e0c                                                          j += 1;
00467e10                                                          var_b4 = j;
00467e14                                                      } while (j <= 1);
00467d7e                                                  }
00467d7e                                                  else
00467d7e                                                  {
00467d86                                                      ebp_1 = *(uint16_t*)_head;
00467db0                                                      var_98 = SurfaceWindow::DrawCharacter(&var_4c, edi_3, var_c0_1, var_a4_1, ebp_1, RGBAColor::GetColor32(&_head[6]), 0x7000, this->m_curOutlineColor);
00467d7e                                                  }
00467d7e                                                  
00467ed4                                                  edi_3 += var_98;
00467d67                                              }
00467cbe                                          }
00467cbe                                          
00467edc                                          _head = *(uint32_t*)((char*)_head + 0x24);
00467edf                                          edx_10 = (var_a8_1 + 1);
00467ee2                                          var_a8_1 = edx_10;
00467ee6                                      } while (_head != 0);
00467ee6                                      
00467eec                                      ecx_13 = var_c0_1;
00467c98                                  }
00467c98                                  
00467ef8                                  if (edx_10 == this->m_nCursorPos)
00467ef8                                  {
00467f07                                      if (this->m_glyphList.m_glyphLines.m_num > (var_9c_1 + 1))
00467f07                                      {
00467f11                                          void* ebx_9 = &this->m_glyphList.m_glyphLines.m_data[(var_9c_1 + 1)];
00467f11                                          
00467f1a                                          if (edx_10 >= *(uint32_t*)((char*)ebx_9 + 4))
00467f1a                                          {
00467f20                                              var_c0_1 = (ecx_13 + m_nLineHeight);
00467f2a                                              int32_t m_cxAdjustedLineSize_1;
00467f2a                                              
00467f2a                                              if ((var_9c_1 + 1) != this->m_cxAdjustedLineNumber)
00467f34                                                  m_cxAdjustedLineSize_1 = *(uint32_t*)((char*)ebx_9 + 8);
00467f2a                                              else
00467f2c                                                  m_cxAdjustedLineSize_1 = this->m_cxAdjustedLineSize;
00467f2c                                              
00467f46                                              edi_3 = (UIElement_Text::CalcJustification(this, m_cxAdjustedLineSize_1, 1) + var_7c);
00467f4a                                              m_nLineHeight = *(uint32_t*)((char*)ebx_9 + 0xc);
00467f1a                                          }
00467f07                                      }
00467f07                                      
00467f52                                      var_84_1 = var_c0_1;
00467f5c                                      var_a0_1 = edi_3;
00467f5c                                      
00467f60                                      if (m_nLineHeight != 0)
00467f62                                          maxCharHeight = m_nLineHeight;
00467ef8                                  }
00467ef8                                  
00467f6b                                  cond:5_1 = (var_b0_1 + 1) < 2;
00467f6e                                  var_b0_1 += 1;
00467f72                              } while (cond:5_1);
00467f78                              ebx_4 = var_84_1;
00467f7c                              ecx_8 = var_a0_1;
00467bff                          }
00467bff                          
00467f80                          var_7c = ecx_8;
00467f84                          int32_t var_74_1 = ecx_8;
00467f92                          int32_t var_78_2 = ebx_4;
00467f96                          int32_t var_70_1 = ((maxCharHeight + ebx_4) - 1);
00467f9a                          uint8_t eax_36;
00467f9a                          class Box2D* edx_23;
00467f9a                          eax_36 = UIElement::GetHasFocus(this);
00467f9a                          
00467fa1                          if (eax_36 != 0)
00467fa1                          {
00467fa3                              uint16_t m_bitField = ((int16_t)this->m_bitField);
00467fa3                              
00467fb0                              if (((m_bitField & 1) != 0 && (*(uint8_t*)((char*)m_bitField)[1] & 2) != 0))
00467fb0                              {
00467fb6                                  int32_t* var_d8_8 = &var_94;
00467fc3                                  var_94 = 0;
00467fc7                                  int32_t var_90_2 = 0;
00467fcb                                  int32_t var_8c_2 = 0;
00467fcf                                  int32_t var_88_2 = 0;
00467fcf                                  
00467fda                                  if (Box2D::Intersection(&var_5c, edx_23, &var_7c) != 0)
00467ffe                                      SurfaceWindow::FillArea(&var_4c, &this->m_curFontColor, var_94, var_90_2, var_8c_2, var_88_2);
00467fb0                              }
00467fa1                          }
00467fa1                          
0046800f                          int32_t var_10;
00468003                          this->vtable->GetSurfaceBox(&var_10);
0046803e                          int32_t var_c;
0046803e                          int32_t eax_43 = (((var_c - m_y0_2) + arg3->m_y0) + ebx_4);
00468042                          int32_t ecx_51 = (((arg3->m_x0 - m_x0) + var_10) + var_a0_1);
00468042                          
00468055                          if (&this->m_lastCursor != &var_20)
00468055                          {
00468044                              this->m_lastCursor.m_x0 = ecx_51;
00468044                              this->m_lastCursor.m_x1 = ecx_51;
00468044                              this->m_lastCursor.m_y0 = eax_43;
00468044                              this->m_lastCursor.m_y1 = ((((maxCharHeight + ebx_4) - 1) - ebx_4) + eax_43);
00468055                          }
00468055                          
0046806b                          if (UIElement::GetHasFocus(this) != 0)
0046806b                          {
0046807e                              int32_t var_d8_11 = (UIRegion::GetScreenY0(this) + this->m_lastCursor.m_y0);
00468081                              int32_t eax_47;
00468081                              class IDClass<_tagDataID,32,0>* ecx_55;
00468081                              eax_47 = UIRegion::GetScreenX0(this);
00468088                              int32_t var_dc_12 = (eax_47 + this->m_lastCursor.m_x0);
00468089                              IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ecx_55);
0046806b                          }
0046806b                          
00468098                          SurfaceWindow::Unlock(&var_4c);
00467bb7                      }
00467bb7                      
004680a4                      var_4c = 0x798d14;
004680af                      SurfaceWindow::End(&var_4c);
00467b40                  }
00467aff              }
00467aee          }
00467ad0      }
00467aa0  }

004680c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004680d0  void __thiscall UIElement_Text::SetEditable(class UIElement_Text* this, uint8_t arg2)

004680d0  {
004680d1      int32_t ebx;
004680d1      ebx = arg2;
004680d8      uint16_t m_bitField = ((int16_t)this->m_bitField);
004680e5      char ecx = -(((m_bitField & 1) - 1));
004680e5      
004680ed      if (ebx != ((ecx - ecx) + 1))
004680ed      {
004680f1          if (ebx == 0)
004680f1          {
00468105              if ((UIElement::GetHasFocus(this) != 0 && (this->m_bitField & 4) == 0))
00468107                  this->vtable->RelinquishFocus();
004680f1          }
004680f1          else if ((*(uint8_t*)((char*)m_bitField)[1] & 8) != 0)
00468116          {
0046811e              uint32_t edx_3 = (this->m_bitField & 0xfffff7ff);
0046812d              this->m_bitField = edx_3;
0046812d              
00468133              if ((0x100 & edx_3) == 0)
00468133              {
00468137                  this->m_bitField = (edx_3 | 0x100);
0046813f                  UIRegion::MakeRootDirtyHere(this);
00468133              }
00468116          }
00468116          
00468146          uint32_t m_bitField_1 = this->m_bitField;
00468146          
0046814c          if (ebx != 0)
0046814c          {
00468151              this->m_bitField = (m_bitField_1 | 1);
00468159              return;
0046814c          }
0046814c          
0046815f          this->m_bitField = (m_bitField_1 & 0xfffffffe);
004680ed      }
004680d0  }

0046816a                                90 90 90 90 90 90                                                            ......

00468170  void __thiscall UIElement_Text::SetOneLine(class UIElement_Text* this, uint8_t arg2)

00468170  {
00468183      if (arg2 != (((int8_t)this->m_bitField) & 2) == 2)
00468183      {
00468187          uint32_t m_bitField = this->m_bitField;
0046818d          uint32_t eax_1;
0046818d          
0046818d          if (arg2 == 0)
00468194              eax_1 = (m_bitField & 0xfffffffd);
0046818d          else
0046818f              eax_1 = (m_bitField | 2);
0046818f          
00468197          this->m_bitField = eax_1;
0046819d          uint32_t m_bitField_1 = this->m_bitField;
0046819d          
004681aa          if ((0x100 & m_bitField_1) == 0)
004681aa          {
004681ae              this->m_bitField = (m_bitField_1 | 0x100);
004681b4              UIRegion::MakeRootDirtyHere(this);
004681aa          }
00468183      }
00468170  }

004681bc                                                                                      90 90 90 90                              ....

004681c0  void __thiscall UIElement_Text::SetSelectable(class UIElement_Text* this, uint8_t arg2)

004681c0  {
004681c1      int32_t ebx;
004681c1      ebx = arg2;
004681c8      uint16_t m_bitField = ((int16_t)this->m_bitField);
004681c8      
004681db      if (ebx != (m_bitField & 4) == 4)
004681db      {
004681e3          if (ebx == 0)
004681e3          {
004681f7              if ((UIElement::GetHasFocus(this) != 0 && (this->m_bitField & 1) == 0))
004681f9                  this->vtable->RelinquishFocus();
004681e3          }
004681e3          else if ((*(uint8_t*)((char*)m_bitField)[1] & 8) != 0)
00468208          {
00468210              uint32_t edx_2 = (this->m_bitField & 0xfffff7ff);
0046821f              this->m_bitField = edx_2;
0046821f              
00468225              if ((0x100 & edx_2) == 0)
00468225              {
00468229                  this->m_bitField = (edx_2 | 0x100);
00468231                  UIRegion::MakeRootDirtyHere(this);
00468225              }
00468208          }
00468208          
00468238          uint32_t m_bitField_1 = this->m_bitField;
0046823e          uint32_t eax_2;
0046823e          
0046823e          if (ebx == 0)
00468245              eax_2 = (m_bitField_1 & 0xfffffffb);
0046823e          else
00468240              eax_2 = (m_bitField_1 | 4);
00468240          
0046824a          this->m_bitField = eax_2;
0046824a          
00468250          if (eax_2 < 0)
00468250          {
00468254              uint32_t ecx_7 = (eax_2 & 0xffffff7f);
0046825a              eax_2 = ecx_7;
0046825e              this->m_bitField = ecx_7;
0046825e              
00468264              if ((eax_2 & 0x40) != 0)
0046826b                  this->m_bitField = (ecx_7 & 0xffffffbf);
0046826b              
00468276              uint32_t edx_3 = UIElement_Text::SetSelecting(this, 0);
0046827b              this->m_nSelectionStart = edx_3;
00468281              this->m_nSelectionEnd = edx_3;
00468250          }
004681db      }
004681c0  }

0046828c                                      90 90 90 90                                                              ....

00468290  void __thiscall UIElement_Text::SetFontDIDNum(class UIElement_Text* this, uint32_t arg2)

00468290  {
0046829e      UIElement_Text::SetFontDIDHelper(this, 0x1a, &this->m_curFontObj, arg2);
00468290  }

004682a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004682b0  void __thiscall UIElement_Text::SetFontColorNum(class UIElement_Text* this, uint32_t arg2)

004682b0  {
004682c2      UIElement_Text::SetFontColorHelper(this, 0x1b, &this->m_curFontColor, arg2);
004682d3      UIElement_Text::SetFontColorHelper(this, 0x1d, &this->m_curTagFontColor, arg2);
004682b0  }

004682dd                                                                                         90 90 90                               ...

004682e0  uint8_t __thiscall UIElement_Text::MoveUpDown(class UIElement_Text* this, uint8_t arg2, uint32_t arg3, uint32_t* arg4)

004682e0  {
004682e5      uint32_t ebp = arg3;
00468302      uint32_t var_14 = 0;
00468306      int32_t var_4 = 0;
00468306      
00468311      if (GlyphList::FindCurrentLine(&this->m_glyphList, ebp, &var_14, &var_4) != 0)
00468311      {
00468319          uint32_t eax_1 = var_14;
00468319          
0046831d          if (arg2 == 0)
0046831d          {
00468371              if (eax_1 == (this->m_glyphList.m_glyphLines.m_num - 1))
00468371              {
00468379              label_468379:
00468379                  *(uint32_t*)arg4 = ebp;
0046837c                  uint32_t* eax_3;
0046837c                  eax_3 = 1;
00468382                  return 1;
00468371              }
0046831d          }
0046831d          else if (eax_1 == 0)
00468321              goto label_468379;
00468311      }
00468311      
0046832b      uint8_t result = 0;
0046832d      arg3 = 0;
0046832d      
0046833c      if (GlyphList::FindPixelsFromPos(&this->m_glyphList, ebp, &arg3) != 0)
0046833c      {
00468344          uint32_t var_10 = 0;
00468348          uint32_t var_c = 0;
00468352          uint8_t result_1;
00468352          
00468352          if (arg2 == 0)
00468392              result_1 = GlyphList::FindNextLine(&this->m_glyphList, ebp, &var_10, &var_c);
00468352          else
00468361              result_1 = GlyphList::FindPrevLine(&this->m_glyphList, ebp, &var_10, &var_c);
00468361          
00468397          result = result_1;
00468397          
0046839b          if (result != 0)
0046839b          {
004683ab              arg2 = 0;
004683af              GlyphList::GetGlyphLineWidth(&this->m_glyphList, var_14, &arg2);
004683bd              int32_t eax_4 = UIElement_Text::CalcJustification(this, arg2, 1);
004683c6              uint32_t ecx_7 = var_10;
004683d4              arg3 += eax_4;
004683d8              uint32_t var_8 = 0;
004683dc              GlyphList::GetGlyphLineWidth(&this->m_glyphList, ecx_7, &var_8);
004683ea              int32_t eax_5 = UIElement_Text::CalcJustification(this, var_8, 1);
004683f3              int32_t ecx_11 = (arg3 - eax_5);
004683fd              arg3 = ecx_11;
0046840d              return GlyphList::FindPosFromLineAndPixels(&this->m_glyphList, var_10, ecx_11, 1, arg4);
0046839b          }
0046833c      }
0046833c      
00468418      return result;
004682e0  }

0046841b                                                                                   90 90 90 90 90                             .....

00468420  void __fastcall UIElement_Text::RecalculateGlyphList(class UIElement_Text* this)

00468420  {
00468432      if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 1) != 0)
00468432      {
0046843c          int32_t var_14 = 0;
00468440          int32_t var_18 = 0;
00468449          int32_t var_10;
00468444          this->vtable->GetSurfaceBox(&var_10);
00468499          int32_t var_8;
00468499          int32_t ebx_1;
00468499          ebx_1 = GlyphList::Recalculate(&this->m_glyphList, ((((var_8 - this->m_margR) - this->m_margL) - var_10) + 1), (((int8_t)this->m_bitField) & 2) == 2, &var_14, &var_18);
004684a1          int32_t ecx_6 = var_18;
004684a7          int32_t m_margU = this->m_margU;
004684ad          var_14 += (this->m_margR + this->m_margL);
004684c1          bool cond:0_1 = (*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 8) == 0;
004684c4          var_18 = (ecx_6 + (this->m_margD + m_margU));
004684c4          
004684c8          if (cond:0_1)
004684c8          {
004684e0              this->m_nTruncationPos = 0xffffffff;
004684e6              this->m_cxAdjustedLineNumber = 0xffffffff;
004684c8          }
004684c8          else
004684d6              UIElement_Text::RecalculateTruncation(this, &var_14, &var_18);
004684d6          
004684f8          UIElement_Scrollable::ResizeScrollableArea(this, var_14, var_18);
0046850f          UIElement_Scrollable::SetScrollableXY(this, this->m_iScrollableX, this->m_iScrollableY, 1);
00468514          uint32_t m_bitField = this->m_bitField;
00468514          
0046851d          if ((*(uint8_t*)((char*)m_bitField)[1] & 1) != 0)
00468524              this->m_bitField = (m_bitField & 0xfffffeff);
00468524          
0046852a          m_bitField = ebx_1;
00468432      }
00468420  }

00468532                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00468540  void __thiscall UIElement_Text::SetFitToText(class UIElement_Text* this, uint8_t arg2)

00468540  {
00468546      uint32_t m_bitField = this->m_bitField;
00468546      
0046854c      if (arg2 == 0)
0046854c      {
00468566          this->m_bitField = (m_bitField & 0xfffffbff);
0046856c          return;
0046854c      }
0046854c      
00468553      this->m_bitField = (m_bitField | 0x400);
00468559      UIElement_Text::ResizeToPaper(this);
00468540  }

0046856f                                               90                                                                 .

00468570  void __thiscall UIElement_Text::UIElement_Text(class UIElement_Text* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00468570  {
00468581      UIElement_Scrollable::UIElement_Scrollable(this, arg2, arg3);
00468586      this->vtable = &CInputHandler::`vftable';
00468596      this->vtable = 0x79c140;
0046859c      this->vtable = &UIOption_Menu::`vftable';
004685a6      GlyphList::GlyphList(&this->m_glyphList);
004685b3      this->m_nCursorPos = 0;
004685b9      this->m_nSelectionStart = 0;
004685bf      this->m_nSelectionEnd = 0;
004685c5      GlyphList::GlyphList(&this->m_glTruncate);
004685cd      this->m_nTruncationPos = 0xffffffff;
004685d3      this->m_cxAdjustedLineNumber = 0xffffffff;
004685d9      this->m_cxTrailer = 0;
004685df      this->m_cyTrailer = 0;
004685e5      this->m_cxAdjustedLineSize = 0;
004685eb      this->m_bitField = 0x300;
004685f5      this->m_eHorizontalJustification = 2;
004685ff      this->m_eVerticalJustification = 4;
00468609      this->m_filter = nullptr;
00468614      this->m_curFontColor.r = RGBAColor_White.r;
00468614      this->m_curFontColor.g = RGBAColor_White.g;
00468614      this->m_curFontColor.b = RGBAColor_White.b;
00468614      this->m_curFontColor.a = RGBAColor_White.a;
00468636      this->m_curFontObj = nullptr;
00468641      this->m_curTagFontColor.r = RGBAColor_White.r;
00468641      this->m_curTagFontColor.g = RGBAColor_White.g;
00468641      this->m_curTagFontColor.b = RGBAColor_White.b;
00468641      this->m_curTagFontColor.a = RGBAColor_White.a;
00468663      RGBAColor_Black.a;
0046866f      int32_t eax_4 = _ftol2();
00468674      RGBAColor_Black.r;
00468685      int32_t eax_5 = _ftol2();
0046868a      RGBAColor_Black.g;
0046869b      int32_t eax_6 = _ftol2();
004686a0      RGBAColor_Black.b;
004686b1      int32_t eax_7;
004686b1      uint32_t ecx_8;
004686b1      int32_t edx_2;
004686b1      eax_7 = _ftol2();
004686c5      this->m_lastCursorMoveTime = 0f;
004686cb      this->m_curOutlineColor = ((((((eax_4 << 8) | eax_5) << 8) | eax_6) << 8) | eax_7);
004686d1      this->m_margU = 0;
004686d7      this->m_margD = 0;
004686dd      this->m_margL = 0;
004686e3      this->m_margR = 0;
004686e9      *(uint32_t*)((char*)this->m_lastCursorMoveTime)[4] = 0xbff00000;
004686f1      this->m_lastFlashFlipTime = 0f;
004686f7      *(uint32_t*)((char*)this->m_lastFlashFlipTime)[4] = 0xbff00000;
004686fd      int32_t var_10_1 = 0x2e;
004686ff      __builtin_memset(&this->m_lastCursor, 0, 0x1c);
00468717      int32_t var_14_1 = 9;
00468719      int32_t var_18 = 0x18;
0046872d      int32_t eax_8;
0046872d      uint32_t ecx_9;
0046872d      int32_t edx_3;
0046872d      eax_8 = DBObj::GetByEnum(eax_7, edx_2, ecx_8);
00468737      this->m_curFontObj = eax_8;
00468737      
0046873d      if (eax_8 == 0)
0046873d      {
0046873f          int32_t var_10_2 = 0x2e;
00468741          int32_t var_14_2 = 9;
00468743          int32_t var_18_1 = 3;
0046874d          this->m_curFontObj = DBObj::GetByEnum(eax_8, edx_3, ecx_9);
0046873d      }
0046873d      
00468755      UIElement_Text::DetermineMarginValues(this);
0046875c      UIElement_Text::ClearAllText(this);
00468570  }

00468769                             90 90 90 90 90 90 90                                                           .......

00468770  void* __thiscall UIElement_Text::`scalar deleting destructor'(class UIElement_Text* this, uint32_t arg2)

00468770  {
00468773      UIElement_Text::~UIElement_Text(this);
00468773      
0046877d      if ((arg2 & 1) != 0)
00468780          operator delete(this);
00468780      
0046878b      return this;
00468770  }

0046878e                                            90 90                                                                ..

00468790  class UIElement* UIElement_Text::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00468790  {
00468795      void* eax = operator new(0x710);
00468795      
0046879f      if (eax == 0)
004687b5          return 0;
004687b5      
004687b2      return UIElement_Text::UIElement_Text(eax, arg1, arg2);
00468790  }

004687b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004687c0  enum UIElementMessageListenResult __thiscall UIElement_Text::ListenToElementMessage(class UIElement_Text* this, struct UIElementMessageInfo const* arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004687c0  {
004687c0      int32_t esi;
004687c0      int32_t var_4 = esi;
004687c1      int32_t edi;
004687c1      int32_t var_8 = edi;
004687c1      int32_t* esp_1 = &var_8;
004687c1      
004687d7      if ((arg2->pElement == this && arg2->idMessage == 0x2f))
004687d7      {
004687dd          uint32_t m_bitField = this->m_bitField;
004687e5          int32_t eax_2 = (m_bitField & 1);
004687e5          
004687ed          if ((eax_2 != 0 || (m_bitField & 4) != 0))
004687ed          {
004687f6              if (eax_2 == 1)
004687f6              {
00468807                  int32_t var_c_1 = 2;
00468809                  bool cond:0_1 = arg2->dwParam1 == 0;
0046880b                  struct ICIDM::VTable* vtable = ICIDM::s_cidm->vtable;
0046880d                  struct CInputHandler::VTable** var_10 = &this->vtable;
0046880d                  esp_1 = &var_10;
0046880d                  
0046880e                  if (cond:0_1)
00468824                      ArgumentParser::OnCommandLineEvaluationDone(vtable->UnregisterInputHandler());
0046880e                  else
0046880e                  {
00468810                      vtable->RegisterInputHandler();
00468815                      UIElement_Text::IMETurnOn(this);
0046881a                      KeyStone::LoseFocus();
0046880e                  }
004687f6              }
004687f6              
0046882e              if (arg2->dwParam1 != 0)
0046882e              {
00468836                  struct ICIDM::VTable* vtable_1 = ICIDM::s_cidm->vtable;
00468838                  *(uint32_t*)((char*)esp_1 - 4) = 1;
0046883a                  vtable_1->SetTextMode();
00468840                  *(uint32_t*)((char*)esp_1 - 8) = 3;
00468844                  UIListener::RegisterForGlobalMessage(this);
00468849                  *(uint32_t*)((char*)esp_1 - 8) = arg2;
0046884c                  int32_t eax_5 = UIElement_Scrollable::ListenToElementMessage(this);
00468851                  *(uint32_t*)((char*)esp_1 - 4);
00468852                  *(uint32_t*)esp_1;
00468853                  return eax_5;
0046882e              }
0046882e              
00468858              UIElement_Text::Deselect(this);
00468863              struct ICIDM::VTable* vtable_2 = ICIDM::s_cidm->vtable;
00468865              *(uint32_t*)((char*)esp_1 - 4) = 0;
00468867              vtable_2->SetTextMode();
0046886d              *(uint32_t*)((char*)esp_1 - 8) = 3;
00468871              UIListener::UnRegisterForGlobalMessage(this);
00468871              esp_1 -= 4;
004687ed          }
004687d7      }
004687d7      
00468876      *(uint32_t*)((char*)esp_1 - 4) = arg2;
00468879      int32_t eax_6 = UIElement_Scrollable::ListenToElementMessage(this);
0046887e      *(uint32_t*)esp_1;
00468876      esp_1[1];
00468880      return eax_6;
004687c0  }

00468883           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00468890  void __fastcall UIElement_Text::DrawStart(class UIElement_Text* this)

00468890  {
00468890      /* tailcall */
00468890      return UIElement_Text::RecalculateGlyphList(this);
00468890  }

00468895                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004688a0  void __fastcall UIElement_Text::Copy(class UIElement_Text* this)

004688a0  {
004688a0      class UIElement_Text* this_1 = this;
004688a0      
004688aa      if (this->m_bitField < 0)
004688aa      {
004688b0          class UIElement_Text** __return = &this_1;
004688b1          class UIElement_Text** __return_1 = UIElement_Text::GetSelectedText(this, __return);
004688b6          class UIElement_Text* this_2 = this_1;
004688ba          __return = __return_1;
004688be          PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, this_2);
004688c3          Device::SendStringToClipboard(__return);
004688d1          __return = ((char*)this_2 - 0x10);
004688d1          
004688de          if ((InterlockedDecrement(__return) == 0 && this_2 != 0x14))
004688de          {
004688e0              int32_t edx_1 = *(int32_t*)((char*)this_2 + -0x14);
004688e2              __return = 1;
004688e6              *(uint32_t*)edx_1(__return);
004688de          }
004688aa      }
004688a0  }

004688eb                                   90 90 90 90 90                                                             .....

004688f0  int80_t __thiscall UIElement_Text::DeterminePositionFromXY(class UIElement_Text* this, int32_t arg2, int32_t arg3)

004688f0  {
004688f8      int80_t result = UIElement_Text::RecalculateGlyphList(this);
00468903      int32_t m_iScrollableX = this->m_iScrollableX;
0046890e      int32_t ecx_1 = (this->m_iScrollableY + arg3);
0046891b      uint32_t var_8 = 0;
00468923      uint32_t var_4 = 0;
0046892b      GlyphList::FindLineFromY(&this->m_glyphList, ecx_1, &var_8);
0046893c      GlyphList::GetGlyphLineWidth(&this->m_glyphList, var_8, &var_4);
00468956      int32_t ecx_7 = ((m_iScrollableX + arg2) - UIElement_Text::CalcJustification(this, var_4, 1));
00468960      uint32_t ecx_8 = var_8;
00468967      uint32_t var_c = 0;
00468967      
00468976      if (GlyphList::FindPosFromLineAndPixels(&this->m_glyphList, ecx_8, ecx_7, 1, &var_c) == 0)
004689a5          return result;
004689a5      
00468978      uint32_t _num_elements = this->m_glyphList.m_glyphList._num_elements;
0046897e      bool cond:0 = _num_elements < var_c;
00468982      arg3 = _num_elements;
00468986      uint32_t* eax_3 = &arg3;
00468986      
0046898a      if (!(cond:0))
0046898c          eax_3 = &var_c;
0046898c      
00468990      *(uint32_t*)eax_3;
00468998      return result;
004688f0  }

004689a8                          90 90 90 90 90 90 90 90                                                          ........

004689b0  int80_t __thiscall UIElement_Text::InqScrollDelta(class UIElement_Text* this, uint8_t arg2, uint8_t arg3, uint8_t arg4)

004689b0  {
004689b7      int32_t edi = 0;
004689bd      int32_t var_8 = 0;
004689c1      uint32_t eax;
004689c1      int80_t result;
004689c1      result = UIElement_Text::DeterminePositionFromXY(this, 0, 0);
004689d9      uint32_t var_c = 0;
004689dd      int32_t var_4 = 0;
004689e6      bool cond:0 = GlyphList::FindCurrentLine(&this->m_glyphList, eax, &var_c, &var_4) == 0;
004689e8      int32_t ebx;
004689e8      ebx = arg2;
004689ec      int32_t* eax_1;
004689ec      
004689ec      if (!(cond:0))
004689ec      {
004689f0          arg2 = 0;
004689f0          
004689f4          if (ebx == 0)
00468a15              eax_1 = GlyphList::GetGlyphLineHeight(&this->m_glyphList, var_c, &arg2);
004689f4          else
00468a02              eax_1 = GlyphList::GetGlyphLineWidth(&this->m_glyphList, var_c, &arg2);
00468a02          
00468a1c          if (eax_1 != 0)
00468a1c          {
00468a22              int32_t eax_3;
00468a22              
00468a22              if (ebx == 0)
00468a2b                  eax_3 = UIRegion::GetHeight(this);
00468a22              else
00468a24                  eax_3 = UIRegion::GetWidth(this);
00468a24              
00468a30              int32_t ecx_5 = arg2;
00468a34              var_8 = eax_3;
00468a3a              eax_1 = &arg2;
00468a3a              
00468a3e              if (ecx_5 >= eax_3)
00468a40                  eax_1 = &var_8;
00468a40              
00468a44              edi = *(uint32_t*)eax_1;
00468a46              var_8 = edi;
00468a1c          }
004689ec      }
004689ec      
00468a4a      eax_1 = arg4;
00468a4a      
00468a50      if (eax_1 != 0)
00468a50      {
00468a56          int32_t eax_4;
00468a56          
00468a56          if (ebx == 0)
00468a5f              eax_4 = UIRegion::GetHeight(this);
00468a56          else
00468a58              eax_4 = UIRegion::GetWidth(this);
00468a58          
00468a64          int32_t eax_5 = (eax_4 - edi);
00468a66          arg2 = eax_5;
00468a6c          eax_1 = &var_8;
00468a6c          
00468a70          if (eax_5 >= edi)
00468a72              eax_1 = &arg2;
00468a72          
00468a76          *(uint32_t*)eax_1;
00468a50      }
00468a50      
00468a78      eax_1 = arg3;
00468a8b      return result;
004689b0  }

00468a8e                                            90 90                                                                ..

00468a90  void UIElement_Text::Register()

00468a90  {
00468a97      UIElement::RegisterElementClass(0xc, UIElement_Text::Create);
00468a90  }


00468aa0  int80_t __thiscall UIElement_Text::IsPositionInView(class UIElement_Text* this, int32_t const* arg2)

00468aa0  {
00468aac      int32_t const edi = *(uint32_t*)arg2;
00468ab0      int32_t var_c = 0;
00468ab4      int32_t var_8 = 0;
00468ab8      int80_t result = UIElement_Text::RecalculateGlyphList(this);
00468ab8      
00468ad5      if (GlyphList::FindXYFromPosition(&this->m_glyphList, edi, &var_c, &var_8) == 0)
00468b8d          return result;
00468b8d      
00468ae4      int32_t eax_4;
00468ae4      
00468ae4      if ((this->m_bitField & 2) == 0)
00468ae4      {
00468b1d          int32_t eax_5 = UIRegion::GetHeight(this);
00468b30          class Font* m_curFontObj = this->m_curFontObj;
00468b36          eax_4 = ((eax_5 - this->m_margD) - this->m_margU);
00468b3a          int32_t var_4 = eax_4;
00468b3e          uint32_t maxCharHeight;
00468b3e          
00468b3e          if (m_curFontObj == 0)
00468b45              maxCharHeight = 0;
00468b3e          else
00468b40              maxCharHeight = m_curFontObj->maxCharHeight;
00468b40          
00468b47          arg2 = maxCharHeight;
00468b4d          int32_t* ecx_6 = &arg2;
00468b4d          
00468b51          if (maxCharHeight >= eax_4)
00468b53              ecx_6 = &var_4;
00468b53          
00468b57          int32_t m_iScrollableY = this->m_iScrollableY;
00468b5d          int32_t edx_1 = var_8;
00468b5d          
00468b6d          if ((edx_1 >= m_iScrollableY && (*(uint32_t*)ecx_6 + edx_1) <= (m_iScrollableY + eax_4)))
00468b6d          {
00468b71              eax_4 = 1;
00468b77              return result;
00468b6d          }
00468ae4      }
00468ae4      else
00468ae4      {
00468ae6          int32_t eax_2 = UIRegion::GetWidth(this);
00468af7          int32_t m_iScrollableX = this->m_iScrollableX;
00468aff          int32_t ecx_3 = var_c;
00468aff          
00468b10          if ((ecx_3 >= m_iScrollableX && (ecx_3 + 2) <= (m_iScrollableX + ((eax_2 - this->m_margR) - this->m_margL))))
00468b10          {
00468b14              eax_4 = 1;
00468b1a              return result;
00468b10          }
00468ae4      }
00468ae4      
00468b7c      eax_4 = 0;
00468b82      return result;
00468aa0  }


00468b90  int80_t __thiscall UIElement_Text::SetCursorPosition(class UIElement_Text* this, uint32_t arg2, enum UIElement_Text::CursorMovementFlags arg3)

00468b90  {
00468b93      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00468b9b      char eax;
00468b9b      
00468b9b      if (ICIDM::s_cidm_1 == 0)
00468ba4          eax = 0;
00468b9b      else
00468b9f          eax = ICIDM::s_cidm_1->vtable->ShiftKeyDown();
00468b9f      
00468ba6      enum UIElement_Text::CursorMovementFlags edx = arg3;
00468bad      uint8_t m_bitField_2;
00468bad      
00468bad      if (edx != ctm_SelectText)
00468baf          m_bitField_2 = ((int8_t)this->m_bitField);
00468baf      
00468bc0      if ((edx == ctm_SelectText || (((m_bitField_2 & 0x40) != 0 || eax != 0) && edx == ctm_Default)))
00468bc0      {
00468bc2          uint32_t m_bitField = this->m_bitField;
00468bc2          
00468bce          if ((m_bitField >= 0 && (m_bitField & 4) != 0))
00468bce          {
00468bd8              this->m_bitField = (m_bitField | 0x80);
00468be7              UIElement_Text::SetSelectionStart(this, this->m_nCursorPos);
00468bce          }
00468bc0      }
00468bc0      else if (m_bitField_2 < 0)
00468bf6          UIElement_Text::SetSelecting(this, 0);
00468bf6      
00468bff      uint32_t _num_elements = this->m_glyphList.m_glyphList._num_elements;
00468c0e      arg3 = _num_elements;
00468c08      this->m_nCursorPos = arg2;
00468c16      enum UIElement_Text::CursorMovementFlags* eax_2 = &arg3;
00468c16      
00468c1a      if (_num_elements >= arg2)
00468c1c          eax_2 = &this->m_nCursorPos;
00468c1c      
00468c08      this->m_nCursorPos = *(uint32_t*)eax_2;
00468c27      class UIElement_Scrollbar* eax_4 = UIElement_Scrollable::GetScrollbarPointer_(this, 1);
00468c2e      class UIElement_Scrollbar* eax_5;
00468c2e      
00468c2e      if (eax_4 == 0)
00468c33          eax_5 = UIElement_Scrollable::GetScrollbarPointer_(this, eax_4);
00468c33      
00468c3a      int32_t ebx;
00468c3a      
00468c3a      if ((eax_4 != 0 || eax_5 != 0))
00468c40          ebx = 1;
00468c3a      else
00468c3c          ebx = 0;
00468c3c      
00468c48      arg3 = this->m_nCursorPos;
00468c4f      char eax_6;
00468c4f      int32_t edx_2;
00468c4f      int80_t result;
00468c4f      result = UIElement_Text::IsPositionInView(this, &arg3);
00468c4f      
00468c63      if ((eax_6 == 0 && (ebx != 0 || (this->m_bitField & 5) != 0)))
00468c63      {
00468c67          uint32_t m_nCursorPos = this->m_nCursorPos;
00468c6a          UIElement_Text::ScrollToPosition(this, edx_2);
00468c63      }
00468c63      
00468c83      this->m_lastCursorMoveTime = (*(uint32_t*)Timer::cur_time);
00468c89      *(uint32_t*)((char*)this->m_lastCursorMoveTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00468c89      
00468c90      if (this->m_bitField < 0)
00468c97          UIElement_Text::SetSelectionEnd(this, this->m_nCursorPos);
00468c97      
00468ca6      uint32_t m_bitField_1;
00468ca6      
00468ca6      if (UIElement::GetHasFocus(this) != 0)
00468ca6      {
00468ca8          m_bitField_1 = this->m_bitField;
00468ca8          
00468cb5          if (((m_bitField_1 & 1) != 0 && (*(uint8_t*)((char*)m_bitField_1)[1] & 1) == 0))
00468cb5          {
00468cbe              this->m_bitField = (m_bitField_1 | 0x100);
00468cc4              UIRegion::MakeRootDirtyHere(this);
00468cb5          }
00468ca6      }
00468ca6      
00468cc9      m_bitField_1 = 1;
00468ccc      return result;
00468b90  }

00468ccf                                               90                                                                 .

00468cd0  int80_t __thiscall UIElement_Text::SetCursorPositionFromXY(class UIElement_Text* this, int32_t arg2, int32_t arg3, enum UIElement_Text::CursorMovementFlags arg4)

00468cd0  {
00468cdf      uint32_t eax;
00468cdf      int80_t st0;
00468cdf      st0 = UIElement_Text::DeterminePositionFromXY(this, arg2, arg3);
00468cf2      return UIElement_Text::SetCursorPosition(this, eax, arg4);
00468cd0  }

00468cf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00468d00  uint8_t __thiscall UIElement_Text::MoveCursor(class UIElement_Text* this, enum TextDefs::Direction arg2)

00468d00  {
00468d00      class UIElement_Text* var_4 = this;
00468d0b      uint32_t m_nCursorPos = this->m_nCursorPos;
00468d11      var_4 = m_nCursorPos;
00468d11      
00468d15      if (arg2 > DOWN)
00468d15      {
00468e2f          m_nCursorPos = 0;
00468e33          return 0;
00468d15      }
00468d15      
00468d1b      uint8_t var_14_1;
00468d1b      uint32_t m_nCursorPos_1;
00468d1b      uint8_t var_c_2;
00468d1b      uint32_t* var_c_5;
00468d1b      uint8_t eax_3;
00468d1b      
00468d1b      switch (arg2)
00468d1b      {
00468d22          case HOME:
00468d22          {
00468d22          label_468d22:
00468d22              var_4 = nullptr;
00468d33              char eax_1;
00468d33              int80_t st0_1;
00468d33              st0_1 = UIElement_Text::SetCursorPosition(this, var_4, ctm_Default);
00468d3a              return eax_1;
00468d22              break;
00468d22          }
00468d3d          case END:
00468d3d          {
00468d3d              uint32_t _num_elements = this->m_glyphList.m_glyphList._num_elements;
00468d48              var_4 = _num_elements;
00468d4c              char eax_2;
00468d4c              int80_t st0_2;
00468d4c              st0_2 = UIElement_Text::SetCursorPosition(this, _num_elements, ctm_Default);
00468d53              return eax_2;
00468d3d              break;
00468d3d          }
00468d60          case LINE_HOME:
00468d60          {
00468d60              eax_3 = UIElement_Text::MoveBeginEndLine(this, 1, m_nCursorPos, &var_4);
00468e10          label_468e10:
00468e10              int80_t st0_7;
00468e10              
00468e10              if (eax_3 != 0)
00468e1b                  st0_7 = UIElement_Text::SetCursorPosition(this, var_4, ctm_Default);
00468e22              return eax_3;
00468d60              break;
00468d60          }
00468d74          case LINE_END:
00468d74          {
00468d74              eax_3 = UIElement_Text::MoveBeginEndLine(this, 0, m_nCursorPos, &var_4);
00468d79              goto label_468e10;
00468d74          }
00468d7e          case PAGEUP:
00468d7e          {
00468d7e              var_c_2 = 1;
00468d86          label_468d86:
00468d86              UIElement_Text::ScrollPage(this, var_c_2);
00468d91              class UIElement_Text* eax_4;
00468d91              int80_t st0_3;
00468d91              st0_3 = UIElement_Text::DeterminePositionFromXY(this, 0, 0);
00468d9b              var_4 = eax_4;
00468d9f              char eax_5;
00468d9f              int80_t st0_4;
00468d9f              st0_4 = UIElement_Text::SetCursorPosition(this, eax_4, ctm_Default);
00468da6              return eax_5;
00468d7e              break;
00468d7e          }
00468d82          case PAGEDOWN:
00468d82          {
00468d82              var_c_2 = 0;
00468d82              goto label_468d86;
00468d82          }
00468db5          case WORD_LEFT:
00468db5          {
00468db5              eax_3 = GlyphList::FindPrevWord(&this->m_glyphList, m_nCursorPos, &var_4);
00468dba              goto label_468e10;
00468db5          }
00468dc8          case WORD_RIGHT:
00468dc8          {
00468dc8              eax_3 = GlyphList::FindNextWord(&this->m_glyphList, m_nCursorPos, &var_4);
00468dcd              goto label_468e10;
00468dc8          }
00468dd1          case LEFT:
00468dd1          {
00468dd1              if (m_nCursorPos == 0)
00468dd1                  goto label_468d22;
00468dd1              
00468ddd              var_4 = (m_nCursorPos - 1);
00468de1              char eax_7;
00468de1              int80_t st0_5;
00468de1              st0_5 = UIElement_Text::SetCursorPosition(this, (m_nCursorPos - 1), ctm_Default);
00468de8              return eax_7;
00468dd1              break;
00468dd1          }
00468df1          case RIGHT:
00468df1          {
00468df1              var_4 = (m_nCursorPos + 1);
00468df5              char eax_9;
00468df5              int80_t st0_6;
00468df5              st0_6 = UIElement_Text::SetCursorPosition(this, (m_nCursorPos + 1), ctm_Default);
00468dfc              return eax_9;
00468df1              break;
00468df1          }
00468e03          case UP:
00468e03          {
00468e03              var_c_5 = &var_4;
00468e04              m_nCursorPos_1 = m_nCursorPos;
00468e05              var_14_1 = 1;
00468e09          label_468e09:
00468e09              eax_3 = UIElement_Text::MoveUpDown(this, var_14_1, m_nCursorPos_1, var_c_5);
00468e09              goto label_468e10;
00468e03          }
00468e29          case DOWN:
00468e29          {
00468e29              var_c_5 = &var_4;
00468e2a              m_nCursorPos_1 = m_nCursorPos;
00468e2b              var_14_1 = 0;
00468e2d              goto label_468e09;
00468e29          }
00468d1b      }
00468d00  }

00468e36                                                                    8b ff                                                ..
00468e38  uint32_t jump_table_468e38[0xc] = 
00468e38  {
00468e38      [0x0] =  0x00468d22
00468e3c      [0x1] =  0x00468d3d
00468e40      [0x2] =  0x00468d56
00468e44      [0x3] =  0x00468d6a
00468e48      [0x4] =  0x00468d7e
00468e4c      [0x5] =  0x00468d82
00468e50      [0x6] =  0x00468da9
00468e54      [0x7] =  0x00468dbc
00468e58      [0x8] =  0x00468dcf
00468e5c      [0x9] =  0x00468deb
00468e60      [0xa] =  0x00468dff
00468e64      [0xb] =  0x00468e25
00468e68  }

00468e68                          90 90 90 90 90 90 90 90                                                          ........

00468e70  void __fastcall UIElement_Text::MoveCursorToEnd(class UIElement_Text* this)

00468e70  {
00468e70      class UIElement_Text* this_1 = this;
00468e71      uint32_t _num_elements = this->m_glyphList.m_glyphList._num_elements;
00468e7a      uint32_t _num_elements_1 = _num_elements;
00468e7e      UIElement_Text::SetCursorPosition(this, _num_elements, ctm_Default);
00468e70  }

00468e85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00468e90  void __thiscall UIElement_Text::MoveCursorToPosition(class UIElement_Text* this, int32_t arg2)

00468e90  {
00468e97      UIElement_Text::SetCursorPosition(this, arg2, ctm_Default);
00468e90  }

00468e9f                                                                                               90                                 .

00468ea0  uint8_t __stdcall UIElement_Text::InqGlyphs(class UIElement_Text* this @ ecx, class PStringBase<unsigned short> const* arg2, class SmartArray<Glyph,1>* arg3)

00468ea0  {
00468ea3      class PStringBase<unsigned short>* eax = arg2;
00468ea7      int32_t ebx;
00468ea7      int32_t var_3c = ebx;
00468ea8      int32_t ebp;
00468ea8      int32_t var_40 = ebp;
00468ea9      class UIElement_Text* this_1 = this;
00468eb2      int32_t esi;
00468eb2      int32_t var_44 = esi;
00468eb3      int32_t edi;
00468eb3      int32_t var_48 = edi;
00468eb3      int32_t* esp_1 = &var_48;
00468eb4      void* ebx_1 = nullptr;
00468eb6      int32_t edi_1 = 0;
00468eb9      int32_t var_34 = 0;
00468ebd      int32_t var_2c = 0;
00468ebd      
00468ec1      if (eax->m_charbuffer->m_data[0x7ffffffffffffffe] != 1)
00468ec1      {
00468ec7          void* esp_3;
00468ec7          void* esi_3;
00468ec7          
00468ec7          while (true)
00468ec7          {
00468ec7              class PSRefBufferCharData<unsigned short>* m_charbuffer = eax->m_charbuffer;
00468ec9              int32_t ecx_1 = m_charbuffer->m_data[0x7ffffffffffffffe];
00468ece              void* eax_1;
00468ece              
00468ece              if (edi_1 < ecx_1)
00468ed6                  eax_1 = &m_charbuffer->m_data[edi_1];
00468ece              else
00468ed0                  eax_1 = &m_charbuffer->m_data[(ecx_1 - 1)];
00468ed0              
00468edd              if (*(uint16_t*)eax_1 == 0x3c)
00468edd              {
00468ee3                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00468ee8                  esp_1[4] = PStringBase<unsigned short>::s_NullBuffer_1;
00468eef                  *(uint32_t*)((char*)esp_1 - 4) = &PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8];
00468ef0                  InterlockedIncrement();
00468ef0                  esp_3 = &esp_1[1];
00468efa                  void* eax_4 = **(uint32_t**)((char*)esp_3 + 0x4c);
00468efc                  int32_t ecx_2 = *(uint32_t*)((char*)eax_4 - 4);
00468f04                  int32_t ebp_1 = edi_1;
00468f04                  
00468f06                  if (edi_1 < (ecx_2 - 1))
00468f06                  {
00468f12                      while (true)
00468f12                      {
00468f12                          void* eax_5;
00468f12                          
00468f12                          if (ebp_1 < ecx_2)
00468f1a                              eax_5 = ((char*)eax_4 + (ebp_1 << 1));
00468f12                          else
00468f14                              eax_5 = (((char*)eax_4 + (ecx_2 << 1)) - 2);
00468f14                          
00468f1f                          int32_t ebx_2;
00468f1f                          ebx_2 = *(uint16_t*)eax_5;
00468f25                          *(uint32_t*)((char*)esp_3 + 0x20) = ebx_2;
00468f25                          
00468f29                          if (ebx_2 != 0)
00468f29                          {
00468f2f                              void* eax_6 = *(uint32_t*)((char*)esp_3 + 0x10);
00468f37                              int32_t edi_2 = *(uint32_t*)((char*)eax_6 - 4);
00468f37                              
00468f42                              if ((*(uint32_t*)((char*)eax_6 - 0x10) != 1 || (edi_2 + 1) > *(uint32_t*)((char*)eax_6 - 0xc)))
00468f42                              {
00468f55                                  *(uint32_t*)((char*)esp_3 - 4) = edi_2;
00468f5d                                  PStringBase<unsigned short>::allocate_ref_buffer(((char*)esp_3 + 0x10));
00468f62                                  int32_t edx_3 = *(uint32_t*)((char*)esp_3 + 0x10);
00468f69                                  *(uint32_t*)((char*)esp_3 - 4) = eax_6;
00468f6a                                  *(uint32_t*)((char*)esp_3 - 8) = edx_3;
00468f6b                                  wcscpy();
00468f77                                  *(uint32_t*)((char*)esp_3 - 4) = ((char*)eax_6 - 0x10);
00468f77                                  
00468f84                                  if ((InterlockedDecrement() == 0 && eax_6 != 0x14))
00468f84                                  {
00468f86                                      int32_t edx_4 = *(uint32_t*)((char*)eax_6 - 0x14);
00468f88                                      *(uint32_t*)((char*)esp_3 - 4) = 1;
00468f8c                                      *(uint32_t*)edx_4();
00468f84                                  }
00468f42                              }
00468f42                              else
00468f42                              {
00468f44                                  *(uint32_t*)((char*)eax_6 - 4) = (edi_2 + 1);
00468f4b                                  *(uint32_t*)(*(uint32_t*)((char*)esp_3 + 0x10) - 8) = 0xffffffff;
00468f42                              }
00468f42                              
00468f8e                              int32_t ecx_8 = *(uint32_t*)((char*)esp_3 + 0x10);
00468f92                              *(uint32_t*)((char*)esp_3 - 4) = 1;
00468f98                              *(uint32_t*)((char*)esp_3 - 8) = ((char*)esp_3 + 0x20);
00468f9d                              *(uint32_t*)((char*)esp_3 - 0xc) = ((ecx_8 + (edi_2 << 1)) - 2);
00468f9e                              wcsncpy();
00468fa4                              void* eax_11 = *(uint32_t*)((char*)esp_3 + 0x10);
00468fa8                              ecx_2 = *(uint32_t*)((char*)eax_11 - 4);
00468fab                              edi_1 = *(uint32_t*)((char*)esp_3 + 0x1c);
00468fb2                              *(uint16_t*)(((char*)eax_11 + (ecx_2 << 1)) - 2) = 0;
00468f29                          }
00468f29                          
00468fbd                          if (ebx_2 == 0x3e)
00468fbd                              break;
00468fbd                          
00468fc3                          eax_4 = **(uint32_t**)((char*)esp_3 + 0x4c);
00468fc5                          ecx_2 = *(uint32_t*)((char*)eax_4 - 4);
00468fc8                          ebp_1 += 1;
00468fc8                          
00468fce                          if (ebp_1 >= (ecx_2 - 1))
00468fce                              goto label_469058;
00468f12                      }
00468f12                      
00468fd6                      int32_t* esi_2 = *(uint32_t*)((char*)esp_3 + 0x14);
00468fd6                      
00468fdc                      if (esi_2 != 0)
00468fdc                      {
00468fde                          *(uint32_t*)((char*)esp_3 - 4) = ecx_2;
00468fe5                          *(uint32_t*)((char*)esp_3 - 4) = *(uint32_t*)((char*)esp_3 + 0x10);
00468fee                          *(uint32_t*)((char*)esp_3 - 8) = (*(uint32_t*)((char*)esp_3 + 0x10) - 0x10);
00468fef                          InterlockedIncrement();
00468ff9                          *(uint32_t*)(*(uint32_t*)esi_2 + 4)();
00468fff                          *(uint32_t*)((char*)esp_3 - 4) = &esi_2[1];
00468fff                          
00469008                          if (InterlockedDecrement() == 0)
00469008                          {
0046900a                              int32_t edx_10 = *(uint32_t*)esi_2;
0046900c                              *(uint32_t*)((char*)esp_3 - 4) = 1;
00469010                              *(uint32_t*)edx_10();
00469008                          }
00469008                          
00469012                          *(uint32_t*)((char*)esp_3 + 0x14) = 0;
0046901a                          goto label_469031;
00468fdc                      }
00468fdc                      
00469020                      *(uint32_t*)((char*)esp_3 - 4) = ((char*)esp_3 + 0x10);
00469021                      int32_t eax_16 = TextTagFactory::MakeTag();
0046902b                      *(uint32_t*)((char*)esp_3 + 0x14) = eax_16;
0046902b                      
0046902f                      if (eax_16 != 0)
0046902f                      {
00469031                      label_469031:
00469031                          esi_3 = *(uint32_t*)((char*)esp_3 + 0x10);
0046903c                          int32_t eax_17 = ((edi_1 + *(uint32_t*)((char*)esi_3 - 4)) - 1);
00469046                          bool cond:6_1 = eax_17 >= (*(uint32_t*)(**(uint32_t**)((char*)esp_3 + 0x4c) - 4) - 1);
00469048                          *(uint32_t*)((char*)esp_3 + 0x1c) = eax_17;
00469048                          
0046904c                          if (cond:6_1)
0046904c                              break;
0046904c                          
00469052                          edi_1 = eax_17;
0046902f                      }
00468f06                  }
00468f06                  
00469058              label_469058:
00469058                  int32_t* esi_5 = (*(uint32_t*)((char*)esp_3 + 0x10) - 0x14);
0046905e                  *(uint32_t*)((char*)esp_3 - 4) = &esi_5[1];
0046905f                  esp_1 = esp_3;
0046905f                  
0046906b                  if ((InterlockedDecrement() == 0 && esi_5 != 0))
0046906b                  {
0046906d                      int32_t edx_14 = *(uint32_t*)esi_5;
0046906f                      *(uint32_t*)((char*)esp_1 - 4) = 1;
00469073                      *(uint32_t*)edx_14();
0046906b                  }
0046906b                  
00469075                  ebx_1 = esp_1[5];
00468edd              }
00468edd              
00469084              void* edx_15;
00469084              void* esi_6;
00469084              
00469084              if ((ebx_1 == 0 || *(uint32_t*)((char*)ebx_1 + 8) != 0x10000001))
00469084              {
00469092                  esi_6 = esp_1[6];
00469096                  edx_15 = ((char*)esi_6 + 0x6a4);
00469084              }
00469084              else
00469084              {
00469086                  esi_6 = esp_1[6];
0046908a                  edx_15 = ((char*)esi_6 + 0x6b8);
00469084              }
00469084              
004690a0              void* eax_21 = *(uint32_t*)esp_1[0x13];
004690a2              int32_t ecx_16 = *(uint32_t*)((char*)eax_21 - 4);
004690a7              void* eax_22;
004690a7              
004690a7              if (edi_1 < ecx_16)
004690af                  eax_22 = ((char*)eax_21 + (edi_1 << 1));
004690a7              else
004690a9                  eax_22 = (((char*)eax_21 + (ecx_16 << 1)) - 2);
004690a9              
004690b2              int32_t ecx_17 = *(uint32_t*)((char*)esi_6 + 0x6b4);
004690b8              *(uint32_t*)((char*)esp_1 - 4) = ebx_1;
004690b9              *(uint32_t*)((char*)esp_1 - 8) = ecx_17;
004690ba              *(uint32_t*)((char*)esp_1 - 0xc) = edx_15;
004690bd              int32_t edx_16;
004690bd              edx_16 = *(uint16_t*)eax_22;
004690c4              *(uint32_t*)((char*)esp_1 - 0x10) = edx_16;
004690c5              Glyph::Glyph(&esp_1[9]);
004690ca              int32_t* ecx_19 = esp_1[0x14];
004690d4              int32_t eax_24 = (ecx_19[1] & 0x7fffffff);
004690d4              
004690db              if (ecx_19[2] < eax_24)
004690db                  goto label_46913c;
004690db              
004690dd              int32_t edx_18 = (eax_24 + 1);
004690dd              
004690e3              if (edx_18 <= 8)
004690e5                  edx_18 = 8;
004690e3              else if (edx_18 <= 0x4000)
004690f2              {
00469108                  esp_1[8] = edx_18;
00469111                  int32_t eflags_1;
00469111                  char eax_28;
00469111                  eax_28 = __bsr_gprv_memv(esp_1[8]);
0046911d                  int32_t esi_8 = (1 << eax_28);
0046911f                  ecx_19 = esp_1[0x14];
0046911f                  
00469125                  if (edx_18 > esi_8)
00469127                      edx_18 = (esi_8 * 2);
004690f2              }
004690f2              else
004690f2              {
004690f6                  int32_t eax_26 = (edx_18 & 0x3fff);
004690f6                  
004690fb                  if (eax_26 != 0)
00469104                      edx_18 += (0x4000 - eax_26);
004690f2              }
004690f2              
0046912a              *(uint32_t*)((char*)esp_1 - 4) = edx_18;
0046912a              
00469132              if (SmartArray<Glyph,1>::grow(ecx_19) != 0)
00469132              {
00469134                  ecx_19 = esp_1[0x14];
0046913c              label_46913c:
0046913c                  *(uint32_t*)((char*)esp_1 - 4) = &esp_1[9];
00469148                  Glyph::operator=((*(uint32_t*)ecx_19 + (ecx_19[2] * 0x24)));
0046914d                  void* eax_33 = esp_1[0x14];
00469151                  *(uint32_t*)((char*)eax_33 + 8) += 1;
00469132              }
00469132              
00469158              Glyph::~Glyph(&esp_1[9]);
0046915d              eax = esp_1[0x13];
00469166              edi_1 += 1;
00469168              bool cond:5_1 = edi_1 < (eax->m_charbuffer->m_data[0x7ffffffffffffffe] - 1);
0046916a              esp_1[7] = edi_1;
0046916a              
0046916e              if (!(cond:5_1))
0046916e              {
00469174                  eax = 1;
00469176                  *(uint32_t*)esp_1;
00469176                  esp_1[1];
00469176                  esp_1[2];
00469176                  esp_1[3];
0046917d                  return 1;
0046916e              }
00468ec7          }
00468ec7          
00469186          *(uint32_t*)((char*)esp_3 - 4) = ((char*)esi_3 - 0x10);
00469187          esp_1 = esp_3;
00469187          
00469193          if ((InterlockedDecrement() == 0 && esi_3 != 0x14))
00469193          {
00469195              int32_t edx_22 = *(uint32_t*)((char*)esi_3 - 0x14);
00469197              *(uint32_t*)((char*)esp_1 - 4) = 1;
0046919b              *(uint32_t*)edx_22();
00469193          }
00468ec1      }
00468ec1      
0046919d      *(uint32_t*)esp_1;
0046919d      esp_1[1];
0046919d      esp_1[2];
004691a0      eax = 1;
0046919d      esp_1[3];
004691a6      return 1;
00468ea0  }

004691a9                             90 90 90 90 90 90 90                                                           .......

004691b0  void __fastcall UIElement_Text::ScrollToPosition(class UIElement_Text* this, int32_t const arg2)

004691b0  {
004691b9      int32_t var_c = 0;
004691bd      int32_t const var_8 = 0;
004691c1      UIElement_Text::RecalculateGlyphList(this);
004691c1      
004691e2      if (GlyphList::FindXYFromPosition(&this->m_glyphList, arg2, &var_c, &var_8) != 0)
004691e2      {
00469203          int32_t edi_3 = ((UIRegion::GetWidth(this) - this->m_margR) - this->m_margL);
00469205          int32_t eax_3 = UIRegion::GetHeight(this);
00469216          class UIElement_Text* ecx_3;
00469216          ecx_3 = this->m_bitField;
0046921e          int32_t eax_5 = ((eax_3 - this->m_margD) - this->m_margU);
00469223          int32_t var_4 = eax_5;
00469227          int32_t const edx_2;
00469227          int32_t ebx_2;
00469227          
00469227          if ((ecx_3 & 2) == 0)
00469227          {
00469273              int32_t ecx_8 = (this->m_iScrollableWidth - edi_3);
00469275              arg2 = ecx_8;
0046927b              var_c = 0;
0046927f              int32_t* ecx_9 = &arg2;
0046927f              
00469283              if (ecx_8 <= 0)
00469285                  ecx_9 = &var_c;
00469285              
00469289              ebx_2 = *(uint32_t*)ecx_9;
0046928b              class Font* m_curFontObj = this->m_curFontObj;
00469293              var_c = ebx_2;
00469297              uint32_t maxCharHeight;
00469297              
00469297              if (m_curFontObj == 0)
0046929e                  maxCharHeight = 0;
00469297              else
00469299                  maxCharHeight = m_curFontObj->maxCharHeight;
00469299              
004692a0              arg2 = maxCharHeight;
004692a6              int32_t* ecx_10 = &arg2;
004692a6              
004692aa              if (maxCharHeight >= eax_5)
004692ac                  ecx_10 = &var_4;
004692ac              
004692b0              int32_t ecx_11 = *(uint32_t*)ecx_10;
004692b8              edx_2 = var_8;
004692b8              
004692c3              if ((ecx_11 + edx_2) > (this->m_iScrollableY + eax_5))
004692c3              {
004692c7                  edx_2 += (ecx_11 - eax_5);
004692c9                  var_8 = edx_2;
004692c3              }
00469227          }
00469227          else
00469227          {
0046922f              int32_t ecx_5 = (this->m_iScrollableHeight - eax_5);
00469233              arg2 = ecx_5;
00469237              var_8 = 0;
0046923b              int32_t const* eax_6 = &arg2;
0046923b              
0046923f              if (ecx_5 <= 0)
00469241                  eax_6 = &var_8;
00469241              
00469245              edx_2 = *(uint32_t*)eax_6;
0046924d              ebx_2 = var_c;
00469256              bool cond:4_1 = (ebx_2 + 2) <= (this->m_iScrollableX + edi_3);
00469258              var_8 = edx_2;
00469258              
0046925c              if (!(cond:4_1))
0046925c              {
00469265                  ebx_2 += (2 - edi_3);
00469267                  var_c = ebx_2;
0046925c              }
00469227          }
00469227          
004692d4          UIElement_Scrollable::SetScrollableXY(this, ebx_2, edx_2, 0);
004692d4          
004692e0          if ((this->m_bitField & 0x40) != 0)
004692e0          {
004692e2              class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004692e2              
004692ea              if (ICIDM::s_cidm_1 != 0)
004692ea              {
004692f0                  int32_t eax_10 = ICIDM::s_cidm_1->vtable->GetMouseX();
004692f9                  int32_t eax_12 = ICIDM::s_cidm_1->vtable->GetMouseY();
00469300                  int32_t eax_13 = UIRegion::GetScreenX0(this);
0046930d                  int32_t edi_8 = ((eax_10 - this->m_margL) - eax_13);
0046930f                  int32_t eax_14 = UIRegion::GetScreenY0(this);
0046931a                  int32_t ebx_5 = ((eax_12 - this->m_margU) - eax_14);
00469320                  int32_t eax_15;
00469320                  int80_t st0_2;
00469320                  st0_2 = UIElement_Text::DeterminePositionFromXY(this, edi_8, ebx_5);
0046932c                  arg2 = eax_15;
00469330                  char eax_16;
00469330                  int80_t st0_3;
00469330                  st0_3 = UIElement_Text::IsPositionInView(this, &arg2);
00469330                  
00469337                  if (eax_16 != 0)
0046933e                      UIElement_Text::SetCursorPositionFromXY(this, edi_8, ebx_5, ctm_Default);
004692ea              }
004692e0          }
004691e2      }
004691b0  }

0046934d                                         90 90 90                                                               ...

00469350  uint8_t __fastcall UIElement_Text::IsAtVerticalEnd(class UIElement_Text* this)

00469350  {
00469350      class UIElement_Text* this_1 = this;
00469351      uint32_t _num_elements = this->m_glyphList.m_glyphList._num_elements;
00469351      
00469359      if (_num_elements == 0)
00469359      {
0046935b          _num_elements = 1;
0046935e          return 1;
00469359      }
00469359      
00469360      this_1 = (_num_elements - 1);
00469369      char result;
00469369      int80_t st0;
00469369      st0 = UIElement_Text::IsPositionInView(this, &this_1);
0046936f      return result;
00469350  }


00469370  void __thiscall UIElement_Text::MouseDown(class UIElement_Text* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00469370  {
00469370      class UIElement_Text* this_1 = this;
00469377      uint8_t eax = UIElement::GetHasFocus(this);
0046937c      uint32_t ebx = arg4;
0046938d      *(uint8_t*)((char*)this_1)[3] = eax;
00469391      UIElement_Scrollable::MouseDown(this, arg2, arg3, ebx);
00469396      union __inner23 = this->__inner23;
00469396      
004693c2      if (((((int8_t)(__inner23 >> 0x13)) & 1) == 0 && ((((int8_t)(__inner23 >> 0x12)) & 1) == 0 && (((ebx == 7 || ebx == 5) || ebx == 6) && (*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0))))
004693c2      {
004693d7          int32_t eax_2 = UIRegion::GetScreenX0(this);
004693e4          int32_t ebp_2 = ((arg2 - this->m_margL) - eax_2);
004693e6          int32_t eax_3 = UIRegion::GetScreenY0(this);
004693f1          int32_t edi_2 = ((arg3 - this->m_margU) - eax_3);
004693f1          
00469403          if ((ebx == 7 && (this->m_bitField & 5) != 0))
00469403          {
00469415              arg4 = 0;
0046941a              UIElement::GetAttribute_Bool(this, 0xd1, &arg4);
0046941a              
0046942d              if ((*(uint8_t*)((char*)this_1)[3] == 0 && arg4 != 0))
0046942d              {
00469431                  UIElement_Text::SelectAll(this);
0046943b                  return;
0046942d              }
0046942d              
00469442              uint32_t eax_5;
00469442              int80_t st0_1;
00469442              st0_1 = UIElement_Text::DeterminePositionFromXY(this, ebp_2, edi_2);
0046944f              uint32_t edi_3;
0046944f              
0046944f              if (this->m_bitField >= 0)
00469459                  edi_3 = this->m_nCursorPos;
0046944f              else
00469451                  edi_3 = this->m_nSelectionStart;
00469451              
00469464              UIElement_Text::SetCursorPosition(this, eax_5, ctm_DontSelectText);
00469469              this->vtable->Activate();
00469469              
0046947a              if ((this->m_bitField & 4) != 0)
0046947a              {
00469480                  UIElement_Text::SetSelecting(this, 1);
00469480                  
00469492                  if ((0x40 & this->m_bitField) == 0)
00469494                      this->m_bitField |= 0x40;
00469494                  
0046949a                  class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0046949a                  
004694a2                  if ((ICIDM::s_cidm_1 != 0 && ICIDM::s_cidm_1->vtable->ShiftKeyDown() != 0))
004694a2                  {
004694b0                      UIElement_Text::SetSelectionStart(this, edi_3);
004694be                      UIElement_Text::SetSelectionEnd(this, this->m_nCursorPos);
004694c8                      return;
004694a2                  }
004694a2                  
004694d4                  UIElement_Text::SetSelectionStart(this, this->m_nCursorPos);
0046947a              }
00469403          }
004693c2      }
00469370  }

004694e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004694f0  void __thiscall UIElement_Text::MouseUp(class UIElement_Text* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

004694f0  {
0046950c      int32_t* edx_2 = this->m_mouseDownTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg4) % this->m_mouseDownTable.m_intrusiveTable.m_numBuckets)];
0046950f      bool cond:0 = edx_2 != 0;
0046950f      
00469511      if (edx_2 != 0)
00469511      {
00469515          while (*(uint32_t*)edx_2 != arg4)
00469515          {
00469517              edx_2 = edx_2[1];
00469517              
0046951c              if (edx_2 == 0)
0046951c                  break;
00469515          }
00469515          
0046951e          cond:0 = edx_2 != 0;
00469511      }
00469511      
00469532      UIElement::MouseUp(this, arg2, arg3, arg4);
00469532      
00469546      if (((this->m_bitField & 0x40) != 0 || cond:0 != 0))
00469546      {
0046954e          int32_t eax_3 = UIRegion::GetScreenX0(this);
0046955b          int32_t ebp_2 = ((arg2 - this->m_margL) - eax_3);
0046955d          int32_t eax_4 = UIRegion::GetScreenY0(this);
00469568          int32_t edi_2 = ((arg3 - this->m_margU) - eax_4);
00469568          
00469571          if ((this->m_bitField & 0x40) != 0)
00469571          {
00469577              uint32_t eax_5;
00469577              int80_t st0_1;
00469577              st0_1 = UIElement_Text::DeterminePositionFromXY(this, ebp_2, edi_2);
00469581              int80_t st0_2;
00469581              st0_2 = UIElement_Text::SetCursorPosition(this, eax_5, ctm_Default);
00469581              
0046958d              if ((this->m_bitField & 0x40) != 0)
0046958f                  this->m_bitField &= 0xffffffbf;
00469571          }
00469571          
00469596          eax_4 = cond:0;
00469596          
0046959c          if (eax_4 != 0)
0046959c          {
004695a2              uint32_t eax_6 = UIElement_Text::DeterminePositionFromXY(this, ebp_2, edi_2);
004695a2              /* unimplemented  {call UIElement_Text::DeterminePositionFromXY} */;
004695ad              void var_24;
004695ad              Glyph::Glyph(&var_24);
004695cd              int32_t* var_4;
004695cd              
004695cd              if ((GlyphList::InqGlyph(&this->m_glyphList, eax_6, &var_24) != 0 && var_4 != 0))
004695d6                  *(uint32_t*)(*(uint32_t*)var_4 + 0x14)(arg4);
004695d6              
004695dd              Glyph::~Glyph(&var_24);
0046959c          }
00469546      }
004694f0  }

004695eb                                   90 90 90 90 90                                                             .....

004695f0  void __thiscall UIElement_Text::MouseMove(class UIElement_Text* this, int32_t arg2, int32_t arg3)

004695f0  {
004695fa      if ((this->m_bitField & 0x40) == 0)
004695fa      {
00469608          UIElement::MouseMove(this, arg2, arg3);
0046960e          return;
004695fa      }
004695fa      
00469614      int32_t eax_1 = UIRegion::GetScreenX0(this);
00469627      int32_t edi_2 = ((arg2 - this->m_margL) - eax_1);
00469629      int32_t eax_2 = UIRegion::GetScreenY0(this);
00469640      uint32_t eax_3;
00469640      int80_t st0;
00469640      st0 = UIElement_Text::DeterminePositionFromXY(this, edi_2, ((arg3 - this->m_margU) - eax_2));
0046964a      UIElement_Text::SetCursorPosition(this, eax_3, ctm_Default);
004695f0  }

00469654                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00469660  uint8_t __thiscall UIElement_Text::InqSizewMargins(class UIElement_Text* this, class StringInfo const* arg2, int32_t* arg3, int32_t* arg4, enum UIElement_Text::UIText_InqSize_Flag arg5)

00469660  {
00469664      int32_t* ebx = arg4;
0046966b      int32_t* edi = arg3;
0046967c      *(uint32_t*)edi = 0;
0046967f      *(uint32_t*)ebx = 0;
00469681      StringInfo::GetString(arg2, &arg4, 0);
00469686      int32_t* eax = arg4;
00469686      
0046968e      if (eax[-1] != 1)
0046968e      {
004696cd          int32_t var_40 = 0;
004696d1          int32_t var_3c_1 = 0;
004696d5          int32_t var_38_1 = 0;
004696d9          UIElement_Text::InqGlyphs(this, &arg4, &var_40);
004696e2          void var_34;
004696e2          GlyphList::GlyphList(&var_34);
004696f1          GlyphList::AddText(&var_34, 0, &var_40);
004696fb          arg3 = nullptr;
004696ff          int32_t m_width;
004696ff          
004696ff          if (arg5 == UITS_CUR_WIDTH)
004696ff          {
00469753              m_width = UIRegion::GetWidth(this);
00469758              arg3 = m_width;
004696ff          }
004696ff          else if (arg5 == 2)
00469702          {
0046973a              class UIRegion* eax_8 = this->vtable->GetParent();
0046973a              
00469742              if (eax_8 == 0)
00469742              {
0046971f                  m_width = RenderDevice::GetDisplayWidth(RenderDevice::render_device);
00469724                  arg3 = m_width;
00469742              }
00469742              else
00469742              {
00469746                  m_width = UIRegion::GetWidth(eax_8);
0046974b                  arg3 = m_width;
00469742              }
00469702          }
00469702          else if (arg5 == 3)
00469705          {
0046972a              m_width = this->m_desc.m_width;
00469730              arg3 = m_width;
00469705          }
00469705          else if (UIElement::GetAttribute_Int(this, 0x3d, &arg3) != 0)
0046975e              m_width = arg3;
00469717          else
00469717          {
0046971f              m_width = RenderDevice::GetDisplayWidth(RenderDevice::render_device);
00469724              arg3 = m_width;
00469717          }
00469717          
00469770          int32_t eax_10 = ((m_width - this->m_margR) - this->m_margL);
00469772          *(uint32_t*)edi = 0;
00469774          *(uint32_t*)ebx = 0;
00469782          int32_t edx_3;
00469782          edx_3 = (((int8_t)this->m_bitField) & 2) == 2;
0046978d          GlyphList::Recalculate(&var_34, eax_10, edx_3, edi, ebx);
004697a4          *(uint32_t*)edi += (this->m_margR + this->m_margL);
004697bc          *(uint32_t*)ebx += (this->m_margD + this->m_margU);
004697be          GlyphList::~GlyphList(&var_34);
004697c7          SmartArray<Glyph,1>::~SmartArray<Glyph,1>(&var_40);
004697d0          void* esi_3 = &arg4[-5];
004697d0          
004697e3          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004697eb              **(uint32_t**)esi_3(1);
0046968e      }
0046968e      else if ((InterlockedDecrement(&eax[-4]) == 0 && eax != 0x14))
004696a7      {
004696b3          *(uint32_t*)eax[-5](1);
004696b8          int32_t eax_2;
004696b8          eax_2 = 1;
004696be          return 1;
004696a7      }
004696a7      
004697f0      int32_t eax_1;
004697f0      eax_1 = 1;
004697f6      return 1;
00469660  }

004697f9                                                                             90 90 90 90 90 90 90                           .......

00469800  void __thiscall UIElement_Text::DeleteSection(class UIElement_Text* this, uint32_t arg2, uint32_t arg3, uint8_t arg4)

00469800  {
00469803      uint32_t _num_elements = this->m_glyphList.m_glyphList._num_elements;
0046980a      uint32_t edi = arg2;
0046980a      
00469825      if ((edi < _num_elements && (arg3 <= _num_elements && edi < arg3)))
00469825      {
0046982b          _num_elements = arg4;
00469832          int32_t ebx_1;
00469832          
00469832          if (_num_elements == 0)
00469888              ebx_1 = arg4;
00469832          else
00469832          {
00469834              UIElement_Text::RecalculateGlyphList(this);
00469849              int32_t eax_1;
00469849              int80_t st0_2;
00469849              st0_2 = UIElement_Text::DeterminePositionFromXY(this, this->m_iScrollableX, this->m_iScrollableY);
00469849              
00469850              if (edi <= eax_1)
00469850              {
0046985e                  if (this->m_iScrollableY != 0)
0046985e                      goto label_469862;
0046985e                  
00469883                  arg4 = 0;
00469888                  ebx_1 = arg4;
00469850              }
00469850              else if ((arg3 > eax_1 || this->m_iScrollableY == 0))
0046985e              {
00469883                  arg4 = 0;
00469888                  ebx_1 = arg4;
0046985e              }
0046985e              else
0046985e              {
00469862              label_469862:
00469862                  
00469869                  if (UIElement_Text::IsAtVerticalEnd(this) != 0)
00469869                  {
00469883                      arg4 = 0;
00469888                      ebx_1 = arg4;
00469869                  }
00469869                  else
00469869                  {
00469871                      int32_t ecx_4 = (this->m_bitField & 2);
00469874                      arg4 = 1;
00469879                      int32_t eax_4;
00469879                      
00469879                      if (ecx_4 == 0)
004698b0                          eax_4 = this->m_iScrollableY;
00469879                      else
0046987b                          eax_4 = this->m_iScrollableX;
0046987b                      
004698b9                      arg2 = eax_4;
004698b9                      
004698bd                      if (ecx_4 != 2)
004698cf                          ebx_1 = this->m_iScrollableHeight;
004698bd                      else
004698c5                          ebx_1 = this->m_iScrollableWidth;
00469869                  }
0046985e              }
00469832          }
00469832          
00469894          uint32_t eax_5 = GlyphList::Delete(&this->m_glyphList, edi, arg3);
0046989b          uint32_t m_nCursorPos = this->m_nCursorPos;
0046989b          
004698a7          if (m_nCursorPos > arg3)
004698a7          {
004698a9              int32_t var_14_3 = 0;
004698dc              UIElement_Text::SetCursorPosition(this, (m_nCursorPos - eax_5), ctm_Default);
004698dc              /* unimplemented  {call UIElement_Text::SetCursorPosition} */;
004698a7          }
004698a7          else if (m_nCursorPos > edi)
004698d5          {
004698d7              int32_t var_14_4 = 0;
004698dc              UIElement_Text::SetCursorPosition(this, edi, ctm_Default);
004698dc              /* unimplemented  {call UIElement_Text::SetCursorPosition} */;
004698d5          }
004698d5          
004698e1          uint32_t m_bitField = this->m_bitField;
004698e1          
004698ee          if ((0x100 & m_bitField) == 0)
004698ee          {
004698f2              this->m_bitField = (m_bitField | 0x100);
004698fa              UIRegion::MakeRootDirtyHere(this);
004698ee          }
004698ee          
00469905          if (arg4 != 0)
00469905          {
00469909              UIElement_Text::RecalculateGlyphList(this);
00469909              /* unimplemented  {call UIElement_Text::RecalculateGlyphList} */;
00469914              int32_t m_iScrollableX = this->m_iScrollableX;
0046991a              int32_t m_iScrollableY = this->m_iScrollableY;
0046991a              
00469927              if ((this->m_bitField & 2) == 0)
0046993d                  m_iScrollableY = ((this->m_iScrollableHeight - ebx_1) + arg2);
00469927              else
00469931                  m_iScrollableX = ((this->m_iScrollableWidth - ebx_1) + arg2);
00469931              
00469945              UIElement_Scrollable::SetScrollableXY(this, m_iScrollableX, m_iScrollableY, 0);
00469945              /* unimplemented  {call UIElement_Scrollable::SetScrollableXY} */;
00469905          }
00469905          
00469951          if (eax_5 > 0)
0046995b              UIElement::BroadcastElementMessage(this, 0x44, 0, 0);
00469825      }
00469800  }

00469966                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00469970  void __thiscall UIElement_Text::BeheadText(class UIElement_Text* this, uint32_t arg2, uint8_t arg3)

00469970  {
0046997c      UIElement_Text::DeleteSection(this, 0, arg2, arg3);
00469970  }

00469984              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00469990  void __fastcall UIElement_Text::DeleteChar(class UIElement_Text* this)

00469990  {
00469990      uint32_t m_nCursorPos = this->m_nCursorPos;
0046999d      UIElement_Text::DeleteSection(this, m_nCursorPos, (m_nCursorPos + 1), 0);
00469990  }

004699a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004699b0  void __fastcall UIElement_Text::DeleteSelection(class UIElement_Text* this)

004699b0  {
004699c9      uint32_t var_8;
004699c9      uint32_t var_4;
004699c9      
004699c9      if (UIElement_Text::GetSelection(this, &var_4, &var_8) != 0)
004699c9      {
004699d9          UIElement_Text::DeleteSection(this, var_4, var_8, 0);
004699d9          
004699e6          if (this->m_bitField < 0)
004699e6          {
004699ee              uint32_t ecx_3 = (this->m_bitField & 0xffffff7f);
004699f8              this->m_bitField = ecx_3;
004699f8              
004699fe              if ((ecx_3 & 0x40) != 0)
00469a05                  this->m_bitField = (ecx_3 & 0xffffffbf);
00469a05              
00469a0f              UIElement_Text::SetSelecting(this, 0);
00469a14              this->m_nSelectionStart = 0;
00469a1e              this->m_nSelectionEnd = 0;
004699e6          }
004699c9      }
004699b0  }

00469a2d                                         90 90 90                                                               ...

00469a30  void __thiscall UIElement_Text::AddText_Internal(class UIElement_Text* this, class PStringBase<unsigned short> arg2, uint32_t arg3)

00469a30  {
00469a30      class PStringBase<unsigned short> eax_6 = arg2;
00469a3e      void* __saved_ebx;
00469a3e      int32_t* esi_1;
00469a3e      
00469a3e      if (*(uint32_t*)(eax_6 - 4) != 1)
00469a3e      {
00469a54          int32_t ebx;
00469a54          ebx = arg3;
00469a54          
00469a58          if ((this->m_bitField & 1) != 0)
00469a5c              UIElement_Text::DeleteSelection(this);
00469a58          else if ((ebx & 1) == 0)
00469a6c              UIElement_Text::SetSelecting(this, 0);
00469a6c          
00469a7d          int32_t var_c = 0;
00469a85          int32_t var_8_1 = 0;
00469a8d          int32_t var_4_1 = 0;
00469a95          UIElement_Text::InqGlyphs(this, &arg2, &var_c);
00469a95          
00469a9e          if ((ebx & 2) == 0)
00469a9e          {
00469acb              int32_t eax_2 = GlyphList::AddText(&this->m_glyphList, this->m_nCursorPos, &var_c);
00469add              UIElement_Text::SetCursorPosition(this, (this->m_nCursorPos + eax_2), ctm_DontSelectText);
00469a9e          }
00469a9e          else
00469ab2              GlyphList::AddText(&this->m_glyphList, this->m_glyphList.m_glyphList._num_elements, &var_c);
00469ab2          
00469aed          *(uint32_t*)((char*)this->m_lastCursorMoveTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00469afc          this->m_lastCursorMoveTime = (*(uint32_t*)Timer::cur_time);
00469afc          
00469b02          if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 4) != 0)
00469b06              UIElement_Text::ResizeToPaper(this);
00469b06          
00469b0b          uint32_t m_bitField = this->m_bitField;
00469b0b          
00469b18          if ((0x100 & m_bitField) == 0)
00469b18          {
00469b1c              this->m_bitField = (m_bitField | 0x100);
00469b24              UIRegion::MakeRootDirtyHere(this);
00469b18          }
00469b18          
00469b2d          SmartArray<Glyph,1>::~SmartArray<Glyph,1>(&var_c);
00469b36          esi_1 = (arg2 - 0x14);
00469b3c          __saved_ebx = &esi_1[1];
00469a3e      }
00469a3e      else
00469a3e      {
00469a40          esi_1 = (eax_6 - 0x14);
00469a46          __saved_ebx = &esi_1[1];
00469a3e      }
00469a3e      
00469b49      if ((InterlockedDecrement(__saved_ebx) == 0 && esi_1 != 0))
00469b51          **(uint32_t**)esi_1(1);
00469a30  }

00469b5a                                                                                90 90 90 90 90 90                            ......

00469b60  void __fastcall UIElement_Text::Cut(class UIElement_Text* this)

00469b60  {
00469b6b      if (this->m_bitField < 0)
00469b6b      {
00469b6d          UIElement_Text::Copy(this);
00469b6d          
00469b79          if ((this->m_bitField & 1) != 0)
00469b7e              /* tailcall */
00469b7e              return UIElement_Text::DeleteSelection(this);
00469b6b      }
00469b60  }

00469b85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00469b90  void __fastcall UIElement_Text::CharacterHandler(class UIElement_Text* this, wchar16 arg2)

00469b90  {
00469b90      class UIElement_Text* this_1 = this;
00469b98      class UIElement_Text* this_2 = this;
00469b9a      this = SceneTool::m_pDebugConsole->m_IsInputActive;
00469b9a      
00469ba0      if (this == 0)
00469ba0      {
00469ba6          char x = ((int8_t)this_2->m_ptTilingOffset.x);
00469baf          class UIElement_Text* this_3 = arg2;
00469bb3          class UIElement_Text** var_18;
00469bb3          
00469bb3          if ((x & 1) != 0)
00469bb3          {
00469bc2              int32_t edx_2;
00469bc2              void* __offset(UIElement_Text, -0x608) edi_1;
00469bc2              
00469bc2              if ((((uint32_t)this_3) - 9) > 0x12)
00469bc2              {
00469c29              label_469c29:
00469c29                  
00469c33                  if ((this_3 > 0x1f && this_3 != 0x7f))
00469c33                  {
00469c35                      class Graphic* m_image = this_2->m_image;
00469c3d                      char eax_4;
00469c3d                      
00469c3d                      if (m_image != 0)
00469c40                          eax_4 = m_image(this_3);
00469c40                      
00469c47                      if ((m_image == 0 || eax_4 != 0))
00469c47                      {
00469c4d                          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2);
00469c52                          uint32_t var_14_5 = 1;
00469c58                          var_18 = &this_1;
00469c5d                          this_1 = this_3;
00469c66                          uint32_t var_14_6 = 0;
00469c68                          var_18 = PStringBase<unsigned short>::append_n_chars(&arg2, var_18, var_14_5);
00469c70                          edi_1 = ((char*)this_2 - 0x608);
00469c76                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, &arg2);
00469c7d                          UIElement_Text::AddText_Internal(edi_1, var_18, var_14_6);
00469c7d                          
00469c88                          if (this_2->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xb] != this_2->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2])
00469c9c                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00469c88                          else
00469c88                          {
00469c8a                              edx_2 = ADJ(edi_1)->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2];
00469c90                              int32_t var_14_7 = edx_2;
00469c93                              UIElement_Text::ScrollToPosition(edi_1, edx_2);
00469c9c                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00469c88                          }
00469c47                      }
00469c33                  }
00469bc2              }
00469bc2              else
00469bcb                  switch (this_3)
00469bcb                  {
00469bd5                      case 0xa:
00469bd5                      case 0xd:
00469bd5                      {
00469bd5                          if ((x & 2) == 0)
00469bd5                          {
00469bdf                              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2);
00469be4                              uint32_t var_14_1 = 1;
00469bea                              var_18 = &this_1;
00469bef                              this_1 = 0xa;
00469bfc                              uint32_t var_14_2 = 0;
00469bfe                              var_18 = PStringBase<unsigned short>::append_n_chars(&arg2, var_18, var_14_1);
00469c06                              edi_1 = ((char*)this_2 - 0x608);
00469c0c                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, &arg2);
00469c13                              edx_2 = UIElement_Text::AddText_Internal(edi_1, var_18, var_14_2);
00469c13                              
00469c1e                              if (this_2->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xb] != this_2->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2])
00469c9c                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00469c1e                              else
00469c1e                              {
00469c26                                  class HashSetData<UIElement *>* var_14_3 = ADJ(edi_1)->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2];
00469c93                                  UIElement_Text::ScrollToPosition(edi_1, edx_2);
00469c9c                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00469c1e                              }
00469bd5                          }
00469bd5                          break;
00469bd5                      }
00469bcb                      case 0xb:
00469bcb                      case 0xc:
00469bcb                      case 0xe:
00469bcb                      case 0xf:
00469bcb                      case 0x10:
00469bcb                      case 0x11:
00469bcb                      case 0x12:
00469bcb                      case 0x13:
00469bcb                      case 0x14:
00469bcb                      case 0x15:
00469bcb                      case 0x16:
00469bcb                      case 0x17:
00469bcb                      case 0x18:
00469bcb                      case 0x19:
00469bcb                      case 0x1a:
00469bcb                      {
00469bcb                          goto label_469c29;
00469bcb                      }
00469bcb                  }
00469bb3          }
00469bb3          
00469ca4          uint32_t var_14_8 = 0;
00469ca6          var_18 = ((uint32_t)this_3);
00469caf          UIElement::BroadcastElementMessage(((char*)this_2 - 0x608), 0x12, var_18, var_14_8);
00469ba0      }
00469b90  }

00469cbb                                                                                   90                                         .
00469cbc  uint32_t jump_table_469cbc[0x3] = 
00469cbc  {
00469cbc      [0x0] =  0x00469ca1
00469cc0      [0x1] =  0x00469bd2
00469cc4      [0x2] =  0x00469c29
00469cc8  }
00469cc8  uint8_t lookup_table_469cc8[0x13] = 
00469cc8  {
00469cc8      [0x00] =  0x00
00469cc9      [0x01] =  0x01
00469cca      [0x02] =  0x02
00469ccb      [0x03] =  0x02
00469ccc      [0x04] =  0x01
00469ccd      [0x05] =  0x02
00469cce      [0x06] =  0x02
00469ccf      [0x07] =  0x02
00469cd0      [0x08] =  0x02
00469cd1      [0x09] =  0x02
00469cd2      [0x0a] =  0x02
00469cd3      [0x0b] =  0x02
00469cd4      [0x0c] =  0x02
00469cd5      [0x0d] =  0x02
00469cd6      [0x0e] =  0x02
00469cd7      [0x0f] =  0x02
00469cd8      [0x10] =  0x02
00469cd9      [0x11] =  0x02
00469cda      [0x12] =  0x00
00469cdb  }

00469cdb                                                                                   90 90 90 90 90                             .....

00469ce0  void __thiscall UIElement_Text::AppendText(class UIElement_Text* this, class PStringBase<unsigned short> const* arg2)

00469ce0  {
00469ce4      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
00469ce9      class UIElement_Text* this_1 = this;
00469cf4      InterlockedIncrement(&m_charbuffer->m_data[-8]);
00469cfc      UIElement_Text::AddText_Internal(this, m_charbuffer, 3);
00469ce0  }

00469d05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00469d10  void __thiscall UIElement_Text::AppendStringInfo(class UIElement_Text* this, class StringInfo const* arg2)

00469d10  {
00469d1e      class PStringBase<unsigned short>* eax;
00469d1e      int32_t ecx_1;
00469d1e      eax = StringInfo::GetString(arg2, &arg2, 0);
00469d23      class PSRefBufferCharData<unsigned short>* m_charbuffer = eax->m_charbuffer;
00469d27      int32_t var_c_1 = ecx_1;
00469d30      InterlockedIncrement(&m_charbuffer->m_data[-8]);
00469d38      UIElement_Text::AddText_Internal(this, m_charbuffer, 3);
00469d41      void* __offset(StringInfo, -0x14) esi_2 = ((char*)arg2 - 0x14);
00469d41      
00469d54      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00469d5c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00469d10  }

00469d62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00469d70  void __thiscall UIElement_Text::AppendTextWithFont(class UIElement_Text* this, class PStringBase<unsigned short> const* arg2, int32_t arg3, int32_t arg4)

00469d70  {
00469d84      UIElement_Text::SetFontDIDHelper(this, 0x1a, &this->m_curFontObj, arg3);
00469d99      UIElement_Text::SetFontColorHelper(this, 0x1b, &this->m_curFontColor, arg4);
00469daa      int32_t ecx_4 = UIElement_Text::SetFontColorHelper(this, 0x1d, &this->m_curTagFontColor, arg4);
00469db3      class PStringBase<unsigned short> m_charbuffer = arg2->m_charbuffer;
00469db7      int32_t var_10_3 = ecx_4;
00469dc0      InterlockedIncrement((m_charbuffer - 0x10));
00469dc8      UIElement_Text::AddText_Internal(this, m_charbuffer, 3);
00469d70  }

00469dd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00469de0  void __thiscall UIElement_Text::AppendStringInfoWithFont(class UIElement_Text* this, class StringInfo const* arg2, int32_t arg3, int32_t arg4)

00469de0  {
00469df4      UIElement_Text::SetFontDIDHelper(this, 0x1a, &this->m_curFontObj, arg3);
00469e09      UIElement_Text::SetFontColorHelper(this, 0x1b, &this->m_curFontColor, arg4);
00469e1a      UIElement_Text::SetFontColorHelper(this, 0x1d, &this->m_curTagFontColor, arg4);
00469e2a      class PStringBase<unsigned short>* eax_1;
00469e2a      int32_t ecx_5;
00469e2a      eax_1 = StringInfo::GetString(arg2, &arg3, 0);
00469e2f      class PStringBase<unsigned short> m_charbuffer = eax_1->m_charbuffer;
00469e33      int32_t var_10_4 = ecx_5;
00469e3c      InterlockedIncrement((m_charbuffer - 0x10));
00469e44      UIElement_Text::AddText_Internal(this, m_charbuffer, 3);
00469e4d      int32_t* esi_2 = (arg3 - 0x14);
00469e4d      
00469e60      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00469e68          **(uint32_t**)esi_2(1);
00469de0  }

00469e6f                                               90                                                                 .

00469e70  void __fastcall UIElement_Text::CheckStringDownloads(class UIElement_Text* this)

00469e70  {
00469e73      int32_t ebx;
00469e73      int32_t var_c = ebx;
00469e77      uint32_t m_num = this->m_downloadQueue.m_num;
00469e77      
00469e81      if (m_num != 0)
00469e81      {
00469e87          int32_t i = 0;
00469e8b          char var_5_1 = 0;
00469e90          int32_t i_1 = 0;
00469e94          class PStringBase<unsigned short> __return;
00469e94          
00469e94          if (m_num > 0)
00469e94          {
00469f7d              do
00469f7d              {
00469ea6                  int32_t* ebx_2 = this->m_downloadQueue.m_data[i];
00469ea6                  
00469eab                  if (ebx_2 != 0)
00469eab                  {
00469ebd                      if (ebx_2[0x27] != INVALID_ASYNCCONTEXT.m_id)
00469ebd                          break;
00469ebd                      
00469ec3                      uint32_t m_num_1 = this->m_downloadQueue.m_num;
00469ec3                      
00469ecb                      if (i < m_num_1)
00469ecb                      {
00469ecd                          class StringDownload** m_data = this->m_downloadQueue.m_data;
00469ed6                          this->m_downloadQueue.m_num = (m_num_1 - 1);
00469edc                          void* eax_1 = &m_data[i];
00469edf                          void* ecx_2 = &m_data[(m_num_1 - 1)];
00469edf                          
00469ee4                          if (eax_1 < ecx_2)
00469ee4                          {
00469ef2                              __builtin_memcpy(eax_1, ((char*)eax_1 + 4), ((((((char*)ecx_2 - eax_1) - 1) >> 2) + 1) << 2));
00469ef4                              i = i_1;
00469ee4                          }
00469ee4                          
00469efe                          this->m_downloadQueue.m_data[this->m_downloadQueue.m_num] = 0;
00469ecb                      }
00469ecb                      
00469f0b                      uint32_t ecx_7 = ebx_2[0x25];
00469f18                      __return = &this->m_curFontObj;
00469f1d                      i -= 1;
00469f1e                      UIElement_Text::SetFontDIDHelper(this, 0x1a, __return, ecx_7);
00469f23                      uint32_t esi_2 = ebx_2[0x26];
00469f30                      __return = &this->m_curFontColor;
00469f35                      UIElement_Text::SetFontColorHelper(this, 0x1b, __return, esi_2);
00469f41                      __return = &this->m_curTagFontColor;
00469f4b                      uint32_t var_1c_4 = 0;
00469f4d                      __return = UIElement_Text::SetFontColorHelper(this, 0x1d, __return, esi_2);
00469f56                      StringInfo::GetString(&ebx_2[1], &__return, 0);
00469f5d                      UIElement_Text::AddText_Internal(this, __return, var_1c_4);
00469f68                      var_5_1 = 1;
00469f6d                      *(uint32_t*)(*(uint32_t*)ebx_2 + 8)(1);
00469eab                  }
00469eab                  
00469f76                  i += 1;
00469f79                  i_1 = i;
00469f7d              } while (i < this->m_downloadQueue.m_num);
00469e94          }
00469e94          
00469f8b          if (this->m_downloadQueue.m_num == 0)
00469f91              UIListener::UnRegisterForGlobalMessage(this, 3);
00469f91          
00469f96          uint32_t eax_6;
00469f96          eax_6 = var_5_1;
00469f96          
00469f9c          if (eax_6 != 0)
00469f9c          {
00469f9e              uint32_t var_1c_7 = 0;
00469fa0              __return = 0;
00469fa6              UIElement::BroadcastElementMessage(this, 0x13, __return, var_1c_7);
00469f9c          }
00469e81      }
00469e70  }

00469fb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00469fc0  void __fastcall UIElement_Text::Global_Loop(class UIElement_Text* this)

00469fc0  {
00469fc6      UIElement_Text::CheckStringDownloads(this);
00469fc6      
00469fd2      if (((this->m_bitField & 5) != 0 && UIElement::GetHasFocus(this) != 0))
00469fd2      {
00469fe7          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
00469ff6          int32_t var_4_1 = *(int32_t*)((char*)Timer::cur_time + 4);
00469ffa          uint32_t eax_2 = GetCaretBlinkTime();
0046a006          long double x87_r7_1 = ((long double)eax_2);
0046a006          
0046a00a          if (eax_2 < 0)
0046a00c              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0046a00c          
0046a012          long double x87_r7_3 = (x87_r7_1 * ((long double)0.00100000005f));
0046a01d          long double x87_r6_1 = ((long double)this->m_lastCursorMoveTime);
0046a023          long double temp1_1 = ((long double)this->m_lastFlashFlipTime);
0046a023          (x87_r6_1 - temp1_1);
0046a029          eax_2 = ((((x87_r6_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0046a029          
0046a02e          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
0046a02e          {
0046a053          label_46a053:
0046a053              eax_2 = 1;
0046a062          label_46a062:
0046a062              *(uint32_t*)((char*)this->m_lastFlashFlipTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0046a068              this->m_lastFlashFlipTime = (*(uint32_t*)Timer::cur_time);
0046a070              uint32_t m_bitField = this->m_bitField;
0046a077              uint32_t eax_3;
0046a077              
0046a077              if (eax_2 == 0)
0046a07d                  eax_3 = (m_bitField & 0xfffffdff);
0046a077              else
0046a079                  eax_3 = (m_bitField | 0x200);
0046a079              
0046a082              this->m_bitField = eax_3;
0046a082              
0046a0aa              if ((((this->m_lastCursor.m_x1 - this->m_lastCursor.m_x0) + 1) > 0 && ((this->m_lastCursor.m_y1 - this->m_lastCursor.m_y0) + 1) > 0))
0046a0af                  UIRegion::AddDirtyRect(this, &this->m_lastCursor);
0046a02e          }
0046a02e          else
0046a02e          {
0046a034              long double x87_r6_3 = (((long double)Timer::cur_time_1) - ((long double)this->m_lastFlashFlipTime));
0046a03c              (x87_r7_3 - x87_r6_3);
0046a03e              eax_2 = ((((x87_r7_3 < x87_r6_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, x87_r6_3))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == x87_r6_3) ? 1 : 0) << 0xe) | 0))));
0046a040              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0046a040              
0046a043              if (!(p_1))
0046a043              {
0046a04b                  if ((this->m_bitField & 0x200) == 0)
0046a04b                      goto label_46a053;
0046a04b                  
0046a04d                  eax_2 = 0;
0046a04f                  goto label_46a062;
0046a043              }
0046a02e          }
00469fd2      }
00469fc0  }

0046a0b9                                                                             90 90 90 90 90 90 90                           .......

0046a0c0  void __thiscall UIElement_Text::SetStringInfo(class UIElement_Text* this, class StringInfo const* arg2)

0046a0c0  {
0046a0c3      UIElement_Text::ClearAllText(this);
0046a0cf      UIElement_Text::AppendStringInfo(this, arg2);
0046a0c0  }

0046a0d8                                                                          90 90 90 90 90 90 90 90                          ........

0046a0e0  void __thiscall UIElement_Text::SetStringInfoWithFont(class UIElement_Text* this, class StringInfo const* arg2, int32_t arg3, int32_t arg4)

0046a0e0  {
0046a0e3      UIElement_Text::ClearAllText(this);
0046a0f9      UIElement_Text::AppendStringInfoWithFont(this, arg2, arg3, arg4);
0046a0e0  }

0046a102        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046a110  void __fastcall UIElement_Text::Paste(class UIElement_Text* this)

0046a110  {
0046a11d      if ((this->m_bitField & 1) != 0)
0046a11d      {
0046a123          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0046a129          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0046a132          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0046a132          
0046a15b          if ((Device::GetStringFromClipboard(&PStringBase<unsigned short>::s_NullBuffer_2) != 0 && PStringBase<unsigned short>::s_NullBuffer_2->m_data[0x7ffffffffffffffe] != 1))
0046a15b          {
0046a169              if (this->m_bitField < 0)
0046a16d                  UIElement_Text::DeleteSelection(this);
0046a16d              
0046a17b              uint32_t m_nCursorPos;
0046a17b              PStringBase<unsigned short>::PStringBase<unsigned short>(&m_nCursorPos, &data_79c288);
0046a189              class PStringBase<unsigned short> var_8;
0046a189              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, &data_79c280);
0046a19c              PStringBase<unsigned short>::replace(&PStringBase<unsigned short>::s_NullBuffer_2, &var_8, &m_nCursorPos);
0046a1a5              int32_t* esi_2 = (var_8 - 0x14);
0046a1a5              
0046a1b4              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0046a1bc                  **(uint32_t**)esi_2(1);
0046a1bc              
0046a1c2              int32_t* esi_4 = (m_nCursorPos - 0x14);
0046a1c2              
0046a1d1              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0046a1d9                  **(uint32_t**)esi_4(1);
0046a1d9              
0046a1db              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0046a1df              int32_t eax_6 = PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe];
0046a1e2              int32_t esi_5 = 0;
0046a1e2              
0046a1e6              if (eax_6 > 0)
0046a1e6              {
0046a1ef                  bool cond:0_1 = 0 >= eax_6;
0046a1ef                  
0046a20f                  do
0046a20f                  {
0046a1f1                      void* eax_7 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[(eax_6 - 1)];
0046a1f1                      
0046a1f5                      if (!(cond:0_1))
0046a1f7                          eax_7 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[esi_5];
0046a1f7                      
0046a1e9                      this->vtable->CharacterHandler(((uint32_t)*(uint16_t*)eax_7));
0046a205                      PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0046a209                      eax_6 = PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe];
0046a20c                      esi_5 += 1;
0046a20d                      cond:0_1 = esi_5 >= eax_6;
0046a20f                  } while (esi_5 < eax_6);
0046a1e6              }
0046a1e6              
0046a21c              m_nCursorPos = this->m_nCursorPos;
0046a223              char eax_9;
0046a223              int32_t edx_4;
0046a223              int80_t st0_1;
0046a223              st0_1 = UIElement_Text::IsPositionInView(this, &m_nCursorPos);
0046a223              
0046a22a              if (eax_9 == 0)
0046a22a              {
0046a232                  uint32_t __saved_edi_7 = this->m_nCursorPos;
0046a235                  UIElement_Text::ScrollToPosition(this, edx_4);
0046a22a              }
0046a15b          }
0046a15b          
0046a23e          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_7 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0046a23e          
0046a24d          if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0046a255              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0046a11d      }
0046a110  }

0046a25e                                                                                            90 90                                ..

0046a260  uint8_t __thiscall UIElement_Text::OnAction(class UIElement_Text* this, class InputEvent const* arg2)

0046a260  {
0046a269      uint32_t m_nCursorPos = UIElement::OnAction(this, arg2);
0046a269      
0046a277      if ((m_nCursorPos == 0 && arg2->m_fStart != 0))
0046a283          switch ((arg2->m_InputAction - 0x16))
0046a283          {
0046a2ba              case 0:
0046a2ba              {
0046a2ba                  UIElement_Text::MoveCursor(this, LEFT);
0046a2c0                  int32_t eax_1;
0046a2c0                  eax_1 = 1;
0046a2c3                  return 1;
0046a2ba                  break;
0046a2ba              }
0046a2e2              case 1:
0046a2e2              {
0046a2e2                  UIElement_Text::MoveCursor(this, RIGHT);
0046a2e8                  int32_t eax_3;
0046a2e8                  eax_3 = 1;
0046a2eb                  return 1;
0046a2e2                  break;
0046a2e2              }
0046a2ce              case 2:
0046a2ce              {
0046a2ce                  UIElement_Text::MoveCursor(this, WORD_LEFT);
0046a2d4                  int32_t eax_2;
0046a2d4                  eax_2 = 1;
0046a2d7                  return 1;
0046a2ce                  break;
0046a2ce              }
0046a2f6              case 3:
0046a2f6              {
0046a2f6                  UIElement_Text::MoveCursor(this, WORD_RIGHT);
0046a2fc                  int32_t eax_4;
0046a2fc                  eax_4 = 1;
0046a2ff                  return 1;
0046a2f6                  break;
0046a2f6              }
0046a332              case 4:
0046a332              {
0046a332                  UIElement_Text::MoveCursor(this, LINE_HOME);
0046a338                  int32_t eax_7;
0046a338                  eax_7 = 1;
0046a33b                  return 1;
0046a332                  break;
0046a332              }
0046a357              case 5:
0046a357              {
0046a357                  UIElement_Text::MoveCursor(this, LINE_END);
0046a35d                  int32_t eax_9;
0046a35d                  eax_9 = 1;
0046a360                  return 1;
0046a357                  break;
0046a357              }
0046a343              case 6:
0046a343              {
0046a343                  UIElement_Text::MoveCursor(this, HOME);
0046a349                  int32_t eax_8;
0046a349                  eax_8 = 1;
0046a34c                  return 1;
0046a343                  break;
0046a343              }
0046a36b              case 7:
0046a36b              {
0046a36b                  UIElement_Text::MoveCursor(this, END);
0046a371                  int32_t eax_10;
0046a371                  eax_10 = 1;
0046a374                  return 1;
0046a36b                  break;
0046a36b              }
0046a292              case 8:
0046a292              {
0046a292                  UIElement_Text::MoveCursor(this, UP);
0046a297                  m_nCursorPos = 1;
0046a292                  break;
0046a292              }
0046a2a6              case 9:
0046a2a6              {
0046a2a6                  UIElement_Text::MoveCursor(this, DOWN);
0046a2ac                  int32_t eax;
0046a2ac                  eax = 1;
0046a2af                  return 1;
0046a2a6                  break;
0046a2a6              }
0046a30a              case 0xa:
0046a30a              {
0046a30a                  UIElement_Text::MoveCursor(this, PAGEUP);
0046a310                  int32_t eax_5;
0046a310                  eax_5 = 1;
0046a313                  return 1;
0046a30a                  break;
0046a30a              }
0046a31e              case 0xb:
0046a31e              {
0046a31e                  UIElement_Text::MoveCursor(this, PAGEDOWN);
0046a324                  int32_t eax_6;
0046a324                  eax_6 = 1;
0046a327                  return 1;
0046a31e                  break;
0046a31e              }
0046a379              case 0xc:
0046a379              {
0046a379                  UIElement_Text::Copy(this);
0046a37f                  int32_t eax_11;
0046a37f                  eax_11 = 1;
0046a382                  return 1;
0046a379                  break;
0046a379              }
0046a387              case 0xd:
0046a387              {
0046a387                  UIElement_Text::Cut(this);
0046a38d                  int32_t eax_12;
0046a38d                  eax_12 = 1;
0046a390                  return 1;
0046a387                  break;
0046a387              }
0046a395              case 0xe:
0046a395              {
0046a395                  UIElement_Text::Paste(this);
0046a39b                  int32_t eax_13;
0046a39b                  eax_13 = 1;
0046a39e                  return 1;
0046a395                  break;
0046a395              }
0046a433              case 0xf:
0046a433              {
0046a433                  if ((*(uint8_t*)((char*)this->m_bitField)[1] & 0x20) != 0)
0046a433                  {
0046a439                      this->vtable->RelinquishFocus();
0046a444                      int32_t eax_20;
0046a444                      eax_20 = 1;
0046a447                      return 1;
0046a433                  }
0046a433                  
0046a297                  m_nCursorPos = 1;
0046a433                  break;
0046a433              }
0046a3a1              case 0x10:
0046a3a1              {
0046a3a1                  m_nCursorPos = this->m_bitField;
0046a3a1                  
0046a3b7                  if ((m_nCursorPos >= 0 || this->m_nSelectionStart == this->m_nSelectionEnd))
0046a3a9                      goto label_46a3fe;
0046a3a9                  
0046a3bb              label_46a3bb:
0046a3bb                  UIElement_Text::DeleteSelection(this);
0046a3c1                  int32_t eax_15;
0046a3c1                  eax_15 = 1;
0046a3c4                  return 1;
0046a3a1                  break;
0046a3a1              }
0046a413              case 0x11:
0046a413              {
0046a413                  if ((*(uint8_t*)((char*)this->m_bitField)[1] & 0x10) != 0)
0046a413                  {
0046a419                      this->vtable->RelinquishFocus();
0046a424                      int32_t eax_18;
0046a424                      eax_18 = 1;
0046a427                      return 1;
0046a413                  }
0046a413                  
0046a297                  m_nCursorPos = 1;
0046a413                  break;
0046a413              }
0046a3c7              case 0x12:
0046a3c7              {
0046a3c7                  m_nCursorPos = this->m_bitField;
0046a3c7                  
0046a3dd                  if ((m_nCursorPos < 0 && this->m_nSelectionStart != this->m_nSelectionEnd))
0046a3cf                      goto label_46a3bb;
0046a3cf                  
0046a3df                  m_nCursorPos = this->m_nCursorPos;
0046a3df                  
0046a3e7                  if (m_nCursorPos != 0)
0046a3e7                  {
0046a3f3                      arg2 = (m_nCursorPos - 1);
0046a3f7                      UIElement_Text::SetCursorPosition(this, (m_nCursorPos - 1), ctm_Default);
0046a3fe                  label_46a3fe:
0046a3fe                      UIElement_Text::DeleteChar(this);
0046a404                      int32_t eax_17;
0046a404                      eax_17 = 1;
0046a407                      return 1;
0046a3e7                  }
0046a3e7                  
0046a297                  m_nCursorPos = 1;
0046a3c7                  break;
0046a3c7              }
0046a283          }
0046a283      
0046a29b      return m_nCursorPos;
0046a260  }

0046a44a                                8b ff                                                                        ..
0046a44c  uint32_t jump_table_46a44c[0x13] = 
0046a44c  {
0046a44c      [0x00] =  0x0046a2b2
0046a450      [0x01] =  0x0046a2da
0046a454      [0x02] =  0x0046a2c6
0046a458      [0x03] =  0x0046a2ee
0046a45c      [0x04] =  0x0046a32a
0046a460      [0x05] =  0x0046a34f
0046a464      [0x06] =  0x0046a33e
0046a468      [0x07] =  0x0046a363
0046a46c      [0x08] =  0x0046a28a
0046a470      [0x09] =  0x0046a29e
0046a474      [0x0a] =  0x0046a302
0046a478      [0x0b] =  0x0046a316
0046a47c      [0x0c] =  0x0046a377
0046a480      [0x0d] =  0x0046a385
0046a484      [0x0e] =  0x0046a393
0046a488      [0x0f] =  0x0046a42a
0046a48c      [0x10] =  0x0046a3a1
0046a490      [0x11] =  0x0046a40a
0046a494      [0x12] =  0x0046a3c7
0046a498  }

0046a498                                                                          90 90 90 90 90 90 90 90                          ........

0046a4a0  void __thiscall UIElement_Text::ListenToGlobalMessage(class UIElement_Text* this, uint32_t arg2, int32_t arg3)

0046a4a0  {
0046a4a5      if (arg2 == 3)
0046a4a7          UIElement_Text::Global_Loop(this);
0046a4a0  }

0046a4af                                               90                                                                 .

0046a4b0  void __thiscall UIElement_Text::SetText(class UIElement_Text* this, class PStringBase<unsigned short> const* arg2)

0046a4b0  {
0046a4bd      void var_90;
0046a4bd      StringInfo::StringInfo(&var_90);
0046a4d0      StringInfo::SetLiteralValue(&var_90, arg2, 1);
0046a4d7      UIElement_Text::ClearAllText(this);
0046a4e3      UIElement_Text::AppendStringInfo(this, &var_90);
0046a4ec      StringInfo::~StringInfo(&var_90);
0046a4b0  }

0046a4fb                                                                                   90 90 90 90 90                             .....

0046a500  void __thiscall UIElement_Text::SetTextWithFont(class UIElement_Text* this, class PStringBase<unsigned short> const* arg2, int32_t arg3, int32_t arg4)

0046a500  {
0046a50d      void var_90;
0046a50d      StringInfo::StringInfo(&var_90);
0046a520      StringInfo::SetLiteralValue(&var_90, arg2, 1);
0046a527      UIElement_Text::ClearAllText(this);
0046a543      UIElement_Text::AppendStringInfoWithFont(this, &var_90, arg3, arg4);
0046a54c      StringInfo::~StringInfo(&var_90);
0046a500  }

0046a55b                                                                                   90 90 90 90 90                             .....

0046a560  void __fastcall UIElement_Text::DoFontReset(class UIElement_Text* this)

0046a560  {
0046a560      class UIElement_Text* __return = this;
0046a56f      UIElement_Text::SetFontDIDHelper(this, 0x1a, &this->m_curFontObj, 0);
0046a581      UIElement_Text::SetFontColorHelper(this, 0x1b, &this->m_curFontColor, 0);
0046a593      UIElement_Text::SetFontColorHelper(this, 0x1d, &this->m_curTagFontColor, 0);
0046a593      
0046a59f      if (s_bChangeTextInDoFontRest != 0)
0046a59f      {
0046a5b0          UIElement_Text::SetText(this, UIElement_Text::GetPreParsedText(this, &__return));
0046a5b9          void* __offset(UIElement_Text, -0x14) esi_2 = ((char*)__return - 0x14);
0046a5b9          
0046a5cc          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0046a5d4              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0046a59f      }
0046a560  }

0046a5d9                                                                             90 90 90 90 90 90 90                           .......

0046a5e0  void __thiscall UIElement_Text::MatchElement(class UIElement_Text* this, class UIElement const* arg2)

0046a5e0  {
0046a5e2      class UIElement* edi = arg2;
0046a5e9      UIElement::MatchElement(this, edi);
0046a5f4      class UIElement_Text* eax_1 = edi->vtable->DynamicCast(0xc);
0046a5f4      
0046a5fc      if (eax_1 != 0)
0046a5fc      {
0046a60d          UIElement_Text::SetText(this, UIElement_Text::GetPreParsedText(eax_1, &arg2));
0046a616          void* __offset(UIElement, -0x14) esi_2 = ((char*)arg2 - 0x14);
0046a616          
0046a629          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0046a631              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0046a5fc      }
0046a5e0  }

0046a638                                                                          90 90 90 90 90 90 90 90                          ........

0046a640  void __thiscall UIElement_Text::OnSetAttribute(class UIElement_Text* this, class BaseProperty const* arg2)

0046a640  {
0046a652      UIElement_Scrollable::OnSetAttribute(this, arg2);
0046a674      char var_ac;
0046a674      float r;
0046a674      void var_90;
0046a674      
0046a674      switch ((BaseProperty::GetPropertyName(arg2) - 0x14))
0046a674      {
0046a788          case nullptr:
0046a788          {
0046a788              class BasePropertyValue* m_pcPropertyValue_5 = arg2->m_pcPropertyValue;
0046a788              
0046a78d              if (m_pcPropertyValue_5 != 0)
0046a78f                  m_pcPropertyValue_5->vtable->InqEnum(&var_ac);
0046a78f              
0046a7a3              UIElement_Text::SetHorizontalJustification(this, var_ac);
0046a788              break;
0046a788          }
0046a75c          case 1:
0046a75c          {
0046a75c              class BasePropertyValue* m_pcPropertyValue_4 = arg2->m_pcPropertyValue;
0046a75c              
0046a761              if (m_pcPropertyValue_4 != 0)
0046a763                  m_pcPropertyValue_4->vtable->InqEnum(&var_ac);
0046a763              
0046a777              UIElement_Text::SetVerticalJustification(this, var_ac);
0046a75c              break;
0046a75c          }
0046a6d8          case 2:
0046a6d8          {
0046a6d8              class BasePropertyValue* m_pcPropertyValue_1 = arg2->m_pcPropertyValue;
0046a6d8              
0046a6dd              if (m_pcPropertyValue_1 != 0)
0046a6df                  m_pcPropertyValue_1->vtable->InqBool(&var_ac);
0046a6df              
0046a6f0              UIElement_Text::SetEditable(this, ((int8_t)var_ac));
0046a6f5          label_46a6f5:
0046a6f5              struct UIElement_Text::VTable* vtable = this->vtable;
0046a702              vtable->SetMouseVisible(vtable->GetShouldBeMouseVisible());
0046a6d8              break;
0046a6d8          }
0046a8e6          case 3:
0046a8e6          {
0046a8e6              StringInfo::StringInfo(&var_90);
0046a8eb              class BasePropertyValue* m_pcPropertyValue_14 = arg2->m_pcPropertyValue;
0046a8eb              
0046a8f2              if (m_pcPropertyValue_14 != 0)
0046a8f4                  m_pcPropertyValue_14->vtable->InqStringInfo(&var_90);
0046a8f4              
0046a91b              int32_t var_8c;
0046a91b              int32_t var_88;
0046a91b              char var_c;
0046a91b              
0046a91b              if ((var_c == 1 || (var_8c != 0 || var_88 != INVALID_DID.id)))
0046a91b              {
0046a940                  UIElement_Text::SetStringInfo(this, &var_90);
0046a949                  StringInfo::~StringInfo(&var_90);
0046a957                  return;
0046a91b              }
0046a91b              
0046a91f              UIElement_Text::ClearAllText(this);
0046a928              StringInfo::~StringInfo(&var_90);
0046a8e6              break;
0046a8e6          }
0046a6c7          case 6:
0046a6c7          case 7:
0046a6c7          case 9:
0046a6c7          {
0046a6c7              UIElement_Text::DoFontReset(this);
0046a6c7              break;
0046a6c7          }
0046a8bb          case 0xa:
0046a8bb          {
0046a8bb              class BasePropertyValue* m_pcPropertyValue_13 = arg2->m_pcPropertyValue;
0046a8bb              
0046a8c0              if (m_pcPropertyValue_13 != 0)
0046a8c2                  m_pcPropertyValue_13->vtable->InqInteger(&var_ac);
0046a8c2              
0046a8d1              this->m_glyphList.m_nMaxCharacters = var_ac;
0046a8bb              break;
0046a8bb          }
0046a7b4          case 0xb:
0046a7b4          {
0046a7b4              class BasePropertyValue* m_pcPropertyValue_6 = arg2->m_pcPropertyValue;
0046a7b4              
0046a7b9              if (m_pcPropertyValue_6 != 0)
0046a7bb                  m_pcPropertyValue_6->vtable->InqBool(&var_ac);
0046a7bb              
0046a7cc              UIElement_Text::SetNoIme(this, ((int8_t)var_ac));
0046a7b4              break;
0046a7b4          }
0046a714          case 0xc:
0046a714          {
0046a714              class BasePropertyValue* m_pcPropertyValue_2 = arg2->m_pcPropertyValue;
0046a714              
0046a719              if (m_pcPropertyValue_2 != 0)
0046a71b                  m_pcPropertyValue_2->vtable->InqBool(&var_ac);
0046a71b              
0046a72c              UIElement_Text::SetOneLine(this, ((int8_t)var_ac));
0046a714              break;
0046a714          }
0046a804          case 0xd:
0046a804          {
0046a804              class BasePropertyValue* m_pcPropertyValue_8 = arg2->m_pcPropertyValue;
0046a804              
0046a809              if (m_pcPropertyValue_8 != 0)
0046a80b                  m_pcPropertyValue_8->vtable->InqBool(&var_ac);
0046a80b              
0046a81c              UIElement_Text::SetOutline(this, ((int8_t)var_ac));
0046a804              break;
0046a804          }
0046a681          case 0xe:
0046a681          {
0046a681              float g = RGBAColor_Black.g;
0046a687              float b = RGBAColor_Black.b;
0046a68c              r = RGBAColor_Black.r;
0046a696              float a = RGBAColor_Black.a;
0046a69a              class BasePropertyValue* m_pcPropertyValue = arg2->m_pcPropertyValue;
0046a69f              float g_1 = g;
0046a6a3              float b_1 = b;
0046a6a3              
0046a6a7              if (m_pcPropertyValue != 0)
0046a6a9                  m_pcPropertyValue->vtable->InqColor(&r);
0046a6a9              
0046a6bf              this->m_curOutlineColor = RGBAColor::GetColor32(&r);
0046a6c7              UIElement_Text::DoFontReset(this);
0046a681              break;
0046a681          }
0046a881          case 0xf:
0046a881          {
0046a881              class BasePropertyValue* m_pcPropertyValue_11 = arg2->m_pcPropertyValue;
0046a881              
0046a886              if (m_pcPropertyValue_11 != 0)
0046a888                  m_pcPropertyValue_11->vtable->InqInteger(&var_ac);
0046a888              
0046a896              this->m_margL = var_ac;
0046a89c              goto label_46a84a;
0046a881          }
0046a89e          case 0x10:
0046a89e          {
0046a89e              class BasePropertyValue* m_pcPropertyValue_12 = arg2->m_pcPropertyValue;
0046a89e              
0046a8a3              if (m_pcPropertyValue_12 != 0)
0046a8a5                  m_pcPropertyValue_12->vtable->InqInteger(&var_ac);
0046a8a5              
0046a8b3              this->m_margR = var_ac;
0046a8b9              goto label_46a84a;
0046a89e          }
0046a82d          case 0x11:
0046a82d          {
0046a82d              class BasePropertyValue* m_pcPropertyValue_9 = arg2->m_pcPropertyValue;
0046a82d              
0046a832              if (m_pcPropertyValue_9 != 0)
0046a834                  m_pcPropertyValue_9->vtable->InqInteger(&var_ac);
0046a834              
0046a842              this->m_margU = var_ac;
0046a84a          label_46a84a:
0046a84a              UIElement_Text::DetermineMarginValues(this);
0046a853              UIElement_Text::SetDirty(this, 1);
0046a82d              break;
0046a82d          }
0046a864          case 0x12:
0046a864          {
0046a864              class BasePropertyValue* m_pcPropertyValue_10 = arg2->m_pcPropertyValue;
0046a864              
0046a869              if (m_pcPropertyValue_10 != 0)
0046a86b                  m_pcPropertyValue_10->vtable->InqInteger(&var_ac);
0046a86b              
0046a879              this->m_margD = var_ac;
0046a87f              goto label_46a84a;
0046a864          }
0046a73d          case 0x13:
0046a73d          {
0046a73d              class BasePropertyValue* m_pcPropertyValue_3 = arg2->m_pcPropertyValue;
0046a73d              
0046a742              if (m_pcPropertyValue_3 != 0)
0046a744                  m_pcPropertyValue_3->vtable->InqBool(&var_ac);
0046a744              
0046a755              UIElement_Text::SetSelectable(this, ((int8_t)var_ac));
0046a75a              goto label_46a6f5;
0046a73d          }
0046a7dd          case 0x14:
0046a7dd          {
0046a7dd              class BasePropertyValue* m_pcPropertyValue_7 = arg2->m_pcPropertyValue;
0046a7e2              char var_a5;
0046a7e2              
0046a7e2              if (m_pcPropertyValue_7 != 0)
0046a7e4                  m_pcPropertyValue_7->vtable->InqBool(&var_a5);
0046a7e4              
0046a7ee              m_pcPropertyValue_7 = var_a5;
0046a7f3              this->m_glyphList.m_bTrimFromTop = m_pcPropertyValue_7;
0046a7dd              break;
0046a7dd          }
0046a95a          case 0x15:
0046a95a          {
0046a95a              class BasePropertyValue* m_pcPropertyValue_15 = arg2->m_pcPropertyValue;
0046a961              var_ac = 0;
0046a961              
0046a965              if (m_pcPropertyValue_15 != 0)
0046a967                  m_pcPropertyValue_15->vtable->InqBool(&var_ac);
0046a967              
0046a978              UIElement_Text::SetFitToText(this, ((int8_t)var_ac));
0046a95a              break;
0046a95a          }
0046a98d          case 0xb3:
0046a98d          {
0046a98d              StringInfo::StringInfo(&var_90);
0046a992              class BasePropertyValue* m_pcPropertyValue_16 = arg2->m_pcPropertyValue;
0046a992              
0046a999              if (m_pcPropertyValue_16 != 0)
0046a99b                  m_pcPropertyValue_16->vtable->InqStringInfo(&var_90);
0046a99b              
0046a9b6              UIElement_Text::SetTruncateTextToFit(this, StringInfo::IsValid(&var_90, 1));
0046a9c3              GlyphList::Flush(&this->m_glTruncate);
0046a9c3              
0046a9d5              if (StringInfo::IsValid(&var_90, 1) == 0)
0046a9d5              {
0046aa67                  this->m_cxTrailer = 0;
0046aa6d                  this->m_cyTrailer = 0;
0046aa73                  StringInfo::~StringInfo(&var_90);
0046aa81                  return;
0046a9d5              }
0046a9d5              
0046a9de              UIElement_Text::SetFontDIDNum(this, 0);
0046a9e6              UIElement_Text::SetFontColorNum(this, 0);
0046a9fa              r = 0f;
0046a9fe              int32_t var_a0_1 = 0;
0046aa02              int32_t var_9c_1 = 0;
0046aa0e              void __return;
0046aa0e              UIElement_Text::InqGlyphs(this, StringInfo::GetString(&var_90, &__return, 0), &r);
0046aa17              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0046aa24              GlyphList::AddText(&this->m_glTruncate, 0, &r);
0046aa40              GlyphList::Recalculate(&this->m_glTruncate, 0x7fffffff, 1, &this->m_cxTrailer, &this->m_cyTrailer);
0046aa49              SmartArray<Glyph,1>::~SmartArray<Glyph,1>(&r);
0046aa52              StringInfo::~StringInfo(&var_90);
0046a98d              break;
0046a98d          }
0046aa84          case 0xb7:
0046aa84          {
0046aa84              class BasePropertyValue* m_pcPropertyValue_17 = arg2->m_pcPropertyValue;
0046aa8b              var_ac = 0;
0046aa8b              
0046aa8f              if (m_pcPropertyValue_17 != 0)
0046aa91                  m_pcPropertyValue_17->vtable->InqBool(&var_ac);
0046aa91              
0046aaa2              UIElement_Text::SetLoseFocusOnEscape(this, ((int8_t)var_ac));
0046aa84              break;
0046aa84          }
0046aab3          case 0xb8:
0046aab3          {
0046aab3              class BasePropertyValue* m_pcPropertyValue_18 = arg2->m_pcPropertyValue;
0046aaba              var_ac = 0;
0046aaba              
0046aabe              if (m_pcPropertyValue_18 != 0)
0046aac0                  m_pcPropertyValue_18->vtable->InqBool(&var_ac);
0046aac0              
0046aad1              UIElement_Text::SetLoseFocusOnAcceptInput(this, ((int8_t)var_ac));
0046aab3              break;
0046aab3          }
0046a674      }
0046a640  }

0046aae2        8b ff                                                                                        ..
0046aae4  uint32_t jump_table_46aae4[0x15] = 
0046aae4  {
0046aae4      [0x00] =  0x0046a788
0046aae8      [0x01] =  0x0046a75c
0046aaec      [0x02] =  0x0046a6d8
0046aaf0      [0x03] =  0x0046a8e2
0046aaf4      [0x04] =  0x0046a6c5
0046aaf8      [0x05] =  0x0046a8bb
0046aafc      [0x06] =  0x0046a7b4
0046ab00      [0x07] =  0x0046a714
0046ab04      [0x08] =  0x0046a804
0046ab08      [0x09] =  0x0046a67b
0046ab0c      [0x0a] =  0x0046a881
0046ab10      [0x0b] =  0x0046a89e
0046ab14      [0x0c] =  0x0046a82d
0046ab18      [0x0d] =  0x0046a864
0046ab1c      [0x0e] =  0x0046a73d
0046ab20      [0x0f] =  0x0046a7dd
0046ab24      [0x10] =  0x0046a95a
0046ab28      [0x11] =  0x0046a989
0046ab2c      [0x12] =  0x0046aa84
0046ab30      [0x13] =  0x0046aab3
0046ab34      [0x14] =  0x0046aad6
0046ab38  }
0046ab38  uint8_t lookup_table_46ab38[0xb9] = 
0046ab38  {
0046ab38      [0x00] =  0x00
0046ab39      [0x01] =  0x01
0046ab3a      [0x02] =  0x02
0046ab3b      [0x03] =  0x03
0046ab3c      [0x04] =  0x14
0046ab3d      [0x05] =  0x14
0046ab3e      [0x06] =  0x04
0046ab3f      [0x07] =  0x04
0046ab40      [0x08] =  0x14
0046ab41      [0x09] =  0x04
0046ab42      [0x0a] =  0x05
0046ab43      [0x0b] =  0x06
0046ab44      [0x0c] =  0x07
0046ab45      [0x0d] =  0x08
0046ab46      [0x0e] =  0x09
0046ab47      [0x0f] =  0x0a
0046ab48      [0x10] =  0x0b
0046ab49      [0x11] =  0x0c
0046ab4a      [0x12] =  0x0d
0046ab4b      [0x13] =  0x0e
0046ab4c      [0x14] =  0x0f
0046ab4d      [0x15] =  0x10
0046ab4e      [0x16] =  0x14
0046ab4f      [0x17] =  0x14
0046ab50      [0x18] =  0x14
0046ab51      [0x19] =  0x14
0046ab52      [0x1a] =  0x14
0046ab53      [0x1b] =  0x14
0046ab54      [0x1c] =  0x14
0046ab55      [0x1d] =  0x14
0046ab56      [0x1e] =  0x14
0046ab57      [0x1f] =  0x14
0046ab58      [0x20] =  0x14
0046ab59      [0x21] =  0x14
0046ab5a      [0x22] =  0x14
0046ab5b      [0x23] =  0x14
0046ab5c      [0x24] =  0x14
0046ab5d      [0x25] =  0x14
0046ab5e      [0x26] =  0x14
0046ab5f      [0x27] =  0x14
0046ab60      [0x28] =  0x14
0046ab61      [0x29] =  0x14
0046ab62      [0x2a] =  0x14
0046ab63      [0x2b] =  0x14
0046ab64      [0x2c] =  0x14
0046ab65      [0x2d] =  0x14
0046ab66      [0x2e] =  0x14
0046ab67      [0x2f] =  0x14
0046ab68      [0x30] =  0x14
0046ab69      [0x31] =  0x14
0046ab6a      [0x32] =  0x14
0046ab6b      [0x33] =  0x14
0046ab6c      [0x34] =  0x14
0046ab6d      [0x35] =  0x14
0046ab6e      [0x36] =  0x14
0046ab6f      [0x37] =  0x14
0046ab70      [0x38] =  0x14
0046ab71      [0x39] =  0x14
0046ab72      [0x3a] =  0x14
0046ab73      [0x3b] =  0x14
0046ab74      [0x3c] =  0x14
0046ab75      [0x3d] =  0x14
0046ab76      [0x3e] =  0x14
0046ab77      [0x3f] =  0x14
0046ab78      [0x40] =  0x14
0046ab79      [0x41] =  0x14
0046ab7a      [0x42] =  0x14
0046ab7b      [0x43] =  0x14
0046ab7c      [0x44] =  0x14
0046ab7d      [0x45] =  0x14
0046ab7e      [0x46] =  0x14
0046ab7f      [0x47] =  0x14
0046ab80      [0x48] =  0x14
0046ab81      [0x49] =  0x14
0046ab82      [0x4a] =  0x14
0046ab83      [0x4b] =  0x14
0046ab84      [0x4c] =  0x14
0046ab85      [0x4d] =  0x14
0046ab86      [0x4e] =  0x14
0046ab87      [0x4f] =  0x14
0046ab88      [0x50] =  0x14
0046ab89      [0x51] =  0x14
0046ab8a      [0x52] =  0x14
0046ab8b      [0x53] =  0x14
0046ab8c      [0x54] =  0x14
0046ab8d      [0x55] =  0x14
0046ab8e      [0x56] =  0x14
0046ab8f      [0x57] =  0x14
0046ab90      [0x58] =  0x14
0046ab91      [0x59] =  0x14
0046ab92      [0x5a] =  0x14
0046ab93      [0x5b] =  0x14
0046ab94      [0x5c] =  0x14
0046ab95      [0x5d] =  0x14
0046ab96      [0x5e] =  0x14
0046ab97      [0x5f] =  0x14
0046ab98      [0x60] =  0x14
0046ab99      [0x61] =  0x14
0046ab9a      [0x62] =  0x14
0046ab9b      [0x63] =  0x14
0046ab9c      [0x64] =  0x14
0046ab9d      [0x65] =  0x14
0046ab9e      [0x66] =  0x14
0046ab9f      [0x67] =  0x14
0046aba0      [0x68] =  0x14
0046aba1      [0x69] =  0x14
0046aba2      [0x6a] =  0x14
0046aba3      [0x6b] =  0x14
0046aba4      [0x6c] =  0x14
0046aba5      [0x6d] =  0x14
0046aba6      [0x6e] =  0x14
0046aba7      [0x6f] =  0x14
0046aba8      [0x70] =  0x14
0046aba9      [0x71] =  0x14
0046abaa      [0x72] =  0x14
0046abab      [0x73] =  0x14
0046abac      [0x74] =  0x14
0046abad      [0x75] =  0x14
0046abae      [0x76] =  0x14
0046abaf      [0x77] =  0x14
0046abb0      [0x78] =  0x14
0046abb1      [0x79] =  0x14
0046abb2      [0x7a] =  0x14
0046abb3      [0x7b] =  0x14
0046abb4      [0x7c] =  0x14
0046abb5      [0x7d] =  0x14
0046abb6      [0x7e] =  0x14
0046abb7      [0x7f] =  0x14
0046abb8      [0x80] =  0x14
0046abb9      [0x81] =  0x14
0046abba      [0x82] =  0x14
0046abbb      [0x83] =  0x14
0046abbc      [0x84] =  0x14
0046abbd      [0x85] =  0x14
0046abbe      [0x86] =  0x14
0046abbf      [0x87] =  0x14
0046abc0      [0x88] =  0x14
0046abc1      [0x89] =  0x14
0046abc2      [0x8a] =  0x14
0046abc3      [0x8b] =  0x14
0046abc4      [0x8c] =  0x14
0046abc5      [0x8d] =  0x14
0046abc6      [0x8e] =  0x14
0046abc7      [0x8f] =  0x14
0046abc8      [0x90] =  0x14
0046abc9      [0x91] =  0x14
0046abca      [0x92] =  0x14
0046abcb      [0x93] =  0x14
0046abcc      [0x94] =  0x14
0046abcd      [0x95] =  0x14
0046abce      [0x96] =  0x14
0046abcf      [0x97] =  0x14
0046abd0      [0x98] =  0x14
0046abd1      [0x99] =  0x14
0046abd2      [0x9a] =  0x14
0046abd3      [0x9b] =  0x14
0046abd4      [0x9c] =  0x14
0046abd5      [0x9d] =  0x14
0046abd6      [0x9e] =  0x14
0046abd7      [0x9f] =  0x14
0046abd8      [0xa0] =  0x14
0046abd9      [0xa1] =  0x14
0046abda      [0xa2] =  0x14
0046abdb      [0xa3] =  0x14
0046abdc      [0xa4] =  0x14
0046abdd      [0xa5] =  0x14
0046abde      [0xa6] =  0x14
0046abdf      [0xa7] =  0x14
0046abe0      [0xa8] =  0x14
0046abe1      [0xa9] =  0x14
0046abe2      [0xaa] =  0x14
0046abe3      [0xab] =  0x14
0046abe4      [0xac] =  0x14
0046abe5      [0xad] =  0x14
0046abe6      [0xae] =  0x14
0046abe7      [0xaf] =  0x14
0046abe8      [0xb0] =  0x14
0046abe9      [0xb1] =  0x14
0046abea      [0xb2] =  0x14
0046abeb      [0xb3] =  0x11
0046abec      [0xb4] =  0x14
0046abed      [0xb5] =  0x14
0046abee      [0xb6] =  0x14
0046abef      [0xb7] =  0x12
0046abf0      [0xb8] =  0x13
0046abf1  }

0046abf1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0046ac00  class UIElement* __thiscall UIElement_GroupBox::DynamicCast(class UIElement_GroupBox* this, uint32_t arg2) __pure

0046ac00  {
0046ac09      int32_t eax;
0046ac09      eax = arg2 != 0x11;
0046ac0f      return ((eax - 1) & this);
0046ac00  }

0046ac12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0046ac20  class UIElement* UIElement_GroupBox::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046ac20  {
0046ac26      void* result = operator new(0x5f4);
0046ac26      
0046ac32      if (result == 0)
0046ac5c          return 0;
0046ac5c      
0046ac40      UIElement::UIElement(result, arg1, arg2);
0046ac45      *(uint32_t*)result = 0x79c290;
0046ac4b      *(uint32_t*)((char*)result + 0x5f0) = 0;
0046ac58      return result;
0046ac20  }

0046ac5d                                                                                         90 90 90                               ...

0046ac60  void __fastcall UIElement_GroupBox::PostInit(class UIElement_GroupBox* this)

0046ac60  {
0046ac60      class UIElement_GroupBox* this_1 = this;
0046ac64      UIElement::PostInit(this);
0046ac75      UIElement::GetAttribute_Enum(this, 0xb0, &this_1);
0046ac7a      class UIElement_GroupBox* this_2 = this_1;
0046ac7a      
0046ac80      if (this_2 != 0)
0046ac8a          UIElement::SetAttribute_Enum(this, 0xb1, this_2);
0046ac60  }

0046ac92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0046aca0  void __thiscall UIElement_GroupBox::OnSetAttribute(class UIElement_GroupBox* this, class BaseProperty const* arg2)

0046aca0  {
0046acb4      if (BaseProperty::GetPropertyName(arg2) == 0xb1)
0046acb4      {
0046acb6          uint32_t m_idSelectedButton = this->m_idSelectedButton;
0046acb6          
0046acc5          if (m_idSelectedButton != 0)
0046acc5          {
0046acca              class UIElement* eax_1 = UIElement::GetChildRecursive(this, m_idSelectedButton);
0046acca              
0046acd1              if (eax_1 != 0)
0046acd3                  eax_1->vtable->SetState(1);
0046acc5          }
0046acc5          
0046acdf          class BasePropertyValue* m_pcPropertyValue = arg2->m_pcPropertyValue;
0046acdf          
0046ace4          if (m_pcPropertyValue != 0)
0046ace6              m_pcPropertyValue->vtable->InqEnum(&this->m_idSelectedButton);
0046ace6          
0046acf4          class UIElement* eax_3 = UIElement::GetChildRecursive(this, this->m_idSelectedButton);
0046acf4          
0046acfc          if (eax_3 != 0)
0046acfe              eax_3->vtable->SetState(6);
0046acb4      }
0046acb4      
0046ad0d      UIElement::OnSetAttribute(this, arg2);
0046aca0  }

0046ad17                                                                       90 90 90 90 90 90 90 90 90                         .........

0046ad20  enum UIElementMessageListenResult __fastcall UIElement_GroupBox::ListenToElementMessage(class UIElement_GroupBox* this, struct UIElementMessageInfo const* arg2)

0046ad20  {
0046ad20      class UIElement_GroupBox* this_1 = this;
0046ad23      struct UIElementMessageInfo* edi = arg2;
0046ad23      
0046ad2d      if (edi->idMessage == 1)
0046ad2d      {
0046ad39          UIElement::GetAttribute_Enum(this, 0xb1, &this_1);
0046ad3e          uint32_t idElement = edi->idElement;
0046ad3e          
0046ad44          if (this_1 != idElement)
0046ad7f              UIElement::SetAttribute_Enum(this, 0xb1, idElement);
0046ad44          else
0046ad44          {
0046ad46              edi->pElement->vtable->SetState(6);
0046ad5f              UIElement::GetAttribute_Bool(this, 0xc1, &arg2);
0046ad5f              
0046ad6a              if (arg2 == 0)
0046ad74                  return 2;
0046ad44          }
0046ad2d      }
0046ad2d      
0046ad8f      return UIElement::ListenToElementMessage(this, edi);
0046ad20  }

0046ad92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0046ada0  void* __thiscall UIElement_GroupBox::`scalar deleting destructor'(class UIElement_GroupBox* this, uint32_t arg2)

0046ada0  {
0046ada3      this->vtable = 0x79c290;
0046ada9      UIElement::~UIElement(this);
0046ada9      
0046adb3      if ((arg2 & 1) != 0)
0046adb6          operator delete(this);
0046adb6      
0046adc1      return this;
0046ada0  }

0046adc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046add0  void UIElement_GroupBox::Register()

0046add0  {
0046add7      UIElement::RegisterElementClass(0x11, UIElement_GroupBox::Create);
0046add0  }


0046ade0  uint8_t __thiscall UIElement_GroupBox::InqAvailableProperties(class UIElement_GroupBox const* this, class AvailablePropertySet* arg2)

0046ade0  {
0046ade3      class AvailablePropertySet* edi = arg2;
0046ade8      int32_t ebx;
0046ade8      ebx = 1;
0046ade8      
0046adf1      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046adf3          ebx = 0;
0046adf3      
0046adf9      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046adfe      class AvailablePropertySet* esi = arg2;
0046adfe      
0046ae04      if (esi == 0)
0046ae04      {
0046ae08          int32_t eax_1;
0046ae08          eax_1 = 0;
0046ae0b          return 0;
0046ae04      }
0046ae04      
0046ae1a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0xb, edi) == 0)
0046ae1c          ebx = 0;
0046ae1c      
0046ae22      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046ae2a      return ebx;
0046ade0  }

0046ae2d                                         90 90 90                                                               ...

0046ae30  void __thiscall UIElement_ColorPicker::UIElement_ColorPicker(class UIElement_ColorPicker* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0046ae30  {
0046ae3f      UIElement::UIElement(this, arg2, arg3);
0046ae46      this->m_bDisplaySelection = 0;
0046ae4c      this->vtable = 0x79c3d0;
0046ae52      this->m_rgbaCurrentSelected.r = 0;
0046ae58      this->m_rgbaCurrentSelected.g = 0f;
0046ae5e      this->m_rgbaCurrentSelected.b = 0f;
0046ae64      this->m_rgbaCurrentSelected.a = 0f;
0046ae6a      this->__inner23 |= 0x2000;
0046ae74      this->m_nCurrentSelection = 0xffffffff;
0046ae30  }

0046ae84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046ae90  class UIElement* __thiscall UIElement_ColorPicker::DynamicCast(class UIElement_ColorPicker* this, uint32_t arg2) __pure

0046ae90  {
0046ae99      int32_t eax;
0046ae99      eax = arg2 != 0x10;
0046ae9f      return ((eax - 1) & this);
0046ae90  }

0046aea2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046aeb0  class UIElement* UIElement_ColorPicker::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046aeb0  {
0046aeb5      void* eax = operator new(0x608);
0046aeb5      
0046aebf      if (eax == 0)
0046aed5          return 0;
0046aed5      
0046aed2      return UIElement_ColorPicker::UIElement_ColorPicker(eax, arg1, arg2);
0046aeb0  }

0046aed6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046aee0  uint8_t __fastcall UIElement_ColorPicker::SetCurrentSelectedColor(class UIElement_ColorPicker* this, class RGBAColor const* arg2)

0046aee0  {
0046aee0      class UIElement_ColorPicker* this_1 = this;
0046aee4      class Graphic* m_image = this->m_image;
0046aee4      
0046aeed      if (m_image != 0)
0046aeed      {
0046aef3          class RenderSurface* m_image_1 = m_image->m_image;
0046aef3          
0046aef8          if (m_image_1 != 0)
0046aef8          {
0046aefe              class RGBAColor* ecx = arg2;
0046af05              this->m_rgbaCurrentSelected.r = ecx->r;
0046af05              this->m_rgbaCurrentSelected.g = ecx->g;
0046af05              this->m_rgbaCurrentSelected.b = ecx->b;
0046af05              this->m_rgbaCurrentSelected.a = ecx->a;
0046af34              this_1 = nullptr;
0046af3c              arg2 = nullptr;
0046af3c              
0046af4c              if (SurfaceWindow::SearchForColor(&m_image_1->window, &this_1, &arg2, &this->m_rgbaCurrentSelected, 0) != 0)
0046af4c              {
0046af5d                  void* eax_1 = ((m_image_1->width * arg2) + this_1);
0046af67                  this->m_nCurrentSelection = eax_1;
0046af6d                  UIElement::BroadcastElementMessage(this, 0x30, eax_1, 0);
0046af74                  UIRegion::MakeRootDirtyHere(this);
0046af7a                  int32_t eax_2;
0046af7a                  eax_2 = 1;
0046af7e                  return 1;
0046af4c              }
0046aef8          }
0046aeed      }
0046aeed      
0046af82      m_image = 0;
0046af86      return 0;
0046aee0  }

0046af89                             90 90 90 90 90 90 90                                                           .......

0046af90  uint8_t __thiscall UIElement_ColorPicker::IndexToRGBA(class UIElement_ColorPicker* this, uint32_t const* arg2, class RGBAColor* arg3)

0046af90  {
0046af90      class Graphic* m_image = this->m_image;
0046af90      
0046af99      if (m_image != 0)
0046af99      {
0046af9b          class RenderSurface* m_image_1 = m_image->m_image;
0046af9b          
0046afa0          if (m_image_1 != 0)
0046afa0          {
0046afa2              uint32_t width = m_image_1->width;
0046afa2              
0046afaa              if (width != 0)
0046afaa              {
0046afb9                  m_image = *(uint32_t*)arg2;
0046afb9                  
0046afbd                  if (m_image < (m_image_1->height * width))
0046afbd                  {
0046afbf                      int32_t edx_3 = 0;
0046afdb                      return SurfaceWindow::GetColorFromPoint(&m_image_1->window, arg3, (COMBINE(edx_3, m_image) % width), (COMBINE(edx_3, m_image) / width)) != 0;
0046afbd                  }
0046afaa              }
0046afa0          }
0046af99      }
0046af99      
0046afde      m_image = 0;
0046afe1      return 0;
0046af90  }

0046afe4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046aff0  void __thiscall UIElement_ColorPicker::HandleMouseClick(class UIElement_ColorPicker* this, struct tagPOINT const* arg2)

0046aff0  {
0046b000      void var_10;
0046b000      int32_t* eax_1 = this->vtable->GetSurfaceBox(&var_10);
0046b019      this->m_nCurrentSelection = ((((eax_1[2] - *(uint32_t*)eax_1) + 1) * arg2->y) + arg2->x);
0046b02e      int32_t var_20;
0046b02e      
0046b02e      if (UIElement_ColorPicker::IndexToRGBA(this, &this->m_nCurrentSelection, &var_20) != 0)
0046b02e      {
0046b038          this->m_rgbaCurrentSelected.r = var_20;
0046b044          float var_1c;
0046b038          this->m_rgbaCurrentSelected.g = var_1c;
0046b04b          float var_18;
0046b038          this->m_rgbaCurrentSelected.b = var_18;
0046b04e          float var_14;
0046b038          this->m_rgbaCurrentSelected.a = var_14;
0046b02e      }
0046b02e      
0046b05a      UIElement::BroadcastElementMessage(this, 0x30, this->m_nCurrentSelection, 0);
0046b061      UIRegion::MakeRootDirtyHere(this);
0046aff0  }

0046b06e                                            90 90                                                                ..

0046b070  void __thiscall UIElement_ColorPicker::DrawSelf(class UIElement_ColorPicker* this, class Box2D const* arg2, class Box2D const* arg3, class SmartArray<Box2D,1> const* arg4, class UISurface* arg5)

0046b070  {
0046b08e      UIRegion::DrawSelf(this, arg2, arg3, arg4, arg5);
0046b08e      
0046b09a      if (this->m_nCurrentSelection != 0xffffffff)
0046b09a      {
0046b0a3          UISurface::PrepareSurface(arg5);
0046b0ba          int32_t var_10;
0046b0ba          int32_t* eax = this->vtable->GetSurfaceBox(&var_10);
0046b0c2          uint32_t m_nCurrentSelection = this->m_nCurrentSelection;
0046b0ca          int32_t ecx_6 = ((eax[2] - *(uint32_t*)eax) + 1);
0046b0cb          int32_t edx_3 = 0;
0046b0cd          uint32_t temp0_1 = (COMBINE(edx_3, m_nCurrentSelection) / ecx_6);
0046b0cd          uint32_t temp1_1 = (COMBINE(edx_3, m_nCurrentSelection) % ecx_6);
0046b0cf          int32_t m_x0 = arg2->m_x0;
0046b0d1          int32_t m_y0 = arg2->m_y0;
0046b0d4          arg5 = m_x0;
0046b0d4          
0046b0e2          if (((m_x0 + temp1_1) - 2) >= m_x0)
0046b0e4              arg5 = ((m_x0 + temp1_1) - 2);
0046b0e4          
0046b0ee          int32_t m_y0_1 = m_y0;
0046b0ee          
0046b0f0          if (((temp0_1 + m_y0) - 2) >= m_y0)
0046b0f2              m_y0_1 = ((temp0_1 + m_y0) - 2);
0046b0f2          
0046b0f4          int32_t m_x1 = arg2->m_x1;
0046b0f7          int32_t m_x1_1 = ((m_x0 + temp1_1) + 2);
0046b0f7          
0046b0fd          if (m_x1_1 > m_x1)
0046b0ff              m_x1_1 = m_x1;
0046b0ff          
0046b105          int32_t m_y1 = arg2->m_y1;
0046b108          int32_t m_y1_1 = ((temp0_1 + m_y0) + 2);
0046b108          
0046b10f          if (m_y1_1 > m_y1)
0046b111              m_y1_1 = m_y1;
0046b111          
0046b122          var_10 = 0x3f800000;
0046b12a          int32_t var_c_1 = 0x3f800000;
0046b132          int32_t var_8_1 = 0x3f800000;
0046b13a          int32_t var_4_1 = 0x3f800000;
0046b142          SurfaceWindow::DrawBox(&arg5->m_pLocalSurface->window, &var_10, arg5, m_y0_1, m_x1_1, m_y1_1);
0046b09a      }
0046b070  }


0046b150  void UIElement_ColorPicker::Register()

0046b150  {
0046b157      UIElement::RegisterElementClass(0x10, UIElement_ColorPicker::Create);
0046b150  }


0046b160  void* __thiscall UIElement_ColorPicker::`scalar deleting destructor'(class UIElement_ColorPicker* this, uint32_t arg2)

0046b160  {
0046b163      this->vtable = 0x79c3d0;
0046b169      UIElement::~UIElement(this);
0046b169      
0046b173      if ((arg2 & 1) != 0)
0046b176          operator delete(this);
0046b176      
0046b181      return this;
0046b160  }

0046b184              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046b190  void __thiscall UIElement_ColorPicker::OnSetAttribute(class UIElement_ColorPicker* this, class BaseProperty const* arg2)

0046b190  {
0046b194      class BaseProperty* esi = arg2;
0046b19c      class RGBAColor* edx = UIElement::OnSetAttribute(this, esi);
0046b1a3      uint32_t eax = BaseProperty::GetPropertyName(esi);
0046b1a3      
0046b1ad      if (eax == 0xae)
0046b1ad      {
0046b1fa          class BasePropertyValue* m_pcPropertyValue_1 = esi->m_pcPropertyValue;
0046b1ff          arg2 = 0;
0046b1ff          
0046b204          if (m_pcPropertyValue_1 != 0)
0046b206              m_pcPropertyValue_1->vtable->InqBool(&arg2);
0046b206          
0046b210          m_pcPropertyValue_1 = arg2;
0046b214          this->m_bDisplaySelection = m_pcPropertyValue_1;
0046b1ad      }
0046b1ad      else if (eax == 0xaf)
0046b1b0      {
0046b1b2          class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
0046b1b7          int32_t var_10 = 0;
0046b1bf          int32_t var_c = 0;
0046b1c7          int32_t var_8 = 0;
0046b1cf          int32_t var_4 = 0x3f800000;
0046b1cf          
0046b1d7          if (m_pcPropertyValue != 0)
0046b1e0              edx = m_pcPropertyValue->vtable->InqColor(&var_10);
0046b1e0          
0046b1ea          int32_t* var_1c_2 = &var_10;
0046b1ed          UIElement_ColorPicker::SetCurrentSelectedColor(this, edx);
0046b1b0      }
0046b190  }

0046b222        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046b230  enum UIElementMessageListenResult __thiscall UIElement_ColorPicker::ListenToElementMessage(class UIElement_ColorPicker* this, struct UIElementMessageInfo const* arg2)

0046b230  {
0046b23d      if ((arg2->pElement != this || arg2->idMessage != 0x19))
0046b254          /* tailcall */
0046b254          return UIElement::ListenToElementMessage(this, arg2);
0046b254      
0046b243      UIElement_ColorPicker::HandleMouseClick(this, &arg2->ptElement);
0046b24d      return 2;
0046b230  }

0046b259                                                                             90 90 90 90 90 90 90                           .......

0046b260  uint8_t __thiscall UIElement_ColorPicker::InqAvailableProperties(class UIElement_ColorPicker const* this, class AvailablePropertySet* arg2)

0046b260  {
0046b263      class AvailablePropertySet* edi = arg2;
0046b268      int32_t ebx;
0046b268      ebx = 1;
0046b268      
0046b271      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046b273          ebx = 0;
0046b273      
0046b279      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046b27e      class AvailablePropertySet* esi = arg2;
0046b27e      
0046b284      if (esi == 0)
0046b284      {
0046b288          int32_t eax_1;
0046b288          eax_1 = 0;
0046b28b          return 0;
0046b284      }
0046b284      
0046b29a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 3, edi) == 0)
0046b29c          ebx = 0;
0046b29c      
0046b2a2      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046b2aa      return ebx;
0046b260  }

0046b2ad                                         90 90 90                                                               ...

0046b2b0  HRESULT RedirectWindowDC_Thunk(struct HWND__* arg1, uint8_t arg2, struct IAlternateDCProvider* arg3)

0046b2b0  {
0046b2b0      HRESULT (* pfnRedirectWindowDC_1)(struct HWND__*, uint8_t, struct IAlternateDCProvider*) = pfnRedirectWindowDC;
0046b2b0      
0046b2b7      if (pfnRedirectWindowDC_1 == 0)
0046b2b7      {
0046b2b9          int32_t eax = data_83d468;
0046b2b9          
0046b2c0          if (eax == 0)
0046b2c0          {
0046b2c7              eax = LoadLibraryA("Trowser.dll");
0046b2cd              data_83d468 = eax;
0046b2c0          }
0046b2c0          
0046b2d8          pfnRedirectWindowDC_1 = kernel32_GetProcAddress_Ptr(eax, "RedirectWindowDC");
0046b2e0          pfnRedirectWindowDC = pfnRedirectWindowDC_1;
0046b2e0          
0046b2e5          if (pfnRedirectWindowDC_1 == 0)
0046b2fe              return 0x8000ffff;
0046b2b7      }
0046b2b7      
0046b2f8      return pfnRedirectWindowDC_1(arg1, arg2, arg3);
0046b2b0  }

0046b2ff                                                                                               90                                 .

0046b300  void __thiscall UIElement_Browser::UIElement_Browser(class UIElement_Browser* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0046b300  {
0046b310      UIElement::UIElement(this, arg2, arg3);
0046b31b      int32_t eax = data_83d46c;
0046b324      uint8_t edx_1 = (!(((int8_t)(this->__bitfield164 >> 1))) & 1);
0046b32f      this->vtable = 0x79c570;
0046b335      this->vtable = &UIElement_Browser::`vftable';
0046b33f      this->vtable = &UIElement_Browser::`vftable';
0046b329      this->m_pWebBrowser = nullptr;
0046b34f      this->m_fLastTrueVisibility = edx_1;
0046b355      this->m_fAllowFullscreenBrowser = 0;
0046b355      
0046b35c      if (eax != 0)
0046b35c      {
0046b38d          eax(&this->m_pWebBrowser);
0046b38d          return;
0046b35c      }
0046b35c      
0046b35e      int32_t eax_1 = data_83d468;
0046b35e      
0046b365      if (eax_1 == 0)
0046b365      {
0046b36c          eax_1 = LoadLibraryA("Trowser.dll");
0046b372          data_83d468 = eax_1;
0046b365      }
0046b365      
0046b37d      eax = kernel32_GetProcAddress_Ptr(eax_1, "CreateBrowserControl");
0046b385      data_83d46c = eax;
0046b385      
0046b38a      if (eax != 0)
0046b38d          eax(&this->m_pWebBrowser);
0046b300  }

0046b396                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046b3a0  class UIElement* __thiscall UIElement_Browser::DynamicCast(class UIElement_Browser* this, uint32_t arg2) __pure

0046b3a0  {
0046b3a9      int32_t eax;
0046b3a9      eax = arg2 != 0xe;
0046b3af      return ((eax - 1) & this);
0046b3a0  }

0046b3b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0046b3c0  class UIElement* UIElement_Browser::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046b3c0  {
0046b3c5      void* eax = operator new(0x600);
0046b3c5      
0046b3cf      if (eax == 0)
0046b3e5          return 0;
0046b3e5      
0046b3e2      return UIElement_Browser::UIElement_Browser(eax, arg1, arg2);
0046b3c0  }

0046b3e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046b3f0  void __thiscall UIElement_Browser::SetVisible(class UIElement_Browser* this, uint8_t arg2)

0046b3f0  {
0046b3f9      UIElement::SetVisible(this, arg2);
0046b405      int32_t ebx;
0046b405      ebx = UIElement::IsVisible(this);
0046b405      
0046b411      if (this->m_fLastTrueVisibility != ebx)
0046b411      {
0046b415          if (ebx == 0)
0046b415          {
0046b435              uint32_t UIElement_Browser::sm_cVisibleWindows_1 = UIElement_Browser::sm_cVisibleWindows;
0046b435              UIElement_Browser::sm_cVisibleWindows -= 1;
0046b435              
0046b43b              if (UIElement_Browser::sm_cVisibleWindows_1 == 1)
0046b43f                  Device::AllowFullScreenMode(1);
0046b415          }
0046b415          else
0046b415          {
0046b41c              uint32_t eax_2 = (UIElement_Browser::sm_cVisibleWindows + 1);
0046b420              UIElement_Browser::sm_cVisibleWindows = eax_2;
0046b420              
0046b425              if (eax_2 == 1)
0046b425              {
0046b427                  eax_2 = this->m_fAllowFullscreenBrowser;
0046b427                  
0046b42f                  if (eax_2 == 0)
0046b43f                      Device::AllowFullScreenMode(0);
0046b425              }
0046b415          }
0046b415          
0046b447          this->m_fLastTrueVisibility = ebx;
0046b411      }
0046b411      
0046b44d      struct IBrowserControl* m_pWebBrowser = this->m_pWebBrowser;
0046b44d      
0046b457      if (m_pWebBrowser == 0)
0046b466          return;
0046b466      
0046b45f      arg2 = ebx;
0046b463      /* jump -> m_pWebBrowser->vtable->Show */
0046b3f0  }

0046b469                             90 90 90 90 90 90 90                                                           .......

0046b470  void __fastcall UIElement_Browser::UpdateForScreenPositionChange(class UIElement_Browser* this)

0046b470  {
0046b473      UIElement::UpdateForScreenPositionChange(this);
0046b473      
0046b480      if (this->m_pWebBrowser != 0)
0046b493          this->m_pWebBrowser->vtable->Move(UIRegion::GetScreenX0(this), UIRegion::GetScreenY0(this));
0046b470  }

0046b4a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0046b4b0  void __fastcall UIElement_Browser::PostBlit(class UIElement_Browser* this, class Box2D const* arg2, class UISurface* arg3)

0046b4b0  {
0046b4b8      if (this->m_fAllowFullscreenBrowser != 0)
0046b4b8      {
0046b4bf          class RenderDevice* eax_1;
0046b4bf          eax_1 = RenderDevice::render_device->m_presentation.FullScreen;
0046b4bf          
0046b4c8          if (eax_1 != this->m_fFullScreen)
0046b4ca              this->m_fFullScreen = eax_1;
0046b4b8      }
0046b4b0  }

0046b4d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0046b4e0  uint8_t __fastcall UIElement_Browser::CreateWindowHelper(class UIElement_Browser* this)

0046b4e0  {
0046b4e9      int32_t eax = UIRegion::GetScreenX0(this);
0046b4f2      int32_t eax_1 = UIRegion::GetScreenY0(this);
0046b4fb      int32_t eax_2 = UIRegion::GetWidth(this);
0046b504      int32_t eax_3 = UIRegion::GetHeight(this);
0046b509      struct IBrowserControl* m_pWebBrowser = this->m_pWebBrowser;
0046b509      
0046b515      if ((m_pWebBrowser != 0 && m_pWebBrowser->vtable->Create(Device::m_hWnd, eax, eax_1, eax_2, eax_3, &this->vtable) != 0))
0046b515      {
0046b54a          RedirectWindowDC_Thunk(this->m_pWebBrowser->vtable->GetHWND(1, &this->vtable));
0046b555          struct IBrowserControl::VTable* vtable = this->m_pWebBrowser->vtable;
0046b55c          int32_t eax_9 = UIElement::IsVisible(this);
0046b561          this->m_pWebBrowser;
0046b568          vtable->Show(eax_9);
0046b56e          int32_t eax_10;
0046b56e          eax_10 = 1;
0046b574          return 1;
0046b515      }
0046b515      
0046b578      eax_3 = 0;
0046b57e      return 0;
0046b4e0  }

0046b57f                                                                                               90                                 .

0046b580  uint8_t __thiscall UIElement_Browser::ReleaseDC(class UIElement_Browser* this, struct HDC__* arg2, int32_t* arg3)

0046b580  {
0046b58c      if ((this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] == 0 || *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0])[2] == 0))
0046b5aa          return 0;
0046b5aa      
0046b594      UIRegion::MakeRootDirtyHere(((char*)this - 0x5f0));
0046b59d      *(uint32_t*)arg3 = 1;
0046b5a3      int32_t* eax_1;
0046b5a3      eax_1 = 1;
0046b5a5      return 1;
0046b580  }

0046b5ad                                         90 90 90                                                               ...

0046b5b0  void* __thiscall UIElement_Browser::`scalar deleting destructor'(class UIElement_Browser* this, uint32_t arg2)

0046b5b0  {
0046b5b3      struct IBrowserControl* m_pWebBrowser = this->m_pWebBrowser;
0046b5bb      this->vtable = 0x79c570;
0046b5c1      this->vtable = &UIElement_Browser::`vftable';
0046b5cb      this->vtable = &UIElement_Browser::`vftable';
0046b5cb      
0046b5d5      if (m_pWebBrowser != 0)
0046b5d5      {
0046b5d7          m_pWebBrowser->vtable->Release(m_pWebBrowser);
0046b5dd          this->m_pWebBrowser = nullptr;
0046b5d5      }
0046b5d5      
0046b5e9      UIElement::~UIElement(this);
0046b5e9      
0046b5f3      if ((arg2 & 1) != 0)
0046b5f6          operator delete(this);
0046b5f6      
0046b601      return this;
0046b5b0  }

0046b604              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046b610  void UIElement_Browser::Register()

0046b610  {
0046b617      UIElement::RegisterElementClass(0xe, UIElement_Browser::Create);
0046b610  }


0046b620  void __fastcall UIElement_Browser::Initialize(class UIElement_Browser* this)

0046b620  {
0046b623      UIRegion::GetHeight(this);
0046b62a      UIRegion::GetWidth(this);
0046b631      UIElement_Browser::CreateWindowHelper(this);
0046b639      /* tailcall */
0046b639      return UIElement::Initialize(this);
0046b620  }

0046b63e                                                                                            90 90                                ..

0046b640  void __thiscall UIElement_Browser::ResizeTo(class UIElement_Browser* this, int32_t const arg2, int32_t const arg3)

0046b640  {
0046b64f      UIElement::ResizeTo(this, arg2, arg3);
0046b656      UIRegion::GetHeight(this);
0046b65d      UIRegion::GetWidth(this);
0046b662      struct IBrowserControl* m_pWebBrowser = this->m_pWebBrowser;
0046b662      
0046b66a      if (m_pWebBrowser != 0)
0046b66a      {
0046b66d          struct IBrowserControl::VTable* vtable = m_pWebBrowser->vtable;
0046b671          int32_t eax = UIRegion::GetHeight(this);
0046b679          int32_t eax_1 = UIRegion::GetWidth(this);
0046b67e          this->m_pWebBrowser;
0046b685          vtable->Resize(eax_1, eax);
0046b66a      }
0046b640  }

0046b68d                                         90 90 90                                                               ...

0046b690  uint8_t __thiscall UIElement_Browser::InqAvailableProperties(class UIElement_Browser const* this, class AvailablePropertySet* arg2)

0046b690  {
0046b693      class AvailablePropertySet* edi = arg2;
0046b698      int32_t ebx;
0046b698      ebx = 1;
0046b698      
0046b6a1      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046b6a3          ebx = 0;
0046b6a3      
0046b6a9      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046b6ae      class AvailablePropertySet* esi = arg2;
0046b6ae      
0046b6b4      if (esi == 0)
0046b6b4      {
0046b6b8          int32_t eax_1;
0046b6b8          eax_1 = 0;
0046b6bb          return 0;
0046b6b4      }
0046b6b4      
0046b6ca      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 2, edi) == 0)
0046b6cc          ebx = 0;
0046b6cc      
0046b6d2      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046b6da      return ebx;
0046b690  }

0046b6dd                                                                                         90 90 90                               ...

0046b6e0  void __thiscall UIElement_Browser::OnSetAttribute(class UIElement_Browser* this, class BaseProperty const* arg2)

0046b6e0  {
0046b6e1      class BaseProperty* esi = arg2;
0046b6e9      UIElement::OnSetAttribute(this, esi);
0046b6e9      
0046b704      if ((BaseProperty::GetPropertyName(esi) == 0xad && this->m_pWebBrowser != 0))
0046b704      {
0046b706          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0046b70b          arg2 = PStringBase<char>::s_NullBuffer_1;
0046b713          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0046b719          class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
0046b719          
0046b71e          if ((m_pcPropertyValue != 0 && m_pcPropertyValue->vtable->InqString(&arg2) != 0))
0046b731              this->m_pWebBrowser->vtable->Navigate(arg2, 0, 0, 0, 0, 0);
0046b731          
0046b74f          void* __offset(BaseProperty, -0x14) esi_2 = ((char*)arg2 - 0x14);
0046b74f          
0046b762          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0046b76a              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0046b704      }
0046b6e0  }

0046b771                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0046b780  class UIElement* __thiscall UIElement_Resizebar::DynamicCast(class UIElement_Resizebar* this, uint32_t arg2) __pure

0046b780  {
0046b789      int32_t eax;
0046b789      eax = arg2 != 9;
0046b78f      return ((eax - 1) & this);
0046b780  }

0046b792                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0046b7a0  class UIElement* UIElement_Resizebar::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046b7a0  {
0046b7a6      void* result = operator new(0x5f4);
0046b7a6      
0046b7b2      if (result == 0)
0046b7d9          return 0;
0046b7d9      
0046b7c0      UIElement::UIElement(result, arg1, arg2);
0046b7c5      *(uint32_t*)result = 0x79c6a8;
0046b7cb      *(uint8_t*)((char*)result + 0x5f0) = 0;
0046b7d5      return result;
0046b7a0  }

0046b7da                                                                                90 90 90 90 90 90                            ......

0046b7e0  void __thiscall UIElement_Resizebar::StartMouseResizing(class UIElement_Resizebar* this, struct tagPOINT const* arg2)

0046b7e0  {
0046b7e0      class UIElement_Resizebar* this_1 = this;
0046b7e7      class UIElement* eax_1 = this->vtable->GetParent();
0046b7f8      UIElement::GetAttribute_Bool(this, 0x2c, &*(uint32_t*)((char*)this_1)[2]);
0046b806      UIElement::GetAttribute_Bool(this, 0x2b, &*(uint32_t*)((char*)this_1)[3]);
0046b814      UIElement::GetAttribute_Bool(this, 0x2d, &this_1);
0046b822      UIElement::GetAttribute_Bool(this, 0x2a, &*(uint32_t*)((char*)this_1)[1]);
0046b827      int32_t eax_2;
0046b827      eax_2 = *(uint8_t*)((char*)this_1)[2];
0046b82d      enum BorderLocation eax_3;
0046b82d      
0046b82d      if (eax_2 != 0)
0046b82d      {
0046b82f          eax_2 = this_1;
0046b82f          
0046b835          if (eax_2 == 0)
0046b835          {
0046b846              int32_t eax_4;
0046b846              eax_4 = *(uint8_t*)((char*)this_1)[1] != 0;
0046b849              eax_3 = (eax_4 + 4);
0046b835          }
0046b835          else
0046b837              eax_3 = BORDER_UR;
0046b837          
0046b835          goto label_46b88e;
0046b82d      }
0046b82d      
0046b84e      eax_2 = *(uint8_t*)((char*)this_1)[3];
0046b852      bool cond:0_1 = eax_2 == 0;
0046b854      eax_2 = this_1;
0046b854      
0046b858      if (!(cond:0_1))
0046b858      {
0046b85c          if (eax_2 == 0)
0046b85c          {
0046b865              eax_2 = *(uint8_t*)((char*)this_1)[1];
0046b869              char temp1_1 = eax_2;
0046b869              eax_2 = -(eax_2);
0046b86d              eax_3 = ((eax_2 - eax_2) + 8);
0046b85c          }
0046b85c          else
0046b85e              eax_3 = BORDER_UL;
0046b85e          
0046b85c          goto label_46b88e;
0046b858      }
0046b858      
0046b874      if (eax_2 == 0)
0046b874      {
0046b87d          eax_2 = *(uint8_t*)((char*)this_1)[1];
0046b87d          
0046b883          if (eax_2 != 0)
0046b883          {
0046b885              eax_3 = BORDER_BOTTOM;
0046b885              goto label_46b88e;
0046b883          }
0046b874      }
0046b874      else
0046b874      {
0046b876          eax_3 = BORDER_TOP;
0046b88e      label_46b88e:
0046b88e          this->m_mousePressed = 1;
0046b89f          UIElement::StartResizing(eax_1, eax_3, arg2->x, arg2->y);
0046b8a4          this->vtable->SetState(3);
0046b874      }
0046b7e0  }

0046b8b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046b8c0  void __fastcall UIElement_Resizebar::StopMouseResizing(class UIElement_Resizebar* this)

0046b8c0  {
0046b8c3      this->vtable->SetState(1);
0046b8cd      struct UIElement_Resizebar::VTable* vtable = this->vtable;
0046b8d1      this->m_mousePressed = 0;
0046b8d8      class UIElement* eax_1 = vtable->GetParent();
0046b8d8      
0046b8e1      if (eax_1 == 0)
0046b8ea          return;
0046b8ea      
0046b8e5      /* tailcall */
0046b8e5      return UIElement::StopResizing(eax_1);
0046b8c0  }

0046b8eb                                   90 90 90 90 90                                                             .....

0046b8f0  void* __thiscall UIElement_Resizebar::`scalar deleting destructor'(class UIElement_Resizebar* this, uint32_t arg2)

0046b8f0  {
0046b8f3      this->vtable = 0x79c6a8;
0046b8f9      UIElement::~UIElement(this);
0046b8f9      
0046b903      if ((arg2 & 1) != 0)
0046b906          operator delete(this);
0046b906      
0046b911      return this;
0046b8f0  }

0046b914                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0046b920  void UIElement_Resizebar::Register()

0046b920  {
0046b927      UIElement::RegisterElementClass(9, UIElement_Resizebar::Create);
0046b920  }


0046b930  enum UIElementMessageListenResult __thiscall UIElement_Resizebar::ListenToElementMessage(class UIElement_Resizebar* this, struct UIElementMessageInfo const* arg2)

0046b930  {
0046b936      int32_t* eax_1 = this->vtable->GetParent();
0046b936      
0046b94e      if ((eax_1 != 0 && arg2->pElement == this))
0046b94e      {
0046b954          uint32_t idMessage = arg2->idMessage;
0046b954          
0046b95a          if (idMessage == 0x1c)
0046b95a          {
0046b9d7              if (arg2->dwParam1 == 7)
0046b9d7              {
0046b9d9                  int32_t eax_9 = eax_1[0x155];
0046b9d9                  
0046b9ee                  if (((((int8_t)(eax_9 >> 0x13)) & 1) == 0 && (((int8_t)(eax_9 >> 0x12)) & 1) == 0))
0046b9ee                  {
0046b9f7                      UIElement_Resizebar::StartMouseResizing(this, &arg2->ptWindow);
0046ba0c                      *(uint32_t*)(*(uint32_t*)eax_1 + 0x60)(arg2->ptWindow.x, arg2->ptWindow.y, arg2->dwParam1);
0046b9ee                  }
0046b9d7              }
0046b95a          }
0046b95a          else if (idMessage == 0x1d)
0046b95d          {
0046b9a4              if (arg2->dwParam1 == 7)
0046b9a4              {
0046b9a6                  int32_t eax_3;
0046b9a6                  eax_3 = this->m_mousePressed;
0046b9a6                  
0046b9ae                  if (eax_3 != 0)
0046b9ae                  {
0046b9be                      *(uint32_t*)(*(uint32_t*)eax_1 + 0x64)(arg2->ptWindow.x, arg2->ptWindow.y, 7);
0046b9c3                      UIElement_Resizebar::StopMouseResizing(this);
0046b9ae                  }
0046b9a4              }
0046b95d          }
0046b95d          else if ((idMessage == 0x1e && ((((int8_t)(eax_1[0x155] >> 0x13)) & 1) != 0 && this->m_mousePressed != 0)))
0046b992              *(uint32_t*)(*(uint32_t*)eax_1 + 0x4c)(arg2->ptWindow.x, arg2->ptWindow.y);
0046b94e      }
0046b94e      
0046ba18      return 2;
0046b930  }

0046ba1b                                                                                   90 90 90 90 90                             .....

0046ba20  uint8_t __thiscall UIElement_Resizebar::InqAvailableProperties(class UIElement_Resizebar const* this, class AvailablePropertySet* arg2)

0046ba20  {
0046ba23      class AvailablePropertySet* edi = arg2;
0046ba28      int32_t ebx;
0046ba28      ebx = 1;
0046ba28      
0046ba31      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046ba33          ebx = 0;
0046ba33      
0046ba39      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046ba3e      class AvailablePropertySet* esi = arg2;
0046ba3e      
0046ba44      if (esi == 0)
0046ba44      {
0046ba48          int32_t eax_1;
0046ba48          eax_1 = 0;
0046ba4b          return 0;
0046ba44      }
0046ba44      
0046ba5a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0x10, edi) == 0)
0046ba5c          ebx = 0;
0046ba5c      
0046ba62      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046ba6a      return ebx;
0046ba20  }

0046ba6d                                         90 90 90                                                               ...

0046ba70  class UIElement* __thiscall UIElement_Viewport::DynamicCast(class UIElement_Viewport* this, uint32_t arg2) __pure

0046ba70  {
0046ba79      int32_t eax;
0046ba79      eax = arg2 != 0xd;
0046ba7f      return ((eax - 1) & this);
0046ba70  }

0046ba82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046ba90  class UIElement* UIElement_Viewport::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046ba90  {
0046ba96      void* result = operator new(0x660);
0046ba96      
0046baa2      if (result == 0)
0046bacd          return 0;
0046bacd      
0046bab0      UIElement::UIElement(result, arg1, arg2);
0046babb      CreatureMode::CreatureMode(((char*)result + 0x5f0));
0046bac0      *(uint32_t*)result = 0x79c870;
0046bac9      return result;
0046ba90  }

0046bace                                            90 90                                                                ..

0046bad0  void __thiscall UIElement_Viewport::OnSetAttribute(class UIElement_Viewport* this, class BaseProperty const* arg2)

0046bad0  {
0046bad6      UIElement::OnSetAttribute(this, arg2);
0046badd      BaseProperty::GetPropertyName(arg2);
0046bad0  }

0046bae6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046baf0  uint8_t __stdcall UIElement_Viewport::MakeUIObject(class UIElement_Viewport* this @ ecx, class UIObject** arg2)

0046baf0  {
0046baf8      if (*(uint32_t*)arg2 != 0)
0046baf8      {
0046bb2f          int32_t eax;
0046bb2f          eax = 0;
0046bb32          return 0;
0046baf8      }
0046baf8      
0046bafc      void* eax_1 = operator new(0x58);
0046bafc      
0046bb06      if (eax_1 == 0)
0046bb06      {
0046bb24          *(uint32_t*)arg2 = nullptr;
0046bb29          int32_t eax_3;
0046bb29          eax_3 = 0;
0046bb2c          return 0;
0046bb06      }
0046bb06      
0046bb0a      class UIObject* eax_2 = UIViewportObject::UIViewportObject(eax_1);
0046bb13      *(uint32_t*)arg2 = eax_2;
0046bb18      eax_2 = eax_2 != 0;
0046bb1b      return eax_2;
0046baf0  }

0046bb35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0046bb40  void __fastcall UIElement_Viewport::PostInit(class UIElement_Viewport* this)

0046bb40  {
0046bb43      UIElement::PostInit(this);
0046bb4f      /* tailcall */
0046bb4f      return CreatureMode::InitializeScene(&this->creature_mode_objects);
0046bb40  }

0046bb54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0046bb60  void __thiscall UIElement_Viewport::SetCamera(class UIElement_Viewport* this, class Vector3 const* arg2, class Vector3 const* arg3)

0046bb60  {
0046bb6e      CreatureMode::SetCameraPosition(&this->creature_mode_objects.m_data, arg2);
0046bb7a      CreatureMode::SetCameraDirection(&this->creature_mode_objects, arg3);
0046bb60  }

0046bb83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0046bb90  void __thiscall UIElement_Viewport::SetLight(class UIElement_Viewport* this, enum LIGHTINFO::LightType arg2, float arg3, class Vector3 const* arg4)

0046bb90  {
0046bb99      CreatureMode::RemoveAllLights(&this->creature_mode_objects);
0046bbaa      CreatureMode::AddLight(&this->creature_mode_objects.m_data, arg2, arg3);
0046bbb8      CreatureMode::SetLightDirection(&this->creature_mode_objects, 0, arg4);
0046bb90  }

0046bbc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0046bbd0  void* __thiscall UIElement_Viewport::`scalar deleting destructor'(class UIElement_Viewport* this, uint32_t arg2)

0046bbd0  {
0046bbd9      this->vtable = 0x79c870;
0046bbdf      CreatureMode::~CreatureMode(&this->creature_mode_objects);
0046bbe6      UIElement::~UIElement(this);
0046bbe6      
0046bbf0      if ((arg2 & 1) != 0)
0046bbf3          operator delete(this);
0046bbf3      
0046bbfe      return this;
0046bbd0  }

0046bc01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0046bc10  void UIElement_Viewport::Register()

0046bc10  {
0046bc17      UIElement::RegisterElementClass(0xd, UIElement_Viewport::Create);
0046bc10  }


0046bc20  uint8_t __thiscall UIElement_Viewport::InqAvailableProperties(class UIElement_Viewport const* this, class AvailablePropertySet* arg2)

0046bc20  {
0046bc23      class AvailablePropertySet* edi = arg2;
0046bc28      int32_t ebx;
0046bc28      ebx = 1;
0046bc28      
0046bc31      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046bc33          ebx = 0;
0046bc33      
0046bc39      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046bc3e      class AvailablePropertySet* esi = arg2;
0046bc3e      
0046bc44      if (esi == 0)
0046bc44      {
0046bc48          int32_t eax_1;
0046bc48          eax_1 = 0;
0046bc4b          return 0;
0046bc44      }
0046bc44      
0046bc5a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0x14, edi) == 0)
0046bc5c          ebx = 0;
0046bc5c      
0046bc62      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046bc6a      return ebx;
0046bc20  }

0046bc6d                                         90 90 90                                                               ...

0046bc70  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>* this, uint32_t arg2)

0046bc70  {
0046bc73      class HashTableData<unsigned long,unsigned long>** m_buckets = this->m_buckets;
0046bc7b      this->vtable = 0x79c9a8;
0046bc7b      
0046bc81      if (m_buckets != &this->m_aInplaceBuckets)
0046bc84          operator delete[](m_buckets);
0046bc84      
0046bc8e      this->m_buckets = nullptr;
0046bc91      this->m_firstInterestingBucket = nullptr;
0046bc94      this->m_numBuckets = 0;
0046bc97      this->m_numElements = 0;
0046bc97      
0046bc9f      if ((arg2 & 1) != 0)
0046bca2          operator delete(this);
0046bca2      
0046bcad      return this;
0046bc70  }


0046bcb0  uint8_t __thiscall UIElement_Panel::InqAvailableProperties(class UIElement_Panel const* this, class AvailablePropertySet* arg2)

0046bcb0  {
0046bcb3      class AvailablePropertySet* edi = arg2;
0046bcb8      int32_t ebx;
0046bcb8      ebx = 1;
0046bcb8      
0046bcc1      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046bcc3          ebx = 0;
0046bcc3      
0046bcc9      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046bcce      class AvailablePropertySet* esi = arg2;
0046bcce      
0046bcd4      if (esi == 0)
0046bcd4      {
0046bcd8          int32_t eax_1;
0046bcd8          eax_1 = 0;
0046bcdb          return 0;
0046bcd4      }
0046bcd4      
0046bcea      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0xf, edi) == 0)
0046bcec          ebx = 0;
0046bcec      
0046bcf2      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046bcfa      return ebx;
0046bcb0  }

0046bcfd                                                                                         90 90 90                               ...

0046bd00  void __thiscall UIElement_Panel::Update(class UIElement_Panel* this, uint32_t arg2, uint32_t arg3)

0046bd00  {
0046bd20      if ((arg2 != this->m_OpenPageToken && arg3 != this->m_OpenTabToken))
0046bd20      {
0046bd26          this->m_OpenTabToken = arg3;
0046bd31          this->m_OpenPageToken = arg2;
0046bd3e          void __return;
0046bd3e          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_TabPageHash.m_intrusiveTable, &__return);
0046bd43          class HashTableData<unsigned long,DBOCache *>* i_1 = eax_2->m_currElement;
0046bd48          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
0046bd51          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
0046bd51          
0046bd55          if (i_1 != 0)
0046bd55          {
0046bd60              while (true)
0046bd60              {
0046bd60                  uint32_t m_hashKey = i_1->m_hashKey;
0046bd68                  class DBOCache* m_data = i_1->m_data;
0046bd6b                  arg2 = 0;
0046bd70                  arg3 = 0xb;
0046bd70                  
0046bd80                  if ((this->m_OpenTabToken == m_hashKey && this->m_OpenPageToken == m_data))
0046bd80                  {
0046bd82                      arg2 = 1;
0046bd87                      arg3 = 0xc;
0046bd80                  }
0046bd80                  
0046bd92                  class UIElement* eax_3 = UIElement::GetChildRecursive(this, m_data);
0046bd9c                  class UIElement* eax_4 = UIElement::GetChildRecursive(this, m_hashKey);
0046bd9c                  
0046bda5                  if (eax_3 != 0)
0046bdab                      eax_3->vtable->SetVisible(arg2);
0046bdab                  
0046bdb5                  if (eax_4 != 0)
0046bdbb                      eax_4->vtable->SetState(arg3);
0046bdbb                  
0046bdc7                  i_1 = i_1->m_hashNext;
0046bdc7                  
0046bdcc                  if (i_1 == 0)
0046bdcc                  {
0046bdf3                      class HashTableData<unsigned long,DBOCache *>* i;
0046bdf3                      
0046bdf3                      do
0046bdf3                      {
0046bde4                          void* m_currBucket_1 = &m_currBucket[1];
0046bde9                          m_currBucket = m_currBucket_1;
0046bde9                          
0046bded                          if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0046bded                              goto label_46be09;
0046bded                          
0046bdef                          i = *(uint32_t*)m_currBucket_1;
0046bdf3                      } while (i == 0);
0046bdf3                      
0046bdf5                      i_1 = i;
0046bdf5                      
0046bdf9                      if (i_1 == 0)
0046bdf9                          break;
0046bdcc                  }
0046bd60              }
0046bd55          }
0046bd55          
0046be09      label_46be09:
0046be09          UIElement::BroadcastElementMessage(this, 0x2c, 0, 0);
0046bd20      }
0046bd00  }

0046bddd                                                                                         8d 49 00                               .I.
0046be16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046be20  uint8_t __thiscall UIElement_Panel::OpenTab(class UIElement_Panel* this, uint32_t arg2)

0046be20  {
0046be3f      int32_t* i;
0046be3f      
0046be3f      for (i = this->m_TabPageHash.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_TabPageHash.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0046be3f      {
0046be43          if (*(uint32_t*)i == arg2)
0046be43          {
0046be55              if (i == 0)
0046be55                  break;
0046be55              
0046be58              uint32_t esi = i[2];
0046be72              int32_t* j;
0046be72              
0046be72              for (j = this->m_PageTabHash.m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_PageTabHash.m_intrusiveTable.m_numBuckets)]; j != 0; j = j[1])
0046be72              {
0046be76                  if (*(uint32_t*)j == esi)
0046be76                  {
0046be89                      if (j != 0)
0046be89                      {
0046be8b                          j = j[2];
0046be8b                          
0046be90                          if (j == arg2)
0046be90                          {
0046be94                              UIElement_Panel::Update(this, esi, j);
0046be9b                              int32_t eax_6;
0046be9b                              eax_6 = 1;
0046be9e                              return 1;
0046be90                          }
0046be89                      }
0046be89                      
0046be89                      break;
0046be76                  }
0046be72              }
0046be72              
0046be81              j = 0;
0046be84              return 0;
0046be43          }
0046be3f      }
0046be3f      
0046be4d      i = 0;
0046be50      return 0;
0046be20  }

0046bea1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0046beb0  uint8_t __thiscall UIElement_Panel::InqTabFromPage(class UIElement_Panel const* this, uint32_t arg2, uint32_t* arg3)

0046beb0  {
0046becc      int32_t* i;
0046becc      
0046becc      for (i = this->m_PageTabHash.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_PageTabHash.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0046becc      {
0046bed2          if (*(uint32_t*)i == arg2)
0046bed2          {
0046bee3              if (i == 0)
0046bee3                  break;
0046bee3              
0046beec              *(uint32_t*)arg3 = i[2];
0046beee              i = 1;
0046bef1              return 1;
0046bed2          }
0046becc      }
0046becc      
0046bedb      i = 0;
0046bede      return 0;
0046beb0  }

0046bef4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0046bf00  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>* this, uint32_t arg2)

0046bf00  {
0046bf0b      arg2 = arg2;
0046bf0f      uint8_t edx = ((int8_t)arg2);
0046bf13      this->m_buckets = nullptr;
0046bf16      this->m_firstInterestingBucket = nullptr;
0046bf19      this->m_numBuckets = 0;
0046bf1c      this->m_numElements = 0;
0046bf20      this->vtable = 0x79c9a8;
0046bf26      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0046bf39      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0046bf39      
0046bf43      if (eax == bucketSizesEnd_1)
0046bf45          eax -= 4;
0046bf45      
0046bf48      uint32_t eax_1 = *(uint32_t*)eax;
0046bf4d      this->m_numBuckets = eax_1;
0046bf4d      
0046bf50      if (eax_1 > 0x17)
0046bf66          this->m_buckets = operator new[]((eax_1 << 2));
0046bf50      else
0046bf55          this->m_buckets = &this->m_aInplaceBuckets;
0046bf55      
0046bf6c      class HashTableData<unsigned long,unsigned long>** m_buckets = this->m_buckets;
0046bf6f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0046bf75      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0046bf86      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0046bf00  }

0046bf8f                                               90                                                                 .

0046bf90  enum UIElementMessageListenResult __thiscall UIElement_Panel::ListenToElementMessage(class UIElement_Panel* this, struct UIElementMessageInfo const* arg2)

0046bf90  {
0046bf95      struct UIElementMessageInfo* edi = arg2;
0046bf9b      class UIElement* pElement_1 = edi->pElement;
0046bf9b      
0046bfa0      if (pElement_1 != this)
0046bfa0      {
0046c054          if (pElement_1->vtable->GetParent() == this)
0046c054          {
0046c05a              uint32_t idMessage = edi->idMessage;
0046c05a              
0046c060              if (idMessage == 0x18)
0046c060              {
0046c096                  if (HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(&this->m_PageTabHash, edi) != 0)
0046c096                  {
0046c098                      class UIElement* pElement = edi->pElement;
0046c098                      
0046c09d                      if (pElement != 0)
0046c09d                      {
0046c0aa                          if ((((int8_t)(pElement->__bitfield164 >> 1)) & 1) != 0)
0046c0aa                          {
0046c0ac                              uint32_t idElement = edi->idElement;
0046c0b6                              arg2 = nullptr;
0046c0be                              UIElement_Panel::InqTabFromPage(this, idElement, &arg2);
0046c0ca                              UIElement_Panel::OpenTab(this, arg2);
0046c0aa                          }
0046c0aa                          
0046c0d8                          class UIElement* eax_17 = UIElement::GetChildRecursive(this, this->m_OpenPageToken);
0046c0d8                          
0046c0df                          if (eax_17 == 0)
0046c0f0                              eax_17 = 0;
0046c0df                          else
0046c0e9                              eax_17 = ((eax_17->__bitfield164 >> 1) & 0xffffff01);
0046c0e9                          
0046c0f2                          this->vtable->SetVisible(eax_17);
0046c09d                      }
0046c096                  }
0046c060              }
0046c060              else if ((idMessage == 0x19 || idMessage == 0x29))
0046c073                  UIElement_Panel::OpenTab(this, edi->idElement);
0046c054          }
0046bfa0      }
0046bfa0      else if (edi->idMessage == 0x18)
0046bfaa      {
0046bfb5          if (edi->dwParam1 != 0)
0046bfb5          {
0046c024              class UIElement* eax_7 = UIElement::GetChildRecursive(this, this->m_OpenPageToken);
0046c024              
0046c02b              if (eax_7 != 0)
0046c031                  eax_7->vtable->SetVisible(1);
0046bfb5          }
0046bfb5          else
0046bfb5          {
0046bfc2              void __return;
0046bfc2              class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_PageTabHash.m_intrusiveTable, &__return);
0046bfc9              class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
0046bfcc              class HashTableData<unsigned long,DBOCache *>* m_currElement = eax_2->m_currElement;
0046bfd1              class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
0046bfd5              class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
0046bfd9              class HashTableData<unsigned long,DBOCache *>* m_currElement_1 = m_currElement;
0046bfd9              
0046bfdd              if (m_currElement != 0)
0046bfdd              {
0046c009                  do
0046c009                  {
0046bfe8                      class UIElement* eax_4 = UIElement::GetChildRecursive(this, m_currElement->m_hashKey);
0046bfe8                      
0046bfef                      if (eax_4 != 0)
0046bff1                          eax_4->vtable->SetVisible(0);
0046bff1                      
0046bffe                      HashIterator<unsigned long,StringInfoData *,0>::next(&m_currHashTable);
0046c003                      m_currElement = m_currElement_1;
0046c009                  } while (m_currElement != 0);
0046bfdd              }
0046bfb5          }
0046bfaa      }
0046bfaa      
0046c107      return UIElement::ListenToElementMessage(this, edi);
0046bf90  }

0046c10a                                90 90 90 90 90 90                                                            ......

0046c110  void* __thiscall HashTable<unsigned long,unsigned long,0>::`scalar deleting destructor'(class HashTable<unsigned long,unsigned long,0>* this, uint32_t arg2)

0046c110  {
0046c119      this->vtable = 0x79c9ac;
0046c11f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0046c124      class HashTableData<unsigned long,unsigned long>** m_buckets = this->m_intrusiveTable.m_buckets;
0046c114      this->m_intrusiveTable.vtable = 0x79c9a8;
0046c114      
0046c132      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0046c135          operator delete[](m_buckets);
0046c135      
0046c114      this->m_intrusiveTable.m_buckets = nullptr;
0046c114      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0046c114      this->m_intrusiveTable.m_numBuckets = 0;
0046c114      this->m_intrusiveTable.m_numElements = 0;
0046c114      
0046c150      if ((arg2 & 1) != 0)
0046c153          operator delete(this);
0046c153      
0046c15f      return this;
0046c110  }

0046c162        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046c170  void __thiscall UIElement_Panel::UIElement_Panel(class UIElement_Panel* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0046c170  {
0046c17f      UIElement::UIElement(this, arg2, arg3);
0046c184      this->vtable = 0x79c9b0;
0046c192      this->m_TabPageHash.vtable = 0x79c9ac;
0046c19c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(&this->m_TabPageHash.m_intrusiveTable, 0x17);
0046c1a9      this->m_PageTabHash.vtable = 0x79c9ac;
0046c1b3      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(&this->m_PageTabHash.m_intrusiveTable, 0x17);
0046c1ba      this->m_OpenPageToken = 0;
0046c1c0      this->m_OpenTabToken = 0;
0046c170  }

0046c1cc                                      90 90 90 90                                                              ....

0046c1d0  class UIElement* __thiscall UIElement_Panel::DynamicCast(class UIElement_Panel* this, uint32_t arg2) __pure

0046c1d0  {
0046c1d9      int32_t eax;
0046c1d9      eax = arg2 != 8;
0046c1df      return ((eax - 1) & this);
0046c1d0  }

0046c1e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046c1f0  void __fastcall UIElement_Panel::~UIElement_Panel(class UIElement_Panel* this)

0046c1f0  {
0046c1fb      this->vtable = 0x79c9b0;
0046c201      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_TabPageHash.m_intrusiveTable);
0046c20c      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_PageTabHash.m_intrusiveTable);
0046c219      this->m_OpenTabToken = 0;
0046c21f      this->m_OpenPageToken = 0;
0046c227      this->m_PageTabHash.vtable = 0x79c9ac;
0046c231      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_PageTabHash.m_intrusiveTable);
0046c236      class HashTableData<unsigned long,unsigned long>** m_buckets = this->m_PageTabHash.m_intrusiveTable.m_buckets;
0046c213      this->m_PageTabHash.m_intrusiveTable.vtable = 0x79c9a8;
0046c213      
0046c244      if (m_buckets != &this->m_PageTabHash.m_intrusiveTable.m_aInplaceBuckets)
0046c247          operator delete[](m_buckets);
0046c247      
0046c213      this->m_PageTabHash.m_intrusiveTable.m_buckets = nullptr;
0046c213      this->m_PageTabHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0046c213      this->m_PageTabHash.m_intrusiveTable.m_numBuckets = 0;
0046c213      this->m_PageTabHash.m_intrusiveTable.m_numElements = 0;
0046c263      this->m_TabPageHash.vtable = 0x79c9ac;
0046c26d      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_TabPageHash.m_intrusiveTable);
0046c272      class HashTableData<unsigned long,unsigned long>** m_buckets_1 = this->m_TabPageHash.m_intrusiveTable.m_buckets;
0046c25b      this->m_TabPageHash.m_intrusiveTable.vtable = 0x79c9a8;
0046c25b      
0046c280      if (m_buckets_1 != &this->m_TabPageHash.m_intrusiveTable.m_aInplaceBuckets)
0046c283          operator delete[](m_buckets_1);
0046c283      
0046c25b      this->m_TabPageHash.m_intrusiveTable.m_buckets = nullptr;
0046c25b      this->m_TabPageHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0046c25b      this->m_TabPageHash.m_intrusiveTable.m_numBuckets = 0;
0046c25b      this->m_TabPageHash.m_intrusiveTable.m_numElements = 0;
0046c29c      /* tailcall */
0046c29c      return UIElement::~UIElement(this);
0046c1f0  }

0046c2a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0046c2b0  class UIElement* UIElement_Panel::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046c2b0  {
0046c2b5      void* eax = operator new(0x6e0);
0046c2b5      
0046c2bf      if (eax == 0)
0046c2d5          return 0;
0046c2d5      
0046c2d2      return UIElement_Panel::UIElement_Panel(eax, arg1, arg2);
0046c2b0  }

0046c2d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046c2e0  void __fastcall UIElement_Panel::SetupTabPageHash(class UIElement_Panel* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0046c2e0  {
0046c2e0      int32_t ebp;
0046c2e0      int32_t var_4 = ebp;
0046c2e9      int32_t ebx;
0046c2e9      int32_t var_4c = ebx;
0046c2ea      int32_t* var_50 = &var_4;
0046c2eb      int32_t esi;
0046c2eb      int32_t var_54 = esi;
0046c2f5      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_TabPageHash.m_intrusiveTable);
0046c300      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_PageTabHash.m_intrusiveTable);
0046c305      struct UIElement_Panel::VTable* vtable = this->vtable;
0046c312      this->m_OpenTabToken = 0;
0046c318      this->m_OpenPageToken = 0;
0046c31e      uint32_t ebp_1 = 0;
0046c320      int32_t var_34 = 0;
0046c324      int32_t var_18 = 0;
0046c328      int32_t var_14 = 0;
0046c334      uint32_t var_3c;
0046c334      int32_t* var_20;
0046c334      int32_t* var_1c;
0046c334      int32_t* edi;
0046c334      
0046c334      if (vtable->InqProperty(0x2e, &var_18, edi) != 0)
0046c334      {
0046c340          int32_t var_40 = 0;
0046c340          
0046c344          if (var_1c != 0)
0046c344          {
0046c351              char eax_1;
0046c351              int32_t ecx_4;
0046c351              eax_1 = *(uint32_t*)(*(uint32_t*)var_1c + 0xf0)(&var_40);
0046c351              
0046c359              if (eax_1 != 0)
0046c359              {
0046c363                  int32_t edi_1 = 0;
0046c363                  
0046c367                  if (var_40 > 0)
0046c367                  {
0046c5dd                      do
0046c5dd                      {
0046c376                          int32_t* var_38 = nullptr;
0046c37a                          int32_t* var_34_1 = nullptr;
0046c37a                          
0046c37e                          if (var_1c != 0)
0046c37e                          {
0046c394                              if (*(uint32_t*)(*(uint32_t*)var_1c + 0xf4)(edi_1, &var_38) == 0)
0046c394                              {
0046c594                              label_46c594:
0046c594                                  int32_t* eax_25 = var_38;
0046c594                                  
0046c59a                                  if (eax_25 != 0)
0046c59a                                  {
0046c5a4                                      int32_t edx_20 = (eax_25[1] - 1);
0046c5a1                                      eax_25[1] = edx_20;
0046c5a1                                      
0046c5a9                                      if (edx_20 == 0)
0046c5af                                          **(uint32_t**)eax_25(1);
0046c5af                                      
0046c5b1                                      var_38 = nullptr;
0046c59a                                  }
0046c59a                                  
0046c5bb                                  if (var_34_1 != 0)
0046c5bb                                  {
0046c5c5                                      int32_t edx_22 = (var_34_1[1] - 1);
0046c5c2                                      var_34_1[1] = edx_22;
0046c5c2                                      
0046c5ca                                      if (edx_22 == 0)
0046c5d0                                          **(uint32_t**)var_34_1(1);
0046c5d0                                      
0046c5d2                                      int32_t var_34_2 = 0;
0046c5bb                                  }
0046c394                              }
0046c394                              else
0046c394                              {
0046c3a6                                  if (BaseProperty::GetPropertyName(&var_38) != 0x2f)
0046c3a6                                      goto label_46c594;
0046c3a6                                  
0046c3b2                                  int32_t* var_28 = nullptr;
0046c3b6                                  int32_t* var_24_1 = nullptr;
0046c3ba                                  int32_t* var_30 = nullptr;
0046c3be                                  int32_t* var_2c_1 = nullptr;
0046c3be                                  
0046c3c2                                  if (var_34_1 == 0)
0046c3c2                                      goto label_46c594;
0046c3c2                                  
0046c3e5                                  if ((*(uint32_t*)(*(uint32_t*)var_34_1 + 0x118)(0x30, &var_28) == 0 || var_34_1 == 0))
0046c3e5                                  {
0046c510                                  label_46c510:
0046c510                                      int32_t* eax_15 = var_30;
0046c510                                      
0046c516                                      if (eax_15 != 0)
0046c516                                      {
0046c520                                          int32_t edx_10 = (eax_15[1] - 1);
0046c51d                                          eax_15[1] = edx_10;
0046c51d                                          
0046c525                                          if (edx_10 == 0)
0046c52b                                              **(uint32_t**)eax_15(1);
0046c52b                                          
0046c52d                                          var_30 = nullptr;
0046c516                                      }
0046c516                                      
0046c537                                      if (var_2c_1 != 0)
0046c537                                      {
0046c541                                          int32_t edx_12 = (var_2c_1[1] - 1);
0046c53e                                          var_2c_1[1] = edx_12;
0046c53e                                          
0046c546                                          if (edx_12 == 0)
0046c54c                                              **(uint32_t**)var_2c_1(1);
0046c54c                                          
0046c54e                                          int32_t var_2c_2 = 0;
0046c537                                      }
0046c537                                      
0046c552                                      int32_t* eax_20 = var_28;
0046c552                                      
0046c558                                      if (eax_20 != 0)
0046c558                                      {
0046c562                                          int32_t edx_15 = (eax_20[1] - 1);
0046c55f                                          eax_20[1] = edx_15;
0046c55f                                          
0046c567                                          if (edx_15 == 0)
0046c56d                                              **(uint32_t**)eax_20(1);
0046c56d                                          
0046c56f                                          var_28 = nullptr;
0046c558                                      }
0046c558                                      
0046c579                                      if (var_24_1 != 0)
0046c579                                      {
0046c583                                          int32_t edx_17 = (var_24_1[1] - 1);
0046c580                                          var_24_1[1] = edx_17;
0046c580                                          
0046c588                                          if (edx_17 == 0)
0046c58e                                              **(uint32_t**)var_24_1(1);
0046c58e                                          
0046c590                                          int32_t var_24_2 = 0;
0046c579                                      }
0046c579                                      
0046c537                                      goto label_46c594;
0046c3e5                                  }
0046c3e5                                  
0046c3fc                                  if (*(uint32_t*)(*(uint32_t*)var_34_1 + 0x118)(0x31, &var_30) == 0)
0046c3fc                                      goto label_46c510;
0046c3fc                                  
0046c408                                  uint32_t var_48 = 0;
0046c40c                                  uint32_t var_44 = 0;
0046c40c                                  
0046c410                                  if (var_24_1 == 0)
0046c425                                      *(uint8_t*)((char*)var_4c)[3] = 0;
0046c410                                  else
0046c41f                                      *(uint8_t*)((char*)var_4c)[3] = *(uint32_t*)(*(uint32_t*)var_24_1 + 0xa8)(&var_48);
0046c41f                                  
0046c42f                                  char eax_6;
0046c42f                                  
0046c42f                                  if (var_2c_1 == 0)
0046c440                                      eax_6 = 0;
0046c42f                                  else
0046c438                                      eax_6 = *(uint32_t*)(*(uint32_t*)var_2c_1 + 0xa8)(&var_44);
0046c438                                  
0046c44e                                  if ((*(uint8_t*)((char*)var_4c)[3] != 0 && eax_6 != 0))
0046c44e                                  {
0046c46b                                      if ((HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_TabPageHash.vtable, &var_48, &var_44) != 0 && (HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_PageTabHash, &var_44, &var_48) != 0 && var_48 != var_44)))
0046c46b                                      {
0046c49e                                          var_18 = 0;
0046c4a2                                          int32_t* var_14_1 = nullptr;
0046c4a2                                          
0046c4a6                                          if ((var_34_1 != 0 && *(uint32_t*)(*(uint32_t*)var_34_1 + 0x118)(0x32, &var_18) != 0))
0046c4a6                                          {
0046c4c1                                              *(uint8_t*)((char*)var_4c)[3] = 0;
0046c4c1                                              
0046c4c5                                              if ((var_14_1 != 0 && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x70)(&*(uint32_t*)((char*)var_4c)[3]) != 0 && *(uint8_t*)((char*)var_4c)[3] != 0)))
0046c4c5                                              {
0046c4df                                                  ebp_1 = var_48;
0046c4e3                                                  var_3c = var_44;
0046c4c5                                              }
0046c4a6                                          }
0046c4a6                                          
0046c4ee                                          class UIElement* eax_14 = UIElement::GetChildRecursive(this, var_48);
0046c4ee                                          
0046c4f5                                          if (eax_14 == 0)
0046c4f5                                          {
0046c65e                                              BaseProperty::~BaseProperty(&var_18);
0046c667                                              BaseProperty::~BaseProperty(&var_30);
0046c670                                              BaseProperty::~BaseProperty(&var_28);
0046c679                                              BaseProperty::~BaseProperty(&var_38);
0046c682                                              BaseProperty::~BaseProperty(&var_20);
0046c68d                                              *(uint32_t*)edi;
0046c68e                                              return;
0046c4f5                                          }
0046c4f5                                          
0046c4fb                                          eax_14->vtable->SetMouseVisible(1);
0046c50b                                          BaseProperty::~BaseProperty(&var_18);
0046c46b                                      }
0046c46b                                      
0046c46b                                      goto label_46c510;
0046c44e                                  }
0046c44e                                  
0046c63e                                  BaseProperty::~BaseProperty(&var_30);
0046c647                                  BaseProperty::~BaseProperty(&var_28);
0046c650                                  BaseProperty::~BaseProperty(&var_38);
0046c394                              }
0046c37e                          }
0046c37e                          
0046c5da                          edi_1 += 1;
0046c5dd                      } while (edi_1 < var_40);
0046c367                  }
0046c359              }
0046c344          }
0046c334      }
0046c334      
0046c5eb      UIElement_Panel::Update(this, var_3c, ebp_1);
0046c5f0      int32_t* eax_32 = var_20;
0046c5f0      
0046c5f6      if (eax_32 != 0)
0046c5f6      {
0046c600          int32_t esi_3 = (eax_32[1] - 1);
0046c5fd          eax_32[1] = esi_3;
0046c5fd          
0046c607          if (esi_3 == 0)
0046c60d              **(uint32_t**)eax_32(1);
0046c60d          
0046c60f          var_20 = nullptr;
0046c5f6      }
0046c5f6      
0046c619      if (var_1c != 0)
0046c619      {
0046c623          int32_t esi_5 = (var_1c[1] - 1);
0046c620          var_1c[1] = esi_5;
0046c620          
0046c62a          if (esi_5 == 0)
0046c630              **(uint32_t**)var_1c(1);
0046c619      }
0046c619      
0046c638      *(uint32_t*)edi;
0046c2e0  }

0046c68f                                               90                                                                 .

0046c690  void* __thiscall UIElement_Panel::`scalar deleting destructor'(class UIElement_Panel* this, uint32_t arg2)

0046c690  {
0046c693      UIElement_Panel::~UIElement_Panel(this);
0046c693      
0046c69d      if ((arg2 & 1) != 0)
0046c6a0          operator delete(this);
0046c6a0      
0046c6ab      return this;
0046c690  }

0046c6ae                                            90 90                                                                ..

0046c6b0  void UIElement_Panel::Register()

0046c6b0  {
0046c6b7      UIElement::RegisterElementClass(8, UIElement_Panel::Create);
0046c6b0  }


0046c6c0  void __thiscall UIElement_Panel::OnSetAttribute(class UIElement_Panel* this, class BaseProperty const* arg2)

0046c6c0  {
0046c6c9      UIElement::OnSetAttribute(this, arg2);
0046c6c9      
0046c6d8      if (BaseProperty::GetPropertyName(arg2) == 0x2e)
0046c6dc          UIElement_Panel::SetupTabPageHash(this);
0046c6c0  }

0046c6e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046c6f0  class UIElement* __thiscall UIElement_Dragbar::DynamicCast(class UIElement_Dragbar* this, uint32_t arg2) __pure

0046c6f0  {
0046c6f9      int32_t eax;
0046c6f9      eax = arg2 != 2;
0046c6ff      return ((eax - 1) & this);
0046c6f0  }

0046c702        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046c710  uint8_t __fastcall UIElement_Resizebar::CheckOverOverride(class UIElement_Resizebar const* this)

0046c710  {
0046c716      return this->m_mousePressed;
0046c710  }

0046c717                                                                       90 90 90 90 90 90 90 90 90                         .........

0046c720  class UIElement* UIElement_Dragbar::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046c720  {
0046c726      void* result = operator new(0x5f4);
0046c726      
0046c732      if (result == 0)
0046c759          return 0;
0046c759      
0046c740      UIElement::UIElement(result, arg1, arg2);
0046c745      *(uint32_t*)result = 0x79cae8;
0046c74b      *(uint8_t*)((char*)result + 0x5f0) = 0;
0046c755      return result;
0046c720  }

0046c75a                                                                                90 90 90 90 90 90                            ......

0046c760  void __thiscall UIElement_Dragbar::StartMouseMoving(class UIElement_Dragbar* this, struct UIElementMessageInfo const* arg2)

0046c760  {
0046c76c      if (arg2->dwParam1 == 7)
0046c76c      {
0046c770          class UIElement* eax_2 = this->vtable->GetParent();
0046c770          
0046c778          if (eax_2 != 0)
0046c778          {
0046c77a              union __inner23 = eax_2->__inner23;
0046c77a              
0046c790              if (((((int8_t)(__inner23 >> 0x13)) & 1) == 0 && (((int8_t)(__inner23 >> 0x12)) & 1) == 0))
0046c790              {
0046c792                  this->m_mousePressed = 1;
0046c7a3                  UIElement::StartMovement(eax_2, arg2->ptWindow.x, arg2->ptWindow.y);
0046c7a8                  this->vtable->SetState(3);
0046c790              }
0046c778          }
0046c76c      }
0046c760  }

0046c7b9                                                                             90 90 90 90 90 90 90                           .......

0046c7c0  void __thiscall UIElement_Dragbar::StopMouseMoving(class UIElement_Dragbar* this, struct UIElementMessageInfo const* arg2)

0046c7c0  {
0046c7d5      if ((this->m_mousePressed != 0 && arg2->dwParam1 == 7))
0046c7d5      {
0046c7d7          this->vtable->SetState(1);
0046c7e3          struct UIElement_Dragbar::VTable* vtable = this->vtable;
0046c7e7          this->m_mousePressed = 0;
0046c7ee          class UIElement* eax_2 = vtable->GetParent();
0046c7ee          
0046c7f6          if (eax_2 != 0)
0046c7fa              UIElement::StopMovement(eax_2);
0046c7d5      }
0046c7c0  }

0046c803           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0046c810  void* __thiscall UIElement_Dragbar::`scalar deleting destructor'(class UIElement_Dragbar* this, uint32_t arg2)

0046c810  {
0046c813      this->vtable = 0x79cae8;
0046c819      UIElement::~UIElement(this);
0046c819      
0046c823      if ((arg2 & 1) != 0)
0046c826          operator delete(this);
0046c826      
0046c831      return this;
0046c810  }

0046c834                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0046c840  void UIElement_Dragbar::Register()

0046c840  {
0046c847      UIElement::RegisterElementClass(2, UIElement_Dragbar::Create);
0046c840  }


0046c850  enum UIElementMessageListenResult __thiscall UIElement_Dragbar::ListenToElementMessage(class UIElement_Dragbar* this, struct UIElementMessageInfo const* arg2)

0046c850  {
0046c856      int32_t* eax_1 = this->vtable->GetParent();
0046c856      
0046c86e      if ((eax_1 != 0 && arg2->pElement == this))
0046c86e      {
0046c874          uint32_t idMessage = arg2->idMessage;
0046c874          
0046c87a          if (idMessage == 0x1c)
0046c87a          {
0046c8f8              if (arg2->dwParam1 == 7)
0046c8f8              {
0046c8fa                  int32_t eax_9 = eax_1[0x155];
0046c8fa                  
0046c90f                  if (((((int8_t)(eax_9 >> 0x13)) & 1) == 0 && (((int8_t)(eax_9 >> 0x12)) & 1) == 0))
0046c90f                  {
0046c914                      UIElement_Dragbar::StartMouseMoving(this, arg2);
0046c929                      *(uint32_t*)(*(uint32_t*)eax_1 + 0x60)(arg2->ptWindow.x, arg2->ptWindow.y, arg2->dwParam1);
0046c90f                  }
0046c8f8              }
0046c87a          }
0046c87a          else if (idMessage == 0x1d)
0046c87d          {
0046c8c4              if (arg2->dwParam1 == 7)
0046c8c4              {
0046c8c6                  int32_t eax_3;
0046c8c6                  eax_3 = this->m_mousePressed;
0046c8c6                  
0046c8ce                  if (eax_3 != 0)
0046c8ce                  {
0046c8de                      *(uint32_t*)(*(uint32_t*)eax_1 + 0x64)(arg2->ptWindow.x, arg2->ptWindow.y, 7);
0046c8e4                      UIElement_Dragbar::StopMouseMoving(this, arg2);
0046c8ce                  }
0046c8c4              }
0046c87d          }
0046c87d          else if ((idMessage == 0x1e && ((((int8_t)(eax_1[0x155] >> 0x12)) & 1) != 0 && this->m_mousePressed != 0)))
0046c8b2              *(uint32_t*)(*(uint32_t*)eax_1 + 0x4c)(arg2->ptWindow.x, arg2->ptWindow.y);
0046c86e      }
0046c86e      
0046c934      return 2;
0046c850  }

0046c937                                                                       90 90 90 90 90 90 90 90 90                         .........

0046c940  uint8_t __thiscall UIElement_Dragbar::InqAvailableProperties(class UIElement_Dragbar const* this, class AvailablePropertySet* arg2)

0046c940  {
0046c943      class AvailablePropertySet* edi = arg2;
0046c948      int32_t ebx;
0046c948      ebx = 1;
0046c948      
0046c951      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046c953          ebx = 0;
0046c953      
0046c959      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046c95e      class AvailablePropertySet* esi = arg2;
0046c95e      
0046c964      if (esi == 0)
0046c964      {
0046c968          int32_t eax_1;
0046c968          eax_1 = 0;
0046c96b          return 0;
0046c964      }
0046c964      
0046c97a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 7, edi) == 0)
0046c97c          ebx = 0;
0046c97c      
0046c982      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046c98a      return ebx;
0046c940  }

0046c98d                                         90 90 90                                                               ...

0046c990  void __thiscall UIElement_Menu::UIElement_Menu(class UIElement_Menu* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0046c990  {
0046c99f      UIElement_Button::UIElement_Button(this, arg2, arg3);
0046c9a6      this->m_popup = nullptr;
0046c9ac      this->m_listBox = nullptr;
0046c9b2      this->m_open = 0;
0046c9b8      this->m_uiListBoxXBorder = 0;
0046c9be      this->m_uiListBoxYBorder = 0;
0046c9c4      this->vtable = 0x79cc28;
0046c9ca      this->vtable = &UIOption_Menu::`vftable';
0046c990  }

0046c9da                                                                                90 90 90 90 90 90                            ......

0046c9e0  class UIElement* __thiscall UIElement_Menu::DynamicCast(class UIElement_Menu* this, uint32_t arg2) __pure

0046c9e0  {
0046c9f3      if ((arg2 == 6 || (arg2 == 1 || arg2 == 0xc)))
0046ca00          return this;
0046ca00      
0046c9fa      int32_t edx_1;
0046c9fa      edx_1 = arg2 != 0xa;
0046c9fe      return (this & (edx_1 - 1));
0046c9e0  }

0046ca03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0046ca10  class UIElement* UIElement_Menu::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046ca10  {
0046ca15      void* eax = operator new(0x738);
0046ca15      
0046ca1f      if (eax == 0)
0046ca35          return 0;
0046ca35      
0046ca32      return UIElement_Menu::UIElement_Menu(eax, arg1, arg2);
0046ca10  }

0046ca36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046ca40  void __fastcall UIElement_Menu::Flush(class UIElement_Menu* this)

0046ca40  {
0046ca40      class UIElement_ListBox* m_listBox = this->m_listBox;
0046ca40      
0046ca48      if (m_listBox == 0)
0046ca4f          return;
0046ca4f      
0046ca4a      /* tailcall */
0046ca4a      return UIElement_ListBox::Flush(m_listBox);
0046ca40  }


0046ca50  class UIElement* __thiscall UIElement_Menu::GetItem(class UIElement_Menu const* this, int32_t arg2)

0046ca50  {
0046ca50      class UIElement_ListBox* m_listBox = this->m_listBox;
0046ca50      
0046ca58      if (m_listBox == 0)
0046ca61          return 0;
0046ca61      
0046ca5a      /* tailcall */
0046ca5a      return UIElement_ListBox::GetItem(m_listBox, arg2);
0046ca50  }

0046ca64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046ca70  class UIElement* __fastcall UIElement_Menu::GetSelectedItem(class UIElement_Menu const* this)

0046ca70  {
0046ca70      class UIElement_ListBox* m_listBox = this->m_listBox;
0046ca70      
0046ca78      if (m_listBox == 0)
0046ca83          return 0;
0046ca83      
0046ca80      return m_listBox->m_pSelectedItem;
0046ca70  }

0046ca84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046ca90  uint8_t __thiscall UIElement_Menu::InsertItem(class UIElement_Menu* this, class UIElement* arg2, int32_t arg3)

0046ca90  {
0046ca9b      if (this->m_listBox != 0)
0046ca9b      {
0046caa2          arg2->vtable->SetMouseVisible(1);
0046cac1          return UIElement_ListBox::InsertItem(this->m_listBox, arg2, arg3);
0046ca9b      }
0046ca9b      
0046cac4      class UIElement_ListBox* eax;
0046cac4      eax = 0;
0046cac7      return 0;
0046ca90  }

0046caca                                90 90 90 90 90 90                                                            ......

0046cad0  void __fastcall UIElement_Menu::UpdateState(class UIElement_Menu* this)

0046cad0  {
0046cadb      UIElement::SetAttribute_Bool(this, 0xe, this->m_open);
0046cad0  }

0046cae1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0046caf0  void __fastcall UIElement_Menu::RecalculatePopupSize(class UIElement_Menu* this)

0046caf0  {
0046cafb      if (this->m_listBox != 0)
0046cafb      {
0046cafd          class UIElement* m_popup = this->m_popup;
0046cafd          
0046cb05          if (m_popup != 0)
0046cb05          {
0046cb14              int32_t edi_1 = UIRegion::GetWidth(m_popup);
0046cb16              int32_t eax_2 = UIRegion::GetHeight(this->m_popup);
0046cb1b              class UIElement_ListBox* m_listBox = this->m_listBox;
0046cb1b              
0046cb36              if ((m_listBox->m_desc.m_leftEdge == 1 && m_listBox->m_desc.m_rightEdge == 1))
0046cb3e                  edi_1 = (m_listBox->m_iScrollableWidth + this->m_uiListBoxXBorder);
0046cb3e              
0046cb52              if ((m_listBox->m_desc.m_topEdge == 1 && m_listBox->m_desc.m_bottomEdge == 1))
0046cb5a                  eax_2 = (m_listBox->m_iScrollableHeight + this->m_uiListBoxYBorder);
0046cb5a              
0046cb60              this->m_popup->vtable->ResizeTo(edi_1, eax_2);
0046cb05          }
0046cafb      }
0046caf0  }

0046cb71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0046cb80  int32_t __fastcall UIElement_ListBox::GetSelectedIndex(class UIElement_ListBox const* this)

0046cb80  {
0046cb80      uint32_t m_num = this->m_listItems.m_num;
0046cb87      int32_t result = 0;
0046cb87      
0046cb8b      if (m_num > 0)
0046cb8b      {
0046cb93          int32_t* m_data = this->m_listItems.m_data;
0046cb93          
0046cbaa          do
0046cbaa          {
0046cba2              if (*(uint32_t*)m_data == this->m_pSelectedItem)
0046cbb0                  return result;
0046cbb0              
0046cba4              result += 1;
0046cba5              m_data = &m_data[1];
0046cbaa          } while (result < m_num);
0046cb8b      }
0046cb8b      
0046cbac      return 0xffffffff;
0046cb80  }

0046cbb1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0046cbc0  void UIElement_Menu::Register()

0046cbc0  {
0046cbc7      UIElement::RegisterElementClass(6, UIElement_Menu::Create);
0046cbc0  }


0046cbd0  int32_t __fastcall UIElement_Menu::GetNumItems(class UIElement_Menu const* this)

0046cbd0  {
0046cbd0      class UIElement_ListBox* m_listBox = this->m_listBox;
0046cbd0      
0046cbd8      if (m_listBox == 0)
0046cbe3          return 0;
0046cbe3      
0046cbe0      return m_listBox->m_listItems.m_num;
0046cbd0  }

0046cbe4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046cbf0  int32_t __fastcall UIElement_Menu::GetSelectedIndex(class UIElement_Menu const* this)

0046cbf0  {
0046cbf0      class UIElement_ListBox* m_listBox = this->m_listBox;
0046cbf0      
0046cbf8      if (m_listBox == 0)
0046cc27          return 0xffffffff;
0046cc27      
0046cbfa      uint32_t m_num = m_listBox->m_listItems.m_num;
0046cc01      int32_t result = 0;
0046cc01      
0046cc05      if (m_num > 0)
0046cc05      {
0046cc0d          class UIElement** m_data = m_listBox->m_listItems.m_data;
0046cc0d          
0046cc1d          do
0046cc1d          {
0046cc15              if (*(uint32_t*)m_data == m_listBox->m_pSelectedItem)
0046cc23                  return result;
0046cc23              
0046cc17              result += 1;
0046cc18              m_data = &m_data[1];
0046cc1d          } while (result < m_num);
0046cc05      }
0046cc05      
0046cc1f      return 0xffffffff;
0046cbf0  }

0046cc28                          90 90 90 90 90 90 90 90                                                          ........

0046cc30  void __fastcall UIElement_Menu::Open(class UIElement_Menu* this)

0046cc30  {
0046cc30      class UIElement_Menu* this_1 = this;
0046cc30      
0046cc3c      if (this->m_open == 0)
0046cc3c      {
0046cc42          class UIElement_ListBox* m_listBox = this->m_listBox;
0046cc42          
0046cc66          if ((m_listBox != 0 && (m_listBox->m_listItems.m_num != 0 && this->m_popup != 0)))
0046cc66          {
0046cc77              UIElement::GetAttribute_Bool(this, 5, &*(uint32_t*)((char*)this_1)[3]);
0046cc85              UIElement::GetAttribute_Bool(this, 3, &*(uint32_t*)((char*)this_1)[2]);
0046cc91              int32_t ebx_1 = UIRegion::GetScreenX0(this);
0046cc93              int32_t eax_2;
0046cc93              eax_2 = *(uint8_t*)((char*)this_1)[2];
0046cc93              
0046cc99              if (eax_2 != 0)
0046cc99              {
0046cc9d                  int32_t eax_3 = UIRegion::GetWidth(this);
0046ccb1                  int32_t eax_6;
0046ccb1                  int32_t edx_1;
0046ccb1                  edx_1 = HIGHD(((int64_t)(UIRegion::GetWidth(this->m_popup) - eax_3)));
0046ccb1                  eax_6 = LOWD(((int64_t)(UIRegion::GetWidth(this->m_popup) - eax_3)));
0046ccb8                  ebx_1 += -(((eax_6 - edx_1) >> 1));
0046cc99              }
0046cc99              
0046ccba              eax_2 = *(uint8_t*)((char*)this_1)[3];
0046ccc2              int32_t edi_3;
0046ccc2              
0046ccc2              if (eax_2 == 0)
0046ccdf                  edi_3 = UIRegion::GetScreenY1(this);
0046ccc2              else
0046ccd6                  edi_3 = (UIRegion::GetScreenY0(this) - UIRegion::GetHeight(this->m_popup));
0046ccd6              
0046cce1              this->m_popup->vtable->MoveTo(ebx_1, edi_3);
0046ccee              this->m_popup->vtable->SetVisible(1);
0046cd01              this->m_open = 1;
0046cd08              UIElement::SetAttribute_Bool(this, 0xe, 1);
0046cd15              UIElement::BroadcastElementMessage(this, 8, 0, 0);
0046cc66          }
0046cc3c      }
0046cc30  }

0046cd1f                                                                                               90                                 .

0046cd20  void __fastcall UIElement_Menu::Close(class UIElement_Menu* this)

0046cd20  {
0046cd2b      if (this->m_open != 0)
0046cd2b      {
0046cd2d          class UIElement* m_popup = this->m_popup;
0046cd2d          
0046cd35          if (m_popup != 0)
0046cd35          {
0046cd37              m_popup->vtable->SetVisible(0);
0046cd44              this->m_open = 0;
0046cd4b              UIElement::SetAttribute_Bool(this, 0xe, 0);
0046cd58              UIElement::BroadcastElementMessage(this, 9, 0, 0);
0046cd35          }
0046cd2b      }
0046cd20  }

0046cd5f                                                                                               90                                 .

0046cd60  void __thiscall UIElement_Menu::NewSelection(class UIElement_Menu* this, uint8_t arg2)

0046cd60  {
0046cd6e      if (this->m_listBox != 0)
0046cd6e      {
0046cd7b          class UIElement* var_8;
0046cd7b          UIElement::GetAttribute_Enum(this, 8, &var_8);
0046cd80          class UIElement* eax_1 = var_8;
0046cd80          
0046cd86          if (eax_1 != 0)
0046cd86          {
0046cd8b              eax_1 = UIElement::GetChildRecursive(this, eax_1);
0046cd8b              
0046cd92              if (eax_1 != 0)
0046cd92              {
0046cda1                  class UIElement* edi_1 = eax_1->vtable->DynamicCast(0xc);
0046cda1                  
0046cda5                  if (edi_1 != 0)
0046cda5                  {
0046cda7                      class UIElement_ListBox* m_listBox = this->m_listBox;
0046cdaf                      class UIElement* m_pSelectedItem_1;
0046cdaf                      
0046cdaf                      if (m_listBox != 0)
0046cdb1                          m_pSelectedItem_1 = m_listBox->m_pSelectedItem;
0046cdb1                      
0046cdb9                      if ((m_listBox == 0 || m_pSelectedItem_1 == 0))
0046cdea                          UIElement_Text::ClearAllText(edi_1);
0046cdb9                      else
0046cdb9                      {
0046cdbf                          eax_1 = m_pSelectedItem_1->vtable->DynamicCast(0xc);
0046cdbf                          
0046cdc7                          if (eax_1 != 0)
0046cdc7                          {
0046cdd8                              void __return;
0046cdd8                              UIElement_Text::SetText(edi_1, UIElement_Text::GetPreParsedText(eax_1, &__return));
0046cde1                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0046cdc7                          }
0046cdb9                      }
0046cda5                  }
0046cd92              }
0046cd86          }
0046cd86          
0046cdf0          eax_1 = arg2;
0046cdf0          
0046cdf6          if (eax_1 != 0)
0046cdf6          {
0046cdf8              class UIElement_ListBox* m_listBox_1 = this->m_listBox;
0046ce00              class UIElement* m_pSelectedItem;
0046ce00              
0046ce00              if (m_listBox_1 == 0)
0046ce24                  m_pSelectedItem = nullptr;
0046ce00              else
0046ce00              {
0046ce02                  m_pSelectedItem = m_listBox_1->m_pSelectedItem;
0046ce02                  
0046ce0a                  if (m_pSelectedItem != 0)
0046ce0a                  {
0046ce18                      UIElement::BroadcastElementMessage(this, 7, m_pSelectedItem->m_desc.m_elementID, m_pSelectedItem);
0046ce21                      return;
0046ce0a                  }
0046ce00              }
0046ce00              
0046ce2e              UIElement::BroadcastElementMessage(this, 7, 0, m_pSelectedItem);
0046cdf6          }
0046cd6e      }
0046cd60  }

0046ce3a                                                                                90 90 90 90 90 90                            ......

0046ce40  void __fastcall UIElement_Menu::~UIElement_Menu(class UIElement_Menu* this)

0046ce40  {
0046ce43      class UIElement* m_popup = this->m_popup;
0046ce4b      this->vtable = 0x79cc28;
0046ce51      this->vtable = &UIOption_Menu::`vftable';
0046ce51      
0046ce5b      if (m_popup != 0)
0046ce5e          UIElement::UnregisterForElementMessages(m_popup, this);
0046ce5e      
0046ce6b      if (this->m_open != 0)
0046ce6b      {
0046ce6d          class UIElement* m_popup_1 = this->m_popup;
0046ce6d          
0046ce75          if (m_popup_1 != 0)
0046ce75          {
0046ce77              m_popup_1->vtable->SetVisible(0);
0046ce84              this->m_open = 0;
0046ce8b              UIElement::SetAttribute_Bool(this, 0xe, 0);
0046ce98              UIElement::BroadcastElementMessage(this, 9, 0, 0);
0046ce75          }
0046ce6b      }
0046ce6b      
0046ce9d      class UIElement* m_popup_2 = this->m_popup;
0046ce9d      
0046cea5      if (m_popup_2 != 0)
0046cea5      {
0046cea7          UIElement::AddToDeleteQueue(m_popup_2);
0046ceac          this->m_popup = nullptr;
0046cea5      }
0046cea5      
0046ceb9      /* tailcall */
0046ceb9      return UIElement_Button::~UIElement_Button(this);
0046ce40  }

0046cebe                                                                                            90 90                                ..

0046cec0  uint8_t __thiscall UIElement_Menu::InqAvailableProperties(class UIElement_Menu const* this, class AvailablePropertySet* arg2)

0046cec0  {
0046cec3      class AvailablePropertySet* edi = arg2;
0046cec8      int32_t ebx;
0046cec8      ebx = 1;
0046cec8      
0046ced1      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046ced3          ebx = 0;
0046ced3      
0046ced9      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046cede      class AvailablePropertySet* esi = arg2;
0046cede      
0046cee4      if (esi == 0)
0046cee4      {
0046cee8          int32_t eax_1;
0046cee8          eax_1 = 0;
0046ceeb          return 0;
0046cee4      }
0046cee4      
0046cefa      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0xd, edi) == 0)
0046cefc          ebx = 0;
0046cefc      
0046cf02      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046cf0a      return ebx;
0046cec0  }

0046cf0d                                         90 90 90                                                               ...

0046cf10  class UIElement_Text* __thiscall UIElement_Menu::InsertTextItem(class UIElement_Menu* this, class StringInfo const* arg2, int32_t arg3)

0046cf10  {
0046cf20      uint32_t var_4;
0046cf20      UIElement::GetAttribute_Enum(this, 9, &var_4);
0046cf25      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046cf25      
0046cf2d      if (UIElementManager::s_pInstance_1 != 0)
0046cf2d      {
0046cf3a          uint32_t id = INVALID_DID.id;
0046cf42          class DBObjGrabber<LayoutDesc> var_c = 0;
0046cf4a          uint8_t eax_1 = UIElement::GetAttribute_DataID(this, 0xa, &id);
0046cf51          class DBObjGrabber<LayoutDesc> edi_1;
0046cf51          
0046cf51          if (eax_1 != 0)
0046cf51          {
0046cf5c              DBObjGrabber<LayoutDesc>::set(&var_c, id);
0046cf61              edi_1 = var_c;
0046cf51          }
0046cf51          
0046cf67          if ((eax_1 != 0 && edi_1 != 0))
0046cf67          {
0046cf92          label_46cf92:
0046cf92              class UIElement* eax_4 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance_1, nullptr, edi_1, var_4);
0046cf92              
0046cf9b              if (eax_4 != 0)
0046cf9b              {
0046cfba                  class UIElement_Text* result = eax_4->vtable->DynamicCast(0xc);
0046cfba                  
0046cfc4                  if (result != 0)
0046cfc4                  {
0046cfec                      UIElement_Text::SetStringInfo(result, arg2);
0046cfec                      
0046d000                      if (UIElement_Menu::InsertItem(this, result, arg3) != 0)
0046d000                      {
0046d023                          MasterPropertyGrabber::~MasterPropertyGrabber(&var_c);
0046d031                          return result;
0046d000                      }
0046d000                      
0046d002                      eax_4->vtable->__vecDelDtor(1);
0046d00e                      MasterPropertyGrabber::~MasterPropertyGrabber(&var_c);
0046d01c                      return 0;
0046cfc4                  }
0046cfc4                  
0046cfc6                  eax_4->vtable->__vecDelDtor(1);
0046cfc6                  
0046cfd0                  if (edi_1 != 0)
0046cfd6                      *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
0046cf9b              }
0046cf9b              else if (edi_1 != 0)
0046cfa5                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
0046cf67          }
0046cf67          else
0046cf67          {
0046cf69              class LayoutDesc* m_layout = this->m_layout;
0046cf69              
0046cf71              if (m_layout != 0)
0046cf71              {
0046cf7b                  DBObjGrabber<LayoutDesc>::set(&var_c, m_layout->m_DID.id);
0046cf80                  edi_1 = var_c;
0046cf80                  
0046cf86                  if (edi_1 != 0)
0046cf86                      goto label_46cf92;
0046cf71              }
0046cf67          }
0046cf2d      }
0046cf2d      
0046cfb1      return 0;
0046cf10  }

0046d034                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0046d040  class UIElement_Text* __thiscall UIElement_Menu::ReplaceTextItem(class UIElement_Menu* this, class StringInfo const* arg2, int32_t arg3)

0046d040  {
0046d044      class UIElement_ListBox* m_listBox = this->m_listBox;
0046d04a      int32_t ebx;
0046d04a      ebx = 0;
0046d04f      int32_t eax;
0046d04f      
0046d04f      if (m_listBox == 0)
0046d082          eax = 0xffffffff;
0046d04f      else
0046d04f      {
0046d051          uint32_t m_num = m_listBox->m_listItems.m_num;
0046d057          eax = 0;
0046d057          
0046d05c          if (m_num <= 0)
0046d05c          {
0046d07c          label_46d07c:
0046d07c              eax = 0xffffffff;
0046d05c          }
0046d05c          else
0046d05c          {
0046d064              int32_t* m_data = m_listBox->m_listItems.m_data;
0046d064              
0046d072              while (*(uint32_t*)m_data != m_listBox->m_pSelectedItem)
0046d072              {
0046d074                  eax += 1;
0046d075                  m_data = &m_data[1];
0046d075                  
0046d07a                  if (eax >= m_num)
0046d07a                      goto label_46d07c;
0046d072              }
0046d05c          }
0046d04f      }
0046d04f      
0046d08b      if (eax == arg3)
0046d08d          ebx = 1;
0046d08d      
0046d095      if (m_listBox->m_listItems.m_num > arg3)
0046d098          UIElement_ListBox::DeleteItem(m_listBox, arg3);
0046d098      
0046d0a5      class UIElement_Text* result = UIElement_Menu::InsertTextItem(this, arg2, arg3);
0046d0a5      
0046d0ae      if (ebx != 0)
0046d0b9          UIElement_ListBox::SetSelectedItem(this->m_listBox, result, 1);
0046d0b9      
0046d0c3      return result;
0046d040  }

0046d0c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046d0d0  void __thiscall UIElement_Menu::SetSelectedItem(class UIElement_Menu* this, class UIElement* arg2, uint8_t arg3)

0046d0d0  {
0046d0d3      class UIElement_ListBox* m_listBox = this->m_listBox;
0046d0d3      
0046d0db      if (m_listBox != 0)
0046d0db      {
0046d0e8          UIElement_ListBox::SetSelectedItem(m_listBox, arg2, arg3);
0046d0f0          UIElement_Menu::NewSelection(this, arg3);
0046d0db      }
0046d0d0  }

0046d0fa                                                                                90 90 90 90 90 90                            ......

0046d100  void __thiscall UIElement_Menu::SetVisible(class UIElement_Menu* this, uint8_t arg2)

0046d100  {
0046d108      UIElement::SetVisible(this, arg2);
0046d108      
0046d120      if ((UIElement::IsVisible(this) == 0 && this->m_open != 0))
0046d124          UIElement_Menu::Close(this);
0046d100  }

0046d12d                                         90 90 90                                                               ...

0046d130  uint8_t __fastcall UIElement_Menu::Deactivate(class UIElement_Menu* this)

0046d130  {
0046d139      int32_t ebx;
0046d139      ebx = UIElement::Deactivate(this);
0046d139      
0046d147      if ((ebx != 0 && this->m_open != 0))
0046d147      {
0046d149          class UIElement* m_popup = this->m_popup;
0046d149          
0046d151          if (m_popup != 0)
0046d151          {
0046d153              m_popup->vtable->SetVisible(0);
0046d160              this->m_open = 0;
0046d167              UIElement::SetAttribute_Bool(this, 0xe, 0);
0046d174              UIElement::BroadcastElementMessage(this, 9, 0, 0);
0046d151          }
0046d147      }
0046d147      
0046d17d      return ebx;
0046d130  }

0046d17e                                                                                            90 90                                ..

0046d180  enum UIElementMessageListenResult __thiscall UIElement_Menu::ListenToElementMessage(class UIElement_Menu* this, struct UIElementMessageInfo const* arg2)

0046d180  {
0046d188      class UIElement* pElement = arg2->pElement;
0046d188      
0046d191      if (pElement != this->m_popup)
0046d191      {
0046d1c3          if (pElement != this->m_listBox)
0046d1c3          {
0046d21a              if (pElement->vtable->GetParent() != this->m_listBox)
0046d21a              {
0046d295                  if (arg2->pElement == this)
0046d295                  {
0046d297                      uint32_t idMessage = arg2->idMessage;
0046d297                      
0046d29b                      if (idMessage == 1)
0046d29b                      {
0046d2b3                          int32_t eax_8;
0046d2b3                          eax_8 = this->m_open;
0046d2b3                          
0046d2bd                          if (eax_8 != 0)
0046d2bd                          {
0046d2bf                              UIElement_Menu::Close(this);
0046d2cb                              return 2;
0046d2bd                          }
0046d2bd                          
0046d2ce                          UIElement_Menu::Open(this);
0046d2da                          return 2;
0046d29b                      }
0046d29b                      
0046d2a0                      if (idMessage == 0x1b)
0046d2a0                      {
0046d2a4                          UIElement_Menu::UpdateState(this);
0046d2b0                          return 2;
0046d2a0                      }
0046d295                  }
0046d295                  
0046d2e7                  return UIElement_Button::ListenToElementMessage(this, arg2);
0046d21a              }
0046d21a              
0046d220              if (arg2->idMessage == 0x1b)
0046d220              {
0046d222                  class UIElement* pElement_1 = arg2->pElement;
0046d225                  uint32_t m_state = pElement_1->m_state;
0046d22b                  uint32_t m_state_1 = m_state;
0046d22b                  
0046d22f                  if (m_state_1 == 0)
0046d231                      m_state_1 = 1;
0046d231                  
0046d23c                  if ((m_state_1 - 1) <= 6)
0046d23c                      switch (m_state_1)
0046d23c                      {
0046d258                          case 1:
0046d258                          {
0046d258                              if (arg2->dwParam1 != 0)
0046d25a                                  m_state_1 = 2;
0046d258                              break;
0046d258                          }
0046d24a                          case 2:
0046d24a                          {
0046d24a                              if (arg2->dwParam1 == 0)
0046d24c                                  m_state_1 = 1;
0046d24a                              break;
0046d24a                          }
0046d274                          case 6:
0046d274                          {
0046d274                              if (arg2->dwParam1 != 0)
0046d276                                  m_state_1 = 7;
0046d274                              break;
0046d274                          }
0046d266                          case 7:
0046d266                          {
0046d266                              if (arg2->dwParam1 == 0)
0046d268                                  m_state_1 = 6;
0046d266                              break;
0046d266                          }
0046d23c                      }
0046d23c                  
0046d27d                  if (m_state_1 != m_state)
0046d27f                      pElement_1->vtable->SetState(m_state_1);
0046d220              }
0046d220              
0046d28f              return 2;
0046d1c3          }
0046d1c3          
0046d1c5          uint32_t idMessage_1 = arg2->idMessage;
0046d1c5          
0046d1cb          if (idMessage_1 == 4)
0046d1f6              UIElement_Menu::NewSelection(this, 1);
0046d1cb          else
0046d1cb          {
0046d1d0              if (idMessage_1 == 0x32)
0046d1d0              {
0046d1e3                  UIElement_Menu::RecalculatePopupSize(this);
0046d1ef                  return 2;
0046d1d0              }
0046d1d0              
0046d1d5              if (idMessage_1 != 0x43)
0046d1de                  return 2;
0046d1cb          }
0046d1cb          
0046d1fd          UIElement_Menu::Close(this);
0046d191      }
0046d191      else if ((arg2->idMessage == 0x2a && (this->m_open != 0 && (*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) == 0)))
0046d1ae          UIElement_Menu::Close(this);
0046d1ae      
0046d209      return 2;
0046d180  }

0046d2ea                                8b ff                                                                        ..
0046d2ec  uint32_t jump_table_46d2ec[0x7] = 
0046d2ec  {
0046d2ec      [0x0] =  0x0046d253
0046d2f0      [0x1] =  0x0046d245
0046d2f4      [0x2] =  0x0046d27b
0046d2f8      [0x3] =  0x0046d27b
0046d2fc      [0x4] =  0x0046d27b
0046d300      [0x5] =  0x0046d26f
0046d304      [0x6] =  0x0046d261
0046d308  }

0046d308                          90 90 90 90 90 90 90 90                                                          ........

0046d310  void __fastcall UIElement_Menu::MakePopup(class UIElement_Menu* this)

0046d310  {
0046d317      class UIElement* m_popup = this->m_popup;
0046d317      
0046d31f      if (m_popup != 0)
0046d31f      {
0046d321          UIElement::AddToDeleteQueue(m_popup);
0046d326          this->m_popup = nullptr;
0046d31f      }
0046d31f      
0046d330      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046d330      
0046d338      if (UIElementManager::s_pInstance_1 != 0)
0046d338      {
0046d34d          class DBObjGrabber<LayoutDesc> var_8 = 0;
0046d355          uint32_t id = INVALID_DID.id;
0046d359          uint8_t eax_2 = UIElement::GetAttribute_DataID(this, 7, &id);
0046d360          class DBObjGrabber<LayoutDesc> ebx_1;
0046d360          
0046d360          if (eax_2 != 0)
0046d360          {
0046d36b              DBObjGrabber<LayoutDesc>::set(&var_8, id);
0046d370              ebx_1 = var_8;
0046d360          }
0046d360          
0046d376          if ((eax_2 != 0 && ebx_1 != 0))
0046d376          {
0046d3a0          label_46d3a0:
0046d3a0              UIElement::GetAttribute_Enum(this, 6, &var_8);
0046d3ad              class UIElement* eax_4 = UIElementManager::CreateRootElement(UIElementManager::s_pInstance_1, ebx_1, var_8);
0046d3ad              
0046d3b6              if (eax_4 != 0)
0046d3b6              {
0046d3b8                  eax_4->vtable->SetVisible(0);
0046d3c7                  UIElement::SetAttribute_Bool(eax_4, 0x33, 1);
0046d3d2                  class UIListener* edx_2 = UIElement::SetAttribute_Bool(eax_4, 0x34, 1);
0046d3d7                  class UIElement_Menu* this_1 = this;
0046d3da                  this->m_popup = eax_4;
0046d3e0                  UIElement::RegisterForElementMessages(eax_4, edx_2);
0046d3b6              }
0046d3b6              
0046d3e7              if (ebx_1 != 0)
0046d3ed                  *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
0046d376          }
0046d376          else
0046d376          {
0046d378              class LayoutDesc* m_layout = this->m_layout;
0046d378              
0046d380              if (m_layout != 0)
0046d380              {
0046d38a                  DBObjGrabber<LayoutDesc>::set(&var_8, m_layout->m_DID.id);
0046d38f                  ebx_1 = var_8;
0046d38f                  
0046d395                  if (ebx_1 != 0)
0046d395                      goto label_46d3a0;
0046d380              }
0046d376          }
0046d338      }
0046d310  }

0046d3f7                                                                       90 90 90 90 90 90 90 90 90                         .........

0046d400  void* __thiscall UIElement_Menu::`scalar deleting destructor'(class UIElement_Menu* this, uint32_t arg2)

0046d400  {
0046d403      UIElement_Menu::~UIElement_Menu(this);
0046d403      
0046d40d      if ((arg2 & 1) != 0)
0046d410          operator delete(this);
0046d410      
0046d41b      return this;
0046d400  }

0046d41e                                                                                            90 90                                ..

0046d420  class UIElement_Text* __thiscall UIElement_Menu::AddTextItem(class UIElement_Menu* this, class StringInfo const* arg2)

0046d420  {
0046d437      return UIElement_Menu::InsertTextItem(this, arg2, this->m_listBox->m_listItems.m_num);
0046d420  }

0046d43a                                                                                90 90 90 90 90 90                            ......

0046d440  void __fastcall UIElement_Menu::Initialize(class UIElement_Menu* this)

0046d440  {
0046d440      class UIElement_Menu* this_1 = this;
0046d444      UIElement_Menu::MakePopup(this);
0046d444      
0046d451      if (this->m_popup != 0)
0046d451      {
0046d45c          UIElement::GetAttribute_Enum(this, 2, &this_1);
0046d46c          class UIElement* eax_1 = UIElement::GetChildRecursive(this->m_popup, this_1);
0046d46c          
0046d473          if (eax_1 != 0)
0046d481              this->m_listBox = eax_1->vtable->DynamicCast(5);
0046d481          
0046d48f          if (this->m_listBox != 0)
0046d48f          {
0046d49a              UIElement::GetAttribute_Enum(this, 1, &this_1);
0046d49f              class UIElement_Menu* this_2 = this_1;
0046d49f              
0046d4a5              if (this_2 != 0)
0046d4b0                  UIElement_ListBox::SetSelectedItemByID(this->m_listBox, this_2, 1);
0046d48f          }
0046d451      }
0046d451      
0046d4b7      UIElement::Initialize(this);
0046d4b7      
0046d4c4      if (this->m_popup != 0)
0046d4c4      {
0046d4c6          class UIElement_ListBox* m_listBox = this->m_listBox;
0046d4c6          
0046d4ce          if (m_listBox != 0)
0046d4ce          {
0046d4d1              int32_t eax_5 = UIRegion::GetWidth(m_listBox);
0046d4de              int32_t eax_6 = UIRegion::GetWidth(this->m_popup);
0046d4e3              class UIElement* m_popup = this->m_popup;
0046d4eb              this->m_uiListBoxXBorder = (eax_6 - eax_5);
0046d505              this->m_uiListBoxYBorder = (UIRegion::GetHeight(m_popup) - UIRegion::GetHeight(this->m_listBox));
0046d4ce          }
0046d4c4      }
0046d440  }

0046d50f                                               90                                                                 .

0046d510  uint8_t __thiscall UIElement_ListBox::SetState(class UIElement_ListBox* this, uint32_t arg2)

0046d510  {
0046d51a      uint8_t eax = UIElement::SetState(this, arg2);
0046d51f      struct UIElement_ListBox::VTable* vtable = this->vtable;
0046d523      int32_t ebx;
0046d523      ebx = eax;
0046d52e      vtable->SetMouseVisible(vtable->GetShouldBeMouseVisible());
0046d539      return ebx;
0046d510  }

0046d53c                                                                                      90 90 90 90                              ....

0046d540  void __thiscall UIElement_ListBox::DrawStart(class UIElement_ListBox* this)

0046d540  {
0046d542      /* jump -> this->vtable->UpdateLayout */
0046d540  }

0046d548                          90 90 90 90 90 90 90 90                                                          ........

0046d550  void __thiscall UIElement_ListBox::ScrollToY(class UIElement_ListBox* this, int32_t arg2)

0046d550  {
0046d55e      UIElement_Scrollable::SetScrollableXY(this, this->m_iScrollableX, arg2, 0);
0046d550  }

0046d566                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046d570  void __thiscall UIElement_ListBox::ScrollToX(class UIElement_ListBox* this, int32_t arg2)

0046d570  {
0046d57e      UIElement_Scrollable::SetScrollableXY(this, arg2, this->m_iScrollableY, 0);
0046d570  }

0046d586                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046d590  uint8_t __fastcall UIElement_ListBox::GetShouldBeMouseVisible(class UIElement_ListBox* this)

0046d590  {
0046d5a3      if ((UIElement::GetShouldBeMouseVisible(this) == 0 && this->m_state == 0xd))
0046d5a8          return 0;
0046d5a8      
0046d5af      return 1;
0046d590  }


0046d5b0  void __thiscall UIElement_ListBox::SetHorizontal(class UIElement_ListBox* this, uint8_t const arg2)

0046d5b0  {
0046d5b6      uint32_t m_bitField = this->m_bitField;
0046d5b6      
0046d5bc      if (arg2 != 0)
0046d5bc      {
0046d5c1          this->m_bitField = (m_bitField | 1);
0046d5c7          return;
0046d5bc      }
0046d5bc      
0046d5cd      this->m_bitField = (m_bitField & 0xfffffffe);
0046d5b0  }

0046d5d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046d5e0  void __thiscall UIElement_ListBox::SetClickSelect(class UIElement_ListBox* this, uint8_t const arg2)

0046d5e0  {
0046d5e6      uint32_t m_bitField = this->m_bitField;
0046d5e6      
0046d5ec      if (arg2 != 0)
0046d5ec      {
0046d5f1          this->m_bitField = (m_bitField | 2);
0046d5f7          return;
0046d5ec      }
0046d5ec      
0046d5fd      this->m_bitField = (m_bitField & 0xfffffffd);
0046d5e0  }

0046d606                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046d610  void __thiscall UIElement_ListBox::SetDragSelect(class UIElement_ListBox* this, uint8_t const arg2)

0046d610  {
0046d616      uint32_t m_bitField = this->m_bitField;
0046d616      
0046d61c      if (arg2 != 0)
0046d61c      {
0046d621          this->m_bitField = (m_bitField | 4);
0046d627          return;
0046d61c      }
0046d61c      
0046d62d      this->m_bitField = (m_bitField & 0xfffffffb);
0046d610  }

0046d636                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046d640  void __thiscall UIElement_ListBox::SetDragRollover(class UIElement_ListBox* this, uint8_t const arg2)

0046d640  {
0046d646      uint32_t m_bitField = this->m_bitField;
0046d646      
0046d64c      if (arg2 != 0)
0046d64c      {
0046d651          this->m_bitField = (m_bitField | 8);
0046d657          return;
0046d64c      }
0046d64c      
0046d65d      this->m_bitField = (m_bitField & 0xfffffff7);
0046d640  }

0046d666                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046d670  void __thiscall UIElement_ListBox::SetSelectedItemStateChange(class UIElement_ListBox* this, uint8_t const arg2)

0046d670  {
0046d676      uint32_t m_bitField = this->m_bitField;
0046d676      
0046d67c      if (arg2 != 0)
0046d67c      {
0046d681          this->m_bitField = (m_bitField | 0x20);
0046d687          return;
0046d67c      }
0046d67c      
0046d68d      this->m_bitField = (m_bitField & 0xffffffdf);
0046d670  }

0046d696                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046d6a0  void __thiscall UIElement_ListBox::OnSetAttribute(class UIElement_ListBox* this, class BaseProperty const* arg2)

0046d6a0  {
0046d6a1      class BaseProperty* esi = arg2;
0046d6a9      UIElement_Scrollable::OnSetAttribute(this, esi);
0046d6a9      
0046d6bd      switch ((BaseProperty::GetPropertyName(esi) - 0x59))
0046d6bd      {
0046d6fe          case 0:
0046d6fe          {
0046d6fe              class BasePropertyValue* m_pcPropertyValue_1 = esi->m_pcPropertyValue;
0046d6fe              
0046d703              if (m_pcPropertyValue_1 != 0)
0046d705                  m_pcPropertyValue_1->vtable->InqBool(&arg2);
0046d705              
0046d716              UIElement_ListBox::SetClickSelect(this, ((int8_t)arg2));
0046d6fe              break;
0046d6fe          }
0046d742          case 1:
0046d742          {
0046d742              class BasePropertyValue* m_pcPropertyValue_3 = esi->m_pcPropertyValue;
0046d742              
0046d747              if (m_pcPropertyValue_3 != 0)
0046d749                  m_pcPropertyValue_3->vtable->InqBool(&arg2);
0046d749              
0046d75a              UIElement_ListBox::SetDragRollover(this, ((int8_t)arg2));
0046d742              break;
0046d742          }
0046d720          case 2:
0046d720          {
0046d720              class BasePropertyValue* m_pcPropertyValue_2 = esi->m_pcPropertyValue;
0046d720              
0046d725              if (m_pcPropertyValue_2 != 0)
0046d727                  m_pcPropertyValue_2->vtable->InqBool(&arg2);
0046d727              
0046d738              UIElement_ListBox::SetDragSelect(this, ((int8_t)arg2));
0046d720              break;
0046d720          }
0046d6c4          case 3:
0046d6c4          {
0046d6c4              class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
0046d6c4              
0046d6c9              if (m_pcPropertyValue != 0)
0046d6cb                  m_pcPropertyValue->vtable->InqBool(&arg2);
0046d6cb              
0046d6dc              UIElement_ListBox::SetHorizontal(this, ((int8_t)arg2));
0046d6ee              this->m_bitField |= 0x200;
0046d6f4              UIRegion::MakeRootDirtyHere(this);
0046d6c4              break;
0046d6c4          }
0046d6ee          case 6:
0046d6ee          {
0046d6ee              this->m_bitField |= 0x200;
0046d6f4              UIRegion::MakeRootDirtyHere(this);
0046d6ee              break;
0046d6ee          }
0046d764          case 8:
0046d764          {
0046d764              class BasePropertyValue* m_pcPropertyValue_4 = esi->m_pcPropertyValue;
0046d764              
0046d769              if (m_pcPropertyValue_4 != 0)
0046d76b                  m_pcPropertyValue_4->vtable->InqBool(&arg2);
0046d76b              
0046d77c              UIElement_ListBox::SetSelectedItemStateChange(this, ((int8_t)arg2));
0046d764              break;
0046d764          }
0046d6bd      }
0046d6a0  }

0046d786                    8b ff                                                                                ..
0046d788  uint32_t jump_table_46d788[0x9] = 
0046d788  {
0046d788      [0x0] =  0x0046d6fe
0046d78c      [0x1] =  0x0046d742
0046d790      [0x2] =  0x0046d720
0046d794      [0x3] =  0x0046d6c4
0046d798      [0x4] =  0x0046d6f9
0046d79c      [0x5] =  0x0046d6f9
0046d7a0      [0x6] =  0x0046d6e1
0046d7a4      [0x7] =  0x0046d6f9
0046d7a8      [0x8] =  0x0046d764
0046d7ac  }

0046d7ac                                      90 90 90 90                                                              ....

0046d7b0  void __thiscall UIElement_ListBox::ResizeTo(class UIElement_ListBox* this, int32_t const arg2, int32_t const arg3)

0046d7b0  {
0046d7b5      int32_t eax = UIRegion::GetWidth(this);
0046d7be      int32_t eax_1 = UIRegion::GetHeight(this);
0046d7d1      UIElement_Scrollable::ResizeTo(this, arg2, arg3);
0046d7d8      int32_t eax_3 = UIRegion::GetWidth(this);
0046d7df      int32_t eax_4;
0046d7df      
0046d7df      if (eax == eax_3)
0046d7e3          eax_4 = UIRegion::GetHeight(this);
0046d7e3      
0046d7ea      if ((eax != eax_3 || eax_1 != eax_4))
0046d7ea      {
0046d7f9          this->m_bitField |= 0x200;
0046d7ff          UIRegion::MakeRootDirtyHere(this);
0046d7ea      }
0046d7b0  }

0046d80a                                90 90 90 90 90 90                                                            ......

0046d810  void __fastcall UIElement_ListBox::UpdateForChildSizeChange(class UIElement_ListBox* this, class UIElement* arg2)

0046d810  {
0046d810      this->m_bitField |= 0x200;
0046d81a      UIRegion::MakeRootDirtyHere(this);
0046d810  }

0046d822        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046d830  int32_t __thiscall UIElement_ListBox::CalculatePaperSize(class UIElement_ListBox* this, uint8_t arg2, int32_t arg3)

0046d830  {
0046d83c      if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 2) != 0)
0046d83e          this->vtable->UpdateLayout();
0046d83e      
0046d846      int32_t i_1 = arg3;
0046d84d      uint16_t eax;
0046d84d      eax = arg2;
0046d84d      
0046d851      if (i_1 != 0xffffffff)
0046d851          goto label_46d85f;
0046d851      
0046d855      class SmartArray<long,1>* ecx;
0046d855      
0046d855      if (eax == 0)
0046d855      {
0046d881          i_1 = this->m_nRows;
0046d867          ecx = &this->m_nItemHeights;
0046d855      }
0046d855      else
0046d855      {
0046d857          i_1 = this->m_nCols;
0046d85f      label_46d85f:
0046d85f          ecx = &this->m_nItemWidths;
0046d85f          
0046d865          if (eax == 0)
0046d867              ecx = &this->m_nItemHeights;
0046d855      }
0046d855      
0046d86d      int32_t result = 0;
0046d86d      
0046d871      if (i_1 > 0)
0046d871      {
0046d873          int32_t* m_data = ecx->m_data;
0046d87b          int32_t i;
0046d87b          
0046d87b          do
0046d87b          {
0046d875              result += *(uint32_t*)m_data;
0046d877              m_data = &m_data[1];
0046d87a              i = i_1;
0046d87a              i_1 -= 1;
0046d87b          } while (i != 1);
0046d871      }
0046d871      
0046d87e      return result;
0046d830  }

0046d889                             90 90 90 90 90 90 90                                                           .......

0046d890  class UIElement* __thiscall UIElement_ListBox::GetItem(class UIElement_ListBox* this, uint32_t arg2)

0046d890  {
0046d89a      if (arg2 >= this->m_listItems.m_num)
0046d8aa          return 0;
0046d8aa      
0046d8a5      return this->m_listItems.m_data[arg2];
0046d890  }

0046d8ad                                         90 90 90                                                               ...

0046d8b0  void __thiscall UIElement_ListBox::SetSelectedItem(class UIElement_ListBox* this, class UIElement* arg2, uint8_t arg3)

0046d8b0  {
0046d8b1      class UIElement* i = arg2;
0046d8b9      class UIElement* m_pSelectedItem = this->m_pSelectedItem;
0046d8b9      
0046d8c1      if (m_pSelectedItem != i)
0046d8c1      {
0046d8df          uint32_t m_num = this->m_listItems.m_num;
0046d8e5          class UIElement* eax_1 = nullptr;
0046d8ea          class UIElement* ebp_1;
0046d8ea          
0046d8ea          if (m_num <= 0)
0046d8ea          {
0046d902          label_46d902:
0046d902              ebp_1 = 0xffffffff;
0046d905              this->m_pSelectedItem = nullptr;
0046d8ea          }
0046d8ea          else
0046d8ea          {
0046d8ec              class UIElement** m_data = this->m_listItems.m_data;
0046d8ec              
0046d8f4              while (*(uint32_t*)m_data != i)
0046d8f4              {
0046d8fa                  eax_1 = (&eax_1->vtable + 1);
0046d8fb                  m_data = &m_data[1];
0046d8fb                  
0046d900                  if (eax_1 >= m_num)
0046d900                      goto label_46d902;
0046d8f4              }
0046d8f4              
0046d987              ebp_1 = eax_1;
0046d987              
0046d989              if (eax_1 == 0xffffffff)
0046d905                  this->m_pSelectedItem = nullptr;
0046d989              else
0046d98f                  this->m_pSelectedItem = i;
0046d8ea          }
0046d8ea          
0046d916          if ((this->m_bitField & 0x20) != 0)
0046d916          {
0046d91a              if (m_pSelectedItem != 0)
0046d91a              {
0046d925                  UIElement::GetAttribute_Enum(this, 0x5d, &arg2);
0046d92e                  m_pSelectedItem->vtable->SetState(arg2);
0046d91a              }
0046d91a              
0046d941              if (this->m_pSelectedItem != 0)
0046d941              {
0046d94c                  UIElement::GetAttribute_Enum(this, 0x5e, &arg2);
0046d951                  this->m_pSelectedItem->vtable->SetState(arg2);
0046d941              }
0046d916          }
0046d916          
0046d964          eax_1 = arg3;
0046d964          
0046d96a          if (eax_1 != 0)
0046d978              UIElement::BroadcastElementMessage(this, 4, ebp_1, this->m_pSelectedItem);
0046d8c1      }
0046d8c1      else if (arg3 != 0)
0046d8d4          UIElement::BroadcastElementMessage(this, 0x43, m_pSelectedItem, 0);
0046d8b0  }

0046d99a                                                                                90 90 90 90 90 90                            ......

0046d9a0  uint8_t __thiscall UIElement_ListBox::InqItemIndexAtPoint(class UIElement_ListBox* this, int32_t arg2, int32_t arg3, uint32_t* arg4)

0046d9a0  {
0046d9be      uint32_t eax;
0046d9be      
0046d9be      if (((this->m_listItems.m_num != 0 && arg2 >= 0) && arg2 < UIRegion::GetWidth(this)))
0046d9be      {
0046d9d7          if ((arg3 >= 0 && arg3 < UIRegion::GetHeight(this)))
0046d9d7          {
0046d9ec              this->vtable->UpdateLayout();
0046da02              int32_t edi_2 = (arg2 + this->m_iScrollableX);
0046da04              uint32_t m_num = this->m_nItemWidths.m_num;
0046da0a              int32_t ebx_1 = (arg3 + this->m_iScrollableY);
0046da0c              int32_t edx_1 = 0;
0046da0e              int32_t eax_3 = 0;
0046da12              arg2 = 0;
0046da16              arg3 = 0;
0046da16              
0046da1a              if (m_num > 0)
0046da1a              {
0046da1c                  int32_t* m_data_1 = this->m_nItemWidths.m_data;
0046da1c                  
0046da2f                  do
0046da2f                  {
0046da22                      edx_1 += *(uint32_t*)m_data_1;
0046da22                      
0046da27                      if (edi_2 <= edx_1)
0046da27                      {
0046da33                          arg2 = eax_3;
0046da33                          break;
0046da27                      }
0046da27                      
0046da29                      eax_3 += 1;
0046da2a                      m_data_1 = &m_data_1[1];
0046da2f                  } while (eax_3 < m_num);
0046da1a              }
0046da1a              
0046da37              uint32_t m_num_1 = this->m_nItemHeights.m_num;
0046da3d              int32_t ecx_3 = 0;
0046da3f              int32_t eax_4 = 0;
0046da3f              
0046da43              if (m_num_1 > 0)
0046da43              {
0046da45                  int32_t* m_data = this->m_nItemHeights.m_data;
0046da45                  
0046da5c                  do
0046da5c                  {
0046da50                      ecx_3 += *(uint32_t*)m_data;
0046da50                      
0046da54                      if (ebx_1 <= ecx_3)
0046da54                      {
0046da60                          arg3 = eax_4;
0046da60                          break;
0046da54                      }
0046da54                      
0046da56                      eax_4 += 1;
0046da57                      m_data = &m_data[1];
0046da5c                  } while (eax_4 < m_num_1);
0046da43              }
0046da43              
0046da6b              int32_t eax_6;
0046da6b              int32_t ecx_4;
0046da6b              
0046da6b              if ((this->m_bitField & 1) == 0)
0046da6b              {
0046da84                  eax_6 = (this->m_nRows * arg2);
0046da89                  ecx_4 = arg3;
0046da6b              }
0046da6b              else
0046da6b              {
0046da73                  eax_6 = (this->m_nCols * arg3);
0046da78                  ecx_4 = arg2;
0046da6b              }
0046da6b              
0046da8d              eax = (eax_6 + ecx_4);
0046da8d              
0046da95              if (eax < this->m_listItems.m_num)
0046da95              {
0046da9e                  *(uint32_t*)arg4 = eax;
0046daa0                  eax = 1;
0046daa3                  return 1;
0046da95              }
0046d9d7          }
0046d9d7          
0046daa9          eax = 0;
0046daac          return 0;
0046d9be      }
0046d9be      
0046dab2      eax = 0;
0046dab5      return 0;
0046d9a0  }

0046da4d                                         8d 49 00                                                               .I.
0046dab8                                                                          90 90 90 90 90 90 90 90                          ........

0046dac0  class UIElement* __thiscall UIElement_ListBox::RemoveItem(class UIElement_ListBox* this, uint32_t arg2)

0046dac0  {
0046dace      if (arg2 < this->m_listItems.m_num)
0046dace      {
0046dad6          int32_t* result = this->m_listItems.m_data[arg2];
0046dad6          
0046dae1          if (result != 0)
0046dae1          {
0046dae4              SmartArray<UIElement *,1>::RemoveOrderedByIndex(&this->m_listItems, arg2);
0046daf7              this->m_bitField |= 0x200;
0046dafd              UIRegion::MakeRootDirtyHere(this);
0046db08              *(uint32_t*)(*(uint32_t*)result + 0x44)(0);
0046db08              
0046db11              if (result == this->m_pSelectedItem)
0046db13                  this->m_pSelectedItem = nullptr;
0046db13              
0046db23              if (result == this->m_dragLastOver)
0046db25                  this->m_dragLastOver = nullptr;
0046db25              
0046db35              if (result == this->m_itemDragged)
0046db37                  this->m_itemDragged = nullptr;
0046db37              
0046db45              return result;
0046dae1          }
0046dace      }
0046dace      
0046db4c      return 0;
0046dac0  }

0046db4f                                               90                                                                 .

0046db50  void __fastcall UIElement_ListBox::StartDragSelect(class UIElement_ListBox* this)

0046db50  {
0046db5a      if ((this->m_bitField & 0x40) == 0)
0046db5a      {
0046db5c          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0046db5c          
0046db64          if ((ICIDM::s_cidm_1 != 0 && CInputManager::IsActionInProgress(ICIDM::s_cidm_1, 7) != 0))
0046db64          {
0046db78              UIElementManager::SetMouseCapture(UIElementManager::s_pInstance, this);
0046db7d              this->m_bitField |= 0x40;
0046db64          }
0046db5a      }
0046db50  }

0046db86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046db90  void __fastcall UIElement_ListBox::StartRollover(class UIElement_ListBox* this)

0046db90  {
0046db90      uint32_t m_bitField = this->m_bitField;
0046db90      
0046db9d      if (((m_bitField & 8) != 0 && (*(uint8_t*)((char*)m_bitField)[1] & 1) == 0))
0046dba4          this->m_bitField = (m_bitField | 0x100);
0046db90  }

0046dbab                                   90 90 90 90 90                                                             .....

0046dbb0  void __fastcall UIElement_ListBox::EndRollover(class UIElement_ListBox* this)

0046dbb0  {
0046dbb3      uint32_t m_bitField = this->m_bitField;
0046dbb3      
0046dbbc      if ((*(uint8_t*)((char*)m_bitField)[1] & 1) != 0)
0046dbbc      {
0046dbc6          this->m_bitField = (m_bitField & 0xfffffeff);
0046dbcc          class UIElement* m_dragLastOver = this->m_dragLastOver;
0046dbcc          
0046dbd4          if (m_dragLastOver != 0)
0046dbd4          {
0046dbdc              m_dragLastOver->vtable->SetState(this->m_lastDragOverState);
0046dbe5              this->m_dragLastOver = nullptr;
0046dbd4          }
0046dbbc      }
0046dbb0  }

0046dbf1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0046dc00  void __fastcall UIElement_ListBox::AdjustToScrollableXYChange(class UIElement_ListBox* this)

0046dc00  {
0046dc00      this->m_bitField |= 0x200;
0046dc0a      /* tailcall */
0046dc0a      return UIRegion::MakeRootDirtyHere(this);
0046dc00  }

0046dc0f                                               90                                                                 .

0046dc10  int32_t __thiscall UIElement_ListBox::InqScrollDelta(class UIElement_ListBox* this, uint8_t arg2, uint8_t arg3, uint8_t arg4)

0046dc10  {
0046dc14      int32_t result = 0;
0046dc14      
0046dc18      if (arg4 == 0)
0046dc18      {
0046dc31          int32_t ebx;
0046dc31          ebx = arg2;
0046dc3a          int32_t esi_1;
0046dc3a          
0046dc3a          if (ebx == 0)
0046dc44              esi_1 = this->m_nRows;
0046dc3a          else
0046dc3c              esi_1 = this->m_nCols;
0046dc3c          
0046dc4c          int32_t edx_1;
0046dc4c          edx_1 = esi_1 != 0;
0046dc4c          
0046dc51          if (edx_1 != 0)
0046dc51          {
0046dc55              int32_t eax;
0046dc55              int32_t esi_2;
0046dc55              
0046dc55              if (ebx == 0)
0046dc55              {
0046dc65                  eax = this->m_iScrollableHeight;
0046dc6b                  esi_2 = this->m_nRows;
0046dc55              }
0046dc55              else
0046dc55              {
0046dc57                  eax = this->m_iScrollableWidth;
0046dc5d                  esi_2 = this->m_nCols;
0046dc55              }
0046dc55              
0046dc72              int32_t temp0_1 = (((int64_t)eax) / esi_2);
0046dc78              arg4 = temp0_1;
0046dc7c              int32_t eax_3;
0046dc7c              
0046dc7c              if (ebx == 0)
0046dc85                  eax_3 = UIRegion::GetHeight(this);
0046dc7c              else
0046dc7e                  eax_3 = UIRegion::GetWidth(this);
0046dc7e              
0046dc8a              arg2 = eax_3;
0046dc90              int32_t* eax_4 = &arg4;
0046dc90              
0046dc94              if (temp0_1 >= eax_3)
0046dc96                  eax_4 = &arg2;
0046dc96              
0046dc9a              result = *(uint32_t*)eax_4;
0046dc51          }
0046dc18      }
0046dc18      else
0046dc18      {
0046dc1a          result = arg2;
0046dc1a          
0046dc20          if (result == 0)
0046dc29              result = UIRegion::GetHeight(this);
0046dc20          else
0046dc22              result = UIRegion::GetWidth(this);
0046dc18      }
0046dc18      
0046dc9e      this = arg3;
0046dc9e      
0046dca4      if (this == 0)
0046dca8          return result;
0046dca8      
0046dca6      return -(result);
0046dc10  }

0046dcab                                   90 90 90 90 90                                                             .....

0046dcb0  void __thiscall UIElement_ListBox::UIElement_ListBox(class UIElement_ListBox* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0046dcb0  {
0046dcbf      UIElement_Scrollable::UIElement_Scrollable(this, arg2, arg3);
0046dcc6      this->vtable = 0x79cd68;
0046dccc      __builtin_memset(&this->m_listItems, 0, 0x58);
0046dd50      this->m_bitField = 0x290;
0046dcb0  }


0046dd60  class UIElement* __thiscall UIElement_ListBox::DynamicCast(class UIElement_ListBox* this, uint32_t arg2) __pure

0046dd60  {
0046dd69      if (arg2 == 5)
0046dd76          return this;
0046dd76      
0046dd70      int32_t edx_1;
0046dd70      edx_1 = arg2 != 0xa;
0046dd74      return (this & (edx_1 - 1));
0046dd60  }

0046dd79                                                                             90 90 90 90 90 90 90                           .......

0046dd80  void __fastcall UIElement_ListBox::~UIElement_ListBox(class UIElement_ListBox* this)

0046dd80  {
0046dd83      bool cond:0 = (this->m_bitField & 0x40) == 0;
0046dd8a      this->vtable = 0x79cd68;
0046dd8a      
0046dd90      if (!(cond:0))
0046dd92          this->m_bitField &= 0xffffffbf;
0046dd92      
0046dd99      uint32_t m_bitField = this->m_bitField;
0046dd99      
0046dda2      if ((*(uint8_t*)((char*)m_bitField)[1] & 1) != 0)
0046dda2      {
0046ddac          this->m_bitField = (m_bitField & 0xfffffeff);
0046ddb2          class UIElement* m_dragLastOver = this->m_dragLastOver;
0046ddb2          
0046ddba          if (m_dragLastOver != 0)
0046ddba          {
0046ddc2              m_dragLastOver->vtable->SetState(this->m_lastDragOverState);
0046ddcb              this->m_dragLastOver = nullptr;
0046ddba          }
0046dda2      }
0046dda2      
0046dde5      if ((this->m_nItemWidths.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0046ddee          operator delete[](this->m_nItemWidths.m_data);
0046ddee      
0046de08      if ((this->m_nItemHeights.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0046de11          operator delete[](this->m_nItemHeights.m_data);
0046de11      
0046de2b      if ((this->m_listItems.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0046de34          operator delete[](this->m_listItems.m_data);
0046de34      
0046de3f      /* tailcall */
0046de3f      return UIElement_Scrollable::~UIElement_Scrollable(this);
0046dd80  }

0046de44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0046de50  class UIElement* UIElement_ListBox::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046de50  {
0046de55      void* eax = operator new(0x668);
0046de55      
0046de5f      if (eax == 0)
0046de75          return 0;
0046de75      
0046de72      return UIElement_ListBox::UIElement_ListBox(eax, arg1, arg2);
0046de50  }

0046de76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046de80  uint8_t __thiscall UIElement_ListBox::InqAvailableProperties(class UIElement_ListBox const* this, class AvailablePropertySet* arg2)

0046de80  {
0046de83      class AvailablePropertySet* edi = arg2;
0046de88      int32_t ebx;
0046de88      ebx = 1;
0046de88      
0046de91      if (UIElement_Scrollable::InqAvailableProperties(this, edi) == 0)
0046de93          ebx = 0;
0046de93      
0046de99      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046de9e      class AvailablePropertySet* esi = arg2;
0046de9e      
0046dea4      if (esi == 0)
0046dea4      {
0046dea8          int32_t eax_1;
0046dea8          eax_1 = 0;
0046deab          return 0;
0046dea4      }
0046dea4      
0046deba      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0xc, edi) == 0)
0046debc          ebx = 0;
0046debc      
0046dec2      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046deca      return ebx;
0046de80  }

0046decd                                         90 90 90                                                               ...

0046ded0  void __thiscall UIElement_ListBox::MouseOverTop(class UIElement_ListBox* this, uint8_t arg2)

0046ded0  {
0046ded1      char ebx = ((int8_t)arg2);
0046ded9      UIElement::MouseOverTop(this, ebx);
0046ded9      
0046deeb      if ((ebx != 0 && (*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 1) == 0))
0046deeb      {
0046deed          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046deed          
0046defe          if ((UIElementManager::s_pInstance_1 != 0 && UIElementManager::s_pInstance_1->m_dragElement != 0))
0046defe          {
0046df09              UIElement::GetAttribute_Bool(this, 0x36, &arg2);
0046df09              
0046df14              if (arg2 != 0)
0046df18                  UIElement_ListBox::StartRollover(this);
0046defe          }
0046deeb      }
0046ded0  }

0046df22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0046df30  void __thiscall UIElement_ListBox::MouseUp(class UIElement_ListBox* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

0046df30  {
0046df44      UIElement::MouseUp(this, arg2, arg3, arg4);
0046df44      
0046df50      if ((this->m_bitField & 0x40) != 0)
0046df52          this->m_bitField &= 0xffffffbf;
0046df52      
0046df59      uint32_t m_bitField = this->m_bitField;
0046df59      
0046df62      if ((*(uint8_t*)((char*)m_bitField)[1] & 1) != 0)
0046df62      {
0046df6c          this->m_bitField = (m_bitField & 0xfffffeff);
0046df72          class UIElement* m_dragLastOver = this->m_dragLastOver;
0046df72          
0046df7a          if (m_dragLastOver != 0)
0046df7a          {
0046df82              m_dragLastOver->vtable->SetState(this->m_lastDragOverState);
0046df8b              this->m_dragLastOver = nullptr;
0046df7a          }
0046df62      }
0046df30  }

0046df99                                                                             90 90 90 90 90 90 90                           .......

0046dfa0  class UIElement* __thiscall UIElement_ListBox::GetItemAtPoint(class UIElement_ListBox* this, int32_t arg2, int32_t arg3)

0046dfa0  {
0046dfbe      if (UIElement_ListBox::InqItemIndexAtPoint(this, arg2, arg3, &arg3) == 0)
0046dfd6          return 0;
0046dfd6      
0046dfcf      return this->m_listItems.m_data[arg3];
0046dfa0  }

0046dfd9                                                                             90 90 90 90 90 90 90                           .......

0046dfe0  class UIElement* __thiscall UIElement_ListBox::RemoveItem(class UIElement_ListBox* this, class UIElement* arg2)

0046dfe0  {
0046dfe5      class UIElement* eax = nullptr;
0046dfe5      
0046dfe9      if (arg2 == 0)
0046e01b          return 0;
0046e01b      
0046dfec      uint32_t m_num = this->m_listItems.m_num;
0046dfec      
0046dff4      if (m_num > 0)
0046dff4      {
0046dff6          int32_t* m_data = this->m_listItems.m_data;
0046dff6          
0046e00a          do
0046e00a          {
0046e002              if (*(uint32_t*)m_data == arg2)
0046e002                  goto label_46e015;
0046e002              
0046e004              eax = (&eax->vtable + 1);
0046e005              m_data = &m_data[1];
0046e00a          } while (eax < m_num);
0046dff4      }
0046dff4      
0046e00c      eax = 0xffffffff;
0046e015  label_46e015:
0046e015      /* tailcall */
0046e015      return UIElement_ListBox::RemoveItem(this, eax);
0046dfe0  }

0046e01e                                                                                            90 90                                ..

0046e020  uint8_t __thiscall UIElement_ListBox::DeleteItem(class UIElement_ListBox* this, class UIElement* arg2)

0046e020  {
0046e027      class UIElement* eax;
0046e027      
0046e027      if (arg2 != 0)
0046e027      {
0046e02a          uint32_t m_num = this->m_listItems.m_num;
0046e030          uint32_t eax_1 = 0;
0046e030          
0046e034          if (m_num <= 0)
0046e034          {
0046e04c          label_46e04c:
0046e04c              eax_1 = 0xffffffff;
0046e034          }
0046e034          else
0046e034          {
0046e036              int32_t* m_data = this->m_listItems.m_data;
0046e036              
0046e042              while (*(uint32_t*)m_data != arg2)
0046e042              {
0046e044                  eax_1 += 1;
0046e045                  m_data = &m_data[1];
0046e045                  
0046e04a                  if (eax_1 >= m_num)
0046e04a                      goto label_46e04c;
0046e042              }
0046e034          }
0046e034          
0046e050          eax = UIElement_ListBox::RemoveItem(this, eax_1);
0046e050          
0046e058          if (eax != 0)
0046e058          {
0046e062              UIElement::AddToDeleteQueue(eax);
0046e067              int32_t eax_2;
0046e067              eax_2 = 1;
0046e06a              return 1;
0046e058          }
0046e027      }
0046e027      
0046e05a      eax = 0;
0046e05d      return 0;
0046e020  }

0046e06d                                         90 90 90                                                               ...

0046e070  uint8_t __thiscall UIElement_ListBox::DeleteItem(class UIElement_ListBox* this, int32_t arg2)

0046e070  {
0046e07a      int32_t eax;
0046e07a      
0046e07a      if (arg2 < this->m_listItems.m_num)
0046e07a      {
0046e082          eax = this->m_listItems.m_data[arg2];
0046e082          
0046e087          if (eax != 0)
0046e092              /* tailcall */
0046e092              return UIElement_ListBox::DeleteItem(this, eax);
0046e07a      }
0046e07a      
0046e089      eax = 0;
0046e08b      return 0;
0046e070  }

0046e097                                                                       90 90 90 90 90 90 90 90 90                         .........

0046e0a0  void __fastcall UIElement_ListBox::Flush(class UIElement_ListBox* this)

0046e0a0  {
0046e0ad      int32_t i = 0;
0046e0ad      
0046e0b1      if (this->m_listItems.m_num > 0)
0046e0b1      {
0046e0ce          do
0046e0ce          {
0046e0b9              class UIElement* ecx = this->m_listItems.m_data[i];
0046e0b9              
0046e0be              if (ecx != 0)
0046e0c0                  UIElement::AddToDeleteQueue(ecx);
0046e0c0              
0046e0cb              i += 1;
0046e0ce          } while (i < this->m_listItems.m_num);
0046e0b1      }
0046e0b1      
0046e0d0      uint32_t m_sizeAndDeallocate = this->m_listItems.m_sizeAndDeallocate;
0046e0e4      this->m_listItems.m_num = 0;
0046e0e4      
0046e0ea      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0046e0ea      {
0046e0f3          operator delete[](this->m_listItems.m_data);
0046e0fb          this->m_listItems.m_data = 0;
0046e101          this->m_listItems.m_sizeAndDeallocate = 0;
0046e0ea      }
0046e0ea      else if (this->m_listItems.m_data != 0)
0046e10f      {
0046e111          int32_t eax_3 = (m_sizeAndDeallocate & 0x7fffffff);
0046e116          int32_t eax_4 = (eax_3 - 1);
0046e116          
0046e117          if ((eax_3 - 1) >= 0)
0046e117          {
0046e12b              int32_t temp1_1;
0046e12b              
0046e12b              do
0046e12b              {
0046e120                  temp1_1 = eax_4;
0046e120                  eax_4 -= 1;
0046e121                  this->m_listItems.m_data[(eax_4 + 1)] = 0;
0046e12b              } while ((temp1_1 - 1) >= 0);
0046e117          }
0046e10f      }
0046e10f      
0046e12d      this->m_pSelectedItem = nullptr;
0046e133      this->m_dragLastOver = nullptr;
0046e145      this->m_bitField |= 0x200;
0046e14f      /* tailcall */
0046e14f      return UIRegion::MakeRootDirtyHere(this);
0046e0a0  }

0046e154                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0046e160  void* __thiscall UIElement_ListBox::`scalar deleting destructor'(class UIElement_ListBox* this, uint32_t arg2)

0046e160  {
0046e163      UIElement_ListBox::~UIElement_ListBox(this);
0046e163      
0046e16d      if ((arg2 & 1) != 0)
0046e170          operator delete(this);
0046e170      
0046e17b      return this;
0046e160  }

0046e17e                                                                                            90 90                                ..

0046e180  void UIElement_ListBox::Register()

0046e180  {
0046e187      UIElement::RegisterElementClass(5, UIElement_ListBox::Create);
0046e180  }


0046e190  void __thiscall UIElement_ListBox::InitializeWidthHeightArray(class UIElement_ListBox* this, uint8_t arg2)

0046e190  {
0046e198      class SmartArray<long,1>* esi;
0046e198      int32_t i_1;
0046e198      
0046e198      if (arg2 == 0)
0046e198      {
0046e1a8          i_1 = this->m_nRows;
0046e1ae          esi = &this->m_nItemHeights;
0046e198      }
0046e198      else
0046e198      {
0046e19a          i_1 = this->m_nCols;
0046e1a0          esi = &this->m_nItemWidths;
0046e198      }
0046e198      
0046e1be      if ((esi->m_sizeAndDeallocate & 0x7fffffff) >= i_1)
0046e1be      {
0046e1d1          int32_t i = i_1;
0046e1d1          
0046e1d3          if (i_1 < esi->m_num)
0046e1d3          {
0046e1ef              do
0046e1ef              {
0046e1e0                  esi->m_data[i] = 0;
0046e1ec                  i += 1;
0046e1ef              } while (i < esi->m_num);
0046e1d3          }
0046e1d3          
0046e1f1          esi->m_num = i_1;
0046e1be      }
0046e1be      else if (SmartArray<unsigned long,1>::grow(esi, i_1) != 0)
0046e1f1          esi->m_num = i_1;
0046e1f1      
0046e1f4      int32_t eax_4 = 0;
0046e1f4      
0046e1f8      if (i_1 > 0)
0046e1f8      {
0046e20c          do
0046e20c          {
0046e200              esi->m_data[eax_4] = 0;
0046e209              eax_4 += 1;
0046e20c          } while (eax_4 < i_1);
0046e1f8      }
0046e190  }

0046e1d7                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
0046e213                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0046e220  class UIElement* __fastcall UIElement_ListBox::GetItemUnderMouse(class UIElement_ListBox* this)

0046e220  {
0046e220      class UIElement_ListBox* this_1 = this;
0046e220      
0046e232      if ((((int8_t)(this->__bitfield164 >> 4)) & 1) == 0)
0046e28b          return 0;
0046e28b      
0046e275      if (UIElement_ListBox::InqItemIndexAtPoint(this, (ICIDM::s_cidm->vtable->GetMouseX() - UIRegion::GetScreenX0(this)), (ICIDM::s_cidm->vtable->GetMouseY() - UIRegion::GetScreenY0(this)), &this_1) == 0)
0046e285          return 0;
0046e285      
0046e281      return this->m_listItems.m_data[this_1];
0046e220  }

0046e28c                                      90 90 90 90                                                              ....

0046e290  void __fastcall UIElement_ListBox::Rollover(class UIElement_ListBox* this)

0046e290  {
0046e290      class UIElement_ListBox* this_1 = this;
0046e291      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046e291      
0046e29b      if (UIElementManager::s_pInstance_1 != 0)
0046e29b      {
0046e2a3          class UIElement* m_dragElement = UIElementManager::s_pInstance_1->m_dragElement;
0046e2a3          
0046e2ab          if (m_dragElement == 0)
0046e2ab          {
0046e2ad              UIElement_ListBox::EndRollover(this);
0046e2b6              return;
0046e2ab          }
0046e2ab          
0046e2be          *(uint8_t*)((char*)this_1)[3] = 0;
0046e2c3          UIElement::GetAttribute_Bool(this, 0x38, &*(uint32_t*)((char*)this_1)[3]);
0046e2ca          char eax = this->m_dragDropCallback(m_dragElement, this);
0046e2d5          int32_t ebp_1;
0046e2d5          
0046e2d5          if (eax != 0)
0046e2dd              ebp_1 = 9;
0046e2dd          
0046e2e2          if ((eax == 0 || *(uint8_t*)((char*)this_1)[3] != 0))
0046e2e4              ebp_1 = 0xa;
0046e2e4          
0046e2eb          class UIElement* eax_1 = UIElement_ListBox::GetItemUnderMouse(this);
0046e2f0          class UIElement* m_dragLastOver = this->m_dragLastOver;
0046e2f0          
0046e2fa          if (m_dragLastOver != eax_1)
0046e2fa          {
0046e2fe              if (m_dragLastOver != 0)
0046e2fe              {
0046e306                  m_dragLastOver->vtable->SetState(this->m_lastDragOverState);
0046e30f                  this->m_dragLastOver = nullptr;
0046e2fe              }
0046e2fe              
0046e31b              if (eax_1 != 0)
0046e31b              {
0046e31d                  uint32_t m_state = eax_1->m_state;
0046e31d                  
0046e325                  if (ebp_1 != m_state)
0046e325                  {
0046e327                      this->m_lastDragOverState = m_state;
0046e32d                      this->m_dragLastOver = eax_1;
0046e333                      eax_1->vtable->SetState(ebp_1);
0046e325                  }
0046e31b              }
0046e2fa          }
0046e29b      }
0046e290  }

0046e343           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0046e350  enum UIElementMessageListenResult __thiscall UIElement_ListBox::ListenToElementMessage(class UIElement_ListBox* this, struct UIElementMessageInfo const* arg2)

0046e350  {
0046e36b      if ((arg2->idMessage == 0x1c && (arg2->dwParam1 == 7 && (this->m_bitField & 2) != 0)))
0046e36b      {
0046e36d          class UIElement* eax_1 = UIElement_ListBox::GetItemUnderMouse(this);
0046e36d          
0046e374          if (eax_1 != 0)
0046e374          {
0046e37b              UIElement_ListBox::SetSelectedItem(this, eax_1, 1);
0046e37b              
0046e387              if ((this->m_bitField & 4) != 0)
0046e38b                  UIElement_ListBox::StartDragSelect(this);
0046e374          }
0046e36b      }
0046e36b      
0046e39a      return UIElement_Scrollable::ListenToElementMessage(this, arg2);
0046e350  }

0046e39d                                                                                         90 90 90                               ...

0046e3a0  void __thiscall UIElement_ListBox::MouseDown(class UIElement_ListBox* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

0046e3a0  {
0046e3b5      UIElement_Scrollable::MouseDown(this, arg2, arg3, arg4);
0046e3ba      union __inner23 = this->__inner23;
0046e3ba      
0046e3e2      if (((((int8_t)(__inner23 >> 0x13)) & 1) == 0 && ((((int8_t)(__inner23 >> 0x12)) & 1) == 0 && ((arg4 == 7 || arg4 == 0xa) && (this->m_bitField & 2) != 0))))
0046e3e2      {
0046e3e6          class UIElement* eax_1 = UIElement_ListBox::GetItemUnderMouse(this);
0046e3e6          
0046e3ed          if (eax_1 != 0)
0046e3ed          {
0046e3f4              UIElement_ListBox::SetSelectedItem(this, eax_1, 1);
0046e3f4              
0046e400              if ((this->m_bitField & 4) != 0)
0046e404                  UIElement_ListBox::StartDragSelect(this);
0046e3ed          }
0046e3e2      }
0046e3a0  }

0046e40e                                            90 90                                                                ..

0046e410  void __thiscall UIElement_ListBox::MouseMove(class UIElement_ListBox* this, int32_t arg2, int32_t arg3)

0046e410  {
0046e41f      UIElement::MouseMove(this, arg2, arg3);
0046e41f      
0046e42b      if ((this->m_bitField & 0x40) != 0)
0046e42b      {
0046e42f          class UIElement* eax = UIElement_ListBox::GetItemUnderMouse(this);
0046e42f          
0046e43e          if ((eax != 0 && eax != this->m_pSelectedItem))
0046e445              UIElement_ListBox::SetSelectedItem(this, eax, 1);
0046e42b      }
0046e42b      
0046e453      if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 1) != 0)
0046e457          UIElement_ListBox::Rollover(this);
0046e410  }


0046e460  void __fastcall UIElement_ListBox::UpdateLayout(class UIElement_ListBox* this)

0046e460  {
0046e466      uint32_t m_bitField = this->m_bitField;
0046e466      
0046e46f      if ((*(uint8_t*)((char*)m_bitField)[1] & 2) != 0)
0046e46f      {
0046e480          this->m_bitField = (m_bitField & 0xfffffdff);
0046e486          UIRegion::MakeRootDirtyHere(this);
0046e48b          uint32_t m_num = this->m_listItems.m_num;
0046e496          int32_t ebp_3 = 0;
0046e4a0          int32_t var_14 = 0;
0046e4a4          UIElement::GetAttribute_Int(this, 0x5f, &var_14);
0046e4a9          int32_t eax = var_14;
0046e4af          int32_t m_num_1;
0046e4af          
0046e4af          if (eax >= 0)
0046e4af          {
0046e4c9              m_num_1 = 1;
0046e4d1              int32_t* eax_1 = &m_num_1;
0046e4d1              
0046e4d5              if (eax >= 1)
0046e4d7                  eax_1 = &var_14;
0046e4d7              
0046e4db              int32_t eax_2 = *(uint32_t*)eax_1;
0046e4dd              var_14 = eax_2;
0046e4e3              m_num_1 = m_num;
0046e4e7              int32_t* eax_3 = &var_14;
0046e4e7              
0046e4eb              if (eax_2 >= m_num)
0046e4ed                  eax_3 = &m_num_1;
0046e4ed              
0046e4f1              int32_t m_num_3 = *(uint32_t*)eax_3;
0046e4f5              m_num_1 = m_num_3;
0046e4f9              this->m_nCols = m_num_3;
0046e4ff              int32_t eax_4;
0046e4ff              
0046e4ff              if (m_num_3 != 0)
0046e4ff              {
0046e507                  uint32_t m_num_2 = m_num;
0046e521                  ceil(0x5f);
0046e52a                  eax_4 = _ftol2();
0046e4ff              }
0046e4ff              else
0046e501                  eax_4 = 0;
0046e501              
0046e52f              this->m_nRows = eax_4;
0046e4af          }
0046e4af          else
0046e4af          {
0046e4b5              int32_t ecx_1;
0046e4b5              ecx_1 = m_num != 0;
0046e4b8              this->m_nCols = m_num;
0046e4be              this->m_nRows = ecx_1;
0046e4af          }
0046e4af          
0046e539          UIElement_ListBox::InitializeWidthHeightArray(this, 1);
0046e541          UIElement_ListBox::InitializeWidthHeightArray(this, 0);
0046e546          int32_t m_num_4 = 0;
0046e548          int32_t ebx_1 = 0;
0046e54c          m_num_1 = 0;
0046e550          int32_t var_10;
0046e550          
0046e550          if (m_num > 0)
0046e550          {
0046e5e5              do
0046e5e5              {
0046e566                  class UIRegion* edi_1 = this->m_listItems.m_data[m_num_4];
0046e566                  
0046e56b                  if (edi_1 != 0)
0046e56b                  {
0046e56f                      int32_t eax_5 = UIRegion::GetWidth(edi_1);
0046e574                      int32_t* m_data_1 = this->m_nItemWidths.m_data;
0046e57a                      int32_t edx_2 = m_data_1[ebx_1];
0046e57d                      void* ecx_5 = &m_data_1[ebx_1];
0046e580                      var_10 = eax_5;
0046e586                      void* eax_6 = &var_10;
0046e586                      
0046e58a                      if (edx_2 >= eax_5)
0046e58c                          eax_6 = ecx_5;
0046e58c                      
0046e590                      *(uint32_t*)ecx_5 = *(uint32_t*)eax_6;
0046e594                      int32_t eax_7 = UIRegion::GetHeight(edi_1);
0046e599                      int32_t* m_data_2 = this->m_nItemHeights.m_data;
0046e59f                      int32_t edx_4 = m_data_2[ebp_3];
0046e5a2                      void* ecx_7 = &m_data_2[ebp_3];
0046e5a5                      var_10 = eax_7;
0046e5ab                      void* eax_8 = &var_10;
0046e5ab                      
0046e5af                      if (edx_4 >= eax_7)
0046e5b1                          eax_8 = ecx_7;
0046e5b1                      
0046e5b5                      *(uint32_t*)ecx_7 = *(uint32_t*)eax_8;
0046e5b5                      
0046e5be                      if ((this->m_bitField & 1) == 0)
0046e5be                      {
0046e70f                          if (ebp_3 != (this->m_nRows - 1))
0046e5d5                              ebp_3 += 1;
0046e70f                          else
0046e70f                          {
0046e715                              ebp_3 = 0;
0046e717                              ebx_1 += 1;
0046e70f                          }
0046e5be                      }
0046e5be                      else if (ebx_1 != (this->m_nCols - 1))
0046e717                          ebx_1 += 1;
0046e5cd                      else
0046e5cd                      {
0046e5d3                          ebx_1 = 0;
0046e5d5                          ebp_3 += 1;
0046e5cd                      }
0046e56b                  }
0046e56b                  
0046e5de                  m_num_4 = (m_num_1 + 1);
0046e5e1                  m_num_1 = m_num_4;
0046e5e5              } while (m_num_4 < m_num);
0046e550          }
0046e550          
0046e5f4          int32_t m_nCols = this->m_nCols;
0046e5f4          
0046e5fa          if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 2) != 0)
0046e5fc              this->vtable->UpdateLayout();
0046e5fc          
0046e609          if (m_nCols == 0xffffffff)
0046e60b              m_nCols = this->m_nCols;
0046e60b          
0046e611          int32_t ebx_2 = 0;
0046e613          int32_t edi_2 = 0;
0046e613          
0046e617          if (m_nCols > 0)
0046e617          {
0046e619              int32_t* m_data = this->m_nItemWidths.m_data;
0046e626              int32_t i;
0046e626              
0046e626              do
0046e626              {
0046e620                  edi_2 += *(uint32_t*)m_data;
0046e622                  m_data = &m_data[1];
0046e625                  i = m_nCols;
0046e625                  m_nCols -= 1;
0046e626              } while (i != 1);
0046e617          }
0046e617          
0046e631          int32_t m_nRows = this->m_nRows;
0046e631          
0046e637          if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 2) != 0)
0046e639              this->vtable->UpdateLayout();
0046e639          
0046e646          if (m_nRows == 0xffffffff)
0046e648              m_nRows = this->m_nRows;
0046e648          
0046e64e          int32_t eax_15 = 0;
0046e64e          
0046e652          if (m_nRows > 0)
0046e652          {
0046e654              int32_t* m_data_3 = this->m_nItemHeights.m_data;
0046e65a              ebx_2 = 0;
0046e666              int32_t i_1;
0046e666              
0046e666              do
0046e666              {
0046e660                  eax_15 += *(uint32_t*)m_data_3;
0046e662                  m_data_3 = &m_data_3[1];
0046e665                  i_1 = m_nRows;
0046e665                  m_nRows -= 1;
0046e666              } while (i_1 != 1);
0046e652          }
0046e652          
0046e66c          UIElement_Scrollable::ResizeScrollableArea(this, edi_2, eax_15);
0046e66c          /* unimplemented  {call UIElement_Scrollable::ResizeScrollableArea} */;
0046e681          int32_t m_num_5 = 0;
0046e683          int32_t ebp_5 = -(this->m_iScrollableX);
0046e685          int32_t edi_4 = -(this->m_iScrollableY);
0046e689          var_10 = 0;
0046e68d          m_num_1 = 0;
0046e68d          
0046e691          if (m_num > 0)
0046e691          {
0046e6fc              do
0046e6fc              {
0046e699                  int32_t* ecx_14 = this->m_listItems.m_data[m_num_5];
0046e699                  
0046e6a2                  if ((ecx_14 != 0 && *(uint32_t*)(*(uint32_t*)ecx_14 + 0xa0)() == this))
0046e6a2                  {
0046e6b8                      *(uint32_t*)(*(uint32_t*)ecx_14 + 0x2c)(ebp_5, edi_4);
0046e6b8                      
0046e6c2                      if ((this->m_bitField & 1) != 0)
0046e6c2                      {
0046e6ca                          int32_t eax_18 = var_10;
0046e6ca                          
0046e6d1                          if (eax_18 != (this->m_nCols - 1))
0046e6d1                          {
0046e723                              ebp_5 += this->m_nItemWidths.m_data[eax_18];
0046e727                              var_10 = (eax_18 + 1);
0046e6d1                          }
0046e6d1                          else
0046e6d1                          {
0046e6d9                              ebp_5 = -(this->m_iScrollableX);
0046e6db                              var_10 = 0;
0046e6e9                              edi_4 += this->m_nItemHeights.m_data[ebx_2];
0046e6ec                              ebx_2 += 1;
0046e6d1                          }
0046e6c2                      }
0046e6c2                      else if (ebx_2 != (this->m_nRows - 1))
0046e736                      {
0046e6e9                          edi_4 += this->m_nItemHeights.m_data[ebx_2];
0046e6ec                          ebx_2 += 1;
0046e736                      }
0046e736                      else
0046e736                      {
0046e738                          int32_t eax_21 = var_10;
0046e74b                          edi_4 = -(this->m_iScrollableY);
0046e74d                          ebp_5 += this->m_nItemWidths.m_data[eax_21];
0046e74f                          ebx_2 = 0;
0046e752                          var_10 = (eax_21 + 1);
0046e736                      }
0046e6a2                  }
0046e6a2                  
0046e6f5                  m_num_5 = (m_num_1 + 1);
0046e6f8                  m_num_1 = m_num_5;
0046e6fc              } while (m_num_5 < m_num);
0046e691          }
0046e46f      }
0046e460  }

0046e558                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0046e758                                                                          90 90 90 90 90 90 90 90                          ........

0046e760  uint8_t __thiscall UIElement_ListBox::InsertItem(class UIElement_ListBox* this, class UIElement* arg2, int32_t arg3)

0046e760  {
0046e762      class UIElement* i = arg2;
0046e762      
0046e76a      if (i == 0)
0046e76a      {
0046e7d3          int32_t eax;
0046e7d3          eax = 0;
0046e7d6          return 0;
0046e76a      }
0046e76a      
0046e76c      i->vtable->SetParent(this);
0046e775      uint32_t m_num = this->m_listItems.m_num;
0046e781      int32_t eax_2 = 0;
0046e781      
0046e785      if (m_num > 0)
0046e785      {
0046e787          int32_t* m_data = this->m_listItems.m_data;
0046e787          
0046e792          while (*(uint32_t*)m_data != i)
0046e792          {
0046e794              eax_2 += 1;
0046e795              m_data = &m_data[1];
0046e795              
0046e79a              if (eax_2 >= m_num)
0046e79a                  goto label_46e7ad;
0046e792          }
0046e785      }
0046e785      
0046e7a1      if ((m_num <= 0 || eax_2 == 0xffffffff))
0046e7a1      {
0046e7ad      label_46e7ad:
0046e7ad          SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&this->m_listItems, &arg2, arg3);
0046e7bf          this->m_bitField |= 0x200;
0046e7c5          UIRegion::MakeRootDirtyHere(this);
0046e7a1      }
0046e7a1      
0046e7cc      eax_2 = 1;
0046e7cf      return 1;
0046e760  }

0046e7d9                                                                             90 90 90 90 90 90 90                           .......

0046e7e0  int32_t __thiscall UIElement_ListBox::CalculateColumn(class UIElement_ListBox const* this, int32_t arg2)

0046e7e0  {
0046e7e4      int32_t m_nRows_1 = this->m_nRows;
0046e7ec      int32_t m_nCols_1;
0046e7ec      
0046e7ec      if (m_nRows_1 > 0)
0046e7ee          m_nCols_1 = this->m_nCols;
0046e7ee      
0046e7f6      if ((m_nRows_1 <= 0 || m_nCols_1 <= 0))
0046e7f6      {
0046e822          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0046e827          arg2 = PStringBase<char>::s_NullBuffer_1;
0046e82f          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0046e847          uint32_t m_num = this->m_listItems.m_num;
0046e848          int32_t m_nCols = this->m_nCols;
0046e849          int32_t m_nRows = this->m_nRows;
0046e854          PStringBase<char>::sprintf(&arg2, "The number of calculated rows [%…");
0046e85d          int32_t* esi_2 = (arg2 - 0x14);
0046e85d          
0046e873          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0046e87b              **(uint32_t**)esi_2(1);
0046e7f6      }
0046e7f6      else
0046e7f6      {
0046e7f8          int32_t eax = arg2;
0046e7f8          
0046e806          if ((eax >= 0 && eax < this->m_listItems.m_num))
0046e806          {
0046e80f              int32_t eax_1;
0046e80f              int32_t edx_1;
0046e80f              edx_1 = HIGHD(((int64_t)eax));
0046e80f              eax_1 = LOWD(((int64_t)eax));
0046e80f              
0046e810              if ((this->m_bitField & 1) == 0)
0046e81f                  return (COMBINE(edx_1, eax_1) / m_nRows_1);
0046e81f              
0046e818              return (COMBINE(edx_1, eax_1) % m_nCols_1);
0046e806          }
0046e7f6      }
0046e7f6      
0046e882      return 0xffffffff;
0046e7e0  }

0046e885                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0046e890  int32_t __thiscall UIElement_ListBox::CalculateRow(class UIElement_ListBox const* this, int32_t arg2)

0046e890  {
0046e894      int32_t m_nRows_1 = this->m_nRows;
0046e89c      int32_t m_nCols_1;
0046e89c      
0046e89c      if (m_nRows_1 > 0)
0046e89e          m_nCols_1 = this->m_nCols;
0046e89e      
0046e8a6      if ((m_nRows_1 <= 0 || m_nCols_1 <= 0))
0046e8a6      {
0046e8d2          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0046e8d7          arg2 = PStringBase<char>::s_NullBuffer_1;
0046e8df          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0046e8f7          uint32_t m_num = this->m_listItems.m_num;
0046e8f8          int32_t m_nCols = this->m_nCols;
0046e8f9          int32_t m_nRows = this->m_nRows;
0046e904          PStringBase<char>::sprintf(&arg2, "The number of calculated rows [%…");
0046e90d          int32_t* esi_2 = (arg2 - 0x14);
0046e90d          
0046e923          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0046e92b              **(uint32_t**)esi_2(1);
0046e8a6      }
0046e8a6      else
0046e8a6      {
0046e8a8          int32_t eax = arg2;
0046e8a8          
0046e8b6          if ((eax >= 0 && eax < this->m_listItems.m_num))
0046e8b6          {
0046e8bf              int32_t eax_1;
0046e8bf              int32_t edx_1;
0046e8bf              edx_1 = HIGHD(((int64_t)eax));
0046e8bf              eax_1 = LOWD(((int64_t)eax));
0046e8bf              
0046e8c0              if ((this->m_bitField & 1) == 0)
0046e8cf                  return (COMBINE(edx_1, eax_1) % m_nRows_1);
0046e8cf              
0046e8c6              return (COMBINE(edx_1, eax_1) / m_nCols_1);
0046e8b6          }
0046e8a6      }
0046e8a6      
0046e932      return 0xffffffff;
0046e890  }

0046e935                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0046e940  void __thiscall UIElement_ListBox::ScrollToShow(class UIElement_ListBox* this, int32_t arg2)

0046e940  {
0046e956      if ((arg2 >= 0 && arg2 < this->m_listItems.m_num))
0046e956      {
0046e95c          this->vtable->UpdateLayout();
0046e971          int32_t i_3 = UIElement_ListBox::CalculateColumn(this, arg2);
0046e973          int32_t i_4 = UIElement_ListBox::CalculateRow(this, arg2);
0046e973          
0046e982          if ((i_3 != 0xffffffff && i_4 != 0xffffffff))
0046e982          {
0046e98d              if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 2) != 0)
0046e98f                  this->vtable->UpdateLayout();
0046e98f              
0046e999              int32_t ebx_1 = 0;
0046e999              
0046e99d              if (i_3 > 0)
0046e99d              {
0046e99f                  int32_t* m_data = this->m_nItemWidths.m_data;
0046e9ab                  int32_t i;
0046e9ab                  
0046e9ab                  do
0046e9ab                  {
0046e9a5                      ebx_1 += *(uint32_t*)m_data;
0046e9a7                      m_data = &m_data[1];
0046e9aa                      i = i_3;
0046e9aa                      i_3 -= 1;
0046e9ab                  } while (i != 1);
0046e99d              }
0046e99d              
0046e9b6              if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 2) != 0)
0046e9b8                  this->vtable->UpdateLayout();
0046e9b8              
0046e9c2              int32_t eax_6 = 0;
0046e9c2              
0046e9c6              if (i_4 > 0)
0046e9c6              {
0046e9c8                  int32_t* m_data_1 = this->m_nItemHeights.m_data;
0046e9ce                  int32_t i_2 = i_4;
0046e9d6                  int32_t i_1;
0046e9d6                  
0046e9d6                  do
0046e9d6                  {
0046e9d0                      eax_6 += *(uint32_t*)m_data_1;
0046e9d2                      m_data_1 = &m_data_1[1];
0046e9d5                      i_1 = i_2;
0046e9d5                      i_2 -= 1;
0046e9d6                  } while (i_1 != 1);
0046e9c6              }
0046e9c6              
0046e9de              UIElement_Scrollable::SetScrollableXY(this, ebx_1, eax_6, 0);
0046e982          }
0046e956      }
0046e940  }

0046e9ea                                90 90 90 90 90 90                                                            ......

0046e9f0  void __thiscall UIElement_ListBox::ScrollToView(class UIElement_ListBox* this, int32_t arg2)

0046e9f0  {
0046ea09      if ((arg2 >= 0 && arg2 < this->m_listItems.m_num))
0046ea09      {
0046ea0f          this->vtable->UpdateLayout();
0046ea24          int32_t i_3 = UIElement_ListBox::CalculateColumn(this, arg2);
0046ea26          int32_t i_4 = UIElement_ListBox::CalculateRow(this, arg2);
0046ea26          
0046ea39          if ((i_3 != 0xffffffff && i_4 != 0xffffffff))
0046ea39          {
0046ea48              if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 2) != 0)
0046ea4a                  this->vtable->UpdateLayout();
0046ea4a              
0046ea54              int32_t ebx_1 = 0;
0046ea54              
0046ea58              if (i_3 > 0)
0046ea58              {
0046ea5a                  int32_t* m_data = this->m_nItemWidths.m_data;
0046ea66                  int32_t i;
0046ea66                  
0046ea66                  do
0046ea66                  {
0046ea60                      ebx_1 += *(uint32_t*)m_data;
0046ea62                      m_data = &m_data[1];
0046ea65                      i = i_3;
0046ea65                      i_3 -= 1;
0046ea66                  } while (i != 1);
0046ea58              }
0046ea58              
0046ea71              if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 2) != 0)
0046ea73                  this->vtable->UpdateLayout();
0046ea73              
0046ea7d              int32_t edi_1 = 0;
0046ea7d              
0046ea81              if (i_4 > 0)
0046ea81              {
0046ea83                  int32_t* m_data_1 = this->m_nItemHeights.m_data;
0046ea89                  int32_t i_2 = i_4;
0046ea96                  int32_t i_1;
0046ea96                  
0046ea96                  do
0046ea96                  {
0046ea90                      edi_1 += *(uint32_t*)m_data_1;
0046ea92                      m_data_1 = &m_data_1[1];
0046ea95                      i_1 = i_2;
0046ea95                      i_2 -= 1;
0046ea96                  } while (i_1 != 1);
0046ea81              }
0046ea81              
0046ea98              int32_t m_iScrollableY = this->m_iScrollableY;
0046ea9e              int32_t m_iScrollableX = this->m_iScrollableX;
0046eaae              int32_t eax_6 = UIRegion::GetWidth(this);
0046eac2              int32_t edx_2 = UIRegion::GetHeight(this);
0046eae2              int32_t var_1c_1 = 0;
0046eaea              class UIElement* eax_11 = UIElement_ListBox::GetItem(this, arg2);
0046eaf3              int32_t eax_13;
0046eaf3              
0046eaf3              if (eax_11 == 0)
0046eb0d                  eax_13 = 0;
0046eaf3              else
0046eaf3              {
0046eafe                  var_1c_1 = UIRegion::GetWidth(eax_11);
0046eb02                  eax_13 = UIRegion::GetHeight(eax_11);
0046eaf3              }
0046eaf3              
0046eb1b              if ((ebx_1 < m_iScrollableX || edi_1 < m_iScrollableY))
0046eb47                  UIElement_Scrollable::SetScrollableXY(this, ebx_1, edi_1, 0);
0046eb1b              else if (ebx_1 > ((eax_6 + m_iScrollableX) - var_1c_1))
0046eb47                  UIElement_Scrollable::SetScrollableXY(this, ((ebx_1 - eax_6) + var_1c_1), edi_1, 0);
0046eb29              else if (edi_1 > ((edx_2 + m_iScrollableY) - eax_13))
0046eb47                  UIElement_Scrollable::SetScrollableXY(this, ebx_1, ((edi_1 - edx_2) + eax_13), 0);
0046ea39          }
0046ea09      }
0046e9f0  }

0046ea8d                                         8d 49 00                                                               .I.
0046eb56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046eb60  void __thiscall UIElement_ListBox::ScrollToShow(class UIElement_ListBox* this, class UIElement* arg2)

0046eb60  {
0046eb68      if (this->m_listItems.m_num == 0)
0046eb9c          return;
0046eb9c      
0046eb6b      uint32_t m_num = this->m_listItems.m_num;
0046eb71      class UIElement* eax = nullptr;
0046eb71      
0046eb76      if (m_num > 0)
0046eb76      {
0046eb78          class UIElement** m_data = this->m_listItems.m_data;
0046eb78          
0046eb8c          do
0046eb8c          {
0046eb84              if (*(uint32_t*)m_data == arg2)
0046eb84                  goto label_46eb97;
0046eb84              
0046eb86              eax = (&eax->vtable + 1);
0046eb87              m_data = &m_data[1];
0046eb8c          } while (eax < m_num);
0046eb76      }
0046eb76      
0046eb8e      eax = 0xffffffff;
0046eb97  label_46eb97:
0046eb97      /* tailcall */
0046eb97      return UIElement_ListBox::ScrollToShow(this, eax);
0046eb60  }

0046eb9f                                                                                               90                                 .

0046eba0  void __thiscall UIElement_ListBox::SetSelectedIndex(class UIElement_ListBox* this, uint32_t arg2, uint8_t arg3)

0046eba0  {
0046ebb0      if (arg2 >= this->m_listItems.m_num)
0046ebb0      {
0046ebe7          UIElement_ListBox::SetSelectedItem(this, nullptr, arg3);
0046ebee          return;
0046ebb0      }
0046ebb0      
0046ebc3      UIElement_ListBox::SetSelectedItem(this, this->m_listItems.m_data[arg2], arg3);
0046ebd4      UIElement_ListBox::ScrollToShow(this, this->m_listItems.m_data[arg2]);
0046eba0  }

0046ebf1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0046ec00  uint8_t __thiscall UIElement_ListBox::InsertItem(class UIElement_ListBox* this, class UIElement* arg2, class UIElement* arg3)

0046ec00  {
0046ec10      if ((arg2 == 0 || arg3 == 0))
0046ec10      {
0046ec42          int32_t eax;
0046ec42          eax = 0;
0046ec45          return 0;
0046ec10      }
0046ec10      
0046ec13      uint32_t m_num = this->m_listItems.m_num;
0046ec19      int32_t eax_1 = 0;
0046ec19      
0046ec1d      if (m_num > 0)
0046ec1d      {
0046ec1f          int32_t* m_data = this->m_listItems.m_data;
0046ec1f          
0046ec2f          do
0046ec2f          {
0046ec27              if (*(uint32_t*)m_data == arg3)
0046ec3e                  return UIElement_ListBox::InsertItem(this, arg2, eax_1);
0046ec3e              
0046ec29              eax_1 += 1;
0046ec2a              m_data = &m_data[1];
0046ec2f          } while (eax_1 < m_num);
0046ec1d      }
0046ec1d      
0046ec3e      return UIElement_ListBox::InsertItem(this, arg2, 0xffffffff);
0046ec00  }

0046ec48                          90 90 90 90 90 90 90 90                                                          ........

0046ec50  uint8_t const __thiscall UIElement_ListBox::StartActive(class UIElement_ListBox* this, int32_t const* arg2)

0046ec50  {
0046ec54      uint32_t m_num_1 = this->m_listItems.m_num;
0046ec5a      int32_t eax = 0;
0046ec5a      
0046ec5e      if (m_num_1 <= 0)
0046ec5e      {
0046ec7c      label_46ec7c:
0046ec7c          eax = 0xffffffff;
0046ec5e      }
0046ec5e      else
0046ec5e      {
0046ec66          int32_t* m_data = this->m_listItems.m_data;
0046ec66          
0046ec72          while (*(uint32_t*)m_data != this->m_pSelectedItem)
0046ec72          {
0046ec74              eax += 1;
0046ec75              m_data = &m_data[1];
0046ec75              
0046ec7a              if (eax >= m_num_1)
0046ec7a                  goto label_46ec7c;
0046ec72          }
0046ec5e      }
0046ec5e      
0046ec83      int32_t const esi_2 = *(uint32_t*)arg2;
0046ec85      int32_t esi_3 = (esi_2 + eax);
0046ec85      
0046ec87      if ((esi_2 + eax) < 0)
0046ec8f          esi_3 = (this->m_listItems.m_num - 1);
0046ec8f      
0046ec90      uint32_t m_num = this->m_listItems.m_num;
0046ec96      bool cond:0 = esi_3 >= m_num;
0046ec96      
0046ec98      if (esi_3 >= m_num)
0046ec98      {
0046ec9a          esi_3 = 0;
0046ec9c          cond:0 = 0 >= m_num;
0046ec98      }
0046ec98      
0046eca2      if (cond:0)
0046eca2      {
0046eccd          UIElement_ListBox::SetSelectedItem(this, nullptr, 1);
0046ecd4          int32_t eax_3;
0046ecd4          eax_3 = 1;
0046ecd6          return 1;
0046eca2      }
0046eca2      
0046ecae      UIElement_ListBox::SetSelectedItem(this, this->m_listItems.m_data[esi_3], 1);
0046ecbf      UIElement_ListBox::ScrollToShow(this, this->m_listItems.m_data[esi_3]);
0046ecc6      int32_t eax_2;
0046ecc6      eax_2 = 1;
0046ecc8      return 1;
0046ec50  }

0046ecd9                                                                             90 90 90 90 90 90 90                           .......

0046ece0  void __thiscall UIElement_ListBox::SetSelectedItemByID(class UIElement_ListBox* this, uint32_t arg2, uint8_t arg3)

0046ece0  {
0046ece6      uint32_t m_num = this->m_listItems.m_num;
0046ecec      int32_t esi = 0;
0046ecec      
0046ecf0      if (m_num > 0)
0046ecf0      {
0046ecf2          class UIElement** m_data = this->m_listItems.m_data;
0046ecfc          class UIElement** m_data_1 = m_data;
0046ecfc          
0046ed10          do
0046ed10          {
0046ed08              if (*(uint32_t*)m_data_1->m_desc.m_elementID == arg2)
0046ed08              {
0046ed29                  if (esi >= m_num)
0046ed29                  {
0046ed5c                      UIElement_ListBox::SetSelectedItem(this, nullptr, arg3);
0046ed65                      return;
0046ed29                  }
0046ed29                  
0046ed36                  UIElement_ListBox::SetSelectedItem(this, m_data[esi], arg3);
0046ed47                  UIElement_ListBox::ScrollToShow(this, this->m_listItems.m_data[esi]);
0046ed50                  return;
0046ed08              }
0046ed08              
0046ed0a              esi += 1;
0046ed0b              m_data_1 = &m_data_1[1];
0046ed10          } while (esi < m_num);
0046ecf0      }
0046ecf0      
0046ed1b      UIElement_ListBox::SetSelectedItem(this, nullptr, arg3);
0046ece0  }

0046ed68                          90 90 90 90 90 90 90 90                                                          ........

0046ed70  uint8_t __thiscall UIElement_ListBox::AddItem(class UIElement_ListBox* this, class UIElement* arg2)

0046ed70  {
0046ed73      class UIElement* ecx = arg2;
0046ed73      
0046ed79      if (ecx == 0)
0046ed79      {
0046edb3          int32_t eax;
0046edb3          eax = 0;
0046edb6          return 0;
0046ed79      }
0046ed79      
0046ed7b      ecx->vtable->SetParent(this);
0046ed7b      
0046ed93      if (SmartArray<unsigned long,1>::add_unique(&this->m_listItems.m_data, &arg2) != 0)
0046ed93      {
0046eda2          this->m_bitField |= 0x200;
0046eda8          UIRegion::MakeRootDirtyHere(this);
0046ed93      }
0046ed93      
0046edb0      return 1;
0046ed70  }

0046edb9                                                                             90 90 90 90 90 90 90                           .......

0046edc0  class UIElement* __thiscall UIElement_ListBox::AddItem(class UIElement_ListBox* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, class UIElement* arg4)

0046edc0  {
0046edc1      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0046edc1      
0046edcf      if (UIElementManager::s_pInstance_1 == 0)
0046ee1b          return nullptr;
0046ee1b      
0046edde      class UIElement* result = UIElementManager::CreateChildElementByDid(UIElementManager::s_pInstance_1, this, arg2, arg3);
0046edde      
0046ede7      if (result != 0)
0046ede7      {
0046edf1          uint8_t eax_3;
0046edf1          
0046edf1          if (arg4 == 0)
0046edfd              eax_3 = UIElement_ListBox::AddItem(this, result);
0046edf1          else
0046edf5              eax_3 = UIElement_ListBox::InsertItem(this, result, arg4);
0046edf5          
0046ee04          if (eax_3 == 0)
0046ee04          {
0046ee09              UIElementManager::AddElementToDeleteQueue(UIElementManager::s_pInstance_1, result);
0046ee13              return 0;
0046ee04          }
0046ede7      }
0046ede7      
0046ee16      return result;
0046edc0  }

0046ee1e                                                                                            90 90                                ..

0046ee20  uint8_t __fastcall UIElement_ListBox::StartUpActive(class UIElement_ListBox* this)

0046ee20  {
0046ee20      class UIElement_ListBox* this_1 = this;
0046ee20      
0046ee28      if ((this->m_bitField & 1) != 0)
0046ee28      {
0046ee37          this_1 = -(this->m_nCols);
0046ee41          return UIElement_ListBox::StartActive(this, &this_1);
0046ee28      }
0046ee28      
0046ee47      this_1 = 0xffffffff;
0046ee55      return UIElement_ListBox::StartActive(this, &this_1);
0046ee20  }

0046ee56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046ee60  uint8_t __fastcall UIElement_ListBox::StartDownActive(class UIElement_ListBox* this)

0046ee60  {
0046ee60      class UIElement_ListBox* var_4 = this;
0046ee67      int32_t m_nCols = 1;
0046ee67      
0046ee6e      if ((1 & this->m_bitField) != 0)
0046ee70          m_nCols = this->m_nCols;
0046ee70      
0046ee7b      var_4 = m_nCols;
0046ee85      return UIElement_ListBox::StartActive(this, &var_4);
0046ee60  }

0046ee86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046ee90  uint8_t __fastcall UIElement_ListBox::StartLeftActive(class UIElement_ListBox* this)

0046ee90  {
0046ee90      class UIElement_ListBox* this_1 = this;
0046ee90      
0046ee98      if ((this->m_bitField & 1) != 0)
0046ee98      {
0046ee9f          this_1 = 0xffffffff;
0046eead          return UIElement_ListBox::StartActive(this, &this_1);
0046ee98      }
0046ee98      
0046eebb      this_1 = -(this->m_nRows);
0046eec5      return UIElement_ListBox::StartActive(this, &this_1);
0046ee90  }

0046eec6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046eed0  uint8_t __fastcall UIElement_ListBox::StartRightActive(class UIElement_ListBox* this)

0046eed0  {
0046eed0      class UIElement_ListBox* var_4 = this;
0046eed7      int32_t m_nRows = 1;
0046eed7      
0046eede      if ((1 & this->m_bitField) == 0)
0046eee0          m_nRows = this->m_nRows;
0046eee0      
0046eeeb      var_4 = m_nRows;
0046eef5      return UIElement_ListBox::StartActive(this, &var_4);
0046eed0  }

0046eef6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0046ef00  class UIElement* __thiscall UIElement_ListBox::AddItemFromTemplateListByID(class UIElement_ListBox* this, uint32_t arg2, class UIElement* arg3)

0046ef00  {
0046ef09      class UIElement* result_1;
0046ef09      class UIElement* result = result_1;
0046ef0a      int32_t esi;
0046ef0a      int32_t var_44 = esi;
0046ef0b      int32_t edi;
0046ef0b      int32_t var_48 = edi;
0046ef0e      struct UIElement_ListBox::VTable* vtable = this->vtable;
0046ef1b      uint32_t var_38 = 0;
0046ef1f      int32_t* var_28 = nullptr;
0046ef23      int32_t var_24 = 0;
0046ef2f      int32_t* var_2c;
0046ef2f      int32_t* ecx_1 = var_2c;
0046ef2f      
0046ef33      if (vtable->InqProperty(0x64, &var_28) != 0)
0046ef33      {
0046ef3b          int32_t var_3c = 0;
0046ef3b          
0046ef3f          if (ecx_1 != 0)
0046ef3f          {
0046ef48              *(uint32_t*)(*(uint32_t*)ecx_1 + 0xf0)(&var_3c);
0046ef4e              ecx_1 = var_2c;
0046ef3f          }
0046ef3f          
0046ef56          int32_t esi_1 = 0;
0046ef56          
0046ef5a          if (var_3c > 0)
0046ef5a          {
0046f0e0              do
0046f0e0              {
0046ef62                  var_28 = nullptr;
0046ef66                  int32_t* var_24_1 = nullptr;
0046ef66                  
0046ef6a                  if (ecx_1 != 0)
0046ef6a                  {
0046ef80                      if (*(uint32_t*)(*(uint32_t*)ecx_1 + 0xf4)(esi_1, &var_28) != 0)
0046ef80                      {
0046ef8c                          int32_t* var_18 = nullptr;
0046ef90                          int32_t* var_14_1 = nullptr;
0046ef94                          int32_t* var_20 = nullptr;
0046ef98                          int32_t* var_1c_1 = nullptr;
0046ef98                          
0046ef9c                          if (var_24_1 != 0)
0046ef9c                          {
0046efbb                              class IDClass<_tagDataID,32,0> var_34;
0046efbb                              
0046efbb                              if (((((*(uint32_t*)(*(uint32_t*)var_24_1 + 0x118)(0x63, &var_18) != 0 && var_24_1 != 0) && (*(uint32_t*)(*(uint32_t*)var_24_1 + 0x118)(0x62, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0xb0)(&var_34) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0xa8)(&var_38) != 0))
0046efbb                              {
0046f002                                  uint32_t eax_7 = var_38;
0046f002                                  
0046f009                                  if (eax_7 == arg2)
0046f009                                  {
0046f0fd                                      result = UIElement_ListBox::AddItem(this, var_34, eax_7, arg3);
0046f101                                      BaseProperty::~BaseProperty(&var_20);
0046f10a                                      BaseProperty::~BaseProperty(&var_18);
0046f113                                      BaseProperty::~BaseProperty(&var_28);
0046f118                                      ecx_1 = var_2c;
0046f118                                      break;
0046f009                                  }
0046efbb                              }
0046efbb                              
0046f00f                              int32_t* eax_8 = var_20;
0046f00f                              
0046f015                              if (eax_8 != 0)
0046f015                              {
0046f01f                                  int32_t edx_8 = (eax_8[1] - 1);
0046f01c                                  eax_8[1] = edx_8;
0046f01c                                  
0046f024                                  if (edx_8 == 0)
0046f02a                                      **(uint32_t**)eax_8(1);
0046f02a                                  
0046f02c                                  var_20 = nullptr;
0046f015                              }
0046f015                              
0046f036                              if (var_1c_1 != 0)
0046f036                              {
0046f040                                  int32_t edx_11 = (var_1c_1[1] - 1);
0046f03d                                  var_1c_1[1] = edx_11;
0046f03d                                  
0046f045                                  if (edx_11 == 0)
0046f04b                                      **(uint32_t**)var_1c_1(1);
0046f04b                                  
0046f04d                                  int32_t var_1c_2 = 0;
0046f036                              }
0046f036                              
0046f051                              int32_t* eax_13 = var_18;
0046f051                              
0046f057                              if (eax_13 != 0)
0046f057                              {
0046f061                                  int32_t edx_13 = (eax_13[1] - 1);
0046f05e                                  eax_13[1] = edx_13;
0046f05e                                  
0046f066                                  if (edx_13 == 0)
0046f06c                                      **(uint32_t**)eax_13(1);
0046f06c                                  
0046f06e                                  var_18 = nullptr;
0046f057                              }
0046f057                              
0046f078                              if (var_14_1 != 0)
0046f078                              {
0046f082                                  int32_t edx_16 = (var_14_1[1] - 1);
0046f07f                                  var_14_1[1] = edx_16;
0046f07f                                  
0046f087                                  if (edx_16 == 0)
0046f08d                                      **(uint32_t**)var_14_1(1);
0046f08d                                  
0046f08f                                  int32_t var_14_2 = 0;
0046f078                              }
0046ef9c                          }
0046ef80                      }
0046ef80                      
0046f093                      int32_t* eax_18 = var_28;
0046f093                      
0046f099                      if (eax_18 != 0)
0046f099                      {
0046f0a3                          int32_t edx_18 = (eax_18[1] - 1);
0046f0a0                          eax_18[1] = edx_18;
0046f0a0                          
0046f0a8                          if (edx_18 == 0)
0046f0ae                              **(uint32_t**)eax_18(1);
0046f0ae                          
0046f0b0                          var_28 = nullptr;
0046f099                      }
0046f099                      
0046f0ba                      if (var_24_1 != 0)
0046f0ba                      {
0046f0c4                          int32_t edx_21 = (var_24_1[1] - 1);
0046f0c1                          var_24_1[1] = edx_21;
0046f0c1                          
0046f0c9                          if (edx_21 == 0)
0046f0cf                              **(uint32_t**)var_24_1(1);
0046f0cf                          
0046f0d1                          int32_t var_24_2 = 0;
0046f0ba                      }
0046f0ba                      
0046f0d5                      ecx_1 = var_2c;
0046ef6a                  }
0046ef6a                  
0046f0dd                  esi_1 += 1;
0046f0e0              } while (esi_1 < var_3c);
0046ef5a          }
0046ef33      }
0046ef33      
0046f122      int32_t* var_30;
0046f122      
0046f122      if (var_30 != 0)
0046f122      {
0046f12c          int32_t esi_3 = (var_30[1] - 1);
0046f129          var_30[1] = esi_3;
0046f129          
0046f133          if (esi_3 == 0)
0046f139              **(uint32_t**)var_30(1);
0046f139          
0046f13b          ecx_1 = var_2c;
0046f13f          int32_t var_30_1 = 0;
0046f122      }
0046f122      
0046f145      if (ecx_1 != 0)
0046f145      {
0046f14d          int32_t esi_5 = (ecx_1[1] - 1);
0046f14a          ecx_1[1] = esi_5;
0046f14a          
0046f154          if (esi_5 == 0)
0046f15a              **(uint32_t**)ecx_1(1);
0046f145      }
0046f145      
0046f166      return result;
0046ef00  }

0046f169                             90 90 90 90 90 90 90                                                           .......

0046f170  class UIElement* __thiscall UIElement_ListBox::AddItem(class UIElement_ListBox* this, class BaseProperty const* arg2, class UIElement* arg3)

0046f170  {
0046f176      class BaseProperty* esi = arg2;
0046f17f      class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
0046f182      class UIElement* result = nullptr;
0046f186      int32_t* var_8 = nullptr;
0046f18a      int32_t* var_4 = nullptr;
0046f18e      int32_t* var_10 = nullptr;
0046f192      int32_t* var_c = nullptr;
0046f192      
0046f196      if (m_pcPropertyValue != 0)
0046f196      {
0046f1ad          int32_t* ecx_1;
0046f1ad          
0046f1ad          if (m_pcPropertyValue->vtable->InqStructElement(0x63, &var_8) == 0)
0046f213              ecx_1 = var_c;
0046f1ad          else
0046f1ad          {
0046f1af              class BasePropertyValue* m_pcPropertyValue_1 = esi->m_pcPropertyValue;
0046f1af              
0046f1b4              if (m_pcPropertyValue_1 == 0)
0046f213                  ecx_1 = var_c;
0046f1b4              else
0046f1b4              {
0046f1cf                  class IDClass<_tagDataID,32,0> var_14;
0046f1cf                  
0046f1cf                  if ((m_pcPropertyValue_1->vtable->InqStructElement(0x62, &var_10) == 0 || var_4 == 0))
0046f213                      ecx_1 = var_c;
0046f1cf                  else if (*(uint32_t*)(*(uint32_t*)var_4 + 0xb0)(&var_14) == 0)
0046f213                      ecx_1 = var_c;
0046f1e0                  else
0046f1e0                  {
0046f1e2                      ecx_1 = var_c;
0046f1e2                      
0046f1e8                      if (ecx_1 != 0)
0046f1e8                      {
0046f1f9                          if (*(uint32_t*)(*(uint32_t*)ecx_1 + 0xa8)(&arg2) != 0)
0046f211                              result = UIElement_ListBox::AddItem(this, var_14, arg2, arg3);
0046f211                          
0046f213                          ecx_1 = var_c;
0046f1e8                      }
0046f1e0                  }
0046f1b4              }
0046f1ad          }
0046f1ad          
0046f217          int32_t* eax_11 = var_10;
0046f217          
0046f21d          if (eax_11 != 0)
0046f21d          {
0046f227              int32_t esi_2 = (eax_11[1] - 1);
0046f224              eax_11[1] = esi_2;
0046f224              
0046f22e              if (esi_2 == 0)
0046f234                  **(uint32_t**)eax_11(1);
0046f234              
0046f236              ecx_1 = var_c;
0046f23a              var_10 = nullptr;
0046f21d          }
0046f21d          
0046f240          if (ecx_1 != 0)
0046f240          {
0046f248              int32_t esi_4 = (ecx_1[1] - 1);
0046f245              ecx_1[1] = esi_4;
0046f245              
0046f24f              if (esi_4 == 0)
0046f255                  **(uint32_t**)ecx_1(1);
0046f255              
0046f257              int32_t var_c_1 = 0;
0046f240          }
0046f240          
0046f25b          int32_t* eax_15 = var_8;
0046f25b          
0046f261          if (eax_15 != 0)
0046f261          {
0046f26b              int32_t esi_6 = (eax_15[1] - 1);
0046f268              eax_15[1] = esi_6;
0046f268              
0046f272              if (esi_6 == 0)
0046f278                  **(uint32_t**)eax_15(1);
0046f278              
0046f27a              var_8 = nullptr;
0046f261          }
0046f261          
0046f284          if (var_4 != 0)
0046f284          {
0046f28e              int32_t esi_8 = (var_4[1] - 1);
0046f28b              var_4[1] = esi_8;
0046f28b              
0046f295              if (esi_8 == 0)
0046f29b                  **(uint32_t**)var_4(1);
0046f284          }
0046f196      }
0046f196      
0046f2a6      return result;
0046f170  }

0046f2a9                             90 90 90 90 90 90 90                                                           .......

0046f2b0  class UIElement* __thiscall UIElement_ListBox::AddItemFromTemplateList(class UIElement_ListBox* this, uint32_t arg2, class UIElement* arg3)

0046f2b0  {
0046f2c5      class UIElement* result = nullptr;
0046f2c7      int32_t* var_10 = nullptr;
0046f2cb      int32_t* var_c = nullptr;
0046f2d7      int32_t* ecx_1;
0046f2d7      
0046f2d7      if (this->vtable->InqProperty(0x64, &var_10) == 0)
0046f352          ecx_1 = var_c;
0046f2d7      else
0046f2d7      {
0046f2d9          ecx_1 = var_c;
0046f2df          int32_t* var_8 = nullptr;
0046f2e3          int32_t* var_4_1 = nullptr;
0046f2e3          
0046f2e7          if (ecx_1 != 0)
0046f2e7          {
0046f2fd              if (*(uint32_t*)(*(uint32_t*)ecx_1 + 0xf4)(arg2, &var_8) != 0)
0046f310                  result = UIElement_ListBox::AddItem(this, &var_8, arg3);
0046f310              
0046f312              int32_t* eax_5 = var_8;
0046f312              
0046f318              if (eax_5 != 0)
0046f318              {
0046f322                  int32_t esi_2 = (eax_5[1] - 1);
0046f31f                  eax_5[1] = esi_2;
0046f31f                  
0046f329                  if (esi_2 == 0)
0046f32f                      **(uint32_t**)eax_5(1);
0046f32f                  
0046f331                  var_8 = nullptr;
0046f318              }
0046f318              
0046f33b              if (var_4_1 != 0)
0046f33b              {
0046f343                  int32_t esi_4 = (var_4_1[1] - 1);
0046f340                  var_4_1[1] = esi_4;
0046f340                  
0046f34a                  if (esi_4 == 0)
0046f350                      **(uint32_t**)var_4_1(1);
0046f33b              }
0046f33b              
0046f352              ecx_1 = var_c;
0046f2e7          }
0046f2d7      }
0046f2d7      
0046f356      int32_t* eax_9 = var_10;
0046f356      
0046f35c      if (eax_9 != 0)
0046f35c      {
0046f366          int32_t esi_6 = (eax_9[1] - 1);
0046f363          eax_9[1] = esi_6;
0046f363          
0046f36d          if (esi_6 == 0)
0046f373              **(uint32_t**)eax_9(1);
0046f373          
0046f375          ecx_1 = var_c;
0046f379          var_10 = nullptr;
0046f35c      }
0046f35c      
0046f37f      if (ecx_1 != 0)
0046f37f      {
0046f387          int32_t esi_8 = (ecx_1[1] - 1);
0046f384          ecx_1[1] = esi_8;
0046f384          
0046f38e          if (esi_8 == 0)
0046f394              **(uint32_t**)ecx_1(1);
0046f37f      }
0046f37f      
0046f39e      return result;
0046f2b0  }

0046f3a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0046f3b0  class UIElement* __thiscall UIElement_ListBox::AddItemFromTemplateList(class UIElement_ListBox* this, uint32_t arg2, int32_t arg3)

0046f3b0  {
0046f3c5      class UIElement* result = nullptr;
0046f3c7      int32_t* var_10 = nullptr;
0046f3cb      int32_t* var_c = nullptr;
0046f3d7      int32_t* ecx_1;
0046f3d7      
0046f3d7      if (this->vtable->InqProperty(0x64, &var_10) == 0)
0046f46f          ecx_1 = var_c;
0046f3d7      else
0046f3d7      {
0046f3dd          ecx_1 = var_c;
0046f3e3          int32_t* var_8 = nullptr;
0046f3e7          int32_t* var_4_1 = nullptr;
0046f3e7          
0046f3eb          if (ecx_1 != 0)
0046f3eb          {
0046f405              if (*(uint32_t*)(*(uint32_t*)ecx_1 + 0xf4)(arg2, &var_8) != 0)
0046f405              {
0046f411                  class UIElement* eax_5;
0046f411                  
0046f411                  if (arg3 >= this->m_listItems.m_num)
0046f41e                      eax_5 = nullptr;
0046f411                  else
0046f419                      eax_5 = this->m_listItems.m_data[arg3];
0046f419                  
0046f42d                  result = UIElement_ListBox::AddItem(this, &var_8, eax_5);
0046f405              }
0046f405              
0046f42f              int32_t* eax_7 = var_8;
0046f42f              
0046f435              if (eax_7 != 0)
0046f435              {
0046f43f                  int32_t esi_2 = (eax_7[1] - 1);
0046f43c                  eax_7[1] = esi_2;
0046f43c                  
0046f446                  if (esi_2 == 0)
0046f44c                      **(uint32_t**)eax_7(1);
0046f44c                  
0046f44e                  var_8 = nullptr;
0046f435              }
0046f435              
0046f458              if (var_4_1 != 0)
0046f458              {
0046f460                  int32_t esi_4 = (var_4_1[1] - 1);
0046f45d                  var_4_1[1] = esi_4;
0046f45d                  
0046f467                  if (esi_4 == 0)
0046f46d                      **(uint32_t**)var_4_1(1);
0046f458              }
0046f458              
0046f46f              ecx_1 = var_c;
0046f3eb          }
0046f3d7      }
0046f3d7      
0046f473      int32_t* eax_11 = var_10;
0046f473      
0046f479      if (eax_11 != 0)
0046f479      {
0046f483          int32_t esi_6 = (eax_11[1] - 1);
0046f480          eax_11[1] = esi_6;
0046f480          
0046f48a          if (esi_6 == 0)
0046f490              **(uint32_t**)eax_11(1);
0046f490          
0046f492          ecx_1 = var_c;
0046f496          var_10 = nullptr;
0046f479      }
0046f479      
0046f49c      if (ecx_1 != 0)
0046f49c      {
0046f4a4          int32_t esi_8 = (ecx_1[1] - 1);
0046f4a1          ecx_1[1] = esi_8;
0046f4a1          
0046f4ab          if (esi_8 == 0)
0046f4b1              **(uint32_t**)ecx_1(1);
0046f49c      }
0046f49c      
0046f4bb      return result;
0046f3b0  }

0046f4be                                                                                            90 90                                ..

0046f4c0  void __thiscall UIElement_Meter::UIElement_Meter(class UIElement_Meter* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0046f4c0  {
0046f4cf      UIElement::UIElement(this, arg2, arg3);
0046f4e2      this->m_framemeter = 0;
0046f4e8      this->m_animating = 0;
0046f4ee      this->m_anim_start_pos = 0f;
0046f4f4      this->m_anim_end_pos = 0f;
0046f4fa      this->m_fOldPosition = 0f;
0046f500      this->m_pcChildImage = nullptr;
0046f506      this->vtable = 0x79cfa0;
0046f50c      this->m_animStartTime = 0f;
0046f512      *(uint32_t*)((char*)this->m_animStartTime)[4] = 0xbff00000;
0046f518      this->m_animEndTime = 0f;
0046f51e      *(uint32_t*)((char*)this->m_animEndTime)[4] = 0xbff00000;
0046f524      this->m_currentFrame = 0xffffffff;
0046f52e      this->m_eDirection = 1;
0046f4c0  }

0046f53e                                                                                            90 90                                ..

0046f540  class UIElement* __thiscall UIElement_Meter::DynamicCast(class UIElement_Meter* this, uint32_t arg2) __pure

0046f540  {
0046f549      int32_t eax;
0046f549      eax = arg2 != 7;
0046f54f      return ((eax - 1) & this);
0046f540  }

0046f552                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0046f560  class UIElement* UIElement_Meter::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0046f560  {
0046f565      void* eax = operator new(0x620);
0046f565      
0046f56f      if (eax == 0)
0046f585          return 0;
0046f585      
0046f582      return UIElement_Meter::UIElement_Meter(eax, arg1, arg2);
0046f560  }

0046f586                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0046f590  void __thiscall UIElement_Meter::RemoveChild(class UIElement_Meter* this, class UIRegion* arg2)

0046f590  {
0046f596      class UIRegion* var_c = arg2;
0046f599      class UIRegion* edx;
0046f599      UIRegion::RemoveChild(this, edx);
0046f599      
0046f5a4      if (this->m_pcChildImage == arg2)
0046f5a6          this->m_pcChildImage = nullptr;
0046f590  }

0046f5b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0046f5c0  void __fastcall UIElement_Meter::StartAnimation(class UIElement_Meter* this)

0046f5c0  {
0046f5ce      if (this->m_animating == 0)
0046f5ce      {
0046f5d7          float var_8;
0046f5d7          UIElement::GetAttribute_Float(this, 0x6b, &var_8);
0046f5dc          long double x87_r7_1 = ((long double)var_8);
0046f5e0          long double temp0_1 = ((long double)0f);
0046f5e0          (x87_r7_1 - temp0_1);
0046f5e6          int32_t eax_1;
0046f5e6          eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0046f5e8          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0046f5e8          
0046f5eb          if (p_1)
0046f5eb          {
0046f5f6              float var_4;
0046f5f6              UIElement::GetAttribute_Float(this, 0x69, &var_4);
0046f606              UIElement::GetAttribute_Float(this, 0x66, &this->m_anim_end_pos);
0046f61a              float edx_2 = var_4;
0046f61e              *(uint32_t*)((char*)this->m_animStartTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0046f624              this->m_animStartTime = (*(uint32_t*)Timer::cur_time);
0046f634              this->m_animEndTime = ((double)(((long double)var_8) + ((long double)this->m_animStartTime)));
0046f63a              this->m_anim_start_pos = edx_2;
0046f640              this->m_animating = 1;
0046f647              UIListener::RegisterForGlobalMessage(this, 3);
0046f5eb          }
0046f5ce      }
0046f5c0  }

0046f651                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0046f660  void __thiscall UIElement_Meter::UpdateChild(class UIElement_Meter* this)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0046f75f                                                                                               90                                 .
0046f760  uint32_t jump_table_46f760[0x4] = 
0046f760  {
0046f760      [0x0] =  0x0046f6cd
0046f764      [0x1] =  0x0046f6e0
0046f768      [0x2] =  0x0046f6f3
0046f76c      [0x3] =  0x0046f729
0046f770  }

0046f770  void* __thiscall UIElement_Meter::`scalar deleting destructor'(class UIElement_Meter* this, uint32_t arg2)

0046f770  {
0046f773      this->vtable = 0x79cfa0;
0046f779      UIElement::~UIElement(this);
0046f779      
0046f783      if ((arg2 & 1) != 0)
0046f786          operator delete(this);
0046f786      
0046f791      return this;
0046f770  }

0046f794                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0046f7a0  void UIElement_Meter::Register()

0046f7a0  {
0046f7a7      UIElement::RegisterElementClass(7, UIElement_Meter::Create);
0046f7a0  }


0046f7b0  void __fastcall UIElement_Meter::Initialize(class UIElement_Meter* this)

0046f7b0  {
0046f7b7      UIElement::Initialize(this);
0046f7c7      UIElement::GetAttribute_Bool(this, 0x67, &this->m_framemeter);
0046f7c7      
0046f7cf      if (this->m_framemeter*(int32_t*)((char*)this + 0x5f0) == 0)
0046f7cf      {
0046f7e3          this->m_pcChildImage = UIElement::GetChildRecursive(this, 2);
0046f7e9          struct UIElement_Meter::VTable* vtable = this->vtable;
0046f7ef          int32_t* var_8 = nullptr;
0046f7f7          int32_t* var_4_1 = nullptr;
0046f807          int32_t* ecx_3 = var_4_1;
0046f807          
0046f80f          if ((vtable->InqProperty(0x6f, &var_8) != 0 && ecx_3 != 0))
0046f80f          {
0046f81a              *(uint32_t*)(*(uint32_t*)ecx_3 + 0xa8)(&this->m_eDirection);
0046f820              ecx_3 = var_4_1;
0046f80f          }
0046f80f          
0046f824          int32_t* eax_3 = var_8;
0046f824          
0046f82a          if (eax_3 != 0)
0046f82a          {
0046f834              int32_t esi_3 = (eax_3[1] - 1);
0046f831              eax_3[1] = esi_3;
0046f831              
0046f83b              if (esi_3 == 0)
0046f841                  **(uint32_t**)eax_3(1);
0046f841              
0046f843              ecx_3 = var_4_1;
0046f847              var_8 = nullptr;
0046f82a          }
0046f82a          
0046f851          if (ecx_3 != 0)
0046f851          {
0046f859              int32_t esi_5 = (ecx_3[1] - 1);
0046f856              ecx_3[1] = esi_5;
0046f856              
0046f860              if (esi_5 == 0)
0046f866                  **(uint32_t**)ecx_3(1);
0046f851          }
0046f7cf      }
0046f7b0  }

0046f86e                                            90 90                                                                ..

0046f870  void __thiscall UIElement_Meter::ListenToGlobalMessage(class UIElement_Meter* this, uint32_t arg2, int32_t arg3)

0046f870  {
0046f876      class UIElement_Meter* this_2 = this;
0046f876      
0046f878      if (arg2 == 3)
0046f878      {
0046f87a          int16_t eax;
0046f87a          eax = this_2->m_animating;
0046f87a          
0046f882          if (eax != 0)
0046f882          {
0046f89c              long double x87_r7_3 = ((((long double)Timer::cur_time) - ((long double)this_2->m_animStartTime)) / (((long double)this_2->m_animEndTime) - ((long double)this_2->m_animStartTime)));
0046f89e              arg2 = ((float)x87_r7_3);
0046f8a2              long double temp1_1 = ((long double)1f);
0046f8a2              (x87_r7_3 - temp1_1);
0046f8a2              
0046f8ad              if ((*(uint8_t*)((char*)((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0046f8ad              {
0046f8b1                  arg2 = 0x3f800000;
0046f8b9                  this_2->m_animating = 0;
0046f8c0                  this = UIListener::UnRegisterForGlobalMessage(this, 3);
0046f8ad              }
0046f8ad              
0046f8cb              class UIElement_Meter* this_1 = this;
0046f8e3              UIElement::SetAttribute_Float(this_2, 0x69, ((float)(((((long double)this_2->m_anim_end_pos) - ((long double)this_2->m_anim_start_pos)) * ((long double)arg2)) + ((long double)this_2->m_anim_start_pos))));
0046f882          }
0046f878      }
0046f870  }

0046f8ec                                      90 90 90 90                                                              ....

0046f8f0  uint8_t __thiscall UIElement_Meter::InqAvailableProperties(class UIElement_Meter const* this, class AvailablePropertySet* arg2)

0046f8f0  {
0046f8f3      class AvailablePropertySet* edi = arg2;
0046f8f8      int32_t ebx;
0046f8f8      ebx = 1;
0046f8f8      
0046f901      if (UIElement::InqAvailableProperties(this, edi) == 0)
0046f903          ebx = 0;
0046f903      
0046f909      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0046f90e      class AvailablePropertySet* esi = arg2;
0046f90e      
0046f914      if (esi == 0)
0046f914      {
0046f918          int32_t eax_1;
0046f918          eax_1 = 0;
0046f91b          return 0;
0046f914      }
0046f914      
0046f92a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0xe, edi) == 0)
0046f92c          ebx = 0;
0046f92c      
0046f932      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0046f93a      return ebx;
0046f8f0  }

0046f93d                                                                                         90 90 90                               ...

0046f940  void __fastcall UIElement_Meter::UpdateFrame(class UIElement_Meter* this)

0046f940  {
0046f94f      float var_1c;
0046f94f      UIElement::GetAttribute_Float(this, 0x69, &var_1c);
0046f954      struct UIElement_Meter::VTable* vtable = this->vtable;
0046f961      int32_t* var_10 = nullptr;
0046f965      int32_t* var_c = nullptr;
0046f969      char eax = vtable->InqProperty(0x6d, &var_10);
0046f971      int32_t id_3;
0046f971      
0046f971      if ((eax != 0 && var_c != 0))
0046f986          *(uint32_t*)(*(uint32_t*)var_c + 0xf0)(&id_3);
0046f986      
0046f990      int32_t id;
0046f990      
0046f990      if ((eax == 0 || id_3 == 0))
0046f990      {
0046fb18          int32_t PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0046fb1d          id = PStringBase<char>::s_NullBuffer_2;
0046fb25          InterlockedIncrement((PStringBase<char>::s_NullBuffer_2 - 0x10));
0046fb25          
0046fb43          if (EnumMapper::GetString(0x13, this->m_desc.m_elementID, &id) == 0)
0046fb43          {
0046fb4b              uint32_t m_elementID_1 = this->m_desc.m_elementID;
0046fb56              PStringBase<char>::sprintf(&id, "0x%08X");
0046fb43          }
0046fb43          
0046fb60          UIRegion::ClearImage(this);
0046fb69          int32_t* esi_6 = (id - 0x14);
0046fb69          
0046fb7c          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0046fb84              **(uint32_t**)esi_6(1);
0046f990      }
0046f990      else
0046f990      {
0046f996          struct UIElement_Meter::VTable* vtable_1 = this->vtable;
0046f9a1          uint32_t var_20 = 1;
0046f9a9          int32_t* var_18 = nullptr;
0046f9ad          int32_t* var_14_1 = nullptr;
0046f9b9          int32_t* edi_1 = var_14_1;
0046f9b9          
0046f9c1          if ((vtable_1->InqProperty(0x6e, &var_18) != 0 && edi_1 != 0))
0046f9c1          {
0046f9cc              *(uint32_t*)(*(uint32_t*)edi_1 + 0xa8)(&var_20);
0046f9d2              edi_1 = var_14_1;
0046f9c1          }
0046f9c1          
0046f9da          int32_t id_1 = (id_3 - 1);
0046f9dd          id = id_1;
0046f9e5          id_3 = id_1;
0046f9fb          int32_t eax_3 = _ftol2();
0046f9fb          
0046fa06          if (this->m_currentFrame != eax_3)
0046fa06          {
0046fa12              this->m_currentFrame = eax_3;
0046fa18              int32_t var_8 = 0;
0046fa1c              int32_t* var_4_1 = nullptr;
0046fa1c              
0046fa20              if (var_c == 0)
0046fa20              {
0046fa6d              label_46fa6d:
0046fa6d                  int32_t PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0046fa72                  id = PStringBase<char>::s_NullBuffer_1;
0046fa7a                  InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0046fa7a                  
0046fa98                  if (EnumMapper::GetString(0x13, this->m_desc.m_elementID, &id) == 0)
0046fa98                  {
0046faa0                      uint32_t m_elementID = this->m_desc.m_elementID;
0046faab                      PStringBase<char>::sprintf(&id, "0x%08X");
0046fa98                  }
0046fa98                  
0046fab5                  UIRegion::ClearImage(this);
0046fabe                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&id);
0046fa20              }
0046fa20              else
0046fa20              {
0046fa32                  if (*(uint32_t*)(*(uint32_t*)var_c + 0xf4)(eax_3, &var_8) == 0)
0046fa32                      goto label_46fa6d;
0046fa32                  
0046fa3f                  id = INVALID_DID.id;
0046fa3f                  
0046fa43                  if (var_4_1 == 0)
0046fa43                      goto label_46fa6d;
0046fa43                  
0046fa4c                  *(uint32_t*)(*(uint32_t*)var_4_1 + 0xb0)(&id);
0046fa52                  int32_t id_2 = id;
0046fa52                  
0046fa5c                  if (id_2 == INVALID_DID.id)
0046fa5c                      goto label_46fa6d;
0046fa5c                  
0046fa66                  UIRegion::SetImageByDID(this, id_2, var_20);
0046fa20              }
0046fa20              
0046fac7              BaseProperty::~BaseProperty(&var_8);
0046facc              edi_1 = var_14_1;
0046fa06          }
0046fa06          
0046fad0          int32_t* eax_10 = var_18;
0046fad0          
0046fad6          if (eax_10 != 0)
0046fad6          {
0046fae0              int32_t esi_2 = (eax_10[1] - 1);
0046fadd              eax_10[1] = esi_2;
0046fadd              
0046fae7              if (esi_2 == 0)
0046faed                  **(uint32_t**)eax_10(1);
0046faed              
0046faef              edi_1 = var_14_1;
0046faf3              var_18 = nullptr;
0046fad6          }
0046fad6          
0046faf9          if (edi_1 != 0)
0046faf9          {
0046fb05              int32_t esi_4 = (edi_1[1] - 1);
0046fb02              edi_1[1] = esi_4;
0046fb02              
0046fb0e              if (esi_4 == 0)
0046fb14                  **(uint32_t**)edi_1(1);
0046faf9          }
0046f990      }
0046fb86      int32_t* eax_18 = var_10;
0046fb86      
0046fb8c      if (eax_18 != 0)
0046fb8c      {
0046fb96          int32_t esi_8 = (eax_18[1] - 1);
0046fb93          eax_18[1] = esi_8;
0046fb93          
0046fb9d          if (esi_8 == 0)
0046fba3              **(uint32_t**)eax_18(1);
0046fba3          
0046fba5          var_10 = nullptr;
0046fb8c      }
0046fb8c      
0046fbaf      if (var_c != 0)
0046fbaf      {
0046fbb9          int32_t esi_10 = (var_c[1] - 1);
0046fbb6          var_c[1] = esi_10;
0046fbb6          
0046fbc0          if (esi_10 == 0)
0046fbc6              **(uint32_t**)var_c(1);
0046fbaf      }
0046f940  }

0046fbcf                                               90                                                                 .

0046fbd0  void __thiscall UIElement_Meter::DrawChildren(class UIElement_Meter* this, class Box2D const* arg2, class Box2D const* arg3, class SmartArray<Box2D,1> const* arg4, class UISurface* arg5)

0046fbd0  {
0046fbe4      char var_59 = 0;
0046fbe9      UIElement::GetAttribute_Bool(this, 0x68, &var_59);
0046fbf6      class UIElement* eax;
0046fbf6      
0046fbf6      if (this->m_pcChildImage != 0)
0046fbfc          eax = var_59;
0046fbfc      
0046fc02      if ((this->m_pcChildImage == 0 || eax != 0))
0046fc02      {
0046fe47          UIRegion::DrawChildren(this, arg2, arg3, arg4, arg5);
0046fe47          return;
0046fc02      }
0046fc02      
0046fc14      void* __offset(DLListData, -0x8) eax_1 = nullptr;
0046fc14      
0046fc18      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
0046fc18      {
0046fc1a          class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
0046fc1a          
0046fc1f          if (head_ == 0)
0046fc26              eax_1 = nullptr;
0046fc1f          else
0046fc21              eax_1 = &head_[-1];
0046fc18      }
0046fc18      
0046fc2a      void* __offset(DLListData, -0x8) var_48_1 = eax_1;
0046fc2e      class HashList<UIRegion *,UIRegion *,1>* var_44_1 = &this->m_children;
0046fc2e      
0046fc32      if (eax_1 != 0)
0046fc32      {
0046fc44          while (true)
0046fc44          {
0046fc44              int32_t* ecx_2 = *(int32_t*)((char*)ADJ(var_48_1) + 8);
0046fc44              
0046fc53              if (ecx_2[0x2c] == 0)
0046fc53              {
0046fc60                  int32_t var_10;
0046fc60                  class Box2D* edx_2 = *(uint32_t*)(*(uint32_t*)ecx_2 + 0x34)(&var_10);
0046fc6c                  int32_t ecx_4 = var_10;
0046fc7c                  int32_t edi_2 = (arg2->m_x0 + ecx_4);
0046fc80                  int32_t var_c;
0046fc80                  int32_t esi_2 = (arg2->m_y0 + var_c);
0046fc8a                  int32_t var_20;
0046fc8a                  int32_t* var_70_2 = &var_20;
0046fc98                  int32_t var_40 = edi_2;
0046fca8                  var_20 = 0;
0046fcac                  int32_t var_1c_1 = 0;
0046fcb0                  int32_t var_18_1 = 0;
0046fcb4                  int32_t var_14_1 = 0;
0046fcb4                  
0046fcbf                  if (Box2D::Intersection(arg3, edx_2, &var_40) != 0)
0046fcbf                  {
0046fcc9                      int32_t* ecx_6 = ecx_2;
0046fcc9                      
0046fcd3                      if (ecx_6 == this->m_pcChildImage)
0046fcd3                      {
0046fce2                          int32_t var_30 = edi_2;
0046fce6                          int32_t var_8;
0046fce6                          int32_t var_28_1 = ((var_8 - ecx_4) + edi_2);
0046fcea                          int32_t var_2c_1 = esi_2;
0046fcee                          int32_t var_4;
0046fcee                          int32_t var_24_1 = ((var_4 - var_c) + esi_2);
0046fcf2                          float var_58;
0046fcf2                          UIElement::GetAttribute_Float(this, 0x69, &var_58);
0046fcf7                          class UIElement_Meter* this_1 = this;
0046fcf7                          
0046fd0b                          switch ((this_1->m_eDirection - 1))
0046fd0b                          {
0046fd29                              case 0:
0046fd29                              {
0046fd29                                  int32_t eax_11;
0046fd29                                  eax_11 = _ftol2();
0046fd32                                  int32_t var_28_2 = ((eax_11 + edi_2) - 1);
0046fd29                                  break;
0046fd29                              }
0046fd52                              case 1:
0046fd52                              {
0046fd52                                  int32_t eax_12;
0046fd52                                  eax_12 = _ftol2();
0046fd5b                                  int32_t var_24_2 = ((eax_12 + esi_2) - 1);
0046fd52                                  break;
0046fd52                              }
0046fd8b                              case 2:
0046fd8b                              {
0046fd8b                                  int32_t esi_4 = (_ftol2() + var_40);
0046fd8d                                  var_30 = esi_4;
0046fd96                                  this_1 = ((_ftol2() + esi_4) - 1);
0046fd9a                                  class UIElement_Meter* this_2 = this_1;
0046fd8b                                  break;
0046fd8b                              }
0046fdca                              case 3:
0046fdca                              {
0046fdca                                  int32_t esi_6 = (_ftol2() + esi_2);
0046fdcc                                  int32_t var_2c_2 = esi_6;
0046fdd0                                  int32_t eax_20;
0046fdd0                                  eax_20 = _ftol2();
0046fdd9                                  int32_t var_24_3 = ((eax_20 + esi_6) - 1);
0046fdca                                  break;
0046fdca                              }
0046fd0b                          }
0046fd0b                          
0046fde1                          int32_t* var_70_4 = &var_20;
0046fdeb                          Box2D::Intersection(&var_30, this_1, &var_20);
0046fdf0                          ecx_6 = ecx_2;
0046fcd3                      }
0046fcd3                      
0046fe0a                      *(uint32_t*)(*(uint32_t*)ecx_6 + 0x3c)(&var_40, &var_20, arg4, arg5);
0046fcbf                  }
0046fc53              }
0046fc53              
0046fe11              class DLListData* dllist_next = ADJ(var_48_1)->dllist_next;
0046fe11              
0046fe16              if (dllist_next == 0)
0046fe16                  break;
0046fe16              
0046fe1d              var_48_1 = &dllist_next[-1];
0046fe1d              
0046fe21              if (dllist_next == 8)
0046fe2e                  return;
0046fc44          }
0046fc32      }
0046fbd0  }

0046fc3a                                                                                8d 9b 00 00 00 00                            ......
0046fe56                                                                    8b ff                                                ..
0046fe58  uint32_t jump_table_46fe58[0x4] = 
0046fe58  {
0046fe58      [0x0] =  0x0046fd12
0046fe5c      [0x1] =  0x0046fd3b
0046fe60      [0x2] =  0x0046fd61
0046fe64      [0x3] =  0x0046fda0
0046fe68  }

0046fe68                          90 90 90 90 90 90 90 90                                                          ........

0046fe70  void __fastcall UIElement_Meter::OnSetAttribute(class UIElement_Meter* this, class BaseProperty const* arg2)

0046fe70  {
0046fe70      class UIElement_Meter* this_1 = this;
0046fe73      class BaseProperty* edi = arg2;
0046fe7a      UIElement::OnSetAttribute(this, edi);
0046fe81      uint32_t eax = BaseProperty::GetPropertyName(edi);
0046fe81      
0046fe89      if (eax == 0x66)
0046fe89      {
0046ff49          UIElement::GetAttribute_Bool(this, 0x6a, &arg2);
0046ff49          
0046ff54          if (arg2 != 0)
0046ff54          {
0046ff5e              if (this->m_animating != 0)
0046ff5e              {
0046ff64                  this->m_animating = 0;
0046ff6b                  UIListener::UnRegisterForGlobalMessage(this, 3);
0046ff5e              }
0046ff5e              
0046ff72              UIElement_Meter::StartAnimation(this);
0046ff7a              return;
0046ff54          }
0046ff54          
0046ff7d          class BasePropertyValue* m_pcPropertyValue_1 = edi->m_pcPropertyValue;
0046ff7d          
0046ff82          if (m_pcPropertyValue_1 != 0)
0046ff84              m_pcPropertyValue_1->vtable->InqFloat(&this_1);
0046ff84          
0046ff9a          UIElement::SetAttribute_Float(this, 0x69, this_1);
0046fe89      }
0046fe89      else if (eax == 0x69)
0046fe92      {
0046fe98          class BasePropertyValue* m_pcPropertyValue = edi->m_pcPropertyValue;
0046fe98          
0046fe9d          if (m_pcPropertyValue != 0)
0046fe9f              m_pcPropertyValue->vtable->InqFloat(&arg2);
0046fe9f          
0046feac          eax = this->m_framemeter;
0046feac          
0046feb4          if (eax != 0)
0046feb8              UIElement_Meter::UpdateFrame(this);
0046feb4          else if (this->m_pcChildImage != 0)
0046fecb              UIElement_Meter::UpdateChild(this);
0046fecb          
0046feda          long double x87_r7_3 = fabsl((((long double)arg2) - ((long double)this->m_fOldPosition)));
0046fedc          long double temp1_1 = ((long double)0.000199999995f);
0046fedc          (x87_r7_3 - temp1_1);
0046fee2          class UIElement* eax_2;
0046fee2          eax_2 = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0046fee4          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0046fee4          
0046fee7          if (p_1)
0046fee7          {
0046fef5              this->m_fOldPosition = arg2;
0046fefb              UIElement::BroadcastElementMessage(this, 0x2d, 0, 0);
0046fee7          }
0046fee7          
0046ff09          this_1 = nullptr;
0046ff11          UIElement::GetAttribute_Float(this, 0x66, &this_1);
0046ff1e          long double x87_r7_6 = fabsl((((long double)arg2) - ((long double)this_1)));
0046ff20          long double temp2_1 = ((long double)0.000199999995f);
0046ff20          (x87_r7_6 - temp2_1);
0046ff26          int32_t eax_4;
0046ff26          eax_4 = ((((x87_r7_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0046ff28          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0046ff28          
0046ff2b          if (!(p_2))
0046ff35              UIElement::BroadcastElementMessage(this, 0x2e, 0, 0);
0046fe92      }
0046fe70  }

0046ffa5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0046ffb0  void __thiscall UIElement_Meter::ResizeTo(class UIElement_Meter* this, int32_t const arg2, int32_t const arg3)

0046ffb0  {
0046ffbf      UIElement::ResizeTo(this, arg2, arg3);
0046ffbf      
0046ffcc      if (this->m_framemeter != 0)
0046ffcc      {
0046ffd0          UIElement_Meter::UpdateFrame(this);
0046ffd6          return;
0046ffcc      }
0046ffcc      
0046ffe1      if (this->m_pcChildImage != 0)
0046ffe5          UIElement_Meter::UpdateChild(this);
0046ffb0  }

0046ffee                                            90 90                                                                ..

0046fff0  void __thiscall UIElement_Scrollbar::UIElement_Scrollbar(class UIElement_Scrollbar* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0046fff0  {
0046ffff      UIElement_Button::UIElement_Button(this, arg2, arg3);
00470012      this->m_pWidget = nullptr;
00470018      __builtin_memset(&this->m_tAnimStartTime, 0, 0x24);
00470048      this->m_eIncrementButtonID = 0;
0047004e      this->m_eDecrementButtonID = 0;
00470054      this->m_bitField = 0;
0047005a      this->vtable = 0x79d0e8;
00470060      this->vtable = &UIOption_Menu::`vftable';
00470070      *(uint32_t*)((char*)this->m_nNextPageTime)[4] = 0xbff00000;
0046fff0  }

0047007c                                                                                      90 90 90 90                              ....

00470080  class UIElement* __thiscall UIElement_Scrollbar::DynamicCast(class UIElement_Scrollbar* this, uint32_t arg2) __pure

00470080  {
00470093      if ((arg2 == 0xb || (arg2 == 1 || arg2 == 0xc)))
004700a0          return this;
004700a0      
0047009a      int32_t edx_1;
0047009a      edx_1 = arg2 != 0xa;
0047009e      return (this & (edx_1 - 1));
00470080  }

004700a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004700b0  class UIElement* UIElement_Scrollbar::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004700b0  {
004700b5      void* eax = operator new(0x780);
004700b5      
004700bf      if (eax == 0)
004700d5          return 0;
004700d5      
004700d2      return UIElement_Scrollbar::UIElement_Scrollbar(eax, arg1, arg2);
004700b0  }

004700d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004700e0  uint8_t __thiscall UIElement_Scrollbar::RegisterInputMaps(class UIElement_Scrollbar* this, int32_t arg2)

004700e0  {
004700ea      if (ICIDM::s_cidm == 0)
004700ea      {
004700ec          class ICIDM* eax;
004700ec          eax = 0;
004700ef          return 0;
004700ea      }
004700ea      
00470108      int32_t ebx;
00470108      ebx = UIElement_Text::RegisterInputMaps(this, arg2);
00470116      return (ICIDM::s_cidm->vtable->RegisterInputMap(0xa, this, arg2) | ebx);
004700e0  }

00470119                                                                             90 90 90 90 90 90 90                           .......

00470120  uint8_t __fastcall UIElement_Scrollbar::UnregisterInputMaps(class UIElement_Scrollbar* this)

00470120  {
0047012a      if (ICIDM::s_cidm == 0)
0047012a      {
0047012c          class ICIDM* eax;
0047012c          eax = 0;
0047012f          return 0;
0047012a      }
0047012a      
0047013f      int32_t ebx;
0047013f      ebx = UIElement_Text::UnregisterInputMaps(this);
0047014c      return (ICIDM::s_cidm->vtable->UnregisterInputMap(0xa, this) | ebx);
00470120  }

0047014d                                         90 90 90                                                               ...

00470150  void __stdcall UIElement_Scrollbar::SetupDefaultHotClick(class UIElement_Scrollbar* this @ ecx, class UIElement* arg2)

00470150  {
00470151      class UIElement* esi = arg2;
0047015b      UIElement::SetAttribute_Bool(esi, 0xf, 1);
0047015b      
00470170      if (UIElement::GetAttribute_Float(esi, 0x10, &arg2) == 0)
00470170      {
0047017b          arg2 = 0x3f000000;
00470183          UIElement::SetAttribute_Float(esi, 0x10, 0.5f);
00470170      }
00470170      
00470198      if (UIElement::GetAttribute_Float(esi, 0x11, &arg2) == 0)
00470198      {
004701a3          arg2 = 0x3e000000;
004701ab          UIElement::SetAttribute_Float(esi, 0x11, 0.125f);
00470198      }
00470150  }

004701b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004701c0  int32_t __thiscall UIElement_Scrollbar::PositionToStop(class UIElement_Scrollbar* this, float arg2)

004701c0  {
004701cd      int32_t var_4 = 1;
004701cd      
004701e4      if ((UIElement::GetAttribute_Int(this, 0x7d, &var_4) == 0 || var_4 == 0))
0047024f          return 0xffffffff;
0047024f      
004701f2      uint8_t var_5 = 0;
004701f7      UIElement::GetAttribute_Bool(this, 0x7e, &var_5);
004701f7      
00470202      if (var_5 != 0)
00470218          return _ftol2();
00470218      
0047021b      int32_t eax_4 = var_4;
0047021b      
00470222      if (eax_4 <= 1)
00470245          return 0;
00470245      
00470225      var_4 = (eax_4 - 1);
0047023c      return _ftol2();
004701c0  }

00470252                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00470260  struct tagPOINT* __thiscall UIElement_Scrollbar::GetScrollbarPositionFromMessage(class UIElement_Scrollbar* this, struct tagPOINT* __return, struct UIElementMessageInfo const* arg3)

00470260  {
00470267      int32_t y = arg3->ptElement.y;
00470272      int32_t x = arg3->ptElement.x;
00470272      
0047027d      if (arg3->pElement->vtable->GetParent() == this)
0047027d      {
0047027f          class UIElement* pElement = arg3->pElement;
0047028b          x += pElement->m_box.m_x0;
0047028d          y += pElement->m_box.m_y0;
0047027d      }
0047027d      
0047028f      int32_t* result = __return;
00470293      *(uint32_t*)result = x;
00470298      result[1] = y;
0047029c      return result;
00470260  }

0047029f                                                                                               90                                 .

004702a0  struct tagPOINT* __thiscall UIElement_Scrollbar::ComputeActiveSize(class UIElement_Scrollbar* this, struct tagPOINT* __return)

004702a0  {
004702c1      int32_t ebx_1 = (this->m_rectScrollingArea.bottom - this->m_rectScrollingArea.top);
004702c3      class UIElement* m_pWidget = this->m_pWidget;
004702c9      int32_t ebp = 0;
004702cb      int32_t edi_1 = (this->m_rectScrollingArea.right - this->m_rectScrollingArea.left);
004702cf      int32_t var_8;
004702cf      
004702cf      if (m_pWidget == 0)
004702dc          var_8 = 0;
004702cf      else
004702d6          var_8 = UIRegion::GetWidth(m_pWidget);
004702d6      
004702e0      class UIElement* m_pWidget_1 = this->m_pWidget;
004702e0      
004702e8      if (m_pWidget_1 != 0)
004702ef          ebp = UIRegion::GetHeight(m_pWidget_1);
004702ef      
004702fa      uint8_t var_9 = 0;
004702ff      UIElement::GetAttribute_Bool(this, 0x7e, &var_9);
004702ff      
0047030a      if (var_9 == 0)
0047030a      {
0047030c          edi_1 -= var_8;
00470310          ebx_1 -= ebp;
0047030a      }
0047030a      
00470316      __return->x = edi_1;
0047031b      __return->y = ebx_1;
00470322      return __return;
004702a0  }

00470325                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00470330  void __thiscall UIElement_Scrollbar::SetBitMask(class UIElement_Scrollbar* this, uint8_t const arg2, uint32_t const arg3)

00470330  {
00470336      if (arg2 != 0)
00470336      {
00470344          this->m_bitField |= arg3;
0047034a          return;
00470336      }
00470336      
0047035b      this->m_bitField &= !(arg3);
00470330  }

00470364              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00470370  void __thiscall UIElement_Scrollbar::SetHorizontal(class UIElement_Scrollbar* this, uint8_t const arg2)

00470370  {
00470376      uint32_t m_bitField = this->m_bitField;
00470376      
0047037c      if (arg2 != 0)
0047037c      {
00470381          this->m_bitField = (m_bitField | 1);
00470387          return;
0047037c      }
0047037c      
0047038d      this->m_bitField = (m_bitField & 0xfffffffe);
00470370  }

00470396                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004703a0  void __thiscall UIElement_Scrollbar::SetProportional(class UIElement_Scrollbar* this, uint8_t const arg2)

004703a0  {
004703a6      uint32_t m_bitField = this->m_bitField;
004703a6      
004703ac      if (arg2 != 0)
004703ac      {
004703b1          this->m_bitField = (m_bitField | 2);
004703b7          return;
004703ac      }
004703ac      
004703bd      this->m_bitField = (m_bitField & 0xfffffffd);
004703a0  }

004703c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004703d0  void __thiscall UIElement_Scrollbar::SetDisabled(class UIElement_Scrollbar* this, uint8_t const arg2)

004703d0  {
004703d6      uint32_t m_bitField = this->m_bitField;
004703d6      
004703dc      if (arg2 != 0)
004703dc      {
004703e1          this->m_bitField = (m_bitField | 4);
004703e7          return;
004703dc      }
004703dc      
004703ed      this->m_bitField = (m_bitField & 0xfffffffb);
004703d0  }

004703f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00470400  void __thiscall UIElement_Scrollbar::SetHideDisabled(class UIElement_Scrollbar* this, uint8_t const arg2)

00470400  {
00470406      uint32_t m_bitField = this->m_bitField;
00470406      
0047040c      if (arg2 != 0)
0047040c      {
00470411          this->m_bitField = (m_bitField | 8);
00470417          return;
0047040c      }
0047040c      
0047041d      this->m_bitField = (m_bitField & 0xfffffff7);
00470400  }

00470426                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00470430  void __thiscall UIElement_Scrollbar::SetSmoothMovement(class UIElement_Scrollbar* this, uint8_t const arg2)

00470430  {
00470436      uint32_t m_bitField = this->m_bitField;
00470436      
0047043c      if (arg2 != 0)
0047043c      {
00470441          this->m_bitField = (m_bitField | 0x10);
00470447          return;
0047043c      }
0047043c      
0047044d      this->m_bitField = (m_bitField & 0xffffffef);
00470430  }

00470456                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00470460  void __thiscall UIElement_Scrollbar::SetDisallowUpdating(class UIElement_Scrollbar* this, uint8_t const arg2)

00470460  {
00470466      uint32_t m_bitField = this->m_bitField;
00470466      
0047046c      if (arg2 != 0)
0047046c      {
00470471          this->m_bitField = (m_bitField | 0x20);
00470477          return;
0047046c      }
0047046c      
0047047d      this->m_bitField = (m_bitField & 0xffffffdf);
00470460  }

00470486                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00470490  void __thiscall UIElement_Scrollbar::SetMoveToTouched(class UIElement_Scrollbar* this, uint8_t const arg2)

00470490  {
00470496      uint32_t m_bitField = this->m_bitField;
00470496      
0047049c      if (arg2 != 0)
0047049c      {
004704a1          this->m_bitField = (m_bitField | 0x40);
004704a7          return;
0047049c      }
0047049c      
004704ad      this->m_bitField = (m_bitField & 0xffffffbf);
00470490  }

004704b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004704c0  void __thiscall UIElement_Scrollbar::SetHasStopLocations(class UIElement_Scrollbar* this, uint8_t const arg2)

004704c0  {
004704c6      uint32_t m_bitField = this->m_bitField;
004704c6      
004704cc      if (arg2 != 0)
004704cc      {
004704d3          this->m_bitField = (m_bitField | 0x100);
004704d9          return;
004704cc      }
004704cc      
004704e1      this->m_bitField = (m_bitField & 0xfffffeff);
004704c0  }

004704ea                                90 90 90 90 90 90                                                            ......

004704f0  int32_t __thiscall UIElement_Scrollbar::GetSecondaryCoordinate(class UIElement_Scrollbar* this, struct tagPOINT const* arg2)

004704f0  {
004704f7      if ((this->m_bitField & 1) == 0)
00470509          return arg2->x;
00470509      
00470500      return arg2->y;
004704f0  }

0047050c                                      90 90 90 90                                                              ....

00470510  void UIElement_Scrollbar::Register()

00470510  {
00470517      UIElement::RegisterElementClass(0xb, UIElement_Scrollbar::Create);
00470510  }


00470520  void __fastcall UIElement_Scrollbar::Initialize(class UIElement_Scrollbar* this)

00470520  {
00470520      class UIElement_Scrollbar* this_1 = this;
00470524      UIElement::Initialize(this);
00470532      *(uint8_t*)((char*)this_1)[3] = 0;
00470537      UIElement::GetAttribute_Bool(this, 0x7c, &*(uint32_t*)((char*)this_1)[3]);
00470537      
00470542      if (*(uint8_t*)((char*)this_1)[3] == 0)
00470547          UIElement_Scrollbar::SetupDefaultHotClick(this, this);
00470520  }

0047054f                                               90                                                                 .

00470550  void __fastcall UIElement_Scrollbar::StartAnimation(class UIElement_Scrollbar* this)

00470550  {
00470550      class UIElement_Scrollbar* this_1 = this;
00470571      int32_t ebx;
00470571      ebx = (this->m_bitField & 0x400000) == 0x400000;
00470574      this_1 = nullptr;
00470574      
00470583      if (UIElement::GetAttribute_Float(this, 0x84, &this_1) != 0)
00470583      {
0047058f          (fabsl(((long double)this_1)) - ((long double)0.000199999995f));
00470597          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00470597          
0047059a          if (p_1)
0047059a          {
0047059d              this->m_fAnimStartPos = 0f;
004705b1              UIElement::GetAttribute_Float(this, 0x86, &this->m_fAnimStartPos);
004705b8              this->m_fAnimEndPos = this->m_fAnimStartPos;
004705c8              UIElement::GetAttribute_Float(this, 0x85, &this->m_fAnimEndPos);
004705cd              long double x87_r7_3 = ((long double)this_1);
004705dc              *(uint32_t*)((char*)this->m_tAnimStartTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004705e2              this->m_tAnimStartTime = (*(uint32_t*)Timer::cur_time);
004705f6              this->m_bitField |= 0x400000;
00470603              this->m_tAnimEndTime = ((double)(x87_r7_3 + ((long double)this->m_tAnimStartTime)));
00470603              
00470609              if (ebx == 0)
0047060f                  UIListener::RegisterForGlobalMessage(this, 3);
0047059a          }
00470583      }
00470550  }

00470618                                                                          90 90 90 90 90 90 90 90                          ........

00470620  class UIElement_Button* __thiscall UIElement_Scrollbar::GetButtonPointer_(class UIElement_Scrollbar* this, uint8_t arg2)

00470620  {
00470621      class UIElement_Scrollbar* this_1 = this;
00470623      this = arg2;
0047062c      uint32_t ecx;
0047062c      
0047062c      if (this == 0)
00470636          ecx = this_1->m_eDecrementButtonID;
0047062c      else
0047062e          ecx = this_1->m_eIncrementButtonID;
0047062e      
0047063e      if (ecx == 0)
0047067b          return nullptr;
0047067b      
00470643      class UIElement* eax_1 = UIElement::FindRelative(this_1, ecx);
00470643      
0047064a      if (eax_1 != 0)
0047064a      {
00470652          class UIElement* result = eax_1->vtable->DynamicCast(1);
00470652          
0047065c          if ((result != 0 && UIElement::FindRelative(result, this_1->m_desc.m_elementID) == this_1))
00470677              return result;
0047064a      }
0047064a      
00470674      return 0;
00470620  }

0047067e                                                                                            90 90                                ..

00470680  void __thiscall UIElement_Scrollbar::UpdateButtonID_(class UIElement_Scrollbar* this, uint8_t arg2, uint32_t arg3)

00470680  {
0047068d      if (arg2 == 0)
00470697          this->m_eDecrementButtonID = arg3;
0047068d      else
0047068f          this->m_eIncrementButtonID = arg3;
0047068f      
004706a0      class UIElement* eax_2 = UIElement::GetChildRecursive(this, arg3);
004706a0      
004706a7      if (eax_2 != 0)
004706a7      {
004706c3          UIElement_Scrollbar::SetupDefaultHotClick(this, eax_2);
004706c9          return;
004706a7      }
004706a7      
004706a9      this->m_bitField |= "activation type (%s) with '%s' b…";
004706b7      UIListener::RegisterForGlobalMessage(this, 3);
00470680  }

004706cc                                      90 90 90 90                                                              ....

004706d0  void __thiscall UIElement_Scrollbar::HandlePageClick(class UIElement_Scrollbar* this, struct UIElementMessageInfo const* arg2)

004706d0  {
004706d6      class UIElement* m_pWidget = this->m_pWidget;
004706d6      
004706de      if (m_pWidget != 0)
004706de      {
004706e5          int32_t m_x0 = m_pWidget->m_box.m_x0;
004706e9          int32_t m_y0 = m_pWidget->m_box.m_y0;
004706f0          int32_t eax_1 = UIRegion::GetWidth(m_pWidget);
004706ff          int32_t eax_2 = UIRegion::GetHeight(this->m_pWidget);
0047070a          int32_t ecx_2 = (this->m_bitField & 1);
00470715          int32_t edi_1;
00470715          
00470715          if (ecx_2 == 0)
0047071c              edi_1 = arg2->ptElement.y;
00470715          else
00470717              edi_1 = arg2->ptElement.x;
00470717          
00470722          int32_t edx_1 = m_x0;
00470722          
00470724          if (ecx_2 != 1)
00470726              edx_1 = m_y0;
00470726          
0047072a          edx_1 = edi_1 < edx_1;
00470730          int32_t edi_2;
00470730          
00470730          if (ecx_2 != 1)
00470737              edi_2 = arg2->ptElement.y;
00470730          else
00470732              edi_2 = arg2->ptElement.x;
00470732          
0047073d          int32_t eax_4;
0047073d          
0047073d          if (ecx_2 == 1)
0047076c              eax_4 = eax_1;
0047073d          else
0047073d          {
0047073f              eax_4 = eax_2;
00470743              m_x0 = m_y0;
0047073d          }
0047073d          
0047074d          if ((edx_1 != 0 || edi_2 > (eax_4 + m_x0)))
0047074d          {
0047074f              char temp1_1 = edx_1;
0047074f              edx_1 = -(edx_1);
0047075d              UIElement::BroadcastElementMessage(this, ((edx_1 - edx_1) + 0x10), 0, 0);
0047074d          }
004706de      }
004706d0  }

00470772                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00470780  int32_t __thiscall UIElement_Scrollbar::StopToPosition(class UIElement_Scrollbar* this, int32_t arg2)

00470780  {
0047078d      int32_t var_4 = 1;
00470795      int32_t eax = UIElement::GetAttribute_Int(this, 0x7d, &var_4);
00470795      
0047079c      if (eax != 0)
0047079c      {
0047079e          eax = var_4;
0047079e          
004707a4          if (eax != 0)
004707a4          {
004707ad              if (arg2 < 0)
004707af                  arg2 = 0;
004707ad              else if (arg2 > (eax - 1))
004707bd                  arg2 = (eax - 1);
004707bd              
004707ca              uint8_t var_5 = 0;
004707cf              UIElement::GetAttribute_Bool(this, 0x7e, &var_5);
004707d4              uint8_t eax_2 = var_5;
004707d4              
004707da              if (eax_2 != 0)
004707ee                  return eax_2;
004707ee              
004707f1              int32_t eax_3 = var_4;
004707f1              
004707f8              if (eax_3 <= 1)
00470818                  return eax_3;
00470818              
004707ff              arg2 = (eax_3 - 1);
0047080b              return (eax_3 - 1);
004707a4          }
0047079c      }
0047079c      
00470825      return eax;
00470780  }

00470828                          90 90 90 90 90 90 90 90                                                          ........

00470830  void __thiscall UIElement_Scrollbar::SetScrollbarStop(class UIElement_Scrollbar* this, int32_t arg2, uint8_t arg3)

00470830  {
00470839      long double st0 = UIElement_Scrollbar::StopToPosition(this, arg2);
00470842      long double temp1 = ((long double)0f);
00470842      (st0 - temp1);
00470842      
0047084d      if ((*(uint8_t*)((char*)((((st0 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp1))) ? 1 : 0) << 0xa) | ((((st0 == temp1) ? 1 : 0) << 0xe) | 0x800)))))[1] & 1) == 0)
0047084d      {
00470857          UIElement::SetAttribute_Int(this, 0x87, arg2);
00470868          UIElement::SetAttribute_Float(this, 0x86, ((float)st0));
00470882          UIElement::BroadcastElementMessage(this, 0xa, _ftol2(), arg2);
0047084d      }
00470830  }

0047088c                                      90 90 90 90                                                              ....

00470890  int32_t __thiscall UIElement_Scrollbar::PointToPosition(class UIElement_Scrollbar* this, struct tagPOINT const* arg2)

00470890  {
0047089e      int32_t __return;
0047089e      UIElement_Scrollbar::ComputeActiveSize(this, &__return);
004708a3      class UIElement* m_pWidget = this->m_pWidget;
004708a9      int32_t ebp = 0;
004708ad      int32_t var_8;
004708ad      
004708ad      if (m_pWidget == 0)
004708ba          var_8 = 0;
004708ad      else
004708b4          var_8 = UIRegion::GetWidth(m_pWidget);
004708b4      
004708be      class UIElement* m_pWidget_1 = this->m_pWidget;
004708be      
004708c6      if (m_pWidget_1 != 0)
004708cd          ebp = UIRegion::GetHeight(m_pWidget_1);
004708cd      
004708d7      int32_t left = this->m_rectScrollingArea.left;
004708e1      int32_t y = arg2->y;
004708e5      __return -= 1;
004708f1      int32_t __return_2 = (arg2->x - left);
00470901      int32_t edi = (y - this->m_rectScrollingArea.top);
00470903      uint8_t var_11 = 0;
00470908      UIElement::GetAttribute_Bool(this, 0x7e, &var_11);
00470913      int32_t var_c;
00470913      
00470913      if (var_11 == 0)
00470913      {
00470919          int32_t eax_7;
00470919          int32_t edx_2;
00470919          edx_2 = HIGHD(((int64_t)var_8));
00470919          eax_7 = LOWD(((int64_t)var_8));
00470920          __return_2 += -(((eax_7 - edx_2) >> 1));
00470924          int32_t eax_12;
00470924          int32_t edx_3;
00470924          edx_3 = HIGHD(((int64_t)ebp));
00470924          eax_12 = LOWD(((int64_t)ebp));
0047092b          edi += -(((eax_12 - edx_3) >> 1));
0047092b          
0047092f          if (__return_2 >= 0)
0047092f          {
00470935              int32_t __return_1 = __return;
00470935              
0047093b              if (__return_2 > __return_1)
0047093d                  __return_2 = __return_1;
0047092f          }
0047092f          else
00470931              __return_2 = 0;
00470931          
00470941          if (edi < 0)
00470943              edi = 0;
00470941          else if (edi > (var_c - 1))
0047094f              edi = (var_c - 1);
00470913      }
00470913      
00470957      int32_t ebx_2 = (this->m_bitField & 1);
0047095a      arg2 = __return_2;
0047095a      
0047095e      if (ebx_2 == 0)
00470960          arg2 = edi;
00470960      
00470964      int32_t result = __return;
00470964      
0047096f      if (ebx_2 != 1)
00470971          result = (var_c - 1);
00470971      
00470978      __return = result;
00470989      return result;
00470890  }

00470998                                                                          90 90 90 90 90 90 90 90                          ........

004709a0  struct tagPOINT* __thiscall UIElement_Scrollbar::PositionToWidgetX0Y0(class UIElement_Scrollbar* this, struct tagPOINT* __return, float arg3)

004709a0  {
004709ae      int32_t __return_1;
004709ae      UIElement_Scrollbar::ComputeActiveSize(this, &__return_1);
004709b3      int32_t top = this->m_rectScrollingArea.top;
004709b9      int32_t left = this->m_rectScrollingArea.left;
004709c3      class UIElement* m_pWidget = this->m_pWidget;
004709cd      int32_t var_10;
004709cd      
004709cd      if (m_pWidget == 0)
004709da          var_10 = 0;
004709cd      else
004709d4          var_10 = UIRegion::GetWidth(m_pWidget);
004709d4      
004709de      class UIElement* m_pWidget_1 = this->m_pWidget;
004709e6      int32_t var_c;
004709e6      
004709e6      if (m_pWidget_1 == 0)
004709f3          var_c = 0;
004709e6      else
004709ed          var_c = UIRegion::GetHeight(m_pWidget_1);
004709ed      
004709fd      int32_t edi_1 = (this->m_bitField & 1);
00470a00      int32_t __return_2;
00470a00      
00470a00      if (edi_1 == 0)
00470a10          __return_1 = __return_2;
00470a00      else
00470a06          __return_1 = __return_1;
00470a1c      int32_t eax_4 = _ftol2();
00470a26      int32_t eax_5 = left;
00470a26      
00470a28      if (edi_1 != 1)
00470a2a          eax_5 = top;
00470a2a      
00470a37      int32_t ebp_1 = (eax_4 + eax_5);
00470a39      char var_19 = 0;
00470a3e      UIElement::GetAttribute_Bool(this, 0x7e, &var_19);
00470a43      int32_t eax_6;
00470a43      eax_6 = var_19;
00470a43      
00470a49      if (eax_6 != 0)
00470a49      {
00470a52          int32_t eax_7 = var_10;
00470a52          
00470a56          if ((this->m_bitField & 1) == 0)
00470a58              eax_7 = var_c;
00470a58          
00470a5c          int32_t eax_8;
00470a5c          int32_t edx_2;
00470a5c          edx_2 = HIGHD(((int64_t)eax_7));
00470a5c          eax_8 = LOWD(((int64_t)eax_7));
00470a63          ebp_1 += -(((eax_8 - edx_2) >> 1));
00470a49      }
00470a49      
00470a65      eax_6 = this->m_bitField;
00470a65      
00470a71      if ((eax_6 & 1) != 0)
00470a71      {
00470a7c          __return->x = ebp_1;
00470a7e          __return->y = 0;
00470a85          return __return;
00470a71      }
00470a71      
00470a91      __return->x = 0;
00470a93      __return->y = ebp_1;
00470a9a      return __return;
004709a0  }

00470a9d                                                                                         90 90 90                               ...

00470aa0  void __fastcall UIElement_Scrollbar::UpdateScrollingArea(class UIElement_Scrollbar* this)

00470aa0  {
00470aa4      this->m_rectScrollingArea.top = 0;
00470aae      this->m_rectScrollingArea.left = 0;
00470abf      this->m_rectScrollingArea.right = UIRegion::GetWidth(this);
00470ace      this->m_rectScrollingArea.bottom = UIRegion::GetHeight(this);
00470ad4      class UIElement_Button* eax_2 = UIElement_Scrollbar::GetButtonPointer_(this, 1);
00470ad4      
00470add      if (eax_2 != 0)
00470add      {
00470ae1          int32_t eax_3 = UIRegion::GetHeight(eax_2);
00470af0          this->m_rectScrollingArea.top += eax_3;
00470af6          int32_t eax_4 = UIRegion::GetWidth(eax_2);
00470afb          this->m_rectScrollingArea.left += eax_4;
00470b01          eax_2->vtable->MoveTo(0, 0);
00470add      }
00470add      
00470b10      class UIElement_Button* eax_6 = UIElement_Scrollbar::GetButtonPointer_(this, 0);
00470b10      
00470b19      if (eax_6 != 0)
00470b19      {
00470b1d          int32_t eax_7 = UIRegion::GetWidth(eax_6);
00470b22          this->m_rectScrollingArea.right -= eax_7;
00470b2a          int32_t eax_8 = UIRegion::GetHeight(eax_6);
00470b35          int32_t edx_4 = (this->m_rectScrollingArea.bottom - eax_8);
00470b40          this->m_rectScrollingArea.bottom = edx_4;
00470b46          eax_6->vtable->MoveTo(this->m_rectScrollingArea.right, edx_4);
00470b19      }
00470aa0  }

00470b51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00470b60  void __thiscall UIElement_Scrollbar::ValidatePosition(class UIElement_Scrollbar* this, float* arg2)

00470b60  {
00470b71      int16_t top;
00470b71      
00470b71      if ((*(uint8_t*)((char*)((int16_t)this->m_bitField))[1] & 1) != 0)
00470b71      {
00470b83          *(uint32_t*)arg2 = ((float)UIElement_Scrollbar::StopToPosition(this, UIElement_Scrollbar::PositionToStop(this, *(uint32_t*)arg2)));
00470b83          top = 1;
00470b71      }
00470b71      
00470b85      /* unimplemented  {fld st0, dword [edi]} */;
00470b87      (/* unimplemented  {fcomp st0, dword [&data_795344]} f- fconvert.t(0f) */ - ((long double)0f));
00470b87      /* unimplemented  {fcomp st0, dword [&data_795344]} */;
00470b87      /* unimplemented  {fcomp st0, dword [&data_795344]} */;
00470b87      /* unimplemented  {fcomp st0, dword [&data_795344]} */;
00470b87      /* unimplemented  {fcomp st0, dword [&data_795344]} */;
00470b8f      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00470b8f      
00470b92      if (!(p))
00470b92      {
00470b94          *(uint32_t*)arg2 = 0f;
00470b9c          return;
00470b92      }
00470b92      
00470b9f      /* unimplemented  {fld st0, dword [edi]} */;
00470ba1      long double temp2 = ((long double)1f);
00470ba1      (/* unimplemented  {fcomp st0, dword [&data_7928b0]} f- temp2 */ - temp2);
00470ba1      bool c0_1 = /* bool c0_1 = unimplemented  {fcomp st0, dword [&data_7928b0]} f< temp2 */ < temp2;
00470ba1      bool c2_1 = (FCMP_UO(/* bool c2_1 = is_unordered.t(unimplemented  {fcomp st0, dword [&data_7928b0]}, temp2) */, temp2));
00470ba1      bool c3_1 = /* bool c3_1 = unimplemented  {fcomp st0, dword [&data_7928b0]} f== temp2 */ == temp2;
00470ba1      /* unimplemented  {fcomp st0, dword [&data_7928b0]} */;
00470ba1      
00470bac      if ((*(uint8_t*)((char*)((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | ((top & 7) << 0xb))))))[1] & 0x41) == 0)
00470bae          *(uint32_t*)arg2 = 1f;
00470b60  }

00470bb9                                                                             90 90 90 90 90 90 90                           .......

00470bc0  void __fastcall UIElement_Scrollbar::~UIElement_Scrollbar(class UIElement_Scrollbar* this)

00470bc0  {
00470bc5      this->vtable = 0x79d0e8;
00470bcb      this->vtable = &UIOption_Menu::`vftable';
00470bd5      this->m_eIncrementButtonID = 0;
00470bdf      class UIElement* eax = UIElement::GetChildRecursive(this, 0);
00470bdf      
00470be6      if (eax != 0)
00470c00          UIElement_Scrollbar::SetupDefaultHotClick(this, eax);
00470be6      else
00470be6      {
00470be8          this->m_bitField |= "activation type (%s) with '%s' b…";
00470bf6          UIListener::RegisterForGlobalMessage(this, 3);
00470be6      }
00470be6      
00470c09      this->m_eDecrementButtonID = 0;
00470c13      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0);
00470c13      
00470c1a      if (eax_1 != 0)
00470c1a      {
00470c3a          UIElement_Scrollbar::SetupDefaultHotClick(this, eax_1);
00470c42          /* tailcall */
00470c42          return UIElement_Button::~UIElement_Button(this);
00470c1a      }
00470c1a      
00470c1c      this->m_bitField |= "activation type (%s) with '%s' b…";
00470c2a      UIListener::RegisterForGlobalMessage(this, 3);
00470c32      /* tailcall */
00470c32      return UIElement_Button::~UIElement_Button(this);
00470bc0  }

00470c47                       90 90 90 90 90 90 90 90 90                                                         .........

00470c50  uint8_t __thiscall UIElement_Scrollbar::InqAvailableProperties(class UIElement_Scrollbar const* this, class AvailablePropertySet* arg2)

00470c50  {
00470c53      class AvailablePropertySet* edi = arg2;
00470c58      int32_t ebx;
00470c58      ebx = 1;
00470c58      
00470c61      if (UIElement_Button::InqAvailableProperties(this, edi) == 0)
00470c63          ebx = 0;
00470c63      
00470c69      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
00470c6e      class AvailablePropertySet* esi = arg2;
00470c6e      
00470c74      if (esi == 0)
00470c74      {
00470c78          int32_t eax_1;
00470c78          eax_1 = 0;
00470c7b          return 0;
00470c74      }
00470c74      
00470c8a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0x12, edi) == 0)
00470c8c          ebx = 0;
00470c8c      
00470c92      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
00470c9a      return ebx;
00470c50  }

00470c9d                                                                                         90 90 90                               ...

00470ca0  void __convention("regparm") UIElement_Scrollbar::Global_Loop(class UIElement_Scrollbar* this @ ecx)

00470ca0  {
00470ca0      class UIElement_Scrollbar* this_1 = this;
00470ca2      class UIElement_Scrollbar* this_2 = this;
00470ca4      uint32_t m_bitField = this_2->m_bitField;
00470ca4      
00470caf      if ((m_bitField & "activation type (%s) with '%s' b…") != 0)
00470caf      {
00470cbd          this_2->m_bitField = (m_bitField & 0xff7fffff);
00470cd5          class UIElement* eax_3 = UIElement::GetChildRecursive(this_2->vtable->GetParent(this_2->m_eIncrementButtonID));
00470cd5          
00470cde          if (eax_3 != 0)
00470cde          {
00470ce2              UIRegion::GetWidth(eax_3);
00470ce9              UIRegion::GetHeight(eax_3);
00470cee              eax_3->vtable->SetParent(this_2);
00470cf6              eax_3->vtable->MoveTo(0, 0);
00470d04              UIElement_Scrollbar::SetupDefaultHotClick(this_2, eax_3);
00470cde          }
00470cde          
00470d1c          class UIElement* eax_7 = UIElement::GetChildRecursive(this_2->vtable->GetParent(this_2->m_eDecrementButtonID));
00470d1c          
00470d25          if (eax_7 != 0)
00470d25          {
00470d27              int32_t ebx;
00470d27              int32_t var_10_5 = ebx;
00470d28              int32_t ebp;
00470d28              int32_t var_14_1 = ebp;
00470d2b              int32_t eax_8 = UIRegion::GetWidth(eax_7);
00470d39              this_1 = UIRegion::GetHeight(eax_7);
00470d3d              eax_7->vtable->SetParent(this_2);
00470d45              struct UIElement::VTable* vtable = eax_7->vtable;
00470d4e              int32_t eax_12 = (UIRegion::GetHeight(this_2) - arg_4);
00470d5f              vtable->MoveTo((UIRegion::GetWidth(this_2) - eax_8), eax_12);
00470d65              UIElement_Scrollbar::SetupDefaultHotClick(this_2, eax_7);
00470d25          }
00470d25          
00470d6e          UIElement_Scrollbar::UpdateScrollingArea(this_2);
00470d77          m_bitField = UIListener::UnRegisterForGlobalMessage(this_2, 3);
00470caf      }
00470caf      
00470d87      if ((this_2->m_bitField & 0x400000) != 0)
00470d87      {
00470da1          long double x87_r7_3 = ((((long double)Timer::cur_time) - ((long double)this_2->m_tAnimStartTime)) / (((long double)this_2->m_tAnimEndTime) - ((long double)this_2->m_tAnimStartTime)));
00470da3          this_1 = ((float)x87_r7_3);
00470da7          long double temp0_1 = ((long double)1f);
00470da7          (x87_r7_3 - temp0_1);
00470dad          m_bitField = ((((x87_r7_3 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00470dad          
00470db2          if ((*(uint8_t*)((char*)m_bitField)[1] & 1) == 0)
00470db2          {
00470db4              this_2->m_bitField &= 0xffbfffff;
00470dc2              this_1 = 0x3f800000;
00470dca              this = UIListener::UnRegisterForGlobalMessage(this_2, 3);
00470db2          }
00470db2          
00470dd5          class UIElement_Scrollbar* __saved_edi_1 = this;
00470df0          UIElement::SetAttribute_Float(this_2, 0x86, ((float)(((((long double)this_2->m_fAnimEndPos) - ((long double)this_2->m_fAnimStartPos)) * ((long double)this_1)) + ((long double)this_2->m_fAnimStartPos))));
00470d87      }
00470ca0  }

00470df8                                                                          90 90 90 90 90 90 90 90                          ........

00470e00  void __thiscall UIElement_Scrollbar::ListenToGlobalMessage(class UIElement_Scrollbar* this, uint32_t arg2, int32_t arg3)

00470e00  {
00470e0e      UIElement_Button::ListenToGlobalMessage(this, arg2, arg3);
00470e0e      
00470e16      if (arg2 == 3)
00470e1a          UIElement_Scrollbar::Global_Loop(this);
00470e00  }

00470e24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00470e30  void __thiscall UIElement_Scrollbar::HandleMoveSteps(class UIElement_Scrollbar* this, uint32_t const arg2, int32_t const arg3)

00470e30  {
00470e30      class UIElement_Scrollbar* this_1 = this;
00470e3e      this_1 = nullptr;
00470e3e      
00470e4d      if (UIElement::GetAttribute_Int(this, 0x87, &this_1) == 0)
00470e4d      {
00470e72          int32_t ecx_2;
00470e72          ecx_2 = arg3 <= 0;
00470e7e          UIElement::BroadcastElementMessage(this, (ecx_2 + 0xd), arg3, 0);
00470e85          return;
00470e4d      }
00470e4d      
00470e53      int32_t this_2 = ((char*)this_1 + arg3);
00470e5c      this_1 = this_2;
00470e60      UIElement_Scrollbar::SetScrollbarStop(this, this_2, 1);
00470e30  }

00470e88                          90 90 90 90 90 90 90 90                                                          ........

00470e90  void __thiscall UIElement_Scrollbar::HandleButtonClick(class UIElement_Scrollbar* this, struct UIElementMessageInfo const* arg2)

00470e90  {
00470e96      uint32_t edx_1 = (arg2->idElement - this->m_eIncrementButtonID);
00470e9c      int32_t edx_2 = -(edx_1);
00470eaa      UIElement_Scrollbar::HandleMoveSteps(this, 0x86, (((edx_2 - edx_2) & 0xfffffffe) + 1));
00470e90  }

00470eb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00470ec0  void __thiscall UIElement_Scrollbar::SetScrollbarPosition(class UIElement_Scrollbar* this, float arg2, uint8_t arg3)

00470ec0  {
00470ec5      (((long double)arg2) - ((long double)0f));
00470ed0      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00470ed0      
00470ed3      if (p)
00470ed3      {
00470edf          long double x87_r7_1 = ((long double)arg2);
00470ee3          long double temp2_1 = ((long double)1f);
00470ee3          (x87_r7_1 - temp2_1);
00470ee3          
00470eee          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00470ef0              arg2 = 1f;
00470ed3      }
00470ed3      else
00470ed5          arg2 = 0f;
00470ed5      
00470eff      int32_t eax_1 = UIElement_Scrollbar::PositionToStop(this, arg2);
00470eff      
00470f06      if (eax_1 >= 0)
00470f06      {
00470f10          UIElement_Scrollbar::SetScrollbarStop(this, eax_1, arg3);
00470f17          return;
00470f06      }
00470f06      
00470f22      UIElement::SetAttribute_Float(this, 0x86, arg2);
00470f3d      UIElement::BroadcastElementMessage(this, 0xa, _ftol2(), 0xffffffff);
00470ec0  }

00470f47                       90 90 90 90 90 90 90 90 90                                                         .........

00470f50  void __thiscall UIElement_Scrollbar::ScrollToPoint(class UIElement_Scrollbar* this, struct UIElementMessageInfo const* arg2, uint8_t arg3)

00470f50  {
00470f5a      int32_t y = arg2->ptElement.y;
00470f65      int32_t x = arg2->ptElement.x;
00470f65      
00470f70      if (arg2->pElement->vtable->GetParent() == this)
00470f70      {
00470f72          class UIElement* pElement = arg2->pElement;
00470f7e          x += pElement->m_box.m_x0;
00470f80          y += pElement->m_box.m_y0;
00470f70      }
00470f70      
00470f8e      int32_t x_1 = x;
00470f92      int32_t y_1 = y;
00470f96      int32_t ecx_4;
00470f96      long double st0;
00470f96      ecx_4 = UIElement_Scrollbar::PointToPosition(this, &x_1);
00470f9b      int32_t var_20_1 = ecx_4;
00470fa1      UIElement_Scrollbar::SetScrollbarPosition(this, ((float)st0), arg3);
00470f50  }


00470fb0  void __thiscall UIElement_Scrollbar::StartWidgetDrag(class UIElement_Scrollbar* this, struct UIElementMessageInfo const* arg2)

00470fb0  {
00470fc1      if ((this->m_bitField & 0x40) != 0)
00470fc6          UIElement_Scrollbar::ScrollToPoint(this, arg2, 1);
00470fc6      
00470fd0      int32_t x = arg2->ptElement.x;
00470fd3      int32_t y = arg2->ptElement.y;
00470fd3      
00470fde      if (arg2->pElement->vtable->GetParent() == this)
00470fde      {
00470fe0          class UIElement* pElement = arg2->pElement;
00470fec          x += pElement->m_box.m_x0;
00470fee          y += pElement->m_box.m_y0;
00470fde      }
00470fde      
00470ffe      this->m_ptDragStart.x = x;
00471004      this->m_ptDragStart.y = y;
0047100a      UIElement::GetAttribute_Float(this, 0x86, &this->m_fResetPosition);
00471010      this->m_bWidgetDragActive = 1;
00470fb0  }

0047101d                                                                                         90 90 90                               ...

00471020  void __thiscall UIElement_Scrollbar::ScrollNPixelsFromReset(class UIElement_Scrollbar* this, struct tagPOINT const* arg2, uint8_t arg3)

00471020  {
0047102b      int32_t __return;
0047102b      UIElement_Scrollbar::ComputeActiveSize(this, &__return);
00471036      int32_t eax_1 = (this->m_bitField & 1);
00471039      int32_t __return_1 = __return;
0047103d      int32_t __return_3;
0047103d      
0047103d      if (eax_1 == 0)
0047103f          __return_1 = __return_3;
00471045      __return = __return_1;
00471045      
00471049      if (__return_1 == 0)
00471049      {
00471054          UIElement_Scrollbar::SetScrollbarPosition(this, 0f, arg3);
0047105d          return;
00471049      }
00471049      
00471063      if (eax_1 != 1)
00471063      {
00471071          __return_1 = arg2;
00471078          arg2 = *(uint32_t*)(__return_1 + 4);
00471063      }
00471063      else
0047106b          arg2 = arg2->x;
0047106b      
00471085      int32_t __return_2 = __return_1;
00471095      UIElement_Scrollbar::SetScrollbarPosition(this, ((float)((((long double)arg2) / ((long double)__return)) + ((long double)this->m_fResetPosition))), arg3);
00471020  }

004710a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004710b0  void* __thiscall UIElement_Scrollbar::`scalar deleting destructor'(class UIElement_Scrollbar* this, uint32_t arg2)

004710b0  {
004710b3      UIElement_Scrollbar::~UIElement_Scrollbar(this);
004710b3      
004710bd      if ((arg2 & 1) != 0)
004710c0          operator delete(this);
004710c0      
004710cb      return this;
004710b0  }

004710ce                                            90 90                                                                ..

004710d0  void __fastcall UIElement_Scrollbar::UpdateLayout(class UIElement_Scrollbar* this)

004710d0  {
004710de      if (this->m_pWidget == 0)
004710e7          this->m_pWidget = UIElement::GetChild(this, 1);
004710e7      
004710f4      if ((this->m_bitField & 0x20) == 0)
004710f4      {
00471106          float var_24 = 0f;
0047110e          UIElement::GetAttribute_Float(this, 0x86, &var_24);
0047111c          int32_t var_20 = 1;
00471133          void var_c;
00471133          
00471133          if (((UIElement::GetAttribute_Int(this, 0x7d, &var_20) != 0 && var_20 != 0) && UIElement::GetAttribute_Int(this, 0x87, &var_c) == 0))
00471133          {
00471153              UIElement_Scrollbar::SetScrollbarPosition(this, var_24, 0);
0047115c              return;
00471133          }
00471133          
0047115f          UIElement_Scrollbar::UpdateScrollingArea(this);
00471164          class UIElement* m_pWidget = this->m_pWidget;
00471164          
0047116c          if (m_pWidget != 0)
0047116c          {
00471180              int32_t edi_1 = UIRegion::GetWidth(m_pWidget);
00471187              int32_t var_4_1 = UIRegion::GetHeight(this->m_pWidget);
00471192              float __return;
00471192              int32_t var_10;
00471192              
00471192              if ((this->m_bitField & 2) != 0)
00471192              {
004711a4                  __return = 1f;
004711ac                  UIElement::GetAttribute_Float(this, 0x88, &__return);
004711bd                  var_10 = 0;
004711c5                  UIElement::GetAttribute_Int(this, 0x89, &var_10);
004711ec                  int32_t ebx_3 = (this->m_bitField & 1);
004711ef                  int32_t var_1c_1 = (this->m_rectScrollingArea.right - this->m_rectScrollingArea.left);
004711ef                  
004711f3                  if (ebx_3 == 0)
004711f5                      var_1c_1 = (this->m_rectScrollingArea.bottom - this->m_rectScrollingArea.top);
004711f5                  
00471207                  int32_t eax_10 = _ftol2();
0047120c                  int32_t ecx_10 = var_10;
0047120c                  
00471212                  if (eax_10 < ecx_10)
00471214                      eax_10 = ecx_10;
00471214                  
00471219                  if (ebx_3 != 1)
0047121f                      var_4_1 = eax_10;
00471219                  else
0047121b                      edi_1 = eax_10;
0047121b                  
00471227                  this->m_pWidget->vtable->ResizeTo(edi_1, var_4_1);
00471192              }
00471192              
00471240              UIElement_Scrollbar::PositionToWidgetX0Y0(this, &__return, var_24);
0047124f              float __return_1 = __return;
00471257              int32_t var_14;
00471249              this->m_pWidget->vtable->MoveTo(__return_1, var_14);
00471262              int32_t eax_15;
00471262              int32_t edx_3;
00471262              edx_3 = HIGHD(((int64_t)edi_1));
00471262              eax_15 = LOWD(((int64_t)edi_1));
0047126c              int32_t edi_4 = (((eax_15 - edx_3) >> 1) + __return_1);
00471273              __return_1 = (((int8_t)this->m_bitField) & 4) == 4;
0047127f              var_10 = UIRegion::GetHeight(this);
00471288              class UIElement* ebp_2 = UIElement::GetChild(this, 4);
00471288              
0047128c              if (ebp_2 != 0)
0047128c              {
00471293                  class UIElement* eax_18;
00471293                  eax_18 = __return_1 == 0;
0047128e                  ebp_2->vtable->SetVisible(eax_18);
0047129c                  ebp_2->vtable->MoveTo(0, 0);
004712ac                  ebp_2->vtable->ResizeTo(edi_4, var_10);
0047128c              }
0047128c              
004712bf              bool cond:2_1 = (((int8_t)this->m_bitField) & 4) == 4;
004712d0              var_10 = UIRegion::GetHeight(this);
004712df              int32_t ebx_5 = (UIRegion::GetWidth(this) - edi_4);
004712e1              class UIElement* eax_22;
004712e1              int32_t ecx_24;
004712e1              eax_22 = UIElement::GetChild(this, 6);
004712e1              
004712ea              if (eax_22 != 0)
004712ea              {
004712ec                  ecx_24 = cond:2_1;
004712f5                  ecx_24 = ecx_24 == 0;
004712f0                  eax_22->vtable->SetVisible(ecx_24);
004712fe                  eax_22->vtable->MoveTo(edi_4, 0);
0047130d                  eax_22->vtable->ResizeTo(ebx_5, var_10);
004712ea              }
004712ea              
0047131b              int32_t eax_26;
0047131b              int32_t edx_8;
0047131b              edx_8 = HIGHD(((int64_t)var_4_1));
0047131b              eax_26 = LOWD(((int64_t)var_4_1));
0047132f              int32_t edi_7 = (((eax_26 - edx_8) >> 1) + var_14);
00471336              ebx_5 = (((int8_t)this->m_bitField) & 4) == 4;
00471342              var_10 = UIRegion::GetWidth(this);
00471346              class UIElement* eax_30;
00471346              int32_t ecx_31;
00471346              eax_30 = UIElement::GetChild(this, 5);
00471346              
0047134f              if (eax_30 != 0)
0047134f              {
00471356                  ecx_31 = ebx_5 == 0;
00471351                  eax_30->vtable->SetVisible(ecx_31);
0047135f                  eax_30->vtable->MoveTo(0, 0);
0047136f                  eax_30->vtable->ResizeTo(var_10, edi_7);
0047134f              }
0047134f              
00471382              bool cond:4_1 = (((int8_t)this->m_bitField) & 4) == 4;
00471395              int32_t ebx_7 = (UIRegion::GetHeight(this) - edi_7);
004713a0              var_10 = UIRegion::GetWidth(this);
004713a4              class UIElement* eax_35;
004713a4              int32_t ecx_39;
004713a4              eax_35 = UIElement::GetChild(this, 7);
004713a4              
004713ad              if (eax_35 != 0)
004713ad              {
004713af                  ecx_39 = cond:4_1;
004713b8                  ecx_39 = ecx_39 == 0;
004713b3                  eax_35->vtable->SetVisible(ecx_39);
004713c1                  eax_35->vtable->MoveTo(0, edi_7);
004713d0                  eax_35->vtable->ResizeTo(var_10, ebx_7);
004713ad              }
0047116c          }
0047116c          
004713dd          uint32_t m_bitField = this->m_bitField;
004713dd          
004713e9          if (((m_bitField & 4) == 0 || (m_bitField & 8) == 0))
004713ef              m_bitField = 0;
004713e9          else
004713eb              m_bitField = 1;
004713eb          
004713f5          m_bitField = m_bitField == 0;
004713f1          this->vtable->SetVisible(m_bitField);
004713fe          uint32_t m_bitField_1 = this->m_bitField;
004713fe          
00471409          if ((m_bitField_1 & 0x1000000) != 0)
00471409          {
0047140d              m_bitField_1 &= 4;
0047140f              m_bitField_1 -= 4;
00471411              char temp0_1 = m_bitField_1;
00471411              m_bitField_1 = -(m_bitField_1);
0047140b              this->vtable->SetState((((m_bitField_1 - m_bitField_1) & 0xfffffff4) + 0xd));
00471409          }
004710f4      }
004710d0  }

00471429                             90 90 90 90 90 90 90                                                           .......

00471430  void __thiscall UIElement_Scrollbar::ResizeTo(class UIElement_Scrollbar* this, int32_t const arg2, int32_t const arg3)

00471430  {
0047143f      UIElement_Text::ResizeTo(this, arg2, arg3);
00471446      UIElement_Scrollbar::UpdateLayout(this);
00471430  }

0047144f                                               90                                                                 .

00471450  void __thiscall UIElement_Scrollbar::HandleMouseWheel(class UIElement_Scrollbar* this, uint32_t arg2)

00471450  {
00471465      int32_t ebx;
00471465      ebx = arg2 == 5;
00471468      arg2 = 0;
00471468      
00471477      if (UIElement::GetAttribute_Float(this, 0x86, &arg2) != 0)
00471477      {
00471479          uint32_t m_bitField = this->m_bitField;
00471479          
00471482          if ((*(uint8_t*)((char*)m_bitField)[1] & 1) != 0)
00471482          {
00471484              m_bitField &= 1;
00471486              m_bitField -= 1;
00471488              char temp2 = m_bitField;
00471488              m_bitField = -(m_bitField);
00471494              int32_t ecx;
00471494              ecx = ebx != 0;
004714a6              UIElement_Scrollbar::HandleMoveSteps(this, 0x86, ((((m_bitField - m_bitField) & 2) - 1) * ((ecx * 2) - 1)));
004714ad              return;
00471482          }
00471482          
004714b0          char temp1_1 = ebx;
004714b0          ebx = -(ebx);
004714be          UIElement::BroadcastElementMessage(this, ((ebx - ebx) + 0xe), 0, 0);
00471477      }
00471450  }

004714c8                          90 90 90 90 90 90 90 90                                                          ........

004714d0  void __fastcall UIElement_Scrollbar::OnSetAttribute(class UIElement_Scrollbar* this, class BaseProperty const* arg2)

004714d0  {
004714d0      class UIElement_Scrollbar* this_1 = this;
004714d3      class BaseProperty* esi = arg2;
004714db      UIElement_Button::OnSetAttribute(this, esi);
004714db      
004714f3      switch ((BaseProperty::GetPropertyName(esi) - 0x75))
004714f3      {
0047169e          case 0:
0047169e          {
0047169e              class BasePropertyValue* m_pcPropertyValue_9 = esi->m_pcPropertyValue;
0047169e              
004716a3              if (m_pcPropertyValue_9 != 0)
004716a5                  m_pcPropertyValue_9->vtable->InqBool(&arg2);
004716a5              
004716b6              UIElement_Scrollbar::SetDisallowUpdating(this, ((int8_t)arg2));
004716bf              return;
0047169e              break;
0047169e          }
00471574          case 1:
00471574          {
00471574              class BasePropertyValue* m_pcPropertyValue_3 = esi->m_pcPropertyValue;
00471574              
00471579              if (m_pcPropertyValue_3 != 0)
0047157b                  m_pcPropertyValue_3->vtable->InqBool(&arg2);
0047157b              
0047158c              UIElement_Scrollbar::SetDisabled(this, ((int8_t)arg2));
00471593              UIElement_Scrollbar::UpdateLayout(this);
0047159c              return;
00471574              break;
00471574          }
00471764          case 2:
00471764          {
00471764              class BasePropertyValue* m_pcPropertyValue_12 = esi->m_pcPropertyValue;
00471764              
00471769              if (m_pcPropertyValue_12 != 0)
0047176b                  m_pcPropertyValue_12->vtable->InqEnum(&arg2);
0047176b              
00471781              UIElement_Scrollbar::UpdateButtonID_(this, 1, arg2);
0047178a              return;
00471764              break;
00471764          }
0047178d          case 3:
0047178d          {
0047178d              class BasePropertyValue* m_pcPropertyValue_13 = esi->m_pcPropertyValue;
0047178d              
00471792              if (m_pcPropertyValue_13 != 0)
00471794                  m_pcPropertyValue_13->vtable->InqEnum(&arg2);
00471794              
004717aa              UIElement_Scrollbar::UpdateButtonID_(this, 0, arg2);
004717b3              return;
0047178d              break;
0047178d          }
0047159f          case 4:
0047159f          {
0047159f              class BasePropertyValue* m_pcPropertyValue_4 = esi->m_pcPropertyValue;
0047159f              
004715a4              if (m_pcPropertyValue_4 != 0)
004715a6                  m_pcPropertyValue_4->vtable->InqBool(&arg2);
004715a6              
004715b7              UIElement_Scrollbar::SetHideDisabled(this, ((int8_t)arg2));
004715be              UIElement_Scrollbar::UpdateLayout(this);
004715c7              return;
0047159f              break;
0047159f          }
004715ca          case 5:
004715ca          {
004715ca              class BasePropertyValue* m_pcPropertyValue_5 = esi->m_pcPropertyValue;
004715ca              
004715cf              if (m_pcPropertyValue_5 != 0)
004715d1                  m_pcPropertyValue_5->vtable->InqBool(&arg2);
004715d1              
004715e7              UIElement_Scrollbar::SetBitMask(this, ((int8_t)arg2), 0x1000000);
004715ee              UIElement_Scrollbar::UpdateLayout(this);
004715f7              return;
004715ca              break;
004715ca          }
004714fa          case 6:
004714fa          {
004714fa              class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
004714fa              
004714ff              if (m_pcPropertyValue != 0)
00471501                  m_pcPropertyValue->vtable->InqBool(&arg2);
00471501              
00471512              UIElement_Scrollbar::SetHorizontal(this, ((int8_t)arg2));
00471519              UIElement_Scrollbar::UpdateLayout(this);
00471522              return;
004714fa              break;
004714fa          }
004715fa          case 7:
004715fa          {
004715fa              class BasePropertyValue* m_pcPropertyValue_6 = esi->m_pcPropertyValue;
004715fa              
004715ff              if (m_pcPropertyValue_6 != 0)
00471601                  m_pcPropertyValue_6->vtable->InqBool(&arg2);
00471601              
00471612              UIElement_Scrollbar::SetMoveToTouched(this, ((int8_t)arg2));
00471617              class UIElement* m_pWidget = this->m_pWidget;
0047161f              int32_t eax_4;
0047161f              
0047161f              if (m_pWidget != 0)
0047161f              {
00471621                  int32_t ebx;
00471621                  ebx = arg2;
00471629                  eax_4 = ebx == 0;
00471625                  m_pWidget->vtable->SetMouseVisible(eax_4);
0047161f              }
0047161f              
00471633              eax_4 = arg2;
00471633              
00471639              if (eax_4 == 0)
00471814                  return;
00471814              
00471645              UIElement::SetAttribute_Bool(this, 0xf, 0);
0047164e              return;
004715fa              break;
004715fa          }
00471675          case 8:
00471675          {
00471675              class BasePropertyValue* m_pcPropertyValue_8 = esi->m_pcPropertyValue;
00471675              
0047167a              if (m_pcPropertyValue_8 != 0)
0047167c                  m_pcPropertyValue_8->vtable->InqInteger(&arg2);
0047167c              
0047168c              class BaseProperty* ecx_30;
0047168c              ecx_30 = arg2 != 0;
00471692              UIElement_Scrollbar::SetHasStopLocations(this, ecx_30);
0047169b              return;
00471675              break;
00471675          }
00471651          case 0xa:
00471651          {
00471651              class BasePropertyValue* m_pcPropertyValue_7 = esi->m_pcPropertyValue;
00471651              
00471656              if (m_pcPropertyValue_7 != 0)
00471658                  m_pcPropertyValue_7->vtable->InqBool(&arg2);
00471658              
00471669              UIElement_Scrollbar::SetHasStopLocations(this, ((int8_t)arg2));
00471672              return;
00471651              break;
00471651          }
004717b6          case 0xb:
004717b6          {
004717b6              class BasePropertyValue* m_pcPropertyValue_14 = esi->m_pcPropertyValue;
004717b6              
004717bb              if (m_pcPropertyValue_14 != 0)
004717bd                  m_pcPropertyValue_14->vtable->InqFloat(&arg2);
004717bd              
004717d3              UIElement::SetAttribute_Float(this, 0x10, arg2);
004717dc              return;
004717b6              break;
004717b6          }
004717df          case 0xc:
004717df          {
004717df              class BasePropertyValue* m_pcPropertyValue_15 = esi->m_pcPropertyValue;
004717df              
004717e4              if (m_pcPropertyValue_15 != 0)
004717e6                  m_pcPropertyValue_15->vtable->InqFloat(&arg2);
004717e6              
004717fc              UIElement::SetAttribute_Float(this, 0x11, arg2);
00471805              return;
004717df              break;
004717df          }
00471549          case 0xd:
00471549          {
00471549              class BasePropertyValue* m_pcPropertyValue_2 = esi->m_pcPropertyValue;
00471549              
0047154e              if (m_pcPropertyValue_2 != 0)
00471550                  m_pcPropertyValue_2->vtable->InqBool(&arg2);
00471550              
00471561              UIElement_Scrollbar::SetProportional(this, ((int8_t)arg2));
00471568              UIElement_Scrollbar::UpdateLayout(this);
00471571              return;
00471549              break;
00471549          }
00471525          case 0xe:
00471525          {
00471525              class BasePropertyValue* m_pcPropertyValue_1 = esi->m_pcPropertyValue;
00471525              
0047152a              if (m_pcPropertyValue_1 != 0)
0047152c                  m_pcPropertyValue_1->vtable->InqBool(&arg2);
0047152c              
0047153d              UIElement_Scrollbar::SetSmoothMovement(this, ((int8_t)arg2));
00471546              return;
00471525              break;
00471525          }
00471728          case 0x10:
00471728          {
00471728              if ((this->m_bitField & 0x10) != 0)
00471728              {
0047172c                  UIElement_Scrollbar::StartAnimation(this);
00471735                  return;
00471728              }
00471728              
00471738              class BasePropertyValue* m_pcPropertyValue_11 = esi->m_pcPropertyValue;
00471738              
0047173d              if (m_pcPropertyValue_11 != 0)
0047173f                  m_pcPropertyValue_11->vtable->InqFloat(&arg2);
0047173f              
00471758              UIElement::SetAttribute_Float(this, 0x86, arg2);
00471761              return;
00471728              break;
00471728          }
004716c2          case 0x11:
004716c2          {
004716c2              class BasePropertyValue* m_pcPropertyValue_10 = esi->m_pcPropertyValue;
004716c2              
004716c7              if (m_pcPropertyValue_10 != 0)
004716c9                  m_pcPropertyValue_10->vtable->InqFloat(&this_1);
004716c9              
004716de              arg2 = this_1;
004716e5              UIElement_Scrollbar::ValidatePosition(this, &arg2);
004716ef              float ebx_1 = arg2;
004716ef              
00471704              if (AreFloatEqual(this_1, ebx_1, 0.000199999995f) != 0)
00471704              {
004715ee                  UIElement_Scrollbar::UpdateLayout(this);
004715f7                  return;
00471704              }
00471704              
00471715              UIElement::SetAttribute_Float(this, BaseProperty::GetPropertyName(esi), ebx_1);
0047171e              return;
004716c2              break;
004716c2          }
004715ee          case 0x13:
004715ee          case 0x14:
004715ee          {
004715ee              UIElement_Scrollbar::UpdateLayout(this);
004715f7              return;
004715ee              break;
004715ee          }
004714f3          default:
004714f3          {
0047180b              UIElement_Button::OnSetAttribute(this, esi);
00471814              return;
004714f3          }
004714f3      }
004714d0  }

00471817                                                                       90                                                 .
00471818  uint32_t jump_table_471818[0x15] = 
00471818  {
00471818      [0x00] =  0x0047169e
0047181c      [0x01] =  0x00471574
00471820      [0x02] =  0x00471764
00471824      [0x03] =  0x0047178d
00471828      [0x04] =  0x0047159f
0047182c      [0x05] =  0x004715ca
00471830      [0x06] =  0x004714fa
00471834      [0x07] =  0x004715fa
00471838      [0x08] =  0x00471675
0047183c      [0x09] =  0x00471808
00471840      [0x0a] =  0x00471651
00471844      [0x0b] =  0x004717b6
00471848      [0x0c] =  0x004717df
0047184c      [0x0d] =  0x00471549
00471850      [0x0e] =  0x00471525
00471854      [0x0f] =  0x00471808
00471858      [0x10] =  0x00471721
0047185c      [0x11] =  0x004716c2
00471860      [0x12] =  0x00471808
00471864      [0x13] =  0x004715ec
00471868      [0x14] =  0x004715ec
0047186c  }

0047186c                                      90 90 90 90                                                              ....

00471870  enum UIElementMessageListenResult __thiscall UIElement_Scrollbar::ListenToElementMessage(class UIElement_Scrollbar* this, struct UIElementMessageInfo const* arg2)

00471870  {
00471875      struct UIElementMessageInfo* ebp = arg2;
0047187c      class UIElement* pElement = ebp->pElement;
0047187c      
00471892      if ((pElement == this->m_pWidget || (pElement == this && (this->m_bitField & 0x40) != 0)))
0047189b          arg2 = 1;
00471892      else
00471894          arg2 = 0;
00471894      
004718b6      int32_t* eax_3 = pElement->m_mouseDownTable.m_intrusiveTable.m_buckets[(COMBINE(0, 7) % pElement->m_mouseDownTable.m_intrusiveTable.m_numBuckets)];
004718ba      int32_t ebx;
004718ba      
004718ba      if (eax_3 == 0)
004718ba      {
004718e8      label_4718e8:
004718e8          int32_t* eax_7 = pElement->m_mouseDownTable.m_intrusiveTable.m_buckets[(COMBINE(0, 0xa) % pElement->m_mouseDownTable.m_intrusiveTable.m_numBuckets)];
004718e8          
004718ec          if (eax_7 == 0)
00471904              ebx = 0;
004718ec          else
004718ec          {
004718f3              while (*(uint32_t*)eax_7 != 0xa)
004718f3              {
004718f5                  eax_7 = eax_7[1];
004718f5                  
004718fa                  if (eax_7 == 0)
004718fa                  {
004718fc                      ebx = 0;
004718fe                      goto label_47190a;
004718fa                  }
004718f3              }
004718f3              
00471902              if (eax_7 != 0)
00471908                  ebx = 1;
00471902              else
00471904                  ebx = 0;
004718ec          }
004718ba      }
004718ba      else
004718ba      {
004718c3          while (*(uint32_t*)eax_3 != 7)
004718c3          {
004718c5              eax_3 = eax_3[1];
004718c5              
004718ca              if (eax_3 == 0)
004718ca                  goto label_4718e8;
004718c3          }
004718c3          
004718d0          if (eax_3 == 0)
004718d0              goto label_4718e8;
004718d0          
00471908          ebx = 1;
004718ba      }
004718ba      
0047190a  label_47190a:
0047190a      uint32_t dwParam1 = ebp->dwParam1;
00471915      uint32_t edx_1;
00471915      
00471915      if ((dwParam1 == 7 || dwParam1 == 0xa))
0047191b          edx_1 = 1;
00471915      else
00471917          edx_1 = 0;
00471917      
00471920      void* eax_9 = (ebp->idMessage - 2);
00471920      
00471926      if (eax_9 <= 0x1c)
00471926      {
00471933          int32_t edi;
00471933          int32_t var_48_1 = edi;
00471934          uint32_t eax_10;
00471934          
00471934          switch (eax_9)
00471934          {
0047193b              case nullptr:
0047193b              {
0047193b                  uint32_t idElement = ebp->idElement;
0047193b                  
0047194c                  if ((idElement == this->m_eIncrementButtonID || idElement == this->m_eDecrementButtonID))
0047194c                  {
004719bd                      UIElement_Scrollbar::HandleButtonClick(this, ebp);
004719d1                      return UIElement_Button::ListenToElementMessage(this, ebp);
0047194c                  }
0047194c                  
00471950                  if (pElement == this)
00471950                  {
0047195b                      void var_28;
0047195b                      UIElementMessageInfo::UIElementMessageInfo(&var_28, ebp);
00471968                      int32_t eax_11 = ICIDM::s_cidm->vtable->GetMouseX();
00471975                      int32_t var_14 = eax_11;
00471979                      int32_t eax_13 = ICIDM::s_cidm->vtable->GetMouseY();
00471980                      int32_t var_10 = eax_13;
0047198d                      int32_t var_c = (eax_11 - UIRegion::GetScreenX0(this));
0047199f                      int32_t var_8 = (eax_13 - UIRegion::GetScreenY0(this));
004719a3                      UIElement_Scrollbar::HandlePageClick(this, &var_28);
00471950                  }
0047193b                  break;
0047193b              }
004719d4              case 0x1a:
004719d4              {
004719d4                  eax_10 = arg2;
004719d4                  
004719e2                  if ((eax_10 != 0 && ebx != 0))
004719eb                      UIElement_Scrollbar::StartWidgetDrag(this, ebp);
004719d4                  break;
004719d4              }
00471a02              case 0x1b:
00471a02              {
00471a02                  eax_10 = arg2;
00471a02                  
00471a10                  if ((eax_10 != 0 && edx_1 != 0))
00471a10                  {
00471a16                      eax_10 = this->m_bWidgetDragActive;
00471a16                      
00471a1e                      if (eax_10 != 0)
00471a28                          this->m_bWidgetDragActive = 0;
00471a10                  }
00471a02                  break;
00471a02              }
00471a3d              case 0x1c:
00471a3d              {
00471a3d                  eax_10 = arg2;
00471a3d                  
00471a4b                  if ((eax_10 != 0 && ebx != 0))
00471a4b                  {
00471a59                      int32_t __return;
00471a59                      UIElement_Scrollbar::GetScrollbarPositionFromMessage(this, &__return, ebp);
00471a6a                      int32_t eax_21;
00471a6a                      int32_t edx_4;
00471a6a                      edx_4 = HIGHD(((int64_t)UIElement_Scrollbar::GetSecondaryCoordinate(this, &__return)));
00471a6a                      eax_21 = LOWD(((int64_t)UIElement_Scrollbar::GetSecondaryCoordinate(this, &__return)));
00471a6a                      
00471a72                      if (((eax_21 ^ edx_4) - edx_4) <= 0x64)
00471a72                      {
00471ab2                          if ((this->m_bitField & 0x40) == 0)
00471ab2                          {
00471ac7                              int32_t __return_1 = __return;
00471acb                              int32_t x = this->m_ptDragStart.x;
00471ad1                              int32_t y = this->m_ptDragStart.y;
00471adb                              int32_t __return_2 = __return_1;
00471ae1                              __return_2 = (__return_1 - x);
00471aef                              int32_t var_34;
00471aef                              int32_t var_2c_1 = (var_34 - y);
00471afb                              UIElement_Scrollbar::ScrollNPixelsFromReset(this, &__return_2, this->m_bWidgetDragActive);
00471ab2                          }
00471ab2                          else
00471ac0                              UIElement_Scrollbar::ScrollToPoint(this, ebp, this->m_bWidgetDragActive);
00471ac0                          
00471b00                          this->m_bWidgetDragActive = 1;
00471a72                      }
00471a72                      else
00471a72                      {
00471a74                          int32_t eax_23;
00471a74                          eax_23 = this->m_bWidgetDragActive;
00471a74                          
00471a7c                          if (eax_23 != 0)
00471a7c                          {
00471a8d                              UIElement_Scrollbar::SetScrollbarPosition(this, this->m_fResetPosition, 0);
00471a96                              this->m_bWidgetDragActive = 0;
00471a7c                          }
00471a72                      }
00471a4b                  }
00471a3d                  break;
00471a3d              }
00471934          }
00471926      }
00471926      
00471b16      return UIElement_Button::ListenToElementMessage(this, ebp);
00471870  }

00471b19                                                                             8d 49 00                                       .I.
00471b1c  uint32_t jump_table_471b1c[0x5] = 
00471b1c  {
00471b1c      [0x0] =  0x0047193b
00471b20      [0x1] =  0x004719d4
00471b24      [0x2] =  0x00471a02
00471b28      [0x3] =  0x00471a3d
00471b2c      [0x4] =  0x00471b07
00471b30  }
00471b30  uint8_t lookup_table_471b30[0x1d] = 
00471b30  {
00471b30      [0x00] =  0x00
00471b31      [0x01] =  0x04
00471b32      [0x02] =  0x04
00471b33      [0x03] =  0x04
00471b34      [0x04] =  0x04
00471b35      [0x05] =  0x04
00471b36      [0x06] =  0x04
00471b37      [0x07] =  0x04
00471b38      [0x08] =  0x04
00471b39      [0x09] =  0x04
00471b3a      [0x0a] =  0x04
00471b3b      [0x0b] =  0x04
00471b3c      [0x0c] =  0x04
00471b3d      [0x0d] =  0x04
00471b3e      [0x0e] =  0x04
00471b3f      [0x0f] =  0x04
00471b40      [0x10] =  0x04
00471b41      [0x11] =  0x04
00471b42      [0x12] =  0x04
00471b43      [0x13] =  0x04
00471b44      [0x14] =  0x04
00471b45      [0x15] =  0x04
00471b46      [0x16] =  0x04
00471b47      [0x17] =  0x04
00471b48      [0x18] =  0x04
00471b49      [0x19] =  0x04
00471b4a      [0x1a] =  0x01
00471b4b      [0x1b] =  0x02
00471b4c      [0x1c] =  0x03
00471b4d  }

00471b4d                                         90 90 90                                                               ...

00471b50  void __thiscall UIElement_Button::UIElement_Button(class UIElement_Button* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00471b50  {
00471b5f      UIElement_Text::UIElement_Text(this, arg2, arg3);
00471b66      this->mousePressedOnButton = 0;
00471b6c      this->hotClickingInProgress = 0;
00471b72      this->nextHotClickTime = 0f;
00471b78      *(uint32_t*)((char*)this->nextHotClickTime)[4] = 0;
00471b7e      this->vtable = 0x79d228;
00471b84      this->vtable = &UIOption_Menu::`vftable';
00471b50  }

00471b94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00471ba0  class UIElement* __thiscall UIElement_Button::DynamicCast(class UIElement_Button* this, uint32_t arg2) __pure

00471ba0  {
00471bae      if ((arg2 == 1 || arg2 == 0xc))
00471bbb          return this;
00471bbb      
00471bb5      int32_t edx_1;
00471bb5      edx_1 = arg2 != 0xa;
00471bb9      return (this & (edx_1 - 1));
00471ba0  }

00471bbe                                                                                            90 90                                ..

00471bc0  void __fastcall UIElement_Button::~UIElement_Button(class UIElement_Button* this)

00471bc0  {
00471bc9      bool cond:0 = this->hotClickingInProgress == 0;
00471bcb      this->vtable = 0x79d228;
00471bd1      this->vtable = &UIOption_Menu::`vftable';
00471bd1      
00471bdb      if (!(cond:0))
00471bdb      {
00471bdf          this->hotClickingInProgress = 0;
00471be6          UIListener::UnRegisterForGlobalMessage(this, 3);
00471bdb      }
00471bdb      
00471bee      /* tailcall */
00471bee      return UIElement_Text::~UIElement_Text(this);
00471bc0  }

00471bf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00471c00  class UIElement* UIElement_Button::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00471c00  {
00471c07      void* result = operator new(0x720);
00471c07      
00471c15      if (result == 0)
00471c59          return 0;
00471c59      
00471c23      UIElement_Text::UIElement_Text(result, arg1, arg2);
00471c28      *(uint8_t*)((char*)result + 0x710) = 0;
00471c2e      *(uint8_t*)((char*)result + 0x711) = 0;
00471c34      *(uint32_t*)((char*)result + 0x718) = 0;
00471c3a      *(uint32_t*)((char*)result + 0x71c) = 0;
00471c40      *(uint32_t*)result = 0x79d228;
00471c46      *(uint32_t*)((char*)result + 0x608) = 0x7c126c;
00471c54      return result;
00471c00  }

00471c5a                                                                                90 90 90 90 90 90                            ......

00471c60  void __thiscall UIElement_Button::ListenToGlobalMessage(class UIElement_Button* this, uint32_t arg2, int32_t arg3)

00471c60  {
00471c6e      int16_t eax;
00471c6e      int80_t st0;
00471c6e      eax = UIElement_Text::ListenToGlobalMessage(this, arg2, arg3);
00471c6e      
00471c76      if (arg2 == 3)
00471c76      {
00471c78          eax = this->hotClickingInProgress;
00471c78          
00471c80          if (eax != 0)
00471c80          {
00471c88              long double x87_r7_1 = ((long double)Timer::cur_time);
00471c8e              char ecx = (*(uint8_t*)((char*)this->__bitfield164 + 0) & 1);
00471c8e              
00471c91              if (ecx == 0)
00471c91              {
00471c93                  long double temp1_1 = ((long double)this->nextHotClickTime);
00471c93                  (x87_r7_1 - temp1_1);
00471c93                  
00471c9e                  if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00471ca0                      this->nextHotClickTime = ((double)x87_r7_1);
00471c91              }
00471c91              
00471ca8              if (ecx != 0)
00471ca8              {
00471caa                  long double temp2_1 = ((long double)this->nextHotClickTime);
00471caa                  (x87_r7_1 - temp2_1);
00471caa                  
00471cb5                  if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
00471cb5                  {
00471cbf                      UIElement::BroadcastElementMessage(this, 2, 0, 0);
00471ccd                      UIElement::GetAttribute_Float(this, 0x11, &arg3);
00471cdd                      this->nextHotClickTime = ((double)(((long double)arg3) + ((long double)this->nextHotClickTime)));
00471cb5                  }
00471ca8              }
00471c80          }
00471c76      }
00471c60  }

00471cee                                            90 90                                                                ..

00471cf0  void __fastcall UIElement_Button::UpdateState_(class UIElement_Button* this)

00471cf0  {
00471cf0      class UIElement_Button* this_1 = this;
00471cfc      UIElement::GetAttribute_Bool(this, 0xd, &*(uint32_t*)((char*)this_1)[1]);
00471d07      uint32_t edi;
00471d07      
00471d07      if (*(uint8_t*)((char*)this_1)[1] == 0)
00471d07      {
00471d10          int32_t ebx;
00471d10          int32_t var_10_1 = ebx;
00471d1a          UIElement::GetAttribute_Bool(this, 0xe, &*(uint32_t*)((char*)this_1)[2]);
00471d28          int32_t eax_1;
00471d28          int32_t ecx_2;
00471d28          eax_1 = UIElement::GetAttribute_Bool(this, 0x13, &*(uint32_t*)((char*)this_1)[3]);
00471d2d          eax_1 = *(uint8_t*)((char*)this_1)[2];
00471d31          ecx_2 = eax_1;
00471d33          char temp0_1 = ecx_2;
00471d33          ecx_2 = -(ecx_2);
00471d3d          edi = (((ecx_2 - ecx_2) & 5) + 1);
00471d3f          uint32_t ecx_5;
00471d3f          ecx_5 = this->mousePressedOnButton;
00471d3f          
00471d47          if (ecx_5 != 0)
00471d47          {
00471d59          label_471d59:
00471d59              ebx = eax_1;
00471d5b              char temp1_1 = ebx;
00471d5b              ebx = -(ebx);
00471d65              edi = (((ebx - ebx) & 5) + 2);
00471d47          }
00471d47          else
00471d47          {
00471d49              ebx = *(uint8_t*)((char*)this_1)[3];
00471d49              
00471d57              if ((ebx != 0 && (*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0))
00471d57                  goto label_471d59;
00471d47          }
00471d47          
00471d72          if ((ecx_5 != 0 && (*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0))
00471d72          {
00471d74              char temp2_1 = eax_1;
00471d74              eax_1 = -(eax_1);
00471d7e              edi = (((eax_1 - eax_1) & 5) + 3);
00471d72          }
00471d07      }
00471d07      else
00471d09          edi = 0xd;
00471d09      
00471d8e      if (ElementDesc::AccessStateDesc(&this->m_desc, edi) != 0)
00471d90          this->vtable->SetState(edi);
00471cf0  }

00471d9f                                                                                               90                                 .

00471da0  uint8_t __fastcall UIElement_Button::SetState(class UIElement_Button* this, uint32_t arg2)

00471da0  {
00471da0      class UIElement_Button* this_1 = this;
00471db1      bool cond:0 = UIElement::GetAttribute_Bool(this, 0xb, &*(uint32_t*)((char*)this_1)[3]) == 0;
00471db3      uint32_t edi = arg2;
00471db3      
00471db7      if (!(cond:0))
00471db7      {
00471dc2          UIElement::GetAttribute_Bool(this, 0xe, &arg2);
00471dc2          
00471dca          if (edi != 6)
00471dca          {
00471df2              if ((edi == 1 && arg2 != 0))
00471df2              {
00471dfa                  UIElement::SetAttribute_Bool(this, 0xe, 0);
00471e00                  int32_t eax_3;
00471e00                  eax_3 = 1;
00471e04                  return 1;
00471df2              }
00471dca          }
00471dca          else if (arg2 == 0)
00471dd2          {
00471dda              UIElement::SetAttribute_Bool(this, 0xe, 1);
00471de0              int32_t eax_2;
00471de0              eax_2 = 1;
00471de4              return 1;
00471dd2          }
00471db7      }
00471db7      
00471e10      int32_t ebx;
00471e10      ebx = edi == 0xd;
00471e17      arg2 = ebx;
00471e1b      *(uint8_t*)((char*)this_1)[2] = 0;
00471e20      UIElement::GetAttribute_Bool(this, 0xd, &*(uint32_t*)((char*)this_1)[2]);
00471e2a      class UIElement* this_2 = this;
00471e2a      
00471e2c      if (ebx == *(uint8_t*)((char*)this_1)[2])
00471e4b          return UIElement::SetState(this_2, edi);
00471e4b      
00471e35      UIElement::SetAttribute_Bool(this_2, 0xd, ((int8_t)arg2));
00471e3b      int32_t eax_5;
00471e3b      eax_5 = 1;
00471e3f      return 1;
00471da0  }

00471e4e                                            90 90                                                                ..

00471e50  uint8_t const __fastcall UIElement_Button::HandleButtonClick(class UIElement_Button* this, struct UIElementMessageInfo const* arg2)

00471e50  {
00471e5c      int32_t ebx;
00471e5c      ebx = 0;
00471e65      int32_t var_4c;
00471e65      
00471e65      if (UIElement::GetAttribute_Enum(this, 0x12, &var_4c) != 0)
00471e65      {
00471e6b          ebx = 1;
00471e72          int32_t eax_1;
00471e72          
00471e72          if (var_4c == 1)
00471e72          {
00471ec4              eax_1 = 0;
00471eca              return 0;
00471e72          }
00471e72          
00471e74          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00471e74          
00471e7c          if (ICIDM::s_cidm_1 == 0)
00471e7c          {
00471ec4              eax_1 = 0;
00471eca              return 0;
00471e7c          }
00471e7c          
00471e85          if (ICIDM::s_cidm_1->vtable->GetActionMap() == 0)
00471e85          {
00471ec4              eax_1 = 0;
00471eca              return 0;
00471e85          }
00471e85          
00471e87          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00471e87          
00471e8f          if (UIElementManager::s_pInstance_1 == 0)
00471e8f          {
00471ec4              eax_1 = 0;
00471eca              return 0;
00471e8f          }
00471e8f          
00471e95          int32_t var_48;
00471e95          InputEvent::InputEvent(&var_48);
00471e9e          var_48 = var_4c;
00471ea6          int32_t var_2c_1 = 3;
00471eae          char var_28_1 = 1;
00471eb2          UIElementManager::s_pInstance_1->vtable->__vecDelDtor(&var_48);
00471e65      }
00471e65      
00471ec0      return ebx;
00471e50  }

00471ecd                                         90 90 90                                                               ...

00471ed0  void* __thiscall UIElement_Button::`scalar deleting destructor'(class UIElement_Button* this, uint32_t arg2)

00471ed0  {
00471ed9      bool cond:0 = this->hotClickingInProgress == 0;
00471edb      this->vtable = 0x79d228;
00471ee1      this->vtable = &UIOption_Menu::`vftable';
00471ee1      
00471eeb      if (!(cond:0))
00471eeb      {
00471eef          this->hotClickingInProgress = 0;
00471ef6          UIListener::UnRegisterForGlobalMessage(this, 3);
00471eeb      }
00471eeb      
00471efd      UIElement_Text::~UIElement_Text(this);
00471efd      
00471f07      if ((arg2 & 1) != 0)
00471f0a          operator delete(this);
00471f0a      
00471f15      return this;
00471ed0  }

00471f18                                                                          90 90 90 90 90 90 90 90                          ........

00471f20  void UIElement_Button::Register()

00471f20  {
00471f27      UIElement::RegisterElementClass(1, UIElement_Button::Create);
00471f20  }


00471f30  void __fastcall UIElement_Button::PostInit(class UIElement_Button* this)

00471f30  {
00471f33      UIElement_Scrollable::PostInit(this);
00471f3b      /* tailcall */
00471f3b      return UIElement_Button::UpdateState_(this);
00471f30  }


00471f40  void __thiscall UIElement_Button::OnSetAttribute(class UIElement_Button* this, class BaseProperty const* arg2)

00471f40  {
00471f42      class BaseProperty* edi = arg2;
00471f49      UIElement_Text::OnSetAttribute(this, edi);
00471f49      
00471f5d      switch ((BaseProperty::GetPropertyName(edi) - 0xd))
00471f5d      {
00471f66          case 0:
00471f66          {
00471f66              UIElement_Button::UpdateState_(this);
00471f6b              struct UIElement_Button::VTable* vtable = this->vtable;
00471f78              vtable->SetMouseVisible(vtable->GetShouldBeMouseVisible());
00471f66              break;
00471f66          }
00471f85          case 1:
00471f85          case 6:
00471f85          {
00471f85              UIElement_Button::UpdateState_(this);
00471f85              break;
00471f85          }
00471f8f          case 2:
00471f8f          {
00471f8f              class BasePropertyValue* m_pcPropertyValue = edi->m_pcPropertyValue;
00471f94              arg2 = 0;
00471f94              
00471f99              if (m_pcPropertyValue != 0)
00471f9b                  m_pcPropertyValue->vtable->InqBool(&arg2);
00471f9b              
00471fa5              int32_t eax_1;
00471fa5              eax_1 = this->hotClickingInProgress;
00471fa5              
00471fad              if (eax_1 != 0)
00471fad              {
00471faf                  eax_1 = arg2;
00471faf                  
00471fb5                  if (eax_1 == 0)
00471fb5                  {
00471fbb                      this->hotClickingInProgress = 0;
00471fc2                      UIListener::UnRegisterForGlobalMessage(this, 3);
00471fb5                  }
00471fad              }
00471f8f              break;
00471f8f          }
00471f5d      }
00471f40  }

00471fcc  uint32_t jump_table_471fcc[0x7] = 
00471fcc  {
00471fcc      [0x0] =  0x00471f64
00471fd0      [0x1] =  0x00471f83
00471fd4      [0x2] =  0x00471f8f
00471fd8      [0x3] =  0x00471fc7
00471fdc      [0x4] =  0x00471fc7
00471fe0      [0x5] =  0x00471fc7
00471fe4      [0x6] =  0x00471f83
00471fe8  }

00471fe8                          90 90 90 90 90 90 90 90                                                          ........

00471ff0  void __fastcall UIElement_Button::MouseDown(class UIElement_Button* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00471ff0  {
00471ff0      class UIElement_Button* this_1 = this;
00471ff7      uint32_t edi = arg4;
00472006      UIElement_Text::MouseDown(this, arg2, arg3, edi);
0047200b      union __inner23 = this->__inner23;
0047200b      
00472028      if (((((((int8_t)(__inner23 >> 0x17)) & 1) == 0 && edi == 0xa) || edi == 7 != 0) && ((((int8_t)(__inner23 >> 0x13)) & 1) == 0 && (((int8_t)(__inner23 >> 0x12)) & 1) == 0)))
00472028      {
00472049          this->mousePressedOnButton = 1;
00472050          UIElement_Button::UpdateState_(this);
0047205e          UIElement::GetAttribute_Bool(this, 0xd, &arg4);
0047206c          UIElement::GetAttribute_Bool(this, 0xc, &arg3);
0047206c          
0047207f          if ((arg4 == 0 || arg3 != 0))
0047207f          {
0047208a              UIElement::GetAttribute_Bool(this, 0xf, &arg2);
0047208a              
00472095              if (arg2 != 0)
00472095              {
0047209e                  UIElement::BroadcastElementMessage(this, 2, edi, 0);
004720a7                  this->hotClickingInProgress = 1;
004720ae                  UIListener::RegisterForGlobalMessage(this, 3);
004720bc                  UIElement::GetAttribute_Float(this, 0x10, &this_1);
004720cb                  this->nextHotClickTime = ((double)(((long double)this_1) + ((long double)Timer::cur_time)));
00472095              }
0047207f          }
00472028      }
00471ff0  }

004720d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004720e0  void __fastcall UIElement_Button::MouseUp(class UIElement_Button* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

004720e0  {
004720e0      class UIElement_Button* this_1 = this;
004720e8      uint32_t edi = arg4;
004720f7      UIElement_Text::MouseUp(this, arg2, arg3, edi);
00472105      UIElement::GetAttribute_Bool(this, 0xd, &arg3);
00472113      UIElement::GetAttribute_Bool(this, 0xc, &*(uint32_t*)((char*)this_1)[3]);
0047211e      int32_t ebx;
0047211e      ebx = 0;
0047211e      
00472130      if ((this->mousePressedOnButton != 0 && (edi == 7 || edi == 0xa)))
00472130      {
00472145          if (((*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0 && arg3 == 0))
00472145          {
00472150              arg4 = 0;
00472155              UIElement::GetAttribute_Bool(this, 0xb, &arg4);
00472155              
00472160              if (arg4 != 0)
00472160              {
0047216b                  UIElement::GetAttribute_Bool(this, 0xe, &arg2);
0047217e                  UIElement::SetAttribute_Bool(this, 0xe, arg2 == 0);
00472160              }
00472160              
00472189              if (arg3 == 0)
00472189              {
0047219b                  if (this->hotClickingInProgress != 0)
004721a1                      ebx = 0;
0047219b                  else
0047219d                      ebx = 1;
00472189              }
00472189              else if ((*(uint8_t*)((char*)this_1)[3] == 0 || this->hotClickingInProgress != 0))
004721a1                  ebx = 0;
0047219b              else
0047219d                  ebx = 1;
00472145          }
00472145          
004721a9          bool cond:0_1 = this->hotClickingInProgress == 0;
004721ab          this->mousePressedOnButton = 0;
004721ab          
004721b2          if (!(cond:0_1))
004721b2          {
004721b8              this->hotClickingInProgress = 0;
004721bf              UIListener::UnRegisterForGlobalMessage(this, 3);
004721b2          }
004721b2          
004721c6          UIElement_Button::UpdateState_(this);
004721c6          
004721cd          if (ebx != 0)
004721d7              UIElement::BroadcastElementMessage(this, 1, 7, 0);
00472130      }
004720e0  }

004721e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004721f0  void __thiscall UIElement_Button::MouseOverTop(class UIElement_Button* this, uint8_t arg2)

004721f0  {
004721f8      UIElement::MouseOverTop(this, arg2);
004721ff      UIElement_Button::UpdateState_(this);
004721f0  }

00472208                          90 90 90 90 90 90 90 90                                                          ........

00472210  enum UIElementMessageListenResult __thiscall UIElement_Button::ListenToElementMessage(class UIElement_Button* this, struct UIElementMessageInfo const* arg2)

00472210  {
00472212      struct UIElementMessageInfo* edi = arg2;
00472212      
00472223      if ((edi->pElement == this && edi->idMessage == 1))
00472223      {
0047222c          struct UIElementMessageInfo* edx_1 = UIElement::GetAttribute_Bool(this, 0xd, &arg2);
0047222c          
00472237          if (arg2 != 0)
0047224c              return 2;
0047224c          
00472239          struct UIElementMessageInfo* var_c_2 = edi;
00472239          
00472243          if (UIElement_Button::HandleButtonClick(this, edx_1) != 0)
0047224c              return 2;
00472223      }
00472223      
00472259      return UIElement_Text::ListenToElementMessage(this, edi);
00472210  }

0047225c                                                                                      90 90 90 90                              ....

00472260  uint8_t __thiscall UIElement_Button::InqAvailableProperties(class UIElement_Button const* this, class AvailablePropertySet* arg2)

00472260  {
00472263      class AvailablePropertySet* edi = arg2;
00472268      int32_t ebx;
00472268      ebx = 1;
00472268      
00472271      if (UIElement_Text::InqAvailableProperties(this, edi) == 0)
00472273          ebx = 0;
00472273      
00472279      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0047227e      class AvailablePropertySet* esi = arg2;
0047227e      
00472284      if (esi == 0)
00472284      {
00472288          int32_t eax_1;
00472288          eax_1 = 0;
0047228b          return 0;
00472284      }
00472284      
0047229a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 1, edi) == 0)
0047229c          ebx = 0;
0047229c      
004722a2      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
004722aa      return ebx;
00472260  }

004722ad                                         90 90 90                                                               ...

004722b0  void __thiscall UIElement_Field::UIElement_Field(class UIElement_Field* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004722b0  {
004722bf      UIElement::UIElement(this, arg2, arg3);
004722c6      this->m_rolloverStateChange = 0;
004722cc      this->m_oldState = 0;
004722d2      this->vtable = 0x79d368;
004722b0  }

004722de                                                                                            90 90                                ..

004722e0  class UIElement* __thiscall UIElement_Field::DynamicCast(class UIElement_Field* this, uint32_t arg2) __pure

004722e0  {
004722e9      int32_t eax;
004722e9      eax = arg2 != 3;
004722ef      return ((eax - 1) & this);
004722e0  }

004722f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00472300  void __fastcall UIElement_Field::~UIElement_Field(class UIElement_Field* this)

00472300  {
00472300      this->vtable = 0x79d368;
00472306      /* tailcall */
00472306      return UIElement::~UIElement(this);
00472300  }

0047230b                                   90 90 90 90 90                                                             .....

00472310  class UIElement* UIElement_Field::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00472310  {
00472316      void* result = operator new(0x5f8);
00472316      
00472322      if (result == 0)
00472353          return 0;
00472353      
00472330      UIElement::UIElement(result, arg1, arg2);
00472335      *(uint32_t*)result = 0x79d368;
0047233b      *(uint8_t*)((char*)result + 0x5f0) = 0;
00472342      *(uint32_t*)((char*)result + 0x5f4) = 0;
0047234f      return result;
00472310  }

00472354                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00472360  void __fastcall UIElement_Field::MouseOverTop(class UIElement_Field* this, uint8_t arg2)

00472360  {
00472360      class UIElement_Field* this_1 = this;
00472362      char ebx = ((int8_t)arg2);
0047236a      UIElement::MouseOverTop(this, ebx);
0047236a      
00472371      if (ebx != 0)
00472371      {
0047239e          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
0047239e          
004723a5          if (UIElementManager::s_pInstance_1 != 0)
004723a5          {
004723ac              class UIElement* m_dragElement = UIElementManager::s_pInstance_1->m_dragElement;
004723ac              
004723b4              if (m_dragElement != 0)
004723b4              {
004723c3                  UIElement::GetAttribute_Bool(this, 0x36, &arg2);
004723c3                  
004723ce                  if (arg2 != 0)
004723ce                  {
004723d9                      UIElement::GetAttribute_Bool(this, 0x70, &*(uint32_t*)((char*)this_1)[2]);
004723d9                      
004723e4                      if (*(uint8_t*)((char*)this_1)[2] != 0)
004723e4                      {
004723ef                          UIElement::GetAttribute_Bool(this, 0x38, &*(uint32_t*)((char*)this_1)[3]);
004723f6                          char eax_4 = this->m_dragDropCallback(m_dragElement, this);
00472401                          int32_t ecx_6;
00472401                          
00472401                          if (eax_4 != 0)
00472409                              ecx_6 = 9;
00472409                          
0047240e                          if ((eax_4 == 0 || *(uint8_t*)((char*)this_1)[3] != 0))
00472410                              ecx_6 = 0xa;
00472410                          
00472415                          uint32_t m_state = this->m_state;
00472415                          
0047241d                          if (ecx_6 != m_state)
0047241d                          {
00472427                              if (this->m_rolloverStateChange == 0)
00472427                              {
00472429                                  this->m_rolloverStateChange = 1;
00472430                                  this->m_oldState = m_state;
00472427                              }
00472427                              
00472436                              this->vtable->SetState(ecx_6);
0047241d                          }
004723e4                      }
004723ce                  }
004723b4              }
004723a5          }
00472371      }
00472371      else if (this->m_rolloverStateChange != 0)
0047237b      {
00472387          this->vtable->SetState(this->m_oldState);
00472392          this->m_rolloverStateChange = ebx;
0047237b      }
00472360  }

00472448                          90 90 90 90 90 90 90 90                                                          ........

00472450  uint8_t __thiscall UIElement_Field::CatchDroppedItem(class UIElement_Field* this, class DragDropInfo* arg2)

00472450  {
0047245b      if (this->m_rolloverStateChange != 0)
0047245b      {
00472463          this->vtable->SetState(this->m_oldState);
0047246e          this->m_rolloverStateChange = 0;
0047245b      }
0047245b      
00472482      return UIElement::CatchDroppedItem(this, arg2);
00472450  }

00472485                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00472490  void* __thiscall UIElement_Field::`scalar deleting destructor'(class UIElement_Field* this, uint32_t arg2)

00472490  {
00472493      this->vtable = 0x79d368;
00472499      UIElement::~UIElement(this);
00472499      
004724a3      if ((arg2 & 1) != 0)
004724a6          operator delete(this);
004724a6      
004724b1      return this;
00472490  }

004724b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004724c0  void UIElement_Field::Register()

004724c0  {
004724c7      UIElement::RegisterElementClass(3, UIElement_Field::Create);
004724c0  }


004724d0  uint8_t __thiscall UIElement_Field::InqAvailableProperties(class UIElement_Field const* this, class AvailablePropertySet* arg2)

004724d0  {
004724d3      class AvailablePropertySet* edi = arg2;
004724d8      int32_t ebx;
004724d8      ebx = 1;
004724d8      
004724e1      if (UIElement::InqAvailableProperties(this, edi) == 0)
004724e3          ebx = 0;
004724e3      
004724e9      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
004724ee      class AvailablePropertySet* esi = arg2;
004724ee      
004724f4      if (esi == 0)
004724f4      {
004724f8          int32_t eax_1;
004724f8          eax_1 = 0;
004724fb          return 0;
004724f4      }
004724f4      
0047250a      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 9, edi) == 0)
0047250c          ebx = 0;
0047250c      
00472512      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
0047251a      return ebx;
004724d0  }

0047251d                                                                                         90 90 90                               ...

00472520  uint8_t LinebreakUtils::IsWhiteSpace(uint16_t arg1) __pure

00472520  {
00472535      if ((arg1 != 9 && (arg1 != 0xd && arg1 != 0x20)))
00472539          return 0;
00472539      
0047253f      return 1;
00472520  }


00472540  uint8_t LinebreakUtils::IsNonBeginningChar(uint16_t arg1) __pure

00472540  {
00472597      if ((arg1 != 0x21 && (arg1 != 0x29 && (arg1 != 0x2c && (arg1 != 0x2e && (arg1 != 0x3f && (arg1 != 0x3001 && (arg1 != 0x3002 && (arg1 != 0x30fc && (arg1 != 0xff01 && (arg1 != 0xff09 && (arg1 != 0xff1f && (arg1 != 0xff70 && (arg1 != 0xff9e && arg1 != 0xff9f))))))))))))))
0047259b          return 0;
0047259b      
004725a1      return 1;
00472540  }

004725a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004725b0  uint8_t LinebreakUtils::IsNonEndingChar(uint16_t arg1) __pure

004725b0  {
004725bf      if ((arg1 != 0x28 && arg1 != 0xff08))
004725c3          return 0;
004725c3      
004725c9      return 1;
004725b0  }

004725ca                                90 90 90 90 90 90                                                            ......

004725d0  uint8_t LinebreakUtils::IsEastAsianChar(uint16_t arg1) __pure

004725d0  {
00472603      if (((arg1 < 0x1100 || arg1 > 0x11ff) && ((arg1 < 0x3000 || arg1 > 0xd7af) && ((arg1 < 0xf900 || arg1 > 0xfaff) && (arg1 < 0xff00 || arg1 > 0xffdc)))))
0047260d          return 0;
0047260d      
0047260a      return 1;
004725d0  }

0047260e                                            90 90                                                                ..

00472610  uint8_t LinebreakUtils::CanBreakLineAt(class Glyph* arg1, class Glyph* arg2)

00472610  {
00472624      class Glyph* eax;
00472624      
00472624      if ((arg2 == 0 || (arg1 == 0 || arg1 == arg2)))
00472624      {
00472686          eax = 0;
00472689          return 0;
00472624      }
00472624      
00472626      int32_t esi;
00472626      esi = arg1->m_data;
0047262d      int32_t edi;
0047262d      edi = arg2->m_data;
0047262d      
00472630      if (esi == 0xa)
00472630      {
00472633          eax = 1;
00472636          return 1;
00472630      }
00472630      
00472642      if (LinebreakUtils::IsWhiteSpace(esi) != 0)
00472642      {
0047265f      label_47265f:
0047265f          
00472669          if ((LinebreakUtils::IsNonBeginningChar(edi) == 0 && LinebreakUtils::IsNonEndingChar(esi) == 0))
0047267f              return 1;
00472642      }
00472642      else
00472642      {
0047264f          if (LinebreakUtils::IsEastAsianChar(edi) != 0)
0047264f              goto label_47265f;
0047264f          
0047265c          if (LinebreakUtils::IsEastAsianChar(esi) != 0)
0047265c              goto label_47265f;
00472642      }
00472642      
00472684      return 0;
00472610  }

0047268a                                90 90 90 90 90 90                                                            ......

00472690  void* __thiscall GlyphLine::`vector deleting destructor'(class GlyphLine* this, uint32_t arg2)

00472690  {
00472690      char edx = arg2;
00472690      
0047269a      if ((edx & 2) == 0)
0047269a      {
004726d4          this->vtable = 0x79d4a4;
004726d4          
004726da          if ((edx & 1) != 0)
004726dd              operator delete(this);
004726dd          
004726e8          return this;
0047269a      }
0047269a      
0047269c      int32_t vtable = this->vtable;
004726a0      void* __offset(GlyphLine, -0x4) edi = ((char*)this - 4);
004726a8      void* eax_2 = &this[vtable];
004726a8      
004726ab      if ((vtable - 1) >= 0)
004726ab      {
004726ad          int32_t ecx_1 = vtable;
004726ba          int32_t i;
004726ba          
004726ba          do
004726ba          {
004726b0              eax_2 -= 0x10;
004726b3              i = ecx_1;
004726b3              ecx_1 -= 1;
004726b4              *(uint32_t*)eax_2 = 0x79d4a4;
004726ba          } while (i != 1);
004726ab      }
004726ab      
004726bf      if ((edx & 1) != 0)
004726c2          operator delete[](edi);
004726c2      
004726ce      return edi;
00472690  }

004726eb                                   90 90 90 90 90                                                             .....

004726f0  uint8_t __thiscall GlyphList::FindCurrentLine(class GlyphList* this, uint32_t arg2, uint32_t* arg3, uint32_t* arg4)

004726f0  {
004726fa      if (arg2 > this->m_glyphList._num_elements)
004726fa      {
00472768          uint32_t eax_3;
00472768          eax_3 = 0;
0047276b          return 0;
004726fa      }
004726fa      
00472704      *(uint32_t*)arg3 = 0;
0047270a      *(uint32_t*)arg4 = 0;
00472710      uint32_t m_num = this->m_glyphLines.m_num;
00472713      uint32_t eax_1 = 0;
00472713      
00472717      if (m_num > 0)
00472717      {
0047271e          int32_t edi_1 = 0;
0047271e          
00472735          while (true)
00472735          {
00472735              if ((eax_1 == (m_num - 1) || ((eax_1 + 1) < m_num && arg2 < *(uint32_t*)((edi_1 + this->m_glyphLines.m_data) + 0x14))))
00472735              {
0047274d                  *(uint32_t*)arg3 = eax_1;
0047275f                  *(uint32_t*)arg4 = this->m_glyphLines.m_data[eax_1].m_nIndex;
00472761                  break;
00472735              }
00472735              
00472737              eax_1 += 1;
00472739              edi_1 += 0x10;
00472739              
0047273e              if (eax_1 < m_num)
0047273e                  continue;
0047273e              
00472743              eax_1 = 1;
00472746              return 1;
00472735          }
00472717      }
00472717      
00472762      eax_1 = 1;
00472765      return 1;
004726f0  }

0047276e                                            90 90                                                                ..

00472770  uint8_t __thiscall GlyphList::FindLineFromY(class GlyphList* this, int32_t arg2, uint32_t* arg3)

00472770  {
00472770      class GlyphList* this_1 = this;
00472772      int32_t ebx = arg2;
00472772      
00472778      if (ebx <= 0)
00472778      {
0047277e          *(uint32_t*)arg3 = 0;
00472784          uint32_t* eax_1;
00472784          eax_1 = 1;
00472788          return 1;
00472778      }
00472778      
0047278d      uint32_t m_num = this->m_glyphLines.m_num;
00472790      int32_t esi = 0;
00472792      uint32_t edx = 0;
00472792      
00472796      if (m_num > 0)
00472796      {
0047279b          int32_t* eax_3 = &this->m_glyphLines.m_data->m_nLineHeight;
0047279b          
004727ac          do
004727ac          {
004727a0              esi += ADJ(eax_3)->m_nLineHeight;
004727a0              
004727a4              if (esi >= ebx)
004727a4              {
004727e0                  *(uint32_t*)arg3 = edx;
004727e2                  eax_3 = 1;
004727e6                  return 1;
004727a4              }
004727a4              
004727a6              edx += 1;
004727a7              eax_3 = &eax_3[4];
004727ac          } while (edx < m_num);
00472796      }
00472796      
004727b1      arg2 = (m_num - 1);
004727b7      this_1 = nullptr;
004727bf      class GlyphList** eax_5 = &arg2;
004727bf      
004727c3      if ((m_num - 1) <= 0)
004727c5          eax_5 = &this_1;
004727c5      
004727d1      *(uint32_t*)arg3 = *(uint32_t*)eax_5;
004727d3      class GlyphList** eax_6;
004727d3      eax_6 = 1;
004727d7      return 1;
00472770  }

004727e9                             90 90 90 90 90 90 90                                                           .......

004727f0  uint8_t __thiscall GlyphList::FindCompleteLineFromY(class GlyphList* this, int32_t arg2, uint32_t* arg3)

004727f0  {
004727f1      class GlyphLine* m_data = this->m_glyphLines.m_data;
004727f4      uint32_t m_num = this->m_glyphLines.m_num;
004727f7      int32_t m_nLineHeight = m_data->m_nLineHeight;
004727fa      int32_t eax = 1;
004727fa      
00472802      if (m_num > 1)
00472802      {
00472808          void* __offset(GlyphLine, 0x1c) esi = ((char*)m_data + 0x1c);
00472808          
0047281c          do
0047281c          {
00472810              m_nLineHeight += *(int32_t*)((char*)ADJ(esi) + 0x1c);
00472810              
00472814              if (m_nLineHeight > arg2)
00472814              {
00472832                  *(uint32_t*)arg3 = (eax - 1);
00472834                  uint32_t eax_1;
00472834                  eax_1 = 1;
00472836                  return 1;
00472814              }
00472814              
00472816              eax += 1;
00472817              esi += 0x10;
0047281c          } while (eax < m_num);
00472802      }
00472802      
00472824      *(uint32_t*)arg3 = m_num;
00472826      eax = 1;
00472828      return 1;
004727f0  }

0047280d                                         8d 49 00                                                               .I.
00472839                                                                             90 90 90 90 90 90 90                           .......

00472840  uint8_t __thiscall GlyphList::FindNextLine(class GlyphList* this, uint32_t arg2, uint32_t* arg3, uint32_t* arg4)

00472840  {
00472845      uint32_t* ebx = arg4;
0047284b      uint32_t* edi = arg3;
0047285b      uint32_t m_num;
0047285b      
0047285b      if (GlyphList::FindCurrentLine(this, arg2, edi, ebx) != 0)
0047285b      {
0047285d          m_num = this->m_glyphLines.m_num;
0047285d          
00472862          if (m_num != 0)
00472862          {
00472869              uint32_t* eax_1 = (*(uint32_t*)edi + 1);
0047286a              arg3 = eax_1;
00472870              arg4 = (m_num - 1);
00472874              uint32_t** eax_2 = &arg4;
00472874              
00472878              if ((m_num - 1) >= eax_1)
0047287a                  eax_2 = &arg3;
0047287a              
0047287e              uint32_t eax_3 = *(uint32_t*)eax_2;
00472880              *(uint32_t*)edi = eax_3;
0047288c              *(uint32_t*)ebx = this->m_glyphLines.m_data[eax_3].m_nIndex;
00472862          }
0047285b      }
0047285b      
00472890      m_num = 1;
00472893      return 1;
00472840  }

00472896                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004728a0  uint8_t __thiscall GlyphList::FindPrevLine(class GlyphList* this, uint32_t arg2, uint32_t* arg3, uint32_t* arg4)

004728a0  {
004728a5      uint32_t* ebx = arg4;
004728ab      uint32_t* edi = arg3;
004728ab      
004728c2      if ((GlyphList::FindCurrentLine(this, arg2, edi, ebx) != 0 && this->m_glyphLines.m_num != 0))
004728c2      {
004728c4          uint32_t ecx = *(uint32_t*)edi;
004728c7          arg4 = nullptr;
004728cf          arg3 = (ecx - 1);
004728d3          uint32_t** eax_1 = &arg4;
004728d3          
004728d7          if ((ecx - 1) >= 0)
004728d9              eax_1 = &arg3;
004728d9          
004728dd          uint32_t eax_2 = *(uint32_t*)eax_1;
004728df          *(uint32_t*)edi = eax_2;
004728eb          *(uint32_t*)ebx = this->m_glyphLines.m_data[eax_2].m_nIndex;
004728c2      }
004728c2      
004728ef      uint32_t eax;
004728ef      eax = 1;
004728f2      return 1;
004728a0  }

004728f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00472900  uint8_t __thiscall GlyphList::GetGlyphLineHeight(class GlyphList* this, uint32_t arg2, int32_t* arg3)

00472900  {
00472908      *(uint32_t*)arg3 = 0;
00472908      
00472911      if (arg2 >= this->m_glyphLines.m_num)
00472911      {
00472924          uint32_t eax;
00472924          eax = 0;
00472926          return 0;
00472911      }
00472911      
0047291d      *(uint32_t*)arg3 = this->m_glyphLines.m_data[arg2].m_nLineHeight;
0047291f      int32_t eax_2;
0047291f      eax_2 = 1;
00472921      return 1;
00472900  }

00472929                             90 90 90 90 90 90 90                                                           .......

00472930  uint8_t __thiscall GlyphList::GetGlyphLineWidth(class GlyphList* this, uint32_t arg2, int32_t* arg3)

00472930  {
00472938      *(uint32_t*)arg3 = 0;
00472938      
00472941      if (arg2 >= this->m_glyphLines.m_num)
00472941      {
00472954          uint32_t eax;
00472954          eax = 0;
00472956          return 0;
00472941      }
00472941      
0047294d      *(uint32_t*)arg3 = this->m_glyphLines.m_data[arg2].m_nLineWidth;
0047294f      int32_t eax_2;
0047294f      eax_2 = 1;
00472951      return 1;
00472930  }

00472959                                                                             90 90 90 90 90 90 90                           .......

00472960  uint8_t __thiscall List<Glyph>::push_back(class List<Glyph>* this, class Glyph const* arg2)

00472960  {
00472966      void* eax = operator new(0x2c);
00472966      
00472972      if (eax == 0)
00472972      {
004729aa          eax = 0;
004729ad          return 0;
00472972      }
00472972      
0047297b      Glyph::Glyph(eax, arg2);
00472980      *(uint32_t*)((char*)eax + 0x24) = 0;
00472987      *(uint32_t*)((char*)eax + 0x28) = 0;
00472987      
00472993      if (this->_head == 0)
00472993      {
00472998          uint32_t eax_4 = (this->_num_elements + 1);
00472999          this->_head = eax;
0047299c          this->_tail = eax;
0047299f          this->_num_elements = eax_4;
004729a3          eax_4 = 1;
004729a6          return 1;
00472993      }
00472993      
004729b0      class ListNode<Glyph>* _tail = this->_tail;
004729b3      _tail->next = eax;
004729b6      *(uint32_t*)((char*)eax + 0x28) = _tail;
004729bc      uint32_t eax_6 = (this->_num_elements + 1);
004729bd      this->_tail = eax;
004729c0      this->_num_elements = eax_6;
004729c4      eax_6 = 1;
004729c7      return 1;
00472960  }

004729ca                                90 90 90 90 90 90                                                            ......

004729d0  uint8_t __thiscall List<Glyph>::insert(class List<Glyph>* this, class ListNode<Glyph>* arg2, class Glyph const* arg3)

004729d0  {
004729d6      void* eax = operator new(0x2c);
004729d6      
004729e2      if (eax == 0)
004729e2      {
00472a1a          eax = 0;
00472a1d          return 0;
004729e2      }
004729e2      
004729eb      Glyph::Glyph(eax, arg3);
004729f0      *(uint32_t*)((char*)eax + 0x24) = 0;
004729f7      *(uint32_t*)((char*)eax + 0x28) = 0;
004729f7      
00472a03      if (this->_head == 0)
00472a03      {
00472a08          uint32_t eax_4 = (this->_num_elements + 1);
00472a09          this->_head = eax;
00472a0c          this->_tail = eax;
00472a0f          this->_num_elements = eax_4;
00472a13          eax_4 = 1;
00472a16          return 1;
00472a03      }
00472a03      
00472a24      *(uint32_t*)((char*)eax + 0x24) = arg2;
00472a2a      *(uint32_t*)((char*)eax + 0x28) = arg2->prev;
00472a2d      class ListNode<Glyph>* prev = arg2->prev;
00472a32      class ListNode<Glyph>* eax_5;
00472a32      
00472a32      if (prev == 0)
00472a32      {
00472a44          this->_head = eax;
00472a47          arg2->prev = eax;
00472a4a          this->_num_elements += 1;
00472a4e          eax_5 = 1;
00472a51          return 1;
00472a32      }
00472a32      
00472a34      prev->next = eax;
00472a37      arg2->prev = eax;
00472a3a      this->_num_elements += 1;
00472a3e      eax_5 = 1;
00472a41      return 1;
004729d0  }

00472a54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00472a60  void __fastcall GlyphLine::GlyphLine(class GlyphLine* this)

00472a60  {
00472a64      this->vtable = 0x79d4a4;
00472a6a      this->m_nIndex = 0;
00472a6d      this->m_nLineWidth = 0;
00472a70      this->m_nLineHeight = 0;
00472a60  }

00472a74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00472a80  uint8_t __thiscall GlyphList::FindNextWord(class GlyphList* this, uint32_t arg2, uint32_t* arg3)

00472a80  {
00472a8a      if (arg2 > this->m_glyphList._num_elements)
00472a8a      {
00472ad2          uint32_t eax_1;
00472ad2          eax_1 = 0;
00472ad5          return 0;
00472a8a      }
00472a8a      
00472a92      *(uint32_t*)arg3 = arg2;
00472a94      class ListNode<Glyph>* i = this->m_glyphList._head;
00472a98      int32_t ebx;
00472a98      ebx = 0;
00472a9a      int32_t edi = 0;
00472a9a      
00472a9e      for (; i != 0; i = i->next)
00472a9e      {
00472aa2          if (edi >= arg2)
00472aa2          {
00472aad              if (Glyph::IsWhiteSpace(i) != 0)
00472aaf                  ebx = 1;
00472aad              else if (ebx != 0)
00472ab5                  break;
00472ab5              
00472abb              *(uint32_t*)arg3 += 1;
00472aa2          }
00472aa2          
00472abd          edi += 1;
00472abd          
00472ac0          if (i == 0)
00472ac0              break;
00472a9e      }
00472a9e      
00472acc      uint32_t* eax;
00472acc      eax = 1;
00472acf      return 1;
00472a80  }

00472ad8                                                                          90 90 90 90 90 90 90 90                          ........

00472ae0  uint8_t __thiscall GlyphList::FindPrevWord(class GlyphList* this, uint32_t arg2, uint32_t* arg3)

00472ae0  {
00472ae7      uint32_t eax;
00472ae7      
00472ae7      if (arg2 > this->m_glyphList._num_elements)
00472ae7      {
00472b38          eax = 0;
00472b3a          return 0;
00472ae7      }
00472ae7      
00472aec      class ListNode<Glyph>* esi = this->m_glyphList._head;
00472af0      uint32_t ebp = 0;
00472af2      uint32_t edi = 0;
00472af6      int32_t ebx;
00472af6      ebx = 1;
00472af6      
00472af8      if (esi != 0)
00472af8      {
00472afa          char ebx_1 = ebx;
00472afa          
00472b04          while (edi < arg2)
00472b04          {
00472b0f              if (Glyph::IsWhiteSpace(esi) != 0)
00472b11                  ebx_1 = 1;
00472b0f              else if (ebx_1 != 0)
00472b17              {
00472b19                  ebp = edi;
00472b1b                  ebx_1 = 0;
00472b17              }
00472b17              
00472b1d              edi += 1;
00472b1d              
00472b20              if (esi == 0)
00472b20                  break;
00472b20              
00472b22              esi = esi->next;
00472b22              
00472b27              if (esi == 0)
00472b27                  break;
00472b04          }
00472af8      }
00472af8      
00472b2f      *(uint32_t*)arg3 = ebp;
00472b32      eax = 1;
00472b35      return 1;
00472ae0  }

00472b3d                                                                                         90 90 90                               ...

00472b40  uint8_t __thiscall GlyphList::FindPixelsFromPos(class GlyphList* this, uint32_t arg2, int32_t* arg3)

00472b40  {
00472b41      uint32_t ebx = arg2;
00472b41      
00472b4b      if (ebx > this->m_glyphList._num_elements)
00472b4b      {
00472ba5          int32_t eax;
00472ba5          eax = 0;
00472ba8          return 0;
00472b4b      }
00472b4b      
00472b4e      int32_t* edi = arg3;
00472b5f      *(uint32_t*)edi = 0;
00472b65      arg2 = 0;
00472b6d      uint8_t result = GlyphList::FindCurrentLine(this, ebx, &arg3, &arg2);
00472b6d      
00472b74      if (result != 0)
00472b74      {
00472b76          class ListNode<Glyph>* ecx_1 = this->m_glyphList._head;
00472b79          int32_t edx_1 = 0;
00472b79          
00472b7d          if (ecx_1 != 0)
00472b7d          {
00472b7f              uint32_t esi_1 = arg2;
00472b7f              
00472b86              while (edx_1 < ebx)
00472b86              {
00472b8a                  if (edx_1 >= esi_1)
00472b8f                      *(uint32_t*)edi += ecx_1->data.m_width;
00472b8f                  
00472b91                  edx_1 += 1;
00472b91                  
00472b94                  if (ecx_1 == 0)
00472b94                      break;
00472b94                  
00472b96                  ecx_1 = ecx_1->next;
00472b96                  
00472b9b                  if (ecx_1 == 0)
00472b9b                      break;
00472b86              }
00472b7d          }
00472b74      }
00472b74      
00472ba1      return result;
00472b40  }

00472bab                                   90 90 90 90 90                                                             .....

00472bb0  void __thiscall GlyphList::RemoveTextTag(class GlyphList* this, class TextTag* arg2)

00472bb0  {
00472bb7      if (arg2 != 0)
00472bb7      {
00472bbf          for (class ListNode<Glyph>* i = this->m_glyphList._head; i != 0; i = i->next)
00472bbf          {
00472bc4              if (i->data.m_tag == arg2)
00472bca                  Glyph::SetTag(i, nullptr);
00472bbf          }
00472bb7      }
00472bb0  }

00472bdb                                                                                   90 90 90 90 90                             .....

00472be0  class ListIterator<Glyph>* __thiscall GlyphList::GetGlyphIterForIndex(class GlyphList* this, class ListIterator<Glyph>* __return, uint32_t arg3)

00472be0  {
00472be3      class ListNode<Glyph>* i = this->m_glyphList._head;
00472be6      int32_t eax = 0;
00472be6      
00472beb      while (i != 0)
00472beb      {
00472bf3          if (eax == arg3)
00472bf3          {
00472c19              int32_t* __return_1 = __return;
00472c1d              __return_1[1] = i;
00472c20              *(uint32_t*)__return_1 = 0x79c13c;
00472c26              __return_1[2] = &this->m_glyphList;
00472c2a              return __return_1;
00472bf3          }
00472bf3          
00472bf7          if (i != 0)
00472bf9              i = i->next;
00472bf9          
00472bfc          eax += 1;
00472beb      }
00472beb      
00472c05      __return->_current = nullptr;
00472c0c      __return->vtable = 0x79c13c;
00472c12      __return->_list = &this->m_glyphList;
00472c16      return __return;
00472be0  }

00472c2d                                         90 90 90                                                               ...

00472c30  void __thiscall GlyphList::ChangeExistingGlyphsToNewFont(class GlyphList* this, class Font* arg2)

00472c30  {
00472c31      this->m_nFirstInvalidPosition = 0;
00472c31      
00472c3d      for (class ListNode<Glyph>* i = this->m_glyphList._head; i != 0; i = i->next)
00472c3d      {
00472c47          Glyph::SetFont(i, arg2);
00472c47          
00472c4e          if (i == 0)
00472c4e              break;
00472c3d      }
00472c30  }

00472c5c                                                                                      90 90 90 90                              ....

00472c60  uint8_t __thiscall List<Glyph>::remove(class List<Glyph>* this, class ListNode<Glyph>* arg2)

00472c60  {
00472c6c      class ListNode<Glyph>* _head;
00472c6c      
00472c6c      if (arg2 != 0)
00472c6c      {
00472c6e          _head = this->_head;
00472c6e          
00472c73          if (_head != 0)
00472c73          {
00472c7e              class ListNode<Glyph>* next;
00472c7e              
00472c7e              if (arg2 != _head)
00472c7e              {
00472c8f                  arg2->prev->next = arg2->next;
00472c98                  next = arg2->next;
00472c98                  
00472c9d                  if (next == 0)
00472caa                      this->_tail = arg2->prev;
00472c9d                  else
00472ca2                      next->prev = arg2->prev;
00472c7e              }
00472c7e              else
00472c7e              {
00472c80                  next = arg2->next;
00472c85                  this->_head = next;
00472c85                  
00472c88                  if (next != 0)
00472ca2                      next->prev = nullptr;
00472c88                  else
00472c8a                      this->_tail = nullptr;
00472c7e              }
00472caf              Glyph::~Glyph(arg2);
00472cb5              operator delete(arg2);
00472cc1              this->_num_elements -= 1;
00472cc5              uint32_t eax_2;
00472cc5              eax_2 = 1;
00472cc8              return 1;
00472c73          }
00472c6c      }
00472c6c      
00472c76      _head = 0;
00472c79      return 0;
00472c60  }

00472ccb                                   90 90 90 90 90                                                             .....

00472cd0  void __fastcall SmartArray<GlyphLine,1>::Reset(class SmartArray<GlyphLine,1>* this)

00472cd0  {
00472cd3      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00472ce7      this->m_num = 0;
00472ce7      
00472cea      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00472cea      {
00472cec          class GlyphLine* m_data = this->m_data;
00472cec          
00472cf0          if (m_data != 0)
00472cf0          {
00472cfa              if (m_data->vtable != 0)
00472cfa              {
00472cfc                  m_data->vtable->__vecDelDtor(3);
00472d02                  this->m_data = 0;
00472d04                  this->m_sizeAndDeallocate = 0;
00472d09                  return;
00472cfa              }
00472cfa              
00472d0b              operator delete[](((char*)m_data - 4));
00472cf0          }
00472cf0          
00472d13          this->m_data = 0;
00472d15          this->m_sizeAndDeallocate = 0;
00472d1a          return;
00472cea      }
00472cea      
00472d1d      if (this->m_data != 0)
00472d1d      {
00472d1f          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00472d1f          
00472d25          if ((i_2 - 1) >= 0)
00472d25          {
00472d29              int32_t ecx_3 = ((i_2 - 1) << 4);
00472d2c              int32_t i_1 = i_2;
00472d41              int32_t i;
00472d41              
00472d41              do
00472d41              {
00472d32                  void* eax_3 = (this->m_data + ecx_3);
00472d34                  ecx_3 -= 0x10;
00472d37                  i = i_1;
00472d37                  i_1 -= 1;
00472d38                  *(uint32_t*)((char*)eax_3 + 4) = 0;
00472d3b                  *(uint32_t*)((char*)eax_3 + 8) = 0;
00472d3e                  *(uint32_t*)((char*)eax_3 + 0xc) = 0;
00472d41              } while (i != 1);
00472d25          }
00472d1d      }
00472cd0  }

00472d46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00472d50  uint8_t __thiscall SmartArray<GlyphLine,1>::grow(class SmartArray<GlyphLine,1>* this, uint32_t arg2)

00472d50  {
00472d58      uint32_t edi = arg2;
00472d5e      uint32_t eax;
00472d5e      
00472d5e      if (edi >= this->m_num)
00472d5e      {
00472d6e          if (edi <= (this->m_sizeAndDeallocate & 0x7fffffff))
00472d6e          {
00472e53              eax = 1;
00472e56              return 1;
00472d6e          }
00472d6e          
00472d76          if (edi == 0)
00472d76          {
00472d78              SmartArray<GlyphLine,1>::Reset(this);
00472d7f              int32_t eax_2;
00472d7f              eax_2 = 1;
00472d82              return 1;
00472d76          }
00472d76          
00472d8e          eax = operator new[](((edi << 4) + 4));
00472d8e          
00472d98          if (eax != 0)
00472d98          {
00472da4              void* ebx_1 = (eax + 4);
00472daa              *(uint32_t*)eax = edi;
00472dac              `vector constructor iterator'(ebx_1, 0x10, edi, GlyphLine::GlyphLine);
00472dac              
00472db3              if (ebx_1 != 0)
00472db3              {
00472dbc                  if (this->m_data != 0)
00472dbc                  {
00472dc2                      uint32_t m_num = this->m_num;
00472dc2                      
00472dc6                      if ((m_num - 1) >= 0)
00472dc6                      {
00472dcd                          void* ecx_3 = ((((m_num - 1) << 4) + ebx_1) + 8);
00472dd8                          int32_t edi_1 = m_num;
00472dfc                          int32_t i;
00472dfc                          
00472dfc                          do
00472dfc                          {
00472de5                              void* eax_4 = (((0xfffffff8 - ebx_1) + ecx_3) + this->m_data);
00472dea                              *(uint32_t*)((char*)ecx_3 - 4) = *(uint32_t*)((char*)eax_4 + 4);
00472df0                              *(uint32_t*)ecx_3 = *(uint32_t*)((char*)eax_4 + 8);
00472df5                              *(uint32_t*)((char*)ecx_3 + 4) = *(uint32_t*)((char*)eax_4 + 0xc);
00472df8                              ecx_3 -= 0x10;
00472dfb                              i = edi_1;
00472dfb                              edi_1 -= 1;
00472dfc                          } while (i != 1);
00472dfe                          edi = arg2;
00472dc6                      }
00472dc6                      
00472e12                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00472e12                      {
00472e14                          class GlyphLine* m_data = this->m_data;
00472e14                          
00472e18                          if (m_data != 0)
00472e18                          {
00472e22                              if (m_data->vtable != 0)
00472e22                              {
00472e24                                  m_data->vtable->__vecDelDtor(3);
00472e30                                  this->m_sizeAndDeallocate = (edi | 0x80000000);
00472e34                                  this->m_data = ebx_1;
00472e37                                  int32_t eax_6;
00472e37                                  eax_6 = 1;
00472e3a                                  return 1;
00472e22                              }
00472e22                              
00472e3e                              operator delete[](((char*)m_data - 4));
00472e18                          }
00472e12                      }
00472dbc                  }
00472dbc                  
00472e4c                  this->m_data = ebx_1;
00472e4e                  this->m_sizeAndDeallocate = (edi | 0x80000000);
00472e53                  eax = 1;
00472e56                  return 1;
00472db3              }
00472d98          }
00472d5e      }
00472d5e      
00472e5b      eax = 0;
00472e5e      return 0;
00472d50  }

00472e61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00472e70  uint32_t __thiscall GlyphList::Insert(class GlyphList* this, class ListIterator<Glyph>* arg2, class Glyph const* arg3)

00472e70  {
00472e75      class ListNode<Glyph>* _current = arg2->_current;
00472e75      
00472e7a      if (_current != 0)
00472e7a      {
00472e7c          class ListNode<Glyph>* prev = _current->prev;
00472e7c          
00472e81          if (prev != 0)
00472e81          {
00472e83              class TextTag* m_tag = prev->data.m_tag;
00472e83              
00472e89              if (m_tag == _current->data.m_tag)
00472e8c                  GlyphList::RemoveTextTag(this, m_tag);
00472e81          }
00472e7a      }
00472e7a      
00472e91      class List<Glyph>* _list = arg2->_list;
00472e91      
00472e96      if (_list == 0)
00472eda          return 0;
00472eda      
00472e98      class ListNode<Glyph>* _current_1 = arg2->_current;
00472e98      
00472e9d      if (_current_1 == 0)
00472e9d      {
00472ead          int32_t ecx;
00472ead          ecx = List<Glyph>::push_back(_list, arg3) != 0;
00472eb3          return ecx;
00472e9d      }
00472e9d      
00472ec5      int32_t ecx_1;
00472ec5      ecx_1 = List<Glyph>::insert(_list, _current_1, arg3) != 0;
00472ecb      return ecx_1;
00472e70  }

00472edd                                                                                         90 90 90                               ...

00472ee0  uint8_t __thiscall GlyphList::FindXYFromPosition(class GlyphList* this, uint32_t arg2, int32_t* arg3, int32_t* arg4)

00472ee0  {
00472ee1      int32_t* ebx = arg3;
00472eec      int32_t* edi = arg4;
00472efc      *(uint32_t*)ebx = 0;
00472f05      *(uint32_t*)edi = 0;
00472f0b      arg3 = nullptr;
00472f13      uint8_t result = GlyphList::FindCurrentLine(this, arg2, &arg3, &arg4);
00472f13      
00472f1a      if (result == 0)
00472f42          return result;
00472f42      
00472f1c      int32_t* i_1 = arg3;
00472f1c      
00472f22      if (i_1 > 0)
00472f22      {
00472f24          int32_t eax = 0;
00472f33          int32_t* i;
00472f33          
00472f33          do
00472f33          {
00472f2d              *(uint32_t*)edi += *(uint32_t*)(&this->m_glyphLines.m_data->m_nLineHeight + eax);
00472f2f              eax += 0x10;
00472f32              i = i_1;
00472f32              i_1 -= 1;
00472f33          } while (i != 1);
00472f22      }
00472f22      
00472f39      return GlyphList::FindPixelsFromPos(this, arg2, ebx);
00472ee0  }

00472f45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00472f50  class ListIterator<Glyph>* __thiscall GlyphList::GetGlyphIterForLine(class GlyphList* this, class ListIterator<Glyph>* __return, uint32_t arg3)

00472f50  {
00472f50      uint32_t m_num = this->m_glyphLines.m_num;
00472f50      
00472f59      if (arg3 < m_num)
00472f59      {
00472f6c          GlyphList::GetGlyphIterForIndex(this, __return, this->m_glyphLines.m_data[arg3].m_nIndex);
00472f74          return __return;
00472f59      }
00472f59      
00472f80      if (m_num != 0)
00472f80      {
00472f94          __return->_current = nullptr;
00472f9b          __return->vtable = 0x79c13c;
00472fa1          __return->_list = &this->m_glyphList;
00472fa4          return __return;
00472f80      }
00472f80      
00472f85      __return->_current = this->m_glyphList._head;
00472f88      __return->vtable = 0x79c13c;
00472f8e      __return->_list = &this->m_glyphList;
00472f91      return __return;
00472f50  }

00472fa7                       90 90 90 90 90 90 90 90 90                                                         .........

00472fb0  void __fastcall List<Glyph>::flush(class List<Glyph>* this)

00472fb0  {
00472fc3      while (this->_head != 0)
00472fc3      {
00472fc9          void var_24;
00472fc9          Glyph::Glyph(&var_24);
00472fce          class ListNode<Glyph>* _head = this->_head;
00472fce          
00472fd3          if (_head != 0)
00472fd3          {
00472fd5              class ListNode<Glyph>* next = _head->next;
00472fda              this->_head = next;
00472fda              
00472fdd              if (next == 0)
00472fe4                  this->_tail = nullptr;
00472fdd              else
00472fdf                  next->prev = nullptr;
00472fdf              
00472fec              Glyph::operator=(&var_24, _head);
00472fec              
00472ff3              if (_head != 0)
00472ff3              {
00472ff7                  Glyph::~Glyph(_head);
00472ffd                  operator delete(_head);
00472ff3              }
00472ff3              
00473005              this->_num_elements -= 1;
00472fd3          }
00472fd3          
0047300c          Glyph::~Glyph(&var_24);
00472fc3      }
00472fb0  }

0047301a                                                                                90 90 90 90 90 90                            ......

00473020  void __fastcall GlyphList::Flush(class GlyphList* this)

00473020  {
00473026      List<Glyph>::flush(&this->m_glyphList);
0047302e      SmartArray<GlyphLine,1>::Reset(&this->m_glyphLines);
00473035      this->m_cxLastRecalcWidth = 0xffffffff;
0047303c      this->m_nFirstInvalidPosition = 0;
0047303f      this->m_bOneLine = 0;
00473020  }

00473044              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00473050  uint32_t __thiscall GlyphList::Insert(class GlyphList* this, uint32_t arg2, class Glyph const* arg3)

00473050  {
0047305d      if (arg2 > this->m_glyphList._num_elements)
00473092          return 0;
00473092      
00473062      if (arg2 < this->m_nFirstInvalidPosition)
00473064          this->m_nFirstInvalidPosition = arg2;
00473064      
0047306f      void __return;
0047306f      GlyphList::GetGlyphIterForIndex(this, &__return, arg2);
00473089      return GlyphList::Insert(this, &__return, arg3);
00473050  }

00473095                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004730a0  uint32_t __thiscall GlyphList::Delete(class GlyphList* this, uint32_t arg2, uint32_t arg3)

004730a0  {
004730a3      uint32_t edx = arg2;
004730a8      class GlyphList* this_1 = this;
004730aa      uint32_t _num_elements = this_1->m_glyphList._num_elements;
004730b0      uint32_t _num_elements_1 = (_num_elements - 1);
004730b6      class GlyphList* this_2 = this_1;
004730ba      arg2 = edx;
004730be      uint32_t* ecx_1 = &_num_elements_1;
004730be      
004730c2      if ((_num_elements - 1) >= edx)
004730c4          ecx_1 = &arg2;
004730c4      
004730c8      uint32_t edx_1 = *(uint32_t*)ecx_1;
004730ca      uint32_t ecx_2 = arg3;
004730ce      _num_elements_1 = _num_elements;
004730d4      arg2 = edx_1;
004730d8      arg3 = ecx_2;
004730dc      uint32_t* eax = &_num_elements_1;
004730dc      
004730e0      if (_num_elements >= ecx_2)
004730e2          eax = &arg3;
004730e2      
004730e6      bool cond:2 = edx_1 >= this_1->m_nFirstInvalidPosition;
004730e9      uint32_t eax_1 = *(uint32_t*)eax;
004730eb      arg3 = eax_1;
004730eb      
004730ef      if (!(cond:2))
004730f1          this_1->m_nFirstInvalidPosition = edx_1;
004730f1      
004730f4      uint32_t _num_elements_2 = 0;
004730f8      int32_t result = 0;
004730f8      
004730fc      if (edx_1 >= eax_1)
00473104          return 0;
00473104      
00473109      class List<Glyph>* ebp = &this_1->m_glyphList;
0047310d      class ListNode<Glyph>* edi = ebp->_head;
0047310d      
00473112      while (true)
00473112      {
00473112          _num_elements_1 = _num_elements_2;
00473112          
0047311a          if ((edi == 0 || _num_elements_2 >= eax_1))
0047317f              return result;
0047317f          
0047311e          if (_num_elements_2 < edx_1)
0047311e          {
0047316e              edi = edi->next;
00473171              _num_elements_2 += 1;
0047311e          }
0047311e          else
0047311e          {
00473120              class TextTag* m_tag = edi->data.m_tag;
00473120              
00473125              if (m_tag != 0)
00473125              {
0047312c                  for (class ListNode<Glyph>* i = this_1->m_glyphList._head; i != 0; i = i->next)
0047312c                  {
00473133                      if (i->data.m_tag == m_tag)
00473139                          Glyph::SetTag(i, nullptr);
0047312c                  }
0047312c                  
00473145                  this_1 = this_2;
00473125              }
00473125              
00473149              class ListNode<Glyph>* eax_3 = edi;
0047314b              edi = edi->next;
00473151              List<Glyph>::remove(ebp, eax_3);
0047315e              edx_1 = arg2;
00473163              result += 1;
00473167              eax_1 = arg3;
0047316b              _num_elements_2 = (_num_elements_1 + 1);
0047311e          }
00473112      }
004730a0  }

00473182        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00473190  int32_t __thiscall GlyphList::AddText(class GlyphList* this, uint32_t arg2, class SmartArray<Glyph,1> const* arg3)

00473190  {
00473199      class GlyphList* this_1 = this;
004731a4      uint32_t m_num_3 = arg2;
004731a6      class GlyphList* this_2 = this_1;
004731aa      uint32_t m_num_4 = m_num_3;
004731ae      uint32_t var_14 = 0;
004731b2      int32_t var_18 = 0;
004731b2      
004731b6      if (arg2 < this_1->m_nFirstInvalidPosition)
004731b8          this_1->m_nFirstInvalidPosition = arg2;
004731b8      
004731c3      void __return;
004731c3      GlyphList::GetGlyphIterForIndex(this_1, &__return, arg2);
004731c8      class SmartArray<Glyph,1>* esi = arg3;
004731cf      class ListIterator<Glyph>* var_10 = nullptr;
004731cf      
004731d3      if (esi->m_num > 0)
004731d3      {
004731d9          arg2 = 0;
004731d9          
00473281          do
00473281          {
004731e3              void* edi_1 = (esi->m_data + arg2);
004731e9              class ListNode<Glyph>* var_8;
004731e9              class ListIterator<Glyph>* prev;
004731e9              
004731e9              if (var_8 != 0)
004731e9              {
004731eb                  prev = var_8->prev;
004731eb                  
004731f0                  if (prev != 0)
004731f0                  {
004731f2                      int32_t ebx = *(int32_t*)((char*)prev + 0x20);
004731f2                      
004731fc                      if ((ebx == var_8->data.m_tag && ebx != 0))
004731fc                      {
00473207                          for (class ListNode<Glyph>* i = this_2->m_glyphList._head; i != 0; i = i->next)
00473207                          {
00473213                              if (i->data.m_tag == ebx)
00473219                                  Glyph::SetTag(i, nullptr);
00473207                          }
00473207                          
00473225                          esi = arg3;
004731fc                      }
004731fc                      
00473229                      this_1 = this_2;
004731f0                  }
004731e9              }
004731e9              
00473233              class List<Glyph>* var_4;
00473233              
00473233              if (var_4 == 0)
00473249                  prev = 0;
00473233              else if (var_8 != 0)
00473242                  prev = List<Glyph>::insert(var_4, var_8, edi_1);
00473238              else
0047323a                  prev = List<Glyph>::push_back(var_4, edi_1);
0047323a              
00473253              int32_t edx_1;
00473253              edx_1 = prev != 0;
00473264              var_18 += edx_1;
0047326c              m_num_4 += edx_1;
00473279              var_10 = (&var_10->vtable + 1);
0047327d              arg2 += 0x24;
00473281          } while ((&var_10->vtable + 1) < esi->m_num);
00473281          
00473287          m_num_3 = m_num_4;
004731d3      }
004731d3      
0047328d      uint32_t m_nMaxCharacters = this_1->m_nMaxCharacters;
00473290      uint32_t _num_elements = this_1->m_glyphList._num_elements;
00473290      
00473295      if (_num_elements > m_nMaxCharacters)
00473295      {
00473297          uint32_t m_num_1 = (_num_elements - m_nMaxCharacters);
00473299          uint32_t m_num = esi->m_num;
00473299          
0047329e          if (m_num_1 > m_num)
004732a0              m_num_1 = m_num;
004732a0          
004732a2          m_num = this_1->m_bTrimFromTop;
004732a9          uint32_t var_38_2;
004732a9          uint32_t m_num_2;
004732a9          
004732a9          if (m_num == 0)
004732a9          {
004732af              m_num_2 = m_num_3;
004732b2              var_38_2 = (m_num_3 - m_num_1);
004732a9          }
004732a9          else
004732a9          {
004732ab              m_num_2 = m_num_1;
004732ac              var_38_2 = 0;
004732a9          }
004732a9          
004732b8          var_14 = GlyphList::Delete(this_1, var_38_2, m_num_2);
00473295      }
00473295      
004732cd      return (var_18 - var_14);
00473190  }


004732d0  uint8_t __thiscall GlyphList::FindPosFromLineAndPixels(class GlyphList* this, uint32_t arg2, uint32_t arg3, uint8_t arg4, uint32_t* arg5)

004732d0  {
004732dc      uint32_t edi = arg2;
004732dc      
004732e2      if (edi >= this->m_glyphLines.m_num)
004732e2      {
0047341f          uint32_t eax;
0047341f          eax = 0;
00473425          return 0;
004732e2      }
004732e2      
004732ef      uint32_t ebp = arg3;
004732f8      uint32_t m_nIndex = this->m_glyphLines.m_data[edi].m_nIndex;
004732fc      *(uint32_t*)arg5 = m_nIndex;
00473301      uint32_t ecx_2 = (this->m_glyphLines.m_num - 1);
00473305      arg2 = ecx_2;
0047330b      uint32_t m_nIndex_1 = (edi + 1);
0047330f      uint32_t* ecx_3 = &arg2;
0047330f      
00473313      if (ecx_2 >= (edi + 1))
00473315          ecx_3 = &m_nIndex_1;
00473315      
00473319      uint32_t m_nIndex_2 = *(uint32_t*)ecx_3;
0047331d      m_nIndex_1 = m_nIndex_2;
00473321      uint32_t ecx_4;
00473321      
00473321      if (m_nIndex_2 != edi)
0047332e          ecx_4 = this->m_glyphLines.m_data[m_nIndex_2].m_nIndex;
00473321      else
00473323          ecx_4 = this->m_glyphList._num_elements;
00473323      
00473335      void* eax_3 = &this->m_glyphLines.m_data[edi];
00473337      int32_t edx_4 = *(uint32_t*)((char*)eax_3 + 8);
0047333a      arg2 = ecx_4;
0047333a      
00473344      if (arg3 > edx_4)
00473344      {
00473356          arg4 = 0;
0047335e          GlyphList::FindNextLine(this, *(uint32_t*)((char*)eax_3 + 4), &m_nIndex_1, &arg4);
0047335e          
00473369          if (edi != (this->m_glyphLines.m_num - 1))
00473369          {
0047338c              *(uint32_t*)arg5 = (arg4 - 1);
0047338e              uint32_t* eax_7;
0047338e              eax_7 = 1;
00473394              return 1;
00473369          }
00473369          
00473375          *(uint32_t*)arg5 = this->m_glyphList._num_elements;
00473377          uint32_t eax_6;
00473377          eax_6 = 1;
0047337d          return 1;
00473344      }
00473344      
0047339f      m_nIndex_1 = m_nIndex;
004733a3      void __return;
004733a3      GlyphList::GetGlyphIterForLine(this, &__return, edi);
004733a8      class Glyph* var_8;
004733a8      class Glyph* esi_1 = var_8;
004733ae      class ListIterator<Glyph>* eax_8;
004733ae      
004733ae      if (esi_1 != 0)
004733ae      {
004733b3          arg3 = (m_nIndex + 1);
004733b3          
004733bb          while (m_nIndex < arg2)
004733bb          {
004733bf              uint8_t eax_9 = Glyph::IsNewLine(esi_1);
004733c4              uint32_t edx_8;
004733c4              edx_8 = arg4;
004733c8              int32_t m_width = esi_1->m_width;
004733cf              int32_t ebx;
004733cf              ebx = edx_8 != 0;
004733d2              class Glyph* ecx_10;
004733d2              ecx_10 = eax_9;
004733d2              
004733dc              if (ebp <= (((int64_t)m_width) / (ebx + 1)))
004733dc                  break;
004733dc              
004733ea              if ((ecx_10 != 0 && arg3 == arg2))
004733ea                  break;
004733ea              
004733ec              eax_8 = arg5;
004733f8              ebp -= m_width;
004733fd              m_nIndex = (m_nIndex_1 + 1);
004733fe              eax_8->vtable = (&eax_8->vtable->__vecDelDtor + 1);
00473400              esi_1 = *(int32_t*)((char*)esi_1 + 0x24);
00473406              m_nIndex_1 = m_nIndex;
0047340a              arg3 += 1;
0047340a              
0047340e              if (esi_1 == 0)
0047340e                  break;
004733bb          }
004733ae      }
004733ae      
00473413      eax_8 = 1;
00473419      return 1;
004732d0  }

00473428                          90 90 90 90 90 90 90 90                                                          ........

00473430  uint8_t __thiscall GlyphList::InqGlyph(class GlyphList const* this, uint32_t arg2, class Glyph* arg3)

00473430  {
00473432      class ListNode<Glyph>* ecx = this->m_glyphList._head;
00473432      
00473443      if ((ecx != 0 && arg2 < this->m_glyphList._num_elements))
00473443      {
00473445          int32_t edx = 0;
00473445          
00473449          while (edx != arg2)
00473449          {
0047344d              if (ecx != 0)
0047344f                  ecx = ecx->next;
0047344f              
00473452              edx += 1;
00473452              
00473455              if (ecx == 0)
00473458                  return 0;
00473449          }
00473449          
0047345d          if (ecx != 0)
0047345d          {
00473464              Glyph::operator=(arg3, ecx);
00473469              return 1;
0047345d          }
00473443      }
00473443      
0047346c      return 0;
00473430  }

0047346f                                               90                                                                 .

00473470  void* __thiscall List<Glyph>::`scalar deleting destructor'(class List<Glyph>* this, uint32_t arg2)

00473470  {
00473473      this->vtable = &List<class Glyph>::`vftable';
00473479      List<Glyph>::flush(this);
00473479      
00473483      if ((arg2 & 1) != 0)
00473486          operator delete(this);
00473486      
00473491      return this;
00473470  }

00473494                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004734a0  void __fastcall GlyphList::GlyphList(class GlyphList* this)

004734a0  {
004734a4      this->vtable = &GlyphList::`vftable';
004734aa      this->m_glyphList.vtable = &List<class Glyph>::`vftable';
004734b1      __builtin_memset(&this->m_glyphList._head, 0, 0x18);
004734c3      this->m_nMaxCharacters = 0xffff;
004734ca      this->m_bTrimFromTop = 0;
004734cd      this->m_cxLastRecalcWidth = 0xffffffff;
004734d4      this->m_nFirstInvalidPosition = 0;
004734d7      this->m_bOneLine = 0;
004734a0  }

004734db                                                                                   90 90 90 90 90                             .....

004734e0  void __fastcall GlyphList::~GlyphList(class GlyphList* this)

004734e0  {
004734ea      this->vtable = &GlyphList::`vftable';
004734f0      List<Glyph>::flush(&this->m_glyphList);
004734fa      SmartArray<GlyphLine,1>::Reset(&this->m_glyphLines);
00473501      this->m_cxLastRecalcWidth = 0xffffffff;
00473508      this->m_nFirstInvalidPosition = 0;
0047350b      this->m_bOneLine = 0;
0047350b      
0047351b      if ((this->m_glyphLines.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047351b      {
0047351d          class GlyphLine* m_data = this->m_glyphLines.m_data;
0047351d          
00473521          if (m_data != 0)
00473521          {
0047352b              if (m_data->vtable != 0)
0047352b              {
0047352d                  m_data->vtable->__vecDelDtor(3);
004734e4                  this->m_glyphList.vtable = &List<class Glyph>::`vftable';
0047353e                  /* tailcall */
0047353e                  return List<Glyph>::flush(&this->m_glyphList);
0047352b              }
0047352b              
00473544              operator delete[](((char*)m_data - 4));
00473521          }
0047351b      }
0047351b      
004734e4      this->m_glyphList.vtable = &List<class Glyph>::`vftable';
00473557      /* tailcall */
00473557      return List<Glyph>::flush(&this->m_glyphList);
004734e0  }

0047355c                                                                                      90 90 90 90                              ....

00473560  uint8_t __thiscall GlyphList::InqText(class GlyphList const* this, uint32_t arg2, uint32_t arg3, uint8_t arg4, class PStringBase<unsigned short>* arg5)

00473560  {
00473565      class PStringBase<unsigned short>* esi = arg5;
00473569      class PSRefBufferCharData<unsigned short>* m_charbuffer = esi->m_charbuffer;
00473569      
00473574      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
00473574      {
00473589          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00473591              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00473591          
00473593          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0047359e          esi->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
004735a0          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00473574      }
00473574      
004735a6      uint32_t _num_elements = this->m_glyphList._num_elements;
004735a9      uint32_t edx_2 = arg2;
004735b0      arg5 = (_num_elements - 1);
004735b6      arg2 = edx_2;
004735ba      class PStringBase<unsigned short>** ecx_4 = &arg5;
004735ba      
004735be      if ((_num_elements - 1) >= edx_2)
004735c0          ecx_4 = &arg2;
004735c0      
004735c4      class PStringBase<unsigned short>* edx_3 = *(uint32_t*)ecx_4;
004735c6      uint32_t ecx_5 = arg3;
004735ca      arg5 = _num_elements;
004735d0      arg2 = edx_3;
004735d4      arg3 = ecx_5;
004735d8      class PStringBase<unsigned short>** eax_2 = &arg5;
004735d8      
004735dc      if (_num_elements >= ecx_5)
004735de          eax_2 = &arg3;
004735de      
004735e4      class ListNode<Glyph>* _head = this->m_glyphList._head;
004735e7      arg3 = *(uint32_t*)eax_2;
004735eb      int32_t eax_4 = 0;
004735ed      int32_t* m_tag_1 = nullptr;
004735f1      int32_t var_10 = 0;
004735f5      class ListNode<Glyph>* next = _head;
004735f5      
004735f9      if (_head != 0)
004735f9      {
00473604          while (eax_4 < arg3)
00473604          {
0047360e              if (eax_4 >= arg2)
0047360e              {
00473614                  eax_4 = arg4;
0047361a                  class TextTag* m_tag = _head->data.m_tag;
0047361a                  
00473625                  if ((eax_4 != 0 && m_tag != m_tag_1))
00473625                  {
0047362d                      if (m_tag_1 != 0)
0047362d                      {
0047362f                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00473634                          arg5 = PStringBase<unsigned short>::s_NullBuffer_2;
0047363c                          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0047364b                          class PStringBase<unsigned short>* eax_6;
0047364b                          uint16_t* edx_5;
0047364b                          eax_6 = *(uint32_t*)(*(uint32_t*)m_tag_1 + 0xc)(&arg5);
00473652                          class PStringBase<unsigned short>* var_24_3 = arg5;
00473653                          void* const var_28_1 = &data_79d4b0;
00473658                          class PStringBase<unsigned short>* var_2c_1 = esi;
00473659                          PStringBase<unsigned short>::sprintf_append(eax_6, edx_5);
00473662                          void* __offset(PStringBase<unsigned short>, -0x14) edi_3 = &arg5[-5];
00473662                          
00473678                          if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
00473680                              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0047362d                      }
0047362d                      
00473684                      if (m_tag != 0)
00473684                      {
00473686                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
0047368b                          arg5 = PStringBase<unsigned short>::s_NullBuffer_3;
00473693                          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
004736a2                          class PStringBase<unsigned short>* eax_10;
004736a2                          uint16_t* edx_8;
004736a2                          eax_10 = m_tag->vtable->BuildStartTag(&arg5);
004736a9                          class PStringBase<unsigned short>* var_24_7 = arg5;
004736aa                          void* const var_28_2 = &data_79d4b0;
004736af                          class PStringBase<unsigned short>* var_2c_2 = esi;
004736b0                          PStringBase<unsigned short>::sprintf_append(eax_10, edx_8);
004736b9                          void* __offset(PStringBase<unsigned short>, -0x14) edi_5 = &arg5[-5];
004736b9                          
004736cf                          if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
004736d7                              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
00473684                      }
00473625                  }
00473625                  
004736df                  class PStringBase<unsigned short>* eax_13;
004736df                  eax_13 = next->data.m_data;
004736e5                  arg5 = eax_13;
004736e5                  
004736e9                  if (eax_13 != 0)
004736e9                  {
004736eb                      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = esi->m_charbuffer;
004736f1                      int32_t ebp_1 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
004736f1                      
004736fc                      if ((*(int32_t*)((char*)m_charbuffer_1 + -0x10) != 1 || (ebp_1 + 1) > *(int32_t*)((char*)m_charbuffer_1 + -0xc)))
004736fc                      {
00473713                          PStringBase<unsigned short>::allocate_ref_buffer(esi, ebp_1);
0047371f                          wcscpy(esi->m_charbuffer, m_charbuffer_1);
0047371f                          
00473738                          if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
00473740                              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
004736fc                      }
004736fc                      else
004736fc                      {
004736fe                          *(uint32_t*)((char*)m_charbuffer_1 - 4) = (ebp_1 + 1);
00473703                          *(uint32_t*)(esi->m_charbuffer - 8) = 0xffffffff;
004736fc                      }
004736fc                      
00473750                      wcsncpy(&esi->m_charbuffer->m_data[(ebp_1 - 1)], &arg5, 1);
00473756                      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = esi->m_charbuffer;
0047375e                      m_charbuffer_2->m_data[(m_charbuffer_2->m_data[0x7ffffffffffffffe] - 1)] = 0;
004736e9                  }
004736e9                  
00473765                  _head = next;
00473769                  eax_4 = var_10;
0047376d                  m_tag_1 = m_tag;
0047360e              }
0047360e              
00473771              if (_head != 0)
00473776                  next = _head->next;
00473776              
0047377a              _head = next;
0047377e              eax_4 += 1;
00473781              var_10 = eax_4;
00473781              
00473785              if (_head == 0)
00473785                  break;
00473604          }
004735f9      }
004735f9      
0047378c      eax_4 = arg4;
0047378c      
00473796      if ((eax_4 != 0 && m_tag_1 != 0))
00473796      {
00473798          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
0047379d          arg4 = PStringBase<unsigned short>::s_NullBuffer_4;
004737a5          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
004737b4          class PStringBase<unsigned short>* eax_20 = *(uint32_t*)(*(uint32_t*)m_tag_1 + 0xc)(&arg4);
004737b7          uint16_t* __saved_ebx_7 = arg4;
004737bb          uint16_t* __saved_ebx_5 = __saved_ebx_7;
004737bc          void* const var_24_12 = &data_79d4b0;
004737c1          class PStringBase<unsigned short>* var_28_5 = esi;
004737c2          PStringBase<unsigned short>::sprintf_append(eax_20, __saved_ebx_7);
004737cb          int32_t* esi_2 = (arg4 - 0x14);
004737cb          
004737e1          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004737e9              **(uint32_t**)esi_2(1);
00473796      }
00473796      
004737ed      eax_4 = 1;
004737f3      return 1;
00473560  }

004737f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00473800  uint8_t __thiscall GlyphList::Recalculate(class GlyphList* this, int32_t arg2, uint8_t arg3, int32_t* arg4, int32_t* arg5)

00473800  {
00473810      *(uint32_t*)arg4 = 0;
00473816      *(uint32_t*)arg5 = 0;
00473818      class GlyphList* this_1 = this;
00473824      int32_t* eax;
00473824      
00473824      if (arg2 == this_1->m_cxLastRecalcWidth)
00473826          eax = arg3;
00473826      
0047382d      if ((arg2 != this_1->m_cxLastRecalcWidth || eax != this_1->m_bOneLine))
0047382d      {
0047382f          this_1->m_nFirstInvalidPosition = 0;
0047383a          this->m_cxLastRecalcWidth = arg2;
0047383d          class GlyphList* ecx_1;
0047383d          ecx_1 = arg3;
00473845          this->m_bOneLine = ecx_1;
00473848          this_1 = this;
0047382d      }
0047382d      
0047384c      uint32_t m_nFirstInvalidPosition_1 = this_1->m_nFirstInvalidPosition;
00473854      uint32_t i_3 = 0;
00473854      
00473858      if (m_nFirstInvalidPosition_1 != 0)
00473858      {
00473861          GlyphList::FindPrevLine(this_1, m_nFirstInvalidPosition_1, &i_3, &this_1->m_nFirstInvalidPosition);
00473866          this_1 = this;
00473858      }
00473858      
0047386a      uint32_t i_2 = i_3;
00473870      int32_t m_nFirstInvalidPosition_2;
00473870      
00473870      if (i_2 > 0)
00473870      {
00473872          int32_t edx_2 = 0;
00473874          uint32_t i_1 = i_2;
004738b6          uint32_t i;
004738b6          
004738b6          do
004738b6          {
00473880              class GlyphLine* m_data = this_1->m_glyphLines.m_data;
00473883              int32_t m_nFirstInvalidPosition_5 = *(uint32_t*)(&m_data->m_nLineWidth + edx_2);
0047388b              int32_t ebx_1 = *(uint32_t*)arg4;
0047388f              m_nFirstInvalidPosition_2 = m_nFirstInvalidPosition_5;
00473895              int32_t* esi_1 = &m_nFirstInvalidPosition_2;
00473895              
00473899              if (ebx_1 >= m_nFirstInvalidPosition_5)
0047389b                  esi_1 = arg4;
0047389b              
0047389f              *(uint32_t*)arg4 = *(uint32_t*)esi_1;
004738aa              int32_t esi_4 = (*(uint32_t*)arg5 + *(uint32_t*)(&m_data->m_nLineHeight + edx_2));
004738ac              edx_2 += 0x10;
004738af              i = i_1;
004738af              i_1 -= 1;
004738b0              *(uint32_t*)arg5 = esi_4;
004738b2              this_1 = this;
004738b6          } while (i != 1);
00473870      }
00473870      
004738b8      uint32_t m_nFirstInvalidPosition = this_1->m_nFirstInvalidPosition;
004738bb      uint32_t m_num_1 = this_1->m_glyphLines.m_num;
004738c0      int32_t ebx_2 = 0;
004738c2      m_nFirstInvalidPosition_2 = m_nFirstInvalidPosition;
004738c6      int32_t m_nFirstInvalidPosition_3 = m_nFirstInvalidPosition;
004738ca      uint32_t i_4 = i_3;
004738ce      class ListNode<Glyph>* next_1 = nullptr;
004738d2      int32_t var_3c = 0;
004738d6      int32_t var_34 = 0;
004738da      int32_t var_44 = 0;
004738de      int32_t m_nFirstInvalidPosition_4 = 0;
004738e2      int32_t var_38 = 0;
004738e6      char var_4a = 0;
004738ea      char var_49 = 0;
004738ee      class ListNode<Glyph>* next_2 = nullptr;
004738f2      int32_t m_width;
004738f2      uint32_t m_nIndex;
004738f2      class ListNode<Glyph>* _head;
004738f2      
004738f2      if (i_4 < m_num_1)
004738f2      {
00473902          m_nIndex = this_1->m_glyphLines.m_data[i_4].m_nIndex;
00473906          class ListNode<Glyph>* _head_1 = this_1->m_glyphList._head;
0047390b          m_width = 0;
0047390b          
0047390f          if (_head_1 == 0)
0047390f          {
00473935          label_473935:
00473935              _head = nullptr;
0047390f          }
0047390f          else
0047390f          {
00473919              while (m_width != m_nIndex)
00473919              {
00473923                  if (_head_1 != 0)
00473925                      _head_1 = _head_1->next;
00473925                  
0047392f                  m_width += 1;
0047392f                  
00473933                  if (_head_1 == 0)
00473933                      goto label_473935_1;
00473919              }
00473919              
00473a0c              _head = _head_1;
0047390f          }
004738f2      }
004738f2      else if (m_num_1 != 0)
00473a03      {
00473935      label_473935_1:
00473935          _head = nullptr;
00473a03      }
00473a03      else
00473a0c          _head = this_1->m_glyphList._head;
00473a0c      
0047393d      int32_t edi_1 = (m_num_1 - 1);
0047393d      
00473940      if (edi_1 >= i_3)
00473940      {
00473944          int32_t esi_9 = (edi_1 << 4);
00473944          
0047399d          do
0047399d          {
00473947              uint32_t m_num = this_1->m_glyphLines.m_num;
00473947              
0047394f              if (edi_1 < m_num)
0047394f              {
0047394c                  this_1->m_glyphLines.m_num = (m_num - 1);
0047394c                  
00473957                  if (edi_1 != (m_num - 1))
00473957                  {
00473959                      class GlyphLine* m_data_1 = this_1->m_glyphLines.m_data;
0047395b                      uint32_t eax_9 = ((m_num - 1) << 4);
00473962                      void* eax_10 = (eax_9 + m_data_1);
00473964                      *(uint32_t*)(&m_data_1->m_nIndex + esi_9) = *(uint32_t*)(&m_data_1->m_nIndex + eax_9);
0047396b                      *(uint32_t*)(&m_data_1->m_nLineWidth + esi_9) = *(uint32_t*)((char*)eax_10 + 8);
00473972                      ebx_2 = var_34;
00473976                      *(uint32_t*)(&m_data_1->m_nLineHeight + esi_9) = *(uint32_t*)((char*)eax_10 + 0xc);
00473982                      void* eax_14 = &this_1->m_glyphLines.m_data[this_1->m_glyphLines.m_num];
00473986                      *(uint32_t*)((char*)eax_14 + 4) = 0;
00473989                      *(uint32_t*)((char*)eax_14 + 8) = 0;
0047398c                      *(uint32_t*)((char*)eax_14 + 0xc) = 0;
00473957                  }
00473957                  
0047398f                  this_1 = this;
0047394f              }
0047394f              
00473997              edi_1 -= 1;
00473998              esi_9 -= 0x10;
0047399d          } while (edi_1 >= i_3);
00473940      }
00473940      
004739a5      if (_head != 0)
004739a5      {
004739ab          int32_t m_nFirstInvalidPosition_6 = m_nFirstInvalidPosition_2;
004739af          class ListNode<Glyph>* next = _head;
004739af          
00473bcf          do
00473bcf          {
004739b1              class ListNode<Glyph>* eax_16;
004739b1              eax_16 = arg3;
004739ba              m_width = next->data.m_width;
004739ba              
004739be              if (eax_16 == 0)
004739be              {
004739d0                  if (LinebreakUtils::CanBreakLineAt(next_1, next) == 0)
004739d0                  {
00473a1e                      if ((Glyph::IsWhiteSpace(next) == 0 && (Glyph::IsNewLine(next) == 0 && (m_width + var_44) > arg2)))
00473a1e                      {
00473a3d                          m_nFirstInvalidPosition_4 = m_nFirstInvalidPosition_6;
00473a41                          next_2 = next_1;
00473a45                          var_38 = ebx_2;
00473a49                          var_44 = 0;
00473a51                          var_4a = 1;
00473a1e                      }
004739d0                  }
004739d0                  else
004739d0                  {
004739d4                      m_nFirstInvalidPosition_4 = m_nFirstInvalidPosition_6;
004739d8                      next_2 = next_1;
004739dc                      var_38 = ebx_2;
004739e0                      var_44 = 0;
004739e8                      var_4a = 1;
004739e8                      
004739ed                      if ((next_1 != 0 && Glyph::IsNewLine(next_1) != 0))
004739fa                          var_49 = 1;
004739d0                  }
004739be              }
004739be              
00473a56              int32_t m_width_1 = m_width;
00473a62              int32_t ebp_1 = (var_3c + m_width_1);
00473a68              var_3c = ebp_1;
00473a6c              var_44 += m_width_1;
00473a70              int32_t esi_10 = ebp_1;
00473a72              uint8_t eax_23 = Glyph::IsWhiteSpace(next);
00473a79              int32_t eax_24;
00473a79              
00473a79              if (eax_23 == 0)
00473a7d                  eax_24 = Glyph::IsNewLine(next);
00473a7d              
00473a84              if ((eax_23 != 0 || eax_24 != 0))
00473a8c                  esi_10 = (ebp_1 - m_width);
00473a8c              
00473a8e              eax_24 = var_49;
00473a8e              
00473a94              if (eax_24 != 0)
00473a94              {
00473ab4              label_473ab4:
00473ab4                  int32_t m_width_2 = (ebp_1 - var_44);
00473ab8                  m_width = m_width_2;
00473ab8                  
00473abc                  if (next_2 != 0)
00473abc                  {
00473ac0                      uint8_t eax_25 = Glyph::IsWhiteSpace(next_2);
00473ac7                      uint8_t eax_26;
00473ac7                      
00473ac7                      if (eax_25 == 0)
00473acb                          eax_26 = Glyph::IsNewLine(next_2);
00473acb                      
00473ad2                      if ((eax_25 != 0 || eax_26 != 0))
00473ad2                      {
00473ad4                          m_width_2 -= next_2->data.m_width;
00473ad7                          m_width = m_width_2;
00473ad2                      }
00473abc                  }
00473abc                  
00473ae8                  int32_t eax_28 = (this->m_glyphLines.m_sizeAndDeallocate & 0x7fffffff);
00473aef                  uint8_t eax_33;
00473aef                  
00473aef                  if (this->m_glyphLines.m_num >= eax_28)
00473aef                  {
00473af1                      uint32_t m_nIndex_1 = (eax_28 + 1);
00473af1                      
00473af7                      if (m_nIndex_1 <= 8)
00473af9                          m_nIndex_1 = 8;
00473af7                      else if (m_nIndex_1 <= 0x4000)
00473b06                      {
00473b1c                          m_nIndex = m_nIndex_1;
00473b25                          int32_t eflags_1;
00473b25                          char eax_32;
00473b25                          eax_32 = __bsr_gprv_memv(m_nIndex);
00473b31                          int32_t edi_2 = (1 << eax_32);
00473b31                          
00473b35                          if (m_nIndex_1 > edi_2)
00473b37                              m_nIndex_1 = (edi_2 * 2);
00473b06                      }
00473b06                      else
00473b06                      {
00473b0a                          int32_t eax_30 = (m_nIndex_1 & 0x3fff);
00473b0a                          
00473b0f                          if (eax_30 != 0)
00473b18                              m_nIndex_1 += (0x4000 - eax_30);
00473b06                      }
00473b06                      
00473b3d                      eax_33 = SmartArray<GlyphLine,1>::grow(&this->m_glyphLines, m_nIndex_1);
00473aef                  }
00473aef                  
00473b44                  if ((this->m_glyphLines.m_num < eax_28 || eax_33 != 0))
00473b44                  {
00473b52                      void* eax_36 = &this->m_glyphLines.m_data[this->m_glyphLines.m_num];
00473b58                      *(uint32_t*)((char*)eax_36 + 4) = m_nFirstInvalidPosition_3;
00473b5b                      *(uint32_t*)((char*)eax_36 + 8) = m_width_2;
00473b5e                      *(uint32_t*)((char*)eax_36 + 0xc) = var_38;
00473ae5                      this->m_glyphLines.m_num += 1;
00473b44                  }
00473b44                  
00473b6a                  int32_t* ecx_21 = &m_width;
00473b6a                  
00473b6e                  if (*(uint32_t*)arg4 >= m_width_2)
00473b70                      ecx_21 = arg4;
00473b70                  
00473b78                  next = _head;
00473b7c                  *(uint32_t*)arg4 = *(uint32_t*)ecx_21;
00473b82                  *(uint32_t*)arg5 += var_38;
00473b8c                  ebx_2 = 0;
00473b8e                  m_nFirstInvalidPosition_3 = m_nFirstInvalidPosition_4;
00473b92                  var_3c = var_44;
00473b96                  var_34 = 0;
00473b9a                  var_4a = 0;
00473b9e                  var_49 = 0;
00473a94              }
00473a94              else
00473a94              {
00473a96                  eax_24 = var_4a;
00473a96                  
00473aa6                  if ((eax_24 != 0 && esi_10 > arg2))
00473aa6                      goto label_473ab4;
00473a94              }
00473a94              
00473ba2              int32_t m_height = next->data.m_height;
00473ba5              m_nIndex = m_height;
00473bab              eax_16 = &var_34;
00473bab              
00473baf              if (m_height >= ebx_2)
00473bb1                  eax_16 = &m_nIndex;
00473bb1              
00473bb9              ebx_2 = eax_16->data.m_data;
00473bbb              next_1 = next;
00473bbd              next = next->next;
00473bc0              m_nFirstInvalidPosition_6 = (m_nFirstInvalidPosition_2 + 1);
00473bc3              var_34 = ebx_2;
00473bc7              m_nFirstInvalidPosition_2 = m_nFirstInvalidPosition_6;
00473bcb              _head = next;
00473bcf          } while (next != 0);
00473bcf          
00473bd5          this_1 = this;
004739a5      }
004739a5      
00473be2      int32_t edx_12 = (this_1->m_glyphLines.m_sizeAndDeallocate & 0x7fffffff);
00473bea      uint8_t eax_45;
00473bea      
00473bea      if (this_1->m_glyphLines.m_num >= edx_12)
00473bea      {
00473bec          uint32_t m_nIndex_2 = (edx_12 + 1);
00473bec          
00473bf0          if (m_nIndex_2 <= 8)
00473bf2              m_nIndex_2 = 8;
00473bf0          else if (m_nIndex_2 <= 0x4000)
00473bff          {
00473c15              m_nIndex = m_nIndex_2;
00473c1e              int32_t eflags_2;
00473c1e              char eax_44;
00473c1e              eax_44 = __bsr_gprv_memv(m_nIndex);
00473c2a              int32_t edi_3 = (1 << eax_44);
00473c2a              
00473c2e              if (m_nIndex_2 > edi_3)
00473c30                  m_nIndex_2 = (edi_3 * 2);
00473bff          }
00473bff          else
00473bff          {
00473c03              int32_t eax_42 = (m_nIndex_2 & 0x3fff);
00473c03              
00473c08              if (eax_42 != 0)
00473c11                  m_nIndex_2 += (0x4000 - eax_42);
00473bff          }
00473bff          
00473c36          eax_45 = SmartArray<GlyphLine,1>::grow(&this_1->m_glyphLines, m_nIndex_2);
00473bea      }
00473bea      
00473c3d      if ((this_1->m_glyphLines.m_num < edx_12 || eax_45 != 0))
00473c3d      {
00473c4b          void* eax_48 = &this_1->m_glyphLines.m_data[this_1->m_glyphLines.m_num];
00473c4d          int32_t ecx_27 = var_3c;
00473c51          *(uint32_t*)((char*)eax_48 + 4) = m_nFirstInvalidPosition_3;
00473c54          *(uint32_t*)((char*)eax_48 + 8) = ecx_27;
00473c57          *(uint32_t*)((char*)eax_48 + 0xc) = ebx_2;
00473bdf          this_1->m_glyphLines.m_num += 1;
00473c3d      }
00473c3d      
00473c69      int32_t* ecx_29 = &var_3c;
00473c69      
00473c6d      if (*(uint32_t*)arg4 >= var_3c)
00473c6f          ecx_29 = arg4;
00473c6f      
00473c73      *(uint32_t*)arg4 = *(uint32_t*)ecx_29;
00473c7f      *(uint32_t*)arg5 += ebx_2;
00473c7f      
00473c81      if ((next_1 != 0 && Glyph::IsNewLine(next_1) != 0))
00473c81      {
00473c9a          uint32_t _num_elements = this->m_glyphList._num_elements;
00473ca3          int32_t m_height_1 = next_1->data.m_height;
00473ca9          int32_t eax_53 = (this->m_glyphLines.m_sizeAndDeallocate & 0x7fffffff);
00473cb4          uint8_t eax_58;
00473cb4          
00473cb4          if (this->m_glyphLines.m_num >= eax_53)
00473cb4          {
00473cb6              uint32_t m_nIndex_3 = (eax_53 + 1);
00473cb6              
00473cbc              if (m_nIndex_3 <= 8)
00473cbe                  m_nIndex_3 = 8;
00473cbc              else if (m_nIndex_3 <= 0x4000)
00473ccb              {
00473ce1                  m_nIndex = m_nIndex_3;
00473cea                  int32_t eflags_3;
00473cea                  char eax_57;
00473cea                  eax_57 = __bsr_gprv_memv(m_nIndex);
00473cf6                  int32_t edi_4 = (1 << eax_57);
00473cf6                  
00473cfa                  if (m_nIndex_3 > edi_4)
00473cfc                      m_nIndex_3 = (edi_4 * 2);
00473ccb              }
00473ccb              else
00473ccb              {
00473ccf                  int32_t eax_55 = (m_nIndex_3 & 0x3fff);
00473ccf                  
00473cd4                  if (eax_55 != 0)
00473cdd                      m_nIndex_3 += (0x4000 - eax_55);
00473ccb              }
00473ccb              
00473d02              eax_58 = SmartArray<GlyphLine,1>::grow(&this->m_glyphLines, m_nIndex_3);
00473cb4          }
00473cb4          
00473d09          if ((this->m_glyphLines.m_num < eax_53 || eax_58 != 0))
00473d09          {
00473d17              void* eax_61 = &this->m_glyphLines.m_data[this->m_glyphLines.m_num];
00473d19              *(uint32_t*)((char*)eax_61 + 4) = _num_elements;
00473d1c              *(uint32_t*)((char*)eax_61 + 8) = 0;
00473d23              *(uint32_t*)((char*)eax_61 + 0xc) = m_height_1;
00473ca6              this->m_glyphLines.m_num += 1;
00473d09          }
00473d09          
00473d29          int32_t* eax_62 = arg5;
00473d30          *(uint32_t*)eax_62 += next_1->data.m_height;
00473c81      }
00473c81      
00473d3c      this->m_nFirstInvalidPosition = this->m_glyphList._num_elements;
00473d3f      class GlyphList* eax_63;
00473d3f      eax_63 = 1;
00473d45      return 1;
00473800  }

00473878                                                                          8d a4 24 00 00 00 00 90                          ..$.....
00473d48                          90 90 90 90 90 90 90 90                                                          ........

00473d50  void* __thiscall GlyphList::`scalar deleting destructor'(class GlyphList* this, uint32_t arg2)

00473d50  {
00473d53      GlyphList::~GlyphList(this);
00473d53      
00473d5d      if ((arg2 & 1) != 0)
00473d60          operator delete(this);
00473d60      
00473d6b      return this;
00473d50  }

00473d6e                                            90 90                                                                ..

00473d70  uint8_t __thiscall GlyphList::InqText(class GlyphList const* this, uint8_t arg2, class PStringBase<unsigned short>* arg3)

00473d70  {
00473d85      return GlyphList::InqText(this, 0, this->m_glyphList._num_elements, arg2, arg3);
00473d70  }

00473d88                          90 90 90 90 90 90 90 90                                                          ........

00473d90  void __thiscall UIElement_Scrollable::UIElement_Scrollable(class UIElement_Scrollable* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00473d90  {
00473d9f      UIElement::UIElement(this, arg2, arg3);
00473da6      __builtin_memset(&this->m_eHorizonalScrollbarID, 0, 0x18);
00473dca      this->vtable = 0x79d4c0;
00473d90  }

00473dd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00473de0  class UIElement* __thiscall UIElement_Scrollable::DynamicCast(class UIElement_Scrollable* this, uint32_t arg2) __pure

00473de0  {
00473de9      int32_t eax;
00473de9      eax = arg2 != 0xa;
00473def      return ((eax - 1) & this);
00473de0  }

00473df2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00473e00  void __thiscall UIElement_Scrollable::MouseDown(class UIElement_Scrollable* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00473e00  {
00473e15      UIElement::MouseDown(this, arg2, arg3, arg4);
00473e1c      class UIElement* eax = UIElement::GetRootElement(this);
00473e1c      
00473e25      if ((eax != 0 && eax->vtable->GetActivatable() != 0))
00473e25      {
00473e35          eax->vtable->Activate();
00473e3f          this->vtable->TakeFocus();
00473e25      }
00473e00  }

00473e4e                                            90 90                                                                ..

00473e50  uint8_t __thiscall UIElement_Scrollable::RegisterInputMaps(class UIElement_Scrollable* this, int32_t arg2)

00473e50  {
00473e5a      if (ICIDM::s_cidm == 0)
00473e5a      {
00473e5c          class ICIDM* eax;
00473e5c          eax = 0;
00473e5f          return 0;
00473e5a      }
00473e5a      
00473e78      int32_t ebx;
00473e78      ebx = UIElement::RegisterInputMaps(this, arg2);
00473e86      return (ICIDM::s_cidm->vtable->RegisterInputMap(0xa, this, arg2) | ebx);
00473e50  }

00473e89                             90 90 90 90 90 90 90                                                           .......

00473e90  uint8_t __fastcall UIElement_Scrollable::UnregisterInputMaps(class UIElement_Scrollable* this)

00473e90  {
00473e9a      if (ICIDM::s_cidm == 0)
00473e9a      {
00473e9c          class ICIDM* eax;
00473e9c          eax = 0;
00473e9f          return 0;
00473e9a      }
00473e9a      
00473eaf      int32_t ebx;
00473eaf      ebx = UIElement::UnregisterInputMaps(this);
00473ebc      return (ICIDM::s_cidm->vtable->UnregisterInputMap(0xa, this) | ebx);
00473e90  }

00473ebd                                                                                         90 90 90                               ...

00473ec0  class UIElement_Scrollbar* __thiscall UIElement_Scrollable::GetScrollbarPointer_(class UIElement_Scrollable* this, uint8_t arg2)

00473ec0  {
00473ec1      class UIElement_Scrollable* this_1 = this;
00473ec3      this = arg2;
00473ecc      uint32_t ecx;
00473ecc      
00473ecc      if (this == 0)
00473ed6          ecx = this_1->m_eVerticalScrollbarID;
00473ecc      else
00473ece          ecx = this_1->m_eHorizonalScrollbarID;
00473ece      
00473ede      if (ecx == 0)
00473f1b          return nullptr;
00473f1b      
00473ee3      class UIElement* eax_1 = UIElement::FindRelative(this_1, ecx);
00473ee3      
00473eea      if (eax_1 != 0)
00473eea      {
00473ef2          class UIElement* result = eax_1->vtable->DynamicCast(0xb);
00473ef2          
00473efc          if ((result != 0 && UIElement::FindRelative(result, this_1->m_desc.m_elementID) == this_1))
00473f17              return result;
00473eea      }
00473eea      
00473f14      return 0;
00473ec0  }

00473f1e                                                                                            90 90                                ..

00473f20  void __thiscall UIElement_Scrollable::UpdateScrollbarPosition_(class UIElement_Scrollable* this, uint8_t arg2)

00473f20  {
00473f24      uint8_t ebx = arg2;
00473f2d      class UIElement_Scrollbar* eax = UIElement_Scrollable::GetScrollbarPointer_(this, ebx);
00473f2d      
00473f36      if (eax != 0)
00473f36      {
00473f3f          long double x87_r7_2;
00473f3f          
00473f3f          if (ebx == 0)
00473f3f          {
00473f72              arg2 = ((float)((long double)this->m_iScrollableY));
00473f81              x87_r7_2 = ((long double)(this->m_iScrollableHeight - UIRegion::GetHeight(this)));
00473f3f          }
00473f3f          else
00473f3f          {
00473f4f              arg2 = ((float)((long double)this->m_iScrollableX));
00473f5e              x87_r7_2 = ((long double)(this->m_iScrollableWidth - UIRegion::GetWidth(this)));
00473f3f          }
00473f3f          
00473f88          long double x87_r6_2 = fabsl(x87_r7_2);
00473f8a          long double temp1_1 = ((long double)0.000199999995f);
00473f8a          (x87_r6_2 - temp1_1);
00473f90          int32_t eax_1;
00473f90          eax_1 = ((((x87_r6_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
00473f92          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00473f92          
00473f95          if (p_1)
00473fa7              arg2 = ((float)(((long double)arg2) / x87_r7_2));
00473f95          else
00473f97              arg2 = 0;
00473f97          
00473fb3          UIElement::SetAttribute_Bool(eax, 0x75, 1);
00473fc3          int32_t* var_8 = nullptr;
00473fc7          int32_t* var_4_1 = nullptr;
00473fcb          BaseProperty::SetPropertyName(&var_8, 0x86);
00473fcb          
00473fd4          if (var_4_1 != 0)
00473fd4          {
00473fda              BaseProperty::CheckCopyOnWrite(&var_8);
00473fea              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x8c)(arg2);
00473fd4          }
00473fd4          
00473ff5          UIElement::SetAttribute_Bool(eax, 0x7b, ebx);
00473ffa          eax->vtable->SetProperty(&var_8);
0047400e          UIElement::SetAttribute_Bool(eax, 0x75, 0);
00474015          UIElement_Scrollbar::UpdateLayout(eax);
0047401a          int32_t* eax_4 = var_8;
0047401a          
00474020          if (eax_4 != 0)
00474020          {
0047402a              int32_t esi_2 = (eax_4[1] - 1);
00474027              eax_4[1] = esi_2;
00474027              
00474031              if (esi_2 == 0)
00474037                  **(uint32_t**)eax_4(1);
00474037              
00474039              var_8 = nullptr;
00474020          }
00474020          
00474043          if (var_4_1 != 0)
00474043          {
0047404d              int32_t esi_4 = (var_4_1[1] - 1);
0047404a              var_4_1[1] = esi_4;
0047404a              
00474054              if (esi_4 == 0)
0047405a                  **(uint32_t**)var_4_1(1);
00474043          }
00473f36      }
00473f20  }

00474065                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00474070  uint8_t __thiscall UIElement_Scrollable::InqAvailableProperties(class UIElement_Scrollable const* this, class AvailablePropertySet* arg2)

00474070  {
00474073      class AvailablePropertySet* edi = arg2;
00474078      int32_t ebx;
00474078      ebx = 1;
00474078      
00474081      if (UIElement::InqAvailableProperties(this, edi) == 0)
00474083          ebx = 0;
00474083      
00474089      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
0047408e      class AvailablePropertySet* esi = arg2;
0047408e      
00474094      if (esi == 0)
00474094      {
00474098          int32_t eax_1;
00474098          eax_1 = 0;
0047409b          return 0;
00474094      }
00474094      
004740aa      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0x11, edi) == 0)
004740ac          ebx = 0;
004740ac      
004740b2      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
004740ba      return ebx;
00474070  }

004740bd                                                                                         90 90 90                               ...

004740c0  void __thiscall UIElement_Scrollable::SetScrollableXY(class UIElement_Scrollable* this, int32_t arg2, int32_t arg3, uint8_t arg4)

004740c0  {
004740cd      int32_t eax_6;
004740cd      int32_t ebp;
004740cd      
004740cd      if (arg4 != 0)
004740cd      {
00474158          eax_6 = arg3;
0047415c          ebp = arg2;
004740cd      }
004740cd      else
004740cd      {
004740da          arg4 = 1;
004740df          UIElement::GetAttribute_Bool(this, 0x73, &arg4);
004740df          
004740ea          if (arg4 == 0)
004740ea          {
00474158              eax_6 = arg3;
0047415c              ebp = arg2;
004740ea          }
004740ea          else
004740ea          {
004740fa              int32_t edi_2 = (this->m_iScrollableWidth - UIRegion::GetWidth(this));
004740fc              bool cond:1_1 = arg2 < edi_2;
00474100              int32_t var_8 = edi_2;
00474104              int32_t var_4 = 0;
0047410c              int32_t* eax_3 = &arg2;
0047410c              
00474110              if (!(cond:1_1))
00474112                  eax_3 = &var_8;
00474112              
00474119              if (*(uint32_t*)eax_3 <= 0)
0047411b                  eax_3 = &var_4;
0047411b              
0047411f              ebp = *(uint32_t*)eax_3;
0047412e              int32_t edi_4 = (this->m_iScrollableHeight - UIRegion::GetHeight(this));
00474130              bool cond:2_1 = arg3 < edi_4;
00474134              arg4 = edi_4;
00474138              arg2 = 0;
00474141              int32_t* eax_5 = &arg3;
00474141              
00474145              if (!(cond:2_1))
00474147                  eax_5 = &arg4;
00474147              
0047414e              if (*(uint32_t*)eax_5 <= 0)
00474150                  eax_5 = &arg2;
00474150              
00474154              eax_6 = *(uint32_t*)eax_5;
004740ea          }
004740cd      }
004740cd      
0047416e      if ((ebp != this->m_iScrollableX || eax_6 != this->m_iScrollableY))
0047416e      {
00474174          this->m_iScrollableX = ebp;
0047417a          this->m_iScrollableY = eax_6;
00474180          UIElement_Scrollable::UpdateScrollbarPosition_(this, 1);
00474189          UIElement_Scrollable::UpdateScrollbarPosition_(this, 0);
0047418e          this->vtable->AdjustToScrollableXYChange();
0047416e      }
004740c0  }


004741a0  void __thiscall UIElement_Scrollable::UpdateScrollbarSize_(class UIElement_Scrollable* this, uint8_t arg2)

004741a0  {
004741ad      class UIElement_Scrollbar* eax = UIElement_Scrollable::GetScrollbarPointer_(this, arg2);
004741ad      
004741b6      if (eax != 0)
004741b6      {
004741bf          int32_t ebp_1;
004741bf          
004741bf          if (arg2 == 0)
004741c9              ebp_1 = this->m_iScrollableHeight;
004741bf          else
004741c1              ebp_1 = this->m_iScrollableWidth;
004741c1          
004741d1          int32_t var_8 = ebp_1;
004741d7          int32_t var_c;
004741d7          int32_t eax_1;
004741d7          int32_t* ecx_1;
004741d7          
004741d7          if (arg2 == 0)
004741d7          {
004741ea              eax_1 = UIRegion::GetHeight(this);
004741ef              var_c = eax_1;
004741f3              ecx_1 = &this->m_iScrollableY;
004741d7          }
004741d7          else
004741d7          {
004741d9              eax_1 = UIRegion::GetWidth(this);
004741de              var_c = eax_1;
004741e2              ecx_1 = &this->m_iScrollableX;
004741d7          }
004741d7          
004741f9          uint8_t ebx = 0;
004741fd          char var_4_1 = 0;
004741fd          
00474201          if (ebp_1 <= eax_1)
00474201          {
00474203              ebp_1 = eax_1;
00474205              ebx = 1;
00474207              *(uint32_t*)ecx_1 = 0;
0047420d              var_8 = ebp_1;
00474211              var_4_1 = 1;
00474201          }
00474201          
00474217          if (*(uint32_t*)ecx_1 > ebp_1)
00474219              *(uint32_t*)ecx_1 = ebp_1;
00474219          
0047421e          if (ebp_1 != 0)
0047421e          {
0047422a              long double x87_r7_1 = ((long double)var_c);
0047422e              var_c = 0x3f800000;
00474236              long double x87_r7_2 = (x87_r7_1 / ((long double)var_8));
0047423a              var_8 = ((float)x87_r7_2);
0047423e              (x87_r7_2 - ((long double)1f));
00474246              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00474249              int32_t* eax_2 = &var_8;
00474249              
0047424d              if (p_1)
0047424f                  eax_2 = &var_c;
0047424f              
00474255              var_8 = *(uint32_t*)eax_2;
0047421e          }
0047421e          else
00474220              var_8 = 0x3f800000;
00474220          
00474265          float var_10 = 0f;
0047426d          UIElement::GetAttribute_Float(eax, 0x86, &var_10);
0047426d          
00474274          if (ebx != 0)
00474276              var_10 = 0f;
00474276          
00474284          UIElement::SetAttribute_Bool(eax, 0x75, 1);
00474289          uint8_t ebx_1 = arg2;
00474292          UIElement::SetAttribute_Bool(eax, 0x7b, ebx_1);
004742a0          UIElement::SetAttribute_Bool(eax, 0x76, var_4_1);
004742b1          UIElement::SetAttribute_Float(eax, 0x88, var_8);
004742bc          UIElement::SetAttribute_Bool(eax, 0x75, 0);
004742ca          uint8_t var_11 = 0;
004742cf          UIElement::GetAttribute_Bool(eax, 0x74, &var_11);
004742cf          
004742da          if (var_11 != 0)
004742da          {
004742e8              UIElement::SetAttribute_Float(eax, 0x86, var_10);
004742e8              
004742f1              if (ebx_1 == 0)
00474317                  arg2 = (this->m_iScrollableHeight - UIRegion::GetHeight(this));
004742f1              else
00474300                  arg2 = (this->m_iScrollableWidth - UIRegion::GetWidth(this));
00474300              
00474323              int32_t eax_8;
00474323              int32_t ecx_11;
00474323              eax_8 = _ftol2();
00474328              ecx_11 = ebx_1;
0047432a              char temp2 = ecx_11;
0047432a              ecx_11 = -(ecx_11);
00474334              int32_t edx_3;
00474334              edx_3 = ebx_1 != 0;
00474337              this->m_iScrollableX = ((ecx_11 - ecx_11) & eax_8);
00474342              struct UIElement_Scrollable::VTable* vtable = this->vtable;
00474344              this->m_iScrollableY = ((edx_3 - 1) & eax_8);
0047434a              vtable->AdjustToScrollableXYChange();
00474356              return;
004742da          }
004742da          
0047435c          UIElement_Scrollable::UpdateScrollbarPosition_(this, ebx_1);
004741b6      }
004741a0  }

0047436a                                90 90 90 90 90 90                                                            ......

00474370  void __thiscall UIElement_Scrollable::HandleScrollbarMessage_(class UIElement_Scrollable* this, uint8_t arg2, uint32_t const arg3, class UIElement_Scrollbar* arg4)

00474370  {
00474373      class UIElement_Scrollbar* ecx = arg4;
00474373      
00474379      if (ecx != 0)
00474379      {
00474388          if (arg3 == 0xa)
00474388          {
0047440a              arg4 = nullptr;
00474412              UIElement::GetAttribute_Float(ecx, 0x86, &arg4);
00474417              int32_t ebx;
00474417              ebx = arg2;
00474417              
0047441f              if (ebx == 0)
00474445                  arg2 = (this->m_iScrollableHeight - UIRegion::GetHeight(this));
0047441f              else
0047442e                  arg2 = (this->m_iScrollableWidth - UIRegion::GetWidth(this));
0047442e              
00474451              int32_t eax_5;
00474451              int32_t ecx_9;
00474451              eax_5 = _ftol2();
00474456              ecx_9 = ebx;
00474458              char temp1_1 = ecx_9;
00474458              ecx_9 = -(ecx_9);
00474462              int32_t edx_2;
00474462              edx_2 = ebx != 0;
00474465              this->m_iScrollableX = ((ecx_9 - ecx_9) & eax_5);
00474470              struct UIElement_Scrollable::VTable* vtable = this->vtable;
00474472              this->m_iScrollableY = ((edx_2 - 1) & eax_5);
00474478              vtable->AdjustToScrollableXYChange();
00474388          }
00474388          else if ((arg3 > 0xc && arg3 <= 0x10))
00474396          {
004743a4              if ((arg3 == 0xf || arg3 == 0x10))
004743aa                  ecx = 1;
004743a4              else
004743a6                  ecx = 0;
004743a6              
004743b4              uint32_t const eax_1;
004743b4              
004743b4              if ((arg3 == 0xd || arg3 == 0xf))
004743bc                  eax_1 = 1;
004743b4              else
004743b6                  eax_1 = 0;
004743b6              
004743be              int32_t ebx_1 = arg2;
004743c9              int32_t eax_2 = this->vtable->InqScrollDelta(ebx_1, eax_1, ecx);
004743d9              int32_t ecx_2;
004743d9              ecx_2 = ebx_1 != 0;
004743e3              char temp2 = ebx_1;
004743e3              ebx_1 = -(ebx_1);
004743f5              UIElement_Scrollable::SetScrollableXY(this, (((ebx_1 - ebx_1) & eax_2) + this->m_iScrollableX), (((ecx_2 - 1) & eax_2) + this->m_iScrollableY), 0);
00474396          }
00474379      }
00474370  }

00474484              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00474490  void __fastcall UIElement_Scrollable::~UIElement_Scrollable(class UIElement_Scrollable* this)

00474490  {
00474492      this->vtable = 0x79d4c0;
00474498      this->m_eHorizonalScrollbarID = 0;
0047449e      this->m_eVerticalScrollbarID = 0;
004744a4      /* tailcall */
004744a4      return UIElement::~UIElement(this);
00474490  }

004744a9                             90 90 90 90 90 90 90                                                           .......

004744b0  void __fastcall UIElement_Scrollable::PostInit(class UIElement_Scrollable* this)

004744b0  {
004744b4      UIElement::PostInit(this);
004744b9      uint32_t m_eHorizonalScrollbarID = this->m_eHorizonalScrollbarID;
004744b9      
004744c1      if (m_eHorizonalScrollbarID != 0)
004744c1      {
004744c6          class UIElement* eax = UIElement::FindRelative(this, m_eHorizonalScrollbarID);
004744c6          
004744cd          if (eax != 0)
004744cd          {
004744d5              class UIElement* eax_1 = eax->vtable->DynamicCast(0xb);
004744d5              
004744df              if (eax_1 != 0)
004744df              {
004744ea                  class UIElement* eax_3;
004744ea                  class UIListener* edx_2;
004744ea                  eax_3 = UIElement::FindRelative(eax_1, this->m_desc.m_elementID);
004744ea                  
004744f1                  if (eax_3 == this)
004744f1                  {
004744f3                      class UIElement_Scrollable* this_1 = this;
004744f6                      UIElement::RegisterForElementMessages(eax_1, edx_2);
004744f1                  }
004744df              }
004744cd          }
004744c1      }
004744c1      
004744fb      uint32_t m_eVerticalScrollbarID = this->m_eVerticalScrollbarID;
004744fb      
00474503      if (m_eVerticalScrollbarID != 0)
00474503      {
00474508          class UIElement* eax_4 = UIElement::FindRelative(this, m_eVerticalScrollbarID);
00474508          
0047450f          if (eax_4 != 0)
0047450f          {
00474517              class UIElement* eax_5 = eax_4->vtable->DynamicCast(0xb);
00474517              
00474521              if (eax_5 != 0)
00474521              {
0047452c                  class UIElement* eax_7;
0047452c                  class UIListener* edx_4;
0047452c                  eax_7 = UIElement::FindRelative(eax_5, this->m_desc.m_elementID);
0047452c                  
00474533                  if (eax_7 == this)
00474533                  {
00474535                      class UIElement_Scrollable* this_2 = this;
00474538                      UIElement::RegisterForElementMessages(eax_5, edx_4);
00474533                  }
00474521              }
0047450f          }
00474503      }
00474503      
00474541      UIElement_Scrollable::UpdateScrollbarSize_(this, 1);
0047454a      UIElement_Scrollable::UpdateScrollbarSize_(this, 0);
004744b0  }

00474552                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00474560  enum UIElementMessageListenResult __thiscall UIElement_Scrollable::ListenToElementMessage(class UIElement_Scrollable* this, struct UIElementMessageInfo const* arg2)

00474560  {
00474561      struct UIElementMessageInfo* ebx = arg2;
00474565      uint32_t idElement = ebx->idElement;
0047456a      uint32_t m_eHorizonalScrollbarID = this->m_eHorizonalScrollbarID;
00474570      bool cond:1 = idElement == m_eHorizonalScrollbarID;
00474570      
00474573      if (idElement == m_eHorizonalScrollbarID)
00474573          goto label_47457f;
00474573      
0047457b      if (idElement == this->m_eVerticalScrollbarID)
0047457b      {
0047457d          cond:1 = idElement == m_eHorizonalScrollbarID;
0047457f      label_47457f:
0047457f          idElement = cond:1;
00474582          arg2 = idElement;
00474586          uint8_t edi_1 = arg2;
0047458d          class UIElement_Scrollbar* eax = UIElement_Scrollable::GetScrollbarPointer_(this, edi_1);
0047458d          
00474595          if (eax == ebx->pElement)
00474595          {
0047459f              UIElement_Scrollable::HandleScrollbarMessage_(this, edi_1, ebx->idMessage, eax);
004745ac              return 2;
00474595          }
0047457b      }
0047457b      
004745b4      uint32_t dwParam1 = ebx->dwParam1;
004745b4      
004745c1      if ((ebx->idMessage == 0x1c && (dwParam1 == 5 || dwParam1 == 6)))
004745c1      {
004745c3          uint32_t m_eVerticalScrollbarID = this->m_eVerticalScrollbarID;
004745c3          
004745cb          if (m_eVerticalScrollbarID != 0)
004745cb          {
004745d0              class UIElement* eax_2 = UIElement::FindRelative(this, m_eVerticalScrollbarID);
004745d0              
004745d7              if (eax_2 != 0)
004745d7              {
004745df                  class UIElement* eax_3 = eax_2->vtable->DynamicCast(0xb);
004745df                  
004745e9                  if ((eax_3 != 0 && (UIElement::FindRelative(eax_3, this->m_desc.m_elementID) == this && (((int8_t)(eax_3->__bitfield164 >> 4)) & 1) == 0)))
004745e9                  {
0047460d                      UIElement_Scrollbar::HandleMouseWheel(eax_3, dwParam1);
0047461b                      return 2;
004745e9                  }
004745d7              }
004745cb          }
004745c1      }
004745c1      
0047462a      return UIElement::ListenToElementMessage(this, ebx);
00474560  }

0047462d                                         90 90 90                                                               ...

00474630  void __thiscall UIElement_Scrollable::OnSetAttribute(class UIElement_Scrollable* this, class BaseProperty const* arg2)

00474630  {
00474631      class BaseProperty* esi = arg2;
00474639      UIElement::OnSetAttribute(this, esi);
00474640      uint32_t eax = BaseProperty::GetPropertyName(esi);
00474640      
00474648      if (eax == 0x71)
00474648      {
0047467f          class BasePropertyValue* m_pcPropertyValue_1 = esi->m_pcPropertyValue;
0047467f          
00474684          if (m_pcPropertyValue_1 != 0)
00474686              m_pcPropertyValue_1->vtable->InqEnum(&arg2);
00474686          
00474693          uint32_t eax_6 = arg2;
00474693          
0047469b          if (eax_6 != 0)
004746a1              UIElement_Scrollable::UpdateScrollbarSize_(this, 1);
004746a1          
004746a6          this->m_eHorizonalScrollbarID = eax_6;
00474648      }
00474648      else if (eax == 0x72)
0047464b      {
0047464d          class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
0047464d          
00474652          if (m_pcPropertyValue != 0)
00474654              m_pcPropertyValue->vtable->InqEnum(&arg2);
00474654          
00474661          uint32_t eax_4 = arg2;
00474661          
00474669          if (eax_4 != 0)
0047466f              UIElement_Scrollable::UpdateScrollbarSize_(this, 0);
0047466f          
00474674          this->m_eVerticalScrollbarID = eax_4;
0047464b      }
00474630  }

004746b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004746c0  void __thiscall UIElement_Scrollable::ResizeTo(class UIElement_Scrollable* this, int32_t const arg2, int32_t const arg3)

004746c0  {
004746c5      int32_t eax = UIRegion::GetWidth(this);
004746ce      int32_t eax_1 = UIRegion::GetHeight(this);
004746e1      UIElement::ResizeTo(this, arg2, arg3);
004746e8      int32_t eax_3 = UIRegion::GetWidth(this);
004746ef      int32_t eax_4;
004746ef      
004746ef      if (eax == eax_3)
004746f3          eax_4 = UIRegion::GetHeight(this);
004746f3      
004746fa      if ((eax != eax_3 || eax_1 != eax_4))
004746fa      {
00474700          UIElement_Scrollable::UpdateScrollbarSize_(this, 1);
00474709          UIElement_Scrollable::UpdateScrollbarSize_(this, 0);
00474720          UIElement_Scrollable::SetScrollableXY(this, this->m_iScrollableX, this->m_iScrollableY, 0);
004746fa      }
004746c0  }

0047472b                                   90 90 90 90 90                                                             .....

00474730  void __thiscall UIElement_Scrollable::ResizeScrollableArea(class UIElement_Scrollable* this, int32_t arg2, int32_t arg3)

00474730  {
0047473c      int32_t m_iScrollableWidth = this->m_iScrollableWidth;
0047473c      
0047474c      if ((m_iScrollableWidth != arg2 || this->m_iScrollableHeight != arg3))
0047474c      {
0047474f          int32_t m_iScrollableHeight = this->m_iScrollableHeight;
00474755          this->m_iScrollableHeight = arg3;
0047475f          this->m_iScrollableWidth = arg2;
00474765          UIElement_Scrollable::UpdateScrollbarSize_(this, 1);
0047476e          UIElement_Scrollable::UpdateScrollbarSize_(this, 0);
00474779          UIElement::BroadcastElementMessage(this, 0x32, m_iScrollableWidth, m_iScrollableHeight);
0047474c      }
00474730  }

00474784              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00474790  void* __thiscall UIElement_Scrollable::`scalar deleting destructor'(class UIElement_Scrollable* this, uint32_t arg2)

00474790  {
00474795      this->vtable = 0x79d4c0;
0047479b      this->m_eHorizonalScrollbarID = 0;
004747a1      this->m_eVerticalScrollbarID = 0;
004747a7      UIElement::~UIElement(this);
004747a7      
004747b1      if ((arg2 & 1) != 0)
004747b4          operator delete(this);
004747b4      
004747bf      return this;
00474790  }

004747c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004747d0  uint8_t __fastcall Glyph::IsWhiteSpace(class Glyph const* this)

004747d0  {
004747d0      uint16_t m_data = this->m_data;
004747d0      
004747e3      if ((m_data != 9 && (m_data != 0xd && m_data != 0x20)))
004747e7          return 0;
004747e7      
004747ed      return 1;
004747d0  }

004747ee                                            90 90                                                                ..

004747f0  uint8_t __fastcall Glyph::IsNewLine(class Glyph const* this)

004747f0  {
004747f9      return this->m_data == 0xa;
004747f0  }

004747fa                                                                                90 90 90 90 90 90                            ......

00474800  void __fastcall Glyph::Glyph(class Glyph* this)

00474800  {
00474804      this->m_data = 0;
00474807      this->m_width = 0;
0047480a      this->m_height = 0;
0047480d      this->m_font = nullptr;
00474810      this->m_tag = nullptr;
00474800  }

00474814                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00474820  void __fastcall Glyph::~Glyph(class Glyph* this)

00474820  {
00474824      class TextTag* m_tag = this->m_tag;
00474824      
00474829      if (m_tag != 0)
00474829      {
0047483b          if ((InterlockedDecrement(&m_tag->m_cRef) == 0 && m_tag != 0))
0047483d              m_tag->vtable->__vecDelDtor(1);
0047483d          
00474845          this->m_tag = nullptr;
00474829      }
00474829      
0047484c      class Font* m_font = this->m_font;
0047484c      
00474851      if (m_font != 0)
00474851      {
00474853          m_font->vtable->Release();
00474858          this->m_font = nullptr;
00474851      }
00474820  }

00474862        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00474870  class Glyph& __thiscall Glyph::operator=(class Glyph* this, class Glyph const& arg2)

00474870  {
0047487a      if (this != arg2)
0047487a      {
00474883          this->m_data = arg2->m_data;
00474889          this->m_width = arg2->m_width;
0047488f          this->m_height = arg2->m_height;
00474897          this->m_color.r = arg2->m_color.r;
00474897          this->m_color.g = arg2->m_color.g;
00474897          this->m_color.b = arg2->m_color.b;
00474897          this->m_color.a = arg2->m_color.a;
004748ae          class Font* m_font_1 = this->m_font;
004748ae          
004748b3          if (m_font_1 != 0)
004748b3          {
004748b5              m_font_1->vtable->Release();
004748ba              this->m_font = nullptr;
004748b3          }
004748b3          
004748c2          class TextTag* m_tag_1 = this->m_tag;
004748c2          
004748c7          if (m_tag_1 != 0)
004748c7          {
004748d9              if ((InterlockedDecrement(&m_tag_1->m_cRef) == 0 && m_tag_1 != 0))
004748db                  m_tag_1->vtable->__vecDelDtor(1);
004748db              
004748e3              this->m_tag = nullptr;
004748c7          }
004748c7          
004748ea          class Font* m_font = arg2->m_font;
004748ed          this->m_font = m_font;
004748f3          this->m_tag = arg2->m_tag;
004748f3          
004748fb          if (m_font != 0)
004748fd              m_font->vtable->AddRef();
004748fd          
00474902          class TextTag* m_tag = this->m_tag;
00474902          
00474907          if (m_tag != 0)
0047490d              InterlockedIncrement(&m_tag->m_cRef);
0047487a      }
0047487a      
00474917      return this;
00474870  }

0047491a                                                                                90 90 90 90 90 90                            ......

00474920  void __thiscall Glyph::SetTag(class Glyph* this, class TextTag* arg2)

00474920  {
00474924      class TextTag* m_tag = this->m_tag;
00474924      
00474929      if (m_tag == 0)
00474929      {
0047495c          this->m_tag = arg2;
00474961          return;
00474929      }
00474929      
0047493b      if ((InterlockedDecrement(&m_tag->m_cRef) == 0 && m_tag != 0))
0047493d          m_tag->vtable->__vecDelDtor(1);
0047493d      
00474949      this->m_tag = nullptr;
00474950      this->m_tag = arg2;
00474920  }

00474964              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00474970  void __thiscall Glyph::Glyph(class Glyph* this, class Glyph const* arg2)

00474970  {
00474975      this->m_data = 0;
00474978      this->m_width = 0;
0047497b      this->m_height = 0;
0047497e      this->m_font = nullptr;
00474981      this->m_tag = nullptr;
00474989      Glyph::operator=(this, arg2);
00474970  }

00474994                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004749a0  void __thiscall Glyph::SetFont(class Glyph* this, class Font* arg2)

004749a0  {
004749a8      class Font* m_font = this->m_font;
004749ab      int32_t ebx;
004749ab      ebx = this->m_data == 0xa;
004749ab      
004749b1      if (m_font != 0)
004749b1      {
004749b3          m_font->vtable->Release();
004749b8          this->m_font = nullptr;
004749b1      }
004749b1      
004749c5      if (arg2 != 0)
004749c5      {
004749d3          int32_t eax_2;
004749d3          int32_t edx_1;
004749d3          eax_2 = Font::ContainsChar(arg2, this->m_data);
004749d3          
004749de          if ((eax_2 != 0 || ebx != 0))
004749de          {
00474a54              this->m_font = arg2;
00474a57              arg2->vtable->AddRef();
004749de          }
004749de          else
004749de          {
004749e0              int32_t var_10_2 = 0x2e;
004749e2              int32_t var_14_1 = 9;
004749e4              int32_t var_18_1 = 0x14;
004749e6              class DBObj* eax_3;
004749e6              uint32_t ecx_2;
004749e6              int32_t edx_2;
004749e6              eax_3 = DBObj::GetByEnum(eax_2, edx_1, arg2);
004749eb              class DBObj* ebx_1 = eax_3;
004749eb              
004749f2              if (ebx_1 != 0)
004749f2              {
004749f9                  ecx_2 = ebx_1;
004749fc                  eax_3 = Font::ContainsChar(ecx_2, this->m_data);
004749fc                  
00474a03                  if (eax_3 != 0)
00474a05                      this->m_font = ebx_1;
004749f2              }
004749f2              
00474a08              int32_t var_10_4 = 0x2e;
00474a0a              int32_t var_14_2 = 9;
00474a0c              int32_t var_18_2 = 0x16;
00474a13              class Font* edi_1 = DBObj::GetByEnum(eax_3, edx_2, ecx_2);
00474a13              
00474a1a              if ((edi_1 != 0 && Font::ContainsChar(edi_1, this->m_data) != 0))
00474a2d                  this->m_font = edi_1;
00474a2d              
00474a30              class Font* m_font_1 = this->m_font;
00474a30              
00474a35              if (m_font_1 != 0)
00474a37                  m_font_1->vtable->AddRef();
00474a37              
00474a3e              if (edi_1 != 0)
00474a40                  edi_1->vtable->Release();
00474a40              
00474a49              if (ebx_1 != 0)
00474a4b                  ebx_1->vtable->Release();
004749de          }
004749c5      }
004749c5      
00474a5e      class Font* m_font_2 = this->m_font;
00474a5e      
00474a63      if (m_font_2 != 0)
00474a63      {
00474a6b          uint8_t eax_9 = Font::GetCharWidthA(m_font_2, this->m_data);
00474a70          class Font* m_font_3 = this->m_font;
00474a76          this->m_width = ((uint32_t)eax_9);
00474a7c          this->m_height = m_font_3->maxCharHeight;
00474a63      }
004749a0  }

00474a85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00474a90  void __thiscall Glyph::Glyph(class Glyph* this, uint16_t const arg2, class RGBAColor const* arg3, class Font* arg4, class TextTag* arg5)

00474a90  {
00474a9a      uint16_t* this_1 = this;
00474a9c      *(uint16_t*)this_1 = arg2;
00474a9f      *(uint32_t*)((char*)this_1 + 4) = 0;
00474aa6      *(uint32_t*)((char*)this_1 + 8) = 0;
00474ab2      *(uint32_t*)((char*)this_1 + 0xc) = arg3->r;
00474ab7      *(uint32_t*)((char*)this_1 + 0x10) = arg3->g;
00474abd      *(uint32_t*)((char*)this_1 + 0x14) = arg3->b;
00474ac7      *(uint32_t*)((char*)this_1 + 0x18) = arg3->a;
00474ad1      *(uint32_t*)((char*)this_1 + 0x1c) = 0;
00474ad8      *(uint32_t*)((char*)this_1 + 0x20) = arg5;
00474adb      Glyph::SetFont(this_1, arg4);
00474ae0      int32_t eax_5 = *(uint32_t*)((char*)this_1 + 0x20);
00474ae0      
00474ae5      if (eax_5 != 0)
00474aeb          InterlockedIncrement((eax_5 + 4));
00474a90  }

00474af7                                                                       90 90 90 90 90 90 90 90 90                         .........

00474b00  void __thiscall Glyph::Glyph(class Glyph* this, uint16_t const arg2, class RGBAColor const* arg3, class Font* arg4, class TextTag* arg5, uint32_t const arg6, uint32_t const arg7)

00474b00  {
00474b0a      uint16_t* this_1 = this;
00474b10      *(uint16_t*)this_1 = arg2;
00474b13      *(uint32_t*)((char*)this_1 + 4) = arg6;
00474b1a      *(uint32_t*)((char*)this_1 + 8) = arg7;
00474b22      *(uint32_t*)((char*)this_1 + 0xc) = arg3->r;
00474b27      *(uint32_t*)((char*)this_1 + 0x10) = arg3->g;
00474b2d      *(uint32_t*)((char*)this_1 + 0x14) = arg3->b;
00474b37      *(uint32_t*)((char*)this_1 + 0x18) = arg3->a;
00474b41      *(uint32_t*)((char*)this_1 + 0x1c) = 0;
00474b48      *(uint32_t*)((char*)this_1 + 0x20) = arg5;
00474b4b      Glyph::SetFont(this_1, arg4);
00474b50      int32_t eax_3 = *(uint32_t*)((char*)this_1 + 0x20);
00474b50      
00474b55      if (eax_3 != 0)
00474b5b          InterlockedIncrement((eax_3 + 4));
00474b00  }

00474b67                       90 90 90 90 90 90 90 90 90                                                         .........

00474b70  uint8_t __fastcall ContextMenu::Close(class ContextMenu* this)

00474b70  {
00474b7b      if (this->m_open == 0)
00474b80          return 1;
00474b80      
00474b89      int32_t i = 0;
00474b8d      int32_t ebx;
00474b8d      ebx = 1;
00474b8d      
00474b8f      if (this->m_data.m_num > 0)
00474b8f      {
00474b92          int32_t edi_1 = 0;
00474b92          
00474bdb          do
00474bdb          {
00474ba6              class ContextMenu* ecx = *(uint32_t*)(&this->m_data.m_data->m_subMenu + edi_1);
00474ba6              
00474baf              if (ecx != 0)
00474baf              {
00474bb1                  class ContextMenuData* eax_2;
00474bb1                  eax_2 = ecx->m_open;
00474bb1                  
00474bb9                  if (eax_2 != 0)
00474bb9                  {
00474bbb                      this->m_pOpenSubMenu = nullptr;
00474bc5                      ContextMenu::Close(ecx);
00474bca                      ebx = 0;
00474bb9                  }
00474baf              }
00474baf              
00474bd2              i += 1;
00474bd3              edi_1 += 0xac;
00474bdb          } while (i < this->m_data.m_num);
00474b8f      }
00474b8f      
00474bde      class UIElement* m_display = this->m_display;
00474bde      
00474be6      if (m_display == 0)
00474be6      {
00474beb          this->m_open = 0;
00474bf1          uint32_t eax_1;
00474bf1          eax_1 = 0;
00474bf5          return 0;
00474be6      }
00474be6      
00474bf6      m_display->vtable->SetVisible(0);
00474bf6      
00474c05      if (this->m_bTopLevel != 0)
00474c07          this->m_pRoot->vtable->SetVisible(0);
00474c07      
00474c18      this->m_open = 0;
00474c20      return ebx;
00474b70  }

00474b96                                                                    8d a4 24 00 00 00 00 8d 49 00                        ..$.....I.
00474c21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00474c30  void __thiscall ContextMenu::SetVisible(class ContextMenu* this, uint8_t arg2)

00474c30  {
00474c31      int32_t ebx = arg2;
00474c31      
00474c44      if ((this->m_open != 0 && ebx == 0))
00474c46          ContextMenu::Close(this);
00474c46      
00474c4b      class UIElement* m_pRoot = this->m_pRoot;
00474c4b      
00474c53      if (m_pRoot != 0)
00474c55          m_pRoot->vtable->SetVisible(ebx);
00474c30  }


00474c60  void __thiscall Dialog::SetContext(class Dialog* this, uint32_t arg2)

00474c60  {
00474c64      this->m_nContext = arg2;
00474c60  }

00474c6d                                         90 90 90                                                               ...

00474c70  class UIElement* __thiscall WaitDialog::DynamicCast(class WaitDialog* this, uint32_t arg2) __pure

00474c70  {
00474c79      if (arg2 == 0x19)
00474c86          return this;
00474c86      
00474c80      int32_t edx_1;
00474c80      edx_1 = arg2 != 3;
00474c84      return (this & (edx_1 - 1));
00474c70  }

00474c89                             90 90 90 90 90 90 90                                                           .......

00474c90  class UIElement* WaitDialog::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00474c90  {
00474c96      void* result = operator new(0x698);
00474c96      
00474ca2      if (result == 0)
00474ccc          return 0;
00474ccc      
00474cb0      Dialog::Dialog(result, arg1, arg2);
00474cb5      *(uint32_t*)result = &WaitDialog::`vftable';
00474cbb      *(uint32_t*)((char*)result + 0x690) = 0;
00474cc8      return result;
00474c90  }

00474ccd                                         90 90 90                                                               ...

00474cd0  void __thiscall WaitDialog::ListenToGlobalMessage(class WaitDialog* this, uint32_t arg2, int32_t arg3)

00474cd0  {
00474cd5      if (arg2 == 1)
00474cd5      {
00474cd7          uint32_t m_eKey = this->m_eKey;
00474cd7          
00474ce5          if ((m_eKey != 0 && arg3 == m_eKey))
00474cee              DialogFactory::CloseDialog(this->m_nContext);
00474cd5      }
00474cd0  }

00474cf7                                                                       90 90 90 90 90 90 90 90 90                         .........

00474d00  enum UIElementMessageListenResult __thiscall WaitDialog::ListenToElementMessage(class WaitDialog* this, struct UIElementMessageInfo const* arg2)

00474d00  {
00474d00      /* tailcall */
00474d00      return Dialog::ListenToElementMessage(this, arg2);
00474d00  }

00474d05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00474d10  void __fastcall WaitDialog::CancelDialog(class WaitDialog* this)

00474d10  {
00474d17      DialogFactory::CloseDialog(this->m_nContext);
00474d10  }

00474d1e                                                                                            90 90                                ..

00474d20  void* __thiscall WaitDialog::`scalar deleting destructor'(class WaitDialog* this, uint32_t arg2)

00474d20  {
00474d23      this->vtable = &WaitDialog::`vftable';
00474d29      Dialog::~Dialog(this);
00474d29      
00474d33      if ((arg2 & 1) != 0)
00474d36          operator delete(this);
00474d36      
00474d41      return this;
00474d20  }

00474d44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00474d50  void WaitDialog::Register()

00474d50  {
00474d57      UIElement::RegisterElementClass(0x19, WaitDialog::Create);
00474d50  }


00474d60  void __thiscall WaitDialog::SetData(class WaitDialog* this, class PropertyCollection const* arg2)

00474d60  {
00474d71      Dialog::SetData(this, arg2);
00474d7d      uint32_t temp1 = (COMBINE(0, 0x9e) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets);
00474d83      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets;
00474d89      int32_t* var_98 = nullptr;
00474d91      int32_t* var_94 = nullptr;
00474d9c      int32_t* eax_3 = m_buckets[temp1];
00474d9c      
00474da0      if (eax_3 != 0)
00474da0      {
00474dac          while (*(uint32_t*)eax_3 != 0x9e)
00474dac          {
00474dae              eax_3 = eax_3[1];
00474dae              
00474db3              if (eax_3 == 0)
00474dbc                  return;
00474dac          }
00474dac          
00474dc1          if (eax_3 != 0)
00474dc1          {
00474dcf              BaseProperty::operator=(&var_98, &eax_3[2]);
00474dd8              void var_90;
00474dd8              StringInfo::StringInfo(&var_90);
00474dd8              
00474de3              if (var_94 != 0)
00474dee                  *(uint32_t*)(*(uint32_t*)var_94 + 0xa8)(&this->m_eKey);
00474dee              
00474df8              UIListener::RegisterForGlobalMessage(this, 1);
00474e01              StringInfo::~StringInfo(&var_90);
00474e06              int32_t* eax_6 = var_98;
00474e06              
00474e0c              if (eax_6 != 0)
00474e0c              {
00474e16                  int32_t esi_2 = (eax_6[1] - 1);
00474e13                  eax_6[1] = esi_2;
00474e13                  
00474e1d                  if (esi_2 == 0)
00474e23                      **(uint32_t**)eax_6(1);
00474e23                  
00474e25                  var_98 = nullptr;
00474e0c              }
00474e0c              
00474e33              if (var_94 != 0)
00474e33              {
00474e3d                  int32_t esi_4 = (var_94[1] - 1);
00474e3a                  var_94[1] = esi_4;
00474e3a                  
00474e44                  if (esi_4 == 0)
00474e4a                      **(uint32_t**)var_94(1);
00474e33              }
00474dc1          }
00474da0      }
00474d60  }

00474e56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00474e60  class UIElement* __thiscall TextInputDialog::DynamicCast(class TextInputDialog* this, uint32_t arg2) __pure

00474e60  {
00474e69      if (arg2 == 0x18)
00474e76          return this;
00474e76      
00474e70      int32_t edx_1;
00474e70      edx_1 = arg2 != 3;
00474e74      return (this & (edx_1 - 1));
00474e60  }

00474e79                                                                             90 90 90 90 90 90 90                           .......

00474e80  class UIElement* TextInputDialog::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00474e80  {
00474e86      void* result = operator new(0x690);
00474e86      
00474e92      if (result == 0)
00474eb2          return 0;
00474eb2      
00474ea0      Dialog::Dialog(result, arg1, arg2);
00474ea5      *(uint32_t*)result = 0x79d768;
00474eae      return result;
00474e80  }

00474eb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00474ec0  void* __thiscall TextInputDialog::`scalar deleting destructor'(class TextInputDialog* this, uint32_t arg2)

00474ec0  {
00474ec3      this->vtable = 0x79d768;
00474ec9      Dialog::~Dialog(this);
00474ec9      
00474ed3      if ((arg2 & 1) != 0)
00474ed6          operator delete(this);
00474ed6      
00474ee1      return this;
00474ec0  }

00474ee4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00474ef0  void TextInputDialog::Register()

00474ef0  {
00474ef7      UIElement::RegisterElementClass(0x18, TextInputDialog::Create);
00474ef0  }


00474f00  void __thiscall TextInputDialog::SetData(class TextInputDialog* this, class PropertyCollection const* arg2)

00474f00  {
00474f11      Dialog::SetData(this, arg2);
00474f1d      uint32_t temp1 = (COMBINE(0, 0x97) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets);
00474f23      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets;
00474f29      int32_t* var_98 = nullptr;
00474f31      int32_t* var_94 = nullptr;
00474f3c      int32_t* eax_3 = m_buckets[temp1];
00474f3c      
00474f40      if (eax_3 != 0)
00474f40      {
00474f4c          while (*(uint32_t*)eax_3 != 0x97)
00474f4c          {
00474f4e              eax_3 = eax_3[1];
00474f4e              
00474f53              if (eax_3 == 0)
00474f5c                  return;
00474f4c          }
00474f4c          
00474f61          if (eax_3 != 0)
00474f61          {
00474f6f              BaseProperty::operator=(&var_98, &eax_3[2]);
00474f78              void var_90;
00474f78              StringInfo::StringInfo(&var_90);
00474f78              
00474f83              if (var_94 != 0)
00474f8c                  *(uint32_t*)(*(uint32_t*)var_94 + 0xc0)(&var_90);
00474f8c              
00474f96              class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x2a);
00474f96              
00474f9d              if (eax_5 != 0)
00474f9d              {
00474fa5                  class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
00474fa5                  
00474fad                  if (eax_6 != 0)
00474fb6                      UIElement_Text::SetStringInfo(eax_6, &var_90);
00474f9d              }
00474f9d              
00474fbf              StringInfo::~StringInfo(&var_90);
00474fc4              int32_t* eax_7 = var_98;
00474fc4              
00474fca              if (eax_7 != 0)
00474fca              {
00474fd4                  int32_t esi_2 = (eax_7[1] - 1);
00474fd1                  eax_7[1] = esi_2;
00474fd1                  
00474fdb                  if (esi_2 == 0)
00474fe1                      **(uint32_t**)eax_7(1);
00474fe1                  
00474fe3                  var_98 = nullptr;
00474fca              }
00474fca              
00474ff1              if (var_94 != 0)
00474ff1              {
00474ffb                  int32_t esi_4 = (var_94[1] - 1);
00474ff8                  var_94[1] = esi_4;
00474ff8                  
00475002                  if (esi_4 == 0)
00475008                      **(uint32_t**)var_94(1);
00474ff1              }
00474f61          }
00474f40      }
00474f00  }

00475014                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00475020  uint8_t __thiscall PropertyCollection::AddProperty(class PropertyCollection* this, class BaseProperty const* arg2)

00475020  {
00475022      class BaseProperty* edi = arg2;
0047502f      arg2 = BaseProperty::GetPropertyName(edi);
00475043      return HashTable<unsigned long,BaseProperty,1>::add(&this->m_hashProperties, &arg2, edi);
00475020  }

00475046                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00475050  enum UIElementMessageListenResult __thiscall TextInputDialog::ListenToElementMessage(class TextInputDialog* this, struct UIElementMessageInfo const* arg2)

00475050  {
00475050      struct UIElementMessageInfo* eax_10 = arg2;
00475057      uint32_t ebx;
00475057      uint32_t var_14 = ebx;
00475067      uint32_t var_18;
00475067      
00475067      if ((eax_10->idElement != 0x2a || eax_10->idMessage != 1))
00475067      {
00475178          var_18 = eax_10;
00475184          return Dialog::ListenToElementMessage(this, var_18);
00475067      }
00475067      
0047506d      var_18 = 0x2b;
00475071      class UIElement* eax = UIElement::GetChildRecursive(this, var_18);
00475071      int32_t* esp_1 = &var_14;
00475071      
00475078      if (eax != 0)
00475078      {
0047507e          struct UIElement::VTable* vtable = eax->vtable;
00475080          uint32_t esi;
00475080          var_18 = esi;
00475085          class UIElement_Text* eax_1 = vtable->DynamicCast(0xc);
00475085          uint32_t* esp_2 = &var_18;
00475085          
0047508f          if (eax_1 != 0)
0047508f          {
00475095              uint32_t var_1c_2 = 0x98;
0047509e              int32_t var_8 = 0;
004750a6              int32_t* var_4_1 = nullptr;
004750ae              BaseProperty::SetPropertyName(&var_8, var_1c_2);
004750ba              void __return_1;
004750ba              class PStringBase<unsigned short>* eax_2 = UIElement_Text::GetText(eax_1, &__return_1);
004750bf              uint16_t var_1c_4 = 0;
004750c5              struct UIElementMessageInfo const** __return = &arg2;
004750c8              PStringBase<unsigned short>::to_spstring(eax_2, __return, var_1c_4);
004750c8              
004750d3              if (var_4_1 != 0)
004750d3              {
004750d9                  BaseProperty::CheckCopyOnWrite(&var_8);
004750e9                  *(uint32_t*)(*(uint32_t*)var_4_1 + 0xa4)(&arg2);
004750d3              }
004750d3              
004750f3              int32_t edi;
004750f3              int32_t var_1c_6 = edi;
004750fa              void* __offset(UIElementMessageInfo, -0x14) esi_3 = ((char*)arg2 - 0x14);
00475100              __return = ((char*)esi_3 + 4);
00475100              
00475109              if ((InterlockedDecrement(__return) == 0 && esi_3 != 0))
00475109              {
0047510d                  int32_t var_24_1 = 1;
00475111                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00475109              }
00475109              
00475117              int32_t* esi_5 = (var_14 - 0x14);
00475117              
00475127              if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00475127              {
0047512b                  int32_t var_24_3 = 1;
0047512f                  **(uint32_t**)esi_5(1);
00475127              }
00475127              
0047513a              var_14 = BaseProperty::GetPropertyName(&__return_1);
0047514e              HashTable<unsigned long,BaseProperty,1>::add(&this->m_cData.m_hashProperties, &var_14, &__return_1);
0047514e              esp_2 = &__return;
00475157              BaseProperty::~BaseProperty(&__return_1);
0047508f          }
0047508f          
0047515c          *(uint32_t*)esp_2;
0047515c          esp_1 = &esp_2[1];
00475078      }
00475078      
00475163      *(uint32_t*)((char*)esp_1 - 4) = this->m_nContext;
00475164      DialogFactory::CloseDialog();
00475171      *(uint32_t*)esp_1;
00475175      return 2;
00475050  }

00475187                       90 90 90 90 90 90 90 90 90                                                         .........

00475190  void __fastcall TextInputDialog::CancelDialog(class TextInputDialog* this)

00475190  {
0047519f      int32_t* var_8 = nullptr;
004751a7      int32_t* var_4 = nullptr;
004751af      BaseProperty::SetPropertyName(&var_8, 0x98);
004751af      
004751ba      if (var_4 != 0)
004751ba      {
004751c0          BaseProperty::CheckCopyOnWrite(&var_8);
004751d0          *(uint32_t*)(*(uint32_t*)var_4 + 0xa4)(0x8173b4);
004751ba      }
004751ba      
004751ef      uint32_t var_c = BaseProperty::GetPropertyName(&var_8);
004751f3      HashTable<unsigned long,BaseProperty,1>::add(&this->m_cData.m_hashProperties.vtable, &var_c, &var_8);
004751ff      DialogFactory::CloseDialog(this->m_nContext);
00475204      int32_t* eax_4 = var_8;
00475204      
0047520d      if (eax_4 != 0)
0047520d      {
00475217          int32_t esi_2 = (eax_4[1] - 1);
00475214          eax_4[1] = esi_2;
00475214          
0047521e          if (esi_2 == 0)
00475224              **(uint32_t**)eax_4(1);
00475224          
00475226          var_8 = nullptr;
0047520d      }
0047520d      
00475234      if (var_4 != 0)
00475234      {
0047523e          int32_t esi_4 = (var_4[1] - 1);
0047523b          var_4[1] = esi_4;
0047523b          
00475245          if (esi_4 == 0)
0047524b              **(uint32_t**)var_4(1);
00475234      }
00475190  }

00475252                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00475260  class UIElement* __thiscall MessageDialog::DynamicCast(class MessageDialog* this, uint32_t arg2) __pure

00475260  {
00475269      if (arg2 == 0x17)
00475276          return this;
00475276      
00475270      int32_t edx_1;
00475270      edx_1 = arg2 != 3;
00475274      return (this & (edx_1 - 1));
00475260  }

00475279                                                                             90 90 90 90 90 90 90                           .......

00475280  class UIElement* MessageDialog::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00475280  {
00475286      void* result = operator new(0x690);
00475286      
00475292      if (result == 0)
004752b2          return 0;
004752b2      
004752a0      Dialog::Dialog(result, arg1, arg2);
004752a5      *(uint32_t*)result = 0x79d8b0;
004752ae      return result;
00475280  }

004752b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004752c0  enum UIElementMessageListenResult __thiscall MessageDialog::ListenToElementMessage(class MessageDialog* this, struct UIElementMessageInfo const* arg2)

004752c0  {
004752cd      if ((arg2->idMessage != 1 || arg2->idElement != 0x26))
004752ea          /* tailcall */
004752ea          return Dialog::ListenToElementMessage(this, arg2);
004752ea      
004752d6      DialogFactory::CloseDialog(this->m_nContext);
004752e3      return 2;
004752c0  }

004752ef                                               90                                                                 .

004752f0  void* __thiscall MessageDialog::`scalar deleting destructor'(class MessageDialog* this, uint32_t arg2)

004752f0  {
004752f3      this->vtable = 0x79d8b0;
004752f9      Dialog::~Dialog(this);
004752f9      
00475303      if ((arg2 & 1) != 0)
00475306          operator delete(this);
00475306      
00475311      return this;
004752f0  }

00475314                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00475320  void MessageDialog::Register()

00475320  {
00475327      UIElement::RegisterElementClass(0x17, MessageDialog::Create);
00475320  }


00475330  void __thiscall MessageDialog::SetData(class MessageDialog* this, class PropertyCollection const* arg2)

00475330  {
00475341      Dialog::SetData(this, arg2);
0047534d      uint32_t temp1 = (COMBINE(0, 0x95) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets);
00475353      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets;
00475359      int32_t* var_98 = nullptr;
00475361      int32_t* var_94 = nullptr;
0047536c      int32_t* eax_3 = m_buckets[temp1];
0047536c      
00475370      if (eax_3 != 0)
00475370      {
0047537c          while (*(uint32_t*)eax_3 != 0x95)
0047537c          {
0047537e              eax_3 = eax_3[1];
0047537e              
00475383              if (eax_3 == 0)
0047538c                  return;
0047537c          }
0047537c          
00475391          if (eax_3 != 0)
00475391          {
0047539f              BaseProperty::operator=(&var_98, &eax_3[2]);
004753a8              void var_90;
004753a8              StringInfo::StringInfo(&var_90);
004753a8              
004753b3              if (var_94 != 0)
004753bc                  *(uint32_t*)(*(uint32_t*)var_94 + 0xc0)(&var_90);
004753bc              
004753c6              class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x26);
004753c6              
004753cd              if (eax_5 != 0)
004753cd              {
004753d5                  class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
004753d5                  
004753dd                  if (eax_6 != 0)
004753e6                      UIElement_Text::SetStringInfo(eax_6, &var_90);
004753cd              }
004753cd              
004753ef              StringInfo::~StringInfo(&var_90);
004753f4              int32_t* eax_7 = var_98;
004753f4              
004753fa              if (eax_7 != 0)
004753fa              {
00475404                  int32_t esi_2 = (eax_7[1] - 1);
00475401                  eax_7[1] = esi_2;
00475401                  
0047540b                  if (esi_2 == 0)
00475411                      **(uint32_t**)eax_7(1);
00475411                  
00475413                  var_98 = nullptr;
004753fa              }
004753fa              
00475421              if (var_94 != 0)
00475421              {
0047542b                  int32_t esi_4 = (var_94[1] - 1);
00475428                  var_94[1] = esi_4;
00475428                  
00475432                  if (esi_4 == 0)
00475438                      **(uint32_t**)var_94(1);
00475421              }
00475391          }
00475370      }
00475330  }

00475444              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00475450  class UIElement* __thiscall MenuDialog::DynamicCast(class MenuDialog* this, uint32_t arg2) __pure

00475450  {
00475459      if (arg2 == 0x16)
00475466          return this;
00475466      
00475460      int32_t edx_1;
00475460      edx_1 = arg2 != 3;
00475464      return (this & (edx_1 - 1));
00475450  }

00475469                             90 90 90 90 90 90 90                                                           .......

00475470  class UIElement* MenuDialog::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00475470  {
00475476      void* result = operator new(0x698);
00475476      
00475482      if (result == 0)
004754ac          return 0;
004754ac      
00475490      Dialog::Dialog(result, arg1, arg2);
00475495      *(uint32_t*)result = 0x79d9f8;
0047549b      *(uint32_t*)((char*)result + 0x690) = 0;
004754a8      return result;
00475470  }

004754ad                                         90 90 90                                                               ...

004754b0  void* __thiscall MenuDialog::`scalar deleting destructor'(class MenuDialog* this, uint32_t arg2)

004754b0  {
004754b3      this->vtable = 0x79d9f8;
004754b9      Dialog::~Dialog(this);
004754b9      
004754c3      if ((arg2 & 1) != 0)
004754c6          operator delete(this);
004754c6      
004754d1      return this;
004754b0  }

004754d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004754e0  void MenuDialog::Register()

004754e0  {
004754e7      UIElement::RegisterElementClass(0x16, MenuDialog::Create);
004754e0  }


004754f0  void __thiscall MenuDialog::SetData(class MenuDialog* this, class PropertyCollection const* arg2)

004754f0  {
00475503      Dialog::SetData(this, arg2);
0047550e      int32_t* var_a4 = nullptr;
00475512      int32_t* var_a0 = nullptr;
00475516      class UIElement* eax_1;
00475516      int32_t ecx_1;
00475516      eax_1 = UIElement::GetChildRecursive(this, 0x1d);
0047551d      class UIElement_Menu* eax_2;
0047551d      
0047551d      if (eax_1 == 0)
0047552d          eax_2 = nullptr;
0047551d      else
00475525          eax_2 = eax_1->vtable->DynamicCast(6);
00475525      
00475531      this->m_pcMenu = eax_2;
00475537      int32_t var_9c;
00475537      void var_90;
00475537      
00475537      if (eax_2 != 0)
00475537      {
00475557          for (int32_t* i = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0xa0) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00475557          {
00475566              if (*(uint32_t*)i == 0xa0)
00475566              {
00475576                  if (i != 0)
00475576                  {
00475584                      BaseProperty::operator=(&var_a4, &i[2]);
00475584                      
0047558f                      if ((var_a0 != 0 && *(uint32_t*)(*(uint32_t*)var_a0 + 0xf0)(&var_9c) != 0))
0047558f                      {
004755ae                          int32_t esi_1 = 0;
004755b0                          bool cond:4_1 = var_9c <= 0;
004755b2                          int32_t* var_98 = nullptr;
004755b6                          int32_t* var_94_1 = nullptr;
004755b6                          
004755ba                          if (!(cond:4_1))
004755ba                          {
004755c0                              int32_t* ecx_6 = var_a0;
004755c0                              
0047562c                              do
0047562c                              {
004755c6                                  if (ecx_6 != 0)
004755c6                                  {
004755d8                                      if (*(uint32_t*)(*(uint32_t*)ecx_6 + 0xf4)(esi_1, &var_98) != 0)
004755d8                                      {
004755de                                          StringInfo::StringInfo(&var_90);
004755de                                          
004755e9                                          if ((var_94_1 != 0 && *(uint32_t*)(*(uint32_t*)var_94_1 + 0xc0)(&var_90) != 0))
004755e9                                          {
00475602                                              int32_t eax_11 = UIElement_Menu::GetNumItems(this->m_pcMenu);
00475613                                              UIElement_Menu::InsertTextItem(this->m_pcMenu, &var_90, eax_11);
004755e9                                          }
004755e9                                          
0047561c                                          StringInfo::~StringInfo(&var_90);
004755d8                                      }
004755d8                                      
00475621                                      ecx_6 = var_a0;
004755c6                                  }
004755c6                                  
00475629                                  esi_1 += 1;
0047562c                              } while (esi_1 < var_9c);
0047562c                              
0047562e                              int32_t* eax_13 = var_98;
0047562e                              
00475634                              if (eax_13 != 0)
00475634                              {
0047563e                                  int32_t esi_3 = (eax_13[1] - 1);
0047563b                                  eax_13[1] = esi_3;
0047563b                                  
00475645                                  if (esi_3 == 0)
0047564b                                      **(uint32_t**)eax_13(1);
0047564b                                  
0047564d                                  var_98 = nullptr;
00475634                              }
00475634                              
00475657                              if (var_94_1 != 0)
00475657                              {
00475661                                  int32_t esi_5 = (var_94_1[1] - 1);
0047565e                                  var_94_1[1] = esi_5;
0047565e                                  
00475668                                  if (esi_5 == 0)
0047566e                                      **(uint32_t**)var_94_1(1);
00475657                              }
004755ba                          }
0047558f                      }
0047558f                      
00475679                      class UIElement* eax_18 = UIElement_Menu::GetItem(this->m_pcMenu, 0);
00475685                      UIElement_Menu::SetSelectedItem(this->m_pcMenu, eax_18, 1);
00475576                  }
00475576                  
00475576                  break;
00475566              }
00475557          }
00475537      }
00475537      
004756a4      for (int32_t* i_1 = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0xa4) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
004756a4      {
004756ac          if (*(uint32_t*)i_1 == 0xa4)
004756ac          {
004756b9              if (i_1 != 0)
004756b9              {
004756c3                  BaseProperty::operator=(&var_a4, &i_1[2]);
004756ce                  var_9c = 0;
004756ce                  
004756d2                  if (var_a0 != 0)
004756db                      *(uint32_t*)(*(uint32_t*)var_a0 + 0x78)(&var_9c);
004756db                  
004756eb                  class UIElement* eax_22 = UIElement_Menu::GetItem(this->m_pcMenu, var_9c);
004756f7                  UIElement_Menu::SetSelectedItem(this->m_pcMenu, eax_22, 1);
004756b9              }
004756b9              
004756b9              break;
004756ac          }
004756a4      }
004756a4      
00475716      for (int32_t* i_2 = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0xa2) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_2 != 0; i_2 = i_2[1])
00475716      {
0047571e          if (*(uint32_t*)i_2 == 0xa2)
0047571e          {
0047572b              if (i_2 != 0)
0047572b              {
00475735                  BaseProperty::operator=(&var_a4, &i_2[2]);
0047573e                  StringInfo::StringInfo(&var_90);
0047573e                  
00475749                  if (var_a0 != 0)
00475752                      *(uint32_t*)(*(uint32_t*)var_a0 + 0xc0)(&var_90);
00475752                  
0047575c                  class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x1e);
0047575c                  
00475763                  if (eax_27 != 0)
00475763                  {
0047576b                      class UIElement_Text* eax_28 = eax_27->vtable->DynamicCast(0xc);
0047576b                      
00475773                      if (eax_28 != 0)
0047577c                          UIElement_Text::SetStringInfo(eax_28, &var_90);
00475763                  }
00475763                  
00475785                  StringInfo::~StringInfo(&var_90);
0047572b              }
0047572b              
0047572b              break;
0047571e          }
00475716      }
00475716      
0047578a      int32_t* eax_29 = var_a4;
0047578a      
00475790      if (eax_29 != 0)
00475790      {
0047579a          int32_t esi_7 = (eax_29[1] - 1);
00475797          eax_29[1] = esi_7;
00475797          
004757a1          if (esi_7 == 0)
004757a7              **(uint32_t**)eax_29(1);
004757a7          
004757a9          var_a4 = nullptr;
00475790      }
00475790      
004757b3      if (var_a0 != 0)
004757b3      {
004757bd          int32_t esi_9 = (var_a0[1] - 1);
004757ba          var_a0[1] = esi_9;
004757ba          
004757c4          if (esi_9 == 0)
004757ca              **(uint32_t**)var_a0(1);
004757b3      }
004754f0  }

004757d8                                                                          90 90 90 90 90 90 90 90                          ........

004757e0  enum UIElementMessageListenResult __thiscall MenuDialog::ListenToElementMessage(class MenuDialog* this, struct UIElementMessageInfo const* arg2)

004757e0  {
004757e0      struct UIElementMessageInfo* edx_3 = arg2;
004757e0      
004757f0      if (edx_3->idMessage != 1)
004757fe          return Dialog::ListenToElementMessage(this, edx_3);
004757fe      
00475804      if (edx_3->idElement != 0x1e)
004758d2          return 0;
004758d2      
00475814      int32_t* var_8 = nullptr;
0047581c      int32_t* var_4_1 = nullptr;
00475824      BaseProperty::SetPropertyName(&var_8, 0xa4);
0047582f      int32_t eax_2 = UIElement_Menu::GetSelectedIndex(this->m_pcMenu);
0047582f      
0047583c      if (var_4_1 != 0)
0047583c      {
00475842          BaseProperty::CheckCopyOnWrite(&var_8);
0047584e          *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_2);
0047583c      }
0047583c      
0047586a      arg2 = BaseProperty::GetPropertyName(&var_8);
0047586e      HashTable<unsigned long,BaseProperty,1>::set(&this->m_cData.m_hashProperties.vtable, &arg2, &var_8);
0047587a      DialogFactory::CloseDialog(this->m_nContext);
0047587f      int32_t* eax_7 = var_8;
0047587f      
0047588d      if (eax_7 != 0)
0047588d      {
00475897          int32_t edi_3 = (eax_7[1] - 1);
00475894          eax_7[1] = edi_3;
00475894          
0047589e          if (edi_3 == 0)
004758a4              **(uint32_t**)eax_7(1);
004758a4          
004758a6          var_8 = nullptr;
0047588d      }
0047588d      
004758b4      if (var_4_1 != 0)
004758b4      {
004758bc          int32_t edi_5 = (var_4_1[1] - 1);
004758b9          var_4_1[1] = edi_5;
004758b9          
004758c3          if (edi_5 == 0)
004758c9              **(uint32_t**)var_4_1(1);
004758b4      }
004758b4      
004758cb      return 2;
004757e0  }

004758d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004758e0  void __fastcall MenuDialog::CancelDialog(class MenuDialog* this)

004758e0  {
004758ef      int32_t* var_8 = nullptr;
004758f7      int32_t* var_4 = nullptr;
004758ff      BaseProperty::SetPropertyName(&var_8, 0xa4);
004758ff      
0047590a      if (var_4 != 0)
0047590a      {
00475910          BaseProperty::CheckCopyOnWrite(&var_8);
0047591d          *(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(0xffffffff);
0047590a      }
0047590a      
00475939      uint32_t var_c = BaseProperty::GetPropertyName(&var_8);
0047593d      HashTable<unsigned long,BaseProperty,1>::set(&this->m_cData.m_hashProperties.vtable, &var_c, &var_8);
00475949      DialogFactory::CloseDialog(this->m_nContext);
0047594e      int32_t* eax_4 = var_8;
0047594e      
00475957      if (eax_4 != 0)
00475957      {
00475961          int32_t esi_2 = (eax_4[1] - 1);
0047595e          eax_4[1] = esi_2;
0047595e          
00475968          if (esi_2 == 0)
0047596e              **(uint32_t**)eax_4(1);
0047596e          
00475970          var_8 = nullptr;
00475957      }
00475957      
0047597e      if (var_4 != 0)
0047597e      {
00475988          int32_t esi_4 = (var_4[1] - 1);
00475985          var_4[1] = esi_4;
00475985          
0047598f          if (esi_4 == 0)
00475995              **(uint32_t**)var_4(1);
0047597e      }
004758e0  }

0047599c                                                                                      90 90 90 90                              ....

004759a0  class UIElement* __thiscall ConfirmationTextInputDialog::DynamicCast(class ConfirmationTextInputDialog* this, uint32_t arg2) __pure

004759a0  {
004759a9      if (arg2 == 0x15)
004759b6          return this;
004759b6      
004759b0      int32_t edx_1;
004759b0      edx_1 = arg2 != 3;
004759b4      return (this & (edx_1 - 1));
004759a0  }

004759b9                                                                             90 90 90 90 90 90 90                           .......

004759c0  class UIElement* ConfirmationTextInputDialog::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004759c0  {
004759c6      void* result = operator new(0x690);
004759c6      
004759d2      if (result == 0)
004759f2          return 0;
004759f2      
004759e0      Dialog::Dialog(result, arg1, arg2);
004759e5      *(uint32_t*)result = 0x79db40;
004759ee      return result;
004759c0  }

004759f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00475a00  void* __thiscall ConfirmationTextInputDialog::`scalar deleting destructor'(class ConfirmationTextInputDialog* this, uint32_t arg2)

00475a00  {
00475a03      this->vtable = 0x79db40;
00475a09      Dialog::~Dialog(this);
00475a09      
00475a13      if ((arg2 & 1) != 0)
00475a16          operator delete(this);
00475a16      
00475a21      return this;
00475a00  }

00475a24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00475a30  void ConfirmationTextInputDialog::Register()

00475a30  {
00475a37      UIElement::RegisterElementClass(0x15, ConfirmationTextInputDialog::Create);
00475a30  }


00475a40  void __thiscall ConfirmationTextInputDialog::SetData(class ConfirmationTextInputDialog* this, class PropertyCollection const* arg2)

00475a40  {
00475a51      Dialog::SetData(this, arg2);
00475a56      this->vtable->Activate();
00475a73      int32_t* ecx_1 = nullptr;
00475a75      int32_t* var_98 = nullptr;
00475a79      int32_t* var_94 = nullptr;
00475a84      void var_90;
00475a84      
00475a84      for (int32_t* i = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0x9a) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00475a84      {
00475a8c          if (*(uint32_t*)i == 0x9a)
00475a8c          {
00475a99              if (i != 0)
00475a99              {
00475aa3                  BaseProperty::operator=(&var_98, &i[2]);
00475aac                  StringInfo::StringInfo(&var_90);
00475aac                  
00475ab7                  if (var_94 != 0)
00475ac0                      *(uint32_t*)(*(uint32_t*)var_94 + 0xc0)(&var_90);
00475ac0                  
00475aca                  class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x2e);
00475aca                  
00475ad1                  if (eax_5 != 0)
00475ad1                  {
00475ad9                      class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
00475ad9                      
00475ae1                      if (eax_6 != 0)
00475aea                          UIElement_Text::SetStringInfo(eax_6, &var_90);
00475ad1                  }
00475ad1                  
00475af3                  StringInfo::~StringInfo(&var_90);
00475af8                  ecx_1 = var_98;
00475a99              }
00475a99              
00475a99              break;
00475a8c          }
00475a84      }
00475a84      
00475b16      for (int32_t* i_1 = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0x9b) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
00475b16      {
00475b1e          if (*(uint32_t*)i_1 == 0x9b)
00475b1e          {
00475b2b              if (i_1 != 0)
00475b2b              {
00475b35                  BaseProperty::operator=(&var_98, &i_1[2]);
00475b3e                  StringInfo::StringInfo(&var_90);
00475b3e                  
00475b49                  if (var_94 != 0)
00475b52                      *(uint32_t*)(*(uint32_t*)var_94 + 0xc0)(&var_90);
00475b52                  
00475b5c                  class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x2f);
00475b5c                  
00475b63                  if (eax_11 != 0)
00475b63                  {
00475b6b                      class UIElement_Text* eax_12 = eax_11->vtable->DynamicCast(0xc);
00475b6b                      
00475b73                      if (eax_12 != 0)
00475b7c                          UIElement_Text::SetStringInfo(eax_12, &var_90);
00475b63                  }
00475b63                  
00475b85                  StringInfo::~StringInfo(&var_90);
00475b8a                  ecx_1 = var_98;
00475b2b              }
00475b2b              
00475b2b              break;
00475b1e          }
00475b16      }
00475b16      
00475b90      if (ecx_1 != 0)
00475b90      {
00475b98          int32_t esi_2 = (ecx_1[1] - 1);
00475b95          ecx_1[1] = esi_2;
00475b95          
00475b9f          if (esi_2 == 0)
00475ba5              **(uint32_t**)ecx_1(1);
00475ba5          
00475ba7          var_98 = nullptr;
00475b90      }
00475b90      
00475bb5      if (var_94 != 0)
00475bb5      {
00475bbf          int32_t esi_4 = (var_94[1] - 1);
00475bbc          var_94[1] = esi_4;
00475bbc          
00475bc6          if (esi_4 == 0)
00475bcc              **(uint32_t**)var_94(1);
00475bb5      }
00475a40  }

00475bd8                                                                          90 90 90 90 90 90 90 90                          ........

00475be0  enum UIElementMessageListenResult __fastcall ConfirmationTextInputDialog::ListenToElementMessage(class ConfirmationTextInputDialog* this, struct UIElementMessageInfo const* arg2)

00475be0  {
00475be3      uint32_t ebx;
00475be3      uint32_t var_14 = ebx;
00475be6      struct UIElementMessageInfo* ecx = arg2;
00475bee      uint32_t var_18;
00475bee      
00475bee      if (ecx->idMessage == 1)
00475bee      {
00475bf4          uint32_t idElement = ecx->idElement;
00475bf4          
00475bf9          if (idElement == 0x2e)
00475bf9          {
00475bff              var_18 = 0x2c;
00475c03              class UIElement* eax_2 = UIElement::GetChildRecursive(this, var_18);
00475c03              int32_t* esp_1 = &var_14;
00475c03              
00475c0a              if (eax_2 != 0)
00475c0a              {
00475c10                  struct UIElement::VTable* vtable = eax_2->vtable;
00475c12                  uint32_t esi;
00475c12                  var_18 = esi;
00475c17                  class UIElement_Text* eax_3 = vtable->DynamicCast(0xc);
00475c17                  uint32_t* esp_2 = &var_18;
00475c17                  
00475c21                  if (eax_3 != 0)
00475c21                  {
00475c27                      uint32_t var_1c_2 = 0x9c;
00475c30                      int32_t var_8 = 0;
00475c38                      int32_t* var_4_1 = nullptr;
00475c40                      BaseProperty::SetPropertyName(&var_8, var_1c_2);
00475c4c                      void __return_1;
00475c4c                      class PStringBase<unsigned short>* eax_4 = UIElement_Text::GetText(eax_3, &__return_1);
00475c51                      uint16_t var_1c_4 = 0;
00475c57                      struct UIElementMessageInfo const** __return = &arg2;
00475c5a                      PStringBase<unsigned short>::to_spstring(eax_4, __return, var_1c_4);
00475c5a                      
00475c65                      if (var_4_1 != 0)
00475c65                      {
00475c6b                          BaseProperty::CheckCopyOnWrite(&var_8);
00475c7b                          *(uint32_t*)(*(uint32_t*)var_4_1 + 0xa4)(&arg2);
00475c65                      }
00475c65                      
00475c85                      int32_t edi;
00475c85                      int32_t var_1c_6 = edi;
00475c8c                      void* __offset(UIElementMessageInfo, -0x14) esi_3 = ((char*)arg2 - 0x14);
00475c92                      __return = ((char*)esi_3 + 4);
00475c92                      
00475c9b                      if ((InterlockedDecrement(__return) == 0 && esi_3 != 0))
00475c9b                      {
00475c9f                          int32_t var_24_1 = 1;
00475ca3                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00475c9b                      }
00475c9b                      
00475ca9                      int32_t* esi_5 = (var_14 - 0x14);
00475ca9                      
00475cb9                      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00475cb9                      {
00475cbd                          int32_t var_24_3 = 1;
00475cc1                          **(uint32_t**)esi_5(1);
00475cb9                      }
00475cb9                      
00475ccc                      var_14 = BaseProperty::GetPropertyName(&__return_1);
00475ce0                      HashTable<unsigned long,BaseProperty,1>::add(&this->m_cData.m_hashProperties, &var_14, &__return_1);
00475ce0                      esp_2 = &__return;
00475ce9                      BaseProperty::~BaseProperty(&__return_1);
00475c21                  }
00475c21                  
00475cee                  *(uint32_t*)esp_2;
00475cee                  esp_1 = &esp_2[1];
00475c0a              }
00475c0a              
00475cf5              *(uint32_t*)((char*)esp_1 - 4) = this->m_nContext;
00475cf6              DialogFactory::CloseDialog();
00475d03              *(uint32_t*)esp_1;
00475d07              return 2;
00475bf9          }
00475bf9          
00475d0d          if (idElement == 0x2f)
00475d0d          {
00475d0f              this->vtable->CancelDialog();
00475d22              return 2;
00475d0d          }
00475bee      }
00475bee      
00475d25      var_18 = ecx;
00475d31      return Dialog::ListenToElementMessage(this, var_18);
00475be0  }

00475d34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00475d40  void __fastcall ConfirmationTextInputDialog::CancelDialog(class ConfirmationTextInputDialog* this)

00475d40  {
00475d4f      int32_t* var_8 = nullptr;
00475d57      int32_t* var_4 = nullptr;
00475d5f      BaseProperty::SetPropertyName(&var_8, 0x9c);
00475d5f      
00475d6a      if (var_4 != 0)
00475d6a      {
00475d70          BaseProperty::CheckCopyOnWrite(&var_8);
00475d80          *(uint32_t*)(*(uint32_t*)var_4 + 0xa4)(0x8173b4);
00475d6a      }
00475d6a      
00475d9f      uint32_t var_c = BaseProperty::GetPropertyName(&var_8);
00475da3      HashTable<unsigned long,BaseProperty,1>::add(&this->m_cData.m_hashProperties.vtable, &var_c, &var_8);
00475daf      DialogFactory::CloseDialog(this->m_nContext);
00475db4      int32_t* eax_4 = var_8;
00475db4      
00475dbd      if (eax_4 != 0)
00475dbd      {
00475dc7          int32_t esi_2 = (eax_4[1] - 1);
00475dc4          eax_4[1] = esi_2;
00475dc4          
00475dce          if (esi_2 == 0)
00475dd4              **(uint32_t**)eax_4(1);
00475dd4          
00475dd6          var_8 = nullptr;
00475dbd      }
00475dbd      
00475de4      if (var_4 != 0)
00475de4      {
00475dee          int32_t esi_4 = (var_4[1] - 1);
00475deb          var_4[1] = esi_4;
00475deb          
00475df5          if (esi_4 == 0)
00475dfb              **(uint32_t**)var_4(1);
00475de4      }
00475d40  }

00475e02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00475e10  class UIElement* __thiscall ConfirmationMenuDialog::DynamicCast(class ConfirmationMenuDialog* this, uint32_t arg2) __pure

00475e10  {
00475e19      if (arg2 == 0x14)
00475e26          return this;
00475e26      
00475e20      int32_t edx_1;
00475e20      edx_1 = arg2 != 3;
00475e24      return (this & (edx_1 - 1));
00475e10  }

00475e29                             90 90 90 90 90 90 90                                                           .......

00475e30  class UIElement* ConfirmationMenuDialog::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00475e30  {
00475e36      void* result = operator new(0x698);
00475e36      
00475e42      if (result == 0)
00475e6c          return 0;
00475e6c      
00475e50      Dialog::Dialog(result, arg1, arg2);
00475e55      *(uint32_t*)result = &ConfirmationMenuDialog::`vftable';
00475e5b      *(uint32_t*)((char*)result + 0x690) = 0;
00475e68      return result;
00475e30  }

00475e6d                                         90 90 90                                                               ...

00475e70  void* __thiscall ConfirmationMenuDialog::`scalar deleting destructor'(class ConfirmationMenuDialog* this, uint32_t arg2)

00475e70  {
00475e73      this->vtable = &ConfirmationMenuDialog::`vftable';
00475e79      Dialog::~Dialog(this);
00475e79      
00475e83      if ((arg2 & 1) != 0)
00475e86          operator delete(this);
00475e86      
00475e91      return this;
00475e70  }

00475e94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00475ea0  void ConfirmationMenuDialog::Register()

00475ea0  {
00475ea7      UIElement::RegisterElementClass(0x14, ConfirmationMenuDialog::Create);
00475ea0  }


00475eb0  void __thiscall ConfirmationMenuDialog::SetData(class ConfirmationMenuDialog* this, class PropertyCollection const* arg2)

00475eb0  {
00475ec2      Dialog::SetData(this, arg2);
00475ecd      int32_t* var_a4 = nullptr;
00475ed1      int32_t* var_a0 = nullptr;
00475ed5      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x21);
00475edc      class UIElement_Menu* eax_2;
00475edc      
00475edc      if (eax_1 == 0)
00475eec          eax_2 = nullptr;
00475edc      else
00475ee4          eax_2 = eax_1->vtable->DynamicCast(6);
00475ee4      
00475ef0      this->m_pcMenu = eax_2;
00475ef6      int32_t var_9c;
00475ef6      void var_90;
00475ef6      
00475ef6      if (eax_2 != 0)
00475ef6      {
00475f16          for (int32_t* i = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0xa6) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00475f16          {
00475f26              if (*(uint32_t*)i == 0xa6)
00475f26              {
00475f36                  if (i != 0)
00475f36                  {
00475f44                      BaseProperty::operator=(&var_a4, &i[2]);
00475f44                      
00475f4f                      if ((var_a0 != 0 && *(uint32_t*)(*(uint32_t*)var_a0 + 0xf0)(&var_9c) != 0))
00475f4f                      {
00475f6e                          int32_t edi;
00475f6e                          int32_t var_b0_3 = edi;
00475f6f                          int32_t edi_1 = 0;
00475f71                          bool cond:4_1 = var_9c <= 0;
00475f73                          int32_t* var_98 = nullptr;
00475f77                          int32_t* var_94_1 = nullptr;
00475f77                          
00475f7b                          if (!(cond:4_1))
00475f7b                          {
00475f81                              int32_t* ecx_4 = var_a0;
00475f81                              
00475fed                              do
00475fed                              {
00475f87                                  if (ecx_4 != 0)
00475f87                                  {
00475f99                                      if (*(uint32_t*)(*(uint32_t*)ecx_4 + 0xf4)(edi_1, &var_98) != 0)
00475f99                                      {
00475f9f                                          StringInfo::StringInfo(&var_90);
00475f9f                                          
00475faa                                          if ((var_94_1 != 0 && *(uint32_t*)(*(uint32_t*)var_94_1 + 0xc0)(&var_90) != 0))
00475faa                                          {
00475fc3                                              int32_t eax_11 = UIElement_Menu::GetNumItems(this->m_pcMenu);
00475fd4                                              UIElement_Menu::InsertTextItem(this->m_pcMenu, &var_90, eax_11);
00475faa                                          }
00475faa                                          
00475fdd                                          StringInfo::~StringInfo(&var_90);
00475f99                                      }
00475f99                                      
00475fe2                                      ecx_4 = var_a0;
00475f87                                  }
00475f87                                  
00475fea                                  edi_1 += 1;
00475fed                              } while (edi_1 < var_9c);
00475fed                              
00475fef                              int32_t* eax_13 = var_98;
00475fef                              
00475ff5                              if (eax_13 != 0)
00475ff5                              {
00475fff                                  int32_t edi_3 = (eax_13[1] - 1);
00475ffc                                  eax_13[1] = edi_3;
00475ffc                                  
00476006                                  if (edi_3 == 0)
0047600c                                      **(uint32_t**)eax_13(1);
0047600c                                  
0047600e                                  var_98 = nullptr;
00475ff5                              }
00475ff5                              
00476018                              if (var_94_1 != 0)
00476018                              {
00476022                                  int32_t edi_5 = (var_94_1[1] - 1);
0047601f                                  var_94_1[1] = edi_5;
0047601f                                  
00476029                                  if (edi_5 == 0)
0047602f                                      **(uint32_t**)var_94_1(1);
00476018                              }
00475f7b                          }
00475f4f                      }
00475f4f                      
0047603b                      class UIElement* eax_18 = UIElement_Menu::GetItem(this->m_pcMenu, 0);
00476047                      UIElement_Menu::SetSelectedItem(this->m_pcMenu, eax_18, 1);
00475f36                  }
00475f36                  
00475f36                  break;
00475f26              }
00475f16          }
00475ef6      }
00475ef6      
00476066      for (int32_t* i_1 = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0xab) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
00476066      {
0047606e          if (*(uint32_t*)i_1 == 0xab)
0047606e          {
0047607b              if (i_1 != 0)
0047607b              {
00476085                  BaseProperty::operator=(&var_a4, &i_1[2]);
00476090                  var_9c = 0;
00476090                  
00476094                  if (var_a0 != 0)
0047609d                      *(uint32_t*)(*(uint32_t*)var_a0 + 0x78)(&var_9c);
0047609d                  
004760ad                  class UIElement* eax_22 = UIElement_Menu::GetItem(this->m_pcMenu, var_9c);
004760b9                  UIElement_Menu::SetSelectedItem(this->m_pcMenu, eax_22, 1);
0047607b              }
0047607b              
0047607b              break;
0047606e          }
00476066      }
00476066      
004760d8      for (int32_t* i_2 = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0xa8) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_2 != 0; i_2 = i_2[1])
004760d8      {
004760e6          if (*(uint32_t*)i_2 == 0xa8)
004760e6          {
004760f3              if (i_2 != 0)
004760f3              {
004760fd                  BaseProperty::operator=(&var_a4, &i_2[2]);
00476106                  StringInfo::StringInfo(&var_90);
00476106                  
00476111                  if (var_a0 != 0)
0047611a                      *(uint32_t*)(*(uint32_t*)var_a0 + 0xc0)(&var_90);
0047611a                  
00476124                  class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x22);
00476124                  
0047612b                  if (eax_27 != 0)
0047612b                  {
00476133                      class UIElement_Text* eax_28 = eax_27->vtable->DynamicCast(0xc);
00476133                      
0047613b                      if (eax_28 != 0)
00476144                          UIElement_Text::SetStringInfo(eax_28, &var_90);
0047612b                  }
0047612b                  
0047614d                  StringInfo::~StringInfo(&var_90);
004760f3              }
004760f3              
004760f3              break;
004760e6          }
004760d8      }
004760d8      
0047616c      for (int32_t* i_3 = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0xa9) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_3 != 0; i_3 = i_3[1])
0047616c      {
00476176          if (*(uint32_t*)i_3 == 0xa9)
00476176          {
00476183              if (i_3 != 0)
00476183              {
0047618d                  BaseProperty::operator=(&var_a4, &i_3[2]);
00476196                  StringInfo::StringInfo(&var_90);
00476196                  
004761a1                  if (var_a0 != 0)
004761aa                      *(uint32_t*)(*(uint32_t*)var_a0 + 0xc0)(&var_90);
004761aa                  
004761b4                  class UIElement* eax_33 = UIElement::GetChildRecursive(this, 0x23);
004761b4                  
004761bb                  if (eax_33 != 0)
004761bb                  {
004761c3                      class UIElement_Text* eax_34 = eax_33->vtable->DynamicCast(0xc);
004761c3                      
004761cb                      if (eax_34 != 0)
004761d4                          UIElement_Text::SetStringInfo(eax_34, &var_90);
004761bb                  }
004761bb                  
004761dd                  StringInfo::~StringInfo(&var_90);
00476183              }
00476183              
00476183              break;
00476176          }
0047616c      }
0047616c      
004761e2      int32_t* eax_35 = var_a4;
004761e2      
004761e8      if (eax_35 != 0)
004761e8      {
004761f2          int32_t esi_2 = (eax_35[1] - 1);
004761ef          eax_35[1] = esi_2;
004761ef          
004761f9          if (esi_2 == 0)
004761ff              **(uint32_t**)eax_35(1);
004761ff          
00476201          var_a4 = nullptr;
004761e8      }
004761e8      
0047620b      if (var_a0 != 0)
0047620b      {
00476215          int32_t esi_4 = (var_a0[1] - 1);
00476212          var_a0[1] = esi_4;
00476212          
0047621c          if (esi_4 == 0)
00476222              **(uint32_t**)var_a0(1);
0047620b      }
00475eb0  }

0047622f                                               90                                                                 .

00476230  enum UIElementMessageListenResult __thiscall ConfirmationMenuDialog::ListenToElementMessage(class ConfirmationMenuDialog* this, struct UIElementMessageInfo const* arg2)

00476230  {
00476230      struct UIElementMessageInfo* edx_3 = arg2;
00476230      
00476240      if (edx_3->idMessage != 1)
0047624e          return Dialog::ListenToElementMessage(this, edx_3);
0047624e      
00476251      uint32_t idElement = edx_3->idElement;
00476251      
0047625b      if ((idElement != 0x22 && idElement != 0x23))
00476331          return 0;
00476331      
00476262      int32_t edi_1 = 0xffffffff;
00476262      
00476268      if (idElement == 0x22)
00476275          edi_1 = UIElement_Menu::GetSelectedIndex(this->m_pcMenu);
00476275      
00476280      int32_t* var_8 = nullptr;
00476288      int32_t* var_4_1 = nullptr;
00476290      BaseProperty::SetPropertyName(&var_8, 0xab);
00476290      
0047629b      if (var_4_1 != 0)
0047629b      {
004762a1          BaseProperty::CheckCopyOnWrite(&var_8);
004762ad          *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(edi_1);
0047629b      }
0047629b      
004762c9      arg2 = BaseProperty::GetPropertyName(&var_8);
004762cd      HashTable<unsigned long,BaseProperty,1>::set(&this->m_cData.m_hashProperties.vtable, &arg2, &var_8);
004762d9      DialogFactory::CloseDialog(this->m_nContext);
004762de      int32_t* eax_7 = var_8;
004762de      
004762ec      if (eax_7 != 0)
004762ec      {
004762f6          int32_t edi_3 = (eax_7[1] - 1);
004762f3          eax_7[1] = edi_3;
004762f3          
004762fd          if (edi_3 == 0)
00476303              **(uint32_t**)eax_7(1);
00476303          
00476305          var_8 = nullptr;
004762ec      }
004762ec      
00476313      if (var_4_1 != 0)
00476313      {
0047631b          int32_t edi_5 = (var_4_1[1] - 1);
00476318          var_4_1[1] = edi_5;
00476318          
00476322          if (edi_5 == 0)
00476328              **(uint32_t**)var_4_1(1);
00476313      }
00476313      
0047632a      return 2;
00476230  }

00476334                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00476340  void __fastcall ConfirmationMenuDialog::CancelDialog(class ConfirmationMenuDialog* this)

00476340  {
0047634f      int32_t* var_8 = nullptr;
00476357      int32_t* var_4 = nullptr;
0047635f      BaseProperty::SetPropertyName(&var_8, 0xab);
0047635f      
0047636a      if (var_4 != 0)
0047636a      {
00476370          BaseProperty::CheckCopyOnWrite(&var_8);
0047637d          *(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(0xffffffff);
0047636a      }
0047636a      
00476399      uint32_t var_c = BaseProperty::GetPropertyName(&var_8);
0047639d      HashTable<unsigned long,BaseProperty,1>::set(&this->m_cData.m_hashProperties.vtable, &var_c, &var_8);
004763a9      DialogFactory::CloseDialog(this->m_nContext);
004763ae      int32_t* eax_4 = var_8;
004763ae      
004763b7      if (eax_4 != 0)
004763b7      {
004763c1          int32_t esi_2 = (eax_4[1] - 1);
004763be          eax_4[1] = esi_2;
004763be          
004763c8          if (esi_2 == 0)
004763ce              **(uint32_t**)eax_4(1);
004763ce          
004763d0          var_8 = nullptr;
004763b7      }
004763b7      
004763de      if (var_4 != 0)
004763de      {
004763e8          int32_t esi_4 = (var_4[1] - 1);
004763e5          var_4[1] = esi_4;
004763e5          
004763ef          if (esi_4 == 0)
004763f5              **(uint32_t**)var_4(1);
004763de      }
00476340  }

004763fc                                                                                      90 90 90 90                              ....

00476400  class UIElement* __thiscall ConfirmationDialog::DynamicCast(class ConfirmationDialog* this, uint32_t arg2) __pure

00476400  {
00476409      if (arg2 == 0x13)
00476416          return this;
00476416      
00476410      int32_t edx_1;
00476410      edx_1 = arg2 != 3;
00476414      return (this & (edx_1 - 1));
00476400  }

00476419                                                                             90 90 90 90 90 90 90                           .......

00476420  class UIElement* ConfirmationDialog::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00476420  {
00476426      void* result = operator new(0x690);
00476426      
00476432      if (result == 0)
00476452          return 0;
00476452      
00476440      Dialog::Dialog(result, arg1, arg2);
00476445      *(uint32_t*)result = 0x79ddd0;
0047644e      return result;
00476420  }

00476453                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00476460  class UIElement_Text* __thiscall UIElement::<class UIElement_Text>::GetChildRecursiveTemplate(UIElement::<class UIElement_Text>* this, unsigned long arg2)

00476460  {
00476465      class UIElement* eax = UIElement::GetChildRecursive(this, arg2);
00476465      
0047646c      if (eax == 0)
00476482          return 0;
00476482      
00476470      arg2 = 0xc;
0047647a      /* jump -> eax->vtable->DynamicCast */
00476460  }

00476485                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00476490  void* __thiscall ConfirmationDialog::`scalar deleting destructor'(class ConfirmationDialog* this, uint32_t arg2)

00476490  {
00476493      this->vtable = 0x79ddd0;
00476499      Dialog::~Dialog(this);
00476499      
004764a3      if ((arg2 & 1) != 0)
004764a6          operator delete(this);
004764a6      
004764b1      return this;
00476490  }

004764b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004764c0  void ConfirmationDialog::Register()

004764c0  {
004764c7      UIElement::RegisterElementClass(0x13, ConfirmationDialog::Create);
004764c0  }


004764d0  void __thiscall ConfirmationDialog::SetData(class ConfirmationDialog* this, class PropertyCollection const* arg2)

004764d0  {
004764e1      Dialog::SetData(this, arg2);
004764f9      int32_t* ecx = nullptr;
004764fb      int32_t* var_98 = nullptr;
004764ff      int32_t* var_94 = nullptr;
0047650a      void var_90;
0047650a      
0047650a      for (int32_t* i = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0x90) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0047650a      {
00476516          if (*(uint32_t*)i == 0x90)
00476516          {
00476523              if (i != 0)
00476523              {
0047652d                  BaseProperty::operator=(&var_98, &i[2]);
00476536                  StringInfo::StringInfo(&var_90);
00476536                  
00476541                  if (var_94 != 0)
0047654a                      *(uint32_t*)(*(uint32_t*)var_94 + 0xc0)(&var_90);
0047654a                  
00476554                  class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x17);
00476554                  
0047655b                  if (eax_5 != 0)
0047655b                  {
00476563                      class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
00476563                      
0047656b                      if (eax_6 != 0)
00476574                          UIElement_Text::SetStringInfo(eax_6, &var_90);
0047655b                  }
0047655b                  
0047657d                  StringInfo::~StringInfo(&var_90);
00476582                  ecx = var_98;
00476523              }
00476523              
00476523              break;
00476516          }
0047650a      }
0047650a      
004765a0      for (int32_t* i_1 = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0x91) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
004765a0      {
004765a8          if (*(uint32_t*)i_1 == 0x91)
004765a8          {
004765b5              if (i_1 != 0)
004765b5              {
004765bf                  BaseProperty::operator=(&var_98, &i_1[2]);
004765c8                  StringInfo::StringInfo(&var_90);
004765c8                  
004765d3                  if (var_94 != 0)
004765dc                      *(uint32_t*)(*(uint32_t*)var_94 + 0xc0)(&var_90);
004765dc                  
004765e6                  class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x19);
004765e6                  
004765ed                  if (eax_11 != 0)
004765ed                  {
004765f5                      class UIElement_Text* eax_12 = eax_11->vtable->DynamicCast(0xc);
004765f5                      
004765fd                      if (eax_12 != 0)
00476606                          UIElement_Text::SetStringInfo(eax_12, &var_90);
004765ed                  }
004765ed                  
0047660f                  StringInfo::~StringInfo(&var_90);
00476614                  ecx = var_98;
004765b5              }
004765b5              
004765b5              break;
004765a8          }
004765a0      }
004765a0      
0047661a      if (ecx != 0)
0047661a      {
00476622          int32_t esi_2 = (ecx[1] - 1);
0047661f          ecx[1] = esi_2;
0047661f          
00476629          if (esi_2 == 0)
0047662f              **(uint32_t**)ecx(1);
0047662f          
00476631          var_98 = nullptr;
0047661a      }
0047661a      
0047663f      if (var_94 != 0)
0047663f      {
00476649          int32_t esi_4 = (var_94[1] - 1);
00476646          var_94[1] = esi_4;
00476646          
00476650          if (esi_4 == 0)
00476656              **(uint32_t**)var_94(1);
0047663f      }
004764d0  }

00476662        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00476670  enum UIElementMessageListenResult __thiscall ConfirmationDialog::ListenToElementMessage(class ConfirmationDialog* this, struct UIElementMessageInfo const* arg2)

00476670  {
00476675      struct UIElementMessageInfo* edi = arg2;
00476675      
00476681      if (edi->idMessage != 1)
00476690          return Dialog::ListenToElementMessage(this, edi);
00476690      
00476693      uint32_t idElement = edi->idElement;
00476693      
0047669d      if ((idElement != 0x19 && idElement != 0x17))
0047676b          return 0;
0047676b      
004766ac      int32_t* var_8 = nullptr;
004766b4      int32_t* var_4_1 = nullptr;
004766bc      BaseProperty::SetPropertyName(&var_8, 0x92);
004766c7      arg2 = edi->idElement == 0x17;
004766c7      
004766d1      if (var_4_1 != 0)
004766d1      {
004766d7          BaseProperty::CheckCopyOnWrite(&var_8);
004766e7          *(uint32_t*)(*(uint32_t*)var_4_1 + 0x74)(arg2);
004766d1      }
004766d1      
00476703      arg2 = BaseProperty::GetPropertyName(&var_8);
00476707      HashTable<unsigned long,BaseProperty,1>::add(&this->m_cData.m_hashProperties.vtable, &arg2, &var_8);
00476713      DialogFactory::CloseDialog(this->m_nContext);
00476718      int32_t* eax_7 = var_8;
00476718      
00476726      if (eax_7 != 0)
00476726      {
00476730          int32_t edi_2 = (eax_7[1] - 1);
0047672d          eax_7[1] = edi_2;
0047672d          
00476737          if (edi_2 == 0)
0047673d              **(uint32_t**)eax_7(1);
0047673d          
0047673f          var_8 = nullptr;
00476726      }
00476726      
0047674d      if (var_4_1 != 0)
0047674d      {
00476755          int32_t edi_4 = (var_4_1[1] - 1);
00476752          var_4_1[1] = edi_4;
00476752          
0047675c          if (edi_4 == 0)
00476762              **(uint32_t**)var_4_1(1);
0047674d      }
0047674d      
00476764      return 2;
00476670  }

0047676e                                            90 90                                                                ..

00476770  void __fastcall ConfirmationDialog::CancelDialog(class ConfirmationDialog* this)

00476770  {
0047677f      int32_t* var_8 = nullptr;
00476787      int32_t* var_4 = nullptr;
0047678f      BaseProperty::SetPropertyName(&var_8, 0x92);
0047678f      
0047679a      if (var_4 != 0)
0047679a      {
004767a0          BaseProperty::CheckCopyOnWrite(&var_8);
004767ad          *(uint32_t*)(*(uint32_t*)var_4 + 0x74)(0);
0047679a      }
0047679a      
004767c9      uint32_t var_c = BaseProperty::GetPropertyName(&var_8);
004767cd      HashTable<unsigned long,BaseProperty,1>::add(&this->m_cData.m_hashProperties.vtable, &var_c, &var_8);
004767d9      DialogFactory::CloseDialog(this->m_nContext);
004767de      int32_t* eax_4 = var_8;
004767de      
004767e7      if (eax_4 != 0)
004767e7      {
004767f1          int32_t esi_2 = (eax_4[1] - 1);
004767ee          eax_4[1] = esi_2;
004767ee          
004767f8          if (esi_2 == 0)
004767fe              **(uint32_t**)eax_4(1);
004767fe          
00476800          var_8 = nullptr;
004767e7      }
004767e7      
0047680e      if (var_4 != 0)
0047680e      {
00476818          int32_t esi_4 = (var_4[1] - 1);
00476815          var_4[1] = esi_4;
00476815          
0047681f          if (esi_4 == 0)
00476825              **(uint32_t**)var_4(1);
0047680e      }
00476770  }

0047682c                                      90 90 90 90                                                              ....

00476830  void __thiscall Dialog::Dialog(class Dialog* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00476830  {
0047683f      UIElement_Field::UIElement_Field(this, arg2, arg3);
0047684a      this->vtable = 0x79df20;
00476850      this->m_nContext = 0;
0047685a      PropertyCollection::PropertyCollection(&this->m_cData);
0047686a      this->m_tNow = 0f;
00476874      *(uint32_t*)((char*)this->m_tNow)[4] = 0xbff00000;
0047687a      this->m_tExpiration = 0f;
00476880      *(uint32_t*)((char*)this->m_tExpiration)[4] = 0xbff00000;
00476886      this->m_pcPendingDisplay = nullptr;
00476890      this->m_pcPendingDisplayText = nullptr;
00476830  }


004768a0  void __fastcall Dialog::~Dialog(class Dialog* this)

004768a0  {
004768a9      this->vtable = 0x79df20;
004768af      PropertyCollection::~PropertyCollection(&this->m_cData);
004768b7      /* tailcall */
004768b7      return UIElement_Field::~UIElement_Field(this);
004768a0  }

004768bc                                                                                      90 90 90 90                              ....

004768c0  enum UIElementMessageListenResult __thiscall Dialog::ListenToElementMessage(class Dialog* this, struct UIElementMessageInfo const* arg2)

004768c0  {
004768d1      if ((arg2->idMessage == 0x24 && arg2->pElement == this))
004768d3          this->vtable->UpdatePopupSizeAndPosition();
004768d3      
004768e5      return UIElement::ListenToElementMessage(this, arg2);
004768c0  }

004768e8                          90 90 90 90 90 90 90 90                                                          ........

004768f0  void* __thiscall Dialog::`scalar deleting destructor'(class Dialog* this, uint32_t arg2)

004768f0  {
004768f9      this->vtable = 0x79df20;
004768ff      PropertyCollection::~PropertyCollection(&this->m_cData);
00476906      UIElement_Field::~UIElement_Field(this);
00476906      
00476910      if ((arg2 & 1) != 0)
00476913          operator delete(this);
00476913      
0047691e      return this;
004768f0  }

00476921     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00476930  void __thiscall Dialog::UpdatePendingDialogDisplay(class Dialog* this, uint32_t arg2)

00476930  {
00476945      if ((this->m_pcPendingDisplay == 0 || this->m_pcPendingDisplayText == 0))
00476945      {
0047694b          class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x33);
00476952          this->m_pcPendingDisplay = eax_2;
00476958          class UIElement* eax_3;
00476958          
00476958          if (eax_2 != 0)
0047695e              eax_3 = UIElement::GetChildRecursive(eax_2, 0x34);
0047695e          
00476965          class UIElement_Text* eax_4;
00476965          
00476965          if ((eax_2 == 0 || eax_3 == 0))
00476975              eax_4 = nullptr;
00476965          else
0047696d              eax_4 = eax_3->vtable->DynamicCast(0xc);
0047696d          
00476977          this->m_pcPendingDisplayText = eax_4;
00476945      }
00476945      
0047697d      class UIElement* m_pcPendingDisplay = this->m_pcPendingDisplay;
0047697d      
00476986      if (m_pcPendingDisplay == 0)
0047699f          return;
0047699f      
0047698e      int32_t edx_3 = -(arg2);
00476995      arg2 = ((edx_3 - edx_3) + 0x19);
00476999      /* jump -> m_pcPendingDisplay->vtable->SetState */
00476930  }

004769a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004769b0  void __fastcall Dialog::UpdatePopupSizeAndPosition(class Dialog* this)

004769b0  {
004769b7      class UIElement* eax = UIElement::GetChildRecursive(this, 0x3e);
004769be      class UIElement_Text* ebx;
004769be      
004769be      if (eax == 0)
004769d0          ebx = nullptr;
004769be      else
004769cc          ebx = eax->vtable->DynamicCast(0xc);
004769cc      
004769d6      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x3d);
004769d6      
004769df      if (eax_2 != 0)
004769df      {
004769e4          UIElement_Text::RecalculateGlyphList(ebx);
00476a01          int32_t edi_3 = ((ebx->m_iScrollableHeight - UIRegion::GetHeight(ebx)) + UIRegion::GetHeight(eax_2));
00476a01          
00476a0a          if (UIRegion::GetHeight(eax_2) < edi_3)
00476a0c              eax_2->vtable->ResizeTo(UIRegion::GetWidth(eax_2), edi_3);
00476a0c          
00476a23          int32_t eax_8;
00476a23          int32_t edx_2;
00476a23          edx_2 = HIGHD(((int64_t)UIRegion::GetHeight(this)));
00476a23          eax_8 = LOWD(((int64_t)UIRegion::GetHeight(this)));
00476a30          int32_t eax_12;
00476a30          int32_t edx_3;
00476a30          edx_3 = HIGHD(((int64_t)UIRegion::GetWidth(this)));
00476a30          eax_12 = LOWD(((int64_t)UIRegion::GetWidth(this)));
00476a38          UIElement::CenterAt(eax_2, ((eax_12 - edx_3) >> 1), ((eax_8 - edx_2) >> 1));
004769df      }
004769b0  }

00476a42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00476a50  void __fastcall Dialog::UpdateDialogText(class Dialog* this)

00476a50  {
00476a60      uint32_t temp1 = (COMBINE(0, 0xc5) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets);
00476a66      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets;
00476a6c      int32_t* var_98 = nullptr;
00476a74      int32_t* var_94 = nullptr;
00476a7c      int32_t* edx_2 = m_buckets[temp1];
00476a7c      
00476a81      if (edx_2 != 0)
00476a81      {
00476a8d          while (*(uint32_t*)edx_2 != 0xc5)
00476a8d          {
00476a8f              edx_2 = edx_2[1];
00476a8f              
00476a94              if (edx_2 == 0)
00476a9d                  return;
00476a8d          }
00476a8d          
00476aa0          if (edx_2 != 0)
00476aa0          {
00476aae              BaseProperty::operator=(&var_98, &edx_2[2]);
00476ab7              void var_90;
00476ab7              StringInfo::StringInfo(&var_90);
00476ab7              
00476ac2              if ((var_94 != 0 && *(uint32_t*)(*(uint32_t*)var_94 + 0xc0)(&var_90) != 0))
00476ac2              {
00476ad9                  class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x3e);
00476ad9                  
00476ae0                  if (eax_2 != 0)
00476ae0                  {
00476ae9                      class UIElement_Text* eax_3 = eax_2->vtable->DynamicCast(0xc);
00476ae9                      
00476af3                      if (eax_3 != 0)
00476af3                      {
00476af5                          this->m_tExpiration;
00476afb                          this->m_tNow;
00476b06                          int32_t eax_5;
00476b06                          int32_t edx_6;
00476b06                          edx_6 = HIGHD(((int64_t)_ftol2()));
00476b06                          eax_5 = LOWD(((int64_t)_ftol2()));
00476b07                          int32_t var_a4_1 = edx_6;
00476b1b                          StringInfo::AddVariable_Int(&var_90, compute_str_hash("time"), eax_5);
00476b27                          UIElement_Text::SetStringInfo(eax_3, &var_90);
00476b2c                          this->vtable->UpdatePopupSizeAndPosition();
00476af3                      }
00476ae0                  }
00476ac2              }
00476ac2              
00476b3b              StringInfo::~StringInfo(&var_90);
00476b40              int32_t* eax_7 = var_98;
00476b40              
00476b46              if (eax_7 != 0)
00476b46              {
00476b50                  int32_t esi_2 = (eax_7[1] - 1);
00476b4d                  eax_7[1] = esi_2;
00476b4d                  
00476b57                  if (esi_2 == 0)
00476b5d                      **(uint32_t**)eax_7(1);
00476b5d                  
00476b5f                  var_98 = nullptr;
00476b46              }
00476b46              
00476b6d              if (var_94 != 0)
00476b6d              {
00476b77                  int32_t esi_4 = (var_94[1] - 1);
00476b74                  var_94[1] = esi_4;
00476b74                  
00476b7e                  if (esi_4 == 0)
00476b84                      **(uint32_t**)var_94(1);
00476b6d              }
00476aa0          }
00476a81      }
00476a50  }

00476b8e                                            90 90                                                                ..

00476b90  void __thiscall Dialog::ListenToGlobalMessage(class Dialog* this, uint32_t arg2, int32_t arg3)

00476b90  {
00476b95      if (arg2 == 3)
00476b95      {
00476b97          long double x87_r7_1 = ((long double)Timer::cur_time);
00476b9d          long double temp1_1 = ((long double)this->m_tNow);
00476b9d          (x87_r7_1 - temp1_1);
00476b9d          
00476ba8          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00476ba8          {
00476baa              this->m_tNow = ((double)x87_r7_1);
00476bb0              long double temp2 = ((long double)this->m_tExpiration);
00476bb0              (x87_r7_1 - temp2);
00476bb0              
00476bbb              if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00476bbb              {
00476bbd                  this->vtable->CancelDialog();
00476bc5                  return;
00476bbb              }
00476bbb              
00476bc8              Dialog::UpdateDialogText(this);
00476ba8          }
00476b95      }
00476b90  }

00476bd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00476be0  void __thiscall Dialog::SetData(class Dialog* this, class PropertyCollection const* arg2)

00476be0  {
00476bf2      PropertyCollection::operator=(&this->m_cData, arg2);
00476bfe      uint32_t temp1 = (COMBINE(0, 0xac) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets);
00476c04      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets;
00476c0c      int32_t* var_8 = nullptr;
00476c10      int32_t* var_4 = nullptr;
00476c10      
00476c1b      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
00476c1b      {
00476c26          if (*(uint32_t*)i == 0xac)
00476c26          {
00476c33              if (i != 0)
00476c33              {
00476c3d                  BaseProperty::operator=(&var_8, &i[2]);
00476c48                  arg2 = 0;
00476c48                  
00476c4c                  if (var_4 != 0)
00476c4c                  {
00476c55                      *(uint32_t*)(*(uint32_t*)var_4 + 0x70)(&arg2);
00476c55                      
00476c5c                      if (arg2 != 0)
00476c64                          UIElement::SetAttribute_Bool(this, 0x40, 1);
00476c4c                  }
00476c33              }
00476c33              
00476c33              break;
00476c26          }
00476c1b      }
00476c1b      
00476c83      for (int32_t* i_1 = this->m_cData.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0xc6) % this->m_cData.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
00476c83      {
00476c8b          if (*(uint32_t*)i_1 == 0xc6)
00476c8b          {
00476c98              if (i_1 != 0)
00476c98              {
00476ca2                  BaseProperty::operator=(&var_8, &i_1[2]);
00476cad                  arg2 = nullptr;
00476cad                  
00476cb5                  if (var_4 != 0)
00476cbe                      *(uint32_t*)(*(uint32_t*)var_4 + 0x88)(&arg2);
00476cbe                  
00476cd4                  this->m_tNow = (*(uint32_t*)Timer::cur_time);
00476cda                  *(uint32_t*)((char*)this->m_tNow)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00476cea                  this->m_tExpiration = ((double)(((long double)arg2) + ((long double)this->m_tNow)));
00476cf0                  UIListener::RegisterForGlobalMessage(this, 3);
00476c98              }
00476c98              
00476c98              break;
00476c8b          }
00476c83      }
00476c83      
00476cf7      Dialog::UpdateDialogText(this);
00476cfc      int32_t* eax_7 = var_8;
00476cfc      
00476d02      if (eax_7 != 0)
00476d02      {
00476d0c          int32_t esi_2 = (eax_7[1] - 1);
00476d09          eax_7[1] = esi_2;
00476d09          
00476d13          if (esi_2 == 0)
00476d19              **(uint32_t**)eax_7(1);
00476d19          
00476d1b          var_8 = nullptr;
00476d02      }
00476d02      
00476d25      if (var_4 != 0)
00476d25      {
00476d2f          int32_t esi_4 = (var_4[1] - 1);
00476d2c          var_4[1] = esi_4;
00476d2c          
00476d36          if (esi_4 == 0)
00476d3c              **(uint32_t**)var_4(1);
00476d25      }
00476be0  }

00476d46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00476d50  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>* this, uint32_t arg2)

00476d50  {
00476d53      class HashTableData<unsigned long,List<DialogInfo> >** m_buckets = this->m_buckets;
00476d5b      this->vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class List<struct DialogInfo> >*,0>::`vftable';
00476d5b      
00476d61      if (m_buckets != &this->m_aInplaceBuckets)
00476d64          operator delete[](m_buckets);
00476d64      
00476d6e      this->m_buckets = nullptr;
00476d71      this->m_firstInterestingBucket = nullptr;
00476d74      this->m_numBuckets = 0;
00476d77      this->m_numElements = 0;
00476d77      
00476d7f      if ((arg2 & 1) != 0)
00476d82          operator delete(this);
00476d82      
00476d8d      return this;
00476d50  }


00476d90  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>* this, uint32_t arg2)

00476d90  {
00476d93      class HashTableData<unsigned long,DialogInfo>** m_buckets = this->m_buckets;
00476d9b      this->vtable = 0x79e088;
00476d9b      
00476da1      if (m_buckets != &this->m_aInplaceBuckets)
00476da4          operator delete[](m_buckets);
00476da4      
00476dae      this->m_buckets = nullptr;
00476db1      this->m_firstInterestingBucket = nullptr;
00476db4      this->m_numBuckets = 0;
00476db7      this->m_numElements = 0;
00476db7      
00476dbf      if ((arg2 & 1) != 0)
00476dc2          operator delete(this);
00476dc2      
00476dcd      return this;
00476d90  }


00476dd0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,void (__cdecl*)(PropertyCollection const &)> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,void (__cdecl*)(PropertyCollection const &)> *,0>* this, uint32_t arg2)

00476dd0  {
00476dd3      class HashTableData<unsigned long,void (__cdecl*)(PropertyCollection const &)>** m_buckets = this->m_buckets;
00476ddb      this->vtable = 0x79e08c;
00476ddb      
00476de1      if (m_buckets != &this->m_aInplaceBuckets)
00476de4          operator delete[](m_buckets);
00476de4      
00476dee      this->m_buckets = nullptr;
00476df1      this->m_firstInterestingBucket = nullptr;
00476df4      this->m_numBuckets = 0;
00476df7      this->m_numElements = 0;
00476df7      
00476dff      if ((arg2 & 1) != 0)
00476e02          operator delete(this);
00476e02      
00476e0d      return this;
00476dd0  }


00476e10  uint8_t __thiscall List<DialogInfo>::pop_front(class List<DialogInfo>* this, struct DialogInfo* arg2)

00476e10  {
00476e14      class ListNode<DialogInfo>* _head = this->_head;
00476e14      
00476e1b      if (_head == 0)
00476e1b      {
00476e1e          int32_t eax;
00476e1e          eax = 0;
00476e21          return 0;
00476e1b      }
00476e1b      
00476e24      class ListNode<DialogInfo>* next = _head->next;
00476e2c      this->_head = next;
00476e2c      
00476e2f      if (next == 0)
00476e39          this->_tail = nullptr;
00476e2f      else
00476e31          next->prev = nullptr;
00476e31      
00476e44      PropertyCollection::operator=(arg2, _head);
00476e4c      arg2->pointer = _head->data.pointer;
00476e52      arg2->parent = _head->data.parent;
00476e5d      arg2->context = _head->data.context;
00476e63      PropertyCollection::~PropertyCollection(_head);
00476e69      operator delete(_head);
00476e76      this->_num_elements -= 1;
00476e7a      uint32_t eax_3;
00476e7a      eax_3 = 1;
00476e7d      return 1;
00476e10  }


00476e80  uint8_t __thiscall List<DialogInfo>::remove(class List<DialogInfo>* this, class ListNode<DialogInfo>* arg2)

00476e80  {
00476e8c      class ListNode<DialogInfo>* _head;
00476e8c      
00476e8c      if (arg2 != 0)
00476e8c      {
00476e8e          _head = this->_head;
00476e8e          
00476e93          if (_head != 0)
00476e93          {
00476e9e              class ListNode<DialogInfo>* next;
00476e9e              
00476e9e              if (arg2 != _head)
00476e9e              {
00476eb2                  arg2->prev->next = arg2->next;
00476ec4                  next = arg2->next;
00476ec4                  
00476ecc                  if (next == 0)
00476ee2                      this->_tail = arg2->prev;
00476ecc                  else
00476ed4                      next->prev = arg2->prev;
00476e9e              }
00476e9e              else
00476e9e              {
00476ea0                  next = arg2->next;
00476ea8                  this->_head = next;
00476ea8                  
00476eab                  if (next != 0)
00476ed4                      next->prev = nullptr;
00476eab                  else
00476ead                      this->_tail = nullptr;
00476e9e              }
00476ee7              PropertyCollection::~PropertyCollection(arg2);
00476eed              operator delete(arg2);
00476ef9              this->_num_elements -= 1;
00476efd              uint32_t eax_2;
00476efd              eax_2 = 1;
00476f00              return 1;
00476e93          }
00476e8c      }
00476e8c      
00476e96      _head = 0;
00476e99      return 0;
00476e80  }

00476f03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00476f10  void __fastcall List<DialogInfo>::flush(class List<DialogInfo>* this)

00476f10  {
00476f23      while (this->_head != 0)
00476f23      {
00476f2d          void var_84;
00476f2d          PropertyCollection::PropertyCollection(&var_84);
00476f32          class ListNode<DialogInfo>* _head = this->_head;
00476f37          int32_t var_c_1 = 0;
00476f3e          int32_t var_8_1 = 0;
00476f45          int32_t var_4_1 = 0;
00476f45          
00476f4c          if (_head != 0)
00476f4c          {
00476f4e              class ListNode<DialogInfo>* next = _head->next;
00476f56              this->_head = next;
00476f56              
00476f59              if (next == 0)
00476f63                  this->_tail = nullptr;
00476f59              else
00476f5b                  next->prev = nullptr;
00476f5b              
00476f6b              PropertyCollection::operator=(&var_84, _head);
00476f73              class Dialog* pointer = _head->data.pointer;
00476f7d              class UIFramework* parent = _head->data.parent;
00476f8c              uint32_t context = _head->data.context;
00476f93              PropertyCollection::~PropertyCollection(_head);
00476f99              operator delete(_head);
00476fa5              this->_num_elements -= 1;
00476f4c          }
00476f4c          
00476fac          PropertyCollection::~PropertyCollection(&var_84);
00476f23      }
00476f10  }


00476fc0  uint8_t __thiscall HashTable<unsigned long,DialogInfo,0>::find(class HashTable<unsigned long,DialogInfo,0> const* this, uint32_t const* arg2, struct DialogInfo* arg3)

00476fc0  {
00476fc5      uint32_t const esi = *(uint32_t*)arg2;
00476fd8      int32_t* i;
00476fd8      
00476fd8      for (i = this->m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00476fd8      {
00476fe2          if (*(uint32_t*)i == esi)
00476fe2          {
00476ff3              if (i == 0)
00476ff3                  break;
00476ff3              
00476ff6              class PropertyCollection* edi = arg3;
00477000              PropertyCollection::operator=(edi, &i[2]);
00477008              *(int32_t*)((char*)edi + 0x78) = i[0x20];
0047700e              *(int32_t*)((char*)edi + 0x7c) = i[0x21];
00477017              *(int32_t*)((char*)edi + 0x80) = i[0x22];
0047701e              int32_t eax_2;
0047701e              eax_2 = 1;
00477021              return 1;
00476fe2          }
00476fd8      }
00476fd8      
00476feb      i = 0;
00476fee      return 0;
00476fc0  }

00477024              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00477030  void* __thiscall List<DialogInfo>::`scalar deleting destructor'(class List<DialogInfo>* this, uint32_t arg2)

00477030  {
00477033      this->vtable = &List<struct DialogInfo>::`vftable';
00477039      List<DialogInfo>::flush(this);
00477039      
00477043      if ((arg2 & 1) != 0)
00477046          operator delete(this);
00477046      
00477051      return this;
00477030  }

00477054                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00477060  uint8_t DialogFactory::IsDialogOpen(uint32_t arg1)

00477060  {
00477065      uint32_t ecx = arg1;
0047706b      uint32_t eax;
0047706b      eax = DialogFactory::s_listNonQueuedInfos._num_elements != 0;
0047706b      
00477070      if (ecx != 0)
00477070      {
00477085          if (ecx == 1)
00477081              return eax;
00477081          
00477091          class List<NoticeHandler *>** eax_2 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&DialogFactory::s_hashCurInfos, &arg1);
00477091          
0047709f          if ((eax_2 == 0 || eax_2[0x1e] == 0))
00477081              return 0;
00477070      }
00477070      else if ((eax == 0 && DialogFactory::s_hashCurInfos.m_intrusiveTable.m_numElements == 0))
00477081          return 0;
00477081      
004770a6      return 1;
00477060  }

004770a7                       90 90 90 90 90 90 90 90 90                                                         .........

004770b0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>* this, uint32_t arg2)

004770b0  {
004770bb      arg2 = arg2;
004770bf      uint8_t edx = ((int8_t)arg2);
004770c3      this->m_buckets = nullptr;
004770c6      this->m_firstInterestingBucket = nullptr;
004770c9      this->m_numBuckets = 0;
004770cc      this->m_numElements = 0;
004770d0      this->vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class List<struct DialogInfo> >*,0>::`vftable';
004770d6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004770e9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004770e9      
004770f3      if (eax == bucketSizesEnd_1)
004770f5          eax -= 4;
004770f5      
004770f8      uint32_t eax_1 = *(uint32_t*)eax;
004770fd      this->m_numBuckets = eax_1;
004770fd      
00477100      if (eax_1 > 0x17)
00477116          this->m_buckets = operator new[]((eax_1 << 2));
00477100      else
00477105          this->m_buckets = &this->m_aInplaceBuckets;
00477105      
0047711c      class HashTableData<unsigned long,List<DialogInfo> >** m_buckets = this->m_buckets;
0047711f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00477125      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00477136      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004770b0  }

0047713f                                                                                               90                                 .

00477140  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>* this, uint32_t arg2)

00477140  {
0047714b      arg2 = arg2;
0047714f      uint8_t edx = ((int8_t)arg2);
00477153      this->m_buckets = nullptr;
00477156      this->m_firstInterestingBucket = nullptr;
00477159      this->m_numBuckets = 0;
0047715c      this->m_numElements = 0;
00477160      this->vtable = 0x79e088;
00477166      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00477179      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00477179      
00477183      if (eax == bucketSizesEnd_1)
00477185          eax -= 4;
00477185      
00477188      uint32_t eax_1 = *(uint32_t*)eax;
0047718d      this->m_numBuckets = eax_1;
0047718d      
00477190      if (eax_1 > 0x17)
004771a6          this->m_buckets = operator new[]((eax_1 << 2));
00477190      else
00477195          this->m_buckets = &this->m_aInplaceBuckets;
00477195      
004771ac      class HashTableData<unsigned long,DialogInfo>** m_buckets = this->m_buckets;
004771af      uint32_t ecx_3 = (this->m_numBuckets << 2);
004771b5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004771c6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00477140  }

004771cf                                               90                                                                 .

004771d0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,void (__cdecl*)(PropertyCollection const &)> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,void (__cdecl*)(PropertyCollection const &)> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,void (__cdecl*)(PropertyCollection const &)> *,0>* this, uint32_t arg2)

004771d0  {
004771db      arg2 = arg2;
004771df      uint8_t edx = ((int8_t)arg2);
004771e3      this->m_buckets = nullptr;
004771e6      this->m_firstInterestingBucket = nullptr;
004771e9      this->m_numBuckets = 0;
004771ec      this->m_numElements = 0;
004771f0      this->vtable = 0x79e08c;
004771f6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00477209      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00477209      
00477213      if (eax == bucketSizesEnd_1)
00477215          eax -= 4;
00477215      
00477218      uint32_t eax_1 = *(uint32_t*)eax;
0047721d      this->m_numBuckets = eax_1;
0047721d      
00477220      if (eax_1 > 0x17)
00477236          this->m_buckets = operator new[]((eax_1 << 2));
00477220      else
00477225          this->m_buckets = &this->m_aInplaceBuckets;
00477225      
0047723c      class HashTableData<unsigned long,void (__cdecl*)(PropertyCollection const &)>** m_buckets = this->m_buckets;
0047723f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00477245      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00477256      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004771d0  }

0047725f                                                                                               90                                 .

00477260  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>* this)

00477260  {
00477268      if (this->m_numElements != 0)
00477268      {
0047726a          void* edi;
0047726a          void* var_8_1 = edi;
0047726a          
004772e6          do
004772e6          {
00477276              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0047727c              int32_t* m_firstInterestingBucket_2;
0047727c              
0047727c              if (this->m_firstInterestingBucket == ecx_1)
0047727c              {
00477292              label_477292:
00477292                  m_firstInterestingBucket_2 = nullptr;
00477294                  edi = nullptr;
0047727c              }
0047727c              else
0047727c              {
00477280                  while (true)
00477280                  {
00477280                      class HashTableData<unsigned long,List<DialogInfo> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
00477280                      
00477286                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00477286                      {
00477298                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0047729b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
0047729d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0047729d                          break;
00477286                      }
00477286                      
0047728d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0047728d                      
00477290                      if (&m_firstInterestingBucket[1] == ecx_1)
00477290                          goto label_477292;
00477280                  }
0047727c              }
0047727c              
0047729f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0047729f              
004772a3              if (eax_3 == edi)
004772b5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
004772a3              else
004772a3              {
004772ac                  void* ecx_2;
004772ac                  
004772ac                  do
004772ac                  {
004772a5                      ecx_2 = eax_3;
004772a7                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
004772ac                  } while (eax_3 != edi);
004772ac                  
004772b0                  if (ecx_2 != 0)
004772bc                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
004772b0                  else
004772b5                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
004772a3              }
004772a3              
004772c5              this->m_numElements -= 1;
004772c5              
004772c8              if (edi != 0)
004772c8              {
004772cd                  *(uint32_t*)((char*)edi + 8) = &List<struct DialogInfo>::`vftable';
004772d3                  List<DialogInfo>::flush(((char*)edi + 8));
004772d9                  operator delete(edi);
004772c8              }
004772e6          } while (this->m_numElements != 0);
00477268      }
00477260  }

0047726d                                         8d 49 00                                                               .I.
004772eb                                   90 90 90 90 90                                                             .....

004772f0  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>* this)

004772f0  {
004772f8      if (this->m_numElements != 0)
004772f8      {
004772fa          void* edi;
004772fa          void* var_8_1 = edi;
004772fa          
00477370          do
00477370          {
00477306              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0047730c              int32_t* m_firstInterestingBucket_2;
0047730c              
0047730c              if (this->m_firstInterestingBucket == ecx_1)
0047730c              {
00477322              label_477322:
00477322                  m_firstInterestingBucket_2 = nullptr;
00477324                  edi = nullptr;
0047730c              }
0047730c              else
0047730c              {
00477310                  while (true)
00477310                  {
00477310                      class HashTableData<unsigned long,DialogInfo>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00477310                      
00477316                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00477316                      {
00477328                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0047732b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
0047732d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0047732d                          break;
00477316                      }
00477316                      
0047731d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0047731d                      
00477320                      if (&m_firstInterestingBucket[1] == ecx_1)
00477320                          goto label_477322;
00477310                  }
0047730c              }
0047730c              
0047732f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0047732f              
00477333              if (eax_3 == edi)
00477345                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00477333              else
00477333              {
0047733c                  void* ecx_2;
0047733c                  
0047733c                  do
0047733c                  {
00477335                      ecx_2 = eax_3;
00477337                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0047733c                  } while (eax_3 != edi);
0047733c                  
00477340                  if (ecx_2 != 0)
0047734c                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00477340                  else
00477345                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00477333              }
00477333              
00477355              this->m_numElements -= 1;
00477355              
00477358              if (edi != 0)
00477358              {
0047735d                  PropertyCollection::~PropertyCollection(((char*)edi + 8));
00477363                  operator delete(edi);
00477358              }
00477370          } while (this->m_numElements != 0);
004772f8      }
004772f0  }

004772fd                                                                                         8d 49 00                               .I.
00477375                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00477380  uint8_t __thiscall HashTable<unsigned long,List<DialogInfo>,0>::erase(class HashTable<unsigned long,List<DialogInfo>,0>* this, uint32_t const* arg2)

00477380  {
00477389      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_intrusiveTable.vtable, arg2);
00477389      
00477392      if (eax == 0)
00477392      {
004773b1          eax = 0;
004773b4          return 0;
00477392      }
00477392      
00477394      eax->dllist_next = &List<struct DialogInfo>::`vftable';
0047739d      List<DialogInfo>::flush(&eax->dllist_next);
004773a3      operator delete(eax);
004773ab      int32_t eax_1;
004773ab      eax_1 = 1;
004773ae      return 1;
00477380  }

004773b7                                                                       90 90 90 90 90 90 90 90 90                         .........

004773c0  void DialogFactory::DialogDone(struct DialogInfo* arg1)

004773c0  {
004773c1      struct DialogInfo* esi = arg1;
004773c5      uint32_t context = esi->context;
004773c5      
004773e6      for (int32_t* i = DialogFactory::s_hashCallbacks.m_intrusiveTable.m_buckets[(COMBINE(0, context) % DialogFactory::s_hashCallbacks.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
004773e6      {
004773ea          if (*(uint32_t*)i == context)
004773ea          {
004773f7              if (i != 0)
004773f7              {
004773ff                  class List<NoticeHandler *>** eax_2 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&DialogFactory::s_hashCallbacks, &esi->context);
0047740e                  *(uint32_t*)eax_2(&esi->pointer->m_cData);
00477419                  struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_3 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&DialogFactory::s_hashCallbacks.m_intrusiveTable, &esi->context);
00477419                  
00477420                  if (eax_3 != 0)
00477423                      operator delete(eax_3);
004773f7              }
004773f7              
004773f7              break;
004773ea          }
004773e6      }
004773e6      
00477438      ECM_UI::SendNotice_CloseDialog(esi->context, &esi->pointer->m_cData);
0047743d      class Dialog* pointer = esi->pointer;
00477445      arg1 = pointer;
00477445      
00477449      if (pointer != 0)
00477449      {
0047744b          esi->parent->vtable->RemoveRootElement(&arg1);
00477458          esi->pointer->vtable->SetContext(0);
00477449      }
004773c0  }

00477468                          90 90 90 90 90 90 90 90                                                          ........

00477470  void* __thiscall HashTable<unsigned long,List<DialogInfo>,0>::`scalar deleting destructor'(class HashTable<unsigned long,List<DialogInfo>,0>* this, uint32_t arg2)

00477470  {
00477479      this->vtable = &HashTable<unsigned long,class List<struct DialogInfo>,0>::`vftable';
0047747f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>::delete_contents(&this->m_intrusiveTable);
00477484      class HashTableData<unsigned long,List<DialogInfo> >** m_buckets = this->m_intrusiveTable.m_buckets;
00477474      this->m_intrusiveTable.vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class List<struct DialogInfo> >*,0>::`vftable';
00477474      
00477492      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00477495          operator delete[](m_buckets);
00477495      
00477474      this->m_intrusiveTable.m_buckets = nullptr;
00477474      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00477474      this->m_intrusiveTable.m_numBuckets = 0;
00477474      this->m_intrusiveTable.m_numElements = 0;
00477474      
004774b0      if ((arg2 & 1) != 0)
004774b3          operator delete(this);
004774b3      
004774bf      return this;
00477470  }

004774c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004774d0  void* __thiscall HashTable<unsigned long,DialogInfo,0>::`scalar deleting destructor'(class HashTable<unsigned long,DialogInfo,0>* this, uint32_t arg2)

004774d0  {
004774d9      this->vtable = 0x79e094;
004774df      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>::delete_contents(&this->m_intrusiveTable);
004774e4      class HashTableData<unsigned long,DialogInfo>** m_buckets = this->m_intrusiveTable.m_buckets;
004774d4      this->m_intrusiveTable.vtable = 0x79e088;
004774d4      
004774f2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004774f5          operator delete[](m_buckets);
004774f5      
004774d4      this->m_intrusiveTable.m_buckets = nullptr;
004774d4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004774d4      this->m_intrusiveTable.m_numBuckets = 0;
004774d4      this->m_intrusiveTable.m_numElements = 0;
004774d4      
00477510      if ((arg2 & 1) != 0)
00477513          operator delete(this);
00477513      
0047751f      return this;
004774d0  }

00477522        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00477530  void* __thiscall HashTable<unsigned long,void (__cdecl*)(PropertyCollection const &),0>::`scalar deleting destructor'(class HashTable<unsigned long,void (__cdecl*)(PropertyCollection const &),0>* this, uint32_t arg2)

00477530  {
00477539      this->vtable = &HashTable<unsigned long,void (__cdecl*)(class PropertyCollection const&),0>::`vftable';
0047753f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00477544      class HashTableData<unsigned long,void (__cdecl*)(PropertyCollection const &)>** m_buckets = this->m_intrusiveTable.m_buckets;
00477534      this->m_intrusiveTable.vtable = 0x79e08c;
00477534      
00477552      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00477555          operator delete[](m_buckets);
00477555      
00477534      this->m_intrusiveTable.m_buckets = nullptr;
00477534      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00477534      this->m_intrusiveTable.m_numBuckets = 0;
00477534      this->m_intrusiveTable.m_numElements = 0;
00477534      
00477570      if ((arg2 & 1) != 0)
00477573          operator delete(this);
00477573      
0047757f      return this;
00477530  }

00477582        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00477590  void DialogFactory::UpdatePendingDialogDisplay_()

00477590  {
004775a2      void __return;
004775a2      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&DialogFactory::s_hashCurInfos.m_intrusiveTable, &__return);
004775a7      class HashTableData<unsigned long,DBOCache *>* i_2 = eax->m_currElement;
004775ac      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
004775ae      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
004775ae      
004775b5      if (i_2 != 0)
004775b5      {
004775c9          while (true)
004775c9          {
004775c9              int32_t var_84 = 0x79c058;
004775d1              int32_t var_80_1 = 0x797700;
004775d9              void var_7c;
004775d9              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&var_7c, 0);
004775e3              int32_t var_80_2 = 0x797700;
004775eb              PropertyCollection::operator=(&var_84, &i_2->m_data);
004775f0              class Dialog* ecx_2 = *(int32_t*)((char*)i_2 + 0x80);
004775f5              class Dialog* var_c_1 = ecx_2;
004775ff              int32_t var_8_1 = *(int32_t*)((char*)i_2 + 0x84);
0047760c              int32_t var_4_1 = *(int32_t*)((char*)i_2 + 0x88);
0047760c              
00477613              if (ecx_2 != 0)
00477613              {
00477615                  uint32_t m_hashKey = i_2->m_hashKey;
00477615                  
0047762d                  for (int32_t* i = DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_buckets[(COMBINE(0, m_hashKey) % DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0047762d                  {
00477632                      if (*(uint32_t*)i == m_hashKey)
00477632                      {
00477646                          if ((i != 0 && i != 0xfffffff8))
0047764c                              Dialog::UpdatePendingDialogDisplay(ecx_2, i[5]);
0047764c                          
00477646                          break;
00477632                      }
0047762d                  }
00477613              }
00477613              
00477655              PropertyCollection::~PropertyCollection(&var_84);
0047765a              i_2 = i_2->m_hashNext;
0047765a              
0047765f              if (i_2 == 0)
0047765f              {
0047767d                  class HashTableData<unsigned long,DBOCache *>* i_1;
0047767d                  
0047767d                  do
0047767d                  {
00477672                      m_currBucket = &m_currBucket[1];
00477672                      
00477677                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00477692                          return;
00477692                      
00477679                      i_1 = *(uint32_t*)m_currBucket;
0047767d                  } while (i_1 == 0);
0047767d                  
0047767f                  i_2 = i_1;
0047767f                  
00477683                  if (i_2 == 0)
00477683                      break;
0047765f              }
004775c9          }
004775b5      }
00477590  }

00477693                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004776a0  void __thiscall HashTableData<unsigned long,DialogInfo>::HashTableData<unsigned long,DialogInfo>(class HashTableData<unsigned long,DialogInfo>* this, uint32_t const* arg2, struct DialogInfo const* arg3)

004776a0  {
004776a7      uint32_t* this_1 = this;
004776ab      *(uint32_t*)this_1 = *(uint32_t*)arg2;
004776b0      this_1[1] = 0;
004776ad      this_1[2] = 0x79c058;
004776ad      this_1[3] = 0x797700;
004776c9      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&this_1[4], 0);
004776ad      this_1[3] = 0x797700;
004776dc      PropertyCollection::operator=(&this_1[2], arg3);
004776ad      this_1[0x20] = arg3->pointer;
004776ad      this_1[0x21] = arg3->parent;
004776ad      this_1[0x22] = arg3->context;
004776a0  }

00477701     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00477710  void __thiscall ListNode<DialogInfo>::ListNode<DialogInfo>(class ListNode<DialogInfo>* this, struct DialogInfo const* arg2)

00477710  {
00477714      this->data.data.vtable = 0x79c058;
0047771f      this->data.data.m_hashProperties.vtable = 0x797700;
00477726      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&this->data.data.m_hashProperties.m_intrusiveTable, 0);
00477732      this->data.data.m_hashProperties.vtable = 0x797700;
00477739      PropertyCollection::operator=(this, arg2);
00477741      this->data.pointer = arg2->pointer;
00477747      this->data.parent = arg2->parent;
00477751      this->data.context = arg2->context;
00477757      this->next = nullptr;
00477761      this->prev = nullptr;
00477710  }

00477771                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00477780  uint8_t __thiscall List<DialogInfo>::insert(class List<DialogInfo>* this, class ListNode<DialogInfo>* arg2, struct DialogInfo const* arg3)

00477780  {
00477788      void* eax = operator new(0x8c);
00477788      
00477792      if (eax != 0)
00477792      {
0047779b          eax = ListNode<DialogInfo>::ListNode<DialogInfo>(eax, arg3);
0047779b          
004777a2          if (eax != 0)
004777a2          {
004777af              if (this->_head == 0)
004777af              {
004777b1                  this->_head = eax;
004777b4                  this->_tail = eax;
004777b7                  this->_num_elements += 1;
004777ba                  eax = 1;
004777bd                  return 1;
004777af              }
004777af              
004777c4              *(uint32_t*)((char*)eax + 0x84) = arg2;
004777d0              *(uint32_t*)((char*)eax + 0x88) = arg2->prev;
004777d6              class ListNode<DialogInfo>* prev = arg2->prev;
004777d6              
004777de              if (prev == 0)
004777de              {
004777f5                  this->_head = eax;
004777f8                  arg2->prev = eax;
004777fe                  this->_num_elements += 1;
00477801                  eax = 1;
00477804                  return 1;
004777de              }
004777de              
004777e0              prev->next = eax;
004777e6              arg2->prev = eax;
004777ec              this->_num_elements += 1;
004777ef              eax = 1;
004777f2              return 1;
004777a2          }
00477792      }
00477792      
004777a4      eax = 0;
004777a7      return 0;
00477780  }

00477807                       90 90 90 90 90 90 90 90 90                                                         .........

00477810  uint8_t __thiscall HashTable<unsigned long,DialogInfo,0>::add(class HashTable<unsigned long,DialogInfo,0>* this, uint32_t const* arg2, struct DialogInfo const* arg3)

00477810  {
00477819      void* eax = operator new(0x8c);
00477823      void* esi;
00477823      
00477823      if (eax == 0)
0047783a          esi = nullptr;
00477823      else
00477836          esi = HashTableData<unsigned long,DialogInfo>::HashTableData<unsigned long,DialogInfo>(eax, arg2, arg3);
00477836      
00477847      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
00477869          return 1;
00477869      
0047784b      if (esi != 0)
0047784b      {
00477850          PropertyCollection::~PropertyCollection(((char*)esi + 8));
00477856          operator delete(esi);
0047784b      }
0047784b      
00477862      return 0;
00477810  }

0047786c                                      90 90 90 90                                                              ....

00477870  uint8_t __thiscall List<DialogInfo>::push_back(class List<DialogInfo>* this, struct DialogInfo const* arg2)

00477870  {
00477878      void* eax = operator new(0x8c);
00477878      
00477882      if (eax != 0)
00477882      {
0047788b          eax = ListNode<DialogInfo>::ListNode<DialogInfo>(eax, arg2);
0047788b          
00477892          if (eax != 0)
00477892          {
0047789f              if (this->_head == 0)
0047789f              {
004778a1                  this->_head = eax;
004778a4                  this->_tail = eax;
004778a7                  this->_num_elements += 1;
004778aa                  eax = 1;
004778ad                  return 1;
0047789f              }
0047789f              
004778b0              class ListNode<DialogInfo>* _tail = this->_tail;
004778b3              _tail->next = eax;
004778b9              *(uint32_t*)((char*)eax + 0x88) = _tail;
004778bf              this->_tail = eax;
004778c2              this->_num_elements += 1;
004778c5              eax = 1;
004778c8              return 1;
00477892          }
00477882      }
00477882      
00477894      eax = 0;
00477897      return 0;
00477870  }

004778cb                                   90 90 90 90 90                                                             .....

004778d0  class List<DialogInfo>* __thiscall List<DialogInfo>::operator=(class List<DialogInfo>* arg1, void* arg2)

004778d0  {
004778da      if (arg1 != arg2)
004778da      {
004778dc          List<DialogInfo>::flush(arg1);
004778dc          
004778e6          for (struct DialogInfo* i = *(uint32_t*)((char*)arg2 + 4); i != 0; i = *(int32_t*)((char*)i + 0x84))
004778e6          {
004778f5              void* eax_1 = operator new(0x8c);
004778f5              
004778ff              if (eax_1 != 0)
004778ff              {
00477904                  class ListNode<DialogInfo>* eax_2 = ListNode<DialogInfo>::ListNode<DialogInfo>(eax_1, i);
00477904                  
0047790b                  if (eax_2 != 0)
0047790b                  {
00477912                      if (arg1->_head != 0)
00477912                      {
00477919                          class ListNode<DialogInfo>* _tail = arg1->_tail;
0047791c                          _tail->next = eax_2;
00477922                          eax_2->prev = _tail;
00477912                      }
00477912                      else
00477914                          arg1->_head = eax_2;
00477914                      
00477928                      arg1->_tail = eax_2;
0047792b                      arg1->_num_elements += 1;
0047790b                  }
004778ff              }
004778ff              
00477930              if (i == 0)
00477930                  break;
004778e6          }
004778da      }
004778da      
00477940      return arg1;
004778d0  }

004778ea                                8d 9b 00 00 00 00                                                            ......
00477943           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00477950  void DialogFactory::Reset()

00477950  {
0047795e      for (class ListNode<DialogInfo>* i = DialogFactory::s_listNonQueuedInfos._head; i != 0; i = i->next)
0047795e      {
00477961          DialogFactory::DialogDone(i);
00477961          
0047796b          if (i == 0)
0047796b              break;
0047795e      }
0047795e      
0047797c      List<DialogInfo>::flush(&DialogFactory::s_listNonQueuedInfos);
0047798c      void* ecx_1 = &DialogFactory::s_hashCurInfos.m_intrusiveTable.m_buckets[DialogFactory::s_hashCurInfos.m_intrusiveTable.m_numBuckets];
0047798f      class HashTableData<unsigned long,DialogInfo>** m_firstInterestingBucket = DialogFactory::s_hashCurInfos.m_intrusiveTable.m_firstInterestingBucket;
00477996      class HashTableData<unsigned long,DialogInfo>* m_hashNext;
00477996      
00477996      if (m_firstInterestingBucket == ecx_1)
00477996      {
004779a9      label_4779a9:
004779a9          m_firstInterestingBucket = nullptr;
004779ab          m_hashNext = nullptr;
00477996      }
00477996      else
00477996      {
0047799b          while (*(uint32_t*)m_firstInterestingBucket == 0)
0047799b          {
0047799d              m_firstInterestingBucket = &m_firstInterestingBucket[1];
004779a2              DialogFactory::s_hashCurInfos.m_intrusiveTable.m_firstInterestingBucket = m_firstInterestingBucket;
004779a2              
004779a7              if (m_firstInterestingBucket == ecx_1)
004779a7                  goto label_4779a9;
0047799b          }
0047799b          
004779af          m_hashNext = *(uint32_t*)m_firstInterestingBucket;
00477996      }
00477996      
004779b3      class HashTableData<unsigned long,DialogInfo>** m_firstInterestingBucket_3 = m_firstInterestingBucket;
004779b3      
004779b5      if (m_hashNext != 0)
004779b5      {
004779bb          while (true)
004779bb          {
004779bb              DialogFactory::DialogDone(&m_hashNext->m_data);
004779c0              m_hashNext = m_hashNext->m_hashNext;
004779c0              
004779c8              if (m_hashNext == 0)
004779c8              {
004779e3                  class HashTableData<unsigned long,DialogInfo>* i_1;
004779e3                  
004779e3                  do
004779e3                  {
004779d8                      m_firstInterestingBucket_3 = &m_firstInterestingBucket_3[1];
004779d8                      
004779dd                      if (m_firstInterestingBucket_3 == &DialogFactory::s_hashCurInfos.m_intrusiveTable.m_buckets[DialogFactory::s_hashCurInfos.m_intrusiveTable.m_numBuckets])
004779dd                          goto label_4779f0;
004779dd                      
004779df                      i_1 = *(uint32_t*)m_firstInterestingBucket_3;
004779e3                  } while (i_1 == 0);
004779e3                  
004779e5                  m_hashNext = i_1;
004779e5                  
004779e9                  if (m_hashNext == 0)
004779e9                      break;
004779c8              }
004779bb          }
004779b5      }
004779b5      
004779f0  label_4779f0:
004779f0      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DialogInfo> *,0>::delete_contents(&DialogFactory::s_hashCurInfos.m_intrusiveTable);
00477a00      void* ecx_3 = &DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_buckets[DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_numBuckets];
00477a03      class HashTableData<unsigned long,List<DialogInfo> >** m_firstInterestingBucket_1 = DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_firstInterestingBucket;
00477a0a      class HashTableData<unsigned long,List<DialogInfo> >* m_hashNext_1;
00477a0a      
00477a0a      if (m_firstInterestingBucket_1 == ecx_3)
00477a0a      {
00477a21      label_477a21:
00477a21          m_firstInterestingBucket_1 = nullptr;
00477a23          m_hashNext_1 = nullptr;
00477a0a      }
00477a0a      else
00477a0a      {
00477a13          while (*(uint32_t*)m_firstInterestingBucket_1 == 0)
00477a13          {
00477a15              m_firstInterestingBucket_1 = &m_firstInterestingBucket_1[1];
00477a1a              DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_firstInterestingBucket = m_firstInterestingBucket_1;
00477a1a              
00477a1f              if (m_firstInterestingBucket_1 == ecx_3)
00477a1f                  goto label_477a21;
00477a13          }
00477a13          
00477a27          m_hashNext_1 = *(uint32_t*)m_firstInterestingBucket_1;
00477a0a      }
00477a0a      
00477a2b      class HashTableData<unsigned long,List<DialogInfo> >** m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00477a2b      
00477a2d      if (m_hashNext_1 != 0)
00477a2d      {
00477a4a          while (true)
00477a4a          {
00477a4a              struct List<DialogInfo>::VTable* const var_10 = &List<struct DialogInfo>::`vftable';
00477a4e              struct DialogInfo* i_4 = nullptr;
00477a52              int32_t var_8_1 = 0;
00477a56              int32_t var_4_1 = 0;
00477a5a              List<DialogInfo>::operator=(&var_10, &m_hashNext_1->m_data);
00477a5a              
00477a65              for (struct DialogInfo* i_2 = i_4; i_2 != 0; i_2 = *(int32_t*)((char*)i_2 + 0x84))
00477a65              {
00477a68                  DialogFactory::DialogDone(i_2);
00477a68                  
00477a72                  if (i_2 == 0)
00477a72                      break;
00477a65              }
00477a65              
00477a82              var_10 = &List<struct DialogInfo>::`vftable';
00477a86              List<DialogInfo>::flush(&var_10);
00477a8b              m_hashNext_1 = m_hashNext_1->m_hashNext;
00477a8b              
00477a90              if (m_hashNext_1 == 0)
00477a90              {
00477aab                  class HashTableData<unsigned long,List<DialogInfo> >* i_3;
00477aab                  
00477aab                  do
00477aab                  {
00477aa0                      m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
00477aa0                      
00477aa5                      if (m_firstInterestingBucket_2 == &DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_buckets[DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_numBuckets])
00477aa5                          goto label_477ab9;
00477aa5                      
00477aa7                      i_3 = *(uint32_t*)m_firstInterestingBucket_2;
00477aab                  } while (i_3 == 0);
00477aab                  
00477aad                  m_hashNext_1 = i_3;
00477aad                  
00477ab1                  if (m_hashNext_1 == 0)
00477ab1                      break;
00477a90              }
00477a4a          }
00477a2d      }
00477a2d      
00477ab9  label_477ab9:
00477ab9      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<DialogInfo> > *,0>::delete_contents(&DialogFactory::s_hashDialogQueues.m_intrusiveTable);
00477ac3      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&DialogFactory::s_hashCallbacks.m_intrusiveTable);
00477950  }

00477acf                                               90                                                                 .

00477ad0  void DialogFactory::CreateDialog_(struct DialogInfo const* arg1, uint32_t arg2)

00477ad0  {
00477ad0      uint32_t eax_19 = arg2;
00477ad0      
00477adf      if (eax_19 != 0)
00477adf      {
00477ae9          class ListNode<DialogInfo>* _tail;
00477ae9          
00477ae9          if (eax_19 != 1)
00477ae9          {
00477b36              _tail = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&DialogFactory::s_hashCurInfos, &arg2);
00477b36              
00477b3a              if (_tail == 0)
00477b3a              {
00477b43                  void var_84;
00477b43                  PropertyCollection::PropertyCollection(&var_84);
00477b5d                  int32_t var_c_1 = 0;
00477b64                  int32_t var_8_1 = 0;
00477b6b                  int32_t var_4_1 = 0;
00477b72                  HashTable<unsigned long,DialogInfo,0>::add(&DialogFactory::s_hashCurInfos, &arg2, &var_84);
00477b89                  _tail = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&DialogFactory::s_hashCurInfos, &arg2);
00477b92                  PropertyCollection::~PropertyCollection(&var_84);
00477b3a              }
00477ae9          }
00477ae9          else
00477ae9          {
00477aef              void var_108;
00477aef              PropertyCollection::PropertyCollection(&var_108);
00477afe              int32_t var_90_1 = 0;
00477b05              int32_t var_8c_1 = 0;
00477b0c              int32_t var_88_1 = 0;
00477b13              List<DialogInfo>::push_back(&DialogFactory::s_listNonQueuedInfos, &var_108);
00477b18              _tail = DialogFactory::s_listNonQueuedInfos._tail;
00477b92              PropertyCollection::~PropertyCollection(&var_108);
00477ae9          }
00477ae9          
00477b9a          if (_tail->data.pointer == 0)
00477b9a          {
00477bab              PropertyCollection::operator=(_tail, arg1);
00477bb3              _tail->data.pointer = arg1->pointer;
00477bb9              _tail->data.parent = arg1->parent;
00477bc2              _tail->data.context = arg1->context;
00477bc8              int32_t var_10c = 0;
00477bcc              int32_t var_114 = 0;
00477bd0              int32_t* var_110_1 = nullptr;
00477bd0              
00477be9              for (int32_t* i = _tail->data.data.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0x8e) % _tail->data.data.m_hashProperties.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00477be9              {
00477bf6                  if (*(uint32_t*)i == 0x8e)
00477bf6                  {
00477c03                      if (i != 0)
00477c03                      {
00477c0d                          BaseProperty::operator=(&var_114, &i[2]);
00477c0d                          
00477c18                          if (var_110_1 != 0)
00477c21                              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xa8)(&var_10c);
00477c03                      }
00477c03                      
00477c03                      break;
00477bf6                  }
00477be9              }
00477be9              
00477c2f              if ((var_10c - 1) <= 6)
00477c2f              {
00477c35                  int32_t __saved_edi_7;
00477c35                  int32_t* eax_9;
00477c35                  
00477c35                  switch (var_10c)
00477c35                  {
00477c45                      case 1:
00477c45                      {
00477c45                          eax_9 = _tail->data.parent->vtable->CreateAndAddRootElement(2, 0x15);
00477c48                          __saved_edi_7 = 0x13;
00477c45                          break;
00477c45                      }
00477c55                      case 2:
00477c55                      {
00477c55                          eax_9 = _tail->data.parent->vtable->CreateAndAddRootElement(2, 0x31);
00477c58                          __saved_edi_7 = 0x19;
00477c55                          break;
00477c55                      }
00477c65                      case 3:
00477c65                      {
00477c65                          eax_9 = _tail->data.parent->vtable->CreateAndAddRootElement(2, 0x24);
00477c68                          __saved_edi_7 = 0x17;
00477c65                          break;
00477c65                      }
00477c95                      case 4:
00477c95                      {
00477c95                          eax_9 = _tail->data.parent->vtable->CreateAndAddRootElement(2, 0x28);
00477c98                          __saved_edi_7 = 0x18;
00477c95                          break;
00477c95                      }
00477ca5                      case 5:
00477ca5                      {
00477ca5                          eax_9 = _tail->data.parent->vtable->CreateAndAddRootElement(2, 0x2c);
00477ca8                          __saved_edi_7 = 0x15;
00477ca5                          break;
00477ca5                      }
00477c75                      case 6:
00477c75                      {
00477c75                          eax_9 = _tail->data.parent->vtable->CreateAndAddRootElement(2, 0x1b);
00477c78                          __saved_edi_7 = 0x16;
00477c75                          break;
00477c75                      }
00477c85                      case 7:
00477c85                      {
00477c85                          eax_9 = _tail->data.parent->vtable->CreateAndAddRootElement(2, 0x1f);
00477c88                          __saved_edi_7 = 0x14;
00477c85                          break;
00477c85                      }
00477c35                  }
00477c35                  
00477cb4                  _tail->data.pointer = *(uint32_t*)(*(uint32_t*)eax_9 + 0x94)(__saved_edi_7);
00477c2f              }
00477c2f              
00477cb7              class Dialog* pointer = _tail->data.pointer;
00477cb7              
00477cbc              if (pointer != 0)
00477cbc              {
00477cc4                  pointer->vtable->SetContext(_tail->data.context);
00477ccd                  _tail->data.pointer->vtable->SetData(_tail);
00477cdc                  UIRegion::BringToFront(_tail->data.pointer);
00477ce1                  DialogFactory::UpdatePendingDialogDisplay_();
00477ced                  ECM_UI::SendNotice_OpenDialog(_tail->data.context);
00477cbc              }
00477cbc              
00477cf9              BaseProperty::~BaseProperty(&var_114);
00477b9a          }
00477adf      }
00477ad0  }

00477bed                                         8d 49 00                                                               .I.
00477d07                       90                                                                                 .
00477d08  uint32_t jump_table_477d08[0x7] = 
00477d08  {
00477d08      [0x0] =  0x00477c3c
00477d0c      [0x1] =  0x00477c4c
00477d10      [0x2] =  0x00477c5c
00477d14      [0x3] =  0x00477c8c
00477d18      [0x4] =  0x00477c9c
00477d1c      [0x5] =  0x00477c6c
00477d20      [0x6] =  0x00477c7c
00477d24  }

00477d24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00477d30  void DialogFactory::OpenNextDialog(uint32_t arg1)

00477d30  {
00477d37      uint32_t i = arg1;
00477d37      
00477d41      if (i != 1)
00477d41      {
00477d59          int32_t* eax_4 = DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_buckets[(COMBINE(0, i) % DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_numBuckets)];
00477d59          
00477d5d          if (eax_4 != 0)
00477d5d          {
00477d65              while (*(uint32_t*)eax_4 != i)
00477d65              {
00477d67                  eax_4 = eax_4[1];
00477d67                  
00477d6c                  if (eax_4 == 0)
00477d75                      return;
00477d65              }
00477d65              
00477d84              if ((eax_4 != 0 && eax_4 != 0xfffffff8))
00477d84              {
00477d8a                  void var_84;
00477d8a                  PropertyCollection::PropertyCollection(&var_84);
00477da1                  int32_t var_8_1 = 0;
00477dac                  int32_t var_4_1 = 0;
00477dac                  
00477dc9                  if ((List<DialogInfo>::pop_front(&eax_4[2], &var_84) != 0 && 0 == 0))
00477dc9                  {
00477dd1                      DialogFactory::CreateDialog_(&var_84, i);
00477dd1                      
00477dde                      if (eax_4[3] == 0)
00477ded                          HashTable<unsigned long,List<DialogInfo>,0>::erase(&DialogFactory::s_hashDialogQueues, &arg1);
00477dc9                  }
00477dc9                  
00477df6                  PropertyCollection::~PropertyCollection(&var_84);
00477d84              }
00477d5d          }
00477d41      }
00477d30  }

00477e04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00477e10  uint8_t __thiscall HashTable<unsigned long,List<DialogInfo>,0>::add(class HashTable<unsigned long,List<DialogInfo>,0>* this, uint32_t const* arg2, class List<DialogInfo> const* arg3)

00477e10  {
00477e1c      void* esi = operator new(0x18);
00477e1c      
00477e25      if (esi == 0)
00477e50          esi = nullptr;
00477e25      else
00477e25      {
00477e31          *(uint32_t*)esi = *(uint32_t*)arg2;
00477e36          *(uint32_t*)((char*)esi + 4) = 0;
00477e3a          *(uint32_t*)((char*)esi + 8) = &List<struct DialogInfo>::`vftable';
00477e40          *(uint32_t*)((char*)esi + 0xc) = 0;
00477e43          *(uint32_t*)((char*)esi + 0x10) = 0;
00477e46          *(uint32_t*)((char*)esi + 0x14) = 0;
00477e49          List<DialogInfo>::operator=(((char*)esi + 8), arg3);
00477e25      }
00477e25      
00477e5d      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
00477e87          return 1;
00477e87      
00477e61      if (esi != 0)
00477e61      {
00477e66          *(uint32_t*)((char*)esi + 8) = &List<struct DialogInfo>::`vftable';
00477e6c          List<DialogInfo>::flush(((char*)esi + 8));
00477e72          operator delete(esi);
00477e61      }
00477e61      
00477e7f      return 0;
00477e10  }

00477e8a                                90 90 90 90 90 90                                                            ......

00477e90  uint32_t DialogFactory::MakeDialog(class UIFramework* arg1, class PropertyCollection const* arg2)

00477e90  {
00477ea3      DialogFactory::s_globalContext += 1;
00477ea9      void var_108;
00477ea9      PropertyCollection::PropertyCollection(&var_108);
00477ebc      int32_t var_90 = 0;
00477ec3      int32_t var_8c = 0;
00477eca      int32_t var_88 = 0;
00477ed1      PropertyCollection::operator=(&var_108, arg2);
00477edd      class UIFramework* var_8c_1 = arg1;
00477eeb      uint32_t temp1 = (COMBINE(0, 0x8d) % arg2->m_hashProperties.m_intrusiveTable.m_numBuckets);
00477eee      class HashTableData<unsigned long,BaseProperty>** m_buckets = arg2->m_hashProperties.m_intrusiveTable.m_buckets;
00477ef7      int32_t var_90_1 = 0;
00477efe      uint32_t DialogFactory::s_globalContext_1 = DialogFactory::s_globalContext;
00477f05      char var_129 = 0;
00477f09      int32_t* var_124 = nullptr;
00477f0d      int32_t* var_120 = nullptr;
00477f0d      
00477f18      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
00477f18      {
00477f26          if (*(uint32_t*)i == 0x8d)
00477f26          {
00477f33              if (i != 0)
00477f33              {
00477f3d                  BaseProperty::operator=(&var_124, &i[2]);
00477f3d                  
00477f48                  if (var_120 != 0)
00477f51                      *(uint32_t*)(*(uint32_t*)var_120 + 0x70)(&var_129);
00477f33              }
00477f33              
00477f33              break;
00477f26          }
00477f18      }
00477f18      
00477f5b      uint32_t temp1_1 = (COMBINE(0, 0xc3) % arg2->m_hashProperties.m_intrusiveTable.m_numBuckets);
00477f5e      class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = arg2->m_hashProperties.m_intrusiveTable.m_buckets;
00477f61      uint32_t i_2 = 2;
00477f6c      int32_t* eax_6 = m_buckets_1[temp1_1];
00477f6c      
00477f70      if (eax_6 == 0)
00477f70      {
00477f88      label_477f88:
00477f88          void var_84;
00477f88          PropertyCollection::PropertyCollection(&var_84);
00477f9f          int32_t var_c_1 = 0;
00477fa6          int32_t* var_8_1 = nullptr;
00477fad          int32_t var_4_1 = 0;
00477fb4          HashTable<unsigned long,DialogInfo,0>::find(&DialogFactory::s_hashCurInfos, &i_2, &var_84);
00477fb9          uint32_t i_1 = i_2;
00477fcf          int32_t* eax_10 = DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_buckets[(COMBINE(0, i_1) % DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_numBuckets)];
00477fd3          void* esi_3;
00477fd3          
00477fd3          if (eax_10 == 0)
00477fd3          {
00478046          label_478046:
00478046              struct List<DialogInfo>::VTable* const var_118 = &List<struct DialogInfo>::`vftable';
0047804a              int32_t var_114_1 = 0;
0047804e              int32_t var_110_1 = 0;
00478052              int32_t var_10c_1 = 0;
00478056              HashTable<unsigned long,List<DialogInfo>,0>::add(&DialogFactory::s_hashDialogQueues, &i_2, &var_118);
0047805f              var_118 = &List<struct DialogInfo>::`vftable';
00478063              List<DialogInfo>::flush(&var_118);
00478072              class List<NoticeHandler *>** eax_12 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&DialogFactory::s_hashDialogQueues, &i_2);
00478077              i_1 = i_2;
0047807b              esi_3 = eax_12;
00477fd3          }
00477fd3          else
00477fd3          {
00477fd7              while (*(uint32_t*)eax_10 != i_1)
00477fd7              {
00477fd9                  eax_10 = eax_10[1];
00477fd9                  
00477fde                  if (eax_10 == 0)
00477fde                      goto label_478046;
00477fd7              }
00477fd7              
00478029              if (eax_10 == 0)
00478029                  goto label_478046;
00478029              
0047802b              esi_3 = &eax_10[2];
0047802b              
00478030              if (esi_3 == 0)
00478030                  goto label_478046;
00477fd3          }
00477fd3          
00478086          if (var_c_1 == 0)
0047808e              DialogFactory::CreateDialog_(&var_108, i_1);
00478086          else if (var_129 == 0)
0047809c          {
004780e1              List<DialogInfo>::push_back(esi_3, &var_108);
004780e6              DialogFactory::UpdatePendingDialogDisplay_();
0047809c          }
0047809c          else
0047809c          {
004780a5              int32_t var_11c = var_c_1;
004780b0              *(uint32_t*)(*(uint32_t*)var_8_1 + 0x20)(&var_11c);
004780c1              List<DialogInfo>::insert(esi_3, *(uint32_t*)((char*)esi_3 + 4), &var_84);
004780d0              DialogFactory::CreateDialog_(&var_108, i_2);
0047809c          }
0047809c          
004780f2          PropertyCollection::~PropertyCollection(&var_84);
00477f70      }
00477f70      else
00477f70      {
00477f78          while (*(uint32_t*)eax_6 != 0xc3)
00477f78          {
00477f7a              eax_6 = eax_6[1];
00477f7a              
00477f7f              if (eax_6 == 0)
00477f7f                  goto label_477f88;
00477f78          }
00477f78          
00477fe4          if (eax_6 == 0)
00477fe4              goto label_477f88;
00477fe4          
00477fee          BaseProperty::operator=(&var_124, &eax_6[2]);
00477fee          
00477ff9          if (var_120 != 0)
00478002              *(uint32_t*)(*(uint32_t*)var_120 + 0xa8)(&i_2);
00478002          
0047800d          if (i_2 != 1)
0047800d              goto label_477f88;
0047800d          
0047801a          DialogFactory::CreateDialog_(&var_108, 1);
00477f70      }
00477f70      
004780f7      int32_t* eax_15 = var_124;
004780fd      uint32_t DialogFactory::s_globalContext_2 = DialogFactory::s_globalContext;
004780fd      
00478103      if (eax_15 != 0)
00478103      {
0047810d          int32_t edx_11 = (eax_15[1] - 1);
0047810a          eax_15[1] = edx_11;
0047810a          
00478112          if (edx_11 == 0)
00478118              **(uint32_t**)eax_15(1);
00478118          
0047811a          var_124 = nullptr;
00478103      }
00478103      
00478124      if (var_120 != 0)
00478124      {
0047812e          int32_t edx_13 = (var_120[1] - 1);
0047812b          var_120[1] = edx_13;
0047812b          
00478133          if (edx_13 == 0)
00478139              **(uint32_t**)var_120(1);
00478139          
0047813b          int32_t var_120_1 = 0;
00478124      }
00478124      
00478143      PropertyCollection::~PropertyCollection(&var_108);
00478152      return DialogFactory::s_globalContext_2;
00477e90  }

00478153                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00478160  void DialogFactory::CloseDialog(uint32_t const arg1)

00478160  {
00478172      if (arg1 != 0)
00478172      {
0047817a          class ListNode<DialogInfo>* i = DialogFactory::s_listNonQueuedInfos._head;
00478182          int32_t edi;
00478182          int32_t var_a4_1 = edi;
00478182          
00478183          for (; i != 0; i = i->next)
00478183          {
0047818b              if (arg1 == i->data.context)
0047818b              {
004781c7                  DialogFactory::DialogDone(i);
004781d5                  List<DialogInfo>::remove(&DialogFactory::s_listNonQueuedInfos, i);
004781e4                  return;
0047818b              }
00478183          }
00478183          
004781a2          void* ecx_2 = &DialogFactory::s_hashCurInfos.m_intrusiveTable.m_buckets[DialogFactory::s_hashCurInfos.m_intrusiveTable.m_numBuckets];
004781a5          class HashTableData<unsigned long,DialogInfo>** m_firstInterestingBucket = DialogFactory::s_hashCurInfos.m_intrusiveTable.m_firstInterestingBucket;
004781ac          class HashTableData<unsigned long,DialogInfo>* m_hashNext_1;
004781ac          
004781ac          if (m_firstInterestingBucket == ecx_2)
004781ac          {
004781c0          label_4781c0:
004781c0              m_firstInterestingBucket = nullptr;
004781c2              m_hashNext_1 = nullptr;
004781ac          }
004781ac          else
004781ac          {
004781b2              while (*(uint32_t*)m_firstInterestingBucket == 0)
004781b2              {
004781b4                  m_firstInterestingBucket = &m_firstInterestingBucket[1];
004781b9                  DialogFactory::s_hashCurInfos.m_intrusiveTable.m_firstInterestingBucket = m_firstInterestingBucket;
004781b9                  
004781be                  if (m_firstInterestingBucket == ecx_2)
004781be                      goto label_4781c0;
004781b2              }
004781b2              
004781e5              m_hashNext_1 = *(uint32_t*)m_firstInterestingBucket;
004781ac          }
004781ac          
004781e9          class HashTableData<unsigned long,DialogInfo>** m_firstInterestingBucket_3 = m_firstInterestingBucket;
004781e9          
004781eb          if (m_hashNext_1 != 0)
004781eb          {
004781f6              while (true)
004781f6              {
004781f6                  if (arg1 == m_hashNext_1->m_data.context)
004781f6                  {
00478255                      int32_t var_84 = 0x79c058;
0047825d                      int32_t var_80 = 0x797700;
00478265                      void var_7c;
00478265                      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&var_7c, 0);
0047826f                      int32_t var_80_1 = 0x797700;
00478277                      PropertyCollection::operator=(&var_84, &m_hashNext_1->m_data);
0047827f                      class Dialog* pointer = m_hashNext_1->m_data.pointer;
00478289                      class UIFramework* parent = m_hashNext_1->m_data.parent;
00478296                      uint32_t context = m_hashNext_1->m_data.context;
004782a2                      uint32_t m_hashKey = m_hashNext_1->m_hashKey;
004782a4                      class HashTableData<unsigned long,DialogInfo>** m_firstInterestingBucket_4 = m_firstInterestingBucket_3;
004782a4                      
004782a6                      if (m_hashNext_1->m_hashNext == 0)
004782a6                      {
004782c1                          do
004782c1                          {
004782b7                              m_firstInterestingBucket_4 = &m_firstInterestingBucket_4[1];
004782b7                              
004782bc                              if (m_firstInterestingBucket_4 == &DialogFactory::s_hashCurInfos.m_intrusiveTable.m_buckets[DialogFactory::s_hashCurInfos.m_intrusiveTable.m_numBuckets])
004782bc                                  break;
004782c1                          } while (*(uint32_t*)m_firstInterestingBucket_4 == 0);
004782a6                      }
004782a6                      
004782c3                      class HashTableData<unsigned long,DialogInfo>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_3;
004782c3                      
004782c7                      if (m_hashNext == m_hashNext_1)
004782e0                          *(uint32_t*)m_firstInterestingBucket_3 = m_hashNext->m_hashNext;
004782c7                      else
004782c7                      {
004782d7                          class HashTableData<unsigned long,DialogInfo>* m_hashNext_3;
004782d7                          
004782d7                          do
004782d7                          {
004782d0                              m_hashNext_3 = m_hashNext;
004782d2                              m_hashNext = m_hashNext->m_hashNext;
004782d7                          } while (m_hashNext != m_hashNext_1);
004782d7                          
004782db                          if (m_hashNext_3 != 0)
004782e7                              m_hashNext_3->m_hashNext = m_hashNext->m_hashNext;
004782db                          else
004782e0                              *(uint32_t*)m_firstInterestingBucket_3 = m_hashNext->m_hashNext;
004782c7                      }
004782c7                      
004782f2                      DialogFactory::s_hashCurInfos.m_intrusiveTable.m_numElements -= 1;
004782f7                      PropertyCollection::~PropertyCollection(&m_hashNext_1->m_data);
004782fd                      operator delete(m_hashNext_1);
00478307                      DialogFactory::DialogDone(&var_84);
0047830d                      DialogFactory::OpenNextDialog(m_hashKey);
00478319                      PropertyCollection::~PropertyCollection(&var_84);
00478328                      return;
004781f6                  }
004781f6                  
004781f8                  m_hashNext_1 = m_hashNext_1->m_hashNext;
004781f8                  
004781fd                  if (m_hashNext_1 == 0)
004781fd                  {
0047820b                      class HashTableData<unsigned long,DialogInfo>* i_1;
0047820b                      
0047820b                      do
0047820b                      {
00478200                          m_firstInterestingBucket_3 = &m_firstInterestingBucket_3[1];
00478200                          
00478205                          if (m_firstInterestingBucket_3 == ecx_2)
00478205                              goto label_47821e;
00478205                          
00478207                          i_1 = *(uint32_t*)m_firstInterestingBucket_3;
0047820b                      } while (i_1 == 0);
0047820b                      
0047820d                      m_hashNext_1 = i_1;
0047820d                      
00478211                      if (m_hashNext_1 == 0)
00478211                          break;
004781fd                  }
004781f6              }
004781eb          }
004781eb          
0047821e      label_47821e:
0047821e          void* ecx_5 = &DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_buckets[DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_numBuckets];
00478221          class HashTableData<unsigned long,List<DialogInfo> >** m_firstInterestingBucket_1 = DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_firstInterestingBucket;
00478228          class HashTableData<unsigned long,List<DialogInfo> >* m_hashNext_4;
00478228          
00478228          if (m_firstInterestingBucket_1 == ecx_5)
00478228          {
00478244          label_478244:
00478244              m_firstInterestingBucket_1 = nullptr;
00478246              m_hashNext_4 = nullptr;
00478228          }
00478228          else
00478228          {
00478232              while (*(uint32_t*)m_firstInterestingBucket_1 == 0)
00478232              {
00478238                  m_firstInterestingBucket_1 = &m_firstInterestingBucket_1[1];
0047823d                  DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_firstInterestingBucket = m_firstInterestingBucket_1;
0047823d                  
00478242                  if (m_firstInterestingBucket_1 == ecx_5)
00478242                      goto label_478244;
00478232              }
00478232              
00478329              m_hashNext_4 = *(uint32_t*)m_firstInterestingBucket_1;
00478228          }
00478228          
0047832d          class HashTableData<unsigned long,List<DialogInfo> >** m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0047832d          
0047832f          if (m_hashNext_4 != 0)
0047832f          {
00478340              struct List<DialogInfo>::VTable* const var_94;
00478340              class ListNode<DialogInfo>* next;
00478340              
00478340              while (true)
00478340              {
00478340                  class ListNode<DialogInfo>* next_1 = nullptr;
00478344                  int32_t var_8c_1 = 0;
00478348                  int32_t var_88_1 = 0;
00478354                  var_94 = &List<struct DialogInfo>::`vftable';
00478358                  List<DialogInfo>::operator=(&var_94, &m_hashNext_4->m_data);
0047835d                  next = next_1;
0047835d                  
00478363                  if (next != 0)
00478363                      break;
00478363                  
0047838d              label_47838d:
0047838d                  var_94 = &List<struct DialogInfo>::`vftable';
00478391                  List<DialogInfo>::flush(&var_94);
00478396                  class HashTableData<unsigned long,List<DialogInfo> >* m_hashNext_2 = m_hashNext_4->m_hashNext;
00478396                  
0047839b                  if (m_hashNext_2 == 0)
0047839b                  {
004783bb                      class HashTableData<unsigned long,List<DialogInfo> >* i_2;
004783bb                      
004783bb                      do
004783bb                      {
004783b0                          m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
004783b0                          
004783b5                          if (m_firstInterestingBucket_2 == &DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_buckets[DialogFactory::s_hashDialogQueues.m_intrusiveTable.m_numBuckets])
00478401                              return;
00478401                          
004783b7                          i_2 = *(uint32_t*)m_firstInterestingBucket_2;
004783bb                      } while (i_2 == 0);
004783bb                      
004783bd                      m_hashNext_2 = i_2;
004783bd                      
004783c1                      if (m_hashNext_2 == 0)
004783d1                          return;
0047839b                  }
0047839b                  
0047833e                  m_hashNext_4 = m_hashNext_2;
00478340              }
00478340              
0047837d              while (arg1 != next->data.context)
0047837d              {
0047837f                  next = next->next;
0047837f                  
00478387                  if (next == 0)
00478387                      goto label_47838d;
0047837d              }
0047837d              
004783d3              DialogFactory::DialogDone(next);
004783e0              List<DialogInfo>::remove(&var_94, next);
004783e5              DialogFactory::UpdatePendingDialogDisplay_();
004783ee              var_94 = &List<struct DialogInfo>::`vftable';
004783f2              List<DialogInfo>::flush(&var_94);
0047832f          }
00478172      }
00478160  }

00478367                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
00478402        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00478410  uint32_t DialogFactory::MakeDialogInCurrentUI(class PropertyCollection const* arg1)

00478410  {
00478429      return DialogFactory::MakeDialog(UIFlow::m_instance->_curUI, arg1);
00478410  }

0047842a                                90 90 90 90 90 90                                                            ......

00478430  uint32_t __convention("regparm") DialogFactory::MakeCallbackDialogInCurrentUI(class PropertyCollection const* arg1, void (* arg2)(class PropertyCollection const*))

00478430  {
00478430      uint32_t result_2;
00478430      uint32_t result_1 = result_2;
00478443      uint32_t result = DialogFactory::MakeDialog(UIFlow::m_instance->_curUI, arg1);
0047844f      result_1 = result;
0047844f      
00478453      if (result == 0)
00478457          return result;
00478457      
00478467      HashTable<ControlSpecification,enum ControlType,0>::add(&DialogFactory::s_hashCallbacks, &result_1, &arg2);
00478470      return result;
00478430  }

00478471                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00478480  class TextTag* TextTagFactory::MakeTag(class PStringBase<unsigned short> const* arg1)

00478480  {
00478486      class PStringBase<unsigned short>* edi = arg1;
0047848a      class PSRefBufferCharData<unsigned short>* m_charbuffer = edi->m_charbuffer;
0047848c      int32_t eax = m_charbuffer->m_data[0x7ffffffffffffffe];
0047848c      
00478495      if ((eax - 1) >= 2)
00478495      {
0047849f          void* m_charbuffer_1 = &m_charbuffer->m_data[(eax - 1)];
0047849f          
004784a3          if (eax > 0)
004784a5              m_charbuffer_1 = m_charbuffer;
004784a5          
004784a7          int32_t esi;
004784a7          esi = *(uint16_t*)m_charbuffer_1;
004784af          void* eax_1 = &m_charbuffer->m_data[(eax - 1)];
004784af          
004784b3          if ((eax - 2) < eax)
004784b5              eax_1 = &m_charbuffer->m_data[(eax - 2)];
004784b5          
004784c6          if ((esi == 0x3c && *(uint16_t*)eax_1 == 0x3e))
004784c6          {
004784cc              int32_t __return = 1;
004784d2              int32_t var_10 = 0x79449c;
004784da              class PStringBase<unsigned short>* var_4_1 = edi;
004784de              int32_t var_8_1 = 0;
004784e2              int32_t var_c_1 = 0;
004784e6              PStringBaseIter_Common<unsigned short>::Next(&var_10, __return);
004784ef              __return = 0;
004784f0              class PStringBase<unsigned short>* var_34 = 0x3a;
004784f6              int32_t var_8_2 = var_c_1;
004784f6              
00478501              if (PStringBaseIter_Common<unsigned short>::FindChar(&var_10, var_34, __return) != 0)
00478501              {
0047850b                  __return = &arg1;
00478510                  class PStringBase<unsigned short>* ecx_3 = PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, __return);
00478510                  
0047851d                  if (arg1->m_charbuffer != 1)
0047851d                  {
00478527                      int32_t var_14;
00478527                      __return = &var_14;
00478528                      var_34 = ecx_3;
00478530                      var_14 = 0;
00478534                      uint32_t eax_4;
00478534                      uint32_t* ecx_5;
00478534                      class PStringBase<unsigned short> edx_3;
00478534                      eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_34, &arg1);
00478539                      int32_t var_38_2 = 0x18;
00478539                      
00478545                      if (EnumMapper::InqEnum(eax_4, edx_3, ecx_5) != 0)
00478545                      {
0047855c                          int32_t eax_8;
0047855c                          
0047855c                          if ((var_c_1 + 1) <= *(uint32_t*)var_10())
0047856a                              eax_8 = (var_c_1 + 1);
0047855c                          else
00478566                              eax_8 = *(uint32_t*)var_10();
00478566                          
0047856c                          __return = 0;
0047856d                          var_34 = 0x3a;
00478577                          int32_t var_8_3 = eax_8;
00478577                          
00478582                          if (PStringBaseIter_Common<unsigned short>::FindChar(&var_10, var_34, __return) != 0)
00478582                          {
0047858c                              class PStringBase<unsigned short> var_20;
0047858c                              __return = &var_20;
00478591                              PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, __return);
00478596                              class PStringBase<unsigned short> ecx_8 = var_20;
00478596                              
0047859e                              if (*(uint32_t*)(ecx_8 - 4) != 1)
0047859e                              {
004785a8                                  int32_t var_18;
004785a8                                  __return = &var_18;
004785a9                                  var_34 = ecx_8;
004785b1                                  var_18 = 0;
004785b5                                  uint32_t eax_10;
004785b5                                  uint32_t* ecx_10;
004785b5                                  class PStringBase<unsigned short> edx_5;
004785b5                                  eax_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_34, &var_20);
004785ba                                  int32_t var_38_4 = 0x18;
004785d4                                  class ReferenceCountTemplate<1048576,0>* result;
004785d4                                  
004785d4                                  if ((EnumMapper::InqEnum(eax_10, edx_5, ecx_10) != 0 && (var_18 - 1) <= 3))
004785da                                      switch (var_18)
004785da                                      {
00478632                                          case 1:
00478632                                          {
00478632                                              __return = 0x14;
00478634                                              void* eax_17 = operator new(__return);
00478634                                              
0047863e                                              if (eax_17 != 0)
0047863e                                              {
00478646                                                  result = TextTag_DID::TextTag_DID(eax_17);
00478646                                                  goto label_47864d;
0047863e                                              }
00478632                                              break;
00478632                                          }
004785e1                                          case 2:
004785e1                                          {
004785e1                                              __return = 0x14;
004785e3                                              class TextTag_IID* eax_14 = operator new(__return);
004785e3                                              
004785ed                                              if (eax_14 != 0)
004785ed                                              {
004785f5                                                  result = TextTag_IID::TextTag_IID(eax_14);
0047864d                                              label_47864d:
0047864d                                                  
0047864f                                                  if (result != 0)
0047864f                                                  {
00478659                                                      *(int32_t*)((char*)result + 8) = var_14;
00478660                                                      *(int32_t*)((char*)result + 0xc) = var_18;
00478674                                                      int32_t eax_20;
00478674                                                      
00478674                                                      if ((eax_8 + 1) <= *(uint32_t*)var_10())
00478682                                                          eax_20 = (eax_8 + 1);
00478674                                                      else
0047867e                                                          eax_20 = *(uint32_t*)var_10();
0047867e                                                      
00478684                                                      int32_t var_c_3 = eax_20;
00478688                                                      int32_t var_8_4 = eax_20;
00478694                                                      int32_t eax_22 = *(uint32_t*)var_10();
00478694                                                      
00478699                                                      if (eax_22 >= 1)
00478699                                                      {
004786a6                                                          class PStringBase<unsigned short> var_1c;
004786a6                                                          __return = &var_1c;
004786ab                                                          int32_t var_c_5 = (eax_22 - 1);
004786af                                                          int32_t __return_1 = PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, __return);
004786af                                                          
004786bc                                                          if (*(uint32_t*)(var_1c - 4) != 1)
004786bc                                                          {
004786be                                                              struct ReferenceCountTemplate<1048576,0>::VTable* vtable = result->vtable;
004786c0                                                              __return = __return_1;
004786c7                                                              var_34 = &var_1c;
004786c8                                                              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, var_34);
004786c8                                                              
004786d4                                                              if (*(int32_t*)((char*)vtable + 8)(__return) != 0)
004786d4                                                              {
00478705                                                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
0047870e                                                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
00478717                                                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg1);
00478724                                                                  return result;
004786d4                                                              }
004786d4                                                              
004786d8                                                              ReferenceCountTemplate<1048576,0>::Release(result);
004786bc                                                          }
004786bc                                                          
004786e1                                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
00478699                                                      }
00478699                                                      else
0047869b                                                          int32_t var_c_4 = 0;
0047864f                                                  }
004785ed                                              }
004785e1                                              break;
004785e1                                          }
004785fc                                          case 3:
004785fc                                          {
004785fc                                              __return = 0x18;
004785fe                                              class TextTag_IIDEnum* eax_15 = operator new(__return);
004785fe                                              
00478608                                              if (eax_15 != 0)
00478608                                              {
00478610                                                  result = TextTag_IIDEnum::TextTag_IIDEnum(eax_15);
00478615                                                  goto label_47864d;
00478608                                              }
004785fc                                              break;
004785fc                                          }
00478617                                          case 4:
00478617                                          {
00478617                                              __return = 0x18;
00478619                                              class TextTag_IIDString* eax_16 = operator new(__return);
00478619                                              
00478623                                              if (eax_16 != 0)
00478623                                              {
0047862b                                                  result = TextTag_IIDString::TextTag_IIDString(eax_16);
00478630                                                  goto label_47864d;
00478623                                              }
00478617                                              break;
00478617                                          }
004785da                                      }
0047859e                              }
0047859e                              
004786ea                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
00478582                          }
00478545                      }
0047851d                  }
0047851d                  
004786f3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg1);
00478501              }
004784c6          }
00478495      }
00478495      
00478700      return 0;
00478480  }

00478725                 8d 49 00                                                                               .I.
00478728  uint32_t jump_table_478728[0x4] = 
00478728  {
00478728      [0x0] =  0x00478632
0047872c      [0x1] =  0x004785e1
00478730      [0x2] =  0x004785fc
00478734      [0x3] =  0x00478617
00478738  }

00478738                                                                          90 90 90 90 90 90 90 90                          ........

00478740  uint8_t __fastcall TextTag_DID::HandleClick(class TextTag_DID* this, uint32_t arg2)

00478740  {
00478748      ECM_UI::SendNotice_TextTag_DIDClick(this->m_type, this->m_DID.id);
00478750      int32_t eax;
00478750      eax = 1;
00478752      return 1;
00478740  }

00478755                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00478760  void __fastcall TextTag_DID::TextTag_DID(class TextTag_DID* this)

00478760  {
00478763      TextTag::TextTag(this);
00478768      this->vtable = 0x79e09c;
00478773      this->m_DID.id = INVALID_DID.id;
00478760  }

0047877a                                                                                90 90 90 90 90 90                            ......

00478780  uint32_t __fastcall PStringBase<unsigned short>::to_uint32(class PStringBase<unsigned short> const* this)

00478780  {
00478781      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
0047878e      *(uint32_t*)_errno() = 0;
0047879e      return wcstoul(m_charbuffer, 0, 0);
00478780  }

0047879f                                                                                               90                                 .

004787a0  void* __thiscall TextTag_DID::`scalar deleting destructor'(class TextTag_DID* this, uint32_t arg2)

004787a0  {
004787a3      this->vtable = 0x79e09c;
004787a9      TextTag::~TextTag(this);
004787a9      
004787b3      if ((arg2 & 1) != 0)
004787b6          operator delete(this);
004787b6      
004787c1      return this;
004787a0  }

004787c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004787d0  uint8_t __convention("regparm") PSUtils::is_uint32(class PStringBase<unsigned short> arg1)

004787d0  {
004787d0      int16_t* ecx;
004787d0      int16_t* var_4 = ecx;
004787da      var_4 = nullptr;
004787e8      *(uint32_t*)_errno() = 0;
004787f6      wcstoul(arg1, &var_4, 0);
00478807      int32_t ebx;
00478807      
00478807      if (*(uint16_t*)var_4 != 0)
00478814          ebx = 0;
00478807      else if (*(uint32_t*)_errno() == 0x22)
00478814          ebx = 0;
0047880e      else
00478810          ebx = 1;
00478810      
00478829      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
00478831          **(uint32_t**)(arg1 - 0x14)(1);
00478831      
00478835      int32_t eax_2;
00478835      eax_2 = ebx;
00478839      return eax_2;
004787d0  }

0047883a                                                                                90 90 90 90 90 90                            ......

00478840  uint8_t __fastcall TextTag_IIDString::HandleClick(class TextTag_IIDString* this, uint32_t arg2)

00478840  {
0047884c      ECM_UI::SendNotice_TextTag_IIDStringClick(this->m_type, this->m_IID, &this->m_string);
00478854      int32_t eax_2;
00478854      eax_2 = 1;
00478856      return 1;
00478840  }

00478859                                                                             90 90 90 90 90 90 90                           .......

00478860  void __fastcall TextTag_IIDString::TextTag_IIDString(class TextTag_IIDString* this)

00478860  {
00478863      TextTag::TextTag(this);
00478868      this->vtable = 0x79e0c8;
0047886e      this->m_IID = 0;
00478875      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00478880      this->m_string.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00478883      InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00478860  }

0047888d                                         90 90 90                                                               ...

00478890  void* __thiscall TextTag_IIDString::`scalar deleting destructor'(class TextTag_IIDString* this, uint32_t arg2)

00478890  {
00478897      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = (this->m_string.m_charbuffer - 0x14);
0047889e      this->vtable = 0x79e0c8;
0047889e      
004788b0      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004788b8          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004788b8      
004788bc      TextTag::~TextTag(this);
004788bc      
004788c6      if ((arg2 & 1) != 0)
004788c9          operator delete(this);
004788c9      
004788d5      return this;
00478890  }

004788d8                                                                          90 90 90 90 90 90 90 90                          ........

004788e0  uint8_t __thiscall TextTag_IIDString::BuildStartTagData(class TextTag_IIDString const* this, class PStringBase<unsigned short>* arg2)

004788e0  {
004788e0      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_string.m_charbuffer;
004788e0      
004788e7      if (m_charbuffer->m_data[0x7ffffffffffffffe] == 1)
004788e7      {
004788e9          m_charbuffer = 0;
004788eb          return 0;
004788e7      }
004788e7      
004788ee      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = m_charbuffer;
004788f6      uint32_t m_IID = this->m_IID;
004788fd      PStringBase<unsigned short>::sprintf(arg2, u"0x%08X:%ls");
00478905      int32_t eax_1;
00478905      eax_1 = 1;
00478907      return 1;
004788e0  }

0047890a                                90 90 90 90 90 90                                                            ......

00478910  uint8_t __fastcall TextTag_IIDString::ParseStartTag(class TextTag_IIDString* this, class PStringBase<unsigned short> arg2)

00478910  {
00478923      int32_t var_10 = 0x79449c;
0047892b      class PStringBase<unsigned short>* var_4 = &arg2;
0047892f      int32_t var_c = 0;
00478937      int32_t var_8 = 0;
00478937      
00478946      if (PStringBaseIter_Common<unsigned short>::FindChar(&var_10, 0x3a, 0) != 0)
00478946      {
0047898c          void* __return_1;
0047898c          int32_t ecx_4 = PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, &__return_1);
00478991          void* __return_2 = __return_1;
00478991          
00478999          if (*(uint32_t*)((char*)__return_2 - 4) != 1)
00478999          {
004789e9              int32_t var_24_4 = ecx_4;
004789ec              void* __return_3 = __return_2;
004789ec              
00478a02              if (PSUtils::is_uint32(InterlockedIncrement(((char*)__return_2 - 0x10))) != 0)
00478a02              {
00478a63                  int32_t eax_13;
00478a63                  
00478a63                  if ((var_c + 1) <= *(uint32_t*)var_10())
00478a71                      eax_13 = (var_c + 1);
00478a63                  else
00478a6d                      eax_13 = *(uint32_t*)var_10();
00478a6d                  
00478a73                  int32_t var_c_1 = eax_13;
00478a77                  int32_t var_8_1 = eax_13;
00478a8e                  int32_t var_c_2 = *(uint32_t*)var_10();
00478a92                  class PStringBase<unsigned short> __return;
00478a92                  PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, &__return);
00478a92                  
00478a9f                  if (*(uint32_t*)(__return - 4) == 1)
00478a9f                  {
00478aa5                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00478aae                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00478ab7                      var_10 = 0x794478;
00478abf                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00478ac4                      int32_t eax_16;
00478ac4                      eax_16 = 0;
00478acb                      return 0;
00478a9f                  }
00478a9f                  
00478ad7                  this->m_IID = PStringBase<unsigned short>::to_uint32(&__return_1);
00478ae2                  PStringBase<unsigned short>::operator=(&this->m_string, &__return);
00478aeb                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00478af4                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00478afd                  var_10 = 0x794478;
00478b05                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00478b0b                  int32_t eax_18;
00478b0b                  eax_18 = 1;
00478b11                  return 1;
00478a02              }
00478a02              
00478a19              if ((InterlockedDecrement(((char*)__return_2 - 0x10)) == 0 && __return_2 != 0x14))
00478a21                  **(uint32_t**)((char*)__return_2 - 0x14)(1);
00478a21              
00478a27              int32_t* esi_7 = (arg2 - 0x14);
00478a2e              var_10 = 0x794478;
00478a2e              
00478a3e              if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
00478a46                  **(uint32_t**)esi_7(1);
00478999          }
00478999          else
00478999          {
004789b0              if ((InterlockedDecrement(((char*)__return_2 - 0x10)) == 0 && __return_2 != 0x14))
004789b8                  **(uint32_t**)((char*)__return_2 - 0x14)(1);
004789b8              
004789be              int32_t* esi_4 = (arg2 - 0x14);
004789c5              var_10 = 0x794478;
004789c5              
004789d5              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004789d5              {
004789dd                  **(uint32_t**)esi_4(1);
004789df                  int32_t eax_5;
004789df                  eax_5 = 0;
004789e6                  return 0;
004789d5              }
00478999          }
00478946      }
00478946      else
00478946      {
0047894c          int32_t* esi_1 = (arg2 - 0x14);
00478953          var_10 = 0x794478;
00478953          
0047896b          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0047896b          {
00478977              **(uint32_t**)esi_1(1);
00478979              int32_t eax_2;
00478979              eax_2 = 0;
00478980              return 0;
0047896b          }
00478946      }
00478946      
00478a48      int32_t eax_1;
00478a48      eax_1 = 0;
00478a4f      return 0;
00478910  }

00478b14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00478b20  void __fastcall TextTag_IIDEnum::TextTag_IIDEnum(class TextTag_IIDEnum* this)

00478b20  {
00478b23      TextTag::TextTag(this);
00478b2a      this->m_IID = 0;
00478b2d      this->m_enum = 0;
00478b30      this->vtable = 0x79e0fc;
00478b20  }

00478b3a                                                                                90 90 90 90 90 90                            ......

00478b40  uint8_t __fastcall TextTag_IIDEnum::HandleClick(class TextTag_IIDEnum* this, uint32_t arg2)

00478b40  {
00478b4c      ECM_UI::SendNotice_TextTag_IIDEnumClick(this->m_type, this->m_IID, this->m_enum);
00478b54      int32_t eax_1;
00478b54      eax_1 = 1;
00478b56      return 1;
00478b40  }

00478b59                                                                             90 90 90 90 90 90 90                           .......

00478b60  void* __thiscall TextTag_IIDEnum::`scalar deleting destructor'(class TextTag_IIDEnum* this, uint32_t arg2)

00478b60  {
00478b63      this->vtable = 0x79e0fc;
00478b69      TextTag::~TextTag(this);
00478b69      
00478b73      if ((arg2 & 1) != 0)
00478b76          operator delete(this);
00478b76      
00478b81      return this;
00478b60  }

00478b84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00478b90  uint8_t __thiscall TextTag_IIDEnum::BuildStartTagData(class TextTag_IIDEnum const* this, class PStringBase<unsigned short>* arg2)

00478b90  {
00478b90      class TextTag_IIDEnum* var_4 = this;
00478b90      
00478b99      if (this->m_enum != 0)
00478b99      {
00478b9b          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00478ba0          var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00478ba8          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00478ba8          
00478bc3          if (EnumMapper::InqString(0x18, this->m_enum, &var_4) != 0)
00478bc3          {
00478bf8              class TextTag_IIDEnum* var_c_4 = var_4;
00478bf9              uint32_t m_IID = this->m_IID;
00478c00              PStringBase<unsigned short>::sprintf(arg2, u"0x%08X:%ls");
00478c09              void* __offset(TextTag_IIDEnum, -0x14) esi_4 = ((char*)var_4 - 0x14);
00478c09              
00478c1f              if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00478c27                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00478c27              
00478c29              int32_t eax_5;
00478c29              eax_5 = 1;
00478c2d              return 1;
00478bc3          }
00478bc3          
00478bc9          void* __offset(TextTag_IIDEnum, -0x14) esi_2 = ((char*)var_4 - 0x14);
00478bc9          
00478bdc          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00478be4              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00478b99      }
00478b99      
00478be6      uint32_t eax;
00478be6      eax = 0;
00478bea      return 0;
00478b90  }


00478c30  uint8_t __fastcall TextTag_IIDEnum::ParseStartTag(class TextTag_IIDEnum* this, class PStringBase<unsigned short> arg2)

00478c30  {
00478c35      uint8_t var_28 = 0;
00478c3d      void* var_2c = 0x3a;
00478c43      int32_t var_10 = 0x79449c;
00478c4b      class PStringBase<unsigned short>* var_4 = &arg2;
00478c4f      int32_t var_c = 0;
00478c57      int32_t var_8 = 0;
00478c57      
00478c66      if (PStringBaseIter_Common<unsigned short>::FindChar(&var_10, var_2c, var_28) != 0)
00478c66      {
00478cac          void* __return_1;
00478cac          int32_t ecx_4 = PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, &__return_1);
00478cb1          void* __return_2 = __return_1;
00478cb1          
00478cb9          if (*(uint32_t*)((char*)__return_2 - 4) != 1)
00478cb9          {
00478d09              int32_t var_28_8 = ecx_4;
00478d0c              void* __return_3 = __return_2;
00478d11              var_2c = ((char*)__return_2 - 0x10);
00478d11              
00478d22              if (PSUtils::is_uint32(InterlockedIncrement(var_2c)) != 0)
00478d22              {
00478d83                  int32_t eax_13;
00478d83                  
00478d83                  if ((var_c + 1) <= *(uint32_t*)var_10())
00478d91                      eax_13 = (var_c + 1);
00478d83                  else
00478d8d                      eax_13 = *(uint32_t*)var_10();
00478d8d                  
00478d93                  int32_t var_c_1 = eax_13;
00478d97                  int32_t var_8_1 = eax_13;
00478da9                  class PStringBase<unsigned short> var_1c;
00478da9                  class PStringBase<unsigned short>* __return = &var_1c;
00478dae                  int32_t var_c_2 = *(uint32_t*)var_10();
00478db2                  void* ecx_12 = PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, __return);
00478db2                  
00478dbf                  if (*(uint32_t*)(var_1c - 4) != 1)
00478dbf                  {
00478dc5                      uint32_t var_14;
00478dc5                      uint32_t* var_28_13 = &var_14;
00478dc6                      var_2c = ecx_12;
00478dce                      var_14 = 0;
00478dd6                      uint32_t eax_16;
00478dd6                      uint32_t* ecx_14;
00478dd6                      class PStringBase<unsigned short> edx_8;
00478dd6                      eax_16 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2c, &var_1c);
00478ddb                      int32_t var_30_2 = 0x18;
00478ddb                      
00478de7                      if (EnumMapper::InqEnum(eax_16, edx_8, ecx_14) != 0)
00478de7                      {
00478e1f                          this->m_IID = PStringBase<unsigned short>::to_uint32(&__return_1);
00478e2a                          this->m_enum = var_14;
00478e2d                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
00478e36                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00478e3f                          var_10 = 0x794478;
00478e47                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00478e4d                          int32_t eax_21;
00478e4d                          eax_21 = 1;
00478e53                          return 1;
00478de7                      }
00478dbf                  }
00478dbf                  
00478ded                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
00478df6                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00478dff                  var_10 = 0x794478;
00478e07                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00478e0c                  int32_t eax_18;
00478e0c                  eax_18 = 0;
00478e13                  return 0;
00478d22              }
00478d22              
00478d39              if ((InterlockedDecrement(((char*)__return_2 - 0x10)) == 0 && __return_2 != 0x14))
00478d41                  **(uint32_t**)((char*)__return_2 - 0x14)(1);
00478d41              
00478d47              int32_t* esi_7 = (arg2 - 0x14);
00478d4e              var_10 = 0x794478;
00478d4e              
00478d5e              if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
00478d66                  **(uint32_t**)esi_7(1);
00478cb9          }
00478cb9          else
00478cb9          {
00478cd0              if ((InterlockedDecrement(((char*)__return_2 - 0x10)) == 0 && __return_2 != 0x14))
00478cd8                  **(uint32_t**)((char*)__return_2 - 0x14)(1);
00478cd8              
00478cde              int32_t* esi_4 = (arg2 - 0x14);
00478ce5              var_10 = 0x794478;
00478ce5              
00478cf5              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00478cf5              {
00478cfd                  **(uint32_t**)esi_4(1);
00478cff                  int32_t eax_5;
00478cff                  eax_5 = 0;
00478d06                  return 0;
00478cf5              }
00478cb9          }
00478c66      }
00478c66      else
00478c66      {
00478c6c          int32_t* esi_1 = (arg2 - 0x14);
00478c73          var_10 = 0x794478;
00478c73          
00478c8b          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00478c8b          {
00478c97              **(uint32_t**)esi_1(1);
00478c99              int32_t eax_2;
00478c99              eax_2 = 0;
00478ca0              return 0;
00478c8b          }
00478c66      }
00478c66      
00478d68      int32_t eax_1;
00478d68      eax_1 = 0;
00478d6f      return 0;
00478c30  }

00478e56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00478e60  void __fastcall TextTag_IID::TextTag_IID(class TextTag_IID* this)

00478e60  {
00478e63      TextTag::TextTag(this);
00478e68      this->vtable = 0x79e118;
00478e6e      this->m_IID = 0;
00478e60  }

00478e79                                                                             90 90 90 90 90 90 90                           .......

00478e80  uint8_t __fastcall TextTag_IID::HandleClick(class TextTag_IID* this, uint32_t arg2)

00478e80  {
00478e88      ECM_UI::SendNotice_TextTag_IIDClick(this->m_type, this->m_IID);
00478e90      int32_t eax;
00478e90      eax = 1;
00478e92      return 1;
00478e80  }

00478e95                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00478ea0  void* __thiscall TextTag_IID::`scalar deleting destructor'(class TextTag_IID* this, uint32_t arg2)

00478ea0  {
00478ea3      this->vtable = 0x79e118;
00478ea9      TextTag::~TextTag(this);
00478ea9      
00478eb3      if ((arg2 & 1) != 0)
00478eb6          operator delete(this);
00478eb6      
00478ec1      return this;
00478ea0  }

00478ec4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00478ed0  uint8_t __thiscall TextTag_DID::ParseStartTag(class TextTag_DID* this, class PStringBase<unsigned short> arg2)

00478ed0  {
00478ed6      class TextTag_DID* this_1 = this;
00478ed9      class PStringBase<unsigned short> var_c = arg2;
00478ed9      
00478ef1      if (PSUtils::is_uint32(InterlockedIncrement((arg2 - 0x10))) == 0)
00478ef1      {
00478f06          if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00478f0e              **(uint32_t**)(arg2 - 0x14)(1);
00478f0e          
00478f10          int32_t eax_3;
00478f10          eax_3 = 0;
00478f14          return 0;
00478ef1      }
00478ef1      
00478f22      *(uint32_t*)_errno() = 0;
00478f2e      this->m_DID.id = wcstoul(arg2, 0, 0);
00478f2e      
00478f47      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00478f4f          **(uint32_t**)(arg2 - 0x14)(1);
00478f4f      
00478f52      int32_t eax_7;
00478f52      eax_7 = 1;
00478f55      return 1;
00478ed0  }

00478f58                                                                          90 90 90 90 90 90 90 90                          ........

00478f60  uint8_t __thiscall TextTag_DID::BuildStartTagData(class TextTag_DID const* this, class PStringBase<unsigned short>* arg2)

00478f60  {
00478f67      uint32_t id = this->m_DID.id;
00478f6e      PStringBase<unsigned short>::sprintf(arg2, u"0x%08X");
00478f76      int32_t eax;
00478f76      eax = 1;
00478f78      return 1;
00478f60  }

00478f7b                                                                                   90 90 90 90 90                             .....

00478f80  void __fastcall TextTag::TextTag(class TextTag* this)

00478f80  {
00478f84      this->m_cRef = 1;
00478f8b      this->vtable = 0x79e134;
00478f91      this->m_type = 0;
00478f94      this->m_format = 0;
00478f80  }

00478f98                                                                          90 90 90 90 90 90 90 90                          ........

00478fa0  void __fastcall TextTag::~TextTag(class TextTag* this)

00478fa0  {
00478fa0      this->vtable = 0x7942f4;
00478fa0  }

00478fa7                       90 90 90 90 90 90 90 90 90                                                         .........

00478fb0  uint8_t __stdcall TextTag::ParseStartTag(class TextTag* this @ ecx, class PStringBase<unsigned short> arg2)

00478fb0  {
00478fc8      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00478fd0          **(uint32_t**)(arg2 - 0x14)(1);
00478fd0      
00478fd2      int32_t eax_1;
00478fd2      eax_1 = 0;
00478fd5      return 0;
00478fb0  }

00478fd8                                                                          90 90 90 90 90 90 90 90                          ........

00478fe0  uint8_t __thiscall TextTag::BuildStartTag(class TextTag const* this, class PStringBase<unsigned short>* arg2)

00478fe0  {
00478fe3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00478ff0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00478ffa      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00479007      uint8_t eax_1;
00479007      int32_t edi;
00479007      eax_1 = EnumMapper::InqString(0x18, this->m_type, &PStringBase<unsigned short>::s_NullBuffer_4);
00479007      
00479011      if (eax_1 != 0)
00479011      {
00479046          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0047904b          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_2;
00479053          edi(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00479060          uint8_t eax_6;
00479060          int32_t edi_1;
00479060          eax_6 = EnumMapper::InqString(0x18, this->m_format, &PStringBase<unsigned short>::s_NullBuffer_5);
0047906a          void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_18_5;
0047906a          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4;
0047906a          
0047906a          if (eax_6 != 0)
0047906a          {
0047907f              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00479084              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_3;
0047908c              edi_1(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0047908c              
0047909c              if (this->vtable->BuildStartTagData(&PStringBase<unsigned short>::s_NullBuffer_6) != 0)
0047909c              {
00479111                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_6;
00479116                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer_5;
00479117                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_4;
0047911e                  PStringBase<unsigned short>::sprintf(arg2, u"<%ls:%ls%:%ls>");
0047912d                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_11 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0047912d                  
0047913f                  if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
00479147                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
00479147                  
0047914d                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_13 = &PStringBase<unsigned short>::s_NullBuffer_5->m_data[-0xa];
0047914d                  
0047915c                  if ((InterlockedDecrement(((char*)esi_13 + 4)) == 0 && esi_13 != 0))
00479164                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_13) + -0x14)(1);
00479164                  
0047916a                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_15 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
0047916a                  
00479179                  if ((InterlockedDecrement(((char*)esi_15 + 4)) == 0 && esi_15 != 0))
00479181                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_15) + -0x14)(1);
00479181                  
00479184                  int32_t eax_21;
00479184                  eax_21 = 1;
0047918a                  return 1;
0047909c              }
0047909c              
004790a8              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
004790a8              
004790b7              if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
004790bf                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
004790bf              
004790c5              esi_4 = &PStringBase<unsigned short>::s_NullBuffer_5->m_data[-0xa];
004790cb              var_18_5 = ((char*)esi_4 + 4);
0047906a          }
0047906a          else
0047906a          {
00479076              esi_4 = &PStringBase<unsigned short>::s_NullBuffer_5->m_data[-0xa];
0047907c              var_18_5 = ((char*)esi_4 + 4);
0047906a          }
0047906a          
004790d4          if ((InterlockedDecrement(var_18_5) == 0 && esi_4 != 0))
004790dc              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004790dc          
004790e2          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_9 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
004790e2          
004790f1          if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
004790f9              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
00479011      }
00479011      else
00479011      {
00479017          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
00479017          
0047902e          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0047902e          {
0047903a              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0047903d              int32_t eax_4;
0047903d              eax_4 = 0;
00479043              return 0;
0047902e          }
00479011      }
00479011      
004790fc      int32_t eax_2;
004790fc      eax_2 = 0;
00479102      return 0;
00478fe0  }

0047918d                                         90 90 90                                                               ...

00479190  uint8_t __thiscall TextTag::BuildEndTag(class TextTag const* this, class PStringBase<unsigned short>* arg2)

00479190  {
00479190      class TextTag* var_4 = this;
00479190      
00479199      if (this->m_type != 0)
00479199      {
0047919b          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004791a0          var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004791a8          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004791a8          
004791c3          if (EnumMapper::InqString(0x18, this->m_type, &var_4) != 0)
004791c3          {
004791f5              class TextTag* var_c_4 = var_4;
004791fc              PStringBase<unsigned short>::sprintf(arg2, u"<\%ls>");
00479205              void* __offset(TextTag, -0x14) esi_4 = ((char*)var_4 - 0x14);
00479205              
0047921b              if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00479223                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00479223              
00479225              int32_t eax_5;
00479225              eax_5 = 1;
00479229              return 1;
004791c3          }
004791c3          
004791c9          void* __offset(TextTag, -0x14) esi_2 = ((char*)var_4 - 0x14);
004791c9          
004791dc          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004791e4              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00479199      }
00479199      
004791e6      uint32_t eax;
004791e6      eax = 0;
004791ea      return 0;
00479190  }

0047922c                                      90 90 90 90                                                              ....

00479230  uint8_t __thiscall TextTag::ParseEndTag(class TextTag const* this, class PStringBase<unsigned short> arg2)

00479230  {
00479236      class PStringBase<unsigned short> ecx = arg2;
0047923a      int32_t eax = *(uint32_t*)(ecx - 4);
0047923a      
00479245      if ((eax - 1) >= 2)
00479245      {
0047927b          class PStringBase<unsigned short> edx_2 = ((ecx + (eax << 1)) - 2);
0047927b          
0047927f          if (eax > 0)
00479281              edx_2 = ecx;
00479281          
00479283          int32_t esi;
00479283          esi = *(uint16_t*)edx_2;
0047928b          int16_t* edx_4;
0047928b          
0047928b          if ((eax - 2) < eax)
00479293              edx_4 = (ecx + ((eax - 2) << 1));
0047928b          else
0047928d              edx_4 = ((ecx + (eax << 1)) - 2);
0047928d          
004792a4          if ((esi == 0x3c && *(uint16_t*)edx_4 == 0x3e))
004792a4          {
004792ad              int16_t* eax_4 = ((ecx + (eax << 1)) - 2);
004792ad              
004792b1              if (eax > 1)
004792b3                  eax_4 = (ecx + 2);
004792b3              
004792ba              if (*(uint16_t*)eax_4 == 0x5c)
004792ba              {
004792c4                  int32_t var_28_3 = 2;
004792ca                  int32_t var_10 = 0x79449c;
004792d2                  class PStringBase<unsigned short>* var_4_1 = &arg2;
004792d6                  int32_t var_8_1 = 0;
004792da                  int32_t var_c_1 = 0;
004792de                  PStringBaseIter_Common<unsigned short>::Next(&var_10, var_28_3);
004792eb                  int32_t var_8_2 = var_c_1;
004792f3                  int32_t eax_5 = *(uint32_t*)var_10();
004792f3                  
004792f8                  if (eax_5 >= 1)
004792f8                  {
00479301                      int32_t var_c_3 = (eax_5 - 1);
0047930e                      class PStringBase<unsigned short> __return;
0047930e                      PStringBaseIter_Common<unsigned short>::GetSubString(&var_10, &__return);
00479313                      class PStringBase<unsigned short> __return_1 = __return;
00479313                      
0047931b                      if (*(uint32_t*)(__return_1 - 4) != 1)
0047931b                      {
00479321                          int32_t var_14;
00479321                          int32_t* var_28_5 = &var_14;
00479322                          class PStringBase<unsigned short> __return_2 = __return_1;
0047932a                          var_14 = 0;
0047932e                          uint32_t eax_7;
0047932e                          uint32_t* ecx_6;
0047932e                          class PStringBase<unsigned short> edx_6;
0047932e                          eax_7 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_2, &__return);
00479333                          int32_t var_30_2 = 0x18;
00479333                          
0047933f                          if (EnumMapper::InqEnum(eax_7, edx_6, ecx_6) != 0)
0047933f                          {
00479371                              class TextTag* ebx;
00479371                              ebx = this->m_type == var_14;
00479374                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0047937d                              var_10 = 0x794478;
00479385                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00479392                              return ebx;
0047933f                          }
0047931b                      }
0047931b                      
00479345                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004792f8                  }
004792f8                  else
004792fa                      int32_t var_c_2 = 0;
004792fa                  
0047934a                  var_10 = 0x794478;
004792ba              }
004792ba              
00479356              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0047935b              int32_t eax_9;
0047935b              eax_9 = 0;
00479363              return 0;
004792a4          }
004792a4          
004793a8          if ((InterlockedDecrement((ecx - 0x10)) == 0 && ecx != 0x14))
004793b0              **(uint32_t**)(ecx - 0x14)(1);
00479245      }
00479245      else if ((InterlockedDecrement((ecx - 0x10)) == 0 && ecx != 0x14))
0047925e      {
0047926a          **(uint32_t**)(ecx - 0x14)(1);
0047926c          int32_t eax_3;
0047926c          eax_3 = 0;
00479274          return 0;
0047925e      }
0047925e      
004793b4      int32_t eax_2;
004793b4      eax_2 = 0;
004793ba      return 0;
00479230  }

004793bd                                                                                         90 90 90                               ...

004793c0  void __thiscall UIFlow::QueueUIMode(class UIFlow* this, uint32_t const arg2)

004793c0  {
004793c9      this->_nextMode = 0;
004793d3      StringInfo::Reset(&this->_nextText);
004793dc      this->_nextMode = arg2;
004793c0  }

004793e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004793f0  void __thiscall UIFlow::QueueUIModeWithError(class UIFlow* this, uint32_t const arg2, class StringInfo const* arg3)

004793f0  {
004793fc      this->_nextMode = 0;
00479406      StringInfo::Reset(&this->_nextText);
00479416      this->_nextMode = arg2;
0047941c      StringInfo::operator=(&this->_nextText, arg3);
004793f0  }

00479426                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00479430  void __thiscall UIFlow::Update(class UIFlow* this)

00479430  {
00479430      class UIMainFramework* _curUI = this->_curUI;
00479430      
00479438      if (_curUI == 0)
0047943f          return;
0047943f      
0047943c      /* jump -> _curUI->vtable->Update */
00479430  }


00479440  void __fastcall UIFlow::~UIFlow(class UIFlow* this)

00479440  {
00479447      *(uint32_t*)((char*)this - 8) = 0x79e20c;
00479444      this->vtable = 0x7cbd20;
00479454      this->vtable = 0x79e1f4;
0047945a      UIFlow::m_instance = nullptr;
00479464      uint32_t _curMode = this->_curMode;
00479464      
0047946d      if (_curMode != 0)
00479473          **(uint32_t**)_curMode(1);
00479473      
00479475      uint32_t _nextMode = this->_nextMode;
0047947d      this->_curMode = 0;
0047947d      
00479487      if (_nextMode != 0)
00479487      {
0047948b          UIPersistantData::~UIPersistantData(_nextMode);
00479491          operator delete(_nextMode);
00479487      }
00479487      
0047949d      this->_nextMode = 0;
004794a7      UIListener::UnRegisterForGlobalMessage(this, 3);
004794b2      StringInfo::~StringInfo(&this->_curUI);
004794bc      int32_t ecx_4 = -(((char*)this - 8));
004794c2      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_numElements = 0x792b6c;
004794c9      UIListener::~UIListener(((ecx_4 - ecx_4) & this));
004794ce      int32_t edi_1 = -(((char*)this - 8));
004794d9      /* tailcall */
004794d9      return NoticeHandler::~NoticeHandler(((edi_1 - edi_1) & ((char*)this - 4)));
00479440  }

004794de                                                                                            90 90                                ..

004794e0  class TResult* __thiscall UIFlow::QueryInterface(class UIFlow* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

004794e0  {
004794ea      if (arg3->m_data1 == 0xdeadbeef)
004794ea      {
004794ec          int32_t edx;
004794ec          edx = arg3->m_data2;
004794ec          *(uint16_t*)((char*)edx)[2] = arg3->m_data3;
004794ec          
004794f5          if (edx == 0)
004794f5          {
004794f7              int32_t edx_1;
004794f7              edx_1 = arg3->m_data4[0];
004794f7              *(uint8_t*)((char*)edx_1)[1] = arg3->m_data4[1];
004794f7              *(uint8_t*)((char*)edx_1)[2] = arg3->m_data4[2];
004794f7              *(uint8_t*)((char*)edx_1)[3] = arg3->m_data4[3];
004794f7              
00479500              if (edx_1 == 0)
00479500              {
00479502                  int32_t eax;
00479502                  eax = arg3->m_data4[4];
00479502                  *(uint8_t*)((char*)eax)[1] = arg3->m_data4[5];
00479502                  *(uint8_t*)((char*)eax)[2] = arg3->m_data4[6];
00479502                  *(uint8_t*)((char*)eax)[3] = arg3->m_data4[7];
00479502                  
0047950f                  if ((eax == 0xcdab0000 && this != 0))
0047950f                  {
00479515                      *(uint32_t*)arg4 = this;
00479517                      this->vtable->AddRef();
00479520                      __return->m_val = 0;
00479526                      return __return;
0047950f                  }
00479500              }
004794f5          }
004794ea      }
004794ea      
0047952d      __return->m_val = 0x80004002;
00479533      return __return;
004794e0  }

00479536                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00479540  uint32_t __fastcall UIFlow::AddRef(class UIFlow const* this)

00479540  {
0047954d      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00479540  }

0047954e                                            90 90                                                                ..

00479550  uint32_t __fastcall UIFlow::Release(class UIFlow const* this)

00479550  {
0047955a      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
0047955a      
00479567      if ((result == 0 && this != 0))
00479569          this->vtable->__vecDelDtor(1);
00479569      
00479577      return result;
00479550  }

00479578                                                                          90 90 90 90 90 90 90 90                          ........

00479580  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIMainFramework * (__cdecl*)(void)> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIMainFramework * (__cdecl*)(void)> *,0>* this, uint32_t arg2)

00479580  {
00479583      class HashTableData<unsigned long,UIMainFramework * (__cdecl*)(void)>** m_buckets = this->m_buckets;
0047958b      this->vtable = 0x79e238;
0047958b      
00479591      if (m_buckets != &this->m_aInplaceBuckets)
00479594          operator delete[](m_buckets);
00479594      
0047959e      this->m_buckets = nullptr;
004795a1      this->m_firstInterestingBucket = nullptr;
004795a4      this->m_numBuckets = 0;
004795a7      this->m_numElements = 0;
004795a7      
004795af      if ((arg2 & 1) != 0)
004795b2          operator delete(this);
004795b2      
004795bd      return this;
00479580  }


004795c0  void __fastcall UIFlow::UIFlow(class UIFlow* this)

004795c0  {
004795ca      this->vtable = &CObjectMaint::`vftable';
004795d1      UIListener::UIListener(&this->vtable);
004795d8      this->vtable = 0x79e20c;
004795de      this->vtable = &CObjectMaint::`vftable';
004795c5      this->vtable = &UIFlow::`vftable';
004795eb      this->m_cTurbineRefCount.m_cRef = 1;
004795f5      this->m_cTurbineRefCount.vtable = 0x792b6c;
00479605      this->_curMode = 0;
0047960b      this->_nextMode = 0;
00479611      this->_curUI = nullptr;
00479617      this->_data = nullptr;
0047961d      StringInfo::StringInfo(&this->_nextText);
00479626      UIListener::RegisterForGlobalMessage(&this->vtable, 3);
0047962d      class UIPersistantData* eax = operator new(0x50);
0047962d      
00479637      if (eax != 0)
00479637      {
00479640          this->_data = UIPersistantData::UIPersistantData(eax);
00479647          UIFlow::m_instance = this;
00479651          return;
00479637      }
00479637      
00479654      this->_data = nullptr;
0047965b      UIFlow::m_instance = this;
004795c0  }

00479666                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00479670  void* __thiscall UIFlow::`vector deleting destructor'(class UIFlow* this, uint32_t arg2)

00479670  {
00479673      UIFlow::~UIFlow(this);
0047967d      void* __offset(UIFlow, -0x8) result = ((char*)this - 8);
0047967d      
00479680      if ((arg2 & 1) == 0)
0047968f          return result;
0047968f      
00479683      operator delete(result);
0047968b      return ((char*)this - 8);
00479670  }

00479692                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004796a0  void __fastcall UIFlow::UseNewMode(class UIFlow* this)

004796a0  {
004796a9      uint32_t _nextMode = this->_nextMode;
004796a9      
004796b1      if (_nextMode != 0)
004796b1      {
004796c9          int32_t* eax_2 = UIFlow::_frameworkCreateMethodTable.m_intrusiveTable.m_buckets[(COMBINE(0, _nextMode) % UIFlow::_frameworkCreateMethodTable.m_intrusiveTable.m_numBuckets)];
004796c9          
004796cd          if (eax_2 != 0)
004796cd          {
004796d5              while (*(uint32_t*)eax_2 != _nextMode)
004796d5              {
004796d7                  eax_2 = eax_2[1];
004796d7                  
004796dc                  if (eax_2 == 0)
004796e5                      return;
004796d5              }
004796d5              
004796e8              if (eax_2 != 0)
004796e8              {
004796ee                  class UIMainFramework* _curUI = this->_curUI;
004796f7                  int32_t ebx_1 = eax_2[2];
004796f7                  
004796fa                  if (_curUI != 0)
004796fc                      _curUI->vtable->Show(0);
004796fc                  
00479703                  class UIMainFramework* _curUI_1 = this->_curUI;
00479703                  
0047970b                  if (_curUI_1 != 0)
0047970d                      _curUI_1->vtable->__vecDelDtor(1);
0047970d                  
0047971a                  this->_curMode = this->_nextMode;
0047972b                  this->_curUI = nullptr;
00479735                  this->_nextMode = 0;
0047973f                  void var_90;
0047973f                  StringInfo::StringInfo(&var_90, &this->_nextText);
00479746                  StringInfo::Reset(&this->_nextText);
0047974e                  void* ecx_4;
0047974e                  
0047974e                  if (ebx_1 == 0)
00479788                      ecx_4 = &var_90;
0047974e                  else
0047974e                  {
00479750                      class UIMainFramework* eax_4 = ebx_1();
00479754                      ecx_4 = &var_90;
00479754                      
00479758                      if (eax_4 != 0)
00479758                      {
0047975c                          this->_curUI = eax_4;
0047975c                          
00479769                          if (StringInfo::IsValid(ecx_4, 1) != 0)
0047976b                              this->_curUI->vtable->SetErrorMsg(&var_90);
0047976b                          
0047977b                          this->_curUI->vtable->Show(1);
00479788                          ecx_4 = &var_90;
00479758                      }
0047974e                  }
0047974e                  
0047978c                  StringInfo::~StringInfo(ecx_4);
004796e8              }
004796cd          }
004796b1      }
004796a0  }

0047979a                                                                                90 90 90 90 90 90                            ......

004797a0  void __thiscall UIFlow::ListenToGlobalMessage(class UIFlow* this, uint32_t arg2, int32_t arg3)

004797a0  {
004797af      if ((arg2 == 3 && this->m_cTurbineRefCount.m_cRef != 0))
004797b4          UIFlow::UseNewMode(((char*)this - 8));
004797a0  }

004797bc                                                                                      90 90 90 90                              ....

004797c0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIMainFramework * (__cdecl*)(void)> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIMainFramework * (__cdecl*)(void)> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIMainFramework * (__cdecl*)(void)> *,0>* this, uint32_t arg2)

004797c0  {
004797cb      arg2 = arg2;
004797cf      uint8_t edx = ((int8_t)arg2);
004797d3      this->m_buckets = nullptr;
004797d6      this->m_firstInterestingBucket = nullptr;
004797d9      this->m_numBuckets = 0;
004797dc      this->m_numElements = 0;
004797e0      this->vtable = 0x79e238;
004797e6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004797f9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004797f9      
00479803      if (eax == bucketSizesEnd_1)
00479805          eax -= 4;
00479805      
00479808      uint32_t eax_1 = *(uint32_t*)eax;
0047980d      this->m_numBuckets = eax_1;
0047980d      
00479810      if (eax_1 > 0x17)
00479826          this->m_buckets = operator new[]((eax_1 << 2));
00479810      else
00479815          this->m_buckets = &this->m_aInplaceBuckets;
00479815      
0047982c      class HashTableData<unsigned long,UIMainFramework * (__cdecl*)(void)>** m_buckets = this->m_buckets;
0047982f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00479835      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00479846      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004797c0  }

0047984f                                               90                                                                 .

00479850  void UIFlow::RegisterFrameworkClass(uint32_t arg1, class UIMainFramework* (* arg2)())

00479850  {
00479853      void* eax = operator new(0xc);
0047985d      void* esi;
0047985d      
0047985d      if (eax == 0)
00479877          esi = nullptr;
0047985d      else
0047985d      {
00479867          *(uint32_t*)eax = arg1;
00479869          *(uint32_t*)((char*)eax + 4) = 0;
00479870          *(uint32_t*)((char*)eax + 8) = arg2;
00479873          esi = eax;
0047985d      }
0047985d      
0047988a      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&UIFlow::_frameworkCreateMethodTable.m_intrusiveTable, esi) == 0 && esi != 0))
0047988d          operator delete(esi);
00479850  }

00479897                                                                       90 90 90 90 90 90 90 90 90                         .........

004798a0  void* __thiscall HashTable<unsigned long,UIMainFramework * (__cdecl*)(void),0>::`scalar deleting destructor'(class HashTable<unsigned long,UIMainFramework * (__cdecl*)(void),0>* this, uint32_t arg2)

004798a0  {
004798a9      this->vtable = 0x79e23c;
004798af      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
004798b4      class HashTableData<unsigned long,UIMainFramework * (__cdecl*)(void)>** m_buckets = this->m_intrusiveTable.m_buckets;
004798a4      this->m_intrusiveTable.vtable = 0x79e238;
004798a4      
004798c2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004798c5          operator delete[](m_buckets);
004798c5      
004798a4      this->m_intrusiveTable.m_buckets = nullptr;
004798a4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004798a4      this->m_intrusiveTable.m_numBuckets = 0;
004798a4      this->m_intrusiveTable.m_numElements = 0;
004798a4      
004798e0      if ((arg2 & 1) != 0)
004798e3          operator delete(this);
004798e3      
004798ef      return this;
004798a0  }

004798f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00479900  void __thiscall UIPersistantData::RecvNotice_CharacterSet(class UIPersistantData* this, class CharacterSet const* arg2)

00479900  {
0047990b      CharacterSet::operator=(&this->_charSet, arg2);
00479910      this->_receivedSet = 1;
00479914      UIFlow::m_instance->vtable->Update();
00479900  }

00479923           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00479930  void __fastcall CharacterSet::CharacterSet(class CharacterSet* this)

00479930  {
00479933      this->vtable = 0x79e250;
0047993c      __builtin_memset(&this->set_, 0, 0x1c);
00479951      this->numAllowedCharacters_ = 5;
00479958      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00479963      this->account_.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00479966      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0047996c      this->account_.fIsDarkMajestyExpansion_ = 0;
0047996f      this->account_.m_fIsThroneOfDestinyExpansion = 0;
00479972      this->account_.m_fPreOrderedThroneOfDestinyExpansion = 0;
00479975      this->name = nullptr;
00479930  }

0047997d                                                                                         90 90 90                               ...

00479980  void __fastcall CharacterSet::~CharacterSet(class CharacterSet* this)

00479980  {
00479984      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->account_.m_buffer;
00479984      
00479997      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00479999          m_buffer->vtable->__vecDelDtor(1);
00479999      
004799a1      class CharacterIdentity* m_data = this->delSet_.m_data;
004799a1      
004799a6      if (m_data != 0)
004799a6      {
004799b0          if (m_data->vtable == 0)
004799bb              operator delete[](((char*)m_data - 4));
004799b0          else
004799b2              m_data->vtable->__vecDelDtor(3);
004799a6      }
004799a6      
004799c3      class CharacterIdentity* m_data_1 = this->set_.m_data;
004799c3      
004799c8      if (m_data_1 != 0)
004799c8      {
004799d2          if (m_data_1->vtable != 0)
004799d2          {
004799d4              m_data_1->vtable->__vecDelDtor(3);
004799db              this->vtable = 0x79285c;
004799e2              return;
004799d2          }
004799d2          
004799e4          operator delete[](((char*)m_data_1 - 4));
004799c8      }
004799c8      
004799ed      this->vtable = 0x79285c;
00479980  }

004799f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00479a00  void __fastcall UIPersistantData::UIPersistantData(class UIPersistantData* this)

00479a00  {
00479a06      this->vtable = 0x79e268;
00479a0c      CharacterSet::CharacterSet(&this->_charSet);
00479a11      this->_receivedSet = 0;
00479a15      this->m_iidSelectedAvatar = 0;
00479a1c      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
00479a1c      
00479a23      if (eax != 0)
00479a25          eax->vtable->RegisterNoticeHandler(0x186a6, this);
00479a00  }

00479a36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00479a40  void __fastcall UIPersistantData::~UIPersistantData(class UIPersistantData* this)

00479a40  {
00479a43      this->vtable = 0x79e268;
00479a49      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
00479a49      
00479a50      if (eax != 0)
00479a52          eax->vtable->UnRegisterAllNoticeHandlers(this);
00479a52      
00479a5d      CharacterSet::~CharacterSet(&this->_charSet);
00479a65      /* tailcall */
00479a65      return NoticeHandler::~NoticeHandler(this);
00479a40  }

00479a6a                                90 90 90 90 90 90                                                            ......

00479a70  void* __thiscall CharacterSet::`scalar deleting destructor'(class CharacterSet* this, uint32_t arg2)

00479a70  {
00479a73      CharacterSet::~CharacterSet(this);
00479a73      
00479a7d      if ((arg2 & 1) != 0)
00479a80          operator delete(this);
00479a80      
00479a8b      return this;
00479a70  }

00479a8e                                            90 90                                                                ..

00479a90  uint8_t CM_UI::SendNotice_ClearChatBuffer(uint32_t arg1)

00479a90  {
00479a9e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd252);
00479a9e      
00479aa3      if (eax != 0)
00479aa3      {
00479aa6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479aa6          
00479aab          while (i != 0)
00479aab          {
00479ab3              int32_t* edi_1 = *(uint32_t*)i;
00479ab7              i = i[1];
00479ab7              
00479aba              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
00479acb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x214)(arg1);
00479aab          }
00479aa3      }
00479aa3      
00479ad8      eax = 1;
00479ada      return 1;
00479a90  }

00479adb                                                                                   90 90 90 90 90                             .....

00479ae0  uint8_t CM_UI::SendNotice_EnableChatTargetSelection(uint32_t arg1, uint8_t arg2)

00479ae0  {
00479aee      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd251);
00479aee      
00479af3      if (eax != 0)
00479af3      {
00479af6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479af6          
00479afb          while (i != 0)
00479afb          {
00479b08              int32_t* esi_1 = *(uint32_t*)i;
00479b0c              i = i[1];
00479b0c              
00479b0f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
00479b21                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x218)(arg1, arg2);
00479afb          }
00479af3      }
00479af3      
00479b2f      eax = 1;
00479b31      return 1;
00479ae0  }

00479b32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00479b40  uint8_t CM_UI::SendNotice_EndCharacterSession(int32_t arg1)

00479b40  {
00479b4e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1e2);
00479b4e      
00479b53      if (eax != 0)
00479b53      {
00479b56          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479b56          
00479b5b          while (i != 0)
00479b5b          {
00479b63              int32_t* edi_1 = *(uint32_t*)i;
00479b67              i = i[1];
00479b67              
00479b6a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
00479b7b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x21c)(arg1);
00479b5b          }
00479b53      }
00479b53      
00479b88      eax = 1;
00479b8a      return 1;
00479b40  }

00479b8b                                   90 90 90 90 90                                                             .....

00479b90  uint8_t CM_UI::SendNotice_FillComponentBuyList(enum SpellComponentCategory arg1, int32_t arg2)

00479b90  {
00479b9e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd259);
00479b9e      
00479ba3      if (eax != 0)
00479ba3      {
00479ba6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479ba6          
00479bab          while (i != 0)
00479bab          {
00479bb8              int32_t* esi_1 = *(uint32_t*)i;
00479bbc              i = i[1];
00479bbc              
00479bbf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
00479bd1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x220)(arg1, arg2);
00479bab          }
00479ba3      }
00479ba3      
00479bdf      eax = 1;
00479be1      return 1;
00479b90  }

00479be2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00479bf0  uint8_t CM_UI::SendNotice_FontSettingsChanged(uint32_t arg1, uint32_t arg2)

00479bf0  {
00479bfe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd267);
00479bfe      
00479c03      if (eax != 0)
00479c03      {
00479c06          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479c06          
00479c0b          while (i != 0)
00479c0b          {
00479c18              int32_t* esi_1 = *(uint32_t*)i;
00479c1c              i = i[1];
00479c1c              
00479c1f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
00479c31                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x224)(arg1, arg2);
00479c0b          }
00479c03      }
00479c03      
00479c3f      eax = 1;
00479c41      return 1;
00479bf0  }

00479c42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00479c50  uint8_t CM_UI::SendNotice_FullMergingItem(uint32_t arg1, uint32_t arg2)

00479c50  {
00479c5e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1e8);
00479c5e      
00479c63      if (eax != 0)
00479c63      {
00479c66          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479c66          
00479c6b          while (i != 0)
00479c6b          {
00479c78              int32_t* esi_1 = *(uint32_t*)i;
00479c7c              i = i[1];
00479c7c              
00479c7f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
00479c91                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x228)(arg1, arg2);
00479c6b          }
00479c63      }
00479c63      
00479c9f      eax = 1;
00479ca1      return 1;
00479c50  }

00479ca2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00479cb0  uint8_t CM_UI::SendNotice_GameplayOptionChanged(class BaseProperty const* arg1, uint32_t arg2)

00479cb0  {
00479cbe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd26e);
00479cbe      
00479cc3      if (eax != 0)
00479cc3      {
00479cc6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479cc6          
00479ccb          while (i != 0)
00479ccb          {
00479cd8              int32_t* esi_1 = *(uint32_t*)i;
00479cdc              i = i[1];
00479cdc              
00479cdf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
00479cf1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x22c)(arg1, arg2);
00479ccb          }
00479cc3      }
00479cc3      
00479cff      eax = 1;
00479d01      return 1;
00479cb0  }

00479d02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00479d10  uint8_t CM_UI::SendNotice_LoadUI(class PStringBase<char> const* arg1)

00479d10  {
00479d1e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd284);
00479d1e      
00479d23      if (eax != 0)
00479d23      {
00479d26          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479d26          
00479d2b          while (i != 0)
00479d2b          {
00479d33              int32_t* edi_1 = *(uint32_t*)i;
00479d37              i = i[1];
00479d37              
00479d3a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
00479d4b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x230)(arg1);
00479d2b          }
00479d23      }
00479d23      
00479d58      eax = 1;
00479d5a      return 1;
00479d10  }

00479d5b                                                                                   90 90 90 90 90                             .....

00479d60  uint8_t CM_UI::SendNotice_NewParentContainer(uint32_t arg1)

00479d60  {
00479d6e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1f6);
00479d6e      
00479d73      if (eax != 0)
00479d73      {
00479d76          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479d76          
00479d7b          while (i != 0)
00479d7b          {
00479d83              int32_t* edi_1 = *(uint32_t*)i;
00479d87              i = i[1];
00479d87              
00479d8a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
00479d9b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x238)(arg1);
00479d7b          }
00479d73      }
00479d73      
00479da8      eax = 1;
00479daa      return 1;
00479d60  }

00479dab                                   90 90 90 90 90                                                             .....

00479db0  uint8_t CM_UI::SendNotice_OpenContainedContainer(uint32_t arg1)

00479db0  {
00479dbe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd266);
00479dbe      
00479dc3      if (eax != 0)
00479dc3      {
00479dc6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479dc6          
00479dcb          while (i != 0)
00479dcb          {
00479dd3              int32_t* edi_1 = *(uint32_t*)i;
00479dd7              i = i[1];
00479dd7              
00479dda              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
00479deb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x23c)(arg1);
00479dcb          }
00479dc3      }
00479dc3      
00479df8      eax = 1;
00479dfa      return 1;
00479db0  }

00479dfb                                                                                   90 90 90 90 90                             .....

00479e00  uint8_t CM_UI::SendNotice_PlayerDescReceived(class CACQualities const* arg1, class CPlayerModule const* arg2)

00479e00  {
00479e0e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1f0);
00479e0e      
00479e13      if (eax != 0)
00479e13      {
00479e16          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479e16          
00479e1b          while (i != 0)
00479e1b          {
00479e28              int32_t* esi_1 = *(uint32_t*)i;
00479e2c              i = i[1];
00479e2c              
00479e2f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
00479e41                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x240)(arg1, arg2);
00479e1b          }
00479e13      }
00479e13      
00479e4f      eax = 1;
00479e51      return 1;
00479e00  }

00479e52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00479e60  uint8_t CM_UI::SendNotice_PlayerOptionChanged(enum PlayerOption arg1)

00479e60  {
00479e6e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd21f);
00479e6e      
00479e73      if (eax != 0)
00479e73      {
00479e76          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479e76          
00479e7b          while (i != 0)
00479e7b          {
00479e83              int32_t* edi_1 = *(uint32_t*)i;
00479e87              i = i[1];
00479e87              
00479e8a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
00479e9b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x244)(arg1);
00479e7b          }
00479e73      }
00479e73      
00479ea8      eax = 1;
00479eaa      return 1;
00479e60  }

00479eab                                   90 90 90 90 90                                                             .....

00479eb0  uint8_t CM_UI::SendNotice_RefreshOptionsPanel()

00479eb0  {
00479ebe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd217);
00479ebe      
00479ec3      if (eax != 0)
00479ec3      {
00479ec6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479ec6          
00479ecb          if (i != 0)
00479ecb          {
00479ecd              int32_t edi;
00479ecd              int32_t var_8_1 = edi;
00479ecd              
00479eef              do
00479eef              {
00479ed0                  int32_t* edi_2 = *(uint32_t*)i;
00479ed4                  i = i[1];
00479ed4                  
00479ed7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
00479ee7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x248)();
00479eef              } while (i != 0);
00479ecb          }
00479ec3      }
00479ec3      
00479ef3      eax = 1;
00479ef5      return 1;
00479eb0  }

00479ef6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00479f00  uint8_t CM_UI::SendNotice_SaveUI(class PStringBase<char> const* arg1)

00479f00  {
00479f0e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd283);
00479f0e      
00479f13      if (eax != 0)
00479f13      {
00479f16          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479f16          
00479f1b          while (i != 0)
00479f1b          {
00479f23              int32_t* edi_1 = *(uint32_t*)i;
00479f27              i = i[1];
00479f27              
00479f2a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
00479f3b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x24c)(arg1);
00479f1b          }
00479f13      }
00479f13      
00479f48      eax = 1;
00479f4a      return 1;
00479f00  }

00479f4b                                   90 90 90 90 90                                                             .....

00479f50  uint8_t CM_UI::SendNotice_SelectionChanged()

00479f50  {
00479f5e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1ef);
00479f5e      
00479f63      if (eax != 0)
00479f63      {
00479f66          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479f66          
00479f6b          if (i != 0)
00479f6b          {
00479f6d              int32_t edi;
00479f6d              int32_t var_8_1 = edi;
00479f6d              
00479f8f              do
00479f8f              {
00479f70                  int32_t* edi_2 = *(uint32_t*)i;
00479f74                  i = i[1];
00479f74                  
00479f77                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
00479f87                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x250)();
00479f8f              } while (i != 0);
00479f6b          }
00479f63      }
00479f63      
00479f93      eax = 1;
00479f95      return 1;
00479f50  }

00479f96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00479fa0  uint8_t CM_UI::SendNotice_SetChatWindowTitle(uint32_t arg1, class StringInfo const* arg2)

00479fa0  {
00479fae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd270);
00479fae      
00479fb3      if (eax != 0)
00479fb3      {
00479fb6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00479fb6          
00479fbb          while (i != 0)
00479fbb          {
00479fc8              int32_t* esi_1 = *(uint32_t*)i;
00479fcc              i = i[1];
00479fcc              
00479fcf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
00479fe1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x254)(arg1, arg2);
00479fbb          }
00479fb3      }
00479fb3      
00479fef      eax = 1;
00479ff1      return 1;
00479fa0  }

00479ff2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0047a000  uint8_t CM_UI::SendNotice_SetDisplayInventory(int32_t arg1)

0047a000  {
0047a00e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1f2);
0047a00e      
0047a013      if (eax != 0)
0047a013      {
0047a016          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a016          
0047a01b          while (i != 0)
0047a01b          {
0047a023              int32_t* edi_1 = *(uint32_t*)i;
0047a027              i = i[1];
0047a027              
0047a02a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
0047a03b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x258)(arg1);
0047a01b          }
0047a013      }
0047a013      
0047a048      eax = 1;
0047a04a      return 1;
0047a000  }

0047a04b                                   90 90 90 90 90                                                             .....

0047a050  uint8_t CM_UI::SendNotice_SetFramerateDisplay(uint8_t arg1)

0047a050  {
0047a05e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1ff);
0047a05e      
0047a063      if (eax != 0)
0047a063      {
0047a066          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a066          
0047a06b          while (i != 0)
0047a06b          {
0047a073              int32_t* edi_1 = *(uint32_t*)i;
0047a077              i = i[1];
0047a077              
0047a07a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
0047a08b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x25c)(arg1);
0047a06b          }
0047a063      }
0047a063      
0047a098      eax = 1;
0047a09a      return 1;
0047a050  }

0047a09b                                                                                   90 90 90 90 90                             .....

0047a0a0  uint8_t CM_UI::SendNotice_SetPanelVisibility(uint32_t arg1, uint8_t arg2)

0047a0a0  {
0047a0ae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1f8);
0047a0ae      
0047a0b3      if (eax != 0)
0047a0b3      {
0047a0b6          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a0b6          
0047a0bb          while (i != 0)
0047a0bb          {
0047a0c8              int32_t* esi_1 = *(uint32_t*)i;
0047a0cc              i = i[1];
0047a0cc              
0047a0cf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
0047a0e1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x260)(arg1, arg2);
0047a0bb          }
0047a0b3      }
0047a0b3      
0047a0ef      eax = 1;
0047a0f1      return 1;
0047a0a0  }

0047a0f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0047a100  uint8_t CM_UI::SendNotice_SplitStack(uint32_t arg1)

0047a100  {
0047a10e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd244);
0047a10e      
0047a113      if (eax != 0)
0047a113      {
0047a116          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a116          
0047a11b          while (i != 0)
0047a11b          {
0047a123              int32_t* edi_1 = *(uint32_t*)i;
0047a127              i = i[1];
0047a127              
0047a12a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
0047a13b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x264)(arg1);
0047a11b          }
0047a113      }
0047a113      
0047a148      eax = 1;
0047a14a      return 1;
0047a100  }

0047a14b                                   90 90 90 90 90                                                             .....

0047a150  uint8_t CM_UI::SendNotice_StackSliderChanged(uint32_t arg1, uint32_t arg2)

0047a150  {
0047a15e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd264);
0047a15e      
0047a163      if (eax != 0)
0047a163      {
0047a166          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a166          
0047a16b          while (i != 0)
0047a16b          {
0047a178              int32_t* esi_1 = *(uint32_t*)i;
0047a17c              i = i[1];
0047a17c              
0047a17f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
0047a191                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x268)(arg1, arg2);
0047a16b          }
0047a163      }
0047a163      
0047a19f      eax = 1;
0047a1a1      return 1;
0047a150  }

0047a1a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0047a1b0  uint8_t CM_UI::SendNotice_StartTell(class PStringBase<unsigned short> const* arg1)

0047a1b0  {
0047a1be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd271);
0047a1be      
0047a1c3      if (eax != 0)
0047a1c3      {
0047a1c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a1c6          
0047a1cb          while (i != 0)
0047a1cb          {
0047a1d3              int32_t* edi_1 = *(uint32_t*)i;
0047a1d7              i = i[1];
0047a1d7              
0047a1da              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
0047a1eb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x26c)(arg1);
0047a1cb          }
0047a1c3      }
0047a1c3      
0047a1f8      eax = 1;
0047a1fa      return 1;
0047a1b0  }

0047a1fb                                                                                   90 90 90 90 90                             .....

0047a200  uint8_t CM_UI::SendNotice_ToggleChatEntry(uint8_t arg1)

0047a200  {
0047a20e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd26d);
0047a20e      
0047a213      if (eax != 0)
0047a213      {
0047a216          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a216          
0047a21b          while (i != 0)
0047a21b          {
0047a223              int32_t* edi_1 = *(uint32_t*)i;
0047a227              i = i[1];
0047a227              
0047a22a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
0047a23b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x270)(arg1);
0047a21b          }
0047a213      }
0047a213      
0047a248      eax = 1;
0047a24a      return 1;
0047a200  }

0047a24b                                   90 90 90 90 90                                                             .....

0047a250  uint8_t CM_UI::SendNotice_UpdateRadarVisibility(uint8_t arg1)

0047a250  {
0047a25e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd25c);
0047a25e      
0047a263      if (eax != 0)
0047a263      {
0047a266          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a266          
0047a26b          while (i != 0)
0047a26b          {
0047a273              int32_t* edi_1 = *(uint32_t*)i;
0047a277              i = i[1];
0047a277              
0047a27a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
0047a28b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x278)(arg1);
0047a26b          }
0047a263      }
0047a263      
0047a298      eax = 1;
0047a29a      return 1;
0047a250  }

0047a29b                                                                                   90 90 90 90 90                             .....

0047a2a0  uint8_t CM_UI::SendNotice_UpdateSquelchPanel()

0047a2a0  {
0047a2ae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd27c);
0047a2ae      
0047a2b3      if (eax != 0)
0047a2b3      {
0047a2b6          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a2b6          
0047a2bb          if (i != 0)
0047a2bb          {
0047a2bd              int32_t edi;
0047a2bd              int32_t var_8_1 = edi;
0047a2bd              
0047a2df              do
0047a2df              {
0047a2c0                  int32_t* edi_2 = *(uint32_t*)i;
0047a2c4                  i = i[1];
0047a2c4                  
0047a2c7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
0047a2d7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x27c)();
0047a2df              } while (i != 0);
0047a2bb          }
0047a2b3      }
0047a2b3      
0047a2e3      eax = 1;
0047a2e5      return 1;
0047a2a0  }

0047a2e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0047a2f0  uint8_t CM_UI::SendNotice_UpdateToolbarSelectionDisplay()

0047a2f0  {
0047a2fe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd25e);
0047a2fe      
0047a303      if (eax != 0)
0047a303      {
0047a306          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a306          
0047a30b          if (i != 0)
0047a30b          {
0047a30d              int32_t edi;
0047a30d              int32_t var_8_1 = edi;
0047a30d              
0047a32f              do
0047a32f              {
0047a310                  int32_t* edi_2 = *(uint32_t*)i;
0047a314                  i = i[1];
0047a314                  
0047a317                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
0047a327                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x280)();
0047a32f              } while (i != 0);
0047a30b          }
0047a303      }
0047a303      
0047a333      eax = 1;
0047a335      return 1;
0047a2f0  }

0047a336                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0047a340  uint8_t CM_UI::SendNotice_UserPreferenceChanged(class PStringBase<char> const* arg1)

0047a340  {
0047a34e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd21e);
0047a34e      
0047a353      if (eax != 0)
0047a353      {
0047a356          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a356          
0047a35b          while (i != 0)
0047a35b          {
0047a363              int32_t* edi_1 = *(uint32_t*)i;
0047a367              i = i[1];
0047a367              
0047a36a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
0047a37b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x284)(arg1);
0047a35b          }
0047a353      }
0047a353      
0047a388      eax = 1;
0047a38a      return 1;
0047a340  }

0047a38b                                   90 90 90 90 90                                                             .....

0047a390  uint8_t CM_UI::SendNotice_UserPreferenceChanged_Menu(class PStringBase<char> const* arg1, uint32_t arg2, uint32_t arg3)

0047a390  {
0047a39e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd276);
0047a39e      
0047a3a3      if (eax != 0)
0047a3a3      {
0047a3a6          int32_t* i = *(uint32_t*)((char*)eax + 4);
0047a3a6          
0047a3ab          while (i != 0)
0047a3ab          {
0047a3b8              int32_t* esi_1 = *(uint32_t*)i;
0047a3bc              i = i[1];
0047a3bc              
0047a3bf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
0047a3d6                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x288)(arg1, arg2, arg3);
0047a3ab          }
0047a3a3      }
0047a3a3      
0047a3e4      eax = 1;
0047a3e6      return 1;
0047a390  }

0047a3e7                       90 90 90 90 90 90 90 90 90                                                         .........

0047a3f0  void __fastcall gmGlobalEventHandler::gmGlobalEventHandler(class gmGlobalEventHandler* this)

0047a3f0  {
0047a3f3      GlobalEventHandler::GlobalEventHandler(this);
0047a3f8      this->vtable = 0x79e314;
0047a3f0  }

0047a402        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0047a410  class gmGlobalEventHandler* gmGlobalEventHandler::gmGetGlobalEventHandler()

0047a410  {
0047a410      /* tailcall */
0047a410      return GlobalEventHandler::GetGlobalEventHandler();
0047a410  }

0047a415                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0047a420  void* __thiscall gmGlobalEventHandler::`scalar deleting destructor'(class gmGlobalEventHandler* this, uint32_t arg2)

0047a420  {
0047a423      this->vtable = 0x79e314;
0047a429      GlobalEventHandler::~GlobalEventHandler(this);
0047a429      
0047a433      if ((arg2 & 1) != 0)
0047a436          operator delete(this);
0047a436      
0047a441      return this;
0047a420  }

0047a444              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0047a450  void gmNoticeHandler::RecvNotice_StartBarberNotice(class gmNoticeHandler* this @ ecx, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3, class IDClass<_tagDataID,32,0> arg4, class IDClass<_tagDataID,32,0> arg5, class IDClass<_tagDataID,32,0> arg6, class IDClass<_tagDataID,32,0> arg7, class IDClass<_tagDataID,32,0> arg8, class IDClass<_tagDataID,32,0> arg9, class IDClass<_tagDataID,32,0> arg10, class IDClass<_tagDataID,32,0> arg11, class IDClass<_tagDataID,32,0> arg12, class IDClass<_tagDataID,32,0> arg13, class IDClass<_tagDataID,32,0> arg14, class IDClass<_tagDataID,32,0> arg15, int32_t arg16, int32_t arg17) __pure

0047a450  {
0047a450      return;
0047a450  }

0047a453                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0047a460  void gmUIHelper::RegisterElements()

0047a460  {
0047a460      gmUIElement_BurdenIndicator::Register();
0047a465      gmUIElement_EffectsIndicator::Register();
0047a46a      gmUIElement_LinkStatusIndicator::Register();
0047a46f      gmUIElement_MiniGameIndicator::Register();
0047a474      gmUIElement_PortalStormIndicator::Register();
0047a479      gmUIElement_VitaeIndicator::Register();
0047a47e      UIElement_SmartBoxWrapper::Register();
0047a483      UIElement_ItemList::Register();
0047a488      UIElement_UIItem::Register();
0047a48d      gmBarberUI::Register();
0047a492      gmKeyboardUI::Register();
0047a497      gmPowerbarUI::Register();
0047a49c      gmRadarUI::Register();
0047a4a1      gmSmartBoxUI::Register();
0047a4a6      gmSpewBoxUI::Register();
0047a4ab      gmFloatyCombatPanelUI::Register();
0047a4b0      gmFloatyEnvPanelUI::Register();
0047a4b5      gmFloatyExaminationUI::Register();
0047a4ba      gmFloatyIndicatorsUI::Register();
0047a4bf      gmFloatyMainChatUI::Register();
0047a4c4      gmFloatyPanelUI::Register();
0047a4c9      gmFloatyPowerBarUI::Register();
0047a4ce      gmFloatySideVitalsUI::Register();
0047a4d3      gmFloatyToolbarUI::Register();
0047a4d8      gmFloatyVitalsUI::Register();
0047a4dd      gmFloatyChatUI::Register();
0047a4e2      gmMainChatUI::Register();
0047a4e7      gmAdminQualitiesUI::Register();
0047a4ec      gmEnvPanelUI::Register();
0047a4f1      gmCombatUI::Register();
0047a4f6      gmExternalContainerUI::Register();
0047a4fb      gmSalvageUI::Register();
0047a500      gmSecureTradeUI::Register();
0047a505      gmSlumlordUI::Register();
0047a50a      gmSpellcastingUI::Register();
0047a50f      gmVendorUI::Register();
0047a514      gmVitalsUI::Register();
0047a519      gmIndicatorsUI::Register();
0047a51e      gmToolbarUI::Register();
0047a523      gmPanelUI::Register();
0047a528      gmAbuseUI::Register();
0047a52d      gmBookUI::Register();
0047a532      gmCharacterInfoUI::Register();
0047a537      gmEffectsUI::Register();
0047a53c      gmExaminationUI::Register();
0047a541      gmLinkStatusUI::Register();
0047a546      gmMiniGameUI::Register();
0047a54b      gmUrgentAssistanceUI::Register();
0047a550      gmVitaeUI::Register();
0047a555      gm3DItemsUI::Register();
0047a55a      gmBackpackUI::Register();
0047a55f      gmInventoryUI::Register();
0047a564      gmPaperDollUI::Register();
0047a569      gmHouseUI::Register();
0047a56e      gmMapUI::Register();
0047a573      gmCharacterSettingsUI::Register();
0047a578      gmChatOptionsUI::Register();
0047a57d      gmConfigUI::Register();
0047a582      gmGameplayOptionsUI::Register();
0047a587      gmAttributeUI::Register();
0047a58c      gmSkillUI::Register();
0047a591      gmCharacterTitleUI::Register();
0047a596      gmContractsUI::Register();
0047a59b      gmJournalUI::Register();
0047a5a0      gmPageListUI::Register();
0047a5a5      gmAllegianceUI::Register();
0047a5aa      gmFellowshipUI::Register();
0047a5af      gmFriendsUI::Register();
0047a5b4      gmSquelchUI::Register();
0047a5b9      gmSpellbookUI::Register();
0047a5be      gmSpellComponentUI::Register();
0047a5c3      UIOption_ActionKeyMap::Register();
0047a5c8      UIOption_Checkbox::Register();
0047a5cd      UIOption_CheckboxBitfield::Register();
0047a5d2      UIOption_CheckboxBitfield64::Register();
0047a5d7      UIOption_Slider::Register();
0047a5dc      UIOption_CheckboxSlider::Register();
0047a5e1      UIOption_Menu::Register();
0047a5e6      gmCGHeritagePage::Register();
0047a5eb      gmCGProfessionPage::Register();
0047a5f0      gmCGSkillsPage::Register();
0047a5f5      gmCGAppearancePage::Register();
0047a5fa      gmCGTownPage::Register();
0047a5ff      /* tailcall */
0047a5ff      return gmCGSummaryPage::Register();
0047a460  }

0047a604              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0047a610  void __fastcall gmUIFlow::gmUIFlow(class gmUIFlow* this)

0047a610  {
0047a610      class gmUIFlow* __return = this;
0047a617      UIFlow::UIFlow(this);
0047a61c      this->vtable = &gmUrgentAssistanceUI::`vftable';
0047a62f      this->vtable = 0x79e20c;
0047a635      this->vtable = &gmUIFlow::`vftable';
0047a62c      this->vtable = &gmUIFlow::`vftable';
0047a626      this->vtable = &gmUIFlow::`vftable';
0047a649      UIGlobals::Init();
0047a64e      gmUIHelper::RegisterElements();
0047a658      gmDataPatchUI::Register(0x10000003);
0047a662      gmIntroUI::Register(0x10000001);
0047a66c      gmCharacterManagementUI::Register(0x1000000a);
0047a676      gmGamePlayUI::Register(0x10000008);
0047a680      gmEpilogueUI::Register(0x10000009);
0047a68a      gmDisconnectedUI::Register(0x10000002);
0047a694      gmCharGenMainUI::Register(0x1000000b);
0047a69e      gmCreditsUI::Register(0x10000005);
0047a6ad      UIFlow::QueueUIMode(this, 0x10000003);
0047a6bb      DBObj::GetDIDByEnum(&__return, 1, 6);
0047a6d4      UIElementManager::SetCursor(UIElementManager::s_pInstance, __return, 0, 0, 1);
0047a6d9      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0047a6d9      
0047a6e2      if (eax != 0)
0047a6e2      {
0047a6e4          eax->vtable->RegisterNoticeHandler(0x186a1, &this->vtable);
0047a6f1          eax->vtable->RegisterNoticeHandler(0x186a0, &this->vtable);
0047a6fe          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0047a6fe          
0047a706          if (ICIDM::s_cidm_1 != 0)
0047a708              ICIDM::s_cidm_1->vtable->RegisterInputMap(0xe, &this->vtable, 0xfa0);
0047a6e2      }
0047a610  }

0047a71d                                                                                         90 90 90                               ...

0047a720  void __fastcall gmUIFlow::~gmUIFlow(class gmUIFlow* this)

0047a720  {
0047a72a      *(uint32_t*)((char*)this - 8) = 0x79e20c;
0047a731      *(uint32_t*)((char*)this - 4) = 0x79e7e8;
0047a738      this->vtable = 0x79e7d0;
0047a724      this->_nextText.m_strEnglish.m_charbuffer = 0x79e528;
0047a744      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0047a744      
0047a74b      if (eax != 0)
0047a74b      {
0047a750          int32_t edx_2 = -(((char*)this - 8));
0047a755          eax->vtable->UnRegisterAllNoticeHandlers(((edx_2 - edx_2) & &this->_nextText.m_strEnglish));
0047a75f          UIGlobals::Cleanup();
0047a74b      }
0047a74b      
0047a768      int32_t ecx_2 = -(((char*)this - 8));
0047a76c      void* ecx_4 = ((ecx_2 - ecx_2) & &this->_nextText.m_strEnglish);
0047a76e      *(uint32_t*)ecx_4 = 0x7bf328;
0047a774      NoticeHandler::~NoticeHandler(ecx_4);
0047a77d      /* tailcall */
0047a77d      return UIFlow::~UIFlow(this);
0047a720  }

0047a782        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0047a790  void* __thiscall gmUIFlow::`vector deleting destructor'(class gmUIFlow* this, uint32_t arg2)

0047a790  {
0047a793      gmUIFlow::~gmUIFlow(this);
0047a79d      void* __offset(gmUIFlow, -0x8) result = ((char*)this - 8);
0047a79d      
0047a7a0      if ((arg2 & 1) == 0)
0047a7af          return result;
0047a7af      
0047a7a3      operator delete(result);
0047a7ab      return ((char*)this - 8);
0047a790  }

0047a7b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0047a7c0  void __thiscall gmUIFlow::RecvNotice_CharacterError(class gmUIFlow* this, enum charError arg2)

0047a7c0  {
0047a7cd      void var_90;
0047a7cd      StringInfo::StringInfo(&var_90);
0047a7db      StringInfo::SetTableEnum(&var_90, 0x10000002);
0047a7eb      void (__thiscall** const var_98_1)(class gmNoticeHandler* this, uint32_t, class CACQualities const*);
0047a7eb      
0047a7eb      if ((arg2 - 1) <= 0x17)
0047a7f1          switch (arg2)
0047a7f1          {
0047a802              case CHAR_ERROR_LOGON:
0047a802              {
0047a802                  uint32_t var_8c_1 = Tokenize("ID_CHAR_ERROR_LOGON");
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a802                  break;
0047a802              }
0047a81a              case CHAR_ERROR_ACCOUNT_LOGON:
0047a81a              {
0047a81a                  uint32_t var_8c_2 = Tokenize("ID_CHAR_ERROR_ACCOUNT_LOGON");
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a81a                  break;
0047a81a              }
0047a832              case CHAR_ERROR_SERVER_CRASH:
0047a832              case CHAR_ERROR_ACCOUNT_IN_USE:
0047a832              {
0047a832                  uint32_t var_8c_3 = Tokenize("ID_CHAR_ERROR_SERVER_CRASH");
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a832                  break;
0047a832              }
0047a8b9              case CHAR_ERROR_LOGOFF:
0047a8b9              {
0047a8b9                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_EndCharacterSession;
0047a8be                  goto label_47a909;
0047a8b9              }
0047a8b2              case CHAR_ERROR_DELETE:
0047a8b2              {
0047a8b2                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_Logoff;
0047a909              label_47a909:
0047a909                  uint32_t var_8c_9 = Tokenize(var_98_1);
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x1000000a, &var_90);
0047a8b2                  break;
0047a8b2              }
0047a84a              case CHAR_ERROR_ACCOUNT_INVALID:
0047a84a              {
0047a84a                  uint32_t var_8c_4 = Tokenize("ID_CHAR_ERROR_ACCOUNT_INVALID");
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a84a                  break;
0047a84a              }
0047a862              case CHAR_ERROR_ACCOUNT_DOESNT_EXIST:
0047a862              {
0047a862                  uint32_t var_8c_5 = Tokenize("ID_CHAR_ERROR_ACCOUNT_DOESNT_EXI…");
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a862                  break;
0047a862              }
0047a8f1              case CHAR_ERROR_ENTER_GAME_GENERIC:
0047a8f1              {
0047a8f1                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_SetPowerbarLevel;
0047a8f6                  goto label_47a909;
0047a8f1              }
0047a8f8              case CHAR_ERROR_ENTER_GAME_STRESS_ACCOUNT:
0047a8f8              {
0047a8f8                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_Augmentation_ConfirmationRequest;
0047a8fd                  goto label_47a909;
0047a8f8              }
0047a8ff              case CHAR_ERROR_ENTER_GAME_CHARACTER_IN_WORLD:
0047a8ff              {
0047a8ff                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_WeenieDescEvent;
0047a8ff                  goto label_47a909;
0047a8ff              }
0047a87a              case CHAR_ERROR_ENTER_GAME_PLAYER_ACCOUNT_MISSING:
0047a87a              {
0047a87a                  uint32_t var_8c_6 = Tokenize(&gmUIFlow::`vftable'.RecvNotice_CloseVendor);
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a87a                  break;
0047a87a              }
0047a8ce              case CHAR_ERROR_ENTER_GAME_CHARACTER_NOT_OWNED:
0047a8ce              {
0047a8ce                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_NextSpellTab;
0047a8d3                  goto label_47a909;
0047a8ce              }
0047a8d5              case CHAR_ERROR_ENTER_GAME_CHARACTER_IN_WORLD_SERVER:
0047a8d5              {
0047a8d5                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_ShowPendingInPlayer;
0047a8da                  goto label_47a909;
0047a8d5              }
0047a8dc              case CHAR_ERROR_ENTER_GAME_OLD_CHARACTER:
0047a8dc              {
0047a8dc                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_UpdateRentPayment;
0047a8e1                  goto label_47a909;
0047a8dc              }
0047a8e3              case CHAR_ERROR_ENTER_GAME_CORRUPT_CHARACTER:
0047a8e3              {
0047a8e3                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_EndGame;
0047a8e8                  goto label_47a909;
0047a8e3              }
0047a8ea              case CHAR_ERROR_ENTER_GAME_START_SERVER_DOWN:
0047a8ea              {
0047a8ea                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_ExamineSpell;
0047a8ef                  goto label_47a909;
0047a8ea              }
0047a8c7              case CHAR_ERROR_ENTER_GAME_COULDNT_PLACE_CHARACTER:
0047a8c7              {
0047a8c7                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_ChatCommand_AddFriend;
0047a8cc                  goto label_47a909;
0047a8c7              }
0047a892              case CHAR_ERROR_LOGON_SERVER_FULL:
0047a892              {
0047a892                  uint32_t var_8c_7 = Tokenize(&gmUIFlow::`vftable'.RecvNotice_ToggleChatEntry);
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a892                  break;
0047a892              }
0047a8c0              case CHAR_ERROR_ENTER_GAME_CHARACTER_LOCKED:
0047a8c0              {
0047a8c0                  var_98_1 = &gmUIFlow::`vftable'.RecvNotice_CloseTrade;
0047a8c5                  goto label_47a909;
0047a8c0              }
0047a8a7              case CHAR_ERROR_SUBSCRIPTION_EXPIRED:
0047a8a7              {
0047a8a7                  uint32_t var_8c_8 = Tokenize(&gmUIFlow::`vftable'.RecvNotice_SaveUI);
0047a921                  *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a8a7                  break;
0047a8a7              }
0047a7f1          }
0047a928      StringInfo::~StringInfo(&var_90);
0047a7c0  }

0047a937                                                                       90                                                 .
0047a938  uint32_t jump_table_47a938[0x18] = 
0047a938  {
0047a938      [0x00] =  0x0047a7f8
0047a93c      [0x01] =  0x0047a924
0047a940      [0x02] =  0x0047a810
0047a944      [0x03] =  0x0047a828
0047a948      [0x04] =  0x0047a8b9
0047a94c      [0x05] =  0x0047a8b2
0047a950      [0x06] =  0x0047a924
0047a954      [0x07] =  0x0047a828
0047a958      [0x08] =  0x0047a840
0047a95c      [0x09] =  0x0047a858
0047a960      [0x0a] =  0x0047a8f1
0047a964      [0x0b] =  0x0047a8f8
0047a968      [0x0c] =  0x0047a8ff
0047a96c      [0x0d] =  0x0047a870
0047a970      [0x0e] =  0x0047a8ce
0047a974      [0x0f] =  0x0047a8d5
0047a978      [0x10] =  0x0047a8dc
0047a97c      [0x11] =  0x0047a8e3
0047a980      [0x12] =  0x0047a8ea
0047a984      [0x13] =  0x0047a8c7
0047a988      [0x14] =  0x0047a888
0047a98c      [0x15] =  0x0047a924
0047a990      [0x16] =  0x0047a8c0
0047a994      [0x17] =  0x0047a89d
0047a998  }

0047a998                                                                          90 90 90 90 90 90 90 90                          ........

0047a9a0  void __fastcall gmUIFlow::RecvNotice_ServerDied(class gmUIFlow* this)

0047a9a0  {
0047a9ad      void var_90;
0047a9ad      StringInfo::StringInfo(&var_90);
0047a9c9      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_NetErr_ConnectionLost"), 0x10000002);
0047a9c9      
0047a9e9      if ((this->m_cTurbineRefCount.m_cRef != 0x10000002 && this->_curMode != 0x10000002))
0047a9f7          *(uint32_t*)(this->vtable + 0x20)(0x10000002, &var_90);
0047a9f7      
0047a9fe      StringInfo::~StringInfo(&var_90);
0047a9a0  }

0047aa0a                                90 90 90 90 90 90                                                            ......

0047aa10  uint32_t __thiscall gmUIFlow::RecvNotice_CharacterError(enum charError const volatile& arg1)

0047aa10  {
0047aa16      int32_t ecx;
0047aa16      /* tailcall */
0047aa16      return gmUIFlow::RecvNotice_CharacterError((ecx - 0x128), arg1);
0047aa10  }

0047aa1b                                                                                   cc cc cc cc cc                             .....

0047aa20  void __fastcall gmUIFlow::RecvNotice_ServerDied(class gmUIFlow* this)

0047aa20  {
0047aa26      /* tailcall */
0047aa26      return gmUIFlow::RecvNotice_ServerDied(((char*)this - 0x128));
0047aa20  }

0047aa2b                                   cc cc cc cc cc                                                             .....

0047aa30  class TResult* __thiscall ClassFactoryForceUIFlow_ClassType::QueryInterface(class ClassFactoryForceUIFlow_ClassType* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

0047aa30  {
0047aa37      uint32_t m_data1 = arg3->m_data1;
0047aa37      
0047aa3f      if (m_data1 != 0x4a28b2a4)
0047aa3f      {
0047aa62      label_47aa62:
0047aa62          
0047aa68          if (m_data1 == 0xdeadbeef)
0047aa68          {
0047aa6a              int32_t ecx;
0047aa6a              ecx = arg3->m_data2;
0047aa6a              *(uint16_t*)((char*)ecx)[2] = arg3->m_data3;
0047aa6a              
0047aa73              if (ecx == 0)
0047aa73              {
0047aa75                  int32_t edx_3;
0047aa75                  edx_3 = arg3->m_data4[0];
0047aa75                  *(uint8_t*)((char*)edx_3)[1] = arg3->m_data4[1];
0047aa75                  *(uint8_t*)((char*)edx_3)[2] = arg3->m_data4[2];
0047aa75                  *(uint8_t*)((char*)edx_3)[3] = arg3->m_data4[3];
0047aa75                  
0047aa7e                  if (edx_3 == 0)
0047aa7e                  {
0047aa80                      int32_t eax;
0047aa80                      eax = arg3->m_data4[4];
0047aa80                      *(uint8_t*)((char*)eax)[1] = arg3->m_data4[5];
0047aa80                      *(uint8_t*)((char*)eax)[2] = arg3->m_data4[6];
0047aa80                      *(uint8_t*)((char*)eax)[3] = arg3->m_data4[7];
0047aa80                      
0047aa89                      if (eax == 0xcdab0000)
0047aa89                          goto label_47aa8b;
0047aa7e                  }
0047aa73              }
0047aa68          }
0047aa3f      }
0047aa3f      else
0047aa3f      {
0047aa41          int32_t edx;
0047aa41          edx = arg3->m_data2;
0047aa41          *(uint16_t*)((char*)edx)[2] = arg3->m_data3;
0047aa41          
0047aa4a          if (edx != 0x4853b129)
0047aa4a              goto label_47aa62;
0047aa4a          
0047aa4c          int32_t edx_1;
0047aa4c          edx_1 = arg3->m_data4[0];
0047aa4c          *(uint8_t*)((char*)edx_1)[1] = arg3->m_data4[1];
0047aa4c          *(uint8_t*)((char*)edx_1)[2] = arg3->m_data4[2];
0047aa4c          *(uint8_t*)((char*)edx_1)[3] = arg3->m_data4[3];
0047aa4c          
0047aa55          if (edx_1 != 0xdb13b897)
0047aa55              goto label_47aa62;
0047aa55          
0047aa57          int32_t edx_2;
0047aa57          edx_2 = arg3->m_data4[4];
0047aa57          *(uint8_t*)((char*)edx_2)[1] = arg3->m_data4[5];
0047aa57          *(uint8_t*)((char*)edx_2)[2] = arg3->m_data4[6];
0047aa57          *(uint8_t*)((char*)edx_2)[3] = arg3->m_data4[7];
0047aa57          
0047aa60          if (edx_2 != 0x2c769f47)
0047aa60              goto label_47aa62;
0047aa60          
0047aa8b      label_47aa8b:
0047aa8b          
0047aa8d          if (this != 0)
0047aa8d          {
0047aa8f              this->vtable->AddRef();
0047aa9a              *(uint32_t*)arg4 = this;
0047aaa0              __return->m_val = 0;
0047aaa7              return __return;
0047aa8d          }
0047aa3f      }
0047aa3f      
0047aaae      __return->m_val = 0x80004002;
0047aab5      return __return;
0047aa30  }

0047aab8                                                                          90 90 90 90 90 90 90 90                          ........

0047aac0  uint32_t __fastcall ClassFactoryForceClient_ClassType::Release(class ClassFactoryForceClient_ClassType const* this)

0047aac0  {
0047aad0      uint32_t m_cRef;
0047aad0      
0047aad0      if (InterlockedDecrement(&this->m_cTurbineRefCount.m_cRef) == 0)
0047aad0      {
0047aaf1          m_cRef = 0;
0047aad8      label_47aad8:
0047aad8          
0047aada          if (this != 0)
0047aada          {
0047aadd              this->m_cTurbineRefCount.vtable = 0x792b6c;
0047aae4              operator delete(this);
0047aada          }
0047aad0      }
0047aad0      else
0047aad0      {
0047aad2          m_cRef = this->m_cTurbineRefCount.m_cRef;
0047aad2          
0047aad6          if (m_cRef == 0)
0047aad6              goto label_47aad8;
0047aad0      }
0047aad0      
0047aaf0      return m_cRef;
0047aac0  }

0047aaf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0047ab00  class TResult* __stdcall ClassFactoryForceUIFlow_ClassType::CreateInstance(class ClassFactoryForceUIFlow_ClassType* this @ ecx, class TResult* __return, class Interface* arg3, struct Turbine_GUID const* arg4, void** arg5)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0047ab00  {
0047ab09      if (arg3 != 0)
0047ab09      {
0047ab0b          class TResult* __return_1 = __return;
0047ab0f          __return_1->m_val = 0x80040110;
0047ab18          return __return_1;
0047ab09      }
0047ab09      
0047ab20      void* eax = operator new(0x130);
0047ab2a      int32_t eax_1;
0047ab2a      
0047ab2a      if (eax == 0)
0047ab35          eax_1 = 0;
0047ab2a      else
0047ab2e          eax_1 = gmUIFlow::gmUIFlow(eax);
0047ab2e      
0047ab38      int32_t var_14 = eax_1;
0047ab42      int32_t* var_8 = nullptr;
0047ab4a      int32_t var_4 = 0;
0047ab52      int32_t* esp = &var_14;
0047ab5f      int32_t* var_c;
0047ab5f      var_8 = *(uint32_t*)InterfacePtr<class Interface>::_QueryInterface(&var_8, &var_c);
0047ab63      int32_t* ecx_3 = var_c;
0047ab67      class TResult* esi;
0047ab67      int32_t __saved_esi;
0047ab67      
0047ab67      if (arg4 == 0)
0047ab67      {
0047abaa          esi = __return_addr;
0047abae          esi->m_val = 0x80004003;
0047abae          
0047abb4          if (ecx_3 != 0)
0047abb4          {
0047abb8              *(uint32_t*)(*(uint32_t*)ecx_3 + 0x14)();
0047abb8              esp = &__saved_esi;
0047abb4          }
0047ab67      }
0047ab67      else
0047ab67      {
0047ab6a          arg4->m_data1 = 0;
0047ab7c          *(uint32_t*)(*(uint32_t*)ecx_3 + 0xc)(&__return, arg3, arg4);
0047ab7c          esp = &__saved_esi;
0047ab85          *(uint32_t*)(*(uint32_t*)var_8 + 0x14)();
0047ab88          int32_t* ecx_5 = var_8;
0047ab8e          esi = __return;
0047ab96          esi->m_val = arg3;
0047ab96          
0047ab98          if (ecx_5 != 0)
0047ab98          {
0047ab9c              *(uint32_t*)(*(uint32_t*)ecx_5 + 0x14)();
0047aba5              return esi;
0047ab98          }
0047ab67      }
0047abbd      *(uint32_t*)esp;
0047abc1      return esi;
0047ab00  }

0047abc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0047abd0  class TResult __thiscall InterfacePtr<class Interface>::_QueryInterface(InterfacePtr<class Interface>* this, class gmUIFlow* arg2)

0047abd0  {
0047abd0      InterfacePtr<class Interface>* this_1 = this;
0047abd4      int32_t* ecx = arg_8;
0047abd4      
0047abdb      if (ecx == 0)
0047abdb      {
0047ac4b          InterfacePtr<Interface>::operator=(this, nullptr);
0047ac59          arg2->vtable = 0x80004002;
0047ac5e          return arg2;
0047abdb      }
0047abdb      
0047abdd      int32_t eax = *(uint32_t*)ecx;
0047abee      arg_8 = nullptr;
0047abf9      int32_t edi = *(uint32_t*)*(uint32_t*)(eax + 0xc)(&this_1, 0x79e510, &arg_8);
0047abfd      int32_t* ecx_1 = *(uint32_t*)this;
0047abfd      
0047abff      if (edi < 0)
0047abff      {
0047ac03          if (ecx_1 != 0)
0047ac07              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0047ac07          
0047ac0e          *(uint32_t*)this = 0;
0047ac14          *(uint32_t*)((char*)this + 4) = 0;
0047ac1b          arg2->vtable = edi;
0047ac20          return arg2;
0047abff      }
0047abff      
0047ac26      int32_t* ebx = arg_8;
0047ac26      
0047ac2a      if (ecx_1 != 0)
0047ac2e          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0047ac2e      
0047ac35      *(uint32_t*)this = ebx;
0047ac37      *(uint32_t*)((char*)this + 4) = 0;
0047ac3f      arg2->vtable = edi;
0047ac44      return arg2;
0047abd0  }

0047ac61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0047ac70  void __thiscall gmCGSummaryPage::gmCGSummaryPage(class gmCGSummaryPage* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0047ac70  {
0047ac7f      UIElement_Field::UIElement_Field(this, arg2, arg3);
0047ac84      this->vtable = &gmUrgentAssistanceUI::`vftable';
0047ac90      this->m_pPlayerSystem = nullptr;
0047ac96      __builtin_memset(&this->m_pSummaryListbix, 0, 0x19);
0047acc0      this->m_uiErrorMessageContext = 0;
0047acc6      this->vtable = 0x79f030;
0047accc      this->vtable = &gmCGSummaryPage::`vftable';
0047ac70  }

0047acdc                                                                                      90 90 90 90                              ....

0047ace0  class UIElement* __thiscall gmCGSummaryPage::DynamicCast(class gmCGSummaryPage* this, uint32_t arg2) __pure

0047ace0  {
0047acec      if (arg2 == 0x1000003e)
0047acf9          return this;
0047acf9      
0047acf3      int32_t edx_1;
0047acf3      edx_1 = arg2 != 3;
0047acf7      return (this & (edx_1 - 1));
0047ace0  }

0047acfc                                                                                      90 90 90 90                              ....

0047ad00  uint32_t gmCGSummaryPage::GetUIElementType(class gmCGSummaryPage const* this @ ecx) __pure

0047ad00  {
0047ad05      return 0x1000003e;
0047ad00  }

0047ad06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0047ad10  void __fastcall gmCGSummaryPage::PostInit(class gmCGSummaryPage* this)

0047ad10  {
0047ad13      UIElement::PostInit(this);
0047ad18      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0047ad18      
0047ad1f      if (this != 0)
0047ad1f      {
0047ad27          eax->vtable->RegisterNoticeHandler(0x186a4, &this->vtable);
0047ad35          return;
0047ad1f      }
0047ad1f      
0047ad36      eax->vtable->RegisterNoticeHandler(0x186a4, 0);
0047ad10  }

0047ad47                       90 90 90 90 90 90 90 90 90                                                         .........

0047ad50  class UIElement* gmCGSummaryPage::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0047ad50  {
0047ad55      void* eax = operator new(0x624);
0047ad55      
0047ad5f      if (eax == 0)
0047ad75          return 0;
0047ad75      
0047ad72      return gmCGSummaryPage::gmCGSummaryPage(eax, arg1, arg2);
0047ad50  }

0047ad76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0047ad80  void __thiscall gmCGSummaryPage::RecvNotice_CloseDialog(class gmCGSummaryPage* this, uint32_t arg2, class PropertyCollection const* arg3)

0047ad80  {
0047ad87      if (arg2 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7])
0047ad89          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = nullptr;
0047ad80  }

0047ad93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0047ada0  void* __thiscall gmCGSummaryPage::`scalar deleting destructor'(class gmCGSummaryPage* this, uint32_t arg2)

0047ada0  {
0047adaa      this->vtable = 0x79f030;
0047ada4      this->vtable = &gmCGSummaryPage::`vftable';
0047adb6      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0047adb6      
0047adbd      if (eax != 0)
0047adbf          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0047adbf      
0047ada4      this->vtable = &gmUrgentAssistanceUI::`vftable';
0047adcf      NoticeHandler::~NoticeHandler(&this->vtable);
0047add6      UIElement_Field::~UIElement_Field(this);
0047add6      
0047ade0      if ((arg2 & 1) != 0)
0047ade3          operator delete(this);
0047ade3      
0047adef      return this;
0047ada0  }

0047adf2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0047ae00  void gmCGSummaryPage::Register()

0047ae00  {
0047ae0a      UIElement::RegisterElementClass(0x1000003e, gmCGSummaryPage::Create);
0047ae00  }

0047ae13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0047ae20  void __fastcall gmCGSummaryPage::SetHowToText(class gmCGSummaryPage* this)

0047ae20  {
0047ae32      void var_90;
0047ae32      StringInfo::StringInfo(&var_90);
0047ae51      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_SummaryHowTo"), 0x10000002);
0047ae5d      void var_120;
0047ae5d      StringInfo::StringInfo(&var_120);
0047ae7c      StringInfo::SetStringIDandTableEnum(&var_120, compute_str_hash("ID_CharGen_SummaryHowToEnd"), 0x10000002);
0047ae92      uint32_t mGender = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->mGender;
0047ae9d      uint32_t mHeritageGroup = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->mHeritageGroup;
0047aea7      void var_1b0;
0047aea7      StringInfo::StringInfo(&var_1b0);
0047aea7      
0047aeb2      if ((mHeritageGroup - 1) <= 0xc)
0047aeb2      {
0047aeb2          void (__thiscall** const var_1cc_2)(class gmNoticeHandler* this, uint32_t);
0047aeb2          uint32_t eax_5;
0047aeb2          
0047aeb2          switch (mHeritageGroup)
0047aeb2          {
0047aec2              case 1:
0047aec2              {
0047aec2                  int32_t var_1c8_1 = 0x10000002;
0047aec2                  
0047aec7                  if (mGender != 2)
0047aed3                      var_1cc_2 = "ID_CharGen_AluMaleNames";
0047aec7                  else
0047aec9                      var_1cc_2 = "ID_CharGen_AluFemaleNames";
0047aec9                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047aec2                  break;
0047aec2              }
0047aee0              case 2:
0047aee0              {
0047aee0                  int32_t var_1c8_2 = 0x10000002;
0047aee0                  
0047aee5                  if (mGender != 2)
0047aef1                      var_1cc_2 = "ID_CharGen_GharuMaleNames";
0047aee5                  else
0047aee7                      var_1cc_2 = "ID_CharGen_GharuFemaleNames";
0047aee7                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047aee0                  break;
0047aee0              }
0047aefe              case 3:
0047aefe              {
0047aefe                  int32_t var_1c8_3 = 0x10000002;
0047aefe                  
0047af03                  if (mGender != 2)
0047af0f                      var_1cc_2 = "ID_CharGen_ShoMaleNames";
0047af03                  else
0047af05                      var_1cc_2 = "ID_CharGen_ShoFemaleNames";
0047af05                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047aefe                  break;
0047aefe              }
0047af1c              case 4:
0047af1c              {
0047af1c                  int32_t var_1c8_4 = 0x10000002;
0047af1c                  
0047af21                  if (mGender != 2)
0047af2d                      var_1cc_2 = "ID_CharGen_ViaMaleNames";
0047af21                  else
0047af23                      var_1cc_2 = "ID_CharGen_ViaFemaleNames";
0047af23                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047af1c                  break;
0047af1c              }
0047af3a              case 5:
0047af3a              case 0xa:
0047af3a              {
0047af3a                  int32_t var_1c8_5 = 0x10000002;
0047af3a                  
0047af3f                  if (mGender != 2)
0047af55                      eax_5 = compute_str_hash(&gmCGSummaryPage::`vftable'.RecvNotice_UpdateToolbarSelectionDisplay);
0047af3f                  else
0047af46                      eax_5 = compute_str_hash(&gmCGSummaryPage::`vftable'.RecvNotice_BookDeletePageResponse);
0047af3a                  break;
0047af3a              }
0047af62              case 6:
0047af62              {
0047af62                  int32_t var_1c8_6 = 0x10000002;
0047af62                  
0047af67                  if (mGender != 2)
0047af70                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_RefreshOptionsPanel;
0047af67                  else
0047af69                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_SplitStack;
0047af69                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047af62                  break;
0047af62              }
0047afaa              case 7:
0047afaa              {
0047afaa                  int32_t var_1c8_9 = 0x10000002;
0047afaa                  
0047afaf                  if (mGender != 2)
0047afb8                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_UpdateSpellComponents;
0047afaf                  else
0047afb1                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_ChatCommand_RemoveAllFriends;
0047afb1                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047afaa                  break;
0047afaa              }
0047afc2              case 8:
0047afc2              {
0047afc2                  int32_t var_1c8_10 = 0x10000002;
0047afc2                  
0047afc7                  if (mGender != 2)
0047afd0                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_EnchantmentsChanged;
0047afc7                  else
0047afc9                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_NextSpellTab;
0047afc9                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047afc2                  break;
0047afc2              }
0047af92              case 9:
0047af92              {
0047af92                  int32_t var_1c8_8 = 0x10000002;
0047af92                  
0047af97                  if (mGender != 2)
0047afa0                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_UpdateFriendsList;
0047af97                  else
0047af99                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_OpenTrade;
0047af99                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047af92                  break;
0047af92              }
0047af7a              case 0xb:
0047af7a              {
0047af7a                  int32_t var_1c8_7 = 0x10000002;
0047af7a                  
0047af7f                  if (mGender != 2)
0047af88                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_ClearChatBuffer;
0047af7f                  else
0047af81                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_GameplayOptionChanged;
0047af81                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047af7a                  break;
0047af7a              }
0047afda              case 0xc:
0047afda              case 0xd:
0047afda              {
0047afda                  int32_t var_1c8_11 = 0x10000002;
0047afda                  
0047afdf                  if (mGender != 2)
0047afe8                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_AddSalvageItem;
0047afdf                  else
0047afe1                      var_1cc_2 = &gmCGSummaryPage::`vftable'.RecvNotice_SetGroundObject;
0047afe1                  
0047afed                  eax_5 = Tokenize(var_1cc_2);
0047afda                  break;
0047afda              }
0047aeb2          }
0047aeb2          
0047affa          StringInfo::SetStringIDandTableEnum(&var_1b0, eax_5, 0x10000002);
0047aeb2      }
0047aeb2      
0047afff      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0047b00a      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_1;
0047b012      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0047b014      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0047b019      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0047b021      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0047b021      
0047b038      if (StringInfo::InqString(&var_90, &PStringBase<unsigned short>::s_NullBuffer_3, 0) != 0)
0047b038      {
0047b03e          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_3;
0047b042          int32_t eax_9 = PStringBase<unsigned short>::s_NullBuffer_5->m_data[0x7ffffffffffffffe];
0047b042          
0047b048          if (eax_9 != 1)
0047b051              PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_4, PStringBase<unsigned short>::s_NullBuffer_5, (eax_9 - 1));
0047b051          
0047b068          if (StringInfo::InqString(&var_1b0, &PStringBase<unsigned short>::s_NullBuffer_3, 0) != 0)
0047b068          {
0047b06a              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_3;
0047b06e              int32_t eax_12 = PStringBase<unsigned short>::s_NullBuffer_6->m_data[0x7ffffffffffffffe];
0047b06e              
0047b074              if (eax_12 != 1)
0047b07d                  PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_4, PStringBase<unsigned short>::s_NullBuffer_6, (eax_12 - 1));
0047b07d              
0047b090              uint8_t eax_14;
0047b090              void* ebx_1;
0047b090              eax_14 = StringInfo::InqString(&var_120, &PStringBase<unsigned short>::s_NullBuffer_3, 0);
0047b090              
0047b097              if (eax_14 != 0)
0047b097              {
0047b099                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_3;
0047b09d                  int32_t eax_15 = PStringBase<unsigned short>::s_NullBuffer_7->m_data[0x7ffffffffffffffe];
0047b09d                  
0047b0a3                  if (eax_15 != 1)
0047b0ac                      PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_4, PStringBase<unsigned short>::s_NullBuffer_7, (eax_15 - 1));
0047b0ac                  
0047b0bc                  UIElement_Text::SetText(*(uint32_t*)((char*)ebx_1 + 0x60c), &PStringBase<unsigned short>::s_NullBuffer_4);
0047b097              }
0047b068          }
0047b038      }
0047b038      
0047b0cb      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
0047b0cb      
0047b0da      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0047b0e2          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0047b0e2      
0047b0e8      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
0047b0e8      
0047b0f7      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0047b0ff          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0047b0ff      
0047b105      StringInfo::~StringInfo(&var_1b0);
0047b111      StringInfo::~StringInfo(&var_120);
0047b11d      StringInfo::~StringInfo(&var_90);
0047ae20  }

0047b12c  uint32_t jump_table_47b12c[0xd] = 
0047b12c  {
0047b12c      [0x0] =  0x0047aebf
0047b130      [0x1] =  0x0047aedd
0047b134      [0x2] =  0x0047aefb
0047b138      [0x3] =  0x0047af19
0047b13c      [0x4] =  0x0047af37
0047b140      [0x5] =  0x0047af5f
0047b144      [0x6] =  0x0047afa7
0047b148      [0x7] =  0x0047afbf
0047b14c      [0x8] =  0x0047af8f
0047b150      [0x9] =  0x0047af37
0047b154      [0xa] =  0x0047af77
0047b158      [0xb] =  0x0047afd7
0047b15c      [0xc] =  0x0047afd7
0047b160  }

0047b160  void __thiscall PStringBase<unsigned short>::append_int32(class PStringBase<unsigned short>* this, int32_t arg2)

0047b160  {
0047b160      class PStringBase<unsigned short>* var_4 = this;
0047b161      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0047b167      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
0047b171      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0047b17b      int32_t var_c_1 = arg2;
0047b186      PStringBase<unsigned short>::sprintf(&var_4, &data_79ed80);
0047b18b      class PStringBase<unsigned short>* ecx = var_4;
0047b18f      int32_t m_charbuffer = ecx->m_charbuffer;
0047b18f      
0047b198      if (m_charbuffer != 1)
0047b198      {
0047b19f          PStringBase<unsigned short>::append_n_chars(this, ecx, (m_charbuffer - 1));
0047b1a4          ecx = var_4;
0047b198      }
0047b198      
0047b1bb      if ((InterlockedDecrement(&ecx[-4]) == 0 && ecx != 0x14))
0047b1c3          *(uint32_t*)*(int32_t*)((char*)ecx + -0x14)(1);
0047b160  }

0047b1ca                                90 90 90 90 90 90                                                            ......

0047b1d0  void __fastcall gmCGSummaryPage::SetSummaryText(class gmCGSummaryPage* this)

0047b1d0  {
0047b1e3      UIElement_ListBox::Flush(this->m_pSummaryListbix);
0047b1e8      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0047b1ed      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_1;
0047b1f5      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0047b201      class ClientCharGenState* eax_1 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047b20e      int32_t template_ = eax_1->template_;
0047b22c      PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_9, u"Profession: ", wcslen(u"Profession: "));
0047b22c      
0047b238      if ((template_ >= 0 && template_ <= 6))
0047b238      {
0047b23a          int16_t* esi = pcProfessions[template_];
0047b23a          
0047b249          if ((esi != 0 && *(uint16_t*)esi != 0))
0047b257              PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_9, esi, wcslen(esi));
0047b238      }
0047b238      
0047b272      class UIElement* eax_5 = UIElement::GetChildRecursive(UIElement_ListBox::AddItemFromTemplateList(this->m_pSummaryListbix, 0, nullptr), 0x100002f9);
0047b279      int32_t eax_68;
0047b279      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_13;
0047b279      
0047b279      if (eax_5 == 0)
0047b279      {
0047ba36      label_47ba36:
0047ba36          esi_13 = &PStringBase<unsigned short>::s_NullBuffer_9->m_data[-0xa];
0047ba3d          eax_68 = InterlockedDecrement(((char*)esi_13 + 4));
0047b279      }
0047b279      else
0047b279      {
0047b285          class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
0047b285          
0047b28d          if (eax_6 == 0)
0047b28d              goto label_47ba36;
0047b28d          
0047b29a          UIElement_Text::SetText(eax_6, &PStringBase<unsigned short>::s_NullBuffer_9);
0047b29f          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_9;
0047b29f          
0047b2a9          if (PStringBase<unsigned short>::s_NullBuffer_11 != PStringBase<unsigned short>::s_NullBuffer)
0047b2a9          {
0047b2be              if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_11->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_11 != 0x14))
0047b2c6                  *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_11 + -0x14)(1);
0047b2c6              
0047b2c8              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0047b2cd              PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_2;
0047b2d5              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0047b2a9          }
0047b2a9          
0047b2db          uint32_t mGender = eax_1->mGender;
0047b2f5          PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_9, u"Gender: ", wcslen(u"Gender: "));
0047b2f5          
0047b2fd          if (mGender <= 2)
0047b2fd          {
0047b2ff              int16_t* esi_2 = pcGender[mGender];
0047b2ff              
0047b30e              if ((esi_2 != 0 && *(uint16_t*)esi_2 != 0))
0047b31c                  PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_9, esi_2, wcslen(esi_2));
0047b2fd          }
0047b2fd          
0047b337          class UIElement* eax_13 = UIElement::GetChildRecursive(UIElement_ListBox::AddItemFromTemplateList(this->m_pSummaryListbix, 0, nullptr), 0x100002f9);
0047b337          
0047b33e          if (eax_13 == 0)
0047b33e              goto label_47ba36;
0047b33e          
0047b34a          class UIElement_Text* eax_14 = eax_13->vtable->DynamicCast(0xc);
0047b34a          
0047b352          if (eax_14 == 0)
0047b352              goto label_47ba36;
0047b352          
0047b35f          UIElement_Text::SetText(eax_14, &PStringBase<unsigned short>::s_NullBuffer_9);
0047b368          PStringBase<unsigned short>::clear(&PStringBase<unsigned short>::s_NullBuffer_9);
0047b36d          uint32_t mHeritageGroup = eax_1->mHeritageGroup;
0047b387          PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_9, u"Heritage: ", wcslen(u"Heritage: "));
0047b387          
0047b38f          if (mHeritageGroup <= 4)
0047b39d              PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, pcHeritage[mHeritageGroup]);
0047b39d          
0047b3b8          class UIElement* eax_17 = UIElement::GetChildRecursive(UIElement_ListBox::AddItemFromTemplateList(this->m_pSummaryListbix, 0, nullptr), 0x100002f9);
0047b3b8          
0047b3bf          if (eax_17 == 0)
0047b3bf              goto label_47ba36;
0047b3bf          
0047b3cb          class UIElement_Text* eax_18 = eax_17->vtable->DynamicCast(0xc);
0047b3cb          
0047b3d3          if (eax_18 == 0)
0047b3d3              goto label_47ba36;
0047b3d3          
0047b3e0          UIElement_Text::SetText(eax_18, &PStringBase<unsigned short>::s_NullBuffer_9);
0047b3e9          PStringBase<unsigned short>::clear(&PStringBase<unsigned short>::s_NullBuffer_9);
0047b3ee          int32_t startArea = eax_1->startArea;
0047b408          PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_9, u"Starting Town: ", wcslen(u"Starting Town: "));
0047b408          
0047b414          if ((startArea >= 0 && startArea <= 3))
0047b422              PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, pcTown[startArea]);
0047b422          
0047b43d          class UIElement* eax_21 = UIElement::GetChildRecursive(UIElement_ListBox::AddItemFromTemplateList(this->m_pSummaryListbix, 0, nullptr), 0x100002f9);
0047b43d          
0047b444          if (eax_21 == 0)
0047b444          {
0047b724          label_47b724:
0047b724              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_9);
0047b730              return;
0047b444          }
0047b444          
0047b450          class UIElement_Text* eax_22 = eax_21->vtable->DynamicCast(0xc);
0047b450          
0047b458          if (eax_22 == 0)
0047b458              goto label_47b724;
0047b458          
0047b465          UIElement_Text::SetText(eax_22, &PStringBase<unsigned short>::s_NullBuffer_9);
0047b46e          PStringBase<unsigned short>::clear(&PStringBase<unsigned short>::s_NullBuffer_9);
0047b47c          PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Attributes");
0047b497          class UIElement* eax_24 = UIElement::GetChildRecursive(UIElement_ListBox::AddItemFromTemplateList(this->m_pSummaryListbix, 1, nullptr), 0x100000fe);
0047b497          
0047b49e          if (eax_24 == 0)
0047b49e              goto label_47b724;
0047b49e          
0047b4aa          class UIElement_Text* eax_25 = eax_24->vtable->DynamicCast(0xc);
0047b4aa          
0047b4b2          if (eax_25 == 0)
0047b4b2              goto label_47b724;
0047b4b2          
0047b4bf          UIElement_Text::SetText(eax_25, &PStringBase<unsigned short>::s_NullBuffer_9);
0047b4c8          PStringBase<unsigned short>::clear(&PStringBase<unsigned short>::s_NullBuffer_9);
0047b4cd          int32_t var_4;
0047b4cd          int32_t esi_3 = var_4;
0047b4d1          int32_t ebx_1 = 0;
0047b4d1          
0047b4d3          while (true)
0047b4d3          {
0047b4d3              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
0047b4d8              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_3;
0047b4e0              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0047b4ea              PStringBase<unsigned short>::clear(&PStringBase<unsigned short>::s_NullBuffer_9);
0047b4f3              PStringBase<unsigned short>::clear(&PStringBase<unsigned short>::s_NullBuffer_10);
0047b4f3              
0047b501              switch (ebx_1)
0047b501              {
0047b511                  case 0:
0047b511                  {
0047b511                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Strength");
0047b516                      esi_3 = eax_1->strength;
0047b511                      break;
0047b511                  }
0047b52a                  case 1:
0047b52a                  {
0047b52a                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Endurance");
0047b52f                      esi_3 = eax_1->endurance;
0047b52a                      break;
0047b52a                  }
0047b543                  case 2:
0047b543                  {
0047b543                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Coordination");
0047b548                      esi_3 = eax_1->coordination;
0047b543                      break;
0047b543                  }
0047b55c                  case 3:
0047b55c                  {
0047b55c                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Quickness");
0047b561                      esi_3 = eax_1->quickness;
0047b55c                      break;
0047b55c                  }
0047b575                  case 4:
0047b575                  {
0047b575                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Focus");
0047b57a                      esi_3 = eax_1->focus;
0047b575                      break;
0047b575                  }
0047b58e                  case 5:
0047b58e                  {
0047b58e                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Self");
0047b593                      esi_3 = eax_1->self;
0047b58e                      break;
0047b58e                  }
0047b5a7                  case 6:
0047b5a7                  {
0047b5a7                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Health");
0047b5b0                      CharGenState::GetAttribute(eax_1, 2);
0047b5ce                      esi_3 = _ftol2();
0047b5a7                      break;
0047b5a7                  }
0047b5db                  case 7:
0047b5db                  {
0047b5db                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Stamina");
0047b5e9                      esi_3 = CharGenState::GetAttribute(eax_1, 2);
0047b5db                      break;
0047b5db                  }
0047b5f6                  case 8:
0047b5f6                  {
0047b5f6                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Mana");
0047b604                      esi_3 = CharGenState::GetAttribute(eax_1, 6);
0047b5f6                      break;
0047b5f6                  }
0047b611                  case 9:
0047b611                  {
0047b611                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Skill Credits");
0047b616                      esi_3 = eax_1->remainingSkillCredits;
0047b611                      break;
0047b611                  }
0047b501              }
0047b501              
0047b62a              class UIElement* eax_31 = UIElement_ListBox::AddItemFromTemplateList(this->m_pSummaryListbix, 2, nullptr);
0047b638              class UIElement* eax_32 = UIElement::GetChildRecursive(eax_31, 0x100002fc);
0047b638              
0047b63f              if (eax_32 != 0)
0047b63f              {
0047b64b                  class UIElement_Text* eax_33 = eax_32->vtable->DynamicCast(0xc);
0047b64b                  
0047b653                  if (eax_33 != 0)
0047b653                  {
0047b660                      UIElement_Text::SetText(eax_33, &PStringBase<unsigned short>::s_NullBuffer_9);
0047b66c                      class UIElement* eax_34 = UIElement::GetChildRecursive(eax_31, 0x100002fd);
0047b66c                      
0047b673                      if (eax_34 != 0)
0047b673                      {
0047b67f                          class UIElement_Text* eax_35 = eax_34->vtable->DynamicCast(0xc);
0047b67f                          
0047b689                          if (eax_35 != 0)
0047b689                          {
0047b694                              PStringBase<unsigned short>::append_int32(&PStringBase<unsigned short>::s_NullBuffer_10, esi_3);
0047b6a0                              UIElement_Text::SetText(eax_35, &PStringBase<unsigned short>::s_NullBuffer_10);
0047b6a9                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_10);
0047b6ae                              ebx_1 += 1;
0047b6ae                              
0047b6b2                              if (ebx_1 < 0xa)
0047b6b2                                  continue;
0047b6b2                              
0047b6be                              class PackableHashTable<unsigned long,SkillBase>* ebp_2 = &eax_1->skillTable->_skillBaseHash;
0047b6c1                              void* __offset(PStringBase<unsigned short>, 0x1) edi_3 = nullptr;
0047b6c7                              class PStringBase<unsigned short>* var_10_2 = nullptr;
0047b6cb                          label_47b6cb:
0047b6cb                              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_14 = PStringBase<unsigned short>::s_NullBuffer_9;
0047b6cb                              
0047b6e1                              if (PStringBase<unsigned short>::s_NullBuffer_14 != PStringBase<unsigned short>::s_NullBuffer)
0047b6e1                              {
0047b6f2                                  if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_14->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_14 != 0x14))
0047b6fa                                      *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_14 + -0x14)(1);
0047b6fa                                  
0047b6fc                                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
0047b701                                  PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_4;
0047b709                                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
0047b6e1                              }
0047b6e1                              
0047b710                              enum SKILL_ADVANCEMENT_CLASS var_14;
0047b710                              
0047b710                              switch (edi_3)
0047b710                              {
0047b73a                                  case nullptr:
0047b73a                                  {
0047b73a                                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Specialized Skills");
0047b73f                                      var_14 = SPECIALIZED_SKILL_ADVANCEMENT_CLASS;
0047b73a                                      break;
0047b73a                                  }
0047b752                                  case 1:
0047b752                                  {
0047b752                                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Trained Skills");
0047b757                                      var_14 = TRAINED_SKILL_ADVANCEMENT_CLASS;
0047b752                                      break;
0047b752                                  }
0047b761                                  case 2:
0047b761                                  {
0047b771                                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Useable Untrained Skills");
0047b776                                      var_14 = UNTRAINED_SKILL_ADVANCEMENT_CLASS;
0047b761                                      break;
0047b761                                  }
0047b768                                  case 3:
0047b768                                  {
0047b771                                      PStringBase<unsigned short>::append_string(&PStringBase<unsigned short>::s_NullBuffer_9, u"Unuseable Untrained Skills");
0047b776                                      var_14 = UNTRAINED_SKILL_ADVANCEMENT_CLASS;
0047b768                                      break;
0047b768                                  }
0047b710                              }
0047b710                              
0047b798                              class UIElement* eax_40 = UIElement::GetChildRecursive(UIElement_ListBox::AddItemFromTemplateList(this->m_pSummaryListbix, 1, nullptr), 0x100000fe);
0047b79f                              class UIElement_Text* eax_41;
0047b79f                              
0047b79f                              if (eax_40 != 0)
0047b7ab                                  eax_41 = eax_40->vtable->DynamicCast(0xc);
0047b7ab                              
0047b7b3                              if ((eax_40 == 0 || eax_41 == 0))
0047b7b3                              {
0047b9f5                                  esi_13 = &PStringBase<unsigned short>::s_NullBuffer_9->m_data[-0xa];
0047b9fc                                  eax_68 = InterlockedDecrement(((char*)esi_13 + 4));
0047b7b3                              }
0047b7b3                              else
0047b7b3                              {
0047b7c0                                  UIElement_Text::SetText(eax_41, &PStringBase<unsigned short>::s_NullBuffer_9);
0047b7c5                                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_15 = PStringBase<unsigned short>::s_NullBuffer_9;
0047b7c5                                  
0047b7cf                                  if (PStringBase<unsigned short>::s_NullBuffer_15 != PStringBase<unsigned short>::s_NullBuffer)
0047b7cf                                  {
0047b7e0                                      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_15->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_15 != 0x14))
0047b7e8                                          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_15 + -0x14)(1);
0047b7e8                                      
0047b7ea                                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
0047b7ef                                      PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_5;
0047b7f7                                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
0047b7cf                                  }
0047b7cf                                  
0047b7fd                                  class ListNode<SkillRecord *>* ebp_3 = eax_1->skillRecordList._head;
0047b7fd                                  
0047b805                                  while (true)
0047b805                                  {
0047b805                                      if (ebp_3 == 0)
0047b805                                      {
0047b9e0                                          void* __offset(PStringBase<unsigned short>, 0x1) eax_66 = (&var_10_2->m_charbuffer + 1);
0047b9e4                                          var_10_2 = eax_66;
0047b9e4                                          
0047b9e8                                          if (eax_66 >= 4)
0047b9e8                                              goto label_47ba36;
0047b9e8                                          
0047b9ea                                          edi_3 = eax_66;
0047b9ec                                          goto label_47b6cb;
0047b805                                      }
0047b805                                      
0047b80b                                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer;
0047b816                                      PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_6;
0047b81e                                      int32_t* edx_15 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_6->m_data[-8]);
0047b820                                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_12 = PStringBase<unsigned short>::s_NullBuffer_9;
0047b820                                      
0047b82a                                      if (PStringBase<unsigned short>::s_NullBuffer_12 != PStringBase<unsigned short>::s_NullBuffer)
0047b82a                                      {
0047b83f                                          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_12->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_12 != 0x14))
0047b847                                              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_12 + -0x14)(1);
0047b847                                          
0047b849                                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer;
0047b84e                                          PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_7;
0047b856                                          edx_15 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_7->m_data[-8]);
0047b82a                                      }
0047b82a                                      
0047b858                                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_10;
0047b858                                      
0047b862                                      if (PStringBase<unsigned short>::s_NullBuffer_13 != PStringBase<unsigned short>::s_NullBuffer)
0047b862                                      {
0047b877                                          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_13->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_13 != 0x14))
0047b87f                                              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_13 + -0x14)(1);
0047b87f                                          
0047b881                                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer;
0047b886                                          PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_8;
0047b88e                                          edx_15 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_8->m_data[-8]);
0047b862                                      }
0047b862                                      
0047b894                                      uint32_t _table_size = ebp_2->_table_size;
0047b899                                      class SkillRecord* data = ebp_3->data;
0047b89c                                      void* edi_4;
0047b89c                                      
0047b89c                                      if (_table_size == 0)
0047b89c                                      {
0047b8c0                                      label_47b8c0:
0047b8c0                                          edi_4 = nullptr;
0047b89c                                      }
0047b89c                                      else
0047b89c                                      {
0047b89e                                          class PackableHashData<unsigned long,SkillBase>** _buckets = ebp_2->_buckets;
0047b89e                                          
0047b8a3                                          if (_buckets == 0)
0047b8a3                                          {
0047b8c0                                          label_47b8c0_1:
0047b8c0                                              edi_4 = nullptr;
0047b8a3                                          }
0047b8a3                                          else
0047b8a3                                          {
0047b8a5                                              uint32_t id = data->id;
0047b8ae                                              edx_15 = _buckets[(COMBINE(0, id) % _table_size)];
0047b8ae                                              
0047b8b3                                              if (edx_15 == 0)
0047b8b3                                              {
0047b8c0                                              label_47b8c0_2:
0047b8c0                                                  edi_4 = nullptr;
0047b8b3                                              }
0047b8b3                                              else
0047b8b3                                              {
0047b8b7                                                  while (id != *(uint32_t*)edx_15)
0047b8b7                                                  {
0047b8b9                                                      edx_15 = edx_15[0x18];
0047b8b9                                                      
0047b8be                                                      if (edx_15 == 0)
0047b8be                                                          goto label_47b8c0_2;
0047b8b7                                                  }
0047b8b7                                                  
0047b8f7                                                  edi_4 = &edx_15[2];
0047b8b3                                              }
0047b8a3                                          }
0047b89c                                      }
0047b89c                                      
0047b8d5                                      if (CharGenState::GetSkillLevel(eax_1, data->id) == var_14)
0047b8d5                                      {
0047b8e6                                          if (var_10_2 <= 1)
0047b8e6                                          {
0047b90a                                          label_47b90a:
0047b90a                                              class SkillRecord* data_1 = data;
0047b90f                                              void* const var_34_3 = &data_79f3f0;
0047b914                                              class PSRefBufferCharData<unsigned short>** var_38_1 = &PStringBase<unsigned short>::s_NullBuffer_9;
0047b915                                              PStringBase<unsigned short>::sprintf_append(var_10_2, edx_15);
0047b923                                              int32_t eax_57 = CharGenState::GetSkillScore(eax_1, data->id);
0047b938                                              class UIElement* eax_59 = UIElement_ListBox::AddItemFromTemplateList(this->m_pSummaryListbix, 2, nullptr);
0047b946                                              class UIElement* eax_60 = UIElement::GetChildRecursive(eax_59, 0x100002fc);
0047b946                                              
0047b94d                                              if (eax_60 == 0)
0047b94d                                              {
0047ba0a                                              label_47ba0a:
0047ba0a                                                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_15 = &PStringBase<unsigned short>::s_NullBuffer_10->m_data[-0xa];
0047ba0a                                                  
0047ba19                                                  if ((InterlockedDecrement(((char*)esi_15 + 4)) == 0 && esi_15 != 0))
0047ba21                                                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_15) + -0x14)(1);
0047ba21                                                  
0047ba27                                                  esi_13 = &PStringBase<unsigned short>::s_NullBuffer_9->m_data[-0xa];
0047ba2e                                                  eax_68 = InterlockedDecrement(((char*)esi_13 + 4));
0047ba30                                                  break;
0047b94d                                              }
0047b94d                                              
0047b959                                              class UIElement_Text* eax_61 = eax_60->vtable->DynamicCast(0xc);
0047b959                                              
0047b961                                              if (eax_61 == 0)
0047b961                                                  goto label_47ba0a;
0047b961                                              
0047b96e                                              UIElement_Text::SetText(eax_61, &PStringBase<unsigned short>::s_NullBuffer_9);
0047b97a                                              class UIElement* eax_62 = UIElement::GetChildRecursive(eax_59, 0x100002fd);
0047b97a                                              
0047b981                                              if (eax_62 == 0)
0047b981                                                  goto label_47ba0a;
0047b981                                              
0047b989                                              class UIElement_Text* eax_63 = eax_62->vtable->DynamicCast(0xc);
0047b989                                              
0047b993                                              if (eax_63 == 0)
0047b993                                                  goto label_47ba0a;
0047b993                                              
0047b99a                                              PStringBase<unsigned short>::append_int32(&PStringBase<unsigned short>::s_NullBuffer_10, eax_57);
0047b9a6                                              UIElement_Text::SetText(eax_63, &PStringBase<unsigned short>::s_NullBuffer_10);
0047b8e6                                          }
0047b8e6                                          else if (var_10_2 != 2)
0047b8eb                                          {
0047b904                                              if ((var_10_2 != 3 || *(uint32_t*)((char*)edi_4 + 0x20) > 1))
0047b8ff                                                  goto label_47b90a;
0047b8eb                                          }
0047b8eb                                          else if (*(uint32_t*)((char*)edi_4 + 0x20) <= 1)
0047b8f0                                              goto label_47b90a;
0047b8d5                                      }
0047b8d5                                      
0047b9af                                      ebp_3 = ebp_3->next;
0047b9b2                                      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_11 = &PStringBase<unsigned short>::s_NullBuffer_10->m_data[-0xa];
0047b9b2                                      
0047b9c1                                      if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
0047b9d5                                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
0047b805                                  }
0047b7b3                              }
0047b7b3                              
0047b70e                              break;
0047b689                          }
0047b673                      }
0047b653                  }
0047b63f              }
0047b63f              
0047b71b              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_10);
0047b71b              goto label_47b724;
0047b4d3          }
0047b279      }
0047b279      
0047ba49      if ((eax_68 == 0 && esi_13 != 0))
0047ba51          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_13) + -0x14)(1);
0047b1d0  }

0047ba5b                                                                                   90                                         .
0047ba5c  uint32_t jump_table_47ba5c[0xa] = 
0047ba5c  {
0047ba5c      [0x0] =  0x0047b508
0047ba60      [0x1] =  0x0047b521
0047ba64      [0x2] =  0x0047b53a
0047ba68      [0x3] =  0x0047b553
0047ba6c      [0x4] =  0x0047b56c
0047ba70      [0x5] =  0x0047b585
0047ba74      [0x6] =  0x0047b59e
0047ba78      [0x7] =  0x0047b5d2
0047ba7c      [0x8] =  0x0047b5ed
0047ba80      [0x9] =  0x0047b608
0047ba84  }
0047ba84  uint32_t jump_table_47ba84[0x4] = 
0047ba84  {
0047ba84      [0x0] =  0x0047b731
0047ba88      [0x1] =  0x0047b749
0047ba8c      [0x2] =  0x0047b761
0047ba90      [0x3] =  0x0047b768
0047ba94  }

0047ba94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0047baa0  void __fastcall gmCGSummaryPage::Update(class gmCGSummaryPage* this)

0047baa0  {
0047bab0      if (UIElement::IsVisible(this) != 0)
0047bab0      {
0047babd          class ClientCharGenState* eax_1 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047bac4          uint32_t mHeritageGroup = eax_1->mHeritageGroup;
0047bacd          class AC1Legacy::Vector3* var_b8_1;
0047bacd          int32_t* var_b4_1;
0047bacd          int32_t var_a8;
0047bacd          int32_t var_9c;
0047bacd          
0047bacd          if (mHeritageGroup != 0xc)
0047bacd          {
0047bafe              int32_t var_a0_2 = 0;
0047bb06              int32_t var_a4_2 = 0;
0047bb06              
0047bb0e              if (mHeritageGroup != 0xd)
0047bb0e              {
0047bb30                  var_b4_1 = &var_a8;
0047bb35                  int32_t var_98_3 = 0xc0200000;
0047bb3d                  int32_t var_94_3;
0047bb3d                  __builtin_strncpy(&var_94_3, "33s?", 4);
0047bb45                  var_b8_1 = &var_9c;
0047bb0e              }
0047bb0e              else
0047bb0e              {
0047bb14                  var_b4_1 = &var_a8;
0047bb19                  int32_t var_98_2 = 0xc0b66666;
0047bb21                  int32_t var_94_2 = 0x3fd33333;
0047bb29                  var_b8_1 = &var_9c;
0047bb0e              }
0047bacd          }
0047bacd          else
0047bacd          {
0047bad3              var_b4_1 = &var_9c;
0047bad8              int32_t var_98_1 = 0;
0047bae0              int32_t var_94_1 = 0;
0047bae8              int32_t var_a4_1 = 0xc0733333;
0047baf0              int32_t var_a0_1 = 0x3f933333;
0047baf8              var_b8_1 = &var_a8;
0047bacd          }
0047bacd          
0047bb46          class gmCG3DView* m_p3DView = this->m_p3DView;
0047bb4c          var_a8 = 0;
0047bb54          var_9c = 0;
0047bb5c          gmCG3DView::SetCamera(m_p3DView, var_b8_1, var_b4_1);
0047bb63          CharGenState::FitTemplateToCharacter(eax_1);
0047bb6a          gmCGSummaryPage::SetSummaryText(this);
0047bb71          gmCGSummaryPage::SetHowToText(this);
0047bb7c          gmCG3DView::Update(this->m_p3DView);
0047bb81          this->m_pNameText->vtable->TakeFocus();
0047bb81          
0047bb98          if (this->m_bNameEntered == 0)
0047bb98          {
0047bb9e              void var_90;
0047bb9e              StringInfo::StringInfo(&var_90);
0047bbba              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_NamePrompt"), 0x10000002);
0047bbca              UIElement_Text::SetStringInfo(this->m_pNameText, &var_90);
0047bbd5              UIElement_Text::SelectAll(this->m_pNameText);
0047bbde              StringInfo::~StringInfo(&var_90);
0047bb98          }
0047bab0      }
0047baa0  }

0047bbeb                                   90 90 90 90 90                                                             .....

0047bbf0  void __thiscall gmCGSummaryPage::InitializePage(class gmCGSummaryPage* this, class gmCharGenMainUI* arg2)

0047bbf0  {
0047bbfa      this->m_pMainFramework = arg2;
0047bc0c      this->m_pPlayerSystem = CPlayerSystem::GetPlayerSystem();
0047bc12      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x10000400);
0047bc19      class UIElement_ListBox* eax_2;
0047bc19      
0047bc19      if (eax_1 == 0)
0047bc29          eax_2 = nullptr;
0047bc19      else
0047bc21          eax_2 = eax_1->vtable->DynamicCast(5);
0047bc21      
0047bc32      this->m_pSummaryListbix = eax_2;
0047bc38      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x10000402);
0047bc3f      class UIElement_Text* eax_4;
0047bc3f      
0047bc3f      if (eax_3 == 0)
0047bc4f          eax_4 = nullptr;
0047bc3f      else
0047bc47          eax_4 = eax_3->vtable->DynamicCast(0xc);
0047bc47      
0047bc51      this->m_pNameText = eax_4;
0047bc5e      eax_4->m_filter = NameInputFilter;
0047bc68      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x10000404);
0047bc6f      class UIElement_Text* eax_6;
0047bc6f      
0047bc6f      if (eax_5 == 0)
0047bc7f          eax_6 = nullptr;
0047bc6f      else
0047bc77          eax_6 = eax_5->vtable->DynamicCast(0xc);
0047bc77      
0047bc88      this->m_pHowToText = eax_6;
0047bc8e      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x10000401);
0047bc95      class UIElement_Scrollbar* eax_8;
0047bc95      
0047bc95      if (eax_7 == 0)
0047bca5          eax_8 = nullptr;
0047bc95      else
0047bc9d          eax_8 = eax_7->vtable->DynamicCast(0xb);
0047bc9d      
0047bcae      this->m_pScoll = eax_8;
0047bcb4      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x10000406);
0047bcbb      class UIElement_Viewport* eax_10;
0047bcbb      
0047bcbb      if (eax_9 == 0)
0047bccb          eax_10 = nullptr;
0047bcbb      else
0047bcc3          eax_10 = eax_9->vtable->DynamicCast(0xd);
0047bcc3      
0047bccf      this->m_pViewport = eax_10;
0047bcd5      void* eax_11;
0047bcd5      class UIElement_Viewport* edx_6;
0047bcd5      eax_11 = operator new(0x60);
0047bcdf      class gmCG3DView* eax_12;
0047bcdf      
0047bcdf      if (eax_11 == 0)
0047bcea          eax_12 = nullptr;
0047bcdf      else
0047bce3          eax_12 = gmCG3DView::gmCG3DView(eax_11);
0047bce3      
0047bcee      this->m_p3DView = eax_12;
0047bcee      
0047bcf4      if (eax_12 != 0)
0047bcf4      {
0047bcfc          class UIElement_Viewport* m_pViewport = this->m_pViewport;
0047bcff          gmCG3DView::Initialize(eax_12, edx_6);
0047bcf4      }
0047bcf4      
0047bd04      class gmCG3DView* m_p3DView = this->m_p3DView;
0047bd14      int32_t var_18 = 0;
0047bd1c      int32_t var_14 = 0;
0047bd24      int32_t var_10 = 0;
0047bd2c      int32_t var_c = 0;
0047bd34      int32_t var_8 = 0xc0200000;
0047bd3c      int32_t var_4;
0047bd3c      __builtin_strncpy(&var_4, "33s?", 4);
0047bd44      gmCG3DView::SetCamera(m_p3DView, &var_c, &var_18);
0047bd54      gmCG3DView::SetPlayerHeading(this->m_p3DView, 180f);
0047bd5f      gmCG3DView::StartAnimation(this->m_p3DView);
0047bd5f      
0047bd6d      if (UIElement::IsVisible(this) != 0)
0047bd71          gmCGSummaryPage::Update(this);
0047bbf0  }

0047bd7d                                                                                         90 90 90                               ...

0047bd80  void __fastcall gmCGSummaryPage::DoNameLimitDialog(class gmCGSummaryPage* this)

0047bd80  {
0047bd94      if (this->m_uiErrorMessageContext == 0)
0047bd94      {
0047bd9e          void var_108;
0047bd9e          PropertyCollection::PropertyCollection(&var_108);
0047bdaa          int32_t* var_114 = nullptr;
0047bdae          int32_t* var_110_1 = nullptr;
0047bdb2          void var_90;
0047bdb2          StringInfo::StringInfo(&var_90);
0047bdd1          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_NameTooLong"), 0x10000002);
0047bddf          BaseProperty::SetPropertyName(&var_114, 0x8e);
0047bddf          
0047bde8          if (var_110_1 != 0)
0047bde8          {
0047bdee              BaseProperty::CheckCopyOnWrite(&var_114);
0047bdfb              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xac)(3);
0047bde8          }
0047bde8          
0047be18          uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
0047be1c          void var_104;
0047be1c          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0047be2a          BaseProperty::SetPropertyName(&var_114, 0xac);
0047be2a          
0047be33          if (var_110_1 != 0)
0047be33          {
0047be39              BaseProperty::CheckCopyOnWrite(&var_114);
0047be46              *(uint32_t*)(*(uint32_t*)var_110_1 + 0x74)(1);
0047be33          }
0047be33          
0047be60          var_10c = BaseProperty::GetPropertyName(&var_114);
0047be64          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0047be72          BaseProperty::SetPropertyName(&var_114, 0xc5);
0047be72          
0047be7b          if (var_110_1 != 0)
0047be7b          {
0047be81              BaseProperty::CheckCopyOnWrite(&var_114);
0047be94              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xc4)(&var_90);
0047be7b          }
0047be7b          
0047bea3          var_10c = BaseProperty::GetPropertyName(&var_114);
0047beb5          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0047bed5          this->m_uiErrorMessageContext = DialogFactory::MakeDialog(this->m_pMainFramework, &var_108);
0047bedb          StringInfo::~StringInfo(&var_90);
0047bee0          int32_t* eax_10 = var_114;
0047bee0          
0047bee6          if (eax_10 != 0)
0047bee6          {
0047bef0              int32_t esi_2 = (eax_10[1] - 1);
0047beed              eax_10[1] = esi_2;
0047beed              
0047bef7              if (esi_2 == 0)
0047befd                  **(uint32_t**)eax_10(1);
0047befd              
0047beff              var_114 = nullptr;
0047bee6          }
0047bee6          
0047bf09          if (var_110_1 != 0)
0047bf09          {
0047bf13              int32_t esi_4 = (var_110_1[1] - 1);
0047bf10              var_110_1[1] = esi_4;
0047bf10              
0047bf1a              if (esi_4 == 0)
0047bf20                  **(uint32_t**)var_110_1(1);
0047bf20              
0047bf22              int32_t var_110_2 = 0;
0047bf09          }
0047bf09          
0047bf2a          PropertyCollection::~PropertyCollection(&var_108);
0047bd94      }
0047bd80  }

0047bf38                                                                          90 90 90 90 90 90 90 90                          ........

0047bf40  enum UIElementMessageListenResult __thiscall gmCGSummaryPage::ListenToElementMessage(class gmCGSummaryPage* this, struct UIElementMessageInfo const* arg2)

0047bf40  {
0047bf48      class gmCGSummaryPage* this_1 = this;
0047bf48      
0047bf50      if (arg2->idElement == 0x10000402)
0047bf50      {
0047bf56          uint32_t idMessage = arg2->idMessage;
0047bf56          
0047bf61          if ((idMessage == 0x12 || idMessage == 0x44))
0047bf61          {
0047bf67              class UIElement_Text* m_pNameText = this_1->m_pNameText;
0047bf75              this_1->m_bNameEntered = 1;
0047bf93              class PStringBase<unsigned short> __return;
0047bf93              int32_t ebx;
0047bf93              ebx = UIElement_Text::GetText(m_pNameText, &__return)->m_charbuffer->m_data[0x7ffffffffffffffe] != 1;
0047bf96              int32_t* edi_2 = (__return - 0x14);
0047bf96              
0047bfa5              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0047bfad                  **(uint32_t**)edi_2(1);
0047bfad              
0047bfb1              if (ebx != 0)
0047bfb1              {
0047bfd1                  void* __return_1;
0047bfd1                  ebx = UIElement_Text::GetText(this_1->m_pNameText, &__return_1)->m_charbuffer->m_data[0x7ffffffffffffffe] > 0x21;
0047bfd4                  int32_t* edi_4 = ((char*)__return_1 - 0x14);
0047bfd4                  
0047bfe3                  if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
0047bfeb                      **(uint32_t**)edi_4(1);
0047bfeb                  
0047bfef                  if (ebx == 0)
0047bfef                  {
0047c05d                      class PStringBase<char> __return_2;
0047c05d                      class PStringBase<unsigned short> __return_3;
0047c05d                      char* edx_5 = *(uint32_t*)PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this_1->m_pNameText, &__return_3), &__return_2, 0);
0047c06d                      CharGenState::SetName(CPlayerSystem::GetCharGenState(this_1->m_pPlayerSystem), edx_5);
0047c076                      int32_t* edi_8 = (__return_2 - 0x14);
0047c076                      
0047c085                      if ((InterlockedDecrement(&edi_8[1]) == 0 && edi_8 != 0))
0047c08d                          **(uint32_t**)edi_8(1);
0047c08d                      
0047c093                      int32_t* edi_10 = (__return_3 - 0x14);
0047c093                      
0047c0a2                      if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
0047c0aa                          **(uint32_t**)edi_10(1);
0047bfef                  }
0047bfef                  else
0047bfef                  {
0047c008                      class PStringBase<unsigned short> var_c;
0047c008                      class PStringBase<unsigned short>* eax_9;
0047c008                      eax_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, WidthConvert, &CPlayerSystem::GetCharGenState(this_1->m_pPlayerSystem)->name);
0047c014                      UIElement_Text::SetText(this_1->m_pNameText, eax_9);
0047c01d                      int32_t* edi_6 = (var_c - 0x14);
0047c01d                      
0047c02c                      if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
0047c034                          **(uint32_t**)edi_6(1);
0047c034                      
0047c038                      gmCGSummaryPage::DoNameLimitDialog(this_1);
0047bfef                  }
0047bfb1              }
0047bf61          }
0047bf50      }
0047bf50      
0047c0bf      return UIElement::ListenToElementMessage(this_1, arg2);
0047bf40  }

0047c0c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0047c0d0  class UIElement* __thiscall gmCGTownPage::DynamicCast(class gmCGTownPage* this, uint32_t arg2) __pure

0047c0d0  {
0047c0dc      if (arg2 == 0x1000003d)
0047c0e9          return this;
0047c0e9      
0047c0e3      int32_t edx_1;
0047c0e3      edx_1 = arg2 != 3;
0047c0e7      return (this & (edx_1 - 1));
0047c0d0  }

0047c0ec                                      90 90 90 90                                                              ....

0047c0f0  uint32_t gmCGTownPage::GetUIElementType(class gmCGTownPage const* this @ ecx) __pure

0047c0f0  {
0047c0f5      return 0x1000003d;
0047c0f0  }

0047c0f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0047c100  void __fastcall gmCGHeritagePage::PostInit(class gmCGHeritagePage* this)

0047c100  {
0047c100      UIElement::PostInit(this);
0047c105      /* tailcall */
0047c105      return GlobalEventHandler::GetGlobalEventHandler();
0047c100  }

0047c10a                                90 90 90 90 90 90                                                            ......

0047c110  class UIElement* gmCGTownPage::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0047c110  {
0047c116      void* result = operator new(0x61c);
0047c116      
0047c122      if (result == 0)
0047c160          return 0;
0047c160      
0047c130      UIElement_Field::UIElement_Field(result, arg1, arg2);
0047c135      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
0047c13f      *(uint32_t*)result = 0x79f6e8;
0047c145      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
0047c14f      *(uint32_t*)((char*)result + 0x5fc) = 0;
0047c15c      return result;
0047c110  }

0047c161     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0047c170  void* __thiscall gmCGTownPage::`scalar deleting destructor'(class gmCGTownPage* this, uint32_t arg2)

0047c170  {
0047c17a      this->vtable = 0x79f6e8;
0047c174      this->vtable = &gmUrgentAssistanceUI::`vftable';
0047c186      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0047c186      
0047c18d      if (eax != 0)
0047c18f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0047c18f      
0047c174      this->vtable = &gmUrgentAssistanceUI::`vftable';
0047c19f      NoticeHandler::~NoticeHandler(&this->vtable);
0047c1a6      UIElement_Field::~UIElement_Field(this);
0047c1a6      
0047c1b0      if ((arg2 & 1) != 0)
0047c1b3          operator delete(this);
0047c1b3      
0047c1bf      return this;
0047c170  }

0047c1c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0047c1d0  void gmCGTownPage::Register()

0047c1d0  {
0047c1da      UIElement::RegisterElementClass(0x1000003d, gmCGTownPage::Create);
0047c1d0  }

0047c1e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0047c1f0  void __thiscall gmCGTownPage::SetTownString(class gmCGTownPage* this, enum gmCGTownPage::ETown arg2)

0047c1f0  {
0047c201      void var_90;
0047c201      StringInfo::StringInfo(&var_90);
0047c220      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_TownHowTo"), 0x10000002);
0047c229      void var_120;
0047c229      StringInfo::StringInfo(&var_120);
0047c229      
0047c239      if ((arg2 - 1) <= 3)
0047c239      {
0047c23b          char const* const var_138_1;
0047c23b          
0047c23b          switch (arg2)
0047c23b          {
0047c24e              case ECG_TOWN_HOLTBURG:
0047c24e              {
0047c24e                  int32_t var_134_2 = 0x10000002;
0047c253                  var_138_1 = "ID_CharGen_HoltText";
0047c24e                  break;
0047c24e              }
0047c266              case ECG_TOWN_SHOUSHI:
0047c266              {
0047c266                  int32_t var_134_4 = 0x10000002;
0047c26b                  var_138_1 = "ID_CharGen_ShoushiText";
0047c266                  break;
0047c266              }
0047c25a              case ECG_TOWN_YARAQ:
0047c25a              {
0047c25a                  int32_t var_134_3 = 0x10000002;
0047c25f                  var_138_1 = "ID_CharGen_YaraqText";
0047c25a                  break;
0047c25a              }
0047c242              case ECG_TOWN_SANAMAR:
0047c242              {
0047c242                  int32_t var_134_1 = 0x10000002;
0047c247                  var_138_1 = "ID_CharGen_SanamarText";
0047c242                  break;
0047c242              }
0047c23b          }
0047c23b          
0047c27d          StringInfo::SetStringIDandTableEnum(&var_120, compute_str_hash(var_138_1), 0x10000002);
0047c239      }
0047c239      
0047c282      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0047c28d      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
0047c295      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0047c2a2      int32_t esi = StringInfo::InqString(&var_120, &PStringBase<unsigned short>::s_NullBuffer_3, 0);
0047c2a7      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0047c2ac      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0047c2b4      esi(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0047c2c4      class PStringBase<unsigned short>* eax_6 = StringInfo::InqString(&var_90, &PStringBase<unsigned short>::s_NullBuffer_4, 0);
0047c2c9      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_4;
0047c2cd      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_5;
0047c2d2      wchar16 const* const var_138_5 = u"\n\n%s\n";
0047c2d7      class PSRefBufferCharData<unsigned short>** var_13c = &PStringBase<unsigned short>::s_NullBuffer_3;
0047c2d8      PStringBase<unsigned short>::sprintf_append(eax_6, PStringBase<unsigned short>::s_NullBuffer_5);
0047c2eb      UIElement_Text::SetText(this->m_pTextBox, &PStringBase<unsigned short>::s_NullBuffer_3);
0047c2fa      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
0047c2fa      
0047c309      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0047c311          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0047c311      
0047c317      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
0047c317      
0047c326      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0047c32e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0047c32e      
0047c334      StringInfo::~StringInfo(&var_120);
0047c340      StringInfo::~StringInfo(&var_90);
0047c1f0  }

0047c350  uint32_t jump_table_47c350[0x4] = 
0047c350  {
0047c350      [0x0] =  0x0047c24e
0047c354      [0x1] =  0x0047c266
0047c358      [0x2] =  0x0047c25a
0047c35c      [0x3] =  0x0047c242
0047c360  }

0047c360  void __thiscall gmCGTownPage::SetTown(class gmCGTownPage* this, enum gmCGTownPage::ETown arg2)

0047c360  {
0047c364      this->m_pSanamarButton->vtable->SetState(1);
0047c375      this->m_pHoltButton->vtable->SetState(1);
0047c385      this->m_pYaraqButton->vtable->SetState(1);
0047c395      this->m_pShoushiButton->vtable->SetState(1);
0047c395      
0047c3af      if ((arg2 - 1) <= 3)
0047c3af      {
0047c3b1          int32_t var_10_1;
0047c3b1          struct UIElement_Button::VTable* vtable;
0047c3b1          
0047c3b1          switch (arg2)
0047c3b1          {
0047c3dd              case ECG_TOWN_HOLTBURG:
0047c3dd              {
0047c3d3                  this->m_pHoltButton->vtable->SetState(6);
0047c3e3                  vtable = this->vtable;
0047c3e5                  var_10_1 = 0x10000034;
0047c3dd                  break;
0047c3dd              }
0047c412              case ECG_TOWN_SHOUSHI:
0047c412              {
0047c409                  this->vtable->SetState(0x10000037);
0047c41e                  vtable = this->m_pShoushiButton->vtable;
0047c420                  var_10_1 = 6;
0047c412                  break;
0047c412              }
0047c3f8              case ECG_TOWN_YARAQ:
0047c3f8              {
0047c3ee                  this->m_pYaraqButton->vtable->SetState(6);
0047c3fe                  vtable = this->vtable;
0047c400                  var_10_1 = 0x10000036;
0047c3f8                  break;
0047c3f8              }
0047c3c2              case ECG_TOWN_SANAMAR:
0047c3c2              {
0047c3b8                  this->m_pSanamarButton->vtable->SetState(6);
0047c3c8                  vtable = this->vtable;
0047c3ca                  var_10_1 = 0x10000035;
0047c3c2                  break;
0047c3c2              }
0047c3b1          }
0047c3b1          
0047c422          vtable->SetState(var_10_1);
0047c3af      }
0047c3af      
0047c436      CharGenState::SetStartArea(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), (arg2 - 1));
0047c43e      gmCGTownPage::SetTownString(this, arg2);
0047c360  }

0047c449                             8d 49 00                                                                       .I.
0047c44c  uint32_t jump_table_47c44c[0x4] = 
0047c44c  {
0047c44c      [0x0] =  0x0047c3d3
0047c450      [0x1] =  0x0047c409
0047c454      [0x2] =  0x0047c3ee
0047c458      [0x3] =  0x0047c3b8
0047c45c  }

0047c45c                                                                                      90 90 90 90                              ....

0047c460  void __fastcall gmCGTownPage::Update(class gmCGTownPage* this)

0047c460  {
0047c478      gmCGTownPage::SetTown(this, (CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->startArea + 1));
0047c460  }

0047c47f                                                                                               90                                 .

0047c480  enum UIElementMessageListenResult __thiscall gmCGTownPage::ListenToElementMessage(class gmCGTownPage* this, struct UIElementMessageInfo const* arg2)

0047c480  {
0047c4a2      switch ((arg2->idElement - 0x1000040b))
0047c4a2      {
0047c4ad          case 0:
0047c4ad          {
0047c4ad              if (arg2->idMessage == 1)
0047c4ad              {
0047c4c0                  if (CPlayerSystem::AccountHasThroneOfDestiny(this->m_pPlayerSystem) != 0)
0047c4c0                  {
0047c4c6                      this->m_pSanamarButton->vtable->SetState(1);
0047c4d8                      this->m_pHoltButton->vtable->SetState(1);
0047c4e8                      this->m_pYaraqButton->vtable->SetState(1);
0047c4f8                      this->m_pShoushiButton->vtable->SetState(1);
0047c508                      this->m_pSanamarButton->vtable->SetState(6);
0047c518                      this->vtable->SetState(0x10000035);
0047c536                      CharGenState::SetStartArea(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 3);
0047c542                      void var_90;
0047c542                      StringInfo::StringInfo(&var_90);
0047c561                      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_TownHowTo"), 0x10000002);
0047c56a                      void var_120;
0047c56a                      StringInfo::StringInfo(&var_120);
0047c586                      StringInfo::SetStringIDandTableEnum(&var_120, compute_str_hash("ID_CharGen_SanamarText"), 0x10000002);
0047c58b                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0047c596                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
0047c59e                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0047c5ab                      StringInfo::InqString(&var_120, &PStringBase<unsigned short>::s_NullBuffer_3, 0);
0047c5b0                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0047c5b5                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0047c5bd                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0047c5cd                      class PStringBase<unsigned short>* eax_11;
0047c5cd                      struct UIElementMessageInfo* ebp_1;
0047c5cd                      class UIElement* esi_1;
0047c5cd                      eax_11 = StringInfo::InqString(&var_90, &PStringBase<unsigned short>::s_NullBuffer_4, 0);
0047c5d2                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_4;
0047c5d6                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_5;
0047c5db                      wchar16 const* const var_140_4 = u"\n\n%s\n";
0047c5e0                      class PSRefBufferCharData<unsigned short>** var_144 = &PStringBase<unsigned short>::s_NullBuffer_3;
0047c5e1                      PStringBase<unsigned short>::sprintf_append(eax_11, PStringBase<unsigned short>::s_NullBuffer_5);
0047c5f4                      UIElement_Text::SetText(*(int32_t*)((char*)esi_1 + 0x614), &PStringBase<unsigned short>::s_NullBuffer_3);
0047c603                      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_1 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
0047c603                      
0047c612                      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0047c61a                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0047c61a                      
0047c620                      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_3 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
0047c620                      
0047c62f                      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0047c637                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0047c637                      
0047c63d                      StringInfo::~StringInfo(&var_120);
0047c649                      StringInfo::~StringInfo(&var_90);
0047c660                      return UIElement::ListenToElementMessage(esi_1, ebp_1);
0047c4c0                  }
0047c4c0                  
0047c669                  gmCharGenMainUI::MakeToDWarningDialog(this->m_pMainFramework);
0047c6a1                  gmCGTownPage::SetTown(this, (CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->startArea + 1));
0047c4ad              }
0047c4ad              break;
0047c4ad          }
0047c687          case 2:
0047c687          {
0047c687              if (arg2->idMessage == 1)
0047c6a1                  gmCGTownPage::SetTown(this, ECG_TOWN_HOLTBURG);
0047c687              break;
0047c687          }
0047c691          case 3:
0047c691          {
0047c691              if (arg2->idMessage == 1)
0047c6a1                  gmCGTownPage::SetTown(this, ECG_TOWN_YARAQ);
0047c691              break;
0047c691          }
0047c69b          case 4:
0047c69b          {
0047c69b              if (arg2->idMessage == 1)
0047c6a1                  gmCGTownPage::SetTown(this, ECG_TOWN_SHOUSHI);
0047c69b              break;
0047c69b          }
0047c4a2      }
0047c4a2      
0047c6b6      return UIElement::ListenToElementMessage(this, arg2);
0047c480  }

0047c6b9                                                                             8d 49 00                                       .I.
0047c6bc  uint32_t jump_table_47c6bc[0x5] = 
0047c6bc  {
0047c6bc      [0x0] =  0x0047c4a9
0047c6c0      [0x1] =  0x0047c6a6
0047c6c4      [0x2] =  0x0047c683
0047c6c8      [0x3] =  0x0047c68d
0047c6cc      [0x4] =  0x0047c697
0047c6d0  }

0047c6d0  void __thiscall gmCGTownPage::InitializePage(class gmCGTownPage* this, class gmCharGenMainUI* arg2)

0047c6d0  {
0047c6d7      this->m_pMainFramework = arg2;
0047c6e9      this->m_pPlayerSystem = CPlayerSystem::GetPlayerSystem();
0047c6ef      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x1000040b);
0047c6f6      class UIElement_Button* eax_2;
0047c6f6      
0047c6f6      if (eax_1 == 0)
0047c706          eax_2 = nullptr;
0047c6f6      else
0047c6fe          eax_2 = eax_1->vtable->DynamicCast(1);
0047c6fe      
0047c70f      this->m_pSanamarButton = eax_2;
0047c715      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x1000040d);
0047c71c      class UIElement_Button* eax_4;
0047c71c      
0047c71c      if (eax_3 == 0)
0047c72c          eax_4 = nullptr;
0047c71c      else
0047c724          eax_4 = eax_3->vtable->DynamicCast(1);
0047c724      
0047c735      this->m_pHoltButton = eax_4;
0047c73b      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x1000040e);
0047c742      class UIElement_Button* eax_6;
0047c742      
0047c742      if (eax_5 == 0)
0047c752          eax_6 = nullptr;
0047c742      else
0047c74a          eax_6 = eax_5->vtable->DynamicCast(1);
0047c74a      
0047c75b      this->m_pYaraqButton = eax_6;
0047c761      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x1000040f);
0047c768      class UIElement_Button* eax_8;
0047c768      
0047c768      if (eax_7 == 0)
0047c778          eax_8 = nullptr;
0047c768      else
0047c770          eax_8 = eax_7->vtable->DynamicCast(1);
0047c770      
0047c781      this->m_pShoushiButton = eax_8;
0047c787      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x10000409);
0047c78e      class UIElement_Text* eax_10;
0047c78e      
0047c78e      if (eax_9 == 0)
0047c79e          eax_10 = nullptr;
0047c78e      else
0047c796          eax_10 = eax_9->vtable->DynamicCast(0xc);
0047c796      
0047c7a0      class CPlayerSystem* m_pPlayerSystem = this->m_pPlayerSystem;
0047c7a6      this->m_pTextBox = eax_10;
0047c7bb      gmCGTownPage::SetTown(this, (CPlayerSystem::GetCharGenState(m_pPlayerSystem)->startArea + 1));
0047c6d0  }

0047c7c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0047c7d0  void __fastcall gmCGAppearancePage::PostInit(class gmCGAppearancePage* this)

0047c7d0  {
0047c7d4      UIElement::PostInit(this);
0047c7d9      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0047c7e0      struct gmNoticeHandler::VTable** edx;
0047c7e0      
0047c7e0      if (this == 0)
0047c7ea          edx = nullptr;
0047c7e0      else
0047c7e2          edx = &this->vtable;
0047c7e2      
0047c7ec      eax->vtable->RegisterNoticeHandler(0x186b0, edx);
0047c7fd      UIListener::RegisterForGlobalMessage(this, 3);
0047c7d0  }

0047c805                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0047c810  class UIElement* __thiscall gmCGAppearancePage::DynamicCast(class gmCGAppearancePage* this, uint32_t arg2) __pure

0047c810  {
0047c81c      if (arg2 == 0x1000003c)
0047c829          return this;
0047c829      
0047c823      int32_t edx_1;
0047c823      edx_1 = arg2 != 3;
0047c827      return (this & (edx_1 - 1));
0047c810  }

0047c82c                                      90 90 90 90                                                              ....

0047c830  uint32_t gmCGAppearancePage::GetUIElementType(class gmCGAppearancePage const* this @ ecx) __pure

0047c830  {
0047c835      return 0x1000003c;
0047c830  }

0047c836                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0047c840  void __fastcall gmCGAppearancePage::RecvNotice_PlayerObjDescChanged(class gmCGAppearancePage* this)

0047c840  {
0047c850      if (UIElement::IsVisible(((char*)this - 0x5f8)) == 0)
0047c85c          return;
0047c85c      
0047c856      /* tailcall */
0047c856      return gmCG3DView::Update(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_numBuckets);
0047c840  }

0047c85d                                                                                         90 90 90                               ...

0047c860  void __thiscall gmCGAppearancePage::SetShade(class gmCGAppearancePage* this, double arg2)

0047c860  {
0047c865      class gmCGAppearancePage* this_1 = this;
0047c876      UIElement::SetAttribute_Float(this->m_pShadeScroll, 0x86, ((float)((long double)arg2)));
0047c881      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047c881      
0047c898      switch ((this->m_eCurPart - 1))
0047c898      {
0047c8a7          case 0:
0047c8a7          {
0047c8a7              int32_t var_8_1 = *(uint32_t*)((char*)arg2)[4];
0047c8a9              CharGenState::SetHairShade(eax, arg2);
0047c8a7              break;
0047c8a7          }
0047c8ba          case 2:
0047c8ba          case 3:
0047c8ba          case 4:
0047c8ba          {
0047c8ba              int32_t var_8_2 = *(uint32_t*)((char*)arg2)[4];
0047c8bc              CharGenState::SetSkinShade(eax, arg2);
0047c8ba              break;
0047c8ba          }
0047c8cd          case 5:
0047c8cd          {
0047c8cd              eax->headgearShade = arg2;
0047c8d3              *(uint32_t*)((char*)eax->headgearShade)[4] = *(uint32_t*)((char*)arg2)[4];
0047c8cd              break;
0047c8cd          }
0047c8e3          case 6:
0047c8e3          {
0047c8e3              eax->shirtShade = arg2;
0047c8e9              *(uint32_t*)((char*)eax->shirtShade)[4] = *(uint32_t*)((char*)arg2)[4];
0047c8e3              break;
0047c8e3          }
0047c8f9          case 7:
0047c8f9          {
0047c8f9              eax->trousersShade = arg2;
0047c8ff              *(uint32_t*)((char*)eax->trousersShade)[4] = *(uint32_t*)((char*)arg2)[4];
0047c8f9              break;
0047c8f9          }
0047c90f          case 8:
0047c90f          {
0047c90f              eax->footwearShade = arg2;
0047c915              *(uint32_t*)((char*)eax->footwearShade)[4] = *(uint32_t*)((char*)arg2)[4];
0047c90f              break;
0047c90f          }
0047c898      }
0047c898      
0047c924      if (UIElement::IsVisible(this) != 0)
0047c92c          gmCG3DView::Update(this->m_p3DView);
0047c860  }

0047c935                                                                 8d 49 00                                               .I.
0047c938  uint32_t jump_table_47c938[0x9] = 
0047c938  {
0047c938      [0x0] =  0x0047c89f
0047c93c      [0x1] =  0x0047c91b
0047c940      [0x2] =  0x0047c8b2
0047c944      [0x3] =  0x0047c8b2
0047c948      [0x4] =  0x0047c8b2
0047c94c      [0x5] =  0x0047c8c5
0047c950      [0x6] =  0x0047c8db
0047c954      [0x7] =  0x0047c8f1
0047c958      [0x8] =  0x0047c907
0047c95c  }

0047c95c                                                                                      90 90 90 90                              ....

0047c960  void __fastcall gmCGAppearancePage::DoZoomAnimation(class gmCGAppearancePage* this)

0047c960  {
0047c960      long double x87_r7 = ((long double)this->m_dAnimDuration);
0047c966      long double temp0 = ((long double)0.0);
0047c966      (x87_r7 - temp0);
0047c96c      int32_t eax;
0047c96c      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0047c96e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0047c96e      
0047c971      if (!(p))
0047c971      {
0047c973          this->m_dAnimDuration = 4.17232506e-08f;
0047c97d          *(uint32_t*)((char*)this->m_dAnimDuration)[4] = 0x3fe33333;
0047c992          this->m_dAnimStartTime = (*(uint32_t*)Timer::cur_time);
0047c998          *(uint32_t*)((char*)this->m_dAnimStartTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0047c971      }
0047c971      
0047c9a4      long double x87_r7_2 = (((long double)Timer::cur_time) - ((long double)this->m_dAnimStartTime));
0047c9aa      long double temp1 = ((long double)this->m_dAnimDuration);
0047c9aa      (x87_r7_2 - temp1);
0047c9b0      eax = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0047c9b0      
0047c9b5      if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
0047c9b5      {
0047c9b9          this->m_bShouldZoomAnimate = 0;
0047c9c0          x87_r7_2 = ((long double)this->m_dAnimDuration);
0047c9b5      }
0047c9b5      
0047c9c6      long double x87_r7_3 = (x87_r7_2 / ((long double)this->m_dAnimDuration));
0047c9cc      this->m_vectCurPosition.x = ((float)(((((long double)this->m_vectTargPosition.x) - ((long double)this->m_vectStartPosition.x)) * x87_r7_3) + ((long double)this->m_vectStartPosition.x)));
0047c9cc      this->m_vectCurPosition.y = ((float)(((((long double)this->m_vectTargPosition.y) - ((long double)this->m_vectStartPosition.y)) * x87_r7_3) + ((long double)this->m_vectStartPosition.y)));
0047c9cc      this->m_vectCurPosition.z = ((float)(((((long double)this->m_vectTargPosition.z) - ((long double)this->m_vectStartPosition.z)) * x87_r7_3) + ((long double)this->m_vectStartPosition.z)));
0047c9d2      this->m_vectCurDirection.x = ((float)(((((long double)this->m_vectTargDirection.x) - ((long double)this->m_vectStartDirection.x)) * x87_r7_3) + ((long double)this->m_vectStartDirection.x)));
0047c9d2      this->m_vectCurDirection.y = ((float)(((((long double)this->m_vectTargDirection.y) - ((long double)this->m_vectStartDirection.y)) * x87_r7_3) + ((long double)this->m_vectStartDirection.y)));
0047c9d2      this->m_vectCurDirection.z = ((float)(((((long double)this->m_vectTargDirection.z) - ((long double)this->m_vectStartDirection.z)) * x87_r7_3) + ((long double)this->m_vectStartDirection.z)));
0047ca6e      gmCG3DView::SetCamera(this->m_p3DView, &this->m_vectCurPosition, &this->m_vectCurDirection);
0047c960  }

0047ca74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0047ca80  void __fastcall gmCGAppearancePage::DoRotation(class gmCGAppearancePage* this)

0047ca80  {
0047ca80      long double x87_r7 = ((long double)this->m_dLastRotateTime);
0047ca86      long double temp0 = ((long double)0.0);
0047ca86      (x87_r7 - temp0);
0047ca8c      int32_t eax;
0047ca8c      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0047ca8e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0047ca8e      
0047ca91      if (!(p))
0047ca91      {
0047ca9e          this->m_dLastRotateTime = (*(uint32_t*)Timer::cur_time);
0047caa4          *(uint32_t*)((char*)this->m_dLastRotateTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0047ca91      }
0047ca91      
0047caaa      long double x87_r7_1 = ((long double)Timer::cur_time);
0047cac7      long double x87_r6_3 = (((x87_r7_1 - ((long double)this->m_dLastRotateTime)) / ((long double)this->m_dRotationPerSec)) * ((long double)360.0));
0047cac7      
0047cacd      if (this->m_eRotateDir != ECG_ROTATE_CLOCKWISE)
0047cacd      {
0047cae5          this->m_fCurHeading = ((float)(((long double)this->m_fCurHeading) - x87_r6_3));
0047caeb          x87_r7_1 = x87_r6_3;
0047cacd      }
0047cacd      else
0047cad5          this->m_fCurHeading = ((float)(x87_r6_3 + ((long double)this->m_fCurHeading)));
0047cad5      
0047caed      long double x87_r6_5 = ((long double)this->m_fCurHeading);
0047caf3      long double temp1 = ((long double)0f);
0047caf3      (x87_r6_5 - temp1);
0047caf9      enum gmCGAppearancePage::ERotateDirection eax_2;
0047caf9      eax_2 = ((((x87_r6_5 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0047cafb      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0047cafb      
0047cafe      if (!(p_1))
0047cb0c          this->m_fCurHeading = ((float)(((long double)this->m_fCurHeading) + ((long double)360f)));
0047cb0c      
0047cb12      long double x87_r6_8 = ((long double)this->m_fCurHeading);
0047cb18      long double temp2 = ((long double)360f);
0047cb18      (x87_r6_8 - temp2);
0047cb1e      eax_2 = ((((x87_r6_8 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_8, temp2))) ? 1 : 0) << 0xa) | ((((x87_r6_8 == temp2) ? 1 : 0) << 0xe) | 0x3800))));
0047cb1e      
0047cb23      if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
0047cb31          this->m_fCurHeading = ((float)(((long double)this->m_fCurHeading) - ((long double)360f)));
0047cb31      
0047cb37      float m_fCurHeading = this->m_fCurHeading;
0047cb3d      this->m_dLastRotateTime = ((double)x87_r7_1);
0047cb4a      gmCG3DView::SetPlayerHeading(this->m_p3DView, m_fCurHeading);
0047ca80  }


0047cb50  void __thiscall gmCGAppearancePage::Rotate(class gmCGAppearancePage* this, enum gmCGAppearancePage::ERotateDirection arg2)

0047cb50  {
0047cb68      if ((this->m_bRotating != 0 && arg2 == this->m_eRotateDir))
0047cb68      {
0047cb6b          this->m_bRotating = 0;
0047cb73          return;
0047cb68      }
0047cb68      
0047cb79      if (arg2 == ECG_ROTATE_CLOCKWISE)
0047cb90          this->m_pRotateCounterClockButton->vtable->SetState(1);
0047cb79      else if (arg2 == 2)
0047cb7e          this->m_pRotateClockButton->vtable->SetState(1);
0047cb7e      
0047cba0      this->m_eRotateDir = arg2;
0047cba7      this->m_dLastRotateTime = 0f;
0047cbb1      *(uint32_t*)((char*)this->m_dLastRotateTime)[4] = 0xbff00000;
0047cbbb      this->m_bRotating = 1;
0047cb50  }

0047cbc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0047cbd0  int32_t MathLib::Clamp(double const arg1, double const arg2, double const arg3)

0047cbd0  {
0047cbd0      long double x87_r7 = ((long double)arg1);
0047cbd4      long double temp0 = ((long double)arg3);
0047cbd4      (x87_r7 - temp0);
0047cbd8      int16_t result = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0047cbd8      
0047cbdd      if ((*(uint8_t*)((char*)result)[1] & 0x41) == 0)
0047cbe3          return result;
0047cbe3      
0047cbe4      long double x87_r7_2 = ((long double)arg1);
0047cbe8      long double temp1 = ((long double)arg2);
0047cbe8      (x87_r7_2 - temp1);
0047cbee      /* unimplemented  {test ah, 0x5} */;
0047cbf7      return ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
0047cbd0  }

0047cbfd                                                                                         90 90 90                               ...

0047cc00  void* __thiscall EyesStrip_CG::`vector deleting destructor'(class EyesStrip_CG* this, uint32_t arg2)

0047cc00  {
0047cc01      int32_t ebx;
0047cc01      ebx = arg2;
0047cc01      
0047cc0b      if ((ebx & 2) == 0)
0047cc0b      {
0047cc58          this->vtable = 0x79fa84;
0047cc5e          ObjDesc::~ObjDesc(&this->objDesc_Bald);
0047cc66          ObjDesc::~ObjDesc(&this->objDesc);
0047cc66          
0047cc6e          if ((ebx & 1) != 0)
0047cc71              operator delete(this);
0047cc71          
0047cc7d          return this;
0047cc0b      }
0047cc0b      
0047cc0d      int32_t vtable = this->vtable;
0047cc1a      void* esi_2 = ((vtable * 0x64) + this);
0047cc1a      
0047cc1d      if ((vtable - 1) >= 0)
0047cc1d      {
0047cc1f          int32_t edi_1 = vtable;
0047cc3c          int32_t i;
0047cc3c          
0047cc3c          do
0047cc3c          {
0047cc22              esi_2 -= 0x64;
0047cc28              *(uint32_t*)esi_2 = 0x79fa84;
0047cc2e              ObjDesc::~ObjDesc(((char*)esi_2 + 0x38));
0047cc36              ObjDesc::~ObjDesc(((char*)esi_2 + 0xc));
0047cc3b              i = edi_1;
0047cc3b              edi_1 -= 1;
0047cc3c          } while (i != 1);
0047cc1d      }
0047cc1d      
0047cc41      if ((ebx & 1) != 0)
0047cc44          operator delete[](((char*)this - 4));
0047cc44      
0047cc52      return ((char*)this - 4);
0047cc00  }


0047cc80  uint8_t __fastcall SmartArray<int,1>::ShouldDeallocate_(class SmartArray<int,1> const* this)

0047cc80  {
0047cc88      int32_t eax_1 = ((this->m_sizeAndDeallocate & 0x80000000) + 0x80000000);
0047cc8d      int32_t eax_2 = -(eax_1);
0047cc92      return (((int8_t)(eax_2 - eax_2)) + 1);
0047cc80  }

0047cc93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0047cca0  class PalSet* PalSet::Get(class IDClass<_tagDataID,32,0> arg1)

0047cca0  {
0047ccbc      void var_8;
0047ccbc      return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0x18));
0047cca0  }

0047ccbd                                                                                         90 90 90                               ...

0047ccc0  void __thiscall gmCGAppearancePage::gmCGAppearancePage(class gmCGAppearancePage* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0047ccc0  {
0047cccf      UIElement_Field::UIElement_Field(this, arg2, arg3);
0047ccd4      this->vtable = &gmUrgentAssistanceUI::`vftable';
0047cce0      this->vtable = 0x79fd38;
0047cce6      this->vtable = &gmCGAppearancePage::`vftable';
0047ccf0      this->m_pPlayerSystem = nullptr;
0047ccf6      __builtin_memset(&this->m_pFemaleButton, 0, 0x20);
0047cd26      this->m_pShadeScroll = nullptr;
0047cd2c      this->m_pGradCircle = nullptr;
0047cd32      this->m_pGradGraphic = nullptr;
0047cd38      this->m_pGradPlug = nullptr;
0047cd3e      this->m_pCurSelection = nullptr;
0047cd44      this->m_iCurColor = 0xffffffff;
0047cd4e      this->m_iHoldheadgear = 0xfffffc19;
0047cd58      this->m_bShouldZoomAnimate = 0;
0047cd5e      this->m_bRotating = 0;
0047cd64      this->m_vectTargPosition.x = 0;
0047cd6a      this->m_vectTargPosition.y = 0f;
0047cd70      this->m_vectTargPosition.z = 0f;
0047cd76      __builtin_memset(&this->m_vectCurPosition, 0, 0x18);
0047cd9a      this->m_vectCurDirection.x = 0;
0047cda0      this->m_vectCurDirection.y = 0f;
0047cda6      this->m_vectCurDirection.z = 0f;
0047cdac      this->m_fCurHeading = 0f;
0047cdb2      this->m_dAnimStartTime = 0f;
0047cdb8      *(uint32_t*)((char*)this->m_dAnimStartTime)[4] = 0;
0047cdbe      this->m_dAnimDuration = 0f;
0047cdc4      *(uint32_t*)((char*)this->m_dAnimDuration)[4] = 0;
0047cdca      this->m_dRotationPerSec = 0f;
0047cdd0      *(uint32_t*)((char*)this->m_dRotationPerSec)[4] = 0x40080000;
0047cdda      this->m_eRotateDir = ECG_ROTATE_INVALID;
0047cde0      struct gmCGAppearancePage::tagChoices (* s)[0x9] = &this->m_tChoices;
0047cde6      int32_t i_2 = 9;
0047ce05      int32_t i;
0047ce05      
0047ce05      do
0047ce05      {
0047cdf0          __builtin_memset(s, 0, 0x18);
0047ce01          s = &*(uint216_t*)s[1];
0047ce04          i = i_2;
0047ce04          i_2 -= 1;
0047ce05      } while (i != 1);
0047ce07      this->m_eCurPart = ECG_PARTS_HAIR;
0047ce11      struct gmCGAppearancePage::tagColorWheel (* s_1)[0x9] = &this->m_tColorWheel;
0047ce17      int32_t i_3 = 9;
0047ce38      int32_t i_1;
0047ce38      
0047ce38      do
0047ce38      {
0047ce20          __builtin_memset(s_1, 0, 0x1c);
0047ce34          s_1 = &*(uint252_t*)s_1[1];
0047ce37          i_1 = i_3;
0047ce37          i_3 -= 1;
0047ce38      } while (i_1 != 1);
0047ccc0  }

0047cded                                         8d 49 00                                                               .I.

0047ce40  void* __thiscall gmCGAppearancePage::`scalar deleting destructor'(class gmCGAppearancePage* this, uint32_t arg2)

0047ce40  {
0047ce4a      this->vtable = 0x79fd38;
0047ce44      this->vtable = &gmCGAppearancePage::`vftable';
0047ce56      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0047ce56      
0047ce5d      if (eax != 0)
0047ce5f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0047ce5f      
0047ce44      this->vtable = &gmUrgentAssistanceUI::`vftable';
0047ce6f      NoticeHandler::~NoticeHandler(&this->vtable);
0047ce76      UIElement_Field::~UIElement_Field(this);
0047ce76      
0047ce80      if ((arg2 & 1) != 0)
0047ce83          operator delete(this);
0047ce83      
0047ce8f      return this;
0047ce40  }

0047ce92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0047cea0  class UIElement* gmCGAppearancePage::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0047cea0  {
0047cea5      void* eax = operator new(0x8e0);
0047cea5      
0047ceaf      if (eax == 0)
0047cec5          return 0;
0047cec5      
0047cec2      return gmCGAppearancePage::gmCGAppearancePage(eax, arg1, arg2);
0047cea0  }

0047cec6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0047ced0  void __thiscall gmCGAppearancePage::ListenToGlobalMessage(class gmCGAppearancePage* this, uint32_t arg2, int32_t arg3)

0047ced0  {
0047ced8      if (arg2 == 3)
0047ced8      {
0047cee2          if (this->m_bShouldZoomAnimate != 0)
0047cee4              gmCGAppearancePage::DoZoomAnimation(this);
0047cee4          
0047cef1          if (this->m_bRotating != 0)
0047cef5              gmCGAppearancePage::DoRotation(this);
0047ced8      }
0047ced0  }

0047cefe                                                                                            90 90                                ..

0047cf00  void __fastcall gmCGAppearancePage::ZoomIn(class gmCGAppearancePage* this)

0047cf00  {
0047cf0e      if (this->m_bZoomedIn != 0)
0047cf0e      {
0047d032          this->m_pZoomInButton->vtable->SetState(6);
0047d044          return;
0047cf0e      }
0047cf0e      
0047cf1a      this->m_vectStartDirection.x = this->m_vectCurDirection.x;
0047cf26      this->m_vectStartDirection.y = this->m_vectCurDirection.y;
0047cf32      this->m_vectStartDirection.z = this->m_vectCurDirection.z;
0047cf3e      this->m_vectStartPosition.x = this->m_vectCurPosition.x;
0047cf4a      this->m_vectStartPosition.y = this->m_vectCurPosition.y;
0047cf56      this->m_vectStartPosition.z = this->m_vectCurPosition.z;
0047cf67      uint32_t mHeritageGroup = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->mHeritageGroup;
0047cf67      
0047cf70      if (mHeritageGroup == 0xc)
0047cf70      {
0047cf72          this->m_vectTargPosition.y = -1.85000002f;
0047cf7c          this->m_vectTargPosition.z = 1.85000002f;
0047cf70      }
0047cf70      else if (mHeritageGroup != 0xd)
0047cf8b      {
0047cfa6          this->m_vectTargPosition.z = 1.64999998f;
0047cfa6          
0047cfb0          if (mHeritageGroup != 7)
0047cfbe              this->m_vectTargPosition.y = -0.550000012f;
0047cfb0          else
0047cfb2              this->m_vectTargPosition.y = -0.850000024f;
0047cf8b      }
0047cf8b      else
0047cf8b      {
0047cf8d          this->m_vectTargPosition.y = -3.04999995f;
0047cf97          this->m_vectTargPosition.z = 2.75f;
0047cf8b      }
0047cf8b      
0047cfc8      this->m_vectTargPosition.x = 0;
0047cfce      this->m_vectTargDirection.x = 0;
0047cfd4      this->m_vectTargDirection.y = 0f;
0047cfda      this->m_vectTargDirection.z = 0f;
0047cfe0      class UIElement_Button* m_pZoomInButton = this->m_pZoomInButton;
0047cfeb      this->m_bShouldZoomAnimate = 1;
0047cff1      this->m_dAnimDuration = -1.58818684e-23f;
0047cffb      *(uint32_t*)((char*)this->m_dAnimDuration)[4] = 0xbfb99999;
0047d005      m_pZoomInButton->vtable->SetState(6);
0047d00f      this->m_pZoomOutButton->vtable->SetState(1);
0047d024      gmCG3DView::StopAnimation(this->m_p3DView);
0047d029      this->m_bZoomedIn = 1;
0047cf00  }

0047d045                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0047d050  void __fastcall gmCGAppearancePage::ZoomOut(class gmCGAppearancePage* this)

0047d050  {
0047d05e      if (this->m_bZoomedIn == 0)
0047d05e      {
0047d16e          this->m_pZoomOutButton->vtable->SetState(6);
0047d180          return;
0047d05e      }
0047d05e      
0047d06a      this->m_vectStartDirection.x = this->m_vectCurDirection.x;
0047d076      this->m_vectStartDirection.y = this->m_vectCurDirection.y;
0047d082      this->m_vectStartDirection.z = this->m_vectCurDirection.z;
0047d08e      this->m_vectStartPosition.x = this->m_vectCurPosition.x;
0047d09a      this->m_vectStartPosition.y = this->m_vectCurPosition.y;
0047d0a6      this->m_vectStartPosition.z = this->m_vectCurPosition.z;
0047d0b7      uint32_t mHeritageGroup = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->mHeritageGroup;
0047d0b7      
0047d0c0      if (mHeritageGroup == 0xc)
0047d0c0      {
0047d0c2          this->m_vectTargPosition.y = -3.79999995f;
0047d0cc          this->m_vectTargPosition.z = 1.14999998f;
0047d0c0      }
0047d0c0      else if (mHeritageGroup != 0xd)
0047d0db      {
0047d0f3          this->m_vectTargPosition.y = -2.5f;
0047d0fd          __builtin_strncpy(&this->m_vectTargPosition.z, "33s?", 4);
0047d0db      }
0047d0db      else
0047d0db      {
0047d0dd          this->m_vectTargPosition.y = -5.69999981f;
0047d0e7          this->m_vectTargPosition.z = 1.64999998f;
0047d0db      }
0047d0db      
0047d107      this->m_vectTargPosition.x = 0;
0047d10d      this->m_vectTargDirection.x = 0;
0047d113      this->m_vectTargDirection.y = 0f;
0047d119      this->m_vectTargDirection.z = 0f;
0047d11f      class UIElement_Button* m_pZoomInButton = this->m_pZoomInButton;
0047d125      this->m_bShouldZoomAnimate = 1;
0047d12c      this->m_dAnimDuration = -1.58818684e-23f;
0047d136      *(uint32_t*)((char*)this->m_dAnimDuration)[4] = 0xbfb99999;
0047d140      m_pZoomInButton->vtable->SetState(1);
0047d14a      this->m_pZoomOutButton->vtable->SetState(6);
0047d160      gmCG3DView::StartAnimation(this->m_p3DView);
0047d165      this->m_bZoomedIn = 0;
0047d050  }

0047d181     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0047d190  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>* this, uint32_t arg2)

0047d190  {
0047d193      class HashTableData<unsigned long,Sex_CG>** m_buckets = this->m_buckets;
0047d19b      this->vtable = 0x79fe74;
0047d19b      
0047d1a1      if (m_buckets != &this->m_aInplaceBuckets)
0047d1a4          operator delete[](m_buckets);
0047d1a4      
0047d1ae      this->m_buckets = nullptr;
0047d1b1      this->m_firstInterestingBucket = nullptr;
0047d1b4      this->m_numBuckets = 0;
0047d1b7      this->m_numElements = 0;
0047d1b7      
0047d1bf      if ((arg2 & 1) != 0)
0047d1c2          operator delete(this);
0047d1c2      
0047d1cd      return this;
0047d190  }


0047d1d0  void __fastcall SmartArray<IDClass<_tagDataID,32,0>,1>::~SmartArray<IDClass<_tagDataID,32,0>,1>(class SmartArray<IDClass<_tagDataID,32,0>,1>* this)

0047d1d0  {
0047d1dd      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d1dd      {
0047d1df          class IDClass<_tagDataID,32,0>* m_data = this->m_data;
0047d1df          
0047d1e3          if (m_data != 0)
0047d1e9              operator delete[](&m_data[-1]);
0047d1dd      }
0047d1d0  }


0047d1f0  void __fastcall SmartArray<Skill_CG,1>::~SmartArray<Skill_CG,1>(class SmartArray<Skill_CG,1>* this)

0047d1f0  {
0047d1fd      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d1fd      {
0047d1ff          class Skill_CG* m_data = this->m_data;
0047d1ff          
0047d203          if (m_data != 0)
0047d203          {
0047d205              int32_t vtable = m_data->vtable;
0047d211              void* eax_3 = &m_data[vtable];
0047d211              
0047d214              if ((vtable - 1) >= 0)
0047d214              {
0047d216                  int32_t ecx_1 = vtable;
0047d22a                  int32_t i;
0047d22a                  
0047d22a                  do
0047d22a                  {
0047d220                      eax_3 -= 0x10;
0047d223                      i = ecx_1;
0047d223                      ecx_1 -= 1;
0047d224                      *(uint32_t*)eax_3 = 0x79fa7c;
0047d22a                  } while (i != 1);
0047d214              }
0047d214              
0047d22d              operator delete[](((char*)m_data - 4));
0047d203          }
0047d1fd      }
0047d1f0  }

0047d219                                                                             8d a4 24 00 00 00 00                           ..$....
0047d237                                                                       90 90 90 90 90 90 90 90 90                         .........

0047d240  void __fastcall SmartArray<HairStyle_CG,1>::~SmartArray<HairStyle_CG,1>(class SmartArray<HairStyle_CG,1>* this)

0047d240  {
0047d24d      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d24d      {
0047d24f          class HairStyle_CG* m_data = this->m_data;
0047d24f          
0047d253          if (m_data != 0)
0047d253          {
0047d255              int32_t vtable = m_data->vtable;
0047d262              void* esi_3 = ((vtable * 0x3c) + m_data);
0047d262              
0047d265              if ((vtable - 1) >= 0)
0047d265              {
0047d268                  int32_t edi_1 = vtable;
0047d282                  int32_t i;
0047d282                  
0047d282                  do
0047d282                  {
0047d270                      esi_3 -= 0x3c;
0047d276                      *(uint32_t*)esi_3 = 0x79fa80;
0047d27c                      ObjDesc::~ObjDesc(((char*)esi_3 + 0x10));
0047d281                      i = edi_1;
0047d281                      edi_1 -= 1;
0047d282                  } while (i != 1);
0047d265              }
0047d265              
0047d286              operator delete[](((char*)m_data - 4));
0047d253          }
0047d24d      }
0047d240  }

0047d26d                                         8d 49 00                                                               .I.
0047d291                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0047d2a0  void __fastcall SmartArray<EyesStrip_CG,1>::~SmartArray<EyesStrip_CG,1>(class SmartArray<EyesStrip_CG,1>* this)

0047d2a0  {
0047d2ad      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d2ad      {
0047d2af          class EyesStrip_CG* m_data = this->m_data;
0047d2af          
0047d2b3          if (m_data != 0)
0047d2b3          {
0047d2b5              int32_t vtable = m_data->vtable;
0047d2c2              void* esi_3 = ((vtable * 0x64) + m_data);
0047d2c2              
0047d2c5              if ((vtable - 1) >= 0)
0047d2c5              {
0047d2c8                  int32_t edi_1 = vtable;
0047d2ea                  int32_t i;
0047d2ea                  
0047d2ea                  do
0047d2ea                  {
0047d2d0                      esi_3 -= 0x64;
0047d2d6                      *(uint32_t*)esi_3 = 0x79fa84;
0047d2dc                      ObjDesc::~ObjDesc(((char*)esi_3 + 0x38));
0047d2e4                      ObjDesc::~ObjDesc(((char*)esi_3 + 0xc));
0047d2e9                      i = edi_1;
0047d2e9                      edi_1 -= 1;
0047d2ea                  } while (i != 1);
0047d2c5              }
0047d2c5              
0047d2ee              operator delete[](((char*)m_data - 4));
0047d2b3          }
0047d2ad      }
0047d2a0  }

0047d2cd                                         8d 49 00                                                               .I.
0047d2f9                                                                             90 90 90 90 90 90 90                           .......

0047d300  void __fastcall SmartArray<FaceStrip_CG,1>::~SmartArray<FaceStrip_CG,1>(class SmartArray<FaceStrip_CG,1>* this)

0047d300  {
0047d30d      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d30d      {
0047d30f          class FaceStrip_CG* m_data = this->m_data;
0047d30f          
0047d313          if (m_data != 0)
0047d313          {
0047d315              int32_t vtable = m_data->vtable;
0047d322              void* esi_3 = ((vtable * 0x34) + m_data);
0047d322              
0047d325              if ((vtable - 1) >= 0)
0047d325              {
0047d328                  int32_t edi_1 = vtable;
0047d342                  int32_t i;
0047d342                  
0047d342                  do
0047d342                  {
0047d330                      esi_3 -= 0x34;
0047d336                      *(uint32_t*)esi_3 = 0x79fa88;
0047d33c                      ObjDesc::~ObjDesc(((char*)esi_3 + 8));
0047d341                      i = edi_1;
0047d341                      edi_1 -= 1;
0047d342                  } while (i != 1);
0047d325              }
0047d325              
0047d346              operator delete[](((char*)m_data - 4));
0047d313          }
0047d30d      }
0047d300  }

0047d32d                                         8d 49 00                                                               .I.
0047d351                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0047d360  void* __thiscall Style_CG::`vector deleting destructor'(class Style_CG* this, uint32_t arg2)

0047d360  {
0047d360      class Style_CG* var_4 = this;
0047d360      
0047d36a      if ((arg2 & 2) == 0)
0047d36a      {
0047d3d8          void* __offset(PSRefBufferCharData<char>, -0x14) edi_4 = (this->name.m_charbuffer - 0x14);
0047d3df          this->vtable = 0x79fe70;
0047d3df          
0047d3f1          if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
0047d3f9              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
0047d3f9          
0047d400          if ((arg2 & 1) != 0)
0047d403              operator delete(this);
0047d403          
0047d410          return this;
0047d36a      }
0047d36a      
0047d36c      int32_t vtable = this->vtable;
0047d378      void* edi_2 = &this[vtable];
0047d378      
0047d37b      if ((vtable - 1) >= 0)
0047d37b      {
0047d385          var_4 = vtable;
0047d3b9          class Style_CG* i;
0047d3b9          
0047d3b9          do
0047d3b9          {
0047d390              int32_t esi_1 = *(uint32_t*)((char*)edi_2 - 0xc);
0047d393              edi_2 -= 0x10;
0047d39d              *(uint32_t*)edi_2 = 0x79fe70;
0047d39d              
0047d3ab              if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
0047d3b3                  **(uint32_t**)(esi_1 - 0x14)(1);
0047d3b3              
0047d3b5              i = var_4;
0047d3b5              var_4 -= 1;
0047d3b9          } while (i != 1);
0047d37b      }
0047d37b      
0047d3c1      if ((arg2 & 1) != 0)
0047d3c4          operator delete[](((char*)this - 4));
0047d3c4      
0047d3d2      return ((char*)this - 4);
0047d360  }

0047d413                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0047d420  void __fastcall Template_CG::~Template_CG(class Template_CG* this)

0047d420  {
0047d423      this->vtable = 0x79fe78;
0047d423      
0047d436      if ((this->mPrimarySkillsList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d43c          operator delete[](this->mPrimarySkillsList.m_data);
0047d43c      
0047d453      if ((this->mNormalSkillsList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d459          operator delete[](this->mNormalSkillsList.m_data);
0047d459      
0047d464      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = (this->name.m_charbuffer - 0x14);
0047d464      
0047d477      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0047d47f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0047d420  }

0047d483           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0047d490  void gmCGAppearancePage::Register()

0047d490  {
0047d49a      UIElement::RegisterElementClass(0x1000003c, gmCGAppearancePage::Create);
0047d490  }

0047d4a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0047d4b0  void __thiscall gmCGAppearancePage::SetChoice(class gmCGAppearancePage* this, enum gmCGAppearancePage::EType arg2)

0047d4b0  {
0047d4b8      class UIElement* m_pClothesChoices = this->m_pClothesChoices;
0047d4be      this->m_eCurType = arg2;
0047d4c4      m_pClothesChoices->vtable->SetVisible(0);
0047d4cb      this->m_pFaceChoices->vtable->SetVisible(0);
0047d4cb      
0047d4db      if (arg2 == ECG_CHOICE_FACE)
0047d4db      {
0047d595          this->m_pFaceButton->vtable->SetState(0x10000017);
0047d5a8          this->m_pClothesButton->vtable->SetState(0x10000016);
0047d5cc          this->m_iHoldheadgear = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->headgearStyle;
0047d5e1          CharGenState::SetHeadgearStyle(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 0xffffffff);
0047d5e6          this->m_pFaceChoices->vtable->SetVisible(1);
0047d5f5          gmCGAppearancePage::ZoomIn(this);
0047d4db      }
0047d4db      else if (arg2 == 2)
0047d4e2      {
0047d4ee          this->m_vectStartDirection.x = this->m_vectCurDirection.x;
0047d4fa          this->m_vectStartDirection.y = this->m_vectCurDirection.y;
0047d506          this->m_vectStartDirection.z = this->m_vectCurDirection.z;
0047d512          this->m_vectStartPosition.x = this->m_vectCurPosition.x;
0047d51e          this->m_vectStartPosition.y = this->m_vectCurPosition.y;
0047d52a          this->m_vectStartPosition.z = this->m_vectCurPosition.z;
0047d530          this->m_pFaceButton->vtable->SetState(0x10000016);
0047d543          this->m_pClothesButton->vtable->SetState(0x10000017);
0047d556          int32_t m_iHoldheadgear = this->m_iHoldheadgear;
0047d556          
0047d567          if ((m_iHoldheadgear > 0xfffffffe && m_iHoldheadgear < this->m_tChoices[5].iNumChoices))
0047d577              CharGenState::SetHeadgearStyle(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), m_iHoldheadgear);
0047d577          
0047d57c          this->m_pClothesChoices->vtable->SetVisible(1);
0047d58b          gmCGAppearancePage::ZoomOut(this);
0047d4e2      }
0047d4b0  }

0047d5ff                                                                                               90                                 .

0047d600  void* __thiscall Template_CG::`vector deleting destructor'(class Template_CG* this, uint32_t arg2)

0047d600  {
0047d604      int32_t (* const ebx)();
0047d604      ebx = arg2;
0047d604      
0047d60e      if ((ebx & 2) == 0)
0047d60e      {
0047d6ca          Template_CG::~Template_CG(this);
0047d6ca          
0047d6d2          if ((ebx & 1) != 0)
0047d6d5              operator delete(this);
0047d6d5          
0047d6e4          return this;
0047d60e      }
0047d60e      
0047d614      int32_t vtable = this->vtable;
0047d619      void* __offset(Template_CG, -0x4) edi = ((char*)this - 4);
0047d621      void* ebp_2 = &this[vtable];
0047d621      
0047d628      if ((vtable - 1) >= 0)
0047d628      {
0047d635          void* edi_1 = ((char*)ebp_2 + 0x2c);
0047d638          int32_t var_8_1 = vtable;
0047d6a4          int32_t i;
0047d6a4          
0047d6a4          do
0047d6a4          {
0047d640              ebp_2 -= 0x40;
0047d643              edi_1 -= 0x40;
0047d646              *(uint32_t*)ebp_2 = 0x79fe78;
0047d646              
0047d65a              if ((*(uint32_t*)((char*)edi_1 + 0xc) & 0x80000000) == 0x80000000)
0047d660                  operator delete[](*(uint32_t*)((char*)edi_1 + 8));
0047d660              
0047d676              if ((*(uint32_t*)edi_1 & 0x80000000) == 0x80000000)
0047d67c                  operator delete[](*(uint32_t*)((char*)edi_1 - 4));
0047d67c              
0047d687              int32_t* esi_2 = (*(uint32_t*)((char*)edi_1 - 0x28) - 0x14);
0047d687              
0047d696              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0047d69e                  **(uint32_t**)esi_2(1);
0047d69e              
0047d6a0              i = var_8_1;
0047d6a0              var_8_1 -= 1;
0047d6a4          } while (i != 1);
0047d6aa          ebx = arg2;
0047d628      }
0047d628      
0047d6b1      if ((ebx & 1) != 0)
0047d6b4          operator delete[](edi);
0047d6b4      
0047d6c5      return edi;
0047d600  }

0047d6e7                       90 90 90 90 90 90 90 90 90                                                         .........

0047d6f0  void __fastcall Sex_CG::~Sex_CG(class Sex_CG* this)

0047d6f0  {
0047d6f3      this->vtable = 0x79fe7c;
0047d6f3      
0047d709      if ((this->mClothingColorsList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d712          operator delete[](this->mClothingColorsList.m_data);
0047d712      
0047d72c      if ((this->mFootwearList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d72c      {
0047d72e          class Style_CG* m_data_2 = this->mFootwearList.m_data;
0047d72e          
0047d736          if (m_data_2 != 0)
0047d73a              Style_CG::`vector deleting destructor'(m_data_2, 3);
0047d72c      }
0047d72c      
0047d74f      if ((this->mPantsList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d74f      {
0047d751          class Style_CG* m_data_3 = this->mPantsList.m_data;
0047d751          
0047d759          if (m_data_3 != 0)
0047d75d              Style_CG::`vector deleting destructor'(m_data_3, 3);
0047d74f      }
0047d74f      
0047d774      if ((this->mShirtList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d774      {
0047d776          class Style_CG* m_data_4 = this->mShirtList.m_data;
0047d776          
0047d77e          if (m_data_4 != 0)
0047d782              Style_CG::`vector deleting destructor'(m_data_4, 3);
0047d774      }
0047d774      
0047d799      if ((this->mHeadgearList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d799      {
0047d79b          class Style_CG* m_data_5 = this->mHeadgearList.m_data;
0047d79b          
0047d7a3          if (m_data_5 != 0)
0047d7a7              Style_CG::`vector deleting destructor'(m_data_5, 3);
0047d799      }
0047d799      
0047d7b2      SmartArray<FaceStrip_CG,1>::~SmartArray<FaceStrip_CG,1>(&this->mMouthStripList);
0047d7bd      SmartArray<FaceStrip_CG,1>::~SmartArray<FaceStrip_CG,1>(&this->mNoseStripList);
0047d7c5      SmartArray<EyesStrip_CG,1>::~SmartArray<EyesStrip_CG,1>(&this->mEyeStripList);
0047d7c5      
0047d7d7      if ((this->mEyeColorList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d7d7      {
0047d7d9          class IDClass<_tagDataID,32,0>* m_data = this->mEyeColorList.m_data;
0047d7d9          
0047d7de          if (m_data != 0)
0047d7e4              operator delete[](&m_data[-1]);
0047d7d7      }
0047d7d7      
0047d7ef      SmartArray<HairStyle_CG,1>::~SmartArray<HairStyle_CG,1>(&this->mHairStyleList);
0047d7ef      
0047d803      if ((this->mHairColorList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047d803      {
0047d805          class IDClass<_tagDataID,32,0>* m_data_1 = this->mHairColorList.m_data;
0047d805          
0047d80a          if (m_data_1 != 0)
0047d810              operator delete[](&m_data_1[-1]);
0047d803      }
0047d803      
0047d81b      ObjDesc::~ObjDesc(&this->objDesc);
0047d823      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = (this->name.m_charbuffer - 0x14);
0047d823      
0047d836      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0047d83e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0047d6f0  }

0047d842        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0047d850  void __thiscall gmCGAppearancePage::DoColorSpots(class gmCGAppearancePage* this, int32_t arg2)

0047d850  {
0047d856      int32_t i = 0;
0047d85d      int32_t i_1 = 0;
0047d861      class Graphic** esi = &this->m_tColorWheel[0].pGraphic;
0047d861      
0047da7c      do
0047da7c      {
0047d87c          class IDClass<_tagDataID,32,0> __return;
0047d87c          DBObj::GetDIDByEnum(&__return, 0x1000000d, 7);
0047d88d          class IDClass<_tagDataID,32,0> __return_1;
0047d88d          DBObj::GetDIDByEnum(&__return_1, 0x1000000f, 7);
0047da51          ADJ(esi)->m_tColorWheel[0].pColor->vtable->SetVisible(1);
0047d8b0          void var_30;
0047d8b0          class DBObj* eax_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_30, __return, 0xc));
0047d8d5          void var_28;
0047d8d5          class DBObj* ebp_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_28, __return_1, 0xc));
0047d8d5          
0047d8db          if (eax_3 != 0)
0047d8db          {
0047d8e4              long double x87_r7_1 = ((long double)ADJ(esi)->m_tColorWheel[0].iRed);
0047d8e7              bool cond:1_1 = ADJ(esi)->m_tColorWheel[0].iRed >= 0;
0047d8e9              int32_t var_10 = 0;
0047d8f1              int32_t var_c_1 = 0;
0047d8f9              int32_t var_8_1 = 0;
0047d901              int32_t var_4_1 = 0x3f800000;
0047d901              
0047d909              if (!(cond:1_1))
0047d90b                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0047d90b              
0047d91a              bool cond:2_1 = ADJ(esi)->m_tColorWheel[0].iGreen >= 0;
0047d91c              float var_20 = ((float)(x87_r7_1 * ((long double)0.00392156886f)));
0047d920              long double x87_r7_3 = ((long double)ADJ(esi)->m_tColorWheel[0].iGreen);
0047d920              
0047d923              if (!(cond:2_1))
0047d925                  x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
0047d925              
0047d936              float var_1c_1 = ((float)(x87_r7_3 * ((long double)0.00392156886f)));
0047d93a              long double x87_r7_5 = ((long double)ADJ(esi)->m_tColorWheel[0].iBlue);
0047d93a              
0047d93d              if (ADJ(esi)->m_tColorWheel[0].iBlue < 0)
0047d93f                  x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
0047d93f              
0047d94f              int32_t var_14_1 = 0x3f800000;
0047d957              float var_18_1 = ((float)(x87_r7_5 * ((long double)0.00392156886f)));
0047d957              
0047d95b              if (ADJ(esi)->m_tColorWheel[0].pGraphic == 0)
0047d95b              {
0047d965                  int32_t* eax_8 = RenderDevice::render_device->vtable->CreateLocalSurface();
0047d965                  
0047d96c                  if (eax_8 != 0)
0047d96c                  {
0047d99e                      *(uint32_t*)(*(uint32_t*)eax_8 + 0x58)(*(int32_t*)((char*)eax_3 + 0xa0), *(int32_t*)((char*)eax_3 + 0xa4), RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1);
0047d9a3                      void* eax_12 = operator new(0xc);
0047d9ad                      class Graphic* eax_13;
0047d9ad                      
0047d9ad                      if (eax_12 == 0)
0047d9b9                          eax_13 = nullptr;
0047d9ad                      else
0047d9b2                          eax_13 = Graphic::Graphic(eax_12, eax_8);
0047d9b2                      
0047da51                      ADJ(esi)->m_tColorWheel[0].pGraphic = eax_13;
0047d96c                  }
0047d95b              }
0047d95b              
0047d9c9              i = i_1;
0047d9c9              
0047d9de              if (i >= *(uint32_t*)((char*)this + (((arg2 * 3) + 0xe1) << 3)))
0047da25                  SurfaceWindow::Blit(&ADJ(esi)->m_tColorWheel[0].pGraphic->m_image->window, ((char*)ebp_1 + 0xac), Blit_Normal, 1f);
0047d9de              else
0047d9de              {
0047d9f2                  SurfaceWindow::Blit(&ADJ(esi)->m_tColorWheel[0].pGraphic->m_image->window, ((char*)eax_3 + 0xac), Blit_Normal, 1f);
0047da0c                  SurfaceWindow::ReplaceColor(&ADJ(esi)->m_tColorWheel[0].pGraphic->m_image->window, &var_10, &var_20);
0047d9de              }
0047d9de              
0047da2d              UIRegion::ClearImage(ADJ(esi)->m_tColorWheel[0].pColor);
0047da34              class Graphic* eax_17 = operator new(0xc);
0047da3e              class Graphic* eax_18;
0047da3e              
0047da3e              if (eax_17 == 0)
0047da4f                  eax_18 = nullptr;
0047da3e              else
0047da48                  eax_18 = Graphic::Graphic(eax_17, ADJ(esi)->m_tColorWheel[0].pGraphic->m_image);
0047da48              
0047da55              UIRegion::SetImage(ADJ(esi)->m_tColorWheel[0].pColor, eax_18);
0047d8db          }
0047d8db          
0047da5c          if (ebp_1 != 0)
0047da5e              ebp_1->vtable->Release();
0047da5e          
0047da68          if (eax_3 != 0)
0047da6a              eax_3->vtable->Release();
0047da6a          
0047da71          i += 1;
0047da72          esi = &esi[7];
0047da78          i_1 = i;
0047da7c      } while (i < 9);
0047d850  }

0047d869                             8d a4 24 00 00 00 00                                                           ..$....
0047da8c                                      90 90 90 90                                                              ....

0047da90  void __thiscall gmCGAppearancePage::DoGradDisk(class gmCGAppearancePage* this, uint8_t arg2)

0047da90  {
0047daa4      class IDClass<_tagDataID,32,0> __return;
0047daa4      DBObj::GetDIDByEnum(&__return, 0x1000000e, 7);
0047dab5      class IDClass<_tagDataID,32,0> __return_1;
0047dab5      DBObj::GetDIDByEnum(&__return_1, 0x10000010, 7);
0047dad6      void var_20;
0047dad6      class DBObj* ebp = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_20, __return, 0xc));
0047dae3      class DBObj* var_30 = ebp;
0047daf7      void var_18;
0047daf7      class DBObj* ebx = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_18, __return_1, 0xc));
0047daf9      class DBObj* var_34 = ebx;
0047daf9      
0047dafd      if (ebp == 0)
0047dafd      {
0047dd2b      label_47dd2b:
0047dd2b          
0047dd2d          if (ebx != 0)
0047dd2f              ebx->vtable->Release();
0047dafd      }
0047dafd      else if (ebx != 0)
0047db05      {
0047db0b          int32_t m_iCurColor = this->m_iCurColor;
0047db13          void* ecx_3 = (m_iCurColor * 0x1c);
0047db16          long double x87_r7_1 = ((long double)*(uint32_t*)(&this->m_tColorWheel + ecx_3));
0047db16          
0047db29          if (*(uint32_t*)(&this->m_tColorWheel + ecx_3) < 0)
0047db2b              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0047db2b          
0047db3d          float var_10 = ((float)(x87_r7_1 * ((long double)0.00392156886f)));
0047db41          int32_t eax_7 = *(uint32_t*)(((m_iCurColor + 0x48) * 0x1c) + this);
0047db4a          long double x87_r7_3 = ((long double)eax_7);
0047db4a          
0047db4e          if (eax_7 < 0)
0047db50              x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
0047db50          
0047db5c          int32_t ecx_5 = *(uint32_t*)(&*(uint32_t*)((char*)this->m_tColorWheel[0])[8] + ecx_3);
0047db68          float var_c_1 = ((float)(x87_r7_3 * ((long double)0.00392156886f)));
0047db6c          long double x87_r7_5 = ((long double)ecx_5);
0047db6c          
0047db70          if (ecx_5 < 0)
0047db72              x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
0047db72          
0047db86          int32_t var_4_1 = 0x3f800000;
0047db8e          float var_8_1 = ((float)(x87_r7_5 * ((long double)0.00392156886f)));
0047db8e          
0047db92          if (this->m_pGradGraphic == 0)
0047db92          {
0047db9c              int32_t* eax_9 = RenderDevice::render_device->vtable->CreateLocalSurface();
0047db9c              
0047dba3              if (eax_9 != 0)
0047dba3              {
0047dbcd                  *(uint32_t*)(*(uint32_t*)eax_9 + 0x58)(*(int32_t*)((char*)ebp + 0xa0), *(int32_t*)((char*)ebp + 0xa4), RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1);
0047dbd2                  class Graphic* eax_12 = operator new(0xc);
0047dbdc                  class Graphic* eax_13;
0047dbdc                  
0047dbdc                  if (eax_12 == 0)
0047dbe8                      eax_13 = nullptr;
0047dbdc                  else
0047dbe1                      eax_13 = Graphic::Graphic(eax_12, eax_9);
0047dbe1                  
0047dbea                  ebp = var_30;
0047dbee                  ebx = var_34;
0047dbf2                  this->m_pGradGraphic = eax_13;
0047dba3              }
0047db92          }
0047db92          
0047dc00          class Graphic* eax_14;
0047dc00          
0047dc00          if (this->m_pGradPlug == 0)
0047dc00          {
0047dc0a              eax_14 = RenderDevice::render_device->vtable->CreateLocalSurface();
0047dc0a              
0047dc11              if (eax_14 != 0)
0047dc11              {
0047dc3f                  *(int32_t*)((char*)eax_14->vtable + 0x58)(*(int32_t*)((char*)var_34 + 0xa0), *(int32_t*)((char*)ebx + 0xa4), RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1);
0047dc44                  class Graphic* eax_17 = operator new(0xc);
0047dc44                  
0047dc4e                  if (eax_17 == 0)
0047dc5a                      eax_14 = nullptr;
0047dc4e                  else
0047dc53                      eax_14 = Graphic::Graphic(eax_17, eax_14);
0047dc53                  
0047dc5c                  ebp = var_30;
0047dc60                  ebx = var_34;
0047dc64                  this->m_pGradPlug = eax_14;
0047dc11              }
0047dc00          }
0047dc00          
0047dc6a          eax_14 = arg2;
0047dc71          class Graphic* eax_21;
0047dc71          
0047dc71          if (eax_14 != 0)
0047dc71          {
0047dcec              SurfaceWindow::Blit(&this->m_pGradPlug->m_image->window, ((char*)ebx + 0xac), Blit_Normal, 1f);
0047dcf7              UIRegion::ClearImage(this->m_pGradCircle);
0047dcfe              class Graphic* eax_23 = operator new(0xc);
0047dcfe              
0047dd08              if (eax_23 == 0)
0047dd1d                  eax_21 = nullptr;
0047dd08              else
0047dd16                  eax_21 = Graphic::Graphic(eax_23, this->m_pGradPlug->m_image);
0047dc71          }
0047dc71          else
0047dc71          {
0047dc77              uint32_t eax_18 = RGBAColor::GetColor32(&var_10);
0047dc9e              SurfaceWindow::BlitAndColor(&this->m_pGradGraphic->m_image->window, ((char*)ebp + 0xac), Blit_Normal, 1f, nullptr, Blit_Multiply, eax_18);
0047dca9              UIRegion::ClearImage(this->m_pGradCircle);
0047dcb0              void* eax_20 = operator new(0xc);
0047dcb0              
0047dcba              if (eax_20 == 0)
0047dd1d                  eax_21 = nullptr;
0047dcba              else
0047dcc8                  eax_21 = Graphic::Graphic(eax_20, this->m_pGradGraphic->m_image);
0047dc71          }
0047dc71          
0047dd26          UIRegion::SetImage(this->m_pGradCircle, eax_21);
0047db4e          goto label_47dd2b;
0047db05      }
0047db05      
0047dd38      if (ebp != 0)
0047dd3a          ebp->vtable->Release();
0047da90  }

0047dd4b                                   90 90 90 90 90                                                             .....

0047dd50  void __thiscall gmCGAppearancePage::SetColor(class gmCGAppearancePage* this, int32_t arg2)

0047dd50  {
0047dd53      int32_t m_iCurColor = this->m_iCurColor;
0047dd53      
0047dd5c      if (m_iCurColor != 0xffffffff)
0047dd61          &*(uint32_t*)((char*)this->m_tColorWheel[0])[0x10][(m_iCurColor * 7)]->vtable->SetVisible(0);
0047dd61      
0047dd79      if (arg2 != 0xffffffff)
0047dd80          &*(uint32_t*)((char*)this->m_tColorWheel[0])[0x10][(arg2 * 7)]->vtable->SetVisible(1);
0047dd80      
0047dd8e      class CPlayerSystem* m_pPlayerSystem = this->m_pPlayerSystem;
0047dd94      this->m_iCurColor = arg2;
0047dd9f      class CharGenState* ecx_2 = CPlayerSystem::GetCharGenState(m_pPlayerSystem);
0047ddab      arg2 = 0;
0047ddab      
0047ddb3      switch ((this->m_eCurPart - 1))
0047ddb3      {
0047ddc1          case 0:
0047ddc1          {
0047ddc1              CharGenState::SetHairColor(ecx_2, this->m_iCurColor);
0047ddc1              break;
0047ddc1          }
0047ddcf          case 1:
0047ddcf          {
0047ddcf              CharGenState::SetEyeColor(ecx_2, this->m_iCurColor);
0047ddd4              arg2 = 1;
0047ddcf              break;
0047ddcf          }
0047dde1          case 5:
0047dde1          {
0047dde1              ecx_2->headgearColor = this->m_iCurColor;
0047dde1              break;
0047dde1          }
0047ddef          case 6:
0047ddef          {
0047ddef              ecx_2->shirtColor = this->m_iCurColor;
0047ddef              break;
0047ddef          }
0047ddfd          case 7:
0047ddfd          {
0047ddfd              ecx_2->trousersColor = this->m_iCurColor;
0047ddfd              break;
0047ddfd          }
0047de0b          case 8:
0047de0b          {
0047de0b              ecx_2->footwearColor = this->m_iCurColor;
0047de0b              break;
0047de0b          }
0047ddb3      }
0047ddb3      
0047de18      gmCGAppearancePage::DoGradDisk(this, arg2);
0047de18      
0047de26      if (UIElement::IsVisible(this) != 0)
0047de2e          gmCG3DView::Update(this->m_p3DView);
0047dd50  }

0047de37                                                                       90                                                 .
0047de38  uint32_t jump_table_47de38[0x9] = 
0047de38  {
0047de38      [0x0] =  0x0047ddba
0047de3c      [0x1] =  0x0047ddc8
0047de40      [0x2] =  0x0047de11
0047de44      [0x3] =  0x0047de11
0047de48      [0x4] =  0x0047de11
0047de4c      [0x5] =  0x0047dddb
0047de50      [0x6] =  0x0047dde9
0047de54      [0x7] =  0x0047ddf7
0047de58      [0x8] =  0x0047de05
0047de5c  }

0047de5c                                                                                      90 90 90 90                              ....

0047de60  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>* this)

0047de60  {
0047de68      if (this->m_numElements != 0)
0047de68      {
0047de6a          void* edi;
0047de6a          void* var_8_1 = edi;
0047de6a          
0047dee0          do
0047dee0          {
0047de76              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0047de7c              int32_t* m_firstInterestingBucket_2;
0047de7c              
0047de7c              if (this->m_firstInterestingBucket == ecx_1)
0047de7c              {
0047de92              label_47de92:
0047de92                  m_firstInterestingBucket_2 = nullptr;
0047de94                  edi = nullptr;
0047de7c              }
0047de7c              else
0047de7c              {
0047de80                  while (true)
0047de80                  {
0047de80                      class HashTableData<unsigned long,Sex_CG>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0047de80                      
0047de86                      if (*(uint32_t*)m_firstInterestingBucket != 0)
0047de86                      {
0047de98                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0047de9b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
0047de9d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0047de9d                          break;
0047de86                      }
0047de86                      
0047de8d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0047de8d                      
0047de90                      if (&m_firstInterestingBucket[1] == ecx_1)
0047de90                          goto label_47de92;
0047de80                  }
0047de7c              }
0047de7c              
0047de9f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0047de9f              
0047dea3              if (eax_3 == edi)
0047deb5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0047dea3              else
0047dea3              {
0047deac                  void* ecx_2;
0047deac                  
0047deac                  do
0047deac                  {
0047dea5                      ecx_2 = eax_3;
0047dea7                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0047deac                  } while (eax_3 != edi);
0047deac                  
0047deb0                  if (ecx_2 != 0)
0047debc                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
0047deb0                  else
0047deb5                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0047dea3              }
0047dea3              
0047dec5              this->m_numElements -= 1;
0047dec5              
0047dec8              if (edi != 0)
0047dec8              {
0047decd                  Sex_CG::~Sex_CG(((char*)edi + 8));
0047ded3                  operator delete(edi);
0047dec8              }
0047dee0          } while (this->m_numElements != 0);
0047de68      }
0047de60  }

0047de6d                                         8d 49 00                                                               .I.
0047dee5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0047def0  void* __thiscall HashTable<unsigned long,Sex_CG,0>::`scalar deleting destructor'(class HashTable<unsigned long,Sex_CG,0>* this, uint32_t arg2)

0047def0  {
0047def9      this->vtable = 0x79fe80;
0047deff      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::delete_contents(&this->m_intrusiveTable);
0047df04      class HashTableData<unsigned long,Sex_CG>** m_buckets = this->m_intrusiveTable.m_buckets;
0047def4      this->m_intrusiveTable.vtable = 0x79fe74;
0047def4      
0047df12      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0047df15          operator delete[](m_buckets);
0047df15      
0047def4      this->m_intrusiveTable.m_buckets = nullptr;
0047def4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0047def4      this->m_intrusiveTable.m_numBuckets = 0;
0047def4      this->m_intrusiveTable.m_numElements = 0;
0047def4      
0047df30      if ((arg2 & 1) != 0)
0047df33          operator delete(this);
0047df33      
0047df3f      return this;
0047def0  }

0047df42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0047df50  void __fastcall HeritageGroup_CG::~HeritageGroup_CG(class HeritageGroup_CG* this)

0047df50  {
0047df58      this->vtable = 0x79fe84;
0047df60      this->mGenderList.vtable = 0x79fe80;
0047df67      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::delete_contents(&this->mGenderList.m_intrusiveTable);
0047df6c      class HashTableData<unsigned long,Sex_CG>** m_buckets = this->mGenderList.m_intrusiveTable.m_buckets;
0047df55      this->mGenderList.m_intrusiveTable.vtable = 0x79fe74;
0047df55      
0047df7a      if (m_buckets != &this->mGenderList.m_intrusiveTable.m_aInplaceBuckets)
0047df7d          operator delete[](m_buckets);
0047df7d      
0047df55      this->mGenderList.m_intrusiveTable.m_buckets = nullptr;
0047df55      this->mGenderList.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0047df55      this->mGenderList.m_intrusiveTable.m_numBuckets = 0;
0047df55      this->mGenderList.m_intrusiveTable.m_numElements = 0;
0047df55      
0047dfa2      if ((this->mTemplateList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047dfa2      {
0047dfa4          class Template_CG* m_data = this->mTemplateList.m_data;
0047dfa4          
0047dfa9          if (m_data != 0)
0047dfad              Template_CG::`vector deleting destructor'(m_data, 3);
0047dfa2      }
0047dfa2      
0047dfb5      SmartArray<Skill_CG,1>::~SmartArray<Skill_CG,1>(&this->mSkillList);
0047dfb5      
0047dfc7      if ((this->mSecondaryStartAreaList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047dfcd          operator delete[](this->mSecondaryStartAreaList.m_data);
0047dfcd      
0047dfe4      if ((this->mPrimaryStartAreaList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0047dfea          operator delete[](this->mPrimaryStartAreaList.m_data);
0047dfea      
0047dff5      void* __offset(PSRefBufferCharData<char>, -0x14) edi_2 = (this->name.m_charbuffer - 0x14);
0047dff5      
0047e008      if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0047e010          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0047df50  }

0047e016                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0047e020  void __fastcall gmCGAppearancePage::SetupParts(class gmCGAppearancePage* this)

0047e020  {
0047e036      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047e052      void __return_1;
0047e052      ACCharGenData::GetHG(eax->charGenData, &__return_1, eax->mHeritageGroup);
0047e06a      void __return;
0047e06a      HeritageGroup_CG::GetSX(&__return_1, &__return, eax->mGender);
0047e079      int32_t var_13c;
0047e079      this->m_tChoices[0].iNumChoices = var_13c;
0047e07f      this->m_tChoices[0].iCurrentChoice = eax->hairStyle;
0047e08f      this->m_tChoices[0].iCurrentColor = eax->hairColor;
0047e09c      int32_t var_148;
0047e09c      this->m_tChoices[0].iNumColors = var_148;
0047e0a8      this->m_tChoices[0].dShade = ((double)((long double)eax->hairShade));
0047e0b4      this->m_tChoices[1].iCurrentChoice = eax->eyesStrip;
0047e0c1      int32_t var_124;
0047e0c1      this->m_tChoices[1].iNumChoices = var_124;
0047e0cd      int32_t var_130;
0047e0cd      this->m_tChoices[1].iNumColors = var_130;
0047e0dc      this->m_tChoices[1].iCurrentColor = eax->eyeColor;
0047e0e2      this->m_tChoices[1].dShade = 0f;
0047e0e8      *(uint32_t*)((char*)this->m_tChoices[1].dShade)[4] = 0;
0047e0f4      this->m_tChoices[2].iCurrentChoice = eax->noseStrip;
0047e0fa      int32_t var_118;
0047e0fa      this->m_tChoices[2].iNumChoices = var_118;
0047e100      this->m_tChoices[2].iNumColors = 0;
0047e106      this->m_tChoices[2].dShade = 0f;
0047e10c      *(uint32_t*)((char*)this->m_tChoices[2].dShade)[4] = 0;
0047e115      this->m_tChoices[2].iCurrentColor = 0xffffffff;
0047e121      this->m_tChoices[3].iCurrentChoice = eax->mouthStrip;
0047e12e      int32_t var_10c;
0047e12e      this->m_tChoices[3].iNumChoices = var_10c;
0047e134      this->m_tChoices[3].iCurrentColor = 0xffffffff;
0047e141      this->m_tChoices[3].iNumColors = 0;
0047e147      this->m_tChoices[3].dShade = 0f;
0047e14d      *(uint32_t*)((char*)this->m_tChoices[3].dShade)[4] = 0;
0047e159      this->m_tChoices[5].iCurrentChoice = eax->headgearStyle;
0047e15f      int32_t var_100;
0047e15f      this->m_tChoices[5].iNumChoices = var_100;
0047e16b      this->m_tChoices[5].iCurrentColor = eax->headgearColor;
0047e17e      this->m_tChoices[5].iNumColors = eax->numHeadgearColors;
0047e18a      this->m_tChoices[5].dShade = ((double)((long double)eax->headgearShade));
0047e196      this->m_tChoices[6].iCurrentChoice = eax->shirtStyle;
0047e19c      int32_t var_f4;
0047e19c      this->m_tChoices[6].iNumChoices = var_f4;
0047e1a8      this->m_tChoices[6].iCurrentColor = eax->shirtColor;
0047e1b4      this->m_tChoices[6].iNumColors = eax->numShirtColors;
0047e1c0      this->m_tChoices[6].dShade = ((double)((long double)eax->shirtShade));
0047e1cc      this->m_tChoices[7].iCurrentChoice = eax->trousersStyle;
0047e1d9      int32_t var_e8;
0047e1d9      this->m_tChoices[7].iNumChoices = var_e8;
0047e1e5      this->m_tChoices[7].iCurrentColor = eax->trousersColor;
0047e1f8      this->m_tChoices[7].iNumColors = eax->numTrousersColors;
0047e204      this->m_tChoices[7].dShade = ((double)((long double)eax->trousersShade));
0047e210      int32_t var_dc;
0047e210      this->m_tChoices[8].iNumChoices = var_dc;
0047e216      this->m_tChoices[8].iCurrentChoice = eax->footwearStyle;
0047e222      this->m_tChoices[8].iCurrentColor = eax->footwearColor;
0047e22e      this->m_tChoices[8].iNumColors = eax->numFootwearColors;
0047e23a      this->m_tChoices[8].dShade = ((double)((long double)eax->footwearShade));
0047e244      Sex_CG::~Sex_CG(&__return);
0047e250      HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
0047e020  }

0047e25b                                                                                   90 90 90 90 90                             .....

0047e260  void __thiscall gmCGAppearancePage::SetSelection(class gmCGAppearancePage* this, enum gmCGAppearancePage::EParts arg2)

0047e260  {
0047e26d      class CPlayerSystem* m_pPlayerSystem = this->m_pPlayerSystem;
0047e274      int32_t var_1dc = 0;
0047e278      int32_t __return = 0;
0047e27c      int32_t var_1e0 = 0;
0047e280      int32_t eyeColor = 0;
0047e284      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(m_pPlayerSystem);
0047e2a0      void __return_6;
0047e2a0      ACCharGenData::GetHG(eax->charGenData, &__return_6, eax->mHeritageGroup);
0047e2b8      void __return_5;
0047e2b8      HeritageGroup_CG::GetSX(&__return_6, &__return_5, eax->mGender);
0047e2c4      this->m_eCurPart = arg2;
0047e2d0      this->m_LastHeritageGroup = eax->mHeritageGroup;
0047e2d6      class UIElement** edi = &this->m_tColorWheel[0].pPointer;
0047e2dc      int32_t i_2 = 9;
0047e2f8      int32_t i;
0047e2f8      
0047e2f8      do
0047e2f8      {
0047e790          ADJ(edi)->m_tColorWheel[0].pColor->vtable->SetVisible(1);
0047e790          ADJ(edi)->m_tColorWheel[0].pPointer->vtable->SetVisible(0);
0047e2f4          edi = &edi[7];
0047e2f7          i = i_2;
0047e2f7          i_2 -= 1;
0047e2f8      } while (i != 1);
0047e2fa      class UIElement* m_pCurSelection = this->m_pCurSelection;
0047e300      int32_t edi_1 = 0;
0047e300      
0047e304      if (m_pCurSelection != 0)
0047e306          m_pCurSelection->vtable->SetState(1);
0047e306      
0047e31b      if ((arg2 - 1) > 8)
0047e31b          goto label_47e74b;
0047e31b      
0047e321      int32_t var_1e8;
0047e321      int32_t var_1e4;
0047e321      int32_t __return_1;
0047e321      class PalSet* __return_2;
0047e321      class PalSet* __return_3;
0047e321      class DBObj* var_1c4;
0047e321      class IDClass<_tagDataID,32,0> var_148;
0047e321      int32_t eax_19;
0047e321      int32_t ecx_21;
0047e321      int32_t eyeColor_1;
0047e321      
0047e321      switch (arg2)
0047e321      {
0047e331          case ECG_PARTS_HAIR:
0047e331          {
0047e331              int32_t var_13c;
0047e331              var_1e0 = var_13c;
0047e331              
0047e335              if (var_13c > 0)
0047e335              {
0047e366                  do
0047e366                  {
0047e35f                      int32_t var_144;
0047e35f                      *(uint32_t*)&&var_1c4[edi_1] = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e8, *(uint32_t*)(var_144 + (edi_1 << 2)), 0x18));
0047e363                      edi_1 += 1;
0047e366                  } while (edi_1 < var_13c);
0047e335              }
0047e335              
0047e36e              this->m_pCurSelection = this->m_pHairSpin;
0047e374              int32_t hairColor = eax->hairColor;
0047e37a              int32_t edx_4 = eax->hairShade;
0047e385              int32_t ecx_7;
0047e385              ecx_7 = hairColor == 0xffffffff;
0047e388              __return = 0xd0;
0047e390              var_1dc = 0;
0047e398              var_1e8 = edx_4;
0047e3a5              eyeColor = ((ecx_7 - 1) & hairColor);
0047e3a9              var_1e4 = *(uint32_t*)((char*)eax->hairShade)[4];
0047e3ad              goto label_47e74b;
0047e331          }
0047e3b2          case ECG_PARTS_EYES:
0047e3b2          {
0047e3b2              int32_t var_124;
0047e3b2              int32_t eax_10 = var_124;
0047e3b9              int32_t ebp_1 = 0;
0047e3b9              
0047e3bd              if (eax_10 > 0)
0047e3bd              {
0047e3bf                  uint32_t* edi_2 = &this->m_tColorWheel[0].iGreen;
0047e3bf                  
0047e40f                  do
0047e40f                  {
0047e3e2                      int32_t var_12c;
0047e3e2                      uint32_t eax_11 = ClientCharGenState::GetColorFromPal(eax, *(uint32_t*)(var_12c + (ebp_1 << 2)), 0x103);
0047e790                      ADJ(edi_2)->m_tColorWheel[0].iRed = ((uint32_t)((int8_t)(eax_11 >> 0x10)));
0047e790                      ADJ(edi_2)->m_tColorWheel[0].iBlue = ((uint32_t)eax_11);
0047e400                      eax_10 = var_124;
0047e790                      ADJ(edi_2)->m_tColorWheel[0].iGreen = ((uint32_t)((int8_t)(eax_11 >> 8)));
0047e409                      ebp_1 += 1;
0047e40a                      edi_2 = &edi_2[7];
0047e40f                  } while (ebp_1 < eax_10);
0047e3bd              }
0047e3bd              
0047e417              this->m_pCurSelection = this->m_pEyesSpin;
0047e423              var_1e0 = eax_10;
0047e427              var_1dc = 1;
0047e42f              eyeColor = eax->eyeColor;
0047e433              var_1e8 = 0;
0047e43b              var_1e4 = 0x3fe00000;
0047e3b2              break;
0047e3b2          }
0047e456          case ECG_PARTS_NOSE:
0047e456          {
0047e456              var_1e0 = 1;
0047e464              class DBObj* eax_15 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e8, var_148, 0x18));
0047e46f              this->m_pCurSelection = this->m_pNoseSpin;
0047e475              int32_t edx_9 = eax->skinShade;
0047e47b              var_1c4 = eax_15;
0047e47f              int32_t eax_16 = *(uint32_t*)((char*)eax->skinShade)[4];
0047e488              __return = 0xb0;
0047e490              var_1dc = 2;
0047e498              eyeColor = 0;
0047e49c              var_1e8 = edx_9;
0047e4a0              var_1e4 = eax_16;
0047e74b          label_47e74b:
0047e74b              int32_t __return_7 = 0;
0047e74f              __return_1 = 0;
0047e74f              
0047e753              if (var_1e0 > 0)
0047e753              {
0047e759                  uint32_t* edi_7 = &this->m_tColorWheel[0].iGreen;
0047e759                  
0047e80f                  do
0047e80f                  {
0047e760                      class PalSet* __return_8 = *(uint32_t*)&&var_1c4[__return_7];
0047e768                      int32_t i_1 = 0;
0047e76c                      __return_2 = __return_8;
0047e76c                      
0047e770                      if (__return_8 != 0)
0047e770                      {
0047e790                          ADJ(edi_7)->m_tColorWheel[0].iBlue = 0;
0047e790                          ADJ(edi_7)->m_tColorWheel[0].iGreen = 0;
0047e790                          ADJ(edi_7)->m_tColorWheel[0].iRed = 0;
0047e790                          
0047e783                          if (__return_8->num_pals > 0)
0047e783                          {
0047e787                              __return_3 = __return_8;
0047e787                              
0047e7dc                              do
0047e7dc                              {
0047e7a5                                  void __return_4;
0047e7a5                                  uint32_t eax_43 = ClientCharGenState::GetColorFromPal(eax, PalSet::GetPaletteID_Integral(__return_8, &__return_4, i_1)->id, __return);
0047e790                                  ADJ(edi_7)->m_tColorWheel[0].iRed += ((uint32_t)((int8_t)(eax_43 >> 0x10)));
0047e790                                  ADJ(edi_7)->m_tColorWheel[0].iGreen += ((uint32_t)((int8_t)(eax_43 >> 8)));
0047e790                                  ADJ(edi_7)->m_tColorWheel[0].iBlue += ((uint32_t)eax_43);
0047e7d5                                  __return_8 = __return_2;
0047e7d9                                  i_1 += 1;
0047e7dc                              } while (i_1 < __return_3->num_pals);
0047e783                          }
0047e783                          
0047e790                          ADJ(edi_7)->m_tColorWheel[0].iRed = (COMBINE(0, ADJ(edi_7)->m_tColorWheel[0].iRed) / __return_8->num_pals);
0047e790                          ADJ(edi_7)->m_tColorWheel[0].iGreen = (COMBINE(0, ADJ(edi_7)->m_tColorWheel[0].iGreen) / __return_8->num_pals);
0047e790                          ADJ(edi_7)->m_tColorWheel[0].iBlue = (COMBINE(0, ADJ(edi_7)->m_tColorWheel[0].iBlue) / __return_8->num_pals);
0047e7fd                          __return_7 = __return_1;
0047e770                      }
0047e770                      
0047e805                      __return_7 += 1;
0047e806                      edi_7 = &edi_7[7];
0047e80b                      __return_1 = __return_7;
0047e80f                  } while (__return_7 < var_1e0);
0047e753              }
0047e456              break;
0047e456          }
0047e4b7          case ECG_PARTS_MOUTH:
0047e4b7          {
0047e4b7              var_1e0 = 1;
0047e4c5              class DBObj* eax_18 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e8, var_148, 0x18));
0047e4d0              this->m_pCurSelection = this->m_pMouthSpin;
0047e4d6              ecx_21 = *(uint32_t*)((char*)eax->skinShade)[4];
0047e4dc              var_1c4 = eax_18;
0047e4e0              eax_19 = eax->skinShade;
0047e4e9              __return = 0xb0;
0047e4f1              var_1dc = 3;
0047e4f9              eyeColor = 0;
0047e73f          label_47e73f:
0047e73f              var_1e8 = eax_19;
0047e743              var_1e4 = ecx_21;
0047e743              goto label_47e74b;
0047e4b7          }
0047e510          case ECG_PARTS_SKIN:
0047e510          {
0047e510              var_1e0 = 1;
0047e523              var_1c4 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e8, var_148, 0x18));
0047e52d              this->m_pCurSelection = this->m_pSkinSpin;
0047e533              int32_t ecx_23 = eax->skinShade;
0047e539              int32_t edx_12 = *(uint32_t*)((char*)eax->skinShade)[4];
0047e542              __return = 0xb0;
0047e54a              var_1dc = 4;
0047e552              eyeColor = 0;
0047e556              var_1e8 = ecx_23;
0047e55a              var_1e4 = edx_12;
0047e55e              goto label_47e74b;
0047e510          }
0047e563          case ECG_PARTS_HEADGEAR:
0047e563          {
0047e563              int32_t numHeadgearColors = eax->numHeadgearColors;
0047e569              int32_t edi_3 = 0;
0047e56d              var_1e0 = numHeadgearColors;
0047e56d              
0047e571              if (numHeadgearColors > 0)
0047e571              {
0047e59e                  do
0047e59e                  {
0047e597                      *(uint32_t*)&&var_1c4[edi_3] = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e8, CharGenState::GetHeadgearPalSetID(eax, &__return_3, edi_3)->id, 0x18));
0047e59b                      edi_3 += 1;
0047e59e                  } while (edi_3 < numHeadgearColors);
0047e571              }
0047e571              
0047e5a6              this->m_pCurSelection = this->m_pHeadgearSpin;
0047e5ac              eyeColor_1 = eax->headgearColor;
0047e5b2              eax_19 = eax->headgearShade;
0047e5b8              ecx_21 = *(uint32_t*)((char*)eax->headgearShade)[4];
0047e5be              var_1dc = 5;
0047e733          label_47e733:
0047e733              __return = 0x520;
0047e73b              eyeColor = eyeColor_1;
0047e73b              goto label_47e73f;
0047e563          }
0047e5cb          case ECG_PARTS_SHIRT:
0047e5cb          {
0047e5cb              int32_t numShirtColors = eax->numShirtColors;
0047e5d1              int32_t edi_4 = 0;
0047e5d5              var_1e0 = numShirtColors;
0047e5d5              
0047e5d9              if (numShirtColors > 0)
0047e5d9              {
0047e60b                  do
0047e60b                  {
0047e604                      *(uint32_t*)&&var_1c4[edi_4] = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e8, CharGenState::GetShirtPalSetID(eax, &__return_1, edi_4)->id, 0x18));
0047e608                      edi_4 += 1;
0047e60b                  } while (edi_4 < numShirtColors);
0047e5d9              }
0047e5d9              
0047e613              this->m_pCurSelection = this->m_pShirtSpin;
0047e619              int32_t shirtColor = eax->shirtColor;
0047e61f              int32_t edx_13 = eax->shirtShade;
0047e625              int32_t eax_32 = *(uint32_t*)((char*)eax->shirtShade)[4];
0047e62b              __return = 0x520;
0047e633              var_1dc = 6;
0047e63b              eyeColor = shirtColor;
0047e63f              var_1e8 = edx_13;
0047e643              var_1e4 = eax_32;
0047e647              goto label_47e74b;
0047e5cb          }
0047e64c          case ECG_PARTS_TROUSERS:
0047e64c          {
0047e64c              int32_t numTrousersColors = eax->numTrousersColors;
0047e652              int32_t edi_5 = 0;
0047e656              var_1e0 = numTrousersColors;
0047e656              
0047e65a              if (numTrousersColors > 0)
0047e65a              {
0047e68b                  do
0047e68b                  {
0047e684                      *(uint32_t*)&&var_1c4[edi_5] = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e8, CharGenState::GetTrousersPalSetID(eax, &__return_2, edi_5)->id, 0x18));
0047e688                      edi_5 += 1;
0047e68b                  } while (edi_5 < numTrousersColors);
0047e65a              }
0047e65a              
0047e693              this->m_pCurSelection = this->m_pTrousersSpin;
0047e699              int32_t trousersColor = eax->trousersColor;
0047e69f              int32_t ecx_31 = eax->trousersShade;
0047e6a5              int32_t edx_15 = *(uint32_t*)((char*)eax->trousersShade)[4];
0047e6ab              __return = 0x520;
0047e6b3              var_1dc = 7;
0047e6bb              eyeColor = trousersColor;
0047e6bf              var_1e8 = ecx_31;
0047e6c3              var_1e4 = edx_15;
0047e6c7              goto label_47e74b;
0047e64c          }
0047e6c9          case ECG_PARTS_FOOTWEAR:
0047e6c9          {
0047e6c9              int32_t numFootwearColors = eax->numFootwearColors;
0047e6cf              int32_t edi_6 = 0;
0047e6d3              var_1e0 = numFootwearColors;
0047e6d3              
0047e6d7              if (numFootwearColors > 0)
0047e6d7              {
0047e70b                  do
0047e70b                  {
0047e704                      *(uint32_t*)&&var_1c4[edi_6] = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e8, CharGenState::GetFootwearPalSetID(eax, &__return, edi_6)->id, 0x18));
0047e708                      edi_6 += 1;
0047e70b                  } while (edi_6 < numFootwearColors);
0047e6d7              }
0047e6d7              
0047e713              this->m_pCurSelection = this->m_pFootwearSpin;
0047e719              eyeColor_1 = eax->footwearColor;
0047e71f              eax_19 = eax->footwearShade;
0047e725              ecx_21 = *(uint32_t*)((char*)eax->footwearShade)[4];
0047e72b              var_1dc = 8;
0047e72b              goto label_47e733;
0047e6c9          }
0047e321      }
0047e321      
0047e821      this->m_iCurColor = eyeColor;
0047e827      this->m_iPartIndex = var_1dc;
0047e834      *(uint32_t*)((char*)this + (((var_1dc * 3) + 0xe1) << 3)) = var_1e0;
0047e837      this->m_pCurSelection->vtable->SetState(6);
0047e84a      gmCGAppearancePage::DoColorSpots(this, var_1dc);
0047e84a      
0047e859      if (arg2 != ECG_PARTS_EYES)
0047e859      {
0047e873          gmCGAppearancePage::DoGradDisk(this, 0);
0047e878          this->m_pShadeScroll->vtable->SetVisible(1);
0047e88d          int32_t var_1fc_17 = var_1e4;
0047e891          gmCGAppearancePage::SetShade(this, var_1e8);
0047e859      }
0047e859      else
0047e859      {
0047e85d          gmCGAppearancePage::DoGradDisk(this, 1);
0047e862          this->m_pShadeScroll->vtable->SetVisible(0);
0047e859      }
0047e859      
0047e899      gmCGAppearancePage::SetColor(this, eyeColor);
0047e8a2      Sex_CG::~Sex_CG(&__return_5);
0047e8ae      HeritageGroup_CG::~HeritageGroup_CG(&__return_6);
0047e260  }

0047e339                                                                             8d a4 24 00 00 00 00                           ..$....
0047e3c7                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
0047e5dd                                                                                         8d 49 00                               .I.
0047e78d                                         8d 49 00                                                               .I.
0047e8c0  uint32_t jump_table_47e8c0[0x9] = 
0047e8c0  {
0047e8c0      [0x0] =  0x0047e328
0047e8c4      [0x1] =  0x0047e3b2
0047e8c8      [0x2] =  0x0047e448
0047e8cc      [0x3] =  0x0047e4a9
0047e8d0      [0x4] =  0x0047e502
0047e8d4      [0x5] =  0x0047e563
0047e8d8      [0x6] =  0x0047e5cb
0047e8dc      [0x7] =  0x0047e64c
0047e8e0      [0x8] =  0x0047e6c9
0047e8e4  }

0047e8e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0047e8f0  void __fastcall gmCGAppearancePage::Update(class gmCGAppearancePage* this)

0047e8f0  {
0047e901      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047e908      uint32_t mGender = eax->mGender;
0047e908      
0047e90f      if (mGender == 1)
0047e90f      {
0047e92e          this->m_pFemaleButton->vtable->SetState(0x10000016);
0047e946          this->m_pMaleButton->vtable->SetState(0x10000017);
0047e90f      }
0047e90f      else if (mGender == 2)
0047e912      {
0047e914          this->m_pFemaleButton->vtable->SetState(0x10000017);
0047e946          this->m_pMaleButton->vtable->SetState(0x10000016);
0047e912      }
0047e912      
0047e954      uint32_t mHeritageGroup = eax->mHeritageGroup;
0047e961      void* ecx_26;
0047e961      class AC1Legacy::Vector3* ebp;
0047e961      class AC1Legacy::Vector3* edi_1;
0047e961      void var_1b0;
0047e961      void var_120;
0047e961      void var_90;
0047e961      
0047e961      if (mHeritageGroup != 6)
0047e961      {
0047eb46          class AC1Legacy::Vector3* var_1c4_7;
0047eb46          class AC1Legacy::Vector3* var_1c0_3;
0047eb46          
0047eb46          if ((mHeritageGroup == 0xc || mHeritageGroup == 0xd))
0047eb46          {
0047ecf9              this->m_pClothesButton->vtable->SetVisible(0);
0047ed06              this->m_pNoseSpin->vtable->SetVisible(0);
0047ed13              this->m_pMouthSpin->vtable->SetVisible(0);
0047ed27              StringInfo::StringInfo(&var_120);
0047ed30              StringInfo::StringInfo(&var_1b0);
0047ed3c              StringInfo::StringInfo(&var_90);
0047ed5b              StringInfo::SetStringIDandTableEnum(&var_120, compute_str_hash("ID_CharGen_OlthoiText_HairButton"), 0x10000002);
0047ed72              UIElement_Text::SetStringInfoWithFont(this->m_pHairSpin, &var_120, 0, 1);
0047ed91              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_OlthoiText_EyesButton"), 0x10000002);
0047eda8              UIElement_Text::SetStringInfoWithFont(this->m_pEyesSpin, &var_90, 0, 1);
0047edad              class UIElement_Button* m_pEyesSpin_2 = this->m_pEyesSpin;
0047edad              
0047edb5              if (m_pEyesSpin_2 != 0)
0047edb5              {
0047edbc                  class UIElement* eax_23 = UIElement::GetChildRecursive(m_pEyesSpin_2, 0x1000030a);
0047edbc                  
0047edc3                  if (eax_23 != 0)
0047edcb                      UIElement::SetAttribute_Bool(eax_23, 0xd, 1);
0047edcb                  
0047eddb                  class UIElement* eax_24 = UIElement::GetChildRecursive(this->m_pEyesSpin, 0x1000030b);
0047eddb                  
0047ede2                  if (eax_24 != 0)
0047edea                      UIElement::SetAttribute_Bool(eax_24, 0xd, 1);
0047edb5              }
0047edb5              
0047edef              this->m_pSkinSpin->vtable->MoveTo(0, 0x5a);
0047ee15              StringInfo::SetStringIDandTableEnum(&var_1b0, compute_str_hash("ID_CharGen_OlthoiText_SkinButton"), 0x10000002);
0047ee29              UIElement_Text::SetStringInfoWithFont(this->m_pSkinSpin, &var_1b0, 0, 1);
0047ee32              gmCGAppearancePage::SetChoice(this, ECG_CHOICE_FACE);
0047ee3b              gmCGAppearancePage::SetSelection(this, ECG_PARTS_HAIR);
0047ee40              bool cond:0_1 = eax->mHeritageGroup != 0xc;
0047ee47              edi_1 = &this->m_vectTargPosition;
0047ee4d              edi_1->x = 0;
0047ee53              float eax_27;
0047ee53              float ecx_65;
0047ee53              
0047ee53              if (cond:0_1)
0047ee53              {
0047ee61                  ecx_65 = -3.04999995f;
0047ee66                  eax_27 = 2.75f;
0047ee53              }
0047ee53              else
0047ee53              {
0047ee55                  ecx_65 = -1.85000002f;
0047ee5a                  eax_27 = 1.85000002f;
0047ee53              }
0047ee53              
0047ee6b              edi_1->z = eax_27;
0047ee6e              edi_1->y = ecx_65;
0047ee71              ebp = &this->m_vectCurDirection;
0047ee77              this->m_vectCurPosition.x = 0;
0047ee81              var_1c0_3 = ebp;
0047ee82              this->m_vectCurPosition.y = ecx_65;
0047ee88              this->m_vectCurPosition.z = eax_27;
0047ee8e              var_1c4_7 = edi_1;
0047eb46          }
0047eb46          else
0047eb46          {
0047eb52              if (this->m_LastHeritageGroup == 6)
0047eb52              {
0047eb58                  CharGenState::RandomizeAppearance(eax, 0);
0047eb61                  CharGenState::RandomizeClothing(eax, 1);
0047eb52              }
0047eb52              
0047eb6c              this->m_LastHeritageGroup = eax->mHeritageGroup;
0047eb79              StringInfo::StringInfo(&var_120);
0047eb82              StringInfo::StringInfo(&var_1b0);
0047eb8e              StringInfo::StringInfo(&var_90);
0047ebad              StringInfo::SetStringIDandTableEnum(&var_120, compute_str_hash("ID_CharGen_HairStyle"), 0x10000002);
0047ebc4              UIElement_Text::SetStringInfoWithFont(this->m_pHairSpin, &var_120, 0, 1);
0047ebe3              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_Eyes"), 0x10000002);
0047ebfa              UIElement_Text::SetStringInfoWithFont(this->m_pEyesSpin, &var_90, 0, 1);
0047ebff              class UIElement_Button* m_pEyesSpin_1 = this->m_pEyesSpin;
0047ebff              
0047ec07              if (m_pEyesSpin_1 != 0)
0047ec07              {
0047ec0e                  class UIElement* eax_14 = UIElement::GetChildRecursive(m_pEyesSpin_1, 0x1000030a);
0047ec0e                  
0047ec15                  if (eax_14 != 0)
0047ec1d                      UIElement::SetAttribute_Bool(eax_14, 0xd, 0);
0047ec1d                  
0047ec2d                  class UIElement* eax_15 = UIElement::GetChildRecursive(this->m_pEyesSpin, 0x1000030b);
0047ec2d                  
0047ec34                  if (eax_15 != 0)
0047ec3c                      UIElement::SetAttribute_Bool(eax_15, 0xd, 0);
0047ec07              }
0047ec07              
0047ec41              this->m_pSkinSpin->vtable->MoveTo(0, 0xb4);
0047ec6a              StringInfo::SetStringIDandTableEnum(&var_1b0, compute_str_hash("ID_CharGen_Skin"), 0x10000002);
0047ec7e              UIElement_Text::SetStringInfoWithFont(this->m_pSkinSpin, &var_1b0, 0, 1);
0047ec83              this->m_pClothesButton->vtable->SetVisible(1);
0047ec90              this->m_pNoseSpin->vtable->SetVisible(1);
0047ec9d              this->m_pMouthSpin->vtable->SetVisible(1);
0047ecb0              ebp = &this->m_vectCurDirection;
0047ecb6              edi_1 = &this->m_vectTargPosition;
0047ecbc              bool cond:2_1 = this->m_LastHeritageGroup == 7;
0047ecbf              var_1c0_3 = ebp;
0047ecc5              edi_1->x = 0;
0047eccb              var_1c4_7 = edi_1;
0047eccc              edi_1->z = 1.64999998f;
0047eccf              float ecx_46 = -0.850000024f;
0047eccf              
0047ecd4              if (!(cond:2_1))
0047ecd6                  ecx_46 = -0.550000012f;
0047ecd6              
0047ecdb              edi_1->y = ecx_46;
0047ecde              this->m_vectCurPosition.z = 1.64999998f;
0047ece4              this->m_vectCurPosition.y = ecx_46;
0047ecea              this->m_vectCurPosition.x = 0;
0047eb46          }
0047eb46          
0047ee95          gmCG3DView::SetCamera(this->m_p3DView, var_1c4_7, var_1c0_3);
0047eea1          StringInfo::~StringInfo(&var_90);
0047eeaa          StringInfo::~StringInfo(&var_1b0);
0047eeaf          ecx_26 = &var_120;
0047e961      }
0047e961      else
0047e961      {
0047e96d          if (this->m_LastHeritageGroup != 6)
0047e96d          {
0047e973              CharGenState::RandomizeAppearance(eax, 0);
0047e97c              CharGenState::RandomizeClothing(eax, 1);
0047e96d          }
0047e96d          
0047e987          class UIElement_Button* m_pClothesButton = this->m_pClothesButton;
0047e98d          this->m_LastHeritageGroup = eax->mHeritageGroup;
0047e993          m_pClothesButton->vtable->SetVisible(0);
0047e99a          this->m_pNoseSpin->vtable->SetVisible(0);
0047e9a7          this->m_pMouthSpin->vtable->SetVisible(0);
0047e9bb          StringInfo::StringInfo(&var_90);
0047e9c4          StringInfo::StringInfo(&var_1b0);
0047e9d0          StringInfo::StringInfo(&var_120);
0047e9ef          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_GearText_HairButton"), 0x10000002);
0047ea06          UIElement_Text::SetStringInfoWithFont(this->m_pHairSpin, &var_90, 0, 1);
0047ea25          StringInfo::SetStringIDandTableEnum(&var_120, compute_str_hash("ID_CharGen_GearText_EyesButton"), 0x10000002);
0047ea3c          UIElement_Text::SetStringInfoWithFont(this->m_pEyesSpin, &var_120, 0, 1);
0047ea41          class UIElement_Button* m_pEyesSpin = this->m_pEyesSpin;
0047ea41          
0047ea49          if (m_pEyesSpin != 0)
0047ea49          {
0047ea50              class UIElement* eax_9 = UIElement::GetChildRecursive(m_pEyesSpin, 0x1000030a);
0047ea50              
0047ea57              if (eax_9 != 0)
0047ea5f                  UIElement::SetAttribute_Bool(eax_9, 0xd, 1);
0047ea5f              
0047ea6f              class UIElement* eax_10 = UIElement::GetChildRecursive(this->m_pEyesSpin, 0x1000030b);
0047ea6f              
0047ea76              if (eax_10 != 0)
0047ea7e                  UIElement::SetAttribute_Bool(eax_10, 0xd, 1);
0047ea49          }
0047ea49          
0047ea83          this->m_pSkinSpin->vtable->MoveTo(0, 0x5a);
0047eaa9          StringInfo::SetStringIDandTableEnum(&var_1b0, compute_str_hash("ID_CharGen_GearText_SkinButton"), 0x10000002);
0047eabd          UIElement_Text::SetStringInfoWithFont(this->m_pSkinSpin, &var_1b0, 0, 1);
0047eac6          gmCGAppearancePage::SetChoice(this, ECG_CHOICE_FACE);
0047eacf          gmCGAppearancePage::SetSelection(this, ECG_PARTS_HAIR);
0047ead4          edi_1 = &this->m_vectTargPosition;
0047eada          edi_1->x = 0;
0047eae5          edi_1->y = -0.550000012f;
0047eaed          edi_1->z = 1.64999998f;
0047eaf0          ebp = &this->m_vectCurDirection;
0047eaf7          this->m_vectCurPosition.x = 0;
0047eb01          this->m_vectCurPosition.y = -0.550000012f;
0047eb07          this->m_vectCurPosition.z = 1.64999998f;
0047eb14          gmCG3DView::SetCamera(this->m_p3DView, edi_1, ebp);
0047eb20          StringInfo::~StringInfo(&var_120);
0047eb29          StringInfo::~StringInfo(&var_1b0);
0047eb2e          ecx_26 = &var_90;
0047e961      }
0047eeb6      StringInfo::~StringInfo(ecx_26);
0047eebd      gmCGAppearancePage::SetupParts(this);
0047eecb      gmCGAppearancePage::SetSelection(this, this->m_eCurPart);
0047eecb      
0047eed9      if (UIElement::IsVisible(this) != 0)
0047eed9      {
0047eee1          gmCG3DView::Update(this->m_p3DView);
0047eeee          gmCG3DView::SetCamera(this->m_p3DView, edi_1, ebp);
0047eefb          class gmCG3DView* m_p3DView = this->m_p3DView;
0047eefb          
0047ef01          if (this->m_bZoomedIn == 0)
0047ef01          {
0047ef03              gmCG3DView::StartAnimation(m_p3DView);
0047ef11              return;
0047ef01          }
0047ef01          
0047ef12          gmCG3DView::StopAnimation(m_p3DView);
0047eed9      }
0047e8f0  }

0047ef21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0047ef30  enum UIElementMessageListenResult __thiscall gmCGAppearancePage::ListenToElementMessage(class gmCGAppearancePage* this, struct UIElementMessageInfo const* arg2)

0047ef30  {
0047ef52      int32_t iNumChoices;
0047ef52      int32_t iCurrentChoice_1;
0047ef52      int32_t edi_7;
0047ef52      int32_t edi_9;
0047ef52      int32_t edi_11;
0047ef52      
0047ef52      switch ((arg2->idElement - 0x1000030a))
0047ef52      {
0047f433          case nullptr:
0047f433          {
0047f433              if (arg2->idMessage == 1)
0047f458                  switch ((*(uint32_t*)(arg2->pElement->vtable->GetParent() + 0x2e4) - 0x100003af))
0047f458                  {
0047f465                      case 0:
0047f465                      {
0047f465                          iNumChoices = this->m_tChoices[0].iNumChoices;
0047f46b                          int32_t iCurrentChoice_9 = (this->m_tChoices[0].iCurrentChoice - 1);
0047f46c                          iCurrentChoice_1 = iCurrentChoice_9;
0047f470                          this->m_tChoices[0].iCurrentChoice = iCurrentChoice_9;
0047f470                          
0047f476                          if (iCurrentChoice_1 < iNumChoices)
0047f476                              goto label_47f065;
0047f476                          
0047f47c                          this->m_tChoices[0].iCurrentChoice = 0;
0047f486                          goto label_47f076;
0047f465                      }
0047f491                      case 1:
0047f491                      {
0047f491                          edi_7 = (this->m_tChoices[1].iCurrentChoice - 1);
0047f6ef                      label_47f6ef:
0047f6ef                          this->m_tChoices[1].iCurrentChoice = edi_7;
0047f6f5                          int32_t iNumChoices_11 = this->m_tChoices[1].iNumChoices;
0047f6f5                          
0047f6ff                          if (edi_7 >= iNumChoices_11)
0047f701                              this->m_tChoices[1].iCurrentChoice = 0;
0047f6ff                          else if (edi_7 < 0)
0047f712                              this->m_tChoices[1].iCurrentChoice = (iNumChoices_11 - 1);
0047f712                          
0047f71e                          class ClientCharGenState* eax_61 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f729                          eax_61->eyesStrip = this->m_tChoices[1].iCurrentChoice;
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_EYES);
0047f491                          break;
0047f491                      }
0047f49d                      case 2:
0047f49d                      {
0047f49d                          edi_9 = (this->m_tChoices[2].iCurrentChoice - 1);
0047f73d                      label_47f73d:
0047f73d                          this->m_tChoices[2].iCurrentChoice = edi_9;
0047f743                          int32_t iNumChoices_12 = this->m_tChoices[2].iNumChoices;
0047f743                          
0047f74d                          if (edi_9 >= iNumChoices_12)
0047f74f                              this->m_tChoices[2].iCurrentChoice = 0;
0047f74d                          else if (edi_9 < 0)
0047f760                              this->m_tChoices[2].iCurrentChoice = (iNumChoices_12 - 1);
0047f760                          
0047f76c                          class ClientCharGenState* eax_63 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f777                          eax_63->noseStrip = this->m_tChoices[2].iCurrentChoice;
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_NOSE);
0047f49d                          break;
0047f49d                      }
0047f4a9                      case 3:
0047f4a9                      {
0047f4a9                          edi_11 = (this->m_tChoices[3].iCurrentChoice - 1);
0047f78b                      label_47f78b:
0047f78b                          this->m_tChoices[3].iCurrentChoice = edi_11;
0047f791                          int32_t iNumChoices_13 = this->m_tChoices[3].iNumChoices;
0047f791                          
0047f79b                          if (edi_11 >= iNumChoices_13)
0047f79d                              this->m_tChoices[3].iCurrentChoice = 0;
0047f79b                          else if (edi_11 < 0)
0047f7ae                              this->m_tChoices[3].iCurrentChoice = (iNumChoices_13 - 1);
0047f7ae                          
0047f7ba                          class ClientCharGenState* eax_65 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f7c5                          eax_65->mouthStrip = this->m_tChoices[3].iCurrentChoice;
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_MOUTH);
0047f4a9                          break;
0047f4a9                      }
0047f4b5                      case 6:
0047f4b5                      {
0047f4b5                          int32_t iNumChoices_18 = this->m_tChoices[5].iNumChoices;
0047f4bb                          int32_t edi_13 = (this->m_tChoices[5].iCurrentChoice - 1);
0047f4c0                          this->m_tChoices[5].iCurrentChoice = edi_13;
0047f4c0                          
0047f4c6                          if (edi_13 >= iNumChoices_18)
0047f4c8                              this->m_tChoices[5].iCurrentChoice = 0xffffffff;
0047f4c6                          else if ((edi_13 < 0 && edi_13 != 0xffffffff))
0047f4de                              this->m_tChoices[5].iCurrentChoice = (iNumChoices_18 - 1);
0047f4de                          
0047f4ea                          class ClientCharGenState* eax_45 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f4fa                          CharGenState::SetHeadgearStyle(eax_45, this->m_tChoices[5].iCurrentChoice);
0047f505                          this->m_tChoices[5].iCurrentColor = eax_45->headgearColor;
0047f511                          this->m_tChoices[5].iNumColors = eax_45->numHeadgearColors;
0047f51d                          this->m_tChoices[5].dShade = ((double)((long double)eax_45->headgearShade));
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_HEADGEAR);
0047f4b5                          break;
0047f4b5                      }
0047f530                      case 7:
0047f530                      {
0047f530                          int32_t iNumChoices_8 = this->m_tChoices[6].iNumChoices;
0047f536                          int32_t edi_16 = (this->m_tChoices[6].iCurrentChoice - 1);
0047f53b                          this->m_tChoices[6].iCurrentChoice = edi_16;
0047f53b                          
0047f541                          if (edi_16 >= iNumChoices_8)
0047f543                              this->m_tChoices[6].iCurrentChoice = 0;
0047f541                          else if (edi_16 < 0)
0047f554                              this->m_tChoices[6].iCurrentChoice = (iNumChoices_8 - 1);
0047f554                          
0047f560                          class ClientCharGenState* eax_48 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f570                          CharGenState::SetShirtStyle(eax_48, this->m_tChoices[6].iCurrentChoice);
0047f57b                          this->m_tChoices[6].iCurrentColor = eax_48->shirtColor;
0047f587                          this->m_tChoices[6].iNumColors = eax_48->numShirtColors;
0047f593                          this->m_tChoices[6].dShade = ((double)((long double)eax_48->shirtShade));
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_SHIRT);
0047f530                          break;
0047f530                      }
0047f5a6                      case 8:
0047f5a6                      {
0047f5a6                          int32_t iNumChoices_9 = this->m_tChoices[7].iNumChoices;
0047f5ac                          int32_t edi_19 = (this->m_tChoices[7].iCurrentChoice - 1);
0047f5b1                          this->m_tChoices[7].iCurrentChoice = edi_19;
0047f5b1                          
0047f5b7                          if (edi_19 >= iNumChoices_9)
0047f5b9                              this->m_tChoices[7].iCurrentChoice = 0;
0047f5b7                          else if (edi_19 < 0)
0047f5ca                              this->m_tChoices[7].iCurrentChoice = (iNumChoices_9 - 1);
0047f5ca                          
0047f5d6                          class ClientCharGenState* eax_51 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f5e6                          CharGenState::SetTrousersStyle(eax_51, this->m_tChoices[7].iCurrentChoice);
0047f5f1                          this->m_tChoices[7].iCurrentColor = eax_51->trousersColor;
0047f5fd                          this->m_tChoices[7].iNumColors = eax_51->numTrousersColors;
0047f609                          this->m_tChoices[7].dShade = ((double)((long double)eax_51->trousersShade));
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_TROUSERS);
0047f5a6                          break;
0047f5a6                      }
0047f61c                      case 9:
0047f61c                      {
0047f61c                          int32_t iNumChoices_10 = this->m_tChoices[8].iNumChoices;
0047f622                          int32_t edi_22 = (this->m_tChoices[8].iCurrentChoice - 1);
0047f627                          this->m_tChoices[8].iCurrentChoice = edi_22;
0047f627                          
0047f62d                          if (edi_22 >= iNumChoices_10)
0047f62f                              this->m_tChoices[8].iCurrentChoice = 0;
0047f62d                          else if (edi_22 < 0)
0047f640                              this->m_tChoices[8].iCurrentChoice = (iNumChoices_10 - 1);
0047f640                          
0047f651                          class CharGenState* edi_23 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f65c                          CharGenState::SetFootwearStyle(edi_23, this->m_tChoices[8].iCurrentChoice);
0047f667                          this->m_tChoices[8].iCurrentColor = edi_23->footwearColor;
0047f673                          this->m_tChoices[8].iNumColors = edi_23->numFootwearColors;
0047f67f                          this->m_tChoices[8].dShade = ((double)((long double)edi_23->footwearShade));
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_FOOTWEAR);
0047f61c                          break;
0047f61c                      }
0047f458                  }
0047f433              break;
0047f433          }
0047f690          case 1:
0047f690          {
0047f690              if (arg2->idMessage == 1)
0047f6b5                  switch ((*(uint32_t*)(arg2->pElement->vtable->GetParent() + 0x2e4) - 0x100003af))
0047f6b5                  {
0047f6c2                      case 0:
0047f6c2                      {
0047f6c2                          iNumChoices = this->m_tChoices[0].iNumChoices;
0047f6c8                          int32_t iCurrentChoice_10 = (this->m_tChoices[0].iCurrentChoice + 1);
0047f6c9                          iCurrentChoice_1 = iCurrentChoice_10;
0047f6cd                          this->m_tChoices[0].iCurrentChoice = iCurrentChoice_10;
0047f6cd                          
0047f6d3                          if (iCurrentChoice_1 < iNumChoices)
0047f6d3                              goto label_47f065;
0047f6d3                          
0047f6d3                          goto label_47f6d9;
0047f6c2                      }
0047f6ee                      case 1:
0047f6ee                      {
0047f6ee                          edi_7 = (this->m_tChoices[1].iCurrentChoice + 1);
0047f6ee                          goto label_47f6ef;
0047f6ee                      }
0047f73c                      case 2:
0047f73c                      {
0047f73c                          edi_9 = (this->m_tChoices[2].iCurrentChoice + 1);
0047f73c                          goto label_47f73d;
0047f73c                      }
0047f78a                      case 3:
0047f78a                      {
0047f78a                          edi_11 = (this->m_tChoices[3].iCurrentChoice + 1);
0047f78a                          goto label_47f78b;
0047f78a                      }
0047f7d8                      case 6:
0047f7d8                      {
0047f7d8                          int32_t iNumChoices_19 = this->m_tChoices[5].iNumChoices;
0047f7de                          int32_t edi_29 = (this->m_tChoices[5].iCurrentChoice + 1);
0047f7e3                          this->m_tChoices[5].iCurrentChoice = edi_29;
0047f7e3                          
0047f7e9                          if (edi_29 >= iNumChoices_19)
0047f7eb                              this->m_tChoices[5].iCurrentChoice = 0xffffffff;
0047f7e9                          else if ((edi_29 < 0 && edi_29 != 0xffffffff))
0047f801                              this->m_tChoices[5].iCurrentChoice = (iNumChoices_19 - 1);
0047f801                          
0047f80d                          class ClientCharGenState* eax_67 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f81d                          CharGenState::SetHeadgearStyle(eax_67, this->m_tChoices[5].iCurrentChoice);
0047f828                          this->m_tChoices[5].iCurrentColor = eax_67->headgearColor;
0047f834                          this->m_tChoices[5].iNumColors = eax_67->numHeadgearColors;
0047f840                          this->m_tChoices[5].dShade = ((double)((long double)eax_67->headgearShade));
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_HEADGEAR);
0047f7d8                          break;
0047f7d8                      }
0047f853                      case 7:
0047f853                      {
0047f853                          int32_t iNumChoices_14 = this->m_tChoices[6].iNumChoices;
0047f859                          int32_t edi_32 = (this->m_tChoices[6].iCurrentChoice + 1);
0047f85e                          this->m_tChoices[6].iCurrentChoice = edi_32;
0047f85e                          
0047f864                          if (edi_32 >= iNumChoices_14)
0047f866                              this->m_tChoices[6].iCurrentChoice = 0;
0047f864                          else if (edi_32 < 0)
0047f877                              this->m_tChoices[6].iCurrentChoice = (iNumChoices_14 - 1);
0047f877                          
0047f883                          class ClientCharGenState* eax_70 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f893                          CharGenState::SetShirtStyle(eax_70, this->m_tChoices[6].iCurrentChoice);
0047f89e                          this->m_tChoices[6].iCurrentColor = eax_70->shirtColor;
0047f8aa                          this->m_tChoices[6].iNumColors = eax_70->numShirtColors;
0047f8b6                          this->m_tChoices[6].dShade = ((double)((long double)eax_70->shirtShade));
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_SHIRT);
0047f853                          break;
0047f853                      }
0047f8c9                      case 8:
0047f8c9                      {
0047f8c9                          int32_t iNumChoices_15 = this->m_tChoices[7].iNumChoices;
0047f8cf                          int32_t edi_35 = (this->m_tChoices[7].iCurrentChoice + 1);
0047f8d4                          this->m_tChoices[7].iCurrentChoice = edi_35;
0047f8d4                          
0047f8da                          if (edi_35 >= iNumChoices_15)
0047f8dc                              this->m_tChoices[7].iCurrentChoice = 0;
0047f8da                          else if (edi_35 < 0)
0047f8ed                              this->m_tChoices[7].iCurrentChoice = (iNumChoices_15 - 1);
0047f8ed                          
0047f8f9                          class ClientCharGenState* eax_73 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f909                          CharGenState::SetTrousersStyle(eax_73, this->m_tChoices[7].iCurrentChoice);
0047f914                          this->m_tChoices[7].iCurrentColor = eax_73->trousersColor;
0047f920                          this->m_tChoices[7].iNumColors = eax_73->numTrousersColors;
0047f92c                          this->m_tChoices[7].dShade = ((double)((long double)eax_73->trousersShade));
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_TROUSERS);
0047f8c9                          break;
0047f8c9                      }
0047f93f                      case 9:
0047f93f                      {
0047f93f                          int32_t iNumChoices_16 = this->m_tChoices[8].iNumChoices;
0047f945                          int32_t edi_38 = (this->m_tChoices[8].iCurrentChoice + 1);
0047f94a                          this->m_tChoices[8].iCurrentChoice = edi_38;
0047f94a                          
0047f950                          if (edi_38 >= iNumChoices_16)
0047f952                              this->m_tChoices[8].iCurrentChoice = 0;
0047f950                          else if (edi_38 < 0)
0047f963                              this->m_tChoices[8].iCurrentChoice = (iNumChoices_16 - 1);
0047f963                          
0047f974                          class CharGenState* edi_39 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f97f                          CharGenState::SetFootwearStyle(edi_39, this->m_tChoices[8].iCurrentChoice);
0047f98a                          this->m_tChoices[8].iCurrentColor = edi_39->footwearColor;
0047f996                          this->m_tChoices[8].iNumColors = edi_39->numFootwearColors;
0047f9a2                          this->m_tChoices[8].dShade = ((double)((long double)edi_39->footwearShade));
0047f08b                          gmCGAppearancePage::SetSelection(this, ECG_PARTS_FOOTWEAR);
0047f93f                          break;
0047f93f                      }
0047f6b5                  }
0047f690              break;
0047f690          }
0047f9b3          case 5:
0047f9b3          {
0047f9b3              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 0))
0047f9d3                  gmCGAppearancePage::SetColor(this, 0);
0047f9b3              break;
0047f9b3          }
0047f9ea          case 6:
0047f9ea          {
0047f9ea              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 1))
0047fa0a                  gmCGAppearancePage::SetColor(this, 1);
0047f9ea              break;
0047f9ea          }
0047fa21          case 7:
0047fa21          {
0047fa21              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 2))
0047fa41                  gmCGAppearancePage::SetColor(this, 2);
0047fa21              break;
0047fa21          }
0047fa58          case 8:
0047fa58          {
0047fa58              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 3))
0047fa78                  gmCGAppearancePage::SetColor(this, 3);
0047fa58              break;
0047fa58          }
0047fa8f          case 9:
0047fa8f          {
0047fa8f              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 4))
0047faaf                  gmCGAppearancePage::SetColor(this, 4);
0047fa8f              break;
0047fa8f          }
0047fac6          case 0xa:
0047fac6          {
0047fac6              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 5))
0047fae6                  gmCGAppearancePage::SetColor(this, 5);
0047fac6              break;
0047fac6          }
0047fafd          case 0xb:
0047fafd          {
0047fafd              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 6))
0047fb1d                  gmCGAppearancePage::SetColor(this, 6);
0047fafd              break;
0047fafd          }
0047fb34          case 0xc:
0047fb34          {
0047fb34              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 7))
0047fb54                  gmCGAppearancePage::SetColor(this, 7);
0047fb34              break;
0047fb34          }
0047fb6b          case 0xd:
0047fb6b          {
0047fb6b              if ((arg2->idMessage == 1 && *(uint32_t*)((char*)this + ((this->m_iPartIndex + 0x4b) * 0x18)) > 8))
0047fb8b                  gmCGAppearancePage::SetColor(this, 8);
0047fb6b              break;
0047fb6b          }
0047fba2          case 0x17:
0047fba2          {
0047fba2              if (arg2->idMessage == 0xa)
0047fba2              {
0047fbab                  long double x87_r7_13 = ((long double)arg2->dwParam1);
0047fbb0                  int32_t var_10_14 = 0x3ff00000;
0047fbb7                  int32_t var_18 = 0;
0047fbb7                  
0047fbbb                  if (arg2->dwParam1 < 0)
0047fbbd                      x87_r7_13 = (x87_r7_13 + ((long double)4.2949673e+09f));
0047fbbd                  
0047fbcf                  MathLib::Clamp(((double)(x87_r7_13 * ((long double)0.00100000005f))), 0f, 0f);
0047fbdc                  gmCGAppearancePage::SetShade(this, 0f);
0047fba2              }
0047fba2              break;
0047fba2          }
0047fc29          case 0x19:
0047fc29          {
0047fc29              if (arg2->idMessage == 1)
0047fc39                  gmCGAppearancePage::Rotate(this, ECG_ROTATE_CLOCKWISE);
0047fc29              break;
0047fc29          }
0047fc33          case 0x1a:
0047fc33          {
0047fc33              if (arg2->idMessage == 1)
0047fc39                  gmCGAppearancePage::Rotate(this, ECG_ROTATE_COUNTERCLOCKWISE);
0047fc33              break;
0047fc33          }
0047fbf3          case 0x1b:
0047fbf3          {
0047fbf3              if (arg2->idMessage == 1)
0047fbf7                  gmCGAppearancePage::ZoomIn(this);
0047fbf3              break;
0047fbf3          }
0047fc0e          case 0x1c:
0047fc0e          {
0047fc0e              if (arg2->idMessage == 1)
0047fc12                  gmCGAppearancePage::ZoomOut(this);
0047fc0e              break;
0047fc0e          }
0047ef5d          case 0x9d:
0047ef5d          {
0047ef5d              if (arg2->idMessage == 1)
0047ef5d              {
0047ef72                  CharGenState::SetGender(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 2);
0047ef79                  gmCGAppearancePage::Update(this);
0047ef79                  
0047ef87                  if (UIElement::IsVisible(this) != 0)
0047ef93                      gmCG3DView::Update(this->m_p3DView);
0047ef5d              }
0047ef5d              break;
0047ef5d          }
0047efaa          case 0x9e:
0047efaa          {
0047efaa              if (arg2->idMessage == 1)
0047efaa              {
0047efbf                  CharGenState::SetGender(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 1);
0047efc6                  gmCGAppearancePage::Update(this);
0047efc6                  
0047efd4                  if (UIElement::IsVisible(this) != 0)
0047efe0                      gmCG3DView::Update(this->m_p3DView);
0047efaa              }
0047efaa              break;
0047efaa          }
0047eff7          case 0x9f:
0047eff7          {
0047eff7              if (arg2->idMessage == 1)
0047eff7              {
0047f001                  gmCGAppearancePage::SetChoice(this, ECG_CHOICE_FACE);
0047f00a                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_HAIR);
0047eff7              }
0047eff7              break;
0047eff7          }
0047f021          case 0xa0:
0047f021          {
0047f021              if (arg2->idMessage == 1)
0047f021              {
0047f02b                  gmCGAppearancePage::SetChoice(this, ECG_CHOICE_CLOTHES);
0047f034                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_HEADGEAR);
0047f021              }
0047f021              break;
0047f021          }
0047f04b          case 0xa5:
0047f04b          {
0047f04b              if (arg2->idMessage == 1)
0047f04b              {
0047f051                  iCurrentChoice_1 = this->m_tChoices[0].iCurrentChoice;
0047f057                  iNumChoices = this->m_tChoices[0].iNumChoices;
0047f057                  
0047f05f                  if (iCurrentChoice_1 < iNumChoices)
0047f05f                  {
0047f065                  label_47f065:
0047f065                      
0047f067                      if (iCurrentChoice_1 >= 0)
0047f067                          goto label_47f076;
0047f067                      
0047f06a                      this->m_tChoices[0].iCurrentChoice = (iNumChoices - 1);
0047f06a                      goto label_47f076;
0047f05f                  }
0047f05f                  
0047f6d9              label_47f6d9:
0047f6d9                  this->m_tChoices[0].iCurrentChoice = 0;
0047f076              label_47f076:
0047f076                  class ClientCharGenState* eax_12 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f081                  eax_12->hairStyle = this->m_tChoices[0].iCurrentChoice;
0047f08b                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_HAIR);
0047f04b              }
0047f04b              break;
0047f04b          }
0047f0a2          case 0xa6:
0047f0a2          {
0047f0a2              if (arg2->idMessage == 1)
0047f0a2              {
0047f0a8                  int32_t iCurrentChoice_2 = this->m_tChoices[1].iCurrentChoice;
0047f0ae                  int32_t iNumChoices_1 = this->m_tChoices[1].iNumChoices;
0047f0ae                  
0047f0b6                  if (iCurrentChoice_2 >= iNumChoices_1)
0047f0b8                      this->m_tChoices[1].iCurrentChoice = 0;
0047f0b6                  else if (iCurrentChoice_2 < 0)
0047f0c9                      this->m_tChoices[1].iCurrentChoice = (iNumChoices_1 - 1);
0047f0c9                  
0047f0d5                  class ClientCharGenState* eax_15 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f0e4                  eax_15->eyesStrip = this->m_tChoices[1].iCurrentChoice;
0047f0ea                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_EYES);
0047f0a2              }
0047f0a2              break;
0047f0a2          }
0047f101          case 0xa7:
0047f101          {
0047f101              if (arg2->idMessage == 1)
0047f101              {
0047f107                  int32_t iCurrentChoice_3 = this->m_tChoices[2].iCurrentChoice;
0047f10d                  int32_t iNumChoices_2 = this->m_tChoices[2].iNumChoices;
0047f10d                  
0047f115                  if (iCurrentChoice_3 >= iNumChoices_2)
0047f117                      this->m_tChoices[2].iCurrentChoice = 0;
0047f115                  else if (iCurrentChoice_3 < 0)
0047f128                      this->m_tChoices[2].iCurrentChoice = (iNumChoices_2 - 1);
0047f128                  
0047f134                  class ClientCharGenState* eax_18 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f13f                  eax_18->noseStrip = this->m_tChoices[2].iCurrentChoice;
0047f149                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_NOSE);
0047f101              }
0047f101              break;
0047f101          }
0047f160          case 0xa8:
0047f160          {
0047f160              if (arg2->idMessage == 1)
0047f160              {
0047f166                  int32_t iCurrentChoice_4 = this->m_tChoices[3].iCurrentChoice;
0047f16c                  int32_t iNumChoices_3 = this->m_tChoices[3].iNumChoices;
0047f16c                  
0047f174                  if (iCurrentChoice_4 >= iNumChoices_3)
0047f176                      this->m_tChoices[3].iCurrentChoice = 0;
0047f174                  else if (iCurrentChoice_4 < 0)
0047f187                      this->m_tChoices[3].iCurrentChoice = (iNumChoices_3 - 1);
0047f187                  
0047f193                  class ClientCharGenState* eax_21 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f1a2                  eax_21->mouthStrip = this->m_tChoices[3].iCurrentChoice;
0047f1a8                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_MOUTH);
0047f160              }
0047f160              break;
0047f160          }
0047f1bf          case 0xa9:
0047f1bf          {
0047f1bf              if (arg2->idMessage == 1)
0047f1bf              {
0047f1c5                  int32_t iCurrentChoice_5 = this->m_tChoices[4].iCurrentChoice;
0047f1cb                  int32_t iNumChoices_4 = this->m_tChoices[4].iNumChoices;
0047f1cb                  
0047f1d3                  if (iCurrentChoice_5 >= iNumChoices_4)
0047f1d5                      this->m_tChoices[4].iCurrentChoice = 0;
0047f1d3                  else if (iCurrentChoice_5 < 0)
0047f1e6                      this->m_tChoices[4].iCurrentChoice = (iNumChoices_4 - 1);
0047f1e6                  
0047f1f2                  CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f1fb                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_SKIN);
0047f1bf              }
0047f1bf              break;
0047f1bf          }
0047f212          case 0xab:
0047f212          {
0047f212              if (arg2->idMessage == 1)
0047f212              {
0047f218                  int32_t iCurrentChoice = this->m_tChoices[5].iCurrentChoice;
0047f21e                  int32_t iNumChoices_17 = this->m_tChoices[5].iNumChoices;
0047f21e                  
0047f226                  if (iCurrentChoice >= iNumChoices_17)
0047f228                      this->m_tChoices[5].iCurrentChoice = 0xffffffff;
0047f226                  else if ((iCurrentChoice < 0 && iCurrentChoice != 0xffffffff))
0047f23e                      this->m_tChoices[5].iCurrentChoice = (iNumChoices_17 - 1);
0047f23e                  
0047f24a                  class ClientCharGenState* eax_25 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f25a                  CharGenState::SetHeadgearStyle(eax_25, this->m_tChoices[5].iCurrentChoice);
0047f265                  this->m_tChoices[5].iCurrentColor = eax_25->headgearColor;
0047f271                  this->m_tChoices[5].iNumColors = eax_25->numHeadgearColors;
0047f27d                  this->m_tChoices[5].dShade = ((double)((long double)eax_25->headgearShade));
0047f287                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_HEADGEAR);
0047f212              }
0047f212              break;
0047f212          }
0047f29e          case 0xac:
0047f29e          {
0047f29e              if (arg2->idMessage == 1)
0047f29e              {
0047f2a4                  int32_t iCurrentChoice_6 = this->m_tChoices[6].iCurrentChoice;
0047f2aa                  int32_t iNumChoices_5 = this->m_tChoices[6].iNumChoices;
0047f2aa                  
0047f2b2                  if (iCurrentChoice_6 >= iNumChoices_5)
0047f2b4                      this->m_tChoices[6].iCurrentChoice = 0;
0047f2b2                  else if (iCurrentChoice_6 < 0)
0047f2c5                      this->m_tChoices[6].iCurrentChoice = (iNumChoices_5 - 1);
0047f2c5                  
0047f2d1                  class ClientCharGenState* eax_29 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f2e1                  CharGenState::SetShirtStyle(eax_29, this->m_tChoices[6].iCurrentChoice);
0047f2ec                  this->m_tChoices[6].iCurrentColor = eax_29->shirtColor;
0047f2f8                  this->m_tChoices[6].iNumColors = eax_29->numShirtColors;
0047f304                  this->m_tChoices[6].dShade = ((double)((long double)eax_29->shirtShade));
0047f30e                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_SHIRT);
0047f29e              }
0047f29e              break;
0047f29e          }
0047f325          case 0xad:
0047f325          {
0047f325              if (arg2->idMessage == 1)
0047f325              {
0047f32b                  int32_t iCurrentChoice_7 = this->m_tChoices[7].iCurrentChoice;
0047f331                  int32_t iNumChoices_6 = this->m_tChoices[7].iNumChoices;
0047f331                  
0047f339                  if (iCurrentChoice_7 >= iNumChoices_6)
0047f33b                      this->m_tChoices[7].iCurrentChoice = 0;
0047f339                  else if (iCurrentChoice_7 < 0)
0047f34c                      this->m_tChoices[7].iCurrentChoice = (iNumChoices_6 - 1);
0047f34c                  
0047f358                  class ClientCharGenState* eax_33 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f368                  CharGenState::SetTrousersStyle(eax_33, this->m_tChoices[7].iCurrentChoice);
0047f373                  this->m_tChoices[7].iCurrentColor = eax_33->trousersColor;
0047f37f                  this->m_tChoices[7].iNumColors = eax_33->numTrousersColors;
0047f38b                  this->m_tChoices[7].dShade = ((double)((long double)eax_33->trousersShade));
0047f395                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_TROUSERS);
0047f325              }
0047f325              break;
0047f325          }
0047f3ac          case 0xae:
0047f3ac          {
0047f3ac              if (arg2->idMessage == 1)
0047f3ac              {
0047f3b2                  int32_t iCurrentChoice_8 = this->m_tChoices[8].iCurrentChoice;
0047f3b8                  int32_t iNumChoices_7 = this->m_tChoices[8].iNumChoices;
0047f3b8                  
0047f3c0                  if (iCurrentChoice_8 >= iNumChoices_7)
0047f3c2                      this->m_tChoices[8].iCurrentChoice = 0;
0047f3c0                  else if (iCurrentChoice_8 < 0)
0047f3d3                      this->m_tChoices[8].iCurrentChoice = (iNumChoices_7 - 1);
0047f3d3                  
0047f3df                  class ClientCharGenState* eax_37 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
0047f3ef                  CharGenState::SetFootwearStyle(eax_37, this->m_tChoices[8].iCurrentChoice);
0047f3fa                  this->m_tChoices[8].iCurrentColor = eax_37->footwearColor;
0047f406                  this->m_tChoices[8].iNumColors = eax_37->numFootwearColors;
0047f412                  this->m_tChoices[8].dShade = ((double)((long double)eax_37->footwearShade));
0047f41c                  gmCGAppearancePage::SetSelection(this, ECG_PARTS_FOOTWEAR);
0047f3ac              }
0047f3ac              break;
0047f3ac          }
0047ef52      }
0047ef52      
0047fc49      return UIElement::ListenToElementMessage(this, arg2);
0047ef30  }

0047fc4c  uint32_t jump_table_47fc4c[0x1e] = 
0047fc4c  {
0047fc4c      [0x00] =  0x0047f42f
0047fc50      [0x01] =  0x0047f68c
0047fc54      [0x02] =  0x0047f9af
0047fc58      [0x03] =  0x0047f9e6
0047fc5c      [0x04] =  0x0047fa1d
0047fc60      [0x05] =  0x0047fa54
0047fc64      [0x06] =  0x0047fa8b
0047fc68      [0x07] =  0x0047fac2
0047fc6c      [0x08] =  0x0047faf9
0047fc70      [0x09] =  0x0047fb30
0047fc74      [0x0a] =  0x0047fb67
0047fc78      [0x0b] =  0x0047fb9e
0047fc7c      [0x0c] =  0x0047fc25
0047fc80      [0x0d] =  0x0047fc2f
0047fc84      [0x0e] =  0x0047fbef
0047fc88      [0x0f] =  0x0047fc0a
0047fc8c      [0x10] =  0x0047ef59
0047fc90      [0x11] =  0x0047efa6
0047fc94      [0x12] =  0x0047eff3
0047fc98      [0x13] =  0x0047f01d
0047fc9c      [0x14] =  0x0047f047
0047fca0      [0x15] =  0x0047f09e
0047fca4      [0x16] =  0x0047f0fd
0047fca8      [0x17] =  0x0047f15c
0047fcac      [0x18] =  0x0047f1bb
0047fcb0      [0x19] =  0x0047f20e
0047fcb4      [0x1a] =  0x0047f29a
0047fcb8      [0x1b] =  0x0047f321
0047fcbc      [0x1c] =  0x0047f3a8
0047fcc0      [0x1d] =  0x0047fc3e
0047fcc4  }
0047fcc4  uint8_t lookup_table_47fcc4[0xaf] = 
0047fcc4  {
0047fcc4      [0x00] =  0x00
0047fcc5      [0x01] =  0x01
0047fcc6      [0x02] =  0x1d
0047fcc7      [0x03] =  0x1d
0047fcc8      [0x04] =  0x1d
0047fcc9      [0x05] =  0x02
0047fcca      [0x06] =  0x03
0047fccb      [0x07] =  0x04
0047fccc      [0x08] =  0x05
0047fccd      [0x09] =  0x06
0047fcce      [0x0a] =  0x07
0047fccf      [0x0b] =  0x08
0047fcd0      [0x0c] =  0x09
0047fcd1      [0x0d] =  0x0a
0047fcd2      [0x0e] =  0x1d
0047fcd3      [0x0f] =  0x1d
0047fcd4      [0x10] =  0x1d
0047fcd5      [0x11] =  0x1d
0047fcd6      [0x12] =  0x1d
0047fcd7      [0x13] =  0x1d
0047fcd8      [0x14] =  0x1d
0047fcd9      [0x15] =  0x1d
0047fcda      [0x16] =  0x1d
0047fcdb      [0x17] =  0x0b
0047fcdc      [0x18] =  0x1d
0047fcdd      [0x19] =  0x0c
0047fcde      [0x1a] =  0x0d
0047fcdf      [0x1b] =  0x0e
0047fce0      [0x1c] =  0x0f
0047fce1      [0x1d] =  0x1d
0047fce2      [0x1e] =  0x1d
0047fce3      [0x1f] =  0x1d
0047fce4      [0x20] =  0x1d
0047fce5      [0x21] =  0x1d
0047fce6      [0x22] =  0x1d
0047fce7      [0x23] =  0x1d
0047fce8      [0x24] =  0x1d
0047fce9      [0x25] =  0x1d
0047fcea      [0x26] =  0x1d
0047fceb      [0x27] =  0x1d
0047fcec      [0x28] =  0x1d
0047fced      [0x29] =  0x1d
0047fcee      [0x2a] =  0x1d
0047fcef      [0x2b] =  0x1d
0047fcf0      [0x2c] =  0x1d
0047fcf1      [0x2d] =  0x1d
0047fcf2      [0x2e] =  0x1d
0047fcf3      [0x2f] =  0x1d
0047fcf4      [0x30] =  0x1d
0047fcf5      [0x31] =  0x1d
0047fcf6      [0x32] =  0x1d
0047fcf7      [0x33] =  0x1d
0047fcf8      [0x34] =  0x1d
0047fcf9      [0x35] =  0x1d
0047fcfa      [0x36] =  0x1d
0047fcfb      [0x37] =  0x1d
0047fcfc      [0x38] =  0x1d
0047fcfd      [0x39] =  0x1d
0047fcfe      [0x3a] =  0x1d
0047fcff      [0x3b] =  0x1d
0047fd00      [0x3c] =  0x1d
0047fd01      [0x3d] =  0x1d
0047fd02      [0x3e] =  0x1d
0047fd03      [0x3f] =  0x1d
0047fd04      [0x40] =  0x1d
0047fd05      [0x41] =  0x1d
0047fd06      [0x42] =  0x1d
0047fd07      [0x43] =  0x1d
0047fd08      [0x44] =  0x1d
0047fd09      [0x45] =  0x1d
0047fd0a      [0x46] =  0x1d
0047fd0b      [0x47] =  0x1d
0047fd0c      [0x48] =  0x1d
0047fd0d      [0x49] =  0x1d
0047fd0e      [0x4a] =  0x1d
0047fd0f      [0x4b] =  0x1d
0047fd10      [0x4c] =  0x1d
0047fd11      [0x4d] =  0x1d
0047fd12      [0x4e] =  0x1d
0047fd13      [0x4f] =  0x1d
0047fd14      [0x50] =  0x1d
0047fd15      [0x51] =  0x1d
0047fd16      [0x52] =  0x1d
0047fd17      [0x53] =  0x1d
0047fd18      [0x54] =  0x1d
0047fd19      [0x55] =  0x1d
0047fd1a      [0x56] =  0x1d
0047fd1b      [0x57] =  0x1d
0047fd1c      [0x58] =  0x1d
0047fd1d      [0x59] =  0x1d
0047fd1e      [0x5a] =  0x1d
0047fd1f      [0x5b] =  0x1d
0047fd20      [0x5c] =  0x1d
0047fd21      [0x5d] =  0x1d
0047fd22      [0x5e] =  0x1d
0047fd23      [0x5f] =  0x1d
0047fd24      [0x60] =  0x1d
0047fd25      [0x61] =  0x1d
0047fd26      [0x62] =  0x1d
0047fd27      [0x63] =  0x1d
0047fd28      [0x64] =  0x1d
0047fd29      [0x65] =  0x1d
0047fd2a      [0x66] =  0x1d
0047fd2b      [0x67] =  0x1d
0047fd2c      [0x68] =  0x1d
0047fd2d      [0x69] =  0x1d
0047fd2e      [0x6a] =  0x1d
0047fd2f      [0x6b] =  0x1d
0047fd30      [0x6c] =  0x1d
0047fd31      [0x6d] =  0x1d
0047fd32      [0x6e] =  0x1d
0047fd33      [0x6f] =  0x1d
0047fd34      [0x70] =  0x1d
0047fd35      [0x71] =  0x1d
0047fd36      [0x72] =  0x1d
0047fd37      [0x73] =  0x1d
0047fd38      [0x74] =  0x1d
0047fd39      [0x75] =  0x1d
0047fd3a      [0x76] =  0x1d
0047fd3b      [0x77] =  0x1d
0047fd3c      [0x78] =  0x1d
0047fd3d      [0x79] =  0x1d
0047fd3e      [0x7a] =  0x1d
0047fd3f      [0x7b] =  0x1d
0047fd40      [0x7c] =  0x1d
0047fd41      [0x7d] =  0x1d
0047fd42      [0x7e] =  0x1d
0047fd43      [0x7f] =  0x1d
0047fd44      [0x80] =  0x1d
0047fd45      [0x81] =  0x1d
0047fd46      [0x82] =  0x1d
0047fd47      [0x83] =  0x1d
0047fd48      [0x84] =  0x1d
0047fd49      [0x85] =  0x1d
0047fd4a      [0x86] =  0x1d
0047fd4b      [0x87] =  0x1d
0047fd4c      [0x88] =  0x1d
0047fd4d      [0x89] =  0x1d
0047fd4e      [0x8a] =  0x1d
0047fd4f      [0x8b] =  0x1d
0047fd50      [0x8c] =  0x1d
0047fd51      [0x8d] =  0x1d
0047fd52      [0x8e] =  0x1d
0047fd53      [0x8f] =  0x1d
0047fd54      [0x90] =  0x1d
0047fd55      [0x91] =  0x1d
0047fd56      [0x92] =  0x1d
0047fd57      [0x93] =  0x1d
0047fd58      [0x94] =  0x1d
0047fd59      [0x95] =  0x1d
0047fd5a      [0x96] =  0x1d
0047fd5b      [0x97] =  0x1d
0047fd5c      [0x98] =  0x1d
0047fd5d      [0x99] =  0x1d
0047fd5e      [0x9a] =  0x1d
0047fd5f      [0x9b] =  0x1d
0047fd60      [0x9c] =  0x1d
0047fd61      [0x9d] =  0x10
0047fd62      [0x9e] =  0x11
0047fd63      [0x9f] =  0x12
0047fd64      [0xa0] =  0x13
0047fd65      [0xa1] =  0x1d
0047fd66      [0xa2] =  0x1d
0047fd67      [0xa3] =  0x1d
0047fd68      [0xa4] =  0x1d
0047fd69      [0xa5] =  0x14
0047fd6a      [0xa6] =  0x15
0047fd6b      [0xa7] =  0x16
0047fd6c      [0xa8] =  0x17
0047fd6d      [0xa9] =  0x18
0047fd6e      [0xaa] =  0x1d
0047fd6f      [0xab] =  0x19
0047fd70      [0xac] =  0x1a
0047fd71      [0xad] =  0x1b
0047fd72      [0xae] =  0x1c
0047fd73  }

0047fd73                                                           90                                                         .
0047fd74  uint32_t jump_table_47fd74[0xa] = 
0047fd74  {
0047fd74      [0x0] =  0x0047f45f
0047fd78      [0x1] =  0x0047f48b
0047fd7c      [0x2] =  0x0047f497
0047fd80      [0x3] =  0x0047f4a3
0047fd84      [0x4] =  0x0047fc3e
0047fd88      [0x5] =  0x0047fc3e
0047fd8c      [0x6] =  0x0047f4af
0047fd90      [0x7] =  0x0047f52a
0047fd94      [0x8] =  0x0047f5a0
0047fd98      [0x9] =  0x0047f616
0047fd9c  }
0047fd9c  uint32_t jump_table_47fd9c[0xa] = 
0047fd9c  {
0047fd9c      [0x0] =  0x0047f6bc
0047fda0      [0x1] =  0x0047f6e8
0047fda4      [0x2] =  0x0047f736
0047fda8      [0x3] =  0x0047f784
0047fdac      [0x4] =  0x0047fc3e
0047fdb0      [0x5] =  0x0047fc3e
0047fdb4      [0x6] =  0x0047f7d2
0047fdb8      [0x7] =  0x0047f84d
0047fdbc      [0x8] =  0x0047f8c3
0047fdc0      [0x9] =  0x0047f939
0047fdc4  }

0047fdc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0047fdd0  void __thiscall gmCGAppearancePage::InitializePage(class gmCGAppearancePage* this, class gmCharGenMainUI* arg2)

0047fdd0  {
0047fdd0      class gmCGAppearancePage* this_1 = this;
0047fdd8      this->m_pMainFramework = arg2;
0047fdde      class CPlayerSystem* eax_1 = CPlayerSystem::GetPlayerSystem();
0047fde5      this->m_pPlayerSystem = eax_1;
0047fdeb      class ClientCharGenState* eax_2 = CPlayerSystem::GetCharGenState(eax_1);
0047fdfb      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x100003a7);
0047fe02      class UIElement_Button* eax_4;
0047fe02      
0047fe02      if (eax_3 == 0)
0047fe12          eax_4 = nullptr;
0047fe02      else
0047fe0a          eax_4 = eax_3->vtable->DynamicCast(1);
0047fe0a      
0047fe1b      this->m_pFemaleButton = eax_4;
0047fe21      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100003a8);
0047fe28      class UIElement_Button* eax_6;
0047fe28      
0047fe28      if (eax_5 == 0)
0047fe38          eax_6 = nullptr;
0047fe28      else
0047fe30          eax_6 = eax_5->vtable->DynamicCast(1);
0047fe30      
0047fe41      this->m_pMaleButton = eax_6;
0047fe47      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x100003a9);
0047fe4e      class UIElement_Button* eax_8;
0047fe4e      
0047fe4e      if (eax_7 == 0)
0047fe5e          eax_8 = nullptr;
0047fe4e      else
0047fe56          eax_8 = eax_7->vtable->DynamicCast(1);
0047fe56      
0047fe67      this->m_pFaceButton = eax_8;
0047fe6d      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x100003aa);
0047fe74      class UIElement_Button* eax_10;
0047fe74      
0047fe74      if (eax_9 == 0)
0047fe84          eax_10 = nullptr;
0047fe74      else
0047fe7c          eax_10 = eax_9->vtable->DynamicCast(1);
0047fe7c      
0047fe8d      this->m_pClothesButton = eax_10;
0047fe93      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x100003af);
0047fe9a      class UIElement_Button* eax_12;
0047fe9a      
0047fe9a      if (eax_11 == 0)
0047feaa          eax_12 = nullptr;
0047fe9a      else
0047fea2          eax_12 = eax_11->vtable->DynamicCast(1);
0047fea2      
0047feb3      this->m_pHairSpin = eax_12;
0047feb9      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x100003b0);
0047fec0      class UIElement_Button* eax_14;
0047fec0      
0047fec0      if (eax_13 == 0)
0047fed0          eax_14 = nullptr;
0047fec0      else
0047fec8          eax_14 = eax_13->vtable->DynamicCast(1);
0047fec8      
0047fed9      this->m_pEyesSpin = eax_14;
0047fedf      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x100003b1);
0047fee6      class UIElement_Button* eax_16;
0047fee6      
0047fee6      if (eax_15 == 0)
0047fef6          eax_16 = nullptr;
0047fee6      else
0047feee          eax_16 = eax_15->vtable->DynamicCast(1);
0047feee      
0047feff      this->m_pNoseSpin = eax_16;
0047ff05      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x100003b2);
0047ff0c      class UIElement_Button* eax_18;
0047ff0c      
0047ff0c      if (eax_17 == 0)
0047ff1c          eax_18 = nullptr;
0047ff0c      else
0047ff14          eax_18 = eax_17->vtable->DynamicCast(1);
0047ff14      
0047ff25      this->m_pMouthSpin = eax_18;
0047ff2b      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x100003b3);
0047ff32      class UIElement_Button* eax_20;
0047ff32      
0047ff32      if (eax_19 == 0)
0047ff42          eax_20 = nullptr;
0047ff32      else
0047ff3a          eax_20 = eax_19->vtable->DynamicCast(1);
0047ff3a      
0047ff46      this->m_pSkinSpin = eax_20;
0047ff46      
0047ff4c      if (eax_20 != 0)
0047ff4c      {
0047ff55          class UIElement* eax_21 = UIElement::GetChildRecursive(eax_20, 0x1000030a);
0047ff55          
0047ff5c          if (eax_21 != 0)
0047ff64              UIElement::SetAttribute_Bool(eax_21, 0xd, 1);
0047ff64          
0047ff74          class UIElement* eax_22 = UIElement::GetChildRecursive(this->m_pSkinSpin, 0x1000030b);
0047ff74          
0047ff7b          if (eax_22 != 0)
0047ff83              UIElement::SetAttribute_Bool(eax_22, 0xd, 1);
0047ff4c      }
0047ff4c      
0047ff8f      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x100003b5);
0047ff96      class UIElement_Button* eax_24;
0047ff96      
0047ff96      if (eax_23 == 0)
0047ffa6          eax_24 = nullptr;
0047ff96      else
0047ff9e          eax_24 = eax_23->vtable->DynamicCast(1);
0047ff9e      
0047ffaf      this->m_pHeadgearSpin = eax_24;
0047ffb5      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x100003b6);
0047ffbc      class UIElement_Button* eax_26;
0047ffbc      
0047ffbc      if (eax_25 == 0)
0047ffcc          eax_26 = nullptr;
0047ffbc      else
0047ffc4          eax_26 = eax_25->vtable->DynamicCast(1);
0047ffc4      
0047ffd5      this->m_pShirtSpin = eax_26;
0047ffdb      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x100003b7);
0047ffe2      class UIElement_Button* eax_28;
0047ffe2      
0047ffe2      if (eax_27 == 0)
0047fff2          eax_28 = nullptr;
0047ffe2      else
0047ffea          eax_28 = eax_27->vtable->DynamicCast(1);
0047ffea      
0047fffb      this->m_pTrousersSpin = eax_28;
00480001      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x100003b8);
00480008      class UIElement_Button* eax_30;
00480008      
00480008      if (eax_29 == 0)
00480018          eax_30 = nullptr;
00480008      else
00480010          eax_30 = eax_29->vtable->DynamicCast(1);
00480010      
00480021      this->m_pFootwearSpin = eax_30;
00480027      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x10000325);
0048002e      class UIElement_Button* eax_32;
0048002e      
0048002e      if (eax_31 == 0)
0048003e          eax_32 = nullptr;
0048002e      else
00480036          eax_32 = eax_31->vtable->DynamicCast(1);
00480036      
00480047      this->m_pZoomInButton = eax_32;
0048004d      class UIElement* eax_33 = UIElement::GetChildRecursive(this, 0x10000326);
00480054      class UIElement_Button* eax_34;
00480054      
00480054      if (eax_33 == 0)
00480064          eax_34 = nullptr;
00480054      else
0048005c          eax_34 = eax_33->vtable->DynamicCast(1);
0048005c      
0048006d      this->m_pZoomOutButton = eax_34;
00480073      class UIElement* eax_35 = UIElement::GetChildRecursive(this, 0x10000323);
0048007a      class UIElement_Button* eax_36;
0048007a      
0048007a      if (eax_35 == 0)
0048008a          eax_36 = nullptr;
0048007a      else
00480082          eax_36 = eax_35->vtable->DynamicCast(1);
00480082      
00480093      this->m_pRotateClockButton = eax_36;
00480099      class UIElement* eax_37 = UIElement::GetChildRecursive(this, 0x10000324);
004800a0      class UIElement_Button* eax_38;
004800a0      
004800a0      if (eax_37 == 0)
004800b0          eax_38 = nullptr;
004800a0      else
004800a8          eax_38 = eax_37->vtable->DynamicCast(1);
004800a8      
004800bc      this->m_pRotateCounterClockButton = eax_38;
004800ce      this->m_pFaceChoices = UIElement::GetChildRecursive(this, 0x100003ae);
004800d9      this->m_pClothesChoices = UIElement::GetChildRecursive(this, 0x100003b4);
004800df      class gmCharGenMainUI* eax_41 = nullptr;
004800e1      arg2 = nullptr;
004800e5      uint32_t edi = 0;
004800e9      uint32_t ebp = 0;
004800e9      
004800f6      while (true)
004800f6      {
004800f8          switch (eax_41)
004800f8          {
004800ff              case nullptr:
004800ff              {
004800ff                  edi = 0x1000030f;
00480104                  ebp = 0x10000318;
004800ff                  break;
004800ff              }
0048010b              case 1:
0048010b              {
0048010b                  edi = 0x10000310;
00480110                  ebp = 0x10000319;
0048010b                  break;
0048010b              }
00480117              case 2:
00480117              {
00480117                  edi = 0x10000311;
0048011c                  ebp = 0x1000031a;
00480117                  break;
00480117              }
00480123              case 3:
00480123              {
00480123                  edi = 0x10000312;
00480128                  ebp = 0x1000031b;
00480123                  break;
00480123              }
0048012f              case 4:
0048012f              {
0048012f                  edi = 0x10000313;
00480134                  ebp = 0x1000031c;
0048012f                  break;
0048012f              }
0048013b              case 5:
0048013b              {
0048013b                  edi = 0x10000314;
00480140                  ebp = 0x1000031d;
0048013b                  break;
0048013b              }
00480147              case 6:
00480147              {
00480147                  edi = 0x10000315;
0048014c                  ebp = 0x1000031e;
00480147                  break;
00480147              }
00480153              case 7:
00480153              {
00480153                  edi = 0x10000316;
00480158                  ebp = 0x1000031f;
00480153                  break;
00480153              }
0048015f              case 8:
0048015f              {
0048015f                  edi = 0x10000317;
00480164                  ebp = 0x10000320;
0048015f                  break;
0048015f              }
004800f8          }
004800f8          
0048016f          void* ebx_1 = ((eax_41 * 0x1c) + this);
0048017a          *(uint32_t*)((char*)ebx_1 + 0x7e8) = UIElement::GetChildRecursive(this, edi);
00480185          *(uint32_t*)((char*)ebx_1 + 0x7ec) = UIElement::GetChildRecursive(this, ebp);
00480193          arg2 = (&arg2->vtable + 1);
00480193          
00480197          if ((&arg2->vtable + 1) >= 9)
00480197              break;
00480197          
004800ef          eax_41 = arg2;
004800f6      }
004800f6      
004801b0      this->m_pGradCircle = UIElement::GetChildRecursive(this, 0x1000030e);
004801b6      class UIElement* eax_48 = UIElement::GetChildRecursive(this, 0x10000321);
004801bf      class UIElement_Scrollbar* eax_49;
004801bf      
004801bf      if (eax_48 == 0)
004801cf          eax_49 = nullptr;
004801bf      else
004801c7          eax_49 = eax_48->vtable->DynamicCast(0xb);
004801c7      
004801d8      this->m_pShadeScroll = eax_49;
004801de      class UIElement* eax_50 = UIElement::GetChildRecursive(this, 0x100003bb);
004801e5      class UIElement_Viewport* eax_51;
004801e5      
004801e5      if (eax_50 == 0)
004801f5          eax_51 = nullptr;
004801e5      else
004801ed          eax_51 = eax_50->vtable->DynamicCast(0xd);
004801ed      
004801f9      this->m_pViewport = eax_51;
004801ff      void* eax_52;
004801ff      class UIElement_Viewport* edx_20;
004801ff      eax_52 = operator new(0x60);
00480209      class gmCG3DView* eax_53;
00480209      
00480209      if (eax_52 == 0)
00480214          eax_53 = nullptr;
00480209      else
0048020d          eax_53 = gmCG3DView::gmCG3DView(eax_52);
0048020d      
0048021c      class UIElement_Viewport* m_pViewport = this->m_pViewport;
0048021f      this->m_p3DView = eax_53;
00480225      gmCG3DView::Initialize(eax_53, edx_20);
0048022a      class gmCG3DView* m_p3DView = this->m_p3DView;
00480235      this->m_fCurHeading = 180f;
0048023f      gmCG3DView::SetPlayerHeading(m_p3DView, 180f);
00480248      this->m_vectCurDirection.x = 0;
00480248      this->m_vectCurDirection.y = 0f;
00480248      this->m_vectCurDirection.z = 0f;
00480256      uint32_t mHeritageGroup = eax_2->mHeritageGroup;
0048025f      float edx_22;
0048025f      float ebx_2;
0048025f      
0048025f      if (mHeritageGroup == 0xc)
0048025f      {
00480261          ebx_2 = -1.85000002f;
00480266          edx_22 = 1.85000002f;
0048025f      }
0048025f      else if (mHeritageGroup != 0xd)
00480270      {
00480281          edx_22 = 1.64999998f;
00480286          ebx_2 = -0.850000024f;
00480286          
0048028b          if (mHeritageGroup != 7)
0048028d              ebx_2 = -0.550000012f;
00480270      }
00480270      else
00480270      {
00480272          ebx_2 = -3.04999995f;
00480277          edx_22 = 2.75f;
00480270      }
00480270      
00480292      this->m_vectTargPosition.z = edx_22;
00480298      this->m_vectTargPosition.y = ebx_2;
004802a4      this->m_vectTargPosition.x = 0;
0048029e      this->m_vectCurPosition.x = 0;
0048029e      this->m_vectCurPosition.y = ebx_2;
0048029e      this->m_vectCurPosition.z = edx_22;
004802ba      gmCG3DView::SetCamera(this->m_p3DView, &this->m_vectCurPosition, &this->m_vectCurDirection);
004802c3      this->m_bZoomedIn = 0;
004802ca      gmCGAppearancePage::SetChoice(this, ECG_CHOICE_FACE);
004802da      uint32_t mGender = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->mGender;
004802da      
004802e4      if (mGender == 1)
004802e4      {
004802fc          CharGenState::SetGender(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 2);
00480303          gmCGAppearancePage::Update(this);
004802e4      }
004802e4      else if (mGender == 2)
004802e7      {
004802fc          CharGenState::SetGender(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 1);
00480303          gmCGAppearancePage::Update(this);
004802e7      }
004802e7      
00480311      if (UIElement::IsVisible(this) != 0)
00480319          gmCG3DView::Update(this->m_p3DView);
00480319      
00480320      gmCGAppearancePage::SetupParts(this);
0048032e      gmCGAppearancePage::SetSelection(this, this->m_eCurPart);
0047fdd0  }

00480338  uint32_t jump_table_480338[0x9] = 
00480338  {
00480338      [0x0] =  0x004800ff
0048033c      [0x1] =  0x0048010b
00480340      [0x2] =  0x00480117
00480344      [0x3] =  0x00480123
00480348      [0x4] =  0x0048012f
0048034c      [0x5] =  0x0048013b
00480350      [0x6] =  0x00480147
00480354      [0x7] =  0x00480153
00480358      [0x8] =  0x0048015f
0048035c  }

0048035c                                                                                      90 90 90 90                              ....

00480360  void __thiscall SkillFormula::SkillFormula(class SkillFormula* this, class SkillFormula const* arg2)

00480360  {
00480366      this->vtable = 0x7a016c;
0048036f      this->_w = arg2->_w;
00480375      this->_x = arg2->_x;
0048037b      this->_y = arg2->_y;
00480381      this->_z = arg2->_z;
00480387      this->_attr1 = arg2->_attr1;
0048038d      this->_attr2 = arg2->_attr2;
00480360  }

00480393                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004803a0  void __thiscall AC1Legacy::PStringBase<char>::PStringBase<char>(class AC1Legacy::PStringBase<char>* this, class AC1Legacy::PStringBase<char> const* arg2)

004803a0  {
004803a4      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
004803a9      this->m_buffer = m_buffer;
004803af      InterlockedIncrement(&m_buffer->m_cRef);
004803a0  }

004803bb                                                                                   90 90 90 90 90                             .....

004803c0  int32_t const __thiscall UIElement_ListBox::WhatNum(class UIElement_ListBox const* this, class UIElement* arg2)

004803c0  {
004803c0      uint32_t m_num = this->m_listItems.m_num;
004803c7      int32_t result = 0;
004803c7      
004803cb      if (m_num > 0)
004803cb      {
004803cd          class UIElement** m_data = this->m_listItems.m_data;
004803cd          
004803e1          do
004803e1          {
004803d9              if (*(uint32_t*)m_data == arg2)
004803e7                  return result;
004803e7              
004803db              result += 1;
004803dc              m_data = &m_data[1];
004803e1          } while (result < m_num);
004803cb      }
004803cb      
004803e3      return 0xffffffff;
004803c0  }

004803ea                                90 90 90 90 90 90                                                            ......

004803f0  void __fastcall gmCGSkillsPage::tagSkillRecord::tagSkillRecord(struct gmCGSkillsPage::tagSkillRecord* this)

004803f0  {
004803f0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00480405      this->strName.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00480408      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0048040a      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00480416      this->strDesc.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_3;
00480419      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
0048041b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00480427      this->strFormula.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_2;
0048042a      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
0048042e      this->formSkill._w = 0;
00480431      this->formSkill._x = 0;
00480434      this->formSkill._y = 0;
00480437      this->formSkill._attr1 = 0;
0048043a      this->formSkill._attr2 = 0;
0048043e      this->formSkill.vtable = 0x7a016c;
00480445      this->formSkill._z = 1;
004803f0  }


00480450  void __fastcall gmCGSkillsPage::tagSkillRecord::~tagSkillRecord(struct gmCGSkillsPage::tagSkillRecord* this)

00480450  {
0048045e      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = (this->strFormula.m_charbuffer - 0x14);
00480465      this->formSkill.vtable = 0x79285c;
00480465      
00480474      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0048047c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0048047c      
00480481      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = (this->strDesc.m_charbuffer - 0x14);
00480481      
00480490      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00480498          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00480498      
0048049d      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_5 = (this->strName.m_charbuffer - 0x14);
0048049d      
004804ac      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
004804b4          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00480450  }

004804ba                                                                                90 90 90 90 90 90                            ......

004804c0  void __thiscall gmCGSkillsPage::tagSkillRecord::tagSkillRecord(struct gmCGSkillsPage::tagSkillRecord* this, struct gmCGSkillsPage::tagSkillRecord const* arg2)

004804c0  {
004804d1      this->pEntry = arg2->pEntry;
004804d6      this->pUpCostText = arg2->pUpCostText;
004804dc      this->pDownCostText = arg2->pDownCostText;
004804e2      this->pSkillLevelText = arg2->pSkillLevelText;
004804e8      this->pSkillUpButton = arg2->pSkillUpButton;
004804ee      this->pSkillDownButton = arg2->pSkillDownButton;
004804f1      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->strName.m_charbuffer;
004804f4      this->strName.m_charbuffer = m_charbuffer;
004804fb      InterlockedIncrement(&m_charbuffer->m_data[-8]);
004804fd      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->strDesc.m_charbuffer;
00480500      this->strDesc.m_charbuffer = m_charbuffer_1;
00480507      InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00480509      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = arg2->strFormula.m_charbuffer;
0048050c      this->strFormula.m_charbuffer = m_charbuffer_2;
00480513      InterlockedIncrement(&m_charbuffer_2->m_data[-8]);
00480518      this->iSkillID = arg2->iSkillID;
0048051e      this->iSkillLevel = arg2->iSkillLevel;
00480524      this->iTrainCost = arg2->iTrainCost;
0048052a      this->iSpecCost = arg2->iSpecCost;
00480530      this->iMinlevel = arg2->iMinlevel;
00480533      int32_t edx_2;
00480533      edx_2 = arg2->bUntrainable;
00480536      this->bUntrainable = edx_2;
00480539      int32_t eax_6;
00480539      eax_6 = arg2->bUnspecializable;
0048053c      this->bUnspecializable = eax_6;
00480542      this->saCurClass = arg2->saCurClass;
00480545      this->formSkill.vtable = 0x7a016c;
0048054f      this->formSkill._w = arg2->formSkill._w;
00480555      this->formSkill._x = arg2->formSkill._x;
0048055b      this->formSkill._y = arg2->formSkill._y;
00480561      this->formSkill._z = arg2->formSkill._z;
00480567      this->formSkill._attr1 = arg2->formSkill._attr1;
0048056e      this->formSkill._attr2 = arg2->formSkill._attr2;
004804c0  }

00480578                                                                          90 90 90 90 90 90 90 90                          ........

00480580  void* __thiscall IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>* this, uint32_t arg2)

00480580  {
00480583      class HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord>** m_buckets = this->m_buckets;
0048058b      this->vtable = 0x7a0180;
0048058b      
00480591      if (m_buckets != &this->m_aInplaceBuckets)
00480594          operator delete[](m_buckets);
00480594      
0048059e      this->m_buckets = nullptr;
004805a1      this->m_firstInterestingBucket = nullptr;
004805a4      this->m_numBuckets = 0;
004805a7      this->m_numElements = 0;
004805a7      
004805af      if ((arg2 & 1) != 0)
004805b2          operator delete(this);
004805b2      
004805bd      return this;
00480580  }


004805c0  void PStringBase<unsigned short>::PStringBase<unsigned short>(class PStringBase<unsigned short>* this, enum _Formatted arg2, uint16_t const* arg3)

004805c0  {
004805cc      int32_t eax = _vscwprintf(arg3, &arg_10);
004805de      PStringBase<unsigned short>::allocate_ref_buffer(this, eax);
004805f2      _vsnwprintf(this->m_charbuffer, (eax + 1), arg3, &arg_10);
004805c0  }


00480600  void __fastcall gmCGSkillsPage::SetSkillText(class gmCGSkillsPage* this, struct gmCGSkillsPage::tagSkillRecord* arg2)

00480600  {
0048060d      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
00480612      struct gmCGSkillsPage::tagSkillRecord* esi = arg2;
0048061e      int32_t eax_2 = CharGenState::GetSkillScore(eax, esi->iSkillID);
00480623      int32_t var_30_1 = eax_2;
00480630      esi->iSkillLevel = eax_2;
00480633      class PStringBase<unsigned short>* eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, &data_7a0184);
0048063f      UIElement_Text::SetText(esi->pSkillLevelText, eax_3);
0048064e      void* __offset(gmCGSkillsPage::tagSkillRecord, -0x14) ebx_1 = ((char*)arg2 - 0x14);
0048064e      
0048065d      if ((InterlockedDecrement(((char*)ebx_1 + 4)) == 0 && ebx_1 != 0))
00480665          *(uint32_t*)*(int32_t*)((char*)ADJ(ebx_1) + -0x14)(1);
00480665      
00480667      enum SKILL_ADVANCEMENT_CLASS saCurClass = esi->saCurClass;
0048066b      class UIElement_Button* ecx_18;
0048066b      
0048066b      if (saCurClass == UNTRAINED_SKILL_ADVANCEMENT_CLASS)
0048066b      {
00480811          int32_t iTrainCost_1 = esi->iTrainCost;
00480819          void* ebx_10;
00480819          
00480819          if (iTrainCost_1 < 0x3e7)
00480819          {
0048083c              int32_t iTrainCost_2 = iTrainCost_1;
00480849              void* var_8;
00480849              class PStringBase<unsigned short>* eax_28 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, Formatted, &data_7a0184);
00480855              UIElement_Text::SetText(esi->pUpCostText, eax_28);
0048085a              ebx_10 = var_8;
00480819          }
00480819          else
00480819          {
00480824              void* var_1c;
00480824              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1c, &data_794320);
00480831              UIElement_Text::SetText(esi->pUpCostText, &var_1c);
00480836              ebx_10 = var_1c;
00480819          }
00480819          
0048086d          if ((InterlockedDecrement(((char*)ebx_10 - 0x10)) == 0 && ebx_10 != 0x14))
00480875              **(uint32_t**)((char*)ebx_10 - 0x14)(1);
00480875          
00480877          int32_t var_30_19 = 0;
00480885          class PStringBase<unsigned short> var_4;
00480885          class PStringBase<unsigned short>* eax_31 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, Formatted, &data_7a0184);
00480891          UIElement_Text::SetText(esi->pDownCostText, eax_31);
0048089a          int32_t* ebx_13 = (var_4 - 0x14);
0048089a          
004808a9          if ((InterlockedDecrement(&ebx_13[1]) == 0 && ebx_13 != 0))
004808b1              **(uint32_t**)ebx_13(1);
004808b1          
004808b3          esi->pSkillDownButton->vtable->SetState(0x1000001a);
004808ce          ecx_18 = esi->pSkillUpButton;
004808ce          
004808d1          if (eax->remainingSkillCredits >= esi->iTrainCost)
004808d1          {
004807fa              ecx_18->vtable->SetState(0x1000001b);
0048080e              return;
004808d1          }
004808d1          
004808d7          ecx_18->vtable->SetState(0x1000001a);
0048066b      }
0048066b      else
0048066b      {
00480672          uint8_t eax_16;
00480672          
00480672          if (saCurClass == 2)
00480672          {
00480717              int32_t eax_18 = (esi->iSpecCost - esi->iTrainCost);
0048071f              struct gmCGSkillsPage::tagSkillRecord* ebx_6;
0048071f              
0048071f              if (eax_18 < 0x3e7)
0048071f              {
00480742                  int32_t var_30_11 = eax_18;
0048074f                  struct gmCGSkillsPage::tagSkillRecord* var_10;
0048074f                  class PStringBase<unsigned short>* eax_19 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, Formatted, &data_7a0184);
0048075b                  UIElement_Text::SetText(esi->pUpCostText, eax_19);
00480760                  ebx_6 = var_10;
0048071f              }
0048071f              else
0048071f              {
0048072a                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_794320);
00480737                  UIElement_Text::SetText(esi->pUpCostText, &arg2);
0048073c                  ebx_6 = arg2;
0048071f              }
0048071f              
00480773              if ((InterlockedDecrement(((char*)ebx_6 - 0x10)) == 0 && ebx_6 != 0x14))
0048077b                  *(uint32_t*)*(int32_t*)((char*)ebx_6 + -0x14)(1);
0048077b              
00480780              int32_t iTrainCost = esi->iTrainCost;
0048078d              class PStringBase<unsigned short> var_c;
0048078d              class PStringBase<unsigned short>* eax_22 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, Formatted, &data_7a0184);
00480799              UIElement_Text::SetText(esi->pDownCostText, eax_22);
004807a2              int32_t* ebx_9 = (var_c - 0x14);
004807a2              
004807b1              if ((InterlockedDecrement(&ebx_9[1]) == 0 && ebx_9 != 0))
004807b9                  **(uint32_t**)ebx_9(1);
004807b9              
004807cb              class UIElement_Button* pSkillUpButton = esi->pSkillUpButton;
004807cb              
004807ce              if (eax->remainingSkillCredits < (esi->iSpecCost - esi->iTrainCost))
004807df                  pSkillUpButton->vtable->SetState(0x1000001a);
004807ce              else
004807d0                  pSkillUpButton->vtable->SetState(0x1000001b);
004807d0              
004807ec              eax_16 = esi->bUntrainable;
004807f1          label_4807f1:
004807f1              ecx_18 = esi->pSkillDownButton;
004807f1              
004807f4              if (eax_16 != 0)
004807f4              {
004807fa                  ecx_18->vtable->SetState(0x1000001b);
0048080e                  return;
004807f4              }
004807f4              
004808d7              ecx_18->vtable->SetState(0x1000001a);
00480672          }
00480672          else if (saCurClass == 3)
00480679          {
0048067f              int32_t var_30_4 = 0;
0048068d              void* var_18;
0048068d              class PStringBase<unsigned short>* eax_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, Formatted, &data_7a0184);
00480699              UIElement_Text::SetText(esi->pUpCostText, eax_9);
004806a2              int32_t* ebx_3 = ((char*)var_18 - 0x14);
004806a2              
004806b1              if ((InterlockedDecrement(&ebx_3[1]) == 0 && ebx_3 != 0))
004806b9                  **(uint32_t**)ebx_3(1);
004806b9              
004806c1              int32_t var_30_7 = (esi->iSpecCost - esi->iTrainCost);
004806ce              void* var_14;
004806ce              class PStringBase<unsigned short>* eax_12 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, Formatted, &data_7a0184);
004806da              UIElement_Text::SetText(esi->pDownCostText, eax_12);
004806e3              int32_t* ebx_5 = ((char*)var_14 - 0x14);
004806e3              
004806f2              if ((InterlockedDecrement(&ebx_5[1]) == 0 && ebx_5 != 0))
004806fa                  **(uint32_t**)ebx_5(1);
004806fa              
004806fc              esi->pSkillUpButton->vtable->SetState(0x1000001a);
0048070c              eax_16 = esi->bUnspecializable;
004806ee              goto label_4807f1;
00480679          }
0048066b      }
00480600  }

004808ee                                            90 90                                                                ..

004808f0  void __fastcall gmCGSkillsPage::UpdateCreditsMeter(class gmCGSkillsPage* this)

004808f0  {
004808f0      class gmCGSkillsPage* this_1 = this;
00480905      int32_t remainingSkillCredits = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->remainingSkillCredits;
00480912      class PStringBase<unsigned short>* eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, Formatted, &data_7a0184);
00480921      UIElement_Text::SetText(this->m_pCreditsMeter, eax_2);
0048092a      void* __offset(gmCGSkillsPage, -0x14) esi_2 = ((char*)this_1 - 0x14);
0048092a      
0048093d      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00480945          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004808f0  }

0048094a                                90 90 90 90 90 90                                                            ......

00480950  void __fastcall gmCGSkillsPage::UpdateAllTrainingValues(class gmCGSkillsPage* this)

00480950  {
00480955      class gmCGSkillsPage* this_1 = this;
00480963      class gmCGSkillsPage* this_2 = this_1;
00480967      void __return;
00480967      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this_1->m_hashSkills.m_intrusiveTable, &__return);
0048096c      class HashTableData<unsigned long,DBOCache *>* i = eax->m_currElement;
00480971      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00480973      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00480973      
0048097a      while (i != 0)
0048097a      {
00480998          void var_5c;
00480998          void* var_8c_2 = &var_5c;
0048099b          gmCGSkillsPage::SetSkillText(this_1, gmCGSkillsPage::tagSkillRecord::tagSkillRecord(&var_5c, &i->m_data));
004809a0          i = i->m_hashNext;
004809a0          
004809a5          if (i == 0)
004809a5          {
004809b4              while (true)
004809b4              {
004809b4                  m_currBucket = &m_currBucket[1];
004809b4                  
004809b9                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004809b9                      break;
004809b9                  
004809bb                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
004809bb                  
004809bf                  if (i_1 != 0)
004809bf                  {
004809c1                      i = i_1;
004809c1                      break;
004809bf                  }
004809b4              }
004809a5          }
004809a5          
004809ce          int32_t var_1c_1 = 0x79285c;
004809de          void* var_3c;
004809de          
004809de          if ((InterlockedDecrement(((char*)var_3c - 0x10)) == 0 && var_3c != 0x14))
004809e6              **(uint32_t**)((char*)var_3c - 0x14)(1);
004809e6          
004809fb          void* var_40;
004809fb          
004809fb          if ((InterlockedDecrement(((char*)var_40 - 0x10)) == 0 && var_40 != 0x14))
00480a03              **(uint32_t**)((char*)var_40 - 0x14)(1);
00480a03          
00480a18          void* var_44;
00480a18          
00480a18          if ((InterlockedDecrement(((char*)var_44 - 0x10)) == 0 && var_44 != 0x14))
00480a20              **(uint32_t**)((char*)var_44 - 0x14)(1);
00480a20          
00480a24          this_1 = this_2;
0048097a      }
0048097a      
00480a31      gmCGSkillsPage::UpdateCreditsMeter(this_1);
00480950  }

00480a3d                                                                                         90 90 90                               ...

00480a40  void __thiscall gmCGSkillsPage::InsertEntrySorted(class gmCGSkillsPage* this, struct gmCGSkillsPage::tagSkillRecord* arg2, class UIElement* arg3, class UIElement* arg4)

00480a40  {
00480a45      class UIElement_ListBox* m_pSkillsListBox = this->m_pSkillsListBox;
00480a4b      uint32_t m_num = m_pSkillsListBox->m_listItems.m_num;
00480a51      int32_t eax = 0;
00480a51      
00480a56      if (m_num <= 0)
00480a56      {
00480a6e      label_480a6e:
00480a6e          eax = 0xffffffff;
00480a56      }
00480a56      else
00480a56      {
00480a58          class UIElement** m_data_1 = m_pSkillsListBox->m_listItems.m_data;
00480a58          
00480a64          while (*(uint32_t*)m_data_1 != arg3)
00480a64          {
00480a66              eax += 1;
00480a67              m_data_1 = &m_data_1[1];
00480a67              
00480a6c              if (eax >= m_num)
00480a6c                  goto label_480a6e;
00480a64          }
00480a56      }
00480a56      
00480a71      class UIElement* ebx_2 = arg4;
00480a77      class UIElement* m_num_1;
00480a77      
00480a77      if (ebx_2 == 0)
00480aa1          m_num_1 = m_pSkillsListBox->m_listItems.m_num;
00480a77      else
00480a77      {
00480a79          uint32_t m_num_2 = m_pSkillsListBox->m_listItems.m_num;
00480a7f          m_num_1 = nullptr;
00480a7f          
00480a83          if (m_num_2 > 0)
00480a83          {
00480a85              class UIElement** m_data = m_pSkillsListBox->m_listItems.m_data;
00480a85              
00480a9a              do
00480a9a              {
00480a92                  if (*(uint32_t*)m_data == ebx_2)
00480a92                      goto label_480aa7;
00480a92                  
00480a94                  m_num_1 = (&m_num_1->vtable + 1);
00480a95                  m_data = &m_data[1];
00480a9a              } while (m_num_1 < m_num_2);
00480a83          }
00480a83          
00480a9c          m_num_1 = 0xffffffff;
00480a77      }
00480a77      
00480aa7  label_480aa7:
00480ab6      uint32_t i;
00480ab6      
00480ab6      for (i = (eax + 1); i < m_num_1; i += 1)
00480ab6      {
00480ad8          UIElement::GetAttribute_InstanceID(UIElement_ListBox::GetItem(this->m_pSkillsListBox, i), 0x1000000a, &arg4);
00480add          class UIElement* ecx_2 = arg4;
00480add          
00480af8          for (int32_t* j = this->m_hashSkills.m_intrusiveTable.m_buckets[(COMBINE(0, ecx_2) % this->m_hashSkills.m_intrusiveTable.m_numBuckets)]; j != 0; j = j[1])
00480af8          {
00480b02              if (*(uint32_t*)j == ecx_2)
00480b02              {
00480b16                  if (((j != 0 && j != 0xfffffff8) && wcscmp(arg2->strName.m_charbuffer, j[8]) < 0))
00480b16                  {
00480b52                      UIElement_ListBox::InsertItem(this->m_pSkillsListBox, arg2->pEntry, i);
00480b5b                      return;
00480b16                  }
00480b16                  
00480b16                  break;
00480b02              }
00480af8          }
00480ab6      }
00480ab6      
00480b3c      UIElement_ListBox::InsertItem(this->m_pSkillsListBox, arg2->pEntry, i);
00480a40  }

00480a8d                                         8d 49 00                                                               .I.
00480b5e                                                                                            90 90                                ..

00480b60  void __thiscall IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>::IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>(class IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>* this, uint32_t arg2)

00480b60  {
00480b6b      arg2 = arg2;
00480b6f      uint8_t edx = ((int8_t)arg2);
00480b73      this->m_buckets = nullptr;
00480b76      this->m_firstInterestingBucket = nullptr;
00480b79      this->m_numBuckets = 0;
00480b7c      this->m_numElements = 0;
00480b80      this->vtable = 0x7a0180;
00480b86      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00480b99      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00480b99      
00480ba3      if (eax == bucketSizesEnd_1)
00480ba5          eax -= 4;
00480ba5      
00480ba8      uint32_t eax_1 = *(uint32_t*)eax;
00480bad      this->m_numBuckets = eax_1;
00480bad      
00480bb0      if (eax_1 > 0x17)
00480bc6          this->m_buckets = operator new[]((eax_1 << 2));
00480bb0      else
00480bb5          this->m_buckets = &this->m_aInplaceBuckets;
00480bb5      
00480bcc      class HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord>** m_buckets = this->m_buckets;
00480bcf      uint32_t ecx_3 = (this->m_numBuckets << 2);
00480bd5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00480be6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00480b60  }

00480bef                                               90                                                                 .

00480bf0  void __thiscall gmCGSkillsPage::UpdateSkillEntry(class gmCGSkillsPage* this, struct gmCGSkillsPage::tagSkillRecord* arg2)

00480bf0  {
00480bfa      CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
00480c11      struct gmCGSkillsPage::tagSkillRecord* var_c_1 = arg2;
00480c14      gmCGSkillsPage::SetSkillText(this, UIElement_ListBox::RemoveItem(this->m_pSkillsListBox, arg2->pEntry));
00480c19      enum SKILL_ADVANCEMENT_CLASS saCurClass = arg2->saCurClass;
00480c19      
00480c1d      if (saCurClass == UNTRAINED_SKILL_ADVANCEMENT_CLASS)
00480c1d      {
00480c5f          if (arg2->iMinlevel <= 1)
00480c5f          {
00480c72              gmCGSkillsPage::InsertEntrySorted(this, arg2, this->m_pUseableUntrainedEntry, this->m_pUnuseableUntrainedEntry);
00480c79              return;
00480c5f          }
00480c5f          
00480c88          gmCGSkillsPage::InsertEntrySorted(this, arg2, this->m_pUnuseableUntrainedEntry, nullptr);
00480c1d      }
00480c1d      else
00480c1d      {
00480c20          if (saCurClass == 2)
00480c20          {
00480c51              gmCGSkillsPage::InsertEntrySorted(this, arg2, this->m_pTrainedEntry, this->m_pUseableUntrainedEntry);
00480c58              return;
00480c20          }
00480c20          
00480c23          if (saCurClass == 3)
00480c36              gmCGSkillsPage::InsertEntrySorted(this, arg2, this->m_pSpecEntry, this->m_pTrainedEntry);
00480c1d      }
00480bf0  }

00480c92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00480ca0  void __fastcall gmCGSkillsPage::IncreaseSkillLevel(class gmCGSkillsPage* this, class UIElement* arg2)

00480ca0  {
00480ca0      class gmCGSkillsPage* this_1 = this;
00480ca0      
00480cb9      if (UIElement::GetAttribute_InstanceID(arg2, 0x1000000a, &arg2) != 0)
00480cb9      {
00480cc8          this_1 = arg2;
00480cd3          class List<NoticeHandler *>** eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_hashSkills, &this_1);
00480cd3          
00480cdc          if (eax_1 != 0)
00480cdc          {
00480ce4              class ClientCharGenState* eax_2 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
00480ceb              int32_t eax_3 = eax_1[0xf];
00480ceb              
00480cf1              if (eax_3 != 1)
00480cf1              {
00480d29                  if (((eax_3 == 2 && (eax_1[0xc] - eax_1[0xb]) <= eax_2->remainingSkillCredits) && CharGenState::SetSkillLevel(eax_2, eax_1[9], SPECIALIZED_SKILL_ADVANCEMENT_CLASS) != 0))
00480d29                  {
00480d3a                      eax_1[0xf] = 3;
00480d44                      gmCGSkillsPage::UpdateSkillEntry(this, eax_1);
00480d29                  }
00480cf1              }
00480cf1              else if ((eax_1[0xb] <= eax_2->remainingSkillCredits && CharGenState::SetSkillLevel(eax_2, eax_1[9], TRAINED_SKILL_ADVANCEMENT_CLASS) != 0))
00480cfc              {
00480d0d                  eax_1[0xf] = 2;
00480d44                  gmCGSkillsPage::UpdateSkillEntry(this, eax_1);
00480cfc              }
00480cfc              
00480d4b              gmCGSkillsPage::UpdateAllTrainingValues(this);
00480cdc          }
00480cb9      }
00480ca0  }

00480d56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00480d60  void __fastcall gmCGSkillsPage::DecreaseSkillLevel(class gmCGSkillsPage* this, class UIElement* arg2)

00480d60  {
00480d60      class gmCGSkillsPage* this_1 = this;
00480d60      
00480d79      if (UIElement::GetAttribute_InstanceID(arg2, 0x1000000a, &arg2) != 0)
00480d79      {
00480d88          this_1 = arg2;
00480d93          class List<NoticeHandler *>** eax_1 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_hashSkills, &this_1);
00480d93          
00480d9c          if (eax_1 != 0)
00480d9c          {
00480da4              class ClientCharGenState* eax_2 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
00480da9              int32_t edx_1 = eax_1[0xf];
00480daf              class ClientCharGenState* ecx_4 = eax_2;
00480daf              
00480db1              if (edx_1 == 3)
00480db3                  eax_2 = *(uint8_t*)((char*)eax_1 + 0x39);
00480db3              
00480db8              if ((edx_1 == 3 && eax_2 != 0))
00480db8              {
00480dc7                  if (CharGenState::SetSkillLevel(ecx_4, eax_1[9], TRAINED_SKILL_ADVANCEMENT_CLASS) != 0)
00480dc7                  {
00480dc9                      eax_1[0xf] = 2;
00480df7                      gmCGSkillsPage::UpdateSkillEntry(this, eax_1);
00480dc7                  }
00480db8              }
00480db8              else if (edx_1 == 2)
00480dd5              {
00480dd7                  eax_2 = eax_1[0xe];
00480dd7                  
00480ddc                  if ((eax_2 != 0 && CharGenState::SetSkillLevel(ecx_4, eax_1[9], UNTRAINED_SKILL_ADVANCEMENT_CLASS) != 0))
00480ddc                  {
00480ded                      eax_1[0xf] = 1;
00480df7                      gmCGSkillsPage::UpdateSkillEntry(this, eax_1);
00480ddc                  }
00480dd5              }
00480dd5              
00480dfe              gmCGSkillsPage::UpdateAllTrainingValues(this);
00480d9c          }
00480d79      }
00480d60  }

00480e09                             90 90 90 90 90 90 90                                                           .......

00480e10  void __thiscall gmCGSkillsPage::MakeSkillFormula(class gmCGSkillsPage* this, struct gmCGSkillsPage::tagSkillRecord* arg2)

00480e10  {
00480e1f      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
00480e2b      int32_t iSkillID = arg2->iSkillID;
00480e2e      class ClientCharGenState* var_130 = eax;
00480e32      class SkillTable* skillTable = eax->skillTable;
00480e38      uint32_t _table_size = skillTable->_skillBaseHash._table_size;
00480e40      void* esi;
00480e40      
00480e40      if (_table_size == 0)
00480e40      {
00480e65      label_480e65_1:
00480e65          esi = nullptr;
00480e40      }
00480e40      else
00480e40      {
00480e42          class PackableHashData<unsigned long,SkillBase>** _buckets = skillTable->_skillBaseHash._buckets;
00480e42          
00480e47          if (_buckets == 0)
00480e47          {
00480e65          label_480e65_2:
00480e65              esi = nullptr;
00480e47          }
00480e47          else
00480e47          {
00480e4f              int32_t* edx_3 = _buckets[(COMBINE(0, iSkillID) % _table_size)];
00480e4f              
00480e54              if (edx_3 == 0)
00480e54              {
00480e65              label_480e65:
00480e65                  esi = nullptr;
00480e54              }
00480e54              else
00480e54              {
00480e58                  while (iSkillID != *(uint32_t*)edx_3)
00480e58                  {
00480e5e                      edx_3 = edx_3[0x18];
00480e5e                      
00480e63                      if (edx_3 == 0)
00480e63                          goto label_480e65;
00480e58                  }
00480e58                  
00480ff6                  esi = &edx_3[2];
00480e54              }
00480e47          }
00480e40      }
00480e40      
00480e67      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->strFormula.m_charbuffer;
00480e67      
00480e79      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
00480e79      {
00480e8e          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00480e96              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00480e96          
00480e98          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00480e70          arg2->strFormula.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00480ea5          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00480e79      }
00480e79      
00480ead      if (esi != 0)
00480ead      {
00480eb3          int32_t __saved_ebp_11 = *(uint32_t*)((char*)esi + 0x34);
00480eb6          int32_t __saved_ebp_12 = *(uint32_t*)((char*)esi + 0x28);
00480eb9          int32_t eax_6 = *(uint32_t*)((char*)esi + 0x30);
00480ebc          *(uint32_t*)((char*)esi + 0x2c);
00480ec0          uint32_t ebp_1 = *(uint32_t*)((char*)esi + 0x38);
00480ec3          uint32_t esi_1 = *(uint32_t*)((char*)esi + 0x3c);
00480ee1          void* const var_124;
00480ee1          int32_t* eax_7;
00480ee1          int32_t ebx_3;
00480ee1          int32_t esi_2;
00480ee1          eax_7 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_124, WidthConvert, "Formula : ");
00480ee6          uint16_t* eax_8 = *(uint32_t*)eax_7;
00480ee8          int32_t ecx_6 = *(uint32_t*)((char*)eax_8 - 4);
00480ee8          
00480eee          if (ecx_6 != 1)
00480ef7              PStringBase<unsigned short>::append_n_chars(&arg2->strFormula, eax_8, (ecx_6 - 1));
00480ef7          
00480f00          int32_t* edi_3 = ((char*)var_124 - 0x14);
00480f00          
00480f13          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00480f1b              **(uint32_t**)edi_3(1);
00480f1b          
00480f24          if (ebx_3 >= 1)
00480f28              var_124 = 1;
00480f28          
00480f2c          if ((ebx_3 < 1 || ebp_1 == 0))
00480f2e              var_124 = nullptr;
00480f2e          
00480f3a          int32_t var_120_1;
00480f3a          
00480f3a          if (eax_6 >= 1)
00480f3e              var_120_1 = 1;
00480f3e          
00480f42          if ((eax_6 < 1 || esi_2 == 0))
00480f44              var_120_1 = 0;
00480f44          
00480f52          void var_100;
00480f52          
00480f52          if (var_124 == 0)
00480f52          {
004810b5          label_4810b5:
004810b5              
004810b7              if (var_120_1 != 0)
004810b7              {
004810c7                  CharGenState::GetAttributeName(var_130, esi_1, &var_100);
004810d3                  int32_t* eax_29;
004810d3                  
004810d3                  if (eax_6 <= 1)
004810fc                      eax_29 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_130, WidthConvert, &var_100);
004810d3                  else
004810d3                  {
004810d9                      void* var_144_15 = &var_100;
004810da                      int32_t var_148_10 = eax_6;
004810e7                      eax_29 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_130, Formatted, u"(%u x %s)");
004810d3                  }
004810d3                  
00481101                  uint16_t* eax_30 = *(uint32_t*)eax_29;
00481103                  int32_t ecx_30 = *(uint32_t*)((char*)eax_30 - 4);
00481103                  
00481109                  if (ecx_30 != 1)
00481112                      PStringBase<unsigned short>::append_n_chars(&arg2->strFormula, eax_30, (ecx_30 - 1));
00481112                  
0048111b                  void* __offset(ClientCharGenState, -0x14) esi_5 = ((char*)var_130 - 0x14);
0048111b                  
0048112e                  if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
00481136                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
004810b7              }
00480f52          }
00480f52          else
00480f52          {
00480f5e              int32_t (* const esi_3)() = wcslen;
00480f64              class PStringBase<unsigned short> var_12c;
00480f64              
00480f64              if (var_120_1 != 0)
00480f64              {
00480f75                  PStringBase<unsigned short>::allocate_ref_buffer(&var_12c, wcslen(&data_797f5c));
00480f84                  wcscpy(var_12c, &data_797f5c);
00480f8a                  class PStringBase<unsigned short> ecx_12 = var_12c;
00480f8e                  int32_t eax_14 = *(uint32_t*)(ecx_12 - 4);
00480f8e                  
00480f97                  if (eax_14 != 1)
00480f97                  {
00480fa0                      PStringBase<unsigned short>::append_n_chars(&arg2->strFormula, ecx_12, (eax_14 - 1));
00480fa5                      ecx_12 = var_12c;
00480f97                  }
00480f97                  
00480fbc                  if ((InterlockedDecrement((ecx_12 - 0x10)) == 0 && ecx_12 != 0x14))
00480fc4                      **(uint32_t**)(ecx_12 - 0x14)(1);
00480f64              }
00480f64              
00480fd0              CharGenState::GetAttributeName(var_130, ebp_1, &var_100);
00480fd8              int32_t* eax_18;
00480fd8              
00480fd8              if (ebx_3 <= 1)
00481009                  eax_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_12c, WidthConvert, &var_100);
00480fd8              else
00480fd8              {
00480fde                  void* var_144_7 = &var_100;
00480fdf                  int32_t var_148_5 = ebx_3;
00480fec                  eax_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_12c, Formatted, u"(%u x %s)");
00480fd8              }
00480fd8              
0048100e              uint16_t* eax_19 = *(uint32_t*)eax_18;
00481010              int32_t ecx_17 = *(uint32_t*)((char*)eax_19 - 4);
00481010              
00481016              if (ecx_17 != 1)
0048101f                  PStringBase<unsigned short>::append_n_chars(&arg2->strFormula, eax_19, (ecx_17 - 1));
0048101f              
00481028              int32_t* edi_6 = (var_12c - 0x14);
00481028              
0048103b              if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
00481043                  **(uint32_t**)edi_6(1);
00481043              
0048104b              if (var_120_1 != 0)
0048104b              {
00481060                  PStringBase<unsigned short>::allocate_ref_buffer(&var_12c, esi_3(&data_7a01a4));
0048106f                  wcscpy(var_12c, &data_7a01a4);
00481075                  class PStringBase<unsigned short> ecx_23 = var_12c;
00481079                  int32_t eax_24 = *(uint32_t*)(ecx_23 - 4);
00481079                  
00481082                  if (eax_24 != 1)
00481082                  {
0048108b                      PStringBase<unsigned short>::append_n_chars(&arg2->strFormula, ecx_23, (eax_24 - 1));
00481090                      ecx_23 = var_12c;
00481082                  }
00481082                  
004810a7                  if ((InterlockedDecrement((ecx_23 - 0x10)) == 0 && ecx_23 != 0x14))
004810af                      **(uint32_t**)(ecx_23 - 0x14)(1);
004810af                  
004810a3                  goto label_4810b5;
0048104b              }
00480f52          }
00480f52          
00481147          if ((var_124 != 0 && var_120_1 != 0))
00481147          {
00481159              uint16_t* eax_35 = *(uint32_t*)PStringBase<unsigned short>::PStringBase<unsigned short>(&var_130, WidthConvert, &data_797584);
0048115b              int32_t ecx_36 = *(uint32_t*)((char*)eax_35 - 4);
0048115b              
00481161              if (ecx_36 != 1)
0048116a                  PStringBase<unsigned short>::append_n_chars(&arg2->strFormula, eax_35, (ecx_36 - 1));
0048116a              
00481173              void* __offset(ClientCharGenState, -0x14) esi_7 = ((char*)var_130 - 0x14);
00481173              
00481186              if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0048118e                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
00481147          }
00481147          
00481197          if (__saved_ebp_11 != 1)
00481197          {
00481199              int32_t __saved_ebp_5 = __saved_ebp_11;
004811ab              uint16_t* eax_40 = *(uint32_t*)PStringBase<unsigned short>::PStringBase<unsigned short>(&var_130, Formatted, u" / %u");
004811ad              int32_t ecx_40 = *(uint32_t*)((char*)eax_40 - 4);
004811ad              
004811b6              if (ecx_40 != 1)
004811bf                  PStringBase<unsigned short>::append_n_chars(&arg2->strFormula, eax_40, (ecx_40 - 1));
004811bf              
004811c8              void* __offset(ClientCharGenState, -0x14) esi_9 = ((char*)var_130 - 0x14);
004811c8              
004811db              if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
004811e3                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
00481197          }
00481197          
004811eb          if (__saved_ebp_12 != 0)
004811eb          {
004811ed              int32_t __saved_ebp_8 = __saved_ebp_12;
004811ff              uint16_t* eax_44 = *(uint32_t*)PStringBase<unsigned short>::PStringBase<unsigned short>(&var_130, Formatted, u" +%u");
00481201              int32_t ecx_45 = *(uint32_t*)((char*)eax_44 - 4);
00481201              
0048120a              if (ecx_45 != 1)
00481213                  PStringBase<unsigned short>::append_n_chars(&arg2->strFormula, eax_44, (ecx_45 - 1));
00481213              
0048121c              void* __offset(ClientCharGenState, -0x14) esi_11 = ((char*)var_130 - 0x14);
0048121c              
0048122f              if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
00481237                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
004811eb          }
00480ead      }
00480e10  }

00481245                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00481250  void __fastcall gmCGSkillsPage::ShowSkillsText(class gmCGSkillsPage* this, class UIElement* arg2)

00481250  {
00481253      int32_t esi;
00481253      int32_t var_c = esi;
00481254      class PStringBase<unsigned short> edi;
00481254      class PStringBase<unsigned short> var_10 = edi;
00481254      int32_t* esp = &var_10;
00481257      class UIElement* ecx = arg2;
00481257      
0048125d      if (ecx == 0)
0048125d      {
0048140c          UIElement_Text::ClearAllText(this->m_pInfoBoxTitle);
00481417          UIElement_Text::ClearAllText(this->m_pInfoBoxText);
0048125d      }
0048125d      else
0048125d      {
0048126d          esp = &var_10;
00481274          uint32_t var_4;
00481274          
00481274          if (UIElement::GetAttribute_InstanceID(ecx, 0x1000000a, &var_4) == 0)
00481274          {
0048140c              UIElement_Text::ClearAllText(this->m_pInfoBoxTitle);
00481417              UIElement_Text::ClearAllText(this->m_pInfoBoxText);
00481274          }
00481274          else
00481274          {
00481282              arg2 = var_4;
0048128d              class List<NoticeHandler *>** eax_2 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_hashSkills.vtable, &arg2);
0048128d              esp = &var_10;
0048128d              
00481296              if (eax_2 == 0)
00481296              {
0048140c                  UIElement_Text::ClearAllText(this->m_pInfoBoxTitle);
00481417                  UIElement_Text::ClearAllText(this->m_pInfoBoxText);
00481296              }
00481296              else
00481296              {
004812a2                  int32_t ebx;
004812a2                  int32_t var_14_3 = ebx;
004812a3                  int32_t ebp;
004812a3                  int32_t var_18_2 = ebp;
004812a4                  class ClientCharGenState* eax_3 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004812b1                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004812b6                  arg2 = PStringBase<unsigned short>::s_NullBuffer_1;
004812be                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004812c0                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004812c5                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
004812cc                  void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_20 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8];
004812cd                  InterlockedIncrement(var_20);
004812d2                  gmCGSkillsPage::MakeSkillFormula(this, eax_2);
004812d7                  uint16_t* eax_6 = eax_2[6];
004812da                  int32_t ecx_5 = *(uint32_t*)((char*)eax_6 - 4);
004812da                  
004812e0                  if (ecx_5 != 1)
004812e9                      PStringBase<unsigned short>::append_n_chars(&var_10, eax_6, (ecx_5 - 1));
004812e9                  
004812f4                  int32_t eax_8;
004812f4                  uint16_t* edx_1;
004812f4                  eax_8 = CharGenState::GetSkillScore(eax_3, eax_2[9]);
004812f9                  int32_t var_24_4 = eax_8;
004812fe                  wchar16 const* const var_28_2 = u" (%d)\n";
00481303                  class PStringBase<unsigned short>* var_2c_1 = &var_10;
00481304                  PStringBase<unsigned short>::sprintf_append(eax_8, edx_1);
00481309                  uint16_t* eax_9 = eax_2[7];
0048130c                  int32_t ecx_9 = *(uint32_t*)((char*)eax_9 - 4);
0048130c                  
00481315                  if (ecx_9 != 1)
0048131e                      PStringBase<unsigned short>::append_n_chars(&var_4, eax_9, (ecx_9 - 1));
0048131e                  
0048133d                  PStringBase<unsigned short>::append_n_chars(&var_4, &data_79c288, wcslen(&data_79c288));
00481348                  enum SKILL_ADVANCEMENT_CLASS eax_11 = CharGenState::GetSkillLevel(eax_3, eax_2[9]);
00481348                  
00481350                  if (eax_11 == TRAINED_SKILL_ADVANCEMENT_CLASS)
00481367                      PStringBase<unsigned short>::append_string(&var_4, u"Training Bonus  +5\n");
00481350                  else if (eax_11 == SPECIALIZED_SKILL_ADVANCEMENT_CLASS)
00481367                      PStringBase<unsigned short>::append_string(&var_4, u"Specialization Bonus  +10\n");
00481367                  
0048136c                  uint16_t* esi_2 = eax_2[8];
0048136f                  int32_t eax_12 = *(uint32_t*)((char*)esi_2 - 4);
0048136f                  
00481375                  if (eax_12 != 1)
0048137e                      PStringBase<unsigned short>::append_n_chars(&var_4, esi_2, (eax_12 - 1));
0048137e                  
00481397                  PStringBase<unsigned short>::append_n_chars(&var_4, &data_79c288, wcslen(&data_79c288));
004813a7                  UIElement_Text::SetText(this->m_pInfoBoxTitle, &var_10);
004813b7                  UIElement_Text::SetText(this->m_pInfoBoxText, &var_4);
004813c6                  int32_t* esi_4 = (var_10 - 0x14);
004813c6                  
004813d7                  if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004813d7                  {
004813d9                      int32_t eax_16 = *(uint32_t*)esi_4;
004813db                      var_20 = 1;
004813df                      *(uint32_t*)eax_16(var_20);
004813d7                  }
004813d7                  
004813eb                  void* var_8;
004813eb                  var_20 = ((char*)var_8 - 0x10);
004813eb                  esp = &var_20;
004813eb                  
004813f4                  if ((InterlockedDecrement(var_20) == 0 && var_8 != 0x14))
004813f4                  {
004813fc                      **(uint32_t**)((char*)var_8 - 0x14)(1);
00481403                      return;
004813f4                  }
00481296              }
00481274          }
0048125d      }
0048125d      
0048141c      *(uint32_t*)esp;
0048141c      esp[1];
00481250  }

00481424              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00481430  void __fastcall IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>::delete_contents(class IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>* this)

00481430  {
00481438      if (this->m_numElements != 0)
00481438      {
0048143a          void* edi;
0048143a          void* var_8_1 = edi;
0048143a          
004814b0          do
004814b0          {
00481446              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0048144c              int32_t* m_firstInterestingBucket_2;
0048144c              
0048144c              if (this->m_firstInterestingBucket == ecx_1)
0048144c              {
00481462              label_481462:
00481462                  m_firstInterestingBucket_2 = nullptr;
00481464                  edi = nullptr;
0048144c              }
0048144c              else
0048144c              {
00481450                  while (true)
00481450                  {
00481450                      class HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00481450                      
00481456                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00481456                      {
00481468                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0048146b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
0048146d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0048146d                          break;
00481456                      }
00481456                      
0048145d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0048145d                      
00481460                      if (&m_firstInterestingBucket[1] == ecx_1)
00481460                          goto label_481462;
00481450                  }
0048144c              }
0048144c              
0048146f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0048146f              
00481473              if (eax_3 == edi)
00481485                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00481473              else
00481473              {
0048147c                  void* ecx_2;
0048147c                  
0048147c                  do
0048147c                  {
00481475                      ecx_2 = eax_3;
00481477                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0048147c                  } while (eax_3 != edi);
0048147c                  
00481480                  if (ecx_2 != 0)
0048148c                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00481480                  else
00481485                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00481473              }
00481473              
00481495              this->m_numElements -= 1;
00481495              
00481498              if (edi != 0)
00481498              {
0048149d                  gmCGSkillsPage::tagSkillRecord::~tagSkillRecord(((char*)edi + 8));
004814a3                  operator delete(edi);
00481498              }
004814b0          } while (this->m_numElements != 0);
00481438      }
00481430  }

0048143d                                                                                         8d 49 00                               .I.
004814b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004814c0  enum UIElementMessageListenResult __thiscall gmCGSkillsPage::ListenToElementMessage(class gmCGSkillsPage* this, struct UIElementMessageInfo const* arg2)

004814c0  {
004814c7      uint32_t idElement = arg2->idElement;
004814c7      
004814d0      if (idElement == 0x10000304)
004814d0      {
0048152e          if (arg2->idMessage == 1)
0048152e          {
00481535              class UIElement* eax_8;
00481535              class UIElement* edx_4;
00481535              eax_8 = arg2->pElement->vtable->GetParent();
0048153d              class UIElement* var_10_5 = eax_8;
00481540              gmCGSkillsPage::IncreaseSkillLevel(this, edx_4);
0048154e              UIElement_ListBox::SetSelectedItem(this->m_pSkillsListBox, eax_8, 1);
0048152e          }
004814d0      }
004814d0      else if (idElement == 0x10000305)
004814d3      {
00481511          if (arg2->idMessage == 1)
00481511          {
00481518              class UIElement* eax_7;
00481518              class UIElement* edx_2;
00481518              eax_7 = arg2->pElement->vtable->GetParent();
00481520              class UIElement* var_10_4 = eax_7;
00481523              gmCGSkillsPage::DecreaseSkillLevel(this, edx_2);
0048154e              UIElement_ListBox::SetSelectedItem(this->m_pSkillsListBox, eax_7, 1);
00481511          }
004814d3      }
004814d3      else if ((idElement == 0x100003f7 && arg2->idMessage == 4))
004814e0      {
004814e2          class UIElement_ListBox* m_pSkillsListBox = this->m_pSkillsListBox;
004814ea          int32_t eax_3;
004814ea          class UIElement* edx_1;
004814ea          eax_3 = UIElement_ListBox::GetSelectedIndex(m_pSkillsListBox);
004814f7          class UIElement* var_10_2 = UIElement_ListBox::GetItem(m_pSkillsListBox, eax_3);
004814fa          gmCGSkillsPage::ShowSkillsText(this, edx_1);
004814e0      }
004814e0      
0048155e      return UIElement::ListenToElementMessage(this, arg2);
004814c0  }

00481561     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00481570  uint8_t __thiscall HashTable<unsigned int,gmCGSkillsPage::tagSkillRecord,0>::add(class HashTable<unsigned int,gmCGSkillsPage::tagSkillRecord,0>* this, uint32_t const* arg2, struct gmCGSkillsPage::tagSkillRecord const* arg3)

00481570  {
0048157b      void* esi = operator new(0x64);
0048157b      
00481582      if (esi == 0)
004815a2          esi = nullptr;
00481582      else
00481582      {
0048158e          *(uint32_t*)esi = *(uint32_t*)arg2;
00481594          *(uint32_t*)((char*)esi + 4) = 0;
0048159b          gmCGSkillsPage::tagSkillRecord::tagSkillRecord(((char*)esi + 8), arg3);
00481582      }
00481582      
004815af      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
004815d1          return 1;
004815d1      
004815b3      if (esi != 0)
004815b3      {
004815b8          gmCGSkillsPage::tagSkillRecord::~tagSkillRecord(((char*)esi + 8));
004815be          operator delete(esi);
004815b3      }
004815b3      
004815ca      return 0;
00481570  }

004815d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004815e0  void* __thiscall HashTable<unsigned int,gmCGSkillsPage::tagSkillRecord,0>::`scalar deleting destructor'(class HashTable<unsigned int,gmCGSkillsPage::tagSkillRecord,0>* this, uint32_t arg2)

004815e0  {
004815e9      this->vtable = 0x7a023c;
004815ef      IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>::delete_contents(&this->m_intrusiveTable);
004815f4      class HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord>** m_buckets = this->m_intrusiveTable.m_buckets;
004815e4      this->m_intrusiveTable.vtable = 0x7a0180;
004815e4      
00481602      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00481605          operator delete[](m_buckets);
00481605      
004815e4      this->m_intrusiveTable.m_buckets = nullptr;
004815e4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004815e4      this->m_intrusiveTable.m_numBuckets = 0;
004815e4      this->m_intrusiveTable.m_numElements = 0;
004815e4      
00481620      if ((arg2 & 1) != 0)
00481623          operator delete(this);
00481623      
0048162f      return this;
004815e0  }

00481632                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00481640  void __thiscall gmCGSkillsPage::gmCGSkillsPage(class gmCGSkillsPage* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00481640  {
0048164f      UIElement_Field::UIElement_Field(this, arg2, arg3);
00481654      this->vtable = &gmUrgentAssistanceUI::`vftable';
00481664      this->vtable = 0x7a0240;
0048166a      this->vtable = &gmUrgentAssistanceUI::`vftable';
00481674      gmCGSkillsPage::tagSkillRecord::tagSkillRecord(&this->m_tConstInit);
0048167b      this->m_pPlayerSystem = nullptr;
00481681      this->m_pSkillsListBox = nullptr;
0048168f      this->m_hashSkills.vtable = 0x7a023c;
00481699      IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>::IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>(&this->m_hashSkills.m_intrusiveTable, 0x17);
00481640  }

004816a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004816b0  class UIElement* __thiscall gmCGSkillsPage::DynamicCast(class gmCGSkillsPage* this, uint32_t arg2) __pure

004816b0  {
004816bc      if (arg2 == 0x1000003b)
004816c9          return this;
004816c9      
004816c3      int32_t edx_1;
004816c3      edx_1 = arg2 != 3;
004816c7      return (this & (edx_1 - 1));
004816b0  }

004816cc                                      90 90 90 90                                                              ....

004816d0  uint32_t gmCGSkillsPage::GetUIElementType(class gmCGSkillsPage const* this @ ecx) __pure

004816d0  {
004816d5      return 0x1000003b;
004816d0  }

004816d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004816e0  void __fastcall gmCGSkillsPage::~gmCGSkillsPage(class gmCGSkillsPage* this)

004816e0  {
004816ec      this->vtable = 0x7a0240;
004816e6      this->vtable = &gmUrgentAssistanceUI::`vftable';
004816f8      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004816f8      
00481701      if (eax != 0)
00481703          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
00481703      
00481713      this->m_hashSkills.vtable = 0x7a023c;
0048171d      IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>::delete_contents(&this->m_hashSkills.m_intrusiveTable);
00481722      class HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord>** m_buckets = this->m_hashSkills.m_intrusiveTable.m_buckets;
0048170b      this->m_hashSkills.m_intrusiveTable.vtable = 0x7a0180;
0048170b      
00481730      if (m_buckets != &this->m_hashSkills.m_intrusiveTable.m_aInplaceBuckets)
00481733          operator delete[](m_buckets);
00481733      
0048170b      this->m_hashSkills.m_intrusiveTable.m_buckets = nullptr;
0048170b      this->m_hashSkills.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0048170b      this->m_hashSkills.m_intrusiveTable.m_numBuckets = 0;
0048170b      this->m_hashSkills.m_intrusiveTable.m_numElements = 0;
0048174d      gmCGSkillsPage::tagSkillRecord::~tagSkillRecord(&this->m_tConstInit);
004816e6      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048175a      NoticeHandler::~NoticeHandler(&this->vtable);
00481765      /* tailcall */
00481765      return UIElement_Field::~UIElement_Field(this);
004816e0  }

0048176a                                90 90 90 90 90 90                                                            ......

00481770  class UIElement* gmCGSkillsPage::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00481770  {
00481775      void* eax = operator new(0x6f4);
00481775      
0048177f      if (eax == 0)
00481795          return 0;
00481795      
00481792      return gmCGSkillsPage::gmCGSkillsPage(eax, arg1, arg2);
00481770  }

00481796                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004817a0  void* __thiscall gmCGSkillsPage::`scalar deleting destructor'(class gmCGSkillsPage* this, uint32_t arg2)

004817a0  {
004817a3      gmCGSkillsPage::~gmCGSkillsPage(this);
004817a3      
004817ad      if ((arg2 & 1) != 0)
004817b0          operator delete(this);
004817b0      
004817bb      return this;
004817a0  }

004817be                                                                                            90 90                                ..

004817c0  void gmCGSkillsPage::Register()

004817c0  {
004817ca      UIElement::RegisterElementClass(0x1000003b, gmCGSkillsPage::Create);
004817c0  }

004817d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004817e0  void __fastcall gmCGSkillsPage::DoSkillRecords(class gmCGSkillsPage* this)

004817e0  {
004817e8      class gmCGSkillsPage* this_1 = this;
004817f2      class gmCGSkillsPage* this_2 = this_1;
004817f6      UIElement_ListBox::Flush(this_1->m_pSkillsListBox);
004817fb      int32_t var_184 = 0;
004819c4      class UIElement* var_150;
004819c4      void __return;
004819c4      bool cond:1_1;
004819c4      
004819c4      do
004819c4      {
00481803          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0048180d          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0048181a          StringInfo::StringInfo(&__return);
00481823          StringInfo::StringInfo(&var_150);
00481832          class UIElement* eax_2 = UIElement_ListBox::AddItemFromTemplateList(this_1->m_pSkillsListBox, 0, nullptr);
00481840          class UIElement* eax_3 = UIElement::GetChildRecursive(eax_2, 0x100002f6);
00481847          class UIElement_Text* ebp_1;
00481847          
00481847          if (eax_3 == 0)
00481859              ebp_1 = nullptr;
00481847          else
00481855              ebp_1 = eax_3->vtable->DynamicCast(0xc);
00481855          
00481866          if (var_184 == 0)
00481866          {
0048187d              StringInfo::SetStringIDandTableEnum(&__return, compute_str_hash("ID_CharGen_Specialized"), 0x10000002);
00481899              StringInfo::SetStringIDandTableEnum(&var_150, compute_str_hash("ID_CharGen_Specialized_Tooltip"), 0x10000002);
0048189e              this_1->m_pSpecEntry = eax_2;
00481866          }
00481866          else if (var_184 == 1)
004818ac          {
004818c3              StringInfo::SetStringIDandTableEnum(&__return, compute_str_hash("ID_CharGen_Trained"), 0x10000002);
004818df              StringInfo::SetStringIDandTableEnum(&var_150, compute_str_hash("ID_CharGen_Trained_Tooltip"), 0x10000002);
004818e4              this_1->m_pTrainedEntry = eax_2;
004818ac          }
004818ac          else if (var_184 != 2)
004818ef          {
00481944              StringInfo::SetStringIDandTableEnum(&__return, compute_str_hash("ID_CharGen_UnuseableUntrained"), 0x10000002);
00481960              StringInfo::SetStringIDandTableEnum(&var_150, compute_str_hash("ID_CharGen_UnuseableUntrained_To…"), 0x10000002);
00481965              this_1->m_pUnuseableUntrainedEntry = eax_2;
004818ef          }
004818ef          else
004818ef          {
00481906              StringInfo::SetStringIDandTableEnum(&__return, compute_str_hash("ID_CharGen_UseableUntrained"), 0x10000002);
00481922              StringInfo::SetStringIDandTableEnum(&var_150, compute_str_hash("ID_CharGen_UseableUntrained_Tool…"), 0x10000002);
00481927              this_1->m_pUseableUntrainedEntry = eax_2;
004818ef          }
004818ef          
00481975          UIElement_Text::SetStringInfo(ebp_1, &__return);
00481981          UIElement::SetTooltip(ebp_1, &var_150);
0048198a          StringInfo::~StringInfo(&var_150);
00481996          StringInfo::~StringInfo(&__return);
00481996          
004819ae          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
004819b6              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
004819b6          
004819bd          cond:1_1 = (var_184 + 1) < 4;
004819c0          var_184 += 1;
004819c4      } while (cond:1_1);
004819d0      IntrusiveHashTable<unsigned int,HashTableData<unsigned int,gmCGSkillsPage::tagSkillRecord> *,0>::delete_contents(&this_1->m_hashSkills.m_intrusiveTable);
004819db      class ClientCharGenState* eax_18 = CPlayerSystem::GetCharGenState(this_1->m_pPlayerSystem);
004819ec      class PackableHashTable<unsigned long,SkillBase>* edx_4 = &eax_18->skillTable->_skillBaseHash;
004819f3      class PackableHashTable<unsigned long,SkillBase>* var_17c = edx_4;
004819f7      class ListNode<SkillRecord *>* i = eax_18->skillRecordList._head;
004819f7      
00481a07      while (i != 0)
00481a07      {
00481a0d          uint32_t _table_size = edx_4->_table_size;
00481a12          class SkillRecord* data = i->data;
00481a12          
00481a14          if (_table_size != 0)
00481a14          {
00481a16              class PackableHashData<unsigned long,SkillBase>** _buckets = edx_4->_buckets;
00481a16              
00481a1b              if (_buckets != 0)
00481a1b              {
00481a1d                  uint32_t id_1 = data->id;
00481a26                  int32_t* edx_7 = _buckets[(COMBINE(0, id_1) % _table_size)];
00481a26                  
00481a2b                  if (edx_7 != 0)
00481a2b                  {
00481a32                      while (id_1 != *(uint32_t*)edx_7)
00481a32                      {
00481a38                          edx_7 = edx_7[0x18];
00481a38                          
00481a3d                          if (edx_7 == 0)
00481a3d                              break;
00481a32                      }
00481a2b                  }
00481a1b              }
00481a14          }
00481a14          
00481a4b          class UIElement* eax_22 = UIElement_ListBox::AddItemFromTemplateList(this_1->m_pSkillsListBox, 1, nullptr);
00481a4b          
00481a54          if (eax_22 != 0)
00481a54          {
00481a56              eax_22->vtable->SetState(1);
00481a6d              UIElement::SetAttribute_InstanceID(eax_22, 0x1000000a, data->id);
00481a79              class UIElement* eax_24 = UIElement::GetChildRecursive(eax_22, 0x10000301);
00481a79              
00481a80              if (eax_24 == 0)
00481a80                  break;
00481a80              
00481a8c              uint32_t id_3 = eax_24->vtable->DynamicCast(0xc);
00481a94              uint32_t id_2 = id_3;
00481a94              
00481a98              if (id_3 == 0)
00481a98                  break;
00481a98              
00481aa5              class UIElement* eax_25 = UIElement::GetChildRecursive(eax_22, 0x10000302);
00481aa5              
00481aac              if (eax_25 == 0)
00481aac                  break;
00481aac              
00481ab8              int32_t eax_26 = eax_25->vtable->DynamicCast(0xc);
00481ab8              
00481ac4              if (eax_26 == 0)
00481ac4                  break;
00481ac4              
00481ad1              class UIElement* eax_27 = UIElement::GetChildRecursive(eax_22, 0x10000303);
00481ad1              
00481ad8              if (eax_27 == 0)
00481ad8                  break;
00481ad8              
00481ae4              int32_t eax_28 = eax_27->vtable->DynamicCast(0xc);
00481ae4              
00481af0              if (eax_28 == 0)
00481af0                  break;
00481af0              
00481afd              class UIElement* eax_29 = UIElement::GetChildRecursive(eax_22, 0x10000306);
00481afd              
00481b04              if (eax_29 == 0)
00481b04                  break;
00481b04              
00481b10              int32_t eax_30 = eax_29->vtable->DynamicCast(0xc);
00481b10              
00481b1c              if (eax_30 == 0)
00481b1c                  break;
00481b1c              
00481b29              class UIElement* eax_31 = UIElement::GetChildRecursive(eax_22, 0x10000305);
00481b29              
00481b30              if (eax_31 == 0)
00481b30                  break;
00481b30              
00481b3c              int32_t eax_32 = eax_31->vtable->DynamicCast(1);
00481b3c              
00481b48              if (eax_32 == 0)
00481b48                  break;
00481b48              
00481b55              class UIElement* eax_33 = UIElement::GetChildRecursive(eax_22, 0x10000304);
00481b55              
00481b5c              if (eax_33 == 0)
00481b5c                  break;
00481b5c              
00481b68              int32_t eax_34 = eax_33->vtable->DynamicCast(1);
00481b68              
00481b72              if (eax_34 == 0)
00481b72                  break;
00481b72              
00481b7c              gmCGSkillsPage::tagSkillRecord::tagSkillRecord(&var_150);
00481b8d              int32_t var_14c_1 = eax_28;
00481b96              int32_t var_148_1 = eax_30;
00481ba0              var_150 = eax_22;
00481ba4              int32_t var_144_1 = eax_26;
00481ba8              int32_t var_13c_1 = eax_32;
00481bac              int32_t var_140_1 = eax_34;
00481bb0              class PStringBase<unsigned short> var_178;
00481bb0              class PStringBase<unsigned short>* eax_37;
00481bb0              void* esi_4;
00481bb0              eax_37 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_178, WidthConvert, data);
00481bba              void var_138;
00481bba              PStringBase<unsigned short>::operator=(&var_138, eax_37);
00481bc3              int32_t* edi_3 = (var_178 - 0x14);
00481bc3              
00481bd6              if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00481bde                  **(uint32_t**)edi_3(1);
00481bde              
00481be3              class CharGenState* edi_4 = eax_18;
00481bef              enum SKILL_ADVANCEMENT_CLASS var_114_1 = CharGenState::GetSkillLevel(edi_4, data->id);
00481bf6              uint32_t id = data->id;
00481c05              int32_t var_128_1 = CharGenState::GetSkillScore(edi_4, id);
00481c09              int32_t ecx_46 = *(uint32_t*)((char*)esi_4 + 0x10);
00481c10              int32_t edx_17 = *(uint32_t*)((char*)esi_4 + 0x14);
00481c1a              int32_t var_11c_1 = *(uint32_t*)((char*)esi_4 + 0x20);
00481c30              int32_t var_fc_1 = *(uint32_t*)((char*)esi_4 + 0x38);
00481c37              int32_t var_10c_1 = *(uint32_t*)((char*)esi_4 + 0x28);
00481c3e              int32_t var_108_1 = *(uint32_t*)((char*)esi_4 + 0x2c);
00481c45              int32_t var_104_1 = *(uint32_t*)((char*)esi_4 + 0x30);
00481c4c              int32_t var_100_1 = *(uint32_t*)((char*)esi_4 + 0x34);
00481c53              int32_t var_f8_1 = *(uint32_t*)((char*)esi_4 + 0x3c);
00481c5a              void* esi_5 = *(uint32_t*)((char*)esi_4 + 4);
00481c61              InterlockedIncrement(((char*)esi_5 + 4));
00481c71              void* var_160;
00481c71              class PStringBase<unsigned short>* eax_44;
00481c71              int32_t* esi_6;
00481c71              eax_44 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_160, WidthConvert, ((char*)esi_5 + 0x14));
00481c7b              void var_134;
00481c7b              PStringBase<unsigned short>::operator=(&var_134, eax_44);
00481c8a              int32_t* edi_7 = ((char*)var_160 - 0x14);
00481c8a              
00481c99              if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
00481ca1                  **(uint32_t**)edi_7(1);
00481ca1              
00481cac              if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_6 != 0))
00481cb4                  **(uint32_t**)esi_6(1);
00481cb4              
00481cbc              char var_117_1 = 1;
00481cc1              char var_118_1 = 1;
00481cc1              
00481cc6              if (ecx_46 == 0)
00481cc8                  char var_118_2 = 0;
00481cc8              
00481cd3              if (edx_17 == 0)
00481cd5                  char var_117_2 = 0;
00481cd5              
00481cf3              ACCharGenData::GetHG(eax_18->charGenData, &__return, eax_18->mHeritageGroup);
00481cff              int32_t edx_21 = 0;
00481d03              int32_t var_84;
00481d03              
00481d03              if (var_84 > 0)
00481d03              {
00481d10                  void* var_8c;
00481d10                  void* eax_52 = ((char*)var_8c + 8);
00481d10                  
00481d25                  do
00481d25                  {
00481d1d                      if (*(uint32_t*)((char*)eax_52 - 4) == id)
00481d1d                      {
00481d35                          if (*(uint32_t*)eax_52 == 0)
00481d35                          {
00481d3b                              int32_t var_120_2 = (edx_17 - ecx_46);
00481d3f                              int32_t var_124_2 = 0;
00481d43                              char var_118_3 = 0;
00481d35                          }
00481d35                          
00481d49                          if (*(uint32_t*)((char*)eax_52 + 4) == 0)
00481d49                          {
00481d4b                              int32_t var_120_3 = 0;
00481d4f                              char var_117_3 = 0;
00481d49                          }
00481d49                          
00481d49                          break;
00481d1d                      }
00481d1d                      
00481d1f                      edx_21 += 1;
00481d20                      eax_52 += 0x10;
00481d25                  } while (edx_21 < var_84);
00481d03              }
00481d03              
00481d5d              UIElement_Text::SetText(id_2, &var_138);
00481d62              this_1 = this_2;
00481d6d              gmCGSkillsPage::UpdateSkillEntry(this_1, &var_150);
00481d7f              id_2 = id;
00481d8a              HashTable<unsigned int,gmCGSkillsPage::tagSkillRecord,0>::add(&this_1->m_hashSkills, &id_2, &var_150);
00481d9d              i = i->next;
00481da1              HeritageGroup_CG::~HeritageGroup_CG(&__return);
00481daa              gmCGSkillsPage::tagSkillRecord::~tagSkillRecord(&var_150);
00481a54          }
00481a54          
004819fd          edx_4 = var_17c;
00481a07      }
004817e0  }

00481dbf                                                                                               90                                 .

00481dc0  void __fastcall gmCGSkillsPage::Update(class gmCGSkillsPage* this)

00481dc0  {
00481dc3      gmCGSkillsPage::DoSkillRecords(this);
00481dcb      /* tailcall */
00481dcb      return gmCGSkillsPage::UpdateAllTrainingValues(this);
00481dc0  }


00481dd0  void __thiscall gmCGSkillsPage::InitializePage(class gmCGSkillsPage* this, class gmCharGenMainUI* arg2)

00481dd0  {
00481dd7      this->m_pMainFramework = arg2;
00481ddd      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
00481de4      this->m_pPlayerSystem = eax;
00481dea      CPlayerSystem::GetCharGenState(eax);
00481df6      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x100003f7);
00481dfd      class UIElement_ListBox* eax_2;
00481dfd      
00481dfd      if (eax_1 == 0)
00481e0d          eax_2 = nullptr;
00481dfd      else
00481e05          eax_2 = eax_1->vtable->DynamicCast(5);
00481e05      
00481e16      this->m_pSkillsListBox = eax_2;
00481e1c      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x100002f3);
00481e23      class UIElement_Text* eax_4;
00481e23      
00481e23      if (eax_3 == 0)
00481e33          eax_4 = nullptr;
00481e23      else
00481e2b          eax_4 = eax_3->vtable->DynamicCast(0xc);
00481e2b      
00481e3c      this->m_pCreditsMeter = eax_4;
00481e42      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100003fb);
00481e49      class UIElement_Text* eax_6;
00481e49      
00481e49      if (eax_5 == 0)
00481e59          eax_6 = nullptr;
00481e49      else
00481e51          eax_6 = eax_5->vtable->DynamicCast(0xc);
00481e51      
00481e62      this->m_pInfoBoxTitle = eax_6;
00481e68      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x100003fc);
00481e6f      class UIElement_Text* eax_8;
00481e6f      
00481e6f      if (eax_7 == 0)
00481e7f          eax_8 = nullptr;
00481e6f      else
00481e77          eax_8 = eax_7->vtable->DynamicCast(0xc);
00481e77      
00481e83      this->m_pInfoBoxText = eax_8;
00481e89      gmCGSkillsPage::DoSkillRecords(this);
00481e90      gmCGSkillsPage::UpdateCreditsMeter(this);
00481dd0  }

00481e99                                                                             90 90 90 90 90 90 90                           .......

00481ea0  void __thiscall gmCGProfessionPage::gmCGProfessionPage(class gmCGProfessionPage* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00481ea0  {
00481eaf      UIElement_Field::UIElement_Field(this, arg2, arg3);
00481eb4      this->vtable = &gmUrgentAssistanceUI::`vftable';
00481ec0      this->vtable = &gmCGProfessionPage::`vftable';
00481ec6      this->vtable = &gmUrgentAssistanceUI::`vftable';
00481ed0      __builtin_memset(&this->m_pPlayerSystem, 0, 0x20);
00481f00      struct gmCGProfessionPage::tagSlider (* s)[0x7] = &this->m_tSliderArray;
00481f06      int32_t i_1 = 7;
00481f25      int32_t i;
00481f25      
00481f25      do
00481f25      {
00481f10          __builtin_memset(s, 0, 0x15);
00481f21          s = &*(uint168_t*)s[1];
00481f24          i = i_1;
00481f24          i_1 -= 1;
00481f25      } while (i != 1);
00481ea0  }

00481f0d                                         8d 49 00                                                               .I.
00481f2d                                         90 90 90                                                               ...

00481f30  class UIElement* __thiscall gmCGProfessionPage::DynamicCast(class gmCGProfessionPage* this, uint32_t arg2) __pure

00481f30  {
00481f3c      if (arg2 == 0x1000003a)
00481f49          return this;
00481f49      
00481f43      int32_t edx_1;
00481f43      edx_1 = arg2 != 3;
00481f47      return (this & (edx_1 - 1));
00481f30  }

00481f4c                                      90 90 90 90                                                              ....

00481f50  uint32_t gmCGProfessionPage::GetUIElementType(class gmCGProfessionPage const* this @ ecx) __pure

00481f50  {
00481f55      return 0x1000003a;
00481f50  }

00481f56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00481f60  class UIElement* gmCGProfessionPage::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00481f60  {
00481f65      void* eax = operator new(0x6c4);
00481f65      
00481f6f      if (eax == 0)
00481f85          return 0;
00481f85      
00481f82      return gmCGProfessionPage::gmCGProfessionPage(eax, arg1, arg2);
00481f60  }

00481f86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00481f90  int32_t __stdcall gmCGProfessionPage::GetSliderIndex(class gmCGProfessionPage* this @ ecx, class UIElement* arg2)

00481f90  {
00481f9a      int32_t ecx_1 = (arg2->m_desc.m_elementID - 0x100003e6);
00481f9a      
00481fa5      if (ecx_1 > 5)
00481fdb          return 0;
00481fdb      
00481fa7      switch (ecx_1)
00481fa7      {
00481fb3          case 0:
00481fb3          {
00481fb3              return 1;
00481fb3              break;
00481fb3          }
00481fbb          case 1:
00481fbb          {
00481fbb              return 2;
00481fbb              break;
00481fbb          }
00481fc3          case 2:
00481fc3          {
00481fc3              return 4;
00481fc3              break;
00481fc3          }
00481fcb          case 3:
00481fcb          {
00481fcb              return 3;
00481fcb              break;
00481fcb          }
00481fd3          case 4:
00481fd3          {
00481fd3              return 5;
00481fd3              break;
00481fd3          }
00481fd6          case 5:
00481fd6          {
00481fd6              return 6;
00481fd6              break;
00481fd6          }
00481fa7      }
00481f90  }

00481fde                                                                                            8b ff                                ..
00481fe0  uint32_t jump_table_481fe0[0x6] = 
00481fe0  {
00481fe0      [0x0] =  0x00481fae
00481fe4      [0x1] =  0x00481fb6
00481fe8      [0x2] =  0x00481fbe
00481fec      [0x3] =  0x00481fc6
00481ff0      [0x4] =  0x00481fce
00481ff4      [0x5] =  0x00481fd6
00481ff8  }

00481ff8                                                                          90 90 90 90 90 90 90 90                          ........

00482000  void __thiscall gmCGProfessionPage::SetLock(class gmCGProfessionPage* this, class UIElement* arg2)

00482000  {
00482010      int32_t esi = gmCGProfessionPage::GetSliderIndex(this, arg2);
00482019      int32_t eax;
00482019      eax = *(uint8_t*)((char*)this + (((esi * 3) + 0xc6) << 3));
0048201e      void* ebp = ((char*)this + (((esi * 3) + 0xc6) << 3));
0048201e      
00482021      if (eax == 0)
00482021      {
0048205a          int32_t eax_2 = (esi * 3);
00482062          class UIElement* ecx_3 = &*(uint32_t*)((char*)this->m_tSliderArray[0])[0xc][(eax_2 * 2)];
00482069          void* ebx_1 = ((char*)this + (eax_2 << 3));
00482071          arg2 = nullptr;
00482071          
00482080          if (UIElement::GetAttribute_Float(ecx_3, 0x86, &arg2) != 0)
00482080          {
00482082              int32_t* ecx_4 = *(uint32_t*)((char*)ebx_1 + 0x628);
00482082              
0048208a              if (ecx_4 != 0)
00482093                  *(uint32_t*)(*(uint32_t*)ecx_4 + 0x9c)(0x10000019);
00482080          }
00482080          
004820a6          *(uint32_t*)(**(uint32_t**)((char*)ebx_1 + 0x620) + 0x9c)(0x10000019);
004820ac          *(uint8_t*)ebp = 1;
00482021      }
00482021      else
00482021      {
00482023          int32_t edx_1 = (esi * 3);
00482026          int32_t* ecx_1 = &*(uint32_t*)((char*)this->m_tSliderArray[0])[0xc][(edx_1 * 2)];
00482026          
00482032          if (ecx_1 != 0)
0048203b              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x9c)(0x10000018);
0048203b          
00482041          &*(uint32_t*)((char*)this->m_tSliderArray[0])[4][(edx_1 * 2)]->vtable->SetState(0x10000018);
00482054          *(uint8_t*)ebp = 0;
00482021      }
00482021      
004820c3      CharGenState::LockAttribute(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), esi, ((uint32_t)*(uint8_t*)ebp));
00482000  }

004820cf                                               90                                                                 .

004820d0  void __fastcall gmCGProfessionPage::ClearLocks(class gmCGProfessionPage* this)

004820d0  {
004820e2      CharGenState::ResetAttributeLock(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem));
004820e7      struct gmCGProfessionPage::tagSlider* esi = &this->m_tSliderArray[1];
004820ed      int32_t i_1 = 6;
00482107      int32_t i;
00482107      
00482107      do
00482107      {
004820f7          if (esi->bLocked != 0)
004820fe              gmCGProfessionPage::SetLock(this, esi->pAttribField);
004820fe          
00482103          esi = &esi[1];
00482106          i = i_1;
00482106          i_1 -= 1;
00482107      } while (i != 1);
004820d0  }

0048210d                                         90 90 90                                                               ...

00482110  int32_t __fastcall PStringBase<unsigned short>::to_float(class PStringBase<unsigned short> const* this)

00482110  {
00482111      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
0048211c      *(uint32_t*)_errno() = 0;
0048212c      return wcstod(m_charbuffer, 0);
00482110  }

0048212d                                         90 90 90                                                               ...

00482130  void* __thiscall gmCGProfessionPage::`scalar deleting destructor'(class gmCGProfessionPage* this, uint32_t arg2)

00482130  {
0048213a      this->vtable = &gmCGProfessionPage::`vftable';
00482134      this->vtable = &gmUrgentAssistanceUI::`vftable';
00482146      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
00482146      
0048214d      if (eax != 0)
0048214f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0048214f      
00482134      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048215f      NoticeHandler::~NoticeHandler(&this->vtable);
00482166      UIElement_Field::~UIElement_Field(this);
00482166      
00482170      if ((arg2 & 1) != 0)
00482173          operator delete(this);
00482173      
0048217f      return this;
00482130  }

00482182        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00482190  void gmCGProfessionPage::Register()

00482190  {
0048219a      UIElement::RegisterElementClass(0x1000003a, gmCGProfessionPage::Create);
00482190  }

004821a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004821b0  void __fastcall gmCGProfessionPage::UpdateProfession(class gmCGProfessionPage* this)

004821b0  {
004821bb      class UIElement_Button* m_pCurProfButton = this->m_pCurProfButton;
004821bb      
004821c3      if (m_pCurProfButton != 0)
004821c5          m_pCurProfButton->vtable->SetState(0x10000016);
004821c5      
004821d9      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x100003d8);
004821eb      int32_t template_ = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->template_;
004821f5      void var_90;
004821f5      StringInfo::StringInfo(&var_90);
004821fd      class UIElement* ebx;
004821fd      
004821fd      if (template_ <= 6)
004821fd      {
00482203          char const* const var_a4_1;
00482203          
00482203          switch (template_)
00482203          {
0048221f              case 0:
0048221f              {
0048221f                  ebx = UIElement::GetChildRecursive(this, 0x100003d9);
00482216                  eax_2->vtable->SetState(0x1000002b);
00482227                  int32_t var_a0_1 = 0x10000002;
0048222c                  var_a4_1 = "ID_CharGen_CustomText";
0048221f                  break;
0048221f              }
00482242              case 1:
00482242              {
00482242                  ebx = UIElement::GetChildRecursive(this, 0x100003da);
00482244                  eax_2->vtable->SetState(0x1000002c);
00482253                  int32_t var_a0_2 = 0x10000002;
00482258                  var_a4_1 = "ID_CharGen_BowText";
00482242                  break;
00482242              }
0048231e              case 2:
0048231e              {
0048231e                  ebx = UIElement::GetChildRecursive(this, 0x100003df);
00482315                  eax_2->vtable->SetState(0x10000031);
00482326                  int32_t var_a0_7 = 0x10000002;
0048232b                  var_a4_1 = "ID_CharGen_SwashText";
0048231e                  break;
0048231e              }
00482277              case 3:
00482277              {
00482277                  ebx = UIElement::GetChildRecursive(this, 0x100003db);
0048226e                  eax_2->vtable->SetState(0x1000002d);
0048227f                  int32_t var_a0_3 = 0x10000002;
00482284                  var_a4_1 = "ID_CharGen_LifeText";
00482277                  break;
00482277              }
0048229a              case 4:
0048229a              {
0048229a                  ebx = UIElement::GetChildRecursive(this, 0x100003dc);
0048229c                  eax_2->vtable->SetState(0x1000002e);
004822ab                  int32_t var_a0_4 = 0x10000002;
004822b0                  var_a4_1 = "ID_CharGen_WarText";
0048229a                  break;
0048229a              }
004822cc              case 5:
004822cc              {
004822cc                  ebx = UIElement::GetChildRecursive(this, 0x100003dd);
004822c3                  eax_2->vtable->SetState(0x1000002f);
004822d4                  int32_t var_a0_5 = 0x10000002;
004822d9                  var_a4_1 = "ID_CharGen_WayText";
004822cc                  break;
004822cc              }
004822ec              case 6:
004822ec              {
004822ec                  ebx = UIElement::GetChildRecursive(this, 0x100003de);
004822ee                  eax_2->vtable->SetState(0x10000030);
004822fd                  int32_t var_a0_6 = 0x10000002;
00482302                  var_a4_1 = "ID_CharGen_SoldierText";
004822ec                  break;
004822ec              }
00482203          }
00482203          
0048233d          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(var_a4_1), 0x10000002);
004821fd      }
004821fd      
00482344      class UIElement_Button* eax_16;
00482344      
00482344      if ((template_ > 6 || ebx == 0))
00482354          eax_16 = nullptr;
00482344      else
0048234c          eax_16 = ebx->vtable->DynamicCast(1);
0048234c      
00482356      this->m_pCurProfButton = eax_16;
0048235c      eax_16->vtable->SetState(0x10000017);
00482376      UIElement_Text::SetStringInfo(this->m_pTextBox, &var_90);
0048237f      StringInfo::~StringInfo(&var_90);
004821b0  }

0048238e                                            8b ff                                                                ..
00482390  uint32_t jump_table_482390[0x7] = 
00482390  {
00482390      [0x0] =  0x0048220a
00482394      [0x1] =  0x00482236
00482398      [0x2] =  0x00482309
0048239c      [0x3] =  0x00482262
004823a0      [0x4] =  0x0048228e
004823a4      [0x5] =  0x004822b7
004823a8      [0x6] =  0x004822e0
004823ac  }

004823ac                                      90 90 90 90                                                              ....

004823b0  class UIElement_Scrollbar* __thiscall UIElement::<class UIElement_Scrollbar>::GetChildRecursiveTemplate(UIElement::<class UIElement_Scrollbar>* this, unsigned long arg2)

004823b0  {
004823b5      class UIElement* eax = UIElement::GetChildRecursive(this, arg2);
004823b5      
004823bc      if (eax == 0)
004823d2          return 0;
004823d2      
004823c0      arg2 = 0xb;
004823ca      /* jump -> eax->vtable->DynamicCast */
004823b0  }

004823d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004823e0  void __thiscall PStringBase<unsigned short>::append_uint32(class PStringBase<unsigned short>* this, uint32_t arg2)

004823e0  {
004823e0      class PStringBase<unsigned short>* var_4 = this;
004823e1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004823e7      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004823f1      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004823fb      uint32_t var_c_1 = arg2;
00482406      PStringBase<unsigned short>::sprintf(&var_4, &data_7a0644);
0048240b      class PStringBase<unsigned short>* ecx = var_4;
0048240f      int32_t m_charbuffer = ecx->m_charbuffer;
0048240f      
00482418      if (m_charbuffer != 1)
00482418      {
0048241f          PStringBase<unsigned short>::append_n_chars(this, ecx, (m_charbuffer - 1));
00482424          ecx = var_4;
00482418      }
00482418      
0048243b      if ((InterlockedDecrement(&ecx[-4]) == 0 && ecx != 0x14))
00482443          *(uint32_t*)*(int32_t*)((char*)ecx + -0x14)(1);
004823e0  }

0048244a                                90 90 90 90 90 90                                                            ......

00482450  void __fastcall gmCGProfessionPage::UpdateAttributeValues(class gmCGProfessionPage* this)

00482450  {
00482462      class ClientCharGenState* eax;
00482462      int32_t ecx_1;
00482462      eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
00482471      uint32_t i = 1;
00482476      class UIElement_Scrollbar** ebp_1 = &this->m_tSliderArray[1].pSlider;
0048254a      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_13;
0048254a      
0048254a      do
0048254a      {
00482485          int32_t eax_1 = CharGenState::GetAttribute(eax, i);
0048248c          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00482491          PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_1;
0048249d          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0048249f          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004824a4          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_12 = PStringBase<unsigned short>::s_NullBuffer_2;
004824ac          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004824ae          int32_t var_2c_4 = eax_1;
004824b9          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_12, &data_79ed80);
004824be          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_14 = PStringBase<unsigned short>::s_NullBuffer_12;
004824c2          int32_t eax_4 = PStringBase<unsigned short>::s_NullBuffer_14->m_data[0x7ffffffffffffffe];
004824c2          
004824cb          if (eax_4 != 1)
004824cb          {
004824d4              PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_13, PStringBase<unsigned short>::s_NullBuffer_14, (eax_4 - 1));
004824d9              PStringBase<unsigned short>::s_NullBuffer_14 = PStringBase<unsigned short>::s_NullBuffer_12;
004824cb          }
004824cb          
004824f0          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_14->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_14 != 0x14))
004824f8              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_14 + -0x14)(1);
004824f8          
0048250b          int32_t var_2c_8 = UIElement_Text::SetText(ADJ(ebp_1)->m_tSliderArray[1].pAttibValue, &PStringBase<unsigned short>::s_NullBuffer_13);
0048251d          UIElement::SetAttribute_Float(ADJ(ebp_1)->m_tSliderArray[1].pSlider, 0x86, ((float)(((long double)eax_1) * ((long double)0.00999999978f))));
00482526          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_4 = &PStringBase<unsigned short>::s_NullBuffer_13->m_data[-0xa];
00482526          
00482539          if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
00482541              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
00482541          
00482543          i += 1;
00482544          ebp_1 = &ebp_1[6];
0048254a      } while (i < 7);
0048254a      
00482550      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00482555      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_3;
0048255d      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0048255f      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
00482568      int32_t remainingAtrbCredits = eax->remainingAtrbCredits;
0048256e      PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_4;
00482576      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
00482578      int32_t remainingAtrbCredits_1 = remainingAtrbCredits;
00482583      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_13, &data_7a0644);
00482588      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_15 = PStringBase<unsigned short>::s_NullBuffer_13;
0048258c      int32_t eax_10 = PStringBase<unsigned short>::s_NullBuffer_15->m_data[0x7ffffffffffffffe];
0048258c      
00482595      if (eax_10 != 1)
00482595      {
0048259e          PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_11, PStringBase<unsigned short>::s_NullBuffer_15, (eax_10 - 1));
004825a3          PStringBase<unsigned short>::s_NullBuffer_15 = PStringBase<unsigned short>::s_NullBuffer_13;
00482595      }
00482595      
004825bc      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_15->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_15 != 0x14))
004825c4          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_15 + -0x14)(1);
004825c4      
004825d5      UIElement_Text::SetText(this->m_pAvailableValue, &PStringBase<unsigned short>::s_NullBuffer_11);
004825da      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_19 = PStringBase<unsigned short>::s_NullBuffer_11;
004825da      
004825e4      if (PStringBase<unsigned short>::s_NullBuffer_19 != PStringBase<unsigned short>::s_NullBuffer)
004825e4      {
004825f5          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_19->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_19 != 0x14))
004825fd              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_19 + -0x14)(1);
004825fd          
004825ff          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
00482604          PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_5;
0048260c          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
004825e4      }
004825e4      
00482612      CharGenState::GetAttribute(eax, 2);
0048262b      int32_t eax_17 = _ftol2();
00482632      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer;
00482637      PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_6;
0048263f      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_6->m_data[-8]);
00482641      int32_t var_2c_19 = eax_17;
0048264c      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_13, &data_7a0644);
00482651      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_16 = PStringBase<unsigned short>::s_NullBuffer_13;
00482655      int32_t eax_19 = PStringBase<unsigned short>::s_NullBuffer_16->m_data[0x7ffffffffffffffe];
00482655      
0048265e      if (eax_19 != 1)
0048265e      {
00482667          PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_11, PStringBase<unsigned short>::s_NullBuffer_16, (eax_19 - 1));
0048266c          PStringBase<unsigned short>::s_NullBuffer_16 = PStringBase<unsigned short>::s_NullBuffer_13;
0048265e      }
0048265e      
0048267f      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_16->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_16 != 0x14))
00482687          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_16 + -0x14)(1);
00482687      
00482698      UIElement_Text::SetText(this->m_pHealthValue, &PStringBase<unsigned short>::s_NullBuffer_11);
0048269d      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_20 = PStringBase<unsigned short>::s_NullBuffer_11;
0048269d      
004826a7      if (PStringBase<unsigned short>::s_NullBuffer_20 != PStringBase<unsigned short>::s_NullBuffer)
004826a7      {
004826b8          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_20->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_20 != 0x14))
004826c0              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_20 + -0x14)(1);
004826c0          
004826c2          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer;
004826c7          PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_7;
004826cf          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_7->m_data[-8]);
004826a7      }
004826a7      
004826d5      int32_t eax_26 = CharGenState::GetAttribute(eax, 2);
004826dc      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer;
004826e1      PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_8;
004826e9      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_8->m_data[-8]);
004826eb      int32_t var_2c_26 = eax_26;
004826f6      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_13, &data_7a0644);
004826fb      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_17 = PStringBase<unsigned short>::s_NullBuffer_13;
004826ff      int32_t eax_28 = PStringBase<unsigned short>::s_NullBuffer_17->m_data[0x7ffffffffffffffe];
004826ff      
00482708      if (eax_28 != 1)
00482708      {
00482711          PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_11, PStringBase<unsigned short>::s_NullBuffer_17, (eax_28 - 1));
00482716          PStringBase<unsigned short>::s_NullBuffer_17 = PStringBase<unsigned short>::s_NullBuffer_13;
00482708      }
00482708      
00482729      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_17->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_17 != 0x14))
00482731          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_17 + -0x14)(1);
00482731      
00482742      UIElement_Text::SetText(this->m_pStaminaValue, &PStringBase<unsigned short>::s_NullBuffer_11);
00482747      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_21 = PStringBase<unsigned short>::s_NullBuffer_11;
00482747      
00482751      if (PStringBase<unsigned short>::s_NullBuffer_21 != PStringBase<unsigned short>::s_NullBuffer)
00482751      {
00482762          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_21->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_21 != 0x14))
0048276a              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_21 + -0x14)(1);
0048276a          
0048276c          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer;
00482771          PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_9;
00482779          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_9->m_data[-8]);
00482751      }
00482751      
0048277f      int32_t eax_34 = CharGenState::GetAttribute(eax, 6);
00482786      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer;
0048278b      PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_10;
00482793      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_10->m_data[-8]);
00482795      int32_t var_2c_33 = eax_34;
004827a0      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_13, &data_7a0644);
004827a5      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_18 = PStringBase<unsigned short>::s_NullBuffer_13;
004827a9      int32_t eax_36 = PStringBase<unsigned short>::s_NullBuffer_18->m_data[0x7ffffffffffffffe];
004827a9      
004827b3      if (eax_36 != 1)
004827b3      {
004827bc          PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_11, PStringBase<unsigned short>::s_NullBuffer_18, (eax_36 - 1));
004827c1          PStringBase<unsigned short>::s_NullBuffer_18 = PStringBase<unsigned short>::s_NullBuffer_13;
004827b3      }
004827b3      
004827d4      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_18->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_18 != 0x14))
004827dc          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_18 + -0x14)(1);
004827dc      
004827ed      UIElement_Text::SetText(this->m_pManaValue, &PStringBase<unsigned short>::s_NullBuffer_11);
004827f4      CharGenState::FitTemplateToCharacter(eax);
004827fb      gmCGProfessionPage::UpdateProfession(this);
00482804      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &PStringBase<unsigned short>::s_NullBuffer_11->m_data[-0xa];
00482804      
00482813      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0048281b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00482450  }

00482824              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00482830  void __fastcall gmCGProfessionPage::Update(class gmCGProfessionPage* this)

00482830  {
00482840      CharGenState::FitTemplateToCharacter(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem));
00482847      gmCGProfessionPage::UpdateProfession(this);
0048284f      /* tailcall */
0048284f      return gmCGProfessionPage::UpdateAttributeValues(this);
00482830  }

00482854                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00482860  void __fastcall gmCGProfessionPage::UpdateToDefaultAttributes(class gmCGProfessionPage* this)

00482860  {
00482863      gmCGProfessionPage::ClearLocks(this);
00482875      CharGenState::FitTemplateToCharacter(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem));
0048287c      gmCGProfessionPage::UpdateProfession(this);
00482884      /* tailcall */
00482884      return gmCGProfessionPage::UpdateAttributeValues(this);
00482860  }

00482889                             90 90 90 90 90 90 90                                                           .......

00482890  void __thiscall gmCGProfessionPage::SetAttribValue(class gmCGProfessionPage* this, class UIElement* arg2, int32_t arg3)

00482890  {
00482890      class gmCGProfessionPage* this_1 = this;
004828a1      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004828af      int32_t eax_2 = gmCGProfessionPage::GetSliderIndex(this, arg2);
004828b9      int32_t eax_3 = CharGenState::GetAttribute(eax, eax_2);
004828be      int32_t edi_1 = arg3;
004828be      
004828c6      if (((edi_1 - eax_3) >= 0 && (edi_1 - eax_3) > CharGenState::GetAbsRemainingCredits(eax, eax_2)))
004828e6          edi_1 = (CharGenState::GetAttribute(eax, eax_2) + CharGenState::GetAbsRemainingCredits(eax, eax_2));
004828e6      
004828ee      if ((eax_2 - 1) <= 5)
004828f4          switch (eax_2)
004828f4          {
00482900              case 1:
00482900              {
00482900                  CharGenState::SetStrength(eax, edi_1, 1);
00482909                  gmCGProfessionPage::UpdateAttributeValues(this);
00482913                  return;
00482900                  break;
00482900              }
0048291b              case 2:
0048291b              {
0048291b                  CharGenState::SetEndurance(eax, edi_1, 1);
00482924                  gmCGProfessionPage::UpdateAttributeValues(this);
0048292e                  return;
0048291b                  break;
0048291b              }
00482951              case 3:
00482951              {
00482951                  CharGenState::SetQuickness(eax, edi_1, 1);
0048295a                  gmCGProfessionPage::UpdateAttributeValues(this);
00482964                  return;
00482951                  break;
00482951              }
00482936              case 4:
00482936              {
00482936                  CharGenState::SetCoordination(eax, edi_1, 1);
0048293f                  gmCGProfessionPage::UpdateAttributeValues(this);
00482949                  return;
00482936                  break;
00482936              }
0048296c              case 5:
0048296c              {
0048296c                  CharGenState::SetFocus(eax, edi_1, 1);
00482975                  gmCGProfessionPage::UpdateAttributeValues(this);
0048297f                  return;
0048296c                  break;
0048296c              }
00482987              case 6:
00482987              {
00482987                  CharGenState::SetSelf(eax, edi_1, 1);
00482987                  break;
00482987              }
004828f4          }
004828f4      
00482990      gmCGProfessionPage::UpdateAttributeValues(this);
00482890  }

0048299d                                                                                         8d 49 00                               .I.
004829a0  uint32_t jump_table_4829a0[0x6] = 
004829a0  {
004829a0      [0x0] =  0x004828fb
004829a4      [0x1] =  0x00482916
004829a8      [0x2] =  0x0048294c
004829ac      [0x3] =  0x00482931
004829b0      [0x4] =  0x00482967
004829b4      [0x5] =  0x00482982
004829b8  }

004829b8                                                                          90 90 90 90 90 90 90 90                          ........

004829c0  enum UIElementMessageListenResult __thiscall gmCGProfessionPage::ListenToElementMessage(class gmCGProfessionPage* this, struct UIElementMessageInfo const* arg2)

004829c0  {
004829c5      struct UIElementMessageInfo* esi = arg2;
004829c5      
004829e6      switch ((esi->idElement - 0x100002ec))
004829e6      {
004829f1          case nullptr:
004829f1          {
004829f1              if (esi->idMessage == 1)
00482a05                  gmCGProfessionPage::SetLock(this, esi->pElement->vtable->GetParent());
004829f1              break;
004829f1          }
00482a20          case 2:
00482a20          {
00482a20              if (esi->idMessage == 0xa)
00482a20              {
00482a29                  esi->dwParam1;
00482a26                  esi->dwParam1;
00482a41                  int32_t ebx = _ftol2();
00482a41                  
00482a46                  if (ebx < 0xa)
00482a48                      ebx = 0xa;
00482a48                  
00482a5c                  gmCGProfessionPage::SetAttribValue(this, esi->pElement->vtable->GetParent(), ebx);
00482a20              }
00482a20              break;
00482a20          }
00482a73          case 3:
00482a73          {
00482a73              uint32_t idMessage = esi->idMessage;
00482a73              
00482a79              if (idMessage == 0x2f)
00482a79              {
00482a84                  class UIElement* pElement = esi->pElement;
00482a84                  
00482a89                  if (esi->dwParam1 != 0)
00482a89                  {
00482a95                      UIElement_Text::SelectAll(pElement->vtable->DynamicCast(0xc));
00482aa9                      return UIElement::ListenToElementMessage(this, esi);
00482a89                  }
00482a89                  
00482aae                  class UIElement_Text* eax_13 = pElement->vtable->DynamicCast(0xc);
00482abb                  class UIElement* eax_15 = esi->pElement->vtable->GetParent();
00482ad1                  void __return;
00482ad1                  int32_t eax_17 = PStringBase<unsigned short>::to_uint32(UIElement_Text::GetText(eax_13, &__return));
00482ad9                  int32_t ebx_2;
00482ad9                  
00482ad9                  if (eax_17 <= 0x64)
00482ad9                  {
00482ae5                      ebx_2 = 0xa;
00482ae5                      
00482aea                      if (eax_17 >= 0xa)
00482aec                          ebx_2 = eax_17;
00482ad9                  }
00482ad9                  else
00482adb                      ebx_2 = 0x64;
00482adb                  
00482af2                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00482afb                  gmCGProfessionPage::SetAttribValue(this, eax_15, ebx_2);
00482b0f                  return UIElement::ListenToElementMessage(this, esi);
00482a79              }
00482a79              
00482b1a              if ((idMessage == 0x12 || idMessage == 0x44))
00482b1a              {
00482b27                  class UIElement_Text* eax_19 = esi->pElement->vtable->DynamicCast(0xc);
00482b34                  UIElement::<class UIElement_Scrollbar>* eax_21 = esi->pElement->vtable->GetParent();
00482b43                  UIElement_Text::GetText(eax_19, &arg2);
00482b4f                  class UIElement_Scrollbar* eax_22 = UIElement::<class UIElement_Scrollbar>::GetChildRecursiveTemplate(eax_21, 0x100002ee);
00482b4f                  
00482b58                  if (eax_22 != 0)
00482b58                  {
00482b73                      int32_t var_24_1 = PStringBase<unsigned short>::to_float(&arg2);
00482b8f                      long double x87_r0;
00482b8f                      UIElement::SetAttribute_Float(eax_22, 0x85, ((float)MathLib::Clamp(((float)(x87_r0 * ((long double)0.00999999978f))), 0.100000001f, 1f)));
00482b58                  }
00482b58                  
00482b98                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00482b1a              }
00482a73              break;
00482a73          }
00482bb3          case 0xed:
00482bb3          {
00482bb3              if (esi->idMessage == 1)
00482bb3              {
00482bb5                  int32_t var_1c_7 = 1;
00482c0e                  CharGenState::SetTemplate(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 0, 1);
00482c15                  gmCGProfessionPage::UpdateToDefaultAttributes(this);
00482bb3              }
00482bb3              break;
00482bb3          }
00482bbf          case 0xee:
00482bbf          {
00482bbf              if (esi->idMessage == 1)
00482bbf              {
00482bc1                  int32_t var_1c_8 = 1;
00482c0e                  CharGenState::SetTemplate(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 1, 1);
00482c15                  gmCGProfessionPage::UpdateToDefaultAttributes(this);
00482bbf              }
00482bbf              break;
00482bbf          }
00482bcb          case 0xef:
00482bcb          {
00482bcb              if (esi->idMessage == 1)
00482bcb              {
00482bcd                  int32_t var_1c_9 = 1;
00482c0e                  CharGenState::SetTemplate(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 3, 1);
00482c15                  gmCGProfessionPage::UpdateToDefaultAttributes(this);
00482bcb              }
00482bcb              break;
00482bcb          }
00482bd7          case 0xf0:
00482bd7          {
00482bd7              if (esi->idMessage == 1)
00482bd7              {
00482bd9                  int32_t var_1c_10 = 1;
00482c0e                  CharGenState::SetTemplate(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 4, 1);
00482c15                  gmCGProfessionPage::UpdateToDefaultAttributes(this);
00482bd7              }
00482bd7              break;
00482bd7          }
00482be3          case 0xf1:
00482be3          {
00482be3              if (esi->idMessage == 1)
00482be3              {
00482be5                  int32_t var_1c_11 = 1;
00482c0e                  CharGenState::SetTemplate(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 5, 1);
00482c15                  gmCGProfessionPage::UpdateToDefaultAttributes(this);
00482be3              }
00482be3              break;
00482be3          }
00482bef          case 0xf2:
00482bef          {
00482bef              if (esi->idMessage == 1)
00482bef              {
00482bf1                  int32_t var_1c_12 = 1;
00482c0e                  CharGenState::SetTemplate(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 6, 1);
00482c15                  gmCGProfessionPage::UpdateToDefaultAttributes(this);
00482bef              }
00482bef              break;
00482bef          }
00482bfb          case 0xf3:
00482bfb          {
00482bfb              if (esi->idMessage == 1)
00482bfb              {
00482bfd                  int32_t var_1c_13 = 1;
00482c0e                  CharGenState::SetTemplate(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 2, 1);
00482c15                  gmCGProfessionPage::UpdateToDefaultAttributes(this);
00482bfb              }
00482bfb              break;
00482bfb          }
004829e6      }
004829e6      
00482c29      return UIElement::ListenToElementMessage(this, esi);
004829c0  }

00482c2c  uint32_t jump_table_482c2c[0xb] = 
00482c2c  {
00482c2c      [0x0] =  0x004829ed
00482c30      [0x1] =  0x00482a1c
00482c34      [0x2] =  0x00482a73
00482c38      [0x3] =  0x00482baf
00482c3c      [0x4] =  0x00482bbb
00482c40      [0x5] =  0x00482bc7
00482c44      [0x6] =  0x00482bd3
00482c48      [0x7] =  0x00482bdf
00482c4c      [0x8] =  0x00482beb
00482c50      [0x9] =  0x00482bf7
00482c54      [0xa] =  0x00482c1a
00482c58  }
00482c58  uint8_t lookup_table_482c58[0xf4] = 
00482c58  {
00482c58      [0x00] =  0x00
00482c59      [0x01] =  0x0a
00482c5a      [0x02] =  0x01
00482c5b      [0x03] =  0x02
00482c5c      [0x04] =  0x0a
00482c5d      [0x05] =  0x0a
00482c5e      [0x06] =  0x0a
00482c5f      [0x07] =  0x0a
00482c60      [0x08] =  0x0a
00482c61      [0x09] =  0x0a
00482c62      [0x0a] =  0x0a
00482c63      [0x0b] =  0x0a
00482c64      [0x0c] =  0x0a
00482c65      [0x0d] =  0x0a
00482c66      [0x0e] =  0x0a
00482c67      [0x0f] =  0x0a
00482c68      [0x10] =  0x0a
00482c69      [0x11] =  0x0a
00482c6a      [0x12] =  0x0a
00482c6b      [0x13] =  0x0a
00482c6c      [0x14] =  0x0a
00482c6d      [0x15] =  0x0a
00482c6e      [0x16] =  0x0a
00482c6f      [0x17] =  0x0a
00482c70      [0x18] =  0x0a
00482c71      [0x19] =  0x0a
00482c72      [0x1a] =  0x0a
00482c73      [0x1b] =  0x0a
00482c74      [0x1c] =  0x0a
00482c75      [0x1d] =  0x0a
00482c76      [0x1e] =  0x0a
00482c77      [0x1f] =  0x0a
00482c78      [0x20] =  0x0a
00482c79      [0x21] =  0x0a
00482c7a      [0x22] =  0x0a
00482c7b      [0x23] =  0x0a
00482c7c      [0x24] =  0x0a
00482c7d      [0x25] =  0x0a
00482c7e      [0x26] =  0x0a
00482c7f      [0x27] =  0x0a
00482c80      [0x28] =  0x0a
00482c81      [0x29] =  0x0a
00482c82      [0x2a] =  0x0a
00482c83      [0x2b] =  0x0a
00482c84      [0x2c] =  0x0a
00482c85      [0x2d] =  0x0a
00482c86      [0x2e] =  0x0a
00482c87      [0x2f] =  0x0a
00482c88      [0x30] =  0x0a
00482c89      [0x31] =  0x0a
00482c8a      [0x32] =  0x0a
00482c8b      [0x33] =  0x0a
00482c8c      [0x34] =  0x0a
00482c8d      [0x35] =  0x0a
00482c8e      [0x36] =  0x0a
00482c8f      [0x37] =  0x0a
00482c90      [0x38] =  0x0a
00482c91      [0x39] =  0x0a
00482c92      [0x3a] =  0x0a
00482c93      [0x3b] =  0x0a
00482c94      [0x3c] =  0x0a
00482c95      [0x3d] =  0x0a
00482c96      [0x3e] =  0x0a
00482c97      [0x3f] =  0x0a
00482c98      [0x40] =  0x0a
00482c99      [0x41] =  0x0a
00482c9a      [0x42] =  0x0a
00482c9b      [0x43] =  0x0a
00482c9c      [0x44] =  0x0a
00482c9d      [0x45] =  0x0a
00482c9e      [0x46] =  0x0a
00482c9f      [0x47] =  0x0a
00482ca0      [0x48] =  0x0a
00482ca1      [0x49] =  0x0a
00482ca2      [0x4a] =  0x0a
00482ca3      [0x4b] =  0x0a
00482ca4      [0x4c] =  0x0a
00482ca5      [0x4d] =  0x0a
00482ca6      [0x4e] =  0x0a
00482ca7      [0x4f] =  0x0a
00482ca8      [0x50] =  0x0a
00482ca9      [0x51] =  0x0a
00482caa      [0x52] =  0x0a
00482cab      [0x53] =  0x0a
00482cac      [0x54] =  0x0a
00482cad      [0x55] =  0x0a
00482cae      [0x56] =  0x0a
00482caf      [0x57] =  0x0a
00482cb0      [0x58] =  0x0a
00482cb1      [0x59] =  0x0a
00482cb2      [0x5a] =  0x0a
00482cb3      [0x5b] =  0x0a
00482cb4      [0x5c] =  0x0a
00482cb5      [0x5d] =  0x0a
00482cb6      [0x5e] =  0x0a
00482cb7      [0x5f] =  0x0a
00482cb8      [0x60] =  0x0a
00482cb9      [0x61] =  0x0a
00482cba      [0x62] =  0x0a
00482cbb      [0x63] =  0x0a
00482cbc      [0x64] =  0x0a
00482cbd      [0x65] =  0x0a
00482cbe      [0x66] =  0x0a
00482cbf      [0x67] =  0x0a
00482cc0      [0x68] =  0x0a
00482cc1      [0x69] =  0x0a
00482cc2      [0x6a] =  0x0a
00482cc3      [0x6b] =  0x0a
00482cc4      [0x6c] =  0x0a
00482cc5      [0x6d] =  0x0a
00482cc6      [0x6e] =  0x0a
00482cc7      [0x6f] =  0x0a
00482cc8      [0x70] =  0x0a
00482cc9      [0x71] =  0x0a
00482cca      [0x72] =  0x0a
00482ccb      [0x73] =  0x0a
00482ccc      [0x74] =  0x0a
00482ccd      [0x75] =  0x0a
00482cce      [0x76] =  0x0a
00482ccf      [0x77] =  0x0a
00482cd0      [0x78] =  0x0a
00482cd1      [0x79] =  0x0a
00482cd2      [0x7a] =  0x0a
00482cd3      [0x7b] =  0x0a
00482cd4      [0x7c] =  0x0a
00482cd5      [0x7d] =  0x0a
00482cd6      [0x7e] =  0x0a
00482cd7      [0x7f] =  0x0a
00482cd8      [0x80] =  0x0a
00482cd9      [0x81] =  0x0a
00482cda      [0x82] =  0x0a
00482cdb      [0x83] =  0x0a
00482cdc      [0x84] =  0x0a
00482cdd      [0x85] =  0x0a
00482cde      [0x86] =  0x0a
00482cdf      [0x87] =  0x0a
00482ce0      [0x88] =  0x0a
00482ce1      [0x89] =  0x0a
00482ce2      [0x8a] =  0x0a
00482ce3      [0x8b] =  0x0a
00482ce4      [0x8c] =  0x0a
00482ce5      [0x8d] =  0x0a
00482ce6      [0x8e] =  0x0a
00482ce7      [0x8f] =  0x0a
00482ce8      [0x90] =  0x0a
00482ce9      [0x91] =  0x0a
00482cea      [0x92] =  0x0a
00482ceb      [0x93] =  0x0a
00482cec      [0x94] =  0x0a
00482ced      [0x95] =  0x0a
00482cee      [0x96] =  0x0a
00482cef      [0x97] =  0x0a
00482cf0      [0x98] =  0x0a
00482cf1      [0x99] =  0x0a
00482cf2      [0x9a] =  0x0a
00482cf3      [0x9b] =  0x0a
00482cf4      [0x9c] =  0x0a
00482cf5      [0x9d] =  0x0a
00482cf6      [0x9e] =  0x0a
00482cf7      [0x9f] =  0x0a
00482cf8      [0xa0] =  0x0a
00482cf9      [0xa1] =  0x0a
00482cfa      [0xa2] =  0x0a
00482cfb      [0xa3] =  0x0a
00482cfc      [0xa4] =  0x0a
00482cfd      [0xa5] =  0x0a
00482cfe      [0xa6] =  0x0a
00482cff      [0xa7] =  0x0a
00482d00      [0xa8] =  0x0a
00482d01      [0xa9] =  0x0a
00482d02      [0xaa] =  0x0a
00482d03      [0xab] =  0x0a
00482d04      [0xac] =  0x0a
00482d05      [0xad] =  0x0a
00482d06      [0xae] =  0x0a
00482d07      [0xaf] =  0x0a
00482d08      [0xb0] =  0x0a
00482d09      [0xb1] =  0x0a
00482d0a      [0xb2] =  0x0a
00482d0b      [0xb3] =  0x0a
00482d0c      [0xb4] =  0x0a
00482d0d      [0xb5] =  0x0a
00482d0e      [0xb6] =  0x0a
00482d0f      [0xb7] =  0x0a
00482d10      [0xb8] =  0x0a
00482d11      [0xb9] =  0x0a
00482d12      [0xba] =  0x0a
00482d13      [0xbb] =  0x0a
00482d14      [0xbc] =  0x0a
00482d15      [0xbd] =  0x0a
00482d16      [0xbe] =  0x0a
00482d17      [0xbf] =  0x0a
00482d18      [0xc0] =  0x0a
00482d19      [0xc1] =  0x0a
00482d1a      [0xc2] =  0x0a
00482d1b      [0xc3] =  0x0a
00482d1c      [0xc4] =  0x0a
00482d1d      [0xc5] =  0x0a
00482d1e      [0xc6] =  0x0a
00482d1f      [0xc7] =  0x0a
00482d20      [0xc8] =  0x0a
00482d21      [0xc9] =  0x0a
00482d22      [0xca] =  0x0a
00482d23      [0xcb] =  0x0a
00482d24      [0xcc] =  0x0a
00482d25      [0xcd] =  0x0a
00482d26      [0xce] =  0x0a
00482d27      [0xcf] =  0x0a
00482d28      [0xd0] =  0x0a
00482d29      [0xd1] =  0x0a
00482d2a      [0xd2] =  0x0a
00482d2b      [0xd3] =  0x0a
00482d2c      [0xd4] =  0x0a
00482d2d      [0xd5] =  0x0a
00482d2e      [0xd6] =  0x0a
00482d2f      [0xd7] =  0x0a
00482d30      [0xd8] =  0x0a
00482d31      [0xd9] =  0x0a
00482d32      [0xda] =  0x0a
00482d33      [0xdb] =  0x0a
00482d34      [0xdc] =  0x0a
00482d35      [0xdd] =  0x0a
00482d36      [0xde] =  0x0a
00482d37      [0xdf] =  0x0a
00482d38      [0xe0] =  0x0a
00482d39      [0xe1] =  0x0a
00482d3a      [0xe2] =  0x0a
00482d3b      [0xe3] =  0x0a
00482d3c      [0xe4] =  0x0a
00482d3d      [0xe5] =  0x0a
00482d3e      [0xe6] =  0x0a
00482d3f      [0xe7] =  0x0a
00482d40      [0xe8] =  0x0a
00482d41      [0xe9] =  0x0a
00482d42      [0xea] =  0x0a
00482d43      [0xeb] =  0x0a
00482d44      [0xec] =  0x0a
00482d45      [0xed] =  0x03
00482d46      [0xee] =  0x04
00482d47      [0xef] =  0x05
00482d48      [0xf0] =  0x06
00482d49      [0xf1] =  0x07
00482d4a      [0xf2] =  0x08
00482d4b      [0xf3] =  0x09
00482d4c  }

00482d4c                                      90 90 90 90                                                              ....

00482d50  void __thiscall gmCGProfessionPage::InitializePage(class gmCGProfessionPage* this, class gmCharGenMainUI* arg2)

00482d50  {
00482d57      int32_t ebx;
00482d57      int32_t var_30 = ebx;
00482d5d      this->m_pMainFramework = arg2;
00482d6f      this->m_pPlayerSystem = CPlayerSystem::GetPlayerSystem();
00482d75      class UIElement** esi = &this->m_tSliderArray[1];
00482d87      *(uint32_t*)esi = UIElement::GetChildRecursive(this, 0x100003e6);
00482d95      this->m_tSliderArray[2].pAttribField = UIElement::GetChildRecursive(this, 0x100003e7);
00482da7      this->m_tSliderArray[3].pAttribField = UIElement::GetChildRecursive(this, 0x100003e9);
00482db9      this->m_tSliderArray[4].pAttribField = UIElement::GetChildRecursive(this, 0x100003e8);
00482dcb      this->m_tSliderArray[5].pAttribField = UIElement::GetChildRecursive(this, 0x100003ea);
00482ddc      this->m_tSliderArray[6].pAttribField = UIElement::GetChildRecursive(this, 0x100003eb);
00482de2      uint32_t var_28 = 1;
00482f83      bool cond:0_1;
00482f83      
00482f83      do
00482f83      {
00482df7          class UIElement* eax_8 = UIElement::GetChildRecursive(*(uint32_t*)esi, 0x100002ec);
00482dfe          int32_t eax_9;
00482dfe          
00482dfe          if (eax_8 == 0)
00482e0e              eax_9 = 0;
00482dfe          else
00482e06              eax_9 = eax_8->vtable->DynamicCast(1);
00482e06          
00482e10          class UIElement* ecx_8 = *(uint32_t*)esi;
00482e17          esi[1] = eax_9;
00482e1a          class UIElement* eax_10 = UIElement::GetChildRecursive(ecx_8, 0x100002ed);
00482e21          void* const eax_11;
00482e21          
00482e21          if (eax_10 == 0)
00482e31              eax_11 = nullptr;
00482e21          else
00482e29              eax_11 = eax_10->vtable->DynamicCast(0xc);
00482e29          
00482e33          esi[2] = eax_11;
00482e36          *(uint32_t*)((char*)eax_11 + 0x6a0) = NumberInputFilter;
00482e47          class UIElement* eax_12 = UIElement::GetChildRecursive(*(uint32_t*)esi, 0x100002ee);
00482e4e          int32_t eax_13;
00482e4e          
00482e4e          if (eax_12 == 0)
00482e5e              eax_13 = 0;
00482e4e          else
00482e56              eax_13 = eax_12->vtable->DynamicCast(0xb);
00482e56          
00482e60          class UIElement* ecx_12 = *(uint32_t*)esi;
00482e67          esi[3] = eax_13;
00482e6a          class UIElement* eax_14 = UIElement::GetChildRecursive(ecx_12, 0x100002ef);
00482e71          int32_t eax_15;
00482e71          
00482e71          if (eax_14 == 0)
00482e81              eax_15 = 0;
00482e71          else
00482e79              eax_15 = eax_14->vtable->DynamicCast(0xc);
00482e79          
00482e87          esi[4] = eax_15;
00482e9d          void var_20;
00482e9d          CharGenState::GetAttributeName(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), var_28, &var_20);
00482ea2          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00482ea7          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
00482eaf          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00482eb1          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00482eb6          arg2 = PStringBase<char>::s_NullBuffer_1;
00482ebe          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00482ec9          PStringBase<char>::set(&arg2, &var_20);
00482ede          void* __return;
00482ede          class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<char>::to_wpstring(&arg2, &__return, 0)->m_charbuffer;
00482ee0          int32_t ecx_19 = m_charbuffer->m_data[0x7ffffffffffffffe];
00482ee0          
00482ee6          if (ecx_19 != 1)
00482eef              PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_2, m_charbuffer, (ecx_19 - 1));
00482eef          
00482ef8          int32_t* ebx_3 = ((char*)__return - 0x14);
00482ef8          
00482f0b          if ((InterlockedDecrement(&ebx_3[1]) == 0 && ebx_3 != 0))
00482f13              **(uint32_t**)ebx_3(1);
00482f13          
00482f1d          UIElement_Text::SetText(esi[2], &PStringBase<unsigned short>::s_NullBuffer_2);
00482f22          esi[1]->vtable->SetState(0x10000018);
00482f36          void* __offset(gmCharGenMainUI, -0x14) ebx_5 = ((char*)arg2 - 0x14);
00482f36          
00482f49          if ((InterlockedDecrement(((char*)ebx_5 + 4)) == 0 && ebx_5 != 0))
00482f51              *(uint32_t*)*(int32_t*)((char*)ADJ(ebx_5) + -0x14)(1);
00482f51          
00482f57          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) ebx_7 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
00482f57          
00482f6a          if ((InterlockedDecrement(((char*)ebx_7 + 4)) == 0 && ebx_7 != 0))
00482f72              *(uint32_t*)*(int32_t*)((char*)ADJ(ebx_7) + -0x14)(1);
00482f72          
00482f79          esi = &esi[6];
00482f7c          cond:0_1 = (var_28 + 1) < 7;
00482f7f          var_28 += 1;
00482f83      } while (cond:0_1);
00482f90      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x100003e2);
00482f97      class UIElement* eax_28;
00482f97      
00482f97      if (eax_27 != 0)
00482fa0          eax_28 = UIElement::GetChildRecursive(eax_27, 0x100002f1);
00482fa0      
00482fa7      class UIElement_Text* eax_29;
00482fa7      
00482fa7      if ((eax_27 == 0 || eax_28 == 0))
00482fb7          eax_29 = nullptr;
00482fa7      else
00482faf          eax_29 = eax_28->vtable->DynamicCast(0xc);
00482faf      
00482fc0      this->m_pAvailableValue = eax_29;
00482fc6      class UIElement* eax_30 = UIElement::GetChildRecursive(this, 0x100003e3);
00482fcd      class UIElement* eax_31;
00482fcd      
00482fcd      if (eax_30 != 0)
00482fd6          eax_31 = UIElement::GetChildRecursive(eax_30, 0x100002f3);
00482fd6      
00482fdd      class UIElement_Text* eax_32;
00482fdd      
00482fdd      if ((eax_30 == 0 || eax_31 == 0))
00482fed          eax_32 = nullptr;
00482fdd      else
00482fe5          eax_32 = eax_31->vtable->DynamicCast(0xc);
00482fe5      
00482ff6      this->m_pHealthValue = eax_32;
00482ffc      class UIElement* eax_33 = UIElement::GetChildRecursive(this, 0x100003e4);
00483003      class UIElement* eax_34;
00483003      
00483003      if (eax_33 != 0)
0048300c          eax_34 = UIElement::GetChildRecursive(eax_33, 0x100002f3);
0048300c      
00483013      class UIElement_Text* eax_35;
00483013      
00483013      if ((eax_33 == 0 || eax_34 == 0))
00483023          eax_35 = nullptr;
00483013      else
0048301b          eax_35 = eax_34->vtable->DynamicCast(0xc);
0048301b      
0048302c      this->m_pStaminaValue = eax_35;
00483032      class UIElement* eax_36 = UIElement::GetChildRecursive(this, 0x100003e5);
00483039      class UIElement* eax_37;
00483039      
00483039      if (eax_36 != 0)
00483042          eax_37 = UIElement::GetChildRecursive(eax_36, 0x100002f3);
00483042      
00483049      class UIElement_Text* eax_38;
00483049      
00483049      if ((eax_36 == 0 || eax_37 == 0))
00483059          eax_38 = nullptr;
00483049      else
00483051          eax_38 = eax_37->vtable->DynamicCast(0xc);
00483051      
00483062      this->m_pManaValue = eax_38;
00483068      class UIElement* eax_39 = UIElement::GetChildRecursive(this, 0x100003e0);
0048306f      class UIElement_Text* eax_40;
0048306f      
0048306f      if (eax_39 == 0)
0048307f          eax_40 = nullptr;
0048306f      else
00483077          eax_40 = eax_39->vtable->DynamicCast(0xc);
00483077      
00483083      this->m_pTextBox = eax_40;
00483089      gmCGProfessionPage::UpdateProfession(this);
00482d50  }

00483098                                                                          90 90 90 90 90 90 90 90                          ........

004830a0  void __thiscall gmCGHeritagePage::gmCGHeritagePage(class gmCGHeritagePage* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004830a0  {
004830af      UIElement_Field::UIElement_Field(this, arg2, arg3);
004830b4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004830c0      this->m_pPlayerSystem = nullptr;
004830c6      __builtin_memset(&this->m_pAluButton, 0, 0x38);
0048311a      this->vtable = 0x7a0a08;
00483120      this->vtable = &gmUrgentAssistanceUI::`vftable';
004830a0  }


00483130  class UIElement* __thiscall gmCGHeritagePage::DynamicCast(class gmCGHeritagePage* this, uint32_t arg2) __pure

00483130  {
0048313c      if (arg2 == 0x10000039)
00483149          return this;
00483149      
00483143      int32_t edx_1;
00483143      edx_1 = arg2 != 3;
00483147      return (this & (edx_1 - 1));
00483130  }

0048314c                                      90 90 90 90                                                              ....

00483150  uint32_t gmCGHeritagePage::GetUIElementType(class gmCGHeritagePage const* this @ ecx) __pure

00483150  {
00483155      return 0x10000039;
00483150  }

00483156                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00483160  class UIElement* gmCGHeritagePage::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00483160  {
00483165      void* eax = operator new(0x640);
00483165      
0048316f      if (eax == 0)
00483185          return 0;
00483185      
00483182      return gmCGHeritagePage::gmCGHeritagePage(eax, arg1, arg2);
00483160  }

00483186                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00483190  void* __thiscall gmCGHeritagePage::`scalar deleting destructor'(class gmCGHeritagePage* this, uint32_t arg2)

00483190  {
0048319a      this->vtable = 0x7a0a08;
00483194      this->vtable = &gmUrgentAssistanceUI::`vftable';
004831a6      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004831a6      
004831ad      if (eax != 0)
004831af          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004831af      
00483194      this->vtable = &gmUrgentAssistanceUI::`vftable';
004831bf      NoticeHandler::~NoticeHandler(&this->vtable);
004831c6      UIElement_Field::~UIElement_Field(this);
004831c6      
004831d0      if ((arg2 & 1) != 0)
004831d3          operator delete(this);
004831d3      
004831df      return this;
00483190  }

004831e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004831f0  void gmCGHeritagePage::Register()

004831f0  {
004831fa      UIElement::RegisterElementClass(0x10000039, gmCGHeritagePage::Create);
004831f0  }

00483203           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00483210  void __fastcall gmCGHeritagePage::Update(class gmCGHeritagePage* this)

00483210  {
00483219      this->m_pAluButton->vtable->SetState(0x10000016);
0048322d      this->m_pGhuButton->vtable->SetState(0x10000016);
00483240      this->m_pShoButton->vtable->SetState(0x10000016);
00483253      this->m_pViaButton->vtable->SetState(0x10000016);
00483266      this->m_pShadButton->vtable->SetState(0x10000016);
00483279      this->m_pPenButton->vtable->SetState(0x10000016);
0048328c      this->m_pGearButton->vtable->SetState(0x10000016);
0048329f      this->m_pUndButton->vtable->SetState(0x10000016);
004832b2      this->m_pEmpButton->vtable->SetState(0x10000016);
004832c5      this->m_pAunTButton->vtable->SetState(0x10000016);
004832d8      this->m_pLugButton->vtable->SetState(0x10000016);
004832eb      this->m_pOlthoiButton->vtable->SetState(0x10000016);
004832fe      this->m_pOlthoiAcidButton->vtable->SetState(0x10000016);
0048331c      uint32_t mHeritageGroup = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->mHeritageGroup;
00483329      void var_120;
00483329      StringInfo::StringInfo(&var_120);
00483335      void var_90;
00483335      StringInfo::StringInfo(&var_90);
0048333e      void var_1b0;
0048333e      StringInfo::StringInfo(&var_1b0);
0048335d      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_Heritage_StartingSkil…"), 0x10000002);
00483374      UIElement_Text::SetStringInfoWithFont(this->m_pText, &var_90, 0, 1);
00483390      StringInfo::SetStringIDandTableEnum(&var_1b0, compute_str_hash("ID_CharGen_Heritage_StartingSkil…"), 0x10000002);
004833a4      UIElement_Text::AppendStringInfoWithFont(this->m_pText, &var_1b0, 0, 0);
004833c3      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_Heritage_BonusSkills_…"), 0x10000002);
004833da      UIElement_Text::AppendStringInfoWithFont(this->m_pText, &var_90, 0, 1);
004833da      
004833e3      if ((mHeritageGroup - 1) <= 0xc)
004833e3      {
004834aa          void (__thiscall** const var_1c4_3)(class gmNoticeHandler* this, uint32_t);
004834aa          
004834aa          switch (mHeritageGroup)
004834aa          {
004833f0              case 1:
004833f0              {
004833f0                  int32_t var_1c0_1 = 0x10000002;
004833f5                  var_1c4_3 = "ID_CharGen_AluvianText_BonusSkil…";
004833f0                  break;
004833f0              }
004833ff              case 2:
004833ff              {
004833ff                  int32_t var_1c0_2 = 0x10000002;
00483404                  var_1c4_3 = "ID_CharGen_GaruText_BonusSkills_…";
004833ff                  break;
004833ff              }
0048340b              case 3:
0048340b              {
0048340b                  int32_t var_1c0_3 = 0x10000002;
00483410                  var_1c4_3 = "ID_CharGen_ShoText_BonusSkills_T…";
0048340b                  break;
0048340b              }
00483417              case 4:
00483417              {
00483417                  int32_t var_1c0_4 = 0x10000002;
0048341c                  var_1c4_3 = "ID_CharGen_ViaText_BonusSkills_T…";
00483417                  break;
00483417              }
00483423              case 5:
00483423              case 0xa:
00483423              {
00483423                  int32_t var_1c0_5 = 0x10000002;
00483428                  var_1c4_3 = "ID_CharGen_ShadText_BonusSkills_…";
00483423                  break;
00483423              }
0048342f              case 6:
0048342f              {
0048342f                  int32_t var_1c0_6 = 0x10000002;
00483434                  var_1c4_3 = "ID_CharGen_GearText_BonusSkills_…";
0048342f                  break;
0048342f              }
00483453              case 7:
00483453              {
00483453                  int32_t var_1c0_9 = 0x10000002;
00483458                  var_1c4_3 = "ID_CharGen_AunTText_BonusSkills_…";
00483453                  break;
00483453              }
0048345f              case 8:
0048345f              {
0048345f                  int32_t var_1c0_10 = 0x10000002;
00483464                  var_1c4_3 = &gmCGHeritagePage::`vftable'.RecvNotice_OpenVendor;
0048345f                  break;
0048345f              }
00483447              case 9:
00483447              {
00483447                  int32_t var_1c0_8 = 0x10000002;
0048344c                  var_1c4_3 = "ID_CharGen_EmpText_BonusSkills_T…";
00483447                  break;
00483447              }
0048343b              case 0xb:
0048343b              {
0048343b                  int32_t var_1c0_7 = 0x10000002;
00483440                  var_1c4_3 = "ID_CharGen_UndText_BonusSkills_T…";
0048343b                  break;
0048343b              }
0048346b              case 0xc:
0048346b              {
0048346b                  int32_t var_1c0_11 = 0x10000002;
00483470                  var_1c4_3 = &gmCGHeritagePage::`vftable'.RecvNotice_StackSliderChanged;
0048346b                  break;
0048346b              }
00483477              case 0xd:
00483477              {
00483477                  int32_t var_1c0_12 = 0x10000002;
0048347c                  var_1c4_3 = &gmCGHeritagePage::`vftable'.RecvNotice_NewParentContainer;
00483477                  break;
00483477              }
004834aa          }
004834aa          
0048348e          StringInfo::SetStringIDandTableEnum(&var_1b0, compute_str_hash(var_1c4_3), 0x10000002);
004833e3      }
004833e3      
004834a2      UIElement_Text::AppendStringInfoWithFont(this->m_pText, &var_1b0, 0, 0);
004834a2      
004834aa      if ((mHeritageGroup - 1) <= 0xc)
004834aa      {
004834aa          void (__thiscall** const var_1c4_5)(class gmNoticeHandler* this, uint32_t);
004834aa          int32_t var_1c0_17;
004834aa          
004834aa          switch (mHeritageGroup)
004834aa          {
004834c4              case 1:
004834c4              {
004834b7                  this->m_pAluButton->vtable->SetState(0x10000017);
004834ca                  this->m_pBackground->vtable->SetState(0x10000021);
004834dd                  int32_t var_1c0_13 = 0x10000002;
004834e2                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_FillComponentBuyList;
004834c4                  break;
004834c4              }
004834f9              case 2:
004834f9              {
004834ec                  this->m_pGhuButton->vtable->SetState(0x10000017);
004834ff                  this->m_pBackground->vtable->SetState(0x10000022);
00483512                  int32_t var_1c0_14 = 0x10000002;
00483517                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_TradeFailure;
004834f9                  break;
004834f9              }
0048352e              case 3:
0048352e              {
00483521                  this->m_pShoButton->vtable->SetState(0x10000017);
00483534                  this->m_pBackground->vtable->SetState(0x10000023);
00483547                  int32_t var_1c0_15 = 0x10000002;
0048354c                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_OpenTrade;
0048352e                  break;
0048352e              }
00483563              case 4:
00483563              {
00483556                  this->m_pViaButton->vtable->SetState(0x10000017);
00483569                  this->m_pBackground->vtable->SetState(0x10000024);
0048357c                  int32_t var_1c0_16 = 0x10000002;
00483581                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_AcceptTrade;
00483563                  break;
00483563              }
00483598              case 5:
00483598              {
0048358b                  this->m_pShadButton->vtable->SetState(0x10000017);
0048359e                  var_1c0_17 = 0x10000058;
004835c5              label_4835c5:
004835bd                  this->m_pBackground->vtable->SetState(var_1c0_17);
004835cb                  int32_t var_1c0_18 = 0x10000002;
004835d0                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_SetDisplayContractTracker;
00483598                  break;
00483598              }
004835e7              case 6:
004835e7              {
004835da                  this->m_pGearButton->vtable->SetState(0x10000017);
004835ed                  this->m_pBackground->vtable->SetState(0x1000005a);
00483600                  int32_t var_1c0_19 = 0x10000002;
00483605                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_ChatCommand_AddFriend;
004835e7                  break;
004835e7              }
00483686              case 7:
00483686              {
00483679                  this->m_pAunTButton->vtable->SetState(0x10000017);
0048368c                  this->m_pBackground->vtable->SetState(0x1000005f);
0048369f                  int32_t var_1c0_22 = 0x10000002;
004836a4                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_LastSpellSelection;
00483686                  break;
00483686              }
004836bb              case 8:
004836bb              {
004836ae                  this->m_pLugButton->vtable->SetState(0x10000017);
004836c1                  this->m_pBackground->vtable->SetState(0x10000060);
004836d4                  int32_t var_1c0_23 = 0x10000002;
004836d9                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_CastCurrentSpell;
004836bb                  break;
004836bb              }
00483651              case 9:
00483651              {
00483644                  this->m_pEmpButton->vtable->SetState(0x10000017);
00483657                  this->m_pBackground->vtable->SetState(0x1000005c);
0048366a                  int32_t var_1c0_21 = 0x10000002;
0048366f                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_PrevSpellTab;
00483651                  break;
00483651              }
004835b2              case 0xa:
004835b2              {
004835a5                  this->m_pPenButton->vtable->SetState(0x10000017);
004835b8                  var_1c0_17 = 0x10000059;
004835b8                  goto label_4835c5;
004835b2              }
0048361c              case 0xb:
0048361c              {
0048360f                  this->m_pUndButton->vtable->SetState(0x10000017);
00483622                  this->m_pBackground->vtable->SetState(0x1000005b);
00483635                  int32_t var_1c0_20 = 0x10000002;
0048363a                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_UpdateSpellComponents;
0048361c                  break;
0048361c              }
004836ed              case 0xc:
004836ed              {
004836e0                  this->m_pOlthoiButton->vtable->SetState(0x10000017);
004836f3                  this->m_pBackground->vtable->SetState(0x1000005d);
00483706                  int32_t var_1c0_24 = 0x10000002;
0048370b                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_SetGroundObject;
004836ed                  break;
004836ed              }
0048371f              case 0xd:
0048371f              {
00483712                  this->m_pOlthoiAcidButton->vtable->SetState(0x10000017);
00483725                  this->m_pBackground->vtable->SetState(0x1000005e);
00483738                  int32_t var_1c0_25 = 0x10000002;
0048373d                  var_1c4_5 = &gmCGHeritagePage::`vftable'.RecvNotice_AddSalvageItem;
0048371f                  break;
0048371f              }
004834aa          }
004834aa          
00483752          StringInfo::SetStringIDandTableEnum(&var_120, compute_str_hash(var_1c4_5), 0x10000002);
004834aa      }
004834aa      
0048376a      class PStringBase<unsigned short> var_1b4;
0048376a      PStringBase<unsigned short>::allocate_ref_buffer(&var_1b4, wcslen(&data_79c288));
00483779      wcscpy(var_1b4, &data_79c288);
0048378d      UIElement_Text::AppendText(this->m_pText, &var_1b4);
00483796      int32_t* edi_2 = (var_1b4 - 0x14);
00483796      
004837a9      if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004837b1          **(uint32_t**)edi_2(1);
004837b1      
004837c5      UIElement_Text::AppendStringInfoWithFont(this->m_pText, &var_120, 0, 0);
004837ce      StringInfo::~StringInfo(&var_1b0);
004837da      StringInfo::~StringInfo(&var_90);
004837e6      StringInfo::~StringInfo(&var_120);
00483210  }

004837f4  uint32_t jump_table_4837f4[0xd] = 
004837f4  {
004837f4      [0x0] =  0x004833f0
004837f8      [0x1] =  0x004833ff
004837fc      [0x2] =  0x0048340b
00483800      [0x3] =  0x00483417
00483804      [0x4] =  0x00483423
00483808      [0x5] =  0x0048342f
0048380c      [0x6] =  0x00483453
00483810      [0x7] =  0x0048345f
00483814      [0x8] =  0x00483447
00483818      [0x9] =  0x00483423
0048381c      [0xa] =  0x0048343b
00483820      [0xb] =  0x0048346b
00483824      [0xc] =  0x00483477
00483828  }
00483828  uint32_t jump_table_483828[0xd] = 
00483828  {
00483828      [0x0] =  0x004834b7
0048382c      [0x1] =  0x004834ec
00483830      [0x2] =  0x00483521
00483834      [0x3] =  0x00483556
00483838      [0x4] =  0x0048358b
0048383c      [0x5] =  0x004835da
00483840      [0x6] =  0x00483679
00483844      [0x7] =  0x004836ae
00483848      [0x8] =  0x00483644
0048384c      [0x9] =  0x004835a5
00483850      [0xa] =  0x0048360f
00483854      [0xb] =  0x004836e0
00483858      [0xc] =  0x00483712
0048385c  }

0048385c                                                                                      90 90 90 90                              ....

00483860  enum UIElementMessageListenResult __thiscall gmCGHeritagePage::ListenToElementMessage(class gmCGHeritagePage* this, struct UIElementMessageInfo const* arg2)

00483860  {
00483866      uint32_t idElement = arg2->idElement;
00483866      
0048386f      if (idElement > 0x100005a9)
0048386f      {
00483945          if ((idElement - 0x100005bf) <= 0x32)
00483945              switch (idElement)
00483945              {
00483959                  case 0x100005bf:
00483959                  {
00483959                      if (arg2->idMessage == 1)
00483959                      {
0048399c                          CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 0xb);
004839a3                          gmCGHeritagePage::Update(this);
00483959                      }
00483959                      break;
00483959                  }
00483963                  case 0x100005c4:
00483963                  {
00483963                      if (arg2->idMessage == 1)
00483963                      {
0048399c                          CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 9);
004839a3                          gmCGHeritagePage::Update(this);
00483963                      }
00483963                      break;
00483963                  }
00483981                  case 0x100005c7:
00483981                  {
00483981                      if (arg2->idMessage == 1)
00483981                      {
0048399c                          CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 0xc);
004839a3                          gmCGHeritagePage::Update(this);
00483981                      }
00483981                      break;
00483981                  }
0048398b                  case 0x100005c8:
0048398b                  {
0048398b                      if (arg2->idMessage == 1)
0048398b                      {
0048399c                          CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 0xd);
004839a3                          gmCGHeritagePage::Update(this);
0048398b                      }
0048398b                      break;
0048398b                  }
0048396d                  case 0x100005e8:
0048396d                  {
0048396d                      if (arg2->idMessage == 1)
0048396d                      {
0048399c                          CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 7);
004839a3                          gmCGHeritagePage::Update(this);
0048396d                      }
0048396d                      break;
0048396d                  }
00483977                  case 0x100005f1:
00483977                  {
00483977                      if (arg2->idMessage == 1)
00483977                      {
0048399c                          CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 8);
004839a3                          gmCGHeritagePage::Update(this);
00483977                      }
00483977                      break;
00483977                  }
00483945              }
0048386f      }
0048386f      else if (idElement == 0x100005a9)
00483875      {
00483937          if (arg2->idMessage == 1)
00483937          {
0048399c              CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 6);
004839a3              gmCGHeritagePage::Update(this);
00483937          }
00483875      }
00483875      else if (idElement > 0x100003c3)
00483880      {
00483912          if (idElement == 0x10000590)
00483912          {
0048392d              if (arg2->idMessage == 1)
0048392d              {
0048399c                  CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 5);
004839a3                  gmCGHeritagePage::Update(this);
0048392d              }
00483912          }
00483912          else if ((idElement == 0x10000591 && arg2->idMessage == 1))
0048391f          {
0048399c              CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 0xa);
004839a3              gmCGHeritagePage::Update(this);
0048391f          }
00483880      }
00483880      else if (idElement == 0x100003c3)
00483886      {
004838d2          if (arg2->idMessage == 1)
004838d2          {
004838e5              if (CPlayerSystem::AccountHasThroneOfDestiny(this->m_pPlayerSystem) == 0)
004838e5              {
004838f4                  gmCharGenMainUI::MakeToDWarningDialog(this->m_pMainFramework);
004838fb                  gmCGHeritagePage::Update(this);
0048390a                  return UIElement::ListenToElementMessage(this, arg2);
004838e5              }
004838e5              
0048399c              CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 4);
004839a3              gmCGHeritagePage::Update(this);
004838d2          }
00483886      }
00483886      else if (idElement == 0x100003bf)
0048388d      {
004838c1          if (arg2->idMessage == 1)
004838c1          {
0048399c              CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 1);
004839a3              gmCGHeritagePage::Update(this);
004838c1          }
0048388d      }
0048388d      else if (idElement == 0x100003c1)
00483892      {
004838b0          if (arg2->idMessage == 1)
004838b0          {
0048399c              CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 2);
004839a3              gmCGHeritagePage::Update(this);
004838b0          }
00483892      }
00483892      else if ((idElement == 0x100003c2 && arg2->idMessage == 1))
0048389f      {
0048399c          CharGenState::SetHeritageGroup(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), 3);
004839a3          gmCGHeritagePage::Update(this);
0048389f      }
0048389f      
004839b2      return UIElement::ListenToElementMessage(this, arg2);
00483860  }

004839b5                                                                 8d 49 00                                               .I.
004839b8  uint32_t jump_table_4839b8[0x7] = 
004839b8  {
004839b8      [0x0] =  0x00483955
004839bc      [0x1] =  0x0048395f
004839c0      [0x2] =  0x0048397d
004839c4      [0x3] =  0x00483987
004839c8      [0x4] =  0x00483969
004839cc      [0x5] =  0x00483973
004839d0      [0x6] =  0x004839a8
004839d4  }
004839d4  uint8_t lookup_table_4839d4[0x33] = 
004839d4  {
004839d4      [0x00] =  0x00
004839d5      [0x01] =  0x06
004839d6      [0x02] =  0x06
004839d7      [0x03] =  0x06
004839d8      [0x04] =  0x06
004839d9      [0x05] =  0x01
004839da      [0x06] =  0x06
004839db      [0x07] =  0x06
004839dc      [0x08] =  0x02
004839dd      [0x09] =  0x03
004839de      [0x0a] =  0x06
004839df      [0x0b] =  0x06
004839e0      [0x0c] =  0x06
004839e1      [0x0d] =  0x06
004839e2      [0x0e] =  0x06
004839e3      [0x0f] =  0x06
004839e4      [0x10] =  0x06
004839e5      [0x11] =  0x06
004839e6      [0x12] =  0x06
004839e7      [0x13] =  0x06
004839e8      [0x14] =  0x06
004839e9      [0x15] =  0x06
004839ea      [0x16] =  0x06
004839eb      [0x17] =  0x06
004839ec      [0x18] =  0x06
004839ed      [0x19] =  0x06
004839ee      [0x1a] =  0x06
004839ef      [0x1b] =  0x06
004839f0      [0x1c] =  0x06
004839f1      [0x1d] =  0x06
004839f2      [0x1e] =  0x06
004839f3      [0x1f] =  0x06
004839f4      [0x20] =  0x06
004839f5      [0x21] =  0x06
004839f6      [0x22] =  0x06
004839f7      [0x23] =  0x06
004839f8      [0x24] =  0x06
004839f9      [0x25] =  0x06
004839fa      [0x26] =  0x06
004839fb      [0x27] =  0x06
004839fc      [0x28] =  0x06
004839fd      [0x29] =  0x04
004839fe      [0x2a] =  0x06
004839ff      [0x2b] =  0x06
00483a00      [0x2c] =  0x06
00483a01      [0x2d] =  0x06
00483a02      [0x2e] =  0x06
00483a03      [0x2f] =  0x06
00483a04      [0x30] =  0x06
00483a05      [0x31] =  0x06
00483a06      [0x32] =  0x05
00483a07  }

00483a07                       90 90 90 90 90 90 90 90 90                                                         .........

00483a10  void __thiscall gmCGHeritagePage::InitializePage(class gmCGHeritagePage* this, class gmCharGenMainUI* arg2)

00483a10  {
00483a17      this->m_pMainFramework = arg2;
00483a29      this->m_pPlayerSystem = CPlayerSystem::GetPlayerSystem();
00483a2f      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x100003bf);
00483a36      class UIElement_Button* eax_2;
00483a36      
00483a36      if (eax_1 == 0)
00483a46          eax_2 = nullptr;
00483a36      else
00483a3e          eax_2 = eax_1->vtable->DynamicCast(1);
00483a3e      
00483a4f      this->m_pAluButton = eax_2;
00483a55      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x100003c1);
00483a5c      class UIElement_Button* eax_4;
00483a5c      
00483a5c      if (eax_3 == 0)
00483a6c          eax_4 = nullptr;
00483a5c      else
00483a64          eax_4 = eax_3->vtable->DynamicCast(1);
00483a64      
00483a75      this->m_pGhuButton = eax_4;
00483a7b      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100003c2);
00483a82      class UIElement_Button* eax_6;
00483a82      
00483a82      if (eax_5 == 0)
00483a92          eax_6 = nullptr;
00483a82      else
00483a8a          eax_6 = eax_5->vtable->DynamicCast(1);
00483a8a      
00483a9b      this->m_pShoButton = eax_6;
00483aa1      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x100003c3);
00483aa8      class UIElement_Button* eax_8;
00483aa8      
00483aa8      if (eax_7 == 0)
00483ab8          eax_8 = nullptr;
00483aa8      else
00483ab0          eax_8 = eax_7->vtable->DynamicCast(1);
00483ab0      
00483ac1      this->m_pViaButton = eax_8;
00483ac7      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x10000590);
00483ace      class UIElement_Button* eax_10;
00483ace      
00483ace      if (eax_9 == 0)
00483ade          eax_10 = nullptr;
00483ace      else
00483ad6          eax_10 = eax_9->vtable->DynamicCast(1);
00483ad6      
00483ae7      this->m_pShadButton = eax_10;
00483aed      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x10000591);
00483af4      class UIElement_Button* eax_12;
00483af4      
00483af4      if (eax_11 == 0)
00483b04          eax_12 = nullptr;
00483af4      else
00483afc          eax_12 = eax_11->vtable->DynamicCast(1);
00483afc      
00483b0d      this->m_pPenButton = eax_12;
00483b13      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x100005a9);
00483b1a      class UIElement_Button* eax_14;
00483b1a      
00483b1a      if (eax_13 == 0)
00483b2a          eax_14 = nullptr;
00483b1a      else
00483b22          eax_14 = eax_13->vtable->DynamicCast(1);
00483b22      
00483b33      this->m_pGearButton = eax_14;
00483b39      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x100005bf);
00483b40      class UIElement_Button* eax_16;
00483b40      
00483b40      if (eax_15 == 0)
00483b50          eax_16 = nullptr;
00483b40      else
00483b48          eax_16 = eax_15->vtable->DynamicCast(1);
00483b48      
00483b59      this->m_pUndButton = eax_16;
00483b5f      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x100005c4);
00483b66      class UIElement_Button* eax_18;
00483b66      
00483b66      if (eax_17 == 0)
00483b76          eax_18 = nullptr;
00483b66      else
00483b6e          eax_18 = eax_17->vtable->DynamicCast(1);
00483b6e      
00483b7f      this->m_pEmpButton = eax_18;
00483b85      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x100005e8);
00483b8c      class UIElement_Button* eax_20;
00483b8c      
00483b8c      if (eax_19 == 0)
00483b9c          eax_20 = nullptr;
00483b8c      else
00483b94          eax_20 = eax_19->vtable->DynamicCast(1);
00483b94      
00483ba5      this->m_pAunTButton = eax_20;
00483bab      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x100005f1);
00483bb2      class UIElement_Button* eax_22;
00483bb2      
00483bb2      if (eax_21 == 0)
00483bc2          eax_22 = nullptr;
00483bb2      else
00483bba          eax_22 = eax_21->vtable->DynamicCast(1);
00483bba      
00483bcb      this->m_pLugButton = eax_22;
00483bd1      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x100005c7);
00483bd8      class UIElement_Button* eax_24;
00483bd8      
00483bd8      if (eax_23 == 0)
00483be8          eax_24 = nullptr;
00483bd8      else
00483be0          eax_24 = eax_23->vtable->DynamicCast(1);
00483be0      
00483bf1      this->m_pOlthoiButton = eax_24;
00483bf7      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x100005c8);
00483bfe      class UIElement_Button* eax_26;
00483bfe      
00483bfe      if (eax_25 == 0)
00483c0e          eax_26 = nullptr;
00483bfe      else
00483c06          eax_26 = eax_25->vtable->DynamicCast(1);
00483c06      
00483c17      this->m_pOlthoiAcidButton = eax_26;
00483c1d      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x100003c4);
00483c24      class UIElement_Text* eax_28;
00483c24      
00483c24      if (eax_27 == 0)
00483c34          eax_28 = nullptr;
00483c24      else
00483c2c          eax_28 = eax_27->vtable->DynamicCast(0xc);
00483c2c      
00483c3d      this->m_pText = eax_28;
00483c4a      this->m_pBackground = UIElement::GetChildRecursive(this, 0x100003be);
00483c50      gmCGHeritagePage::Update(this);
00483a10  }

00483c59                                                                             90 90 90 90 90 90 90                           .......

00483c60  void __fastcall UIOption_Menu::Refresh(class UIOption_Menu* this)

00483c60  {
00483c60      class UIOption_Menu* this_1 = this;
00483c6c      int32_t ebx = 0;
00483c6c      
00483c75      if (UIElement_Menu::GetNumItems(&this->vtable) > 0)
00483c75      {
00483cb4          int32_t eax_2;
00483cb4          
00483cb4          do
00483cb4          {
00483c7a              class UIElement* eax_1 = UIElement_Menu::GetItem(&this->vtable, ebx);
00483c7a              
00483c83              if (eax_1 != 0)
00483c83              {
00483c91                  this_1 = nullptr;
00483c99                  UIElement::GetAttribute_Int(eax_1, 0x10000025, &this_1);
00483c99                  
00483ca8                  if (this->m_current == this_1)
00483ca8                  {
00483cd8                      UIElement_Menu::SetSelectedItem(&this->vtable, eax_1, 0);
00483ce2                      return;
00483ca8                  }
00483c83              }
00483c83              
00483cac              ebx += 1;
00483cad              eax_2 = UIElement_Menu::GetNumItems(&this->vtable);
00483cb4          } while (ebx < eax_2);
00483c75      }
00483c75      
00483cba      class UIElement* eax_3 = UIElement_Menu::GetItem(&this->vtable, 0);
00483cba      
00483cc1      if (eax_3 != 0)
00483cc8          UIElement_Menu::SetSelectedItem(&this->vtable, eax_3, 0);
00483c60  }

00483ce3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00483cf0  uint8_t __fastcall UIOption_Menu::Changed(class UIOption_Menu* this)

00483cf0  {
00483d04      uint32_t eax;
00483d04      eax = this->m_saved != this->m_current;
00483d07      return eax;
00483cf0  }

00483d08                          90 90 90 90 90 90 90 90                                                          ........

00483d10  uint8_t __fastcall UIOption_Menu::SaveCurrentValue(class UIOption_Menu* this)

00483d10  {
00483d15      uint32_t eax_1 = this->vtable->GetValue();
00483d1b      this->m_current = eax_1;
00483d21      this->m_saved = eax_1;
00483d27      eax_1 = 1;
00483d2a      return 1;
00483d10  }

00483d2b                                   90 90 90 90 90                                                             .....

00483d30  uint8_t __fastcall UIOption_Menu::RestoreSavedValue(class UIOption_Menu* this)

00483d30  {
00483d39      struct UIOption_Menu::VTable* vtable = this->vtable;
00483d3d      this->m_current = this->m_saved;
00483d43      vtable->Apply(0);
00483d49      this->vtable->Refresh();
00483d53      int32_t eax_2;
00483d53      eax_2 = 1;
00483d56      return 1;
00483d30  }

00483d57                                                                       90 90 90 90 90 90 90 90 90                         .........

00483d60  uint8_t __fastcall UIOption_Menu::RestoreDefaultValue(class UIOption_Menu* this)

00483d60  {
00483d69      struct UIOption_Menu::VTable* vtable = this->vtable;
00483d6d      this->m_current = this->m_default;
00483d73      vtable->Apply(0);
00483d79      this->vtable->Refresh();
00483d83      int32_t eax_2;
00483d83      eax_2 = 1;
00483d86      return 1;
00483d60  }

00483d87                       90 90 90 90 90 90 90 90 90                                                         .........

00483d90  void __thiscall UIOption_Menu::SetDefaultValue(class UIOption_Menu* this, uint32_t const arg2)

00483d90  {
00483d94      this->m_default = arg2;
00483d90  }

00483d9d                                                                                         90 90 90                               ...

00483da0  enum UIElementMessageListenResult __thiscall UIOption_Menu::ListenToElementMessage(class UIOption_Menu* this, struct UIElementMessageInfo const* arg2)

00483da0  {
00483da2      struct UIElementMessageInfo* edi = arg2;
00483da2      
00483dac      if (edi->idMessage == 7)
00483dac      {
00483db3          if (*(int32_t*)((char*)this + -0x18) != 0)
00483db3          {
00483dbb              *(uint32_t*)(*(int32_t*)((char*)this + -0x20) + 0x2b8)();
00483dcb              return UIElement_Menu::ListenToElementMessage(this, edi);
00483db3          }
00483db3          
00483dd0          arg2 = nullptr;
00483dd8          class UIElement* eax_4 = UIElement_Menu::GetSelectedItem(this);
00483dd8          
00483ddf          if (eax_4 != 0)
00483ddf          {
00483ded              UIElement::GetAttribute_Int(eax_4, 0x10000025, &arg2);
00483df6              int32_t eax_5 = *(int32_t*)((char*)this + -0x20);
00483dfe              this->m_popup = arg2;
00483e04              *(uint32_t*)(eax_5 + 0x2d4)(1);
00483ddf          }
00483dac      }
00483dac      
00483e14      return UIElement_Menu::ListenToElementMessage(this, edi);
00483da0  }

00483e17                                                                       90 90 90 90 90 90 90 90 90                         .........

00483e20  void __thiscall UIOption_Menu::RecvNotice_RefreshOptionsPanel(class UIOption_Menu* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00483e20  {
00483e25      uint32_t eax_1 = this->vtable->GetValue();
00483e2b      struct UIOption_Menu::VTable* vtable = this->vtable;
00483e2d      this->m_current = eax_1;
00483e36      /* jump -> vtable->Refresh */
00483e20  }

00483e3c                                                                                      90 90 90 90                              ....

00483e40  uint32_t __convention("regparm") UIOption_Menu::GetValue(class UIOption_Menu* this @ ecx)

00483e40  {
00483e40      class UIOption_Menu* this_1 = this;
00483e41      class PSRefBufferCharData<char>* m_charbuffer = this->m_prefName.m_charbuffer;
00483e4f      this_1 = nullptr;
00483e57      class UIOption_Menu* eax;
00483e57      
00483e57      if (m_charbuffer->m_data[-4] == 1)
00483e6c          return eax;
00483e5f      UIPreferences::InqPreferenceValue(&this->m_prefName, &this_1);
00483e64      return this_1;
00483e40  }

00483e6d                                         90 90 90                                                               ...

00483e70  void __thiscall UIOption_Menu::HandleDialogAndNotices(class UIOption_Menu* this, uint8_t arg2)

00483e70  {
00483e7a      int32_t ebx;
00483e7a      ebx = this->m_confirmChange;
00483e7a      
00483e88      if ((arg2 != 0 && (ebx != 0 && this->m_bDelayConfirmation != 0)))
00483e88      {
00483e8f          UIListener::RegisterForGlobalMessage(&this->vtable, 3);
00483e94          this->m_confirmChange = 0;
00483e88      }
00483e88      
00483e9f      UIOption::HandleDialogAndNotices(this, arg2);
00483ea4      this->m_confirmChange = ebx;
00483e70  }

00483eac                                      90 90 90 90                                                              ....

00483eb0  void __thiscall UIOption_Menu::ListenToGlobalMessage(class UIOption_Menu* this, uint32_t arg2, int32_t arg3)

00483eb0  {
00483ebb      if (arg2 == 3)
00483ebb      {
00483ec2          int32_t eax_2 = (cUseTimes + 1);
00483ec6          cUseTimes = eax_2;
00483ec6          
00483ecb          if (eax_2 > 1)
00483ecb          {
00483ed0              UIOption::HandleDialog(((char*)this - 0x20));
00483ed8              UIListener::UnRegisterForGlobalMessage(this, arg2);
00483edd              cUseTimes = 0;
00483ecb          }
00483ebb      }
00483ebb      
00483eef      UIElement_Button::ListenToGlobalMessage(this, arg2, arg3);
00483eb0  }

00483ef9                                                                             90 90 90 90 90 90 90                           .......

00483f00  void __fastcall UIOption_Menu::~UIOption_Menu(class UIOption_Menu* this)

00483f00  {
00483f0b      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_prefName.m_charbuffer - 0x14);
00483f15      this->vtable = 0x7a1060;
00483f11      this->vtable = &UIOption_Menu::`vftable';
00483f21      this->vtable = &UIOption_Menu::`vftable';
00483f21      
00483f37      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00483f3f          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00483f3f      
00483f43      UIElement_Menu::~UIElement_Menu(&this->vtable);
00483f4d      /* tailcall */
00483f4d      return UIOption::~UIOption(this);
00483f00  }

00483f52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00483f60  class UIElement* __thiscall UIOption_Menu::DynamicCast(class UIOption_Menu* this, uint32_t arg2) __pure

00483f60  {
00483f6a      if (arg2 == 0x10000038)
00483f6a      {
00483f6e          if (this == 0)
00483f78              return 0;
00483f78          
00483f73          return &this->vtable;
00483f6a      }
00483f6a      
00483f7e      struct UIElement_Menu::VTable** result = &this->vtable;
00483f7e      
00483f8b      if ((arg2 == 6 || (arg2 == 1 || arg2 == 0xc)))
00483f98          return result;
00483f98      
00483f92      int32_t ecx;
00483f92      ecx = arg2 != 0xa;
00483f96      return (result & (ecx - 1));
00483f60  }

00483f9b                                                                                   90 90 90 90 90                             .....

00483fa0  uint32_t UIOption_Menu::GetUIElementType(class UIOption_Menu const* this @ ecx) __pure

00483fa0  {
00483fa5      return 0x10000038;
00483fa0  }

00483fa6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00483fb0  void* __thiscall UIOption_Menu::`vector deleting destructor'(class UIOption_Menu* this, uint32_t arg2)

00483fb0  {
00483fb3      /* tailcall */
00483fb3      return UIOption_Menu::`scalar deleting destructor'(((char*)this - 0x20), arg2);
00483fb0  }

00483fb8                                                                          cc cc cc cc cc cc cc cc                          ........

00483fc0  class UIElement* __thiscall UIOption_Menu::DynamicCast(class UIOption_Menu* this, uint32_t arg2)

00483fc0  {
00483fc3      /* tailcall */
00483fc3      return UIOption_Menu::DynamicCast(((char*)this - 0x20), arg2);
00483fc0  }

00483fc8                          cc cc cc cc cc cc cc cc                                                          ........

00483fd0  void __thiscall UIOption_Menu::SetLabel(class UIOption_Menu* this, class StringInfo const* arg2)

00483fd0  {
00483fd6      class UIElement* eax = this->vtable->GetParent();
00483fd6      
00483fde      if (eax != 0)
00483fde      {
00483fe7          class UIElement* eax_1 = UIElement::GetChildRecursive(eax, 0x10000223);
00483fe7          
00483fee          if (eax_1 != 0)
00483fee          {
00483ff6              class UIElement_Text* eax_2 = eax_1->vtable->DynamicCast(0xc);
00483ff6              
00483ffe              if (eax_2 != 0)
00484002                  /* tailcall */
00484002                  return UIElement_Text::SetStringInfo(eax_2, arg2);
00483fee          }
00483fde      }
00483fd0  }

0048400a                                90 90 90 90 90 90                                                            ......

00484010  void __thiscall UIOption_Menu::SetEntries(class UIOption_Menu* this, class SmartArray<unsigned long,1> const* arg2, class SmartArray<unsigned long,1> const* arg3, uint32_t arg4)

00484010  {
00484022      int32_t i = 0;
00484022      
00484026      if (arg2->m_num > 0)
00484026      {
00484086          do
00484086          {
00484038              void var_90;
00484038              StringInfo::StringInfo(&var_90);
00484048              StringInfo::SetStringIDandTableEnum(&var_90, arg2->m_data[i], arg4);
00484055              class UIElement_Text* eax_2 = UIElement_Menu::InsertTextItem(&this->vtable, &var_90, i);
00484055              
0048405c              if (eax_2 != 0)
00484072                  UIElement::SetAttribute_Int(eax_2, 0x10000025, arg3->m_data[i]);
00484072              
0048407b              StringInfo::~StringInfo(&var_90);
00484083              i += 1;
00484086          } while (i < arg2->m_num);
00484026      }
00484010  }

00484095                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004840a0  void* __thiscall UIOption_Menu::`scalar deleting destructor'(class UIOption_Menu* this, uint32_t arg2)

004840a0  {
004840a3      UIOption_Menu::~UIOption_Menu(this);
004840a3      
004840ad      if ((arg2 & 1) != 0)
004840b0          operator delete(this);
004840b0      
004840bb      return this;
004840a0  }

004840be                                                                                            90 90                                ..

004840c0  void __thiscall UIOption_Menu::UIOption_Menu(class UIOption_Menu* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004840c0  {
004840c4      UIOption::UIOption(this);
004840d8      UIElement_Menu::UIElement_Menu(&this->vtable, arg2, arg3);
004840ea      this->vtable = 0x7a1060;
004840d2      this->vtable = &UIOption_Menu::`vftable';
004840f6      this->vtable = &UIOption_Menu::`vftable';
00484100      this->m_default = 0;
00484106      this->m_saved = 0;
0048410c      this->m_current = 0;
00484112      PStringBase<char>::PStringBase<char>(&this->m_prefName, &data_7928af);
004840c0  }

0048411e                                                                                            90 90                                ..

00484120  class UIElement* UIOption_Menu::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00484120  {
00484125      void* eax = operator new(0x768);
00484125      
0048412f      if (eax != 0)
0048412f      {
0048413d          int32_t eax_1 = UIOption_Menu::UIOption_Menu(eax, arg1, arg2);
0048413d          
00484144          if (eax_1 != 0)
00484149              return (eax_1 + 0x20);
0048412f      }
0048412f      
0048414c      return 0;
00484120  }

0048414d                                         90 90 90                                                               ...

00484150  uint8_t __thiscall UIOption_Menu::Apply(class UIOption_Menu* this, uint8_t arg2)

00484150  {
00484150      class UIOption_Menu* this_1 = this;
00484160      PStringBase<char>::PStringBase<char>(&this_1, &data_7928af);
00484186      int32_t ebx;
00484186      ebx = _stricmp(this->m_prefName.m_charbuffer, this_1) != 0;
00484189      void* __offset(UIOption_Menu, -0x14) ebp_1 = ((char*)this_1 - 0x14);
00484189      
0048419c      if ((InterlockedDecrement(((char*)ebp_1 + 4)) == 0 && ebp_1 != 0))
004841a5          *(uint32_t*)*(int32_t*)((char*)ADJ(ebp_1) + -0x14)(1);
004841a5      
004841a9      if (ebx == 0)
004841a9      {
004841f8          int32_t eax_2;
004841f8          eax_2 = 0;
004841fc          return 0;
004841a9      }
004841a9      
004841b1      uint32_t m_saved = this->m_saved;
004841b1      
004841c3      if (UIPreferences::ModifyPreference(&this->m_prefName, this->m_current) != 0)
004841c3      {
004841c6          CM_UI::SendNotice_UserPreferenceChanged(&this->m_prefName);
004841d4          CM_UI::SendNotice_UserPreferenceChanged_Menu(&this->m_prefName, m_saved, this->m_current);
004841c3      }
004841c3      
004841e0      this->vtable->HandleDialogAndNotices(arg2);
004841ee      int32_t eax_6;
004841ee      eax_6 = 1;
004841f2      return 1;
00484150  }

004841ff                                                                                               90                                 .

00484200  void __thiscall UIOption_Menu::SetUserPreference(class UIOption_Menu* this, class PStringBase<char> const* arg2)

00484200  {
00484206      class PStringBase<char>* edi = arg2;
0048420c      class PSRefBufferCharData<char>* m_charbuffer = this->m_prefName.m_charbuffer;
0048420c      
00484218      if (m_charbuffer != edi->m_charbuffer)
00484218      {
0048422e          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00484236              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00484236          
00484238          class PSRefBufferCharData<char>* m_charbuffer_1 = edi->m_charbuffer;
0048423a          this->m_prefName.m_charbuffer = m_charbuffer_1;
00484244          InterlockedIncrement(&m_charbuffer_1[-1]);
00484218      }
00484218      
0048425b      arg2 = nullptr;
0048425f      uint32_t var_20 = 0;
00484263      uint32_t var_1c = 0;
00484263      
00484271      if (UIPreferences::InqPreference(edi, &arg2, &var_20, &var_1c) != 0)
00484271      {
00484283          UIOption::SetLabel(this, var_20, arg2);
00484294          UIOption::SetTooltip(this, var_1c, arg2);
0048429f          void* var_18 = nullptr;
004842a3          int32_t var_14_1 = 0;
004842a7          int32_t var_10_1 = 0;
004842a7          
004842b5          if (UserPreferences::InqChoiceValues(edi, &var_18) != 0)
004842b5          {
004842e9              class PStringBase<char>* var_c = nullptr;
004842ed              int32_t var_8_1 = 0;
004842f1              int32_t var_4_1 = 0;
004842f1              
004842ff              if (UserPreferences::InqChoiceStrings(edi, &var_c) != 0)
00484301                  this->vtable->SetLiteralEntries(&var_c, &var_18);
00484301              
00484325              if ((var_8_1 & 0x80000000) == 0x80000000)
00484325              {
00484327                  class PStringBase<char>* ecx_6 = var_c;
00484327                  
0048432d                  if (ecx_6 != 0)
00484331                      PStringBase<char>::`vector deleting destructor'(ecx_6, 3);
00484325              }
00484325              
00484344              if ((var_14_1 & 0x80000000) == 0x80000000)
0048434b                  operator delete[](var_18);
004842b5          }
004842b5          else if ((var_14_1 & 0x80000000) == 0x80000000)
004842d2              operator delete[](var_18);
00484271      }
00484200  }

0048435c                                                                                      90 90 90 90                              ....

00484360  void UIOption_Menu::Register()

00484360  {
0048436a      UIElement::RegisterElementClass(0x10000038, UIOption_Menu::Create);
00484360  }

00484373                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00484380  void __thiscall UIOption_Menu::SetUIPreference(class UIOption_Menu* this, class PStringBase<char> const* arg2)

00484380  {
00484385      class PStringBase<char>* esi = arg2;
0048438b      class PSRefBufferCharData<char>* m_charbuffer = this->m_prefName.m_charbuffer;
0048438b      
00484398      if (m_charbuffer != esi->m_charbuffer)
00484398      {
0048439a          int32_t ebx;
0048439a          int32_t var_30_1 = ebx;
0048439a          
004843ae          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
004843b6              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004843b6          
004843b8          class PSRefBufferCharData<char>* m_charbuffer_1 = esi->m_charbuffer;
004843ba          this->m_prefName.m_charbuffer = m_charbuffer_1;
004843c4          InterlockedIncrement(&m_charbuffer_1[-1]);
00484398      }
00484398      
004843db      arg2 = nullptr;
004843df      uint32_t var_20 = 0;
004843e3      uint32_t var_1c = 0;
004843e3      
004843f1      if (UIPreferences::InqPreference(esi, &arg2, &var_20, &var_1c) != 0)
004843f1      {
00484403          UIOption::SetLabel(this, var_20, arg2);
00484414          UIOption::SetTooltip(this, var_1c, arg2);
0048441f          void* var_c = nullptr;
00484423          int32_t var_8_1 = 0;
00484427          int32_t var_4_1 = 0;
00484427          
00484435          if (UIPreferences::InqEnumChoices(esi, &var_c) != 0)
00484435          {
00484441              void* var_18 = nullptr;
00484445              int32_t var_14_1 = 0;
00484449              int32_t var_10_1 = 0;
00484449              
0048445d              if ((UserPreferences::InqChoiceValues(esi, &var_18) == 0 || var_10_1 == 0))
0048445d              {
00484463                  int32_t esi_1 = 0;
00484463                  
00484467                  if (var_4_1 > 0)
00484467                  {
004844b0                      do
004844b0                      {
00484478                          int32_t eax_10 = (var_14_1 & 0x7fffffff);
00484478                          
0048447f                          if (var_10_1 < eax_10)
0048447f                          {
004844a2                              *(uint32_t*)((char*)var_18 + (var_10_1 << 2)) = esi_1;
004844a5                              var_10_1 += 1;
0048447f                          }
0048447f                          else if (SmartArray<unsigned long,1>::grow(&var_18, SmartArray<unsigned long,1>::get_new_size(&var_18, (eax_10 + 1))) != 0)
00484498                          {
004844a2                              *(uint32_t*)((char*)var_18 + (var_10_1 << 2)) = esi_1;
004844a5                              var_10_1 += 1;
00484498                          }
00484498                          
004844ad                          esi_1 += 1;
004844b0                      } while (esi_1 < var_4_1);
00484467                  }
0048445d              }
0048445d              
004844b6              this->vtable->SetEntries(&var_c, &var_18, arg2);
004844b6              
004844dc              if ((var_14_1 & 0x80000000) == 0x80000000)
004844e3                  operator delete[](var_18);
004844e3              
004844f9              if ((var_8_1 & 0x80000000) == 0x80000000)
00484500                  operator delete[](var_c);
00484435          }
00484435          else if ((var_8_1 & 0x80000000) == 0x80000000)
00484528              operator delete[](var_c);
004843f1      }
00484380  }

00484539                                                                             90 90 90 90 90 90 90                           .......

00484540  void __thiscall UIOption_Menu::SetLiteralEntries(class UIOption_Menu* this, class SmartArray<PStringBase<char>,1> const* arg2, class SmartArray<unsigned long,1> const* arg3)

00484540  {
00484552      int32_t i = 0;
00484552      
00484556      if (arg2->m_num > 0)
00484556      {
004845ee          do
004845ee          {
00484569              void var_90;
00484569              StringInfo::StringInfo(&var_90);
00484579              int32_t edi_1 = (i << 2);
0048458d              class PStringBase<unsigned short> __return;
0048458d              StringInfo::SetLiteralValue(&var_90, PStringBase<char>::to_wpstring((arg2->m_data + edi_1), &__return, 0), 1);
00484596              int32_t* esi_2 = (__return - 0x14);
00484596              
004845a9              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004845b1                  **(uint32_t**)esi_2(1);
004845b1              
004845bd              class UIElement_Text* eax_3 = UIElement_Menu::InsertTextItem(&this->vtable, &var_90, i);
004845bd              
004845c4              if (eax_3 != 0)
004845da                  UIElement::SetAttribute_Int(eax_3, 0x10000025, *(uint32_t*)(*(uint32_t*)arg3 + edi_1));
004845da              
004845e3              StringInfo::~StringInfo(&var_90);
004845eb              i += 1;
004845ee          } while (i < arg2->m_num);
00484556      }
00484540  }

00484601     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00484610  void __thiscall UIOption_CheckboxSlider::Refresh(class UIOption_CheckboxSlider* this)

00484610  {
00484613      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
00484613      
0048461b      if (m_pToggle != 0)
0048461d          m_pToggle->vtable->Refresh();
0048461d      
00484625      class UIOption_Slider* m_pSlider = this->m_pSlider;
00484625      
0048462e      if (m_pSlider == 0)
00484638          return;
00484638      
00484632      /* jump -> m_pSlider->vtable->Refresh */
00484610  }

00484639                                                                             90 90 90 90 90 90 90                           .......

00484640  uint8_t __fastcall UIOption_CheckboxSlider::Changed(class UIOption_CheckboxSlider* this)

00484640  {
00484644      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
0048464a      int32_t ebx;
0048464a      ebx = 0;
0048464a      
0048464e      if (m_pToggle != 0)
00484658          ebx = m_pToggle->vtable->Changed();
00484658      
0048465a      class UIOption_Slider* m_pSlider = this->m_pSlider;
0048465a      
00484662      if (m_pSlider != 0)
0048466c          ebx |= m_pSlider->vtable->Changed();
0048466c      
00484672      return ebx;
00484640  }

00484673                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00484680  void __thiscall UIOption_CheckboxSlider::SetChangeNotification(class UIOption_CheckboxSlider* this, class IOptionChangeHandler* arg2)

00484680  {
00484683      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
00484683      
00484690      if (m_pToggle != 0)
00484692          m_pToggle->vtable->SetChangeNotification(arg2);
00484692      
0048469b      class UIOption_Slider* m_pSlider = this->m_pSlider;
0048469b      
004846a3      if (m_pSlider != 0)
004846a5          m_pSlider->vtable->SetChangeNotification(arg2);
00484680  }

004846b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004846c0  uint8_t __thiscall UIOption_CheckboxSlider::Apply(class UIOption_CheckboxSlider* this, uint8_t arg2)

004846c0  {
004846c4      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
004846cd      int32_t edi = arg2;
004846d1      int32_t ebx;
004846d1      ebx = 1;
004846d1      
004846d3      if (m_pToggle != 0)
004846d3      {
004846de          ebx = m_pToggle->vtable->Apply(edi);
004846e0          ebx &= 1;
004846d3      }
004846d3      
004846e3      class UIOption_Slider* m_pSlider = this->m_pSlider;
004846e3      
004846eb      if (m_pSlider != 0)
004846f6          ebx &= m_pSlider->vtable->Apply(edi);
004846f6      
004846fd      return ebx;
004846c0  }


00484700  uint8_t __fastcall UIOption_CheckboxSlider::SaveCurrentValue(class UIOption_CheckboxSlider* this)

00484700  {
00484703      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
00484703      
0048470b      if (m_pToggle != 0)
0048470d          m_pToggle->vtable->SaveCurrentValue();
0048470d      
00484715      class UIOption_Slider* m_pSlider = this->m_pSlider;
00484715      
0048471e      if (m_pSlider != 0)
00484720          m_pSlider->vtable->SaveCurrentValue();
00484720      
00484728      int32_t eax;
00484728      eax = 1;
0048472a      return 1;
00484700  }

0048472b                                   90 90 90 90 90                                                             .....

00484730  uint8_t __fastcall UIOption_CheckboxSlider::RestoreSavedValue(class UIOption_CheckboxSlider* this)

00484730  {
00484733      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
00484733      
0048473b      if (m_pToggle != 0)
0048473d          m_pToggle->vtable->RestoreSavedValue();
0048473d      
00484745      class UIOption_Slider* m_pSlider = this->m_pSlider;
00484745      
0048474e      if (m_pSlider != 0)
00484750          m_pSlider->vtable->RestoreSavedValue();
00484750      
00484758      int32_t eax;
00484758      eax = 1;
0048475a      return 1;
00484730  }

0048475b                                                                                   90 90 90 90 90                             .....

00484760  uint8_t __fastcall UIOption_CheckboxSlider::RestoreDefaultValue(class UIOption_CheckboxSlider* this)

00484760  {
00484763      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
00484763      
0048476b      if (m_pToggle != 0)
0048476d          m_pToggle->vtable->RestoreDefaultValue();
0048476d      
00484775      class UIOption_Slider* m_pSlider = this->m_pSlider;
00484775      
0048477e      if (m_pSlider != 0)
00484780          m_pSlider->vtable->RestoreDefaultValue();
00484780      
00484788      int32_t eax;
00484788      eax = 1;
0048478a      return 1;
00484760  }

0048478b                                   90 90 90 90 90                                                             .....

00484790  void __thiscall UIOption_CheckboxSlider::SetDefaultValue(class UIOption_CheckboxSlider* this, uint8_t arg2, float arg3)

00484790  {
00484793      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
00484793      
0048479b      if (m_pToggle != 0)
004847a1          m_pToggle->vtable->SetDefaultValue(arg2);
004847a1      
004847aa      class UIOption_Slider* m_pSlider = this->m_pSlider;
004847aa      
004847b3      if (m_pSlider != 0)
004847b9          m_pSlider->vtable->SetDefaultValue(arg3);
00484790  }

004847c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004847d0  void __thiscall UIOption_CheckboxSlider::SetUIPreference(class UIOption_CheckboxSlider* this, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3)

004847d0  {
004847d3      class UIOption_Checkbox* m_pToggle = this->m_pToggle;
004847d3      
004847db      if (m_pToggle != 0)
004847e2          UIOption_Checkbox::SetUIPreference(m_pToggle, arg2);
004847e2      
004847e7      class UIOption_Slider* m_pSlider = this->m_pSlider;
004847e7      
004847f0      if (m_pSlider != 0)
004847f7          UIOption_Slider::SetUIPreference(m_pSlider, arg3);
004847d0  }

004847ff                                                                                               90                                 .

00484800  void __thiscall UIOption_CheckboxSlider::SetTooltip(class UIOption_CheckboxSlider* this, class StringInfo const* arg2)

00484800  {
00484803      /* tailcall */
00484803      return UIElement::SetTooltip(&this->vtable, arg2);
00484800  }

00484808                          90 90 90 90 90 90 90 90                                                          ........

00484810  enum UIElementMessageListenResult __thiscall UIOption_CheckboxSlider::ListenToElementMessage(class UIOption_CheckboxSlider* this, struct UIElementMessageInfo const* arg2)

00484810  {
00484812      struct UIElementMessageInfo* edi = arg2;
0048481b      int32_t eax = 1;
0048481b      
00484822      if (edi->idMessage == 1)
00484822      {
00484824          class HashSetData<UIListener *>** m_firstInterestingBucket = this->m_hashListeners.m_intrusiveTable.m_firstInterestingBucket;
0048482c          arg2 = 1;
0048482c          
00484830          if (m_firstInterestingBucket != 0)
00484830          {
0048483c              UIElement::GetAttribute_Bool(&m_firstInterestingBucket[8], 0xe, &arg2);
00484841              eax = arg2;
00484830          }
00484830          
00484845          uint32_t m_numBuckets = this->m_hashListeners.m_intrusiveTable.m_numBuckets;
00484845          
0048484d          if (m_numBuckets != 0)
0048484d          {
00484855              char temp1_1 = eax;
00484855              eax = -(eax);
00484860              *(uint32_t*)(*(uint32_t*)(m_numBuckets + 0x20) + 0x9c)((((eax - eax) & 0xfffffff4) + 0xd));
0048484d          }
00484822      }
00484822      
00484870      return UIElement::ListenToElementMessage(this, edi);
00484810  }

00484873                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00484880  void __thiscall UIOption_CheckboxSlider::UIOption_CheckboxSlider(class UIOption_CheckboxSlider* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00484880  {
00484884      UIOption::UIOption(this);
00484898      UIElement::UIElement(&this->vtable, arg2, arg3);
0048489f      this->m_pToggle = nullptr;
004848a5      this->m_pSlider = nullptr;
004848ab      this->vtable = 0x7a14d0;
00484892      this->vtable = &UIOption_CheckboxSlider::`vftable';
004848b7      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004848c3      this->m_prefName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004848c9      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00484880  }

004848d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004848e0  class UIElement* __thiscall UIOption_CheckboxSlider::DynamicCast(class UIOption_CheckboxSlider* this, uint32_t arg2) __pure

004848e0  {
004848ec      if ((arg2 == 0x10000036 && this != 0))
004848f1          return &this->vtable;
004848f1      
004848f6      return 0;
004848e0  }

004848f9                                                                             90 90 90 90 90 90 90                           .......

00484900  uint32_t UIOption_CheckboxSlider::GetUIElementType(class UIOption_CheckboxSlider const* this @ ecx) __pure

00484900  {
00484905      return 0x10000036;
00484900  }

00484906                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00484910  void* __thiscall UIOption_CheckboxSlider::`vector deleting destructor'(class UIOption_CheckboxSlider* this, uint32_t arg2)

00484910  {
00484913      /* tailcall */
00484913      return UIOption_CheckboxSlider::`scalar deleting destructor'(((char*)this - 0x1c), arg2);
00484910  }

00484918                                                                          cc cc cc cc cc cc cc cc                          ........

00484920  class UIElement* __thiscall UIOption_CheckboxSlider::DynamicCast(class UIOption_CheckboxSlider* this, uint32_t arg2)

00484920  {
00484923      /* tailcall */
00484923      return UIOption_CheckboxSlider::DynamicCast(((char*)this - 0x1c), arg2);
00484920  }

00484928                          cc cc cc cc cc cc cc cc                                                          ........

00484930  class UIElement* UIOption_CheckboxSlider::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00484930  {
00484935      void* eax = operator new(0x618);
00484935      
0048493f      if (eax != 0)
0048493f      {
0048494d          int32_t eax_1 = UIOption_CheckboxSlider::UIOption_CheckboxSlider(eax, arg1, arg2);
0048494d          
00484954          if (eax_1 != 0)
00484959              return (eax_1 + 0x1c);
0048493f      }
0048493f      
0048495c      return 0;
00484930  }

0048495d                                                                                         90 90 90                               ...

00484960  void __fastcall UIOption_CheckboxSlider::PostInit(class UIOption_CheckboxSlider* this)

00484960  {
00484963      UIElement::PostInit(this);
0048496f      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000219);
00484976      void* eax_1;
00484976      
00484976      if (eax != 0)
00484981          eax_1 = eax->vtable->DynamicCast(0x10000035);
00484981      
00484989      class HashSetData<UIListener *>** eax_2;
00484989      
00484989      if ((eax == 0 || eax_1 == 0))
00484990          eax_2 = nullptr;
00484989      else
0048498b          eax_2 = ((char*)eax_1 - 0x20);
0048498b      
00484999      this->m_hashListeners.m_intrusiveTable.m_firstInterestingBucket = eax_2;
0048499f      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x1000021c);
0048499f      
004849a6      if (eax_3 != 0)
004849a6      {
004849b1          int32_t eax_4 = eax_3->vtable->DynamicCast(0x10000037);
004849b1          
004849b9          if (eax_4 != 0)
004849b9          {
004849be              this->m_hashListeners.m_intrusiveTable.m_numBuckets = (eax_4 - 0x20);
004849c5              return;
004849b9          }
004849a6      }
004849a6      
004849c8      this->m_hashListeners.m_intrusiveTable.m_numBuckets = 0;
00484960  }


004849d0  void* __thiscall UIOption_CheckboxSlider::`scalar deleting destructor'(class UIOption_CheckboxSlider* this, uint32_t arg2)

004849d0  {
004849db      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_prefName.m_charbuffer - 0x14);
004849e5      this->vtable = 0x7a14d0;
004849e1      this->vtable = &UIOption_CheckboxSlider::`vftable';
004849e1      
004849fd      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00484a05          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00484a05      
00484a09      UIElement::~UIElement(&this->vtable);
00484a10      UIOption::~UIOption(this);
00484a10      
00484a1a      if ((arg2 & 1) != 0)
00484a1d          operator delete(this);
00484a1d      
00484a2a      return this;
004849d0  }

00484a2d                                         90 90 90                                                               ...

00484a30  void UIOption_CheckboxSlider::Register()

00484a30  {
00484a3a      UIElement::RegisterElementClass(0x10000036, UIOption_CheckboxSlider::Create);
00484a30  }

00484a43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00484a50  void __fastcall UIOption_Slider::Refresh(class UIOption_Slider* this)

00484a50  {
00484a50      long double x87_r7 = ((long double)this->m_current);
00484a56      long double temp0 = ((long double)this->m_lowerValue);
00484a56      (x87_r7 - temp0);
00484a5c      float eax;
00484a5c      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
00484a5e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00484a5e      
00484a61      if (!(p))
00484a69          this->m_current = this->m_lowerValue;
00484a69      
00484a6f      long double x87_r7_1 = ((long double)this->m_current);
00484a75      long double temp1 = ((long double)this->m_upperValue);
00484a75      (x87_r7_1 - temp1);
00484a7b      eax = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
00484a7b      
00484a80      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00484a88          this->m_current = this->m_upperValue;
00484a88      
00484a94      class UIOption_Slider* this_1 = this;
00484ab4      UIElement::SetAttribute_Float(&this->vtable, 0x86, ((float)((((long double)this->m_current) - ((long double)this->m_lowerValue)) / (((long double)this->m_upperValue) - ((long double)this->m_lowerValue)))));
00484a50  }

00484aba                                                                                90 90 90 90 90 90                            ......

00484ac0  uint8_t __fastcall UIOption_Slider::Changed(class UIOption_Slider* this)

00484ac0  {
00484ac0      long double x87_r7 = ((long double)this->m_saved);
00484ac6      long double temp0 = ((long double)this->m_current);
00484ac6      (x87_r7 - temp0);
00484acc      int32_t eax;
00484acc      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
00484ace      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00484ace      
00484ad1      if (!(p))
00484adb          return 0;
00484adb      
00484ad8      return 1;
00484ac0  }

00484adc                                                                                      90 90 90 90                              ....

00484ae0  uint8_t __fastcall UIOption_Slider::RestoreSavedValue(class UIOption_Slider* this)

00484ae0  {
00484ae9      struct UIOption_Slider::VTable* vtable = this->vtable;
00484aed      this->m_current = this->m_saved;
00484af3      vtable->Apply(0);
00484af9      this->vtable->Refresh();
00484b03      int32_t eax_2;
00484b03      eax_2 = 1;
00484b06      return 1;
00484ae0  }

00484b07                       90 90 90 90 90 90 90 90 90                                                         .........

00484b10  uint8_t __fastcall UIOption_Slider::RestoreDefaultValue(class UIOption_Slider* this)

00484b10  {
00484b19      struct UIOption_Slider::VTable* vtable = this->vtable;
00484b1d      this->m_current = this->m_default;
00484b23      vtable->Apply(0);
00484b29      this->vtable->Refresh();
00484b33      int32_t eax_2;
00484b33      eax_2 = 1;
00484b36      return 1;
00484b10  }

00484b37                                                                       90 90 90 90 90 90 90 90 90                         .........

00484b40  void __thiscall UIOption_Slider::SetDefaultValue(class UIOption_Slider* this, float arg2)

00484b40  {
00484b44      this->m_default = arg2;
00484b40  }

00484b4d                                         90 90 90                                                               ...

00484b50  enum UIElementMessageListenResult __thiscall UIOption_Slider::ListenToElementMessage(class UIOption_Slider* this, struct UIElementMessageInfo const* arg2)

00484b50  {
00484b52      struct UIElementMessageInfo* edi = arg2;
00484b52      
00484b5c      if (edi->idMessage == 0xa)
00484b5c      {
00484b64          int32_t eax_2 = -(((char*)this - 0x20));
00484b64          
00484b6c          if (edi->pElement == ((eax_2 - eax_2) & this))
00484b6c          {
00484b7a              arg2 = nullptr;
00484b82              UIElement::GetAttribute_Float(this, 0x86, &arg2);
00484ba5              this->m_rectScrollingArea.right = ((float)(((((long double)this->m_bitField) - ((long double)this->m_eDecrementButtonID)) * ((long double)arg2)) + ((long double)this->m_eDecrementButtonID)));
00484bab              *(uint32_t*)(*(int32_t*)((char*)this + -0x20) + 0x2d4)(1);
00484b6c          }
00484b5c      }
00484b5c      
00484bbb      return UIElement_Scrollbar::ListenToElementMessage(this, edi);
00484b50  }

00484bbe                                                                                            90 90                                ..

00484bc0  float __fastcall UIOption_Slider::GetCurrentValue(class UIOption_Slider* this)

00484bc0  {
00484bc6      return ((int32_t)((long double)this->m_current));
00484bc0  }

00484bc7                       90 90 90 90 90 90 90 90 90                                                         .........

00484bd0  void __thiscall UIOption_Slider::SetCurrentValue(class UIOption_Slider* this, float arg2)

00484bd0  {
00484bd7      struct UIOption_Slider::VTable* vtable = this->vtable;
00484bd9      this->m_current = arg2;
00484bdf      vtable->Refresh();
00484be5      this->vtable->Apply(0);
00484bd0  }

00484bf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00484c00  void __fastcall UIOption_Slider::~UIOption_Slider(class UIOption_Slider* this)

00484c00  {
00484c0b      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_prefName.m_charbuffer - 0x14);
00484c15      this->vtable = 0x7a1958;
00484c11      this->vtable = &UIOption_Slider::`vftable';
00484c21      this->vtable = &UIOption_Menu::`vftable';
00484c21      
00484c37      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00484c3f          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00484c3f      
00484c43      UIElement_Scrollbar::~UIElement_Scrollbar(&this->vtable);
00484c4d      /* tailcall */
00484c4d      return UIOption::~UIOption(this);
00484c00  }

00484c52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00484c60  class UIElement* __thiscall UIOption_Slider::DynamicCast(class UIOption_Slider* this, uint32_t arg2) __pure

00484c60  {
00484c6a      if (arg2 == 0x10000037)
00484c6a      {
00484c6e          if (this == 0)
00484c78              return 0;
00484c78          
00484c73          return &this->vtable;
00484c6a      }
00484c6a      
00484c7e      struct UIElement_Scrollbar::VTable** result = &this->vtable;
00484c7e      
00484c8b      if ((arg2 == 0xb || (arg2 == 1 || arg2 == 0xc)))
00484c98          return result;
00484c98      
00484c92      int32_t ecx;
00484c92      ecx = arg2 != 0xa;
00484c96      return (result & (ecx - 1));
00484c60  }

00484c9b                                                                                   90 90 90 90 90                             .....

00484ca0  uint32_t UIOption_Slider::GetUIElementType(class UIOption_Slider const* this @ ecx) __pure

00484ca0  {
00484ca5      return 0x10000037;
00484ca0  }

00484ca6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00484cb0  void* __thiscall UIOption_Slider::`vector deleting destructor'(class UIOption_Slider* this, uint32_t arg2)

00484cb0  {
00484cb3      /* tailcall */
00484cb3      return UIOption_Slider::`scalar deleting destructor'(((char*)this - 0x20), arg2);
00484cb0  }

00484cb8                                                                          cc cc cc cc cc cc cc cc                          ........

00484cc0  class UIElement* __thiscall UIOption_Slider::DynamicCast(class UIOption_Slider* this, uint32_t arg2)

00484cc0  {
00484cc3      /* tailcall */
00484cc3      return UIOption_Slider::DynamicCast(((char*)this - 0x20), arg2);
00484cc0  }

00484cc8                          cc cc cc cc cc cc cc cc                                                          ........

00484cd0  void __thiscall UIOption_Slider::SetUIPreference(class UIOption_Slider* this, class PStringBase<char> const* arg2)

00484cd0  {
00484ce1      if (this->m_propName == 0)
00484ce1      {
00484ce7          class PSRefBufferCharData<char>* m_charbuffer = this->m_prefName.m_charbuffer;
00484cee          class PStringBase<char>* ebp_1 = arg2;
00484cee          
00484cf5          if (m_charbuffer != ebp_1->m_charbuffer)
00484cf5          {
00484d0b              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00484d13                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00484d13              
00484d15              class PSRefBufferCharData<char>* m_charbuffer_1 = ebp_1->m_charbuffer;
00484d18              this->m_prefName.m_charbuffer = m_charbuffer_1;
00484d22              InterlockedIncrement(&m_charbuffer_1[-1]);
00484cf5          }
00484cf5          
00484d39          arg2 = nullptr;
00484d3d          uint32_t var_10 = 0;
00484d41          uint32_t var_c = 0;
00484d41          
00484d4f          if (UIPreferences::InqPreference(ebp_1, &arg2, &var_10, &var_c) != 0)
00484d4f          {
00484d61              UIOption::SetLabel(this, var_10, arg2);
00484d72              UIOption::SetTooltip(this, var_c, arg2);
00484d7d              int32_t var_8;
00484d7d              int32_t var_4;
00484d7d              
00484d7d              if (this->m_setAsInt == 0)
00484d7d              {
00484dc6                  var_4 = 0;
00484dce                  var_8 = 0;
00484dce                  
00484de0                  if (UIPreferences::InqPreferenceRange(ebp_1, &var_4, &var_8) != 0)
00484de0                  {
00484de6                      int32_t eax_9 = var_8;
00484dea                      this->m_lowerValue = var_4;
00484df0                      this->m_upperValue = eax_9;
00484de0                  }
00484d7d              }
00484d7d              else
00484d7d              {
00484d8a                  var_8 = 0;
00484d8e                  var_4 = 0;
00484d8e                  
00484d9c                  if (UIPreferences::InqPreferenceRange(ebp_1, &var_8, &var_4) != 0)
00484d9c                  {
00484da3                      this->m_lowerValue = ((float)((long double)var_8));
00484dad                      this->m_upperValue = ((float)((long double)var_4));
00484d9c                  }
00484d7d              }
00484d4f          }
00484ce1      }
00484cd0  }

00484dff                                                                                               90                                 .

00484e00  void __thiscall UIOption_Slider::SetLabel(class UIOption_Slider* this, class StringInfo const* arg2)

00484e00  {
00484e06      class UIElement* eax = this->vtable->GetParent();
00484e06      
00484e0e      if (eax != 0)
00484e0e      {
00484e17          class UIElement* eax_1 = UIElement::GetChildRecursive(eax, 0x1000021b);
00484e17          
00484e1e          if (eax_1 != 0)
00484e1e          {
00484e26              class UIElement_Text* eax_2 = eax_1->vtable->DynamicCast(0xc);
00484e26              
00484e2e              if (eax_2 != 0)
00484e32                  /* tailcall */
00484e32                  return UIElement_Text::SetStringInfo(eax_2, arg2);
00484e1e          }
00484e0e      }
00484e00  }

00484e3a                                                                                90 90 90 90 90 90                            ......

00484e40  class InterfacePtr<Interface>* GetClassObject(class InterfacePtr<Interface>* __return, struct Turbine_GUID const* arg2)

00484e40  {
00484e52      int32_t var_8 = 0;
00484e61      void __return_1;
00484e61      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, arg2, &var_8);
00484e6e      __return->m_pInterface = var_8;
00484e70      __return->m_trStatus.m_val = 0;
00484e7a      return __return;
00484e40  }

00484e7b                                                                                   90 90 90 90 90                             .....

00484e80  void* __thiscall UIOption_Slider::`scalar deleting destructor'(class UIOption_Slider* this, uint32_t arg2)

00484e80  {
00484e83      UIOption_Slider::~UIOption_Slider(this);
00484e83      
00484e8d      if ((arg2 & 1) != 0)
00484e90          operator delete(this);
00484e90      
00484e9b      return this;
00484e80  }

00484e9e                                                                                            90 90                                ..

00484ea0  class TResult __thiscall InterfacePtr<class CPlayerModule>::_QueryInterface(InterfacePtr<class CPlayerModule>* this, class InterfacePtr<class Interface> arg2)

00484ea0  {
00484ea0      InterfacePtr<class CPlayerModule>* this_1 = this;
00484ea5      int32_t* edi = arg_8;
00484eaf      int32_t ebx;
00484eaf      
00484eaf      if (edi == 0)
00484eaf      {
00484f12          int32_t* ecx_4 = *(uint32_t*)this;
00484f12          
00484f16          if (ecx_4 != 0)
00484f16          {
00484f18              *(uint32_t*)this = 0;
00484f1c              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
00484f1f              *(uint32_t*)((char*)this + 4) = 0;
00484f16          }
00484f16          
00484f22          ebx = 0x80004002;
00484eaf      }
00484eaf      else
00484eaf      {
00484eb1          int32_t eax_1 = *(uint32_t*)edi;
00484ec4          arg_8 = nullptr;
00484ecb          ebx = *(uint32_t*)*(uint32_t*)(eax_1 + 0xc)(&this_1, 0x7a17e4, &arg_8);
00484ecf          int32_t* ecx_1 = *(uint32_t*)this;
00484ecf          
00484ed1          if (ebx < 0)
00484ed1          {
00484ed5              if (ecx_1 != 0)
00484ed9                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
00484ed9              
00484edc              *(uint32_t*)this = 0;
00484ede              *(uint32_t*)((char*)this + 4) = 0;
00484ee1              int32_t* esi_1 = arg2;
00484ee5              *(uint32_t*)esi_1 = ebx;
00484eeb              *(uint32_t*)(*(uint32_t*)edi + 0x14)();
00484ef5              return esi_1;
00484ed1          }
00484ed1          
00484efa          int32_t* ebp_1 = arg_8;
00484efa          
00484efe          if (ecx_1 != 0)
00484f02              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
00484f02          
00484f05          *(uint32_t*)this = ebp_1;
00484f07          *(uint32_t*)((char*)this + 4) = 0;
00484eaf      }
00484eaf      
00484f29      int32_t* esi_2 = arg2;
00484f2d      *(uint32_t*)esi_2 = ebx;
00484f2d      
00484f2f      if (edi != 0)
00484f35          *(uint32_t*)(*(uint32_t*)edi + 0x14)();
00484f35      
00484f3f      return esi_2;
00484ea0  }

00484f42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00484f50  void __thiscall UIOption_Slider::UIOption_Slider(class UIOption_Slider* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00484f50  {
00484f55      UIOption::UIOption(this);
00484f69      UIElement_Scrollbar::UIElement_Scrollbar(&this->vtable, arg2, arg3);
00484f7b      this->vtable = 0x7a1958;
00484f63      this->vtable = &UIOption_Slider::`vftable';
00484f87      this->vtable = &UIOption_Menu::`vftable';
00484f91      this->m_default = 0f;
00484f97      this->m_saved = 0f;
00484f9d      this->m_current = 0f;
00484fa3      PStringBase<char>::PStringBase<char>(&this->m_prefName, &data_7928af);
00484fa8      this->m_propName = 0;
00484fae      this->m_lowerValue = 0f;
00484fb4      this->m_upperValue = 1f;
00484fbe      this->m_numStops = 0xa;
00484fc8      this->m_precision = 1;
00484fd1      this->m_setAsInt = 0;
00484fd7      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
00484fd7      
00484fde      if (eax_1 != 0)
00484fe0          eax_1->vtable->RegisterNoticeHandler(0x186a4, this);
00484f50  }

00484ff5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00485000  class UIElement* UIOption_Slider::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00485000  {
00485005      void* eax = operator new(0x7c8);
00485005      
0048500f      if (eax != 0)
0048500f      {
0048501d          int32_t eax_1 = UIOption_Slider::UIOption_Slider(eax, arg1, arg2);
0048501d          
00485024          if (eax_1 != 0)
00485029              return (eax_1 + 0x20);
0048500f      }
0048500f      
0048502c      return 0;
00485000  }

0048502d                                         90 90 90                                                               ...

00485030  void __thiscall UIOption_Slider::SetGameplayOptionProperty(class UIOption_Slider* this, uint32_t arg2)

00485030  {
00485045      int32_t var_12c;
00485045      PStringBase<char>::PStringBase<char>(&var_12c, &data_7928af);
00485056      int32_t eax_1 = _stricmp(this->m_prefName.m_charbuffer, var_12c);
00485065      char ebx_1 = ((int8_t)-(eax_1));
00485069      int32_t* edi_1 = (var_12c - 0x14);
00485069      
00485080      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00485088          **(uint32_t**)edi_1(1);
00485088      
0048508c      if ((ebx_1 - ebx_1) != 0xff)
0048508c      {
004850a0          this->m_propName = arg2;
004850a6          void var_90;
004850a6          StringInfo::StringInfo(&var_90);
004850af          void var_120;
004850af          StringInfo::StringInfo(&var_120);
004850af          
004850cb          if (UIOption::InqGameplayOptionNameAndTooltip(this, arg2, &var_90, &var_120) != 0)
004850cb          {
004850dd              *(int32_t*)((char*)this->vtable + 0x2b0)(&var_90);
004850ec              *(int32_t*)((char*)this->vtable + 0x2b4)(&var_120);
004850f2              uint32_t m_propName = this->m_propName;
00485100              int32_t* var_128 = nullptr;
00485104              int32_t* var_124_1 = nullptr;
00485104              
0048510f              if (UIOption::InqDefaultGameplayOptionProperty(this, m_propName, &var_128) != 0)
0048510f              {
00485119                  int32_t* ecx_9 = var_124_1;
00485119                  
0048511d                  if (this->m_setAsInt == 0)
0048511d                  {
00485147                      var_12c = 0;
00485147                      
0048514f                      if (ecx_9 != 0)
00485158                          *(uint32_t*)(*(uint32_t*)ecx_9 + 0x88)(&var_12c);
00485158                      
00485162                      this->vtable->SetDefaultValue(var_12c);
0048511d                  }
0048511d                  else
0048511d                  {
00485121                      var_12c = 0;
00485121                      
00485125                      if (ecx_9 != 0)
0048512e                          ecx_9 = *(uint32_t*)(*(uint32_t*)ecx_9 + 0x78)(&var_12c);
0048512e                      
00485137                      int32_t* var_140_7 = ecx_9;
00485135                      this->vtable->SetDefaultValue(((float)((long double)var_12c)));
0048511d                  }
0048510f              }
0048510f              
0048516d              int32_t* eax_10 = var_128;
0048516d              
00485173              if (eax_10 != 0)
00485173              {
0048517d                  int32_t esi_2 = (eax_10[1] - 1);
0048517a                  eax_10[1] = esi_2;
0048517a                  
00485184                  if (esi_2 == 0)
0048518a                      **(uint32_t**)eax_10(1);
0048518a                  
0048518c                  var_128 = nullptr;
00485173              }
00485173              
00485196              if (var_124_1 != 0)
00485196              {
004851a0                  int32_t esi_4 = (var_124_1[1] - 1);
0048519d                  var_124_1[1] = esi_4;
0048519d                  
004851a7                  if (esi_4 == 0)
004851ad                      **(uint32_t**)var_124_1(1);
004851ad                  
004851af                  int32_t var_124_2 = 0;
00485196              }
004850cb          }
004850cb          
004851b7          StringInfo::~StringInfo(&var_120);
004851c3          StringInfo::~StringInfo(&var_90);
0048508c      }
00485030  }

004851d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004851e0  void __thiscall InterfacePtr<CPlayerModule>::InterfacePtr<CPlayerModule>(class InterfacePtr<CPlayerModule>* this, class InterfacePtr<Interface> const* arg2)

004851e0  {
004851e4      int32_t esi;
004851e4      int32_t var_4 = esi;
004851e9      this->m_pInterface = 0;
004851eb      this->m_trStatus.m_val = 0;
004851f0      class Interface* m_pInterface;
004851f0      int32_t* esp_1 = &m_pInterface;
004851f5      m_pInterface = arg2->m_pInterface;
004851f7      int32_t var_8 = 0;
004851fa      class Interface* m_pInterface_1 = m_pInterface;
004851fa      
004851fe      if (m_pInterface_1 != 0)
004851fe      {
00485200          m_pInterface_1->vtable->AddRef();
00485204          esp_1 = &var_4;
004851fe      }
004851fe      
0048520b      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[4];
00485215      this->m_trStatus.m_val = InterfacePtr<class CPlayerModule>::_QueryInterface(this)->m_val;
0048521a      *(uint32_t*)esp_1;
004851e0  }

0048521e                                                                                            90 90                                ..

00485220  void UIOption_Slider::Register()

00485220  {
0048522a      UIElement::RegisterElementClass(0x10000037, UIOption_Slider::Create);
00485220  }

00485233                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00485240  uint8_t __fastcall UIOption_Slider::Apply(class UIOption_Slider* this, uint8_t arg2)

00485240  {
00485243      int32_t __saved_ebx_1;
00485243      int32_t __saved_ebx = __saved_ebx_1;
00485244      int32_t __saved_ebp_2;
00485244      int32_t __saved_ebp = __saved_ebp_2;
00485245      int32_t __saved_esi_1;
00485245      int32_t __saved_esi = __saved_esi_1;
00485246      int32_t __saved_edi_2;
00485246      int32_t __saved_edi_1 = __saved_edi_2;
00485253      struct Turbine_GUID** esp_1;
00485253      struct Turbine_GUID* var_30;
00485253      
00485253      if (this->m_propName == 0)
00485253      {
004853af          if (this->m_prefName.m_charbuffer->m_data[-4] == 1)
004853af          {
00485408              class PSRefBufferCharData<char>* eax_10;
00485408              eax_10 = 0;
0048540e              return 0;
004853af          }
004853af          
004853b7          uint8_t eax_12;
004853b7          
004853b7          if (this->m_setAsInt == 0)
004853b7          {
004853cd              float m_current_1 = this->m_current;
004853d4              var_30 = &this->m_prefName;
004853d5              eax_12 = UIPreferences::ModifyPreference(var_30, m_current_1);
004853b7          }
004853b7          else
004853b7          {
004853b9              this->m_current;
004853bf              int32_t eax_11 = _ftol2();
004853c5              var_30 = &this->m_prefName;
004853c6              eax_12 = UIPreferences::ModifyPreference(var_30, eax_11);
004853b7          }
004853b7          
004853da          struct Turbine_GUID* __saved_edi;
004853da          esp_1 = &__saved_edi;
004853da          
004853df          if (eax_12 != 0)
004853df          {
004853e2              CM_UI::SendNotice_UserPreferenceChanged(&this->m_prefName);
004853e7              esp_1 = &__saved_edi;
004853df          }
00485253      }
00485253      else
00485253      {
0048525d          int32_t* var_18;
0048525d          int32_t* var_2c = &var_18;
00485262          var_30 = &CPlayerModule_ClassType;
00485268          var_18 = nullptr;
00485273          class TResult __return;
00485273          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_30, var_2c);
00485278          struct Turbine_GUID* esi = var_18;
00485281          var_30 = esi;
00485283          int32_t var_2c_1 = 0;
00485286          struct Turbine_GUID* eax_2 = var_30;
0048528a          int32_t var_8 = 0;
0048528e          int32_t var_4_1 = 0;
0048528e          
00485292          if (eax_2 != 0)
00485298              *(uint32_t*)(eax_2->m_data1 + 0x10)();
00485298          
004852a4          esp_1 = &var_30;
004852ab          int32_t* var_10;
004852ab          int32_t ebp = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_10);
004852ab          
004852ad          if (esi != 0)
004852b3              *(uint32_t*)(esi->m_data1 + 0x14)();
004852b3          
004852b6          int32_t* esi_1 = var_10;
004852b6          
004852bc          if (esi_1 != 0)
004852bc          {
004852c4              if (ebp >= 0)
004852c4              {
004852ca                  uint32_t m_propName = this->m_propName;
004852d5                  var_18 = nullptr;
004852d9                  __return = 0;
004852dd                  BaseProperty::SetPropertyName(&var_18, m_propName);
004852dd                  
004852e8                  if (this->m_setAsInt == 0)
004852e8                  {
00485370                      float m_current = this->m_current;
00485370                      
0048537e                      if (__return != 0)
0048537e                      {
00485384                          BaseProperty::CheckCopyOnWrite(&var_18);
00485394                          *(uint32_t*)(*(uint32_t*)__return + 0x8c)(m_current);
0048537e                      }
004852e8                  }
004852e8                  else
004852e8                  {
004852ee                      this->m_current;
004852f4                      int32_t eax_4 = _ftol2();
004852f4                      
004852ff                      if (__return != 0)
004852ff                      {
00485305                          BaseProperty::CheckCopyOnWrite(&var_18);
00485311                          *(uint32_t*)(*(uint32_t*)__return + 0x7c)(eax_4);
004852ff                      }
004852ff                      
00485314                      esi_1 = var_10;
004852e8                  }
004852e8                  
00485320                  PlayerModule::SetOption(&esi_1[1], &var_18);
00485320                  esp_1 = &var_30;
00485325                  int32_t* eax_5 = var_18;
00485325                  
0048532b                  if (eax_5 != 0)
0048532b                  {
00485335                      int32_t ebp_2 = (eax_5[1] - 1);
00485332                      eax_5[1] = ebp_2;
00485332                      
0048533c                      if (ebp_2 == 0)
0048533c                      {
00485340                          int32_t var_34_6 = 1;
00485342                          **(uint32_t**)eax_5(1);
00485342                          esp_1 = &var_30;
0048533c                      }
0048533c                      
00485344                      var_18 = nullptr;
0048532b                  }
0048532b                  
00485348                  class TResult __return_1 = __return;
00485348                  
0048534e                  if (__return_1 != 0)
0048534e                  {
00485358                      int32_t ebp_4 = (*(uint32_t*)(__return_1 + 4) - 1);
0048535d                      *(uint32_t*)(__return_1 + 4) = ebp_4;
0048535d                      
0048535f                      if (ebp_4 == 0)
0048535f                      {
00485363                          int32_t var_34_7 = 1;
00485365                          **(uint32_t**)__return_1(1);
00485365                          esp_1 = &var_30;
0048535f                      }
0048534e                  }
004852c4              }
004852c4              
0048536b              *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
004852bc          }
00485253      }
004853ee      struct UIOption_Slider::VTable* vtable = this->vtable;
004853f0      *(uint32_t*)((char*)esp_1 - 4) = esp_1[0xb];
004853f3      vtable->HandleDialogAndNotices();
004853f9      int32_t eax_14;
004853f9      eax_14 = 1;
004853fb      *(uint32_t*)esp_1;
004853f0      esp_1[1];
004853f0      esp_1[2];
004853f0      esp_1[3];
00485402      return 1;
00485240  }

00485411                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00485420  class TResult __fastcall UIOption_Slider::GetValue(class UIOption_Slider* this)

00485420  {
00485423      int32_t ebx;
00485423      int32_t var_20 = ebx;
00485424      float ebp;
00485424      float var_24 = ebp;
00485430      bool cond:0 = this->m_propName == 0;
00485432      int32_t __saved_edi;
00485432      int32_t* esp = &__saved_edi;
00485433      float var_1c = 0f;
0048543b      class TResult result;
0048543b      struct Turbine_GUID* result_1;
0048543b      int32_t* result_4;
0048543b      
0048543b      if (cond:0)
0048543b      {
004855ca          result = &this->m_prefName;
004855ca          
004855d0          if (this->m_prefName.m_charbuffer->m_data[-4] != 1)
004855d0          {
004855d8              if (this->m_setAsInt != 0)
004855d8              {
004855de                  int32_t** var_30_3 = &result_4;
004855df                  result_1 = result;
004855e0                  result_4 = nullptr;
004855f7                  return UIPreferences::InqPreferenceValue(result_1, var_30_3);
004855d8              }
004855d8              
004855fc              float* var_30_4 = &var_1c;
004855fd              result_1 = result;
004855fe              result = UIPreferences::InqPreferenceValue(result_1, var_30_4);
00485603              esp = &__saved_edi;
004855d0          }
0048543b      }
0048543b      else
0048543b      {
00485445          int32_t* var_30_1 = &result_4;
0048544a          result_1 = &CPlayerModule_ClassType;
00485450          result_4 = nullptr;
0048545b          class TResult __return;
0048545b          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, result_1, var_30_1);
00485460          struct Turbine_GUID* result_3 = result_4;
00485469          result_1 = result_3;
0048546b          int32_t var_30_2 = 0;
0048546e          struct Turbine_GUID* result_2 = result_1;
00485472          int32_t var_8 = 0;
00485476          int32_t var_4_1 = 0;
00485476          
0048547a          if (result_2 != 0)
00485480              *(uint32_t*)(result_2->m_data1 + 0x10)();
00485480          
0048548c          int32_t* var_10;
0048548c          result = InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_10);
0048548c          esp = &result_1;
00485493          int32_t ebp_1 = *(uint32_t*)result;
00485493          
00485495          if (result_3 != 0)
0048549b              result = *(uint32_t*)(result_3->m_data1 + 0x14)();
0048549b          
0048549e          int32_t* edi_1 = var_10;
0048549e          
004854a4          if (edi_1 != 0)
004854a4          {
004854ac              if (ebp_1 >= 0)
004854ac              {
004854b2                  uint32_t m_propName = this->m_propName;
004854bd                  result_4 = nullptr;
004854c1                  __return = 0;
004854c5                  BaseProperty::SetPropertyName(&result_4, m_propName);
004854e0                  class TResult __return_1;
004854e0                  
004854e0                  if (PlayerModule::InqOption(&edi_1[1], this->m_propName, &result_4) != 0)
00485552                      __return_1 = __return;
004854e0                  else if (this->m_setAsInt == 0)
004854e8                  {
0048554d                      BaseProperty::SetFloat(&result_4, this->m_default);
00485552                      __return_1 = __return;
004854e8                  }
004854e8                  else
004854e8                  {
004854ea                      this->m_default;
004854f0                      int32_t eax_3 = _ftol2();
004854f5                      __return_1 = __return;
004854f5                      
004854fd                      if (__return_1 != 0)
004854fd                      {
00485503                          BaseProperty::CheckCopyOnWrite(&result_4);
0048550f                          *(uint32_t*)(*(uint32_t*)__return + 0x7c)(eax_3);
00485512                          __return_1 = __return;
004854fd                      }
004854fd                      
00485516                      edi_1 = var_10;
004854e8                  }
004854e8                  
00485520                  if (this->m_setAsInt != 0)
00485520                  {
00485524                      var_20 = 0;
00485524                      
00485528                      if (__return_1 != 0)
00485528                      {
00485531                          *(uint32_t*)(*(uint32_t*)__return_1 + 0x78)(&var_20);
00485534                          __return_1 = __return;
00485528                      }
00485528                      
0048553c                      var_24 = ((float)((long double)var_20));
00485520                  }
00485520                  else if (__return_1 != 0)
0048555a                  {
00485563                      *(uint32_t*)(*(uint32_t*)__return_1 + 0x88)(&var_24);
00485569                      __return_1 = __return;
0048555a                  }
0048555a                  
0048556d                  int32_t* result_5 = result_4;
0048556d                  
00485573                  if (result_5 != 0)
00485573                  {
0048557d                      int32_t esi_2 = (result_5[1] - 1);
0048557a                      result_5[1] = esi_2;
0048557a                      
00485584                      if (esi_2 == 0)
0048558a                          **(uint32_t**)result_5(1);
0048558a                      
0048558c                      __return_1 = __return;
00485590                      result_4 = nullptr;
00485573                  }
00485573                  
00485596                  if (__return_1 != 0)
00485596                  {
0048559e                      int32_t esi_4 = (*(uint32_t*)(__return_1 + 4) - 1);
004855a3                      *(uint32_t*)(__return_1 + 4) = esi_4;
004855a3                      
004855a5                      if (esi_4 == 0)
004855ab                          **(uint32_t**)__return_1(1);
00485596                  }
004854ac              }
004854ac              
004855bf              return *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
004854a4          }
0048543b      }
00485606      esp[4];
0048560a      *(uint32_t*)esp;
0048560a      esp[1];
0048560a      esp[2];
0048560a      esp[3];
00485611      return result;
00485420  }

00485612                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00485620  uint8_t __fastcall UIOption_Slider::SaveCurrentValue(class UIOption_Slider* this)

00485620  {
00485623      class TResult eax;
00485623      long double st0;
00485623      eax = UIOption_Slider::GetValue(this);
00485628      this->m_current = ((float)st0);
0048562e      this->m_saved = ((float)st0);
00485634      eax.m_val = 1;
00485637      return 1;
00485620  }

00485638                                                                          90 90 90 90 90 90 90 90                          ........

00485640  void __thiscall UIOption_Slider::RecvNotice_ReloadOptions(class UIOption_Slider* this)

00485640  {
00485643      long double st0 = UIOption_Slider::GetValue(this);
00485648      struct UIOption_Slider::VTable* vtable = this->vtable;
0048564a      this->m_current = ((float)st0);
00485653      /* jump -> vtable->Refresh */
00485640  }

00485659                                                                             90 90 90 90 90 90 90                           .......

00485660  void __fastcall UIOption_CheckboxBitfield64::ChildInfo::ChildInfo(class UIOption_CheckboxBitfield64::ChildInfo* this)

00485660  {
00485666      this->llMask = 0;
0048566c      *(uint32_t*)((char*)this->llMask)[4] = 0;
00485673      StringInfo::StringInfo(&this->siLabel);
0048567e      StringInfo::StringInfo(&this->siTooltip);
00485660  }

00485687                       90 90 90 90 90 90 90 90 90                                                         .........

00485690  void __fastcall UIOption_CheckboxBitfield64::PostInit(class UIOption_CheckboxBitfield64* this)

00485690  {
00485690      /* tailcall */
00485690      return UIElement_Scrollable::PostInit(this);
00485690  }

00485695                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004856a0  uint8_t __fastcall UIOption_CheckboxBitfield64::Changed(class UIOption_CheckboxBitfield64* this)

004856a0  {
004856ba      if ((this->m_saved == this->m_current && *(uint32_t*)((char*)this->m_saved)[4] == *(uint32_t*)((char*)this->m_current)[4]))
004856c4          return 0;
004856c4      
004856c1      return 1;
004856a0  }

004856c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004856d0  uint8_t __fastcall UIOption_CheckboxBitfield64::SaveCurrentValue(class UIOption_CheckboxBitfield64* this)

004856d0  {
004856d5      int32_t eax_1;
004856d5      int32_t edx;
004856d5      eax_1 = this->vtable->GetValue();
004856db      this->m_current = eax_1;
004856e1      this->m_saved = eax_1;
004856e7      *(uint32_t*)((char*)this->m_current)[4] = edx;
004856ed      *(uint32_t*)((char*)this->m_saved)[4] = edx;
004856f3      eax_1 = 1;
004856f6      return 1;
004856d0  }

004856f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00485700  uint8_t __fastcall UIOption_CheckboxBitfield64::RestoreSavedValue(class UIOption_CheckboxBitfield64* this)

00485700  {
00485711      *(uint32_t*)((char*)this->m_current)[4] = *(uint32_t*)((char*)this->m_saved)[4];
0048571b      this->m_current = this->m_saved;
0048570f      this->vtable->Apply(0);
00485727      this->vtable->Refresh();
00485731      int32_t eax_2;
00485731      eax_2 = 1;
00485734      return 1;
00485700  }

00485735                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00485740  uint8_t __fastcall UIOption_CheckboxBitfield64::RestoreDefaultValue(class UIOption_CheckboxBitfield64* this)

00485740  {
00485751      *(uint32_t*)((char*)this->m_current)[4] = *(uint32_t*)((char*)this->m_default)[4];
0048575b      this->m_current = this->m_default;
0048574f      this->vtable->Apply(0);
00485767      this->vtable->Refresh();
00485771      int32_t eax_2;
00485771      eax_2 = 1;
00485774      return 1;
00485740  }

00485775                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00485780  void __thiscall UIOption_CheckboxBitfield64::SetDefaultValue(class UIOption_CheckboxBitfield64* this, uint64_t arg2)

00485780  {
00485788      this->m_default = arg2;
0048578e      *(uint32_t*)((char*)this->m_default)[4] = *(uint32_t*)((char*)arg2)[4];
00485780  }

00485797                                                                       90 90 90 90 90 90 90 90 90                         .........

004857a0  void __thiscall UIOption_CheckboxBitfield64::RecvNotice_RefreshOptionsPanel(class UIOption_CheckboxBitfield64* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004857a0  {
004857a5      int32_t eax_1;
004857a5      int32_t edx;
004857a5      eax_1 = this->vtable->GetValue();
004857ab      *(uint32_t*)((char*)this->m_current)[4] = edx;
004857b3      this->m_current = eax_1;
004857bc      /* jump -> this->vtable->Refresh */
004857a0  }

004857c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004857d0  uint64_t* BitUtils::SetBitsOnOrOff(uint64_t* arg1, uint64_t arg2, uint8_t arg3)

004857d0  {
004857d4      int32_t ecx = arg2;
004857d4      
004857de      if (arg3 != 0)
004857de      {
004857e4          int32_t ecx_1 = *(uint32_t*)((char*)arg1 + 4);
004857e7          *(uint32_t*)arg1 |= ecx;
004857ef          *(uint32_t*)((char*)arg1 + 4) = (ecx_1 | *(uint32_t*)((char*)arg2)[4]);
004857f2          return arg1;
004857de      }
004857de      
00485803      int32_t ecx_5 = (*(uint32_t*)((char*)arg1 + 4) & !(*(uint32_t*)((char*)arg2)[4]));
00485805      *(uint32_t*)arg1 &= !(ecx);
00485808      *(uint32_t*)((char*)arg1 + 4) = ecx_5;
0048580b      return arg1;
004857d0  }

0048580c                                      90 90 90 90                                                              ....

00485810  void* __thiscall UIOption_CheckboxBitfield64::ChildInfo::`vector deleting destructor'(class UIOption_CheckboxBitfield64::ChildInfo* this, uint32_t arg2)

00485810  {
00485811      int32_t ebx;
00485811      ebx = arg2;
00485811      
0048581b      if ((ebx & 2) == 0)
0048581b      {
00485878          StringInfo::~StringInfo(&this->siTooltip);
00485880          StringInfo::~StringInfo(&this->siLabel);
00485880          
00485888          if ((ebx & 1) != 0)
0048588b              operator delete(this);
0048588b          
00485897          return this;
0048581b      }
0048581b      
0048581d      int32_t i_2 = *(uint32_t*)((char*)this->llMask)[-4];
0048581d      
0048582f      if ((i_2 - 1) >= 0)
0048582f      {
00485832          void* esi_1 = (&this->siLabel + (i_2 * 0x128));
00485835          int32_t i_1 = i_2;
00485859          int32_t i;
00485859          
00485859          do
00485859          {
00485840              esi_1 -= 0x128;
0048584c              StringInfo::~StringInfo(((char*)esi_1 + 0x90));
00485853              StringInfo::~StringInfo(esi_1);
00485858              i = i_1;
00485858              i_1 -= 1;
00485859          } while (i != 1);
0048582f      }
0048582f      
0048585f      if ((ebx & 1) != 0)
00485862          operator delete[](((char*)this - 4));
00485862      
0048586f      return ((char*)this - 4);
00485810  }

0048583a                                                                                8d 9b 00 00 00 00                            ......
0048589a                                                                                90 90 90 90 90 90                            ......

004858a0  class UIOption_CheckboxBitfield64::ChildInfo& __thiscall UIOption_CheckboxBitfield64::ChildInfo::operator=(UIOption_CheckboxBitfield64::ChildInfo* this, class UIOption_CheckboxBitfield64::ChildInfo const& arg2)

004858a0  {
004858aa      *(uint32_t*)this = *(uint32_t*)arg2;
004858b2      *(uint32_t*)((char*)this + 4) = *(uint32_t*)((char*)arg2 + 4);
004858b9      StringInfo::operator=(((char*)this + 8), ((char*)arg2 + 8));
004858cb      StringInfo::operator=(((char*)this + 0x98), ((char*)arg2 + 0x98));
004858d4      return this;
004858a0  }

004858d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004858e0  void __fastcall SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>::Reset(class SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>* this)

004858e0  {
004858e9      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004858fd      this->m_num = 0;
004858fd      
00485900      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00485900      {
00485902          class UIOption_CheckboxBitfield64::ChildInfo* m_data = this->m_data;
00485902          
00485906          if (m_data != 0)
0048590a              UIOption_CheckboxBitfield64::ChildInfo::`vector deleting destructor'(m_data, 3);
0048590a          
0048590f          this->m_data = 0;
00485911          this->m_sizeAndDeallocate = 0;
0048591c          return;
00485900      }
00485900      
0048591f      if (this->m_data != 0)
0048591f      {
00485925          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00485925          
0048592b          if ((i_2 - 1) >= 0)
0048592b          {
00485935              int32_t edi_2 = ((i_2 - 1) * 0x128);
0048593b              int32_t i_1 = i_2;
004859ac              int32_t i;
004859ac              
004859ac              do
004859ac              {
0048594e                  void var_120;
0048594e                  StringInfo::StringInfo(&var_120);
0048595a                  void var_90;
0048595a                  StringInfo::StringInfo(&var_90);
00485965                  void* esi_2 = (this->m_data + edi_2);
0048596b                  *(uint32_t*)esi_2 = 0;
00485975                  *(uint32_t*)((char*)esi_2 + 4) = 0;
00485978                  StringInfo::operator=(((char*)esi_2 + 8), &var_120);
0048598b                  StringInfo::operator=(((char*)esi_2 + 0x98), &var_90);
00485997                  StringInfo::~StringInfo(&var_90);
004859a0                  StringInfo::~StringInfo(&var_120);
004859a5                  edi_2 -= 0x128;
004859ab                  i = i_1;
004859ab                  i_1 -= 1;
004859ac              } while (i != 1);
0048592b          }
0048591f      }
004858e0  }

004859b9                                                                             90 90 90 90 90 90 90                           .......

004859c0  void __fastcall UIOption_CheckboxBitfield64::Refresh(class UIOption_CheckboxBitfield64* this)

004859c0  {
004859cd      int32_t ebp = 0;
004859d1      uint32_t var_c = 0;
004859d1      
004859d5      if (this->m_rgChildValues.m_num > 0)
004859d5      {
004859db          int32_t ebx;
004859db          int32_t var_1c_1 = ebx;
00485ac3          bool cond:2_1;
00485ac3          
00485ac3          do
00485ac3          {
004859e0              class UIOption_CheckboxBitfield64::ChildInfo* m_data = this->m_rgChildValues.m_data;
004859e6              int32_t edx_1 = *(uint32_t*)((char*)m_data + ebp);
004859e9              int32_t esi_1 = *(uint32_t*)(((char*)m_data + ebp) + 4);
004859f9              int32_t eax_2 = (this->m_current & edx_1);
004859fb              int32_t ecx_2 = (*(uint32_t*)((char*)this->m_current)[4] & esi_1);
004859ff              char var_d_1;
004859ff              
004859ff              if (eax_2 == edx_1)
00485a03                  var_d_1 = 1;
00485a03              
00485a08              if ((eax_2 != edx_1 || ecx_2 != esi_1))
00485a0a                  var_d_1 = 0;
00485a0a              
00485a11              if ((eax_2 | ecx_2) != 0)
00485a17                  ebx = 0;
00485a11              else
00485a13                  ebx = 1;
00485a13              
00485a21              class UIElement* eax_4 = UIElement_ListBox::GetItem(&this->vtable, var_c);
00485a21              
00485a28              if (eax_4 != 0)
00485a28              {
00485a35                  class UIElement* eax_5 = UIElement::GetChild(eax_4, 0x10000219);
00485a35                  
00485a3e                  if (eax_5 != 0)
00485a3e                  {
00485a4a                      UIElement::SetAttribute_Bool(eax_5, 0xe, ebx == 0);
00485a4a                      
00485a51                      if (ebx == 0)
00485a51                      {
00485a5a                          class UIElement* esi_3 = UIElement::GetFirstChildElement(eax_5);
00485a5a                          
00485a5e                          if (esi_3 != 0)
00485a5e                          {
00485a60                              class UIElement* eax_6;
00485a60                              eax_6 = var_d_1;
00485a69                              class IDClass<_tagDataID,32,0> var_4;
00485a69                              class IDClass<_tagDataID,32,0> var_8;
00485a69                              
00485a69                              if (eax_6 == 0)
00485a69                              {
00485a9a                                  if (UIElement::GetAttribute_DataID(&this->vtable, 0x10000083, &var_4) != 0)
00485a9a                                  {
00485aa0                                      int32_t var_24_6 = 6;
00485aa2                                      int32_t var_28_2 = 1;
00485aa7                                      UIElement::SetMediaImageForState(esi_3, var_4, 1, 6);
00485a9a                                  }
00485a69                              }
00485a69                              else if (UIElement::GetAttribute_DataID(&this->vtable, 0x10000082, &var_8) != 0)
00485a7c                              {
00485a82                                  int32_t var_24_4 = 6;
00485a84                                  int32_t var_28_1 = 1;
00485aa7                                  UIElement::SetMediaImageForState(esi_3, var_8, 1, 6);
00485a7c                              }
00485a5e                          }
00485a51                      }
00485a3e                  }
00485a28              }
00485a28              
00485ab7              ebp += 0x128;
00485abd              cond:2_1 = (var_c + 1) < this->m_rgChildValues.m_num;
00485abf              var_c += 1;
00485ac3          } while (cond:2_1);
004859d5      }
004859c0  }

00485ad1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00485ae0  enum UIElementMessageListenResult __fastcall UIOption_CheckboxBitfield64::ListenToElementMessage(class UIOption_CheckboxBitfield64* this, struct UIElementMessageInfo const* arg2)

00485ae0  {
00485ae0      class UIOption_CheckboxBitfield64* this_1 = this;
00485ae3      struct UIElementMessageInfo* edi = arg2;
00485ae3      
00485aed      if (edi->idMessage == 1)
00485aed      {
00485aef          class UIElement* pElement = edi->pElement;
00485aef          
00485af4          if (((pElement != 0 && UIElement::GetAttribute_Int(pElement, 0x10000084, &arg2) != 0) && UIElement::GetAttribute_Bool(edi->pElement, 0xe, &this_1) != 0))
00485af4          {
00485b1c              struct UIElementMessageInfo* eax_4 = arg2;
00485b1c              
00485b26              if (eax_4 < *(uint32_t*)((char*)this->m_saved)[4])
00485b26              {
00485b2c                  int32_t eax_5 = (eax_4 * 0x128);
00485b32                  int32_t* ecx_1 = *(uint32_t*)((char*)this->m_default)[4];
00485b40                  int32_t var_14_1 = *(uint32_t*)(((char*)ecx_1 + eax_5) + 4);
00485b49                  BitUtils::SetBitsOnOrOff(&this->m_nAnimEndX, *(uint32_t*)((char*)ecx_1 + eax_5), ((int8_t)this_1));
00485b59                  *(uint32_t*)(*(int32_t*)((char*)this + -0x20) + 0x2d4)(1);
00485b26              }
00485af4          }
00485aed      }
00485aed      
00485b6a      return UIElement_ListBox::ListenToElementMessage(this, edi);
00485ae0  }

00485b6d                                         90 90 90                                                               ...

00485b70  uint8_t __thiscall SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>::grow(class SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>* this, uint32_t arg2)

00485b70  {
00485b72      uint32_t ebp = arg2;
00485b7c      uint32_t* eax;
00485b7c      
00485b7c      if (ebp >= this->m_num)
00485b7c      {
00485b8c          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
00485b8c          {
00485c3a              eax = 1;
00485c3d              return 1;
00485b8c          }
00485b8c          
00485b94          if (ebp == 0)
00485b94          {
00485b96              SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>::Reset(this);
00485b9d              int32_t eax_2;
00485b9d              eax_2 = 1;
00485ba0              return 1;
00485b94          }
00485b94          
00485baf          eax = operator new[](((ebp * 0x128) + 4));
00485baf          
00485bb9          if (eax != 0)
00485bb9          {
00485bc5              void* ebx_1 = &eax[1];
00485bce              *(uint32_t*)eax = ebp;
00485bd0              `vector constructor iterator'(ebx_1, 0x128, ebp, UIOption_CheckboxBitfield64::ChildInfo::ChildInfo);
00485bd0              
00485bd7              if (ebx_1 != 0)
00485bd7              {
00485bdc                  if (this->m_data != 0)
00485bdc                  {
00485bde                      uint32_t m_num = this->m_num;
00485bde                      
00485be2                      if ((m_num - 1) >= 0)
00485be2                      {
00485be7                          void* esi_2 = ((m_num - 1) * 0x128);
00485bee                          arg2 = m_num;
00485c0e                          bool cond:0_1;
00485c0e                          
00485c0e                          do
00485c0e                          {
00485bfa                              UIOption_CheckboxBitfield64::ChildInfo::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
00485c03                              esi_2 -= 0x128;
00485c09                              cond:0_1 = arg2 != 1;
00485c0a                              arg2 -= 1;
00485c0e                          } while (cond:0_1);
00485be2                      }
00485be2                      
00485c1e                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00485c1e                      {
00485c20                          class UIOption_CheckboxBitfield64::ChildInfo* m_data = this->m_data;
00485c20                          
00485c24                          if (m_data != 0)
00485c28                              UIOption_CheckboxBitfield64::ChildInfo::`vector deleting destructor'(m_data, 3);
00485c1e                      }
00485bdc                  }
00485bdc                  
00485c33                  this->m_data = ebx_1;
00485c35                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
00485c3a                  eax = 1;
00485c3d                  return 1;
00485bd7              }
00485bb9          }
00485b7c      }
00485b7c      
00485c42      eax = 0;
00485c45      return 0;
00485b70  }

00485c48                          90 90 90 90 90 90 90 90                                                          ........

00485c50  void __thiscall UIOption_CheckboxBitfield64::UIOption_CheckboxBitfield64(class UIOption_CheckboxBitfield64* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00485c50  {
00485c54      UIOption::UIOption(this);
00485c68      UIElement_ListBox::UIElement_ListBox(&this->vtable, arg2, arg3);
00485c62      this->vtable = &UIOption_CheckboxBitfield64::`vftable';
00485c75      this->vtable = 0x7a1ca0;
00485c7b      __builtin_memset(&this->m_default, 0, 0x18);
00485c9f      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00485cab      this->m_prefName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00485cb1      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00485cb7      __builtin_memset(&this->m_propName, 0, 0x14);
00485c50  }

00485cdc                                                                                      90 90 90 90                              ....

00485ce0  class UIElement* __thiscall UIOption_CheckboxBitfield64::DynamicCast(class UIOption_CheckboxBitfield64* this, uint32_t arg2) __pure

00485ce0  {
00485cea      if (arg2 == 0x10000044)
00485cea      {
00485cee          if (this == 0)
00485cf8              return 0;
00485cf8          
00485cf3          return &this->vtable;
00485cea      }
00485cea      
00485cfe      struct UIElement_ListBox::VTable** result = &this->vtable;
00485cfe      
00485d01      if (arg2 == 5)
00485d0e          return result;
00485d0e      
00485d08      int32_t ecx;
00485d08      ecx = arg2 != 0xa;
00485d0c      return (result & (ecx - 1));
00485ce0  }

00485d11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00485d20  uint32_t UIOption_CheckboxBitfield64::GetUIElementType(class UIOption_CheckboxBitfield64 const* this @ ecx) __pure

00485d20  {
00485d25      return 0x10000044;
00485d20  }

00485d26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00485d30  void* __thiscall UIOption_CheckboxBitfield64::`vector deleting destructor'(class UIOption_CheckboxBitfield64* this, uint32_t arg2)

00485d30  {
00485d33      /* tailcall */
00485d33      return UIOption_CheckboxBitfield64::`scalar deleting destructor'(((char*)this - 0x20), arg2);
00485d30  }

00485d38                                                                          cc cc cc cc cc cc cc cc                          ........

00485d40  class UIElement* __thiscall UIOption_CheckboxBitfield64::DynamicCast(class UIOption_CheckboxBitfield64* this, uint32_t arg2)

00485d40  {
00485d43      /* tailcall */
00485d43      return UIOption_CheckboxBitfield64::DynamicCast(((char*)this - 0x20), arg2);
00485d40  }

00485d48                          cc cc cc cc cc cc cc cc                                                          ........

00485d50  void __fastcall UIOption_CheckboxBitfield64::~UIOption_CheckboxBitfield64(class UIOption_CheckboxBitfield64* this)

00485d50  {
00485d57      this->vtable = 0x7a1ca0;
00485d54      this->vtable = &UIOption_CheckboxBitfield64::`vftable';
00485d54      
00485d74      if ((this->m_rgChildValues.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00485d74      {
00485d76          class UIOption_CheckboxBitfield64::ChildInfo* m_data = this->m_rgChildValues.m_data;
00485d76          
00485d7e          if (m_data != 0)
00485d82              UIOption_CheckboxBitfield64::ChildInfo::`vector deleting destructor'(m_data, 3);
00485d74      }
00485d74      
00485d8d      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_prefName.m_charbuffer - 0x14);
00485d8d      
00485da0      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00485da8          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00485da8      
00485dac      UIElement_ListBox::~UIElement_ListBox(&this->vtable);
00485db6      /* tailcall */
00485db6      return UIOption::~UIOption(this);
00485d50  }

00485dbb                                                                                   90 90 90 90 90                             .....

00485dc0  class UIElement* UIOption_CheckboxBitfield64::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00485dc0  {
00485dc5      void* eax = operator new(0x6b8);
00485dc5      
00485dcf      if (eax != 0)
00485dcf      {
00485ddd          int32_t eax_1 = UIOption_CheckboxBitfield64::UIOption_CheckboxBitfield64(eax, arg1, arg2);
00485ddd          
00485de4          if (eax_1 != 0)
00485de9              return (eax_1 + 0x20);
00485dcf      }
00485dcf      
00485dec      return 0;
00485dc0  }

00485ded                                         90 90 90                                                               ...

00485df0  void __thiscall UIOption_CheckboxBitfield64::CreateChildren(class UIOption_CheckboxBitfield64* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00485df0  {
00485df2      int32_t esi;
00485df2      int32_t var_c = esi;
00485df3      int32_t edi;
00485df3      int32_t var_10 = edi;
00485dfc      int32_t i = 0;
00485dfc      
00485e00      if (this->m_rgChildValues.m_num > 0)
00485e00      {
00485e02          int32_t ebx_1 = 0;
00485e02          
00485e79          do
00485e79          {
00485e0b              class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(&this->vtable, 0, nullptr);
00485e0b              
00485e12              if (eax_1 != 0)
00485e12              {
00485e1b                  class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x10000219);
00485e1b                  
00485e22                  if (eax_2 != 0)
00485e22                  {
00485e2a                      class UIElement* eax_3 = eax_2->vtable->DynamicCast(1);
00485e2a                      
00485e34                      if (eax_3 != 0)
00485e34                      {
00485e3e                          UIElement::SetAttribute_Int(eax_3, 0x10000084, i);
00485e50                          UIElement_Text::SetStringInfo(eax_3, (&this->m_rgChildValues.m_data->siLabel + ebx_1));
00485e65                          UIElement::SetTooltip(eax_3, (&this->m_rgChildValues.m_data->siTooltip + ebx_1));
00485e34                      }
00485e22                  }
00485e12              }
00485e12              
00485e70              i += 1;
00485e71              ebx_1 += 0x128;
00485e79          } while (i < this->m_rgChildValues.m_num);
00485e00      }
00485e00      
00485e7b      struct UIElement_ListBox::VTable* vtable = this->vtable;
00485e87      int32_t eax_7 = UIElement_ListBox::CalculatePaperSize(&this->vtable, 0, 0xffffffff);
00485e97      vtable->ResizeTo(UIRegion::GetWidth(&this->vtable), eax_7);
00485ea2      /* jump -> this->vtable->Refresh */
00485df0  }

00485ea8                          90 90 90 90 90 90 90 90                                                          ........

00485eb0  void* __thiscall UIOption_CheckboxBitfield64::`scalar deleting destructor'(class UIOption_CheckboxBitfield64* this, uint32_t arg2)

00485eb0  {
00485eb3      UIOption_CheckboxBitfield64::~UIOption_CheckboxBitfield64(this);
00485eb3      
00485ebd      if ((arg2 & 1) != 0)
00485ec0          operator delete(this);
00485ec0      
00485ecb      return this;
00485eb0  }

00485ece                                            90 90                                                                ..

00485ed0  void UIOption_CheckboxBitfield64::Register()

00485ed0  {
00485eda      UIElement::RegisterElementClass(0x10000044, UIOption_CheckboxBitfield64::Create);
00485ed0  }

00485ee3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00485ef0  void __thiscall UIOption_CheckboxBitfield64::SetGameplayOptionProperty(class UIOption_CheckboxBitfield64* this, uint32_t arg2, enum UIOption_CheckboxBitfield64::PropertyType arg3)

00485ef0  {
00485ef0      class UIOption_CheckboxBitfield64* this_1 = this;
00485eff      PStringBase<char>::PStringBase<char>(&this_1, &data_7928af);
00485f10      int32_t eax_1 = _stricmp(this->m_prefName.m_charbuffer, this_1);
00485f1f      char ebx_1 = ((int8_t)-(eax_1));
00485f23      void* __offset(UIOption_CheckboxBitfield64, -0x14) esi_1 = ((char*)this_1 - 0x14);
00485f23      
00485f38      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00485f40          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00485f40      
00485f44      if ((ebx_1 - ebx_1) != 0xff)
00485f44      {
00485f4e          this->m_propName = arg2;
00485f54          this->m_propType = arg3;
00485f44      }
00485ef0  }

00485f61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00485f70  uint8_t __thiscall SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>::AddToEnd(class SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>* this, class UIOption_CheckboxBitfield64::ChildInfo const* arg2)

00485f70  {
00485f79      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00485f79      
00485f80      if (this->m_num >= eax_1)
00485f80      {
00485f8e          uint8_t result = SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
00485f8e          
00485f95          if (result == 0)
00485f98              return result;
00485f80      }
00485f80      
00485fae      void* esi_2 = ((this->m_num * 0x128) + this->m_data);
00485fb0      *(uint32_t*)esi_2 = arg2->llMask;
00485fb8      *(uint32_t*)((char*)esi_2 + 4) = *(uint32_t*)((char*)arg2->llMask)[4];
00485fbf      StringInfo::operator=(((char*)esi_2 + 8), &arg2->siLabel);
00485fd1      StringInfo::operator=(((char*)esi_2 + 0x98), &arg2->siTooltip);
00485fdb      this->m_num += 1;
00485fdf      uint32_t eax_6;
00485fdf      eax_6 = 1;
00485fe2      return 1;
00485f70  }

00485fe5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00485ff0  uint8_t __fastcall UIOption_CheckboxBitfield64::Apply(class UIOption_CheckboxBitfield64* this, uint8_t arg2)

00485ff0  {
00486003      if (this->m_propName == 0)
00486003      {
00486147          uint32_t eax;
00486147          eax = 0;
0048614d          return 0;
00486003      }
00486003      
00486018      int32_t* var_1c = nullptr;
00486023      class TResult __return;
00486023      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, &CPlayerModule_ClassType, &var_1c);
00486028      int32_t* ecx_1 = var_1c;
0048603c      int32_t var_8 = 0;
00486040      int32_t var_4 = 0;
00486040      
00486044      if (ecx_1 != 0)
0048604a          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x10)(ecx_1, 0);
0048604a      
00486056      int32_t* var_14;
00486056      InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_14);
00486056      
0048605d      if (ecx_1 != 0)
00486063          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)(ecx_1, 0);
00486063      
00486066      uint32_t m_propName = this->m_propName;
00486071      __return = 0;
00486075      var_14 = nullptr;
00486079      BaseProperty::SetPropertyName(&__return, m_propName);
00486082      int32_t edi_1 = this->m_current;
00486088      int32_t ebx = *(uint32_t*)((char*)this->m_current)[4];
00486088      
0048608e      if (var_14 != 0)
0048608e      {
00486094          BaseProperty::CheckCopyOnWrite(&__return);
004860a1          *(uint32_t*)(*(uint32_t*)var_14 + 0xec)(edi_1, ebx);
0048608e      }
0048608e      
004860a7      enum UIOption_CheckboxBitfield64::PropertyType m_propType = this->m_propType;
004860b3      int32_t* var_10;
004860b3      
004860b3      if (m_propType == Normal_PropType)
004860d3          PlayerModule::SetOption(&var_10[1], &__return);
004860b3      else if (m_propType == 1)
004860c4          PlayerModule::SetChatWindowOption(&var_10[1], this->m_nUserData, &__return);
004860c4      
004860d8      class TResult __return_1 = __return;
004860d8      
004860de      if (__return_1 != 0)
004860de      {
004860e8          int32_t ebx_2 = (*(uint32_t*)(__return_1 + 4) - 1);
004860ed          *(uint32_t*)(__return_1 + 4) = ebx_2;
004860ed          
004860ef          if (ebx_2 == 0)
004860f5              **(uint32_t**)__return_1(1);
004860f5          
004860f7          __return = 0;
004860de      }
004860de      
004860fb      int32_t* eax_7 = var_14;
004860fb      
00486101      if (eax_7 != 0)
00486101      {
0048610b          int32_t ebx_4 = (eax_7[1] - 1);
00486108          eax_7[1] = ebx_4;
00486108          
00486112          if (ebx_4 == 0)
00486118              **(uint32_t**)eax_7(1);
00486118          
0048611a          var_14 = nullptr;
00486101      }
00486101      
00486120      if (var_10 != 0)
00486126          *(uint32_t*)(*(uint32_t*)var_10 + 0x14)(ecx_1, 0);
00486126      
0048612d      this->vtable->HandleDialogAndNotices(var_4, ecx_1, 0);
00486138      int32_t eax_11;
00486138      eax_11 = 1;
00486141      return 1;
00485ff0  }


00486150  int32_t* __fastcall UIOption_CheckboxBitfield64::GetValue(class UIOption_CheckboxBitfield64* this)

00486150  {
00486153      int32_t ebx;
00486153      int32_t var_28 = ebx;
00486154      int32_t esi;
00486154      int32_t var_2c = esi;
0048615d      int32_t* result = this->m_default;
0048616b      bool cond:0 = this->m_propName == 0;
0048616d      int32_t edi;
0048616d      int32_t var_30 = edi;
0048616d      int32_t* esp = &var_30;
00486172      int32_t var_c = *(uint32_t*)((char*)this->m_default)[4];
00486172      
00486176      if (!(cond:0))
00486176      {
00486180          struct Turbine_GUID* var_24;
00486180          int32_t* var_34_1 = &var_24;
00486185          struct Turbine_GUID* var_38 = &CPlayerModule_ClassType;
0048618b          var_24 = nullptr;
00486196          class TResult __return;
00486196          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_38, var_34_1);
0048619b          struct Turbine_GUID* ecx_2 = var_24;
004861a4          var_38 = ecx_2;
004861a6          int32_t var_34_2 = 0;
004861a9          struct Turbine_GUID* eax_1 = var_38;
004861af          int32_t var_8 = 0;
004861b3          int32_t var_4_1 = 0;
004861b3          
004861b7          if (eax_1 != 0)
004861bd              *(uint32_t*)(eax_1->m_data1 + 0x10)();
004861bd          
004861c9          int32_t* var_1c;
004861c9          InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_1c);
004861c9          esp = &var_38;
004861c9          
004861d0          if (ecx_2 != 0)
004861d6              *(uint32_t*)(ecx_2->m_data1 + 0x14)();
004861d6          
004861d9          enum UIOption_CheckboxBitfield64::PropertyType m_propType = this->m_propType;
004861e3          int32_t* ecx_6 = nullptr;
004861e7          __return = 0;
004861eb          var_1c = nullptr;
004861ef          uint8_t eax_4;
004861ef          
004861ef          if (m_propType == Normal_PropType)
004861ef          {
0048621d              eax_4 = PlayerModule::InqOption(&result[1], this->m_propName, &__return);
0048621d              esp = &var_38;
00486224          label_486224:
00486224              ecx_6 = var_1c;
00486224              
0048622c              if ((eax_4 != 0 && ecx_6 != 0))
0048622c              {
00486235                  void var_18;
00486235                  *(uint32_t*)(*(uint32_t*)ecx_6 + 0xe8)(&var_18);
00486235                  esp = &var_38;
0048623b                  ecx_6 = var_1c;
0048622c              }
0048622c              
0048623f              class TResult __return_1 = __return;
0048623f              
00486245              if (__return_1 != 0)
00486245              {
0048624f                  int32_t esi_3 = (*(uint32_t*)(__return_1 + 4) - 1);
00486254                  *(uint32_t*)(__return_1 + 4) = esi_3;
00486254                  
00486256                  if (esi_3 == 0)
00486256                  {
0048625c                      **(uint32_t**)__return_1(1);
0048625c                      esp = &var_38;
00486256                  }
00486256                  
0048625e                  ecx_6 = var_1c;
00486262                  __return = 0;
00486245              }
004861ef          }
004861ef          else if (m_propType == 1)
004861f2          {
00486207              eax_4 = PlayerModule::InqChatWindowOption(&result[1], this->m_nUserData, this->m_propName, &__return);
00486207              esp = &var_38;
0048620c              goto label_486224;
004861f2          }
004861f2          
00486268          if (ecx_6 != 0)
00486268          {
00486270              int32_t esi_5 = (ecx_6[1] - 1);
0048626d              ecx_6[1] = esi_5;
0048626d              
00486277              if (esi_5 == 0)
00486277              {
0048627d                  **(uint32_t**)ecx_6(1);
0048627d                  esp = &var_38;
00486277              }
00486277              
0048627f              var_1c = nullptr;
00486268          }
00486268          
00486285          if (result != 0)
00486285          {
0048628b              *(uint32_t*)(*(uint32_t*)result + 0x14)();
0048628b              esp = &var_30;
00486285          }
00486285          
0048628e          result = esp[8];
00486292          esp[9];
00486176      }
00486176      
00486296      *(uint32_t*)esp;
00486296      esp[1];
00486296      esp[2];
0048629c      return result;
00486150  }

0048629d                                                                                         90 90 90                               ...

004862a0  void __thiscall UIOption_CheckboxBitfield64::AddChild(class UIOption_CheckboxBitfield64* this, uint64_t arg2, uint32_t arg3, uint32_t arg4)

004862a0  {
004862b7      int32_t var_124 = *(uint32_t*)((char*)arg2)[4];
004862bf      int32_t var_128 = arg2;
004862c3      void var_120;
004862c3      StringInfo::StringInfo(&var_120);
004862cf      void var_90;
004862cf      StringInfo::StringInfo(&var_90);
004862e5      StringInfo::SetStringIDandTableEnum(&var_120, arg3, 0x10000006);
004862fe      StringInfo::SetStringIDandTableEnum(&var_90, arg4, 0x10000006);
0048630e      SmartArray<UIOption_CheckboxBitfield64::ChildInfo,1>::AddToEnd(&this->m_rgChildValues, &var_128);
0048631a      StringInfo::~StringInfo(&var_90);
00486323      StringInfo::~StringInfo(&var_120);
004862a0  }

00486332                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00486340  class UIElement* __thiscall UIOption_CheckboxBitfield::DynamicCast(class UIOption_CheckboxBitfield* this, uint32_t arg2)

00486340  {
00486349      if (arg2 != 0x10000043)
0048635e          /* tailcall */
0048635e          return UIOption_Checkbox::DynamicCast(this, arg2);
0048635e      
0048634d      if (this == 0)
00486357          return 0;
00486357      
00486352      return &this->vtable;
00486340  }

00486363           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00486370  class UIElement* __thiscall UIOption_Checkbox::DynamicCast(class UIOption_Checkbox* this, uint32_t arg2) __pure

00486370  {
0048637a      if (arg2 == 0x10000035)
0048637a      {
0048637e          if (this == 0)
00486388              return 0;
00486388          
00486383          return &this->vtable;
0048637a      }
0048637a      
0048638e      struct UIElement_Button::VTable** result = &this->vtable;
0048638e      
00486396      if ((arg2 == 1 || arg2 == 0xc))
004863a3          return result;
004863a3      
0048639d      int32_t ecx;
0048639d      ecx = arg2 != 0xa;
004863a1      return (result & (ecx - 1));
00486370  }

004863a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004863b0  uint32_t UIOption_CheckboxBitfield::GetUIElementType(class UIOption_CheckboxBitfield const* this @ ecx) __pure

004863b0  {
004863b5      return 0x10000043;
004863b0  }

004863b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004863c0  class UIElement* UIOption_CheckboxBitfield::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004863c0  {
004863c6      void* eax = operator new(0x758);
004863c6      
004863d2      if (eax == 0)
0048640d          return 0;
0048640d      
004863e0      UIOption_Checkbox::UIOption_Checkbox(eax, arg1, arg2);
004863e8      *(uint32_t*)eax = 0x7a2290;
004863ee      *(uint32_t*)((char*)eax + 0x628) = 0x7c126c;
004863f8      *(uint32_t*)((char*)eax + 0x750) = 0;
00486402      *(uint32_t*)((char*)eax + 0x20) = 0x7a2150;
00486409      return ((char*)eax + 0x20);
004863c0  }

0048640e                                            90 90                                                                ..

00486410  void* __thiscall UIOption_CheckboxBitfield::`vector deleting destructor'(class UIOption_CheckboxBitfield* this, uint32_t arg2)

00486410  {
00486413      /* tailcall */
00486413      return UIOption_CheckboxBitfield::`scalar deleting destructor'(((char*)this - 0x20), arg2);
00486410  }

00486418                                                                          cc cc cc cc cc cc cc cc                          ........

00486420  class UIElement* __thiscall UIOption_CheckboxBitfield::DynamicCast(class UIOption_CheckboxBitfield* this, uint32_t arg2)

00486420  {
00486423      /* tailcall */
00486423      return UIOption_CheckboxBitfield::DynamicCast(((char*)this - 0x20), arg2);
00486420  }

00486428                          cc cc cc cc cc cc cc cc                                                          ........

00486430  void* __thiscall UIOption_CheckboxBitfield::`scalar deleting destructor'(class UIOption_CheckboxBitfield* this, uint32_t arg2)

00486430  {
00486433      this->vtable = 0x7a2290;
00486439      this->vtable = &UIOption_CheckboxBitfield64::`vftable'.RecvNotice_SetDisplayContractTracker;
00486440      this->vtable = &UIOption_Menu::`vftable';
0048644a      UIOption_Checkbox::~UIOption_Checkbox(this);
0048644a      
00486454      if ((arg2 & 1) != 0)
00486457          operator delete(this);
00486457      
00486462      return this;
00486430  }

00486465                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00486470  void UIOption_CheckboxBitfield::Register()

00486470  {
0048647a      UIElement::RegisterElementClass(0x10000043, UIOption_CheckboxBitfield::Create);
00486470  }

00486483           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00486490  uint8_t __fastcall UIOption_CheckboxBitfield::Apply(class UIOption_CheckboxBitfield* this, uint8_t arg2)

00486490  {
00486493      int32_t __saved_ebx_1;
00486493      int32_t __saved_ebx = __saved_ebx_1;
00486494      int32_t ebp;
00486494      int32_t var_30 = ebp;
00486495      int32_t __saved_esi_1;
00486495      int32_t __saved_esi = __saved_esi_1;
00486496      int32_t __saved_edi_2;
00486496      int32_t __saved_edi_1 = __saved_edi_2;
00486497      class UIOption_CheckboxBitfield* edi = this;
004864a1      int32_t ebx = 0;
004864a3      bool cond:0 = edi->m_propName == 0;
004864a5      class UIOption_CheckboxBitfield* __return = edi;
004864a9      int32_t var_28 = 0;
004864ad      struct Turbine_GUID** esp_1;
004864ad      struct Turbine_GUID* m_charbuffer;
004864ad      struct Turbine_GUID* m_charbuffer_3;
004864ad      
004864ad      if (cond:0)
004864ad      {
00486650          PStringBase<char>::PStringBase<char>(&m_charbuffer_3, &data_7928af);
00486655          struct Turbine_GUID* m_charbuffer_4 = m_charbuffer_3;
00486666          m_charbuffer = edi->m_prefName.m_charbuffer;
00486676          ebx = _stricmp(m_charbuffer, m_charbuffer_4) != 0;
00486679          void* __offset(Turbine_GUID, -0x14) esi_12 = ((char*)m_charbuffer_3 - 0x14);
00486679          
0048668c          if ((InterlockedDecrement(((char*)esi_12 + 4)) == 0 && esi_12 != 0))
00486694              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_12) + -0x14)(1);
00486694          
00486698          if (ebx == 0)
00486698          {
004866f0              int32_t eax_15;
004866f0              eax_15 = 0;
004866f6              return 0;
00486698          }
00486698          
0048669e          int32_t* var_3c_6 = &var_28;
0048669f          m_charbuffer = &edi->m_prefName.m_charbuffer;
004866a0          UIPreferences::InqPreferenceValue(m_charbuffer, var_3c_6);
004866a5          class UIOption_CheckboxBitfield* __return_2 = __return;
004866af          uint32_t m_bitmask = __return_2->m_bitmask;
004866af          
004866be          if (__return_2->m_current == 0)
004866c0              m_bitmask = !(m_bitmask);
004866c0          
004866c2          int32_t eax_17 = (m_bitmask & var_28);
004866c5          m_charbuffer = &edi->m_prefName.m_charbuffer;
004866c6          UIPreferences::ModifyPreference(m_charbuffer, eax_17);
004866cb          edi = __return;
004866cf          struct Turbine_GUID* __saved_edi;
004866cf          esp_1 = &__saved_edi;
004864ad      }
004864ad      else
004864ad      {
004864b7          int32_t* var_3c = &m_charbuffer_3;
004864bc          m_charbuffer = &UIOption_CheckboxBitfield64::`vftable'.RecvNotice_VitaeChanged;
004864c2          m_charbuffer_3 = nullptr;
004864cd          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, m_charbuffer, var_3c);
004864d2          struct Turbine_GUID* m_charbuffer_2 = m_charbuffer_3;
004864db          m_charbuffer = m_charbuffer_2;
004864dd          int32_t var_3c_1 = 0;
004864e0          struct Turbine_GUID* m_charbuffer_1 = m_charbuffer;
004864e6          int32_t var_8 = 0;
004864ea          int32_t var_4_1 = 0;
004864ea          
004864ee          if (m_charbuffer_1 != 0)
004864f4              *(uint32_t*)(m_charbuffer_1->m_data1 + 0x10)();
004864f4          
00486500          int32_t* var_1c;
00486500          InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_1c);
00486500          
00486507          if (m_charbuffer_2 != 0)
0048650d              *(uint32_t*)(m_charbuffer_2->m_data1 + 0x14)();
0048650d          
00486510          uint32_t m_propName = edi->m_propName;
00486525          int32_t* var_18 = nullptr;
00486529          int32_t* var_14_1 = nullptr;
00486534          int32_t* var_10;
00486534          
00486534          if (PlayerModule::InqOption(&var_10[1], m_propName, &var_18) != 0)
00486534          {
0048653c              if (var_14_1 != 0)
00486545                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30);
00486545              
00486548              ebx = var_30;
00486534          }
00486534          
00486554          int32_t ebx_1;
00486554          
00486554          if (edi->m_current == 0)
00486566              ebx_1 = (ebx & !(edi->m_bitmask));
00486554          else
00486556              ebx_1 = (ebx | edi->m_bitmask);
00486556          
00486568          uint32_t m_propName_1 = edi->m_propName;
00486573          __return = nullptr;
00486577          var_1c = nullptr;
0048657b          BaseProperty::SetPropertyName(&__return, m_propName_1);
0048657b          
00486584          if (var_1c != 0)
00486584          {
0048658a              BaseProperty::CheckCopyOnWrite(&__return);
00486596              *(uint32_t*)(*(uint32_t*)var_1c + 0x7c)(ebx_1);
00486584          }
00486584          
004865a0          PlayerModule::SetOption(&var_10[1], &__return);
004865a0          esp_1 = &m_charbuffer;
004865a5          class UIOption_CheckboxBitfield* __return_1 = __return;
004865a5          
004865ab          if (__return_1 != 0)
004865ab          {
004865ad              int32_t esi_3;
004865ad              esi_3 = __return_1->m_confirmChange;
004865ad              *(uint8_t*)((char*)esi_3)[1] = __return_1->m_bDelayConfirmation;
004865b2              __return_1->m_confirmChange = (esi_3 - 1);
004865b2              __return_1->m_bDelayConfirmation = *(uint8_t*)((char*)(esi_3 - 1))[1];
004865b2              
004865bc              if (esi_3 == 1)
004865bc              {
004865c0                  int32_t var_44_8 = 1;
004865be                  __return_1->vtable->IsEngine(1);
004865c2                  esp_1 = &m_charbuffer;
004865bc              }
004865bc              
004865c4              __return = nullptr;
004865ab          }
004865ab          
004865c8          int32_t* eax_5 = var_1c;
004865c8          
004865ce          if (eax_5 != 0)
004865ce          {
004865d8              int32_t esi_6 = (eax_5[1] - 1);
004865d5              eax_5[1] = esi_6;
004865d5              
004865df              if (esi_6 == 0)
004865df              {
004865e3                  int32_t var_44_9 = 1;
004865e5                  **(uint32_t**)eax_5(1);
004865e5                  esp_1 = &m_charbuffer;
004865df              }
004865df              
004865e7              var_1c = nullptr;
004865ce          }
004865ce          
004865eb          int32_t* eax_8 = var_18;
004865eb          
004865f1          if (eax_8 != 0)
004865f1          {
004865fb              int32_t esi_8 = (eax_8[1] - 1);
004865f8              eax_8[1] = esi_8;
004865f8              
00486602              if (esi_8 == 0)
00486602              {
00486606                  int32_t var_44_10 = 1;
00486608                  **(uint32_t**)eax_8(1);
00486608                  esp_1 = &m_charbuffer;
00486602              }
00486602              
0048660a              var_18 = nullptr;
004865f1          }
004865f1          
00486614          if (var_14_1 != 0)
00486614          {
0048661e              int32_t esi_10 = (var_14_1[1] - 1);
0048661b              var_14_1[1] = esi_10;
0048661b              
00486625              if (esi_10 == 0)
00486625              {
00486629                  int32_t var_44_11 = 1;
0048662b                  **(uint32_t**)var_14_1(1);
0048662b                  esp_1 = &m_charbuffer;
00486625              }
00486625              
0048662d              int32_t var_14_2 = 0;
00486614          }
00486614          
00486637          if (var_10 != 0)
0048663f              *(uint32_t*)(*(uint32_t*)var_10 + 0x14)();
004864ad      }
004866d6      struct UIOption_CheckboxBitfield::VTable* vtable = edi->vtable;
004866d8      *(uint32_t*)((char*)esp_1 - 4) = esp_1[0xf];
004866db      vtable->HandleDialogAndNotices();
004866e1      int32_t eax_19;
004866e1      eax_19 = 1;
004866e3      *(uint32_t*)esp_1;
004866d8      esp_1[1];
004866d8      esp_1[2];
004866d8      esp_1[3];
004866ea      return 1;
00486490  }

004866f9                                                                             90 90 90 90 90 90 90                           .......

00486700  uint8_t __fastcall UIOption_CheckboxBitfield::GetValue(class UIOption_CheckboxBitfield* this)

00486700  {
00486703      int32_t ebx;
00486703      int32_t var_2c = ebx;
00486704      int32_t ebp;
00486704      int32_t var_30 = ebp;
0048670f      bool cond:0 = this->m_propName == 0;
00486711      int32_t esi;
00486711      int32_t var_34 = esi;
00486712      struct Turbine_GUID* edi;
00486712      struct Turbine_GUID* var_38 = edi;
00486713      int32_t var_24 = 0;
00486717      int32_t var_20 = 0;
0048671b      struct Turbine_GUID** esp;
0048671b      struct Turbine_GUID* m_charbuffer;
0048671b      struct Turbine_GUID* m_charbuffer_3;
0048671b      
0048671b      if (cond:0)
0048671b      {
0048681a          PStringBase<char>::PStringBase<char>(&m_charbuffer_3, &data_7928af);
0048681f          struct Turbine_GUID* m_charbuffer_4 = m_charbuffer_3;
00486830          m_charbuffer = this->m_prefName.m_charbuffer;
00486840          bool var_25_1 = _stricmp(m_charbuffer, m_charbuffer_4) != 0;
00486845          void* __offset(Turbine_GUID, -0x14) esi_4 = ((char*)m_charbuffer_3 - 0x14);
0048684c          esp = &var_38;
0048684c          
00486858          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00486858          {
00486860              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00486860              esp = &var_38;
00486858          }
00486858          
00486866          if (var_25_1 != 0)
00486866          {
0048686c              int32_t* var_3c_6 = &var_24;
0048686d              m_charbuffer = &this->m_prefName;
0048686e              UIPreferences::InqPreferenceValue(m_charbuffer, var_3c_6);
00486877              esp = &var_38;
0048687a              int32_t var_20_1 = var_24;
00486866          }
0048671b      }
0048671b      else
0048671b      {
00486725          int32_t* var_3c = &m_charbuffer_3;
0048672a          m_charbuffer = &UIOption_CheckboxBitfield64::`vftable'.RecvNotice_VitaeChanged;
00486730          m_charbuffer_3 = nullptr;
0048673b          class TResult __return;
0048673b          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, m_charbuffer, var_3c);
00486740          struct Turbine_GUID* m_charbuffer_2 = m_charbuffer_3;
00486749          m_charbuffer = m_charbuffer_2;
0048674b          int32_t var_3c_1 = 0;
0048674e          struct Turbine_GUID* m_charbuffer_1 = m_charbuffer;
00486754          int32_t var_8 = 0;
00486758          int32_t var_4_1 = 0;
00486758          
0048675c          if (m_charbuffer_1 != 0)
00486762              *(uint32_t*)(m_charbuffer_1->m_data1 + 0x10)();
00486762          
0048676e          int32_t* var_14;
0048676e          InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_14);
0048676e          
00486775          if (m_charbuffer_2 != 0)
0048677b              *(uint32_t*)(m_charbuffer_2->m_data1 + 0x14)();
0048677b          
0048677e          uint32_t m_propName = this->m_propName;
00486791          __return = 0;
00486795          var_14 = nullptr;
00486799          esp = &m_charbuffer;
0048679e          int32_t* var_10;
0048679e          bool cond:3_1 = PlayerModule::InqOption(&var_10[1], m_propName, &__return) == 0;
004867a0          int32_t* ecx_5 = var_14;
004867a0          
004867a4          if (!(cond:3_1))
004867a4          {
004867a8              if (ecx_5 != 0)
004867a8              {
004867b1                  *(uint32_t*)(*(uint32_t*)ecx_5 + 0x78)(&var_2c);
004867b1                  esp = &m_charbuffer;
004867b4                  ecx_5 = var_14;
004867a8              }
004867a8              
004867bc              int32_t var_28_1 = var_2c;
004867a4          }
004867a4          
004867c0          class TResult __return_1 = __return;
004867c0          
004867c6          if (__return_1 != 0)
004867c6          {
004867d0              int32_t edi_2 = (*(uint32_t*)(__return_1 + 4) - 1);
004867d5              *(uint32_t*)(__return_1 + 4) = edi_2;
004867d5              
004867d7              if (edi_2 == 0)
004867d7              {
004867dd                  **(uint32_t**)__return_1(1);
004867dd                  esp = &m_charbuffer;
004867d7              }
004867d7              
004867df              ecx_5 = var_14;
004867e3              __return = 0;
004867c6          }
004867c6          
004867e9          if (ecx_5 != 0)
004867e9          {
004867f1              int32_t edi_4 = (ecx_5[1] - 1);
004867ee              ecx_5[1] = edi_4;
004867ee              
004867f8              if (edi_4 == 0)
004867f8              {
004867fe                  **(uint32_t**)ecx_5(1);
004867fe                  esp = &m_charbuffer;
004867f8              }
004867f8              
00486800              var_14 = nullptr;
004867e9          }
004867e9          
00486806          if (var_10 != 0)
00486806          {
0048680c              *(uint32_t*)(*(uint32_t*)var_10 + 0x14)();
0048680c              esp = &var_38;
00486806          }
0048671b      }
0048687e      uint32_t m_bitmask = this->m_bitmask;
0048688a      *(uint32_t*)esp;
0048688a      esp[1];
0048688a      esp[2];
00486891      m_bitmask = (m_bitmask & esp[6]) == m_bitmask;
0048688a      esp[3];
00486898      return m_bitmask;
00486700  }

00486899                                                                             90 90 90 90 90 90 90                           .......

004868a0  void __fastcall UIOption_Checkbox::Refresh(class UIOption_Checkbox* this)

004868a0  {
004868ae      UIElement::SetAttribute_Bool(&this->vtable, 0xe, this->m_current);
004868a0  }

004868b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004868c0  uint8_t __fastcall UIOption_Checkbox::Changed(class UIOption_Checkbox* this)

004868c0  {
004868c7      int32_t ebx;
004868c7      ebx = this->m_current;
004868d7      return this->m_saved != ebx;
004868c0  }

004868d8                                                                          90 90 90 90 90 90 90 90                          ........

004868e0  uint8_t __fastcall UIOption_Checkbox::SaveCurrentValue(class UIOption_Checkbox* this)

004868e0  {
004868e5      uint8_t eax_1 = this->vtable->GetValue();
004868eb      this->m_current = eax_1;
004868f1      this->m_saved = eax_1;
004868fa      return 1;
004868e0  }

004868fb                                                                                   90 90 90 90 90                             .....

00486900  uint8_t __fastcall UIOption_Checkbox::RestoreSavedValue(class UIOption_Checkbox* this)

00486900  {
00486909      struct UIOption_Checkbox::VTable* vtable = this->vtable;
0048690d      this->m_current = this->m_saved;
00486913      vtable->Apply(0);
00486919      this->vtable->Refresh();
00486923      int32_t eax_2;
00486923      eax_2 = 1;
00486926      return 1;
00486900  }

00486927                       90 90 90 90 90 90 90 90 90                                                         .........

00486930  uint8_t __fastcall UIOption_Checkbox::RestoreDefaultValue(class UIOption_Checkbox* this)

00486930  {
00486939      struct UIOption_Checkbox::VTable* vtable = this->vtable;
0048693d      this->m_current = this->m_default;
00486943      vtable->Apply(0);
00486949      this->vtable->Refresh();
00486953      int32_t eax_2;
00486953      eax_2 = 1;
00486956      return 1;
00486930  }

00486957                                                                       90 90 90 90 90 90 90 90 90                         .........

00486960  void __thiscall UIOption_Checkbox::SetDefaultValue(class UIOption_Checkbox* this, uint8_t arg2)

00486960  {
00486964      this->m_default = arg2;
00486960  }

0048696d                                         90 90 90                                                               ...

00486970  void __thiscall UIOption_Checkbox::SetCurrentValue(class UIOption_Checkbox* this, uint8_t arg2)

00486970  {
0048697d      this->m_current = arg2;
00486983      UIElement::SetAttribute_Bool(&this->vtable, 0xe, arg2);
00486988      this->vtable->Apply(1);
00486970  }

00486998                                                                          90 90 90 90 90 90 90 90                          ........

004869a0  enum UIElementMessageListenResult __thiscall UIOption_Checkbox::ListenToElementMessage(class UIOption_Checkbox* this, struct UIElementMessageInfo const* arg2)

004869a0  {
004869ac      if (arg2->idMessage == 1)
004869ac      {
004869b3          if (*(int32_t*)((char*)this + -0x18) != 0)
004869b3          {
004869bb              *(uint32_t*)(*(int32_t*)((char*)this + -0x20) + 0x2b8)();
004869cb              return UIElement_Button::ListenToElementMessage(this, arg2);
004869b3          }
004869b3          
004869d9          UIElement::GetAttribute_Bool(this, 0xe, (&this->m_downloadQueue.m_data + 2));
004869e6          *(uint32_t*)(*(int32_t*)((char*)this + -0x20) + 0x2d4)(1);
004869ac      }
004869ac      
004869f6      return UIElement_Button::ListenToElementMessage(this, arg2);
004869a0  }

004869f9                                                                             90 90 90 90 90 90 90                           .......

00486a00  void __thiscall UIOption_Checkbox::RecvNotice_ReloadOptions(class UIOption_Checkbox* this)

00486a00  {
00486a02      /* jump -> this->vtable->RecvNotice_RefreshOptionsPanel */
00486a00  }

00486a08                          90 90 90 90 90 90 90 90                                                          ........

00486a10  void __thiscall UIOption_Checkbox::RecvNotice_RefreshOptionsPanel(class UIOption_Checkbox* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00486a10  {
00486a15      uint8_t eax_1 = this->vtable->GetValue();
00486a1b      struct UIOption_Checkbox::VTable* vtable = this->vtable;
00486a1d      this->m_current = eax_1;
00486a26      /* jump -> vtable->Refresh */
00486a10  }

00486a2c                                      90 90 90 90                                                              ....

00486a30  void __thiscall UIOption_Checkbox::RecvNotice_PlayerOptionChanged(class UIOption_Checkbox* this, enum PlayerOption arg2)

00486a30  {
00486a3a      if (arg2 == this->m_playerOption)
00486a3c          this->vtable->RecvNotice_RefreshOptionsPanel();
00486a30  }

00486a47                       90 90 90 90 90 90 90 90 90                                                         .........

00486a50  void __thiscall UIOption_Checkbox::UIOption_Checkbox(class UIOption_Checkbox* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00486a50  {
00486a55      UIOption::UIOption(this);
00486a69      UIElement_Button::UIElement_Button(&this->vtable, arg2, arg3);
00486a70      this->vtable = 0x7a2720;
00486a63      this->vtable = &UIOption_Checkbox::`vftable';
00486a7c      this->vtable = &UIOption_Menu::`vftable';
00486a86      this->m_default = 0;
00486a8c      this->m_saved = 0;
00486a92      this->m_current = 0;
00486a98      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00486aa4      this->m_prefName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00486aaa      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00486ab1      this->m_propName = 0;
00486ab7      this->m_playerOption = ~AutoRepeatAttack_PlayerOption;
00486a50  }

00486ac8                          90 90 90 90 90 90 90 90                                                          ........

00486ad0  uint32_t UIOption_Checkbox::GetUIElementType(class UIOption_Checkbox const* this @ ecx) __pure

00486ad0  {
00486ad5      return 0x10000035;
00486ad0  }

00486ad6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00486ae0  void* __thiscall UIOption_Checkbox::`vector deleting destructor'(class UIOption_Checkbox* this, uint32_t arg2)

00486ae0  {
00486ae3      /* tailcall */
00486ae3      return UIOption_Checkbox::`scalar deleting destructor'(((char*)this - 0x20), arg2);
00486ae0  }

00486ae8                          cc cc cc cc cc cc cc cc                                                          ........

00486af0  class UIElement* __thiscall UIOption_Checkbox::DynamicCast(class UIOption_Checkbox* this, uint32_t arg2)

00486af0  {
00486af3      /* tailcall */
00486af3      return UIOption_Checkbox::DynamicCast(((char*)this - 0x20), arg2);
00486af0  }

00486af8                                                                          cc cc cc cc cc cc cc cc                          ........

00486b00  void __fastcall UIOption_Checkbox::~UIOption_Checkbox(class UIOption_Checkbox* this)

00486b00  {
00486b0b      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_prefName.m_charbuffer - 0x14);
00486b15      this->vtable = 0x7a2720;
00486b11      this->vtable = &UIOption_Checkbox::`vftable';
00486b21      this->vtable = &UIOption_Menu::`vftable';
00486b21      
00486b37      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00486b3f          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00486b3f      
00486b43      UIElement_Button::~UIElement_Button(&this->vtable);
00486b4d      /* tailcall */
00486b4d      return UIOption::~UIOption(this);
00486b00  }

00486b52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00486b60  class UIElement* UIOption_Checkbox::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00486b60  {
00486b65      void* eax = operator new(0x750);
00486b65      
00486b6f      if (eax != 0)
00486b6f      {
00486b7d          int32_t eax_1 = UIOption_Checkbox::UIOption_Checkbox(eax, arg1, arg2);
00486b7d          
00486b84          if (eax_1 != 0)
00486b89              return (eax_1 + 0x20);
00486b6f      }
00486b6f      
00486b8c      return 0;
00486b60  }

00486b8d                                         90 90 90                                                               ...

00486b90  void __thiscall UIOption_Checkbox::SetUIPreference(class UIOption_Checkbox* this, class PStringBase<char> const* arg2)

00486b90  {
00486ba7      if ((this->m_propName == 0 && this->m_playerOption == ~AutoRepeatAttack_PlayerOption))
00486ba7      {
00486baa          class PStringBase<char>* edi_1 = arg2;
00486bb5          PStringBase<unsigned short>::operator=(&this->m_prefName.m_charbuffer, edi_1);
00486bca          arg2 = nullptr;
00486bd2          uint32_t var_8 = 0;
00486bda          uint32_t var_4 = 0;
00486bda          
00486bed          if (UIPreferences::InqPreference(edi_1, &arg2, &var_8, &var_4) != 0)
00486bed          {
00486bfb              UIOption::SetLabel(this, var_8, arg2);
00486c0c              UIOption::SetTooltip(this, var_4, arg2);
00486bed          }
00486ba7      }
00486b90  }

00486c18                                                                          90 90 90 90 90 90 90 90                          ........

00486c20  void* __thiscall UIOption_Checkbox::`scalar deleting destructor'(class UIOption_Checkbox* this, uint32_t arg2)

00486c20  {
00486c23      UIOption_Checkbox::~UIOption_Checkbox(this);
00486c23      
00486c2d      if ((arg2 & 1) != 0)
00486c30          operator delete(this);
00486c30      
00486c3b      return this;
00486c20  }

00486c3e                                                                                            90 90                                ..

00486c40  void UIOption_Checkbox::Register()

00486c40  {
00486c4a      UIElement::RegisterElementClass(0x10000035, UIOption_Checkbox::Create);
00486c40  }

00486c53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00486c60  uint8_t __fastcall UIOption_Checkbox::Apply(class UIOption_Checkbox* this, uint8_t arg2)

00486c60  {
00486c63      int32_t __saved_ebx_1;
00486c63      int32_t __saved_ebx = __saved_ebx_1;
00486c64      int32_t ebp;
00486c64      int32_t var_20 = ebp;
00486c65      int32_t __saved_esi_1;
00486c65      int32_t __saved_esi = __saved_esi_1;
00486c72      int32_t __saved_edi_2;
00486c72      int32_t __saved_edi_1 = __saved_edi_2;
00486c73      struct Turbine_GUID** esp_1;
00486c73      struct Turbine_GUID* var_30;
00486c73      int32_t* var_18;
00486c73      class TResult __return;
00486c73      class TResult __return_1;
00486c73      int32_t var_8;
00486c73      
00486c73      if (this->m_propName != 0)
00486c73      {
00486c7d          int32_t* var_2c = &var_18;
00486c82          var_30 = &CPlayerModule_ClassType;
00486c88          var_18 = nullptr;
00486c93          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_30, var_2c);
00486c98          struct Turbine_GUID* edi = var_18;
00486ca1          var_30 = edi;
00486ca3          int32_t var_2c_1 = 0;
00486ca6          struct Turbine_GUID* eax_2 = var_30;
00486caa          var_8 = 0;
00486cae          int32_t var_4_1 = 0;
00486cae          
00486cb2          if (eax_2 != 0)
00486cb8              *(uint32_t*)(eax_2->m_data1 + 0x10)();
00486cb8          
00486cc4          esp_1 = &var_30;
00486ccb          int32_t ebx = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &__return_1);
00486ccb          
00486ccd          if (edi != 0)
00486cd3              *(uint32_t*)(edi->m_data1 + 0x14)();
00486cd3          
00486cd6          class TResult __return_3 = __return_1;
00486cd6          
00486cdc          if (__return_3 != 0)
00486cdc          {
00486ce4              if (ebx >= 0)
00486ce4              {
00486cea                  uint32_t m_propName = this->m_propName;
00486cf5                  var_18 = nullptr;
00486cf9                  __return = 0;
00486cfd                  BaseProperty::SetPropertyName(&var_18, m_propName);
00486d0c                  var_20 = this->m_current;
00486d0c                  
00486d10                  if (__return != 0)
00486d10                  {
00486d16                      BaseProperty::CheckCopyOnWrite(&var_18);
00486d26                      *(uint32_t*)(*(uint32_t*)__return + 0x74)(var_20);
00486d10                  }
00486d10                  
00486d31                  PlayerModule::SetOption((__return_3 + 4), &var_18);
00486d31                  esp_1 = &var_30;
00486d36                  int32_t* eax_5 = var_18;
00486d36                  
00486d3c                  if (eax_5 != 0)
00486d3c                  {
00486d46                      int32_t ebx_2 = (eax_5[1] - 1);
00486d43                      eax_5[1] = ebx_2;
00486d43                      
00486d4d                      if (ebx_2 == 0)
00486d4d                      {
00486d51                          int32_t var_34_6 = 1;
00486d53                          **(uint32_t**)eax_5(1);
00486d53                          esp_1 = &var_30;
00486d4d                      }
00486d4d                      
00486d55                      var_18 = nullptr;
00486d3c                  }
00486d3c                  
00486d59                  class TResult __return_2 = __return;
00486d59                  
00486d5f                  if (__return_2 != 0)
00486d5f                  {
00486d69                      int32_t ebx_4 = (*(uint32_t*)(__return_2 + 4) - 1);
00486d6e                      *(uint32_t*)(__return_2 + 4) = ebx_4;
00486d6e                      
00486d70                      if (ebx_4 == 0)
00486d70                      {
00486d74                          int32_t var_34_7 = 1;
00486d76                          **(uint32_t**)__return_2(1);
00486d76                          esp_1 = &var_30;
00486d70                      }
00486d5f                  }
00486ce4              }
00486ce4              
00486d7c              *(uint32_t*)(*(uint32_t*)__return_3 + 0x14)();
00486cdc          }
00486c73      }
00486c73      else if (this->m_playerOption == ~AutoRepeatAttack_PlayerOption)
00486d8b      {
00486e2b          if (this->m_prefName.m_charbuffer->m_data[-4] == 1)
00486e2b          {
00486e6b              class PSRefBufferCharData<char>* eax_13;
00486e6b              eax_13 = 0;
00486e71              return 0;
00486e2b          }
00486e2b          
00486e2f          uint8_t m_current = this->m_current;
00486e36          var_30 = &this->m_prefName.m_charbuffer;
00486e3c          struct Turbine_GUID* __saved_edi;
00486e3c          esp_1 = &__saved_edi;
00486e3c          
00486e41          if (UIPreferences::ModifyPreference(var_30, m_current) != 0)
00486e41          {
00486e44              CM_UI::SendNotice_UserPreferenceChanged(&this->m_prefName.m_charbuffer);
00486e49              esp_1 = &__saved_edi;
00486e41          }
00486d8b      }
00486d8b      else
00486d8b      {
00486d95          int32_t** var_2c_2 = &var_18;
00486d9a          var_30 = &CPlayerModule_ClassType;
00486da0          var_18 = nullptr;
00486dab          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, var_30, var_2c_2);
00486db0          int32_t* edi_1 = var_18;
00486db9          var_30 = edi_1;
00486dbb          int32_t var_2c_3 = 0;
00486dbe          struct Turbine_GUID* eax_10 = var_30;
00486dc2          var_8 = 0;
00486dc6          int32_t var_4_2 = 0;
00486dc6          
00486dca          if (eax_10 != 0)
00486dd0              *(uint32_t*)(eax_10->m_data1 + 0x10)();
00486dd0          
00486ddc          esp_1 = &var_30;
00486de3          int32_t ebx_5 = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &__return);
00486de3          
00486de5          if (edi_1 != 0)
00486deb              *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
00486deb          
00486dee          class TResult __return_4 = __return_1;
00486dee          
00486df4          if (__return_4 != 0)
00486df4          {
00486df8              if (ebx_5 >= 0)
00486df8              {
00486e0d                  PlayerModule::SetOption((__return_4 + 4), this->m_playerOption, this->m_current);
00486e0d                  esp_1 = &var_30;
00486df8              }
00486df8              
00486e16              *(uint32_t*)(*(uint32_t*)__return_4 + 0x14)();
00486df4          }
00486d8b      }
00486e50      struct UIOption_Checkbox::VTable* vtable = this->vtable;
00486e53      *(uint32_t*)((char*)esp_1 - 4) = esp_1[0xb];
00486e56      vtable->HandleDialogAndNotices();
00486e5c      int32_t eax_16;
00486e5c      eax_16 = 1;
00486e5e      *(uint32_t*)esp_1;
00486e53      esp_1[1];
00486e53      esp_1[2];
00486e53      esp_1[3];
00486e65      return 1;
00486c60  }

00486e74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00486e80  void __fastcall UIOption_Checkbox::SetPlayerOption(class UIOption_Checkbox* this, enum PlayerOption arg2)

00486e80  {
00486e83      int32_t ebx;
00486e83      int32_t var_14 = ebx;
00486e84      int32_t ebp;
00486e84      int32_t var_18 = ebp;
00486e85      int32_t esi;
00486e85      int32_t var_1c = esi;
00486e86      int32_t edi;
00486e86      int32_t var_20 = edi;
00486e86      int32_t* esp = &var_20;
00486e86      
00486ea3      if ((this->m_propName == 0 && this->m_prefName.m_charbuffer->m_data[-4] == 1))
00486ea3      {
00486ea9          enum PlayerOption ecx = arg2;
00486eb1          enum PlayerOption* var_24_1 = &arg2;
00486eb6          struct Turbine_GUID* var_28 = &CPlayerModule_ClassType;
00486ebc          this->m_playerOption = ecx;
00486ec2          arg2 = AutoRepeatAttack_PlayerOption;
00486ecd          class TResult __return;
00486ecd          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_28, var_24_1);
00486ed2          enum PlayerOption ecx_2 = arg2;
00486edb          var_28 = ecx_2;
00486edd          int32_t var_24_2 = 0;
00486ee0          struct Turbine_GUID* eax_3 = var_28;
00486ee6          int32_t var_8 = 0;
00486eea          int32_t var_4_1 = 0;
00486eea          
00486eee          if (eax_3 != 0)
00486ef4              *(uint32_t*)(eax_3->m_data1 + 0x10)();
00486ef4          
00486f00          esp = &var_28;
00486f07          void var_c;
00486f07          int32_t ebp_1 = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_c);
00486f07          
00486f09          if (ecx_2 != AutoRepeatAttack_PlayerOption)
00486f0f              *(uint32_t*)(*(uint32_t*)ecx_2 + 0x14)();
00486f0f          
00486f12          class TResult __return_1 = __return;
00486f12          
00486f1c          if ((__return_1 != 0 && ebp_1 >= 0))
00486f1c          {
00486f28              esp = &var_28;
00486f2d              this->m_default = PlayerModule::GetDefaultOptionValue((__return_1 + 4), this->m_playerOption);
00486f1c          }
00486f1c          
00486f33          class GlobalEventHandler* eax_7 = GlobalEventHandler::GetGlobalEventHandler();
00486f33          
00486f3a          if (eax_7 != 0)
00486f3a          {
00486f3c              eax_7->vtable->RegisterNoticeHandler(0x4dd21f, this);
00486f46              esp = &var_28;
00486f3a          }
00486f3a          
00486f4b          if (__return_1 != 0)
00486f4b          {
00486f51              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00486f51              esp = &var_20;
00486f4b          }
00486ea3      }
00486ea3      
00486f54      *(uint32_t*)esp;
00486f54      esp[1];
00486f54      esp[2];
00486f54      esp[3];
00486e80  }

00486f5e                                                                                            90 90                                ..

00486f60  uint8_t __fastcall UIOption_Checkbox::GetValue(class UIOption_Checkbox* this)

00486f60  {
00486f64      int32_t ebp;
00486f64      int32_t var_20 = ebp;
00486f6d      class TResult eax;
00486f6d      eax.m_val = 0;
00486f72      bool cond:0 = this->m_playerOption == ~AutoRepeatAttack_PlayerOption;
00486f75      int32_t __saved_edi;
00486f75      int32_t* esp = &__saved_edi;
00486f76      uint8_t result = 0;
00486f7a      struct Turbine_GUID* var_30;
00486f7a      
00486f7a      if (!(cond:0))
00486f7a      {
00486f84          struct Turbine_GUID* var_14;
00486f84          int32_t* var_2c_1 = &var_14;
00486f89          var_30 = &CPlayerModule_ClassType;
00486f8f          var_14 = nullptr;
00486f9a          class TResult __return;
00486f9a          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_30, var_2c_1);
00486f9f          struct Turbine_GUID* esi_1 = var_14;
00486fa8          var_30 = esi_1;
00486faa          int32_t var_2c_2 = 0;
00486fad          struct Turbine_GUID* eax_2 = var_30;
00486fb1          int32_t var_8 = 0;
00486fb5          int32_t var_4_1 = 0;
00486fb5          
00486fb9          if (eax_2 != 0)
00486fbf              *(uint32_t*)(eax_2->m_data1 + 0x10)();
00486fbf          
00486fcb          esp = &var_30;
00486fd2          void var_c;
00486fd2          int32_t edi_1 = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_c);
00486fd2          
00486fd4          if (esi_1 != 0)
00486fda              *(uint32_t*)(esi_1->m_data1 + 0x14)();
00486fda          
00486fdd          class TResult __return_1 = __return;
00486fdd          
00486fe3          if (__return_1 != 0)
00486fe3          {
00486fe7              if (edi_1 >= 0)
00486ff8                  *(uint8_t*)((char*)var_20)[3] = PlayerModule::GetOption((__return_1 + 4), this->m_playerOption);
00486ff8              
00487000              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0048700e              return result;
00486fe3          }
00486fe3          
0048702f          eax.m_val = *(uint8_t*)((char*)esp + 0x13);
00486f7a      }
00486f7a      else if (this->m_prefName.m_charbuffer->m_data[-4] != 1)
0048701f      {
00487025          uint8_t* var_2c_3 = &result;
00487026          var_30 = &this->m_prefName.m_charbuffer;
00487027          UIPreferences::InqPreferenceValue(var_30, var_2c_3);
0048702c          esp = &__saved_edi;
0048702f          eax.m_val = *(uint8_t*)((char*)esp + 0x13);
0048701f      }
00487033      *(uint32_t*)esp;
00487033      esp[1];
00487033      esp[2];
00487033      esp[3];
0048703a      return eax.m_val;
00486f60  }

0048703b                                                                                   90 90 90 90 90                             .....

00487040  void __thiscall UIOption_ActionKeyMap::SetLabel(class UIOption_ActionKeyMap* this, class StringInfo const* arg2)

00487040  {
00487043      /* tailcall */
00487043      return UIElement_Text::SetStringInfo(&this->vtable, arg2);
00487040  }

00487048                          90 90 90 90 90 90 90 90                                                          ........

00487050  void __thiscall UIOption_ActionKeyMap::SetTooltip(class UIOption_ActionKeyMap* this, class StringInfo const* arg2)

00487050  {
00487053      /* tailcall */
00487053      return UIElement::SetTooltip(&this->vtable, arg2);
00487050  }

00487058                                                                          90 90 90 90 90 90 90 90                          ........

00487060  void __thiscall UIOption_ActionKeyMap::RecvNotice_RefreshOptionsPanel(class UIOption_ActionKeyMap* this)

00487060  {
00487062      /* jump -> this->vtable->Refresh */
00487060  }

00487068                          90 90 90 90 90 90 90 90                                                          ........

00487070  void __fastcall UIOption_ActionKeyMap::CloseMapWarnDialog(class UIOption_ActionKeyMap* this)

00487070  {
00487073      uint32_t m_ctxtDialog = this->m_ctxtDialog;
00487073      
0048707b      if (m_ctxtDialog != 0)
0048707b      {
0048707e          DialogFactory::CloseDialog(m_ctxtDialog);
00487086          this->m_ctxtDialog = 0;
0048707b      }
00487070  }

00487092                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004870a0  void __fastcall _STL::pair<QualifiedControl,unsigned long>::pair<QualifiedControl,unsigned long>(struct _STL::pair<QualifiedControl,unsigned long>* this)

004870a0  {
004870a4      this->first.m_key.__inner0 = 0xffffffff;
004870aa      this->first.m_metamode = 0;
004870ad      this->first.m_activation = 0;
004870b0      this->second = 0;
004870a0  }

004870b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004870c0  int32_t __thiscall AC1Legacy::PStringBase<char>::vsprintf(class AC1Legacy::PStringBase<char>* this, char const* arg2, char* arg3)

004870c0  {
004870d0      int32_t result = _vscprintf(arg2, arg3);
004870d6      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004870e0      AC1Legacy::PStringBase<char>::allocate_ref_buffer(this, result);
004870f5      _vsnprintf(&this->m_buffer->m_data, (result + 1), arg2, arg3);
004870f5      
0048710e      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00487110          m_buffer->vtable->__vecDelDtor(1);
00487110      
0048711e      return result;
004870c0  }

00487121     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00487130  uint8_t __thiscall List<QualifiedControl>::push_back(class List<QualifiedControl>* this, class QualifiedControl const* arg2)

00487130  {
00487135      void* eax = operator new(0x14);
00487135      
00487141      if (eax == 0)
00487141      {
00487173          eax = 0;
00487176          return 0;
00487141      }
00487141      
0048714a      *(uint32_t*)eax = arg2->m_key.__inner0;
0048714f      *(uint32_t*)((char*)eax + 4) = arg2->m_metamode;
00487155      *(uint32_t*)((char*)eax + 8) = arg2->m_activation;
00487158      *(uint32_t*)((char*)eax + 0xc) = 0;
0048715b      *(uint32_t*)((char*)eax + 0x10) = 0;
0048715b      
00487162      if (this->_head == 0)
00487162      {
00487164          this->_head = eax;
00487167          this->_tail = eax;
0048716a          this->_num_elements += 1;
0048716d          eax = 1;
00487170          return 1;
00487162      }
00487162      
00487179      class ListNode<QualifiedControl>* _tail = this->_tail;
0048717c      _tail->next = eax;
0048717f      *(uint32_t*)((char*)eax + 0x10) = _tail;
00487182      this->_tail = eax;
00487185      this->_num_elements += 1;
00487188      eax = 1;
0048718b      return 1;
00487130  }

0048718e                                            90 90                                                                ..

00487190  void __fastcall _STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >(struct _STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >* this)

00487190  {
00487194      this->first = 0;
00487196      this->second.first.m_key.__inner0 = 0xffffffff;
0048719d      this->second.first.m_metamode = 0;
004871a0      this->second.first.m_activation = 0;
004871a3      this->second.second = 0;
00487190  }

004871a7                       90 90 90 90 90 90 90 90 90                                                         .........

004871b0  class QualifiedControl* __thiscall List<QualifiedControl>::find(class List<QualifiedControl>* this, class QualifiedControl const* arg2)

004871b0  {
004871b7      for (class ListNode<QualifiedControl>* i = this->_head; i != 0; i = i->next)
004871b7      {
004871ca          if (QualifiedControl::operator==(i, arg2) != 0)
004871e2              return i;
004871e2          
004871ce          if (i == 0)
004871ce              break;
004871b7      }
004871b7      
004871db      return 0;
004871b0  }

004871e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004871f0  void __fastcall SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>::Reset(class SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>* this)

004871f0  {
004871f3      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00487207      this->m_num = 0;
00487207      
0048720a      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0048720a      {
0048720f          operator delete[](this->m_data);
00487217          this->m_data = 0;
00487219          this->m_sizeAndDeallocate = 0;
0048721e          return;
0048720a      }
0048720a      
00487221      if (this->m_data != 0)
00487221      {
00487223          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00487223          
00487229          if ((i_2 - 1) >= 0)
00487229          {
0048722e              int32_t ecx_3 = ((i_2 - 1) * 0x14);
00487231              int32_t i_1 = i_2;
0048724e              int32_t i;
0048724e              
0048724e              do
0048724e              {
00487236                  void* eax_2 = (this->m_data + ecx_3);
00487238                  *(uint32_t*)eax_2 = 0;
0048723a                  ecx_3 -= 0x14;
0048723d                  i = i_1;
0048723d                  i_1 -= 1;
0048723e                  *(uint32_t*)((char*)eax_2 + 4) = 0xffffffff;
00487245                  *(uint32_t*)((char*)eax_2 + 8) = 0;
00487248                  *(uint32_t*)((char*)eax_2 + 0xc) = 0;
0048724b                  *(uint32_t*)((char*)eax_2 + 0x10) = 0;
0048724e              } while (i != 1);
00487229          }
00487221      }
004871f0  }

00487253                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00487260  int32_t AC1Legacy::PStringBase<char>::sprintf(class AC1Legacy::PStringBase<char>* this, char const* arg2)

00487260  {
00487273      return AC1Legacy::PStringBase<char>::vsprintf(this, arg2, &arg_c);
00487260  }

00487274                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00487280  void __fastcall UIOption_ActionKeyMap::Refresh(class UIOption_ActionKeyMap* this)

00487280  {
0048728c      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00487294      class ICIDM* ICIDM::s_cidm_2 = ICIDM::s_cidm_1;
00487294      
00487298      if (ICIDM::s_cidm_1 != 0)
00487298      {
0048729e          class ListNode<QualifiedControl>* _head = this->m_qclCurrent._head;
004872a4          int32_t i = 0;
004872a8          class ListNode<QualifiedControl>* var_128_1 = _head;
004872ac          void var_1d4;
004872ac          void var_120;
004872ac          
004872ac          if (_head != 0)
004872ac          {
004872c6              while (true)
004872c6              {
004872c6                  if (i >= this->m_aKeyButtons.m_num)
004872c6                      goto label_4874ae;
004872c6                  
004872d4                  class PStringBase<char> var_134;
004872d4                  *(int32_t*)((char*)ICIDM::s_cidm_1->vtable + 0x7c)(&var_134, _head);
004872d4                  
004872df                  if (*(uint32_t*)(var_134 - 4) != 1)
004872df                  {
004872ec                      void var_90;
004872ec                      StringInfo::StringInfo(&var_90);
00487304                      int32_t ecx_2 = StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000004);
00487309                      class PStringBase<char> edx_1 = var_134;
0048730d                      int32_t var_148_3 = ecx_2;
0048731a                      InterlockedIncrement((var_134 - 0x10));
0048732e                      StringInfo::AddVariable_String(&var_90, 0, edx_1);
00487340                      int32_t* esi_1 = (i << 2);
0048734b                      UIElement_Text::SetStringInfo(*(uint32_t*)((char*)esi_1 + this->m_aKeyButtons.m_data), &var_90);
0048735d                      *(uint32_t*)(**(uint32_t**)((char*)esi_1 + this->m_aKeyButtons.m_data) + 0x9c)(1);
00487367                      StringInfo::StringInfo(&var_120);
0048737b                      StringInfo::SetStringIDandTableEnum(&var_120, 0, 0x10000004);
00487393                      StringInfo::AddVariable_StringInfo(&var_120, 0, &var_90);
004873ae                      void* ebx_2 = (this->m_aKeyButtons.m_data + esi_1);
004873b0                      StringInfo::StringInfo(&var_1d4, &var_120);
004873b9                      UIElement::SetAttribute_StringInfo(*(uint32_t*)ebx_2, 0x49, var_1d4);
004873c4                      void* esi_2 = *(uint32_t*)((char*)esi_1 + this->m_aKeyButtons.m_data);
004873c7                      *(uint32_t*)((char*)esi_2 + 0xa4) |= 0x20;
004873d2                      i += 1;
004873d3                      StringInfo::~StringInfo(&var_120);
004873df                      StringInfo::~StringInfo(&var_90);
004873e4                      _head = var_128_1;
004872df                  }
004872df                  
004873ea                  if (_head != 0)
004873ea                  {
004873ec                      class ListNode<QualifiedControl>* next = _head->next;
004873ef                      var_128_1 = next;
004873f3                      _head = next;
004873ea                  }
004873ea                  
004873f9                  void* esi_4 = (var_134 - 0x14);
004873f9                  
0048740c                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00487414                      **(uint32_t**)esi_4(1);
00487414                  
00487418                  if (_head == 0)
00487418                      break;
00487418                  
004872b4                  ICIDM::s_cidm_1 = ICIDM::s_cidm_2;
004872c6              }
004872ac          }
004872ac          
00487424          for (; i < this->m_aKeyButtons.m_num; i += 1)
00487424          {
00487436              int32_t* esi_5 = this->m_aKeyButtons.m_data[i];
00487436              
0048743b              if (esi_5 != 0)
0048743b              {
0048743f                  UIElement_Text::ClearAllText(esi_5);
0048744a                  *(uint32_t*)(*(uint32_t*)esi_5 + 0x9c)(1);
00487454                  StringInfo::StringInfo(&var_120);
00487468                  StringInfo::SetStringIDandTableEnum(&var_120, 0, 0x10000004);
0048747d                  StringInfo::StringInfo(&var_1d4, &var_120);
00487486                  UIElement::SetAttribute_StringInfo(esi_5, 0x49, var_1d4);
00487498                  esi_5[0x29] |= 0x20;
0048749e                  StringInfo::~StringInfo(&var_120);
0048743b              }
00487424          }
00487424          
004874ae      label_4874ae:
004874ae          class UIElement_Button* m_buttonClear = this->m_buttonClear;
004874ae          
004874b6          if (m_buttonClear != 0)
004874b6          {
004874c0              int32_t eax;
004874c0              eax = this->m_qclCurrent._head == 0;
004874c3              ICIDM::s_cidm_2 = eax;
004874ce              UIElement::SetAttribute_Bool(m_buttonClear, 0xd, ICIDM::s_cidm_2);
004874b6          }
00487298      }
00487280  }

004872ba                                                                                8d 9b 00 00 00 00                            ......
004874de                                                                                            90 90                                ..

004874e0  class QualifiedControl* __thiscall List<QualifiedControl>::get_data(class List<QualifiedControl>* this, uint32_t arg2)

004874e0  {
004874e0      class ListNode<QualifiedControl>* result = this->_head;
004874e0      
004874ee      if ((result != 0 && arg2 < this->_num_elements))
004874ee      {
004874f0          int32_t ecx = 0;
004874f0          
004874f4          while (ecx != arg2)
004874f4          {
004874f8              if (result != 0)
004874fa                  result = result->next;
004874fa              
004874fd              ecx += 1;
004874fd              
00487500              if (result == 0)
00487502                  return result;
004874f4          }
004874f4          
00487507          if (result != 0)
0048750b              return result;
004874ee      }
004874ee      
00487509      return nullptr;
004874e0  }

0048750e                                            90 90                                                                ..

00487510  uint32_t __thiscall SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>::WhatNum(class SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1> const* this, struct _STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> > const* arg2)

00487510  {
00487510      class SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>* this_1 = this;
00487518      int32_t ebp = 0;
0048751e      int32_t result = 0;
0048751e      
00487522      if (this->m_num > 0)
00487522      {
00487560          bool cond:1_1;
00487560          
00487560          do
00487560          {
00487524              struct _STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >* m_data = this->m_data;
00487524              
00487533              if ((*(uint32_t*)((char*)m_data + ebp) == arg2->first && (QualifiedControl::operator==((&m_data->second + ebp), &arg2->second.first) != 0 && *(uint32_t*)(&*(uint32_t*)((char*)m_data->second)[0xc] + ebp) == arg2->second.second)))
00487576                  return result;
00487576              
00487557              ebp += 0x14;
0048755a              cond:1_1 = (result + 1) < this->m_num;
0048755c              result += 1;
00487560          } while (cond:1_1);
00487522      }
00487522      
0048756a      return 0xffffffff;
00487510  }

00487579                                                                             90 90 90 90 90 90 90                           .......

00487580  uint8_t __thiscall SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>::RemoveUnOrderedByIndex(class SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>* this, uint32_t arg2)

00487580  {
00487580      uint32_t m_num = this->m_num;
00487580      
0048758a      if (arg2 >= m_num)
0048758a      {
004875e3          m_num = 0;
004875e6          return 0;
0048758a      }
0048758a      
0048758f      this->m_num = (m_num - 1);
00487592      uint32_t eax;
00487592      
00487592      if (arg2 != (m_num - 1))
00487592      {
00487594          struct _STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >* m_data = this->m_data;
00487599          void* eax_2 = &m_data[(m_num - 1)];
0048759f          void* edx_1 = &m_data[arg2];
004875a4          *(uint32_t*)edx_1 = *(uint32_t*)eax_2;
004875a9          *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_2 + 4);
004875af          *(uint32_t*)((char*)edx_1 + 8) = *(uint32_t*)((char*)eax_2 + 8);
004875b5          *(uint32_t*)((char*)edx_1 + 0xc) = *(uint32_t*)((char*)eax_2 + 0xc);
004875bb          *(uint32_t*)((char*)edx_1 + 0x10) = *(uint32_t*)((char*)eax_2 + 0x10);
004875c6          eax = &this->m_data[this->m_num];
004875cb          *(uint32_t*)eax = 0;
004875cd          *(uint32_t*)(eax + 4) = 0xffffffff;
004875d4          *(uint32_t*)(eax + 8) = 0;
004875d7          *(uint32_t*)(eax + 0xc) = 0;
004875da          *(uint32_t*)(eax + 0x10) = 0;
00487592      }
00487592      
004875dd      eax = 1;
004875e0      return 1;
00487580  }

004875e9                             90 90 90 90 90 90 90                                                           .......

004875f0  uint8_t __thiscall SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>::grow(class SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>* this, uint32_t arg2)

004875f0  {
004875f8      uint32_t edi = arg2;
004875fe      uint32_t eax;
004875fe      
004875fe      if (edi >= this->m_num)
004875fe      {
0048760e          uint32_t eax_2;
0048760e          
0048760e          if (edi <= (this->m_sizeAndDeallocate & 0x7fffffff))
0048760e          {
004876cb              eax_2 = 1;
004876ce              return 1;
0048760e          }
0048760e          
00487616          if (edi == 0)
00487616          {
00487618              SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>::Reset(this);
0048761f              int32_t eax_3;
0048761f              eax_3 = 1;
00487622              return 1;
00487616          }
00487616          
0048762c          eax = operator new[]((edi * 0x14));
0048762c          
00487638          if (eax != 0)
00487638          {
00487647              `vector constructor iterator'(eax, 0x14, edi, _STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >);
00487647              
0048764f              if (this->m_data != 0)
0048764f              {
00487651                  uint32_t m_num = this->m_num;
00487651                  
00487655                  if ((m_num - 1) >= 0)
00487655                  {
0048765a                      void* ecx_2 = ((eax + ((m_num - 1) * 0x14)) + 0xc);
00487666                      arg2 = m_num;
0048769f                      bool cond:0_1;
0048769f                      
0048769f                      do
0048769f                      {
00487675                          void* eax_6 = (((0xfffffff4 - eax) + ecx_2) + this->m_data);
00487679                          *(uint32_t*)((char*)ecx_2 - 0xc) = *(uint32_t*)eax_6;
0048767f                          *(uint32_t*)((char*)ecx_2 - 8) = *(uint32_t*)((char*)eax_6 + 4);
00487685                          *(uint32_t*)((char*)ecx_2 - 4) = *(uint32_t*)((char*)eax_6 + 8);
0048768b                          *(uint32_t*)ecx_2 = *(uint32_t*)((char*)eax_6 + 0xc);
00487690                          *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_6 + 0x10);
00487697                          ecx_2 -= 0x14;
0048769a                          cond:0_1 = arg2 != 1;
0048769b                          arg2 -= 1;
0048769f                      } while (cond:0_1);
00487655                  }
00487655                  
004876b1                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004876b6                      operator delete[](this->m_data);
0048764f              }
0048764f              
004876c4              this->m_data = eax;
004876c6              this->m_sizeAndDeallocate = (edi | 0x80000000);
004876cb              eax_2 = 1;
004876ce              return 1;
00487638          }
004875fe      }
004875fe      
004876d3      eax = 0;
004876d6      return 0;
004875f0  }

0048766d                                         8d 49 00                                                               .I.
004876d9                                                                             90 90 90 90 90 90 90                           .......

004876e0  uint8_t __fastcall UIOption_ActionKeyMap::Changed(class UIOption_ActionKeyMap* this)

004876e0  {
004876e3      uint32_t _num_elements = this->m_qclSaved._num_elements;
004876e3      
004876ef      if (_num_elements != this->m_qclCurrent._num_elements)
004876ef      {
004876f1          _num_elements = 1;
004876f4          return 1;
004876ef      }
004876ef      
004876f6      int32_t esi = 0;
004876f6      
004876fa      if (_num_elements > 0)
004876fa      {
00487700          while (true)
00487700          {
00487700              class ListNode<QualifiedControl>* edx_1 = this->m_qclSaved._head;
00487700              
00487708              if (edx_1 == 0)
00487708                  break;
00487708              
00487710              if (esi >= this->m_qclSaved._num_elements)
00487710                  break;
00487710              
00487712              _num_elements = 0;
00487712              
00487716              while (_num_elements != esi)
00487716              {
00487718                  edx_1 = edx_1->next;
0048771b                  _num_elements += 1;
0048771b                  
0048771e                  if (edx_1 == 0)
0048771e                      goto label_487721;
00487716              }
00487716              
00487727              if (edx_1 == 0)
00487727                  break;
00487727              
00487729              class QualifiedControl* _head = this->m_qclCurrent._head;
00487729              
00487731              if (_head == 0)
00487731                  break;
00487731              
00487739              if (esi >= this->m_qclCurrent._num_elements)
00487739                  break;
00487739              
0048773b              _num_elements = 0;
0048773d              class QualifiedControl* _head_1 = _head;
0048773d              
00487742              while (_num_elements != esi)
00487742              {
00487744                  _head_1 = *(int32_t*)((char*)_head_1 + 0xc);
00487747                  _num_elements += 1;
00487747                  
0048774a                  if (_head_1 == 0)
0048774a                  {
0048774d                      _num_elements = 0;
00487750                      return 0;
0048774a                  }
00487742              }
00487742              
00487753              if (_head_1 == 0)
00487753                  break;
00487753              
0048775d              if (QualifiedControl::IsExactlyEqual(_head_1, edx_1) == 0)
00487773                  return 1;
00487773              
00487765              esi += 1;
00487765              
00487768              if (esi >= this->m_qclSaved._num_elements)
00487768              {
0048776b                  _num_elements = 0;
0048776e                  return 0;
00487768              }
00487700          }
004876fa      }
004876fa      
00487721  label_487721:
00487721      _num_elements = 0;
00487724      return 0;
004876e0  }

00487774                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00487780  uint8_t __thiscall UIOption_ActionKeyMap::EraseBinding(class UIOption_ActionKeyMap* this, int32_t arg2)

00487780  {
00487781      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004877a5      int32_t eax;
004877a5      
004877a5      if ((ICIDM::s_cidm_1 != 0 && (arg2 >= 0 && arg2 < this->m_qclCurrent._num_elements)))
004877a5      {
004877ae          eax = List<QualifiedControl>::get_data(&this->m_qclCurrent, arg2);
004877ae          
004877b7          if (eax != 0)
004877b7          {
004877d5              ICIDM::s_cidm_1->vtable->UnbindByKey(*(uint32_t*)eax, *(uint32_t*)(eax + 4), *(uint32_t*)(eax + 8), this->m_idInputMap);
004877fd              ICIDM::s_cidm_1->vtable->BindAction(*(uint32_t*)eax, *(uint32_t*)(eax + 4), *(uint32_t*)(eax + 8), 1, this->m_idInputMap);
00487808              CM_Character::SendNotice_RefreshActionKeyMapping(eax);
0048780d              class IOptionChangeHandler* m_pOCH = this->m_pOCH;
0048780d              
00487815              if (m_pOCH != 0)
00487817                  m_pOCH->vtable->OnOptionChanged(this);
00487817              
0048781c              int32_t eax_3;
0048781c              eax_3 = 1;
00487821              return 1;
004877b7          }
004877a5      }
004877a5      
00487826      eax = 0;
00487829      return 0;
00487780  }

0048782c                                      90 90 90 90                                                              ....

00487830  uint8_t __thiscall SmartArray<unsigned long,1>::AddToEnd(class SmartArray<unsigned long,1>* this, uint32_t const* arg2)

00487830  {
00487839      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00487839      
00487840      if (this->m_num >= eax_1)
00487840      {
0048784e          uint8_t result = SmartArray<unsigned long,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
0048784e          
00487855          if (result == 0)
00487858              return result;
00487840      }
00487840      
00487862      this->m_data[this->m_num] = *(uint32_t*)arg2;
00487869      this->m_num += 1;
0048786c      uint32_t eax_4;
0048786c      eax_4 = 1;
0048786f      return 1;
00487830  }

00487872                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00487880  void __fastcall List<StringTableMetaLanguage::Node const *>::flush(class List<StringTableMetaLanguage::Node const *>* this)

00487880  {
00487886      while (true)
00487886      {
00487886          class ListNode<StringTableMetaLanguage::Node const *>* _head = this->_head;
00487886          
0048788b          if (_head == 0)
0048788b              break;
0048788b          
0048788d          class ListNode<StringTableMetaLanguage::Node const *>* next = _head->next;
00487892          this->_head = next;
00487892          
00487895          if (next == 0)
0048789c              this->_tail = nullptr;
00487895          else
00487897              next->prev = nullptr;
00487897          
004878a1          if (_head != 0)
004878a4              operator delete(_head);
004878a4          
004878ac          this->_num_elements -= 1;
00487886      }
00487880  }

004878b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004878c0  void __fastcall UIOption_ActionKeyMap::PostInit(class UIOption_ActionKeyMap* this)

004878c0  {
004878c7      UIElement_Scrollable::PostInit(this);
004878da      uint32_t var_1c = 0;
004878de      uint8_t eax = UIElement::GetAttribute_Enum(this, 0x1000002a, &var_1c);
004878e5      int32_t eax_2;
004878e5      
004878e5      if (eax != 0)
004878e5      {
004878ee          class UIElement* eax_1 = UIElement::GetChildRecursive(this, var_1c);
004878ee          
004878f5          if (eax_1 == 0)
00487905              eax_2 = 0;
004878f5          else
004878fd              eax_2 = eax_1->vtable->DynamicCast(1);
004878fd          
00487909          this->m_lastCursor.m_x0 = eax_2;
004878e5      }
004878e5      
0048790f      if ((eax == 0 || eax_2 != 0))
0048790f      {
00487915          struct UIOption_ActionKeyMap::VTable* vtable = this->vtable;
00487924          int32_t* var_8 = nullptr;
00487928          int32_t* var_4_1 = nullptr;
0048792c          char eax_3 = vtable->RecvNotice_UpdateObjectHealth(0x1000002b, &var_8);
00487934          int32_t var_20;
00487934          int32_t* ecx_5;
00487934          int32_t edi_1;
00487934          
00487934          if (eax_3 != 0)
00487934          {
0048793a              ecx_5 = var_4_1;
00487940              var_20 = 0;
00487940              
00487944              if (ecx_5 != 0)
00487944              {
0048794d                  *(uint32_t*)(*(uint32_t*)ecx_5 + 0xf0)(&var_20);
00487953                  ecx_5 = var_4_1;
00487944              }
00487944              
0048795b              edi_1 = 0;
00487934          }
00487934          
0048795f          if ((eax_3 == 0 || var_20 <= 0))
0048795f          {
00487a35          label_487a35:
00487a35              class GlobalEventHandler* eax_14 = GlobalEventHandler::GetGlobalEventHandler();
00487a35              
00487a3c              if (eax_14 != 0)
00487a3e                  eax_14->vtable->RegisterNoticeHandler(0x4dd242, ((char*)this - 0x20));
00487a3e              
00487a52              UIListener::RegisterForGlobalMessage(this, 0xc);
0048795f          }
0048795f          else
0048795f          {
00487967              while (true)
00487967              {
00487967                  int32_t* var_10 = nullptr;
0048796b                  int32_t* var_c_1 = nullptr;
0048796b                  
0048796f                  if (ecx_5 != 0)
0048796f                  {
00487985                      int32_t* ecx_6;
00487985                      
00487985                      if (*(uint32_t*)(*(uint32_t*)ecx_5 + 0xf4)(edi_1, &var_10) == 0)
004879e0                          ecx_6 = var_c_1;
00487985                      else
00487985                      {
00487987                          ecx_6 = var_c_1;
0048798d                          uint32_t var_18 = 0;
0048798d                          
00487991                          if (ecx_6 != 0)
00487991                          {
004879a2                              if (*(uint32_t*)(*(uint32_t*)ecx_6 + 0xa8)(&var_18) != 0)
004879a2                              {
004879ab                                  class UIElement* eax_7 = UIElement::GetChildRecursive(this, var_18);
004879b2                                  uint32_t var_14;
004879b2                                  uint32_t eax_8;
004879b2                                  
004879b2                                  if (eax_7 != 0)
004879b2                                  {
004879be                                      eax_8 = eax_7->vtable->DynamicCast(1);
004879c6                                      var_14 = eax_8;
004879b2                                  }
004879b2                                  
004879ca                                  if ((eax_7 == 0 || eax_8 == 0))
004879ca                                  {
00487aa0                                      int32_t* eax_20 = var_10;
00487aa0                                      
00487aa6                                      if (eax_20 != 0)
00487aa6                                      {
00487ab0                                          int32_t esi_6 = (eax_20[1] - 1);
00487aad                                          eax_20[1] = esi_6;
00487aad                                          
00487ab7                                          if (esi_6 == 0)
00487abd                                              **(uint32_t**)eax_20(1);
00487abd                                          
00487abf                                          var_10 = nullptr;
00487aa6                                      }
00487aa6                                      
00487ac9                                      if (var_c_1 != 0)
00487ac9                                      {
00487ad3                                          int32_t esi_8 = (var_c_1[1] - 1);
00487ad0                                          var_c_1[1] = esi_8;
00487ad0                                          
00487ada                                          if (esi_8 == 0)
00487ae0                                              **(uint32_t**)var_c_1(1);
00487ae0                                          
00487ae2                                          int32_t var_c_3 = 0;
00487ac9                                      }
00487ac9                                      
00487ac9                                      break;
004879ca                                  }
004879ca                                  
004879db                                  SmartArray<unsigned long,1>::AddToEnd(&this->m_lastCursor.m_y0, &var_14);
004879a2                              }
004879a2                              
004879e0                              ecx_6 = var_c_1;
00487991                          }
00487985                      }
00487985                      
004879e4                      int32_t* eax_9 = var_10;
004879e4                      
004879ea                      if (eax_9 != 0)
004879ea                      {
004879f4                          int32_t edx_7 = (eax_9[1] - 1);
004879f1                          eax_9[1] = edx_7;
004879f1                          
004879f9                          if (edx_7 == 0)
004879ff                              **(uint32_t**)eax_9(1);
004879ff                          
00487a01                          ecx_6 = var_c_1;
00487a05                          var_10 = nullptr;
004879ea                      }
004879ea                      
00487a0b                      if (ecx_6 != 0)
00487a0b                      {
00487a13                          int32_t edx_10 = (ecx_6[1] - 1);
00487a10                          ecx_6[1] = edx_10;
00487a10                          
00487a18                          if (edx_10 == 0)
00487a1e                              **(uint32_t**)ecx_6(1);
00487a1e                          
00487a20                          int32_t var_c_2 = 0;
00487a0b                      }
00487a0b                      
00487a24                      ecx_5 = var_4_1;
0048796f                  }
0048796f                  
00487a2c                  edi_1 += 1;
00487a2c                  
00487a2f                  if (edi_1 >= var_20)
00487a2f                      goto label_487a35;
00487967              }
0048795f          }
0048795f          
00487a57          int32_t* eax_15 = var_8;
00487a57          
00487a5d          if (eax_15 != 0)
00487a5d          {
00487a67              int32_t esi_2 = (eax_15[1] - 1);
00487a64              eax_15[1] = esi_2;
00487a64              
00487a6e              if (esi_2 == 0)
00487a74                  **(uint32_t**)eax_15(1);
00487a74              
00487a76              var_8 = nullptr;
00487a5d          }
00487a5d          
00487a80          if (var_4_1 != 0)
00487a80          {
00487a8a              int32_t esi_4 = (var_4_1[1] - 1);
00487a87              var_4_1[1] = esi_4;
00487a87              
00487a91              if (esi_4 == 0)
00487a97                  **(uint32_t**)var_4_1(1);
00487a80          }
0048790f      }
004878c0  }

00487aeb                                   90 90 90 90 90                                                             .....

00487af0  void* __thiscall List<unsigned long>::`scalar deleting destructor'(class List<unsigned long>* this, uint32_t arg2)

00487af0  {
00487af3      this->vtable = 0x7a2be4;
00487af9      List<StringTableMetaLanguage::Node const *>::flush(this);
00487af9      
00487b03      if ((arg2 & 1) != 0)
00487b06          operator delete(this);
00487b06      
00487b11      return this;
00487af0  }

00487b14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00487b20  uint8_t __thiscall UIOption_ActionKeyMap::SetBinding(class UIOption_ActionKeyMap* this, class QualifiedControl arg2, int32_t arg3)

00487b20  {
00487b24      class UIOption_ActionKeyMap* this_1 = this;
00487b26      uint32_t _num_elements = this_1->m_qclCurrent._num_elements;
00487b32      int32_t ebp = 0;
00487b37      class UIOption_ActionKeyMap* this_2 = this_1;
00487b37      
00487b3b      if (arg3 > _num_elements)
00487b3d          arg3 = _num_elements;
00487b3b      else if (arg3 < 0)
00487b47          arg3 = 0;
00487b47      
00487b5a      if ((arg2.m_key.__inner0 != 0xffffffff && arg2.m_activation != 0))
00487b5a      {
00487b60          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00487b60          
00487b68          if (ICIDM::s_cidm_1 != 0)
00487b68          {
00487b7c              void* var_34;
00487b7c              *(int32_t*)((char*)ICIDM::s_cidm_1->vtable + 0x7c)(&var_34, &arg2);
00487b7f              void* eax_1 = var_34;
00487b87              void* var_48_2;
00487b87              void* esi_1;
00487b87              
00487b87              if (*(uint32_t*)((char*)eax_1 - 4) != 1)
00487b87              {
00487b95                  uint32_t m_idInputMap = this_1->m_idInputMap;
00487ba0                  int32_t var_10 = 0x7a2be4;
00487ba8                  int32_t* i_2 = nullptr;
00487bac                  int32_t var_8_1 = 0;
00487bb0                  int32_t var_4_1 = 0;
00487bb4                  ICIDM::s_cidm_1->vtable->FindConflictingInputMaps(m_idInputMap, &var_10);
00487bc5                  int32_t* i_1 = i_2;
00487bc5                  
00487bc9                  if (i_2 != 0)
00487bc9                  {
00487c77                      int32_t* i;
00487c77                      
00487c77                      do
00487c77                      {
00487bd4                          int32_t eax_6 = *(uint32_t*)i_1;
00487bd6                          struct ICIDM::VTable* vtable = ICIDM::s_cidm_1->vtable;
00487beb                          void* var_28 = nullptr;
00487bef                          int32_t var_24_1 = 0;
00487bf3                          int32_t var_20_1 = 0;
00487bf3                          
00487c07                          if ((vtable->FindConflictingControls(&this_1->m_qcBindingBeingChanged, eax_6, &var_28) != 0 && var_20_1 > 0))
00487c07                          {
00487c0b                              if (var_20_1 > 0)
00487c0b                              {
00487c0d                                  int32_t* edi_1 = nullptr;
00487c0d                                  
00487c45                                  do
00487c45                                  {
00487c10                                      void* eax_10 = var_28;
00487c31                                      ICIDM::s_cidm_1->vtable->UnbindByKey(*(uint32_t*)((char*)edi_1 + eax_10), *(uint32_t*)(((char*)edi_1 + eax_10) + 4), *(uint32_t*)(((char*)edi_1 + eax_10) + 8), eax_6);
00487c3f                                      ebp += 1;
00487c40                                      edi_1 = &edi_1[4];
00487c45                                  } while (ebp < var_20_1);
00487c45                                  
00487c47                                  this_1 = this_2;
00487c0b                              }
00487c0b                              
00487c4b                              ebp = 0;
00487c07                          }
00487c07                          
00487c5b                          if ((var_24_1 & 0x80000000) == 0x80000000)
00487c62                              operator delete[](var_28);
00487c62                          
00487c6e                          i = i_1[1];
00487c73                          i_1 = i;
00487c77                      } while (i != 0);
00487bc9                  }
00487bc9                  
00487c8f                  if ((arg3 >= 0 && arg3 < this_1->m_qclCurrent._num_elements))
00487c8f                  {
00487c9e                      class QualifiedControl* eax_16 = List<QualifiedControl>::get_data(&this_1->m_qclCurrent, arg3);
00487c9e                      
00487ca7                      if (eax_16 != 0)
00487ca7                      {
00487cc9                          ICIDM::s_cidm_1->vtable->UnbindByKey(eax_16->m_key.__inner0, eax_16->m_metamode, eax_16->m_activation, this_1->m_idInputMap);
00487cc9                          
00487cdf                          if (QualifiedControl::IsConflicting(&arg2, eax_16) == 0)
00487cff                              ICIDM::s_cidm_1->vtable->BindAction(eax_16->m_key.__inner0, eax_16->m_metamode, eax_16->m_activation, 1, this_1->m_idInputMap);
00487cff                          
00487d0d                          eax_16->m_key.__inner0 = arg2.m_key.__inner0;
00487d13                          eax_16->m_metamode = arg2.m_metamode;
00487d1a                          eax_16->m_activation = arg2.m_activation;
00487d29                          ICIDM::s_cidm_1->vtable->UnbindAllByAction(this_1->m_idInputAction, this_1->m_idInputMap);
00487d35                          class ListNode<QualifiedControl>* edi_3 = this_1->m_qclCurrent._head;
00487d35                          
00487d3f                          while (edi_3 != 0 != 0)
00487d3f                          {
00487d68                              ICIDM::s_cidm_1->vtable->BindAction(edi_3->data.m_key.__inner0, edi_3->data.m_metamode, edi_3->data.m_activation, this_1->m_idInputAction, this_1->m_idInputMap);
00487d72                              edi_3 = edi_3->next;
00487d3f                          }
00487ca7                      }
00487ca7                      
00487ca7                      goto label_487e72;
00487c8f                  }
00487c8f                  
00487d83                  if (this_1->m_qclCurrent._num_elements < this_1->m_aKeyButtons.m_num)
00487d83                  {
00487e1a                  label_487e1a:
00487e16                      ICIDM::s_cidm_1->vtable->BindAction(arg2.m_key.__inner0, arg2.m_metamode, arg2.m_activation, this_1->m_idInputAction, this_1->m_idInputMap);
00487e2b                      List<QualifiedControl>::push_back(&this_1->m_qclCurrent, &arg2);
00487e72                  label_487e72:
00487e72                      class IOptionChangeHandler* m_pOCH = this_1->m_pOCH;
00487e72                      
00487e77                      if (m_pOCH != 0)
00487e79                          m_pOCH->vtable->OnOptionChanged(this_1);
00487e79                      
00487e8f                      this_1 = CM_Character::SendNotice_RefreshActionKeyMapping(&arg2);
00487e91                      var_10 = 0x7a2be4;
00487e99                      List<StringTableMetaLanguage::Node const *>::flush(&var_10);
00487ea2                      void* esi_4 = ((char*)var_34 - 0x14);
00487ea2                      
00487eb5                      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00487ebd                          **(uint32_t**)esi_4(1);
00487ebd                      
00487ec2                      int32_t eax_32;
00487ec2                      eax_32 = this_1;
00487ec8                      return eax_32;
00487d83                  }
00487d83                  
00487d85                  class ListNode<QualifiedControl>* _head = this_1->m_qclCurrent._head;
00487d85                  
00487d8d                  if (_head != 0)
00487d8d                  {
00487daf                      ICIDM::s_cidm_1->vtable->UnbindByKey(_head->data.m_key.__inner0, _head->data.m_metamode, _head->data.m_activation, this_1->m_idInputMap);
00487daf                      
00487dc5                      if (QualifiedControl::IsConflicting(&arg2, _head) == 0)
00487de5                          ICIDM::s_cidm_1->vtable->BindAction(_head->data.m_key.__inner0, _head->data.m_metamode, _head->data.m_activation, 1, this_1->m_idInputMap);
00487de5                      
00487dc5                      goto label_487e1a;
00487d8d                  }
00487d8d                  
00487e36                  var_10 = 0x7a2be4;
00487e3e                  List<StringTableMetaLanguage::Node const *>::flush(&var_10);
00487e47                  esi_1 = ((char*)var_34 - 0x14);
00487e4d                  var_48_2 = ((char*)esi_1 + 4);
00487b87              }
00487b87              else
00487b87              {
00487b89                  esi_1 = ((char*)eax_1 - 0x14);
00487b8f                  var_48_2 = ((char*)esi_1 + 4);
00487b87              }
00487b87              
00487e5a              if ((InterlockedDecrement(var_48_2) == 0 && esi_1 != 0))
00487e62                  **(uint32_t**)esi_1(1);
00487b68          }
00487b5a      }
00487b5a      
00487e64      _num_elements = 0;
00487e6d      return 0;
00487b20  }

00487ecb                                   90 90 90 90 90                                                             .....

00487ed0  uint8_t __fastcall UIOption_ActionKeyMap::ClearAllBindings(class UIOption_ActionKeyMap* this)

00487ed0  {
00487edb      if (this->m_qclCurrent._head != 0)
00487edb      {
00487ee4          int32_t i = 0;
00487ee4          
00487ee8          if (this->m_qclCurrent._num_elements > 0)
00487ee8          {
00487f01              do
00487f01              {
00487ef3                  UIOption_ActionKeyMap::EraseBinding(this, i);
00487efe                  i += 1;
00487f01              } while (i < this->m_qclCurrent._num_elements);
00487ee8          }
00487ee8          
00487f09          List<CInputManager::InputMapEntry>::flush(&this->m_qclCurrent);
00487f0e          this->vtable->Refresh();
00487edb      }
00487edb      
00487f19      class ListNode<QualifiedControl>* eax;
00487f19      eax = 1;
00487f1c      return 1;
00487ed0  }

00487f1d                                                                                         90 90 90                               ...

00487f20  class List<CInputManager::InputMapEntry>* __thiscall List<QualifiedControl>::operator=(class List<CInputManager::InputMapEntry>* arg1, void* arg2)

00487f20  {
00487f2a      if (arg1 != arg2)
00487f2a      {
00487f2d          List<CInputManager::InputMapEntry>::flush(arg1);
00487f2d          
00487f39          for (int32_t* i = *(uint32_t*)((char*)arg2 + 4); i != 0; i = i[3])
00487f39          {
00487f42              class ListNode<CInputManager::InputMapEntry>* eax_1 = operator new(0x14);
00487f42              
00487f4c              if (eax_1 != 0)
00487f4c              {
00487f50                  eax_1->data.m_mapID = *(uint32_t*)i;
00487f55                  eax_1->data.m_pcCallback = i[1];
00487f5b                  eax_1->data.m_nPriority = i[2];
00487f5e                  eax_1->next = nullptr;
00487f61                  eax_1->prev = nullptr;
00487f61                  
00487f67                  if (arg1->_head != 0)
00487f67                  {
00487f6e                      class ListNode<CInputManager::InputMapEntry>* _tail = arg1->_tail;
00487f71                      _tail->next = eax_1;
00487f74                      eax_1->prev = _tail;
00487f67                  }
00487f67                  else
00487f69                      arg1->_head = eax_1;
00487f69                  
00487f77                  arg1->_tail = eax_1;
00487f7a                  arg1->_num_elements += 1;
00487f4c              }
00487f4c              
00487f7f              if (i == 0)
00487f7f                  break;
00487f39          }
00487f2a      }
00487f2a      
00487f8d      return arg1;
00487f20  }

00487f3d                                                                                         8d 49 00                               .I.

00487f90  void* __thiscall List<QualifiedControl>::`scalar deleting destructor'(class List<QualifiedControl>* this, uint32_t arg2)

00487f90  {
00487f93      this->vtable = 0x7a2be8;
00487f99      List<CInputManager::InputMapEntry>::flush(this);
00487f99      
00487fa3      if ((arg2 & 1) != 0)
00487fa6          operator delete(this);
00487fa6      
00487fb1      return this;
00487f90  }

00487fb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00487fc0  void __stdcall ClientSystem::AddTextToScroll(class ClientSystem* this @ ecx, char const* arg2, uint32_t arg3, uint8_t arg4, uint32_t arg5)

00487fc0  {
00487fe9      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, arg2), &arg2, arg3, arg4, arg5);
00487ff2      void* esi_3 = &arg2[0xffffffec];
00487ff2      
00488005      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0048800d          **(uint32_t**)esi_3(1);
00487fc0  }

00488013                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00488020  void __thiscall UIOption_ActionKeyMap::UIOption_ActionKeyMap(class UIOption_ActionKeyMap* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00488020  {
00488024      UIOption::UIOption(this);
00488038      UIElement_Text::UIElement_Text(&this->vtable, arg2, arg3);
0048803f      __builtin_memset(&this->m_buttonClear, 0, 0x18);
00488045      this->vtable = 0x7a2d48;
00488032      this->vtable = &UIOption_ActionKeyMap::`vftable';
00488051      this->vtable = &UIOption_ActionKeyMap::`vftable';
00488079      this->m_qclDefaults._head = nullptr;
0048807f      this->m_qclDefaults._tail = nullptr;
00488085      this->m_qclDefaults._num_elements = 0;
00488090      this->m_qclDefaults.vtable = 0x7a2be8;
00488096      this->m_qclSaved.vtable = 0x7a2be8;
0048809c      this->m_qclSaved._head = nullptr;
004880a2      this->m_qclSaved._tail = nullptr;
004880a8      this->m_qclSaved._num_elements = 0;
004880ae      this->m_qclCurrent.vtable = 0x7a2be8;
004880b4      this->m_qclCurrent._head = nullptr;
004880ba      this->m_qclCurrent._tail = nullptr;
004880c0      this->m_qclCurrent._num_elements = 0;
004880c6      this->m_qcBindingBeingChanged.m_metamode = 0;
004880cc      this->m_qcBindingBeingChanged.m_activation = 0;
004880d5      this->m_qcBindingBeingChanged.m_key.__inner0 = 0xffffffff;
004880db      this->m_ctxtDialog = 0;
004880e1      this->m_ctxtOverwriteBindingDialog = 0;
004880e7      this->m_ctxtCantOverwriteBindingDialog = 0;
004880ed      this->m_skipConfirmation = 0;
004880f4      this->m_nBindingBeingChanged = 0xffffffff;
00488020  }


00488100  class UIElement* __thiscall UIOption_ActionKeyMap::DynamicCast(class UIOption_ActionKeyMap* this, uint32_t arg2) __pure

00488100  {
0048810a      if (arg2 == 0x10000034)
0048810a      {
0048810e          if (this == 0)
00488118              return 0;
00488118          
00488113          return &this->vtable;
0048810a      }
0048810a      
0048811e      struct UIElement_Text::VTable** result = &this->vtable;
0048811e      
00488121      if (arg2 == 0xc)
0048812e          return result;
0048812e      
00488128      int32_t ecx;
00488128      ecx = arg2 != 0xa;
0048812c      return (result & (ecx - 1));
00488100  }

00488131                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00488140  uint32_t UIOption_ActionKeyMap::GetUIElementType(class UIOption_ActionKeyMap const* this @ ecx) __pure

00488140  {
00488145      return 0x10000034;
00488140  }

00488146                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00488150  void* __thiscall UIOption_ActionKeyMap::`vector deleting destructor'(class UIOption_ActionKeyMap* this, uint32_t arg2)

00488150  {
00488153      /* tailcall */
00488153      return UIOption_ActionKeyMap::`scalar deleting destructor'(((char*)this - 0x20), arg2);
00488150  }

00488158                                                                          cc cc cc cc cc cc cc cc                          ........

00488160  class UIElement* __thiscall UIOption_ActionKeyMap::DynamicCast(class UIOption_ActionKeyMap* this, uint32_t arg2)

00488160  {
00488163      /* tailcall */
00488163      return UIOption_ActionKeyMap::DynamicCast(((char*)this - 0x20), arg2);
00488160  }

00488168                          cc cc cc cc cc cc cc cc                                                          ........

00488170  void __fastcall UIOption_ActionKeyMap::~UIOption_ActionKeyMap(class UIOption_ActionKeyMap* this)

00488170  {
0048817e      this->vtable = 0x7a2d48;
00488175      this->vtable = &UIOption_ActionKeyMap::`vftable';
00488178      this->vtable = &UIOption_ActionKeyMap::`vftable';
00488190      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
00488190      
00488197      if (eax != 0)
00488199          eax->vtable->UnRegisterAllNoticeHandlers(this);
00488199      
004881a1      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004881a1      
004881a9      if (ICIDM::s_cidm_1 != 0)
004881ab          ICIDM::s_cidm_1->vtable->UnregisterInputHandler(&this->vtable, 0x20);
004881ab      
004881b7      UIListener::UnRegisterForGlobalMessage(&this->vtable, 0xc);
004881bc      this->m_qclCurrent.vtable = 0x7a2be8;
004881c8      List<CInputManager::InputMapEntry>::flush(&this->m_qclCurrent);
004881cd      this->m_qclSaved.vtable = 0x7a2be8;
004881d9      List<CInputManager::InputMapEntry>::flush(&this->m_qclSaved);
004881de      this->m_qclDefaults.vtable = 0x7a2be8;
004881ea      List<CInputManager::InputMapEntry>::flush(&this->m_qclDefaults);
004881ea      
00488201      if ((this->m_aKeyButtons.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0048820a          operator delete[](this->m_aKeyButtons.m_data);
0048820a      
00488214      UIElement_Text::~UIElement_Text(&this->vtable);
0048821e      /* tailcall */
0048821e      return UIOption::~UIOption(this);
00488170  }

00488223           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00488230  class UIElement* UIOption_ActionKeyMap::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00488230  {
00488235      void* eax = operator new(0x798);
00488235      
0048823f      if (eax != 0)
0048823f      {
0048824d          int32_t eax_1 = UIOption_ActionKeyMap::UIOption_ActionKeyMap(eax, arg1, arg2);
0048824d          
00488254          if (eax_1 != 0)
00488259              return (eax_1 + 0x20);
0048823f      }
0048823f      
0048825c      return 0;
00488230  }

0048825d                                                                                         90 90 90                               ...

00488260  uint8_t __fastcall UIOption_ActionKeyMap::SaveCurrentValue(class UIOption_ActionKeyMap* this)

00488260  {
0048826d      List<QualifiedControl>::operator=(&this->m_qclSaved.vtable, &this->m_qclCurrent);
00488272      class List<CInputManager::InputMapEntry>* eax;
00488272      eax = 1;
00488274      return 1;
00488260  }

00488275                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00488280  uint8_t __fastcall UIOption_ActionKeyMap::RestoreSavedValue(class UIOption_ActionKeyMap* this)

00488280  {
00488287      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00488287      
00488293      if (ICIDM::s_cidm_1 == 0)
00488293      {
004884e2          int32_t eax;
004884e2          eax = 0;
004884e8          return 0;
00488293      }
00488293      
00488299      uint32_t m_idInputMap = this->m_idInputMap;
004882a4      uint32_t m_idInputAction = this->m_idInputAction;
004882ab      int32_t var_10 = 0x7a2be8;
004882b3      class QualifiedControl* i_7 = nullptr;
004882b7      int32_t var_8 = 0;
004882bb      int32_t var_4 = 0;
004882bf      ICIDM::s_cidm_1->vtable->FindKeysForAction(m_idInputAction, m_idInputMap, &var_10);
004882ca      class ListNode<QualifiedControl>* esi = this->m_qclCurrent._head;
004882ca      
004882d7      while (esi != 0 != 0)
004882d7      {
004882e3          for (class QualifiedControl* i = i_7; i != 0; i = *(int32_t*)((char*)i + 0xc))
004882e3          {
004882ef              if (QualifiedControl::operator==(i, esi) != 0)
004882ef              {
00488300                  if (i != 0)
00488300                  {
0048831e                      ICIDM::s_cidm_1->vtable->UnbindByKey(esi->data.m_key.__inner0, esi->data.m_metamode, esi->data.m_activation, this->m_idInputMap);
00488346                      ICIDM::s_cidm_1->vtable->BindAction(esi->data.m_key.__inner0, esi->data.m_metamode, esi->data.m_activation, 1, this->m_idInputMap);
00488300                  }
00488300                  
00488300                  break;
004882ef              }
004882ef              
004882f3              if (i == 0)
004882f3                  break;
004882e3          }
004882e3          
00488354          if (esi != 0)
0048835a              esi = esi->next;
004882d7      }
004882d7      
00488362      uint32_t m_idInputMap_1 = this->m_idInputMap;
0048836d      int32_t var_20 = 0x7a2be4;
00488375      void* i_5 = nullptr;
00488379      int32_t var_18 = 0;
0048837d      int32_t var_14 = 0;
00488381      ICIDM::s_cidm_1->vtable->FindConflictingInputMaps(m_idInputMap_1, &var_20);
00488392      void* i_4 = i_5;
00488396      void* i_1;
00488396      
00488396      if (i_5 != 0)
00488396      {
004883eb          do
004883eb          {
004883a4              int32_t ebp_1 = *(uint32_t*)i_4;
004883a6              class ListNode<QualifiedControl>* esi_1 = this->m_qclSaved._head;
004883a6              
004883b2              while (true)
004883b2              {
004883b2                  int32_t* eax_5;
004883b2                  eax_5 = esi_1 != 0;
004883b2                  
004883b7                  if (eax_5 == 0)
004883b7                      break;
004883b7                  
004883cf                  ICIDM::s_cidm_1->vtable->UnbindByKey(esi_1->data.m_key.__inner0, esi_1->data.m_metamode, esi_1->data.m_activation, ebp_1);
004883d9                  esi_1 = esi_1->next;
004883b2              }
004883b2              
004883e2              i_1 = *(uint32_t*)((char*)i_4 + 4);
004883e7              i_4 = i_1;
004883eb          } while (i_1 != 0);
00488396      }
00488396      
004883ef      class ListNode<QualifiedControl>* esi_2 = this->m_qclSaved._head;
004883ef      
004883f7      while (true)
004883f7      {
004883f7          i_1 = esi_2 != 0;
004883f7          
004883fc          if (i_1 == 0)
004883fc              break;
004883fc          
00488421          ICIDM::s_cidm_1->vtable->BindAction(esi_2->data.m_key.__inner0, esi_2->data.m_metamode, esi_2->data.m_activation, this->m_idInputAction, this->m_idInputMap);
0048842b          esi_2 = esi_2->next;
004883f7      }
004883f7      
0048843d      List<QualifiedControl>::operator=(&this->m_qclCurrent, &this->m_qclSaved);
00488442      this->vtable->Refresh();
0048844c      void* i_2 = i_5;
00488450      var_20 = 0x7a2be4;
00488450      
0048845a      while (i_2 != 0)
0048845a      {
0048845c          void* i_9 = i_2;
0048845e          i_2 = *(uint32_t*)((char*)i_2 + 4);
00488463          void* i_6 = i_2;
00488463          
00488467          if (i_2 == 0)
00488472              int32_t var_18_1 = 0;
00488467          else
00488467          {
00488469              *(uint32_t*)((char*)i_2 + 8) = 0;
0048846c              i_2 = i_6;
00488467          }
00488467          
00488478          if (i_9 != 0)
00488478          {
0048847b              operator delete(i_9);
00488480              i_2 = i_6;
00488478          }
00488478          
00488487          var_14 -= 1;
0048845a      }
0048845a      
0048848d      class QualifiedControl* i_3 = i_7;
00488491      var_10 = 0x7a2be8;
00488491      
004884a2      while (i_3 != 0)
004884a2      {
004884a4          class QualifiedControl* i_10 = i_3;
004884a6          i_3 = *(int32_t*)((char*)i_3 + 0xc);
004884ab          class QualifiedControl* i_8 = i_3;
004884ab          
004884af          if (i_3 == 0)
004884ba              int32_t var_8_1 = 0;
004884af          else
004884af          {
004884b1              *(int32_t*)((char*)i_3 + 0x10) = 0;
004884b4              i_3 = i_8;
004884af          }
004884af          
004884c0          if (i_10 != 0)
004884c0          {
004884c3              operator delete(i_10);
004884c8              i_3 = i_8;
004884c0          }
004884c0          
004884cf          var_4 -= 1;
004884a2      }
004884a2      
004884d5      i_3 = 1;
004884de      return 1;
00488280  }

0048839a                                                                                8d 9b 00 00 00 00                            ......
004884e9                             90 90 90 90 90 90 90                                                           .......

004884f0  uint8_t __fastcall UIOption_ActionKeyMap::RestoreDefaultValue(class UIOption_ActionKeyMap* this)

004884f0  {
00488500      List<QualifiedControl>::operator=(&this->m_qclCurrent.vtable, &this->m_qclDefaults);
00488505      this->vtable->Refresh();
0048850f      int32_t eax_1;
0048850f      eax_1 = 1;
00488512      return 1;
004884f0  }

00488513                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00488520  void __thiscall UIOption_ActionKeyMap::RecvNotice_ReloadOptions(class UIOption_ActionKeyMap* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00488520  {
0048852c      List<CInputManager::InputMapEntry>::flush(&this->m_qclCurrent);
00488531      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00488531      
00488539      if (ICIDM::s_cidm_1 == 0)
00488560          return;
00488560      
00488541      ICIDM::s_cidm_1->vtable->FindKeysForAction(this->m_idInputAction, this->m_idInputMap, &this->m_qclCurrent);
00488558      /* jump -> this->vtable->Refresh */
00488520  }

00488561     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00488570  void __thiscall UIOption_ActionKeyMap::RecvNotice_RefreshActionKeyMapping(class UIOption_ActionKeyMap* this, class QualifiedControl const* arg2)

00488570  {
00488581      if (((arg2->m_key.__inner0 != 0xffffffff && arg2->m_activation != 0) && List<QualifiedControl>::find(&this->m_qclCurrent, arg2) != 0))
00488595          UIOption_ActionKeyMap::RecvNotice_ReloadOptions(this);
00488570  }

0048859e                                                                                            90 90                                ..

004885a0  void __thiscall UIOption_ActionKeyMap::RecvNotice_CloseDialog(class UIOption_ActionKeyMap* this, uint32_t arg2, class PropertyCollection const* arg3)

004885a0  {
004885a0      uint32_t eax_7 = arg2;
004885a0      
004885b2      if (eax_7 == this->m_ctxtOverwriteBindingDialog)
004885b2      {
004885c3          uint32_t temp1_1 = (COMBINE(0, 0x92) % arg3->m_hashProperties.m_intrusiveTable.m_numBuckets);
004885c6          class HashTableData<unsigned long,BaseProperty>** m_buckets = arg3->m_hashProperties.m_intrusiveTable.m_buckets;
004885cb          int32_t* ecx = nullptr;
004885cd          arg2 = 0;
004885d1          int32_t* var_8 = nullptr;
004885d5          int32_t* var_4_1 = nullptr;
004885d5          
004885e0          for (int32_t* i = m_buckets[temp1_1]; i != 0; i = i[1])
004885e0          {
004885e8              if (*(uint32_t*)i == 0x92)
004885e8              {
004885f5                  if (i != 0)
004885f5                  {
004885ff                      BaseProperty::operator=(&var_8, &i[2]);
00488604                      ecx = var_4_1;
00488604                      
0048860a                      if (ecx != 0)
0048860a                      {
00488613                          *(uint32_t*)(*(uint32_t*)ecx + 0x70)(&arg2);
00488616                          ecx = var_4_1;
0048860a                      }
004885f5                  }
004885f5                  
004885f5                  break;
004885e8              }
004885e0          }
004885e0          
0048861a          bool cond:1_1 = arg2 == 0;
0048861e          this->m_ctxtOverwriteBindingDialog = 0;
0048861e          
00488624          if (!(cond:1_1))
00488624          {
00488640              uint32_t m_metamode = this->m_qcBindingBeingChanged.m_metamode;
0048864b              uint32_t m_activation = this->m_qcBindingBeingChanged.m_activation;
0048864e              UIOption_ActionKeyMap::SetBinding(this, this->m_qcBindingBeingChanged.m_key.__inner0, this->m_nBindingBeingChanged);
00488653              ecx = var_4_1;
00488624          }
00488624          
0048865a          this->m_qcBindingBeingChanged.m_key.__inner0 = 0xffffffff;
00488660          this->m_qcBindingBeingChanged.m_metamode = 0;
00488666          this->m_qcBindingBeingChanged.m_activation = 0;
0048866c          this->m_nBindingBeingChanged = 0xffffffff;
00488672          int32_t* eax_3 = var_8;
00488672          
00488678          if (eax_3 != 0)
00488678          {
00488682              int32_t esi_2 = (eax_3[1] - 1);
0048867f              eax_3[1] = esi_2;
0048867f              
00488689              if (esi_2 == 0)
0048868f                  **(uint32_t**)eax_3(1);
0048868f              
00488691              ecx = var_4_1;
00488695              var_8 = nullptr;
00488678          }
00488678          
0048869b          if (ecx != 0)
0048869b          {
004886a3              int32_t esi_4 = (ecx[1] - 1);
004886a0              ecx[1] = esi_4;
004886a0              
004886aa              if (esi_4 == 0)
004886b0                  **(uint32_t**)ecx(1);
0048869b          }
004885b2      }
004885b2      else if (eax_7 == this->m_ctxtCantOverwriteBindingDialog)
004886c1      {
004886c5          this->m_ctxtCantOverwriteBindingDialog = 0;
004886ce          this->m_qcBindingBeingChanged.m_key.__inner0 = 0xffffffff;
004886d4          this->m_qcBindingBeingChanged.m_metamode = 0;
004886da          this->m_qcBindingBeingChanged.m_activation = 0;
004886e0          this->m_nBindingBeingChanged = 0xffffffff;
004886c1      }
004885a0  }

004886ef                                               90                                                                 .

004886f0  void __fastcall UIOption_ActionKeyMap::SetMouseTurningDefaults(class UIOption_ActionKeyMap* this)

004886f0  {
00488700      if (ICIDM::s_cidm != 0)
00488700      {
00488706          bool cond:1_1 = this->m_idInputAction != 0x33;
00488715          this->m_skipConfirmation = 1;
0048872c          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0048872c          int32_t var_10;
0048872c          int32_t var_c;
0048872c          
0048872c          if ((!(cond:1_1) && this->m_idInputMap == 5))
0048872c          {
00488732              struct CInputHandler::VTable* vtable = this->vtable;
00488748              var_c = 0x80101;
00488750              int32_t var_8_1 = 0;
00488754              int32_t var_4_1 = 2;
0048875c              var_10 = 0;
00488760              vtable->KeyHitHandler(&var_c, &var_10);
00488766              this->m_qcBindingBeingChanged.m_key.__inner0 = 0xffffffff;
0048876c              this->m_qcBindingBeingChanged.m_metamode = 0;
00488772              this->m_qcBindingBeingChanged.m_activation = 0;
00488778              this->m_nBindingBeingChanged = 0xffffffff;
0048877e              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00488783              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0048878b              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00488797              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "The key for Camera Zoom In has b…");
0048879c              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004887b3              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data, 7, 1, 0);
004887b3              
004887c8              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004887ca                  AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
0048872c          }
0048872c          
004887e6          if ((this->m_idInputAction == 0x34 && this->m_idInputMap == 5))
004887e6          {
004887ec              struct CInputHandler::VTable* vtable_1 = this->vtable;
00488802              var_c = 0x80201;
0048880a              int32_t var_8_2 = 0;
0048880e              int32_t var_4_2 = 2;
00488816              var_10 = 0;
0048881a              vtable_1->KeyHitHandler(&var_c, &var_10);
00488820              this->m_qcBindingBeingChanged.m_key.__inner0 = 0xffffffff;
00488826              this->m_qcBindingBeingChanged.m_metamode = 0;
0048882c              this->m_qcBindingBeingChanged.m_activation = 0;
00488832              this->m_nBindingBeingChanged = 0xffffffff;
00488838              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0048883d              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00488845              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00488851              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "The key for Camera Zoom Out has …");
00488856              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0048886d              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_data, 7, 1, 0);
0048886d              
00488882              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
00488884                  AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
004887e6          }
004887e6          
0048888d          this->m_skipConfirmation = 0;
00488700      }
004886f0  }

0048889a                                                                                90 90 90 90 90 90                            ......

004888a0  void* __thiscall UIOption_ActionKeyMap::`scalar deleting destructor'(class UIOption_ActionKeyMap* this, uint32_t arg2)

004888a0  {
004888a3      UIOption_ActionKeyMap::~UIOption_ActionKeyMap(this);
004888a3      
004888ad      if ((arg2 & 1) != 0)
004888b0          operator delete(this);
004888b0      
004888bb      return this;
004888a0  }

004888be                                                                                            90 90                                ..

004888c0  void UIOption_ActionKeyMap::Register()

004888c0  {
004888ca      UIElement::RegisterElementClass(0x10000034, UIOption_ActionKeyMap::Create);
004888c0  }

004888d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004888e0  void __thiscall UIOption_ActionKeyMap::Init(class UIOption_ActionKeyMap* this, uint32_t arg2, uint32_t arg3, class StringInfo const* arg4, class StringInfo const* arg5, class List<QualifiedControl> const* arg6)

004888e0  {
004888e0      uint32_t eax_7 = arg2;
004888ec      this->m_idInputMap = arg3;
004888fa      this->m_idInputAction = eax_7;
00488900      List<CInputManager::InputMapEntry>::flush(&this->m_qclCurrent);
00488905      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00488905      
0048890d      if (ICIDM::s_cidm_1 != 0)
0048890d      {
00488915          ICIDM::s_cidm_1->vtable->FindKeysForAction(this->m_idInputAction, this->m_idInputMap, &this->m_qclCurrent);
00488926          this->vtable->Refresh();
0048890d      }
0048890d      
0048893b      List<QualifiedControl>::operator=(&this->m_qclDefaults.vtable, arg6);
00488949      *(int32_t*)((char*)this->vtable + 0x2b0)(arg4);
00488949      
0048895e      if (StringInfo::IsValid(arg5, 1) != 0)
0048895e      {
00488969          StringInfo::GetString(arg5, &arg2, 0);
00488969          
00488976          if (*(uint32_t*)(arg2 - 4) != 1)
00488976          {
00488978              this->vtable->SetMouseVisible(1);
00488991              void var_98;
00488991              StringInfo::StringInfo(&var_98, arg5);
0048899a              UIElement::SetAttribute_StringInfo(&this->vtable, 0x49, var_98);
0048897b              this->__bitfield164.m_mouseOverTop |= 0x20;
00488976          }
00488976          
004889aa          int32_t* esi_3 = (arg2 - 0x14);
004889aa          
004889bd          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004889c5              **(uint32_t**)esi_3(1);
0048895e      }
004888e0  }

004889cc                                      90 90 90 90                                                              ....

004889d0  void __thiscall UIOption_ActionKeyMap::ListenToGlobalMessage(class UIOption_ActionKeyMap* this, uint32_t arg2, int32_t arg3)

004889d0  {
004889db      if (arg2 == 0xc)
004889e0          UIOption_ActionKeyMap::SetMouseTurningDefaults(((char*)this - 0x20));
004889e0      
004889ed      UIElement_Text::ListenToGlobalMessage(this, arg2, arg3);
004889d0  }

004889f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00488a00  uint8_t __thiscall UIOption_ActionKeyMap::OpenMapWarnDialog(class UIOption_ActionKeyMap* this, class StringInfo* arg2)

00488a00  {
00488a2f      if ((StringInfo::IsValid(arg2, 1) == 0 || this->m_ctxtDialog != 0))
00488a2f      {
00488be7          uint32_t eax;
00488be7          eax = 0;
00488bed          return 0;
00488a2f      }
00488a2f      
00488a39      void var_80;
00488a39      PropertyCollection::PropertyCollection(&var_80);
00488a47      int32_t* var_8c = nullptr;
00488a4b      int32_t* var_88 = nullptr;
00488a4f      BaseProperty::SetPropertyName(&var_8c, 0x8e);
00488a4f      
00488a58      if (var_88 != 0)
00488a58      {
00488a5e          BaseProperty::CheckCopyOnWrite(&var_8c);
00488a6b          *(uint32_t*)(*(uint32_t*)var_88 + 0xac)(2);
00488a58      }
00488a58      
00488a88      uint32_t var_84 = BaseProperty::GetPropertyName(&var_8c);
00488a8c      void var_7c;
00488a8c      HashTable<unsigned long,BaseProperty,1>::add(&var_7c, &var_84, &var_8c);
00488a9a      BaseProperty::SetPropertyName(&var_8c, 0xc3);
00488a9a      
00488aa3      if (var_88 != 0)
00488aa3      {
00488aa9          BaseProperty::CheckCopyOnWrite(&var_8c);
00488ab9          *(uint32_t*)(*(uint32_t*)var_88 + 0xac)(0x10000001);
00488aa3      }
00488aa3      
00488ad6      var_84 = BaseProperty::GetPropertyName(&var_8c);
00488ada      HashTable<unsigned long,BaseProperty,1>::add(&var_7c, &var_84, &var_8c);
00488ae8      BaseProperty::SetPropertyName(&var_8c, 0xac);
00488ae8      
00488af1      if (var_88 != 0)
00488af1      {
00488af7          BaseProperty::CheckCopyOnWrite(&var_8c);
00488b04          *(uint32_t*)(*(uint32_t*)var_88 + 0x74)(1);
00488af1      }
00488af1      
00488b1e      var_84 = BaseProperty::GetPropertyName(&var_8c);
00488b22      HashTable<unsigned long,BaseProperty,1>::add(&var_7c, &var_84, &var_8c);
00488b30      BaseProperty::SetPropertyName(&var_8c, 0xc5);
00488b30      
00488b39      if (var_88 != 0)
00488b39      {
00488b3f          BaseProperty::CheckCopyOnWrite(&var_8c);
00488b4b          *(uint32_t*)(*(uint32_t*)var_88 + 0xc4)(arg2);
00488b39      }
00488b39      
00488b68      var_84 = BaseProperty::GetPropertyName(&var_8c);
00488b6c      HashTable<unsigned long,BaseProperty,1>::add(&var_7c, &var_84, &var_8c);
00488b76      uint32_t eax_9 = DialogFactory::MakeDialogInCurrentUI(&var_80);
00488b80      this->m_ctxtDialog = eax_9;
00488b86      int32_t* eax_10 = var_8c;
00488b86      
00488b91      if (eax_10 != 0)
00488b91      {
00488b9b          int32_t edi_2 = (eax_10[1] - 1);
00488b98          eax_10[1] = edi_2;
00488b98          
00488ba2          if (edi_2 == 0)
00488ba8              **(uint32_t**)eax_10(1);
00488ba8          
00488baa          var_8c = nullptr;
00488b91      }
00488b91      
00488bb4      if (var_88 != 0)
00488bb4      {
00488bbe          int32_t edi_4 = (var_88[1] - 1);
00488bbb          var_88[1] = edi_4;
00488bbb          
00488bc5          if (edi_4 == 0)
00488bcb              **(uint32_t**)var_88(1);
00488bcb          
00488bcd          int32_t var_88_1 = 0;
00488bb4      }
00488bb4      
00488bd5      PropertyCollection::~PropertyCollection(&var_80);
00488be2      return eax_9 != 0;
00488a00  }


00488bf0  uint8_t __thiscall UIOption_ActionKeyMap::OpenOverwriteBindingDialog(class UIOption_ActionKeyMap* this, class SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1> const* arg2)

00488bf0  {
00488bf6      int32_t ebx;
00488bf6      int32_t var_1ec = ebx;
00488bf7      int32_t ebp;
00488bf7      int32_t var_1f0 = ebp;
00488bf8      class PStringBase<unsigned short> esi;
00488bf8      class PStringBase<unsigned short> var_1f4 = esi;
00488bf9      class UIOption_ActionKeyMap* this_1 = this;
00488c01      uint32_t* edi;
00488c01      uint32_t* var_1f8 = edi;
00488c01      int32_t* esp_1 = &var_1f8;
00488c06      class UIOption_ActionKeyMap* this_2 = this_1;
00488c06      
00488c0a      if (this_1->m_ctxtOverwriteBindingDialog == 0)
00488c0a      {
00488c10          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00488c18          class ICIDM* ICIDM::s_cidm_2 = ICIDM::s_cidm_1;
00488c18          
00488c1c          if (ICIDM::s_cidm_1 != 0)
00488c1c          {
00488c32              void* var_1d4;
00488c32              *(int32_t*)((char*)ICIDM::s_cidm_1->vtable + 0x7c)(&var_1d4, &this_1->m_qcBindingBeingChanged);
00488c3c              class ActionMap* ebx_1 = ICIDM::s_cidm_1->vtable->GetActionMap();
00488c40              class ActionMap* var_1b8_1 = ebx_1;
00488c44              int32_t* esi_2;
00488c44              bool cond:3_1;
00488c44              
00488c44              if (ebx_1 != 0)
00488c44              {
00488c6d                  void var_108;
00488c6d                  PropertyCollection::PropertyCollection(&var_108);
00488c72                  int32_t var_1fc_3 = 0x8e;
00488c7b                  int32_t var_1e8 = 0;
00488c7f                  int32_t* var_1e4_1 = nullptr;
00488c83                  BaseProperty::SetPropertyName(&var_1e8, 0x8e);
00488c83                  
00488c8c                  if (var_1e4_1 != 0)
00488c8c                  {
00488c92                      BaseProperty::CheckCopyOnWrite(&var_1e8);
00488c9d                      int32_t var_1fc_4 = 1;
00488c9f                      *(uint32_t*)(*(uint32_t*)var_1e4_1 + 0xac)(1);
00488c8c                  }
00488c8c                  
00488cbf                  uint32_t PStringBase<unsigned short>::s_NullBuffer_6 = BaseProperty::GetPropertyName(&var_1e8);
00488cc3                  void var_104;
00488cc3                  HashTable<unsigned long,BaseProperty,1>::add(&var_104, &PStringBase<unsigned short>::s_NullBuffer_6, &var_1e8);
00488cc8                  int32_t var_1fc_6 = 0xc3;
00488cd1                  BaseProperty::SetPropertyName(&var_1e8, 0xc3);
00488cd1                  
00488cda                  if (var_1e4_1 != 0)
00488cda                  {
00488ce0                      BaseProperty::CheckCopyOnWrite(&var_1e8);
00488ceb                      int32_t var_1fc_7 = 0x10000001;
00488cf0                      *(uint32_t*)(*(uint32_t*)var_1e4_1 + 0xac)(0x10000001);
00488cda                  }
00488cda                  
00488d10                  PStringBase<unsigned short>::s_NullBuffer_6 = BaseProperty::GetPropertyName(&var_1e8);
00488d14                  HashTable<unsigned long,BaseProperty,1>::add(&var_104, &PStringBase<unsigned short>::s_NullBuffer_6, &var_1e8);
00488d19                  int32_t var_1fc_9 = 0xac;
00488d22                  BaseProperty::SetPropertyName(&var_1e8, 0xac);
00488d22                  
00488d2b                  if (var_1e4_1 != 0)
00488d2b                  {
00488d31                      BaseProperty::CheckCopyOnWrite(&var_1e8);
00488d3c                      int32_t var_1fc_10 = 1;
00488d3e                      *(uint32_t*)(*(uint32_t*)var_1e4_1 + 0x74)(1);
00488d2b                  }
00488d2b                  
00488d5b                  PStringBase<unsigned short>::s_NullBuffer_6 = BaseProperty::GetPropertyName(&var_1e8);
00488d5f                  HashTable<unsigned long,BaseProperty,1>::add(&var_104, &PStringBase<unsigned short>::s_NullBuffer_6, &var_1e8);
00488d68                  void var_198;
00488d68                  StringInfo::StringInfo(&var_198);
00488d6d                  class SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>* edi_1 = arg2;
00488d78                  int32_t* esp_2;
00488d78                  
00488d78                  if (edi_1->m_num != 1)
00488d78                  {
00488e71                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00488e7c                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00488e84                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00488e84                      void* esp_3 = &var_1f4;
00488e8b                      bool cond:4_1 = edi_1->m_num <= 0;
00488e8d                      var_1d4 = nullptr;
00488e8d                      
00488e91                      if (!(cond:4_1))
00488e91                      {
00488e97                          int32_t var_1c8_1 = 0;
00488e97                          
00488eb0                          while (true)
00488eb0                          {
00488eb0                              struct _STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >* m_data_1 = edi_1->m_data;
00488eb2                              int32_t edx_1 = *(uint32_t*)((char*)esp_3 + 0x2c);
00488eb6                              int32_t ecx_38 = *(uint32_t*)((char*)m_data_1 + edx_1);
00488eb9                              void* eax_15 = ((char*)m_data_1 + edx_1);
00488ebb                              *(uint32_t*)((char*)esp_3 + 0x4c) = ecx_38;
00488ec2                              *(uint32_t*)((char*)esp_3 + 0x50) = *(uint32_t*)((char*)eax_15 + 4);
00488ec9                              *(uint32_t*)((char*)esp_3 + 0x54) = *(uint32_t*)((char*)eax_15 + 8);
00488ed0                              *(uint32_t*)((char*)esp_3 + 0x58) = *(uint32_t*)((char*)eax_15 + 0xc);
00488ed4                              int32_t eax_16 = *(uint32_t*)((char*)eax_15 + 0x10);
00488ed7                              *(uint32_t*)((char*)esp_3 + 0x5c) = eax_16;
00488edd                              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00488ee2                              *(uint32_t*)((char*)esp_3 + 0x18) = PStringBase<unsigned short>::s_NullBuffer_3;
00488ee9                              *(uint32_t*)((char*)esp_3 - 4) = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8];
00488eec                              InterlockedIncrement();
00488eee                              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
00488ef3                              *(uint32_t*)((char*)esp_3 + 0x2c) = PStringBase<unsigned short>::s_NullBuffer_4;
00488efa                              *(uint32_t*)esp_3 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8];
00488efb                              InterlockedIncrement();
00488f01                              *(uint32_t*)((char*)esp_3 + 4) = ((char*)esp_3 + 0x30);
00488f06                              *(uint32_t*)esp_3 = ((char*)esp_3 + 0x20);
00488f07                              *(uint32_t*)((char*)esp_3 - 4) = ecx_38;
00488f08                              *(uint32_t*)((char*)esp_3 - 8) = eax_16;
00488f08                              
00488f12                              if (ActionMap::GetDescripValues(ebx_1) == 0)
00488f12                              {
0048925f                                  int32_t* esi_14 = (*(uint32_t*)((char*)esp_3 + 0x30) - 0x14);
00489265                                  *(uint32_t*)((char*)esp_3 + 4) = &esi_14[1];
00489266                                  void* esp_94 = ((char*)esp_3 + 8);
00489266                                  
0048926e                                  if ((InterlockedDecrement() == 0 && esi_14 != 0))
0048926e                                  {
00489270                                      int32_t eax_60 = *(uint32_t*)esi_14;
00489272                                      *(uint32_t*)((char*)esp_94 - 4) = 1;
00489276                                      *(uint32_t*)eax_60();
0048926e                                  }
0048926e                                  
0048927c                                  int32_t* esi_16 = (*(uint32_t*)((char*)esp_94 + 0x18) - 0x14);
00489282                                  *(uint32_t*)((char*)esp_94 - 4) = &esi_16[1];
00489282                                  
0048928b                                  if ((InterlockedDecrement() == 0 && esi_16 != 0))
0048928b                                  {
0048928d                                      int32_t edx_29 = *(uint32_t*)esi_16;
0048928f                                      *(uint32_t*)((char*)esp_94 - 4) = 1;
00489293                                      *(uint32_t*)edx_29();
0048928b                                  }
0048928b                                  
00489299                                  int32_t* esi_18 = (*(uint32_t*)((char*)esp_94 + 0x1c) - 0x14);
0048929f                                  *(uint32_t*)((char*)esp_94 - 4) = &esi_18[1];
0048929f                                  
004892a8                                  if ((InterlockedDecrement() == 0 && esi_18 != 0))
004892a8                                  {
004892aa                                      int32_t edx_30 = *(uint32_t*)esi_18;
004892ac                                      *(uint32_t*)((char*)esp_94 - 4) = 1;
004892b0                                      *(uint32_t*)edx_30();
004892a8                                  }
004892a8                                  
004892b6                                  StringInfo::~StringInfo(((char*)esp_94 + 0x60));
004892bf                                  BaseProperty::~BaseProperty(((char*)esp_94 + 0x10));
004892cb                                  PropertyCollection::~PropertyCollection(((char*)esp_94 + 0xf0));
004892d4                                  esi_2 = (*(uint32_t*)((char*)esp_94 + 0x24) - 0x14);
004892da                                  *(uint32_t*)((char*)esp_94 - 4) = &esi_2[1];
004892db                                  esp_1 = esp_94;
004892db                                  
004892df                                  if (InterlockedDecrement() != 0)
004892df                                      goto label_4892ed;
004892df                                  
004892e1                                  cond:3_1 = esi_2 == 0;
004892e1                                  goto label_4892e3;
00488f12                              }
00488f12                              
00488f1c                              int32_t eax_21 = **(uint32_t**)((char*)esp_3 + 0x40);
00488f1e                              *(uint32_t*)((char*)esp_3 + 4) = 0;
00488f24                              *(uint32_t*)esp_3 = ((char*)esp_3 + 0x50);
00488f29                              *(uint32_t*)((char*)esp_3 - 4) = ((char*)esp_3 + 0x58);
00488f2e                              *(uint32_t*)((char*)esp_3 - 8) = ((char*)esp_3 + 0x44);
00488f34                              PStringBase<char>::to_wpstring(*(uint32_t*)(eax_21 + 0x7c)());
00488f43                              int32_t* edi_5 = (*(uint32_t*)((char*)esp_3 + 0x3c) - 0x14);
00488f49                              *(uint32_t*)((char*)esp_3 - 4) = &edi_5[1];
00488f49                              
00488f52                              if ((InterlockedDecrement() == 0 && edi_5 != 0))
00488f52                              {
00488f54                                  int32_t edx_8 = *(uint32_t*)edi_5;
00488f56                                  *(uint32_t*)((char*)esp_3 - 4) = 1;
00488f5a                                  *(uint32_t*)edx_8();
00488f52                              }
00488f52                              
00488f63                              StringInfo::StringInfo(((char*)esp_3 + 0x168));
00488f6d                              *(uint32_t*)((char*)esp_3 - 4) = 0x10000004;
00488f72                              *(uint32_t*)((char*)esp_3 - 8) = 0;
00488f7f                              *(uint32_t*)((char*)esp_3 - 4) = StringInfo::SetStringIDandTableEnum(((char*)esp_3 + 0x168));
00488f86                              *(uint32_t*)((char*)esp_3 - 4) = *(uint32_t*)((char*)esp_3 + 0x18);
00488f8f                              *(uint32_t*)((char*)esp_3 - 8) = (*(uint32_t*)((char*)esp_3 + 0x18) - 0x10);
00488f90                              InterlockedIncrement();
00488f97                              *(uint32_t*)((char*)esp_3 - 4) = 0;
00488f9f                              int32_t ecx_49 = StringInfo::AddVariable_String(((char*)esp_3 + 0x16c));
00488fa4                              void* edi_6 = *(uint32_t*)((char*)esp_3 + 0x4c);
00488fa8                              *(uint32_t*)esp_3 = ecx_49;
00488fae                              *(uint32_t*)((char*)esp_3 - 4) = ((char*)edi_6 - 0x10);
00488faf                              *(uint32_t*)esp_3 = edi_6;
00488fb1                              InterlockedIncrement();
00488fb9                              *(uint32_t*)esp_3 = 0;
00488fc1                              StringInfo::AddVariable_String(((char*)esp_3 + 0x170));
00488fc6                              *(uint32_t*)((char*)esp_3 + 4) = 0;
00488fcc                              *(uint32_t*)esp_3 = ((char*)esp_3 + 0x38);
00488fd4                              int32_t eax_28 = StringInfo::GetString(((char*)esp_3 + 0x170));
00488fd9                              *(uint32_t*)((char*)esp_3 + 4) = 0;
00488fdf                              *(uint32_t*)esp_3 = ((char*)esp_3 + 0x4c);
00488fe2                              PStringBase<unsigned short>::to_spstring(eax_28);
00488fe2                              void* esp_39 = ((char*)esp_3 + 8);
00488fe7                              void* ebp_3 = *(uint32_t*)((char*)esp_39 + 0x44);
00488feb                              int32_t eax_29 = *(uint32_t*)((char*)ebp_3 - 4);
00488feb                              
00488ff1                              if (eax_29 != 1)
00488ff1                              {
00488ff4                                  *(uint32_t*)((char*)esp_39 - 4) = (eax_29 - 1);
00488ff5                                  *(uint32_t*)((char*)esp_39 - 8) = ebp_3;
00488ffa                                  PStringBase<char>::append_n_chars(((char*)esp_39 + 0x1c));
00488ff1                              }
00488ff1                              
00489005                              *(uint32_t*)((char*)esp_39 - 4) = ((char*)ebp_3 - 0x10);
00489005                              
0048900e                              if ((InterlockedDecrement() == 0 && ebp_3 != 0x14))
0048900e                              {
00489010                                  int32_t eax_32 = *(uint32_t*)((char*)ebp_3 - 0x14);
00489013                                  *(uint32_t*)((char*)esp_39 - 4) = 1;
00489017                                  *(uint32_t*)eax_32();
0048900e                              }
0048900e                              
0048901d                              int32_t* ebp_6 = (*(uint32_t*)((char*)esp_39 + 0x30) - 0x14);
00489023                              *(uint32_t*)((char*)esp_39 - 4) = &ebp_6[1];
00489023                              
0048902c                              if ((InterlockedDecrement() == 0 && ebp_6 != 0))
0048902c                              {
0048902e                                  int32_t edx_12 = *(uint32_t*)ebp_6;
00489031                                  *(uint32_t*)((char*)esp_39 - 4) = 1;
00489035                                  *(uint32_t*)edx_12();
0048902c                              }
0048902c                              
00489037                              void* const eax_34 = &data_794508;
00489045                              char i;
00489045                              
00489045                              do
00489045                              {
00489040                                  i = *(uint8_t*)eax_34;
00489042                                  eax_34 += 1;
00489045                              } while (i != 0);
00489049                              *(uint32_t*)((char*)esp_39 - 4) = ((char*)eax_34 - 0x794509);
0048904a                              *(uint32_t*)((char*)esp_39 - 8) = &data_794508;
00489053                              PStringBase<char>::append_n_chars(((char*)esp_39 + 0x1c));
0048905f                              StringInfo::~StringInfo(((char*)esp_39 + 0x168));
0048906a                              *(uint32_t*)((char*)esp_39 - 4) = ((char*)edi_6 - 0x10);
0048906a                              
00489073                              if ((InterlockedDecrement() == 0 && edi_6 != 0x14))
00489073                              {
00489075                                  int32_t edx_13 = *(uint32_t*)((char*)edi_6 - 0x14);
00489077                                  *(uint32_t*)((char*)esp_39 - 4) = 1;
0048907b                                  *(uint32_t*)edx_13();
00489073                              }
00489073                              
00489081                              int32_t* edi_9 = (*(uint32_t*)((char*)esp_39 + 0x28) - 0x14);
00489087                              *(uint32_t*)((char*)esp_39 - 4) = &edi_9[1];
00489087                              
00489090                              if ((InterlockedDecrement() == 0 && edi_9 != 0))
00489090                              {
00489092                                  int32_t edx_14 = *(uint32_t*)edi_9;
00489094                                  *(uint32_t*)((char*)esp_39 - 4) = 1;
00489098                                  *(uint32_t*)edx_14();
00489090                              }
00489090                              
0048909e                              int32_t* edi_11 = (*(uint32_t*)((char*)esp_39 + 0x18) - 0x14);
004890a4                              *(uint32_t*)((char*)esp_39 - 4) = &edi_11[1];
004890a5                              esp_3 = esp_39;
004890a5                              
004890ad                              if ((InterlockedDecrement() == 0 && edi_11 != 0))
004890ad                              {
004890af                                  int32_t edx_15 = *(uint32_t*)edi_11;
004890b1                                  *(uint32_t*)((char*)esp_3 - 4) = 1;
004890b5                                  *(uint32_t*)edx_15();
004890ad                              }
004890ad                              
004890c9                              int32_t eax_43 = (*(uint32_t*)((char*)esp_3 + 0x20) + 1);
004890ca                              int32_t edi_13 = (*(uint32_t*)((char*)esp_3 + 0x2c) + 0x14);
004890cd                              bool cond:8_1 = eax_43 < *(uint32_t*)(*(uint32_t*)((char*)esp_3 + 0x1fc) + 8);
004890cf                              *(uint32_t*)((char*)esp_3 + 0x20) = eax_43;
004890d3                              *(uint32_t*)((char*)esp_3 + 0x2c) = edi_13;
004890d3                              
004890d7                              if (!(cond:8_1))
004890d7                              {
004890dd                                  this_1 = *(uint32_t*)((char*)esp_3 + 0x34);
004890dd                                  break;
004890d7                              }
004890d7                              
00488e9d                              ebx_1 = *(uint32_t*)((char*)esp_3 + 0x40);
00488ea1                              edi_1 = *(uint32_t*)((char*)esp_3 + 0x1fc);
00488eb0                          }
00488e91                      }
00488e91                      
004890e6                      *(uint32_t*)((char*)esp_3 - 4) = 0x10000004;
004890eb                      *(uint32_t*)((char*)esp_3 - 8) = 0;
004890f5                      *(uint32_t*)((char*)esp_3 - 4) = StringInfo::SetStringIDandTableEnum(((char*)esp_3 + 0x60));
004890fc                      *(uint32_t*)((char*)esp_3 - 4) = *(uint32_t*)((char*)esp_3 + 0x24);
00489105                      *(uint32_t*)((char*)esp_3 - 8) = (*(uint32_t*)((char*)esp_3 + 0x24) - 0x10);
00489106                      InterlockedIncrement();
0048910d                      *(uint32_t*)((char*)esp_3 - 4) = 0;
00489117                      *(uint32_t*)esp_3 = StringInfo::AddVariable_String(((char*)esp_3 + 0x64));
0048911e                      *(uint32_t*)esp_3 = *(uint32_t*)((char*)esp_3 + 0x20);
00489127                      *(uint32_t*)((char*)esp_3 - 4) = (*(uint32_t*)((char*)esp_3 + 0x20) - 0x10);
00489128                      InterlockedIncrement();
0048912f                      *(uint32_t*)esp_3 = 0;
00489134                      StringInfo::AddVariable_String(((char*)esp_3 + 0x68));
0048913d                      int32_t* esi_5 = (*(uint32_t*)((char*)esp_3 + 0x24) - 0x14);
00489143                      *(uint32_t*)((char*)esp_3 + 4) = &esi_5[1];
00489144                      esp_2 = ((char*)esp_3 + 8);
00489144                      
00489150                      if ((InterlockedDecrement() == 0 && esi_5 != 0))
00489150                      {
00489152                          int32_t edx_21 = *(uint32_t*)esi_5;
00489154                          *(uint32_t*)((char*)esp_2 - 4) = 1;
00489158                          *(uint32_t*)edx_21();
00489150                      }
00488d78                  }
00488d78                  else
00488d78                  {
00488d7e                      struct _STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >* m_data = edi_1->m_data;
00488d80                      uint32_t first = m_data->first;
00488d82                      uint32_t second = m_data->second.second;
00488d85                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00488d90                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_1;
00488d98                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00488d9a                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00488d9f                      PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_2;
00488da6                      var_1f8 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8];
00488da7                      InterlockedIncrement(var_1f8);
00488dad                      var_1f4 = &var_1d4;
00488db2                      var_1f8 = &PStringBase<unsigned short>::s_NullBuffer_6;
00488dbe                      void var_1cc;
00488dbe                      void var_190;
00488dbe                      
00488dbe                      if (ActionMap::GetDescripValues(ebx_1, second, first, var_1f8, var_1f4) == 0)
00488dbe                      {
00488dc4                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1d4);
00488dcd                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_6);
00488dd6                          StringInfo::~StringInfo(&var_190);
00488ddf                          BaseProperty::~BaseProperty(&PStringBase<unsigned short>::s_NullBuffer_5);
00488deb                          void var_100;
00488deb                          PropertyCollection::~PropertyCollection(&var_100);
00488df4                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1cc);
00488df9                          int32_t eax_13;
00488df9                          eax_13 = 0;
00488e05                          return 0;
00488dbe                      }
00488dbe                      
00488e0e                      var_1f4 = 0x10000004;
00488e13                      var_1f8 = nullptr;
00488e1d                      var_1f4 = StringInfo::SetStringIDandTableEnum(&var_190, var_1f8, var_1f4);
00488e24                      var_1f8 = &var_1cc;
00488e25                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1f4, var_1f8);
00488e30                      var_1f8 = nullptr;
00488e3a                      var_1f4 = StringInfo::AddVariable_String(&var_190, var_1f8, var_1f4);
00488e41                      var_1f8 = &PStringBase<unsigned short>::s_NullBuffer_6;
00488e42                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1f4, var_1f8);
00488e4c                      var_1f8 = nullptr;
00488e51                      StringInfo::AddVariable_String(&var_190, var_1f8, var_1f4);
00488e51                      esp_2 = &var_1f0;
00488e5a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1d4);
00488e63                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_6);
00488e68                      class UIOption_ActionKeyMap* this_3;
00488e68                      this_1 = this_3;
00488d78                  }
00488d78                  
0048915a                  *(uint32_t*)((char*)esp_2 - 4) = 0xc5;
00489163                  BaseProperty::SetPropertyName(&esp_2[4]);
00489163                  void* esp_75 = esp_2;
00489163                  
0048916e                  if (*(uint32_t*)((char*)esp_75 + 0x14) != 0)
0048916e                  {
00489174                      BaseProperty::CheckCopyOnWrite(((char*)esp_75 + 0x10));
0048917d                      int32_t eax_48 = **(uint32_t**)((char*)esp_75 + 0x14);
00489183                      *(uint32_t*)((char*)esp_75 - 4) = ((char*)esp_75 + 0x60);
00489184                      *(uint32_t*)(eax_48 + 0xc4)();
0048916e                  }
0048916e                  
00489193                  *(uint32_t*)((char*)esp_75 + 0x30) = BaseProperty::GetPropertyName(((char*)esp_75 + 0x10));
0048919b                  *(uint32_t*)((char*)esp_75 - 4) = ((char*)esp_75 + 0x10);
004891a0                  *(uint32_t*)((char*)esp_75 - 8) = ((char*)esp_75 + 0x30);
004891a8                  HashTable<unsigned long,BaseProperty,1>::add(((char*)esp_75 + 0xf4));
004891b4                  *(uint32_t*)((char*)esp_75 - 4) = ((char*)esp_75 + 0xf0);
004891b5                  uint32_t eax_51 = DialogFactory::MakeDialogInCurrentUI();
004891c3                  this_1->m_ctxtOverwriteBindingDialog = eax_51;
004891c9                  ebx_1 = eax_51 != 0;
004891cc                  StringInfo::~StringInfo(((char*)esp_75 + 0x60));
004891d1                  int32_t* eax_52 = *(uint32_t*)((char*)esp_75 + 0x10);
004891d1                  
004891d9                  if (eax_52 != 0)
004891d9                  {
004891e3                      int32_t esi_7 = (eax_52[1] - 1);
004891e0                      eax_52[1] = esi_7;
004891e0                      
004891ea                      if (esi_7 == 0)
004891ea                      {
004891ec                          int32_t eax_54 = *(uint32_t*)eax_52;
004891ee                          *(uint32_t*)((char*)esp_75 - 4) = 1;
004891f0                          *(uint32_t*)eax_54();
004891ea                      }
004891ea                      
004891f2                      *(uint32_t*)((char*)esp_75 + 0x10) = 0;
004891d9                  }
004891d9                  
004891f6                  int32_t* eax_55 = *(uint32_t*)((char*)esp_75 + 0x14);
004891f6                  
004891fc                  if (eax_55 != 0)
004891fc                  {
00489206                      int32_t esi_9 = (eax_55[1] - 1);
00489203                      eax_55[1] = esi_9;
00489203                      
0048920d                      if (esi_9 == 0)
0048920d                      {
0048920f                          int32_t edx_26 = *(uint32_t*)eax_55;
00489211                          *(uint32_t*)((char*)esp_75 - 4) = 1;
00489213                          *(uint32_t*)edx_26();
0048920d                      }
0048920d                      
00489215                      *(uint32_t*)((char*)esp_75 + 0x14) = 0;
004891fc                  }
004891fc                  
00489220                  PropertyCollection::~PropertyCollection(((char*)esp_75 + 0xf0));
00489229                  int32_t* esi_11 = (*(uint32_t*)((char*)esp_75 + 0x24) - 0x14);
0048922f                  *(uint32_t*)((char*)esp_75 - 4) = &esi_11[1];
0048922f                  
0048923c                  if ((InterlockedDecrement() == 0 && esi_11 != 0))
0048923c                  {
0048923e                      int32_t edx_27 = *(uint32_t*)esi_11;
00489240                      *(uint32_t*)((char*)esp_75 - 4) = 1;
00489244                      *(uint32_t*)edx_27();
0048923c                  }
0048923c                  
00489246                  int32_t eax_58;
00489246                  eax_58 = ebx_1;
00489248                  *(uint32_t*)esp_75;
00489249                  *(uint32_t*)((char*)esp_75 + 4);
0048924a                  *(uint32_t*)((char*)esp_75 + 8);
0048924b                  *(uint32_t*)((char*)esp_75 + 0xc);
00489252                  return eax_58;
00488c44              }
00488c44              
00488c4a              esi_2 = ((char*)var_1d4 - 0x14);
00488c51              esp_1 = &var_1f8;
00488c51              
00488c59              if (InterlockedDecrement(&esi_2[1]) == 0)
00488c59              {
00488c5f                  cond:3_1 = esi_2 == 0;
004892e3              label_4892e3:
004892e3                  
004892e3                  if (!(cond:3_1))
004892e3                  {
004892e5                      int32_t edx_31 = *(uint32_t*)esi_2;
004892e7                      *(uint32_t*)((char*)esp_1 - 4) = 1;
004892eb                      *(uint32_t*)edx_31();
004892e3                  }
00488c59              }
00488c1c          }
00488c0a      }
00488c0a      
004892ed  label_4892ed:
004892ed      *(uint32_t*)esp_1;
004892ed      esp_1[1];
004892ed      esp_1[2];
004892f0      uint32_t eax;
004892f0      eax = 0;
004892ed      esp_1[3];
004892f9      return 0;
00488bf0  }

00488eaa                                8d 9b 00 00 00 00                                                            ......
004892fc                                                                                      90 90 90 90                              ....

00489300  uint8_t __fastcall UIOption_ActionKeyMap::OpenCantOverwriteBindingDialog(class UIOption_ActionKeyMap* this)

00489300  {
0048930d      int32_t esi;
0048930d      int32_t var_12c = esi;
00489316      int32_t edi;
00489316      int32_t var_130 = edi;
00489316      
0048931b      if (this->m_ctxtCantOverwriteBindingDialog == 0)
0048931b      {
0048931d          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0048931d          
00489325          if (ICIDM::s_cidm_1 != 0)
00489325          {
0048933e              class PStringBase<char> var_114;
0048933e              *(int32_t*)((char*)ICIDM::s_cidm_1->vtable + 0x7c)(&var_114, &this->m_qcBindingBeingChanged);
00489345              void var_110;
00489345              PropertyCollection::PropertyCollection(&var_110);
00489353              int32_t* var_120 = nullptr;
00489357              int32_t* var_11c = nullptr;
0048935b              BaseProperty::SetPropertyName(&var_120, 0x8e);
0048935b              
00489364              if (var_11c != 0)
00489364              {
0048936a                  BaseProperty::CheckCopyOnWrite(&var_120);
00489377                  *(uint32_t*)(*(uint32_t*)var_11c + 0xac)(3);
00489364              }
00489364              
00489394              uint32_t var_118 = BaseProperty::GetPropertyName(&var_120);
00489398              void var_10c;
00489398              HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_118, &var_120);
004893a6              BaseProperty::SetPropertyName(&var_120, 0xc3);
004893a6              
004893af              if (var_11c != 0)
004893af              {
004893b5                  BaseProperty::CheckCopyOnWrite(&var_120);
004893c5                  *(uint32_t*)(*(uint32_t*)var_11c + 0xac)(0x10000001);
004893af              }
004893af              
004893e2              var_118 = BaseProperty::GetPropertyName(&var_120);
004893e6              HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_118, &var_120);
004893f4              BaseProperty::SetPropertyName(&var_120, 0xac);
004893f4              
004893fd              if (var_11c != 0)
004893fd              {
00489403                  BaseProperty::CheckCopyOnWrite(&var_120);
00489410                  *(uint32_t*)(*(uint32_t*)var_11c + 0x74)(1);
004893fd              }
004893fd              
0048942a              var_118 = BaseProperty::GetPropertyName(&var_120);
0048942e              HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_118, &var_120);
0048943a              void var_98;
0048943a              StringInfo::StringInfo(&var_98);
00489456              int32_t var_134_4 = StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000004);
00489457              class PStringBase<char> ecx_19 = var_114;
00489467              InterlockedIncrement((var_114 - 0x10));
0048947a              StringInfo::AddVariable_String(&var_98, 0, ecx_19);
00489488              BaseProperty::SetPropertyName(&var_120, 0xc5);
00489488              
00489491              if (var_11c != 0)
00489491              {
00489497                  BaseProperty::CheckCopyOnWrite(&var_120);
004894aa                  *(uint32_t*)(*(uint32_t*)var_11c + 0xc4)(&var_98);
00489491              }
00489491              
004894c7              var_118 = BaseProperty::GetPropertyName(&var_120);
004894cb              HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_118, &var_120);
004894d5              uint32_t eax_9 = DialogFactory::MakeDialogInCurrentUI(&var_110);
004894e6              this->m_ctxtCantOverwriteBindingDialog = eax_9;
004894ec              int32_t ebx;
004894ec              ebx = eax_9 != 0;
004894ef              StringInfo::~StringInfo(&var_98);
004894f4              int32_t* eax_10 = var_120;
004894f4              
004894fa              if (eax_10 != 0)
004894fa              {
00489504                  int32_t esi_4 = (eax_10[1] - 1);
00489501                  eax_10[1] = esi_4;
00489501                  
0048950b                  if (esi_4 == 0)
00489511                      **(uint32_t**)eax_10(1);
00489511                  
00489513                  var_120 = nullptr;
004894fa              }
004894fa              
0048951d              if (var_11c != 0)
0048951d              {
00489527                  int32_t esi_6 = (var_11c[1] - 1);
00489524                  var_11c[1] = esi_6;
00489524                  
0048952e                  if (esi_6 == 0)
00489534                      **(uint32_t**)var_11c(1);
00489534                  
00489536                  int32_t var_11c_1 = 0;
0048951d              }
0048951d              
0048953e              PropertyCollection::~PropertyCollection(&var_110);
00489547              int32_t* esi_8 = (var_114 - 0x14);
00489547              
0048955a              if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
00489562                  **(uint32_t**)esi_8(1);
00489562              
00489566              int32_t eax_15;
00489566              eax_15 = ebx;
0048956c              return eax_15;
00489325          }
0048931b      }
0048931b      
00489327      uint32_t eax;
00489327      eax = 0;
0048932f      return 0;
00489300  }

0048956d                                         90 90 90                                                               ...

00489570  uint8_t __thiscall UIOption_ActionKeyMap::KeyHitHandler(class UIOption_ActionKeyMap* this, class QualifiedControl const* arg2, uint32_t* arg3)

00489570  {
00489583      uint32_t eax;
00489583      
00489583      if ((arg2->m_activation & 0x81) == 0)
00489583      {
00489589          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00489589          
00489591          if (ICIDM::s_cidm_1 != 0)
00489591          {
00489597              class UIOption_ActionKeyMap* this_1 = this;
004895a3              eax = ICIDM::s_cidm_1->vtable->GetDeviceTypeFromKey(arg2->m_key.__inner0);
004895a6              uint32_t ebx_1 = ((uint32_t)*(uint16_t*)((char*)arg2->m_key.__inner0 + 2));
004895a6              
004895af              if (eax != 2)
004895af              {
004895df              label_4895df:
004895df                  int32_t eax_2 = -(((char*)this - 0x628));
004895d6                  ICIDM::s_cidm_1->vtable->UnregisterInputHandler(((eax_2 - eax_2) & this), 0x20);
004895fb                  UIOption_ActionKeyMap::CloseMapWarnDialog(((char*)this - 0x628));
004895fb                  
00489607                  if ((eax != 1 || ebx_1 != eax))
00489607                  {
0048960f                      class UIOption_ActionKeyMap* this_2 = this;
00489613                      union { uint32_t m_dwKey; union __bitfield0; }* ebx_2 = &this_2->m_mouseDownTable.m_intrusiveTable;
00489619                      *(uint32_t*)ebx_2 = arg2->m_key.__inner0;
0048961e                      ebx_2[1] = arg2->m_metamode;
00489624                      ebx_2[2] = arg2->m_activation;
00489627                      this_2->m_mouseDownTable.m_intrusiveTable.m_aInplaceBuckets[1] = 3;
00489631                      class DLListData* head_ = this_2->m_children.m_ihlIntrusive.m_list.head_;
00489637                      int32_t edi_2 = 0;
00489637                      
0048963b                      if (head_ != 0)
0048963b                      {
00489643                          while (true)
00489643                          {
0048964a                              if (QualifiedControl::IsExactlyEqual(head_, ebx_2) != 0)
0048964a                                  goto label_4899b8;
0048964a                              
00489652                              if (head_ != 0)
00489652                              {
00489654                                  head_ = *(int32_t*)((char*)head_ + 0xc);
00489654                                  
00489659                                  if (head_ != 0)
00489659                                      continue;
00489652                              }
00489652                              
0048965b                              this_2 = this;
0048965b                              break;
00489643                          }
0048963b                      }
0048963b                      
0048965f                      struct HashList<UIRegion *,UIRegion *,1>::HashListData* eax_5 = this_2->m_children.m_ihlIntrusive.m_hash.m_aInplaceBuckets[0x11];
0048966a                      void* var_48 = nullptr;
0048966e                      int32_t var_44_1 = 0;
00489672                      int32_t var_40_1 = 0;
00489676                      int32_t var_24 = 0x7a2be4;
0048967e                      int32_t* i_2 = nullptr;
00489682                      int32_t var_1c_1 = 0;
00489686                      int32_t var_18_1 = 0;
0048968a                      ICIDM::s_cidm_1->vtable->FindConflictingInputMaps(eax_5, &var_24);
0048969c                      int32_t* i_1 = i_2;
0048969c                      
004896a0                      if (i_2 != 0)
004896a0                      {
004897d1                          int32_t* i;
004897d1                          
004897d1                          do
004897d1                          {
004896aa                              int32_t eax_7 = *(uint32_t*)i_1;
004896ac                              struct ICIDM::VTable* vtable = ICIDM::s_cidm_1->vtable;
004896bc                              void* var_3c = nullptr;
004896c0                              int32_t var_38_1 = 0;
004896c4                              int32_t var_34_1 = 0;
004896c4                              
004896d0                              if (vtable->FindConflictingControls(ebx_2, eax_7, &var_3c) != 0)
004896d0                              {
004896d6                                  ICIDM::s_cidm_1->vtable->GetActionMap();
004896e2                                  int32_t var_50_1 = 0;
004896e2                                  
004896e6                                  if (var_34_1 > 0)
004896e6                                  {
004896ec                                      int32_t* esi_1 = nullptr;
004896ee                                      edi_2 = 0;
0048979f                                      bool cond:4_1;
0048979f                                      
0048979f                                      do
0048979f                                      {
004896f0                                          void* eax_9 = var_3c;
004896f8                                          int32_t var_14 = eax_7;
004896fc                                          int32_t edx_6 = *(uint32_t*)((char*)esi_1 + eax_9);
00489703                                          int32_t ecx_15 = *(uint32_t*)(((char*)esi_1 + eax_9) + 4);
0048970b                                          int32_t edx_7 = *(uint32_t*)(((char*)esi_1 + eax_9) + 8);
00489717                                          int32_t eax_10 = *(uint32_t*)(((char*)esi_1 + eax_9) + 0xc);
00489717                                          
0048972c                                          if (SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>::WhatNum(&var_48, &var_14) == 0xffffffff)
0048972c                                          {
00489732                                              int32_t eax_12 = var_40_1;
00489736                                              int32_t ecx_18 = (var_44_1 & 0x7fffffff);
00489736                                              
0048973e                                              if (eax_12 < ecx_18)
0048973e                                                  goto label_489768;
0048973e                                              
00489757                                              if (SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>::grow(&var_48, SmartArray<unsigned long,1>::get_new_size(&var_48, (ecx_18 + 1))) != 0)
00489757                                              {
00489759                                                  eax_12 = var_40_1;
00489768                                              label_489768:
00489768                                                  int32_t* eax_16 = ((char*)var_48 + (eax_12 * 0x14));
0048976b                                                  *(uint32_t*)eax_16 = var_14;
00489771                                                  eax_16[1] = edx_6;
00489778                                                  eax_16[2] = ecx_15;
0048977f                                                  eax_16[3] = edx_7;
00489786                                                  eax_16[4] = eax_10;
00489789                                                  var_40_1 += 1;
00489757                                              }
0048972c                                          }
0048972c                                          
00489796                                          esi_1 = &esi_1[4];
00489799                                          cond:4_1 = (var_50_1 + 1) < var_34_1;
0048979b                                          var_50_1 += 1;
0048979f                                      } while (cond:4_1);
004896e6                                  }
004896d0                              }
004896d0                              
004897b5                              if ((var_38_1 & 0x80000000) == 0x80000000)
004897bc                                  operator delete[](var_3c);
004897bc                              
004897c8                              i = i_1[1];
004897cd                              i_1 = i;
004897d1                          } while (i != 0);
004896a0                      }
004896a0                      
004897d7                      int32_t eax_21 = var_40_1;
004897dd                      class UIOption_ActionKeyMap* this_3;
004897dd                      
004897dd                      if (eax_21 == 0)
004897dd                      {
00489946                          this_3 = this;
0048995d                      label_48995d:
0048995d                          int32_t var_70_2 = ebx_2[1];
00489963                          int32_t var_6c_5 = ebx_2[2];
0048996a                          UIOption_ActionKeyMap::SetBinding(((char*)this - 0x628), *(uint32_t*)ebx_2, this_3->m_mouseDownTable.m_intrusiveTable.m_aInplaceBuckets[2]);
0048996f                          *(uint32_t*)ebx_2 = 0xffffffff;
00489975                          ebx_2[1] = 0;
00489978                          ebx_2[2] = 0;
0048997f                          this_3->m_mouseDownTable.m_intrusiveTable.m_aInplaceBuckets[2] = 0xffffffff;
00489989                          var_24 = 0x7a2be4;
00489991                          List<StringTableMetaLanguage::Node const *>::flush(&var_24);
00489991                          
004899a6                          if ((var_44_1 & 0x80000000) == 0x80000000)
004899ad                              operator delete[](var_48);
004897dd                      }
004897dd                      else
004897dd                      {
004897e3                          uint32_t esi_2 = 0;
004897e3                          
004897e7                          if (eax_21 > 0)
004897e7                          {
00489817                              do
00489817                              {
004897ff                                  if (*(uint32_t*)((edi_2 + var_48) + 0x10) != 1)
004897ff                                  {
0048980d                                      esi_2 += 1;
0048980e                                      edi_2 += 0x14;
004897ff                                  }
004897ff                                  else
00489806                                      SmartArray<_STL::pair<unsigned long,_STL::pair<QualifiedControl,unsigned long> >,1>::RemoveUnOrderedByIndex(&var_48, esi_2);
00489806                                  
00489811                                  eax_21 = var_40_1;
00489817                              } while (esi_2 < eax_21);
004897e7                          }
004897e7                          
0048981b                          this_3 = this;
0048981b                          
0048982d                          if ((this_3->m_mouseDownTable.m_intrusiveTable.m_aInplaceBuckets[6] != 0 || eax_21 <= 0))
00489825                              goto label_48995d;
00489825                          
00489838                          class ActionMap* eax_23;
00489838                          int32_t ecx_30;
00489838                          uint32_t edx_14;
00489838                          eax_23 = ICIDM::s_cidm_1->vtable->GetActionMap();
0048983f                          int32_t eax_24;
0048983f                          
0048983f                          if (eax_23 == 0)
0048983f                          {
00489845                              var_24 = 0x7a2be4;
0048984d                              List<StringTableMetaLanguage::Node const *>::flush(&var_24);
0048984d                              
00489862                              if ((var_44_1 & 0x80000000) != 0x80000000)
00489862                              {
0048993a                                  eax_24 = 0;
00489943                                  return 0;
00489862                              }
00489862                              
0048986d                              operator delete[](var_48);
00489875                              int32_t eax_25;
00489875                              eax_25 = 0;
0048987e                              return 0;
0048983f                          }
0048983f                          
00489885                          int32_t ebx_3 = 0;
00489885                          
00489889                          if (var_40_1 > 0)
00489889                          {
0048988b                              int32_t* esi_3 = nullptr;
0048988b                              
00489890                              while (true)
00489890                              {
00489890                                  void* eax_27 = var_48;
0048989e                                  int32_t var_68_11 = *(uint32_t*)((char*)esi_3 + eax_27);
004898a2                                  uint8_t eax_30;
004898a2                                  eax_30 = ActionMap::IsUserBindable(eax_23, edx_14, *(uint32_t*)(((char*)esi_3 + eax_27) + 0x10));
004898a2                                  
004898a9                                  if (eax_30 == 0)
004898a9                                  {
00489907                                      UIOption_ActionKeyMap::OpenCantOverwriteBindingDialog(((char*)this - 0x628));
00489910                                      var_24 = 0x7a2be4;
00489918                                      List<StringTableMetaLanguage::Node const *>::flush(&var_24);
00489918                                      
0048992b                                      if ((var_44_1 & 0x80000000) == 0x80000000)
00489932                                          operator delete[](var_48);
00489932                                      
0048992b                                      break;
004898a9                                  }
004898a9                                  
004898af                                  ebx_3 += 1;
004898b0                                  esi_3 = &esi_3[5];
004898b0                                  
004898b5                                  if (ebx_3 >= var_40_1)
004898b5                                      goto label_4898c0;
00489890                              }
00489890                              
0048993a                              eax_24 = 0;
00489943                              return 0;
00489889                          }
00489889                          
004898c0                      label_4898c0:
004898c0                          UIOption_ActionKeyMap::OpenOverwriteBindingDialog(((char*)this - 0x628), &var_48);
004898c9                          var_24 = 0x7a2be4;
004898d1                          List<StringTableMetaLanguage::Node const *>::flush(&var_24);
004898d1                          
004898e4                          if ((var_44_1 & 0x80000000) == 0x80000000)
004898e4                          {
004898ef                              operator delete[](var_48);
004898f7                              int32_t eax_33;
004898f7                              eax_33 = 1;
00489900                              return 1;
004898e4                          }
004897dd                      }
00489607                  }
004895af              }
004895af              else if ((ebx_1 != 0 && (ebx_1 != 4 && (ebx_1 != 0xc || arg2->m_metamode != 0))))
004895c5                  goto label_4895df;
00489591          }
00489583      }
00489583      
004899b8  label_4899b8:
004899b8      eax = 1;
004899be      return 1;
00489570  }

004899c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004899d0  uint8_t __thiscall UIOption_ActionKeyMap::InitiateBinding(class UIOption_ActionKeyMap* this, int32_t arg2)

004899d0  {
004899de      void var_90;
004899de      StringInfo::StringInfo(&var_90);
004899e3      int32_t __return = 0x10000004;
004899ff      __return = StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_ActionKeyMap_MapInstructions"), __return);
00489a04      UIElement_Text::GetText(&this->vtable, &__return);
00489a13      StringInfo::AddVariable_String(&var_90, 0, __return);
00489a23      this->m_nBindingBeingChanged = arg2;
00489a29      __return = &var_90;
00489a31      int32_t ebx;
00489a31      ebx = UIOption_ActionKeyMap::OpenMapWarnDialog(this, __return);
00489a31      
00489a35      if (ebx != 0)
00489a35      {
00489a37          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00489a37          
00489a3f          if (ICIDM::s_cidm_1 == 0)
00489a3f          {
00489a69              StringInfo::~StringInfo(&var_90);
00489a6f              int32_t eax_3;
00489a6f              eax_3 = 0;
00489a78              return 0;
00489a3f          }
00489a3f          
00489a41          struct ICIDM::VTable* vtable = ICIDM::s_cidm_1->vtable;
00489a43          __return = 0x20;
00489a4c          vtable->RegisterInputHandler(&this->vtable, __return);
00489a35      }
00489a35      
00489a53      StringInfo::~StringInfo(&var_90);
00489a62      return ebx;
004899d0  }

00489a7b                                                                                   90 90 90 90 90                             .....

00489a80  enum UIElementMessageListenResult __thiscall UIOption_ActionKeyMap::ListenToElementMessage(class UIOption_ActionKeyMap* this, struct UIElementMessageInfo const* arg2)

00489a80  {
00489a81      struct UIElementMessageInfo* ebx = arg2;
00489a85      uint32_t idMessage = ebx->idMessage;
00489a85      
00489a8f      if (idMessage == 1)
00489a8f      {
00489aa4          if (DialogFactory::IsDialogOpen(0x10000001) == 0)
00489aa4          {
00489aaa              class UIElement* pElement = ebx->pElement;
00489aaa              
00489ab3              if (pElement == this->m_lastCursor.m_x0)
00489ab3              {
00489ab8                  UIOption_ActionKeyMap::ClearAllBindings(((char*)this - 0x20));
00489ac8                  return UIElement_Text::ListenToElementMessage(this, ebx);
00489ab3              }
00489ab3              
00489acb              int32_t m_y1 = this->m_lastCursor.m_y1;
00489ad1              int32_t eax_2 = 0;
00489ad1              
00489ad5              if (m_y1 > 0)
00489ad5              {
00489adb                  int32_t* m_y0 = this->m_lastCursor.m_y0;
00489adb                  
00489aeb                  do
00489aeb                  {
00489ae3                      if (pElement == *(uint32_t*)m_y0)
00489ae3                      {
00489aff                          UIOption_ActionKeyMap::InitiateBinding(((char*)this - 0x20), eax_2);
00489b0f                          return UIElement_Text::ListenToElementMessage(this, ebx);
00489ae3                      }
00489ae3                      
00489ae5                      eax_2 += 1;
00489ae6                      m_y0 = &m_y0[1];
00489aeb                  } while (eax_2 < m_y1);
00489ad5              }
00489aa4          }
00489a8f      }
00489a8f      else if ((idMessage == 0x19 && (DialogFactory::IsDialogOpen(0x10000001) == 0 && ebx->dwParam1 == 8)))
00489b15      {
00489b2e          int32_t m_y1_1 = this->m_lastCursor.m_y1;
00489b34          int32_t eax_6 = 0;
00489b34          
00489b38          if (m_y1_1 > 0)
00489b38          {
00489b3d              int32_t m_y0_1 = this->m_lastCursor.m_y0;
00489b3d              
00489b43              while (true)
00489b43              {
00489b43                  void* ecx_5 = *(uint32_t*)m_y0_1;
00489b43                  
00489b58                  if ((ebx->pElement == ecx_5 && (*(uint32_t*)((char*)ecx_5 + 0x400) != 0xd && eax_6 < this->m_qclDefaults._num_elements)))
00489b58                      break;
00489b58                  
00489b5a                  eax_6 += 1;
00489b5b                  m_y0_1 += 4;
00489b5b                  
00489b60                  if (eax_6 >= m_y1_1)
00489b71                      return UIElement_Text::ListenToElementMessage(this, arg2);
00489b43              }
00489b43              
00489b78              UIOption_ActionKeyMap::EraseBinding(((char*)this - 0x20), eax_6);
00489b7d              ebx = arg2;
00489b38          }
00489b15      }
00489b15      
00489b8c      return UIElement_Text::ListenToElementMessage(this, ebx);
00489a80  }

00489b8f                                               90                                                                 .

00489b90  int32_t __fastcall PStringBase<unsigned short>::to_int32(class PStringBase<unsigned short> const* this)

00489b90  {
00489b91      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
00489b9e      *(uint32_t*)_errno() = 0;
00489bae      return wcstol(m_charbuffer, 0, 0);
00489b90  }

00489baf                                               90                                                                 .

00489bb0  void __fastcall SpellComponentBase::SpellComponentBase(class SpellComponentBase* this)

00489bb0  {
00489bb3      this->vtable = 0x7a33cc;
00489bb9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00489bcb      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00489bce      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00489bd0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00489bdc      this->_text.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00489bdf      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00489be3      SpellComponentBase::Init(this);
00489bb0  }

00489bed                                         90 90 90                                                               ...

00489bf0  void __fastcall SpellComponentBase::~SpellComponentBase(class SpellComponentBase* this)

00489bf0  {
00489bfb      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_text.m_buffer;
00489bfb      
00489c0a      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00489c0c          m_buffer->vtable->__vecDelDtor(1);
00489c0c      
00489c14      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_name.m_buffer;
00489c14      
00489c23      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00489c25          m_buffer_1->vtable->__vecDelDtor(1);
00489c25      
00489c2d      this->vtable = 0x79285c;
00489bf0  }

00489c37                                                                       90 90 90 90 90 90 90 90 90                         .........

00489c40  void __fastcall gmSpellComponentUI::RecvNotice_SelectionChanged(class gmSpellComponentUI* this)

00489c40  {
00489c44      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
00489c4c      uint32_t i = 0;
00489c4c      
00489c53      if (ACCWeenieObject::selectedID_1 == 0)
00489c53      {
00489d19      label_489d19:
00489d19          this->m_ptTilingOffset.x = 0;
00489d20          UIElement_ListBox::SetSelectedItem(this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable, nullptr, 1);
00489d25          this->m_hashElementsRegisteredWith.vtable = 0;
00489d25          return;
00489c53      }
00489c53      
00489c60      class ComponentTracker* eax_2 = CPlayerSystem::GetComponentTracker(CPlayerSystem::GetPlayerSystem());
00489c60      
00489c67      if (eax_2 != 0)
00489c67      {
00489c78          uint32_t id = INVALID_DID.id;
00489c84          bool cond:1_1 = ComponentTracker::ObjectIsOwnedComponent(eax_2, ACCWeenieObject::selectedID_1, &id) == 0;
00489c86          struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
00489c86          
00489c89          if (cond:1_1)
00489c89          {
00489d11              if (vtable != 0)
00489d11                  goto label_489d19;
00489c89          }
00489c89          else if ((ACCWeenieObject::selectedID_1 != vtable && *(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x610) > 0))
00489ca0          {
00489ce8              do
00489ce8              {
00489caa                  class UIElement* eax_5 = UIElement_ListBox::GetItem(this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable, i);
00489cbb                  int32_t var_4;
00489cbb                  
00489cbb                  if ((eax_5->m_desc.m_elementID == 0x10000467 && (UIElement::GetAttribute_DataID(eax_5, 0x1000004c, &var_4) != 0 && id == var_4)))
00489cbb                  {
00489cf8                      this->m_ptTilingOffset.x = 0;
00489cff                      UIElement_ListBox::SetSelectedItem(this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable, eax_5, 1);
00489d05                      this->m_hashElementsRegisteredWith.vtable = ACCWeenieObject::selectedID_1;
00489d0e                      return;
00489cbb                  }
00489cbb                  
00489ce5                  i += 1;
00489ce8              } while (i < *(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x610));
00489ca0          }
00489c67      }
00489c40  }


00489d30  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *> *,0>* this, uint32_t arg2)

00489d30  {
00489d33      class HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *>** m_buckets = this->m_buckets;
00489d3b      this->vtable = 0x7a33e0;
00489d3b      
00489d41      if (m_buckets != &this->m_aInplaceBuckets)
00489d44          operator delete[](m_buckets);
00489d44      
00489d4e      this->m_buckets = nullptr;
00489d51      this->m_firstInterestingBucket = nullptr;
00489d54      this->m_numBuckets = 0;
00489d57      this->m_numElements = 0;
00489d57      
00489d5f      if ((arg2 & 1) != 0)
00489d62          operator delete(this);
00489d62      
00489d6d      return this;
00489d30  }


00489d70  class AC1Legacy::PStringBase<char>* __thiscall AC1Legacy::PStringBase<char>::operator=(class AC1Legacy::PStringBase<char>* this, class AC1Legacy::PStringBase<char> const* arg2)

00489d70  {
00489d7b      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
00489d7b      
00489d7f      if (m_buffer_1 != arg2->m_buffer)
00489d7f      {
00489d91          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00489d93              m_buffer_1->vtable->__vecDelDtor(1);
00489d93          
00489d9b          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
00489d9d          this->m_buffer = m_buffer;
00489da3          InterlockedIncrement(&m_buffer->m_cRef);
00489d7f      }
00489d7f      
00489dae      return this;
00489d70  }

00489db1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00489dc0  void* __thiscall SpellComponentBase::`scalar deleting destructor'(class SpellComponentBase* this, uint32_t arg2)

00489dc0  {
00489dcb      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_text.m_buffer;
00489dcb      
00489dda      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00489ddc          m_buffer->vtable->__vecDelDtor(1);
00489ddc      
00489de4      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_name.m_buffer;
00489de4      
00489df3      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00489df5          m_buffer_1->vtable->__vecDelDtor(1);
00489df5      
00489e02      this->vtable = 0x79285c;
00489e02      
00489e08      if ((arg2 & 1) != 0)
00489e0b          operator delete(this);
00489e0b      
00489e18      return this;
00489dc0  }

00489e1b                                                                                   90 90 90 90 90                             .....

00489e20  class SpellComponentBase& __thiscall SpellComponentBase::operator=(class SpellComponentBase* this, class SpellComponentBase const& arg2)

00489e20  {
00489e33      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->_name.m_buffer;
00489e33      
00489e38      if (m_buffer_2 != arg2->_name.m_buffer)
00489e38      {
00489e4a          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
00489e4c              m_buffer_2->vtable->__vecDelDtor(1);
00489e4c          
00489e54          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
00489e57          this->_name.m_buffer = m_buffer;
00489e5e          InterlockedIncrement(&m_buffer->m_cRef);
00489e38      }
00489e38      
00489e63      this->_category = arg2->_category;
00489e69      this->_iconID.id = arg2->_iconID.id;
00489e6f      this->_type = arg2->_type;
00489e75      this->_gesture = arg2->_gesture;
00489e7b      this->_time = arg2->_time;
00489e7e      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->_text.m_buffer;
00489e7e      
00489e84      if (m_buffer_3 != arg2->_text.m_buffer)
00489e84      {
00489e96          if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
00489e98              m_buffer_3->vtable->__vecDelDtor(1);
00489e98          
00489ea0          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->_text.m_buffer;
00489ea3          this->_text.m_buffer = m_buffer_1;
00489eaa          InterlockedIncrement(&m_buffer_1->m_cRef);
00489e84      }
00489e84      
00489eb0      this->_CDM = arg2->_CDM;
00489eb8      return this;
00489e20  }

00489ebb                                                                                   90 90 90 90 90                             .....

00489ec0  int32_t __thiscall SpellComponentTable::InqSpellComponentBase(class SpellComponentTable* this, uint32_t const arg2, class SpellComponentBase* arg3)

00489ec0  {
00489ec1      uint32_t _table_size = this->_spellComponentBaseHash._table_size;
00489ec1      
00489ec7      if (_table_size != 0)
00489ec7      {
00489ec9          class PackableHashData<unsigned long,SpellComponentBase>** _buckets = this->_spellComponentBaseHash._buckets;
00489ec9          
00489ece          if (_buckets != 0)
00489ece          {
00489eda              int32_t* edx_3 = _buckets[(COMBINE(0, arg2) % _table_size)];
00489eda              
00489edf              if (edx_3 != 0)
00489edf              {
00489ee3                  while (arg2 != *(uint32_t*)edx_3)
00489ee3                  {
00489ee5                      edx_3 = edx_3[0xa];
00489ee5                      
00489eea                      if (edx_3 == 0)
00489ef0                          return 0;
00489ee3                  }
00489ee3                  
00489ef8                  if (edx_3 != 0xfffffffc)
00489ef8                  {
00489f06                      SpellComponentBase::operator=(arg3, &edx_3[1]);
00489f12                      return 1;
00489ef8                  }
00489edf              }
00489ece          }
00489ec7      }
00489ec7      
00489efe      return 0;
00489ec0  }

00489f15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00489f20  void __stdcall gmSpellComponentUI::MakeIcon(class gmSpellComponentUI* this @ ecx, class IDClass<_tagDataID,32,0> arg2, class UIElement* arg3)

00489f20  {
00489f2a      if (arg3 != 0)
00489f2a      {
00489f38          class SpellComponentTable* eax_2 = ClientMagicSystem::GetSpellComponentTable(ClientMagicSystem::GetMagicSystem());
00489f38          
00489f41          if (eax_2 != 0)
00489f41          {
00489f4c              class IDClass<_tagDataID,32,0> var_34_1 = arg2;
00489f4d              uint32_t eax_4 = SpellComponentTable::WCIDtoSCID(arg2);
00489f5b              void var_24;
00489f5b              SpellComponentBase::SpellComponentBase(&var_24);
00489f7c              int32_t __saved_edi_4;
00489f7c              
00489f7c              if ((SpellComponentTable::InqSpellComponentBase(eax_2, eax_4, &var_24) != 0 && __saved_edi_4 != INVALID_DID.id))
00489f7c              {
00489f80                  class IDClass<_tagDataID,32,0> edx_1 = UIRegion::ClearImage(arg3);
00489f85                  class ClientMagicSystem* eax_6 = ClientMagicSystem::GetMagicSystem();
00489f85                  
00489f8c                  if (eax_6 != 0)
00489f8c                  {
00489f8e                      int32_t __saved_edi_1 = __saved_edi_4;
00489f91                      class Graphic* eax_7 = ClientMagicSystem::GetSpellComponentIcon(eax_6, edx_1);
00489f91                      
00489f9a                      if (eax_7 != 0)
00489f9a                      {
00489fa0                          UIRegion::SetBlitMode(arg3, Blit_3Alpha);
00489fa7                          class Graphic* eax_8 = operator new(0xc);
00489fb1                          class Graphic* eax_9;
00489fb1                          
00489fb1                          if (eax_8 == 0)
00489fbd                              eax_9 = nullptr;
00489fb1                          else
00489fb6                              eax_9 = Graphic::Graphic(eax_8, eax_7);
00489fb6                          
00489fc2                          UIRegion::SetImage(arg3, eax_9);
00489f9a                      }
00489f8c                  }
00489f7c              }
00489f7c              
00489fcb              SpellComponentBase::~SpellComponentBase(&var_24);
00489f41          }
00489f2a      }
00489f20  }

00489fd8                                                                          90 90 90 90 90 90 90 90                          ........

00489fe0  void __fastcall gmSpellComponentUI::UpdateBuyRates(class gmSpellComponentUI* this, class IDClass<_tagDataID,32,0> arg2)

00489fe0  {
00489fe0      class gmSpellComponentUI* this_1 = this;
00489fe2      class gmSpellComponentUI* this_2 = this;
00489fe9      this = CPlayerSystem::GetPlayerSystem()->player_desc_received;
00489fe9      
00489fff      if ((this != 0 && this_2->m_pComponentListBox != 0))
00489fff      {
0048a008          class CPlayerSystem* eax_2 = CPlayerSystem::GetPlayerSystem();
0048a00d          class IDClass<_tagDataID,32,0> ebp_1 = arg2;
0048a011          class IDClass<_tagDataID,32,0> var_18_1 = ebp_1;
0048a015          class IDClass<_tagDataID,32,0> edx;
0048a015          PlayerModule::GetDesiredCompLevel(&eax_2->playerModule.vtable, edx);
0048a01a          class UIElement_ListBox* m_pComponentListBox = this_2->m_pComponentListBox;
0048a026          uint32_t edi_1 = 0;
0048a026          
0048a02a          if (m_pComponentListBox->m_listItems.m_num > 0)
0048a02a          {
0048a031              class UIElement* eax_4;
0048a031              class IDClass<_tagDataID,32,0> edx_1;
0048a031              
0048a031              while (true)
0048a031              {
0048a031                  eax_4 = UIElement_ListBox::GetItem(m_pComponentListBox, edi_1);
0048a031                  
0048a046                  if ((eax_4 != 0 && eax_4->m_desc.m_elementID == 0x10000467))
0048a046                  {
0048a054                      uint8_t eax_5;
0048a054                      eax_5 = UIElement::GetAttribute_DataID(eax_4, 0x1000004c, &arg2);
0048a054                      
0048a05b                      if (eax_5 != 0)
0048a05b                      {
0048a063                          if (ebp_1 == INVALID_DID.id)
0048a063                              break;
0048a063                          
0048a069                          if (arg2 == ebp_1)
0048a069                              break;
0048a05b                      }
0048a046                  }
0048a046                  
0048a06b                  m_pComponentListBox = this_2->m_pComponentListBox;
0048a077                  edi_1 += 1;
0048a077                  
0048a07a                  if (edi_1 >= m_pComponentListBox->m_listItems.m_num)
0048a081                      return;
0048a031              }
0048a031              
0048a084              class CPlayerSystem* eax_7 = CPlayerSystem::GetPlayerSystem();
0048a08d              class IDClass<_tagDataID,32,0> var_18_4 = arg2;
0048a091              int32_t eax_8 = PlayerModule::GetDesiredCompLevel(&eax_7->playerModule.vtable, edx_1);
0048a091              
0048a09f              if ((eax_8 >= 0 && eax_8 <= 0x1388))
0048a09f              {
0048a0a1                  int32_t var_18_5 = eax_8;
0048a0ae                  PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, Formatted, &data_7a0184);
0048a0bd                  class UIElement_Text* eax_9 = UIElement::<class UIElement_Text>::GetChildRecursiveTemplate(eax_4, 0x1000046b);
0048a0bd                  
0048a0c4                  if (eax_9 != 0)
0048a0cd                      UIElement_Text::SetText(eax_9, &this_1);
0048a0cd                  
0048a0d6                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&this_1);
0048a0e0                  return;
0048a09f              }
0048a09f              
0048a0ea              CM_Character::Event_SetDesiredComponentLevel(arg2, 0);
0048a101              PlayerModule::SetDesiredCompLevel(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, arg2, 0);
0048a106              class CPlayerSystem* eax_11 = CPlayerSystem::GetPlayerSystem();
0048a10b              class IDClass<_tagDataID,32,0> edx_3 = arg2;
0048a10f              class IDClass<_tagDataID,32,0> var_18_7 = edx_3;
0048a118              int32_t var_18_8 = PlayerModule::GetDesiredCompLevel(&eax_11->playerModule.vtable, edx_3);
0048a125              PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, Formatted, &data_7a0184);
0048a134              class UIElement* eax_13 = UIElement::GetChildRecursive(eax_4, 0x1000046b);
0048a134              
0048a13b              if (eax_13 != 0)
0048a13b              {
0048a143                  class UIElement_Text* eax_14 = eax_13->vtable->DynamicCast(0xc);
0048a143                  
0048a14b                  if (eax_14 != 0)
0048a154                      UIElement_Text::SetText(eax_14, &this_1);
0048a13b              }
0048a13b              
0048a15d              void* __offset(gmSpellComponentUI, -0x14) esi_3 = ((char*)this_1 - 0x14);
0048a15d              
0048a170              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0048a178                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0048a02a          }
00489fff      }
00489fe0  }

0048a182        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0048a190  void __fastcall gmSpellComponentUI::PostInit(class gmSpellComponentUI* this)

0048a190  {
0048a190      class gmSpellComponentUI* this_1 = this;
0048a196      UIElement::PostInit(this);
0048a196      
0048a1b3      if ((this->m_aCategoryTitles.m_sizeAndDeallocate & 0x7fffffff) >= 7)
0048a1b3      {
0048a1c7          int32_t i = 7;
0048a1c7          
0048a1ce          if (this->m_aCategoryTitles.m_num > 7)
0048a1ce          {
0048a1df              do
0048a1df              {
0048a1a5                  this->m_aCategoryTitles.m_data[i] = 0;
0048a1dc                  i += 1;
0048a1df              } while (i < this->m_aCategoryTitles.m_num);
0048a1ce          }
0048a1ce          
0048a1a5          this->m_aCategoryTitles.m_num = 7;
0048a1b3      }
0048a1b3      else if (SmartArray<unsigned long,1>::grow(&this->m_aCategoryTitles, 7) != 0)
0048a1a5          this->m_aCategoryTitles.m_num = 7;
0048a1a5      
0048a1f8      *(uint32_t*)this->m_aCategoryTitles.m_data = 0;
0048a1fe      this->m_aCategoryTitles.m_data[1] = 0;
0048a211      this->m_aCategoryTitles.m_data[2] = 0;
0048a224      this->m_aCategoryTitles.m_data[3] = 0;
0048a237      this->m_aCategoryTitles.m_data[4] = 0;
0048a24a      this->m_aCategoryTitles.m_data[5] = 0;
0048a263      this->m_aCategoryTitles.m_data[6] = 0;
0048a275      class UIElement* eax_10;
0048a275      class IDClass<_tagDataID,32,0> edx_7;
0048a275      eax_10 = UIElement::GetChildRecursive(this, 0x10000464);
0048a27c      class UIElement_ListBox* eax_11;
0048a27c      
0048a27c      if (eax_10 == 0)
0048a28c          eax_11 = nullptr;
0048a27c      else
0048a284          eax_11 = eax_10->vtable->DynamicCast(5);
0048a284      
0048a292      this->m_pComponentListBox = eax_11;
0048a298      class GlobalEventHandler* eax_12 = GlobalEventHandler::GetGlobalEventHandler();
0048a2a1      class gmSpellComponentUI* ecx_9;
0048a2a1      
0048a2a1      if (eax_12 != 0)
0048a2a1      {
0048a2a9          struct gmNoticeHandler::VTable** eax_14;
0048a2a9          
0048a2a9          if (this == 0)
0048a2b2              eax_14 = nullptr;
0048a2a9          else
0048a2ab              eax_14 = &this->vtable;
0048a2ab          
0048a2b4          eax_12->vtable->RegisterNoticeHandler(0x4dd255, eax_14);
0048a2c7          struct gmNoticeHandler::VTable** eax_16;
0048a2c7          
0048a2c7          if (this == 0)
0048a2d0              eax_16 = nullptr;
0048a2c7          else
0048a2c9              eax_16 = &this->vtable;
0048a2c9          
0048a2d2          eax_12->vtable->RegisterNoticeHandler(0x4dd1f0, eax_16);
0048a2e5          struct gmNoticeHandler::VTable** eax_18;
0048a2e5          
0048a2e5          if (this == 0)
0048a2ee              eax_18 = nullptr;
0048a2e5          else
0048a2e7              eax_18 = &this->vtable;
0048a2e7          
0048a2fa          edx_7 = eax_12->vtable->RegisterNoticeHandler(0x4dd1ef, eax_18);
0048a2a1      }
0048a2a1      
0048a302      ecx_9 = CPlayerSystem::GetPlayerSystem()->player_desc_received;
0048a302      
0048a30b      if (ecx_9 != 0)
0048a30b      {
0048a316          uint32_t __saved_esi_1 = INVALID_DID.id;
0048a317          gmSpellComponentUI::UpdateBuyRates(this, edx_7);
0048a30b      }
0048a190  }

0048a31e                                                                                            90 90                                ..

0048a320  void __fastcall gmSpellComponentUI::RecvNotice_PlayerDescReceived(class gmSpellComponentUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

0048a320  {
0048a325      uint32_t id = INVALID_DID.id;
0048a32c      class IDClass<_tagDataID,32,0> edx;
0048a32c      gmSpellComponentUI::UpdateBuyRates(((char*)this - 0x5f8), edx);
0048a320  }

0048a334                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0048a340  uint8_t __thiscall HashTable<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &),0>::find(class HashTable<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &),0> const* this, uint32_t const* arg2, class UIElement* (** arg3)(class LayoutDesc const*, class ElementDesc const*))

0048a340  {
0048a345      uint32_t const esi = *(uint32_t*)arg2;
0048a358      int32_t* i;
0048a358      
0048a358      for (i = this->m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0048a358      {
0048a362          if (*(uint32_t*)i == esi)
0048a362          {
0048a373              if (i == 0)
0048a373                  break;
0048a373              
0048a37c              *(uint32_t*)arg3 = i[2];
0048a37e              class UIElement* (** eax_2)(class LayoutDesc const*, class ElementDesc const*);
0048a37e              eax_2 = 1;
0048a381              return 1;
0048a362          }
0048a358      }
0048a358      
0048a36b      i = 0;
0048a36e      return 0;
0048a340  }

0048a384              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0048a390  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *> *,0>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *> *,0>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *> *,0>* this, uint32_t arg2)

0048a390  {
0048a39b      arg2 = arg2;
0048a39f      uint8_t edx = ((int8_t)arg2);
0048a3a3      this->m_buckets = nullptr;
0048a3a6      this->m_firstInterestingBucket = nullptr;
0048a3a9      this->m_numBuckets = 0;
0048a3ac      this->m_numElements = 0;
0048a3b0      this->vtable = 0x7a33e0;
0048a3b6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0048a3c9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0048a3c9      
0048a3d3      if (eax == bucketSizesEnd_1)
0048a3d5          eax -= 4;
0048a3d5      
0048a3d8      uint32_t eax_1 = *(uint32_t*)eax;
0048a3dd      this->m_numBuckets = eax_1;
0048a3dd      
0048a3e0      if (eax_1 > 0x17)
0048a3f6          this->m_buckets = operator new[]((eax_1 << 2));
0048a3e0      else
0048a3e5          this->m_buckets = &this->m_aInplaceBuckets;
0048a3e5      
0048a3fc      class HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *>** m_buckets = this->m_buckets;
0048a3ff      uint32_t ecx_3 = (this->m_numBuckets << 2);
0048a405      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0048a416      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0048a390  }

0048a41f                                                                                               90                                 .

0048a420  enum UIElementMessageListenResult __thiscall gmSpellComponentUI::ListenToElementMessage(class gmSpellComponentUI* this, struct UIElementMessageInfo const* arg2)

0048a420  {
0048a425      struct UIElementMessageInfo* ebp = arg2;
0048a429      uint32_t idMessage = ebp->idMessage;
0048a433      class gmSpellComponentUI* this_1 = this;
0048a433      
0048a437      if (idMessage == 4)
0048a437      {
0048a587          if (ebp->dwParam1 != 0)
0048a587          {
0048a589              uint32_t eax_13;
0048a589              eax_13 = this->m_bBroadcastSelection;
0048a589              
0048a591              if (eax_13 != 0)
0048a591              {
0048a599                  class UIElement* m_pSelectedItem = this->m_pComponentListBox->m_pSelectedItem;
0048a599                  
0048a5a1                  if (m_pSelectedItem != 0)
0048a5a1                  {
0048a5a3                      uint32_t m_elementID = m_pSelectedItem->m_desc.m_elementID;
0048a5a3                      
0048a5ae                      if (m_elementID == 0x10000466)
0048a5ae                      {
0048a5b0                          int32_t var_20_11 = 0;
0048a5f7                          ACCWeenieObject::SetSelectedObject(0, 0);
0048a5ae                      }
0048a5ae                      else if (((m_elementID == 0x10000467 && UIElement::GetAttribute_DataID(m_pSelectedItem, 0x1000004c, &arg2) != 0) && HashTable<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &),0>::find(&this->m_hashComponentRegions, &arg2, &this_1) != 0))
0048a5bb                      {
0048a5e9                          class gmSpellComponentUI* this_2 = this_1;
0048a5e9                          
0048a5ef                          if (this_2 != 0)
0048a5ef                          {
0048a5f4                              int32_t var_20_14 = 0;
0048a5f7                              ACCWeenieObject::SetSelectedObject(this_2->m_hashElementsRegisteredWith.vtable, 0);
0048a5ef                          }
0048a5bb                      }
0048a5a1                  }
0048a591              }
0048a591              
0048a5ff              this->m_bBroadcastSelection = 1;
0048a587          }
0048a437      }
0048a437      else if ((idMessage == 0x2f && (ebp->dwParam1 == 0 && ebp->idElement == 0x1000046b)))
0048a458      {
0048a463          class UIElement* eax_2 = ebp->pElement->vtable->GetParent();
0048a463          
0048a47d          if (((eax_2 != 0 && eax_2->m_desc.m_elementID == 0x10000467) && UIElement::GetAttribute_DataID(eax_2, 0x1000004c, &arg2) != 0))
0048a47d          {
0048a4a3              class UIElement_Text* eax_4 = ebp->pElement->vtable->DynamicCast(0xc);
0048a4a3              
0048a4ad              if (eax_4 != 0)
0048a4ad              {
0048a4c1                  void __return;
0048a4c1                  int32_t eax_6 = PStringBase<unsigned short>::to_int32(UIElement_Text::GetText(eax_4, &__return));
0048a4cc                  class IDClass<_tagDataID,32,0> edx_2 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0048a4cc                  
0048a4db                  if ((eax_6 >= 0 && eax_6 <= 0x1388))
0048a4db                  {
0048a4e3                      CM_Character::Event_SetDesiredComponentLevel(arg2, eax_6);
0048a4f9                      PlayerModule::SetDesiredCompLevel(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, arg2, eax_6);
0048a511                      return UIElement::ListenToElementMessage(this_1, ebp);
0048a4db                  }
0048a4db                  
0048a514                  class CPlayerSystem* eax_9 = CPlayerSystem::GetPlayerSystem();
0048a51d                  struct UIElementMessageInfo* var_20_6 = arg2;
0048a526                  int32_t var_20_7 = PlayerModule::GetDesiredCompLevel(&eax_9->playerModule.vtable, edx_2);
0048a533                  void var_c;
0048a533                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, Formatted, &data_7a0184);
0048a542                  UIElement_Text::SetText(eax_4, &var_c);
0048a54e                  class UIElement_Text* eax_11 = UIElement::<class UIElement_Text>::GetChildRecursiveTemplate(eax_2, 0x1000046b);
0048a54e                  
0048a555                  if (eax_11 != 0)
0048a55e                      UIElement_Text::SetText(eax_11, &var_c);
0048a55e                  
0048a567                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0048a57f                  return UIElement::ListenToElementMessage(this_1, ebp);
0048a4ad              }
0048a47d          }
0048a458      }
0048a458      
0048a615      return UIElement::ListenToElementMessage(this, ebp);
0048a420  }

0048a618                                                                          90 90 90 90 90 90 90 90                          ........

0048a620  void __fastcall gmSpellComponentUI::SyncComponentRegionWithData(class gmSpellComponentUI* this, class UIElement const* arg2, class ComponentData* arg3)

0048a620  {
0048a620      class gmSpellComponentUI* this_1 = this;
0048a622      class UIElement* ebx = arg2;
0048a622      
0048a62b      if (ebx != 0)
0048a62b      {
0048a642          arg2 = INVALID_DID.id;
0048a646          UIElement::GetAttribute_DataID(ebx, 0x1000004c, &arg2);
0048a646          
0048a662          if (HashTable<unsigned long,UIElement * (__cdecl*)(LayoutDesc const &,ElementDesc const &),0>::find(&this->m_hashComponentRegions, &arg2, &this_1) != 0)
0048a662          {
0048a668              class gmSpellComponentUI* this_2 = this_1;
0048a66d              class ComponentData* edi_1 = arg3;
0048a673              uint32_t eax_3 = ComponentData::GetFirstObjectID(edi_1);
0048a673              
0048a67b              if (this_2->m_hashElementsRegisteredWith.vtable != eax_3)
0048a684                  this_2->m_hashElementsRegisteredWith.vtable = ComponentData::GetFirstObjectID(edi_1);
0048a684              
0048a687              uint32_t numItems_1 = edi_1->numItems;
0048a687              
0048a690              if (this_2->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] != numItems_1)
0048a692                  this_2->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] = numItems_1;
0048a692              
0048a69c              class UIElement* eax_5 = UIElement::GetChildRecursive(ebx, 0x1000046a);
0048a69c              
0048a6a3              if (eax_5 != 0)
0048a6a3              {
0048a6ab                  class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
0048a6ab                  
0048a6b5                  if (eax_6 != 0)
0048a6b5                  {
0048a6bd                      uint32_t numItems = edi_1->numItems;
0048a6d5                      UIElement_Text::SetText(eax_6, PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, Formatted, &data_7a0184));
0048a6de                      void* __offset(ComponentData, -0x14) esi_3 = ((char*)arg3 - 0x14);
0048a6de                      
0048a6f1                      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0048a6f9                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0048a6b5                  }
0048a6a3              }
0048a662          }
0048a62b      }
0048a620  }

0048a702        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0048a710  void* __thiscall HashTable<IDClass<_tagDataID,32,0>,SpellComponentRegion *,0>::`scalar deleting destructor'(class HashTable<IDClass<_tagDataID,32,0>,SpellComponentRegion *,0>* this, uint32_t arg2)

0048a710  {
0048a719      this->vtable = 0x7a33e4;
0048a71f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0048a724      class HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *>** m_buckets = this->m_intrusiveTable.m_buckets;
0048a714      this->m_intrusiveTable.vtable = 0x7a33e0;
0048a714      
0048a732      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0048a735          operator delete[](m_buckets);
0048a735      
0048a714      this->m_intrusiveTable.m_buckets = nullptr;
0048a714      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0048a714      this->m_intrusiveTable.m_numBuckets = 0;
0048a714      this->m_intrusiveTable.m_numElements = 0;
0048a714      
0048a750      if ((arg2 & 1) != 0)
0048a753          operator delete(this);
0048a753      
0048a75f      return this;
0048a710  }

0048a762        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0048a770  void __thiscall gmSpellComponentUI::gmSpellComponentUI(class gmSpellComponentUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0048a770  {
0048a77f      UIElement_Field::UIElement_Field(this, arg2, arg3);
0048a784      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048a790      this->vtable = 0x7a3690;
0048a796      this->vtable = &gmSpellComponentUI::`vftable';
0048a7a0      __builtin_memset(&this->selObjectID, 0, 0x14);
0048a7c6      this->m_hashComponentRegions.vtable = 0x7a33e4;
0048a7d0      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *> *,0>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *> *,0>(&this->m_hashComponentRegions.m_intrusiveTable, 0x17);
0048a7d5      this->m_bBroadcastSelection = 1;
0048a770  }

0048a7e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0048a7f0  class UIElement* __thiscall gmSpellComponentUI::DynamicCast(class gmSpellComponentUI* this, uint32_t arg2) __pure

0048a7f0  {
0048a7fc      if (arg2 == 0x1000002f)
0048a809          return this;
0048a809      
0048a803      int32_t edx_1;
0048a803      edx_1 = arg2 != 3;
0048a807      return (this & (edx_1 - 1));
0048a7f0  }

0048a80c                                      90 90 90 90                                                              ....

0048a810  uint32_t gmSpellComponentUI::GetUIElementType(class gmSpellComponentUI const* this @ ecx) __pure

0048a810  {
0048a815      return 0x1000002f;
0048a810  }

0048a816                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0048a820  void __fastcall gmSpellComponentUI::~gmSpellComponentUI(class gmSpellComponentUI* this)

0048a820  {
0048a825      class UIElement_ListBox* m_pComponentListBox = this->m_pComponentListBox;
0048a835      this->vtable = 0x7a3690;
0048a82f      this->vtable = &gmSpellComponentUI::`vftable';
0048a82f      
0048a841      if (m_pComponentListBox != 0)
0048a843          UIElement_ListBox::Flush(m_pComponentListBox);
0048a843      
0048a848      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0048a848      
0048a84f      if (eax != 0)
0048a851          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0048a851      
0048a862      this->m_hashComponentRegions.vtable = 0x7a33e4;
0048a86c      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashComponentRegions.m_intrusiveTable);
0048a871      class HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *>** m_buckets = this->m_hashComponentRegions.m_intrusiveTable.m_buckets;
0048a85a      this->m_hashComponentRegions.m_intrusiveTable.vtable = 0x7a33e0;
0048a85a      
0048a87f      if (m_buckets != &this->m_hashComponentRegions.m_intrusiveTable.m_aInplaceBuckets)
0048a882          operator delete[](m_buckets);
0048a882      
0048a85a      this->m_hashComponentRegions.m_intrusiveTable.m_buckets = nullptr;
0048a85a      this->m_hashComponentRegions.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0048a85a      this->m_hashComponentRegions.m_intrusiveTable.m_numBuckets = 0;
0048a85a      this->m_hashComponentRegions.m_intrusiveTable.m_numElements = 0;
0048a85a      
0048a8a9      if ((this->m_aCategoryTitles.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0048a8b2          operator delete[](this->m_aCategoryTitles.m_data);
0048a8b2      
0048a82f      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048a8c2      NoticeHandler::~NoticeHandler(&this->vtable);
0048a8cc      /* tailcall */
0048a8cc      return UIElement_Field::~UIElement_Field(this);
0048a820  }

0048a8d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0048a8e0  class UIElement* gmSpellComponentUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0048a8e0  {
0048a8e5      void* eax = operator new(0x688);
0048a8e5      
0048a8ef      if (eax == 0)
0048a905          return 0;
0048a905      
0048a902      return gmSpellComponentUI::gmSpellComponentUI(eax, arg1, arg2);
0048a8e0  }

0048a906                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0048a910  void __thiscall gmSpellComponentUI::UpdateComponents(class gmSpellComponentUI* this, enum ComponentTrackerUpdate arg2)

0048a910  {
0048a917      class gmSpellComponentUI* this_1 = this;
0048a920      class ComponentTracker* eax_1 = CPlayerSystem::GetComponentTracker(CPlayerSystem::GetPlayerSystem());
0048a920      
0048a927      if (eax_1 != 0)
0048a927      {
0048a930          uint32_t ebx_1 = 0;
0048a932          int32_t edi_1 = 0;
0048a934          class DLList<ComponentData>* (* eax_2)[0x7] = &eax_1->componentLists;
0048a937          uint32_t var_b4_1 = 0;
0048a93b          int32_t var_ac_1 = 0;
0048a93f          class DLList<ComponentData>* (* var_a0_1)[0x7] = eax_2;
0048a93f          
0048a958          while (true)
0048a958          {
0048a958              class DLListData* ebp_1 = ADJ(eax_2)->componentLists[0]->head_;
0048a95b              class UIElement* eax_4 = UIElement_ListBox::GetItem(this_1->m_pComponentListBox, ebx_1);
0048a95b              
0048a962              if (ebp_1 == 0)
0048a962              {
0048aa4a                  int32_t var_a4 = 8;
0048aa4a                  
0048aa52                  if ((eax_4 != 0 && UIElement::GetAttribute_Int(eax_4, 0x1000004d, &var_a4) == 0))
0048aa69                      var_a4 = 8;
0048aa69                  
0048aa75                  if (var_a4 == edi_1)
0048aa7e                      UIElement_ListBox::DeleteItem(this_1->m_pComponentListBox, ebx_1);
0048a962              }
0048a962              else
0048a962              {
0048a96a                  int32_t var_a8 = 8;
0048a96a                  
0048a972                  if ((eax_4 != 0 && UIElement::GetAttribute_Int(eax_4, 0x1000004d, &var_a8) == 0))
0048a989                      var_a8 = 8;
0048a989                  
0048a995                  if (var_a8 != edi_1)
0048a995                  {
0048a9aa                      class UIElement* eax_6 = UIElement_ListBox::AddItemFromTemplateList(this_1->m_pComponentListBox, 0, ebx_1);
0048a9aa                      
0048a9b1                      if (eax_6 != 0)
0048a9b1                      {
0048a9bd                          class UIElement_Text* eax_7 = eax_6->vtable->DynamicCast(0xc);
0048a9d1                          var_a8 = var_ac_1;
0048a9d5                          UIElement::SetAttribute_Int(eax_7, 0x1000004d, var_ac_1);
0048a9de                          void var_90;
0048a9de                          StringInfo::StringInfo(&var_90);
0048a9fa                          StringInfo::SetStringIDandTableEnum(&var_90, this_1->m_aCategoryTitles.m_data[var_ac_1], 0x10000001);
0048aa12                          void* __return;
0048aa12                          UIElement_Text::SetText(eax_7, StringInfo::GetString(&var_90, &__return, 0));
0048aa1b                          int32_t* edi_4 = ((char*)__return - 0x14);
0048aa1b                          
0048aa2e                          if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
0048aa36                              **(uint32_t**)edi_4(1);
0048aa36                          
0048aa38                          ebx_1 += 1;
0048aa3d                          var_b4_1 = ebx_1;
0048aa41                          StringInfo::~StringInfo(&var_90);
0048a9b1                      }
0048a995                  }
0048a995                  else
0048a995                  {
0048a997                      ebx_1 += 1;
0048a998                      var_b4_1 = ebx_1;
0048a995                  }
0048a962              }
0048a962              
0048aa8b              if (arg2 != CT_CHANGE_ADD)
0048aa8b              {
0048ac9d                  class UIElement* edi_8 = UIElement_ListBox::GetItem(this_1->m_pComponentListBox, ebx_1);
0048ac9d                  
0048aca1                  if (edi_8 != 0)
0048aca1                  {
0048acba                      while (edi_8->m_desc.m_elementID == 0x10000467)
0048acba                      {
0048acd1                          class IDClass<_tagDataID,32,0> id = INVALID_DID.id;
0048acd5                          class UIElement* edx_14 = UIElement::GetAttribute_DataID(edi_8, 0x1000004c, &id);
0048acdc                          class IDClass<_tagDataID,32,0> id_2 = id;
0048acdc                          
0048ace5                          if ((ebp_1 == 0 || id_2 != *(int32_t*)((char*)ebp_1 + 8)))
0048ace5                          {
0048ad02                              uint32_t temp1_2 = (COMBINE(0, id_2) % this_1->m_hashComponentRegions.m_intrusiveTable.m_numBuckets);
0048ad08                              class HashTableData<IDClass<_tagDataID,32,0>,SpellComponentRegion *>** m_buckets = this_1->m_hashComponentRegions.m_intrusiveTable.m_buckets;
0048ad0e                              int32_t* i_1 = m_buckets[temp1_2];
0048ad0e                              
0048ad18                              for (int32_t* i = i_1; i != 0; i = i[1])
0048ad18                              {
0048ad22                                  if (*(uint32_t*)i == id_2)
0048ad22                                  {
0048ad2f                                      if (i != 0)
0048ad2f                                      {
0048ad33                                          if (i_1 == i)
0048ad11                                              m_buckets[temp1_2] = i_1[1];
0048ad33                                          else
0048ad33                                          {
0048ad3c                                              int32_t* i_2;
0048ad3c                                              
0048ad3c                                              do
0048ad3c                                              {
0048ad35                                                  i_2 = i_1;
0048ad37                                                  i_1 = i_1[1];
0048ad3c                                              } while (i_1 != i);
0048ad3c                                              
0048ad40                                              if (i_2 != 0)
0048ad4c                                                  i_2[1] = i_1[1];
0048ad40                                              else
0048ad11                                                  m_buckets[temp1_2] = i_1[1];
0048ad33                                          }
0048ad33                                          
0048ad57                                          this_1->m_hashComponentRegions.m_intrusiveTable.m_numElements -= 1;
0048ad5d                                          operator delete(i);
0048ad2f                                      }
0048ad2f                                      
0048ad2f                                      break;
0048ad22                                  }
0048ad18                              }
0048ad18                              
0048ad70                              UIElement_ListBox::DeleteItem(this_1->m_pComponentListBox, var_b4_1);
0048ace5                          }
0048ace5                          else
0048ace5                          {
0048ace7                              class DLListData* var_c8_23 = ebp_1;
0048aceb                              gmSpellComponentUI::SyncComponentRegionWithData(this_1, edx_14, edi_8);
0048acf4                              ebp_1 = ebp_1->dllist_next;
0048acf8                              var_b4_1 += 1;
0048ace5                          }
0048ace5                          
0048ad85                          edi_8 = UIElement_ListBox::GetItem(this_1->m_pComponentListBox, var_b4_1);
0048ad85                          
0048ad89                          if (edi_8 == 0)
0048ad89                              break;
0048acba                      }
0048aca1                  }
0048aa8b              }
0048aa8b              else if (ebp_1 != 0)
0048aa93              {
0048aaa7                  while (true)
0048aaa7                  {
0048aaa7                      class UIElement* eax_13 = UIElement_ListBox::GetItem(this_1->m_pComponentListBox, ebx_1);
0048aab0                      class IDClass<_tagDataID,32,0> var_b0;
0048aab0                      class UIElement* edx_4;
0048aab0                      
0048aab0                      if (eax_13 != 0)
0048aabe                          edx_4 = UIElement::GetAttribute_DataID(eax_13, 0x1000004c, &var_b0);
0048aabe                      
0048aad6                      if (((eax_13 == 0 || eax_13->m_desc.m_elementID == 0x10000466) || var_b0 != *(int32_t*)((char*)ebp_1 + 8)))
0048aad6                      {
0048aaf2                          void* edi_6 = operator new(0x10);
0048aaf4                          class IDClass<_tagDataID,32,0>* ebx_3 = nullptr;
0048aaf4                          
0048aafb                          if (edi_6 == 0)
0048ab20                              edi_6 = nullptr;
0048aafb                          else
0048aafb                          {
0048aafd                              *(uint32_t*)((char*)edi_6 + 0xc) = 0;
0048ab05                              *(uint32_t*)edi_6 = *(int32_t*)((char*)ebp_1 + 8);
0048ab0c                              *(uint32_t*)((char*)edi_6 + 4) = ComponentData::GetFirstObjectID(ebp_1);
0048ab15                              *(uint32_t*)((char*)edi_6 + 0xc) = *(int32_t*)((char*)ebp_1 + 0x88);
0048ab1b                              *(uint32_t*)((char*)edi_6 + 8) = *(int32_t*)((char*)ebp_1 + 0x10);
0048aafb                          }
0048aafb                          
0048ab27                          var_b0 = *(int32_t*)((char*)ebp_1 + 8);
0048ab2b                          class IDClass<_tagDataID,32,0>* eax_19 = operator new(0xc);
0048ab2b                          
0048ab35                          if (eax_19 != 0)
0048ab35                          {
0048ab37                              class IDClass<_tagDataID,32,0> ecx_22 = var_b0;
0048ab3b                              *(int32_t*)((char*)eax_19 + 4) = 0;
0048ab3e                              eax_19->id = ecx_22;
0048ab40                              *(int32_t*)((char*)eax_19 + 8) = edi_6;
0048ab43                              ebx_3 = eax_19;
0048ab35                          }
0048ab35                          
0048ab45                          uint32_t id_1 = ebx_3->id;
0048ab57                          class IDClass<_tagDataID,32,0>** ecx_23 = &this_1->m_hashComponentRegions.m_intrusiveTable.m_buckets[(COMBINE(0, id_1) % this_1->m_hashComponentRegions.m_intrusiveTable.m_numBuckets)];
0048ab5a                          class IDClass<_tagDataID,32,0>* eax_22 = *(uint32_t*)ecx_23;
0048ab5a                          
0048ab5e                          if (eax_22 == 0)
0048ab5e                          {
0048ab73                          label_48ab73:
0048ab73                              *(int32_t*)((char*)ebx_3 + 4) = *(uint32_t*)ecx_23;
0048ab76                              *(uint32_t*)ecx_23 = ebx_3;
0048ab76                              
0048ab7e                              if (ecx_23 < this_1->m_hashComponentRegions.m_intrusiveTable.m_firstInterestingBucket)
0048ab80                                  this_1->m_hashComponentRegions.m_intrusiveTable.m_firstInterestingBucket = ecx_23;
0048ab80                              
0048ab86                              this_1->m_hashComponentRegions.m_intrusiveTable.m_numElements += 1;
0048ab5e                          }
0048ab5e                          else
0048ab5e                          {
0048ab62                              while (eax_22->id != id_1)
0048ab62                              {
0048ab64                                  eax_22 = *(int32_t*)((char*)eax_22 + 4);
0048ab64                                  
0048ab69                                  if (eax_22 == 0)
0048ab69                                      goto label_48ab73;
0048ab62                              }
0048ab62                              
0048ab6f                              if (eax_22 == 0)
0048ab6f                                  goto label_48ab73;
0048ab6f                              
0048ab8f                              operator delete(ebx_3);
0048ab5e                          }
0048ab5e                          
0048aba4                          class UIElement* eax_24 = UIElement_ListBox::AddItemFromTemplateList(this_1->m_pComponentListBox, 1, var_b4_1);
0048aba4                          
0048abad                          if (eax_24 != 0)
0048abad                          {
0048abbf                              UIElement::SetAttribute_DataID(eax_24, 0x1000004c, var_b0);
0048abcb                              class UIElement* eax_25 = UIElement::GetChildRecursive(eax_24, 0x10000469);
0048abcb                              
0048abd2                              if ((eax_25 != 0 && eax_25->vtable->DynamicCast(0xc) != 0))
0048abd2                              {
0048abf3                                  void* var_9c;
0048abf3                                  class UIElement_Text* ebx_5;
0048abf3                                  ebx_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, WidthConvert, (*(int32_t*)((char*)ebp_1 + 0xc) + 0x14));
0048abff                                  UIElement_Text::SetText(ebx_5, &var_9c);
0048ac08                                  int32_t* ebx_7 = ((char*)var_9c - 0x14);
0048ac08                                  
0048ac1b                                  if ((InterlockedDecrement(&ebx_7[1]) == 0 && ebx_7 != 0))
0048ac23                                      **(uint32_t**)ebx_7(1);
0048abd2                              }
0048abd2                              
0048ac2c                              class UIElement* eax_31 = UIElement::GetChildRecursive(eax_24, 0x10000468);
0048ac3e                              class DLListData* var_c8_19 = ebp_1;
0048ac42                              gmSpellComponentUI::SyncComponentRegionWithData(this_1, gmSpellComponentUI::MakeIcon(this_1, var_b0, eax_31), eax_24);
0048ac47                              class IDClass<_tagDataID,32,0> edx_12 = var_b0;
0048ac4b                              class IDClass<_tagDataID,32,0> var_c8_20 = edx_12;
0048ac4e                              gmSpellComponentUI::UpdateBuyRates(this_1, edx_12);
0048ac5a                              class UIElement* eax_32 = UIElement::GetChildRecursive(eax_24, 0x1000046b);
0048ac5a                              
0048ac61                              if (eax_32 != 0)
0048ac61                              {
0048ac69                                  void* eax_33 = eax_32->vtable->DynamicCast(0xc);
0048ac69                                  
0048ac71                                  if (eax_33 != 0)
0048ac73                                      *(uint32_t*)((char*)eax_33 + 0x6a0) = NumberInputFilter;
0048ac61                              }
0048ac61                              
0048ac7d                              var_b4_1 += 1;
0048abad                          }
0048aad6                      }
0048aad6                      else
0048aad6                      {
0048aad8                          class DLListData* var_c8_11 = ebp_1;
0048aadc                          gmSpellComponentUI::SyncComponentRegionWithData(this_1, edx_4, eax_13);
0048aae2                          var_b4_1 = (ebx_1 + 1);
0048aad6                      }
0048aad6                      
0048ac81                      ebp_1 = ebp_1->dllist_next;
0048ac81                      
0048ac86                      if (ebp_1 == 0)
0048ac86                          break;
0048ac86                      
0048aa9b                      ebx_1 = var_b4_1;
0048aaa7                  }
0048aa93              }
0048aa93              
0048ad98              eax_2 = &*(uint28_t*)var_a0_1[1];
0048ad9b              bool cond:2_1 = (var_ac_1 + 1) < 7;
0048ad9e              var_ac_1 += 1;
0048ada2              var_a0_1 = eax_2;
0048ada2              
0048ada6              if (!(cond:2_1))
0048ada6                  break;
0048ada6              
0048a945              ebx_1 = var_b4_1;
0048a949              edi_1 = var_ac_1;
0048a958          }
0048a958          
0048adac          this_1->vtable->RecvNotice_SelectionChanged();
0048a927      }
0048a910  }

0048aca9                             8d a4 24 00 00 00 00                                                           ..$....
0048adcb                                   90 90 90 90 90                                                             .....

0048add0  void* __thiscall gmSpellComponentUI::`scalar deleting destructor'(class gmSpellComponentUI* this, uint32_t arg2)

0048add0  {
0048add3      gmSpellComponentUI::~gmSpellComponentUI(this);
0048add3      
0048addd      if ((arg2 & 1) != 0)
0048ade0          operator delete(this);
0048ade0      
0048adeb      return this;
0048add0  }

0048adee                                            90 90                                                                ..

0048adf0  void gmSpellComponentUI::Register()

0048adf0  {
0048adfa      UIElement::RegisterElementClass(0x1000002f, gmSpellComponentUI::Create);
0048adf0  }

0048ae03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0048ae10  void __thiscall gmSpellComponentUI::RecvNotice_UpdateSpellComponents(class gmSpellComponentUI* this, int32_t arg2)

0048ae10  {
0048ae16      /* tailcall */
0048ae16      return gmSpellComponentUI::UpdateComponents(((char*)this - 0x5f8), arg2);
0048ae10  }

0048ae1b                                                                                   90 90 90 90 90                             .....

0048ae20  class UIElement* __thiscall gmSpellbookUI::DynamicCast(class gmSpellbookUI* this, uint32_t arg2) __pure

0048ae20  {
0048ae2c      if (arg2 == 0x1000002e)
0048ae39          return this;
0048ae39      
0048ae33      int32_t edx_1;
0048ae33      edx_1 = arg2 != 3;
0048ae37      return (this & (edx_1 - 1));
0048ae20  }

0048ae3c                                                                                      90 90 90 90                              ....

0048ae40  uint32_t gmSpellbookUI::GetUIElementType(class gmSpellbookUI const* this @ ecx) __pure

0048ae40  {
0048ae45      return 0x1000002e;
0048ae40  }

0048ae46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0048ae50  class UIElement* gmSpellbookUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0048ae50  {
0048ae56      void* result = operator new(0x638);
0048ae56      
0048ae62      if (result == 0)
0048aeaa          return 0;
0048aeaa      
0048ae70      UIElement_Field::UIElement_Field(result, arg1, arg2);
0048ae75      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
0048ae7f      *(uint32_t*)result = 0x7a3d48;
0048ae85      *(uint32_t*)((char*)result + 0x5f8) = 0x7a3aa0;
0048ae8f      *(uint32_t*)((char*)result + 0x5fc) = 0;
0048ae99      *(uint32_t*)((char*)result + 0x600) = 0;
0048aea6      return result;
0048ae50  }

0048aeab                                   90 90 90 90 90                                                             .....

0048aeb0  uint8_t __stdcall gmSpellbookUI::IsFilteredOut(class gmSpellbookUI* this @ ecx, class CSpellBase* arg2)

0048aeb0  {
0048aeb9      int16_t eax_1 = Client::GetPort(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0048aecd      int32_t eax_3;
0048aecd      
0048aecd      switch ((arg2->_school - 1))
0048aecd      {
0048aef8          case 0:
0048aef8          {
0048aef8              if ((eax_1 & 8) != 0)
0048aef8                  goto label_48af0a;
0048aef8              
0048aefa              eax_3 = 1;
0048aefd              return 1;
0048aef8              break;
0048aef8          }
0048aeed          case 1:
0048aeed          {
0048aeed              if ((eax_1 & 4) != 0)
0048aeed                  goto label_48af0a;
0048aeed              
0048aeef              eax_3 = 1;
0048aef2              return 1;
0048aeed              break;
0048aeed          }
0048aee2          case 2:
0048aee2          {
0048aee2              if ((eax_1 & 2) != 0)
0048aee2                  goto label_48af0a;
0048aee2              
0048aee4              eax_3 = 1;
0048aee7              return 1;
0048aee2              break;
0048aee2          }
0048aed7          case 3:
0048aed7          {
0048aed7              if ((eax_1 & 1) != 0)
0048aed7                  goto label_48af0a;
0048aed7              
0048aed9              eax_3 = 1;
0048aedc              return 1;
0048aed7              break;
0048aed7          }
0048af03          case 4:
0048af03          {
0048af03              if ((*(uint8_t*)((char*)eax_1)[1] & 0x20) != 0)
0048af03              {
0048af0a              label_48af0a:
0048af10                  bool cond:0_1;
0048af10                  
0048af10                  switch ((CSpellBase::InqSpellLevelByRoughHeuristic(arg2) - 1))
0048af10                  {
0048af17                      case 0:
0048af17                      {
0048af17                          cond:0_1 = (eax_1 & 0x10) != 0;
0048af1a                      label_48af1a:
0048af1a                          
0048af1a                          if (cond:0_1)
0048af1a                          {
0048af4f                              eax_3 = 0;
0048af52                              return 0;
0048af1a                          }
0048af17                          break;
0048af17                      }
0048af22                      case 1:
0048af22                      {
0048af22                          cond:0_1 = (eax_1 & 0x20) != 0;
0048af25                          goto label_48af1a;
0048af22                      }
0048af27                      case 2:
0048af27                      {
0048af27                          cond:0_1 = (eax_1 & 0x40) != 0;
0048af2a                          goto label_48af1a;
0048af27                      }
0048af2e                      case 3:
0048af2e                      {
0048af2e                          if (eax_1 < 0)
0048af2e                          {
0048af4f                              eax_3 = 0;
0048af52                              return 0;
0048af2e                          }
0048af2e                          
0048af30                          eax_3 = 1;
0048af33                          return 1;
0048af2e                          break;
0048af2e                      }
0048af36                      case 4:
0048af36                      {
0048af36                          cond:0_1 = (*(uint8_t*)((char*)eax_1)[1] & 1) != 0;
0048af39                          goto label_48af1a;
0048af36                      }
0048af3b                      case 5:
0048af3b                      {
0048af3b                          cond:0_1 = (*(uint8_t*)((char*)eax_1)[1] & 2) != 0;
0048af3e                          goto label_48af1a;
0048af3b                      }
0048af40                      case 6:
0048af40                      {
0048af40                          cond:0_1 = (*(uint8_t*)((char*)eax_1)[1] & 4) != 0;
0048af43                          goto label_48af1a;
0048af40                      }
0048af45                      case 7:
0048af45                      {
0048af45                          cond:0_1 = (*(uint8_t*)((char*)eax_1)[1] & 8) != 0;
0048af48                          goto label_48af1a;
0048af45                      }
0048af4d                      case 8:
0048af4d                      {
0048af4d                          if ((*(uint8_t*)((char*)eax_1)[1] & 0x10) != 0)
0048af4d                          {
0048af4f                              eax_3 = 0;
0048af52                              return 0;
0048af4d                          }
0048af4d                          break;
0048af4d                      }
0048af10                  }
0048af03              }
0048af03              break;
0048af03          }
0048aecd      }
0048aecd      
0048af1c      eax_3 = 1;
0048af1f      return 1;
0048aeb0  }

0048af55                                                                 8d 49 00                                               .I.
0048af58  uint32_t jump_table_48af58[0x5] = 
0048af58  {
0048af58      [0x0] =  0x0048aef5
0048af5c      [0x1] =  0x0048aeea
0048af60      [0x2] =  0x0048aedf
0048af64      [0x3] =  0x0048aed4
0048af68      [0x4] =  0x0048af00
0048af6c  }
0048af6c  uint32_t jump_table_48af6c[0x9] = 
0048af6c  {
0048af6c      [0x0] =  0x0048af17
0048af70      [0x1] =  0x0048af22
0048af74      [0x2] =  0x0048af27
0048af78      [0x3] =  0x0048af2c
0048af7c      [0x4] =  0x0048af36
0048af80      [0x5] =  0x0048af3b
0048af84      [0x6] =  0x0048af40
0048af88      [0x7] =  0x0048af45
0048af8c      [0x8] =  0x0048af4a
0048af90  }

0048af90  void __fastcall gmSpellbookUI::ResetFilterButtons(class gmSpellbookUI* this)

0048af90  {
0048af9c      int32_t eax_1 = Client::GetPort(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0048afad      int32_t edx;
0048afad      edx = (eax_1 & 1);
0048afb0      char temp0 = edx;
0048afb0      edx = -(edx);
0048afa1      this->m_btnSchool_Creature->vtable->SetState((((edx - edx) & 5) + 1));
0048afc9      int32_t edx_4;
0048afc9      edx_4 = (eax_1 & 2);
0048afcc      char temp1 = edx_4;
0048afcc      edx_4 = -(edx_4);
0048afbf      this->m_btnSchool_Item->vtable->SetState((((edx_4 - edx_4) & 5) + 1));
0048afe5      int32_t edx_8;
0048afe5      edx_8 = (eax_1 & 4);
0048afe8      char temp2 = edx_8;
0048afe8      edx_8 = -(edx_8);
0048afdb      this->m_btnSchool_Life->vtable->SetState((((edx_8 - edx_8) & 5) + 1));
0048b001      int32_t edx_12;
0048b001      edx_12 = (eax_1 & 8);
0048b004      char temp3 = edx_12;
0048b004      edx_12 = -(edx_12);
0048aff7      this->m_btnSchool_War->vtable->SetState((((edx_12 - edx_12) & 5) + 1));
0048b01d      int32_t edx_17 = (eax_1 & 0x2000);
0048b023      int32_t edx_18 = -(edx_17);
0048b013      this->m_btnSchool_Void->vtable->SetState((((edx_18 - edx_18) & 5) + 1));
0048b03c      int32_t edx_22;
0048b03c      edx_22 = (eax_1 & 0x10);
0048b03f      char temp5 = edx_22;
0048b03f      edx_22 = -(edx_22);
0048b032      this->m_btnLevel_1->vtable->SetState((((edx_22 - edx_22) & 5) + 1));
0048b058      int32_t edx_26;
0048b058      edx_26 = (eax_1 & 0x20);
0048b05b      char temp6 = edx_26;
0048b05b      edx_26 = -(edx_26);
0048b04e      this->m_btnLevel_2->vtable->SetState((((edx_26 - edx_26) & 5) + 1));
0048b074      int32_t edx_30;
0048b074      edx_30 = (eax_1 & 0x40);
0048b077      char temp7 = edx_30;
0048b077      edx_30 = -(edx_30);
0048b06a      this->m_btnLevel_3->vtable->SetState((((edx_30 - edx_30) & 5) + 1));
0048b090      int32_t edx_34;
0048b090      edx_34 = (eax_1 & 0x80);
0048b093      char temp8 = edx_34;
0048b093      edx_34 = -(edx_34);
0048b086      this->m_btnLevel_4->vtable->SetState((((edx_34 - edx_34) & 5) + 1));
0048b0ac      int32_t edx_39 = (eax_1 & 0x100);
0048b0b2      int32_t edx_40 = -(edx_39);
0048b0a2      this->m_btnLevel_5->vtable->SetState((((edx_40 - edx_40) & 5) + 1));
0048b0cb      int32_t edx_45 = (eax_1 & 0x200);
0048b0d1      int32_t edx_46 = -(edx_45);
0048b0c1      this->m_btnLevel_6->vtable->SetState((((edx_46 - edx_46) & 5) + 1));
0048b0ea      int32_t edx_51 = (eax_1 & 0x400);
0048b0f0      int32_t edx_52 = -(edx_51);
0048b0e0      this->m_btnLevel_7->vtable->SetState((((edx_52 - edx_52) & 5) + 1));
0048b107      int32_t esi_1 = (eax_1 & 0x800);
0048b10d      int32_t esi_2 = -(esi_1);
0048b0ff      this->m_btnLevel_8->vtable->SetState((((esi_2 - esi_2) & 5) + 1));
0048af90  }

0048b11f                                                                                               90                                 .

0048b120  void __fastcall UIElement_ListBox::ScrollToHome(class UIElement_ListBox* this)

0048b120  {
0048b128      if (this->m_listItems.m_num != 0)
0048b12c          UIElement_ListBox::ScrollToShow(this, 0);
0048b120  }

0048b132                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0048b140  void __fastcall CSpellBase::CSpellBase(class CSpellBase* this)

0048b140  {
0048b143      this->vtable = 0x7a3e94;
0048b149      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0048b15b      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0048b15e      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0048b160      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0048b16c      this->_desc.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0048b16f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
0048b173      this->_school = 0;
0048b17c      this->_iconID.id = INVALID_DID.id;
0048b17f      __builtin_memset(&this->_category, 0, 0x1c);
0048b194      this->_spell_economy_mod = -1f;
0048b19b      this->_formula_version = 0;
0048b19e      this->_component_loss = 0f;
0048b1a1      this->_formula.vtable = 0x7a3a8c;
0048b1b2      __builtin_memset(&this->_formula._comps, 0, 0x20);
0048b1ba      this->_caster_effect = PS_Invalid;
0048b1bd      this->_target_effect = PS_Invalid;
0048b1c0      this->_fizzle_effect = PS_Invalid;
0048b1c3      this->_recovery_interval = 0f;
0048b1c6      *(uint32_t*)((char*)this->_recovery_interval)[4] = 0;
0048b1c9      this->_recovery_amount = 0f;
0048b1cc      this->_display_order = 0xffffffff;
0048b1d3      this->_non_component_target_type = 0;
0048b1d9      MetaSpell::MetaSpell(&this->_meta_spell);
0048b140  }

0048b1e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0048b1f0  void __fastcall CSpellBase::~CSpellBase(class CSpellBase* this)

0048b1f0  {
0048b1fb      MetaSpell::~MetaSpell(&this->_meta_spell);
0048b200      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_desc.m_buffer;
0048b20d      this->_formula.vtable = 0x79285c;
0048b20d      
0048b21c      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0048b21e          m_buffer->vtable->__vecDelDtor(1);
0048b21e      
0048b226      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_name.m_buffer;
0048b226      
0048b235      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
0048b237          m_buffer_1->vtable->__vecDelDtor(1);
0048b237      
0048b240      this->vtable = 0x79285c;
0048b1f0  }

0048b249                             90 90 90 90 90 90 90                                                           .......

0048b250  void* __thiscall gmSpellbookUI::`scalar deleting destructor'(class gmSpellbookUI* this, uint32_t arg2)

0048b250  {
0048b25a      this->vtable = 0x7a3d48;
0048b254      this->vtable = &gmSpellbookUI::`vftable';
0048b266      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0048b266      
0048b26d      if (eax != 0)
0048b26f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0048b26f      
0048b254      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048b27f      NoticeHandler::~NoticeHandler(&this->vtable);
0048b286      UIElement_Field::~UIElement_Field(this);
0048b286      
0048b290      if ((arg2 & 1) != 0)
0048b293          operator delete(this);
0048b293      
0048b29f      return this;
0048b250  }

0048b2a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0048b2b0  void __fastcall gmSpellbookUI::PostInit(class gmSpellbookUI* this)

0048b2b0  {
0048b2b4      UIElement::PostInit(this);
0048b2c0      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000295);
0048b2c7      class UIElement_ItemList* eax_1;
0048b2c7      
0048b2c7      if (eax == 0)
0048b2da          eax_1 = nullptr;
0048b2c7      else
0048b2d2          eax_1 = eax->vtable->DynamicCast(0x10000031);
0048b2d2      
0048b2e3      this->m_spellList = eax_1;
0048b2e9      this->m_selectedSpellID = 0;
0048b2ff      this->m_btnSchool_Creature = UIElement::GetChildRecursive(this, 0x10000298);
0048b311      this->m_btnSchool_Item = UIElement::GetChildRecursive(this, 0x10000299);
0048b323      this->m_btnSchool_Life = UIElement::GetChildRecursive(this, 0x1000029a);
0048b335      this->m_btnSchool_War = UIElement::GetChildRecursive(this, 0x1000029b);
0048b347      this->m_btnSchool_Void = UIElement::GetChildRecursive(this, 0x100005c0);
0048b359      this->m_btnLevel_1 = UIElement::GetChildRecursive(this, 0x1000029c);
0048b36b      this->m_btnLevel_2 = UIElement::GetChildRecursive(this, 0x1000029d);
0048b37d      this->m_btnLevel_3 = UIElement::GetChildRecursive(this, 0x1000029e);
0048b38f      this->m_btnLevel_4 = UIElement::GetChildRecursive(this, 0x1000029f);
0048b3a1      this->m_btnLevel_5 = UIElement::GetChildRecursive(this, 0x100002a0);
0048b3b3      this->m_btnLevel_6 = UIElement::GetChildRecursive(this, 0x100002a1);
0048b3c5      this->m_btnLevel_7 = UIElement::GetChildRecursive(this, 0x100002a2);
0048b3d0      this->m_btnLevel_8 = UIElement::GetChildRecursive(this, 0x1000054e);
0048b3d6      class GlobalEventHandler* eax_15 = GlobalEventHandler::GetGlobalEventHandler();
0048b3d6      
0048b3df      if (eax_15 != 0)
0048b3df      {
0048b3e1          eax_15->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
0048b3f4          eax_15->vtable->RegisterNoticeHandler(0x4dd25f, &this->vtable);
0048b401          eax_15->vtable->RegisterNoticeHandler(0x4dd260, &this->vtable);
0048b3df      }
0048b2b0  }

0048b411                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0048b420  void gmSpellbookUI::Register()

0048b420  {
0048b42a      UIElement::RegisterElementClass(0x1000002e, gmSpellbookUI::Create);
0048b420  }

0048b433                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0048b440  uint32_t __thiscall gmSpellbookUI::GetSortedInsertionPlace(class gmSpellbookUI* this, class CSpellBase* arg2)

0048b440  {
0048b44c      class ClientMagicSystem* eax = ClientMagicSystem::GetMagicSystem();
0048b457      void var_90;
0048b457      CSpellBase::CSpellBase(&var_90);
0048b462      uint32_t m_num = this->m_spellList->m_listItems.m_num;
0048b468      uint32_t esi = 0;
0048b468      
0048b46c      if (m_num > 0)
0048b46c      {
0048b4c0          do
0048b4c0          {
0048b477              class UIElement* eax_2 = UIElement_ListBox::GetItem(this->m_spellList, esi);
0048b477              
0048b47e              if (eax_2 != 0)
0048b47e              {
0048b489                  void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
0048b491                  int32_t var_14;
0048b491                  
0048b491                  if ((eax_3 != 0 && (ClientMagicSystem::InqSpellBase(eax, *(uint32_t*)((char*)eax_3 + 0x600), &var_90) != 0 && arg2->_display_order < var_14)))
0048b491                  {
0048b523                      CSpellBase::~CSpellBase(&var_90);
0048b534                      return esi;
0048b491                  }
0048b47e              }
0048b47e              
0048b4bd              esi += 1;
0048b4c0          } while (esi < m_num);
0048b46c      }
0048b46c      
0048b4c9      void var_c;
0048b4c9      MetaSpell::~MetaSpell(&var_c);
0048b4dc      int32_t var_54 = 0x79285c;
0048b4ec      int32_t* var_88;
0048b4ec      
0048b4ec      if ((InterlockedDecrement(&var_88[1]) == 0 && var_88 != 0))
0048b4f4          **(uint32_t**)var_88(1);
0048b4f4      
0048b506      int32_t* var_8c;
0048b506      
0048b506      if ((InterlockedDecrement(&var_8c[1]) == 0 && var_8c != 0))
0048b50e          **(uint32_t**)var_8c(1);
0048b50e      
0048b51c      return m_num;
0048b440  }

0048b537                                                                       90 90 90 90 90 90 90 90 90                         .........

0048b540  void __thiscall gmSpellbookUI::SetSelected(class gmSpellbookUI* this, uint32_t arg2)

0048b540  {
0048b550      uint32_t i = 0;
0048b550      
0048b554      if (this->m_spellList->m_listItems.m_num <= 0)
0048b554      {
0048b5cf          this->m_selectedSpellID = arg2;
0048b5d6          return;
0048b554      }
0048b554      
0048b5bc      do
0048b5bc      {
0048b567          class UIElement* eax_1 = UIElement_ListBox::GetItem(this->m_spellList, i);
0048b567          
0048b56e          if (eax_1 != 0)
0048b56e          {
0048b579              class UIElement_UIItem* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
0048b579              
0048b583              if (eax_2 != 0)
0048b583              {
0048b58f                  if ((arg2 == 0 || eax_2->spellID != arg2))
0048b5a8                      UIElement_UIItem::SetSelectedState(eax_2, 0);
0048b58f                  else
0048b58f                  {
0048b593                      UIElement_UIItem::SetSelectedState(eax_2, 1);
0048b59f                      UIElement_ListBox::ScrollToView(this->m_spellList, i);
0048b58f                  }
0048b583              }
0048b56e          }
0048b56e          
0048b5b9          i += 1;
0048b5bc      } while (i < this->m_spellList->m_listItems.m_num);
0048b5bc      
0048b5be      this->m_selectedSpellID = arg2;
0048b540  }

0048b55d                                                                                         8d 49 00                               .I.
0048b5d9                                                                             90 90 90 90 90 90 90                           .......

0048b5e0  void __thiscall gmSpellbookUI::UpdateFilter(class gmSpellbookUI* this, uint32_t arg2)

0048b5e0  {
0048b5e8      class UIElement* eax = UIElement::GetChildRecursive(this, arg2);
0048b5e8      
0048b5ef      if (eax != 0)
0048b5ef      {
0048b605          int32_t ebx;
0048b605          ebx = eax->m_state == 6;
0048b60b          int32_t esi_1;
0048b60b          
0048b60b          if (eax != this->m_btnSchool_Creature)
0048b60b          {
0048b61d              if (eax == this->m_btnSchool_Item)
0048b61d              {
0048b61f                  esi_1 = 2;
0048b624                  goto label_48b6da;
0048b61d              }
0048b61d              
0048b62f              if (eax == this->m_btnSchool_Life)
0048b62f              {
0048b631                  esi_1 = 4;
0048b636                  goto label_48b6da;
0048b62f              }
0048b62f              
0048b641              if (eax == this->m_btnSchool_War)
0048b641              {
0048b643                  esi_1 = 8;
0048b648                  goto label_48b6da;
0048b641              }
0048b641              
0048b653              if (eax == this->m_btnSchool_Void)
0048b653              {
0048b655                  esi_1 = 0x2000;
0048b65a                  goto label_48b6da;
0048b653              }
0048b653              
0048b662              if (eax == this->m_btnLevel_1)
0048b662              {
0048b664                  esi_1 = 0x10;
0048b669                  goto label_48b6da;
0048b662              }
0048b662              
0048b671              if (eax == this->m_btnLevel_2)
0048b671              {
0048b673                  esi_1 = 0x20;
0048b678                  goto label_48b6da;
0048b671              }
0048b671              
0048b680              if (eax == this->m_btnLevel_3)
0048b680              {
0048b682                  esi_1 = 0x40;
0048b687                  goto label_48b6da;
0048b680              }
0048b680              
0048b68f              if (eax == this->m_btnLevel_4)
0048b68f              {
0048b691                  esi_1 = 0x80;
0048b696                  goto label_48b6da;
0048b68f              }
0048b68f              
0048b69e              if (eax == this->m_btnLevel_5)
0048b69e              {
0048b6a0                  esi_1 = 0x100;
0048b6a5                  goto label_48b6da;
0048b69e              }
0048b69e              
0048b6ad              if (eax == this->m_btnLevel_6)
0048b6ad              {
0048b6af                  esi_1 = 0x200;
0048b6b4                  goto label_48b6da;
0048b6ad              }
0048b6ad              
0048b6bc              if (eax == this->m_btnLevel_7)
0048b6bc              {
0048b6be                  esi_1 = 0x400;
0048b6c3                  goto label_48b6da;
0048b6bc              }
0048b6bc              
0048b6cb              if (eax == this->m_btnLevel_8)
0048b6cb              {
0048b6cd                  esi_1 = 0x800;
0048b6cd                  goto label_48b6da;
0048b6cb              }
0048b60b          }
0048b60b          else
0048b60b          {
0048b60d              esi_1 = 1;
0048b6da          label_48b6da:
0048b6da              int32_t eax_2 = Client::GetPort(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0048b6e1              int32_t edi_2;
0048b6e1              
0048b6e1              if (ebx == 0)
0048b6ed                  edi_2 = (!(esi_1) & eax_2);
0048b6e1              else
0048b6e5                  edi_2 = (eax_2 | esi_1);
0048b6e5              
0048b6f1              if (edi_2 != eax_2)
0048b6f1              {
0048b6fc                  Client::SetPortA(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, edi_2);
0048b702                  CM_Character::Event_SpellbookFilterEvent(edi_2);
0048b6f1              }
0048b60b          }
0048b5ef      }
0048b5e0  }


0048b710  uint32_t __thiscall PackableList<unsigned long>::Pack(class PackableList<unsigned long>* this, void** arg2, uint32_t arg3)

0048b710  {
0048b714      uint32_t result = PackableList<unsigned long>::pack_size(this);
0048b714      
0048b71f      if (arg3 >= result)
0048b71f      {
0048b729          if (arg3 >= 4)
0048b729          {
0048b730              **(uint32_t**)arg2 = this->curNum;
0048b732              *(uint32_t*)arg2 += 4;
0048b729          }
0048b729          
0048b73a          for (class PackableLLNode<unsigned long>* i = this->head; i != 0; i = i->next)
0048b73a          {
0048b743              if (arg3 >= 4)
0048b743              {
0048b749                  **(uint32_t**)arg2 = i->data;
0048b74b                  *(uint32_t*)arg2 += 4;
0048b743              }
0048b73a          }
0048b71f      }
0048b71f      
0048b758      return result;
0048b710  }

0048b75b                                                                                   90 90 90 90 90                             .....

0048b760  uint32_t __fastcall PackableList<unsigned long>::pack_size(class PackableList<unsigned long>* this)

0048b760  {
0048b760      class PackableLLNode<unsigned long>* i = this->head;
0048b765      int32_t result = 4;
0048b765      
0048b76a      while (i != 0)
0048b76a      {
0048b770          i = i->next;
0048b773          result += 4;
0048b76a      }
0048b76a      
0048b77a      return result;
0048b760  }

0048b77b                                                                                   90 90 90 90 90                             .....

0048b780  void* __thiscall CSpellBase::`scalar deleting destructor'(class CSpellBase* this, uint32_t arg2)

0048b780  {
0048b783      CSpellBase::~CSpellBase(this);
0048b783      
0048b78d      if ((arg2 & 1) != 0)
0048b790          operator delete(this);
0048b790      
0048b79b      return this;
0048b780  }

0048b79e                                                                                            90 90                                ..

0048b7a0  void __thiscall gmSpellbookUI::AddSpell(class gmSpellbookUI* this, uint32_t arg2)

0048b7a0  {
0048b7aa      class ClientMagicSystem* eax = ClientMagicSystem::GetMagicSystem();
0048b7aa      
0048b7b3      if (eax != 0)
0048b7b3      {
0048b7ba          void var_90;
0048b7ba          CSpellBase::CSpellBase(&var_90);
0048b7ba          
0048b7d5          if ((ClientMagicSystem::InqSpellBase(eax, arg2, &var_90) != 0 && gmSpellbookUI::IsFilteredOut(this, &var_90) == 0))
0048b7d5          {
0048b7ee              uint32_t eax_3 = gmSpellbookUI::GetSortedInsertionPlace(this, &var_90);
0048b7fb              UIElement_ItemList::ItemList_InsertSpellShortcut(this->m_spellList, arg2, eax_3);
0048b7d5          }
0048b7d5          
0048b804          CSpellBase::~CSpellBase(&var_90);
0048b7b3      }
0048b7a0  }

0048b815                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0048b820  class TResult __thiscall InterfacePtr<class PlayerDesc>::_QueryInterface(InterfacePtr<class PlayerDesc>* this, class InterfacePtr<class Interface> arg2)

0048b820  {
0048b820      InterfacePtr<class PlayerDesc>* this_1 = this;
0048b825      int32_t* edi = arg_8;
0048b82f      int32_t ebx;
0048b82f      
0048b82f      if (edi == 0)
0048b82f      {
0048b892          int32_t* ecx_4 = *(uint32_t*)this;
0048b892          
0048b896          if (ecx_4 != 0)
0048b896          {
0048b898              *(uint32_t*)this = 0;
0048b89c              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
0048b89f              *(uint32_t*)((char*)this + 4) = 0;
0048b896          }
0048b896          
0048b8a2          ebx = 0x80004002;
0048b82f      }
0048b82f      else
0048b82f      {
0048b831          int32_t eax_1 = *(uint32_t*)edi;
0048b844          arg_8 = nullptr;
0048b84b          ebx = *(uint32_t*)*(uint32_t*)(eax_1 + 0xc)(&this_1, 0x7a3938, &arg_8);
0048b84f          int32_t* ecx_1 = *(uint32_t*)this;
0048b84f          
0048b851          if (ebx < 0)
0048b851          {
0048b855              if (ecx_1 != 0)
0048b859                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0048b859              
0048b85c              *(uint32_t*)this = 0;
0048b85e              *(uint32_t*)((char*)this + 4) = 0;
0048b861              int32_t* esi_1 = arg2;
0048b865              *(uint32_t*)esi_1 = ebx;
0048b86b              *(uint32_t*)(*(uint32_t*)edi + 0x14)();
0048b875              return esi_1;
0048b851          }
0048b851          
0048b87a          int32_t* ebp_1 = arg_8;
0048b87a          
0048b87e          if (ecx_1 != 0)
0048b882              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0048b882          
0048b885          *(uint32_t*)this = ebp_1;
0048b887          *(uint32_t*)((char*)this + 4) = 0;
0048b82f      }
0048b82f      
0048b8a9      int32_t* esi_2 = arg2;
0048b8ad      *(uint32_t*)esi_2 = ebx;
0048b8ad      
0048b8af      if (edi != 0)
0048b8b5          *(uint32_t*)(*(uint32_t*)edi + 0x14)();
0048b8b5      
0048b8bf      return esi_2;
0048b820  }

0048b8c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0048b8d0  void __thiscall gmSpellbookUI::RecvNotice_SpellAdded(class gmSpellbookUI* this, uint32_t arg2)

0048b8d0  {
0048b8e9      gmSpellbookUI::AddSpell(((char*)this - 0x5f8), arg2);
0048b8ee      class ClientMagicSystem* eax = ClientMagicSystem::GetMagicSystem();
0048b8ee      
0048b8f7      if (eax != 0)
0048b8f7      {
0048b8fd          void var_90;
0048b8fd          CSpellBase::CSpellBase(&var_90);
0048b8fd          
0048b911          if ((ClientMagicSystem::InqSpellBase(eax, arg2, &var_90) != 0 && gmSpellbookUI::IsFilteredOut(((char*)this - 0x5f8), &var_90) == 0))
0048b911          {
0048b926              gmSpellbookUI::SetSelected(((char*)this - 0x5f8), arg2);
0048b931              *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
0048b911          }
0048b911          
0048b938          CSpellBase::~CSpellBase(&var_90);
0048b8f7      }
0048b8d0  }

0048b949                             90 90 90 90 90 90 90                                                           .......

0048b950  void __fastcall PackableList<unsigned long>::Flush(class PackableList<unsigned long>* this)

0048b950  {
0048b95b      while (this->head != 0)
0048b95b      {
0048b960          class PackableLLNode<unsigned long>* head = this->head;
0048b960          
0048b965          if (head != 0)
0048b965          {
0048b967              class PackableLLNode<unsigned long>* next = head->next;
0048b96c              this->head = next;
0048b96c              
0048b96f              if (next == 0)
0048b976                  this->tail = nullptr;
0048b96f              else
0048b971                  next->prev = nullptr;
0048b971              
0048b97b              if (head != 0)
0048b97e                  operator delete(head);
0048b97e              
0048b986              this->curNum -= 1;
0048b965          }
0048b95b      }
0048b950  }

0048b991                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0048b9a0  void __thiscall InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(class InterfacePtr<PlayerDesc>* this, class InterfacePtr<Interface> const* arg2)

0048b9a0  {
0048b9a4      int32_t esi;
0048b9a4      int32_t var_4 = esi;
0048b9a9      this->m_pInterface = 0;
0048b9ab      this->m_trStatus.m_val = 0;
0048b9b0      class Interface* m_pInterface;
0048b9b0      int32_t* esp_1 = &m_pInterface;
0048b9b5      m_pInterface = arg2->m_pInterface;
0048b9b7      int32_t var_8 = 0;
0048b9ba      class Interface* m_pInterface_1 = m_pInterface;
0048b9ba      
0048b9be      if (m_pInterface_1 != 0)
0048b9be      {
0048b9c0          m_pInterface_1->vtable->AddRef();
0048b9c4          esp_1 = &var_4;
0048b9be      }
0048b9be      
0048b9cb      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[4];
0048b9d5      this->m_trStatus.m_val = InterfacePtr<class PlayerDesc>::_QueryInterface(this)->m_val;
0048b9da      *(uint32_t*)esp_1;
0048b9a0  }

0048b9de                                                                                            90 90                                ..

0048b9e0  void __fastcall PackableList<unsigned long>::~PackableList<unsigned long>(class PackableList<unsigned long>* this)

0048b9e0  {
0048b9e3      this->vtable = 0x7a3e80;
0048b9e9      PackableList<unsigned long>::Flush(this);
0048b9ee      this->vtable = 0x79285c;
0048b9e0  }

0048b9f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0048ba00  int32_t __thiscall PackableList<unsigned long>::UnPack(class PackableList<unsigned long>* this, void** arg2, uint32_t arg3)

0048ba00  {
0048ba00      class PackableList<unsigned long>* this_1 = this;
0048ba04      PackableList<unsigned long>::Flush(this);
0048ba04      
0048ba0e      if (arg3 < 4)
0048ba4f          return 0;
0048ba4f      
0048ba15      void* eax = *(uint32_t*)arg2;
0048ba18      int32_t i_1 = *(uint32_t*)eax;
0048ba1f      *(uint32_t*)arg2 = ((char*)eax + 4);
0048ba1f      
0048ba21      if (i_1 > 0)
0048ba21      {
0048ba3d          int32_t i;
0048ba3d          
0048ba3d          do
0048ba3d          {
0048ba23              int32_t* eax_2 = *(uint32_t*)arg2;
0048ba2b              this_1 = *(uint32_t*)eax_2;
0048ba35              *(uint32_t*)arg2 = &eax_2[1];
0048ba37              PackableList<unsigned long>::InsertTail(this, &this_1);
0048ba3c              i = i_1;
0048ba3c              i_1 -= 1;
0048ba3d          } while (i != 1);
0048ba21      }
0048ba21      
0048ba48      return 1;
0048ba00  }

0048ba52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0048ba60  uint32_t __thiscall PackableList<unsigned long>::InsertTail(class PackableList<unsigned long>* this, uint32_t const* arg2)

0048ba60  {
0048ba65      void* eax = operator new(0xc);
0048ba65      
0048ba71      if (eax == 0)
0048ba83          eax = nullptr;
0048ba71      else
0048ba71      {
0048ba79          *(uint32_t*)eax = *(uint32_t*)arg2;
0048ba7b          *(uint32_t*)((char*)eax + 4) = 0;
0048ba7e          *(uint32_t*)((char*)eax + 8) = 0;
0048ba71      }
0048ba71      
0048ba88      if (this->head == 0)
0048ba88      {
0048ba8a          this->head = eax;
0048ba8d          this->tail = eax;
0048ba93          uint32_t eax_2 = (this->curNum + 1);
0048ba94          this->curNum = eax_2;
0048ba98          return eax_2;
0048ba88      }
0048ba88      
0048ba9b      class PackableLLNode<unsigned long>* tail = this->tail;
0048ba9e      tail->next = eax;
0048baa1      *(uint32_t*)((char*)eax + 8) = tail;
0048baa4      this->tail = eax;
0048baaa      uint32_t eax_4 = (this->curNum + 1);
0048baab      this->curNum = eax_4;
0048baaf      return eax_4;
0048ba60  }

0048bab2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0048bac0  void* __thiscall PackableList<unsigned long>::`scalar deleting destructor'(class PackableList<unsigned long>* this, uint32_t arg2)

0048bac0  {
0048bac3      this->vtable = 0x7a3e80;
0048bac9      PackableList<unsigned long>::Flush(this);
0048bad3      this->vtable = 0x79285c;
0048bad3      
0048bad9      if ((arg2 & 1) != 0)
0048badc          operator delete(this);
0048badc      
0048bae7      return this;
0048bac0  }

0048baea                                90 90 90 90 90 90                                                            ......

0048baf0  void __fastcall gmSpellbookUI::UpdateFromPlayerDesc(class gmSpellbookUI* this)

0048baf0  {
0048baf4      int32_t ebp;
0048baf4      int32_t var_2c = ebp;
0048baff      UIElement_ItemList::ItemList_Flush(this->m_spellList);
0048bb08      struct Turbine_GUID* var_24;
0048bb08      int32_t* var_38 = &var_24;
0048bb0d      struct Turbine_GUID* var_3c = &PlayerDesc_ClassType;
0048bb15      var_24 = nullptr;
0048bb20      class TResult __return;
0048bb20      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_3c, var_38);
0048bb25      struct Turbine_GUID* ecx_2 = var_24;
0048bb2e      var_3c = ecx_2;
0048bb30      int32_t var_38_1 = 0;
0048bb33      struct Turbine_GUID* eax_1 = var_3c;
0048bb39      int32_t var_18 = 0;
0048bb3d      int32_t var_14 = 0;
0048bb3d      
0048bb41      if (eax_1 != 0)
0048bb47          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0048bb47      
0048bb53      struct Turbine_GUID** esp = &var_3c;
0048bb5a      void var_1c;
0048bb5a      int32_t ecx_5 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_18, &var_1c);
0048bb5a      
0048bb60      if (ecx_2 != 0)
0048bb66          *(uint32_t*)(ecx_2->m_data1 + 0x14)();
0048bb66      
0048bb69      class TResult __return_1 = __return;
0048bb69      
0048bb6f      if (__return_1 != 0)
0048bb6f      {
0048bb77          if (ecx_5 < 0)
0048bb77          {
0048bb7b              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0048bb85              return;
0048bb77          }
0048bb77          
0048bb8f          if (CACQualities::HasSpellBook(__return_1) != 0)
0048bb8f          {
0048bb96              var_18 = 0x7a3e80;
0048bb9e              int32_t* i_1 = nullptr;
0048bba2              int32_t var_10_1 = 0;
0048bba6              int32_t var_c_1 = 0;
0048bbaa              CACQualities::TranscribeSpells(__return_1, &var_18);
0048bbaa              
0048bbb5              for (int32_t* i = i_1; i != 0; i = i[1])
0048bbbc                  gmSpellbookUI::AddSpell(this, *(uint32_t*)i);
0048bbbc              
0048bbc8              gmSpellbookUI::ResetFilterButtons(this);
0048bbd1              var_18 = 0x7a3e80;
0048bbd9              PackableList<unsigned long>::Flush(&var_18);
0048bbde              var_18 = 0x79285c;
0048bb8f          }
0048bb8f          
0048bbea          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0048bbea          struct Turbine_GUID* __saved_edi;
0048bbea          esp = &__saved_edi;
0048bb6f      }
0048bb6f      
0048bbed      *(uint32_t*)esp;
0048bbed      esp[1];
0048bbed      esp[2];
0048bbed      esp[3];
0048baf0  }

0048bbf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0048bc00  void __fastcall gmSpellbookUI::RecvNotice_SpellRemoved(class gmSpellbookUI* this, uint32_t arg2)

0048bc00  {
0048bc06      gmSpellbookUI::UpdateFromPlayerDesc(((char*)this - 0x5f8));
0048bc00  }

0048bc0e                                            90 90                                                                ..

0048bc10  void gmSpellbookUI::DeleteSpellDialogCallback(class PropertyCollection const* arg1)

0048bc10  {
0048bc15      class PropertyCollection* esi = arg1;
0048bc20      uint32_t temp1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
0048bc23      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
0048bc28      char var_9 = 0;
0048bc2c      int32_t* var_8 = nullptr;
0048bc30      int32_t* var_4 = nullptr;
0048bc37      int32_t* eax_2 = m_buckets[temp1];
0048bc37      
0048bc3b      if (eax_2 != 0)
0048bc3b      {
0048bc47          while (*(uint32_t*)eax_2 != 0x92)
0048bc47          {
0048bc49              eax_2 = eax_2[1];
0048bc49              
0048bc4e              if (eax_2 == 0)
0048bc55                  return;
0048bc47          }
0048bc47          
0048bc58          if (eax_2 != 0)
0048bc58          {
0048bc66              BaseProperty::operator=(&var_8, &eax_2[2]);
0048bc6b              int32_t* ecx_2 = var_4;
0048bc6b              
0048bc71              if (ecx_2 != 0)
0048bc71              {
0048bc7a                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&var_9);
0048bc7d                  ecx_2 = var_4;
0048bc71              }
0048bc71              
0048bc85              if (var_9 != 0)
0048bc85              {
0048bc8e                  uint32_t temp1_1 = (COMBINE(0, 0x1000003f) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
0048bc91                  class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
0048bc94                  arg1 = nullptr;
0048bc94                  
0048bc9f                  for (int32_t* i = m_buckets_1[temp1_1]; i != 0; i = i[1])
0048bc9f                  {
0048bca7                      if (*(uint32_t*)i == 0x1000003f)
0048bca7                      {
0048bcb4                          if (i != 0)
0048bcb4                          {
0048bcbe                              BaseProperty::operator=(&var_8, &i[2]);
0048bcc3                              ecx_2 = var_4;
0048bcc3                              
0048bcc9                              if (ecx_2 != 0)
0048bcc9                              {
0048bcd2                                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x78)(&arg1);
0048bcd5                                  ecx_2 = var_4;
0048bcc9                              }
0048bcc9                              
0048bcd9                              class PropertyCollection* eax_7 = arg1;
0048bcd9                              
0048bcdf                              if (eax_7 != 0)
0048bcdf                              {
0048bce2                                  CM_Magic::Event_RemoveSpell(eax_7);
0048bce7                                  ecx_2 = var_4;
0048bcdf                              }
0048bcb4                          }
0048bcb4                          
0048bcb4                          break;
0048bca7                      }
0048bc9f                  }
0048bc85              }
0048bc85              
0048bcee              int32_t* eax_8 = var_8;
0048bcee              
0048bcf4              if (eax_8 != 0)
0048bcf4              {
0048bcfe                  int32_t esi_2 = (eax_8[1] - 1);
0048bcfb                  eax_8[1] = esi_2;
0048bcfb                  
0048bd05                  if (esi_2 == 0)
0048bd0b                      **(uint32_t**)eax_8(1);
0048bd0b                  
0048bd0d                  ecx_2 = var_4;
0048bd11                  var_8 = nullptr;
0048bcf4              }
0048bcf4              
0048bd17              if (ecx_2 != 0)
0048bd17              {
0048bd1f                  int32_t esi_4 = (ecx_2[1] - 1);
0048bd1c                  ecx_2[1] = esi_4;
0048bd1c                  
0048bd26                  if (esi_4 == 0)
0048bd2c                      **(uint32_t**)ecx_2(1);
0048bd17              }
0048bc58          }
0048bc3b      }
0048bc10  }

0048bd34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0048bd40  void __fastcall gmSpellbookUI::RecvNotice_PlayerDescReceived(class gmSpellbookUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

0048bd40  {
0048bd46      gmSpellbookUI::UpdateFromPlayerDesc(((char*)this - 0x5f8));
0048bd40  }

0048bd4e                                            90 90                                                                ..

0048bd50  uint8_t __fastcall gmSpellbookUI::DeleteSpell(class gmSpellbookUI* this)

0048bd50  {
0048bd61      if (this->m_selectedSpellID == 0)
0048bd61      {
0048bd63          uint32_t eax;
0048bd63          eax = 0;
0048bd6c          return 0;
0048bd61      }
0048bd61      
0048bd6e      class ClientMagicSystem* eax_1 = ClientMagicSystem::GetMagicSystem();
0048bd6e      
0048bd77      if (eax_1 == 0)
0048bd77      {
0048bd7a          eax_1 = 0;
0048bd83          return 0;
0048bd77      }
0048bd77      
0048bd84      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0048bd8a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0048bd93      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0048bdb1      class AC1Legacy::PStringBase<char> __return;
0048bdb1      char (* var_12c_2)[0x1] = &ClientMagicSystem::GetSpellName(eax_1, &__return, this->m_selectedSpellID)->m_buffer->m_data;
0048bdbc      AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "Are you sure you want to remove …");
0048bdc1      class AC1Legacy::PStringBase<char> __return_1 = __return;
0048bdc1      
0048bddc      if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
0048bde4          **(uint32_t**)__return_1(1);
0048bde4      
0048bded      void var_90;
0048bded      StringInfo::StringInfo(&var_90);
0048be02      class PStringBase<unsigned short>* eax_8;
0048be02      int32_t* ebx_1;
0048be02      eax_8 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data);
0048be0f      StringInfo::SetLiteralValue(&var_90, eax_8, 1);
0048be18      int32_t* esi_3 = (__return - 0x14);
0048be18      
0048be27      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0048be2f          **(uint32_t**)esi_3(1);
0048be2f      
0048be35      void var_108;
0048be35      PropertyCollection::PropertyCollection(&var_108);
0048be45      int32_t* var_118 = nullptr;
0048be49      int32_t* var_114 = nullptr;
0048be4d      BaseProperty::SetPropertyName(&var_118, 0x8e);
0048be4d      
0048be56      if (var_114 != 0)
0048be56      {
0048be5c          BaseProperty::CheckCopyOnWrite(&var_118);
0048be69          *(uint32_t*)(*(uint32_t*)var_114 + 0xac)(1);
0048be56      }
0048be56      
0048be86      __return = BaseProperty::GetPropertyName(&var_118);
0048be8a      void var_104;
0048be8a      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &__return, &var_118);
0048be98      BaseProperty::SetPropertyName(&var_118, 0xc5);
0048be98      
0048bea1      if (var_114 != 0)
0048bea1      {
0048bea7          BaseProperty::CheckCopyOnWrite(&var_118);
0048beba          *(uint32_t*)(*(uint32_t*)var_114 + 0xc4)(&var_90);
0048bea1      }
0048bea1      
0048bec9      __return = BaseProperty::GetPropertyName(&var_118);
0048bedb      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &__return, &var_118);
0048bee9      BaseProperty::SetPropertyName(&var_118, 0x1000003f);
0048beee      uint32_t m_selectedSpellID = this->m_selectedSpellID;
0048beee      
0048befc      if (var_114 != 0)
0048befc      {
0048bf02          BaseProperty::CheckCopyOnWrite(&var_118);
0048bf0e          *(uint32_t*)(*(uint32_t*)var_114 + 0x7c)(m_selectedSpellID);
0048befc      }
0048befc      
0048bf1a      __return = BaseProperty::GetPropertyName(&var_118);
0048bf2c      class PropertyCollection* eax_16;
0048bf2c      void (* edx_5)(class PropertyCollection const*);
0048bf2c      eax_16 = HashTable<unsigned long,BaseProperty,1>::add(&var_104, &__return, &var_118);
0048bf35      void (* var_12c_10)(class PropertyCollection const* arg1) = gmSpellbookUI::DeleteSpellDialogCallback;
0048bf3a      void* var_130_6 = &var_108;
0048bf3b      DialogFactory::MakeCallbackDialogInCurrentUI(eax_16, edx_5);
0048bf40      int32_t* eax_17 = var_118;
0048bf40      
0048bf49      if (eax_17 != 0)
0048bf49      {
0048bf53          int32_t esi_5 = (eax_17[1] - 1);
0048bf50          eax_17[1] = esi_5;
0048bf50          
0048bf5a          if (esi_5 == 0)
0048bf60              **(uint32_t**)eax_17(1);
0048bf60          
0048bf62          var_118 = nullptr;
0048bf49      }
0048bf49      
0048bf6c      if (var_114 != 0)
0048bf6c      {
0048bf76          int32_t esi_7 = (var_114[1] - 1);
0048bf73          var_114[1] = esi_7;
0048bf73          
0048bf7d          if (esi_7 == 0)
0048bf83              **(uint32_t**)var_114(1);
0048bf83          
0048bf85          int32_t var_114_1 = 0;
0048bf6c      }
0048bf6c      
0048bf8d      PropertyCollection::~PropertyCollection(&var_108);
0048bf99      StringInfo::~StringInfo(&var_90);
0048bf99      
0048bfaa      if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
0048bfb2          **(uint32_t**)ebx_1(1);
0048bfb2      
0048bfb7      int32_t eax_23;
0048bfb7      eax_23 = 1;
0048bfc0      return 1;
0048bd50  }

0048bfc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0048bfd0  void __thiscall gmSpellbookUI::ListenToElementMessage(class gmSpellbookUI* this, struct UIElementMessageInfo const* arg2)

0048bfd0  {
0048bfd6      uint32_t idMessage = arg2->idMessage;
0048bfd6      
0048bfde      if (idMessage == 0x1c)
0048bfde      {
0048bfe4          class UIElement_ItemList* m_spellList = this->m_spellList;
0048bfe4          
0048bfec          if ((m_spellList != 0 && UIElement::IsAncestorOfMe(arg2->pElement, m_spellList) != 0))
0048bfec          {
0048c009              class UIElement* eax_1 = UIElement_ListBox::GetItemUnderMouse(this->m_spellList);
0048c009              
0048c010              if (eax_1 != 0)
0048c010              {
0048c01f                  void* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
0048c01f                  
0048c027                  if (eax_2 != 0)
0048c027                  {
0048c02d                      uint32_t dwParam1 = arg2->dwParam1;
0048c02d                      
0048c033                      if (dwParam1 == 7)
0048c033                      {
0048c067                      label_48c067:
0048c067                          uint32_t eax_4 = *(uint32_t*)((char*)eax_2 + 0x600);
0048c067                          
0048c06f                          if (eax_4 != 0)
0048c06f                          {
0048c074                              gmSpellbookUI::SetSelected(this, eax_4);
0048c07c                              UIElement::ListenToElementMessage(this, arg2);
0048c083                              return;
0048c06f                          }
0048c033                      }
0048c033                      else if (dwParam1 == 0xa)
0048c038                      {
0048c03a                          uint32_t eax_3 = *(uint32_t*)((char*)eax_2 + 0x600);
0048c03a                          
0048c042                          if (eax_3 != 0)
0048c042                          {
0048c049                              CM_Magic::SendNotice_AddSpellShortcut(eax_3);
0048c054                              UIElement::ListenToElementMessage(this, arg2);
0048c05b                              return;
0048c042                          }
0048c038                      }
0048c038                      else if (dwParam1 == 8)
0048c061                          goto label_48c067;
0048c027                  }
0048c010              }
0048bfec          }
0048bfde      }
0048bfde      else if (idMessage == 1)
0048c089      {
0048c08b          uint32_t idElement = arg2->idElement;
0048c08b          
0048c092          if (idElement <= 0x1000054e)
0048c092          {
0048c094              if (idElement == 0x1000054e)
0048c094                  goto label_48c0c9;
0048c094              
0048c09b              if (idElement >= 0x10000298)
0048c09b              {
0048c0a2                  if (idElement <= 0x100002a2)
0048c0a2                      goto label_48c0c9;
0048c0a2                  
0048c0a9                  if (idElement == 0x100002a5)
0048c0a9                  {
0048c0ad                      gmSpellbookUI::DeleteSpell(this);
0048c0b5                      UIElement::ListenToElementMessage(this, arg2);
0048c0bc                      return;
0048c0a9                  }
0048c09b              }
0048c092          }
0048c092          else if (idElement == 0x100005c0)
0048c0c4          {
0048c0c9          label_48c0c9:
0048c0c9              gmSpellbookUI::UpdateFilter(this, idElement);
0048c0d0              gmSpellbookUI::UpdateFromPlayerDesc(this);
0048c0d5              class UIElement_ItemList* m_spellList_1 = this->m_spellList;
0048c0d5              
0048c0e7              if ((m_spellList_1 != 0 && m_spellList_1->m_listItems.m_num != 0))
0048c0eb                  UIElement_ListBox::ScrollToShow(m_spellList_1, 0);
0048c0c4          }
0048c089      }
0048c089      
0048c0f3      UIElement::ListenToElementMessage(this, arg2);
0048bfd0  }

0048c0fd                                                                                         90 90 90                               ...

0048c100  void __thiscall AC1Legacy::PStringBase<char>::PStringBase<char>(class AC1Legacy::PStringBase<char>* this, char const* arg2)

0048c100  {
0048c108      class AC1Legacy::PStringBase<char>* this_1 = this;
0048c108      
0048c10f      if ((arg2 == 0 || *(uint8_t*)arg2 == 0))
0048c10f      {
0048c141          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0048c14c          this_1->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0048c14e          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
0048c158          return;
0048c10f      }
0048c10f      
0048c111      char const* eax = arg2;
0048c111      
0048c11b      do
0048c11b      {
0048c116          this = *(uint8_t*)eax;
0048c118          eax = &eax[1];
0048c11b      } while (this != 0);
0048c11b      
0048c122      AC1Legacy::PStringBase<char>::allocate_ref_buffer(this_1, (eax - &eax[1]));
0048c129      char const* edx_1 = arg2;
0048c12b      char (* eax_3)[0x1] = &this_1->m_buffer->m_data;
0048c138      char const i;
0048c138      
0048c138      do
0048c138      {
0048c130          i = *(uint8_t*)edx_1;
0048c132          edx_1 = &edx_1[1];
0048c13a          ADJ(eax_3)->m_data = i;
0048c135          eax_3 = &eax_3[1];
0048c138      } while (i != 0);
0048c100  }

0048c15b                                                                                   90 90 90 90 90                             .....

0048c160  void __fastcall gmSquelchUI::PostInit(class gmSquelchUI* this)

0048c160  {
0048c163      UIElement::PostInit(this);
0048c16f      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000054b);
0048c176      class UIElement_Button* eax_1;
0048c176      
0048c176      if (eax == 0)
0048c186          eax_1 = nullptr;
0048c176      else
0048c17e          eax_1 = eax->vtable->DynamicCast(1);
0048c17e      
0048c18f      this->m_pSquelchCharacterButton = eax_1;
0048c195      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x1000054c);
0048c19c      class UIElement_Button* eax_3;
0048c19c      
0048c19c      if (eax_2 == 0)
0048c1ac          eax_3 = nullptr;
0048c19c      else
0048c1a4          eax_3 = eax_2->vtable->DynamicCast(1);
0048c1a4      
0048c1b5      this->m_pSquelchAccountButton = eax_3;
0048c1bb      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000547);
0048c1c2      class UIElement_Button* eax_5;
0048c1c2      
0048c1c2      if (eax_4 == 0)
0048c1d2          eax_5 = nullptr;
0048c1c2      else
0048c1ca          eax_5 = eax_4->vtable->DynamicCast(1);
0048c1ca      
0048c1db      this->m_pRemoveButton = eax_5;
0048c1e1      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x1000053e);
0048c1e8      class UIElement_ListBox* eax_7;
0048c1e8      
0048c1e8      if (eax_6 == 0)
0048c1f8          eax_7 = nullptr;
0048c1e8      else
0048c1f0          eax_7 = eax_6->vtable->DynamicCast(5);
0048c1f0      
0048c201      this->m_pSquelchListBox = eax_7;
0048c207      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x10000540);
0048c20e      class UIElement_Text* eax_9;
0048c20e      
0048c20e      if (eax_8 == 0)
0048c21e          eax_9 = nullptr;
0048c20e      else
0048c216          eax_9 = eax_8->vtable->DynamicCast(0xc);
0048c216      
0048c220      this->m_pSquelchNameEditBox = eax_9;
0048c226      GlobalEventHandler::GetGlobalEventHandler()->vtable->RegisterNoticeHandler(0x4dd27c, &this->vtable);
0048c160  }


0048c240  void __fastcall gmSquelchUI::UpdateButtons(class gmSquelchUI* this)

0048c240  {
0048c244      class UIElement_ListBox* m_pSquelchListBox = this->m_pSquelchListBox;
0048c24b      uint32_t m_num = m_pSquelchListBox->m_listItems.m_num;
0048c251      uint32_t eax = 0;
0048c251      
0048c255      if (m_num <= 0)
0048c255      {
0048c26f      label_48c26f:
0048c26f          eax = 0xffffffff;
0048c255      }
0048c255      else
0048c255      {
0048c25d          int32_t* m_data = m_pSquelchListBox->m_listItems.m_data;
0048c25d          
0048c265          while (*(uint32_t*)m_data != m_pSquelchListBox->m_pSelectedItem)
0048c265          {
0048c267              eax += 1;
0048c268              m_data = &m_data[1];
0048c268              
0048c26d              if (eax >= m_num)
0048c26d                  goto label_48c26f;
0048c265          }
0048c255      }
0048c255      
0048c273      class UIElement* eax_1 = UIElement_ListBox::GetItem(m_pSquelchListBox, eax);
0048c282      struct UIElement_Button::VTable* vtable = this->m_pRemoveButton->vtable;
0048c282      
0048c284      if (eax_1 == 0)
0048c2ae          vtable->SetState(0xd);
0048c284      else
0048c284      {
0048c288          vtable->SetState(1);
0048c295          class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x10000542);
0048c295          
0048c29c          if (eax_2 != 0)
0048c29e              eax_2->vtable->DynamicCast(0xc);
0048c284      }
0048c284      
0048c2c1      struct UIElement_Button::VTable* vtable_1 = this->m_pSquelchCharacterButton->vtable;
0048c2c1      
0048c2c3      if (this->m_squelchList._num_elements < 0x32)
0048c2c3      {
0048c2c7          vtable_1->SetState(1);
0048c2cd          this->m_pSquelchAccountButton->vtable->SetState(1);
0048c2e0          return;
0048c2c3      }
0048c2c3      
0048c2e3      vtable_1->SetState(0xd);
0048c2e9      this->m_pSquelchAccountButton->vtable->SetState(0xd);
0048c240  }

0048c2fd                                                                                         90 90 90                               ...

0048c300  class UIElement* __thiscall gmSquelchUI::FindSortedInsertPosition(class gmSquelchUI* this, class PStringBase<unsigned short> const* arg2, uint8_t arg3)

0048c300  {
0048c304      class gmSquelchUI* this_1 = this;
0048c306      class UIElement_ListBox* m_pSquelchListBox = this_1->m_pSquelchListBox;
0048c314      uint32_t i = 0;
0048c319      class gmSquelchUI* this_2 = this_1;
0048c31d      uint32_t i_1 = 0;
0048c31d      
0048c321      if (m_pSquelchListBox->m_listItems.m_num > 0)
0048c321      {
0048c327          class PStringBase<unsigned short>* ebp_1 = arg2;
0048c327          
0048c3bd          do
0048c3bd          {
0048c331              class UIElement* result = UIElement_ListBox::GetItem(m_pSquelchListBox, i);
0048c331              
0048c33a              if (result != 0)
0048c33a              {
0048c343                  class UIElement* eax_1 = UIElement::GetChildRecursive(result, 0x10000542);
0048c34a                  class UIElement_Text* eax_2;
0048c34a                  
0048c34a                  if (eax_1 == 0)
0048c35a                      eax_2 = nullptr;
0048c34a                  else
0048c352                      eax_2 = eax_1->vtable->DynamicCast(0xc);
0048c352                  
0048c368                  class PSRefBufferCharData<unsigned short>* m_charbuffer = UIElement_Text::GetText(eax_2, &arg2)->m_charbuffer;
0048c37e                  this_1 = wcscmp(ebp_1->m_charbuffer, m_charbuffer) < 0;
0048c381                  void* __offset(PStringBase<unsigned short>, -0x14) esi_1 = &arg2[-5];
0048c381                  
0048c394                  if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0048c39c                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0048c39c                  
0048c3a0                  if (this_1 != 0)
0048c3d8                      return result;
0048c3d8                  
0048c3a2                  this_1 = this_2;
0048c3a6                  i = i_1;
0048c33a              }
0048c33a              
0048c3aa              m_pSquelchListBox = this_1->m_pSquelchListBox;
0048c3b6              i += 1;
0048c3b9              i_1 = i;
0048c3bd          } while (i < m_pSquelchListBox->m_listItems.m_num);
0048c321      }
0048c321      
0048c3cc      return 0;
0048c300  }

0048c32d                                         8d 49 00                                                               .I.
0048c3db                                                                                   90 90 90 90 90                             .....

0048c3e0  uint8_t __thiscall gmSquelchUI::AddSquelchDisplay(class gmSquelchUI* this, class PStringBase<unsigned short> const* arg2, uint32_t arg3, uint8_t arg4)

0048c3e0  {
0048c3f0      class UIElement* eax = gmSquelchUI::FindSortedInsertPosition(this, arg2, arg4);
0048c3fe      class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(this->m_pSquelchListBox, 0, eax);
0048c40c      class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x10000542);
0048c40c      
0048c413      if (eax_2 != 0)
0048c413      {
0048c421          class UIElement_Text* edi_1 = eax_2->vtable->DynamicCast(0xc);
0048c421          
0048c425          if (edi_1 != 0)
0048c425          {
0048c42a              UIElement_Text::SetText(edi_1, arg2);
0048c43b              UIElement::SetAttribute_InstanceID(eax_1, 0x1000008f, arg3);
0048c43b              
0048c444              if (arg4 != 0)
0048c444              {
0048c446                  edi_1->vtable->SetState(0x10000057);
0048c456                  int32_t eax_4;
0048c456                  eax_4 = 1;
0048c459                  return 1;
0048c444              }
0048c444              
0048c45c              edi_1->vtable->SetState(0x10000056);
0048c46c              int32_t eax_6;
0048c46c              eax_6 = 1;
0048c46f              return 1;
0048c425          }
0048c413      }
0048c413      
0048c475      eax_2 = 0;
0048c478      return 0;
0048c3e0  }

0048c47b                                                                                   90 90 90 90 90                             .....

0048c480  void* __thiscall PList<unsigned long>::`vector deleting destructor'(class PList<unsigned long>* this, uint32_t arg2)

0048c480  {
0048c483      /* tailcall */
0048c483      return PList<unsigned long>::`scalar deleting destructor'(((char*)this - 0x10), arg2);
0048c480  }

0048c488                          cc cc cc cc cc cc cc cc                                                          ........

0048c490  uint32_t __thiscall PList<unsigned long>::Pack(class PList<unsigned long>* this, void** arg2, uint32_t arg3)

0048c490  {
0048c496      int32_t result = this->vtable->GetPackSize();
0048c496      
0048c49f      if (arg3 >= result)
0048c49f      {
0048c4ab          **(uint32_t**)arg2 = this->vtable;
0048c4af          void* edi_3 = (*(uint32_t*)arg2 + 4);
0048c4b2          *(uint32_t*)arg2 = edi_3;
0048c4b2          
0048c4b9          for (int32_t* i = *(int32_t*)((char*)this + -0xc); i != 0; i = i[1])
0048c4b9          {
0048c4c3              if (arg3 >= 4)
0048c4c3              {
0048c4c7                  *(uint32_t*)edi_3 = *(uint32_t*)i;
0048c4cb                  void* esi_3 = (*(uint32_t*)arg2 + 4);
0048c4ce                  *(uint32_t*)arg2 = esi_3;
0048c4d0                  edi_3 = esi_3;
0048c4c3              }
0048c4c3              
0048c4d4              if (i == 0)
0048c4d4                  break;
0048c4b9          }
0048c49f      }
0048c49f      
0048c4e0      return result;
0048c490  }

0048c4bd                                                                                         8d 49 00                               .I.
0048c4e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0048c4f0  uint32_t __fastcall PList<unsigned long>::GetPackSize(class PList<unsigned long>* this)

0048c4f0  {
0048c4f0      void* i = *(int32_t*)((char*)this + -0xc);
0048c4f5      int32_t result = 4;
0048c4f5      
0048c4fa      for (; i != 0; i = *(uint32_t*)((char*)i + 4))
0048c4fa      {
0048c500          result += 4;
0048c500          
0048c505          if (i == 0)
0048c505              break;
0048c4fa      }
0048c4fa      
0048c50e      return result;
0048c4f0  }

0048c50f                                               90                                                                 .

0048c510  int32_t __thiscall PList<unsigned long>::UnPack(class PList<unsigned long>* this, void** arg2, uint32_t arg3)

0048c510  {
0048c510      class PList<unsigned long>* this_1 = this;
0048c512      uint32_t edi = arg3;
0048c512      
0048c519      if (edi < 4)
0048c51f          return 0;
0048c51f      
0048c525      void** esi = arg2;
0048c529      void* ebp = *(uint32_t*)esi;
0048c530      List<StringTableMetaLanguage::Node const *>::flush(&this[0]);
0048c535      void* eax_1 = *(uint32_t*)esi;
0048c537      int32_t ecx_2 = *(uint32_t*)eax_1;
0048c542      *(uint32_t*)esi = ((char*)eax_1 + 4);
0048c544      arg3 = 0;
0048c544      
0048c54c      if (ecx_2 > 0)
0048c54c      {
0048c58d          bool cond:1_1;
0048c58d          
0048c58d          do
0048c58d          {
0048c550              void* edx_1 = *(uint32_t*)esi;
0048c554              void* eax_4 = ((char*)edx_1 - ebp);
0048c561              int32_t eax_6;
0048c561              
0048c561              if ((edi > eax_4 && (edi - eax_4) >= 4))
0048c561              {
0048c56f                  arg2 = *(uint32_t*)edx_1;
0048c573                  *(uint32_t*)esi = ((char*)edx_1 + 4);
0048c575                  eax_6 = AC1Legacy::List<unsigned long>::push_back(&this[0], &arg2);
0048c561              }
0048c561              
0048c57c              if (((edi <= eax_4 || (edi - eax_4) < 4) || eax_6 == 0))
0048c5a3                  return 0;
0048c5a3              
0048c587              cond:1_1 = (arg3 + 1) < ecx_2;
0048c589              arg3 += 1;
0048c58d          } while (cond:1_1);
0048c54c      }
0048c54c      
0048c599      return 1;
0048c510  }

0048c5a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0048c5b0  int32_t __thiscall AC1Legacy::List<unsigned long>::push_back(class AC1Legacy::List<unsigned long>* this, uint32_t const* arg2)

0048c5b0  {
0048c5b5      void* eax = operator new(0xc);
0048c5b5      
0048c5c1      if (eax == 0)
0048c5eb          return 0;
0048c5eb      
0048c5c9      *(uint32_t*)eax = *(uint32_t*)arg2;
0048c5cb      *(uint32_t*)((char*)eax + 4) = 0;
0048c5ce      *(uint32_t*)((char*)eax + 8) = 0;
0048c5ce      
0048c5d4      if (this->_head == 0)
0048c5d4      {
0048c5d6          this->_head = eax;
0048c5d9          this->_tail = eax;
0048c5dc          this->_num_elements += 1;
0048c5e5          return 1;
0048c5d4      }
0048c5d4      
0048c5ee      class AC1Legacy::ListNode<unsigned long>* _tail = this->_tail;
0048c5f1      _tail->next = eax;
0048c5f4      *(uint32_t*)((char*)eax + 8) = _tail;
0048c5f7      this->_tail = eax;
0048c5fa      this->_num_elements += 1;
0048c603      return 1;
0048c5b0  }

0048c606                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0048c610  void* __thiscall AC1Legacy::List<unsigned long>::`scalar deleting destructor'(class AC1Legacy::List<unsigned long>* this, uint32_t arg2)

0048c610  {
0048c613      this->vtable = 0x7a4110;
0048c619      List<StringTableMetaLanguage::Node const *>::flush(this);
0048c619      
0048c623      if ((arg2 & 1) != 0)
0048c626          operator delete(this);
0048c626      
0048c631      return this;
0048c610  }

0048c634                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0048c640  void* __thiscall PList<unsigned long>::`scalar deleting destructor'(class PList<unsigned long>* this, uint32_t arg2)

0048c640  {
0048c643      this->vtable = &PList<unsigned long>::`vftable';
0048c64a      this->vtable = &PackObj::`vftable';
0048c651      this->vtable = 0x7a4110;
0048c657      List<StringTableMetaLanguage::Node const *>::flush(this);
0048c657      
0048c661      if ((arg2 & 1) != 0)
0048c664          operator delete(this);
0048c664      
0048c66f      return this;
0048c640  }

0048c672                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0048c680  void __fastcall FriendData::~FriendData(class FriendData* this)

0048c680  {
0048c687      this->vtable = 0x7a4128;
0048c683      this->m_friendOfList.vtable = &PList<unsigned long>::`vftable';
0048c683      this->m_friendOfList.vtable = &PackObj::`vftable';
0048c683      this->m_friendOfList.vtable = 0x7a4110;
0048c6a2      List<StringTableMetaLanguage::Node const *>::flush(&this->m_friendOfList);
0048c6a7      this->m_friendsList.vtable = &PList<unsigned long>::`vftable';
0048c6a7      this->m_friendsList.vtable = &PackObj::`vftable';
0048c6a7      this->m_friendsList.vtable = 0x7a4110;
0048c6ba      List<StringTableMetaLanguage::Node const *>::flush(&this->m_friendsList);
0048c6bf      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_name.m_buffer;
0048c6bf      
0048c6d2      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0048c6d4          m_buffer->vtable->__vecDelDtor(1);
0048c6d4      
0048c6dd      this->vtable = 0x79285c;
0048c680  }

0048c6e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0048c6f0  void* __thiscall FriendData::`scalar deleting destructor'(class FriendData* this, uint32_t arg2)

0048c6f0  {
0048c6f3      FriendData::~FriendData(this);
0048c6f3      
0048c6fd      if ((arg2 & 1) != 0)
0048c700          operator delete(this);
0048c700      
0048c70b      return this;
0048c6f0  }

0048c70e                                            90 90                                                                ..

0048c710  uint8_t __fastcall gmSquelchUI::RefreshSquelchDisplay(class gmSquelchUI* this)

0048c710  {
0048c71e      UIElement_ListBox::Flush(this->m_pSquelchListBox);
0048c72d      UIElement_ListBox::SetSelectedItem(this->m_pSquelchListBox, nullptr, 1);
0048c73b      int32_t* var_c;
0048c73b      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, &data_7928af);
0048c740      gmCCommunicationSystem::StartSquelchIteration();
0048c754      int32_t (* const ebx)() = InterlockedDecrement;
0048c75f      int32_t var_8;
0048c75f      
0048c75f      if (gmCCommunicationSystem::NextSquelchIteration(&var_c, &var_8) != 0)
0048c75f      {
0048c7b9          int32_t i;
0048c7b9          
0048c7b9          do
0048c7b9          {
0048c76b              uint8_t edx_1 = var_8 != 0;
0048c77b              class PStringBase<unsigned short> var_4;
0048c77b              class PStringBase<unsigned short>* eax_4;
0048c77b              eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &var_c[5]);
0048c783              gmSquelchUI::AddSquelchDisplay(this, eax_4, 0, edx_1);
0048c78c              int32_t* esi_2 = (var_4 - 0x14);
0048c78c              
0048c79b              if ((ebx(&esi_2[1]) == 0 && esi_2 != 0))
0048c7a3                  **(uint32_t**)esi_2(1);
0048c7a3              
0048c7af              i = gmCCommunicationSystem::NextSquelchIteration(&var_c, &var_8);
0048c7b9          } while (i != 0);
0048c75f      }
0048c75f      
0048c7bd      gmSquelchUI::UpdateButtons(this);
0048c7c2      int32_t* esi_3 = var_c;
0048c7c2      
0048c7d2      if ((ebx(&esi_3[1]) == 0 && esi_3 != 0))
0048c7da          **(uint32_t**)esi_3(1);
0048c7da      
0048c7de      int32_t eax_6;
0048c7de      eax_6 = 1;
0048c7e4      return 1;
0048c710  }

0048c7e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0048c7f0  void __fastcall PStringBase<char>::PStringBase<char>(class PStringBase<char>* this, enum _WidthConvert arg2, class PStringBase<unsigned short> const* arg3)

0048c7f0  {
0048c7f0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0048c7f6      class PSRefBufferCharData<char>** this_1 = this;
0048c7ff      *(uint32_t*)this_1 = PStringBase<char>::s_NullBuffer_1;
0048c801      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0048c817      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<unsigned short>::to_spstring(arg3, &arg3, 0)->m_charbuffer;
0048c819      int32_t ecx_3 = m_charbuffer->m_data[-4];
0048c819      
0048c81f      if (ecx_3 != 1)
0048c826          PStringBase<char>::append_n_chars(this_1, m_charbuffer, (ecx_3 - 1));
0048c826      
0048c82f      void* __offset(PStringBase<unsigned short>, -0x14) edi_1 = &arg3[-5];
0048c82f      
0048c842      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0048c84a          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0048c7f0  }

0048c853                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0048c860  enum UIElementMessageListenResult __thiscall gmSquelchUI::ListenToElementMessage(class gmSquelchUI* this, struct UIElementMessageInfo const* arg2)

0048c860  {
0048c864      struct UIElementMessageInfo* ebp = arg2;
0048c864      
0048c880      switch ((ebp->idMessage - 1))
0048c880      {
0048c946          case nullptr:
0048c946          {
0048c946              uint32_t idElement = ebp->idElement;
0048c946              
0048c94e              if (idElement == 0x10000547)
0048c94e              {
0048ca3e                  class UIElement_ListBox* m_pSquelchListBox = this->m_pSquelchListBox;
0048ca4e                  class UIElement* eax_15 = UIElement_ListBox::GetItem(m_pSquelchListBox, UIElement_ListBox::GetSelectedIndex(m_pSquelchListBox));
0048ca4e                  
0048ca55                  if (eax_15 != 0)
0048ca55                  {
0048ca62                      class UIElement_Text* eax_16 = UIElement::<class UIElement_Text>::GetChildRecursiveTemplate(eax_15, 0x10000542);
0048ca70                      void __return_3;
0048ca70                      class PStringBase<unsigned short>* __saved_ebx_12;
0048ca70                      enum _WidthConvert edx_9;
0048ca70                      __saved_ebx_12 = UIElement_Text::GetText(eax_16, &__return_3);
0048ca75                      class PStringBase<unsigned short>* __saved_ebx_8 = __saved_ebx_12;
0048ca7c                      PStringBase<char>::PStringBase<char>(&arg2, edx_9, nullptr);
0048ca85                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_3);
0048ca94                      void* ecx_31;
0048ca94                      
0048ca94                      if (eax_16->m_state != 0x10000057)
0048ca94                      {
0048cac2                          void var_14;
0048cac2                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_14, arg2);
0048cad2                          CM_Communication::Event_ModifyCharacterSquelch(0, 0, &var_14, 1);
0048cada                          ecx_31 = &var_14;
0048ca94                      }
0048ca94                      else
0048ca94                      {
0048ca9f                          void var_18;
0048ca9f                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_18, arg2);
0048caab                          CM_Communication::Event_ModifyAccountSquelch(0, &var_18);
0048cab3                          ecx_31 = &var_18;
0048ca94                      }
0048ca94                      
0048cade                      AC1Legacy::PStringBase<char>::~PStringBase<char>(ecx_31);
0048cae7                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0048ca55                  }
0048c94e              }
0048c94e              else if (idElement == 0x1000054b)
0048c957              {
0048c9e6                  void __return_2;
0048c9e6                  PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pSquelchNameEditBox, &__return_2), &arg2, 0);
0048c9ef                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_2);
0048c9fd                  void var_1c;
0048c9fd                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c, arg2);
0048ca0d                  CM_Communication::Event_ModifyCharacterSquelch(1, 0, &var_1c, 1);
0048ca19                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c);
0048ca24                  UIElement_Text::ClearAllText(this->m_pSquelchNameEditBox);
0048ca29                  this->m_pSquelchCharacterButton->vtable->SetState(0xd);
0048cae7                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0048c957              }
0048c957              else if (idElement == 0x1000054c)
0048c95a              {
0048c979                  void __return_1;
0048c979                  PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pSquelchNameEditBox, &__return_1), &arg2, 0);
0048c982                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0048c990                  void var_20;
0048c990                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_20, arg2);
0048c99c                  CM_Communication::Event_ModifyAccountSquelch(1, &var_20);
0048c9a8                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_20);
0048c9b3                  UIElement_Text::ClearAllText(this->m_pSquelchNameEditBox);
0048c9b8                  this->m_pSquelchAccountButton->vtable->SetState(0xd);
0048cae7                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0048c95a              }
0048c946              break;
0048c946          }
0048c889          case 3:
0048c889          case 0x42:
0048c889          {
0048c889              gmSquelchUI::UpdateButtons(this);
0048c889              break;
0048c889          }
0048c8a6          case 0x11:
0048c8a6          case 0x43:
0048c8a6          {
0048c8a6              if (this->m_squelchList._num_elements < 0x32)
0048c8a6              {
0048c8c7                  void* __return;
0048c8c7                  int32_t ebx;
0048c8c7                  ebx = UIElement_Text::GetText(this->m_pSquelchNameEditBox, &__return)->m_charbuffer->m_data[0x7ffffffffffffffe] == 1;
0048c8ca                  int32_t* edi_2 = ((char*)__return - 0x14);
0048c8ca                  
0048c8dd                  if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0048c8e5                      **(uint32_t**)edi_2(1);
0048c8e5                  
0048c8ed                  struct UIElement_Button::VTable* vtable = this->m_pSquelchCharacterButton->vtable;
0048c8ed                  
0048c8f2                  if (ebx != 0)
0048c8f2                  {
0048c8f6                      vtable->SetState(0xd);
0048c8fc                      this->m_pSquelchAccountButton->vtable->SetState(0xd);
0048c91a                      return UIElement::ListenToElementMessage(this, ebp);
0048c8f2                  }
0048c8f2                  
0048c91f                  vtable->SetState(1);
0048c925                  this->m_pSquelchAccountButton->vtable->SetState(1);
0048c8a6              }
0048c8a6              break;
0048c8a6          }
0048c880      }
0048c880      
0048cafa      return UIElement::ListenToElementMessage(this, ebp);
0048c860  }

0048cafd                                                                                         8d 49 00                               .I.
0048cb00  uint32_t jump_table_48cb00[0x4] = 
0048cb00  {
0048cb00      [0x0] =  0x0048c946
0048cb04      [0x1] =  0x0048c887
0048cb08      [0x2] =  0x0048c89f
0048cb0c      [0x3] =  0x0048caec
0048cb10  }
0048cb10  uint8_t lookup_table_48cb10[0x44] = 
0048cb10  {
0048cb10      [0x00] =  0x00
0048cb11      [0x01] =  0x03
0048cb12      [0x02] =  0x03
0048cb13      [0x03] =  0x01
0048cb14      [0x04] =  0x03
0048cb15      [0x05] =  0x03
0048cb16      [0x06] =  0x03
0048cb17      [0x07] =  0x03
0048cb18      [0x08] =  0x03
0048cb19      [0x09] =  0x03
0048cb1a      [0x0a] =  0x03
0048cb1b      [0x0b] =  0x03
0048cb1c      [0x0c] =  0x03
0048cb1d      [0x0d] =  0x03
0048cb1e      [0x0e] =  0x03
0048cb1f      [0x0f] =  0x03
0048cb20      [0x10] =  0x03
0048cb21      [0x11] =  0x02
0048cb22      [0x12] =  0x03
0048cb23      [0x13] =  0x03
0048cb24      [0x14] =  0x03
0048cb25      [0x15] =  0x03
0048cb26      [0x16] =  0x03
0048cb27      [0x17] =  0x03
0048cb28      [0x18] =  0x03
0048cb29      [0x19] =  0x03
0048cb2a      [0x1a] =  0x03
0048cb2b      [0x1b] =  0x03
0048cb2c      [0x1c] =  0x03
0048cb2d      [0x1d] =  0x03
0048cb2e      [0x1e] =  0x03
0048cb2f      [0x1f] =  0x03
0048cb30      [0x20] =  0x03
0048cb31      [0x21] =  0x03
0048cb32      [0x22] =  0x03
0048cb33      [0x23] =  0x03
0048cb34      [0x24] =  0x03
0048cb35      [0x25] =  0x03
0048cb36      [0x26] =  0x03
0048cb37      [0x27] =  0x03
0048cb38      [0x28] =  0x03
0048cb39      [0x29] =  0x03
0048cb3a      [0x2a] =  0x03
0048cb3b      [0x2b] =  0x03
0048cb3c      [0x2c] =  0x03
0048cb3d      [0x2d] =  0x03
0048cb3e      [0x2e] =  0x03
0048cb3f      [0x2f] =  0x03
0048cb40      [0x30] =  0x03
0048cb41      [0x31] =  0x03
0048cb42      [0x32] =  0x03
0048cb43      [0x33] =  0x03
0048cb44      [0x34] =  0x03
0048cb45      [0x35] =  0x03
0048cb46      [0x36] =  0x03
0048cb47      [0x37] =  0x03
0048cb48      [0x38] =  0x03
0048cb49      [0x39] =  0x03
0048cb4a      [0x3a] =  0x03
0048cb4b      [0x3b] =  0x03
0048cb4c      [0x3c] =  0x03
0048cb4d      [0x3d] =  0x03
0048cb4e      [0x3e] =  0x03
0048cb4f      [0x3f] =  0x03
0048cb50      [0x40] =  0x03
0048cb51      [0x41] =  0x03
0048cb52      [0x42] =  0x01
0048cb53      [0x43] =  0x02
0048cb54  }

0048cb54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0048cb60  void __fastcall gmSquelchUI::RecvNotice_UpdateSquelchPanel(class gmSquelchUI* this)

0048cb60  {
0048cb66      /* tailcall */
0048cb66      return gmSquelchUI::RefreshSquelchDisplay(((char*)this - 0x5f8));
0048cb60  }

0048cb6b                                   90 90 90 90 90                                                             .....

0048cb70  void __fastcall AC1Legacy::List<FriendData>::flush(class AC1Legacy::List<FriendData>* this)

0048cb70  {
0048cb83      while (this->_head != 0)
0048cb83      {
0048cb8d          int32_t var_3c;
0048cb8d          FriendData::FriendData(&var_3c);
0048cb92          void* _head = this->_head;
0048cb92          
0048cb97          if (_head != 0)
0048cb97          {
0048cb99              class AC1Legacy::ListNode<FriendData>* eax_1 = *(uint32_t*)((char*)_head + 0x3c);
0048cb9e              this->_head = eax_1;
0048cb9e              
0048cba1              if (eax_1 == 0)
0048cba8                  this->_tail = nullptr;
0048cba1              else
0048cba3                  eax_1->prev = nullptr;
0048cba3              
0048cbb0              FriendData::operator=(&var_3c, _head);
0048cbb0              
0048cbb7              if (_head != 0)
0048cbb7              {
0048cbbb                  FriendData::~FriendData(_head);
0048cbc1                  operator delete(_head);
0048cbb7              }
0048cbb7              
0048cbc9              this->_num_elements -= 1;
0048cb97          }
0048cb97          
0048cbcc          void* i_3;
0048cbcc          void* i = i_3;
0048cbd5          var_3c = 0x7a4128;
0048cbdd          int32_t var_4_1 = 0x79285c;
0048cbe1          int32_t var_14_1 = 0x7a4110;
0048cbe1          
0048cbe7          while (i != 0)
0048cbe7          {
0048cbe9              void* i_4 = i;
0048cbeb              i = *(uint32_t*)((char*)i + 4);
0048cbf0              i_3 = i;
0048cbf0              
0048cbf4              if (i == 0)
0048cbff                  int32_t var_c_1 = 0;
0048cbf4              else
0048cbf4              {
0048cbf6                  *(uint32_t*)((char*)i + 8) = 0;
0048cbf9                  i = i_3;
0048cbf4              }
0048cbf4              
0048cc05              if (i_4 != 0)
0048cc05              {
0048cc08                  operator delete(i_4);
0048cc0d                  i = i_3;
0048cc05              }
0048cc05              
0048cc14              int32_t var_8 = (var_8 - 1);
0048cbe7          }
0048cbe7          
0048cc1a          void* i_2;
0048cc1a          void* i_1 = i_2;
0048cc1e          int32_t var_18_1 = 0x79285c;
0048cc22          int32_t var_28_1 = 0x7a4110;
0048cc22          
0048cc28          while (i_1 != 0)
0048cc28          {
0048cc2a              void* i_5 = i_1;
0048cc2c              i_1 = *(uint32_t*)((char*)i_1 + 4);
0048cc31              i_2 = i_1;
0048cc31              
0048cc35              if (i_1 == 0)
0048cc40                  int32_t var_20_1 = 0;
0048cc35              else
0048cc35              {
0048cc37                  *(uint32_t*)((char*)i_1 + 8) = 0;
0048cc3a                  i_1 = i_2;
0048cc35              }
0048cc35              
0048cc46              if (i_5 != 0)
0048cc46              {
0048cc49                  operator delete(i_5);
0048cc4e                  i_1 = i_2;
0048cc46              }
0048cc46              
0048cc55              int32_t var_1c = (var_1c - 1);
0048cc28          }
0048cc28          
0048cc6f          int32_t* var_34;
0048cc6f          
0048cc6f          if ((InterlockedDecrement(&var_34[1]) == 0 && var_34 != 0))
0048cc77              **(uint32_t**)var_34(1);
0048cc77          
0048cc79          var_3c = 0x79285c;
0048cb83      }
0048cb70  }

0048cc8a                                90 90 90 90 90 90                                                            ......

0048cc90  void* __thiscall PList<FriendData>::`vector deleting destructor'(class PList<FriendData>* this, uint32_t arg2)

0048cc90  {
0048cc93      /* tailcall */
0048cc93      return PList<FriendData>::`scalar deleting destructor'(((char*)this - 0x10), arg2);
0048cc90  }

0048cc98                                                                          cc cc cc cc cc cc cc cc                          ........

0048cca0  uint32_t __thiscall PList<FriendData>::Pack(class PList<FriendData>* this, void** arg2, uint32_t arg3)

0048cca0  {
0048cca7      int32_t result = this->vtable->GetPackSize();
0048cca7      
0048ccb2      if (arg3 >= result)
0048ccb2      {
0048ccbe          **(uint32_t**)arg2 = this->vtable;
0048ccc0          *(uint32_t*)arg2 += 4;
0048ccc0          
0048ccc8          for (int32_t* i = *(int32_t*)((char*)this + -0xc); i != 0; i = i[0xf])
0048ccd6              *(uint32_t*)(*(uint32_t*)i + 0xc)(arg2, arg3);
0048ccb2      }
0048ccb2      
0048cce6      return result;
0048cca0  }

0048cce9                             90 90 90 90 90 90 90                                                           .......

0048ccf0  uint32_t __fastcall PList<FriendData>::GetPackSize(class PList<FriendData>* this)

0048ccf0  {
0048ccf0      class PList<FriendData>* this_1 = this;
0048ccf2      int32_t* i = *(int32_t*)((char*)this + -0xc);
0048ccf8      int32_t result = 4;
0048ccfd      this_1 = nullptr;
0048ccfd      
0048cd05      while (i != 0)
0048cd05      {
0048cd12          int32_t eax_2 = *(uint32_t*)(*(uint32_t*)i + 0xc)(&this_1, 0);
0048cd15          i = i[0xf];
0048cd18          result += eax_2;
0048cd05      }
0048cd05      
0048cd23      return result;
0048ccf0  }

0048cd24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0048cd30  int32_t __thiscall PList<FriendData>::UnPack(class PList<FriendData>* this, void** arg2, uint32_t arg3)

0048cd30  {
0048cd3a      if (arg3 < 4)
0048cd41          return 0;
0048cd41      
0048cd47      void** esi = arg2;
0048cd4b      void* ebx = *(uint32_t*)esi;
0048cd53      AC1Legacy::List<FriendData>::flush(&this[0]);
0048cd58      void* eax_1 = *(uint32_t*)esi;
0048cd5a      int32_t edi = *(uint32_t*)eax_1;
0048cd63      *(uint32_t*)esi = ((char*)eax_1 + 4);
0048cd65      int32_t var_3c;
0048cd65      FriendData::FriendData(&var_3c);
0048cd6c      arg2 = nullptr;
0048cd6c      
0048cd74      if (edi > 0)
0048cd74      {
0048cdb4          bool cond:1_1;
0048cdb4          
0048cdb4          do
0048cdb4          {
0048cd7c              void* eax_4 = (*(uint32_t*)esi - ebx);
0048cd80              void* ecx_3;
0048cd80              
0048cd80              if (arg3 <= eax_4)
0048cd86                  ecx_3 = nullptr;
0048cd80              else
0048cd82                  ecx_3 = (arg3 - eax_4);
0048cd82              
0048cd92              int32_t eax_6 = *(uint32_t*)(var_3c + 0x10)(esi, ecx_3);
0048cd97              int32_t eax_7;
0048cd97              
0048cd97              if (eax_6 != 0)
0048cda0                  eax_7 = AC1Legacy::List<FriendData>::push_back(&this[0], &var_3c);
0048cda0              
0048cda7              if ((eax_6 == 0 || eax_7 == 0))
0048cda7              {
0048cdd2                  FriendData::~FriendData(&var_3c);
0048cde0                  return 0;
0048cda7              }
0048cda7              
0048cdae              cond:1_1 = ((char*)arg2 + 1) < edi;
0048cdb0              arg2 += 1;
0048cdb4          } while (cond:1_1);
0048cd74      }
0048cd74      
0048cdba      FriendData::~FriendData(&var_3c);
0048cdcb      return 1;
0048cd30  }

0048cde3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0048cdf0  int32_t __thiscall AC1Legacy::List<FriendData>::push_back(class AC1Legacy::List<FriendData>* this, class FriendData const* arg2)

0048cdf0  {
0048cdf6      void* eax = operator new(0x44);
0048cdf6      
0048ce02      if (eax == 0)
0048ce40          return 0;
0048ce40      
0048ce0b      FriendData::FriendData(eax, arg2);
0048ce10      *(uint32_t*)((char*)eax + 0x3c) = 0;
0048ce17      *(uint32_t*)((char*)eax + 0x40) = 0;
0048ce17      
0048ce23      if (this->_head == 0)
0048ce23      {
0048ce28          uint32_t eax_4 = (this->_num_elements + 1);
0048ce29          this->_head = eax;
0048ce2c          this->_tail = eax;
0048ce2f          this->_num_elements = eax_4;
0048ce39          return 1;
0048ce23      }
0048ce23      
0048ce43      class AC1Legacy::ListNode<FriendData>* _tail = this->_tail;
0048ce46      _tail->next = eax;
0048ce49      *(uint32_t*)((char*)eax + 0x40) = _tail;
0048ce4f      uint32_t eax_8 = (this->_num_elements + 1);
0048ce50      this->_tail = eax;
0048ce53      this->_num_elements = eax_8;
0048ce5d      return 1;
0048cdf0  }


0048ce60  void* __thiscall AC1Legacy::List<FriendData>::`scalar deleting destructor'(class AC1Legacy::List<FriendData>* this, uint32_t arg2)

0048ce60  {
0048ce63      this->vtable = 0x7a410c;
0048ce69      AC1Legacy::List<FriendData>::flush(this);
0048ce69      
0048ce73      if ((arg2 & 1) != 0)
0048ce76          operator delete(this);
0048ce76      
0048ce81      return this;
0048ce60  }

0048ce84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0048ce90  void* __thiscall PList<FriendData>::`scalar deleting destructor'(class PList<FriendData>* this, uint32_t arg2)

0048ce90  {
0048ce93      this->vtable = &PList<class FriendData>::`vftable';
0048ce9a      this->vtable = &PackObj::`vftable';
0048cea1      this->vtable = 0x7a410c;
0048cea7      AC1Legacy::List<FriendData>::flush(this);
0048cea7      
0048ceb1      if ((arg2 & 1) != 0)
0048ceb4          operator delete(this);
0048ceb4      
0048cebf      return this;
0048ce90  }

0048cec2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0048ced0  void __thiscall gmSquelchUI::gmSquelchUI(class gmSquelchUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0048ced0  {
0048cedf      UIElement_Field::UIElement_Field(this, arg2, arg3);
0048cee4      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048cef0      __builtin_memset(&this->m_pSquelchCharacterButton, 0, 0x14);
0048cf0e      this->vtable = 0x7a4400;
0048cf14      this->vtable = &gmSquelchUI::`vftable';
0048cf1e      this->m_squelchList._head = nullptr;
0048cf24      this->m_squelchList._tail = nullptr;
0048cf2a      this->m_squelchList._num_elements = 0;
0048cf30      this->m_squelchList.vtable = &PackObj::`vftable';
0048cf3a      this->m_squelchList.vtable = 0x7a4150;
0048cf44      this->m_squelchList.vtable = &PList<class FriendData>::`vftable';
0048ced0  }

0048cf54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0048cf60  class UIElement* __thiscall gmSquelchUI::DynamicCast(class gmSquelchUI* this, uint32_t arg2) __pure

0048cf60  {
0048cf6c      if (arg2 == 0x10000047)
0048cf79          return this;
0048cf79      
0048cf73      int32_t edx_1;
0048cf73      edx_1 = arg2 != 3;
0048cf77      return (this & (edx_1 - 1));
0048cf60  }

0048cf7c                                                                                      90 90 90 90                              ....

0048cf80  uint32_t gmSquelchUI::GetUIElementType(class gmSquelchUI const* this @ ecx) __pure

0048cf80  {
0048cf85      return 0x10000047;
0048cf80  }

0048cf86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0048cf90  void __fastcall gmSquelchUI::~gmSquelchUI(class gmSquelchUI* this)

0048cf90  {
0048cf9a      this->vtable = 0x7a4400;
0048cf94      this->vtable = &gmSquelchUI::`vftable';
0048cfa6      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0048cfa6      
0048cfad      if (eax != 0)
0048cfaf          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0048cfaf      
0048cfb7      this->m_squelchList.vtable = &PList<class FriendData>::`vftable';
0048cfb7      this->m_squelchList.vtable = &PackObj::`vftable';
0048cfb7      this->m_squelchList.vtable = 0x7a410c;
0048cfd1      AC1Legacy::List<FriendData>::flush(&this->m_squelchList);
0048cf94      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048cfde      NoticeHandler::~NoticeHandler(&this->vtable);
0048cfe7      /* tailcall */
0048cfe7      return UIElement_Field::~UIElement_Field(this);
0048cf90  }

0048cfec                                      90 90 90 90                                                              ....

0048cff0  class UIElement* gmSquelchUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0048cff0  {
0048cff5      void* eax = operator new(0x624);
0048cff5      
0048cfff      if (eax == 0)
0048d015          return 0;
0048d015      
0048d012      return gmSquelchUI::gmSquelchUI(eax, arg1, arg2);
0048cff0  }

0048d016                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0048d020  void* __thiscall gmSquelchUI::`scalar deleting destructor'(class gmSquelchUI* this, uint32_t arg2)

0048d020  {
0048d023      gmSquelchUI::~gmSquelchUI(this);
0048d023      
0048d02d      if ((arg2 & 1) != 0)
0048d030          operator delete(this);
0048d030      
0048d03b      return this;
0048d020  }

0048d03e                                                                                            90 90                                ..

0048d040  void gmSquelchUI::Register()

0048d040  {
0048d04a      UIElement::RegisterElementClass(0x10000047, gmSquelchUI::Create);
0048d040  }

0048d053                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0048d060  uint8_t __fastcall gmFriendsUI::RemoveFriendDisplay(class gmFriendsUI* this, uint32_t arg2)

0048d060  {
0048d070      UIElement_ListBox::SetSelectedItem(this->m_pFriendsListBox, nullptr, 1);
0048d075      class UIElement_ListBox* m_pFriendsListBox = this->m_pFriendsListBox;
0048d081      uint32_t i = 0;
0048d081      
0048d085      if (m_pFriendsListBox->m_listItems.m_num > 0)
0048d085      {
0048d087          uint32_t ebp_1 = arg2;
0048d087          
0048d0ca          do
0048d0ca          {
0048d091              class UIElement* eax_1 = UIElement_ListBox::GetItem(m_pFriendsListBox, i);
0048d091              
0048d09a              if (eax_1 != 0)
0048d09a              {
0048d0a8                  arg2 = 0;
0048d0b0                  UIElement::GetAttribute_InstanceID(eax_1, 0x10000085, &arg2);
0048d0b0                  
0048d0b9                  if (ebp_1 == arg2)
0048d0b9                  {
0048d0dc                      UIElement_ListBox::DeleteItem(this->m_pFriendsListBox, eax_1);
0048d0e4                      int32_t eax_2;
0048d0e4                      eax_2 = 1;
0048d0e7                      return 1;
0048d0b9                  }
0048d09a              }
0048d09a              
0048d0bb              m_pFriendsListBox = this->m_pFriendsListBox;
0048d0c7              i += 1;
0048d0ca          } while (i < m_pFriendsListBox->m_listItems.m_num);
0048d085      }
0048d085      
0048d0cf      uint32_t eax;
0048d0cf      eax = 0;
0048d0d2      return 0;
0048d060  }

0048d08d                                         8d 49 00                                                               .I.
0048d0ea                                90 90 90 90 90 90                                                            ......

0048d0f0  void __fastcall gmFriendsUI::PostInit(class gmFriendsUI* this)

0048d0f0  {
0048d0f4      UIElement::PostInit(this);
0048d100      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000514);
0048d107      class UIElement_Button* eax_1;
0048d107      
0048d107      if (eax == 0)
0048d117          eax_1 = nullptr;
0048d107      else
0048d10f          eax_1 = eax->vtable->DynamicCast(1);
0048d10f      
0048d120      this->m_pAddButton = eax_1;
0048d126      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x10000515);
0048d12d      class UIElement_Button* eax_3;
0048d12d      
0048d12d      if (eax_2 == 0)
0048d13d          eax_3 = nullptr;
0048d12d      else
0048d135          eax_3 = eax_2->vtable->DynamicCast(1);
0048d135      
0048d146      this->m_pRemoveButton = eax_3;
0048d14c      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000516);
0048d153      class UIElement_Button* eax_5;
0048d153      
0048d153      if (eax_4 == 0)
0048d163          eax_5 = nullptr;
0048d153      else
0048d15b          eax_5 = eax_4->vtable->DynamicCast(1);
0048d15b      
0048d16c      this->m_pTellButton = eax_5;
0048d172      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x10000517);
0048d179      class UIElement_ListBox* eax_7;
0048d179      
0048d179      if (eax_6 == 0)
0048d189          eax_7 = nullptr;
0048d179      else
0048d181          eax_7 = eax_6->vtable->DynamicCast(5);
0048d181      
0048d192      this->m_pFriendsListBox = eax_7;
0048d198      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x1000051b);
0048d19f      class UIElement_Text* eax_9;
0048d19f      
0048d19f      if (eax_8 == 0)
0048d1af          eax_9 = nullptr;
0048d19f      else
0048d1a7          eax_9 = eax_8->vtable->DynamicCast(0xc);
0048d1a7      
0048d1b8      this->m_pFriendNameEditBox = eax_9;
0048d1be      class UIElement* eax_10;
0048d1be      enum PlayerOption edx_6;
0048d1be      eax_10 = UIElement::GetChildRecursive(this, 0x1000052c);
0048d1c5      void* eax_11;
0048d1c5      
0048d1c5      if (eax_10 != 0)
0048d1d0          eax_11 = eax_10->vtable->DynamicCast(0x10000035);
0048d1d0      
0048d1d8      class UIOption_Checkbox* ecx_12;
0048d1d8      
0048d1d8      if ((eax_10 == 0 || eax_11 == 0))
0048d1df          ecx_12 = nullptr;
0048d1d8      else
0048d1da          ecx_12 = ((char*)eax_11 - 0x20);
0048d1da      
0048d1e1      int32_t var_c = 0x27;
0048d1e3      UIOption_Checkbox::SetPlayerOption(ecx_12, edx_6);
0048d1e8      class GlobalEventHandler* eax_12 = GlobalEventHandler::GetGlobalEventHandler();
0048d1e8      
0048d1f1      if (eax_12 != 0)
0048d1f1      {
0048d1f3          eax_12->vtable->RegisterNoticeHandler(0x4dd26f, &this->vtable);
0048d206          eax_12->vtable->RegisterNoticeHandler(0x4dd272, &this->vtable);
0048d213          eax_12->vtable->RegisterNoticeHandler(0x4dd273, &this->vtable);
0048d220          eax_12->vtable->RegisterNoticeHandler(0x4dd274, &this->vtable);
0048d22d          eax_12->vtable->RegisterNoticeHandler(0x4dd275, &this->vtable);
0048d1f1      }
0048d0f0  }

0048d23d                                                                                         90 90 90                               ...

0048d240  uint8_t __thiscall gmFriendsUI::Request_AddFriend(class gmFriendsUI* this, class PStringBase<char> const* arg2)

0048d240  {
0048d247      if (this->m_friendsList._num_elements >= 0x32)
0048d247      {
0048d253          ECM_UI::SendNotice_DisplayWeenieError(0x561, &AC1Legacy::PStringBase<char>::null_string);
0048d25b          int32_t eax;
0048d25b          eax = 0;
0048d25d          return 0;
0048d247      }
0048d247      
0048d272      CM_Social::Event_AddFriend(AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, arg2->m_charbuffer));
0048d277      class PStringBase<char>* esi = arg2;
0048d277      
0048d28e      if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
0048d290          esi->m_charbuffer->m_data[0](1);
0048d290      
0048d298      int32_t eax_3;
0048d298      eax_3 = 1;
0048d29b      return 1;
0048d240  }

0048d29e                                                                                            90 90                                ..

0048d2a0  void __fastcall gmFriendsUI::UpdateButtons(class gmFriendsUI* this)

0048d2a0  {
0048d2a4      class UIElement_ListBox* m_pFriendsListBox = this->m_pFriendsListBox;
0048d2ab      uint32_t m_num = m_pFriendsListBox->m_listItems.m_num;
0048d2b1      uint32_t eax = 0;
0048d2b1      
0048d2b5      if (m_num <= 0)
0048d2b5      {
0048d2cf      label_48d2cf:
0048d2cf          eax = 0xffffffff;
0048d2b5      }
0048d2b5      else
0048d2b5      {
0048d2bd          int32_t* m_data = m_pFriendsListBox->m_listItems.m_data;
0048d2bd          
0048d2c5          while (*(uint32_t*)m_data != m_pFriendsListBox->m_pSelectedItem)
0048d2c5          {
0048d2c7              eax += 1;
0048d2c8              m_data = &m_data[1];
0048d2c8              
0048d2cd              if (eax >= m_num)
0048d2cd                  goto label_48d2cf;
0048d2c5          }
0048d2b5      }
0048d2b5      
0048d2d3      class UIElement* eax_1 = UIElement_ListBox::GetItem(m_pFriendsListBox, eax);
0048d2e2      struct UIElement_Button::VTable* vtable = this->m_pRemoveButton->vtable;
0048d2e2      
0048d2e4      if (eax_1 == 0)
0048d2e4      {
0048d32e          vtable->SetState(0xd);
0048d334          this->m_pTellButton->vtable->SetState(0xd);
0048d2e4      }
0048d2e4      else
0048d2e4      {
0048d2e8          vtable->SetState(1);
0048d2f5          class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x1000051a);
0048d2f5          
0048d2fc          if (eax_2 == 0)
0048d334              this->m_pTellButton->vtable->SetState(0xd);
0048d2fc          else
0048d2fc          {
0048d304              void* eax_3 = eax_2->vtable->DynamicCast(0xc);
0048d304              
0048d318              if ((eax_3 == 0 || *(uint32_t*)((char*)eax_3 + 0x400) != 0x10000054))
0048d334                  this->m_pTellButton->vtable->SetState(0xd);
0048d318              else
0048d31a                  this->m_pTellButton->vtable->SetState(1);
0048d2fc          }
0048d2e4      }
0048d2e4      
0048d34b      class UIElement_Button* m_pAddButton = this->m_pAddButton;
0048d34b      
0048d351      if (this->m_friendsList._num_elements < 0x32)
0048d351      {
0048d353          m_pAddButton->vtable->SetState(1);
0048d360          return;
0048d351      }
0048d351      
0048d361      m_pAddButton->vtable->SetState(0xd);
0048d2a0  }

0048d36f                                               90                                                                 .

0048d370  class UIElement* __thiscall gmFriendsUI::FindSortedInsertPosition(class gmFriendsUI* this, class PStringBase<unsigned short> const* arg2, uint8_t arg3)

0048d370  {
0048d374      class gmFriendsUI* this_1 = this;
0048d376      class UIElement_ListBox* m_pFriendsListBox = this_1->m_pFriendsListBox;
0048d384      uint32_t i = 0;
0048d389      class gmFriendsUI* this_2 = this_1;
0048d38d      uint32_t i_1 = 0;
0048d38d      
0048d391      if (m_pFriendsListBox->m_listItems.m_num > 0)
0048d391      {
0048d397          class PStringBase<unsigned short>* ebp_1 = arg2;
0048d397          
0048d45b          do
0048d45b          {
0048d3a1              class UIElement* result = UIElement_ListBox::GetItem(m_pFriendsListBox, i);
0048d3a1              
0048d3aa              if (result != 0)
0048d3aa              {
0048d3b7                  class UIElement* eax_1 = UIElement::GetChildRecursive(result, 0x1000051a);
0048d3be                  class UIElement_Text* eax_2;
0048d3be                  
0048d3be                  if (eax_1 == 0)
0048d3ce                      eax_2 = nullptr;
0048d3be                  else
0048d3c6                      eax_2 = eax_1->vtable->DynamicCast(0xc);
0048d3c6                  
0048d3d6                  uint32_t m_state = eax_2->m_state;
0048d3d6                  
0048d3dc                  if (arg3 != 0)
0048d3dc                  {
0048d3e4                      if (m_state != 0x10000055)
0048d3e4                          goto label_48d406;
0048d3e4                      
0048d3ef                      return result;
0048d3dc                  }
0048d3dc                  
0048d3f8                  if (m_state != 0x10000054)
0048d3f8                  {
0048d406                  label_48d406:
0048d406                      class PSRefBufferCharData<unsigned short>* m_charbuffer = UIElement_Text::GetText(eax_2, &arg2)->m_charbuffer;
0048d41c                      this_1 = wcscmp(ebp_1->m_charbuffer, m_charbuffer) < 0;
0048d41f                      void* __offset(PStringBase<unsigned short>, -0x14) esi_1 = &arg2[-5];
0048d41f                      
0048d432                      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0048d43a                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0048d43a                      
0048d43e                      if (this_1 != 0)
0048d3ef                          return result;
0048d3ef                      
0048d440                      i = i_1;
0048d444                      this_1 = this_2;
0048d3f8                  }
0048d3aa              }
0048d3aa              
0048d448              m_pFriendsListBox = this_1->m_pFriendsListBox;
0048d454              i += 1;
0048d457              i_1 = i;
0048d45b          } while (i < m_pFriendsListBox->m_listItems.m_num);
0048d391      }
0048d391      
0048d46a      return 0;
0048d370  }

0048d39d                                                                                         8d 49 00                               .I.
0048d46d                                         90 90 90                                                               ...

0048d470  void __thiscall gmFriendsUI::RecvNotice_ChatCommand_AddFriend(class gmFriendsUI* this, class PStringBase<char> const* arg2)

0048d470  {
0048d476      /* tailcall */
0048d476      return gmFriendsUI::Request_AddFriend(((char*)this - 0x5f8), arg2);
0048d470  }

0048d47b                                                                                   90 90 90 90 90                             .....

0048d480  uint8_t __thiscall gmFriendsUI::AddFriendDisplay(class gmFriendsUI* this, class PStringBase<unsigned short> const* arg2, uint32_t arg3, uint8_t arg4)

0048d480  {
0048d490      class UIElement* eax = gmFriendsUI::FindSortedInsertPosition(this, arg2, arg4);
0048d49e      class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(this->m_pFriendsListBox, 0, eax);
0048d4ac      class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x1000051a);
0048d4ac      
0048d4b3      if (eax_2 != 0)
0048d4b3      {
0048d4c1          class UIElement_Text* edi_1 = eax_2->vtable->DynamicCast(0xc);
0048d4c1          
0048d4c5          if (edi_1 != 0)
0048d4c5          {
0048d4ca              UIElement_Text::SetText(edi_1, arg2);
0048d4db              UIElement::SetAttribute_InstanceID(eax_1, 0x10000085, arg3);
0048d4db              
0048d4e4              if (arg4 != 0)
0048d4e4              {
0048d4e6                  edi_1->vtable->SetState(0x10000054);
0048d4f6                  int32_t eax_4;
0048d4f6                  eax_4 = 1;
0048d4f9                  return 1;
0048d4e4              }
0048d4e4              
0048d4fc              edi_1->vtable->SetState(0x10000055);
0048d50c              int32_t eax_6;
0048d50c              eax_6 = 1;
0048d50f              return 1;
0048d4c5          }
0048d4b3      }
0048d4b3      
0048d515      eax_2 = 0;
0048d518      return 0;
0048d480  }

0048d51b                                                                                   90 90 90 90 90                             .....

0048d520  enum UIElementMessageListenResult __thiscall gmFriendsUI::ListenToElementMessage(class gmFriendsUI* this, struct UIElementMessageInfo const* arg2)

0048d520  {
0048d524      struct UIElementMessageInfo* ebp = arg2;
0048d524      
0048d540      switch ((ebp->idMessage - 1))
0048d540      {
0048d5d4          case nullptr:
0048d5d4          {
0048d5d4              uint32_t idElement = ebp->idElement;
0048d5d4              
0048d5dc              if (idElement == 0x10000514)
0048d5dc              {
0048d6b9                  void __return_2;
0048d6b9                  PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pFriendNameEditBox, &__return_2), &arg2, 0);
0048d6c5                  gmFriendsUI::Request_AddFriend(this, &arg2);
0048d6ce                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0048d6d7                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_2);
0048d6e2                  UIElement_Text::ClearAllText(this->m_pFriendNameEditBox);
0048d6e7                  this->m_pAddButton->vtable->SetState(0xd);
0048d5dc              }
0048d5dc              else if (idElement == 0x10000515)
0048d5e3              {
0048d64c                  class UIElement_ListBox* m_pFriendsListBox_1 = this->m_pFriendsListBox;
0048d65c                  class UIElement* eax_18 = UIElement_ListBox::GetItem(m_pFriendsListBox_1, UIElement_ListBox::GetSelectedIndex(m_pFriendsListBox_1));
0048d65c                  
0048d663                  if (eax_18 != 0)
0048d663                  {
0048d675                      arg2 = nullptr;
0048d67d                      UIElement::GetAttribute_InstanceID(eax_18, 0x10000085, &arg2);
0048d687                      CM_Social::Event_RemoveFriend(arg2);
0048d663                  }
0048d5e3              }
0048d5e3              else if (idElement == 0x10000516)
0048d5e6              {
0048d5ec                  class UIElement_ListBox* m_pFriendsListBox = this->m_pFriendsListBox;
0048d5fc                  class UIElement* eax_13 = UIElement_ListBox::GetItem(m_pFriendsListBox, UIElement_ListBox::GetSelectedIndex(m_pFriendsListBox));
0048d5fc                  
0048d603                  if (eax_13 != 0)
0048d603                  {
0048d610                      class UIElement_Text* eax_14 = UIElement::<class UIElement_Text>::GetChildRecursiveTemplate(eax_13, 0x1000051a);
0048d610                      
0048d617                      if (eax_14 != 0)
0048d617                      {
0048d62a                          void __return_1;
0048d62a                          CM_UI::SendNotice_StartTell(UIElement_Text::GetText(eax_14, &__return_1));
0048d636                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0048d617                      }
0048d603                  }
0048d5e6              }
0048d5d4              break;
0048d5d4          }
0048d549          case 3:
0048d549          case 0x42:
0048d549          {
0048d549              gmFriendsUI::UpdateButtons(this);
0048d549              break;
0048d549          }
0048d566          case 0x11:
0048d566          case 0x43:
0048d566          {
0048d566              if (this->m_friendsList._num_elements < 0x32)
0048d566              {
0048d587                  void* __return;
0048d587                  int32_t ebx;
0048d587                  ebx = UIElement_Text::GetText(this->m_pFriendNameEditBox, &__return)->m_charbuffer->m_data[0x7ffffffffffffffe] == 1;
0048d58a                  int32_t* edi_2 = ((char*)__return - 0x14);
0048d58a                  
0048d59d                  if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0048d5a5                      **(uint32_t**)edi_2(1);
0048d5a5                  
0048d5a7                  class UIElement_Button* m_pAddButton = this->m_pAddButton;
0048d5a7                  
0048d5b0                  if (ebx != 0)
0048d5b0                  {
0048d5b2                      m_pAddButton->vtable->SetState(0xd);
0048d5ca                      return UIElement::ListenToElementMessage(this, ebp);
0048d5b0                  }
0048d5b0                  
0048d6ef                  m_pAddButton->vtable->SetState(1);
0048d566              }
0048d566              break;
0048d566          }
0048d540      }
0048d540      
0048d705      return UIElement::ListenToElementMessage(this, ebp);
0048d520  }

0048d708  uint32_t jump_table_48d708[0x4] = 
0048d708  {
0048d708      [0x0] =  0x0048d5d4
0048d70c      [0x1] =  0x0048d547
0048d710      [0x2] =  0x0048d55f
0048d714      [0x3] =  0x0048d6f7
0048d718  }
0048d718  uint8_t lookup_table_48d718[0x44] = 
0048d718  {
0048d718      [0x00] =  0x00
0048d719      [0x01] =  0x03
0048d71a      [0x02] =  0x03
0048d71b      [0x03] =  0x01
0048d71c      [0x04] =  0x03
0048d71d      [0x05] =  0x03
0048d71e      [0x06] =  0x03
0048d71f      [0x07] =  0x03
0048d720      [0x08] =  0x03
0048d721      [0x09] =  0x03
0048d722      [0x0a] =  0x03
0048d723      [0x0b] =  0x03
0048d724      [0x0c] =  0x03
0048d725      [0x0d] =  0x03
0048d726      [0x0e] =  0x03
0048d727      [0x0f] =  0x03
0048d728      [0x10] =  0x03
0048d729      [0x11] =  0x02
0048d72a      [0x12] =  0x03
0048d72b      [0x13] =  0x03
0048d72c      [0x14] =  0x03
0048d72d      [0x15] =  0x03
0048d72e      [0x16] =  0x03
0048d72f      [0x17] =  0x03
0048d730      [0x18] =  0x03
0048d731      [0x19] =  0x03
0048d732      [0x1a] =  0x03
0048d733      [0x1b] =  0x03
0048d734      [0x1c] =  0x03
0048d735      [0x1d] =  0x03
0048d736      [0x1e] =  0x03
0048d737      [0x1f] =  0x03
0048d738      [0x20] =  0x03
0048d739      [0x21] =  0x03
0048d73a      [0x22] =  0x03
0048d73b      [0x23] =  0x03
0048d73c      [0x24] =  0x03
0048d73d      [0x25] =  0x03
0048d73e      [0x26] =  0x03
0048d73f      [0x27] =  0x03
0048d740      [0x28] =  0x03
0048d741      [0x29] =  0x03
0048d742      [0x2a] =  0x03
0048d743      [0x2b] =  0x03
0048d744      [0x2c] =  0x03
0048d745      [0x2d] =  0x03
0048d746      [0x2e] =  0x03
0048d747      [0x2f] =  0x03
0048d748      [0x30] =  0x03
0048d749      [0x31] =  0x03
0048d74a      [0x32] =  0x03
0048d74b      [0x33] =  0x03
0048d74c      [0x34] =  0x03
0048d74d      [0x35] =  0x03
0048d74e      [0x36] =  0x03
0048d74f      [0x37] =  0x03
0048d750      [0x38] =  0x03
0048d751      [0x39] =  0x03
0048d752      [0x3a] =  0x03
0048d753      [0x3b] =  0x03
0048d754      [0x3c] =  0x03
0048d755      [0x3d] =  0x03
0048d756      [0x3e] =  0x03
0048d757      [0x3f] =  0x03
0048d758      [0x40] =  0x03
0048d759      [0x41] =  0x03
0048d75a      [0x42] =  0x01
0048d75b      [0x43] =  0x02
0048d75c  }

0048d75c                                                                                      90 90 90 90                              ....

0048d760  void __fastcall gmFriendsUI::RecvNotice_ChatCommand_DisplayFriends(class gmFriendsUI* this, uint8_t arg2)

0048d760  {
0048d770      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] == 0)
0048d770      {
0048d772          ClientUISystem::GetUISystem();
0048d796          ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, "Your friends list is empty!\n"), &arg2, 0, 1, 0);
0048d79f          int32_t* esi_3 = (arg2 - 0x14);
0048d79f          
0048d7b6          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0048d7c2              **(uint32_t**)esi_3(1);
0048d7c2          
0048d7b6          return;
0048d770      }
0048d770      
0048d7ce      int32_t ebp_1 = 0;
0048d7d0      ClientUISystem::GetUISystem();
0048d7e1      class PStringBase<unsigned short> var_2c;
0048d7e1      void* ebx_1;
0048d7e1      class ClientSystem* esi_5;
0048d7e1      ebx_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2c, WidthConvert, "Your friends:\n");
0048d7f1      ClientSystem::AddTextToScroll(esi_5, &var_2c, 0, 1, 0);
0048d800      int32_t* esi_7 = (var_2c - 0x14);
0048d800      
0048d80f      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
0048d817          **(uint32_t**)esi_7(1);
0048d817      
0048d819      class HashSetData<UIElement *>* ecx_8 = *(uint32_t*)((char*)ebx_1 + 0x10);
0048d822      uint32_t i = 0;
0048d826      uint32_t i_1 = 0;
0048d826      
0048d82a      if (*(int32_t*)((char*)ecx_8 + 0x610) <= 0)
0048d82a      {
0048da67      label_48da67:
0048da67          ClientUISystem::GetUISystem();
0048da8b          ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, "  You have no friends that are o…"), &arg2, 0, 1, 0);
0048da94          int32_t* esi_29 = (arg2 - 0x14);
0048da94          
0048daa3          if ((InterlockedDecrement(&esi_29[1]) == 0 && esi_29 != 0))
0048daab              **(uint32_t**)esi_29(1);
0048daab          
0048daa3          return;
0048d82a      }
0048d82a      
0048da5d      do
0048da5d      {
0048d837          class UIElement* eax_5 = UIElement_ListBox::GetItem(ecx_8, i);
0048d837          
0048d83e          if (eax_5 != 0)
0048d83e          {
0048d84b              class UIElement* eax_6 = UIElement::GetChildRecursive(eax_5, 0x1000051a);
0048d852              class UIElement* esi_8;
0048d852              
0048d852              if (eax_6 == 0)
0048d864                  esi_8 = nullptr;
0048d852              else
0048d860                  esi_8 = eax_6->vtable->DynamicCast(0xc);
0048d860              
0048d870              void* esi_18;
0048d870              
0048d870              if (esi_8->m_state == 0x10000054)
0048d870              {
0048d87f                  void* var_24;
0048d87f                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_24, u" (Online)\n");
0048d88b                  void* __return;
0048d88b                  class PStringBase<unsigned short>* eax_7 = UIElement_Text::GetText(esi_8, &__return);
0048d8a1                  PStringBase<unsigned short>::allocate_ref_buffer(&var_2c, wcslen(&data_7a473c));
0048d8b0                  int32_t __return_3;
0048d8b0                  class PStringBase<unsigned short>* edx_5;
0048d8b0                  __return_3 = wcscpy(var_2c, &data_7a473c);
0048d8b9                  class PStringBase<unsigned short>* var_40_5 = eax_7;
0048d8be                  class PStringBase<unsigned short> var_28;
0048d8be                  int32_t* var_44_3 = &var_28;
0048d8c3                  PStringBase<unsigned short>::operator+(&var_2c, __return_3, edx_5);
0048d8cc                  void* esi_11 = (var_2c - 0x14);
0048d8d3                  int32_t __return_4;
0048d8d3                  class PStringBase<unsigned short>* edx_6;
0048d8d3                  __return_4 = InterlockedDecrement(((char*)esi_11 + 4));
0048d8d3                  
0048d8db                  if ((__return_4 == 0 && esi_11 != 0))
0048d8e3                      __return_4 = **(uint32_t**)esi_11(1);
0048d8e3                  
0048d8e9                  int32_t* var_40_7 = &var_24;
0048d8ee                  void* var_20;
0048d8ee                  int32_t* var_44_4 = &var_20;
0048d8f3                  PStringBase<unsigned short>::operator+(&var_28, __return_4, edx_6);
0048d8fc                  int32_t* esi_13 = (var_28 - 0x14);
0048d8fc                  
0048d90b                  if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
0048d913                      **(uint32_t**)esi_13(1);
0048d913                  
0048d919                  int32_t* esi_15 = ((char*)__return - 0x14);
0048d919                  
0048d928                  if ((InterlockedDecrement(&esi_15[1]) == 0 && esi_15 != 0))
0048d930                      **(uint32_t**)esi_15(1);
0048d930                  
0048d936                  int32_t* esi_17 = ((char*)var_24 - 0x14);
0048d936                  
0048d945                  if ((InterlockedDecrement(&esi_17[1]) == 0 && esi_17 != 0))
0048d94d                      **(uint32_t**)esi_17(1);
0048d94d                  
0048d961                  ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &var_20, 0, 1, 0);
0048d966                  esi_18 = var_20;
0048d907                  goto label_48da32;
0048d870              }
0048d870              
0048d96f              eax_6 = arg2;
0048d96f              
0048d975              if (eax_6 == 0)
0048d975              {
0048d984                  void* var_1c;
0048d984                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1c, &data_79c288);
0048d98d                  int32_t* var_40_11 = &var_1c;
0048d992                  void* var_18;
0048d992                  void** var_44_5 = &var_18;
0048d9aa                  class PStringBase<unsigned short> __return_1;
0048d9aa                  class PStringBase<unsigned short> __return_2;
0048d9aa                  class PStringBase<unsigned short>* __return_5;
0048d9aa                  class PStringBase<unsigned short>* edx_11;
0048d9aa                  __return_5 = operator+(&__return_1, &data_7a473c, UIElement_Text::GetText(esi_8, &__return_2));
0048d9b4                  PStringBase<unsigned short>::operator+(__return_5, __return_5, edx_11);
0048d9bd                  int32_t* esi_20 = (__return_1 - 0x14);
0048d9bd                  
0048d9cc                  if ((InterlockedDecrement(&esi_20[1]) == 0 && esi_20 != 0))
0048d9d4                      **(uint32_t**)esi_20(1);
0048d9d4                  
0048d9da                  int32_t* esi_22 = (__return_2 - 0x14);
0048d9da                  
0048d9e9                  if ((InterlockedDecrement(&esi_22[1]) == 0 && esi_22 != 0))
0048d9f1                      **(uint32_t**)esi_22(1);
0048d9f1                  
0048d9f7                  int32_t* esi_24 = ((char*)var_1c - 0x14);
0048d9f7                  
0048da06                  if ((InterlockedDecrement(&esi_24[1]) == 0 && esi_24 != 0))
0048da0e                      **(uint32_t**)esi_24(1);
0048da0e                  
0048da22                  ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &var_18, 0, 1, 0);
0048da27                  esi_18 = var_18;
0048da32              label_48da32:
0048da32                  ebp_1 += 1;
0048da32                  
0048da3b                  if ((InterlockedDecrement(((char*)esi_18 - 0x10)) == 0 && esi_18 != 0x14))
0048da43                      **(uint32_t**)((char*)esi_18 - 0x14)(1);
0048d975              }
0048d83e          }
0048d83e          
0048da4d          ecx_8 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
0048da56          i = (i_1 + 1);
0048da59          i_1 = i;
0048da5d      } while (i < *(int32_t*)((char*)ecx_8 + 0x610));
0048da5d      
0048da65      if (ebp_1 == 0)
0048da65          goto label_48da67;
0048d760  }

0048dab7                                                                       90 90 90 90 90 90 90 90 90                         .........

0048dac0  void __thiscall gmFriendsUI::RecvNotice_ChatCommand_RemoveFriend(class gmFriendsUI* this, class PStringBase<char> const* arg2)

0048dac0  {
0048dacc      class gmFriendsUI* this_1 = this;
0048dad0      class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4];
0048dad4      class HashSetData<UIElement *>* var_44 = ecx;
0048dadd      class HashSetData<UIElement *>* ecx_1 = ecx;
0048dae2      class PStringBase<char> var_54;
0048dae2      void var_3c;
0048dae2      
0048dae2      while (true)
0048dae2      {
0048dae2          if (ecx_1 == 0)
0048dae2          {
0048dc1f              ECM_UI::SendNotice_DisplayWeenieError(0x563, &AC1Legacy::PStringBase<char>::null_string);
0048dc2e              return;
0048dae2          }
0048dae2          
0048daed          FriendData::FriendData(&var_3c, ecx_1);
0048db03          void* var_34;
0048db03          void* var_68_3 = PStringBase<char>::PStringBase<char>(&var_54, ((char*)var_34 + 0x14));
0048db08          void* eax_3 = operator new[](0x24);
0048db08          
0048db12          if (eax_3 != 0)
0048db12          {
0048db14              *(uint32_t*)((char*)eax_3 + 4) = 1;
0048db17              *(uint32_t*)eax_3 = 0x7ca074;
0048db1d              *(uint32_t*)((char*)eax_3 + 0x10) = 1;
0048db20              *(uint32_t*)((char*)eax_3 + 8) = 1;
0048db23              *(uint32_t*)((char*)eax_3 + 0xc) = 0xffffffff;
0048db2d              *(uint8_t*)((char*)eax_3 + 0x14) = 0;
0048db30              var_68_3 = ((char*)eax_3 + 0x14);
0048db32              *(uint32_t*)((char*)eax_3 + 0x10) = 2;
0048db3b              *(uint32_t*)((char*)var_68_3 - 0xc) = 0x10;
0048db12          }
0048db12          
0048db44          *(uint8_t*)var_68_3 = 0x2b;
0048db50          *(uint8_t*)((char*)var_68_3 + 1) = 0;
0048db54          PStringBase<char>::trim(&var_54, 1, 0, var_68_3);
0048db62          class PStringBase<char> var_50;
0048db62          PStringBase<char>::PStringBase<char>(&var_50, var_54);
0048db73          int32_t eax_7 = _stricmp(arg2->m_charbuffer, var_50);
0048db82          char ebx_2 = ((int8_t)-(eax_7));
0048db86          int32_t* esi_2 = (var_50 - 0x14);
0048db86          
0048db97          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0048db9e              **(uint32_t**)esi_2(1);
0048db9e          
0048dba2          if ((ebx_2 - ebx_2) != 0xff)
0048dba2              break;
0048dba2          
0048dba8          int32_t* esi_4 = (var_54 - 0x14);
0048dba8          
0048dbb7          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0048dbbe              **(uint32_t**)esi_4(1);
0048dbbe          
0048dbc4          FriendData::~FriendData(&var_3c);
0048dbcd          ecx_1 = *(int32_t*)((char*)var_44 + 0x3c);
0048dbd0          var_44 = ecx_1;
0048dae2      }
0048dae2      
0048dbde      uint32_t var_38;
0048dbde      CM_Social::Event_RemoveFriend(var_38);
0048dbe7      int32_t* esi_6 = (var_54 - 0x14);
0048dbe7      
0048dbf9      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0048dc00          **(uint32_t**)esi_6(1);
0048dc00      
0048dc06      FriendData::~FriendData(&var_3c);
0048dac0  }

0048dc31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0048dc40  uint8_t __fastcall gmFriendsUI::RefreshFriendsDisplay(class gmFriendsUI* this)

0048dc40  {
0048dc40      class gmFriendsUI* this_1 = this;
0048dc44      class gmFriendsUI* this_2 = this;
0048dc4d      UIElement_ListBox::Flush(this_2->m_pFriendsListBox);
0048dc5c      UIElement_ListBox::SetSelectedItem(this_2->m_pFriendsListBox, nullptr, 1);
0048dc72      void* esi;
0048dc72      
0048dc72      for (class AC1Legacy::ListNode<FriendData>* _head = this_2->m_friendsList._head; _head != 0; _head = *(uint32_t*)((char*)esi + 0x3c))
0048dc72      {
0048dc77          uint32_t m_id = _head->data.m_id;
0048dc7c          int32_t eax_1;
0048dc7c          eax_1 = _head->data.m_online != 0;
0048dc8e          class PStringBase<unsigned short>* eax_2;
0048dc8e          eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, WidthConvert, &_head->data.m_name.m_buffer->m_data);
0048dc96          gmFriendsUI::AddFriendDisplay(this_2, eax_2, m_id, eax_1);
0048dc9f          void* __offset(gmFriendsUI, -0x14) edi_2 = ((char*)this_1 - 0x14);
0048dc9f          
0048dcae          if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0048dcb6              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0048dc72      }
0048dc72      
0048dcbf      gmFriendsUI::UpdateButtons(this_2);
0048dcc7      int32_t eax_5;
0048dcc7      eax_5 = 1;
0048dccb      return 1;
0048dc40  }

0048dccc                                      90 90 90 90                                                              ....

0048dcd0  uint8_t __fastcall gmFriendsUI::ServerSays_UpdateFriend(class gmFriendsUI* this, class FriendDataList const* arg2)

0048dcd0  {
0048dcda      void var_3c;
0048dcda      FriendData::FriendData(&var_3c);
0048dce3      class AC1Legacy::ListNode<FriendData>* _head = arg2->_head;
0048dce3      
0048dce8      if (_head == 0)
0048dce8      {
0048dd83          FriendData::~FriendData(&var_3c);
0048dd88          int32_t eax_6;
0048dd88          eax_6 = 0;
0048dd8e          return 0;
0048dce8      }
0048dce8      
0048dcf3      FriendData::operator=(&var_3c, _head);
0048dcf8      this->m_pFriendsListBox->m_pSelectedItem;
0048dd0a      uint32_t var_38;
0048dd0a      uint32_t var_4c = var_38;
0048dd0d      gmFriendsUI::RemoveFriendDisplay(this, var_38);
0048dd20      int32_t var_30;
0048dd20      int32_t eax_1;
0048dd20      eax_1 = var_30 != 0;
0048dd2f      void* var_34;
0048dd2f      class PStringBase<unsigned short>* eax_2;
0048dd2f      class UIElement* ebx_1;
0048dd2f      class gmFriendsUI* esi_1;
0048dd2f      eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, ((char*)var_34 + 0x14));
0048dd37      gmFriendsUI::AddFriendDisplay(esi_1, eax_2, var_38, eax_1);
0048dd40      void* __offset(FriendDataList, -0x14) edi_1 = ((char*)arg2 - 0x14);
0048dd40      
0048dd53      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0048dd5b          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0048dd5b      
0048dd66      UIElement_ListBox::SetSelectedItem(esi_1->m_pFriendsListBox, ebx_1, 1);
0048dd6f      FriendData::~FriendData(&var_3c);
0048dd76      int32_t eax_5;
0048dd76      eax_5 = 1;
0048dd7c      return 1;
0048dcd0  }

0048dd91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0048dda0  int32_t __thiscall AC1Legacy::List<FriendData>::insert(class AC1Legacy::List<FriendData>* this, class AC1Legacy::ListNode<FriendData>* arg2, class FriendData const* arg3)

0048dda0  {
0048dda6      void* eax = operator new(0x44);
0048dda6      
0048ddb2      if (eax == 0)
0048ddf0          return 0;
0048ddf0      
0048ddbb      FriendData::FriendData(eax, arg3);
0048ddc0      *(uint32_t*)((char*)eax + 0x3c) = 0;
0048ddc7      *(uint32_t*)((char*)eax + 0x40) = 0;
0048ddc7      
0048ddd3      if (this->_head == 0)
0048ddd3      {
0048ddd8          uint32_t eax_4 = (this->_num_elements + 1);
0048ddd9          this->_head = eax;
0048dddc          this->_tail = eax;
0048dddf          this->_num_elements = eax_4;
0048dde9          return 1;
0048ddd3      }
0048ddd3      
0048ddf7      *(uint32_t*)((char*)eax + 0x3c) = arg2;
0048ddfd      *(uint32_t*)((char*)eax + 0x40) = arg2->prev;
0048de00      class AC1Legacy::ListNode<FriendData>* prev = arg2->prev;
0048de00      
0048de05      if (prev == 0)
0048de05      {
0048de1a          this->_head = eax;
0048de1d          arg2->prev = eax;
0048de20          this->_num_elements += 1;
0048de2a          return 1;
0048de05      }
0048de05      
0048de07      prev->next = eax;
0048de0a      arg2->prev = eax;
0048de0d      this->_num_elements += 1;
0048de17      return 1;
0048dda0  }

0048de2d                                         90 90 90                                                               ...

0048de30  int32_t __thiscall AC1Legacy::List<FriendData>::remove(class AC1Legacy::List<FriendData>* this, class AC1Legacy::ListNode<FriendData>* arg2)

0048de30  {
0048de3c      if (arg2 != 0)
0048de3c      {
0048de3e          class AC1Legacy::ListNode<FriendData>* _head = this->_head;
0048de3e          
0048de43          if (_head != 0)
0048de43          {
0048de4e              class AC1Legacy::ListNode<FriendData>* next;
0048de4e              
0048de4e              if (arg2 != _head)
0048de4e              {
0048de5f                  arg2->prev->next = arg2->next;
0048de68                  next = arg2->next;
0048de68                  
0048de6d                  if (next == 0)
0048de7a                      this->_tail = arg2->prev;
0048de6d                  else
0048de72                      next->prev = arg2->prev;
0048de4e              }
0048de4e              else
0048de4e              {
0048de50                  next = arg2->next;
0048de55                  this->_head = next;
0048de55                  
0048de58                  if (next != 0)
0048de72                      next->prev = nullptr;
0048de58                  else
0048de5a                      this->_tail = nullptr;
0048de4e              }
0048de7f              FriendData::~FriendData(arg2);
0048de85              operator delete(arg2);
0048de91              this->_num_elements -= 1;
0048de9b              return 1;
0048de43          }
0048de3c      }
0048de3c      
0048de49      return 0;
0048de30  }

0048de9e                                                                                            90 90                                ..

0048dea0  int32_t __thiscall AC1Legacy::List<FriendData>::remove(class AC1Legacy::List<FriendData>* this, class FriendData* arg2)

0048dea0  {
0048dea5      class AC1Legacy::ListNode<FriendData>* i = this->_head;
0048dea9      class AC1Legacy::ListNode<FriendData>* i_1 = nullptr;
0048dea9      
0048dead      if (i != 0)
0048dead      {
0048deca          do
0048deca          {
0048debd              if (FriendData::operator==(i, arg2) != 0)
0048debf                  i_1 = i;
0048debf              
0048dec3              if (i == 0)
0048dec3                  break;
0048dec3              
0048dec5              i = i->next;
0048deca          } while (i != 0);
0048deca          
0048dece          if (i_1 != 0)
0048dece          {
0048dedc              FriendData::operator=(arg2, i_1);
0048deed              return AC1Legacy::List<FriendData>::remove(this, i_1);
0048dece          }
0048dead      }
0048dead      
0048ded6      return 0;
0048dea0  }


0048def0  uint8_t __fastcall gmFriendsUI::ServerSays_AddFriend(class gmFriendsUI* this, class FriendDataList const* arg2)

0048def0  {
0048defa      void var_3c;
0048defa      FriendData::FriendData(&var_3c);
0048df03      class AC1Legacy::ListNode<FriendData>* _head = arg2->_head;
0048df03      
0048df08      if (_head == 0)
0048df08      {
0048df99          FriendData::~FriendData(&var_3c);
0048df9e          int32_t eax_7;
0048df9e          eax_7 = 0;
0048dfa4          return 0;
0048df08      }
0048df08      
0048df13      FriendData::operator=(&var_3c, _head);
0048df2b      AC1Legacy::List<FriendData>::insert(&this->m_friendsList.vtable, this->m_friendsList._head, &var_3c);
0048df3e      int32_t var_30;
0048df3e      int32_t ecx_3;
0048df3e      ecx_3 = var_30 != 0;
0048df55      uint32_t var_38;
0048df55      void* var_34;
0048df55      gmFriendsUI::AddFriendDisplay(this, PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, ((char*)var_34 + 0x14)), var_38, ecx_3);
0048df5e      void* __offset(FriendDataList, -0x14) esi_1 = ((char*)arg2 - 0x14);
0048df5e      
0048df71      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0048df79          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0048df79      
0048df7d      gmFriendsUI::UpdateButtons(this);
0048df86      FriendData::~FriendData(&var_3c);
0048df8c      int32_t eax_6;
0048df8c      eax_6 = 1;
0048df92      return 1;
0048def0  }

0048dfa7                       90 90 90 90 90 90 90 90 90                                                         .........

0048dfb0  uint8_t __thiscall gmFriendsUI::ServerSays_RemoveFriend(class gmFriendsUI* this, class FriendDataList const* arg2, uint8_t arg3)

0048dfb0  {
0048dfba      void var_3c;
0048dfba      FriendData::FriendData(&var_3c);
0048dfc3      class AC1Legacy::ListNode<FriendData>* _head = arg2->_head;
0048dfc3      
0048dfc8      if (_head == 0)
0048dfc8      {
0048e00d          FriendData::~FriendData(&var_3c);
0048e012          int32_t eax_2;
0048e012          eax_2 = 0;
0048e018          return 0;
0048dfc8      }
0048dfc8      
0048dfcf      FriendData::operator=(&var_3c, _head);
0048dfdf      AC1Legacy::List<FriendData>::remove(&this->m_friendsList.vtable, &var_3c);
0048dfe8      uint32_t var_38;
0048dfe8      uint32_t var_44_2 = var_38;
0048dfeb      gmFriendsUI::RemoveFriendDisplay(this, var_38);
0048dff2      gmFriendsUI::UpdateButtons(this);
0048dffb      FriendData::~FriendData(&var_3c);
0048e000      int32_t eax_1;
0048e000      eax_1 = 1;
0048e006      return 1;
0048dfb0  }

0048e01b                                                                                   90 90 90 90 90                             .....

0048e020  void __fastcall gmFriendsUI::RecvNotice_ChatCommand_RemoveAllFriends(class gmFriendsUI* this)

0048e020  {
0048e020      class gmFriendsUI* this_1 = this;
0048e024      CM_Social::Event_ClearFriends();
0048e02c      AC1Legacy::List<FriendData>::flush(&this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3]);
0048e034      UIElement_ListBox::Flush(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1]);
0048e040      UIElement_ListBox::SetSelectedItem(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1], nullptr, 1);
0048e045      ClientUISystem::GetUISystem();
0048e069      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, WidthConvert, "Your friends list has been clear…"), &this_1, 0, 1, 0);
0048e072      void* __offset(gmFriendsUI, -0x14) esi_4 = ((char*)this_1 - 0x14);
0048e072      
0048e085      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0048e08d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0048e020  }

0048e092                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0048e0a0  void __thiscall gmFriendsUI::gmFriendsUI(class gmFriendsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0048e0a0  {
0048e0af      UIElement_Field::UIElement_Field(this, arg2, arg3);
0048e0b4      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048e0c0      __builtin_memset(&this->m_pAddButton, 0, 0x14);
0048e0de      this->vtable = 0x7a4a60;
0048e0e4      this->vtable = &gmFriendsUI::`vftable';
0048e0ee      this->m_friendsList._head = nullptr;
0048e0f4      this->m_friendsList._tail = nullptr;
0048e0fa      this->m_friendsList._num_elements = 0;
0048e100      this->m_friendsList.vtable = &PackObj::`vftable';
0048e10a      this->m_friendsList.vtable = 0x7a4150;
0048e114      this->m_friendsList.vtable = &PList<class FriendData>::`vftable';
0048e0a0  }

0048e124              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0048e130  class UIElement* __thiscall gmFriendsUI::DynamicCast(class gmFriendsUI* this, uint32_t arg2) __pure

0048e130  {
0048e13c      if (arg2 == 0x10000045)
0048e149          return this;
0048e149      
0048e143      int32_t edx_1;
0048e143      edx_1 = arg2 != 3;
0048e147      return (this & (edx_1 - 1));
0048e130  }

0048e14c                                      90 90 90 90                                                              ....

0048e150  uint32_t gmFriendsUI::GetUIElementType(class gmFriendsUI const* this @ ecx) __pure

0048e150  {
0048e155      return 0x10000045;
0048e150  }

0048e156                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0048e160  void __fastcall gmFriendsUI::~gmFriendsUI(class gmFriendsUI* this)

0048e160  {
0048e16a      this->vtable = 0x7a4a60;
0048e164      this->vtable = &gmFriendsUI::`vftable';
0048e176      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0048e176      
0048e17d      if (eax != 0)
0048e17f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0048e17f      
0048e187      this->m_friendsList.vtable = &PList<class FriendData>::`vftable';
0048e187      this->m_friendsList.vtable = &PackObj::`vftable';
0048e187      this->m_friendsList.vtable = 0x7a410c;
0048e1a1      AC1Legacy::List<FriendData>::flush(&this->m_friendsList);
0048e164      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048e1ae      NoticeHandler::~NoticeHandler(&this->vtable);
0048e1b7      /* tailcall */
0048e1b7      return UIElement_Field::~UIElement_Field(this);
0048e160  }

0048e1bc                                                                                      90 90 90 90                              ....

0048e1c0  class UIElement* gmFriendsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0048e1c0  {
0048e1c5      void* eax = operator new(0x624);
0048e1c5      
0048e1cf      if (eax == 0)
0048e1e5          return 0;
0048e1e5      
0048e1e2      return gmFriendsUI::gmFriendsUI(eax, arg1, arg2);
0048e1c0  }

0048e1e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0048e1f0  void* __thiscall gmFriendsUI::`scalar deleting destructor'(class gmFriendsUI* this, uint32_t arg2)

0048e1f0  {
0048e1f3      gmFriendsUI::~gmFriendsUI(this);
0048e1f3      
0048e1fd      if ((arg2 & 1) != 0)
0048e200          operator delete(this);
0048e200      
0048e20b      return this;
0048e1f0  }

0048e20e                                            90 90                                                                ..

0048e210  void gmFriendsUI::Register()

0048e210  {
0048e21a      UIElement::RegisterElementClass(0x10000045, gmFriendsUI::Create);
0048e210  }

0048e223           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0048e230  class FriendDataList& __thiscall FriendDataList::operator=(class FriendDataList* this, class FriendDataList const& arg2)

0048e230  {
0048e23a      if (this != arg2)
0048e23a      {
0048e23c          AC1Legacy::List<FriendData>::flush(this);
0048e23c          
0048e246          for (class AC1Legacy::ListNode<FriendData>* i = arg2->_head; i != 0; i = i->next)
0048e246          {
0048e24b              AC1Legacy::List<FriendData>::push_back(this, i);
0048e24b              
0048e252              if (i == 0)
0048e252                  break;
0048e246          }
0048e23a      }
0048e23a      
0048e25f      return this;
0048e230  }

0048e262        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0048e270  void __thiscall gmFriendsUI::RecvNotice_UpdateFriendsList(class gmFriendsUI* this, class FriendDataList const* arg2, int32_t arg3)

0048e270  {
0048e27c      class FriendDataList* edx;
0048e27c      
0048e27c      switch (arg3)
0048e27c      {
0048e28b          case 0:
0048e28b          {
0048e28b              FriendDataList::operator=(&this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3], arg2);
0048e296              gmFriendsUI::RefreshFriendsDisplay(((char*)this - 0x5f8));
0048e28b              break;
0048e28b          }
0048e2a3          case 1:
0048e2a3          {
0048e2a3              class FriendDataList* var_8_2 = arg2;
0048e2aa              gmFriendsUI::ServerSays_AddFriend(((char*)this - 0x5f8), edx);
0048e2a3              break;
0048e2a3          }
0048e2c0          case 2:
0048e2c0          {
0048e2c0              gmFriendsUI::ServerSays_RemoveFriend(((char*)this - 0x5f8), arg2, 0);
0048e2c0              break;
0048e2c0          }
0048e2d6          case 3:
0048e2d6          {
0048e2d6              gmFriendsUI::ServerSays_RemoveFriend(((char*)this - 0x5f8), arg2, 1);
0048e2d6              break;
0048e2d6          }
0048e2e3          case 4:
0048e2e3          {
0048e2e3              class FriendDataList* var_8_3 = arg2;
0048e2ea              gmFriendsUI::ServerSays_UpdateFriend(((char*)this - 0x5f8), edx);
0048e2e3              break;
0048e2e3          }
0048e27c      }
0048e270  }

0048e2f3                                                           90                                                         .
0048e2f4  uint32_t jump_table_48e2f4[0x5] = 
0048e2f4  {
0048e2f4      [0x0] =  0x0048e283
0048e2f8      [0x1] =  0x0048e29f
0048e2fc      [0x2] =  0x0048e2b3
0048e300      [0x3] =  0x0048e2c9
0048e304      [0x4] =  0x0048e2df
0048e308  }

0048e308                          90 90 90 90 90 90 90 90                                                          ........

0048e310  uint32_t GetPlayerID()

0048e310  {
0048e310      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0048e310      
0048e317      if (SmartBox::smartbox_1 == 0)
0048e322          return 0;
0048e322      
0048e31f      return SmartBox::smartbox_1->player_id;
0048e310  }

0048e323           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0048e330  void __thiscall gmFellowshipUI::gmFellowshipUI(class gmFellowshipUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0048e330  {
0048e33f      UIElement_Field::UIElement_Field(this, arg2, arg3);
0048e344      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048e350      __builtin_memset(&this->m_pFellowship, 0, 0x40);
0048e3b0      this->vtable = 0x7a5020;
0048e3b6      this->vtable = &gmFellowshipUI::`vftable';
0048e330  }

0048e3c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0048e3d0  class UIElement* __thiscall gmFellowshipUI::DynamicCast(class gmFellowshipUI* this, uint32_t arg2) __pure

0048e3d0  {
0048e3dc      if (arg2 == 0x1000002d)
0048e3e9          return this;
0048e3e9      
0048e3e3      int32_t edx_1;
0048e3e3      edx_1 = arg2 != 3;
0048e3e7      return (this & (edx_1 - 1));
0048e3d0  }

0048e3ec                                      90 90 90 90                                                              ....

0048e3f0  uint32_t gmFellowshipUI::GetUIElementType(class gmFellowshipUI const* this @ ecx) __pure

0048e3f0  {
0048e3f5      return 0x1000002d;
0048e3f0  }

0048e3f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0048e400  class UIElement* gmFellowshipUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0048e400  {
0048e405      void* eax = operator new(0x63c);
0048e405      
0048e40f      if (eax == 0)
0048e425          return 0;
0048e425      
0048e422      return gmFellowshipUI::gmFellowshipUI(eax, arg1, arg2);
0048e400  }

0048e426                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0048e430  void __thiscall gmFellowshipUI::RecvNotice_AbortConfirmationRequest(class gmFellowshipUI* this, int32_t arg2, uint32_t arg3)

0048e430  {
0048e438      if (arg2 == 4)
0048e438      {
0048e43e          DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1]);
0048e448          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = nullptr;
0048e44b          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] = 0;
0048e438      }
0048e430  }

0048e452                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0048e460  void __stdcall gmFellowshipUI::OnVisibilityChanged(class gmFellowshipUI* this @ ecx, uint8_t arg2)

0048e460  {
0048e466      CM_Fellowship::Event_UpdateRequest(((uint32_t)arg2));
0048e460  }

0048e46f                                               90                                                                 .

0048e470  void __thiscall gmFellowshipUI::DismissFellow(class gmFellowshipUI* this, uint32_t arg2)

0048e470  {
0048e470      class CFellowship* m_pFellowship = this->m_pFellowship;
0048e470      
0048e47e      if (m_pFellowship != 0)
0048e47e      {
0048e494          void* var_98_2;
0048e494          void var_90;
0048e494          
0048e494          if (Fellowship::IsFellow(m_pFellowship, arg2) != 0)
0048e494          {
0048e4ba              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0048e4c1              uint32_t player_id;
0048e4c1              
0048e4c1              if (SmartBox::smartbox_1 == 0)
0048e4cb                  player_id = 0;
0048e4c1              else
0048e4c3                  player_id = SmartBox::smartbox_1->player_id;
0048e4c3              
0048e4cf              if (arg2 != player_id)
0048e4cf              {
0048e4d2                  CM_Fellowship::Event_Dismiss(arg2);
0048e4e1                  return;
0048e4cf              }
0048e4cf              
0048e4e8              StringInfo::StringInfo(&var_90);
0048e4fd              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048e506              var_98_2 = &var_90;
0048e494          }
0048e494          else
0048e494          {
0048e49a              StringInfo::StringInfo(&var_90);
0048e4ae              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048e4b7              var_98_2 = &var_90;
0048e494          }
0048e494          
0048e509          ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_98_2);
0048e515          StringInfo::~StringInfo(&var_90);
0048e47e      }
0048e470  }

0048e524              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0048e530  void __thiscall gmFellowshipUI::RecruitFellow(class gmFellowshipUI* this, uint32_t arg2)

0048e530  {
0048e541      if (this->m_pFellowship != 0)
0048e541      {
0048e550          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
0048e550          
0048e55a          if ((eax_1 != 0 && eax_1->vtable->IsPlayer() != 0))
0048e55a          {
0048e57d              if (Fellowship::IsFellow(this->m_pFellowship, arg2) == 0)
0048e57d              {
0048e580                  CM_Fellowship::Event_Recruit(arg2);
0048e590                  return;
0048e57d              }
0048e57d              
0048e593              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0048e59a              uint32_t player_id;
0048e59a              
0048e59a              if (SmartBox::smartbox_1 == 0)
0048e5a4                  player_id = 0;
0048e59a              else
0048e59c                  player_id = SmartBox::smartbox_1->player_id;
0048e59c              
0048e5a8              void var_90;
0048e5a8              void* ecx_2 = &var_90;
0048e5ac              void* var_9c_4;
0048e5ac              
0048e5ac              if (arg2 == player_id)
0048e5ac              {
0048e5ce                  StringInfo::StringInfo(ecx_2);
0048e5e3                  StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048e5ec                  var_9c_4 = &var_90;
0048e5ac              }
0048e5ac              else
0048e5ac              {
0048e5ae                  StringInfo::StringInfo(ecx_2);
0048e5c2                  StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048e5cb                  var_9c_4 = &var_90;
0048e5ac              }
0048e5ac              
0048e5ef              ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_9c_4);
0048e5fb              StringInfo::~StringInfo(&var_90);
0048e55a          }
0048e541      }
0048e530  }

0048e60b                                   90 90 90 90 90                                                             .....

0048e610  void* __thiscall PackableHashIterator<unsigned long,Fellow>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,Fellow>* this, uint32_t arg2)

0048e610  {
0048e618      this->vtable = 0x7a5158;
0048e618      
0048e61e      if ((arg2 & 1) != 0)
0048e621          operator delete(this);
0048e621      
0048e62c      return this;
0048e610  }

0048e62f                                               90                                                                 .

0048e630  void __fastcall gmFellowshipUI::~gmFellowshipUI(class gmFellowshipUI* this)

0048e630  {
0048e63a      this->vtable = 0x7a5020;
0048e634      this->vtable = &gmFellowshipUI::`vftable';
0048e646      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0048e646      
0048e64d      if (eax != 0)
0048e64f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0048e64f      
0048e65b      UIListener::UnRegisterForGlobalMessage(this, 1);
0048e664      UIListener::UnRegisterForGlobalMessage(this, 3);
0048e670      DialogFactory::CloseDialog(this->m_fellowRequestContext);
0048e675      this->m_fellowRequestContext = 0;
0048e634      this->vtable = &gmUrgentAssistanceUI::`vftable';
0048e68a      NoticeHandler::~NoticeHandler(&this->vtable);
0048e693      /* tailcall */
0048e693      return UIElement_Field::~UIElement_Field(this);
0048e630  }

0048e698                                                                          90 90 90 90 90 90 90 90                          ........

0048e6a0  void gmFellowshipUI::Register()

0048e6a0  {
0048e6aa      UIElement::RegisterElementClass(0x1000002d, gmFellowshipUI::Create);
0048e6a0  }

0048e6b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0048e6c0  void __fastcall gmFellowshipUI::UpdateButtons(class gmFellowshipUI* this)

0048e6c0  {
0048e6d1      if (this->m_pFellowship != 0)
0048e6d1      {
0048e6d7          this->m_pFellowQuitButton->vtable->SetState(1);
0048e6e7          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0048e6ee          uint32_t player_id;
0048e6ee          
0048e6ee          if (SmartBox::smartbox_1 == 0)
0048e6f8              player_id = 0;
0048e6ee          else
0048e6f0              player_id = SmartBox::smartbox_1->player_id;
0048e6f0          
0048e704          if (this->m_pFellowship->_leader != player_id)
0048e704          {
0048e830              this->m_pFellowLeaderButton->vtable->SetState(0xd);
0048e840              this->m_pFellowDisbandButton->vtable->SetState(0xd);
0048e850              this->m_pFellowDismissButton->vtable->SetState(0xd);
0048e860              this->m_pFellowOpenButton->vtable->SetState(0xd);
0048e860              
0048e87b              if (this->m_pFellowship->_open_fellow == 0)
0048e8e1                  this->m_pFellowRecruitButton->vtable->SetState(0xd);
0048e87b              else
0048e87b              {
0048e87d                  uint32_t ACCWeenieObject::selectedID_2 = ACCWeenieObject::selectedID;
0048e884                  class ACCWeenieObject* eax_16 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_2);
0048e884                  
0048e88e                  if ((eax_16 != 0 && eax_16->vtable->IsPlayer() != 0))
0048e88e                  {
0048e8a7                      bool cond:3_1 = Fellowship::IsFellow(this->m_pFellowship, ACCWeenieObject::selectedID_2) == 0;
0048e8a9                      class UIElement_Button* m_pFellowRecruitButton_1 = this->m_pFellowRecruitButton;
0048e8a9                      
0048e8af                      if (cond:3_1)
0048e8af                      {
0048e8bd                          struct UIElement_Button::VTable* vtable_1 = m_pFellowRecruitButton_1->vtable;
0048e8c5                          int32_t eax_20 = Fellowship::IsFull(this->m_pFellowship);
0048e8ca                          this->m_pFellowRecruitButton;
0048e8d0                          int32_t eax_21 = -(eax_20);
0048e8d9                          vtable_1->SetState((((eax_21 - eax_21) & 0xc) + 1));
0048e8af                      }
0048e8af                      else
0048e8b1                          m_pFellowRecruitButton_1->vtable->SetState(0xd);
0048e88e                  }
0048e87b              }
0048e704          }
0048e704          else
0048e704          {
0048e70a              this->m_pFellowDisbandButton->vtable->SetState(1);
0048e71a              this->m_pFellowOpenButton->vtable->SetState(1);
0048e72a              uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0048e731              class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
0048e73b              int32_t eax_4;
0048e73b              
0048e73b              if (eax_3 != 0)
0048e741                  eax_4 = eax_3->vtable->IsPlayer();
0048e741              
0048e746              if ((eax_3 == 0 || eax_4 == 0))
0048e78e                  this->m_pFellowRecruitButton->vtable->SetState(0xd);
0048e746              else
0048e746              {
0048e754                  bool cond:2_1 = Fellowship::IsFellow(this->m_pFellowship, ACCWeenieObject::selectedID_1) == 0;
0048e756                  class UIElement_Button* m_pFellowRecruitButton = this->m_pFellowRecruitButton;
0048e756                  
0048e75c                  if (cond:2_1)
0048e75c                  {
0048e76a                      struct UIElement_Button::VTable* vtable = m_pFellowRecruitButton->vtable;
0048e772                      int32_t eax_7 = Fellowship::IsFull(this->m_pFellowship);
0048e777                      this->m_pFellowRecruitButton;
0048e77d                      int32_t eax_8 = -(eax_7);
0048e786                      vtable->SetState((((eax_8 - eax_8) & 0xc) + 1));
0048e75c                  }
0048e75c                  else
0048e75e                      m_pFellowRecruitButton->vtable->SetState(0xd);
0048e746              }
0048e746              
0048e79e              uint32_t m_iidSelectedFellow = this->m_iidSelectedFellow;
0048e79e              
0048e7a6              if (m_iidSelectedFellow == 0)
0048e7a6              {
0048e815                  this->m_pFellowDismissButton->vtable->SetState(0xd);
0048e825                  this->m_pFellowLeaderButton->vtable->SetState(0xd);
0048e7a6              }
0048e7a6              else
0048e7a6              {
0048e7a8                  class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
0048e7af                  uint32_t player_id_1;
0048e7af                  
0048e7af                  if (SmartBox::smartbox_2 == 0)
0048e7b9                      player_id_1 = 0;
0048e7af                  else
0048e7b1                      player_id_1 = SmartBox::smartbox_2->player_id;
0048e7b1                  
0048e7c3                  int32_t ebx;
0048e7c3                  int32_t var_a0_4 = ebx;
0048e7c8                  int32_t ebx_1;
0048e7c8                  ebx_1 = m_iidSelectedFellow == player_id_1;
0048e7bb                  this->m_pFellowDismissButton->vtable->SetState((((ebx_1 - 1) & 0xfffffff4) + 0xd));
0048e7d9                  class SmartBox* SmartBox::smartbox_3 = SmartBox::smartbox;
0048e7e0                  uint32_t player_id_2;
0048e7e0                  
0048e7e0                  if (SmartBox::smartbox_3 == 0)
0048e7ea                      player_id_2 = 0;
0048e7e0                  else
0048e7e2                      player_id_2 = SmartBox::smartbox_3->player_id;
0048e7e2                  
0048e7fe                  int32_t ebx_5;
0048e7fe                  ebx_5 = this->m_iidSelectedFellow == player_id_2;
0048e7f2                  this->m_pFellowLeaderButton->vtable->SetState((((ebx_5 - 1) & 0xfffffff4) + 0xd));
0048e7a6              }
0048e704          }
0048e704          
0048e8fd          void var_90;
0048e8fd          void* ecx_23 = &var_90;
0048e901          void* __return;
0048e901          
0048e901          if (this->m_pFellowship->_open_fellow == 0)
0048e901          {
0048e96b              StringInfo::StringInfo(ecx_23);
0048e97f              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048e98f              class PStringBase<unsigned short>* eax_29 = StringInfo::GetString(&var_90, &__return, 0);
0048e99b              UIElement_Text::SetText(this->m_pFellowOpenButton, eax_29);
0048e9a4              void* esi_4 = ((char*)__return - 0x14);
0048e9a4              
0048e9b7              if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0048e9bf                  **(uint32_t**)esi_4(1);
0048e901          }
0048e901          else
0048e901          {
0048e903              StringInfo::StringInfo(ecx_23);
0048e918              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048e928              class PStringBase<unsigned short>* eax_26 = StringInfo::GetString(&var_90, &__return, 0);
0048e934              UIElement_Text::SetText(this->m_pFellowOpenButton, eax_26);
0048e93d              int32_t* esi_2 = ((char*)__return - 0x14);
0048e93d              
0048e950              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0048e950              {
0048e958                  **(uint32_t**)esi_2(1);
0048e95e                  StringInfo::~StringInfo(&var_90);
0048e96a                  return;
0048e950              }
0048e901          }
0048e9c5          StringInfo::~StringInfo(&var_90);
0048e6d1      }
0048e6c0  }

0048e9d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0048e9e0  class PackableHashIterator<unsigned long,Fellow>* __thiscall PackableHashTable<unsigned long,Fellow>::begin(class PackableHashTable<unsigned long,Fellow> const* this, class PackableHashIterator<unsigned long,Fellow>* __return)

0048e9e0  {
0048e9e0      uint32_t _table_size = this->_table_size;
0048e9e4      int32_t eax = 0;
0048e9e4      
0048e9e9      if (_table_size > 0)
0048e9e9      {
0048e9eb          class PackableHashData<unsigned long,Fellow>** _buckets_1 = this->_buckets;
0048e9ee          class PackableHashData<unsigned long,Fellow>** _buckets_2 = _buckets_1;
0048e9ee          
0048e9fb          do
0048e9fb          {
0048e9f3              if (*(uint32_t*)_buckets_2 != 0)
0048e9f3              {
0048ea1c                  int32_t ecx = _buckets_1[eax];
0048ea1f                  int32_t* __return_1 = __return;
0048ea23                  __return_1[2] = _buckets_1;
0048ea28                  __return_1[1] = ecx;
0048ea2b                  *(uint32_t*)__return_1 = 0x7a5158;
0048ea31                  __return_1[3] = _table_size;
0048ea34                  return __return_1;
0048e9f3              }
0048e9f3              
0048e9f5              eax += 1;
0048e9f6              _buckets_2 = &_buckets_2[1];
0048e9fb          } while (eax < _table_size);
0048e9e9      }
0048e9e9      
0048e9fd      class PackableHashData<unsigned long,Fellow>** _buckets = this->_buckets;
0048ea06      __return->_current = nullptr;
0048ea0d      __return->_buckets = _buckets;
0048ea10      __return->vtable = 0x7a5158;
0048ea16      __return->_table_size = _table_size;
0048ea19      return __return;
0048e9e0  }

0048ea37                                                                       90 90 90 90 90 90 90 90 90                         .........

0048ea40  void __fastcall Fellow::~Fellow(class Fellow* this)

0048ea40  {
0048ea44      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
0048ea4b      this->vtable = 0x7a515c;
0048ea4b      
0048ea5d      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0048ea5f          m_buffer->vtable->__vecDelDtor(1);
0048ea5f      
0048ea68      this->vtable = 0x79285c;
0048ea40  }


0048ea70  void* __thiscall Fellow::`scalar deleting destructor'(class Fellow* this, uint32_t arg2)

0048ea70  {
0048ea74      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
0048ea7b      this->vtable = 0x7a515c;
0048ea7b      
0048ea8d      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0048ea8f          m_buffer->vtable->__vecDelDtor(1);
0048ea8f      
0048ea9c      this->vtable = 0x79285c;
0048ea9c      
0048eaa2      if ((arg2 & 1) != 0)
0048eaa5          operator delete(this);
0048eaa5      
0048eab1      return this;
0048ea70  }

0048eab4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0048eac0  class Fellow* __thiscall Fellowship::GetFellow(class Fellowship const* this, uint32_t arg2)

0048eac0  {
0048eac1      uint32_t _table_size = this->_fellowship_table._table_size;
0048eac1      
0048eac7      if (_table_size != 0)
0048eac7      {
0048eac9          class PackableHashData<unsigned long,Fellow>** _buckets = this->_fellowship_table._buckets;
0048eac9          
0048eace          if (_buckets != 0)
0048eace          {
0048eadf              for (int32_t* i = _buckets[(COMBINE(0, arg2) % _table_size)]; i != 0; i = i[0xd])
0048eadf              {
0048eae3                  if (arg2 == *(uint32_t*)i)
0048eaf8                      return &i[1];
0048eadf              }
0048eace          }
0048eac7      }
0048eac7      
0048eaf0      return 0;
0048eac0  }

0048eafb                                                                                   90 90 90 90 90                             .....

0048eb00  void* __thiscall gmFellowshipUI::`scalar deleting destructor'(class gmFellowshipUI* this, uint32_t arg2)

0048eb00  {
0048eb03      gmFellowshipUI::~gmFellowshipUI(this);
0048eb03      
0048eb0d      if ((arg2 & 1) != 0)
0048eb10          operator delete(this);
0048eb10      
0048eb1b      return this;
0048eb00  }

0048eb1e                                                                                            90 90                                ..

0048eb20  void __thiscall gmFellowshipUI::UpdateFellowStats(class gmFellowshipUI* this, uint32_t arg2)

0048eb20  {
0048eb29      class CFellowship* m_pFellowship = this->m_pFellowship;
0048eb2f      uint32_t _table_size = m_pFellowship->_fellowship_table._table_size;
0048eb2f      
0048eb3b      if (_table_size != 0)
0048eb3b      {
0048eb43          class PackableHashData<unsigned long,Fellow>** _buckets = m_pFellowship->_fellowship_table._buckets;
0048eb43          
0048eb49          if (_buckets != 0)
0048eb49          {
0048eb5c              int32_t* edx_3 = _buckets[(COMBINE(0, arg2) % _table_size)];
0048eb5c              
0048eb61              if (edx_3 != 0)
0048eb61              {
0048eb69                  while (arg2 != *(uint32_t*)edx_3)
0048eb69                  {
0048eb6b                      edx_3 = edx_3[0xd];
0048eb6b                      
0048eb70                      if (edx_3 == 0)
0048eb7c                          return;
0048eb69                  }
0048eb69                  
0048eb84                  if (edx_3 != 0xfffffffc)
0048eb84                  {
0048eb8a                      class UIElement_ListBox* m_pFellowsListBox = this->m_pFellowsListBox;
0048eb96                      uint32_t i = 0;
0048eb9a                      uint32_t i_1 = 0;
0048eb9a                      
0048eb9e                      if (m_pFellowsListBox->m_listItems.m_num > 0)
0048eb9e                      {
0048ed44                          do
0048ed44                          {
0048eba5                              class UIElement* eax_4 = UIElement_ListBox::GetItem(m_pFellowsListBox, i);
0048ebae                              uint32_t var_a8;
0048ebae                              
0048ebae                              if ((eax_4 != 0 && (UIElement::GetAttribute_InstanceID(eax_4, 0x1000000d, &var_a8) != 0 && var_a8 == arg2)))
0048ebae                              {
0048ebe5                                  class UIElement* eax_6 = UIElement::GetChildRecursive(eax_4, 0x10000284);
0048ebe5                                  
0048ebec                                  if (eax_6 != 0)
0048ebec                                  {
0048ebf8                                      class UIElement_Text* eax_7 = eax_6->vtable->DynamicCast(0xc);
0048ebf8                                      
0048ec02                                      if (eax_7 != 0)
0048ec02                                      {
0048ec0c                                          class CFellowship* m_pFellowship_1 = this->m_pFellowship;
0048ec17                                          float var_b4_1 = 0f;
0048ec17                                          
0048ec1f                                          if (m_pFellowship_1->_share_xp != 0)
0048ec1f                                          {
0048ec26                                              long double x87_r7_1;
0048ec26                                              
0048ec26                                              if (m_pFellowship_1->_even_xp_split == 0)
0048ec26                                              {
0048ec36                                                  uint32_t eax_11 = Fellowship::CalculateExperienceProportionSum(m_pFellowship_1);
0048ec43                                                  int32_t eax_13 = FellowshipSystem::GetExperienceProportion(edx_3[3]);
0048ec51                                                  long double x87_r7_2 = ((long double)eax_13);
0048ec51                                                  
0048ec55                                                  if (eax_13 < 0)
0048ec57                                                      x87_r7_2 = (x87_r7_2 + ((long double)4294967296.0));
0048ec57                                                  
0048ec70                                                  int32_t var_9c_1 = 0;
0048ec78                                                  int32_t var_94_1 = 0;
0048ec88                                                  i = i_1;
0048ec90                                                  x87_r7_1 = (x87_r7_2 / (((long double)eax_11) + -(((long double)0))));
0048ec26                                              }
0048ec26                                              else
0048ec2c                                                  x87_r7_1 = FellowshipSystem::GetEvenSplitXPPctg(m_pFellowship_1->_fellowship_table._currNum);
0048ec2c                                              
0048ec92                                              var_b4_1 = ((float)x87_r7_1);
0048ec1f                                          }
0048ec1f                                          
0048ec9a                                          void var_90;
0048ec9a                                          StringInfo::StringInfo(&var_90);
0048ecaf                                          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048ecbc                                          int32_t var_c8_5 = 0;
0048ecc4                                          StringInfo::AddVariable_Int(&var_90, 0, edx_3[3]);
0048ecde                                          int32_t eax_15;
0048ecde                                          int32_t edx_6;
0048ecde                                          edx_6 = HIGHD(((int64_t)_ftol2()));
0048ecde                                          eax_15 = LOWD(((int64_t)_ftol2()));
0048ecdf                                          int32_t var_c8_6 = edx_6;
0048ece6                                          StringInfo::AddVariable_Int(&var_90, 0, eax_15);
0048ecfe                                          void* __return;
0048ecfe                                          UIElement_Text::SetText(eax_7, StringInfo::GetString(&var_90, &__return, 0));
0048ed07                                          int32_t* esi_4 = ((char*)__return - 0x14);
0048ed07                                          
0048ed1a                                          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0048ed22                                              **(uint32_t**)esi_4(1);
0048ed22                                          
0048ed28                                          StringInfo::~StringInfo(&var_90);
0048ec02                                      }
0048ebec                                  }
0048ebae                              }
0048ebae                              
0048ed31                              m_pFellowsListBox = this->m_pFellowsListBox;
0048ed3d                              i += 1;
0048ed40                              i_1 = i;
0048ed44                          } while (i < m_pFellowsListBox->m_listItems.m_num);
0048eb9e                      }
0048eb84                  }
0048eb61              }
0048eb49          }
0048eb3b      }
0048eb20  }

0048ed57                                                                       90 90 90 90 90 90 90 90 90                         .........

0048ed60  void __thiscall gmFellowshipUI::UpdateFellowVitals(class gmFellowshipUI* this, uint32_t arg2)

0048ed60  {
0048ed69      class CFellowship* m_pFellowship = this->m_pFellowship;
0048ed6f      uint32_t _table_size = m_pFellowship->_fellowship_table._table_size;
0048ed6f      
0048ed77      if (_table_size != 0)
0048ed77      {
0048ed7f          class PackableHashData<unsigned long,Fellow>** _buckets = m_pFellowship->_fellowship_table._buckets;
0048ed7f          
0048ed85          if (_buckets != 0)
0048ed85          {
0048ed98              int32_t* edx_3 = _buckets[(COMBINE(0, arg2) % _table_size)];
0048ed98              
0048ed9d              if (edx_3 != 0)
0048ed9d              {
0048eda5                  while (arg2 != *(uint32_t*)edx_3)
0048eda5                  {
0048eda7                      edx_3 = edx_3[0xd];
0048eda7                      
0048edac                      if (edx_3 == 0)
0048edb8                          return;
0048eda5                  }
0048eda5                  
0048edc0                  if (edx_3 != 0xfffffffc)
0048edc0                  {
0048edc6                      class UIElement_ListBox* m_pFellowsListBox = this->m_pFellowsListBox;
0048edd2                      uint32_t esi_1 = 0;
0048edd2                      
0048edd6                      if (m_pFellowsListBox->m_listItems.m_num > 0)
0048edd6                      {
0048ede1                          class UIElement* eax_4;
0048ede1                          
0048ede1                          while (true)
0048ede1                          {
0048ede1                              eax_4 = UIElement_ListBox::GetItem(m_pFellowsListBox, esi_1);
0048edea                              int32_t var_94;
0048edea                              
0048edea                              if ((eax_4 != 0 && (UIElement::GetAttribute_InstanceID(eax_4, 0x1000000d, &var_94) != 0 && var_94 == arg2)))
0048ee0c                                  break;
0048ee0c                              
0048ee0e                              m_pFellowsListBox = this->m_pFellowsListBox;
0048ee1a                              esi_1 += 1;
0048ee1a                              
0048ee1d                              if (esi_1 >= m_pFellowsListBox->m_listItems.m_num)
0048ee29                                  return;
0048ede1                          }
0048ede1                          
0048ee33                          class UIElement* eax_7 = UIElement::GetChildRecursive(eax_4, 0x10000285);
0048ee3a                          int32_t __return;
0048ee3a                          void var_90;
0048ee3a                          
0048ee3a                          if (eax_7 != 0)
0048ee3a                          {
0048ee46                              class UIElement* eax_8;
0048ee46                              int32_t ecx_4;
0048ee46                              eax_8 = eax_7->vtable->DynamicCast(7);
0048ee46                              
0048ee50                              if (eax_8 != 0)
0048ee50                              {
0048ee56                                  int32_t __return_2 = edx_3[0xa];
0048ee59                                  int32_t eax_9 = edx_3[7];
0048ee5c                                  __return = __return_2;
0048ee68                                  int32_t var_b0_3 = ecx_4;
0048ee74                                  UIElement::SetAttribute_Float(eax_8, 0x69, ((float)(((long double)__return) / ((long double)eax_9))));
0048ee80                                  class UIElement* eax_10 = UIElement::GetChildRecursive(eax_8, 0x10000286);
0048ee80                                  
0048ee87                                  if (eax_10 != 0)
0048ee87                                  {
0048ee93                                      class UIElement_Text* eax_11 = eax_10->vtable->DynamicCast(0xc);
0048ee93                                      
0048ee9d                                      if (eax_11 != 0)
0048ee9d                                      {
0048eea3                                          StringInfo::StringInfo(&var_90);
0048eeb7                                          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048eec4                                          int32_t eax_13;
0048eec4                                          int32_t edx_6;
0048eec4                                          edx_6 = HIGHD(((int64_t)__return_2));
0048eec4                                          eax_13 = LOWD(((int64_t)__return_2));
0048eec5                                          int32_t var_b0_5 = edx_6;
0048eecc                                          StringInfo::AddVariable_Int(&var_90, 0, eax_13);
0048eed5                                          int32_t eax_15;
0048eed5                                          int32_t edx_7;
0048eed5                                          edx_7 = HIGHD(((int64_t)eax_9));
0048eed5                                          eax_15 = LOWD(((int64_t)eax_9));
0048eed6                                          int32_t var_b0_6 = edx_7;
0048eee3                                          StringInfo::AddVariable_Int(&var_90, 0, eax_15);
0048eefb                                          UIElement_Text::SetText(eax_11, StringInfo::GetString(&var_90, &__return, 0));
0048ef04                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0048ef0d                                          StringInfo::~StringInfo(&var_90);
0048ee9d                                      }
0048ee87                                  }
0048ee50                              }
0048ee3a                          }
0048ee3a                          
0048ef19                          class UIElement* eax_17 = UIElement::GetChildRecursive(eax_4, 0x10000287);
0048ef19                          
0048ef20                          if (eax_17 != 0)
0048ef20                          {
0048ef2c                              class UIElement* eax_18;
0048ef2c                              int32_t ecx_18;
0048ef2c                              eax_18 = eax_17->vtable->DynamicCast(7);
0048ef2c                              
0048ef36                              if (eax_18 != 0)
0048ef36                              {
0048ef3c                                  int32_t __return_3 = edx_3[0xb];
0048ef3f                                  int32_t eax_19 = edx_3[8];
0048ef42                                  __return = __return_3;
0048ef4e                                  int32_t var_b0_8 = ecx_18;
0048ef5a                                  UIElement::SetAttribute_Float(eax_18, 0x69, ((float)(((long double)__return) / ((long double)eax_19))));
0048ef66                                  class UIElement* eax_20 = UIElement::GetChildRecursive(eax_18, 0x10000288);
0048ef66                                  
0048ef6d                                  if (eax_20 != 0)
0048ef6d                                  {
0048ef79                                      class UIElement_Text* eax_21 = eax_20->vtable->DynamicCast(0xc);
0048ef79                                      
0048ef83                                      if (eax_21 != 0)
0048ef83                                      {
0048ef89                                          StringInfo::StringInfo(&var_90);
0048ef9d                                          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048efaa                                          int32_t eax_23;
0048efaa                                          int32_t edx_10;
0048efaa                                          edx_10 = HIGHD(((int64_t)__return_3));
0048efaa                                          eax_23 = LOWD(((int64_t)__return_3));
0048efab                                          int32_t var_b0_10 = edx_10;
0048efb2                                          StringInfo::AddVariable_Int(&var_90, 0, eax_23);
0048efbb                                          int32_t eax_25;
0048efbb                                          int32_t edx_11;
0048efbb                                          edx_11 = HIGHD(((int64_t)eax_19));
0048efbb                                          eax_25 = LOWD(((int64_t)eax_19));
0048efbc                                          int32_t var_b0_11 = edx_11;
0048efc9                                          StringInfo::AddVariable_Int(&var_90, 0, eax_25);
0048efe1                                          UIElement_Text::SetText(eax_21, StringInfo::GetString(&var_90, &__return, 0));
0048efea                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0048eff3                                          StringInfo::~StringInfo(&var_90);
0048ef83                                      }
0048ef6d                                  }
0048ef36                              }
0048ef20                          }
0048ef20                          
0048efff                          class UIElement* eax_27 = UIElement::GetChildRecursive(eax_4, 0x10000289);
0048efff                          
0048f006                          if (eax_27 != 0)
0048f006                          {
0048f012                              class UIElement* eax_28;
0048f012                              int32_t ecx_32;
0048f012                              eax_28 = eax_27->vtable->DynamicCast(7);
0048f012                              
0048f01c                              if (eax_28 != 0)
0048f01c                              {
0048f022                                  int32_t __return_1 = edx_3[0xc];
0048f025                                  int32_t edi_3 = edx_3[9];
0048f028                                  __return = __return_1;
0048f034                                  int32_t var_b0_13 = ecx_32;
0048f040                                  UIElement::SetAttribute_Float(eax_28, 0x69, ((float)(((long double)__return) / ((long double)edi_3))));
0048f04c                                  class UIElement* eax_29 = UIElement::GetChildRecursive(eax_28, 0x1000028a);
0048f04c                                  
0048f053                                  if (eax_29 != 0)
0048f053                                  {
0048f05f                                      class UIElement_Text* eax_30 = eax_29->vtable->DynamicCast(0xc);
0048f05f                                      
0048f069                                      if (eax_30 != 0)
0048f069                                      {
0048f06f                                          StringInfo::StringInfo(&var_90);
0048f083                                          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0048f090                                          int32_t eax_32;
0048f090                                          int32_t edx_14;
0048f090                                          edx_14 = HIGHD(((int64_t)__return_1));
0048f090                                          eax_32 = LOWD(((int64_t)__return_1));
0048f091                                          int32_t var_b0_15 = edx_14;
0048f098                                          StringInfo::AddVariable_Int(&var_90, 0, eax_32);
0048f09f                                          int32_t eax_34;
0048f09f                                          int32_t edx_15;
0048f09f                                          edx_15 = HIGHD(((int64_t)edi_3));
0048f09f                                          eax_34 = LOWD(((int64_t)edi_3));
0048f0a0                                          int32_t var_b0_16 = edx_15;
0048f0ad                                          StringInfo::AddVariable_Int(&var_90, 0, eax_34);
0048f0c5                                          UIElement_Text::SetText(eax_30, StringInfo::GetString(&var_90, &__return, 0));
0048f0ce                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0048f0d7                                          StringInfo::~StringInfo(&var_90);
0048f069                                      }
0048f053                                  }
0048f01c                              }
0048f006                          }
0048edd6                      }
0048edc0                  }
0048ed9d              }
0048ed85          }
0048ed77      }
0048ed60  }

0048f0e9                             90 90 90 90 90 90 90                                                           .......

0048f0f0  void __fastcall gmFellowshipUI::UpdateFellowSelection(class gmFellowshipUI* this)

0048f0f0  {
0048f0f5      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0048f10a      uint32_t i = 0;
0048f10f      class UIElement* var_4 = nullptr;
0048f10f      
0048f113      if (this->m_pFellowsListBox->m_listItems.m_num > 0)
0048f113      {
0048f172          do
0048f172          {
0048f127              class UIElement* eax_1 = UIElement_ListBox::GetItem(this->m_pFellowsListBox, i);
0048f127              
0048f130              if (eax_1 != 0)
0048f130              {
0048f13e                  int32_t var_8 = 0;
0048f13e                  
0048f14d                  if (UIElement::GetAttribute_InstanceID(eax_1, 0x1000000d, &var_8) != 0)
0048f14d                  {
0048f14f                      int32_t eax_3 = var_8;
0048f14f                      
0048f155                      if (ACCWeenieObject::selectedID_1 == eax_3)
0048f155                      {
0048f195                          class UIElement_ListBox* m_pFellowsListBox = this->m_pFellowsListBox;
0048f19e                          this->m_iidSelectedFellow = ACCWeenieObject::selectedID_1;
0048f1a4                          UIElement_ListBox::SetSelectedItem(m_pFellowsListBox, eax_1, 0);
0048f1b0                          return;
0048f155                      }
0048f155                      
0048f15d                      if (eax_3 == this->m_iidSelectedFellow)
0048f15f                          var_4 = eax_1;
0048f14d                  }
0048f130              }
0048f130              
0048f16f              i += 1;
0048f172          } while (i < this->m_pFellowsListBox->m_listItems.m_num);
0048f113      }
0048f113      
0048f181      UIElement_ListBox::SetSelectedItem(this->m_pFellowsListBox, var_4, 0);
0048f188      gmFellowshipUI::UpdateButtons(this);
0048f0f0  }

0048f117                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
0048f1b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0048f1c0  void __fastcall gmFellowshipUI::RecvNotice_SelectionChanged(class gmFellowshipUI* this)

0048f1c0  {
0048f1c5      if (this->m_hashElementsRegisteredWith.vtable == 0)
0048f1d2          return;
0048f1d2      
0048f1cd      /* tailcall */
0048f1cd      return gmFellowshipUI::UpdateFellowSelection(((char*)this - 0x5f8));
0048f1c0  }

0048f1d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0048f1e0  void __thiscall gmFellowshipUI::AssignLeadershipToFellow(class gmFellowshipUI* this, uint32_t arg2)

0048f1e0  {
0048f1e0      class CFellowship* m_pFellowship = this->m_pFellowship;
0048f1e0      
0048f1ee      if (m_pFellowship != 0)
0048f1ee      {
0048f1f4          int32_t __saved_esi_2;
0048f1f4          int32_t __saved_esi_1 = __saved_esi_2;
0048f1fc          uint32_t var_9c = arg2;
0048f204          int32_t** esp_2;
0048f204          int32_t* var_a0;
0048f204          void var_90;
0048f204          
0048f204          if (Fellowship::IsFellow(m_pFellowship, var_9c) != 0)
0048f204          {
0048f255              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0048f25c              uint32_t player_id;
0048f25c              
0048f25c              if (SmartBox::smartbox_1 == 0)
0048f266                  player_id = 0;
0048f25c              else
0048f25e                  player_id = SmartBox::smartbox_1->player_id;
0048f25e              
0048f26a              if (arg2 != player_id)
0048f26a              {
0048f26c                  var_9c = arg2;
0048f26d                  CM_Fellowship::Event_AssignNewLeader(var_9c);
0048f27c                  return;
0048f26a              }
0048f26a              
0048f283              StringInfo::StringInfo(&var_90);
0048f28e              var_9c = 0x10000001;
0048f293              var_a0 = nullptr;
0048f298              StringInfo::SetStringIDandTableEnum(&var_90, var_a0, var_9c);
0048f2a1              var_9c = &var_90;
0048f2a1              esp_2 = &var_9c;
0048f204          }
0048f204          else
0048f204          {
0048f20a              StringInfo::StringInfo(&var_90);
0048f20f              var_9c = u"That person is not in the fellow…";
0048f218              void* var_94;
0048f218              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, var_9c);
0048f21d              var_9c = 1;
0048f223              var_a0 = &var_94;
0048f228              StringInfo::SetLiteralValue(&var_90, var_a0, var_9c);
0048f231              int32_t* esi_2 = ((char*)var_94 - 0x14);
0048f237              var_9c = &esi_2[1];
0048f237              
0048f244              if ((InterlockedDecrement(var_9c) == 0 && esi_2 != 0))
0048f244              {
0048f246                  int32_t edx_1 = *(uint32_t*)esi_2;
0048f248                  var_a0 = 1;
0048f24c                  *(uint32_t*)edx_1(var_a0);
0048f244              }
0048f244              
0048f252              var_a0 = &var_94;
0048f252              esp_2 = &var_a0;
0048f204          }
0048f2a2          *(uint32_t*)((char*)esp_2 - 4) = 0x1a;
0048f2a4          ECM_UI::SendNotice_DisplayStringInfo();
0048f2b0          StringInfo::~StringInfo(&esp_2[3]);
0048f2a2          esp_2[1];
0048f1ee      }
0048f1e0  }

0048f2bf                                                                                               90                                 .

0048f2c0  void __thiscall gmFellowshipUI::RecvNotice_CloseDialog(class gmFellowshipUI* this, uint32_t arg2, class PropertyCollection const* arg3)

0048f2c0  {
0048f2c5      class PropertyCollection* esi = arg3;
0048f2d0      uint32_t temp1 = (COMBINE(0, 0x8e) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
0048f2d3      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
0048f2d8      int32_t var_14 = 0;
0048f2dc      int32_t* var_8 = nullptr;
0048f2e0      int32_t* var_4 = nullptr;
0048f2e0      
0048f2ee      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
0048f2ee      {
0048f2f6          if (*(uint32_t*)i == 0x8e)
0048f2f6          {
0048f303              if (i != 0)
0048f303              {
0048f30d                  BaseProperty::operator=(&var_8, &i[2]);
0048f30d                  
0048f318                  if (var_4 != 0)
0048f321                      *(uint32_t*)(*(uint32_t*)var_4 + 0xa8)(&var_14);
0048f303              }
0048f303              
0048f303              break;
0048f2f6          }
0048f2ee      }
0048f2ee      
0048f32c      if (var_14 == 1)
0048f32c      {
0048f339          uint32_t temp1_1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
0048f33c          class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
0048f33f          int32_t* ecx_2 = nullptr;
0048f341          arg3 = 0;
0048f345          int32_t* var_10 = nullptr;
0048f349          int32_t* var_c_1 = nullptr;
0048f349          
0048f354          for (int32_t* i_1 = m_buckets_1[temp1_1]; i_1 != 0; i_1 = i_1[1])
0048f354          {
0048f35c              if (*(uint32_t*)i_1 == 0x92)
0048f35c              {
0048f369                  if (i_1 != 0)
0048f369                  {
0048f373                      BaseProperty::operator=(&var_10, &i_1[2]);
0048f378                      ecx_2 = var_c_1;
0048f378                      
0048f37e                      if (ecx_2 != 0)
0048f37e                      {
0048f387                          *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&arg3);
0048f38a                          ecx_2 = var_c_1;
0048f37e                      }
0048f369                  }
0048f369                  
0048f369                  break;
0048f35c              }
0048f354          }
0048f354          
0048f395          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] == arg2)
0048f395          {
0048f397              uint32_t eax_8 = ((uint32_t)arg3);
0048f39c              class HashSetData<UIElement *>* ecx_4 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0];
0048f3a3              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = nullptr;
0048f3a6              CM_Character::Event_ConfirmationResponse(4, ecx_4, eax_8);
0048f3ab              ecx_2 = var_c_1;
0048f3b2              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] = 0;
0048f395          }
0048f395          
0048f3b5          int32_t* eax_9 = var_10;
0048f3b5          
0048f3bb          if (eax_9 != 0)
0048f3bb          {
0048f3c5              int32_t esi_2 = (eax_9[1] - 1);
0048f3c2              eax_9[1] = esi_2;
0048f3c2              
0048f3cc              if (esi_2 == 0)
0048f3d2                  **(uint32_t**)eax_9(1);
0048f3d2              
0048f3d4              ecx_2 = var_c_1;
0048f3d8              var_10 = nullptr;
0048f3bb          }
0048f3bb          
0048f3de          if (ecx_2 != 0)
0048f3de          {
0048f3e6              int32_t esi_4 = (ecx_2[1] - 1);
0048f3e3              ecx_2[1] = esi_4;
0048f3e3              
0048f3ed              if (esi_4 == 0)
0048f3f3                  **(uint32_t**)ecx_2(1);
0048f3de          }
0048f32c      }
0048f32c      
0048f3f5      int32_t* eax_13 = var_8;
0048f3f5      
0048f3fb      if (eax_13 != 0)
0048f3fb      {
0048f405          int32_t esi_6 = (eax_13[1] - 1);
0048f402          eax_13[1] = esi_6;
0048f402          
0048f40c          if (esi_6 == 0)
0048f412              **(uint32_t**)eax_13(1);
0048f412          
0048f414          var_8 = nullptr;
0048f3fb      }
0048f3fb      
0048f41e      if (var_4 != 0)
0048f41e      {
0048f428          int32_t esi_8 = (var_4[1] - 1);
0048f425          var_4[1] = esi_8;
0048f425          
0048f42f          if (esi_8 == 0)
0048f435              **(uint32_t**)var_4(1);
0048f41e      }
0048f2c0  }


0048f440  void __fastcall gmFellowshipUI::Update(class gmFellowshipUI* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0048f440  {
0048f446      class PStringBase<unsigned short> __return_7;
0048f446      class PStringBase<unsigned short> __return_1 = __return_7;
0048f447      int32_t ebp;
0048f447      int32_t var_144 = ebp;
0048f448      int32_t esi;
0048f448      int32_t var_148 = esi;
0048f449      int32_t edi;
0048f449      int32_t var_14c = edi;
0048f449      
0048f456      if (ClientFellowshipSystem::GetFellowshipSystem()->m_pFellowship == 0)
0048f456      {
0048f497          class CFellowship* m_pFellowship_1 = this->m_pFellowship;
0048f497          
0048f49f          if (m_pFellowship_1 != 0)
0048f4a1              m_pFellowship_1->vtable->__vecDelDtor(1);
0048f4a1          
0048f4a7          this->m_pFellowship = nullptr;
0048f456      }
0048f456      else
0048f456      {
0048f460          if (this->m_pFellowship == 0)
0048f460          {
0048f464              void* eax_2 = operator new(0x44);
0048f46e              class CFellowship* eax_3;
0048f46e              
0048f46e              if (eax_2 == 0)
0048f479                  eax_3 = nullptr;
0048f46e              else
0048f472                  eax_3 = CFellowship::CFellowship(eax_2);
0048f472              
0048f47b              this->m_pFellowship = eax_3;
0048f460          }
0048f460          
0048f486          class CFellowship* m_pFellowship = ClientFellowshipSystem::GetFellowshipSystem()->m_pFellowship;
0048f490          Fellowship::operator=(this->m_pFellowship, m_pFellowship);
0048f456      }
0048f456      
0048f4bb      uint32_t var_150_4 = 3;
0048f4bb      
0048f4bd      if (this->m_pFellowship == 0)
0048f4bd      {
0048f705          UIListener::RegisterForGlobalMessage(this, var_150_4);
0048f70a          this->m_pInAFellowshipFrame->vtable->SetVisible(0);
0048f717          this->m_pNotInAFellowshipFrame->vtable->SetVisible(1);
0048f72e          return;
0048f4bd      }
0048f4bd      
0048f4c3      UIListener::UnRegisterForGlobalMessage(this, var_150_4);
0048f4c8      this->m_pNotInAFellowshipFrame->vtable->SetVisible(0);
0048f4d5      this->m_pInAFellowshipFrame->vtable->SetVisible(1);
0048f4e9      void var_94;
0048f4e9      StringInfo::StringInfo(&var_94);
0048f4f4      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_pFellowship->_name.m_buffer;
0048f4f7      class PStringBase<unsigned short>* __return = 1;
0048f510      StringInfo::SetLiteralValue(&var_94, PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, WidthConvert, &m_buffer->m_data), __return);
0048f51f      int32_t* esi_2 = (__return_1 - 0x14);
0048f525      __return = &esi_2[1];
0048f525      
0048f52e      if ((InterlockedDecrement(__return) == 0 && esi_2 != 0))
0048f52e      {
0048f530          int32_t eax_10 = *(uint32_t*)esi_2;
0048f532          __return = 1;
0048f536          *(uint32_t*)eax_10(__return);
0048f52e      }
0048f52e      
0048f538      __return = nullptr;
0048f546      class PStringBase<unsigned short>* __return_3 = StringInfo::GetString(&var_94, &__return_1, __return);
0048f54b      class UIElement_Text* m_pFellowshipName = this->m_pFellowshipName;
0048f551      __return = __return_3;
0048f552      UIElement_Text::SetText(m_pFellowshipName, __return);
0048f55b      int32_t* esi_4 = (__return_1 - 0x14);
0048f561      __return = &esi_4[1];
0048f561      
0048f56a      if ((InterlockedDecrement(__return) == 0 && esi_4 != 0))
0048f56a      {
0048f56c          int32_t eax_12 = *(uint32_t*)esi_4;
0048f56e          __return = 1;
0048f572          *(uint32_t*)eax_12(__return);
0048f56a      }
0048f56a      
0048f57a      UIElement_ListBox::Flush(this->m_pFellowsListBox);
0048f583      void var_134;
0048f583      __return = &var_134;
0048f58d      PackableHashTable<unsigned long,Fellow>::begin(&this->m_pFellowship->_fellowship_table, __return);
0048f592      int32_t* i_1;
0048f592      int32_t* i = i_1;
0048f592      
0048f598      while (i != 0)
0048f598      {
0048f59e          class UIElement_ListBox* m_pFellowsListBox = this->m_pFellowsListBox;
0048f5a4          __return = nullptr;
0048f5a8          class UIElement* eax_13 = UIElement_ListBox::AddItemFromTemplateList(m_pFellowsListBox, 0, __return);
0048f5a8          
0048f5b1          if (eax_13 != 0)
0048f5b1          {
0048f5b7              class PStringBase<unsigned short>* __return_8 = *(uint32_t*)i;
0048f5b9              __return = __return_8;
0048f5c5              UIElement::SetAttribute_InstanceID(eax_13, 0x1000000d, __return);
0048f5ca              __return = 0x10000283;
0048f5d1              class UIElement* eax_14 = UIElement::GetChildRecursive(eax_13, __return);
0048f5d1              
0048f5d8              if (eax_14 != 0)
0048f5d8              {
0048f5de                  struct UIElement::VTable* vtable = eax_14->vtable;
0048f5e0                  __return = 0xc;
0048f5e4                  class PStringBase<unsigned short> __return_4 = vtable->DynamicCast(__return);
0048f5ec                  __return_1 = __return_4;
0048f5ec                  
0048f5f0                  if (__return_4 != 0)
0048f5f0                  {
0048f5fa                      void var_124;
0048f5fa                      StringInfo::StringInfo(&var_124);
0048f604                      __return = 0x10000001;
0048f60e                      StringInfo::SetStringIDandTableEnum(&var_124, 0, __return);
0048f613                      void* esi_6 = i[2];
0048f619                      __return = ((char*)esi_6 + 4);
0048f620                      __return = InterlockedIncrement(__return);
0048f629                      int32_t* esi_7;
0048f629                      i = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, ((char*)esi_6 + 0x14));
0048f639                      StringInfo::AddVariable_String(&var_124, 0, __return);
0048f63e                      __return = ((char*)esi_6 + 4);
0048f63e                      
0048f64d                      if ((InterlockedDecrement(__return) == 0 && esi_7 != 0))
0048f64d                      {
0048f64f                          int32_t edx_5 = *(uint32_t*)esi_7;
0048f651                          __return = 1;
0048f655                          *(uint32_t*)edx_5(__return);
0048f64d                      }
0048f64d                      
0048f657                      __return = nullptr;
0048f662                      class PStringBase<unsigned short> __return_2;
0048f662                      class PStringBase<unsigned short>* __return_5 = StringInfo::GetString(&var_124, &__return_2, __return);
0048f667                      class PStringBase<unsigned short> __return_6 = __return_1;
0048f66b                      __return = __return_5;
0048f66c                      UIElement_Text::SetText(__return_6, __return);
0048f675                      int32_t* esi_9 = (__return_2 - 0x14);
0048f67b                      __return = &esi_9[1];
0048f67b                      
0048f684                      if ((InterlockedDecrement(__return) == 0 && esi_9 != 0))
0048f684                      {
0048f686                          int32_t edx_6 = *(uint32_t*)esi_9;
0048f688                          __return = 1;
0048f68c                          *(uint32_t*)edx_6(__return);
0048f684                      }
0048f684                      
0048f692                      StringInfo::~StringInfo(&var_124);
0048f5f0                  }
0048f5d8              }
0048f5d8              
0048f69b              __return = __return_8;
0048f69e              gmFellowshipUI::UpdateFellowStats(this, __return);
0048f6a3              __return = __return_8;
0048f6a6              gmFellowshipUI::UpdateFellowVitals(this, __return);
0048f5b1          }
0048f5b1          
0048f6ab          int32_t* i_2 = i[0xd];
0048f6ab          
0048f6b0          if (i_2 == 0)
0048f6b0          {
0048f6c0              int32_t eax_19 = (i[0xe] + 1);
0048f6c3              int32_t var_128;
0048f6c3              
0048f6c3              if (eax_19 >= var_128)
0048f6c3              {
0048f6d6              label_48f6d6:
0048f6d6                  i = nullptr;
0048f6c3              }
0048f6c3              else
0048f6c3              {
0048f6cd                  int32_t var_12c;
0048f6cd                  
0048f6cd                  while (*(uint32_t*)(var_12c + (eax_19 << 2)) == 0)
0048f6cd                  {
0048f6cf                      eax_19 += 1;
0048f6cf                      
0048f6d2                      if (eax_19 >= var_128)
0048f6d2                          goto label_48f6d6;
0048f6cd                  }
0048f6cd                  
0048f6e0                  i = *(uint32_t*)(var_12c + (eax_19 << 2));
0048f6c3              }
0048f6b0          }
0048f6b0          else
0048f6b2              i = i_2;
0048f598      }
0048f598      
0048f6e9      gmFellowshipUI::UpdateFellowSelection(this);
0048f6f5      StringInfo::~StringInfo(&var_94);
0048f440  }

0048f72f                                               90                                                                 .

0048f730  void __fastcall gmFellowshipUI::CreateFellowship(class gmFellowshipUI* this)

0048f730  {
0048f752      class AC1Legacy::PStringBase<char> __return;
0048f752      class PStringBase<unsigned short> __return_1;
0048f752      PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pFellowshipNameEntryBox, &__return_1), &__return, 0);
0048f757      char* __return_5 = __return;
0048f75f      char* __return_6 = __return_5;
0048f76b      void var_24;
0048f76b      char i;
0048f76b      
0048f76b      do
0048f76b      {
0048f763          i = *(uint8_t*)__return_6;
0048f765          *(uint8_t*)((&var_24 - __return_5) + __return_6) = i;
0048f768          __return_6 = &__return_6[1];
0048f76b      } while (i != 0);
0048f76b      
0048f782      if ((InterlockedDecrement(&__return_5[0xfffffff0]) == 0 && __return_5 != 0x14))
0048f78a          **(uint32_t**)(__return_5 - 0x14)(1);
0048f78a      
0048f790      int32_t* edi_2 = (__return_1 - 0x14);
0048f790      
0048f79f      if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0048f7a7          **(uint32_t**)edi_2(1);
0048f7a7      
0048f7ae      ACCharGenData::FormatName(&var_24);
0048f7c1      class PStringBase<unsigned short>* eax_4;
0048f7c1      int32_t esi;
0048f7c1      eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, WidthConvert, &var_24);
0048f7cd      UIElement_Text::SetText(this->m_pFellowshipNameEntryBox, eax_4);
0048f7d6      int32_t* edi_4 = (__return_1 - 0x14);
0048f7d6      
0048f7e5      if ((esi(&edi_4[1]) == 0 && edi_4 != 0))
0048f7ed          **(uint32_t**)edi_4(1);
0048f7ed      
0048f7f7      uint8_t eax_8 = PlayerModule::FellowshipShareXP(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0048f817      void* __return_2;
0048f817      PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pFellowshipNameEntryBox, &__return_2), &__return_1, 0);
0048f81f      class PStringBase<unsigned short> __return_4 = __return_1;
0048f82f      CM_Fellowship::Event_Create(AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, __return_4), ((uint32_t)eax_8));
0048f834      class AC1Legacy::PStringBase<char> __return_3 = __return;
0048f834      
0048f849      if ((esi((__return_3 + 4)) == 0 && __return_3 != 0))
0048f851          **(uint32_t**)__return_3(1);
0048f851      
0048f862      if ((esi((__return_4 - 0x10)) == 0 && __return_4 != 0x14))
0048f86a          **(uint32_t**)(__return_4 - 0x14)(1);
0048f86a      
0048f870      int32_t* edi_8 = ((char*)__return_2 - 0x14);
0048f870      
0048f87f      if ((esi(&edi_8[1]) == 0 && edi_8 != 0))
0048f887          **(uint32_t**)edi_8(1);
0048f730  }

0048f891                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0048f8a0  void __fastcall gmFellowshipUI::FellowshipDisbanded(class gmFellowshipUI* this)

0048f8a0  {
0048f8a0      class gmFellowshipUI* this_1 = this;
0048f8a4      class CFellowship* m_pFellowship = this->m_pFellowship;
0048f8a4      
0048f8ac      if (m_pFellowship != 0)
0048f8ac      {
0048f8b2          this->m_iidSelectedFellow = 0;
0048f8bc          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0048f8c3          uint32_t player_id;
0048f8c3          
0048f8c3          if (SmartBox::smartbox_1 == 0)
0048f8cd              player_id = 0;
0048f8c3          else
0048f8c5              player_id = SmartBox::smartbox_1->player_id;
0048f8c5          
0048f8d2          if (m_pFellowship->_leader != player_id)
0048f8d2          {
0048f8fd              char (* var_10_2)[0x1] = &Fellowship::GetFellow(m_pFellowship, m_pFellowship->_leader)->_name.m_buffer->m_data;
0048f90a              PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, Formatted, u"%hs has disbanded your Fellowshi…");
0048f924              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &this_1, 0, 1, 0);
0048f92d              void* __offset(gmFellowshipUI, -0x14) esi_2 = ((char*)this_1 - 0x14);
0048f92d              
0048f940              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0048f948                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0048f8d2          }
0048f8d2          else
0048f8e6              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), "You have disbanded your Fellowsh…", 0, 1, 0);
0048f8e6          
0048f94b          class CFellowship* m_pFellowship_1 = this->m_pFellowship;
0048f94b          
0048f953          if (m_pFellowship_1 != 0)
0048f955              m_pFellowship_1->vtable->__vecDelDtor(1);
0048f955          
0048f95d          this->m_pFellowship = nullptr;
0048f967          gmFellowshipUI::Update(this);
0048f8ac      }
0048f8a0  }

0048f96f                                               90                                                                 .

0048f970  void __fastcall gmFellowshipUI::FellowDismissed(class gmFellowshipUI* this, uint32_t arg2)

0048f970  {
0048f974      class CFellowship* m_pFellowship = this->m_pFellowship;
0048f974      
0048f97e      if (m_pFellowship != 0)
0048f97e      {
0048f984          this->m_iidSelectedFellow = 0;
0048f98a          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0048f991          uint32_t player_id;
0048f991          
0048f991          if (SmartBox::smartbox_1 == 0)
0048f99b              player_id = 0;
0048f991          else
0048f993              player_id = SmartBox::smartbox_1->player_id;
0048f993          
0048f99e          uint32_t edi_1 = arg2;
0048f99e          
0048f9a4          if (player_id != edi_1)
0048f9a4          {
0048fa3c              if (Fellowship::IsFellow(m_pFellowship, edi_1) != 0)
0048fa3c              {
0048fa43                  class CFellowship* m_pFellowship_3 = this->m_pFellowship;
0048fa4c                  class Fellow* eax_7 = Fellowship::GetFellow(m_pFellowship_3, edi_1);
0048fa4c                  
0048fa57                  if (this->m_iidSelectedFellow == edi_1)
0048fa59                      this->m_iidSelectedFellow = 0;
0048fa59                  
0048fa5f                  class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
0048fa67                  uint32_t player_id_1;
0048fa67                  
0048fa67                  if (SmartBox::smartbox_2 == 0)
0048fa71                      player_id_1 = 0;
0048fa67                  else
0048fa69                      player_id_1 = SmartBox::smartbox_2->player_id;
0048fa69                  
0048fa7f                  char (* __saved_ebx_5)[0x1] = &eax_7->_name.m_buffer->m_data;
0048fa84                  wchar16 const* const var_14_2;
0048fa84                  
0048fa84                  if (m_pFellowship_3->_leader != player_id_1)
0048fa8d                      var_14_2 = u"%hs has been dismissed from the …";
0048fa84                  else
0048fa86                      var_14_2 = u"You dismiss %hs from your Fellow…";
0048fa86                  
0048fa94                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, var_14_2);
0048faac                  ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &arg2, 0, 1, 0);
0048fab6                  class Fellowship* m_pFellowship_2 = ClientFellowshipSystem::GetFellowshipSystem()->m_pFellowship;
0048fab6                  
0048fabb                  if (m_pFellowship_2 != 0)
0048fabe                      Fellowship::RemoveFellow(m_pFellowship_2, edi_1);
0048fabe                  
0048fac5                  gmFellowshipUI::Update(this);
0048face                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0048fa3c              }
0048f9a4          }
0048f9a4          else
0048f9a4          {
0048f9aa              this->m_iidSelectedFellow = 0;
0048f9bf              char (* __saved_ebx_2)[0x1] = &Fellowship::GetFellow(m_pFellowship, m_pFellowship->_leader)->_name.m_buffer->m_data;
0048f9cb              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, u"%hs has dismissed you from the F…");
0048f9e3              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &arg2, 0, 1, 0);
0048f9e8              class CFellowship* m_pFellowship_1 = this->m_pFellowship;
0048f9e8              
0048f9f0              if (m_pFellowship_1 != 0)
0048f9f2                  m_pFellowship_1->vtable->__vecDelDtor(1);
0048f9f2              
0048f9fa              this->m_pFellowship = nullptr;
0048fa00              int32_t ebp_1 = gmFellowshipUI::Update(this);
0048fa09              int32_t* esi_2 = (arg2 - 0x14);
0048fa09              
0048fa20              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != ebp_1))
0048fa2c                  **(uint32_t**)esi_2(1);
0048f9a4          }
0048f97e      }
0048f970  }

0048fad9                                                                             90 90 90 90 90 90 90                           .......

0048fae0  void __thiscall gmFellowshipUI::FellowQuit(class gmFellowshipUI* this, uint32_t arg2)

0048fae0  {
0048fae3      class CFellowship* m_pFellowship = this->m_pFellowship;
0048fae3      
0048faeb      if (m_pFellowship != 0)
0048faeb      {
0048faf1          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0048faf8          uint32_t player_id;
0048faf8          
0048faf8          if (SmartBox::smartbox_1 == 0)
0048fb02              player_id = 0;
0048faf8          else
0048fafa              player_id = SmartBox::smartbox_1->player_id;
0048fafa          
0048fb05          uint32_t edi_1 = arg2;
0048fb0b          void* var_c_2;
0048fb0b          int32_t* esi_2;
0048fb0b          
0048fb0b          if (player_id == edi_1)
0048fb0b          {
0048fb0d              this->m_iidSelectedFellow = 0;
0048fb1d              char (* var_c_1)[0x1] = &m_pFellowship->_name.m_buffer->m_data;
0048fb2a              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, u"You are no longer a member of th…");
0048fb44              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &arg2, 0, 1, 0);
0048fb49              class CFellowship* m_pFellowship_1 = this->m_pFellowship;
0048fb49              
0048fb51              if (m_pFellowship_1 != 0)
0048fb53                  m_pFellowship_1->vtable->__vecDelDtor(1);
0048fb53              
0048fb5b              this->m_pFellowship = nullptr;
0048fb65              gmFellowshipUI::Update(this);
0048fb6e              esi_2 = (arg2 - 0x14);
0048fb74              var_c_2 = &esi_2[1];
0048fb75              goto label_48fbfc;
0048fb0b          }
0048fb0b          
0048fb82          if (Fellowship::IsFellow(m_pFellowship, edi_1) != 0)
0048fb82          {
0048fb8e              if (this->m_iidSelectedFellow == edi_1)
0048fb90                  this->m_iidSelectedFellow = 0;
0048fb90              
0048fbac              char (* var_c_5)[0x1] = &Fellowship::GetFellow(this->m_pFellowship, edi_1)->_name.m_buffer->m_data;
0048fbb9              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, u"%hs has left your Fellowship.\n");
0048fbd3              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &arg2, 0, 1, 0);
0048fbdd              class Fellowship* m_pFellowship_2 = ClientFellowshipSystem::GetFellowshipSystem()->m_pFellowship;
0048fbdd              
0048fbe2              if (m_pFellowship_2 != 0)
0048fbe5                  Fellowship::RemoveFellow(m_pFellowship_2, edi_1);
0048fbe5              
0048fbec              gmFellowshipUI::Update(this);
0048fbf5              esi_2 = (arg2 - 0x14);
0048fbfb              var_c_2 = &esi_2[1];
0048fbfc          label_48fbfc:
0048fbfc              
0048fc08              if ((InterlockedDecrement(var_c_2) == 0 && esi_2 != 0))
0048fc10                  **(uint32_t**)esi_2(1);
0048fb82          }
0048faeb      }
0048fae0  }

0048fc17                                                                       90 90 90 90 90 90 90 90 90                         .........

0048fc20  void __thiscall gmFellowshipUI::FellowAdded(class gmFellowshipUI* this, uint32_t arg2)

0048fc20  {
0048fc27      void* esi_1 = gmFellowshipUI::Update(this);
0048fc30      int32_t var_30;
0048fc30      Fellow::Fellow(&var_30);
0048fc45      Fellowship::InqFellow(*(uint32_t*)((char*)esi_1 + 0x5fc), arg2, &var_30);
0048fc51      int32_t* var_2c;
0048fc51      void* var_40_1 = &var_2c[5];
0048fc5e      void* var_34;
0048fc5e      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_34, Formatted, u"%hs is now a member of your Fell…");
0048fc78      ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &var_34, 0, 1, 0);
0048fc87      int32_t* esi_3 = ((char*)var_34 - 0x14);
0048fc87      
0048fc96      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0048fc9e          **(uint32_t**)esi_3(1);
0048fc9e      
0048fca8      var_30 = 0x7a515c;
0048fca8      
0048fcb8      if ((InterlockedDecrement(&var_2c[1]) == 0 && var_2c != 0))
0048fcc0          **(uint32_t**)var_2c(1);
0048fc20  }

0048fcca                                90 90 90 90 90 90                                                            ......

0048fcd0  void __thiscall gmFellowshipUI::FellowUpdated(class gmFellowshipUI* this, uint32_t arg2, class Fellow const* arg3, uint32_t arg4)

0048fcd0  {
0048fcdb      if (arg4 == 3)
0048fcdb      {
0048fced          Fellowship::UpdateFellow(this->m_pFellowship, arg2, arg3);
0048fcf5          gmFellowshipUI::UpdateFellowVitals(this, arg2);
0048fcfc          return;
0048fcdb      }
0048fcdb      
0048fd02      if (arg4 == 2)
0048fd02      {
0048fd14          Fellowship::UpdateFellow(this->m_pFellowship, arg2, arg3);
0048fd1c          gmFellowshipUI::UpdateFellowStats(this, arg2);
0048fd23          return;
0048fd02      }
0048fd02      
0048fd29      if (arg4 == 1)
0048fd2d          gmFellowshipUI::Update(this);
0048fcd0  }

0048fd37                                                                       90 90 90 90 90 90 90 90 90                         .........

0048fd40  void __fastcall gmFellowshipUI::PostInit(class gmFellowshipUI* this)

0048fd40  {
0048fd4b      UIElement::PostInit(this);
0048fd54      void var_90;
0048fd54      StringInfo::StringInfo(&var_90);
0048fd60      class UIElement* eax;
0048fd60      enum PlayerOption edx;
0048fd60      eax = UIElement::GetChildRecursive(this, 0x10000270);
0048fd67      void* eax_1;
0048fd67      
0048fd67      if (eax != 0)
0048fd72          eax_1 = eax->vtable->DynamicCast(0x10000035);
0048fd72      
0048fd7a      int32_t* edi;
0048fd7a      
0048fd7a      if ((eax == 0 || eax_1 == 0))
0048fd81          edi = nullptr;
0048fd7a      else
0048fd7c          edi = ((char*)eax_1 - 0x20);
0048fd7c      
0048fd83      int32_t var_a0 = 2;
0048fd87      UIOption_Checkbox::SetPlayerOption(edi, edx);
0048fda3      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_IgnoreFellowship…"), 0x10000003);
0048fdb0      UIElement_Text::SetStringInfo(&edi[8], &var_90);
0048fdcc      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_IgnoreFellowship…"), 0x10000003);
0048fdda      *(uint32_t*)(*(uint32_t*)edi + 0x2b4)(&var_90);
0048fde7      class UIElement* eax_4;
0048fde7      enum PlayerOption edx_3;
0048fde7      eax_4 = UIElement::GetChildRecursive(this, 0x10000271);
0048fdee      void* eax_5;
0048fdee      
0048fdee      if (eax_4 != 0)
0048fdf9          eax_5 = eax_4->vtable->DynamicCast(0x10000035);
0048fdf9      
0048fe01      int32_t* edi_1;
0048fe01      
0048fe01      if ((eax_4 == 0 || eax_5 == 0))
0048fe08          edi_1 = nullptr;
0048fe01      else
0048fe03          edi_1 = ((char*)eax_5 - 0x20);
0048fe03      
0048fe0a      int32_t var_a0_3 = 0x12;
0048fe0e      UIOption_Checkbox::SetPlayerOption(edi_1, edx_3);
0048fe2a      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_FellowshipAutoAc…"), 0x10000003);
0048fe37      UIElement_Text::SetStringInfo(&edi_1[8], &var_90);
0048fe53      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_FellowshipAutoAc…"), 0x10000003);
0048fe61      *(uint32_t*)(*(uint32_t*)edi_1 + 0x2b4)(&var_90);
0048fe6e      class UIElement* eax_8;
0048fe6e      enum PlayerOption edx_6;
0048fe6e      eax_8 = UIElement::GetChildRecursive(this, 0x10000272);
0048fe75      void* eax_9;
0048fe75      
0048fe75      if (eax_8 != 0)
0048fe80          eax_9 = eax_8->vtable->DynamicCast(0x10000035);
0048fe80      
0048fe88      int32_t* edi_2;
0048fe88      
0048fe88      if ((eax_8 == 0 || eax_9 == 0))
0048fe8f          edi_2 = nullptr;
0048fe88      else
0048fe8a          edi_2 = ((char*)eax_9 - 0x20);
0048fe8a      
0048fe91      int32_t var_a0_6 = 0xf;
0048fe95      UIOption_Checkbox::SetPlayerOption(edi_2, edx_6);
0048feb1      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_FellowshipShareX…"), 0x10000003);
0048febe      UIElement_Text::SetStringInfo(&edi_2[8], &var_90);
0048feda      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_FellowshipShareX…"), 0x10000003);
0048fee8      *(uint32_t*)(*(uint32_t*)edi_2 + 0x2b4)(&var_90);
0048fef5      class UIElement* eax_12;
0048fef5      enum PlayerOption edx_9;
0048fef5      eax_12 = UIElement::GetChildRecursive(this, 0x10000273);
0048fefc      void* eax_13;
0048fefc      
0048fefc      if (eax_12 != 0)
0048ff07          eax_13 = eax_12->vtable->DynamicCast(0x10000035);
0048ff07      
0048ff0f      int32_t* edi_3;
0048ff0f      
0048ff0f      if ((eax_12 == 0 || eax_13 == 0))
0048ff16          edi_3 = nullptr;
0048ff0f      else
0048ff11          edi_3 = ((char*)eax_13 - 0x20);
0048ff11      
0048ff18      int32_t var_a0_9 = 0x11;
0048ff1c      UIOption_Checkbox::SetPlayerOption(edi_3, edx_9);
0048ff38      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_FellowshipShareL…"), 0x10000003);
0048ff45      UIElement_Text::SetStringInfo(&edi_3[8], &var_90);
0048ff61      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_FellowshipShareL…"), 0x10000003);
0048ff6f      *(uint32_t*)(*(uint32_t*)edi_3 + 0x2b4)(&var_90);
0048ff88      this->m_pNotInAFellowshipFrame = UIElement::GetChildRecursive(this, 0x1000026b);
0048ff9a      this->m_pInAFellowshipFrame = UIElement::GetChildRecursive(this, 0x10000275);
0048ffa0      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x1000026f);
0048ffa7      class UIElement_Text* eax_19;
0048ffa7      
0048ffa7      if (eax_18 == 0)
0048ffb7          eax_19 = nullptr;
0048ffa7      else
0048ffaf          eax_19 = eax_18->vtable->DynamicCast(0xc);
0048ffaf      
0048ffc0      this->m_pFellowshipNameEntryBox = eax_19;
0048ffc6      class UIElement* eax_20 = UIElement::GetChildRecursive(this, 0x10000274);
0048ffcd      class UIElement_Button* eax_21;
0048ffcd      
0048ffcd      if (eax_20 == 0)
0048ffdd          eax_21 = nullptr;
0048ffcd      else
0048ffd5          eax_21 = eax_20->vtable->DynamicCast(1);
0048ffd5      
0048ffe6      this->m_pCreateFellowshipButton = eax_21;
0048ffec      class UIElement* eax_22 = UIElement::GetChildRecursive(this, 0x10000276);
0048fff3      class UIElement_Text* eax_23;
0048fff3      
0048fff3      if (eax_22 == 0)
00490003          eax_23 = nullptr;
0048fff3      else
0048fffb          eax_23 = eax_22->vtable->DynamicCast(0xc);
0048fffb      
0049000c      this->m_pFellowshipName = eax_23;
00490012      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x10000279);
00490019      class UIElement_ListBox* eax_25;
00490019      
00490019      if (eax_24 == 0)
00490029          eax_25 = nullptr;
00490019      else
00490021          eax_25 = eax_24->vtable->DynamicCast(5);
00490021      
00490032      this->m_pFellowsListBox = eax_25;
00490038      class UIElement* eax_26 = UIElement::GetChildRecursive(this, 0x1000027b);
0049003f      class UIElement_Button* eax_27;
0049003f      
0049003f      if (eax_26 == 0)
0049004f          eax_27 = nullptr;
0049003f      else
00490047          eax_27 = eax_26->vtable->DynamicCast(1);
00490047      
00490058      this->m_pFellowLeaderButton = eax_27;
0049005e      class UIElement* eax_28 = UIElement::GetChildRecursive(this, 0x1000027c);
00490065      class UIElement_Button* eax_29;
00490065      
00490065      if (eax_28 == 0)
00490075          eax_29 = nullptr;
00490065      else
0049006d          eax_29 = eax_28->vtable->DynamicCast(1);
0049006d      
0049007e      this->m_pFellowQuitButton = eax_29;
00490084      class UIElement* eax_30 = UIElement::GetChildRecursive(this, 0x1000027d);
0049008b      class UIElement_Button* eax_31;
0049008b      
0049008b      if (eax_30 == 0)
0049009b          eax_31 = nullptr;
0049008b      else
00490093          eax_31 = eax_30->vtable->DynamicCast(1);
00490093      
004900a4      this->m_pFellowOpenButton = eax_31;
004900aa      class UIElement* eax_32 = UIElement::GetChildRecursive(this, 0x1000027e);
004900b1      class UIElement_Button* eax_33;
004900b1      
004900b1      if (eax_32 == 0)
004900c1          eax_33 = nullptr;
004900b1      else
004900b9          eax_33 = eax_32->vtable->DynamicCast(1);
004900b9      
004900ca      this->m_pFellowRecruitButton = eax_33;
004900d0      class UIElement* eax_34 = UIElement::GetChildRecursive(this, 0x1000027f);
004900d7      class UIElement_Button* eax_35;
004900d7      
004900d7      if (eax_34 == 0)
004900e7          eax_35 = nullptr;
004900d7      else
004900df          eax_35 = eax_34->vtable->DynamicCast(1);
004900df      
004900f0      this->m_pFellowDismissButton = eax_35;
004900f6      class UIElement* eax_36 = UIElement::GetChildRecursive(this, 0x10000280);
004900fd      class UIElement_Button* eax_37;
004900fd      
004900fd      if (eax_36 == 0)
0049010d          eax_37 = nullptr;
004900fd      else
00490105          eax_37 = eax_36->vtable->DynamicCast(1);
00490105      
00490113      this->m_pFellowDisbandButton = eax_37;
00490119      UIListener::RegisterForGlobalMessage(this, 1);
0049011e      class GlobalEventHandler* eax_38 = GlobalEventHandler::GetGlobalEventHandler();
00490125      eax_38->vtable->RegisterNoticeHandler(0x4dd20f, &this->vtable);
00490138      eax_38->vtable->RegisterNoticeHandler(0x4dd210, &this->vtable);
00490145      eax_38->vtable->RegisterNoticeHandler(0x4dd211, &this->vtable);
00490152      eax_38->vtable->RegisterNoticeHandler(0x4dd246, &this->vtable);
0049015f      eax_38->vtable->RegisterNoticeHandler(0x4dd212, &this->vtable);
0049016c      eax_38->vtable->RegisterNoticeHandler(0x4dd213, &this->vtable);
00490179      eax_38->vtable->RegisterNoticeHandler(0x4dd214, &this->vtable);
00490186      eax_38->vtable->RegisterNoticeHandler(0x4dd1ef, &this->vtable);
00490193      eax_38->vtable->RegisterNoticeHandler(0x186a4, &this->vtable);
004901a2      gmFellowshipUI::Update(this);
004901ab      StringInfo::~StringInfo(&var_90);
0048fd40  }

004901ba                                                                                90 90 90 90 90 90                            ......

004901c0  void __fastcall gmFellowshipUI::ListenToElementMessage(class gmFellowshipUI* this, struct UIElementMessageInfo const* arg2)

004901c0  {
004901c0      class gmFellowshipUI* __return = this;
004901c2      struct UIElementMessageInfo* ebp = arg2;
004901c2      
004901de      switch ((ebp->idMessage - 1))
004901de      {
00490303          case nullptr:
00490303          {
00490311              switch ((ebp->idElement - 0x10000274))
00490311              {
0049031a                  case 0:
0049031a                  {
0049031a                      gmFellowshipUI::CreateFellowship(this);
00490323                      UIElement::ListenToElementMessage(this, ebp);
0049032b                      return;
0049031a                      break;
0049031a                  }
00490337                  case 7:
00490337                  {
00490337                      gmFellowshipUI::AssignLeadershipToFellow(this, this->m_iidSelectedFellow);
00490340                      UIElement::ListenToElementMessage(this, ebp);
00490348                      return;
00490337                      break;
00490337                  }
0049034b                  case 8:
0049034b                  {
0049034b                      class Fellowship* m_pFellowship_1 = this->m_pFellowship;
0049034b                      
00490353                      if (m_pFellowship_1 != 0)
00490353                      {
00490355                          uint32_t eax_17 = GetPlayerID();
00490355                          
0049035d                          if (m_pFellowship_1->_leader == eax_17)
0049035d                          {
00490361                              uint32_t eax_18 = Fellowship::GetNonLeaderFellowID(m_pFellowship_1);
00490361                              
00490368                              if (eax_18 != 0)
0049036d                                  gmFellowshipUI::AssignLeadershipToFellow(this, eax_18);
0049035d                          }
00490353                      }
00490353                      
004903f1                      CM_Fellowship::Event_Quit(0);
0049034b                      break;
0049034b                  }
00490376                  case 9:
00490376                  {
00490376                      class CFellowship* m_pFellowship = this->m_pFellowship;
00490376                      
0049037e                      if (m_pFellowship != 0)
0049037e                      {
00490387                          int32_t ecx_25;
00490387                          ecx_25 = m_pFellowship->_open_fellow == 0;
0049038a                          m_pFellowship->_open_fellow = ecx_25;
00490397                          CM_Fellowship::Event_ChangeFellowOpeness(this->m_pFellowship->_open_fellow);
004903a1                          gmFellowshipUI::UpdateButtons(this);
004903aa                          UIElement::ListenToElementMessage(this, ebp);
004903b2                          return;
0049037e                      }
00490376                      break;
00490376                  }
004903be                  case 0xa:
004903be                  {
004903be                      gmFellowshipUI::RecruitFellow(this, ACCWeenieObject::selectedID);
004903c7                      UIElement::ListenToElementMessage(this, ebp);
004903cf                      return;
004903be                      break;
004903be                  }
004903db                  case 0xb:
004903db                  {
004903db                      gmFellowshipUI::DismissFellow(this, this->m_iidSelectedFellow);
004903e4                      UIElement::ListenToElementMessage(this, ebp);
004903ec                      return;
004903db                      break;
004903db                  }
004903ef                  case 0xc:
004903ef                  {
004903f1                      CM_Fellowship::Event_Quit(1);
004903ef                      break;
004903ef                  }
00490311              }
00490303              break;
00490303          }
004901e5          case 3:
004901e5          case 0x42:
004901e5          {
004901e5              class UIElement_ListBox* m_pFellowsListBox = this->m_pFellowsListBox;
004901f5              class UIElement* eax_4 = UIElement_ListBox::GetItem(m_pFellowsListBox, UIElement_ListBox::GetSelectedIndex(m_pFellowsListBox));
004901f5              
004901fc              if (eax_4 == 0)
004901fc              {
0049026a                  this->m_iidSelectedFellow = 0;
00490274                  gmFellowshipUI::UpdateButtons(this);
0049027d                  UIElement::ListenToElementMessage(this, ebp);
00490285                  return;
004901fc              }
004901fc              
0049020a              UIElement::GetAttribute_InstanceID(eax_4, 0x1000000d, &arg2);
0049020f              struct UIElementMessageInfo* eax_5 = arg2;
0049020f              
00490215              if (eax_5 != 0)
00490215              {
0049021a                  ACCWeenieObject::SetSelectedObject(eax_5, 0);
0049021a                  
0049022c                  if (ClientUISystem::GetUISystem()->targetMode != TARGET_MODE_NONE)
0049022c                  {
00490233                      enum Target_Mode targetMode = ClientUISystem::GetUISystem()->targetMode;
00490243                      ClientUISystem::ExecuteTargetModeForItem(ClientUISystem::GetUISystem(), arg2, targetMode);
0049022c                  }
00490215              }
00490215              
0049024e              this->m_iidSelectedFellow = arg2;
00490254              gmFellowshipUI::UpdateButtons(this);
0049025d              UIElement::ListenToElementMessage(this, ebp);
00490265              return;
004901e5              break;
004901e5          }
004902a3          case 0x11:
004902a3          case 0x43:
004902a3          {
004902a3              int32_t ebx;
004902a3              ebx = UIElement_Text::GetText(this->m_pFellowshipNameEntryBox, &__return)->m_charbuffer->m_data[0x7ffffffffffffffe] == 1;
004902a6              void* __offset(gmFellowshipUI, -0x14) edi_2 = ((char*)__return - 0x14);
004902a6              
004902b9              if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
004902c1                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
004902c1              
004902c3              class UIElement_Button* m_pCreateFellowshipButton = this->m_pCreateFellowshipButton;
004902c3              
004902cc              if (ebx != 0)
004902cc              {
004902ce                  m_pCreateFellowshipButton->vtable->SetState(0xd);
004902dc                  UIElement::ListenToElementMessage(this, ebp);
004902e4                  return;
004902cc              }
004902cc              
004902e7              m_pCreateFellowshipButton->vtable->SetState(1);
004902f5              UIElement::ListenToElementMessage(this, ebp);
004902fd              return;
004902a3              break;
004902a3          }
004901de      }
004901de      
004903fd      UIElement::ListenToElementMessage(this, ebp);
004901c0  }

00490408  uint32_t jump_table_490408[0x4] = 
00490408  {
00490408      [0x0] =  0x00490300
0049040c      [0x1] =  0x004901e5
00490410      [0x2] =  0x00490288
00490414      [0x3] =  0x004903f9
00490418  }
00490418  uint8_t lookup_table_490418[0x44] = 
00490418  {
00490418      [0x00] =  0x00
00490419      [0x01] =  0x03
0049041a      [0x02] =  0x03
0049041b      [0x03] =  0x01
0049041c      [0x04] =  0x03
0049041d      [0x05] =  0x03
0049041e      [0x06] =  0x03
0049041f      [0x07] =  0x03
00490420      [0x08] =  0x03
00490421      [0x09] =  0x03
00490422      [0x0a] =  0x03
00490423      [0x0b] =  0x03
00490424      [0x0c] =  0x03
00490425      [0x0d] =  0x03
00490426      [0x0e] =  0x03
00490427      [0x0f] =  0x03
00490428      [0x10] =  0x03
00490429      [0x11] =  0x02
0049042a      [0x12] =  0x03
0049042b      [0x13] =  0x03
0049042c      [0x14] =  0x03
0049042d      [0x15] =  0x03
0049042e      [0x16] =  0x03
0049042f      [0x17] =  0x03
00490430      [0x18] =  0x03
00490431      [0x19] =  0x03
00490432      [0x1a] =  0x03
00490433      [0x1b] =  0x03
00490434      [0x1c] =  0x03
00490435      [0x1d] =  0x03
00490436      [0x1e] =  0x03
00490437      [0x1f] =  0x03
00490438      [0x20] =  0x03
00490439      [0x21] =  0x03
0049043a      [0x22] =  0x03
0049043b      [0x23] =  0x03
0049043c      [0x24] =  0x03
0049043d      [0x25] =  0x03
0049043e      [0x26] =  0x03
0049043f      [0x27] =  0x03
00490440      [0x28] =  0x03
00490441      [0x29] =  0x03
00490442      [0x2a] =  0x03
00490443      [0x2b] =  0x03
00490444      [0x2c] =  0x03
00490445      [0x2d] =  0x03
00490446      [0x2e] =  0x03
00490447      [0x2f] =  0x03
00490448      [0x30] =  0x03
00490449      [0x31] =  0x03
0049044a      [0x32] =  0x03
0049044b      [0x33] =  0x03
0049044c      [0x34] =  0x03
0049044d      [0x35] =  0x03
0049044e      [0x36] =  0x03
0049044f      [0x37] =  0x03
00490450      [0x38] =  0x03
00490451      [0x39] =  0x03
00490452      [0x3a] =  0x03
00490453      [0x3b] =  0x03
00490454      [0x3c] =  0x03
00490455      [0x3d] =  0x03
00490456      [0x3e] =  0x03
00490457      [0x3f] =  0x03
00490458      [0x40] =  0x03
00490459      [0x41] =  0x03
0049045a      [0x42] =  0x01
0049045b      [0x43] =  0x02
0049045c  }
0049045c  uint32_t jump_table_49045c[0xd] = 
0049045c  {
0049045c      [0x0] =  0x00490318
00490460      [0x1] =  0x004903f9
00490464      [0x2] =  0x004903f9
00490468      [0x3] =  0x004903f9
0049046c      [0x4] =  0x004903f9
00490470      [0x5] =  0x004903f9
00490474      [0x6] =  0x004903f9
00490478      [0x7] =  0x0049032e
0049047c      [0x8] =  0x0049034b
00490480      [0x9] =  0x00490376
00490484      [0xa] =  0x004903b5
00490488      [0xb] =  0x004903d2
0049048c      [0xc] =  0x004903ef
00490490  }

00490490  void __fastcall gmFellowshipUI::RecvNotice_FellowshipUpdate(class gmFellowshipUI* this, class CFellowship const* arg2)

00490490  {
00490495      struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
00490498      int32_t ebx;
00490498      ebx = 0;
00490498      
004904a3      if ((vtable == 0 || *(int32_t*)((char*)vtable + 0x14) == 0))
004904a5          ebx = 1;
004904a5      
004904a9      if (vtable == 0)
004904a9      {
004904ad          void* eax = operator new(0x44);
004904b7          int32_t eax_1;
004904b7          
004904b7          if (eax == 0)
004904c2              eax_1 = 0;
004904b7          else
004904bb              eax_1 = CFellowship::CFellowship(eax);
004904bb          
004904c4          this->m_hashElementsRegisteredWith.vtable = eax_1;
004904a9      }
004904a9      
004904cf      Fellowship::operator=(this->m_hashElementsRegisteredWith.vtable, arg2);
004904d4      struct HashSet<UIElement *>::VTable* vtable_1 = this->m_hashElementsRegisteredWith.vtable;
004904d4      
004904d9      if (vtable_1 != 0)
004904d9      {
004904df          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004904e6          uint32_t player_id;
004904e6          
004904e6          if (SmartBox::smartbox_1 == 0)
004904f0              player_id = 0;
004904e6          else
004904e8              player_id = SmartBox::smartbox_1->player_id;
004904e8          
004904f5          void* __offset(CFellowship, -0x10) var_10_2;
004904f5          void* __offset(CFellowship, -0x14) esi_1;
004904f5          
004904f5          if (*(int32_t*)((char*)vtable_1 + 0x1c) != player_id)
004904f5          {
00490540              if (ebx != 0)
00490540              {
00490548                  class Fellow* eax_5 = Fellowship::GetFellow(vtable_1, *(int32_t*)((char*)vtable_1 + 0x1c));
00490552                  wchar16 const* const ecx_9 = u"an open";
00490552                  
00490557                  if (*(int32_t*)((char*)vtable_1 + 0x28) == 0)
00490559                      ecx_9 = u"a closed";
00490559                  
00490567                  char (* var_10_4)[0x1] = &eax_5->_name.m_buffer->m_data;
00490568                  wchar16 const* const var_14_1 = ecx_9;
0049056c                  int32_t var_18_1 = (*(int32_t*)((char*)vtable_1 + 0x18) + 0x14);
00490579                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, u"You have been recruited into the…");
00490593                  ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &arg2, 0, 1, 0);
0049059c                  esi_1 = ((char*)arg2 - 0x14);
004905a2                  var_10_2 = ((char*)esi_1 + 4);
004905a2                  goto label_4905a3;
00490540              }
004904f5          }
004904f5          else if (ebx != 0)
004904f9          {
00490505              int32_t var_10_1 = (*(int32_t*)((char*)vtable_1 + 0x18) + 0x14);
00490512              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, u"You have created the Fellowship …");
0049052c              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &arg2, 0, 1, 0);
00490535              esi_1 = ((char*)arg2 - 0x14);
0049053b              var_10_2 = ((char*)esi_1 + 4);
004905a3          label_4905a3:
004905a3              
004905af              if ((InterlockedDecrement(var_10_2) == 0 && esi_1 != 0))
004905b7                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004904f9          }
004905bf          gmFellowshipUI::Update(((char*)this - 0x5f8));
004904d9      }
00490490  }

004905ca                                90 90 90 90 90 90                                                            ......

004905d0  void __fastcall gmFellowshipUI::RecvNotice_FellowshipDisbanded(class gmFellowshipUI* this)

004905d0  {
004905d6      /* tailcall */
004905d6      return gmFellowshipUI::FellowshipDisbanded(((char*)this - 0x5f8));
004905d0  }

004905db                                                                                   90 90 90 90 90                             .....

004905e0  void __thiscall gmFellowshipUI::RecvNotice_FellowQuit(class gmFellowshipUI* this, uint32_t arg2)

004905e0  {
004905e6      /* tailcall */
004905e6      return gmFellowshipUI::FellowQuit(((char*)this - 0x5f8), arg2);
004905e0  }

004905eb                                   90 90 90 90 90                                                             .....

004905f0  void __fastcall gmFellowshipUI::RecvNotice_FellowDismissed(class gmFellowshipUI* this, uint32_t arg2)

004905f0  {
004905f6      uint32_t edx;
004905f6      /* tailcall */
004905f6      return gmFellowshipUI::FellowDismissed(((char*)this - 0x5f8), edx);
004905f0  }

004905fb                                                                                   90 90 90 90 90                             .....

00490600  void __thiscall gmFellowshipUI::RecvNotice_FellowAdded(class gmFellowshipUI* this, uint32_t arg2)

00490600  {
00490606      /* tailcall */
00490606      return gmFellowshipUI::FellowAdded(((char*)this - 0x5f8), arg2);
00490600  }

0049060b                                   90 90 90 90 90                                                             .....

00490610  void __thiscall gmFellowshipUI::RecvNotice_FellowUpdated(class gmFellowshipUI* this, uint32_t arg2, class Fellow const* arg3, uint32_t arg4)

00490610  {
00490616      /* tailcall */
00490616      return gmFellowshipUI::FellowUpdated(((char*)this - 0x5f8), arg2, arg3, arg4);
00490610  }

0049061b                                                                                   90 90 90 90 90                             .....

00490620  uint8_t __thiscall gmFellowshipUI::MakeFellowRequestDialog(class gmFellowshipUI* this, class PStringBase<char> arg2, uint32_t arg3)

00490620  {
00490635      class PropertyCollection* var_124;
00490635      int32_t* esi_2;
00490635      
00490635      if (this->m_fellowRequestContext == 0)
00490635      {
00490651          void var_90;
00490651          StringInfo::StringInfo(&var_90);
0049065b          var_124 = 0x10000001;
00490674          var_124 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_124);
00490678          PStringBase<char>::PStringBase<char>(&var_124, arg2);
0049068b          StringInfo::AddVariable_String(&var_90, 0, var_124);
00490694          void var_108;
00490694          PropertyCollection::PropertyCollection(&var_108);
00490699          var_124 = 0x8e;
004906a2          int32_t* var_114 = nullptr;
004906a6          int32_t* var_110_1 = nullptr;
004906aa          BaseProperty::SetPropertyName(&var_114, var_124);
004906aa          
004906b3          if (var_110_1 != 0)
004906b3          {
004906b9              BaseProperty::CheckCopyOnWrite(&var_114);
004906c2              int32_t edx_1 = *(uint32_t*)var_110_1;
004906c4              var_124 = 1;
004906c6              *(uint32_t*)(edx_1 + 0xac)(var_124);
004906b3          }
004906b3          
004906d5          uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004906dd          var_124 = &var_114;
004906e7          void var_104;
004906e7          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, var_124);
004906ec          var_124 = 0xc5;
004906f5          BaseProperty::SetPropertyName(&var_114, var_124);
004906f5          
004906fe          if (var_110_1 != 0)
004906fe          {
00490704              BaseProperty::CheckCopyOnWrite(&var_114);
0049070d              int32_t edx_2 = *(uint32_t*)var_110_1;
00490716              var_124 = &var_90;
00490717              *(uint32_t*)(edx_2 + 0xc4)(var_124);
004906fe          }
004906fe          
00490721          uint32_t eax_3 = BaseProperty::GetPropertyName(&var_114);
0049072a          var_124 = &var_114;
00490734          var_10c = eax_3;
00490738          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, var_124);
00490741          var_124 = &var_108;
00490742          uint32_t eax_4 = DialogFactory::MakeDialogInCurrentUI(var_124);
0049074c          this->m_fellowRequestContext = eax_4;
0049074c          
00490752          if (eax_4 != 0)
00490752          {
004907e5              this->m_uiAcceptFellowRequestServerContextID = arg3;
004907eb              int32_t* eax_12 = var_114;
004907eb              
004907f1              if (eax_12 != 0)
004907f1              {
004907fb                  int32_t esi_8 = (eax_12[1] - 1);
004907f8                  eax_12[1] = esi_8;
004907f8                  
00490802                  if (esi_8 == 0)
00490802                  {
00490804                      int32_t edx_8 = *(uint32_t*)eax_12;
00490806                      var_124 = 1;
00490808                      *(uint32_t*)edx_8(var_124);
00490802                  }
00490802                  
0049080a                  var_114 = nullptr;
004907f1              }
004907f1              
00490814              if (var_110_1 != 0)
00490814              {
0049081e                  int32_t esi_10 = (var_110_1[1] - 1);
0049081b                  var_110_1[1] = esi_10;
0049081b                  
00490825                  if (esi_10 == 0)
00490825                  {
00490827                      int32_t eax_16 = *(uint32_t*)var_110_1;
00490829                      var_124 = 1;
0049082b                      *(uint32_t*)eax_16(var_124);
00490825                  }
00490825                  
0049082d                  int32_t var_110_3 = 0;
00490814              }
00490814              
00490835              PropertyCollection::~PropertyCollection(&var_108);
00490841              StringInfo::~StringInfo(&var_90);
0049084c              var_124 = (arg2 - 0x10);
0049084c              
00490859              if ((InterlockedDecrement(var_124) == 0 && arg2 != 0x14))
00490859              {
0049085b                  int32_t edx_10 = *(uint32_t*)(arg2 - 0x14);
0049085d                  var_124 = 1;
00490861                  *(uint32_t*)edx_10(var_124);
00490859              }
00490859              
00490865              int32_t eax_17;
00490865              eax_17 = 1;
0049086e              return 1;
00490752          }
00490752          
00490758          int32_t* eax_5 = var_114;
00490758          
0049075e          if (eax_5 != 0)
0049075e          {
00490768              int32_t esi_4 = (eax_5[1] - 1);
00490765              eax_5[1] = esi_4;
00490765              
0049076f              if (esi_4 == 0)
0049076f              {
00490771                  int32_t edx_4 = *(uint32_t*)eax_5;
00490773                  var_124 = 1;
00490775                  *(uint32_t*)edx_4(var_124);
0049076f              }
0049076f              
00490777              var_114 = nullptr;
0049075e          }
0049075e          
00490781          if (var_110_1 != 0)
00490781          {
0049078b              int32_t esi_6 = (var_110_1[1] - 1);
00490788              var_110_1[1] = esi_6;
00490788              
00490792              if (esi_6 == 0)
00490792              {
00490794                  int32_t eax_9 = *(uint32_t*)var_110_1;
00490796                  var_124 = 1;
00490798                  *(uint32_t*)eax_9(var_124);
00490792              }
00490792              
0049079a              int32_t var_110_2 = 0;
00490781          }
00490781          
004907a2          PropertyCollection::~PropertyCollection(&var_108);
004907ae          StringInfo::~StringInfo(&var_90);
004907b3          esi_2 = (arg2 - 0x14);
004907b9          var_124 = &esi_2[1];
00490635      }
00490635      else
00490635      {
0049063e          esi_2 = (arg2 - 0x14);
00490644          var_124 = &esi_2[1];
00490635      }
00490635      
004907c6      if ((InterlockedDecrement() == 0 && esi_2 != 0))
004907c6      {
004907c8          int32_t edx_6 = *(uint32_t*)esi_2;
004907ca          var_124 = 1;
004907ce          *(uint32_t*)edx_6(var_124);
004907c6      }
004907c6      
004907d0      int32_t eax_10;
004907d0      eax_10 = 0;
004907db      return 0;
00490620  }

00490871                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00490880  void __thiscall gmFellowshipUI::RecvNotice_FellowshipRequest(class gmFellowshipUI* this, class AC1Legacy::PStringBase<char> const* arg2, uint32_t arg3)

00490880  {
00490884      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
0049088e      uint32_t var_c = arg3;
00490895      PStringBase<char>::PStringBase<char>(&var_c, &m_buffer->m_data);
004908a0      gmFellowshipUI::MakeFellowRequestDialog(((char*)this - 0x5f8), var_c, arg3);
00490880  }

004908a9                             90 90 90 90 90 90 90                                                           .......

004908b0  void __thiscall gmAllegianceUI::ListenToGlobalMessage(class gmAllegianceUI* this, uint32_t arg2, int32_t arg3)

004908b0  {
004908bc      if ((arg2 == 1 && arg3 == 0x27))
004908d4          /* tailcall */
004908d4          return UIElement_ListBox::SetSelectedItem(this->m_pVassalListBox, nullptr, 1);
004908b0  }

004908dc                                                                                      90 90 90 90                              ....

004908e0  void __fastcall gmAllegianceUI::UpdateSwearButton(class gmAllegianceUI* this)

004908e0  {
004908f3      class CAllegianceProfile* edi_1 = &ClientAllegianceSystem::GetAllegianceSystem()->m_allegianceProfile;
004908f6      void var_38;
004908f6      CAllegianceData::CAllegianceData(&var_38);
004908fb      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00490902      uint32_t player_id;
00490902      
00490902      if (SmartBox::smartbox_1 == 0)
0049090c          player_id = 0;
00490902      else
00490904          player_id = SmartBox::smartbox_1->player_id;
00490904      
0049091d      if (AllegianceProfile::GetPatron(edi_1, player_id, &var_38) == 0)
0049091d      {
00490923          uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
00490923          
0049092b          if (ACCWeenieObject::selectedID_1 != 0)
0049092b          {
0049092d              class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
00490934              uint32_t player_id_1;
00490934              
00490934              if (SmartBox::smartbox_2 == 0)
0049093e                  player_id_1 = 0;
00490934              else
00490936                  player_id_1 = SmartBox::smartbox_2->player_id;
00490936              
00490942              if (ACCWeenieObject::selectedID_1 != player_id_1)
00490942              {
00490945                  class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
00490945                  
0049094f                  if ((eax_2 != 0 && eax_2->vtable->IsPlayer() != 0))
0049094f                  {
00490960                      void var_70;
00490960                      AllegianceData::AllegianceData(&var_70);
00490960                      
00490974                      if (AllegianceProfile::GetData(edi_1, ACCWeenieObject::selectedID_1, &var_70) == 0)
00490974                      {
00490976                          this->m_pSwearButton->vtable->SetState(1);
0049098a                          AllegianceData::~AllegianceData(&var_70);
00490993                          AllegianceData::~AllegianceData(&var_38);
0049099e                          return;
00490974                      }
00490974                      
004909a3                      AllegianceData::~AllegianceData(&var_70);
0049094f                  }
00490942              }
0049092b          }
0049091d      }
0049091d      
004909a8      this->m_pSwearButton->vtable->SetState(0xd);
004909bc      AllegianceData::~AllegianceData(&var_38);
004908e0  }

004909c8                          90 90 90 90 90 90 90 90                                                          ........

004909d0  void __fastcall gmAllegianceUI::UpdateBreakButton(class gmAllegianceUI* this)

004909d0  {
004909e2      class CAllegianceProfile* esi_1 = &ClientAllegianceSystem::GetAllegianceSystem()->m_allegianceProfile;
004909e5      void var_38;
004909e5      CAllegianceData::CAllegianceData(&var_38);
004909ea      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004909f1      uint32_t player_id;
004909f1      
004909f1      if (SmartBox::smartbox_1 == 0)
004909fb          player_id = 0;
004909f1      else
004909f3          player_id = SmartBox::smartbox_1->player_id;
004909f3      
00490a0a      bool cond:0 = AllegianceProfile::GetPatron(esi_1, player_id, &var_38) == 0;
00490a0c      class UIElement_Button* m_pBreakButton = this->m_pBreakButton;
00490a0c      
00490a12      if (!(cond:0))
00490a12      {
00490a14          m_pBreakButton->vtable->SetState(1);
00490a22          AllegianceData::~AllegianceData(&var_38);
00490a2c          return;
00490a12      }
00490a12      
00490a2d      m_pBreakButton->vtable->SetState(0xd);
00490a3b      AllegianceData::~AllegianceData(&var_38);
004909d0  }

00490a46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00490a50  uint8_t __thiscall gmAllegianceUI::CloseAcceptSwearConfirmationDialog(class gmAllegianceUI* this, uint8_t arg2)

00490a50  {
00490a58      uint32_t m_uiAcceptSwearServerContextID = this->m_uiAcceptSwearServerContextID;
00490a62      this->m_acceptSwearContext = 0;
00490a6c      CM_Character::Event_ConfirmationResponse(1, m_uiAcceptSwearServerContextID, ((uint32_t)arg2));
00490a74      this->m_uiAcceptSwearServerContextID = 0;
00490a7e      int32_t eax;
00490a7e      eax = 1;
00490a81      return 1;
00490a50  }

00490a84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00490a90  uint8_t __thiscall gmAllegianceUI::CloseBreakConfirmationDialog(class gmAllegianceUI* this, uint8_t arg2)

00490a90  {
00490a99      this->m_breakContext = 0;
00490a99      
00490aa3      if (arg2 != 0)
00490aa3      {
00490ab1          class CAllegianceProfile* esi_2 = &ClientAllegianceSystem::GetAllegianceSystem()->m_allegianceProfile;
00490ab4          void var_38;
00490ab4          CAllegianceData::CAllegianceData(&var_38);
00490ab9          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00490ac0          uint32_t player_id;
00490ac0          
00490ac0          if (SmartBox::smartbox_1 == 0)
00490aca              player_id = 0;
00490ac0          else
00490ac2              player_id = SmartBox::smartbox_1->player_id;
00490ac2          
00490ada          CM_Allegiance::Event_BreakAllegiance(AllegianceProfile::GetPatron(esi_2, player_id, &var_38));
00490ae6          AllegianceData::~AllegianceData(&var_38);
00490aa3      }
00490aa3      
00490af1      return 1;
00490a90  }

00490af4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00490b00  uint8_t __thiscall gmAllegianceUI::CloseKickConfirmationDialog(class gmAllegianceUI* this, uint8_t arg2)

00490b00  {
00490b09      this->m_kickContext = 0;
00490b09      
00490b13      if (arg2 != 0)
00490b1c          CM_Allegiance::Event_BreakAllegiance(this->m_iidPossibleKickedVassal);
00490b1c      
00490b24      this->m_iidPossibleKickedVassal = 0;
00490b31      return 1;
00490b00  }

00490b34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00490b40  void __thiscall gmAllegianceUI::gmAllegianceUI(class gmAllegianceUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00490b40  {
00490b4f      UIElement_Field::UIElement_Field(this, arg2, arg3);
00490b54      this->vtable = &gmUrgentAssistanceUI::`vftable';
00490b5e      this->vtable = &QualityChangeHandler::`vftable';
00490b6a      this->m_bAwaitingUpdate = 0;
00490b70      __builtin_memset(&this->m_iidSelectedVassal, 0, 0x54);
00490bee      this->vtable = 0x7a5d60;
00490bf4      this->vtable = &gmAllegianceUI::`vftable';
00490bfe      this->vtable = &gmAllegianceUI::`vftable';
00490b40  }

00490c0e                                            90 90                                                                ..

00490c10  class UIElement* __thiscall gmAllegianceUI::DynamicCast(class gmAllegianceUI* this, uint32_t arg2) __pure

00490c10  {
00490c1c      if (arg2 == 0x1000002c)
00490c29          return this;
00490c29      
00490c23      int32_t edx_1;
00490c23      edx_1 = arg2 != 3;
00490c27      return (this & (edx_1 - 1));
00490c10  }

00490c2c                                      90 90 90 90                                                              ....

00490c30  uint32_t gmAllegianceUI::GetUIElementType(class gmAllegianceUI const* this @ ecx) __pure

00490c30  {
00490c35      return 0x1000002c;
00490c30  }

00490c36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00490c40  void __fastcall gmAllegianceUI::~gmAllegianceUI(class gmAllegianceUI* this)

00490c40  {
00490c52      this->vtable = 0x7a5d60;
00490c46      this->vtable = &gmAllegianceUI::`vftable';
00490c4c      this->vtable = &gmAllegianceUI::`vftable';
00490c64      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
00490c64      
00490c6d      if (eax != 0)
00490c6f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
00490c6f      
00490c7b      UIListener::UnRegisterForGlobalMessage(this, 1);
00490c80      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(7, 0x19, &this->vtable);
00490c90      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(7, 0x1a, &this->vtable);
00490ca7      DialogFactory::CloseDialog(this->m_swearContext);
00490cac      this->m_swearContext = 0;
00490cb9      DialogFactory::CloseDialog(this->m_acceptSwearContext);
00490cbe      this->m_acceptSwearContext = 0;
00490ccb      DialogFactory::CloseDialog(this->m_breakContext);
00490cd0      this->m_breakContext = 0;
00490cdd      DialogFactory::CloseDialog(this->m_kickContext);
00490ce2      this->m_kickContext = 0;
00490c46      this->vtable = &gmUrgentAssistanceUI::`vftable';
00490cf3      NoticeHandler::~NoticeHandler(&this->vtable);
00490cfe      /* tailcall */
00490cfe      return UIElement_Field::~UIElement_Field(this);
00490c40  }

00490d03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00490d10  class UIElement* gmAllegianceUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00490d10  {
00490d15      void* eax = operator new(0x658);
00490d15      
00490d1f      if (eax == 0)
00490d35          return 0;
00490d35      
00490d32      return gmAllegianceUI::gmAllegianceUI(eax, arg1, arg2);
00490d10  }

00490d36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00490d40  void __fastcall gmAllegianceUI::RecvNotice_PlayerDescReceived(class gmAllegianceUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

00490d40  {
00490d45      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable == 0)
00490d45      {
00490d47          this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable = 1;
00490d52          ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
00490d45      }
00490d45      
00490d59      CM_Allegiance::Event_UpdateRequest(1);
00490d40  }

00490d62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00490d70  void __fastcall gmAllegianceUI::RecvNotice_SelectionChanged(class gmAllegianceUI* this)

00490d70  {
00490d76      /* tailcall */
00490d76      return gmAllegianceUI::UpdateSwearButton(((char*)this - 0x5f8));
00490d70  }

00490d7b                                                                                   90 90 90 90 90                             .....

00490d80  void __thiscall gmAllegianceUI::RecvNotice_AbortConfirmationRequest(class gmAllegianceUI* this, int32_t arg2, uint32_t arg3)

00490d80  {
00490d88      if (arg2 == 1)
00490d88      {
00490d8e          DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x12]);
00490d9e          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x12] = nullptr;
00490da1          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = nullptr;
00490da4          gmAllegianceUI::UpdateSwearButton(((char*)this - 0x5f8));
00490d88      }
00490d80  }

00490dad                                         90 90 90                                                               ...

00490db0  void __fastcall gmAllegianceUI::OnQualityChanged(class gmAllegianceUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

00490db0  {
00490db5      if (this->m_hashElementsRegisteredWith.vtable == 0)
00490db5      {
00490db7          this->m_hashElementsRegisteredWith.vtable = 1;
00490dc2          ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
00490db5      }
00490db5      
00490dc9      CM_Allegiance::Event_UpdateRequest(1);
00490db0  }

00490dd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00490de0  void __thiscall AC1Legacy::PStringBase<char>::append_n_chars(class AC1Legacy::PStringBase<char>* this, char const* arg2, uint32_t arg3)

00490de0  {
00490dea      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
00490dec      uint32_t m_len = m_buffer_1->m_len;
00490def      uint32_t ebx = (arg3 + m_len);
00490def      
00490df5      if (ebx <= m_buffer_1->m_size)
00490df5      {
00490e2c          AC1Legacy::PStringBase<char>::break_reference(this);
00490e31          this->m_buffer->m_len = ebx;
00490df5      }
00490df5      else
00490df5      {
00490df9          AC1Legacy::PStringBase<char>::allocate_ref_buffer(this, (ebx - 1));
00490e00          char (* edx_1)[0x1] = &m_buffer_1->m_data;
00490e03          char (* eax_1)[0x1] = &this->m_buffer->m_data;
00490e0e          char m_data[0x1];
00490e0e          
00490e0e          do
00490e0e          {
00490e06              m_data = ADJ(edx_1)->m_data;
00490e08              edx_1 = &edx_1[1];
00490e22              ADJ(eax_1)->m_data = m_data;
00490e0b              eax_1 = &eax_1[1];
00490e0e          } while (m_data != 0);
00490e0e          
00490e20          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00490e22              m_buffer_1->vtable->__vecDelDtor(1);
00490df5      }
00490df5      
00490e47      strncpy(((this->m_buffer + m_len) + 0x13), arg2, arg3);
00490e4d      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
00490e56      *(uint8_t*)((m_buffer->m_len + m_buffer) + 0x13) = 0;
00490de0  }

00490e61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00490e70  void* __thiscall gmAllegianceUI::`scalar deleting destructor'(class gmAllegianceUI* this, uint32_t arg2)

00490e70  {
00490e73      gmAllegianceUI::~gmAllegianceUI(this);
00490e73      
00490e7d      if ((arg2 & 1) != 0)
00490e80          operator delete(this);
00490e80      
00490e8b      return this;
00490e70  }

00490e8e                                            90 90                                                                ..

00490e90  void __fastcall gmAllegianceUI::PostInit(class gmAllegianceUI* this)

00490e90  {
00490e9b      UIElement::PostInit(this);
00490ea4      void var_90;
00490ea4      StringInfo::StringInfo(&var_90);
00490eb0      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000262);
00490eb0      
00490eb7      if (eax != 0)
00490eb7      {
00490ec2          void* eax_1;
00490ec2          enum PlayerOption edx_2;
00490ec2          eax_1 = eax->vtable->DynamicCast(0x10000035);
00490ec2          
00490ed1          if ((eax_1 != 0 && eax_1 != 0x20))
00490ed1          {
00490ed3              int32_t var_a0_1 = 1;
00490ed7              UIOption_Checkbox::SetPlayerOption(((char*)eax_1 - 0x20), edx_2);
00490ef3              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmAllegianceUI::`vftable'.RecvNotice_AddSpellShortcut), 0x10000003);
00490f00              UIElement_Text::SetStringInfo(eax_1, &var_90);
00490f1c              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmAllegianceUI::`vftable'.RecvNotice_AddSalvageItem), 0x10000003);
00490f2a              *(uint32_t*)(*(uint32_t*)((char*)eax_1 - 0x20) + 0x2b4)(&var_90);
00490ed1          }
00490eb7      }
00490eb7      
00490f37      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000251);
00490f3e      class UIElement_Text* eax_5;
00490f3e      
00490f3e      if (eax_4 == 0)
00490f4e          eax_5 = nullptr;
00490f3e      else
00490f46          eax_5 = eax_4->vtable->DynamicCast(0xc);
00490f46      
00490f57      this->m_pAllegianceName = eax_5;
00490f5d      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x10000252);
00490f64      class UIElement_Text* eax_7;
00490f64      
00490f64      if (eax_6 == 0)
00490f74          eax_7 = nullptr;
00490f64      else
00490f6c          eax_7 = eax_6->vtable->DynamicCast(0xc);
00490f6c      
00490f7d      this->m_pPlayerFollowers = eax_7;
00490f83      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x10000253);
00490f8a      class UIElement_Text* eax_9;
00490f8a      
00490f8a      if (eax_8 == 0)
00490f9a          eax_9 = nullptr;
00490f8a      else
00490f92          eax_9 = eax_8->vtable->DynamicCast(0xc);
00490f92      
00490fa3      this->m_pPlayerRank = eax_9;
00490fb5      this->m_pMonarchField = UIElement::GetChildRecursive(this, 0x10000255);
00490fbb      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x10000256);
00490fc2      class UIElement_Text* eax_12;
00490fc2      
00490fc2      if (eax_11 == 0)
00490fd2          eax_12 = nullptr;
00490fc2      else
00490fca          eax_12 = eax_11->vtable->DynamicCast(0xc);
00490fca      
00490fdb      this->m_pMonarchLabel = eax_12;
00490fe1      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x10000257);
00490fe8      class UIElement_Text* eax_14;
00490fe8      
00490fe8      if (eax_13 == 0)
00490ff8          eax_14 = nullptr;
00490fe8      else
00490ff0          eax_14 = eax_13->vtable->DynamicCast(0xc);
00490ff0      
00491001      this->m_pMonarchName = eax_14;
00491007      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x10000258);
0049100e      class UIElement_Text* eax_16;
0049100e      
0049100e      if (eax_15 == 0)
0049101e          eax_16 = nullptr;
0049100e      else
00491016          eax_16 = eax_15->vtable->DynamicCast(0xc);
00491016      
00491027      this->m_pMonarchFollowers = eax_16;
00491039      this->m_pPatronField = UIElement::GetChildRecursive(this, 0x1000025a);
0049103f      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x1000025c);
00491046      class UIElement_Text* eax_19;
00491046      
00491046      if (eax_18 == 0)
00491056          eax_19 = nullptr;
00491046      else
0049104e          eax_19 = eax_18->vtable->DynamicCast(0xc);
0049104e      
0049105f      this->m_pPatronName = eax_19;
00491065      class UIElement* eax_20 = UIElement::GetChildRecursive(this, 0x10000260);
0049106c      class UIElement_ListBox* eax_21;
0049106c      
0049106c      if (eax_20 == 0)
0049107c          eax_21 = nullptr;
0049106c      else
00491074          eax_21 = eax_20->vtable->DynamicCast(5);
00491074      
00491085      this->m_pVassalListBox = eax_21;
0049108b      class UIElement* eax_22 = UIElement::GetChildRecursive(this, 0x10000263);
00491092      class UIElement_Button* eax_23;
00491092      
00491092      if (eax_22 == 0)
004910a2          eax_23 = nullptr;
00491092      else
0049109a          eax_23 = eax_22->vtable->DynamicCast(1);
0049109a      
004910ab      this->m_pSwearButton = eax_23;
004910b1      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x10000264);
004910b8      class UIElement_Button* eax_25;
004910b8      
004910b8      if (eax_24 == 0)
004910c8          eax_25 = nullptr;
004910b8      else
004910c0          eax_25 = eax_24->vtable->DynamicCast(1);
004910c0      
004910d1      this->m_pBreakButton = eax_25;
004910d7      class UIElement* eax_26 = UIElement::GetChildRecursive(this, 0x10000265);
004910de      class UIElement_Button* eax_27;
004910de      
004910de      if (eax_26 == 0)
004910ee          eax_27 = nullptr;
004910de      else
004910e6          eax_27 = eax_26->vtable->DynamicCast(1);
004910e6      
004910f7      this->m_pKickButton = eax_27;
004910fd      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(7, 0x19, &this->vtable);
0049110c      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(7, 0x1a, &this->vtable);
00491120      UIListener::RegisterForGlobalMessage(this, 1);
00491125      class GlobalEventHandler* eax_29 = GlobalEventHandler::GetGlobalEventHandler();
0049112c      eax_29->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
0049113f      eax_29->vtable->RegisterNoticeHandler(0x4dd201, &this->vtable);
0049114c      eax_29->vtable->RegisterNoticeHandler(0x4dd206, &this->vtable);
00491159      eax_29->vtable->RegisterNoticeHandler(0x4dd207, &this->vtable);
00491166      eax_29->vtable->RegisterNoticeHandler(0x4dd205, &this->vtable);
00491173      eax_29->vtable->RegisterNoticeHandler(0x4dd208, &this->vtable);
00491180      eax_29->vtable->RegisterNoticeHandler(0x4dd1ef, &this->vtable);
0049118d      eax_29->vtable->RegisterNoticeHandler(0x4dd20d, &this->vtable);
0049119a      eax_29->vtable->RegisterNoticeHandler(0x186a4, &this->vtable);
0049119a      
004911af      if (this->m_bAwaitingUpdate == 0)
004911af      {
004911b1          this->m_bAwaitingUpdate = 1;
004911bf          ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
004911af      }
004911af      
004911c6      CM_Allegiance::Event_UpdateRequest(1);
004911d2      StringInfo::~StringInfo(&var_90);
00490e90  }

004911e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004911f0  void gmAllegianceUI::Register()

004911f0  {
004911fa      UIElement::RegisterElementClass(0x1000002c, gmAllegianceUI::Create);
004911f0  }

00491203           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00491210  class AC1Legacy::PStringBase<char>* __thiscall AC1Legacy::PStringBase<char>::operator+=(class AC1Legacy::PStringBase<char>* this, class AC1Legacy::PStringBase<char> const* arg2)

00491210  {
00491214      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
00491219      uint32_t m_len = m_buffer->m_len;
00491219      
00491227      if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
00491231          AC1Legacy::PStringBase<char>::append_n_chars(this, &m_buffer->m_data, (m_len - 1));
00491231      
00491239      return this;
00491210  }

0049123c                                                                                      90 90 90 90                              ....

00491240  void __thiscall gmAllegianceUI::OnVisibilityChanged(class gmAllegianceUI* this, uint8_t arg2)

00491240  {
00491251      struct Turbine_GUID** esp;
00491251      
00491251      if (arg2 == 0)
00491251      {
004912fc          if (this->m_bAwaitingUpdate != 0)
004912fc          {
004912fe              this->m_bAwaitingUpdate = 0;
0049130b              ClientUISystem::DecrementBusyCount(ClientUISystem::GetUISystem());
004912fc          }
004912fc          
00491311          CM_Allegiance::Event_UpdateRequest(0);
00491316          struct Turbine_GUID* __saved_edi;
00491316          esp = &__saved_edi;
00491251      }
00491251      else
00491251      {
0049125b          uint8_t* var_24 = &arg2;
00491260          struct Turbine_GUID* var_28 = &PlayerDesc_ClassType;
00491266          arg2 = 0;
00491271          class TResult __return;
00491271          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_28, var_24);
00491276          struct Turbine_GUID* esi_1 = arg2;
0049127f          var_28 = esi_1;
00491281          int32_t var_24_1 = 0;
00491284          struct Turbine_GUID* eax_2 = var_28;
00491288          int32_t var_8 = 0;
0049128c          int32_t var_4_1 = 0;
0049128c          
00491290          if (eax_2 != 0)
00491296              *(uint32_t*)(eax_2->m_data1 + 0x10)();
00491296          
004912a2          esp = &var_28;
004912a9          void var_c;
004912a9          int32_t edi_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004912a9          
004912ab          if (esi_1 != 0)
004912b1              *(uint32_t*)(esi_1->m_data1 + 0x14)();
004912b1          
004912b4          class TResult __return_1 = __return;
004912b4          
004912ba          if (__return_1 != 0)
004912ba          {
004912be              if (edi_1 >= 0)
004912be              {
004912c6                  if (this->m_bAwaitingUpdate == 0)
004912c6                  {
004912c8                      this->m_bAwaitingUpdate = 1;
004912d6                      ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
004912c6                  }
004912c6                  
004912dd                  CM_Allegiance::Event_UpdateRequest(1);
004912be              }
004912be              
004912e9              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004912f3              return;
004912ba          }
00491251      }
00491251      
00491319      *(uint32_t*)esp;
00491319      esp[1];
00491319      esp[2];
00491319      esp[3];
00491240  }

00491323           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00491330  void __fastcall gmAllegianceUI::UpdatePlayerData(class gmAllegianceUI* this)

00491330  {
00491336      void* __return_12;
00491336      void* __return_1 = __return_12;
00491337      uint32_t player_id_5;
00491337      uint32_t player_id = player_id_5;
00491338      int32_t esi;
00491338      int32_t var_210 = esi;
00491339      struct Turbine_GUID* edi;
00491339      struct Turbine_GUID* var_214 = edi;
0049133e      class AC1Legacy::PSRefBuffer<char>* var_204;
0049133e      int32_t* var_218 = &var_204;
00491345      struct Turbine_GUID* var_21c = &PlayerDesc_ClassType;
0049134c      class TResult var_200;
0049134c      class TResult* __return = &var_200;
0049134d      var_204 = nullptr;
00491358      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), __return, var_21c, var_218);
0049135d      struct Turbine_GUID* ecx_1 = var_204;
00491366      var_21c = ecx_1;
00491368      int32_t var_218_1 = 0;
0049136b      struct Turbine_GUID* eax_1 = var_21c;
00491371      class TResult var_1f0 = 0;
00491375      int32_t var_1ec = 0;
00491375      
00491379      if (eax_1 != 0)
0049137f          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0049137f      
00491386      void var_1f4;
00491386      __return = &var_1f4;
0049138b      struct Turbine_GUID** esp = &var_21c;
00491392      int32_t edi_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_1f0, __return);
00491392      
00491394      if (ecx_1 != 0)
0049139a          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
0049139a      
0049139d      int32_t* var_1f8;
0049139d      int32_t* ecx_54 = var_1f8;
0049139d      
004913a3      if (ecx_54 != 0)
004913a3      {
004913ab          if (edi_1 >= 0)
004913ab          {
004913b1              class ClientAllegianceSystem* eax_3 = ClientAllegianceSystem::GetAllegianceSystem();
004913b8              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004913b8              
004913c6              if (SmartBox::smartbox_1 == 0)
004913d4                  player_id = 0;
004913c6              else
004913ce                  player_id = SmartBox::smartbox_1->player_id;
004913ce              
004913dc              CAllegianceData::CAllegianceData(&var_1f0);
004913e1              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004913f0              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef;
004913f1              var_204 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004913f5              InterlockedIncrement(__return);
004913f7              class AC1Legacy::PSRefBuffer<char>* m_buffer = eax_3->m_allegianceProfile._allegiance.m_AllegianceName.m_buffer;
004913fd              __return = &m_buffer->m_cRef;
004913fe              InterlockedIncrement(__return);
004913fe              
00491408              if (AC1Legacy::PStringBase<char>::s_NullBuffer_3 != m_buffer)
00491408              {
00491411                  __return = &var_204->m_cRef;
00491411                  
00491416                  if (InterlockedDecrement(__return) == 0)
00491416                  {
00491418                      class AC1Legacy::PSRefBuffer<char>* ecx_7 = var_204;
00491418                      
0049141e                      if (ecx_7 != 0)
0049141e                      {
00491420                          struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_2 = ecx_7->vtable;
00491422                          __return = 1;
00491424                          vtable_2->__vecDelDtor(__return);
0049141e                      }
00491416                  }
00491416                  
00491429                  __return = &m_buffer->m_cRef;
0049142a                  var_204 = m_buffer;
0049142e                  InterlockedIncrement(__return);
00491408              }
00491408              
00491433              __return = &m_buffer->m_cRef;
00491433              
0049143c              if ((InterlockedDecrement(__return) == 0 && m_buffer != 0))
0049143c              {
0049143e                  struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = m_buffer->vtable;
00491440                  __return = 1;
00491444                  vtable->__vecDelDtor(__return);
0049143c              }
0049143c              
0049144d              void var_98;
0049144d              StringInfo::StringInfo(&var_98);
00491458              __return = 0x10000001;
00491465              class TResult* __return_6 = StringInfo::SetStringIDandTableEnum(&var_98, 0, __return);
0049146a              class AC1Legacy::PSRefBuffer<char>* eax_12 = var_204;
0049146e              __return = __return_6;
00491475              PStringBase<char>::PStringBase<char>(&__return, &eax_12->m_data);
00491488              StringInfo::AddVariable_String(&var_98, 0, __return);
0049148d              __return = nullptr;
0049149b              class PStringBase<unsigned short>* __return_2 = StringInfo::GetString(&var_98, &__return_1, __return);
004914a0              class UIElement_Text* m_pAllegianceName = this->m_pAllegianceName;
004914a6              __return = __return_2;
004914a7              UIElement_Text::SetText(m_pAllegianceName, __return);
004914b0              int32_t* edi_5 = ((char*)__return_1 - 0x14);
004914b6              __return = &edi_5[1];
004914b6              
004914bf              if ((InterlockedDecrement(__return) == 0 && edi_5 != 0))
004914bf              {
004914c1                  int32_t edx_3 = *(uint32_t*)edi_5;
004914c3                  __return = 1;
004914c7                  *(uint32_t*)edx_3(__return);
004914bf              }
004914bf              
004914d0              void var_128;
004914d0              StringInfo::StringInfo(&var_128);
004914da              __return = 0x10000001;
004914e7              StringInfo::SetStringIDandTableEnum(&var_128, 0, __return);
004914fb              __return = nullptr;
00491506              StringInfo::AddVariable_Int(&var_128, 0, eax_3->m_allegianceProfile._total_vassals);
0049150b              __return = nullptr;
00491519              class PStringBase<unsigned short>* __return_3 = StringInfo::GetString(&var_128, &__return_1, __return);
0049151e              class UIElement_Text* m_pPlayerFollowers = this->m_pPlayerFollowers;
00491524              __return = __return_3;
00491525              UIElement_Text::SetText(m_pPlayerFollowers, __return);
0049152e              void* edi_7 = ((char*)__return_1 - 0x14);
00491534              __return = ((char*)edi_7 + 4);
00491534              
0049153d              if ((InterlockedDecrement(__return) == 0 && edi_7 != 0))
0049153d              {
0049153f                  int32_t eax_16 = *(uint32_t*)edi_7;
00491541                  __return = 1;
00491545                  *(uint32_t*)eax_16(__return);
0049153d              }
0049153d              
00491547              uint32_t player_id_4 = player_id;
0049154f              __return = &var_1f0;
00491555              AllegianceProfile::GetData(&eax_3->m_allegianceProfile, player_id_4, __return);
00491562              __return = nullptr;
00491570              var_200 = 0;
00491578              CBaseQualities::InqInt(&var_1f8[0xe], 0x1e, &var_200, 0, __return);
0049157d              class TResult eax_17 = var_200;
0049158c              int32_t var_1dc;
0049158c              void var_1b8;
0049158c              
0049158c              if ((eax_17 == 0xffffffff || eax_17 == var_1dc))
0049158c              {
00491695                  StringInfo::StringInfo(&var_1b8);
0049169f                  __return = 0x10000001;
004916a9                  StringInfo::SetStringIDandTableEnum(&var_1b8, 0, __return);
004916ae                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004916b3                  player_id = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004916ba                  __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef;
004916bb                  InterlockedIncrement(__return);
004916c1                  __return = &player_id;
004916c6                  class TResult* __return_8 = AllegianceData::GetTitle(&var_1f0, __return);
004916cb                  uint32_t player_id_2 = player_id;
004916cf                  __return = __return_8;
004916d6                  PStringBase<char>::PStringBase<char>(&__return, (player_id_2 + 0x14));
004916e6                  StringInfo::AddVariable_String(&var_1b8, 0, __return);
004916ed                  int32_t eax_30;
004916ed                  class TResult* __return_11;
004916ed                  __return_11 = HIGHD(((int64_t)var_1dc));
004916ed                  eax_30 = LOWD(((int64_t)var_1dc));
004916ee                  __return = __return_11;
004916fa                  StringInfo::AddVariable_Int(&var_1b8, 0, eax_30);
004916ff                  __return = nullptr;
0049170a                  class PStringBase<unsigned short>* __return_5 = StringInfo::GetString(&var_1b8, &__return_1, __return);
0049170f                  class UIElement_Text* m_pPlayerRank_1 = this->m_pPlayerRank;
00491715                  __return = __return_5;
00491716                  UIElement_Text::SetText(m_pPlayerRank_1, __return);
0049171f                  void* edi_12 = ((char*)__return_1 - 0x14);
00491725                  __return = ((char*)edi_12 + 4);
00491725                  
0049172e                  if ((InterlockedDecrement(__return) == 0 && edi_12 != 0))
0049172e                  {
00491730                      int32_t eax_32 = *(uint32_t*)edi_12;
00491732                      __return = 1;
00491736                      *(uint32_t*)eax_32(__return);
0049172e                  }
0049172e                  
0049173e                  struct UIElement_Text::VTable* vtable_3 = this->m_pPlayerRank->vtable;
00491740                  __return = 1;
00491744                  vtable_3->SetState(__return);
0049174a                  uint32_t player_id_3 = player_id;
00491753                  __return = (player_id_3 + 4);
00491753                  
0049175c                  if ((InterlockedDecrement(__return) == 0 && player_id_3 != 0))
0049175c                  {
0049175e                      int32_t eax_35 = *(uint32_t*)player_id_3;
00491760                      __return = 1;
00491764                      *(uint32_t*)eax_35(__return);
0049175c                  }
0049158c              }
0049158c              else
0049158c              {
00491596                  StringInfo::StringInfo(&var_1b8);
004915a1                  __return = 0x10000001;
004915ab                  StringInfo::SetStringIDandTableEnum(&var_1b8, 0, __return);
004915b0                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004915b5                  player_id = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004915bc                  __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
004915bd                  InterlockedIncrement(__return);
004915c3                  __return = &player_id;
004915c8                  class TResult* __return_7 = AllegianceData::GetTitle(&var_1f0, __return);
004915cd                  uint32_t player_id_1 = player_id;
004915d1                  __return = __return_7;
004915d8                  PStringBase<char>::PStringBase<char>(&__return, (player_id_1 + 0x14));
004915e7                  StringInfo::AddVariable_String(&var_1b8, 0, __return);
004915f6                  int32_t eax_21;
004915f6                  class TResult* __return_9;
004915f6                  __return_9 = HIGHD(((int64_t)var_200));
004915f6                  eax_21 = LOWD(((int64_t)var_200));
004915f7                  __return = __return_9;
004915fe                  StringInfo::AddVariable_Int(&var_1b8, 0, eax_21);
00491609                  int32_t eax_24;
00491609                  class TResult* __return_10;
00491609                  __return_10 = HIGHD(((int64_t)(var_200 - var_1dc)));
00491609                  eax_24 = LOWD(((int64_t)(var_200 - var_1dc)));
0049160a                  __return = __return_10;
00491617                  StringInfo::AddVariable_Int(&var_1b8, 0, eax_24);
0049161c                  __return = nullptr;
00491627                  class PStringBase<unsigned short>* __return_4 = StringInfo::GetString(&var_1b8, &__return_1, __return);
0049162c                  class UIElement_Text* m_pPlayerRank = this->m_pPlayerRank;
00491632                  __return = __return_4;
00491633                  UIElement_Text::SetText(m_pPlayerRank, __return);
0049163c                  void* edi_10 = ((char*)__return_1 - 0x14);
00491642                  __return = ((char*)edi_10 + 4);
00491642                  
0049164b                  if ((InterlockedDecrement(__return) == 0 && edi_10 != 0))
0049164b                  {
0049164d                      int32_t edx_6 = *(uint32_t*)edi_10;
0049164f                      __return = 1;
00491653                      *(uint32_t*)edx_6(__return);
0049164b                  }
0049164b                  
0049165b                  struct UIElement_Text::VTable* vtable_1 = this->m_pPlayerRank->vtable;
0049165d                  __return = 0x10000014;
00491664                  vtable_1->SetState(__return);
0049166a                  uint32_t player_id_6 = player_id;
00491671                  __return = (player_id_6 + 4);
00491671                  
0049167e                  if ((InterlockedDecrement(__return) == 0 && player_id_6 != 0))
0049167e                  {
00491684                      int32_t edx_7 = *(uint32_t*)player_id_6;
00491686                      __return = 1;
0049168a                      *(uint32_t*)edx_7(__return);
0049167e                  }
0049158c              }
0049158c              
0049176a              StringInfo::~StringInfo(&var_1b8);
00491776              StringInfo::~StringInfo(&var_128);
00491782              StringInfo::~StringInfo(&var_98);
00491787              class AC1Legacy::PSRefBuffer<char>* edi_14 = var_204;
0049178e              __return = &edi_14->m_cRef;
0049178e              
00491797              if ((InterlockedDecrement(__return) == 0 && edi_14 != 0))
00491797              {
00491799                  struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_4 = edi_14->vtable;
0049179b                  __return = 1;
0049179f                  vtable_4->__vecDelDtor(__return);
00491797              }
00491797              
004917a5              AllegianceData::~AllegianceData(&var_1f0);
004917aa              ecx_54 = var_1f8;
004913ab          }
004913ab          
004917b0          *(uint32_t*)(*(uint32_t*)ecx_54 + 0x14)();
004917b0          esp = &var_214;
004913a3      }
004913a3      
004917b3      *(uint32_t*)esp;
004917b3      esp[1];
004917b3      esp[2];
004917b3      esp[3];
00491330  }

004917be                                                                                            90 90                                ..

004917c0  void __fastcall gmAllegianceUI::UpdatePatronData(class gmAllegianceUI* this)

004917c0  {
004917c6      void* __return_4;
004917c6      void* __return_1 = __return_4;
004917d5      struct Turbine_GUID* var_1f4 = &PlayerDesc_ClassType;
004917dc      class TResult var_1d8;
004917dc      class TResult* __return = &var_1d8;
004917dd      uint32_t var_1dc = 0;
004917e8      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), __return, var_1f4, &var_1dc);
004917ed      struct Turbine_GUID* ecx_1 = var_1dc;
004917f6      var_1f4 = ecx_1;
004917f8      int32_t var_1f0_1 = 0;
004917fb      struct Turbine_GUID* eax_1 = var_1f4;
00491801      class TResult var_1d0 = 0;
00491805      int32_t var_1cc = 0;
00491805      
00491809      if (eax_1 != 0)
0049180f          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0049180f      
00491816      void var_1d4;
00491816      __return = &var_1d4;
0049181b      struct Turbine_GUID** esp = &var_1f4;
00491822      int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_1d0, __return);
00491822      
00491824      if (ecx_1 != 0)
0049182a          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
0049182a      
0049182d      class TResult ecx_5 = var_1d8;
0049182d      
00491833      if (ecx_5 != 0)
00491833      {
0049183b          if (ebp < 0)
0049183b          {
0049183f              *(uint32_t*)(*(uint32_t*)ecx_5 + 0x14)();
0049184c              return;
0049183b          }
0049183b          
0049185b          class CAllegianceProfile* ebp_2 = &ClientAllegianceSystem::GetAllegianceSystem()->m_allegianceProfile;
0049185e          void var_160;
0049185e          CAllegianceData::CAllegianceData(&var_160);
0049186a          __return = &var_160;
0049186d          uint32_t eax_5 = AllegianceProfile::GetMonarch(ebp_2, __return);
0049187a          CAllegianceData::CAllegianceData(&var_1d0);
0049187f          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00491886          uint32_t player_id;
00491886          
00491886          if (SmartBox::smartbox_1 == 0)
00491890              player_id = 0;
00491886          else
00491888              player_id = SmartBox::smartbox_1->player_id;
00491888          
00491896          __return = &var_1d0;
0049189f          uint32_t edi_1 = AllegianceProfile::GetPatron(ebp_2, player_id, __return);
004918a3          var_1dc = edi_1;
004918b1          int32_t __return_3;
004918b1          class TResult __saved_ebp;
004918b1          
004918b1          if ((edi_1 == 0 || edi_1 == eax_5))
004918b1          {
00491ab6              struct UIElement::VTable* vtable_2 = this->m_pPatronField->vtable;
00491ab8              __return = nullptr;
00491ab9              vtable_2->SetVisible(__return);
00491abc              __return = &data_794358;
00491ac5              PStringBase<unsigned short>::PStringBase<unsigned short>(&__saved_ebp, __return);
00491ace              __return = &__saved_ebp;
00491ad5              UIElement_Text::SetText(this->m_pPatronName, __return);
00491ae4              __return = (eax_5 - 0x10);
00491ae5              __return_3 = InterlockedDecrement(__return);
00491ae5              
00491af1              if ((__return_3 == 0 && eax_5 != 0x14))
00491af1              {
00491af3                  int32_t eax_19 = *(uint32_t*)(eax_5 - 0x14);
00491af5                  __return = 1;
00491af9                  *(uint32_t*)eax_19(__return);
00491af1              }
004918b1          }
004918b1          else
004918b1          {
004918bd              struct UIElement::VTable* vtable = this->m_pPatronField->vtable;
004918bf              __return = 1;
004918c1              vtable->SetVisible(__return);
004918c4              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004918d0              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
004918d1              InterlockedIncrement(__return);
004918db              __return = &__saved_ebp;
004918e0              AllegianceData::GetFullName(&var_1d0, __return);
004918ec              void var_98;
004918ec              StringInfo::StringInfo(&var_98);
004918f7              __return = 0x10000001;
0049190d              __return = StringInfo::SetStringIDandTableEnum(&var_98, 0, __return);
00491914              PStringBase<char>::PStringBase<char>(&__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data);
00491926              StringInfo::AddVariable_String(&var_98, 0, __return);
0049192b              __return = nullptr;
00491938              class PStringBase<unsigned short>* __return_2 = StringInfo::GetString(&var_98, &__return_1, __return);
0049193d              class UIElement_Text* m_pPatronName = this->m_pPatronName;
00491943              __return = __return_2;
00491944              UIElement_Text::SetText(m_pPatronName, __return);
00491953              int32_t* edi_3 = ((char*)__return_1 - 0x14);
00491959              __return = &edi_3[1];
00491959              
00491962              if ((InterlockedDecrement(__return) == 0 && edi_3 != 0))
00491962              {
00491964                  int32_t eax_11 = *(uint32_t*)edi_3;
00491966                  __return = 1;
0049196a                  *(uint32_t*)eax_11(__return);
00491962              }
00491962              
00491975              bool cond:3_1 = AllegianceData::IsLoggedIn(&var_1d0) == 0;
00491977              class UIElement* m_pPatronField = this->m_pPatronField;
00491977              
0049197d              if (cond:3_1)
0049197d              {
0049198b                  struct UIElement::VTable* vtable_1 = m_pPatronField->vtable;
0049198d                  __return = 0xd;
0049198f                  vtable_1->SetState(__return);
0049197d              }
0049197d              else
0049197d              {
0049197f                  struct UIElement::VTable* vtable_3 = m_pPatronField->vtable;
00491981                  __return = 1;
00491983                  vtable_3->SetState(__return);
0049197d              }
0049197d              
00491999              void var_198;
00491999              CAllegianceData::CAllegianceData(&var_198);
0049199e              class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
004919a5              uint32_t player_id_1;
004919a5              
004919a5              if (SmartBox::smartbox_2 == 0)
004919af                  player_id_1 = 0;
004919a5              else
004919a7                  player_id_1 = SmartBox::smartbox_2->player_id;
004919a7              
004919b5              __return = &var_198;
004919b9              AllegianceProfile::GetData(ebp_2, player_id_1, __return);
004919c5              void var_128;
004919c5              StringInfo::StringInfo(&var_128);
004919d0              __return = 0x10000001;
004919dd              StringInfo::SetStringIDandTableEnum(&var_128, 0, __return);
004919ec              __return = nullptr;
004919f7              int32_t var_178;
004919f7              StringInfo::AddVariable_Int(&var_128, 0, var_178);
004919fc              class UIElement* m_pPatronField_1 = this->m_pPatronField;
00491a02              __return = 0x10000492;
00491a07              class UIElement* eax_14 = UIElement::GetChildRecursive(m_pPatronField_1, __return);
00491a0e              class UIElement_Text* esi_1;
00491a0e              
00491a0e              if (eax_14 == 0)
00491a20                  esi_1 = nullptr;
00491a0e              else
00491a0e              {
00491a10                  struct UIElement::VTable* vtable_4 = eax_14->vtable;
00491a12                  __return = 0xc;
00491a1c                  esi_1 = vtable_4->DynamicCast(__return);
00491a0e              }
00491a0e              
00491a22              __return = nullptr;
00491a35              __return = StringInfo::GetString(&var_128, &__return_1, __return);
00491a38              UIElement_Text::SetText(esi_1, __return);
00491a41              void* esi_3 = ((char*)__return_1 - 0x14);
00491a47              __return = ((char*)esi_3 + 4);
00491a47              
00491a50              if ((InterlockedDecrement(__return) == 0 && esi_3 != 0))
00491a50              {
00491a52                  int32_t edx_4 = *(uint32_t*)esi_3;
00491a54                  __return = 1;
00491a58                  *(uint32_t*)edx_4(__return);
00491a50              }
00491a50              
00491a61              StringInfo::~StringInfo(&var_128);
00491a6a              AllegianceData::~AllegianceData(&var_198);
00491a76              StringInfo::~StringInfo(&var_98);
00491a82              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
00491a83              __return_3 = InterlockedDecrement(__return);
00491a83              
00491a8b              if ((__return_3 == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
00491a8b              {
00491a8d                  struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable;
00491a8f                  __return = 1;
00491a93                  vtable_5->__vecDelDtor(__return);
00491a8b              }
00491a8b              
00491a95              edi_1 = var_1dc;
004918b1          }
004918b1          
00491a9d          if (edi_1 != 0)
00491aa3              __return_3 = AllegianceData::IsLoggedIn(&var_1d0);
00491aa3          
00491aaa          if ((edi_1 == 0 || __return_3 == 0))
00491afd              __return_3 = 0;
00491aaa          else
00491aac              __return_3 = 1;
00491aac          
00491aff          __return = __return_3;
00491b02          gmCCommunicationSystem::SetTalkFocusEnabled(4, __return);
00491b0e          AllegianceData::~AllegianceData(&var_1d0);
00491b1a          AllegianceData::~AllegianceData(&var_160);
00491b25          *(uint32_t*)(*(uint32_t*)var_1d8 + 0x14)();
00491b25          struct Turbine_GUID* __saved_edi;
00491b25          esp = &__saved_edi;
00491833      }
00491833      
00491b28      *(uint32_t*)esp;
00491b28      esp[1];
00491b28      esp[2];
00491b28      esp[3];
004917c0  }

00491b33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00491b40  void __fastcall gmAllegianceUI::UpdateMonarchData(class gmAllegianceUI* this)

00491b40  {
00491b46      void* __return_7;
00491b46      void* __return_1 = __return_7;
00491b47      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4;
00491b47      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
00491b4e      uint32_t var_2fc;
00491b4e      int32_t* var_310 = &var_2fc;
00491b55      struct Turbine_GUID* var_314 = &PlayerDesc_ClassType;
00491b5c      void var_2f4;
00491b5c      class TResult* __return = &var_2f4;
00491b5d      var_2fc = 0;
00491b68      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), __return, var_314, var_310);
00491b6d      struct Turbine_GUID* ecx_1 = var_2fc;
00491b76      var_314 = ecx_1;
00491b78      int32_t var_310_1 = 0;
00491b7b      struct Turbine_GUID* eax_1 = var_314;
00491b81      class TResult var_2f0 = 0;
00491b85      int32_t var_2ec = 0;
00491b85      
00491b89      if (eax_1 != 0)
00491b8f          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00491b8f      
00491b96      class TResult var_2f8;
00491b96      __return = &var_2f8;
00491b9b      struct Turbine_GUID** esp = &var_314;
00491ba2      int32_t ebx = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_2f0, __return);
00491ba2      
00491ba4      if (ecx_1 != 0)
00491baa          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00491baa      
00491bad      class TResult ecx_5 = var_2f8;
00491bad      
00491bb3      if (ecx_5 != 0)
00491bb3      {
00491bbb          if (ebx < 0)
00491bbb          {
00491bbf              *(uint32_t*)(*(uint32_t*)ecx_5 + 0x14)();
00491bcc              return;
00491bbb          }
00491bbb          
00491bd8          class CAllegianceProfile* ebx_3 = &ClientAllegianceSystem::GetAllegianceSystem()->m_allegianceProfile;
00491bdb          CAllegianceData::CAllegianceData(&var_2f0);
00491be4          __return = &var_2f0;
00491be7          uint32_t eax_5 = AllegianceProfile::GetMonarch(ebx_3, __return);
00491bee          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00491bf5          var_2fc = eax_5;
00491bf9          uint32_t player_id;
00491bf9          
00491bf9          if (SmartBox::smartbox_1 == 0)
00491c03              player_id = 0;
00491bf9          else
00491bfb              player_id = SmartBox::smartbox_1->player_id;
00491bfb          
00491c0f          if ((eax_5 == player_id || eax_5 == 0))
00491c0f          {
00491f6d              struct UIElement::VTable* vtable_1 = this->m_pMonarchField->vtable;
00491f6f              __return = nullptr;
00491f70              vtable_1->SetVisible(__return);
00491f73              __return = &data_794358;
00491f7c              PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, __return);
00491f85              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00491f8c              UIElement_Text::SetText(this->m_pMonarchName, __return);
00491f9b              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_9 = ((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_2 - 0x14);
00491fa1              __return = ((char*)edi_9 + 4);
00491fa1              
00491faa              if ((InterlockedDecrement(__return) == 0 && edi_9 != 0))
00491faa              {
00491fac                  int32_t eax_20 = *(int32_t*)((char*)ADJ(edi_9) + -0x14);
00491fae                  __return = 1;
00491fb2                  *(uint32_t*)eax_20(__return);
00491faa              }
00491faa              
00491fb4              __return = &data_794358;
00491fbd              PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, __return);
00491fc6              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00491fcd              UIElement_Text::SetText(this->m_pMonarchFollowers, __return);
00491fd6              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) esi_2 = ((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_2 - 0x14);
00491fdc              __return = ((char*)esi_2 + 4);
00491fdc              
00491fe5              if ((InterlockedDecrement(__return) == 0 && esi_2 != 0))
00491fe5              {
00491fe7                  int32_t eax_21 = *(int32_t*)((char*)ADJ(esi_2) + -0x14);
00491fe9                  __return = 1;
00491fed                  *(uint32_t*)eax_21(__return);
00491fe5              }
00491c0f          }
00491c0f          else
00491c0f          {
00491c1b              struct UIElement::VTable* vtable_2 = this->m_pMonarchField->vtable;
00491c1d              __return = 1;
00491c1f              vtable_2->SetVisible(__return);
00491c29              void var_1f0;
00491c29              CAllegianceData::CAllegianceData(&var_1f0);
00491c2e              class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
00491c35              uint32_t player_id_1;
00491c35              
00491c35              if (SmartBox::smartbox_2 == 0)
00491c3f                  player_id_1 = 0;
00491c35              else
00491c37                  player_id_1 = SmartBox::smartbox_2->player_id;
00491c37              
00491c48              __return = &var_1f0;
00491c53              void var_280;
00491c53              void* ecx_11 = &var_280;
00491c53              
00491c5a              if (AllegianceProfile::GetPatron(ebx_3, player_id_1, __return) != eax_5)
00491c5a              {
00491d6d                  StringInfo::StringInfo(ecx_11);
00491d77                  __return = 0x10000001;
00491d84                  StringInfo::SetStringIDandTableEnum(&var_280, 0, __return);
00491d89                  __return = nullptr;
00491d96                  class PStringBase<unsigned short>* __return_3 = StringInfo::GetString(&var_280, &__return_1, __return);
00491d9b                  class UIElement_Text* m_pMonarchLabel_1 = this->m_pMonarchLabel;
00491da1                  __return = __return_3;
00491da2                  UIElement_Text::SetText(m_pMonarchLabel_1, __return);
00491dab                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00491db0                  class UIElement* m_pMonarchField_1 = this->m_pMonarchField;
00491db6                  __return = 0x10000490;
00491dc0                  struct UIElement::VTable* vtable_4 = UIElement::GetChildRecursive(m_pMonarchField_1, __return)->vtable;
00491dc2                  __return = nullptr;
00491dc5                  vtable_4->SetVisible(__return);
00491c5a              }
00491c5a              else
00491c5a              {
00491c60                  StringInfo::StringInfo(ecx_11);
00491c6b                  __return = 0x10000001;
00491c78                  StringInfo::SetStringIDandTableEnum(&var_280, 0, __return);
00491c7d                  __return = nullptr;
00491c8a                  class PStringBase<unsigned short>* __return_2 = StringInfo::GetString(&var_280, &__return_1, __return);
00491c8f                  class UIElement_Text* m_pMonarchLabel = this->m_pMonarchLabel;
00491c95                  __return = __return_2;
00491c96                  UIElement_Text::SetText(m_pMonarchLabel, __return);
00491c9f                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00491ca4                  class UIElement* m_pMonarchField = this->m_pMonarchField;
00491caa                  __return = 0x10000490;
00491caf                  class UIElement* eax_7 = UIElement::GetChildRecursive(m_pMonarchField, __return);
00491cb6                  struct UIElement::VTable* vtable_3 = eax_7->vtable;
00491cb8                  __return = 1;
00491cbc                  vtable_3->SetVisible(__return);
00491cc3                  void var_2b8;
00491cc3                  CAllegianceData::CAllegianceData(&var_2b8);
00491cc8                  class SmartBox* SmartBox::smartbox_3 = SmartBox::smartbox;
00491ccf                  uint32_t player_id_2;
00491ccf                  
00491ccf                  if (SmartBox::smartbox_3 == 0)
00491cd9                      player_id_2 = 0;
00491ccf                  else
00491cd1                      player_id_2 = SmartBox::smartbox_3->player_id;
00491cd1                  
00491cdf                  __return = &var_2b8;
00491ce3                  AllegianceProfile::GetData(ebx_3, player_id_2, __return);
00491cef                  void var_98;
00491cef                  StringInfo::StringInfo(&var_98);
00491cfa                  __return = 0x10000001;
00491d07                  StringInfo::SetStringIDandTableEnum(&var_98, 0, __return);
00491d16                  __return = nullptr;
00491d20                  int32_t var_298;
00491d20                  StringInfo::AddVariable_Int(&var_98, 0, var_298);
00491d25                  __return = 0x10000492;
00491d2c                  class UIElement_Text* eax_9 = UIElement::<class UIElement_Text>::GetChildRecursiveTemplate(eax_7, __return);
00491d31                  __return = nullptr;
00491d45                  __return = StringInfo::GetString(&var_98, &__return_1, __return);
00491d48                  UIElement_Text::SetText(eax_9, __return);
00491d51                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00491d5d                  StringInfo::~StringInfo(&var_98);
00491d66                  AllegianceData::~AllegianceData(&var_2b8);
00491c5a              }
00491c5a              
00491dcf              StringInfo::~StringInfo(&var_280);
00491dd4              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00491dd9              AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00491de0              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
00491de1              InterlockedIncrement(__return);
00491deb              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00491df0              AllegianceData::GetFullName(&var_2f0, __return);
00491dfc              void var_128;
00491dfc              StringInfo::StringInfo(&var_128);
00491e07              __return = 0x10000001;
00491e14              class TResult* __return_6 = StringInfo::SetStringIDandTableEnum(&var_128, 0, __return);
00491e19              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00491e1d              __return = __return_6;
00491e24              PStringBase<char>::PStringBase<char>(&__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
00491e37              StringInfo::AddVariable_String(&var_128, 0, __return);
00491e3c              __return = nullptr;
00491e49              class PStringBase<unsigned short>* __return_4 = StringInfo::GetString(&var_128, &__return_1, __return);
00491e4e              class UIElement_Text* m_pMonarchName = this->m_pMonarchName;
00491e54              __return = __return_4;
00491e55              UIElement_Text::SetText(m_pMonarchName, __return);
00491e64              int32_t* edi_5 = ((char*)__return_1 - 0x14);
00491e6a              __return = &edi_5[1];
00491e6a              
00491e73              if ((InterlockedDecrement(__return) == 0 && edi_5 != 0))
00491e73              {
00491e75                  int32_t edx_3 = *(uint32_t*)edi_5;
00491e77                  __return = 1;
00491e7b                  *(uint32_t*)edx_3(__return);
00491e73              }
00491e73              
00491e84              void var_1b8;
00491e84              StringInfo::StringInfo(&var_1b8);
00491e8e              __return = 0x10000001;
00491e9b              StringInfo::SetStringIDandTableEnum(&var_1b8, 0, __return);
00491eac              int32_t ecx_43 = (ebx_3->_total_members - 1);
00491ead              __return = nullptr;
00491eb8              StringInfo::AddVariable_Int(&var_1b8, 0, ecx_43);
00491ebd              __return = nullptr;
00491ecb              class PStringBase<unsigned short>* __return_5 = StringInfo::GetString(&var_1b8, &__return_1, __return);
00491ed0              class UIElement_Text* m_pMonarchFollowers = this->m_pMonarchFollowers;
00491ed6              __return = __return_5;
00491ed7              UIElement_Text::SetText(m_pMonarchFollowers, __return);
00491ee0              void* edi_7 = ((char*)__return_1 - 0x14);
00491ee6              __return = ((char*)edi_7 + 4);
00491ee6              
00491eef              if ((InterlockedDecrement(__return) == 0 && edi_7 != 0))
00491eef              {
00491ef1                  int32_t edx_4 = *(uint32_t*)edi_7;
00491ef3                  __return = 1;
00491ef7                  *(uint32_t*)edx_4(__return);
00491eef              }
00491eef              
00491f02              bool cond:4_1 = AllegianceData::IsLoggedIn(&var_2f0) == 0;
00491f04              class UIElement* m_pMonarchField_2 = this->m_pMonarchField;
00491f04              
00491f0c              if (cond:4_1)
00491f0c              {
00491f1a                  struct UIElement::VTable* vtable_5 = m_pMonarchField_2->vtable;
00491f1c                  __return = 0xd;
00491f1e                  vtable_5->SetState(__return);
00491f0c              }
00491f0c              else
00491f0c              {
00491f0e                  struct UIElement::VTable* vtable = m_pMonarchField_2->vtable;
00491f10                  __return = 1;
00491f12                  vtable->SetState(__return);
00491f0c              }
00491f0c              
00491f2b              StringInfo::~StringInfo(&var_1b8);
00491f37              StringInfo::~StringInfo(&var_128);
00491f3c              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00491f43              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef;
00491f43              
00491f4c              if ((InterlockedDecrement(__return) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
00491f4c              {
00491f4e                  struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable;
00491f50                  __return = 1;
00491f54                  vtable_6->__vecDelDtor(__return);
00491f4c              }
00491f4c              
00491f5d              AllegianceData::~AllegianceData(&var_1f0);
00491c0f          }
00491c0f          
00491fef          uint32_t ecx_61 = var_2fc;
00491ff5          uint32_t player_id_3;
00491ff5          
00491ff5          if (ecx_61 == 0)
0049201f              player_id_3 = 0;
00491ff5          else
00491ff5          {
00491ff7              class SmartBox* SmartBox::smartbox_4 = SmartBox::smartbox;
00491ff7              
00491ffe              if (SmartBox::smartbox_4 == 0)
00492008                  player_id_3 = 0;
00491ffe              else
00492000                  player_id_3 = SmartBox::smartbox_4->player_id;
00492000              
0049200c              if (ecx_61 == player_id_3)
0049201f                  player_id_3 = 0;
0049200c              else if (AllegianceData::IsLoggedIn(&var_2f0) == 0)
0049201f                  player_id_3 = 0;
00492019              else
0049201b                  player_id_3 = 1;
00491ff5          }
00491ff5          
00492021          __return = player_id_3;
00492024          gmCCommunicationSystem::SetTalkFocusEnabled(5, __return);
00492030          AllegianceData::~AllegianceData(&var_2f0);
0049203b          *(uint32_t*)(*(uint32_t*)var_2f8 + 0x14)();
0049203b          struct Turbine_GUID* __saved_edi;
0049203b          esp = &__saved_edi;
00491bb3      }
00491bb3      
0049203e      *(uint32_t*)esp;
0049203e      esp[1];
0049203e      esp[2];
0049203e      esp[3];
00491b40  }

00492049                             90 90 90 90 90 90 90                                                           .......

00492050  void __fastcall gmAllegianceUI::RecvNotice_EnchantmentsChanged(class gmAllegianceUI* this)

00492050  {
00492056      /* tailcall */
00492056      return gmAllegianceUI::UpdatePlayerData(((char*)this - 0x5f8));
00492050  }

0049205b                                                                                   90 90 90 90 90                             .....

00492060  void __thiscall gmAllegianceUI::RecvNotice_CloseDialog(class gmAllegianceUI* this, uint32_t arg2, class PropertyCollection const* arg3)

00492060  {
00492065      class PropertyCollection* esi = arg3;
00492070      uint32_t temp1 = (COMBINE(0, 0x8e) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
00492073      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
00492078      int32_t var_14 = 0;
0049207c      int32_t* var_8 = nullptr;
00492080      int32_t* var_4 = nullptr;
00492080      
0049208e      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
0049208e      {
00492096          if (*(uint32_t*)i == 0x8e)
00492096          {
004920a3              if (i != 0)
004920a3              {
004920ad                  BaseProperty::operator=(&var_8, &i[2]);
004920ad                  
004920b8                  if (var_4 != 0)
004920c1                      *(uint32_t*)(*(uint32_t*)var_4 + 0xa8)(&var_14);
004920a3              }
004920a3              
004920a3              break;
00492096          }
0049208e      }
0049208e      
004920cc      if (var_14 == 1)
004920cc      {
004920d9          uint32_t temp1_1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004920dc          class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004920df          arg3 = 0;
004920e3          int32_t* var_10 = nullptr;
004920e7          int32_t* var_c_1 = nullptr;
004920e7          
004920f2          for (int32_t* i_1 = m_buckets_1[temp1_1]; i_1 != 0; i_1 = i_1[1])
004920f2          {
004920fa              if (*(uint32_t*)i_1 == 0x92)
004920fa              {
00492107                  if (i_1 != 0)
00492107                  {
00492111                      BaseProperty::operator=(&var_10, &i_1[2]);
00492111                      
0049211c                      if (var_c_1 != 0)
00492125                          *(uint32_t*)(*(uint32_t*)var_c_1 + 0x70)(&arg3);
00492107                  }
00492107                  
00492107                  break;
004920fa              }
004920f2          }
004920f2          
0049212f          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x11] == arg2)
0049212f          {
00492131              bool cond:2_1 = arg3 == 0;
00492135              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x11] = nullptr;
00492135              
00492138              if (!(cond:2_1))
0049213e                  CM_Allegiance::Event_SwearAllegiance(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1]);
0049213e              
00492146              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = nullptr;
0049212f          }
0049212f          else if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x12] == arg2)
0049215b              gmAllegianceUI::CloseAcceptSwearConfirmationDialog(((char*)this - 0x5f8), ((int8_t)arg3));
0049214e          else if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x13] == arg2)
00492172              gmAllegianceUI::CloseBreakConfirmationDialog(((char*)this - 0x5f8), ((int8_t)arg3));
00492165          else if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x14] == arg2)
00492189              gmAllegianceUI::CloseKickConfirmationDialog(((char*)this - 0x5f8), ((int8_t)arg3));
00492189          
0049218e          int32_t* eax_10 = var_10;
0049218e          
00492194          if (eax_10 != 0)
00492194          {
0049219e              int32_t esi_2 = (eax_10[1] - 1);
0049219b              eax_10[1] = esi_2;
0049219b              
004921a5              if (esi_2 == 0)
004921ab                  **(uint32_t**)eax_10(1);
004921ab              
004921ad              var_10 = nullptr;
00492194          }
00492194          
004921b7          if (var_c_1 != 0)
004921b7          {
004921c1              int32_t esi_4 = (var_c_1[1] - 1);
004921be              var_c_1[1] = esi_4;
004921be              
004921c8              if (esi_4 == 0)
004921ce                  **(uint32_t**)var_c_1(1);
004921b7          }
004920cc      }
004920cc      
004921d0      int32_t* eax_15 = var_8;
004921d0      
004921d6      if (eax_15 != 0)
004921d6      {
004921e0          int32_t esi_6 = (eax_15[1] - 1);
004921dd          eax_15[1] = esi_6;
004921dd          
004921e7          if (esi_6 == 0)
004921ed              **(uint32_t**)eax_15(1);
004921ed          
004921ef          var_8 = nullptr;
004921d6      }
004921d6      
004921f9      if (var_4 != 0)
004921f9      {
00492203          int32_t esi_8 = (var_4[1] - 1);
00492200          var_4[1] = esi_8;
00492200          
0049220a          if (esi_8 == 0)
00492210              **(uint32_t**)var_4(1);
004921f9      }
00492060  }

0049221b                                                                                   90 90 90 90 90                             .....

00492220  void gmAllegianceUI::RecvNotice_AllegianceLogin(class gmAllegianceUI* this @ ecx, uint32_t arg2, uint8_t arg3)

00492220  {
00492224      class ClientAllegianceSystem* eax = ClientAllegianceSystem::GetAllegianceSystem();
0049222f      void var_38;
0049222f      CAllegianceData::CAllegianceData(&var_38);
0049222f      
00492248      if (AllegianceProfile::GetData(&eax->m_allegianceProfile, arg2, &var_38) == 0)
00492248      {
0049224e          AllegianceData::~AllegianceData(&var_38);
00492257          return;
00492248      }
00492248      
0049225b      uint32_t var_30;
0049225b      uint32_t ebx = var_30;
00492264      arg2 = ebx;
00492268      InterlockedIncrement((ebx + 4));
00492278      char* var_48_1;
00492278      
00492278      if (arg3 == 0)
00492281          var_48_1 = &gmAllegianceUI::`vftable'.RecvNotice_PrevSpellTab;
00492278      else
0049227a          var_48_1 = &gmAllegianceUI::`vftable'.RecvNotice_UpdateSpellComponents;
0049227a      
00492286      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, var_48_1);
0049228b      int32_t* esi_1 = arg3;
0049228f      int32_t eax_3 = esi_1[2];
0049228f      
0049229d      if ((eax_3 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0049229d      {
004922a9          AC1Legacy::PStringBase<char>::append_n_chars(&arg2, &esi_1[5], (eax_3 - 1));
004922ae          ebx = arg2;
0049229d      }
0049229d      
004922c0      if (InterlockedDecrement(&esi_1[1]) == 0)
004922c8          **(uint32_t**)esi_1(1);
004922c8      
004922ca      ClientUISystem::GetUISystem();
004922db      int32_t* ebx_1;
004922db      class ClientSystem* esi_3;
004922db      ebx_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, WidthConvert, (ebx + 0x14));
004922ed      ClientSystem::AddTextToScroll(esi_3, &arg3, 0, 1, 0);
004922f6      int32_t* esi_5 = (arg3 - 0x14);
004922f6      
00492305      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0049230d          **(uint32_t**)esi_5(1);
0049230d      
0049231b      if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
00492323          **(uint32_t**)ebx_1(1);
00492323      
00492329      AllegianceData::~AllegianceData(&var_38);
00492220  }

00492337                                                                       90 90 90 90 90 90 90 90 90                         .........

00492340  void __fastcall gmAllegianceUI::UpdateVassalsData(class gmAllegianceUI* this)

00492340  {
00492355      struct Turbine_GUID* var_104 = &PlayerDesc_ClassType;
0049235a      enum _WidthConvert ebx = WidthConvert;
0049235d      class gmAllegianceUI* this_1 = this;
00492361      struct Turbine_GUID* var_ec = nullptr;
0049236c      void __return_1;
0049236c      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, var_104, &var_ec);
00492371      struct Turbine_GUID* ecx_1 = var_ec;
0049237a      var_104 = ecx_1;
0049237c      int32_t var_100_1 = 0;
0049237f      struct Turbine_GUID* eax_1 = var_104;
00492385      class PStringBase<unsigned short> var_d8 = 0;
00492389      void* var_d4 = nullptr;
00492389      
0049238d      if (eax_1 != 0)
00492393          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00492393      
0049239f      struct Turbine_GUID** esp = &var_104;
004923a6      int32_t* var_e0;
004923a6      int32_t edi = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_d8, &var_e0);
004923a6      
004923a8      if (ecx_1 != 0)
004923ae          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004923ae      
004923b1      int32_t* ecx_5 = var_e0;
004923b1      
004923b7      if (ecx_5 != 0)
004923b7      {
004923bf          if (edi < 0)
004923bf          {
004923c3              *(uint32_t*)(*(uint32_t*)ecx_5 + 0x14)();
004923d0              return;
004923bf          }
004923bf          
004923d1          class ClientAllegianceSystem* eax_4 = ClientAllegianceSystem::GetAllegianceSystem();
004923e5          UIElement_ListBox::Flush(this->m_pVassalListBox);
004923ee          this->m_iidSelectedVassal = 0;
004923f4          var_ec = 0;
004923f8          void var_d0;
004923f8          CAllegianceData::CAllegianceData(&var_d0);
004923fd          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00492404          uint32_t player_id;
00492404          
00492404          if (SmartBox::smartbox_1 == 0)
0049240e              player_id = 0;
00492404          else
00492406              player_id = SmartBox::smartbox_1->player_id;
00492406          
0049241d          uint32_t __saved_ebp_2 = AllegianceProfile::GetFirstVassal(&eax_4->m_allegianceProfile, player_id, &var_d0);
00492421          uint32_t __saved_ebp_1 = __saved_ebp_2;
00492421          
00492425          if (__saved_ebp_2 != 0)
00492425          {
00492602              do
00492602              {
0049243c                  if (AllegianceData::IsLoggedIn(&var_d0) != 0)
0049243e                      var_ec = 1;
0049243e                  
0049244f                  class UIElement* eax_7 = UIElement_ListBox::AddItemFromTemplateList(*(uint32_t*)((char*)var_d4 + 0x638), ebx, ebx);
0049244f                  
00492458                  if (eax_7 != ebx)
00492458                  {
00492466                      UIElement::SetAttribute_InstanceID(eax_7, 0x10000001, __saved_ebp_2);
00492472                      class UIElement* eax_8 = UIElement::GetChildRecursive(eax_7, 0x10000268);
00492472                      
00492479                      if (eax_8 == ebx)
00492479                          break;
00492479                      
0049248f                      if (eax_8->vtable->DynamicCast(0xc) == ebx)
0049248f                          break;
0049248f                      
00492495                      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004924a2                      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004924b1                      int32_t __saved_ebx;
004924b1                      AllegianceData::GetFullName(&var_d0, &__saved_ebx);
004924c3                      class PStringBase<unsigned short>* eax_11;
004924c3                      class UIElement_Text* esi_4;
004924c3                      eax_11 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_d8, ebx, &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data);
004924cb                      UIElement_Text::SetText(esi_4, eax_11);
004924d4                      int32_t* esi_6 = (var_d8 - 0x14);
004924d4                      
004924e3                      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != ebx))
004924eb                          **(uint32_t**)esi_6(1);
004924eb                      
004924f4                      class UIElement* eax_14 = UIElement::GetChildRecursive(eax_7, 0x10000269);
004924fb                      class UIElement_Text* eax_15;
004924fb                      
004924fb                      if (eax_14 != ebx)
00492507                          eax_15 = eax_14->vtable->DynamicCast(0xc);
00492507                      
00492511                      uint32_t* var_108_17;
00492511                      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00492511                      
00492511                      if ((eax_14 == ebx || eax_15 == ebx))
00492511                      {
0049260a                          AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00492611                          var_108_17 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef;
00492625                      label_492625:
00492625                          
0049262d                          if ((InterlockedDecrement(var_108_17) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != ebx))
0049262f                              AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
0049262f                          
0049262d                          break;
00492511                      }
00492511                      
0049251b                      void var_98;
0049251b                      StringInfo::StringInfo(&var_98);
0049252f                      StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000001);
0049253e                      enum _WidthConvert var_108_10 = ebx;
00492545                      int32_t var_b0;
00492545                      StringInfo::AddVariable_Int(&var_98, 0, var_b0);
0049255c                      void* __return;
0049255c                      UIElement_Text::SetText(eax_15, StringInfo::GetString(&var_98, &__return, ebx));
00492565                      int32_t* esi_9 = ((char*)__return - 0x14);
00492565                      
00492574                      if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != ebx))
0049257c                          **(uint32_t**)esi_9(1);
0049257c                      
00492585                      class UIElement* eax_18 = UIElement::GetChildRecursive(eax_7, 0x100004aa);
0049258c                      int32_t* eax_19;
0049258c                      
0049258c                      if (eax_18 != ebx)
00492598                          eax_19 = eax_18->vtable->DynamicCast(0xc);
00492598                      
004925a2                      if ((eax_18 == ebx || eax_19 == ebx))
004925a2                      {
00492618                          StringInfo::~StringInfo(&var_98);
0049261d                          AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00492624                          var_108_17 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef;
00492624                          goto label_492625;
004925a2                      }
004925a2                      
004925b1                      if (AllegianceData::IsLoggedIn(&var_d0) == 0)
004925bf                          *(uint32_t*)(*(uint32_t*)eax_19 + 0x18)(1);
004925b1                      else
004925b6                          *(uint32_t*)(*(uint32_t*)eax_19 + 0x18)(ebx);
004925b6                      
004925d9                      __saved_ebp_1 = AllegianceProfile::GetNextVassal(&eax_4->m_allegianceProfile, __saved_ebp_1, &var_d0);
004925dd                      StringInfo::~StringInfo(&var_98);
004925dd                      
004925f2                      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != ebx))
004925f4                          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
004925f4                      
004925fc                      __saved_ebp_2 = __saved_ebp_1;
00492458                  }
00492602              } while (__saved_ebp_2 != ebx);
00492425          }
00492425          
0049263e          gmCCommunicationSystem::SetTalkFocusEnabled(6, ((int8_t)var_ec));
0049264a          AllegianceData::~AllegianceData(&var_d0);
00492655          *(uint32_t*)(*(uint32_t*)var_e0 + 0x14)();
00492655          struct Turbine_GUID* __saved_edi;
00492655          esp = &__saved_edi;
004923b7      }
004923b7      
00492658      *(uint32_t*)esp;
00492658      esp[1];
00492658      esp[2];
00492658      esp[3];
00492340  }

00492663           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00492670  void __fastcall gmAllegianceUI::Update(class gmAllegianceUI* this)

00492670  {
00492683      if (this->m_bAwaitingUpdate != 0)
00492683      {
00492685          this->m_bAwaitingUpdate = 0;
00492692          ClientUISystem::DecrementBusyCount(ClientUISystem::GetUISystem());
00492683      }
00492683      
0049269b      struct Turbine_GUID* var_14;
0049269b      int32_t* var_28 = &var_14;
004926a0      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004926a6      var_14 = nullptr;
004926b1      class TResult __return;
004926b1      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004926b6      struct Turbine_GUID* edi = var_14;
004926bf      var_2c = edi;
004926c1      int32_t var_28_1 = 0;
004926c4      struct Turbine_GUID* eax_3 = var_2c;
004926c8      int32_t var_8 = 0;
004926cc      int32_t var_4 = 0;
004926cc      
004926d0      if (eax_3 != 0)
004926d6          *(uint32_t*)(eax_3->m_data1 + 0x10)();
004926d6      
004926e2      struct Turbine_GUID** esp = &var_2c;
004926e9      void var_c;
004926e9      int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004926e9      
004926eb      if (edi != 0)
004926f1          *(uint32_t*)(edi->m_data1 + 0x14)();
004926f1      
004926f4      class TResult __return_1 = __return;
004926f4      
004926fa      if (__return_1 != 0)
004926fa      {
004926fe          if (ebp < 0)
004926fe          {
00492704              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049270e              return;
004926fe          }
004926fe          
00492711          gmAllegianceUI::UpdatePlayerData(this);
00492718          gmAllegianceUI::UpdateMonarchData(this);
0049271f          gmAllegianceUI::UpdatePatronData(this);
00492726          gmAllegianceUI::UpdateVassalsData(this);
0049272d          gmAllegianceUI::UpdateSwearButton(this);
00492734          gmAllegianceUI::UpdateBreakButton(this);
0049273f          class UIElement_Button* m_pKickButton = this->m_pKickButton;
0049273f          
00492745          if (this->m_iidSelectedVassal != 0)
00492745          {
00492747              m_pKickButton->vtable->SetState(1);
00492755              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049275f              return;
00492745          }
00492745          
00492760          m_pKickButton->vtable->SetState(0xd);
00492764          struct Turbine_GUID* __saved_edi;
00492764          esp = &__saved_edi;
0049276e          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004926fa      }
004926fa      
00492771      *(uint32_t*)esp;
00492771      esp[1];
00492771      esp[2];
00492771      esp[3];
00492670  }

00492779                                                                             90 90 90 90 90 90 90                           .......

00492780  void __fastcall gmAllegianceUI::RecvNotice_AllegianceUpdate(class gmAllegianceUI* this, class CAllegianceProfile const* arg2, uint32_t arg3)

00492780  {
00492786      gmAllegianceUI::Update(((char*)this - 0x5f8));
00492780  }

0049278e                                            90 90                                                                ..

00492790  void __fastcall gmAllegianceUI::RecvNotice_AllegianceUpdateAborted(class gmAllegianceUI* this, uint32_t arg2)

00492790  {
00492795      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable != 0)
0049279d          gmAllegianceUI::Update(((char*)this - 0x5f8));
00492790  }

004927a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004927b0  uint8_t __fastcall gmAllegianceUI::MakeSwearConfirmationDialog(class gmAllegianceUI* this)

004927b0  {
004927c2      if (this->m_swearContext == 0)
004927c2      {
004927c8          uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004927cd          int32_t var_120 = 0;
004927da          var_120 = ACCWeenieObject::GetObjectName(ACCWeenieObject::selectedID_1, NAME_APPROPRIATE, var_120);
004927df          uint32_t var_10c;
004927df          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_10c, var_120);
004927e4          int32_t* esi_1 = var_10c;
004927e4          
004927ec          if (esi_1[2] != 1)
004927ec          {
004927f9              void var_90;
004927f9              StringInfo::StringInfo(&var_90);
00492803              var_120 = 0x10000001;
00492815              var_120 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_120);
0049281c              PStringBase<char>::PStringBase<char>(&var_120, &esi_1[5]);
0049282f              StringInfo::AddVariable_String(&var_90, 0, var_120);
00492838              void var_108;
00492838              PropertyCollection::PropertyCollection(&var_108);
0049283d              var_120 = 0x8e;
00492846              int32_t var_114 = 0;
0049284e              int32_t* var_110_1 = nullptr;
00492856              BaseProperty::SetPropertyName(&var_114, var_120);
00492856              
00492861              if (var_110_1 != 0)
00492861              {
00492867                  BaseProperty::CheckCopyOnWrite(&var_114);
00492870                  int32_t edx_1 = *(uint32_t*)var_110_1;
00492872                  var_120 = 1;
00492874                  *(uint32_t*)(edx_1 + 0xac)(var_120);
00492861              }
00492861              
00492883              var_10c = BaseProperty::GetPropertyName(&var_114);
0049288b              var_120 = &var_114;
00492895              void var_104;
00492895              HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, var_120);
0049289a              var_120 = 0xc5;
004928a3              BaseProperty::SetPropertyName(&var_114, var_120);
004928a3              
004928ae              if (var_110_1 != 0)
004928ae              {
004928b4                  BaseProperty::CheckCopyOnWrite(&var_114);
004928bd                  int32_t edx_2 = *(uint32_t*)var_110_1;
004928c6                  var_120 = &var_90;
004928c7                  *(uint32_t*)(edx_2 + 0xc4)(var_120);
004928ae              }
004928ae              
004928d1              uint32_t eax_6 = BaseProperty::GetPropertyName(&var_114);
004928da              var_120 = &var_114;
004928e4              var_10c = eax_6;
004928e8              HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, var_120);
004928f1              var_120 = &var_108;
004928f2              uint32_t eax_7 = DialogFactory::MakeDialogInCurrentUI(var_120);
004928fc              this->m_swearContext = eax_7;
00492902              int32_t* ecx_17 = &var_114;
00492902              
00492906              if (eax_7 != 0)
00492906              {
00492948                  this->m_iidPossibleNewPatron = ACCWeenieObject::selectedID;
0049294e                  BaseProperty::~BaseProperty(ecx_17);
00492957                  PropertyCollection::~PropertyCollection(&var_108);
00492963                  StringInfo::~StringInfo(&var_90);
0049296b                  var_120 = &esi_1[1];
0049296b                  
00492974                  if (InterlockedDecrement(var_120) == 0)
00492974                  {
00492976                      int32_t edx_4 = *(uint32_t*)esi_1;
00492978                      var_120 = 1;
0049297c                      *(uint32_t*)edx_4(var_120);
00492974                  }
00492974                  
0049297f                  int32_t eax_9;
0049297f                  eax_9 = 1;
00492988                  return 1;
00492906              }
00492906              
00492908              BaseProperty::~BaseProperty(ecx_17);
00492911              PropertyCollection::~PropertyCollection(&var_108);
0049291d              StringInfo::~StringInfo(&var_90);
004927ec          }
004927ec          
00492925          var_120 = &esi_1[1];
00492925          
0049292e          if (InterlockedDecrement(var_120) == 0)
0049292e          {
00492930              int32_t edx_3 = *(uint32_t*)esi_1;
00492932              var_120 = 1;
00492936              *(uint32_t*)edx_3(var_120);
0049292e          }
004927c2      }
004927c2      
00492938      uint32_t eax;
00492938      eax = 0;
00492942      return 0;
004927b0  }

00492989                             90 90 90 90 90 90 90                                                           .......

00492990  uint8_t __thiscall gmAllegianceUI::MakeAcceptSwearConfirmationDialog(class gmAllegianceUI* this, class PStringBase<char> arg2, uint32_t arg3)

00492990  {
004929a5      class PropertyCollection* var_124;
004929a5      int32_t* esi_2;
004929a5      
004929a5      if (this->m_acceptSwearContext == 0)
004929a5      {
004929c1          void var_90;
004929c1          StringInfo::StringInfo(&var_90);
004929cb          var_124 = 0x10000001;
004929e4          var_124 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_124);
004929e8          PStringBase<char>::PStringBase<char>(&var_124, arg2);
004929fb          StringInfo::AddVariable_String(&var_90, 0, var_124);
00492a04          void var_108;
00492a04          PropertyCollection::PropertyCollection(&var_108);
00492a09          var_124 = 0x8e;
00492a12          int32_t* var_114 = nullptr;
00492a16          int32_t* var_110_1 = nullptr;
00492a1a          BaseProperty::SetPropertyName(&var_114, var_124);
00492a1a          
00492a23          if (var_110_1 != 0)
00492a23          {
00492a29              BaseProperty::CheckCopyOnWrite(&var_114);
00492a32              int32_t edx_1 = *(uint32_t*)var_110_1;
00492a34              var_124 = 1;
00492a36              *(uint32_t*)(edx_1 + 0xac)(var_124);
00492a23          }
00492a23          
00492a45          uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
00492a4d          var_124 = &var_114;
00492a57          void var_104;
00492a57          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, var_124);
00492a5c          var_124 = 0xc5;
00492a65          BaseProperty::SetPropertyName(&var_114, var_124);
00492a65          
00492a6e          if (var_110_1 != 0)
00492a6e          {
00492a74              BaseProperty::CheckCopyOnWrite(&var_114);
00492a7d              int32_t edx_2 = *(uint32_t*)var_110_1;
00492a86              var_124 = &var_90;
00492a87              *(uint32_t*)(edx_2 + 0xc4)(var_124);
00492a6e          }
00492a6e          
00492a91          uint32_t eax_3 = BaseProperty::GetPropertyName(&var_114);
00492a9a          var_124 = &var_114;
00492aa4          var_10c = eax_3;
00492aa8          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, var_124);
00492ab1          var_124 = &var_108;
00492ab2          uint32_t eax_4 = DialogFactory::MakeDialogInCurrentUI(var_124);
00492abc          this->m_acceptSwearContext = eax_4;
00492abc          
00492ac2          if (eax_4 != 0)
00492ac2          {
00492b55              this->m_uiAcceptSwearServerContextID = arg3;
00492b5b              int32_t* eax_12 = var_114;
00492b5b              
00492b61              if (eax_12 != 0)
00492b61              {
00492b6b                  int32_t esi_8 = (eax_12[1] - 1);
00492b68                  eax_12[1] = esi_8;
00492b68                  
00492b72                  if (esi_8 == 0)
00492b72                  {
00492b74                      int32_t edx_8 = *(uint32_t*)eax_12;
00492b76                      var_124 = 1;
00492b78                      *(uint32_t*)edx_8(var_124);
00492b72                  }
00492b72                  
00492b7a                  var_114 = nullptr;
00492b61              }
00492b61              
00492b84              if (var_110_1 != 0)
00492b84              {
00492b8e                  int32_t esi_10 = (var_110_1[1] - 1);
00492b8b                  var_110_1[1] = esi_10;
00492b8b                  
00492b95                  if (esi_10 == 0)
00492b95                  {
00492b97                      int32_t eax_16 = *(uint32_t*)var_110_1;
00492b99                      var_124 = 1;
00492b9b                      *(uint32_t*)eax_16(var_124);
00492b95                  }
00492b95                  
00492b9d                  int32_t var_110_3 = 0;
00492b84              }
00492b84              
00492ba5              PropertyCollection::~PropertyCollection(&var_108);
00492bb1              StringInfo::~StringInfo(&var_90);
00492bbc              var_124 = (arg2 - 0x10);
00492bbc              
00492bc9              if ((InterlockedDecrement(var_124) == 0 && arg2 != 0x14))
00492bc9              {
00492bcb                  int32_t edx_10 = *(uint32_t*)(arg2 - 0x14);
00492bcd                  var_124 = 1;
00492bd1                  *(uint32_t*)edx_10(var_124);
00492bc9              }
00492bc9              
00492bd5              int32_t eax_17;
00492bd5              eax_17 = 1;
00492bde              return 1;
00492ac2          }
00492ac2          
00492ac8          int32_t* eax_5 = var_114;
00492ac8          
00492ace          if (eax_5 != 0)
00492ace          {
00492ad8              int32_t esi_4 = (eax_5[1] - 1);
00492ad5              eax_5[1] = esi_4;
00492ad5              
00492adf              if (esi_4 == 0)
00492adf              {
00492ae1                  int32_t edx_4 = *(uint32_t*)eax_5;
00492ae3                  var_124 = 1;
00492ae5                  *(uint32_t*)edx_4(var_124);
00492adf              }
00492adf              
00492ae7              var_114 = nullptr;
00492ace          }
00492ace          
00492af1          if (var_110_1 != 0)
00492af1          {
00492afb              int32_t esi_6 = (var_110_1[1] - 1);
00492af8              var_110_1[1] = esi_6;
00492af8              
00492b02              if (esi_6 == 0)
00492b02              {
00492b04                  int32_t eax_9 = *(uint32_t*)var_110_1;
00492b06                  var_124 = 1;
00492b08                  *(uint32_t*)eax_9(var_124);
00492b02              }
00492b02              
00492b0a              int32_t var_110_2 = 0;
00492af1          }
00492af1          
00492b12          PropertyCollection::~PropertyCollection(&var_108);
00492b1e          StringInfo::~StringInfo(&var_90);
00492b23          esi_2 = (arg2 - 0x14);
00492b29          var_124 = &esi_2[1];
004929a5      }
004929a5      else
004929a5      {
004929ae          esi_2 = (arg2 - 0x14);
004929b4          var_124 = &esi_2[1];
004929a5      }
004929a5      
00492b36      if ((InterlockedDecrement() == 0 && esi_2 != 0))
00492b36      {
00492b38          int32_t edx_6 = *(uint32_t*)esi_2;
00492b3a          var_124 = 1;
00492b3e          *(uint32_t*)edx_6(var_124);
00492b36      }
00492b36      
00492b40      int32_t eax_10;
00492b40      eax_10 = 0;
00492b4b      return 0;
00492990  }

00492be1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00492bf0  uint8_t __fastcall gmAllegianceUI::MakeBreakConfirmationDialog(class gmAllegianceUI* this)

00492bf0  {
00492c03      if (this->m_breakContext == 0)
00492c03      {
00492c14          class CAllegianceProfile* esi_2 = &ClientAllegianceSystem::GetAllegianceSystem()->m_allegianceProfile;
00492c17          void var_140;
00492c17          CAllegianceData::CAllegianceData(&var_140);
00492c1c          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00492c23          uint32_t player_id;
00492c23          
00492c23          if (SmartBox::smartbox_1 == 0)
00492c2d              player_id = 0;
00492c23          else
00492c25              player_id = SmartBox::smartbox_1->player_id;
00492c25          
00492c33          class AllegianceData* var_160 = &var_140;
00492c33          
00492c3e          if (AllegianceProfile::GetPatron(esi_2, player_id, var_160) != 0)
00492c3e          {
00492c4b              int32_t* var_138;
00492c4b              var_160 = &var_138[1];
00492c4c              int32_t* var_144 = var_138;
00492c50              InterlockedIncrement(var_160);
00492c50              
00492c5a              if (var_138[2] == 1)
00492c5a              {
00492c5c                  var_160 = &var_138[1];
00492c5c                  
00492c65                  if (InterlockedDecrement(var_160) == 0)
00492c65                  {
00492c67                      int32_t edx_1 = *(uint32_t*)var_138;
00492c69                      var_160 = 1;
00492c6d                      *(uint32_t*)edx_1(var_160);
00492c65                  }
00492c65                  
00492c73                  AllegianceData::~AllegianceData(&var_140);
00492c78                  int32_t eax_4;
00492c78                  eax_4 = 0;
00492c83                  return 0;
00492c5a              }
00492c5a              
00492c8b              void var_90;
00492c8b              StringInfo::StringInfo(&var_90);
00492c95              var_160 = 0x10000001;
00492ca7              var_160 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_160);
00492cae              PStringBase<char>::PStringBase<char>(&var_160, &var_138[5]);
00492cc1              StringInfo::AddVariable_String(&var_90, 0, var_160);
00492cca              void var_108;
00492cca              PropertyCollection::PropertyCollection(&var_108);
00492ccf              var_160 = 0x8e;
00492cd8              int32_t var_150 = 0;
00492ce0              int32_t* var_14c_1 = nullptr;
00492ce8              BaseProperty::SetPropertyName(&var_150, var_160);
00492ce8              
00492cf3              if (var_14c_1 != 0)
00492cf3              {
00492cf9                  BaseProperty::CheckCopyOnWrite(&var_150);
00492d02                  int32_t edx_2 = *(uint32_t*)var_14c_1;
00492d04                  var_160 = 1;
00492d06                  *(uint32_t*)(edx_2 + 0xac)(var_160);
00492cf3              }
00492cf3              
00492d15              uint32_t var_148 = BaseProperty::GetPropertyName(&var_150);
00492d1d              var_160 = &var_150;
00492d27              void var_104;
00492d27              HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_148, var_160);
00492d2c              var_160 = 0xc5;
00492d35              BaseProperty::SetPropertyName(&var_150, var_160);
00492d35              
00492d40              if (var_14c_1 != 0)
00492d40              {
00492d46                  BaseProperty::CheckCopyOnWrite(&var_150);
00492d4f                  int32_t edx_3 = *(uint32_t*)var_14c_1;
00492d58                  var_160 = &var_90;
00492d59                  *(uint32_t*)(edx_3 + 0xc4)(var_160);
00492d40              }
00492d40              
00492d63              uint32_t eax_9 = BaseProperty::GetPropertyName(&var_150);
00492d6c              var_160 = &var_150;
00492d76              var_148 = eax_9;
00492d7a              HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_148, var_160);
00492d83              var_160 = &var_108;
00492d84              uint32_t eax_10 = DialogFactory::MakeDialogInCurrentUI(var_160);
00492d8e              this->m_breakContext = eax_10;
00492d94              int32_t* ecx_20 = &var_150;
00492d94              
00492d98              if (eax_10 != 0)
00492d98              {
00492dd2                  BaseProperty::~BaseProperty(ecx_20);
00492ddb                  PropertyCollection::~PropertyCollection(&var_108);
00492de7                  StringInfo::~StringInfo(&var_90);
00492df0                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_144);
00492df9                  AllegianceData::~AllegianceData(&var_140);
00492e00                  int32_t eax_11;
00492e00                  eax_11 = 1;
00492e09                  return 1;
00492d98              }
00492d98              
00492d9a              BaseProperty::~BaseProperty(ecx_20);
00492da3              PropertyCollection::~PropertyCollection(&var_108);
00492daf              StringInfo::~StringInfo(&var_90);
00492db8              AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_144);
00492c3e          }
00492c3e          
00492dc1          AllegianceData::~AllegianceData(&var_140);
00492c03      }
00492c03      
00492dc6      uint32_t eax;
00492dc6      eax = 0;
00492dd1      return 0;
00492bf0  }

00492e0a                                90 90 90 90 90 90                                                            ......

00492e10  uint8_t __fastcall gmAllegianceUI::MakeKickConfirmationDialog(class gmAllegianceUI* this)

00492e10  {
00492e23      if (this->m_kickContext == 0)
00492e23      {
00492e29          class ClientAllegianceSystem* eax_1 = ClientAllegianceSystem::GetAllegianceSystem();
00492e34          void var_140;
00492e34          CAllegianceData::CAllegianceData(&var_140);
00492e39          uint32_t m_iidSelectedVassal = this->m_iidSelectedVassal;
00492e43          void* var_160 = &var_140;
00492e43          
00492e4f          if (AllegianceProfile::GetData(&eax_1->m_allegianceProfile, m_iidSelectedVassal, var_160) != 0)
00492e4f          {
00492e5c              int32_t* var_138;
00492e5c              var_160 = &var_138[1];
00492e5d              int32_t* var_144 = var_138;
00492e61              InterlockedIncrement(var_160);
00492e61              
00492e6b              if (var_138[2] == 1)
00492e6b              {
00492e6d                  var_160 = &var_138[1];
00492e6d                  
00492e76                  if (InterlockedDecrement(var_160) == 0)
00492e76                  {
00492e78                      int32_t edx_1 = *(uint32_t*)var_138;
00492e7a                      var_160 = 1;
00492e7e                      *(uint32_t*)edx_1(var_160);
00492e76                  }
00492e76                  
00492e84                  AllegianceData::~AllegianceData(&var_140);
00492e89                  int32_t eax_4;
00492e89                  eax_4 = 0;
00492e94                  return 0;
00492e6b              }
00492e6b              
00492e9c              void var_90;
00492e9c              StringInfo::StringInfo(&var_90);
00492ea6              var_160 = 0x10000001;
00492eb8              var_160 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_160);
00492ebf              PStringBase<char>::PStringBase<char>(&var_160, &var_138[5]);
00492ed2              StringInfo::AddVariable_String(&var_90, 0, var_160);
00492edb              void var_108;
00492edb              PropertyCollection::PropertyCollection(&var_108);
00492ee0              var_160 = 0x8e;
00492ee9              int32_t var_150 = 0;
00492ef1              int32_t* var_14c_1 = nullptr;
00492ef9              BaseProperty::SetPropertyName(&var_150, var_160);
00492ef9              
00492f04              if (var_14c_1 != 0)
00492f04              {
00492f0a                  BaseProperty::CheckCopyOnWrite(&var_150);
00492f13                  int32_t edx_2 = *(uint32_t*)var_14c_1;
00492f15                  var_160 = 1;
00492f17                  *(uint32_t*)(edx_2 + 0xac)(var_160);
00492f04              }
00492f04              
00492f26              uint32_t var_148 = BaseProperty::GetPropertyName(&var_150);
00492f2e              var_160 = &var_150;
00492f38              void var_104;
00492f38              HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_148, var_160);
00492f3d              var_160 = 0xc5;
00492f46              BaseProperty::SetPropertyName(&var_150, var_160);
00492f46              
00492f51              if (var_14c_1 != 0)
00492f51              {
00492f57                  BaseProperty::CheckCopyOnWrite(&var_150);
00492f60                  int32_t edx_3 = *(uint32_t*)var_14c_1;
00492f69                  var_160 = &var_90;
00492f6a                  *(uint32_t*)(edx_3 + 0xc4)(var_160);
00492f51              }
00492f51              
00492f74              uint32_t eax_8 = BaseProperty::GetPropertyName(&var_150);
00492f7d              var_160 = &var_150;
00492f87              var_148 = eax_8;
00492f8b              HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_148, var_160);
00492f94              var_160 = &var_108;
00492f95              uint32_t eax_9 = DialogFactory::MakeDialogInCurrentUI(var_160);
00492f9f              this->m_kickContext = eax_9;
00492f9f              
00492fa5              if (eax_9 != 0)
00492fa5              {
00492fe9                  this->m_iidPossibleKickedVassal = this->m_iidSelectedVassal;
00492ff3                  BaseProperty::~BaseProperty(&var_150);
00492ffc                  PropertyCollection::~PropertyCollection(&var_108);
00493008                  StringInfo::~StringInfo(&var_90);
00493011                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_144);
0049301a                  AllegianceData::~AllegianceData(&var_140);
00493021                  int32_t eax_10;
00493021                  eax_10 = 1;
0049302a                  return 1;
00492fa5              }
00492fa5              
00492fab              BaseProperty::~BaseProperty(&var_150);
00492fb4              PropertyCollection::~PropertyCollection(&var_108);
00492fc0              StringInfo::~StringInfo(&var_90);
00492fc9              AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_144);
00492e4f          }
00492e4f          
00492fd2          AllegianceData::~AllegianceData(&var_140);
00492e23      }
00492e23      
00492fd7      uint32_t eax;
00492fd7      eax = 0;
00492fe2      return 0;
00492e10  }

0049302b                                   90 90 90 90 90                                                             .....

00493030  enum UIElementMessageListenResult __thiscall gmAllegianceUI::ListenToElementMessage(class gmAllegianceUI* this, struct UIElementMessageInfo const* arg2)

00493030  {
00493035      uint32_t idMessage = arg2->idMessage;
00493035      
0049303c      if (idMessage == 1)
0049303c      {
004930b6          uint32_t idElement = arg2->idElement;
004930b6          
004930bd          if (idElement == 0x10000263)
004930ef              gmAllegianceUI::MakeSwearConfirmationDialog(this);
004930bd          else
004930bd          {
004930c0              if (idElement == 0x10000264)
004930c0              {
004930db                  gmAllegianceUI::MakeBreakConfirmationDialog(this);
004930ea                  return UIElement::ListenToElementMessage(this, arg2);
004930c0              }
004930c0              
004930c3              if (idElement == 0x10000265)
004930c7                  gmAllegianceUI::MakeKickConfirmationDialog(this);
004930bd          }
0049303c      }
0049303c      else if (idMessage == 4)
00493041      {
00493048          class UIElement_ListBox* m_pVassalListBox = this->m_pVassalListBox;
00493058          class UIElement* eax_3 = UIElement_ListBox::GetItem(m_pVassalListBox, UIElement_ListBox::GetSelectedIndex(m_pVassalListBox));
00493058          
00493065          if (eax_3 == 0)
0049305f              this->m_iidSelectedVassal = 0;
00493065          else
0049306f              UIElement::GetAttribute_InstanceID(eax_3, 0x10000001, &this->m_iidSelectedVassal);
0049306f          
0049307f          class UIElement_Button* m_pKickButton = this->m_pKickButton;
0049307f          
00493086          if (this->m_iidSelectedVassal != 0)
00493086          {
00493088              m_pKickButton->vtable->SetState(1);
0049309c              return UIElement::ListenToElementMessage(this, arg2);
00493086          }
00493086          
0049309f          m_pKickButton->vtable->SetState(0xd);
00493041      }
00493041      
004930fe      return UIElement::ListenToElementMessage(this, arg2);
00493030  }

00493101     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00493110  void __thiscall gmAllegianceUI::RecvNotice_SwearAllegianceRequest(class gmAllegianceUI* this, class AC1Legacy::PStringBase<char> const* arg2, uint32_t arg3)

00493110  {
00493114      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
0049311e      uint32_t var_c = arg3;
00493125      PStringBase<char>::PStringBase<char>(&var_c, &m_buffer->m_data);
00493130      gmAllegianceUI::MakeAcceptSwearConfirmationDialog(((char*)this - 0x5f8), var_c, arg3);
00493110  }

00493139                                                                             90 90 90 90 90 90 90                           .......

00493140  uint8_t __thiscall gmPageListUI::CheckForDoubleClick(class gmPageListUI* this, int32_t const arg2)

00493140  {
00493144      long double x87_r7 = ((long double)Timer::cur_time);
00493144      
00493150      if (arg2 == this->m_LastClickIndex)
00493150      {
00493158          long double x87_r6_2 = (((long double)this->m_LastClickTime) + ((long double)1.0));
00493160          (x87_r7 - x87_r6_2);
00493160          
00493167          if ((*(uint8_t*)((char*)((((x87_r7 < x87_r6_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, x87_r6_2))) ? 1 : 0) << 0xa) | ((((x87_r7 == x87_r6_2) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
00493167          {
0049317e              this->m_LastClickTime = 0f;
00493184              *(uint32_t*)((char*)this->m_LastClickTime)[4] = 0;
0049318a              this->m_LastClickIndex = 0xffffffff;
00493194              int32_t eax_1;
00493194              eax_1 = 1;
00493196              return 1;
00493167          }
00493150      }
00493150      
00493169      this->m_LastClickTime = ((double)x87_r7);
0049316f      this->m_LastClickIndex = arg2;
00493175      int16_t eax;
00493175      eax = 0;
00493177      return 0;
00493140  }

00493199                                                                             90 90 90 90 90 90 90                           .......

004931a0  class PageInfo* _STL::__uninitialized_copy(class PageInfo* arg1, class PageInfo* arg2, class PageInfo* arg3, struct _STL::__false_type const* arg4)

004931a0  {
004931a6      class PageInfo* esi = arg1;
004931ad      class PageInfo* result = arg3;
004931ad      
004931b1      while (esi != arg2)
004931b1      {
004931b5          if (result != 0)
004931ba              PageInfo::PageInfo(result, esi);
004931ba          
004931bf          esi = &esi[1];
004931c2          result = &result[1];
004931b1      }
004931b1      
004931ce      return result;
004931a0  }

004931cf                                               90                                                                 .

004931d0  class PageInfo* _STL::__copy_backward(class PageInfo* arg1, class PageInfo* arg2, class PageInfo* arg3, struct _STL::random_access_iterator_tag const* arg4, int32_t* arg5)

004931d0  {
004931d6      class PageInfo* edi = arg2;
004931de      int32_t i_2 = (((char*)edi - arg1) >> 6);
004931de      
004931e3      if (i_2 <= 0)
0049320d          return arg3;
0049320d      
004931e5      class PageInfo* esi_1 = arg3;
004931ea      int32_t i_1 = i_2;
004931ff      int32_t i;
004931ff      
004931ff      do
004931ff      {
004931f0          edi -= 0x40;
004931f3          esi_1 -= 0x40;
004931f9          PageInfo::operator=(esi_1, edi);
004931fe          i = i_1;
004931fe          i_1 -= 1;
004931ff      } while (i != 1);
00493206      return esi_1;
004931d0  }

0049320e                                            90 90                                                                ..

00493210  class PageInfo* _STL::__copy(class PageInfo* arg1, class PageInfo* arg2, class PageInfo* arg3, struct _STL::random_access_iterator_tag const* arg4, int32_t* arg5)

00493210  {
00493215      class PageInfo* edi = arg1;
0049321b      int32_t i_2 = (((char*)arg2 - edi) >> 6);
0049321b      
00493220      if (i_2 <= 0)
0049324c          return arg3;
0049324c      
00493224      class PageInfo* esi = arg3;
0049322a      int32_t i_1 = i_2;
0049323f      int32_t i;
0049323f      
0049323f      do
0049323f      {
00493233          PageInfo::operator=(esi, edi);
00493238          edi = &edi[1];
0049323b          esi = &esi[1];
0049323e          i = i_1;
0049323e          i_1 -= 1;
0049323f      } while (i != 1);
00493246      return esi;
00493210  }

0049324d                                         90 90 90                                                               ...

00493250  void __fastcall PageInfo::~PageInfo(class PageInfo* this)

00493250  {
0049325e      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = (this->m_Notes.m_charbuffer - 0x14);
0049325e      
0049326d      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00493275          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00493275      
0049327a      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = (this->m_Title.m_charbuffer - 0x14);
0049327a      
00493289      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00493291          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00493291      
00493295      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_5 = (this->m_Label.m_charbuffer - 0x14);
00493295      
004932a4      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
004932ac          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00493250  }

004932b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004932c0  void _STL::__unguarded_linear_insert(class PageInfo* arg1, class PageInfo arg2, uint8_t (* arg3)(class PageInfo const*, class PageInfo const*))

004932c0  {
004932c7      class PageInfo* edi = arg1;
004932cb      void* __offset(PageInfo, -0x40) esi = &edi[-1];
004932d4      char eax;
004932d4      int32_t ecx;
004932d4      eax = arg3(&arg2, esi);
004932d4      
004932db      if (eax != 0)
004932db      {
004932fa          char i;
004932fa          
004932fa          do
004932fa          {
004932e3              PageInfo::operator=(edi, esi);
004932e8              edi = esi;
004932ea              esi -= 0x40;
004932f3              i = arg3(&arg2, esi);
004932fa          } while (i != 0);
004932db      }
004932db      
00493303      PageInfo::operator=(edi, &arg2);
0049330f      /* tailcall */
0049330f      return PageInfo::~PageInfo(&arg2);
004932c0  }

00493314                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00493320  void _STL::__push_heap(class PageInfo* arg1, int32_t arg2, int32_t arg3, class PageInfo arg4, uint8_t (* arg5)(class PageInfo const*, class PageInfo const*))

00493320  {
00493327      int32_t edi = arg2;
0049332e      int32_t eax_1;
0049332e      int32_t edx;
0049332e      edx = HIGHD(((int64_t)(edi - 1)));
0049332e      eax_1 = LOWD(((int64_t)(edi - 1)));
00493337      int32_t esi_1 = ((eax_1 - edx) >> 1);
00493337      
0049333b      while (edi > arg3)
0049333b      {
00493349          void* ebx_1 = &arg1[esi_1];
00493349          
00493357          if (arg5(ebx_1, &arg4) == 0)
00493357              break;
00493357          
00493361          PageInfo::operator=(&arg1[edi], ebx_1);
00493369          int32_t eax_8;
00493369          int32_t edx_1;
00493369          edx_1 = HIGHD(((int64_t)(esi_1 - 1)));
00493369          eax_8 = LOWD(((int64_t)(esi_1 - 1)));
0049336e          edi = esi_1;
00493370          esi_1 = ((eax_8 - edx_1) >> 1);
0049333b      }
0049333b      
00493385      PageInfo::operator=(&arg1[edi], &arg4);
00493391      /* tailcall */
00493391      return PageInfo::~PageInfo(&arg4);
00493320  }

00493396                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004933a0  void __fastcall gmPageListUI::PostInit(class gmPageListUI* this)

004933a0  {
004933a3      UIElement::PostInit(this);
004933af      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000583);
004933b6      class UIElement_ListBox* eax_1;
004933b6      
004933b6      if (eax == 0)
004933c6          eax_1 = nullptr;
004933b6      else
004933be          eax_1 = eax->vtable->DynamicCast(5);
004933be      
004933cf      this->m_pPageListBox = eax_1;
004933d5      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x10000587);
004933dc      class UIElement_Text* eax_3;
004933dc      
004933dc      if (eax_2 == 0)
004933ec          eax_3 = nullptr;
004933dc      else
004933e4          eax_3 = eax_2->vtable->DynamicCast(0xc);
004933e4      
004933ee      this->m_pSearchEditBox = eax_3;
004933f4      GlobalEventHandler::GetGlobalEventHandler();
004933fd      UIListener::RegisterForGlobalMessage(this, 3);
004933a0  }

00493404              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00493410  void __fastcall gmPageListUI::RefreshPageListbox(class gmPageListUI* this)

00493410  {
00493429      class PageInfo* _M_start_1 = this->m_PageListPages._M_start;
00493429      
00493436      if (this->m_pPageListBox->m_listItems.m_num == ((this->m_PageListPages._M_finish - _M_start_1) >> 6))
00493436      {
00493444          uint32_t i = 0;
0049344b          uint32_t i_1 = 0;
0049344b          
0049344f          if (((this->m_PageListPages._M_finish - _M_start_1) >> 6) > 0)
0049344f          {
00493457              int32_t ebp_1 = 0;
00493457              
0049357a              do
0049357a              {
00493473                  class UIElement* eax_4 = UIElement::GetChildRecursive(UIElement_ListBox::GetItem(this->m_pPageListBox, i), 0x1000058c);
00493473                  
0049347a                  if (eax_4 != 0)
0049347a                  {
0049348c                      class UIElement_Text* edi = eax_4->vtable->DynamicCast(0xc);
0049348c                      
00493494                      if (edi != 0)
00493494                      {
0049349a                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049349f                          class PSRefBufferCharData<unsigned short>* var_10 = PStringBase<unsigned short>::s_NullBuffer_1;
004934a7                          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004934ad                          class PageInfo* _M_start = this->m_PageListPages._M_start;
004934b7                          int32_t edx_5 = *(uint32_t*)(&_M_start->m_TimerStamp + ebp_1);
004934bb                          uint32_t __return = ((uint32_t)&_M_start->m_TimerRunning[ebp_1]);
004934c0                          int32_t var_24_3 = *(uint32_t*)(((char*)_M_start + ebp_1) + 0x1c);
004934c1                          int32_t var_28_1 = edx_5;
004934c2                          uint32_t __return_1 = __return;
004934c8                          void* var_4;
004934c8                          class PStringBase<unsigned short>* eax_7 = GetTimerText(__return, edx_5, &var_4);
004934cf                          class PSRefBufferCharData<unsigned short>* eax_8 = var_10;
004934cf                          
004934da                          if (eax_8 != eax_7->m_charbuffer)
004934da                          {
004934ef                              if ((InterlockedDecrement(&eax_8->m_data[-8]) == 0 && eax_8 != 0x14))
004934f7                                  *(uint32_t*)*(int32_t*)((char*)eax_8 + -0x14)(1);
004934f7                              
004934f9                              class PSRefBufferCharData<unsigned short>* m_charbuffer = eax_7->m_charbuffer;
004934fb                              var_10 = m_charbuffer;
00493503                              InterlockedIncrement(&m_charbuffer->m_data[-8]);
004934da                          }
004934da                          
00493511                          int32_t* esi_4 = ((char*)var_4 - 0x14);
00493511                          
00493524                          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0049352c                              **(uint32_t**)esi_4(1);
0049352c                          
00493535                          UIElement_Text::SetText(edi, &var_10);
0049353e                          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6 = &var_10->m_data[-0xa];
0049353e                          
00493551                          if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00493559                              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00493494                      }
0049347a                  }
0049347a                  
0049356d                  i = (i_1 + 1);
00493571                  ebp_1 += 0x40;
00493576                  i_1 = i;
0049357a              } while (i < ((this->m_PageListPages._M_finish - this->m_PageListPages._M_start) >> 6));
0049344f          }
00493436      }
00493410  }

00493588                          90 90 90 90 90 90 90 90                                                          ........

00493590  void _STL::__unguarded_insertion_sort_aux(class PageInfo* arg1, class PageInfo* arg2, class PageInfo* arg3, uint8_t (* arg4)(class PageInfo const*, class PageInfo const*))

00493590  {
0049359d      for (class PageInfo* i = arg1; i != arg2; i = &i[1])
0049359d      {
004935aa          void var_50;
004935aa          PageInfo::PageInfo(&var_50, i);
004935b0          _STL::__unguarded_linear_insert(i, var_50, arg4);
0049359d      }
00493590  }

004935c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004935d0  void _STL::__adjust_heap(class PageInfo* arg1, int32_t arg2, int32_t arg3, class PageInfo arg4, uint8_t (* arg5)(class PageInfo const*, class PageInfo const*))

004935d0  {
004935dc      int32_t edi = arg2;
004935e0      int32_t esi = ((edi * 2) + 2);
004935e4      bool cond:1 = esi != arg3;
004935e6      arg2 = edi;
004935e6      
004935ea      while (esi < arg3)
004935ea      {
004935f5          void* eax_3 = &arg1[esi];
004935f5          
00493605          if (arg5(eax_3, ((char*)eax_3 - 0x40)) != 0)
00493607              esi -= 1;
00493607          
00493617          PageInfo::operator=(&arg1[edi], &arg1[esi]);
0049361c          edi = esi;
0049361e          esi = ((esi * 2) + 2);
00493622          cond:1 = esi != arg3;
004935ea      }
004935ea      
00493626      if (!(cond:1))
00493626      {
00493639          PageInfo::operator=(&arg1[edi], &arg1[(esi - 1)]);
0049363e          edi = (esi - 1);
00493626      }
00493626      
00493650      void var_54;
00493650      PageInfo::PageInfo(&var_54, &arg4);
0049365c      _STL::__push_heap(arg1, edi, arg2, var_54, arg5);
0049366c      /* tailcall */
0049366c      return PageInfo::~PageInfo(&arg4);
004935d0  }

00493671                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00493680  void __thiscall gmPageListUI::AddPageToListbox(class gmPageListUI* this, class PageInfo const* arg2)

00493680  {
00493683      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049368a      class PSRefBufferCharData<unsigned short>* var_8 = PStringBase<unsigned short>::s_NullBuffer_1;
00493695      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004936a8      class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateListByID(this->m_pPageListBox, 0x10000589, nullptr);
004936b6      class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x1000058a);
004936bd      class PageInfo* ebx;
004936bd      
004936bd      if (eax_2 == 0)
004936f9          ebx = arg2;
004936bd      else
004936bd      {
004936c5          class UIElement_Text* eax_3 = eax_2->vtable->DynamicCast(0xc);
004936cb          ebx = arg2;
004936cb          
004936d3          if (eax_3 != 0)
004936d3          {
004936d8              int32_t __saved_ebp_1 = ebx->m_PageNumber;
004936e3              PStringBase<unsigned short>::sprintf(&var_8, &data_7a0184);
004936f2              UIElement_Text::SetText(eax_3, &var_8);
004936d3          }
004936bd      }
004936bd      
00493704      class UIElement* eax_5 = UIElement::GetChildRecursive(eax_1, 0x1000058b);
00493704      
0049370b      if (eax_5 != 0)
0049370b      {
00493713          class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
00493713          
0049371b          if (eax_6 != 0)
00493723              UIElement_Text::SetText(eax_6, &ebx->m_Title);
0049370b      }
0049370b      
0049372f      class UIElement* eax_7 = UIElement::GetChildRecursive(eax_1, 0x1000058c);
0049372f      
00493736      if (eax_7 != 0)
00493736      {
00493743          class UIElement_Text* eax_8 = eax_7->vtable->DynamicCast(0xc);
00493743          
0049374d          if (eax_8 != 0)
0049374d          {
00493753              class PStringBase<unsigned short>* __return = *(uint32_t*)((char*)ebx->m_TimerStamp)[4];
0049375b              int32_t edx_4;
0049375b              edx_4 = ebx->m_TimerRunning;
0049375e              class PStringBase<unsigned short>* __return_1 = __return;
0049375f              int32_t var_20_2 = ebx->m_TimerStamp;
00493764              int32_t var_24_1 = edx_4;
00493766              void* var_4;
00493766              class PStringBase<unsigned short>* eax_9 = GetTimerText(__return, edx_4, &var_4);
0049376d              class PSRefBufferCharData<unsigned short>* eax_10 = var_8;
0049376d              
00493778              if (eax_10 != eax_9->m_charbuffer)
00493778              {
0049378d                  if ((InterlockedDecrement(&eax_10->m_data[-8]) == 0 && eax_10 != 0x14))
00493795                      *(uint32_t*)*(int32_t*)((char*)eax_10 + -0x14)(1);
00493795                  
00493797                  class PSRefBufferCharData<unsigned short>* m_charbuffer = eax_9->m_charbuffer;
00493799                  var_8 = m_charbuffer;
004937a1                  InterlockedIncrement(&m_charbuffer->m_data[-8]);
00493778              }
00493778              
004937ab              int32_t* esi_4 = ((char*)var_4 - 0x14);
004937ab              
004937be              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004937c6                  **(uint32_t**)esi_4(1);
004937c6              
004937cf              UIElement_Text::SetText(eax_8, &var_8);
004937d4              ebx = arg2;
0049374d          }
00493736      }
00493736      
004937e0      class UIElement* eax_15 = UIElement::GetChildRecursive(eax_1, 0x1000058d);
004937e0      
004937e7      if (eax_15 != 0)
004937e7      {
004937ef          class UIElement_Text* eax_16 = eax_15->vtable->DynamicCast(0xc);
004937ef          
004937f7          if (eax_16 != 0)
004937fc              UIElement_Text::SetText(eax_16, ebx);
004937e7      }
004937e7      
00493805      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6 = &var_8->m_data[-0xa];
00493805      
00493818      if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00493820          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00493680  }

0049382b                                   90 90 90 90 90                                                             .....

00493830  class PageInfo* _STL::__unguarded_partition(class PageInfo* arg1, class PageInfo* arg2, class PageInfo arg3, uint8_t (* arg4)(class PageInfo const*, class PageInfo const*))

00493830  {
00493834      class PageInfo* result = arg1;
00493842      class PageInfo* edi = arg2;
00493842      
0049384c      while (true)
0049384c      {
00493853          if (arg4(result, &arg3) != 0)
00493853          {
00493865              char i;
00493865              
00493865              do
00493865              {
0049385a                  result = &result[1];
0049385e                  i = arg4(result, &arg3);
00493865              } while (i != 0);
00493853          }
00493853          
00493867          edi -= 0x40;
00493867          
00493877          if (arg4(&arg3, edi) != 0)
00493877          {
00493890              char i_1;
00493890              
00493890              do
00493890              {
00493880                  edi -= 0x40;
00493889                  i_1 = arg4(&arg3, edi);
00493890              } while (i_1 != 0);
00493877          }
00493877          
00493894          if (result >= edi)
00493894              break;
00493894          
0049389f          void* var_40;
0049389f          PageInfo::PageInfo(&var_40, result);
004938a7          PageInfo::operator=(result, edi);
004938b3          PageInfo::operator=(edi, &var_40);
004938cf          void* var_38;
004938cf          
004938cf          if ((InterlockedDecrement(((char*)var_38 - 0x10)) == 0 && var_38 != 0x14))
004938d7              **(uint32_t**)((char*)var_38 - 0x14)(1);
004938d7          
004938f0          void* var_3c;
004938f0          
004938f0          if ((InterlockedDecrement(((char*)var_3c - 0x10)) == 0 && var_3c != 0x14))
004938f8              **(uint32_t**)((char*)var_3c - 0x14)(1);
004938f8          
004938fe          int32_t* esi_6 = ((char*)var_40 - 0x14);
004938fe          
00493911          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00493919              **(uint32_t**)esi_6(1);
00493919          
0049391b          result = &result[1];
0049384c      }
0049384c      
00493927      PageInfo::~PageInfo(&arg3);
00493935      return result;
00493830  }

00493936                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00493940  void _STL::__destroy_aux(class PageInfo* arg1, class PageInfo* arg2, struct _STL::__false_type const* arg3)

00493940  {
0049394c      for (class PageInfo* i = arg1; i != arg2; i = &i[1])
0049394c      {
00493959          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = (i->m_Notes.m_charbuffer - 0x14);
00493959          
00493968          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00493970              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00493970          
00493975          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = (i->m_Title.m_charbuffer - 0x14);
00493975          
00493984          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0049398c              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0049398c          
00493990          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6 = (i->m_Label.m_charbuffer - 0x14);
00493990          
0049399f          if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
004939a7              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
0049394c      }
00493940  }

004939b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004939c0  void _STL::__linear_insert(class PageInfo* arg1, class PageInfo* arg2, class PageInfo arg3, uint8_t (* arg4)(class PageInfo const*, class PageInfo const*))

004939c0  {
004939c6      uint8_t (* edi)(class PageInfo const*, class PageInfo const*) = arg4;
004939c6      
004939d7      if (edi(&arg3, arg1) != 0)
004939d7      {
004939ea          _STL::__copy_backward(arg1, arg2, &arg2[1], &arg4, nullptr);
004939f9          PageInfo::operator=(arg1, &arg3);
00493a04          /* tailcall */
00493a04          return PageInfo::~PageInfo(&arg3);
004939d7      }
004939d7      
00493a14      void var_4c;
00493a14      PageInfo::PageInfo(&var_4c, &arg3);
00493a1e      _STL::__unguarded_linear_insert(arg2, var_4c, edi);
00493a2c      /* tailcall */
00493a2c      return PageInfo::~PageInfo(&arg3);
004939c0  }

00493a31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00493a40  void _STL::__make_heap(class PageInfo* arg1, class PageInfo* arg2, uint8_t (* arg3)(class PageInfo const*, class PageInfo const*), class PageInfo* arg4, int32_t* arg5)

00493a40  {
00493a4c      int32_t ebx_2 = (((char*)arg2 - arg1) >> 6);
00493a4c      
00493a54      if (ebx_2 >= 2)
00493a54      {
00493a59          int32_t eax_2;
00493a59          int32_t edx_1;
00493a59          edx_1 = HIGHD(((int64_t)(ebx_2 - 2)));
00493a59          eax_2 = LOWD(((int64_t)(ebx_2 - 2)));
00493a5e          int32_t esi_2 = ((eax_2 - edx_1) >> 1);
00493a65          void* edi_3 = &arg1[esi_2];
00493a65          
00493a72          while (true)
00493a72          {
00493a72              void var_54;
00493a72              PageInfo::PageInfo(&var_54, edi_3);
00493a7a              _STL::__adjust_heap(arg1, esi_2, ebx_2, var_54, arg3);
00493a7a              
00493a84              if (esi_2 == 0)
00493a84                  break;
00493a84              
00493a86              esi_2 -= 1;
00493a87              edi_3 -= 0x40;
00493a72          }
00493a54      }
00493a40  }

00493a91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00493aa0  void __thiscall gmPageListUI::ListenToGlobalMessage(class gmPageListUI* this, uint32_t arg2, int32_t arg3)

00493aa0  {
00493ab4      if ((arg2 == 3 && (((int8_t)(this->__bitfield164 >> 1)) & 1) != 0))
00493ab4      {
00493abc          (((long double)Timer::cur_time) - ((long double)this->m_timeNextUpdate));
00493ac4          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00493ac4          
00493ac7          if (p_1)
00493ac7          {
00493ac9              gmPageListUI::RefreshPageListbox(this);
00493ada              this->m_timeNextUpdate = ((double)(((long double)Timer::cur_time) + ((long double)0.5)));
00493ac7          }
00493ab4      }
00493aa0  }

00493ae4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00493af0  void __fastcall gmPageListUI::RebuildPageListbox(class gmPageListUI* this)

00493af0  {
00493afb      UIElement_ListBox::Flush(this->m_pPageListBox);
00493b0a      UIElement_ListBox::SetSelectedItem(this->m_pPageListBox, nullptr, 1);
00493b1e      int32_t i = 0;
00493b1e      
00493b22      if (((this->m_PageListPages._M_finish - this->m_PageListPages._M_start) >> 6) > 0)
00493b22      {
00493b24          int32_t ebx_1 = 0;
00493b24          
00493b4b          do
00493b4b          {
00493b31              gmPageListUI::AddPageToListbox(this, (this->m_PageListPages._M_start + ebx_1));
00493b42              i += 1;
00493b46              ebx_1 += 0x40;
00493b4b          } while (i < ((this->m_PageListPages._M_finish - this->m_PageListPages._M_start) >> 6));
00493b22      }
00493af0  }

00493b51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00493b60  uint8_t __stdcall gmPageListUI::PageContainsString(class gmPageListUI* this @ ecx, class PageInfo const* arg2, class PStringBase<unsigned short> arg3)

00493b60  {
00493b64      class PStringBase<unsigned short> ebx = arg3;
00493b64      
00493b6d      if (*(uint32_t*)(ebx - 4) == 1)
00493b6d      {
00493b82          if ((InterlockedDecrement((ebx - 0x10)) == 0 && ebx != 0x14))
00493b8a              **(uint32_t**)(ebx - 0x14)(1);
00493b8a          
00493b8d          int32_t eax_1;
00493b8d          eax_1 = 1;
00493b93          return 1;
00493b6d      }
00493b6d      
00493ba2      class PStringBase<unsigned short> var_4 = ebx;
00493ba6      InterlockedIncrement((ebx - 0x10));
00493ba8      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00493bad      class PSRefBufferCharData<unsigned short>* var_8 = PStringBase<unsigned short>::s_NullBuffer_1;
00493bb5      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00493bbb      PStringBase<unsigned short>::break_reference(&var_4);
00493bcb      _wcslwr(var_4);
00493bd1      class PSRefBufferCharData<unsigned short>* eax_4 = var_8;
00493bd1      
00493bdd      if (eax_4 != arg2->m_Label.m_charbuffer)
00493bdd      {
00493bf2          if ((InterlockedDecrement(&eax_4->m_data[-8]) == 0 && eax_4 != 0x14))
00493bfa              *(uint32_t*)*(int32_t*)((char*)eax_4 + -0x14)(1);
00493bfa          
00493bfc          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_Label.m_charbuffer;
00493bff          var_8 = m_charbuffer;
00493c07          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00493c09          ebx = arg3;
00493bdd      }
00493bdd      
00493c11      PStringBase<unsigned short>::break_reference(&var_8);
00493c1b      _wcslwr(var_8);
00493c2d      int32_t eax_9 = wcsstr(var_8, var_4);
00493c34      class PSRefBufferCharData<unsigned short>* ecx_7;
00493c34      
00493c34      if (eax_9 != 0)
00493c36          ecx_7 = var_8;
00493c36      
00493c40      if ((eax_9 == 0 || ((eax_9 - ecx_7) >> 1) < 0))
00493c40      {
00493cab          PStringBase<unsigned short>::operator=(&var_8, &arg2->m_Title);
00493cb4          PStringBase<unsigned short>::break_reference(&var_8);
00493cbe          _wcslwr(var_8);
00493cca          int32_t eax_19 = wcsstr(var_8, var_4);
00493cca          
00493cd1          if (eax_19 != 0)
00493cd3              ecx_7 = var_8;
00493cd3          
00493cdd          if ((eax_19 == 0 || ((eax_19 - ecx_7) >> 1) < 0))
00493cdd          {
00493ceb              PStringBase<unsigned short>::operator=(&var_8, &arg2->m_Notes);
00493cf4              PStringBase<unsigned short>::break_reference(&var_8);
00493cfe              _wcslwr(var_8);
00493d0a              int32_t eax_23 = wcsstr(var_8, var_4);
00493d0a              
00493d1b              if ((eax_23 == 0 || ((eax_23 - var_8) >> 1) < 0))
00493d1b              {
00493d48                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00493d51                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
00493d5a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00493d62                  int32_t eax_27;
00493d62                  eax_27 = 0;
00493d68                  return 0;
00493d1b              }
00493d1b              
00493d21              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00493d2a              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
00493d33              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00493d3b              int32_t eax_26;
00493d3b              eax_26 = 1;
00493d41              return 1;
00493cdd          }
00493c40      }
00493c40      
00493c57      if ((InterlockedDecrement(&ecx_7->m_data[-8]) == 0 && ecx_7 != 0x14))
00493c5f          *(uint32_t*)*(int32_t*)((char*)ecx_7 + -0x14)(1);
00493c5f      
00493c65      int32_t* esi_3 = (var_4 - 0x14);
00493c65      
00493c74      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00493c7c          **(uint32_t**)esi_3(1);
00493c7c      
00493c8d      if ((InterlockedDecrement((ebx - 0x10)) == 0 && ebx != 0x14))
00493c95          **(uint32_t**)(ebx - 0x14)(1);
00493c95      
00493c9a      int32_t eax_16;
00493c9a      eax_16 = 1;
00493ca0      return 1;
00493b60  }

00493d6b                                   90 90 90 90 90                                                             .....

00493d70  void _STL::__insertion_sort(class PageInfo* arg1, class PageInfo* arg2, uint8_t (* arg3)(class PageInfo const*, class PageInfo const*))

00493d70  {
00493d7e      if (arg1 != arg2)
00493d7e      {
00493d85          for (void* __offset(PageInfo, 0x40) i = &arg1[1]; i != arg2; i += 0x40)
00493d85          {
00493d97              void var_54;
00493d97              PageInfo::PageInfo(&var_54, i);
00493d9e              _STL::__linear_insert(arg1, i, var_54, arg3);
00493d85          }
00493d7e      }
00493d70  }

00493d8d                                         8d 49 00                                                               .I.
00493db2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00493dc0  void _STL::__final_insertion_sort(class PageInfo* arg1, class PageInfo* arg2, uint8_t (* arg3)(class PageInfo const*, class PageInfo const*))

00493dc0  {
00493dd6      if ((((char*)arg2 - arg1) & 0xffffffc0) <= 0x400)
00493dd6      {
00493e04          _STL::__insertion_sort(arg1, arg2, arg3);
00493e0d          return;
00493dd6      }
00493dd6      
00493de7      _STL::__insertion_sort(arg1, &arg1[0x10], arg3);
00493df1      _STL::__unguarded_insertion_sort_aux(&arg1[0x10], arg2, nullptr, arg3);
00493dc0  }

00493e0e                                            90 90                                                                ..

00493e10  void _STL::sort_heap(class PageInfo* arg1, class PageInfo* arg2, uint8_t (* arg3)(class PageInfo const*, class PageInfo const*))

00493e10  {
00493e1f      int32_t edi_1 = ((char*)arg2 - arg1);
00493e1f      
00493e29      while ((edi_1 & 0xffffffc0) > 0x40)
00493e29      {
00493e3e          void* var_40;
00493e3e          PageInfo::PageInfo(&var_40, (((char*)arg1 + edi_1) - 0x40));
00493e46          PageInfo::operator=((((char*)arg1 + edi_1) - 0x40), arg1);
00493e5a          edi_1 -= 0x40;
00493e5d          void var_94;
00493e5d          PageInfo::PageInfo(&var_94, &var_40);
00493e6b          _STL::__adjust_heap(arg1, 0, (edi_1 >> 6), var_94, arg3);
00493e86          void* var_38;
00493e86          
00493e86          if ((InterlockedDecrement(((char*)var_38 - 0x10)) == 0 && var_38 != 0x14))
00493e8e              **(uint32_t**)((char*)var_38 - 0x14)(1);
00493e8e          
00493ea3          void* var_3c;
00493ea3          
00493ea3          if ((InterlockedDecrement(((char*)var_3c - 0x10)) == 0 && var_3c != 0x14))
00493eab              **(uint32_t**)((char*)var_3c - 0x14)(1);
00493eab          
00493eb1          int32_t* esi_7 = ((char*)var_40 - 0x14);
00493eb1          
00493ec0          if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
00493ec8              **(uint32_t**)esi_7(1);
00493e29      }
00493e10  }


00493ee0  void _STL::__partial_sort(class PageInfo* arg1, class PageInfo* arg2, class PageInfo* arg3, class PageInfo* arg4, uint8_t (* arg5)(class PageInfo const*, class PageInfo const*))

00493ee0  {
00493eea      uint8_t (* esi)(class PageInfo const*, class PageInfo const*) = arg5;
00493efa      _STL::__make_heap(arg1, arg2, esi, nullptr, nullptr);
00493f08      class PageInfo* ebx = arg2;
00493f08      
00493f0a      if (arg2 < arg3)
00493f0a      {
00493fc4          do
00493fc4          {
00493f19              if (esi(ebx, arg1) != 0)
00493f19              {
00493f24                  void* var_40;
00493f24                  PageInfo::PageInfo(&var_40, ebx);
00493f2c                  PageInfo::operator=(ebx, arg1);
00493f3c                  void var_94;
00493f3c                  PageInfo::PageInfo(&var_94, &var_40);
00493f4c                  _STL::__adjust_heap(arg1, 0, (((char*)arg2 - arg1) >> 6), var_94, esi);
00493f6b                  void* var_38;
00493f6b                  
00493f6b                  if ((InterlockedDecrement(((char*)var_38 - 0x10)) == 0 && var_38 != 0x14))
00493f73                      **(uint32_t**)((char*)var_38 - 0x14)(1);
00493f73                  
00493f8c                  void* var_3c;
00493f8c                  
00493f8c                  if ((InterlockedDecrement(((char*)var_3c - 0x10)) == 0 && var_3c != 0x14))
00493f94                      **(uint32_t**)((char*)var_3c - 0x14)(1);
00493f94                  
00493f9a                  int32_t* esi_6 = ((char*)var_40 - 0x14);
00493f9a                  
00493fad                  if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00493fb5                      **(uint32_t**)esi_6(1);
00493fb5                  
00493fb7                  esi = arg5;
00493f19              }
00493f19              
00493fbf              ebx = &ebx[1];
00493fc4          } while (ebx < arg3);
00493f0a      }
00493f0a      
00493fcd      _STL::sort_heap(arg1, arg2, esi);
00493ee0  }

00493fdd                                                                                         90 90 90                               ...

00493fe0  void __thiscall gmPageListUI::gmPageListUI(class gmPageListUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00493fe0  {
00493fef      UIElement_Field::UIElement_Field(this, arg2, arg3);
00493ff4      this->vtable = &gmUrgentAssistanceUI::`vftable';
00494000      this->vtable = 0x7a60e8;
00494006      this->vtable = &gmUrgentAssistanceUI::`vftable';
00494010      __builtin_memset(&this->m_PageListPages, 0, 0x19);
0049403a      this->m_LastClickTime = 0f;
00494040      *(uint32_t*)((char*)this->m_LastClickTime)[4] = 0;
00494046      this->m_timeNextUpdate = 0f;
0049404c      *(uint32_t*)((char*)this->m_timeNextUpdate)[4] = 0;
00494052      this->m_LastClickIndex = 0xffffffff;
00493fe0  }

00494062        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00494070  class UIElement* __thiscall gmPageListUI::DynamicCast(class gmPageListUI* this, uint32_t arg2) __pure

00494070  {
0049407c      if (arg2 == 0x10000049)
00494089          return this;
00494089      
00494083      int32_t edx_1;
00494083      edx_1 = arg2 != 3;
00494087      return (this & (edx_1 - 1));
00494070  }

0049408c                                      90 90 90 90                                                              ....

00494090  uint32_t gmPageListUI::GetUIElementType(class gmPageListUI const* this @ ecx) __pure

00494090  {
00494095      return 0x10000049;
00494090  }

00494096                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004940a0  void __fastcall gmPageListUI::~gmPageListUI(class gmPageListUI* this)

004940a0  {
004940a0      class gmPageListUI* this_1 = this;
004940ad      this->vtable = 0x7a60e8;
004940a5      this->vtable = &gmUrgentAssistanceUI::`vftable';
004940b9      UIListener::UnRegisterForGlobalMessage(this, 3);
004940be      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004940be      
004940c5      if (eax != 0)
004940c7          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004940c7      
004940e2      _STL::__destroy_aux(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, &*(uint32_t*)((char*)this_1)[3]);
004940e7      class PageInfo* _M_start = this->m_PageListPages._M_start;
004940e7      
004940f2      if (_M_start != 0)
00494104          _STL::__node_alloc<1,0>::deallocate(_M_start, (((this->m_PageListPages._M_end_of_storage._M_data - _M_start) >> 6) << 6));
00494104      
004940a5      this->vtable = &gmUrgentAssistanceUI::`vftable';
00494114      NoticeHandler::~NoticeHandler(&this->vtable);
0049411b      UIElement_Field::~UIElement_Field(this);
004940a0  }

00494124              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00494130  class UIElement* gmPageListUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00494130  {
00494135      void* eax = operator new(0x630);
00494135      
0049413f      if (eax == 0)
00494155          return 0;
00494155      
00494152      return gmPageListUI::gmPageListUI(eax, arg1, arg2);
00494130  }

00494156                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00494160  void __thiscall _STL::vector<PageInfo,_STL::allocator<PageInfo> >::_M_insert_overflow(class _STL::vector<PageInfo,_STL::allocator<PageInfo> >* this, class PageInfo* arg2, class PageInfo const* arg3, struct _STL::__false_type const* arg4, uint32_t arg5, uint8_t arg6)

00494160  {
00494170      int32_t eax_2 = ((this->_M_finish - this->_M_start) >> 6);
00494173      bool cond:0 = eax_2 < arg5;
00494175      int32_t var_8 = eax_2;
00494179      uint32_t* ecx_1 = &arg5;
00494179      
0049417d      if (!(cond:0))
0049417f          ecx_1 = &var_8;
0049417f      
00494183      uint32_t ecx_2 = *(uint32_t*)ecx_1;
00494185      int32_t ecx_3 = (ecx_2 + eax_2);
00494185      
0049418b      if (ecx_2 == -(eax_2))
004941b6          var_8 = 0;
0049418b      else
0049418b      {
0049418f          int32_t eax_4 = (ecx_3 << 6);
0049418f          
00494198          if (eax_4 <= 0x80)
004941b0              var_8 = _STL::__node_alloc<1,0>::_M_allocate(eax_4);
00494198          else
004941a2              var_8 = operator new(eax_4);
0049418b      }
0049418b      
004941be      int32_t esi = var_8;
004941c3      class PageInfo* ebp = arg2;
004941c8      class PageInfo* _M_start_1 = this->_M_start;
004941c8      
004941cc      if (_M_start_1 != ebp)
004941cc      {
004941ce          class PageInfo* _M_start_2 = _M_start_1;
004941ce          
004941e4          do
004941e4          {
004941d2              if (esi != 0)
004941d7                  PageInfo::PageInfo(esi, _M_start_2);
004941d7              
004941dc              _M_start_2 = &_M_start_2[1];
004941df              esi += 0x40;
004941e4          } while (_M_start_2 != ebp);
004941cc      }
004941cc      
004941e6      uint32_t i_1 = arg5;
004941e6      
004941ed      if (i_1 == 1)
004941ed      {
004941f1          if (esi != 0)
004941fa              PageInfo::PageInfo(esi, arg3);
004941fa          
004941ff          esi += 0x40;
004941ed      }
004941ed      else if (i_1 > 0)
00494206      {
00494220          uint32_t i;
00494220          
00494220          do
00494220          {
00494212              if (esi != 0)
00494217                  PageInfo::PageInfo(esi, arg3);
00494217              
0049421c              esi += 0x40;
0049421f              i = i_1;
0049421f              i_1 -= 1;
00494220          } while (i != 1);
00494222          ebp = arg2;
00494206      }
00494206      
00494226      eax_2 = arg6;
00494226      
0049422c      if (eax_2 == 0)
00494241          esi = _STL::__uninitialized_copy(ebp, this->_M_finish, esi, &arg6);
00494241      
0049424f      _STL::__destroy_aux(this->_M_start, this->_M_finish, &arg6);
00494254      class PageInfo* _M_start = this->_M_start;
00494254      
0049425d      if (_M_start != 0)
0049426c          _STL::__node_alloc<1,0>::deallocate(_M_start, (((this->_M_end_of_storage._M_data - _M_start) >> 6) << 6));
0049426c      
00494278      int32_t ecx_12 = var_8;
0049427f      this->_M_finish = esi;
00494285      this->_M_start = ecx_12;
00494287      this->_M_end_of_storage._M_data = ((ecx_3 << 6) + ecx_12);
00494160  }

00494291                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004942a0  void* __thiscall gmPageListUI::`scalar deleting destructor'(class gmPageListUI* this, uint32_t arg2)

004942a0  {
004942a3      gmPageListUI::~gmPageListUI(this);
004942a3      
004942ad      if ((arg2 & 1) != 0)
004942b0          operator delete(this);
004942b0      
004942bb      return this;
004942a0  }

004942be                                                                                            90 90                                ..

004942c0  void gmPageListUI::Register()

004942c0  {
004942ca      UIElement::RegisterElementClass(0x10000049, gmPageListUI::Create);
004942c0  }

004942d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004942e0  class PageInfo* __thiscall _STL::vector<PageInfo,_STL::allocator<PageInfo> >::insert(class _STL::vector<PageInfo,_STL::allocator<PageInfo> >* this, class PageInfo* arg2, class PageInfo const* arg3)

004942e0  {
004942ed      class PageInfo* _M_finish_1 = this->_M_finish;
004942f8      int32_t edi_2 = (((char*)arg2 - this->_M_start) >> 6);
004942f8      
004942fd      if (_M_finish_1 == this->_M_end_of_storage._M_data)
004942fd      {
004943a2          _STL::vector<PageInfo,_STL::allocator<PageInfo> >::_M_insert_overflow(this, arg2, arg3, &arg3, 1, 0);
004943b6          return &this->_M_start[edi_2];
004942fd      }
004942fd      
00494305      if (arg2 == _M_finish_1)
00494305      {
00494309          if (_M_finish_1 != 0)
00494310              PageInfo::PageInfo(_M_finish_1, arg3);
00494310          
00494318          class PageInfo* _M_start = this->_M_start;
0049431d          this->_M_finish = &this->_M_finish[1];
0049432d          return &_M_start[edi_2];
00494305      }
00494305      
00494332      if (_M_finish_1 != 0)
00494338          PageInfo::PageInfo(_M_finish_1, &_M_finish_1[-1]);
00494338      
0049433d      this->_M_finish = &this->_M_finish[1];
0049434a      void var_40;
0049434a      PageInfo::PageInfo(&var_40, arg3);
0049434f      class PageInfo* _M_finish = this->_M_finish;
00494362      _STL::__copy_backward(arg2, &_M_finish[-2], &_M_finish[-1], &arg3, nullptr);
00494371      PageInfo::operator=(arg2, &var_40);
0049437a      PageInfo::~PageInfo(&var_40);
0049438e      return &this->_M_start[edi_2];
004942e0  }

004943b9                                                                             90 90 90 90 90 90 90                           .......

004943c0  void _STL::__introsort_loop(class PageInfo* arg1, class PageInfo* arg2, class PageInfo* arg3, int32_t arg4, uint8_t (* arg5)(class PageInfo const*, class PageInfo const*))

004943c0  {
004943c1      class PageInfo* ebx = arg2;
004943c1      
004943d8      if ((((char*)ebx - arg1) & 0xffffffc0) > 0x400)
004943d8      {
004943e8          while (arg4 != 0)
004943e8          {
004943f8              int32_t eax_7;
004943f8              int32_t edx_1;
004943f8              edx_1 = HIGHD(((int64_t)(((char*)ebx - arg1) >> 6)));
004943f8              eax_7 = LOWD(((int64_t)(((char*)ebx - arg1) >> 6)));
004943f9              arg4 -= 1;
00494406              void* __offset(PageInfo, -0x40) esi_6 = &arg1[((eax_7 - edx_1) >> 1)];
00494406              
00494415              if (arg5(arg1, esi_6) == 0)
00494415              {
0049443b                  if (arg5(arg1, &ebx[-1]) == 0)
0049443b                  {
0049444d                      if (arg5(esi_6, &ebx[-1]) != 0)
0049444f                          esi_6 = &ebx[-1];
0049443b                  }
0049443b                  else
0049443d                      esi_6 = arg1;
00494415              }
00494415              else if (arg5(esi_6, &ebx[-1]) == 0)
0049441f              {
00494421                  esi_6 = &ebx[-1];
00494421                  
0049442d                  if (arg5(arg1, esi_6) == 0)
0049442f                      esi_6 = arg1;
0049441f              }
0049441f              
00494459              void var_54;
00494459              PageInfo::PageInfo(&var_54, esi_6);
00494460              class PageInfo* eax_16 = _STL::__unguarded_partition(arg1, ebx, var_54, arg5);
00494471              _STL::__introsort_loop(eax_16, ebx, nullptr, arg4, arg5);
00494476              ebx = eax_16;
00494476              
00494486              if ((((char*)eax_16 - arg1) & 0xffffffc0) <= 0x400)
00494490                  return;
004943e8          }
004943e8          
00494497          _STL::__partial_sort(arg1, ebx, ebx, nullptr, arg5);
004943d8      }
004943c0  }

004944a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004944b0  void __fastcall gmPageListUI::RebuildPageList(class gmPageListUI* this, uint8_t const arg2)

004944b0  {
004944bd      class PSRefBufferCharData<unsigned short>* edi = PStringBase<unsigned short>::s_NullBuffer;
004944c9      InterlockedIncrement(&edi->m_data[-8]);
004944c9      
004944d1      if (arg2 != 0)
004944d1      {
004944de          class PStringBase<unsigned short> __return;
004944de          class PStringBase<unsigned short>* eax_2 = UIElement_Text::GetText(this->m_pSearchEditBox, &__return);
004944de          
004944e7          if (edi != eax_2->m_charbuffer)
004944e7          {
004944fc              if ((InterlockedDecrement(&edi->m_data[-8]) == 0 && edi != 0x14))
00494504                  *(uint32_t*)*(int32_t*)((char*)edi + -0x14)(1);
00494504              
00494506              edi = eax_2->m_charbuffer;
0049450c              InterlockedIncrement(&edi->m_data[-8]);
004944e7          }
004944e7          
00494512          int32_t* esi_3 = (__return - 0x14);
00494512          
00494525          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0049452d              **(uint32_t**)esi_3(1);
004944d1      }
004944d1      
00494535      class PageInfo* _M_finish = this->m_PageListPages._M_finish;
0049454b      class PageInfo* eax_7 = _STL::__copy(_M_finish, _M_finish, this->m_PageListPages._M_start, &arg2, nullptr);
0049455c      int32_t eax_8;
0049455c      int32_t ecx_6;
0049455c      eax_8 = _STL::__destroy_aux(eax_7, this->m_PageListPages._M_finish, &arg2);
0049453d      this->m_PageListPages._M_finish = eax_7;
00494570      void* esi_5 = nullptr;
0049457a      int32_t var_8 = 0;
0049457a      
0049457e      if (((g_JournalPages._M_finish - g_JournalPages._M_start) >> 6) > 0)
0049457e      {
004945e1          bool cond:1_1;
004945e1          
004945e1          do
004945e1          {
00494580              eax_8 = arg2;
00494586              uint8_t eax_12;
00494586              
00494586              if (eax_8 != 0)
00494586              {
00494588                  int32_t var_1c_5 = ecx_6;
00494591                  InterlockedIncrement(&edi->m_data[-8]);
004945a1                  eax_12 = gmPageListUI::PageContainsString(this, (g_JournalPages._M_start + esi_5), edi);
00494586              }
00494586              
004945a8              if ((eax_8 == 0 || eax_12 != 0))
004945bd                  _STL::vector<PageInfo,_STL::allocator<PageInfo> >::insert(&this->m_PageListPages, this->m_PageListPages._M_finish, ((char*)esi_5 + g_JournalPages._M_start));
004945bd              
004945d5              ecx_6 = ((g_JournalPages._M_finish - g_JournalPages._M_start) >> 6);
004945d8              esi_5 += 0x40;
004945db              cond:1_1 = (var_8 + 1) < ecx_6;
004945dd              var_8 += 1;
004945e1          } while (cond:1_1);
0049457e      }
0049457e      
004945f6      if ((InterlockedDecrement(&edi->m_data[-8]) == 0 && edi != 0x14))
004945fe          *(uint32_t*)*(int32_t*)((char*)edi + -0x14)(1);
004944b0  }

0049460a                                90 90 90 90 90 90                                                            ......

00494610  void _STL::sort(class PageInfo* arg1, class PageInfo* arg2, uint8_t (* arg3)(class PageInfo const*, class PageInfo const*))

00494610  {
0049461c      if (arg1 != arg2)
0049461c      {
00494622          int32_t i = (((char*)arg2 - arg1) >> 6);
00494625          int32_t ecx_1 = 0;
00494625          
0049462a          while (i != 1)
0049462a          {
00494630              i s>>= 1;
00494632              ecx_1 += 1;
0049462a          }
0049462a          
00494646          _STL::__introsort_loop(arg1, arg2, nullptr, (ecx_1 * 2), arg3);
0049464e          _STL::__final_insertion_sort(arg1, arg2, arg3);
0049461c      }
00494610  }

0049465a                                                                                90 90 90 90 90 90                            ......

00494660  void __fastcall gmPageListUI::SortPageList(class gmPageListUI* this)

00494660  {
00494663      enum JournalSortCriteria m_SortCriteria = this->m_SortCriteria;
00494663      
0049466a      if (m_SortCriteria == eTitle)
0049466a      {
00494764          int32_t eax;
00494764          eax = this->m_ReverseSort;
00494764          
0049476c          if (eax != 0)
0049476c          {
00494781              _STL::sort(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, PageInfoReverseSortTitle);
0049478c              /* tailcall */
0049478c              return gmPageListUI::RebuildPageListbox(this);
0049476c          }
0049476c          
004947a4          _STL::sort(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, PageInfoSortTitle);
004947af          /* tailcall */
004947af          return gmPageListUI::RebuildPageListbox(this);
0049466a      }
0049466a      
00494671      if (m_SortCriteria == 2)
00494671      {
00494714          int32_t eax_1;
00494714          eax_1 = this->m_ReverseSort;
00494714          
0049471c          if (eax_1 != 0)
0049471c          {
00494731              _STL::sort(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, ContractInfoReverseSortName);
0049473c              /* tailcall */
0049473c              return gmPageListUI::RebuildPageListbox(this);
0049471c          }
0049471c          
00494754          _STL::sort(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, ContractInfoSortName);
0049475f          /* tailcall */
0049475f          return gmPageListUI::RebuildPageListbox(this);
00494671      }
00494671      
00494678      uint8_t m_ReverseSort = this->m_ReverseSort;
00494678      
0049467e      if (m_SortCriteria != 3)
0049467e      {
00494682          if (m_ReverseSort == 0)
00494682          {
004946ba              _STL::sort(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, PageInfoSortPageNumber);
004946c5              /* tailcall */
004946c5              return gmPageListUI::RebuildPageListbox(this);
00494682          }
00494682          
00494697          _STL::sort(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, PageInfoReverseSortPageNumber);
004946a2          /* tailcall */
004946a2          return gmPageListUI::RebuildPageListbox(this);
0049467e      }
0049467e      
004946cc      if (m_ReverseSort == 0)
004946cc      {
00494704          _STL::sort(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, PageInfoSortTimer);
0049470f          /* tailcall */
0049470f          return gmPageListUI::RebuildPageListbox(this);
004946cc      }
004946cc      
004946e1      _STL::sort(this->m_PageListPages._M_start, this->m_PageListPages._M_finish, PageInfoReverseSortTimer);
004946ec      /* tailcall */
004946ec      return gmPageListUI::RebuildPageListbox(this);
00494660  }

004947b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004947c0  enum UIElementMessageListenResult __thiscall gmPageListUI::ListenToElementMessage(class gmPageListUI* this, struct UIElementMessageInfo const* arg2)

004947c0  {
004947c5      uint32_t idMessage = arg2->idMessage;
004947cd      enum JournalSortCriteria eax_9;
004947cd      
004947cd      if (idMessage == 1)
0049484b          switch ((arg2->idElement - 0x1000057f))
0049484b          {
0049485a              case 0:
0049485a              {
0049485a                  if (this->m_SortCriteria == ePageNumber)
0049485a                  {
004948cb                  label_4948cb:
004948cb                      eax_9 = this->m_ReverseSort;
004948d3                      eax_9 = eax_9 == 0;
004948d6                      this->m_ReverseSort = eax_9;
00494944                      gmPageListUI::SortPageList(this);
0049485a                  }
0049485a                  else
0049485a                  {
0049485c                      this->m_SortCriteria = ePageNumber;
00494866                      this->m_ReverseSort = 0;
00494944                      gmPageListUI::SortPageList(this);
0049485a                  }
0049485a                  break;
0049485a              }
00494878              case 1:
00494878              {
00494878                  eax_9 = eTitle;
00494878                  
0049487f                  if (this->m_SortCriteria != eTitle)
0049487f                  {
004948de                  label_4948de:
004948de                      this->m_SortCriteria = eax_9;
004948e4                      this->m_ReverseSort = 0;
00494944                      gmPageListUI::SortPageList(this);
0049487f                  }
0049487f                  else
0049487f                  {
00494881                      eax_9 = this->m_ReverseSort;
00494889                      enum JournalSortCriteria ecx_6;
00494889                      ecx_6 = eax_9 == 0;
0049488c                      this->m_ReverseSort = ecx_6;
00494944                      gmPageListUI::SortPageList(this);
0049487f                  }
00494878                  break;
00494878              }
0049489d              case 2:
0049489d              {
0049489d                  eax_9 = eTimer;
0049489d                  
004948a4                  if (this->m_SortCriteria != eTimer)
004948a4                      goto label_4948de;
004948a4                  
004948a6                  eax_9 = this->m_ReverseSort;
004948b1                  this->m_ReverseSort = eax_9 == 0;
00494944                  gmPageListUI::SortPageList(this);
0049489d                  break;
0049489d              }
004948c2              case 3:
004948c2              {
004948c2                  eax_9 = eLabel;
004948c2                  
004948c9                  if (this->m_SortCriteria != eLabel)
004948c9                      goto label_4948de;
004948c9                  
004948c9                  goto label_4948cb;
004948c2              }
0049484b              case 6:
0049484b              {
0049484b                  goto label_494912;
0049484b              }
004948ed              case 7:
004948ed              {
004948ed                  int32_t var_10_4 = 1;
0049493d                  uint8_t edx;
0049493d                  gmPageListUI::RebuildPageList(this, edx);
00494944                  gmPageListUI::SortPageList(this);
004948ed                  break;
004948ed              }
004948fc              case 9:
004948fc              {
004948fc                  int32_t var_10_5 = 0;
00494900                  gmPageListUI::RebuildPageList(this, UIElement_Text::ClearAllText(this->m_pSearchEditBox));
00494907                  gmPageListUI::SortPageList(this);
00494912              label_494912:
00494912                  int32_t eax_10 = UIElement_ListBox::GetSelectedIndex(this->m_pPageListBox);
00494912                  
0049491a                  if (eax_10 != 0xffffffff)
0049491a                  {
0049491c                      class gmJournalUI* JournalPanel_1 = g_JournalPanel;
0049491c                      
00494924                      if (JournalPanel_1 != 0)
00494924                      {
00494939                          int32_t var_10_7 = 0;
0049493d                          gmPageListUI::RebuildPageList(this, gmJournalUI::DeletePage(JournalPanel_1, this->m_PageListPages._M_start[eax_10].m_PageNumber));
00494944                          gmPageListUI::SortPageList(this);
00494924                      }
0049491a                  }
004948fc                  break;
004948fc              }
0049484b          }
004947cd      else if ((idMessage != 4 && idMessage == 0x43))
004947db      {
004947e7          int32_t eax_3 = UIElement_ListBox::GetSelectedIndex(this->m_pPageListBox);
004947e7          
004947f1          if ((eax_3 != 0xffffffff && gmPageListUI::CheckForDoubleClick(this, eax_3) != 0))
004947f1          {
0049481b              gmJournalUI::GotoPage(g_JournalPanel, this->m_PageListPages._M_start[eax_3].m_PageNumber);
00494820              g_JournalPanel->vtable->SetVisible(1);
004947f1          }
004947db      }
00494954      return UIElement::ListenToElementMessage(this, arg2);
004947c0  }

00494957                                                                       90                                                 .
00494958  uint32_t jump_table_494958[0xa] = 
00494958  {
00494958      [0x0] =  0x00494852
0049495c      [0x1] =  0x00494872
00494960      [0x2] =  0x00494897
00494964      [0x3] =  0x004948bc
00494968      [0x4] =  0x00494949
0049496c      [0x5] =  0x00494949
00494970      [0x6] =  0x0049490c
00494974      [0x7] =  0x004948ed
00494978      [0x8] =  0x00494949
0049497c      [0x9] =  0x004948f1
00494980  }

00494980  void __thiscall gmPageListUI::OnVisibilityChanged(class gmPageListUI* this, uint8_t arg2)

00494980  {
00494989      uint8_t edx = UIElement::OnVisibilityChanged(this, arg2);
00494989      
00494990      if (arg2 != 0)
00494990      {
004949a0          uint32_t ecx;
004949a0          ecx = this->m_pSearchEditBox->m_glyphList.m_glyphList._num_elements > 0;
004949a3          uint32_t var_c_1 = ecx;
004949a6          gmPageListUI::RebuildPageList(this, edx);
004949ad          gmPageListUI::SortPageList(this);
00494990      }
00494980  }

004949b7                                                                       90 90 90 90 90 90 90 90 90                         .........

004949c0  int32_t abs(double arg1) __pure

004949c0  {
004949c0      long double x87_r7_1 = ((long double)arg1);
004949c4      long double temp0 = ((long double)0.0);
004949c4      (x87_r7_1 - temp0);
004949d3      return ((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
004949c0  }

004949d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004949e0  uint8_t PageInfoSortPageNumber(class PageInfo const* arg1, class PageInfo const* arg2)

004949e0  {
004949f7      return arg1->m_PageNumber < arg2->m_PageNumber;
004949e0  }

004949f8                                                                          90 90 90 90 90 90 90 90                          ........

00494a00  uint8_t PageInfoSortTimer(class PageInfo const* arg1, class PageInfo const* arg2)

00494a00  {
00494a04      uint8_t m_TimerRunning = arg1->m_TimerRunning;
00494a0d      int32_t ebx;
00494a0d      int32_t var_4 = ebx;
00494a0d      
00494a0e      if (m_TimerRunning == 0)
00494a0e      {
00494a1f      label_494a1f:
00494a1f          ebx = arg2->m_TimerRunning;
00494a1f          
00494a24          if (ebx != 0)
00494a29              return 0;
00494a29          
00494a33          if ((m_TimerRunning == 0 && arg2->m_TimerRunning == 0))
00494a33          {
00494a42              int32_t eax;
00494a42              eax = arg1->m_PageNumber < arg2->m_PageNumber;
00494a45              return eax;
00494a33          }
00494a0e      }
00494a0e      else
00494a0e      {
00494a10          ebx = arg2->m_TimerRunning;
00494a10          
00494a15          if (ebx == 0)
00494a1a              return 1;
00494a1a          
00494a1d          if (m_TimerRunning == 0)
00494a1d              goto label_494a1f;
00494a0e      }
00494a0e      
00494a49      (((long double)arg1->m_TimerStamp) - ((long double)arg2->m_TimerStamp));
00494a4e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00494a4e      
00494a51      if (p)
00494a5d          return 0;
00494a5d      
00494a59      return 1;
00494a00  }

00494a5e                                                                                            90 90                                ..

00494a60  uint8_t PageInfoReverseSortPageNumber(class PageInfo const* arg1, class PageInfo const* arg2)

00494a60  {
00494a77      return arg1->m_PageNumber > arg2->m_PageNumber;
00494a60  }

00494a78                                                                          90 90 90 90 90 90 90 90                          ........

00494a80  uint8_t PageInfoReverseSortTimer(class PageInfo const* arg1, class PageInfo const* arg2)

00494a80  {
00494a84      int16_t eax;
00494a84      eax = arg1->m_TimerRunning;
00494a8d      int32_t ebx;
00494a8d      int32_t var_4 = ebx;
00494a8d      
00494a8e      if (eax == 0)
00494a8e      {
00494a9f      label_494a9f:
00494a9f          ebx = arg2->m_TimerRunning;
00494a9f          
00494aa4          if (ebx != 0)
00494aa4          {
00494aa6              eax = 1;
00494aa9              return 1;
00494aa4          }
00494aa4          
00494aac          if (eax == 0)
00494aac          {
00494aae              eax = arg2->m_TimerRunning;
00494aae              
00494ab3              if (eax == 0)
00494ab3              {
00494ac2                  int32_t eax_1;
00494ac2                  eax_1 = arg1->m_PageNumber > arg2->m_PageNumber;
00494ac5                  return eax_1;
00494ab3              }
00494aac          }
00494a8e      }
00494a8e      else
00494a8e      {
00494a90          ebx = arg2->m_TimerRunning;
00494a90          
00494a95          if (ebx == 0)
00494a95          {
00494a97              eax = 0;
00494a9a              return 0;
00494a95          }
00494a95          
00494a9d          if (eax == 0)
00494a9d              goto label_494a9f;
00494a8e      }
00494a8e      
00494ac6      long double x87_r7 = ((long double)arg1->m_TimerStamp);
00494ac9      long double temp0 = ((long double)arg2->m_TimerStamp);
00494ac9      (x87_r7 - temp0);
00494ac9      
00494ad1      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00494add          return 0;
00494add      
00494ad9      return 1;
00494a80  }

00494ade                                                                                            90 90                                ..

00494ae0  void __fastcall gmJournalUI::ClearTimerText(class gmJournalUI* this)

00494ae0  {
00494ae5      class UIElement_Text* m_pDaysEditBox = this->m_pDaysEditBox;
00494aeb      __builtin_memset(&this->m_Info.m_TimerStamp, 0, 0x14);
00494af7      this->m_Info.m_TimerRunning = 0;
00494b0f      UIElement_Text::ClearAllText(m_pDaysEditBox);
00494b1a      UIElement_Text::ClearAllText(this->m_pHoursEditBox);
00494b26      /* tailcall */
00494b26      return UIElement_Text::ClearAllText(this->m_pMinutesEditBox);
00494ae0  }

00494b2b                                   90 90 90 90 90                                                             .....

00494b30  uint8_t __thiscall PStringBase<unsigned short>::operator!=(class PStringBase<unsigned short> const* this, class PStringBase<unsigned short> const* arg2)

00494b30  {
00494b34      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_charbuffer;
00494b36      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
00494b3f      int32_t eax;
00494b3f      
00494b3f      if (m_charbuffer->m_data[0x7ffffffffffffffe] == m_charbuffer_1->m_data[0x7ffffffffffffffe])
00494b3f      {
00494b41          eax = *(int32_t*)((char*)m_charbuffer + -8);
00494b44          int32_t esi_1 = *(int32_t*)((char*)m_charbuffer_1 + -8);
00494b44          
00494b53          if (((eax == esi_1 || eax == 0xffffffff) || esi_1 == 0xffffffff))
00494b53          {
00494b5d              int32_t eax_1 = wcscmp(m_charbuffer, m_charbuffer_1);
00494b66              int32_t eax_2 = -(eax_1);
00494b6d              return ((int8_t)-((eax_2 - eax_2)));
00494b53          }
00494b3f      }
00494b3f      
00494b55      eax = 1;
00494b58      return 1;
00494b30  }


00494b70  void __fastcall PageInfo::PageInfo(class PageInfo* this)

00494b70  {
00494b70      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00494b78      class PSRefBufferCharData<unsigned short>** this_1 = this;
00494b87      *(uint32_t*)this_1 = PStringBase<unsigned short>::s_NullBuffer_3;
00494b89      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
00494b8b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer;
00494b97      this_1[1] = PStringBase<unsigned short>::s_NullBuffer_6;
00494b9a      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_6 - 0x10));
00494b9c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
00494ba8      this_1[2] = PStringBase<unsigned short>::s_NullBuffer_4;
00494bab      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_4 - 0x10));
00494bad      class PSRefBufferCharData<unsigned short>* eax_2 = *(uint32_t*)this_1;
00494bad      
00494bbb      if (eax_2 != PStringBase<unsigned short>::s_NullBuffer)
00494bbb      {
00494bcc          if ((InterlockedDecrement(&eax_2->m_data[-8]) == 0 && eax_2 != 0x14))
00494bd5              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00494bd5          
00494bd7          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00494be2          *(uint32_t*)this_1 = PStringBase<unsigned short>::s_NullBuffer_1;
00494be4          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00494bbb      }
00494bbb      
00494be6      void* eax_5 = this_1[1];
00494be6      
00494bef      if (eax_5 != PStringBase<unsigned short>::s_NullBuffer)
00494bef      {
00494c00          if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
00494c09              **(uint32_t**)((char*)eax_5 - 0x14)(1);
00494c09          
00494c0b          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
00494c17          this_1[1] = PStringBase<unsigned short>::s_NullBuffer_5;
00494c1a          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_5 - 0x10));
00494bef      }
00494bef      
00494c1c      void* eax_8 = this_1[2];
00494c1c      
00494c25      if (eax_8 != PStringBase<unsigned short>::s_NullBuffer)
00494c25      {
00494c38          if ((InterlockedDecrement(((char*)eax_8 - 0x10)) == 0 && eax_8 != 0x14))
00494c41              **(uint32_t**)((char*)eax_8 - 0x14)(1);
00494c41          
00494c43          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00494c4e          this_1[2] = PStringBase<unsigned short>::s_NullBuffer_2;
00494c51          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
00494c25      }
00494c25      
00494c58      this_1[3] = 0;
00494c5b      __builtin_memset(&this_1[6], 0, 0x15);
00494c6a      this_1[0xc] = 0;
00494c6d      this_1[0xd] = 0;
00494c70      this_1[0xe] = 0;
00494c73      this_1[0xf] = 0;
00494c76      this_1[4] = 0;
00494b70  }

00494c84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00494c90  void __fastcall PageInfo::Clear(class PageInfo* this)

00494c90  {
00494ca1      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_Label.m_charbuffer;
00494ca1      
00494caa      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
00494caa      {
00494cbb          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00494cc3              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00494cc3          
00494cc5          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00494cd0          this->m_Label.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00494cd2          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00494caa      }
00494caa      
00494cd4      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_Title.m_charbuffer;
00494cd4      
00494cdd      if (m_charbuffer_1 != PStringBase<unsigned short>::s_NullBuffer)
00494cdd      {
00494cee          if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
00494cf6              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00494cf6          
00494cf8          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00494d04          this->m_Title.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_3;
00494d07          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
00494cdd      }
00494cdd      
00494d09      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this->m_Notes.m_charbuffer;
00494d09      
00494d12      if (m_charbuffer_2 != PStringBase<unsigned short>::s_NullBuffer)
00494d12      {
00494d25          if ((InterlockedDecrement(&m_charbuffer_2->m_data[-8]) == 0 && m_charbuffer_2 != 0x14))
00494d2d              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00494d2d          
00494d2f          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00494d3a          this->m_Notes.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_2;
00494d3d          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
00494d12      }
00494d12      
00494d44      this->m_PageNumber = 0;
00494d47      __builtin_memset(&this->m_TimerStamp, 0, 0x15);
00494d56      this->m_xCoord = 0f;
00494d59      *(uint32_t*)((char*)this->m_xCoord)[4] = 0;
00494d5c      this->m_yCoord = 0f;
00494d5f      *(uint32_t*)((char*)this->m_yCoord)[4] = 0;
00494d62      this->m_TimerRunning = 0;
00494c90  }

00494d6e                                            90 90                                                                ..

00494d70  void __thiscall gmJournalUI::gmJournalUI(class gmJournalUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00494d70  {
00494d80      UIElement_Field::UIElement_Field(this, arg2, arg3);
00494d85      this->vtable = &gmUrgentAssistanceUI::`vftable';
00494d97      this->vtable = 0x7a6420;
00494d9d      this->vtable = &gmUrgentAssistanceUI::`vftable';
00494da7      __builtin_memset(&this->m_pStartTimerButton, 0, 0x35);
00494dfb      this->m_CurrentPage = 0;
00494e01      PageInfo::PageInfo(&this->m_Info);
00494e06      this->m_timeNextUpdate = 0f;
00494e0c      *(uint32_t*)((char*)this->m_timeNextUpdate)[4] = 0;
00494d70  }

00494e19                                                                             90 90 90 90 90 90 90                           .......

00494e20  class UIElement* __thiscall gmJournalUI::DynamicCast(class gmJournalUI* this, uint32_t arg2) __pure

00494e20  {
00494e2c      if (arg2 == 0x10000048)
00494e39          return this;
00494e39      
00494e33      int32_t edx_1;
00494e33      edx_1 = arg2 != 3;
00494e37      return (this & (edx_1 - 1));
00494e20  }

00494e3c                                                                                      90 90 90 90                              ....

00494e40  uint32_t gmJournalUI::GetUIElementType(class gmJournalUI const* this @ ecx) __pure

00494e40  {
00494e45      return 0x10000048;
00494e40  }

00494e46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00494e50  void __fastcall gmJournalUI::~gmJournalUI(class gmJournalUI* this)

00494e50  {
00494e5c      this->vtable = 0x7a6420;
00494e54      this->vtable = &gmUrgentAssistanceUI::`vftable';
00494e68      UIListener::UnRegisterForGlobalMessage(this, 3);
00494e6d      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
00494e6d      
00494e74      if (eax != 0)
00494e76          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
00494e76      
00494e84      PageInfo::~PageInfo(&this->m_Info);
00494e54      this->vtable = &gmUrgentAssistanceUI::`vftable';
00494e91      NoticeHandler::~NoticeHandler(&this->vtable);
00494e9a      /* tailcall */
00494e9a      return UIElement_Field::~UIElement_Field(this);
00494e50  }

00494e9f                                                                                               90                                 .

00494ea0  class UIElement* gmJournalUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

00494ea0  {
00494ea5      void* eax = operator new(0x680);
00494ea5      
00494eaf      if (eax == 0)
00494ec5          return 0;
00494ec5      
00494ec2      return gmJournalUI::gmJournalUI(eax, arg1, arg2);
00494ea0  }

00494ec6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00494ed0  uint8_t __fastcall gmJournalUI::IsLastPage(class gmJournalUI* this)

00494ed0  {
00494eec      int32_t eax_1;
00494eec      eax_1 = this->m_CurrentPage == ((g_JournalPages._M_finish - g_JournalPages._M_start) >> 6);
00494eef      return eax_1;
00494ed0  }


00494ef0  void __thiscall PageInfo::PageInfo(class PageInfo* this, class PageInfo const* arg2)

00494ef0  {
00494ef0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00494efe      class PSRefBufferCharData<unsigned short>** this_1 = this;
00494f07      *(uint32_t*)this_1 = PStringBase<unsigned short>::s_NullBuffer_1;
00494f09      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00494f0b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00494f17      this_1[1] = PStringBase<unsigned short>::s_NullBuffer_3;
00494f1a      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
00494f1c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00494f28      this_1[2] = PStringBase<unsigned short>::s_NullBuffer_2;
00494f2b      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
00494f31      class PSRefBufferCharData<unsigned short>* eax_2 = *(uint32_t*)this_1;
00494f31      
00494f35      if (eax_2 != arg2->m_Label.m_charbuffer)
00494f35      {
00494f4a          if ((InterlockedDecrement(&eax_2->m_data[-8]) == 0 && eax_2 != 0x14))
00494f53              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00494f53          
00494f55          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_Label.m_charbuffer;
00494f57          *(uint32_t*)this_1 = m_charbuffer;
00494f5d          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00494f35      }
00494f35      
00494f5f      void* eax_6 = this_1[1];
00494f5f      
00494f65      if (eax_6 != arg2->m_Title.m_charbuffer)
00494f65      {
00494f7a          if ((InterlockedDecrement(((char*)eax_6 - 0x10)) == 0 && eax_6 != 0x14))
00494f83              **(uint32_t**)((char*)eax_6 - 0x14)(1);
00494f83          
00494f85          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_Title.m_charbuffer;
00494f88          this_1[1] = m_charbuffer_1;
00494f8f          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00494f65      }
00494f65      
00494f91      void* eax_10 = this_1[2];
00494f91      
00494f97      if (eax_10 != arg2->m_Notes.m_charbuffer)
00494f97      {
00494fac          if ((InterlockedDecrement(((char*)eax_10 - 0x10)) == 0 && eax_10 != 0x14))
00494fb5              **(uint32_t**)((char*)eax_10 - 0x14)(1);
00494fb5          
00494fb7          class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = arg2->m_Notes.m_charbuffer;
00494fba          this_1[2] = m_charbuffer_2;
00494fc1          InterlockedIncrement(&m_charbuffer_2->m_data[-8]);
00494f97      }
00494f97      
00494fc6      this_1[3] = arg2->m_PageNumber;
00494fcc      this_1[4] = arg2->m_TimerRunning;
00494fd2      this_1[6] = arg2->m_TimerStamp;
00494fd8      this_1[7] = *(uint32_t*)((char*)arg2->m_TimerStamp)[4];
00494fde      this_1[8] = arg2->m_Days;
00494fe4      this_1[9] = arg2->m_Hours;
00494fea      this_1[0xa] = arg2->m_Minutes;
00494fed      int32_t ecx_6;
00494fed      ecx_6 = arg2->m_LocationSet;
00494ff0      this_1[0xb] = ecx_6;
00494ff6      this_1[0xc] = arg2->m_xCoord;
00494ffc      this_1[0xd] = *(uint32_t*)((char*)arg2->m_xCoord)[4];
00495002      this_1[0xe] = arg2->m_yCoord;
00495009      this_1[0xf] = *(uint32_t*)((char*)arg2->m_yCoord)[4];
00494ef0  }

00495014                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00495020  class PageInfo& __thiscall PageInfo::operator=(class PageInfo* this, class PageInfo const& arg2)

00495020  {
0049502e      class PageInfo* result = this;
00495030      class PSRefBufferCharData<unsigned short>* m_charbuffer = result->m_Label.m_charbuffer;
00495030      
00495034      if (m_charbuffer != arg2->m_Label.m_charbuffer)
00495034      {
00495049          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00495051              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00495051          
00495053          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_Label.m_charbuffer;
00495055          result->m_Label.m_charbuffer = m_charbuffer_1;
0049505b          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00495034      }
00495034      
0049505d      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = result->m_Title.m_charbuffer;
0049505d      
00495063      if (m_charbuffer_2 != arg2->m_Title.m_charbuffer)
00495063      {
00495078          if ((InterlockedDecrement(&m_charbuffer_2->m_data[-8]) == 0 && m_charbuffer_2 != 0x14))
00495080              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00495080          
00495082          class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = arg2->m_Title.m_charbuffer;
00495085          result->m_Title.m_charbuffer = m_charbuffer_3;
0049508c          InterlockedIncrement(&m_charbuffer_3->m_data[-8]);
00495063      }
00495063      
0049508e      class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = result->m_Notes.m_charbuffer;
0049508e      
00495094      if (m_charbuffer_4 != arg2->m_Notes.m_charbuffer)
00495094      {
004950a9          if ((InterlockedDecrement(&m_charbuffer_4->m_data[-8]) == 0 && m_charbuffer_4 != 0x14))
004950b1              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_4 + -0x14)(1);
004950b1          
004950b3          class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = arg2->m_Notes.m_charbuffer;
004950b6          result->m_Notes.m_charbuffer = m_charbuffer_5;
004950bd          InterlockedIncrement(&m_charbuffer_5->m_data[-8]);
00495094      }
00495094      
004950c2      result->m_PageNumber = arg2->m_PageNumber;
004950c5      this = arg2->m_TimerRunning;
004950c8      result->m_TimerRunning = this;
004950ce      result->m_TimerStamp = arg2->m_TimerStamp;
004950d4      *(uint32_t*)((char*)result->m_TimerStamp)[4] = *(uint32_t*)((char*)arg2->m_TimerStamp)[4];
004950da      result->m_Days = arg2->m_Days;
004950e0      result->m_Hours = arg2->m_Hours;
004950e6      result->m_Minutes = arg2->m_Minutes;
004950e9      int32_t ecx_3;
004950e9      ecx_3 = arg2->m_LocationSet;
004950ec      result->m_LocationSet = ecx_3;
004950f2      result->m_xCoord = arg2->m_xCoord;
004950f8      *(uint32_t*)((char*)result->m_xCoord)[4] = *(uint32_t*)((char*)arg2->m_xCoord)[4];
004950fe      result->m_yCoord = arg2->m_yCoord;
00495105      *(uint32_t*)((char*)result->m_yCoord)[4] = *(uint32_t*)((char*)arg2->m_yCoord)[4];
0049510d      return result;
00495020  }


00495110  void* __thiscall gmJournalUI::`scalar deleting destructor'(class gmJournalUI* this, uint32_t arg2)

00495110  {
00495113      gmJournalUI::~gmJournalUI(this);
00495113      
0049511d      if ((arg2 & 1) != 0)
00495120          operator delete(this);
00495120      
0049512b      return this;
00495110  }

0049512e                                            90 90                                                                ..

00495130  void gmJournalUI::Register()

00495130  {
0049513a      UIElement::RegisterElementClass(0x10000048, gmJournalUI::Create);
00495130  }

00495143           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00495150  int32_t __fastcall gmJournalUI::ResetTimer(class gmJournalUI* this)

00495150  {
0049515c      class PSRefBufferCharData<unsigned short>* esi = PStringBase<unsigned short>::s_NullBuffer;
00495169      InterlockedIncrement(&esi->m_data[-8]);
00495176      void* __return;
00495176      class PStringBase<unsigned short>* eax_1 = UIElement_Text::GetText(this->m_pDaysEditBox, &__return);
00495176      
0049517f      if (esi != eax_1->m_charbuffer)
0049517f      {
00495194          if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
0049519c              *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
0049519c          
0049519e          esi = eax_1->m_charbuffer;
004951a4          InterlockedIncrement(&esi->m_data[-8]);
0049517f      }
0049517f      
004951aa      int32_t* ebx_2 = ((char*)__return - 0x14);
004951aa      
004951bd      if ((InterlockedDecrement(&ebx_2[1]) == 0 && ebx_2 != 0))
004951c5          **(uint32_t**)ebx_2(1);
004951c5      
004951d4      *(uint32_t*)_errno() = 0;
004951ee      this->m_Info.m_Days = wcstoul(esi, 0, 0);
004951f4      void* __return_1;
004951f4      class PStringBase<unsigned short>* eax_8 = UIElement_Text::GetText(this->m_pHoursEditBox, &__return_1);
004951f4      
004951fd      if (esi != eax_8->m_charbuffer)
004951fd      {
00495212          if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
0049521a              *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
0049521a          
0049521c          esi = eax_8->m_charbuffer;
00495222          InterlockedIncrement(&esi->m_data[-8]);
004951fd      }
004951fd      
0049522c      int32_t* ebx_5 = ((char*)__return_1 - 0x14);
0049522c      
0049523f      if ((InterlockedDecrement(&ebx_5[1]) == 0 && ebx_5 != 0))
00495247          **(uint32_t**)ebx_5(1);
00495247      
00495250      *(uint32_t*)_errno() = 0;
0049526a      this->m_Info.m_Hours = wcstoul(esi, 0, 0);
00495270      void* __return_2;
00495270      class PStringBase<unsigned short>* eax_15 = UIElement_Text::GetText(this->m_pMinutesEditBox, &__return_2);
00495270      
00495279      if (esi != eax_15->m_charbuffer)
00495279      {
0049528e          if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
00495296              *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
00495296          
00495298          esi = eax_15->m_charbuffer;
0049529e          InterlockedIncrement(&esi->m_data[-8]);
00495279      }
00495279      
004952a8      int32_t* ebx_8 = ((char*)__return_2 - 0x14);
004952a8      
004952bb      if ((InterlockedDecrement(&ebx_8[1]) == 0 && ebx_8 != 0))
004952c3          **(uint32_t**)ebx_8(1);
004952c3      
004952cc      *(uint32_t*)_errno() = 0;
004952d2      int32_t eax_21 = wcstoul(esi, 0, 0);
004952ea      this->m_Info.m_Minutes = eax_21;
00495325      this->m_Info.m_TimerRunning = 1;
0049532c      this->m_Info.m_TimerStamp = ((double)(((((long double)(this->m_Info.m_Days * 0x15180)) + ((long double)(eax_21 * 0x3c))) + ((long double)(this->m_Info.m_Hours * 0xe10))) + ((long double)Timer::cur_time)));
0049532c      
0049533e      if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
00495346          *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
00495346      
00495351      return 0;
00495150  }

00495352                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00495360  void __fastcall gmJournalUI::SaveThisPage(class gmJournalUI* this)

00495360  {
00495366      class PSRefBufferCharData<unsigned short>* esi = PStringBase<unsigned short>::s_NullBuffer;
00495373      InterlockedIncrement(&esi->m_data[-8]);
00495384      class PStringBase<unsigned short> __return;
00495384      class PStringBase<unsigned short>* eax_1 = UIElement_Text::GetText(this->m_pLabelEditBox, &__return);
00495397      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_Info.m_Label.m_charbuffer;
00495397      
0049539b      if (m_charbuffer != eax_1->m_charbuffer)
0049539b      {
004953b0          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
004953b9              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004953b9          
004953bb          class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = eax_1->m_charbuffer;
0049538d          this->m_Info.m_Label.m_charbuffer = m_charbuffer_3;
004953c7          InterlockedIncrement(&m_charbuffer_3->m_data[-8]);
0049539b      }
0049539b      
004953d1      int32_t* ebx_3 = (__return - 0x14);
004953d1      
004953e4      if ((InterlockedDecrement(&ebx_3[1]) == 0 && ebx_3 != 0))
004953ec          **(uint32_t**)ebx_3(1);
004953ec      
004953f9      class PStringBase<unsigned short>* eax_7 = UIElement_Text::GetText(this->m_pTitleEditBox, &__return);
004953fe      class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = this->m_Info.m_Title.m_charbuffer;
004953fe      
00495409      if (m_charbuffer_4 != eax_7->m_charbuffer)
00495409      {
0049541e          if ((InterlockedDecrement(&m_charbuffer_4->m_data[-8]) == 0 && m_charbuffer_4 != 0x14))
00495426              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_4 + -0x14)(1);
00495426          
00495428          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax_7->m_charbuffer;
0049542b          this->m_Info.m_Title.m_charbuffer = m_charbuffer_1;
00495435          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00495409      }
00495409      
0049543f      int32_t* ebx_6 = (__return - 0x14);
0049543f      
00495452      if ((InterlockedDecrement(&ebx_6[1]) == 0 && ebx_6 != 0))
0049545a          **(uint32_t**)ebx_6(1);
0049545a      
00495467      class PStringBase<unsigned short>* eax_12 = UIElement_Text::GetText(this->m_pNotesEditBox, &__return);
0049546c      class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = this->m_Info.m_Notes.m_charbuffer;
0049546c      
00495477      if (m_charbuffer_5 != eax_12->m_charbuffer)
00495477      {
0049548c          if ((InterlockedDecrement(&m_charbuffer_5->m_data[-8]) == 0 && m_charbuffer_5 != 0x14))
00495494              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_5 + -0x14)(1);
00495494          
00495496          class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = eax_12->m_charbuffer;
00495499          this->m_Info.m_Notes.m_charbuffer = m_charbuffer_2;
004954a3          InterlockedIncrement(&m_charbuffer_2->m_data[-8]);
00495477      }
00495477      
004954b3      int32_t* ebx_9 = (__return - 0x14);
004954b3      
004954c2      if ((InterlockedDecrement(&ebx_9[1]) == 0 && ebx_9 != 0))
004954ca          **(uint32_t**)ebx_9(1);
004954ca      
004954dd      this->m_Info.m_PageNumber = this->m_CurrentPage;
004954e3      class PStringBase<unsigned short>* eax_18 = UIElement_Text::GetText(this->m_pDaysEditBox, &__return);
004954e3      
004954ec      if (esi != eax_18->m_charbuffer)
004954ec      {
004954fd          if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
00495505              *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
00495505          
00495507          esi = eax_18->m_charbuffer;
0049550d          InterlockedIncrement(&esi->m_data[-8]);
004954ec      }
004954ec      
00495517      int32_t* ebx_12 = (__return - 0x14);
00495517      
00495526      if ((InterlockedDecrement(&ebx_12[1]) == 0 && ebx_12 != 0))
0049552e          **(uint32_t**)ebx_12(1);
0049552e      
0049553d      *(uint32_t*)_errno() = 0;
00495557      this->m_Info.m_Days = wcstoul(esi, 0, 0);
0049555d      void* __return_1;
0049555d      class PStringBase<unsigned short>* eax_25 = UIElement_Text::GetText(this->m_pHoursEditBox, &__return_1);
0049555d      
00495566      if (esi != eax_25->m_charbuffer)
00495566      {
0049557b          if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
00495583              *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
00495583          
00495585          esi = eax_25->m_charbuffer;
0049558b          InterlockedIncrement(&esi->m_data[-8]);
00495566      }
00495566      
00495595      int32_t* ebx_15 = ((char*)__return_1 - 0x14);
00495595      
004955a8      if ((InterlockedDecrement(&ebx_15[1]) == 0 && ebx_15 != 0))
004955b0          **(uint32_t**)ebx_15(1);
004955b0      
004955b9      *(uint32_t*)_errno() = 0;
004955d3      this->m_Info.m_Hours = wcstoul(esi, 0, 0);
004955d9      void* __return_2;
004955d9      class PStringBase<unsigned short>* eax_32 = UIElement_Text::GetText(this->m_pMinutesEditBox, &__return_2);
004955d9      
004955e2      if (esi != eax_32->m_charbuffer)
004955e2      {
004955f7          if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
004955ff              *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
004955ff          
00495601          esi = eax_32->m_charbuffer;
00495607          InterlockedIncrement(&esi->m_data[-8]);
004955e2      }
004955e2      
00495611      int32_t* ebx_18 = ((char*)__return_2 - 0x14);
00495611      
00495624      if ((InterlockedDecrement(&ebx_18[1]) == 0 && ebx_18 != 0))
0049562c          **(uint32_t**)ebx_18(1);
0049562c      
00495635      *(uint32_t*)_errno() = 0;
00495641      this->m_Info.m_Minutes = wcstoul(esi, 0, 0);
0049564d      class PageInfo* _M_start = g_JournalPages._M_start;
00495652      uint32_t m_CurrentPage = this->m_CurrentPage;
00495652      
00495662      if (m_CurrentPage <= ((g_JournalPages._M_finish - _M_start) >> 6))
00495670          PageInfo::operator=(&_M_start[(m_CurrentPage - 1)], &this->m_Info);
00495670      
00495688      if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
00495690          *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
00495360  }

0049569a                                                                                90 90 90 90 90 90                            ......

004956a0  class PStringBase<unsigned short>* __convention("regparm") GetTimerText(class PStringBase<unsigned short>* __return, uint8_t const arg2, double const arg3)

004956a0  {
004956a0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4;
004956a0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_4;
004956a1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004956a6      int32_t __saved_esi_1;
004956a6      int32_t __saved_esi = __saved_esi_1;
004956ad      PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004956b1      int32_t __saved_edi_1;
004956b1      int32_t __saved_edi = __saved_edi_1;
004956b6      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004956b8      int16_t eax_1;
004956b8      eax_1 = arg2;
004956b8      
004956be      if (eax_1 == 0)
004956be      {
00495719          void (__thiscall** const var_10_4)(class gmNoticeHandler* this, uint32_t) = &gmJournalUI::`vftable'.RecvNotice_AddSalvageItem;
00495722          class PSRefBufferCharData<unsigned short>** var_14_3 = &PStringBase<unsigned short>::s_NullBuffer_2;
00495723          PStringBase<unsigned short>::sprintf();
004956be      }
004956be      else
004956be      {
004956c0          long double x87_r7_1 = ((long double)arg3);
004956c4          long double temp0_1 = ((long double)0.0);
004956c4          (x87_r7_1 - temp0_1);
004956c4          
004956cf          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
004956cf          {
0049570d              void (__thiscall** const var_10_3)(class gmNoticeHandler* this, uint32_t) = &gmJournalUI::`vftable'.RecvNotice_AddSalvageItem;
00495716              class PSRefBufferCharData<unsigned short>** var_14_2 = &PStringBase<unsigned short>::s_NullBuffer_2;
00495723              PStringBase<unsigned short>::sprintf();
004956cf          }
004956cf          else
004956cf          {
004956d5              Timer::cur_time;
004956db              int32_t eax_2 = _ftol2();
004956e2              arg2 = eax_2;
004956e2              
004956e6              if (eax_2 <= 0)
004956e6              {
00495701                  void (__thiscall** const var_10_2)(class gmNoticeHandler* this, uint32_t, uint32_t, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_BeginDrag;
0049570a                  class PSRefBufferCharData<unsigned short>** var_14_1 = &PStringBase<unsigned short>::s_NullBuffer_2;
00495723                  PStringBase<unsigned short>::sprintf();
004956e6              }
004956e6              else
004956f7                  ClientUISystem::DeltaTimeToString(((double)((long double)arg2)), &PStringBase<unsigned short>::s_NullBuffer_2);
004956cf          }
004956be      }
004956be      
0049572b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
00495733      __return->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_3;
00495739      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0049573f      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0049573f      
00495752      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00495752      {
00495756          int32_t var_10_7 = 1;
0049575a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00495752      }
00495752      
00495761      return __return;
004956a0  }

00495762        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00495770  void __fastcall gmJournalUI::ShowEditableTimer(class gmJournalUI* this)

00495770  {
00495773      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00495780      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_1;
0049578a      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049578c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00495791      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
00495799      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004957a5      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_4, &gmJournalUI::`vftable'.RecvNotice_ItemListDragOver);
004957b4      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, &data_794320);
004957c2      this->m_Info.m_TimerRunning = 0;
004957b9      this->m_pDaysEditBox->vtable->SetVisible(1);
004957d0      this->m_pDaysStaticText->vtable->SetVisible(1);
004957dd      this->m_pHoursEditBox->vtable->SetVisible(1);
004957ea      this->m_pHoursStaticText->vtable->SetVisible(1);
004957f7      this->m_pMinutesEditBox->vtable->SetVisible(1);
00495804      this->m_pMinutesStaticText->vtable->SetVisible(1);
00495811      this->m_pTimerStaticText->vtable->SetVisible(0);
00495829      UIElement_Text::SetText(this->m_pTimerStaticText, &PStringBase<unsigned short>::s_NullBuffer_3);
00495839      UIElement_Text::SetText(this->m_pStartTimerButton, &PStringBase<unsigned short>::s_NullBuffer_4);
00495848      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
00495848      
00495857      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049585f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049585f      
00495865      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
00495865      
00495874      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0049587c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00495770  }

00495884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00495890  void __fastcall gmJournalUI::UpdateRunningTimer(class gmJournalUI* this)

00495890  {
00495890      class gmJournalUI* this_1 = this;
00495894      class PStringBase<unsigned short>* __return = *(uint32_t*)((char*)this->m_Info.m_TimerStamp)[4];
004958a2      int32_t edx;
004958a2      edx = this->m_Info.m_TimerRunning;
004958a8      class PStringBase<unsigned short>* __return_1 = __return;
004958a9      int32_t var_10 = this->m_Info.m_TimerStamp;
004958ae      int32_t var_14 = edx;
004958b0      GetTimerText(__return, edx, &this_1);
004958c3      UIElement_Text::SetText(this->m_pTimerStaticText, &this_1);
004958cc      void* __offset(gmJournalUI, -0x14) esi_2 = ((char*)this_1 - 0x14);
004958cc      
004958df      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004958e7          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00495890  }

004958ec                                      90 90 90 90                                                              ....

004958f0  void __fastcall gmJournalUI::UpdateLocation(class gmJournalUI* this)

004958f0  {
004958f0      int32_t ebp;
004958f0      int32_t var_4 = ebp;
004958f9      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00495908      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
00495912      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00495914      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_3;
00495914      
00495924      if (PStringBase<unsigned short>::s_NullBuffer_4 != PStringBase<unsigned short>::s_NullBuffer)
00495924      {
00495935          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_4 != 0x14))
0049593d              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4 + -0x14)(1);
0049593d          
0049593f          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00495944          PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0049594c          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00495924      }
00495924      
0049594e      PStringBase<unsigned short>::s_NullBuffer_4 = this->m_Info.m_LocationSet;
0049594e      
00495956      if (PStringBase<unsigned short>::s_NullBuffer_4 == 0)
00495a30          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, &gmJournalUI::`vftable'.RecvNotice_AddSalvageItem);
00495956      else
00495956      {
0049595c          long double x87_r7_1 = ((long double)this->m_Info.m_xCoord);
00495962          long double temp0_1 = ((long double)0.0);
00495962          (x87_r7_1 - temp0_1);
00495968          PStringBase<unsigned short>::s_NullBuffer_4 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0049596a          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0049596d          void (__thiscall** const edx_2)(class gmNoticeHandler* this);
0049596d          
0049596d          if (p_1)
0049596d          {
00495976              long double x87_r7_2 = ((long double)this->m_Info.m_xCoord);
0049597c              edx_2 = &gmJournalUI::`vftable'.RecvNotice_LastSpellTab;
00495981              long double temp1_1 = ((long double)0.0);
00495981              (x87_r7_2 - temp1_1);
00495987              PStringBase<unsigned short>::s_NullBuffer_4 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00495987              
0049598c              if ((*(uint8_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4)[1] & 0x41) != 0)
0049598e                  edx_2 = &data_794320;
0049596d          }
0049596d          else
0049596f              edx_2 = &gmJournalUI::`vftable'.RecvNotice_NextSpellSelection;
0049596f          
00495993          long double x87_r7_3 = ((long double)this->m_Info.m_yCoord);
00495999          long double temp2_1 = ((long double)0.0);
00495999          (x87_r7_3 - temp2_1);
0049599f          PStringBase<unsigned short>::s_NullBuffer_4 = ((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
004959a1          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
004959a4          void (__thiscall** const ecx_1)(class gmNoticeHandler* this);
004959a4          
004959a4          if (p_2)
004959a4          {
004959ad              long double x87_r7_4 = ((long double)this->m_Info.m_yCoord);
004959b3              ecx_1 = &gmJournalUI::`vftable'.RecvNotice_FirstSpellTab;
004959b8              long double temp3_1 = ((long double)0.0);
004959b8              (x87_r7_4 - temp3_1);
004959be              PStringBase<unsigned short>::s_NullBuffer_4 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004959be              
004959c3              if ((*(uint8_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4)[1] & 0x41) != 0)
004959c5                  ecx_1 = &data_794320;
004959a4          }
004959a4          else
004959a6              ecx_1 = &gmJournalUI::`vftable'.RecvNotice_LastSpellSelection;
004959a6          
004959ca          long double x87_r7_5 = ((long double)this->m_Info.m_xCoord);
004959d0          long double temp4_1 = ((long double)0.0);
004959d0          (x87_r7_5 - temp4_1);
004959d6          PStringBase<unsigned short>::s_NullBuffer_4 = ((((x87_r7_5 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
004959d6          
004959db          if ((*(uint8_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4)[1] & 1) != 0)
004959dd              x87_r7_5 = -(x87_r7_5);
004959dd          
004959df          double var_18_1 = ((double)x87_r7_5);
004959e3          long double x87_r7_6 = ((long double)this->m_Info.m_yCoord);
004959e9          long double temp5_1 = ((long double)0.0);
004959e9          (x87_r7_6 - temp5_1);
004959ef          PStringBase<unsigned short>::s_NullBuffer_4 = ((((x87_r7_6 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
004959ef          
004959f4          if ((*(uint8_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4)[1] & 1) != 0)
004959f6              x87_r7_6 = -(x87_r7_6);
004959f6          
004959fc          double var_10_1 = ((double)x87_r7_6);
00495a00          void (__thiscall** const var_34_3)(class gmNoticeHandler* this) = edx_2;
00495a05          int32_t var_38 = *(uint32_t*)((char*)var_18_1)[4];
00495a0a          int32_t var_3c_1 = var_18_1;
00495a0b          void (__thiscall** const var_40_1)(class gmNoticeHandler* this) = ecx_1;
00495a10          int32_t var_44_1 = *(uint32_t*)((char*)var_10_1)[4];
00495a11          int32_t var_48_1 = var_10_1;
00495a1c          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, &gmJournalUI::`vftable'.RecvNotice_StopViewingObject);
00495956      }
00495956      
00495a43      UIElement_Text::SetText(this->m_pLocationStaticText, &PStringBase<unsigned short>::s_NullBuffer_3);
00495a4c      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
00495a4c      
00495a5b      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00495a63          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00495a63      
00495905      var_4;
004958f0  }

00495a6d                                         90 90 90                                                               ...

00495a70  void __fastcall gmJournalUI::UpdatePageNumber(class gmJournalUI* this)

00495a70  {
00495a70      class gmJournalUI* var_4 = this;
00495a71      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00495a78      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00495a82      int32_t m_PageNumber_1 = 1;
00495a87      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00495a8d      int32_t m_PageNumber = this->m_Info.m_PageNumber;
00495a8d      
00495a95      if (m_PageNumber > 0)
00495a97          m_PageNumber_1 = m_PageNumber;
00495a97      
00495a99      int32_t m_PageNumber_2 = m_PageNumber_1;
00495aa4      PStringBase<unsigned short>::sprintf(&var_4, &gmJournalUI::`vftable'.RecvNotice_NextSpellTab);
00495ab7      UIElement_Text::SetText(this->m_pPageNumberStaticText, &var_4);
00495ac0      void* __offset(gmJournalUI, -0x14) esi_2 = ((char*)var_4 - 0x14);
00495ac0      
00495ad3      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00495adb          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00495a70  }

00495ae1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00495af0  uint8_t PageInfoSortTitle(class PageInfo const* arg1, class PageInfo const* arg2)

00495af0  {
00495af3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00495b01      class PSRefBufferCharData<unsigned short>* var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00495b0a      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00495b0c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00495b11      class PSRefBufferCharData<unsigned short>* var_8 = PStringBase<unsigned short>::s_NullBuffer_2;
00495b19      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00495b1f      class PSRefBufferCharData<unsigned short>* eax_2 = var_4;
00495b1f      
00495b2c      if (eax_2 != arg1->m_Title.m_charbuffer)
00495b2c      {
00495b3d          if ((InterlockedDecrement(&eax_2->m_data[-8]) == 0 && eax_2 != 0x14))
00495b45              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00495b45          
00495b47          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg1->m_Title.m_charbuffer;
00495b4a          var_4 = m_charbuffer_1;
00495b52          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00495b2c      }
00495b2c      
00495b58      class PSRefBufferCharData<unsigned short>* eax_5 = var_8;
00495b58      
00495b5f      if (eax_5 != arg2->m_Title.m_charbuffer)
00495b5f      {
00495b70          if ((InterlockedDecrement(&eax_5->m_data[-8]) == 0 && eax_5 != 0x14))
00495b78              *(uint32_t*)*(int32_t*)((char*)eax_5 + -0x14)(1);
00495b78          
00495b7a          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_Title.m_charbuffer;
00495b7d          var_8 = m_charbuffer;
00495b85          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00495b5f      }
00495b5f      
00495b8b      PStringBase<unsigned short>::break_reference(&var_4);
00495b9b      _wcslwr(var_4);
00495ba4      PStringBase<unsigned short>::break_reference(&var_8);
00495bae      _wcslwr(var_8);
00495bc9      class PageInfo* ebx_2;
00495bc9      ebx_2 = wcscmp(var_4, var_8) < 0;
00495bcc      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &var_8->m_data[-0xa];
00495bcc      
00495bdb      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00495be3          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00495be3      
00495be9      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &var_4->m_data[-0xa];
00495be9      
00495bf8      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00495c00          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00495c00      
00495c05      int32_t eax_14;
00495c05      eax_14 = ebx_2;
00495c0b      return eax_14;
00495af0  }

00495c0c                                      90 90 90 90                                                              ....

00495c10  uint8_t ContractInfoSortName(class ContractInfo const* arg1, class ContractInfo const* arg2)

00495c10  {
00495c13      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00495c21      class PSRefBufferCharData<unsigned short>* var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00495c2a      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00495c2c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00495c31      class PSRefBufferCharData<unsigned short>* var_8 = PStringBase<unsigned short>::s_NullBuffer_2;
00495c39      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00495c3f      class PSRefBufferCharData<unsigned short>* eax_2 = var_4;
00495c3f      
00495c4b      if (eax_2 != arg1->m_Name.m_charbuffer)
00495c4b      {
00495c5c          if ((InterlockedDecrement(&eax_2->m_data[-8]) == 0 && eax_2 != 0x14))
00495c64              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00495c64          
00495c66          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg1->m_Name.m_charbuffer;
00495c68          var_4 = m_charbuffer_1;
00495c70          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00495c4b      }
00495c4b      
00495c76      class PSRefBufferCharData<unsigned short>* eax_5 = var_8;
00495c76      
00495c7c      if (eax_5 != arg2->m_Name.m_charbuffer)
00495c7c      {
00495c8d          if ((InterlockedDecrement(&eax_5->m_data[-8]) == 0 && eax_5 != 0x14))
00495c95              *(uint32_t*)*(int32_t*)((char*)eax_5 + -0x14)(1);
00495c95          
00495c97          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_Name.m_charbuffer;
00495c99          var_8 = m_charbuffer;
00495ca1          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00495c7c      }
00495c7c      
00495ca7      PStringBase<unsigned short>::break_reference(&var_4);
00495cb7      _wcslwr(var_4);
00495cc0      PStringBase<unsigned short>::break_reference(&var_8);
00495cca      _wcslwr(var_8);
00495ce5      class ContractInfo* ebx_2;
00495ce5      ebx_2 = wcscmp(var_4, var_8) < 0;
00495ce8      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &var_8->m_data[-0xa];
00495ce8      
00495cf7      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00495cff          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00495cff      
00495d05      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &var_4->m_data[-0xa];
00495d05      
00495d14      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00495d1c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00495d1c      
00495d21      int32_t eax_14;
00495d21      eax_14 = ebx_2;
00495d27      return eax_14;
00495c10  }

00495d28                          90 90 90 90 90 90 90 90                                                          ........

00495d30  uint8_t PageInfoReverseSortTitle(class PageInfo const* arg1, class PageInfo const* arg2)

00495d30  {
00495d33      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00495d41      class PSRefBufferCharData<unsigned short>* var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00495d4a      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00495d4c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00495d51      class PSRefBufferCharData<unsigned short>* var_8 = PStringBase<unsigned short>::s_NullBuffer_2;
00495d59      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00495d5f      class PSRefBufferCharData<unsigned short>* eax_2 = var_4;
00495d5f      
00495d6c      if (eax_2 != arg1->m_Title.m_charbuffer)
00495d6c      {
00495d7d          if ((InterlockedDecrement(&eax_2->m_data[-8]) == 0 && eax_2 != 0x14))
00495d85              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00495d85          
00495d87          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg1->m_Title.m_charbuffer;
00495d8a          var_4 = m_charbuffer_1;
00495d92          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00495d6c      }
00495d6c      
00495d98      class PSRefBufferCharData<unsigned short>* eax_5 = var_8;
00495d98      
00495d9f      if (eax_5 != arg2->m_Title.m_charbuffer)
00495d9f      {
00495db0          if ((InterlockedDecrement(&eax_5->m_data[-8]) == 0 && eax_5 != 0x14))
00495db8              *(uint32_t*)*(int32_t*)((char*)eax_5 + -0x14)(1);
00495db8          
00495dba          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_Title.m_charbuffer;
00495dbd          var_8 = m_charbuffer;
00495dc5          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00495d9f      }
00495d9f      
00495dcb      PStringBase<unsigned short>::break_reference(&var_4);
00495ddb      _wcslwr(var_4);
00495de4      PStringBase<unsigned short>::break_reference(&var_8);
00495dee      _wcslwr(var_8);
00495e09      class PageInfo* ebx_2;
00495e09      ebx_2 = wcscmp(var_4, var_8) > 0;
00495e0c      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &var_8->m_data[-0xa];
00495e0c      
00495e1b      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00495e23          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00495e23      
00495e29      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &var_4->m_data[-0xa];
00495e29      
00495e38      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00495e40          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00495e40      
00495e45      int32_t eax_14;
00495e45      eax_14 = ebx_2;
00495e4b      return eax_14;
00495d30  }

00495e4c                                      90 90 90 90                                                              ....

00495e50  uint8_t ContractInfoReverseSortName(class ContractInfo const* arg1, class ContractInfo const* arg2)

00495e50  {
00495e53      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00495e61      class PSRefBufferCharData<unsigned short>* var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00495e6a      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00495e6c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00495e71      class PSRefBufferCharData<unsigned short>* var_8 = PStringBase<unsigned short>::s_NullBuffer_2;
00495e79      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00495e7f      class PSRefBufferCharData<unsigned short>* eax_2 = var_4;
00495e7f      
00495e8b      if (eax_2 != arg1->m_Name.m_charbuffer)
00495e8b      {
00495e9c          if ((InterlockedDecrement(&eax_2->m_data[-8]) == 0 && eax_2 != 0x14))
00495ea4              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00495ea4          
00495ea6          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg1->m_Name.m_charbuffer;
00495ea8          var_4 = m_charbuffer_1;
00495eb0          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00495e8b      }
00495e8b      
00495eb6      class PSRefBufferCharData<unsigned short>* eax_5 = var_8;
00495eb6      
00495ebc      if (eax_5 != arg2->m_Name.m_charbuffer)
00495ebc      {
00495ecd          if ((InterlockedDecrement(&eax_5->m_data[-8]) == 0 && eax_5 != 0x14))
00495ed5              *(uint32_t*)*(int32_t*)((char*)eax_5 + -0x14)(1);
00495ed5          
00495ed7          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_Name.m_charbuffer;
00495ed9          var_8 = m_charbuffer;
00495ee1          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00495ebc      }
00495ebc      
00495ee7      PStringBase<unsigned short>::break_reference(&var_4);
00495ef7      _wcslwr(var_4);
00495f00      PStringBase<unsigned short>::break_reference(&var_8);
00495f0a      _wcslwr(var_8);
00495f25      class ContractInfo* ebx_2;
00495f25      ebx_2 = wcscmp(var_4, var_8) > 0;
00495f28      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &var_8->m_data[-0xa];
00495f28      
00495f37      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00495f3f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00495f3f      
00495f45      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &var_4->m_data[-0xa];
00495f45      
00495f54      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00495f5c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00495f5c      
00495f61      int32_t eax_14;
00495f61      eax_14 = ebx_2;
00495f67      return eax_14;
00495e50  }

00495f68                          90 90 90 90 90 90 90 90                                                          ........

00495f70  void __fastcall gmJournalUI::PostInit(class gmJournalUI* this)

00495f70  {
00495f73      UIElement::PostInit(this);
00495f7f      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000057d);
00495f86      class UIElement_Button* eax_1;
00495f86      
00495f86      if (eax == 0)
00495f96          eax_1 = nullptr;
00495f86      else
00495f8e          eax_1 = eax->vtable->DynamicCast(1);
00495f8e      
00495f9f      this->m_pStartTimerButton = eax_1;
00495fa5      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x10000569);
00495fac      class UIElement_Text* eax_3;
00495fac      
00495fac      if (eax_2 == 0)
00495fbc          eax_3 = nullptr;
00495fac      else
00495fb4          eax_3 = eax_2->vtable->DynamicCast(0xc);
00495fb4      
00495fc5      this->m_pLabelEditBox = eax_3;
00495fcb      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x1000056b);
00495fd2      class UIElement_Text* eax_5;
00495fd2      
00495fd2      if (eax_4 == 0)
00495fe2          eax_5 = nullptr;
00495fd2      else
00495fda          eax_5 = eax_4->vtable->DynamicCast(0xc);
00495fda      
00495feb      this->m_pTitleEditBox = eax_5;
00495ff1      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x1000056d);
00495ff8      class UIElement_Text* eax_7;
00495ff8      
00495ff8      if (eax_6 == 0)
00496008          eax_7 = nullptr;
00495ff8      else
00496000          eax_7 = eax_6->vtable->DynamicCast(0xc);
00496000      
00496011      this->m_pNotesEditBox = eax_7;
00496017      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x10000576);
0049601e      class UIElement_Text* eax_9;
0049601e      
0049601e      if (eax_8 == 0)
0049602e          eax_9 = nullptr;
0049601e      else
00496026          eax_9 = eax_8->vtable->DynamicCast(0xc);
00496026      
00496037      this->m_pDaysEditBox = eax_9;
0049603d      class UIElement* eax_10 = UIElement::GetChildRecursive(this, 0x10000578);
00496044      class UIElement_Text* eax_11;
00496044      
00496044      if (eax_10 == 0)
00496054          eax_11 = nullptr;
00496044      else
0049604c          eax_11 = eax_10->vtable->DynamicCast(0xc);
0049604c      
0049605d      this->m_pHoursEditBox = eax_11;
00496063      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x1000057a);
0049606a      class UIElement_Text* eax_13;
0049606a      
0049606a      if (eax_12 == 0)
0049607a          eax_13 = nullptr;
0049606a      else
00496072          eax_13 = eax_12->vtable->DynamicCast(0xc);
00496072      
00496083      this->m_pMinutesEditBox = eax_13;
00496089      class UIElement* eax_14 = UIElement::GetChildRecursive(this, 0x10000573);
00496090      class UIElement_Text* eax_15;
00496090      
00496090      if (eax_14 == 0)
004960a0          eax_15 = nullptr;
00496090      else
00496098          eax_15 = eax_14->vtable->DynamicCast(0xc);
00496098      
004960a9      this->m_pLocationStaticText = eax_15;
004960af      class UIElement* eax_16 = UIElement::GetChildRecursive(this, 0x1000057c);
004960b6      class UIElement_Text* eax_17;
004960b6      
004960b6      if (eax_16 == 0)
004960c6          eax_17 = nullptr;
004960b6      else
004960be          eax_17 = eax_16->vtable->DynamicCast(0xc);
004960be      
004960cf      this->m_pTimerStaticText = eax_17;
004960d5      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x10000577);
004960dc      class UIElement_Text* eax_19;
004960dc      
004960dc      if (eax_18 == 0)
004960ec          eax_19 = nullptr;
004960dc      else
004960e4          eax_19 = eax_18->vtable->DynamicCast(0xc);
004960e4      
004960f5      this->m_pDaysStaticText = eax_19;
004960fb      class UIElement* eax_20 = UIElement::GetChildRecursive(this, 0x10000579);
00496102      class UIElement_Text* eax_21;
00496102      
00496102      if (eax_20 == 0)
00496112          eax_21 = nullptr;
00496102      else
0049610a          eax_21 = eax_20->vtable->DynamicCast(0xc);
0049610a      
0049611b      this->m_pHoursStaticText = eax_21;
00496121      class UIElement* eax_22 = UIElement::GetChildRecursive(this, 0x1000057b);
00496128      class UIElement_Text* eax_23;
00496128      
00496128      if (eax_22 == 0)
00496138          eax_23 = nullptr;
00496128      else
00496130          eax_23 = eax_22->vtable->DynamicCast(0xc);
00496130      
00496141      this->m_pMinutesStaticText = eax_23;
00496147      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x10000570);
0049614e      class UIElement_Text* eax_25;
0049614e      
0049614e      if (eax_24 == 0)
0049615e          eax_25 = nullptr;
0049614e      else
00496156          eax_25 = eax_24->vtable->DynamicCast(0xc);
00496156      
00496162      this->m_pPageNumberStaticText = eax_25;
00496168      gmJournalUI::ShowEditableTimer(this);
00496171      UIListener::RegisterForGlobalMessage(this, 3);
0049617a      UIListener::RegisterForGlobalMessage(this, 0xb);
0049617f      g_JournalPanel = this;
00495f70  }

00496187                       90 90 90 90 90 90 90 90 90                                                         .........

00496190  void __fastcall gmJournalUI::ShowRunningTimer(class gmJournalUI* this)

00496190  {
00496190      class gmJournalUI* var_4 = this;
00496191      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00496197      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004961a1      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004961b1      PStringBase<unsigned short>::sprintf(&var_4, &gmJournalUI::`vftable'.RecvNotice_SetSelectedSpell);
004961bf      this->m_Info.m_TimerRunning = 1;
004961b6      this->m_pDaysEditBox->vtable->SetVisible(0);
004961cd      this->m_pDaysStaticText->vtable->SetVisible(0);
004961da      this->m_pHoursEditBox->vtable->SetVisible(0);
004961e7      this->m_pHoursStaticText->vtable->SetVisible(0);
004961f4      this->m_pMinutesEditBox->vtable->SetVisible(0);
00496201      this->m_pMinutesStaticText->vtable->SetVisible(0);
0049620e      this->m_pTimerStaticText->vtable->SetVisible(1);
00496226      UIElement_Text::SetText(this->m_pStartTimerButton, &var_4);
0049622d      gmJournalUI::UpdateRunningTimer(this);
00496236      void* __offset(gmJournalUI, -0x14) esi_2 = ((char*)var_4 - 0x14);
00496236      
00496249      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00496251          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00496190  }

00496256                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00496260  void __fastcall gmJournalUI::ResetLocation(class gmJournalUI* this)

00496260  {
00496263      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
00496263      
0049626c      if (eax == 0)
0049629e          return;
0049629e      
0049626f      this->m_Info.m_yCoord = 0f;
0049627e      *(uint32_t*)((char*)this->m_Info.m_yCoord)[4] = 0;
00496275      this->m_Info.m_xCoord = 0f;
00496283      *(uint32_t*)((char*)this->m_Info.m_xCoord)[4] = 0;
0049628f      this->m_Info.m_LocationSet = CPlayerSystem::InqPlayerCoords(eax, &this->m_Info.m_xCoord, &this->m_Info.m_yCoord);
00496298      /* tailcall */
00496298      return gmJournalUI::UpdateLocation(this);
00496260  }

0049629f                                                                                               90                                 .

004962a0  class PageInfo* __thiscall _STL::vector<PageInfo,_STL::allocator<PageInfo> >::erase(class _STL::vector<PageInfo,_STL::allocator<PageInfo> >* this, class PageInfo* arg2)

004962a0  {
004962a2      class PageInfo* result = arg2;
004962a8      class PageInfo* _M_finish = this->_M_finish;
004962a8      
004962b0      if (&result[1] != _M_finish)
004962bc          _STL::__copy(&result[1], _M_finish, result, &arg2, nullptr);
004962bc      
004962c7      class PageInfo* eax_1 = &this->_M_finish[-1];
004962cc      this->_M_finish = eax_1;
004962cf      PageInfo::~PageInfo(eax_1);
004962d8      return result;
004962a0  }

004962db                                                                                   90 90 90 90 90                             .....

004962e0  void __fastcall gmJournalUI::ClearCurrentPage(class gmJournalUI* this)

004962e0  {
004962e0      class gmJournalUI* var_4 = this;
004962e0      
004962ec      if (this->m_Loaded != 0)
004962ec      {
004962f2          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004962f7          var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00496300          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00496319          PageInfo::Clear(&(&g_JournalPages)[-5]._M_start[this->m_CurrentPage]);
00496326          PageInfo::Clear(&this->m_Info);
00496332          UIElement_Text::SetText(this->m_pLabelEditBox, &this->m_Info);
00496344          UIElement_Text::SetText(this->m_pTitleEditBox, &this->m_Info.m_Title);
00496356          UIElement_Text::SetText(this->m_pNotesEditBox, &this->m_Info.m_Notes);
00496361          int32_t m_Days = this->m_Info.m_Days;
0049636c          PStringBase<unsigned short>::sprintf(&var_4, &data_7a0184);
0049637f          UIElement_Text::SetText(this->m_pDaysEditBox, &var_4);
0049638a          int32_t m_Hours = this->m_Info.m_Hours;
00496395          PStringBase<unsigned short>::sprintf(&var_4, &data_7a0184);
004963a8          UIElement_Text::SetText(this->m_pHoursEditBox, &var_4);
004963b3          int32_t m_Minutes = this->m_Info.m_Minutes;
004963be          PStringBase<unsigned short>::sprintf(&var_4, &data_7a0184);
004963d1          UIElement_Text::SetText(this->m_pMinutesEditBox, &var_4);
004963d8          gmJournalUI::UpdateRunningTimer(this);
004963df          gmJournalUI::UpdateLocation(this);
004963e6          gmJournalUI::UpdatePageNumber(this);
004963e6          
004963f6          if (this->m_Info.m_TimerRunning == 0)
004963ff              gmJournalUI::ShowEditableTimer(this);
004963f6          else
004963f8              gmJournalUI::ShowRunningTimer(this);
004963f8          
00496408          void* __offset(gmJournalUI, -0x14) esi_2 = ((char*)var_4 - 0x14);
00496408          
0049641b          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00496423              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004962ec      }
004962e0  }

00496428                          90 90 90 90 90 90 90 90                                                          ........

00496430  void __thiscall gmJournalUI::GotoPage(class gmJournalUI* this, uint32_t const arg2)

00496430  {
00496430      class gmJournalUI* var_4 = this;
00496430      
0049643c      if (this->m_Loaded != 0)
0049643c      {
00496442          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00496447          var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00496450          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049645c          class PageInfo* _M_start = g_JournalPages._M_start;
0049645c          
0049646c          if (arg2 <= ((g_JournalPages._M_finish - _M_start) >> 6))
0049646c          {
00496485              PageInfo::operator=(&this->m_Info, &_M_start[(arg2 - 1)]);
0049648a              class UIElement_Text* m_pLabelEditBox = this->m_pLabelEditBox;
00496491              this->m_CurrentPage = arg2;
00496497              UIElement_Text::SetText(m_pLabelEditBox, &this->m_Info);
004964a9              UIElement_Text::SetText(this->m_pTitleEditBox, &this->m_Info.m_Title);
004964bb              UIElement_Text::SetText(this->m_pNotesEditBox, &this->m_Info.m_Notes);
004964c6              int32_t m_Days = this->m_Info.m_Days;
004964d1              PStringBase<unsigned short>::sprintf(&var_4, &data_7a0184);
004964e4              UIElement_Text::SetText(this->m_pDaysEditBox, &var_4);
004964ef              int32_t m_Hours = this->m_Info.m_Hours;
004964fa              PStringBase<unsigned short>::sprintf(&var_4, &data_7a0184);
0049650d              UIElement_Text::SetText(this->m_pHoursEditBox, &var_4);
00496518              int32_t m_Minutes = this->m_Info.m_Minutes;
00496523              PStringBase<unsigned short>::sprintf(&var_4, &data_7a0184);
00496536              UIElement_Text::SetText(this->m_pMinutesEditBox, &var_4);
0049653d              gmJournalUI::UpdateRunningTimer(this);
00496544              gmJournalUI::UpdateLocation(this);
0049654b              gmJournalUI::UpdatePageNumber(this);
0049654b              
0049655b              if (this->m_Info.m_TimerRunning == 0)
00496564                  gmJournalUI::ShowEditableTimer(this);
0049655b              else
0049655d                  gmJournalUI::ShowRunningTimer(this);
0049646c          }
0049646c          
0049656d          void* __offset(gmJournalUI, -0x14) esi_2 = ((char*)var_4 - 0x14);
0049656d          
00496580          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00496588              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049643c      }
00496430  }


00496590  void __fastcall gmJournalUI::Update(class gmJournalUI* this)

00496590  {
0049659b      if (this->m_Loaded == 0)
004965c8          return;
004965c8      
0049659d      gmJournalUI::UpdateRunningTimer(this);
004965a4      gmJournalUI::UpdateLocation(this);
004965ab      gmJournalUI::UpdatePageNumber(this);
004965ab      
004965bb      if (this->m_Info.m_TimerRunning == 0)
004965c2          /* tailcall */
004965c2          return gmJournalUI::ShowEditableTimer(this);
004965c2      
004965bd      /* tailcall */
004965bd      return gmJournalUI::ShowRunningTimer(this);
00496590  }

004965c9                             90 90 90 90 90 90 90                                                           .......

004965d0  void __thiscall gmJournalUI::DeletePage(class gmJournalUI* this, uint32_t const arg2)

004965d0  {
004965db      if (this->m_Loaded != 0)
004965db      {
004965e2          class PageInfo* _M_start_1 = g_JournalPages._M_start;
004965ee          int32_t eax_3 = ((g_JournalPages._M_finish - _M_start_1) >> 6);
004965ee          
004965f3          if (arg2 <= eax_3)
004965f3          {
004965f8              if (eax_3 <= 1)
004965f8              {
004965fc                  gmJournalUI::ClearCurrentPage(this);
00496602                  return;
004965f8              }
004965f8              
00496612              _STL::vector<PageInfo,_STL::allocator<PageInfo> >::erase(&g_JournalPages, &_M_start_1[(arg2 - 1)]);
0049661d              class PageInfo* _M_start = g_JournalPages._M_start;
00496628              int32_t i = 0;
00496628              
0049662c              if (((g_JournalPages._M_finish - _M_start) >> 6) > 0)
0049662c              {
0049662e                  int32_t edx_4 = 0;
0049662e                  
0049664c                  do
0049664c                  {
00496631                      i += 1;
00496632                      *(uint32_t*)(&_M_start->m_PageNumber + edx_4) = i;
0049663c                      _M_start = g_JournalPages._M_start;
00496647                      edx_4 += 0x40;
0049664c                  } while (i < ((g_JournalPages._M_finish - _M_start) >> 6));
0049662c              }
0049662c              
00496653              gmJournalUI::GotoPage(this, 1);
004965f3          }
004965db      }
004965d0  }

0049665c                                                                                      90 90 90 90                              ....

00496660  void __stdcall gmJournalUI::CreateJournalPath(class gmJournalUI* this @ ecx, class PStringBase<char> arg2, class PStringBase<char>* arg3)

00496660  {
0049666a      class PStringBase<char>* ebx = arg3;
0049666e      class PSRefBufferCharData<char>* m_charbuffer = ebx->m_charbuffer;
0049666e      
00496681      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
00496681      {
00496692          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0049669a              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0049669a          
0049669c          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004966a7          ebx->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004966a9          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00496681      }
00496681      
004966ab      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004966b2      uint32_t player_id;
004966b2      
004966b2      if (SmartBox::smartbox_1 == 0)
004966bc          player_id = 0;
004966b2      else
004966b4          player_id = SmartBox::smartbox_1->player_id;
004966b4      
004966d0      class PStringBase<char> var_8;
004966d0      PStringBase<char>::PStringBase<char>(&var_8, ACCWeenieObject::GetObjectName(player_id, NAME_SINGULAR, 0));
004966e1      class PStringBase<unsigned short> edi_2 = *(uint32_t*)Client::GetInstance()->vtable->GetWorldName();
004966e7      class PStringBase<unsigned short> var_4 = edi_2;
004966eb      InterlockedIncrement((edi_2 - 0x10));
004966f8      void* __return;
004966f8      PStringBase<unsigned short>::to_spstring(&var_4, &__return, 0);
004966fd      class PSRefBufferCharData<char>* m_charbuffer_1 = UserPreferences::sm_strDefaultFile.m_charbuffer;
00496702      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
0049670a      InterlockedIncrement(&m_charbuffer_1[-1]);
0049670c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00496711      arg3 = PStringBase<char>::s_NullBuffer_2;
00496719      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00496725      PSUtils::get_directory(&arg3, &m_charbuffer_2);
00496736      class PStringBase<char> var_2c_1 = var_8;
0049673b      void* __return_1 = __return;
0049673c      class PStringBase<char> var_34 = arg2;
0049673d      class PStringBase<char>* var_38 = arg3;
00496744      PStringBase<char>::sprintf(ebx, &gmJournalUI::`vftable'.RecvNotice_UpdateSpellComponents);
0049674d      void* __offset(PStringBase<char>, -0x14) esi_1 = &arg3[-5];
0049674d      
0049675f      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00496767          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00496767      
0049676d      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &m_charbuffer_2->m_data[0xffffffec];
0049676d      
0049677c      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00496784          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00496784      
0049678a      int32_t* esi_5 = ((char*)__return - 0x14);
0049678a      
00496799      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004967a1          **(uint32_t**)esi_5(1);
004967a1      
004967b2      if ((InterlockedDecrement((edi_2 - 0x10)) == 0 && edi_2 != 0x14))
004967ba          **(uint32_t**)(edi_2 - 0x14)(1);
004967ba      
004967c0      int32_t* esi_7 = (var_8 - 0x14);
004967c0      
004967cf      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
004967d7          **(uint32_t**)esi_7(1);
004967d7      
004967ec      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
004967f4          **(uint32_t**)(arg2 - 0x14)(1);
00496660  }


00496800  void __stdcall gmJournalUI::ReportInScroll(class gmJournalUI* this @ ecx, class PStringBase<char> arg2, uint32_t const arg3)

00496800  {
00496803      ClientUISystem::GetUISystem();
00496808      class PStringBase<char> edi = arg2;
0049682a      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, edi), &arg2, arg3, 1, 0);
00496839      int32_t* esi_3 = (arg2 - 0x14);
00496839      
00496848      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00496850          **(uint32_t**)esi_3(1);
00496850      
00496861      if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
00496869          **(uint32_t**)(edi - 0x14)(1);
00496800  }

00496871                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00496880  void __fastcall gmJournalUI::NewPage(class gmJournalUI* this)

00496880  {
0049688b      if (this->m_Loaded != 0)
0049688b      {
00496891          void var_40;
00496891          PageInfo::PageInfo(&var_40);
00496896          class PageInfo* _M_finish = g_JournalPages._M_finish;
004968ae          int32_t var_34_1 = ((((char*)_M_finish - g_JournalPages._M_start) >> 6) + 1);
004968b8          _STL::vector<PageInfo,_STL::allocator<PageInfo> >::insert(&g_JournalPages, _M_finish, &var_40);
004968c1          PageInfo::~PageInfo(&var_40);
0049688b      }
00496880  }

004968ca                                90 90 90 90 90 90                                                            ......

004968d0  enum UIElementMessageListenResult __thiscall gmJournalUI::ListenToElementMessage(class gmJournalUI* this, struct UIElementMessageInfo const* arg2)

004968d0  {
004968db      if (this->m_Loaded == 0)
004968e8          return UIElement::ListenToElementMessage(this, arg2);
004968e8      
00496900      if ((arg2->idMessage == 0x18 && (arg2->pElement == this && arg2->dwParam1 != 0)))
00496904          gmJournalUI::Update(this);
00496904      
0049690d      if (arg2->idMessage == 1)
0049692a          switch ((arg2->idElement - 0x10000565))
0049692a          {
00496933              case nullptr:
00496933              {
00496933                  gmJournalUI::SaveThisPage(this);
00496938                  uint32_t m_CurrentPage = this->m_CurrentPage;
00496938                  
00496941                  if (m_CurrentPage != 1)
0049694b                      gmJournalUI::GotoPage(this, (m_CurrentPage - 1));
00496933                  break;
00496933              }
0049695f              case 1:
0049695f              {
0049695f                  gmJournalUI::SaveThisPage(this);
0049695f                  
0049696d                  if (gmJournalUI::IsLastPage(this) == 0)
0049697b                      gmJournalUI::GotoPage(this, (this->m_CurrentPage + 1));
0049695f                  break;
0049695f              }
004969d8              case 2:
004969d8              {
004969d8                  gmJournalUI::SaveThisPage(this);
004969df                  gmJournalUI::NewPage(this);
004969f6                  gmJournalUI::GotoPage(this, ((g_JournalPages._M_finish - g_JournalPages._M_start) >> 6));
004969d8                  break;
004969d8              }
0049698f              case 0xa:
0049698f              {
0049698f                  gmJournalUI::SaveThisPage(this);
00496998                  gmJournalUI::GotoPage(this, 1);
0049698f                  break;
0049698f              }
004969ac              case 0xc:
004969ac              {
004969ac                  gmJournalUI::SaveThisPage(this);
004969c4                  gmJournalUI::GotoPage(this, ((g_JournalPages._M_finish - g_JournalPages._M_start) >> 6));
004969ac                  break;
004969ac              }
00496a0a              case 0xf:
00496a0a              {
00496a0a                  gmJournalUI::ResetLocation(this);
00496a0a                  break;
00496a0a              }
00496a1c              case 0x18:
00496a1c              {
00496a1c                  void* eax_7;
00496a1c                  eax_7 = this->m_Info.m_TimerRunning;
00496a1c                  
00496a26                  if (eax_7 == 0)
00496a26                  {
00496a55                      gmJournalUI::ResetTimer(this);
00496a60                      gmJournalUI::ShowRunningTimer(this);
00496a6f                      return UIElement::ListenToElementMessage(this, arg2);
00496a26                  }
00496a26                  
00496a28                  this->m_Info.m_TimerStamp = 0f;
00496a32                  *(uint32_t*)((char*)this->m_Info.m_TimerStamp)[4] = 0;
00496a3c                  this->m_Info.m_TimerRunning = 0;
00496a43                  gmJournalUI::ShowEditableTimer(this);
00496a1c                  break;
00496a1c              }
0049692a          }
0049692a      
00496a81      return UIElement::ListenToElementMessage(this, arg2);
004968d0  }

00496a84  uint32_t jump_table_496a84[0x8] = 
00496a84  {
00496a84      [0x0] =  0x00496931
00496a88      [0x1] =  0x0049695d
00496a8c      [0x2] =  0x004969d6
00496a90      [0x3] =  0x0049698d
00496a94      [0x4] =  0x004969aa
00496a98      [0x5] =  0x00496a08
00496a9c      [0x6] =  0x00496a1c
00496aa0      [0x7] =  0x00496a77
00496aa4  }
00496aa4  uint8_t lookup_table_496aa4[0x19] = 
00496aa4  {
00496aa4      [0x00] =  0x00
00496aa5      [0x01] =  0x01
00496aa6      [0x02] =  0x02
00496aa7      [0x03] =  0x07
00496aa8      [0x04] =  0x07
00496aa9      [0x05] =  0x07
00496aaa      [0x06] =  0x07
00496aab      [0x07] =  0x07
00496aac      [0x08] =  0x07
00496aad      [0x09] =  0x07
00496aae      [0x0a] =  0x03
00496aaf      [0x0b] =  0x07
00496ab0      [0x0c] =  0x04
00496ab1      [0x0d] =  0x07
00496ab2      [0x0e] =  0x07
00496ab3      [0x0f] =  0x05
00496ab4      [0x10] =  0x07
00496ab5      [0x11] =  0x07
00496ab6      [0x12] =  0x07
00496ab7      [0x13] =  0x07
00496ab8      [0x14] =  0x07
00496ab9      [0x15] =  0x07
00496aba      [0x16] =  0x07
00496abb      [0x17] =  0x07
00496abc      [0x18] =  0x06
00496abd  }

00496abd                                                                                         90 90 90                               ...

00496ac0  void __thiscall gmJournalUI::LoadPages(class gmJournalUI* this, class PStringBase<char> arg2)

00496ac0  {
00496ac6      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00496ad5      class PSRefBufferCharData<char>* var_85c = PStringBase<char>::s_NullBuffer_1;
00496ae3      class PStringBase<char> __return_2 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00496aeb      int32_t ebx = 0;
00496aef      int32_t* esi_3;
00496aef      
00496aef      if (this->m_Loaded == 0)
00496aef      {
00496afb          void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &var_85c->m_data[0xffffffec];
00496afb          
00496b0a          if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00496b12              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00496b12          
00496b1b          esi_3 = (arg2 - 0x14);
00496b1e          goto label_496bcd;
00496aef      }
00496aef      
00496b23      class PStringBase<char> __return_14 = arg2;
00496b2e      class PSRefBufferCharData<char>** var_87c_3 = &var_85c;
00496b2f      class PStringBase<char> __return = __return_2;
00496b36      __return = __return_14;
00496b38      InterlockedIncrement((__return_14 - 0x10));
00496b3c      gmJournalUI::CreateJournalPath(this, __return, var_87c_3);
00496b41      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00496b46      class PStringBase<char> PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00496b4e      int32_t var_860 = 0;
00496b52      int32_t var_854 = 0;
00496b5a      int32_t var_850_1 = 0;
00496b62      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00496b68      void (__thiscall** const var_87c_5)(class gmNoticeHandler* this) = &gmJournalUI::`vftable'.RecvNotice_UpdateToolbarSelectionDisplay;
00496b6d      __return = var_85c;
00496b6e      char var_865 = 0;
00496b79      int32_t edi_1 = fopen(__return, var_87c_5);
00496b84      bool cond:5_1;
00496b84      
00496b84      if (edi_1 == 0)
00496b84      {
00496b90          int32_t* esi_5 = (PStringBase<char>::s_NullBuffer_3 - 0x14);
00496b90          
00496b9f          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00496ba7              **(uint32_t**)esi_5(1);
00496ba7          
00496bad          void* __offset(PSRefBufferCharData<char>, -0x14) esi_7 = &var_85c->m_data[0xffffffec];
00496bad          
00496bbc          if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
00496bc4              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
00496bc4          
00496bc6          esi_3 = (__return_14 - 0x14);
00496bcd      label_496bcd:
00496bcd          
00496bd1          if (InterlockedDecrement(&esi_3[1]) == 0)
00496bd1          {
00496bd7              cond:5_1 = esi_3 == 0;
004971dd          label_4971dd:
004971dd              
004971dd              if (!(cond:5_1))
004971e5                  **(uint32_t**)esi_3(1);
00496bd1          }
00496bd1          
00496bd1          return;
00496b84      }
00496b84      
00496be4      int32_t* var_87c_11 = nullptr;
00496be9      __return = &var_865;
00496bea      class PageInfo* _M_finish = g_JournalPages._M_finish;
00496bf2      class PageInfo* eax_12 = _STL::__copy(_M_finish, _M_finish, g_JournalPages._M_start, __return, var_87c_11);
00496c05      _STL::__destroy_aux(eax_12, g_JournalPages._M_finish, &var_865);
00496c15      g_JournalPages._M_finish = eax_12;
00496c26      void var_834;
00496c26      
00496c26      if (fgets(&var_834, 0x834, edi_1) == 0)
00496c26      {
00497185      label_497185:
00497185          fclose(edi_1);
00497195          int32_t* esi_37 = (PStringBase<char>::s_NullBuffer_3 - 0x14);
00497195          
004971a7          if ((InterlockedDecrement(&esi_37[1]) == 0 && esi_37 != 0))
004971af              **(uint32_t**)esi_37(1);
004971af          
004971b5          void* __offset(PSRefBufferCharData<char>, -0x14) esi_39 = &var_85c->m_data[0xffffffec];
004971b5          
004971c4          if ((InterlockedDecrement(((char*)esi_39 + 4)) == 0 && esi_39 != 0))
004971cc              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_39) + -0x14)(1);
004971cc          
004971ce          esi_3 = (__return_14 - 0x14);
00496c26      }
00496c26      else
00496c26      {
00496c36          while (true)
00496c36          {
00496c36              void (__thiscall** const var_87c_12)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
00496c3b              __return = &var_834;
00496c3c              int32_t eax_15;
00496c3c              int32_t edx_5;
00496c3c              eax_15 = strtok(__return, var_87c_12);
00496c3c              
00496c43              if (eax_15 != 0)
00496c43              {
00496c4f                  if (var_865 == 0)
00496c4f                  {
00496c51                      void (__thiscall** const edi_2)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_ToggleChatEntry;
00496c56                      int32_t esi_9 = eax_15;
00496c58                      class PStringBase<char> i = 7;
00496c5d                      int32_t temp3_1 = edx_5;
00496c5d                      int32_t temp4_1 = edx_5;
00496c5d                      edx_5 = 0;
00496c5d                      bool c_1 = false;
00496c5d                      bool z_1 = temp3_1 == temp4_1;
00496c5d                      
00496c5f                      while (i != 0)
00496c5f                      {
00496c5f                          char temp7_1 = *(uint8_t*)esi_9;
00496c5f                          char temp8_1 = *(uint8_t*)edi_2;
00496c5f                          c_1 = temp7_1 < temp8_1;
00496c5f                          z_1 = temp7_1 == temp8_1;
00496c5f                          esi_9 += 1;
00496c5f                          edi_2 += 1;
00496c5f                          i -= 1;
00496c5f                          
00496c5f                          if (!(z_1))
00496c5f                              break;
00496c5f                      }
00496c5f                      
00496c61                      if (!(z_1))
00496c61                      {
00496c63                          bool c_2 = /* bool c_2 = unimplemented  {sbb edx, edx} */;
00496c65                          edx_5 = ((0 - 0) + 1);
00496c61                      }
00496c61                      
00496c6a                      if (edx_5 != 0)
00496c6a                      {
004971f4                          uint32_t var_87c_47 = 0x1a;
004971f6                          __return = i;
004971fe                          PStringBase<char>::PStringBase<char>(&__return, &gmJournalUI::`vftable'.RecvNotice_AddCharacterTitle);
00497207                          gmJournalUI::ReportInScroll(this, __return, var_87c_47);
00497211                          fclose(edi_1);
00497221                          int32_t* esi_41 = (PStringBase<char>::s_NullBuffer_3 - 0x14);
00497221                          
00497233                          if ((InterlockedDecrement(&esi_41[1]) == 0 && esi_41 != 0))
0049723b                              **(uint32_t**)esi_41(1);
0049723b                          
00497241                          void* __offset(PSRefBufferCharData<char>, -0x14) esi_43 = &var_85c->m_data[0xffffffec];
00497241                          
00497250                          if ((InterlockedDecrement(((char*)esi_43 + 4)) == 0 && esi_43 != 0))
00497258                              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_43) + -0x14)(1);
00497258                          
00497261                          esi_3 = (arg2 - 0x14);
0049724c                          break;
00496c6a                      }
00496c4f                  }
00496c4f                  
00496c70                  void (__thiscall** const edi_3)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_ToggleChatEntry;
00496c75                  int32_t esi_10 = eax_15;
00496c77                  int32_t i_1 = 7;
00496c7c                  int32_t edx_7 = 0;
00496c7c                  bool c_3 = false;
00496c7c                  bool z_2 = edx_5 == edx_5;
00496c7c                  
00496c7e                  while (i_1 != 0)
00496c7e                  {
00496c7e                      char temp5_1 = *(uint8_t*)esi_10;
00496c7e                      char temp6_1 = *(uint8_t*)edi_3;
00496c7e                      c_3 = temp5_1 < temp6_1;
00496c7e                      z_2 = temp5_1 == temp6_1;
00496c7e                      esi_10 += 1;
00496c7e                      edi_3 += 1;
00496c7e                      i_1 -= 1;
00496c7e                      
00496c7e                      if (!(z_2))
00496c7e                          break;
00496c7e                  }
00496c7e                  
00496c80                  if (!(z_2))
00496c80                  {
00496c82                      bool c_4 = /* bool c_4 = unimplemented  {sbb edx, edx} */;
00496c84                      edx_7 = ((0 - 0) + 1);
00496c80                  }
00496c80                  
00496c89                  if (edx_7 != 0)
00496c89                  {
00496cbb                      void (__thiscall** const edi_4)(class gmNoticeHandler* this, uint32_t, uint32_t) = &gmJournalUI::`vftable'.RecvNotice_StackSliderChanged;
00496cc0                      int32_t esi_11 = eax_15;
00496cc2                      int32_t i_2 = 7;
00496cc7                      class PStringBase<char> __return_3 = 0;
00496cc7                      bool c_5 = false;
00496cc7                      bool z_3 = edx_7 == edx_7;
00496cc7                      
00496cc9                      while (i_2 != 0)
00496cc9                      {
00496cc9                          char temp15_1 = *(uint8_t*)esi_11;
00496cc9                          char temp16_1 = *(uint8_t*)edi_4;
00496cc9                          c_5 = temp15_1 < temp16_1;
00496cc9                          z_3 = temp15_1 == temp16_1;
00496cc9                          esi_11 += 1;
00496cc9                          edi_4 += 1;
00496cc9                          i_2 -= 1;
00496cc9                          
00496cc9                          if (!(z_3))
00496cc9                              break;
00496cc9                      }
00496cc9                      
00496ccb                      if (!(z_3))
00496ccb                      {
00496ccd                          bool c_6 = /* bool c_6 = unimplemented  {sbb edx, edx} */;
00496ccf                          __return_3 = ((0 - 0) + 1);
00496ccb                      }
00496ccb                      
00496cd4                      if (__return_3 != 0)
00496cd4                      {
00496cf7                          void (__thiscall** const edi_5)(class gmNoticeHandler* this, uint32_t, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_SetPanelVisibility;
00496cfc                          int32_t esi_12 = eax_15;
00496cfe                          int32_t i_3 = 7;
00496d03                          class PStringBase<char> __return_4 = 0;
00496d03                          bool c_7 = false;
00496d03                          bool z_4 = __return_3 == __return_3;
00496d03                          
00496d05                          while (i_3 != 0)
00496d05                          {
00496d05                              char temp21_1 = *(uint8_t*)esi_12;
00496d05                              char temp22_1 = *(uint8_t*)edi_5;
00496d05                              c_7 = temp21_1 < temp22_1;
00496d05                              z_4 = temp21_1 == temp22_1;
00496d05                              esi_12 += 1;
00496d05                              edi_5 += 1;
00496d05                              i_3 -= 1;
00496d05                              
00496d05                              if (!(z_4))
00496d05                                  break;
00496d05                          }
00496d05                          
00496d07                          if (!(z_4))
00496d07                          {
00496d09                              bool c_8 = /* bool c_8 = unimplemented  {sbb edx, edx} */;
00496d0b                              __return_4 = ((0 - 0) + 1);
00496d07                          }
00496d07                          
00496d10                          if (__return_4 != 0)
00496d10                          {
00496d7a                              void (__thiscall** const edi_6)(class gmNoticeHandler* this, uint32_t, class StringInfo const*) = &gmJournalUI::`vftable'.RecvNotice_SetChatWindowTitle;
00496d7f                              int32_t esi_18 = eax_15;
00496d81                              int32_t i_4 = 7;
00496d86                              class PStringBase<char> __return_5 = 0;
00496d86                              bool c_9 = false;
00496d86                              bool z_5 = __return_4 == __return_4;
00496d86                              
00496d88                              while (i_4 != 0)
00496d88                              {
00496d88                                  char temp27_1 = *(uint8_t*)esi_18;
00496d88                                  char temp28_1 = *(uint8_t*)edi_6;
00496d88                                  c_9 = temp27_1 < temp28_1;
00496d88                                  z_5 = temp27_1 == temp28_1;
00496d88                                  esi_18 += 1;
00496d88                                  edi_6 += 1;
00496d88                                  i_4 -= 1;
00496d88                                  
00496d88                                  if (!(z_5))
00496d88                                      break;
00496d88                              }
00496d88                              
00496d8a                              if (!(z_5))
00496d8a                              {
00496d8c                                  bool c_10 = /* bool c_10 = unimplemented  {sbb edx, edx} */;
00496d8e                                  __return_5 = ((0 - 0) + 1);
00496d8a                              }
00496d8a                              
00496d93                              if (__return_5 != 0)
00496d93                              {
00496ddd                                  void (__thiscall** const edi_7)(class gmNoticeHandler* this, class PStringBase<char> const*) = &gmJournalUI::`vftable'.RecvNotice_SaveUI;
00496de2                                  int32_t esi_22 = eax_15;
00496de4                                  int32_t i_5 = 7;
00496de9                                  class PStringBase<char> __return_6 = 0;
00496de9                                  bool c_11 = false;
00496de9                                  bool z_6 = __return_5 == __return_5;
00496de9                                  
00496deb                                  while (i_5 != 0)
00496deb                                  {
00496deb                                      char temp33_1 = *(uint8_t*)esi_22;
00496deb                                      char temp34_1 = *(uint8_t*)edi_7;
00496deb                                      c_11 = temp33_1 < temp34_1;
00496deb                                      z_6 = temp33_1 == temp34_1;
00496deb                                      esi_22 += 1;
00496deb                                      edi_7 += 1;
00496deb                                      i_5 -= 1;
00496deb                                      
00496deb                                      if (!(z_6))
00496deb                                          break;
00496deb                                  }
00496deb                                  
00496ded                                  if (!(z_6))
00496ded                                  {
00496def                                      bool c_12 = /* bool c_12 = unimplemented  {sbb edx, edx} */;
00496df1                                      __return_6 = ((0 - 0) + 1);
00496ded                                  }
00496ded                                  
00496df6                                  if (__return_6 != 0)
00496df6                                  {
00496e85                                      void (__thiscall** const edi_8)(class gmNoticeHandler* this, class CACQualities const*, class CPlayerModule const*) = &gmJournalUI::`vftable'.RecvNotice_PlayerDescReceived;
00496e8a                                      int32_t esi_26 = eax_15;
00496e8c                                      int32_t i_6 = 7;
00496e91                                      class PStringBase<char> __return_7 = 0;
00496e91                                      bool c_13 = false;
00496e91                                      bool z_7 = __return_6 == __return_6;
00496e91                                      
00496e93                                      while (i_6 != 0)
00496e93                                      {
00496e93                                          char temp39_1 = *(uint8_t*)esi_26;
00496e93                                          char temp40_1 = *(uint8_t*)edi_8;
00496e93                                          c_13 = temp39_1 < temp40_1;
00496e93                                          z_7 = temp39_1 == temp40_1;
00496e93                                          esi_26 += 1;
00496e93                                          edi_8 += 1;
00496e93                                          i_6 -= 1;
00496e93                                          
00496e93                                          if (!(z_7))
00496e93                                              break;
00496e93                                      }
00496e93                                      
00496e95                                      if (!(z_7))
00496e95                                      {
00496e97                                          bool c_14 = /* bool c_14 = unimplemented  {sbb edx, edx} */;
00496e99                                          __return_7 = ((0 - 0) + 1);
00496e95                                      }
00496e95                                      
00496e9e                                      if (__return_7 != 0)
00496e9e                                      {
00496edd                                          void (__thiscall** const edi_9)(class gmNoticeHandler* this, uint32_t) = &gmJournalUI::`vftable'.RecvNotice_NewParentContainer;
00496ee2                                          int32_t esi_27 = eax_15;
00496ee4                                          int32_t i_7 = 7;
00496ee9                                          class PStringBase<char> __return_8 = 0;
00496ee9                                          bool c_15 = false;
00496ee9                                          bool z_8 = __return_7 == __return_7;
00496ee9                                          
00496eeb                                          while (i_7 != 0)
00496eeb                                          {
00496eeb                                              char temp45_1 = *(uint8_t*)esi_27;
00496eeb                                              char temp46_1 = *(uint8_t*)edi_9;
00496eeb                                              c_15 = temp45_1 < temp46_1;
00496eeb                                              z_8 = temp45_1 == temp46_1;
00496eeb                                              esi_27 += 1;
00496eeb                                              edi_9 += 1;
00496eeb                                              i_7 -= 1;
00496eeb                                              
00496eeb                                              if (!(z_8))
00496eeb                                                  break;
00496eeb                                          }
00496eeb                                          
00496eed                                          if (!(z_8))
00496eed                                          {
00496eef                                              bool c_16 = /* bool c_16 = unimplemented  {sbb edx, edx} */;
00496ef1                                              __return_8 = ((0 - 0) + 1);
00496eed                                          }
00496eed                                          
00496ef6                                          if (__return_8 != 0)
00496ef6                                          {
00496f35                                              void (__thiscall** const edi_10)(class gmNoticeHandler* this, class PStringBase<char> const*) = &gmJournalUI::`vftable'.RecvNotice_LoadUI;
00496f3a                                              int32_t esi_28 = eax_15;
00496f3c                                              int32_t i_8 = 7;
00496f41                                              class PStringBase<char> __return_9 = 0;
00496f41                                              bool c_17 = false;
00496f41                                              bool z_9 = __return_8 == __return_8;
00496f41                                              
00496f43                                              while (i_8 != 0)
00496f43                                              {
00496f43                                                  char temp51_1 = *(uint8_t*)esi_28;
00496f43                                                  char temp52_1 = *(uint8_t*)edi_10;
00496f43                                                  c_17 = temp51_1 < temp52_1;
00496f43                                                  z_9 = temp51_1 == temp52_1;
00496f43                                                  esi_28 += 1;
00496f43                                                  edi_10 += 1;
00496f43                                                  i_8 -= 1;
00496f43                                                  
00496f43                                                  if (!(z_9))
00496f43                                                      break;
00496f43                                              }
00496f43                                              
00496f45                                              if (!(z_9))
00496f45                                              {
00496f47                                                  bool c_18 = /* bool c_18 = unimplemented  {sbb edx, edx} */;
00496f49                                                  __return_9 = ((0 - 0) + 1);
00496f45                                              }
00496f45                                              
00496f4e                                              if (__return_9 != 0)
00496f4e                                              {
00496f8d                                                  void (__thiscall** const edi_11)(class gmNoticeHandler* this, uint32_t, uint32_t) = &gmJournalUI::`vftable'.RecvNotice_FullMergingItem;
00496f92                                                  int32_t esi_29 = eax_15;
00496f94                                                  int32_t i_9 = 7;
00496f99                                                  class PStringBase<char> __return_10 = 0;
00496f99                                                  bool c_19 = false;
00496f99                                                  bool z_10 = __return_9 == __return_9;
00496f99                                                  
00496f9b                                                  while (i_9 != 0)
00496f9b                                                  {
00496f9b                                                      char temp57_1 = *(uint8_t*)esi_29;
00496f9b                                                      char temp58_1 = *(uint8_t*)edi_11;
00496f9b                                                      c_19 = temp57_1 < temp58_1;
00496f9b                                                      z_10 = temp57_1 == temp58_1;
00496f9b                                                      esi_29 += 1;
00496f9b                                                      edi_11 += 1;
00496f9b                                                      i_9 -= 1;
00496f9b                                                      
00496f9b                                                      if (!(z_10))
00496f9b                                                          break;
00496f9b                                                  }
00496f9b                                                  
00496f9d                                                  if (!(z_10))
00496f9d                                                  {
00496f9f                                                      bool c_20 = /* bool c_20 = unimplemented  {sbb edx, edx} */;
00496fa1                                                      __return_10 = ((0 - 0) + 1);
00496f9d                                                  }
00496f9d                                                  
00496fa6                                                  if (__return_10 != 0)
00496fa6                                                  {
00496ff7                                                      void (__thiscall** const edi_13)(class gmNoticeHandler* this, uint32_t, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_EnableChatTargetSelection;
00496ffc                                                      int32_t esi_31 = eax_15;
00496ffe                                                      int32_t i_10 = 7;
00497003                                                      class PStringBase<char> __return_11 = 0;
00497003                                                      bool c_23 = false;
00497003                                                      bool z_12 = __return_10 == __return_10;
00497003                                                      
00497005                                                      while (i_10 != 0)
00497005                                                      {
00497005                                                          char temp65_1 = *(uint8_t*)esi_31;
00497005                                                          char temp66_1 = *(uint8_t*)edi_13;
00497005                                                          c_23 = temp65_1 < temp66_1;
00497005                                                          z_12 = temp65_1 == temp66_1;
00497005                                                          esi_31 += 1;
00497005                                                          edi_13 += 1;
00497005                                                          i_10 -= 1;
00497005                                                          
00497005                                                          if (!(z_12))
00497005                                                              break;
00497005                                                      }
00497005                                                      
00497007                                                      if (!(z_12))
00497007                                                      {
00497009                                                          bool c_24 = /* bool c_24 = unimplemented  {sbb edx, edx} */;
0049700b                                                          __return_11 = ((0 - 0) + 1);
00497007                                                      }
00497007                                                      
00497010                                                      if (__return_11 != 0)
00497010                                                      {
0049704e                                                          void (__thiscall** const edi_14)(class gmNoticeHandler* this) = &gmJournalUI::`vftable'.RecvNotice_SkillAdvancementClassChanged;
00497053                                                          int32_t esi_32 = eax_15;
00497055                                                          int32_t i_11 = 7;
0049705a                                                          class PStringBase<char> __return_12 = 0;
0049705a                                                          bool c_25 = false;
0049705a                                                          bool z_13 = __return_11 == __return_11;
0049705a                                                          
0049705c                                                          while (i_11 != 0)
0049705c                                                          {
0049705c                                                              char temp75_1 = *(uint8_t*)esi_32;
0049705c                                                              char temp76_1 = *(uint8_t*)edi_14;
0049705c                                                              c_25 = temp75_1 < temp76_1;
0049705c                                                              z_13 = temp75_1 == temp76_1;
0049705c                                                              esi_32 += 1;
0049705c                                                              edi_14 += 1;
0049705c                                                              i_11 -= 1;
0049705c                                                              
0049705c                                                              if (!(z_13))
0049705c                                                                  break;
0049705c                                                          }
0049705c                                                          
0049705e                                                          if (!(z_13))
0049705e                                                          {
00497060                                                              bool c_26 = /* bool c_26 = unimplemented  {sbb edx, edx} */;
00497062                                                              __return_12 = ((0 - 0) + 1);
0049705e                                                          }
0049705e                                                          
00497067                                                          if (__return_12 != 0)
00497067                                                          {
004970a5                                                              void (__thiscall** const edi_15)(class gmNoticeHandler* this, uint32_t) = &gmJournalUI::`vftable'.RecvNotice_TradeAnItemForDummies;
004970aa                                                              int32_t esi_33 = eax_15;
004970ac                                                              int32_t i_12 = 7;
004970b1                                                              class PStringBase<char> __return_13 = 0;
004970b1                                                              bool c_27 = false;
004970b1                                                              bool z_14 = __return_12 == __return_12;
004970b1                                                              
004970b3                                                              while (i_12 != 0)
004970b3                                                              {
004970b3                                                                  char temp81_1 = *(uint8_t*)esi_33;
004970b3                                                                  char temp82_1 = *(uint8_t*)edi_15;
004970b3                                                                  c_27 = temp81_1 < temp82_1;
004970b3                                                                  z_14 = temp81_1 == temp82_1;
004970b3                                                                  esi_33 += 1;
004970b3                                                                  edi_15 += 1;
004970b3                                                                  i_12 -= 1;
004970b3                                                                  
004970b3                                                                  if (!(z_14))
004970b3                                                                      break;
004970b3                                                              }
004970b3                                                              
004970b5                                                              if (!(z_14))
004970b5                                                              {
004970b7                                                                  bool c_28 = /* bool c_28 = unimplemented  {sbb edx, edx} */;
004970b9                                                                  __return_13 = ((0 - 0) + 1);
004970b5                                                              }
004970b5                                                              
004970be                                                              if (__return_13 != 0)
004970be                                                              {
0049710a                                                                  int32_t esi_35 = eax_15;
0049710c                                                                  void (__thiscall** const edi_17)(class gmNoticeHandler* this, uint32_t, uint32_t) = &gmJournalUI::`vftable'.RecvNotice_RemoveItemFromTrade;
00497111                                                                  int32_t i_13 = 7;
00497116                                                                  class PStringBase<char> __return_1 = 0;
00497116                                                                  bool c_31 = false;
00497116                                                                  bool z_16 = eax_15 == eax_15;
00497116                                                                  
00497118                                                                  while (i_13 != 0)
00497118                                                                  {
00497118                                                                      char temp89_1 = *(uint8_t*)esi_35;
00497118                                                                      char temp90_1 = *(uint8_t*)edi_17;
00497118                                                                      c_31 = temp89_1 < temp90_1;
00497118                                                                      z_16 = temp89_1 == temp90_1;
00497118                                                                      esi_35 += 1;
00497118                                                                      edi_17 += 1;
00497118                                                                      i_13 -= 1;
00497118                                                                      
00497118                                                                      if (!(z_16))
00497118                                                                          break;
00497118                                                                  }
00497118                                                                  
0049711a                                                                  if (!(z_16))
0049711a                                                                  {
0049711c                                                                      bool c_32 = /* bool c_32 = unimplemented  {sbb eax, eax} */;
0049711e                                                                      __return_1 = ((0 - 0) + 1);
0049711a                                                                  }
0049711a                                                                  
00497123                                                                  if (__return_1 == 0)
00497123                                                                  {
00497125                                                                      void (__thiscall** const var_87c_38)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
0049712a                                                                      __return = __return_1;
0049712a                                                                      
00497144                                                                      if (sscanf(strtok(__return, var_87c_38), &data_79434c, &var_854) == 1)
0049714a                                                                          g_JournalPages._M_start[ebx].m_TimerStamp = ((double)((long double)var_854));
00497123                                                                  }
004970be                                                              }
004970be                                                              else
004970be                                                              {
004970c0                                                                  void (__thiscall** const var_87c_37)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
004970c5                                                                  __return = __return_13;
004970c6                                                                  int32_t eax_47 = strtok(__return, var_87c_37);
004970cb                                                                  int32_t esi_34 = eax_47;
004970cd                                                                  void (__thiscall** const edi_16)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = &gmJournalUI::`vftable'.RecvNotice_FillComponentBuyList;
004970d2                                                                  int32_t i_14 = 5;
004970d7                                                                  int32_t eax_48 = 0;
004970d7                                                                  bool c_29 = false;
004970d7                                                                  bool z_15 = eax_47 == eax_47;
004970d7                                                                  
004970d9                                                                  while (i_14 != 0)
004970d9                                                                  {
004970d9                                                                      char temp91_1 = *(uint8_t*)esi_34;
004970d9                                                                      char temp92_1 = *(uint8_t*)edi_16;
004970d9                                                                      c_29 = temp91_1 < temp92_1;
004970d9                                                                      z_15 = temp91_1 == temp92_1;
004970d9                                                                      esi_34 += 1;
004970d9                                                                      edi_16 += 1;
004970d9                                                                      i_14 -= 1;
004970d9                                                                      
004970d9                                                                      if (!(z_15))
004970d9                                                                          break;
004970d9                                                                  }
004970d9                                                                  
004970db                                                                  if (!(z_15))
004970db                                                                  {
004970dd                                                                      bool c_30 = /* bool c_30 = unimplemented  {sbb eax, eax} */;
004970df                                                                      eax_48 = ((0 - 0) + 1);
004970db                                                                  }
004970db                                                                  
004970e4                                                                  if (eax_48 != 0)
004970f8                                                                      g_JournalPages._M_start[ebx].m_TimerRunning = 0;
004970e4                                                                  else
004970e6                                                                      g_JournalPages._M_start[ebx].m_TimerRunning = 1;
004970be                                                              }
00497067                                                          }
00497067                                                          else
00497067                                                          {
00497069                                                              void (__thiscall** const var_87c_36)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
0049706e                                                              __return = __return_12;
0049706e                                                              
00497088                                                              if (sscanf(strtok(__return, var_87c_36), &data_79434c, &var_854) == 1)
00497092                                                                  g_JournalPages._M_start[ebx].m_yCoord = ((double)((long double)var_854));
00497067                                                          }
00497010                                                      }
00497010                                                      else
00497010                                                      {
00497012                                                          void (__thiscall** const var_87c_35)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
00497017                                                          __return = __return_11;
00497017                                                          
00497031                                                          if (sscanf(strtok(__return, var_87c_35), &data_79434c, &var_854) == 1)
0049703b                                                              g_JournalPages._M_start[ebx].m_xCoord = ((double)((long double)var_854));
00497010                                                      }
00496fa6                                                  }
00496fa6                                                  else
00496fa6                                                  {
00496fa8                                                      void (__thiscall** const var_87c_34)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
00496fad                                                      __return = __return_10;
00496fae                                                      int32_t eax_37 = strtok(__return, var_87c_34);
00496fb3                                                      int32_t esi_30 = eax_37;
00496fb5                                                      void (__thiscall** const edi_12)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = &gmJournalUI::`vftable'.RecvNotice_FillComponentBuyList;
00496fba                                                      int32_t i_15 = 5;
00496fbf                                                      int32_t eax_38 = 0;
00496fbf                                                      bool c_21 = false;
00496fbf                                                      bool z_11 = eax_37 == eax_37;
00496fbf                                                      
00496fc1                                                      while (i_15 != 0)
00496fc1                                                      {
00496fc1                                                          char temp67_1 = *(uint8_t*)esi_30;
00496fc1                                                          char temp68_1 = *(uint8_t*)edi_12;
00496fc1                                                          c_21 = temp67_1 < temp68_1;
00496fc1                                                          z_11 = temp67_1 == temp68_1;
00496fc1                                                          esi_30 += 1;
00496fc1                                                          edi_12 += 1;
00496fc1                                                          i_15 -= 1;
00496fc1                                                          
00496fc1                                                          if (!(z_11))
00496fc1                                                              break;
00496fc1                                                      }
00496fc1                                                      
00496fc3                                                      if (!(z_11))
00496fc3                                                      {
00496fc5                                                          bool c_22 = /* bool c_22 = unimplemented  {sbb eax, eax} */;
00496fc7                                                          eax_38 = ((0 - 0) + 1);
00496fc3                                                      }
00496fc3                                                      
00496fcc                                                      if (eax_38 != 0)
00496fe2                                                          g_JournalPages._M_start[ebx].m_LocationSet = 0;
00496fcc                                                      else
00496fce                                                          g_JournalPages._M_start[ebx].m_LocationSet = 1;
00496fa6                                                  }
00496f4e                                              }
00496f4e                                              else
00496f4e                                              {
00496f50                                                  void (__thiscall** const var_87c_33)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
00496f55                                                  __return = __return_9;
00496f55                                                  
00496f6f                                                  if (sscanf(strtok(__return, var_87c_33), &data_794344, &var_860) == 1)
00496f79                                                      g_JournalPages._M_start[ebx].m_Minutes = var_860;
00496f4e                                              }
00496ef6                                          }
00496ef6                                          else
00496ef6                                          {
00496ef8                                              void (__thiscall** const var_87c_32)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
00496efd                                              __return = __return_8;
00496efd                                              
00496f17                                              if (sscanf(strtok(__return, var_87c_32), &data_794344, &var_860) == 1)
00496f21                                                  g_JournalPages._M_start[ebx].m_Hours = var_860;
00496ef6                                          }
00496e9e                                      }
00496e9e                                      else
00496e9e                                      {
00496ea0                                          void (__thiscall** const var_87c_31)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
00496ea5                                          __return = __return_7;
00496ea5                                          
00496ebf                                          if (sscanf(strtok(__return, var_87c_31), &data_794344, &var_860) == 1)
00496ec9                                              g_JournalPages._M_start[ebx].m_Days = var_860;
00496e9e                                      }
00496df6                                  }
00496df6                                  else
00496df6                                  {
00496dfc                                      void (__thiscall** const var_87c_24)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_SetFramerateDisplay;
00496e01                                      __return = __return_6;
00496e0c                                      PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_3, strtok(__return, var_87c_24));
00496e1a                                      void var_84c;
00496e1a                                      PStringBase<char>::PStringBase<char>(&var_84c, &data_794508);
00496e28                                      void var_848;
00496e28                                      PStringBase<char>::PStringBase<char>(&var_848, &gmJournalUI::`vftable'.RecvNotice_RefreshOptionsPanel);
00496e31                                      class PStringBase<char>* var_87c_28 = &var_84c;
00496e36                                      __return = &var_848;
00496e3b                                      PStringBase<char>::replace(&PStringBase<char>::s_NullBuffer_3, __return, var_87c_28);
00496e44                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_848);
00496e4d                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_84c);
00496e5e                                      uint16_t var_87c_29 = 0;
00496e64                                      void var_838;
00496e64                                      __return = &var_838;
00496e72                                      PStringBase<unsigned short>::operator=(&g_JournalPages._M_start[ebx].m_Notes, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_3, __return, var_87c_29));
00496e7b                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_838);
00496df6                                  }
00496d93                              }
00496d93                              else
00496d93                              {
00496d95                                  void (__thiscall** const var_87c_20)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_SetFramerateDisplay;
00496d9a                                  __return = __return_5;
00496da5                                  PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_3, strtok(__return, var_87c_20));
00496db6                                  uint16_t var_87c_22 = 0;
00496dbc                                  void var_840;
00496dbc                                  __return = &var_840;
00496dca                                  PStringBase<unsigned short>::operator=(&g_JournalPages._M_start[ebx].m_Title, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_3, __return, var_87c_22));
00496dd3                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_840);
00496d93                              }
00496d10                          }
00496d10                          else
00496d10                          {
00496d12                              void (__thiscall** const var_87c_14)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_SetFramerateDisplay;
00496d17                              __return = __return_4;
00496d22                              PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_3, strtok(__return, var_87c_14));
00496d34                              uint16_t var_87c_16 = 0;
00496d3a                              void* var_83c;
00496d3a                              __return = &var_83c;
00496d47                              PStringBase<unsigned short>::operator=(&g_JournalPages._M_start[ebx], PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_3, __return, var_87c_16));
00496d50                              int32_t* esi_17 = ((char*)var_83c - 0x14);
00496d50                              
00496d67                              if ((InterlockedDecrement(&esi_17[1]) == 0 && esi_17 != 0))
00496d73                                  **(uint32_t**)esi_17(1);
00496d10                          }
00496cd4                      }
00496cd4                      else
00496cd4                      {
00496cd6                          void (__thiscall** const var_87c_13)(class gmNoticeHandler* this, uint8_t) = &gmJournalUI::`vftable'.RecvNotice_UpdateRadarVisibility;
00496cdb                          __return = __return_3;
00496ce9                          sscanf(strtok(__return, var_87c_13), &data_794344, &var_860);
00496cd4                      }
00496c89                  }
00496c89                  else
00496c89                  {
00496c8f                      gmJournalUI::NewPage(this);
00496c9a                      class PageInfo* _M_start = g_JournalPages._M_start;
00496ca4                      ebx = (((g_JournalPages._M_finish - _M_start) >> 6) - 1);
00496cad                      _M_start[ebx].m_PageNumber = (ebx + 1);
00496cb1                      var_865 = 1;
00496c89                  }
00496c43              }
00496c43              
00497162              __return = 0x834;
00497162              
00497173              if (fgets(&var_834, __return, edi_1) == 0)
00497173              {
0049717d                  __return_14 = arg2;
0049717d                  goto label_497185;
00497173              }
00496c36          }
00496c26      }
00496c26      
004971d9      if (InterlockedDecrement(&esi_3[1]) == 0)
004971d9      {
004971db          cond:5_1 = esi_3 == 0;
004971db          goto label_4971dd;
004971d9      }
00496ac0  }

00497269                             90 90 90 90 90 90 90                                                           .......

00497270  void __thiscall gmJournalUI::SavePages(class gmJournalUI* this, class PStringBase<char> arg2)

00497270  {
00497273      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00497282      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_1;
0049728c      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0049728e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00497293      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0049729b      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0049729d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
004972a2      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
004972aa      int32_t ecx = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
004972b4      int32_t* esi_8;
004972b4      
004972b4      if (this->m_Loaded != 0)
004972b4      {
0049731f          class PStringBase<char> ebx_1 = arg2;
00497328          int32_t var_40_1 = ecx;
00497331          InterlockedIncrement((ebx_1 - 0x10));
00497335          gmJournalUI::CreateJournalPath(this, ebx_1, &PStringBase<char>::s_NullBuffer_6);
0049734c          int32_t edi_1 = fopen(PStringBase<char>::s_NullBuffer_6, &data_7945dc);
00497353          void* __offset(PSRefBufferCharData<char>, -0x10) var_3c_8;
00497353          void* __offset(PSRefBufferCharData<char>, -0x14) esi_12;
00497353          
00497353          if (edi_1 != 0)
00497353          {
004973ad          label_4973ad:
004973ad              int32_t var_14_1 = 0;
004973ad              
004973b5              if (((g_JournalPages._M_finish - g_JournalPages._M_start) >> 6) > 0)
004973b5              {
004973c1                  int32_t esi_13 = 0;
0049773d                  bool cond:3_1;
0049773d                  
0049773d                  do
0049773d                  {
004973cd                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<NEWP>\n");
004973d2                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_4;
004973df                      fwrite(PStringBase<char>::s_NullBuffer_8, 1, (PStringBase<char>::s_NullBuffer_8->m_data[-4] - 1), edi_1);
004973f3                      class PStringBase<char> __return;
004973f3                      PStringBase<unsigned short>::to_spstring((g_JournalPages._M_start + esi_13), &__return, 0);
004973f8                      class PStringBase<char> __return_3 = __return;
004973fc                      class PStringBase<char> __return_6 = __return_3;
00497407                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<LABE> %s\n");
00497407                      
00497422                      if ((InterlockedDecrement((__return_3 - 0x10)) == 0 && __return_3 != 0x14))
0049742b                          **(uint32_t**)(__return_3 - 0x14)(1);
0049742b                      
0049742d                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_4;
0049743a                      fwrite(PStringBase<char>::s_NullBuffer_9, 1, (PStringBase<char>::s_NullBuffer_9->m_data[-4] - 1), edi_1);
0049744f                      class PStringBase<char> __return_1;
0049744f                      PStringBase<unsigned short>::to_spstring((&g_JournalPages._M_start->m_Title + esi_13), &__return_1, 0);
00497454                      class PStringBase<char> __return_4 = __return_1;
00497458                      class PStringBase<char> __return_7 = __return_4;
00497463                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<TITL> %s\n");
00497463                      
0049747e                      if ((InterlockedDecrement((__return_4 - 0x10)) == 0 && __return_4 != 0x14))
00497487                          **(uint32_t**)(__return_4 - 0x14)(1);
00497487                      
00497489                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_4;
00497496                      fwrite(PStringBase<char>::s_NullBuffer_10, 1, (PStringBase<char>::s_NullBuffer_10->m_data[-4] - 1), edi_1);
004974ab                      class PStringBase<char> __return_2;
004974ab                      PStringBase<unsigned short>::to_spstring((&g_JournalPages._M_start->m_Notes + esi_13), &__return_2, 0);
004974b0                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_5;
004974b4                      class PStringBase<char> __return_5 = __return_2;
004974b4                      
004974ba                      if (PStringBase<char>::s_NullBuffer_11 != __return_5)
004974ba                      {
004974d7                          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_11[-1]) == 0 && PStringBase<char>::s_NullBuffer_11 != 0x14))
004974dd                              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_11 + -0x14)(1);
004974dd                          
004974e3                          PStringBase<char>::s_NullBuffer_5 = __return_5;
004974e7                          InterlockedIncrement((__return_5 - 0x10));
004974ba                      }
004974ba                      
00497500                      if ((InterlockedDecrement((__return_5 - 0x10)) == 0 && __return_5 != 0x14))
00497509                          **(uint32_t**)(__return_5 - 0x14)(1);
00497509                      
00497514                      class PStringBase<char> var_18;
00497514                      PStringBase<char>::PStringBase<char>(&var_18, &gmJournalUI::`vftable'.RecvNotice_RefreshOptionsPanel);
00497522                      class PStringBase<char> var_1c;
00497522                      PStringBase<char>::PStringBase<char>(&var_1c, &data_794508);
00497535                      PStringBase<char>::replace(&PStringBase<char>::s_NullBuffer_5, &var_1c, &var_18);
0049753e                      int32_t* ebp_5 = (var_1c - 0x14);
0049753e                      
00497551                      if ((InterlockedDecrement(&ebp_5[1]) == 0 && ebp_5 != 0))
0049755a                          **(uint32_t**)ebp_5(1);
0049755a                      
00497560                      int32_t* ebp_7 = (var_18 - 0x14);
00497560                      
00497573                      if ((InterlockedDecrement(&ebp_7[1]) == 0 && ebp_7 != 0))
0049757c                          **(uint32_t**)ebp_7(1);
0049757c                      
00497582                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_5;
0049758d                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<NOTE> %s\n");
00497592                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_4;
0049759f                      fwrite(PStringBase<char>::s_NullBuffer_12, 1, (PStringBase<char>::s_NullBuffer_12->m_data[-4] - 1), edi_1);
004975aa                      int32_t var_58_1 = *(uint32_t*)(&g_JournalPages._M_start->m_Days + esi_13);
004975b5                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<DAYS> %d\n");
004975ba                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_13 = PStringBase<char>::s_NullBuffer_4;
004975c7                      fwrite(PStringBase<char>::s_NullBuffer_13, 1, (PStringBase<char>::s_NullBuffer_13->m_data[-4] - 1), edi_1);
004975d3                      int32_t var_74_1 = *(uint32_t*)(&g_JournalPages._M_start->m_Hours + esi_13);
004975de                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<HOUR> %d\n");
004975e3                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_4;
004975f3                      fwrite(PStringBase<char>::s_NullBuffer_14, 1, (PStringBase<char>::s_NullBuffer_14->m_data[-4] - 1), edi_1);
004975fe                      int32_t var_4c_2 = *(uint32_t*)(&g_JournalPages._M_start->m_Minutes + esi_13);
00497609                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<MINU> %d\n");
0049760e                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_15 = PStringBase<char>::s_NullBuffer_4;
0049761b                      fwrite(PStringBase<char>::s_NullBuffer_15, 1, (PStringBase<char>::s_NullBuffer_15->m_data[-4] - 1), edi_1);
0049762c                      void (__thiscall** const eax_37)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = &gmJournalUI::`vftable'.RecvNotice_FillComponentBuyList;
0049762c                      
00497631                      if (&g_JournalPages._M_start->m_LocationSet[esi_13] == 0)
00497633                          eax_37 = "FALSE";
00497633                      
00497638                      void (__thiscall** const var_3c_20)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = eax_37;
00497643                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<LOC?> %s\n");
00497648                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_16 = PStringBase<char>::s_NullBuffer_4;
00497655                      fwrite(PStringBase<char>::s_NullBuffer_16, 1, (PStringBase<char>::s_NullBuffer_16->m_data[-4] - 1), edi_1);
00497657                      class PageInfo* _M_start = g_JournalPages._M_start;
00497664                      int32_t var_58_3 = *(uint32_t*)((esi_13 + _M_start) + 0x34);
00497665                      int32_t var_5c_2 = *(uint32_t*)(&_M_start->m_xCoord + esi_13);
00497670                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, "<LOCX> %f\n");
00497675                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_4;
00497682                      fwrite(PStringBase<char>::s_NullBuffer_17, 1, (PStringBase<char>::s_NullBuffer_17->m_data[-4] - 1), edi_1);
00497684                      class PageInfo* _M_start_1 = g_JournalPages._M_start;
00497691                      int32_t var_78_1 = *(uint32_t*)((esi_13 + _M_start_1) + 0x3c);
00497692                      int32_t var_7c_2 = *(uint32_t*)(&_M_start_1->m_yCoord + esi_13);
0049769d                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, &gmJournalUI::`vftable'.RecvNotice_BookDeletePageResponse);
004976a2                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_18 = PStringBase<char>::s_NullBuffer_4;
004976b2                      fwrite(PStringBase<char>::s_NullBuffer_18, 1, (PStringBase<char>::s_NullBuffer_18->m_data[-4] - 1), edi_1);
004976c3                      void (__thiscall** const eax_40)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = &gmJournalUI::`vftable'.RecvNotice_FillComponentBuyList;
004976c3                      
004976c8                      if (&g_JournalPages._M_start->m_TimerRunning[esi_13] == 0)
004976ca                          eax_40 = "FALSE";
004976ca                      
004976cf                      void (__thiscall** const var_3c_22)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = eax_40;
004976da                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, &gmJournalUI::`vftable'.RecvNotice_CloseVendor);
004976df                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_19 = PStringBase<char>::s_NullBuffer_4;
004976ec                      fwrite(PStringBase<char>::s_NullBuffer_19, 1, (PStringBase<char>::s_NullBuffer_19->m_data[-4] - 1), edi_1);
004976ee                      class PageInfo* _M_start_2 = g_JournalPages._M_start;
004976fb                      int32_t var_58_4 = *(uint32_t*)((esi_13 + _M_start_2) + 0x1c);
004976fc                      int32_t var_5c_3 = *(uint32_t*)(&_M_start_2->m_TimerStamp + esi_13);
00497707                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_4, &gmJournalUI::`vftable'.RecvNotice_UserPreferenceChanged);
0049770c                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_20 = PStringBase<char>::s_NullBuffer_4;
00497719                      fwrite(PStringBase<char>::s_NullBuffer_20, 1, (PStringBase<char>::s_NullBuffer_20->m_data[-4] - 1), edi_1);
00497734                      esi_13 += 0x40;
00497737                      cond:3_1 = (var_14_1 + 1) < ((g_JournalPages._M_finish - g_JournalPages._M_start) >> 6);
00497739                      var_14_1 += 1;
0049773d                  } while (cond:3_1);
00497743                  ebx_1 = arg2;
004973b5              }
004973b5              
00497748              fclose(edi_1);
00497758              void* __offset(PSRefBufferCharData<char>, -0x14) esi_15 = &PStringBase<char>::s_NullBuffer_5->m_data[0xffffffec];
00497758              
0049776a              if ((InterlockedDecrement(((char*)esi_15 + 4)) == 0 && esi_15 != 0))
00497772                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_15) + -0x14)(1);
00497772              
00497778              esi_12 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
0049777e              var_3c_8 = ((char*)esi_12 + 4);
00497353          }
00497353          else
00497353          {
00497361              edi_1 = fopen(PStringBase<char>::s_NullBuffer_6, &data_7a6738);
00497361              
00497368              if (edi_1 != 0)
00497368                  goto label_4973ad;
00497368              
00497374              void* __offset(PSRefBufferCharData<char>, -0x14) esi_10 = &PStringBase<char>::s_NullBuffer_5->m_data[0xffffffec];
00497374              
00497383              if ((InterlockedDecrement(((char*)esi_10 + 4)) == 0 && esi_10 != 0))
0049738b                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_10) + -0x14)(1);
0049738b              
00497391              esi_12 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
00497397              var_3c_8 = ((char*)esi_12 + 4);
00497353          }
00497353          
00497787          if ((InterlockedDecrement(var_3c_8) == 0 && esi_12 != 0))
0049778f              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_12) + -0x14)(1);
0049778f          
00497795          void* __offset(PSRefBufferCharData<char>, -0x14) esi_18 = &PStringBase<char>::s_NullBuffer_6->m_data[0xffffffec];
00497795          
004977a4          if ((InterlockedDecrement(((char*)esi_18 + 4)) == 0 && esi_18 != 0))
004977ac              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_18) + -0x14)(1);
004977ac          
004977ae          esi_8 = (ebx_1 - 0x14);
004972b4      }
004972b4      else
004972b4      {
004972c0          void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &PStringBase<char>::s_NullBuffer_5->m_data[0xffffffec];
004972c0          
004972cf          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004972d7              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004972d7          
004972dd          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
004972dd          
004972ec          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004972f4              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004972f4          
004972fa          void* __offset(PSRefBufferCharData<char>, -0x14) esi_6 = &PStringBase<char>::s_NullBuffer_6->m_data[0xffffffec];
004972fa          
00497309          if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00497311              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00497311          
00497317          esi_8 = (arg2 - 0x14);
004972b4      }
004972b4      
004977bd      if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
004977c5          **(uint32_t**)esi_8(1);
00497270  }

004977d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004977e0  void __thiscall gmJournalUI::ListenToGlobalMessage(class gmJournalUI* this, uint32_t arg2, int32_t arg3)

004977e0  {
004977e0      uint32_t eax = arg2;
004977e0      
004977eb      if (eax == 3)
004977eb      {
004978bc          if ((((int8_t)(this->__bitfield164 >> 1)) & 1) != 0)
004978bc          {
004978be              long double x87_r7_1 = ((long double)Timer::cur_time);
004978c4              long double temp1_1 = ((long double)this->m_timeNextUpdate);
004978c4              (x87_r7_1 - temp1_1);
004978ca              eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004978cc              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004978cc              
004978cf              if (p_1)
004978cf              {
004978d3                  gmJournalUI::UpdateRunningTimer(this);
004978e4                  this->m_timeNextUpdate = ((double)(((long double)Timer::cur_time) + ((long double)0.5)));
004978cf              }
004978bc          }
004977eb      }
004977eb      else if (eax == 0xb)
004977f4      {
004977fa          eax = this->m_Loaded;
004977fa          
00497802          if (eax == 0)
00497802          {
0049780e              this->m_Loaded = 1;
00497815              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0049781a              arg2 = PStringBase<char>::s_NullBuffer_1;
00497822              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0049782e              PStringBase<char>::sprintf(&arg2, "Journal");
00497833              uint32_t ecx = arg2;
00497846              InterlockedIncrement((arg2 - 0x10));
0049784a              gmJournalUI::LoadPages(this, ecx);
00497855              class PageInfo* _M_start = g_JournalPages._M_start;
00497855              
00497861              if (((g_JournalPages._M_finish - _M_start) >> 6) <= 0)
0049787c                  gmJournalUI::NewPage(this);
00497861              else
00497861              {
0049786a                  PageInfo::operator=(&this->m_Info, _M_start);
00497873                  gmJournalUI::GotoPage(this, 1);
00497861              }
00497861              
00497881              this->m_CurrentPage = 1;
0049788f              int32_t* esi_2 = (arg2 - 0x14);
0049788f              
004978a2              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004978aa                  **(uint32_t**)esi_2(1);
00497802          }
004977f4      }
004977e0  }

004978ef                                               90                                                                 .

004978f0  void __thiscall gmJournalUI::OnVisibilityChanged(class gmJournalUI* this, uint8_t arg2)

004978f0  {
004978f1      char ebx = ((int8_t)arg2);
004978fa      UIElement::OnVisibilityChanged(this, ebx);
004978fa      
00497907      if (this->m_Loaded != 0)
00497907      {
0049790d          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00497918          arg2 = PStringBase<char>::s_NullBuffer_1;
00497920          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0049792c          PStringBase<char>::sprintf(&arg2, "Journal");
0049792c          
00497936          if (ebx != 0)
0049794b              _STL::sort(g_JournalPages._M_start, g_JournalPages._M_finish, PageInfoSortPageNumber);
0049794b          
0049795a          int32_t var_10_2 = gmJournalUI::SaveThisPage(this);
0049795b          class PStringBase<char> ecx_3 = arg2;
0049796b          InterlockedIncrement((arg2 - 0x10));
0049796f          gmJournalUI::SavePages(this, ecx_3);
00497978          int32_t* esi_2 = (arg2 - 0x14);
00497978          
0049798b          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00497993              **(uint32_t**)esi_2(1);
00497907      }
004978f0  }

0049799b                                                                                   90 90 90 90 90                             .....

004979a0  int32_t LandDefs::inbound_valid_cellid(uint32_t arg1) __pure

004979a0  {
004979a6      uint32_t ecx_1 = ((uint32_t)arg1);
004979a6      
004979cc      if ((((ecx_1 >= 1 && ecx_1 <= 0x40) || (ecx_1 >= 0x100 && ecx_1 <= 0xfffd)) || ecx_1 == 0xffff))
004979cc      {
004979d6          int32_t ecx_4 = ((arg1 >> 0x15) & 0x7f8);
004979dc          int32_t eax_1 = ((arg1 >> 0xd) & 0x7f8);
004979dc          
004979f6          if ((ecx_4 >= 0 && (eax_1 >= 0 && (ecx_4 < 0x7f8 && eax_1 < 0x7f8))))
004979fd              return 1;
004979cc      }
004979cc      
00497a00      return 0;
004979a0  }

00497a01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00497a10  uint8_t __thiscall gmContractsUI::CheckForDoubleClick(class gmContractsUI* this, int32_t const arg2)

00497a10  {
00497a14      long double x87_r7 = ((long double)Timer::cur_time);
00497a14      
00497a20      if (arg2 == this->m_LastClickIndex)
00497a20      {
00497a28          long double x87_r6_2 = (((long double)this->m_LastClickTime) + ((long double)1.0));
00497a30          (x87_r7 - x87_r6_2);
00497a30          
00497a37          if ((*(uint8_t*)((char*)((((x87_r7 < x87_r6_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, x87_r6_2))) ? 1 : 0) << 0xa) | ((((x87_r7 == x87_r6_2) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
00497a37          {
00497a4e              this->m_LastClickTime = 0f;
00497a54              *(uint32_t*)((char*)this->m_LastClickTime)[4] = 0;
00497a5a              this->m_LastClickIndex = 0xffffffff;
00497a64              int32_t eax_1;
00497a64              eax_1 = 1;
00497a66              return 1;
00497a37          }
00497a20      }
00497a20      
00497a39      this->m_LastClickTime = ((double)x87_r7);
00497a3f      this->m_LastClickIndex = arg2;
00497a45      int16_t eax;
00497a45      eax = 0;
00497a47      return 0;
00497a10  }

00497a69                             90 90 90 90 90 90 90                                                           .......

00497a70  void* __thiscall PackableHashIterator<unsigned long,CContractTracker>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,CContractTracker>* this, uint32_t arg2)

00497a70  {
00497a78      this->vtable = &PackableHashIterator<unsigned long,class CContractTracker>::`vftable';
00497a78      
00497a7e      if ((arg2 & 1) != 0)
00497a81          operator delete(this);
00497a81      
00497a8c      return this;
00497a70  }

00497a8f                                               90                                                                 .

00497a90  int32_t LandDefs::gid_to_lcoord(uint32_t arg1, int32_t* arg2, int32_t* arg3)

00497a90  {
00497aa0      if (LandDefs::inbound_valid_cellid(arg1) != 0)
00497aa0      {
00497aa4          uint32_t edx_2 = ((uint32_t)arg1);
00497aa4          
00497ab0          if (edx_2 < 0x100)
00497ab0          {
00497ac7              *(uint32_t*)arg2 = ((arg1 >> 0x15) & 0x7f8);
00497ad0              *(uint32_t*)arg3 = (((uint32_t)*(uint8_t*)((char*)arg1)[2]) << 3);
00497ada              *(uint32_t*)arg2 += ((edx_2 - 1) >> 3);
00497ae2              int32_t edi_6 = (*(uint32_t*)arg3 + ((arg1 - 1) & 7));
00497ae4              *(uint32_t*)arg3 = edi_6;
00497ae6              int32_t eax_2 = *(uint32_t*)arg2;
00497ae6              
00497b00              if ((eax_2 >= 0 && (edi_6 >= 0 && (eax_2 < 0x7f8 && edi_6 < 0x7f8))))
00497b08                  return 1;
00497ab0          }
00497aa0      }
00497aa0      
00497b0c      return 0;
00497a90  }

00497b0d                                         90 90 90                                                               ...

00497b10  void __fastcall ContractInfo::~ContractInfo(class ContractInfo* this)

00497b10  {
00497b1e      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = (this->m_Status.m_charbuffer - 0x14);
00497b25      this->m_ContractTracker.vtable = 0x79285c;
00497b25      
00497b34      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00497b3c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00497b3c      
00497b40      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = (this->m_Name.m_charbuffer - 0x14);
00497b40      
00497b4f      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00497b57          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00497b10  }

00497b5d                                                                                         90 90 90                               ...

00497b60  void __fastcall ContractInfo::ContractInfo(class ContractInfo* this)

00497b60  {
00497b60      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00497b68      class PSRefBufferCharData<unsigned short>** this_1 = this;
00497b77      *(uint32_t*)this_1 = PStringBase<unsigned short>::s_NullBuffer_2;
00497b79      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
00497b7b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
00497b87      this_1[1] = PStringBase<unsigned short>::s_NullBuffer_4;
00497b8a      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_4 - 0x10));
00497b8f      CContractTracker::CContractTracker(&this_1[2]);
00497b94      class PSRefBufferCharData<unsigned short>* eax_2 = *(uint32_t*)this_1;
00497b94      
00497ba2      if (eax_2 != PStringBase<unsigned short>::s_NullBuffer)
00497ba2      {
00497bb3          if ((InterlockedDecrement(&eax_2->m_data[-8]) == 0 && eax_2 != 0x14))
00497bbb              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00497bbb          
00497bbd          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00497bc8          *(uint32_t*)this_1 = PStringBase<unsigned short>::s_NullBuffer_1;
00497bca          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00497ba2      }
00497ba2      
00497bcc      void* eax_4 = this_1[1];
00497bcc      
00497bd5      if (eax_4 != PStringBase<unsigned short>::s_NullBuffer)
00497bd5      {
00497be6          if ((InterlockedDecrement(((char*)eax_4 - 0x10)) == 0 && eax_4 != 0x14))
00497bee              **(uint32_t**)((char*)eax_4 - 0x14)(1);
00497bee          
00497bf0          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
00497bfc          this_1[1] = PStringBase<unsigned short>::s_NullBuffer_3;
00497bff          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
00497bd5      }
00497b60  }

00497c08                          90 90 90 90 90 90 90 90                                                          ........

00497c10  class PackableHashIterator<unsigned long,CContractTracker>* __thiscall PackableHashTable<unsigned long,CContractTracker>::begin(class PackableHashTable<unsigned long,CContractTracker> const* this, class PackableHashIterator<unsigned long,CContractTracker>* __return)

00497c10  {
00497c10      uint32_t _table_size = this->_table_size;
00497c14      int32_t eax = 0;
00497c14      
00497c19      if (_table_size > 0)
00497c19      {
00497c1b          class PackableHashData<unsigned long,CContractTracker>** _buckets_1 = this->_buckets;
00497c1e          class PackableHashData<unsigned long,CContractTracker>** _buckets_2 = _buckets_1;
00497c1e          
00497c2b          do
00497c2b          {
00497c23              if (*(uint32_t*)_buckets_2 != 0)
00497c23              {
00497c4c                  int32_t ecx = _buckets_1[eax];
00497c4f                  struct PackableHashIterator<unsigned long,CContractTracker>::VTable** __return_1 = __return;
00497c53                  __return_1[2] = _buckets_1;
00497c58                  __return_1[1] = ecx;
00497c5b                  *(uint32_t*)__return_1 = &PackableHashIterator<unsigned long,class CContractTracker>::`vftable';
00497c61                  __return_1[3] = _table_size;
00497c64                  return __return_1;
00497c23              }
00497c23              
00497c25              eax += 1;
00497c26              _buckets_2 = &_buckets_2[1];
00497c2b          } while (eax < _table_size);
00497c19      }
00497c19      
00497c2d      class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_buckets;
00497c36      __return->_current = nullptr;
00497c3d      __return->_buckets = _buckets;
00497c40      __return->vtable = &PackableHashIterator<unsigned long,class CContractTracker>::`vftable';
00497c46      __return->_table_size = _table_size;
00497c49      return __return;
00497c10  }

00497c67                       90 90 90 90 90 90 90 90 90                                                         .........

00497c70  void __fastcall PackableHashIterator<unsigned long,CContractTracker>::GetNext(class PackableHashIterator<unsigned long,CContractTracker>* this)

00497c70  {
00497c70      class PackableHashData<unsigned long,CContractTracker>* _current = this->_current;
00497c73      class PackableHashData<unsigned long,CContractTracker>* _next = _current->_next;
00497c73      
00497c78      if (_next != 0)
00497c78      {
00497c7a          this->_current = _next;
00497c7d          return;
00497c78      }
00497c78      
00497c84      int32_t i = (_current->_hashVal + 1);
00497c84      
00497c89      if (i < this->_table_size)
00497c89      {
00497c8b          class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_buckets;
00497c8e          void* edx_1 = &_buckets[i];
00497c8e          
00497c9f          do
00497c9f          {
00497c94              if (*(uint32_t*)edx_1 != 0)
00497c94              {
00497cad                  this->_current = _buckets[i];
00497cb1                  return;
00497c94              }
00497c94              
00497c99              i += 1;
00497c9a              edx_1 += 4;
00497c9f          } while (i < this->_table_size);
00497c89      }
00497c89      
00497ca4      this->_current = nullptr;
00497c70  }

00497cb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00497cc0  class CContract* __thiscall CContractTable::GetContract(class CContractTable const* this, uint32_t const arg2)

00497cc0  {
00497cc1      uint32_t _table_size = this->_contractHash._table_size;
00497cc1      
00497cc7      if (_table_size != 0)
00497cc7      {
00497cc9          class PackableHashData<unsigned long,CContract>** _buckets = this->_contractHash._buckets;
00497cc9          
00497cce          if (_buckets != 0)
00497cce          {
00497cdf              for (int32_t* i = _buckets[(COMBINE(0, arg2) % _table_size)]; i != 0; i = i[0x45])
00497cdf              {
00497ce3                  if (arg2 == *(uint32_t*)i)
00497cfb                      return &i[1];
00497cdf              }
00497cce          }
00497cc7      }
00497cc7      
00497cf3      return 0;
00497cc0  }

00497cfe                                                                                            90 90                                ..

00497d00  void __thiscall ContractInfo::ContractInfo(class ContractInfo* this, class ContractInfo const* arg2)

00497d00  {
00497d00      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00497d08      class PSRefBufferCharData<unsigned short>** this_1 = this;
00497d17      *(uint32_t*)this_1 = PStringBase<unsigned short>::s_NullBuffer_1;
00497d19      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00497d1b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00497d27      this_1[1] = PStringBase<unsigned short>::s_NullBuffer_2;
00497d2a      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
00497d2f      CContractTracker::CContractTracker(&this_1[2]);
00497d38      class PSRefBufferCharData<unsigned short>* eax_2 = *(uint32_t*)this_1;
00497d38      
00497d3c      if (eax_2 != arg2->m_Name.m_charbuffer)
00497d3c      {
00497d51          if ((InterlockedDecrement(&eax_2->m_data[-8]) == 0 && eax_2 != 0x14))
00497d5a              *(uint32_t*)*(int32_t*)((char*)eax_2 + -0x14)(1);
00497d5a          
00497d5c          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_Name.m_charbuffer;
00497d5e          *(uint32_t*)this_1 = m_charbuffer;
00497d64          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00497d3c      }
00497d3c      
00497d66      void* eax_5 = this_1[1];
00497d66      
00497d6c      if (eax_5 != arg2->m_Status.m_charbuffer)
00497d6c      {
00497d81          if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
00497d8a              **(uint32_t**)((char*)eax_5 - 0x14)(1);
00497d8a          
00497d8c          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_Status.m_charbuffer;
00497d8f          this_1[1] = m_charbuffer_1;
00497d96          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00497d6c      }
00497d6c      
00497d9f      CContractTracker::operator=(&this_1[2], &arg2->m_ContractTracker);
00497d00  }

00497dad                                         90 90 90                                                               ...

00497db0  class ContractInfo& __thiscall ContractInfo::operator=(class ContractInfo* this, class ContractInfo const& arg2)

00497db0  {
00497dc0      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_Name.m_charbuffer;
00497dc0      
00497dc4      if (m_charbuffer != arg2->m_Name.m_charbuffer)
00497dc4      {
00497dd5          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00497ddd              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00497ddd          
00497ddf          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_Name.m_charbuffer;
00497de1          this->m_Name.m_charbuffer = m_charbuffer_1;
00497de7          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00497dc4      }
00497dc4      
00497ded      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this->m_Status.m_charbuffer;
00497ded      
00497df3      if (m_charbuffer_2 != arg2->m_Status.m_charbuffer)
00497df3      {
00497e04          if ((InterlockedDecrement(&m_charbuffer_2->m_data[-8]) == 0 && m_charbuffer_2 != 0x14))
00497e0c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00497e0c          
00497e0e          class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = arg2->m_Status.m_charbuffer;
00497e11          this->m_Status.m_charbuffer = m_charbuffer_3;
00497e18          InterlockedIncrement(&m_charbuffer_3->m_data[-8]);
00497df3      }
00497df3      
00497e25      CContractTracker::operator=(&this->m_ContractTracker, &arg2->m_ContractTracker);
00497e30      return this;
00497db0  }

00497e33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00497e40  void __fastcall gmContractsUI::PostInit(class gmContractsUI* this)

00497e40  {
00497e44      UIElement::PostInit(this);
00497e50      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100005cf);
00497e57      class UIElement_ListBox* eax_1;
00497e57      
00497e57      if (eax == 0)
00497e67          eax_1 = nullptr;
00497e57      else
00497e5f          eax_1 = eax->vtable->DynamicCast(5);
00497e5f      
00497e70      this->m_pContractsBox = eax_1;
00497e76      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x100005df);
00497e7d      class UIElement_Text* eax_3;
00497e7d      
00497e7d      if (eax_2 == 0)
00497e8d          eax_3 = nullptr;
00497e7d      else
00497e85          eax_3 = eax_2->vtable->DynamicCast(0xc);
00497e85      
00497e96      this->m_pProgressText = eax_3;
00497e9c      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x100005e0);
00497ea3      class UIElement_Text* eax_5;
00497ea3      
00497ea3      if (eax_4 == 0)
00497eb3          eax_5 = nullptr;
00497ea3      else
00497eab          eax_5 = eax_4->vtable->DynamicCast(0xc);
00497eab      
00497ebc      this->m_pContactText = eax_5;
00497ec2      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x100005e2);
00497ec9      class UIElement_Text* eax_7;
00497ec9      
00497ec9      if (eax_6 == 0)
00497ed9          eax_7 = nullptr;
00497ec9      else
00497ed1          eax_7 = eax_6->vtable->DynamicCast(0xc);
00497ed1      
00497ee2      this->m_pAreaText = eax_7;
00497ee8      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x100005e1);
00497eef      class UIElement_Text* eax_9;
00497eef      
00497eef      if (eax_8 == 0)
00497eff          eax_9 = nullptr;
00497eef      else
00497ef7          eax_9 = eax_8->vtable->DynamicCast(0xc);
00497ef7      
00497f08      this->m_pContactLocText = eax_9;
00497f0e      class UIElement* eax_10 = UIElement::GetChildRecursive(this, 0x100005e3);
00497f15      class UIElement_Text* eax_11;
00497f15      
00497f15      if (eax_10 == 0)
00497f25          eax_11 = nullptr;
00497f15      else
00497f1d          eax_11 = eax_10->vtable->DynamicCast(0xc);
00497f1d      
00497f2e      this->m_pTimedText = eax_11;
00497f34      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x100005de);
00497f3b      class UIElement_Text* eax_13;
00497f3b      
00497f3b      if (eax_12 == 0)
00497f4b          eax_13 = nullptr;
00497f3b      else
00497f43          eax_13 = eax_12->vtable->DynamicCast(0xc);
00497f43      
00497f4d      this->m_pNotesText = eax_13;
00497f53      class GlobalEventHandler* eax_14 = GlobalEventHandler::GetGlobalEventHandler();
00497f53      
00497f5c      if (eax_14 != 0)
00497f5c      {
00497f5e          eax_14->vtable->RegisterNoticeHandler(0x4dd281, &this->vtable);
00497f72          eax_14->vtable->RegisterNoticeHandler(0x4dd282, &this->vtable);
00497f5c      }
00497f5c      
00497f84      UIListener::RegisterForGlobalMessage(this, 3);
00497e40  }

00497f8c                                      90 90 90 90                                                              ....

00497f90  void __fastcall PackableHashTable<unsigned long,CContractTracker>::EmptyContents(class PackableHashTable<unsigned long,CContractTracker>* this)

00497f90  {
00497f99      if (this->_buckets != 0)
00497f99      {
00497f9e          int32_t i = 0;
00497f9e          
00497fa2          if (this->_table_size > 0)
00497fa2          {
00497fd9              do
00497fd9              {
00497fa8                  void* j_1 = this->_buckets[i];
00497fa8                  
00497fad                  if (j_1 != 0)
00497fad                  {
00497fc7                      void* j;
00497fc7                      
00497fc7                      do
00497fc7                      {
00497fb0                          j = *(uint32_t*)((char*)j_1 + 0x30);
00497fb4                          *(uint32_t*)((char*)j_1 + 8) = 0x79285c;
00497fbb                          operator delete(j_1);
00497fc5                          j_1 = j;
00497fc7                      } while (j != 0);
00497fad                  }
00497fad                  
00497fc9                  this->_buckets[i] = 0;
00497fd6                  i += 1;
00497fd9              } while (i < this->_table_size);
00497fa2          }
00497f99      }
00497f99      
00497fdc      this->_currNum = 0;
00497f90  }

00497fe6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00497ff0  int32_t __thiscall PackableHashTable<unsigned long,CContractTracker>::add(class PackableHashTable<unsigned long,CContractTracker>* this, uint32_t const* arg2, class CContractTracker const* arg3)

00497ff0  {
00497ffa      uint32_t _table_size_1 = this->_table_size;
00497ffa      
00497fff      if (_table_size_1 == 0)
00497fff      {
0049802e      label_49802e:
0049802e          void* eax_4 = operator new(0x38);
0049802e          
0049803a          if (eax_4 != 0)
0049803a          {
00498043              uint32_t _table_size = this->_table_size;
0049804a              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
0049804c              CContractTracker::CContractTracker(((char*)eax_4 + 8), arg3);
00498051              *(uint32_t*)((char*)eax_4 + 0x30) = 0;
0049805d              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
0049805f              *(uint32_t*)((char*)eax_4 + 0x34) = temp1_2;
0049806a              *(uint32_t*)((char*)eax_4 + 0x30) = this->_buckets[temp1_2];
0049806d              this->_buckets[temp1_2] = eax_4;
00498073              this->_currNum += 1;
0049807f              return 1;
0049803a          }
00497fff      }
00497fff      else
00497fff      {
00498001          class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_buckets;
00498001          
00498006          if (_buckets == 0)
00498006              goto label_49802e;
00498006          
00498008          uint32_t const i = *(uint32_t*)arg2;
00498011          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
00498011          
00498016          if (edx_3 == 0)
00498016              goto label_49802e;
00498016          
0049801a          while (i != *(uint32_t*)edx_3)
0049801a          {
0049801c              edx_3 = edx_3[0xc];
0049801c              
00498021              if (edx_3 == 0)
00498021                  goto label_49802e;
0049801a          }
0049801a          
0049802a          if (edx_3 == 0xfffffff8)
0049802a              goto label_49802e;
00497fff      }
00497fff      
00498088      return 0;
00497ff0  }

0049808b                                   90 90 90 90 90                                                             .....

00498090  class ContractInfo* _STL::__uninitialized_copy(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo* arg3, struct _STL::__false_type const* arg4)

00498090  {
00498096      class ContractInfo* esi = arg1;
0049809d      class ContractInfo* result = arg3;
0049809d      
004980a1      while (esi != arg2)
004980a1      {
004980a5          if (result != 0)
004980aa              ContractInfo::ContractInfo(result, esi);
004980aa          
004980af          esi = &esi[1];
004980b2          result = &result[1];
004980a1      }
004980a1      
004980be      return result;
00498090  }

004980bf                                                                                               90                                 .

004980c0  class ContractInfo* _STL::__copy_backward(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo* arg3, struct _STL::random_access_iterator_tag const* arg4, int32_t* arg5)

004980c0  {
004980c5      class ContractInfo* esi = arg2;
004980dc      int32_t i_2 = (((char*)esi - arg1) / 0x30);
004980dc      
004980e0      if (i_2 <= 0)
0049810c          return arg3;
0049810c      
004980e4      class ContractInfo* edi = arg3;
004980ea      int32_t i_1 = i_2;
004980ff      int32_t i;
004980ff      
004980ff      do
004980ff      {
004980f0          esi -= 0x30;
004980f3          edi -= 0x30;
004980f9          ContractInfo::operator=(edi, esi);
004980fe          i = i_1;
004980fe          i_1 -= 1;
004980ff      } while (i != 1);
00498106      return edi;
004980c0  }

0049810d                                         90 90 90                                                               ...

00498110  class ContractInfo* _STL::__copy(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo* arg3, struct _STL::random_access_iterator_tag const* arg4, int32_t* arg5)

00498110  {
00498115      class ContractInfo* esi = arg1;
0049812a      int32_t i_2 = (((char*)arg2 - esi) / 0x30);
0049812a      
0049812e      if (i_2 <= 0)
00498154          return arg3;
00498154      
00498132      class ContractInfo* edi = arg3;
00498136      int32_t i_1 = i_2;
00498147      int32_t i;
00498147      
00498147      do
00498147      {
0049813b          ContractInfo::operator=(edi, esi);
00498140          esi = &esi[1];
00498143          edi = &edi[1];
00498146          i = i_1;
00498146          i_1 -= 1;
00498147      } while (i != 1);
0049814e      return edi;
00498110  }

00498155                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00498160  void _STL::swap(class ContractInfo* arg1, class ContractInfo* arg2)

00498160  {
0049816e      void* var_30;
0049816e      ContractInfo::ContractInfo(&var_30, arg1);
0049817a      ContractInfo::operator=(arg1, arg2);
00498186      ContractInfo::operator=(arg2, &var_30);
0049819c      int32_t var_28 = 0x79285c;
004981ac      void* var_2c;
004981ac      
004981ac      if ((InterlockedDecrement(((char*)var_2c - 0x10)) == 0 && var_2c != 0x14))
004981b4          **(uint32_t**)((char*)var_2c - 0x14)(1);
004981b4      
004981ba      int32_t* esi_4 = ((char*)var_30 - 0x14);
004981ba      
004981c9      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004981d1          **(uint32_t**)esi_4(1);
00498160  }

004981d9                                                                             90 90 90 90 90 90 90                           .......

004981e0  void _STL::__unguarded_linear_insert(class ContractInfo* arg1, class ContractInfo arg2, uint8_t (* arg3)(class ContractInfo const*, class ContractInfo const*))

004981e0  {
004981e7      class ContractInfo* edi = arg1;
004981eb      void* __offset(ContractInfo, -0x30) esi = ((char*)edi - 0x30);
004981f4      char eax;
004981f4      int32_t ecx;
004981f4      eax = arg3(&arg2, esi);
004981f4      
004981fb      if (eax != 0)
004981fb      {
0049821a          char i;
0049821a          
0049821a          do
0049821a          {
00498203              ContractInfo::operator=(edi, esi);
00498208              edi = esi;
0049820a              esi -= 0x30;
00498213              i = arg3(&arg2, esi);
0049821a          } while (i != 0);
004981fb      }
004981fb      
00498223      ContractInfo::operator=(edi, &arg2);
00498232      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &arg2.m_Status.m_charbuffer->m_data[-0xa];
00498239      arg2.m_ContractTracker.vtable = 0x79285c;
00498239      
00498249      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00498251          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00498251      
00498257      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &arg2.m_Name.m_charbuffer->m_data[-0xa];
00498257      
00498266      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0049826e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004981e0  }

00498274                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00498280  void _STL::__push_heap(class ContractInfo* arg1, int32_t arg2, int32_t arg3, class ContractInfo arg4, uint8_t (* arg5)(class ContractInfo const*, class ContractInfo const*))

00498280  {
00498286      int32_t esi = arg2;
0049828d      int32_t eax_1;
0049828d      int32_t edx;
0049828d      edx = HIGHD(((int64_t)(esi - 1)));
0049828d      eax_1 = LOWD(((int64_t)(esi - 1)));
0049828d      
0049829b      if (esi > arg3)
0049829b      {
0049829e          int32_t edi_2 = ((eax_1 - edx) >> 1);
0049829e          
004982d8          do
004982d8          {
004982aa              void* ebx_1 = &arg1[edi_2];
004982aa              
004982b8              if (arg5(ebx_1, &arg4) == 0)
004982b8                  break;
004982b8              
004982c3              ContractInfo::operator=(&arg1[esi], ebx_1);
004982cb              int32_t eax_8;
004982cb              int32_t edx_1;
004982cb              edx_1 = HIGHD(((int64_t)(edi_2 - 1)));
004982cb              eax_8 = LOWD(((int64_t)(edi_2 - 1)));
004982d0              esi = edi_2;
004982d2              edi_2 = ((eax_8 - edx_1) >> 1);
004982d8          } while (esi > arg3);
0049829b      }
0049829b      
004982e8      ContractInfo::operator=(&arg1[esi], &arg4);
004982f7      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &arg4.m_Status.m_charbuffer->m_data[-0xa];
004982fe      arg4.m_ContractTracker.vtable = 0x79285c;
004982fe      
0049830e      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00498316          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00498316      
0049831c      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &arg4.m_Name.m_charbuffer->m_data[-0xa];
0049831c      
0049832b      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00498333          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00498280  }

00498339                                                                             90 90 90 90 90 90 90                           .......

00498340  void __fastcall PackableHashTable<unsigned long,CContractTracker>::~PackableHashTable<unsigned long,CContractTracker>(class PackableHashTable<unsigned long,CContractTracker>* this)

00498340  {
00498343      this->vtable = 0x7a6930;
00498349      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(this);
0049834e      class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_buckets;
0049834e      
00498353      if (_buckets != 0)
00498353      {
00498356          operator delete[](_buckets);
0049835e          this->_buckets = nullptr;
00498353      }
00498353      
00498365      this->_table_size = 0;
0049836c      this->vtable = 0x79285c;
00498340  }

00498374                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00498380  uint32_t __thiscall PackableHashTable<unsigned long,CContractTracker>::Pack(class PackableHashTable<unsigned long,CContractTracker>* this, void** arg2, uint32_t arg3)

00498380  {
00498380      class PackableHashTable<unsigned long,CContractTracker>* this_1 = this;
00498385      uint32_t result = PackableHashTable<unsigned long,CContractTracker>::pack_size(this);
0049838a      uint32_t ebx = arg3;
00498390      uint32_t result_1 = result;
00498390      
00498394      if (ebx >= result)
00498394      {
004983a9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
004983ab          *(uint32_t*)arg2 += 4;
004983b1          uint32_t i = 0;
004983b5          arg3 = 0;
004983b5          
004983b9          if (this->_table_size > 0)
004983b9          {
00498402              do
00498402              {
004983c3                  int32_t* j = this->_buckets[i];
004983c3                  
004983c8                  if (j != 0)
004983c8                  {
004983ee                      do
004983ee                      {
004983d3                          if (ebx >= 4)
004983d3                          {
004983d9                              **(uint32_t**)arg2 = *(uint32_t*)j;
004983db                              *(uint32_t*)arg2 += 4;
004983d3                          }
004983d3                          
004983e6                          *(uint32_t*)(j[2] + 0xc)(arg2, ebx);
004983e9                          j = j[0xc];
004983ee                      } while (j != 0);
004983ee                      
004983f0                      result = result_1;
004983f4                      i = arg3;
004983c8                  }
004983c8                  
004983fb                  i += 1;
004983fe                  arg3 = i;
00498402              } while (i < this->_table_size);
004983b9          }
00498394      }
00498394      
00498409      return result;
00498380  }

004983bd                                                                                         8d 49 00                               .I.
0049840c                                      90 90 90 90                                                              ....

00498410  int32_t __thiscall PackableHashTable<unsigned long,CContractTracker>::UnPack(class PackableHashTable<unsigned long,CContractTracker>* this, void** arg2, uint32_t arg3)

00498410  {
0049841e      if (arg3 < 4)
00498427          return 0;
00498427      
0049842c      void** edi = arg2;
00498430      void* eax_1 = *(uint32_t*)edi;
00498438      uint32_t var_2c = arg3;
0049843c      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(this);
00498441      class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_buckets;
00498441      
00498448      if (_buckets != 0)
00498448      {
0049844b          operator delete[](_buckets);
00498453          this->_buckets = nullptr;
00498448      }
00498448      
00498456      this->_table_size = 0;
00498459      void* ecx_1 = *(uint32_t*)edi;
0049845b      int32_t eax_2 = *(uint32_t*)ecx_1;
00498460      *(uint32_t*)edi = ((char*)ecx_1 + 4);
00498464      uint32_t ecx_4 = (eax_2 >> 0x10);
00498467      int32_t eax_3 = (eax_2 & 0xffff);
0049846c      int32_t ebx_1 = (arg3 - 4);
00498471      this->_table_size = ecx_4;
00498471      
00498476      if (ecx_4 == 0)
00498476      {
0049847f          int32_t result;
0049847f          result = eax_3 == 0;
00498486          return result;
00498476      }
00498476      
004984a3      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
004984a3      {
004984b4          int32_t var_28;
004984b4          uint32_t eax_6 = CContractTracker::CContractTracker(&var_28);
004984bb          arg3 = 0;
004984bb          
004984c3          if (eax_3 <= 0)
00498529              return ((eax_6 - eax_6) + 1);
00498529          
004984c8          while (true)
004984c8          {
004984c8              if (ebx_1 < 4)
0049849a                  return 0;
0049849a              
004984ca              int32_t* eax_7 = *(uint32_t*)edi;
004984ce              int32_t edx_1 = var_28;
004984d3              arg2 = *(uint32_t*)eax_7;
004984df              *(uint32_t*)edi = &eax_7[1];
004984df              
004984e6              if (*(uint32_t*)(edx_1 + 0x10)(edi, ebx_1) == 0)
0049849a                  return 0;
0049849a              
00498502              if ((PackableHashTable<unsigned long,CContractTracker>::add(this, &arg2, &var_28) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
0049849a                  return 0;
0049849a              
00498508              eax_6 = (arg3 + 1);
0049850b              arg3 = eax_6;
0049850b              
0049850f              if (eax_6 >= eax_3)
00498529                  return ((eax_6 - eax_6) + 1);
004984c8          }
004984a3      }
004984a3      
0049849a      return 0;
00498410  }

0049852c                                      90 90 90 90                                                              ....

00498530  void* __thiscall PackableHashTable<unsigned long,CContractTracker>::`scalar deleting destructor'(class PackableHashTable<unsigned long,CContractTracker>* this, uint32_t arg2)

00498530  {
00498533      this->vtable = 0x7a6930;
00498539      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(this);
0049853e      class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_buckets;
0049853e      
00498543      if (_buckets != 0)
00498543      {
00498546          operator delete[](_buckets);
0049854e          this->_buckets = nullptr;
00498543      }
00498543      
0049855a      this->_table_size = 0;
00498561      this->vtable = 0x79285c;
00498561      
00498567      if ((arg2 & 1) != 0)
0049856a          operator delete(this);
0049856a      
00498575      return this;
00498530  }

00498578                                                                          90 90 90 90 90 90 90 90                          ........

00498580  class PackableHashTable<unsigned long,CContractTracker>* __thiscall PackableHashTable<unsigned long,CContractTracker>::operator=(class PackableHashTable<unsigned long,CContractTracker>* arg1, void* arg2)

00498580  {
0049858a      if (arg1 != arg2)
0049858a      {
0049858d          PackableHashTable<unsigned long,CContractTracker>::EmptyContents(arg1);
00498592          void* _buckets = arg1->_buckets;
00498595          int32_t i = 0;
00498595          
00498599          if (_buckets != 0)
00498599          {
0049859c              operator delete[](_buckets);
004985a4              arg1->_buckets = nullptr;
00498599          }
00498599          
004985a7          arg1->_table_size = 0;
004985af          arg1->_table_size = *(uint32_t*)((char*)arg2 + 0xc);
004985b2          PackableHashTable<unsigned long,CContractTracker>::Init(arg1);
004985b2          
004985ba          if (*(uint32_t*)((char*)arg2 + 0xc) > 0)
004985ba          {
004985eb              do
004985eb              {
004985c3                  uint32_t* j_1 = *(uint32_t*)(*(uint32_t*)((char*)arg2 + 8) + (i << 2));
004985c3                  
004985c8                  if (j_1 != 0)
004985c8                  {
004985e3                      uint32_t* j;
004985e3                      
004985e3                      do
004985e3                      {
004985d0                          j = j_1[0xc];
004985da                          PackableHashTable<unsigned long,CContractTracker>::add(arg1, j_1, &j_1[2]);
004985e1                          j_1 = j;
004985e3                      } while (j != 0);
004985c8                  }
004985c8                  
004985e8                  i += 1;
004985eb              } while (i < *(uint32_t*)((char*)arg2 + 0xc));
004985ba          }
0049858a      }
0049858a      
004985f3      return arg1;
00498580  }

004985f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00498600  void _STL::__destroy_aux(class ContractInfo* arg1, class ContractInfo* arg2, struct _STL::__false_type const* arg3)

00498600  {
0049860b      for (class ContractInfo* i = arg1; i != arg2; i = &i[1])
0049860b      {
00498618          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = (i->m_Status.m_charbuffer - 0x14);
0049861f          i->m_ContractTracker.vtable = 0x79285c;
0049861f          
0049862e          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00498636              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00498636          
0049863a          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = (i->m_Name.m_charbuffer - 0x14);
0049863a          
00498649          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00498651              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0049860b      }
00498600  }

00498662        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00498670  void _STL::__unguarded_insertion_sort_aux(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo* arg3, uint8_t (* arg4)(class ContractInfo const*, class ContractInfo const*))

00498670  {
0049867d      for (class ContractInfo* i = arg1; i != arg2; i = &i[1])
0049867d      {
0049868a          void var_40;
0049868a          ContractInfo::ContractInfo(&var_40, i);
00498690          _STL::__unguarded_linear_insert(i, var_40, arg4);
0049867d      }
00498670  }

004986a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004986b0  void _STL::__adjust_heap(class ContractInfo* arg1, int32_t arg2, int32_t arg3, class ContractInfo arg4, uint8_t (* arg5)(class ContractInfo const*, class ContractInfo const*))

004986b0  {
004986bc      int32_t edi = arg2;
004986c0      int32_t esi = ((edi * 2) + 2);
004986c4      bool cond:1 = esi != arg3;
004986c6      arg2 = edi;
004986c6      
004986ca      while (esi < arg3)
004986ca      {
004986d6          void* eax_3 = &arg1[esi];
004986d6          
004986e6          if (arg5(eax_3, ((char*)eax_3 - 0x30)) != 0)
004986e8              esi -= 1;
004986e8          
004986fa          ContractInfo::operator=(&arg1[edi], &arg1[esi]);
004986ff          edi = esi;
00498701          esi = ((esi * 2) + 2);
00498705          cond:1 = esi != arg3;
004986ca      }
004986ca      
00498709      if (!(cond:1))
00498709      {
0049871e          ContractInfo::operator=(&arg1[edi], (&arg1[esi] - 0x30));
00498723          edi = (esi - 1);
00498709      }
00498709      
00498735      void var_44;
00498735      ContractInfo::ContractInfo(&var_44, &arg4);
00498741      _STL::__push_heap(arg1, edi, arg2, var_44, arg5);
00498750      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &arg4.m_Status.m_charbuffer->m_data[-0xa];
0049875a      arg4.m_ContractTracker.vtable = 0x79285c;
0049875a      
0049876a      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00498772          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00498772      
00498778      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &arg4.m_Name.m_charbuffer->m_data[-0xa];
00498778      
00498787      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0049878f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004986b0  }

00498796                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004987a0  uint8_t ContractInfoSortStatus(class ContractInfo const* arg1, class ContractInfo const* arg2)

004987a0  {
004987a4      class ContractInfo* ebx = arg1;
004987b3      uint32_t eax;
004987b3      
004987b3      if (ebx->m_ContractTracker._contract_stage == 3)
004987b3      {
004987b5          long double x87_r7_1 = ((long double)ebx->m_ContractTracker._time_of_server_update);
004987b8          long double temp0_1 = ((long double)0.0);
004987b8          (x87_r7_1 - temp0_1);
004987be          eax = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004987b3      }
004987b3      
004987c3      int32_t ecx;
004987c3      
004987c3      if ((ebx->m_ContractTracker._contract_stage != 3 || (*(uint8_t*)((char*)eax)[1] & 0x41) != 0))
004987cc          ecx = 0;
004987c3      else
004987c5          ecx = 1;
004987c5      
004987ce      class ContractInfo* esi = arg2;
004987ce      
004987d5      if (esi->m_ContractTracker._contract_stage == 3)
004987d5      {
004987d7          long double x87_r7_2 = ((long double)esi->m_ContractTracker._time_of_server_update);
004987da          long double temp1_1 = ((long double)0.0);
004987da          (x87_r7_2 - temp1_1);
004987e0          eax = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004987d5      }
004987d5      
004987e5      int32_t eax_1;
004987e5      
004987e5      if ((esi->m_ContractTracker._contract_stage != 3 || (*(uint8_t*)((char*)eax)[1] & 0x41) != 0))
004987ee          eax_1 = 0;
004987e5      else
004987e7          eax_1 = 1;
004987e7      
004987f6      if ((ecx != 0 && eax_1 != 0))
004987f6      {
00498801          long double x87_r7_5 = (((long double)ebx->m_ContractTracker._time_when_repeats) - (((long double)Timer::cur_time) - ((long double)ebx->m_ContractTracker._time_of_server_update)));
0049880d          long double x87_r6_2 = (((long double)esi->m_ContractTracker._time_when_repeats) - (((long double)Timer::cur_time) - ((long double)esi->m_ContractTracker._time_of_server_update)));
00498810          (x87_r6_2 - x87_r7_5);
00498812          eax_1 = ((((x87_r6_2 < x87_r7_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_5))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_5) ? 1 : 0) << 0xe) | 0))));
00498812          
00498817          if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) != 0)
0049882b              return 0;
0049882b          
00498823          return 1;
004987f6      }
004987f6      
0049882c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00498839      class PSRefBufferCharData<unsigned short>* var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00498841      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00498843      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00498848      class PSRefBufferCharData<unsigned short>* var_8 = PStringBase<unsigned short>::s_NullBuffer_2;
00498850      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00498852      class PSRefBufferCharData<unsigned short>* eax_6 = var_4;
00498852      
0049885f      if (eax_6 != ebx->m_Status.m_charbuffer)
0049885f      {
00498870          if ((InterlockedDecrement(&eax_6->m_data[-8]) == 0 && eax_6 != 0x14))
00498878              *(uint32_t*)*(int32_t*)((char*)eax_6 + -0x14)(1);
00498878          
0049887a          class PSRefBufferCharData<unsigned short>* m_charbuffer = ebx->m_Status.m_charbuffer;
0049887d          var_4 = m_charbuffer;
00498885          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00498887          esi = arg2;
0049885f      }
0049885f      
0049888b      class PSRefBufferCharData<unsigned short>* eax_10 = var_8;
0049888b      
00498892      if (eax_10 != esi->m_Status.m_charbuffer)
00498892      {
004988a3          if ((InterlockedDecrement(&eax_10->m_data[-8]) == 0 && eax_10 != 0x14))
004988ab              *(uint32_t*)*(int32_t*)((char*)eax_10 + -0x14)(1);
004988ab          
004988b1          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_Status.m_charbuffer;
004988b4          var_8 = m_charbuffer_1;
004988bc          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00498892      }
00498892      
004988c2      PStringBase<unsigned short>::break_reference(&var_4);
004988d2      _wcslwr(var_4);
004988db      PStringBase<unsigned short>::break_reference(&var_8);
004988e5      _wcslwr(var_8);
004988e7      class PSRefBufferCharData<unsigned short>* eax_15 = var_4;
004988eb      class PSRefBufferCharData<unsigned short>* ecx_6 = var_8;
004988eb      
00498900      if (eax_15->m_data[0x7ffffffffffffffe] != ecx_6->m_data[0x7ffffffffffffffe])
00498900          goto label_49895b;
00498900      
00498902      int32_t edx_5 = *(int32_t*)((char*)eax_15 + -8);
00498905      int32_t esi_4 = *(int32_t*)((char*)ecx_6 + -8);
00498905      
00498914      if (((edx_5 != esi_4 && edx_5 != 0xffffffff) && esi_4 != 0xffffffff))
0049890a          goto label_49895b;
0049890a      
00498918      int32_t eax_16 = wcscmp(eax_15, ecx_6);
0049891d      char eax_17 = ((int8_t)-(eax_16));
0049891f      eax_17 = (eax_17 - eax_17);
00498923      arg1 = (eax_17 + 1);
00498927      void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_1c_10;
00498927      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6;
00498927      
00498927      if (eax_17 == 0xff)
00498927      {
00498946          eax_15 = var_4;
0049894a          ecx_6 = var_8;
0049895b      label_49895b:
0049895b          ebx = wcscmp(eax_15, ecx_6) < 0;
0049895e          esi_6 = &var_8->m_data[-0xa];
00498964          var_1c_10 = ((char*)esi_6 + 4);
00498927      }
00498927      else
00498927      {
0049892f          uint8_t eax_19 = ContractInfoSortName(ebx, arg2);
0049893b          esi_6 = &var_8->m_data[-0xa];
00498941          ebx = eax_19;
00498943          var_1c_10 = ((char*)esi_6 + 4);
00498927      }
00498927      
0049896d      if ((InterlockedDecrement(var_1c_10) == 0 && esi_6 != 0))
00498975          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00498975      
0049897b      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_9 = &var_4->m_data[-0xa];
0049897b      
0049898a      if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
00498992          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
00498992      
00498997      int32_t eax_24;
00498997      eax_24 = ebx;
0049899d      return eax_24;
004987a0  }

0049899e                                                                                            90 90                                ..

004989a0  uint8_t ContractInfoReverseSortStatus(class ContractInfo const* arg1, class ContractInfo const* arg2)

004989a0  {
004989a4      class ContractInfo* ebx = arg1;
004989b3      uint32_t eax;
004989b3      
004989b3      if (ebx->m_ContractTracker._contract_stage == 3)
004989b3      {
004989b5          long double x87_r7_1 = ((long double)ebx->m_ContractTracker._time_of_server_update);
004989b8          long double temp0_1 = ((long double)0.0);
004989b8          (x87_r7_1 - temp0_1);
004989be          eax = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004989b3      }
004989b3      
004989c3      int32_t ecx;
004989c3      
004989c3      if ((ebx->m_ContractTracker._contract_stage != 3 || (*(uint8_t*)((char*)eax)[1] & 0x41) != 0))
004989cc          ecx = 0;
004989c3      else
004989c5          ecx = 1;
004989c5      
004989ce      class ContractInfo* esi = arg2;
004989ce      
004989d5      if (esi->m_ContractTracker._contract_stage == 3)
004989d5      {
004989d7          long double x87_r7_2 = ((long double)esi->m_ContractTracker._time_of_server_update);
004989da          long double temp1_1 = ((long double)0.0);
004989da          (x87_r7_2 - temp1_1);
004989e0          eax = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004989d5      }
004989d5      
004989e5      int32_t eax_1;
004989e5      
004989e5      if ((esi->m_ContractTracker._contract_stage != 3 || (*(uint8_t*)((char*)eax)[1] & 0x41) != 0))
004989ee          eax_1 = 0;
004989e5      else
004989e7          eax_1 = 1;
004989e7      
004989f6      if ((ecx != 0 && eax_1 != 0))
004989f6      {
00498a01          long double x87_r7_5 = (((long double)ebx->m_ContractTracker._time_when_repeats) - (((long double)Timer::cur_time) - ((long double)ebx->m_ContractTracker._time_of_server_update)));
00498a0d          long double x87_r6_2 = (((long double)esi->m_ContractTracker._time_when_repeats) - (((long double)Timer::cur_time) - ((long double)esi->m_ContractTracker._time_of_server_update)));
00498a10          (x87_r6_2 - x87_r7_5);
00498a12          eax_1 = ((((x87_r6_2 < x87_r7_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_5))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_5) ? 1 : 0) << 0xe) | 0))));
00498a14          bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00498a14          
00498a17          if (p)
00498a2b              return 0;
00498a2b          
00498a23          return 1;
004989f6      }
004989f6      
00498a2c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00498a39      class PSRefBufferCharData<unsigned short>* var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00498a41      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00498a43      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00498a48      class PSRefBufferCharData<unsigned short>* var_8 = PStringBase<unsigned short>::s_NullBuffer_2;
00498a50      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00498a52      class PSRefBufferCharData<unsigned short>* eax_6 = var_4;
00498a52      
00498a5f      if (eax_6 != ebx->m_Status.m_charbuffer)
00498a5f      {
00498a70          if ((InterlockedDecrement(&eax_6->m_data[-8]) == 0 && eax_6 != 0x14))
00498a78              *(uint32_t*)*(int32_t*)((char*)eax_6 + -0x14)(1);
00498a78          
00498a7a          class PSRefBufferCharData<unsigned short>* m_charbuffer = ebx->m_Status.m_charbuffer;
00498a7d          var_4 = m_charbuffer;
00498a85          InterlockedIncrement(&m_charbuffer->m_data[-8]);
00498a87          esi = arg2;
00498a5f      }
00498a5f      
00498a8b      class PSRefBufferCharData<unsigned short>* eax_10 = var_8;
00498a8b      
00498a92      if (eax_10 != esi->m_Status.m_charbuffer)
00498a92      {
00498aa3          if ((InterlockedDecrement(&eax_10->m_data[-8]) == 0 && eax_10 != 0x14))
00498aab              *(uint32_t*)*(int32_t*)((char*)eax_10 + -0x14)(1);
00498aab          
00498ab1          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_Status.m_charbuffer;
00498ab4          var_8 = m_charbuffer_1;
00498abc          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00498a92      }
00498a92      
00498ac2      PStringBase<unsigned short>::break_reference(&var_4);
00498ad2      _wcslwr(var_4);
00498adb      PStringBase<unsigned short>::break_reference(&var_8);
00498ae5      _wcslwr(var_8);
00498ae7      class PSRefBufferCharData<unsigned short>* eax_15 = var_4;
00498aeb      class PSRefBufferCharData<unsigned short>* ecx_6 = var_8;
00498aeb      
00498b00      if (eax_15->m_data[0x7ffffffffffffffe] != ecx_6->m_data[0x7ffffffffffffffe])
00498b00          goto label_498b5b;
00498b00      
00498b02      int32_t edx_5 = *(int32_t*)((char*)eax_15 + -8);
00498b05      int32_t esi_4 = *(int32_t*)((char*)ecx_6 + -8);
00498b05      
00498b14      if (((edx_5 != esi_4 && edx_5 != 0xffffffff) && esi_4 != 0xffffffff))
00498b0a          goto label_498b5b;
00498b0a      
00498b18      int32_t eax_16 = wcscmp(eax_15, ecx_6);
00498b1d      char eax_17 = ((int8_t)-(eax_16));
00498b1f      eax_17 = (eax_17 - eax_17);
00498b23      arg1 = (eax_17 + 1);
00498b27      void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_1c_10;
00498b27      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6;
00498b27      
00498b27      if (eax_17 == 0xff)
00498b27      {
00498b46          eax_15 = var_4;
00498b4a          ecx_6 = var_8;
00498b5b      label_498b5b:
00498b5b          ebx = wcscmp(eax_15, ecx_6) > 0;
00498b5e          esi_6 = &var_8->m_data[-0xa];
00498b64          var_1c_10 = ((char*)esi_6 + 4);
00498b27      }
00498b27      else
00498b27      {
00498b2f          uint8_t eax_19 = ContractInfoReverseSortName(ebx, arg2);
00498b3b          esi_6 = &var_8->m_data[-0xa];
00498b41          ebx = eax_19;
00498b43          var_1c_10 = ((char*)esi_6 + 4);
00498b27      }
00498b27      
00498b6d      if ((InterlockedDecrement(var_1c_10) == 0 && esi_6 != 0))
00498b75          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00498b75      
00498b7b      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_9 = &var_4->m_data[-0xa];
00498b7b      
00498b8a      if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
00498b92          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
00498b92      
00498b97      int32_t eax_24;
00498b97      eax_24 = ebx;
00498b9d      return eax_24;
004989a0  }

00498b9e                                                                                            90 90                                ..

00498ba0  class ContractInfo* _STL::__unguarded_partition(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo arg3, uint8_t (* arg4)(class ContractInfo const*, class ContractInfo const*))

00498ba0  {
00498ba6      class ContractInfo* esi = arg2;
00498bab      class ContractInfo* result = arg1;
00498bab      
00498bb6      while (true)
00498bb6      {
00498bbd          if (arg4(result, &arg3) != 0)
00498bbd          {
00498bd0              char i;
00498bd0              
00498bd0              do
00498bd0              {
00498bc5                  result = &result[1];
00498bc9                  i = arg4(result, &arg3);
00498bd0              } while (i != 0);
00498bbd          }
00498bbd          
00498bd2          esi -= 0x30;
00498bd2          
00498be2          if (arg4(&arg3, esi) != 0)
00498be2          {
00498bf4              char i_1;
00498bf4              
00498bf4              do
00498bf4              {
00498be4                  esi -= 0x30;
00498bed                  i_1 = arg4(&arg3, esi);
00498bf4              } while (i_1 != 0);
00498be2          }
00498be2          
00498bf8          if (result >= esi)
00498bf8              break;
00498bf8          
00498bfc          _STL::swap(result, esi);
00498c04          result = &result[1];
00498bb6      }
00498bb6      
00498c0d      ContractInfo::~ContractInfo(&arg3);
00498c17      return result;
00498ba0  }

00498c18                                                                          90 90 90 90 90 90 90 90                          ........

00498c20  void _STL::__pop_heap(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo* arg3, class ContractInfo arg4, uint8_t (* arg5)(class ContractInfo const*, class ContractInfo const*), int32_t* arg6)

00498c20  {
00498c2b      ContractInfo::operator=(arg3, arg1);
00498c3f      void var_3c;
00498c3f      ContractInfo::ContractInfo(&var_3c, &arg4);
00498c5f      _STL::__adjust_heap(arg1, 0, (((char*)arg2 - arg1) / 0x30), var_3c, arg5);
00498c6e      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &arg4.m_Status.m_charbuffer->m_data[-0xa];
00498c78      arg4.m_ContractTracker.vtable = 0x79285c;
00498c78      
00498c88      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00498c90          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00498c90      
00498c96      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &arg4.m_Name.m_charbuffer->m_data[-0xa];
00498c96      
00498ca5      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00498cad          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00498c20  }

00498cb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00498cc0  void _STL::__make_heap(class ContractInfo* arg1, class ContractInfo* arg2, uint8_t (* arg3)(class ContractInfo const*, class ContractInfo const*), class ContractInfo* arg4, int32_t* arg5)

00498cc0  {
00498cdb      int32_t edx_2 = (((char*)arg2 - arg1) / 0x30);
00498cdb      
00498ce4      if (edx_2 >= 2)
00498ce4      {
00498ce9          int32_t eax_4;
00498ce9          int32_t edx_3;
00498ce9          edx_3 = HIGHD(((int64_t)(edx_2 - 2)));
00498ce9          eax_4 = LOWD(((int64_t)(edx_2 - 2)));
00498cee          int32_t esi_2 = ((eax_4 - edx_3) >> 1);
00498cf6          void* edi_3 = &arg1[esi_2];
00498cf6          
00498d03          while (true)
00498d03          {
00498d03              void var_44;
00498d03              ContractInfo::ContractInfo(&var_44, edi_3);
00498d0b              _STL::__adjust_heap(arg1, esi_2, edx_2, var_44, arg3);
00498d0b              
00498d15              if (esi_2 == 0)
00498d15                  break;
00498d15              
00498d17              esi_2 -= 1;
00498d18              edi_3 -= 0x30;
00498d03          }
00498ce4      }
00498cc0  }

00498d22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00498d30  void _STL::__linear_insert(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo arg3, uint8_t (* arg4)(class ContractInfo const*, class ContractInfo const*))

00498d30  {
00498d36      uint8_t (* edi)(class ContractInfo const*, class ContractInfo const*) = arg4;
00498d36      
00498d47      if (edi(&arg3, arg1) == 0)
00498d47      {
00498d7b          void var_3c;
00498d7b          ContractInfo::ContractInfo(&var_3c, &arg3);
00498d85          _STL::__unguarded_linear_insert(arg2, var_3c, edi);
00498d47      }
00498d47      else
00498d47      {
00498d5a          _STL::__copy_backward(arg1, arg2, &arg2[1], &arg4, nullptr);
00498d69          ContractInfo::operator=(arg1, &arg3);
00498d47      }
00498d47      
00498d97      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &arg3.m_Status.m_charbuffer->m_data[-0xa];
00498d9e      arg3.m_ContractTracker.vtable = 0x79285c;
00498d9e      
00498dae      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00498db6          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00498db6      
00498dbc      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &arg3.m_Name.m_charbuffer->m_data[-0xa];
00498dbc      
00498dcb      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00498dd3          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00498d30  }

00498dd8                                                                          90 90 90 90 90 90 90 90                          ........

00498de0  void __stdcall gmContractsUI::FillProgressString(class gmContractsUI* this @ ecx, class CContractTracker const* arg2, class CContract* arg3, class PStringBase<unsigned short>* arg4)

00498de0  {
00498de4      class CContractTracker* esi = arg2;
00498de8      uint32_t _contract_stage = esi->_contract_stage;
00498de8      
00498df2      if (_contract_stage == 1)
00498df2      {
00498dfe          PStringBase<unsigned short>::sprintf(arg4, u"Available");
00498e0a          return;
00498df2      }
00498df2      
00498e10      if (_contract_stage == 2)
00498e10      {
00498e1c          PStringBase<unsigned short>::sprintf(arg4, u"In Progress");
00498e28          return;
00498e10      }
00498e10      
00498e2e      if (_contract_stage != 3)
00498e2e      {
00498f3a          if (_contract_stage >= 4)
00498f3a          {
00498f3d              class CContract* edi_1 = arg3;
00498f3d              
00498f47              if (edi_1->_description_progress.m_buffer->m_len == 1)
00498f47              {
00498f53                  PStringBase<unsigned short>::sprintf(arg4, u"In Progress");
00498f60                  return;
00498f47              }
00498f47              
00498f67              PStringBase<char>::PStringBase<char>(&arg3);
00498f75              int32_t var_14_6 = (esi->_contract_stage - 4);
00498f7f              PStringBase<char>::sprintf(&arg3, &edi_1->_description_progress.m_buffer->m_data);
00498f92              class PStringBase<unsigned short>* eax_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, arg3);
00498f9c              PStringBase<unsigned short>::operator=(arg4, eax_5);
00498fa5              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00498fae              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00498f3a          }
00498f3a          
00498fb8          return;
00498e2e      }
00498e2e      
00498e34      long double x87_r7 = ((long double)esi->_time_when_repeats);
00498e37      long double temp1 = ((long double)0.0);
00498e37      (x87_r7 - temp1);
00498e3d      _contract_stage = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00498e3d      
00498e42      if ((*(uint8_t*)((char*)_contract_stage)[1] & 0x41) != 0)
00498e42      {
00498f03          if (arg3->_questflag_repeat_time.m_buffer->m_len == 1)
00498f03          {
00498f0f              PStringBase<unsigned short>::sprintf(arg4, u"Done");
00498f1b              return;
00498f03          }
00498f03          
00498f28          PStringBase<unsigned short>::sprintf(arg4, u"Available");
00498f34          return;
00498e42      }
00498e42      
00498e51      long double x87_r7_3 = (((long double)esi->_time_when_repeats) - (((long double)Timer::cur_time) - ((long double)esi->_time_of_server_update)));
00498e54      double var_8 = ((double)x87_r7_3);
00498e58      long double temp2 = ((long double)0.0);
00498e58      (x87_r7_3 - temp2);
00498e5e      _contract_stage = ((((x87_r7_3 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2) ? 1 : 0) << 0xe) | 0))));
00498e5e      
00498e63      if ((*(uint8_t*)((char*)_contract_stage)[1] & 0x41) != 0)
00498e63      {
00498eea          PStringBase<unsigned short>::sprintf(arg4, u"Available");
00498ef6          return;
00498e63      }
00498e63      
00498e69      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3);
00498e7c      arg2 = _ftol2();
00498e87      int32_t var_18;
00498e87      var_18 = ((double)((long double)arg2));
00498e8a      ClientUISystem::DeltaTimeToString(var_18, &arg3);
00498e8f      class PStringBase<unsigned short>* esi_1 = arg4;
00498e99      PStringBase<unsigned short>::sprintf(esi_1, u"Done (");
00498ea8      PStringBase<unsigned short>::operator+=(esi_1, &arg3);
00498eb6      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg4, u" to Repeat)");
00498ec2      PStringBase<unsigned short>::operator+=(esi_1, &arg4);
00498ecb      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg4);
00498ed4      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00498de0  }

00498fbb                                                                                   90 90 90 90 90                             .....

00498fc0  void _STL::__insertion_sort(class ContractInfo* arg1, class ContractInfo* arg2, uint8_t (* arg3)(class ContractInfo const*, class ContractInfo const*))

00498fc0  {
00498fce      if (arg1 != arg2)
00498fce      {
00498fd5          for (void* __offset(ContractInfo, 0x30) i = &arg1[1]; i != arg2; i += 0x30)
00498fd5          {
00498fe7              void var_44;
00498fe7              ContractInfo::ContractInfo(&var_44, i);
00498fee              _STL::__linear_insert(arg1, i, var_44, arg3);
00498fd5          }
00498fce      }
00498fc0  }

00498fdd                                                                                         8d 49 00                               .I.
00499002        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00499010  void _STL::sort_heap(class ContractInfo* arg1, class ContractInfo* arg2, uint8_t (* arg3)(class ContractInfo const*, class ContractInfo const*))

00499010  {
00499034      if ((((char*)arg2 - arg1) / 0x30) > 1)
00499034      {
0049903f          void* __offset(ContractInfo, -0x30) esi_1 = ((char*)arg2 - 0x30);
0049903f          
00499077          do
00499077          {
00499044              int32_t* var_14_1 = nullptr;
0049904d              void var_48;
0049904d              ContractInfo::ContractInfo(&var_48, esi_1);
00499055              _STL::__pop_heap(arg1, esi_1, esi_1, var_48, arg3, var_14_1);
0049905a              esi_1 -= 0x30;
00499077          } while ((((0x30 - arg1) + esi_1) / 0x30) > 1);
00499034      }
00499010  }

0049907e                                                                                            90 90                                ..

00499080  void __thiscall gmContractsUI::gmContractsUI(class gmContractsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

00499080  {
0049908f      UIElement_Field::UIElement_Field(this, arg2, arg3);
00499094      this->vtable = &gmUrgentAssistanceUI::`vftable';
004990a0      this->vtable = 0x7a6c50;
004990a6      this->vtable = &gmContractsUI::`vftable';
004990b0      this->m_ContractList._M_start = 0;
004990b6      this->m_ContractList._M_finish = nullptr;
004990bc      this->m_ContractList._M_end_of_storage._M_data = 0;
004990c2      this->m_pContractsBox = nullptr;
004990c8      this->m_SortCriteria = eName;
004990ce      this->m_ReverseSort = 0;
004990d4      this->m_LastClickTime = 0f;
004990da      *(uint32_t*)((char*)this->m_LastClickTime)[4] = 0;
004990e0      this->m_timeNextUpdate = 0f;
004990e6      *(uint32_t*)((char*)this->m_timeNextUpdate)[4] = 0;
004990ec      this->m_LastClickIndex = 0xffffffff;
00499080  }

004990fc                                                                                      90 90 90 90                              ....

00499100  class UIElement* __thiscall gmContractsUI::DynamicCast(class gmContractsUI* this, uint32_t arg2) __pure

00499100  {
0049910c      if (arg2 == 0x1000004b)
00499119          return this;
00499119      
00499113      int32_t edx_1;
00499113      edx_1 = arg2 != 3;
00499117      return (this & (edx_1 - 1));
00499100  }

0049911c                                                                                      90 90 90 90                              ....

00499120  uint32_t gmContractsUI::GetUIElementType(class gmContractsUI const* this @ ecx) __pure

00499120  {
00499125      return 0x1000004b;
00499120  }

00499126                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00499130  void __fastcall gmContractsUI::~gmContractsUI(class gmContractsUI* this)

00499130  {
00499130      class gmContractsUI* this_1 = this;
0049913e      this->vtable = 0x7a6c50;
00499136      this->vtable = &gmContractsUI::`vftable';
0049914a      UIListener::UnRegisterForGlobalMessage(this, 3);
0049914f      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0049914f      
00499156      if (eax != 0)
00499158          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
00499158      
00499173      _STL::__destroy_aux(this->m_ContractList._M_start, this->m_ContractList._M_finish, &*(uint32_t*)((char*)this_1)[3]);
00499178      class ContractInfo* _M_start = this->m_ContractList._M_start;
00499178      
00499183      if (_M_start != 0)
00499183      {
00499192          int32_t eax_1;
00499192          int32_t edx_3;
00499192          edx_3 = HIGHD((0x2aaaaaab * (this->m_ContractList._M_end_of_storage._M_data - _M_start)));
00499192          eax_1 = LOWD((0x2aaaaaab * (this->m_ContractList._M_end_of_storage._M_data - _M_start)));
00499194          int32_t edx_4 = (edx_3 >> 3);
004991a6          _STL::__node_alloc<1,0>::deallocate(_M_start, ((edx_4 + (edx_4 >> 0x1f)) * 0x30));
00499183      }
00499183      
00499136      this->vtable = &gmUrgentAssistanceUI::`vftable';
004991b6      NoticeHandler::~NoticeHandler(&this->vtable);
004991bd      UIElement_Field::~UIElement_Field(this);
00499130  }

004991c7                       90 90 90 90 90 90 90 90 90                                                         .........

004991d0  class UIElement* gmContractsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004991d0  {
004991d5      void* eax = operator new(0x640);
004991d5      
004991df      if (eax == 0)
004991f5          return 0;
004991f5      
004991f2      return gmContractsUI::gmContractsUI(eax, arg1, arg2);
004991d0  }

004991f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00499200  void __fastcall gmContractsUI::UpdateButtons(class gmContractsUI* this)

00499200  {
00499200      int32_t ebp;
00499200      int32_t var_4 = ebp;
0049920a      int32_t* var_38 = &var_4;
0049920e      class UIElement_ListBox* m_pContractsBox = this->m_pContractsBox;
00499214      uint32_t m_num = m_pContractsBox->m_listItems.m_num;
0049921b      int32_t edi = 0;
0049921b      
0049921f      if (m_num > 0)
0049921f      {
00499225          int32_t m_pSelectedItem = m_pContractsBox->m_pSelectedItem;
0049922b          class UIElement** m_data = m_pContractsBox->m_listItems.m_data;
0049922b          
00499233          while (*(uint32_t*)m_data != m_pSelectedItem)
00499233          {
00499235              edi += 1;
00499236              m_data = &m_data[1];
00499236              
0049923b              if (edi >= m_num)
0049923b              {
00499243                  *(uint32_t*)var_38;
00499244                  return;
0049923b              }
00499233          }
00499233          
00499248          if (edi != 0xffffffff)
00499248          {
0049924e              int32_t var_44_1 = 0x10000010;
00499253              int32_t var_48_1 = 2;
00499255              int32_t var_4c_1 = 0x17;
00499257              class DBObj* eax = DBObj::GetByEnum(m_data, m_pSelectedItem, m_num);
00499257              
00499267              if (eax != 0)
00499267              {
00499276                  int32_t ebp_4 = (edi * 0x30);
00499280                  class CContract* eax_2 = CContractTable::GetContract(eax, *(uint32_t*)(&*(uint32_t*)((char*)this->m_ContractList._M_start->m_ContractTracker)[8] + ebp_4));
00499289                  uint32_t var_10;
00499289                  
00499289                  if (eax_2 == 0)
00499289                  {
0049928b                      eax->vtable->Release();
00499298                      *(uint32_t*)var_10;
00499299                      return;
00499289                  }
00499289                  
004992a7                  class PStringBase<unsigned short> var_20;
004992a7                  class PStringBase<unsigned short>* eax_5;
004992a7                  void* esi_2;
004992a7                  eax_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, WidthConvert, &eax_2->_description.m_buffer->m_data);
004992b3                  UIElement_Text::SetText(*(uint32_t*)((char*)esi_2 + 0x620), eax_5);
004992bc                  int32_t* ebx_4 = (var_20 - 0x14);
004992bc                  
004992cf                  if ((InterlockedDecrement(&ebx_4[1]) == 0 && ebx_4 != 0))
004992d7                      **(uint32_t**)ebx_4(1);
004992d7                  
004992d9                  class AC1Legacy::PSRefBuffer<char>* m_buffer = eax_2->_name_npc_end.m_buffer;
004992e6                  bool cond:1_1 = m_buffer->m_len == 1;
004992e8                  int32_t var_2c = 0;
004992ec                  int32_t var_28 = 0;
004992f0                  int32_t eax_9;
004992f0                  
004992f0                  if (!(cond:1_1))
004992f8                      eax_9 = *(uint32_t*)((*(uint32_t*)((char*)esi_2 + 0x5fc) + ebp_4) + 0x14);
004992f8                  
0049930c                  uint32_t objcell_id;
0049930c                  class gmContractsUI* esi_3;
0049930c                  
0049930c                  if ((!(cond:1_1) && ((eax_9 == 2 || eax_9 >= 4) || eax_2->_name_npc_start.m_buffer->m_len == 1)))
0049930c                  {
00499317                      class PStringBase<unsigned short>* eax_11;
00499317                      eax_11 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, WidthConvert, &m_buffer->m_data);
00499323                      UIElement_Text::SetText(esi_3->m_pContactText, eax_11);
0049932c                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
00499331                      objcell_id = eax_2->_location_npc_end.objcell_id;
0049930c                  }
0049930c                  else
0049930c                  {
00499345                      class PStringBase<unsigned short>* eax_12;
00499345                      eax_12 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, WidthConvert, &eax_2->_name_npc_start.m_buffer->m_data);
00499351                      UIElement_Text::SetText(esi_3->m_pContactText, eax_12);
0049935a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
0049935f                      objcell_id = eax_2->_location_npc_start.objcell_id;
0049930c                  }
0049930c                  
00499364                  int32_t var_1c;
00499364                  int32_t var_c;
00499364                  
00499364                  if (objcell_id > 0)
00499364                  {
0049937f                      class PStringBase<unsigned short>* var_44_12;
0049937f                      
0049937f                      if (LandDefs::gid_to_lcoord(objcell_id, &var_2c, &var_28) == 0)
0049937f                      {
00499478                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, u"Indoors");
00499481                          var_44_12 = &var_20;
0049937f                      }
0049937f                      else
0049937f                      {
00499389                          int32_t eax_14 = var_28;
00499393                          var_20 = (var_2c - 0x400);
00499397                          long double x87_r7_1 = ((long double)var_20);
004993a0                          var_20 = (eax_14 - 0x400);
004993b0                          var_10 = ((double)((x87_r7_1 * ((long double)0.10000000000000001)) + ((long double)0.5)));
004993c4                          *(uint64_t*)((char*)var_20 + 0) = ((double)((((long double)var_20) * ((long double)0.10000000000000001)) + ((long double)0.5)));
004993c8                          long double x87_r7_7 = ((long double)var_10);
004993cc                          long double temp0_1 = ((long double)0.0);
004993cc                          (x87_r7_7 - temp0_1);
004993d2                          class PStringBase<unsigned short> eax_15;
004993d2                          eax_15.m_charbuffer = ((((x87_r7_7 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004993d4                          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004993d7                          void (__thiscall** const ecx_16)(class gmNoticeHandler* this);
004993d7                          
004993d7                          if (p_1)
004993d7                          {
004993e0                              long double x87_r7_8 = ((long double)var_10);
004993e4                              ecx_16 = &gmJournalUI::`vftable'.RecvNotice_LastSpellTab;
004993e9                              long double temp3_1 = ((long double)0.0);
004993e9                              (x87_r7_8 - temp3_1);
004993ef                              eax_15.m_charbuffer = ((((x87_r7_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004993ef                              
004993f4                              if ((*(uint8_t*)((char*)eax_15.m_charbuffer)[1] & 0x41) != 0)
004993f6                                  ecx_16 = &data_794320;
004993d7                          }
004993d7                          else
004993d9                              ecx_16 = &gmJournalUI::`vftable'.RecvNotice_NextSpellSelection;
004993d9                          
004993fb                          long double x87_r7_9 = ((long double)*(uint64_t*)((char*)var_20 + 0));
004993ff                          long double temp5_1 = ((long double)0.0);
004993ff                          (x87_r7_9 - temp5_1);
00499405                          eax_15.m_charbuffer = ((((x87_r7_9 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp5_1) ? 1 : 0) << 0xe) | 0))));
00499407                          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0049940a                          void (__thiscall** const ebx_5)(class gmNoticeHandler* this);
0049940a                          
0049940a                          if (p_2)
0049940a                          {
00499413                              long double x87_r7_10 = ((long double)*(uint64_t*)((char*)var_20 + 0));
00499417                              ebx_5 = &gmJournalUI::`vftable'.RecvNotice_FirstSpellTab;
0049941c                              long double temp7_1 = ((long double)0.0);
0049941c                              (x87_r7_10 - temp7_1);
00499422                              eax_15.m_charbuffer = ((((x87_r7_10 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp7_1) ? 1 : 0) << 0xe) | 0))));
00499422                              
00499427                              if ((*(uint8_t*)((char*)eax_15.m_charbuffer)[1] & 0x41) != 0)
00499429                                  ebx_5 = &data_794320;
0049940a                          }
0049940a                          else
0049940c                              ebx_5 = &gmJournalUI::`vftable'.RecvNotice_LastSpellSelection;
0049940c                          
00499432                          void (__thiscall** const var_44_11)(class gmNoticeHandler* this) = ecx_16;
00499437                          int32_t var_48_3 = var_c;
0049943e                          uint32_t var_4c_3;
0049943e                          var_4c_3 = ((double)abs(var_10));
00499449                          void (__thiscall** const var_50_1)(class gmNoticeHandler* this) = ebx_5;
0049944a                          int32_t var_54_1 = var_1c;
00499451                          class PStringBase<unsigned short> var_58_1;
00499451                          *(uint64_t*)((char*)var_58_1 + 0) = ((double)abs(var_20));
00499460                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, Formatted, &gmJournalUI::`vftable'.RecvNotice_StopViewingObject);
0049946c                          var_44_12 = &var_20;
0049937f                      }
0049937f                      
00499488                      UIElement_Text::SetText(esi_3->m_pContactLocText, var_44_12);
00499491                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
00499364                  }
00499364                  
00499496                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049949b                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004994a3                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004994bc                  gmContractsUI::FillProgressString(esi_3, (&esi_3->m_ContractList._M_start->m_ContractTracker + ebp_4), eax_2, &PStringBase<unsigned short>::s_NullBuffer_2);
004994cc                  UIElement_Text::SetText(esi_3->m_pProgressText, &PStringBase<unsigned short>::s_NullBuffer_2);
004994d1                  uint32_t objcell_id_1 = eax_2->_location_quest_area.objcell_id;
004994d9                  uint32_t var_4c_4;
004994d9                  
004994d9                  if (objcell_id_1 > 0)
004994d9                  {
004994f4                      class PStringBase<unsigned short>* var_44_18;
004994f4                      
004994f4                      if (LandDefs::gid_to_lcoord(objcell_id_1, &var_2c, &var_28) == 0)
004994f4                      {
004995ed                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, u"Indoors");
004995f6                          var_44_18 = &var_20;
004994f4                      }
004994f4                      else
004994f4                      {
004994fe                          int32_t ecx_25 = var_28;
00499507                          var_20 = (var_2c - 0x400);
0049950b                          long double x87_r7_13 = ((long double)var_20);
00499515                          var_20 = (ecx_25 - 0x400);
00499525                          var_10 = ((double)((x87_r7_13 * ((long double)0.10000000000000001)) + ((long double)0.5)));
00499539                          *(uint64_t*)((char*)var_20 + 0) = ((double)((((long double)var_20) * ((long double)0.10000000000000001)) + ((long double)0.5)));
0049953d                          long double x87_r7_19 = ((long double)var_10);
00499541                          long double temp2_1 = ((long double)0.0);
00499541                          (x87_r7_19 - temp2_1);
00499547                          class PStringBase<unsigned short> eax_21;
00499547                          eax_21.m_charbuffer = ((((x87_r7_19 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_19, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_19 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00499549                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0049954c                          void (__thiscall** const ecx_27)(class gmNoticeHandler* this);
0049954c                          
0049954c                          if (p_3)
0049954c                          {
00499555                              long double x87_r7_20 = ((long double)var_10);
00499559                              ecx_27 = &gmJournalUI::`vftable'.RecvNotice_LastSpellTab;
0049955e                              long double temp4_1 = ((long double)0.0);
0049955e                              (x87_r7_20 - temp4_1);
00499564                              eax_21.m_charbuffer = ((((x87_r7_20 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_20, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_20 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00499564                              
00499569                              if ((*(uint8_t*)((char*)eax_21.m_charbuffer)[1] & 0x41) != 0)
0049956b                                  ecx_27 = &data_794320;
0049954c                          }
0049954c                          else
0049954e                              ecx_27 = &gmJournalUI::`vftable'.RecvNotice_NextSpellSelection;
0049954e                          
00499570                          long double x87_r7_21 = ((long double)*(uint64_t*)((char*)var_20 + 0));
00499574                          long double temp6_1 = ((long double)0.0);
00499574                          (x87_r7_21 - temp6_1);
0049957a                          eax_21.m_charbuffer = ((((x87_r7_21 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == temp6_1) ? 1 : 0) << 0xe) | 0))));
0049957c                          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
0049957f                          void (__thiscall** const ebx_6)(class gmNoticeHandler* this);
0049957f                          
0049957f                          if (p_4)
0049957f                          {
00499588                              long double x87_r7_22 = ((long double)*(uint64_t*)((char*)var_20 + 0));
0049958c                              ebx_6 = &gmJournalUI::`vftable'.RecvNotice_FirstSpellTab;
00499591                              long double temp8_1 = ((long double)0.0);
00499591                              (x87_r7_22 - temp8_1);
00499597                              eax_21.m_charbuffer = ((((x87_r7_22 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_22, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_22 == temp8_1) ? 1 : 0) << 0xe) | 0))));
00499597                              
0049959c                              if ((*(uint8_t*)((char*)eax_21.m_charbuffer)[1] & 0x41) != 0)
0049959e                                  ebx_6 = &data_794320;
0049957f                          }
0049957f                          else
00499581                              ebx_6 = &gmJournalUI::`vftable'.RecvNotice_LastSpellSelection;
00499581                          
004995ab                          void (__thiscall** const var_44_17)(class gmNoticeHandler* this) = ecx_27;
004995ac                          int32_t var_48_6 = var_c;
004995b3                          var_4c_4 = ((double)abs(var_10));
004995be                          void (__thiscall** const var_50_2)(class gmNoticeHandler* this) = ebx_6;
004995bf                          int32_t var_54_2 = var_1c;
004995c6                          class PStringBase<unsigned short> var_58_2;
004995c6                          *(uint64_t*)((char*)var_58_2 + 0) = ((double)abs(var_20));
004995d5                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, Formatted, &gmJournalUI::`vftable'.RecvNotice_StopViewingObject);
004995e1                          var_44_18 = &var_20;
004994f4                      }
004994f4                      
004995fd                      UIElement_Text::SetText(esi_3->m_pAreaText, var_44_18);
00499606                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
004994d9                  }
004994d9                  
00499612                  int32_t* ecx_35;
00499612                  
00499612                  if (eax_2->_questflag_timer.m_buffer->m_len != 1)
00499612                  {
0049962c                      class ContractInfo* _M_start = esi_3->m_ContractList._M_start;
0049963f                      long double x87_r7_27 = (((long double)*(uint64_t*)(&*(uint64_t*)((char*)_M_start->m_ContractTracker)[0x10] + ebp_4)) - (((long double)Timer::cur_time) - ((long double)*(uint64_t*)(&*(uint64_t*)((char*)_M_start->m_ContractTracker)[0x20] + ebp_4))));
00499642                      var_10 = ((double)x87_r7_27);
00499646                      long double temp1_1 = ((long double)0.0);
00499646                      (x87_r7_27 - temp1_1);
0049964c                      void* eax_24;
0049964c                      eax_24 = ((((x87_r7_27 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_27, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_27 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0049964c                      
00499651                      if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) != 0)
00499651                      {
0049969f                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, u"Finished");
004996af                          UIElement_Text::SetText(esi_3->m_pTimedText, &var_20);
004996b4                          ecx_35 = &var_20;
00499651                      }
00499651                      else
00499651                      {
00499657                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_28);
0049966a                          var_20 = _ftol2();
00499675                          var_4c_4 = ((double)((long double)var_20));
00499678                          ClientUISystem::DeltaTimeToString(var_4c_4, &var_28);
0049968b                          UIElement_Text::SetText(esi_3->m_pTimedText, &var_28);
00499690                          ecx_35 = &var_28;
00499651                      }
00499612                  }
00499612                  else
00499612                  {
0049961d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, &gmJournalUI::`vftable'.RecvNotice_AddSalvageItem);
004996af                      UIElement_Text::SetText(esi_3->m_pTimedText, &var_20);
004996b4                      ecx_35 = &var_20;
00499612                  }
00499612                  
004996b8                  PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_35);
004996c1                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_5 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
004996c1                  
004996d4                  if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
004996dc                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
004996dc                  
004996e2                  eax->vtable->Release();
00499267              }
00499248          }
0049921f      }
0049921f      
004996ed      *(uint32_t*)var_38;
00499200  }

004996ef                                               90                                                                 .

004996f0  void __fastcall gmContractsUI::AddContractToListbox(class gmContractsUI* this, class ContractInfo const* arg2)

004996f0  {
004996f4      int32_t __saved_ebx = 0x10000010;
004996f9      int32_t __saved_esi = 2;
004996fb      int32_t __saved_edi = 0x17;
004996ff      int32_t eax;
004996ff      int32_t edx;
004996ff      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
004996ff      
0049970d      if (eax_1 != 0)
0049970d      {
00499720          class CContract* eax_2 = CContractTable::GetContract(eax_1, arg2->m_ContractTracker._contract_id);
00499727          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00499734          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00499747          class UIElement* eax_4 = UIElement_ListBox::AddItemFromTemplateListByID(this->m_pContractsBox, 0x100005d7, nullptr);
00499755          class UIElement* eax_5 = UIElement::GetChildRecursive(eax_4, 0x100005d1);
00499755          
0049975c          if (eax_5 != 0)
0049975c          {
00499764              class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
00499764              
0049976c              if (eax_6 != 0)
00499771                  UIElement_Text::SetText(eax_6, 0x64);
0049975c          }
0049975c          
00499778          void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_1c_3;
00499778          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3;
00499778          
00499778          if (eax_2 != 0)
00499778          {
0049978e              class UIElement* eax_8 = UIElement::GetChildRecursive(eax_4, 0x100005d2);
0049978e              
00499795              if (eax_8 != 0)
00499795              {
0049979d                  class UIElement_Text* eax_9 = eax_8->vtable->DynamicCast(0xc);
0049979d                  
004997a7                  if (eax_9 != 0)
004997a7                  {
004997a9                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004997ae                      arg2 = PStringBase<unsigned short>::s_NullBuffer_2;
004997b6                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004997c8                      gmContractsUI::FillProgressString(this, 0x6c, eax_2, &arg2);
004997d4                      UIElement_Text::SetText(eax_9, &arg2);
004997dd                      void* __offset(ContractInfo, -0x14) esi_6 = ((char*)arg2 - 0x14);
004997dd                      
004997f0                      if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
004997f8                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
004997a7                  }
00499795              }
00499795              
004997fe              esi_3 = &PStringBase<unsigned short>::s_NullBuffer_1->m_data[-0xa];
00499804              var_1c_3 = ((char*)esi_3 + 4);
00499778          }
00499778          else
00499778          {
0049977e              esi_3 = &PStringBase<unsigned short>::s_NullBuffer_1->m_data[-0xa];
00499784              var_1c_3 = ((char*)esi_3 + 4);
00499778          }
00499778          
00499811          if ((InterlockedDecrement(var_1c_3) == 0 && esi_3 != 0))
00499819              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00499819          
0049981f          eax_1->vtable->Release();
0049970d      }
004996f0  }

0049982e                                            90 90                                                                ..

00499830  void __fastcall gmContractsUI::RefreshContractListbox(class gmContractsUI* this)

00499830  {
00499848      int32_t eax;
00499848      int32_t edx;
00499848      edx = HIGHD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
00499848      eax = LOWD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
0049984a      class UIElement_ListBox* m_pContractsBox = this->m_pContractsBox;
00499850      int32_t edx_1 = (edx >> 3);
00499855      int32_t eax_2 = (edx_1 >> 0x1f);
00499858      int32_t edx_2 = (edx_1 + eax_2);
00499858      
00499860      if (m_pContractsBox->m_listItems.m_num == edx_2)
00499860      {
00499866          int32_t __saved_edi_1 = 0x10000010;
0049986b          int32_t __saved_ebx_1 = 2;
0049986d          int32_t var_20_1 = 0x17;
00499874          class DBObj* ebp_1 = DBObj::GetByEnum(eax_2, edx_2, m_pContractsBox);
0049987b          class DBObj* var_4_1 = ebp_1;
0049987b          
0049987f          if (ebp_1 != 0)
0049987f          {
00499898              int32_t eax_4;
00499898              int32_t edx_4;
00499898              edx_4 = HIGHD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
00499898              eax_4 = LOWD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
0049989a              int32_t edx_5 = (edx_4 >> 3);
004998a0              uint32_t i = 0;
004998a7              uint32_t i_1 = 0;
004998a7              
004998ab              if (edx_5 != -((edx_5 >> 0x1f)))
004998ab              {
004998b2                  int32_t ebx_1 = 0;
00499a09                  int32_t edx_16;
00499a09                  
00499a09                  do
00499a09                  {
004998bb                      class UIElement* PStringBase<unsigned short>::s_NullBuffer_3 = UIElement_ListBox::GetItem(this->m_pContractsBox, i);
004998c7                      class UIElement* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_3;
004998cb                      class UIElement* eax_7 = UIElement::GetChildRecursive(PStringBase<unsigned short>::s_NullBuffer_3, 0x100005d1);
004998cb                      
004998d2                      if (eax_7 != 0)
004998d2                      {
004998da                          class UIElement_Text* eax_8 = eax_7->vtable->DynamicCast(0xc);
004998da                          
004998e2                          if (eax_8 != 0)
004998ef                              UIElement_Text::SetText(eax_8, (this->m_ContractList._M_start + ebx_1));
004998d2                      }
004998d2                      
004998f4                      int32_t ecx_10 = *(int32_t*)((char*)ebp_1 + 0x44);
004998ff                      int32_t edi_1 = *(uint32_t*)(&*(uint32_t*)((char*)this->m_ContractList._M_start->m_ContractTracker)[8] + ebx_1);
004998ff                      
00499903                      if (ecx_10 != 0)
00499903                      {
00499909                          int32_t ebp_2 = *(int32_t*)((char*)ebp_1 + 0x40);
00499909                          
0049990e                          if (ebp_2 != 0)
0049990e                          {
00499920                              for (int32_t* j = *(uint32_t*)(ebp_2 + ((COMBINE(0, edi_1) % ecx_10) << 2)); j != 0; j = j[0x45])
00499920                              {
00499928                                  if (edi_1 == *(uint32_t*)j)
00499928                                  {
0049993e                                      if (j != 0xfffffffc)
0049993e                                      {
0049994d                                          class UIElement* eax_11 = UIElement::GetChildRecursive(PStringBase<unsigned short>::s_NullBuffer_2, 0x100005d2);
0049994d                                          
00499954                                          if (eax_11 != 0)
00499954                                          {
00499960                                              class UIElement_Text* eax_12 = eax_11->vtable->DynamicCast(0xc);
00499960                                              
0049996a                                              if (eax_12 != 0)
0049996a                                              {
0049996c                                                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00499971                                                  PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
00499979                                                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00499992                                                  gmContractsUI::FillProgressString(this, (&this->m_ContractList._M_start->m_ContractTracker + ebx_1), &j[1], &PStringBase<unsigned short>::s_NullBuffer_2);
004999a6                                                  PStringBase<unsigned short>::operator=((&this->m_ContractList._M_start->m_Status + ebx_1), &PStringBase<unsigned short>::s_NullBuffer_2);
004999b2                                                  UIElement_Text::SetText(eax_12, &PStringBase<unsigned short>::s_NullBuffer_2);
004999bb                                                  void* __offset(UIElement, -0x14) edi_4 = ((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x14);
004999bb                                                  
004999ce                                                  if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
004999d6                                                      *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
0049996a                                              }
00499954                                          }
0049993e                                      }
0049993e                                      
0049993e                                      break;
00499928                                  }
00499920                              }
0049990e                          }
00499903                      }
00499903                      
004999e8                      ebp_1 = var_4_1;
004999f3                      int32_t eax_16;
004999f3                      int32_t edx_15;
004999f3                      edx_15 = HIGHD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
004999f3                      eax_16 = LOWD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
004999f5                      edx_16 = (edx_15 >> 3);
004999fd                      i = (i_1 + 1);
00499a00                      ebx_1 += 0x30;
00499a05                      i_1 = i;
00499a09                  } while (i < (edx_16 + (edx_16 >> 0x1f)));
004998ab              }
004998ab              
00499a12              gmContractsUI::UpdateButtons(this);
00499a17              ebp_1->vtable->Release();
0049987f          }
00499860      }
00499830  }

00499a26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00499a30  void __thiscall _STL::vector<ContractInfo,_STL::allocator<ContractInfo> >::_M_insert_overflow(class _STL::vector<ContractInfo,_STL::allocator<ContractInfo> >* this, class ContractInfo* arg2, class ContractInfo const* arg3, struct _STL::__false_type const* arg4, uint32_t arg5, uint8_t arg6)

00499a30  {
00499a41      int32_t eax;
00499a41      int32_t edx;
00499a41      edx = HIGHD((0x2aaaaaab * (this->_M_finish - this->_M_start)));
00499a41      eax = LOWD((0x2aaaaaab * (this->_M_finish - this->_M_start)));
00499a43      int32_t edx_1 = (edx >> 3);
00499a4b      int32_t edx_2 = (edx_1 + (edx_1 >> 0x1f));
00499a52      bool cond:0 = edx_2 < arg5;
00499a55      int32_t var_8 = edx_2;
00499a59      uint32_t* eax_4 = &arg5;
00499a59      
00499a5d      if (!(cond:0))
00499a5f          eax_4 = &var_8;
00499a5f      
00499a63      uint32_t eax_5 = *(uint32_t*)eax_4;
00499a65      int32_t eax_6 = (eax_5 + edx_2);
00499a67      int32_t var_4 = eax_6;
00499a67      
00499a6b      if (eax_5 == -(edx_2))
00499a97          var_8 = 0;
00499a6b      else
00499a6b      {
00499a70          int32_t eax_8 = (eax_6 * 0x30);
00499a79          int32_t ecx_1;
00499a79          
00499a79          if (eax_8 <= 0x80)
00499a79          {
00499a89              eax_6 = _STL::__node_alloc<1,0>::_M_allocate(eax_8);
00499a91              var_8 = eax_6;
00499a79          }
00499a79          else
00499a79          {
00499a7b              eax_6 = operator new(eax_8);
00499a83              var_8 = eax_6;
00499a79          }
00499a6b      }
00499a6b      
00499a9f      class ContractInfo* _M_start = this->_M_start;
00499aa1      class ContractInfo* ebp = arg2;
00499aa7      int32_t esi = var_8;
00499aa7      
00499aab      while (_M_start != ebp)
00499aab      {
00499ab2          if (esi != 0)
00499ab7              ContractInfo::ContractInfo(esi, _M_start);
00499ab7          
00499abc          _M_start = &_M_start[1];
00499abf          esi += 0x30;
00499aab      }
00499aab      
00499ac6      uint32_t i_1 = arg5;
00499ac6      
00499acd      if (i_1 == 1)
00499acd      {
00499ad1          if (esi != 0)
00499ada              ContractInfo::ContractInfo(esi, arg3);
00499ada          
00499adf          esi += 0x30;
00499acd      }
00499acd      else if (i_1 > 0)
00499ae6      {
00499b00          uint32_t i;
00499b00          
00499b00          do
00499b00          {
00499af2              if (esi != 0)
00499af7                  ContractInfo::ContractInfo(esi, arg3);
00499af7              
00499afc              esi += 0x30;
00499aff              i = i_1;
00499aff              i_1 -= 1;
00499b00          } while (i != 1);
00499b02          ebp = arg2;
00499ae6      }
00499ae6      
00499b06      eax_6 = arg6;
00499b06      
00499b0c      if (eax_6 == 0)
00499b21          esi = _STL::__uninitialized_copy(ebp, this->_M_finish, esi, &arg6);
00499b21      
00499b2f      _STL::__destroy_aux(this->_M_start, this->_M_finish, &arg6);
00499b34      class ContractInfo* _M_start_1 = this->_M_start;
00499b34      
00499b3b      if (_M_start_1 != 0)
00499b3b      {
00499b47          int32_t eax_12;
00499b47          int32_t edx_4;
00499b47          edx_4 = HIGHD((0x2aaaaaab * (this->_M_end_of_storage._M_data - _M_start_1)));
00499b47          eax_12 = LOWD((0x2aaaaaab * (this->_M_end_of_storage._M_data - _M_start_1)));
00499b49          int32_t edx_5 = (edx_4 >> 3);
00499b5b          _STL::__node_alloc<1,0>::deallocate(_M_start_1, ((edx_5 + (edx_5 >> 0x1f)) * 0x30));
00499b3b      }
00499b3b      
00499b67      int32_t eax_13 = var_8;
00499b6f      this->_M_finish = esi;
00499b79      this->_M_start = eax_13;
00499b7b      this->_M_end_of_storage._M_data = ((var_4 * 0x30) + eax_13);
00499a30  }

00499b85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00499b90  void _STL::__final_insertion_sort(class ContractInfo* arg1, class ContractInfo* arg2, uint8_t (* arg3)(class ContractInfo const*, class ContractInfo const*))

00499b90  {
00499bb2      if ((((char*)arg2 - arg1) / 0x30) <= 0x10)
00499bb2      {
00499be1          _STL::__insertion_sort(arg1, arg2, arg3);
00499beb          return;
00499bb2      }
00499bb2      
00499bc3      _STL::__insertion_sort(arg1, &arg1[0x10], arg3);
00499bcd      _STL::__unguarded_insertion_sort_aux(&arg1[0x10], arg2, nullptr, arg3);
00499b90  }

00499bec                                      90 90 90 90                                                              ....

00499bf0  void _STL::__partial_sort(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo* arg3, class ContractInfo* arg4, uint8_t (* arg5)(class ContractInfo const*, class ContractInfo const*))

00499bf0  {
00499c07      _STL::__make_heap(arg1, arg2, arg5, nullptr, nullptr);
00499c15      class ContractInfo* esi = arg2;
00499c15      
00499c17      if (arg2 < arg3)
00499c17      {
00499c4d          do
00499c4d          {
00499c29              if (arg5(esi, arg1) != 0)
00499c29              {
00499c2b                  int32_t* var_14_2 = nullptr;
00499c34                  void var_48;
00499c34                  ContractInfo::ContractInfo(&var_48, esi);
00499c3c                  _STL::__pop_heap(arg1, arg2, esi, var_48, arg5, var_14_2);
00499c29              }
00499c29              
00499c48              esi = &esi[1];
00499c4d          } while (esi < arg3);
00499c17      }
00499c17      
00499c52      _STL::sort_heap(arg1, arg2, arg5);
00499bf0  }

00499c5f                                                                                               90                                 .

00499c60  void* __thiscall gmContractsUI::`scalar deleting destructor'(class gmContractsUI* this, uint32_t arg2)

00499c60  {
00499c63      gmContractsUI::~gmContractsUI(this);
00499c63      
00499c6d      if ((arg2 & 1) != 0)
00499c70          operator delete(this);
00499c70      
00499c7b      return this;
00499c60  }

00499c7e                                                                                            90 90                                ..

00499c80  void gmContractsUI::Register()

00499c80  {
00499c8a      UIElement::RegisterElementClass(0x1000004b, gmContractsUI::Create);
00499c80  }

00499c93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00499ca0  void __fastcall gmContractsUI::RebuildContractListbox(class gmContractsUI* this)

00499ca0  {
00499ca5      class UIElement_ListBox* m_pContractsBox = this->m_pContractsBox;
00499cac      uint32_t m_num = m_pContractsBox->m_listItems.m_num;
00499cb2      uint32_t eax = 0;
00499cb6      uint32_t ebp;
00499cb6      
00499cb6      if (m_num <= 0)
00499cb6      {
00499cd4      label_499cd4:
00499cd4          ebp = 0xffffffff;
00499cb6      }
00499cb6      else
00499cb6      {
00499cbe          class UIElement** m_data = m_pContractsBox->m_listItems.m_data;
00499cbe          
00499cc6          while (*(uint32_t*)m_data != m_pContractsBox->m_pSelectedItem)
00499cc6          {
00499ccc              eax += 1;
00499ccd              m_data = &m_data[1];
00499ccd              
00499cd2              if (eax >= m_num)
00499cd2                  goto label_499cd4;
00499cc6          }
00499cc6          
00499d60          ebp = eax;
00499cb6      }
00499cb6      
00499cd7      UIElement_ListBox::Flush(m_pContractsBox);
00499ce6      UIElement_ListBox::SetSelectedItem(this->m_pContractsBox, nullptr, 1);
00499cfe      int32_t eax_1;
00499cfe      int32_t edx_2;
00499cfe      edx_2 = HIGHD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
00499cfe      eax_1 = LOWD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
00499d00      int32_t edx_3 = (edx_2 >> 3);
00499d05      uint32_t eax_3 = (edx_3 >> 0x1f);
00499d08      int32_t edi = 0;
00499d0a      int32_t edx_4 = (edx_3 + eax_3);
00499d0a      
00499d0c      if (edx_3 != -(eax_3))
00499d0c      {
00499d0e          int32_t ebx_2 = 0;
00499d0e          
00499d45          do
00499d45          {
00499d18              void* var_14_1 = (this->m_ContractList._M_start + ebx_2);
00499d1b              gmContractsUI::AddContractToListbox(this, edx_4);
00499d33              int32_t eax_4;
00499d33              int32_t edx_6;
00499d33              edx_6 = HIGHD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
00499d33              eax_4 = LOWD((0x2aaaaaab * (this->m_ContractList._M_finish - this->m_ContractList._M_start)));
00499d35              int32_t edx_7 = (edx_6 >> 3);
00499d3d              edi += 1;
00499d3e              edx_4 = (edx_7 + (edx_7 >> 0x1f));
00499d40              ebx_2 += 0x30;
00499d45          } while (edi < edx_4);
00499d0c      }
00499d0c      
00499d50      UIElement_ListBox::SetSelectedIndex(this->m_pContractsBox, ebp, 1);
00499d5b      /* tailcall */
00499d5b      return gmContractsUI::UpdateButtons(this);
00499ca0  }

00499d67                       90 90 90 90 90 90 90 90 90                                                         .........

00499d70  class ContractInfo* __thiscall _STL::vector<ContractInfo,_STL::allocator<ContractInfo> >::insert(class _STL::vector<ContractInfo,_STL::allocator<ContractInfo> >* this, class ContractInfo* arg2, class ContractInfo const* arg3)

00499d70  {
00499d87      int32_t eax;
00499d87      int32_t edx_1;
00499d87      edx_1 = HIGHD((0x2aaaaaab * ((char*)arg2 - this->_M_start)));
00499d87      eax = LOWD((0x2aaaaaab * ((char*)arg2 - this->_M_start)));
00499d89      class ContractInfo* _M_finish_1 = this->_M_finish;
00499d8c      int32_t edx_2 = (edx_1 >> 3);
00499d94      int32_t edx_3 = (edx_2 + (edx_2 >> 0x1f));
00499d94      
00499d9b      if (_M_finish_1 == this->_M_end_of_storage._M_data)
00499d9b      {
00499e42          _STL::vector<ContractInfo,_STL::allocator<ContractInfo> >::_M_insert_overflow(this, arg2, arg3, &arg3, 1, 0);
00499e57          return &this->_M_start[edx_3];
00499d9b      }
00499d9b      
00499da3      if (arg2 == _M_finish_1)
00499da3      {
00499da7          if (_M_finish_1 != 0)
00499dae              ContractInfo::ContractInfo(_M_finish_1, arg3);
00499dae          
00499db6          class ContractInfo* _M_start = this->_M_start;
00499dbb          this->_M_finish = &this->_M_finish[1];
00499dcc          return &_M_start[edx_3];
00499da3      }
00499da3      
00499dd1      if (_M_finish_1 != 0)
00499dd7          ContractInfo::ContractInfo(_M_finish_1, ((char*)_M_finish_1 - 0x30));
00499dd7      
00499ddc      this->_M_finish = &this->_M_finish[1];
00499de9      void var_30;
00499de9      ContractInfo::ContractInfo(&var_30, arg3);
00499dee      class ContractInfo* _M_finish = this->_M_finish;
00499e01      _STL::__copy_backward(arg2, ((char*)_M_finish - 0x60), ((char*)_M_finish - 0x30), &arg3, nullptr);
00499e10      ContractInfo::operator=(arg2, &var_30);
00499e19      ContractInfo::~ContractInfo(&var_30);
00499e2e      return &this->_M_start[edx_3];
00499d70  }

00499e5a                                                                                90 90 90 90 90 90                            ......

00499e60  void __thiscall gmContractsUI::ListenToGlobalMessage(class gmContractsUI* this, uint32_t arg2, int32_t arg3)

00499e60  {
00499e74      if ((arg2 == 3 && (((int8_t)(this->__bitfield164 >> 1)) & 1) != 0))
00499e74      {
00499e7c          (((long double)Timer::cur_time) - ((long double)this->m_timeNextUpdate));
00499e84          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00499e84          
00499e87          if (p_1)
00499e87          {
00499e89              gmContractsUI::RefreshContractListbox(this);
00499e9a              this->m_timeNextUpdate = ((double)(((long double)Timer::cur_time) + ((long double)0.5)));
00499e87          }
00499e74      }
00499e60  }

00499ea4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00499eb0  void __fastcall gmContractsUI::RebuildContractList(class gmContractsUI* this)

00499eb0  {
00499eb6      class ContractInfo* _M_finish = this->m_ContractList._M_finish;
00499ed7      void var_8d;
00499ed7      class ContractInfo* eax = _STL::__copy(_M_finish, _M_finish, this->m_ContractList._M_start, &var_8d, nullptr);
00499ee8      uint32_t ecx_2;
00499ee8      int32_t edx;
00499ee8      ecx_2 = _STL::__destroy_aux(eax, this->m_ContractList._M_finish, &var_8d);
00499ebf      this->m_ContractList._M_finish = eax;
00499ef3      class CPlayerSystem* eax_1 = CPlayerSystem::GetPlayerSystem();
00499ef3      
00499efc      if (eax_1 != 0)
00499efc      {
00499f03          int32_t var_a4_1 = 0x10000010;
00499f08          int32_t var_a8_1 = 2;
00499f0a          int32_t var_ac_1 = 0x17;
00499f11          class DBObj* edi_1 = DBObj::GetByEnum(eax_1, edx, ecx_2);
00499f18          class DBObj* var_88_1 = edi_1;
00499f18          
00499f1c          if (edi_1 != 0)
00499f1c          {
00499f2d              int32_t var_84 = 0x7a6930;
00499f35              void* var_7c_1 = nullptr;
00499f39              int32_t var_78_1 = 0;
00499f3d              int32_t var_74_1 = 0;
00499f41              PackableHashTable<unsigned long,CContractTracker>::operator=(&var_84, &eax_1->m_contractTrackerTable._contractTrackerHash);
00499f4a              int32_t* ecx_4 = &var_84;
00499f4a              
00499f4e              if (var_74_1 == 0)
00499f4e              {
00499f50                  PackableHashTable<unsigned long,CContractTracker>::~PackableHashTable<unsigned long,CContractTracker>(ecx_4);
00499f55                  edi_1->vtable->Release();
00499f66                  return;
00499f4e              }
00499f4e              
00499f6c              void __return;
00499f6c              PackableHashTable<unsigned long,CContractTracker>::begin(ecx_4, &__return);
00499f71              void* i_1;
00499f71              void* i = i_1;
00499f71              
00499f77              while (i != 0)
00499f77              {
00499f8b                  int32_t var_28;
00499f8b                  CContractTracker::CContractTracker(&var_28, ((char*)i + 8));
00499f9a                  uint32_t var_20;
00499f9a                  class CContract* eax_4 = CContractTable::GetContract(edi_1, var_20);
00499fa5                  void var_58;
00499fa5                  ContractInfo::ContractInfo(&var_58);
00499fb3                  void var_50;
00499fb3                  CContractTracker::operator=(&var_50, &var_28);
00499fc5                  class PStringBase<unsigned short> var_6c;
00499fc5                  int32_t* eax_7;
00499fc5                  int32_t ebx_2;
00499fc5                  eax_7 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_6c, WidthConvert, &eax_4->_contract_name.m_buffer->m_data);
00499fcc                  int32_t var_a4_8 = *(uint32_t*)eax_7;
00499fd7                  PStringBase<unsigned short>::sprintf(&var_58, &data_798070);
00499fe0                  int32_t* esi_4 = (var_6c - 0x14);
00499fe0                  
00499ff2                  if ((ebx_2(&esi_4[1]) == 0 && esi_4 != 0))
00499ffa                      **(uint32_t**)esi_4(1);
00499ffa                  
00499ffc                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049a001                  class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0049a009                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049a023                  gmContractsUI::FillProgressString(this, &var_28, eax_4, &PStringBase<unsigned short>::s_NullBuffer_2);
0049a030                  class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_4;
0049a030                  
0049a030                  if (PStringBase<unsigned short>::s_NullBuffer_4 != PStringBase<unsigned short>::s_NullBuffer_2)
0049a030                  {
0049a041                      if ((ebx_2((PStringBase<unsigned short>::s_NullBuffer_4 - 0x10)) == 0 && PStringBase<unsigned short>::s_NullBuffer_4 != 0x14))
0049a049                          **(uint32_t**)(PStringBase<unsigned short>::s_NullBuffer_4 - 0x14)(1);
0049a049                      
0049a04b                      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0049a04f                      PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_3;
0049a057                      InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
0049a030                  }
0049a030                  
0049a06b                  _STL::vector<ContractInfo,_STL::allocator<ContractInfo> >::insert(&this->m_ContractList, this->m_ContractList._M_finish, &var_58);
0049a074                  int32_t* esi_7 = (PStringBase<unsigned short>::s_NullBuffer_2 - 0x14);
0049a074                  
0049a083                  if ((ebx_2(&esi_7[1]) == 0 && esi_7 != 0))
0049a08b                      **(uint32_t**)esi_7(1);
0049a08b                  
0049a091                  ContractInfo::~ContractInfo(&var_58);
0049a09a                  var_28 = 0x79285c;
0049a0a2                  PackableHashIterator<unsigned long,CContractTracker>::GetNext(&__return);
0049a0a7                  i = i_1;
0049a0ad                  edi_1 = var_88_1;
00499f77              }
00499f77              
0049a0bd              var_84 = 0x7a6930;
0049a0c5              PackableHashTable<unsigned long,CContractTracker>::EmptyContents(&var_84);
0049a0c5              
0049a0d0              if (var_7c_1 != 0)
0049a0d3                  operator delete[](var_7c_1);
0049a0d3              
0049a0db              edi_1->vtable->Release();
00499f1c          }
00499efc      }
00499eb0  }

0049a0ed                                         90 90 90                                                               ...

0049a0f0  void _STL::__introsort_loop(class ContractInfo* arg1, class ContractInfo* arg2, class ContractInfo* arg3, int32_t arg4, uint8_t (* arg5)(class ContractInfo const*, class ContractInfo const*))

0049a0f0  {
0049a0f1      class ContractInfo* ebx = arg2;
0049a0f1      
0049a114      if ((((char*)ebx - arg1) / 0x30) > 0x10)
0049a114      {
0049a126          while (arg4 != 0)
0049a126          {
0049a145              int32_t eax_8;
0049a145              int32_t edx_4;
0049a145              edx_4 = HIGHD(((int64_t)(((char*)ebx - arg1) / 0x30)));
0049a145              eax_8 = LOWD(((int64_t)(((char*)ebx - arg1) / 0x30)));
0049a149              arg4 -= 1;
0049a155              void* __offset(ContractInfo, -0x30) esi_5 = &arg1[((eax_8 - edx_4) >> 1)];
0049a155              
0049a164              if (arg5(arg1, esi_5) == 0)
0049a164              {
0049a18a                  if (arg5(arg1, ((char*)ebx - 0x30)) == 0)
0049a18a                  {
0049a19c                      if (arg5(esi_5, ((char*)ebx - 0x30)) != 0)
0049a19e                          esi_5 = ((char*)ebx - 0x30);
0049a18a                  }
0049a18a                  else
0049a18c                      esi_5 = arg1;
0049a164              }
0049a164              else if (arg5(esi_5, ((char*)ebx - 0x30)) == 0)
0049a16e              {
0049a170                  esi_5 = ((char*)ebx - 0x30);
0049a170                  
0049a17c                  if (arg5(arg1, esi_5) == 0)
0049a17e                      esi_5 = arg1;
0049a16e              }
0049a16e              
0049a1a8              void var_44;
0049a1a8              ContractInfo::ContractInfo(&var_44, esi_5);
0049a1af              class ContractInfo* eax_18 = _STL::__unguarded_partition(arg1, ebx, var_44, arg5);
0049a1c0              _STL::__introsort_loop(eax_18, ebx, nullptr, arg4, arg5);
0049a1c5              ebx = eax_18;
0049a1c5              
0049a1e0              if ((((char*)eax_18 - arg1) / 0x30) <= 0x10)
0049a1ea                  return;
0049a126          }
0049a126          
0049a1f1          _STL::__partial_sort(arg1, ebx, ebx, nullptr, arg5);
0049a114      }
0049a0f0  }

0049a1fe                                                                                            90 90                                ..

0049a200  void _STL::sort(class ContractInfo* arg1, class ContractInfo* arg2, uint8_t (* arg3)(class ContractInfo const*, class ContractInfo const*))

0049a200  {
0049a20c      if (arg1 != arg2)
0049a20c      {
0049a221          int32_t i = (((char*)arg2 - arg1) / 0x30);
0049a223          int32_t eax_4 = 0;
0049a223          
0049a228          while (i != 1)
0049a228          {
0049a230              i s>>= 1;
0049a232              eax_4 += 1;
0049a228          }
0049a228          
0049a238          int32_t ebx;
0049a238          int32_t var_c_1 = ebx;
0049a246          _STL::__introsort_loop(arg1, arg2, nullptr, (eax_4 * 2), arg3);
0049a24e          _STL::__final_insertion_sort(arg1, arg2, arg3);
0049a20c      }
0049a200  }

0049a25a                                                                                90 90 90 90 90 90                            ......

0049a260  void __fastcall gmContractsUI::SortContractList(class gmContractsUI* this)

0049a260  {
0049a263      gmContractsUI::RebuildContractListbox(this);
0049a268      enum ContractSortCriteria m_SortCriteria = this->m_SortCriteria;
0049a268      
0049a271      if (m_SortCriteria == eName)
0049a271      {
0049a314          int32_t eax;
0049a314          eax = this->m_ReverseSort;
0049a314          
0049a31c          if (eax != 0)
0049a31c          {
0049a331              _STL::sort(this->m_ContractList._M_start, this->m_ContractList._M_finish, ContractInfoReverseSortName);
0049a33c              /* tailcall */
0049a33c              return gmContractsUI::RebuildContractListbox(this);
0049a31c          }
0049a31c          
0049a354          _STL::sort(this->m_ContractList._M_start, this->m_ContractList._M_finish, ContractInfoSortName);
0049a35f          /* tailcall */
0049a35f          return gmContractsUI::RebuildContractListbox(this);
0049a271      }
0049a271      
0049a278      uint8_t m_ReverseSort = this->m_ReverseSort;
0049a278      
0049a27e      if (m_SortCriteria != 1)
0049a27e      {
0049a282          if (m_ReverseSort == 0)
0049a282          {
0049a2ba              _STL::sort(this->m_ContractList._M_start, this->m_ContractList._M_finish, ContractInfoSortName);
0049a2c5              /* tailcall */
0049a2c5              return gmContractsUI::RebuildContractListbox(this);
0049a282          }
0049a282          
0049a297          _STL::sort(this->m_ContractList._M_start, this->m_ContractList._M_finish, ContractInfoReverseSortName);
0049a2a2          /* tailcall */
0049a2a2          return gmContractsUI::RebuildContractListbox(this);
0049a27e      }
0049a27e      
0049a2cc      if (m_ReverseSort == 0)
0049a2cc      {
0049a304          _STL::sort(this->m_ContractList._M_start, this->m_ContractList._M_finish, ContractInfoSortStatus);
0049a30f          /* tailcall */
0049a30f          return gmContractsUI::RebuildContractListbox(this);
0049a2cc      }
0049a2cc      
0049a2e1      _STL::sort(this->m_ContractList._M_start, this->m_ContractList._M_finish, ContractInfoReverseSortStatus);
0049a2ec      /* tailcall */
0049a2ec      return gmContractsUI::RebuildContractListbox(this);
0049a260  }

0049a364              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0049a370  void __fastcall gmContractsUI::RecvNotice_UpdateContractTrackerTable(class gmContractsUI* this, class CContractTrackerTable const* arg2)

0049a370  {
0049a379      gmContractsUI::RebuildContractList(((char*)this - 0x5f8));
0049a380      gmContractsUI::SortContractList(((char*)this - 0x5f8));
0049a370  }

0049a389                             90 90 90 90 90 90 90                                                           .......

0049a390  void __fastcall gmContractsUI::RecvNotice_UpdateContractTracker(class gmContractsUI* this, class CContractTracker const* arg2, int32_t arg3)

0049a390  {
0049a399      gmContractsUI::RebuildContractList(((char*)this - 0x5f8));
0049a3a0      gmContractsUI::SortContractList(((char*)this - 0x5f8));
0049a390  }

0049a3a9                             90 90 90 90 90 90 90                                                           .......

0049a3b0  enum UIElementMessageListenResult __thiscall gmContractsUI::ListenToElementMessage(class gmContractsUI* this, struct UIElementMessageInfo const* arg2)

0049a3b0  {
0049a3b6      uint32_t idMessage = arg2->idMessage;
0049a3b6      
0049a3bc      if (idMessage == 1)
0049a3bc      {
0049a3fe          uint32_t idElement = arg2->idElement;
0049a405          enum ContractSortCriteria eax_13;
0049a405          
0049a405          if (idElement == 0x100005ce)
0049a405          {
0049a48f              if (this->m_SortCriteria != eName)
0049a48f              {
0049a4a2                  this->m_ReverseSort = 0;
0049a4a8                  this->m_SortCriteria = eName;
0049a4b0                  gmContractsUI::SortContractList(this);
0049a48f              }
0049a48f              else
0049a48f              {
0049a497                  eax_13 = this->m_ReverseSort == 0;
0049a49a                  this->m_ReverseSort = eax_13;
0049a4b0                  gmContractsUI::SortContractList(this);
0049a48f              }
0049a405          }
0049a405          else if (idElement == 0x100005d6)
0049a40a          {
0049a467              if (this->m_SortCriteria != eStatus)
0049a467              {
0049a47c                  this->m_ReverseSort = 0;
0049a4a8                  this->m_SortCriteria = eStatus;
0049a4b0                  gmContractsUI::SortContractList(this);
0049a467              }
0049a467              else
0049a467              {
0049a469                  eax_13 = this->m_ReverseSort;
0049a474                  this->m_ReverseSort = eax_13 == 0;
0049a4b0                  gmContractsUI::SortContractList(this);
0049a467              }
0049a40a          }
0049a40a          else if (idElement == 0x100005dc)
0049a40f          {
0049a41b              int32_t eax_8 = UIElement_ListBox::GetSelectedIndex(this->m_pContractsBox);
0049a41b              
0049a423              if (eax_8 != 0xffffffff)
0049a423              {
0049a435                  uint32_t eax_11 = *(uint32_t*)((char*)this->m_ContractList._M_start[eax_8].m_ContractTracker)[8];
0049a435                  
0049a43b                  if (eax_11 > 0)
0049a43b                  {
0049a43e                      CM_Social::Event_AbandonContract(eax_11);
0049a448                      gmContractsUI::UpdateButtons(this);
0049a457                      return UIElement::ListenToElementMessage(this, arg2);
0049a43b                  }
0049a423              }
0049a40f          }
0049a4b7          gmContractsUI::UpdateButtons(this);
0049a3bc      }
0049a3bc      else if (idMessage == 4)
0049a4b7          gmContractsUI::UpdateButtons(this);
0049a3c1      else if (idMessage == 0x43)
0049a3ca      {
0049a3d6          int32_t eax_3 = UIElement_ListBox::GetSelectedIndex(this->m_pContractsBox);
0049a3d6          
0049a3de          if (eax_3 != 0xffffffff)
0049a3de          {
0049a3e7              gmContractsUI::CheckForDoubleClick(this, eax_3);
0049a3ec              gmContractsUI::UpdateButtons(this);
0049a3fb              return UIElement::ListenToElementMessage(this, arg2);
0049a3de          }
0049a3de          
0049a4b7          gmContractsUI::UpdateButtons(this);
0049a3ca      }
0049a3ca      
0049a4c6      return UIElement::ListenToElementMessage(this, arg2);
0049a3b0  }

0049a4c9                             90 90 90 90 90 90 90                                                           .......

0049a4d0  void __thiscall gmContractsUI::OnVisibilityChanged(class gmContractsUI* this, uint8_t arg2)

0049a4d0  {
0049a4d9      UIElement::OnVisibilityChanged(this, arg2);
0049a4d9      
0049a4e0      if (arg2 != 0)
0049a4e0      {
0049a4e4          gmContractsUI::RebuildContractList(this);
0049a4eb          gmContractsUI::SortContractList(this);
0049a4e0      }
0049a4d0  }

0049a4f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0049a500  void __fastcall gmCharacterTitleUI::UpdateButtons(class gmCharacterTitleUI* this)

0049a500  {
0049a500      class gmCharacterTitleUI* this_1 = this;
0049a506      class UIElement_ListBox* m_pTitleListBox = this->m_pTitleListBox;
0049a50c      uint32_t m_num = m_pTitleListBox->m_listItems.m_num;
0049a512      uint32_t eax = 0;
0049a512      
0049a516      if (m_num <= 0)
0049a516      {
0049a530      label_49a530:
0049a530          eax = 0xffffffff;
0049a516      }
0049a516      else
0049a516      {
0049a51e          int32_t* m_data = m_pTitleListBox->m_listItems.m_data;
0049a51e          
0049a526          while (*(uint32_t*)m_data != m_pTitleListBox->m_pSelectedItem)
0049a526          {
0049a528              eax += 1;
0049a529              m_data = &m_data[1];
0049a529              
0049a52e              if (eax >= m_num)
0049a52e                  goto label_49a530;
0049a526          }
0049a516      }
0049a516      
0049a534      class UIElement* eax_1 = UIElement_ListBox::GetItem(m_pTitleListBox, eax);
0049a534      
0049a53b      if (eax_1 != 0)
0049a53b      {
0049a549          this_1 = nullptr;
0049a551          UIElement::GetAttribute_Enum(eax_1, 0x1000008e, &this_1);
0049a551          
0049a560          if (this_1 != this->m_characterTitleTable.mDisplayTitle)
0049a560          {
0049a562              this->m_pDisplayButton->vtable->SetState(1);
0049a576              return;
0049a560          }
0049a53b      }
0049a53b      
0049a577      this->m_pDisplayButton->vtable->SetState(0xd);
0049a500  }

0049a58c                                      90 90 90 90                                                              ....

0049a590  int32_t __thiscall AC1Legacy::List<unsigned long>::insert(class AC1Legacy::List<unsigned long>* this, class AC1Legacy::ListNode<unsigned long>* arg2, uint32_t const* arg3)

0049a590  {
0049a595      void* eax = operator new(0xc);
0049a595      
0049a59f      if (eax == 0)
0049a5d3          return 0;
0049a5d3      
0049a5a7      *(uint32_t*)eax = *(uint32_t*)arg3;
0049a5a9      *(uint32_t*)((char*)eax + 4) = 0;
0049a5b0      *(uint32_t*)((char*)eax + 8) = 0;
0049a5b0      
0049a5bc      if (this->_head == 0)
0049a5bc      {
0049a5be          this->_head = eax;
0049a5c1          this->_tail = eax;
0049a5c4          this->_num_elements += 1;
0049a5cd          return 1;
0049a5bc      }
0049a5bc      
0049a5da      *(uint32_t*)((char*)eax + 4) = arg2;
0049a5e0      *(uint32_t*)((char*)eax + 8) = arg2->prev;
0049a5e3      class AC1Legacy::ListNode<unsigned long>* prev = arg2->prev;
0049a5e3      
0049a5e8      if (prev == 0)
0049a5e8      {
0049a5fc          this->_head = eax;
0049a5ff          arg2->prev = eax;
0049a602          this->_num_elements += 1;
0049a60b          return 1;
0049a5e8      }
0049a5e8      
0049a5ea      prev->next = eax;
0049a5ed      arg2->prev = eax;
0049a5f0      this->_num_elements += 1;
0049a5f9      return 1;
0049a590  }

0049a60e                                            90 90                                                                ..

0049a610  void __fastcall gmCharacterTitleUI::PostInit(class gmCharacterTitleUI* this)

0049a610  {
0049a614      UIElement::PostInit(this);
0049a620      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000052f);
0049a627      class UIElement_Text* eax_1;
0049a627      
0049a627      if (eax == 0)
0049a637          eax_1 = nullptr;
0049a627      else
0049a62f          eax_1 = eax->vtable->DynamicCast(0xc);
0049a62f      
0049a640      this->m_pDisplayTitleText = eax_1;
0049a646      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x10000535);
0049a64d      class UIElement_Button* eax_3;
0049a64d      
0049a64d      if (eax_2 == 0)
0049a65d          eax_3 = nullptr;
0049a64d      else
0049a655          eax_3 = eax_2->vtable->DynamicCast(1);
0049a655      
0049a666      this->m_pDisplayButton = eax_3;
0049a66c      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000532);
0049a673      class UIElement_ListBox* eax_5;
0049a673      
0049a673      if (eax_4 == 0)
0049a683          eax_5 = nullptr;
0049a673      else
0049a67b          eax_5 = eax_4->vtable->DynamicCast(5);
0049a67b      
0049a685      this->m_pTitleListBox = eax_5;
0049a68b      class GlobalEventHandler* eax_6 = GlobalEventHandler::GetGlobalEventHandler();
0049a68b      
0049a694      if (eax_6 != 0)
0049a694      {
0049a696          eax_6->vtable->RegisterNoticeHandler(0x4dd277, &this->vtable);
0049a6a9          eax_6->vtable->RegisterNoticeHandler(0x4dd279, &this->vtable);
0049a6b6          eax_6->vtable->RegisterNoticeHandler(0x4dd278, &this->vtable);
0049a694      }
0049a610  }

0049a6c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049a6d0  enum UIElementMessageListenResult __thiscall gmCharacterTitleUI::ListenToElementMessage(class gmCharacterTitleUI* this, struct UIElementMessageInfo const* arg2)

0049a6d0  {
0049a6d1      struct UIElementMessageInfo* ebx = arg2;
0049a6d5      uint32_t idMessage = ebx->idMessage;
0049a6d5      
0049a6dc      if (idMessage == 1)
0049a6dc      {
0049a702          if (ebx->idElement == 0x10000535)
0049a702          {
0049a705              class UIElement_ListBox* m_pTitleListBox = this->m_pTitleListBox;
0049a715              class UIElement* eax_5 = UIElement_ListBox::GetItem(m_pTitleListBox, UIElement_ListBox::GetSelectedIndex(m_pTitleListBox));
0049a715              
0049a71d              if (eax_5 != 0)
0049a71d              {
0049a72b                  arg2 = nullptr;
0049a733                  UIElement::GetAttribute_Enum(eax_5, 0x1000008e, &arg2);
0049a73d                  CM_Social::Event_SetDisplayCharacterTitle(arg2);
0049a71d              }
0049a702          }
0049a6dc      }
0049a6dc      else if ((idMessage == 4 || idMessage == 0x43))
0049a6ea          gmCharacterTitleUI::UpdateButtons(this);
0049a6ea      
0049a74f      return UIElement::ListenToElementMessage(this, ebx);
0049a6d0  }

0049a752                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0049a760  class UIElement* __thiscall gmCharacterTitleUI::FindSortedInsertPosition(class gmCharacterTitleUI* this, class PStringBase<unsigned short> const* arg2)

0049a760  {
0049a764      class gmCharacterTitleUI* this_1 = this;
0049a766      class UIElement_ListBox* m_pTitleListBox = this_1->m_pTitleListBox;
0049a774      uint32_t i = 0;
0049a779      class gmCharacterTitleUI* this_2 = this_1;
0049a77d      uint32_t i_1 = 0;
0049a77d      
0049a781      if (m_pTitleListBox->m_listItems.m_num > 0)
0049a781      {
0049a787          class PStringBase<unsigned short>* ebp_1 = arg2;
0049a787          
0049a81d          do
0049a81d          {
0049a791              class UIElement* result = UIElement_ListBox::GetItem(m_pTitleListBox, i);
0049a791              
0049a79a              if (result != 0)
0049a79a              {
0049a7a3                  class UIElement* eax_1 = UIElement::GetChildRecursive(result, 0x10000537);
0049a7aa                  class UIElement_Text* eax_2;
0049a7aa                  
0049a7aa                  if (eax_1 == 0)
0049a7ba                      eax_2 = nullptr;
0049a7aa                  else
0049a7b2                      eax_2 = eax_1->vtable->DynamicCast(0xc);
0049a7b2                  
0049a7c8                  class PSRefBufferCharData<unsigned short>* m_charbuffer = UIElement_Text::GetText(eax_2, &arg2)->m_charbuffer;
0049a7de                  this_1 = wcscmp(ebp_1->m_charbuffer, m_charbuffer) < 0;
0049a7e1                  void* __offset(PStringBase<unsigned short>, -0x14) esi_1 = &arg2[-5];
0049a7e1                  
0049a7f4                  if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0049a7fc                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0049a7fc                  
0049a800                  if (this_1 != 0)
0049a838                      return result;
0049a838                  
0049a802                  this_1 = this_2;
0049a806                  i = i_1;
0049a79a              }
0049a79a              
0049a80a              m_pTitleListBox = this_1->m_pTitleListBox;
0049a816              i += 1;
0049a819              i_1 = i;
0049a81d          } while (i < m_pTitleListBox->m_listItems.m_num);
0049a781      }
0049a781      
0049a82c      return 0;
0049a760  }

0049a78d                                         8d 49 00                                                               .I.
0049a83b                                                                                   90 90 90 90 90                             .....

0049a840  uint8_t __thiscall gmCharacterTitleUI::AddTitleToList(class gmCharacterTitleUI* this, uint32_t arg2)

0049a840  {
0049a842      uint32_t edi = arg2;
0049a842      
0049a84a      if (edi != 0)
0049a84a      {
0049a850          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049a855          arg2 = PStringBase<unsigned short>::s_NullBuffer_1;
0049a85d          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049a85d          
0049a873          if (CharacterTitleTable::GetCharacterTitleFromID(edi, &arg2) != 0)
0049a873          {
0049a87c              class UIElement* eax_3 = gmCharacterTitleUI::FindSortedInsertPosition(this, &arg2);
0049a88a              class UIElement* eax_4 = UIElement_ListBox::AddItemFromTemplateList(this->m_pTitleListBox, 0, eax_3);
0049a898              class UIElement* eax_5 = UIElement::GetChildRecursive(eax_4, 0x10000537);
0049a898              
0049a89f              if (eax_5 != 0)
0049a89f              {
0049a8a7                  class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
0049a8a7                  
0049a8af                  if (eax_6 != 0)
0049a8af                  {
0049a8b8                      UIElement_Text::SetText(eax_6, &arg2);
0049a8c5                      UIElement::SetAttribute_Enum(eax_4, 0x1000008e, edi);
0049a8ce                      int32_t* esi_3 = (arg2 - 0x14);
0049a8ce                      
0049a8e1                      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0049a8e9                          **(uint32_t**)esi_3(1);
0049a8e9                      
0049a8ec                      int32_t eax_7;
0049a8ec                      eax_7 = 1;
0049a8ef                      return 1;
0049a8af                  }
0049a89f              }
0049a873          }
0049a873          
0049a8f6          int32_t* esi_5 = (arg2 - 0x14);
0049a8f6          
0049a909          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0049a911              **(uint32_t**)esi_5(1);
0049a84a      }
0049a84a      
0049a914      int32_t eax;
0049a914      eax = 0;
0049a917      return 0;
0049a840  }

0049a91a                                                                                90 90 90 90 90 90                            ......

0049a920  class List<StringTableMetaLanguage::Node const *>* __thiscall List<unsigned long>::operator=(class List<StringTableMetaLanguage::Node const *>* arg1, void* arg2)

0049a920  {
0049a92a      if (arg1 != arg2)
0049a92a      {
0049a92d          List<StringTableMetaLanguage::Node const *>::flush(arg1);
0049a92d          
0049a939          for (int32_t* i = *(uint32_t*)((char*)arg2 + 4); i != 0; i = i[1])
0049a939          {
0049a942              class ListNode<StringTableMetaLanguage::Node const *>* eax_1 = operator new(0xc);
0049a942              
0049a94c              if (eax_1 != 0)
0049a94c              {
0049a950                  eax_1->data = *(uint32_t*)i;
0049a952                  eax_1->next = nullptr;
0049a955                  eax_1->prev = nullptr;
0049a955                  
0049a95b                  if (arg1->_head != 0)
0049a95b                  {
0049a962                      class ListNode<StringTableMetaLanguage::Node const *>* _tail = arg1->_tail;
0049a965                      _tail->next = eax_1;
0049a968                      eax_1->prev = _tail;
0049a95b                  }
0049a95b                  else
0049a95d                      arg1->_head = eax_1;
0049a95d                  
0049a96b                  arg1->_tail = eax_1;
0049a96e                  arg1->_num_elements += 1;
0049a94c              }
0049a94c              
0049a973              if (i == 0)
0049a973                  break;
0049a939          }
0049a92a      }
0049a92a      
0049a981      return arg1;
0049a920  }

0049a93d                                                                                         8d 49 00                               .I.
0049a984              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0049a990  void __thiscall gmCharacterTitleUI::RecvNotice_AddCharacterTitle(class gmCharacterTitleUI* this, uint32_t arg2)

0049a990  {
0049a993      class HashSetData<UIElement *>* m_hashNext_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4];
0049a99a      uint32_t edi = arg2;
0049a99e      class HashSetData<UIElement *>* m_hashNext = m_hashNext_1;
0049a9a2      arg2 = edi;
0049a9a2      
0049a9a6      for (; m_hashNext != 0; m_hashNext = m_hashNext->m_hashNext)
0049a9a6      {
0049a9aa          if (m_hashNext->m_hashKey == edi)
0049a9d0              return;
0049a9a6      }
0049a9a6      
0049a9c0      if (AC1Legacy::List<unsigned long>::insert(&this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3], m_hashNext_1, &arg2) != 0)
0049a9c9          gmCharacterTitleUI::AddTitleToList(((char*)this - 0x5f8), edi);
0049a990  }

0049a9d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049a9e0  void __fastcall CharacterTitleTable::~CharacterTitleTable(class CharacterTitleTable* this)

0049a9e0  {
0049a9e6      this->vtable = 0x7a6f94;
0049a9e3      this->mTitleList.vtable = &PList<unsigned long>::`vftable';
0049a9e3      this->mTitleList.vtable = &PackObj::`vftable';
0049a9e3      this->mTitleList.vtable = 0x7a4110;
0049aa00      List<StringTableMetaLanguage::Node const *>::flush(&this->mTitleList);
0049aa05      this->vtable = 0x79285c;
0049a9e0  }

0049aa0d                                         90 90 90                                                               ...

0049aa10  void* __thiscall CharacterTitleTable::`scalar deleting destructor'(class CharacterTitleTable* this, uint32_t arg2)

0049aa10  {
0049aa16      this->vtable = 0x7a6f94;
0049aa13      this->mTitleList.vtable = &PList<unsigned long>::`vftable';
0049aa13      this->mTitleList.vtable = &PackObj::`vftable';
0049aa13      this->mTitleList.vtable = 0x7a4110;
0049aa30      List<StringTableMetaLanguage::Node const *>::flush(&this->mTitleList);
0049aa3a      this->vtable = 0x79285c;
0049aa3a      
0049aa40      if ((arg2 & 1) != 0)
0049aa43          operator delete(this);
0049aa43      
0049aa4e      return this;
0049aa10  }

0049aa51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0049aa60  void __thiscall gmCharacterTitleUI::gmCharacterTitleUI(class gmCharacterTitleUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0049aa60  {
0049aa6f      UIElement_Field::UIElement_Field(this, arg2, arg3);
0049aa74      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049aa86      this->vtable = 0x7a7250;
0049aa8c      this->vtable = &gmCharacterTitleUI::`vftable';
0049aa96      this->m_pDisplayButton = nullptr;
0049aa9c      this->m_pTitleListBox = nullptr;
0049aaa2      CharacterTitleTable::CharacterTitleTable(&this->m_characterTitleTable);
0049aa60  }

0049aaad                                         90 90 90                                                               ...

0049aab0  class UIElement* __thiscall gmCharacterTitleUI::DynamicCast(class gmCharacterTitleUI* this, uint32_t arg2) __pure

0049aab0  {
0049aabc      if (arg2 == 0x10000046)
0049aac9          return this;
0049aac9      
0049aac3      int32_t edx_1;
0049aac3      edx_1 = arg2 != 3;
0049aac7      return (this & (edx_1 - 1));
0049aab0  }

0049aacc                                      90 90 90 90                                                              ....

0049aad0  uint32_t gmCharacterTitleUI::GetUIElementType(class gmCharacterTitleUI const* this @ ecx) __pure

0049aad0  {
0049aad5      return 0x10000046;
0049aad0  }

0049aad6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0049aae0  void __fastcall gmCharacterTitleUI::~gmCharacterTitleUI(class gmCharacterTitleUI* this)

0049aae0  {
0049aaea      this->vtable = 0x7a7250;
0049aae4      this->vtable = &gmCharacterTitleUI::`vftable';
0049aaf6      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0049aaf6      
0049aafd      if (eax != 0)
0049aaff          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0049aaff      
0049ab0d      this->m_characterTitleTable.vtable = 0x7a6f94;
0049ab07      this->m_characterTitleTable.mTitleList.vtable = &PList<unsigned long>::`vftable';
0049ab07      this->m_characterTitleTable.mTitleList.vtable = &PackObj::`vftable';
0049ab07      this->m_characterTitleTable.mTitleList.vtable = 0x7a4110;
0049ab2b      List<StringTableMetaLanguage::Node const *>::flush(&this->m_characterTitleTable.mTitleList);
0049ab30      this->m_characterTitleTable.vtable = 0x79285c;
0049aae4      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049ab42      NoticeHandler::~NoticeHandler(&this->vtable);
0049ab4b      /* tailcall */
0049ab4b      return UIElement_Field::~UIElement_Field(this);
0049aae0  }


0049ab50  class UIElement* gmCharacterTitleUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0049ab50  {
0049ab55      void* eax = operator new(0x624);
0049ab55      
0049ab5f      if (eax == 0)
0049ab75          return 0;
0049ab75      
0049ab72      return gmCharacterTitleUI::gmCharacterTitleUI(eax, arg1, arg2);
0049ab50  }

0049ab76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0049ab80  void* __thiscall gmCharacterTitleUI::`scalar deleting destructor'(class gmCharacterTitleUI* this, uint32_t arg2)

0049ab80  {
0049ab83      gmCharacterTitleUI::~gmCharacterTitleUI(this);
0049ab83      
0049ab8d      if ((arg2 & 1) != 0)
0049ab90          operator delete(this);
0049ab90      
0049ab9b      return this;
0049ab80  }

0049ab9e                                                                                            90 90                                ..

0049aba0  void gmCharacterTitleUI::Register()

0049aba0  {
0049abaa      UIElement::RegisterElementClass(0x10000046, gmCharacterTitleUI::Create);
0049aba0  }

0049abb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049abc0  uint8_t __fastcall gmCharacterTitleUI::Refresh(class gmCharacterTitleUI* this)

0049abc0  {
0049abc3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049abcb      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0049abd4      uint32_t mDisplayTitle = this->m_characterTitleTable.mDisplayTitle;
0049abdb      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049abdb      
0049abf3      if (CharacterTitleTable::GetCharacterTitleFromID(mDisplayTitle, &PStringBase<unsigned short>::s_NullBuffer_2) == 0)
0049abf3      {
0049ac10          class PStringBase<unsigned short> var_18;
0049ac10          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, u"Unknown");
0049ac20          UIElement_Text::SetText(this->m_pDisplayTitleText, &var_18);
0049ac29          int32_t* edi_1 = (var_18 - 0x14);
0049ac29          
0049ac3c          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0049ac44              **(uint32_t**)edi_1(1);
0049abf3      }
0049abf3      else
0049ac00          UIElement_Text::SetText(this->m_pDisplayTitleText, &PStringBase<unsigned short>::s_NullBuffer_2);
0049ac00      
0049ac4c      UIElement_ListBox::Flush(this->m_pTitleListBox);
0049ac5a      UIElement_ListBox::SetSelectedItem(this->m_pTitleListBox, nullptr, 1);
0049ac6a      int32_t var_14 = 0x7a4110;
0049ac72      uint32_t* i_2 = nullptr;
0049ac76      int32_t var_c = 0;
0049ac7a      int32_t var_8 = 0;
0049ac7e      List<unsigned long>::operator=(&var_14, &this->m_characterTitleTable.mTitleList);
0049ac83      uint32_t* i = i_2;
0049ac87      var_14 = 0x7a7388;
0049ac8f      int32_t var_4 = 0x7a4114;
0049ac8f      
0049ac99      for (; i != 0; i = i[1])
0049aca0          gmCharacterTitleUI::AddTitleToList(this, *(uint32_t*)i);
0049aca0      
0049acac      gmCharacterTitleUI::UpdateButtons(this);
0049acb1      uint32_t* i_1 = i_2;
0049acb5      int32_t var_4_1 = 0x79285c;
0049acbd      var_14 = 0x7a4110;
0049acbd      
0049acc7      while (i_1 != 0)
0049acc7      {
0049acc9          uint32_t* i_4 = i_1;
0049accb          i_1 = i_1[1];
0049acd0          uint32_t* i_3 = i_1;
0049acd0          
0049acd4          if (i_1 == 0)
0049acdf              int32_t var_c_1 = 0;
0049acd4          else
0049acd4          {
0049acd6              i_1[2] = 0;
0049acd9              i_1 = i_3;
0049acd4          }
0049acd4          
0049ace5          if (i_4 != 0)
0049ace5          {
0049ace8              operator delete(i_4);
0049aced              i_1 = i_3;
0049ace5          }
0049ace5          
0049acf4          var_8 -= 1;
0049acc7      }
0049acc7      
0049acfe      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0049acfe      
0049ad11      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049ad19          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049ad19      
0049ad1d      int32_t eax_5;
0049ad1d      eax_5 = 1;
0049ad23      return 1;
0049abc0  }

0049ad24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0049ad30  void __thiscall gmCharacterTitleUI::RecvNotice_UpdateCharacterTitleTable(class gmCharacterTitleUI* this, class CharacterTitleTable const* arg2)

0049ad30  {
0049ad3b      CharacterTitleTable::operator=(&this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1], arg2);
0049ad46      gmCharacterTitleUI::Refresh(((char*)this - 0x5f8));
0049ad30  }

0049ad4f                                               90                                                                 .

0049ad50  void __thiscall gmCharacterTitleUI::RecvNotice_SetDisplayCharacterTitle(class gmCharacterTitleUI* this, uint32_t arg2)

0049ad50  {
0049ad50      uint32_t edx = arg2;
0049ad57      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = edx;
0049ad57      
0049ad5f      for (class HashSetData<UIElement *>* m_hashNext = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4]; m_hashNext != 0; m_hashNext = m_hashNext->m_hashNext)
0049ad5f      {
0049ad63          if (m_hashNext->m_hashKey == edx)
0049ad63              goto label_49ad9d;
0049ad5f      }
0049ad5f      
0049ad6c      class HashSetData<UIElement *>** ecx = &this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3];
0049ad70      class HashSetData<UIElement *>* i_1 = ADJ(ecx)->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4];
0049ad73      int32_t* i = i_1;
0049ad77      arg2 = edx;
0049ad77      
0049ad7b      for (; i != 0; i = i[1])
0049ad7b      {
0049ad82          if (*(uint32_t*)i == edx)
0049ad82              goto label_49ad9d;
0049ad7b      }
0049ad7b      
0049ad91      AC1Legacy::List<unsigned long>::insert(ecx, i_1, &arg2);
0049ad9d  label_49ad9d:
0049ad9d      gmCharacterTitleUI::Refresh(((char*)this - 0x5f8));
0049ad50  }

0049ada6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049adb0  void __fastcall Skill::Skill(class Skill* this)

0049adb0  {
0049adb4      this->vtable = 0x7a7408;
0049adba      __builtin_memset(&this->_sac, 0, 0x1c);
0049adb0  }


0049add0  void __thiscall gmSkillUI::gmSkillUI(class gmSkillUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0049add0  {
0049addf      gmStatManagementUI::gmStatManagementUI(this, arg2, arg3);
0049ade4      this->vtable = 0x7a76c8;
0049adea      this->vtable = &gmSkillUI::`vftable';
0049adf4      this->vtable = &gmStatManagementUI::`vftable';
0049adfe      this->m_SelectedSkill = 0;
0049ae08      this->m_SelectedIndex = 0xffffffff;
0049add0  }

0049ae18                                                                          90 90 90 90 90 90 90 90                          ........

0049ae20  class UIElement* __thiscall gmSkillUI::DynamicCast(class gmSkillUI* this, uint32_t arg2) __pure

0049ae20  {
0049ae2c      if (arg2 == 0x1000002b)
0049ae39          return this;
0049ae39      
0049ae33      int32_t edx_1;
0049ae33      edx_1 = arg2 != 3;
0049ae37      return (this & (edx_1 - 1));
0049ae20  }

0049ae3c                                                                                      90 90 90 90                              ....

0049ae40  uint32_t gmSkillUI::GetUIElementType(class gmSkillUI const* this @ ecx) __pure

0049ae40  {
0049ae45      return 0x1000002b;
0049ae40  }

0049ae46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049ae50  void __fastcall gmSkillUI::PostInit(class gmSkillUI* this)

0049ae50  {
0049ae53      gmStatManagementUI::PostInit(this);
0049ae58      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0049ae58      
0049ae5f      if (this != 0)
0049ae5f      {
0049ae67          eax->vtable->RegisterNoticeHandler(0x4dd241, &this->vtable);
0049ae75          return;
0049ae5f      }
0049ae5f      
0049ae76      eax->vtable->RegisterNoticeHandler(0x4dd241, 0);
0049ae50  }

0049ae87                       90 90 90 90 90 90 90 90 90                                                         .........

0049ae90  class UIElement* gmSkillUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0049ae90  {
0049ae95      void* eax = operator new(0x644);
0049ae95      
0049ae9f      if (eax == 0)
0049aeb5          return 0;
0049aeb5      
0049aeb2      return gmSkillUI::gmSkillUI(eax, arg1, arg2);
0049ae90  }

0049aeb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0049aec0  uint32_t __thiscall gmSkillUI::GetCostToRaise10(class gmSkillUI const* this, class CACQualities const* arg2)

0049aec0  {
0049aec3      uint32_t m_SelectedSkill = this->m_SelectedSkill;
0049aed8      int32_t var_20 = 0x7a7408;
0049aee0      enum SKILL_ADVANCEMENT_CLASS s;
0049aee0      __builtin_memset(&s, 0, 0x1c);
0049aefc      CACQualities::InqSkill(arg2, m_SelectedSkill, &var_20);
0049af01      enum SKILL_ADVANCEMENT_CLASS s_1 = s;
0049af17      uint32_t eax_2;
0049af17      
0049af17      if (s_1 == TRAINED_SKILL_ADVANCEMENT_CLASS)
0049af17      {
0049af23          eax_2 = ExperienceSystem::GetMaxTrainedSkillLevel();
0049af28      label_49af28:
0049af2a          int32_t var_10;
0049af2a          
0049af2a          if (var_10 < eax_2)
0049af2a          {
0049af31              uint32_t eax_6;
0049af31              
0049af31              if (s_1 == TRAINED_SKILL_ADVANCEMENT_CLASS)
0049af41                  eax_6 = ExperienceSystem::GetMaxTrainedSkillLevel();
0049af31              else if (s_1 == 3)
0049af3a                  eax_6 = ExperienceSystem::GetMaxSpecializedSkillLevel();
0049af34              else
0049af36                  eax_6 = 0;
0049af36              
0049af4a              int32_t eax_7 = (eax_6 - var_10);
0049af4c              int32_t ecx_1 = 0xa;
0049af53              int32_t var_18;
0049af53              
0049af53              if (eax_7 < 0xa)
0049af53              {
0049af57                  ecx_1 = eax_7;
0049af57                  
0049af59                  if (eax_7 <= 0)
0049af8d                      return (ExperienceSystem::ExperienceToSkillLevel(s_1, (var_10 + 1)) - var_18);
0049af53              }
0049af53              
0049af73              return (ExperienceSystem::ExperienceToSkillLevel(s_1, (var_10 + ecx_1)) - var_18);
0049af2a          }
0049af17      }
0049af17      else if (s_1 == 3)
0049af1a      {
0049af1c          eax_2 = ExperienceSystem::GetMaxSpecializedSkillLevel();
0049af21          goto label_49af28;
0049af1a      }
0049af98      return 0;
0049aec0  }

0049af9b                                                                                   90 90 90 90 90                             .....

0049afa0  uint8_t __thiscall gmSkillUI::MessageIsFromSelectedElement(class gmSkillUI const* this, enum StatType arg2, uint32_t arg3)

0049afa0  {
0049afb1      return this->m_SelectedSkill == arg3;
0049afa0  }

0049afb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0049afc0  void* __thiscall PackableHashIterator<unsigned long,SkillBase>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,SkillBase>* this, uint32_t arg2)

0049afc0  {
0049afc8      this->vtable = 0x7a7830;
0049afc8      
0049afce      if ((arg2 & 1) != 0)
0049afd1          operator delete(this);
0049afd1      
0049afdc      return this;
0049afc0  }

0049afdf                                                                                               90                                 .

0049afe0  void* __thiscall gmSkillUI::`scalar deleting destructor'(class gmSkillUI* this, uint32_t arg2)

0049afe0  {
0049afe3      this->vtable = 0x7a76c8;
0049afe9      this->vtable = &gmSkillUI::`vftable';
0049aff3      this->vtable = &gmStatManagementUI::`vftable';
0049affd      gmStatManagementUI::~gmStatManagementUI(this);
0049affd      
0049b007      if ((arg2 & 1) != 0)
0049b00a          operator delete(this);
0049b00a      
0049b015      return this;
0049afe0  }

0049b018                                                                          90 90 90 90 90 90 90 90                          ........

0049b020  void gmSkillUI::Register()

0049b020  {
0049b02a      UIElement::RegisterElementClass(0x1000002b, gmSkillUI::Create);
0049b020  }

0049b033                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049b040  uint8_t __thiscall gmSkillUI::SetSelection(class gmSkillUI* this, class UIElement* arg2)

0049b040  {
0049b048      class UIElement* ecx = arg2;
0049b04e      uint32_t esi = 0;
0049b04e      
0049b052      if (ecx != 0)
0049b052      {
0049b058          struct UIElement::VTable* vtable = ecx->vtable;
0049b064          int32_t* var_8 = nullptr;
0049b068          int32_t* var_4_1 = nullptr;
0049b068          
0049b074          if (vtable->InqProperty(0x1000003a, &var_8) != 0)
0049b074          {
0049b07c              arg2 = nullptr;
0049b07c              
0049b080              if (var_4_1 != 0)
0049b089                  *(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&arg2);
0049b089              
0049b09e              esi = this->m_rgTokens.m_data[arg2]->vtable->GetStat();
0049b074          }
0049b074          
0049b0a0          int32_t* eax_5 = var_8;
0049b0a0          
0049b0a6          if (eax_5 != 0)
0049b0a6          {
0049b0b0              int32_t edx_3 = (eax_5[1] - 1);
0049b0ad              eax_5[1] = edx_3;
0049b0ad              
0049b0b5              if (edx_3 == 0)
0049b0bb                  **(uint32_t**)eax_5(1);
0049b0bb              
0049b0bd              var_8 = nullptr;
0049b0a6          }
0049b0a6          
0049b0c7          if (var_4_1 != 0)
0049b0c7          {
0049b0d1              int32_t edx_5 = (var_4_1[1] - 1);
0049b0ce              var_4_1[1] = edx_5;
0049b0ce              
0049b0d6              if (edx_5 == 0)
0049b0dc                  **(uint32_t**)var_4_1(1);
0049b0c7          }
0049b052      }
0049b052      
0049b0e4      if (this->m_SelectedSkill == esi)
0049b0e6          esi = 0;
0049b0e6      
0049b0e8      struct gmSkillUI::VTable* vtable_1 = this->vtable;
0049b0ec      this->m_SelectedSkill = esi;
0049b0fe      return vtable_1->UpdateSelection();
0049b040  }

0049b101     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0049b110  uint8_t __thiscall gmSkillUI::DisplayDefaultFooter(class gmSkillUI* this, class CACQualities const* arg2)

0049b110  {
0049b120      void var_90;
0049b120      StringInfo::StringInfo(&var_90);
0049b134      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b148      void* __return;
0049b148      class PStringBase<unsigned short>* eax = StringInfo::GetString(&var_90, &__return, 0);
0049b157      UIElement_Text::SetTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), eax, 0, 0);
0049b166      int32_t* ebx_1 = ((char*)__return - 0x14);
0049b166      
0049b175      if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
0049b17d          **(uint32_t**)ebx_1(1);
0049b17d      
0049b18f      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b19f      class PStringBase<unsigned short>* eax_4 = StringInfo::GetString(&var_90, &__return, 0);
0049b1ae      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneLabel(this), eax_4);
0049b1b7      void* ebx_3 = ((char*)__return - 0x14);
0049b1b7      
0049b1c6      if ((InterlockedDecrement(((char*)ebx_3 + 4)) == 0 && ebx_3 != 0))
0049b1ce          **(uint32_t**)ebx_3(1);
0049b1ce      
0049b1e7      int32_t var_9c = 0;
0049b1ef      CBaseQualities::InqInt(&arg2->vtable, 0x18, &var_9c, 0, 0);
0049b204      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b212      int32_t var_b4_3 = 0;
0049b21a      StringInfo::AddVariable_Int(&var_90, 0, var_9c);
0049b22a      class PStringBase<unsigned short>* eax_8 = StringInfo::GetString(&var_90, &__return, 0);
0049b239      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneValue(this), eax_8);
0049b242      void* ebx_5 = ((char*)__return - 0x14);
0049b242      
0049b251      if ((InterlockedDecrement(((char*)ebx_5 + 4)) == 0 && ebx_5 != 0))
0049b259          **(uint32_t**)ebx_5(1);
0049b259      
0049b26b      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b27b      class PStringBase<unsigned short>* eax_12 = StringInfo::GetString(&var_90, &__return, 0);
0049b28a      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoLabel(this), eax_12);
0049b293      void* ebx_7 = ((char*)__return - 0x14);
0049b293      
0049b2a2      if ((InterlockedDecrement(((char*)ebx_7 + 4)) == 0 && ebx_7 != 0))
0049b2aa          **(uint32_t**)ebx_7(1);
0049b2aa      
0049b2ae      int32_t var_98 = 0;
0049b2b2      int32_t var_94 = 0;
0049b2bf      CBaseQualities::InqInt64(&arg2->vtable, 2, &var_98);
0049b2d4      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b2e7      int32_t var_b4_9 = var_94;
0049b2ee      StringInfo::AddVariable_Int(&var_90, 0, var_98);
0049b2fe      class PStringBase<unsigned short>* eax_17 = StringInfo::GetString(&var_90, &__return, 0);
0049b30d      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoValue(this), eax_17);
0049b316      void* esi_2 = ((char*)__return - 0x14);
0049b316      
0049b325      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049b32d          **(uint32_t**)esi_2(1);
0049b32d      
0049b333      StringInfo::~StringInfo(&var_90);
0049b33b      int32_t eax_21;
0049b33b      eax_21 = 1;
0049b344      return 1;
0049b110  }

0049b347                       90 90 90 90 90 90 90 90 90                                                         .........

0049b350  uint8_t __thiscall gmSkillUI::DisplaySelectionFooter_Untrained(class gmSkillUI* this, class CACQualities const* arg2)

0049b350  {
0049b356      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049b35e      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0049b369      int32_t eax_1;
0049b369      class PStringBase<unsigned short>* edx;
0049b369      eax_1 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049b379      class PSRefBufferCharData<unsigned short>** var_b0_1 = &PStringBase<unsigned short>::s_NullBuffer_2;
0049b37a      uint32_t m_SelectedSkill = this->m_SelectedSkill;
0049b37b      SkillSystem::InqSkillName(eax_1, edx);
0049b395      UIElement_Text::SetTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_2, 0, 0);
0049b39e      void var_90;
0049b39e      StringInfo::StringInfo(&var_90);
0049b3b2      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b3c2      void* __return;
0049b3c2      class PStringBase<unsigned short>* eax_3 = StringInfo::GetString(&var_90, &__return, 0);
0049b3d1      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneLabel(this), eax_3);
0049b3e0      int32_t* edi_1 = ((char*)__return - 0x14);
0049b3e0      
0049b3ef      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0049b3f7          **(uint32_t**)edi_1(1);
0049b3f7      
0049b405      int32_t eax_8 = this->vtable->GetCostToRaise(arg2);
0049b41d      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b428      int32_t var_b0_5 = 0;
0049b430      StringInfo::AddVariable_Int(&var_90, 0, eax_8);
0049b440      class PStringBase<unsigned short>* eax_9 = StringInfo::GetString(&var_90, &__return, 0);
0049b44f      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneValue(this), eax_9);
0049b458      void* edi_3 = ((char*)__return - 0x14);
0049b458      
0049b467      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0049b46f          **(uint32_t**)edi_3(1);
0049b46f      
0049b480      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b490      class PStringBase<unsigned short>* eax_12 = StringInfo::GetString(&var_90, &__return, 0);
0049b49f      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoLabel(this), eax_12);
0049b4a8      void* edi_5 = ((char*)__return - 0x14);
0049b4a8      
0049b4b7      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
0049b4bf          **(uint32_t**)edi_5(1);
0049b4bf      
0049b4d6      int32_t var_94 = 0;
0049b4de      CBaseQualities::InqInt(&arg2->vtable, 0x18, &var_94, 0, 0);
0049b4f3      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049b502      int32_t var_b0_10 = 0;
0049b50a      StringInfo::AddVariable_Int(&var_90, 0, var_94);
0049b51a      class PStringBase<unsigned short>* eax_17 = StringInfo::GetString(&var_90, &__return, 0);
0049b529      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoValue(this), eax_17);
0049b532      void* edi_7 = ((char*)__return - 0x14);
0049b532      
0049b541      if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
0049b549          **(uint32_t**)edi_7(1);
0049b549      
0049b54d      gmStatManagementUI::GetFooter10Button(this)->vtable->SetVisible(0);
0049b563      int32_t var_b0_13;
0049b563      class UIElement_Button* eax_22;
0049b563      
0049b563      if ((eax_8 <= 0 || var_94 < eax_8))
0049b563      {
0049b572          eax_22 = gmStatManagementUI::GetFooterButton(this);
0049b577          var_b0_13 = 0xd;
0049b563      }
0049b563      else
0049b563      {
0049b567          eax_22 = gmStatManagementUI::GetFooterButton(this);
0049b56c          var_b0_13 = 1;
0049b563      }
0049b563      
0049b579      eax_22->vtable->SetState(var_b0_13);
0049b587      StringInfo::~StringInfo(&var_90);
0049b590      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0049b590      
0049b59f      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049b5a7          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049b5a7      
0049b5ac      int32_t eax_24;
0049b5ac      eax_24 = 1;
0049b5b5      return 1;
0049b350  }

0049b5b8                                                                          90 90 90 90 90 90 90 90                          ........

0049b5c0  class PackableHashIterator<unsigned long,SkillBase>* __thiscall PackableHashTable<unsigned long,SkillBase>::begin(class PackableHashTable<unsigned long,SkillBase> const* this, class PackableHashIterator<unsigned long,SkillBase>* __return)

0049b5c0  {
0049b5c0      uint32_t _table_size = this->_table_size;
0049b5c4      int32_t eax = 0;
0049b5c4      
0049b5c9      if (_table_size > 0)
0049b5c9      {
0049b5cb          class PackableHashData<unsigned long,SkillBase>** _buckets_1 = this->_buckets;
0049b5ce          class PackableHashData<unsigned long,SkillBase>** _buckets_2 = _buckets_1;
0049b5ce          
0049b5db          do
0049b5db          {
0049b5d3              if (*(uint32_t*)_buckets_2 != 0)
0049b5d3              {
0049b5fc                  int32_t ecx = _buckets_1[eax];
0049b5ff                  int32_t* __return_1 = __return;
0049b603                  __return_1[2] = _buckets_1;
0049b608                  __return_1[1] = ecx;
0049b60b                  *(uint32_t*)__return_1 = 0x7a7830;
0049b611                  __return_1[3] = _table_size;
0049b614                  return __return_1;
0049b5d3              }
0049b5d3              
0049b5d5              eax += 1;
0049b5d6              _buckets_2 = &_buckets_2[1];
0049b5db          } while (eax < _table_size);
0049b5c9      }
0049b5c9      
0049b5dd      class PackableHashData<unsigned long,SkillBase>** _buckets = this->_buckets;
0049b5e6      __return->_current = nullptr;
0049b5ed      __return->_buckets = _buckets;
0049b5f0      __return->vtable = 0x7a7830;
0049b5f6      __return->_table_size = _table_size;
0049b5f9      return __return;
0049b5c0  }

0049b617                                                                       90 90 90 90 90 90 90 90 90                         .........

0049b620  void __fastcall MasterPropertyGrabber::~MasterPropertyGrabber(class MasterPropertyGrabber* this)

0049b620  {
0049b623      class MasterProperty* m_object = this->m_object;
0049b623      
0049b627      if (m_object != 0)
0049b627      {
0049b629          m_object->vtable->Release();
0049b62e          this->m_object = 0;
0049b627      }
0049b620  }

0049b636                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0049b640  class SkillBase* __thiscall SkillTable::GetSkillBase(class SkillTable const* this, uint32_t arg2)

0049b640  {
0049b641      uint32_t _table_size = this->_skillBaseHash._table_size;
0049b641      
0049b647      if (_table_size != 0)
0049b647      {
0049b649          class PackableHashData<unsigned long,SkillBase>** _buckets = this->_skillBaseHash._buckets;
0049b649          
0049b64e          if (_buckets != 0)
0049b64e          {
0049b65f              for (int32_t* i = _buckets[(COMBINE(0, arg2) % _table_size)]; i != 0; i = i[0x18])
0049b65f              {
0049b663                  if (arg2 == *(uint32_t*)i)
0049b678                      return &i[2];
0049b65f              }
0049b64e          }
0049b647      }
0049b647      
0049b670      return 0;
0049b640  }

0049b67b                                                                                   90 90 90 90 90                             .....

0049b680  uint32_t __thiscall gmSkillUI::GetCostToRaise(class gmSkillUI const* this, class CACQualities const* arg2)

0049b680  {
0049b689      uint32_t m_SelectedSkill = this->m_SelectedSkill;
0049b69b      int32_t var_20 = 0x7a7408;
0049b6a3      enum SKILL_ADVANCEMENT_CLASS s;
0049b6a3      __builtin_memset(&s, 0, 0x1c);
0049b6bf      uint32_t ecx_1;
0049b6bf      int32_t edx;
0049b6bf      ecx_1 = CACQualities::InqSkill(arg2, m_SelectedSkill, &var_20);
0049b6c4      enum SKILL_ADVANCEMENT_CLASS s_1 = s;
0049b6c4      
0049b6cd      if (s_1 < TRAINED_SKILL_ADVANCEMENT_CLASS)
0049b6cd      {
0049b70a          int32_t var_34_2 = 0x10000004;
0049b70f          int32_t var_38_2 = 2;
0049b711          int32_t var_3c_1 = 4;
0049b718          class SkillTable* esi_2 = DBObj::GetByEnum(s_1, edx, ecx_1);
0049b718          
0049b71f          if (esi_2 != 0)
0049b71f          {
0049b72a              class SkillBase* eax_7 = SkillTable::GetSkillBase(esi_2, this->m_SelectedSkill);
0049b72a              
0049b733              if (eax_7 != 0)
0049b733              {
0049b746                  uint32_t _trained_cost = eax_7->_trained_cost;
0049b749                  esi_2->vtable->Release();
0049b757                  return _trained_cost;
0049b733              }
0049b733              
0049b735              esi_2->vtable->Release();
0049b71f          }
0049b6cd      }
0049b6cd      else
0049b6cd      {
0049b6d6          uint32_t eax_2;
0049b6d6          
0049b6d6          if (s_1 == TRAINED_SKILL_ADVANCEMENT_CLASS)
0049b6d6          {
0049b6e2              eax_2 = ExperienceSystem::GetMaxTrainedSkillLevel();
0049b6e7          label_49b6e7:
0049b6e9              int32_t var_10;
0049b6e9              int32_t var_18;
0049b6e9              
0049b6e9              if (var_10 < eax_2)
0049b707                  return (ExperienceSystem::ExperienceToSkillLevel(s_1, (var_10 + 1)) - var_18);
0049b6d6          }
0049b6d6          else if (s_1 == 3)
0049b6d9          {
0049b6db              eax_2 = ExperienceSystem::GetMaxSpecializedSkillLevel();
0049b6e0              goto label_49b6e7;
0049b6d9          }
0049b6cd      }
0049b6cd      
0049b743      return 0;
0049b680  }

0049b75a                                                                                90 90 90 90 90 90                            ......

0049b760  uint8_t __fastcall gmSkillUI::Raise10Selection(class gmSkillUI* this)

0049b760  {
0049b763      enum SKILL_ADVANCEMENT_CLASS ebx;
0049b763      enum SKILL_ADVANCEMENT_CLASS var_1c = ebx;
0049b772      int32_t __saved_edi;
0049b772      int32_t* esp = &__saved_edi;
0049b772      
0049b773      if (this->m_SelectedSkill != 0)
0049b773      {
0049b779          struct Turbine_GUID* var_18;
0049b779          int32_t* var_2c_1 = &var_18;
0049b77e          struct Turbine_GUID* var_30 = &PlayerDesc_ClassType;
0049b784          var_18 = nullptr;
0049b78f          class TResult __return;
0049b78f          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_30, var_2c_1);
0049b794          struct Turbine_GUID* edi_1 = var_18;
0049b79d          var_30 = edi_1;
0049b79f          int32_t var_2c_2 = 0;
0049b7a2          struct Turbine_GUID* eax_2 = var_30;
0049b7a6          int32_t var_8 = 0;
0049b7aa          int32_t var_4_1 = 0;
0049b7aa          
0049b7ae          if (eax_2 != 0)
0049b7b4              *(uint32_t*)(eax_2->m_data1 + 0x10)();
0049b7b4          
0049b7c0          esp = &var_30;
0049b7c7          void var_c;
0049b7c7          int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0049b7c7          
0049b7c9          if (edi_1 != 0)
0049b7cf              *(uint32_t*)(edi_1->m_data1 + 0x14)();
0049b7cf          
0049b7d2          class TResult __return_1 = __return;
0049b7d2          
0049b7d8          if (__return_1 != 0)
0049b7d8          {
0049b7dc              if (ebp_1 >= 0)
0049b7dc              {
0049b7ef                  uint32_t m_SelectedSkill = this->m_SelectedSkill;
0049b7fd                  var_1c = UNDEF_SKILL_ADVANCEMENT_CLASS;
0049b801                  CACQualities::InqSkillAdvancementClass(__return_1, m_SelectedSkill, &var_1c);
0049b801                  
0049b80b                  if (var_1c >= TRAINED_SKILL_ADVANCEMENT_CLASS)
0049b80b                  {
0049b80d                      struct gmSkillUI::VTable* vtable = this->vtable;
0049b812                      this->m_bAwaitingRaise = 1;
0049b819                      uint32_t eax_4 = vtable->GetCostToRaise10(__return_1);
0049b827                      CM_Train::Event_TrainSkill(this->m_SelectedSkill, eax_4);
0049b831                      gmStatManagementUI::GetFooter10Button(this)->vtable->SetState(0xd);
0049b80b                  }
0049b80b                  
0049b846                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049b84c                  int32_t eax_7;
0049b84c                  eax_7 = 1;
0049b852                  return 1;
0049b7dc              }
0049b7dc              
0049b7e2              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049b7e2              esp = &__saved_edi;
0049b7d8          }
0049b773      }
0049b773      
0049b7e5      uint32_t eax;
0049b7e5      eax = 0;
0049b7e7      *(uint32_t*)esp;
0049b7e7      esp[1];
0049b7e7      esp[2];
0049b7e7      esp[3];
0049b7ee      return 0;
0049b760  }

0049b853                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049b860  uint8_t __thiscall gmSkillUI::DisplaySelectionFooter_Trained(class gmSkillUI* this, class CACQualities const* arg2)

0049b860  {
0049b866      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049b875      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer_1;
0049b87f      int32_t eax_1;
0049b87f      class PStringBase<unsigned short>* edx;
0049b87f      eax_1 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049b88b      class PSRefBufferCharData<unsigned short>** var_e8_1 = &PStringBase<unsigned short>::s_NullBuffer_8;
0049b88c      uint32_t m_SelectedSkill = this->m_SelectedSkill;
0049b88d      SkillSystem::InqSkillName(eax_1, edx);
0049b8a7      UIElement_Text::SetTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_8, 0, 0);
0049b8ac      uint32_t m_SelectedSkill_2 = this->m_SelectedSkill;
0049b8c3      int32_t var_b4 = 0;
0049b8c7      CACQualities::InqSkill(arg2, m_SelectedSkill_2, &var_b4, 1);
0049b8cc      uint32_t m_SelectedSkill_1 = this->m_SelectedSkill;
0049b8db      int32_t var_c8 = 0;
0049b8df      CACQualities::InqSkill(arg2, m_SelectedSkill_1, &var_c8, 0);
0049b8e4      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0049b8e9      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_2;
0049b8f1      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0049b8fb      int32_t var_e8_3 = var_c8;
0049b8fc      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_8;
0049b907      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_9, u"%s: %d");
0049b91f      UIElement_Text::SetTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_9, 0, 0);
0049b936      int32_t eax_6 = this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetVitaeModifier(arg2);
0049b93d      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6;
0049b93d      
0049b93d      if (eax_6 < 0)
0049b93d      {
0049b93f          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
0049b944          PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_3;
0049b94c          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0049b94e          int32_t var_e8_6 = eax_6;
0049b959          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_6, u" (%d)");
0049b972          UIElement_Text::AppendTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_6, 0, 3);
0049b97b          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) ebp_2 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0049b97b          
0049b98e          if ((InterlockedDecrement(((char*)ebp_2 + 4)) == 0 && ebp_2 != 0))
0049b997              *(uint32_t*)*(int32_t*)((char*)ADJ(ebp_2) + -0x14)(1);
0049b93d      }
0049b93d      
0049b99f      int32_t ecx_12 = var_b4;
0049b9a3      int32_t eax_12 = (var_c8 - eax_6);
0049b9a5      var_c8 = eax_12;
0049b9ab      uint32_t __return = (eax_12 - ecx_12);
0049b9af      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7;
0049b9af      
0049b9af      if (eax_12 != ecx_12)
0049b9af      {
0049b9b5          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
0049b9ba          PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_4;
0049b9c2          int32_t ebx_2 = 0;
0049b9c4          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
0049b9c6          int32_t eax_15 = var_b4;
0049b9ca          int32_t ecx_13 = var_c8;
0049b9ca          
0049b9d0          if (eax_15 < ecx_13)
0049b9d0          {
0049b9db              ebx_2 = 1;
0049b9e0              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_7, &data_7a7844);
0049b9d0          }
0049b9d0          else if (eax_15 > ecx_13)
0049b9e9              ebx_2 = 2;
0049b9e9          
0049b9ee          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
0049b9f3          PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_5;
0049b9fb          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
0049ba05          uint32_t __return_1 = __return;
0049ba06          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_7;
0049ba11          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_6, u" (%s%d)");
0049ba29          UIElement_Text::AppendTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_6, 0, ebx_2);
0049ba38          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_2 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0049ba38          
0049ba47          if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0049ba4f              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0049ba4f          
0049ba55          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_4 = &PStringBase<unsigned short>::s_NullBuffer_7->m_data[-0xa];
0049ba55          
0049ba64          if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
0049ba6c              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
0049b9af      }
0049b9af      
0049ba7a      void var_90;
0049ba7a      StringInfo::StringInfo(&var_90);
0049ba8e      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049ba9d      class PStringBase<unsigned short>* eax_21 = StringInfo::GetString(&var_90, &__return, 0);
0049baac      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneLabel(this), eax_21);
0049bab5      int32_t* edi_6 = (__return - 0x14);
0049bab5      
0049bac4      if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
0049bacc          **(uint32_t**)edi_6(1);
0049bacc      
0049bada      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_12 = this->vtable->GetCostToRaise(arg2);
0049bae4      PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_12;
0049bae4      
0049baed      if (PStringBase<unsigned short>::s_NullBuffer_12 > 0)
0049baed      {
0049bb0c          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049bb16          int32_t var_e8_16 = 0;
0049bb1d          StringInfo::AddVariable_Int(&var_90, 0, PStringBase<unsigned short>::s_NullBuffer_12);
0049baed      }
0049baed      else
0049bafa          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049bafa      
0049bb2c      class PStringBase<unsigned short>* eax_26 = StringInfo::GetString(&var_90, &__return, 0);
0049bb3b      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneValue(this), eax_26);
0049bb44      void* edi_9 = (__return - 0x14);
0049bb44      
0049bb53      if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
0049bb5b          **(uint32_t**)edi_9(1);
0049bb5b      
0049bb5d      uint32_t m_SelectedSkill_3 = this->m_SelectedSkill;
0049bb70      int32_t var_b0 = 0x7a7408;
0049bb78      enum SKILL_ADVANCEMENT_CLASS s;
0049bb78      __builtin_memset(&s, 0, 0x1c);
0049bb9c      CACQualities::InqSkill(arg2, m_SelectedSkill_3, &var_b0);
0049bba5      enum SKILL_ADVANCEMENT_CLASS s_1 = s;
0049bbaf      uint32_t var_a0;
0049bbaf      uint32_t eax_30 = ExperienceSystem::ExperienceToSkillLevel(s_1, var_a0);
0049bbb9      uint32_t eax_31 = ExperienceSystem::ExperienceToSkillLevel(s_1, (var_a0 + 1));
0049bbc1      uint32_t __return_2 = (eax_31 - eax_30);
0049bbc3      float var_e8_21;
0049bbc3      
0049bbc3      if (eax_31 == eax_30)
0049bbf7          var_e8_21 = 0f;
0049bbc3      else
0049bbc3      {
0049bbc9          int32_t var_a8;
0049bbc9          uint32_t __return_3 = (var_a8 - eax_30);
0049bbcd          __return = __return_3;
0049bbd1          long double x87_r7_1 = ((long double)__return);
0049bbd1          
0049bbd5          if (__return_3 < 0)
0049bbd7              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0049bbd7          
0049bbdf          __return = __return_2;
0049bbe3          long double x87_r6_1 = ((long double)__return);
0049bbe3          
0049bbe7          if (__return_2 < 0)
0049bbe9              x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
0049bbe9          
0049bbf1          uint32_t __return_4 = __return_3;
0049bbf2          var_e8_21 = ((float)(x87_r7_1 / x87_r6_1));
0049bbc3      }
0049bbc3      
0049bc04      UIElement::SetAttribute_Float(gmStatManagementUI::GetFooterMeter(this), 0x69, var_e8_21);
0049bc19      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049bc2a      class PStringBase<unsigned short>* eax_33 = StringInfo::GetString(&var_90, &__return, 0);
0049bc39      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoLabel(this), eax_33);
0049bc48      int32_t* edi_12 = (__return - 0x14);
0049bc48      
0049bc57      if ((InterlockedDecrement(&edi_12[1]) == 0 && edi_12 != 0))
0049bc5f          **(uint32_t**)edi_12(1);
0049bc5f      
0049bc65      int32_t var_c0 = 0;
0049bc69      int32_t var_bc = 0;
0049bc7a      CBaseQualities::InqInt64(&arg2->vtable, 2, &var_c0);
0049bc8f      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049bca2      int32_t var_e8_25 = var_bc;
0049bca9      StringInfo::AddVariable_Int(&var_90, 0, var_c0);
0049bcb9      class PStringBase<unsigned short>* eax_37 = StringInfo::GetString(&var_90, &__return, 0);
0049bcc8      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoValue(this), eax_37);
0049bcd1      void* edi_14 = (__return - 0x14);
0049bcd1      
0049bce0      if ((InterlockedDecrement(((char*)edi_14 + 4)) == 0 && edi_14 != 0))
0049bce8          **(uint32_t**)edi_14(1);
0049bce8      
0049bcea      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_7;
0049bd04      int32_t var_e8_28;
0049bd04      class UIElement_Button* eax_42;
0049bd04      
0049bd04      if (((PStringBase<unsigned short>::s_NullBuffer_13 <= 0 || var_bc < 0) || (var_bc <= 0 && var_c0 < PStringBase<unsigned short>::s_NullBuffer_13)))
0049bd04      {
0049bd13          eax_42 = gmStatManagementUI::GetFooterButton(this);
0049bd18          var_e8_28 = 0xd;
0049bd04      }
0049bd04      else
0049bd04      {
0049bd08          eax_42 = gmStatManagementUI::GetFooterButton(this);
0049bd0d          var_e8_28 = 1;
0049bd04      }
0049bd04      
0049bd1a      eax_42->vtable->SetState(var_e8_28);
0049bd26      gmStatManagementUI::GetFooter10Button(this)->vtable->SetVisible(1);
0049bd39      int32_t eax_45 = this->vtable->GetCostToRaise10(arg2);
0049bd55      int32_t var_e8_30;
0049bd55      class UIElement_Button* eax_46;
0049bd55      
0049bd55      if (((eax_45 <= 0 || var_bc < 0) || (var_bc <= 0 && var_c0 < eax_45)))
0049bd55      {
0049bd64          eax_46 = gmStatManagementUI::GetFooter10Button(this);
0049bd69          var_e8_30 = 0xd;
0049bd55      }
0049bd55      else
0049bd55      {
0049bd59          eax_46 = gmStatManagementUI::GetFooter10Button(this);
0049bd5e          var_e8_30 = 1;
0049bd55      }
0049bd55      
0049bd6b      eax_46->vtable->SetState(var_e8_30);
0049bd79      var_b0 = 0x79285c;
0049bd81      StringInfo::~StringInfo(&var_90);
0049bd8a      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_9->m_data[-0xa];
0049bd8a      
0049bd99      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049bda1          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049bda1      
0049bda7      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &PStringBase<unsigned short>::s_NullBuffer_8->m_data[-0xa];
0049bda7      
0049bdb6      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0049bdbe          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0049bdbe      
0049bdc3      int32_t eax_50;
0049bdc3      eax_50 = 1;
0049bdcc      return 1;
0049b860  }

0049bdcf                                               90                                                                 .

0049bdd0  uint8_t __thiscall gmSkillUI::AddSortedSkill(class gmSkillUI* this, uint32_t arg2, class SkillBase const* arg3, class UIElement* arg4, class UIElement* arg5)

0049bdd0  {
0049bdd5      int32_t var_c = 0;
0049bddd      class UIElement* i = arg4;
0049bddd      
0049bde5      if (i == 0)
0049bde5      {
0049bde8          int32_t eax;
0049bde8          eax = 0;
0049bdee          return 0;
0049bde5      }
0049bde5      
0049bdf1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049bdf7      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
0049be00      int32_t eax_2;
0049be00      class PStringBase<unsigned short>* edx;
0049be00      eax_2 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049be0e      class PSRefBufferCharData<unsigned short>** var_24_1 = &PStringBase<unsigned short>::s_NullBuffer_3;
0049be0f      uint32_t var_28 = arg2;
0049be10      SkillSystem::InqSkillName(eax_2, edx);
0049be15      class UIElement_ListBox* m_pListBox = this->m_pListBox;
0049be1b      uint32_t m_num = m_pListBox->m_listItems.m_num;
0049be24      int32_t eax_3 = 0;
0049be24      
0049be28      if (m_num <= 0)
0049be28      {
0049be3c      label_49be3c:
0049be3c          eax_3 = 0xffffffff;
0049be28      }
0049be28      else
0049be28      {
0049be2a          int32_t* m_data_1 = m_pListBox->m_listItems.m_data;
0049be2a          
0049be32          while (*(uint32_t*)m_data_1 != i)
0049be32          {
0049be34              eax_3 += 1;
0049be35              m_data_1 = &m_data_1[1];
0049be35              
0049be3a              if (eax_3 >= m_num)
0049be3a                  goto label_49be3c;
0049be32          }
0049be28      }
0049be28      
0049be45      if (arg5 == 0)
0049be7b          arg5 = m_pListBox->m_listItems.m_num;
0049be45      else
0049be45      {
0049be47          uint32_t m_num_1 = m_pListBox->m_listItems.m_num;
0049be4d          class UIElement* ecx_1 = nullptr;
0049be4d          
0049be51          if (m_num_1 <= 0)
0049be51          {
0049be6c          label_49be6c:
0049be6c              ecx_1 = 0xffffffff;
0049be51          }
0049be51          else
0049be51          {
0049be53              class UIElement** m_data = m_pListBox->m_listItems.m_data;
0049be53              
0049be62              while (*(uint32_t*)m_data != arg5)
0049be62              {
0049be64                  ecx_1 = (&ecx_1->vtable + 1);
0049be65                  m_data = &m_data[1];
0049be65                  
0049be6a                  if (ecx_1 >= m_num_1)
0049be6a                      goto label_49be6c;
0049be62              }
0049be51          }
0049be51          
0049be6f          arg5 = ecx_1;
0049be45      }
0049be45      
0049be86      uint32_t i_1;
0049be86      
0049be86      for (i_1 = (eax_3 + 1); i_1 < arg5; i_1 += 1)
0049be86      {
0049be99          class UIElement* eax_4 = UIElement_ListBox::GetItem(this->m_pListBox, i_1);
0049be99          
0049bea2          if (eax_4 != 0)
0049bea2          {
0049bea8              struct UIElement::VTable* vtable = eax_4->vtable;
0049beb6              int32_t* var_8 = nullptr;
0049beba              int32_t* var_4_1 = nullptr;
0049beba              
0049bec6              if (vtable->InqProperty(0x1000003a, &var_8) != 0)
0049bec6              {
0049bece                  var_c = 0;
0049bece                  
0049bed2                  if (var_4_1 != 0)
0049bedb                      *(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_c);
0049bedb                  
0049bede                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0049bee3                  arg4 = PStringBase<unsigned short>::s_NullBuffer_2;
0049beeb                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0049bef5                  this->m_rgTokens.m_data[var_c]->vtable->GetLabel(&arg4);
0049bf12                  int32_t eax_9 = wcscmp(PStringBase<unsigned short>::s_NullBuffer_3, arg4);
0049bf1b                  void* __offset(UIElement, -0x14) esi_2 = ((char*)arg4 - 0x14);
0049bf1b                  
0049bf20                  if (eax_9 < 0)
0049bf20                  {
0049bf9f                      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049bfa7                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049bfa7                      
0049bfa9                      int32_t* eax_19 = var_8;
0049bfa9                      
0049bfaf                      if (eax_19 != 0)
0049bfaf                      {
0049bfb9                          int32_t esi_4 = (eax_19[1] - 1);
0049bfb6                          eax_19[1] = esi_4;
0049bfb6                          
0049bfc0                          if (esi_4 == 0)
0049bfc6                              **(uint32_t**)eax_19(1);
0049bfc6                          
0049bfc8                          var_8 = nullptr;
0049bfaf                      }
0049bfaf                      
0049bfd6                      if (var_4_1 != 0)
0049bfd6                      {
0049bfe0                          int32_t esi_6 = (var_4_1[1] - 1);
0049bfdd                          var_4_1[1] = esi_6;
0049bfdd                          
0049bfe7                          if (esi_6 == 0)
0049bfed                              **(uint32_t**)var_4_1(1);
0049bfd6                      }
0049bfd6                      
0049bfaf                      break;
0049bf20                  }
0049bf20                  
0049bf32                  if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049bf3a                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049bec6              }
0049bec6              
0049bf3e              int32_t* eax_12 = var_8;
0049bf3e              
0049bf44              if (eax_12 != 0)
0049bf44              {
0049bf4e                  int32_t edx_6 = (eax_12[1] - 1);
0049bf4b                  eax_12[1] = edx_6;
0049bf4b                  
0049bf53                  if (edx_6 == 0)
0049bf59                      **(uint32_t**)eax_12(1);
0049bf59                  
0049bf5b                  var_8 = nullptr;
0049bf44              }
0049bf44              
0049bf65              if (var_4_1 != 0)
0049bf65              {
0049bf6f                  int32_t edx_9 = (var_4_1[1] - 1);
0049bf6c                  var_4_1[1] = edx_9;
0049bf6c                  
0049bf74                  if (edx_9 == 0)
0049bf7a                      **(uint32_t**)var_4_1(1);
0049bf7a                  
0049bf7c                  int32_t var_4_2 = 0;
0049bf65              }
0049bea2          }
0049be86      }
0049be86      
0049bff1      void* eax_24 = operator new(0x1c);
0049bffb      int32_t edi_1;
0049bffb      
0049bffb      if (eax_24 == 0)
0049c026          edi_1 = 0;
0049bffb      else
0049c022          edi_1 = SkillInfoRegion::SkillInfoRegion(eax_24, this->m_pListBox, i_1, this->m_rgTokens.m_num, arg2, arg3->_iconID.id, 1);
0049c022      
0049c03a      int32_t eax_27 = (this->m_rgTokens.m_sizeAndDeallocate & 0x7fffffff);
0049c041      uint8_t eax_30;
0049c041      
0049c041      if (this->m_rgTokens.m_num >= eax_27)
0049c04f          eax_30 = SmartArray<unsigned long,1>::grow(&this->m_rgTokens, SmartArray<unsigned long,1>::get_new_size(&this->m_rgTokens, (eax_27 + 1)));
0049c04f      
0049c056      class gmSkillUI* ebx;
0049c056      
0049c056      if ((this->m_rgTokens.m_num < eax_27 || eax_30 != 0))
0049c056      {
0049c034          this->m_rgTokens.m_data[this->m_rgTokens.m_num] = edi_1;
0049c034          this->m_rgTokens.m_num += 1;
0049c067          ebx = 1;
0049c056      }
0049c056      else
0049c058          ebx = 0;
0049c058      
0049c06d      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_10 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
0049c06d      
0049c080      if ((InterlockedDecrement(((char*)esi_10 + 4)) == 0 && esi_10 != 0))
0049c088          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_10) + -0x14)(1);
0049c088      
0049c08d      int32_t eax_32;
0049c08d      eax_32 = ebx;
0049c093      return eax_32;
0049bdd0  }

0049c096                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0049c0a0  uint8_t __fastcall gmSkillUI::UpdateSelection(class gmSkillUI* this)

0049c0a0  {
0049c0a5      int32_t esi;
0049c0a5      int32_t var_20 = esi;
0049c0ae      int32_t edi;
0049c0ae      int32_t var_24 = edi;
0049c0b1      int32_t i = 0;
0049c0b1      
0049c0b5      if (this->m_rgTokens.m_num > 0)
0049c0b5      {
0049c0fc          do
0049c0fc          {
0049c0ce              bool cond:2_1 = this->m_rgTokens.m_data[i]->vtable->GetStat() != this->m_SelectedSkill;
0049c0dd              int32_t vtable = this->m_rgTokens.m_data[i]->vtable;
0049c0dd              
0049c0df              if (cond:2_1)
0049c0f0                  *(uint32_t*)(vtable + 0x2c)(1);
0049c0df              else
0049c0df              {
0049c0e3                  *(uint32_t*)(vtable + 0x2c)(6);
0049c0e6                  this->m_SelectedIndex = i;
0049c0df              }
0049c0df              
0049c0f9              i += 1;
0049c0fc          } while (i < this->m_rgTokens.m_num);
0049c0b5      }
0049c0b5      
0049c10d      int32_t* var_14 = nullptr;
0049c118      class TResult __return;
0049c118      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, &PlayerDesc_ClassType, &var_14);
0049c11d      int32_t* edi_1 = var_14;
0049c12f      int32_t var_8 = 0;
0049c133      int32_t var_4 = 0;
0049c133      
0049c137      if (edi_1 != 0)
0049c13d          *(uint32_t*)(*(uint32_t*)edi_1 + 0x10)(edi_1, 0);
0049c13d      
0049c150      void var_c;
0049c150      int32_t ebx = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0049c150      
0049c152      if (edi_1 != 0)
0049c158          *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)(edi_1, 0);
0049c158      
0049c15b      class CACQualities* __return_1 = __return;
0049c15b      
0049c161      if (__return_1 != 0)
0049c161      {
0049c165          if (ebx >= 0)
0049c165          {
0049c178              uint32_t m_SelectedSkill = this->m_SelectedSkill;
0049c178              
0049c180              if (m_SelectedSkill == 0)
0049c180              {
0049c182                  this->vtable->SetState(0x10000011, edi_1, 0);
0049c194                  gmSkillUI::DisplayDefaultFooter(this, __return_1);
0049c199                  __return_1->vtable->Release();
0049c1a0                  int32_t eax_9;
0049c1a0                  eax_9 = 1;
0049c1a9                  return 1;
0049c180              }
0049c180              
0049c1b6              enum SKILL_ADVANCEMENT_CLASS __saved_ebp;
0049c1b6              CACQualities::InqSkillAdvancementClass(__return_1, m_SelectedSkill, &__saved_ebp);
0049c1ea              this->vtable->SetState(0x10000012, edi_1, 0);
0049c1fa              gmSkillUI::DisplaySelectionFooter_Untrained(this, __return_1);
0049c1ff              __return_1->vtable->Release();
0049c209              int32_t eax_12;
0049c209              eax_12 = 1;
0049c20f              return 1;
0049c165          }
0049c165          
0049c167          __return_1->vtable->Release(edi_1, 0);
0049c161      }
0049c161      
0049c16e      class TResult eax_7;
0049c16e      eax_7.m_val = 0;
0049c177      return 0;
0049c0a0  }

0049c0b9                                                                             8d a4 24 00 00 00 00                           ..$....

0049c210  void gmSkillUI::TrainSkillDialogCallback(class PropertyCollection const* arg1)

0049c210  {
0049c215      class PropertyCollection* esi = arg1;
0049c220      uint32_t temp1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
0049c223      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
0049c228      char var_d = 0;
0049c22c      int32_t* var_8 = nullptr;
0049c230      int32_t* var_4 = nullptr;
0049c237      int32_t* eax_2 = m_buckets[temp1];
0049c237      
0049c23b      if (eax_2 != 0)
0049c23b      {
0049c247          while (*(uint32_t*)eax_2 != 0x92)
0049c247          {
0049c249              eax_2 = eax_2[1];
0049c249              
0049c24e              if (eax_2 == 0)
0049c255                  return;
0049c247          }
0049c247          
0049c258          if (eax_2 != 0)
0049c258          {
0049c266              BaseProperty::operator=(&var_8, &eax_2[2]);
0049c26b              int32_t* ecx_2 = var_4;
0049c26b              
0049c271              if (ecx_2 != 0)
0049c271              {
0049c27a                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&var_d);
0049c27d                  ecx_2 = var_4;
0049c271              }
0049c271              
0049c285              if (var_d != 0)
0049c285              {
0049c292                  uint32_t temp1_1 = (COMBINE(0, 0x10000040) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
0049c295                  class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
0049c298                  arg1 = nullptr;
0049c298                  
0049c2a3                  for (int32_t* i = m_buckets_1[temp1_1]; i != 0; i = i[1])
0049c2a3                  {
0049c2ab                      if (*(uint32_t*)i == 0x10000040)
0049c2ab                      {
0049c2b8                          if (i != 0)
0049c2b8                          {
0049c2c2                              BaseProperty::operator=(&var_8, &i[2]);
0049c2c7                              ecx_2 = var_4;
0049c2c7                              
0049c2cd                              if (ecx_2 != 0)
0049c2cd                              {
0049c2d6                                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x78)(&arg1);
0049c2d9                                  ecx_2 = var_4;
0049c2cd                              }
0049c2b8                          }
0049c2b8                          
0049c2b8                          break;
0049c2ab                      }
0049c2a3                  }
0049c2a3                  
0049c2e4                  uint32_t temp1_2 = (COMBINE(0, 0x10000041) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
0049c2e7                  class HashTableData<unsigned long,BaseProperty>** m_buckets_2 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
0049c2ea                  uint32_t var_c = 0;
0049c2ea                  
0049c2f5                  for (int32_t* i_1 = m_buckets_2[temp1_2]; i_1 != 0; i_1 = i_1[1])
0049c2f5                  {
0049c2fd                      if (*(uint32_t*)i_1 == 0x10000041)
0049c2fd                      {
0049c30a                          if (i_1 != 0)
0049c30a                          {
0049c314                              BaseProperty::operator=(&var_8, &i_1[2]);
0049c319                              ecx_2 = var_4;
0049c319                              
0049c31f                              if (ecx_2 != 0)
0049c31f                              {
0049c328                                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x78)(&var_c);
0049c32b                                  ecx_2 = var_4;
0049c31f                              }
0049c30a                          }
0049c30a                          
0049c30a                          break;
0049c2fd                      }
0049c2f5                  }
0049c2f5                  
0049c32f                  class PropertyCollection* edx_9 = arg1;
0049c32f                  
0049c335                  if (edx_9 != 0)
0049c335                  {
0049c337                      uint32_t eax_10 = var_c;
0049c337                      
0049c33d                      if (eax_10 != 0)
0049c33d                      {
0049c341                          CM_Train::Event_TrainSkillAdvancementClass(edx_9, eax_10);
0049c346                          ecx_2 = var_4;
0049c33d                      }
0049c335                  }
0049c285              }
0049c285              
0049c34d              int32_t* eax_11 = var_8;
0049c34d              
0049c353              if (eax_11 != 0)
0049c353              {
0049c35d                  int32_t esi_2 = (eax_11[1] - 1);
0049c35a                  eax_11[1] = esi_2;
0049c35a                  
0049c364                  if (esi_2 == 0)
0049c36a                      **(uint32_t**)eax_11(1);
0049c36a                  
0049c36c                  ecx_2 = var_4;
0049c370                  var_8 = nullptr;
0049c353              }
0049c353              
0049c376              if (ecx_2 != 0)
0049c376              {
0049c37e                  int32_t esi_4 = (ecx_2[1] - 1);
0049c37b                  ecx_2[1] = esi_4;
0049c37b                  
0049c385                  if (esi_4 == 0)
0049c38b                      **(uint32_t**)ecx_2(1);
0049c376              }
0049c258          }
0049c23b      }
0049c210  }

0049c393                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049c3a0  uint8_t __fastcall gmSkillUI::RebuildSkillList(class gmSkillUI* this)

0049c3a0  {
0049c3a0      int32_t ebp;
0049c3a0      int32_t var_4 = ebp;
0049c3a9      int32_t ebx;
0049c3a9      int32_t var_54 = ebx;
0049c3aa      int32_t* var_58 = &var_4;
0049c3ab      int32_t esi;
0049c3ab      int32_t var_5c = esi;
0049c3ac      int32_t edi;
0049c3ac      int32_t var_60 = edi;
0049c3af      int32_t eax;
0049c3af      int32_t edx;
0049c3af      eax = gmStatManagementUI::FlushList(this);
0049c3b4      int32_t var_64 = 0x10000004;
0049c3b9      struct Turbine_GUID* var_68 = 2;
0049c3bb      int32_t var_6c = 4;
0049c3bd      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
0049c3c4      int32_t* esp = &var_60;
0049c3c4      
0049c3cd      if (eax_1 != 0)
0049c3cd      {
0049c3da          struct Turbine_GUID* var_50;
0049c3da          int32_t* var_64_1 = &var_50;
0049c3df          var_68 = &PlayerDesc_ClassType;
0049c3e5          var_50 = nullptr;
0049c3f0          void __return;
0049c3f0          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_68, var_64_1);
0049c3f5          struct Turbine_GUID* ecx_1 = var_50;
0049c3fe          var_68 = ecx_1;
0049c400          int32_t* var_64_2 = nullptr;
0049c403          struct Turbine_GUID* eax_3 = var_68;
0049c409          int32_t __return_1 = 0;
0049c40d          uint32_t* i_1 = nullptr;
0049c40d          
0049c411          if (eax_3 != 0)
0049c417              *(uint32_t*)(eax_3->m_data1 + 0x10)();
0049c417          
0049c423          esp = &var_68;
0049c42a          class UIElement* var_4c;
0049c42a          int32_t ecx_4 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&__return_1, &var_4c);
0049c42a          
0049c430          if (ecx_1 != 0)
0049c436              *(uint32_t*)(ecx_1->m_data1 + 0x14)();
0049c436          
0049c43f          if (eax_1 != 0)
0049c43f          {
0049c445              if (ecx_4 >= 0)
0049c445              {
0049c468                  class UIElement* eax_6 = UIElement_ListBox::AddItemFromTemplateList(this->m_pListBox, 1, nullptr);
0049c46d                  class UIElement_ListBox* m_pListBox = this->m_pListBox;
0049c476                  var_4c = eax_6;
0049c47a                  class UIElement* eax_7 = UIElement_ListBox::AddItemFromTemplateList(m_pListBox, 2, nullptr);
0049c48a                  class UIElement* eax_8 = UIElement_ListBox::AddItemFromTemplateList(this->m_pListBox, 3, nullptr);
0049c49c                  class UIElement* eax_9 = UIElement_ListBox::AddItemFromTemplateList(this->m_pListBox, 4, nullptr);
0049c4ac                  PackableHashTable<unsigned long,SkillBase>::begin(((char*)eax_1 + 0x38), &__return_1);
0049c4b1                  uint32_t* i = i_1;
0049c4b1                  
0049c4b7                  while (i != 0)
0049c4b7                  {
0049c4c1                      int32_t var_30 = 0x7a7408;
0049c4c9                      int32_t s;
0049c4c9                      __builtin_memset(&s, 0, 0x1c);
0049c4f5                      CACQualities::InqSkill(eax_1, *(uint32_t*)i, &var_30);
0049c4fa                      int32_t s_1 = s;
0049c501                      uint32_t var_78_1;
0049c501                      class SkillBase* var_74_1;
0049c501                      class UIElement* var_70_2;
0049c501                      class UIElement* var_6c_5;
0049c501                      
0049c501                      if (s_1 == 3)
0049c501                      {
0049c509                          var_6c_5 = eax_7;
0049c50a                          var_70_2 = var_4c;
0049c50e                          var_74_1 = &i[2];
0049c50f                          var_78_1 = *(uint32_t*)i;
0049c501                      }
0049c501                      else if (s_1 != 2)
0049c515                      {
0049c52f                          class UIElement* ecx_15;
0049c52f                          
0049c52f                          if ((s_1 != 1 || i[0xa] > 1))
0049c52f                          {
0049c53c                              ecx_15 = eax_9;
0049c540                              var_6c_5 = nullptr;
0049c52f                          }
0049c52f                          else
0049c52f                          {
0049c535                              ecx_15 = eax_8;
0049c539                              var_6c_5 = eax_9;
0049c52f                          }
0049c52f                          
0049c543                          var_70_2 = ecx_15;
0049c547                          var_74_1 = &i[2];
0049c548                          var_78_1 = *(uint32_t*)i;
0049c515                      }
0049c515                      else
0049c515                      {
0049c51d                          var_6c_5 = eax_8;
0049c51e                          var_70_2 = eax_7;
0049c522                          var_74_1 = &i[2];
0049c523                          var_78_1 = *(uint32_t*)i;
0049c515                      }
0049c515                      
0049c54b                      gmSkillUI::AddSortedSkill(this, var_78_1, var_74_1, var_70_2, var_6c_5);
0049c550                      uint32_t* i_2 = i[0x18];
0049c555                      var_30 = 0x79285c;
0049c555                      
0049c55d                      if (i_2 == 0)
0049c55d                      {
0049c56d                          int32_t esi_4 = (i[0x19] + 1);
0049c570                          int32_t var_34;
0049c570                          
0049c570                          if (esi_4 >= var_34)
0049c570                          {
0049c580                          label_49c580:
0049c580                              i = nullptr;
0049c570                          }
0049c570                          else
0049c570                          {
0049c579                              int32_t var_38;
0049c579                              
0049c579                              while (*(uint32_t*)(var_38 + (esi_4 << 2)) == 0)
0049c579                              {
0049c57b                                  esi_4 += 1;
0049c57b                                  
0049c57e                                  if (esi_4 >= var_34)
0049c57e                                      goto label_49c580;
0049c579                              }
0049c579                              
0049c587                              i = *(uint32_t*)(var_38 + (esi_4 << 2));
0049c570                          }
0049c55d                      }
0049c55d                      else
0049c55f                          i = i_2;
0049c4b7                  }
0049c4b7                  
0049c593                  struct gmSkillUI::VTable* vtable = this->vtable;
0049c598                  this->m_SelectedIndex = 0xffffffff;
0049c5ae                  class UIElement* ebx_3;
0049c5ae                  ebx_3 = vtable->RecvNotice_AddSalvageItem(eax_1);
0049c5a8                  var_4c->vtable->ListenToGlobalMessage();
0049c5b7                  eax_9->vtable->ListenToGlobalMessage();
0049c5c4                  *(uint32_t*)var_64_2;
0049c5c5                  return ebx_3;
0049c445              }
0049c445              
0049c447              eax_1->vtable->Release();
0049c43f          }
0049c43f          
0049c452          *(uint32_t*)(var_50->m_data1 + 0x14)();
0049c3cd      }
0049c3cd      
0049c455      eax_1 = 0;
0049c457      *(uint32_t*)esp;
0049c457      esp[1];
0049c457      esp[3];
0049c45d      *(uint32_t*)esp[2];
0049c45e      return 0;
0049c3a0  }

0049c5c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049c5d0  void __fastcall gmSkillUI::RecvNotice_PlayerDescReceived(class gmSkillUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

0049c5d0  {
0049c5d6      gmSkillUI::RebuildSkillList(((char*)this - 0x5f8));
0049c5d0  }

0049c5de                                                                                            90 90                                ..

0049c5e0  void __fastcall gmSkillUI::RecvNotice_SkillAdvancementClassChanged(class gmSkillUI* this)

0049c5e0  {
0049c5e6      /* tailcall */
0049c5e6      return gmSkillUI::RebuildSkillList(((char*)this - 0x5f8));
0049c5e0  }

0049c5eb                                   90 90 90 90 90                                                             .....

0049c5f0  uint8_t __thiscall gmSkillUI::TrainSkill(class gmSkillUI* this, class CACQualities const* arg2)

0049c5f0  {
0049c609      if (this->m_SelectedSkill == 0)
0049c609      {
0049c60b          uint32_t eax;
0049c60b          eax = 0;
0049c613          return 0;
0049c609      }
0049c609      
0049c616      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0049c621      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0049c629      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0049c637      SkillSystem::InqSkillName(this->m_SelectedSkill, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
0049c647      int32_t eax_3 = this->vtable->GetCostToRaise(arg2);
0049c64f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0049c654      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0049c65c      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
0049c665      char (* var_134_4)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data;
0049c666      int32_t var_138_1 = eax_3;
0049c671      AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, "Are you sure you want to spend %…");
0049c680      void var_98;
0049c680      StringInfo::StringInfo(&var_98);
0049c695      class PStringBase<unsigned short> var_11c;
0049c695      class PStringBase<unsigned short>* eax_7;
0049c695      int32_t ebx_1;
0049c695      void* esi_1;
0049c695      eax_7 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data);
0049c6a2      StringInfo::SetLiteralValue(&var_98, eax_7, 1);
0049c6ab      int32_t* edi_1 = (var_11c - 0x14);
0049c6ab      
0049c6be      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0049c6c6          **(uint32_t**)edi_1(1);
0049c6c6      
0049c6cc      PropertyCollection::PropertyCollection(&AC1Legacy::PStringBase<char>::s_NullBuffer_4);
0049c6e4      int32_t __saved_ebx;
0049c6e4      BaseProperty::SetPropertyName(&__saved_ebx, 0x8e);
0049c71d      uint32_t var_120 = BaseProperty::GetPropertyName(&__saved_ebx);
0049c721      void var_110;
0049c721      HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_120, &__saved_ebx);
0049c72f      BaseProperty::SetPropertyName(&__saved_ebx, 0xc5);
0049c760      var_120 = BaseProperty::GetPropertyName(&__saved_ebx);
0049c772      HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_120, &__saved_ebx);
0049c780      BaseProperty::SetPropertyName(&__saved_ebx, 0x10000040);
0049c789      *(uint32_t*)((char*)esi_1 + 0x63c);
0049c7ad      var_120 = BaseProperty::GetPropertyName(&__saved_ebx);
0049c7bf      HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_120, &__saved_ebx);
0049c7cd      BaseProperty::SetPropertyName(&__saved_ebx, 0x10000041);
0049c7f4      var_120 = BaseProperty::GetPropertyName(&__saved_ebx);
0049c806      class PropertyCollection* eax_15;
0049c806      void (* edx_4)(class PropertyCollection const*);
0049c806      eax_15 = HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_120, &__saved_ebx);
0049c80f      void (* var_138_11)(class PropertyCollection const* arg1) = gmSkillUI::TrainSkillDialogCallback;
0049c814      class AC1Legacy::PSRefBuffer<char>** var_13c_4 = &AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0049c815      DialogFactory::MakeCallbackDialogInCurrentUI(eax_15, edx_4);
0049c867      PropertyCollection::~PropertyCollection(&AC1Legacy::PStringBase<char>::s_NullBuffer_4);
0049c873      void var_9c;
0049c873      StringInfo::~StringInfo(&var_9c);
0049c878      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0049c878      
0049c88e      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
0049c890          AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
0049c890      
0049c898      uint32_t esi_7 = var_120;
0049c898      
0049c8a8      if ((InterlockedDecrement((esi_7 + 4)) == 0 && esi_7 != 0))
0049c8b0          **(uint32_t**)esi_7(1);
0049c8b0      
0049c8b4      int32_t eax_20;
0049c8b4      eax_20 = 1;
0049c8ba      return 1;
0049c5f0  }

0049c8bd                                                                                         90 90 90                               ...

0049c8c0  uint8_t __fastcall gmSkillUI::RaiseSelection(class gmSkillUI* this)

0049c8c0  {
0049c8c3      enum SKILL_ADVANCEMENT_CLASS ebx;
0049c8c3      enum SKILL_ADVANCEMENT_CLASS var_1c = ebx;
0049c8d2      int32_t __saved_edi;
0049c8d2      int32_t* esp = &__saved_edi;
0049c8d2      
0049c8d3      if (this->m_SelectedSkill != 0)
0049c8d3      {
0049c8d9          struct Turbine_GUID* m_SelectedSkill_4;
0049c8d9          int32_t* var_2c_1 = &m_SelectedSkill_4;
0049c8de          struct Turbine_GUID* m_SelectedSkill = &PlayerDesc_ClassType;
0049c8e4          m_SelectedSkill_4 = nullptr;
0049c8ef          class TResult __return;
0049c8ef          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, m_SelectedSkill, var_2c_1);
0049c8f4          struct Turbine_GUID* m_SelectedSkill_3 = m_SelectedSkill_4;
0049c8fd          m_SelectedSkill = m_SelectedSkill_3;
0049c8ff          int32_t var_2c_2 = 0;
0049c902          struct Turbine_GUID* m_SelectedSkill_2 = m_SelectedSkill;
0049c906          int32_t var_8 = 0;
0049c90a          int32_t var_4_1 = 0;
0049c90a          
0049c90e          if (m_SelectedSkill_2 != 0)
0049c914              *(uint32_t*)(m_SelectedSkill_2->m_data1 + 0x10)();
0049c914          
0049c920          esp = &m_SelectedSkill;
0049c927          void var_c;
0049c927          int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0049c927          
0049c929          if (m_SelectedSkill_3 != 0)
0049c92f              *(uint32_t*)(m_SelectedSkill_3->m_data1 + 0x14)();
0049c92f          
0049c932          class TResult __return_1 = __return;
0049c932          
0049c938          if (__return_1 != 0)
0049c938          {
0049c93c              if (ebp_1 >= 0)
0049c93c              {
0049c94f                  uint32_t m_SelectedSkill_1 = this->m_SelectedSkill;
0049c95d                  var_1c = UNDEF_SKILL_ADVANCEMENT_CLASS;
0049c961                  CACQualities::InqSkillAdvancementClass(__return_1, m_SelectedSkill_1, &var_1c);
0049c961                  
0049c96e                  if (var_1c < TRAINED_SKILL_ADVANCEMENT_CLASS)
0049c96e                  {
0049c9b3                      gmSkillUI::TrainSkill(this, __return_1);
0049c9bc                      *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049c9c2                      int32_t eax_8;
0049c9c2                      eax_8 = 1;
0049c9c8                      return 1;
0049c96e                  }
0049c96e                  
0049c970                  struct gmSkillUI::VTable* vtable = this->vtable;
0049c972                  this->m_bAwaitingRaise = 1;
0049c979                  uint32_t eax_3 = vtable->GetCostToRaise(__return_1);
0049c986                  m_SelectedSkill = this->m_SelectedSkill;
0049c987                  CM_Train::Event_TrainSkill(m_SelectedSkill, eax_3);
0049c991                  gmStatManagementUI::GetFooterButton(this)->vtable->SetState(0xd);
0049c9a6                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049c9a9                  int32_t eax_6;
0049c9a9                  eax_6 = 1;
0049c9b2                  return 1;
0049c93c              }
0049c93c              
0049c942              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049c942              esp = &__saved_edi;
0049c938          }
0049c8d3      }
0049c8d3      
0049c945      uint32_t eax;
0049c945      eax = 0;
0049c947      *(uint32_t*)esp;
0049c947      esp[1];
0049c947      esp[2];
0049c947      esp[3];
0049c94e      return 0;
0049c8c0  }

0049c9c9                             90 90 90 90 90 90 90                                                           .......

0049c9d0  class UIElement* __thiscall gmAttributeUI::DynamicCast(class gmAttributeUI* this, uint32_t arg2) __pure

0049c9d0  {
0049c9dc      if (arg2 == 0x1000002a)
0049c9e9          return this;
0049c9e9      
0049c9e3      int32_t edx_1;
0049c9e3      edx_1 = arg2 != 3;
0049c9e7      return (this & (edx_1 - 1));
0049c9d0  }

0049c9ec                                      90 90 90 90                                                              ....

0049c9f0  uint32_t gmAttributeUI::GetUIElementType(class gmAttributeUI const* this @ ecx) __pure

0049c9f0  {
0049c9f5      return 0x1000002a;
0049c9f0  }

0049c9f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0049ca00  class UIElement* gmAttributeUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0049ca00  {
0049ca06      void* result = operator new(0x640);
0049ca06      
0049ca12      if (result == 0)
0049ca50          return 0;
0049ca50      
0049ca20      gmStatManagementUI::gmStatManagementUI(result, arg1, arg2);
0049ca25      *(uint32_t*)result = 0x7a7df8;
0049ca2b      *(uint32_t*)((char*)result + 0x5f8) = 0x7a7b50;
0049ca35      *(uint32_t*)((char*)result + 0x5fc) = 0x7c3c5c;
0049ca3f      *(uint32_t*)((char*)result + 0x63c) = 0xffffffff;
0049ca4c      return result;
0049ca00  }

0049ca51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0049ca60  void* __thiscall gmAttributeUI::`scalar deleting destructor'(class gmAttributeUI* this, uint32_t arg2)

0049ca60  {
0049ca63      this->vtable = 0x7a7df8;
0049ca69      this->vtable = &gmAttributeUI::`vftable';
0049ca73      this->vtable = &gmStatManagementUI::`vftable';
0049ca7d      gmStatManagementUI::~gmStatManagementUI(this);
0049ca7d      
0049ca87      if ((arg2 & 1) != 0)
0049ca8a          operator delete(this);
0049ca8a      
0049ca95      return this;
0049ca60  }

0049ca98                                                                          90 90 90 90 90 90 90 90                          ........

0049caa0  void gmAttributeUI::Register()

0049caa0  {
0049caaa      UIElement::RegisterElementClass(0x1000002a, gmAttributeUI::Create);
0049caa0  }

0049cab3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049cac0  uint8_t __thiscall gmAttributeUI::SetSelection(class gmAttributeUI* this, class UIElement* arg2)

0049cac0  {
0049cacc      int32_t var_c = 0xffffffff;
0049cacc      
0049cad4      if (arg2 != 0)
0049cad4      {
0049cad6          struct UIElement::VTable* vtable = arg2->vtable;
0049cae2          int32_t* var_8 = nullptr;
0049caea          int32_t* var_4_1 = nullptr;
0049caf2          vtable->InqProperty(0x1000003a, &var_8);
0049caf8          int32_t* ecx_1 = var_4_1;
0049caf8          
0049cafe          if (ecx_1 != 0)
0049cafe          {
0049cb07              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x78)(&var_c);
0049cb0a              ecx_1 = var_4_1;
0049cafe          }
0049cafe          
0049cb0e          int32_t* eax_2 = var_8;
0049cb0e          
0049cb14          if (eax_2 != 0)
0049cb14          {
0049cb1e              int32_t edx_2 = (eax_2[1] - 1);
0049cb1b              eax_2[1] = edx_2;
0049cb1b              
0049cb23              if (edx_2 == 0)
0049cb29                  **(uint32_t**)eax_2(1);
0049cb29              
0049cb2b              ecx_1 = var_4_1;
0049cb2f              var_8 = nullptr;
0049cb14          }
0049cb14          
0049cb39          if (ecx_1 != 0)
0049cb39          {
0049cb41              int32_t edx_4 = (ecx_1[1] - 1);
0049cb3e              ecx_1[1] = edx_4;
0049cb3e              
0049cb46              if (edx_4 == 0)
0049cb4c                  **(uint32_t**)ecx_1(1);
0049cb39          }
0049cad4      }
0049cad4      
0049cb4e      int32_t eax_6 = var_c;
0049cb4e      
0049cb58      if (this->m_SelectedIndex == eax_6)
0049cb58      {
0049cb5a          eax_6 = 0xffffffff;
0049cb5d          var_c = 0xffffffff;
0049cb58      }
0049cb58      
0049cb61      this->m_SelectedIndex = eax_6;
0049cb75      return this->vtable->UpdateSelection();
0049cac0  }

0049cb78                                                                          90 90 90 90 90 90 90 90                          ........

0049cb80  uint32_t __thiscall gmAttributeUI::GetCostToRaise(class gmAttributeUI const* this, class CACQualities const* arg2)

0049cb80  {
0049cb9d      int32_t var_14;
0049cb9d      
0049cb9d      if (this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetType() != 8)
0049cb9d      {
0049cc09          int32_t m_SelectedIndex_1 = this->m_SelectedIndex;
0049cc11          int32_t var_10_1 = 0;
0049cc15          int32_t var_c_1 = 0;
0049cc19          int32_t var_8_1 = 0;
0049cc1d          int32_t var_4_1 = 0;
0049cc21          class InfoRegion** m_data = this->m_rgTokens.m_data;
0049cc27          var_14 = 0x7a7b30;
0049cc41          CACQualities::InqAttribute2nd(arg2, m_data[m_SelectedIndex_1]->vtable->GetStat(&var_14));
0049cc41          
0049cc51          if (var_10_1 < ExperienceSystem::GetMaxAttribute2ndLevel())
0049cc6b              return (ExperienceSystem::ExperienceToAttribute2ndLevel((var_10_1 + 1)) - var_8_1);
0049cb9d      }
0049cb9d      else
0049cb9d      {
0049cb9f          class InfoRegion** m_data_1 = this->m_rgTokens.m_data;
0049cba7          int32_t var_10 = 0;
0049cbab          int32_t var_c = 0;
0049cbaf          int32_t var_8 = 0;
0049cbb3          int32_t m_SelectedIndex = this->m_SelectedIndex;
0049cbb9          var_14 = 0x7a7b14;
0049cbd3          CACQualities::InqAttribute(arg2, m_data_1[m_SelectedIndex]->vtable->GetStat(&var_14));
0049cbd3          
0049cbe3          if (var_10 < ExperienceSystem::GetMaxAttributeLevel())
0049cc06              return (ExperienceSystem::ExperienceToAttributeLevel((var_10 + 1)) - var_8);
0049cb9d      }
0049cbeb      return 0;
0049cb80  }

0049cc6e                                            90 90                                                                ..

0049cc70  uint32_t __thiscall gmAttributeUI::GetCostToRaise10(class gmAttributeUI const* this, class CACQualities const* arg2)

0049cc70  {
0049cc88      int32_t eax_1 = this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetType();
0049cc8b      class InfoRegion** m_data = this->m_rgTokens.m_data;
0049cc96      int32_t m_SelectedIndex = this->m_SelectedIndex;
0049cc9c      int32_t var_8 = 0;
0049cca0      int32_t var_c = 0;
0049cca4      int32_t var_10 = 0;
0049cca8      int32_t var_14;
0049cca8      
0049cca8      if (eax_1 != 8)
0049cca8      {
0049cd15          var_14 = 0x7a7b30;
0049cd1d          int32_t var_4_1 = 0;
0049cd33          CACQualities::InqAttribute2nd(arg2, m_data[m_SelectedIndex]->vtable->GetStat(&var_14));
0049cd33          
0049cd43          if (var_10 < ExperienceSystem::GetMaxAttribute2ndLevel())
0049cd43          {
0049cd4e              int32_t eax_13 = (ExperienceSystem::GetMaxAttribute2ndLevel() - var_10);
0049cd50              int32_t ecx_7 = 0xa;
0049cd50              
0049cd57              if (eax_13 < 0xa)
0049cd5b                  ecx_7 = eax_13;
0049cd5b              
0049cd5d              if ((eax_13 >= 0xa || eax_13 > 0))
0049cd79                  return (ExperienceSystem::ExperienceToAttribute2ndLevel((var_10 + ecx_7)) - var_8);
0049cd43          }
0049cca8      }
0049cca8      else
0049cca8      {
0049ccaa          var_14 = 0x7a7b14;
0049ccc4          CACQualities::InqAttribute(arg2, m_data[m_SelectedIndex]->vtable->GetStat(&var_14));
0049ccc4          
0049ccd4          if (var_10 < ExperienceSystem::GetMaxAttributeLevel())
0049ccd4          {
0049cce3              int32_t eax_6 = (ExperienceSystem::GetMaxAttributeLevel() - var_10);
0049cce5              int32_t ecx_4 = 0xa;
0049cce5              
0049ccec              if (eax_6 < 0xa)
0049ccf0                  ecx_4 = eax_6;
0049ccf0              
0049ccf2              if ((eax_6 >= 0xa || eax_6 > 0))
0049cd12                  return (ExperienceSystem::ExperienceToAttributeLevel((var_10 + ecx_4)) - var_8);
0049ccd4          }
0049cca8      }
0049cd83      return 0;
0049cc70  }

0049cd86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049cd90  uint8_t __thiscall gmAttributeUI::MessageIsFromSelectedElement(class gmAttributeUI const* this, enum StatType arg2, uint32_t arg3)

0049cd90  {
0049cd93      int32_t m_SelectedIndex = this->m_SelectedIndex;
0049cd93      
0049cd9c      if (((m_SelectedIndex != 0xffffffff && this->m_rgTokens.m_data[m_SelectedIndex]->vtable->GetType() == arg2) && this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetStat() == arg3))
0049cdd2          return 1;
0049cdd2      
0049cdd8      return 0;
0049cd90  }

0049cddb                                                                                   90 90 90 90 90                             .....

0049cde0  uint8_t __thiscall gmAttributeUI::DisplayDefaultFooter(class gmAttributeUI* this, class CACQualities const* arg2)

0049cde0  {
0049cdf0      void var_90;
0049cdf0      StringInfo::StringInfo(&var_90);
0049ce04      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049ce18      void* __return;
0049ce18      class PStringBase<unsigned short>* eax = StringInfo::GetString(&var_90, &__return, 0);
0049ce27      UIElement_Text::SetTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), eax, 0, 0);
0049ce36      int32_t* ebx_1 = ((char*)__return - 0x14);
0049ce36      
0049ce45      if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
0049ce4d          **(uint32_t**)ebx_1(1);
0049ce4d      
0049ce5f      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049ce6f      class PStringBase<unsigned short>* eax_4 = StringInfo::GetString(&var_90, &__return, 0);
0049ce7e      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneLabel(this), eax_4);
0049ce87      void* ebx_3 = ((char*)__return - 0x14);
0049ce87      
0049ce96      if ((InterlockedDecrement(((char*)ebx_3 + 4)) == 0 && ebx_3 != 0))
0049ce9e          **(uint32_t**)ebx_3(1);
0049ce9e      
0049ceb7      int32_t var_9c = 0;
0049cebf      CBaseQualities::InqInt(&arg2->vtable, 0x18, &var_9c, 0, 0);
0049ced4      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049cee2      int32_t var_b4_3 = 0;
0049ceea      StringInfo::AddVariable_Int(&var_90, 0, var_9c);
0049cefa      class PStringBase<unsigned short>* eax_8 = StringInfo::GetString(&var_90, &__return, 0);
0049cf09      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneValue(this), eax_8);
0049cf12      void* ebx_5 = ((char*)__return - 0x14);
0049cf12      
0049cf21      if ((InterlockedDecrement(((char*)ebx_5 + 4)) == 0 && ebx_5 != 0))
0049cf29          **(uint32_t**)ebx_5(1);
0049cf29      
0049cf3b      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049cf4b      class PStringBase<unsigned short>* eax_12 = StringInfo::GetString(&var_90, &__return, 0);
0049cf5a      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoLabel(this), eax_12);
0049cf63      void* ebx_7 = ((char*)__return - 0x14);
0049cf63      
0049cf72      if ((InterlockedDecrement(((char*)ebx_7 + 4)) == 0 && ebx_7 != 0))
0049cf7a          **(uint32_t**)ebx_7(1);
0049cf7a      
0049cf7e      int32_t var_98 = 0;
0049cf82      int32_t var_94 = 0;
0049cf8f      CBaseQualities::InqInt64(&arg2->vtable, 2, &var_98);
0049cfa4      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049cfb7      int32_t var_b4_9 = var_94;
0049cfbe      StringInfo::AddVariable_Int(&var_90, 0, var_98);
0049cfce      class PStringBase<unsigned short>* eax_17 = StringInfo::GetString(&var_90, &__return, 0);
0049cfdd      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoValue(this), eax_17);
0049cfe6      void* esi_2 = ((char*)__return - 0x14);
0049cfe6      
0049cff5      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049cffd          **(uint32_t**)esi_2(1);
0049cffd      
0049d003      StringInfo::~StringInfo(&var_90);
0049d00b      int32_t eax_21;
0049d00b      eax_21 = 1;
0049d014      return 1;
0049cde0  }

0049d017                                                                       90 90 90 90 90 90 90 90 90                         .........

0049d020  uint8_t __fastcall gmAttributeUI::RaiseSelection(class gmAttributeUI* this)

0049d020  {
0049d02f      int32_t __saved_edi;
0049d02f      int32_t* esp = &__saved_edi;
0049d02f      
0049d030      if (this->m_SelectedIndex != 0xffffffff)
0049d030      {
0049d036          struct Turbine_GUID* var_14;
0049d036          int32_t* var_28_1 = &var_14;
0049d03b          struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
0049d043          var_14 = nullptr;
0049d04e          class TResult __return;
0049d04e          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28_1);
0049d053          struct Turbine_GUID* edi_1 = var_14;
0049d05c          var_2c = edi_1;
0049d05e          int32_t var_28_2 = 0;
0049d061          struct Turbine_GUID* eax_2 = var_2c;
0049d065          int32_t var_8 = 0;
0049d069          int32_t var_4_1 = 0;
0049d069          
0049d06d          if (eax_2 != 0)
0049d073              *(uint32_t*)(eax_2->m_data1 + 0x10)();
0049d073          
0049d07f          esp = &var_2c;
0049d086          void var_c;
0049d086          int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0049d086          
0049d088          if (edi_1 != 0)
0049d08e              *(uint32_t*)(edi_1->m_data1 + 0x14)();
0049d08e          
0049d091          class TResult __return_1 = __return;
0049d091          
0049d097          if (__return_1 != 0)
0049d097          {
0049d09b              if (ebp_1 >= 0)
0049d09b              {
0049d0c2                  bool cond:3 = this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetType() != 8;
0049d0c6                  this->m_bAwaitingRaise = 1;
0049d0c6                  
0049d0cd                  if (cond:3)
0049d0cd                  {
0049d104                      int32_t* ebx_2 = this->m_rgTokens.m_data[this->m_SelectedIndex];
0049d111                      var_2c = this->vtable->GetCostToRaise(__return_1);
0049d119                      var_2c = *(uint32_t*)(*(uint32_t*)ebx_2 + 0x18)(var_2c);
0049d11a                      CM_Train::Event_TrainAttribute2nd(var_2c);
0049d0cd                  }
0049d0cd                  else
0049d0cd                  {
0049d0db                      int32_t* ebx_1 = this->m_rgTokens.m_data[this->m_SelectedIndex];
0049d0e2                      struct Turbine_GUID* eax_7 = this->vtable->GetCostToRaise(__return_1);
0049d0e8                      int32_t edx_5 = *(uint32_t*)ebx_1;
0049d0ea                      var_2c = eax_7;
0049d0f0                      var_2c = *(uint32_t*)(edx_5 + 0x18)(var_2c);
0049d0f1                      CM_Train::Event_TrainAttribute(var_2c);
0049d0cd                  }
0049d0cd                  
0049d124                  gmStatManagementUI::GetFooterButton(this)->vtable->SetState(0xd);
0049d139                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049d13f                  int32_t eax_15;
0049d13f                  eax_15 = 1;
0049d145                  return 1;
0049d09b              }
0049d09b              
0049d0a1              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049d0a1              esp = &__saved_edi;
0049d097          }
0049d030      }
0049d030      
0049d0a4      class TResult eax;
0049d0a4      eax.m_val = 0;
0049d0a6      *(uint32_t*)esp;
0049d0a6      esp[1];
0049d0a6      esp[2];
0049d0a6      esp[3];
0049d0ad      return 0;
0049d020  }

0049d146                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049d150  uint8_t __fastcall gmAttributeUI::Raise10Selection(class gmAttributeUI* this)

0049d150  {
0049d15f      int32_t __saved_edi;
0049d15f      int32_t* esp = &__saved_edi;
0049d15f      
0049d160      if (this->m_SelectedIndex != 0xffffffff)
0049d160      {
0049d166          struct Turbine_GUID* var_14;
0049d166          int32_t* var_28_1 = &var_14;
0049d16b          struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
0049d173          var_14 = nullptr;
0049d17e          class TResult __return;
0049d17e          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28_1);
0049d183          struct Turbine_GUID* edi_1 = var_14;
0049d18c          var_2c = edi_1;
0049d18e          int32_t var_28_2 = 0;
0049d191          struct Turbine_GUID* eax_2 = var_2c;
0049d195          int32_t var_8 = 0;
0049d199          int32_t var_4_1 = 0;
0049d199          
0049d19d          if (eax_2 != 0)
0049d1a3              *(uint32_t*)(eax_2->m_data1 + 0x10)();
0049d1a3          
0049d1af          esp = &var_2c;
0049d1b6          void var_c;
0049d1b6          int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0049d1b6          
0049d1b8          if (edi_1 != 0)
0049d1be              *(uint32_t*)(edi_1->m_data1 + 0x14)();
0049d1be          
0049d1c1          class TResult __return_1 = __return;
0049d1c1          
0049d1c7          if (__return_1 != 0)
0049d1c7          {
0049d1cb              if (ebp_1 >= 0)
0049d1cb              {
0049d1f2                  bool cond:3 = this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetType() != 8;
0049d1f6                  this->m_bAwaitingRaise = 1;
0049d1f6                  
0049d1fd                  if (cond:3)
0049d1fd                  {
0049d234                      int32_t* ebx_2 = this->m_rgTokens.m_data[this->m_SelectedIndex];
0049d241                      var_2c = this->vtable->GetCostToRaise10(__return_1);
0049d249                      var_2c = *(uint32_t*)(*(uint32_t*)ebx_2 + 0x18)(var_2c);
0049d24a                      CM_Train::Event_TrainAttribute2nd(var_2c);
0049d1fd                  }
0049d1fd                  else
0049d1fd                  {
0049d20b                      int32_t* ebx_1 = this->m_rgTokens.m_data[this->m_SelectedIndex];
0049d212                      struct Turbine_GUID* eax_7 = this->vtable->GetCostToRaise10(__return_1);
0049d218                      int32_t edx_5 = *(uint32_t*)ebx_1;
0049d21a                      var_2c = eax_7;
0049d220                      var_2c = *(uint32_t*)(edx_5 + 0x18)(var_2c);
0049d221                      CM_Train::Event_TrainAttribute(var_2c);
0049d1fd                  }
0049d1fd                  
0049d254                  gmStatManagementUI::GetFooter10Button(this)->vtable->SetState(0xd);
0049d269                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049d26f                  int32_t eax_15;
0049d26f                  eax_15 = 1;
0049d275                  return 1;
0049d1cb              }
0049d1cb              
0049d1d1              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0049d1d1              esp = &__saved_edi;
0049d1c7          }
0049d160      }
0049d160      
0049d1d4      class TResult eax;
0049d1d4      eax.m_val = 0;
0049d1d6      *(uint32_t*)esp;
0049d1d6      esp[1];
0049d1d6      esp[2];
0049d1d6      esp[3];
0049d1dd      return 0;
0049d150  }

0049d276                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0049d280  uint8_t __thiscall gmAttributeUI::DisplaySelectionFooter_Attribute(class gmAttributeUI* this, class CACQualities const* arg2)

0049d280  {
0049d286      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049d294      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_1;
0049d29f      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049d2a7      this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetLabel(&PStringBase<unsigned short>::s_NullBuffer_7);
0049d2ba      class InfoRegion** m_data_1 = this->m_rgTokens.m_data;
0049d2c0      int32_t m_SelectedIndex_1 = this->m_SelectedIndex;
0049d2c8      int32_t var_98 = 0;
0049d2db      class CACQualities* ebp = arg2;
0049d2e5      CACQualities::InqAttribute(ebp, m_data_1[m_SelectedIndex_1]->vtable->GetStat(&var_98, 1));
0049d2ea      int32_t m_SelectedIndex = this->m_SelectedIndex;
0049d2f0      class InfoRegion** m_data = this->m_rgTokens.m_data;
0049d2f6      int32_t var_a8 = 0;
0049d30b      CACQualities::InqAttribute(ebp, m_data[m_SelectedIndex]->vtable->GetStat(&var_a8, 0));
0049d310      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0049d315      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_2;
0049d31d      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0049d327      int32_t var_c4_3 = var_a8;
0049d328      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer_7;
0049d333      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_6, u"%s: %d");
0049d34b      UIElement_Text::SetTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_6, 0, 0);
0049d350      int32_t edi = var_a8;
0049d354      int32_t edi_1 = (edi - var_98);
0049d358      class PSRefBufferCharData<unsigned short>* __return;
0049d358      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5;
0049d358      
0049d358      if (edi != var_98)
0049d358      {
0049d35e          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
0049d363          __return = PStringBase<unsigned short>::s_NullBuffer_3;
0049d36b          int32_t ebp_1 = 0;
0049d36d          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0049d36f          int32_t eax_8 = var_98;
0049d373          int32_t ecx_9 = var_a8;
0049d373          
0049d379          if (eax_8 < ecx_9)
0049d379          {
0049d384              ebp_1 = 1;
0049d389              PStringBase<unsigned short>::set(&__return, &data_7a7844);
0049d379          }
0049d379          else if (eax_8 > ecx_9)
0049d392              ebp_1 = 2;
0049d392          
0049d397          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
0049d39c          PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_4;
0049d3a4          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
0049d3aa          int32_t var_c4_6 = edi_1;
0049d3ab          class PSRefBufferCharData<unsigned short>* __return_1 = __return;
0049d3b6          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_5, u" (%s%d)");
0049d3cf          UIElement_Text::AppendTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_5, 0, ebp_1);
0049d3de          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_3 = &PStringBase<unsigned short>::s_NullBuffer_5->m_data[-0xa];
0049d3de          
0049d3ed          if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0049d3f5              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0049d3f5          
0049d3fb          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_5 = &__return->m_data[-0xa];
0049d3fb          
0049d40a          if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
0049d412              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
0049d412          
0049d414          ebp = arg2;
0049d358      }
0049d358      
0049d41f      void var_90;
0049d41f      StringInfo::StringInfo(&var_90);
0049d433      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049d443      class PStringBase<unsigned short>* eax_14 = StringInfo::GetString(&var_90, &__return, 0);
0049d452      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneLabel(this), eax_14);
0049d45b      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_7 = &__return->m_data[-0xa];
0049d45b      
0049d46a      if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
0049d472          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_7) + -0x14)(1);
0049d472      
0049d479      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = this->vtable->GetCostToRaise(ebp);
0049d483      PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_9;
0049d483      
0049d48c      if (PStringBase<unsigned short>::s_NullBuffer_9 > 0)
0049d48c      {
0049d4b5          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049d4c0          int32_t var_c4_13 = 0;
0049d4c8          StringInfo::AddVariable_Int(&var_90, 0, PStringBase<unsigned short>::s_NullBuffer_9);
0049d48c      }
0049d48c      else
0049d498          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049d498      
0049d4d8      class PStringBase<unsigned short>* eax_18 = StringInfo::GetString(&var_90, &__return, 0);
0049d4e7      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneValue(this), eax_18);
0049d4f0      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_10 = &__return->m_data[-0xa];
0049d4f0      
0049d4ff      if ((InterlockedDecrement(((char*)edi_10 + 4)) == 0 && edi_10 != 0))
0049d507          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_10) + -0x14)(1);
0049d507      
0049d518      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049d528      class PStringBase<unsigned short>* eax_21 = StringInfo::GetString(&var_90, &__return, 0);
0049d537      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoLabel(this), eax_21);
0049d540      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_12 = &__return->m_data[-0xa];
0049d540      
0049d54f      if ((InterlockedDecrement(((char*)edi_12 + 4)) == 0 && edi_12 != 0))
0049d557          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_12) + -0x14)(1);
0049d557      
0049d565      int32_t var_a4 = 0;
0049d569      int32_t var_a0 = 0;
0049d56d      CBaseQualities::InqInt64(&ebp->vtable, 2, &var_a4);
0049d582      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049d595      int32_t var_c4_19 = var_a0;
0049d59c      StringInfo::AddVariable_Int(&var_90, 0, var_a4);
0049d5ac      class PStringBase<unsigned short>* eax_26 = StringInfo::GetString(&var_90, &__return, 0);
0049d5bb      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoValue(this), eax_26);
0049d5c4      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_14 = &__return->m_data[-0xa];
0049d5c4      
0049d5d3      if ((InterlockedDecrement(((char*)edi_14 + 4)) == 0 && edi_14 != 0))
0049d5db          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_14) + -0x14)(1);
0049d5db      
0049d5dd      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_5;
0049d5f7      int32_t var_c4_22;
0049d5f7      class UIElement_Button* eax_30;
0049d5f7      
0049d5f7      if (((PStringBase<unsigned short>::s_NullBuffer_10 <= 0 || var_a0 < 0) || (var_a0 <= 0 && var_a4 < PStringBase<unsigned short>::s_NullBuffer_10)))
0049d5f7      {
0049d606          eax_30 = gmStatManagementUI::GetFooterButton(this);
0049d60b          var_c4_22 = 0xd;
0049d5f7      }
0049d5f7      else
0049d5f7      {
0049d5fb          eax_30 = gmStatManagementUI::GetFooterButton(this);
0049d600          var_c4_22 = 1;
0049d5f7      }
0049d5f7      
0049d60d      eax_30->vtable->SetState(var_c4_22);
0049d61c      int32_t eax_32 = this->vtable->GetCostToRaise10(ebp);
0049d638      int32_t var_c4_24;
0049d638      class UIElement_Button* eax_33;
0049d638      
0049d638      if (((eax_32 <= 0 || var_a0 < 0) || (var_a0 <= 0 && var_a4 < eax_32)))
0049d638      {
0049d647          eax_33 = gmStatManagementUI::GetFooter10Button(this);
0049d64c          var_c4_24 = 0xd;
0049d638      }
0049d638      else
0049d638      {
0049d63c          eax_33 = gmStatManagementUI::GetFooter10Button(this);
0049d641          var_c4_24 = 1;
0049d638      }
0049d638      
0049d64e      eax_33->vtable->SetState(var_c4_24);
0049d65c      StringInfo::~StringInfo(&var_90);
0049d665      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0049d665      
0049d674      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049d67c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049d67c      
0049d682      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &PStringBase<unsigned short>::s_NullBuffer_7->m_data[-0xa];
0049d682      
0049d691      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0049d699          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0049d699      
0049d69e      int32_t eax_37;
0049d69e      eax_37 = 1;
0049d6a7      return 1;
0049d280  }

0049d6aa                                90 90 90 90 90 90                                                            ......

0049d6b0  uint8_t __thiscall gmAttributeUI::DisplaySelectionFooter_Vital(class gmAttributeUI* this, class CACQualities const* arg2)

0049d6b0  {
0049d6b6      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0049d6c5      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_1;
0049d6cf      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0049d6d7      this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetLabel(&PStringBase<unsigned short>::s_NullBuffer_9);
0049d6ea      class InfoRegion** m_data_1 = this->m_rgTokens.m_data;
0049d6f0      int32_t m_SelectedIndex_1 = this->m_SelectedIndex;
0049d6f8      int32_t var_a4 = 0;
0049d715      CACQualities::InqAttribute2nd(arg2, m_data_1[m_SelectedIndex_1]->vtable->GetStat(&var_a4, 1));
0049d71a      int32_t m_SelectedIndex = this->m_SelectedIndex;
0049d720      class InfoRegion** m_data = this->m_rgTokens.m_data;
0049d726      int32_t var_ac = 0;
0049d73b      CACQualities::InqAttribute2nd(arg2, m_data[m_SelectedIndex]->vtable->GetStat(&var_ac, 0));
0049d740      class InfoRegion** m_data_2 = this->m_rgTokens.m_data;
0049d746      int32_t m_SelectedIndex_2 = this->m_SelectedIndex;
0049d74c      int32_t var_94 = 0;
0049d762      CACQualities::InqAttribute2nd(arg2, (m_data_2[m_SelectedIndex_2]->vtable->GetStat(&var_94, 0) + 1));
0049d767      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0049d76c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer_2;
0049d774      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0049d782      int32_t var_cc_3 = var_ac;
0049d783      int32_t var_d0_3 = var_94;
0049d784      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_9;
0049d78f      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_8, u"%s: %d/%d");
0049d7a7      UIElement_Text::SetTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_8, 0, 0);
0049d7be      int32_t eax_11 = this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetVitaeModifier(arg2);
0049d7c5      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6;
0049d7c5      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) PStringBase<unsigned short>::s_NullBuffer_7;
0049d7c5      
0049d7c5      if (eax_11 < 0)
0049d7c5      {
0049d7c7          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
0049d7cc          PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_3;
0049d7d4          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0049d7d6          int32_t var_cc_6 = eax_11;
0049d7e1          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_6, u" (%d)");
0049d7fb          UIElement_Text::AppendTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_6, 0, 3);
0049d804          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) PStringBase<unsigned short>::s_NullBuffer_12 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0049d807          PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_12;
0049d807          
0049d817          if (InterlockedDecrement(((char*)PStringBase<unsigned short>::s_NullBuffer_12 + 4)) == 0)
0049d817          {
0049d819              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) PStringBase<unsigned short>::s_NullBuffer_14 = PStringBase<unsigned short>::s_NullBuffer_7;
0049d819              
0049d81f              if (PStringBase<unsigned short>::s_NullBuffer_14 != 0)
0049d825                  *(uint32_t*)*(int32_t*)((char*)ADJ(PStringBase<unsigned short>::s_NullBuffer_14) + -0x14)(1);
0049d817          }
0049d7c5      }
0049d7c5      
0049d82b      int32_t ecx_14 = var_a4;
0049d82f      int32_t eax_18 = (var_ac - eax_11);
0049d831      var_ac = eax_18;
0049d837      void* __return = (eax_18 - ecx_14);
0049d837      
0049d83b      if (eax_18 != ecx_14)
0049d83b      {
0049d841          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
0049d846          PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_4;
0049d84e          int32_t ebx_1 = 0;
0049d850          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
0049d852          int32_t eax_21 = var_a4;
0049d856          int32_t ecx_15 = var_ac;
0049d856          
0049d85c          if (eax_21 < ecx_15)
0049d85c          {
0049d867              ebx_1 = 1;
0049d86c              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_7, &data_7a7844);
0049d85c          }
0049d85c          else if (eax_21 > ecx_15)
0049d875              ebx_1 = 2;
0049d875          
0049d87a          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
0049d87f          PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_5;
0049d887          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
0049d891          void* __return_1 = __return;
0049d892          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_7;
0049d89d          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_6, u" (%s%d)");
0049d8b6          UIElement_Text::AppendTextWithFont(gmStatManagementUI::GetFooterTitleLabel(this), &PStringBase<unsigned short>::s_NullBuffer_6, 0, ebx_1);
0049d8c5          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_2 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0049d8c5          
0049d8d4          if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0049d8dc              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0049d8dc          
0049d8e2          void* __offset(PSRefBufferCharData<unsigned short>, -0x28) edi_4 = ((char*)PStringBase<unsigned short>::s_NullBuffer_7 - 0x14);
0049d8e2          
0049d8f1          if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
0049d8f9              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x28)(1);
0049d83b      }
0049d83b      
0049d907      void var_90;
0049d907      StringInfo::StringInfo(&var_90);
0049d91b      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049d92b      class PStringBase<unsigned short>* eax_28 = StringInfo::GetString(&var_90, &__return, 0);
0049d93a      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneLabel(this), eax_28);
0049d943      int32_t* edi_6 = ((char*)__return - 0x14);
0049d943      
0049d952      if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
0049d95a          **(uint32_t**)edi_6(1);
0049d95a      
0049d961      void* PStringBase<unsigned short>::s_NullBuffer_13 = this->vtable->GetCostToRaise(arg2);
0049d96b      PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_13;
0049d96b      
0049d974      if (PStringBase<unsigned short>::s_NullBuffer_13 > 0)
0049d974      {
0049d992          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049d99d          int32_t var_cc_16 = 0;
0049d9a5          StringInfo::AddVariable_Int(&var_90, 0, PStringBase<unsigned short>::s_NullBuffer_13);
0049d974      }
0049d974      else
0049d980          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049d980      
0049d9b5      class PStringBase<unsigned short>* eax_32 = StringInfo::GetString(&var_90, &__return, 0);
0049d9c4      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineOneValue(this), eax_32);
0049d9cd      void* edi_9 = ((char*)__return - 0x14);
0049d9cd      
0049d9dc      if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
0049d9e4          **(uint32_t**)edi_9(1);
0049d9e4      
0049d9f5      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049da05      class PStringBase<unsigned short>* eax_35 = StringInfo::GetString(&var_90, &__return, 0);
0049da14      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoLabel(this), eax_35);
0049da1d      void* edi_11 = ((char*)__return - 0x14);
0049da1d      
0049da2c      if ((InterlockedDecrement(((char*)edi_11 + 4)) == 0 && edi_11 != 0))
0049da34          **(uint32_t**)edi_11(1);
0049da34      
0049da42      int32_t var_9c = 0;
0049da46      int32_t var_98 = 0;
0049da4a      CBaseQualities::InqInt64(&arg2->vtable, 2, &var_9c);
0049da5f      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
0049da72      int32_t var_cc_22 = var_98;
0049da79      StringInfo::AddVariable_Int(&var_90, 0, var_9c);
0049da89      class PStringBase<unsigned short>* eax_40 = StringInfo::GetString(&var_90, &__return, 0);
0049da98      UIElement_Text::SetText(gmStatManagementUI::GetFooterLineTwoValue(this), eax_40);
0049daa1      void* edi_13 = ((char*)__return - 0x14);
0049daa1      
0049dab0      if ((InterlockedDecrement(((char*)edi_13 + 4)) == 0 && edi_13 != 0))
0049dab8          **(uint32_t**)edi_13(1);
0049dab8      
0049daba      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) PStringBase<unsigned short>::s_NullBuffer_15 = PStringBase<unsigned short>::s_NullBuffer_7;
0049dad4      int32_t var_cc_25;
0049dad4      class UIElement_Button* eax_45;
0049dad4      
0049dad4      if (((PStringBase<unsigned short>::s_NullBuffer_15 <= 0 || var_98 < 0) || (var_98 <= 0 && var_9c < PStringBase<unsigned short>::s_NullBuffer_15)))
0049dad4      {
0049daf6          gmStatManagementUI::GetFooterButton(this)->vtable->SetState(0xd);
0049db09          eax_45 = gmStatManagementUI::GetFooter10Button(this);
0049db0e          var_cc_25 = 0xd;
0049dad4      }
0049dad4      else
0049dad4      {
0049dad8          gmStatManagementUI::GetFooterButton(this)->vtable->SetState(1);
0049daeb          eax_45 = gmStatManagementUI::GetFooter10Button(this);
0049daf0          var_cc_25 = 1;
0049dad4      }
0049dad4      
0049db10      eax_45->vtable->SetState(var_cc_25);
0049db1e      StringInfo::~StringInfo(&var_90);
0049db27      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_8->m_data[-0xa];
0049db27      
0049db36      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0049db3e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0049db3e      
0049db44      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &PStringBase<unsigned short>::s_NullBuffer_9->m_data[-0xa];
0049db44      
0049db53      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0049db5b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0049db5b      
0049db60      int32_t eax_50;
0049db60      eax_50 = 1;
0049db69      return 1;
0049d6b0  }

0049db6c                                      90 90 90 90                                                              ....

0049db70  void __fastcall gmAttributeUI::PostInit(class gmAttributeUI* this)

0049db70  {
0049db77      gmStatManagementUI::PostInit(this);
0049db77      
0049db92      if ((this->m_rgTokens.m_num == 0 && this->m_pListBox != 0))
0049db92      {
0049dba4          class IDClass<_tagDataID,32,0> id;
0049dba4          DBObj::GetDIDByEnum(&id, 1, 0x10000002);
0049dbab          void* eax_1 = operator new(0x18);
0049dbb5          uint32_t __return;
0049dbb5          
0049dbb5          if (eax_1 == 0)
0049dbdb              __return = 0;
0049dbb5          else
0049dbd5              __return = AttributeInfoRegion::AttributeInfoRegion(eax_1, this->m_pListBox, this->m_rgTokens.m_num, 1, id, 1);
0049dbd5          
0049dbed          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049dc07          id = DBObj::GetDIDByEnum(&__return, 2, 0x10000002)->id;
0049dc0b          void* eax_4 = operator new(0x18);
0049dc0b          
0049dc15          if (eax_4 == 0)
0049dc3b              __return = 0;
0049dc15          else
0049dc35              __return = AttributeInfoRegion::AttributeInfoRegion(eax_4, this->m_pListBox, this->m_rgTokens.m_num, 2, id, 1);
0049dc35          
0049dc46          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049dc60          id = DBObj::GetDIDByEnum(&__return, 4, 0x10000002)->id;
0049dc64          void* eax_7 = operator new(0x18);
0049dc64          
0049dc6e          if (eax_7 == 0)
0049dc94              __return = 0;
0049dc6e          else
0049dc8e              __return = AttributeInfoRegion::AttributeInfoRegion(eax_7, this->m_pListBox, this->m_rgTokens.m_num, 4, id, 1);
0049dc8e          
0049dc9f          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049dcb9          id = DBObj::GetDIDByEnum(&__return, 3, 0x10000002)->id;
0049dcbd          void* eax_10 = operator new(0x18);
0049dcbd          
0049dcc7          if (eax_10 == 0)
0049dced              __return = 0;
0049dcc7          else
0049dce7              __return = AttributeInfoRegion::AttributeInfoRegion(eax_10, this->m_pListBox, this->m_rgTokens.m_num, 3, id, 1);
0049dce7          
0049dcf8          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049dd12          id = DBObj::GetDIDByEnum(&__return, 5, 0x10000002)->id;
0049dd16          void* eax_13 = operator new(0x18);
0049dd16          
0049dd20          if (eax_13 == 0)
0049dd46              __return = 0;
0049dd20          else
0049dd40              __return = AttributeInfoRegion::AttributeInfoRegion(eax_13, this->m_pListBox, this->m_rgTokens.m_num, 5, id, 1);
0049dd40          
0049dd51          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049dd6b          id = DBObj::GetDIDByEnum(&__return, 6, 0x10000002)->id;
0049dd6f          void* eax_16 = operator new(0x18);
0049dd6f          
0049dd79          if (eax_16 == 0)
0049dd9f              __return = 0;
0049dd79          else
0049dd99              __return = AttributeInfoRegion::AttributeInfoRegion(eax_16, this->m_pListBox, this->m_rgTokens.m_num, 6, id, 1);
0049dd99          
0049ddaa          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049ddc4          id = DBObj::GetDIDByEnum(&__return, 2, 0x10000003)->id;
0049ddc8          void* eax_19 = operator new(0x20);
0049ddc8          
0049ddd2          if (eax_19 == 0)
0049ddf9              __return = 0;
0049ddd2          else
0049ddf3              __return = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_19, this->m_pListBox, this->m_rgTokens.m_num, 2, 0, id, 1);
0049ddf3          
0049de04          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049de1e          id = DBObj::GetDIDByEnum(&__return, 4, 0x10000003)->id;
0049de22          void* eax_22 = operator new(0x20);
0049de22          
0049de2c          if (eax_22 == 0)
0049de53              __return = 0;
0049de2c          else
0049de4d              __return = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_22, this->m_pListBox, this->m_rgTokens.m_num, 4, 0, id, 1);
0049de4d          
0049de5e          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049de78          id = DBObj::GetDIDByEnum(&__return, 6, 0x10000003)->id;
0049de7c          void* eax_25 = operator new(0x20);
0049de7c          
0049de86          if (eax_25 != 0)
0049de86          {
0049deae              __return = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_25, this->m_pListBox, this->m_rgTokens.m_num, 6, 0, id, 1);
0049deb2              SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens, &__return);
0049debd              return;
0049de86          }
0049de86          
0049dec5          __return = 0;
0049dec9          SmartArray<unsigned long,1>::AddToEnd(&this->m_rgTokens.m_data, &__return);
0049db92      }
0049db70  }

0049ded5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0049dee0  uint8_t __fastcall gmAttributeUI::UpdateSelection(class gmAttributeUI* this)

0049dee0  {
0049dee5      int32_t esi;
0049dee5      int32_t var_20 = esi;
0049deee      int32_t edi;
0049deee      int32_t var_24 = edi;
0049def1      int32_t i = 0;
0049def1      
0049def5      if (this->m_rgTokens.m_num > 0)
0049def5      {
0049df25          do
0049df25          {
0049df11              int32_t var_28_1;
0049df11              
0049df11              if (i != this->m_SelectedIndex)
0049df17                  var_28_1 = 1;
0049df11              else
0049df13                  var_28_1 = 6;
0049df13              
0049df06              this->m_rgTokens.m_data[i]->vtable->SetState(var_28_1);
0049df22              i += 1;
0049df25          } while (i < this->m_rgTokens.m_num);
0049def5      }
0049def5      
0049df36      int32_t* var_14 = nullptr;
0049df41      class TResult __return;
0049df41      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, &PlayerDesc_ClassType, &var_14);
0049df46      int32_t* edi_1 = var_14;
0049df58      int32_t var_8 = 0;
0049df5c      int32_t var_4 = 0;
0049df5c      
0049df60      if (edi_1 != 0)
0049df66          *(uint32_t*)(*(uint32_t*)edi_1 + 0x10)(edi_1, 0);
0049df66      
0049df79      void var_c;
0049df79      int32_t ebx = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0049df79      
0049df7b      if (edi_1 != 0)
0049df81          *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)(edi_1, 0);
0049df81      
0049df84      class CACQualities* __return_1 = __return;
0049df84      
0049df8a      if (__return_1 != 0)
0049df8a      {
0049df8e          if (ebx >= 0)
0049df8e          {
0049dfaa              if (this->m_SelectedIndex == 0xffffffff)
0049dfaa              {
0049dfac                  this->vtable->SetState(0x10000011, edi_1, 0);
0049dfbc                  gmAttributeUI::DisplayDefaultFooter(this, __return_1);
0049dfc1                  __return_1->vtable->Release();
0049dfc8                  int32_t eax_7;
0049dfc8                  eax_7 = 1;
0049dfd1                  return 1;
0049dfaa              }
0049dfaa              
0049dfd2              this->vtable->SetState(0x10000012);
0049dfd2              
0049dff9              if (this->m_rgTokens.m_data[this->m_SelectedIndex]->vtable->GetType(edi_1, 0) != 8)
0049dff9              {
0049e011                  gmAttributeUI::DisplaySelectionFooter_Vital(this, __return_1);
0049e016                  __return_1->vtable->Release();
0049e020                  int32_t eax_12;
0049e020                  eax_12 = 1;
0049e026                  return 1;
0049dff9              }
0049dff9              
0049dffb              gmAttributeUI::DisplaySelectionFooter_Attribute(this, __return_1);
0049e000              __return_1->vtable->Release();
0049e007              int32_t eax_11;
0049e007              eax_11 = 1;
0049e010              return 1;
0049df8e          }
0049df8e          
0049df90          __return_1->vtable->Release(edi_1, 0);
0049df8a      }
0049df8a      
0049df97      class TResult eax_5;
0049df97      eax_5.m_val = 0;
0049dfa0      return 0;
0049dee0  }

0049def9                                                                             8d a4 24 00 00 00 00                           ..$....
0049e027                       90 90 90 90 90 90 90 90 90                                                         .........

0049e030  class UIElement* __thiscall gmGameplayOptionsUI::DynamicCast(class gmGameplayOptionsUI* this, uint32_t arg2) __pure

0049e030  {
0049e03c      if (arg2 == 0x10000029)
0049e049          return this;
0049e049      
0049e043      int32_t edx_1;
0049e043      edx_1 = arg2 != 3;
0049e047      return (this & (edx_1 - 1));
0049e030  }

0049e04c                                      90 90 90 90                                                              ....

0049e050  uint32_t gmGameplayOptionsUI::GetUIElementType(class gmGameplayOptionsUI const* this @ ecx) __pure

0049e050  {
0049e055      return 0x10000029;
0049e050  }

0049e056                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0049e060  class UIElement* gmGameplayOptionsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0049e060  {
0049e066      void* result = operator new(0x5fc);
0049e066      
0049e072      if (result == 0)
0049e0a6          return 0;
0049e0a6      
0049e080      UIElement_Field::UIElement_Field(result, arg1, arg2);
0049e085      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
0049e08f      *(uint32_t*)result = 0x7a7ff0;
0049e095      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
0049e0a2      return result;
0049e060  }

0049e0a7                       90 90 90 90 90 90 90 90 90                                                         .........

0049e0b0  void* __thiscall gmGameplayOptionsUI::`scalar deleting destructor'(class gmGameplayOptionsUI* this, uint32_t arg2)

0049e0b0  {
0049e0b9      this->vtable = 0x7a7ff0;
0049e0b3      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049e0b3      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049e0cb      NoticeHandler::~NoticeHandler(&this->vtable);
0049e0d2      UIElement_Field::~UIElement_Field(this);
0049e0d2      
0049e0dc      if ((arg2 & 1) != 0)
0049e0df          operator delete(this);
0049e0df      
0049e0ea      return this;
0049e0b0  }

0049e0ed                                         90 90 90                                                               ...

0049e0f0  void gmGameplayOptionsUI::Register()

0049e0f0  {
0049e0fa      UIElement::RegisterElementClass(0x10000029, gmGameplayOptionsUI::Create);
0049e0f0  }

0049e103           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0049e110  enum UIElementMessageListenResult __fastcall gmGameplayOptionsUI::ListenToElementMessage(class gmGameplayOptionsUI* this, struct UIElementMessageInfo const* arg2)

0049e110  {
0049e110      class gmGameplayOptionsUI* lpFile = this;
0049e114      struct UIElementMessageInfo* edi = arg2;
0049e114      
0049e11e      if (edi->idMessage == 1)
0049e11e      {
0049e124          uint32_t idElement = edi->idElement;
0049e124          
0049e12b          if (idElement > 0x10000207)
0049e12b          {
0049e291              if (idElement == 0x100005cc)
0049e2ab                  UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance, 0xc, 0);
0049e291              else if (idElement == 0x10000617)
0049e2ab                  UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance, 1, 0x10000027);
0049e12b          }
0049e12b          else if (idElement == 0x10000207)
0049e131          {
0049e1f0              PStringBase<char>::PStringBase<char>(&lpFile, "http://support.turbine.com/ics/s…");
0049e207              HINSTANCE eax_9 = ShellExecuteA(nullptr, "open", lpFile, nullptr, nullptr, 1);
0049e207              
0049e212              if (eax_9 <= 0x20)
0049e212              {
0049e214                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0049e219                  arg2 = PStringBase<char>::s_NullBuffer_1;
0049e221                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0049e22b                  class gmGameplayOptionsUI* lpFile_2 = lpFile;
0049e22c                  HINSTANCE var_18_2 = eax_9;
0049e237                  PStringBase<char>::sprintf(&arg2, "An error occurred while trying t…");
0049e24d                  MessageBoxA(nullptr, arg2, "Asheron's Call Error", MB_OK);
0049e257                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0049e212              }
0049e212              
0049e260              void* __offset(gmGameplayOptionsUI, -0x14) esi_4 = ((char*)lpFile - 0x14);
0049e260              
0049e273              if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0049e27b                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0049e131          }
0049e131          else
0049e131          {
0049e13c              if (idElement == 0x10000203)
0049e13c              {
0049e1d0                  CM_UI::SendNotice_EndCharacterSession(1);
0049e1e4                  return UIElement::ListenToElementMessage(this, edi);
0049e13c              }
0049e13c              
0049e145              if (idElement == 0x10000206)
0049e145              {
0049e154                  PStringBase<char>::PStringBase<char>(&lpFile, "http://support.turbine.com/ics/s…");
0049e16b                  HINSTANCE eax_5 = ShellExecuteA(nullptr, "open", lpFile, nullptr, nullptr, 1);
0049e16b                  
0049e176                  if (eax_5 <= 0x20)
0049e176                  {
0049e17c                      PStringBase<char>::PStringBase<char>(&arg2);
0049e185                      class gmGameplayOptionsUI* lpFile_1 = lpFile;
0049e186                      HINSTANCE var_18_1 = eax_5;
0049e191                      PStringBase<char>::sprintf(&arg2, "An error occurred while trying t…");
0049e1a7                      MessageBoxA(nullptr, arg2, "Asheron's Call Error", MB_OK);
0049e1b1                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0049e176                  }
0049e176                  
0049e1ba                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&lpFile);
0049e145              }
0049e131          }
0049e11e      }
0049e11e      
0049e2bc      return UIElement::ListenToElementMessage(this, edi);
0049e110  }

0049e2bf                                                                                               90                                 .

0049e2c0  class UIElement* __thiscall gmConfigUI::DynamicCast(class gmConfigUI* this, uint32_t arg2) __pure

0049e2c0  {
0049e2cc      int32_t eax;
0049e2cc      eax = arg2 != 0x10000028;
0049e2d2      return ((eax - 1) & this);
0049e2c0  }

0049e2d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0049e2e0  uint32_t gmConfigUI::GetUIElementType(class gmConfigUI const* this @ ecx) __pure

0049e2e0  {
0049e2e5      return 0x10000028;
0049e2e0  }

0049e2e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049e2f0  void __fastcall gmConfigUI::~gmConfigUI(class gmConfigUI* this)

0049e2f0  {
0049e2fa      this->vtable = 0x7a8788;
0049e300      this->vtable = &gmCharacterSettingsUI::`vftable';
0049e2f4      this->vtable = &gmConfigUI::`vftable';
0049e310      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0049e310      
0049e317      if (eax != 0)
0049e319          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0049e319      
0049e325      UIListener::UnRegisterForGlobalMessage(this, 0xc);
0049e2f4      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049e332      NoticeHandler::~NoticeHandler(&this->vtable);
0049e33b      /* tailcall */
0049e33b      return PlayerOptionPage::~PlayerOptionPage(this);
0049e2f0  }


0049e340  class UIElement* gmConfigUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0049e340  {
0049e346      void* result = operator new(0x620);
0049e346      
0049e352      if (result == 0)
0049e390          return 0;
0049e390      
0049e360      PlayerOptionPage::PlayerOptionPage(result, arg1, arg2);
0049e365      *(uint32_t*)((char*)result + 0x604) = 0x7bf328;
0049e36f      *(uint32_t*)result = 0x7a8788;
0049e375      *(uint32_t*)((char*)result + 0x5f0) = 0x7c4344;
0049e37f      *(uint32_t*)((char*)result + 0x604) = 0x7a84e0;
0049e38c      return result;
0049e340  }

0049e391                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0049e3a0  enum UIElementMessageListenResult __thiscall gmCharacterSettingsUI::ListenToElementMessage(class gmCharacterSettingsUI* this, struct UIElementMessageInfo const* arg2)

0049e3a0  {
0049e3ac      if (arg2->idMessage == 1)
0049e3ac      {
0049e3ae          uint32_t idElement = arg2->idElement;
0049e3ae          
0049e3b5          if (idElement == 0x100001fc)
0049e3e9              this->vtable->SaveCurrentValues();
0049e3b5          else
0049e3b5          {
0049e3b8              if (idElement == 0x100001fd)
0049e3b8              {
0049e3d2                  this->vtable->RestoreSavedValues();
0049e3e6                  return UIElement::ListenToElementMessage(this, arg2);
0049e3b8              }
0049e3b8              
0049e3bb              if (idElement == 0x100001fe)
0049e3bd                  this->vtable->RestoreDefaultValues();
0049e3b5          }
0049e3ac      }
0049e3ac      
0049e3fd      return UIElement::ListenToElementMessage(this, arg2);
0049e3a0  }


0049e400  void __fastcall gmConfigUI::InitOptions(class gmConfigUI* this)

0049e400  {
0049e40a      PlayerOptionPage::AddHeader(this, 0);
0049e418      PlayerOptionPage::AddMenuOption(this, (&Sound_SoundFeatures), 1)->vtable->SetDefaultValue(0);
0049e435      PlayerOptionPage::AddToggleWithSliderOption(this, (&Sound_SoundDisabled), (&Sound_SoundVolume))->vtable->SetDefaultValue(1, 0x3f800000);
0049e457      PlayerOptionPage::AddToggleWithSliderOption(this, (&Sound_AmbientSoundDisabled), (&Sound_AmbientSoundVolume))->vtable->SetDefaultValue(1, 0x3f800000);
0049e479      PlayerOptionPage::AddToggleWithSliderOption(this, (&Sound_InterfaceSoundDisabled), (&Sound_InterfaceSoundVolume))->vtable->SetDefaultValue(1, 0x3f800000);
0049e496      PlayerOptionPage::AddToggleOption(this, (&Sound_PlaySoundOnlyWhenActive))->vtable->SetDefaultValue(1);
0049e4a9      PlayerOptionPage::AddSeperator(this);
0049e4b6      PlayerOptionPage::AddHeader(this, 0);
0049e4c4      class UIOption_Slider* eax_5 = PlayerOptionPage::AddSliderOption(this, &Camera_Stiffness, 1);
0049e4da      this->m_pStiffness = eax_5;
0049e4e0      PlayerOptionPage::SetSliderLabel(this, eax_5, 0, 0);
0049e4e5      this->m_pStiffness->vtable->SetDefaultValue(0x3ee66666);
0049e501      class UIOption_Slider* eax_7 = PlayerOptionPage::AddSliderOption(this, &Camera_AdjustmentSpeed, 1);
0049e514      this->m_pAdjustmentSpeed = eax_7;
0049e51d      PlayerOptionPage::SetSliderLabel(this, eax_7, 0, 0);
0049e522      this->m_pAdjustmentSpeed->vtable->SetDefaultValue(0x42200000);
0049e53e      class UIOption_Slider* eax_9 = PlayerOptionPage::AddSliderOption(this, &Render_FieldOfView, 1);
0049e556      PlayerOptionPage::SetSliderLabel(this, eax_9, 0, 0);
0049e55b      eax_9->vtable->SetDefaultValue(0x42b40000);
0049e571      class UIOption_Checkbox* eax_11 = PlayerOptionPage::AddToggleOption(this, &Camera_AlignToSlope);
0049e576      this->m_pSlope = eax_11;
0049e57c      eax_11->vtable->SetDefaultValue(1);
0049e58a      PlayerOptionPage::AddSeperator(this);
0049e597      PlayerOptionPage::AddHeader(this, 0);
0049e5a5      class UIOption_Menu* eax_12 = PlayerOptionPage::AddMenuOption(this, &Display_Resolution, 0);
0049e5ac      eax_12->vtable->SetDefaultValue(0x3200258);
0049e5bf      UIOption::SetConfirmChange(eax_12, 1);
0049e5cb      PlayerOptionPage::AddToggleOption(this, (&Display_FullScreen))->vtable->SetDefaultValue(1);
0049e5e3      PlayerOptionPage::AddToggleOption(this, (&Display_SyncToRefresh))->vtable->SetDefaultValue(0);
0049e5fd      class UIOption_Slider* eax_15 = PlayerOptionPage::AddSliderOption(this, &Render_ScreenBrightness, 1);
0049e614      PlayerOptionPage::SetSliderLabel(this, eax_15, 0, 0);
0049e619      eax_15->vtable->SetDefaultValue(0);
0049e62c      PlayerOptionPage::AddToggleOption(this, (&Render_AutomaticDegrades))->vtable->SetDefaultValue(0);
0049e646      class UIOption_Slider* eax_17 = PlayerOptionPage::AddSliderOption(this, &Render_GraphicsPerformance, 1);
0049e65d      PlayerOptionPage::SetSliderLabel(this, eax_17, 0, 0);
0049e662      eax_17->vtable->SetDefaultValue(0);
0049e677      class UIOption_Slider* eax_18 = PlayerOptionPage::AddSliderOption(this, &Render_DegradeDistance, 1);
0049e68e      PlayerOptionPage::SetSliderLabel(this, eax_18, 0, 0);
0049e693      eax_18->vtable->SetDefaultValue(0x42480000);
0049e6a4      PlayerOptionPage::AddSeperator(this);
0049e6b1      PlayerOptionPage::AddHeader(this, 0);
0049e6bf      PlayerOptionPage::AddMenuOption(this, (&Render_LandscapeTextureDetail), 1)->vtable->SetDefaultValue(2);
0049e6d9      PlayerOptionPage::AddMenuOption(this, (&Render_EnvironmentTextureDetail), 1)->vtable->SetDefaultValue(1);
0049e6f3      PlayerOptionPage::AddMenuOption(this, (&Render_TextureFiltering), 1)->vtable->SetDefaultValue(1);
0049e70d      PlayerOptionPage::AddMenuOption(this, (&Render_LandscapeDrawDistance), 1)->vtable->SetDefaultValue(8);
0049e725      PlayerOptionPage::AddToggleOption(this, (&Render_BuildingDetailTextures))->vtable->SetDefaultValue(1);
0049e73d      PlayerOptionPage::AddToggleOption(this, (&Render_MultiPassAlpha))->vtable->SetDefaultValue(0);
0049e750      PlayerOptionPage::AddSeperator(this);
0049e75d      PlayerOptionPage::AddHeader(this, 0);
0049e76b      class UIOption_Slider* eax_25 = PlayerOptionPage::AddSliderOption(this, &Input_MouseLookSensitivity, 0);
0049e770      this->m_pSensitivity = eax_25;
0049e776      eax_25->vtable->SetDefaultValue(0x3f0ccccd);
0049e78c      class UIOption_Checkbox* eax_26 = PlayerOptionPage::AddToggleOption(this, &Input_InvertMouseLookYAxis);
0049e791      this->m_pInvert = eax_26;
0049e797      eax_26->vtable->SetDefaultValue(0);
0049e7aa      class UIOption_Checkbox* eax_27 = PlayerOptionPage::AddToggleOption(this, &Input_UseMouseTurning);
0049e7af      this->m_pMouseTurn = eax_27;
0049e7b5      eax_27->vtable->SetDefaultValue(0);
0049e7c3      PlayerOptionPage::AddSeperator(this);
0049e7d0      PlayerOptionPage::AddHeader(this, 0);
0049e7de      PlayerOptionPage::AddMenuOption(this, (&UI_ChatFontFace), 1)->vtable->SetDefaultValue(2);
0049e7f8      PlayerOptionPage::AddMenuOption(this, (&UI_ChatFontSize), 1)->vtable->SetDefaultValue(1);
0049e80d      /* tailcall */
0049e80d      return PlayerOptionPage::AddSeperator(this);
0049e400  }

0049e812                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0049e820  void* __thiscall gmConfigUI::`scalar deleting destructor'(class gmConfigUI* this, uint32_t arg2)

0049e820  {
0049e823      gmConfigUI::~gmConfigUI(this);
0049e823      
0049e82d      if ((arg2 & 1) != 0)
0049e830          operator delete(this);
0049e830      
0049e83b      return this;
0049e820  }

0049e83e                                                                                            90 90                                ..

0049e840  void __fastcall gmConfigUI::PostInit(class gmConfigUI* this)

0049e840  {
0049e844      UIElement::PostInit(this);
0049e852      __builtin_memset(&this->m_pStiffness, 0, 0x18);
0049e876      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000200);
0049e876      
0049e87d      if (eax != 0)
0049e88b          this->m_pOptionBox = eax->vtable->DynamicCast(5);
0049e88b      
0049e891      this->vtable->InitOptions();
0049e89b      this->vtable->OnOptionChanged(0);
0049e8aa      GlobalEventHandler::GetGlobalEventHandler()->vtable->RegisterNoticeHandler(0x4dd276, &this->vtable);
0049e8c6      UIListener::RegisterForGlobalMessage(this, 0xc);
0049e840  }

0049e8ce                                            90 90                                                                ..

0049e8d0  void gmConfigUI::Register()

0049e8d0  {
0049e8da      UIElement::RegisterElementClass(0x10000028, gmConfigUI::Create);
0049e8d0  }

0049e8e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0049e8f0  void __fastcall gmConfigUI::SetMouseTurningDefaults(class gmConfigUI* this)

0049e8f0  {
0049e8f9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0049e8f9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0049e8fa      int32_t edi;
0049e8fa      int32_t var_18 = edi;
0049e8fb      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0049e907      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0049e90b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0049e911      class UIOption_Slider* m_pStiffness = this->m_pStiffness;
0049e919      double var_2c;
0049e919      int32_t eax_1;
0049e919      
0049e919      if (m_pStiffness != 0)
0049e919      {
0049e91b          long double st0_1 = UIOption_Slider::GetCurrentValue(m_pStiffness);
0049e920          float var_10 = ((float)st0_1);
0049e924          long double temp0_1 = ((long double)0.949999988f);
0049e924          (st0_1 - temp0_1);
0049e92a          eax_1 = ((((st0_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp0_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0049e92c          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0049e92c          
0049e92f          if (p_1)
0049e92f          {
0049e93c              UIOption_Slider::SetCurrentValue(this->m_pStiffness, 0.949999988f);
0049e945              int32_t var_20_1 = 0x3fee6666;
0049e94a              int32_t var_24_1 = 0x60000000;
0049e952              var_2c = ((double)((long double)var_10));
0049e95f              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "Camera Stiffness was changed fro…");
0049e964              AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0049e972              *(uint32_t*)((char*)var_2c)[4] = 7;
0049e974              var_2c = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data;
0049e97c              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), var_2c, 1, 0);
0049e92f          }
0049e919      }
0049e919      
0049e981      class UIOption_Slider* m_pAdjustmentSpeed = this->m_pAdjustmentSpeed;
0049e981      
0049e989      if (m_pAdjustmentSpeed != 0)
0049e989      {
0049e98b          long double st0_2 = UIOption_Slider::GetCurrentValue(m_pAdjustmentSpeed);
0049e990          float var_10_1 = ((float)st0_2);
0049e994          long double temp1_1 = ((long double)50f);
0049e994          (st0_2 - temp1_1);
0049e99a          eax_1 = ((((st0_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_2, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0049e99c          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0049e99c          
0049e99f          if (p_2)
0049e99f          {
0049e9ac              UIOption_Slider::SetCurrentValue(this->m_pAdjustmentSpeed, 50f);
0049e9b5              int32_t var_20_2 = 0x3fee6666;
0049e9ba              int32_t var_24_2 = 0x60000000;
0049e9c2              var_2c = ((double)((long double)var_10_1));
0049e9cf              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &gmConfigUI::`vftable'.RecvNotice_BookAddPageResponse);
0049e9d4              AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0049e9e2              *(uint32_t*)((char*)var_2c)[4] = 7;
0049e9e4              var_2c = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data;
0049e9ec              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), var_2c, 1, 0);
0049e99f          }
0049e989      }
0049e989      
0049e9f1      class UIOption_Slider* m_pSensitivity = this->m_pSensitivity;
0049e9f1      
0049e9f9      if (m_pSensitivity != 0)
0049e9f9      {
0049e9fb          long double st0_3 = UIOption_Slider::GetCurrentValue(m_pSensitivity);
0049ea00          float var_10_2 = ((float)st0_3);
0049ea04          long double temp2_1 = ((long double)0.699999988f);
0049ea04          (st0_3 - temp2_1);
0049ea0a          eax_1 = ((((st0_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_3, temp2_1))) ? 1 : 0) << 0xa) | ((((st0_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0049ea0c          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
0049ea0c          
0049ea0f          if (p_3)
0049ea0f          {
0049ea1c              UIOption_Slider::SetCurrentValue(this->m_pSensitivity, 0.699999988f);
0049ea25              int32_t var_20_3 = 0x3fee6666;
0049ea2a              int32_t var_24_3 = 0x60000000;
0049ea32              var_2c = ((double)((long double)var_10_2));
0049ea3f              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &gmConfigUI::`vftable'.RecvNotice_RefreshOptionsPanel);
0049ea44              AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0049ea52              *(uint32_t*)((char*)var_2c)[4] = 7;
0049ea54              var_2c = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data;
0049ea5c              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), var_2c, 1, 0);
0049ea0f          }
0049e9f9      }
0049e9f9      
0049ea61      class UIOption_Checkbox* m_pSlope = this->m_pSlope;
0049ea61      
0049ea69      if ((m_pSlope != 0 && m_pSlope->vtable->GetValue() == 1))
0049ea69      {
0049ea77          this->m_pSlope->vtable->SetCurrentValue(0);
0049ea91          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &gmConfigUI::`vftable'.RecvNotice_OpenTrade);
0049ea96          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0049eaa4          *(uint32_t*)((char*)var_2c)[4] = 7;
0049eaa6          var_2c = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data;
0049eaae          ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), var_2c, 1, 0);
0049ea69      }
0049ea69      
0049eab3      class UIOption_Checkbox* m_pInvert = this->m_pInvert;
0049eab3      
0049eabb      if ((m_pInvert != 0 && m_pInvert->vtable->GetValue() == 0))
0049eabb      {
0049eac9          this->m_pInvert->vtable->SetCurrentValue(1);
0049eae3          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &gmConfigUI::`vftable'.RecvNotice_SpellAdded);
0049eae8          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0049eaf6          *(uint32_t*)((char*)var_2c)[4] = 7;
0049eaf8          var_2c = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data;
0049eb00          ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), var_2c, 1, 0);
0049eabb      }
0049eabb      
0049eb05      class UIOption_Checkbox* m_pMouseTurn = this->m_pMouseTurn;
0049eb05      
0049eb0d      if ((m_pMouseTurn != 0 && m_pMouseTurn->vtable->GetValue() == 0))
0049eb0d      {
0049eb1b          this->m_pMouseTurn->vtable->SetCurrentValue(1);
0049eb35          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &gmConfigUI::`vftable'.RecvNotice_EndPendingInPlayer);
0049eb3a          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0049eb48          *(uint32_t*)((char*)var_2c)[4] = 7;
0049eb4a          var_2c = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data;
0049eb52          ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), var_2c, 1, 0);
0049eb0d      }
0049eb0d      
0049eb57      this->vtable->SaveCurrentValues();
0049eb57      
0049eb71      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
0049eb73          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
0049e8f0  }

0049eb81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0049eb90  void __thiscall gmConfigUI::ListenToGlobalMessage(class gmConfigUI* this, uint32_t arg2, int32_t arg3)

0049eb90  {
0049eb95      if (arg2 == 0xc)
0049eb97          gmConfigUI::SetMouseTurningDefaults(this);
0049eb90  }

0049eb9f                                                                                               90                                 .

0049eba0  void __stdcall gmConfigUI::RecvNotice_UserPreferenceChanged_Menu(class gmConfigUI* this @ ecx, class PStringBase<char> const* arg2, uint32_t arg3, uint32_t arg4)

0049eba0  {
0049ebb5      uint8_t eax = PStringBase<char>::operator!=(arg2, &Render_LandscapeTextureDetail);
0049ebbc      uint8_t eax_1;
0049ebbc      
0049ebbc      if (eax != 0)
0049ebc5          eax_1 = PStringBase<char>::operator!=(arg2, &Render_EnvironmentTextureDetail);
0049ebc5      
0049ebe6      if (((eax == 0 || eax_1 == 0) && (arg3 == 0 || arg4 == 0)))
0049ebe6      {
0049ebf0          void var_108;
0049ebf0          PropertyCollection::PropertyCollection(&var_108);
0049ebfe          int32_t* var_114 = nullptr;
0049ec02          int32_t* var_110_1 = nullptr;
0049ec06          BaseProperty::SetPropertyName(&var_114, 0x8e);
0049ec06          
0049ec0f          if (var_110_1 != 0)
0049ec0f          {
0049ec15              BaseProperty::CheckCopyOnWrite(&var_114);
0049ec22              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xac)(3);
0049ec0f          }
0049ec0f          
0049ec3f          uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
0049ec43          void var_104;
0049ec43          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0049ec51          BaseProperty::SetPropertyName(&var_114, 0xc3);
0049ec51          
0049ec5a          if (var_110_1 != 0)
0049ec5a          {
0049ec60              BaseProperty::CheckCopyOnWrite(&var_114);
0049ec6d              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xac)(1);
0049ec5a          }
0049ec5a          
0049ec8a          var_10c = BaseProperty::GetPropertyName(&var_114);
0049ec8e          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0049ec9a          void var_90;
0049ec9a          StringInfo::StringInfo(&var_90);
0049ecb9          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_Option_HighResChange"), 0x10000004);
0049ecc7          BaseProperty::SetPropertyName(&var_114, 0xc5);
0049ecc7          
0049ecd0          if (var_110_1 != 0)
0049ecd0          {
0049ecd6              BaseProperty::CheckCopyOnWrite(&var_114);
0049ece9              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xc4)(&var_90);
0049ecd0          }
0049ecd0          
0049ecf8          var_10c = BaseProperty::GetPropertyName(&var_114);
0049ed0a          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0049ed14          DialogFactory::MakeDialogInCurrentUI(&var_108);
0049ed23          StringInfo::~StringInfo(&var_90);
0049ed28          int32_t* eax_10 = var_114;
0049ed28          
0049ed2e          if (eax_10 != 0)
0049ed2e          {
0049ed38              int32_t edx_2 = (eax_10[1] - 1);
0049ed35              eax_10[1] = edx_2;
0049ed35              
0049ed3d              if (edx_2 == 0)
0049ed43                  **(uint32_t**)eax_10(1);
0049ed43              
0049ed45              var_114 = nullptr;
0049ed2e          }
0049ed2e          
0049ed4f          if (var_110_1 != 0)
0049ed4f          {
0049ed59              int32_t edx_4 = (var_110_1[1] - 1);
0049ed56              var_110_1[1] = edx_4;
0049ed56              
0049ed5e              if (edx_4 == 0)
0049ed64                  **(uint32_t**)var_110_1(1);
0049ed64              
0049ed66              int32_t var_110_2 = 0;
0049ed4f          }
0049ed4f          
0049ed6e          PropertyCollection::~PropertyCollection(&var_108);
0049ebe6      }
0049eba0  }

0049ed7d                                                                                         90 90 90                               ...

0049ed80  void* __thiscall ListIterator<DualHashData<UIOption_Slider *,UIOption_Slider *> *>::`scalar deleting destructor'(class ListIterator<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* this, uint32_t arg2)

0049ed80  {
0049ed88      this->vtable = 0x7a8d70;
0049ed88      
0049ed8e      if ((arg2 & 1) != 0)
0049ed91          operator delete(this);
0049ed91      
0049ed9c      return this;
0049ed80  }

0049ed9f                                                                                               90                                 .

0049eda0  class UIOption_CheckboxBitfield64* __thiscall gmChatOptionsUI::AddCheckboxBitfield64Option(class gmChatOptionsUI* this, uint32_t const* arg2, uint32_t arg3)

0049eda0  {
0049eda3      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
0049edaa      class UIOption_CheckboxBitfield64* result = nullptr;
0049edaa      
0049edae      if (m_pOptionBox != 0)
0049edae      {
0049edb7          class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, 8, nullptr);
0049edb7          
0049edbe          if (eax_1 != 0)
0049edbe          {
0049edcd              void* eax_2 = eax_1->vtable->DynamicCast(0x10000044);
0049edcd              
0049edd5              if (eax_2 == 0)
0049ee13                  return 0;
0049ee13              
0049edd7              result = ((char*)eax_2 - 0x20);
0049edd7              
0049eddc              if (result != 0)
0049eddc              {
0049edee                  UIOption_CheckboxBitfield64::SetGameplayOptionProperty(result, *(uint32_t*)arg2, Chat_PropType);
0049edfa                  UIOption::SetUserData(result, arg3);
0049ee06                  int32_t var_10_2;
0049ee06                  
0049ee06                  if ((arg3 - 2) <= 6)
0049ee08                      switch (arg3)
0049ee08                      {
0049ee29                          case 2:
0049ee29                          {
0049ee29                              int32_t __saved_edi_1 = 0;
0049ee2b                              var_10_2 = 0x101c;
0049ee4f                          label_49ee4f:
0049ee4b                              result->vtable->SetDefaultValue(var_10_2, 0);
0049ee63                              int32_t var_14_2 = 0;
0049ee6c                              UIOption_CheckboxBitfield64::AddChild(result, 0x83912021, 0, 0);
0049ee29                              break;
0049ee29                          }
0049ee32                          case 3:
0049ee32                          {
0049ee32                              int32_t __saved_edi_2 = 0;
0049ee34                              var_10_2 = 0x40c00;
0049ee39                              goto label_49ee4f;
0049ee32                          }
0049ee3b                          case 4:
0049ee3b                          {
0049ee3b                              int32_t __saved_edi_3 = 0;
0049ee3d                              var_10_2 = 0x80000;
0049ee42                              goto label_49ee4f;
0049ee3b                          }
0049ee44                          case 5:
0049ee44                          {
0049ee44                              int32_t __saved_edi_4 = 0;
0049ee46                              var_10_2 = 0x78000000;
0049ee46                              goto label_49ee4f;
0049ee44                          }
0049ee21                          case 8:
0049ee21                          {
0049ee16                              result->vtable->SetDefaultValue(0xfbffffff, 0);
0049ee21                              break;
0049ee21                          }
0049ee08                      }
0049ee7e                  int32_t var_14_3 = 0;
0049ee87                  UIOption_CheckboxBitfield64::AddChild(result, 0x600040, 0, 0);
0049ee99                  int32_t var_14_4 = 0;
0049eea2                  UIOption_CheckboxBitfield64::AddChild(result, 0x20080, 0, 0);
0049eeb5                  int32_t var_14_5 = 0;
0049eebe                  UIOption_CheckboxBitfield64::AddChild(result, 0x1004, 0, 0);
0049eed0                  int32_t var_14_6 = 0;
0049eed6                  UIOption_CheckboxBitfield64::AddChild(result, 0x18, 0, 0);
0049eee8                  int32_t var_14_7 = 0;
0049eef1                  UIOption_CheckboxBitfield64::AddChild(result, 0x40c00, 0, 0);
0049ef04                  int32_t var_14_8 = 0;
0049ef0d                  UIOption_CheckboxBitfield64::AddChild(result, 0x80000, 0, 0);
0049ef1f                  int32_t var_14_9 = 0;
0049ef28                  UIOption_CheckboxBitfield64::AddChild(result, 0x8000000, 0, 0);
0049ef3a                  int32_t var_14_10 = 0;
0049ef43                  UIOption_CheckboxBitfield64::AddChild(result, 0x10000000, 0, 0);
0049ef56                  int32_t var_14_11 = 0;
0049ef5f                  UIOption_CheckboxBitfield64::AddChild(result, 0x20000000, 0, 0);
0049ef71                  int32_t var_14_12 = 0;
0049ef7a                  UIOption_CheckboxBitfield64::AddChild(result, 0x40000000, 0, 0);
0049ef8c                  int32_t var_14_13 = 1;
0049ef92                  UIOption_CheckboxBitfield64::AddChild(result, 0, 0, 0);
0049efa5                  int32_t var_14_14 = 0;
0049efae                  UIOption_CheckboxBitfield64::AddChild(result, 0x4000000, 0, 0);
0049efb5                  UIOption_CheckboxBitfield64::CreateChildren(result);
0049efbd                  OptionPage::RegisterOption(this, result);
0049eddc              }
0049edbe          }
0049edae      }
0049edae      
0049efc6      return result;
0049eda0  }

0049efc9                             8d 49 00                                                                       .I.
0049efcc  uint32_t jump_table_49efcc[0x7] = 
0049efcc  {
0049efcc      [0x0] =  0x0049ee29
0049efd0      [0x1] =  0x0049ee32
0049efd4      [0x2] =  0x0049ee3b
0049efd8      [0x3] =  0x0049ee44
0049efdc      [0x4] =  0x0049ee71
0049efe0      [0x5] =  0x0049ee71
0049efe4      [0x6] =  0x0049ee16
0049efe8  }

0049efe8                          90 90 90 90 90 90 90 90                                                          ........

0049eff0  void __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::init(class DualHash<UIOption_Slider *,UIOption_Slider *>* this, uint32_t arg2)

0049eff0  {
0049f004      this->m_num_buckets = arg2;
0049f006      this->m_num_elements = 0;
0049f009      uint32_t* eax_3 = operator new[](((arg2 << 4) + 4));
0049f013      void* eax_5;
0049f013      
0049f013      if (eax_3 == 0)
0049f03d          eax_5 = nullptr;
0049f013      else
0049f013      {
0049f01d          *(uint32_t*)eax_3 = arg2;
0049f01f          void* eax_4 = &eax_3[1];
0049f01f          
0049f021          if ((arg2 - 1) >= 0)
0049f021          {
0049f023              int32_t i_2 = arg2;
0049f037              int32_t i;
0049f037              
0049f037              do
0049f037              {
0049f024                  *(uint32_t*)eax_4 = 0x7a8d74;
0049f02a                  *(uint32_t*)((char*)eax_4 + 4) = 0;
0049f02d                  *(uint32_t*)((char*)eax_4 + 8) = 0;
0049f030                  *(uint32_t*)((char*)eax_4 + 0xc) = 0;
0049f033                  eax_4 += 0x10;
0049f036                  i = i_2;
0049f036                  i_2 -= 1;
0049f037              } while (i != 1);
0049f021          }
0049f021          
0049f039          eax_5 = &eax_3[1];
0049f013      }
0049f013      
0049f03f      uint32_t m_num_buckets = this->m_num_buckets;
0049f04a      this->m_left_buckets = eax_5;
0049f04d      uint32_t* eax_6 = operator new[](((m_num_buckets << 4) + 4));
0049f04d      
0049f057      if (eax_6 == 0)
0049f057      {
0049f08f          this->m_right_buckets = nullptr;
0049f094          return;
0049f057      }
0049f057      
0049f061      *(uint32_t*)eax_6 = m_num_buckets;
0049f063      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* eax_7 = &eax_6[1];
0049f063      
0049f065      if ((m_num_buckets - 1) >= 0)
0049f065      {
0049f067          int32_t ecx_5 = m_num_buckets;
0049f083          int32_t i_1;
0049f083          
0049f083          do
0049f083          {
0049f070              eax_7->vtable = 0x7a8d74;
0049f076              eax_7->_head = nullptr;
0049f079              eax_7->_tail = nullptr;
0049f07c              eax_7->_num_elements = 0;
0049f07f              eax_7 = &eax_7[1];
0049f082              i_1 = ecx_5;
0049f082              ecx_5 -= 1;
0049f083          } while (i_1 != 1);
0049f065      }
0049f065      
0049f087      this->m_right_buckets = &eax_6[1];
0049eff0  }

0049f06a                                8d 9b 00 00 00 00                                                            ......
0049f097                                                                       90 90 90 90 90 90 90 90 90                         .........

0049f0a0  void __fastcall DualHashIter<UIOption_Slider *,UIOption_Slider *>::start_bucket(class DualHashIter<UIOption_Slider *,UIOption_Slider *>* this)

0049f0a0  {
0049f0aa      if (this->m_curr_bucket != this->m_end_bucket)
0049f0aa      {
0049f0ee          void* __offset(List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>, 0x10) i;
0049f0ee          
0049f0ee          do
0049f0ee          {
0049f0b5              class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_curr_bucket = this->m_curr_bucket;
0049f0c0              void var_c;
0049f0c0              
0049f0c0              if (&this->m_curr_element != &var_c)
0049f0c0              {
0049f0af                  this->m_curr_element._current = m_curr_bucket->_head;
0049f0af                  this->m_curr_element._list = m_curr_bucket;
0049f0c0              }
0049f0c0              
0049f0d0              if (&this->m_end_element != &var_c)
0049f0d0              {
0049f0b2                  this->m_end_element._current = nullptr;
0049f0b2                  this->m_end_element._list = this->m_curr_bucket;
0049f0d0              }
0049f0d0              
0049f0e2              if (this->m_end_element._current != this->m_curr_element._current)
0049f0e2                  break;
0049f0e2              
0049f0e6              i = &this->m_curr_bucket[1];
0049f0e9              this->m_curr_bucket = i;
0049f0ee          } while (i != this->m_end_bucket);
0049f0aa      }
0049f0a0  }

0049f0f7                                                                       90 90 90 90 90 90 90 90 90                         .........

0049f100  void __fastcall gmChatOptionsUI::PostInit(class gmChatOptionsUI* this)

0049f100  {
0049f103      UIElement::PostInit(this);
0049f10f      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000050d);
0049f116      class UIElement_ListBox* eax_1;
0049f116      
0049f116      if (eax == 0)
0049f126          eax_1 = nullptr;
0049f116      else
0049f11e          eax_1 = eax->vtable->DynamicCast(5);
0049f11e      
0049f128      this->m_pOptionBox = eax_1;
0049f12e      this->vtable->InitOptions();
0049f138      this->vtable->OnOptionChanged(0);
0049f100  }

0049f14a                                90 90 90 90 90 90                                                            ......

0049f150  void __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::add_internal(class DualHash<UIOption_Slider *,UIOption_Slider *>* this, class UIOption_Slider** arg2, class UIOption_Slider** arg3)

0049f150  {
0049f155      class UIOption_Slider* edx = *(uint32_t*)arg2;
0049f166      uint32_t m_num_buckets = this->m_num_buckets;
0049f178      void* esi_2 = &this->m_left_buckets[(COMBINE(0, ((edx << 0x18) | (edx >> 8))) % m_num_buckets)];
0049f17a      class UIOption_Slider* edx_5 = *(uint32_t*)arg3;
0049f193      void* edi_2 = &this->m_right_buckets[(COMBINE(0, ((edx_5 << 0x18) | (edx_5 >> 8))) % m_num_buckets)];
0049f195      void* eax_7 = operator new(8);
0049f19f      void* ebx_1;
0049f19f      
0049f19f      if (eax_7 == 0)
0049f1af          ebx_1 = nullptr;
0049f19f      else
0049f19f      {
0049f1a3          *(uint32_t*)eax_7 = *(uint32_t*)arg2;
0049f1a8          *(uint32_t*)((char*)eax_7 + 4) = *(uint32_t*)arg3;
0049f1ab          ebx_1 = eax_7;
0049f19f      }
0049f19f      
0049f1b3      void* eax_8 = operator new(0xc);
0049f1b3      
0049f1bf      if (eax_8 != 0)
0049f1bf      {
0049f1c1          *(uint32_t*)eax_8 = ebx_1;
0049f1c3          *(uint32_t*)((char*)eax_8 + 4) = 0;
0049f1c6          *(uint32_t*)((char*)eax_8 + 8) = 0;
0049f1c6          
0049f1cc          if (*(uint32_t*)((char*)esi_2 + 4) != 0)
0049f1cc          {
0049f1d3              void* ecx_1 = *(uint32_t*)((char*)esi_2 + 8);
0049f1d6              *(uint32_t*)((char*)ecx_1 + 4) = eax_8;
0049f1d9              *(uint32_t*)((char*)eax_8 + 8) = ecx_1;
0049f1cc          }
0049f1cc          else
0049f1ce              *(uint32_t*)((char*)esi_2 + 4) = eax_8;
0049f1ce          
0049f1dc          *(uint32_t*)((char*)esi_2 + 8) = eax_8;
0049f1df          *(uint32_t*)((char*)esi_2 + 0xc) += 1;
0049f1bf      }
0049f1bf      
0049f1e4      void** eax_9 = operator new(0xc);
0049f1e4      
0049f1ee      if (eax_9 != 0)
0049f1ee      {
0049f1f0          *(uint32_t*)eax_9 = ebx_1;
0049f1f2          eax_9[1] = 0;
0049f1f5          eax_9[2] = 0;
0049f1f5          
0049f1fb          if (*(uint32_t*)((char*)edi_2 + 4) == 0)
0049f1fb          {
0049f1fd              *(uint32_t*)((char*)edi_2 + 4) = eax_9;
0049f200              *(uint32_t*)((char*)edi_2 + 8) = eax_9;
0049f203              *(uint32_t*)((char*)edi_2 + 0xc) += 1;
0049f20a              return;
0049f1fb          }
0049f1fb          
0049f20d          void* ecx_2 = *(uint32_t*)((char*)edi_2 + 8);
0049f210          *(uint32_t*)((char*)ecx_2 + 4) = eax_9;
0049f213          eax_9[2] = ecx_2;
0049f216          *(uint32_t*)((char*)edi_2 + 8) = eax_9;
0049f219          *(uint32_t*)((char*)edi_2 + 0xc) += 1;
0049f1ee      }
0049f150  }

0049f223           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0049f230  uint8_t __thiscall DualHashIter<UIOption_Slider *,UIOption_Slider *>::operator==(class DualHashIter<UIOption_Slider *,UIOption_Slider *> const* this, class DualHashIter<UIOption_Slider *,UIOption_Slider *> const* arg2)

0049f230  {
0049f230      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_curr_bucket_1 = this->m_curr_bucket;
0049f230      
0049f239      if ((m_curr_bucket_1 != 0 && m_curr_bucket_1 != this->m_end_bucket))
0049f239      {
0049f23b          class ListNode<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* _current = this->m_curr_element._current;
0049f23b          
0049f241          if (this->m_end_element._current != _current)
0049f241          {
0049f279              int32_t* ecx_1 = arg2;
0049f279              
0049f284              if ((m_curr_bucket_1 == *(uint32_t*)ecx_1 && ecx_1[3] == _current))
0049f28b                  return 1;
0049f28b              
0049f290              return 0;
0049f241          }
0049f239      }
0049f239      
0049f247      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_curr_bucket = arg2->m_curr_bucket;
0049f247      
0049f258      if ((m_curr_bucket == 0 || (m_curr_bucket == arg2->m_end_bucket || arg2->m_end_element._current == arg2->m_curr_element._current)))
0049f258      {
0049f274          int32_t eax_2;
0049f274          eax_2 = 1;
0049f276          return 1;
0049f258      }
0049f258      
0049f266      int32_t eax_1;
0049f266      eax_1 = 0;
0049f268      return 0;
0049f230  }

0049f293                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049f2a0  class DualHashIter<UIOption_Slider *,UIOption_Slider *>* __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::find_left(class DualHash<UIOption_Slider *,UIOption_Slider *> const* this, class DualHashIter<UIOption_Slider *,UIOption_Slider *>* __return, class UIOption_Slider** arg3)

0049f2a0  {
0049f2aa      uint32_t m_num_buckets = this->m_num_buckets;
0049f2ad      class UIOption_Slider* i = *(uint32_t*)arg3;
0049f2bf      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_left_buckets = this->m_left_buckets;
0049f2cc      int32_t** _head = m_left_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % m_num_buckets)]._head;
0049f2d0      void* edx_5 = &m_left_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % m_num_buckets)];
0049f2d0      
0049f2d4      if (_head != 0)
0049f2d4      {
0049f2da          while (**(uint32_t**)_head != i)
0049f2da          {
0049f2dc              _head = _head[1];
0049f2dc              
0049f2e1              if (_head == 0)
0049f2e1                  break;
0049f2da          }
0049f2d4      }
0049f2d4      
0049f2e3      void** result = __return;
0049f2e7      result[2] = 0x7a8d70;
0049f2e7      result[3] = 0;
0049f2e7      result[4] = 0;
0049f2f6      result[5] = 0x7a8d70;
0049f2f6      result[6] = 0;
0049f2f6      result[7] = 0;
0049f305      result[1] = &m_left_buckets[m_num_buckets];
0049f30e      *(uint32_t*)result = edx_5;
0049f310      void var_18;
0049f310      
0049f310      if (&result[2] != &var_18)
0049f310      {
0049f2e7          result[3] = _head;
0049f2e7          result[4] = edx_5;
0049f310      }
0049f310      
0049f31e      void var_c;
0049f31e      
0049f31e      if (&result[5] != &var_c)
0049f31e      {
0049f2f6          result[6] = 0;
0049f2f6          result[7] = edx_5;
0049f31e      }
0049f31e      
0049f32d      return result;
0049f2a0  }


0049f330  class DualHashIter<UIOption_Slider *,UIOption_Slider *>* __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::find_right(class DualHash<UIOption_Slider *,UIOption_Slider *> const* this, class DualHashIter<UIOption_Slider *,UIOption_Slider *>* __return, class UIOption_Slider** arg3)

0049f330  {
0049f33a      uint32_t m_num_buckets = this->m_num_buckets;
0049f33d      class UIOption_Slider* i = *(uint32_t*)arg3;
0049f34f      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_right_buckets = this->m_right_buckets;
0049f35c      void** _head = m_right_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % m_num_buckets)]._head;
0049f360      void* edx_5 = &m_right_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % m_num_buckets)];
0049f360      
0049f364      if (_head != 0)
0049f364      {
0049f36b          while (*(uint32_t*)(*(uint32_t*)_head + 4) != i)
0049f36b          {
0049f36d              _head = _head[1];
0049f36d              
0049f372              if (_head == 0)
0049f372                  break;
0049f36b          }
0049f364      }
0049f364      
0049f374      void** result = __return;
0049f378      result[2] = 0x7a8d70;
0049f378      result[3] = 0;
0049f378      result[4] = 0;
0049f387      result[5] = 0x7a8d70;
0049f387      result[6] = 0;
0049f387      result[7] = 0;
0049f396      result[1] = &m_right_buckets[m_num_buckets];
0049f39f      *(uint32_t*)result = edx_5;
0049f3a1      void var_18;
0049f3a1      
0049f3a1      if (&result[2] != &var_18)
0049f3a1      {
0049f378          result[3] = _head;
0049f378          result[4] = edx_5;
0049f3a1      }
0049f3a1      
0049f3af      void var_c;
0049f3af      
0049f3af      if (&result[5] != &var_c)
0049f3af      {
0049f387          result[6] = 0;
0049f387          result[7] = edx_5;
0049f3af      }
0049f3af      
0049f3be      return result;
0049f330  }

0049f3c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0049f3d0  uint8_t __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::find_left(class DualHash<UIOption_Slider *,UIOption_Slider *> const* this, class UIOption_Slider** arg2, class UIOption_Slider** arg3)

0049f3d0  {
0049f3e2      void __return;
0049f3e2      DualHash<UIOption_Slider *,UIOption_Slider *>::find_left(this, &__return, arg2);
0049f3ef      void* eax_3 = &this->m_left_buckets[this->m_num_buckets];
0049f3f6      void* var_40 = eax_3;
0049f3fa      void* var_3c = eax_3;
0049f400      int32_t var_38 = 0x7a8d70;
0049f404      int32_t var_2c = 0x7a8d70;
0049f40c      int32_t var_34 = 0;
0049f410      int32_t var_30 = 0;
0049f414      int32_t var_28 = 0;
0049f418      int32_t var_24 = 0;
0049f41c      DualHashIter<UIOption_Slider *,UIOption_Slider *>::start_bucket(&var_40);
0049f41c      
0049f432      if (DualHashIter<UIOption_Slider *,UIOption_Slider *>::operator==(&__return, &var_40) != 0)
0049f439          return 0;
0049f439      
0049f449      int32_t* var_14;
0049f449      *(uint32_t*)arg3 = *(uint32_t*)(*(uint32_t*)var_14 + 4);
0049f44b      class UIOption_Slider** eax_6;
0049f44b      eax_6 = 1;
0049f450      return 1;
0049f3d0  }

0049f453                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049f460  uint8_t __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::find_right(class DualHash<UIOption_Slider *,UIOption_Slider *> const* this, class UIOption_Slider** arg2, class UIOption_Slider** arg3)

0049f460  {
0049f472      void __return;
0049f472      DualHash<UIOption_Slider *,UIOption_Slider *>::find_right(this, &__return, arg2);
0049f47f      void* eax_3 = &this->m_left_buckets[this->m_num_buckets];
0049f486      void* var_40 = eax_3;
0049f48a      void* var_3c = eax_3;
0049f490      int32_t var_38 = 0x7a8d70;
0049f494      int32_t var_2c = 0x7a8d70;
0049f49c      int32_t var_34 = 0;
0049f4a0      int32_t var_30 = 0;
0049f4a4      int32_t var_28 = 0;
0049f4a8      int32_t var_24 = 0;
0049f4ac      DualHashIter<UIOption_Slider *,UIOption_Slider *>::start_bucket(&var_40);
0049f4ac      
0049f4c2      if (DualHashIter<UIOption_Slider *,UIOption_Slider *>::operator==(&__return, &var_40) != 0)
0049f4c9          return 0;
0049f4c9      
0049f4d8      int32_t* var_14;
0049f4d8      *(uint32_t*)arg3 = **(uint32_t**)var_14;
0049f4da      class UIOption_Slider** eax_6;
0049f4da      eax_6 = 1;
0049f4df      return 1;
0049f460  }

0049f4e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0049f4f0  uint8_t __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::contains_left(class DualHash<UIOption_Slider *,UIOption_Slider *> const* this, class UIOption_Slider** arg2)

0049f4f0  {
0049f4fe      void* eax_2 = &this->m_left_buckets[this->m_num_buckets];
0049f505      void* var_40 = eax_2;
0049f509      void* var_3c = eax_2;
0049f50f      int32_t var_38 = 0x7a8d70;
0049f513      int32_t var_2c = 0x7a8d70;
0049f51b      int32_t var_34 = 0;
0049f51f      int32_t var_30 = 0;
0049f523      int32_t var_28 = 0;
0049f527      int32_t var_24 = 0;
0049f52b      DualHashIter<UIOption_Slider *,UIOption_Slider *>::start_bucket(&var_40);
0049f548      void __return;
0049f548      uint8_t eax_5 = DualHashIter<UIOption_Slider *,UIOption_Slider *>::operator==(DualHash<UIOption_Slider *,UIOption_Slider *>::find_left(this, &__return, arg2), &var_40);
0049f54d      uint8_t temp1 = eax_5;
0049f54d      eax_5 = -(eax_5);
0049f557      return ((eax_5 - eax_5) + 1);
0049f4f0  }

0049f55a                                                                                90 90 90 90 90 90                            ......

0049f560  uint8_t __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::contains_right(class DualHash<UIOption_Slider *,UIOption_Slider *> const* this, class UIOption_Slider** arg2)

0049f560  {
0049f56e      void* eax_2 = &this->m_left_buckets[this->m_num_buckets];
0049f575      void* var_40 = eax_2;
0049f579      void* var_3c = eax_2;
0049f57f      int32_t var_38 = 0x7a8d70;
0049f583      int32_t var_2c = 0x7a8d70;
0049f58b      int32_t var_34 = 0;
0049f58f      int32_t var_30 = 0;
0049f593      int32_t var_28 = 0;
0049f597      int32_t var_24 = 0;
0049f59b      DualHashIter<UIOption_Slider *,UIOption_Slider *>::start_bucket(&var_40);
0049f5b8      void __return;
0049f5b8      uint8_t eax_5 = DualHashIter<UIOption_Slider *,UIOption_Slider *>::operator==(DualHash<UIOption_Slider *,UIOption_Slider *>::find_right(this, &__return, arg2), &var_40);
0049f5bd      uint8_t temp1 = eax_5;
0049f5bd      eax_5 = -(eax_5);
0049f5c7      return ((eax_5 - eax_5) + 1);
0049f560  }

0049f5ca                                90 90 90 90 90 90                                                            ......

0049f5d0  void __thiscall gmChatOptionsUI::OnOptionChanged(class gmChatOptionsUI* this, class UIOption const* arg2)

0049f5d0  {
0049f5d4      class UIOption* __saved_esi_1 = arg2;
0049f5e1      class UIOption* edx;
0049f5e1      
0049f5e1      if (__saved_esi_1 != 0)
0049f5e1      {
0049f5f1          void* eax_2;
0049f5f1          eax_2 = __saved_esi_1->vtable->DynamicCast(0x10000037);
0049f5f1          
0049f5f9          if (eax_2 != 0)
0049f5f9          {
0049f605              class UIOption_Slider* var_c = ((char*)eax_2 - 0x20);
0049f605              
0049f609              if (eax_2 != 0x20)
0049f609              {
0049f61e                  arg2 = nullptr;
0049f61e                  
0049f62d                  if (DualHash<UIOption_Slider *,UIOption_Slider *>::find_left(&this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3], &var_c, &arg2) != 0)
0049f62d                  {
0049f637                      float var_8_1 = ((float)UIOption_Slider::GetCurrentValue(((char*)eax_2 - 0x20)));
0049f63b                      class UIOption* ebx_1 = arg2;
0049f646                      (UIOption_Slider::GetCurrentValue(ebx_1) - ((long double)var_8_1));
0049f64c                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0049f64c                      
0049f64f                      if (!(p_1))
0049f64f                      {
0049f658                          class UIOption_Slider* var_20_2 = ((char*)eax_2 - 0x20);
0049f65e                          UIOption_Slider::SetCurrentValue(ebx_1, ((float)UIOption_Slider::GetCurrentValue(((char*)eax_2 - 0x20))));
0049f64f                      }
0049f62d                  }
0049f62d                  
0049f670                  int16_t eax_4;
0049f670                  eax_4 = DualHash<UIOption_Slider *,UIOption_Slider *>::find_right(&this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3], &var_c, &arg2);
0049f670                  
0049f677                  if (eax_4 != 0)
0049f677                  {
0049f680                      float var_8_2 = ((float)UIOption_Slider::GetCurrentValue(((char*)eax_2 - 0x20)));
0049f684                      class UIOption* edi_2 = arg2;
0049f68a                      long double st0_5 = UIOption_Slider::GetCurrentValue(edi_2);
0049f68f                      long double temp2_1 = ((long double)var_8_2);
0049f68f                      (st0_5 - temp2_1);
0049f68f                      
0049f698                      if ((*(uint8_t*)((char*)((((st0_5 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_5, temp2_1))) ? 1 : 0) << 0xa) | ((((st0_5 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0049f698                      {
0049f6a1                          class UIOption_Slider* __saved_ebx_3 = ((char*)eax_2 - 0x20);
0049f6a7                          edx = UIOption_Slider::SetCurrentValue(edi_2, ((float)UIOption_Slider::GetCurrentValue(((char*)eax_2 - 0x20))));
0049f698                      }
0049f677                  }
0049f609              }
0049f5f9          }
0049f5e1      }
0049f5e1      
0049f6b1      class UIOption* __saved_esi = __saved_esi_1;
0049f6b2      PlayerOptionPage::OnOptionChanged(this, edx);
0049f5d0  }

0049f6bf                                                                                               90                                 .

0049f6c0  void __fastcall DualHash<UIOption_Slider *,UIOption_Slider *>::clear(class DualHash<UIOption_Slider *,UIOption_Slider *>* this)

0049f6c0  {
0049f6c0      class DualHash<UIOption_Slider *,UIOption_Slider *>* this_1 = this;
0049f6cb      int32_t var_4 = 0;
0049f6cb      
0049f6cf      if (this->m_num_buckets > 0)
0049f6cf      {
0049f6d7          int32_t ebp_1 = 0;
0049f77b          bool cond:2_1;
0049f77b          
0049f77b          do
0049f77b          {
0049f6e9              for (int32_t* i = *(uint32_t*)(&this->m_left_buckets->_head + ebp_1); i != 0; i = i[1])
0049f6e9              {
0049f6f0                  void* eax_2 = *(uint32_t*)i;
0049f6f0                  
0049f6f4                  if (eax_2 != 0)
0049f6f7                      operator delete(eax_2);
0049f6e9              }
0049f6e9              
0049f709              void* esi_2 = (this->m_left_buckets + ebp_1);
0049f709              
0049f710              while (true)
0049f710              {
0049f710                  void* ecx = *(uint32_t*)((char*)esi_2 + 4);
0049f710                  
0049f715                  if (ecx == 0)
0049f715                      break;
0049f715                  
0049f717                  void* eax_3 = *(uint32_t*)((char*)ecx + 4);
0049f71c                  *(uint32_t*)((char*)esi_2 + 4) = eax_3;
0049f71c                  
0049f71f                  if (eax_3 == 0)
0049f726                      *(uint32_t*)((char*)esi_2 + 8) = 0;
0049f71f                  else
0049f721                      *(uint32_t*)((char*)eax_3 + 8) = 0;
0049f721                  
0049f72b                  if (ecx != 0)
0049f72e                      operator delete(ecx);
0049f72e                  
0049f736                  *(uint32_t*)((char*)esi_2 + 0xc) -= 1;
0049f710              }
0049f710              
0049f73e              void* esi_4 = (this->m_right_buckets + ebp_1);
0049f73e              
0049f740              while (true)
0049f740              {
0049f740                  void* ecx_1 = *(uint32_t*)((char*)esi_4 + 4);
0049f740                  
0049f745                  if (ecx_1 == 0)
0049f745                      break;
0049f745                  
0049f747                  void* eax_4 = *(uint32_t*)((char*)ecx_1 + 4);
0049f74c                  *(uint32_t*)((char*)esi_4 + 4) = eax_4;
0049f74c                  
0049f74f                  if (eax_4 == 0)
0049f756                      *(uint32_t*)((char*)esi_4 + 8) = 0;
0049f74f                  else
0049f751                      *(uint32_t*)((char*)eax_4 + 8) = 0;
0049f751                  
0049f75b                  if (ecx_1 != 0)
0049f75e                      operator delete(ecx_1);
0049f75e                  
0049f766                  *(uint32_t*)((char*)esi_4 + 0xc) -= 1;
0049f740              }
0049f740              
0049f772              ebp_1 += 0x10;
0049f775              cond:2_1 = (var_4 + 1) < this->m_num_buckets;
0049f777              var_4 += 1;
0049f77b          } while (cond:2_1);
0049f6cf      }
0049f6cf      
0049f783      this->m_num_elements = 0;
0049f6c0  }

0049f6ed                                         8d 49 00                                                               .I.
0049f70d                                         8d 49 00                                                               .I.
0049f78a                                90 90 90 90 90 90                                                            ......

0049f790  void* __thiscall List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>::`vector deleting destructor'(class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* this, uint32_t arg2)

0049f790  {
0049f791      int32_t ebx;
0049f791      ebx = arg2;
0049f791      
0049f79b      if ((ebx & 2) == 0)
0049f79b      {
0049f80b          this->vtable = 0x7a8d74;
0049f811          List<StringTableMetaLanguage::Node const *>::flush(this);
0049f811          
0049f819          if ((ebx & 1) != 0)
0049f81c              operator delete(this);
0049f81c          
0049f828          return this;
0049f79b      }
0049f79b      
0049f79d      int32_t vtable = this->vtable;
0049f7a1      void* __offset(List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>, -0x4) ebp = ((char*)this - 4);
0049f7aa      void* esi_2 = &this[vtable];
0049f7aa      
0049f7ad      if ((vtable - 1) >= 0)
0049f7ad      {
0049f7af          ebx = vtable;
0049f7ec          int32_t i;
0049f7ec          
0049f7ec          do
0049f7ec          {
0049f7b4              esi_2 -= 0x10;
0049f7b7              *(uint32_t*)esi_2 = 0x7a8d74;
0049f7b7              
0049f7c0              while (true)
0049f7c0              {
0049f7c0                  this = *(uint32_t*)((char*)esi_2 + 4);
0049f7c0                  
0049f7c5                  if (this == 0)
0049f7c5                      break;
0049f7c5                  
0049f7c7                  class ListNode<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* _head = this->_head;
0049f7cc                  *(uint32_t*)((char*)esi_2 + 4) = _head;
0049f7cc                  
0049f7cf                  if (_head == 0)
0049f7d6                      *(uint32_t*)((char*)esi_2 + 8) = 0;
0049f7cf                  else
0049f7d1                      _head->prev = nullptr;
0049f7d1                  
0049f7db                  if (this != 0)
0049f7de                      operator delete(this);
0049f7de                  
0049f7e6                  *(uint32_t*)((char*)esi_2 + 0xc) -= 1;
0049f7c0              }
0049f7c0              
0049f7eb              i = ebx;
0049f7eb              ebx -= 1;
0049f7ec          } while (i != 1);
0049f7ee          ebx = arg2;
0049f7ad      }
0049f7ad      
0049f7f5      if ((ebx & 1) != 0)
0049f7f8          operator delete[](ebp);
0049f7f8      
0049f806      return ebp;
0049f790  }

0049f82b                                   90 90 90 90 90                                                             .....

0049f830  void __fastcall DualHash<UIOption_Slider *,UIOption_Slider *>::~DualHash<UIOption_Slider *,UIOption_Slider *>(class DualHash<UIOption_Slider *,UIOption_Slider *>* this)

0049f830  {
0049f833      DualHash<UIOption_Slider *,UIOption_Slider *>::clear(this);
0049f838      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_left_buckets = this->m_left_buckets;
0049f838      
0049f83d      if (m_left_buckets != 0)
0049f83d      {
0049f847          if (m_left_buckets->vtable == 0)
0049f852              operator delete[](((char*)m_left_buckets - 4));
0049f847          else
0049f849              m_left_buckets->vtable->__vecDelDtor(3);
0049f83d      }
0049f83d      
0049f85a      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_right_buckets = this->m_right_buckets;
0049f85a      
0049f860      if (m_right_buckets != 0)
0049f860      {
0049f86a          if (m_right_buckets->vtable != 0)
0049f86a          {
0049f86c              m_right_buckets->vtable->__vecDelDtor(3);
0049f872              return;
0049f86a          }
0049f86a          
0049f874          operator delete[](((char*)m_right_buckets - 4));
0049f860      }
0049f830  }

0049f87b                                                                                   90 90 90 90 90                             .....

0049f880  void __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::inc_num_elements(class DualHash<UIOption_Slider *,UIOption_Slider *>* this, uint32_t arg2)

0049f880  {
0049f88d      uint32_t ecx_1 = (this->m_num_elements + arg2);
0049f88f      uint32_t m_num_buckets = this->m_num_buckets;
0049f897      this->m_num_elements = ecx_1;
0049f897      
0049f89a      if (ecx_1 > (m_num_buckets >> 1))
0049f89a      {
0049f8a0          int32_t var_10 = 0;
0049f8a4          int32_t var_8_1 = 0;
0049f8a8          int32_t var_4_1 = 0;
0049f8b1          DualHash<UIOption_Slider *,UIOption_Slider *>::init(&var_10, (m_num_buckets * 2));
0049f8bb          DualHash<UIOption_Slider *,UIOption_Slider *>::operator=(&var_10, this);
0049f8c2          DualHash<UIOption_Slider *,UIOption_Slider *>::~DualHash<UIOption_Slider *,UIOption_Slider *>(this);
0049f8ce          DualHash<UIOption_Slider *,UIOption_Slider *>::init(this, (this->m_num_buckets << 1));
0049f8da          DualHash<UIOption_Slider *,UIOption_Slider *>::operator=(this, &var_10);
0049f8e3          DualHash<UIOption_Slider *,UIOption_Slider *>::~DualHash<UIOption_Slider *,UIOption_Slider *>(&var_10);
0049f89a      }
0049f880  }

0049f8ef                                               90                                                                 .

0049f8f0  class DualHash<UIOption_Slider *,UIOption_Slider *>* __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::operator=(class DualHash<UIOption_Slider *,UIOption_Slider *>* arg1, int32_t* arg2)

0049f8f0  {
0049f8fb      DualHash<UIOption_Slider *,UIOption_Slider *>::clear(arg1);
0049f907      int32_t eax = arg2[2];
0049f914      int32_t var_18 = 0x7a8d70;
0049f918      int32_t var_c = 0x7a8d70;
0049f91c      int32_t edx_2 = ((*(uint32_t*)arg2 << 4) + eax);
0049f91e      int32_t var_38 = 0x7a8d70;
0049f922      int32_t var_2c = 0x7a8d70;
0049f92a      uint32_t var_48 = 0;
0049f92e      int32_t var_40 = eax;
0049f936      class UIOption_Slider*** var_34 = nullptr;
0049f93a      int32_t var_30 = 0;
0049f93e      int32_t var_28 = 0;
0049f942      int32_t var_24 = 0;
0049f946      DualHashIter<UIOption_Slider *,UIOption_Slider *>::start_bucket(&var_40);
0049f957      int32_t esi = var_40;
0049f95b      class UIOption_Slider*** edi = var_34;
0049f967      int32_t var_10 = var_30;
0049f96f      int32_t var_4 = var_24;
0049f96f      
0049f97c      while (true)
0049f97c      {
0049f97c          int32_t eax_5 = ((*(uint32_t*)arg2 << 4) + arg2[2]);
0049f97e          var_40 = eax_5;
0049f98f          int32_t var_38_1 = 0x7a8d70;
0049f993          int32_t var_34_1 = 0;
0049f997          int32_t var_30_1 = 0;
0049f99b          int32_t var_2c_1 = 0x7a8d70;
0049f99f          int32_t var_28_1 = 0;
0049f9a3          int32_t var_24_1 = 0;
0049f9a7          DualHashIter<UIOption_Slider *,UIOption_Slider *>::start_bucket(&var_40);
0049f9ba          char eax_6;
0049f9ba          
0049f9ba          if (((esi == 0 || esi == edx_2) || var_28 == edi))
0049f9ba          {
0049f9bc              int32_t eax_7 = var_40;
0049f9bc              
0049f9d2              if (((eax_7 == 0 || eax_7 == eax_5) || var_28_1 == var_34_1))
0049f9e4                  eax_6 = true;
0049f9d2              else
0049f9db                  eax_6 = false;
0049f9ba          }
0049f9ba          else if ((esi != var_40 || var_34_1 != edi))
0049f9f9              eax_6 = 0;
0049f9f3          else
0049f9f5              eax_6 = 1;
0049f9f5          
0049fa02          int32_t var_2c_2 = 0x7a8d70;
0049fa06          int32_t var_38_2 = 0x7a8d70;
0049fa06          
0049fa0a          if (eax_6 != 0)
0049fa0a              break;
0049fa0a          
0049fa10          class UIOption_Slider** eax_8 = *(uint32_t*)edi;
0049fa17          var_48 += 1;
0049fa20          DualHash<UIOption_Slider *,UIOption_Slider *>::add_internal(arg1, eax_8, &eax_8[1]);
0049fa20          
0049fa29          if (esi != edx_2)
0049fa29          {
0049fa2f              edi = edi[1];
0049fa2f              
0049fa3a              if (var_28 == edi)
0049fa3a              {
0049fa47                  int32_t var_20 = (esi + 0x10);
0049fa4b                  DualHashIter<UIOption_Slider *,UIOption_Slider *>::start_bucket(&var_20);
0049fa54                  esi = var_20;
0049fa3a              }
0049fa29          }
0049f97c      }
0049f97c      
0049fa68      DualHash<UIOption_Slider *,UIOption_Slider *>::inc_num_elements(arg1, var_48);
0049fa76      return arg1;
0049f8f0  }

0049fa79                                                                             90 90 90 90 90 90 90                           .......

0049fa80  void __thiscall gmChatOptionsUI::gmChatOptionsUI(class gmChatOptionsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

0049fa80  {
0049fa8f      PlayerOptionPage::PlayerOptionPage(this, arg2, arg3);
0049fa94      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049faa6      this->vtable = 0x7a8d80;
0049faac      this->vtable = &gmChatOptionsUI::`vftable';
0049fab6      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049fa9e      this->m_hashSliderLinks.m_num_buckets = 0;
0049fa9e      this->m_hashSliderLinks.m_left_buckets = nullptr;
0049fa9e      this->m_hashSliderLinks.m_right_buckets = nullptr;
0049faca      DualHash<UIOption_Slider *,UIOption_Slider *>::init(&this->m_hashSliderLinks, 0x40);
0049fa80  }

0049fad5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0049fae0  class UIElement* __thiscall gmChatOptionsUI::DynamicCast(class gmChatOptionsUI* this, uint32_t arg2) __pure

0049fae0  {
0049faec      int32_t eax;
0049faec      eax = arg2 != 0x10000042;
0049faf2      return ((eax - 1) & this);
0049fae0  }

0049faf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0049fb00  uint32_t gmChatOptionsUI::GetUIElementType(class gmChatOptionsUI const* this @ ecx) __pure

0049fb00  {
0049fb05      return 0x10000042;
0049fb00  }

0049fb06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049fb10  void __fastcall gmChatOptionsUI::~gmChatOptionsUI(class gmChatOptionsUI* this)

0049fb10  {
0049fb23      this->vtable = 0x7a8d80;
0049fb29      this->vtable = &gmChatOptionsUI::`vftable';
0049fb1b      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049fb39      DualHash<UIOption_Slider *,UIOption_Slider *>::clear(&this->m_hashSliderLinks);
0049fb3e      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_left_buckets = this->m_hashSliderLinks.m_left_buckets;
0049fb3e      
0049fb43      if (m_left_buckets != 0)
0049fb43      {
0049fb4d          if (m_left_buckets->vtable == 0)
0049fb58              operator delete[](((char*)m_left_buckets - 4));
0049fb4d          else
0049fb4f              m_left_buckets->vtable->__vecDelDtor(3);
0049fb43      }
0049fb43      
0049fb60      class List<DualHashData<UIOption_Slider *,UIOption_Slider *> *>* m_right_buckets = this->m_hashSliderLinks.m_right_buckets;
0049fb60      
0049fb65      if (m_right_buckets != 0)
0049fb65      {
0049fb6f          if (m_right_buckets->vtable == 0)
0049fb7a              operator delete[](((char*)m_right_buckets - 4));
0049fb6f          else
0049fb71              m_right_buckets->vtable->__vecDelDtor(3);
0049fb65      }
0049fb65      
0049fb1b      this->vtable = &gmUrgentAssistanceUI::`vftable';
0049fb8a      NoticeHandler::~NoticeHandler(&this->vtable);
0049fb94      /* tailcall */
0049fb94      return PlayerOptionPage::~PlayerOptionPage(this);
0049fb10  }

0049fb99                                                                             90 90 90 90 90 90 90                           .......

0049fba0  class UIElement* gmChatOptionsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

0049fba0  {
0049fba5      void* eax = operator new(0x618);
0049fba5      
0049fbaf      if (eax == 0)
0049fbc5          return 0;
0049fbc5      
0049fbc2      return gmChatOptionsUI::gmChatOptionsUI(eax, arg1, arg2);
0049fba0  }

0049fbc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0049fbd0  uint8_t __thiscall DualHash<UIOption_Slider *,UIOption_Slider *>::add(class DualHash<UIOption_Slider *,UIOption_Slider *>* this, class UIOption_Slider** arg2, class UIOption_Slider** arg3)

0049fbd0  {
0049fbe1      if ((DualHash<UIOption_Slider *,UIOption_Slider *>::contains_left(this, arg2) == 0 && DualHash<UIOption_Slider *,UIOption_Slider *>::contains_right(this, arg3) == 0))
0049fbe1      {
0049fbf7          DualHash<UIOption_Slider *,UIOption_Slider *>::add_internal(this, arg2, arg3);
0049fc00          DualHash<UIOption_Slider *,UIOption_Slider *>::inc_num_elements(this, 1);
0049fc07          int32_t eax_1;
0049fc07          eax_1 = 1;
0049fc0a          return 1;
0049fbe1      }
0049fbe1      
0049fc12      return 0;
0049fbd0  }

0049fc15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0049fc20  void* __thiscall gmChatOptionsUI::`scalar deleting destructor'(class gmChatOptionsUI* this, uint32_t arg2)

0049fc20  {
0049fc23      gmChatOptionsUI::~gmChatOptionsUI(this);
0049fc23      
0049fc2d      if ((arg2 & 1) != 0)
0049fc30          operator delete(this);
0049fc30      
0049fc3b      return this;
0049fc20  }

0049fc3e                                                                                            90 90                                ..

0049fc40  void gmChatOptionsUI::Register()

0049fc40  {
0049fc4a      UIElement::RegisterElementClass(0x10000042, gmChatOptionsUI::Create);
0049fc40  }

0049fc53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0049fc60  void __fastcall gmChatOptionsUI::InitOptions(class gmChatOptionsUI* this)

0049fc60  {
0049fc6e      PlayerOptionPage::AddHeader(this, 0);
0049fc73      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
0049fc79      class UIOption_Slider* ebx = nullptr;
0049fc79      
0049fc7d      if (m_pOptionBox != 0)
0049fc7d      {
0049fc82          class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, 3, nullptr);
0049fc82          
0049fc89          if (eax_1 != 0)
0049fc89          {
0049fc92              class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x1000021c);
0049fc92              
0049fc99              if (eax_2 != 0)
0049fc99              {
0049fca4                  void* eax_3 = eax_2->vtable->DynamicCast(0x10000037);
0049fca4                  
0049fcac                  if (eax_3 == 0)
004a0191                      ebx = nullptr;
0049fcac                  else
0049fcac                  {
0049fcb2                      ebx = ((char*)eax_3 - 0x20);
0049fcb2                      
0049fcb7                      if (ebx != 0)
0049fcb7                      {
0049fcc0                          UIOption_Slider::SetGameplayOptionProperty(ebx, 0x10000080);
0049fcc8                          OptionPage::RegisterOption(this, ebx);
0049fcb7                      }
0049fcac                  }
0049fc99              }
0049fc89          }
0049fc7d      }
0049fc7d      
0049fccd      class UIElement_ListBox* m_pOptionBox_1 = this->m_pOptionBox;
0049fcd3      class UIOption_Slider* esi = nullptr;
0049fcd3      
0049fcd7      if (m_pOptionBox_1 != 0)
0049fcd7      {
0049fcdc          class UIElement* eax_4 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox_1, 6, nullptr);
0049fcdc          
0049fce3          if (eax_4 != 0)
0049fce3          {
0049fcec              class UIElement* eax_5 = UIElement::GetChildRecursive(eax_4, 0x1000021c);
0049fcec              
0049fcf3              if (eax_5 != 0)
0049fcf3              {
0049fcfe                  void* eax_6 = eax_5->vtable->DynamicCast(0x10000037);
0049fcfe                  
0049fd06                  if (eax_6 == 0)
004a0198                      esi = nullptr;
0049fd06                  else
0049fd06                  {
0049fd0c                      esi = ((char*)eax_6 - 0x20);
0049fd0c                      
0049fd11                      if (esi != 0)
0049fd11                      {
0049fd1a                          UIOption_Slider::SetGameplayOptionProperty(esi, 0x10000081);
0049fd22                          OptionPage::RegisterOption(this, esi);
0049fd11                      }
0049fd06                  }
0049fcf3              }
0049fce3          }
0049fcd7      }
0049fcd7      
0049fd37      PlayerOptionPage::SetSliderLabel(this, esi, 0, 0);
0049fd3e      class UIOption_Slider* var_8 = esi;
0049fd42      class UIOption_Slider* var_4 = ebx;
0049fd42      
0049fd4a      if ((ebx != 0 && esi != 0))
0049fd5c          DualHash<UIOption_Slider *,UIOption_Slider *>::add(&this->m_hashSliderLinks, &var_4, &var_8);
0049fd5c      
0049fd63      PlayerOptionPage::AddSeperator(this);
0049fd71      PlayerOptionPage::AddHeader(this, 0);
0049fd76      class UIElement_ListBox* m_pOptionBox_2 = this->m_pOptionBox;
0049fd76      
0049fd7e      if (m_pOptionBox_2 != 0)
0049fd7e      {
0049fd88          class UIElement* eax_7 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox_2, 8, nullptr);
0049fd88          
0049fd8f          if (eax_7 != 0)
0049fd8f          {
0049fd9e              void* eax_8 = eax_7->vtable->DynamicCast(0x10000044);
0049fd9e              
0049fdb1              if ((eax_8 != 0 && eax_8 != 0x20))
0049fdb1              {
0049fdc0                  UIOption_CheckboxBitfield64::SetGameplayOptionProperty(((char*)eax_8 - 0x20), 0x1000007f, Chat_PropType);
0049fdc9                  UIOption::SetUserData(((char*)eax_8 - 0x20), 8);
0049fdac                  ((char*)eax_8 - 0x20)->vtable->SetDefaultValue(0xfbffffff, 0);
0049fded                  int32_t var_20_1 = 0;
0049fdf6                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x600040, 0, 0);
0049fe08                  int32_t var_20_2 = 0;
0049fe11                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x20080, 0, 0);
0049fe23                  int32_t var_20_3 = 0;
0049fe2c                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x1004, 0, 0);
0049fe3f                  int32_t var_20_4 = 0;
0049fe45                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x18, 0, 0);
0049fe57                  int32_t var_20_5 = 0;
0049fe60                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x40c00, 0, 0);
0049fe72                  int32_t var_20_6 = 0;
0049fe7b                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x80000, 0, 0);
0049fe8e                  int32_t var_20_7 = 0;
0049fe97                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x8000000, 0, 0);
0049fea9                  int32_t var_20_8 = 0;
0049feb2                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x10000000, 0, 0);
0049fec4                  int32_t var_20_9 = 0;
0049fecd                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x20000000, 0, 0);
0049fee0                  int32_t var_20_10 = 0;
0049fee9                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x40000000, 0, 0);
0049fefb                  int32_t var_20_11 = 1;
0049ff01                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0, 0, 0);
0049ff13                  int32_t var_20_12 = 0;
0049ff1c                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_8 - 0x20), 0x4000000, 0, 0);
0049ff23                  UIOption_CheckboxBitfield64::CreateChildren(((char*)eax_8 - 0x20));
0049ff2b                  OptionPage::RegisterOption(this, ((char*)eax_8 - 0x20));
0049fdb1              }
0049fd8f          }
0049fd7e      }
0049fd7e      
0049ff32      PlayerOptionPage::AddSeperator(this);
0049ff40      PlayerOptionPage::AddHeader(this, 0);
0049ff4e      gmChatOptionsUI::AddCheckboxBitfield64Option(this, &Option_TextType_Property, 2);
0049ff55      PlayerOptionPage::AddSeperator(this);
0049ff63      PlayerOptionPage::AddHeader(this, 0);
0049ff71      gmChatOptionsUI::AddCheckboxBitfield64Option(this, &Option_TextType_Property, 3);
0049ff78      PlayerOptionPage::AddSeperator(this);
0049ff85      PlayerOptionPage::AddHeader(this, 0);
0049ff93      gmChatOptionsUI::AddCheckboxBitfield64Option(this, &Option_TextType_Property, 4);
0049ff9a      PlayerOptionPage::AddSeperator(this);
0049ffa8      PlayerOptionPage::AddHeader(this, 0);
0049ffad      class UIElement_ListBox* m_pOptionBox_3 = this->m_pOptionBox;
0049ffad      
0049ffb5      if (m_pOptionBox_3 != 0)
0049ffb5      {
0049ffbf          class UIElement* eax_10 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox_3, 8, nullptr);
0049ffbf          
0049ffc6          if (eax_10 != 0)
0049ffc6          {
0049ffd5              void* eax_11 = eax_10->vtable->DynamicCast(0x10000044);
0049ffd5              
0049ffe8              if ((eax_11 != 0 && eax_11 != 0x20))
0049ffe8              {
0049fff7                  UIOption_CheckboxBitfield64::SetGameplayOptionProperty(((char*)eax_11 - 0x20), 0x1000007f, Chat_PropType);
004a0000                  UIOption::SetUserData(((char*)eax_11 - 0x20), 5);
004a0010                  *(int32_t*)((char*)((char*)eax_11 - 0x20)->vtable + 0x2d8)(0x78000000, 0);
004a0024                  int32_t var_20_13 = 0;
004a002d                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x83912021, 0, 0);
004a003f                  int32_t var_20_14 = 0;
004a0048                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x600040, 0, 0);
004a005a                  int32_t var_20_15 = 0;
004a0063                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x20080, 0, 0);
004a0076                  int32_t var_20_16 = 0;
004a007f                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x1004, 0, 0);
004a0091                  int32_t var_20_17 = 0;
004a0097                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x18, 0, 0);
004a00a9                  int32_t var_20_18 = 0;
004a00b2                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x40c00, 0, 0);
004a00c5                  int32_t var_20_19 = 0;
004a00ce                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x80000, 0, 0);
004a00e0                  int32_t var_20_20 = 0;
004a00e9                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x8000000, 0, 0);
004a00fb                  int32_t var_20_21 = 0;
004a0104                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x10000000, 0, 0);
004a0117                  int32_t var_20_22 = 0;
004a0120                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x20000000, 0, 0);
004a0132                  int32_t var_20_23 = 0;
004a013b                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x40000000, 0, 0);
004a014d                  int32_t var_20_24 = 1;
004a0153                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0, 0, 0);
004a0166                  int32_t var_20_25 = 0;
004a016f                  UIOption_CheckboxBitfield64::AddChild(((char*)eax_11 - 0x20), 0x4000000, 0, 0);
004a0176                  UIOption_CheckboxBitfield64::CreateChildren(((char*)eax_11 - 0x20));
004a017e                  OptionPage::RegisterOption(this, ((char*)eax_11 - 0x20));
0049ffe8              }
0049ffc6          }
0049ffb5      }
0049ffb5      
004a0185      PlayerOptionPage::AddSeperator(this);
0049fc60  }

004a019f                                                                                               90                                 .

004a01a0  class UIElement* __thiscall gmCharacterSettingsUI::DynamicCast(class gmCharacterSettingsUI* this, uint32_t arg2) __pure

004a01a0  {
004a01ac      int32_t eax;
004a01ac      eax = arg2 != 0x10000027;
004a01b2      return ((eax - 1) & this);
004a01a0  }

004a01b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004a01c0  uint32_t gmCharacterSettingsUI::GetUIElementType(class gmCharacterSettingsUI const* this @ ecx) __pure

004a01c0  {
004a01c5      return 0x10000027;
004a01c0  }

004a01c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a01d0  class UIElement* gmCharacterSettingsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a01d0  {
004a01d6      void* result = operator new(0x608);
004a01d6      
004a01e2      if (result == 0)
004a0220          return 0;
004a0220      
004a01f0      PlayerOptionPage::PlayerOptionPage(result, arg1, arg2);
004a01f5      *(uint32_t*)((char*)result + 0x604) = 0x7bf328;
004a01ff      *(uint32_t*)result = 0x7a93f0;
004a0205      *(uint32_t*)((char*)result + 0x5f0) = 0x7c4344;
004a020f      *(uint32_t*)((char*)result + 0x604) = 0x7bf328;
004a021c      return result;
004a01d0  }

004a0221     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004a0230  void* __thiscall gmCharacterSettingsUI::`scalar deleting destructor'(class gmCharacterSettingsUI* this, uint32_t arg2)

004a0230  {
004a0239      this->vtable = 0x7a93f0;
004a023f      this->vtable = &gmCharacterSettingsUI::`vftable';
004a0233      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a0233      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a0255      NoticeHandler::~NoticeHandler(&this->vtable);
004a025c      PlayerOptionPage::~PlayerOptionPage(this);
004a025c      
004a0266      if ((arg2 & 1) != 0)
004a0269          operator delete(this);
004a0269      
004a0274      return this;
004a0230  }

004a0277                                                                       90 90 90 90 90 90 90 90 90                         .........

004a0280  void __fastcall gmCharacterSettingsUI::PostInit(class gmCharacterSettingsUI* this)

004a0280  {
004a0283      UIElement::PostInit(this);
004a028f      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100001fa);
004a028f      
004a0296      if (eax != 0)
004a02a4          this->m_pOptionBox = eax->vtable->DynamicCast(5);
004a02a4      
004a02aa      this->vtable->InitOptions();
004a02b4      this->vtable->OnOptionChanged(0);
004a0280  }

004a02c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a02d0  void gmCharacterSettingsUI::Register()

004a02d0  {
004a02da      UIElement::RegisterElementClass(0x10000027, gmCharacterSettingsUI::Create);
004a02d0  }

004a02e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a02f0  void __fastcall gmCharacterSettingsUI::InitOptions(class gmCharacterSettingsUI* this)

004a02f0  {
004a02fa      PlayerOptionPage::AddHeader(this, 0);
004a02ff      uint32_t $S118_1 = $S118;
004a02ff      
004a0308      if (($S118_1 & 1) == 0)
004a0308      {
004a030a          $S118_1 |= 1;
004a0312          $S118 = $S118_1;
004a0320          ID_PlayerOption_ViewCombatTarget = compute_str_hash("ID_PlayerOption_ViewCombatTarget");
004a0308      }
004a0308      
004a0328      if (($S118_1 & 2) == 0)
004a0328      {
004a0332          $S118 = ($S118_1 | 2);
004a0340          ID_PlayerOption_ViewCombatTarget_Help = compute_str_hash("ID_PlayerOption_ViewCombatTarget…");
004a0328      }
004a0328      
004a035f      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, ViewCombatTarget_PlayerOption), ID_PlayerOption_ViewCombatTarget, ID_PlayerOption_ViewCombatTarget_Help);
004a0364      uint32_t $S118_2 = $S118;
004a0364      
004a036d      if (($S118_2 & 4) == 0)
004a036d      {
004a036f          $S118_2 |= 4;
004a0377          $S118 = $S118_2;
004a0385          ID_PlayerOption_SalvageMultiple = compute_str_hash("ID_PlayerOption_SalvageMultiple");
004a036d      }
004a036d      
004a038d      if (($S118_2 & 8) == 0)
004a038d      {
004a0397          $S118 = ($S118_2 | 8);
004a03a5          ID_PlayerOption_SalvageMultiple_Help = compute_str_hash("ID_PlayerOption_SalvageMultiple_…");
004a038d      }
004a038d      
004a03c4      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, SalvageMultiple_PlayerOption), ID_PlayerOption_SalvageMultiple, ID_PlayerOption_SalvageMultiple_Help);
004a03c9      uint32_t $S118_3 = $S118;
004a03c9      
004a03d2      if (($S118_3 & 0x10) == 0)
004a03d2      {
004a03d4          $S118_3 |= 0x10;
004a03dc          $S118 = $S118_3;
004a03ea          ID_PlayerOption_MainPackPreferred = compute_str_hash("ID_PlayerOption_MainPackPreferre…");
004a03d2      }
004a03d2      
004a03f2      if (($S118_3 & 0x20) == 0)
004a03f2      {
004a03fc          $S118 = ($S118_3 | 0x20);
004a040a          ID_PlayerOption_MainPackPreferred_Help = compute_str_hash("ID_PlayerOption_MainPackPreferre…");
004a03f2      }
004a03f2      
004a0429      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, MainPackPreferred_PlayerOption), ID_PlayerOption_MainPackPreferred, ID_PlayerOption_MainPackPreferred_Help);
004a0430      PlayerOptionPage::AddSeperator(this);
004a043d      PlayerOptionPage::AddHeader(this, 0);
004a0442      uint32_t $S118_4 = $S118;
004a0442      
004a044b      if (($S118_4 & 0x40) == 0)
004a044b      {
004a044d          $S118_4 |= 0x40;
004a0455          $S118 = $S118_4;
004a0463          ID_PlayerOption_VividTargetingIndicator = compute_str_hash("ID_PlayerOption_VividTargetingIn…");
004a044b      }
004a044b      
004a046a      if ($S118_4 >= 0)
004a046a      {
004a0477          $S118 = ($S118_4 | 0x80);
004a0485          ID_PlayerOption_VividTargetingIndicator_Help = compute_str_hash("ID_PlayerOption_VividTargetingIn…");
004a046a      }
004a046a      
004a04a5      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, VividTargetingIndicator_PlayerOption), ID_PlayerOption_VividTargetingIndicator, ID_PlayerOption_VividTargetingIndicator_Help);
004a04aa      uint32_t $S118_5 = $S118;
004a04aa      
004a04b6      if (($S118_5 & 0x100) == 0)
004a04b6      {
004a04b8          $S118_5 |= 0x100;
004a04c3          $S118 = $S118_5;
004a04d1          ID_PlayerOption_ShowTooltips = compute_str_hash("ID_PlayerOption_ShowTooltips");
004a04b6      }
004a04b6      
004a04dc      if (($S118_5 & 0x200) == 0)
004a04dc      {
004a04e9          $S118 = ($S118_5 | 0x200);
004a04f7          ID_PlayerOption_ShowTooltips_Help = compute_str_hash("ID_PlayerOption_ShowTooltips_Hel…");
004a04dc      }
004a04dc      
004a0516      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, ShowTooltips_PlayerOption), ID_PlayerOption_ShowTooltips, ID_PlayerOption_ShowTooltips_Help);
004a051b      uint32_t $S118_6 = $S118;
004a051b      
004a0527      if (($S118_6 & 0x400) == 0)
004a0527      {
004a0529          $S118_6 |= 0x400;
004a0534          $S118 = $S118_6;
004a0542          ID_PlayerOption_CoordinatesOnRadar = compute_str_hash("ID_PlayerOption_CoordinatesOnRad…");
004a0527      }
004a0527      
004a054d      if (($S118_6 & 0x800) == 0)
004a054d      {
004a055a          $S118 = ($S118_6 | 0x800);
004a0568          ID_PlayerOption_CoordinatesOnRadar_Help = compute_str_hash("ID_PlayerOption_CoordinatesOnRad…");
004a054d      }
004a054d      
004a0587      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, CoordinatesOnRadar_PlayerOption), ID_PlayerOption_CoordinatesOnRadar, ID_PlayerOption_CoordinatesOnRadar_Help);
004a058c      uint32_t $S118_7 = $S118;
004a058c      
004a0598      if (($S118_7 & 0x1000) == 0)
004a0598      {
004a059a          $S118_7 |= 0x1000;
004a05a5          $S118 = $S118_7;
004a05b3          ID_PlayerOption_SideBySideVitals = compute_str_hash("ID_PlayerOption_SideBySideVitals");
004a0598      }
004a0598      
004a05be      if (($S118_7 & 0x2000) == 0)
004a05be      {
004a05cb          $S118 = ($S118_7 | 0x2000);
004a05d9          ID_PlayerOption_SideBySideVitals_Help = compute_str_hash("ID_PlayerOption_SideBySideVitals…");
004a05be      }
004a05be      
004a05f8      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, SideBySideVitals_PlayerOption), ID_PlayerOption_SideBySideVitals, ID_PlayerOption_SideBySideVitals_Help);
004a05fd      uint32_t $S118_8 = $S118;
004a05fd      
004a0609      if (($S118_8 & 0x4000) == 0)
004a0609      {
004a060b          $S118_8 |= 0x4000;
004a0616          $S118 = $S118_8;
004a0624          ID_PlayerOption_SpellDuration = compute_str_hash("ID_PlayerOption_SpellDuration");
004a0609      }
004a0609      
004a062f      if (($S118_8 & 0x8000) == 0)
004a062f      {
004a063c          $S118 = ($S118_8 | 0x8000);
004a064a          ID_PlayerOption_SpellDuration_Help = compute_str_hash("ID_PlayerOption_SpellDuration_He…");
004a062f      }
004a062f      
004a0669      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, SpellDuration_PlayerOption), ID_PlayerOption_SpellDuration, ID_PlayerOption_SpellDuration_Help);
004a066e      uint32_t $S118_9 = $S118;
004a066e      
004a067a      if (($S118_9 & 0x10000) == 0)
004a067a      {
004a067c          $S118_9 |= 0x10000;
004a0687          $S118 = $S118_9;
004a0695          ID_PlayerOption_DisableMostWeatherEffects = compute_str_hash("ID_PlayerOption_DisableMostWeath…");
004a067a      }
004a067a      
004a06a0      if (($S118_9 & 0x20000) == 0)
004a06a0      {
004a06ad          $S118 = ($S118_9 | 0x20000);
004a06bb          ID_PlayerOption_DisableMostWeatherEffects_Help = compute_str_hash("ID_PlayerOption_DisableMostWeath…");
004a06a0      }
004a06a0      
004a06da      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisableMostWeatherEffects_PlayerOption), ID_PlayerOption_DisableMostWeatherEffects, ID_PlayerOption_DisableMostWeatherEffects_Help);
004a06df      uint32_t $S118_10 = $S118;
004a06df      
004a06eb      if (($S118_10 & 0x40000) == 0)
004a06eb      {
004a06ed          $S118_10 |= 0x40000;
004a06f8          $S118 = $S118_10;
004a0706          ID_PlayerOption_DisableDistanceFog = compute_str_hash("ID_PlayerOption_DisableDistanceF…");
004a06eb      }
004a06eb      
004a0711      if (($S118_10 & 0x80000) == 0)
004a0711      {
004a071e          $S118 = ($S118_10 | 0x80000);
004a072c          ID_PlayerOption_DisableDistanceFog_Help = compute_str_hash("ID_PlayerOption_DisableDistanceF…");
004a0711      }
004a0711      
004a074b      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisableDistanceFog_PlayerOption), ID_PlayerOption_DisableDistanceFog, ID_PlayerOption_DisableDistanceFog_Help);
004a0750      uint32_t $S118_11 = $S118;
004a0750      
004a075c      if (($S118_11 & 0x100000) == 0)
004a075c      {
004a075e          $S118_11 |= 0x100000;
004a0769          $S118 = $S118_11;
004a0777          ID_PlayerOption_PersistentAtDay = compute_str_hash("ID_PlayerOption_PersistentAtDay");
004a075c      }
004a075c      
004a0782      if (($S118_11 & 0x200000) == 0)
004a0782      {
004a078f          $S118 = ($S118_11 | 0x200000);
004a079d          ID_PlayerOption_PersistentAtDay_Help = compute_str_hash("ID_PlayerOption_PersistentAtDay_…");
004a0782      }
004a0782      
004a07bc      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, PersistentAtDay_PlayerOption), ID_PlayerOption_PersistentAtDay, ID_PlayerOption_PersistentAtDay_Help);
004a07c1      uint32_t $S118_12 = $S118;
004a07c1      
004a07cd      if (($S118_12 & 0x400000) == 0)
004a07cd      {
004a07cf          $S118_12 |= 0x400000;
004a07da          $S118 = $S118_12;
004a07e8          ID_PlayerOption_DisableHouseRestrictionEffects = compute_str_hash("ID_PlayerOption_DisableHouseRest…");
004a07cd      }
004a07cd      
004a07f3      if (($S118_12 & "activation type (%s) with '%s' b…") == 0)
004a07f3      {
004a0800          $S118 = ($S118_12 | "activation type (%s) with '%s' b…");
004a080e          ID_PlayerOption_DisableHouseRestrictionEffects_Help = compute_str_hash("ID_PlayerOption_DisableHouseRest…");
004a07f3      }
004a07f3      
004a082d      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisableHouseRestrictionEffects_PlayerOption), ID_PlayerOption_DisableHouseRestrictionEffects, ID_PlayerOption_DisableHouseRestrictionEffects_Help);
004a0832      uint32_t $S118_13 = $S118;
004a0832      
004a083e      if (($S118_13 & 0x1000000) == 0)
004a083e      {
004a0840          $S118_13 |= 0x1000000;
004a084b          $S118 = $S118_13;
004a0859          ID_PlayerOption_UseCraftSuccessDialog = compute_str_hash("ID_PlayerOption_UseCraftSuccessD…");
004a083e      }
004a083e      
004a0864      if (($S118_13 & 0x2000000) == 0)
004a0864      {
004a0871          $S118 = ($S118_13 | 0x2000000);
004a087f          ID_PlayerOption_UseCraftSuccessDialog_Help = compute_str_hash("ID_PlayerOption_UseCraftSuccessD…");
004a0864      }
004a0864      
004a089e      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, UseCraftSuccessDialog_PlayerOption), ID_PlayerOption_UseCraftSuccessDialog, ID_PlayerOption_UseCraftSuccessDialog_Help);
004a08a3      uint32_t $S118_14 = $S118;
004a08a3      
004a08af      if (($S118_14 & 0x4000000) == 0)
004a08af      {
004a08b1          $S118_14 |= 0x4000000;
004a08bc          $S118 = $S118_14;
004a08ca          ID_PlayerOption_ConfirmVolatileRareUse = compute_str_hash("ID_PlayerOption_ConfirmVolatileR…");
004a08af      }
004a08af      
004a08d5      if (($S118_14 & 0x8000000) == 0)
004a08d5      {
004a08e2          $S118 = ($S118_14 | 0x8000000);
004a08f0          ID_PlayerOption_ConfirmVolatileRareUse_Help = compute_str_hash("ID_PlayerOption_ConfirmVolatileR…");
004a08d5      }
004a08d5      
004a090f      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, ConfirmVolatileRareUse_PlayerOption), ID_PlayerOption_ConfirmVolatileRareUse, ID_PlayerOption_ConfirmVolatileRareUse_Help);
004a0914      uint32_t $S118_15 = $S118;
004a0914      
004a0920      if (($S118_15 & 0x10000000) == 0)
004a0920      {
004a0922          $S118_15 |= 0x10000000;
004a092d          $S118 = $S118_15;
004a093b          ID_PlayerOption_DisplayTimeStamps = compute_str_hash("ID_PlayerOption_DisplayTimeStamp…");
004a0920      }
004a0920      
004a0946      if (($S118_15 & 0x20000000) == 0)
004a0946      {
004a0953          $S118 = ($S118_15 | 0x20000000);
004a0961          ID_PlayerOption_DisplayTimeStamps_Help = compute_str_hash("ID_PlayerOption_DisplayTimeStamp…");
004a0946      }
004a0946      
004a0980      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisplayTimeStamps_PlayerOption), ID_PlayerOption_DisplayTimeStamps, ID_PlayerOption_DisplayTimeStamps_Help);
004a0985      uint32_t $S118_16 = $S118;
004a0985      
004a0991      if (($S118_16 & 0x40000000) == 0)
004a0991      {
004a0993          $S118_16 |= 0x40000000;
004a099e          $S118 = $S118_16;
004a09ac          ID_PlayerOption_FilterLanguage = compute_str_hash("ID_PlayerOption_FilterLanguage");
004a0991      }
004a0991      
004a09b3      if ($S118_16 >= 0)
004a09b3      {
004a09c0          $S118 = ($S118_16 | 0x80000000);
004a09ce          ID_PlayerOption_FilterLanguage_Help = compute_str_hash("ID_PlayerOption_FilterLanguage_H…");
004a09b3      }
004a09b3      
004a09ed      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, FilterLanguage_PlayerOption), ID_PlayerOption_FilterLanguage, ID_PlayerOption_FilterLanguage_Help);
004a09f2      uint32_t $S119_1 = $S119;
004a09f2      
004a09fb      if (($S119_1 & 1) == 0)
004a09fb      {
004a09fd          $S119_1 |= 1;
004a0a05          $S119 = $S119_1;
004a0a13          ID_PlayerOption_ShowHelm = compute_str_hash("ID_PlayerOption_ShowHelm");
004a09fb      }
004a09fb      
004a0a1b      if (($S119_1 & 2) == 0)
004a0a1b      {
004a0a25          $S119 = ($S119_1 | 2);
004a0a33          ID_PlayerOption_ShowHelm_Help = compute_str_hash("ID_PlayerOption_ShowHelm_Help");
004a0a1b      }
004a0a1b      
004a0a52      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, ShowHelm_PlayerOption), ID_PlayerOption_ShowHelm, ID_PlayerOption_ShowHelm_Help);
004a0a57      uint32_t $S119_2 = $S119;
004a0a57      
004a0a60      if (($S119_2 & 4) == 0)
004a0a60      {
004a0a62          $S119_2 |= 4;
004a0a6a          $S119 = $S119_2;
004a0a78          ID_PlayerOption_ShowCloak = compute_str_hash("ID_PlayerOption_ShowCloak");
004a0a60      }
004a0a60      
004a0a80      if (($S119_2 & 8) == 0)
004a0a80      {
004a0a8a          $S119 = ($S119_2 | 8);
004a0a98          ID_PlayerOption_ShowCloak_Help = compute_str_hash("ID_PlayerOption_ShowCloak_Help");
004a0a80      }
004a0a80      
004a0ab7      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, ShowCloak_PlayerOption), ID_PlayerOption_ShowCloak, ID_PlayerOption_ShowCloak_Help);
004a0abe      PlayerOptionPage::AddSeperator(this);
004a0acb      PlayerOptionPage::AddHeader(this, 0);
004a0ad0      uint32_t $S119_3 = $S119;
004a0ad0      
004a0ad9      if (($S119_3 & 0x10) == 0)
004a0ad9      {
004a0adb          $S119_3 |= 0x10;
004a0ae3          $S119 = $S119_3;
004a0af1          ID_PlayerOption_IgnoreAllegianceRequests = compute_str_hash(&gmAllegianceUI::`vftable'.RecvNotice_AddSpellShortcut);
004a0ad9      }
004a0ad9      
004a0af9      if (($S119_3 & 0x20) == 0)
004a0af9      {
004a0b03          $S119 = ($S119_3 | 0x20);
004a0b11          ID_PlayerOption_IgnoreAllegianceRequests_Help = compute_str_hash(&gmAllegianceUI::`vftable'.RecvNotice_AddSalvageItem);
004a0af9      }
004a0af9      
004a0b30      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, IgnoreAllegianceRequests_PlayerOption), ID_PlayerOption_IgnoreAllegianceRequests, ID_PlayerOption_IgnoreAllegianceRequests_Help);
004a0b35      uint32_t $S119_4 = $S119;
004a0b35      
004a0b3e      if (($S119_4 & 0x40) == 0)
004a0b3e      {
004a0b40          $S119_4 |= 0x40;
004a0b48          $S119 = $S119_4;
004a0b56          ID_PlayerOption_IgnoreFellowshipRequests = compute_str_hash("ID_PlayerOption_IgnoreFellowship…");
004a0b3e      }
004a0b3e      
004a0b5d      if ($S119_4 >= 0)
004a0b5d      {
004a0b6a          $S119 = ($S119_4 | 0x80);
004a0b78          ID_PlayerOption_IgnoreFellowshipRequests_Help = compute_str_hash("ID_PlayerOption_IgnoreFellowship…");
004a0b5d      }
004a0b5d      
004a0b97      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, IgnoreFellowshipRequests_PlayerOption), ID_PlayerOption_IgnoreFellowshipRequests, ID_PlayerOption_IgnoreFellowshipRequests_Help);
004a0b9c      uint32_t $S119_5 = $S119;
004a0b9c      
004a0ba8      if (($S119_5 & 0x100) == 0)
004a0ba8      {
004a0baa          $S119_5 |= 0x100;
004a0bb5          $S119 = $S119_5;
004a0bc3          ID_PlayerOption_DisplayAllegianceLogonNotifications = compute_str_hash("ID_PlayerOption_DisplayAllegianc…");
004a0ba8      }
004a0ba8      
004a0bce      if (($S119_5 & 0x200) == 0)
004a0bce      {
004a0bdb          $S119 = ($S119_5 | 0x200);
004a0be9          ID_PlayerOption_DisplayAllegianceLogonNotifications_Help = compute_str_hash("ID_PlayerOption_DisplayAllegianc…");
004a0bce      }
004a0bce      
004a0c08      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisplayAllegianceLogonNotifications_PlayerOption), ID_PlayerOption_DisplayAllegianceLogonNotifications, ID_PlayerOption_DisplayAllegianceLogonNotifications_Help);
004a0c0d      uint32_t $S119_6 = $S119;
004a0c0d      
004a0c19      if (($S119_6 & 0x400) == 0)
004a0c19      {
004a0c1b          $S119_6 |= 0x400;
004a0c26          $S119 = $S119_6;
004a0c34          ID_PlayerOption_FellowshipShareXP = compute_str_hash("ID_PlayerOption_FellowshipShareX…");
004a0c19      }
004a0c19      
004a0c3f      if (($S119_6 & 0x800) == 0)
004a0c3f      {
004a0c4c          $S119 = ($S119_6 | 0x800);
004a0c5a          ID_PlayerOption_FellowshipShareXP_Help = compute_str_hash("ID_PlayerOption_FellowshipShareX…");
004a0c3f      }
004a0c3f      
004a0c79      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, FellowshipShareXP_PlayerOption), ID_PlayerOption_FellowshipShareXP, ID_PlayerOption_FellowshipShareXP_Help);
004a0c7e      uint32_t $S119_7 = $S119;
004a0c7e      
004a0c8a      if (($S119_7 & 0x1000) == 0)
004a0c8a      {
004a0c8c          $S119_7 |= 0x1000;
004a0c97          $S119 = $S119_7;
004a0ca5          ID_PlayerOption_FellowshipShareLoot = compute_str_hash("ID_PlayerOption_FellowshipShareL…");
004a0c8a      }
004a0c8a      
004a0cb0      if (($S119_7 & 0x2000) == 0)
004a0cb0      {
004a0cbd          $S119 = ($S119_7 | 0x2000);
004a0ccb          ID_PlayerOption_FellowshipShareLoot_Help = compute_str_hash("ID_PlayerOption_FellowshipShareL…");
004a0cb0      }
004a0cb0      
004a0cea      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, FellowshipShareLoot_PlayerOption), ID_PlayerOption_FellowshipShareLoot, ID_PlayerOption_FellowshipShareLoot_Help);
004a0cef      uint32_t $S119_8 = $S119;
004a0cef      
004a0cfb      if (($S119_8 & 0x4000) == 0)
004a0cfb      {
004a0cfd          $S119_8 |= 0x4000;
004a0d08          $S119 = $S119_8;
004a0d16          ID_PlayerOption_FellowshipAutoAcceptRequests = compute_str_hash("ID_PlayerOption_FellowshipAutoAc…");
004a0cfb      }
004a0cfb      
004a0d21      if (($S119_8 & 0x8000) == 0)
004a0d21      {
004a0d2e          $S119 = ($S119_8 | 0x8000);
004a0d3c          ID_PlayerOption_FellowshipAutoAcceptRequests_Help = compute_str_hash("ID_PlayerOption_FellowshipAutoAc…");
004a0d21      }
004a0d21      
004a0d5b      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, FellowshipAutoAcceptRequests_PlayerOption), ID_PlayerOption_FellowshipAutoAcceptRequests, ID_PlayerOption_FellowshipAutoAcceptRequests_Help);
004a0d62      PlayerOptionPage::AddSeperator(this);
004a0d6f      PlayerOptionPage::AddHeader(this, 0);
004a0d74      uint32_t $S119_9 = $S119;
004a0d74      
004a0d80      if (($S119_9 & 0x10000) == 0)
004a0d80      {
004a0d82          $S119_9 |= 0x10000;
004a0d8d          $S119 = $S119_9;
004a0d9b          ID_PlayerOption_AcceptLootPermits = compute_str_hash("ID_PlayerOption_AcceptLootPermit…");
004a0d80      }
004a0d80      
004a0da6      if (($S119_9 & 0x20000) == 0)
004a0da6      {
004a0db3          $S119 = ($S119_9 | 0x20000);
004a0dc1          ID_PlayerOption_AcceptLootPermits_Help = compute_str_hash("ID_PlayerOption_AcceptLootPermit…");
004a0da6      }
004a0da6      
004a0de0      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, AcceptLootPermits_PlayerOption), ID_PlayerOption_AcceptLootPermits, ID_PlayerOption_AcceptLootPermits_Help);
004a0de5      uint32_t $S119_10 = $S119;
004a0de5      
004a0df1      if (($S119_10 & 0x40000) == 0)
004a0df1      {
004a0df3          $S119_10 |= 0x40000;
004a0dfe          $S119 = $S119_10;
004a0e0c          ID_PlayerOption_UseDeception = compute_str_hash("ID_PlayerOption_UseDeception");
004a0df1      }
004a0df1      
004a0e17      if (($S119_10 & 0x80000) == 0)
004a0e17      {
004a0e24          $S119 = ($S119_10 | 0x80000);
004a0e32          ID_PlayerOption_UseDeception_Help = compute_str_hash("ID_PlayerOption_UseDeception_Hel…");
004a0e17      }
004a0e17      
004a0e51      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, UseDeception_PlayerOption), ID_PlayerOption_UseDeception, ID_PlayerOption_UseDeception_Help);
004a0e56      uint32_t $S119_11 = $S119;
004a0e56      
004a0e62      if (($S119_11 & 0x100000) == 0)
004a0e62      {
004a0e64          $S119_11 |= 0x100000;
004a0e6f          $S119 = $S119_11;
004a0e7d          ID_PlayerOption_AllowGive = compute_str_hash("ID_PlayerOption_AllowGive");
004a0e62      }
004a0e62      
004a0e88      if (($S119_11 & 0x200000) == 0)
004a0e88      {
004a0e95          $S119 = ($S119_11 | 0x200000);
004a0ea3          ID_PlayerOption_AllowGive_Help = compute_str_hash("ID_PlayerOption_AllowGive_Help");
004a0e88      }
004a0e88      
004a0ec2      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, AllowGive_PlayerOption), ID_PlayerOption_AllowGive, ID_PlayerOption_AllowGive_Help);
004a0ec7      uint32_t $S119_12 = $S119;
004a0ec7      
004a0ed3      if (($S119_12 & 0x400000) == 0)
004a0ed3      {
004a0ed5          $S119_12 |= 0x400000;
004a0ee0          $S119 = $S119_12;
004a0eee          ID_PlayerOption_IgnoreTradeRequests = compute_str_hash("ID_PlayerOption_IgnoreTradeReque…");
004a0ed3      }
004a0ed3      
004a0ef9      if (($S119_12 & "activation type (%s) with '%s' b…") == 0)
004a0ef9      {
004a0f06          $S119 = ($S119_12 | "activation type (%s) with '%s' b…");
004a0f14          ID_PlayerOption_IgnoreTradeRequests_Help = compute_str_hash("ID_PlayerOption_IgnoreTradeReque…");
004a0ef9      }
004a0ef9      
004a0f33      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, IgnoreTradeRequests_PlayerOption), ID_PlayerOption_IgnoreTradeRequests, ID_PlayerOption_IgnoreTradeRequests_Help);
004a0f38      uint32_t $S119_13 = $S119;
004a0f38      
004a0f44      if (($S119_13 & 0x1000000) == 0)
004a0f44      {
004a0f46          $S119_13 |= 0x1000000;
004a0f51          $S119 = $S119_13;
004a0f5f          ID_PlayerOption_DragItemOnPlayerOpensSecureTrade = compute_str_hash("ID_PlayerOption_DragItemOnPlayer…");
004a0f44      }
004a0f44      
004a0f6a      if (($S119_13 & 0x2000000) == 0)
004a0f6a      {
004a0f77          $S119 = ($S119_13 | 0x2000000);
004a0f85          ID_PlayerOption_DragItemOnPlayerOpensSecureTrade_Help = compute_str_hash("ID_PlayerOption_DragItemOnPlayer…");
004a0f6a      }
004a0f6a      
004a0fa4      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DragItemOnPlayerOpensSecureTrade_PlayerOption), ID_PlayerOption_DragItemOnPlayerOpensSecureTrade, ID_PlayerOption_DragItemOnPlayerOpensSecureTrade_Help);
004a0fa9      uint32_t $S119_14 = $S119;
004a0fa9      
004a0fb5      if (($S119_14 & 0x4000000) == 0)
004a0fb5      {
004a0fb7          $S119_14 |= 0x4000000;
004a0fc2          $S119 = $S119_14;
004a0fd0          ID_PlayerOption_DisplayDateOfBirth = compute_str_hash("ID_PlayerOption_DisplayDateOfBir…");
004a0fb5      }
004a0fb5      
004a0fdb      if (($S119_14 & 0x8000000) == 0)
004a0fdb      {
004a0fe8          $S119 = ($S119_14 | 0x8000000);
004a0ff6          ID_PlayerOption_DisplayDateOfBirth_Help = compute_str_hash("ID_PlayerOption_DisplayDateOfBir…");
004a0fdb      }
004a0fdb      
004a1015      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisplayDateOfBirth_PlayerOption), ID_PlayerOption_DisplayDateOfBirth, ID_PlayerOption_DisplayDateOfBirth_Help);
004a101a      uint32_t $S119_15 = $S119;
004a101a      
004a1026      if (($S119_15 & 0x10000000) == 0)
004a1026      {
004a1028          $S119_15 |= 0x10000000;
004a1033          $S119 = $S119_15;
004a1041          ID_PlayerOption_DisplayAge = compute_str_hash("ID_PlayerOption_DisplayAge");
004a1026      }
004a1026      
004a104c      if (($S119_15 & 0x20000000) == 0)
004a104c      {
004a1059          $S119 = ($S119_15 | 0x20000000);
004a1067          ID_PlayerOption_DisplayAge_Help = compute_str_hash("ID_PlayerOption_DisplayAge_Help");
004a104c      }
004a104c      
004a1086      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisplayAge_PlayerOption), ID_PlayerOption_DisplayAge, ID_PlayerOption_DisplayAge_Help);
004a108b      uint32_t $S119_16 = $S119;
004a108b      
004a1097      if (($S119_16 & 0x40000000) == 0)
004a1097      {
004a1099          $S119_16 |= 0x40000000;
004a10a4          $S119 = $S119_16;
004a10b2          ID_PlayerOption_DisplayChessRank = compute_str_hash("ID_PlayerOption_DisplayChessRank");
004a1097      }
004a1097      
004a10b9      if ($S119_16 >= 0)
004a10b9      {
004a10c6          $S119 = ($S119_16 | 0x80000000);
004a10d4          ID_PlayerOption_DisplayChessRank_Help = compute_str_hash("ID_PlayerOption_DisplayChessRank…");
004a10b9      }
004a10b9      
004a10f3      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisplayChessRank_PlayerOption), ID_PlayerOption_DisplayChessRank, ID_PlayerOption_DisplayChessRank_Help);
004a10f8      uint32_t $S120_1 = $S120;
004a10f8      
004a1101      if (($S120_1 & 1) == 0)
004a1101      {
004a1103          $S120_1 |= 1;
004a110b          $S120 = $S120_1;
004a1119          ID_PlayerOption_DisplayFishingSkill = compute_str_hash("ID_PlayerOption_DisplayFishingSk…");
004a1101      }
004a1101      
004a1121      if (($S120_1 & 2) == 0)
004a1121      {
004a112b          $S120 = ($S120_1 | 2);
004a1139          ID_PlayerOption_DisplayFishingSkill_Help = compute_str_hash("ID_PlayerOption_DisplayFishingSk…");
004a1121      }
004a1121      
004a1158      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisplayFishingSkill_PlayerOption), ID_PlayerOption_DisplayFishingSkill, ID_PlayerOption_DisplayFishingSkill_Help);
004a115d      uint32_t $S120_2 = $S120;
004a115d      
004a1166      if (($S120_2 & 4) == 0)
004a1166      {
004a1168          $S120_2 |= 4;
004a1170          $S120 = $S120_2;
004a117e          ID_PlayerOption_DisplayNumberDeaths = compute_str_hash("ID_PlayerOption_DisplayNumberDea…");
004a1166      }
004a1166      
004a1186      if (($S120_2 & 8) == 0)
004a1186      {
004a1190          $S120 = ($S120_2 | 8);
004a119e          ID_PlayerOption_DisplayNumberDeaths_Help = compute_str_hash("ID_PlayerOption_DisplayNumberDea…");
004a1186      }
004a1186      
004a11bd      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisplayNumberDeaths_PlayerOption), ID_PlayerOption_DisplayNumberDeaths, ID_PlayerOption_DisplayNumberDeaths_Help);
004a11c2      uint32_t $S120_3 = $S120;
004a11c2      
004a11cb      if (($S120_3 & 0x10) == 0)
004a11cb      {
004a11cd          $S120_3 |= 0x10;
004a11d5          $S120 = $S120_3;
004a11e3          ID_PlayerOption_DisplayNumberCharacterTitles = compute_str_hash("ID_PlayerOption_DisplayNumberCha…");
004a11cb      }
004a11cb      
004a11eb      if (($S120_3 & 0x20) == 0)
004a11eb      {
004a11f5          $S120 = ($S120_3 | 0x20);
004a1203          ID_PlayerOption_DisplayNumberCharacterTitles_Help = compute_str_hash("ID_PlayerOption_DisplayNumberCha…");
004a11eb      }
004a11eb      
004a1222      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, DisplayNumberCharacterTitles_PlayerOption), ID_PlayerOption_DisplayNumberCharacterTitles, ID_PlayerOption_DisplayNumberCharacterTitles_Help);
004a1229      PlayerOptionPage::AddSeperator(this);
004a1236      PlayerOptionPage::AddHeader(this, 0);
004a123b      uint32_t $S120_4 = $S120;
004a123b      
004a1244      if (($S120_4 & 0x40) == 0)
004a1244      {
004a1246          $S120_4 |= 0x40;
004a124e          $S120 = $S120_4;
004a125c          ID_PlayerOption_ToggleRun = compute_str_hash("ID_PlayerOption_ToggleRun");
004a1244      }
004a1244      
004a1263      if ($S120_4 >= 0)
004a1263      {
004a1270          $S120 = ($S120_4 | 0x80);
004a127e          ID_PlayerOption_ToggleRun_Help = compute_str_hash("ID_PlayerOption_ToggleRun_Help");
004a1263      }
004a1263      
004a129d      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, ToggleRun_PlayerOption), ID_PlayerOption_ToggleRun, ID_PlayerOption_ToggleRun_Help);
004a12a2      uint32_t $S120_5 = $S120;
004a12a2      
004a12ae      if (($S120_5 & 0x100) == 0)
004a12ae      {
004a12b0          $S120_5 |= 0x100;
004a12bb          $S120 = $S120_5;
004a12c9          ID_PlayerOption_AdvancedCombatUI = compute_str_hash("ID_PlayerOption_AdvancedCombatUI");
004a12ae      }
004a12ae      
004a12d4      if (($S120_5 & 0x200) == 0)
004a12d4      {
004a12e1          $S120 = ($S120_5 | 0x200);
004a12ef          ID_PlayerOption_AdvancedCombatUI_Help = compute_str_hash("ID_PlayerOption_AdvancedCombatUI…");
004a12d4      }
004a12d4      
004a130e      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, AdvancedCombatUI_PlayerOption), ID_PlayerOption_AdvancedCombatUI, ID_PlayerOption_AdvancedCombatUI_Help);
004a1313      uint32_t $S120_6 = $S120;
004a1313      
004a131f      if (($S120_6 & 0x400) == 0)
004a131f      {
004a1321          $S120_6 |= 0x400;
004a132c          $S120 = $S120_6;
004a133a          ID_PlayerOption_AutoTarget = compute_str_hash("ID_PlayerOption_AutoTarget");
004a131f      }
004a131f      
004a1345      if (($S120_6 & 0x800) == 0)
004a1345      {
004a1352          $S120 = ($S120_6 | 0x800);
004a1360          ID_PlayerOption_AutoTarget_Help = compute_str_hash("ID_PlayerOption_AutoTarget_Help");
004a1345      }
004a1345      
004a137f      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, AutoTarget_PlayerOption), ID_PlayerOption_AutoTarget, ID_PlayerOption_AutoTarget_Help);
004a1384      uint32_t $S120_7 = $S120;
004a1384      
004a1390      if (($S120_7 & 0x1000) == 0)
004a1390      {
004a1392          $S120_7 |= 0x1000;
004a139d          $S120 = $S120_7;
004a13ab          ID_PlayerOption_AutoRepeatAttack = compute_str_hash("ID_PlayerOption_AutoRepeatAttack");
004a1390      }
004a1390      
004a13b6      if (($S120_7 & 0x2000) == 0)
004a13b6      {
004a13c3          $S120 = ($S120_7 | 0x2000);
004a13d1          ID_PlayerOption_AutoRepeatAttack_Help = compute_str_hash("ID_PlayerOption_AutoRepeatAttack…");
004a13b6      }
004a13b6      
004a13f0      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, AutoRepeatAttack_PlayerOption), ID_PlayerOption_AutoRepeatAttack, ID_PlayerOption_AutoRepeatAttack_Help);
004a13f5      uint32_t $S120_8 = $S120;
004a13f5      
004a1401      if (($S120_8 & 0x4000) == 0)
004a1401      {
004a1403          $S120_8 |= 0x4000;
004a140e          $S120 = $S120_8;
004a141c          ID_PlayerOption_UseChargeAttack = compute_str_hash("ID_PlayerOption_UseChargeAttack");
004a1401      }
004a1401      
004a1427      if (($S120_8 & 0x8000) == 0)
004a1427      {
004a1434          $S120 = ($S120_8 | 0x8000);
004a1442          ID_PlayerOption_UseChargeAttack_Help = compute_str_hash("ID_PlayerOption_UseChargeAttack_…");
004a1427      }
004a1427      
004a1461      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, UseChargeAttack_PlayerOption), ID_PlayerOption_UseChargeAttack, ID_PlayerOption_UseChargeAttack_Help);
004a1466      uint32_t $S120_9 = $S120;
004a1466      
004a1472      if (($S120_9 & 0x10000) == 0)
004a1472      {
004a1474          $S120_9 |= 0x10000;
004a147f          $S120 = $S120_9;
004a148d          ID_PlayerOption_LeadMissileTargets = compute_str_hash("ID_PlayerOption_LeadMissileTarge…");
004a1472      }
004a1472      
004a1498      if (($S120_9 & 0x20000) == 0)
004a1498      {
004a14a5          $S120 = ($S120_9 | 0x20000);
004a14b3          ID_PlayerOption_LeadMissileTargets_Help = compute_str_hash("ID_PlayerOption_LeadMissileTarge…");
004a1498      }
004a1498      
004a14d2      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, LeadMissileTargets_PlayerOption), ID_PlayerOption_LeadMissileTargets, ID_PlayerOption_LeadMissileTargets_Help);
004a14d7      uint32_t $S120_10 = $S120;
004a14d7      
004a14e3      if (($S120_10 & 0x40000) == 0)
004a14e3      {
004a14e5          $S120_10 |= 0x40000;
004a14f0          $S120 = $S120_10;
004a14fe          ID_PlayerOption_UseFastMissiles = compute_str_hash("ID_PlayerOption_UseFastMissiles");
004a14e3      }
004a14e3      
004a1509      if (($S120_10 & 0x80000) == 0)
004a1509      {
004a1516          $S120 = ($S120_10 | 0x80000);
004a1524          ID_PlayerOption_UseFastMissiles_Help = compute_str_hash("ID_PlayerOption_UseFastMissiles_…");
004a1509      }
004a1509      
004a1543      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, UseFastMissiles_PlayerOption), ID_PlayerOption_UseFastMissiles, ID_PlayerOption_UseFastMissiles_Help);
004a154a      PlayerOptionPage::AddSeperator(this);
004a1557      PlayerOptionPage::AddHeader(this, 0);
004a155c      uint32_t $S120_11 = $S120;
004a155c      
004a1568      if (($S120_11 & 0x100000) == 0)
004a1568      {
004a156a          $S120_11 |= 0x100000;
004a1575          $S120 = $S120_11;
004a1583          ID_PlayerOption_StayInChatMode = compute_str_hash("ID_PlayerOption_StayInChatMode");
004a1568      }
004a1568      
004a158e      if (($S120_11 & 0x200000) == 0)
004a158e      {
004a159b          $S120 = ($S120_11 | 0x200000);
004a15a9          ID_PlayerOption_StayInChatMode_Help = compute_str_hash("ID_PlayerOption_StayInChatMode_H…");
004a158e      }
004a158e      
004a15c8      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, StayInChatMode_PlayerOption), ID_PlayerOption_StayInChatMode, ID_PlayerOption_StayInChatMode_Help);
004a15cd      uint32_t $S120_12 = $S120;
004a15cd      
004a15d9      if (($S120_12 & 0x400000) == 0)
004a15d9      {
004a15db          $S120_12 |= 0x400000;
004a15e6          $S120 = $S120_12;
004a15f4          ID_PlayerOption_HearAllegianceChat = compute_str_hash("ID_PlayerOption_HearAllegianceCh…");
004a15d9      }
004a15d9      
004a15ff      if (($S120_12 & "activation type (%s) with '%s' b…") == 0)
004a15ff      {
004a160c          $S120 = ($S120_12 | "activation type (%s) with '%s' b…");
004a161a          ID_PlayerOption_HearAllegianceChat_Help = compute_str_hash("ID_PlayerOption_HearAllegianceCh…");
004a15ff      }
004a15ff      
004a1639      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, HearAllegianceChat_PlayerOption), ID_PlayerOption_HearAllegianceChat, ID_PlayerOption_HearAllegianceChat_Help);
004a163e      uint32_t $S120_13 = $S120;
004a163e      
004a164a      if (($S120_13 & 0x1000000) == 0)
004a164a      {
004a164c          $S120_13 |= 0x1000000;
004a1657          $S120 = $S120_13;
004a1665          ID_PlayerOption_HearGeneralChat = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_UserPreferenceChanged_Menu);
004a164a      }
004a164a      
004a1670      if (($S120_13 & 0x2000000) == 0)
004a1670      {
004a167d          $S120 = ($S120_13 | 0x2000000);
004a168b          ID_PlayerOption_HearGeneralChat_Help = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_SetPanelVisibility);
004a1670      }
004a1670      
004a16aa      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, HearGeneralChat_PlayerOption), ID_PlayerOption_HearGeneralChat, ID_PlayerOption_HearGeneralChat_Help);
004a16af      uint32_t $S120_14 = $S120;
004a16af      
004a16bb      if (($S120_14 & 0x4000000) == 0)
004a16bb      {
004a16bd          $S120_14 |= 0x4000000;
004a16c8          $S120 = $S120_14;
004a16d6          ID_PlayerOption_HearTradeChat = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_PlayerDescReceived);
004a16bb      }
004a16bb      
004a16e1      if (($S120_14 & 0x8000000) == 0)
004a16e1      {
004a16ee          $S120 = ($S120_14 | 0x8000000);
004a16fc          ID_PlayerOption_HearTradeChat_Help = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_EndCharacterSession);
004a16e1      }
004a16e1      
004a171b      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, HearTradeChat_PlayerOption), ID_PlayerOption_HearTradeChat, ID_PlayerOption_HearTradeChat_Help);
004a1720      uint32_t $S120_15 = $S120;
004a1720      
004a172c      if (($S120_15 & 0x10000000) == 0)
004a172c      {
004a172e          $S120_15 |= 0x10000000;
004a1739          $S120 = $S120_15;
004a1747          ID_PlayerOption_HearLFGChat = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_RemoveItemFromTrade);
004a172c      }
004a172c      
004a1752      if (($S120_15 & 0x20000000) == 0)
004a1752      {
004a175f          $S120 = ($S120_15 | 0x20000000);
004a176d          ID_PlayerOption_HearLFGChat_Help = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_UpdateContractTrackerTable);
004a1752      }
004a1752      
004a178c      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, HearLFGChat_PlayerOption), ID_PlayerOption_HearLFGChat, ID_PlayerOption_HearLFGChat_Help);
004a1791      uint32_t $S120_16 = $S120;
004a1791      
004a179d      if (($S120_16 & 0x40000000) == 0)
004a179d      {
004a179f          $S120_16 |= 0x40000000;
004a17aa          $S120 = $S120_16;
004a17b8          ID_PlayerOption_HearRoleplayChat = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_AddCharacterTitle);
004a179d      }
004a179d      
004a17bf      if ($S120_16 >= 0)
004a17bf      {
004a17cc          $S120 = ($S120_16 | 0x80000000);
004a17da          ID_PlayerOption_HearRoleplayChat_Help = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_PrevSpellSelection);
004a17bf      }
004a17bf      
004a17f9      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, HearRoleplayChat_PlayerOption), ID_PlayerOption_HearRoleplayChat, ID_PlayerOption_HearRoleplayChat_Help);
004a17fe      uint32_t $S121_1 = $S121;
004a17fe      
004a1808      if (($S121_1 & 1) == 0)
004a1808      {
004a180a          $S121_1 |= 1;
004a1812          $S121 = $S121_1;
004a1820          ID_PlayerOption_HearSocietyChat = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_CastQuickslotSpell);
004a1808      }
004a1808      
004a1828      if (($S121_1 & 2) == 0)
004a1828      {
004a1832          $S121 = ($S121_1 | 2);
004a1840          ID_PlayerOption_HearSocietyChat_Help = compute_str_hash(&gmCharacterSettingsUI::`vftable'.RecvNotice_EndPendingInPlayer);
004a1828      }
004a1828      
004a185f      PlayerOptionPage::SetToggleLabel(this, PlayerOptionPage::AddToggleOption(this, HearSocietyChat_PlayerOption), ID_PlayerOption_HearSocietyChat, ID_PlayerOption_HearSocietyChat_Help);
004a1868      /* tailcall */
004a1868      return PlayerOptionPage::AddSeperator(this);
004a02f0  }

004a186d                                         90 90 90                                                               ...

004a1870  void __thiscall gmMapUI::RecvNotice_UpdateHouseData(class gmMapUI* this, class HouseData const* arg2)

004a1870  {
004a1878      if (arg2->m_type == 4)
004a1878      {
004a187a          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xa] = nullptr;
004a1881          return;
004a1878      }
004a1878      
004a188a      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xa] = arg2->m_pos.objcell_id;
004a1894      /* tailcall */
004a1894      return Frame::operator=(&this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xb], &arg2->m_pos.frame.qw);
004a1870  }

004a1899                                                                             90 90 90 90 90 90 90                           .......

004a18a0  void __fastcall gmMapUI::RecvNotice_FailedHouseTransaction(class gmMapUI* this, uint32_t arg2)

004a18a0  {
004a18a0      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xa] = nullptr;
004a18a0  }

004a18aa                                90 90 90 90 90 90                                                            ......

004a18b0  uint8_t __thiscall gmMapUI::PlaceMarkerOnMap(class gmMapUI* this, class UIElement* arg2, double arg3, double arg4)

004a18b0  {
004a18ba      if (arg2 == 0)
004a18ba      {
004a18bc          int32_t eax;
004a18bc          eax = 0;
004a18c2          return 0;
004a18ba      }
004a18ba      
004a18c5      int32_t m_x0 = this->m_boxMapMarkerArea.m_x0;
004a18cc      this->m_boxMapMarkerArea;
004a18d5      this->m_boxMapMarkerArea;
004a18df      int32_t m_y0 = this->m_boxMapMarkerArea.m_y0;
004a18fb      int32_t eax_2;
004a18fb      int32_t edx_1;
004a18fb      edx_1 = HIGHD(((int64_t)UIRegion::GetWidth(arg2)));
004a18fb      eax_2 = LOWD(((int64_t)UIRegion::GetWidth(arg2)));
004a1936      int32_t edi_3 = ((-(((eax_2 - edx_1) >> 1)) - _ftol2()) + m_x0);
004a1947      int32_t eax_8;
004a1947      int32_t edx_2;
004a1947      edx_2 = HIGHD(((int64_t)UIRegion::GetHeight(arg2)));
004a1947      eax_8 = LOWD(((int64_t)UIRegion::GetHeight(arg2)));
004a1976      arg2->vtable->MoveTo(edi_3, ((-(((eax_8 - edx_2) >> 1)) - _ftol2()) + m_y0));
004a1985      arg2->vtable->SetVisible(1);
004a1991      int32_t eax_13;
004a1991      eax_13 = 1;
004a1997      return 1;
004a18b0  }

004a199a                                                                                90 90 90 90 90 90                            ......

004a19a0  uint32_t LandDefs::lcoord_to_gid(int32_t arg1, int32_t arg2) __pure

004a19a0  {
004a19bd      if ((arg1 >= 0 && (arg2 >= 0 && (arg1 < 0x7f8 && arg2 < 0x7f8))))
004a19df          return ((((arg2 & 7) + ((arg1 & 7) << 3)) + 1) | ((((arg1 & 0xfffffff8) << 5) | (arg2 >> 3)) << 0x10));
004a19df      
004a19e2      return 0;
004a19a0  }

004a19e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a19f0  void __thiscall gmMapUI::gmMapUI(class gmMapUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004a19f0  {
004a19ff      UIElement_Field::UIElement_Field(this, arg2, arg3);
004a1a04      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a1a10      this->vtable = &gmMapUI::`vftable';
004a1a16      this->vtable = &gmMapUI::`vftable';
004a1a20      __builtin_memset(&this->m_pDateTimeText, 0, 0x2c);
004a1a68      this->m_HousePosition.vtable = 0x796910;
004a1a72      this->m_HousePosition.objcell_id = 0;
004a1a62      this->m_HousePosition.frame.qw = 0x3f800000;
004a1a62      this->m_HousePosition.frame.qx = 0f;
004a1a62      this->m_HousePosition.frame.qy = 0f;
004a1a62      this->m_HousePosition.frame.qz = 0f;
004a1a62      this->m_HousePosition.frame.m_fOrigin.x = 0;
004a1a62      this->m_HousePosition.frame.m_fOrigin.y = 0f;
004a1a62      this->m_HousePosition.frame.m_fOrigin.z = 0f;
004a1a90      Frame::cache(&this->m_HousePosition.frame);
004a19f0  }

004a1a9b                                                                                   90 90 90 90 90                             .....

004a1aa0  class UIElement* __thiscall gmMapUI::DynamicCast(class gmMapUI* this, uint32_t arg2) __pure

004a1aa0  {
004a1aac      if (arg2 == 0x10000026)
004a1ab9          return this;
004a1ab9      
004a1ab3      int32_t edx_1;
004a1ab3      edx_1 = arg2 != 3;
004a1ab7      return (this & (edx_1 - 1));
004a1aa0  }

004a1abc                                                                                      90 90 90 90                              ....

004a1ac0  uint32_t gmMapUI::GetUIElementType(class gmMapUI const* this @ ecx) __pure

004a1ac0  {
004a1ac5      return 0x10000026;
004a1ac0  }

004a1ac6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a1ad0  void __fastcall gmMapUI::~gmMapUI(class gmMapUI* this)

004a1ad0  {
004a1add      this->vtable = &gmMapUI::`vftable';
004a1ad7      this->vtable = &gmMapUI::`vftable';
004a1ae9      __builtin_memset(&this->m_pDateTimeText, 0, 0x14);
004a1b07      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004a1b07      
004a1b0e      if (eax != 0)
004a1b10          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004a1b10      
004a1b18      this->m_HousePosition.vtable = 0x79285c;
004a1ad7      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a1b2a      NoticeHandler::~NoticeHandler(&this->vtable);
004a1b34      /* tailcall */
004a1b34      return UIElement_Field::~UIElement_Field(this);
004a1ad0  }

004a1b39                                                                             90 90 90 90 90 90 90                           .......

004a1b40  class UIElement* gmMapUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a1b40  {
004a1b45      void* eax = operator new(0x670);
004a1b45      
004a1b4f      if (eax == 0)
004a1b65          return 0;
004a1b65      
004a1b62      return gmMapUI::gmMapUI(eax, arg1, arg2);
004a1b40  }

004a1b66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a1b70  void* __thiscall gmMapUI::`scalar deleting destructor'(class gmMapUI* this, uint32_t arg2)

004a1b70  {
004a1b73      gmMapUI::~gmMapUI(this);
004a1b73      
004a1b7d      if ((arg2 & 1) != 0)
004a1b80          operator delete(this);
004a1b80      
004a1b8b      return this;
004a1b70  }

004a1b8e                                            90 90                                                                ..

004a1b90  void gmMapUI::Register()

004a1b90  {
004a1b9a      UIElement::RegisterElementClass(0x10000026, gmMapUI::Create);
004a1b90  }

004a1ba3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a1bb0  void __stdcall gmMapUI::AddMapNote(class gmMapUI* this @ ecx, class UIElement* arg2, uint32_t arg3, class LayoutDesc const* arg4, struct gmMapUI::LocationRolloverInfo const* arg5)

004a1bb0  {
004a1bcf      class UIElement* eax_1 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance, arg2, arg4, arg3);
004a1bcf      
004a1bd8      if (eax_1 != 0)
004a1bd8      {
004a1bde          eax_1->vtable->MoveTo(arg5->X, arg5->Y);
004a1bfa          eax_1->vtable->ResizeTo(arg5->Width, arg5->Height);
004a1c07          void var_90;
004a1c07          StringInfo::StringInfo(&var_90);
004a1c14          class PStringBase<unsigned short> var_94;
004a1c14          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, arg5->Name);
004a1c24          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004a1c2d          int32_t* esi_3 = (var_94 - 0x14);
004a1c2d          
004a1c40          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004a1c48              **(uint32_t**)esi_3(1);
004a1c48          
004a1c51          UIElement::SetTooltip(eax_1, &var_90);
004a1c5a          StringInfo::~StringInfo(&var_90);
004a1bd8      }
004a1bb0  }

004a1c6a                                90 90 90 90 90 90                                                            ......

004a1c70  void __fastcall gmMapUI::PostInit(class gmMapUI* this)

004a1c70  {
004a1c77      UIElement::PostInit(this);
004a1c83      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100001eb);
004a1c8a      class UIElement_Text* eax_1;
004a1c8a      
004a1c8a      if (eax == 0)
004a1c9a          eax_1 = nullptr;
004a1c8a      else
004a1c92          eax_1 = eax->vtable->DynamicCast(0xc);
004a1c92      
004a1ca3      this->m_pDateTimeText = eax_1;
004a1ca9      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x100001ef);
004a1cb0      class UIElement_Text* eax_3;
004a1cb0      
004a1cb0      if (eax_2 == 0)
004a1cc0          eax_3 = nullptr;
004a1cb0      else
004a1cb8          eax_3 = eax_2->vtable->DynamicCast(0xc);
004a1cb8      
004a1cc9      this->m_pCoordinateText = eax_3;
004a1cdb      this->m_pPlayerLocationIcon = UIElement::GetChildRecursive(this, 0x100001ed);
004a1ced      this->m_pHouseLocationIcon = UIElement::GetChildRecursive(this, 0x100001ee);
004a1cf3      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x100001ec);
004a1cfa      this->m_pMap = eax_6;
004a1cfa      
004a1d00      if (eax_6 != 0)
004a1d00      {
004a1d13          int32_t var_14;
004a1d13          UIElement::GetAttribute_Int(eax_6, 0x1000004e, &var_14);
004a1d2c          this->m_boxMapMarkerArea.m_x0 = var_14;
004a1d32          UIElement::GetAttribute_Int(this->m_pMap, 0x1000004f, &var_14);
004a1d40          this->m_boxMapMarkerArea.m_x1 = var_14;
004a1d51          UIElement::GetAttribute_Int(this->m_pMap, 0x10000050, &var_14);
004a1d6a          this->m_boxMapMarkerArea.m_y0 = var_14;
004a1d70          UIElement::GetAttribute_Int(this->m_pMap, 0x10000051, &var_14);
004a1d86          this->m_boxMapMarkerArea.m_y1 = var_14;
004a1d8c          uint32_t var_c;
004a1d8c          UIElement::GetAttribute_Enum(this->m_pMap, 0x47, &var_c);
004a1d9c          uint32_t id = INVALID_DID.id;
004a1da8          UIElement::GetAttribute_DataID(this->m_pMap, 0x48, &id);
004a1dbe          void var_8;
004a1dbe          class DBObj* eax_10 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0x23));
004a1dbe          
004a1dca          if (eax_10 != 0)
004a1dca          {
004a1dcd              struct gmMapUI::LocationRolloverInfo* edi_1 = &s_rgLocations;
004a1dd2              int32_t i_1 = 0x35;
004a1df9              int32_t i;
004a1df9              
004a1df9              do
004a1df9              {
004a1df0                  gmMapUI::AddMapNote(this, this->m_pMap, var_c, eax_10, edi_1);
004a1df5                  edi_1 = &edi_1[1];
004a1df8                  i = i_1;
004a1df8                  i_1 -= 1;
004a1df9              } while (i != 1);
004a1dfb              eax_10->vtable->Release();
004a1dca          }
004a1d00      }
004a1d00      
004a1e04      class GlobalEventHandler* eax_12 = GlobalEventHandler::GetGlobalEventHandler();
004a1e0b      eax_12->vtable->RegisterNoticeHandler(0x4dd225, &this->vtable);
004a1e1e      eax_12->vtable->RegisterNoticeHandler(0x4dd226, &this->vtable);
004a1c70  }

004a1dd9                                                                             8d a4 24 00 00 00 00                           ..$....
004a1e31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004a1e40  void __fastcall PStringBase<unsigned short>::PStringBase<unsigned short>(class PStringBase<unsigned short>* this, enum _WidthConvert arg2, class PStringBase<char> const* arg3)

004a1e40  {
004a1e40      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004a1e46      class PSRefBufferCharData<unsigned short>** this_1 = this;
004a1e4f      *(uint32_t*)this_1 = PStringBase<unsigned short>::s_NullBuffer_1;
004a1e51      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
004a1e67      class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<char>::to_wpstring(arg3, &arg3, 0)->m_charbuffer;
004a1e69      int32_t ecx_3 = m_charbuffer->m_data[0x7ffffffffffffffe];
004a1e69      
004a1e6f      if (ecx_3 != 1)
004a1e76          PStringBase<unsigned short>::append_n_chars(this_1, m_charbuffer, (ecx_3 - 1));
004a1e76      
004a1e7f      void* __offset(PStringBase<char>, -0x14) edi_1 = &arg3[-5];
004a1e7f      
004a1e92      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
004a1e9a          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
004a1e40  }

004a1ea3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a1eb0  uint8_t __fastcall gmMapUI::Update(class gmMapUI* this)

004a1eb0  {
004a1eb0      int32_t ebp;
004a1eb0      int32_t var_4 = ebp;
004a1ec2      int32_t ebx;
004a1ec2      int32_t var_a4 = ebx;
004a1ec9      int32_t* var_a8 = &var_4;
004a1eca      int32_t __saved_esi_1;
004a1eca      int32_t __saved_esi = __saved_esi_1;
004a1ecd      class UIElement_Text* m_pDateTimeText = this->m_pDateTimeText;
004a1ed3      this->m_nextUpdate = ((double)(((long double)Timer::cur_time) + ((long double)5.0)));
004a1edb      int32_t __saved_edi_1;
004a1edb      int32_t __saved_edi = __saved_edi_1;
004a1edc      double var_c0;
004a1edc      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2;
004a1edc      class PStringBase<unsigned short> var_98;
004a1edc      int32_t __return;
004a1edc      
004a1edc      if (m_pDateTimeText != 0)
004a1edc      {
004a1ef9          int32_t var_50;
004a1ef9          __builtin_strncpy(&var_50, "Date: ", 7);
004a1f12          void s_1;
004a1f12          int16_t* edi = __builtin_memset(&s_1, 0, 0x38);
004a1f1b          *(uint16_t*)edi = 0;
004a1f1b          edi[1] = 0;
004a1f28          int32_t var_74;
004a1f28          __builtin_strncpy(&var_74, "Time: ", 7);
004a1f3b          void s;
004a1f3b          char* edi_3 = __builtin_memset(&s, 0, 0x1c);
004a1f3d          class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
004a1f45          *(uint8_t*)edi_3 = 0;
004a1f46          char var_6e;
004a1f46          char var_4a;
004a1f46          
004a1f46          if (GameTime::current_game_time_1 == 0)
004a1f46          {
004a1f5e              var_4a = 0x20;
004a1f63              var_6e = 0x20;
004a1f46          }
004a1f46          else
004a1f52              GameTime::GetDateTimeString(GameTime::current_game_time_1, &var_4a, &var_6e);
004a1f68          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004a1f6d          PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
004a1f75          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004a1f7f          int32_t* var_b4_3 = &var_74;
004a1f84          int32_t* var_b8_2 = &var_50;
004a1f89          char const* const var_bc_1 = "%s\n%s";
004a1f8e          var_c0 = &PStringBase<char>::s_NullBuffer_2;
004a1f9b          class PSRefBufferCharData<char>** var_b4_4 = &PStringBase<char>::s_NullBuffer_2;
004a1f9c          int32_t var_b8_3 = 0;
004a1fa2          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, PStringBase<char>::sprintf(var_c0, "%s\n%s"), nullptr);
004a1fb7          class PSRefBufferCharData<unsigned short>* m_charbuffer = UIElement_Text::GetText(this->m_pDateTimeText, &__return)->m_charbuffer;
004a1fb9          class PStringBase<unsigned short> ecx_2 = var_98;
004a1fb9          
004a1fc3          if (m_charbuffer->m_data[0x7ffffffffffffffe] == *(uint32_t*)(ecx_2 - 4))
004a1fc3          {
004a1fc9              int32_t edx_3 = *(int32_t*)((char*)m_charbuffer + -8);
004a1fcc              int32_t edi_5 = *(uint32_t*)(ecx_2 - 8);
004a1fcc              
004a1fdb              if (((edx_3 == edi_5 || edx_3 == 0xffffffff) || edi_5 == 0xffffffff))
004a1fee                  ebx = wcscmp(m_charbuffer, ecx_2) != 0;
004a1fdb              else
004a1fdd                  ebx = 1;
004a1fc3          }
004a1fc3          else
004a1fc5              ebx = 1;
004a1fc5          
004a1ffb          int32_t* edi_7 = (__return - 0x14);
004a1ffb          
004a200a          if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
004a200a          {
004a200e              int32_t var_b4_8 = 1;
004a2012              **(uint32_t**)edi_7(1);
004a200a          }
004a200a          
004a2016          if (ebx != 0)
004a2023              UIElement_Text::SetText(this->m_pDateTimeText, &var_98);
004a2023          
004a202c          int32_t* edi_9 = (var_98 - 0x14);
004a202c          
004a203b          if ((InterlockedDecrement(&edi_9[1]) == 0 && edi_9 != 0))
004a203b          {
004a203f              int32_t var_b4_11 = 1;
004a2043              **(uint32_t**)edi_9(1);
004a203b          }
004a203b          
004a2049          void* __offset(PSRefBufferCharData<char>, -0x14) edi_11 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
004a2049          
004a2058          if ((InterlockedDecrement(((char*)edi_11 + 4)) == 0 && edi_11 != 0))
004a2058          {
004a205c              int32_t var_b4_13 = 1;
004a2060              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_11) + -0x14)(1);
004a2058          }
004a1edc      }
004a1edc      
004a2078      if ((this->m_pCoordinateText != 0 && this->m_pPlayerLocationIcon != 0))
004a2078      {
004a207e          class CPlayerSystem* eax_10 = CPlayerSystem::GetPlayerSystem();
004a207e          
004a2087          if (eax_10 == 0)
004a2087          {
004a2089              eax_10 = 0;
004a2091              *(uint32_t*)var_a8;
004a2092              return 0;
004a2087          }
004a2087          
004a209c          if (CPlayerSystem::IsOutside(eax_10) != 0)
004a209c          {
004a20e3              int32_t __return_2 = 0;
004a20eb              int32_t var_84 = 0;
004a20f3              var_98 = 0;
004a20fb              int32_t var_94_1 = 0;
004a2103              CPlayerSystem::InqPlayerCoords(eax_10, &__return_2, &var_98);
004a2108              long double x87_r7_2 = ((long double)__return_2);
004a210c              long double temp0_1 = ((long double)0.0);
004a210c              (x87_r7_2 - temp0_1);
004a2112              int32_t eax_12;
004a2112              eax_12 = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004a2114              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004a2117              void (__thiscall** const edx_8)(class gmNoticeHandler* this);
004a2117              
004a2117              if (p_1)
004a2117              {
004a2120                  long double x87_r7_3 = ((long double)__return_2);
004a2124                  edx_8 = &gmJournalUI::`vftable'.RecvNotice_LastSpellTab;
004a2129                  long double temp1_1 = ((long double)0.0);
004a2129                  (x87_r7_3 - temp1_1);
004a212f                  eax_12 = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004a212f                  
004a2134                  if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) != 0)
004a2136                      edx_8 = &data_794320;
004a2117              }
004a2117              else
004a2119                  edx_8 = &gmJournalUI::`vftable'.RecvNotice_NextSpellSelection;
004a2119              
004a213b              long double x87_r7_4 = ((long double)*(uint64_t*)((char*)var_98 + 0));
004a213f              long double temp2_1 = ((long double)0.0);
004a213f              (x87_r7_4 - temp2_1);
004a2145              eax_12 = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0))));
004a2147              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
004a214a              void (__thiscall** const ecx_14)(class gmNoticeHandler* this);
004a214a              
004a214a              if (p_2)
004a214a              {
004a2153                  long double x87_r7_5 = ((long double)*(uint64_t*)((char*)var_98 + 0));
004a2157                  ecx_14 = &gmJournalUI::`vftable'.RecvNotice_FirstSpellTab;
004a215c                  long double temp3_1 = ((long double)0.0);
004a215c                  (x87_r7_5 - temp3_1);
004a2162                  eax_12 = ((((x87_r7_5 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004a2162                  
004a2167                  if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) != 0)
004a2169                      ecx_14 = &data_794320;
004a214a              }
004a214a              else
004a214c                  ecx_14 = &gmJournalUI::`vftable'.RecvNotice_LastSpellSelection;
004a214c              
004a216e              long double x87_r7_6 = ((long double)__return_2);
004a2172              long double temp4_1 = ((long double)0.0);
004a2172              (x87_r7_6 - temp4_1);
004a2178              eax_12 = ((((x87_r7_6 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp4_1) ? 1 : 0) << 0xe) | 0))));
004a217d              int32_t var_8c;
004a217d              
004a217d              if ((*(uint8_t*)((char*)eax_12)[1] & 1) != 0)
004a2197                  __return = ((double)-(((long double)__return_2)));
004a217d              else
004a217d              {
004a2183                  int32_t edi_13 = var_84;
004a2187                  __return = __return_2;
004a218b                  var_8c = edi_13;
004a217d              }
004a217d              
004a219b              long double x87_r7_9 = ((long double)*(uint64_t*)((char*)var_98 + 0));
004a219f              long double temp5_1 = ((long double)0.0);
004a219f              (x87_r7_9 - temp5_1);
004a21a5              eax_12 = ((((x87_r7_9 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp5_1) ? 1 : 0) << 0xe) | 0))));
004a21aa              double var_80;
004a21aa              
004a21aa              if ((*(uint8_t*)((char*)eax_12)[1] & 1) != 0)
004a21c4                  var_80 = ((double)-(((long double)*(uint64_t*)((char*)var_98 + 0))));
004a21aa              else
004a21aa              {
004a21b4                  var_80 = var_98;
004a21b8                  *(uint32_t*)((char*)var_80)[4] = var_94_1;
004a21aa              }
004a21aa              
004a21cc              void (__thiscall** const var_b4_18)(class gmNoticeHandler* this) = edx_8;
004a21d1              int32_t var_b8_6 = var_8c;
004a21d6              int32_t __return_1 = __return;
004a21d7              var_c0 = ecx_14;
004a21dc              int32_t var_c4_1 = *(uint32_t*)((char*)var_80)[4];
004a21dd              int32_t var_c8_1 = var_80;
004a21de              void (__thiscall** const var_cc_1)(class gmNoticeHandler* this, uint32_t) = &gmJournalUI::`vftable'.RecvNotice_StopViewingObject;
004a21e7              int32_t var_d0_1 = 0;
004a21ea              PStringBase<unsigned short>::PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2, Formatted, &gmJournalUI::`vftable'.RecvNotice_StopViewingObject);
004a2212              ebx = PStringBase<unsigned short>::operator!=(UIElement_Text::GetText(this->m_pCoordinateText, &__return), &PStringBase<char>::s_NullBuffer_2);
004a2214              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004a2214              
004a221b              if (ebx != 0)
004a2228                  UIElement_Text::SetText(this->m_pCoordinateText, &PStringBase<char>::s_NullBuffer_2);
004a2228              
004a2239              int32_t var_b4_21 = var_94_1;
004a2245              int32_t var_bc_2 = var_84;
004a2246              var_c0 = __return_2;
004a224a              gmMapUI::PlaceMarkerOnMap(this, this->m_pPlayerLocationIcon, var_c0, var_98);
004a2253              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2);
004a209c          }
004a209c          else
004a209c          {
004a209e              int32_t var_b4_14 = 0x794320;
004a20a7              PStringBase<unsigned short>::PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2, &data_794320);
004a20b7              UIElement_Text::SetText(this->m_pCoordinateText, &PStringBase<char>::s_NullBuffer_2);
004a20c0              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2);
004a20cd              int32_t var_b4_16 = 0;
004a20c5              this->m_pPlayerLocationIcon->vtable->SetVisible(0);
004a209c          }
004a2078      }
004a2078      
004a2260      class UIElement* eax_20;
004a2260      
004a2260      if (this->m_pHouseLocationIcon != 0)
004a2260      {
004a2275          if (Position::IsValid(&this->m_HousePosition) == 0)
004a2275          {
004a230d              int32_t var_b4_23 = 0;
004a2305              this->m_pHouseLocationIcon->vtable->SetVisible(0);
004a2275          }
004a2275          else
004a2275          {
004a227f              class PStringBase<unsigned short>* var_b4_22 = &var_98;
004a2287              class PSRefBufferCharData<char>** var_b8_9 = &PStringBase<char>::s_NullBuffer_2;
004a228a              PStringBase<char>::s_NullBuffer_2 = 0xffffffff;
004a228e              var_98 = 0xffffffff;
004a2297              uint32_t var_bc_3 = Position::get_outside_cell_id(&this->m_HousePosition);
004a2298              LandDefs::gid_to_lcoord();
004a229d              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004a229d              
004a22a6              if (PStringBase<char>::s_NullBuffer_3 != 0xffffffff)
004a22a6              {
004a22a8                  eax_20 = var_98;
004a22a8                  
004a22ae                  if (eax_20 != 0xffffffff)
004a22ae                  {
004a22b0                      class UIElement* m_pHouseLocationIcon = this->m_pHouseLocationIcon;
004a22bb                      __return = ((char*)eax_20 - 0x400);
004a22cc                      long double x87_r7_13 = (((long double)__return) * ((long double)0.10000000000000001));
004a22d2                      __return = &PStringBase<char>::s_NullBuffer_3[-0x40];
004a22de                      var_b8_9 = ((double)(x87_r7_13 + ((long double)0.5)));
004a22f6                      gmMapUI::PlaceMarkerOnMap(this, m_pHouseLocationIcon, ((double)((((long double)__return) * ((long double)0.10000000000000001)) + ((long double)0.5))), var_b8_9);
004a22fb                      int32_t eax_22;
004a22fb                      eax_22 = 1;
004a2303                      *(uint32_t*)var_a8;
004a2304                      return 1;
004a22ae                  }
004a22a6              }
004a2275          }
004a2260      }
004a2260      
004a2315      eax_20 = 1;
004a231c      *(uint32_t*)var_a8;
004a231d      return 1;
004a1eb0  }

004a231e                                                                                            90 90                                ..

004a2320  void __thiscall gmMapUI::ListenToGlobalMessage(class gmMapUI* this, uint32_t arg2, int32_t arg3)

004a2320  {
004a2325      if (arg2 == 3)
004a2325      {
004a2327          long double x87_r7_1 = ((long double)Timer::cur_time);
004a232d          long double temp1_1 = ((long double)this->m_nextUpdate);
004a232d          (x87_r7_1 - temp1_1);
004a232d          
004a2338          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004a233a              gmMapUI::Update(this);
004a2325      }
004a2320  }

004a2342        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004a2350  enum UIElementMessageListenResult __thiscall gmMapUI::ListenToElementMessage(class gmMapUI* this, struct UIElementMessageInfo const* arg2)

004a2350  {
004a2353      int32_t __saved_ebx_2;
004a2353      int32_t __saved_ebx = __saved_ebx_2;
004a2354      struct UIElementMessageInfo* ebx = arg2;
004a2358      uint32_t idMessage = ebx->idMessage;
004a235e      int32_t __saved_ebp_4;
004a235e      int32_t __saved_ebp_1 = __saved_ebp_4;
004a235f      int32_t __saved_esi_1;
004a235f      int32_t __saved_esi = __saved_esi_1;
004a2360      int32_t __saved_edi_2;
004a2360      int32_t __saved_edi_1 = __saved_edi_2;
004a2360      int32_t __saved_edi;
004a2360      int32_t* esp_1 = &__saved_edi;
004a2360      
004a2363      if (idMessage != 0x18)
004a2363      {
004a23af          if (idMessage == 0x1c)
004a23af          {
004a23b9              struct Turbine_GUID* m_y0;
004a23b9              int32_t* var_84_4 = &m_y0;
004a23be              struct Turbine_GUID* m_y0_3 = &PlayerDesc_ClassType;
004a23c6              m_y0 = nullptr;
004a23d1              void __return;
004a23d1              InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, m_y0_3, var_84_4);
004a23d6              struct Turbine_GUID* m_y0_2 = m_y0;
004a23df              m_y0_3 = m_y0_2;
004a23e1              int32_t var_84_5 = 0;
004a23e4              struct Turbine_GUID* m_y0_4 = m_y0_3;
004a23e8              int32_t var_5c = 0;
004a23ec              int32_t var_58_1 = 0;
004a23ec              
004a23f0              if (m_y0_4 != 0)
004a23f6                  *(uint32_t*)(m_y0_4->m_data1 + 0x10)();
004a23f6              
004a2402              esp_1 = &m_y0_3;
004a2409              class PlayerDesc* var_64;
004a2409              int32_t ecx_6 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_5c, &var_64);
004a2409              
004a240f              if (m_y0_2 != 0)
004a2415                  *(uint32_t*)(m_y0_2->m_data1 + 0x14)();
004a2415              
004a2418              class PlayerDesc* edi = var_64;
004a2418              
004a241e              if (edi != 0)
004a241e              {
004a2428                  if ((ecx_6 >= 0 && PlayerDesc::PlayerIsPSR(edi) != 0))
004a2428                  {
004a243d                      int32_t var_8c_3 = 0x100001ec;
004a2444                      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x100001ec);
004a244d                      int32_t eax_7 = UIRegion::GetScreenX0(eax_6);
004a2457                      int32_t ebp_1 = (ebx->ptWindow.x - eax_7);
004a2459                      int32_t eax_8 = UIRegion::GetScreenY0(eax_6);
004a2461                      int32_t ecx_13 = (ebx->ptWindow.y - eax_8);
004a2463                      int32_t m_x0 = this->m_boxMapMarkerArea.m_x0;
004a2463                      
004a247f                      if ((ebp_1 >= m_x0 && ebp_1 < this->m_boxMapMarkerArea.m_x1))
004a247f                      {
004a2485                          int32_t m_y0_1 = this->m_boxMapMarkerArea.m_y0;
004a2485                          
004a249d                          if ((ecx_13 >= m_y0_1 && ecx_13 < this->m_boxMapMarkerArea.m_y1))
004a249d                          {
004a24a9                              int32_t m_x0_1 = this->m_boxMapMarkerArea.m_x0;
004a24af                              int32_t m_x1 = this->m_boxMapMarkerArea.m_x1;
004a24b5                              int32_t m_y1 = this->m_boxMapMarkerArea.m_y1;
004a24bb                              m_y0 = this->m_boxMapMarkerArea.m_y0;
004a24c7                              void var_50;
004a24c7                              Position::Position(&var_50);
004a2504                              int32_t var_54_1 = 0;
004a2513                              uint32_t var_4c_1 = LandDefs::lcoord_to_gid((((int64_t)((ebp_1 - m_x0) * 0x7ff)) / (m_x1 - m_x0_1)), ((((int64_t)((m_y0_1 - ecx_13) * 0x7ff)) / (m_y1 - m_y0)) + 0x7ff));
004a2517                              var_5c = 0x41200000;
004a2523                              int32_t var_58_2 = 0x41200000;
004a252f                              int32_t var_c_1 = 0;
004a2533                              int32_t var_8c_5 = 0;
004a2539                              int32_t var_14_1 = var_5c;
004a253d                              int32_t var_10_1 = 0x41200000;
004a2541                              void var_48;
004a2541                              Frame::set_heading(&var_48, 0f);
004a2546                              int32_t var_8c_6 = 0x7928af;
004a254f                              class AC1Legacy::PStringBase<char> __saved_ebp;
004a254f                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__saved_ebp, &data_7928af);
004a255e                              CM_Advocate::Event_Teleport(&__saved_ebp, &var_50);
004a256a                              AC1Legacy::PStringBase<char>::~PStringBase<char>(&__saved_ebp);
004a256f                              struct UIElementMessageInfo* var_4;
004a256f                              ebx = var_4;
004a249d                          }
004a247f                      }
004a247f                      
004a2576                      edi = var_64;
004a2428                  }
004a2428                  
004a257a                  edi->vtable->Release();
004a257e                  esp_1 = &__saved_edi;
004a241e              }
004a23af          }
004a2363      }
004a2363      else if (ebx->pElement == this)
004a2368      {
004a2373          uint32_t var_84_1 = 3;
004a2373          
004a2375          if (ebx->dwParam1 == 0)
004a2375          {
004a2395              UIListener::UnRegisterForGlobalMessage(this, var_84_1);
004a23a9              return UIElement::ListenToElementMessage(this, ebx);
004a2375          }
004a2375          
004a2377          UIListener::RegisterForGlobalMessage(this, var_84_1);
004a237e          gmMapUI::Update(this);
004a2392          return UIElement::ListenToElementMessage(this, ebx);
004a2368      }
004a2368      
004a2581      *(uint32_t*)((char*)esp_1 - 4) = ebx;
004a2584      int32_t result = UIElement::ListenToElementMessage(this);
004a2589      *(uint32_t*)esp_1;
004a2581      esp_1[1];
004a2581      esp_1[2];
004a2581      esp_1[3];
004a2590      return result;
004a2350  }

004a2593                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a25a0  class UIElement* __thiscall gmHouseUI::DynamicCast(class gmHouseUI* this, uint32_t arg2) __pure

004a25a0  {
004a25ac      if (arg2 == 0x10000025)
004a25b9          return this;
004a25b9      
004a25b3      int32_t edx_1;
004a25b3      edx_1 = arg2 != 3;
004a25b7      return (this & (edx_1 - 1));
004a25a0  }

004a25bc                                                                                      90 90 90 90                              ....

004a25c0  uint32_t gmHouseUI::GetUIElementType(class gmHouseUI const* this @ ecx) __pure

004a25c0  {
004a25c5      return 0x10000025;
004a25c0  }

004a25c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a25d0  class UIElement* gmHouseUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a25d0  {
004a25d6      void* result = operator new(0x604);
004a25d6      
004a25e2      if (result == 0)
004a262a          return 0;
004a262a      
004a25f0      UIElement_Field::UIElement_Field(result, arg1, arg2);
004a25f5      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004a25ff      *(uint32_t*)result = 0x7ab510;
004a2605      *(uint32_t*)((char*)result + 0x5f8) = 0x7ab268;
004a260f      *(uint32_t*)((char*)result + 0x5fc) = 0;
004a2619      *(uint32_t*)((char*)result + 0x600) = 0;
004a2626      return result;
004a25d0  }

004a262b                                   90 90 90 90 90                                                             .....

004a2630  void __fastcall HousePayment::HousePayment(class HousePayment* this)

004a2630  {
004a2633      this->vtable = 0x7ab648;
004a263e      this->wcid.id = INVALID_DID.id;
004a2643      this->num = 0;
004a2646      this->paid = 0;
004a2649      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a265c      this->name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a265f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004a2661      class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a266c      this->pname.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004a266f      InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
004a2630  }

004a2676                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004a2680  void __fastcall HousePayment::~HousePayment(class HousePayment* this)

004a2680  {
004a268b      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->pname.m_buffer;
004a268b      
004a269a      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004a269c          m_buffer->vtable->__vecDelDtor(1);
004a269c      
004a26a4      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->name.m_buffer;
004a26a4      
004a26b3      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004a26b5          m_buffer_1->vtable->__vecDelDtor(1);
004a26b5      
004a26bd      this->vtable = 0x79285c;
004a2680  }

004a26c7                       90 90 90 90 90 90 90 90 90                                                         .........

004a26d0  void* __thiscall gmHouseUI::`scalar deleting destructor'(class gmHouseUI* this, uint32_t arg2)

004a26d0  {
004a26d9      this->vtable = 0x7ab510;
004a26d3      this->vtable = &gmHouseUI::`vftable';
004a26d3      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a26eb      NoticeHandler::~NoticeHandler(&this->vtable);
004a26f2      UIElement_Field::~UIElement_Field(this);
004a26f2      
004a26fc      if ((arg2 & 1) != 0)
004a26ff          operator delete(this);
004a26ff      
004a270a      return this;
004a26d0  }

004a270d                                         90 90 90                                                               ...

004a2710  void __fastcall gmHouseUI::PostInit(class gmHouseUI* this)

004a2710  {
004a2714      UIElement::PostInit(this);
004a2720      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100001e6);
004a2727      class UIElement_ListBox* eax_1;
004a2727      
004a2727      if (eax == 0)
004a2737          eax_1 = nullptr;
004a2727      else
004a272f          eax_1 = eax->vtable->DynamicCast(5);
004a272f      
004a2739      this->m_pTextBox = eax_1;
004a273f      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
004a2746      eax_2->vtable->RegisterNoticeHandler(0x4dd225, &this->vtable);
004a2759      eax_2->vtable->RegisterNoticeHandler(0x4dd226, &this->vtable);
004a2766      eax_2->vtable->RegisterNoticeHandler(0x4dd227, &this->vtable);
004a2773      eax_2->vtable->RegisterNoticeHandler(0x4dd228, &this->vtable);
004a2710  }

004a2783           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a2790  void gmHouseUI::Register()

004a2790  {
004a279a      UIElement::RegisterElementClass(0x10000025, gmHouseUI::Create);
004a2790  }

004a27a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a27b0  uint8_t __thiscall gmHouseUI::GetHouseLocation(class gmHouseUI const* this, int32_t* arg2, int32_t* arg3)

004a27b0  {
004a27bb      *(uint32_t*)arg2 = 0xffffffff;
004a27c3      *(uint32_t*)arg3 = 0xffffffff;
004a27c9      int32_t m_pHouseData = this->m_pHouseData;
004a27c9      
004a27d1      if (m_pHouseData != 0)
004a27d1      {
004a27d7          if (*(uint32_t*)(m_pHouseData + 0x74) == 4)
004a27d7          {
004a2808              m_pHouseData = 1;
004a280b              return 1;
004a27d7          }
004a27d7          
004a27e3          if (Position::IsValid((m_pHouseData + 0x2c)) != 0)
004a27e3          {
004a27fe              LandDefs::gid_to_lcoord(Position::get_outside_cell_id(&this->m_pHouseData->m_pos), arg2, arg3);
004a2808              m_pHouseData = 1;
004a280b              return 1;
004a27e3          }
004a27d1      }
004a27d1      
004a27e7      m_pHouseData = 0;
004a27ea      return 0;
004a27b0  }

004a280e                                            90 90                                                                ..

004a2810  void __thiscall gmHouseUI::AddHousePanelText(class gmHouseUI* this, class PStringBase<unsigned short> const* arg2, enum HousePanelTextColor arg3)

004a2810  {
004a2810      class UIElement_ListBox* m_pTextBox = this->m_pTextBox;
004a2810      
004a2818      if (m_pTextBox != 0)
004a2818      {
004a281e          class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_pTextBox, 0, nullptr);
004a281e          
004a2825          if (eax_1 != 0)
004a2825          {
004a282e              class UIElement_Text* eax_2 = eax_1->vtable->DynamicCast(0xc);
004a282e              
004a2838              if (eax_2 != 0)
004a2838              {
004a2840                  UIElement::SetAttribute_Bool(eax_2, 0x29, 1);
004a2853                  UIElement_Text::SetTextWithFont(eax_2, arg2, 0, arg3);
004a2838              }
004a2825          }
004a2818      }
004a2810  }

004a285c                                                                                      90 90 90 90                              ....

004a2860  class AC1Legacy::PStringBase<char>* __thiscall AC1Legacy::PStringBase<char>::operator+(class AC1Legacy::PStringBase<char> const* this, class AC1Legacy::PStringBase<char>* __return, class AC1Legacy::PStringBase<char> const* arg3)

004a2860  {
004a2860      class AC1Legacy::PStringBase<char>* var_4 = this;
004a286b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a2877      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004a287b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004a287b      
004a288a      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
004a288c          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
004a288c      
004a28ab      AC1Legacy::PStringBase<char>::allocate_ref_buffer(&var_4, ((arg3->m_buffer->m_len + this->m_buffer->m_len) - 2));
004a28b2      class AC1Legacy::PStringBase<char>* esi_1 = var_4;
004a28b6      char (* eax_4)[0x1] = &this->m_buffer->m_data;
004a28b9      void* __offset(AC1Legacy::PStringBase<char>, 0x14) edx_2 = &esi_1[5];
004a28c8      char m_data[0x1];
004a28c8      
004a28c8      do
004a28c8      {
004a28c0          m_data = ADJ(eax_4)->m_data;
004a28c2          eax_4 = &eax_4[1];
004a28c3          *(int8_t*)((char*)ADJ(edx_2) + 0x14) = m_data;
004a28c5          edx_2 += 1;
004a28c8      } while (m_data != 0);
004a28d1      char* eax_6 = &arg3->m_buffer->m_data;
004a28d4      char* edx_4 = ((this->m_buffer->m_len + esi_1) + 0x13);
004a28e0      class AC1Legacy::PSRefBuffer<char>* ecx_4;
004a28e0      
004a28e0      do
004a28e0      {
004a28d8          ecx_4 = *(uint8_t*)eax_6;
004a28da          eax_6 = &eax_6[1];
004a28db          *(uint8_t*)edx_4 = ecx_4;
004a28dd          edx_4 = &edx_4[1];
004a28e0      } while (ecx_4 != 0);
004a28ea      __return->m_buffer = esi_1;
004a28ec      InterlockedIncrement(&esi_1[1]);
004a28ec      
004a28fb      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004a28fd          esi_1->m_buffer->vtable(1);
004a28fd      
004a290c      return __return;
004a2860  }

004a290f                                               90                                                                 .

004a2910  void* __thiscall HousePayment::`scalar deleting destructor'(class HousePayment* this, uint32_t arg2)

004a2910  {
004a291b      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->pname.m_buffer;
004a291b      
004a292a      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004a292c          m_buffer->vtable->__vecDelDtor(1);
004a292c      
004a2934      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->name.m_buffer;
004a2934      
004a2943      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004a2945          m_buffer_1->vtable->__vecDelDtor(1);
004a2945      
004a2952      this->vtable = 0x79285c;
004a2952      
004a2958      if ((arg2 & 1) != 0)
004a295b          operator delete(this);
004a295b      
004a2968      return this;
004a2910  }

004a296b                                   90 90 90 90 90                                                             .....

004a2970  int32_t __thiscall PackableList<HousePayment>::RemoveHead(class PackableList<HousePayment>* this, class HousePayment* arg2)

004a2970  {
004a2974      class PackableLLNode<HousePayment>* head = this->head;
004a2974      
004a297c      if (head == 0)
004a2983          return 0;
004a2983      
004a2986      class PackableLLNode<HousePayment>* next = head->next;
004a298b      this->head = next;
004a298b      
004a298e      if (next == 0)
004a2995          this->tail = nullptr;
004a298e      else
004a2990          next->prev = nullptr;
004a2990      
004a299d      HousePayment::operator=(arg2, head);
004a299d      
004a29a4      if (head != 0)
004a29a4      {
004a29a6          class AC1Legacy::PSRefBuffer<char>* m_buffer = head->data.pname.m_buffer;
004a29a6          
004a29bc          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004a29be              m_buffer->vtable->__vecDelDtor(1);
004a29be          
004a29c6          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = head->data.name.m_buffer;
004a29c6          
004a29d6          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004a29d8              m_buffer_1->vtable->__vecDelDtor(1);
004a29d8          
004a29e1          head->data.vtable = 0x79285c;
004a29e7          operator delete(head);
004a29a4      }
004a29a4      
004a29f4      this->curNum -= 1;
004a29fe      return 1;
004a2970  }

004a2a01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004a2a10  void __fastcall PackableList<HousePayment>::Flush(class PackableList<HousePayment>* this)

004a2a10  {
004a2a18      uint32_t id = INVALID_DID.id;
004a2a1c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a2a33      int32_t var_18 = 0x7ab648;
004a2a3b      int32_t var_10 = 0;
004a2a43      int32_t var_c = 0;
004a2a4b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004a2a4d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a2a5a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004a2a5a      
004a2a61      while (this->head != 0)
004a2a6a          PackableList<HousePayment>::RemoveHead(this, &var_18);
004a2a6a      
004a2a8c      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
004a2a8e          AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
004a2a8e      
004a2aa6      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
004a2aa8          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
004a2a10  }

004a2ab6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004a2ac0  class PackableList<HousePayment>* __thiscall PackableList<HousePayment>::operator=(class PackableList<HousePayment>* arg1, void* arg2)

004a2ac0  {
004a2ac6      PackableList<HousePayment>::Flush(arg1);
004a2ac6      
004a2ad6      for (class HousePayment* i = *(uint32_t*)((char*)arg2 + 4); i != 0; i = *(int32_t*)((char*)i + 0x18))
004a2ad6      {
004a2adf          void* esi_1 = operator new(0x20);
004a2adf          
004a2ae6          if (esi_1 == 0)
004a2af8              esi_1 = nullptr;
004a2ae6          else
004a2ae6          {
004a2aeb              HousePayment::HousePayment(esi_1, i);
004a2af0              *(uint32_t*)((char*)esi_1 + 0x18) = 0;
004a2af3              *(uint32_t*)((char*)esi_1 + 0x1c) = 0;
004a2ae6          }
004a2ae6          
004a2afd          if (arg1->head != 0)
004a2afd          {
004a2b04              class PackableLLNode<HousePayment>* tail = arg1->tail;
004a2b07              tail->next = esi_1;
004a2b0a              *(uint32_t*)((char*)esi_1 + 0x1c) = tail;
004a2afd          }
004a2afd          else
004a2aff              arg1->head = esi_1;
004a2aff          
004a2b10          uint32_t ecx_2 = (arg1->curNum + 1);
004a2b13          arg1->tail = esi_1;
004a2b16          arg1->curNum = ecx_2;
004a2b16          
004a2b19          if (i == 0)
004a2b19              break;
004a2ad6      }
004a2ad6      
004a2b28      return arg1;
004a2ac0  }

004a2b2b                                   90 90 90 90 90                                                             .....

004a2b30  void __fastcall gmHouseUI::DisplayBuyPayment(class gmHouseUI* this)

004a2b30  {
004a2b33      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a2b38      class AC1Legacy::PStringBase<char> esi;
004a2b38      class AC1Legacy::PStringBase<char> var_c = esi;
004a2b39      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004a2b43      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004a2b51      int32_t* ecx = &var_c;
004a2b51      
004a2b55      if (this->m_pHouseData != 0)
004a2b55      {
004a2b68          AC1Legacy::PStringBase<char>::set(ecx, &gmHouseUI::`vftable'.RecvNotice_ItemListBeginDrag);
004a2b7b          HousePaymentList::ComposeText(&this->m_pHouseData->m_buy, &var_c);
004a2b55      }
004a2b55      else
004a2b5c          AC1Legacy::PStringBase<char>::set(ecx, &gmHouseUI::`vftable'.RecvNotice_FirstSpellSelection);
004a2b5c      
004a2b84      int32_t edi;
004a2b84      int32_t var_14_2 = edi;
004a2b8f      class PStringBase<unsigned short>* eax_2;
004a2b8f      void* esi_2;
004a2b8f      eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, WidthConvert, (var_c + 0x14));
004a2b94      class UIElement_ListBox* ecx_6 = *(uint32_t*)((char*)esi_2 + 0x600);
004a2b94      
004a2b9e      if (ecx_6 != 0)
004a2b9e      {
004a2ba4          class UIElement* eax_3 = UIElement_ListBox::AddItemFromTemplateList(ecx_6, 0, nullptr);
004a2ba4          
004a2bab          if (eax_3 != 0)
004a2bab          {
004a2bb3              class UIElement* eax_4 = eax_3->vtable->DynamicCast(0xc);
004a2bb3              
004a2bbd              if (eax_4 != 0)
004a2bbd              {
004a2bc5                  UIElement::SetAttribute_Bool(eax_4, 0x29, 1);
004a2bd1                  UIElement_Text::SetTextWithFont(eax_4, eax_2, 0, 0);
004a2bbd              }
004a2bab          }
004a2b9e      }
004a2b9e      
004a2be0      void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) esi_5 = ((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_2 - 0x14);
004a2be0      
004a2bef      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
004a2bf7          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
004a2bf7      
004a2bf9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a2bf9      
004a2c0a      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004a2c0a      {
004a2c0c          struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable;
004a2c0e          var_c = 1;
004a2c12          vtable->__vecDelDtor(var_c);
004a2c0a      }
004a2b30  }

004a2c19                                                                             90 90 90 90 90 90 90                           .......

004a2c20  void __fastcall gmHouseUI::DisplayRentPayment(class gmHouseUI* this)

004a2c20  {
004a2c2e      if (this->m_pHouseData != 0)
004a2c2e      {
004a2c3a          int32_t* var_8;
004a2c3a          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &gmHouseUI::`vftable'.RecvNotice_SetSelectedSpell);
004a2c4d          HousePaymentList::ComposeText2(&this->m_pHouseData->m_rent, &var_8);
004a2c62          void* var_4;
004a2c62          class PStringBase<unsigned short>* eax_1;
004a2c62          class gmHouseUI* esi_1;
004a2c62          eax_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &var_8[5]);
004a2c6a          gmHouseUI::AddHousePanelText(esi_1, eax_1, Normal_HousePanelTextColor);
004a2c79          int32_t* esi_3 = ((char*)var_4 - 0x14);
004a2c79          
004a2c88          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004a2c90              **(uint32_t**)esi_3(1);
004a2c90          
004a2c92          int32_t* esi_4 = var_8;
004a2c92          
004a2ca3          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004a2cab              **(uint32_t**)esi_4(1);
004a2c2e      }
004a2c20  }

004a2cb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004a2cc0  void __fastcall gmHouseUI::DisplayBuyTime(class gmHouseUI* this)

004a2cc0  {
004a2cce      if (this->m_pHouseData != 0)
004a2cce      {
004a2cde          int32_t* var_8;
004a2cde          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &gmHouseUI::`vftable'.RecvNotice_SpellRemoved);
004a2cf2          HouseSystem::ConvertTime(this->m_pHouseData->m_buy_time, &var_8);
004a2d0a          void* var_4;
004a2d0a          class PStringBase<unsigned short>* eax_3;
004a2d0a          class gmHouseUI* esi_1;
004a2d0a          eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &var_8[5]);
004a2d12          gmHouseUI::AddHousePanelText(esi_1, eax_3, Normal_HousePanelTextColor);
004a2d21          int32_t* esi_3 = ((char*)var_4 - 0x14);
004a2d21          
004a2d30          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004a2d38              **(uint32_t**)esi_3(1);
004a2d38          
004a2d3a          int32_t* esi_4 = var_8;
004a2d3a          
004a2d4b          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004a2d53              **(uint32_t**)esi_4(1);
004a2cce      }
004a2cc0  }

004a2d5a                                                                                90 90 90 90 90 90                            ......

004a2d60  void __fastcall gmHouseUI::DisplayRentTimes(class gmHouseUI* this)

004a2d60  {
004a2d6e      if (this->m_pHouseData != 0)
004a2d6e      {
004a2d7f          int32_t* var_8;
004a2d7f          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &gmHouseUI::`vftable'.RecvNotice_SetDisplayCharacterTitle);
004a2d93          HouseSystem::GetRentPeriod(&this->m_pHouseData->m_type);
004a2d98          this->m_pHouseData->m_rent_time;
004a2daa          HouseSystem::ConvertTime(_ftol2(), &var_8);
004a2dc2          void* var_4;
004a2dc2          class PStringBase<unsigned short>* eax_4;
004a2dc2          class gmHouseUI* esi_1;
004a2dc2          eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &var_8[5]);
004a2dca          gmHouseUI::AddHousePanelText(esi_1, eax_4, Normal_HousePanelTextColor);
004a2dd9          int32_t* edi_2 = ((char*)var_4 - 0x14);
004a2dd9          
004a2de8          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004a2df0              **(uint32_t**)edi_2(1);
004a2df0          
004a2dfb          int32_t* var_c;
004a2dfb          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, &gmHouseUI::`vftable'.RecvNotice_PlayerPortalStormed);
004a2e00          class HouseData* m_pHouseData = esi_1->m_pHouseData;
004a2e0b          int32_t eax_6;
004a2e0b          
004a2e0b          if (m_pHouseData->m_maintenance_free == 0)
004a2e10              eax_6 = HousePaymentList::IsPaidInFull(&m_pHouseData->m_rent.vtable);
004a2e10          
004a2e17          int32_t* var_1c_3;
004a2e17          
004a2e17          if ((m_pHouseData->m_maintenance_free != 0 || eax_6 != 0))
004a2e17          {
004a2e39              var_1c_3 = &var_c;
004a2e3e              HouseSystem::GetRentPeriod(&esi_1->m_pHouseData->m_type);
004a2e17          }
004a2e17          else
004a2e17          {
004a2e23              var_1c_3 = &var_c;
004a2e28              HouseSystem::GetRentPeriod(&esi_1->m_pHouseData->m_type);
004a2e17          }
004a2e17          
004a2e45          esi_1->m_pHouseData->m_rent_time;
004a2e57          HouseSystem::ConvertTime(_ftol2(), var_1c_3);
004a2e6f          class PStringBase<unsigned short>* eax_10;
004a2e6f          int32_t ebx_1;
004a2e6f          class gmHouseUI* esi_2;
004a2e6f          eax_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &var_c[5]);
004a2e77          gmHouseUI::AddHousePanelText(esi_2, eax_10, Normal_HousePanelTextColor);
004a2e80          int32_t* esi_4 = ((char*)var_4 - 0x14);
004a2e80          
004a2e8f          if ((ebx_1(&esi_4[1]) == 0 && esi_4 != 0))
004a2e97              **(uint32_t**)esi_4(1);
004a2e97          
004a2e99          int32_t* esi_5 = var_c;
004a2e99          
004a2ea9          if ((ebx_1(&esi_5[1]) == 0 && esi_5 != 0))
004a2eb1              **(uint32_t**)esi_5(1);
004a2eb1          
004a2eb3          int32_t* esi_6 = var_8;
004a2eb3          
004a2ec5          if ((ebx_1(&esi_6[1]) == 0 && esi_6 != 0))
004a2ecd              **(uint32_t**)esi_6(1);
004a2d6e      }
004a2d60  }

004a2ed4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004a2ee0  void __fastcall gmHouseUI::DisplayLocation(class gmHouseUI* this)

004a2ee0  {
004a2ee3      int32_t __saved_ebx_1;
004a2ee3      int32_t __saved_ebx = __saved_ebx_1;
004a2ee3      
004a2eee      if (this->m_pHouseData != 0)
004a2eee      {
004a2ef4          int32_t __saved_esi_2;
004a2ef4          int32_t __saved_esi_1 = __saved_esi_2;
004a2ef5          int32_t __saved_edi_2;
004a2ef5          int32_t __saved_edi_1 = __saved_edi_2;
004a2efa          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a2efa          int32_t* var_18_1 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a2eff          int32_t var_8;
004a2eff          int32_t* var_1c_1 = &var_8;
004a2f02          var_8 = 0xffffffff;
004a2f0a          AC1Legacy::PStringBase<char>::s_NullBuffer_2 = 0xffffffff;
004a2f12          gmHouseUI::GetHouseLocation(this);
004a2f17          int32_t esi = var_8;
004a2f17          
004a2f1e          if (esi != 0xffffffff)
004a2f1e          {
004a2f24              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a2f24              
004a2f2b              if (AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0xffffffff)
004a2f2b              {
004a2f31                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a2f36                  AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004a2f3e                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004a2f4a                  void (__thiscall** const ecx_1)(class gmNoticeHandler* this) = &gmHouseUI::`vftable'.RecvNotice_SkillAdvancementClassChanged;
004a2f4a                  
004a2f4f                  if (esi < 0x400)
004a2f51                      ecx_1 = &gmHouseUI::`vftable'.RecvNotice_TradeFailure;
004a2f51                  
004a2f5c                  void* const eax_2 = &data_799b78;
004a2f5c                  
004a2f61                  if (AC1Legacy::PStringBase<char>::s_NullBuffer_3 < 0x400)
004a2f63                      eax_2 = &gmHouseUI::`vftable'.RecvNotice_TradeAnItemForDummies;
004a2f63                  
004a2f6e                  var_8 = (esi - 0x400);
004a2f76                  void (__thiscall** const var_18_3)(class gmNoticeHandler* this) = ecx_1;
004a2f7a                  long double x87_r7_2 = (((long double)var_8) * ((long double)0.10000000000000001));
004a2f86                  var_8 = &AC1Legacy::PStringBase<char>::s_NullBuffer_3[-0x2a];
004a2f96                  double var_20_1 = ((double)fabsl((x87_r7_2 + ((long double)0.5))));
004a2f99                  void* const var_24_1 = eax_2;
004a2faf                  double var_2c_1 = ((double)fabsl(((((long double)var_8) * ((long double)0.10000000000000001)) + ((long double)0.5))));
004a2fb2                  void (__thiscall** const var_30_1)(class gmNoticeHandler* this) = &gmHouseUI::`vftable'.RecvNotice_ClearTradeAcceptance;
004a2fb8                  AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &gmHouseUI::`vftable'.RecvNotice_ClearTradeAcceptance);
004a2fbd                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a2fc4                  int32_t var_18_4 = 0;
004a2fca                  var_20_1 = 0;
004a2fd0                  int32_t eax_4;
004a2fd0                  int32_t ebx_1;
004a2fd0                  eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data);
004a2fd5                  int32_t var_1c_3 = eax_4;
004a2fd8                  gmHouseUI::AddHousePanelText(ebx_1);
004a2fe7                  void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) esi_3 = ((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_2 - 0x14);
004a2fe7                  
004a2ff6                  if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004a2ff6                  {
004a2ffa                      int32_t var_18_6 = 1;
004a2ffe                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004a2ff6                  }
004a2ff6                  
004a300c                  if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004a300c                  {
004a3010                      int32_t var_18_8 = 1;
004a300e                      AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004a300c                  }
004a2f2b              }
004a2f1e          }
004a2eee      }
004a2ee0  }

004a301d                                                                                         90 90 90                               ...

004a3020  void __fastcall gmHouseUI::DisplayWarningText(class gmHouseUI* this)

004a3020  {
004a302e      if (this->m_pHouseData != 0)
004a302e      {
004a3034          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a3039          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004a3042          class AC1Legacy::PStringBase<char>* edx_1 = InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004a3048          class HouseData* m_pHouseData = this->m_pHouseData;
004a3053          int32_t eax_2;
004a3053          
004a3053          if (m_pHouseData->m_maintenance_free == 0)
004a3058              eax_2 = HousePaymentList::IsPaidInFull(&m_pHouseData->m_rent);
004a3058          
004a305f          void* var_14_3;
004a305f          int32_t* esi_3;
004a305f          class PStringBase<unsigned short> var_4;
004a305f          
004a305f          if ((m_pHouseData->m_maintenance_free != 0 || eax_2 != 0))
004a305f          {
004a30ab              AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &gmHouseUI::`vftable'.RecvNotice_EnableChatTargetSelection);
004a30c0              class PStringBase<unsigned short>* eax_7;
004a30c0              class gmHouseUI* esi_4;
004a30c0              eax_7 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data);
004a30c8              gmHouseUI::AddHousePanelText(esi_4, eax_7, RentPaid_HousePanelTextColor);
004a30d1              esi_3 = (var_4 - 0x14);
004a30d7              var_14_3 = &esi_3[1];
004a305f          }
004a305f          else
004a305f          {
004a306b              class AC1Legacy::PSRefBuffer<char>** var_14_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a306f              uint32_t* var_18_1 = &this->m_pHouseData->m_type;
004a3070              HouseSystem::ConstructRentWarningMessage(eax_2, edx_1);
004a3088              class PStringBase<unsigned short>* eax_3;
004a3088              class gmHouseUI* esi_1;
004a3088              eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data);
004a3090              gmHouseUI::AddHousePanelText(esi_1, eax_3, RentNotPaid_HousePanelTextColor);
004a3099              esi_3 = (var_4 - 0x14);
004a309f              var_14_3 = &esi_3[1];
004a305f          }
004a305f          
004a30e6          if ((InterlockedDecrement(var_14_3) == 0 && esi_3 != 0))
004a30ee              **(uint32_t**)esi_3(1);
004a30ee          
004a30f0          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a30f0          
004a3101          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004a3103              AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
004a302e      }
004a3020  }


004a3110  void __fastcall gmHouseUI::DisplayPurchaseTimeText(class gmHouseUI* this)

004a3110  {
004a3116      int32_t ebx;
004a3116      int32_t var_42c = ebx;
004a3117      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004a3117      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004a3118      int32_t esi;
004a3118      int32_t var_434 = esi;
004a3119      struct Turbine_GUID* edi;
004a3119      struct Turbine_GUID* var_438 = edi;
004a311e      class PStringBase<unsigned short> var_428;
004a311e      int32_t* var_43c = &var_428;
004a311f      class gmHouseUI* this_1 = this;
004a3127      struct Turbine_GUID* var_440 = &PlayerDesc_ClassType;
004a312f      var_428 = 0;
004a313a      class TResult __return;
004a313a      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_440, var_43c);
004a313f      struct Turbine_GUID* ecx_1 = var_428;
004a3148      var_440 = ecx_1;
004a314a      int32_t var_43c_1 = 0;
004a314d      struct Turbine_GUID* eax_1 = var_440;
004a3153      class AC1Legacy::PStringBase<char> __return_1 = 0;
004a3157      int32_t var_408 = 0;
004a3157      
004a315b      if (eax_1 != 0)
004a3161          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004a3161      
004a316d      struct Turbine_GUID** esp = &var_440;
004a3174      class AC1Legacy::PStringBase<char> var_418;
004a3174      int32_t edi_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&__return_1, &var_418);
004a3174      
004a3176      if (ecx_1 != 0)
004a317c          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004a317c      
004a317f      int32_t* var_414;
004a317f      int32_t* ecx_24 = var_414;
004a317f      
004a3185      if (ecx_24 != 0)
004a3185      {
004a318d          if (edi_1 >= 0)
004a318d          {
004a31a2              var_42c = 0;
004a31a6              CBaseQualities::InqInt(&ecx_24[0xe], 0xc7, &var_42c, 0, 0);
004a31ab              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004a31b0              AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004a31b8              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004a31d3              class gmHouseUI* var_424;
004a31d3              
004a31d3              if (HouseSystem::HasPurchaseWaitPeriodExpired(var_42c) == 0)
004a31d3              {
004a3212                  var_42c += 0x278d00;
004a322c                  strftime(&var_408, 0x400, &data_7ab7ec, localtime(&var_42c));
004a323e                  AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, ". This restriction does not appl…");
004a324c                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_418, &var_408);
004a3286                  AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&var_428, &gmHouseUI::`vftable'.RecvNotice_UpdateToolbarSelectionDisplay), &__return, &var_418), &__return_1, &this_1));
004a328b                  class AC1Legacy::PStringBase<char> __return_2 = __return_1;
004a328b                  
004a329b                  if ((InterlockedDecrement((__return_2 + 4)) == 0 && __return_2 != 0))
004a32a3                      **(uint32_t**)__return_2(1);
004a32a3                  
004a32a5                  class TResult __return_3 = __return;
004a32a5                  
004a32b5                  if ((InterlockedDecrement((__return_3 + 4)) == 0 && __return_3 != 0))
004a32bd                      **(uint32_t**)__return_3(1);
004a32bd                  
004a32bf                  class PStringBase<unsigned short> esi_2 = var_428;
004a32bf                  
004a32cf                  if ((InterlockedDecrement((esi_2 + 4)) == 0 && esi_2 != 0))
004a32d7                      **(uint32_t**)esi_2(1);
004a32d7                  
004a32d9                  class AC1Legacy::PStringBase<char> esi_3 = var_418;
004a32d9                  
004a32e9                  if ((InterlockedDecrement((esi_3 + 4)) == 0 && esi_3 != 0))
004a32f1                      **(uint32_t**)esi_3(1);
004a32f1                  
004a32f3                  class gmHouseUI* this_2 = this_1;
004a32f3                  
004a3303                  if ((InterlockedDecrement(&this_2->m_hashElementsRegisteredWith) == 0 && this_2 != 0))
004a3305                      this_2->vtable->__vecDelDtor(1);
004a31d3              }
004a31d3              else
004a31d3              {
004a31df                  class AC1Legacy::PSRefBuffer<char>** ecx_7 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a31df                  
004a31e3                  if (var_424->m_pHouseData == 0)
004a31f9                      AC1Legacy::PStringBase<char>::set(ecx_7, "You may buy another house immedi…");
004a31e3                  else
004a31ea                      AC1Legacy::PStringBase<char>::set(ecx_7, "You may buy another house immedi…");
004a31d3              }
004a31d3              
004a330d              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004a331b              class PStringBase<unsigned short>* eax_21;
004a331b              int32_t ebx_1;
004a331b              eax_21 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_428, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data);
004a3325              gmHouseUI::AddHousePanelText(var_424, eax_21, Normal_HousePanelTextColor);
004a332e              int32_t* esi_5 = (var_428 - 0x14);
004a332e              
004a333d              if ((ebx_1(&esi_5[1]) == 0 && esi_5 != 0))
004a3345                  **(uint32_t**)esi_5(1);
004a3345              
004a3353              if ((ebx_1(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004a3355                  AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004a3355              
004a335d              ecx_24 = var_414;
004a318d          }
004a318d          
004a3363          *(uint32_t*)(*(uint32_t*)ecx_24 + 0x14)();
004a3363          esp = &var_438;
004a3185      }
004a3185      
004a3366      *(uint32_t*)esp;
004a3366      esp[1];
004a3366      esp[2];
004a3366      esp[3];
004a3110  }

004a3371                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004a3380  void __fastcall gmHouseUI::DisplayHouseData(class gmHouseUI* this)

004a3380  {
004a3383      class UIElement_ListBox* m_pTextBox = this->m_pTextBox;
004a3383      
004a338b      if (m_pTextBox == 0)
004a33c5          return;
004a33c5      
004a338d      UIElement_ListBox::Flush(m_pTextBox);
004a3394      gmHouseUI::DisplayBuyPayment(this);
004a339b      gmHouseUI::DisplayRentPayment(this);
004a33a2      gmHouseUI::DisplayBuyTime(this);
004a33a9      gmHouseUI::DisplayRentTimes(this);
004a33b0      gmHouseUI::DisplayLocation(this);
004a33b7      gmHouseUI::DisplayWarningText(this);
004a33bf      /* tailcall */
004a33bf      return gmHouseUI::DisplayPurchaseTimeText(this);
004a3380  }

004a33c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a33d0  uint8_t __thiscall gmHouseUI::Update(class gmHouseUI* this, class HouseData const* arg2)

004a33d0  {
004a33d3      class HouseData* m_pHouseData = this->m_pHouseData;
004a33db      class HouseData* eax_1;
004a33db      
004a33db      if (m_pHouseData != 0)
004a3410          HouseData::operator=(m_pHouseData, arg2);
004a33db      else
004a33db      {
004a33df          void* eax = operator new(0x7c);
004a33df          
004a33e9          if (eax == 0)
004a33f9              eax_1 = nullptr;
004a33e9          else
004a33f2              eax_1 = HouseData::HouseData(eax, arg2);
004a33f2          
004a33fd          this->m_pHouseData = eax_1;
004a33fd          
004a3403          if (eax_1 == 0)
004a3403          {
004a3405              eax_1 = 0;
004a3408              return 0;
004a3403          }
004a33db      }
004a33db      
004a3415      class UIElement_ListBox* m_pTextBox = this->m_pTextBox;
004a3415      
004a341d      if (m_pTextBox != 0)
004a341d      {
004a341f          UIElement_ListBox::Flush(m_pTextBox);
004a3426          gmHouseUI::DisplayBuyPayment(this);
004a342d          gmHouseUI::DisplayRentPayment(this);
004a3434          gmHouseUI::DisplayBuyTime(this);
004a343b          gmHouseUI::DisplayRentTimes(this);
004a3442          gmHouseUI::DisplayLocation(this);
004a3449          gmHouseUI::DisplayWarningText(this);
004a3450          gmHouseUI::DisplayPurchaseTimeText(this);
004a341d      }
004a341d      
004a3455      eax_1 = 1;
004a3458      return 1;
004a33d0  }

004a345b                                                                                   90 90 90 90 90                             .....

004a3460  uint8_t __fastcall gmHouseUI::Update(class gmHouseUI* this, uint32_t arg2)

004a3460  {
004a3463      class HouseData* m_pHouseData = this->m_pHouseData;
004a3463      
004a346b      if (m_pHouseData != 0)
004a346b      {
004a346d          m_pHouseData->vtable->__vecDelDtor(1);
004a3473          this->m_pHouseData = nullptr;
004a346b      }
004a346b      
004a347d      class UIElement_ListBox* m_pTextBox = this->m_pTextBox;
004a347d      
004a3485      if (m_pTextBox != 0)
004a3485      {
004a3487          UIElement_ListBox::Flush(m_pTextBox);
004a348e          gmHouseUI::DisplayBuyPayment(this);
004a3495          gmHouseUI::DisplayRentPayment(this);
004a349c          gmHouseUI::DisplayBuyTime(this);
004a34a3          gmHouseUI::DisplayRentTimes(this);
004a34aa          gmHouseUI::DisplayLocation(this);
004a34b1          gmHouseUI::DisplayWarningText(this);
004a34b8          gmHouseUI::DisplayPurchaseTimeText(this);
004a3485      }
004a3485      
004a34bd      int32_t eax;
004a34bd      eax = 1;
004a34c0      return 1;
004a3460  }

004a34c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a34d0  void __thiscall gmHouseUI::RecvNotice_UpdateHouseData(class gmHouseUI* this, class HouseData const* arg2)

004a34d0  {
004a34d6      /* tailcall */
004a34d6      return gmHouseUI::Update(((char*)this - 0x5f8), arg2);
004a34d0  }

004a34db                                                                                   90 90 90 90 90                             .....

004a34e0  void __fastcall gmHouseUI::RecvNotice_FailedHouseTransaction(class gmHouseUI* this, uint32_t arg2)

004a34e0  {
004a34e6      uint32_t edx;
004a34e6      /* tailcall */
004a34e6      return gmHouseUI::Update(((char*)this - 0x5f8), edx);
004a34e0  }

004a34eb                                   90 90 90 90 90                                                             .....

004a34f0  void __thiscall gmHouseUI::RecvNotice_UpdateRentTime(class gmHouseUI* this, int32_t arg2)

004a34f0  {
004a34f0      struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004a34f0      
004a34fc      if (vtable != 0)
004a34fc      {
004a3502          *(int32_t*)((char*)vtable + 8) = arg2;
004a350e          HousePaymentList::ClearPayment(&this->m_hashElementsRegisteredWith.vtable[7]);
004a3515          gmHouseUI::DisplayHouseData(((char*)this - 0x5f8));
004a34fc      }
004a34f0  }

004a351e                                                                                            90 90                                ..

004a3520  void __thiscall gmHouseUI::RecvNotice_UpdateRentPayment(class gmHouseUI* this, class HousePaymentList const* arg2)

004a3520  {
004a3520      struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004a3520      
004a352c      if (vtable != 0)
004a352c      {
004a3536          PackableList<HousePayment>::operator=(&vtable[7], arg2);
004a353d          gmHouseUI::DisplayHouseData(((char*)this - 0x5f8));
004a352c      }
004a3520  }

004a3546                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a3550  int32_t __thiscall InventoryPlacement::UnPack(class InventoryPlacement* this, void** arg2, uint32_t arg3)

004a3550  {
004a3558      this->iid_ = **(uint32_t**)arg2;
004a355d      void* edx_3 = (*(uint32_t*)arg2 + 4);
004a3560      *(uint32_t*)arg2 = edx_3;
004a3564      this->loc_ = *(uint32_t*)edx_3;
004a3569      void* edx_6 = (*(uint32_t*)arg2 + 4);
004a356c      *(uint32_t*)arg2 = edx_6;
004a3570      this->priority_ = *(uint32_t*)edx_6;
004a3573      *(uint32_t*)arg2 += 4;
004a357b      return 1;
004a3550  }

004a357e                                                                                            90 90                                ..

004a3580  uint8_t LM_UVTransform::LoadFromFileNode(class LM_UVTransform* this @ ecx, class PFileNode const* arg2, class RenderMaterial* arg3, uint32_t const arg4, uint32_t const arg5) __pure

004a3580  {
004a3580      int32_t eax;
004a3580      eax = 0;
004a3582      return 0;
004a3580  }

004a3585                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004a3590  void __fastcall gmPaperDollUI::~gmPaperDollUI(class gmPaperDollUI* this)

004a3590  {
004a35a3      this->vtable = &gmPaperDollUI::`vftable';
004a3595      this->vtable = &gmPaperDollUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004a359b      this->vtable = &gmPaperDollUI::`vftable'.OnAction;
004a35b6      this->vtable = &gmPaperDollUI::`vftable';
004a35c0      UIListener::UnRegisterForGlobalMessage(this, 3);
004a35c9      UIListener::UnRegisterForGlobalMessage(this, 0xb);
004a35ce      class UIElement_ItemList* m_neckSlot = this->m_neckSlot;
004a35ce      
004a35d6      if (m_neckSlot != 0)
004a35d8          UIElement_ItemList::UnregisterItemListDragHandler(m_neckSlot);
004a35d8      
004a35dd      class UIElement_ItemList* m_leftWristSlot = this->m_leftWristSlot;
004a35dd      
004a35e5      if (m_leftWristSlot != 0)
004a35e7          UIElement_ItemList::UnregisterItemListDragHandler(m_leftWristSlot);
004a35e7      
004a35ec      class UIElement_ItemList* m_leftRingSlot = this->m_leftRingSlot;
004a35ec      
004a35f4      if (m_leftRingSlot != 0)
004a35f6          UIElement_ItemList::UnregisterItemListDragHandler(m_leftRingSlot);
004a35f6      
004a35fb      class UIElement_ItemList* m_rightWristSlot = this->m_rightWristSlot;
004a35fb      
004a3603      if (m_rightWristSlot != 0)
004a3605          UIElement_ItemList::UnregisterItemListDragHandler(m_rightWristSlot);
004a3605      
004a360a      class UIElement_ItemList* m_rightRingSlot = this->m_rightRingSlot;
004a360a      
004a3612      if (m_rightRingSlot != 0)
004a3614          UIElement_ItemList::UnregisterItemListDragHandler(m_rightRingSlot);
004a3614      
004a3619      class UIElement_ItemList* m_weaponReadySlot = this->m_weaponReadySlot;
004a3619      
004a3621      if (m_weaponReadySlot != 0)
004a3623          UIElement_ItemList::UnregisterItemListDragHandler(m_weaponReadySlot);
004a3623      
004a3628      class UIElement_ItemList* m_ammoReadySlot = this->m_ammoReadySlot;
004a3628      
004a3630      if (m_ammoReadySlot != 0)
004a3632          UIElement_ItemList::UnregisterItemListDragHandler(m_ammoReadySlot);
004a3632      
004a3637      class UIElement_ItemList* m_shieldReadySlot = this->m_shieldReadySlot;
004a3637      
004a363f      if (m_shieldReadySlot != 0)
004a3641          UIElement_ItemList::UnregisterItemListDragHandler(m_shieldReadySlot);
004a3641      
004a3646      class UIElement_ItemList* m_clothesPantsSlot = this->m_clothesPantsSlot;
004a3646      
004a364e      if (m_clothesPantsSlot != 0)
004a3650          UIElement_ItemList::UnregisterItemListDragHandler(m_clothesPantsSlot);
004a3650      
004a3655      class UIElement_ItemList* m_clothesShirtSlot = this->m_clothesShirtSlot;
004a3655      
004a365d      if (m_clothesShirtSlot != 0)
004a365f          UIElement_ItemList::UnregisterItemListDragHandler(m_clothesShirtSlot);
004a365f      
004a3664      class UIElement_ItemList* m_trinketOneSlot = this->m_trinketOneSlot;
004a3664      
004a366c      if (m_trinketOneSlot != 0)
004a366e          UIElement_ItemList::UnregisterItemListDragHandler(m_trinketOneSlot);
004a366e      
004a3673      class UIElement_ItemList* m_cloakSlot = this->m_cloakSlot;
004a3673      
004a367b      if (m_cloakSlot != 0)
004a367d          UIElement_ItemList::UnregisterItemListDragHandler(m_cloakSlot);
004a367d      
004a3682      class UIElement_ItemList* m_sigilOneSlot = this->m_sigilOneSlot;
004a3682      
004a368a      if (m_sigilOneSlot != 0)
004a368c          UIElement_ItemList::UnregisterItemListDragHandler(m_sigilOneSlot);
004a368c      
004a3691      class UIElement_ItemList* m_sigilTwoSlot = this->m_sigilTwoSlot;
004a3691      
004a3699      if (m_sigilTwoSlot != 0)
004a369b          UIElement_ItemList::UnregisterItemListDragHandler(m_sigilTwoSlot);
004a369b      
004a36a0      class UIElement_ItemList* m_sigilThreeSlot = this->m_sigilThreeSlot;
004a36a0      
004a36a8      if (m_sigilThreeSlot != 0)
004a36aa          UIElement_ItemList::UnregisterItemListDragHandler(m_sigilThreeSlot);
004a36aa      
004a36af      class UIElement_ItemList* m_headSlot = this->m_headSlot;
004a36af      
004a36b7      if (m_headSlot != 0)
004a36b9          UIElement_ItemList::UnregisterItemListDragHandler(m_headSlot);
004a36b9      
004a36be      class UIElement_ItemList* m_chestSlot = this->m_chestSlot;
004a36be      
004a36c6      if (m_chestSlot != 0)
004a36c8          UIElement_ItemList::UnregisterItemListDragHandler(m_chestSlot);
004a36c8      
004a36cd      class UIElement_ItemList* m_abdomenSlot = this->m_abdomenSlot;
004a36cd      
004a36d5      if (m_abdomenSlot != 0)
004a36d7          UIElement_ItemList::UnregisterItemListDragHandler(m_abdomenSlot);
004a36d7      
004a36dc      class UIElement_ItemList* m_upperArmSlot = this->m_upperArmSlot;
004a36dc      
004a36e4      if (m_upperArmSlot != 0)
004a36e6          UIElement_ItemList::UnregisterItemListDragHandler(m_upperArmSlot);
004a36e6      
004a36eb      class UIElement_ItemList* m_lowerArmSlot = this->m_lowerArmSlot;
004a36eb      
004a36f3      if (m_lowerArmSlot != 0)
004a36f5          UIElement_ItemList::UnregisterItemListDragHandler(m_lowerArmSlot);
004a36f5      
004a36fa      class UIElement_ItemList* m_handSlot = this->m_handSlot;
004a36fa      
004a3702      if (m_handSlot != 0)
004a3704          UIElement_ItemList::UnregisterItemListDragHandler(m_handSlot);
004a3704      
004a3709      class UIElement_ItemList* m_upperLegSlot = this->m_upperLegSlot;
004a3709      
004a3711      if (m_upperLegSlot != 0)
004a3713          UIElement_ItemList::UnregisterItemListDragHandler(m_upperLegSlot);
004a3713      
004a3718      class UIElement_ItemList* m_lowerLegSlot = this->m_lowerLegSlot;
004a3718      
004a3720      if (m_lowerLegSlot != 0)
004a3722          UIElement_ItemList::UnregisterItemListDragHandler(m_lowerLegSlot);
004a3722      
004a3727      class UIElement_ItemList* m_footSlot = this->m_footSlot;
004a3727      
004a372f      if (m_footSlot != 0)
004a3731          UIElement_ItemList::UnregisterItemListDragHandler(m_footSlot);
004a3731      
004a3736      class UIElement_Viewport* m_pPaperDoll = this->m_pPaperDoll;
004a3736      
004a373e      if (m_pPaperDoll != 0)
004a3746          CreatureMode::RemoveAllObjects(&m_pPaperDoll->creature_mode_objects);
004a3746      
004a374b      class CPhysicsObj* m_pInventoryObject = this->m_pInventoryObject;
004a374b      
004a3753      if (m_pInventoryObject != 0)
004a3755          m_pInventoryObject->vtable->__vecDelDtor(1);
004a3755      
004a375b      class RenderSurface* m_clickMap = this->m_clickMap;
004a3763      this->m_pInventoryObject = nullptr;
004a3763      
004a376d      if (m_clickMap != 0)
004a376d      {
004a376f          m_clickMap->vtable->Release();
004a3774          this->m_clickMap = nullptr;
004a376d      }
004a376d      
004a377e      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x142, &this->vtable);
004a3791      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
004a3791      
004a3798      if (eax_2 != 0)
004a379a          eax_2->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004a379a      
004a3595      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a37ab      NoticeHandler::~NoticeHandler(&this->vtable);
004a37b5      /* tailcall */
004a37b5      return UIElement_Field::~UIElement_Field(this);
004a3590  }

004a37ba                                                                                90 90 90 90 90 90                            ......

004a37c0  class UIElement* __thiscall gmPaperDollUI::DynamicCast(class gmPaperDollUI* this, uint32_t arg2) __pure

004a37c0  {
004a37cc      if (arg2 == 0x10000024)
004a37d9          return this;
004a37d9      
004a37d3      int32_t edx_1;
004a37d3      edx_1 = arg2 != 3;
004a37d7      return (this & (edx_1 - 1));
004a37c0  }

004a37dc                                                                                      90 90 90 90                              ....

004a37e0  uint32_t gmPaperDollUI::GetUIElementType(class gmPaperDollUI const* this @ ecx) __pure

004a37e0  {
004a37e5      return 0x10000024;
004a37e0  }

004a37e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a37f0  void __stdcall gmPaperDollUI::GetLocationInfoFromElementID(class gmPaperDollUI* this @ ecx, uint32_t arg2, uint32_t* arg3, enum UI_SLOT_SIDE* arg4)

004a37f0  {
004a3802      *(uint32_t*)arg3 = 0;
004a3808      *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a3808      
004a380e      if (arg2 <= 0x1000058e)
004a380e      {
004a3814          if (arg2 == 0x1000058e)
004a3814          {
004a38c6              *(uint32_t*)arg3 = 0x4000000;
004a38cc              *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a38d2              return;
004a3814          }
004a3814          
004a3823          if ((arg2 - 0x100001da) <= 9)
004a3829              switch (arg2)
004a3829              {
004a3830                  case 0x100001da:
004a3830                  {
004a3830                      *(uint32_t*)arg3 = 0x8000;
004a3836                      *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a3830                      break;
004a3830                  }
004a383f                  case 0x100001db:
004a383f                  {
004a383f                      *(uint32_t*)arg3 = 0x10000;
004a3845                      *(uint32_t*)arg4 = SLOT_SIDE_LEFT;
004a383f                      break;
004a383f                  }
004a384e                  case 0x100001dc:
004a384e                  {
004a384e                      *(uint32_t*)arg3 = 0x40000;
004a3854                      *(uint32_t*)arg4 = SLOT_SIDE_LEFT;
004a384e                      break;
004a384e                  }
004a385d                  case 0x100001dd:
004a385d                  {
004a385d                      *(uint32_t*)arg3 = 0x20000;
004a3863                      *(uint32_t*)arg4 = SLOT_SIDE_RIGHT;
004a385d                      break;
004a385d                  }
004a386c                  case 0x100001de:
004a386c                  {
004a386c                      *(uint32_t*)arg3 = 0x80000;
004a3872                      *(uint32_t*)arg4 = SLOT_SIDE_RIGHT;
004a386c                      break;
004a386c                  }
004a387b                  case 0x100001df:
004a387b                  {
004a387b                      *(uint32_t*)arg3 = 0x3500000;
004a3881                      *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a387b                      break;
004a387b                  }
004a388a                  case 0x100001e0:
004a388a                  {
004a388a                      *(uint32_t*)arg3 = "activation type (%s) with '%s' b…";
004a3890                      *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a388a                      break;
004a388a                  }
004a3899                  case 0x100001e1:
004a3899                  {
004a3899                      *(uint32_t*)arg3 = 0x200000;
004a389f                      *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a3899                      break;
004a3899                  }
004a38b7                  case 0x100001e2:
004a38b7                  {
004a38b7                      *(uint32_t*)arg3 = 2;
004a38bd                      *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a38b7                      break;
004a38b7                  }
004a38a8                  case 0x100001e3:
004a38a8                  {
004a38a8                      *(uint32_t*)arg3 = 0x40;
004a38ae                      *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a38a8                      break;
004a38a8                  }
004a3829              }
004a380e      }
004a380e      else if ((arg2 - 0x10000595) <= 0x54)
004a38eb          switch (arg2)
004a38eb          {
004a3901              case 0x10000595:
004a3901              {
004a3901                  *(uint32_t*)arg3 = 0x10000000;
004a3907                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a3901                  break;
004a3901              }
004a3910              case 0x10000596:
004a3910              {
004a3910                  *(uint32_t*)arg3 = 0x20000000;
004a3916                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a3910                  break;
004a3910              }
004a391f              case 0x10000597:
004a391f              {
004a391f                  *(uint32_t*)arg3 = 0x40000000;
004a3925                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a391f                  break;
004a391f              }
004a392e              case 0x100005ab:
004a392e              {
004a392e                  *(uint32_t*)arg3 = 1;
004a3934                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a392e                  break;
004a392e              }
004a393d              case 0x100005ac:
004a393d              {
004a393d                  *(uint32_t*)arg3 = 0x200;
004a3943                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a393d                  break;
004a393d              }
004a394c              case 0x100005ad:
004a394c              {
004a394c                  *(uint32_t*)arg3 = 0x400;
004a3952                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a394c                  break;
004a394c              }
004a395b              case 0x100005ae:
004a395b              {
004a395b                  *(uint32_t*)arg3 = 0x800;
004a3961                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a395b                  break;
004a395b              }
004a396a              case 0x100005af:
004a396a              {
004a396a                  *(uint32_t*)arg3 = 0x1000;
004a3970                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a396a                  break;
004a396a              }
004a3979              case 0x100005b0:
004a3979              {
004a3979                  *(uint32_t*)arg3 = 0x20;
004a397f                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a3979                  break;
004a3979              }
004a3988              case 0x100005b1:
004a3988              {
004a3988                  *(uint32_t*)arg3 = 0x2000;
004a398e                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a3988                  break;
004a3988              }
004a3997              case 0x100005b2:
004a3997              {
004a3997                  *(uint32_t*)arg3 = 0x4000;
004a399d                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a3997                  break;
004a3997              }
004a39a6              case 0x100005b3:
004a39a6              {
004a39a6                  *(uint32_t*)arg3 = 0x100;
004a39ac                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a39a6                  break;
004a39a6              }
004a38f2              case 0x100005e9:
004a38f2              {
004a38f2                  *(uint32_t*)arg3 = 0x8000000;
004a38f8                  *(uint32_t*)arg4 = SLOT_SIDE_NULL;
004a38f2                  break;
004a38f2              }
004a38eb          }
004a37f0  }

004a39b5                                                                 8d 49 00                                               .I.
004a39b8  uint32_t jump_table_4a39b8[0xa] = 
004a39b8  {
004a39b8      [0x0] =  0x004a3830
004a39bc      [0x1] =  0x004a383f
004a39c0      [0x2] =  0x004a384e
004a39c4      [0x3] =  0x004a385d
004a39c8      [0x4] =  0x004a386c
004a39cc      [0x5] =  0x004a387b
004a39d0      [0x6] =  0x004a388a
004a39d4      [0x7] =  0x004a3899
004a39d8      [0x8] =  0x004a38b7
004a39dc      [0x9] =  0x004a38a8
004a39e0  }
004a39e0  uint32_t jump_table_4a39e0[0xe] = 
004a39e0  {
004a39e0      [0x0] =  0x004a3901
004a39e4      [0x1] =  0x004a3910
004a39e8      [0x2] =  0x004a391f
004a39ec      [0x3] =  0x004a392e
004a39f0      [0x4] =  0x004a393d
004a39f4      [0x5] =  0x004a394c
004a39f8      [0x6] =  0x004a395b
004a39fc      [0x7] =  0x004a396a
004a3a00      [0x8] =  0x004a3979
004a3a04      [0x9] =  0x004a3988
004a3a08      [0xa] =  0x004a3997
004a3a0c      [0xb] =  0x004a39a6
004a3a10      [0xc] =  0x004a38f2
004a3a14      [0xd] =  0x004a39b2
004a3a18  }
004a3a18  uint8_t lookup_table_4a3a18[0x55] = 
004a3a18  {
004a3a18      [0x00] =  0x00
004a3a19      [0x01] =  0x01
004a3a1a      [0x02] =  0x02
004a3a1b      [0x03] =  0x0d
004a3a1c      [0x04] =  0x0d
004a3a1d      [0x05] =  0x0d
004a3a1e      [0x06] =  0x0d
004a3a1f      [0x07] =  0x0d
004a3a20      [0x08] =  0x0d
004a3a21      [0x09] =  0x0d
004a3a22      [0x0a] =  0x0d
004a3a23      [0x0b] =  0x0d
004a3a24      [0x0c] =  0x0d
004a3a25      [0x0d] =  0x0d
004a3a26      [0x0e] =  0x0d
004a3a27      [0x0f] =  0x0d
004a3a28      [0x10] =  0x0d
004a3a29      [0x11] =  0x0d
004a3a2a      [0x12] =  0x0d
004a3a2b      [0x13] =  0x0d
004a3a2c      [0x14] =  0x0d
004a3a2d      [0x15] =  0x0d
004a3a2e      [0x16] =  0x03
004a3a2f      [0x17] =  0x04
004a3a30      [0x18] =  0x05
004a3a31      [0x19] =  0x06
004a3a32      [0x1a] =  0x07
004a3a33      [0x1b] =  0x08
004a3a34      [0x1c] =  0x09
004a3a35      [0x1d] =  0x0a
004a3a36      [0x1e] =  0x0b
004a3a37      [0x1f] =  0x0d
004a3a38      [0x20] =  0x0d
004a3a39      [0x21] =  0x0d
004a3a3a      [0x22] =  0x0d
004a3a3b      [0x23] =  0x0d
004a3a3c      [0x24] =  0x0d
004a3a3d      [0x25] =  0x0d
004a3a3e      [0x26] =  0x0d
004a3a3f      [0x27] =  0x0d
004a3a40      [0x28] =  0x0d
004a3a41      [0x29] =  0x0d
004a3a42      [0x2a] =  0x0d
004a3a43      [0x2b] =  0x0d
004a3a44      [0x2c] =  0x0d
004a3a45      [0x2d] =  0x0d
004a3a46      [0x2e] =  0x0d
004a3a47      [0x2f] =  0x0d
004a3a48      [0x30] =  0x0d
004a3a49      [0x31] =  0x0d
004a3a4a      [0x32] =  0x0d
004a3a4b      [0x33] =  0x0d
004a3a4c      [0x34] =  0x0d
004a3a4d      [0x35] =  0x0d
004a3a4e      [0x36] =  0x0d
004a3a4f      [0x37] =  0x0d
004a3a50      [0x38] =  0x0d
004a3a51      [0x39] =  0x0d
004a3a52      [0x3a] =  0x0d
004a3a53      [0x3b] =  0x0d
004a3a54      [0x3c] =  0x0d
004a3a55      [0x3d] =  0x0d
004a3a56      [0x3e] =  0x0d
004a3a57      [0x3f] =  0x0d
004a3a58      [0x40] =  0x0d
004a3a59      [0x41] =  0x0d
004a3a5a      [0x42] =  0x0d
004a3a5b      [0x43] =  0x0d
004a3a5c      [0x44] =  0x0d
004a3a5d      [0x45] =  0x0d
004a3a5e      [0x46] =  0x0d
004a3a5f      [0x47] =  0x0d
004a3a60      [0x48] =  0x0d
004a3a61      [0x49] =  0x0d
004a3a62      [0x4a] =  0x0d
004a3a63      [0x4b] =  0x0d
004a3a64      [0x4c] =  0x0d
004a3a65      [0x4d] =  0x0d
004a3a66      [0x4e] =  0x0d
004a3a67      [0x4f] =  0x0d
004a3a68      [0x50] =  0x0d
004a3a69      [0x51] =  0x0d
004a3a6a      [0x52] =  0x0d
004a3a6b      [0x53] =  0x0d
004a3a6c      [0x54] =  0x0c
004a3a6d  }

004a3a6d                                         90 90 90                                                               ...

004a3a70  void __thiscall gmPaperDollUI::HandlePaperDollDragOver(class gmPaperDollUI* this, class UIElement* arg2)

004a3a70  {
004a3a8a      char var_8;
004a3a8a      void var_4;
004a3a8a      UIElement_ItemList::InqDropIconInfo(arg2, &arg2, &var_4, &var_8);
004a3a8a      
004a3a9f      if ((arg2 != 0 && (var_8 & 0xe) == 0))
004a3a9f      {
004a3aa1          class CPlayerSystem* eax_2 = CPlayerSystem::GetPlayerSystem();
004a3aa1          
004a3aa8          if (eax_2 != 0)
004a3aa8          {
004a3ab5              uint32_t var_1c_1 = arg2;
004a3ab8              int32_t var_c = 0;
004a3ab8              
004a3ac7              if (CPlayerSystem::AutoWearIsLegal(eax_2, var_1c_1, &var_c, 1) != 0)
004a3ac7              {
004a3ac9                  this->m_paperDollDragOverlay->vtable->SetState(0x10000040);
004a3ae0                  return;
004a3ac7              }
004a3ac7              
004a3ae9              if (var_c == 0)
004a3aeb                  this->m_paperDollDragOverlay->vtable->SetState(0x10000041);
004a3aa8          }
004a3a9f      }
004a3a70  }

004a3b05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004a3b10  uint8_t __stdcall gmPaperDollUI::AcceptDragObject(class gmPaperDollUI* this @ ecx, uint32_t arg2, uint32_t* arg3, enum UI_SLOT_SIDE* arg4)

004a3b10  {
004a3b16      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004a3b16      
004a3b22      if (eax == 0)
004a3b22      {
004a3b24          eax = 0;
004a3b27          return 0;
004a3b22      }
004a3b22      
004a3b2a      uint32_t _valid_locations = eax->pwd._valid_locations;
004a3b2a      
004a3b47      if ((*(uint32_t*)arg3 == 0x200000 && (_valid_locations & 0x100000) != 0))
004a3b47      {
004a3b49          _valid_locations |= 0x200000;
004a3b4e          *(uint32_t*)arg4 = SLOT_SIDE_LEFT;
004a3b47      }
004a3b47      
004a3b56      if ((*(uint32_t*)arg3 & _valid_locations) != 0)
004a3b56      {
004a3b5d          class CPlayerSystem* ecx = CPlayerSystem::GetPlayerSystem();
004a3b5d          
004a3b61          if (ecx != 0)
004a3b61          {
004a3b69              uint32_t id = eax->id;
004a3b69              
004a3b6e              if ((*(uint32_t*)arg3 & 0x80001ff) == 0)
004a3b6e              {
004a3ba0                  if (CPlayerSystem::AutoWield(ecx, id, *(uint32_t*)arg4, 0, 1, 0, 0) != 0)
004a3ba0                  {
004a3ba4                      _valid_locations = 1;
004a3ba7                      return 1;
004a3ba0                  }
004a3b6e              }
004a3b6e              else
004a3b6e              {
004a3b76                  arg2 = 0;
004a3b76                  
004a3b85                  if (CPlayerSystem::AutoWear(ecx, id, &arg2, 0) != 0)
004a3b85                  {
004a3b89                      _valid_locations = 1;
004a3b8c                      return 1;
004a3b85                  }
004a3b6e              }
004a3b61          }
004a3b56      }
004a3b56      
004a3bac      _valid_locations = 0;
004a3baf      return 0;
004a3b10  }

004a3bb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004a3bc0  void __fastcall gmPaperDollUI::RedressCreature(class gmPaperDollUI* this)

004a3bc0  {
004a3bc2      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a3bc2      
004a3bcc      if (SmartBox::smartbox_1 != 0)
004a3bcc      {
004a3bda          if ((this->m_pInventoryObject == 0 && SmartBox::smartbox_1->player != 0))
004a3bda          {
004a3bf3              class CPhysicsObj* eax_5 = CPhysicsObj::makeObject(ClientObjMaintSystem::GetPhysicsObject(SmartBox::smartbox_1->player_id));
004a3c04              this->m_pInventoryObject = eax_5;
004a3c0a              CPhysicsObj::set_heading(eax_5, 191.367905f, 1);
004a3c22              CPhysicsObj::set_sequence_animation(this->m_pInventoryObject, this->m_didAnimation.id, 1, 1, 0f);
004a3c27              class UIElement_Viewport* m_pPaperDoll = this->m_pPaperDoll;
004a3c27              
004a3c2f              if (m_pPaperDoll != 0)
004a3c3e                  CreatureMode::AddObject(&m_pPaperDoll->creature_mode_objects, this->m_pInventoryObject);
004a3bda          }
004a3bda          
004a3c4b          if ((this->m_pInventoryObject != 0 || this->m_pInventoryObject != 0))
004a3c4b          {
004a3c4f              class VisualDesc* eax_8 = SmartBox::get_player_visualdesc(SmartBox::smartbox_1);
004a3c5b              CPhysicsObj::DoObjDescChangesFromDefault(this->m_pInventoryObject, eax_8);
004a3c4b          }
004a3bcc      }
004a3bc0  }

004a3c63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a3c70  void __fastcall gmPaperDollUI::EndPartSelectionLighting(class gmPaperDollUI* this)

004a3c70  {
004a3c73      class CPhysicsObj* m_pInventoryObject = this->m_pInventoryObject;
004a3c7d      this->m_cFlipCount = 0;
004a3c83      this->m_selectionMask = 0;
004a3c83      
004a3c89      if (m_pInventoryObject != 0)
004a3c8b          CPhysicsObj::RestoreLighting(m_pInventoryObject);
004a3c8b      
004a3c94      UIListener::UnRegisterForGlobalMessage(this, 3);
004a3c70  }

004a3c9b                                                                                   90 90 90 90 90                             .....

004a3ca0  void __thiscall gmPaperDollUI::ApplyPartSelectionLighting(class gmPaperDollUI* this, uint32_t arg2, float arg3, float arg4)

004a3ca0  {
004a3ca3      class CPhysicsObj* m_pInventoryObject = this->m_pInventoryObject;
004a3ca3      
004a3cab      if (m_pInventoryObject != 0)
004a3cab      {
004a3cb9          if (arg2 == 0x7fffffff)
004a3cb9          {
004a3cc5              CPhysicsObj::SetLighting(m_pInventoryObject, arg3, arg4);
004a3ccb              return;
004a3cb9          }
004a3cb9          
004a3cdf          if ((this->m_selectionMask & 1) != 0)
004a3ce5              CPhysicsObj::SetPartLighting(m_pInventoryObject, 0x10, arg3, arg4);
004a3ce5          
004a3cea          uint16_t m_selectionMask = ((int16_t)this->m_selectionMask);
004a3cea          
004a3cf7          if (((m_selectionMask & 2) != 0 || (*(uint8_t*)((char*)m_selectionMask)[1] & 2) != 0))
004a3d03              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 9, arg3, arg4);
004a3d03          
004a3d08          uint16_t m_selectionMask_1 = ((int16_t)this->m_selectionMask);
004a3d08          
004a3d15          if (((m_selectionMask_1 & 4) != 0 || (*(uint8_t*)((char*)m_selectionMask_1)[1] & 4) != 0))
004a3d21              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 0, arg3, arg4);
004a3d21          
004a3d26          uint16_t m_selectionMask_2 = ((int16_t)this->m_selectionMask);
004a3d26          
004a3d33          if (((m_selectionMask_2 & 8) != 0 || (*(uint8_t*)((char*)m_selectionMask_2)[1] & 8) != 0))
004a3d33          {
004a3d3f              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 0xa, arg3, arg4);
004a3d4e              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 0xd, arg3, arg4);
004a3d33          }
004a3d33          
004a3d53          uint16_t m_selectionMask_3 = ((int16_t)this->m_selectionMask);
004a3d53          
004a3d60          if (((m_selectionMask_3 & 0x10) != 0 || (*(uint8_t*)((char*)m_selectionMask_3)[1] & 0x10) != 0))
004a3d60          {
004a3d6c              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 0xb, arg3, arg4);
004a3d7b              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 0xe, arg3, arg4);
004a3d60          }
004a3d60          
004a3d80          uint16_t m_selectionMask_4 = ((int16_t)this->m_selectionMask);
004a3d80          
004a3d8d          if (((m_selectionMask_4 & 0x40) != 0 || (*(uint8_t*)((char*)m_selectionMask_4)[1] & 0x20) != 0))
004a3d8d          {
004a3d99              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 1, arg3, arg4);
004a3da8              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 5, arg3, arg4);
004a3d8d          }
004a3d8d          
004a3dad          uint16_t m_selectionMask_5 = ((int16_t)this->m_selectionMask);
004a3dad          
004a3dba          if ((m_selectionMask_5 < 0 || (*(uint8_t*)((char*)m_selectionMask_5)[1] & 0x40) != 0))
004a3dba          {
004a3dc6              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 2, arg3, arg4);
004a3dd5              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 6, arg3, arg4);
004a3dba          }
004a3dba          
004a3de1          if ((this->m_selectionMask & 0x20) != 0)
004a3de1          {
004a3ded              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 0xc, arg3, arg4);
004a3dfc              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 0xf, arg3, arg4);
004a3de1          }
004a3de1          
004a3e0a          if ((*(uint8_t*)((char*)((int16_t)this->m_selectionMask))[1] & 1) != 0)
004a3e0a          {
004a3e16              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 3, arg3, arg4);
004a3e25              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 7, arg3, arg4);
004a3e34              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 4, arg3, arg4);
004a3e43              CPhysicsObj::SetPartLighting(this->m_pInventoryObject, 8, arg3, arg4);
004a3e0a          }
004a3cab      }
004a3ca0  }

004a3e4e                                            90 90                                                                ..

004a3e50  void __thiscall gmPaperDollUI::UpdateAetheria(class gmPaperDollUI* this, class CWeenieObject* arg2)

004a3e50  {
004a3e50      class gmPaperDollUI* this_1 = this;
004a3e6e      class CBaseQualities* ecx_2 = (*(int32_t*)((char*)arg2 + 0x14c) + 0x38);
004a3e71      this_1 = nullptr;
004a3e79      CBaseQualities::InqInt(ecx_2, 0x142, &this_1, 0, 0);
004a3e7e      class gmPaperDollUI* this_2 = this_1;
004a3e82      this->m_sigilOneItem->vtable->SetVisible((this_2 & 0xffffff01));
004a3ea7      int32_t edx_1;
004a3ea7      edx_1 = (this_2 & 2) != 0;
004a3e9d      this->m_sigilTwoItem->vtable->SetVisible(edx_1);
004a3eb8      int32_t edx_2;
004a3eb8      edx_2 = (this_2 & 4) != 0;
004a3eae      this->m_sigilThreeItem->vtable->SetVisible(edx_2);
004a3e50  }

004a3ec6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a3ed0  void __thiscall gmPaperDollUI::UpdateForRace(class gmPaperDollUI* this, uint32_t arg2)

004a3ed0  {
004a3ee3      int32_t* ecx;
004a3ee3      int32_t* edx_1;
004a3ee3      
004a3ee3      if ((arg2 - 6) <= 7)
004a3ee9          switch (arg2)
004a3ee9          {
004a3ef4              case 6:
004a3ef4              case 7:
004a3ef4              {
004a3ef9                  int32_t var_78 = 0;
004a3f01                  int32_t var_74_1 = 0;
004a3f09                  int32_t var_70_1 = 0;
004a3f11                  int32_t var_6c = 0x3df5c28f;
004a3f19                  int32_t var_68_1 = 0xc0400000;
004a3f21                  int32_t var_64_1 = 0x3f6147ae;
004a4084                  UIElement_Viewport::SetCamera(this->m_pPaperDoll, &var_6c, &var_78);
004a3ef4                  break;
004a3ef4              }
004a3f6e              case 8:
004a3f6e              {
004a3f6e                  int32_t var_48 = 0;
004a3f76                  int32_t var_44_1 = 0;
004a3f7e                  int32_t var_40_1 = 0;
004a3f86                  int32_t var_3c = 0x3df5c28f;
004a3f8e                  int32_t var_38_1 = 0xc059999a;
004a3f96                  int32_t var_34_1 = 0x3f800000;
004a3f9e                  ecx = &var_48;
004a3fa2                  edx_1 = &var_3c;
004a407c              label_4a407c:
004a4084                  UIElement_Viewport::SetCamera(this->m_pPaperDoll, edx_1, ecx);
004a3f6e                  break;
004a3f6e              }
004a3f33              case 9:
004a3f33              {
004a3f38                  int32_t var_60 = 0;
004a3f40                  int32_t var_5c_1 = 0;
004a3f48                  int32_t var_58_1 = 0;
004a3f50                  int32_t var_54 = 0x3df5c28f;
004a3f58                  int32_t var_50_1 = 0xc059999a;
004a3f60                  int32_t var_4c_1 = 0x3f6147ae;
004a4084                  UIElement_Viewport::SetCamera(this->m_pPaperDoll, &var_54, &var_60);
004a3f33                  break;
004a3f33              }
004a3fbc              case 0xc:
004a3fbc              {
004a3fbc                  void __return;
004a3fbc                  class IDClass<_tagDataID,32,0> id = DBObj::GetDIDByEnum(&__return, 0x10000011, 7)->id;
004a3fce                  this->m_didAnimation.id = id;
004a3fd4                  CPhysicsObj::set_sequence_animation(this->m_pInventoryObject, id, 1, 1, 0f);
004a3fd9                  int32_t var_30 = 0;
004a3fe1                  int32_t var_2c_1 = 0;
004a3fe9                  int32_t var_28_1 = 0;
004a3ff1                  int32_t var_24 = 0x3df5c28f;
004a3ff9                  int32_t var_20_1 = 0xc059999a;
004a4001                  int32_t var_1c_1 = 0x3f6147ae;
004a4009                  ecx = &var_30;
004a400d                  edx_1 = &var_24;
004a4011                  goto label_4a407c;
004a3fbc              }
004a4024              case 0xd:
004a4024              {
004a4024                  void __return_1;
004a4024                  uint32_t id_1 = DBObj::GetDIDByEnum(&__return_1, 0x10000013, 7)->id;
004a4036                  this->m_didAnimation.id = id_1;
004a403c                  CPhysicsObj::set_sequence_animation(this->m_pInventoryObject, id_1, 1, 1, 0f);
004a4041                  int32_t var_18 = 0;
004a4049                  int32_t var_14_1 = 0;
004a4051                  int32_t var_10_1 = 0;
004a4059                  int32_t var_c = 0x3df5c28f;
004a4061                  int32_t var_8_1 = 0xc059999a;
004a4069                  int32_t var_4_1 = 0x3f6147ae;
004a4074                  ecx = &var_18;
004a4078                  edx_1 = &var_c;
004a4078                  goto label_4a407c;
004a4024              }
004a3ee9          }
004a3ed0  }

004a4093                                                           90                                                         .
004a4094  uint32_t jump_table_4a4094[0x8] = 
004a4094  {
004a4094      [0x0] =  0x004a3ef0
004a4098      [0x1] =  0x004a3ef0
004a409c      [0x2] =  0x004a3f6e
004a40a0      [0x3] =  0x004a3f2f
004a40a4      [0x4] =  0x004a4089
004a40a8      [0x5] =  0x004a4089
004a40ac      [0x6] =  0x004a3fab
004a40b0      [0x7] =  0x004a4013
004a40b4  }

004a40b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004a40c0  void __thiscall gmPaperDollUI::gmPaperDollUI(class gmPaperDollUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004a40c0  {
004a40cf      UIElement_Field::UIElement_Field(this, arg2, arg3);
004a40d4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a40de      this->vtable = &QualityChangeHandler::`vftable';
004a40e8      this->vtable = &ItemListDragHandler::`vftable';
004a4100      this->vtable = &gmPaperDollUI::`vftable';
004a4106      this->vtable = &gmPaperDollUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004a4110      this->vtable = &gmPaperDollUI::`vftable'.OnAction;
004a411a      this->vtable = &gmPaperDollUI::`vftable';
004a4124      __builtin_memset(&this->m_neckSlot, 0, 0x68);
004a41c0      __builtin_memset(&this->m_dragIcon, 0, 0x18);
004a41e4      this->m_clickMap = nullptr;
004a41ea      this->m_cFlipCount = 0;
004a41f0      this->m_timeNextFlip = 0f;
004a41f6      *(uint32_t*)((char*)this->m_timeNextFlip)[4] = 0;
004a41fc      this->m_selectionMask = 0;
004a4209      this->m_didAnimation.id = DBObj::GetDIDByEnum(&arg3, 0x10000005, 7)->id;
004a40c0  }

004a4218                                                                          90 90 90 90 90 90 90 90                          ........

004a4220  void* __thiscall gmPaperDollUI::`scalar deleting destructor'(class gmPaperDollUI* this, uint32_t arg2)

004a4220  {
004a4223      gmPaperDollUI::~gmPaperDollUI(this);
004a4223      
004a422d      if ((arg2 & 1) != 0)
004a4230          operator delete(this);
004a4230      
004a423b      return this;
004a4220  }

004a423e                                                                                            90 90                                ..

004a4240  class UIElement* gmPaperDollUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a4240  {
004a4245      void* eax = operator new(0x6a8);
004a4245      
004a424f      if (eax == 0)
004a4265          return 0;
004a4265      
004a4262      return gmPaperDollUI::gmPaperDollUI(eax, arg1, arg2);
004a4240  }

004a4266                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a4270  uint8_t __thiscall gmPaperDollUI::OnItemListDragOver(class gmPaperDollUI* this, class UIElement_UIItem* arg2, uint32_t arg3, uint32_t arg4, enum DropItemFlags arg5)

004a4270  {
004a4270      class gmPaperDollUI* this_1 = this;
004a4277      uint32_t esi = 0;
004a4289      uint32_t eax;
004a4289      
004a4289      if ((arg3 != 0 && (arg5 & 0xe) == 0))
004a4289      {
004a4295          uint32_t edi_1 = ClientObjMaintSystem::GetWeenieObject(arg3);
004a4295          
004a429c          if (edi_1 != 0)
004a429c          {
004a42a2              eax = CPlayerSystem::GetPlayerSystem();
004a42a2              
004a42ad              if (eax != 0)
004a42ad              {
004a42b4                  class UIElement_UIItem* ebx_1 = arg2;
004a42b8                  struct UIElement_UIItem::VTable* vtable = ebx_1->vtable;
004a42bc                  arg5 = DROPITEM_FLAGS_NONE;
004a42bc                  
004a42c8                  if (vtable->GetParent() != 0)
004a42d4                      esi = *(uint32_t*)(ebx_1->vtable->GetParent() + 0x2e4);
004a42d4                  
004a42eb                  gmPaperDollUI::GetLocationInfoFromElementID(((char*)this - 0x600), esi, &arg5, &arg2);
004a42f0                  enum DropItemFlags ecx_3 = arg5;
004a42fa                  int32_t eax_3 = *(uint32_t*)(edi_1 + 0xc0);
004a42fa                  
004a4307                  if ((ecx_3 == 0x200000 && (eax_3 & 0x100000) != 0))
004a4309                      eax_3 |= ecx_3;
004a4309                  
004a430d                  if (((ecx_3 & eax_3) != 0 && CPlayerSystem::AutoWieldIsLegal(eax, arg3, 1) != 0))
004a430d                  {
004a432a                      UIElement_UIItem::SetDragAcceptState(ebx_1, 0x10000040);
004a4332                      int32_t eax_5;
004a4332                      eax_5 = 1;
004a4336                      return 1;
004a430d                  }
004a430d                  
004a4340                  UIElement_UIItem::SetDragAcceptState(ebx_1, 0x10000041);
004a42ad              }
004a429c          }
004a4289      }
004a4289      
004a4348      eax = 1;
004a434c      return 1;
004a4270  }

004a434f                                               90                                                                 .

004a4350  void __fastcall gmPaperDollUI::RecvNotice_PlayerObjDescChanged(class gmPaperDollUI* this)

004a4350  {
004a4356      /* tailcall */
004a4356      return gmPaperDollUI::RedressCreature(((char*)this - 0x5f8));
004a4350  }

004a435b                                                                                   90 90 90 90 90                             .....

004a4360  void __fastcall gmPaperDollUI::UpdatePartSelectionLighting(class gmPaperDollUI* this)

004a4360  {
004a4363      uint32_t m_cFlipCount = this->m_cFlipCount;
004a4363      
004a436b      if (m_cFlipCount != 0)
004a436b      {
004a436d          long double x87_r7_1 = ((long double)Timer::cur_time);
004a4373          long double temp0_1 = ((long double)this->m_timeNextFlip);
004a4373          (x87_r7_1 - temp0_1);
004a4373          
004a437e          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004a437e          {
004a4383              float eax_5;
004a4383              float ecx_2;
004a4383              
004a4383              if (m_cFlipCount == 1)
004a4383              {
004a439d                  eax_5 = 1f;
004a43a2                  ecx_2 = 0.99000001f;
004a4383              }
004a4383              else
004a4383              {
004a4386                  if (m_cFlipCount != 2)
004a438b                      /* tailcall */
004a438b                      return gmPaperDollUI::EndPartSelectionLighting(this);
004a438b                  
004a4390                  eax_5 = 0.349999994f;
004a4395                  ecx_2 = 0f;
004a4383              }
004a4383              
004a43b3              gmPaperDollUI::ApplyPartSelectionLighting(this, this->m_selectionMask, ecx_2, eax_5);
004a43bf              this->m_cFlipCount += 1;
004a43d1              this->m_timeNextFlip = ((double)(((long double)Timer::cur_time) + ((long double)0.20000000000000001)));
004a437e          }
004a436b      }
004a4360  }

004a43d9                                                                             90 90 90 90 90 90 90                           .......

004a43e0  void __fastcall gmPaperDollUI::RecvNotice_PlayerDescReceived(class gmPaperDollUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004a43e0  {
004a43e0      class gmPaperDollUI* this_1 = this;
004a43f4      struct CBaseQualities::VTable** ebp_1 = &arg2->vtable;
004a43fe      this_1 = nullptr;
004a4406      CBaseQualities::InqInt(ebp_1, 0x142, &this_1, 0, 0);
004a440b      class gmPaperDollUI* this_2 = this_1;
004a4427      *(uint32_t*)(*(uint32_t*)this->m_box.m_x1 + 0x18)((this_2 & 0xffffff01));
004a4434      int32_t edx_1;
004a4434      edx_1 = (this_2 & 2) != 0;
004a4438      *(uint32_t*)(*(uint32_t*)this->m_box.m_y1 + 0x18)(edx_1);
004a4445      int32_t edx_2;
004a4445      edx_2 = (this_2 & 4) != 0;
004a4449      *(uint32_t*)(*(uint32_t*)this->m_ptTilingOffset.x + 0x18)(edx_2);
004a445c      arg2 = nullptr;
004a4464      CBaseQualities::InqInt(ebp_1, 0xbc, &arg2, 0, 0);
004a4474      gmPaperDollUI::UpdateForRace(((char*)this - 0x5f8), arg2);
004a43e0  }

004a4481     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004a4490  void __thiscall gmPaperDollUI::OnQualityChanged(class gmPaperDollUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004a4490  {
004a449b      gmPaperDollUI::UpdateAetheria(((char*)this - 0x5fc), arg2);
004a4490  }

004a44a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a44b0  class InventoryPlacement* InventoryPlacement::DetermineHigherPriority(class InventoryPlacement* arg1, class InventoryPlacement* arg2, uint32_t arg3)

004a44b0  {
004a44c1      uint32_t priority_ = arg2->priority_;
004a44c8      uint32_t ecx_1 = (arg1->loc_ & arg3);
004a44ca      uint32_t esi_1 = (arg2->loc_ & arg3);
004a44cf      uint32_t priority__1 = arg1->priority_;
004a44cf      
004a44f3      if ((ecx_1 != 0 && (priority__1 == 0 && (ecx_1 >= 0x200 && ecx_1 <= 0x4000))))
004a44f5          priority__1 = 0x7f;
004a44f5      
004a4500      if ((esi_1 == 0 || priority_ != 0))
004a44fc          goto label_4a4517;
004a44fc      
004a4510      if ((esi_1 >= 0x200 && esi_1 <= 0x4000))
004a4510      {
004a4512          priority_ = 0x7f;
004a4517      label_4a4517:
004a4517          
004a4519          if (priority_ > priority__1)
004a451b              return arg2;
004a4510      }
004a4510      
004a4521      return arg1;
004a44b0  }

004a4522        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004a4530  int32_t __fastcall ACCWeenieObject::IsContainer(class ACCWeenieObject const* this)

004a4530  {
004a454e      if (((this->pwd._bitfield & "activation type (%s) with '%s' b…") == 0 && (this->pwd._itemsCapacity == 0 && this->pwd._containersCapacity == 0)))
004a4552          return 0;
004a4552      
004a4558      return 1;
004a4530  }

004a4559                                                                             90 90 90 90 90 90 90                           .......

004a4560  void gmPaperDollUI::Register()

004a4560  {
004a456a      UIElement::RegisterElementClass(0x10000024, gmPaperDollUI::Create);
004a4560  }

004a4573                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a4580  uint8_t __thiscall gmPaperDollUI::PrepareDragIcon(class gmPaperDollUI* this, uint32_t arg2)

004a4580  {
004a4585      uint32_t ebp = arg2;
004a4585      
004a4590      if (ebp == 0)
004a4590      {
004a4741          int32_t eax;
004a4741          eax = 0;
004a4747          return 0;
004a4590      }
004a4590      
004a459d      char var_14 = 0;
004a45a1      UIRegion::ClearImage(this->m_dragIcon);
004a45a7      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(ebp);
004a45a7      
004a45b3      if (eax_1 != 0)
004a45b3      {
004a45bd          UIRegion::SetBlitMode(this->m_dragIcon, Blit_3Alpha);
004a45c4          void* eax_2 = operator new(0xc);
004a45d0          class Graphic* eax_4;
004a45d0          
004a45d0          if (eax_2 == 0)
004a45e3              eax_4 = nullptr;
004a45d0          else
004a45dc              eax_4 = Graphic::Graphic(eax_2, ACCWeenieObject::GetDragIcon(eax_1));
004a45dc          
004a45ec          UIRegion::SetImage(this->m_dragIcon, eax_4);
004a460b          int32_t eax_5;
004a460b          
004a460b          if ((((eax_1->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || eax_1->pwd._itemsCapacity != 0) || eax_1->pwd._containersCapacity != 0))
004a4611              eax_5 = 1;
004a460b          else
004a460d              eax_5 = 0;
004a460d          
004a4616          ebp = arg2;
004a461c          eax_5 = eax_5 != 0;
004a461f          var_14 = eax_5;
004a45b3      }
004a45b3      
004a462c      int32_t* var_8 = nullptr;
004a4630      int32_t* var_4 = nullptr;
004a4634      BaseProperty::SetPropertyName(&var_8, 0x1000000f);
004a4634      
004a463d      if (var_4 != 0)
004a463d      {
004a4643          BaseProperty::CheckCopyOnWrite(&var_8);
004a464f          *(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(ebp);
004a463d      }
004a463d      
004a4652      this->m_dragIcon->vtable->SetProperty(&var_8);
004a466e      int32_t* var_10 = nullptr;
004a4672      int32_t* var_c = nullptr;
004a4676      BaseProperty::SetPropertyName(&var_10, 0x10000011);
004a4676      
004a467f      if (var_c != 0)
004a467f      {
004a4685          BaseProperty::CheckCopyOnWrite(&var_10);
004a4695          *(uint32_t*)(*(uint32_t*)var_c + 0x74)(var_14);
004a467f      }
004a467f      
004a4698      this->m_dragIcon->vtable->SetProperty(&var_10);
004a46ab      int32_t* eax_9 = var_10;
004a46ab      
004a46b1      if (eax_9 != 0)
004a46b1      {
004a46bb          int32_t esi_2 = (eax_9[1] - 1);
004a46b8          eax_9[1] = esi_2;
004a46b8          
004a46c2          if (esi_2 == 0)
004a46c8              **(uint32_t**)eax_9(1);
004a46c8          
004a46ca          var_10 = nullptr;
004a46b1      }
004a46b1      
004a46d4      if (var_c != 0)
004a46d4      {
004a46de          int32_t esi_4 = (var_c[1] - 1);
004a46db          var_c[1] = esi_4;
004a46db          
004a46e5          if (esi_4 == 0)
004a46eb              **(uint32_t**)var_c(1);
004a46eb          
004a46ed          int32_t var_c_1 = 0;
004a46d4      }
004a46d4      
004a46f1      int32_t* eax_14 = var_8;
004a46f1      
004a46f7      if (eax_14 != 0)
004a46f7      {
004a4701          int32_t esi_6 = (eax_14[1] - 1);
004a46fe          eax_14[1] = esi_6;
004a46fe          
004a4708          if (esi_6 == 0)
004a470e              **(uint32_t**)eax_14(1);
004a470e          
004a4710          var_8 = nullptr;
004a46f7      }
004a46f7      
004a471a      if (var_4 != 0)
004a471a      {
004a4724          int32_t esi_8 = (var_4[1] - 1);
004a4721          var_4[1] = esi_8;
004a4721          
004a472b          if (esi_8 == 0)
004a4731              **(uint32_t**)var_4(1);
004a471a      }
004a471a      
004a4736      int32_t* eax_17;
004a4736      eax_17 = 1;
004a473c      return 1;
004a4580  }

004a474a                                90 90 90 90 90 90                                                            ......

004a4750  uint32_t __stdcall gmPaperDollUI::GetUpperInvObj(class gmPaperDollUI* this @ ecx, uint32_t arg2)

004a4750  {
004a4750      class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
004a475d      uint32_t player_id;
004a475d      
004a475d      if (SmartBox::smartbox_2 == 0)
004a4767          player_id = 0;
004a475d      else
004a475f          player_id = SmartBox::smartbox_2->player_id;
004a475f      
004a476a      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(player_id);
004a476a      
004a4774      if (eax == 0)
004a477c          return 0;
004a477c      
004a4787      if (arg2 != 0)
004a4787      {
004a4796          class PackableList<InventoryPlacement>* eax_3 = ACCWeenieObject::GetInvPlacementList(eax);
004a4796          
004a479d          if (eax_3 != 0)
004a479d          {
004a47a6              int32_t var_10 = 0x7aba64;
004a47aa              int32_t var_c_1 = 0;
004a47ae              int32_t var_8_1 = 0;
004a47b2              int32_t var_4_1 = 0;
004a47b6              int32_t var_20 = 0x7aba64;
004a47ba              int32_t var_1c_1 = 0;
004a47be              int32_t var_18_1 = 0;
004a47c2              int32_t var_14_1 = 0;
004a47c6              class PackableLLNode<InventoryPlacement>* i = eax_3->head;
004a47c6              
004a47cb              if (i != 0)
004a47cb              {
004a47cd                  uint32_t iid__1 = 0;
004a47cd                  
004a4816                  do
004a4816                  {
004a47d3                      uint32_t iid_ = i->data.iid_;
004a47d7                      uint32_t loc__1 = i->data.loc_;
004a47dc                      uint32_t loc__2 = loc__1;
004a47e3                      uint32_t priority_ = i->data.priority_;
004a47e3                      
004a47e7                      if ((arg2 & loc__1) != 0)
004a47e7                      {
004a47f4                          class InventoryPlacement* eax_5 = InventoryPlacement::DetermineHigherPriority(&var_20, &var_10, arg2);
004a47f9                          iid__1 = eax_5->iid_;
004a47fc                          uint32_t iid__2 = iid__1;
004a4803                          uint32_t loc_ = eax_5->loc_;
004a480d                          uint32_t priority__1 = eax_5->priority_;
004a47e7                      }
004a47e7                      
004a4811                      i = i->next;
004a4816                  } while (i != 0);
004a4816                  
004a481a                  if (iid__1 != 0)
004a4840                      return iid__1;
004a47cb              }
004a47cb              
004a481c              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a481c              
004a4823              if (SmartBox::smartbox_1 != 0)
004a4835                  return SmartBox::smartbox_1->player_id;
004a479d          }
004a4787      }
004a4787      
004a4791      return 0;
004a4750  }

004a4843           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a4850  void __fastcall gmPaperDollUI::CreateClickMap(class gmPaperDollUI* this)

004a4850  {
004a4857      class RenderSurface* m_clickMap = this->m_clickMap;
004a4857      
004a485f      if (m_clickMap != 0)
004a485f      {
004a4861          m_clickMap->vtable->Release();
004a4866          this->m_clickMap = nullptr;
004a485f      }
004a485f      
004a487c      class IDClass<_tagDataID,32,0> __return;
004a487c      DBObj::GetDIDByEnum(&__return, 0x1000000c, 7);
004a4895      void var_8;
004a4895      class DBObj* eax_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, __return, 0xc));
004a4895      
004a48a1      if (eax_3 != 0)
004a48a1      {
004a48ab          class RenderSurface* eax_5 = RenderDevice::render_device->vtable->CreateLocalSurface();
004a48b0          this->m_clickMap = eax_5;
004a48b0          
004a48b6          if (((eax_5 != 0 && eax_5->vtable->Create(*(int32_t*)((char*)eax_3 + 0xa0), *(int32_t*)((char*)eax_3 + 0xa4), *(int32_t*)((char*)eax_3 + 0xdc), 1) != 0) && SurfaceWindow::Blit(&this->m_clickMap->window, ((char*)eax_3 + 0xac), Blit_Normal, 1f) != 0))
004a48b6          {
004a4903              eax_3->vtable->Release();
004a490d              return;
004a48b6          }
004a48b6          
004a4910          eax_3->vtable->Release();
004a48a1      }
004a4850  }

004a491b                                                                                   90 90 90 90 90                             .....

004a4920  uint32_t __thiscall gmPaperDollUI::GetPaperDollItemUnderMouse(class gmPaperDollUI* this, int32_t arg2, int32_t arg3)

004a4920  {
004a4926      class UIElement* m_paperDollDragMask = this->m_paperDollDragMask;
004a4926      
004a4938      if ((m_paperDollDragMask == 0 || this->m_clickMap == 0))
004a4940          return 0;
004a4940      
004a4944      int32_t eax_3 = UIRegion::GetScreenX0(m_paperDollDragMask);
004a495e      int32_t ecx_2 = (arg3 - UIRegion::GetScreenY0(this->m_paperDollDragMask));
004a497a      void var_10;
004a497a      
004a497a      if (SurfaceWindow::GetColorFromPoint(&this->m_clickMap->window, &var_10, (arg2 - eax_3), ecx_2) == 0)
004a4983          return 0;
004a4983      
004a498f      uint32_t esi_2 = 0;
004a498f      
004a4998      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Head) != 0)
004a499a          esi_2 = 1;
004a499a      
004a49af      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Chest) != 0)
004a49b1          esi_2 = 0x202;
004a49b1      
004a49c6      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Abdomen) != 0)
004a49c8          esi_2 = 0x404;
004a49c8      
004a49dd      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Upper_Arm) != 0)
004a49df          esi_2 = 0x808;
004a49df      
004a49f4      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Lower_Arm) != 0)
004a49f6          esi_2 = 0x1010;
004a49f6      
004a4a0b      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Upper_Leg) != 0)
004a4a0d          esi_2 = 0x2040;
004a4a0d      
004a4a22      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Lower_Leg) != 0)
004a4a24          esi_2 = 0x4080;
004a4a24      
004a4a39      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Hand) != 0)
004a4a3b          esi_2 = 0x20;
004a4a3b      
004a4a50      if (RGBAColor::operator==(&var_10, &RGBAColor_HitTest_Foot) != 0)
004a4a52          esi_2 = 0x100;
004a4a52      
004a4a64      return gmPaperDollUI::GetUpperInvObj(this, esi_2);
004a4920  }

004a4a67                       90 90 90 90 90 90 90 90 90                                                         .........

004a4a70  uint8_t __stdcall gmPaperDollUI::AcceptPaperDollDragObject(class gmPaperDollUI* this @ ecx, uint32_t arg2)

004a4a70  {
004a4a81      class ACCWeenieObject* esi = ClientObjMaintSystem::GetWeenieObject(arg2);
004a4a88      class ACCWeenieObject* eax;
004a4a88      
004a4a88      if (esi != 0)
004a4a88      {
004a4a94          if ((esi->pwd._valid_locations & 0x8007fff) != 0)
004a4a94          {
004a4b0e              if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
004a4b0e              {
004a4b10                  eax = CPlayerSystem::GetPlayerSystem();
004a4b10                  
004a4b17                  if (eax != 0)
004a4b17                  {
004a4b1f                      int32_t var_94 = 0;
004a4b3f                      return CPlayerSystem::AutoWear(eax, esi->id, &var_94, 0) != 0;
004a4b17                  }
004a4b0e              }
004a4a94          }
004a4a94          else
004a4a94          {
004a4a9a              void var_90;
004a4a9a              StringInfo::StringInfo(&var_90);
004a4aa8              void* var_98;
004a4aa8              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, &gmPaperDollUI::`vftable'.RecvNotice_AddSalvageItem);
004a4ab8              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004a4ac1              int32_t* esi_2 = ((char*)var_98 - 0x14);
004a4ac1              
004a4ad4              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004a4adc                  **(uint32_t**)esi_2(1);
004a4adc              
004a4ae5              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004a4af1              StringInfo::~StringInfo(&var_90);
004a4a94          }
004a4a88      }
004a4a88      
004a4af6      eax = 0;
004a4aff      return 0;
004a4a70  }

004a4b42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004a4b50  uint32_t __thiscall gmPaperDollUI::GetSelectionMaskFromObject(class gmPaperDollUI* this, uint32_t arg2)

004a4b50  {
004a4b50      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a4b57      int32_t result = 0;
004a4b5e      uint32_t player_id;
004a4b5e      
004a4b5e      if (SmartBox::smartbox_1 == 0)
004a4b68          player_id = 0;
004a4b5e      else
004a4b60          player_id = SmartBox::smartbox_1->player_id;
004a4b60      
004a4b70      if (arg2 == player_id)
004a4b7a          return 0x7fffffff;
004a4b7a      
004a4b8b      if (gmPaperDollUI::GetUpperInvObj(this, 0x404) == arg2)
004a4b8d          result = 4;
004a4b8d      
004a4ba0      if (gmPaperDollUI::GetUpperInvObj(this, 0x2040) == arg2)
004a4ba2          result |= 0x40;
004a4ba2      
004a4bb3      if (gmPaperDollUI::GetUpperInvObj(this, 0x4080) == arg2)
004a4bb5          result |= 0x80;
004a4bb5      
004a4bc9      if (gmPaperDollUI::GetUpperInvObj(this, 0x100) == arg2)
004a4bcb          result |= 0x100;
004a4bcb      
004a4bdf      if (gmPaperDollUI::GetUpperInvObj(this, 0x202) == arg2)
004a4be1          result |= 2;
004a4be1      
004a4bf2      if (gmPaperDollUI::GetUpperInvObj(this, 0x808) == arg2)
004a4bf4          result |= 8;
004a4bf4      
004a4c05      if (gmPaperDollUI::GetUpperInvObj(this, 0x1010) == arg2)
004a4c07          result |= 0x10;
004a4c07      
004a4c15      if (gmPaperDollUI::GetUpperInvObj(this, 0x20) == arg2)
004a4c17          result |= 0x20;
004a4c17      
004a4c28      if (gmPaperDollUI::GetUpperInvObj(this, 0x404) == arg2)
004a4c2a          result |= 4;
004a4c2a      
004a4c38      if (gmPaperDollUI::GetUpperInvObj(this, 1) != arg2)
004a4c42          return result;
004a4c42      
004a4c3a      return (result | 1);
004a4b50  }

004a4c45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004a4c50  void __thiscall gmPaperDollUI::BeginPartSelectionLighting(class gmPaperDollUI* this, uint32_t arg2)

004a4c50  {
004a4c58      uint32_t eax = gmPaperDollUI::GetSelectionMaskFromObject(this, arg2);
004a4c58      
004a4c5f      if (eax != 0)
004a4c5f      {
004a4c61          this->m_cFlipCount = 1;
004a4c77          this->m_timeNextFlip = (*(uint32_t*)Timer::cur_time);
004a4c7d          class CPhysicsObj* m_pInventoryObject = this->m_pInventoryObject;
004a4c85          *(uint32_t*)((char*)this->m_timeNextFlip)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004a4c8b          this->m_selectionMask = eax;
004a4c8b          
004a4c91          if (m_pInventoryObject != 0)
004a4c91          {
004a4c93              CPhysicsObj::RestoreLighting(m_pInventoryObject);
004a4c9c              UIListener::RegisterForGlobalMessage(this, 3);
004a4c91          }
004a4c5f      }
004a4c50  }

004a4ca5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004a4cb0  void __thiscall gmPaperDollUI::ListenToGlobalMessage(class gmPaperDollUI* this, uint32_t arg2, int32_t arg3)

004a4cb0  {
004a4cb0      uint32_t eax_3 = arg2;
004a4cbb      uint32_t ebp;
004a4cbb      uint32_t var_1c = ebp;
004a4cbd      int32_t __saved_edi;
004a4cbd      int32_t* esp = &__saved_edi;
004a4cbd      
004a4cc0      if (eax_3 == 3)
004a4d71          gmPaperDollUI::UpdatePartSelectionLighting(this);
004a4cc0      else if (eax_3 == 0xb)
004a4cc9      {
004a4cd3          uint32_t* var_28_1 = &arg2;
004a4cda          struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004a4ce0          int32_t var_14_1 = 0;
004a4ce4          arg2 = 0;
004a4cef          class TResult __return;
004a4cef          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28_1);
004a4cf4          uint32_t edi_1 = arg2;
004a4cfd          var_2c = edi_1;
004a4cff          int32_t var_28_2 = 0;
004a4d02          struct Turbine_GUID* eax_1 = var_2c;
004a4d06          int32_t var_8 = 0;
004a4d0a          int32_t var_4_1 = 0;
004a4d0a          
004a4d0e          if (eax_1 != 0)
004a4d14              *(uint32_t*)(eax_1->m_data1 + 0x10)();
004a4d14          
004a4d20          esp = &var_2c;
004a4d27          void var_c;
004a4d27          int32_t ebx_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004a4d27          
004a4d29          if (edi_1 != 0)
004a4d2f              *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
004a4d2f          
004a4d32          class TResult __return_1 = __return;
004a4d32          
004a4d38          if (__return_1 != 0)
004a4d38          {
004a4d3c              if (ebx_1 >= 0)
004a4d3c              {
004a4d4d                  CBaseQualities::InqInt((__return_1 + 0x38), 0xbc, &var_1c, 0, 0);
004a4d59                  gmPaperDollUI::UpdateForRace(this, var_1c);
004a4d3c              }
004a4d3c              
004a4d62              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004a4d6c              return;
004a4d38          }
004a4cc9      }
004a4cc9      
004a4d76      *(uint32_t*)esp;
004a4d76      esp[1];
004a4d76      esp[2];
004a4d76      esp[3];
004a4cb0  }


004a4d80  void __thiscall gmPaperDollUI::HandleDropRelease(class gmPaperDollUI* this, struct UIElementMessageInfo const* arg2)

004a4d80  {
004a4d84      uint32_t dwParam1 = arg2->dwParam1;
004a4d8c      class UIElement* ebp = *(uint32_t*)(dwParam1 + 8);
004a4d90      int32_t* esi = *(uint32_t*)(dwParam1 + 0x10);
004a4d94      uint32_t edi = 0;
004a4d94      
004a4da2      if ((ebp != 0 && esi != 0))
004a4da2      {
004a4da8          int32_t edx_1 = *(uint32_t*)esi;
004a4dac          arg2 = nullptr;
004a4db0          int32_t var_10 = 0;
004a4db0          
004a4dbc          if (*(uint32_t*)(edx_1 + 0xa0)() != 0)
004a4dc8              edi = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)esi + 0xa0)() + 0x2e4);
004a4dc8          
004a4ddb          gmPaperDollUI::GetLocationInfoFromElementID(this, edi, &arg2, &var_10);
004a4df0          uint32_t var_c;
004a4df0          char var_8;
004a4df0          void var_4;
004a4df0          UIElement_ItemList::InqDropIconInfo(ebp, &var_c, &var_4, &var_8);
004a4df5          uint32_t eax_3 = var_c;
004a4df5          
004a4dfe          if (eax_3 != 0)
004a4dfe          {
004a4e00              char ecx_3 = var_8;
004a4e00              
004a4e07              if ((ecx_3 & 0xe) == 0)
004a4e07              {
004a4e0c                  if ((ecx_3 & 1) != 0)
004a4e0c                      goto label_4a4e47;
004a4e0c                  
004a4e14                  uint8_t eax_4;
004a4e14                  
004a4e14                  if (arg2 == 0)
004a4e14                  {
004a4e34                      if (esi[0xb9] != 0x100001d6)
004a4e34                          goto label_4a4e47;
004a4e34                      
004a4e39                      eax_4 = gmPaperDollUI::AcceptPaperDollDragObject(this, eax_3);
004a4e39                      goto label_4a4e3e;
004a4e14                  }
004a4e14                  
004a4e23                  eax_4 = gmPaperDollUI::AcceptDragObject(this, eax_3, &arg2, &var_10);
004a4e3e              label_4a4e3e:
004a4e3e                  
004a4e40                  if (eax_4 == 0)
004a4e40                  {
004a4e42                      eax_3 = var_c;
004a4e47                  label_4a4e47:
004a4e47                      class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(eax_3);
004a4e47                      
004a4e51                      if (eax_5 != 0)
004a4e57                          ACCWeenieObject::SetWaitingState(eax_5, 0);
004a4e40                  }
004a4e07              }
004a4dfe          }
004a4da2      }
004a4d80  }

004a4e66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a4e70  void __thiscall gmPaperDollUI::RecvNotice_SetSelectedItem(class gmPaperDollUI* this, uint32_t arg2, uint32_t arg3)

004a4e70  {
004a4e76      if (arg3 != 0)
004a4e7f          gmPaperDollUI::BeginPartSelectionLighting(((char*)this - 0x5f8), arg3);
004a4e70  }

004a4e87                       90 90 90 90 90 90 90 90 90                                                         .........

004a4e90  void __thiscall gmPaperDollUI::UpdateItemSlotTooltip(class gmPaperDollUI* this, class UIElement_ItemList* arg2, uint32_t arg3)

004a4e90  {
004a4e96      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004a4ea5      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
004a4eaf      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004a4eb1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004a4eb6      class PSRefBufferCharData<unsigned short>* var_9c = PStringBase<unsigned short>::s_NullBuffer_2;
004a4ebe      int32_t ebx;
004a4ebe      ebx = 0;
004a4ec0      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004a4ec2      uint32_t ebp = arg3;
004a4ecb      class PStringBase<unsigned short>* __return;
004a4ecb      
004a4ecb      if (ebp != 0)
004a4ecb      {
004a4ed7          void* __return_1;
004a4ed7          class PStringBase<unsigned short>* __return_2 = ACCWeenieObject::GetObjectNameWide(&__return_1, ebp, NAME_APPROPRIATE, 0);
004a4ee5          bool cond:0_1 = var_9c == __return_2->m_charbuffer;
004a4ee7          __return = __return_2;
004a4ee7          
004a4eeb          if (!(cond:0_1))
004a4eeb          {
004a4f02              if ((InterlockedDecrement(&var_9c->m_data[-8]) == 0 && var_9c != 0x14))
004a4f0b                  *(uint32_t*)*(int32_t*)((char*)var_9c + -0x14)(1);
004a4f0b              
004a4f11              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = __return->m_charbuffer;
004a4f13              var_9c = m_charbuffer_1;
004a4f1b              InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
004a4f1d              ebp = arg3;
004a4eeb          }
004a4eeb          
004a4f28          int32_t* edi_2 = ((char*)__return_1 - 0x14);
004a4f28          
004a4f3b          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004a4f43              **(uint32_t**)edi_2(1);
004a4ecb      }
004a4ecb      
004a4f52      if (arg2 != this->m_neckSlot)
004a4f52      {
004a4f81          if ((arg2 == this->m_leftWristSlot || arg2 == this->m_rightWristSlot))
004a4f81          {
004a5247              if (ebp != 0)
004a5247                  goto label_4a5259;
004a5247              
004a5252              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, &gmPaperDollUI::`vftable'.RecvNotice_CloseTrade);
004a4f81          }
004a4f81          else if ((arg2 == this->m_leftRingSlot || arg2 == this->m_rightRingSlot))
004a4f99          {
004a5233              if (ebp != 0)
004a5233                  goto label_4a5259;
004a5233              
004a523e              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, &gmPaperDollUI::`vftable'.RecvNotice_Logoff);
004a4f99          }
004a4f99          else if (arg2 == this->m_weaponReadySlot)
004a4fa5          {
004a4fa9              if (ebp != 0)
004a4fa9              {
004a4fab                  ebx = 0;
004a4fad                  goto label_4a525b;
004a4fa9              }
004a4fa9              
004a4fbb              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag weapons here to wield them");
004a4fa5          }
004a4fa5          else if (arg2 == this->m_ammoReadySlot)
004a4fcb          {
004a4fcf              if (ebp != 0)
004a4fcf              {
004a4fd1                  ebx = 0;
004a4fd3                  goto label_4a525b;
004a4fcf              }
004a4fcf              
004a4fe1              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag missile ammunition here to …");
004a4fcb          }
004a4fcb          else if (arg2 == this->m_shieldReadySlot)
004a4ff1          {
004a4ff5              if (ebp != 0)
004a4ff5              {
004a4ff7                  ebx = 0;
004a4ff9                  goto label_4a525b;
004a4ff5              }
004a4ff5              
004a5007              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag shields here to wield them");
004a4ff1          }
004a4ff1          else if (arg2 == this->m_trinketOneSlot)
004a5017          {
004a501b              if (ebp != 0)
004a501b              {
004a501d                  ebx = 0;
004a501f                  goto label_4a525b;
004a501b              }
004a501b              
004a502d              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag trinkets here to activate t…");
004a5017          }
004a5017          else if (arg2 == this->m_cloakSlot)
004a503d          {
004a5041              if (ebp != 0)
004a5041              {
004a5043                  ebx = 0;
004a5045                  goto label_4a525b;
004a5041              }
004a5041              
004a5053              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag cloaks here to activate the…");
004a503d          }
004a503d          else if (arg2 == this->m_sigilOneSlot)
004a5063          {
004a5067              if (ebp != 0)
004a5067              {
004a5069                  ebx = 0;
004a506b                  goto label_4a525b;
004a5067              }
004a5067              
004a5079              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag a Blue Aetheria sigil here …");
004a5063          }
004a5063          else if (arg2 == this->m_sigilTwoSlot)
004a5089          {
004a508d              if (ebp != 0)
004a508d              {
004a508f                  ebx = 0;
004a5091                  goto label_4a525b;
004a508d              }
004a508d              
004a509f              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag a Yellow Aetheria sigil her…");
004a5089          }
004a5089          else if (arg2 == this->m_sigilThreeSlot)
004a50af          {
004a50b3              if (ebp != 0)
004a50b3              {
004a50b5                  ebx = 0;
004a50b7                  goto label_4a525b;
004a50b3              }
004a50b3              
004a50c5              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag a Red Aetheria sigil here t…");
004a50af          }
004a50af          else if ((arg2 == this->m_clothesPantsSlot || arg2 == this->m_clothesShirtSlot))
004a50e1          {
004a521c              if (ebp != 0)
004a521c                  goto label_4a5259;
004a521c              
004a5227              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, &gmPaperDollUI::`vftable'.RecvNotice_ToggleChatEntry);
004a50e1          }
004a50e1          else if (arg2 == this->m_headSlot)
004a50ed          {
004a50f1              if (ebp != 0)
004a50f1                  goto label_4a5259;
004a50f1              
004a5100              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag head items here to wear the…");
004a50ed          }
004a50ed          else if (arg2 == this->m_chestSlot)
004a5110          {
004a5114              if (ebp != 0)
004a5114                  goto label_4a5259;
004a5114              
004a5123              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag chest items here to wear th…");
004a5110          }
004a5110          else if (arg2 == this->m_abdomenSlot)
004a5133          {
004a5137              if (ebp != 0)
004a5137                  goto label_4a5259;
004a5137              
004a5146              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag abdomen items here to wear …");
004a5133          }
004a5133          else if (arg2 == this->m_upperArmSlot)
004a5156          {
004a515a              if (ebp != 0)
004a515a                  goto label_4a5259;
004a515a              
004a5169              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag upper arm items here to wea…");
004a5156          }
004a5156          else if (arg2 == this->m_lowerArmSlot)
004a5179          {
004a517d              if (ebp != 0)
004a517d                  goto label_4a5259;
004a517d              
004a518c              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag lower arm items here to wea…");
004a5179          }
004a5179          else if (arg2 == this->m_handSlot)
004a519c          {
004a51a0              if (ebp != 0)
004a51a0                  goto label_4a5259;
004a51a0              
004a51af              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag glove items here to wear th…");
004a519c          }
004a519c          else if (arg2 == this->m_upperLegSlot)
004a51bf          {
004a51c3              if (ebp != 0)
004a51c3                  goto label_4a5259;
004a51c3              
004a51d2              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag upper leg items here to wea…");
004a51bf          }
004a51bf          else if (arg2 != this->m_lowerLegSlot)
004a51e2          {
004a5201              if (arg2 != this->m_footSlot)
004a5201                  goto label_4a525b;
004a5201              
004a5205              if (ebp != 0)
004a5205                  goto label_4a5259;
004a5205              
004a5210              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag foot coverings here to wear…");
004a51e2          }
004a51e2          else
004a51e2          {
004a51e6              if (ebp != 0)
004a51e6                  goto label_4a5259;
004a51e6              
004a51f1              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag lower leg items here to wea…");
004a51e2          }
004a4f52      }
004a4f52      else if (ebp != 0)
004a4f56      {
004a5259      label_4a5259:
004a5259          ebx = 1;
004a525b      label_4a525b:
004a525b          
004a525d          if (ebp != 0)
004a525d          {
004a5261              void (__thiscall** const ebx_1)(class gmNoticeHandler* this, class CContractTracker const*, int32_t);
004a5261              void (__thiscall** const esi_1)(class gmNoticeHandler* this, uint32_t);
004a5261              
004a5261              if (ebx == 0)
004a5261              {
004a526f                  ebx_1 = &gmPaperDollUI::`vftable'.RecvNotice_ChatCommand_AddFriend;
004a5274                  esi_1 = &gmPaperDollUI::`vftable'.RecvNotice_VitaeChanged;
004a5261              }
004a5261              else
004a5261              {
004a5263                  ebx_1 = &gmPaperDollUI::`vftable'.RecvNotice_UpdateContractTracker;
004a5268                  esi_1 = &gmPaperDollUI::`vftable'.RecvNotice_SetDisplayCharacterTitle;
004a5261              }
004a5261              
004a528a              void (__thiscall** const var_c4_1)(class gmNoticeHandler* this, class CContractTracker const*, int32_t) = ebx_1;
004a528b              void (__thiscall** const var_c8_1)(class gmNoticeHandler* this, uint32_t) = esi_1;
004a528c              class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(&__return, ebp, NAME_APPROPRIATE, 0)->m_charbuffer;
004a5297              PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, &gmPaperDollUI::`vftable'.RecvNotice_EnchantmentsChanged);
004a52a0              void* __offset(PStringBase<unsigned short>, -0x14) esi_3 = &__return[-5];
004a52a0              
004a52b6              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004a52be                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004a525d          }
004a4f56      }
004a4f56      else
004a4f65          PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Drag necklaces here to wear them");
004a4f65      
004a52c4      void var_90;
004a52c4      StringInfo::StringInfo(&var_90);
004a52d4      StringInfo::SetLiteralValue(&var_90, &PStringBase<unsigned short>::s_NullBuffer_3, 1);
004a52dd      class UIElement* eax_9 = UIElement_ListBox::GetItem(arg2, 0);
004a52dd      
004a52e6      if (eax_9 != 0)
004a52e6      {
004a52ef          UIElement::SetTooltip(eax_9, &var_90);
004a52f4          eax_9->__bitfield164 |= 0x20;
004a52e6      }
004a52e6      
004a52ff      StringInfo::~StringInfo(&var_90);
004a52ff      
004a531d      if ((InterlockedDecrement(&var_9c->m_data[-8]) == 0 && var_9c != 0x14))
004a5325          *(uint32_t*)*(int32_t*)((char*)var_9c + -0x14)(1);
004a5325      
004a532b      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_8 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004a532b      
004a533a      if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
004a5342          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
004a4e90  }

004a5351                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004a5360  void __fastcall gmPaperDollUI::PostInit(class gmPaperDollUI* this)

004a5360  {
004a5367      UIElement::PostInit(this);
004a5373      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100001da);
004a537a      class UIElement_ItemList* eax_1;
004a537a      
004a537a      if (eax == 0)
004a538d          eax_1 = nullptr;
004a537a      else
004a5385          eax_1 = eax->vtable->DynamicCast(0x10000031);
004a5385      
004a5398      this->m_neckSlot = eax_1;
004a539e      UIElement_ItemList::RegisterItemListDragHandler(eax_1, &this->vtable);
004a53ae      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_neckSlot, 0);
004a53ba      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x100001db);
004a53c1      class UIElement_ItemList* eax_4;
004a53c1      
004a53c1      if (eax_3 == 0)
004a53d4          eax_4 = nullptr;
004a53c1      else
004a53cc          eax_4 = eax_3->vtable->DynamicCast(0x10000031);
004a53cc      
004a53d9      this->m_leftWristSlot = eax_4;
004a53df      UIElement_ItemList::RegisterItemListDragHandler(eax_4, &this->vtable);
004a53ef      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_leftWristSlot, 0);
004a53fb      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x100001dc);
004a5402      class UIElement_ItemList* eax_7;
004a5402      
004a5402      if (eax_6 == 0)
004a5415          eax_7 = nullptr;
004a5402      else
004a540d          eax_7 = eax_6->vtable->DynamicCast(0x10000031);
004a540d      
004a541a      this->m_leftRingSlot = eax_7;
004a5420      UIElement_ItemList::RegisterItemListDragHandler(eax_7, &this->vtable);
004a5430      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_leftRingSlot, 0);
004a543c      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x100001dd);
004a5443      class UIElement_ItemList* eax_10;
004a5443      
004a5443      if (eax_9 == 0)
004a5456          eax_10 = nullptr;
004a5443      else
004a544e          eax_10 = eax_9->vtable->DynamicCast(0x10000031);
004a544e      
004a545b      this->m_rightWristSlot = eax_10;
004a5461      UIElement_ItemList::RegisterItemListDragHandler(eax_10, &this->vtable);
004a5471      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_rightWristSlot, 0);
004a547d      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x100001de);
004a5484      class UIElement_ItemList* eax_13;
004a5484      
004a5484      if (eax_12 == 0)
004a5497          eax_13 = nullptr;
004a5484      else
004a548f          eax_13 = eax_12->vtable->DynamicCast(0x10000031);
004a548f      
004a549c      this->m_rightRingSlot = eax_13;
004a54a2      UIElement_ItemList::RegisterItemListDragHandler(eax_13, &this->vtable);
004a54b2      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_rightRingSlot, 0);
004a54be      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x100001df);
004a54c5      class UIElement_ItemList* eax_16;
004a54c5      
004a54c5      if (eax_15 == 0)
004a54d8          eax_16 = nullptr;
004a54c5      else
004a54d0          eax_16 = eax_15->vtable->DynamicCast(0x10000031);
004a54d0      
004a54dd      this->m_weaponReadySlot = eax_16;
004a54e3      UIElement_ItemList::RegisterItemListDragHandler(eax_16, &this->vtable);
004a54f3      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_weaponReadySlot, 0);
004a54ff      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x100001e0);
004a5506      class UIElement_ItemList* eax_19;
004a5506      
004a5506      if (eax_18 == 0)
004a5519          eax_19 = nullptr;
004a5506      else
004a5511          eax_19 = eax_18->vtable->DynamicCast(0x10000031);
004a5511      
004a551e      this->m_ammoReadySlot = eax_19;
004a5524      UIElement_ItemList::RegisterItemListDragHandler(eax_19, &this->vtable);
004a5534      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_ammoReadySlot, 0);
004a5540      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x100001e1);
004a5547      class UIElement_ItemList* eax_22;
004a5547      
004a5547      if (eax_21 == 0)
004a555a          eax_22 = nullptr;
004a5547      else
004a5552          eax_22 = eax_21->vtable->DynamicCast(0x10000031);
004a5552      
004a555f      this->m_shieldReadySlot = eax_22;
004a5565      UIElement_ItemList::RegisterItemListDragHandler(eax_22, &this->vtable);
004a5575      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_shieldReadySlot, 0);
004a5581      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x100001e3);
004a5588      class UIElement_ItemList* eax_25;
004a5588      
004a5588      if (eax_24 == 0)
004a559b          eax_25 = nullptr;
004a5588      else
004a5593          eax_25 = eax_24->vtable->DynamicCast(0x10000031);
004a5593      
004a55a0      this->m_clothesPantsSlot = eax_25;
004a55a6      UIElement_ItemList::RegisterItemListDragHandler(eax_25, &this->vtable);
004a55b6      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_clothesPantsSlot, 0);
004a55c2      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x100001e2);
004a55c9      class UIElement_ItemList* eax_28;
004a55c9      
004a55c9      if (eax_27 == 0)
004a55dc          eax_28 = nullptr;
004a55c9      else
004a55d4          eax_28 = eax_27->vtable->DynamicCast(0x10000031);
004a55d4      
004a55e1      this->m_clothesShirtSlot = eax_28;
004a55e7      UIElement_ItemList::RegisterItemListDragHandler(eax_28, &this->vtable);
004a55f7      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_clothesShirtSlot, 0);
004a5603      class UIElement* eax_30 = UIElement::GetChildRecursive(this, 0x1000058e);
004a560a      class UIElement_ItemList* eax_31;
004a560a      
004a560a      if (eax_30 == 0)
004a561d          eax_31 = nullptr;
004a560a      else
004a5615          eax_31 = eax_30->vtable->DynamicCast(0x10000031);
004a5615      
004a5622      this->m_trinketOneSlot = eax_31;
004a5628      UIElement_ItemList::RegisterItemListDragHandler(eax_31, &this->vtable);
004a5638      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_trinketOneSlot, 0);
004a5644      class UIElement* eax_33 = UIElement::GetChildRecursive(this, 0x100005e9);
004a564b      class UIElement_ItemList* eax_34;
004a564b      
004a564b      if (eax_33 == 0)
004a565e          eax_34 = nullptr;
004a564b      else
004a5656          eax_34 = eax_33->vtable->DynamicCast(0x10000031);
004a5656      
004a5663      this->m_cloakSlot = eax_34;
004a5669      UIElement_ItemList::RegisterItemListDragHandler(eax_34, &this->vtable);
004a5679      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_cloakSlot, 0);
004a5685      class UIElement* eax_36 = UIElement::GetChildRecursive(this, 0x10000595);
004a568c      class UIElement_ItemList* eax_37;
004a568c      
004a568c      if (eax_36 == 0)
004a569f          eax_37 = nullptr;
004a568c      else
004a5697          eax_37 = eax_36->vtable->DynamicCast(0x10000031);
004a5697      
004a56a4      this->m_sigilOneSlot = eax_37;
004a56aa      UIElement_ItemList::RegisterItemListDragHandler(eax_37, &this->vtable);
004a56ba      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_sigilOneSlot, 0);
004a56c6      class UIElement* eax_39 = UIElement::GetChildRecursive(this, 0x10000596);
004a56cd      class UIElement_ItemList* eax_40;
004a56cd      
004a56cd      if (eax_39 == 0)
004a56e0          eax_40 = nullptr;
004a56cd      else
004a56d8          eax_40 = eax_39->vtable->DynamicCast(0x10000031);
004a56d8      
004a56e5      this->m_sigilTwoSlot = eax_40;
004a56eb      UIElement_ItemList::RegisterItemListDragHandler(eax_40, &this->vtable);
004a56fb      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_sigilTwoSlot, 0);
004a5707      class UIElement* eax_42 = UIElement::GetChildRecursive(this, 0x10000597);
004a570e      class UIElement_ItemList* eax_43;
004a570e      
004a570e      if (eax_42 == 0)
004a5721          eax_43 = nullptr;
004a570e      else
004a5719          eax_43 = eax_42->vtable->DynamicCast(0x10000031);
004a5719      
004a5726      this->m_sigilThreeSlot = eax_43;
004a572c      UIElement_ItemList::RegisterItemListDragHandler(eax_43, &this->vtable);
004a573c      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_sigilThreeSlot, 0);
004a5748      class UIElement* eax_45 = UIElement::GetChildRecursive(this, 0x100005ab);
004a574f      class UIElement_ItemList* eax_46;
004a574f      
004a574f      if (eax_45 == 0)
004a5762          eax_46 = nullptr;
004a574f      else
004a575a          eax_46 = eax_45->vtable->DynamicCast(0x10000031);
004a575a      
004a5767      this->m_headSlot = eax_46;
004a576d      UIElement_ItemList::RegisterItemListDragHandler(eax_46, &this->vtable);
004a577d      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_headSlot, 0);
004a5782      this->m_headSlot->vtable->SetVisible(0);
004a5796      class UIElement* eax_48 = UIElement::GetChildRecursive(this, 0x100005ac);
004a579d      class UIElement_ItemList* eax_49;
004a579d      
004a579d      if (eax_48 == 0)
004a57b0          eax_49 = nullptr;
004a579d      else
004a57a8          eax_49 = eax_48->vtable->DynamicCast(0x10000031);
004a57a8      
004a57b5      this->m_chestSlot = eax_49;
004a57bb      UIElement_ItemList::RegisterItemListDragHandler(eax_49, &this->vtable);
004a57cb      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_chestSlot, 0);
004a57d0      this->m_chestSlot->vtable->SetVisible(0);
004a57e4      class UIElement* eax_51 = UIElement::GetChildRecursive(this, 0x100005ad);
004a57eb      class UIElement_ItemList* eax_52;
004a57eb      
004a57eb      if (eax_51 == 0)
004a57fe          eax_52 = nullptr;
004a57eb      else
004a57f6          eax_52 = eax_51->vtable->DynamicCast(0x10000031);
004a57f6      
004a5803      this->m_abdomenSlot = eax_52;
004a5809      UIElement_ItemList::RegisterItemListDragHandler(eax_52, &this->vtable);
004a5819      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_abdomenSlot, 0);
004a581e      this->m_abdomenSlot->vtable->SetVisible(0);
004a5832      class UIElement* eax_54 = UIElement::GetChildRecursive(this, 0x100005ae);
004a5839      class UIElement_ItemList* eax_55;
004a5839      
004a5839      if (eax_54 == 0)
004a584c          eax_55 = nullptr;
004a5839      else
004a5844          eax_55 = eax_54->vtable->DynamicCast(0x10000031);
004a5844      
004a5851      this->m_upperArmSlot = eax_55;
004a5857      UIElement_ItemList::RegisterItemListDragHandler(eax_55, &this->vtable);
004a5867      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_upperArmSlot, 0);
004a586c      this->m_upperArmSlot->vtable->SetVisible(0);
004a5880      class UIElement* eax_57 = UIElement::GetChildRecursive(this, 0x100005af);
004a5887      class UIElement_ItemList* eax_58;
004a5887      
004a5887      if (eax_57 == 0)
004a589a          eax_58 = nullptr;
004a5887      else
004a5892          eax_58 = eax_57->vtable->DynamicCast(0x10000031);
004a5892      
004a589f      this->m_lowerArmSlot = eax_58;
004a58a5      UIElement_ItemList::RegisterItemListDragHandler(eax_58, &this->vtable);
004a58b5      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_lowerArmSlot, 0);
004a58ba      this->m_lowerArmSlot->vtable->SetVisible(0);
004a58ce      class UIElement* eax_60 = UIElement::GetChildRecursive(this, 0x100005b0);
004a58d5      class UIElement_ItemList* eax_61;
004a58d5      
004a58d5      if (eax_60 == 0)
004a58e8          eax_61 = nullptr;
004a58d5      else
004a58e0          eax_61 = eax_60->vtable->DynamicCast(0x10000031);
004a58e0      
004a58ed      this->m_handSlot = eax_61;
004a58f3      UIElement_ItemList::RegisterItemListDragHandler(eax_61, &this->vtable);
004a5903      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_handSlot, 0);
004a5908      this->m_handSlot->vtable->SetVisible(0);
004a591c      class UIElement* eax_63 = UIElement::GetChildRecursive(this, 0x100005b1);
004a5923      class UIElement_ItemList* eax_64;
004a5923      
004a5923      if (eax_63 == 0)
004a5936          eax_64 = nullptr;
004a5923      else
004a592e          eax_64 = eax_63->vtable->DynamicCast(0x10000031);
004a592e      
004a593b      this->m_upperLegSlot = eax_64;
004a5941      UIElement_ItemList::RegisterItemListDragHandler(eax_64, &this->vtable);
004a5951      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_upperLegSlot, 0);
004a5956      this->m_upperLegSlot->vtable->SetVisible(0);
004a596a      class UIElement* eax_66 = UIElement::GetChildRecursive(this, 0x100005b2);
004a5971      class UIElement_ItemList* eax_67;
004a5971      
004a5971      if (eax_66 == 0)
004a5984          eax_67 = nullptr;
004a5971      else
004a597c          eax_67 = eax_66->vtable->DynamicCast(0x10000031);
004a597c      
004a5989      this->m_lowerLegSlot = eax_67;
004a598f      UIElement_ItemList::RegisterItemListDragHandler(eax_67, &this->vtable);
004a599f      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_lowerLegSlot, 0);
004a59a4      this->m_lowerLegSlot->vtable->SetVisible(0);
004a59b8      class UIElement* eax_69 = UIElement::GetChildRecursive(this, 0x100005b3);
004a59bf      class UIElement_ItemList* eax_70;
004a59bf      
004a59bf      if (eax_69 == 0)
004a59d2          eax_70 = nullptr;
004a59bf      else
004a59ca          eax_70 = eax_69->vtable->DynamicCast(0x10000031);
004a59ca      
004a59d7      this->m_footSlot = eax_70;
004a59dd      UIElement_ItemList::RegisterItemListDragHandler(eax_70, &this->vtable);
004a59ed      gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_footSlot, 0);
004a59f2      this->m_footSlot->vtable->SetVisible(0);
004a5a06      class UIElement* eax_72 = UIElement::GetChildRecursive(this, 0x100001d5);
004a5a0d      class UIElement_Viewport* eax_73;
004a5a0d      
004a5a0d      if (eax_72 == 0)
004a5a1d          eax_73 = nullptr;
004a5a0d      else
004a5a15          eax_73 = eax_72->vtable->DynamicCast(0xd);
004a5a15      
004a5a21      this->m_pPaperDoll = eax_73;
004a5a21      
004a5a27      if (eax_73 != 0)
004a5a27      {
004a5a39          int32_t var_18 = 0;
004a5a41          int32_t var_14_1 = 0;
004a5a49          int32_t var_10_1 = 0;
004a5a51          int32_t var_c = 0x3df5c28f;
004a5a59          int32_t var_8_1 = 0xc019999a;
004a5a61          int32_t var_4_1 = 0x3f6147ae;
004a5a69          UIElement_Viewport::SetCamera(eax_73, &var_c, &var_18);
004a5a6e          class UIElement_Viewport* m_pPaperDoll = this->m_pPaperDoll;
004a5a80          var_c = 0x3e99999a;
004a5a88          int32_t var_8_2 = 0x3ff33333;
004a5a90          int32_t var_4_2;
004a5a90          __builtin_strncpy(&var_4_2, "ff&?", 4);
004a5a98          UIElement_Viewport::SetLight(m_pPaperDoll, DISTANT_LIGHT, 2f, &var_c);
004a5aa9          CreatureMode::UseSharpMode(&this->m_pPaperDoll->creature_mode_objects);
004a5ab0          gmPaperDollUI::RedressCreature(this);
004a5a27      }
004a5a27      
004a5ac8      this->m_paperDollDragMask = UIElement::GetChildRecursive(this, 0x100001d6);
004a5ada      this->m_paperDollDragOverlay = UIElement::GetChildRecursive(this, 0x1000046d);
004a5ae0      class UIElement* eax_76 = UIElement::GetChildRecursive(this, 0x10000595);
004a5ae5      this->m_sigilOneItem = eax_76;
004a5aeb      eax_76->vtable->SetVisible(0);
004a5afb      class UIElement* eax_77 = UIElement::GetChildRecursive(this, 0x10000596);
004a5b00      this->m_sigilTwoItem = eax_77;
004a5b06      eax_77->vtable->SetVisible(0);
004a5b16      class UIElement* eax_78 = UIElement::GetChildRecursive(this, 0x10000597);
004a5b1b      this->m_sigilThreeItem = eax_78;
004a5b21      eax_78->vtable->SetVisible(0);
004a5b31      class UIElement* eax_79 = UIElement::GetChildRecursive(this, 0x100005be);
004a5b38      class UIElement_Button* eax_80;
004a5b38      
004a5b38      if (eax_79 == 0)
004a5b48          eax_80 = nullptr;
004a5b38      else
004a5b40          eax_80 = eax_79->vtable->DynamicCast(1);
004a5b40      
004a5b51      this->m_SlotCheckbox = eax_80;
004a5b57      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x142, &this->vtable);
004a5b69      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0xbc, &this->vtable);
004a5b80      uint32_t ecx_124;
004a5b80      int32_t edx_40;
004a5b80      ecx_124 = UIListener::RegisterForGlobalMessage(this, 0xb);
004a5b85      class GlobalEventHandler* eax_82 = GlobalEventHandler::GetGlobalEventHandler();
004a5b85      
004a5b8e      if (eax_82 != 0)
004a5b8e      {
004a5b90          eax_82->vtable->RegisterNoticeHandler(0x186b0, &this->vtable);
004a5ba4          eax_82->vtable->RegisterNoticeHandler(0x186aa, &this->vtable);
004a5bbb          eax_82 = eax_82->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004a5b8e      }
004a5b8e      
004a5bbf      int32_t __saved_ebx_28 = 0x23;
004a5bc1      int32_t var_28_28 = 5;
004a5bc3      int32_t var_2c = 0x10000038;
004a5bc8      class DBObj* eax_85 = DBObj::GetByEnum(eax_82, edx_40, ecx_124);
004a5bc8      
004a5bd4      if (eax_85 != 0)
004a5bd4      {
004a5be9          class UIElement* eax_86 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance, this->m_paperDollDragMask, eax_85, 0x10000345);
004a5bee          this->m_dragIcon = eax_86;
004a5bf4          eax_86->vtable->SetVisible(0);
004a5bd4      }
004a5bd4      
004a5bff      gmPaperDollUI::CreateClickMap(this);
004a5c0e      UIElement::SetAttribute_Bool(this->m_SlotCheckbox, 0xe, 0);
004a5c0e      
004a5c15      if (eax_85 != 0)
004a5c17          eax_85->vtable->Release();
004a5360  }

004a5c24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004a5c30  enum UIElementMessageListenResult __thiscall gmPaperDollUI::ListenToElementMessage(class gmPaperDollUI* this, struct UIElementMessageInfo const* arg2)

004a5c30  {
004a5c31      struct UIElementMessageInfo* ebx = arg2;
004a5c35      uint32_t idMessage = ebx->idMessage;
004a5c35      
004a5c3e      if (idMessage != 1)
004a5c3e      {
004a5da3          if (idMessage == 0x15)
004a5da3          {
004a5dab              if (ebx->idElement == 0x100001d6)
004a5dad                  this->m_paperDollDragOverlay->vtable->SetState(0x1000003f);
004a5dad              
004a5dc3              gmPaperDollUI::HandleDropRelease(this, ebx);
004a5dd2              return UIElement::ListenToElementMessage(this, ebx);
004a5da3          }
004a5da3          
004a5dd9          if (idMessage != 0x21)
004a5dd9          {
004a5e44              if (idMessage != 0x1c)
004a5e44              {
004a5f1a                  if ((idMessage == 0x3e && ebx->idElement == 0x100001d6))
004a5f1a                  {
004a5f21                      if (ebx->dwParam1 != 0)
004a5f21                      {
004a5f29                          class UIElement* m_dragElement = UIElementManager::s_pInstance->m_dragElement;
004a5f29                          
004a5f31                          if (m_dragElement == 0)
004a5f31                          {
004a5f33                              this->m_paperDollDragOverlay->vtable->SetState(0x1000003f);
004a5f51                              return UIElement::ListenToElementMessage(this, ebx);
004a5f31                          }
004a5f31                          
004a5f57                          gmPaperDollUI::HandlePaperDollDragOver(this, m_dragElement);
004a5f67                          return UIElement::ListenToElementMessage(this, ebx);
004a5f21                      }
004a5f21                      
004a5f6a                      this->m_paperDollDragOverlay->vtable->SetState(0x1000003f);
004a5f1a                  }
004a5e44              }
004a5e44              else if (ebx->idElement == 0x100001d6)
004a5e50              {
004a5e72                  uint32_t eax_23 = gmPaperDollUI::GetPaperDollItemUnderMouse(this, ICIDM::s_cidm->vtable->GetMouseX(), ICIDM::s_cidm->vtable->GetMouseY());
004a5e72                  
004a5e7b                  if (eax_23 != 0)
004a5e7b                  {
004a5e81                      uint32_t dwParam1 = ebx->dwParam1;
004a5e81                      
004a5e87                      if (dwParam1 == 7)
004a5e87                      {
004a5e90                          if ((ClientUISystem::GetUISystem() != 0 && ClientUISystem::GetUISystem()->targetMode != TARGET_MODE_NONE))
004a5e90                          {
004a5ea3                              enum Target_Mode targetMode = ClientUISystem::GetUISystem()->targetMode;
004a5ea7                              uint32_t eax_27 = GetPlayerID();
004a5eb4                              ClientUISystem::ExecuteTargetModeForItem(ClientUISystem::GetUISystem(), eax_27, targetMode);
004a5ec4                              return UIElement::ListenToElementMessage(this, ebx);
004a5e90                          }
004a5e90                          
004a5eca                          ACCWeenieObject::SetSelectedObject(eax_23, 0);
004a5edd                          return UIElement::ListenToElementMessage(this, ebx);
004a5e87                      }
004a5e87                      
004a5ee3                      if (dwParam1 == 8)
004a5ee3                      {
004a5eec                          ACCWeenieObject::SetSelectedObject(eax_23, 0);
004a5efc                          ClientUISystem::ExamineObject(ClientUISystem::GetUISystem(), eax_23);
004a5ee3                      }
004a5e7b                  }
004a5e50              }
004a5dd9          }
004a5dd9          else if (ebx->idElement == 0x100001d6)
004a5de1          {
004a5df1              uint32_t eax_16 = gmPaperDollUI::GetPaperDollItemUnderMouse(this, ebx->ptWindow.x, ebx->ptWindow.y);
004a5df1              
004a5dfa              if ((eax_16 != 0 && gmPaperDollUI::PrepareDragIcon(this, eax_16) != 0))
004a5dfa              {
004a5e21                  UIElementManager::StartDragandDrop(UIElementManager::s_pInstance, this->m_dragIcon, 0x10, 0x10);
004a5e2b                  CM_Item::SendNotice_BeginDrag(eax_16, 0, 0);
004a5dfa              }
004a5de1          }
004a5c3e      }
004a5c3e      else if (ebx->idElement == 0x100005be)
004a5c4a      {
004a5c5d          UIElement::GetAttribute_Bool(this->m_SlotCheckbox, 0xe, &arg2);
004a5c68          class UIElement_Viewport* m_pPaperDoll = this->m_pPaperDoll;
004a5c68          
004a5c6e          if (arg2 != 0)
004a5c6e          {
004a5c74              m_pPaperDoll->vtable->SetVisible(0);
004a5c7b              this->m_paperDollDragMask->vtable->SetVisible(0);
004a5c88              this->m_headSlot->vtable->SetVisible(1);
004a5c95              this->m_chestSlot->vtable->SetVisible(1);
004a5ca2              this->m_abdomenSlot->vtable->SetVisible(1);
004a5caf              this->m_upperArmSlot->vtable->SetVisible(1);
004a5cbc              this->m_lowerArmSlot->vtable->SetVisible(1);
004a5cc9              this->m_handSlot->vtable->SetVisible(1);
004a5cd6              this->m_upperLegSlot->vtable->SetVisible(1);
004a5ce3              this->m_lowerLegSlot->vtable->SetVisible(1);
004a5cf0              this->m_footSlot->vtable->SetVisible(1);
004a5d07              return UIElement::ListenToElementMessage(this, ebx);
004a5c6e          }
004a5c6e          
004a5d0a          m_pPaperDoll->vtable->SetVisible(1);
004a5d11          this->m_paperDollDragMask->vtable->SetVisible(1);
004a5d1e          this->m_headSlot->vtable->SetVisible(0);
004a5d2b          this->m_chestSlot->vtable->SetVisible(0);
004a5d38          this->m_abdomenSlot->vtable->SetVisible(0);
004a5d45          this->m_upperArmSlot->vtable->SetVisible(0);
004a5d52          this->m_lowerArmSlot->vtable->SetVisible(0);
004a5d5f          this->m_handSlot->vtable->SetVisible(0);
004a5d6c          this->m_upperLegSlot->vtable->SetVisible(0);
004a5d79          this->m_lowerLegSlot->vtable->SetVisible(0);
004a5d86          this->m_footSlot->vtable->SetVisible(0);
004a5c4a      }
004a5c4a      
004a5f88      return UIElement::ListenToElementMessage(this, ebx);
004a5c30  }

004a5f8b                                   90 90 90 90 90                                                             .....

004a5f90  void __thiscall gmPaperDollUI::SetUIItemIntoLocation(class gmPaperDollUI* this, uint32_t arg2, uint32_t arg3)

004a5f90  {
004a5f96      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
004a5f96      
004a5fa7      if (*(uint8_t*)((char*)arg3)[1] < 0)
004a5fa7      {
004a5fa9          eax->m_invSlotModule.neckSlot->m_itemID = arg2;
004a5fb7          UIElement_ItemList::ItemList_Flush(this->m_neckSlot);
004a5fc3          UIElement_ItemList::ItemList_AddItem(this->m_neckSlot, arg2);
004a5fd2          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_neckSlot, arg2);
004a5fa7      }
004a5fa7      
004a5fdd      if ((arg3 & 0x10000) != 0)
004a5fdd      {
004a5fdf          eax->m_invSlotModule.leftWristSlot->m_itemID = arg2;
004a5fed          UIElement_ItemList::ItemList_Flush(this->m_leftWristSlot);
004a5ff9          UIElement_ItemList::ItemList_AddItem(this->m_leftWristSlot, arg2);
004a6008          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_leftWristSlot, arg2);
004a5fdd      }
004a5fdd      
004a6013      if ((arg3 & 0x20000) != 0)
004a6013      {
004a6015          eax->m_invSlotModule.rightWristSlot->m_itemID = arg2;
004a6023          UIElement_ItemList::ItemList_Flush(this->m_rightWristSlot);
004a602f          UIElement_ItemList::ItemList_AddItem(this->m_rightWristSlot, arg2);
004a603e          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_rightWristSlot, arg2);
004a6013      }
004a6013      
004a6049      if ((arg3 & 0x40000) != 0)
004a6049      {
004a604b          eax->m_invSlotModule.leftRingSlot->m_itemID = arg2;
004a6059          UIElement_ItemList::ItemList_Flush(this->m_leftRingSlot);
004a6065          UIElement_ItemList::ItemList_AddItem(this->m_leftRingSlot, arg2);
004a6074          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_leftRingSlot, arg2);
004a6049      }
004a6049      
004a607f      if ((arg3 & 0x80000) != 0)
004a607f      {
004a6081          eax->m_invSlotModule.rightRingSlot->m_itemID = arg2;
004a608f          UIElement_ItemList::ItemList_Flush(this->m_rightRingSlot);
004a609b          UIElement_ItemList::ItemList_AddItem(this->m_rightRingSlot, arg2);
004a60aa          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_rightRingSlot, arg2);
004a607f      }
004a607f      
004a60b5      if ((arg3 & 0x3500000) != 0)
004a60b5      {
004a60b7          eax->m_invSlotModule.weaponReadySlot->m_itemID = arg2;
004a60c5          UIElement_ItemList::ItemList_Flush(this->m_weaponReadySlot);
004a60d1          UIElement_ItemList::ItemList_AddItem(this->m_weaponReadySlot, arg2);
004a60e0          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_weaponReadySlot, arg2);
004a60b5      }
004a60b5      
004a60eb      if ((arg3 & 0x200000) != 0)
004a60eb      {
004a60ed          eax->m_invSlotModule.shieldReadySlot->m_itemID = arg2;
004a60fb          UIElement_ItemList::ItemList_Flush(this->m_shieldReadySlot);
004a6107          UIElement_ItemList::ItemList_AddItem(this->m_shieldReadySlot, arg2);
004a6116          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_shieldReadySlot, arg2);
004a60eb      }
004a60eb      
004a6121      if ((arg3 & "activation type (%s) with '%s' b…") != 0)
004a6121      {
004a6123          eax->m_invSlotModule.ammoReadySlot->m_itemID = arg2;
004a6131          UIElement_ItemList::ItemList_Flush(this->m_ammoReadySlot);
004a613d          UIElement_ItemList::ItemList_AddItem(this->m_ammoReadySlot, arg2);
004a614c          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_ammoReadySlot, arg2);
004a6121      }
004a6121      
004a6154      if ((arg3 & 0x40) != 0)
004a6154      {
004a6156          eax->m_invSlotModule.clothesPantsSlot->m_itemID = arg2;
004a6164          UIElement_ItemList::ItemList_Flush(this->m_clothesPantsSlot);
004a6170          UIElement_ItemList::ItemList_AddItem(this->m_clothesPantsSlot, arg2);
004a617f          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_clothesPantsSlot, arg2);
004a6154      }
004a6154      
004a6187      if ((arg3 & 2) != 0)
004a6187      {
004a6189          eax->m_invSlotModule.clothesShirtSlot->m_itemID = arg2;
004a6197          UIElement_ItemList::ItemList_Flush(this->m_clothesShirtSlot);
004a61a3          UIElement_ItemList::ItemList_AddItem(this->m_clothesShirtSlot, arg2);
004a61b2          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_clothesShirtSlot, arg2);
004a6187      }
004a6187      
004a61bd      if ((arg3 & 0x4000000) != 0)
004a61bd      {
004a61bf          eax->m_invSlotModule.trinketOneSlot->m_itemID = arg2;
004a61cd          UIElement_ItemList::ItemList_Flush(this->m_trinketOneSlot);
004a61d9          UIElement_ItemList::ItemList_AddItem(this->m_trinketOneSlot, arg2);
004a61e8          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_trinketOneSlot, arg2);
004a61bd      }
004a61bd      
004a61f3      if ((arg3 & 0x8000000) != 0)
004a61f3      {
004a61f5          eax->m_invSlotModule.cloakSlot->m_itemID = arg2;
004a6203          UIElement_ItemList::ItemList_Flush(this->m_cloakSlot);
004a620f          UIElement_ItemList::ItemList_AddItem(this->m_cloakSlot, arg2);
004a621e          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_cloakSlot, arg2);
004a61f3      }
004a61f3      
004a6229      if ((arg3 & 0x10000000) != 0)
004a6229      {
004a622b          eax->m_invSlotModule.sigilOneSlot->m_itemID = arg2;
004a6239          UIElement_ItemList::ItemList_Flush(this->m_sigilOneSlot);
004a6245          UIElement_ItemList::ItemList_AddItem(this->m_sigilOneSlot, arg2);
004a6254          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_sigilOneSlot, arg2);
004a6229      }
004a6229      
004a625f      if ((arg3 & 0x20000000) != 0)
004a625f      {
004a6261          eax->m_invSlotModule.sigilTwoSlot->m_itemID = arg2;
004a626f          UIElement_ItemList::ItemList_Flush(this->m_sigilTwoSlot);
004a627b          UIElement_ItemList::ItemList_AddItem(this->m_sigilTwoSlot, arg2);
004a628a          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_sigilTwoSlot, arg2);
004a625f      }
004a625f      
004a6295      if ((arg3 & 0x40000000) != 0)
004a6295      {
004a6297          eax->m_invSlotModule.sigilThreeSlot->m_itemID = arg2;
004a62a5          UIElement_ItemList::ItemList_Flush(this->m_sigilThreeSlot);
004a62b1          UIElement_ItemList::ItemList_AddItem(this->m_sigilThreeSlot, arg2);
004a62c0          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_sigilThreeSlot, arg2);
004a6295      }
004a6295      
004a62c8      if ((arg3 & 1) != 0)
004a62c8      {
004a62ca          eax->m_invSlotModule.headSlot->m_itemID = arg2;
004a62d8          UIElement_ItemList::ItemList_Flush(this->m_headSlot);
004a62e4          UIElement_ItemList::ItemList_AddItem(this->m_headSlot, arg2);
004a62f3          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_headSlot, arg2);
004a62c8      }
004a62c8      
004a62fb      if ((*(uint8_t*)((char*)arg3)[1] & 2) != 0)
004a62fb      {
004a62fd          eax->m_invSlotModule.chestSlot->m_itemID = arg2;
004a630b          UIElement_ItemList::ItemList_Flush(this->m_chestSlot);
004a6317          UIElement_ItemList::ItemList_AddItem(this->m_chestSlot, arg2);
004a6326          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_chestSlot, arg2);
004a62fb      }
004a62fb      
004a632e      if ((*(uint8_t*)((char*)arg3)[1] & 4) != 0)
004a632e      {
004a6330          eax->m_invSlotModule.abdomenSlot->m_itemID = arg2;
004a633e          UIElement_ItemList::ItemList_Flush(this->m_abdomenSlot);
004a634a          UIElement_ItemList::ItemList_AddItem(this->m_abdomenSlot, arg2);
004a6359          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_abdomenSlot, arg2);
004a632e      }
004a632e      
004a6361      if ((*(uint8_t*)((char*)arg3)[1] & 8) != 0)
004a6361      {
004a6363          eax->m_invSlotModule.upperArmSlot->m_itemID = arg2;
004a6371          UIElement_ItemList::ItemList_Flush(this->m_upperArmSlot);
004a637d          UIElement_ItemList::ItemList_AddItem(this->m_upperArmSlot, arg2);
004a638c          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_upperArmSlot, arg2);
004a6361      }
004a6361      
004a6394      if ((*(uint8_t*)((char*)arg3)[1] & 0x10) != 0)
004a6394      {
004a6396          eax->m_invSlotModule.lowerArmSlot->m_itemID = arg2;
004a63a4          UIElement_ItemList::ItemList_Flush(this->m_lowerArmSlot);
004a63b0          UIElement_ItemList::ItemList_AddItem(this->m_lowerArmSlot, arg2);
004a63bf          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_lowerArmSlot, arg2);
004a6394      }
004a6394      
004a63c7      if ((arg3 & 0x20) != 0)
004a63c7      {
004a63c9          eax->m_invSlotModule.handSlot->m_itemID = arg2;
004a63d7          UIElement_ItemList::ItemList_Flush(this->m_handSlot);
004a63e3          UIElement_ItemList::ItemList_AddItem(this->m_handSlot, arg2);
004a63f2          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_handSlot, arg2);
004a63c7      }
004a63c7      
004a63fa      if ((*(uint8_t*)((char*)arg3)[1] & 0x20) != 0)
004a63fa      {
004a63fc          eax->m_invSlotModule.upperLegSlot->m_itemID = arg2;
004a640a          UIElement_ItemList::ItemList_Flush(this->m_upperLegSlot);
004a6416          UIElement_ItemList::ItemList_AddItem(this->m_upperLegSlot, arg2);
004a6425          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_upperLegSlot, arg2);
004a63fa      }
004a63fa      
004a642d      if ((*(uint8_t*)((char*)arg3)[1] & 0x40) != 0)
004a642d      {
004a642f          eax->m_invSlotModule.lowerLegSlot->m_itemID = arg2;
004a643d          UIElement_ItemList::ItemList_Flush(this->m_lowerLegSlot);
004a6449          UIElement_ItemList::ItemList_AddItem(this->m_lowerLegSlot, arg2);
004a6458          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_lowerLegSlot, arg2);
004a642d      }
004a642d      
004a6460      if ((*(uint8_t*)((char*)arg3)[1] & 1) != 0)
004a6460      {
004a6462          eax->m_invSlotModule.footSlot->m_itemID = arg2;
004a6470          UIElement_ItemList::ItemList_Flush(this->m_footSlot);
004a647c          UIElement_ItemList::ItemList_AddItem(this->m_footSlot, arg2);
004a648b          gmPaperDollUI::UpdateItemSlotTooltip(this, this->m_footSlot, arg2);
004a6460      }
004a5f90  }

004a6497                                                                       90 90 90 90 90 90 90 90 90                         .........

004a64a0  void __thiscall gmPaperDollUI::ServerSaysMoveItem(class gmPaperDollUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004a64a0  {
004a64ab      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004a64b5      class CPlayerSystem* eax_1 = CPlayerSystem::GetPlayerSystem();
004a64b5      
004a64be      if (eax != 0)
004a64be      {
004a64c6          if (eax_1 != 0)
004a64c6          {
004a64c8              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a64cf              uint32_t player_id;
004a64cf              
004a64cf              if (SmartBox::smartbox_1 == 0)
004a64d9                  player_id = 0;
004a64cf              else
004a64d1                  player_id = SmartBox::smartbox_1->player_id;
004a64d1              
004a64e7              if ((arg4 == player_id && arg5 != 0))
004a64e7              {
004a64e9                  uint32_t _valid_locations = eax->pwd._valid_locations;
004a64f4                  uint32_t inventoryMask = eax_1->inventoryMask;
004a64fa                  uint32_t _valid_locations_2;
004a64fa                  
004a64fa                  if ((_valid_locations & 0x8007fff) != 0)
004a64fa                  {
004a6511                      uint32_t clothingPriorityMask = eax_1->clothingPriorityMask;
004a6517                      eax_1->inventoryMask = (inventoryMask & !(_valid_locations));
004a6527                      eax_1->clothingPriorityMask = (clothingPriorityMask & !(eax->pwd._priority));
004a652d                      _valid_locations_2 = _valid_locations;
004a64fa                  }
004a64fa                  else
004a64fa                  {
004a6502                      eax_1->inventoryMask = (inventoryMask & !(arg5));
004a6508                      _valid_locations_2 = arg5;
004a64fa                  }
004a64fa                  
004a6532                  gmPaperDollUI::SetUIItemIntoLocation(this, 0, _valid_locations_2);
004a64e7              }
004a64c6          }
004a64c6          
004a6537          class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
004a653e          uint32_t player_id_1;
004a653e          
004a653e          if (SmartBox::smartbox_2 == 0)
004a6548              player_id_1 = 0;
004a653e          else
004a6540              player_id_1 = SmartBox::smartbox_2->player_id;
004a6540          
004a6556          if ((arg8 == player_id_1 && arg9 != 0))
004a6556          {
004a6558              uint32_t _valid_locations_1 = eax->pwd._valid_locations;
004a6558              
004a6563              if ((_valid_locations_1 & 0x8007fff) == 0)
004a6563              {
004a6571                  eax_1->inventoryMask |= arg9;
004a6577                  gmPaperDollUI::SetUIItemIntoLocation(this, arg2, arg9);
004a6580                  return;
004a6563              }
004a6563              
004a6589              uint32_t clothingPriorityMask_1 = eax_1->clothingPriorityMask;
004a6591              eax_1->inventoryMask |= _valid_locations_1;
004a65a3              eax_1->clothingPriorityMask = (clothingPriorityMask_1 | eax->pwd._priority);
004a65a9              gmPaperDollUI::SetUIItemIntoLocation(this, arg2, _valid_locations_1);
004a6556          }
004a64be      }
004a64a0  }

004a65b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004a65c0  uint8_t __fastcall gmPaperDollUI::RemakeCharacterInventory(class gmPaperDollUI* this)

004a65c0  {
004a65c0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a65cc      uint32_t player_id;
004a65cc      
004a65cc      if (SmartBox::smartbox_1 == 0)
004a65d6          player_id = 0;
004a65cc      else
004a65ce          player_id = SmartBox::smartbox_1->player_id;
004a65ce      
004a65d9      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(player_id);
004a65ea      class CPlayerSystem* edi = CPlayerSystem::GetPlayerSystem();
004a65f0      class CPlayerSystem* eax_1;
004a65f0      
004a65f0      if ((eax != 0 && edi != 0))
004a65f0      {
004a65fb          edi->inventoryMask = 0;
004a6605          edi->clothingPriorityMask = 0;
004a660f          gmPaperDollUI::SetUIItemIntoLocation(this, 0, 0x7fffffff);
004a6616          eax_1 = ACCWeenieObject::GetInvPlacementList(eax);
004a6616          
004a661d          if (eax_1 != 0)
004a661d          {
004a6624              for (struct gmNoticeHandler::VTable* i = eax_1->vtable; i != 0; i = i->RecvNotice_ItemAttributesChanged)
004a6624              {
004a6626                  uint32_t RecvNotice_PlayerObjDescChanged = i->RecvNotice_PlayerObjDescChanged;
004a662b                  void (__thiscall* RecvNotice_CharacterSet)(class NoticeHandler* this, class CharacterSet const*) = i->RecvNotice_CharacterSet;
004a662e                  void (__thiscall* RecvNotice_RuntimeDDDStatus)(class NoticeHandler* this, uint8_t, uint32_t, uint32_t) = i->RecvNotice_RuntimeDDDStatus;
004a662e                  
004a6631                  if (RecvNotice_PlayerObjDescChanged != 0)
004a6633                      edi->inventoryMask |= RecvNotice_PlayerObjDescChanged;
004a6633                  
004a663e                  if ((RecvNotice_PlayerObjDescChanged & 0x8007fff) != 0)
004a6640                      edi->clothingPriorityMask |= RecvNotice_RuntimeDDDStatus;
004a6640                  
004a664a                  gmPaperDollUI::SetUIItemIntoLocation(this, RecvNotice_CharacterSet, RecvNotice_PlayerObjDescChanged);
004a6624              }
004a6624              
004a6658              gmPaperDollUI::RedressCreature(this);
004a661d          }
004a65f0      }
004a65f0      
004a665f      eax_1 = 1;
004a6662      return 1;
004a65c0  }

004a6663           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a6670  void __thiscall gmInventoryUI::gmInventoryUI(class gmInventoryUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004a6670  {
004a667f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004a6684      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a6690      this->m_paperDollUI = nullptr;
004a6696      this->m_backpackUI = nullptr;
004a669c      this->m_3DItemsUI = nullptr;
004a66a2      this->m_titleText = nullptr;
004a66a8      this->vtable = 0x7ac918;
004a66ae      this->vtable = &gmInventoryUI::`vftable';
004a6670  }

004a66be                                                                                            90 90                                ..

004a66c0  class UIElement* __thiscall gmInventoryUI::DynamicCast(class gmInventoryUI* this, uint32_t arg2) __pure

004a66c0  {
004a66cc      if (arg2 == 0x10000023)
004a66d9          return this;
004a66d9      
004a66d3      int32_t edx_1;
004a66d3      edx_1 = arg2 != 3;
004a66d7      return (this & (edx_1 - 1));
004a66c0  }

004a66dc                                                                                      90 90 90 90                              ....

004a66e0  uint32_t gmInventoryUI::GetUIElementType(class gmInventoryUI const* this @ ecx) __pure

004a66e0  {
004a66e5      return 0x10000023;
004a66e0  }

004a66e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a66f0  class UIElement* gmInventoryUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a66f0  {
004a66f5      void* eax = operator new(0x60c);
004a66f5      
004a66ff      if (eax == 0)
004a6715          return 0;
004a6715      
004a6712      return gmInventoryUI::gmInventoryUI(eax, arg1, arg2);
004a66f0  }

004a6716                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004a6720  void __thiscall gmInventoryUI::RecvNotice_UpdateCharacterInformation(class gmInventoryUI* this, class CACQualities const* arg2)

004a6720  {
004a672c      CACQualities::InqLoad(arg2, &arg2);
004a6731      struct IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::VTable* vtable = this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable;
004a6731      
004a6737      if (vtable != 0)
004a6737      {
004a6740          float* var_8;
004a6740          var_8 = ((double)((long double)arg2));
004a6743          gmBackpackUI::SetLoadLevel(vtable, var_8);
004a6737      }
004a6720  }

004a674b                                   90 90 90 90 90                                                             .....

004a6750  void __fastcall gmInventoryUI::RecvNotice_SetDisplayInventory(class gmInventoryUI* this, int32_t arg2)

004a6750  {
004a6753      struct IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::VTable* vtable = this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable;
004a6753      
004a6758      if (vtable != 0)
004a6758      {
004a676a          class SmartBox* SmartBox::smartbox_4 = SmartBox::smartbox;
004a6772          uint32_t player_id_3;
004a6772          
004a6772          if (SmartBox::smartbox_4 == 0)
004a677c              player_id_3 = 0;
004a6772          else
004a6774              player_id_3 = SmartBox::smartbox_4->player_id;
004a6774          
004a6780          if (*(uint32_t*)(*(int32_t*)((char*)vtable + 0x608) + 0x66c) != player_id_3)
004a6780          {
004a6788              UIElement_ItemList::ItemList_Flush(*(int32_t*)((char*)vtable + 0x604));
004a678d              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a6794              uint32_t player_id;
004a6794              
004a6794              if (SmartBox::smartbox_1 == 0)
004a679e                  player_id = 0;
004a6794              else
004a6796                  player_id = SmartBox::smartbox_1->player_id;
004a6796              
004a67aa              UIElement_ItemList::ItemList_AddItem(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x604), player_id);
004a67af              class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
004a67b6              uint32_t player_id_1;
004a67b6              
004a67b6              if (SmartBox::smartbox_2 == 0)
004a67c0                  player_id_1 = 0;
004a67b6              else
004a67b8                  player_id_1 = SmartBox::smartbox_2->player_id;
004a67b8              
004a67d0              UIElement_ItemList::ItemList_SetParentContainer(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x608), player_id_1, 0, 1);
004a67d5              class SmartBox* SmartBox::smartbox_3 = SmartBox::smartbox;
004a67dc              uint32_t player_id_2;
004a67dc              
004a67dc              if (SmartBox::smartbox_3 == 0)
004a67e6                  player_id_2 = 0;
004a67dc              else
004a67de                  player_id_2 = SmartBox::smartbox_3->player_id;
004a67de              
004a67f4              UIElement_ItemList::ItemList_OpenContainer(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x604), player_id_2, 1);
004a6780          }
004a6758      }
004a6758      
004a67f9      struct HashSet<UIElement *>::VTable* vtable_1 = this->m_hashElementsRegisteredWith.vtable;
004a67f9      
004a67ff      if (vtable_1 != 0)
004a6801          gmPaperDollUI::RemakeCharacterInventory(vtable_1);
004a6750  }

004a6809                             90 90 90 90 90 90 90                                                           .......

004a6810  void __thiscall gmInventoryUI::RecvNotice_ItemAttributesChanged(class gmInventoryUI* this, uint32_t arg2, uint32_t arg3)

004a6810  {
004a6810      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a6817      uint32_t player_id;
004a6817      
004a6817      if (SmartBox::smartbox_1 == 0)
004a6821          player_id = 0;
004a6817      else
004a6819          player_id = SmartBox::smartbox_1->player_id;
004a6819      
004a682e      if ((arg2 == player_id && (arg3 & 1) != 0))
004a682e      {
004a6830          struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004a6830          
004a6835          if (vtable != 0)
004a6837              gmPaperDollUI::RemakeCharacterInventory(vtable);
004a682e      }
004a6810  }

004a683f                                                                                               90                                 .

004a6840  void __thiscall gmInventoryUI::RecvNotice_ServerSaysMoveItem(class gmInventoryUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004a6840  {
004a685c      if (arg2 == *(uint32_t*)(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] + 0x600) + 0x66c))
004a685c      {
004a685e          struct IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::VTable* vtable = this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable;
004a685e          
004a686d          if (arg6 != *(uint32_t*)(*(int32_t*)((char*)vtable + 0x608) + 0x66c))
004a6875              UIElement_ItemList::ItemList_OpenFirstContainer(*(int32_t*)((char*)vtable + 0x604));
004a685c      }
004a685c      
004a687a      class gmPaperDollUI* vtable_1 = this->m_hashElementsRegisteredWith.vtable;
004a687a      
004a687f      if (vtable_1 != 0)
004a68a1          gmPaperDollUI::ServerSaysMoveItem(vtable_1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
004a6840  }

004a68ac                                      90 90 90 90                                                              ....

004a68b0  void __fastcall gmInventoryUI::RecvNotice_EndPendingInPlayer(class gmInventoryUI* this)

004a68b0  {
004a68b3      class HashSetData<UIElement *>* eax = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0];
004a68b3      
004a68b8      if (eax != 0)
004a68b8      {
004a68ba          class UIElement_ItemList* eax_1 = *(int32_t*)((char*)eax + 0x600);
004a68ba          
004a68c2          if (eax_1 != 0)
004a68c2          {
004a68c6              UIElement_ItemList::DeletePendingItem(eax_1);
004a68d5              /* tailcall */
004a68d5              return UIElement_ItemList::RefreshList(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] + 0x600));
004a68c2          }
004a68b8      }
004a68b0  }

004a68dc                                                                                      90 90 90 90                              ....

004a68e0  void* __thiscall gmInventoryUI::`scalar deleting destructor'(class gmInventoryUI* this, uint32_t arg2)

004a68e0  {
004a68ea      this->vtable = 0x7ac918;
004a68e4      this->vtable = &gmInventoryUI::`vftable';
004a68f6      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004a68f6      
004a68fd      if (eax != 0)
004a68ff          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004a68ff      
004a68e4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a690f      NoticeHandler::~NoticeHandler(&this->vtable);
004a6916      UIElement_Field::~UIElement_Field(this);
004a6916      
004a6920      if ((arg2 & 1) != 0)
004a6923          operator delete(this);
004a6923      
004a692f      return this;
004a68e0  }

004a6932                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004a6940  void __fastcall gmInventoryUI::PostInit(class gmInventoryUI* this)

004a6940  {
004a6944      UIElement::PostInit(this);
004a695c      this->m_titleText = UIElement::GetChildRecursive(this, 0x100001d3);
004a6962      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x100001cd);
004a6969      class gmPaperDollUI* eax_2;
004a6969      
004a6969      if (eax_1 == 0)
004a697c          eax_2 = nullptr;
004a6969      else
004a6974          eax_2 = eax_1->vtable->DynamicCast(0x10000024);
004a6974      
004a6985      this->m_paperDollUI = eax_2;
004a698b      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x100001ce);
004a6992      class gmBackpackUI* eax_4;
004a6992      
004a6992      if (eax_3 == 0)
004a69a5          eax_4 = nullptr;
004a6992      else
004a699d          eax_4 = eax_3->vtable->DynamicCast(0x10000022);
004a699d      
004a69ae      this->m_backpackUI = eax_4;
004a69b4      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100001cf);
004a69bb      class gm3DItemsUI* eax_6;
004a69bb      
004a69bb      if (eax_5 == 0)
004a69ce          eax_6 = nullptr;
004a69bb      else
004a69c6          eax_6 = eax_5->vtable->DynamicCast(0x10000021);
004a69c6      
004a69d0      this->m_3DItemsUI = eax_6;
004a69d6      class GlobalEventHandler* eax_7 = GlobalEventHandler::GetGlobalEventHandler();
004a69dd      eax_7->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004a69f0      eax_7->vtable->RegisterNoticeHandler(0x4dd1f1, &this->vtable);
004a69fd      eax_7->vtable->RegisterNoticeHandler(0x4dd1f2, &this->vtable);
004a6a0a      eax_7->vtable->RegisterNoticeHandler(0x4dd1f6, &this->vtable);
004a6a17      eax_7->vtable->RegisterNoticeHandler(0x4dd266, &this->vtable);
004a6a24      eax_7->vtable->RegisterNoticeHandler(0x186ab, &this->vtable);
004a6a31      eax_7->vtable->RegisterNoticeHandler(0x186a8, &this->vtable);
004a6a3e      eax_7->vtable->RegisterNoticeHandler(0x4dd25b, &this->vtable);
004a6a4b      eax_7->vtable->RegisterNoticeHandler(0x4dd25d, &this->vtable);
004a6940  }

004a6a5b                                                                                   90 90 90 90 90                             .....

004a6a60  void gmInventoryUI::Register()

004a6a60  {
004a6a6a      UIElement::RegisterElementClass(0x10000023, gmInventoryUI::Create);
004a6a60  }

004a6a73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a6a80  void __thiscall gmInventoryUI::RecvNotice_OpenContainedContainer(class gmInventoryUI* this, uint32_t arg2)

004a6a80  {
004a6a8a      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004a6a8a      
004a6a96      if ((eax != 0 && (ACCWeenieObject::IsOwnedByPlayer(eax) != 0 && (((eax->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || eax->pwd._itemsCapacity != 0) || eax->pwd._containersCapacity != 0))))
004a6a96      {
004a6ad9          *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004a6adc          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a6ae3          uint32_t player_id;
004a6ae3          
004a6ae3          if (SmartBox::smartbox_1 == 0)
004a6aed              player_id = 0;
004a6ae3          else
004a6ae5              player_id = SmartBox::smartbox_1->player_id;
004a6ae5          
004a6af1          if (arg2 == player_id)
004a6af1          {
004a6af5              if (SmartBox::smartbox_1 != 0)
004a6af5              {
004a6b09                  UIElement_ItemList::ItemList_OpenContainer(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x604), SmartBox::smartbox_1->player_id, 1);
004a6b11                  return;
004a6af5              }
004a6af5              
004a6b22              UIElement_ItemList::ItemList_OpenContainer(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x604), 0, 1);
004a6b2a              return;
004a6af1          }
004a6af1          
004a6b39          UIElement_ItemList::ItemList_OpenContainer(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x608), arg2, 1);
004a6a96      }
004a6a80  }

004a6b44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004a6b50  void __thiscall gmInventoryUI::RecvNotice_ShowPendingInPlayer(class gmInventoryUI* this, uint32_t arg2)

004a6b50  {
004a6b53      class HashSetData<UIElement *>* eax = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0];
004a6b53      
004a6b6b      if ((eax != 0 && (*(int32_t*)((char*)eax + 0x600) != 0 && arg2 != 0)))
004a6b6b      {
004a6b6e          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
004a6b6e          
004a6b78          if (eax_1 != 0)
004a6b78          {
004a6b7c              int32_t eax_2 = ACCWeenieObject::IsContainer(eax_1);
004a6b7c              
004a6b83              if (eax_2 == 0)
004a6b83              {
004a6b90                  class UIElement_UIItem* eax_4 = UIElement_ItemList::ItemList_InsertItem(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] + 0x600), arg2, eax_2);
004a6b90                  
004a6b99                  if (eax_4 != 0)
004a6b99                  {
004a6b9f                      UIElement_UIItem::SetWaitingState(eax_4, 1);
004a6bae                      UIElement_ItemList::SetAsPendingItem(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] + 0x600), eax_4);
004a6b99                  }
004a6b83              }
004a6b78          }
004a6b6b      }
004a6b50  }

004a6bb8                                                                          90 90 90 90 90 90 90 90                          ........

004a6bc0  void __fastcall gmInventoryUI::RecvNotice_PlayerDescReceived(class gmInventoryUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004a6bc0  {
004a6bc0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a6bcf      uint32_t player_id;
004a6bcf      
004a6bcf      if (SmartBox::smartbox_1 == 0)
004a6bd9          player_id = 0;
004a6bcf      else
004a6bd1          player_id = SmartBox::smartbox_1->player_id;
004a6bd1      
004a6bec      class PStringBase<unsigned short> __return;
004a6bec      class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(&__return, player_id, NAME_SINGULAR, 0)->m_charbuffer;
004a6bf9      void* var_8;
004a6bf9      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, Formatted, u"Inventory of %s");
004a6c08      int32_t* esi_1 = (__return - 0x14);
004a6c08      
004a6c1a      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004a6c22          **(uint32_t**)esi_1(1);
004a6c22      
004a6c2c      UIElement_Text::SetText(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1], &var_8);
004a6c44      UIElement_ItemList::ItemList_SetChildList(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x604), *(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] + 0x600));
004a6c5c      UIElement_ItemList::ItemList_SetChildList(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable + 0x608), *(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] + 0x600));
004a6c65      int32_t* esi_3 = ((char*)var_8 - 0x14);
004a6c65      
004a6c74      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004a6c7c          **(uint32_t**)esi_3(1);
004a6bc0  }

004a6c87                       90 90 90 90 90 90 90 90 90                                                         .........

004a6c90  void __fastcall gmInventoryUI::RecvNotice_NewParentContainer(class gmInventoryUI* this, uint32_t arg2)

004a6c90  {
004a6c90      class gmInventoryUI* __return = this;
004a6c91      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004a6c98      int32_t ebx;
004a6c98      int32_t var_8 = ebx;
004a6c99      int32_t esi;
004a6c99      int32_t var_c = esi;
004a6c9c      uint32_t player_id;
004a6c9c      
004a6c9c      if (SmartBox::smartbox_1 == 0)
004a6ca6          player_id = 0;
004a6c9c      else
004a6c9e          player_id = SmartBox::smartbox_1->player_id;
004a6c9e      
004a6ca8      uint32_t eax = arg2;
004a6cae      int32_t eax_1;
004a6cae      wchar16 const* const* esp_1;
004a6cae      int32_t* esi_2;
004a6cae      wchar16 const* const var_10;
004a6cae      
004a6cae      if (eax != player_id)
004a6cae      {
004a6ce4          wchar16* edi;
004a6ce4          var_10 = edi;
004a6ce5          int32_t var_14 = 0;
004a6ce7          int32_t var_18_1 = 2;
004a6cf6          class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(&__return, eax, NAME_APPROPRIATE, var_14)->m_charbuffer;
004a6cf7          wchar16 const* const var_28_1 = u"Contents of %s";
004a6d00          int32_t var_2c_1 = 0;
004a6d03          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, u"Contents of %s");
004a6d12          void* __offset(gmInventoryUI, -0x14) esi_4 = ((char*)__return - 0x14);
004a6d1b          var_14 = ((char*)esi_4 + 4);
004a6d1b          
004a6d24          if ((InterlockedDecrement(var_14) == 0 && esi_4 != 0))
004a6d24          {
004a6d28              int32_t var_18_2 = 1;
004a6d2c              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004a6d24          }
004a6d24          
004a6d3c          UIElement_Text::SetText(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] + 0x5fc), &__return_addr);
004a6d45          esi_2 = ((char*)__return_addr - 0x14);
004a6d4c          eax_1 = InterlockedDecrement(&esi_2[1]);
004a6d4e          esp_1 = &var_14;
004a6cae      }
004a6cae      else
004a6cae      {
004a6cb0          var_10 = u"Contents of Backpack";
004a6cb9          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, var_10);
004a6cc1          class UIElement_Text* ecx_2 = *(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] + 0x5fc);
004a6ccb          var_10 = &arg2;
004a6ccc          UIElement_Text::SetText(ecx_2, var_10);
004a6cd5          esi_2 = (arg2 - 0x14);
004a6cdb          var_10 = &esi_2[1];
004a6cdb          esp_1 = &var_10;
004a6cdc          eax_1 = InterlockedDecrement(var_10);
004a6cae      }
004a6cae      
004a6d55      if ((eax_1 == 0 && esi_2 != 0))
004a6d55      {
004a6d57          int32_t eax_4 = *(uint32_t*)esi_2;
004a6d5b          *(uint32_t*)((char*)esp_1 - 4) = 1;
004a6d5d          *(uint32_t*)eax_4();
004a6d55      }
004a6d55      
004a6d5f      *(uint32_t*)esp_1;
004a6d5f      esp_1[1];
004a6d5f      esp_1[2];
004a6c90  }

004a6d65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004a6d70  void __thiscall gmBackpackUI::gmBackpackUI(class gmBackpackUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004a6d70  {
004a6d7f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004a6d84      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a6d90      this->m_burdenText = nullptr;
004a6d96      this->m_burdenMeter = nullptr;
004a6d9c      this->m_topContainer = nullptr;
004a6da2      this->m_containerList = nullptr;
004a6da8      this->vtable = &gmBackpackUI::`vftable';
004a6dae      this->vtable = &gmBackpackUI::`vftable';
004a6d70  }

004a6dbe                                                                                            90 90                                ..

004a6dc0  class UIElement* __thiscall gmBackpackUI::DynamicCast(class gmBackpackUI* this, uint32_t arg2) __pure

004a6dc0  {
004a6dcc      if (arg2 == 0x10000022)
004a6dd9          return this;
004a6dd9      
004a6dd3      int32_t edx_1;
004a6dd3      edx_1 = arg2 != 3;
004a6dd7      return (this & (edx_1 - 1));
004a6dc0  }

004a6ddc                                                                                      90 90 90 90                              ....

004a6de0  uint32_t gmBackpackUI::GetUIElementType(class gmBackpackUI const* this @ ecx) __pure

004a6de0  {
004a6de5      return 0x10000022;
004a6de0  }

004a6de6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a6df0  class UIElement* gmBackpackUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a6df0  {
004a6df5      void* eax = operator new(0x60c);
004a6df5      
004a6dff      if (eax == 0)
004a6e15          return 0;
004a6e15      
004a6e12      return gmBackpackUI::gmBackpackUI(eax, arg1, arg2);
004a6df0  }

004a6e16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004a6e20  void* __thiscall gmBackpackUI::`scalar deleting destructor'(class gmBackpackUI* this, uint32_t arg2)

004a6e20  {
004a6e2a      this->vtable = &gmBackpackUI::`vftable';
004a6e24      this->vtable = &gmBackpackUI::`vftable';
004a6e36      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004a6e36      
004a6e3d      if (eax != 0)
004a6e3f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004a6e3f      
004a6e24      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a6e4f      NoticeHandler::~NoticeHandler(&this->vtable);
004a6e56      UIElement_Field::~UIElement_Field(this);
004a6e56      
004a6e60      if ((arg2 & 1) != 0)
004a6e63          operator delete(this);
004a6e63      
004a6e6f      return this;
004a6e20  }

004a6e72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004a6e80  void gmBackpackUI::Register()

004a6e80  {
004a6e8a      UIElement::RegisterElementClass(0x10000022, gmBackpackUI::Create);
004a6e80  }

004a6e93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a6ea0  void __thiscall gmBackpackUI::SetLoadLevel(class gmBackpackUI* this, double arg2)

004a6ea0  {
004a6ea0      class gmBackpackUI* this_1 = this;
004a6ea5      int32_t __saved_esi_1;
004a6ea5      int32_t __saved_esi = __saved_esi_1;
004a6ea6      long double x87_r7_1 = (((long double)arg2) * ((long double)0.33333333333333331));
004a6eae      arg2 = ((double)x87_r7_1);
004a6eb2      (x87_r7_1 - ((long double)0.0));
004a6eba      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004a6eba      
004a6ebd      if (p)
004a6ebd      {
004a6ec9          long double x87_r7_2 = ((long double)arg2);
004a6ecd          long double temp2_1 = ((long double)1.0);
004a6ecd          (x87_r7_2 - temp2_1);
004a6ecd          
004a6ed8          if ((*(uint8_t*)((char*)((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
004a6ed8          {
004a6eda              *(uint32_t*)((char*)arg2)[4] = 0x3ff00000;
004a6ee2              arg2 = 0;
004a6ed8          }
004a6ebd      }
004a6ebd      else
004a6ebd      {
004a6ebf          *(uint32_t*)((char*)arg2)[4] = 0;
004a6ee2          arg2 = 0;
004a6ebd      }
004a6ebd      
004a6eea      class UIElement_Meter* m_burdenMeter = this->m_burdenMeter;
004a6eea      
004a6ef2      if (m_burdenMeter != 0)
004a6ef2      {
004a6ef8          int64_t var_10;
004a6ef8          *(uint32_t*)((char*)var_10)[4] = m_burdenMeter;
004a6ef9          *(uint32_t*)((char*)var_10)[4] = ((float)((long double)arg2));
004a6efc          var_10 = 0x69;
004a6efe          UIElement::SetAttribute_Float();
004a6ef2      }
004a6ef2      
004a6f13      floor(((double)(((long double)arg2) * ((long double)300.0))));
004a6f1e      int32_t var_14 = _ftol2();
004a6f1f      wchar16 const* const var_18 = u"%d%%";
004a6f28      int32_t var_1c = 0;
004a6f2b      PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, Formatted, u"%d%%");
004a6f37      double var_10_1;
004a6f37      *(uint32_t*)((char*)var_10_1)[4] = &this_1;
004a6f3e      UIElement_Text::SetText(this->m_burdenText);
004a6f47      void* __offset(gmBackpackUI, -0x14) esi_2 = ((char*)this_1 - 0x14);
004a6f4d      *(uint32_t*)((char*)var_10_1)[4] = ((char*)esi_2 + 4);
004a6f4d      
004a6f5a      if ((InterlockedDecrement() == 0 && esi_2 != 0))
004a6f5a      {
004a6f5e          *(uint32_t*)((char*)var_10_1)[4] = 1;
004a6f62          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)();
004a6f5a      }
004a6ea0  }

004a6f69                             90 90 90 90 90 90 90                                                           .......

004a6f70  void __fastcall gmBackpackUI::PostInit(class gmBackpackUI* this)

004a6f70  {
004a6f74      UIElement::PostInit(this);
004a6f8c      this->m_burdenText = UIElement::GetChildRecursive(this, 0x100001d8);
004a6f92      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x100001d9);
004a6f99      class UIElement_Meter* eax_2;
004a6f99      
004a6f99      if (eax_1 == 0)
004a6fa9          eax_2 = nullptr;
004a6f99      else
004a6fa1          eax_2 = eax_1->vtable->DynamicCast(7);
004a6fa1      
004a6fab      int32_t var_c = 0;
004a6fb1      this->m_burdenMeter = eax_2;
004a6fb7      gmBackpackUI::SetLoadLevel(this, 0f);
004a6fc3      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x100001c9);
004a6fca      class UIElement_ItemList* eax_4;
004a6fca      
004a6fca      if (eax_3 == 0)
004a6fdd          eax_4 = nullptr;
004a6fca      else
004a6fd5          eax_4 = eax_3->vtable->DynamicCast(0x10000031);
004a6fd5      
004a6fe6      this->m_topContainer = eax_4;
004a6fec      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100001ca);
004a6ff3      class UIElement_ItemList* eax_6;
004a6ff3      
004a6ff3      if (eax_5 == 0)
004a7006          eax_6 = nullptr;
004a6ff3      else
004a6ffe          eax_6 = eax_5->vtable->DynamicCast(0x10000031);
004a6ffe      
004a7008      this->m_containerList = eax_6;
004a700e      class GlobalEventHandler* eax_7 = GlobalEventHandler::GetGlobalEventHandler();
004a700e      
004a7017      if (eax_7 != 0)
004a7017      {
004a7019          eax_7->vtable->RegisterNoticeHandler(0x4dd220, &this->vtable);
004a702c          eax_7->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004a7017      }
004a6f70  }

004a703c                                                                                      90 90 90 90                              ....

004a7040  void __thiscall gmBackpackUI::RecvNotice_PlayerDescReceived(class gmBackpackUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004a7040  {
004a7040      class gmBackpackUI* this_1 = this;
004a7041      int32_t __saved_esi_1;
004a7041      int32_t __saved_esi = __saved_esi_1;
004a704c      class gmBackpackUI** var_c = &this_1;
004a704d      this_1 = nullptr;
004a7055      CACQualities::InqLoad(arg2);
004a706a      gmBackpackUI::SetLoadLevel(((char*)this - 0x5f8), ((double)((long double)this_1)));
004a7040  }

004a7074                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004a7080  void __thiscall gmBackpackUI::RecvNotice_LoadChanged(class gmBackpackUI* this, float arg2)

004a7080  {
004a7090      gmBackpackUI::SetLoadLevel(((char*)this - 0x5f8), ((double)((long double)arg2)));
004a7080  }

004a7098                                                                          90 90 90 90 90 90 90 90                          ........

004a70a0  class UIElement* __thiscall gm3DItemsUI::DynamicCast(class gm3DItemsUI* this, uint32_t arg2) __pure

004a70a0  {
004a70ac      if (arg2 == 0x10000021)
004a70b9          return this;
004a70b9      
004a70b3      int32_t edx_1;
004a70b3      edx_1 = arg2 != 3;
004a70b7      return (this & (edx_1 - 1));
004a70a0  }

004a70bc                                                                                      90 90 90 90                              ....

004a70c0  uint32_t gm3DItemsUI::GetUIElementType(class gm3DItemsUI const* this @ ecx) __pure

004a70c0  {
004a70c5      return 0x10000021;
004a70c0  }

004a70c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a70d0  class UIElement* gm3DItemsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a70d0  {
004a70d6      void* result = operator new(0x604);
004a70d6      
004a70e2      if (result == 0)
004a712a          return 0;
004a712a      
004a70f0      UIElement_Field::UIElement_Field(result, arg1, arg2);
004a70f5      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004a70ff      *(uint32_t*)result = &gm3DItemsUI::`vftable';
004a7105      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004a710f      *(uint32_t*)((char*)result + 0x5fc) = 0;
004a7119      *(uint32_t*)((char*)result + 0x600) = 0;
004a7126      return result;
004a70d0  }

004a712b                                   90 90 90 90 90                                                             .....

004a7130  void* __thiscall gm3DItemsUI::`scalar deleting destructor'(class gm3DItemsUI* this, uint32_t arg2)

004a7130  {
004a7139      this->vtable = &gm3DItemsUI::`vftable';
004a7133      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a7133      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a714b      NoticeHandler::~NoticeHandler(&this->vtable);
004a7152      UIElement_Field::~UIElement_Field(this);
004a7152      
004a715c      if ((arg2 & 1) != 0)
004a715f          operator delete(this);
004a715f      
004a716a      return this;
004a7130  }

004a716d                                         90 90 90                                                               ...

004a7170  void gm3DItemsUI::Register()

004a7170  {
004a717a      UIElement::RegisterElementClass(0x10000021, gm3DItemsUI::Create);
004a7170  }

004a7183           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a7190  void __fastcall gm3DItemsUI::PostInit(class gm3DItemsUI* this)

004a7190  {
004a7190      class gm3DItemsUI* this_1 = this;
004a7194      UIElement::PostInit(this);
004a71ac      this->m_contentsText = UIElement::GetChildRecursive(this, 0x100001c5);
004a71b2      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x100001c6);
004a71b9      class UIElement_ItemList* eax_2;
004a71b9      
004a71b9      if (eax_1 == 0)
004a71cc          eax_2 = nullptr;
004a71b9      else
004a71c4          eax_2 = eax_1->vtable->DynamicCast(0x10000031);
004a71c4      
004a71d3      this->m_itemList = eax_2;
004a71e7      PStringBase<unsigned short>::allocate_ref_buffer(&this_1, wcslen(u"Contents of Backpack"));
004a71f6      wcscpy(this_1, u"Contents of Backpack");
004a720a      UIElement_Text::SetText(this->m_contentsText, &this_1);
004a7213      void* __offset(gm3DItemsUI, -0x14) esi_2 = ((char*)this_1 - 0x14);
004a7213      
004a7226      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004a722e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004a7190  }

004a7233                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a7240  void __fastcall gmVitaeUI::PostInit(class gmVitaeUI* this)

004a7240  {
004a7245      UIElement::PostInit(this);
004a7256      this->m_pMainText = UIElement::GetChildRecursive(this, 0x100001c3);
004a725c      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
004a7263      eax_1->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004a7276      eax_1->vtable->RegisterNoticeHandler(0x4dd215, &this->vtable);
004a7283      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x81, &this->vtable);
004a7240  }


004a72a0  void __fastcall gmVitaeUI::~gmVitaeUI(class gmVitaeUI* this)

004a72a0  {
004a72b1      this->vtable = 0x7ad4c0;
004a72a5      this->vtable = &gm3DItemsUI::`vftable'.RecvNotice_AddCharacterTitle;
004a72ab      this->vtable = &gm3DItemsUI::`vftable'.RecvNotice_VitaeChanged;
004a72c3      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004a72c3      
004a72ca      if (eax != 0)
004a72cc          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004a72cc      
004a72d4      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x81, &this->vtable);
004a72a5      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a72ef      NoticeHandler::~NoticeHandler(&this->vtable);
004a72f9      /* tailcall */
004a72f9      return UIElement_Field::~UIElement_Field(this);
004a72a0  }

004a72fe                                                                                            90 90                                ..

004a7300  class UIElement* __thiscall gmVitaeUI::DynamicCast(class gmVitaeUI* this, uint32_t arg2) __pure

004a7300  {
004a730c      if (arg2 == 0x10000020)
004a7319          return this;
004a7319      
004a7313      int32_t edx_1;
004a7313      edx_1 = arg2 != 3;
004a7317      return (this & (edx_1 - 1));
004a7300  }

004a731c                                                                                      90 90 90 90                              ....

004a7320  uint32_t gmVitaeUI::GetUIElementType(class gmVitaeUI const* this @ ecx) __pure

004a7320  {
004a7325      return 0x10000020;
004a7320  }

004a7326                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a7330  void __thiscall gmVitaeUI::gmVitaeUI(class gmVitaeUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004a7330  {
004a733f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004a7344      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a734e      this->vtable = &QualityChangeHandler::`vftable';
004a7358      this->vtable = 0x7ad4c0;
004a735e      this->vtable = &gm3DItemsUI::`vftable'.RecvNotice_AddCharacterTitle;
004a7368      this->vtable = &gm3DItemsUI::`vftable'.RecvNotice_VitaeChanged;
004a7372      this->m_pMainText = nullptr;
004a737c      this->m_currentVitae = 1f;
004a7330  }

004a738c                                      90 90 90 90                                                              ....

004a7390  void* __thiscall gmVitaeUI::`scalar deleting destructor'(class gmVitaeUI* this, uint32_t arg2)

004a7390  {
004a7393      gmVitaeUI::~gmVitaeUI(this);
004a7393      
004a739d      if ((arg2 & 1) != 0)
004a73a0          operator delete(this);
004a73a0      
004a73ab      return this;
004a7390  }

004a73ae                                            90 90                                                                ..

004a73b0  class UIElement* gmVitaeUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a73b0  {
004a73b5      void* eax = operator new(0x608);
004a73b5      
004a73bf      if (eax == 0)
004a73d5          return 0;
004a73d5      
004a73d2      return gmVitaeUI::gmVitaeUI(eax, arg1, arg2);
004a73b0  }

004a73d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004a73e0  void gmVitaeUI::Register()

004a73e0  {
004a73ea      UIElement::RegisterElementClass(0x10000020, gmVitaeUI::Create);
004a73e0  }

004a73f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a7400  uint8_t __fastcall gmVitaeUI::Update(class gmVitaeUI* this)

004a7400  {
004a7406      int32_t ebx;
004a7406      int32_t var_260 = ebx;
004a7407      void* __return_2;
004a7407      void* __return = __return_2;
004a7415      int32_t __saved_edi;
004a7415      int32_t* esp = &__saved_edi;
004a7415      
004a7416      if (((this->__bitfield164 >> 1) & 1) != 0)
004a7416      {
004a741c          struct Turbine_GUID* var_25c;
004a741c          int32_t* var_270_1 = &var_25c;
004a7421          struct Turbine_GUID* var_274 = &gm3DItemsUI::`vftable'.RecvNotice_LastSpellSelection;
004a7429          var_25c = nullptr;
004a7434          void __return_1;
004a7434          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, var_274, var_270_1);
004a7439          struct Turbine_GUID* ebx_1 = var_25c;
004a7442          var_274 = ebx_1;
004a7444          int32_t var_270_2 = 0;
004a7447          struct Turbine_GUID* eax_3 = var_274;
004a744b          int32_t var_254 = 0;
004a744f          int32_t var_250_1 = 0;
004a744f          
004a7453          if (eax_3 != 0)
004a7459              *(uint32_t*)(eax_3->m_data1 + 0x10)();
004a7459          
004a7465          esp = &var_274;
004a746c          void var_244;
004a746c          int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_254, &var_244);
004a746c          
004a746e          if (ebx_1 != 0)
004a7474              *(uint32_t*)(ebx_1->m_data1 + 0x14)();
004a7474          
004a7477          struct Turbine_GUID* ecx_4 = var_25c;
004a7477          
004a747d          if (ecx_4 != 0)
004a747d          {
004a7481              if (ebp >= 0)
004a7481              {
004a7495                  this->m_currentVitae;
004a74b1                  int32_t ebx_3 = (0x64 - _ftol2());
004a74b5                  void* ecx_30;
004a74b5                  
004a74b5                  if (ebx_3 > 0)
004a74b5                  {
004a7531                      void* __offset(Turbine_GUID, 0x38) ebp_3 = ((char*)var_25c + 0x38);
004a753b                      var_254 = 0;
004a753f                      CBaseQualities::InqInt(ebp_3, 0x81, &var_254, 0, 0);
004a7552                      var_260 = 0;
004a7552                      
004a755d                      if (CBaseQualities::InqInt(ebp_3, 0x8b, &var_260, 0, 0) == 0)
004a756a                          CBaseQualities::InqInt(ebp_3, 0x19, &var_260, 0, 0);
004a756a                      
004a757b                      int32_t eax_10;
004a757b                      int80_t st0_1;
004a757b                      st0_1 = VitaeSystem::VitaeCPPoolThreshold(this->m_currentVitae, var_260);
004a7580                      int32_t eax_11 = (eax_10 - var_254);
004a7592                      void var_1b8;
004a7592                      StringInfo::StringInfo(&var_1b8);
004a75a9                      StringInfo::SetStringIDandTableEnum(&var_1b8, 0, 0x10000001);
004a75b6                      int32_t eax_13;
004a75b6                      int32_t edx_5;
004a75b6                      edx_5 = HIGHD(((int64_t)ebx_3));
004a75b6                      eax_13 = LOWD(((int64_t)ebx_3));
004a75b9                      int32_t var_278_6 = edx_5;
004a75c5                      StringInfo::AddVariable_Int(&var_1b8, 0, eax_13);
004a75d7                      class PStringBase<unsigned short>* eax_14 = StringInfo::GetString(&var_1b8, &__return, 0);
004a75e3                      UIElement_Text::SetText(this->m_pMainText, eax_14);
004a75ec                      void* edi_3 = ((char*)__return - 0x14);
004a75ec                      
004a75ff                      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
004a7607                          **(uint32_t**)edi_3(1);
004a7607                      
004a760d                      StringInfo::StringInfo(&__return_1);
004a7621                      StringInfo::SetStringIDandTableEnum(&__return_1, 0, 0x10000001);
004a762c                      int32_t var_278_9 = edx_5;
004a7633                      StringInfo::AddVariable_Int(&__return_1, 0, eax_13);
004a7643                      UIElement_Text::AppendStringInfo(this->m_pMainText, &__return_1);
004a764f                      void var_128;
004a764f                      StringInfo::StringInfo(&var_128);
004a7666                      StringInfo::SetStringIDandTableEnum(&var_128, 0, 0x10000001);
004a7675                      int32_t eax_18;
004a7675                      int32_t edx_7;
004a7675                      edx_7 = HIGHD(((int64_t)eax_11));
004a7675                      eax_18 = LOWD(((int64_t)eax_11));
004a7676                      int32_t var_278_11 = edx_7;
004a7680                      StringInfo::AddVariable_Int(&var_128, 0, eax_18);
004a7693                      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_128);
004a769f                      StringInfo::~StringInfo(&var_128);
004a76a8                      StringInfo::~StringInfo(&__return_1);
004a76ad                      ecx_30 = &var_1b8;
004a74b5                  }
004a74b5                  else
004a74b5                  {
004a74be                      void var_98;
004a74be                      StringInfo::StringInfo(&var_98);
004a74d6                      StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000001);
004a74e8                      class PStringBase<unsigned short>* eax_6 = StringInfo::GetString(&var_98, &__return, 0);
004a74f4                      UIElement_Text::SetText(this->m_pMainText, eax_6);
004a74fd                      int32_t* esi_3 = ((char*)__return - 0x14);
004a74fd                      
004a7510                      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004a7518                          **(uint32_t**)esi_3(1);
004a7518                      
004a751a                      ecx_30 = &var_98;
004a74b5                  }
004a74b5                  
004a76b4                  StringInfo::~StringInfo(ecx_30);
004a76bf                  *(uint32_t*)(var_25c->m_data1 + 0x14)();
004a76c5                  int32_t eax_20;
004a76c5                  eax_20 = 1;
004a76ce                  return 1;
004a7481              }
004a7481              
004a7485              *(uint32_t*)(ecx_4->m_data1 + 0x14)();
004a7485              esp = &__saved_edi;
004a747d          }
004a7416      }
004a7416      
004a7488      uint32_t eax_1;
004a7488      eax_1 = 0;
004a748a      *(uint32_t*)esp;
004a748a      esp[1];
004a748a      esp[2];
004a748a      esp[3];
004a7494      return 0;
004a7400  }

004a76cf                                               90                                                                 .

004a76d0  enum UIElementMessageListenResult __thiscall gmVitaeUI::ListenToElementMessage(class gmVitaeUI* this, struct UIElementMessageInfo const* arg2)

004a76d0  {
004a76e8      if ((arg2->idMessage == 0x18 && (arg2->pElement == this && arg2->dwParam1 != 0)))
004a76ea          gmVitaeUI::Update(this);
004a76ea      
004a76f9      return UIElement::ListenToElementMessage(this, arg2);
004a76d0  }

004a76fc                                                                                      90 90 90 90                              ....

004a7700  void __thiscall gmVitaeUI::RecvNotice_PlayerDescReceived(class gmVitaeUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004a7700  {
004a7707      CACQualities::GetVitaeValue(arg2);
004a770c      long double x87_r0;
004a770c      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] = ((float)x87_r0);
004a7715      gmVitaeUI::Update(((char*)this - 0x5f8));
004a7700  }

004a771e                                                                                            90 90                                ..

004a7720  void __fastcall gmVitaeUI::RecvNotice_VitaeChanged(class gmVitaeUI* this)

004a7720  {
004a772b      struct Turbine_GUID* var_14;
004a772b      int32_t* var_28 = &var_14;
004a7732      struct Turbine_GUID* var_2c = &gm3DItemsUI::`vftable'.RecvNotice_LastSpellSelection;
004a773a      var_14 = nullptr;
004a7745      class TResult __return;
004a7745      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004a774a      struct Turbine_GUID* ecx_1 = var_14;
004a7753      var_2c = ecx_1;
004a7755      int32_t var_28_1 = 0;
004a7758      struct Turbine_GUID* eax_1 = var_2c;
004a775e      int32_t var_8 = 0;
004a7762      int32_t var_4 = 0;
004a7762      
004a7766      if (eax_1 != 0)
004a776c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004a776c      
004a7778      struct Turbine_GUID** esp = &var_2c;
004a777f      void var_c;
004a777f      int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004a777f      
004a7781      if (ecx_1 != 0)
004a7787          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004a7787      
004a778a      class TResult __return_1 = __return;
004a778a      
004a7790      if (__return_1 != 0)
004a7790      {
004a7796          if (ebp < 0)
004a7796          {
004a779a              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004a77a4              return;
004a7796          }
004a7796          
004a77a5          CACQualities::GetVitaeValue(__return_1);
004a77b5          long double x87_r0;
004a77b5          
004a77b5          if ((((int8_t)(*(int32_t*)((char*)this + -0x554) >> 1)) & 1) == 0)
004a77b5          {
004a77b7              long double temp0_1 = ((long double)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0]);
004a77b7              (x87_r0 - temp0_1);
004a77ba              int32_t eax_4;
004a77ba              eax_4 = ((((x87_r0 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r0 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004a77bc              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004a77bc              
004a77bf              if (!(p_1))
004a77bf              {
004a77c3                  this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] = ((float)x87_r0);
004a77c8                  CM_UI::SendNotice_SetPanelVisibility(0xf, 1);
004a77d4                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004a77de                  return;
004a77bf              }
004a77b5          }
004a77b5          
004a77e5          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] = ((float)x87_r0);
004a77e8          gmVitaeUI::Update(((char*)this - 0x5f8));
004a77f1          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004a77f1          struct Turbine_GUID* __saved_edi;
004a77f1          esp = &__saved_edi;
004a7790      }
004a7790      
004a77f4      *(uint32_t*)esp;
004a77f4      esp[1];
004a77f4      esp[2];
004a77f4      esp[3];
004a7720  }

004a77fc                                                                                      90 90 90 90                              ....

004a7800  void __fastcall gmVitaeUI::OnQualityChanged(class gmVitaeUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004a7800  {
004a7806      gmVitaeUI::Update(((char*)this - 0x5fc));
004a7800  }

004a780e                                            90 90                                                                ..

004a7810  class UIElement* __thiscall gmUrgentAssistanceUI::DynamicCast(class gmUrgentAssistanceUI* this, uint32_t arg2) __pure

004a7810  {
004a781c      if (arg2 == 0x1000001f)
004a7829          return this;
004a7829      
004a7823      int32_t edx_1;
004a7823      edx_1 = arg2 != 3;
004a7827      return (this & (edx_1 - 1));
004a7810  }

004a782c                                      90 90 90 90                                                              ....

004a7830  uint32_t gmUrgentAssistanceUI::GetUIElementType(class gmUrgentAssistanceUI const* this @ ecx) __pure

004a7830  {
004a7835      return 0x1000001f;
004a7830  }

004a7836                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004a7840  void __fastcall gmUrgentAssistanceUI::PostInit(class gmUrgentAssistanceUI* this)

004a7840  {
004a7843      UIElement::PostInit(this);
004a785b      this->m_pEntryBox = UIElement::GetChildRecursive(this, 0x100001ba);
004a7866      this->m_pContinueButton = UIElement::GetChildRecursive(this, 0x100001bd);
004a7840  }

004a786e                                            90 90                                                                ..

004a7870  class UIElement* gmUrgentAssistanceUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a7870  {
004a7876      void* result = operator new(0x604);
004a7876      
004a7882      if (result == 0)
004a78ca          return 0;
004a78ca      
004a7890      UIElement_Field::UIElement_Field(result, arg1, arg2);
004a7895      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004a789f      *(uint32_t*)result = 0x7ad840;
004a78a5      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004a78af      *(uint32_t*)((char*)result + 0x5fc) = 0;
004a78b9      *(uint32_t*)((char*)result + 0x600) = 0;
004a78c6      return result;
004a7870  }

004a78cb                                   90 90 90 90 90                                                             .....

004a78d0  void* __thiscall gmUrgentAssistanceUI::`scalar deleting destructor'(class gmUrgentAssistanceUI* this, uint32_t arg2)

004a78d0  {
004a78db      this->vtable = 0x7ad840;
004a78d3      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a78e7      this->m_pEntryBox = nullptr;
004a78ed      this->m_pContinueButton = nullptr;
004a78d3      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a78f9      NoticeHandler::~NoticeHandler(&this->vtable);
004a7900      UIElement_Field::~UIElement_Field(this);
004a7900      
004a790a      if ((arg2 & 1) != 0)
004a790d          operator delete(this);
004a790d      
004a7918      return this;
004a78d0  }

004a791b                                                                                   90 90 90 90 90                             .....

004a7920  void gmUrgentAssistanceUI::Register()

004a7920  {
004a792a      UIElement::RegisterElementClass(0x1000001f, gmUrgentAssistanceUI::Create);
004a7920  }

004a7933                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a7940  enum UIElementMessageListenResult __thiscall gmUrgentAssistanceUI::ListenToElementMessage(class gmUrgentAssistanceUI* this, struct UIElementMessageInfo const* arg2)

004a7940  {
004a7943      int32_t ebx;
004a7943      int32_t var_1c = ebx;
004a7946      struct UIElementMessageInfo* edi = arg2;
004a794a      uint32_t idMessage = edi->idMessage;
004a794a      
004a7950      if (idMessage == 1)
004a798a          switch ((edi->idElement - 0x100001b6))
004a798a          {
004a7997              case nullptr:
004a7997              case 0xa:
004a7997              {
004a7991                  this->vtable->SetVisible(0);
004a79a3                  void var_18;
004a79a3                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, &data_794320);
004a79b3                  UIElement_Text::SetText(this->m_pEntryBox, &var_18);
004a79bc                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
004a79c1                  this->m_pContinueButton->vtable->SetState(0xd);
004a79d1                  this->vtable->SetState(0x1000000e);
004a7997                  break;
004a7997              }
004a79e5              case 1:
004a79e5              {
004a7a73                  this->vtable->SetState(0x1000000f);
004a79e5                  break;
004a79e5              }
004a7a09              case 7:
004a7a09              {
004a7a09                  void __return_1;
004a7a09                  ebx = UIElement_Text::GetText(this->m_pEntryBox, &__return_1)->m_charbuffer->m_data[0x7ffffffffffffffe] != 1;
004a7a0c                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
004a7a0c                  
004a7a13                  if (ebx != 0)
004a7a13                  {
004a7a2e                      class PStringBase<char> __return;
004a7a2e                      void __return_2;
004a7a2e                      PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pEntryBox, &__return_2), &__return, 0);
004a7a3c                      void var_14;
004a7a3c                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_14, __return);
004a7a4b                      CM_Communication::Event_ChannelBroadcast(0x400, &var_14);
004a7a57                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_14);
004a7a60                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004a7a69                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_2);
004a7a73                      this->vtable->SetState(0x10000010);
004a7a13                  }
004a7a09                  break;
004a7a09              }
004a798a          }
004a7950      else if ((idMessage != 0x12 && idMessage != 0x44))
004a7970          return UIElement::ListenToElementMessage(this, edi);
004a7970      
004a7a83      if (edi->idElement == 0x100001ba)
004a7a83      {
004a7aa1          class PStringBase<unsigned short> __return_3;
004a7aa1          ebx = UIElement_Text::GetText(this->m_pEntryBox, &__return_3)->m_charbuffer->m_data[0x7ffffffffffffffe] == 1;
004a7aa4          int32_t* edi_2 = (__return_3 - 0x14);
004a7aa4          
004a7ab7          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004a7abf              **(uint32_t**)edi_2(1);
004a7abf          
004a7ac3          class UIElement_Button* m_pContinueButton = this->m_pContinueButton;
004a7ac3          
004a7ac9          if (ebx == 0)
004a7ad7              m_pContinueButton->vtable->SetState(1);
004a7ac9          else
004a7acb              m_pContinueButton->vtable->SetState(0xd);
004a7acb          
004a7ae1          edi = arg2;
004a7a83      }
004a7a83      
004a7af3      return UIElement::ListenToElementMessage(this, edi);
004a7940  }

004a7af6                                                                    8b ff                                                ..
004a7af8  uint32_t jump_table_4a7af8[0x4] = 
004a7af8  {
004a7af8      [0x0] =  0x004a7991
004a7afc      [0x1] =  0x004a79e5
004a7b00      [0x2] =  0x004a79ef
004a7b04      [0x3] =  0x004a7a7d
004a7b08  }
004a7b08  uint8_t lookup_table_4a7b08[0xb] = 
004a7b08  {
004a7b08      [0x0] =  0x00
004a7b09      [0x1] =  0x01
004a7b0a      [0x2] =  0x03
004a7b0b      [0x3] =  0x03
004a7b0c      [0x4] =  0x03
004a7b0d      [0x5] =  0x03
004a7b0e      [0x6] =  0x03
004a7b0f      [0x7] =  0x02
004a7b10      [0x8] =  0x03
004a7b11      [0x9] =  0x03
004a7b12      [0xa] =  0x00
004a7b13  }

004a7b13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a7b20  int32_t __thiscall TCoord::operator!=(class TCoord const* this, class TCoord const* arg2)

004a7b20  {
004a7b30      if ((this->x == arg2->x && this->y == arg2->y))
004a7b34          return 0;
004a7b34      
004a7b3c      return 1;
004a7b20  }

004a7b3f                                                                                               90                                 .

004a7b40  int32_t __fastcall TCoord::IsValid(class TCoord const* this)

004a7b40  {
004a7b40      int32_t x = this->x;
004a7b40      
004a7b44      if (x >= 0)
004a7b44      {
004a7b46          int32_t y = this->y;
004a7b46          
004a7b55          if ((y >= 0 && (x < 8 && y < 8)))
004a7b5c              return 1;
004a7b44      }
004a7b44      
004a7b5f      return 0;
004a7b40  }


004a7b60  void __fastcall GameBoardGrid::PrepareNewMove(class GameBoardGrid* this)

004a7b60  {
004a7b60      class TChessPiece<CBasePiece>* (* eax)[0x8][0x8] = &this->m_rgPreviousBoard;
004a7b66      int32_t i_1 = 8;
004a7bbb      int32_t i;
004a7bbb      
004a7bbb      do
004a7bbb      {
004a7bbd          ADJ(eax)->m_rgPreviousBoard[0][0] = ADJ(eax)->m_Board[0][0];
004a7bbd          ADJ(eax)->m_rgPreviousBoard[0][1] = ADJ(eax)->m_Board[0][1];
004a7bbd          ADJ(eax)->m_rgPreviousBoard[0][2] = ADJ(eax)->m_Board[0][2];
004a7bbd          ADJ(eax)->m_rgPreviousBoard[0][3] = ADJ(eax)->m_Board[0][3];
004a7bbd          ADJ(eax)->m_rgPreviousBoard[0][4] = ADJ(eax)->m_Board[0][4];
004a7bbd          ADJ(eax)->m_rgPreviousBoard[0][5] = ADJ(eax)->m_Board[0][5];
004a7bbd          ADJ(eax)->m_rgPreviousBoard[0][6] = ADJ(eax)->m_Board[0][6];
004a7bbd          ADJ(eax)->m_rgPreviousBoard[0][7] = ADJ(eax)->m_Board[0][7];
004a7bb7          eax = &*(uint256_t*)eax[1];
004a7bba          i = i_1;
004a7bba          i_1 -= 1;
004a7bbb      } while (i != 1);
004a7b60  }

004a7b6d                                         8d 49 00                                                               .I.
004a7bbe                                                                                            90 90                                ..

004a7bc0  void __thiscall gmMiniGameUI::gmMiniGameUI(class gmMiniGameUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004a7bc0  {
004a7bcf      UIElement_Field::UIElement_Field(this, arg2, arg3);
004a7bd4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a7be0      this->m_pResignButton = nullptr;
004a7be6      this->m_pPassButton = nullptr;
004a7bec      this->m_pStalemateButton = nullptr;
004a7bf2      __builtin_memset(&this->m_idCurrentGame, 0, 0x14);
004a7c10      this->vtable = 0x7adf68;
004a7c16      this->vtable = &gmMiniGameUI::`vftable';
004a7c20      this->m_iTeam = 0xffffffff;
004a7bc0  }


004a7c30  class UIElement* __thiscall gmMiniGameUI::DynamicCast(class gmMiniGameUI* this, uint32_t arg2) __pure

004a7c30  {
004a7c3c      if (arg2 == 0x1000001e)
004a7c49          return this;
004a7c49      
004a7c43      int32_t edx_1;
004a7c43      edx_1 = arg2 != 3;
004a7c47      return (this & (edx_1 - 1));
004a7c30  }

004a7c4c                                      90 90 90 90                                                              ....

004a7c50  uint32_t gmMiniGameUI::GetUIElementType(class gmMiniGameUI const* this @ ecx) __pure

004a7c50  {
004a7c55      return 0x1000001e;
004a7c50  }

004a7c56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004a7c60  void __fastcall gmMiniGameUI::~gmMiniGameUI(class gmMiniGameUI* this)

004a7c60  {
004a7c63      class GameBoardGrid* m_pGameBoard = this->m_pGameBoard;
004a7c72      this->vtable = 0x7adf68;
004a7c6c      this->vtable = &gmMiniGameUI::`vftable';
004a7c6c      
004a7c7e      if (m_pGameBoard != 0)
004a7c80          m_pGameBoard->vtable->__vecDelDtor(1);
004a7c80      
004a7c86      this->m_pGameBoard = nullptr;
004a7c90      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
004a7c90      
004a7c97      if (eax_2 != 0)
004a7c99          eax_2->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004a7c99      
004a7c6c      this->vtable = &gmUrgentAssistanceUI::`vftable';
004a7ca9      NoticeHandler::~NoticeHandler(&this->vtable);
004a7cb2      /* tailcall */
004a7cb2      return UIElement_Field::~UIElement_Field(this);
004a7c60  }

004a7cb7                                                                       90 90 90 90 90 90 90 90 90                         .........

004a7cc0  class UIElement* gmMiniGameUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004a7cc0  {
004a7cc5      void* eax = operator new(0x620);
004a7cc5      
004a7ccf      if (eax == 0)
004a7ce5          return 0;
004a7ce5      
004a7ce2      return gmMiniGameUI::gmMiniGameUI(eax, arg1, arg2);
004a7cc0  }

004a7ce6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004a7cf0  void __fastcall gmMiniGameUI::RecvNotice_EndGame(class gmMiniGameUI* this)

004a7cf0  {
004a7cfe      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(0);
004a7cf0  }

004a7d02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004a7d10  uint8_t __thiscall gmMiniGameUI::DoMove(class gmMiniGameUI* this, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

004a7d10  {
004a7d27      CM_Game::Event_Move(arg2, arg3, arg4, arg5);
004a7d2f      this->m_state = GS_PlayingTryingToMove;
004a7d39      int32_t eax_1;
004a7d39      eax_1 = 1;
004a7d3c      return 1;
004a7d10  }

004a7d3f                                                                                               90                                 .

004a7d40  void __fastcall GameBoardGrid::Draw(class GameBoardGrid* this)

004a7d40  {
004a7d40      class GameBoardGrid* this_1 = this;
004a7d40      
004a7e2c      for (int32_t i = 0; i < 8; i += 1)
004a7e2c      {
004a7d55          int32_t ebx_1 = 0;
004a7d57          uint32_t eax_1 = (7 - i);
004a7d59          uint32_t var_4 = eax_1;
004a7d59          
004a7d84          while (true)
004a7d84          {
004a7d84              if (this->m_gameUI->m_iTeam == 0)
004a7d8d                  eax_1 = (i + ((7 - ebx_1) << 3));
004a7d8d              
004a7d92              class UIElement* eax_2 = UIElement_ListBox::GetItem(this->m_pieceListBox, eax_1);
004a7d92              
004a7d9b              if (eax_2 != 0)
004a7d9b              {
004a7da0                  void* eax_3 = this->m_Board[0][(ebx_1 + (i << 3))];
004a7da0                  
004a7da8                  if (eax_3 == 0)
004a7dc0                      eax_2->vtable->SetVisible(0);
004a7da8                  else
004a7da8                  {
004a7db0                      UIElement::SetMediaImage(eax_2, *(uint32_t*)((char*)eax_3 + 4), 3);
004a7db5                      eax_2->vtable->SetVisible(1);
004a7da8                  }
004a7da8                  
004a7dce                  class UIElement* eax_6 = UIElement::GetChildRecursive(eax_2, 0x10000179);
004a7dce                  
004a7dd7                  if (eax_6 != 0)
004a7dd7                  {
004a7ddf                      if (this->m_coordSelected.x != i)
004a7e0c                          eax_6->vtable->SetVisible(0);
004a7ddf                      else
004a7ddf                      {
004a7de1                          int32_t y = this->m_coordSelected.y;
004a7de1                          
004a7de9                          if (y != ebx_1)
004a7e0c                              eax_6->vtable->SetVisible(0);
004a7de9                          else
004a7de9                          {
004a7deb                              int32_t x = this->m_coordSelected.x;
004a7deb                              
004a7e01                              if ((((x < 0 || y < 0) || x >= 8) || y >= 8))
004a7e0c                                  eax_6->vtable->SetVisible(0);
004a7e01                              else
004a7e03                                  eax_6->vtable->SetVisible(1);
004a7de9                          }
004a7ddf                      }
004a7dd7                  }
004a7d9b              }
004a7d9b              
004a7e17              ebx_1 += 1;
004a7e1e              var_4 += 8;
004a7e1e              
004a7e22              if (ebx_1 >= 8)
004a7e22                  break;
004a7e22              
004a7d5f              eax_1 = var_4;
004a7d84          }
004a7e2c      }
004a7d40  }

004a7d65                 8d a4 24 00 00 00 00 8d 64 24 00                                                       ..$.....d$.
004a7e38                                                                          90 90 90 90 90 90 90 90                          ........

004a7e40  int32_t __thiscall TChessPiece<CBasePiece>::bCanAttack(class TChessPiece<CBasePiece>* this, int32_t arg2, int32_t arg3)

004a7e40  {
004a7e42      /* jump -> this->vtable->bCanGoTo */
004a7e40  }

004a7e44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004a7e50  int32_t __thiscall TChessPiece<CBasePiece>::UnPack(class TChessPiece<CBasePiece>* this, void** arg2, uint32_t arg3)

004a7e50  {
004a7e5c      if (arg3 >= 4)
004a7e5c      {
004a7e62          void* eax_1 = *(uint32_t*)arg2;
004a7e64          int32_t ecx = *(uint32_t*)eax_1;
004a7e69          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
004a7e69          
004a7e78          if ((ecx == this->m_Type && (arg3 - 4) >= 4))
004a7e78          {
004a7e7c              this->m_Player = *(uint32_t*)((char*)eax_1 + 4);
004a7e81              void* eax_5 = (*(uint32_t*)arg2 + 4);
004a7e8a              *(uint32_t*)arg2 = eax_5;
004a7e8a              
004a7e8c              if ((arg3 - 8) >= 4)
004a7e8c              {
004a7e90                  this->m_bMoved = *(uint32_t*)eax_5;
004a7ea0                  *(uint32_t*)arg2 += 4;
004a7ea0                  
004a7ea9                  if ((TCoord::UnPack(&this->m_CurPos, arg2, (arg3 - 0xc)) != 0 && TCoord::UnPack(&this->m_LastKnownGoodPos, arg2, (arg3 - 0xc)) != 0))
004a7ec1                      return 1;
004a7e8c              }
004a7e78          }
004a7e5c      }
004a7e5c      
004a7ec9      return 0;
004a7e50  }

004a7ecc                                      90 90 90 90                                                              ....

004a7ed0  int32_t __thiscall TCoord::UnPack(class TCoord* this, void** arg2, uint32_t arg3)

004a7ed0  {
004a7ed8      if (arg3 >= 4)
004a7ed8      {
004a7ee2          this->x = **(uint32_t**)arg2;
004a7ee6          void* esi_4 = (*(uint32_t*)arg2 + 4);
004a7eef          *(uint32_t*)arg2 = esi_4;
004a7eef          
004a7ef1          if ((arg3 - 4) >= 4)
004a7ef1          {
004a7ef5              this->y = *(uint32_t*)esi_4;
004a7ef8              *(uint32_t*)arg2 += 4;
004a7f01              return 1;
004a7ef1          }
004a7ed8      }
004a7ed8      
004a7f07      return 0;
004a7ed0  }

004a7f0a                                90 90 90 90 90 90                                                            ......

004a7f10  int32_t __fastcall CChessLogic<CBasePiece>::SanityCheckBoard(class CChessLogic<CBasePiece>* this)

004a7f10  {
004a7f22      if ((this->m_Pieces[0].m_num > 0 && this->m_Pieces[1].m_num > 0))
004a7f22      {
004a7f2a          class TChessPiece<CBasePiece>* edx_1 = *(uint32_t*)this->m_Pieces[0].m_data;
004a7f2a          
004a7f2e          if (edx_1 != 0)
004a7f2e          {
004a7f36              class TChessPiece<CBasePiece>* eax_2 = *(uint32_t*)this->m_Pieces[1].m_data;
004a7f36              
004a7f4d              if ((eax_2 != 0 && (edx_1->m_Type == King && eax_2->m_Type == King)))
004a7f54                  return 1;
004a7f2e          }
004a7f22      }
004a7f22      
004a7f57      return 0;
004a7f10  }

004a7f58                                                                          90 90 90 90 90 90 90 90                          ........

004a7f60  int32_t __stdcall CChessLogic<CBasePiece>::ConvertMoveToVector(class CChessLogic<CBasePiece>* this @ ecx, class TCoord const* arg2, class TCoord const* arg3, enum DirectionNumber* arg4, int32_t* arg5)

004a7f60  {
004a7f75      int32_t ecx_1 = (arg3->x - arg2->x);
004a7f77      int32_t esi_1 = (arg3->y - arg2->y);
004a7f7b      int32_t* ebx_1;
004a7f7b      int32_t eax_13;
004a7f7b      
004a7f7b      if (ecx_1 == 0)
004a7f7b      {
004a7fc5          if (esi_1 == 0)
004a7fbc              return 0;
004a7fbc          
004a7fc7          eax_13 = esi_1;
004a7fc9      label_4a7fc9:
004a7fc9          ebx_1 = arg5;
004a7fcd          int32_t eax_14;
004a7fcd          int32_t edx_7;
004a7fcd          edx_7 = HIGHD(((int64_t)eax_13));
004a7fcd          eax_14 = LOWD(((int64_t)eax_13));
004a7fd2          *(uint32_t*)ebx_1 = ((eax_14 ^ edx_7) - edx_7);
004a7f7b      }
004a7f7b      else
004a7f7b      {
004a7f83          if ((esi_1 == 0 || ecx_1 == esi_1))
004a7f83          {
004a7fbf              eax_13 = ecx_1;
004a7fc1              goto label_4a7fc9;
004a7f83          }
004a7f83          
004a7f85          ebx_1 = arg5;
004a7f8b          int32_t eax_1;
004a7f8b          int32_t edx_1;
004a7f8b          edx_1 = HIGHD(((int64_t)esi_1));
004a7f8b          eax_1 = LOWD(((int64_t)esi_1));
004a7f90          int32_t edi_3 = ((eax_1 ^ edx_1) - edx_1);
004a7f94          int32_t eax_3;
004a7f94          int32_t edx_2;
004a7f94          edx_2 = HIGHD(((int64_t)ecx_1));
004a7f94          eax_3 = LOWD(((int64_t)ecx_1));
004a7f97          int32_t eax_5 = ((eax_3 ^ edx_2) - edx_2);
004a7f97          
004a7f9b          if (edi_3 >= eax_5)
004a7fa1              *(uint32_t*)ebx_1 = eax_5;
004a7f9b          else
004a7f9d              *(uint32_t*)ebx_1 = edi_3;
004a7f9d          
004a7fa3          int32_t edi_4 = *(uint32_t*)ebx_1;
004a7fa3          
004a7fac          if ((((int64_t)ecx_1) % edi_4) != 0)
004a7fbc              return 0;
004a7fbc          
004a7fb5          if ((((int64_t)esi_1) % edi_4) != 0)
004a7fbc              return 0;
004a7f7b      }
004a7fd4      int32_t edi_5 = *(uint32_t*)ebx_1;
004a7fd9      int32_t temp0_3 = (((int64_t)ecx_1) / edi_5);
004a7fe9      int32_t temp0_4 = (((int64_t)esi_1) / edi_5);
004a7feb      enum DirectionNumber edx_10 = Left;
004a7fed      int32_t* i = &Directions[1].y;
004a7fed      
004a8070      do
004a8070      {
004a7ff8          if ((i[-3] == temp0_3 && i[-2] == temp0_4))
004a7ffa              *(uint32_t*)arg4 = edx_10;
004a7ffa          
004a8003          if ((i[-1] == temp0_3 && *(uint32_t*)i == temp0_4))
004a8008              *(uint32_t*)arg4 = (edx_10 + 1);
004a8008          
004a8012          if ((i[1] == temp0_3 && i[2] == temp0_4))
004a8017              *(uint32_t*)arg4 = (edx_10 + 2);
004a8017          
004a8021          if ((i[3] == temp0_3 && i[4] == temp0_4))
004a8026              *(uint32_t*)arg4 = (edx_10 + 3);
004a8026          
004a8030          if ((i[5] == temp0_3 && i[6] == temp0_4))
004a8035              *(uint32_t*)arg4 = (edx_10 + 4);
004a8035          
004a803f          if ((i[7] == temp0_3 && i[8] == temp0_4))
004a8044              *(uint32_t*)arg4 = (edx_10 + 5);
004a8044          
004a804e          if ((i[9] == temp0_3 && i[0xa] == temp0_4))
004a8053              *(uint32_t*)arg4 = (edx_10 + 6);
004a8053          
004a805d          if ((i[0xb] == temp0_3 && i[0xc] == temp0_4))
004a8062              *(uint32_t*)arg4 = (edx_10 + 7);
004a8062          
004a8064          i = &i[0x10];
004a8067          edx_10 += 8;
004a8070      } while (i < 0x822c44);
004a8070      
004a807d      int32_t result;
004a807d      result = edx_10 != nDirections;
004a8081      return result;
004a7f60  }

004a8084              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004a8090  void __fastcall GameBoardGrid::UndoMoves(class GameBoardGrid* this)

004a8090  {
004a8090      class TChessPiece<CBasePiece>* (* eax)[0x8][0x8] = &this->m_Board;
004a8093      int32_t i_1 = 8;
004a80eb      int32_t i;
004a80eb      
004a80eb      do
004a80eb      {
004a80ee          ADJ(eax)->m_Board[0][0] = ADJ(eax)->m_rgPreviousBoard[0][0];
004a80ee          ADJ(eax)->m_Board[0][1] = ADJ(eax)->m_rgPreviousBoard[0][1];
004a80ee          ADJ(eax)->m_Board[0][2] = ADJ(eax)->m_rgPreviousBoard[0][2];
004a80ee          ADJ(eax)->m_Board[0][3] = ADJ(eax)->m_rgPreviousBoard[0][3];
004a80ee          ADJ(eax)->m_Board[0][4] = ADJ(eax)->m_rgPreviousBoard[0][4];
004a80ee          ADJ(eax)->m_Board[0][5] = ADJ(eax)->m_rgPreviousBoard[0][5];
004a80ee          ADJ(eax)->m_Board[0][6] = ADJ(eax)->m_rgPreviousBoard[0][6];
004a80ee          ADJ(eax)->m_Board[0][7] = ADJ(eax)->m_rgPreviousBoard[0][7];
004a80e7          eax = &*(uint256_t*)eax[1];
004a80ea          i = i_1;
004a80ea          i_1 -= 1;
004a80eb      } while (i != 1);
004a80ee      /* tailcall */
004a80ee      return GameBoardGrid::Draw(this);
004a8090  }

004a80f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a8100  void* __thiscall gmMiniGameUI::`scalar deleting destructor'(class gmMiniGameUI* this, uint32_t arg2)

004a8100  {
004a8103      gmMiniGameUI::~gmMiniGameUI(this);
004a8103      
004a810d      if ((arg2 & 1) != 0)
004a8110          operator delete(this);
004a8110      
004a811b      return this;
004a8100  }

004a811e                                                                                            90 90                                ..

004a8120  void gmMiniGameUI::Register()

004a8120  {
004a812a      UIElement::RegisterElementClass(0x1000001e, gmMiniGameUI::Create);
004a8120  }

004a8133                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a8140  class IDClass<_tagDataID,32,0>* __stdcall GameBoardGrid::GetPieceDID(class GameBoardGrid* this @ ecx, class IDClass<_tagDataID,32,0>* __return, int32_t arg3, class BaseProperty* arg4)

004a8140  {
004a8147      class BasePropertyValue* m_pcPropertyValue = arg4->m_pcPropertyValue;
004a814a      int32_t* eax = nullptr;
004a814c      int32_t* edx = nullptr;
004a8151      int32_t* var_8 = nullptr;
004a8155      int32_t* var_4 = nullptr;
004a8155      
004a8159      if (m_pcPropertyValue == 0)
004a8159          goto label_4a81f5;
004a8159      
004a8173      class IDClass<_tagDataID,32,0>* result;
004a8173      
004a8173      if (m_pcPropertyValue->vtable->InqArrayElement(arg3, &var_8) == 0)
004a8173      {
004a81eb          edx = var_4;
004a81ef          eax = var_8;
004a81f5      label_4a81f5:
004a81f5          result = __return;
004a81ff          result->id = INVALID_DID.id;
004a81ff          
004a8201          if (eax != 0)
004a8201          {
004a820b              int32_t edx_10 = (eax[1] - 1);
004a8208              eax[1] = edx_10;
004a8208              
004a8210              if (edx_10 == 0)
004a8216                  **(uint32_t**)eax(1);
004a8216              
004a8218              edx = var_4;
004a821c              var_8 = nullptr;
004a8201          }
004a8201          
004a8226          if (edx != 0)
004a8226          {
004a822f              int32_t edx_13 = (edx[1] - 1);
004a8228              edx[1] = edx_13;
004a8228              
004a8234              if (edx_13 == 0)
004a823a                  **(uint32_t**)edx(1);
004a8226          }
004a8173      }
004a8173      else
004a8173      {
004a817b          arg4 = INVALID_DID.id;
004a817f          int32_t* ecx_2 = var_4;
004a817f          
004a8185          if (ecx_2 != 0)
004a8185          {
004a818e              *(uint32_t*)(*(uint32_t*)ecx_2 + 0xb0)(&arg4);
004a8194              ecx_2 = var_4;
004a8185          }
004a8185          
004a8198          int32_t* eax_3 = var_8;
004a819e          result = __return;
004a81a6          result->id = arg4;
004a81a6          
004a81a8          if (eax_3 != 0)
004a81a8          {
004a81b2              int32_t edx_5 = (eax_3[1] - 1);
004a81af              eax_3[1] = edx_5;
004a81af              
004a81b7              if (edx_5 == 0)
004a81bd                  **(uint32_t**)eax_3(1);
004a81bd              
004a81bf              ecx_2 = var_4;
004a81c3              var_8 = nullptr;
004a81a8          }
004a81a8          
004a81cd          if (ecx_2 != 0)
004a81cd          {
004a81d5              int32_t edx_7 = (ecx_2[1] - 1);
004a81d2              ecx_2[1] = edx_7;
004a81d2              
004a81da              if (edx_7 == 0)
004a81e0                  **(uint32_t**)ecx_2(1);
004a81cd          }
004a8173      }
004a8173      
004a8242      return result;
004a8140  }

004a8245                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004a8250  void __fastcall CChessLogic<CBasePiece>::CChessLogic<CBasePiece>(class CChessLogic<CBasePiece>* this)

004a8250  {
004a8254      this->vtable = 0x7ae0b4;
004a825a      class AC1Legacy::SmartArray<TChessPiece<CBasePiece> *> (* eax)[0x2] = &this->m_Pieces;
004a8260      int32_t i_1 = 2;
004a8273      int32_t i;
004a8273      
004a8273      do
004a8273      {
004a82a9          ADJ(eax)->m_Pieces[0].m_data = 0;
004a82a9          ADJ(eax)->m_Pieces[0].m_size = 0;
004a82a9          ADJ(eax)->m_Pieces[0].m_num = 0;
004a826f          eax = &*(uint24_t*)eax[1];
004a8272          i = i_1;
004a8272          i_1 -= 1;
004a8273      } while (i != 1);
004a8278      this->m_CurPlayer = 0;
004a827e      this->m_bLastMoveWasCheck = 0;
004a8284      this->m_EnPassantAttackSite.x = 0xffffffff;
004a828a      this->m_EnPassantAttackSite.y = 0xffffffff;
004a8290      this->m_EnPassantVictimPos.x = 0xffffffff;
004a8296      this->m_EnPassantVictimPos.y = 0xffffffff;
004a82a6      __builtin_memset(&this->m_Board, 0, 0x100);
004a8250  }

004a82ad                                         90 90 90                                                               ...

004a82b0  uint32_t __thiscall TChessPiece<CBasePiece>::Pack(class TChessPiece<CBasePiece>* this, void** arg2, uint32_t arg3)

004a82b0  {
004a82b6      int32_t result = this->vtable->GetPackSize();
004a82b9      uint32_t edx = arg3;
004a82b9      
004a82bf      if (result <= edx)
004a82bf      {
004a82c9          if (edx >= 4)
004a82c9          {
004a82d0              **(uint32_t**)arg2 = this->m_Type;
004a82d4              void* edi_3 = (*(uint32_t*)arg2 + 4);
004a82d7              edx -= 4;
004a82dd              *(uint32_t*)arg2 = edi_3;
004a82dd              
004a82df              if (edx >= 4)
004a82df              {
004a82e4                  *(uint32_t*)edi_3 = this->m_Player;
004a82e8                  int32_t* edi_5 = (*(uint32_t*)arg2 + 4);
004a82eb                  edx -= 4;
004a82f1                  *(uint32_t*)arg2 = edi_5;
004a82f1                  
004a82f3                  if (edx >= 4)
004a82f3                  {
004a82f8                      *(uint32_t*)edi_5 = this->m_bMoved;
004a82fa                      *(uint32_t*)arg2 += 4;
004a82fd                      edx -= 4;
004a82f3                  }
004a82df              }
004a82c9          }
004a82c9          
004a8303          if (edx >= 8)
004a8303          {
004a830a              **(uint32_t**)arg2 = this->m_CurPos.x;
004a830e              void* ebx_6 = (*(uint32_t*)arg2 + 4);
004a8311              *(uint32_t*)arg2 = ebx_6;
004a8318              *(uint32_t*)ebx_6 = this->m_CurPos.y;
004a831a              *(uint32_t*)arg2 += 4;
004a8303          }
004a8303          
004a8324          if ((edx - 8) >= 8)
004a8324          {
004a832b              **(uint32_t**)arg2 = this->m_LastKnownGoodPos.x;
004a832f              void* edi_10 = (*(uint32_t*)arg2 + 4);
004a8332              *(uint32_t*)arg2 = edi_10;
004a8339              *(uint32_t*)edi_10 = this->m_LastKnownGoodPos.y;
004a833b              *(uint32_t*)arg2 += 4;
004a8324          }
004a82bf      }
004a82bf      
004a8340      return result;
004a82b0  }

004a8343           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004a8350  void __thiscall TPawnPiece<CBasePiece>::TPawnPiece<CBasePiece>(class TPawnPiece<CBasePiece>* this, int32_t arg2, class TCoord const* arg3)

004a8350  {
004a835c      this->m_didIcon.id = INVALID_DID.id;
004a8363      this->vtable = 0x7ae0a0;
004a8369      this->m_Type = Pawn;
004a8370      this->m_Player = arg2;
004a8375      this->m_CurPos.x = arg3->x;
004a837b      this->m_CurPos.y = arg3->y;
004a8380      this->m_LastKnownGoodPos.x = arg3->x;
004a8386      this->m_LastKnownGoodPos.y = arg3->y;
004a8389      this->m_bMoved = 0;
004a8390      this->vtable = 0x7ae0c0;
004a8350  }

004a8399                                                                             90 90 90 90 90 90 90                           .......

004a83a0  int32_t __thiscall TPawnPiece<CBasePiece>::bCanGoTo(class TPawnPiece<CBasePiece>* this, int32_t arg2, int32_t arg3)

004a83a0  {
004a83a6      if (arg2 == 0)
004a83a6      {
004a83af          if (arg3 == 1)
004a83c2              return 1;
004a83c2          
004a83bb          if ((arg3 == 2 && this->m_bMoved == 0))
004a83c2              return 1;
004a83a6      }
004a83a6      
004a83c7      return 0;
004a83a0  }

004a83ca                                90 90 90 90 90 90                                                            ......

004a83d0  int32_t __stdcall TPawnPiece<CBasePiece>::bCanAttack(class TPawnPiece<CBasePiece>* this @ ecx, int32_t arg2, int32_t arg3) __pure

004a83d0  {
004a83d4      int32_t result;
004a83d4      int32_t edx;
004a83d4      edx = HIGHD(((int64_t)arg2));
004a83d4      result = LOWD(((int64_t)arg2));
004a83d4      
004a83e8      if ((((result ^ edx) - edx) == 1 && arg3 == 1))
004a83ec          return result;
004a83ec      
004a83ea      return 0;
004a83d0  }

004a83ef                                               90                                                                 .

004a83f0  void __thiscall TRookPiece<CBasePiece>::TRookPiece<CBasePiece>(class TRookPiece<CBasePiece>* this, int32_t arg2, class TCoord const* arg3)

004a83f0  {
004a83fc      this->m_didIcon.id = INVALID_DID.id;
004a8403      this->vtable = 0x7ae0a0;
004a8409      this->m_Type = Rook;
004a8410      this->m_Player = arg2;
004a8415      this->m_CurPos.x = arg3->x;
004a841b      this->m_CurPos.y = arg3->y;
004a8420      this->m_LastKnownGoodPos.x = arg3->x;
004a8426      this->m_LastKnownGoodPos.y = arg3->y;
004a8429      this->m_bMoved = 0;
004a8430      this->vtable = 0x7ae0d4;
004a83f0  }

004a8439                                                                             90 90 90 90 90 90 90                           .......

004a8440  int32_t __stdcall TRookPiece<CBasePiece>::bCanGoTo(class TRookPiece<CBasePiece>* this @ ecx, int32_t arg2, int32_t arg3) __pure

004a8440  {
004a844c      int32_t eax;
004a844c      eax = arg2 != 0;
004a8453      int32_t ecx;
004a8453      ecx = arg3 != 0;
004a8458      return (eax ^ ecx);
004a8440  }

004a845b                                                                                   90 90 90 90 90                             .....

004a8460  void __thiscall TKnightPiece<CBasePiece>::TKnightPiece<CBasePiece>(class TKnightPiece<CBasePiece>* this, int32_t arg2, class TCoord const* arg3)

004a8460  {
004a846c      this->m_didIcon.id = INVALID_DID.id;
004a8473      this->vtable = 0x7ae0a0;
004a8479      this->m_Type = Knight;
004a8480      this->m_Player = arg2;
004a8485      this->m_CurPos.x = arg3->x;
004a848b      this->m_CurPos.y = arg3->y;
004a8490      this->m_LastKnownGoodPos.x = arg3->x;
004a8496      this->m_LastKnownGoodPos.y = arg3->y;
004a8499      this->m_bMoved = 0;
004a84a0      this->vtable = 0x7ae0e8;
004a8460  }

004a84a9                             90 90 90 90 90 90 90                                                           .......

004a84b0  int32_t __stdcall TKnightPiece<CBasePiece>::bCanGoTo(class TKnightPiece<CBasePiece>* this @ ecx, int32_t arg2, int32_t arg3) __pure

004a84b0  {
004a84b4      int32_t eax;
004a84b4      int32_t edx;
004a84b4      edx = HIGHD(((int64_t)arg2));
004a84b4      eax = LOWD(((int64_t)arg2));
004a84b9      int32_t ecx_2 = ((eax ^ edx) - edx);
004a84c3      int32_t eax_2;
004a84c3      int32_t edx_1;
004a84c3      
004a84c3      if (ecx_2 == 1)
004a84c7          edx_1 = HIGHD(((int64_t)arg3));
004a84c7          eax_2 = LOWD(((int64_t)arg3));
004a84c7      
004a84cf      if ((ecx_2 != 1 || ((eax_2 ^ edx_1) - edx_1) != 2))
004a84cf      {
004a84d4          int32_t eax_6;
004a84d4          int32_t edx_2;
004a84d4          
004a84d4          if (ecx_2 == 2)
004a84d8              edx_2 = HIGHD(((int64_t)arg3));
004a84d8              eax_6 = LOWD(((int64_t)arg3));
004a84d8          
004a84e0          if ((ecx_2 != 2 || ((eax_6 ^ edx_2) - edx_2) != 1))
004a84ee              return 0;
004a84cf      }
004a84cf      
004a84e8      return 1;
004a84b0  }

004a84f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004a8500  void __thiscall TBishopPiece<CBasePiece>::TBishopPiece<CBasePiece>(class TBishopPiece<CBasePiece>* this, int32_t arg2, class TCoord const* arg3)

004a8500  {
004a850c      this->m_didIcon.id = INVALID_DID.id;
004a8513      this->vtable = 0x7ae0a0;
004a8519      this->m_Type = Bishop;
004a8520      this->m_Player = arg2;
004a8525      this->m_CurPos.x = arg3->x;
004a852b      this->m_CurPos.y = arg3->y;
004a8530      this->m_LastKnownGoodPos.x = arg3->x;
004a8536      this->m_LastKnownGoodPos.y = arg3->y;
004a8539      this->m_bMoved = 0;
004a8540      this->vtable = 0x7ae0fc;
004a8500  }

004a8549                             90 90 90 90 90 90 90                                                           .......

004a8550  int32_t __stdcall TBishopPiece<CBasePiece>::bCanGoTo(class TBishopPiece<CBasePiece>* this @ ecx, int32_t arg2, int32_t arg3) __pure

004a8550  {
004a8554      int32_t eax;
004a8554      int32_t edx;
004a8554      edx = HIGHD(((int64_t)arg2));
004a8554      eax = LOWD(((int64_t)arg2));
004a855f      int32_t eax_2;
004a855f      int32_t edx_1;
004a855f      edx_1 = HIGHD(((int64_t)arg3));
004a855f      eax_2 = LOWD(((int64_t)arg3));
004a8564      int32_t ecx_3 = (((eax ^ edx) - edx) - ((eax_2 ^ edx_1) - edx_1));
004a8566      int32_t ecx_4 = -(ecx_3);
004a856d      return ((ecx_4 - ecx_4) + 1);
004a8550  }


004a8570  void __thiscall TQueenPiece<CBasePiece>::TQueenPiece<CBasePiece>(class TQueenPiece<CBasePiece>* this, int32_t arg2, class TCoord const* arg3)

004a8570  {
004a857c      this->m_didIcon.id = INVALID_DID.id;
004a8583      this->vtable = 0x7ae0a0;
004a8589      this->m_Type = Queen;
004a8590      this->m_Player = arg2;
004a8595      this->m_CurPos.x = arg3->x;
004a859b      this->m_CurPos.y = arg3->y;
004a85a0      this->m_LastKnownGoodPos.x = arg3->x;
004a85a6      this->m_LastKnownGoodPos.y = arg3->y;
004a85a9      this->m_bMoved = 0;
004a85b0      this->vtable = 0x7ae110;
004a8570  }

004a85b9                                                                             90 90 90 90 90 90 90                           .......

004a85c0  int32_t __stdcall TQueenPiece<CBasePiece>::bCanGoTo(class TQueenPiece<CBasePiece>* this @ ecx, int32_t arg2, int32_t arg3) __pure

004a85c0  {
004a85ce      if ((arg2 != 0 && arg3 != 0))
004a85ce      {
004a85d0          int32_t eax;
004a85d0          int32_t edx_1;
004a85d0          edx_1 = HIGHD(((int64_t)arg2));
004a85d0          eax = LOWD(((int64_t)arg2));
004a85da          int32_t eax_2;
004a85da          int32_t edx_2;
004a85da          edx_2 = HIGHD(((int64_t)arg3));
004a85da          eax_2 = LOWD(((int64_t)arg3));
004a85da          
004a85e2          if (((eax ^ edx_1) - edx_1) != ((eax_2 ^ edx_2) - edx_2))
004a85e6              return 0;
004a85ce      }
004a85ce      
004a85ee      return 1;
004a85c0  }

004a85f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004a8600  void __thiscall TKingPiece<CBasePiece>::TKingPiece<CBasePiece>(class TKingPiece<CBasePiece>* this, int32_t arg2, class TCoord const* arg3)

004a8600  {
004a860c      this->m_didIcon.id = INVALID_DID.id;
004a8613      this->vtable = 0x7ae0a0;
004a8619      this->m_Type = King;
004a8620      this->m_Player = arg2;
004a8625      this->m_CurPos.x = arg3->x;
004a862b      this->m_CurPos.y = arg3->y;
004a8630      this->m_LastKnownGoodPos.x = arg3->x;
004a8636      this->m_LastKnownGoodPos.y = arg3->y;
004a8639      this->m_bMoved = 0;
004a8640      this->vtable = 0x7ae124;
004a8600  }

004a8649                             90 90 90 90 90 90 90                                                           .......

004a8650  int32_t __stdcall TKingPiece<CBasePiece>::bCanGoTo(class TKingPiece<CBasePiece>* this @ ecx, int32_t arg2, int32_t arg3) __pure

004a8650  {
004a8654      int32_t eax;
004a8654      int32_t edx;
004a8654      edx = HIGHD(((int64_t)arg2));
004a8654      eax = LOWD(((int64_t)arg2));
004a8654      
004a865c      if (((eax ^ edx) - edx) < 2)
004a865c      {
004a8662          int32_t eax_4;
004a8662          int32_t edx_1;
004a8662          edx_1 = HIGHD(((int64_t)arg3));
004a8662          eax_4 = LOWD(((int64_t)arg3));
004a8662          
004a866a          if (((eax_4 ^ edx_1) - edx_1) < 2)
004a8671              return 1;
004a865c      }
004a865c      
004a8676      return 0;
004a8650  }

004a8679                                                                             90 90 90 90 90 90 90                           .......

004a8680  void __thiscall CChessLogic<CBasePiece>::TryPiecePos(class CChessLogic<CBasePiece>* this, class TChessPiece<CBasePiece>* arg2, class TCoord arg3)

004a8680  {
004a8686      if (arg2 != 0)
004a8686      {
004a8688          int32_t x = arg2->m_CurPos.x;
004a8688          
004a868e          if (x >= 0)
004a868e          {
004a8690              int32_t y = arg2->m_CurPos.y;
004a8690              
004a869f              if ((y >= 0 && (x < 8 && y < 8)))
004a869f              {
004a86a1                  int32_t edx_1 = (y + (x << 3));
004a86a1                  
004a86ae                  if (this->m_Board[0][edx_1] == arg2)
004a86aa                      this->m_Board[0][edx_1] = 0;
004a869f              }
004a868e          }
004a868e          
004a86b6          int32_t x_1 = arg3.x;
004a86bc          int32_t y_1 = arg3.y;
004a86c0          arg2->m_CurPos.x = x_1;
004a86c3          arg2->m_CurPos.y = y_1;
004a86c3          
004a86d4          if ((x_1 >= 0 && (y_1 >= 0 && (x_1 < 8 && y_1 < 8))))
004a86d9              this->m_Board[0][(y_1 + (x_1 << 3))] = arg2;
004a8686      }
004a8680  }

004a86e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004a86f0  void __thiscall CChessLogic<CBasePiece>::UndoTryPiecePos(class CChessLogic<CBasePiece>* this, class TChessPiece<CBasePiece>* arg2)

004a86f0  {
004a86f6      if (arg2 != 0)
004a86f6      {
004a86f8          int32_t x = arg2->m_CurPos.x;
004a86f8          
004a86fe          if (x >= 0)
004a86fe          {
004a8700              int32_t y_1 = arg2->m_CurPos.y;
004a8700              
004a870f              if ((y_1 >= 0 && (x < 8 && y_1 < 8)))
004a870f              {
004a8711                  int32_t edx_1 = (y_1 + (x << 3));
004a8711                  
004a871e                  if (this->m_Board[0][edx_1] == arg2)
004a871a                      this->m_Board[0][edx_1] = 0;
004a870f              }
004a86fe          }
004a86fe          
004a8729          arg2->m_CurPos.x = arg2->m_LastKnownGoodPos.x;
004a872c          int32_t y = arg2->m_LastKnownGoodPos.y;
004a872f          arg2->m_CurPos.y = y;
004a8732          int32_t x_1 = arg2->m_CurPos.x;
004a8732          
004a8745          if ((x_1 >= 0 && (y >= 0 && (x_1 < 8 && y < 8))))
004a874a              this->m_Board[0][(y + (x_1 << 3))] = arg2;
004a86f6      }
004a86f0  }

004a8752                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004a8760  void __fastcall CChessLogic<CBasePiece>::~CChessLogic<CBasePiece>(class CChessLogic<CBasePiece>* this)

004a8760  {
004a8770      this->vtable = 0x7ae0b4;
004a8776      __builtin_memset(&this->m_Board, 0, 0x100);
004a8778      uint32_t* esi = &this->m_Pieces[0].m_num;
004a877e      int32_t i_2 = 2;
004a87ae      int32_t i;
004a87ae      
004a87ae      do
004a87ae      {
004a8785          int32_t j = 0;
004a8785          
004a8789          if (ADJ(esi)->m_Pieces[0].m_num > 0)
004a8789          {
004a87a8              do
004a87a8              {
004a8793                  void* eax_3 = ADJ(esi)->m_Pieces[0].m_data[j];
004a8793                  
004a8798                  if (eax_3 != 0)
004a879b                      operator delete(eax_3);
004a879b                  
004a87a5                  j += 1;
004a87a8              } while (j < ADJ(esi)->m_Pieces[0].m_num);
004a8789          }
004a8789          
004a87aa          esi = &esi[3];
004a87ad          i = i_2;
004a87ad          i_2 -= 1;
004a87ae      } while (i != 1);
004a87b0      int32_t* esi_1 = &this->m_CurPlayer;
004a87b6      int32_t i_3 = 2;
004a87d0      int32_t i_1;
004a87d0      
004a87d0      do
004a87d0      {
004a87c0          class TChessPiece<CBasePiece>** m_data = ADJ(esi_1)->m_Pieces[1].m_data;
004a87c3          esi_1 -= 0xc;
004a87c7          operator delete[](m_data);
004a87cf          i_1 = i_3;
004a87cf          i_3 -= 1;
004a87d0      } while (i_1 != 1);
004a8760  }

004a878d                                         8d 49 00                                                               .I.
004a87bd                                                                                         8d 49 00                               .I.
004a87d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004a87e0  void* __thiscall CChessLogic<CBasePiece>::`scalar deleting destructor'(class CChessLogic<CBasePiece>* this, uint32_t arg2)

004a87e0  {
004a87e3      CChessLogic<CBasePiece>::~CChessLogic<CBasePiece>(this);
004a87e3      
004a87ed      if ((arg2 & 1) != 0)
004a87f0          operator delete(this);
004a87f0      
004a87fb      return this;
004a87e0  }

004a87fe                                                                                            90 90                                ..

004a8800  int32_t __thiscall AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::InsertOrderedByIndex(class AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>* this, class TChessPiece<CBasePiece>** arg2, uint32_t arg3)

004a8800  {
004a8803      uint32_t m_num = this->m_num;
004a8803      
004a880d      if (arg3 <= m_num)
004a880d      {
004a880f          uint32_t m_size = this->m_size;
004a8814          int32_t eax_2;
004a8814          
004a8814          if (m_num >= m_size)
004a8814          {
004a8818              uint32_t eax_1;
004a8818              
004a8818              if (m_size <= 0)
004a881e                  eax_1 = 8;
004a8818              else
004a881a                  eax_1 = (m_size * 2);
004a881a              
004a8826              eax_2 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(this, eax_1);
004a8814          }
004a8814          
004a882d          if ((m_num < m_size || eax_2 != 0))
004a882d          {
004a882f              uint32_t m_num_1 = this->m_num;
004a882f              
004a8834              if (m_num_1 > 0)
004a8834              {
004a8836                  class TChessPiece<CBasePiece>** m_data = this->m_data;
004a8836                  
004a8841                  for (void* i = &m_data[(m_num_1 - 1)]; i >= &m_data[arg3]; i -= 4)
004a8845                      *(uint32_t*)((char*)i + 4) = *(uint32_t*)i;
004a8834              }
004a8834              
004a884f              this->m_data[arg3] = *(uint32_t*)arg2;
004a885a              this->m_num += 1;
004a8864              return 1;
004a882d          }
004a880d      }
004a880d      
004a886b      return 0;
004a8800  }

004a886e                                            90 90                                                                ..

004a8870  void __thiscall CChessLogic<CBasePiece>::CommitPiecePos(class CChessLogic<CBasePiece>* this, class TChessPiece<CBasePiece>* arg2, class TCoord arg3)

004a8870  {
004a8877      if (arg2 != 0)
004a8877      {
004a8881          int32_t y = arg3.y;
004a8884          CChessLogic<CBasePiece>::TryPiecePos(this, arg2, arg3.x);
004a8889          int32_t x = arg2->m_CurPos.x;
004a888c          int32_t y_1 = arg2->m_CurPos.y;
004a888f          arg2->m_bMoved = 1;
004a8896          arg2->m_LastKnownGoodPos.x = x;
004a8899          arg2->m_LastKnownGoodPos.y = y_1;
004a8877      }
004a8870  }


004a88a0  enum ChessMoveResult __thiscall CChessLogic<CBasePiece>::TestCanGetThere(class CChessLogic<CBasePiece>* this, class TChessPiece<CBasePiece>* arg2, class TCoord const* arg3, int32_t arg4)

004a88a0  {
004a88a0      class TCoord* edx_11 = arg3;
004a88a4      int32_t x = edx_11->x;
004a88a4      
004a88b0      if (x >= 0)
004a88b0      {
004a88b2          int32_t y_2 = edx_11->y;
004a88b2          
004a88c1          if ((y_2 >= 0 && (x < 8 && y_2 < 8)))
004a88c1          {
004a88d2              class TChessPiece<CBasePiece>* edi = arg2;
004a88db              int32_t ebp_1 = (x - edi->m_CurPos.x);
004a88e0              int32_t var_8 = 0;
004a88e4              int32_t var_4 = 0;
004a88e8              int32_t ecx_1;
004a88e8              
004a88e8              if (edi->m_Player != 0)
004a88e8              {
004a88f8                  ecx_1 = (edi->m_CurPos.y - y_2);
004a88fa                  arg2 = ecx_1;
004a88e8              }
004a88e8              else
004a88e8              {
004a88ec                  ecx_1 = (y_2 - edi->m_CurPos.y);
004a88ef                  arg2 = ecx_1;
004a88e8              }
004a88e8              
004a8919              if ((((arg4 == 0 || x != this->m_EnPassantAttackSite.x) || y_2 != this->m_EnPassantAttackSite.y) || edi->m_Type != Pawn))
004a8903                  goto label_4a8971;
004a8903              
004a8926              int32_t eax_5;
004a8926              
004a8926              if (edi->vtable->bCanAttack(ebp_1, ecx_1) == 0)
004a8926              {
004a896d                  ecx_1 = arg2;
004a8971              label_4a8971:
004a8971                  class TCoord* eax_6 = arg3;
004a897d                  eax_5 = this->m_Board[0][(eax_6->y + (eax_6->x << 3))];
004a8981              label_4a8981:
004a8981                  
004a8983                  if (eax_5 == 0)
004a8983                      goto label_4a89ca;
004a8983                  
004a898b                  if (*(uint32_t*)(eax_5 + 0xc) == edi->m_Player)
004a8999                      return 0xffffff97;
004a8999                  
004a89a2                  var_8 = 1;
004a89a2                  
004a89af                  if (edi->vtable->bCanAttack(ebp_1, ecx_1) == 0)
004a89bd                      return 0xffffff9c;
004a8926              }
004a8926              else
004a8926              {
004a8937                  class TChessPiece<CBasePiece>* eax_4 = this->m_Board[0][(this->m_EnPassantVictimPos.y + (this->m_EnPassantVictimPos.x << 3))];
004a893f                  arg4 = eax_4;
004a893f                  
004a8943                  if (eax_4->m_Type == Pawn)
004a8943                  {
004a8951                      int32_t y = this->m_EnPassantAttackSite.y;
004a8956                      CChessLogic<CBasePiece>::TryPiecePos(this, eax_4, this->m_EnPassantAttackSite.x);
004a895b                      ecx_1 = arg2;
004a895f                      eax_5 = arg4;
004a8963                      var_4 = 1;
004a896b                      goto label_4a8981;
004a8943                  }
004a8943                  
004a89c0                  ecx_1 = arg2;
004a89ca              label_4a89ca:
004a89ca                  
004a89ce                  if (edi->vtable->bCanGoTo(ebp_1, ecx_1) == 0)
004a89dc                      return 0xffffff9c;
004a8926              }
004a89e1              int32_t eax_16;
004a89e1              int32_t edx_5;
004a89e1              edx_5 = HIGHD(((int64_t)ebp_1));
004a89e1              eax_16 = LOWD(((int64_t)ebp_1));
004a89e6              int32_t edi_1 = 1;
004a89ed              int32_t eax_20;
004a89ed              int32_t edx_6;
004a89ed              
004a89ed              if (((eax_16 ^ edx_5) - edx_5) <= 1)
004a89f3                  edx_6 = HIGHD(((int64_t)arg2));
004a89f3                  eax_20 = LOWD(((int64_t)arg2));
004a89f3              
004a89fa              if ((((eax_16 ^ edx_5) - edx_5) > 1 || ((eax_20 ^ edx_6) - edx_6) > 1))
004a89fa              {
004a8a0e                  CChessLogic<CBasePiece>::ConvertMoveToVector(this, &edi->m_CurPos, arg3, &arg2, &arg3);
004a8a15                  int32_t y_1 = edi->m_CurPos.y;
004a8a1c                  class TChessPiece<CBasePiece>* edx_7 = arg2;
004a8a1c                  
004a8a20                  if (arg3 > 1)
004a8a20                  {
004a8a30                      int32_t ecx_11 = (edi->m_CurPos.x << 3);
004a8a30                      
004a8a4b                      do
004a8a4b                      {
004a8a36                          ecx_11 += (Directions[edx_7].x << 3);
004a8a38                          y_1 += Directions[edx_7].y;
004a8a38                          
004a8a42                          if (this->m_Board[0][(ecx_11 + y_1)] != 0)
004a8a79                              return 0xffffff95;
004a8a79                          
004a8a48                          edi_1 += 1;
004a8a4b                      } while (edi_1 < arg3);
004a8a20                  }
004a89fa              }
004a89fa              
004a8a53              if (var_8 == 0)
004a8a88                  return 1;
004a8a88              
004a8a5d              int32_t eax_25;
004a8a5d              eax_25 = var_4 != 0;
004a8a6a              return (eax_25 + 2);
004a88c1          }
004a88b0      }
004a88b0      
004a88cc      return 0xffffff98;
004a88a0  }

004a8a8b                                   90 90 90 90 90                                                             .....

004a8a90  void __fastcall GameBoardGrid::CommitMoves(class GameBoardGrid* this)

004a8a90  {
004a8a90      class GameBoardGrid* this_1 = this;
004a8a97      class TChessPiece<CBasePiece>* (* edi)[0x8][0x8] = &this->m_rgPreviousBoard;
004a8a9d      int32_t i_1 = 8;
004a8b14      int32_t i;
004a8b14      
004a8b14      do
004a8b14      {
004a8ab0          int32_t j_1 = 8;
004a8b0e          int32_t j;
004a8b0e          
004a8b0e          do
004a8b0e          {
004a8ab5              class TChessPiece<CBasePiece>* eax_1 = ADJ(edi)->m_Board[0][0];
004a8ab5              
004a8abd              if (eax_1 != 0)
004a8abd              {
004a8abf                  class TChessPiece<CBasePiece>* esi_1 = ADJ(edi)->m_rgPreviousBoard[0][0];
004a8abf                  
004a8ac7                  if ((esi_1 != 0 && eax_1 != esi_1))
004a8ac7                  {
004a8acc                      int32_t eax_3 = (esi_1->m_Player * 3);
004a8add                      int32_t* k = *(uint32_t*)(&this->m_Pieces + (eax_3 << 2));
004a8add                      
004a8ae4                      for (void* edx_2 = &k[&*(uint32_t*)((char*)this->m_Pieces[0])[8][eax_3]]; k < edx_2; k = &k[1])
004a8ae4                      {
004a8ae8                          if (*(uint32_t*)k == esi_1)
004a8ae8                          {
004a8af6                              *(uint32_t*)k = *(uint32_t*)((char*)edx_2 - 4);
004a8af8                              &*(uint32_t*)((char*)this->m_Pieces[0])[8][eax_3] -= 1;
004a8af8                              break;
004a8ae8                          }
004a8ae4                      }
004a8ae4                      
004a8afc                      operator delete(esi_1);
004a8ac7                  }
004a8abd              }
004a8abd              
004a8af1              ADJ(edi)->m_rgPreviousBoard[0][0] = 0;
004a8b0a              edi = &*(uint256_t*)edi[0][1];
004a8b0d              j = j_1;
004a8b0d              j_1 -= 1;
004a8b0e          } while (j != 1);
004a8b10          i = i_1;
004a8b10          i_1 -= 1;
004a8b14      } while (i != 1);
004a8b1c      this->m_coordSelected.x = 0xffffffff;
004a8b22      this->m_coordSelected.y = 0xffffffff;
004a8b2e      /* tailcall */
004a8b2e      return GameBoardGrid::Draw(this);
004a8a90  }

004a8aa7                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
004a8b33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a8b40  void __fastcall GameBoardGrid::ClearAllPieces(class GameBoardGrid* this)

004a8b40  {
004a8b44      class TChessPiece<CBasePiece>* (* eax)[0x8][0x8] = &this->m_rgPreviousBoard;
004a8b4a      int32_t i_3 = 8;
004a8b6f      int32_t i;
004a8b6f      
004a8b6f      do
004a8b6f      {
004a8b51          int32_t j_2 = 8;
004a8b6c          int32_t j;
004a8b6c          
004a8b6c          do
004a8b6c          {
004a8b92              ADJ(eax)->m_Board[0][0] = nullptr;
004a8b92              ADJ(eax)->m_rgPreviousBoard[0][0] = 0;
004a8b68              eax = &*(uint256_t*)eax[0][1];
004a8b6b              j = j_2;
004a8b6b              j_2 -= 1;
004a8b6c          } while (j != 1);
004a8b6e          i = i_3;
004a8b6e          i_3 -= 1;
004a8b6f      } while (i != 1);
004a8b71      uint32_t* esi = &this->m_Pieces[0].m_num;
004a8b77      int32_t i_2 = 2;
004a8bba      int32_t i_1;
004a8bba      
004a8bba      do
004a8bba      {
004a8b82          int32_t j_1 = 0;
004a8b82          
004a8b86          if (ADJ(esi)->m_Pieces[0].m_num > 0)
004a8b86          {
004a8ba0              do
004a8ba0              {
004a8b8b                  void* eax_3 = ADJ(esi)->m_Pieces[0].m_data[j_1];
004a8b8b                  
004a8b90                  if (eax_3 != 0)
004a8b93                      operator delete(eax_3);
004a8b93                  
004a8b9d                  j_1 += 1;
004a8ba0              } while (j_1 < ADJ(esi)->m_Pieces[0].m_num);
004a8b86          }
004a8b86          
004a8b92          ADJ(esi)->m_Pieces[0].m_num = 0;
004a8b92          ADJ(esi)->m_Pieces[0].m_size = 0;
004a8bab          operator delete[](ADJ(esi)->m_Pieces[0].m_data);
004a8b92          ADJ(esi)->m_Pieces[0].m_data = 0;
004a8bb6          esi = &esi[3];
004a8bb9          i_1 = i_2;
004a8bb9          i_2 -= 1;
004a8bba      } while (i_1 != 1);
004a8b40  }

004a8b58                                                                          8d a4 24 00 00 00 00 90                          ..$.....
004a8bc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004a8bd0  void __fastcall GameBoardGrid::GameBoardGrid(class GameBoardGrid* this, class gmMiniGameUI* arg2)

004a8bd0  {
004a8bd6      class GameBoardGrid* this_1 = this;
004a8bd8      CChessLogic<CBasePiece>::CChessLogic<CBasePiece>(this);
004a8bdd      class gmMiniGameUI* ecx = arg2;
004a8be4      this_1->vtable = 0x7ae138;
004a8bec      this_1->m_pieceListBox = nullptr;
004a8bf2      this_1->m_coordSelected.x = 0xffffffff;
004a8bf8      this_1->m_coordSelected.y = 0xffffffff;
004a8c03      this_1->m_gameUI = ecx;
004a8c09      class UIElement* eax;
004a8c09      int32_t ecx_1;
004a8c09      eax = UIElement::GetChildRecursive(ecx, 0x10000174);
004a8c10      class UIElement_ListBox* eax_1;
004a8c10      
004a8c10      if (eax == 0)
004a8c20          eax_1 = nullptr;
004a8c10      else
004a8c18          eax_1 = eax->vtable->DynamicCast(5);
004a8c18      
004a8c22      this_1->m_pieceListBox = eax_1;
004a8c22      
004a8c3c      while (true)
004a8c3c          this_1 = UIElement_ListBox::AddItemFromTemplateListByID(this_1->m_pieceListBox, 0x10000178, nullptr);
004a8bd0  }

004a8dfa                                                                                90 90 90 90 90 90                            ......

004a8e00  void __thiscall GameBoardGrid::CreatePiece(class GameBoardGrid* this, int32_t arg2, int32_t arg3, int32_t arg4, enum ChessPieceType arg5)

004a8e00  {
004a8e09      int32_t ebp = arg2;
004a8e0d      int32_t var_4 = arg3;
004a8e16      int32_t esi = 0;
004a8e23      int32_t var_8 = ebp;
004a8e27      arg2 = 0;
004a8e27      
004a8e2b      if ((arg5 - 1) <= 5)
004a8e2b      {
004a8e31          uint32_t id;
004a8e31          
004a8e31          switch (arg5)
004a8e31          {
004a8e3a              case Pawn:
004a8e3a              {
004a8e3a                  class TPawnPiece<CBasePiece>* eax_3 = operator new(0x24);
004a8e3a                  
004a8e44                  if (eax_3 == 0)
004a8e57                      esi = 0;
004a8e44                  else
004a8e53                      esi = TPawnPiece<CBasePiece>::TPawnPiece<CBasePiece>(eax_3, arg4, &var_8);
004a8e53                  
004a8e5b                  arg2 = esi;
004a8e5b                  
004a8e5f                  if (arg4 == 0)
004a8e6c                      id = this->m_didWhitePawn.id;
004a8e5f                  else
004a8e61                      id = this->m_didBlackPawn.id;
004a8e3a                  break;
004a8e3a              }
004a8e79              case Rook:
004a8e79              {
004a8e79                  class TRookPiece<CBasePiece>* eax_5 = operator new(0x24);
004a8e79                  
004a8e83                  if (eax_5 == 0)
004a8e96                      esi = 0;
004a8e83                  else
004a8e92                      esi = TRookPiece<CBasePiece>::TRookPiece<CBasePiece>(eax_5, arg4, &var_8);
004a8e92                  
004a8e9a                  arg2 = esi;
004a8e9a                  
004a8e9e                  if (arg4 == 0)
004a8eab                      id = this->m_didWhiteRook.id;
004a8e9e                  else
004a8ea0                      id = this->m_didBlackRook.id;
004a8e79                  break;
004a8e79              }
004a8eb8              case Knight:
004a8eb8              {
004a8eb8                  class TKnightPiece<CBasePiece>* eax_7 = operator new(0x24);
004a8eb8                  
004a8ec2                  if (eax_7 == 0)
004a8ed5                      esi = 0;
004a8ec2                  else
004a8ed1                      esi = TKnightPiece<CBasePiece>::TKnightPiece<CBasePiece>(eax_7, arg4, &var_8);
004a8ed1                  
004a8ed9                  arg2 = esi;
004a8ed9                  
004a8edd                  if (arg4 == 0)
004a8eea                      id = this->m_didWhiteKnight.id;
004a8edd                  else
004a8edf                      id = this->m_didBlackKnight.id;
004a8eb8                  break;
004a8eb8              }
004a8ef7              case Bishop:
004a8ef7              {
004a8ef7                  class TBishopPiece<CBasePiece>* eax_9 = operator new(0x24);
004a8ef7                  
004a8f01                  if (eax_9 == 0)
004a8f14                      esi = 0;
004a8f01                  else
004a8f10                      esi = TBishopPiece<CBasePiece>::TBishopPiece<CBasePiece>(eax_9, arg4, &var_8);
004a8f10                  
004a8f18                  arg2 = esi;
004a8f18                  
004a8f1c                  if (arg4 == 0)
004a8f26                      id = this->m_didWhiteBishop.id;
004a8f1c                  else
004a8f1e                      id = this->m_didBlackBishop.id;
004a8ef7                  break;
004a8ef7              }
004a8f30              case Queen:
004a8f30              {
004a8f30                  class TQueenPiece<CBasePiece>* eax_11 = operator new(0x24);
004a8f30                  
004a8f3a                  if (eax_11 == 0)
004a8f4d                      esi = 0;
004a8f3a                  else
004a8f49                      esi = TQueenPiece<CBasePiece>::TQueenPiece<CBasePiece>(eax_11, arg4, &var_8);
004a8f49                  
004a8f51                  arg2 = esi;
004a8f51                  
004a8f55                  if (arg4 == 0)
004a8f5f                      id = this->m_didWhiteQueen.id;
004a8f55                  else
004a8f57                      id = this->m_didBlackQueen.id;
004a8f30                  break;
004a8f30              }
004a8f69              case King:
004a8f69              {
004a8f69                  void* eax_13 = operator new(0x24);
004a8f69                  
004a8f73                  if (eax_13 == 0)
004a8f86                      esi = 0;
004a8f73                  else
004a8f82                      esi = TKingPiece<CBasePiece>::TKingPiece<CBasePiece>(eax_13, arg4, &var_8);
004a8f82                  
004a8f8a                  arg2 = esi;
004a8f8a                  
004a8f8e                  if (arg4 == 0)
004a8f98                      id = this->m_didWhiteKing.id;
004a8f8e                  else
004a8f90                      id = this->m_didBlackKing.id;
004a8f69                  break;
004a8f69              }
004a8e31          }
004a8e31          
004a8f9e          *(uint32_t*)(esi + 4) = id;
004a8e2b      }
004a8e2b      
004a8fa8      this->m_Board[0][(arg3 + (ebp << 3))] = esi;
004a8fa8      
004a8fb0      if (*(uint32_t*)(esi + 8) == 6)
004a8fb0      {
004a8fc3          AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::InsertOrderedByIndex(&this->m_Pieces[arg4], &arg2, 0);
004a8fcf          return;
004a8fb0      }
004a8fb0      
004a8fd2      int32_t ecx_8 = (arg4 * 3);
004a8fd5      int32_t eax_17 = &*(uint32_t*)((char*)this->m_Pieces[0])[4][ecx_8];
004a8fe6      int32_t eax_19;
004a8fe6      
004a8fe6      if (&*(uint32_t*)((char*)this->m_Pieces[0])[8][ecx_8] >= eax_17)
004a8fe6      {
004a8fea          uint32_t eax_18;
004a8fea          
004a8fea          if (eax_17 <= 0)
004a8ff0              eax_18 = 8;
004a8fea          else
004a8fec              eax_18 = (eax_17 * 2);
004a8fec          
004a8ff8          eax_19 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow((&this->m_Pieces + (ecx_8 << 2)), eax_18);
004a8fe6      }
004a8fe6      
004a8fff      if ((&*(uint32_t*)((char*)this->m_Pieces[0])[8][ecx_8] < eax_17 || eax_19 != 0))
004a8fff      {
004a9006          *(uint32_t*)(*(uint32_t*)(&this->m_Pieces + (ecx_8 << 2)) + (&*(uint32_t*)((char*)this->m_Pieces[0])[8][ecx_8] << 2)) = esi;
004a9009          &*(uint32_t*)((char*)this->m_Pieces[0])[8][ecx_8] += 1;
004a8fff      }
004a8e00  }

004a9016                                                                    8b ff                                                ..
004a9018  uint32_t jump_table_4a9018[0x6] = 
004a9018  {
004a9018      [0x0] =  0x004a8e38
004a901c      [0x1] =  0x004a8e77
004a9020      [0x2] =  0x004a8eb6
004a9024      [0x3] =  0x004a8ef5
004a9028      [0x4] =  0x004a8f2e
004a902c      [0x5] =  0x004a8f67
004a9030  }

004a9030  int32_t __thiscall CChessLogic<CBasePiece>::IsPlayerInCheck(class CChessLogic<CBasePiece>* this, int32_t arg2)

004a9030  {
004a903d      int32_t ecx;
004a903d      ecx = arg2 == 0;
004a9045      int32_t edx;
004a9045      edx = arg2 == 1;
004a9055      void* eax_2 = *(uint32_t*)this->m_Pieces[edx].m_data;
004a9055      
004a9059      if (eax_2 != 0)
004a9059      {
004a905e          void* ebx_1 = ((char*)this + (ecx * 0xc));
004a9061          int32_t ecx_2 = *(uint32_t*)((char*)ebx_1 + 0x10c);
004a9067          int32_t edi_1 = 0;
004a9067          
004a906f          if (ecx_2 > 0)
004a906f          {
004a9093              do
004a9093              {
004a908a                  if (CChessLogic<CBasePiece>::TestCanGetThere(this, *(uint32_t*)(*(uint32_t*)((char*)ebx_1 + 0x104) + (edi_1 << 2)), ((char*)eax_2 + 0x10), 0) > NoMoveResult)
004a90a7                      return 1;
004a90a7                  
004a9090                  edi_1 += 1;
004a9093              } while (edi_1 < ecx_2);
004a906f          }
004a9059      }
004a9059      
004a909b      return 0;
004a9030  }

004a90aa                                90 90 90 90 90 90                                                            ......

004a90b0  int32_t __thiscall CChessLogic<CBasePiece>::DoesMoveSelfCheck(class CChessLogic<CBasePiece>* this, class TChessPiece<CBasePiece>* arg2, class TCoord const* arg3)

004a90b0  {
004a90b4      int32_t y_1 = arg3->y;
004a90c5      int32_t y_2 = y_1;
004a90c9      class TChessPiece<CBasePiece>* edi = this->m_Board[0][(y_1 + (arg3->x << 3))];
004a90d1      CChessLogic<CBasePiece>::TryPiecePos(this, arg2, arg3->x);
004a90e2      int32_t y = HEAVEN.y;
004a90e7      CChessLogic<CBasePiece>::TryPiecePos(this, edi, HEAVEN.x);
004a90f2      int32_t result = CChessLogic<CBasePiece>::IsPlayerInCheck(this, arg2->m_Player);
004a90fc      CChessLogic<CBasePiece>::UndoTryPiecePos(this, arg2);
004a9104      CChessLogic<CBasePiece>::UndoTryPiecePos(this, edi);
004a910f      return result;
004a90b0  }

004a9112                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004a9120  void __fastcall gmMiniGameUI::PostInit(class gmMiniGameUI* this)

004a9120  {
004a9123      UIElement::PostInit(this);
004a912f      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000175);
004a9136      class UIElement_Button* eax_1;
004a9136      
004a9136      if (eax == 0)
004a9146          eax_1 = nullptr;
004a9136      else
004a913e          eax_1 = eax->vtable->DynamicCast(1);
004a913e      
004a914f      this->m_pResignButton = eax_1;
004a9155      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x10000176);
004a915c      class UIElement_Button* eax_3;
004a915c      
004a915c      if (eax_2 == 0)
004a916c          eax_3 = nullptr;
004a915c      else
004a9164          eax_3 = eax_2->vtable->DynamicCast(1);
004a9164      
004a9175      this->m_pPassButton = eax_3;
004a917b      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000177);
004a9182      class UIElement_Button* eax_5;
004a9182      
004a9182      if (eax_4 == 0)
004a9192          eax_5 = nullptr;
004a9182      else
004a918a          eax_5 = eax_4->vtable->DynamicCast(1);
004a918a      
004a9194      class UIElement_Button* m_pResignButton = this->m_pResignButton;
004a919b      this->m_pStalemateButton = eax_5;
004a91a1      m_pResignButton->vtable->SetVisible(1);
004a91a8      this->m_pPassButton->vtable->SetVisible(0);
004a91b5      this->m_pStalemateButton->vtable->SetVisible(1);
004a91c2      class GlobalEventHandler* eax_8 = GlobalEventHandler::GetGlobalEventHandler();
004a91c2      
004a91cb      if (eax_8 != 0)
004a91cb      {
004a91cd          eax_8->vtable->RegisterNoticeHandler(0x4dd219, &this->vtable);
004a91e1          eax_8->vtable->RegisterNoticeHandler(0x4dd250, &this->vtable);
004a91ee          eax_8->vtable->RegisterNoticeHandler(0x4dd21a, &this->vtable);
004a91fb          eax_8->vtable->RegisterNoticeHandler(0x4dd23b, &this->vtable);
004a9208          eax_8->vtable->RegisterNoticeHandler(0x4dd23c, &this->vtable);
004a9215          eax_8->vtable->RegisterNoticeHandler(0x4dd23d, &this->vtable);
004a9222          eax_8->vtable->RegisterNoticeHandler(0x4dd23e, &this->vtable);
004a922f          eax_8->vtable->RegisterNoticeHandler(0x4dd23f, &this->vtable);
004a923c          eax_8->vtable->RegisterNoticeHandler(0x4dd240, &this->vtable);
004a91cb      }
004a91cb      
004a924f      void* eax_13;
004a924f      class gmMiniGameUI* edx_10;
004a924f      eax_13 = operator new(0x274);
004a924f      
004a925a      if (eax_13 == 0)
004a925a      {
004a926e          this->m_pGameBoard = nullptr;
004a9275          return;
004a925a      }
004a925a      
004a925c      class gmMiniGameUI* __saved_esi = this;
004a9264      this->m_pGameBoard = GameBoardGrid::GameBoardGrid(eax_13, edx_10);
004a9120  }

004a9276                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004a9280  void* __thiscall GameBoardGrid::`scalar deleting destructor'(class GameBoardGrid* this, uint32_t arg2)

004a9280  {
004a9283      this->vtable = 0x7ae138;
004a9289      GameBoardGrid::ClearAllPieces(this);
004a9290      CChessLogic<CBasePiece>::~CChessLogic<CBasePiece>(this);
004a9290      
004a929a      if ((arg2 & 1) != 0)
004a929d          operator delete(this);
004a929d      
004a92a8      return this;
004a9280  }

004a92ab                                   90 90 90 90 90                                                             .....

004a92b0  void __fastcall GameBoardGrid::Reset(class GameBoardGrid* this)

004a92b0  {
004a92be      GameBoardGrid::ClearAllPieces(this);
004a92e3      int32_t var_1c4 = 5;
004a92e7      int32_t var_1b0 = 5;
004a92f0      int32_t var_200 = 0;
004a92f4      int32_t var_1fc = 0;
004a92f8      int32_t var_1f8 = 0;
004a92fc      int32_t var_1f4 = 2;
004a9300      int32_t var_1f0 = 1;
004a9304      int32_t var_1ec = 0;
004a9308      int32_t var_1e8 = 0;
004a930c      int32_t var_1e4 = 3;
004a9310      int32_t var_1e0 = 2;
004a9314      int32_t var_1dc = 0;
004a9318      int32_t var_1d8 = 0;
004a931c      int32_t var_1d4 = 4;
004a9320      int32_t var_1d0 = 3;
004a9324      int32_t var_1cc = 0;
004a9328      int32_t var_1c8 = 0;
004a932c      int32_t var_1c0 = 4;
004a9330      int32_t var_1bc = 0;
004a9334      int32_t var_1b8 = 0;
004a9338      int32_t var_1b4 = 6;
004a933c      int32_t var_1ac = 0;
004a9340      int32_t var_1a8 = 0;
004a9344      int32_t var_1a4 = 4;
004a9348      int32_t var_1a0 = 6;
004a934c      int32_t var_19c = 0;
004a9350      int32_t var_198 = 0;
004a9354      int32_t var_194 = 3;
004a935b      int32_t var_190 = 7;
004a9362      int32_t var_18c = 0;
004a9369      int32_t var_188 = 0;
004a9370      int32_t var_184 = 2;
004a9377      int32_t var_180 = 0;
004a937e      int32_t var_17c = 1;
004a9385      int32_t var_178 = 0;
004a938c      int32_t var_174 = 1;
004a9393      int32_t var_170 = 1;
004a939a      int32_t var_16c = 1;
004a93a1      int32_t var_168 = 0;
004a93a8      int32_t var_164 = 1;
004a93af      int32_t var_160 = 2;
004a93b6      int32_t var_15c = 1;
004a93bd      int32_t var_158 = 0;
004a93c4      int32_t var_154 = 1;
004a93cb      int32_t var_150 = 3;
004a93d2      int32_t var_14c = 1;
004a93d9      int32_t var_148 = 0;
004a93e0      int32_t var_144 = 1;
004a93e7      int32_t var_140 = 4;
004a93ee      int32_t var_13c = 1;
004a93f5      int32_t var_138 = 0;
004a93fc      int32_t var_134 = 1;
004a9403      int32_t var_130 = 5;
004a940e      int32_t var_12c = 1;
004a9415      int32_t var_128 = 0;
004a941c      int32_t var_124 = 1;
004a9423      int32_t var_120 = 6;
004a942a      int32_t var_11c = 1;
004a9431      int32_t var_118 = 0;
004a9438      int32_t var_114 = 1;
004a943f      int32_t var_110 = 7;
004a9446      int32_t var_10c = 1;
004a944d      int32_t var_108 = 0;
004a9454      int32_t var_104 = 1;
004a945b      int32_t var_100 = 0;
004a9462      int32_t var_fc;
004a9462      __builtin_memcpy(&var_fc, "\x06\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x06\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x06\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x07\x00\x00\x00\x06\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00", 0x7c);
004a9470      int32_t var_80 = 0;
004a948a      int32_t var_7c;
004a948a      __builtin_memcpy(&var_7c, "\x07\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x04\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x05\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x07\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00", 0x7c);
004a9624      void* esi = &var_1f8;
004a9628      int32_t i_1 = 0x20;
004a964c      int32_t i;
004a964c      
004a964c      do
004a964c      {
004a9643          GameBoardGrid::CreatePiece(this, *(uint32_t*)((char*)esi - 8), *(uint32_t*)((char*)esi - 4), *(uint32_t*)esi, *(uint32_t*)((char*)esi + 4));
004a9648          esi += 0x10;
004a964b          i = i_1;
004a964b          i_1 -= 1;
004a964c      } while (i != 1);
004a9652      GameBoardGrid::Draw(this);
004a92b0  }

004a9662        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004a9670  enum ChessMoveResult __thiscall CChessLogic<CBasePiece>::HandleCastling(class CChessLogic<CBasePiece>* this, class TChessPiece<CBasePiece>* arg2, class TCoord const* arg3)

004a9670  {
004a9674      class TChessPiece<CBasePiece>* esi = arg2;
004a9674      
004a967d      if (esi == 0)
004a9689          return 0xffffff9a;
004a9689      
004a9694      if (this->m_bLastMoveWasCheck != 0)
004a96a0          return 0xffffff94;
004a96a0      
004a96a8      if (esi->m_bMoved != 0)
004a96b4          return 0xffffff92;
004a96b4      
004a96bb      int32_t x = esi->m_CurPos.x;
004a96c5      int32_t ecx = 1;
004a96c5      
004a96ca      if (arg3->x < x)
004a96cc          ecx = 0xffffffff;
004a96cc      
004a96cf      class TChessPiece<CBasePiece>* i = (x + ecx);
004a96d3      arg2 = i;
004a96d3      
004a96d7      if (i >= 0)
004a96d7      {
004a96e1          void* ebp_1 = &this->m_Board[0][(esi->m_CurPos.y + (i << 3))];
004a96e1          
004a96e8          while (i < 8)
004a96e8          {
004a96ea              class TChessPiece<CBasePiece>* ebx_2 = *(uint32_t*)ebp_1;
004a96ea              
004a96ef              if (ebx_2 != 0)
004a96ef              {
004a9714                  if ((ebx_2->m_Type != Rook || ebx_2->m_Player != esi->m_Player))
004a9722                      return 0xffffff95;
004a9722                  
004a972a                  if (ebx_2->m_bMoved != 0)
004a9738                      return 0xffffff92;
004a9738                  
004a973b                  int32_t x_1 = esi->m_CurPos.x;
004a973e                  int32_t y = esi->m_CurPos.y;
004a9743                  int32_t x_3 = x_1;
004a9750                  int32_t x_4 = (esi->m_CurPos.x + (ecx << 1));
004a9757                  int32_t x_2 = x_1;
004a9763                  int32_t y_3 = y;
004a9767                  x_3 = arg2;
004a976b                  x_2 = x_4;
004a976b                  
004a9776                  if (CChessLogic<CBasePiece>::DoesMoveSelfCheck(this, esi, &x_3) != 0)
004a9784                      return 0xffffff93;
004a9784                  
004a9796                  if (CChessLogic<CBasePiece>::DoesMoveSelfCheck(this, esi, &x_2) != 0)
004a97a4                      return 0xffffff96;
004a97a4                  
004a97ab                  int32_t y_1 = y;
004a97b0                  CChessLogic<CBasePiece>::CommitPiecePos(this, ebx_2, x_3);
004a97bd                  int32_t y_2 = y;
004a97c2                  CChessLogic<CBasePiece>::CommitPiecePos(this, esi, x_2);
004a97c7                  this->vtable->MovePiece(ebx_2);
004a97db                  return 1;
004a96ef              }
004a96ef              
004a96f1              i += ecx;
004a96f3              ebp_1 += (ecx << 5);
004a96f3              
004a96f7              if (i < 0)
004a96f7                  break;
004a96e8          }
004a96d7      }
004a96d7      
004a9705      return 0xffffff9a;
004a9670  }

004a97de                                                                                            90 90                                ..

004a97e0  enum ChessMoveResult __thiscall CChessLogic<CBasePiece>::TestMoveAndSelfCheck(class CChessLogic<CBasePiece>* this, class TChessPiece<CBasePiece>* arg2, class TCoord const* arg3)

004a97e0  {
004a97f2      enum ChessMoveResult result = CChessLogic<CBasePiece>::TestCanGetThere(this, arg2, arg3, 1);
004a97f2      
004a97fb      if ((result > NoMoveResult && CChessLogic<CBasePiece>::DoesMoveSelfCheck(this, arg2, arg3) != 0))
004a9815          return 0xffffff96;
004a9815      
004a980f      return result;
004a97e0  }

004a9818                                                                          90 90 90 90 90 90 90 90                          ........

004a9820  int32_t __thiscall CChessLogic<CBasePiece>::IsPlayerInCheckMate(class CChessLogic<CBasePiece>* this, int32_t arg2)

004a9820  {
004a982f      int32_t ecx_1 = (arg2 * 3);
004a9839      void* ecx_2 = ((char*)this + (ecx_1 << 2));
004a983e      class TChessPiece<CBasePiece>* edi = **(uint32_t**)(&this->m_Pieces + (ecx_1 << 2));
004a9840      int32_t eax;
004a9840      eax = arg2 == 0;
004a9840      
004a9849      if (edi != 0)
004a9849      {
004a984f          int32_t x_4 = edi->m_CurPos.x;
004a9852          int32_t y_3 = edi->m_CurPos.y;
004a9855          int32_t eax_1 = (eax * 3);
004a9866          int32_t var_18 = &*(uint32_t*)((char*)this->m_Pieces[0])[8][eax_1];
004a986a          void** x_6 = x_4;
004a9872          int32_t* esi_1 = &Directions;
004a9872          
004a9880          while (true)
004a9880          {
004a9880              int32_t eax_4 = (y_3 + esi_1[1]);
004a9884              int32_t x_8 = (*(uint32_t*)esi_1 + x_4);
004a988a              int32_t x_7 = x_4;
004a988f              x_7 = x_8;
004a9896              int32_t var_4_1 = eax_4;
004a9896              
004a98a1              if ((CChessLogic<CBasePiece>::TestCanGetThere(this, edi, &x_7, 1) > NoMoveResult && CChessLogic<CBasePiece>::DoesMoveSelfCheck(this, edi, &x_7) == 0))
004a98b2                  break;
004a98b2              
004a98b4              esi_1 = &esi_1[2];
004a98b4              
004a98bd              if (esi_1 >= 0x822bf8)
004a98bd              {
004a98cd                  if (CChessLogic<CBasePiece>::IsPlayerInCheck(this, arg2) != 0)
004a98cd                  {
004a98cf                      int32_t ebp_1 = var_18;
004a98d3                      int32_t edi_1 = 0;
004a98d3                      
004a98d7                      if (ebp_1 > 0)
004a98d7                      {
004a9903                          do
004a9903                          {
004a98ea                              class TChessPiece<CBasePiece>* esi_2 = *(uint32_t*)(*(uint32_t*)(&this->m_Pieces + (eax_1 << 2)) + (edi_1 << 2));
004a98ea                              
004a98fe                              if (CChessLogic<CBasePiece>::TestCanGetThere(this, esi_2, &x_6, 0) > NoMoveResult)
004a98fe                              {
004a9914                                  int32_t x_5 = esi_2->m_CurPos.x;
004a9921                                  int32_t y = esi_2->m_CurPos.y;
004a9931                                  x_7 = x_5;
004a9935                                  int32_t var_c;
004a9935                                  CChessLogic<CBasePiece>::ConvertMoveToVector(this, &x_7, &x_6, &var_c, &var_18);
004a9944                                  int32_t edx_4 = *(uint32_t*)((char*)ecx_2 + 0x10c);
004a994e                                  int32_t var_1c_2 = 0;
004a994e                                  
004a9956                                  if (var_18 > 0)
004a9956                                  {
004a9b58                                      bool cond:3_1;
004a9b58                                      
004a9b58                                      do
004a9b58                                      {
004a9964                                          int32_t edi_2 = 0;
004a9968                                          arg2 = 0;
004a9968                                          
004a996c                                          if (edx_4 > 0)
004a996c                                          {
004a9b21                                              do
004a9b21                                              {
004a997c                                                  class TChessPiece<CBasePiece>* esi_3 = *(uint32_t*)(*(uint32_t*)((char*)ecx_2 + 0x104) + (edi_2 << 2));
004a997c                                                  
004a9990                                                  if (CChessLogic<CBasePiece>::TestCanGetThere(this, esi_3, &x_7, 1) > NoMoveResult)
004a9990                                                  {
004a999c                                                      int32_t eax_15 = (y + (x_5 << 3));
004a999f                                                      void* edi_3 = this->m_Board[0][eax_15];
004a99a7                                                      x_6 = &this->m_Board[0][eax_15];
004a99a7                                                      
004a99ab                                                      if (esi_3 != 0)
004a99ab                                                      {
004a99ad                                                          int32_t x = esi_3->m_CurPos.x;
004a99ad                                                          
004a99b2                                                          if (x >= 0)
004a99b2                                                          {
004a99b4                                                              int32_t y_1 = esi_3->m_CurPos.y;
004a99b4                                                              
004a99ce                                                              if ((y_1 >= 0 && (x < 8 && (y_1 < 8 && this->m_Board[0][(y_1 + (x << 3))] == esi_3))))
004a99c8                                                                  this->m_Board[0][(y_1 + (x << 3))] = 0;
004a99b2                                                          }
004a99b2                                                          
004a99d8                                                          esi_3->m_CurPos.x = x_5;
004a99db                                                          esi_3->m_CurPos.y = y;
004a99db                                                          
004a99ec                                                          if ((x_5 >= 0 && (y >= 0 && (x_5 < 8 && y < 8))))
004a99f2                                                              *(uint32_t*)x_6 = esi_3;
004a99ab                                                      }
004a99ab                                                      
004a99f6                                                      int32_t x_3 = HEAVEN.x;
004a99fc                                                      int32_t y_5 = HEAVEN.y;
004a99fc                                                      
004a9a02                                                      if (edi_3 != 0)
004a9a02                                                      {
004a9a04                                                          int32_t ecx_15 = *(uint32_t*)((char*)edi_3 + 0x10);
004a9a04                                                          
004a9a09                                                          if (ecx_15 >= 0)
004a9a09                                                          {
004a9a0b                                                              int32_t eax_18 = *(uint32_t*)((char*)edi_3 + 0x14);
004a9a0b                                                              
004a9a1a                                                              if ((eax_18 >= 0 && (ecx_15 < 8 && eax_18 < 8)))
004a9a1a                                                              {
004a9a1c                                                                  int32_t eax_19 = (eax_18 + (ecx_15 << 3));
004a9a1c                                                                  
004a9a29                                                                  if (this->m_Board[0][eax_19] == edi_3)
004a9a25                                                                      this->m_Board[0][eax_19] = 0;
004a9a1a                                                              }
004a9a09                                                          }
004a9a09                                                          
004a9a33                                                          *(uint32_t*)((char*)edi_3 + 0x10) = x_3;
004a9a36                                                          *(uint32_t*)((char*)edi_3 + 0x14) = y_5;
004a9a36                                                          
004a9a47                                                          if ((x_3 >= 0 && (y_5 >= 0 && (x_3 < 8 && y_5 < 8))))
004a9a4d                                                              this->m_Board[0][(y_5 + (x_3 << 3))] = edi_3;
004a9a02                                                      }
004a9a02                                                      
004a9a57                                                      int32_t eax_22 = CChessLogic<CBasePiece>::IsPlayerInCheck(this, esi_3->m_Player);
004a9a5c                                                      int32_t x_1 = esi_3->m_CurPos.x;
004a9a5c                                                      
004a9a61                                                      if (x_1 >= 0)
004a9a61                                                      {
004a9a63                                                          int32_t y_4 = esi_3->m_CurPos.y;
004a9a63                                                          
004a9a7d                                                          if ((y_4 >= 0 && (x_1 < 8 && (y_4 < 8 && this->m_Board[0][(y_4 + (x_1 << 3))] == esi_3))))
004a9a77                                                              this->m_Board[0][(y_4 + (x_1 << 3))] = 0;
004a9a61                                                      }
004a9a61                                                      
004a9a88                                                      int32_t x_2 = esi_3->m_LastKnownGoodPos.x;
004a9a8b                                                      esi_3->m_CurPos.y = esi_3->m_LastKnownGoodPos.y;
004a9a92                                                      esi_3->m_CurPos.x = x_2;
004a9a92                                                      
004a9a95                                                      if (x_2 >= 0)
004a9a95                                                      {
004a9a97                                                          int32_t y_2 = esi_3->m_CurPos.y;
004a9a97                                                          
004a9aa6                                                          if ((y_2 >= 0 && (x_2 < 8 && y_2 < 8)))
004a9aab                                                              this->m_Board[0][(y_2 + (x_2 << 3))] = esi_3;
004a9a95                                                      }
004a9a95                                                      
004a9ab1                                                      if (edi_3 != 0)
004a9ab1                                                      {
004a9ab3                                                          int32_t edx_10 = *(uint32_t*)((char*)edi_3 + 0x10);
004a9ab3                                                          
004a9ab8                                                          if (edx_10 >= 0)
004a9ab8                                                          {
004a9aba                                                              int32_t ecx_21 = *(uint32_t*)((char*)edi_3 + 0x14);
004a9aba                                                              
004a9ad4                                                              if ((ecx_21 >= 0 && (edx_10 < 8 && (ecx_21 < 8 && this->m_Board[0][(ecx_21 + (edx_10 << 3))] == edi_3))))
004a9ace                                                                  this->m_Board[0][(ecx_21 + (edx_10 << 3))] = 0;
004a9ab8                                                          }
004a9ab8                                                          
004a9adf                                                          int32_t ecx_23 = *(uint32_t*)((char*)edi_3 + 0x18);
004a9ae2                                                          *(uint32_t*)((char*)edi_3 + 0x14) = *(uint32_t*)((char*)edi_3 + 0x1c);
004a9ae9                                                          *(uint32_t*)((char*)edi_3 + 0x10) = ecx_23;
004a9ae9                                                          
004a9aec                                                          if (ecx_23 >= 0)
004a9aec                                                          {
004a9aee                                                              int32_t ecx_24 = *(uint32_t*)((char*)edi_3 + 0x14);
004a9aee                                                              
004a9afd                                                              if ((ecx_24 >= 0 && (ecx_23 < 8 && ecx_24 < 8)))
004a9b02                                                                  this->m_Board[0][(ecx_24 + (ecx_23 << 3))] = edi_3;
004a9aec                                                          }
004a9ab1                                                      }
004a9ab1                                                      
004a9b08                                                      if (eax_22 == 0)
004a990e                                                          return 0;
004a990e                                                      
004a9b0e                                                      x_5 = x_7;
004a9b12                                                      edi_2 = arg2;
004a9990                                                  }
004a9990                                                  
004a9b1a                                                  edi_2 += 1;
004a9b1d                                                  arg2 = edi_2;
004a9b21                                              } while (edi_2 < edx_4);
004a996c                                          }
004a996c                                          
004a9b27                                          int32_t eax_24 = var_c;
004a9b45                                          x_5 += Directions[eax_24].x;
004a9b47                                          int32_t y_6 = (y + Directions[eax_24].y);
004a9b4a                                          cond:3_1 = (var_1c_2 + 1) < var_18;
004a9b4c                                          x_7 = x_5;
004a9b50                                          y = y_6;
004a9b54                                          var_1c_2 += 1;
004a9b58                                      } while (cond:3_1);
004a9956                                  }
004a9956                                  
004a9b6a                                  return 1;
004a98fe                              }
004a98fe                              
004a9900                              edi_1 += 1;
004a9903                          } while (edi_1 < ebp_1);
004a98d7                      }
004a98cd                  }
004a98cd                  
004a98cd                  break;
004a98bd              }
004a9880          }
004a9849      }
004a9849      
004a990e      return 0;
004a9820  }

004a9b6d                                         90 90 90                                                               ...

004a9b70  void gmMiniGameUI::MiniGameQuitDialogCallback(class PropertyCollection const* arg1)

004a9b70  {
004a9b7e      uint32_t temp1 = (COMBINE(0, 0x92) % arg1->m_hashProperties.m_intrusiveTable.m_numBuckets);
004a9b81      class HashTableData<unsigned long,BaseProperty>** m_buckets = arg1->m_hashProperties.m_intrusiveTable.m_buckets;
004a9b87      char var_c = 0;
004a9b8b      int32_t* var_8 = nullptr;
004a9b8f      int32_t* var_4 = nullptr;
004a9b96      int32_t* eax_2 = m_buckets[temp1];
004a9b96      
004a9b9a      if (eax_2 != 0)
004a9b9a      {
004a9ba6          while (*(uint32_t*)eax_2 != 0x92)
004a9ba6          {
004a9ba8              eax_2 = eax_2[1];
004a9ba8              
004a9bad              if (eax_2 == 0)
004a9bb3                  return;
004a9ba6          }
004a9ba6          
004a9bb6          if (eax_2 != 0)
004a9bb6          {
004a9bc0              BaseProperty::operator=(&var_8, &eax_2[2]);
004a9bc0              
004a9bcb              if (var_4 != 0)
004a9bd4                  *(uint32_t*)(*(uint32_t*)var_4 + 0x70)(&var_c);
004a9bd4              
004a9bdc              CM_Game::SendNotice_TryToQuitGame(((int8_t)var_c));
004a9be1              int32_t* eax_4 = var_8;
004a9be1              
004a9bea              if (eax_4 != 0)
004a9bea              {
004a9bf4                  int32_t edx_4 = (eax_4[1] - 1);
004a9bf1                  eax_4[1] = edx_4;
004a9bf1                  
004a9bf9                  if (edx_4 == 0)
004a9bff                      **(uint32_t**)eax_4(1);
004a9bff                  
004a9c01                  var_8 = nullptr;
004a9bea              }
004a9bea              
004a9c0b              if (var_4 != 0)
004a9c0b              {
004a9c15                  int32_t edx_7 = (var_4[1] - 1);
004a9c12                  var_4[1] = edx_7;
004a9c12                  
004a9c1a                  if (edx_7 == 0)
004a9c20                      **(uint32_t**)var_4(1);
004a9c0b              }
004a9bb6          }
004a9b9a      }
004a9b70  }

004a9c27                       90 90 90 90 90 90 90 90 90                                                         .........

004a9c30  enum ChessMoveResult __thiscall CChessLogic<CBasePiece>::ComputeCheckResult(class CChessLogic<CBasePiece>* this, int32_t arg2)

004a9c30  {
004a9c3a      int32_t result = 0;
004a9c3a      
004a9c43      if (CChessLogic<CBasePiece>::IsPlayerInCheck(this, arg2) != 0)
004a9c43      {
004a9c48          int32_t eax_1 = CChessLogic<CBasePiece>::IsPlayerInCheckMate(this, arg2);
004a9c4f          int32_t esi_1 = -(eax_1);
004a9c59          result = (((esi_1 - esi_1) & 0x400) + 0x400);
004a9c43      }
004a9c43      
004a9c67      int32_t eax_2;
004a9c67      eax_2 = result > 0x3ff;
004a9c6a      this->m_bLastMoveWasCheck = eax_2;
004a9c75      return result;
004a9c30  }

004a9c78                                                                          90 90 90 90 90 90 90 90                          ........

004a9c80  void __thiscall gmMiniGameUI::RecvNotice_OpponentOffersStalemate(class gmMiniGameUI* this, uint32_t arg2, int32_t arg3, int32_t arg4)

004a9c80  {
004a9c87      if (arg2 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2])
004a9c87      {
004a9c95          if (arg4 != 0)
004a9c95          {
004a9ca3              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), "Your opponent has declared a sta…", 0, 1, 0);
004a9ca8              return;
004a9c95          }
004a9c95          
004a9cb7          ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), "Your opponent has retracted thei…", 0, 1, 0);
004a9c87      }
004a9c80  }

004a9cbf                                                                                               90                                 .

004a9cc0  void gmMiniGameUI::SetInfoText(class gmMiniGameUI* this @ ecx, char const* arg2)

004a9cc0  {
004a9cc1      ClientUISystem::GetUISystem();
004a9ce5      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, arg2), &arg2, 0, 1, 0);
004a9cee      void* esi_3 = &arg2[0xffffffec];
004a9cee      
004a9d01      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004a9d09          **(uint32_t**)esi_3(1);
004a9cc0  }

004a9d0f                                               90                                                                 .

004a9d10  enum ChessMoveResult __thiscall GameBoardGrid::DoPromotion(class GameBoardGrid* this, int32_t arg2, int32_t arg3, enum ChessMoveResult arg4)

004a9d10  {
004a9d24      void* ebx = &this->m_Board[0][(arg3 + (arg2 << 3))];
004a9d28      void* ecx_1 = *(uint32_t*)ebx;
004a9d28      
004a9d30      if (ecx_1 == 0)
004a9e30          return arg4;
004a9e30      
004a9d37      int32_t edi = *(uint32_t*)((char*)ecx_1 + 0xc);
004a9d44      *(uint32_t*)ebx = 0;
004a9d4a      int32_t* m_data = this->m_Pieces[edi].m_data;
004a9d4a      
004a9d54      for (void* edx_2 = &m_data[&*(uint32_t*)((char*)this->m_Pieces[0])[8][(edi * 3)]]; m_data < edx_2; m_data = &m_data[1])
004a9d54      {
004a9d58          if (*(uint32_t*)m_data == ecx_1)
004a9d58          {
004a9d66              *(uint32_t*)m_data = *(uint32_t*)((char*)edx_2 - 4);
004a9d68              &*(uint32_t*)((char*)this->m_Pieces[0])[8][(edi * 3)] -= 1;
004a9d68              break;
004a9d58          }
004a9d54      }
004a9d54      
004a9d6c      operator delete(ecx_1);
004a9d77      int32_t var_8 = arg2;
004a9d7b      int32_t var_4 = arg3;
004a9d7f      void* eax_2 = operator new(0x24);
004a9d89      int32_t ebp_1;
004a9d89      
004a9d89      if (eax_2 == 0)
004a9d9c          ebp_1 = 0;
004a9d89      else
004a9d98          ebp_1 = TQueenPiece<CBasePiece>::TQueenPiece<CBasePiece>(eax_2, edi, &var_8);
004a9d98      
004a9da0      arg2 = ebp_1;
004a9da4      uint32_t id;
004a9da4      
004a9da4      if (edi == 0)
004a9db6          id = this->m_didWhiteQueen.id;
004a9da4      else
004a9daa          id = this->m_didBlackQueen.id;
004a9daa      
004a9dbc      *(uint32_t*)(ebp_1 + 4) = id;
004a9dbf      *(uint32_t*)ebx = ebp_1;
004a9dbf      
004a9dc5      if (*(uint32_t*)(ebp_1 + 8) != 6)
004a9dc5      {
004a9dd7          int32_t eax_5 = &*(uint32_t*)((char*)this->m_Pieces[0])[4][(edi * 3)];
004a9ddd          int32_t eax_7;
004a9ddd          
004a9ddd          if (&*(uint32_t*)((char*)this->m_Pieces[0])[8][(edi * 3)] >= eax_5)
004a9ddd          {
004a9de1              uint32_t eax_6;
004a9de1              
004a9de1              if (eax_5 <= 0)
004a9de7                  eax_6 = 8;
004a9de1              else
004a9de3                  eax_6 = (eax_5 * 2);
004a9de3              
004a9def              eax_7 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->m_Pieces[edi], eax_6);
004a9ddd          }
004a9ddd          
004a9df6          if ((&*(uint32_t*)((char*)this->m_Pieces[0])[8][(edi * 3)] < eax_5 || eax_7 != 0))
004a9df6          {
004a9d3d              this->m_Pieces[edi].m_data[&*(uint32_t*)((char*)this->m_Pieces[0])[8][(edi * 3)]] = ebp_1;
004a9e00              &*(uint32_t*)((char*)this->m_Pieces[0])[8][(edi * 3)] += 1;
004a9df6          }
004a9dc5      }
004a9dc5      else
004a9dd0          AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::InsertOrderedByIndex(&this->m_Pieces[edi], &arg2, 0);
004a9dd0      
004a9e07      int32_t ecx_5;
004a9e07      ecx_5 = edi == 0;
004a9e23      return (arg4 | CChessLogic<CBasePiece>::ComputeCheckResult(this, ecx_5));
004a9d10  }

004a9e33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004a9e40  enum ChessMoveResult __thiscall CChessLogic<CBasePiece>::Move(class CChessLogic<CBasePiece>* this, class TCoord const* arg2, class TCoord const* arg3)

004a9e40  {
004a9e40      class CChessLogic<CBasePiece>* this_1 = this;
004a9e49      int32_t x = arg2->x;
004a9e49      
004a9e4f      if (x >= 0)
004a9e4f      {
004a9e55          int32_t y_1 = arg2->y;
004a9e55          
004a9e70          if ((y_1 >= 0 && (x < 8 && y_1 < 8)))
004a9e70          {
004a9e76              int32_t* ebx_1 = arg3;
004a9e7a              int32_t ebp_1 = *(uint32_t*)ebx_1;
004a9e7a              
004a9e7e              if (ebp_1 >= 0)
004a9e7e              {
004a9e84                  int32_t eax_1 = ebx_1[1];
004a9e84                  
004a9e9b                  if ((eax_1 >= 0 && (ebp_1 < 8 && eax_1 < 8)))
004a9e9b                  {
004a9ea8                      if (CChessLogic<CBasePiece>::SanityCheckBoard(this) == 0)
004a9eb4                          return 0xffffff91;
004a9eb4                      
004a9ebe                      class TChessPiece<CBasePiece>* edi = this->m_Board[0][(y_1 + (x << 3))];
004a9ec4                      int32_t ecx_2 = ebx_1[1];
004a9ece                      arg3 = this->m_Board[0][(ecx_2 + (ebp_1 << 3))];
004a9ece                      
004a9ed2                      if (edi == 0)
004a9ede                          return 0xffffff9a;
004a9ede                      
004a9eea                      if (edi->m_Player != this->m_CurPlayer)
004a9ef6                          return 0xffffff99;
004a9ef6                      
004a9efd                      int32_t eax_10;
004a9efd                      int32_t edx_3;
004a9efd                      
004a9efd                      if (edi->m_Type == King)
004a9f07                          edx_3 = HIGHD(((int64_t)(ebp_1 - arg2->x)));
004a9f07                          eax_10 = LOWD(((int64_t)(ebp_1 - arg2->x)));
004a9f07                      
004a9f18                      enum ChessMoveResult result;
004a9f18                      
004a9f18                      if (((edi->m_Type != King || ((eax_10 ^ edx_3) - edx_3) != 2) || ecx_2 != arg2->y))
004a9f18                      {
004a9f30                          result = CChessLogic<CBasePiece>::TestMoveAndSelfCheck(this, edi, ebx_1);
004a9f30                          
004a9f34                          if (result > NoMoveResult)
004a9f34                          {
004a9f45                              if ((result & OKMoveMask) == 3)
004a9f5a                                  arg3 = this->m_Board[0][(this->m_EnPassantVictimPos.y + (this->m_EnPassantVictimPos.x << 3))];
004a9f5a                              
004a9f45                              goto label_4a9f5e;
004a9f34                          }
004a9f18                      }
004a9f18                      else
004a9f18                      {
004a9f23                          result = CChessLogic<CBasePiece>::HandleCastling(this, edi, ebx_1);
004a9f5e                      label_4a9f5e:
004a9f5e                          
004a9f60                          if (result > NoMoveResult)
004a9f60                          {
004a9f6b                              int32_t var_18_2 = ebx_1[1];
004a9f70                              CChessLogic<CBasePiece>::CommitPiecePos(this, edi, *(uint32_t*)ebx_1);
004a9f84                              int32_t y = HEAVEN.y;
004a9f89                              CChessLogic<CBasePiece>::CommitPiecePos(this, arg3, HEAVEN.x);
004a9f94                              this->m_EnPassantAttackSite.x = HEAVEN.x;
004a9f9f                              this->m_EnPassantAttackSite.y = HEAVEN.y;
004a9f9f                              
004a9fa9                              if (edi->m_Type == Pawn)
004a9fa9                              {
004a9fb7                                  int32_t eax_22;
004a9fb7                                  int32_t edx_9;
004a9fb7                                  edx_9 = HIGHD(((int64_t)(ebx_1[1] - arg2->y)));
004a9fb7                                  eax_22 = LOWD(((int64_t)(ebx_1[1] - arg2->y)));
004a9fb7                                  
004a9fbf                                  if (((eax_22 ^ edx_9) - edx_9) == 2)
004a9fbf                                  {
004a9fc3                                      this->m_EnPassantAttackSite.x = arg2->x;
004a9fcf                                      int32_t eax_27;
004a9fcf                                      int32_t edx_11;
004a9fcf                                      edx_11 = HIGHD(((int64_t)(arg2->y + ebx_1[1])));
004a9fcf                                      eax_27 = LOWD(((int64_t)(arg2->y + ebx_1[1])));
004a9fd4                                      this->m_EnPassantAttackSite.y = ((eax_27 - edx_11) >> 1);
004a9fdc                                      this->m_EnPassantVictimPos.x = *(uint32_t*)ebx_1;
004a9fe5                                      this->m_EnPassantVictimPos.y = ebx_1[1];
004a9fbf                                  }
004a9fbf                                  
004a9feb                                  int32_t ebx_2 = ebx_1[1];
004a9feb                                  
004a9ff5                                  if ((ebx_2 == 0 || ebx_2 == 7))
004a9ff7                                      result |= OKMovePromotion;
004a9fa9                              }
004a9fa9                              
004aa007                              int32_t eax_31;
004aa007                              eax_31 = this->m_CurPlayer == 0;
004aa00d                              this->m_CurPlayer = eax_31;
004aa018                              result |= CChessLogic<CBasePiece>::ComputeCheckResult(this, eax_31);
004aa018                              
004aa022                              if (arg3 != 0)
004aa022                              {
004aa024                                  this->vtable->AttackPiece(edi, arg3);
004aa032                                  return result;
004aa022                              }
004aa022                              
004aa035                              this->vtable->MovePiece(edi);
004a9f60                          }
004a9f18                      }
004a9f18                      
004aa042                      return result;
004a9e9b                  }
004a9e7e              }
004a9e70          }
004a9e4f      }
004a9e4f      
004aa04f      return 0xffffff98;
004a9e40  }

004aa052                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004aa060  void __thiscall gmMiniGameUI::RecvNotice_JoinGameResponse(class gmMiniGameUI* this, uint32_t arg2, int32_t arg3)

004aa060  {
004aa070      if ((arg2 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] && this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] == 1))
004aa070      {
004aa073          class HashSetData<UIElement *>* edi_1 = arg3;
004aa073          
004aa080          if (edi_1 == 0xffffffff)
004aa080          {
004aa087              gmMiniGameUI::SetInfoText(((char*)this - 0x5f8), "You could not join that game.\n");
004aa08f              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = nullptr;
004aa092              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = nullptr;
004aa096              return;
004aa080          }
004aa080          
004aa09e          gmMiniGameUI::SetInfoText(((char*)this - 0x5f8), "You have joined the game, waitin…");
004aa0a3          class HashSetData<UIElement *>* ecx_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5];
004aa0a6          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = 2;
004aa0ad          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = edi_1;
004aa0b0          GameBoardGrid::Reset(ecx_1);
004aa0b5          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4] = nullptr;
004aa070      }
004aa060  }

004aa0c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004aa0d0  void __thiscall gmMiniGameUI::RecvNotice_StartGame(class gmMiniGameUI* this, uint32_t arg2, int32_t arg3)

004aa0d0  {
004aa0dd      if ((arg2 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] && this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] == 2))
004aa0dd      {
004aa0e6          if (arg3 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1])
004aa0e6          {
004aa0e8              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = 3;
004aa0fa              gmMiniGameUI::SetInfoText(((char*)this - 0x5f8), "The game has begun, it is your t…");
004aa0ff              return;
004aa0e6          }
004aa0e6          
004aa102          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = 5;
004aa114          gmMiniGameUI::SetInfoText(((char*)this - 0x5f8), "The game has begun, waiting for …");
004aa0dd      }
004aa0d0  }

004aa11c                                                                                      90 90 90 90                              ....

004aa120  uint8_t __thiscall gmMiniGameUI::TryToJoinGame(class gmMiniGameUI* this, uint32_t arg2)

004aa120  {
004aa12d      uint32_t m_idCurrentGame = this->m_idCurrentGame;
004aa135      int32_t* var_a0_2;
004aa135      void* var_94;
004aa135      void var_90;
004aa135      
004aa135      if (m_idCurrentGame != arg2)
004aa135      {
004aa188          if (m_idCurrentGame == 0)
004aa188          {
004aa1f9              this->m_idCurrentGame = arg2;
004aa1ff              this->m_state = GS_AttemptingToJoinGame;
004aa209              CM_Game::Event_Join(arg2, 0xffffffff);
004aa20e              class UIElement_Button* m_pResignButton = this->m_pResignButton;
004aa20e              
004aa219              if (m_pResignButton != 0)
004aa21b                  m_pResignButton->vtable->SetState(1);
004aa21b              
004aa22c              gmMiniGameUI::SetInfoText(this, "Attempting to join game, please …");
004aa231              int32_t eax_4;
004aa231              eax_4 = 1;
004aa23a              return 1;
004aa188          }
004aa188          
004aa18e          StringInfo::StringInfo(&var_90);
004aa19c          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You are already playing another …");
004aa1ac          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004aa1b5          int32_t* esi_4 = ((char*)var_94 - 0x14);
004aa1b5          
004aa1c8          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004aa1d0              **(uint32_t**)esi_4(1);
004aa1d0          
004aa1d6          var_a0_2 = &var_94;
004aa135      }
004aa135      else
004aa135      {
004aa13b          StringInfo::StringInfo(&var_90);
004aa149          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You are already playing this gam…");
004aa159          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004aa162          int32_t* esi_2 = ((char*)var_94 - 0x14);
004aa162          
004aa175          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004aa17d              **(uint32_t**)esi_2(1);
004aa17d          
004aa183          var_a0_2 = &var_94;
004aa135      }
004aa1d9      ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_a0_2);
004aa1e5      StringInfo::~StringInfo(&var_94);
004aa1ea      int32_t eax_3;
004aa1ea      eax_3 = 0;
004aa1f3      return 0;
004aa120  }

004aa23d                                                                                         90 90 90                               ...

004aa240  void __fastcall gmMiniGameUI::ShowMoveResult(class gmMiniGameUI* this, int32_t arg2)

004aa240  {
004aa240      class gmMiniGameUI* var_4 = this;
004aa241      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004aa248      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004aa253      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004aa259      int32_t esi = arg2;
004aa259      
004aa265      if (esi > 0)
004aa265      {
004aa271          class gmMiniGameUI** ecx = &var_4;
004aa271          
004aa275          if ((esi & 0x800) == 0)
004aa275          {
004aa28b              AC1Legacy::PStringBase<char>::set(ecx, "Move in progress.");
004aa29a              char* var_14_1;
004aa29a              
004aa29a              if ((esi & 0x400) == 0)
004aa2e4                  var_14_1 = &data_794508;
004aa29a              else
004aa29c                  var_14_1 = "  Your opponent is in Check.\n";
004aa29c              
004aa2a1              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, var_14_1);
004aa2a6              int32_t esi_1 = arg2;
004aa2aa              int32_t eax_1 = *(uint32_t*)(esi_1 + 8);
004aa2aa              
004aa2b8              if ((eax_1 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004aa2c4                  AC1Legacy::PStringBase<char>::append_n_chars(&var_4, (esi_1 + 0x14), (eax_1 - 1));
004aa2c4              
004aa2d1              if (InterlockedDecrement((esi_1 + 4)) == 0)
004aa2dd                  **(uint32_t**)esi_1(1);
004aa275          }
004aa275          else
004aa27c              AC1Legacy::PStringBase<char>::set(ecx, "You have checkmated your opponen…");
004aa265      }
004aa265      else
004aa265      {
004aa2f1          char const* const var_14_4;
004aa2f1          
004aa2f1          if ((esi + 0x6e) > 0x6b)
004aa2f1          {
004aa36a          label_4aa36a:
004aa36a              var_14_4 = "That move is invalid";
004aa373          label_4aa373:
004aa373              AC1Legacy::PStringBase<char>::set(&var_4, var_14_4);
004aa381              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, ", try again.  ");
004aa386              int32_t esi_2 = arg2;
004aa38a              int32_t eax_7 = *(uint32_t*)(esi_2 + 8);
004aa38a              
004aa398              if ((eax_7 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004aa3a4                  AC1Legacy::PStringBase<char>::append_n_chars(&var_4, (esi_2 + 0x14), (eax_7 - 1));
004aa3a4              
004aa3b1              if (InterlockedDecrement((esi_2 + 4)) == 0)
004aa3b9                  **(uint32_t**)esi_2(1);
004aa3b9              
004aa3c4              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, "It is your turn to move.\n");
004aa3c9              int32_t esi_3 = arg2;
004aa3cd              int32_t eax_11 = *(uint32_t*)(esi_3 + 8);
004aa3cd              
004aa3db              if ((eax_11 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004aa3e7                  AC1Legacy::PStringBase<char>::append_n_chars(&var_4, (esi_3 + 0x14), (eax_11 - 1));
004aa3e7              
004aa3f4              if (InterlockedDecrement((esi_3 + 4)) == 0)
004aa3fc                  **(uint32_t**)esi_3(1);
004aa2f1          }
004aa2f1          else
004aa2f1              switch (esi)
004aa2f1              {
004aa363                  case 0xffffff92:
004aa363                  {
004aa363                      var_14_4 = "You cannot castle after moving t…";
004aa368                      goto label_4aa373;
004aa363                  }
004aa35c                  case 0xffffff93:
004aa35c                  {
004aa35c                      var_14_4 = "You cannot castle through check";
004aa361                      goto label_4aa373;
004aa35c                  }
004aa355                  case 0xffffff94:
004aa355                  {
004aa355                      var_14_4 = "You cannot castle out of check";
004aa35a                      goto label_4aa373;
004aa355                  }
004aa34e                  case 0xffffff95:
004aa34e                  {
004aa34e                      var_14_4 = "You can only move through empty …";
004aa353                      goto label_4aa373;
004aa34e                  }
004aa347                  case 0xffffff96:
004aa347                  {
004aa347                      var_14_4 = "That move would put you in check";
004aa34c                      goto label_4aa373;
004aa347                  }
004aa340                  case 0xffffff97:
004aa340                  {
004aa340                      var_14_4 = "You cannot attack your own piece…";
004aa345                      goto label_4aa373;
004aa340                  }
004aa339                  case 0xffffff98:
004aa339                  {
004aa339                      var_14_4 = "You cannot move off the board";
004aa33e                      goto label_4aa373;
004aa339                  }
004aa332                  case 0xffffff99:
004aa332                  {
004aa332                      var_14_4 = "The selected piece is not yours";
004aa337                      goto label_4aa373;
004aa332                  }
004aa32b                  case 0xffffff9a:
004aa32b                  {
004aa32b                      var_14_4 = "You tried to move an empty squar…";
004aa330                      goto label_4aa373;
004aa32b                  }
004aa324                  case 0xffffff9b:
004aa324                  {
004aa324                      var_14_4 = "The selected piece cannot move t…";
004aa329                      goto label_4aa373;
004aa324                  }
004aa31d                  case 0xffffff9c:
004aa31d                  {
004aa31d                      var_14_4 = "The selected piece cannot move t…";
004aa322                      goto label_4aa373;
004aa31d                  }
004aa2fa                  case 0xffffff9d:
004aa2fa                  case 0xffffff9e:
004aa2fa                  case 0xffffff9f:
004aa2fa                  case 0xffffffa0:
004aa2fa                  case 0xffffffa1:
004aa2fa                  case 0xffffffa2:
004aa2fa                  case 0xffffffa3:
004aa2fa                  case 0xffffffa4:
004aa2fa                  case 0xffffffa5:
004aa2fa                  case 0xffffffa6:
004aa2fa                  case 0xffffffa7:
004aa2fa                  case 0xffffffa8:
004aa2fa                  case 0xffffffa9:
004aa2fa                  case 0xffffffaa:
004aa2fa                  case 0xffffffab:
004aa2fa                  case 0xffffffac:
004aa2fa                  case 0xffffffad:
004aa2fa                  case 0xffffffae:
004aa2fa                  case 0xffffffaf:
004aa2fa                  case 0xffffffb0:
004aa2fa                  case 0xffffffb1:
004aa2fa                  case 0xffffffb2:
004aa2fa                  case 0xffffffb3:
004aa2fa                  case 0xffffffb4:
004aa2fa                  case 0xffffffb5:
004aa2fa                  case 0xffffffb6:
004aa2fa                  case 0xffffffb7:
004aa2fa                  case 0xffffffb8:
004aa2fa                  case 0xffffffb9:
004aa2fa                  case 0xffffffba:
004aa2fa                  case 0xffffffbb:
004aa2fa                  case 0xffffffbc:
004aa2fa                  case 0xffffffbd:
004aa2fa                  case 0xffffffbe:
004aa2fa                  case 0xffffffbf:
004aa2fa                  case 0xffffffc0:
004aa2fa                  case 0xffffffc1:
004aa2fa                  case 0xffffffc2:
004aa2fa                  case 0xffffffc3:
004aa2fa                  case 0xffffffc4:
004aa2fa                  case 0xffffffc5:
004aa2fa                  case 0xffffffc6:
004aa2fa                  case 0xffffffc7:
004aa2fa                  case 0xffffffc8:
004aa2fa                  case 0xffffffc9:
004aa2fa                  case 0xffffffca:
004aa2fa                  case 0xffffffcb:
004aa2fa                  case 0xffffffcc:
004aa2fa                  case 0xffffffcd:
004aa2fa                  case 0xffffffce:
004aa2fa                  case 0xffffffcf:
004aa2fa                  case 0xffffffd0:
004aa2fa                  case 0xffffffd1:
004aa2fa                  case 0xffffffd2:
004aa2fa                  case 0xffffffd3:
004aa2fa                  case 0xffffffd4:
004aa2fa                  case 0xffffffd5:
004aa2fa                  case 0xffffffd6:
004aa2fa                  case 0xffffffd7:
004aa2fa                  case 0xffffffd8:
004aa2fa                  case 0xffffffd9:
004aa2fa                  case 0xffffffda:
004aa2fa                  case 0xffffffdb:
004aa2fa                  case 0xffffffdc:
004aa2fa                  case 0xffffffdd:
004aa2fa                  case 0xffffffde:
004aa2fa                  case 0xffffffdf:
004aa2fa                  case 0xffffffe0:
004aa2fa                  case 0xffffffe1:
004aa2fa                  case 0xffffffe2:
004aa2fa                  case 0xffffffe3:
004aa2fa                  case 0xffffffe4:
004aa2fa                  case 0xffffffe5:
004aa2fa                  case 0xffffffe6:
004aa2fa                  case 0xffffffe7:
004aa2fa                  case 0xffffffe8:
004aa2fa                  case 0xffffffe9:
004aa2fa                  case 0xffffffea:
004aa2fa                  case 0xffffffeb:
004aa2fa                  case 0xffffffec:
004aa2fa                  case 0xffffffed:
004aa2fa                  case 0xffffffee:
004aa2fa                  case 0xffffffef:
004aa2fa                  case 0xfffffff0:
004aa2fa                  case 0xfffffff1:
004aa2fa                  case 0xfffffff2:
004aa2fa                  case 0xfffffff3:
004aa2fa                  case 0xfffffff4:
004aa2fa                  case 0xfffffff5:
004aa2fa                  case 0xfffffff6:
004aa2fa                  case 0xfffffff7:
004aa2fa                  case 0xfffffff8:
004aa2fa                  case 0xfffffff9:
004aa2fa                  case 0xfffffffa:
004aa2fa                  case 0xfffffffb:
004aa2fa                  case 0xfffffffc:
004aa2fa                  {
004aa2fa                      goto label_4aa36a;
004aa2fa                  }
004aa308                  case 0xfffffffd:
004aa308                  {
004aa308                      gmMiniGameUI::SetInfoText(this, "Its not your turn, please wait f…");
004aa311                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
004aa31a                      return;
004aa308                      break;
004aa308                  }
004aa2f1              }
004aa265      }
004aa265      
004aa3fe      class gmMiniGameUI* esi_4 = var_4;
004aa408      gmMiniGameUI::SetInfoText(this, &esi_4->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2]);
004aa408      
004aa419      if ((InterlockedDecrement(&esi_4->m_hashElementsRegisteredWith) == 0 && esi_4 != 0))
004aa41b          esi_4->vtable->__vecDelDtor(1);
004aa240  }

004aa42a                                8b ff                                                                        ..
004aa42c  uint32_t jump_table_4aa42c[0xd] = 
004aa42c  {
004aa42c      [0x0] =  0x004aa363
004aa430      [0x1] =  0x004aa35c
004aa434      [0x2] =  0x004aa355
004aa438      [0x3] =  0x004aa34e
004aa43c      [0x4] =  0x004aa347
004aa440      [0x5] =  0x004aa340
004aa444      [0x6] =  0x004aa339
004aa448      [0x7] =  0x004aa332
004aa44c      [0x8] =  0x004aa32b
004aa450      [0x9] =  0x004aa324
004aa454      [0xa] =  0x004aa31d
004aa458      [0xb] =  0x004aa301
004aa45c      [0xc] =  0x004aa36a
004aa460  }
004aa460  uint8_t lookup_table_4aa460[0x6c] = 
004aa460  {
004aa460      [0x00] =  0x00
004aa461      [0x01] =  0x01
004aa462      [0x02] =  0x02
004aa463      [0x03] =  0x03
004aa464      [0x04] =  0x04
004aa465      [0x05] =  0x05
004aa466      [0x06] =  0x06
004aa467      [0x07] =  0x07
004aa468      [0x08] =  0x08
004aa469      [0x09] =  0x09
004aa46a      [0x0a] =  0x0a
004aa46b      [0x0b] =  0x0c
004aa46c      [0x0c] =  0x0c
004aa46d      [0x0d] =  0x0c
004aa46e      [0x0e] =  0x0c
004aa46f      [0x0f] =  0x0c
004aa470      [0x10] =  0x0c
004aa471      [0x11] =  0x0c
004aa472      [0x12] =  0x0c
004aa473      [0x13] =  0x0c
004aa474      [0x14] =  0x0c
004aa475      [0x15] =  0x0c
004aa476      [0x16] =  0x0c
004aa477      [0x17] =  0x0c
004aa478      [0x18] =  0x0c
004aa479      [0x19] =  0x0c
004aa47a      [0x1a] =  0x0c
004aa47b      [0x1b] =  0x0c
004aa47c      [0x1c] =  0x0c
004aa47d      [0x1d] =  0x0c
004aa47e      [0x1e] =  0x0c
004aa47f      [0x1f] =  0x0c
004aa480      [0x20] =  0x0c
004aa481      [0x21] =  0x0c
004aa482      [0x22] =  0x0c
004aa483      [0x23] =  0x0c
004aa484      [0x24] =  0x0c
004aa485      [0x25] =  0x0c
004aa486      [0x26] =  0x0c
004aa487      [0x27] =  0x0c
004aa488      [0x28] =  0x0c
004aa489      [0x29] =  0x0c
004aa48a      [0x2a] =  0x0c
004aa48b      [0x2b] =  0x0c
004aa48c      [0x2c] =  0x0c
004aa48d      [0x2d] =  0x0c
004aa48e      [0x2e] =  0x0c
004aa48f      [0x2f] =  0x0c
004aa490      [0x30] =  0x0c
004aa491      [0x31] =  0x0c
004aa492      [0x32] =  0x0c
004aa493      [0x33] =  0x0c
004aa494      [0x34] =  0x0c
004aa495      [0x35] =  0x0c
004aa496      [0x36] =  0x0c
004aa497      [0x37] =  0x0c
004aa498      [0x38] =  0x0c
004aa499      [0x39] =  0x0c
004aa49a      [0x3a] =  0x0c
004aa49b      [0x3b] =  0x0c
004aa49c      [0x3c] =  0x0c
004aa49d      [0x3d] =  0x0c
004aa49e      [0x3e] =  0x0c
004aa49f      [0x3f] =  0x0c
004aa4a0      [0x40] =  0x0c
004aa4a1      [0x41] =  0x0c
004aa4a2      [0x42] =  0x0c
004aa4a3      [0x43] =  0x0c
004aa4a4      [0x44] =  0x0c
004aa4a5      [0x45] =  0x0c
004aa4a6      [0x46] =  0x0c
004aa4a7      [0x47] =  0x0c
004aa4a8      [0x48] =  0x0c
004aa4a9      [0x49] =  0x0c
004aa4aa      [0x4a] =  0x0c
004aa4ab      [0x4b] =  0x0c
004aa4ac      [0x4c] =  0x0c
004aa4ad      [0x4d] =  0x0c
004aa4ae      [0x4e] =  0x0c
004aa4af      [0x4f] =  0x0c
004aa4b0      [0x50] =  0x0c
004aa4b1      [0x51] =  0x0c
004aa4b2      [0x52] =  0x0c
004aa4b3      [0x53] =  0x0c
004aa4b4      [0x54] =  0x0c
004aa4b5      [0x55] =  0x0c
004aa4b6      [0x56] =  0x0c
004aa4b7      [0x57] =  0x0c
004aa4b8      [0x58] =  0x0c
004aa4b9      [0x59] =  0x0c
004aa4ba      [0x5a] =  0x0c
004aa4bb      [0x5b] =  0x0c
004aa4bc      [0x5c] =  0x0c
004aa4bd      [0x5d] =  0x0c
004aa4be      [0x5e] =  0x0c
004aa4bf      [0x5f] =  0x0c
004aa4c0      [0x60] =  0x0c
004aa4c1      [0x61] =  0x0c
004aa4c2      [0x62] =  0x0c
004aa4c3      [0x63] =  0x0c
004aa4c4      [0x64] =  0x0c
004aa4c5      [0x65] =  0x0c
004aa4c6      [0x66] =  0x0c
004aa4c7      [0x67] =  0x0c
004aa4c8      [0x68] =  0x0c
004aa4c9      [0x69] =  0x0c
004aa4ca      [0x6a] =  0x0c
004aa4cb      [0x6b] =  0x0b
004aa4cc  }

004aa4cc                                      90 90 90 90                                                              ....

004aa4d0  void __thiscall gmMiniGameUI::ShowOpponentMoveResult(class gmMiniGameUI* this, int32_t arg2)

004aa4d0  {
004aa4d0      class gmMiniGameUI* this_1 = this;
004aa4d1      int32_t* ebp;
004aa4d1      int32_t* var_8 = ebp;
004aa4d2      int32_t esi;
004aa4d2      int32_t var_c = esi;
004aa4d3      int32_t esi_1 = arg2;
004aa4d3      
004aa4df      if ((esi_1 & 0x800) != 0)
004aa4df      {
004aa4e6          gmMiniGameUI::SetInfoText(this, "You have been checkmated!\n");
004aa4ee          return;
004aa4df      }
004aa4df      
004aa4f1      int32_t edi;
004aa4f1      int32_t var_10 = edi;
004aa4f2      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004aa4fc      arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004aa500      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004aa500      
004aa50c      if ((esi_1 & 0x400) != 0)
004aa50c      {
004aa517          AC1Legacy::PStringBase<char>::set(&__return_addr, "You are in check!  ");
004aa51c          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = __return_addr;
004aa50c      }
004aa50c      
004aa529      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, "It is your turn to move.\n");
004aa52e      int32_t* esi_3 = var_8;
004aa532      int32_t eax_1 = esi_3[2];
004aa532      
004aa540      if ((eax_1 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004aa540      {
004aa54c          AC1Legacy::PStringBase<char>::append_n_chars(&__return_addr, &esi_3[5], (eax_1 - 1));
004aa551          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = __return_addr;
004aa540      }
004aa540      
004aa555      int32_t ebx;
004aa555      int32_t var_18_2 = ebx;
004aa555      
004aa564      if (InterlockedDecrement(&esi_3[1]) == 0)
004aa56c          **(uint32_t**)esi_3(1);
004aa56c      
004aa574      gmMiniGameUI::SetInfoText(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data);
004aa574      
004aa586      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
004aa588          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
004aa4d0  }

004aa597                                                                       90 90 90 90 90 90 90 90 90                         .........

004aa5a0  void __thiscall gmMiniGameUI::GotoDefaultState(class gmMiniGameUI* this, char const* arg2)

004aa5a0  {
004aa5af      this->m_idCurrentGame = 0;
004aa5b5      this->m_state = GS_NotPlaying;
004aa5bb      this->m_iTeam = 0xffffffff;
004aa5c1      this->m_fStalemate = 0;
004aa5c7      gmMiniGameUI::SetInfoText(this, arg2);
004aa5cc      class UIElement_Button* m_pStalemateButton = this->m_pStalemateButton;
004aa5cc      
004aa5d4      if (m_pStalemateButton != 0)
004aa5d6          m_pStalemateButton->vtable->SetState(1);
004aa5d6      
004aa5e0      class GameBoardGrid* m_pGameBoard = this->m_pGameBoard;
004aa5e6      m_pGameBoard->m_CurPlayer = 0;
004aa5ec      m_pGameBoard->m_bLastMoveWasCheck = 0;
004aa5f2      m_pGameBoard->m_EnPassantAttackSite.x = 0xffffffff;
004aa5f8      m_pGameBoard->m_EnPassantAttackSite.y = 0xffffffff;
004aa5fe      m_pGameBoard->m_EnPassantVictimPos.x = 0xffffffff;
004aa604      m_pGameBoard->m_EnPassantVictimPos.y = 0xffffffff;
004aa60a      m_pGameBoard->m_coordSelected.x = 0xffffffff;
004aa610      m_pGameBoard->m_coordSelected.y = 0xffffffff;
004aa5a0  }

004aa61c                                                                                      90 90 90 90                              ....

004aa620  void __thiscall GameBoardGrid::HandleMousePresses(class GameBoardGrid* this, struct UIElementMessageInfo const* arg2)

004aa620  {
004aa62d      int32_t esi = 0xffffffff;
004aa630      int32_t edi = 0xffffffff;
004aa630      
004aa63a      if (arg2->idElement == 0x10000174)
004aa63a      {
004aa63c          class UIElement_ListBox* m_pieceListBox = this->m_pieceListBox;
004aa63c          
004aa644          if (m_pieceListBox != 0)
004aa644          {
004aa646              class UIElement* eax_1 = UIElement_ListBox::GetItemUnderMouse(m_pieceListBox);
004aa646              
004aa64d              if (eax_1 != 0)
004aa64d              {
004aa656                  int32_t eax_2 = UIElement_ListBox::WhatNum(this->m_pieceListBox, eax_1);
004aa65d                  esi = (eax_2 & 0x80000007);
004aa65d                  
004aa663                  if (esi < 0)
004aa669                      esi = (((esi - 1) | 0xfffffff8) + 1);
004aa669                  
004aa66a                  int32_t eax_3;
004aa66a                  int32_t edx_1;
004aa66a                  edx_1 = HIGHD(((int64_t)eax_2));
004aa66a                  eax_3 = LOWD(((int64_t)eax_2));
004aa672                  edi = ((eax_3 + (edx_1 & 7)) >> 3);
004aa64d              }
004aa644          }
004aa63a      }
004aa63a      
004aa69b      if ((arg2->dwParam1 == 7 && (esi >= 0 && (esi <= 7 && (edi >= 0 && edi <= 7)))))
004aa69b      {
004aa6a1          class gmMiniGameUI* m_gameUI = this->m_gameUI;
004aa6a1          
004aa6ae          if (m_gameUI->m_state == GS_PlayingMyTurn)
004aa6ae          {
004aa6b4              int32_t m_iTeam = m_gameUI->m_iTeam;
004aa6b4              
004aa6c0              if (m_iTeam != 0)
004aa6d4                  esi = (7 - esi);
004aa6c0              else
004aa6c9                  edi = (7 - edi);
004aa6c9              
004aa6da              int32_t var_8 = esi;
004aa6da              
004aa6e9              if (TCoord::IsValid(&var_8) != 0)
004aa6e9              {
004aa6fe                  if (TCoord::IsValid(&this->m_coordSelected.x) != 0)
004aa6fe                  {
004aa712                      if (TCoord::operator!=(&this->m_coordSelected, &var_8) == 0)
004aa712                      {
004aa6ef                          this->m_coordSelected.x = 0xffffffff;
004aa6ef                          this->m_coordSelected.y = 0xffffffff;
004aa7c5                          GameBoardGrid::Draw(this);
004aa7d1                          return;
004aa712                      }
004aa712                      
004aa71a                      GameBoardGrid::PrepareNewMove(this);
004aa727                      enum ChessMoveResult eax_9;
004aa727                      int32_t edx_3;
004aa727                      eax_9 = CChessLogic<CBasePiece>::Move(this, &this->m_coordSelected.x, &var_8);
004aa72e                      arg2 = eax_9;
004aa72e                      
004aa732                      if (eax_9 <= NoMoveResult)
004aa732                      {
004aa6ef                          this->m_coordSelected.x = 0xffffffff;
004aa6ef                          this->m_coordSelected.y = 0xffffffff;
004aa79f                          enum ChessMoveResult var_1c_7 = eax_9;
004aa7a0                          gmMiniGameUI::ShowMoveResult(this->m_gameUI, edx_3);
004aa7a7                          GameBoardGrid::Draw(this);
004aa7b3                          return;
004aa732                      }
004aa732                      
004aa737                      if ((*(uint8_t*)((char*)eax_9)[1] & 0x10) != 0)
004aa743                          arg2 = GameBoardGrid::DoPromotion(this, esi, edi, eax_9);
004aa743                      
004aa759                      int32_t edx_5 = gmMiniGameUI::DoMove(this->m_gameUI, this->m_coordSelected.x, this->m_coordSelected.y, esi, edi);
004aa6ef                      this->m_coordSelected.x = var_8;
004aa6ef                      this->m_coordSelected.y = edi;
004aa775                      struct UIElementMessageInfo* var_1c_6 = arg2;
004aa776                      gmMiniGameUI::ShowMoveResult(this->m_gameUI, edx_5);
004aa77d                      GameBoardGrid::Draw(this);
004aa789                      return;
004aa6fe                  }
004aa6fe                  
004aa7d7                  void* eax_13 = this->m_Board[0][(edi + (esi << 3))];
004aa7d7                  
004aa7e6                  if ((eax_13 != 0 && *(uint32_t*)((char*)eax_13 + 0xc) == m_iTeam))
004aa7e6                  {
004aa6ef                      this->m_coordSelected.x = var_8;
004aa6ef                      this->m_coordSelected.y = edi;
004aa7f7                      GameBoardGrid::Draw(this);
004aa7e6                  }
004aa6e9              }
004aa6ae          }
004aa69b      }
004aa620  }

004aa806                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004aa810  void __thiscall GameBoardGrid::OpponentMove(class GameBoardGrid* this, class GameMoveData const* arg2)

004aa810  {
004aa81d      int32_t m_xTo = arg2->m_xTo;
004aa822      int32_t ecx = *(uint32_t*)((char*)arg2->__inner2 + 4);
004aa825      int32_t var_8 = *(uint32_t*)((char*)arg2->__inner2 + 0);
004aa829      int32_t m_yTo = arg2->m_yTo;
004aa82c      int32_t var_4 = ecx;
004aa832      int32_t m_xTo_1 = m_xTo;
004aa836      int32_t m_yTo_1 = m_yTo;
004aa83a      GameBoardGrid::PrepareNewMove(this);
004aa852      enum ChessMoveResult ebx = CChessLogic<CBasePiece>::Move(this, &var_8, &m_xTo_1);
004aa854      GameBoardGrid::CommitMoves(this);
004aa854      
004aa85b      if (ebx > NoMoveResult)
004aa85b      {
004aa860          if ((*(uint8_t*)((char*)ebx)[1] & 0x10) != 0)
004aa872              ebx = GameBoardGrid::DoPromotion(this, arg2->m_xTo, arg2->m_yTo, ebx);
004aa872          
004aa87b          gmMiniGameUI::ShowOpponentMoveResult(this->m_gameUI, ebx);
004aa882          GameBoardGrid::Draw(this);
004aa85b      }
004aa810  }


004aa890  void __thiscall gmMiniGameUI::RecvNotice_BeginGame(class gmMiniGameUI* this, uint32_t arg2)

004aa890  {
004aa8a1      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004aa8ab      gmMiniGameUI::TryToJoinGame(((char*)this - 0x5f8), arg2);
004aa890  }

004aa8b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004aa8c0  void __thiscall gmMiniGameUI::RecvNotice_MoveResponse(class gmMiniGameUI* this, uint32_t arg2, int32_t arg3)

004aa8c0  {
004aa8d0      if ((arg2 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] && this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] == 4))
004aa8d0      {
004aa8d2          class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5];
004aa8d2          
004aa8dc          if (arg3 > 0)
004aa8dc          {
004aa8de              GameBoardGrid::CommitMoves(ecx);
004aa8ee              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = 5;
004aa8f5              gmMiniGameUI::SetInfoText(((char*)this - 0x5f8), "Waiting for your opponent to mov…");
004aa8fc              return;
004aa8dc          }
004aa8dc          
004aa8ff          int32_t edx_1 = GameBoardGrid::UndoMoves(ecx);
004aa904          int32_t var_c_1 = arg3;
004aa90b          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = 3;
004aa912          gmMiniGameUI::ShowMoveResult(((char*)this - 0x5f8), edx_1);
004aa8d0      }
004aa8c0  }

004aa91c                                                                                      90 90 90 90                              ....

004aa920  void __thiscall gmMiniGameUI::RecvNotice_OpponentTurn(class gmMiniGameUI* this, uint32_t arg2, int32_t arg3, class GameMoveData const* arg4)

004aa920  {
004aa930      if ((arg2 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] && this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] == 5))
004aa930      {
004aa93a          GameBoardGrid::OpponentMove(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5], arg4);
004aa93f          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = 3;
004aa930      }
004aa920  }

004aa94a                                90 90 90 90 90 90                                                            ......

004aa950  void __thiscall gmMiniGameUI::RecvNotice_GameOver(class gmMiniGameUI* this, uint32_t arg2, int32_t arg3)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004aa950  {
004aa950      uint32_t eax_7 = arg2;
004aa954      int32_t ebp;
004aa954      int32_t var_4 = ebp;
004aa954      int32_t* esp = &var_4;
004aa954      
004aa95a      if (eax_7 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2])
004aa95a      {
004aa960          int32_t edi;
004aa960          int32_t var_8_1 = edi;
004aa961          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004aa96b          arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004aa96f          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004aa975          uint32_t eax = arg2;
004aa975          
004aa97c          if (eax != 0xfffffffe)
004aa97c          {
004aa988              char const* const var_10_1;
004aa988              
004aa988              if (eax == 0xffffffff)
004aa98a                  var_10_1 = "The game has ended in a stalemat…";
004aa988              else if (eax != this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1])
004aa99d                  var_10_1 = "You have been defeated!  ";
004aa994              else
004aa996                  var_10_1 = "You are victorious!  ";
004aa996              
004aa9a6              AC1Legacy::PStringBase<char>::set(&__return_addr, var_10_1);
004aa9ab              AC1Legacy::PStringBase<char>::s_NullBuffer_1 = __return_addr;
004aa97c          }
004aa97c          else
004aa97e              CM_Game::SendNotice_EndGame();
004aa97e          
004aa9af          int32_t ebx;
004aa9af          int32_t var_10_2 = ebx;
004aa9b0          int32_t esi;
004aa9b0          int32_t var_14_1 = esi;
004aa9ba          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, "To join a game, select and use t…");
004aa9bf          uint32_t esi_1 = arg2;
004aa9c3          int32_t eax_1 = *(uint32_t*)(esi_1 + 8);
004aa9c3          
004aa9d1          if ((eax_1 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004aa9d1          {
004aa9dd              AC1Legacy::PStringBase<char>::append_n_chars(&__return_addr, (esi_1 + 0x14), (eax_1 - 1));
004aa9e2              AC1Legacy::PStringBase<char>::s_NullBuffer_1 = __return_addr;
004aa9d1          }
004aa9d1          
004aa9f4          if (InterlockedDecrement((esi_1 + 4)) == 0)
004aa9fc              **(uint32_t**)esi_1(1);
004aa9fc          
004aaa08          gmMiniGameUI::GotoDefaultState(((char*)this - 0x5f8), &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data);
004aaa08          
004aaa1b          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
004aaa1b          {
004aaa1d              struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable;
004aaa1f              __return_addr = 1;
004aaa23              vtable->__vecDelDtor();
004aaa1b          }
004aaa1b          
004aaa25          esp = &arg3;
004aa95a      }
004aa95a      
004aaa26      *(uint32_t*)esp;
004aa950  }

004aaa2a                                90 90 90 90 90 90                                                            ......

004aaa30  enum UIElementMessageListenResult __thiscall gmMiniGameUI::ListenToElementMessage(class gmMiniGameUI* this, struct UIElementMessageInfo const* arg2)

004aaa30  {
004aaa3f      uint32_t idMessage = arg2->idMessage;
004aaa3f      
004aaa47      if (idMessage == 1)
004aaa47      {
004aaa4d          uint32_t idElement = arg2->idElement;
004aaa54          void var_120;
004aaa54          
004aaa54          if (idElement != 0x10000175)
004aaa54          {
004aaa5b              void* var_140_3;
004aaa5b              
004aaa5b              if (idElement == 0x10000176)
004aaa5b              {
004aaadc                  if (this->m_idCurrentGame != 0)
004aaadc                  {
004aaade                      CM_Game::Event_MovePass();
004aaaf3                      return UIElement::ListenToElementMessage(this, arg2);
004aaadc                  }
004aaadc                  
004aaafa                  StringInfo::StringInfo(&var_120);
004aab08                  void var_128;
004aab08                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_128, u"You are not currently playing a …");
004aab18                  StringInfo::SetLiteralValue(&var_120, &var_128, 1);
004aab21                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_128);
004aab2a                  var_140_3 = &var_120;
004aab2d              label_4aab2d:
004aab2d                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_140_3);
004aab39                  StringInfo::~StringInfo(&var_120);
004aab4e                  return UIElement::ListenToElementMessage(this, arg2);
004aaa5b              }
004aaa5b              
004aaa5e              if (idElement == 0x10000177)
004aaa5e              {
004aaa6c                  if (this->m_idCurrentGame != 0)
004aaa6c                  {
004aaa78                      int32_t eax_4;
004aaa78                      eax_4 = this->m_fStalemate == 0;
004aaa7c                      this->m_fStalemate = eax_4;
004aaa82                      CM_Game::Event_Stalemate(eax_4);
004aaa9a                      return UIElement::ListenToElementMessage(this, arg2);
004aaa6c                  }
004aaa6c                  
004aaaa1                  StringInfo::StringInfo(&var_120);
004aaaaf                  void var_124;
004aaaaf                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_124, u"You are not currently playing a …");
004aaabf                  StringInfo::SetLiteralValue(&var_120, &var_124, 1);
004aaac8                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_124);
004aaad1                  var_140_3 = &var_120;
004aaa6c                  goto label_4aab2d;
004aaa5e              }
004aaa54          }
004aaa54          else if (this->m_uiResignDialogContext == 0)
004aab59          {
004aab66              void var_90;
004aab66              StringInfo::StringInfo(&var_90);
004aab74              void var_12c;
004aab74              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_12c, u"If a game is in progress, resign…");
004aab87              StringInfo::SetLiteralValue(&var_90, &var_12c, 1);
004aab90              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_12c);
004aab99              PropertyCollection::PropertyCollection(&var_120);
004aaba7              int32_t var_134 = 0;
004aabaf              int32_t* var_130_1 = nullptr;
004aabb7              BaseProperty::SetPropertyName(&var_134, 0x8e);
004aabb7              
004aabc2              if (var_130_1 != 0)
004aabc2              {
004aabc8                  BaseProperty::CheckCopyOnWrite(&var_134);
004aabd5                  *(uint32_t*)(*(uint32_t*)var_130_1 + 0xac)(1);
004aabc2              }
004aabc2              
004aabe4              PropertyCollection::AddProperty(&var_120, &var_134);
004aabf2              BaseProperty::SetPropertyName(&var_134, 0xc3);
004aabf2              
004aabfd              if (var_130_1 != 0)
004aabfd              {
004aac03                  BaseProperty::CheckCopyOnWrite(&var_134);
004aac10                  *(uint32_t*)(*(uint32_t*)var_130_1 + 0xac)(1);
004aabfd              }
004aabfd              
004aac1f              PropertyCollection::AddProperty(&var_120, &var_134);
004aac2d              BaseProperty::SetPropertyName(&var_134, 0xc5);
004aac2d              
004aac38              if (var_130_1 != 0)
004aac38              {
004aac3e                  BaseProperty::CheckCopyOnWrite(&var_134);
004aac51                  *(uint32_t*)(*(uint32_t*)var_130_1 + 0xc4)(&var_90);
004aac38              }
004aac38              
004aac60              class PropertyCollection* eax_13;
004aac60              void (* edx_5)(class PropertyCollection const*);
004aac60              eax_13 = PropertyCollection::AddProperty(&var_120, &var_134);
004aac69              void (* var_140_10)(class PropertyCollection const* arg1) = gmMiniGameUI::MiniGameQuitDialogCallback;
004aac6e              void* var_144_3 = &var_120;
004aac7b              this->m_uiResignDialogContext = DialogFactory::MakeCallbackDialogInCurrentUI(eax_13, edx_5);
004aac81              BaseProperty::~BaseProperty(&var_134);
004aac8a              PropertyCollection::~PropertyCollection(&var_120);
004aab39              StringInfo::~StringInfo(&var_90);
004aab59          }
004aaa47      }
004aaa47      else if (idMessage == 0x1c)
004aac9e      {
004aaca0          class GameBoardGrid* m_pGameBoard = this->m_pGameBoard;
004aaca0          
004aaca8          if (m_pGameBoard != 0)
004aacab              GameBoardGrid::HandleMousePresses(m_pGameBoard, arg2);
004aac9e      }
004aac9e      
004aacc0      return UIElement::ListenToElementMessage(this, arg2);
004aaa30  }

004aacc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004aacd0  void __thiscall gmMiniGameUI::RecvNotice_TryToQuitGame(class gmMiniGameUI* this, uint8_t arg2)

004aacd0  {
004aacd6      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = nullptr;
004aacd6      
004aacdd      if (arg2 != 0)
004aacdd      {
004aace6          CM_Game::Event_Quit();
004aace6          
004aacf3          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] != 0)
004aacf3          {
004aacfc              gmMiniGameUI::GotoDefaultState(((char*)this - 0x5f8), "To join a game, select and use t…");
004aad01              CM_Game::SendNotice_EndGame();
004aacf3          }
004aacdd      }
004aacd0  }

004aad0a                                90 90 90 90 90 90                                                            ......

004aad10  void __thiscall gmLinkStatusUI::gmLinkStatusUI(class gmLinkStatusUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004aad10  {
004aad1f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004aad24      this->vtable = &gmUrgentAssistanceUI::`vftable';
004aad35      this->m_pMainText = nullptr;
004aad3b      this->m_nextUpdateTime = 0f;
004aad41      this->m_lastPingRequestTime = 0f;
004aad47      this->m_pingRoundTripTime = 0f;
004aad4d      this->m_bPleaseRequestPing = 0;
004aad53      this->vtable = 0x7aeb08;
004aad59      this->vtable = &gmLinkStatusUI::`vftable';
004aad63      *(uint32_t*)((char*)this->m_nextUpdateTime)[4] = 0xbff00000;
004aad69      *(uint32_t*)((char*)this->m_lastPingRequestTime)[4] = 0xbff00000;
004aad6f      *(uint32_t*)((char*)this->m_pingRoundTripTime)[4] = 0xbff00000;
004aad10  }

004aad7b                                                                                   90 90 90 90 90                             .....

004aad80  class UIElement* __thiscall gmLinkStatusUI::DynamicCast(class gmLinkStatusUI* this, uint32_t arg2) __pure

004aad80  {
004aad8c      if (arg2 == 0x1000001d)
004aad99          return this;
004aad99      
004aad93      int32_t edx_1;
004aad93      edx_1 = arg2 != 3;
004aad97      return (this & (edx_1 - 1));
004aad80  }

004aad9c                                                                                      90 90 90 90                              ....

004aada0  uint32_t gmLinkStatusUI::GetUIElementType(class gmLinkStatusUI const* this @ ecx) __pure

004aada0  {
004aada5      return 0x1000001d;
004aada0  }

004aada6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004aadb0  void __fastcall gmLinkStatusUI::PostInit(class gmLinkStatusUI* this)

004aadb0  {
004aadb3      UIElement::PostInit(this);
004aadc4      this->m_pMainText = UIElement::GetChildRecursive(this, 0x10000169);
004aadca      GlobalEventHandler::GetGlobalEventHandler()->vtable->RegisterNoticeHandler(0x4dd21d, &this->vtable);
004aadb0  }

004aade4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004aadf0  class UIElement* gmLinkStatusUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004aadf0  {
004aadf5      void* eax = operator new(0x620);
004aadf5      
004aadff      if (eax == 0)
004aae15          return 0;
004aae15      
004aae12      return gmLinkStatusUI::gmLinkStatusUI(eax, arg1, arg2);
004aadf0  }

004aae16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004aae20  void* __thiscall gmLinkStatusUI::`scalar deleting destructor'(class gmLinkStatusUI* this, uint32_t arg2)

004aae20  {
004aae2a      this->vtable = 0x7aeb08;
004aae24      this->vtable = &gmLinkStatusUI::`vftable';
004aae36      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004aae36      
004aae3d      if (eax != 0)
004aae3f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004aae3f      
004aae47      this->m_pMainText = nullptr;
004aae24      this->vtable = &gmUrgentAssistanceUI::`vftable';
004aae59      NoticeHandler::~NoticeHandler(&this->vtable);
004aae60      UIElement_Field::~UIElement_Field(this);
004aae60      
004aae6a      if ((arg2 & 1) != 0)
004aae6d          operator delete(this);
004aae6d      
004aae79      return this;
004aae20  }

004aae7c                                                                                      90 90 90 90                              ....

004aae80  void gmLinkStatusUI::Register()

004aae80  {
004aae8a      UIElement::RegisterElementClass(0x1000001d, gmLinkStatusUI::Create);
004aae80  }

004aae93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004aaea0  void __fastcall gmLinkStatusUI::Update(class gmLinkStatusUI* this)

004aaea0  {
004aaea6      int32_t __saved_esi_1;
004aaea6      int32_t __saved_esi = __saved_esi_1;
004aaea9      int32_t __saved_edi_1;
004aaea9      int32_t __saved_edi = __saved_edi_1;
004aaeae      void var_1b0;
004aaeae      StringInfo::StringInfo(&var_1b0);
004aaeb8      class PStringBase<unsigned short>* var_1c0 = 0x10000001;
004aaebd      int32_t var_1c4 = 0;
004aaec2      StringInfo::SetStringIDandTableEnum(&var_1b0);
004aaec7      var_1c0 = nullptr;
004aaecd      float var_1b4;
004aaecd      int32_t* var_1c4_1 = &var_1b4;
004aaed2      class PStringBase<unsigned short>* eax = StringInfo::GetString(&var_1b0);
004aaed7      class UIElement_Text* m_pMainText = this->m_pMainText;
004aaedd      var_1c0 = eax;
004aaede      UIElement_Text::SetText(m_pMainText, var_1c0);
004aaee7      int32_t* edi_1 = (var_1b4 - 0x14);
004aaeed      var_1c0 = &edi_1[1];
004aaeed      
004aaefa      if ((InterlockedDecrement(var_1c0) == 0 && edi_1 != 0))
004aaefa      {
004aaefc          int32_t eax_2 = *(uint32_t*)edi_1;
004aaefe          var_1c0 = 1;
004aaf02          *(uint32_t*)eax_2(var_1c0);
004aaefa      }
004aaefa      
004aaf0a      var_1c0 = 0x10000001;
004aaf0f      int32_t var_1c4_2 = 0;
004aaf14      StringInfo::SetStringIDandTableEnum(&var_1b0);
004aaf19      class UIElement_Text* m_pMainText_1 = this->m_pMainText;
004aaf23      var_1c0 = &var_1b0;
004aaf24      UIElement_Text::AppendStringInfo(m_pMainText_1, var_1c0);
004aaf2e      var_1c0 = 0x10000001;
004aaf33      int32_t var_1c4_3 = 0;
004aaf38      StringInfo::SetStringIDandTableEnum(&var_1b0);
004aaf41      var_1c0 = &var_1b0;
004aaf48      UIElement_Text::AppendStringInfo(this->m_pMainText, var_1c0);
004aaf5c      var_1b4 = ((float)LinkStatusHolder::GetPacketLossPercentage(&Client::GetInstance()->vtable));
004aaf67      void var_90;
004aaf67      StringInfo::StringInfo(&var_90);
004aaf72      var_1c0 = 0x10000001;
004aaf77      int32_t var_1c4_4 = 0;
004aaf7f      StringInfo::SetStringIDandTableEnum(&var_90);
004aaf84      long double x87_r7_1 = ((long double)var_1b4);
004aaf8d      var_1c0 = 2;
004aaf95      int32_t var_1cc = 0;
004aaf9d      StringInfo::AddVariable_Float(&var_90, 0, ((double)x87_r7_1), var_1c0);
004aafa9      var_1c0 = &var_90;
004aafb0      UIElement_Text::AppendStringInfo(this->m_pMainText, var_1c0);
004aafbc      void var_120;
004aafbc      StringInfo::StringInfo(&var_120);
004aafc7      var_1c0 = 0x10000001;
004aafcc      int32_t var_1c4_5 = 0;
004aafd4      class PStringBase<unsigned short>* ecx_15 = StringInfo::SetStringIDandTableEnum(&var_120);
004aafd9      long double x87_r7_2 = ((long double)this->m_pingRoundTripTime);
004aafdf      long double temp0 = ((long double)0.0);
004aafdf      (x87_r7_2 - temp0);
004aafdf      
004aafea      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
004aafea      {
004ab014          var_1c0 = ecx_15;
004ab017          char const* const var_1c4_6 = "????";
004ab01c          PStringBase<char>::PStringBase<char>(&var_1c0);
004ab027          int32_t var_1c4_7 = 0;
004ab02f          StringInfo::AddVariable_String(&var_120);
004aafea      }
004aafea      else
004aafea      {
004aaff7          long double x87_r7_4 = (((long double)this->m_pingRoundTripTime) * ((long double)1000.0));
004aaffd          var_1c0 = nullptr;
004ab00c          int32_t var_1cc_1 = 0;
004ab00d          StringInfo::AddVariable_Float(&var_120, 0, ((double)x87_r7_4), var_1c0);
004aafea      }
004aafea      
004ab034      class UIElement_Text* m_pMainText_2 = this->m_pMainText;
004ab041      var_1c0 = &var_120;
004ab042      UIElement_Text::AppendStringInfo(m_pMainText_2, var_1c0);
004ab047      long double x87_r7_5 = ((long double)Timer::cur_time);
004ab055      bool p_1;
004ab055      
004ab055      if (this->m_bPleaseRequestPing == 0)
004ab055      {
004ab05f          ((x87_r7_5 - ((long double)this->m_lastPingRequestTime)) - ((long double)120.0));
004ab067          p_1 = /* p_1 = unimplemented  {test ah, 0x5} */;
004ab055      }
004ab055      
004ab06a      if ((this->m_bPleaseRequestPing != 0 || p_1))
004ab06a      {
004ab06c          this->m_lastPingRequestTime = ((double)x87_r7_5);
004ab072          CM_Character::Event_RequestPing();
004ab077          this->m_bPleaseRequestPing = 0;
004ab06a      }
004ab06a      
004ab089      StringInfo::~StringInfo(&var_120);
004ab095      StringInfo::~StringInfo(&var_90);
004ab09e      StringInfo::~StringInfo(&var_1b0);
004ab0a4      int32_t eax_6;
004ab0a4      eax_6 = 1;
004aaea0  }

004ab0ae                                            90 90                                                                ..

004ab0b0  enum UIElementMessageListenResult __thiscall gmLinkStatusUI::ListenToElementMessage(class gmLinkStatusUI* this, struct UIElementMessageInfo const* arg2)

004ab0b0  {
004ab0c1      if ((arg2->idMessage == 0x18 && arg2->pElement == this))
004ab0c1      {
004ab0ca          if (arg2->dwParam1 != 0)
004ab0ca          {
004ab0cc              UIListener::RegisterForGlobalMessage(this, 3);
004ab0d3              this->m_bPleaseRequestPing = 1;
004ab0da              gmLinkStatusUI::Update(this);
004ab0e9              return UIElement::ListenToElementMessage(this, arg2);
004ab0ca          }
004ab0ca          
004ab0ec          UIListener::UnRegisterForGlobalMessage(this, 3);
004ab0f1          this->m_bPleaseRequestPing = 0;
004ab0c1      }
004ab0c1      
004ab102      return UIElement::ListenToElementMessage(this, arg2);
004ab0b0  }

004ab105                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004ab110  void __thiscall gmLinkStatusUI::ListenToGlobalMessage(class gmLinkStatusUI* this, uint32_t arg2, int32_t arg3)

004ab110  {
004ab121      if ((arg2 == 3 && (((int8_t)(this->__bitfield164 >> 1)) & 1) != 0))
004ab121      {
004ab123          long double x87_r7_1 = ((long double)Timer::cur_time);
004ab129          (x87_r7_1 - ((long double)this->m_nextUpdateTime));
004ab131          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004ab131          
004ab134          if (p_1)
004ab134          {
004ab13c              this->m_nextUpdateTime = ((double)(x87_r7_1 + ((long double)5.0)));
004ab142              gmLinkStatusUI::Update(this);
004ab134          }
004ab121      }
004ab110  }

004ab14f                                               90                                                                 .

004ab150  void __fastcall gmLinkStatusUI::RecvNotice_Ping(class gmLinkStatusUI* this)

004ab150  {
004ab163      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = ((double)(((long double)Timer::cur_time) - ((long double)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1])));
004ab163      
004ab166      if ((((int8_t)(*(int32_t*)((char*)this + -0x554) >> 1)) & 1) != 0)
004ab166      {
004ab168          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5] = 1;
004ab168          
004ab17d          if ((((int8_t)(*(int32_t*)((char*)this + -0x554) >> 1)) & 1) != 0)
004ab17d          {
004ab17f              long double x87_r7_1 = ((long double)Timer::cur_time);
004ab185              (x87_r7_1 - ((long double)((char*)this + 0x100000000)->m_hashElementsRegisteredWith.m_intrusiveTable.vtable));
004ab18d              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004ab18d              
004ab190              if (p_1)
004ab190              {
004ab192                  ((char*)this + 0x100000000)->m_hashElementsRegisteredWith.m_intrusiveTable.vtable = ((double)(x87_r7_1 + ((long double)5.0)));
004ab19e                  /* tailcall */
004ab19e                  return gmLinkStatusUI::Update(((char*)this - 0x5f8));
004ab190              }
004ab17d          }
004ab166      }
004ab150  }

004ab1a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004ab1b0  void __thiscall ExamineSubUI::Init(class ExamineSubUI* this, uint32_t arg2, class ACCWeenieObject* arg3)

004ab1b0  {
004ab1b8      this->cur_objid = arg2;
004ab1bb      this->cur_weenobj = arg3;
004ab1b0  }

004ab1c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004ab1d0  char* ModifierToString(double arg1)

004ab1d0  {
004ab1d0      long double x87_r7 = ((long double)arg1);
004ab1d5      long double temp0 = ((long double)1.0);
004ab1d5      (x87_r7 - temp0);
004ab1e0      int32_t esi;
004ab1e0      
004ab1e0      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
004ab1e9          esi = 0;
004ab1e0      else
004ab1e2          esi = 1;
004ab1e2      
004ab1f5      ((((long double)1.0) - ((long double)arg1)) - ((long double)0.0));
004ab218      int32_t eax_1;
004ab218      eax_1 = esi == 0;
004ab22d      sprintf(0x83ef88, "%c%d%%", ((int32_t)((eax_1 * 2) + 0x2b)), _ftol2());
004ab23c      return 0x83ef88;
004ab1d0  }

004ab23d                                                                                         90 90 90                               ...

004ab240  char* SmallModifierToString(double arg1)

004ab240  {
004ab240      long double x87_r7 = ((long double)arg1);
004ab244      long double temp0 = ((long double)1.0);
004ab244      (x87_r7 - temp0);
004ab24f      int32_t ecx;
004ab24f      
004ab24f      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
004ab258          ecx = 0;
004ab24f      else
004ab251          ecx = 1;
004ab251      
004ab260      long double x87_r7_2 = (((long double)1.0) - ((long double)arg1));
004ab264      long double temp1 = ((long double)0.0);
004ab264      (x87_r7_2 - temp1);
004ab264      
004ab26f      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 1) != 0)
004ab271          x87_r7_2 = -(x87_r7_2);
004ab271      
004ab27e      int16_t eax;
004ab27e      eax = ecx == 0;
004ab296      sprintf(0x83ef88, "%c%.1lf%%", ((int32_t)((eax * 2) + 0x2b)), ((double)(x87_r7_2 * ((long double)100.0))));
004ab2a4      return 0x83ef88;
004ab240  }

004ab2a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004ab2b0  void __thiscall gmExaminationUI::gmExaminationUI(class gmExaminationUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004ab2b0  {
004ab2bf      UIElement_Field::UIElement_Field(this, arg2, arg3);
004ab2c4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ab2d0      __builtin_memset(&this->m_activeUI, 0, 0x20);
004ab300      this->m_timeNextUpdate = 0f;
004ab306      *(uint32_t*)((char*)this->m_timeNextUpdate)[4] = 0;
004ab30c      this->vtable = 0x7af1b0;
004ab312      this->vtable = &gmExaminationUI::`vftable';
004ab31c      this->m_examineNewlySelectedItem = 1;
004ab2b0  }

004ab329                             90 90 90 90 90 90 90                                                           .......

004ab330  class UIElement* __thiscall gmExaminationUI::DynamicCast(class gmExaminationUI* this, uint32_t arg2) __pure

004ab330  {
004ab33c      if (arg2 == 0x1000001c)
004ab349          return this;
004ab349      
004ab343      int32_t edx_1;
004ab343      edx_1 = arg2 != 3;
004ab347      return (this & (edx_1 - 1));
004ab330  }

004ab34c                                      90 90 90 90                                                              ....

004ab350  uint32_t gmExaminationUI::GetUIElementType(class gmExaminationUI const* this @ ecx) __pure

004ab350  {
004ab355      return 0x1000001c;
004ab350  }

004ab356                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004ab360  class UIElement* gmExaminationUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004ab360  {
004ab365      void* eax = operator new(0x628);
004ab365      
004ab36f      if (eax == 0)
004ab385          return 0;
004ab385      
004ab382      return gmExaminationUI::gmExaminationUI(eax, arg1, arg2);
004ab360  }

004ab386                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004ab390  uint8_t __thiscall gmExaminationUI::OnChildAction(class gmExaminationUI* this, class UIElement const* arg2, class InputEvent const* arg3)

004ab390  {
004ab3b4      if ((arg3->m_fStart == 0 || (arg2 != this->m_itemUI->m_itemInscriptionText || arg3->m_InputAction != 0x10000024)))
004ab3c5          /* tailcall */
004ab3c5          return UIElement::OnChildAction(this, arg2, arg3);
004ab3c5      
004ab3b6      class InputEvent* eax;
004ab3b6      eax = 0;
004ab3b9      return 0;
004ab390  }

004ab3ca                                90 90 90 90 90 90                                                            ......

004ab3d0  void __fastcall gmExaminationUI::RecvNotice_SelectionChanged(class gmExaminationUI* this)

004ab3d0  {
004ab3ea      if ((UIElement::IsVisible(((char*)this - 0x5f8)) != 0 && this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] != 0))
004ab3ea      {
004ab3ec          uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004ab3ec          
004ab3f3          if (ACCWeenieObject::selectedID_1 != 0)
004ab3f3          {
004ab3fd              ClientUISystem::ExamineObject(ClientUISystem::GetUISystem(), ACCWeenieObject::selectedID_1);
004ab404              return;
004ab3f3          }
004ab3f3          
004ab40b          *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(0);
004ab3ea      }
004ab3d0  }

004ab411                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004ab420  void __thiscall gmExaminationUI::SetActiveExamineUI(class gmExaminationUI* this, class ExamineSubUI* arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004ab420  {
004ab427      class ItemExamineUI* m_itemUI = this->m_itemUI;
004ab42f      this->m_activeUI = arg2;
004ab42f      
004ab435      if (arg2 == m_itemUI)
004ab435      {
004ab437          this->m_creatureUI->vtable->Show(0);
004ab444          this->m_charUI->vtable->Show(0);
004ab451          this->m_spellUI->vtable->Show(0);
004ab467          __return_addr = 1;
004ab46f          /* jump -> this->m_itemUI->vtable->Show */
004ab435      }
004ab435      
004ab478      if (arg2 == this->m_creatureUI)
004ab478      {
004ab47a          m_itemUI->vtable->Show(0);
004ab481          this->m_charUI->vtable->Show(0);
004ab48e          this->m_spellUI->vtable->Show(0);
004ab4a4          __return_addr = 1;
004ab4ac          /* jump -> this->m_creatureUI->vtable->Show */
004ab478      }
004ab478      
004ab4b5      if (arg2 == this->m_charUI)
004ab4b5      {
004ab4b7          m_itemUI->vtable->Show(0);
004ab4be          this->m_creatureUI->vtable->Show(0);
004ab4cb          this->m_spellUI->vtable->Show(0);
004ab4e1          __return_addr = 1;
004ab4e9          /* jump -> this->m_charUI->vtable->Show */
004ab4b5      }
004ab4b5      
004ab4f2      if (arg2 != this->m_spellUI)
004ab52a          return;
004ab52a      
004ab4f4      m_itemUI->vtable->Show(0);
004ab4fb      this->m_creatureUI->vtable->Show(0);
004ab508      this->m_charUI->vtable->Show(0);
004ab51e      int32_t var_8 = 1;
004ab526      /* jump -> this->m_spellUI->vtable->Show */
004ab420  }

004ab52d                                         90 90 90                                                               ...

004ab530  void __fastcall gmExaminationUI::UseTime(class gmExaminationUI* this)

004ab530  {
004ab53d      if ((((int8_t)(this->__bitfield164 >> 1)) & 1) != 0)
004ab53d      {
004ab545          (((long double)Timer::cur_time) - ((long double)this->m_timeNextUpdate));
004ab54d          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004ab54d          
004ab550          if ((p_1 && ClientCombatSystem::GetCombatSystem()->combatMode != NONCOMBAT_COMBAT_MODE))
004ab550          {
004ab55d              class ExamineSubUI* m_activeUI = this->m_activeUI;
004ab55d              
004ab571              if ((m_activeUI == this->m_creatureUI || m_activeUI == this->m_charUI))
004ab571              {
004ab573                  uint32_t current_appraisal_ID = this->current_appraisal_ID;
004ab573                  
004ab57b                  if (current_appraisal_ID != 0)
004ab57e                      CM_Item::Event_Appraise(current_appraisal_ID);
004ab571              }
004ab571              
004ab592              this->m_timeNextUpdate = ((double)(((long double)Timer::cur_time) + ((long double)0.75)));
004ab550          }
004ab53d      }
004ab530  }

004ab59a                                                                                90 90 90 90 90 90                            ......

004ab5a0  void __thiscall CreatureExamineUI::Show(class CreatureExamineUI* this, uint8_t arg2)

004ab5a0  {
004ab5a3      class UIElement* m_basicCreatureExamineBaseField = this->m_basicCreatureExamineBaseField;
004ab5a9      int32_t edi = arg2;
004ab5a9      
004ab5ad      if (m_basicCreatureExamineBaseField != 0)
004ab5af          m_basicCreatureExamineBaseField->vtable->SetVisible(edi);
004ab5af      
004ab5b5      class UIElement* m_creatureInfoSubPanel = this->m_creatureInfoSubPanel;
004ab5b5      
004ab5ba      if (m_creatureInfoSubPanel != 0)
004ab5bc          m_creatureInfoSubPanel->vtable->SetVisible(edi);
004ab5a0  }

004ab5c7                       90 90 90 90 90 90 90 90 90                                                         .........

004ab5d0  void __thiscall CharExamineUI::Show(class CharExamineUI* this, uint8_t arg2)

004ab5d0  {
004ab5d3      class UIElement* m_basicCreatureExamineBaseField = this->m_basicCreatureExamineBaseField;
004ab5d9      int32_t edi = arg2;
004ab5d9      
004ab5dd      if (m_basicCreatureExamineBaseField != 0)
004ab5df          m_basicCreatureExamineBaseField->vtable->SetVisible(edi);
004ab5df      
004ab5e5      class UIElement* m_characterInfoSubPanel = this->m_characterInfoSubPanel;
004ab5e5      
004ab5ea      if (m_characterInfoSubPanel != 0)
004ab5ec          m_characterInfoSubPanel->vtable->SetVisible(edi);
004ab5d0  }

004ab5f7                                                                       90 90 90 90 90 90 90 90 90                         .........

004ab600  void __thiscall BasicCreatureExamineUI::Show(class BasicCreatureExamineUI* this, uint8_t arg2)

004ab600  {
004ab600      class UIElement* m_basicCreatureExamineBaseField = this->m_basicCreatureExamineBaseField;
004ab600      
004ab605      if (m_basicCreatureExamineBaseField == 0)
004ab60c          return;
004ab60c      
004ab609      /* jump -> m_basicCreatureExamineBaseField->vtable->SetVisible */
004ab600  }

004ab60f                                               90                                                                 .

004ab610  void __fastcall AC1Legacy::PStringBase<char>::clear(class AC1Legacy::PStringBase<char>* this)

004ab610  {
004ab619      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004ab619      
004ab61d      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
004ab61d      {
004ab62f          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004ab631              m_buffer->vtable->__vecDelDtor(1);
004ab631          
004ab639          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ab644          this->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ab646          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
004ab61d      }
004ab610  }

004ab64f                                               90                                                                 .

004ab650  uint8_t __thiscall AC1Legacy::PStringBase<char>::operator==(class AC1Legacy::PStringBase<char> const* this, class AC1Legacy::PStringBase<char> const* arg2)

004ab650  {
004ab654      int32_t ebx;
004ab654      int32_t var_4 = ebx;
004ab65a      char (* esi_1)[0x1] = &arg2->m_buffer->m_data;
004ab65d      char (* eax_1)[0x1] = &this->m_buffer->m_data;
004ab65d      
004ab660      while (true)
004ab660      {
004ab660          char m_data = ADJ(eax_1)->m_data;
004ab662          ebx = ADJ(esi_1)->m_data;
004ab664          this = m_data;
004ab666          bool c_1 = m_data < ebx;
004ab666          
004ab668          if (m_data == ebx)
004ab668          {
004ab66c              if (this == 0)
004ab66c                  break;
004ab66c              
004ab66e              m_data = *(int8_t*)((char*)ADJ(eax_1) + 0x15);
004ab671              ebx = *(int8_t*)((char*)ADJ(esi_1) + 0x15);
004ab674              this = m_data;
004ab676              c_1 = m_data < ebx;
004ab676              
004ab678              if (m_data == ebx)
004ab678              {
004ab67a                  eax_1 = &eax_1[2];
004ab67d                  esi_1 = &esi_1[2];
004ab67d                  
004ab682                  if (this == 0)
004ab682                      break;
004ab682                  
004ab682                  continue;
004ab678              }
004ab668          }
004ab668          
004ab694          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004ab6a1          int32_t eax_4;
004ab6a1          eax_4 = ((eax_1 - eax_1) + 1) == 0;
004ab6a4          return eax_4;
004ab660      }
004ab660      
004ab68e      int32_t eax_2;
004ab68e      eax_2 = 1;
004ab691      return 1;
004ab650  }

004ab6a7                       90 90 90 90 90 90 90 90 90                                                         .........

004ab6b0  uint8_t __thiscall AC1Legacy::PStringBase<char>::operator!=(class AC1Legacy::PStringBase<char> const* this, class AC1Legacy::PStringBase<char> const* arg2)

004ab6b0  {
004ab6b4      int32_t ebx;
004ab6b4      int32_t var_4 = ebx;
004ab6ba      char (* esi_1)[0x1] = &arg2->m_buffer->m_data;
004ab6bd      char (* eax_1)[0x1] = &this->m_buffer->m_data;
004ab6bd      
004ab6c0      while (true)
004ab6c0      {
004ab6c0          char m_data = ADJ(eax_1)->m_data;
004ab6c2          ebx = ADJ(esi_1)->m_data;
004ab6c4          this = m_data;
004ab6c6          bool c_1 = m_data < ebx;
004ab6c6          
004ab6c8          if (m_data == ebx)
004ab6c8          {
004ab6cc              if (this == 0)
004ab6cc                  break;
004ab6cc              
004ab6ce              m_data = *(int8_t*)((char*)ADJ(eax_1) + 0x15);
004ab6d1              ebx = *(int8_t*)((char*)ADJ(esi_1) + 0x15);
004ab6d4              this = m_data;
004ab6d6              c_1 = m_data < ebx;
004ab6d6              
004ab6d8              if (m_data == ebx)
004ab6d8              {
004ab6da                  eax_1 = &eax_1[2];
004ab6dd                  esi_1 = &esi_1[2];
004ab6dd                  
004ab6e2                  if (this == 0)
004ab6e2                      break;
004ab6e2                  
004ab6e2                  continue;
004ab6d8              }
004ab6c8          }
004ab6c8          
004ab6f4          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004ab701          int32_t eax_4;
004ab701          eax_4 = ((eax_1 - eax_1) + 1) != 0;
004ab704          return eax_4;
004ab6c0      }
004ab6c0      
004ab6ee      int32_t eax_2;
004ab6ee      eax_2 = 0;
004ab6f1      return 0;
004ab6b0  }

004ab707                       90 90 90 90 90 90 90 90 90                                                         .........

004ab710  int32_t __thiscall AC1Legacy::PStringBase<char>::cmp(class AC1Legacy::PStringBase<char> const* this, class AC1Legacy::PStringBase<char> const* arg2, int32_t arg3)

004ab710  {
004ab71a      if (arg3 == 0)
004ab772          return _stricmp(&this->m_buffer->m_data, &arg2->m_buffer->m_data);
004ab772      
004ab71c      int32_t ebx;
004ab71c      int32_t var_4 = ebx;
004ab722      char (* esi_1)[0x1] = &arg2->m_buffer->m_data;
004ab725      char (* eax_2)[0x1] = &this->m_buffer->m_data;
004ab725      
004ab728      while (true)
004ab728      {
004ab728          char m_data = ADJ(eax_2)->m_data;
004ab72a          ebx = ADJ(esi_1)->m_data;
004ab72c          this = m_data;
004ab72e          bool c_1 = m_data < ebx;
004ab72e          
004ab730          if (m_data == ebx)
004ab730          {
004ab734              if (this == 0)
004ab734                  break;
004ab734              
004ab736              m_data = *(int8_t*)((char*)ADJ(eax_2) + 0x15);
004ab739              ebx = *(int8_t*)((char*)ADJ(esi_1) + 0x15);
004ab73c              this = m_data;
004ab73e              c_1 = m_data < ebx;
004ab73e              
004ab740              if (m_data == ebx)
004ab740              {
004ab742                  eax_2 = &eax_2[2];
004ab745                  esi_1 = &esi_1[2];
004ab745                  
004ab74a                  if (this == 0)
004ab74a                      break;
004ab74a                  
004ab74a                  continue;
004ab740              }
004ab730          }
004ab730          
004ab753          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004ab75a          return ((eax_2 - eax_2) + 1);
004ab728      }
004ab728      
004ab750      return 0;
004ab710  }

004ab775                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004ab780  void gmExaminationUI::Register()

004ab780  {
004ab78a      UIElement::RegisterElementClass(0x1000001c, gmExaminationUI::Create);
004ab780  }

004ab793                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004ab7a0  void __thiscall gmExaminationUI::ListenToGlobalMessage(class gmExaminationUI* this, uint32_t arg2, int32_t arg3)

004ab7a0  {
004ab7a5      if (arg2 == 3)
004ab7a7          gmExaminationUI::UseTime(this);
004ab7a0  }

004ab7af                                               90                                                                 .

004ab7b0  void __thiscall gmExaminationUI::RecvNotice_ExamineObject(class gmExaminationUI* this, uint32_t arg2)

004ab7b0  {
004ab7ba      if (arg2 != 0)
004ab7ba      {
004ab7c1          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4] == 0)
004ab7ca              ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
004ab7ca          
004ab7d0          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4] = arg2;
004ab7d3          CM_Item::Event_Appraise(arg2);
004ab7db          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5] = nullptr;
004ab7ba      }
004ab7b0  }

004ab7e7                       90 90 90 90 90 90 90 90 90                                                         .........

004ab7f0  void __thiscall ItemExamineUI::ItemExamineUI(class ItemExamineUI* this, class gmExaminationUI* arg2)

004ab7f0  {
004ab7fa      this->vtable = 0x7af2f0;
004ab800      this->cur_objid = 0;
004ab803      this->cur_weenobj = nullptr;
004ab806      AppraisalProfile::AppraisalProfile(&this->cur_prof);
004ab815      this->m_pParentElement = arg2;
004ab818      this->vtable = 0x7af310;
004ab81e      __builtin_memset(&this->m_itemExamineBaseField, 0, 0x20);
004ab845      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ab851      this->m_scribe_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ab857      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004ab859      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ab864      this->m_scribe_account.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ab86a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004ab86c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ab878      this->m_old_inscription.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004ab87e      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004ab880      class gmExaminationUI* m_pParentElement = this->m_pParentElement;
004ab880      
004ab885      if (m_pParentElement != 0)
004ab891          this->m_itemExamineBaseField = UIElement::GetChildRecursive(m_pParentElement, 0x1000012e);
004ab891      
004ab894      class UIElement* m_itemExamineBaseField = this->m_itemExamineBaseField;
004ab894      
004ab899      if (m_itemExamineBaseField != 0)
004ab899      {
004ab8a0          class UIElement* eax_4 = UIElement::GetChildRecursive(m_itemExamineBaseField, 0x10000138);
004ab8a5          class UIElement* m_itemExamineBaseField_1 = this->m_itemExamineBaseField;
004ab8ad          this->m_itemValueText = eax_4;
004ab8b0          class UIElement* eax_5 = UIElement::GetChildRecursive(m_itemExamineBaseField_1, 0x10000139);
004ab8b5          class UIElement* m_itemExamineBaseField_2 = this->m_itemExamineBaseField;
004ab8bd          this->m_itemBurdenText = eax_5;
004ab8c0          class UIElement* eax_6 = UIElement::GetChildRecursive(m_itemExamineBaseField_2, 0x1000013a);
004ab8c5          class UIElement* m_itemExamineBaseField_3 = this->m_itemExamineBaseField;
004ab8cd          this->m_itemIcon = eax_6;
004ab8d3          class UIElement* eax_7 = UIElement::GetChildRecursive(m_itemExamineBaseField_3, 0x1000013c);
004ab8d8          class UIElement* m_itemExamineBaseField_4 = this->m_itemExamineBaseField;
004ab8e0          this->m_itemDisplayText = eax_7;
004ab8e6          class UIElement_Text* eax_8 = UIElement::GetChildRecursive(m_itemExamineBaseField_4, 0x1000013e);
004ab8eb          class UIElement* m_itemExamineBaseField_5 = this->m_itemExamineBaseField;
004ab8f3          this->m_itemInscriptionText = eax_8;
004ab8f9          class UIElement_Text* eax_9 = UIElement::GetChildRecursive(m_itemExamineBaseField_5, 0x1000013f);
004ab8fe          class UIElement* m_itemExamineBaseField_6 = this->m_itemExamineBaseField;
004ab906          this->m_itemInscriptionSignatureText = eax_9;
004ab911          this->m_itemInscriptionBackground = UIElement::GetChildRecursive(m_itemExamineBaseField_6, 0x10000137);
004ab899      }
004ab899      
004ab918      this->mod_high_font = 1;
004ab922      this->mod_low_font = 2;
004ab7f0  }

004ab933                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004ab940  void __fastcall ItemExamineUI::~ItemExamineUI(class ItemExamineUI* this)

004ab940  {
004ab94b      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_old_inscription.m_buffer;
004ab955      this->vtable = 0x7af310;
004ab955      
004ab963      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004ab965          m_buffer->vtable->__vecDelDtor(1);
004ab965      
004ab96d      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_scribe_account.m_buffer;
004ab96d      
004ab97f      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004ab981          m_buffer_1->vtable->__vecDelDtor(1);
004ab981      
004ab989      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->m_scribe_name.m_buffer;
004ab989      
004ab99b      if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
004ab99d          m_buffer_2->vtable->__vecDelDtor(1);
004ab99d      
004ab9a6      this->vtable = 0x7af2f0;
004ab9b1      /* tailcall */
004ab9b1      return AppraisalProfile::~AppraisalProfile(&this->cur_prof);
004ab940  }

004ab9b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004ab9c0  void __thiscall BasicCreatureExamineUI::Init(class BasicCreatureExamineUI* this, uint32_t arg2, class ACCWeenieObject* arg3)

004ab9c0  {
004ab9d4      class UIElement_Viewport* m_pPaperDoll = this->m_pPaperDoll;
004ab9e1      this->cur_objid = arg2;
004ab9e4      this->cur_weenobj = arg3;
004ab9e7      int32_t __return = 0x3e99999a;
004ab9ef      float var_2c = 1.89999998f;
004ab9f7      int32_t var_28;
004ab9f7      __builtin_strncpy(&var_28, "ff&?", 4);
004ab9ff      UIElement_Viewport::SetLight(m_pPaperDoll, DISTANT_LIGHT, 2f, &__return);
004aba10      CreatureMode::RemoveAllObjects(&this->m_pPaperDoll->creature_mode_objects);
004aba15      class CPhysicsObj* m_p3DObj = this->m_p3DObj;
004aba15      
004aba1d      if (m_p3DObj != 0)
004aba1f          m_p3DObj->vtable->__vecDelDtor(1);
004aba1f      
004aba26      this->m_p3DObj = nullptr;
004aba30      class CPhysicsObj* eax_1 = ClientObjMaintSystem::GetPhysicsObject(arg2);
004aba30      
004aba3a      if (eax_1 != 0)
004aba3a      {
004aba41          class CPhysicsObj* eax_2 = CPhysicsObj::makeObject(eax_1);
004aba4b          this->m_p3DObj = eax_2;
004aba4b          
004aba51          if (eax_2 != 0)
004aba51          {
004aba60              CPhysicsObj::set_heading(eax_2, 191.367905f, 1);
004aba65              float x = Legacy_Vector3_ZeroVector__.x;
004aba6a              float y = Legacy_Vector3_ZeroVector__.y;
004aba70              float z = Legacy_Vector3_ZeroVector__.z;
004aba76              float x_1 = x;
004aba99              CPhysicsObj::GetBoundingBox(this->m_p3DObj, &x_1);
004abaac              float var_3c_1 = ((float)(((long double)x) - ((long double)x_1)));
004abac4              float var_34_1 = ((float)(((long double)z) - ((long double)z)));
004abac8              int32_t eax_3 = UIRegion::GetWidth(this->m_pPaperDoll);
004abaf0              arg2 = ((float)(((long double)UIRegion::GetHeight(this->m_pPaperDoll)) / ((long double)((float)((long double)eax_3)))));
004abb02              long double x87_r6_2 = (((long double)var_34_1) / ((long double)var_3c_1));
004abb06              long double temp1_1 = ((long double)arg2);
004abb06              (x87_r6_2 - temp1_1);
004abb0a              int32_t eax_4;
004abb0a              eax_4 = ((((x87_r6_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
004abb0c              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004abb0f              long double x87_r6_4;
004abb0f              
004abb0f              if (p_1)
004abb1b                  x87_r6_4 = ((long double)var_34_1);
004abb0f              else
004abb15                  x87_r6_4 = (((long double)var_3c_1) * ((long double)arg2));
004abb15              
004abb36              BBox::GetCenter(&x_1, &__return);
004abb43              int32_t eax_5 = var_28;
004abb53              __return = __return;
004abb58              class UIElement_Viewport* m_pPaperDoll_1 = this->m_pPaperDoll;
004abb5e              float var_2c_1 = ((float)(((long double)var_2c) + -(((long double)((float)((x87_r6_4 * ((long double)1.20710683f)) + (((long double)((float)(((long double)y) - ((long double)y)))) * ((long double)0.5f))))))));
004abb69              int32_t var_28_1 = eax_5;
004abb6d              int32_t var_24 = 0;
004abb75              int32_t var_20_1 = 0;
004abb7d              int32_t var_1c_1 = 0;
004abb85              UIElement_Viewport::SetCamera(m_pPaperDoll_1, &__return, &var_24);
004abb9d              CreatureMode::AddObject(&this->m_pPaperDoll->creature_mode_objects, this->m_p3DObj);
004aba51          }
004aba3a      }
004ab9c0  }

004abbaa                                90 90 90 90 90 90                                                            ......

004abbb0  void __thiscall BasicCreatureExamineUI::AddLineToMiscInfo(class BasicCreatureExamineUI* this, class PStringBase<unsigned short> const* arg2, class PStringBase<unsigned short> const* arg3, int32_t arg4)

004abbb0  {
004abbb0      class UIElement_ListBox* m_extraInfoList = this->m_extraInfoList;
004abbb0      
004abbb8      if (m_extraInfoList != 0)
004abbb8      {
004abbc5          class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_extraInfoList, 0, nullptr);
004abbc5          
004abbce          if (eax_1 != 0)
004abbce          {
004abbd7              class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x1000012a);
004abbde              class UIElement_Text* edi_1;
004abbde              
004abbde              if (eax_2 == 0)
004abbf0                  edi_1 = nullptr;
004abbde              else
004abbec                  edi_1 = eax_2->vtable->DynamicCast(0xc);
004abbec              
004abbf9              class UIElement* eax_4 = UIElement::GetChildRecursive(eax_1, 0x1000012b);
004abc00              class UIElement_Text* esi_2;
004abc00              
004abc00              if (eax_4 == 0)
004abc12                  esi_2 = nullptr;
004abc00              else
004abc0e                  esi_2 = eax_4->vtable->DynamicCast(0xc);
004abc0e              
004abc1a              if (edi_1 != 0)
004abc26                  UIElement_Text::SetTextWithFont(edi_1, arg2, 0, arg4);
004abc26              
004abc2d              if (esi_2 != 0)
004abc39                  UIElement_Text::SetTextWithFont(esi_2, arg3, 0, arg4);
004abbce          }
004abbb8      }
004abbb0  }

004abc44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004abc50  void __thiscall SpellExamineUI::SpellExamineUI(class SpellExamineUI* this, class gmExaminationUI* arg2)

004abc50  {
004abc59      this->vtable = 0x7af2f0;
004abc5f      this->cur_objid = 0;
004abc62      this->cur_weenobj = nullptr;
004abc65      AppraisalProfile::AppraisalProfile(&this->cur_prof);
004abc75      this->m_pParentElement = arg2;
004abc78      this->vtable = 0x7af320;
004abc7e      __builtin_memset(&this->m_spellExamineBaseField, 0, 0x24);
004abcab      this->m_componentListX = 0x20;
004abcb1      this->m_componentListW = 0x20;
004abcb1      
004abcb7      if (arg2 != 0)
004abcc3          this->m_spellExamineBaseField = UIElement::GetChildRecursive(arg2, 0x10000153);
004abcc3      
004abcc6      class UIElement* m_spellExamineBaseField = this->m_spellExamineBaseField;
004abcc6      
004abccb      if (m_spellExamineBaseField != 0)
004abccb      {
004abcd6          class UIElement* eax_2 = UIElement::GetChildRecursive(m_spellExamineBaseField, 0x1000015e);
004abcdd          class UIElement_Text* eax_3;
004abcdd          
004abcdd          if (eax_2 == 0)
004abced              eax_3 = nullptr;
004abcdd          else
004abce5              eax_3 = eax_2->vtable->DynamicCast(0xc);
004abce5          
004abcef          class UIElement* m_spellExamineBaseField_1 = this->m_spellExamineBaseField;
004abcf7          this->m_magicSchoolText = eax_3;
004abcfa          class UIElement* eax_4 = UIElement::GetChildRecursive(m_spellExamineBaseField_1, 0x10000160);
004abd01          class UIElement_Text* eax_5;
004abd01          
004abd01          if (eax_4 == 0)
004abd11              eax_5 = nullptr;
004abd01          else
004abd09              eax_5 = eax_4->vtable->DynamicCast(0xc);
004abd09          
004abd13          class UIElement* m_spellExamineBaseField_2 = this->m_spellExamineBaseField;
004abd1b          this->m_spellManaText = eax_5;
004abd1e          class UIElement* eax_6 = UIElement::GetChildRecursive(m_spellExamineBaseField_2, 0x10000162);
004abd25          class UIElement_Text* eax_7;
004abd25          
004abd25          if (eax_6 == 0)
004abd35              eax_7 = nullptr;
004abd25          else
004abd2d              eax_7 = eax_6->vtable->DynamicCast(0xc);
004abd2d          
004abd37          class UIElement* m_spellExamineBaseField_3 = this->m_spellExamineBaseField;
004abd3f          this->m_spellRangeText = eax_7;
004abd45          class UIElement* eax_8 = UIElement::GetChildRecursive(m_spellExamineBaseField_3, 0x10000161);
004abd4c          class UIElement_Text* eax_9;
004abd4c          
004abd4c          if (eax_8 == 0)
004abd5c              eax_9 = nullptr;
004abd4c          else
004abd54              eax_9 = eax_8->vtable->DynamicCast(0xc);
004abd54          
004abd5e          class UIElement* m_spellExamineBaseField_4 = this->m_spellExamineBaseField;
004abd66          this->m_spellDurationText = eax_9;
004abd6c          class UIElement* eax_10 = UIElement::GetChildRecursive(m_spellExamineBaseField_4, 0x10000163);
004abd73          class UIElement_Text* eax_11;
004abd73          
004abd73          if (eax_10 == 0)
004abd83              eax_11 = nullptr;
004abd73          else
004abd7b              eax_11 = eax_10->vtable->DynamicCast(0xc);
004abd7b          
004abd85          class UIElement* m_spellExamineBaseField_5 = this->m_spellExamineBaseField;
004abd8d          this->m_spellDisplayText = eax_11;
004abd93          class UIElement* eax_12 = UIElement::GetChildRecursive(m_spellExamineBaseField_5, 0x1000015f);
004abd98          class UIElement* m_spellExamineBaseField_6 = this->m_spellExamineBaseField;
004abda0          this->m_spellIcon = eax_12;
004abda6          class UIElement* eax_13 = UIElement::GetChildRecursive(m_spellExamineBaseField_6, 0x1000032d);
004abdad          class UIRegion* eax_14;
004abdad          
004abdad          if (eax_13 == 0)
004abdbd              eax_14 = nullptr;
004abdad          else
004abdb5              eax_14 = eax_13->vtable->DynamicCast(5);
004abdb5          
004abdc1          this->m_formulaListBox = eax_14;
004abdc1          
004abdc7          if (eax_14 != 0)
004abdc7          {
004abdcc              this->m_componentListX = eax_14->m_box.m_x0;
004abdd9              this->m_componentListW = UIRegion::GetWidth(eax_14);
004abdc7          }
004abccb      }
004abc50  }

004abde6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004abdf0  void __fastcall SpellExamineUI::ClearIcons(class SpellExamineUI* this)

004abdf0  {
004abdf3      class UIElement_ListBox* m_formulaListBox = this->m_formulaListBox;
004abdf3      
004abe01      for (uint32_t m_num = m_formulaListBox->m_listItems.m_num; m_num > 0; m_num = m_formulaListBox->m_listItems.m_num)
004abe01      {
004abe05          UIElement_ListBox::DeleteItem(m_formulaListBox, (m_num - 1));
004abe0a          m_formulaListBox = this->m_formulaListBox;
004abe01      }
004abdf0  }

004abe1c                                                                                      90 90 90 90                              ....

004abe20  void __fastcall SpellExamineUI::UpdateComponents(class SpellExamineUI* this, enum ComponentTrackerUpdate arg2)

004abe20  {
004abe28      class UIElement_ListBox* m_formulaListBox = this->m_formulaListBox;
004abe28      
004abe32      if (m_formulaListBox != 0)
004abe32      {
004abe3f          uint32_t i = 0;
004abe3f          
004abe43          if (m_formulaListBox->m_listItems.m_num > 0)
004abe43          {
004abf4a              do
004abf4a              {
004abe51                  class UIElement* eax_2 = UIElement_ListBox::GetItem(m_formulaListBox, i);
004abe51                  
004abe5a                  if (eax_2 != 0)
004abe5a                  {
004abe67                      class UIElement* eax_3 = UIElement::GetChildRecursive(eax_2, 0x10000330);
004abe67                      
004abe70                      if (eax_3 != 0)
004abe70                      {
004abe76                          struct UIElement::VTable* vtable = eax_2->vtable;
004abe84                          int32_t var_14 = 0;
004abe88                          int32_t* var_8 = nullptr;
004abe8c                          int32_t* var_4_1 = nullptr;
004abe8c                          
004abea0                          if ((vtable->InqProperty(0x10000010, &var_8) != 0 && var_4_1 != 0))
004abea9                              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_14);
004abea9                          
004abeb3                          class ComponentTracker* __return;
004abeb3                          uint32_t edx_2;
004abeb3                          __return = CPlayerSystem::GetComponentTracker(CPlayerSystem::GetPlayerSystem());
004abebc                          int32_t eax_8;
004abebc                          
004abebc                          if (__return != 0)
004abebc                          {
004abec2                              int32_t var_28_4 = var_14;
004abec7                              void var_c;
004abec7                              void* var_2c_1 = &var_c;
004abed5                              eax_8 = ComponentTracker::ComponentIsOwned(__return, SpellComponentTable::SCIDtoWCID(__return, edx_2)->id);
004abebc                          }
004abebc                          
004abedc                          if ((__return == 0 || eax_8 == 0))
004abee8                              eax_3->vtable->SetVisible(1);
004abedc                          else
004abede                              eax_3->vtable->SetVisible(0);
004abede                          
004abef1                          int32_t* eax_10 = var_8;
004abef1                          
004abef7                          if (eax_10 != 0)
004abef7                          {
004abf01                              int32_t esi_4 = (eax_10[1] - 1);
004abefe                              eax_10[1] = esi_4;
004abefe                              
004abf08                              if (esi_4 == 0)
004abf0e                                  **(uint32_t**)eax_10(1);
004abf0e                              
004abf10                              var_8 = nullptr;
004abef7                          }
004abef7                          
004abf1a                          if (var_4_1 != 0)
004abf1a                          {
004abf24                              int32_t esi_6 = (var_4_1[1] - 1);
004abf21                              var_4_1[1] = esi_6;
004abf21                              
004abf2b                              if (esi_6 == 0)
004abf31                                  **(uint32_t**)var_4_1(1);
004abf31                              
004abf33                              int32_t var_4_2 = 0;
004abf1a                          }
004abe70                      }
004abe5a                  }
004abe5a                  
004abf3b                  m_formulaListBox = this->m_formulaListBox;
004abf47                  i += 1;
004abf4a              } while (i < m_formulaListBox->m_listItems.m_num);
004abe43          }
004abe32      }
004abe20  }

004abe4d                                         8d 49 00                                                               .I.
004abf5a                                                                                90 90 90 90 90 90                            ......

004abf60  uint32_t __stdcall SpellExamineUI::GetComponentObjectID(class SpellExamineUI* this @ ecx, uint32_t arg2)

004abf60  {
004abf60      uint32_t __return = arg2;
004abf64      uint32_t __saved_esi = __return;
004abf69      uint32_t* __saved_edi = &arg2;
004abf6a      uint32_t edx;
004abf6a      SpellComponentTable::SCIDtoWCID(__return, edx);
004abf79      class ComponentTracker* result = CPlayerSystem::GetComponentTracker(CPlayerSystem::GetPlayerSystem());
004abf79      
004abf80      if (result == 0)
004abf82          return result;
004abf82      
004abf8b      int32_t i = 0;
004abf8d      class DLList<ComponentData>* (* edx_1)[0x7] = &result->componentLists;
004abf8d      
004abfb2      do
004abfb2      {
004abf90          class DLList<ComponentData>* eax_1 = ADJ(edx_1)->componentLists[0];
004abf90          
004abf94          if (eax_1 == 0)
004abf94              break;
004abf94          
004abf9a          for (void** head_ = eax_1->head_; head_ != 0; head_ = *(uint32_t*)head_)
004abf9a          {
004abfa3              if (arg2 == head_[2])
004abfc2                  return ComponentData::GetFirstObjectID(head_);
004abf9a          }
004abf9a          
004abfab          i += 1;
004abfac          edx_1 = &*(uint28_t*)edx_1[1];
004abfb2      } while (i < 7);
004abfb2      
004abfb8      return 0;
004abf60  }

004abfc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004abfd0  uint8_t __thiscall AC1Legacy::PStringBase<char>::eq(class AC1Legacy::PStringBase<char> const* this, class AC1Legacy::PStringBase<char> const* arg2, int32_t arg3)

004abfd0  {
004abfda      int32_t eax = AC1Legacy::PStringBase<char>::cmp(this, arg2, arg3);
004abfdf      int32_t eax_1 = -(eax);
004abfe4      return (((int8_t)(eax_1 - eax_1)) + 1);
004abfd0  }

004abfe7                       90 90 90 90 90 90 90 90 90                                                         .........

004abff0  class AC1Legacy::PStringBase<char>* AC1Legacy::operator+(class AC1Legacy::PStringBase<char>* __return, char const* arg2, class AC1Legacy::PStringBase<char> const* arg3)

004abff0  {
004abffa      class AC1Legacy::PStringBase<char>* __return_1 = __return;
004ac00c      AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, arg2), __return_1, arg3);
004ac011      class AC1Legacy::PStringBase<char>* __return_2 = __return;
004ac011      
004ac025      if ((InterlockedDecrement(&__return_2[1]) == 0 && __return_2 != 0))
004ac027          __return_2->m_buffer->vtable(1);
004ac027      
004ac033      return __return_1;
004abff0  }

004ac034                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004ac040  void __fastcall gmExaminationUI::RecvNotice_UpdateSpellComponents(class gmExaminationUI* this, int32_t arg2)

004ac040  {
004ac040      class HashSetData<UIElement *>* ecx_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2];
004ac040      
004ac045      if (ecx_1 == 0)
004ac04c          return;
004ac04c      
004ac047      enum ComponentTrackerUpdate edx;
004ac047      /* tailcall */
004ac047      return SpellExamineUI::UpdateComponents(ecx_1, edx);
004ac040  }

004ac04f                                               90                                                                 .

004ac050  void __thiscall ItemExamineUI::AddItemInfo(class ItemExamineUI* this, class PStringBase<unsigned short> const* arg2, int32_t arg3, int32_t arg4)

004ac050  {
004ac053      class UIElement_Text* m_itemDisplayText = this->m_itemDisplayText;
004ac053      
004ac05b      if (m_itemDisplayText != 0)
004ac05b      {
004ac064          if (m_itemDisplayText->m_glyphList.m_glyphList._num_elements > 1)
004ac064          {
004ac071              uint16_t* var_c_1;
004ac071              
004ac071              if (arg4 == 0)
004ac07a                  var_c_1 = &data_7af34c;
004ac071              else
004ac073                  var_c_1 = &data_79c288;
004ac073              
004ac07f              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg4, var_c_1);
004ac08f              UIElement_Text::AppendText(this->m_itemDisplayText, &arg4);
004ac098              int32_t* esi_2 = (arg4 - 0x14);
004ac098              
004ac0ab              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004ac0b3                  **(uint32_t**)esi_2(1);
004ac064          }
004ac064          
004ac0c8          UIElement_Text::AppendTextWithFont(this->m_itemDisplayText, arg2, 0, arg3);
004ac05b      }
004ac050  }

004ac0d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004ac0e0  void __fastcall ItemExamineUI::HandleInscriptionGainingFocus(class ItemExamineUI* this)

004ac0e0  {
004ac0e3      int32_t ebx;
004ac0e3      int32_t var_c = ebx;
004ac0f2      class ItemExamineUI* this_1 = this;
004ac0f6      int32_t* __return;
004ac0f6      AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &data_7928af);
004ac0fb      int32_t* __return_1 = __return;
004ac105      char* esi = &__return_1[5];
004ac108      char (* eax_1)[0x1] = &this->m_scribe_name.m_buffer->m_data;
004ac110      int32_t eax_3;
004ac110      
004ac110      while (true)
004ac110      {
004ac110          char m_data[0x1] = ADJ(eax_1)->m_data;
004ac112          ebx = *(uint8_t*)esi;
004ac116          bool c_1 = m_data < ebx;
004ac116          
004ac118          if (m_data == ebx)
004ac118          {
004ac11c              if (m_data == 0)
004ac11c              {
004ac134                  eax_3 = 0;
004ac136                  break;
004ac11c              }
004ac11c              
004ac11e              m_data = *(int8_t*)((char*)ADJ(eax_1) + 0x15);
004ac121              ebx = esi[1];
004ac126              c_1 = m_data < ebx;
004ac126              
004ac128              if (m_data == ebx)
004ac128              {
004ac12a                  eax_1 = &eax_1[2];
004ac12d                  esi = &esi[2];
004ac12d                  
004ac132                  if (m_data != 0)
004ac132                      continue;
004ac132                  
004ac134                  eax_3 = 0;
004ac136                  break;
004ac128              }
004ac118          }
004ac118          
004ac138          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004ac13a          eax_3 = ((eax_1 - eax_1) + 1);
004ac13a          break;
004ac110      }
004ac110      
004ac149      ebx = eax_3 == 0;
004ac149      
004ac154      if ((InterlockedDecrement(&__return_1[1]) == 0 && __return_1 != 0))
004ac15d          **(uint32_t**)__return_1(1);
004ac15d      
004ac161      class ItemExamineUI* this_2 = this_1;
004ac161      
004ac165      if (ebx != 0)
004ac165      {
004ac167          this_2->m_itemInscriptionText->vtable->SetState(1);
004ac17d          UIElement_Text::ClearAllText(this_2->m_itemInscriptionText);
004ac165      }
004ac165      
004ac195      PStringBase<unsigned short>::allocate_ref_buffer(&this_1, wcslen(&data_7af354));
004ac1a4      wcscpy(this_1, &data_7af354);
004ac1b8      UIElement_Text::SetText(this_2->m_itemInscriptionSignatureText, &this_1);
004ac1c1      void* __offset(ItemExamineUI, -0x14) esi_2 = ((char*)this_1 - 0x14);
004ac1c1      
004ac1d0      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004ac1d8          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004ac1d8      
004ac1da      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004ac1e1      uint32_t player_id;
004ac1e1      
004ac1e1      if (SmartBox::smartbox_1 == 0)
004ac1eb          player_id = 0;
004ac1e1      else
004ac1e3          player_id = SmartBox::smartbox_1->player_id;
004ac1e3      
004ac1f7      class PStringBase<unsigned short>* eax_10 = ACCWeenieObject::GetObjectNameWide(&__return, player_id, NAME_SINGULAR, 0);
004ac206      UIElement_Text::AppendText(this_2->m_itemInscriptionSignatureText, eax_10);
004ac20f      void* esi_4 = &__return[-5];
004ac20f      
004ac21e      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004ac226          **(uint32_t**)esi_4(1);
004ac0e0  }

004ac10d                                         8d 49 00                                                               .I.

004ac230  void __fastcall ItemExamineUI::HandleInscriptionMousePresses(class ItemExamineUI* this)

004ac230  {
004ac237      class UIElement_Text* m_itemInscriptionText = this->m_itemInscriptionText;
004ac244      char var_e = 0;
004ac249      int32_t* var_8 = nullptr;
004ac24d      int32_t* var_4 = nullptr;
004ac24d      
004ac265      if ((m_itemInscriptionText->vtable->InqProperty(0x16, &var_8) != 0 && var_4 != 0))
004ac26e          *(uint32_t*)(*(uint32_t*)var_4 + 0x70)(&var_e);
004ac26e      
004ac277      if (var_e == 0)
004ac277      {
004ac288          class AC1Legacy::PStringBase<char> var_c;
004ac288          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, &data_7928af);
004ac29a          uint8_t eax_3 = AC1Legacy::PStringBase<char>::operator!=(&this->m_scribe_name, &var_c);
004ac29f          int32_t* ebp_1 = var_c;
004ac29f          
004ac2b9          if ((InterlockedDecrement(&ebp_1[1]) == 0 && ebp_1 != 0))
004ac2c2              **(uint32_t**)ebp_1(1);
004ac2c2          
004ac2c4          int32_t eax_4;
004ac2c4          eax_4 = eax_3;
004ac2c4          
004ac2ca          if (eax_4 != 0)
004ac2ca          {
004ac2cc              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004ac2d3              uint32_t player_id;
004ac2d3              
004ac2d3              if (SmartBox::smartbox_1 == 0)
004ac2dd                  player_id = 0;
004ac2d3              else
004ac2d5                  player_id = SmartBox::smartbox_1->player_id;
004ac2d5              
004ac2fe              class ItemExamineUI* ebx;
004ac2fe              ebx = AC1Legacy::PStringBase<char>::operator!=(&this->m_scribe_name, AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, ACCWeenieObject::GetObjectName(player_id, NAME_SINGULAR, 0)));
004ac300              class AC1Legacy::PStringBase<char> eax_8 = var_c;
004ac300              
004ac312              if ((InterlockedDecrement((eax_8 + 4)) == 0 && eax_8 != 0))
004ac31b                  **(uint32_t**)eax_8(1);
004ac31b              
004ac31f              if (ebx == 0)
004ac31f                  goto label_4ac3b8;
004ac31f              
004ac32a              char (* var_24_6)[0x1] = &this->m_scribe_name.m_buffer->m_data;
004ac337              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, Formatted, u"Only %hs can change the inscript…");
004ac33f              goto label_4ac3cf;
004ac2ca          }
004ac2ca          
004ac345          class ACCWeenieObject* eax_13 = ClientObjMaintSystem::GetWeenieObject(this->cur_objid);
004ac345          
004ac34f          if (eax_13 == 0)
004ac34f          {
004ac3b8          label_4ac3b8:
004ac3b8              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, u"Item must be in your inventory t…");
004ac3cf          label_4ac3cf:
004ac3cf              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &var_c, 0x1a, 1, 0);
004ac3d8              int32_t* esi_3 = (var_c - 0x14);
004ac3d8              
004ac3e7              if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004ac3ef                  **(uint32_t**)esi_3(1);
004ac34f          }
004ac34f          else if ((eax_13->pwd._bitfield & 2) == 0)
004ac358          {
004ac363              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, u"This item is not inscribable.");
004ac368              int32_t var_24_8 = 0;
004ac36a              int32_t var_28_1 = 1;
004ac36c              int32_t var_2c_2 = 0x1a;
004ac37a              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &var_c, 0x1a, 1, 0);
004ac383              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
004ac358          }
004ac358          else if (eax_13->pwd._location == 0)
004ac392          {
004ac39d              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, u"Item must be in your inventory t…");
004ac3a2              int32_t var_24_9 = 0;
004ac3a4              int32_t var_28_2 = 1;
004ac3a6              int32_t var_2c_3 = 0x1a;
004ac37a              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &var_c, 0x1a, 1, 0);
004ac383              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
004ac392          }
004ac277      }
004ac277      
004ac3f3      int32_t* eax_17 = var_8;
004ac3f3      
004ac3f9      if (eax_17 != 0)
004ac3f9      {
004ac403          int32_t esi_5 = (eax_17[1] - 1);
004ac400          eax_17[1] = esi_5;
004ac400          
004ac40a          if (esi_5 == 0)
004ac410              **(uint32_t**)eax_17(1);
004ac410          
004ac412          var_8 = nullptr;
004ac3f9      }
004ac3f9      
004ac420      if (var_4 != 0)
004ac420      {
004ac42a          int32_t esi_7 = (var_4[1] - 1);
004ac427          var_4[1] = esi_7;
004ac427          
004ac431          if (esi_7 == 0)
004ac437              **(uint32_t**)var_4(1);
004ac420      }
004ac230  }

004ac43f                                                                                               90                                 .

004ac440  class PStringBase<char>* operator+(class PStringBase<char>* __return, char const* arg2, class PStringBase<char> const* arg3)

004ac440  {
004ac44a      class PStringBase<char>* __return_1 = __return;
004ac45c      PStringBase<char>::operator+(PStringBase<char>::PStringBase<char>(&__return, arg2), __return_1, arg3);
004ac465      void* __offset(PStringBase<char>, -0x14) esi_1 = &__return[-5];
004ac465      
004ac478      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004ac480          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004ac480      
004ac486      return __return_1;
004ac440  }

004ac487                       90 90 90 90 90 90 90 90 90                                                         .........

004ac490  void __thiscall AC1Legacy::PStringBase<char>::append_int32(class AC1Legacy::PStringBase<char>* this, int32_t arg2)

004ac490  {
004ac490      class AC1Legacy::PStringBase<char>* var_4 = this;
004ac491      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ac498      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ac4a2      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004ac4ac      int32_t var_10_1 = arg2;
004ac4b7      AC1Legacy::PStringBase<char>::sprintf(&var_4, "%ld");
004ac4bc      class AC1Legacy::PStringBase<char>* esi = var_4;
004ac4bc      
004ac4ca      if (esi != AC1Legacy::PStringBase<char>::s_NullBuffer)
004ac4d7          AC1Legacy::PStringBase<char>::append_n_chars(this, &esi[5], (*(int32_t*)((char*)esi + 8) - 1));
004ac4d7      
004ac4ec      if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
004ac4ee          esi->m_buffer->vtable(1);
004ac490  }

004ac4fc                                                                                      90 90 90 90                              ....

004ac500  uint8_t __fastcall AC1Legacy::PStringBase<char>::InsertCommas(class AC1Legacy::PStringBase<char>* this)

004ac500  {
004ac507      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
004ac509      uint32_t m_len = m_buffer_1->m_len;
004ac509      
004ac512      if (m_len == 1)
004ac512      {
004ac514          m_len = 0;
004ac51a          return 0;
004ac512      }
004ac512      
004ac51d      void* eax = ((m_len + m_buffer_1) + 0x13);
004ac51d      
004ac521      if (m_len > 0)
004ac523          eax = &m_buffer_1->m_data;
004ac523      
004ac52c      int32_t ebp = (m_len - 2);
004ac52c      
004ac52f      if (*(uint8_t*)eax != 0x2d)
004ac531          ebp = (m_len - 1);
004ac531      
004ac535      int32_t var_c;
004ac535      
004ac535      if (ebp <= 0)
004ac54e          var_c = 0;
004ac535      else
004ac548          var_c = ((ebp - 1) / 3);
004ac548      
004ac556      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ac560      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ac564      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004ac564      
004ac577      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
004ac579          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
004ac579      
004ac58d      AC1Legacy::PStringBase<char>::allocate_ref_buffer(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, (var_c + (m_len - 1)));
004ac592      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ac599      int32_t eax_6 = 0;
004ac59b      int32_t ebx_2 = (m_len - 2);
004ac5a0      *(uint8_t*)((((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_3 + var_c) + (m_len - 1)) + 0x14) = 0;
004ac5a5      int32_t var_10 = 0;
004ac5a9      int32_t var_8 = 0;
004ac5a9      
004ac5ad      if (ebx_2 >= 0)
004ac5ad      {
004ac6bd          int32_t temp2_1;
004ac6bd          
004ac6bd          do
004ac6bd          {
004ac5b9              char var_18;
004ac5b9              
004ac5b9              if (((eax_6 > 0 && ebp > 0) && (((int64_t)eax_6) % 3) == 0))
004ac5b9              {
004ac5d3                  var_18 = 0x2c;
004ac5d8                  uint32_t m_len_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_len;
004ac5db                  int32_t esi_3 = ((ebx_2 - var_10) + var_c);
004ac5db                  
004ac5e6                  if ((esi_3 < m_len_1 && &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data[esi_3] != 0x2c))
004ac5e6                  {
004ac5eb                      class AC1Legacy::PStringBase<char>* ecx_4 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ac5eb                      
004ac5ef                      if (esi_3 != (m_len_1 - 1))
004ac5ef                      {
004ac603                          AC1Legacy::PStringBase<char>::break_reference(ecx_4);
004ac60c                          AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ac610                          &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data[esi_3] = var_18;
004ac610                          
004ac61a                          if (var_18 == 0)
004ac61a                          {
004ac61c                              char (* eax_12)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data;
004ac627                              char m_data[0x1];
004ac627                              
004ac627                              do
004ac627                              {
004ac622                                  m_data = ADJ(eax_12)->m_data;
004ac624                                  eax_12 = &eax_12[1];
004ac627                              } while (m_data != 0);
004ac62c                              AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_len = ((eax_12 - &eax_12[1]) + 1);
004ac61a                          }
004ac5ef                      }
004ac5ef                      else
004ac5ef                      {
004ac5f8                          AC1Legacy::PStringBase<char>::append_n_chars(ecx_4, &var_18, 1);
004ac5fd                          AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ac5ef                      }
004ac5e6                  }
004ac5e6                  
004ac62f                  var_10 += 1;
004ac5b9              }
004ac5b9              
004ac637              class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004ac639              uint32_t m_len_3 = m_buffer->m_len;
004ac63e              void* eax_15;
004ac63e              
004ac63e              if (ebx_2 < m_len_3)
004ac646                  eax_15 = &&m_buffer->m_data[ebx_2];
004ac63e              else
004ac640                  eax_15 = ((m_len_3 + m_buffer) + 0x13);
004ac640              
004ac64a              m_len_3 = *(uint8_t*)eax_15;
004ac658              int32_t esi_6 = ((ebx_2 - var_10) + var_c);
004ac65a              var_18 = m_len_3;
004ac65e              uint32_t m_len_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_len;
004ac65e              
004ac669              if ((esi_6 < m_len_2 && &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data[esi_6] != m_len_3))
004ac669              {
004ac66e                  class AC1Legacy::PStringBase<char>* ecx_6 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ac66e                  
004ac672                  if (esi_6 != (m_len_2 - 1))
004ac672                  {
004ac686                      AC1Legacy::PStringBase<char>::break_reference(ecx_6);
004ac68f                      AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ac693                      &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data[esi_6] = var_18;
004ac693                      
004ac69d                      if (var_18 == 0)
004ac69d                      {
004ac69f                          char (* eax_19)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data;
004ac6aa                          char m_data_1[0x1];
004ac6aa                          
004ac6aa                          do
004ac6aa                          {
004ac6a5                              m_data_1 = ADJ(eax_19)->m_data;
004ac6a7                              eax_19 = &eax_19[1];
004ac6aa                          } while (m_data_1 != 0);
004ac6af                          AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_len = ((eax_19 - &eax_19[1]) + 1);
004ac69d                      }
004ac672                  }
004ac672                  else
004ac672                  {
004ac67b                      AC1Legacy::PStringBase<char>::append_n_chars(ecx_6, &var_18, 1);
004ac680                      AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ac672                  }
004ac669              }
004ac669              
004ac6b6              eax_6 = (var_8 + 1);
004ac6b7              ebp -= 1;
004ac6b8              temp2_1 = ebx_2;
004ac6b8              ebx_2 -= 1;
004ac6b9              var_8 = eax_6;
004ac6bd          } while ((temp2_1 - 1) >= 0);
004ac5ad      }
004ac5ad      
004ac6c7      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->m_buffer;
004ac6c7      
004ac6cb      if (m_buffer_2 != AC1Legacy::PStringBase<char>::s_NullBuffer_3)
004ac6cb      {
004ac6dd          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
004ac6df              m_buffer_2->vtable->__vecDelDtor(1);
004ac6df          
004ac6eb          this->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004ac6ed          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004ac6cb      }
004ac6cb      
004ac703      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004ac705          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
004ac705      
004ac710      int32_t eax_25;
004ac710      eax_25 = 1;
004ac716      return 1;
004ac500  }

004ac717                                                                       90 90 90 90 90 90 90 90 90                         .........

004ac720  void __fastcall ItemExamineUI::SetInscriptionEditableState(class ItemExamineUI* this)

004ac720  {
004ac720      int32_t __saved_ebp_1;
004ac720      int32_t __saved_ebp = __saved_ebp_1;
004ac729      int32_t* ebx;
004ac729      int32_t* var_38 = ebx;
004ac72a      int32_t esi;
004ac72a      int32_t var_3c = esi;
004ac72b      struct Turbine_GUID* edi;
004ac72b      struct Turbine_GUID* var_40 = edi;
004ac736      class PlayerDesc* var_18 = nullptr;
004ac73a      int32_t* var_14 = nullptr;
004ac73e      BaseProperty::SetPropertyName(&var_18, 0x16);
004ac749      int32_t var_20 = 0;
004ac74d      int32_t* var_1c = nullptr;
004ac751      BaseProperty::SetPropertyName(&var_20, 0x27);
004ac75a      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(this->cur_objid);
004ac764      class ACCWeenieObject* var_28 = eax_1;
004ac775      struct Turbine_GUID** esp_1;
004ac775      
004ac775      if ((eax_1 == 0 || (eax_1->pwd._bitfield & 2) == 0))
004ac775      {
004aca52          if (var_14 != 0)
004aca52          {
004aca58              BaseProperty::CheckCopyOnWrite(&var_18);
004aca64              *(uint32_t*)(*(uint32_t*)var_14 + 0x74)(0);
004aca52          }
004aca52          
004aca67          this->m_itemInscriptionText->vtable->SetProperty(&var_18);
004aca67          
004aca7e          if (var_1c != 0)
004aca7e          {
004aca84              BaseProperty::CheckCopyOnWrite(&var_20);
004aca90              *(uint32_t*)(*(uint32_t*)var_1c + 0x74)(0);
004aca7e          }
004aca7e          
004aca93          this->m_itemInscriptionText->vtable->SetProperty(&var_20);
004acaa6          this->m_itemInscriptionBackground->vtable->SetMouseVisible(1);
004acab2          esp_1 = &var_40;
004ac775      }
004ac775      else
004ac775      {
004ac77f          struct Turbine_GUID* var_30;
004ac77f          int32_t* var_44_3 = &var_30;
004ac784          struct Turbine_GUID* var_48 = &PlayerDesc_ClassType;
004ac78a          var_30 = nullptr;
004ac795          class TResult __return;
004ac795          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_48, var_44_3);
004ac79a          struct Turbine_GUID* edi_1 = var_30;
004ac7a3          var_48 = edi_1;
004ac7a5          int32_t var_44_4 = 0;
004ac7a8          struct Turbine_GUID* eax_3 = var_48;
004ac7ac          int32_t var_10 = 0;
004ac7b0          int32_t var_c_1 = 0;
004ac7b0          
004ac7b4          if (eax_3 != 0)
004ac7ba              *(uint32_t*)(eax_3->m_data1 + 0x10)();
004ac7ba          
004ac7cf          int32_t var_2c = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_10, &var_2c);
004ac7cf          
004ac7d3          if (edi_1 != 0)
004ac7d9              *(uint32_t*)(edi_1->m_data1 + 0x14)();
004ac7d9          
004ac7dc          int32_t var_4c_3 = 0x7928af;
004ac7e5          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_38, &data_7928af);
004ac7ea          int32_t* ebx_1 = var_38;
004ac802          int32_t eax_7 = _stricmp(&this->m_scribe_name.m_buffer->m_data, &ebx_1[5]);
004ac809          bool cond:7_1;
004ac809          
004ac809          if (eax_7 != 0)
004ac809          {
004ac80b              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004ac812              uint32_t player_id;
004ac812              
004ac812              if (SmartBox::smartbox_1 == 0)
004ac81c                  player_id = 0;
004ac812              else
004ac814                  player_id = SmartBox::smartbox_1->player_id;
004ac814              
004ac81e              int32_t var_4c_5 = 0;
004ac820              int32_t var_50_2 = 0;
004ac835              class AC1Legacy::PStringBase<char> var_34;
004ac835              int32_t eax_10 = *(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&var_34, ACCWeenieObject::GetObjectName(player_id, NAME_SINGULAR, 0));
004ac845              int32_t eax_12 = _stricmp(&this->m_scribe_name.m_buffer->m_data, (eax_10 + 0x14));
004ac849              class AC1Legacy::PStringBase<char> eax_13 = var_34;
004ac850              char ebx_3 = ((int8_t)-(eax_12));
004ac850              
004ac868              if ((InterlockedDecrement((eax_13 + 4)) == 0 && eax_13 != 0))
004ac868              {
004ac86c                  int32_t var_4c_9 = 1;
004ac870                  **(uint32_t**)eax_13(1);
004ac868              }
004ac868              
004ac872              cond:7_1 = (ebx_3 - ebx_3) == 0xff;
004ac874              ebx_1 = var_38;
004ac809          }
004ac809          
004ac878          int32_t eax_16;
004ac878          
004ac878          if ((eax_7 == 0 || !(cond:7_1)))
004ac87e              eax_16 = ACCWeenieObject::IsOwnedByPlayer(var_30);
004ac87e          
004ac878          class PlayerDesc* edi_3;
004ac878          
004ac878          if (((eax_7 == 0 || !(cond:7_1)) && eax_16 != 0))
004ac878          {
004ac8a9              edi_3 = var_18;
004ac8ad              *(uint8_t*)((char*)var_3c)[3] = 1;
004ac878          }
004ac878          else
004ac878          {
004ac887              edi_3 = var_18;
004ac887              
004ac895              if ((edi_3 == 0 || var_2c < 0))
004ac8a2                  *(uint8_t*)((char*)var_3c)[3] = 0;
004ac895              else if (PlayerDesc::PlayerIsPSR(edi_3) != 0)
004ac8ad                  *(uint8_t*)((char*)var_3c)[3] = 1;
004ac8a0              else
004ac8a2                  *(uint8_t*)((char*)var_3c)[3] = 0;
004ac878          }
004ac878          
004ac8c2          if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
004ac8c2          {
004ac8c6              int32_t var_4c_11 = 1;
004ac8ca              **(uint32_t**)ebx_1(1);
004ac8c2          }
004ac8c2          
004ac8cc          int32_t eax_20;
004ac8cc          eax_20 = *(uint8_t*)((char*)var_3c)[3];
004ac8cc          
004ac8d6          if (eax_20 == 0)
004ac8d6          {
004ac948              if (var_1c != 0)
004ac948              {
004ac94e                  BaseProperty::CheckCopyOnWrite(&var_20);
004ac959                  int32_t var_4c_17 = 0;
004ac95b                  *(uint32_t*)(*(uint32_t*)var_1c + 0x74)(0);
004ac948              }
004ac948              
004ac95e              this->m_itemInscriptionText->vtable->SetProperty(&var_20);
004ac95e              
004ac977              if (__return != 0)
004ac977              {
004ac97d                  BaseProperty::CheckCopyOnWrite(&var_28);
004ac988                  int32_t var_4c_19 = 0;
004ac98a                  *(uint32_t*)(*(uint32_t*)__return + 0x74)(0);
004ac977              }
004ac977              
004ac98d              this->m_itemInscriptionText->vtable->SetProperty(&var_28);
004ac9a8              int32_t var_4c_21 = 1;
004ac9a0              this->m_itemInscriptionBackground->vtable->SetMouseVisible(1);
004ac9ac              esp_1 = &var_48;
004ac8d6          }
004ac8d6          else
004ac8d6          {
004ac8da              if (var_1c != 0)
004ac8da              {
004ac8e0                  BaseProperty::CheckCopyOnWrite(&var_20);
004ac8eb                  int32_t var_4c_12 = 1;
004ac8ed                  *(uint32_t*)(*(uint32_t*)var_1c + 0x74)(1);
004ac8da              }
004ac8da              
004ac8f0              this->m_itemInscriptionText->vtable->SetProperty(&var_20);
004ac8f0              
004ac909              if (__return != 0)
004ac909              {
004ac90f                  BaseProperty::CheckCopyOnWrite(&var_28);
004ac91a                  int32_t var_4c_14 = 1;
004ac91c                  *(uint32_t*)(*(uint32_t*)__return + 0x74)(1);
004ac909              }
004ac909              
004ac91f              this->m_itemInscriptionText->vtable->SetProperty(&var_28);
004ac93a              int32_t var_4c_16 = 0;
004ac932              this->m_itemInscriptionBackground->vtable->SetMouseVisible(0);
004ac93e              esp_1 = &var_48;
004ac8d6          }
004ac8d6          
004ac9b4          if (edi_3 != 0)
004ac9b6              edi_3->vtable->Release();
004ac775      }
004ac775      
004ac9bf      int32_t* eax_30 = esp_1[8];
004ac9bf      
004ac9c5      if (eax_30 != 0)
004ac9c5      {
004ac9cf          int32_t esi_5 = (eax_30[1] - 1);
004ac9cc          eax_30[1] = esi_5;
004ac9cc          
004ac9d6          if (esi_5 == 0)
004ac9d6          {
004ac9d8              int32_t eax_32 = *(uint32_t*)eax_30;
004ac9da              *(uint32_t*)((char*)esp_1 - 4) = 1;
004ac9dc              *(uint32_t*)eax_32();
004ac9d6          }
004ac9d6          
004ac9de          esp_1[8] = 0;
004ac9c5      }
004ac9c5      
004ac9e2      int32_t* eax_33 = esp_1[9];
004ac9e2      
004ac9e8      if (eax_33 != 0)
004ac9e8      {
004ac9f2          int32_t esi_7 = (eax_33[1] - 1);
004ac9ef          eax_33[1] = esi_7;
004ac9ef          
004ac9f9          if (esi_7 == 0)
004ac9f9          {
004ac9fb              int32_t edx_12 = *(uint32_t*)eax_33;
004ac9fd              *(uint32_t*)((char*)esp_1 - 4) = 1;
004ac9ff              *(uint32_t*)edx_12();
004ac9f9          }
004ac9f9          
004aca01          esp_1[9] = 0;
004ac9e8      }
004ac9e8      
004aca05      int32_t* eax_35 = esp_1[0xa];
004aca05      
004aca0b      if (eax_35 != 0)
004aca0b      {
004aca15          int32_t esi_9 = (eax_35[1] - 1);
004aca12          eax_35[1] = esi_9;
004aca12          
004aca1c          if (esi_9 == 0)
004aca1c          {
004aca1e              int32_t eax_37 = *(uint32_t*)eax_35;
004aca20              *(uint32_t*)((char*)esp_1 - 4) = 1;
004aca22              *(uint32_t*)eax_37();
004aca1c          }
004aca1c          
004aca24          esp_1[0xa] = 0;
004aca0b      }
004aca0b      
004aca28      int32_t* eax_38 = esp_1[0xb];
004aca28      
004aca2e      if (eax_38 != 0)
004aca2e      {
004aca38          int32_t esi_11 = (eax_38[1] - 1);
004aca35          eax_38[1] = esi_11;
004aca35          
004aca3f          if (esi_11 == 0)
004aca3f          {
004aca41              int32_t edx_15 = *(uint32_t*)eax_38;
004aca43              *(uint32_t*)((char*)esp_1 - 4) = 1;
004aca45              *(uint32_t*)edx_15();
004aca3f          }
004aca2e      }
004aca2e      
004aca47      *(uint32_t*)esp_1;
004aca47      esp_1[1];
004aca47      esp_1[2];
004ac720  }

004acabd                                                                                         90 90 90                               ...

004acac0  void __stdcall ItemExamineUI::GetAppraisalStringFromRequirements(class ItemExamineUI* this @ ecx, uint32_t arg2, int32_t arg3, int32_t arg4, class AC1Legacy::PStringBase<char>* arg5)

004acac0  {
004acad3      char* var_c;
004acad3      
004acad3      if (((arg2 == 2 || arg2 == 4) || arg2 == 6))
004acadc          var_c = "base ";
004acad3      else
004acad5          var_c = &data_7928af;
004acad5      
004acae1      class AC1Legacy::PStringBase<char>* esi = arg5;
004acae7      AC1Legacy::PStringBase<char>::set(esi, var_c);
004acae7      
004acaf2      if ((arg2 - 1) <= 0xb)
004acad3          switch (arg2)
004acad3          {
004acaff              case 1:
004acaff              case 2:
004acaff              case 8:
004acaff              {
004acaff                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004acb04                  arg5 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004acb0c                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004acb1c                  SkillSystem::InqSkillName(arg3, &arg5);
004acb2b                  AC1Legacy::PStringBase<char>::operator+=(esi, &arg5);
004acb30                  class AC1Legacy::PStringBase<char>* eax_2 = arg5;
004acb30                  
004acb4a                  if ((InterlockedDecrement(&eax_2[1]) == 0 && eax_2 != 0))
004acb50                      eax_2->m_buffer->vtable(1);
004acaff                  break;
004acaff              }
004acb5d              case 3:
004acb5d              case 4:
004acb5d              {
004acb5d                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004acb62                  arg5 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004acb6a                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004acb7a                  SkillSystem::InqAttributeName(arg3, &arg5);
004acbad              label_4acbad:
004acbad                  AC1Legacy::PStringBase<char>::operator+=(esi, &arg5);
004acbb6                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg5);
004acb5d                  break;
004acb5d              }
004acb81              case 5:
004acb81              case 6:
004acb81              {
004acb81                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004acb86                  arg5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004acb8e                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004acb9e                  SkillSystem::InqAttribute2ndName(arg3, &arg5);
004acb9e                  goto label_4acbad;
004acb81              }
004acc22              case 7:
004acc22              {
004acc22                  AC1Legacy::PStringBase<char>::set(esi, "level");
004acc22                  break;
004acc22              }
004acbc7              case 9:
004acbc7              case 0xa:
004acbc7              {
004acbc7                  AC1Legacy::PStringBase<char>::set(esi, "unknown quality");
004acbc7                  
004acbd7                  if (arg3 == 0x11f)
004acbd7                  {
004acc11                      AC1Legacy::PStringBase<char>::set(esi, "Standing with the Celestial Hand");
004acc18                      return;
004acbd7                  }
004acbd7                  
004acbda                  if (arg3 == 0x120)
004acbda                  {
004acc02                      AC1Legacy::PStringBase<char>::set(esi, "Standing with the Eldrytch Web");
004acc09                      return;
004acbda                  }
004acbda                  
004acbdd                  if (arg3 != 0x121)
004acbdd                  {
004acbe4                      AC1Legacy::PStringBase<char>::set(esi, "unknown quality");
004acbeb                      return;
004acbdd                  }
004acbdd                  
004acbf3                  AC1Legacy::PStringBase<char>::set(esi, "Standing with the Radiant Blood");
004acbc7                  break;
004acbc7              }
004acc32              case 0xb:
004acc32              {
004acc32                  AppraisalSystem::InqCreatureDisplayName(arg4, esi);
004acc32                  break;
004acc32              }
004acc45              case 0xc:
004acc45              {
004acc45                  AppraisalSystem::InqHeritageGroupDisplayName(arg4, esi);
004acc45                  break;
004acc45              }
004acad3          }
004acac0  }

004acc52                                                        8b ff                                                        ..
004acc54  uint32_t jump_table_4acc54[0xc] = 
004acc54  {
004acc54      [0x0] =  0x004acaff
004acc58      [0x1] =  0x004acaff
004acc5c      [0x2] =  0x004acb5d
004acc60      [0x3] =  0x004acb5d
004acc64      [0x4] =  0x004acb81
004acc68      [0x5] =  0x004acb81
004acc6c      [0x6] =  0x004acc1b
004acc70      [0x7] =  0x004acaff
004acc74      [0x8] =  0x004acbc0
004acc78      [0x9] =  0x004acbc0
004acc7c      [0xa] =  0x004acc2c
004acc80      [0xb] =  0x004acc3f
004acc84  }

004acc84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004acc90  void AppendHelper(class AC1Legacy::PStringBase<char>* arg1, char const* arg2)

004acc90  {
004acc99      class AC1Legacy::PStringBase<char>* edi = arg1;
004acc99      
004acca3      if (edi->m_buffer->m_len != 1)
004acca3      {
004accae          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_794334);
004accb3          class AC1Legacy::PStringBase<char>* esi_1 = arg1;
004accb7          int32_t eax_1 = *(int32_t*)((char*)esi_1 + 8);
004accb7          
004accc5          if ((eax_1 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004acccf              AC1Legacy::PStringBase<char>::append_n_chars(edi, &esi_1[5], (eax_1 - 1));
004acccf          
004accdc          if (InterlockedDecrement(&esi_1[1]) == 0)
004accde              esi_1->m_buffer->vtable(1);
004acca3      }
004acca3      
004accef      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, arg2);
004accf4      class AC1Legacy::PStringBase<char>* esi_2 = arg1;
004accf8      int32_t eax_5 = *(int32_t*)((char*)esi_2 + 8);
004accf8      
004acd06      if ((eax_5 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004acd10          AC1Legacy::PStringBase<char>::append_n_chars(edi, &esi_2[5], (eax_5 - 1));
004acd10      
004acd1d      if (InterlockedDecrement(&esi_2[1]) == 0)
004acd1f          esi_2->m_buffer->vtable(1);
004acc90  }

004acd2b                                   90 90 90 90 90                                                             .....

004acd30  void __fastcall BasicCreatureExamineUI::BasicCreatureExamineUI(class BasicCreatureExamineUI* this, class gmExaminationUI* arg2)

004acd30  {
004acd3a      this->vtable = 0x7af2f0;
004acd40      this->cur_objid = 0;
004acd43      this->cur_weenobj = nullptr;
004acd46      AppraisalProfile::AppraisalProfile(&this->cur_prof);
004acd4b      class gmExaminationUI* ecx_1 = arg2;
004acd51      this->m_pParentElement = ecx_1;
004acd54      this->vtable = 0x7af4c4;
004acd5a      this->m_basicCreatureExamineBaseField = nullptr;
004acd5d      this->m_levelValueText = nullptr;
004acd63      this->m_pPaperDoll = nullptr;
004acd69      this->m_p3DObj = nullptr;
004acd6f      this->m_extraInfoList = nullptr;
004acd6f      
004acd75      if (ecx_1 != 0)
004acd81          this->m_basicCreatureExamineBaseField = UIElement::GetChildRecursive(ecx_1, 0x10000140);
004acd81      
004acd84      class UIElement* m_basicCreatureExamineBaseField = this->m_basicCreatureExamineBaseField;
004acd84      
004acd89      if (m_basicCreatureExamineBaseField != 0)
004acd89      {
004acd94          class UIElement* eax_2 = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField, 0x1000014c);
004acd99          class UIElement* m_basicCreatureExamineBaseField_1 = this->m_basicCreatureExamineBaseField;
004acda1          this->m_levelValueText = eax_2;
004acda7          class UIElement* eax_3 = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField_1, 0x1000014d);
004acdac          class UIElement* m_basicCreatureExamineBaseField_2 = this->m_basicCreatureExamineBaseField;
004acdb4          this->m_creatureInfoSubPanel = eax_3;
004acdb7          class UIElement* eax_4 = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField_2, 0x1000014f);
004acdbc          class gmExaminationUI* m_pParentElement = this->m_pParentElement;
004acdc4          this->m_characterInfoSubPanel = eax_4;
004acdc7          class UIElement* eax_5 = UIElement::GetChildRecursive(m_pParentElement, 0x10000148);
004acdce          class UIElement_Viewport* eax_6;
004acdce          
004acdce          if (eax_5 == 0)
004acdde              eax_6 = nullptr;
004acdce          else
004acdd6              eax_6 = eax_5->vtable->DynamicCast(0xd);
004acdd6          
004acde0          class UIElement* m_basicCreatureExamineBaseField_3 = this->m_basicCreatureExamineBaseField;
004acde8          this->m_pPaperDoll = eax_6;
004acdee          class UIElement* eax_7 = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField_3, 0x10000335);
004acdf5          class UIElement_ListBox* eax_8;
004acdf5          
004acdf5          if (eax_7 == 0)
004ace05              eax_8 = nullptr;
004acdf5          else
004acdfd              eax_8 = eax_7->vtable->DynamicCast(5);
004acdfd          
004ace07          class UIElement* m_basicCreatureExamineBaseField_4 = this->m_basicCreatureExamineBaseField;
004ace0f          this->m_extraInfoList = eax_8;
004ace15          class UIElement* eax_9 = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField_4, 0x10000149);
004ace1c          class UIElement_ListBox* esi_1;
004ace1c          
004ace1c          if (eax_9 == 0)
004ace2e              esi_1 = nullptr;
004ace1c          else
004ace2a              esi_1 = eax_9->vtable->DynamicCast(5);
004ace2a          
004ace36          if (BasicCreatureExamineUI::m_rgTokens.m_num == 0)
004ace36          {
004ace3e              void* eax_11 = operator new(0x18);
004ace3e              
004ace48              if (eax_11 == 0)
004ace69                  arg2 = nullptr;
004ace48              else
004ace63                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_11, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 1, INVALID_DID.id, 0);
004ace63              
004ace77              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ace7e              void* eax_13 = operator new(0x18);
004ace7e              
004ace88              if (eax_13 == 0)
004acea9                  arg2 = nullptr;
004ace88              else
004acea3                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_13, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 2, INVALID_DID.id, 0);
004acea3              
004aceb7              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004acebe              void* eax_15 = operator new(0x18);
004acebe              
004acec8              if (eax_15 == 0)
004acee9                  arg2 = nullptr;
004acec8              else
004acee3                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_15, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 4, INVALID_DID.id, 0);
004acee3              
004acef7              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004acefe              void* eax_17 = operator new(0x18);
004acefe              
004acf08              if (eax_17 == 0)
004acf29                  arg2 = nullptr;
004acf08              else
004acf23                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_17, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 3, INVALID_DID.id, 0);
004acf23              
004acf37              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004acf3e              void* eax_19 = operator new(0x18);
004acf3e              
004acf48              if (eax_19 == 0)
004acf69                  arg2 = nullptr;
004acf48              else
004acf63                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_19, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 5, INVALID_DID.id, 0);
004acf63              
004acf77              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004acf7e              void* eax_21 = operator new(0x18);
004acf7e              
004acf88              if (eax_21 == 0)
004acfa9                  arg2 = nullptr;
004acf88              else
004acfa3                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_21, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 6, INVALID_DID.id, 0);
004acfa3              
004acfb7              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004acfbe              void* eax_23 = operator new(0x20);
004acfbe              
004acfc8              if (eax_23 == 0)
004acfeb                  arg2 = nullptr;
004acfc8              else
004acfe5                  arg2 = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_23, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 2, 1, INVALID_DID.id, 0);
004acfe5              
004acff9              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad000              void* eax_25 = operator new(0x20);
004ad000              
004ad00a              if (eax_25 == 0)
004ad02c                  arg2 = nullptr;
004ad00a              else
004ad026                  arg2 = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_25, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 4, 0, INVALID_DID.id, 0);
004ad026              
004ad03a              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad041              void* eax_27 = operator new(0x20);
004ad041              
004ad04b              if (eax_27 == 0)
004ad06d                  arg2 = nullptr;
004ad04b              else
004ad067                  arg2 = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_27, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 6, 0, INVALID_DID.id, 0);
004ad067              
004ad07b              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ace36          }
004ace36          
004ad086          if (esi_1->m_listItems.m_num == 0)
004ad086          {
004ad08e              void* eax_29 = operator new(0x18);
004ad08e              
004ad098              if (eax_29 == 0)
004ad0b9                  arg2 = nullptr;
004ad098              else
004ad0b3                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_29, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 1, INVALID_DID.id, 0);
004ad0b3              
004ad0c7              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad0ce              void* eax_31 = operator new(0x18);
004ad0ce              
004ad0d8              if (eax_31 == 0)
004ad0f9                  arg2 = nullptr;
004ad0d8              else
004ad0f3                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_31, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 2, INVALID_DID.id, 0);
004ad0f3              
004ad107              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad10e              void* eax_33 = operator new(0x18);
004ad10e              
004ad118              if (eax_33 == 0)
004ad139                  arg2 = nullptr;
004ad118              else
004ad133                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_33, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 4, INVALID_DID.id, 0);
004ad133              
004ad147              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad14e              void* eax_35 = operator new(0x18);
004ad14e              
004ad158              if (eax_35 == 0)
004ad179                  arg2 = nullptr;
004ad158              else
004ad173                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_35, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 3, INVALID_DID.id, 0);
004ad173              
004ad187              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad18e              void* eax_37 = operator new(0x18);
004ad18e              
004ad198              if (eax_37 == 0)
004ad1b9                  arg2 = nullptr;
004ad198              else
004ad1b3                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_37, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 5, INVALID_DID.id, 0);
004ad1b3              
004ad1c7              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad1ce              void* eax_39 = operator new(0x18);
004ad1ce              
004ad1d8              if (eax_39 == 0)
004ad1f9                  arg2 = nullptr;
004ad1d8              else
004ad1f3                  arg2 = AttributeInfoRegion::AttributeInfoRegion(eax_39, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 6, INVALID_DID.id, 0);
004ad1f3              
004ad207              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad20e              void* eax_41 = operator new(0x20);
004ad20e              
004ad218              if (eax_41 == 0)
004ad23b                  arg2 = nullptr;
004ad218              else
004ad235                  arg2 = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_41, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 2, 1, INVALID_DID.id, 0);
004ad235              
004ad249              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad250              void* eax_43 = operator new(0x20);
004ad250              
004ad25a              if (eax_43 == 0)
004ad27c                  arg2 = nullptr;
004ad25a              else
004ad276                  arg2 = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_43, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 4, 0, INVALID_DID.id, 0);
004ad276              
004ad28a              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad291              void* eax_45 = operator new(0x20);
004ad291              
004ad29b              if (eax_45 == 0)
004ad2bd                  arg2 = nullptr;
004ad29b              else
004ad2b7                  arg2 = Attribute2ndInfoRegion::Attribute2ndInfoRegion(eax_45, esi_1, BasicCreatureExamineUI::m_rgTokens.m_num, 6, 0, INVALID_DID.id, 0);
004ad2b7              
004ad2cb              SmartArray<unsigned long,1>::AddToEnd(&BasicCreatureExamineUI::m_rgTokens, &arg2);
004ad086          }
004acd89      }
004acd30  }

004ad2d8                                                                          90 90 90 90 90 90 90 90                          ........

004ad2e0  void __fastcall BasicCreatureExamineUI::~BasicCreatureExamineUI(class BasicCreatureExamineUI* this)

004ad2e0  {
004ad2e0      class BasicCreatureExamineUI* this_1 = this;
004ad2e1      this_1 = this;
004ad2e5      this->vtable = 0x7af4c4;
004ad2ef      class UIElement_ListBox* m_extraInfoList = this_1->m_extraInfoList;
004ad2ef      
004ad2f7      if (m_extraInfoList != 0)
004ad2f9          UIElement_ListBox::Flush(m_extraInfoList);
004ad2f9      
004ad2fe      uint32_t m_num = BasicCreatureExamineUI::m_rgTokens.m_num;
004ad305      int32_t esi = 0;
004ad305      
004ad309      if (m_num > 0)
004ad309      {
004ad339          do
004ad339          {
004ad316              int32_t* ecx_1 = BasicCreatureExamineUI::m_rgTokens.m_data[esi];
004ad316              
004ad31b              if (ecx_1 != 0)
004ad321                  *(uint32_t*)(*(uint32_t*)ecx_1 + 8)(1);
004ad321              
004ad324              BasicCreatureExamineUI::m_rgTokens.m_data[esi] = 0;
004ad330              m_num = BasicCreatureExamineUI::m_rgTokens.m_num;
004ad336              esi += 1;
004ad339          } while (esi < m_num);
004ad309      }
004ad309      
004ad33b      int32_t i = 0;
004ad33f      class BasicCreatureExamineUI** esp = &this_1;
004ad33f      
004ad340      if (m_num > 0)
004ad340      {
004ad358          do
004ad358          {
004ad342              BasicCreatureExamineUI::m_rgTokens.m_data[i] = 0;
004ad355              i += 1;
004ad358          } while (i < BasicCreatureExamineUI::m_rgTokens.m_num);
004ad340      }
004ad340      
004ad35a      class BasicCreatureExamineUI* this_2 = this_1;
004ad35e      BasicCreatureExamineUI::m_rgTokens.m_num = 0;
004ad368      class UIElement_Viewport* m_pPaperDoll = this_2->m_pPaperDoll;
004ad368      
004ad370      if (m_pPaperDoll != 0)
004ad378          CreatureMode::RemoveAllObjects(&m_pPaperDoll->creature_mode_objects);
004ad378      
004ad381      class CPhysicsObj* m_p3DObj = this_1->m_p3DObj;
004ad381      
004ad389      if (m_p3DObj != 0)
004ad389      {
004ad38d          class BasicCreatureExamineUI* __saved_esi;
004ad38d          esp = &__saved_esi;
004ad38b          m_p3DObj->vtable->__vecDelDtor(1);
004ad389      }
004ad389      
004ad391      *(uint32_t*)esp->m_p3DObj = nullptr;
004ad39f      *(uint32_t*)esp->vtable = 0x7af2f0;
004ad3b3      /* tailcall */
004ad3b3      return AppraisalProfile::~AppraisalProfile(&*(uint32_t*)esp->cur_prof);
004ad2e0  }

004ad30d                                         8d 49 00                                                               .I.
004ad3b8                                                                          90 90 90 90 90 90 90 90                          ........

004ad3c0  void __thiscall CharExamineUI::CharExamineUI(class CharExamineUI* this, class gmExaminationUI* arg2)

004ad3c0  {
004ad3c5      class gmExaminationUI* var_8 = arg2;
004ad3c8      class gmExaminationUI* edx;
004ad3c8      BasicCreatureExamineUI::BasicCreatureExamineUI(this, edx);
004ad3cd      class UIElement* m_basicCreatureExamineBaseField = this->m_basicCreatureExamineBaseField;
004ad3d4      this->vtable = 0x7af4dc;
004ad3da      this->m_displayText_Heritage = nullptr;
004ad3e0      this->m_displayText_Profession = nullptr;
004ad3e6      this->m_displayText_PlayerKiller = nullptr;
004ad3ec      this->m_displayText_AllegianceName = nullptr;
004ad3ec      
004ad3f2      if (m_basicCreatureExamineBaseField != 0)
004ad3f2      {
004ad3f9          class UIElement* eax = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField, 0x10000150);
004ad3fe          class UIElement* m_basicCreatureExamineBaseField_1 = this->m_basicCreatureExamineBaseField;
004ad406          this->m_displayText_Heritage = eax;
004ad40c          class UIElement* eax_1 = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField_1, 0x10000151);
004ad411          class UIElement* m_basicCreatureExamineBaseField_2 = this->m_basicCreatureExamineBaseField;
004ad419          this->m_displayText_Profession = eax_1;
004ad41f          class UIElement* eax_2 = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField_2, 0x10000152);
004ad424          class UIElement* m_basicCreatureExamineBaseField_3 = this->m_basicCreatureExamineBaseField;
004ad42c          this->m_displayText_PlayerKiller = eax_2;
004ad437          this->m_displayText_AllegianceName = UIElement::GetChildRecursive(m_basicCreatureExamineBaseField_3, 0x1000053a);
004ad3f2      }
004ad3c0  }

004ad443           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ad450  struct Turbine_GUID* SpellExamineUI::DetermineSpellRange(class SpellExamineUI* this @ ecx, class CSpellBase* arg2)

004ad450  {
004ad453      struct Turbine_GUID* ebx;
004ad453      struct Turbine_GUID* var_1c = ebx;
004ad454      struct Turbine_GUID* esi;
004ad454      struct Turbine_GUID* var_20 = esi;
004ad455      struct Turbine_GUID* edi;
004ad455      struct Turbine_GUID* var_24 = edi;
004ad45a      struct Turbine_GUID* var_4;
004ad45a      int32_t* var_28 = &var_4;
004ad45f      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004ad467      var_4 = nullptr;
004ad472      void __return;
004ad472      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004ad477      struct Turbine_GUID* ecx_1 = var_4;
004ad480      var_2c = ecx_1;
004ad482      int32_t var_28_1 = 0;
004ad485      struct Turbine_GUID* eax_1 = var_2c;
004ad48b      struct Turbine_GUID* var_14 = nullptr;
004ad48f      struct Turbine_GUID* var_10 = nullptr;
004ad48f      
004ad493      if (eax_1 != 0)
004ad499          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004ad499      
004ad4a5      struct Turbine_GUID* var_c;
004ad4a5      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_14, &var_c);
004ad4a5      
004ad4ac      if (ecx_1 != 0)
004ad4b2          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004ad4b2      
004ad4b5      struct Turbine_GUID* ebx_1 = var_4;
004ad4bb      var_20 = nullptr;
004ad4c6      struct Turbine_GUID** esp;
004ad4c6      class CACQualities* esi_2;
004ad4c6      
004ad4c6      if (CSpellBase::InqSkillForSpell(ebx_1) != 0)
004ad4c6      {
004ad57b          uint32_t eax_7 = CSpellBase::InqSkillForSpell(ebx_1);
004ad580          esi_2 = var_1c;
004ad587          CACQualities::InqSkillLevel(esi_2, eax_7, &var_20);
004ad587          esp = &var_2c;
004ad4c6      }
004ad4c6      else
004ad4c6      {
004ad4cc          esi_2 = var_1c;
004ad4d9          var_10 = nullptr;
004ad4dd          CACQualities::InqSkillLevel(esi_2, 0x1f, &var_10);
004ad4eb          var_14 = nullptr;
004ad4ef          CACQualities::InqSkillLevel(esi_2, 0x20, &var_14);
004ad4fd          var_1c = nullptr;
004ad501          CACQualities::InqSkillLevel(esi_2, 0x21, &var_1c);
004ad50f          var_4 = nullptr;
004ad513          CACQualities::InqSkillLevel(esi_2, 0x22, &var_4);
004ad521          var_c = nullptr;
004ad525          CACQualities::InqSkillLevel(esi_2, 0x2b, &var_c);
004ad525          esp = &var_2c;
004ad534          struct Turbine_GUID** eax_4 = &var_4;
004ad534          
004ad538          if (var_1c >= var_4)
004ad53a              eax_4 = &var_1c;
004ad53a          
004ad544          if (var_14 >= *(uint32_t*)eax_4)
004ad546              eax_4 = &var_14;
004ad546          
004ad550          if (var_10 >= *(uint32_t*)eax_4)
004ad552              eax_4 = &var_10;
004ad552          
004ad556          struct Turbine_GUID* eax_5 = *(uint32_t*)eax_4;
004ad558          struct Turbine_GUID* ecx_12 = var_c;
004ad55c          var_20 = eax_5;
004ad562          struct Turbine_GUID** eax_6 = &var_20;
004ad562          
004ad566          if (ecx_12 >= eax_5)
004ad568              eax_6 = &var_c;
004ad568          
004ad56e          var_20 = *(uint32_t*)eax_6;
004ad4c6      }
004ad4c6      
004ad593      long double x87_r7_2 = ((((long double)*(int32_t*)((char*)ebx_1 + 0x28)) * ((long double)var_20)) + ((long double)*(int32_t*)((char*)ebx_1 + 0x24)));
004ad596      var_4 = ((float)x87_r7_2);
004ad59a      long double temp1 = ((long double)75f);
004ad59a      (x87_r7_2 - temp1);
004ad5a0      struct Turbine_GUID* result;
004ad5a0      result = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
004ad5a0      
004ad5a5      if ((*(uint8_t*)((char*)result)[1] & 0x41) == 0)
004ad5ad          var_4 = 0x42960000;
004ad5ad      
004ad5b3      if (esi_2 != 0)
004ad5b3      {
004ad5b9          result = esi_2->vtable->Release();
004ad5b9          esp = &var_24;
004ad5b3      }
004ad5b3      
004ad5bc      esp[0xa];
004ad5c0      *(uint32_t*)esp;
004ad5c0      esp[1];
004ad5c0      esp[2];
004ad5c6      return result;
004ad450  }

004ad5c9                             90 90 90 90 90 90 90                                                           .......

004ad5d0  uint8_t __thiscall AC1Legacy::PStringBase<char>::convert(class AC1Legacy::PStringBase<char>* this, int32_t arg2, int32_t arg3)

004ad5d0  {
004ad5d9      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004ad5d9      
004ad5dd      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
004ad5dd      {
004ad5ef          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004ad5f1              m_buffer->vtable->__vecDelDtor(1);
004ad5f1          
004ad5f9          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ad604          this->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ad606          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
004ad5dd      }
004ad5dd      
004ad613      AC1Legacy::PStringBase<char>::append_int32(this, arg2);
004ad613      
004ad61e      if (arg3 != 0)
004ad629          return AC1Legacy::PStringBase<char>::InsertCommas(this);
004ad629      
004ad62d      int32_t eax_2;
004ad62d      eax_2 = 1;
004ad630      return 1;
004ad5d0  }

004ad633                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004ad640  class AC1Legacy::PStringBase<char>* __thiscall AC1Legacy::PStringBase<char>::operator=(class AC1Legacy::PStringBase<char>* this, int32_t arg2)

004ad640  {
004ad649      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004ad649      
004ad64d      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
004ad64d      {
004ad65f          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004ad661              m_buffer->vtable->__vecDelDtor(1);
004ad661          
004ad669          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ad674          this->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ad676          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
004ad64d      }
004ad64d      
004ad683      AC1Legacy::PStringBase<char>::append_int32(this, arg2);
004ad68a      AC1Legacy::PStringBase<char>::InsertCommas(this);
004ad693      return this;
004ad640  }

004ad696                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004ad6a0  void __fastcall gmExaminationUI::PostInit(class gmExaminationUI* this)

004ad6a0  {
004ad6a4      UIElement::PostInit(this);
004ad6b0      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000012d);
004ad6b7      class UIElement_Text* eax_1;
004ad6b7      
004ad6b7      if (eax == 0)
004ad6c7          eax_1 = nullptr;
004ad6b7      else
004ad6bf          eax_1 = eax->vtable->DynamicCast(0xc);
004ad6bf      
004ad6ce      this->m_displayedNameText = eax_1;
004ad6d4      void* eax_2 = operator new(0xa8);
004ad6de      class ItemExamineUI* eax_3;
004ad6de      
004ad6de      if (eax_2 == 0)
004ad6ea          eax_3 = nullptr;
004ad6de      else
004ad6e3          eax_3 = ItemExamineUI::ItemExamineUI(eax_2, this);
004ad6e3      
004ad6f1      this->m_itemUI = eax_3;
004ad6f7      void* eax_4;
004ad6f7      class gmExaminationUI* edx_2;
004ad6f7      eax_4 = operator new(0x94);
004ad6fc      void* edi = eax_4;
004ad6fc      
004ad703      if (edi == 0)
004ad736          edi = nullptr;
004ad703      else
004ad703      {
004ad705          class gmExaminationUI* __saved_ebx_2 = this;
004ad708          BasicCreatureExamineUI::BasicCreatureExamineUI(edi, edx_2);
004ad70d          class UIElement* ecx_4 = *(uint32_t*)((char*)edi + 0x74);
004ad712          *(uint32_t*)edi = 0x7af4d0;
004ad718          *(uint32_t*)((char*)edi + 0x90) = 0;
004ad718          
004ad722          if (ecx_4 != 0)
004ad72e              *(uint32_t*)((char*)edi + 0x90) = UIElement::GetChildRecursive(ecx_4, 0x1000014e);
004ad703      }
004ad703      
004ad73d      this->m_creatureUI = edi;
004ad743      void* eax_6 = operator new(0xa0);
004ad74d      class CharExamineUI* eax_7;
004ad74d      
004ad74d      if (eax_6 == 0)
004ad759          eax_7 = nullptr;
004ad74d      else
004ad752          eax_7 = CharExamineUI::CharExamineUI(eax_6, this);
004ad752      
004ad760      this->m_charUI = eax_7;
004ad766      void* eax_8 = operator new(0xa0);
004ad770      class SpellExamineUI* eax_9;
004ad770      
004ad770      if (eax_8 == 0)
004ad77c          eax_9 = nullptr;
004ad770      else
004ad775          eax_9 = SpellExamineUI::SpellExamineUI(eax_8, this);
004ad775      
004ad782      this->m_spellUI = eax_9;
004ad788      UIListener::RegisterForGlobalMessage(this, 3);
004ad78d      class GlobalEventHandler* eax_10 = GlobalEventHandler::GetGlobalEventHandler();
004ad78d      
004ad796      if (eax_10 != 0)
004ad796      {
004ad798          eax_10->vtable->RegisterNoticeHandler(0x4dd1e7, &this->vtable);
004ad7ac          eax_10->vtable->RegisterNoticeHandler(0x4dd1ed, &this->vtable);
004ad7b9          eax_10->vtable->RegisterNoticeHandler(0x4dd1ee, &this->vtable);
004ad7c6          eax_10->vtable->RegisterNoticeHandler(0x4dd1ef, &this->vtable);
004ad7d3          eax_10->vtable->RegisterNoticeHandler(0x4dd255, &this->vtable);
004ad7e0          eax_10->vtable->RegisterNoticeHandler(0x186a8, &this->vtable);
004ad796      }
004ad796      
004ad7f7      gmExaminationUI::SetActiveExamineUI(this, this->m_itemUI);
004ad6a0  }

004ad7ff                                                                                               90                                 .

004ad800  void __thiscall gmExaminationUI::RecvNotice_ServerSaysMoveItem(class gmExaminationUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004ad800  {
004ad800      struct IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::VTable* vtable = this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable;
004ad800      
004ad80a      if (arg2 == *(int32_t*)((char*)vtable + 4))
004ad80c          ItemExamineUI::SetInscriptionEditableState(vtable);
004ad800  }

004ad814                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004ad820  void __thiscall AC1Legacy::PStringBase<char>::PStringBase<char>(class AC1Legacy::PStringBase<char>* this, int32_t arg2)

004ad820  {
004ad820      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ad826      class AC1Legacy::PSRefBuffer<char>** this_1 = this;
004ad82e      *(uint32_t*)this_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ad830      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004ad83d      AC1Legacy::PStringBase<char>::operator=(this_1, arg2);
004ad820  }

004ad848                          90 90 90 90 90 90 90 90                                                          ........

004ad850  void __fastcall gmExaminationUI::~gmExaminationUI(class gmExaminationUI* this)

004ad850  {
004ad856      class ItemExamineUI* m_itemUI = this->m_itemUI;
004ad866      this->vtable = 0x7af1b0;
004ad860      this->vtable = &gmExaminationUI::`vftable';
004ad860      
004ad872      if (m_itemUI != 0)
004ad872      {
004ad876          ItemExamineUI::~ItemExamineUI(m_itemUI);
004ad87c          operator delete(m_itemUI);
004ad872      }
004ad872      
004ad884      class CreatureExamineUI* m_creatureUI = this->m_creatureUI;
004ad88c      this->m_itemUI = nullptr;
004ad88c      
004ad892      if (m_creatureUI != 0)
004ad892      {
004ad896          m_creatureUI->vtable = 0x7af4d0;
004ad89c          BasicCreatureExamineUI::~BasicCreatureExamineUI(m_creatureUI);
004ad8a2          operator delete(m_creatureUI);
004ad892      }
004ad892      
004ad8aa      class CharExamineUI* m_charUI = this->m_charUI;
004ad8b2      this->m_creatureUI = nullptr;
004ad8b2      
004ad8b8      if (m_charUI != 0)
004ad8b8      {
004ad8bc          m_charUI->vtable = 0x7af4dc;
004ad8c2          BasicCreatureExamineUI::~BasicCreatureExamineUI(m_charUI);
004ad8c8          operator delete(m_charUI);
004ad8b8      }
004ad8b8      
004ad8d0      class SpellExamineUI* m_spellUI = this->m_spellUI;
004ad8d8      this->m_charUI = nullptr;
004ad8d8      
004ad8de      if (m_spellUI != 0)
004ad8de      {
004ad8e3          m_spellUI->vtable = 0x7af2f0;
004ad8e9          AppraisalProfile::~AppraisalProfile(&m_spellUI->cur_prof);
004ad8ef          operator delete(m_spellUI);
004ad8de      }
004ad8de      
004ad8fb      this->m_spellUI = nullptr;
004ad901      UIListener::UnRegisterForGlobalMessage(this, 3);
004ad906      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ad906      
004ad90d      if (eax != 0)
004ad90f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004ad90f      
004ad860      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ad91f      NoticeHandler::~NoticeHandler(&this->vtable);
004ad92a      /* tailcall */
004ad92a      return UIElement_Field::~UIElement_Field(this);
004ad850  }

004ad92f                                               90                                                                 .

004ad930  void __thiscall gmExaminationUI::SetTitleText(class gmExaminationUI* this, char const* arg2, int32_t arg3)

004ad930  {
004ad93f      if (this->m_displayedNameText != 0)
004ad93f      {
004ad946          int32_t esi_1 = arg3;
004ad946          
004ad94d          if (esi_1 <= 1)
004ad94d          {
004adaa4              class PStringBase<unsigned short>* eax_19 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, arg2);
004adab0              UIElement_Text::SetText(this->m_displayedNameText, eax_19);
004adab9              void* esi_7 = &arg2[0xffffffec];
004adab9              
004adacc              if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
004adad4                  **(uint32_t**)esi_7(1);
004ad94d          }
004ad94d          else
004ad94d          {
004ad953              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ad958              arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ad960              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004ad960              
004ad974              if (AC1Legacy::PStringBase<char>::convert(&arg3, esi_1, 1) == 0)
004ad97f                  AC1Legacy::PStringBase<char>::set(&arg3, &data_7af4e8);
004ad97f              
004ad988              int32_t ebx;
004ad988              int32_t var_1c_2 = ebx;
004ad98e              class AC1Legacy::PStringBase<char> var_c;
004ad98e              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, arg2);
004ad99c              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794098);
004ad9ca              class AC1Legacy::PStringBase<char> __return;
004ad9ca              class AC1Legacy::PStringBase<char> __return_1;
004ad9ca              AC1Legacy::PStringBase<char>::operator=(&arg3, AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(&arg3, &__return_1, &arg2), &__return, &var_c));
004ad9cf              class AC1Legacy::PStringBase<char> __return_2 = __return;
004ad9cf              
004ad9e5              if ((InterlockedDecrement((__return_2 + 4)) == 0 && __return_2 != 0))
004ad9ed                  **(uint32_t**)__return_2(1);
004ad9ed              
004ad9ef              class AC1Legacy::PStringBase<char> __return_3 = __return_1;
004ad9ef              
004ad9ff              if ((InterlockedDecrement((__return_3 + 4)) == 0 && __return_3 != 0))
004ada07                  **(uint32_t**)__return_3(1);
004ada07              
004ada09              char const* esi_2 = arg2;
004ada09              
004ada19              if ((InterlockedDecrement(&esi_2[4]) == 0 && esi_2 != 0))
004ada21                  **(uint32_t**)esi_2(1);
004ada21              
004ada23              class AC1Legacy::PStringBase<char> esi_3 = var_c;
004ada23              
004ada33              if ((InterlockedDecrement((esi_3 + 4)) == 0 && esi_3 != 0))
004ada3b                  **(uint32_t**)esi_3(1);
004ada3b              
004ada3d              int32_t edi_1 = arg3;
004ada4b              class PStringBase<unsigned short>* eax_14;
004ada4b              int32_t ebx_1;
004ada4b              eax_14 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, (edi_1 + 0x14));
004ada57              UIElement_Text::SetText(this->m_displayedNameText, eax_14);
004ada60              void* esi_5 = &arg2[0xffffffec];
004ada60              
004ada6f              if ((ebx_1(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
004ada77                  **(uint32_t**)esi_5(1);
004ada77              
004ada86              if ((ebx_1((edi_1 + 4)) == 0 && edi_1 != 0))
004ada8e                  **(uint32_t**)edi_1(1);
004ad94d          }
004ad93f      }
004ad930  }

004adadf                                                                                               90                                 .

004adae0  void __thiscall gmExaminationUI::SetAppraiseInfo(class gmExaminationUI* this, uint32_t arg2, class AppraisalProfile const* arg3)

004adae0  {
004adae4      uint32_t ebx = arg2;
004adae4      
004adaf0      if (ebx != 0)
004adaf0      {
004adaf6          uint32_t awaiting_appraisal_ID = this->awaiting_appraisal_ID;
004adaf6          
004adb06          if ((ebx == awaiting_appraisal_ID || ebx == this->current_appraisal_ID))
004adb06          {
004adb0e              arg2 = 0;
004adb0e              
004adb13              if (ebx == awaiting_appraisal_ID)
004adb13              {
004adb15                  this->awaiting_appraisal_ID = 0;
004adb22                  ClientUISystem::DecrementBusyCount(ClientUISystem::GetUISystem());
004adb27                  this->current_appraisal_ID = ebx;
004adb2d                  arg2 = 1;
004adb13              }
004adb13              
004adb37              void var_38;
004adb37              CreatureAppraisalProfile::CreatureAppraisalProfile(&var_38);
004adb4e              class ExamineSubUI* esi_2;
004adb4e              
004adb4e              if (AppraisalProfile::InqCreature(arg3, &var_38) == 0)
004adbbd                  esi_2 = this->m_itemUI;
004adb4e              else
004adb4e              {
004adb50                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004adb55                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004adb5d                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004adb6c                  int32_t var_3c = 0;
004adb70                  int32_t eax_4 = AppraisalProfile::InqString(arg3, 5, &AC1Legacy::PStringBase<char>::s_NullBuffer_4);
004adb77                  int32_t eax_5;
004adb77                  
004adb77                  if (eax_4 == 0)
004adb85                      eax_5 = AppraisalProfile::InqInt(arg3, 0x105, &var_3c);
004adb85                  
004adb8c                  if ((eax_4 != 0 || eax_5 != 0))
004adb96                      esi_2 = this->m_charUI;
004adb8c                  else
004adb8e                      esi_2 = this->m_creatureUI;
004adb8e                  
004adb9c                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004adb9c                  
004adbb0                  if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
004adbb2                      AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
004adb4e              }
004adb4e              
004adbc3              bool cond:2_1 = ebx != esi_2->cur_objid;
004adbcc              class ACCWeenieObject* eax_8 = ClientObjMaintSystem::GetWeenieObject(ebx);
004adbcc              
004adbd8              if (eax_8 != 0)
004adbd8              {
004adbde                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004adbe3                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004adbeb                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004adc03                  char* var_60_1;
004adc03                  uint32_t _stackSize;
004adc03                  
004adc03                  if (AppraisalProfile::InqString(arg3, 0x34, &AC1Legacy::PStringBase<char>::s_NullBuffer_3) == 0)
004adc03                  {
004adc1c                      _stackSize = eax_8->pwd._stackSize;
004adc28                      var_60_1 = ACCWeenieObject::GetObjectName(eax_8, NAME_APPROPRIATE, 0);
004adc03                  }
004adc03                  else
004adc03                  {
004adc0f                      _stackSize = eax_8->pwd._stackSize;
004adc13                      var_60_1 = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data;
004adc03                  }
004adc03                  
004adc2b                  gmExaminationUI::SetTitleText(this, var_60_1, _stackSize);
004adc30                  esi_2->vtable->Init(ebx, eax_8);
004adc41                  esi_2->vtable->SetAppraiseInfo(arg3, ((uint32_t)cond:2_1));
004adc41                  
004adc50                  if (this->m_activeUI != esi_2)
004adc55                      gmExaminationUI::SetActiveExamineUI(this, esi_2);
004adc55                  
004adc60                  if (arg2 != 0)
004adc62                      this->vtable->SetVisible(1);
004adc62                  
004adc6b                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004adc6b                  
004adc7f                  if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0))
004adc81                      AC1Legacy::PStringBase<char>::s_NullBuffer_6->vtable->__vecDelDtor(1);
004adbd8              }
004adb06          }
004adaf0      }
004adae0  }

004adc93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004adca0  void __thiscall ItemExamineUI::AddItemInfo(class ItemExamineUI* this, char const* arg2, int32_t arg3, int32_t arg4)

004adca0  {
004adca3      class UIElement_Text* m_itemDisplayText = this->m_itemDisplayText;
004adca3      
004adcab      if (m_itemDisplayText != 0)
004adcab      {
004adcc0          if (m_itemDisplayText->m_glyphList.m_glyphList._num_elements > 1)
004adcc0          {
004adccc              uint16_t* var_10_1;
004adccc              
004adccc              if (arg4 == 0)
004adcd5                  var_10_1 = &data_7af34c;
004adccc              else
004adcce                  var_10_1 = &data_79c288;
004adcce              
004adcda              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg4, var_10_1);
004adcea              UIElement_Text::AppendText(this->m_itemDisplayText, &arg4);
004adcf3              int32_t* esi_2 = (arg4 - 0x14);
004adcf3              
004add02              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004add0a                  **(uint32_t**)esi_2(1);
004adcc0          }
004adcc0          
004add1e          class PStringBase<unsigned short>* eax_3;
004add1e          int32_t ebx_1;
004add1e          eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg4, WidthConvert, arg2);
004add2a          UIElement_Text::AppendTextWithFont(this->m_itemDisplayText, eax_3, 0, arg3);
004add33          int32_t* esi_4 = (arg4 - 0x14);
004add33          
004add42          if ((ebx_1(&esi_4[1]) == 0 && esi_4 != 0))
004add4a              **(uint32_t**)esi_4(1);
004adcab      }
004adca0  }

004add52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004add60  void __thiscall ItemExamineUI::SetValueText(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004add60  {
004add6c      int32_t var_8;
004add6c      
004add6c      if (this->m_itemValueText != 0)
004add6c      {
004add85          if (AppraisalProfile::InqInt(arg2, 0x13, &var_8) == 0)
004add85          {
004ade64              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Value: ???");
004ade71              UIElement_Text::SetText(this->m_itemValueText, &arg2);
004ade7a              void* __offset(AppraisalProfile, -0x14) esi_4 = ((char*)arg2 - 0x14);
004ade7a              
004ade8d              if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004ade95                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004add85          }
004add85          else
004add85          {
004add8b              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004add90              arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004add98              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004add98              
004addb0              if (AC1Legacy::PStringBase<char>::convert(&arg2, var_8, 1) == 0)
004addbb                  AC1Legacy::PStringBase<char>::set(&arg2, &data_7af4e8);
004addbb              
004adddd              class AC1Legacy::PStringBase<char> __return;
004adddd              AC1Legacy::PStringBase<char>::operator=(&arg2, AC1Legacy::operator+(&__return, "Value: ", &arg2));
004adde2              class AC1Legacy::PStringBase<char> __return_1 = __return;
004adde2              
004addf8              if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004ade00                  **(uint32_t**)__return_1(1);
004ade00              
004ade02              class AppraisalProfile* edi_1 = arg2;
004ade10              class PStringBase<unsigned short>* eax_7;
004ade10              void* ebx_1;
004ade10              eax_7 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &edi_1->armor_profile);
004ade19              UIElement_Text::SetText(*(uint32_t*)((char*)ebx_1 + 0x78), eax_7);
004ade22              void* __offset(AppraisalProfile, -0x14) esi_2 = ((char*)arg2 - 0x14);
004ade22              
004ade31              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004ade39                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004ade39              
004ade48              if ((InterlockedDecrement(&edi_1->success_flag) == 0 && edi_1 != 0))
004ade4a                  edi_1->vtable->__vecDelDtor(1);
004add85          }
004add6c      }
004add60  }


004adea0  void __fastcall ItemExamineUI::Appraisal_ShowValueInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004adea0  {
004adeac      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004adebd      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004adec1      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004aded5      char (* var_2c)[0x1];
004aded5      int32_t var_c;
004aded5      class ItemExamineUI* this_1;
004aded5      class AC1Legacy::PSRefBuffer<char>* esi_1;
004aded5      
004aded5      if (AppraisalProfile::InqInt(arg2, 0x13, &var_c) == 0)
004aded5      {
004adfce          AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "Value: ???");
004adfd3          esi_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004adfd7          int32_t var_24_11 = 1;
004adfdc          int32_t var_28_2 = 0;
004adfde          var_2c = &esi_1->m_data;
004adfdf          this_1 = this;
004aded5      }
004aded5      else
004aded5      {
004adee1          int32_t ebx_1 = var_c;
004adee1          
004adee5          if (AC1Legacy::PStringBase<char>::s_NullBuffer_2 != AC1Legacy::PStringBase<char>::s_NullBuffer)
004adee5          {
004adef4              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
004adef6                  AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
004adef6              
004adefe              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004adf03              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004adf0b              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004adee5          }
004adee5          
004adf12          AC1Legacy::PStringBase<char>::append_int32(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, ebx_1);
004adf12          
004adf22          if (AC1Legacy::PStringBase<char>::InsertCommas(&AC1Legacy::PStringBase<char>::s_NullBuffer_3) == 0)
004adf2d              AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &data_7af4e8);
004adf2d          
004adf4c          class AC1Legacy::PStringBase<char> __return;
004adf4c          AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, "Value: "), &__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
004adf51          class AppraisalProfile* esi = arg2;
004adf51          
004adf65          if ((InterlockedDecrement(&esi->success_flag) == 0 && esi != 0))
004adf67              esi->vtable->__vecDelDtor(1);
004adf67          
004adf6f          esi_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004adf73          class AC1Legacy::PStringBase<char> __return_1 = __return;
004adf73          
004adf79          if (esi_1 != __return_1)
004adf79          {
004adf8b              if ((InterlockedDecrement(&esi_1->m_cRef) == 0 && esi_1 != 0))
004adf8d                  esi_1->vtable->__vecDelDtor(1);
004adf8d              
004adf99              esi_1 = __return_1;
004adf9b              InterlockedIncrement((__return_1 + 4));
004adf79          }
004adf79          
004adfad          if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004adfb5              **(uint32_t**)__return_1(1);
004adfb5          
004adfb7          this_1 = this;
004adfbb          int32_t var_24_10 = 1;
004adfbd          int32_t var_28_1 = 0;
004adfc2          var_2c = &esi_1->m_data;
004aded5      }
004aded5      
004adfe1      ItemExamineUI::AddItemInfo(this_1, var_2c, 0, 1);
004adfe1      
004adff6      if ((InterlockedDecrement(&esi_1->m_cRef) == 0 && esi_1 != 0))
004adff8          esi_1->vtable->__vecDelDtor(1);
004adea0  }

004ae00a                                90 90 90 90 90 90                                                            ......

004ae010  void __thiscall ItemExamineUI::SetBurdenText(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004ae010  {
004ae01c      int32_t var_8;
004ae01c      
004ae01c      if (this->m_itemBurdenText != 0)
004ae01c      {
004ae035          if (AppraisalProfile::InqInt(arg2, 5, &var_8) == 0)
004ae035          {
004ae138              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Unknown Burden");
004ae145              UIElement_Text::SetText(this->m_itemBurdenText, &arg2);
004ae14e              void* __offset(AppraisalProfile, -0x14) esi_5 = ((char*)arg2 - 0x14);
004ae14e              
004ae161              if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
004ae169                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
004ae035          }
004ae035          else
004ae035          {
004ae03b              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ae040              arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ae048              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004ae048              
004ae060              if (AC1Legacy::PStringBase<char>::convert(&arg2, var_8, 1) == 0)
004ae06b                  AC1Legacy::PStringBase<char>::set(&arg2, &data_7af4e8);
004ae06b              
004ae070              int32_t ebx;
004ae070              int32_t var_1c_3 = ebx;
004ae07a              int32_t* var_c;
004ae07a              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, " Burden Units");
004ae097              class AC1Legacy::PStringBase<char> __return;
004ae097              AC1Legacy::PStringBase<char>::operator=(&arg2, AC1Legacy::PStringBase<char>::operator+(&arg2, &__return, &var_c));
004ae09c              class AC1Legacy::PStringBase<char> __return_1 = __return;
004ae09c              
004ae0b2              if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004ae0ba                  **(uint32_t**)__return_1(1);
004ae0ba              
004ae0bc              int32_t* esi_1 = var_c;
004ae0bc              
004ae0cc              if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004ae0d4                  **(uint32_t**)esi_1(1);
004ae0d4              
004ae0d6              class AppraisalProfile* edi_1 = arg2;
004ae0e4              class PStringBase<unsigned short>* eax_9;
004ae0e4              int32_t ebx_1;
004ae0e4              eax_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &edi_1->armor_profile);
004ae0ed              UIElement_Text::SetText(this->m_itemBurdenText, eax_9);
004ae0f6              void* __offset(AppraisalProfile, -0x14) esi_3 = ((char*)arg2 - 0x14);
004ae0f6              
004ae105              if ((ebx_1(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004ae10d                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004ae10d              
004ae11c              if ((ebx_1(&edi_1->success_flag) == 0 && edi_1 != 0))
004ae11e                  edi_1->vtable->__vecDelDtor(1);
004ae035          }
004ae01c      }
004ae010  }

004ae174                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004ae180  void __fastcall ItemExamineUI::Appraisal_ShowBurdenInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004ae180  {
004ae18c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ae19d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004ae1a1      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004ae1b5      char (* var_2c)[0x1];
004ae1b5      int32_t var_c;
004ae1b5      class ItemExamineUI* this_1;
004ae1b5      class AC1Legacy::PSRefBuffer<char>* esi_1;
004ae1b5      
004ae1b5      if (AppraisalProfile::InqInt(arg2, 5, &var_c) == 0)
004ae1b5      {
004ae2ae          AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "Burden: Unknown");
004ae2b3          esi_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004ae2b7          int32_t var_24_11 = 1;
004ae2bc          int32_t var_28_2 = 0;
004ae2be          var_2c = &esi_1->m_data;
004ae2bf          this_1 = this;
004ae1b5      }
004ae1b5      else
004ae1b5      {
004ae1c1          int32_t ebx_1 = var_c;
004ae1c1          
004ae1c5          if (AC1Legacy::PStringBase<char>::s_NullBuffer_2 != AC1Legacy::PStringBase<char>::s_NullBuffer)
004ae1c5          {
004ae1d4              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
004ae1d6                  AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
004ae1d6              
004ae1de              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004ae1e3              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004ae1eb              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004ae1c5          }
004ae1c5          
004ae1f2          AC1Legacy::PStringBase<char>::append_int32(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, ebx_1);
004ae1f2          
004ae202          if (AC1Legacy::PStringBase<char>::InsertCommas(&AC1Legacy::PStringBase<char>::s_NullBuffer_3) == 0)
004ae20d              AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &data_7af4e8);
004ae20d          
004ae22c          class AC1Legacy::PStringBase<char> __return;
004ae22c          AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, "Burden: "), &__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
004ae231          class AppraisalProfile* esi = arg2;
004ae231          
004ae245          if ((InterlockedDecrement(&esi->success_flag) == 0 && esi != 0))
004ae247              esi->vtable->__vecDelDtor(1);
004ae247          
004ae24f          esi_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004ae253          class AC1Legacy::PStringBase<char> __return_1 = __return;
004ae253          
004ae259          if (esi_1 != __return_1)
004ae259          {
004ae26b              if ((InterlockedDecrement(&esi_1->m_cRef) == 0 && esi_1 != 0))
004ae26d                  esi_1->vtable->__vecDelDtor(1);
004ae26d              
004ae279              esi_1 = __return_1;
004ae27b              InterlockedIncrement((__return_1 + 4));
004ae259          }
004ae259          
004ae28d          if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004ae295              **(uint32_t**)__return_1(1);
004ae295          
004ae297          this_1 = this;
004ae29b          int32_t var_24_10 = 1;
004ae29d          int32_t var_28_1 = 0;
004ae2a2          var_2c = &esi_1->m_data;
004ae1b5      }
004ae1b5      
004ae2c1      ItemExamineUI::AddItemInfo(this_1, var_2c, 0, 1);
004ae2c1      
004ae2d6      if ((InterlockedDecrement(&esi_1->m_cRef) == 0 && esi_1 != 0))
004ae2d8          esi_1->vtable->__vecDelDtor(1);
004ae180  }

004ae2ea                                90 90 90 90 90 90                                                            ......

004ae2f0  void __fastcall ItemExamineUI::SetInscription(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004ae2f0  {
004ae2f6      class ItemExamineUI* this_1 = this;
004ae2f8      this_1->m_itemInscriptionText->vtable->SetState(0x10000050);
004ae312      UIElement_Text::ClearAllText(this_1->m_itemInscriptionText);
004ae324      AC1Legacy::PStringBase<char>::set(&this_1->m_old_inscription, &data_7928af);
004ae32f      UIElement_Text::ClearAllText(this_1->m_itemInscriptionSignatureText);
004ae341      AC1Legacy::PStringBase<char>::set(&this_1->m_scribe_name, &data_7928af);
004ae351      AC1Legacy::PStringBase<char>::set(&this_1->m_scribe_account, &data_7928af);
004ae356      class ACCWeenieObject* cur_weenobj = this_1->cur_weenobj;
004ae363      uint8_t ebx_1 = (((int8_t)(cur_weenobj->pwd._bitfield >> 1)) & 1);
004ae363      
004ae36b      if (cur_weenobj->vtable->IsHook() != 0)
004ae378          ebx_1 = AppraisalProfile::IsHookedItemInscribable(arg2) != 0;
004ae378      
004ae37d      int32_t var_28_16;
004ae37d      
004ae37d      if (ebx_1 == 0)
004ae37d      {
004ae5e7          this_1->m_itemInscriptionText->vtable->SetVisible(0);
004ae5f4          var_28_16 = 0;
004ae37d      }
004ae37d      else
004ae37d      {
004ae38a          int32_t eax_3 = AppraisalProfile::InqString(arg2, 8, &this_1->m_scribe_name);
004ae391          class PStringBase<unsigned short> var_10;
004ae391          int32_t eax_5;
004ae391          int32_t* ebx_2;
004ae391          
004ae391          if (eax_3 != 0)
004ae391          {
004ae3a0              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_10, &data_7928af);
004ae3ac              uint8_t eax_4 = AC1Legacy::PStringBase<char>::operator!=(&this_1->m_scribe_name, &var_10);
004ae3b1              ebx_2 = var_10;
004ae3b1              
004ae3c9              if ((InterlockedDecrement(&ebx_2[1]) == 0 && ebx_2 != 0))
004ae3d1                  **(uint32_t**)ebx_2(1);
004ae3d1              
004ae3d3              eax_5 = eax_4;
004ae391          }
004ae391          
004ae3d9          if ((eax_3 == 0 || eax_5 == 0))
004ae3d9          {
004ae5a0              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"<Inscribe here>");
004ae5b0              UIElement_Text::SetText(this_1->m_itemInscriptionText, &arg2);
004ae5b9              void* __offset(AppraisalProfile, -0x14) edi_3 = ((char*)arg2 - 0x14);
004ae5b9              
004ae5cc              if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
004ae5d4                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
004ae5d4              
004ae5d6              this_1->m_itemInscriptionText->vtable->SetVisible(1);
004ae5e3              var_28_16 = 1;
004ae3d9          }
004ae3d9          else if (AppraisalProfile::InqString(arg2, 7, &this_1->m_old_inscription) == 0)
004ae3ed          {
004ae5d6              this_1->m_itemInscriptionText->vtable->SetVisible(1);
004ae5e3              var_28_16 = 1;
004ae3ed          }
004ae3ed          else
004ae3ed          {
004ae3fc              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_10, &data_7928af);
004ae411              ebx_2 = AC1Legacy::PStringBase<char>::operator!=(&this_1->m_old_inscription, &var_10);
004ae413              AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_10);
004ae413              
004ae41a              if (ebx_2 == 0)
004ae41a              {
004ae5d6                  this_1->m_itemInscriptionText->vtable->SetVisible(1);
004ae5e3                  var_28_16 = 1;
004ae41a              }
004ae41a              else
004ae41a              {
004ae420                  this_1->m_itemInscriptionText->vtable->SetState(1);
004ae43d                  class PStringBase<unsigned short>* eax_10;
004ae43d                  void* esi;
004ae43d                  eax_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, WidthConvert, &this_1->m_old_inscription.m_buffer->m_data);
004ae449                  UIElement_Text::SetText(*(uint32_t*)((char*)esi + 0x84), eax_10);
004ae452                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
004ae460                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, &data_7af354);
004ae470                  UIElement_Text::SetText(*(uint32_t*)((char*)esi + 0x88), &var_10);
004ae479                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
004ae48a                  class PStringBase<unsigned short>* eax_11;
004ae48a                  eax_11 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, WidthConvert, &this_1->m_scribe_name.m_buffer->m_data);
004ae496                  UIElement_Text::AppendText(this_1->m_itemInscriptionSignatureText, eax_11);
004ae49f                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
004ae4bb                  int32_t* __return;
004ae4bb                  InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_10, GetClassObject(&__return, &PlayerDesc_ClassType));
004ae4c0                  int32_t* __return_1 = __return;
004ae4c0                  
004ae4c6                  if (__return_1 != 0)
004ae4ca                      *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004ae4ca                  
004ae4d6                  bool cond:0_1 = InterfacePtr<ClientObjMaintSystem>::IsValid(&var_10) == 0;
004ae4d8                  class PStringBase<unsigned short> ebx_3 = var_10;
004ae4d8                  
004ae4dc                  if (((!(cond:0_1) && PlayerDesc::PlayerIsPSR(ebx_3) != 0) && AppraisalProfile::InqString(arg2, 0x17, &this_1->m_scribe_account) != 0))
004ae4dc                  {
004ae510                      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_7af588);
004ae520                      UIElement_Text::AppendText(this_1->m_itemInscriptionSignatureText, &arg2);
004ae529                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
004ae53a                      class PStringBase<unsigned short>* eax_16;
004ae53a                      eax_16 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &this_1->m_scribe_account.m_buffer->m_data);
004ae546                      UIElement_Text::AppendText(this_1->m_itemInscriptionSignatureText, eax_16);
004ae54f                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
004ae55d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_7af584);
004ae56d                      UIElement_Text::AppendText(this_1->m_itemInscriptionSignatureText, &arg2);
004ae576                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
004ae4dc                  }
004ae4dc                  
004ae57d                  if (ebx_3 == 0)
004ae57d                  {
004ae5d6                      this_1->m_itemInscriptionText->vtable->SetVisible(1);
004ae5e3                      var_28_16 = 1;
004ae57d                  }
004ae57d                  else
004ae57d                  {
004ae583                      *(uint32_t*)(*(uint32_t*)ebx_3 + 0x14)();
004ae586                      this_1->m_itemInscriptionText->vtable->SetVisible(1);
004ae593                      var_28_16 = 1;
004ae57d                  }
004ae41a              }
004ae3ed          }
004ae37d      }
004ae37d      
004ae5f6      this_1->m_itemInscriptionSignatureText->vtable->SetVisible(var_28_16);
004ae603      ItemExamineUI::SetInscriptionEditableState(this_1);
004ae2f0  }

004ae612                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004ae620  void __fastcall ItemExamineUI::HandleInscriptionLosingFocus(class ItemExamineUI* this)

004ae620  {
004ae62b      if (this->cur_objid != 0)
004ae62b      {
004ae64c          class PStringBase<unsigned short> __return;
004ae64c          class PStringBase<char> __return_1;
004ae64c          PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_itemInscriptionText, &__return), &__return_1, 0);
004ae651          class PStringBase<char> __return_2 = __return_1;
004ae65a          class AC1Legacy::PStringBase<char> var_c;
004ae65a          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, __return_2);
004ae65a          
004ae674          if ((InterlockedDecrement((__return_2 - 0x10)) == 0 && __return_2 != 0x14))
004ae67c              **(uint32_t**)(__return_2 - 0x14)(1);
004ae67c          
004ae682          int32_t* esi_3 = (__return - 0x14);
004ae682          
004ae691          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004ae699              **(uint32_t**)esi_3(1);
004ae699          
004ae69b          int32_t ebx;
004ae69b          int32_t var_1c_5 = ebx;
004ae6a5          AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_1, &data_7928af);
004ae6b3          uint8_t eax_5 = AC1Legacy::PStringBase<char>::operator==(&var_c, &__return_1);
004ae6b3          
004ae6ba          if (eax_5 != 0)
004ae6ba          {
004ae6c5              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &data_7928af);
004ae6d5              uint8_t eax_6 = AC1Legacy::PStringBase<char>::operator==(&this->m_scribe_name, &__return);
004ae6da              class PStringBase<unsigned short> __return_3 = __return;
004ae6e2              ebx = eax_6;
004ae6e2              
004ae6ec              if ((InterlockedDecrement((__return_3 + 4)) == 0 && __return_3 != 0))
004ae6f4                  **(uint32_t**)__return_3(1);
004ae6ba          }
004ae6ba          
004ae6f8          if ((eax_5 == 0 || ebx == 0))
004ae6fe              ebx = 1;
004ae6f8          else
004ae6fa              ebx = 0;
004ae6fa          
004ae700          class PStringBase<char> __return_4 = __return_1;
004ae700          
004ae710          if ((InterlockedDecrement((__return_4 + 4)) == 0 && __return_4 != 0))
004ae718              **(uint32_t**)__return_4(1);
004ae718          
004ae71c          if ((ebx != 0 && AC1Legacy::PStringBase<char>::operator!=(&var_c, &this->m_old_inscription) != 0))
004ae73b              CM_Writing::Event_SetInscription(this->cur_objid, &var_c);
004ae73b          
004ae74c          AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_1, &data_7928af);
004ae75a          uint8_t eax_12 = AC1Legacy::PStringBase<char>::operator==(&var_c, &__return_1);
004ae75f          class PStringBase<char> __return_5 = __return_1;
004ae767          ebx = eax_12;
004ae767          
004ae771          if ((InterlockedDecrement((__return_5 + 4)) == 0 && __return_5 != 0))
004ae779              **(uint32_t**)__return_5(1);
004ae779          
004ae77e          char* var_1c_8;
004ae77e          class AC1Legacy::PStringBase<char>* ecx_24;
004ae77e          
004ae77e          if (ebx == 0)
004ae77e          {
004ae7f6              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004ae7fd              uint32_t player_id;
004ae7fd              
004ae7fd              if (SmartBox::smartbox_1 == 0)
004ae807                  player_id = 0;
004ae7fd              else
004ae7ff                  player_id = SmartBox::smartbox_1->player_id;
004ae7ff              
004ae816              var_1c_8 = ACCWeenieObject::GetObjectName(player_id, NAME_SINGULAR, 0);
004ae817              ecx_24 = &this->m_scribe_name;
004ae77e          }
004ae77e          else
004ae77e          {
004ae780              this->m_itemInscriptionText->vtable->SetState(0x10000050);
004ae79c              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, u"<Inscribe here>");
004ae7ac              UIElement_Text::SetText(this->m_itemInscriptionText, &__return_1);
004ae7b5              int32_t* esi_5 = (__return_1 - 0x14);
004ae7b5              
004ae7c4              if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004ae7cc                  **(uint32_t**)esi_5(1);
004ae7cc              
004ae7d4              UIElement_Text::ClearAllText(this->m_itemInscriptionSignatureText);
004ae7e4              AC1Legacy::PStringBase<char>::set(&this->m_scribe_name, &data_7928af);
004ae7e9              var_1c_8 = &data_7928af;
004ae7ee              ecx_24 = &this->m_scribe_account;
004ae77e          }
004ae77e          
004ae81d          AC1Legacy::PStringBase<char>::set(ecx_24, var_1c_8);
004ae822          class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_old_inscription.m_buffer;
004ae828          class AC1Legacy::PStringBase<char> eax_18 = var_c;
004ae828          
004ae82e          if (m_buffer != eax_18)
004ae82e          {
004ae83c              if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004ae83e                  m_buffer->vtable->__vecDelDtor(1);
004ae83e              
004ae846              class AC1Legacy::PStringBase<char> eax_20 = var_c;
004ae84a              this->m_old_inscription.m_buffer = eax_20;
004ae854              InterlockedIncrement((eax_20 + 4));
004ae85a              eax_18 = var_c;
004ae82e          }
004ae82e          
004ae86c          if ((InterlockedDecrement((eax_18 + 4)) == 0 && eax_18 != 0))
004ae874              **(uint32_t**)eax_18(1);
004ae62b      }
004ae620  }

004ae87d                                                                                         90 90 90                               ...

004ae880  int32_t __thiscall ItemExamineUI::Appraisal_ShowSet(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004ae880  {
004ae890      class AppraisalProfile* ecx = arg2;
004ae89b      int32_t var_10 = 0;
004ae89b      
004ae8a6      if (AppraisalProfile::InqInt(ecx, 0x109, &var_10) != 0)
004ae8a6      {
004ae8ac          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004ae8bc          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004ae8c0          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004ae8c2          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004ae8c7          arg2 = PStringBase<char>::s_NullBuffer_1;
004ae8cf          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004ae8e1          char const* const var_24_3;
004ae8e1          
004ae8e1          if ((var_10 - 4) > 0x7e)
004aee3e              var_10 = 0;
004ae8e1          else
004ae8e7              switch (var_10)
004ae8e7              {
004ae8ee                  case 4:
004ae8ee                  {
004ae8ee                      var_24_3 = "Carraida's Benediction";
004ae8f7                  label_4ae8f7:
004ae8f7                      PStringBase<char>::set(&arg2, var_24_3);
004ae8f7                      
004ae900                      if (var_10 > 0)
004ae900                      {
004ae90f                          class PStringBase<char> __return;
004ae90f                          PStringBase<char>::PStringBase<char>(&__return, &data_7928af);
004ae91d                          uint8_t eax_4 = PStringBase<char>::operator!=(&arg2, &__return);
004ae928                          int32_t* esi_2 = (__return - 0x14);
004ae928                          
004ae937                          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004ae93f                              **(uint32_t**)esi_2(1);
004ae93f                          
004ae943                          if (eax_4 != 0)
004ae943                          {
004ae965                              PStringBase<unsigned short>::operator=(&PStringBase<char>::s_NullBuffer_3, operator+(&__return, "Set: ", &arg2));
004ae96e                              int32_t* esi_4 = (__return - 0x14);
004ae96e                              
004ae97d                              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004ae985                                  **(uint32_t**)esi_4(1);
004ae985                              
004ae987                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
004ae994                              ItemExamineUI::AddItemInfo(this, PStringBase<char>::s_NullBuffer_4, 0, 1);
004ae99d                              void* __offset(AppraisalProfile, -0x14) esi_6 = ((char*)arg2 - 0x14);
004ae99d                              
004ae9ac                              if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
004ae9b4                                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
004ae9b4                              
004ae9c5                              if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
004ae9cd                                  *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
004ae9cd                              
004ae9db                              return 1;
004ae943                          }
004ae900                      }
004ae8ee                      break;
004ae8ee                  }
004ae9de                  case 5:
004ae9de                  {
004ae9de                      var_24_3 = "Noble Relic";
004ae9e3                      goto label_4ae8f7;
004ae9de                  }
004ae9e8                  case 6:
004ae9e8                  {
004ae9e8                      var_24_3 = "Ancient Relic";
004ae9ed                      goto label_4ae8f7;
004ae9e8                  }
004ae9f2                  case 7:
004ae9f2                  {
004ae9f2                      var_24_3 = "Alduressa Relic";
004ae9f7                      goto label_4ae8f7;
004ae9f2                  }
004ae9fc                  case 8:
004ae9fc                  {
004ae9fc                      var_24_3 = "Shou-jen";
004aea01                      goto label_4ae8f7;
004ae9fc                  }
004aea06                  case 9:
004aea06                  {
004aea06                      var_24_3 = "Empyrean Rings";
004aea0b                      goto label_4ae8f7;
004aea06                  }
004aea10                  case 0xa:
004aea10                  {
004aea10                      var_24_3 = "Arm, Mind, Heart";
004aea15                      goto label_4ae8f7;
004aea10                  }
004aea1a                  case 0xb:
004aea1a                  {
004aea1a                      var_24_3 = "Coat of Perfect Light";
004aea1f                      goto label_4ae8f7;
004aea1a                  }
004aea24                  case 0xc:
004aea24                  {
004aea24                      var_24_3 = "Leggings of Perfect Light";
004aea29                      goto label_4ae8f7;
004aea24                  }
004aea2e                  case 0xd:
004aea2e                  {
004aea2e                      var_24_3 = "Soldier's";
004aea33                      goto label_4ae8f7;
004aea2e                  }
004aea38                  case 0xe:
004aea38                  {
004aea38                      var_24_3 = "Adept's";
004aea3d                      goto label_4ae8f7;
004aea38                  }
004aea42                  case 0xf:
004aea42                  {
004aea42                      var_24_3 = "Archer's";
004aea47                      goto label_4ae8f7;
004aea42                  }
004aea4c                  case 0x10:
004aea4c                  {
004aea4c                      var_24_3 = "Defender's";
004aea51                      goto label_4ae8f7;
004aea4c                  }
004aea56                  case 0x11:
004aea56                  {
004aea56                      var_24_3 = "Tinker's";
004aea5b                      goto label_4ae8f7;
004aea56                  }
004aea60                  case 0x12:
004aea60                  {
004aea60                      var_24_3 = "Crafter's";
004aea65                      goto label_4ae8f7;
004aea60                  }
004aea6a                  case 0x13:
004aea6a                  {
004aea6a                      var_24_3 = "Hearty";
004aea6f                      goto label_4ae8f7;
004aea6a                  }
004aea74                  case 0x14:
004aea74                  {
004aea74                      var_24_3 = "Dexterous";
004aea79                      goto label_4ae8f7;
004aea74                  }
004aea7e                  case 0x15:
004aea7e                  {
004aea7e                      var_24_3 = "Wise";
004aea83                      goto label_4ae8f7;
004aea7e                  }
004aea88                  case 0x16:
004aea88                  {
004aea88                      var_24_3 = "Swift";
004aea8d                      goto label_4ae8f7;
004aea88                  }
004aea92                  case 0x17:
004aea92                  {
004aea92                      var_24_3 = "Hardened";
004aea97                      goto label_4ae8f7;
004aea92                  }
004aea9c                  case 0x18:
004aea9c                  {
004aea9c                      var_24_3 = "Reinforced";
004aeaa1                      goto label_4ae8f7;
004aea9c                  }
004aeaa6                  case 0x19:
004aeaa6                  {
004aeaa6                      var_24_3 = "Interlocking";
004aeaab                      goto label_4ae8f7;
004aeaa6                  }
004aeab0                  case 0x1a:
004aeab0                  {
004aeab0                      var_24_3 = "Flame Proof";
004aeab5                      goto label_4ae8f7;
004aeab0                  }
004aeaba                  case 0x1b:
004aeaba                  {
004aeaba                      var_24_3 = "Acid Proof";
004aeabf                      goto label_4ae8f7;
004aeaba                  }
004aeac4                  case 0x1c:
004aeac4                  {
004aeac4                      var_24_3 = "Cold Proof";
004aeac9                      goto label_4ae8f7;
004aeac4                  }
004aeace                  case 0x1d:
004aeace                  {
004aeace                      var_24_3 = "Lightning Proof";
004aead3                      goto label_4ae8f7;
004aeace                  }
004aead8                  case 0x1e:
004aead8                  {
004aead8                      var_24_3 = "Dedication";
004aeadd                      goto label_4ae8f7;
004aead8                  }
004aeae2                  case 0x1f:
004aeae2                  {
004aeae2                      var_24_3 = "Gladiatorial Clothing";
004aeae7                      goto label_4ae8f7;
004aeae2                  }
004aeaec                  case 0x20:
004aeaec                  {
004aeaec                      var_24_3 = "Ceremonial Clothing";
004aeaf1                      goto label_4ae8f7;
004aeaec                  }
004aeaf6                  case 0x21:
004aeaf6                  {
004aeaf6                      var_24_3 = "Protective Clothing";
004aeafb                      goto label_4ae8f7;
004aeaf6                  }
004aee3e                  case 0x22:
004aee3e                  case 0x2a:
004aee3e                  case 0x2b:
004aee3e                  case 0x2c:
004aee3e                  case 0x2d:
004aee3e                  case 0x2e:
004aee3e                  case 0x2f:
004aee3e                  case 0x30:
004aee3e                  {
004aee3e                      var_10 = 0;
004aee3e                      break;
004aee3e                  }
004aeb00                  case 0x23:
004aeb00                  {
004aeb00                      var_24_3 = "Sigil of Defense";
004aeb05                      goto label_4ae8f7;
004aeb00                  }
004aeb0a                  case 0x24:
004aeb0a                  {
004aeb0a                      var_24_3 = "Sigil of Destruction";
004aeb0f                      goto label_4ae8f7;
004aeb0a                  }
004aeb14                  case 0x25:
004aeb14                  {
004aeb14                      var_24_3 = "Sigil of Fury";
004aeb19                      goto label_4ae8f7;
004aeb14                  }
004aeb1e                  case 0x26:
004aeb1e                  {
004aeb1e                      var_24_3 = "Sigil of Growth";
004aeb23                      goto label_4ae8f7;
004aeb1e                  }
004aeb28                  case 0x27:
004aeb28                  {
004aeb28                      var_24_3 = "Sigil of Vigor";
004aeb2d                      goto label_4ae8f7;
004aeb28                  }
004aeb32                  case 0x28:
004aeb32                  {
004aeb32                      var_24_3 = "Heroic Protector";
004aeb37                      goto label_4ae8f7;
004aeb32                  }
004aeb3c                  case 0x29:
004aeb3c                  {
004aeb3c                      var_24_3 = "Heroic Destroyer";
004aeb41                      goto label_4ae8f7;
004aeb3c                  }
004aeb46                  case 0x31:
004aeb46                  {
004aeb46                      var_24_3 = "Weave of Alchemy";
004aeb4b                      goto label_4ae8f7;
004aeb46                  }
004aeb50                  case 0x32:
004aeb50                  {
004aeb50                      var_24_3 = "Weave of Arcane Lore";
004aeb55                      goto label_4ae8f7;
004aeb50                  }
004aeb5a                  case 0x33:
004aeb5a                  {
004aeb5a                      var_24_3 = "Weave of Armor Tinkering";
004aeb5f                      goto label_4ae8f7;
004aeb5a                  }
004aeb6e                  case 0x34:
004aeb6e                  {
004aeb6e                      var_24_3 = "Weave of Assess Person";
004aeb73                      goto label_4ae8f7;
004aeb6e                  }
004aec72                  case 0x35:
004aec72                  case 0x43:
004aec72                  case 0x4a:
004aec72                  case 0x4b:
004aec72                  case 0x4f:
004aec72                  {
004aec72                      var_24_3 = "Weave of Light Weapons";
004aec77                      goto label_4ae8f7;
004aec72                  }
004aec5e                  case 0x36:
004aec5e                  case 0x39:
004aec5e                  case 0x4d:
004aec5e                  {
004aec5e                      var_24_3 = "Weave of Missile Weapons";
004aec63                      goto label_4ae8f7;
004aec5e                  }
004aeb78                  case 0x37:
004aeb78                  {
004aeb78                      var_24_3 = "Weave of Cooking";
004aeb7d                      goto label_4ae8f7;
004aeb78                  }
004aeb82                  case 0x38:
004aeb82                  {
004aeb82                      var_24_3 = "Weave of Creature Enchantment";
004aeb87                      goto label_4ae8f7;
004aeb82                  }
004aeb8c                  case 0x3a:
004aeb8c                  {
004aeb8c                      var_24_3 = "Weave of Finesse Weapons";
004aeb91                      goto label_4ae8f7;
004aeb8c                  }
004aeb96                  case 0x3b:
004aeb96                  {
004aeb96                      var_24_3 = "Weave of Deception";
004aeb9b                      goto label_4ae8f7;
004aeb96                  }
004aebb4                  case 0x3c:
004aebb4                  {
004aebb4                      var_24_3 = "Weave of Fletching";
004aebb9                      goto label_4ae8f7;
004aebb4                  }
004aebbe                  case 0x3d:
004aebbe                  {
004aebbe                      var_24_3 = "Weave of Healing";
004aebc3                      goto label_4ae8f7;
004aebbe                  }
004aebc8                  case 0x3e:
004aebc8                  {
004aebc8                      var_24_3 = "Weave of Item Enchantment";
004aebcd                      goto label_4ae8f7;
004aebc8                  }
004aebd2                  case 0x3f:
004aebd2                  {
004aebd2                      var_24_3 = "Weave of Item Tinkering";
004aebd7                      goto label_4ae8f7;
004aebd2                  }
004aebdc                  case 0x40:
004aebdc                  {
004aebdc                      var_24_3 = "Weave of Leadership";
004aebe1                      goto label_4ae8f7;
004aebdc                  }
004aebe6                  case 0x41:
004aebe6                  {
004aebe6                      var_24_3 = "Weave of Life Magic";
004aebeb                      goto label_4ae8f7;
004aebe6                  }
004aebf0                  case 0x42:
004aebf0                  {
004aebf0                      var_24_3 = "Weave of Loyalty";
004aebf5                      goto label_4ae8f7;
004aebf0                  }
004aebfa                  case 0x44:
004aebfa                  {
004aebfa                      var_24_3 = "Weave of Magic Defense";
004aebff                      goto label_4ae8f7;
004aebfa                  }
004aec04                  case 0x45:
004aec04                  {
004aec04                      var_24_3 = "Weave of Magic Item Tinkering";
004aec09                      goto label_4ae8f7;
004aec04                  }
004aec0e                  case 0x46:
004aec0e                  {
004aec0e                      var_24_3 = "Weave of Mana Conversion";
004aec13                      goto label_4ae8f7;
004aec0e                  }
004aec18                  case 0x47:
004aec18                  {
004aec18                      var_24_3 = "Weave of Melee Defense";
004aec1d                      goto label_4ae8f7;
004aec18                  }
004aec22                  case 0x48:
004aec22                  {
004aec22                      var_24_3 = "Weave of Missile Defense";
004aec27                      goto label_4ae8f7;
004aec22                  }
004aec36                  case 0x49:
004aec36                  {
004aec36                      var_24_3 = "Weave of Salvaging";
004aec3b                      goto label_4ae8f7;
004aec36                  }
004aec54                  case 0x4c:
004aec54                  {
004aec54                      var_24_3 = "Weave of Heavy Weapons";
004aec59                      goto label_4ae8f7;
004aec54                  }
004aec68                  case 0x4e:
004aec68                  {
004aec68                      var_24_3 = "Weave of Two Handed Combat";
004aec6d                      goto label_4ae8f7;
004aec68                  }
004aec7c                  case 0x50:
004aec7c                  {
004aec7c                      var_24_3 = "Weave of Void Magic";
004aec81                      goto label_4ae8f7;
004aec7c                  }
004aec86                  case 0x51:
004aec86                  {
004aec86                      var_24_3 = "Weave of War Magic";
004aec8b                      goto label_4ae8f7;
004aec86                  }
004aec90                  case 0x52:
004aec90                  {
004aec90                      var_24_3 = "Weave of Weapon Tinkering";
004aec95                      goto label_4ae8f7;
004aec90                  }
004aeb64                  case 0x53:
004aeb64                  {
004aeb64                      var_24_3 = "Weave of Assess Creature";
004aeb69                      goto label_4ae8f7;
004aeb64                  }
004aeba0                  case 0x54:
004aeba0                  {
004aeba0                      var_24_3 = "Weave of Dirty Fighting";
004aeba5                      goto label_4ae8f7;
004aeba0                  }
004aebaa                  case 0x55:
004aebaa                  {
004aebaa                      var_24_3 = "Weave of Dual Wield";
004aebaf                      goto label_4ae8f7;
004aebaa                  }
004aec2c                  case 0x56:
004aec2c                  {
004aec2c                      var_24_3 = "Weave of Recklessness";
004aec31                      goto label_4ae8f7;
004aec2c                  }
004aec40                  case 0x57:
004aec40                  {
004aec40                      var_24_3 = "Weave of Shield";
004aec45                      goto label_4ae8f7;
004aec40                  }
004aec4a                  case 0x58:
004aec4a                  {
004aec4a                      var_24_3 = "Weave of Sneak Attack";
004aec4f                      goto label_4ae8f7;
004aec4a                  }
004aec9a                  case 0x59:
004aec9a                  {
004aec9a                      var_24_3 = "Shou-jen Shozoku";
004aec9f                      goto label_4ae8f7;
004aec9a                  }
004aeca4                  case 0x5a:
004aeca4                  {
004aeca4                      var_24_3 = "Weave of Summoning";
004aeca9                      goto label_4ae8f7;
004aeca4                  }
004aecae                  case 0x5b:
004aecae                  {
004aecae                      var_24_3 = "Shrouded Soul";
004aecb3                      goto label_4ae8f7;
004aecae                  }
004aecb8                  case 0x5c:
004aecb8                  {
004aecb8                      var_24_3 = "Darkened Mind";
004aecbd                      goto label_4ae8f7;
004aecb8                  }
004aecc2                  case 0x5d:
004aecc2                  {
004aecc2                      var_24_3 = "Clouded Spirit";
004aecc7                      goto label_4ae8f7;
004aecc2                  }
004aeccc                  case 0x5e:
004aeccc                  {
004aeccc                      var_24_3 = "Minor Stinging Shrouded Soul";
004aecd1                      goto label_4ae8f7;
004aeccc                  }
004aecd6                  case 0x5f:
004aecd6                  {
004aecd6                      var_24_3 = "Minor Sparking Shrouded Soul";
004aecdb                      goto label_4ae8f7;
004aecd6                  }
004aece0                  case 0x60:
004aece0                  {
004aece0                      var_24_3 = "Minor Smoldering Shrouded Soul";
004aece5                      goto label_4ae8f7;
004aece0                  }
004aecea                  case 0x61:
004aecea                  {
004aecea                      var_24_3 = "Minor Shivering Shrouded Soul";
004aecef                      goto label_4ae8f7;
004aecea                  }
004aecf4                  case 0x62:
004aecf4                  {
004aecf4                      var_24_3 = "Minor Stinging Darkened Mind";
004aecf9                      goto label_4ae8f7;
004aecf4                  }
004aecfe                  case 0x63:
004aecfe                  {
004aecfe                      var_24_3 = "Minor Sparking Darkened Mind";
004aed03                      goto label_4ae8f7;
004aecfe                  }
004aed08                  case 0x64:
004aed08                  {
004aed08                      var_24_3 = "Minor Smoldering Darkened Mind";
004aed0d                      goto label_4ae8f7;
004aed08                  }
004aed12                  case 0x65:
004aed12                  {
004aed12                      var_24_3 = "Minor Shivering Darkened Mind";
004aed17                      goto label_4ae8f7;
004aed12                  }
004aed1c                  case 0x66:
004aed1c                  {
004aed1c                      var_24_3 = "Minor Stinging Clouded Spirit";
004aed21                      goto label_4ae8f7;
004aed1c                  }
004aed26                  case 0x67:
004aed26                  {
004aed26                      var_24_3 = "Minor Sparking Clouded Spirit";
004aed2b                      goto label_4ae8f7;
004aed26                  }
004aed30                  case 0x68:
004aed30                  {
004aed30                      var_24_3 = "Minor Smoldering Clouded Spirit";
004aed35                      goto label_4ae8f7;
004aed30                  }
004aed3a                  case 0x69:
004aed3a                  {
004aed3a                      var_24_3 = "Minor Shivering Clouded Spirit";
004aed3f                      goto label_4ae8f7;
004aed3a                  }
004aed44                  case 0x6a:
004aed44                  {
004aed44                      var_24_3 = "Major Stinging Shrouded Soul";
004aed49                      goto label_4ae8f7;
004aed44                  }
004aed4e                  case 0x6b:
004aed4e                  {
004aed4e                      var_24_3 = "Major Sparking Shrouded Soul";
004aed53                      goto label_4ae8f7;
004aed4e                  }
004aed58                  case 0x6c:
004aed58                  {
004aed58                      var_24_3 = "Major Smoldering Shrouded Soul";
004aed5d                      goto label_4ae8f7;
004aed58                  }
004aed62                  case 0x6d:
004aed62                  {
004aed62                      var_24_3 = "Major Shivering Shrouded Soul";
004aed67                      goto label_4ae8f7;
004aed62                  }
004aed6c                  case 0x6e:
004aed6c                  {
004aed6c                      var_24_3 = "Major Stinging Darkened Mind";
004aed71                      goto label_4ae8f7;
004aed6c                  }
004aed76                  case 0x6f:
004aed76                  {
004aed76                      var_24_3 = "Major Sparking Darkened Mind";
004aed7b                      goto label_4ae8f7;
004aed76                  }
004aed80                  case 0x70:
004aed80                  {
004aed80                      var_24_3 = "Major Smoldering Darkened Mind";
004aed85                      goto label_4ae8f7;
004aed80                  }
004aed8a                  case 0x71:
004aed8a                  {
004aed8a                      var_24_3 = "Major Shivering Darkened Mind";
004aed8f                      goto label_4ae8f7;
004aed8a                  }
004aed94                  case 0x72:
004aed94                  {
004aed94                      var_24_3 = "Major Stinging Clouded Spirit";
004aed99                      goto label_4ae8f7;
004aed94                  }
004aed9e                  case 0x73:
004aed9e                  {
004aed9e                      var_24_3 = "Major Sparking Clouded Spirit";
004aeda3                      goto label_4ae8f7;
004aed9e                  }
004aeda8                  case 0x74:
004aeda8                  {
004aeda8                      var_24_3 = "Major Smoldering Clouded Spirit";
004aedad                      goto label_4ae8f7;
004aeda8                  }
004aedb2                  case 0x75:
004aedb2                  {
004aedb2                      var_24_3 = "Major Shivering Clouded Spirit";
004aedb7                      goto label_4ae8f7;
004aedb2                  }
004aedbc                  case 0x76:
004aedbc                  {
004aedbc                      var_24_3 = "Blackfire Stinging Shrouded Soul";
004aedc1                      goto label_4ae8f7;
004aedbc                  }
004aedc6                  case 0x77:
004aedc6                  {
004aedc6                      var_24_3 = "Blackfire Sparking Shrouded Soul";
004aedcb                      goto label_4ae8f7;
004aedc6                  }
004aedd0                  case 0x78:
004aedd0                  {
004aedd0                      var_24_3 = "Blackfire Smoldering Shrouded So…";
004aedd5                      goto label_4ae8f7;
004aedd0                  }
004aedda                  case 0x79:
004aedda                  {
004aedda                      var_24_3 = "Blackfire Shivering Shrouded Sou…";
004aeddf                      goto label_4ae8f7;
004aedda                  }
004aede4                  case 0x7a:
004aede4                  {
004aede4                      var_24_3 = "Blackfire Stinging Darkened Mind";
004aede9                      goto label_4ae8f7;
004aede4                  }
004aedee                  case 0x7b:
004aedee                  {
004aedee                      var_24_3 = "Blackfire Sparking Darkened Mind";
004aedf3                      goto label_4ae8f7;
004aedee                  }
004aedf8                  case 0x7c:
004aedf8                  {
004aedf8                      var_24_3 = "Blackfire Smoldering Darkened Mi…";
004aedfd                      goto label_4ae8f7;
004aedf8                  }
004aee02                  case 0x7d:
004aee02                  {
004aee02                      var_24_3 = "Blackfire Shivering Darkened Min…";
004aee07                      goto label_4ae8f7;
004aee02                  }
004aee0c                  case 0x7e:
004aee0c                  {
004aee0c                      var_24_3 = "Blackfire Stinging Clouded Spiri…";
004aee11                      goto label_4ae8f7;
004aee0c                  }
004aee16                  case 0x7f:
004aee16                  {
004aee16                      var_24_3 = "Blackfire Sparking Clouded Spiri…";
004aee1b                      goto label_4ae8f7;
004aee16                  }
004aee20                  case 0x80:
004aee20                  {
004aee20                      var_24_3 = "Blackfire Smoldering Clouded Spi…";
004aee25                      goto label_4ae8f7;
004aee20                  }
004aee2a                  case 0x81:
004aee2a                  {
004aee2a                      var_24_3 = "Blackfire Shivering Clouded Spir…";
004aee2f                      goto label_4ae8f7;
004aee2a                  }
004aee34                  case 0x82:
004aee34                  {
004aee34                      var_24_3 = "Shimmering Shadows";
004aee39                      goto label_4ae8f7;
004aee34                  }
004ae8e7              }
004aee46          void* __offset(AppraisalProfile, -0x14) esi_9 = ((char*)arg2 - 0x14);
004aee46          
004aee55          if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
004aee5d              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
004aee5d          
004aee6e          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
004aee76              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
004ae8a6      }
004ae8a6      
004aee81      return 0;
004ae880  }

004aee84  uint32_t jump_table_4aee84[0x7f] = 
004aee84  {
004aee84      [0x00] =  0x004ae8ee
004aee88      [0x01] =  0x004ae9de
004aee8c      [0x02] =  0x004ae9e8
004aee90      [0x03] =  0x004ae9f2
004aee94      [0x04] =  0x004ae9fc
004aee98      [0x05] =  0x004aea06
004aee9c      [0x06] =  0x004aea10
004aeea0      [0x07] =  0x004aea1a
004aeea4      [0x08] =  0x004aea24
004aeea8      [0x09] =  0x004aea2e
004aeeac      [0x0a] =  0x004aea38
004aeeb0      [0x0b] =  0x004aea42
004aeeb4      [0x0c] =  0x004aea4c
004aeeb8      [0x0d] =  0x004aea56
004aeebc      [0x0e] =  0x004aea60
004aeec0      [0x0f] =  0x004aea6a
004aeec4      [0x10] =  0x004aea74
004aeec8      [0x11] =  0x004aea7e
004aeecc      [0x12] =  0x004aea88
004aeed0      [0x13] =  0x004aea92
004aeed4      [0x14] =  0x004aea9c
004aeed8      [0x15] =  0x004aeaa6
004aeedc      [0x16] =  0x004aeab0
004aeee0      [0x17] =  0x004aeaba
004aeee4      [0x18] =  0x004aeac4
004aeee8      [0x19] =  0x004aeace
004aeeec      [0x1a] =  0x004aead8
004aeef0      [0x1b] =  0x004aeae2
004aeef4      [0x1c] =  0x004aeaec
004aeef8      [0x1d] =  0x004aeaf6
004aeefc      [0x1e] =  0x004aee3e
004aef00      [0x1f] =  0x004aeb00
004aef04      [0x20] =  0x004aeb0a
004aef08      [0x21] =  0x004aeb14
004aef0c      [0x22] =  0x004aeb1e
004aef10      [0x23] =  0x004aeb28
004aef14      [0x24] =  0x004aeb32
004aef18      [0x25] =  0x004aeb3c
004aef1c      [0x26] =  0x004aee3e
004aef20      [0x27] =  0x004aee3e
004aef24      [0x28] =  0x004aee3e
004aef28      [0x29] =  0x004aee3e
004aef2c      [0x2a] =  0x004aee3e
004aef30      [0x2b] =  0x004aee3e
004aef34      [0x2c] =  0x004aee3e
004aef38      [0x2d] =  0x004aeb46
004aef3c      [0x2e] =  0x004aeb50
004aef40      [0x2f] =  0x004aeb5a
004aef44      [0x30] =  0x004aeb6e
004aef48      [0x31] =  0x004aec72
004aef4c      [0x32] =  0x004aec5e
004aef50      [0x33] =  0x004aeb78
004aef54      [0x34] =  0x004aeb82
004aef58      [0x35] =  0x004aec5e
004aef5c      [0x36] =  0x004aeb8c
004aef60      [0x37] =  0x004aeb96
004aef64      [0x38] =  0x004aebb4
004aef68      [0x39] =  0x004aebbe
004aef6c      [0x3a] =  0x004aebc8
004aef70      [0x3b] =  0x004aebd2
004aef74      [0x3c] =  0x004aebdc
004aef78      [0x3d] =  0x004aebe6
004aef7c      [0x3e] =  0x004aebf0
004aef80      [0x3f] =  0x004aec72
004aef84      [0x40] =  0x004aebfa
004aef88      [0x41] =  0x004aec04
004aef8c      [0x42] =  0x004aec0e
004aef90      [0x43] =  0x004aec18
004aef94      [0x44] =  0x004aec22
004aef98      [0x45] =  0x004aec36
004aef9c      [0x46] =  0x004aec72
004aefa0      [0x47] =  0x004aec72
004aefa4      [0x48] =  0x004aec54
004aefa8      [0x49] =  0x004aec5e
004aefac      [0x4a] =  0x004aec68
004aefb0      [0x4b] =  0x004aec72
004aefb4      [0x4c] =  0x004aec7c
004aefb8      [0x4d] =  0x004aec86
004aefbc      [0x4e] =  0x004aec90
004aefc0      [0x4f] =  0x004aeb64
004aefc4      [0x50] =  0x004aeba0
004aefc8      [0x51] =  0x004aebaa
004aefcc      [0x52] =  0x004aec2c
004aefd0      [0x53] =  0x004aec40
004aefd4      [0x54] =  0x004aec4a
004aefd8      [0x55] =  0x004aec9a
004aefdc      [0x56] =  0x004aeca4
004aefe0      [0x57] =  0x004aecae
004aefe4      [0x58] =  0x004aecb8
004aefe8      [0x59] =  0x004aecc2
004aefec      [0x5a] =  0x004aeccc
004aeff0      [0x5b] =  0x004aecd6
004aeff4      [0x5c] =  0x004aece0
004aeff8      [0x5d] =  0x004aecea
004aeffc      [0x5e] =  0x004aecf4
004af000      [0x5f] =  0x004aecfe
004af004      [0x60] =  0x004aed08
004af008      [0x61] =  0x004aed12
004af00c      [0x62] =  0x004aed1c
004af010      [0x63] =  0x004aed26
004af014      [0x64] =  0x004aed30
004af018      [0x65] =  0x004aed3a
004af01c      [0x66] =  0x004aed44
004af020      [0x67] =  0x004aed4e
004af024      [0x68] =  0x004aed58
004af028      [0x69] =  0x004aed62
004af02c      [0x6a] =  0x004aed6c
004af030      [0x6b] =  0x004aed76
004af034      [0x6c] =  0x004aed80
004af038      [0x6d] =  0x004aed8a
004af03c      [0x6e] =  0x004aed94
004af040      [0x6f] =  0x004aed9e
004af044      [0x70] =  0x004aeda8
004af048      [0x71] =  0x004aedb2
004af04c      [0x72] =  0x004aedbc
004af050      [0x73] =  0x004aedc6
004af054      [0x74] =  0x004aedd0
004af058      [0x75] =  0x004aedda
004af05c      [0x76] =  0x004aede4
004af060      [0x77] =  0x004aedee
004af064      [0x78] =  0x004aedf8
004af068      [0x79] =  0x004aee02
004af06c      [0x7a] =  0x004aee0c
004af070      [0x7b] =  0x004aee16
004af074      [0x7c] =  0x004aee20
004af078      [0x7d] =  0x004aee2a
004af07c      [0x7e] =  0x004aee34
004af080  }

004af080  int32_t __thiscall ItemExamineUI::Appraisal_ShowRatings(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004af080  {
004af086      class AppraisalProfile* esi = arg2;
004af09d      int32_t var_38 = 0;
004af0a1      int32_t s;
004af0a1      __builtin_memset(&s, 0, 0x20);
004af0c1      int32_t var_3c = 0;
004af0c5      AppraisalProfile::InqInt(esi, 0x172, &var_38);
004af0d6      AppraisalProfile::InqInt(esi, 0x173, &s);
004af0e7      int32_t var_2c;
004af0e7      AppraisalProfile::InqInt(esi, 0x174, &var_2c);
004af0f8      int32_t var_28;
004af0f8      AppraisalProfile::InqInt(esi, 0x176, &var_28);
004af109      int32_t var_24;
004af109      AppraisalProfile::InqInt(esi, 0x175, &var_24);
004af11a      int32_t var_20;
004af11a      AppraisalProfile::InqInt(esi, 0x177, &var_20);
004af12b      int32_t var_1c;
004af12b      AppraisalProfile::InqInt(esi, 0x178, &var_1c);
004af13c      int32_t var_14;
004af13c      AppraisalProfile::InqInt(esi, 0x17a, &var_14);
004af14d      int32_t var_18;
004af14d      AppraisalProfile::InqInt(esi, 0x179, &var_18);
004af15e      AppraisalProfile::InqInt(esi, 0x17b, &var_3c);
004af163      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004af168      arg2 = PStringBase<char>::s_NullBuffer_1;
004af170      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004af180      int32_t esi_1 = 0;
004af184      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_12;
004af184      
004af184      if (var_38 > 0)
004af184      {
004af186          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004af18b          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_2;
004af193          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004af19d          int32_t var_50_12 = var_38;
004af1a8          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Dam %d");
004af1ad          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_13 = PStringBase<char>::s_NullBuffer_12;
004af1b1          int32_t ecx_11 = PStringBase<char>::s_NullBuffer_13->m_data[-4];
004af1b1          
004af1ba          if (ecx_11 != 1)
004af1ba          {
004af1c3              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_13, (ecx_11 - 1));
004af1c8              PStringBase<char>::s_NullBuffer_13 = PStringBase<char>::s_NullBuffer_12;
004af1ba          }
004af1ba          
004af1d3          esi_1 = 1;
004af1d3          
004af1e0          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_13[-1]) == 0 && PStringBase<char>::s_NullBuffer_13 != 0x14))
004af1e7              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_13 + -0x14)(1);
004af184      }
004af184      
004af1ed      char* __return;
004af1ed      
004af1ed      if (s > 0)
004af1ed      {
004af1f3          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
004af1f8          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_3;
004af200          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
004af200          
004af208          if (esi_1 != 0)
004af208          {
004af213              PStringBase<char>::PStringBase<char>(&__return, &data_794334);
004af218              char* __return_2 = __return;
004af21c              int32_t eax_6 = *(uint32_t*)(__return_2 - 4);
004af21c              
004af222              if (eax_6 != 1)
004af222              {
004af22b                  PStringBase<char>::append_n_chars(&arg2, __return_2, (eax_6 - 1));
004af230                  __return_2 = __return;
004af222              }
004af222              
004af243              if ((InterlockedDecrement(&__return_2[0xfffffff0]) == 0 && __return_2 != 0x14))
004af24b                  **(uint32_t**)(__return_2 - 0x14)(1);
004af208          }
004af208          
004af251          int32_t s_1 = s;
004af25c          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Dam Resist %d");
004af261          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_12;
004af265          int32_t ecx_18 = PStringBase<char>::s_NullBuffer_14->m_data[-4];
004af265          
004af26e          if (ecx_18 != 1)
004af26e          {
004af277              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_14, (ecx_18 - 1));
004af27c              PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_12;
004af26e          }
004af26e          
004af287          esi_1 = 1;
004af287          
004af294          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_14[-1]) == 0 && PStringBase<char>::s_NullBuffer_14 != 0x14))
004af29b              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_14 + -0x14)(1);
004af1ed      }
004af1ed      
004af2a1      if (var_2c > 0)
004af2a1      {
004af2a7          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
004af2ac          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_4;
004af2b4          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
004af2b4          
004af2bc          if (esi_1 != 0)
004af2bc          {
004af2c7              PStringBase<char>::PStringBase<char>(&__return, &data_794334);
004af2cc              char* __return_3 = __return;
004af2d0              int32_t eax_14 = *(uint32_t*)(__return_3 - 4);
004af2d0              
004af2d6              if (eax_14 != 1)
004af2d6              {
004af2df                  PStringBase<char>::append_n_chars(&arg2, __return_3, (eax_14 - 1));
004af2e4                  __return_3 = __return;
004af2d6              }
004af2d6              
004af2f7              if ((InterlockedDecrement(&__return_3[0xfffffff0]) == 0 && __return_3 != 0x14))
004af2ff                  **(uint32_t**)(__return_3 - 0x14)(1);
004af2bc          }
004af2bc          
004af305          int32_t var_50_23 = var_2c;
004af310          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Crit %d");
004af315          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_15 = PStringBase<char>::s_NullBuffer_12;
004af319          int32_t ecx_26 = PStringBase<char>::s_NullBuffer_15->m_data[-4];
004af319          
004af322          if (ecx_26 != 1)
004af322          {
004af32b              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_15, (ecx_26 - 1));
004af330              PStringBase<char>::s_NullBuffer_15 = PStringBase<char>::s_NullBuffer_12;
004af322          }
004af322          
004af33b          esi_1 = 1;
004af33b          
004af348          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_15[-1]) == 0 && PStringBase<char>::s_NullBuffer_15 != 0x14))
004af34f              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_15 + -0x14)(1);
004af2a1      }
004af2a1      
004af355      if (var_28 > 0)
004af355      {
004af35b          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer;
004af360          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_5;
004af368          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_5[-1]);
004af368          
004af370          if (esi_1 != 0)
004af370          {
004af37b              PStringBase<char>::PStringBase<char>(&__return, &data_794334);
004af380              char* __return_4 = __return;
004af384              int32_t eax_21 = *(uint32_t*)(__return_4 - 4);
004af384              
004af38a              if (eax_21 != 1)
004af38a              {
004af393                  PStringBase<char>::append_n_chars(&arg2, __return_4, (eax_21 - 1));
004af398                  __return_4 = __return;
004af38a              }
004af38a              
004af3ab              if ((InterlockedDecrement(&__return_4[0xfffffff0]) == 0 && __return_4 != 0x14))
004af3b3                  **(uint32_t**)(__return_4 - 0x14)(1);
004af370          }
004af370          
004af3b9          int32_t var_50_29 = var_28;
004af3c4          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Crit Dam %d");
004af3c9          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_16 = PStringBase<char>::s_NullBuffer_12;
004af3cd          int32_t ecx_34 = PStringBase<char>::s_NullBuffer_16->m_data[-4];
004af3cd          
004af3d6          if (ecx_34 != 1)
004af3d6          {
004af3df              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_16, (ecx_34 - 1));
004af3e4              PStringBase<char>::s_NullBuffer_16 = PStringBase<char>::s_NullBuffer_12;
004af3d6          }
004af3d6          
004af3ef          esi_1 = 1;
004af3ef          
004af3fc          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_16[-1]) == 0 && PStringBase<char>::s_NullBuffer_16 != 0x14))
004af403              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_16 + -0x14)(1);
004af355      }
004af355      
004af409      if (var_24 > 0)
004af409      {
004af40f          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer;
004af414          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_6;
004af41c          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_6[-1]);
004af41c          
004af424          if (esi_1 != 0)
004af424          {
004af42f              PStringBase<char>::PStringBase<char>(&__return, &data_794334);
004af434              char* __return_5 = __return;
004af438              int32_t eax_28 = *(uint32_t*)(__return_5 - 4);
004af438              
004af43e              if (eax_28 != 1)
004af43e              {
004af447                  PStringBase<char>::append_n_chars(&arg2, __return_5, (eax_28 - 1));
004af44c                  __return_5 = __return;
004af43e              }
004af43e              
004af45f              if ((InterlockedDecrement(&__return_5[0xfffffff0]) == 0 && __return_5 != 0x14))
004af467                  **(uint32_t**)(__return_5 - 0x14)(1);
004af424          }
004af424          
004af46d          int32_t var_50_35 = var_24;
004af478          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Crit Resist %d");
004af47d          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_12;
004af481          int32_t ecx_42 = PStringBase<char>::s_NullBuffer_17->m_data[-4];
004af481          
004af48a          if (ecx_42 != 1)
004af48a          {
004af493              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_17, (ecx_42 - 1));
004af498              PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_12;
004af48a          }
004af48a          
004af4a3          esi_1 = 1;
004af4a3          
004af4b0          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_17[-1]) == 0 && PStringBase<char>::s_NullBuffer_17 != 0x14))
004af4b7              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_17 + -0x14)(1);
004af409      }
004af409      
004af4bd      if (var_20 > 0)
004af4bd      {
004af4c3          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer;
004af4c8          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_7;
004af4d0          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_7[-1]);
004af4d0          
004af4d8          if (esi_1 != 0)
004af4d8          {
004af4e3              PStringBase<char>::PStringBase<char>(&__return, &data_794334);
004af4e8              char* __return_6 = __return;
004af4ec              int32_t eax_35 = *(uint32_t*)(__return_6 - 4);
004af4ec              
004af4f2              if (eax_35 != 1)
004af4f2              {
004af4fb                  PStringBase<char>::append_n_chars(&arg2, __return_6, (eax_35 - 1));
004af500                  __return_6 = __return;
004af4f2              }
004af4f2              
004af513              if ((InterlockedDecrement(&__return_6[0xfffffff0]) == 0 && __return_6 != 0x14))
004af51b                  **(uint32_t**)(__return_6 - 0x14)(1);
004af4d8          }
004af4d8          
004af521          int32_t var_50_41 = var_20;
004af52c          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Crit Dam Resist %d");
004af531          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_18 = PStringBase<char>::s_NullBuffer_12;
004af535          int32_t ecx_50 = PStringBase<char>::s_NullBuffer_18->m_data[-4];
004af535          
004af53e          if (ecx_50 != 1)
004af53e          {
004af547              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_18, (ecx_50 - 1));
004af54c              PStringBase<char>::s_NullBuffer_18 = PStringBase<char>::s_NullBuffer_12;
004af53e          }
004af53e          
004af557          esi_1 = 1;
004af557          
004af564          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_18[-1]) == 0 && PStringBase<char>::s_NullBuffer_18 != 0x14))
004af56b              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_18 + -0x14)(1);
004af4bd      }
004af4bd      
004af571      if (var_1c > 0)
004af571      {
004af577          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer;
004af57c          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_8;
004af584          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_8[-1]);
004af584          
004af58c          if (esi_1 != 0)
004af58c          {
004af597              PStringBase<char>::PStringBase<char>(&__return, &data_794334);
004af59c              char* __return_7 = __return;
004af5a0              int32_t eax_42 = *(uint32_t*)(__return_7 - 4);
004af5a0              
004af5a6              if (eax_42 != 1)
004af5a6              {
004af5af                  PStringBase<char>::append_n_chars(&arg2, __return_7, (eax_42 - 1));
004af5b4                  __return_7 = __return;
004af5a6              }
004af5a6              
004af5c7              if ((InterlockedDecrement(&__return_7[0xfffffff0]) == 0 && __return_7 != 0x14))
004af5cf                  **(uint32_t**)(__return_7 - 0x14)(1);
004af58c          }
004af58c          
004af5d5          int32_t var_50_47 = var_1c;
004af5e0          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Heal Boost %d");
004af5e5          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_19 = PStringBase<char>::s_NullBuffer_12;
004af5e9          int32_t ecx_58 = PStringBase<char>::s_NullBuffer_19->m_data[-4];
004af5e9          
004af5f2          if (ecx_58 != 1)
004af5f2          {
004af5fb              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_19, (ecx_58 - 1));
004af600              PStringBase<char>::s_NullBuffer_19 = PStringBase<char>::s_NullBuffer_12;
004af5f2          }
004af5f2          
004af60b          esi_1 = 1;
004af60b          
004af618          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_19[-1]) == 0 && PStringBase<char>::s_NullBuffer_19 != 0x14))
004af61f              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_19 + -0x14)(1);
004af571      }
004af571      
004af625      if (var_18 > 0)
004af625      {
004af62b          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer;
004af630          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_9;
004af638          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_9[-1]);
004af638          
004af640          if (esi_1 != 0)
004af640          {
004af64b              PStringBase<char>::PStringBase<char>(&__return, &data_794334);
004af650              char* __return_8 = __return;
004af654              int32_t eax_49 = *(uint32_t*)(__return_8 - 4);
004af654              
004af65a              if (eax_49 != 1)
004af65a              {
004af663                  PStringBase<char>::append_n_chars(&arg2, __return_8, (eax_49 - 1));
004af668                  __return_8 = __return;
004af65a              }
004af65a              
004af67b              if ((InterlockedDecrement(&__return_8[0xfffffff0]) == 0 && __return_8 != 0x14))
004af683                  **(uint32_t**)(__return_8 - 0x14)(1);
004af640          }
004af640          
004af689          int32_t var_50_53 = var_18;
004af694          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Nether Resist %d");
004af699          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_20 = PStringBase<char>::s_NullBuffer_12;
004af69d          int32_t ecx_66 = PStringBase<char>::s_NullBuffer_20->m_data[-4];
004af69d          
004af6a6          if (ecx_66 != 1)
004af6a6          {
004af6af              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_20, (ecx_66 - 1));
004af6b4              PStringBase<char>::s_NullBuffer_20 = PStringBase<char>::s_NullBuffer_12;
004af6a6          }
004af6a6          
004af6bf          esi_1 = 1;
004af6bf          
004af6cc          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_20[-1]) == 0 && PStringBase<char>::s_NullBuffer_20 != 0x14))
004af6d3              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_20 + -0x14)(1);
004af625      }
004af625      
004af6d9      if (var_14 > 0)
004af6d9      {
004af6df          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer;
004af6e4          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_10;
004af6ec          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_10[-1]);
004af6ec          
004af6f4          if (esi_1 != 0)
004af6f4          {
004af6ff              PStringBase<char>::PStringBase<char>(&__return, &data_794334);
004af704              char* __return_9 = __return;
004af708              int32_t eax_56 = *(uint32_t*)(__return_9 - 4);
004af708              
004af70e              if (eax_56 != 1)
004af70e              {
004af717                  PStringBase<char>::append_n_chars(&arg2, __return_9, (eax_56 - 1));
004af71c                  __return_9 = __return;
004af70e              }
004af70e              
004af72f              if ((InterlockedDecrement(&__return_9[0xfffffff0]) == 0 && __return_9 != 0x14))
004af737                  **(uint32_t**)(__return_9 - 0x14)(1);
004af6f4          }
004af6f4          
004af73d          int32_t var_50_59 = var_14;
004af748          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "Life Resist %d");
004af74d          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_21 = PStringBase<char>::s_NullBuffer_12;
004af751          int32_t ecx_74 = PStringBase<char>::s_NullBuffer_21->m_data[-4];
004af751          
004af75a          if (ecx_74 != 1)
004af75a          {
004af763              PStringBase<char>::append_n_chars(&arg2, PStringBase<char>::s_NullBuffer_21, (ecx_74 - 1));
004af768              PStringBase<char>::s_NullBuffer_21 = PStringBase<char>::s_NullBuffer_12;
004af75a          }
004af75a          
004af773          esi_1 = 1;
004af773          
004af780          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_21[-1]) == 0 && PStringBase<char>::s_NullBuffer_21 != 0x14))
004af787              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_21 + -0x14)(1);
004af787          
004af75a          goto label_4af79c;
004af6d9      }
004af6d9      
004af78d      if (esi_1 != 0)
004af78d      {
004af79c      label_4af79c:
004af79c          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_12, &*U"mh,."[3]);
004af7bb          void* var_8;
004af7bb          PStringBase<char>::operator+(PStringBase<char>::PStringBase<char>(&var_8, "Ratings: "), &__return, &arg2);
004af7c4          int32_t* edi_11 = ((char*)var_8 - 0x14);
004af7c4          
004af7d3          if ((InterlockedDecrement(&edi_11[1]) == 0 && edi_11 != 0))
004af7db              **(uint32_t**)edi_11(1);
004af7db          
004af7eb          class PStringBase<char> __return_1;
004af7eb          PStringBase<char>::operator+(&__return, &__return_1, &PStringBase<char>::s_NullBuffer_12);
004af7f4          void* edi_13 = &__return[0xffffffec];
004af7f4          
004af803          if ((InterlockedDecrement(((char*)edi_13 + 4)) == 0 && edi_13 != 0))
004af80b              **(uint32_t**)edi_13(1);
004af80b          
004af811          void* __offset(PSRefBufferCharData<char>, -0x14) edi_15 = &PStringBase<char>::s_NullBuffer_12->m_data[0xffffffec];
004af811          
004af820          if ((InterlockedDecrement(((char*)edi_15 + 4)) == 0 && edi_15 != 0))
004af828              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_15) + -0x14)(1);
004af828          
004af82a          char* __return_10 = __return_1;
004af836          ItemExamineUI::AddItemInfo(this, __return_10, 0, 1);
004af836          
004af84a          if ((InterlockedDecrement(&__return_10[0xfffffff0]) == 0 && __return_10 != 0x14))
004af852              **(uint32_t**)(__return_10 - 0x14)(1);
004af78d      }
004af78d      
004af858      if (var_3c > 0)
004af858      {
004af85a          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer;
004af85f          PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_11;
004af867          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_11[-1]);
004af871          int32_t var_50_69 = var_3c;
004af87c          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_12, "This item adds %d Vitality.");
004af890          ItemExamineUI::AddItemInfo(this, PStringBase<char>::s_NullBuffer_12, 0, 1);
004af899          void* __offset(PSRefBufferCharData<char>, -0x14) edi_18 = &PStringBase<char>::s_NullBuffer_12->m_data[0xffffffec];
004af899          
004af8a8          if ((InterlockedDecrement(((char*)edi_18 + 4)) == 0 && edi_18 != 0))
004af8b0              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_18) + -0x14)(1);
004af858      }
004af858      
004af8ba      if ((esi_1 == 0 && var_3c <= 0))
004af8ba      {
004af8c0          void* __offset(AppraisalProfile, -0x14) esi_11 = ((char*)arg2 - 0x14);
004af8c0          
004af8cf          if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
004af8d7              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
004af8d7          
004af8e2          return 0;
004af8ba      }
004af8ba      
004af8f1      ItemExamineUI::AddItemInfo(this, &data_7928af, 0, 1);
004af8fa      void* __offset(AppraisalProfile, -0x14) esi_13 = ((char*)arg2 - 0x14);
004af8fa      
004af909      if ((InterlockedDecrement(((char*)esi_13 + 4)) == 0 && esi_13 != 0))
004af911          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_13) + -0x14)(1);
004af911      
004af91f      return 1;
004af080  }

004af922        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004af930  void __thiscall ItemExamineUI::Appraisal_ShowUsage(class ItemExamineUI* this, uint32_t arg2, class AppraisalProfile const* arg3)

004af930  {
004af930      class ItemExamineUI* var_4 = this;
004af931      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004af937      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004af941      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004af941      
004af959      if (AppraisalProfile::InqString(arg3, 0xe, &var_4) != 0)
004af969          ItemExamineUI::AddItemInfo(this, &var_4->cur_prof.creature_profile, 0, 0);
004af969      
004af96e      class ItemExamineUI* esi_1 = var_4;
004af96e      
004af982      if ((InterlockedDecrement(&esi_1->cur_objid) == 0 && esi_1 != 0))
004af984          esi_1->vtable->Init(1);
004af930  }

004af991                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004af9a0  void __thiscall ItemExamineUI::Appraisal_ShowWieldRequirements(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004af9a0  {
004af9bc      int32_t var_7f0 = 0;
004af9dc      class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004af9dc      class AC1Legacy::PStringBase<char> __return;
004af9dc      
004af9dc      if ((AppraisalProfile::InqBool(arg2, 0x55, &var_7f0) != 0 && var_7f0 == 1))
004af9dc      {
004af9eb          AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, "the original owner");
004af9f9          AppraisalProfile::InqString(arg2, 0x19, &AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afa18          int32_t* var_7ec;
004afa18          AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&var_7ec, "Wield requires "), &__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afa1d          int32_t* esi_1 = var_7ec;
004afa1d          
004afa2d          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004afa35              **(uint32_t**)esi_1(1);
004afa35          
004afa37          class AC1Legacy::PStringBase<char> __return_1 = __return;
004afa45          ItemExamineUI::AddItemInfo(this, (__return_1 + 0x14), 0, 1);
004afa45          
004afa56          if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004afa5e              **(uint32_t**)__return_1(1);
004afa5e          
004afa60          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004afa60          
004afa70          if ((InterlockedDecrement((AC1Legacy::PStringBase<char>::s_NullBuffer_8 + 4)) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
004afa78              **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_8(1);
004af9dc      }
004af9dc      
004afa88      int32_t var_7fc = 0;
004afa88      
004afaa5      if ((AppraisalProfile::InqInt(arg2, 0x1a, &var_7fc) != 0 && var_7fc != 0))
004afaa5      {
004afaa7          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004afaac          AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004afab4          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004afab6          int32_t esi_2 = var_7fc;
004afac3          AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &data_7928af);
004afac3          
004afacb          if (esi_2 == 1)
004afad6              AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, "Use requires Throne of Destiny.");
004afad6          
004afadb          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004afae9          ItemExamineUI::AddItemInfo(this, (AC1Legacy::PStringBase<char>::s_NullBuffer_9 + 0x14), 0, 1);
004afae9          
004afafa          if ((InterlockedDecrement((AC1Legacy::PStringBase<char>::s_NullBuffer_9 + 4)) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_9 != 0))
004afb02              **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_9(1);
004afaa5      }
004afaa5      
004afb15      uint32_t var_7f4 = 0;
004afb15      
004afb24      if (AppraisalProfile::InqInt(arg2, 0x144, &var_7f4) != 0)
004afb24      {
004afb26          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004afb2b          AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004afb33          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004afb33          
004afb49          if (AppraisalSystem::InqHeritageGroupDisplayName(var_7f4, &AC1Legacy::PStringBase<char>::s_NullBuffer_7) != 0)
004afb49          {
004afb5a              AC1Legacy::operator+(&__return, "Wield requires ", &AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afb5f              class AC1Legacy::PStringBase<char> __return_2 = __return;
004afb70              ItemExamineUI::AddItemInfo(this, (__return_2 + 0x14), 0, 1);
004afb70              
004afb81              if ((InterlockedDecrement((__return_2 + 4)) == 0 && __return_2 != 0))
004afb89                  **(uint32_t**)__return_2(1);
004afb49          }
004afb49          
004afb8b          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004afb8b          
004afb9b          if ((InterlockedDecrement((AC1Legacy::PStringBase<char>::s_NullBuffer_10 + 4)) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_10 != 0))
004afba3              **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_10(1);
004afb24      }
004afb24      
004afbc3      int32_t var_808;
004afbc3      int32_t var_804;
004afbc3      int32_t var_800;
004afbc3      void var_7e8;
004afbc3      
004afbc3      if (AppraisalProfile::InqInt(arg2, 0x9e, &var_804) != 0)
004afbc3      {
004afbe1          if (AppraisalProfile::InqInt(arg2, 0x9f, &var_800) == 0)
004afbe1              goto label_4afcff;
004afbe1          
004afbff          if (AppraisalProfile::InqInt(arg2, 0xa0, &var_808) == 0)
004afbff              goto label_4afcff;
004afbff          
004afc05          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004afc0a          AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004afc12          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004afc2a          ItemExamineUI::GetAppraisalStringFromRequirements(this, var_804, var_800, var_808, &AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afc2a          
004afc37          if ((var_804 - 1) <= 0xb)
004afc37          {
004afc44              switch (var_804)
004afc44              {
004afc67                  case 1:
004afc67                  case 2:
004afc67                  case 3:
004afc67                  case 4:
004afc67                  case 5:
004afc67                  case 6:
004afc67                  case 7:
004afc67                  case 9:
004afc67                  case 0xa:
004afc67                  {
004afc67                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s %d", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14), var_808);
004afc67                      break;
004afc67                  }
004afc73                  case 8:
004afc73                  {
004afc73                      char const* const eax_31 = "specialized";
004afc73                      
004afc78                      if (var_808 != 3)
004afc7a                          eax_31 = "trained";
004afc7a                      
004afc97                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s %s", eax_31, (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004afc73                      break;
004afc73                  }
004afca5                  case 0xb:
004afca5                  {
004afcab                      int32_t var_828_6 = 0x7e8;
004afcce                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s type", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004afca5                      break;
004afca5                  }
004afcbe                  case 0xc:
004afcbe                  {
004afcc4                      int32_t var_828_7 = 0x7e8;
004afcce                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s race", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004afcbe                      break;
004afcbe                  }
004afc44              }
004afc44              
004afcde              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004afce7              AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afce7              goto label_4afcff;
004afc37          }
004afc37          
004afd84          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004afd84          
004afd98          if ((InterlockedDecrement((AC1Legacy::PStringBase<char>::s_NullBuffer_11 + 4)) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_11 != 0))
004afda4              **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_11(1);
004afda4          
004afd98          return;
004afbc3      }
004afbc3      
004afcff  label_4afcff:
004afcff      
004afd06      if (AppraisalProfile::InqInt(arg2, 0x10e, &var_804) != 0)
004afd06      {
004afd1f          if (AppraisalProfile::InqInt(arg2, 0x10f, &var_800) == 0)
004afd1f              goto label_4afe60;
004afd1f          
004afd38          if (AppraisalProfile::InqInt(arg2, 0x110, &var_808) == 0)
004afd38              goto label_4afe60;
004afd38          
004afd3e          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004afd43          AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004afd4b          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
004afd63          ItemExamineUI::GetAppraisalStringFromRequirements(this, var_804, var_800, var_808, &AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afd63          
004afd70          if ((var_804 - 1) <= 0xb)
004afd70          {
004afd7d              switch (var_804)
004afd7d              {
004afdcf                  case 1:
004afdcf                  case 2:
004afdcf                  case 3:
004afdcf                  case 4:
004afdcf                  case 5:
004afdcf                  case 6:
004afdcf                  case 7:
004afdcf                  case 9:
004afdcf                  case 0xa:
004afdcf                  {
004afdcf                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s %d", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14), var_808);
004afdcf                      break;
004afdcf                  }
004afddb                  case 8:
004afddb                  {
004afddb                      char const* const eax_45 = "specialized";
004afddb                      
004afde0                      if (var_808 != 3)
004afde2                          eax_45 = "trained";
004afde2                      
004afdff                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s %s", eax_45, (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004afddb                      break;
004afddb                  }
004afe0d                  case 0xb:
004afe0d                  {
004afe13                      int32_t var_828_10 = 0x7e8;
004afe36                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s type", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004afe0d                      break;
004afe0d                  }
004afe26                  case 0xc:
004afe26                  {
004afe2c                      int32_t var_828_11 = 0x7e8;
004afe36                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s race", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004afe26                      break;
004afe26                  }
004afd7d              }
004afd7d              
004afe46              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004afe4f              AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afe4f              goto label_4afe60;
004afd70          }
004afd70          
004b00b3          AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004b00b3          return;
004afd06      }
004afd06      
004afe60  label_4afe60:
004afe60      
004afe67      if (AppraisalProfile::InqInt(arg2, 0x111, &var_804) == 0)
004afe67      {
004aff92      label_4aff92:
004aff92          
004aff99          if (((AppraisalProfile::InqInt(arg2, 0x114, &var_804) != 0 && AppraisalProfile::InqInt(arg2, 0x115, &var_800) != 0) && AppraisalProfile::InqInt(arg2, 0x116, &var_808) != 0))
004aff99          {
004affd1              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004affd6              AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004affde              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef);
004afff6              ItemExamineUI::GetAppraisalStringFromRequirements(this, var_804, var_800, var_808, &AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afff6              
004b0003              if ((var_804 - 1) <= 0xb)
004b0003              {
004b0010                  switch (var_804)
004b0010                  {
004b0033                      case 1:
004b0033                      case 2:
004b0033                      case 3:
004b0033                      case 4:
004b0033                      case 5:
004b0033                      case 6:
004b0033                      case 7:
004b0033                      case 9:
004b0033                      case 0xa:
004b0033                      {
004b0033                          _snprintf(&var_7e8, 0x7e8, "Wield requires %s %d", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14), var_808);
004b0033                          break;
004b0033                      }
004b003f                      case 8:
004b003f                      {
004b003f                          char const* const eax_69 = "Specialized";
004b003f                          
004b0044                          if (var_808 != 3)
004b0046                              eax_69 = "Trained";
004b0046                          
004b0063                          _snprintf(&var_7e8, 0x7e8, "Wield requires %s %s", eax_69, (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004b003f                          break;
004b003f                      }
004b0071                      case 0xb:
004b0071                      {
004b0077                          int32_t var_828_18 = 0x7e8;
004b009a                          _snprintf(&var_7e8, 0x7e8, "Wield requires %s type", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004b0071                          break;
004b0071                      }
004b008a                      case 0xc:
004b008a                      {
004b0090                          int32_t var_828_19 = 0x7e8;
004b009a                          _snprintf(&var_7e8, 0x7e8, "Wield requires %s race", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004b008a                          break;
004b008a                      }
004b0010                  }
004b0010                  
004b00aa                  ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b0003              }
004b0003              
004b00b3              AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004aff99          }
004afe67      }
004afe67      else
004afe67      {
004afe80          if (AppraisalProfile::InqInt(arg2, 0x112, &var_800) == 0)
004afe80              goto label_4aff92;
004afe80          
004afe99          if (AppraisalProfile::InqInt(arg2, 0x113, &var_808) == 0)
004afe99              goto label_4aff92;
004afe99          
004afe9f          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004afea4          AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004afeac          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef);
004afec4          ItemExamineUI::GetAppraisalStringFromRequirements(this, var_804, var_800, var_808, &AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afec4          
004afed1          if ((var_804 - 1) <= 0xb)
004afed1          {
004afede              switch (var_804)
004afede              {
004aff01                  case 1:
004aff01                  case 2:
004aff01                  case 3:
004aff01                  case 4:
004aff01                  case 5:
004aff01                  case 6:
004aff01                  case 7:
004aff01                  case 9:
004aff01                  case 0xa:
004aff01                  {
004aff01                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s %d", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14), var_808);
004aff01                      break;
004aff01                  }
004aff0d                  case 8:
004aff0d                  {
004aff0d                      char const* const eax_57 = "specialized";
004aff0d                      
004aff12                      if (var_808 != 3)
004aff14                          eax_57 = "trained";
004aff14                      
004aff31                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s %s", eax_57, (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004aff0d                      break;
004aff0d                  }
004aff3f                  case 0xb:
004aff3f                  {
004aff45                      int32_t var_828_14 = 0x7e8;
004aff68                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s type", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004aff3f                      break;
004aff3f                  }
004aff58                  case 0xc:
004aff58                  {
004aff5e                      int32_t var_828_15 = 0x7e8;
004aff68                      _snprintf(&var_7e8, 0x7e8, "Wield requires %s race", (AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 0x14));
004aff58                      break;
004aff58                  }
004afede              }
004afede              
004aff78              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004aff81              AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004aff81              goto label_4aff92;
004afed1          }
004afed1          
004b00b3          AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004afe67      }
004af9a0  }

004b00c5                 8d 49 00                                                                               .I.
004b00c8  uint32_t jump_table_4b00c8[0x4] = 
004b00c8  {
004b00c8      [0x0] =  0x004afc4b
004b00cc      [0x1] =  0x004afc6e
004b00d0      [0x2] =  0x004afc9e
004b00d4      [0x3] =  0x004afcb7
004b00d8  }
004b00d8  uint8_t lookup_table_4b00d8[0xc] = 
004b00d8  {
004b00d8      [0x0] =  0x00
004b00d9      [0x1] =  0x00
004b00da      [0x2] =  0x00
004b00db      [0x3] =  0x00
004b00dc      [0x4] =  0x00
004b00dd      [0x5] =  0x00
004b00de      [0x6] =  0x00
004b00df      [0x7] =  0x01
004b00e0      [0x8] =  0x00
004b00e1      [0x9] =  0x00
004b00e2      [0xa] =  0x02
004b00e3      [0xb] =  0x03
004b00e4  }
004b00e4  uint32_t jump_table_4b00e4[0x4] = 
004b00e4  {
004b00e4      [0x0] =  0x004afdb3
004b00e8      [0x1] =  0x004afdd6
004b00ec      [0x2] =  0x004afe06
004b00f0      [0x3] =  0x004afe1f
004b00f4  }
004b00f4  uint8_t lookup_table_4b00f4[0xc] = 
004b00f4  {
004b00f4      [0x0] =  0x00
004b00f5      [0x1] =  0x00
004b00f6      [0x2] =  0x00
004b00f7      [0x3] =  0x00
004b00f8      [0x4] =  0x00
004b00f9      [0x5] =  0x00
004b00fa      [0x6] =  0x00
004b00fb      [0x7] =  0x01
004b00fc      [0x8] =  0x00
004b00fd      [0x9] =  0x00
004b00fe      [0xa] =  0x02
004b00ff      [0xb] =  0x03
004b0100  }
004b0100  uint32_t jump_table_4b0100[0x4] = 
004b0100  {
004b0100      [0x0] =  0x004afee5
004b0104      [0x1] =  0x004aff08
004b0108      [0x2] =  0x004aff38
004b010c      [0x3] =  0x004aff51
004b0110  }
004b0110  uint8_t lookup_table_4b0110[0xc] = 
004b0110  {
004b0110      [0x0] =  0x00
004b0111      [0x1] =  0x00
004b0112      [0x2] =  0x00
004b0113      [0x3] =  0x00
004b0114      [0x4] =  0x00
004b0115      [0x5] =  0x00
004b0116      [0x6] =  0x00
004b0117      [0x7] =  0x01
004b0118      [0x8] =  0x00
004b0119      [0x9] =  0x00
004b011a      [0xa] =  0x02
004b011b      [0xb] =  0x03
004b011c  }
004b011c  uint32_t jump_table_4b011c[0x4] = 
004b011c  {
004b011c      [0x0] =  0x004b0017
004b0120      [0x1] =  0x004b003a
004b0124      [0x2] =  0x004b006a
004b0128      [0x3] =  0x004b0083
004b012c  }
004b012c  uint8_t lookup_table_4b012c[0xc] = 
004b012c  {
004b012c      [0x0] =  0x00
004b012d      [0x1] =  0x00
004b012e      [0x2] =  0x00
004b012f      [0x3] =  0x00
004b0130      [0x4] =  0x00
004b0131      [0x5] =  0x00
004b0132      [0x6] =  0x00
004b0133      [0x7] =  0x01
004b0134      [0x8] =  0x00
004b0135      [0x9] =  0x00
004b0136      [0xa] =  0x02
004b0137      [0xb] =  0x03
004b0138  }

004b0138                                                                          90 90 90 90 90 90 90 90                          ........

004b0140  void __thiscall ItemExamineUI::Appraisal_ShowSpecialProperties(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b0140  {
004b0146      int32_t ebx;
004b0146      int32_t var_878 = ebx;
004b0147      int32_t ebp;
004b0147      int32_t var_87c = ebp;
004b0148      int32_t esi;
004b0148      int32_t var_880 = esi;
004b0149      int32_t edi;
004b0149      int32_t var_884 = edi;
004b014c      int32_t __return = 0;
004b0150      char (* var_890)[0x1] = &data_7928af;
004b0155      class ItemExamineUI* this_1 = this;
004b0159      ItemExamineUI::AddItemInfo(this, &data_7928af, __return, 1);
004b015e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b016b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b017d      __return = 0x117;
004b0182      int32_t var_81c = 0;
004b0191      class AC1Legacy::PStringBase<char> __return_6;
004b0191      class AC1Legacy::PSRefBuffer<char>* var_86c;
004b0191      int32_t* var_860;
004b0191      class TResult __return_1;
004b0191      class AC1Legacy::PStringBase<char> var_850;
004b0191      int32_t var_830;
004b0191      
004b0191      if (AppraisalProfile::InqInt(arg2, __return, &var_830) != 0)
004b0191      {
004b0197          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b01a1          var_86c = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b01a5          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef);
004b01b1          int32_t ebp_1 = var_830;
004b01b1          
004b01b5          if (AC1Legacy::PStringBase<char>::s_NullBuffer_7 != AC1Legacy::PStringBase<char>::s_NullBuffer)
004b01b5          {
004b01c4              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_7 != 0))
004b01c6                  AC1Legacy::PStringBase<char>::s_NullBuffer_7->vtable->__vecDelDtor(1);
004b01c6              
004b01ce              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b01d3              var_86c = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b01db              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b01b5          }
004b01b5          
004b01e6          AC1Legacy::PStringBase<char>::append_int32(&var_86c, ebp_1);
004b01e6          
004b01f6          if (AC1Legacy::PStringBase<char>::InsertCommas(&var_86c) == 0)
004b0201              AC1Legacy::PStringBase<char>::set(&var_86c, &data_7af4e8);
004b0201          
004b020f          AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_6, " of these items.");
004b0218          class AC1Legacy::PSRefBuffer<char>** var_888_10 = &var_86c;
004b021d          __return = &var_850;
004b021e          char const* const var_890_1 = "You can only carry ";
004b022e          AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_1, "You can only carry "), __return, var_888_10);
004b0233          int32_t* __return_4 = __return_1;
004b0233          
004b0247          if ((InterlockedDecrement(&__return_4[1]) == 0 && __return_4 != 0))
004b024f              **(uint32_t**)__return_4(1);
004b024f          
004b0255          class AC1Legacy::PStringBase<char>* var_888_13 = &__return_6;
004b025a          __return = &var_860;
004b025f          class AC1Legacy::PStringBase<char>* eax_8 = AC1Legacy::PStringBase<char>::operator+(&var_850, __return, var_888_13);
004b0264          class AC1Legacy::PSRefBuffer<char>* m_buffer = var_86c;
004b0264          
004b0272          if (m_buffer != eax_8->m_buffer)
004b0272          {
004b0280              if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004b0282                  m_buffer->vtable->__vecDelDtor(1);
004b0282              
004b028a              m_buffer = eax_8->m_buffer;
004b0290              InterlockedIncrement(&m_buffer->m_cRef);
004b0272          }
004b0272          
004b0296          int32_t* edi_3 = var_860;
004b0296          
004b02a6          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
004b02ae              **(uint32_t**)edi_3(1);
004b02ae          
004b02b0          class AC1Legacy::PStringBase<char> edi_4 = var_850;
004b02b0          
004b02c0          if ((InterlockedDecrement((edi_4 + 4)) == 0 && edi_4 != 0))
004b02c8              **(uint32_t**)edi_4(1);
004b02c8          
004b02ca          class AC1Legacy::PStringBase<char> __return_7 = __return_6;
004b02ca          
004b02da          if ((InterlockedDecrement((__return_7 + 4)) == 0 && __return_7 != 0))
004b02e2              **(uint32_t**)__return_7(1);
004b02e2          
004b02e4          int32_t var_888_23 = 1;
004b02e6          __return = 0;
004b02e8          int32_t var_890_2 = 0x7928af;
004b02ef          ItemExamineUI::AddItemInfo(this, &data_7928af, __return, var_888_23);
004b02f4          int32_t var_888_24 = 1;
004b02f6          __return = 0;
004b02fe          ItemExamineUI::AddItemInfo(this, &m_buffer->m_data, __return, var_888_24);
004b02fe          
004b030f          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004b0311              m_buffer->vtable->__vecDelDtor(1);
004b0191      }
004b0191      
004b0321      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004b032c      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004b0334      InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
004b0336      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004b033b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
004b0343      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004b0353      double var_7f8;
004b0353      double* var_888_29 = &var_7f8;
004b0354      __return = 0xa7;
004b0359      int32_t* esp_1 = &var_884;
004b0359      
004b0360      if (AppraisalProfile::InqFloat(arg2, __return, var_888_29) != 0)
004b0360      {
004b0371          class PStringBase<unsigned short>* var_888_30 = &PStringBase<unsigned short>::s_NullBuffer_4;
004b0377          var_860 = _ftol2();
004b0382          var_890 = ((double)((long double)var_860));
004b0385          ClientUISystem::DeltaTimeToString(var_890, var_888_30);
004b038e          wchar16 const* const var_894_1 = u"Cooldown When Used: ";
004b0394          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, u"Cooldown When Used: ");
004b0399          class PStringBase<unsigned short> __return_3 = PStringBase<unsigned short>::s_NullBuffer_4;
004b039d          int32_t eax_23 = *(uint32_t*)(__return_3 - 4);
004b039d          
004b03a6          if (eax_23 != 1)
004b03a6          {
004b03aa              __return = __return_3;
004b03af              PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_3, __return, (eax_23 - 1));
004b03a6          }
004b03a6          
004b03b4          class UIElement_Text* m_itemDisplayText = this->m_itemDisplayText;
004b03b4          
004b03bc          if (m_itemDisplayText != 0)
004b03bc          {
004b03c5              if (m_itemDisplayText->m_glyphList.m_glyphList._num_elements > 1)
004b03c5              {
004b03d0                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_6, &data_79c288);
004b03e0                  UIElement_Text::AppendText(this->m_itemDisplayText, &__return_6);
004b03e9                  int32_t* esi_2 = (__return_6 - 0x14);
004b03e9                  
004b03f8                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004b0400                      **(uint32_t**)esi_2(1);
004b03c5              }
004b03c5              
004b0402              class UIElement_Text* m_itemDisplayText_1 = this->m_itemDisplayText;
004b0408              int32_t var_888_36 = 0;
004b040a              __return = 0;
004b0411              UIElement_Text::AppendTextWithFont(m_itemDisplayText_1, &PStringBase<unsigned short>::s_NullBuffer_3, __return, var_888_36);
004b03bc          }
004b03bc          
004b041a          int32_t** var_888_37 = &var_860;
004b0422          __return = 0x118;
004b0427          int32_t var_818_1 = 0;
004b042f          int32_t var_814_1 = 0;
004b0437          esp_1 = &var_884;
004b0437          
004b043e          if (AppraisalProfile::InqInt(arg2, __return, var_888_37) != 0)
004b043e          {
004b0448              class AC1Legacy::PStringBase<char>* var_888_38 = &__return_6;
004b044d              __return = 0x7aed58;
004b0455              __return_6 = 0;
004b0460              InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, __return, var_888_38);
004b0465              class AC1Legacy::PStringBase<char> __return_5 = __return_6;
004b046e              __return = __return_5;
004b0470              int32_t var_888_39 = 0;
004b0473              int32_t __return_2 = __return;
004b0477              var_86c = nullptr;
004b047b              int32_t var_868_1 = 0;
004b047b              
004b047f              if (__return_2 != 0)
004b0485                  *(uint32_t*)(*(uint32_t*)__return_2 + 0x10)();
004b0485              
004b0498              int32_t edi_5 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_86c, &var_850);
004b0498              
004b049a              if (__return_5 != 0)
004b04a0                  *(uint32_t*)(*(uint32_t*)__return_5 + 0x14)();
004b04a0              
004b04b1              double var_820;
004b04b1              
004b04b1              if ((((AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0 && edi_5 >= 0) && CACQualities::HasEnchantmentRegistry(AC1Legacy::PStringBase<char>::s_NullBuffer_1) != 0) && CEnchantmentRegistry::OnCooldown(*(int32_t*)((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 0x70), (var_868_1 + 0x8000), &var_820) != 0))
004b04b1              {
004b04e2                  PStringBase<unsigned short>::clear(&var_860);
004b04f5                  PStringBase<unsigned short>::s_NullBuffer_3 = _ftol2();
004b0500                  class PSRefBufferCharData<unsigned short>** var_898_1;
004b0500                  var_898_1 = ((double)((long double)PStringBase<unsigned short>::s_NullBuffer_3));
004b0503                  ClientUISystem::DeltaTimeToString(var_898_1, &var_860);
004b050c                  wchar16 const* const var_89c_1 = u"Cooldown Remaining: ";
004b0512                  void var_864;
004b0512                  PStringBase<unsigned short>::sprintf(&var_864, u"Cooldown Remaining: ");
004b0523                  PStringBase<unsigned short>::operator+=(&var_864, &var_860);
004b0528                  int32_t var_890_9 = 1;
004b052a                  int32_t var_894_3 = 0;
004b0533                  ItemExamineUI::AddItemInfo(this, &var_864, 0, 1);
004b04b1              }
004b04b1              
004b0538              int32_t var_890_10 = 1;
004b053a              int32_t var_894_4 = 0;
004b053c              int32_t var_898_3 = 0x7928af;
004b0543              ItemExamineUI::AddItemInfo(this, &data_7928af, 0, 1);
004b0543              esp_1 = &__return;
004b0543              
004b054a              if (AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0)
004b0550                  *(int32_t*)((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable + 0x14)();
004b043e          }
004b0360      }
004b0360      
004b0553      int32_t edi_6 = esp_1[0x222];
004b055e      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[0xe];
004b055f      *(uint32_t*)((char*)esp_1 - 8) = 0x124;
004b055e      esp_1[0xe] = 0;
004b056e      void* esp_4 = esp_1;
004b056e      
004b0575      if (AppraisalProfile::InqInt(edi_6) != 0)
004b0575      {
004b0577          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b0580          *(uint32_t*)((char*)esp_4 - 4) = &AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef;
004b0581          *(uint32_t*)((char*)esp_4 + 0x14) = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
004b0585          InterlockedIncrement();
004b058b          int32_t eax_34 = *(uint32_t*)((char*)esp_4 + 0x38);
004b058b          
004b0592          if (eax_34 > 1)
004b0592          {
004b0594              *(uint32_t*)((char*)esp_4 - 4) = eax_34;
004b0599              *(uint32_t*)((char*)esp_4 - 8) = "Cleave: %d enemies in front arc.";
004b059e              *(uint32_t*)((char*)esp_4 - 0xc) = ((char*)esp_4 + 0x14);
004b059f              AC1Legacy::PStringBase<char>::sprintf();
004b05a4              AC1Legacy::PStringBase<char>::s_NullBuffer_8 = *(uint32_t*)((char*)esp_4 + 0x14);
004b05ab              *(uint32_t*)((char*)esp_4 - 4) = 1;
004b05ad              *(uint32_t*)((char*)esp_4 - 8) = 0;
004b05b2              *(uint32_t*)((char*)esp_4 - 0xc) = &AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_data;
004b05b5              ItemExamineUI::AddItemInfo(this);
004b05ba              *(uint32_t*)((char*)esp_4 - 4) = 1;
004b05bc              *(uint32_t*)((char*)esp_4 - 8) = 0;
004b05be              *(uint32_t*)((char*)esp_4 - 0xc) = 0x7928af;
004b05c5              ItemExamineUI::AddItemInfo(this);
004b0592          }
004b0592          
004b05cd          *(uint32_t*)((char*)esp_4 - 4) = &AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef;
004b05ce          esp_4 = esp_4;
004b05ce          
004b05d6          if ((InterlockedDecrement() == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
004b05d6          {
004b05d8              struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = AC1Legacy::PStringBase<char>::s_NullBuffer_8->vtable;
004b05da              *(uint32_t*)((char*)esp_4 - 4) = 1;
004b05de              vtable->__vecDelDtor();
004b05d6          }
004b0575      }
004b0575      
004b05e4      *(uint32_t*)((char*)esp_4 - 4) = ((char*)esp_4 + 0x48);
004b05e5      *(uint32_t*)((char*)esp_4 - 8) = 0xa6;
004b05ec      void* esp_22 = esp_4;
004b05ec      
004b05f3      if (AppraisalProfile::InqInt(edi_6) != 0)
004b05f3      {
004b05f9          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b05fe          *(uint32_t*)((char*)esp_22 + 0x18) = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b0605          *(uint32_t*)((char*)esp_22 - 4) = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef;
004b0606          InterlockedIncrement();
004b060c          int32_t edx_15 = *(uint32_t*)((char*)esp_22 + 0x48);
004b0614          *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x18);
004b0615          *(uint32_t*)((char*)esp_22 - 8) = edx_15;
004b061b          void* esp_27 = esp_22;
004b061b          
004b0620          if (AppraisalSystem::InqCreatureDisplayName() != 0)
004b0620          {
004b062b              void* esp_29;
004b062b              
004b062b              if (*(uint32_t*)((char*)esp_27 + 0x48) != 0x1f)
004b062b              {
004b063d                  *(uint32_t*)((char*)esp_27 - 4) = " slayer";
004b0646                  AC1Legacy::PStringBase<char>::PStringBase<char>(((char*)esp_27 + 0x14));
004b064f                  *(uint32_t*)((char*)esp_27 - 4) = ((char*)esp_27 + 0x14);
004b0654                  *(uint32_t*)((char*)esp_27 - 8) = ((char*)esp_27 + 0x24);
004b065e                  *(uint32_t*)((char*)esp_27 - 4) = AC1Legacy::PStringBase<char>::operator+(((char*)esp_27 + 0x18));
004b0663                  AC1Legacy::PStringBase<char>::operator=(((char*)esp_27 + 0x18));
004b0668                  int32_t* esi_4 = *(uint32_t*)((char*)esp_27 + 0x24);
004b066f                  *(uint32_t*)((char*)esp_27 - 4) = &esi_4[1];
004b066f                  
004b0678                  if ((InterlockedDecrement() == 0 && esi_4 != 0))
004b0678                  {
004b067a                      int32_t eax_44 = *(uint32_t*)esi_4;
004b067c                      *(uint32_t*)((char*)esp_27 - 4) = 1;
004b0680                      *(uint32_t*)eax_44();
004b0678                  }
004b0678                  
004b0682                  int32_t* esi_5 = *(uint32_t*)((char*)esp_27 + 0x14);
004b0689                  *(uint32_t*)((char*)esp_27 - 4) = &esi_5[1];
004b068a                  esp_29 = esp_27;
004b068a                  
004b0692                  if ((InterlockedDecrement() == 0 && esi_5 != 0))
004b0692                  {
004b0694                      int32_t edx_17 = *(uint32_t*)esi_5;
004b0696                      *(uint32_t*)((char*)esp_29 - 4) = 1;
004b069a                      *(uint32_t*)edx_17();
004b0692                  }
004b062b              }
004b062b              else
004b062b              {
004b062d                  *(uint32_t*)((char*)esp_27 - 4) = "Bael'Zharon's Hate";
004b0636                  AC1Legacy::PStringBase<char>::set(((char*)esp_27 + 0x18));
004b0636                  esp_29 = esp_27;
004b062b              }
004b062b              
004b06a3              *(uint32_t*)((char*)esp_29 - 4) = (*(uint32_t*)((char*)esp_29 + 0x18) + 0x14);
004b06a8              *(uint32_t*)((char*)esp_29 - 8) = ((char*)esp_29 + 0x10);
004b06a9              AppendHelper();
004b06ae              esp_27 = esp_29;
004b0620          }
004b0620          
004b06b1          int32_t* esi_6 = *(uint32_t*)((char*)esp_27 + 0x18);
004b06b8          *(uint32_t*)((char*)esp_27 - 4) = &esi_6[1];
004b06b9          esp_22 = esp_27;
004b06b9          
004b06c1          if ((InterlockedDecrement() == 0 && esi_6 != 0))
004b06c1          {
004b06c3              int32_t eax_49 = *(uint32_t*)esi_6;
004b06c5              *(uint32_t*)((char*)esp_22 - 4) = 1;
004b06c9              *(uint32_t*)eax_49();
004b06c1          }
004b05f3      }
004b05f3      
004b06cf      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x74);
004b06d0      *(uint32_t*)((char*)esp_22 - 8) = 0x2f;
004b06d0      
004b06e5      if ((AppraisalProfile::InqInt(edi_6) != 0 && (*(uint32_t*)((char*)esp_22 + 0x74) & 0x79e0) != 0))
004b06e5      {
004b06eb          *(uint32_t*)((char*)esp_22 - 4) = "Multi-Strike";
004b06f0          *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b06f1          AppendHelper();
004b06e5      }
004b06e5      
004b06f9      int32_t esi_7 = *(uint32_t*)((char*)esp_22 + 0x888);
004b0704      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x20);
004b0705      int32_t ebx_2 = 0;
004b0707      *(uint32_t*)((char*)esp_22 - 8) = 0xb3;
004b070e      *(uint32_t*)((char*)esp_22 + 0x20) = 0;
004b070e      
004b0719      if (AppraisalProfile::InqInt(esi_7) != 0)
004b071b          ebx_2 = *(uint32_t*)((char*)esp_22 + 0x20);
004b071b      
004b0723      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x20);
004b0724      *(uint32_t*)((char*)esp_22 - 8) = 0x12f;
004b0724      
004b0732      if (AppraisalProfile::InqInt(esi_7) != 0)
004b0734          ebx_2 |= *(uint32_t*)((char*)esp_22 + 0x20);
004b0734      
004b073c      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x20);
004b073d      *(uint32_t*)((char*)esp_22 - 8) = 0x130;
004b073d      
004b074b      if (AppraisalProfile::InqInt(esi_7) != 0)
004b074d          ebx_2 |= *(uint32_t*)((char*)esp_22 + 0x20);
004b074d      
004b0755      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x20);
004b0756      *(uint32_t*)((char*)esp_22 - 8) = 0x131;
004b0756      
004b0764      if (AppraisalProfile::InqInt(esi_7) != 0)
004b0766          ebx_2 |= *(uint32_t*)((char*)esp_22 + 0x20);
004b0766      
004b076e      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x20);
004b076f      *(uint32_t*)((char*)esp_22 - 8) = 0x132;
004b076f      
004b077d      if (AppraisalProfile::InqInt(esi_7) != 0)
004b077f          ebx_2 |= *(uint32_t*)((char*)esp_22 + 0x20);
004b077f      
004b0785      if (ebx_2 != 0)
004b0785      {
004b078e          if ((ebx_2 & 1) != 0)
004b078e          {
004b0794              *(uint32_t*)((char*)esp_22 - 4) = "Critical Strike";
004b0799              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b079a              AppendHelper();
004b078e          }
004b078e          
004b07a5          if ((ebx_2 & 2) != 0)
004b07a5          {
004b07ab              *(uint32_t*)((char*)esp_22 - 4) = "Crippling Blow";
004b07b0              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b07b1              AppendHelper();
004b07a5          }
004b07a5          
004b07bc          if ((ebx_2 & 4) != 0)
004b07bc          {
004b07c2              *(uint32_t*)((char*)esp_22 - 4) = "Armor Rending";
004b07c7              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b07c8              AppendHelper();
004b07bc          }
004b07bc          
004b07d3          if ((ebx_2 & 8) != 0)
004b07d3          {
004b07d9              *(uint32_t*)((char*)esp_22 - 4) = "Slash Rending";
004b07de              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b07df              AppendHelper();
004b07d3          }
004b07d3          
004b07ea          if ((ebx_2 & 0x10) != 0)
004b07ea          {
004b07f0              *(uint32_t*)((char*)esp_22 - 4) = "Pierce Rending";
004b07f5              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b07f6              AppendHelper();
004b07ea          }
004b07ea          
004b0801          if ((ebx_2 & 0x20) != 0)
004b0801          {
004b0807              *(uint32_t*)((char*)esp_22 - 4) = "Bludgeon Rending";
004b080c              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b080d              AppendHelper();
004b0801          }
004b0801          
004b0818          if ((ebx_2 & 0x40) != 0)
004b0818          {
004b081e              *(uint32_t*)((char*)esp_22 - 4) = "Acid Rending";
004b0823              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b0824              AppendHelper();
004b0818          }
004b0818          
004b082f          if ((*(uint8_t*)((char*)ebx_2)[1] & 0x40) != 0)
004b082f          {
004b0835              *(uint32_t*)((char*)esp_22 - 4) = "Nether Rending";
004b083a              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b083b              AppendHelper();
004b082f          }
004b082f          
004b0845          if (ebx_2 < 0)
004b0845          {
004b084b              *(uint32_t*)((char*)esp_22 - 4) = "Cold Rending";
004b0850              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b0851              AppendHelper();
004b0845          }
004b0845          
004b085c          if ((*(uint8_t*)((char*)ebx_2)[1] & 1) != 0)
004b085c          {
004b0862              *(uint32_t*)((char*)esp_22 - 4) = "Lightning Rending";
004b0867              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b0868              AppendHelper();
004b085c          }
004b085c          
004b0873          if ((*(uint8_t*)((char*)ebx_2)[1] & 2) != 0)
004b0873          {
004b0879              *(uint32_t*)((char*)esp_22 - 4) = "Fire Rending";
004b087e              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b087f              AppendHelper();
004b0873          }
004b0873          
004b088a          if ((*(uint8_t*)((char*)ebx_2)[1] & 4) != 0)
004b088a          {
004b0890              *(uint32_t*)((char*)esp_22 - 4) = "+1 Melee Defense";
004b0895              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b0896              AppendHelper();
004b088a          }
004b088a          
004b08a1          if ((*(uint8_t*)((char*)ebx_2)[1] & 8) != 0)
004b08a1          {
004b08a7              *(uint32_t*)((char*)esp_22 - 4) = "+1 Missile Defense";
004b08ac              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b08ad              AppendHelper();
004b08a1          }
004b08a1          
004b08b8          if ((*(uint8_t*)((char*)ebx_2)[1] & 0x10) != 0)
004b08b8          {
004b08be              *(uint32_t*)((char*)esp_22 - 4) = "+1 Magic Defense";
004b08c3              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b08c4              AppendHelper();
004b08b8          }
004b08b8          
004b08ce          if (ebx_2 < 0)
004b08ce          {
004b08d4              *(uint32_t*)((char*)esp_22 - 4) = "Phantasmal";
004b08d9              *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b08da              AppendHelper();
004b08ce          }
004b0785      }
004b0785      
004b08e9      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x94);
004b08ea      *(uint32_t*)((char*)esp_22 - 8) = 0x9f;
004b08ea      
004b08f8      if (AppraisalProfile::InqFloat(esi_7) != 0)
004b08f8      {
004b08fe          *(uint32_t*)((char*)esp_22 - 4) = "Magic Absorbing";
004b0903          *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b0904          AppendHelper();
004b08f8      }
004b08f8      
004b0910      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x60);
004b0911      *(uint32_t*)((char*)esp_22 - 8) = 0x24;
004b0911      
004b0926      if ((AppraisalProfile::InqInt(esi_7) != 0 && *(uint32_t*)((char*)esp_22 + 0x60) >= 0x270f))
004b0926      {
004b092c          *(uint32_t*)((char*)esp_22 - 4) = "Unenchantable";
004b0931          *(uint32_t*)((char*)esp_22 - 8) = ((char*)esp_22 + 0x10);
004b0932          AppendHelper();
004b0926      }
004b0926      
004b093e      *(uint32_t*)((char*)esp_22 - 4) = ((char*)esp_22 + 0x64);
004b093f      *(uint32_t*)((char*)esp_22 - 8) = 0x72;
004b0943      void* esp_108 = esp_22;
004b0943      
004b0950      if (AppraisalProfile::InqInt(esi_7) != 0)
004b0950      {
004b0952          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b0957          *(uint32_t*)((char*)esp_108 + 0x18) = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004b095e          *(uint32_t*)((char*)esp_108 - 4) = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef;
004b095f          InterlockedIncrement();
004b0961          int32_t edx_28 = *(uint32_t*)((char*)esp_108 + 0x64);
004b0969          *(uint32_t*)((char*)esp_108 - 4) = ((char*)esp_108 + 0x18);
004b096a          *(uint32_t*)((char*)esp_108 - 8) = edx_28;
004b096a          
004b0975          if (AppraisalSystem::AttunedStatusToString() != 0)
004b0975          {
004b097e              *(uint32_t*)((char*)esp_108 - 4) = (*(uint32_t*)((char*)esp_108 + 0x18) + 0x14);
004b0983              *(uint32_t*)((char*)esp_108 - 8) = ((char*)esp_108 + 0x10);
004b0984              AppendHelper();
004b0975          }
004b0975          
004b098c          int32_t* esi_8 = *(uint32_t*)((char*)esp_108 + 0x18);
004b0999          *(uint32_t*)((char*)esp_108 - 4) = &esi_8[1];
004b099a          esp_108 = esp_108;
004b099a          
004b09a2          if ((InterlockedDecrement() == 0 && esi_8 != 0))
004b09a2          {
004b09a4              int32_t eax_73 = *(uint32_t*)esi_8;
004b09a6              *(uint32_t*)((char*)esp_108 - 4) = 1;
004b09aa              *(uint32_t*)eax_73();
004b09a2          }
004b0950      }
004b0950      
004b09b4      int32_t esi_10 = *(uint32_t*)((char*)esp_108 + 0x888);
004b09bf      *(uint32_t*)((char*)esp_108 - 4) = ((char*)esp_108 + 0x5c);
004b09c0      *(uint32_t*)((char*)esp_108 - 8) = 0x21;
004b09c4      void* esp_120 = esp_108;
004b09c4      
004b09cb      if (AppraisalProfile::InqInt(esi_10) != 0)
004b09cb      {
004b09cd          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b09d2          *(uint32_t*)((char*)esp_120 + 0x18) = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b09d9          *(uint32_t*)((char*)esp_120 - 4) = &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef;
004b09da          InterlockedIncrement();
004b09dc          int32_t eax_76 = *(uint32_t*)((char*)esp_120 + 0x5c);
004b09e4          *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x18);
004b09e5          *(uint32_t*)((char*)esp_120 - 8) = eax_76;
004b09e5          
004b09f0          if (AppraisalSystem::BondedStatusToString() != 0)
004b09f0          {
004b09f9              *(uint32_t*)((char*)esp_120 - 4) = (*(uint32_t*)((char*)esp_120 + 0x18) + 0x14);
004b09fe              *(uint32_t*)((char*)esp_120 - 8) = ((char*)esp_120 + 0x10);
004b09ff              AppendHelper();
004b09f0          }
004b09f0          
004b0a07          int32_t* esi_9 = *(uint32_t*)((char*)esp_120 + 0x18);
004b0a0e          *(uint32_t*)((char*)esp_120 - 4) = &esi_9[1];
004b0a0f          esp_120 = esp_120;
004b0a0f          
004b0a17          if ((InterlockedDecrement() == 0 && esi_9 != 0))
004b0a17          {
004b0a19              int32_t edx_32 = *(uint32_t*)esi_9;
004b0a1b              *(uint32_t*)((char*)esp_120 - 4) = 1;
004b0a1f              *(uint32_t*)edx_32();
004b0a17          }
004b0a17          
004b0a21          esi_10 = *(uint32_t*)((char*)esp_120 + 0x888);
004b09cb      }
004b09cb      
004b0a2c      *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x58);
004b0a2d      *(uint32_t*)((char*)esp_120 - 8) = 0x5b;
004b0a2d      
004b0a3f      if ((AppraisalProfile::InqBool(esi_10) != 0 && *(uint32_t*)((char*)esp_120 + 0x58) == 1))
004b0a3f      {
004b0a45          *(uint32_t*)((char*)esp_120 - 4) = "Retained";
004b0a4a          *(uint32_t*)((char*)esp_120 - 8) = ((char*)esp_120 + 0x10);
004b0a4b          AppendHelper();
004b0a3f      }
004b0a3f      
004b0a5a      *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x80);
004b0a5b      *(uint32_t*)((char*)esp_120 - 8) = 0x88;
004b0a5b      
004b0a69      if (AppraisalProfile::InqFloat(esi_10) != 0)
004b0a69      {
004b0a6f          *(uint32_t*)((char*)esp_120 - 4) = "Crushing Blow";
004b0a74          *(uint32_t*)((char*)esp_120 - 8) = ((char*)esp_120 + 0x10);
004b0a75          AppendHelper();
004b0a69      }
004b0a69      
004b0a84      *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x80);
004b0a85      *(uint32_t*)((char*)esp_120 - 8) = 0x93;
004b0a85      
004b0a93      if (AppraisalProfile::InqFloat(esi_10) != 0)
004b0a93      {
004b0a99          *(uint32_t*)((char*)esp_120 - 4) = "Biting Strike";
004b0a9e          *(uint32_t*)((char*)esp_120 - 8) = ((char*)esp_120 + 0x10);
004b0a9f          AppendHelper();
004b0a93      }
004b0a93      
004b0aae      *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x80);
004b0aaf      *(uint32_t*)((char*)esp_120 - 8) = 0x9b;
004b0aaf      
004b0abd      if (AppraisalProfile::InqFloat(esi_10) != 0)
004b0abd      {
004b0ac3          *(uint32_t*)((char*)esp_120 - 4) = "Armor Cleaving";
004b0ac8          *(uint32_t*)((char*)esp_120 - 8) = ((char*)esp_120 + 0x10);
004b0ac9          AppendHelper();
004b0abd      }
004b0abd      
004b0ad5      *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x78);
004b0ad6      *(uint32_t*)((char*)esp_120 - 8) = 0x9d;
004b0add      *(uint32_t*)((char*)esp_120 + 0x78) = 0;
004b0ae8      *(uint32_t*)((char*)esp_120 + 0x7c) = 0x3ff00000;
004b0af3      *(uint32_t*)((char*)esp_120 + 0x50) = 0;
004b0af3      
004b0b02      if (AppraisalProfile::InqFloat(esi_10) != 0)
004b0b02      {
004b0b0c          *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x50);
004b0b0d          *(uint32_t*)((char*)esp_120 - 8) = 0x107;
004b0b0d          
004b0b1b          if (AppraisalProfile::InqInt(esi_10) != 0)
004b0b1b          {
004b0b1d              int32_t edx_36 = *(uint32_t*)((char*)esp_120 + 0x50);
004b0b21              *(uint32_t*)((char*)esp_120 - 4) = 0x7e8;
004b0b2d              *(uint32_t*)((char*)esp_120 - 8) = ((char*)esp_120 + 0x9c);
004b0b2e              *(uint32_t*)((char*)esp_120 - 0xc) = edx_36;
004b0b2f              AppraisalSystem::DamageTypeToString();
004b0b34              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b0b39              *(uint32_t*)((char*)esp_120 + 0x14) = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b0b43              *(uint32_t*)((char*)esp_120 - 4) = &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef;
004b0b44              InterlockedIncrement();
004b0b4d              *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x9c);
004b0b52              *(uint32_t*)((char*)esp_120 - 8) = "Resistance Cleaving: %s";
004b0b57              *(uint32_t*)((char*)esp_120 - 0xc) = ((char*)esp_120 + 0x14);
004b0b58              AC1Legacy::PStringBase<char>::sprintf();
004b0b5d              int32_t* esi_11 = *(uint32_t*)((char*)esp_120 + 0x14);
004b0b64              *(uint32_t*)((char*)esp_120 - 0x10) = &esi_11[5];
004b0b69              *(uint32_t*)((char*)esp_120 - 0x14) = ((char*)esp_120 + 0x10);
004b0b6a              AppendHelper();
004b0b75              *(uint32_t*)((char*)esp_120 - 4) = &esi_11[1];
004b0b75              
004b0b7e              if ((InterlockedDecrement() == 0 && esi_11 != 0))
004b0b7e              {
004b0b80                  int32_t edx_38 = *(uint32_t*)esi_11;
004b0b82                  *(uint32_t*)((char*)esp_120 - 4) = 1;
004b0b86                  *(uint32_t*)edx_38();
004b0b7e              }
004b0b7e              
004b0b88              esi_10 = *(uint32_t*)((char*)esp_120 + 0x888);
004b0b1b          }
004b0b02      }
004b0b02      
004b0b96      *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x88);
004b0b97      *(uint32_t*)((char*)esp_120 - 8) = 0x37;
004b0b97      
004b0ba2      if (AppraisalProfile::InqDataID(esi_10) != 0)
004b0ba2      {
004b0ba8          *(uint32_t*)((char*)esp_120 - 4) = "Cast on Strike";
004b0bad          *(uint32_t*)((char*)esp_120 - 8) = ((char*)esp_120 + 0x10);
004b0bae          AppendHelper();
004b0ba2      }
004b0ba2      
004b0bba      *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x4c);
004b0bbb      *(uint32_t*)((char*)esp_120 - 8) = 0x63;
004b0bbf      *(uint32_t*)((char*)esp_120 + 0x4c) = 0;
004b0bbf      
004b0bd5      if ((AppraisalProfile::InqBool(esi_10) != 0 && *(uint32_t*)((char*)esp_120 + 0x4c) == 1))
004b0bd5      {
004b0bdb          *(uint32_t*)((char*)esp_120 - 4) = "Ivoryable";
004b0be0          *(uint32_t*)((char*)esp_120 - 8) = ((char*)esp_120 + 0x10);
004b0be1          AppendHelper();
004b0bd5      }
004b0bd5      
004b0bed      *(uint32_t*)((char*)esp_120 - 4) = ((char*)esp_120 + 0x44);
004b0bee      *(uint32_t*)((char*)esp_120 - 8) = 0x64;
004b0bf2      *(uint32_t*)((char*)esp_120 + 0x44) = 0;
004b0bfa      void* esp_181 = esp_120;
004b0bfa      
004b0c08      if ((AppraisalProfile::InqBool(esi_10) != 0 && *(uint32_t*)((char*)esp_181 + 0x44) == 1))
004b0c08      {
004b0c0e          *(uint32_t*)((char*)esp_181 - 4) = "Dyeable";
004b0c13          *(uint32_t*)((char*)esp_181 - 8) = ((char*)esp_181 + 0x10);
004b0c14          AppendHelper();
004b0c08      }
004b0c08      
004b0c24      int32_t esi_17;
004b0c24      int32_t edi_7;
004b0c24      
004b0c24      if (*(uint32_t*)(*(uint32_t*)((char*)esp_181 + 0x10) + 8) == 1)
004b0c24      {
004b0cc7          edi_7 = *(uint32_t*)((char*)esp_181 + 0x68);
004b0ccb          esi_17 = *(uint32_t*)((char*)esp_181 + 0x3c);
004b0c24      }
004b0c24      else
004b0c24      {
004b0c2e          *(uint32_t*)((char*)esp_181 - 4) = ((char*)esp_181 + 0x10);
004b0c33          *(uint32_t*)((char*)esp_181 - 8) = ((char*)esp_181 + 0x24);
004b0c34          *(uint32_t*)((char*)esp_181 - 0xc) = "Properties: ";
004b0c44          int32_t* eax_101 = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(((char*)esp_181 + 0x30)));
004b0c44          void* esp_188 = esp_181;
004b0c4b          int32_t eax_102 = *(uint32_t*)((char*)esp_188 + 0x10);
004b0c4b          
004b0c51          if (eax_102 != *(uint32_t*)eax_101)
004b0c51          {
004b0c58              *(uint32_t*)((char*)esp_188 - 4) = (eax_102 + 4);
004b0c58              
004b0c5d              if (InterlockedDecrement() == 0)
004b0c5d              {
004b0c63                  int32_t edx_42 = **(uint32_t**)((char*)esp_188 + 0x10);
004b0c65                  *(uint32_t*)((char*)esp_188 - 4) = 1;
004b0c67                  *(uint32_t*)edx_42();
004b0c5d              }
004b0c5d              
004b0c69              int32_t esi_13 = *(uint32_t*)eax_101;
004b0c6b              *(uint32_t*)((char*)esp_188 + 0x10) = esi_13;
004b0c72              *(uint32_t*)((char*)esp_188 - 4) = (esi_13 + 4);
004b0c73              InterlockedIncrement();
004b0c73              esp_188 = esp_188;
004b0c51          }
004b0c51          
004b0c75          int32_t* esi_15 = *(uint32_t*)((char*)esp_188 + 0x24);
004b0c7c          *(uint32_t*)((char*)esp_188 - 4) = &esi_15[1];
004b0c7c          
004b0c85          if ((InterlockedDecrement() == 0 && esi_15 != 0))
004b0c85          {
004b0c87              int32_t edx_43 = *(uint32_t*)esi_15;
004b0c89              *(uint32_t*)((char*)esp_188 - 4) = 1;
004b0c8d              *(uint32_t*)edx_43();
004b0c85          }
004b0c85          
004b0c8f          int32_t* esi_16 = *(uint32_t*)((char*)esp_188 + 0x30);
004b0c96          *(uint32_t*)((char*)esp_188 - 4) = &esi_16[1];
004b0c96          
004b0c9f          if ((InterlockedDecrement() == 0 && esi_16 != 0))
004b0c9f          {
004b0ca1              int32_t edx_44 = *(uint32_t*)esi_16;
004b0ca3              *(uint32_t*)((char*)esp_188 - 4) = 1;
004b0ca7              *(uint32_t*)edx_44();
004b0c9f          }
004b0c9f          
004b0ca9          int32_t eax_108 = *(uint32_t*)((char*)esp_188 + 0x10);
004b0cad          esi_17 = *(uint32_t*)((char*)esp_188 + 0x3c);
004b0cb1          *(uint32_t*)((char*)esp_188 - 4) = 1;
004b0cb3          *(uint32_t*)((char*)esp_188 - 8) = 0;
004b0cb8          *(uint32_t*)((char*)esp_188 - 0xc) = (eax_108 + 0x14);
004b0cbb          ItemExamineUI::AddItemInfo(esi_17);
004b0cbb          esp_181 = esp_188;
004b0cc0          edi_7 = 1;
004b0c24      }
004b0c24      
004b0cd1      if (ebx_2 != 0)
004b0cd1      {
004b0cd3          *(uint32_t*)((char*)esp_181 - 4) = 1;
004b0cd5          *(uint32_t*)((char*)esp_181 - 8) = 0;
004b0cd7          *(uint32_t*)((char*)esp_181 - 0xc) = "This item cannot be further imbu…";
004b0cde          ItemExamineUI::AddItemInfo(esi_17);
004b0ce3          edi_7 = 1;
004b0cd1      }
004b0cd1      
004b0cec      *(uint32_t*)((char*)esp_181 - 4) = ((char*)esp_181 + 0x40);
004b0ced      int32_t ecx_110 = *(uint32_t*)((char*)esp_181 + 0x888);
004b0cf4      *(uint32_t*)((char*)esp_181 - 8) = 0x82;
004b0cf9      *(uint32_t*)((char*)esp_181 + 0x40) = 0;
004b0cf9      
004b0d0f      if ((AppraisalProfile::InqBool(ecx_110) != 0 && *(uint32_t*)((char*)esp_181 + 0x40) == 1))
004b0d0f      {
004b0d11          *(uint32_t*)((char*)esp_181 - 4) = 1;
004b0d13          *(uint32_t*)((char*)esp_181 - 8) = 0;
004b0d15          *(uint32_t*)((char*)esp_181 - 0xc) = "This item is tethered to the lef…";
004b0d1c          ItemExamineUI::AddItemInfo(esi_17);
004b0d27      label_4b0d27:
004b0d27          *(uint32_t*)((char*)esp_181 - 4) = 1;
004b0d29          *(uint32_t*)((char*)esp_181 - 8) = 0;
004b0d2b          *(uint32_t*)((char*)esp_181 - 0xc) = 0x7928af;
004b0d32          ItemExamineUI::AddItemInfo(esi_17);
004b0d0f      }
004b0d0f      else if (edi_7 != 0)
004b0d25          goto label_4b0d27;
004b0d25      
004b0d3b      int32_t* esi_19 = (*(uint32_t*)((char*)esp_181 + 0x28) - 0x14);
004b0d41      *(uint32_t*)((char*)esp_181 - 4) = &esi_19[1];
004b0d41      
004b0d4a      if ((InterlockedDecrement() == 0 && esi_19 != 0))
004b0d4a      {
004b0d4c          int32_t eax_112 = *(uint32_t*)esi_19;
004b0d4e          *(uint32_t*)((char*)esp_181 - 4) = 1;
004b0d52          *(uint32_t*)eax_112();
004b0d4a      }
004b0d4a      
004b0d58      int32_t* esi_21 = (*(uint32_t*)((char*)esp_181 + 0x2c) - 0x14);
004b0d5e      *(uint32_t*)((char*)esp_181 - 4) = &esi_21[1];
004b0d5e      
004b0d67      if ((InterlockedDecrement() == 0 && esi_21 != 0))
004b0d67      {
004b0d69          int32_t edx_46 = *(uint32_t*)esi_21;
004b0d6b          *(uint32_t*)((char*)esp_181 - 4) = 1;
004b0d6f          *(uint32_t*)edx_46();
004b0d67      }
004b0d67      
004b0d71      int32_t* esi_22 = *(uint32_t*)((char*)esp_181 + 0x10);
004b0d78      *(uint32_t*)((char*)esp_181 - 4) = &esi_22[1];
004b0d78      
004b0d81      if ((InterlockedDecrement() == 0 && esi_22 != 0))
004b0d81      {
004b0d83          int32_t edx_47 = *(uint32_t*)esi_22;
004b0d85          *(uint32_t*)((char*)esp_181 - 4) = 1;
004b0d89          *(uint32_t*)edx_47();
004b0d81      }
004b0d81      
004b0d8b      *(uint32_t*)esp_181;
004b0d8c      *(uint32_t*)((char*)esp_181 + 4);
004b0d8d      *(uint32_t*)((char*)esp_181 + 8);
004b0d8e      *(uint32_t*)((char*)esp_181 + 0xc);
004b0140  }

004b0d98                                                                          90 90 90 90 90 90 90 90                          ........

004b0da0  void __thiscall ItemExamineUI::Appraisal_ShowCraftsman(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b0da0  {
004b0dba      int32_t var_7f0 = 0;
004b0dba      
004b0dd1      if (((AppraisalProfile::InqBool(arg2, 0x55, &var_7f0) == 0 || var_7f0 == 0) && (AppraisalProfile::InqBool(arg2, 0x5e, &var_7f0) == 0 || var_7f0 == 0)))
004b0dd1      {
004b0df1          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b0df6          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b0dfe          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b0dfe          
004b0e14          if (AppraisalProfile::InqString(arg2, 0x19, &AC1Legacy::PStringBase<char>::s_NullBuffer_2) != 0)
004b0e14          {
004b0e2d              void var_7e8;
004b0e2d              _snprintf(&var_7e8, 0x7e8, "Created by %s.", &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data);
004b0e41              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b0e14          }
004b0e14          
004b0e46          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b0e46          
004b0e5a          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004b0e5c              AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
004b0dd1      }
004b0da0  }

004b0e6f                                               90                                                                 .

004b0e70  void __thiscall ItemExamineUI::Appraisal_ShowTinkeringInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b0e70  {
004b0e9c      int32_t var_7ec;
004b0e9c      void var_7e8;
004b0e9c      
004b0e9c      if (AppraisalProfile::InqInt(arg2, 0xab, &var_7ec) != 0)
004b0e9c      {
004b0e9e          int32_t ecx_1 = var_7ec;
004b0ea5          int16_t* const eax_1 = &data_794520;
004b0ea5          
004b0eaa          if (ecx_1 <= 1)
004b0eac              eax_1 = &data_7928af;
004b0eac          
004b0ec2          _snprintf(&var_7e8, 0x7e8, "This item has been tinkered %d t…", ecx_1, eax_1);
004b0ed2          ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b0e9c      }
004b0e9c      
004b0ed7      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b0ee2      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b0eea      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b0eea      
004b0efc      if (AppraisalProfile::InqString(arg2, 0x27, &AC1Legacy::PStringBase<char>::s_NullBuffer_6) != 0)
004b0efc      {
004b0f15          _snprintf(&var_7e8, 0x7e8, "Last tinkered by %s.", &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data);
004b0f25          ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b0efc      }
004b0efc      
004b0f2a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b0f2f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b0f37      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b0f37      
004b0f49      if (AppraisalProfile::InqString(arg2, 0x28, &AC1Legacy::PStringBase<char>::s_NullBuffer_7) != 0)
004b0f49      {
004b0f62          _snprintf(&var_7e8, 0x7e8, "Imbued by %s.", &AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_data);
004b0f72          ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b0f49      }
004b0f49      
004b0f8d      int32_t var_800;
004b0f8d      
004b0f8d      if (AppraisalProfile::InqInt(arg2, 0x69, &var_800) != 0)
004b0f8d      {
004b0fab          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b0fab          int32_t var_7f0;
004b0fab          
004b0fab          if (AppraisalProfile::InqInt(arg2, 0xaa, &var_7f0) == 0)
004b0fab          {
004b1018              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b101d              AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004b1025              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
004b1033              AppraisalSystem::InqWorkmanshipAdjective(var_800, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, 0);
004b1054              _snprintf(&var_7e8, 0x7e8, "Workmanship: %s (%d)", &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_data, var_800);
004b0fab          }
004b0fab          else
004b0fab          {
004b0fb5              float var_7f4_1 = ((float)(((long double)var_800) / ((long double)var_7f0)));
004b0fc4              var_800 = _ftol2();
004b0fc8              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b0fcd              AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b0fd5              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004b0fe3              AppraisalSystem::InqWorkmanshipAdjective(var_800, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, 0);
004b0ff7              int32_t var_818_11 = var_7f0;
004b0ffb              int32_t var_820_4;
004b0ffb              var_820_4 = ((double)((long double)var_7f4_1));
004b1011              _snprintf(&var_7e8, 0x7e8, "Workmanship: %s (%0.2f)\n\nSalva…", &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_data, var_820_4);
004b0fab          }
004b0fab          
004b1059          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b1059          
004b106b          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
004b106d              AC1Legacy::PStringBase<char>::s_NullBuffer_8->vtable->__vecDelDtor(1);
004b106d          
004b1080          ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b0f8d      }
004b0f8d      
004b1090      ItemExamineUI::AddItemInfo(this, &data_7928af, 0, 1);
004b1095      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b1095      
004b10a7      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_9 != 0))
004b10a9          AC1Legacy::PStringBase<char>::s_NullBuffer_9->vtable->__vecDelDtor(1);
004b10a9      
004b10b1      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b10b1      
004b10c1      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_10->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_10 != 0))
004b10c3          AC1Legacy::PStringBase<char>::s_NullBuffer_10->vtable->__vecDelDtor(1);
004b0e70  }

004b10d8                                                                          90 90 90 90 90 90 90 90                          ........

004b10e0  void ItemExamineUI::Appraisal_ShowWeaponAndArmorData(class ItemExamineUI* this @ ecx, uint32_t arg2, class AppraisalProfile const* arg3)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004b10e0  {
004b10e5      class ItemExamineUI* ecx = _chkstk();
004b10ea      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b10f0      arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b10fa      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b1100      int32_t* cur_weenobj = ecx->cur_weenobj;
004b110b      arg_1c = cur_weenobj[0x3a];
004b110b      
004b1114      if (*(uint32_t*)(*(uint32_t*)cur_weenobj + 0x74)() != 0)
004b1122          arg_1c = AppraisalProfile::GetHookedItemAmmoType(arg_10d8);
004b1122      
004b1135      if ((arg_10d4 & 0x3f00000) != 0)
004b1135      {
004b1148          if ((arg_10d4 & 0x200000) != 0)
004b1148          {
004b115e              arg_14 = 0xffffffff;
004b115e              
004b116d              if (AppraisalProfile::InqInt(arg_10d8, 0x1c, &arg_14) == 0)
004b1294                  ItemExamineUI::AddItemInfo(ecx, "Shield Level: Unknown", 0, 1);
004b116d              else
004b116d              {
004b1185                  sprintf(&arg_100, "Base Shield Level: %d", arg_14);
004b1193                  arg_18 = 0;
004b119e                  char* var_1c_2;
004b119e                  int32_t var_18_1;
004b119e                  
004b119e                  if (AppraisalProfile::InqIntEnchantmentMod(arg_10d8, 0x1c, &arg_18) == 0)
004b119e                  {
004b11cc                      int32_t var_14_6 = 1;
004b11ce                      var_18_1 = 0;
004b11d6                      var_1c_2 = &arg_100;
004b119e                  }
004b119e                  else if (arg_18 == 0)
004b11a4                  {
004b11bf                      int32_t var_14_5 = 1;
004b11c1                      var_18_1 = ecx->mod_low_font;
004b11c9                      var_1c_2 = &arg_100;
004b11a4                  }
004b11a4                  else
004b11a4                  {
004b11ac                      int32_t var_14_4 = 1;
004b11ae                      var_18_1 = ecx->mod_high_font;
004b11b6                      var_1c_2 = &arg_100;
004b11a4                  }
004b11a4                  
004b11d9                  ItemExamineUI::AddItemInfo(ecx, var_1c_2, var_18_1, 1);
004b11f8                  InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&arg_20, GetClassObject(&__return, &PlayerDesc_ClassType));
004b11fd                  int32_t* __return_1 = __return;
004b11fd                  
004b1206                  if (__return_1 != 0)
004b120a                      *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004b120a                  
004b120d                  class CACQualities* edi_2 = arg_20;
004b121b                  arg_c = 0;
004b121f                  __return_addr = nullptr;
004b1223                  CACQualities::InqSkill(edi_2, 0x30, &arg_c, 0);
004b1231                  CACQualities::InqSkillAdvancementClass(edi_2, 0x30, &__return_addr);
004b123b                  int32_t eax_10 = arg_c;
004b123b                  
004b123f                  if (__return_addr < 3)
004b123f                  {
004b1241                      int32_t eax_11;
004b1241                      int32_t edx_2;
004b1241                      edx_2 = HIGHD(((int64_t)eax_10));
004b1241                      eax_11 = LOWD(((int64_t)eax_10));
004b1244                      eax_10 = ((eax_11 - edx_2) >> 1);
004b1246                      arg_c = eax_10;
004b123f                  }
004b123f                  
004b124a                  int32_t ecx_9 = arg_14;
004b124a                  
004b1250                  if (eax_10 > ecx_9)
004b1250                  {
004b1252                      eax_10 = ecx_9;
004b1254                      arg_c = eax_10;
004b1250                  }
004b1250                  
004b1266                  sprintf(&arg_100, "Effective Shield Level : %d (wit…", eax_10);
004b1278                  ItemExamineUI::AddItemInfo(ecx, &arg_100, 0, 1);
004b1278                  
004b127f                  if (edi_2 != 0)
004b1281                      edi_2->vtable->Release();
004b116d              }
004b1148          }
004b1148          
004b129d          WeaponProfile::WeaponProfile(&arg_30);
004b129d          
004b12b5          if (AppraisalProfile::InqWeapon(arg_10d8, &arg_30) != 0)
004b12b5          {
004b12c2              int32_t ebx_2 = (arg_10d4 & 0x400000);
004b12d0              int32_t edi_3;
004b12d0              
004b12d0              if ((ebx_2 == 0 || arg_1c == AMMO_NONE))
004b12d9                  edi_3 = 0;
004b12d0              else
004b12d2                  edi_3 = 1;
004b12d2              
004b12e4              arg_18 = edi_3;
004b12e8              AC1Legacy::PStringBase<char>::set(&arg3, "Skill: ");
004b12e8              
004b1301              if (AppraisalSystem::SkillToString(arg_38, &arg3) != 0)
004b1301              {
004b132d                  if ((AppraisalProfile::InqInt(arg_10d8, 0x161, &arg_c) != 0 && (arg_c - 1) <= 9))
004b132d                  {
004b1333                      void* const* var_14_14;
004b1333                      
004b1333                      switch (arg_c)
004b1333                      {
004b133a                          case 1:
004b133a                          {
004b13dc                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Unarmed Weapon)");
004b13e5                              var_14_14 = &__return_addr;
004b133a                              break;
004b133a                          }
004b134d                          case 2:
004b134d                          {
004b134d                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Sword)");
004b1356                              var_14_14 = &__return_addr;
004b134d                              break;
004b134d                          }
004b1365                          case 3:
004b1365                          {
004b1365                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Axe)");
004b136e                              var_14_14 = &__return_addr;
004b1365                              break;
004b1365                          }
004b1371                          case 4:
004b1371                          {
004b13dc                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Mace)");
004b13e5                              var_14_14 = &__return_addr;
004b1371                              break;
004b1371                          }
004b1381                          case 5:
004b1381                          {
004b1381                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Spear)");
004b138a                              var_14_14 = &__return_addr;
004b1381                              break;
004b1381                          }
004b1396                          case 6:
004b1396                          {
004b1396                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Dagger)");
004b139f                              var_14_14 = &__return_addr;
004b1396                              break;
004b1396                          }
004b13a2                          case 7:
004b13a2                          {
004b13dc                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Staff)");
004b13e5                              var_14_14 = &__return_addr;
004b13a2                              break;
004b13a2                          }
004b13b2                          case 8:
004b13b2                          {
004b13b2                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Bow)");
004b13bb                              var_14_14 = &__return_addr;
004b13b2                              break;
004b13b2                          }
004b13c7                          case 9:
004b13c7                          {
004b13c7                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Crossbow)");
004b13d0                              var_14_14 = &__return_addr;
004b13c7                              break;
004b13c7                          }
004b13d3                          case 0xa:
004b13d3                          {
004b13dc                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, " (Thrown)");
004b13e5                              var_14_14 = &__return_addr;
004b13d3                              break;
004b13d3                          }
004b1333                      }
004b1333                      
004b13ea                      AC1Legacy::PStringBase<char>::operator+=(&arg3, var_14_14);
004b13f3                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return_addr);
004b132d                  }
004b132d                  
004b1406                  ItemExamineUI::AddItemInfo(ecx, &arg3->armor_profile, 0, 1);
004b1301              }
004b1301              
004b140d              enum DAMAGE_TYPE eax_19;
004b140d              
004b140d              if (edi_3 != 0)
004b140d              {
004b143f                  __builtin_strncpy(&arg_20, "Damage Bonus: ", 0xf);
004b1443                  eax_19 = 0x203a;
004b140d              }
004b140d              else
004b1420                  __builtin_strncpy(&arg_20, "Damage: ", 9);
004b1420              
004b1460              int32_t ecx_27 = arg_40;
004b1467              class AppraisalProfile* edi_4;
004b1467              int16_t top;
004b1467              
004b1467              if (ecx_27 <= 0xffffffff)
004b1467              {
004b1623                  sprintf(&arg_80, "%s%s", &arg_20, "Unknown");
004b1636                  ItemExamineUI::AddItemInfo(ecx, &arg_80, 0, 1);
004b163b                  edi_4 = arg_10d8;
004b1467              }
004b1467              else
004b1467              {
004b146f                  arg_100 = 0;
004b146f                  
004b1477                  if (edi_3 == 0)
004b1477                  {
004b1486                      sprintf(&arg_100, ", unknown type");
004b1486                      
004b1491                      if (arg_34 != UNDEF_DAMAGE_TYPE)
004b1491                      {
004b14a1                          AppraisalSystem::DamageTypeToString(arg_34, &arg_8e8, 0x7e8);
004b14bb                          sprintf(&arg_100, ", %s", &arg_8e8);
004b1491                      }
004b1491                      
004b14c0                      ecx_27 = arg_40;
004b1477                  }
004b1477                  
004b14c4                  long double x87_r7_1 = ((long double)arg_40);
004b14d5                  char* var_14_15 = &arg_100;
004b14db                  long double x87_r6_3 = ((((long double)1.0) - ((long double)arg_48)) * x87_r7_1);
004b14dd                  __return_addr = ((double)x87_r6_3);
004b14e1                  long double x87_r6_4 = (x87_r7_1 - x87_r6_3);
004b14e3                  long double x87_r5_1 = ((long double)0.000199999995f);
004b14e9                  (x87_r5_1 - x87_r6_4);
004b14eb                  eax_19 = ((((x87_r5_1 < x87_r6_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, x87_r6_4))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == x87_r6_4) ? 1 : 0) << 0xe) | 0x3800))));
004b14ed                  top = 0;
004b14ed                  
004b14f2                  if ((*(uint8_t*)((char*)eax_19)[1] & 1) != 0)
004b14f2                  {
004b1515                      (((long double)__return_addr) - ((long double)10.0));
004b1515                      top = 0;
004b1521                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004b1532                      char const* const var_28_2;
004b1532                      
004b1532                      if (p_1)
004b153b                          var_28_2 = "%s%.4g - %d%s";
004b1532                      else
004b1534                          var_28_2 = "%s%.3g - %d%s";
004b1534                      
004b1541                      sprintf(&arg_80, var_28_2, &arg_20, __return_addr, arg2, ecx_27, var_14_15);
004b14f2                  }
004b14f2                  else
004b1506                      sprintf(&arg_80, "%s%d%s", &arg_20, ecx_27, var_14_15);
004b1506                  
004b1546                  edi_4 = arg_10d8;
004b1556                  arg_c = 0;
004b1556                  
004b1565                  if (AppraisalProfile::InqIntEnchantmentMod(edi_4, 0x2c, &arg_c) == 0)
004b1565                  {
004b15b9                      if (AppraisalProfile::InqFloatEnchantmentMod(edi_4, 0x16, &arg_c) == 0)
004b1605                          ItemExamineUI::AddItemInfo(ecx, &arg_80, 0, 1);
004b15b9                      else if (arg_c == 0)
004b15f0                          ItemExamineUI::AddItemInfo(ecx, &arg_80, ecx->mod_low_font, 1);
004b15c1                      else
004b15d6                          ItemExamineUI::AddItemInfo(ecx, &arg_80, ecx->mod_high_font, 1);
004b1565                  }
004b1565                  else if (arg_c == 0)
004b159f                      ItemExamineUI::AddItemInfo(ecx, &arg_80, ecx->mod_low_font, 1);
004b156d                  else
004b1582                      ItemExamineUI::AddItemInfo(ecx, &arg_80, ecx->mod_high_font, 1);
004b1467              }
004b1467              
004b164e              arg_14 = 0;
004b1656              AppraisalProfile::InqInt(edi_4, 0xcc, &arg_14);
004b1656              
004b1661              if (arg_14 > AMMO_NONE)
004b1661              {
004b1675                  AppraisalSystem::DamageTypeToString(arg_34, &arg_8e8, 0x7e8);
004b167a                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b167f                  __return_addr = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b168a                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b169b                  void* var_14_20 = &arg_8e8;
004b169c                  int32_t var_18_14 = arg_14;
004b16a7                  AC1Legacy::PStringBase<char>::sprintf(&__return_addr, "Elemental Damage Bonus: %d, %s.");
004b16ac                  void* const __return_addr_1 = __return_addr;
004b16bd                  ItemExamineUI::AddItemInfo(ecx, ((char*)__return_addr_1 + 0x14), 0, 1);
004b16bd                  
004b16d2                  if ((InterlockedDecrement(((char*)__return_addr_1 + 4)) == AMMO_NONE && __return_addr_1 != 0))
004b16da                      **(uint32_t**)__return_addr_1(1);
004b1661              }
004b1661              
004b16ea              if ((ebx_2 != 0 && arg_1c != AMMO_NONE))
004b16ea              {
004b16fc                  char* var_1c_17;
004b16fc                  int32_t var_18_16;
004b16fc                  
004b16fc                  if (arg_10d8->success_flag == 0)
004b16fc                  {
004b177b                      int32_t var_14_27 = 1;
004b177d                      var_18_16 = 0;
004b177f                      var_1c_17 = "Damage Modifier: Unknown";
004b16fc                  }
004b16fc                  else
004b16fc                  {
004b1706                      int32_t var_14_22 = arg_54;
004b1708                      ModifierToString(arg_50);
004b171b                      sprintf(&arg_80, "Damage Modifier: %s.", 0x83ef88);
004b172e                      __return_addr = nullptr;
004b172e                      
004b173d                      if (AppraisalProfile::InqFloatEnchantmentMod(arg_10d8, 0x3f, &__return_addr) == 0)
004b173d                      {
004b176d                          int32_t var_14_26 = 1;
004b176f                          var_18_16 = 0;
004b1778                          var_1c_17 = &arg_80;
004b173d                      }
004b173d                      else if (__return_addr == 0)
004b1745                      {
004b1760                          int32_t var_14_25 = 1;
004b1762                          var_18_16 = ecx->mod_low_font;
004b176a                          var_1c_17 = &arg_80;
004b1745                      }
004b1745                      else
004b1745                      {
004b174d                          int32_t var_14_24 = 1;
004b174f                          var_18_16 = ecx->mod_high_font;
004b1757                          var_1c_17 = &arg_80;
004b1745                      }
004b16fc                  }
004b16fc                  
004b1786                  ItemExamineUI::AddItemInfo(ecx, var_1c_17, var_18_16, 1);
004b16ea              }
004b16ea              
004b1796              if ((arg_10d4 & 0x2500000) != 0)
004b1796              {
004b17a1                  if (arg_3c <= 0xffffffff)
004b17a1                  {
004b190f                      ItemExamineUI::AddItemInfo(ecx, "Speed:  Unknown", 0, 1);
004b190f                      
004b1916                      if (ebx_2 != 0)
004b1916                      {
004b1918                          int32_t var_14_36 = 1;
004b191a                          int32_t var_18_22 = 0;
004b1923                          ItemExamineUI::AddItemInfo(ecx, "Range:  Unknown", 0, 1);
004b1916                      }
004b17a1                  }
004b17a1                  else
004b17a1                  {
004b17b0                      AC1Legacy::PStringBase<char>::set(&arg3, "Speed: ");
004b17bf                      AppraisalSystem::WeaponTimeToString(arg_3c, &arg3);
004b17de                      sprintf(&arg_80, "%s (%d)", &arg3->armor_profile, arg_3c);
004b17f1                      __return_addr = nullptr;
004b1800                      char* var_1c_19;
004b1800                      int32_t var_18_18;
004b1800                      
004b1800                      if (AppraisalProfile::InqIntEnchantmentMod(arg_10d8, 0x31, &__return_addr) == 0)
004b1800                      {
004b1830                          int32_t var_14_32 = 1;
004b1832                          var_18_18 = 0;
004b183b                          var_1c_19 = &arg_80;
004b1800                      }
004b1800                      else if (__return_addr == 0)
004b1808                      {
004b1823                          int32_t var_14_31 = 1;
004b1825                          var_18_18 = ecx->mod_low_font;
004b182d                          var_1c_19 = &arg_80;
004b1808                      }
004b1808                      else
004b1808                      {
004b1810                          int32_t var_14_30 = 1;
004b1812                          var_18_18 = ecx->mod_high_font;
004b181a                          var_1c_19 = &arg_80;
004b1808                      }
004b1808                      
004b183e                      ItemExamineUI::AddItemInfo(ecx, var_1c_19, var_18_18, 1);
004b183e                      
004b1845                      if (ebx_2 != 0)
004b1845                      {
004b1855                          j__CIpow();
004b1866                          arg_c = ((double)((((long double)2.0) * ((long double)0.1020408163265306)) * ((long double)1.0940000000000001)));
004b1870                          (((long double)85.0) - ((long double)arg_c));
004b1876                          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
004b1879                          int32_t* eax_42 = &MISSILE_RANGE_CAP;
004b1879                          
004b187e                          if (p_2)
004b1880                              eax_42 = &arg_c;
004b1880                          
004b1884                          int32_t ecx_51 = *(uint32_t*)eax_42;
004b1886                          int32_t edx_11 = eax_42[1];
004b1889                          arg_c = ecx_51;
004b188d                          arg_10 = edx_11;
004b1891                          long double x87_r6_9 = ((long double)arg_c);
004b1895                          long double temp13_1 = ((long double)10.0);
004b1895                          (x87_r6_9 - temp13_1);
004b189b                          eax_42 = ((((x87_r6_9 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_9, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r6_9 == temp13_1) ? 1 : 0) << 0xe) | 0x3800))));
004b189d                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
004b18a0                          int32_t ecx_52;
004b18a0                          
004b18a0                          if (p_3)
004b18a0                          {
004b18bc                              int32_t eax_45 = _ftol2();
004b18bc                              top = 0xffff;
004b18cb                              ecx_52 = (eax_45 - (((int64_t)eax_45) % 5));
004b18a0                          }
004b18a0                          else
004b18a0                          {
004b18a6                              ceil(ecx_51, edx_11);
004b18af                              top = 0;
004b18b4                              ecx_52 = _ftol2();
004b18a0                          }
004b18a0                          
004b18d6                          char const* const eax_49 = " (based on STRENGTH 100)";
004b18d6                          
004b18db                          if (arg_70 == 0)
004b18dd                              eax_49 = &data_7928af;
004b18dd                          
004b18f1                          sprintf(&arg_80, "Range: %d yds.%s", ecx_52, eax_49);
004b18f6                          int32_t var_14_35 = 1;
004b18f8                          int32_t var_18_21 = 0;
004b1923                          ItemExamineUI::AddItemInfo(ecx, &arg_80, 0, 1);
004b1845                      }
004b17a1                  }
004b1796              }
004b1796              
004b1928              /* unimplemented  {fld st0, qword [esp+0x78]} */;
004b192c              long double temp9_1 = ((long double)1.0);
004b192c              (/* unimplemented  {fcomp st0, qword [&data_7928c0]} f- temp9_1 */ - temp9_1);
004b192c              bool c0_3 = /* bool c0_3 = unimplemented  {fcomp st0, qword [&data_7928c0]} f< temp9_1 */ < temp9_1;
004b192c              bool c2_3 = (FCMP_UO(/* bool c2_3 = is_unordered.t(unimplemented  {fcomp st0, qword [&data_7928c0]}, temp9_1) */, temp9_1));
004b192c              bool c3_3 = /* bool c3_3 = unimplemented  {fcomp st0, qword [&data_7928c0]} f== temp9_1 */ == temp9_1;
004b192c              /* unimplemented  {fcomp st0, qword [&data_7928c0]} */;
004b1932              enum AMMO_TYPE eax_29;
004b1932              eax_29 = ((((c0_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_3) ? 1 : 0) << 0xa) | ((((c3_3) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004b1934              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
004b1934              
004b1943              if ((p_4 && arg_18 == 0))
004b1943              {
004b1949                  /* unimplemented  {fld st0, qword [esp+0x78]} */;
004b194d                  void* const edi_5 = &data_7b05c8;
004b1952                  long double temp10_1 = ((long double)1.0);
004b1952                  (/* unimplemented  {fcomp st0, qword [&data_7928c0]} f- temp10_1 */ - temp10_1);
004b1952                  bool c0_4 = /* bool c0_4 = unimplemented  {fcomp st0, qword [&data_7928c0]} f< temp10_1 */ < temp10_1;
004b1952                  bool c2_4 = (FCMP_UO(/* bool c2_4 = is_unordered.t(unimplemented  {fcomp st0, qword [&data_7928c0]}, temp10_1) */, temp10_1));
004b1952                  bool c3_4 = /* bool c3_4 = unimplemented  {fcomp st0, qword [&data_7928c0]} f== temp10_1 */ == temp10_1;
004b1952                  /* unimplemented  {fcomp st0, qword [&data_7928c0]} */;
004b1958                  int32_t eax_50;
004b1958                  eax_50 = ((((c0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_4) ? 1 : 0) << 0xa) | ((((c3_4) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004b1958                  
004b195d                  if ((*(uint8_t*)((char*)eax_50)[1] & 1) != 0)
004b195f                      edi_5 = &data_7b05c4;
004b195f                  
004b1964                  /* unimplemented  {fld st0, qword [&data_7928c0]} */;
004b196a                  /* unimplemented  {fsub st0, qword [esp+0x78]} */;
004b196e                  long double temp11_1 = ((long double)0.0);
004b196e                  (/* unimplemented  {fcom st0, qword [&data_794610]} f- temp11_1 */ - temp11_1);
004b196e                  bool c0_5 = /* bool c0_5 = unimplemented  {fcom st0, qword [&data_794610]} f< temp11_1 */ < temp11_1;
004b196e                  bool c2_5 = (FCMP_UO(/* bool c2_5 = is_unordered.t(unimplemented  {fcom st0, qword [&data_794610]}, temp11_1) */, temp11_1));
004b196e                  bool c3_5 = /* bool c3_5 = unimplemented  {fcom st0, qword [&data_794610]} f== temp11_1 */ == temp11_1;
004b1974                  eax_50 = ((((c0_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_5) ? 1 : 0) << 0xa) | ((((c3_5) ? 1 : 0) << 0xe) | (((top - 1) & 7) << 0xb)))));
004b1974                  
004b1979                  if ((*(uint8_t*)((char*)eax_50)[1] & 1) != 0)
004b197b                      /* unimplemented  {fchs } */;
004b197b                  
004b197d                  /* unimplemented  {fmul st0, qword [&data_7aeef0]} */;
004b1983                  /* unimplemented  {fadd qword [&data_798088]} */;
004b199d                  sprintf(&arg_80, "Bonus to Attack Skill: %s%d%%.", edi_5, _ftol2());
004b19b0                  __return_addr = nullptr;
004b19bf                  char* var_1c_21;
004b19bf                  int32_t var_18_24;
004b19bf                  
004b19bf                  if (AppraisalProfile::InqFloatEnchantmentMod(arg_10d8, 0x3e, &__return_addr) == 0)
004b19bf                  {
004b19ef                      int32_t var_14_41 = 1;
004b19f1                      var_18_24 = 0;
004b19fa                      var_1c_21 = &arg_80;
004b19bf                  }
004b19bf                  else if (__return_addr == 0)
004b19c7                  {
004b19e2                      int32_t var_14_40 = 1;
004b19e4                      var_18_24 = ecx->mod_low_font;
004b19ec                      var_1c_21 = &arg_80;
004b19c7                  }
004b19c7                  else
004b19c7                  {
004b19cf                      int32_t var_14_39 = 1;
004b19d1                      var_18_24 = ecx->mod_high_font;
004b19d9                      var_1c_21 = &arg_80;
004b19c7                  }
004b19c7                  
004b19fd                  ItemExamineUI::AddItemInfo(ecx, var_1c_21, var_18_24, 1);
004b1943              }
004b12b5          }
004b12b5          
004b1a10          if ((arg_10d4 & 0x400000) == 0)
004b1a10          {
004b1a4b              if ((arg_10d4 & "activation type (%s) with '%s' b…") != 0)
004b1a4b              {
004b1a52                  if (arg_1c == AMMO_ARROW)
004b1a52                  {
004b1a72                      int32_t __saved_ebp_6 = 1;
004b1a74                      int32_t __saved_edi_6 = 0;
004b1aad                      ItemExamineUI::AddItemInfo(ecx, "Used as ammunition by bows.", 0, 1);
004b1a52                  }
004b1a52                  else if (arg_1c == 2)
004b1a55                  {
004b1a67                      int32_t __saved_ebp_5 = 1;
004b1a69                      int32_t __saved_edi_5 = 0;
004b1aad                      ItemExamineUI::AddItemInfo(ecx, "Used as ammunition by crossbows.", 0, 1);
004b1a55                  }
004b1a55                  else if (arg_1c == 4)
004b1a5a                  {
004b1a5c                      int32_t __saved_ebp_4 = 1;
004b1a5e                      int32_t __saved_edi_4 = 0;
004b1aad                      ItemExamineUI::AddItemInfo(ecx, "Used as ammunition by atlatls.", 0, 1);
004b1a5a                  }
004b1a4b              }
004b1a10          }
004b1a10          else if (arg_1c == AMMO_ARROW)
004b1a17          {
004b1a3b              int32_t __saved_ebp_3 = 1;
004b1a3d              int32_t __saved_edi_3 = 0;
004b1aad              ItemExamineUI::AddItemInfo(ecx, "Uses arrows as ammunition.", 0, 1);
004b1a17          }
004b1a17          else if (arg_1c == 2)
004b1a1a          {
004b1a30              int32_t __saved_ebp_2 = 1;
004b1a32              int32_t __saved_edi_2 = 0;
004b1aad              ItemExamineUI::AddItemInfo(ecx, "Uses quarrels as ammunition.", 0, 1);
004b1a1a          }
004b1a1a          else if (arg_1c == 4)
004b1a1f          {
004b1a25              int32_t __saved_ebp_1 = 1;
004b1a27              int32_t __saved_edi_1 = 0;
004b1aad              ItemExamineUI::AddItemInfo(ecx, "Uses atlatl darts as ammunition.", 0, 1);
004b1a1f          }
004b1135      }
004b1135      else if ((arg_10d4 & 0x8007fff) != 0)
004b1a82      {
004b1a84          class ACCWeenieObject* cur_weenobj_1 = ecx->cur_weenobj;
004b1a87          uint32_t _priority = cur_weenobj_1->pwd._priority;
004b1a91          class AppraisalProfile const** __saved_ebp_7 = &arg3;
004b1a92          uint32_t __saved_edi_7 = _priority;
004b1a92          
004b1a9d          if (AppraisalSystem::ClothingPriorityToString(_priority, cur_weenobj_1) != 0)
004b1a9d          {
004b1aa3              int32_t __saved_ebp_8 = 1;
004b1aa5              int32_t __saved_edi_8 = 0;
004b1aad              ItemExamineUI::AddItemInfo(ecx, &arg3->armor_profile, 0, 1);
004b1a9d          }
004b1a82      }
004b1a82      
004b1ab2      class AppraisalProfile* esi_1 = arg3;
004b1ab2      
004b1ac7      if ((InterlockedDecrement(&esi_1->success_flag) == 0 && esi_1 != 0))
004b1ac9          esi_1->vtable->__vecDelDtor(1);
004b10e0  }

004b1adb                                                                                   90                                         .
004b1adc  uint32_t jump_table_4b1adc[0xa] = 
004b1adc  {
004b1adc      [0x0] =  0x004b133a
004b1ae0      [0x1] =  0x004b1344
004b1ae4      [0x2] =  0x004b135c
004b1ae8      [0x3] =  0x004b1371
004b1aec      [0x4] =  0x004b1378
004b1af0      [0x5] =  0x004b138d
004b1af4      [0x6] =  0x004b13a2
004b1af8      [0x7] =  0x004b13a9
004b1afc      [0x8] =  0x004b13be
004b1b00      [0x9] =  0x004b13d3
004b1b04  }

004b1b04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004b1b10  void __thiscall ItemExamineUI::Appraisal_ShowCasterData(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b1b10  {
004b1b37      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004b1b37      double var_880;
004b1b37      
004b1b37      if (AppraisalProfile::InqFloat(arg2, 0x90, &var_880) != 0)
004b1b37      {
004b1b47          var_880 = ((double)(((long double)var_880) + ((long double)1.0)));
004b1b53          int32_t var_8b4_1 = *(uint32_t*)((char*)var_880)[4];
004b1b55          ModifierToString(var_880);
004b1b65          void var_870;
004b1b65          sprintf(&var_870, "Bonus to Mana Conversion: %s.", 0x83ef88);
004b1b7a          AC1Legacy::PStringBase<char>::s_NullBuffer_4 = nullptr;
004b1b89          char* var_8bc_1;
004b1b89          int32_t var_8b8_2;
004b1b89          
004b1b89          if (AppraisalProfile::InqFloatEnchantmentMod(arg2, 0x90, &AC1Legacy::PStringBase<char>::s_NullBuffer_4) == 0)
004b1b89          {
004b1bb3              int32_t var_8b4_5 = 0;
004b1bb5              var_8b8_2 = 0;
004b1bbb              var_8bc_1 = &var_870;
004b1b89          }
004b1b89          else if (AC1Legacy::PStringBase<char>::s_NullBuffer_4 == 0)
004b1b91          {
004b1ba9              int32_t var_8b4_4 = 0;
004b1bab              var_8b8_2 = this->mod_low_font;
004b1bb0              var_8bc_1 = &var_870;
004b1b91          }
004b1b91          else
004b1b91          {
004b1b99              int32_t var_8b4_3 = 0;
004b1b9b              var_8b8_2 = this->mod_high_font;
004b1ba0              var_8bc_1 = &var_870;
004b1b91          }
004b1b91          
004b1bbe          ItemExamineUI::AddItemInfo(this, var_8bc_1, var_8b8_2, 0);
004b1b37      }
004b1b37      
004b1bc3      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b1bce      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b1bd6      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b1bd8      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b1be2      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b1be6      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b1be8      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b1bf2      AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b1bf6      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004b1c09      int32_t var_890 = 0;
004b1c11      int32_t var_88c = 0x3ff00000;
004b1c11      
004b1c20      if (AppraisalProfile::InqFloat(arg2, 0x98, &var_890) != 0)
004b1c20      {
004b1c30          enum DAMAGE_TYPE var_884 = UNDEF_DAMAGE_TYPE;
004b1c30          
004b1c3f          if (AppraisalProfile::InqInt(arg2, 0x2d, &var_884) != 0)
004b1c3f          {
004b1c57              void var_7f0;
004b1c57              AppraisalSystem::DamageTypeToString(var_884, &var_7f0, 0x7e8);
004b1c63              void* var_8c0_1 = &var_7f0;
004b1c6e              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, "Damage bonus for %s spells:");
004b1c7b              int32_t var_8cc_1 = var_88c;
004b1c82              double var_878_1 = ((double)CombatSystem::GetElementalModPKModifier(var_890));
004b1c8e              int32_t var_8d4_1 = var_88c;
004b1c90              SmallModifierToString(var_890);
004b1c95              int32_t var_8dc_1 = 0x83ef88;
004b1ca0              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_6, " vs. Monsters: %s.");
004b1cad              int32_t var_8e8_1 = *(uint32_t*)((char*)var_878_1)[4];
004b1caf              SmallModifierToString(var_878_1);
004b1cb4              int32_t var_8f0_1 = 0x83ef88;
004b1cbf              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, " vs. Players: %s.");
004b1cd4              int32_t var_898 = 0;
004b1ce3              int32_t var_8b8_6;
004b1ce3              
004b1ce3              if (AppraisalProfile::InqFloatEnchantmentMod(arg2, 0x98, &var_898) == 0)
004b1ce3              {
004b1d61                  ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_data, 0, 0);
004b1d66                  AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b1d74                  ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data, 0, 1);
004b1d79                  int32_t var_8b4_14 = 1;
004b1d7b                  var_8b8_6 = 0;
004b1ce3              }
004b1ce3              else
004b1ce3              {
004b1ceb                  int32_t eax_14;
004b1ceb                  
004b1ceb                  if (var_898 == 0)
004b1cf5                      eax_14 = this->mod_low_font;
004b1ceb                  else
004b1ced                      eax_14 = this->mod_high_font;
004b1ced                  
004b1d08                  ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_data, eax_14, 0);
004b1d13                  int32_t eax_18;
004b1d13                  
004b1d13                  if (var_898 == 0)
004b1d1d                      eax_18 = this->mod_low_font;
004b1d13                  else
004b1d15                      eax_18 = this->mod_high_font;
004b1d15                  
004b1d23                  AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b1d30                  ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data, eax_18, 1);
004b1d30                  
004b1d3b                  if (var_898 == 0)
004b1d3b                  {
004b1d4e                      int32_t var_8b4_13 = 1;
004b1d50                      var_8b8_6 = this->mod_low_font;
004b1d3b                  }
004b1d3b                  else
004b1d3b                  {
004b1d43                      int32_t var_8b4_12 = 1;
004b1d45                      var_8b8_6 = this->mod_high_font;
004b1d3b                  }
004b1ce3              }
004b1ce3              
004b1d7d              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004b1d87              ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data, var_8b8_6, 1);
004b1c3f          }
004b1c20      }
004b1c20      
004b1d9e      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004b1da0          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
004b1da0      
004b1db4      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
004b1db6          AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
004b1db6      
004b1dbe      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b1dbe      
004b1dce      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_7 != 0))
004b1dd0          AC1Legacy::PStringBase<char>::s_NullBuffer_7->vtable->__vecDelDtor(1);
004b1b10  }

004b1de1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004b1df0  void __thiscall ItemExamineUI::Appraisal_ShowDefenseModData(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b1df0  {
004b1e1a      double var_98;
004b1e1a      void var_88;
004b1e1a      
004b1e1a      if (AppraisalProfile::InqFloat(arg2, 0x1d, &var_98) != 0)
004b1e1a      {
004b1e20          long double x87_r7_1 = ((long double)var_98);
004b1e24          long double temp1_1 = ((long double)1.0);
004b1e24          (x87_r7_1 - temp1_1);
004b1e2a          int32_t eax;
004b1e2a          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004b1e2c          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004b1e2c          
004b1e2f          if (p_1)
004b1e2f          {
004b1e39              int32_t var_ac_1 = *(uint32_t*)((char*)var_98)[4];
004b1e3b              SmallModifierToString(var_98);
004b1e4b              sprintf(&var_88, "Bonus to Melee Defense: %s.", 0x83ef88);
004b1e59              int32_t var_8c = 0;
004b1e68              void* var_b4_1;
004b1e68              int32_t var_b0_2;
004b1e68              
004b1e68              if (AppraisalProfile::InqFloatEnchantmentMod(arg2, 0x1d, &var_8c) == 0)
004b1e68              {
004b1e92                  int32_t var_ac_5 = 1;
004b1e94                  var_b0_2 = 0;
004b1e9a                  var_b4_1 = &var_88;
004b1e68              }
004b1e68              else if (var_8c == 0)
004b1e70              {
004b1e88                  int32_t var_ac_4 = 1;
004b1e8a                  var_b0_2 = this->mod_low_font;
004b1e8f                  var_b4_1 = &var_88;
004b1e70              }
004b1e70              else
004b1e70              {
004b1e78                  int32_t var_ac_3 = 1;
004b1e7a                  var_b0_2 = this->mod_high_font;
004b1e7f                  var_b4_1 = &var_88;
004b1e70              }
004b1e70              
004b1e9d              ItemExamineUI::AddItemInfo(this, var_b4_1, var_b0_2, 1);
004b1e2f          }
004b1e1a      }
004b1e1a      
004b1eb5      if (AppraisalProfile::InqFloat(arg2, 0x95, &var_98) != 0)
004b1eb5      {
004b1eb7          long double x87_r7_2 = ((long double)var_98);
004b1ebb          long double temp2_1 = ((long double)1.0);
004b1ebb          (x87_r7_2 - temp2_1);
004b1ec1          int32_t eax_5;
004b1ec1          eax_5 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
004b1ec3          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
004b1ec3          
004b1ec6          if (p_2)
004b1ec6          {
004b1ed0              int32_t var_ac_7 = *(uint32_t*)((char*)var_98)[4];
004b1ed2              SmallModifierToString(var_98);
004b1ee2              sprintf(&var_88, "Bonus to Missile Defense: %s.", 0x83ef88);
004b1ef2              ItemExamineUI::AddItemInfo(this, &var_88, 0, 1);
004b1ec6          }
004b1eb5      }
004b1eb5      
004b1f0a      if (AppraisalProfile::InqFloat(arg2, 0x96, &var_98) != 0)
004b1f0a      {
004b1f0c          long double x87_r7_3 = ((long double)var_98);
004b1f10          long double temp3_1 = ((long double)1.0);
004b1f10          (x87_r7_3 - temp3_1);
004b1f16          int32_t eax_7;
004b1f16          eax_7 = ((((x87_r7_3 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004b1f18          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
004b1f18          
004b1f1b          if (p_3)
004b1f1b          {
004b1f25              int32_t var_ac_9 = *(uint32_t*)((char*)var_98)[4];
004b1f27              SmallModifierToString(var_98);
004b1f37              sprintf(&var_88, "Bonus to Magic Defense: %s.", 0x83ef88);
004b1f47              ItemExamineUI::AddItemInfo(this, &var_88, 0, 1);
004b1f1b          }
004b1f0a      }
004b1df0  }

004b1f55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004b1f60  void __thiscall ItemExamineUI::Appraisal_ShowArmorMods(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b1f60  {
004b1f64      class AppraisalProfile* ebp = arg2;
004b1f72      int32_t var_24 = 0x7af2fc;
004b1f7a      float var_20 = 1f;
004b1f82      float var_1c = 1f;
004b1f8a      float var_18 = 1f;
004b1f92      float var_14 = 1f;
004b1f9a      float var_10 = 1f;
004b1fa2      float var_c = 1f;
004b1faa      float var_8 = 1f;
004b1fb2      float var_4 = 1f;
004b1fba      int32_t var_2c = 0xffffffff;
004b1fba      
004b1fc9      if ((AppraisalProfile::InqArmor(ebp, &var_24) != 0 && (AppraisalProfile::InqInt(ebp, 0x1c, &var_2c) != 0 && var_2c > 0)))
004b1fc9      {
004b1ff1          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b1ffe          arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b2006          int32_t var_30 = 0;
004b200e          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b2019          AC1Legacy::PStringBase<char>::set(&arg2, "\nArmor Level: ");
004b201e          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b2023          int32_t ebx_1 = var_2c;
004b2027          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b202f          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b2036          AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, ebx_1);
004b203b          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b203f          uint32_t m_len = AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_len;
004b203f          
004b204d          if ((m_len != 1 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b2059              AC1Legacy::PStringBase<char>::append_n_chars(&arg2, &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data, (m_len - 1));
004b2059          
004b206c          if (InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0)
004b206e              AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004b206e          
004b2086          class ArmorProfile** var_4c_1;
004b2086          int32_t var_48_2;
004b2086          
004b2086          if (AppraisalProfile::InqIntEnchantmentMod(ebp, 0x1c, &var_30) == 0)
004b2086          {
004b20ba              int32_t var_44_9 = 1;
004b20bc              var_48_2 = 0;
004b20c1              var_4c_1 = &arg2->armor_profile;
004b2086          }
004b2086          else if (var_30 == 0)
004b208e          {
004b20ad              int32_t var_44_8 = 1;
004b20af              var_48_2 = this->mod_low_font;
004b20b3              var_4c_1 = &arg2->armor_profile;
004b208e          }
004b208e          else
004b208e          {
004b209a              int32_t var_44_7 = 1;
004b209c              var_48_2 = this->mod_high_font;
004b20a0              var_4c_1 = &arg2->armor_profile;
004b208e          }
004b208e          
004b20c4          ItemExamineUI::AddItemInfo(this, var_4c_1, var_48_2, 1);
004b20c4          
004b20e4          if (AppraisalSystem::DamageResistanceToString(SLASH_DAMAGE_TYPE, var_2c, var_20, &arg2) != 0)
004b20e4          {
004b20f6              class ArmorProfile** var_4c_3;
004b20f6              int32_t var_48_4;
004b20f6              
004b20f6              if (AppraisalProfile::InqFloatEnchantmentMod(ebp, 0xd, &var_30) == 0)
004b20f6              {
004b212a                  int32_t var_44_14 = 1;
004b212c                  var_48_4 = 0;
004b2131                  var_4c_3 = &arg2->armor_profile;
004b20f6              }
004b20f6              else if (var_30 == 0)
004b20fe              {
004b211d                  int32_t var_44_13 = 1;
004b211f                  var_48_4 = this->mod_low_font;
004b2123                  var_4c_3 = &arg2->armor_profile;
004b20fe              }
004b20fe              else
004b20fe              {
004b210a                  int32_t var_44_12 = 1;
004b210c                  var_48_4 = this->mod_high_font;
004b2110                  var_4c_3 = &arg2->armor_profile;
004b20fe              }
004b20fe              
004b2134              ItemExamineUI::AddItemInfo(this, var_4c_3, var_48_4, 1);
004b20e4          }
004b20e4          
004b2154          if (AppraisalSystem::DamageResistanceToString(PIERCE_DAMAGE_TYPE, var_2c, var_1c, &arg2) != 0)
004b2154          {
004b2166              class ArmorProfile** var_4c_5;
004b2166              int32_t var_48_6;
004b2166              
004b2166              if (AppraisalProfile::InqFloatEnchantmentMod(ebp, 0xe, &var_30) == 0)
004b2166              {
004b219a                  int32_t var_44_19 = 1;
004b219c                  var_48_6 = 0;
004b21a1                  var_4c_5 = &arg2->armor_profile;
004b2166              }
004b2166              else if (var_30 == 0)
004b216e              {
004b218d                  int32_t var_44_18 = 1;
004b218f                  var_48_6 = this->mod_low_font;
004b2193                  var_4c_5 = &arg2->armor_profile;
004b216e              }
004b216e              else
004b216e              {
004b217a                  int32_t var_44_17 = 1;
004b217c                  var_48_6 = this->mod_high_font;
004b2180                  var_4c_5 = &arg2->armor_profile;
004b216e              }
004b216e              
004b21a4              ItemExamineUI::AddItemInfo(this, var_4c_5, var_48_6, 1);
004b2154          }
004b2154          
004b21c4          if (AppraisalSystem::DamageResistanceToString(BLUDGEON_DAMAGE_TYPE, var_2c, var_18, &arg2) != 0)
004b21c4          {
004b21d6              class ArmorProfile** var_4c_7;
004b21d6              int32_t var_48_8;
004b21d6              
004b21d6              if (AppraisalProfile::InqFloatEnchantmentMod(ebp, 0xf, &var_30) == 0)
004b21d6              {
004b220a                  int32_t var_44_24 = 1;
004b220c                  var_48_8 = 0;
004b2211                  var_4c_7 = &arg2->armor_profile;
004b21d6              }
004b21d6              else if (var_30 == 0)
004b21de              {
004b21fd                  int32_t var_44_23 = 1;
004b21ff                  var_48_8 = this->mod_low_font;
004b2203                  var_4c_7 = &arg2->armor_profile;
004b21de              }
004b21de              else
004b21de              {
004b21ea                  int32_t var_44_22 = 1;
004b21ec                  var_48_8 = this->mod_high_font;
004b21f0                  var_4c_7 = &arg2->armor_profile;
004b21de              }
004b21de              
004b2214              ItemExamineUI::AddItemInfo(this, var_4c_7, var_48_8, 1);
004b21c4          }
004b21c4          
004b2234          if (AppraisalSystem::DamageResistanceToString(FIRE_DAMAGE_TYPE, var_2c, var_10, &arg2) != 0)
004b2234          {
004b2246              class ArmorProfile** var_4c_9;
004b2246              int32_t var_48_10;
004b2246              
004b2246              if (AppraisalProfile::InqFloatEnchantmentMod(ebp, 0x11, &var_30) == 0)
004b2246              {
004b227a                  int32_t var_44_29 = 1;
004b227c                  var_48_10 = 0;
004b2281                  var_4c_9 = &arg2->armor_profile;
004b2246              }
004b2246              else if (var_30 == 0)
004b224e              {
004b226d                  int32_t var_44_28 = 1;
004b226f                  var_48_10 = this->mod_low_font;
004b2273                  var_4c_9 = &arg2->armor_profile;
004b224e              }
004b224e              else
004b224e              {
004b225a                  int32_t var_44_27 = 1;
004b225c                  var_48_10 = this->mod_high_font;
004b2260                  var_4c_9 = &arg2->armor_profile;
004b224e              }
004b224e              
004b2284              ItemExamineUI::AddItemInfo(this, var_4c_9, var_48_10, 1);
004b2234          }
004b2234          
004b22a4          if (AppraisalSystem::DamageResistanceToString(COLD_DAMAGE_TYPE, var_2c, var_14, &arg2) != 0)
004b22a4          {
004b22b6              class ArmorProfile** var_4c_11;
004b22b6              int32_t var_48_12;
004b22b6              
004b22b6              if (AppraisalProfile::InqFloatEnchantmentMod(ebp, 0x10, &var_30) == 0)
004b22b6              {
004b22ea                  int32_t var_44_34 = 1;
004b22ec                  var_48_12 = 0;
004b22f1                  var_4c_11 = &arg2->armor_profile;
004b22b6              }
004b22b6              else if (var_30 == 0)
004b22be              {
004b22dd                  int32_t var_44_33 = 1;
004b22df                  var_48_12 = this->mod_low_font;
004b22e3                  var_4c_11 = &arg2->armor_profile;
004b22be              }
004b22be              else
004b22be              {
004b22ca                  int32_t var_44_32 = 1;
004b22cc                  var_48_12 = this->mod_high_font;
004b22d0                  var_4c_11 = &arg2->armor_profile;
004b22be              }
004b22be              
004b22f4              ItemExamineUI::AddItemInfo(this, var_4c_11, var_48_12, 1);
004b22a4          }
004b22a4          
004b2314          if (AppraisalSystem::DamageResistanceToString(ACID_DAMAGE_TYPE, var_2c, var_c, &arg2) != 0)
004b2314          {
004b2326              class ArmorProfile** var_4c_13;
004b2326              int32_t var_48_14;
004b2326              
004b2326              if (AppraisalProfile::InqFloatEnchantmentMod(ebp, 0x12, &var_30) == 0)
004b2326              {
004b235a                  int32_t var_44_39 = 1;
004b235c                  var_48_14 = 0;
004b2361                  var_4c_13 = &arg2->armor_profile;
004b2326              }
004b2326              else if (var_30 == 0)
004b232e              {
004b234d                  int32_t var_44_38 = 1;
004b234f                  var_48_14 = this->mod_low_font;
004b2353                  var_4c_13 = &arg2->armor_profile;
004b232e              }
004b232e              else
004b232e              {
004b233a                  int32_t var_44_37 = 1;
004b233c                  var_48_14 = this->mod_high_font;
004b2340                  var_4c_13 = &arg2->armor_profile;
004b232e              }
004b232e              
004b2364              ItemExamineUI::AddItemInfo(this, var_4c_13, var_48_14, 1);
004b2314          }
004b2314          
004b2384          if (AppraisalSystem::DamageResistanceToString(ELECTRIC_DAMAGE_TYPE, var_2c, var_8, &arg2) != 0)
004b2384          {
004b2396              class ArmorProfile** var_4c_15;
004b2396              int32_t var_48_16;
004b2396              
004b2396              if (AppraisalProfile::InqFloatEnchantmentMod(ebp, 0x13, &var_30) == 0)
004b2396              {
004b23ca                  int32_t var_44_44 = 1;
004b23cc                  var_48_16 = 0;
004b23d1                  var_4c_15 = &arg2->armor_profile;
004b2396              }
004b2396              else if (var_30 == 0)
004b239e              {
004b23bd                  int32_t var_44_43 = 1;
004b23bf                  var_48_16 = this->mod_low_font;
004b23c3                  var_4c_15 = &arg2->armor_profile;
004b239e              }
004b239e              else
004b239e              {
004b23aa                  int32_t var_44_42 = 1;
004b23ac                  var_48_16 = this->mod_high_font;
004b23b0                  var_4c_15 = &arg2->armor_profile;
004b239e              }
004b239e              
004b23d4              ItemExamineUI::AddItemInfo(this, var_4c_15, var_48_16, 1);
004b2384          }
004b2384          
004b23f7          if (AppraisalSystem::DamageResistanceToString(NETHER_DAMAGE_TYPE, var_2c, var_4, &arg2) != 0)
004b23f7          {
004b240c              char* var_4c_17;
004b240c              int32_t var_48_18;
004b240c              
004b240c              if (AppraisalProfile::InqFloatEnchantmentMod(ebp, 0xa5, &var_30) == 0)
004b240c              {
004b2440                  int32_t var_44_49 = 1;
004b2442                  var_48_18 = 0;
004b2447                  var_4c_17 = &arg2->armor_profile;
004b240c              }
004b240c              else if (var_30 == 0)
004b2414              {
004b2433                  int32_t var_44_48 = 1;
004b2435                  var_48_18 = this->mod_low_font;
004b2439                  var_4c_17 = &arg2->armor_profile;
004b2414              }
004b2414              else
004b2414              {
004b2420                  int32_t var_44_47 = 1;
004b2422                  var_48_18 = this->mod_high_font;
004b2426                  var_4c_17 = &arg2->armor_profile;
004b2414              }
004b2414              
004b244a              ItemExamineUI::AddItemInfo(this, var_4c_17, var_48_18, 1);
004b23f7          }
004b23f7          
004b244f          class AppraisalProfile* esi_1 = arg2;
004b244f          
004b2461          if ((InterlockedDecrement(&esi_1->success_flag) == 0 && esi_1 != 0))
004b2463              esi_1->vtable->__vecDelDtor(1);
004b1fc9      }
004b1f60  }

004b2473                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004b2480  void __thiscall ItemExamineUI::Appraisal_ShowBoostValue(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b2480  {
004b2489      class ACCWeenieObject* cur_weenobj = this->cur_weenobj;
004b2489      
004b2493      if ((*(uint8_t*)((char*)cur_weenobj->pwd._bitfield)[2] & 1) == 0)
004b2493      {
004b249f          bool cond:0_1 = cur_weenobj->vtable->IsHook() == 0;
004b24a8          int32_t eax_3;
004b24a8          
004b24a8          if (!(cond:0_1))
004b24ac              eax_3 = AppraisalProfile::IsHookedItemHealer(arg2);
004b24ac          
004b24b3          if ((cond:0_1 || eax_3 == 0))
004b24b3          {
004b24c2              int32_t var_7f0 = 0;
004b24ca              int32_t var_7ec = 0;
004b24ca              
004b24d9              if ((AppraisalProfile::InqInt(arg2, 0x5a, &var_7f0) != 0 && AppraisalProfile::InqInt(arg2, 0x59, &var_7ec) != 0))
004b24d9              {
004b24f5                  int32_t eax_6 = var_7ec;
004b24fc                  void var_7e8;
004b24fc                  
004b24fc                  if (eax_6 == 2)
004b24fc                  {
004b254b                      int32_t eax_14 = var_7f0;
004b254b                      
004b2551                      if (eax_14 < 0)
004b256d                          sprintf(&var_7e8, "Depletes %d Health when used.", -(eax_14));
004b2551                      else
004b256d                          sprintf(&var_7e8, "Restores %d Health when used.", eax_14);
004b24fc                  }
004b24fc                  else if (eax_6 == 4)
004b2501                  {
004b252c                      int32_t eax_12 = var_7f0;
004b252c                      
004b2532                      if (eax_12 < 0)
004b256d                          sprintf(&var_7e8, "Depletes %d Stamina when consume…", -(eax_12));
004b2532                      else
004b256d                          sprintf(&var_7e8, "Restores %d Stamina when consume…", eax_12);
004b2501                  }
004b2501                  else if (eax_6 == 6)
004b2506                  {
004b2508                      int32_t eax_10 = var_7f0;
004b250e                      void* var_804_1;
004b250e                      char const* const var_800_1;
004b250e                      int32_t var_7fc_3;
004b250e                      
004b250e                      if (eax_10 < 0)
004b250e                      {
004b251f                          var_7fc_3 = -(eax_10);
004b2520                          var_800_1 = "Depletes %d Mana when used.";
004b2529                          var_804_1 = &var_7e8;
004b250e                      }
004b250e                      else
004b250e                      {
004b2510                          var_7fc_3 = eax_10;
004b2511                          var_800_1 = "Restores %d Mana when used.";
004b251a                          var_804_1 = &var_7e8;
004b250e                      }
004b250e                      
004b256d                      sprintf(var_804_1, var_800_1, var_7fc_3);
004b2506                  }
004b2506                  
004b2581                  ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b24d9              }
004b24b3          }
004b2493      }
004b2480  }

004b2591                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004b25a0  void __thiscall ItemExamineUI::Appraisal_ShowHealKitValues(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b25a0  {
004b25b1      class ACCWeenieObject* cur_weenobj = this->cur_weenobj;
004b25b1      
004b25bb      if ((*(uint8_t*)((char*)cur_weenobj->pwd._bitfield)[2] & 1) != 0)
004b25bb      {
004b25e3      label_4b25e3:
004b25e3          int32_t var_7f4 = 0;
004b25f8          void var_7e8;
004b25f8          
004b25f8          if (AppraisalProfile::InqInt(arg2, 0x5a, &var_7f4) != 0)
004b25f8          {
004b2609              sprintf(&var_7e8, "Bonus to Healing Skill: %d", var_7f4);
004b2619              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b25f8          }
004b25f8          
004b2627          int32_t var_7f0 = 0;
004b262f          int32_t var_7ec_1 = 0x3ff00000;
004b262f          
004b263e          if (AppraisalProfile::InqFloat(arg2, 0x64, &var_7f0) != 0)
004b263e          {
004b265a              sprintf(&var_7e8, "Restoration Bonus: %d%%", _ftol2());
004b266a              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b263e          }
004b25bb      }
004b25bb      else if ((cur_weenobj->vtable->IsHook() != 0 && AppraisalProfile::IsHookedItemHealer(arg2) != 0))
004b25d3          goto label_4b25e3;
004b25a0  }

004b267b                                                                                   90 90 90 90 90                             .....

004b2680  void __thiscall ItemExamineUI::Appraisal_ShowCapacity(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b2680  {
004b2692      bool cond:0 = this->cur_weenobj->vtable->IsHook() == 0;
004b269b      int32_t eax_2;
004b269b      
004b269b      if (!(cond:0))
004b269f          eax_2 = AnimSequenceNode::has_anim(arg2);
004b269f      
004b26a6      if ((cond:0 || eax_2 == 0))
004b26a6      {
004b26ac          class ACCWeenieObject* cur_weenobj = this->cur_weenobj;
004b26af          int32_t _itemsCapacity = cur_weenobj->pwd._itemsCapacity;
004b26b7          int32_t _containersCapacity = cur_weenobj->pwd._containersCapacity;
004b26c4          void var_7e8;
004b26c4          
004b26c4          if (_itemsCapacity > 0)
004b26c4          {
004b26c8              void* var_808_1;
004b26c8              
004b26c8              if (_containersCapacity <= 0)
004b26c8              {
004b26f1                  sprintf(&var_7e8, "Can hold up to %d items.", _itemsCapacity);
004b26f6                  int32_t var_800_4 = 0;
004b26f8                  int32_t var_804_3 = 0;
004b26fe                  var_808_1 = &var_7e8;
004b26c8              }
004b26c8              else
004b26c8              {
004b26d6                  sprintf(&var_7e8, "Can hold up to %d items and %d c…", _itemsCapacity, _containersCapacity);
004b26db                  int32_t var_800_2 = 0;
004b26dd                  int32_t var_804_2 = 0;
004b26e3                  var_808_1 = &var_7e8;
004b26c8              }
004b26c8              
004b2720              ItemExamineUI::AddItemInfo(this, var_808_1, 0, 0);
004b26c4          }
004b26c4          else if (_containersCapacity > 0)
004b2703          {
004b2710              sprintf(&var_7e8, "Can hold up to %d containers.", _containersCapacity);
004b2715              int32_t var_800_6 = 0;
004b2717              int32_t var_804_4 = 0;
004b2720              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b2703          }
004b2703          
004b2738          int32_t var_7f0;
004b2738          int32_t var_7ec;
004b2738          
004b2738          if ((AppraisalProfile::InqInt(arg2, 0xaf, &var_7ec) != 0 && AppraisalProfile::InqInt(arg2, 0xae, &var_7f0) != 0))
004b2738          {
004b2763              sprintf(&var_7e8, "%d of %d pages full.", var_7f0, var_7ec);
004b2773              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b2738          }
004b26a6      }
004b2680  }

004b2784              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004b2790  void __thiscall ItemExamineUI::Appraisal_ShowLockAppraiseInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b2790  {
004b27a3      int32_t var_7f0;
004b27a3      
004b27a3      if (this->cur_weenobj->vtable->IsHook() == 0)
004b27a3      {
004b27c1          int32_t var_7f4;
004b27c1          void var_7e8;
004b27c1          
004b27c1          if (AppraisalProfile::InqBool(arg2, 3, &var_7f0) == 0)
004b27c1          {
004b28b1              if (AppraisalProfile::InqInt(arg2, 0x26, &var_7f4) != 0)
004b28b1              {
004b28b3                  int32_t eax_9 = var_7f4;
004b28b3                  
004b28b9                  if (eax_9 < 0)
004b28b9                  {
004b28c6                      sprintf(&var_7e8, "Bonus to Lockpick Skill: %d", eax_9);
004b28da                      ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b28e7                      return;
004b28b9                  }
004b28b9                  
004b28ea                  if (eax_9 > 0)
004b28ea                  {
004b28f7                      sprintf(&var_7e8, "Bonus to Lockpick Skill: +%d", eax_9);
004b290b                      ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b28ea                  }
004b28b1              }
004b27c1          }
004b27c1          else
004b27c1          {
004b27d3              if (var_7f0 == 0)
004b27d3              {
004b2891                  ItemExamineUI::AddItemInfo(this, "Unlocked", 0, 0);
004b289e                  return;
004b27d3              }
004b27d3              
004b27de              ItemExamineUI::AddItemInfo(this, "Locked", 0, 0);
004b27de              
004b27f3              if (AppraisalProfile::InqInt(arg2, 0x26, &var_7f4) == 0)
004b27f3              {
004b287c                  ItemExamineUI::AddItemInfo(this, "You can't tell how hard the lock…", 0, 0);
004b2889                  return;
004b27f3              }
004b27f3              
004b2808              int32_t var_7ec;
004b2808              
004b2808              if (AppraisalProfile::InqInt(arg2, 0xad, &var_7ec) != 0)
004b2808              {
004b2812                  class AC1Legacy::PStringBase<char> var_7f8;
004b2812                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_7f8);
004b2812                  
004b282b                  if (AppraisalSystem::LockpickSuccessPercentToString(var_7ec, &var_7f8) != 0)
004b282b                  {
004b2844                      sprintf(&var_7e8, "The lock looks %s to pick (Resis…", (var_7f8 + 0x14), var_7f4);
004b2858                      ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b282b                  }
004b282b                  
004b2861                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_7f8);
004b2808              }
004b27c1          }
004b27a3      }
004b2790  }

004b291b                                                                                   90 90 90 90 90                             .....

004b2920  void __thiscall ItemExamineUI::Appraisal_ShowLevelLimitInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b2920  {
004b2933      int32_t var_7f0 = 0xffffffff;
004b2937      int32_t var_7f8 = 0xffffffff;
004b2946      AppraisalProfile::InqInt(arg2, 0x56, &var_7f0);
004b2954      AppraisalProfile::InqInt(arg2, 0x57, &var_7f8);
004b2959      int32_t eax = var_7f0;
004b295f      char const* const var_80c_1;
004b295f      int32_t var_808_2;
004b295f      void var_7e8;
004b295f      
004b295f      if (eax <= 0)
004b295f      {
004b2999          int32_t eax_1 = var_7f8;
004b2999          
004b299f          if (eax_1 > 0)
004b299f          {
004b29a1              var_808_2 = eax_1;
004b29a2              var_80c_1 = "Restricted to characters of Leve…";
004b29ab          label_4b29ab:
004b29ac              sprintf(&var_7e8, var_80c_1, var_808_2);
004b29c0              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b299f          }
004b295f      }
004b295f      else
004b295f      {
004b2961          int32_t ecx_2 = var_7f8;
004b2961          
004b2967          if (ecx_2 <= 0)
004b2967          {
004b29ac              sprintf(&var_7e8, "Restricted to characters of Leve…", eax);
004b29c0              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b2967          }
004b2967          else
004b2967          {
004b296b              if (eax == ecx_2)
004b296b              {
004b296d                  var_808_2 = eax;
004b296e                  var_80c_1 = "Restricted to characters of Leve…";
004b2973                  goto label_4b29ab;
004b296b              }
004b296b              
004b2981              sprintf(&var_7e8, "Restricted to characters of Leve…", eax, ecx_2);
004b29c0              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 0);
004b2967          }
004b295f      }
004b29c5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b29ca      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b29d2      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b29d2      
004b29ee      if (AppraisalProfile::InqString(arg2, 0x26, &AC1Legacy::PStringBase<char>::s_NullBuffer_2) != 0)
004b29ee      {
004b29f9          class AC1Legacy::PStringBase<char> var_7ec;
004b29f9          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_7ec, "Destination: ");
004b29fe          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b2a02          uint32_t m_len = AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_len;
004b2a02          
004b2a10          if ((m_len != 1 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b2a1c              AC1Legacy::PStringBase<char>::append_n_chars(&var_7ec, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data, (m_len - 1));
004b2a1c          
004b2a21          int32_t* esi_1 = var_7ec;
004b2a2f          ItemExamineUI::AddItemInfo(this, &esi_1[5], 0, 0);
004b2a2f          
004b2a40          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004b2a48              **(uint32_t**)esi_1(1);
004b29ee      }
004b29ee      
004b2a4a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b2a4a      
004b2a5a      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004b2a5c          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004b2920  }


004b2a70  void __thiscall ItemExamineUI::Appraisal_ShowUsageLimitInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b2a70  {
004b2a87      int32_t edi = 0;
004b2a8e      int32_t var_7f0 = 0;
004b2a9f      void var_7e8;
004b2a9f      
004b2a9f      if (AppraisalProfile::InqInt(arg2, 0x171, &var_7f0) != 0)
004b2a9f      {
004b2aa1          int32_t eax_1 = var_7f0;
004b2aa1          
004b2aa7          if (eax_1 > 0)
004b2aa7          {
004b2ab4              sprintf(&var_7e8, "Use requires level %d.", eax_1);
004b2ac3              ItemExamineUI::AddItemInfo(this, &data_7928af, 0, 1);
004b2ad2              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b2ad7              edi = 1;
004b2aa7          }
004b2a9f      }
004b2a9f      
004b2aed      int32_t var_7f4 = 0;
004b2b08      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b2b08      int32_t var_7ec;
004b2b08      
004b2b08      if (((AppraisalProfile::InqInt(arg2, 0x16e, &var_7f4) != 0 && var_7f4 != 0) && (AppraisalProfile::InqInt(arg2, 0x16f, &var_7ec) != 0 && var_7ec != 0)))
004b2b08      {
004b2b38          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b2b3d          AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b2b45          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b2b45          
004b2b5f          if (SkillSystem::InqSkillName(var_7f4, &AC1Legacy::PStringBase<char>::s_NullBuffer_3) == 0)
004b2b6a              AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "Unknown Skill");
004b2b6a          
004b2b86          sprintf(&var_7e8, "Use requires %s of at least %d.", &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data, var_7ec);
004b2b86          
004b2b8d          if (edi == 0)
004b2b99              ItemExamineUI::AddItemInfo(this, &data_7928af, edi, 1);
004b2b99          
004b2ba9          ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b2bb2          edi = 1;
004b2bb7          AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_3);
004b2b08      }
004b2b08      
004b2bcd      var_7f4 = 0;
004b2bcd      
004b2be8      if ((AppraisalProfile::InqInt(arg2, 0x170, &var_7f4) != 0 && var_7f4 != 0))
004b2be8      {
004b2bee          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b2bf3          AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b2bfb          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b2bfb          
004b2c15          if (SkillSystem::InqSkillName(var_7f4, &AC1Legacy::PStringBase<char>::s_NullBuffer_3) == 0)
004b2c20              AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "Unknown Skill");
004b2c20          
004b2c37          sprintf(&var_7e8, "Use requires specialized %s.", &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
004b2c37          
004b2c3e          if (edi == 0)
004b2c4a              ItemExamineUI::AddItemInfo(this, &data_7928af, edi, 1);
004b2c4a          
004b2c5a          ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b2c5f          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b2c5f          
004b2c73          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004b2c75              AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004b2be8      }
004b2a70  }

004b2c89                             90 90 90 90 90 90 90                                                           .......

004b2c90  void __thiscall ItemExamineUI::Appraisal_ShowShortMagicInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b2c90  {
004b2c96      class AppraisalProfile* esi = arg2;
004b2c96      
004b2ca4      if (esi->_spellBook != 0)
004b2ca4      {
004b2caf          if (esi->success_flag == 0)
004b2df8              ItemExamineUI::AddItemInfo(this, "Spells: unknown.", 0, 0);
004b2caf          else
004b2caf          {
004b2cbe              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, "Spells: ");
004b2cc3              class PSmartArray<unsigned long>* _spellBook = esi->_spellBook;
004b2cc6              int32_t ebx_1 = 0;
004b2cca              int32_t* var_20_6;
004b2cca              class AppraisalProfile* esi_5;
004b2cca              
004b2cca              if (_spellBook == 0)
004b2cca              {
004b2de5                  esi_5 = arg2;
004b2dec                  var_20_6 = &esi_5->success_flag;
004b2cca              }
004b2cca              else
004b2cca              {
004b2cd3                  int32_t i = 0;
004b2cd3                  
004b2cd7                  if (_spellBook->m_num <= 0)
004b2cd7                  {
004b2de5                      esi_5 = arg2;
004b2dec                      var_20_6 = &esi_5->success_flag;
004b2cd7                  }
004b2cd7                  else
004b2cd7                  {
004b2d98                      do
004b2d98                      {
004b2ce3                          int32_t esi_1 = _spellBook->m_data[i];
004b2ce3                          
004b2ce8                          if (esi_1 >= 0)
004b2ce8                          {
004b2cee                              class ClientMagicSystem* eax_4 = ClientMagicSystem::GetMagicSystem();
004b2cee                              
004b2cf5                              if (eax_4 == 0)
004b2cf5                              {
004b2dbd                                  esi_5 = arg2;
004b2dc4                                  var_20_6 = &esi_5->success_flag;
004b2dc4                                  goto label_4b2dc5;
004b2cf5                              }
004b2cf5                              
004b2d09                              class AC1Legacy::PStringBase<char> __return;
004b2d09                              ClientMagicSystem::GetSpellName(eax_4, &__return, (esi_1 & 0x7fffffff));
004b2d09                              
004b2d10                              if (ebx_1 != 0)
004b2d10                              {
004b2d2c                                  int32_t* var_8;
004b2d2c                                  AC1Legacy::PStringBase<char>::operator+=(&arg2, AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &data_794334));
004b2d31                                  int32_t* esi_3 = var_8;
004b2d31                                  
004b2d45                                  if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004b2d4d                                      **(uint32_t**)esi_3(1);
004b2d10                              }
004b2d10                              else
004b2d12                                  ebx_1 = 1;
004b2d12                              
004b2d4f                              class AC1Legacy::PStringBase<char> __return_1 = __return;
004b2d53                              int32_t ecx_7 = *(uint32_t*)(__return_1 + 8);
004b2d53                              
004b2d61                              if ((ecx_7 != 1 && __return_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b2d61                              {
004b2d6d                                  AC1Legacy::PStringBase<char>::append_n_chars(&arg2, (__return_1 + 0x14), (ecx_7 - 1));
004b2d72                                  __return_1 = __return;
004b2d61                              }
004b2d61                              
004b2d88                              if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004b2d90                                  **(uint32_t**)__return_1(1);
004b2ce8                          }
004b2ce8                          
004b2d95                          i += 1;
004b2d98                      } while (i < _spellBook->m_num);
004b2d98                      
004b2da0                      if (ebx_1 == 0)
004b2da0                      {
004b2de5                          esi_5 = arg2;
004b2dec                          var_20_6 = &esi_5->success_flag;
004b2da0                      }
004b2da0                      else
004b2da0                      {
004b2da2                          esi_5 = arg2;
004b2db2                          ItemExamineUI::AddItemInfo(this, &esi_5->armor_profile, 0, 0);
004b2dba                          var_20_6 = &esi_5->success_flag;
004b2da0                      }
004b2cd7                  }
004b2cca              }
004b2cca              
004b2dc5          label_4b2dc5:
004b2dc5              
004b2dd1              if ((InterlockedDecrement(var_20_6) == 0 && esi_5 != 0))
004b2dd3                  esi_5->vtable->__vecDelDtor(1);
004b2caf          }
004b2ca4      }
004b2c90  }

004b2e07                       90 90 90 90 90 90 90 90 90                                                         .........

004b2e10  void __thiscall ItemExamineUI::Appraisal_ShowMagicInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b2e10  {
004b2e2c      if (arg2->_spellBook != 0)
004b2e2c      {
004b2e35          if (arg2->success_flag == 0)
004b325a              ItemExamineUI::AddItemInfo(this, "Spells: unknown.", 0, 0);
004b2e35          else
004b2e35          {
004b2e44              int32_t* var_81c;
004b2e44              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, "Spell Descriptions:");
004b2e52              class AC1Legacy::PStringBase<char> var_824;
004b2e52              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_824, "Enchantments:\n");
004b2e57              class PSmartArray<unsigned long>* _spellBook = arg2->_spellBook;
004b2e62              int32_t var_818_1 = 0;
004b2e66              int32_t var_7f4_1 = 0;
004b2e6a              class PSmartArray<unsigned long>* _spellBook_1 = _spellBook;
004b2e6e              int32_t var_814_1;
004b2e6e              
004b2e6e              if (_spellBook != 0)
004b2e73                  var_814_1 = 0;
004b2e73              
004b2e77              int32_t* esi_1;
004b2e77              int32_t* edi_1;
004b2e77              
004b2e77              if ((_spellBook != 0 && _spellBook->m_num > 0))
004b2e77              {
004b2ecd                  while (true)
004b2ecd                  {
004b2ecd                      int32_t esi_2 = _spellBook->m_data[var_814_1];
004b2ed8                      uint32_t esi_3 = (esi_2 & 0x7fffffff);
004b2ede                      class ClientMagicSystem* eax_5 = ClientMagicSystem::GetMagicSystem();
004b2ede                      
004b2ee7                      if (eax_5 == 0)
004b2ee7                      {
004b30d5                          class AC1Legacy::PStringBase<char> esi_7 = var_824;
004b30d5                          
004b30e5                          if ((InterlockedDecrement((esi_7 + 4)) == 0 && esi_7 != 0))
004b30ed                              **(uint32_t**)esi_7(1);
004b30ed                          
004b30ef                          int32_t* esi_8 = var_81c;
004b30ef                          
004b3103                          if ((InterlockedDecrement(&esi_8[1]) != 0 || esi_8 == 0))
004b30fb                              goto label_4b3269;
004b30fb                          
004b310f                          **(uint32_t**)esi_8(1);
004b311b                          return;
004b2ee7                      }
004b2ee7                      
004b2ef5                      int32_t* __return_1;
004b2ef5                      ClientMagicSystem::GetSpellName(eax_5, &__return_1, esi_3);
004b2f02                      class AC1Legacy::PStringBase<char> __return_2;
004b2f02                      ClientMagicSystem::GetSpellDescription(eax_5, &__return_2, esi_3);
004b2f1a                      int32_t* var_808;
004b2f1a                      class AC1Legacy::PStringBase<char>* eax_6 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_808, &data_7b0ca4);
004b2f4d                      int32_t* var_820;
004b2f4d                      class AC1Legacy::PStringBase<char> __return;
004b2f4d                      class AC1Legacy::PStringBase<char> __return_3;
004b2f4d                      int32_t* __return_4;
004b2f4d                      AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&var_820, &data_7b0ca0), &__return, &__return_1), &__return_4, eax_6), &__return_3, &__return_2);
004b2f52                      int32_t* __return_5 = __return_4;
004b2f52                      
004b2f64                      if ((InterlockedDecrement(&__return_5[1]) == 0 && __return_5 != 0))
004b2f6c                          **(uint32_t**)__return_5(1);
004b2f6c                      
004b2f6e                      class AC1Legacy::PStringBase<char> __return_6 = __return;
004b2f6e                      
004b2f7e                      if ((InterlockedDecrement((__return_6 + 4)) == 0 && __return_6 != 0))
004b2f86                          **(uint32_t**)__return_6(1);
004b2f86                      
004b2f88                      int32_t* esi_5 = var_820;
004b2f88                      
004b2f98                      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004b2fa0                          **(uint32_t**)esi_5(1);
004b2fa0                      
004b2fa2                      int32_t* esi_6 = var_808;
004b2fa2                      
004b2fb2                      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004b2fba                          **(uint32_t**)esi_6(1);
004b2fba                      
004b2fbe                      int32_t* __return_7;
004b2fbe                      
004b2fbe                      if ((esi_2 & 0x80000000) == 0)
004b2fbe                      {
004b2ff3                          if (var_818_1 == 0)
004b2ff5                              var_818_1 = 1;
004b2ff5                          
004b2ffd                          __return_7 = __return_3;
004b3001                          int32_t eax_22 = __return_7[2];
004b3001                          
004b300f                          if ((eax_22 != 1 && __return_7 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b301b                              AC1Legacy::PStringBase<char>::append_n_chars(&var_81c, &__return_7[5], (eax_22 - 1));
004b2fbe                      }
004b2fbe                      else
004b2fbe                      {
004b2fc0                          __return_7 = __return_3;
004b2fc4                          int32_t eax_18 = __return_7[2];
004b2fc4                          
004b2fd2                          if ((eax_18 != 1 && __return_7 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b2fde                              AC1Legacy::PStringBase<char>::append_n_chars(&var_824, &__return_7[5], (eax_18 - 1));
004b2fde                          
004b2fe3                          var_7f4_1 = 1;
004b2fbe                      }
004b2fbe                      
004b3028                      if (InterlockedDecrement(&__return_7[1]) == 0)
004b3030                          **(uint32_t**)__return_7(1);
004b3030                      
004b3032                      class AC1Legacy::PStringBase<char> __return_8 = __return_2;
004b3032                      
004b3042                      if ((InterlockedDecrement((__return_8 + 4)) == 0 && __return_8 != 0))
004b304a                          **(uint32_t**)__return_8(1);
004b304a                      
004b304c                      int32_t* __return_9 = __return_1;
004b304c                      
004b305c                      if ((InterlockedDecrement(&__return_9[1]) == 0 && __return_9 != 0))
004b3064                          **(uint32_t**)__return_9(1);
004b3064                      
004b3072                      bool cond:3_1 = (var_814_1 + 1) < _spellBook_1->m_num;
004b3074                      var_814_1 += 1;
004b3074                      
004b3078                      if (!(cond:3_1))
004b3078                      {
004b3084                          edi_1 = var_81c;
004b3088                          class ItemExamineUI* this_1;
004b3088                          
004b3088                          if (var_818_1 == 0)
004b322b                              this_1 = this;
004b3088                          else
004b3088                          {
004b30a9                              void var_7e8;
004b30a9                              
004b30a9                              if (AppraisalProfile::InqInt(arg2, 0x6a, &var_808) == 0)
004b311e                                  this_1 = this;
004b30a9                              else
004b30a9                              {
004b30ba                                  sprintf(&var_7e8, "Spellcraft: %d.", var_808);
004b30bc                                  this_1 = this;
004b30ce                                  ItemExamineUI::AddItemInfo(this_1, &var_7e8, 0, 1);
004b30a9                              }
004b30a9                              
004b3137                              if ((AppraisalProfile::InqInt(arg2, 0x6b, &__return) != 0 && AppraisalProfile::InqInt(arg2, 0x6c, &var_820) != 0))
004b3137                              {
004b3164                                  sprintf(&var_7e8, "Mana: %d / %d.", __return, var_820);
004b3174                                  ItemExamineUI::AddItemInfo(this_1, &var_7e8, 0, 1);
004b3137                              }
004b3137                              
004b318e                              if (AppraisalProfile::InqFloat(arg2, 5, &__return_4) == 0)
004b318e                              {
004b31e4                                  if (AppraisalProfile::InqInt(arg2, 0x75, &var_820) != 0)
004b31e4                                  {
004b31e6                                      int32_t* eax_42 = var_820;
004b31ed                                      void* var_840_7;
004b31ed                                      char const* const var_83c_8;
004b31ed                                      
004b31ed                                      if (eax_42 <= 0)
004b31ed                                      {
004b31fb                                          var_83c_8 = "Mana Cost: %d.";
004b3204                                          var_840_7 = &var_7e8;
004b31ed                                      }
004b31ed                                      else
004b31ed                                      {
004b31ef                                          var_83c_8 = "Mana Cost: %d.\n(Can be reduced …";
004b31f8                                          var_840_7 = &var_7e8;
004b31ed                                      }
004b31ed                                      
004b3205                                      sprintf(var_840_7, var_83c_8, eax_42);
004b320c                                      int32_t var_83c_9 = 0;
004b3215                                      ItemExamineUI::AddItemInfo(this_1, &var_7e8, 0, 0);
004b31e4                                  }
004b318e                              }
004b318e                              else
004b318e                              {
004b3196                                  long double x87_r7_2 = (((long double)1.0) / ((long double)__return_4));
004b319a                                  long double temp1_1 = ((long double)0.0);
004b319a                                  (x87_r7_2 - temp1_1);
004b31a0                                  int32_t eax_39;
004b31a0                                  eax_39 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
004b31bf                                  sprintf(&var_7e8, "Mana Cost: 1 point per %d second…", _ftol2());
004b31c6                                  int32_t var_83c_7 = 0;
004b3215                                  ItemExamineUI::AddItemInfo(this_1, &var_7e8, 0, 1);
004b318e                              }
004b318e                              
004b3224                              ItemExamineUI::AddItemInfo(this_1, &edi_1[5], 0, 0);
004b3088                          }
004b3088                          
004b3235                          esi_1 = var_824;
004b3235                          
004b3239                          if (var_7f4_1 != 0)
004b3249                              ItemExamineUI::AddItemInfo(this_1, &esi_1[5], 0, 0);
004b3249                          
004b3239                          break;
004b3078                      }
004b3078                      
004b2ec2                      _spellBook = _spellBook_1;
004b2ecd                  }
004b2e77              }
004b2e77              else
004b2e77              {
004b2e79                  edi_1 = var_81c;
004b2e7d                  esi_1 = var_824;
004b2e77              }
004b2e77              
004b2e8d              if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004b2e95                  **(uint32_t**)esi_1(1);
004b2e95              
004b2ea7              if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
004b2ea7              {
004b2eb3                  **(uint32_t**)edi_1(1);
004b2ebf                  return;
004b2ea7              }
004b2e35          }
004b2e2c      }
004b2e2c      
004b3269  label_4b3269:
004b2e10  }

004b326c                                      90 90 90 90                                                              ....

004b3270  void __thiscall ItemExamineUI::Appraisal_ShowActivationRequirements(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b3270  {
004b3287      if (arg2->success_flag != 0)
004b3287      {
004b328d          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b329a          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b32a3          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b32ae          int32_t esi_1 = 0;
004b32bd          class AC1Legacy::PStringBase<char> var_81c;
004b32bd          int32_t var_7f0;
004b32bd          void var_7e8;
004b32bd          
004b32bd          if (AppraisalProfile::InqInt(arg2, 0x6d, &var_7f0) != 0)
004b32bd          {
004b32bf              int32_t eax_3 = var_7f0;
004b32bf              
004b32c5              if (eax_3 > 0)
004b32c5              {
004b32d2                  sprintf(&var_7e8, "Arcane Lore: %d", eax_3);
004b32e0                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &var_7e8);
004b32e5                  class AC1Legacy::PStringBase<char> esi_2 = var_81c;
004b32e9                  int32_t eax_4 = *(uint32_t*)(esi_2 + 8);
004b32e9                  
004b32f7                  if ((eax_4 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b3303                      AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, (esi_2 + 0x14), (eax_4 - 1));
004b3303                  
004b3316                  if (InterlockedDecrement((esi_2 + 4)) == 0)
004b331e                      **(uint32_t**)esi_2(1);
004b331e                  
004b3320                  esi_1 = 1;
004b32c5              }
004b32bd          }
004b32bd          
004b334d          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b334d          int32_t var_7fc;
004b334d          
004b334d          if ((AppraisalProfile::InqInt(arg2, 0x6e, &var_7fc) != 0 && var_7fc >= 1))
004b334d          {
004b3355              if (esi_1 != 0)
004b3355              {
004b3360                  AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_6, &data_794334);
004b336e                  AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &AC1Legacy::PStringBase<char>::s_NullBuffer_6);
004b3377                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_6);
004b3355              }
004b3355              
004b338b              sprintf(&var_7e8, "Allegiance Rank: %d", var_7fc);
004b3399              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &var_7e8);
004b339e              class AC1Legacy::PStringBase<char> esi_3 = var_81c;
004b33a2              int32_t eax_9 = *(uint32_t*)(esi_3 + 8);
004b33a2              
004b33b0              if ((eax_9 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b33bc                  AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, (esi_3 + 0x14), (eax_9 - 1));
004b33bc              
004b33c9              if (InterlockedDecrement((esi_3 + 4)) == 0)
004b33d1                  **(uint32_t**)esi_3(1);
004b33d1              
004b33d3              esi_1 = 1;
004b334d          }
004b334d          
004b33e9          int32_t var_80c = 0;
004b33e9          
004b3404          if ((AppraisalProfile::InqInt(arg2, 0xbc, &var_80c) != 0 && var_80c != 0))
004b3404          {
004b340a              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b340f              AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b3417              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b3417              
004b342d              if (AppraisalSystem::InqHeritageGroupDisplayName(var_80c, &AC1Legacy::PStringBase<char>::s_NullBuffer_6) != 0)
004b342d              {
004b3431                  if (esi_1 != 0)
004b3431                  {
004b343c                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &data_794334);
004b344a                      AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &var_81c);
004b3453                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_81c);
004b3431                  }
004b3431                  
004b3461                  AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &AC1Legacy::PStringBase<char>::s_NullBuffer_6);
004b3466                  esi_1 = 1;
004b342d              }
004b342d              
004b346b              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b346b              
004b347f              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_11->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_11 != 0))
004b3481                  AC1Legacy::PStringBase<char>::s_NullBuffer_11->vtable->__vecDelDtor(1);
004b3404          }
004b3404          
004b34b0          int32_t __return;
004b34b0          int32_t var_7f8;
004b34b0          
004b34b0          if (((AppraisalProfile::InqInt(arg2, 0x73, &var_7f8) != 0 && var_7f8 > 0) && AppraisalProfile::InqInt(arg2, 0xb0, &__return) != 0))
004b34b0          {
004b34d4              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b34d9              AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b34e1              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004b34e1              
004b34f7              if (SkillSystem::InqSkillName(__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_6) != 0)
004b34f7              {
004b34fb                  if (esi_1 != 0)
004b34fb                  {
004b3506                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &data_794334);
004b3514                      AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &var_81c);
004b351d                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_81c);
004b34fb                  }
004b34fb                  
004b3539                  sprintf(&var_7e8, "%s: %d", &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data, var_7f8);
004b3547                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &var_7e8);
004b3555                  AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &var_81c);
004b355e                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_81c);
004b3563                  esi_1 = 1;
004b34f7              }
004b34f7              
004b356c              AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_6);
004b34b0          }
004b34b0          
004b3595          int32_t var_808;
004b3595          
004b3595          if (((AppraisalProfile::InqInt(arg2, 0x102, &var_808) != 0 && var_808 > 0) && AppraisalProfile::InqInt(arg2, 0x101, &__return) != 0))
004b3595          {
004b35b9              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b35be              AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004b35c6              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
004b35c6              
004b35dc              if (SkillSystem::InqAttributeName(__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_6) != 0)
004b35dc              {
004b35e0                  if (esi_1 != 0)
004b35e0                  {
004b35eb                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &data_794334);
004b35f9                      AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &var_81c);
004b3602                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_81c);
004b35e0                  }
004b35e0                  
004b361e                  sprintf(&var_7e8, "%s: %d", &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data, var_808);
004b362c                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &var_7e8);
004b363a                  AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &var_81c);
004b3643                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_81c);
004b3648                  esi_1 = 1;
004b35dc              }
004b35dc              
004b3651              AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_6);
004b3595          }
004b3595          
004b367a          int32_t var_7f4;
004b367a          
004b367a          if (((AppraisalProfile::InqInt(arg2, 0x104, &var_7f4) != 0 && var_7f4 > 0) && AppraisalProfile::InqInt(arg2, 0x103, &__return) != 0))
004b367a          {
004b369e              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b36a3              AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b36ab              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef);
004b36ab              
004b36c1              if (SkillSystem::InqAttribute2ndName(__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_6) != 0)
004b36c1              {
004b36c5                  if (esi_1 != 0)
004b36c5                  {
004b36d0                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &data_794334);
004b36de                      AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &var_81c);
004b36e7                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_81c);
004b36c5                  }
004b36c5                  
004b3703                  sprintf(&var_7e8, "%s: %d", &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data, var_7f4);
004b3711                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &var_7e8);
004b371f                  AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &var_81c);
004b3728                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_81c);
004b36c1              }
004b36c1              
004b3731              AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_6);
004b367a          }
004b367a          
004b3736          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b3736          
004b3744          if (AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_len != 1)
004b3744          {
004b374f              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, "Activation requires ");
004b376c              AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, AC1Legacy::PStringBase<char>::operator+(&var_81c, &__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_7));
004b3771              int32_t __return_2 = __return;
004b3771              
004b3781              if ((InterlockedDecrement((__return_2 + 4)) == 0 && __return_2 != 0))
004b3788                  **(uint32_t**)__return_2(1);
004b3788              
004b3799              ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_data, 0, 1);
004b379e              class AC1Legacy::PStringBase<char> esi_4 = var_81c;
004b379e              
004b37ae              if ((InterlockedDecrement((esi_4 + 4)) == 0 && esi_4 != 0))
004b37b5                  **(uint32_t**)esi_4(1);
004b37b5              
004b37b7              AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b3744          }
004b3744          
004b37cb          int32_t var_800 = 0;
004b37cb          
004b37e4          if ((AppraisalProfile::InqBool(arg2, 0x5e, &var_800) != 0 && var_800 == 1))
004b37e4          {
004b37f3              AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_6, "the original owner");
004b3801              AppraisalProfile::InqString(arg2, 0x19, &AC1Legacy::PStringBase<char>::s_NullBuffer_6);
004b380f              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_81c, &*U"mh,."[3]);
004b383f              class AC1Legacy::PStringBase<char> __return_1;
004b383f              AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, "This item can only be activated …"), &__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_6), &__return_1, &var_81c);
004b3844              int32_t __return_3 = __return;
004b3844              
004b3854              if ((InterlockedDecrement((__return_3 + 4)) == 0 && __return_3 != 0))
004b385b                  **(uint32_t**)__return_3(1);
004b385b              
004b385d              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b385d              
004b386d              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_9 != 0))
004b386f                  AC1Legacy::PStringBase<char>::s_NullBuffer_9->vtable->__vecDelDtor(1);
004b386f              
004b3876              class AC1Legacy::PStringBase<char> esi_6 = var_81c;
004b3876              
004b3886              if ((InterlockedDecrement((esi_6 + 4)) == 0 && esi_6 != 0))
004b388d                  **(uint32_t**)esi_6(1);
004b388d              
004b388f              class AC1Legacy::PStringBase<char> __return_4 = __return_1;
004b389e              ItemExamineUI::AddItemInfo(this, (__return_4 + 0x14), 0, 1);
004b389e              
004b38af              if ((InterlockedDecrement((__return_4 + 4)) == 0 && __return_4 != 0))
004b38b6                  **(uint32_t**)__return_4(1);
004b38b6              
004b38b8              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b38b8              
004b38c8              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_10->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_10 != 0))
004b38ca                  AC1Legacy::PStringBase<char>::s_NullBuffer_10->vtable->__vecDelDtor(1);
004b37e4          }
004b37e4          
004b38dd          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
004b38df              AC1Legacy::PStringBase<char>::s_NullBuffer_8->vtable->__vecDelDtor(1);
004b3287      }
004b3270  }

004b38f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004b3900  void __thiscall ItemExamineUI::Appraisal_ShowManaStoneInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b3900  {
004b3916      if (arg2->_spellBook == 0)
004b3916      {
004b3926          int32_t var_7fc = 0;
004b393b          void var_7e8;
004b393b          
004b393b          if (AppraisalProfile::InqInt(arg2, 0x6b, &var_7fc) != 0)
004b393b          {
004b394c              sprintf(&var_7e8, "Stored Mana: %d", var_7fc);
004b395c              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b393b          }
004b393b          
004b396a          int32_t var_7f8 = 0;
004b3972          int32_t var_7f4_1 = 0;
004b3972          
004b3981          if (AppraisalProfile::InqFloat(arg2, 0x57, &var_7f8) != 0)
004b3981          {
004b399d              sprintf(&var_7e8, "Efficiency: %d%%", _ftol2());
004b39ad              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b3981          }
004b3981          
004b39be          int32_t var_7f0 = 0;
004b39c6          int32_t var_7ec_1 = 0x3ff00000;
004b39c6          
004b39d5          if (AppraisalProfile::InqFloat(arg2, 0x89, &var_7f0) != 0)
004b39d5          {
004b39f1              sprintf(&var_7e8, "Chance of Destruction: %d%%", _ftol2());
004b3a01              ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b39d5          }
004b3916      }
004b3900  }

004b3a12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004b3a20  void __thiscall ItemExamineUI::Appraisal_ShowRemainingUses(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b3a20  {
004b3a4b      int32_t var_7f0;
004b3a4b      void var_7e8;
004b3a4b      
004b3a4b      if (AppraisalProfile::InqInt(arg2, 0xc1, &var_7f0) != 0)
004b3a4b      {
004b3a4d          int32_t eax_1 = var_7f0;
004b3a54          void* var_80c_1;
004b3a54          char const* const var_808_1;
004b3a54          int32_t var_804_1;
004b3a54          
004b3a54          if (eax_1 != 1)
004b3a54          {
004b3a63              var_804_1 = eax_1;
004b3a64              var_808_1 = "Contains %d keys.";
004b3a6d              var_80c_1 = &var_7e8;
004b3a54          }
004b3a54          else
004b3a54          {
004b3a56              var_804_1 = eax_1;
004b3a57              var_808_1 = "Contains %d key.";
004b3a60              var_80c_1 = &var_7e8;
004b3a54          }
004b3a54          
004b3a6e          sprintf(var_80c_1, var_808_1, var_804_1);
004b3a7e          ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b3a4b      }
004b3a4b      
004b3a8c      int32_t var_7f4 = 0;
004b3a94      AppraisalProfile::InqBool(arg2, 0x3f, &var_7f4);
004b3a94      
004b3a9f      if (var_7f4 != 0)
004b3a9f      {
004b3b43          ItemExamineUI::AddItemInfo(this, "Number of uses remaining:  Unlim…", 0, 1);
004b3b43          return;
004b3a9f      }
004b3a9f      
004b3ab5      int32_t var_7ec;
004b3ab5      
004b3ab5      if (AppraisalProfile::InqInt(arg2, 0x5c, &var_7ec) != 0)
004b3ab5      {
004b3ac6          sprintf(&var_7e8, "Number of uses remaining: %d", var_7ec);
004b3ad6          ItemExamineUI::AddItemInfo(this, &var_7e8, 0, 1);
004b3ae4          return;
004b3ab5      }
004b3ab5      
004b3aec      if (arg2->success_flag == 0)
004b3aec      {
004b3aee          class ACCWeenieObject* cur_weenobj = this->cur_weenobj;
004b3aee          
004b3afb          if ((cur_weenobj->pwd._bitfield & 0x30000) != 0)
004b3afb          {
004b3b27              ItemExamineUI::AddItemInfo(this, "Number of uses remaining:  Unkno…", 0, 0);
004b3b35              return;
004b3afb          }
004b3afb          
004b3b04          if (cur_weenobj->vtable->IsHook() != 0)
004b3b04          {
004b3b0f              if (AppraisalProfile::IsHookedItemHealer(arg2) != 0)
004b3b0f              {
004b3b27                  ItemExamineUI::AddItemInfo(this, "Number of uses remaining:  Unkno…", 0, 0);
004b3b35                  return;
004b3b0f              }
004b3b0f              
004b3b1a              if (AppraisalProfile::IsHookedItemLockpick(arg2) != 0)
004b3b27                  ItemExamineUI::AddItemInfo(this, "Number of uses remaining:  Unkno…", 0, 0);
004b3b04          }
004b3aec      }
004b3a20  }

004b3b54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004b3b60  void __thiscall ItemExamineUI::Appraisal_ShowRareInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b3b60  {
004b3b6e      class AppraisalProfile* ecx = arg2;
004b3b74      int32_t var_c = 0;
004b3b74      
004b3b96      if ((AppraisalProfile::InqBool(ecx, 0x6c, &var_c) != 0 && var_c == 1))
004b3b96      {
004b3b98          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b3b9d          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b3ba5          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b3ba7          int32_t var_20_2 = 3;
004b3ba9          int32_t var_24_1 = 3;
004b3bb5          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "This rare item has a timer restr…");
004b3bba          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b3bcb          ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data, 0, 0);
004b3bcb          
004b3bdc          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004b3bde              AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004b3b96      }
004b3b96      
004b3bf8      int32_t var_4;
004b3bf8      
004b3bf8      if (AppraisalProfile::InqInt(arg2, 0x11, &var_4) != 0)
004b3bf8      {
004b3bfa          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b3bff          arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b3c07          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b3c0d          int32_t var_20_6 = var_4;
004b3c18          AC1Legacy::PStringBase<char>::sprintf(&arg2, "Rare #%d");
004b3c1d          class AppraisalProfile* esi_1 = arg2;
004b3c2e          ItemExamineUI::AddItemInfo(this, &esi_1->armor_profile, 0, 0);
004b3c2e          
004b3c3f          if ((InterlockedDecrement(&esi_1->success_flag) == 0 && esi_1 != 0))
004b3c41              esi_1->vtable->__vecDelDtor(1);
004b3bf8      }
004b3b60  }

004b3c53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004b3c60  void __thiscall ItemExamineUI::Appraisal_ShowItemLevelInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b3c60  {
004b3c67      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b3c75      int32_t var_50 = 0;
004b3c79      int32_t var_4c = 0;
004b3c7d      int32_t var_48 = 0;
004b3c81      int32_t var_44 = 0;
004b3c85      int32_t var_5c = 0;
004b3c89      int32_t var_58 = 0;
004b3c8d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b3c91      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b3c97      class AppraisalProfile* ebp = arg2;
004b3c97      
004b3cbb      if ((((AppraisalProfile::InqInt64(ebp, 5, &var_50) != 0 && (var_4c > 0 || var_50 > 0)) && (AppraisalProfile::InqInt(ebp, 0x13f, &var_5c) != 0 && var_5c > 0)) && (AppraisalProfile::InqInt(ebp, 0x140, &var_58) != 0 && var_58 > 0)))
004b3cbb      {
004b3d10          AppraisalProfile::InqInt64(ebp, 4, &var_48);
004b3d2b          int32_t var_7c_1 = var_4c;
004b3d31          int32_t var_84_1 = var_44;
004b3d33          int32_t eax_6 = ExperienceSystem::ItemTotalXPToLevel(var_48, var_50, var_5c, var_58);
004b3d38          int32_t ecx_6 = var_5c;
004b3d3e          int32_t eax_7 = (eax_6 + 1);
004b3d3e          
004b3d46          if (eax_7 > ecx_6)
004b3d48              eax_7 = ecx_6;
004b3d48          
004b3d58          int32_t var_7c_2 = var_4c;
004b3d5b          int32_t eax_8;
004b3d5b          int32_t edx_5;
004b3d5b          eax_8 = ExperienceSystem::ItemLevelToTotalXP(eax_7, var_50, ecx_6, var_58);
004b3d71          int32_t var_8c_1 = var_44;
004b3d73          void var_20;
004b3d73          ExperienceSystem::XPToString(var_48, &var_20);
004b3d7d          int32_t var_98_1 = edx_5;
004b3d7f          void var_40;
004b3d7f          ExperienceSystem::XPToString(eax_8, &var_40);
004b3d88          int32_t var_a0_1 = var_5c;
004b3d89          int32_t var_a4_1 = eax_6;
004b3d94          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "Item Level: %d / %d");
004b3daa          ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data, 0, 1);
004b3db3          void* var_74_7 = &var_40;
004b3db8          void* var_78_3 = &var_20;
004b3dc3          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "Item XP: %s / %s");
004b3dc8          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b3dd9          ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data, 0, 1);
004b3de9          ItemExamineUI::AddItemInfo(this, &data_7928af, 0, 1);
004b3dee          ebp = arg2;
004b3cbb      }
004b3cbb      
004b3e00      int32_t var_54 = 0;
004b3e00      
004b3e12      if ((AppraisalProfile::InqInt(ebp, 0x160, &var_54) != 0 && var_54 == 2))
004b3e12      {
004b3e14          int32_t var_74_9 = 0xc8;
004b3e23          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "This cloak has a chance to reduc…");
004b3e28          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b3e38          ItemExamineUI::AddItemInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data, 0, 1);
004b3e47          ItemExamineUI::AddItemInfo(this, &data_7928af, 0, 1);
004b3e12      }
004b3e12      
004b3e5c      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
004b3e5e          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
004b3c60  }


004b3e70  void __thiscall BasicCreatureExamineUI::SetLevelValueText(class BasicCreatureExamineUI* this, int32_t arg2)

004b3e70  {
004b3e7b      if (this->m_levelValueText != 0)
004b3e7b      {
004b3e82          int32_t edi_1 = arg2;
004b3e82          
004b3e88          if (edi_1 <= 0)
004b3e88          {
004b3f27              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_7b0f34);
004b3f37              UIElement_Text::SetText(this->m_levelValueText, &arg2);
004b3f40              int32_t* esi_5 = (arg2 - 0x14);
004b3f40              
004b3f53              if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004b3f5b                  **(uint32_t**)esi_5(1);
004b3e88          }
004b3e88          else
004b3e88          {
004b3e8e              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b3e93              arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b3e9b              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b3e9b              
004b3eaf              if (AC1Legacy::PStringBase<char>::convert(&arg2, edi_1, 1) == 0)
004b3eba                  AC1Legacy::PStringBase<char>::set(&arg2, &data_7af4e8);
004b3eba              
004b3ebf              int32_t edi_2 = arg2;
004b3ece              class PStringBase<unsigned short>* eax_4;
004b3ece              void* esi_1;
004b3ece              eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, (edi_2 + 0x14));
004b3eda              UIElement_Text::SetText(*(uint32_t*)((char*)esi_1 + 0x80), eax_4);
004b3ee9              int32_t* esi_3 = (arg2 - 0x14);
004b3ee9              
004b3ef8              if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004b3f00                  **(uint32_t**)esi_3(1);
004b3f00              
004b3f0f              if ((InterlockedDecrement((edi_2 + 4)) == 0 && edi_2 != 0))
004b3f17                  **(uint32_t**)edi_2(1);
004b3e88          }
004b3e7b      }
004b3e70  }

004b3f62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004b3f70  void __fastcall BasicCreatureExamineUI::SetAppraiseInfo(class BasicCreatureExamineUI* this, class AppraisalProfile const* arg2, int32_t arg3)

004b3f70  {
004b3f7c      void var_38;
004b3f7c      CreatureAppraisalProfile::CreatureAppraisalProfile(&var_38);
004b3f81      class AppraisalProfile* edi = arg2;
004b3f8c      int32_t eax;
004b3f8c      int32_t ecx_2;
004b3f8c      eax = AppraisalProfile::InqCreature(edi, &var_38);
004b3f91      int32_t i = 0;
004b3f91      
004b3f95      if (eax != 0)
004b3f95      {
004b3fa0          arg2 = nullptr;
004b3fa4          AppraisalProfile::InqInt(edi, 0x19, &arg2);
004b3fb0          BasicCreatureExamineUI::SetLevelValueText(this, arg2);
004b3f95      }
004b3f95      
004b3fbb      if (BasicCreatureExamineUI::m_rgTokens.m_num > 0)
004b3fbb      {
004b3fd6          do
004b3fd6          {
004b3fcb              *(int32_t*)((char*)BasicCreatureExamineUI::m_rgTokens.m_data[i]->vtable + 0x1c)(edi);
004b3fd3              i += 1;
004b3fd6          } while (i < BasicCreatureExamineUI::m_rgTokens.m_num);
004b3fbb      }
004b3fbb      
004b3fdc      AppraisalProfile::operator=(&this->cur_prof, edi);
004b3f70  }

004b3fea                                90 90 90 90 90 90                                                            ......

004b3ff0  void __thiscall CreatureExamineUI::SetAppraiseInfo(class CreatureExamineUI* this, class AppraisalProfile const* arg2, int32_t arg3)

004b3ff0  {
004b3ffd      void var_38;
004b3ffd      CreatureAppraisalProfile::CreatureAppraisalProfile(&var_38);
004b4002      class AppraisalProfile* ebx = arg2;
004b4017      int32_t (* const esi)() = InterlockedDecrement;
004b401d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b401d      class PStringBase<unsigned short> var_68;
004b401d      class PStringBase<unsigned short> AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b401d      
004b401d      if (AppraisalProfile::InqCreature(ebx, &var_38) != 0)
004b401d      {
004b402e          var_68 = 0;
004b4032          AppraisalProfile::InqInt(ebx, 2, &var_68);
004b4032          
004b403b          if (var_68 != 0)
004b403b          {
004b4041              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b4046              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b404e              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b404e              
004b4068              if (AppraisalSystem::InqCreatureDisplayName(var_68, &AC1Legacy::PStringBase<char>::s_NullBuffer_3) != 0)
004b4068              {
004b4077                  class PStringBase<unsigned short>* eax_4;
004b4077                  eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
004b4083                  UIElement_Text::SetText(this->m_creatureDisplayName, eax_4);
004b408c                  int32_t* edi_2 = (AC1Legacy::PStringBase<char>::s_NullBuffer_5 - 0x14);
004b408c                  
004b409b                  if ((esi(&edi_2[1]) == 0 && edi_2 != 0))
004b40a3                      **(uint32_t**)edi_2(1);
004b4068              }
004b4068              
004b40a7              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b40ab              AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004b40ab              
004b40b7              if (esi(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0)
004b40b7              {
004b40b9                  class PStringBase<unsigned short> AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b40b9                  
004b40bf                  if (AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0)
004b40c5                      **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_6(1);
004b40b7              }
004b403b          }
004b401d      }
004b401d      
004b40cb      class UIElement_ListBox* m_extraInfoList = this->m_extraInfoList;
004b40cb      
004b40d3      if (m_extraInfoList != 0)
004b40d5          UIElement_ListBox::Flush(m_extraInfoList);
004b40d5      
004b40da      class UIElement* m_basicCreatureExamineBaseField = this->m_basicCreatureExamineBaseField;
004b40da      
004b40df      if (m_basicCreatureExamineBaseField != 0)
004b40ed          UIElement_Text::ClearAllText(UIElement::GetChildRecursive(m_basicCreatureExamineBaseField, 0x1000053a));
004b40ed      
004b40fe      int32_t var_60 = 0;
004b410a      int32_t var_64 = 0;
004b4112      int32_t s;
004b4112      __builtin_memset(&s, 0, 0x1c);
004b4122      AppraisalProfile::InqInt(ebx, 0x133, &var_60);
004b4133      int32_t var_54;
004b4133      AppraisalProfile::InqInt(ebx, 0x134, &var_54);
004b4144      int32_t var_48;
004b4144      AppraisalProfile::InqInt(ebx, 0x139, &var_48);
004b4155      AppraisalProfile::InqInt(ebx, 0x13a, &var_64);
004b4166      int32_t var_44;
004b4166      AppraisalProfile::InqInt(ebx, 0x13b, &var_44);
004b4177      AppraisalProfile::InqInt(ebx, 0x13c, &s);
004b4188      int32_t var_40;
004b4188      AppraisalProfile::InqInt(ebx, 0x143, &var_40);
004b4199      int32_t var_4c;
004b4199      AppraisalProfile::InqInt(ebx, 0x15e, &var_4c);
004b41aa      int32_t var_50;
004b41aa      AppraisalProfile::InqInt(ebx, 0x15f, &var_50);
004b41af      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b41b9      AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b41bd      class AppraisalProfile* edx_3 = InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b41c7      bool cond:1 = var_60 > 0;
004b41c9      var_68 = 0;
004b41e1      class PStringBase<unsigned short> var_3c;
004b41e1      
004b41e1      if (((cond:1 || var_48 > 0) || var_64 > 0))
004b41e1      {
004b41f0          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_68, &data_794320);
004b41fe          PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, &data_794320);
004b4211          BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, &var_68, 0);
004b421a          int32_t* edi_4 = (AC1Legacy::PStringBase<char>::s_NullBuffer_5 - 0x14);
004b421a          
004b4229          if ((esi(&edi_4[1]) == 0 && edi_4 != 0))
004b4231              **(uint32_t**)edi_4(1);
004b4231          
004b4237          int32_t* edi_6 = (var_68 - 0x14);
004b4237          
004b4246          if ((esi(&edi_6[1]) == 0 && edi_6 != 0))
004b424e              **(uint32_t**)edi_6(1);
004b424e          
004b4258          int32_t var_80_20 = var_64;
004b4259          int32_t var_84_3 = var_60;
004b4264          var_68 = 1;
004b426c          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "%Rating: %d/%d");
004b4284          PStringBase<unsigned short>::allocate_ref_buffer(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, wcslen(u"Dmg/CritDmg"));
004b4293          wcscpy(AC1Legacy::PStringBase<char>::s_NullBuffer_5, u"Dmg/CritDmg");
004b42ac          class PStringBase<unsigned short>* eax_21;
004b42ac          eax_21 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
004b42b9          BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, eax_21, 0);
004b42c2          int32_t* edi_8 = (var_3c - 0x14);
004b42c2          
004b42d1          if ((esi(&edi_8[1]) == 0 && edi_8 != 0))
004b42d9              **(uint32_t**)edi_8(1);
004b42d9          
004b42df          int32_t* edi_10 = (AC1Legacy::PStringBase<char>::s_NullBuffer_5 - 0x14);
004b42e6          int32_t eax_25;
004b42e6          eax_25 = esi(&edi_10[1]);
004b42e6          
004b42ee          if ((eax_25 == 0 && edi_10 != 0))
004b42f6              edx_3 = **(uint32_t**)edi_10(1);
004b41e1      }
004b41e1      
004b430e      if (((var_54 > 0 || var_44 > 0) || s > 0))
004b430e      {
004b431a          if (var_68 == 0)
004b431a          {
004b4325              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_68, &data_794320);
004b4333              PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, &data_794320);
004b4346              BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, &var_68, 0);
004b434f              int32_t* edi_12 = (AC1Legacy::PStringBase<char>::s_NullBuffer_5 - 0x14);
004b434f              
004b435e              if ((esi(&edi_12[1]) == 0 && edi_12 != 0))
004b4366                  **(uint32_t**)edi_12(1);
004b4366              
004b436c              int32_t* edi_14 = (var_68 - 0x14);
004b436c              
004b437b              if ((esi(&edi_14[1]) == 0 && edi_14 != 0))
004b4383                  **(uint32_t**)edi_14(1);
004b4383              
004b4385              var_68 = 1;
004b431a          }
004b431a          
004b4395          int32_t s_1 = s;
004b4396          int32_t var_84_8 = var_54;
004b43a1          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "%Resist: %d/%d");
004b43b9          PStringBase<unsigned short>::allocate_ref_buffer(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, wcslen(u"Dmg/CritDmg"));
004b43c8          wcscpy(AC1Legacy::PStringBase<char>::s_NullBuffer_5, u"Dmg/CritDmg");
004b43e1          class PStringBase<unsigned short>* eax_36;
004b43e1          eax_36 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
004b43ee          BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, eax_36, 0);
004b43f7          int32_t* edi_16 = (var_3c - 0x14);
004b43f7          
004b4406          if ((esi(&edi_16[1]) == 0 && edi_16 != 0))
004b440e              **(uint32_t**)edi_16(1);
004b440e          
004b4414          int32_t* edi_18 = (AC1Legacy::PStringBase<char>::s_NullBuffer_5 - 0x14);
004b441b          int32_t eax_40;
004b441b          eax_40 = esi(&edi_18[1]);
004b441b          
004b4423          if ((eax_40 == 0 && edi_18 != 0))
004b442b              edx_3 = **(uint32_t**)edi_18(1);
004b430e      }
004b430e      
004b443b      if ((var_4c > 0 || var_50 > 0))
004b443b      {
004b4447          if (var_68 == 0)
004b4447          {
004b4452              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_68, &data_794320);
004b4460              PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, &data_794320);
004b4473              BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, &var_68, 0);
004b447c              int32_t* edi_20 = (AC1Legacy::PStringBase<char>::s_NullBuffer_5 - 0x14);
004b447c              
004b448b              if ((esi(&edi_20[1]) == 0 && edi_20 != 0))
004b4493                  **(uint32_t**)edi_20(1);
004b4493              
004b4499              int32_t* edi_22 = (var_68 - 0x14);
004b4499              
004b44a8              if ((esi(&edi_22[1]) == 0 && edi_22 != 0))
004b44b0                  **(uint32_t**)edi_22(1);
004b44b0              
004b44b2              var_68 = 1;
004b4447          }
004b4447          
004b44c2          int32_t var_80_31 = var_50;
004b44c3          int32_t var_84_13 = var_4c;
004b44ce          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "%Resist: %d/%d");
004b44df          PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, u"DoT/Life:");
004b44f4          class PStringBase<unsigned short>* eax_49;
004b44f4          eax_49 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
004b4501          BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, eax_49, 0);
004b450a          int32_t* edi_24 = (var_3c - 0x14);
004b450a          
004b4519          if ((esi(&edi_24[1]) == 0 && edi_24 != 0))
004b4521              **(uint32_t**)edi_24(1);
004b4521          
004b4527          int32_t* edi_26 = (AC1Legacy::PStringBase<char>::s_NullBuffer_5 - 0x14);
004b452e          int32_t eax_52;
004b452e          eax_52 = esi(&edi_26[1]);
004b452e          
004b4536          if ((eax_52 == 0 && edi_26 != 0))
004b453e              edx_3 = **(uint32_t**)edi_26(1);
004b443b      }
004b443b      
004b4546      if (var_68 != 0)
004b4546      {
004b4551          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_68, &data_794320);
004b455f          PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, &data_794320);
004b4572          BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, &var_68, 0);
004b457b          int32_t* edi_28 = (AC1Legacy::PStringBase<char>::s_NullBuffer_5 - 0x14);
004b457b          
004b458a          if ((esi(&edi_28[1]) == 0 && edi_28 != 0))
004b4592              **(uint32_t**)edi_28(1);
004b4592          
004b4598          int32_t* edi_30 = (var_68 - 0x14);
004b459f          int32_t eax_56;
004b459f          eax_56 = esi(&edi_30[1]);
004b459f          
004b45a7          if ((eax_56 == 0 && edi_30 != 0))
004b45af              edx_3 = **(uint32_t**)edi_30(1);
004b4546      }
004b4546      
004b45bf      int32_t var_80_36 = arg3;
004b45c3      BasicCreatureExamineUI::SetAppraiseInfo(this, edx_3, arg2);
004b45c3      
004b45d4      if ((esi(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
004b45d6          AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
004b3ff0  }

004b45e8                          90 90 90 90 90 90 90 90                                                          ........

004b45f0  void __thiscall CharExamineUI::SetAppraiseInfo(class CharExamineUI* this, class AppraisalProfile const* arg2, int32_t arg3)

004b45f0  {
004b45f6      class AC1Legacy::PStringBase<char> ebx;
004b45f6      class AC1Legacy::PStringBase<char> var_120 = ebx;
004b45f7      class AC1Legacy::PStringBase<char> ebp;
004b45f7      class AC1Legacy::PStringBase<char> var_124 = ebp;
004b4607      void var_70;
004b4607      CreatureAppraisalProfile::CreatureAppraisalProfile(&var_70);
004b4613      class AC1Legacy::PStringBase<char> var_a8;
004b4613      CAllegianceData::CAllegianceData(&var_a8);
004b462e      int32_t (* const esi)() = InterlockedDecrement;
004b4638      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_14;
004b4638      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9;
004b4638      
004b4638      if (AppraisalProfile::InqCreature(arg2, &var_70) != 0)
004b4638      {
004b4645          void var_38;
004b4645          CreatureAppraisalProfile::CreatureAppraisalProfile(&var_38);
004b4655          AppraisalProfile::InqCreature(&this->cur_prof, &var_38);
004b4663          uint32_t var_e4 = 0;
004b4667          AppraisalProfile::InqInt(arg2, 0x71, &var_e4);
004b467c          uint32_t var_9c_1 = var_e4;
004b4683          uint32_t var_d0 = 0;
004b4687          AppraisalProfile::InqInt(arg2, 0xbc, &var_d0);
004b468c          uint32_t eax_2 = var_d0;
004b4692          uint32_t var_98_1 = eax_2;
004b4699          uint32_t var_bc = 0;
004b4699          
004b469d          if (eax_2 == 0)
004b46a8              AppraisalProfile::InqInt(arg2, 2, &var_bc);
004b46a8          
004b46ad          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b46b2          AC1Legacy::PStringBase<char>::s_NullBuffer_14 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b46ba          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b46d4          AppraisalSystem::InqGenderHeritageDisplay(var_e4, var_d0, var_bc, &AC1Legacy::PStringBase<char>::s_NullBuffer_14);
004b46e9          class PStringBase<unsigned short> var_11c;
004b46e9          class PStringBase<unsigned short>* eax_5;
004b46e9          eax_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_14->m_data);
004b46f5          UIElement_Text::SetText(this->m_displayText_Heritage, eax_5);
004b46fe          int32_t* edi_2 = (var_11c - 0x14);
004b46fe          
004b470d          if ((esi(&edi_2[1]) == 0 && edi_2 != 0))
004b4715              **(uint32_t**)edi_2(1);
004b4715          
004b4728          uint32_t var_c0 = 0;
004b472c          char ebx_2 = 0;
004b472e          int32_t eax_8 = AppraisalProfile::InqInt(arg2, 0x105, &var_c0);
004b4735          class PSRefBufferCharData<unsigned short>* var_114;
004b4735          
004b4735          if (eax_8 != 0)
004b4735          {
004b4737              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004b473c              var_114 = PStringBase<unsigned short>::s_NullBuffer_1;
004b4744              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004b4744              
004b475e              if (CharacterTitleTable::GetCharacterTitleFromID(var_c0, &var_114) != 0)
004b475e              {
004b476f                  UIElement_Text::SetText(this->m_displayText_Profession, &var_114);
004b4774                  ebx_2 = 1;
004b475e              }
004b475e              
004b477a              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_4 = &var_114->m_data[-0xa];
004b477a              
004b4789              if ((esi(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
004b4791                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
004b4735          }
004b4735          
004b4795          class CharExamineUI* this_1;
004b4795          
004b4795          if ((eax_8 != 0 && ebx_2 != 0))
004b4826              this_1 = this;
004b4795          else
004b4795          {
004b479b              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b47a0              var_114 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b47a8              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b47a8              
004b47c3              if (AppraisalProfile::InqString(arg2, 5, &var_114) == 0)
004b4806                  this_1 = this;
004b47c3              else
004b47c3              {
004b47d2                  class PStringBase<unsigned short>* eax_16;
004b47d2                  eax_16 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, &var_114->m_data[0xa]);
004b47d7                  this_1 = this;
004b47e2                  UIElement_Text::SetText(this_1->m_displayText_Profession, eax_16);
004b47eb                  int32_t* edi_6 = (var_11c - 0x14);
004b47eb                  
004b47fa                  if ((esi(&edi_6[1]) == 0 && edi_6 != 0))
004b4802                      **(uint32_t**)edi_6(1);
004b47c3              }
004b47c3              
004b480a              class PSRefBufferCharData<unsigned short>* edi_7 = var_114;
004b480a              
004b481a              if ((esi(&edi_7->m_data[2]) == 0 && edi_7 != 0))
004b481a              {
004b481c                  int32_t edx_6;
004b481c                  edx_6 = edi_7->m_data[0];
004b481c                  *(uint16_t*)((char*)edx_6)[2] = edi_7->m_data[1];
004b4822                  *(uint32_t*)edx_6(1);
004b481a              }
004b4795          }
004b4795          
004b482a          class ACCWeenieObject* cur_weenobj = this_1->cur_weenobj;
004b482a          
004b482f          if (cur_weenobj != 0)
004b482f          {
004b483c              if (cur_weenobj->vtable->IsPK() == 0)
004b483c              {
004b4885                  class PSRefBufferCharData<unsigned short>** ecx_29 = &var_114;
004b4889                  class PStringBase<unsigned short>* var_130_23;
004b4889                  
004b4889                  if (this_1->cur_weenobj->vtable->IsPKLite() == 0)
004b4889                  {
004b48a1                      PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_29, u"Non-Player Killer");
004b48aa                      var_130_23 = &var_114;
004b4889                  }
004b4889                  else
004b4889                  {
004b4890                      PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_29, u"Player Killer Lite");
004b4899                      var_130_23 = &var_114;
004b4889                  }
004b4889                  
004b48b1                  UIElement_Text::SetText(this_1->m_displayText_PlayerKiller, var_130_23);
004b48ba                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
004b483c              }
004b483c              else
004b483c              {
004b4847                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_114, u"Player Killer");
004b4857                  UIElement_Text::SetText(this_1->m_displayText_PlayerKiller, &var_114);
004b4860                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_9 = &var_114->m_data[-0xa];
004b4860                  
004b486f                  if ((esi(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
004b4877                      *(uint32_t*)*(int32_t*)((char*)ADJ(edi_9) + -0x14)(1);
004b483c              }
004b482f          }
004b482f          
004b48bf          class UIElement_ListBox* m_extraInfoList = this_1->m_extraInfoList;
004b48bf          
004b48c7          if (m_extraInfoList != 0)
004b48c9              UIElement_ListBox::Flush(m_extraInfoList);
004b48c9          
004b48ce          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b48d9          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_13 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b48e1          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004b48e3          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b48e8          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_15 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004b48f0          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
004b4901          int32_t var_b8_1 = 0;
004b4908          int32_t var_f0_1 = 0;
004b490c          int32_t ebx_3 = 0;
004b490e          var_114 = nullptr;
004b4919          class TResult __return_1;
004b4919          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, &PlayerDesc_ClassType, &var_114);
004b491e          class PSRefBufferCharData<unsigned short>* ecx_33 = var_114;
004b4932          int32_t* var_b4 = nullptr;
004b4939          int32_t var_b0_1 = 0;
004b4939          
004b4940          if (ecx_33 != 0)
004b4940          {
004b4942              int32_t edx_9;
004b4942              edx_9 = ecx_33->m_data[0];
004b4942              *(uint16_t*)((char*)edx_9)[2] = ecx_33->m_data[1];
004b4946              *(uint32_t*)(edx_9 + 0x10)(ecx_33, 0);
004b4940          }
004b4940          
004b495c          class BasicCreatureExamineUI* var_104;
004b495c          int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_b4, &var_104);
004b495c          
004b495e          if (ecx_33 != 0)
004b495e          {
004b4960              int32_t edx_10;
004b4960              edx_10 = ecx_33->m_data[0];
004b4960              *(uint16_t*)((char*)edx_10)[2] = ecx_33->m_data[1];
004b4964              *(uint32_t*)(edx_10 + 0x14)(ecx_33, 0);
004b495e          }
004b495e          
004b4967          uint32_t eax_30 = var_bc;
004b4967          
004b4971          if ((eax_30 != 0 && ebp_1 >= 0))
004b4984              CBaseQualities::InqInt((eax_30 + 0x38), 0x119, &AC1Legacy::PStringBase<char>::s_NullBuffer_14, 0, 0);
004b4984          
004b49a1          class AC1Legacy::PSRefBuffer<char>* var_118;
004b49a1          class AppraisalProfile* var_4;
004b49a1          
004b49a1          if (AppraisalProfile::InqInt(var_4, 0x119, &var_c0) != 0)
004b49a1          {
004b49b0              var_11c = 0;
004b49b8              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_114, &data_7928af);
004b49c6              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_118, &data_7928af);
004b49cb              char eax_32 = var_c0;
004b49cb              
004b49d1              if ((eax_32 & 1) != 0)
004b49d1              {
004b49e4                  AppraisalProfile::InqInt(var_4, 0x11f, &var_11c);
004b49f2                  AC1Legacy::PStringBase<char>::set(&var_114, "Celestial Hand");
004b49f7                  char eax_33 = AC1Legacy::PStringBase<char>::s_NullBuffer_14;
004b49f7                  
004b49fd                  if ((eax_33 & 1) != 0)
004b49ff                      ebx_3 = 1;
004b49fd                  else if ((eax_33 & 6) != 0)
004b4a11                      ebx_3 = 2;
004b49d1              }
004b49d1              else if ((eax_32 & 2) != 0)
004b4a1d              {
004b4a30                  AppraisalProfile::InqInt(var_4, 0x120, &var_11c);
004b4a3e                  AC1Legacy::PStringBase<char>::set(&var_114, "Eldrytch Web");
004b4a43                  char eax_34 = AC1Legacy::PStringBase<char>::s_NullBuffer_14;
004b4a43                  
004b4a49                  if ((eax_34 & 2) != 0)
004b4a4b                      ebx_3 = 1;
004b4a49                  else if ((eax_34 & 5) != 0)
004b4a56                      ebx_3 = 2;
004b4a1d              }
004b4a1d              else if ((eax_32 & 4) == 0)
004b4aa8                  AC1Legacy::PStringBase<char>::set(&var_114, &data_7af4e8);
004b4a5f              else
004b4a5f              {
004b4a72                  AppraisalProfile::InqInt(var_4, 0x121, &var_11c);
004b4a80                  AC1Legacy::PStringBase<char>::set(&var_114, "Radiant Blood");
004b4a85                  char eax_35 = AC1Legacy::PStringBase<char>::s_NullBuffer_14;
004b4a85                  
004b4a8b                  if ((eax_35 & 4) != 0)
004b4a8d                      ebx_3 = 1;
004b4a8b                  else if ((eax_35 & 3) != 0)
004b4a98                      ebx_3 = 2;
004b4a5f              }
004b4a5f              
004b4aad              class PStringBase<unsigned short> eax_36 = var_11c;
004b4ab9              class AC1Legacy::PStringBase<char>* __return;
004b4ab9              char const* const var_138_8;
004b4ab9              class AC1Legacy::PStringBase<char>* var_138_9;
004b4ab9              
004b4ab9              if ((eax_36 < 1 || eax_36 > 0x64))
004b4ab9              {
004b4b07                  char* var_138_11;
004b4b07                  
004b4b07                  if ((eax_36 >= 0x65 && eax_36 <= 0x12c))
004b4b07                  {
004b4b09                      var_138_11 = " ~ Adept";
004b4b67                  label_4b4b67:
004b4b67                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_120, var_138_11);
004b4b70                      var_138_9 = &var_120;
004b4b75                      __return = &var_124;
004b4b76                      goto label_4b4ae1;
004b4b07                  }
004b4b07                  
004b4b1c                  if ((eax_36 >= 0x12d && eax_36 <= 0x258))
004b4b1c                  {
004b4b27                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_120, " ~ Knight");
004b4b30                      var_138_9 = &var_120;
004b4b35                      __return = &var_124;
004b4b36                      goto label_4b4ae1;
004b4b1c                  }
004b4b1c                  
004b4b44                  if ((eax_36 >= 0x259 && eax_36 <= 0x3e8))
004b4b44                  {
004b4b46                      var_138_8 = " ~ Lord";
004b4b4b                      goto label_4b4ac4;
004b4b44                  }
004b4b44                  
004b4b5c                  if ((eax_36 >= 0x3e9 && eax_36 <= 0x5dc))
004b4b5c                  {
004b4b5e                      var_138_11 = " ~ Master";
004b4b5e                      goto label_4b4b67;
004b4b5c                  }
004b4b5c                  
004b4b84                  AC1Legacy::PStringBase<char>::operator=(&var_118, &var_114);
004b4ab9              }
004b4ab9              else
004b4ab9              {
004b4abb                  var_138_8 = " ~ Initiate";
004b4ac4              label_4b4ac4:
004b4ac4                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_120, var_138_8);
004b4acd                  var_138_9 = &var_120;
004b4ad2                  __return = &var_124;
004b4ae1              label_4b4ae1:
004b4ae1                  AC1Legacy::PStringBase<char>::operator=(&var_118, AC1Legacy::PStringBase<char>::operator+(&var_114, __return, var_138_9));
004b4aea                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_124);
004b4af3                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_120);
004b4ab9              }
004b4b92              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_120, u"Society:");
004b4ba6              class PStringBase<unsigned short>* eax_38;
004b4ba6              int32_t* ebx_5;
004b4ba6              eax_38 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_124, WidthConvert, &var_118->m_data);
004b4bb5              BasicCreatureExamineUI::AddLineToMiscInfo(var_104, &var_120, eax_38, ebx_3);
004b4bbe              int32_t* edi_12 = (var_124 - 0x14);
004b4bbe              
004b4bcd              if ((esi(&edi_12[1]) == 0 && edi_12 != 0))
004b4bd5                  **(uint32_t**)edi_12(1);
004b4bd5              
004b4bdb              int32_t* edi_14 = (var_120 - 0x14);
004b4bdb              
004b4bea              if ((esi(&edi_14[1]) == 0 && edi_14 != 0))
004b4bf2                  **(uint32_t**)edi_14(1);
004b4bf2              
004b4c00              if ((esi(&ebx_5[1]) == 0 && ebx_5 != 0))
004b4c08                  **(uint32_t**)ebx_5(1);
004b4c08              
004b4c0a              class PSRefBufferCharData<unsigned short>* edi_15 = var_114;
004b4c0a              
004b4c1a              if ((esi(&edi_15->m_data[2]) == 0 && edi_15 != 0))
004b4c1a              {
004b4c1c                  int32_t edx_15;
004b4c1c                  edx_15 = edi_15->m_data[0];
004b4c1c                  *(uint16_t*)((char*)edx_15)[2] = edi_15->m_data[1];
004b4c22                  *(uint32_t*)edx_15(1);
004b4c1a              }
004b49a1          }
004b49a1          
004b4c24          class BasicCreatureExamineUI* ebp_2 = var_104;
004b4c39          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_124, ACCWeenieObject::GetObjectName(ebp_2->cur_weenobj, NAME_APPROPRIATE, 0));
004b4c3e          int32_t* eax_47 = var_a8;
004b4c45          class AC1Legacy::PStringBase<char> edi_16 = var_124;
004b4c45          
004b4c4b          if (eax_47 != edi_16)
004b4c4b          {
004b4c5b              if ((esi(&eax_47[1]) == 0 && eax_47 != 0))
004b4c63                  **(uint32_t**)eax_47(1);
004b4c63              
004b4c69              var_a8 = edi_16;
004b4c70              InterlockedIncrement((edi_16 + 4));
004b4c4b          }
004b4c4b          
004b4c82          if ((esi((edi_16 + 4), ecx_33, 0) == 0 && edi_16 != 0))
004b4c8a              **(uint32_t**)edi_16(1);
004b4c8a          
004b4c8c          class AppraisalProfile* ebx_7 = arg2;
004b4c9c          int32_t var_108 = 0;
004b4ca4          AppraisalProfile::InqInt(ebx_7, 0x1e, &var_108);
004b4cb9          int32_t var_94_1 = var_108;
004b4cc0          AllegianceData::GetFullName(&var_a8, &AC1Legacy::PStringBase<char>::s_NullBuffer_13);
004b4cc5          class gmExaminationUI* m_pParentElement = ebp_2->m_pParentElement;
004b4cc5          
004b4cd7          if (m_pParentElement->m_displayedNameText != 0)
004b4cd7          {
004b4ce0              class PStringBase<unsigned short>* eax_55;
004b4ce0              eax_55 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_13->m_data);
004b4cec              UIElement_Text::SetText(m_pParentElement->m_displayedNameText, eax_55);
004b4cf5              int32_t* edi_18 = (var_11c - 0x14);
004b4cf5              
004b4d04              if ((esi(&edi_18[1]) == 0 && edi_18 != 0))
004b4d0c                  **(uint32_t**)edi_18(1);
004b4cd7          }
004b4cd7          
004b4d0e          class TResult AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b4d13          __return_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b4d1b          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_5 + 4));
004b4d27          UIElement_Text::ClearAllText(*(int32_t*)((char*)ebp_2 + 0x9c));
004b4d31          class PStringBase<unsigned short> AC1Legacy::PStringBase<char>::s_NullBuffer_11;
004b4d31          
004b4d31          if (var_108 >= 1)
004b4d31          {
004b4d47              if (AppraisalProfile::InqString(ebx_7, 0x2f, &AC1Legacy::PStringBase<char>::s_NullBuffer_13) != 0)
004b4d47              {
004b4d57                  class PStringBase<unsigned short>* eax_59;
004b4d57                  eax_59 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_13->m_data);
004b4d63                  UIElement_Text::SetText(*(int32_t*)((char*)ebp_2 + 0x9c), eax_59);
004b4d6c                  int32_t* edi_20 = (var_11c - 0x14);
004b4d6c                  
004b4d7b                  if ((esi(&edi_20[1]) == 0 && edi_20 != 0))
004b4d83                      **(uint32_t**)edi_20(1);
004b4d47              }
004b4d47              
004b4d97              if (AppraisalProfile::InqString(ebx_7, 0x15, &AC1Legacy::PStringBase<char>::s_NullBuffer_13) == 0)
004b4d97              {
004b4eb3                  if ((AppraisalProfile::InqInt(ebx_7, 0x23, &var_108) == 0 || var_108 < 0))
004b4eb5                      var_108 = 0;
004b4eb5                  
004b4ebd                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004b4ec2                  var_114 = PStringBase<unsigned short>::s_NullBuffer_2;
004b4eca                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004b4ed0                  int32_t eax_73 = var_108;
004b4ed7                  class PStringBase<unsigned short>* var_138_23;
004b4ed7                  wchar16 const* const var_134_10;
004b4ed7                  
004b4ed7                  if (eax_73 != 1)
004b4ed7                  {
004b4ee6                      int32_t var_130_44 = eax_73;
004b4ee7                      var_134_10 = u"%d Followers";
004b4ef0                      var_138_23 = &var_114;
004b4ed7                  }
004b4ed7                  else
004b4ed7                  {
004b4ed9                      int32_t var_130_43 = eax_73;
004b4eda                      var_134_10 = u"%d Follower";
004b4ee3                      var_138_23 = &var_114;
004b4ed7                  }
004b4ed7                  
004b4ef1                  PStringBase<unsigned short>::sprintf(var_138_23, var_134_10);
004b4f02                  PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_11, u"Alleg. Monarch:");
004b4f15                  BasicCreatureExamineUI::AddLineToMiscInfo(ebp_2, &AC1Legacy::PStringBase<char>::s_NullBuffer_11, &var_114, 0);
004b4f1e                  int32_t* edi_22 = (AC1Legacy::PStringBase<char>::s_NullBuffer_11 - 0x14);
004b4f1e                  
004b4f2d                  if ((esi(&edi_22[1]) == 0 && edi_22 != 0))
004b4f35                      **(uint32_t**)edi_22(1);
004b4f35                  
004b4f3b                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_24 = &var_114->m_data[-0xa];
004b4f3b                  
004b4f4a                  if ((esi(((char*)edi_24 + 4)) == 0 && edi_24 != 0))
004b4f52                      *(uint32_t*)*(int32_t*)((char*)ADJ(edi_24) + -0x14)(1);
004b4d97              }
004b4d97              else
004b4d97              {
004b4dab                  uint16_t* var_130_40;
004b4dab                  class PSRefBufferCharData<unsigned short>** ecx_86;
004b4dab                  
004b4dab                  if (AppraisalProfile::InqString(ebx_7, 0x23, &AC1Legacy::PStringBase<char>::s_NullBuffer_15) == 0)
004b4dab                  {
004b4e8f                      var_130_40 = u"Monarch:";
004b4e94                      ecx_86 = &var_114;
004b4dcc                  label_4b4dcc:
004b4dcc                      PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_86, var_130_40);
004b4de1                      class PStringBase<unsigned short>* eax_65;
004b4de1                      eax_65 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_13->m_data);
004b4dee                      BasicCreatureExamineUI::AddLineToMiscInfo(ebp_2, &var_114, eax_65, 0);
004b4df7                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
004b4e00                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
004b4dab                  }
004b4dab                  else
004b4dab                  {
004b4dc1                      ecx_86 = &var_114;
004b4dc1                      
004b4dc5                      if (AC1Legacy::PStringBase<char>::operator==(&AC1Legacy::PStringBase<char>::s_NullBuffer_13, &AC1Legacy::PStringBase<char>::s_NullBuffer_15) != 0)
004b4dc5                      {
004b4dc7                          var_130_40 = u"Monarch/Patron:";
004b4dc7                          goto label_4b4dcc;
004b4dc5                      }
004b4dc5                      
004b4e0f                      PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_86, u"Monarch:");
004b4e31                      BasicCreatureExamineUI::AddLineToMiscInfo(ebp_2, &var_114, PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_13->m_data), 0);
004b4e3a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
004b4e43                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
004b4e51                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_114, u"Patron:");
004b4e66                      class PStringBase<unsigned short>* eax_69;
004b4e66                      eax_69 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_15->m_data);
004b4e73                      BasicCreatureExamineUI::AddLineToMiscInfo(ebp_2, &var_114, eax_69, 0);
004b4e7c                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
004b4e85                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
004b4dab                  }
004b4d97              }
004b4d31          }
004b4d31          
004b4f54          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b4f59          var_114 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b4f61          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef);
004b4f71          int32_t eax_78;
004b4f71          eax_78 = ebx_7->base_armor_thigh > 0;
004b4f78          int32_t ecx_107;
004b4f78          ecx_107 = ebx_7->base_armor_groin > 0;
004b4f8a          int32_t edx_24;
004b4f8a          edx_24 = ebx_7->base_armor_foot > 0;
004b4f93          int32_t ecx_109;
004b4f93          ecx_109 = ebx_7->base_armor_shin > 0;
004b4fa2          int32_t edx_25;
004b4fa2          edx_25 = ebx_7->base_armor_bicep > 0;
004b4fab          int32_t ecx_111;
004b4fab          ecx_111 = ebx_7->base_armor_wrist > 0;
004b4fb7          int32_t edx_26;
004b4fb7          edx_26 = ebx_7->base_armor_head > 0;
004b4fc3          int32_t ecx_112;
004b4fc3          ecx_112 = ebx_7->base_armor_hand > 0;
004b4fcc          int32_t edx_28;
004b4fcc          edx_28 = ebx_7->base_armor_chest > 0;
004b4fcc          
004b4fd1          if (((((((((eax_78 | ecx_107) | edx_24) | ecx_109) | edx_25) | ecx_111) | edx_26) | ecx_112) | edx_28) != 0)
004b4fd1          {
004b4fe0              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, &data_794320);
004b4fee              PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_11, &data_794320);
004b5005              BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_11, &var_118, 0);
004b500e              int32_t* edi_30 = (AC1Legacy::PStringBase<char>::s_NullBuffer_11 - 0x14);
004b500e              
004b501d              if ((esi(&edi_30[1]) == 0 && edi_30 != 0))
004b5025                  **(uint32_t**)edi_30(1);
004b5025              
004b502b              void* edi_32 = ((char*)var_118 - 0x14);
004b502b              
004b503a              if ((esi(((char*)edi_32 + 4)) == 0 && edi_32 != 0))
004b5042                  **(uint32_t**)edi_32(1);
004b5042              
004b5044              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b504f              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_12 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b5057              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef);
004b5059              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b505e              AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
004b5066              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef);
004b5068              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b506d              var_118 = AC1Legacy::PStringBase<char>::s_NullBuffer_9;
004b5075              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_cRef);
004b507e              int32_t base_armor_head = arg2->base_armor_head;
004b5086              class AC1Legacy::PStringBase<char>* var_138_25;
004b5086              void* const var_134_13;
004b5086              
004b5086              if (base_armor_head < 0x270f)
004b5086              {
004b509a                  int32_t base_armor_head_1 = base_armor_head;
004b509b                  var_134_13 = &data_794344;
004b50a4                  var_138_25 = &AC1Legacy::PStringBase<char>::s_NullBuffer_12;
004b5086              }
004b5086              else
004b5086              {
004b508d                  int32_t var_130_53 = (base_armor_head - 0x270f);
004b508e                  var_134_13 = &data_7b110c;
004b5097                  var_138_25 = &AC1Legacy::PStringBase<char>::s_NullBuffer_12;
004b5086              }
004b5086              
004b50a5              AC1Legacy::PStringBase<char>::sprintf(var_138_25, var_134_13);
004b50aa              int32_t base_armor_chest = arg2->base_armor_chest;
004b50b5              class AC1Legacy::PStringBase<char>* var_138_26;
004b50b5              void* const var_134_14;
004b50b5              
004b50b5              if (base_armor_chest < 0x270f)
004b50b5              {
004b50c9                  int32_t base_armor_chest_1 = base_armor_chest;
004b50ca                  var_134_14 = &data_794344;
004b50d3                  var_138_26 = &AC1Legacy::PStringBase<char>::s_NullBuffer_11;
004b50b5              }
004b50b5              else
004b50b5              {
004b50bc                  int32_t var_130_54 = (base_armor_chest - 0x270f);
004b50bd                  var_134_14 = &data_7b110c;
004b50c6                  var_138_26 = &AC1Legacy::PStringBase<char>::s_NullBuffer_11;
004b50b5              }
004b50b5              
004b50d4              AC1Legacy::PStringBase<char>::sprintf(var_138_26, var_134_14);
004b50d9              int32_t base_armor_groin = arg2->base_armor_groin;
004b50e4              class AC1Legacy::PStringBase<char>* var_138_27;
004b50e4              void* const var_134_15;
004b50e4              
004b50e4              if (base_armor_groin < 0x270f)
004b50e4              {
004b50f8                  int32_t base_armor_groin_1 = base_armor_groin;
004b50f9                  var_134_15 = &data_794344;
004b5102                  var_138_27 = &var_118;
004b50e4              }
004b50e4              else
004b50e4              {
004b50eb                  int32_t var_130_55 = (base_armor_groin - 0x270f);
004b50ec                  var_134_15 = &data_7b110c;
004b50f5                  var_138_27 = &var_118;
004b50e4              }
004b50e4              
004b5103              AC1Legacy::PStringBase<char>::sprintf(var_138_27, var_134_15);
004b511a              char (* var_130_56)[0x1] = &var_118->m_data;
004b511e              int32_t var_134_16 = (AC1Legacy::PStringBase<char>::s_NullBuffer_11 + 0x14);
004b5122              char (* var_138_28)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_12->m_data;
004b512d              AC1Legacy::PStringBase<char>::sprintf(&var_114, "AL: %s/%s/%s");
004b513e              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Head/Chest/Groin");
004b5153              class PStringBase<unsigned short>* eax_98;
004b5153              void* ebx_9;
004b5153              int32_t esi_1;
004b5153              eax_98 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, WidthConvert, &var_114->m_data[0xa]);
004b5160              BasicCreatureExamineUI::AddLineToMiscInfo(this, &var_11c, eax_98, 0);
004b5169              void* __offset(BasicCreatureExamineUI, -0x14) edi_34 = ((char*)var_104 - 0x14);
004b5169              
004b5178              if ((esi_1(((char*)edi_34 + 4)) == 0 && edi_34 != 0))
004b5180                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_34) + -0x14)(1);
004b5180              
004b5186              int32_t* edi_36 = (var_11c - 0x14);
004b5186              
004b5195              if ((esi_1(&edi_36[1]) == 0 && edi_36 != 0))
004b519d                  **(uint32_t**)edi_36(1);
004b519d              
004b519f              int32_t eax_103 = *(uint32_t*)((char*)ebx_9 + 0x4c);
004b51a7              class AC1Legacy::PStringBase<char>* var_138_30;
004b51a7              void* const var_134_19;
004b51a7              
004b51a7              if (eax_103 < 0x270f)
004b51a7              {
004b51bb                  int32_t var_130_60 = eax_103;
004b51bc                  var_134_19 = &data_794344;
004b51c5                  var_138_30 = &AC1Legacy::PStringBase<char>::s_NullBuffer_12;
004b51a7              }
004b51a7              else
004b51a7              {
004b51ae                  int32_t var_130_59 = (eax_103 - 0x270f);
004b51af                  var_134_19 = &data_7b110c;
004b51b8                  var_138_30 = &AC1Legacy::PStringBase<char>::s_NullBuffer_12;
004b51a7              }
004b51a7              
004b51c6              AC1Legacy::PStringBase<char>::sprintf(var_138_30, var_134_19);
004b51cb              int32_t eax_105 = *(uint32_t*)((char*)ebx_9 + 0x50);
004b51d6              class AC1Legacy::PStringBase<char>* var_138_31;
004b51d6              void* const var_134_20;
004b51d6              
004b51d6              if (eax_105 < 0x270f)
004b51d6              {
004b51ea                  int32_t var_130_62 = eax_105;
004b51eb                  var_134_20 = &data_794344;
004b51f4                  var_138_31 = &AC1Legacy::PStringBase<char>::s_NullBuffer_11;
004b51d6              }
004b51d6              else
004b51d6              {
004b51dd                  int32_t var_130_61 = (eax_105 - 0x270f);
004b51de                  var_134_20 = &data_7b110c;
004b51e7                  var_138_31 = &AC1Legacy::PStringBase<char>::s_NullBuffer_11;
004b51d6              }
004b51d6              
004b51f5              AC1Legacy::PStringBase<char>::sprintf(var_138_31, var_134_20);
004b51fa              int32_t eax_107 = *(uint32_t*)((char*)ebx_9 + 0x54);
004b5205              class AC1Legacy::PStringBase<char>* var_138_32;
004b5205              void* const var_134_21;
004b5205              
004b5205              if (eax_107 < 0x270f)
004b5205              {
004b5219                  int32_t var_130_64 = eax_107;
004b521a                  var_134_21 = &data_794344;
004b5223                  var_138_32 = &var_118;
004b5205              }
004b5205              else
004b5205              {
004b520c                  int32_t var_130_63 = (eax_107 - 0x270f);
004b520d                  var_134_21 = &data_7b110c;
004b5216                  var_138_32 = &var_118;
004b5205              }
004b5205              
004b5224              AC1Legacy::PStringBase<char>::sprintf(var_138_32, var_134_21);
004b523b              char (* var_130_65)[0x1] = &var_118->m_data;
004b523f              int32_t var_134_22 = (AC1Legacy::PStringBase<char>::s_NullBuffer_11 + 0x14);
004b5243              char (* var_138_33)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_12->m_data;
004b524e              AC1Legacy::PStringBase<char>::sprintf(&var_114, "AL: %s/%s/%s");
004b525f              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Bicep/Wrist/Hand");
004b5274              class PStringBase<unsigned short>* eax_111;
004b5274              void* ebx_10;
004b5274              int32_t esi_2;
004b5274              eax_111 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, WidthConvert, &var_114->m_data[0xa]);
004b5281              BasicCreatureExamineUI::AddLineToMiscInfo(this, &var_11c, eax_111, 0);
004b528a              void* __offset(BasicCreatureExamineUI, -0x14) edi_38 = ((char*)var_104 - 0x14);
004b528a              
004b5299              if ((esi_2(((char*)edi_38 + 4)) == 0 && edi_38 != 0))
004b52a1                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_38) + -0x14)(1);
004b52a1              
004b52a7              int32_t* edi_40 = (var_11c - 0x14);
004b52a7              
004b52b6              if ((esi_2(&edi_40[1]) == 0 && edi_40 != 0))
004b52be                  **(uint32_t**)edi_40(1);
004b52be              
004b52c0              int32_t eax_116 = *(uint32_t*)((char*)ebx_10 + 0x58);
004b52c8              class AC1Legacy::PStringBase<char>* var_138_35;
004b52c8              void* const var_134_25;
004b52c8              
004b52c8              if (eax_116 < 0x270f)
004b52c8              {
004b52dc                  int32_t var_130_69 = eax_116;
004b52dd                  var_134_25 = &data_794344;
004b52e6                  var_138_35 = &AC1Legacy::PStringBase<char>::s_NullBuffer_12;
004b52c8              }
004b52c8              else
004b52c8              {
004b52cf                  int32_t var_130_68 = (eax_116 - 0x270f);
004b52d0                  var_134_25 = &data_7b110c;
004b52d9                  var_138_35 = &AC1Legacy::PStringBase<char>::s_NullBuffer_12;
004b52c8              }
004b52c8              
004b52e7              AC1Legacy::PStringBase<char>::sprintf(var_138_35, var_134_25);
004b52ec              int32_t eax_118 = *(uint32_t*)((char*)ebx_10 + 0x5c);
004b52f7              class PStringBase<unsigned short>* var_138_36;
004b52f7              char* var_134_26;
004b52f7              
004b52f7              if (eax_118 < 0x270f)
004b52f7              {
004b530b                  int32_t var_130_71 = eax_118;
004b530c                  var_134_26 = &data_794344;
004b5315                  var_138_36 = &AC1Legacy::PStringBase<char>::s_NullBuffer_11;
004b52f7              }
004b52f7              else
004b52f7              {
004b52fe                  int32_t var_130_70 = (eax_118 - 0x270f);
004b52ff                  var_134_26 = &data_7b110c;
004b5308                  var_138_36 = &AC1Legacy::PStringBase<char>::s_NullBuffer_11;
004b52f7              }
004b52f7              
004b5316              AC1Legacy::PStringBase<char>::sprintf(var_138_36, var_134_26);
004b531b              int32_t eax_120 = *(uint32_t*)((char*)ebx_10 + 0x60);
004b5326              class AC1Legacy::PSRefBuffer<char>** var_138_37;
004b5326              void* const var_134_27;
004b5326              
004b5326              if (eax_120 < 0x270f)
004b5326              {
004b533a                  int32_t var_130_73 = eax_120;
004b533b                  var_134_27 = &data_794344;
004b5344                  var_138_37 = &var_118;
004b5326              }
004b5326              else
004b5326              {
004b532d                  int32_t var_130_72 = (eax_120 - 0x270f);
004b532e                  var_134_27 = &data_7b110c;
004b5337                  var_138_37 = &var_118;
004b5326              }
004b5326              
004b5345              AC1Legacy::PStringBase<char>::sprintf(var_138_37, var_134_27);
004b534a              int32_t* ebp_6 = var_118;
004b535c              void* var_130_74 = &ebp_6[5];
004b5360              int32_t var_134_28 = (AC1Legacy::PStringBase<char>::s_NullBuffer_11 + 0x14);
004b5364              char (* var_138_38)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_12->m_data;
004b536f              AC1Legacy::PStringBase<char>::sprintf(&var_114, "AL: %s/%s/%s");
004b5380              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Thigh/Shin/Foot");
004b5395              class PStringBase<unsigned short>* eax_123;
004b5395              int32_t* ebx_12;
004b5395              eax_123 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, WidthConvert, &var_114->m_data[0xa]);
004b53a4              BasicCreatureExamineUI::AddLineToMiscInfo(this, &var_11c, eax_123, 0);
004b53ad              void* __offset(BasicCreatureExamineUI, -0x14) edi_42 = ((char*)var_104 - 0x14);
004b53ad              
004b53bc              if ((esi(((char*)edi_42 + 4)) == 0 && edi_42 != 0))
004b53c4                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_42) + -0x14)(1);
004b53c4              
004b53ca              int32_t* edi_44 = (var_11c - 0x14);
004b53ca              
004b53d9              if ((esi(&edi_44[1]) == 0 && edi_44 != 0))
004b53e1                  **(uint32_t**)edi_44(1);
004b53e1              
004b53ef              if ((esi(&ebp_6[1]) == 0 && ebp_6 != 0))
004b53f8                  **(uint32_t**)ebp_6(1);
004b53f8              
004b5406              if ((esi(&ebx_12[1]) == 0 && ebx_12 != 0))
004b540e                  **(uint32_t**)ebx_12(1);
004b540e              
004b5410              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_16 = AC1Legacy::PStringBase<char>::s_NullBuffer_12;
004b5410              
004b5420              if ((esi(&AC1Legacy::PStringBase<char>::s_NullBuffer_16->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_16 != 0))
004b5422                  AC1Legacy::PStringBase<char>::s_NullBuffer_16->vtable->__vecDelDtor(1);
004b4fd1          }
004b4fd1          
004b5431          int32_t ebx_13 = 0;
004b543f          int32_t var_cc = 0;
004b5443          int32_t var_d4 = 0;
004b5447          int32_t var_c8 = 0;
004b544b          int32_t var_dc = 0;
004b544f          PStringBase<unsigned short>::s_NullBuffer_9 = nullptr;
004b5453          int32_t var_e0 = 0;
004b5457          int32_t var_ac = 0;
004b545e          int32_t var_d8 = 0;
004b5462          int32_t var_e8 = 0;
004b5466          AppraisalProfile::InqInt(arg2, 0x133, &var_cc);
004b5477          AppraisalProfile::InqInt(arg2, 0x134, &var_d4);
004b5488          AppraisalProfile::InqInt(arg2, 0x139, &var_c8);
004b5499          AppraisalProfile::InqInt(arg2, 0x13a, &var_dc);
004b54aa          AppraisalProfile::InqInt(arg2, 0x13b, &PStringBase<unsigned short>::s_NullBuffer_9);
004b54bb          AppraisalProfile::InqInt(arg2, 0x13c, &var_e0);
004b54cf          AppraisalProfile::InqInt(arg2, 0x143, &var_ac);
004b54e0          AppraisalProfile::InqInt(arg2, 0x15e, &var_d8);
004b54f1          AppraisalProfile::InqInt(arg2, 0x15f, &var_e8);
004b54f6          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b54fb          AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_10;
004b5503          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_10->m_cRef);
004b5519          class BasicCreatureExamineUI* this_2;
004b5519          
004b5519          if (((var_cc > 0 || var_c8 > 0) || var_dc > 0))
004b5519          {
004b5528              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, &data_794320);
004b5536              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, &data_794320);
004b553b              this_2 = this;
004b554d              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, 0);
004b5556              int32_t* edi_47 = (var_11c - 0x14);
004b5556              
004b5565              if ((esi(&edi_47[1]) == 0 && edi_47 != 0))
004b556d                  **(uint32_t**)edi_47(1);
004b556d              
004b5573              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_49 = ((char*)var_118 - 0x14);
004b5573              
004b5582              if ((esi(((char*)edi_49 + 4)) == 0 && edi_49 != 0))
004b558a                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_49) + -0x14)(1);
004b558a              
004b5594              int32_t var_130_92 = var_dc;
004b5595              int32_t var_134_32 = var_cc;
004b55a5              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_11, "%Rating: %d/%d");
004b55b6              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Dmg/CritDmg");
004b55cb              class PStringBase<unsigned short>* eax_141;
004b55cb              eax_141 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, WidthConvert, (AC1Legacy::PStringBase<char>::s_NullBuffer_11 + 0x14));
004b55d8              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, eax_141, 0);
004b55e1              void* __offset(BasicCreatureExamineUI, -0x14) edi_51 = ((char*)var_104 - 0x14);
004b55e1              
004b55f0              if ((esi(((char*)edi_51 + 4)) == 0 && edi_51 != 0))
004b55f7                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_51) + -0x14)(ebx_13);
004b55f7              
004b55fd              int32_t* edi_53 = (var_11c - 0x14);
004b55fd              
004b560c              if ((esi(&edi_53[1]) == 0 && edi_53 != 0))
004b5614                  **(uint32_t**)edi_53(1);
004b5519          }
004b5519          else
004b5618              this_2 = this;
004b5618          
004b5632          if (((var_d4 > 0 || PStringBase<unsigned short>::s_NullBuffer_9 > 0) || var_e0 > 0))
004b5632          {
004b563a              if (ebx_13 == 0)
004b563a              {
004b5645                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, &data_794320);
004b5653                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, &data_794320);
004b5665                  BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, ebx_13);
004b566e                  int32_t* edi_55 = (var_11c - 0x14);
004b566e                  
004b567d                  if ((esi(&edi_55[1]) == 0 && edi_55 != 0))
004b5685                      **(uint32_t**)edi_55(1);
004b5685                  
004b568b                  void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_57 = ((char*)var_118 - 0x14);
004b568b                  
004b569a                  if ((esi(((char*)edi_57 + 4)) == 0 && edi_57 != 0))
004b56a2                      *(uint32_t*)*(int32_t*)((char*)ADJ(edi_57) + -0x14)(1);
004b563a              }
004b563a              
004b56b1              int32_t var_130_99 = var_e0;
004b56b2              int32_t var_134_36 = var_d4;
004b56bd              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_11, "%Resist: %d/%d");
004b56ce              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Dmg/CritDmg");
004b56e3              class PStringBase<unsigned short>* eax_154;
004b56e3              eax_154 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, WidthConvert, (AC1Legacy::PStringBase<char>::s_NullBuffer_11 + 0x14));
004b56f0              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, eax_154, 0);
004b56f9              void* __offset(BasicCreatureExamineUI, -0x14) edi_59 = ((char*)var_104 - 0x14);
004b56f9              
004b5708              if ((esi(((char*)edi_59 + 4)) == 0 && edi_59 != 0))
004b5710                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_59) + -0x14)(1);
004b5710              
004b5716              int32_t* edi_61 = (var_11c - 0x14);
004b5716              
004b5725              if ((esi(&edi_61[1]) == 0 && edi_61 != 0))
004b572d                  **(uint32_t**)edi_61(1);
004b5632          }
004b5632          
004b573d          if ((var_d8 > 0 || var_e8 > 0))
004b573d          {
004b5745              if (ebx_13 == 0)
004b5745              {
004b5750                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, &data_794320);
004b575e                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, &data_794320);
004b5770                  BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, ebx_13);
004b5779                  int32_t* edi_63 = (var_11c - 0x14);
004b5779                  
004b5788                  if ((esi(&edi_63[1]) == 0 && edi_63 != 0))
004b5790                      **(uint32_t**)edi_63(1);
004b5790                  
004b5796                  void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_65 = ((char*)var_118 - 0x14);
004b5796                  
004b57a5                  if ((esi(((char*)edi_65 + 4)) == 0 && edi_65 != 0))
004b57ad                      *(uint32_t*)*(int32_t*)((char*)ADJ(edi_65) + -0x14)(1);
004b5745              }
004b5745              
004b57bc              int32_t var_130_105 = var_e8;
004b57bd              int32_t var_134_40 = var_d8;
004b57c8              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_11, "%Resist: %d/%d");
004b57d9              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"DoT/Life:");
004b57ee              class PStringBase<unsigned short>* eax_166;
004b57ee              eax_166 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, WidthConvert, (AC1Legacy::PStringBase<char>::s_NullBuffer_11 + 0x14));
004b57fb              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, eax_166, 0);
004b5804              void* __offset(BasicCreatureExamineUI, -0x14) edi_67 = ((char*)var_104 - 0x14);
004b5804              
004b5813              if ((esi(((char*)edi_67 + 4)) == 0 && edi_67 != 0))
004b581b                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_67) + -0x14)(1);
004b581b              
004b5821              int32_t* edi_69 = (var_11c - 0x14);
004b5821              
004b5830              if ((esi(&edi_69[1]) == 0 && edi_69 != 0))
004b5838                  **(uint32_t**)edi_69(1);
004b573d          }
004b573d          
004b583c          if (ebx_13 != 0)
004b583c          {
004b5847              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, &data_794320);
004b5855              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, &data_794320);
004b5868              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, 0);
004b5871              int32_t* edi_71 = (var_11c - 0x14);
004b5871              
004b5880              if ((esi(&edi_71[1]) == 0 && edi_71 != 0))
004b5888                  **(uint32_t**)edi_71(1);
004b5888              
004b588e              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_73 = ((char*)var_118 - 0x14);
004b588e              
004b589d              if ((esi(((char*)edi_73 + 4)) == 0 && edi_73 != 0))
004b58a5                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_73) + -0x14)(1);
004b583c          }
004b583c          
004b58a7          class AppraisalProfile* ebx_17 = arg2;
004b58a7          
004b58be          if (AppraisalProfile::InqString(ebx_17, 0xa, &AC1Legacy::PStringBase<char>::s_NullBuffer_13) != 0)
004b58be          {
004b58c9              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Fellowship:");
004b58de              class PStringBase<unsigned short>* eax_174;
004b58de              eax_174 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_13->m_data);
004b58eb              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, eax_174, 0);
004b58f4              void* __offset(BasicCreatureExamineUI, -0x14) edi_75 = ((char*)var_104 - 0x14);
004b58f4              
004b5903              if ((esi(((char*)edi_75 + 4)) == 0 && edi_75 != 0))
004b590b                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_75) + -0x14)(1);
004b590b              
004b5911              int32_t* edi_77 = (var_11c - 0x14);
004b5911              
004b5920              if ((esi(&edi_77[1]) == 0 && edi_77 != 0))
004b5928                  **(uint32_t**)edi_77(1);
004b58be          }
004b58be          
004b593a          if (AppraisalProfile::InqString(ebx_17, 0x2b, &AC1Legacy::PStringBase<char>::s_NullBuffer_13) != 0)
004b593a          {
004b5945              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Arrived in Dereth:");
004b595a              class PStringBase<unsigned short>* eax_180;
004b595a              eax_180 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_13->m_data);
004b5967              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, eax_180, 0);
004b5970              void* __offset(BasicCreatureExamineUI, -0x14) edi_79 = ((char*)var_104 - 0x14);
004b5970              
004b597f              if ((esi(((char*)edi_79 + 4)) == 0 && edi_79 != 0))
004b5987                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_79) + -0x14)(1);
004b5987              
004b598d              int32_t* edi_81 = (var_11c - 0x14);
004b598d              
004b599c              if ((esi(&edi_81[1]) == 0 && edi_81 != 0))
004b59a4                  **(uint32_t**)edi_81(1);
004b593a          }
004b593a          
004b59bc          if (AppraisalProfile::InqInt(ebx_17, 0x7d, &var_108) != 0)
004b59bc          {
004b59c2              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
004b59c7              var_118 = PStringBase<unsigned short>::s_NullBuffer_3;
004b59cf              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
004b59dd              class PStringBase<unsigned short>* var_138_21;
004b59dd              var_138_21 = ((double)((long double)var_108));
004b59e0              ClientUISystem::DeltaTimeToString(var_138_21, &var_118);
004b59f1              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Time in Dereth:");
004b5a04              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, 0);
004b5a0d              int32_t* edi_83 = (var_11c - 0x14);
004b5a0d              
004b5a1c              if ((esi(&edi_83[1]) == 0 && edi_83 != 0))
004b5a24                  **(uint32_t**)edi_83(1);
004b5a24              
004b5a2a              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_85 = ((char*)var_118 - 0x14);
004b5a2a              
004b5a39              if ((esi(((char*)edi_85 + 4)) == 0 && edi_85 != 0))
004b5a41                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_85) + -0x14)(1);
004b59bc          }
004b59bc          
004b5a5b          if (AppraisalProfile::InqInt(arg2, 0xb5, &var_108) != 0)
004b5a5b          {
004b5a61              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
004b5a66              var_118 = PStringBase<unsigned short>::s_NullBuffer_4;
004b5a6e              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]);
004b5a74              int32_t var_130_123 = var_108;
004b5a7f              PStringBase<unsigned short>::sprintf(&var_118, &data_7a0184);
004b5a90              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Chess Rank:");
004b5aa3              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, 0);
004b5aac              int32_t* edi_87 = (var_11c - 0x14);
004b5aac              
004b5abb              if ((esi(&edi_87[1]) == 0 && edi_87 != 0))
004b5ac3                  **(uint32_t**)edi_87(1);
004b5ac3              
004b5ac9              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_89 = ((char*)var_118 - 0x14);
004b5ac9              
004b5ad8              if ((esi(((char*)edi_89 + 4)) == 0 && edi_89 != 0))
004b5ae0                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_89) + -0x14)(1);
004b5a5b          }
004b5a5b          
004b5afa          if (AppraisalProfile::InqInt(arg2, 0xc0, &var_108) != 0)
004b5afa          {
004b5b00              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
004b5b05              var_118 = PStringBase<unsigned short>::s_NullBuffer_5;
004b5b0d              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
004b5b13              int32_t var_130_128 = var_108;
004b5b1e              PStringBase<unsigned short>::sprintf(&var_118, &data_7a0184);
004b5b2f              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Fishing Skill:");
004b5b42              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, 0);
004b5b4b              int32_t* edi_91 = (var_11c - 0x14);
004b5b4b              
004b5b5a              if ((esi(&edi_91[1]) == 0 && edi_91 != 0))
004b5b62                  **(uint32_t**)edi_91(1);
004b5b62              
004b5b68              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_93 = ((char*)var_118 - 0x14);
004b5b68              
004b5b77              if ((esi(((char*)edi_93 + 4)) == 0 && edi_93 != 0))
004b5b7f                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_93) + -0x14)(1);
004b5afa          }
004b5afa          
004b5b96          if (AppraisalProfile::InqInt(arg2, 0x2b, &var_108) != 0)
004b5b96          {
004b5ba2              if (var_108 <= 0)
004b5bd5                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, u"Has never died");
004b5ba2              else
004b5ba2              {
004b5ba4                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer;
004b5ba9                  var_118 = PStringBase<unsigned short>::s_NullBuffer_6;
004b5bb1                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_6->m_data[-8]);
004b5bb7                  int32_t var_130_133 = var_108;
004b5bc2                  PStringBase<unsigned short>::sprintf(&var_118, &data_7a0184);
004b5ba2              }
004b5ba2              
004b5be3              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Deaths:");
004b5bf6              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, 0);
004b5bff              int32_t* edi_95 = (var_11c - 0x14);
004b5bff              
004b5c0e              if ((esi(&edi_95[1]) == 0 && edi_95 != 0))
004b5c16                  **(uint32_t**)edi_95(1);
004b5c16              
004b5c1c              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_97 = ((char*)var_118 - 0x14);
004b5c1c              
004b5c2b              if ((esi(((char*)edi_97 + 4)) == 0 && edi_97 != 0))
004b5c33                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_97) + -0x14)(1);
004b5b96          }
004b5b96          
004b5c4d          if (AppraisalProfile::InqInt(arg2, 0x106, &var_108) != 0)
004b5c4d          {
004b5c53              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer;
004b5c58              var_118 = PStringBase<unsigned short>::s_NullBuffer_7;
004b5c60              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_7->m_data[-8]);
004b5c66              int32_t var_130_138 = var_108;
004b5c71              PStringBase<unsigned short>::sprintf(&var_118, &data_7a0184);
004b5c82              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Titles Earned:");
004b5c95              BasicCreatureExamineUI::AddLineToMiscInfo(this_2, &var_11c, &var_118, 0);
004b5c9e              int32_t* edi_99 = (var_11c - 0x14);
004b5c9e              
004b5cad              if ((esi(&edi_99[1]) == 0 && edi_99 != 0))
004b5cb5                  **(uint32_t**)edi_99(1);
004b5cb5              
004b5cbb              void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_101 = ((char*)var_118 - 0x14);
004b5cbb              
004b5cca              if ((esi(((char*)edi_101 + 4)) == 0 && edi_101 != 0))
004b5cd2                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_101) + -0x14)(1);
004b5c4d          }
004b5c4d          
004b5cd4          class PStringBase<unsigned short> AC1Legacy::PStringBase<char>::s_NullBuffer_17 = AC1Legacy::PStringBase<char>::s_NullBuffer_11;
004b5cd4          
004b5ce4          if ((esi((AC1Legacy::PStringBase<char>::s_NullBuffer_17 + 4)) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_17 != 0))
004b5cec              **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_17(1);
004b5cec          
004b5cee          class PSRefBufferCharData<unsigned short>* edi_102 = var_114;
004b5cee          
004b5cfe          if ((esi(&edi_102->m_data[2]) == 0 && edi_102 != 0))
004b5cfe          {
004b5d00              int32_t edx_75;
004b5d00              edx_75 = edi_102->m_data[0];
004b5d00              *(uint16_t*)((char*)edx_75)[2] = edi_102->m_data[1];
004b5d06              *(uint32_t*)edx_75(1);
004b5cfe          }
004b5cfe          
004b5d08          class TResult __return_2 = __return_1;
004b5d08          
004b5d18          if ((esi((__return_2 + 4)) == 0 && __return_2 != 0))
004b5d20              **(uint32_t**)__return_2(1);
004b5d20          
004b5d22          int32_t* ecx_256 = var_b4;
004b5d22          
004b5d28          if (ecx_256 != 0)
004b5d2c              *(uint32_t*)(*(uint32_t*)ecx_256 + 0x14)();
004b5d2c          
004b5d2f          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_18 = AC1Legacy::PStringBase<char>::s_NullBuffer_15;
004b5d2f          
004b5d3f          if ((esi(&AC1Legacy::PStringBase<char>::s_NullBuffer_18->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_18 != 0))
004b5d41              AC1Legacy::PStringBase<char>::s_NullBuffer_18->vtable->__vecDelDtor(1);
004b5d41          
004b5d49          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_19 = AC1Legacy::PStringBase<char>::s_NullBuffer_13;
004b5d49          
004b5d59          if ((esi(&AC1Legacy::PStringBase<char>::s_NullBuffer_19->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_19 != 0))
004b5d5b              AC1Legacy::PStringBase<char>::s_NullBuffer_19->vtable->__vecDelDtor(1);
004b5d5b          
004b5d63          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_20 = AC1Legacy::PStringBase<char>::s_NullBuffer_14;
004b5d63          
004b5d73          if ((esi(&AC1Legacy::PStringBase<char>::s_NullBuffer_20->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_20 != 0))
004b5d75              AC1Legacy::PStringBase<char>::s_NullBuffer_20->vtable->__vecDelDtor(1);
004b4638      }
004b4638      
004b5d7d      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer;
004b5d82      PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_8;
004b5d8a      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_8->m_data[-8]);
004b5da3      PStringBase<unsigned short>::allocate_ref_buffer(&AC1Legacy::PStringBase<char>::s_NullBuffer_14, wcslen(u"* = Unenchantable"));
004b5db2      wcscpy(AC1Legacy::PStringBase<char>::s_NullBuffer_14, u"* = Unenchantable");
004b5dcd      BasicCreatureExamineUI::AddLineToMiscInfo(this, &AC1Legacy::PStringBase<char>::s_NullBuffer_14, &PStringBase<unsigned short>::s_NullBuffer_9, 0);
004b5dd6      void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) edi_104 = ((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_14 - 0x14);
004b5dd6      
004b5de5      if ((esi(((char*)edi_104 + 4)) == 0 && edi_104 != 0))
004b5ded          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_104) + -0x14)(1);
004b5ded      
004b5df3      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_106 = &PStringBase<unsigned short>::s_NullBuffer_9->m_data[-0xa];
004b5dfa      int32_t eax_230;
004b5dfa      class AppraisalProfile* edx_81;
004b5dfa      eax_230 = esi(((char*)edi_106 + 4));
004b5dfa      
004b5e02      if ((eax_230 == 0 && edi_106 != 0))
004b5e0a          edx_81 = *(uint32_t*)*(int32_t*)((char*)ADJ(edi_106) + -0x14)(1);
004b5e0a      
004b5e1a      int32_t var_130_151 = arg3;
004b5e1e      BasicCreatureExamineUI::SetAppraiseInfo(this, edx_81, arg2);
004b5e2a      AllegianceData::~AllegianceData(&var_a8);
004b45f0  }

004b5e3c                                                                                      90 90 90 90                              ....

004b5e40  void __fastcall SpellExamineUI::SetManaText(class SpellExamineUI* this, int32_t arg2, int32_t arg3)

004b5e40  {
004b5e4c      if (this->m_spellManaText != 0)
004b5e4c      {
004b5e52          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b5e60          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b5e69          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b5e6b          int32_t eax_2 = arg2;
004b5e71          class AC1Legacy::PSRefBuffer<char>** ecx = &AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b5e71          
004b5e75          if (eax_2 <= 0)
004b5e93              AC1Legacy::PStringBase<char>::set(ecx, &data_798b04);
004b5e75          else if (AC1Legacy::PStringBase<char>::convert(ecx, eax_2, 1) == 0)
004b5e93              AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &data_7af4e8);
004b5e93          
004b5eb2          class AC1Legacy::PStringBase<char> __return;
004b5eb2          AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, "Mana: "), &__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
004b5eb7          int32_t esi_1 = arg2;
004b5eb7          
004b5ecd          if ((InterlockedDecrement((esi_1 + 4)) == 0 && esi_1 != 0))
004b5ed5              **(uint32_t**)esi_1(1);
004b5ed5          
004b5ed7          class AC1Legacy::PSRefBuffer<char>* esi_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b5edb          class AC1Legacy::PStringBase<char> __return_1 = __return;
004b5edb          
004b5ee1          if (esi_2 != __return_1)
004b5ee1          {
004b5eef              if ((InterlockedDecrement(&esi_2->m_cRef) == 0 && esi_2 != 0))
004b5ef1                  esi_2->vtable->__vecDelDtor(1);
004b5ef1              
004b5efc              esi_2 = __return_1;
004b5eff              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = esi_2;
004b5f03              InterlockedIncrement((__return_1 + 4));
004b5ee1          }
004b5ee1          
004b5f11          if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004b5f19              **(uint32_t**)__return_1(1);
004b5f19          
004b5f1b          int32_t edi_1 = arg3;
004b5f1b          
004b5f21          if (edi_1 > 0)
004b5f21          {
004b5f23              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b5f28              arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b5f30              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004b5f32              int32_t var_20_9 = edi_1;
004b5f3d              AC1Legacy::PStringBase<char>::sprintf(&arg2, " + %d per target");
004b5f5d              AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, AC1Legacy::PStringBase<char>::operator+(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &arg3, &arg2));
004b5f62              int32_t eax_12 = arg3;
004b5f62              
004b5f74              if ((InterlockedDecrement((eax_12 + 4)) == 0 && eax_12 != 0))
004b5f7c                  **(uint32_t**)eax_12(1);
004b5f7c              
004b5f7e              int32_t esi_4 = arg2;
004b5f7e              
004b5f8e              if ((InterlockedDecrement((esi_4 + 4)) == 0 && esi_4 != 0))
004b5f96                  **(uint32_t**)esi_4(1);
004b5f96              
004b5f98              esi_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b5f21          }
004b5f21          
004b5fa6          class PStringBase<unsigned short>* eax_18;
004b5fa6          int32_t ebx_1;
004b5fa6          int32_t* esi_5;
004b5fa6          eax_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &esi_2->m_data);
004b5fb3          UIElement_Text::SetText(this->m_spellManaText, eax_18);
004b5fbc          int32_t* edi_3 = (arg2 - 0x14);
004b5fbc          
004b5fcb          if ((ebx_1(&edi_3[1]) == 0 && edi_3 != 0))
004b5fd3              **(uint32_t**)edi_3(1);
004b5fd3          
004b5fe1          if ((ebx_1(&esi_5[1]) == 0 && esi_5 != 0))
004b5fe9              **(uint32_t**)esi_5(1);
004b5e4c      }
004b5e40  }

004b5ff5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004b6000  void __fastcall SpellExamineUI::AddItemInfo(class SpellExamineUI* this, char const* arg2)

004b6000  {
004b6000      class SpellExamineUI* this_1 = this;
004b6004      class UIElement_Text* m_spellDisplayText = this->m_spellDisplayText;
004b6004      
004b600c      if (m_spellDisplayText != 0)
004b600c      {
004b6021          if (m_spellDisplayText->m_glyphList.m_glyphList._num_elements > 1)
004b6021          {
004b602c              PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, &data_79c288);
004b603c              UIElement_Text::AppendText(this->m_spellDisplayText, &this_1);
004b6045              void* __offset(SpellExamineUI, -0x14) esi_2 = ((char*)this_1 - 0x14);
004b6045              
004b6054              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004b605c                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004b6021          }
004b6021          
004b6069          class PStringBase<unsigned short>* eax_2;
004b6069          int32_t ebx_1;
004b6069          eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, arg2);
004b6075          UIElement_Text::AppendText(this->m_spellDisplayText, eax_2);
004b607e          void* esi_4 = &arg2[0xffffffec];
004b607e          
004b608d          if ((ebx_1(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004b6095              **(uint32_t**)esi_4(1);
004b600c      }
004b6000  }

004b609e                                                                                            90 90                                ..

004b60a0  void* __thiscall gmExaminationUI::`scalar deleting destructor'(class gmExaminationUI* this, uint32_t arg2)

004b60a0  {
004b60a3      gmExaminationUI::~gmExaminationUI(this);
004b60a3      
004b60ad      if ((arg2 & 1) != 0)
004b60b0          operator delete(this);
004b60b0      
004b60bb      return this;
004b60a0  }

004b60be                                                                                            90 90                                ..

004b60c0  enum UIElementMessageListenResult __thiscall gmExaminationUI::ListenToElementMessage(class gmExaminationUI* this, struct UIElementMessageInfo const* arg2)

004b60c0  {
004b60c5      struct UIElementMessageInfo* edi = arg2;
004b60c9      uint32_t idElement = edi->idElement;
004b60c9      
004b60d2      if (idElement == 0x10000137)
004b60d2      {
004b61d6          if ((edi->idMessage == 0x1c && edi->dwParam1 == 7))
004b61de              ItemExamineUI::HandleInscriptionMousePresses(this->m_itemUI);
004b60d2      }
004b60d2      else if (idElement == 0x1000013e)
004b60db      {
004b618f          if (edi->idMessage == 0x2f)
004b618f          {
004b6191              class ItemExamineUI* m_itemUI = this->m_itemUI;
004b6191              
004b6199              if (m_itemUI != 0)
004b6199              {
004b61a0                  if (edi->dwParam1 == 0)
004b61a0                  {
004b61a2                      ItemExamineUI::HandleInscriptionLosingFocus(m_itemUI);
004b61b4                      return UIElement::ListenToElementMessage(this, edi);
004b61a0                  }
004b61a0                  
004b61b7                  ItemExamineUI::HandleInscriptionGainingFocus(m_itemUI);
004b6199              }
004b618f          }
004b60db      }
004b60db      else if ((idElement == 0x1000032d && edi->idMessage == 4))
004b60f0      {
004b60f6          uint32_t dwParam2 = edi->dwParam2;
004b60f6          
004b60fb          if (dwParam2 != 0)
004b60fb          {
004b6101              int32_t eax_3 = *(uint32_t*)dwParam2;
004b610d              arg2 = nullptr;
004b6115              int32_t var_8 = 0;
004b611d              int32_t* var_4 = nullptr;
004b611d              
004b6135              if ((*(uint32_t*)(eax_3 + 0xd0)(0x10000010, &var_8) != 0 && var_4 != 0))
004b613e                  *(uint32_t*)(*(uint32_t*)var_4 + 0x78)(&arg2);
004b613e              
004b6141              struct UIElementMessageInfo* eax_6 = arg2;
004b6141              
004b6147              if (eax_6 != 0)
004b6147              {
004b6150                  uint32_t eax_7 = SpellExamineUI::GetComponentObjectID(this->m_spellUI, eax_6);
004b6150                  
004b6157                  if (eax_7 != 0)
004b6157                  {
004b615c                      this->m_examineNewlySelectedItem = 0;
004b6163                      ACCWeenieObject::SetSelectedObject(eax_7, 0);
004b616b                      this->m_examineNewlySelectedItem = 1;
004b6157                  }
004b6147              }
004b6147              
004b6176              BaseProperty::~BaseProperty(&var_8);
004b60fb          }
004b60f0      }
004b60f0      
004b61f0      return UIElement::ListenToElementMessage(this, edi);
004b60c0  }

004b61f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004b6200  void __thiscall gmExaminationUI::RecvNotice_SetAppraiseInfo(class gmExaminationUI* this, uint32_t arg2, class AppraisalProfile const* arg3)

004b6200  {
004b6206      /* tailcall */
004b6206      return gmExaminationUI::SetAppraiseInfo(((char*)this - 0x5f8), arg2, arg3);
004b6200  }

004b620b                                   90 90 90 90 90                                                             .....

004b6210  int32_t __thiscall SpellExamineUI::ExamineSpell(class SpellExamineUI* this, uint32_t const arg2)

004b6210  {
004b621f      if (arg2 == 0)
004b622a          return 0;
004b622a      
004b622f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b623a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b623e      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004b6244      class ClientMagicSystem* eax_1 = ClientMagicSystem::GetMagicSystem();
004b624d      class ClientMagicSystem* var_8fc = eax_1;
004b624d      
004b6251      if (eax_1 == 0)
004b6251      {
004b6260          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
004b6262              AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
004b6262          
004b6276          return 0;
004b6251      }
004b6251      
004b627d      void var_89c;
004b627d      CSpellBase::CSpellBase(&var_89c);
004b6291      ClientMagicSystem::InqSpellBase(eax_1, arg2, &var_89c);
004b6298      SpellExamineUI::ClearIcons(this);
004b62a3      UIElement_Text::ClearAllText(this->m_spellDisplayText);
004b62ae      UIElement_Text::ClearAllText(this->m_spellDurationText);
004b62bc      this->cur_spellid = arg2;
004b62cc      int32_t* __return;
004b62cc      AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, CSpellBase::InqName(&var_89c, &__return));
004b62d1      int32_t* __return_3 = __return;
004b62e1      int32_t eax_7;
004b62e1      uint32_t edx;
004b62e1      eax_7 = InterlockedDecrement(&__return_3[1]);
004b62e1      
004b62e9      if ((eax_7 == 0 && __return_3 != 0))
004b62f1          edx = **(uint32_t**)__return_3(1);
004b62f1      
004b62f6      class UIElement_Text* m_displayedNameText = this->m_pParentElement->m_displayedNameText;
004b62f6      
004b62fe      if (m_displayedNameText != 0)
004b62fe      {
004b630e          class PStringBase<unsigned short>* eax_9;
004b630e          void* esi_3;
004b630e          eax_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data);
004b631a          UIElement_Text::SetText(*(uint32_t*)((char*)esi_3 + 0x610), eax_9);
004b6323          void* esi_5 = &__return[-5];
004b632a          m_displayedNameText = InterlockedDecrement(((char*)esi_5 + 4));
004b632a          
004b6332          if ((m_displayedNameText == 0 && esi_5 != 0))
004b633a              m_displayedNameText = **(uint32_t**)esi_5(1);
004b62fe      }
004b62fe      
004b6343      int32_t var_890;
004b6343      int32_t var_918_9 = var_890;
004b6348      int32_t** var_91c_1 = &__return;
004b6349      CSpellBase::SchoolEnumToName(m_displayedNameText, edx);
004b635a      AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &__return);
004b635f      int32_t* __return_4 = __return;
004b635f      
004b636f      if ((InterlockedDecrement(&__return_4[1]) == 0 && __return_4 != 0))
004b6377          **(uint32_t**)__return_4(1);
004b6377      
004b6395      AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, AC1Legacy::operator+(&__return, "School: ", &AC1Legacy::PStringBase<char>::s_NullBuffer_2));
004b639a      int32_t* __return_5 = __return;
004b639a      
004b63aa      if ((InterlockedDecrement(&__return_5[1]) == 0 && __return_5 != 0))
004b63b2          **(uint32_t**)__return_5(1);
004b63b2      
004b63c2      class PStringBase<unsigned short>* eax_15;
004b63c2      class SpellExamineUI* ebx_1;
004b63c2      eax_15 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data);
004b63cb      UIElement_Text::SetText(ebx_1->m_magicSchoolText, eax_15);
004b63d4      void* esi_7 = &__return[-5];
004b63d4      
004b63e3      if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
004b63eb          **(uint32_t**)esi_7(1);
004b63eb      
004b63fb      int32_t var_87c;
004b63fb      int32_t var_918_18 = var_87c;
004b63ff      int32_t var_880;
004b63ff      SpellExamineUI::SetManaText(ebx_1, var_880, var_880);
004b6408      CSpellBase::InqDuration(&var_89c);
004b640d      long double x87_r0;
004b640d      (x87_r0 - ((long double)-1.0));
004b6413      int32_t (* const esi_8)() = sprintf;
004b641b      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004b641e      int32_t var_91c_2;
004b641e      void var_7e8;
004b641e      
004b641e      if (p)
004b641e      {
004b6420          long double temp2_1 = ((long double)0.0);
004b6420          (x87_r0 - temp2_1);
004b6420          
004b642b          if ((*(uint8_t*)((char*)((((x87_r0 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r0 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
004b642b          {
004b642d              (x87_r0 - ((long double)60.0));
004b6435              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004b6438              void* var_920_1;
004b6438              char const* const var_91c_3;
004b6438              int32_t var_918_19;
004b6438              
004b6438              if (p_1)
004b6438              {
004b645a                  var_918_19 = _ftol2();
004b645b                  var_91c_3 = "Duration: %u min.";
004b6467                  var_920_1 = &var_7e8;
004b6438              }
004b6438              else
004b6438              {
004b643f                  var_918_19 = _ftol2();
004b6440                  var_91c_3 = "Duration: %u sec.";
004b644c                  var_920_1 = &var_7e8;
004b6438              }
004b6438              
004b6468              sprintf(var_920_1, var_91c_3, var_918_19);
004b6475              var_91c_2 = 0;
004b647b              class PStringBase<unsigned short>* eax_21;
004b647b              eax_21 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, &var_7e8);
004b6487              UIElement_Text::SetText(ebx_1->m_spellDurationText, eax_21);
004b6490              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004b642b          }
004b641e      }
004b641e      
004b64a0      struct Turbine_GUID* eax_22;
004b64a0      long double st0;
004b64a0      eax_22 = SpellExamineUI::DetermineSpellRange(ebx_1, &var_89c);
004b64a5      long double temp3 = ((long double)0.0);
004b64a5      (st0 - temp3);
004b64ab      eax_22 = ((((st0 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp3))) ? 1 : 0) << 0xa) | ((((st0 == temp3) ? 1 : 0) << 0xe) | 0x800))));
004b64ad      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
004b64ad      
004b64b0      if (p_2)
004b64b0      {
004b64d1          var_91c_2 = ((double)(st0 / ((long double)0.91439999999999999)));
004b64da          esi_8(&var_7e8, "Range: %.1f yds.", var_91c_2);
004b64ed          class PStringBase<unsigned short>* eax_23;
004b64ed          eax_23 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, &var_7e8);
004b64f9          UIElement_Text::SetText(ebx_1->m_spellRangeText, eax_23);
004b6502          void* esi_10 = &__return[-5];
004b6502          
004b6511          if ((InterlockedDecrement(((char*)esi_10 + 4)) == 0 && esi_10 != 0))
004b6519              **(uint32_t**)esi_10(1);
004b64b0      }
004b64b0      else
004b64ba          UIElement_Text::ClearAllText(ebx_1->m_spellRangeText);
004b64ba      
004b652e      AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, CSpellBase::InqDescription(&var_89c, &__return));
004b6533      int32_t* __return_6 = __return;
004b653b      int32_t eax_27;
004b653b      char* edx_7;
004b653b      eax_27 = InterlockedDecrement(&__return_6[1]);
004b653b      
004b6543      if ((eax_27 == 0 && __return_6 != 0))
004b654b          edx_7 = **(uint32_t**)__return_6(1);
004b654b      
004b654d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b6554      char (* var_918_29)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data;
004b6557      SpellExamineUI::AddItemInfo(ebx_1, edx_7);
004b655c      class UIRegion* m_spellIcon = ebx_1->m_spellIcon;
004b655c      
004b6564      if (m_spellIcon != 0)
004b6564      {
004b6566          uint32_t edx_9 = UIRegion::ClearImage(m_spellIcon);
004b6572          uint32_t const var_918_30 = arg2;
004b6577          class Graphic* eax_29 = ClientMagicSystem::GetSpellIcon(var_8fc, edx_9);
004b6577          
004b6580          if (eax_29 != 0)
004b6580          {
004b658a              UIRegion::SetBlitMode(ebx_1->m_spellIcon, Blit_3Alpha);
004b6591              void* eax_30 = operator new(0xc);
004b659b              class Graphic* eax_31;
004b659b              
004b659b              if (eax_30 == 0)
004b65a7                  eax_31 = nullptr;
004b659b              else
004b65a0                  eax_31 = Graphic::Graphic(eax_30, eax_29);
004b65a0              
004b65b0              UIRegion::SetImage(ebx_1->m_spellIcon, eax_31);
004b6580          }
004b6564      }
004b6564      
004b65bc      class SpellComponentTable* eax_33 = ClientMagicSystem::GetSpellComponentTable(ClientMagicSystem::GetMagicSystem());
004b65bc      
004b65c7      if (eax_33 == 0)
004b65c7      {
004b65cd          CSpellBase::~CSpellBase(&var_89c);
004b65cd          
004b65de          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004b65e0              AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004b65e0          
004b65f4          return 0;
004b65c7      }
004b65c7      
004b65f7      ClientMagicSystem::GetMagicSystem();
004b660e      void __return_2;
004b660e      uint32_t (* esi_12)[0x8] = &ClientMagicSystem::GetAppropriateSpellFormula(&__return_2, &var_89c)->_comps;
004b6611      int32_t var_8c0 = 0x7a3a8c;
004b6622      void var_8bc;
004b6622      __builtin_memcpy(&var_8bc, esi_12, 0x20);
004b662b      int32_t eax_38;
004b662b      char* edx_11;
004b662b      eax_38 = SpellFormula::GetNumSpellComponents(&var_8c0);
004b662b      
004b6638      if (eax_38 > 0)
004b6638      {
004b663a          char const* const var_918_35 = "\nCOMPONENTS:";
004b6641          SpellExamineUI::AddItemInfo(ebx_1, edx_11);
004b6638      }
004b6638      
004b6646      class UIElement_ListBox* m_formulaListBox = ebx_1->m_formulaListBox;
004b665b      int32_t eax_41;
004b665b      int32_t edx_12;
004b665b      edx_12 = HIGHD(((int64_t)ebx_1->m_componentListW));
004b665b      eax_41 = LOWD(((int64_t)ebx_1->m_componentListW));
004b6652      m_formulaListBox->vtable->MoveTo((ebx_1->m_componentListX - (((eax_41 - edx_12) >> 1) * (eax_38 - 1))), m_formulaListBox->m_box.m_y0);
004b6672      class UIElement_ListBox* m_formulaListBox_1 = ebx_1->m_formulaListBox;
004b6678      struct UIElement_ListBox::VTable* vtable = m_formulaListBox_1->vtable;
004b667a      int32_t eax_45 = UIRegion::GetHeight(m_formulaListBox_1);
004b667f      ebx_1->m_formulaListBox;
004b6690      vtable->ResizeTo((ebx_1->m_componentListW * eax_38), eax_45);
004b6697      int32_t var_8e4;
004b6697      enum ComponentTrackerUpdate edx_16 = SpellComponentBase::SpellComponentBase(&var_8e4);
004b669c      int32_t* __return_8 = nullptr;
004b66a0      __return = nullptr;
004b66a0      
004b66a4      if (eax_38 > 0)
004b66a4      {
004b6739          while (true)
004b6739          {
004b6739              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8fc, "     ");
004b6745              uint32_t edi_2;
004b6745              
004b6745              if ((__return_8 < 0 || __return_8 >= 8))
004b674d                  edi_2 = 0;
004b6745              else
004b6747                  edi_2 = *(uint32_t*)(&var_8bc + (__return_8 << 2));
004b6747              
004b6772              int32_t var_8d8;
004b6772              class ClientMagicSystem* esi_17;
004b6772              
004b6772              if ((SpellComponentTable::InqSpellComponentBase(eax_33, edi_2, &var_8e4) == 0 || var_8d8 == INVALID_DID.id))
004b687f                  esi_17 = var_8fc;
004b6772              else
004b6772              {
004b6785                  class UIElement* eax_57 = UIElement_ListBox::AddItemFromTemplateListByID(ebx_1->m_formulaListBox, 0x1000032e, nullptr);
004b6785                  
004b6790                  if (eax_57 != 0)
004b6790                  {
004b679f                      int32_t var_8f8 = 0;
004b67a3                      int32_t* var_8f4_1 = nullptr;
004b67a7                      BaseProperty::SetPropertyName(&var_8f8, 0x10000010);
004b67a7                      
004b67b2                      if (var_8f4_1 != 0)
004b67b2                      {
004b67b8                          BaseProperty::CheckCopyOnWrite(&var_8f8);
004b67c4                          *(uint32_t*)(*(uint32_t*)var_8f4_1 + 0x7c)(0x64);
004b67b2                      }
004b67b2                      
004b67c7                      eax_57->vtable->SetProperty(&var_8f8);
004b67d8                      class IDClass<_tagDataID,32,0> edx_21 = UIRegion::ClearImage(eax_57);
004b67dd                      class ClientMagicSystem* eax_60 = ClientMagicSystem::GetMagicSystem();
004b67dd                      
004b67e4                      if (eax_60 == 0)
004b67e4                      {
004b68b7                          BaseProperty::~BaseProperty(&var_8f8);
004b68c0                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_8fc);
004b68c9                          SpellComponentBase::~SpellComponentBase(&var_8e4);
004b68d2                          var_8c0 = 0x79285c;
004b68da                          CSpellBase::~CSpellBase(&var_89c);
004b68e3                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2);
004b68f4                          return 0;
004b67e4                      }
004b67e4                      
004b67ea                      int32_t var_918_44 = var_8d8;
004b67ed                      class Graphic* eax_61 = ClientMagicSystem::GetSpellComponentIcon(eax_60, edx_21);
004b67ed                      
004b67f6                      if (eax_61 != 0)
004b67f6                      {
004b67fc                          UIRegion::SetBlitMode(eax_57, Blit_3Alpha);
004b6803                          class Graphic* eax_62 = operator new(0xc);
004b680d                          class Graphic* eax_63;
004b680d                          
004b680d                          if (eax_62 == 0)
004b6819                              eax_63 = nullptr;
004b680d                          else
004b6812                              eax_63 = Graphic::Graphic(eax_62, eax_61);
004b6812                          
004b681e                          UIRegion::SetImage(eax_57, eax_63);
004b67f6                      }
004b67f6                      
004b6827                      BaseProperty::~BaseProperty(&var_8f8);
004b6790                  }
004b6790                  
004b683f                  int32_t* __return_1;
004b683f                  AC1Legacy::PStringBase<char>::operator+=(&var_8fc, CSpellBase::InqName(&var_8e4, &__return_1));
004b6844                  int32_t* __return_7 = __return_1;
004b684c                  int32_t eax_66;
004b684c                  char* edx_22;
004b684c                  eax_66 = InterlockedDecrement(&__return_7[1]);
004b684c                  
004b6858                  if ((eax_66 == 0 && __return_7 != 0))
004b6860                      edx_22 = **(uint32_t**)__return_7(1);
004b6860                  
004b6862                  esi_17 = var_8fc;
004b6869                  class SpellComponentTable** var_918_50 = &esi_17->spellComponentTable;
004b686c                  SpellExamineUI::AddItemInfo(ebx_1, edx_22);
004b6772              }
004b6772              
004b6887              int32_t eax_68;
004b6887              eax_68 = InterlockedDecrement(&esi_17->vtable);
004b6887              
004b688f              if ((eax_68 == 0 && esi_17 != 0))
004b6897                  edx_16 = esi_17->vtable->IUnknown_QueryInterface(1);
004b6897              
004b68a2              bool cond:6_1 = ((char*)__return + 1) < eax_38;
004b68a4              __return += 1;
004b68a4              
004b68a8              if (!(cond:6_1))
004b68a8                  break;
004b68a8              
004b6729              __return_8 = __return;
004b6739          }
004b66a4      }
004b66a4      
004b66aa      int32_t var_918_38 = 0;
004b66ae      SpellExamineUI::UpdateComponents(ebx_1, edx_16);
004b66c3      int32_t* var_8c8;
004b66c3      
004b66c3      if ((InterlockedDecrement(&var_8c8[1]) == 0 && var_8c8 != 0))
004b66cb          **(uint32_t**)var_8c8(1);
004b66cb      
004b66dd      int32_t* var_8e0;
004b66dd      
004b66dd      if ((InterlockedDecrement(&var_8e0[1]) == 0 && var_8e0 != 0))
004b66e5          **(uint32_t**)var_8e0(1);
004b66e5      
004b66f0      var_8e4 = 0x79285c;
004b66f4      var_8c0 = 0x79285c;
004b66f8      CSpellBase::~CSpellBase(&var_89c);
004b66fd      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b66fd      
004b670d      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004b670f          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
004b670f      
004b6726      return 1;
004b6210  }

004b68f7                                                                       90 90 90 90 90 90 90 90 90                         .........

004b6900  void __thiscall gmExaminationUI::ExamineSpell(class gmExaminationUI* this, uint32_t const arg2)

004b6900  {
004b6903      uint32_t awaiting_appraisal_ID = this->awaiting_appraisal_ID;
004b6903      
004b690b      if (awaiting_appraisal_ID != 0)
004b690b      {
004b691b      label_4b691b:
004b691b          this->awaiting_appraisal_ID = 0;
004b692c          ClientUISystem::DecrementBusyCount(ClientUISystem::GetUISystem());
004b6933          this->current_appraisal_ID = 0;
004b693d          CM_Item::Event_Appraise(0);
004b690b      }
004b690b      else if (this->current_appraisal_ID != 0)
004b6915      {
004b6919          if (awaiting_appraisal_ID != 0)
004b6919              goto label_4b691b;
004b6919          
004b6933          this->current_appraisal_ID = 0;
004b693d          CM_Item::Event_Appraise(0);
004b6915      }
004b6915      
004b6950      SpellExamineUI::ExamineSpell(this->m_spellUI, arg2);
004b6955      class ExamineSubUI* m_spellUI = this->m_spellUI;
004b6955      
004b6961      if (this->m_activeUI != m_spellUI)
004b6966          gmExaminationUI::SetActiveExamineUI(this, m_spellUI);
004b6966      
004b696b      this->vtable->SetVisible(1);
004b6900  }

004b6978                                                                          90 90 90 90 90 90 90 90                          ........

004b6980  void __thiscall gmExaminationUI::RecvNotice_ExamineSpell(class gmExaminationUI* this, uint32_t arg2)

004b6980  {
004b6986      /* tailcall */
004b6986      return gmExaminationUI::ExamineSpell(((char*)this - 0x5f8), arg2);
004b6980  }

004b698b                                   90 90 90 90 90                                                             .....

004b6990  void __thiscall ItemExamineUI::Appraisal_ShowDescription(class ItemExamineUI* this, class AppraisalProfile const* arg2)

004b6990  {
004b699a      class AppraisalProfile* edi = arg2;
004b69a5      class ItemExamineUI* this_1 = this;
004b69a7      void var_94;
004b69a7      void* __return_2 = &var_94;
004b69b1      class ItemExamineUI* this_2 = this_1;
004b69b5      int32_t var_98 = 0;
004b69b9      int32_t __return_11 = 0;
004b69ca      class PSRefBufferCharData<char>* var_d4;
004b69ca      class PSRefBufferCharData<char>* var_d0;
004b69ca      
004b69ca      if (AppraisalProfile::InqInt(edi, 0x10b, __return_2) != 0)
004b69ca      {
004b69d4          __return_2 = &var_98;
004b69d4          
004b69e0          if (AppraisalProfile::InqInt(edi, 0x62, __return_2) != 0)
004b69e0          {
004b69ea              __return_2 = &__return_11;
004b69ea              
004b69f9              if (AppraisalProfile::InqInt(edi, 0x10c, __return_2) != 0)
004b69f9              {
004b69ff                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004b6a04                  var_d0 = PStringBase<char>::s_NullBuffer_1;
004b6a0b                  __return_2 = &PStringBase<char>::s_NullBuffer_1[-1];
004b6a0c                  InterlockedIncrement(__return_2);
004b6a12                  class PSRefBufferCharData<char>** ecx_3 = &var_d0;
004b6a12                  
004b6a16                  if (__return_11 >= 0)
004b6a16                  {
004b6a27                      __return_2 = "This item expires in ";
004b6a2c                      PStringBase<char>::set(ecx_3, __return_2);
004b6a31                      __return_2 = &data_7928af;
004b6a3a                      PStringBase<char>::PStringBase<char>(&var_d4, __return_2);
004b6a3f                      int32_t __return_9 = __return_11;
004b6a3f                      
004b6a48                      if (__return_9 > 0x1e13380)
004b6a48                      {
004b6a4a                          int32_t eax_4;
004b6a4a                          int32_t edx_1;
004b6a4a                          edx_1 = HIGHD(((int64_t)__return_9));
004b6a4a                          eax_4 = LOWD(((int64_t)__return_9));
004b6a52                          __return_2 = (COMBINE(edx_1, eax_4) / 0x1e13380);
004b6a53                          __return_11 = (COMBINE(edx_1, eax_4) % 0x1e13380);
004b6a61                          PStringBase<char>::sprintf(&var_d4, "%d years, ");
004b6a6d                          __return_2 = &var_d4;
004b6a72                          PStringBase<char>::operator+=(&var_d0, __return_2);
004b6a77                          __return_9 = __return_11;
004b6a48                      }
004b6a48                      
004b6a80                      if (__return_9 > 0x15180)
004b6a80                      {
004b6a82                          int32_t eax_6;
004b6a82                          int32_t edx_3;
004b6a82                          edx_3 = HIGHD(((int64_t)__return_9));
004b6a82                          eax_6 = LOWD(((int64_t)__return_9));
004b6a8a                          __return_2 = (COMBINE(edx_3, eax_6) / 0x15180);
004b6a8b                          __return_11 = (COMBINE(edx_3, eax_6) % 0x15180);
004b6a99                          PStringBase<char>::sprintf(&var_d4, "%d days, ");
004b6aa5                          __return_2 = &var_d4;
004b6aaa                          PStringBase<char>::operator+=(&var_d0, __return_2);
004b6aaf                          __return_9 = __return_11;
004b6a80                      }
004b6a80                      
004b6ab8                      if (__return_9 > 0xe10)
004b6ab8                      {
004b6aba                          int32_t eax_8;
004b6aba                          int32_t edx_5;
004b6aba                          edx_5 = HIGHD(((int64_t)__return_9));
004b6aba                          eax_8 = LOWD(((int64_t)__return_9));
004b6ac2                          __return_2 = (COMBINE(edx_5, eax_8) / 0xe10);
004b6ac3                          __return_11 = (COMBINE(edx_5, eax_8) % 0xe10);
004b6ad1                          PStringBase<char>::sprintf(&var_d4, "%d hours, ");
004b6add                          __return_2 = &var_d4;
004b6ae2                          PStringBase<char>::operator+=(&var_d0, __return_2);
004b6ae7                          __return_9 = __return_11;
004b6ab8                      }
004b6ab8                      
004b6aee                      if (__return_9 > 0x3c)
004b6aee                      {
004b6af0                          int32_t eax_10;
004b6af0                          int32_t edx_7;
004b6af0                          edx_7 = HIGHD(((int64_t)__return_9));
004b6af0                          eax_10 = LOWD(((int64_t)__return_9));
004b6af8                          __return_2 = (COMBINE(edx_7, eax_10) / 0x3c);
004b6af9                          __return_11 = (COMBINE(edx_7, eax_10) % 0x3c);
004b6b07                          PStringBase<char>::sprintf(&var_d4, "%d minutes, ");
004b6b13                          __return_2 = &var_d4;
004b6b18                          PStringBase<char>::operator+=(&var_d0, __return_2);
004b6b1d                          __return_9 = __return_11;
004b6aee                      }
004b6aee                      
004b6b21                      __return_2 = __return_9;
004b6b2c                      PStringBase<char>::sprintf(&var_d4, "%d seconds.");
004b6b31                      class PSRefBufferCharData<char>* ecx_9 = var_d4;
004b6b35                      int32_t eax_12 = ecx_9->m_data[-4];
004b6b35                      
004b6b3e                      if (eax_12 != 1)
004b6b3e                      {
004b6b41                          __return_2 = (eax_12 - 1);
004b6b47                          PStringBase<char>::append_n_chars(&var_d0, ecx_9, __return_2);
004b6b3e                      }
004b6b3e                      
004b6b50                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_d4);
004b6a16                  }
004b6a16                  else
004b6a16                  {
004b6a18                      __return_2 = "This item is in the act of disin…";
004b6a1d                      PStringBase<char>::set(ecx_3, __return_2);
004b6a16                  }
004b6a16                  
004b6b55                  class PSRefBufferCharData<char>* edx_9 = var_d0;
004b6b59                  __return_2 = 1;
004b6b60                  ItemExamineUI::AddItemInfo(this_1, edx_9, 0, __return_2);
004b6b69                  void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &var_d0->m_data[0xffffffec];
004b6b6f                  __return_2 = ((char*)esi_2 + 4);
004b6b6f                  
004b6b7c                  if ((InterlockedDecrement(__return_2) == 0 && esi_2 != 0))
004b6b7c                  {
004b6b7e                      int32_t edx_10 = *(int32_t*)((char*)ADJ(esi_2) + -0x14);
004b6b80                      __return_2 = 1;
004b6b84                      *(uint32_t*)edx_10(__return_2);
004b6b7c                  }
004b69f9              }
004b69e0          }
004b69ca      }
004b69ca      
004b6b86      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b6b8b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004b6b92      __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
004b6b93      InterlockedIncrement(__return_2);
004b6b99      __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b6b99      
004b6ba5      if (AppraisalProfile::InqString(edi, 0x10, __return_2) == 0)
004b6ba5      {
004b709a          __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b709a          
004b70a6          if (AppraisalProfile::InqString(edi, 0xf, __return_2) != 0)
004b70a6          {
004b70ac              __return_2 = 1;
004b70b7              ItemExamineUI::AddItemInfo(this_1, &data_7928af, 0, __return_2);
004b70bc              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_12 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b70c0              __return_2 = 1;
004b70ca              ItemExamineUI::AddItemInfo(this_1, &AC1Legacy::PStringBase<char>::s_NullBuffer_12->m_data, 0, __return_2);
004b70a6          }
004b6ba5      }
004b6ba5      else
004b6ba5      {
004b6bab          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b6bb0          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004b6bb7          __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef;
004b6bb8          InterlockedIncrement(__return_2);
004b6bbe          __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_9;
004b6bbe          
004b6bca          if (AppraisalProfile::InqString(edi, 0x34, __return_2) != 0)
004b6bca          {
004b6bd0              __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_9;
004b6bd5              AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, __return_2);
004b6bca          }
004b6bca          
004b6bde          char var_a4;
004b6bde          __return_2 = &var_a4;
004b6bde          
004b6bed          if (AppraisalProfile::InqInt(edi, 0xac, __return_2) != 0)
004b6bed          {
004b6bf3              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b6bfc              __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef;
004b6bfd              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004b6c01              InterlockedIncrement(__return_2);
004b6c03              class PSRefBufferCharData<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b6c0c              __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data[4];
004b6c0d              var_d0 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004b6c11              InterlockedIncrement(__return_2);
004b6c18              class AppraisalProfile* esi_3 = arg2;
004b6c1f              class AC1Legacy::PSRefBuffer<char>* var_cc;
004b6c1f              uint32_t __return;
004b6c1f              uint32_t __return_1;
004b6c1f              
004b6c1f              if ((var_a4 & 1) != 0)
004b6c1f              {
004b6c25                  __return_2 = &__return_1;
004b6c25                  
004b6c31                  if (AppraisalProfile::InqInt(esi_3, 0x69, __return_2) != 0)
004b6c31                  {
004b6c33                      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b6c38                      var_cc = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004b6c3f                      __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef;
004b6c40                      InterlockedIncrement(__return_2);
004b6c42                      uint32_t __return_4 = __return_1;
004b6c46                      __return_2 = nullptr;
004b6c4e                      AppraisalSystem::InqWorkmanshipAdjective(__return_4, &var_cc, __return_2);
004b6c56                      __return_2 = &data_794098;
004b6c64                      __return_2 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_d4, __return_2);
004b6c73                      __return_2 = AC1Legacy::PStringBase<char>::operator+(&var_cc, &__return, __return_2);
004b6c78                      AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_8, __return_2);
004b6c81                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return);
004b6c8a                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_d4);
004b6c93                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_cc);
004b6c98                      AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
004b6c31                  }
004b6c1f              }
004b6c1f              
004b6ca0              uint32_t var_a8;
004b6ca0              __return_2 = &var_a8;
004b6ca0              
004b6cbb              if ((AppraisalProfile::InqInt(esi_3, 0x83, __return_2) != 0 && var_a8 > 0))
004b6cbb              {
004b6cc1                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004b6cc6                  var_cc = PStringBase<char>::s_NullBuffer_2;
004b6ccd                  __return_2 = &PStringBase<char>::s_NullBuffer_2[-1];
004b6cce                  InterlockedIncrement(__return_2);
004b6cd0                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
004b6cd5                  var_d4 = PStringBase<char>::s_NullBuffer_3;
004b6cdc                  __return_2 = &PStringBase<char>::s_NullBuffer_3[-1];
004b6cdd                  InterlockedIncrement(__return_2);
004b6cdf                  uint32_t eax_29 = var_a8;
004b6ce7                  __return_2 = &var_cc;
004b6ce9                  AppraisalSystem::InqMaterialName(eax_29, __return_2);
004b6cee                  class AC1Legacy::PSRefBuffer<char>* esi_4 = var_cc;
004b6cf5                  __return_2 = &data_794098;
004b6d03                  __return_2 = AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, __return_2);
004b6d12                  __return_2 = AC1Legacy::operator+(&__return_1, esi_4, __return_2);
004b6d17                  AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_8, __return_2);
004b6d20                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return_1);
004b6d29                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return);
004b6d35                  __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_data;
004b6d3a                  PStringBase<char>::set(&var_d4, __return_2);
004b6d3f                  __return_2 = &data_7928af;
004b6d48                  PStringBase<char>::PStringBase<char>(&__return, __return_2);
004b6d51                  __return_2 = &__return;
004b6d5b                  int32_t eax_32 = PStringBase<char>::replace(&var_d4, &var_cc, __return_2);
004b6d66                  void* __return_10 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004b6d66                  
004b6d6d                  if (eax_32 != 0)
004b6d6d                  {
004b6d6f                      __return_2 = __return_10;
004b6d77                      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_2, &PStringBase<char>::whitespace_string);
004b6d84                      PStringBase<char>::trim(&var_d4, 1, 1, __return_2);
004b6d6d                  }
004b6d6d                  
004b6d8d                  __return_2 = var_d4;
004b6d92                  AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, __return_2);
004b6d9b                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_d4);
004b6da4                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_cc);
004b6da9                  AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
004b6dad                  esi_3 = arg2;
004b6cbb              }
004b6cbb              
004b6db9              if ((var_a4 & 4) != 0)
004b6db9              {
004b6dc3                  __return_2 = &__return_1;
004b6dc3                  
004b6dd2                  if (AppraisalProfile::InqInt(esi_3, 0xb1, __return_2) != 0)
004b6dd2                  {
004b6ddc                      __return_2 = &__return;
004b6ddc                      
004b6deb                      if (AppraisalProfile::InqInt(esi_3, 0xb2, __return_2) != 0)
004b6deb                      {
004b6df5                          PStringBase<char>::PStringBase<char>(&var_cc);
004b6df5                          
004b6dff                          if (__return_1 != 1)
004b6dff                          {
004b6e12                              uint32_t __return_5 = __return;
004b6e1a                              __return_2 = &var_cc;
004b6e1c                              AppraisalSystem::InqPluralizedGemName(__return_5, __return_2);
004b6dff                          }
004b6dff                          else
004b6dff                          {
004b6e01                              uint32_t __return_3 = __return;
004b6e09                              __return_2 = &var_cc;
004b6e0b                              AppraisalSystem::InqMaterialName(__return_3, __return_2);
004b6dff                          }
004b6dff                          
004b6e24                          __return_2 = ", set with ";
004b6e2d                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_d4, __return_2);
004b6e36                          __return_2 = &var_d4;
004b6e3b                          AC1Legacy::PStringBase<char>::operator+=(&var_d0, __return_2);
004b6e44                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_d4);
004b6e4d                          __return_2 = __return_1;
004b6e52                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_d4, __return_2);
004b6e5b                          __return_2 = &var_d4;
004b6e60                          AC1Legacy::PStringBase<char>::operator+=(&var_d0, __return_2);
004b6e69                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_d4);
004b6e6e                          __return_2 = &data_794098;
004b6e77                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_d4, __return_2);
004b6e80                          __return_2 = &var_d4;
004b6e85                          AC1Legacy::PStringBase<char>::operator+=(&var_d0, __return_2);
004b6e8e                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_d4);
004b6e97                          __return_2 = var_cc;
004b6e9c                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_d4, __return_2);
004b6ea5                          __return_2 = &var_d4;
004b6eaa                          AC1Legacy::PStringBase<char>::operator+=(&var_d0, __return_2);
004b6eb3                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_d4);
004b6ebc                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_cc);
004b6ec1                          AC1Legacy::PStringBase<char>::s_NullBuffer_4 = var_d0;
004b6deb                      }
004b6dd2                  }
004b6db9              }
004b6db9              
004b6ec9              __return_2 = &var_d0;
004b6ee9              __return_2 = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(&AC1Legacy::PStringBase<char>::s_NullBuffer_8, &__return, &AC1Legacy::PStringBase<char>::s_NullBuffer_7), &__return_1, __return_2);
004b6eee              AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, __return_2);
004b6ef3              uint32_t __return_6 = __return_1;
004b6efa              __return_2 = (__return_6 + 4);
004b6efa              
004b6f07              if ((InterlockedDecrement(__return_2) == 0 && __return_6 != 0))
004b6f07              {
004b6f09                  int32_t edx_15 = *(uint32_t*)__return_6;
004b6f0b                  __return_2 = 1;
004b6f0f                  *(uint32_t*)edx_15(__return_2);
004b6f07              }
004b6f07              
004b6f11              uint32_t __return_7 = __return;
004b6f18              __return_2 = (__return_7 + 4);
004b6f18              
004b6f25              if ((InterlockedDecrement(__return_2) == 0 && __return_7 != 0))
004b6f25              {
004b6f27                  int32_t edx_16 = *(uint32_t*)__return_7;
004b6f29                  __return_2 = 1;
004b6f2d                  *(uint32_t*)edx_16(__return_2);
004b6f25              }
004b6f25              
004b6f38              __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data[4];
004b6f38              
004b6f41              if ((InterlockedDecrement(__return_2) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004b6f41              {
004b6f43                  int32_t edx_17;
004b6f43                  edx_17 = AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data[0];
004b6f43                  *(uint8_t*)((char*)edx_17)[1] = AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data[1];
004b6f43                  *(uint8_t*)((char*)edx_17)[2] = AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data[2];
004b6f43                  *(uint8_t*)((char*)edx_17)[3] = AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data[3];
004b6f46                  __return_2 = 1;
004b6f4a                  *(uint32_t*)edx_17(__return_2);
004b6f41              }
004b6f41              
004b6f4f              __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef;
004b6f4f              
004b6f58              if ((InterlockedDecrement(__return_2) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
004b6f58              {
004b6f5a                  struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable;
004b6f5c                  __return_2 = 1;
004b6f60                  vtable->__vecDelDtor(__return_2);
004b6f58              }
004b6bed          }
004b6bed          
004b6f62          this_1 = this_2;
004b6f66          __return_2 = 1;
004b6f71          ItemExamineUI::AddItemInfo(this_1, &data_7928af, 0, __return_2);
004b6f76          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b6f7a          __return_2 = 1;
004b6f84          ItemExamineUI::AddItemInfo(this_1, &AC1Legacy::PStringBase<char>::s_NullBuffer_10->m_data, 0, __return_2);
004b6f89          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_9;
004b6f92          __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_11->m_cRef;
004b6f92          
004b6f9f          if ((InterlockedDecrement(__return_2) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_11 != 0))
004b6f9f          {
004b6fa1              struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_11->vtable;
004b6fa3              __return_2 = 1;
004b6fa7              vtable_1->__vecDelDtor(__return_2);
004b6f9f          }
004b6f9f          
004b6fa9          edi = arg2;
004b6ba5      }
004b6ba5      
004b6fb4      int32_t var_b4;
004b6fb4      __return_2 = &var_b4;
004b6fb9      var_b4 = 0;
004b6fb9      
004b6fc8      if (AppraisalProfile::InqInt(edi, 0x6f, __return_2) != 0)
004b6fc8      {
004b6fce          class PSRefBufferCharData<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b6fd7          __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data[4];
004b6fd8          var_d4 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004b6fdc          InterlockedIncrement(__return_2);
004b6fdc          
004b6fe3          if ((var_b4 & 2) != 0)
004b6fe3          {
004b6fe5              __return_2 = "Player Killers may not use this …";
004b6ff3              void* eax_50 = *(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&this_2, __return_2);
004b6ff5              int32_t ecx_71 = *(uint32_t*)((char*)eax_50 + 8);
004b6ff5              
004b7003              if ((ecx_71 != 1 && eax_50 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b7003              {
004b7006                  __return_2 = (ecx_71 - 1);
004b700f                  AC1Legacy::PStringBase<char>::append_n_chars(&var_d4, ((char*)eax_50 + 0x14), __return_2);
004b7014                  AC1Legacy::PStringBase<char>::s_NullBuffer_6 = var_d4;
004b7003              }
004b7003              
004b7018              class ItemExamineUI* this_3 = this_2;
004b701f              __return_2 = &this_3->cur_objid;
004b701f              
004b702c              if ((InterlockedDecrement(__return_2) == 0 && this_3 != 0))
004b702c              {
004b702e                  struct ExamineSubUI::VTable* vtable_2 = this_3->vtable;
004b7030                  __return_2 = 1;
004b7034                  vtable_2->Init(__return_2);
004b702c              }
004b6fe3          }
004b6fe3          
004b703b          if ((var_b4 & 4) != 0)
004b703b          {
004b7041              __return_2 = "Lite Player Killers may not use …";
004b704f              void* eax_54 = *(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&this_2, __return_2);
004b7051              int32_t ecx_77 = *(uint32_t*)((char*)eax_54 + 8);
004b7051              
004b705f              if ((ecx_77 != 1 && eax_54 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b705f              {
004b7062                  __return_2 = (ecx_77 - 1);
004b706b                  AC1Legacy::PStringBase<char>::append_n_chars(&var_d4, ((char*)eax_54 + 0x14), __return_2);
004b7070                  AC1Legacy::PStringBase<char>::s_NullBuffer_6 = var_d4;
004b705f              }
004b705f              
004b7074              class ItemExamineUI* this_4 = this_2;
004b7081              __return_2 = &this_4->cur_objid;
004b7081              
004b708a              if ((InterlockedDecrement(__return_2) == 0 && this_4 != 0))
004b708a              {
004b708c                  struct ExamineSubUI::VTable* vtable_3 = this_4->vtable;
004b708e                  __return_2 = 1;
004b7092                  vtable_3->Init(__return_2);
004b708a              }
004b703b          }
004b703b          
004b70df          if ((var_b4 & 8) != 0)
004b70df          {
004b70e1              __return_2 = "Non-Player Killers may not use t…";
004b70ef              void* eax_60 = *(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&this_2, __return_2);
004b70f1              int32_t ecx_86 = *(uint32_t*)((char*)eax_60 + 8);
004b70f1              
004b70ff              if ((ecx_86 != 1 && eax_60 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b70ff              {
004b7102                  __return_2 = (ecx_86 - 1);
004b710b                  AC1Legacy::PStringBase<char>::append_n_chars(&var_d4, ((char*)eax_60 + 0x14), __return_2);
004b7110                  AC1Legacy::PStringBase<char>::s_NullBuffer_6 = var_d4;
004b70ff              }
004b70ff              
004b7114              class ItemExamineUI* this_5 = this_2;
004b711b              __return_2 = &this_5->cur_objid;
004b711b              
004b7124              if ((InterlockedDecrement(__return_2) == 0 && this_5 != 0))
004b7124              {
004b7126                  struct ExamineSubUI::VTable* vtable_4 = this_5->vtable;
004b7128                  __return_2 = 1;
004b712c                  vtable_4->Init(__return_2);
004b7124              }
004b70df          }
004b70df          
004b7133          if ((var_b4 & 0x20) != 0)
004b7133          {
004b7135              __return_2 = "This portal cannot be recalled n…";
004b7143              void* eax_65 = *(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&this_2, __return_2);
004b7145              int32_t ecx_91 = *(uint32_t*)((char*)eax_65 + 8);
004b7145              
004b7153              if ((ecx_91 != 1 && eax_65 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b7153              {
004b7156                  __return_2 = (ecx_91 - 1);
004b715f                  AC1Legacy::PStringBase<char>::append_n_chars(&var_d4, ((char*)eax_65 + 0x14), __return_2);
004b7164                  AC1Legacy::PStringBase<char>::s_NullBuffer_6 = var_d4;
004b7153              }
004b7153              
004b7168              class ItemExamineUI* this_6 = this_2;
004b716f              __return_2 = &this_6->cur_objid;
004b716f              
004b7178              if ((InterlockedDecrement(__return_2) == 0 && this_6 != 0))
004b7178              {
004b717a                  struct ExamineSubUI::VTable* vtable_5 = this_6->vtable;
004b717c                  __return_2 = 1;
004b7180                  vtable_5->Init(__return_2);
004b7178              }
004b7133          }
004b7133          
004b7187          if ((var_b4 & 0x10) != 0)
004b7187          {
004b7189              __return_2 = "This portal cannot be summoned.\n";
004b7197              void* eax_70 = *(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&this_2, __return_2);
004b7199              int32_t ecx_96 = *(uint32_t*)((char*)eax_70 + 8);
004b7199              
004b71a7              if ((ecx_96 != 1 && eax_70 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004b71a7              {
004b71aa                  __return_2 = (ecx_96 - 1);
004b71b3                  AC1Legacy::PStringBase<char>::append_n_chars(&var_d4, ((char*)eax_70 + 0x14), __return_2);
004b71b8                  AC1Legacy::PStringBase<char>::s_NullBuffer_6 = var_d4;
004b71a7              }
004b71a7              
004b71bc              class ItemExamineUI* this_7 = this_2;
004b71c3              __return_2 = &this_7->cur_objid;
004b71c3              
004b71cc              if ((InterlockedDecrement(__return_2) == 0 && this_7 != 0))
004b71cc              {
004b71ce                  struct ExamineSubUI::VTable* vtable_6 = this_7->vtable;
004b71d0                  __return_2 = 1;
004b71d4                  vtable_6->Init(__return_2);
004b71cc              }
004b7187          }
004b7187          
004b71d6          __return_2 = 1;
004b71e1          ItemExamineUI::AddItemInfo(this_1, &data_7928af, 0, __return_2);
004b71e6          __return_2 = 1;
004b71f0          ItemExamineUI::AddItemInfo(this_1, &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data[0x14], 0, __return_2);
004b71f8          __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data[4];
004b71f8          
004b7201          if ((InterlockedDecrement(__return_2) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0))
004b7201          {
004b7203              int32_t edx_18;
004b7203              edx_18 = AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data[0];
004b7203              *(uint8_t*)((char*)edx_18)[1] = AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data[1];
004b7203              *(uint8_t*)((char*)edx_18)[2] = AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data[2];
004b7203              *(uint8_t*)((char*)edx_18)[3] = AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data[3];
004b7205              __return_2 = 1;
004b7209              *(uint32_t*)edx_18(__return_2);
004b7201          }
004b6fc8      }
004b6fc8      
004b721c      int32_t var_a0 = 0;
004b7220      void* __return_8 = nullptr;
004b7228      __return_2 = &var_a0;
004b7228      
004b7232      if (AppraisalProfile::InqInt64(arg2, 3, __return_2) != 0)
004b7232      {
004b7238          void var_90;
004b7238          StringInfo::StringInfo(&var_90);
004b7243          __return_2 = 0x10000001;
004b724d          StringInfo::SetStringIDandTableEnum(&var_90, 0, __return_2);
004b7256          int32_t eax_77 = var_a0;
004b7260          __return_2 = __return_8;
004b7267          StringInfo::AddVariable_Int(&var_90, 0, eax_77);
004b726c          class UIElement_Text* m_itemDisplayText = this_1->m_itemDisplayText;
004b7276          __return_2 = &var_90;
004b7277          UIElement_Text::AppendStringInfo(m_itemDisplayText, __return_2);
004b7280          StringInfo::~StringInfo(&var_90);
004b7232      }
004b7232      
004b7285      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_13 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004b728c      __return_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_13->m_cRef;
004b728c      
004b7295      if ((InterlockedDecrement(__return_2) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_13 != 0))
004b7295      {
004b7297          struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_13->vtable;
004b7299          __return_2 = 1;
004b729d          vtable_7->__vecDelDtor(__return_2);
004b7295      }
004b6990  }

004b72ac                                      90 90 90 90                                                              ....

004b72b0  void __thiscall ItemExamineUI::SetAppraiseInfo(class ItemExamineUI* this, class AppraisalProfile const* arg2, int32_t arg3)

004b72b0  {
004b72ba      int32_t ebx = 0;
004b72ba      
004b72be      if (this->cur_weenobj != 0)
004b72be      {
004b72c4          class UIElement* m_itemIcon = this->m_itemIcon;
004b72cd          int32_t var_4_1 = 0;
004b72d1          int32_t var_8_1 = 0;
004b72d1          
004b72d5          if (m_itemIcon != 0)
004b72d5          {
004b72d7              UIRegion::ClearImage(m_itemIcon);
004b72e4              UIRegion::SetBlitMode(this->m_itemIcon, Blit_3Alpha);
004b72eb              void* eax_1 = operator new(0xc);
004b72f7              class Graphic* eax_3;
004b72f7              
004b72f7              if (eax_1 == 0)
004b730b                  eax_3 = nullptr;
004b72f7              else
004b7304                  eax_3 = Graphic::Graphic(eax_1, ACCWeenieObject::GetIcon(this->cur_weenobj));
004b7304              
004b7314              UIRegion::SetImage(this->m_itemIcon, eax_3);
004b72d5          }
004b72d5          
004b731c          class AppraisalProfile* edi_2 = arg2;
004b731c          
004b7320          if (this->m_itemValueText == 0)
004b732c              var_8_1 = 1;
004b7320          else
004b7325              ItemExamineUI::SetValueText(this, edi_2);
004b7325          
004b7337          if (this->m_itemBurdenText == 0)
004b7343              var_4_1 = 1;
004b7337          else
004b733c              ItemExamineUI::SetBurdenText(this, edi_2);
004b733c          
004b734b          class UIElement_Text* m_itemDisplayText = this->m_itemDisplayText;
004b734b          
004b7353          if (m_itemDisplayText != 0)
004b7355              UIElement_Text::ClearAllText(m_itemDisplayText);
004b7355          
004b735a          class ACCWeenieObject* cur_weenobj = this->cur_weenobj;
004b7360          uint32_t _valid_locations = cur_weenobj->pwd._valid_locations;
004b7366          int32_t eax_5;
004b7366          class AppraisalProfile* edx_1;
004b7366          eax_5 = cur_weenobj->vtable->IsHook();
004b7366          
004b736b          if (eax_5 != 0)
004b7374              _valid_locations = AppraisalProfile::GetHookedItemValidLocations(edi_2);
004b7374          
004b7376          class AppraisalProfile* var_1c_1 = edi_2;
004b7379          class AppraisalProfile* edx_2 = ItemExamineUI::SetInscription(this, edx_1);
004b7379          
004b7384          if (var_8_1 != 0)
004b7384          {
004b7386              class AppraisalProfile* var_1c_2 = edi_2;
004b7389              edx_2 = ItemExamineUI::Appraisal_ShowValueInfo(this, edx_2);
004b7384          }
004b7384          
004b7394          if (var_4_1 != 0)
004b7394          {
004b7396              class AppraisalProfile* var_1c_3 = edi_2;
004b7399              ItemExamineUI::Appraisal_ShowBurdenInfo(this, edx_2);
004b7394          }
004b7394          
004b73a1          ItemExamineUI::Appraisal_ShowTinkeringInfo(this, edi_2);
004b73a1          
004b73b0          if (ItemExamineUI::Appraisal_ShowSet(this, edi_2) != 0)
004b73b2              ebx = 1;
004b73b2          
004b73c5          if ((ItemExamineUI::Appraisal_ShowRatings(this, edi_2) != 0 || ebx != 0))
004b73d2              ItemExamineUI::AddItemInfo(this, &data_7928af, 0, 1);
004b73d2          
004b73db          ItemExamineUI::Appraisal_ShowWeaponAndArmorData(this, _valid_locations, edi_2);
004b73e3          ItemExamineUI::Appraisal_ShowDefenseModData(this, edi_2);
004b73eb          ItemExamineUI::Appraisal_ShowArmorMods(this, edi_2);
004b73f3          ItemExamineUI::Appraisal_ShowShortMagicInfo(this, edi_2);
004b73fb          ItemExamineUI::Appraisal_ShowSpecialProperties(this, edi_2);
004b7404          ItemExamineUI::Appraisal_ShowUsage(this, _valid_locations, edi_2);
004b740c          ItemExamineUI::Appraisal_ShowLevelLimitInfo(this, edi_2);
004b7414          ItemExamineUI::Appraisal_ShowWieldRequirements(this, edi_2);
004b741c          ItemExamineUI::Appraisal_ShowUsageLimitInfo(this, edi_2);
004b7424          ItemExamineUI::Appraisal_ShowItemLevelInfo(this, edi_2);
004b742c          ItemExamineUI::Appraisal_ShowActivationRequirements(this, edi_2);
004b7434          ItemExamineUI::Appraisal_ShowCasterData(this, edi_2);
004b743c          ItemExamineUI::Appraisal_ShowBoostValue(this, edi_2);
004b7444          ItemExamineUI::Appraisal_ShowHealKitValues(this, edi_2);
004b744c          ItemExamineUI::Appraisal_ShowCapacity(this, edi_2);
004b7454          ItemExamineUI::Appraisal_ShowLockAppraiseInfo(this, edi_2);
004b745c          ItemExamineUI::Appraisal_ShowManaStoneInfo(this, edi_2);
004b7464          ItemExamineUI::Appraisal_ShowRemainingUses(this, edi_2);
004b746c          ItemExamineUI::Appraisal_ShowCraftsman(this, edi_2);
004b747a          arg2 = nullptr;
004b747a          
004b7492          if ((AppraisalProfile::InqBool(edi_2, 0x45, &arg2) != 0 && arg2 == 0))
004b749f              ItemExamineUI::AddItemInfo(this, "This item cannot be sold.", 0, 1);
004b749f          
004b74a7          ItemExamineUI::Appraisal_ShowRareInfo(this, edi_2);
004b74af          ItemExamineUI::Appraisal_ShowMagicInfo(this, edi_2);
004b74b7          int32_t edx_3 = ItemExamineUI::Appraisal_ShowDescription(this, edi_2);
004b74b7          
004b74c2          if (arg3 != 0)
004b74c2          {
004b74ca              int32_t __saved_ebp_8 = 0;
004b74cc              UIElement_Text::ScrollToPosition(this->m_itemDisplayText, edx_3);
004b74c2          }
004b74c2          
004b74d5          AppraisalProfile::operator=(&this->cur_prof, edi_2);
004b72be      }
004b72b0  }

004b74e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004b74f0  class Enchantment& __thiscall Enchantment::operator=(class Enchantment* this, class Enchantment const& arg2)

004b74f0  {
004b74f9      this->_id = arg2->_id;
004b74ff      this->m_SpellSetID = arg2->m_SpellSetID;
004b7505      this->_spell_category = arg2->_spell_category;
004b750b      this->_power_level = arg2->_power_level;
004b7511      this->_start_time = arg2->_start_time;
004b7517      *(uint32_t*)((char*)this->_start_time)[4] = *(uint32_t*)((char*)arg2->_start_time)[4];
004b751d      this->_duration = arg2->_duration;
004b7523      *(uint32_t*)((char*)this->_duration)[4] = *(uint32_t*)((char*)arg2->_duration)[4];
004b7529      this->_caster = arg2->_caster;
004b752f      this->_degrade_modifier = arg2->_degrade_modifier;
004b7535      this->_degrade_limit = arg2->_degrade_limit;
004b753b      this->_last_time_degraded = arg2->_last_time_degraded;
004b7541      *(uint32_t*)((char*)this->_last_time_degraded)[4] = *(uint32_t*)((char*)arg2->_last_time_degraded)[4];
004b7547      this->_smod.type = arg2->_smod.type;
004b754d      this->_smod.key = arg2->_smod.key;
004b7553      this->_smod.val = arg2->_smod.val;
004b7556      return this;
004b74f0  }

004b7559                                                                             90 90 90 90 90 90 90                           .......

004b7560  void __fastcall gmEffectsUI::PostInit(class gmEffectsUI* this)

004b7560  {
004b7567      UIElement::PostInit(this);
004b756c      struct gmEffectsUI::VTable* vtable = this->vtable;
004b757a      int32_t* var_8 = nullptr;
004b7582      int32_t* var_4 = nullptr;
004b758a      vtable->InqProperty(0x1000000c, &var_8);
004b758a      
004b7596      if (var_4 != 0)
004b75a1          *(uint32_t*)(*(uint32_t*)var_4 + 0xa8)(&this->m_effectsUIType);
004b75a1      
004b75ae      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x10000126);
004b75b5      class UIElement_Text* eax_2;
004b75b5      
004b75b5      if (eax_1 == 0)
004b75c5          eax_2 = nullptr;
004b75b5      else
004b75bd          eax_2 = eax_1->vtable->DynamicCast(0xc);
004b75bd      
004b75ce      this->m_pInfoText = eax_2;
004b75d4      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x10000123);
004b75db      class UIElement_ListBox* eax_4;
004b75db      
004b75db      if (eax_3 == 0)
004b75eb          eax_4 = nullptr;
004b75db      else
004b75e3          eax_4 = eax_3->vtable->DynamicCast(5);
004b75e3      
004b75ed      this->m_pListBox = eax_4;
004b75f3      class GlobalEventHandler* eax_5 = GlobalEventHandler::GetGlobalEventHandler();
004b75fa      eax_5->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004b760d      eax_5->vtable->RegisterNoticeHandler(0x4dd201, &this->vtable);
004b761a      int32_t* eax_7 = var_8;
004b761a      
004b7620      if (eax_7 != 0)
004b7620      {
004b762a          int32_t esi_2 = (eax_7[1] - 1);
004b7627          eax_7[1] = esi_2;
004b7627          
004b7631          if (esi_2 == 0)
004b7637              **(uint32_t**)eax_7(1);
004b7637          
004b7639          var_8 = nullptr;
004b7620      }
004b7620      
004b7647      if (var_4 != 0)
004b7647      {
004b7651          int32_t esi_4 = (var_4[1] - 1);
004b764e          var_4[1] = esi_4;
004b764e          
004b7658          if (esi_4 == 0)
004b765e              **(uint32_t**)var_4(1);
004b7647      }
004b7560  }

004b7666                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004b7670  uint8_t __thiscall gmEffectsUI::UpdateDurations(class gmEffectsUI* this, class CACQualities const* arg2)

004b7670  {
004b767a      int32_t i = 0;
004b767a      
004b767e      if (this->m_rgTokens.m_num > 0)
004b767e      {
004b769d          do
004b769d          {
004b7691              *(int32_t*)((char*)this->m_rgTokens.m_data[i]->vtable + 0x20)(arg2);
004b769a              i += 1;
004b769d          } while (i < this->m_rgTokens.m_num);
004b767e      }
004b767e      
004b76a6      uint32_t eax;
004b76a6      eax = 1;
004b76ae      this->m_nextDurationUpdate = ((double)(((long double)Timer::cur_time) + ((long double)1.0)));
004b76b6      return 1;
004b7670  }

004b76b9                                                                             90 90 90 90 90 90 90                           .......

004b76c0  uint8_t __thiscall gmEffectsUI::SpellEffectMatchesUIType(class gmEffectsUI* this, uint32_t arg2)

004b76c0  {
004b76ca      class ClientMagicSystem* eax = ClientMagicSystem::GetMagicSystem();
004b76ca      
004b76d3      if (eax != 0)
004b76d3      {
004b76d9          void var_90;
004b76d9          CSpellBase::CSpellBase(&var_90);
004b76d9          
004b76f4          if (ClientMagicSystem::InqSpellBase(eax, arg2, &var_90) != 0)
004b76f4          {
004b76f6              uint32_t m_effectsUIType = this->m_effectsUIType;
004b7708              char var_78;
004b7708              
004b7708              if ((m_effectsUIType == 1 && (var_78 & 4) != 0))
004b7708              {
004b7718              label_4b7718:
004b7718                  CSpellBase::~CSpellBase(&var_90);
004b771e                  int32_t eax_2;
004b771e                  eax_2 = 1;
004b7727                  return 1;
004b7708              }
004b7708              
004b7712              if ((m_effectsUIType == 2 && (var_78 & 4) == 0))
004b7712                  goto label_4b7718;
004b76f4          }
004b76f4          
004b772e          CSpellBase::~CSpellBase(&var_90);
004b76d3      }
004b76d3      
004b7734      eax = 0;
004b773d      return 0;
004b76c0  }


004b7740  uint32_t __thiscall PackableList<Enchantment>::Pack(class PackableList<Enchantment>* this, void** arg2, uint32_t arg3)

004b7740  {
004b7745      uint32_t result = PackableList<Enchantment>::pack_size(this);
004b7745      
004b7752      if (arg3 >= result)
004b7752      {
004b775c          if (arg3 >= 4)
004b775c          {
004b7763              **(uint32_t**)arg2 = this->curNum;
004b7765              *(uint32_t*)arg2 += 4;
004b775c          }
004b775c          
004b776d          for (class PackableLLNode<Enchantment>* i = this->head; i != 0; i = i->next)
004b7770              i->data.vtable->Pack(arg2, arg3);
004b7752      }
004b7752      
004b7786      return result;
004b7740  }

004b7789                             90 90 90 90 90 90 90                                                           .......

004b7790  uint32_t __fastcall PackableList<Enchantment>::pack_size(class PackableList<Enchantment>* this)

004b7790  {
004b7790      class PackableList<Enchantment>* this_1 = this;
004b7792      class PackableLLNode<Enchantment>* i = this->head;
004b7798      int32_t result = 4;
004b779d      this_1 = nullptr;
004b779d      
004b77a5      while (i != 0)
004b77a5      {
004b77b2          int32_t eax_2 = i->data.vtable->Pack(&this_1, 0);
004b77b5          i = i->next;
004b77b8          result += eax_2;
004b77a5      }
004b77a5      
004b77c3      return result;
004b7790  }

004b77c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004b77d0  void __thiscall gmEffectsUI::gmEffectsUI(class gmEffectsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004b77d0  {
004b77df      UIElement_Field::UIElement_Field(this, arg2, arg3);
004b77e4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004b77f0      this->m_pInfoText = nullptr;
004b77f6      this->m_pListBox = nullptr;
004b77fc      this->vtable = 0x7b1880;
004b7802      this->vtable = &gmEffectsUI::`vftable';
004b780c      this->m_rgTokens.m_data = 0;
004b7812      this->m_rgTokens.m_sizeAndDeallocate = 0;
004b7818      this->m_rgTokens.m_num = 0;
004b781e      this->m_effectsUIType = 0;
004b7824      this->m_nextDurationUpdate = 0f;
004b782a      *(uint32_t*)((char*)this->m_nextDurationUpdate)[4] = 0;
004b7830      this->m_SelectedSpell = 0;
004b7836      this->m_bNeedToRebuild = 1;
004b77d0  }

004b7843           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004b7850  class UIElement* __thiscall gmEffectsUI::DynamicCast(class gmEffectsUI* this, uint32_t arg2) __pure

004b7850  {
004b785c      if (arg2 == 0x1000001b)
004b7869          return this;
004b7869      
004b7863      int32_t edx_1;
004b7863      edx_1 = arg2 != 3;
004b7867      return (this & (edx_1 - 1));
004b7850  }

004b786c                                      90 90 90 90                                                              ....

004b7870  class UIElement* gmEffectsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004b7870  {
004b7875      void* eax = operator new(0x628);
004b7875      
004b787f      if (eax == 0)
004b7895          return 0;
004b7895      
004b7892      return gmEffectsUI::gmEffectsUI(eax, arg1, arg2);
004b7870  }

004b7896                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004b78a0  void gmEffectsUI::Register()

004b78a0  {
004b78aa      UIElement::RegisterElementClass(0x1000001b, gmEffectsUI::Create);
004b78a0  }

004b78b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004b78c0  uint32_t __thiscall gmEffectsUI::GetSortedInsertionPlace(class gmEffectsUI* this, class CSpellBase* arg2)

004b78c0  {
004b78c9      class gmEffectsUI* this_1 = this;
004b78cc      class gmEffectsUI* this_2 = this_1;
004b78d0      class ClientMagicSystem* eax = ClientMagicSystem::GetMagicSystem();
004b78db      void var_90;
004b78db      CSpellBase::CSpellBase(&var_90);
004b78e6      uint32_t m_num = this_1->m_pListBox->m_listItems.m_num;
004b78f2      uint32_t eax_2 = 0;
004b78f6      uint32_t m_num_1 = m_num;
004b78fa      uint32_t var_a8 = 0;
004b78fa      
004b78fe      if (m_num > 0)
004b78fe      {
004b790b          while (true)
004b790b          {
004b790b              class UIElement* eax_3 = UIElement_ListBox::GetItem(this_1->m_pListBox, eax_2);
004b7912              int32_t var_9c;
004b7912              
004b7912              if ((eax_3 != 0 && UIElement::GetAttribute_Int(eax_3, 0x1000003a, &var_9c) != 0))
004b7912              {
004b7931                  int32_t eax_5 = var_9c;
004b7931                  
004b793b                  if (eax_5 < this_1->m_rgTokens.m_num)
004b793b                  {
004b7947                      void* eax_6 = this_1->m_rgTokens.m_data[eax_5];
004b7947                      
004b794c                      if (eax_6 != 0)
004b794c                      {
004b7952                          uint32_t edi = *(uint32_t*)((char*)eax_6 + 0x14);
004b7952                          
004b7964                          if (ClientMagicSystem::InqSpellBase(eax, edi, &var_90) != 0)
004b7964                          {
004b7991                              class PStringBase<char> var_b0;
004b7991                              class AC1Legacy::PStringBase<char> __return;
004b7991                              PStringBase<char>::PStringBase<char>(&var_b0, &ClientMagicSystem::GetSpellName(eax, &__return, arg2->_meta_spell._spell->_spell_id)->m_buffer->m_data);
004b7996                              class AC1Legacy::PStringBase<char> __return_2 = __return;
004b7996                              
004b79a8                              if ((InterlockedDecrement((__return_2 + 4)) == 0 && __return_2 != 0))
004b79b0                                  **(uint32_t**)__return_2(1);
004b79b0                              
004b79c9                              class PStringBase<char> var_ac;
004b79c9                              class AC1Legacy::PStringBase<char> __return_1;
004b79c9                              PStringBase<char>::PStringBase<char>(&var_ac, &ClientMagicSystem::GetSpellName(eax, &__return_1, edi)->m_buffer->m_data);
004b79ce                              class AC1Legacy::PStringBase<char> __return_3 = __return_1;
004b79ce                              
004b79e0                              if ((InterlockedDecrement((__return_3 + 4)) == 0 && __return_3 != 0))
004b79e8                                  **(uint32_t**)__return_3(1);
004b79e8                              
004b79ea                              class PStringBase<char> esi_2 = var_ac;
004b79ee                              class PStringBase<char> eax_15 = var_b0;
004b79f2                              int32_t eax_17;
004b79f2                              
004b79f2                              while (true)
004b79f2                              {
004b79f2                                  char edx_4 = *(uint8_t*)eax_15;
004b79f6                                  char temp1_1 = *(uint8_t*)esi_2;
004b79f6                                  bool c_1 = edx_4 < temp1_1;
004b79f6                                  
004b79f8                                  if (edx_4 == temp1_1)
004b79f8                                  {
004b79fc                                      if (edx_4 == 0)
004b79fc                                      {
004b7a12                                          eax_17 = 0;
004b7a14                                          break;
004b79fc                                      }
004b79fc                                      
004b79fe                                      edx_4 = *(uint8_t*)(eax_15 + 1);
004b7a03                                      char temp4_1 = *(uint8_t*)(esi_2 + 1);
004b7a03                                      c_1 = edx_4 < temp4_1;
004b7a03                                      
004b7a06                                      if (edx_4 == temp4_1)
004b7a06                                      {
004b7a08                                          eax_15 += 2;
004b7a0b                                          esi_2 += 2;
004b7a0b                                          
004b7a10                                          if (edx_4 != 0)
004b7a10                                              continue;
004b7a10                                          
004b7a12                                          eax_17 = 0;
004b7a14                                          break;
004b7a06                                      }
004b79f8                                  }
004b79f8                                  
004b7a16                                  bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004b7a18                                  eax_17 = ((eax_15 - eax_15) + 1);
004b7a18                                  break;
004b79f2                              }
004b79f2                              
004b7a1d                              class PStringBase<char>* ecx_16 = &var_ac;
004b7a1d                              
004b7a21                              if (eax_17 <= 0)
004b7a21                              {
004b7aa5                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_16);
004b7aae                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b0);
004b7ab7                                  CSpellBase::~CSpellBase(&var_90);
004b7aca                                  return var_a8;
004b7a21                              }
004b7a21                              
004b7a27                              PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_16);
004b7a30                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b0);
004b7a35                              this_1 = this_2;
004b7964                          }
004b794c                      }
004b793b                  }
004b7912              }
004b7912              
004b7a3d              m_num = m_num_1;
004b7a41              eax_2 = (var_a8 + 1);
004b7a44              var_a8 = eax_2;
004b7a44              
004b7a48              if (eax_2 >= m_num)
004b7a48                  break;
004b790b          }
004b78fe      }
004b78fe      
004b7a55      void var_c;
004b7a55      MetaSpell::~MetaSpell(&var_c);
004b7a62      int32_t var_54 = 0x79285c;
004b7a72      int32_t* var_88;
004b7a72      
004b7a72      if ((InterlockedDecrement(&var_88[1]) == 0 && var_88 != 0))
004b7a7a          **(uint32_t**)var_88(1);
004b7a7a      
004b7a8c      int32_t* var_8c;
004b7a8c      
004b7a8c      if ((InterlockedDecrement(&var_8c[1]) == 0 && var_8c != 0))
004b7a94          **(uint32_t**)var_8c(1);
004b7a94      
004b7aa2      return m_num;
004b78c0  }

004b7acd                                         90 90 90                                                               ...

004b7ad0  void __fastcall PackableList<Enchantment>::Flush(class PackableList<Enchantment>* this)

004b7ad0  {
004b7ae1      void var_58;
004b7ae1      Enchantment::Enchantment(&var_58);
004b7ae1      
004b7aed      while (this->head != 0)
004b7aed      {
004b7af3          int32_t* head = this->head;
004b7af3          
004b7af8          if (head != 0)
004b7af8          {
004b7afe              class PackableLLNode<Enchantment>* ecx_1 = head[0x14];
004b7b03              this->head = ecx_1;
004b7b03              
004b7b06              if (ecx_1 == 0)
004b7b0d                  this->tail = nullptr;
004b7b06              else
004b7b08                  ecx_1->prev = nullptr;
004b7b08              
004b7b13              int32_t var_54_1 = head[1];
004b7b1a              int32_t var_50_1 = head[2];
004b7b21              int32_t var_4c_1 = head[3];
004b7b28              int32_t var_48_1 = head[4];
004b7b32              int32_t var_40_1 = head[6];
004b7b36              int32_t var_3c_1 = head[7];
004b7b40              int32_t var_38_1 = head[8];
004b7b44              int32_t var_34_1 = head[9];
004b7b4b              int32_t var_30_1 = head[0xa];
004b7b52              int32_t var_2c_1 = head[0xb];
004b7b59              int32_t var_28_1 = head[0xc];
004b7b63              int32_t var_20_1 = head[0xe];
004b7b67              int32_t var_1c_1 = head[0xf];
004b7b6e              int32_t var_14_1 = head[0x11];
004b7b75              int32_t var_10_1 = head[0x12];
004b7b7c              int32_t var_c_1 = head[0x13];
004b7b81              head[0x10] = 0x79285c;
004b7b88              *(uint32_t*)head = 0x79285c;
004b7b8e              operator delete(head);
004b7b9a              this->curNum -= 1;
004b7af8          }
004b7aed      }
004b7ad0  }

004b7bac                                      90 90 90 90                                                              ....

004b7bb0  uint8_t __fastcall gmEffectsUI::UpdateDurations(class gmEffectsUI* this)

004b7bb0  {
004b7bbb      struct Turbine_GUID* var_14;
004b7bbb      int32_t* var_28 = &var_14;
004b7bc2      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004b7bca      var_14 = nullptr;
004b7bd5      class TResult __return;
004b7bd5      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004b7bda      struct Turbine_GUID* ecx_1 = var_14;
004b7be3      var_2c = ecx_1;
004b7be5      int32_t var_28_1 = 0;
004b7be8      struct Turbine_GUID* eax_1 = var_2c;
004b7bee      int32_t var_8 = 0;
004b7bf2      int32_t var_4 = 0;
004b7bf2      
004b7bf6      if (eax_1 != 0)
004b7bfc          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004b7bfc      
004b7c08      struct Turbine_GUID** esp = &var_2c;
004b7c0f      void var_c;
004b7c0f      int32_t ebx = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004b7c0f      
004b7c11      if (ecx_1 != 0)
004b7c17          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004b7c17      
004b7c1a      class TResult __return_1 = __return;
004b7c1a      
004b7c20      if (__return_1 != 0)
004b7c20      {
004b7c24          if (ebx >= 0)
004b7c24          {
004b7c43              ebx = gmEffectsUI::UpdateDurations(this, __return_1);
004b7c45              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004b7c51              return ebx;
004b7c24          }
004b7c24          
004b7c2a          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004b7c2a          struct Turbine_GUID* __saved_edi;
004b7c2a          esp = &__saved_edi;
004b7c20      }
004b7c20      
004b7c2d      class TResult eax_2;
004b7c2d      eax_2.m_val = 0;
004b7c2f      *(uint32_t*)esp;
004b7c2f      esp[1];
004b7c2f      esp[2];
004b7c2f      esp[3];
004b7c36      return 0;
004b7bb0  }

004b7c52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004b7c60  uint8_t __fastcall gmEffectsUI::FlushList(class gmEffectsUI* this)

004b7c60  {
004b7c60      class gmEffectsUI* this_1 = this;
004b7c6c      UIElement_ListBox::Flush(this->m_pListBox);
004b7c71      class gmEffectsUI* this_2 = this;
004b7c7b      int32_t i = 0;
004b7c7b      
004b7c7f      if (this_2->m_rgTokens.m_num > 0)
004b7c7f      {
004b7cb3          do
004b7cb3          {
004b7c87              int32_t* ecx_3 = this_2->m_rgTokens.m_data[i];
004b7c87              
004b7c8c              if (ecx_3 != 0)
004b7c8c              {
004b7c92                  *(uint32_t*)(*(uint32_t*)ecx_3 + 8)(1);
004b7c95                  this_2 = this;
004b7c8c              }
004b7c8c              
004b7c99              this_2->m_rgTokens.m_data[i] = 0;
004b7ca6              this_2 = this;
004b7cb0              i += 1;
004b7cb3          } while (i < this_2->m_rgTokens.m_num);
004b7c7f      }
004b7c7f      
004b7cc0      int32_t i_1 = 0;
004b7cc0      
004b7cc5      if (this_2->m_rgTokens.m_num > 0)
004b7cc5      {
004b7cdf          do
004b7cdf          {
004b7cbb              this_2->m_rgTokens.m_data[i_1] = 0;
004b7cdc              i_1 += 1;
004b7cdf          } while (i_1 < this_2->m_rgTokens.m_num);
004b7cc5      }
004b7cc5      
004b7cbb      this_2->m_rgTokens.m_num = 0;
004b7ce8      class SmartArray<EffectInfoRegion *,1>* eax_1;
004b7ce8      eax_1 = 1;
004b7ceb      return 1;
004b7c60  }

004b7cc9                             8d a4 24 00 00 00 00                                                           ..$....
004b7cec                                      90 90 90 90                                                              ....

004b7cf0  int32_t __thiscall PackableList<Enchantment>::UnPack(class PackableList<Enchantment>* this, void** arg2, uint32_t arg3)

004b7cf0  {
004b7cf6      PackableList<Enchantment>::Flush(this);
004b7cf6      
004b7d00      if (arg3 < 4)
004b7d5c          return 0;
004b7d5c      
004b7d07      void* eax = *(uint32_t*)arg2;
004b7d0b      int32_t edi = *(uint32_t*)eax;
004b7d14      *(uint32_t*)arg2 = ((char*)eax + 4);
004b7d16      int32_t var_50;
004b7d16      Enchantment::Enchantment(&var_50);
004b7d1b      int32_t esi = 0;
004b7d1b      
004b7d1f      if (edi > 0)
004b7d1f      {
004b7d45          do
004b7d45          {
004b7d34              if (*(uint32_t*)(var_50 + 0x10)(arg2, arg3) == 0)
004b7d68                  return 0;
004b7d68              
004b7d3d              PackableList<Enchantment>::InsertTail(this, &var_50);
004b7d42              esi += 1;
004b7d45          } while (esi < edi);
004b7d1f      }
004b7d1f      
004b7d53      return 1;
004b7cf0  }

004b7d6b                                   90 90 90 90 90                                                             .....

004b7d70  uint32_t __thiscall PackableList<Enchantment>::InsertTail(class PackableList<Enchantment>* this, class Enchantment const* arg2)

004b7d70  {
004b7d7b      void* edi = operator new(0x58);
004b7d7b      
004b7d82      if (edi == 0)
004b7da0          edi = nullptr;
004b7d82      else
004b7d82      {
004b7d8b          Enchantment::Enchantment(edi, arg2);
004b7d90          *(uint32_t*)((char*)edi + 0x50) = 0;
004b7d97          *(uint32_t*)((char*)edi + 0x54) = 0;
004b7d82      }
004b7d82      
004b7da7      if (this->head == 0)
004b7da7      {
004b7da9          uint32_t curNum = this->curNum;
004b7dac          this->head = edi;
004b7daf          this->tail = edi;
004b7db4          this->curNum = (curNum + 1);
004b7db8          return (curNum + 1);
004b7da7      }
004b7da7      
004b7dbb      class PackableLLNode<Enchantment>* tail = this->tail;
004b7dbe      tail->next = edi;
004b7dc1      *(uint32_t*)((char*)edi + 0x54) = tail;
004b7dc4      uint32_t curNum_1 = this->curNum;
004b7dc7      this->tail = edi;
004b7dcc      this->curNum = (curNum_1 + 1);
004b7dd0      return (curNum_1 + 1);
004b7d70  }

004b7dd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004b7de0  void __thiscall Enchantment::Enchantment(class Enchantment* this, class Enchantment const* arg2)

004b7de0  {
004b7de6      this->vtable = &Enchantment::`vftable';
004b7def      this->_id = arg2->_id;
004b7df5      this->m_SpellSetID = arg2->m_SpellSetID;
004b7dfb      this->_spell_category = arg2->_spell_category;
004b7e01      this->_power_level = arg2->_power_level;
004b7e07      this->_start_time = arg2->_start_time;
004b7e0d      *(uint32_t*)((char*)this->_start_time)[4] = *(uint32_t*)((char*)arg2->_start_time)[4];
004b7e13      this->_duration = arg2->_duration;
004b7e19      *(uint32_t*)((char*)this->_duration)[4] = *(uint32_t*)((char*)arg2->_duration)[4];
004b7e1f      this->_caster = arg2->_caster;
004b7e25      this->_degrade_modifier = arg2->_degrade_modifier;
004b7e2b      this->_degrade_limit = arg2->_degrade_limit;
004b7e31      this->_last_time_degraded = arg2->_last_time_degraded;
004b7e37      *(uint32_t*)((char*)this->_last_time_degraded)[4] = *(uint32_t*)((char*)arg2->_last_time_degraded)[4];
004b7e3a      this->_smod.vtable = 0x7b19b8;
004b7e44      this->_smod.type = arg2->_smod.type;
004b7e4a      this->_smod.key = arg2->_smod.key;
004b7e50      this->_smod.val = arg2->_smod.val;
004b7de0  }

004b7e56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004b7e60  void* __thiscall Enchantment::`scalar deleting destructor'(class Enchantment* this, uint32_t arg2)

004b7e60  {
004b7e68      this->_smod.vtable = 0x79285c;
004b7e6f      this->vtable = 0x79285c;
004b7e6f      
004b7e75      if ((arg2 & 1) != 0)
004b7e78          operator delete(this);
004b7e78      
004b7e83      return this;
004b7e60  }

004b7e86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004b7e90  void* __thiscall PackableList<Enchantment>::`scalar deleting destructor'(class PackableList<Enchantment>* this, uint32_t arg2)

004b7e90  {
004b7e93      this->vtable = 0x7b15c4;
004b7e99      PackableList<Enchantment>::Flush(this);
004b7ea3      this->vtable = 0x79285c;
004b7ea3      
004b7ea9      if ((arg2 & 1) != 0)
004b7eac          operator delete(this);
004b7eac      
004b7eb7      return this;
004b7e90  }

004b7eba                                                                                90 90 90 90 90 90                            ......

004b7ec0  void __fastcall gmEffectsUI::~gmEffectsUI(class gmEffectsUI* this)

004b7ec0  {
004b7eca      this->vtable = 0x7b1880;
004b7ec4      this->vtable = &gmEffectsUI::`vftable';
004b7ed6      gmEffectsUI::FlushList(this);
004b7edb      this->m_pInfoText = nullptr;
004b7ee5      this->m_pListBox = nullptr;
004b7eef      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004b7eef      
004b7ef6      if (eax != 0)
004b7ef8          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004b7ef8      
004b7f10      if ((this->m_rgTokens.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004b7f19          operator delete[](this->m_rgTokens.m_data);
004b7f19      
004b7ec4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004b7f29      NoticeHandler::~NoticeHandler(&this->vtable);
004b7f32      /* tailcall */
004b7f32      return UIElement_Field::~UIElement_Field(this);
004b7ec0  }

004b7f37                                                                       90 90 90 90 90 90 90 90 90                         .........

004b7f40  void __thiscall gmEffectsUI::ListenToGlobalMessage(class gmEffectsUI* this, uint32_t arg2, int32_t arg3)

004b7f40  {
004b7f45      if (arg2 == 3)
004b7f45      {
004b7f47          long double x87_r7_1 = ((long double)Timer::cur_time);
004b7f4d          long double temp1_1 = ((long double)this->m_nextDurationUpdate);
004b7f4d          (x87_r7_1 - temp1_1);
004b7f4d          
004b7f58          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004b7f5a              gmEffectsUI::UpdateDurations(this);
004b7f45      }
004b7f40  }

004b7f62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004b7f70  void* __thiscall gmEffectsUI::`scalar deleting destructor'(class gmEffectsUI* this, uint32_t arg2)

004b7f70  {
004b7f73      gmEffectsUI::~gmEffectsUI(this);
004b7f73      
004b7f7d      if ((arg2 & 1) != 0)
004b7f80          operator delete(this);
004b7f80      
004b7f8b      return this;
004b7f70  }

004b7f8e                                            90 90                                                                ..

004b7f90  uint8_t __fastcall gmEffectsUI::UpdateSelection(class gmEffectsUI* this)

004b7f90  {
004b7fa1      int32_t i = 0;
004b7fa1      
004b7fa5      if (this->m_rgTokens.m_num > 0)
004b7fa5      {
004b7fe3          do
004b7fe3          {
004b7fcf              int32_t __saved_ebx_1;
004b7fcf              
004b7fcf              if (this->m_rgTokens.m_data[i]->vtable->GetStat() != this->m_SelectedSpell)
004b7fd5                  __saved_ebx_1 = 1;
004b7fcf              else
004b7fd1                  __saved_ebx_1 = 6;
004b7fd1              
004b7fc4              this->m_rgTokens.m_data[i]->vtable->SetState(__saved_ebx_1);
004b7fe0              i += 1;
004b7fe3          } while (i < this->m_rgTokens.m_num);
004b7fa5      }
004b7fa5      
004b7ffb      class PStringBase<unsigned short> __return_1;
004b7ffb      void var_120;
004b7ffb      class AC1Legacy::PStringBase<char> __return_4;
004b7ffb      
004b7ffb      if ((this->m_pListBox == 0 || this->m_rgTokens.m_num == 0))
004b7ffb      {
004b821b          StringInfo::StringInfo(&var_120);
004b822f          StringInfo::SetStringIDandTableEnum(&var_120, 0, 0x10000001);
004b823f          class PStringBase<unsigned short>* eax_34 = StringInfo::GetString(&var_120, &__return_1, 0);
004b824b          UIElement_Text::SetText(this->m_pInfoText, eax_34);
004b8250          __return_4 = __return_1;
004b825b      label_4b825b:
004b825b          
004b8267          if ((InterlockedDecrement((__return_4 - 0x10)) == 0 && __return_4 != 0x14))
004b826f              **(uint32_t**)(__return_4 - 0x14)(1);
004b826f          
004b8275          StringInfo::~StringInfo(&var_120);
004b7ffb      }
004b7ffb      else
004b7ffb      {
004b8009          class AC1Legacy::PStringBase<char> __return;
004b8009          
004b8009          if (this->m_SelectedSpell == 0)
004b8009          {
004b800f              StringInfo::StringInfo(&var_120);
004b8023              StringInfo::SetStringIDandTableEnum(&var_120, 0, 0x10000001);
004b8033              class PStringBase<unsigned short>* eax_8 = StringInfo::GetString(&var_120, &__return, 0);
004b803f              UIElement_Text::SetText(this->m_pInfoText, eax_8);
004b8044              __return_4 = __return;
004b8048              goto label_4b825b;
004b8009          }
004b8009          
004b804d          class ClientMagicSystem* eax_9 = ClientMagicSystem::GetMagicSystem();
004b804d          
004b8056          if (eax_9 == 0)
004b8056          {
004b805a              eax_9 = 0;
004b8063              return 0;
004b8056          }
004b8056          
004b8082          class PStringBase<char> var_124;
004b8082          PStringBase<char>::PStringBase<char>(&var_124, &ClientMagicSystem::GetSpellName(eax_9, &__return, this->m_SelectedSpell)->m_buffer->m_data);
004b8087          class AC1Legacy::PStringBase<char> __return_2 = __return;
004b8087          
004b809f          if ((InterlockedDecrement((__return_2 + 4)) == 0 && __return_2 != 0))
004b80a7              **(uint32_t**)__return_2(1);
004b80a7          
004b80b2          PStringBase<char>::PStringBase<char>(&__return, &data_7943c0);
004b80b7          class AC1Legacy::PStringBase<char> __return_5 = __return;
004b80bb          int32_t eax_15 = *(uint32_t*)(__return_5 - 4);
004b80bb          
004b80c1          if (eax_15 != 1)
004b80c1          {
004b80ca              PStringBase<char>::append_n_chars(&var_124, __return_5, (eax_15 - 1));
004b80cf              __return_5 = __return;
004b80c1          }
004b80c1          
004b80e2          if ((InterlockedDecrement((__return_5 - 0x10)) == 0 && __return_5 != 0x14))
004b80ea              **(uint32_t**)(__return_5 - 0x14)(1);
004b80ea          
004b8109          PStringBase<char>::PStringBase<char>(&__return, &ClientMagicSystem::GetSpellDescription(eax_9, &__return_1, this->m_SelectedSpell)->m_buffer->m_data);
004b810e          char* __return_3 = __return;
004b8112          int32_t eax_21 = *(uint32_t*)(__return_3 - 4);
004b8112          
004b8118          if (eax_21 != 1)
004b8118          {
004b8121              PStringBase<char>::append_n_chars(&var_124, __return_3, (eax_21 - 1));
004b8126              __return_3 = __return;
004b8118          }
004b8118          
004b8139          if ((InterlockedDecrement(&__return_3[0xfffffff0]) == 0 && __return_3 != 0x14))
004b8141              **(uint32_t**)(__return_3 - 0x14)(1);
004b8141          
004b8143          class PStringBase<unsigned short> __return_6 = __return_1;
004b8143          
004b8153          if ((InterlockedDecrement((__return_6 + 4)) == 0 && __return_6 != 0))
004b815b              **(uint32_t**)__return_6(1);
004b815b          
004b816f          class PStringBase<char>* var_144_5 = &var_124;
004b8183          void var_90;
004b8183          StringInfo::SetLiteralValue(&var_90, PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, StringInfo::StringInfo(&var_90), nullptr), 1);
004b818c          int32_t* edi_4 = (__return_1 - 0x14);
004b818c          
004b819b          if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
004b81a3              **(uint32_t**)edi_4(1);
004b81a3          
004b81b3          class PStringBase<unsigned short>* eax_29 = StringInfo::GetString(&var_90, &__return_1, 0);
004b81bf          UIElement_Text::SetText(this->m_pInfoText, eax_29);
004b81c8          int32_t* esi_2 = (__return_1 - 0x14);
004b81c8          
004b81d7          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004b81df              **(uint32_t**)esi_2(1);
004b81df          
004b81e8          StringInfo::~StringInfo(&var_90);
004b81f1          int32_t* esi_4 = (var_124 - 0x14);
004b81f1          
004b8201          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004b8201          {
004b8209              **(uint32_t**)esi_4(1);
004b820d              int32_t eax_33;
004b820d              eax_33 = 1;
004b8216              return 1;
004b8201          }
004b7ffb      }
004b827c      int32_t eax_32;
004b827c      eax_32 = 1;
004b8285      return 1;
004b7f90  }

004b7fa9                             8d a4 24 00 00 00 00                                                           ..$....
004b8286                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004b8290  uint8_t __thiscall gmEffectsUI::SetSelectedSpell(class gmEffectsUI* this, class UIElement* arg2)

004b8290  {
004b8298      class UIElement* ecx = arg2;
004b829e      uint32_t esi = 0;
004b829e      
004b82a2      if (ecx != 0)
004b82a2      {
004b82a8          struct UIElement::VTable* vtable = ecx->vtable;
004b82b4          int32_t* var_8 = nullptr;
004b82b8          int32_t* var_4_1 = nullptr;
004b82bc          vtable->InqProperty(0x1000003a, &var_8);
004b82c8          arg2 = nullptr;
004b82c8          
004b82cc          if (var_4_1 != 0)
004b82d5              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&arg2);
004b82d5          
004b82ea          esi = this->m_rgTokens.m_data[arg2]->vtable->GetStat();
004b82ec          int32_t* eax_4 = var_8;
004b82ec          
004b82f2          if (eax_4 != 0)
004b82f2          {
004b82fc              int32_t edx_3 = (eax_4[1] - 1);
004b82f9              eax_4[1] = edx_3;
004b82f9              
004b8301              if (edx_3 == 0)
004b8307                  **(uint32_t**)eax_4(1);
004b8307              
004b8309              var_8 = nullptr;
004b82f2          }
004b82f2          
004b8313          if (var_4_1 != 0)
004b8313          {
004b831d              int32_t edx_5 = (var_4_1[1] - 1);
004b831a              var_4_1[1] = edx_5;
004b831a              
004b8322              if (edx_5 == 0)
004b8328                  **(uint32_t**)var_4_1(1);
004b8313          }
004b82a2      }
004b82a2      
004b8330      if (this->m_SelectedSpell == esi)
004b8332          esi = 0;
004b8332      
004b8336      this->m_SelectedSpell = esi;
004b8347      return gmEffectsUI::UpdateSelection(this);
004b8290  }

004b834a                                90 90 90 90 90 90                                                            ......

004b8350  uint8_t __thiscall gmEffectsUI::RebuildList(class gmEffectsUI* this, class CACQualities const* arg2)

004b8350  {
004b835b      gmEffectsUI::FlushList(this);
004b8373      int32_t var_ac = 0x7b15c4;
004b8377      void* i_1 = nullptr;
004b837b      int32_t var_a4 = 0;
004b837f      int32_t var_a0 = 0;
004b837f      
004b838a      if (CACQualities::GetEnchantmentsInEffect(arg2, &var_ac) == 0)
004b838a      {
004b8390          var_ac = 0x7b15c4;
004b8394          PackableList<Enchantment>::Flush(&var_ac);
004b839b          int32_t eax_1;
004b839b          eax_1 = 0;
004b83a4          return 0;
004b838a      }
004b838a      
004b83a8      void* i = i_1;
004b83a8      
004b83ae      if (i != 0)
004b83ae      {
004b83b4          void* i_2 = i;
004b83ba          void* i_3;
004b83ba          
004b83ba          for (; i != 0; i = i_3)
004b83ba          {
004b83c3              uint32_t ebp_2 = ((uint32_t)((int16_t)*(uint32_t*)((char*)i + 4)));
004b83c3              
004b83d3              if (gmEffectsUI::SpellEffectMatchesUIType(this, ebp_2) != 0)
004b83d3              {
004b83d9                  class ClientMagicSystem* eax_3 = ClientMagicSystem::GetMagicSystem();
004b83d9                  
004b83e2                  if (eax_3 == 0)
004b83e2                  {
004b84c4                      var_ac = 0x7b15c4;
004b84cc                      PackableList<Enchantment>::Flush(&var_ac);
004b84d4                      int32_t eax_7;
004b84d4                      eax_7 = 0;
004b84dd                      return 0;
004b83e2                  }
004b83e2                  
004b83ec                  void var_90;
004b83ec                  CSpellBase::CSpellBase(&var_90);
004b83ec                  
004b8400                  if (ClientMagicSystem::InqSpellBase(eax_3, ebp_2, &var_90) != 0)
004b8400                  {
004b840d                      uint32_t j = gmEffectsUI::GetSortedInsertionPlace(this, &var_90);
004b8418                      uint32_t j_1 = j;
004b8418                      
004b841c                      if (j_1 < this->m_rgTokens.m_num)
004b841c                      {
004b843c                          do
004b843c                          {
004b842d                              InfoRegion::SetID(this->m_rgTokens.m_data[j], (j + 1));
004b8438                              j += 1;
004b843c                          } while (j < this->m_rgTokens.m_num);
004b843c                          
004b843e                          i = i_2;
004b841c                      }
004b841c                      
004b8444                      void* eax_5 = operator new(0x18);
004b844e                      class LayerModifier* var_9c;
004b844e                      
004b844e                      if (eax_5 == 0)
004b8468                          var_9c = nullptr;
004b844e                      else
004b8462                          var_9c = EffectInfoRegion::EffectInfoRegion(eax_5, this->m_pListBox, j_1, ebp_2, 0);
004b8462                      
004b847e                      SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&this->m_rgTokens, &var_9c, j_1);
004b849c                      class LayerModifier** var_c4_3;
004b849c                      var_c4_3 = ((double)((((long double)*(uint64_t*)((char*)i + 0x20)) + ((long double)*(uint64_t*)((char*)i + 0x18))) - ((long double)Timer::cur_time)));
004b8475                      this->m_rgTokens.m_data[j_1]->vtable[1].OnQualityChanged(var_c4_3);
004b8400                  }
004b8400                  
004b84a6                  CSpellBase::~CSpellBase(&var_90);
004b83d3              }
004b83d3              
004b84ab              i_3 = *(uint32_t*)((char*)i + 0x50);
004b84ae              i_2 = i_3;
004b83ba          }
004b83ba          
004b84e0          uint32_t m_SelectedSpell = this->m_SelectedSpell;
004b84e0          
004b84e8          if ((m_SelectedSpell != 0 && CACQualities::IsEnchanted(arg2, m_SelectedSpell) == 0))
004b84fb              this->m_SelectedSpell = 0;
004b84fb          
004b8503          gmEffectsUI::UpdateSelection(this);
004b83ae      }
004b83ae      
004b850c      var_ac = 0x7b15c4;
004b8510      PackableList<Enchantment>::Flush(&var_ac);
004b8518      int32_t eax_9;
004b8518      eax_9 = 1;
004b8521      return 1;
004b8350  }

004b8524              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004b8530  uint8_t __thiscall gmEffectsUI::Update(class gmEffectsUI* this, class CACQualities const* arg2)

004b8530  {
004b853a      if ((((int8_t)(this->__bitfield164 >> 1)) & 1) == 0)
004b853e          return 0;
004b853e      
004b8549      if (this->m_bNeedToRebuild == 0)
004b8549      {
004b855f          gmEffectsUI::UpdateDurations(this, arg2);
004b8564          int32_t eax_3;
004b8564          eax_3 = 1;
004b8566          return 1;
004b8549      }
004b8549      
004b8550      gmEffectsUI::RebuildList(this, arg2);
004b8555      int32_t eax_1;
004b8555      eax_1 = 1;
004b8557      return 1;
004b8530  }

004b8569                             90 90 90 90 90 90 90                                                           .......

004b8570  void __thiscall gmEffectsUI::RecvNotice_PlayerDescReceived(class gmEffectsUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004b8570  {
004b8570      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8] = 1;
004b8570      
004b8584      if ((((int8_t)(*(int32_t*)((char*)this + -0x554) >> 1)) & 1) != 0)
004b8584      {
004b858e          if (this->m_hashElementsRegisteredWith*(int32_t*)((char*)this + 0x2c) != 0)
004b858e          {
004b8595              gmEffectsUI::RebuildList(((char*)this - 0x5f8), arg2);
004b859a              return;
004b858e          }
004b858e          
004b85a2          gmEffectsUI::UpdateDurations(((char*)this - 0x5f8), arg2);
004b8584      }
004b8570  }

004b85aa                                90 90 90 90 90 90                                                            ......

004b85b0  uint8_t __fastcall gmEffectsUI::Update(class gmEffectsUI* this)

004b85b0  {
004b85c2      int32_t __saved_edi;
004b85c2      int32_t* esp = &__saved_edi;
004b85c2      
004b85c3      if (((this->__bitfield164 >> 1) & 1) != 0)
004b85c3      {
004b85c9          struct Turbine_GUID* var_14;
004b85c9          int32_t* var_28_1 = &var_14;
004b85ce          struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004b85d6          var_14 = nullptr;
004b85e1          class TResult __return;
004b85e1          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28_1);
004b85e6          struct Turbine_GUID* esi_1 = var_14;
004b85ef          var_2c = esi_1;
004b85f1          int32_t var_28_2 = 0;
004b85f4          struct Turbine_GUID* eax_3 = var_2c;
004b85f8          int32_t var_8 = 0;
004b85fc          int32_t var_4_1 = 0;
004b85fc          
004b8600          if (eax_3 != 0)
004b8606              *(uint32_t*)(eax_3->m_data1 + 0x10)();
004b8606          
004b8612          esp = &var_2c;
004b8619          void var_c;
004b8619          int32_t ebx_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004b8619          
004b861b          if (esi_1 != 0)
004b8621              *(uint32_t*)(esi_1->m_data1 + 0x14)();
004b8621          
004b8624          class TResult __return_1 = __return;
004b8624          
004b862a          if (__return_1 != 0)
004b862a          {
004b862e              if (ebx_1 >= 0)
004b862e              {
004b864d                  ebx_1 = gmEffectsUI::Update(this, __return_1);
004b864f                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004b865b                  return ebx_1;
004b862e              }
004b862e              
004b8634              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004b8634              esp = &__saved_edi;
004b862a          }
004b85c3      }
004b85c3      
004b8637      uint32_t eax_1;
004b8637      eax_1 = 0;
004b8639      *(uint32_t*)esp;
004b8639      esp[1];
004b8639      esp[2];
004b8639      esp[3];
004b8640      return 0;
004b85b0  }

004b865c                                                                                      90 90 90 90                              ....

004b8660  enum UIElementMessageListenResult __thiscall gmEffectsUI::ListenToElementMessage(class gmEffectsUI* this, struct UIElementMessageInfo const* arg2)

004b8660  {
004b8666      uint32_t idMessage = arg2->idMessage;
004b8666      
004b866e      if (idMessage != 0x18)
004b866e      {
004b86ac          if (idMessage == 0x1c)
004b86ac          {
004b86ae              class UIElement_ListBox* m_pListBox = this->m_pListBox;
004b86ae              
004b86be              if ((m_pListBox != 0 && arg2->idElement == 0x10000123))
004b86be              {
004b86c0                  class UIElement* eax_3 = UIElement_ListBox::GetItemUnderMouse(m_pListBox);
004b86c0                  
004b86c9                  if (arg2->dwParam1 == 7)
004b86ce                      gmEffectsUI::SetSelectedSpell(this, eax_3);
004b86be              }
004b86ac          }
004b866e      }
004b866e      else if (arg2->pElement == this)
004b8673      {
004b867c          if (arg2->dwParam1 == 0)
004b867c          {
004b8697              UIListener::UnRegisterForGlobalMessage(this, 3);
004b86a6              return UIElement::ListenToElementMessage(this, arg2);
004b867c          }
004b867c          
004b867e          UIListener::RegisterForGlobalMessage(this, 3);
004b8685          gmEffectsUI::Update(this);
004b8673      }
004b8673      
004b86dd      return UIElement::ListenToElementMessage(this, arg2);
004b8660  }


004b86e0  void __fastcall gmEffectsUI::RecvNotice_EnchantmentsChanged(class gmEffectsUI* this)

004b86e0  {
004b86e0      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8] = 1;
004b86ea      /* tailcall */
004b86ea      return gmEffectsUI::Update(((char*)this - 0x5f8));
004b86e0  }

004b86ef                                               90                                                                 .

004b86f0  void __fastcall gmCharacterInfoUI::PostInit(class gmCharacterInfoUI* this)

004b86f0  {
004b86f4      UIElement::PostInit(this);
004b870c      this->m_pMainText = UIElement::GetChildRecursive(this, 0x1000011d);
004b8712      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x7d, &this->vtable);
004b8721      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
004b8728      eax_2->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004b873b      eax_2->vtable->RegisterNoticeHandler(0x4dd220, &this->vtable);
004b86f0  }

004b874b                                   90 90 90 90 90                                                             .....

004b8750  void __fastcall gmCharacterInfoUI::~gmCharacterInfoUI(class gmCharacterInfoUI* this)

004b8750  {
004b875b      this->vtable = 0x7b1d80;
004b8761      this->vtable = &gmCharacterInfoUI::`vftable';
004b8754      this->vtable = &gmCharacterInfoUI::`vftable';
004b8773      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x7d, &this->vtable);
004b8782      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
004b8782      
004b8789      if (eax_1 != 0)
004b878b          eax_1->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004b878b      
004b8761      this->vtable = &gmUrgentAssistanceUI::`vftable';
004b879b      NoticeHandler::~NoticeHandler(&this->vtable);
004b87a4      /* tailcall */
004b87a4      return UIElement_Field::~UIElement_Field(this);
004b8750  }

004b87a9                             90 90 90 90 90 90 90                                                           .......

004b87b0  class UIElement* __thiscall gmCharacterInfoUI::DynamicCast(class gmCharacterInfoUI* this, uint32_t arg2) __pure

004b87b0  {
004b87bc      if (arg2 == 0x1000001a)
004b87c9          return this;
004b87c9      
004b87c3      int32_t edx_1;
004b87c3      edx_1 = arg2 != 3;
004b87c7      return (this & (edx_1 - 1));
004b87b0  }

004b87cc                                      90 90 90 90                                                              ....

004b87d0  uint32_t gmCharacterInfoUI::GetUIElementType(class gmCharacterInfoUI const* this @ ecx) __pure

004b87d0  {
004b87d5      return 0x1000001a;
004b87d0  }

004b87d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004b87e0  uint8_t __thiscall gmCharacterInfoUI::UpdateInnateAttributeInfo(class gmCharacterInfoUI* this, class CACQualities const* arg2)

004b87e0  {
004b87ee      int32_t var_a0 = 0x7a7b14;
004b87f6      int32_t var_9c = 0;
004b87fe      int32_t var_98 = 0;
004b8806      int32_t var_94 = 0;
004b880e      void var_90;
004b880e      StringInfo::StringInfo(&var_90);
004b8822      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004b8837      CACQualities::InqAttribute(arg2, 1, &var_a0);
004b8845      int32_t var_ac_1 = 0;
004b884d      StringInfo::AddVariable_Int(&var_90, 0, var_98);
004b885b      CACQualities::InqAttribute(arg2, 2, &var_a0);
004b8869      int32_t var_ac_3 = 0;
004b8871      StringInfo::AddVariable_Int(&var_90, 0, var_98);
004b887f      CACQualities::InqAttribute(arg2, 4, &var_a0);
004b888d      int32_t var_ac_5 = 0;
004b8895      StringInfo::AddVariable_Int(&var_90, 0, var_98);
004b88a3      CACQualities::InqAttribute(arg2, 3, &var_a0);
004b88b1      int32_t var_ac_7 = 0;
004b88b9      StringInfo::AddVariable_Int(&var_90, 0, var_98);
004b88c7      CACQualities::InqAttribute(arg2, 5, &var_a0);
004b88d5      int32_t var_ac_9 = 0;
004b88dd      StringInfo::AddVariable_Int(&var_90, 0, var_98);
004b88eb      CACQualities::InqAttribute(arg2, 6, &var_a0);
004b88f0      int32_t var_ac_11 = 0;
004b8901      StringInfo::AddVariable_Int(&var_90, 0, var_98);
004b8911      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_90);
004b891a      StringInfo::~StringInfo(&var_90);
004b8920      int32_t eax;
004b8920      eax = 1;
004b8929      return 1;
004b87e0  }

004b892c                                      90 90 90 90                                                              ....

004b8930  uint8_t __thiscall gmCharacterInfoUI::UpdateFakeSkills(class gmCharacterInfoUI* this, class CACQualities const* arg2)

004b8930  {
004b893e      void var_90;
004b893e      StringInfo::StringInfo(&var_90);
004b895d      int32_t var_94 = 0x578;
004b8965      CBaseQualities::InqInt(&arg2->vtable, 0xb5, &var_94, 0, 0);
004b897a      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004b8983      int32_t eax_1;
004b8983      int32_t edx;
004b8983      edx = HIGHD(((int64_t)var_94));
004b8983      eax_1 = LOWD(((int64_t)var_94));
004b8984      int32_t var_a4 = edx;
004b8991      StringInfo::AddVariable_Int(&var_90, 0, eax_1);
004b89a1      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_90);
004b89b6      int32_t var_98 = 0;
004b89be      CBaseQualities::InqInt(&arg2->vtable, 0xc0, &var_98, 0, 0);
004b89d3      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004b89dc      int32_t eax_3;
004b89dc      int32_t edx_1;
004b89dc      edx_1 = HIGHD(((int64_t)var_98));
004b89dc      eax_3 = LOWD(((int64_t)var_98));
004b89dd      int32_t var_a4_2 = edx_1;
004b89e9      StringInfo::AddVariable_Int(&var_90, 0, eax_3);
004b89f9      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_90);
004b8a02      StringInfo::~StringInfo(&var_90);
004b8a08      int32_t eax_4;
004b8a08      eax_4 = 1;
004b8a11      return 1;
004b8930  }

004b8a14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004b8a20  uint8_t __thiscall gmCharacterInfoUI::UpdateLoad(class gmCharacterInfoUI* this, class CACQualities const* arg2)

004b8a20  {
004b8a38      float var_9c;
004b8a38      CACQualities::InqLoad(arg2, &var_9c);
004b8a48      int32_t var_98 = 0xa;
004b8a50      CACQualities::InqAttribute(arg2, 1, &var_98, 0);
004b8a65      int32_t var_a0 = 0;
004b8a6d      CBaseQualities::InqInt(&arg2->vtable, 5, &var_a0, 0, 0);
004b8a82      int32_t var_a4 = 0;
004b8a8a      CBaseQualities::InqInt(&arg2->vtable, 0xe6, &var_a4, 0, 0);
004b8a99      int32_t eax = EncumbranceSystem::EncumbranceCapacity(var_98, var_a4);
004b8aa7      void var_90;
004b8aa7      StringInfo::StringInfo(&var_90);
004b8aac      long double x87_r7 = ((long double)var_9c);
004b8ab0      long double temp1 = ((long double)1f);
004b8ab0      (x87_r7 - temp1);
004b8ab6      int32_t eax_1;
004b8ab6      eax_1 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
004b8ab8      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004b8ab8      
004b8abb      if (p)
004b8abb      {
004b8aed          int32_t edi_2 = (var_a0 - eax);
004b8aef          EncumbranceSystem::LoadMod(var_9c);
004b8b07          int32_t esi_3 = (0xa - _ftol2());
004b8b18          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004b8b25          int32_t eax_4;
004b8b25          int32_t edx_2;
004b8b25          edx_2 = HIGHD(((int64_t)edi_2));
004b8b25          eax_4 = LOWD(((int64_t)edi_2));
004b8b26          int32_t var_b4_3 = edx_2;
004b8b2d          StringInfo::AddVariable_Int(&var_90, 0, eax_4);
004b8b37          int32_t eax_7;
004b8b37          int32_t edx_3;
004b8b37          edx_3 = HIGHD(((int64_t)(esi_3 * 0xa)));
004b8b37          eax_7 = LOWD(((int64_t)(esi_3 * 0xa)));
004b8b38          int32_t var_b4_4 = edx_3;
004b8b45          StringInfo::AddVariable_Int(&var_90, 0, eax_7);
004b8b55          UIElement_Text::AppendStringInfo(this->m_pMainText, &var_90);
004b8abb      }
004b8abb      else
004b8abb      {
004b8acc          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004b8adc          UIElement_Text::AppendStringInfo(this->m_pMainText, &var_90);
004b8abb      }
004b8abb      
004b8b61      if (var_a4 > 0)
004b8b61      {
004b8b73          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004b8b7c          int32_t eax_10;
004b8b7c          int32_t __saved_edi_5;
004b8b7c          __saved_edi_5 = HIGHD(((int64_t)var_a4));
004b8b7c          eax_10 = LOWD(((int64_t)var_a4));
004b8b7d          int32_t __saved_edi_3 = __saved_edi_5;
004b8b8a          StringInfo::AddVariable_Int(&var_90, 0, eax_10);
004b8b9f          int32_t var_94_1 = (var_a4 * 0x14);
004b8bb4          StringInfo::AddVariable_Float(&var_90, 0, 0f, 0);
004b8bc4          UIElement_Text::AppendStringInfo(this->m_pMainText, &var_90);
004b8b61      }
004b8b61      
004b8bcd      StringInfo::~StringInfo(&var_90);
004b8bd3      int32_t eax_14;
004b8bd3      eax_14 = 1;
004b8bdc      return 1;
004b8a20  }

004b8bdf                                                                                               90                                 .

004b8be0  void __thiscall gmCharacterInfoUI::gmCharacterInfoUI(class gmCharacterInfoUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004b8be0  {
004b8bef      UIElement_Field::UIElement_Field(this, arg2, arg3);
004b8bf4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004b8bfe      this->vtable = &QualityChangeHandler::`vftable';
004b8c08      this->vtable = 0x7b1d80;
004b8c0e      this->vtable = &gmCharacterInfoUI::`vftable';
004b8c18      this->vtable = &gmCharacterInfoUI::`vftable';
004b8c22      this->m_pMainText = nullptr;
004b8be0  }

004b8c32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004b8c40  void* __thiscall gmCharacterInfoUI::`scalar deleting destructor'(class gmCharacterInfoUI* this, uint32_t arg2)

004b8c40  {
004b8c43      gmCharacterInfoUI::~gmCharacterInfoUI(this);
004b8c43      
004b8c4d      if ((arg2 & 1) != 0)
004b8c50          operator delete(this);
004b8c50      
004b8c5b      return this;
004b8c40  }

004b8c5e                                                                                            90 90                                ..

004b8c60  class UIElement* gmCharacterInfoUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004b8c60  {
004b8c65      void* eax = operator new(0x604);
004b8c65      
004b8c6f      if (eax == 0)
004b8c85          return 0;
004b8c85      
004b8c82      return gmCharacterInfoUI::gmCharacterInfoUI(eax, arg1, arg2);
004b8c60  }

004b8c86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004b8c90  void gmCharacterInfoUI::Register()

004b8c90  {
004b8c9a      UIElement::RegisterElementClass(0x1000001a, gmCharacterInfoUI::Create);
004b8c90  }

004b8ca3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004b8cb0  uint8_t __thiscall gmCharacterInfoUI::UpdatePlayerBirthAgeDeaths(class gmCharacterInfoUI* this, class CACQualities const* arg2)

004b8cb0  {
004b8cbf      void var_520;
004b8cbf      StringInfo::StringInfo(&var_520);
004b8ccb      class StringInfo* var_53c = nullptr;
004b8cdb      int32_t var_524 = 0;
004b8cdb      
004b8cea      if (CBaseQualities::InqInt(&arg2->vtable, 0x62, &var_524, 0, var_53c) != 0)
004b8cea      {
004b8cf0          var_53c = &var_524;
004b8d0a          void var_400;
004b8d0a          strftime(&var_400, 0x400, &data_7ab7ec, localtime(var_53c));
004b8d18          var_53c = 0x10000001;
004b8d27          var_53c = StringInfo::SetStringIDandTableEnum(&var_520, 0, var_53c);
004b8d32          PStringBase<char>::PStringBase<char>(&var_53c, &var_400);
004b8d41          StringInfo::AddVariable_String(&var_520, 0, var_53c);
004b8d4a          var_53c = &var_520;
004b8d51          UIElement_Text::AppendStringInfo(this->m_pMainText, var_53c);
004b8cea      }
004b8cea      
004b8d56      var_53c = nullptr;
004b8d63      int32_t var_528 = 0;
004b8d63      
004b8d72      if (CBaseQualities::InqInt(&arg2->vtable, 0x7d, &var_528, 0, var_53c) != 0)
004b8d72      {
004b8d7b          void var_490;
004b8d7b          StringInfo::StringInfo(&var_490);
004b8d80          int32_t ecx_9 = var_528;
004b8d8b          var_53c = &var_490;
004b8d8d          TimeUtils::QueryDuration(ecx_9, var_53c);
004b8d9b          var_53c = 0x10000001;
004b8da5          StringInfo::SetStringIDandTableEnum(&var_520, 0, var_53c);
004b8db7          var_53c = &var_490;
004b8dbd          StringInfo::AddVariable_StringInfo(&var_520, 0, var_53c);
004b8dc2          class UIElement_Text* m_pMainText = this->m_pMainText;
004b8dcc          var_53c = &var_520;
004b8dcd          UIElement_Text::AppendStringInfo(m_pMainText, var_53c);
004b8dd9          StringInfo::~StringInfo(&var_490);
004b8d72      }
004b8d72      
004b8dde      var_53c = nullptr;
004b8deb      int32_t var_52c = 0;
004b8df3      CBaseQualities::InqInt(&arg2->vtable, 0x2b, &var_52c, 0, var_53c);
004b8df8      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004b8e01      var_53c = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
004b8e02      InterlockedIncrement(var_53c);
004b8e08      int32_t eax_3 = var_52c;
004b8e0f      var_53c = 0x10000001;
004b8e0f      
004b8e14      if (eax_3 == 0)
004b8e14      {
004b8e5b          int32_t var_540_7 = 0;
004b8e60          StringInfo::SetStringIDandTableEnum(&var_520, 0, var_53c);
004b8e14      }
004b8e14      else if (eax_3 == 1)
004b8e17      {
004b8e53          int32_t var_540_6 = 0;
004b8e60          StringInfo::SetStringIDandTableEnum(&var_520, 0, var_53c);
004b8e17      }
004b8e17      else if (eax_3 == 2)
004b8e1a      {
004b8e4a          int32_t var_540_5 = 0;
004b8e60          StringInfo::SetStringIDandTableEnum(&var_520, 0, var_53c);
004b8e1a      }
004b8e1a      else
004b8e1a      {
004b8e27          StringInfo::SetStringIDandTableEnum(&var_520, 0, var_53c);
004b8e2c          int32_t edx_1 = var_52c;
004b8e35          var_53c = nullptr;
004b8e3d          StringInfo::AddVariable_Int(&var_520, 0, edx_1);
004b8e1a      }
004b8e1a      
004b8e69      var_53c = &var_520;
004b8e70      UIElement_Text::AppendStringInfo(this->m_pMainText, var_53c);
004b8e75      var_53c = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
004b8e75      
004b8e82      if ((InterlockedDecrement(var_53c) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
004b8e82      {
004b8e84          struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable;
004b8e86          var_53c = 1;
004b8e8a          vtable->__vecDelDtor(var_53c);
004b8e82      }
004b8e82      
004b8e90      StringInfo::~StringInfo(&var_520);
004b8e97      int32_t eax_8;
004b8e97      eax_8 = 1;
004b8ea0      return 1;
004b8cb0  }

004b8ea3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004b8eb0  uint8_t __thiscall gmCharacterInfoUI::UpdateEnduranceInfo(class gmCharacterInfoUI* this, class CACQualities const* arg2)

004b8eb0  {
004b8ebf      int32_t var_a4 = 1;
004b8ecc      int32_t var_98;
004b8ecc      CACQualities::InqAttribute(arg2, 1, &var_98, var_a4);
004b8ed1      var_a4 = 1;
004b8edc      uint32_t var_94;
004b8edc      CACQualities::InqAttribute(arg2, 2, &var_94, var_a4);
004b8ee5      void var_90;
004b8ee5      StringInfo::StringInfo(&var_90);
004b8ef2      int32_t eax_1 = (var_98 + var_94);
004b8ef9      char const* const esi_1;
004b8ef9      
004b8ef9      if (eax_1 <= 0xc8)
004b8efb          esi_1 = "None";
004b8ef9      else if (eax_1 <= 0x104)
004b8f09          esi_1 = &gmCharacterInfoUI::`vftable'.RecvNotice_BeginEnterWorld;
004b8f07      else if (eax_1 <= 0x140)
004b8f17          esi_1 = &gmCharacterInfoUI::`vftable'.RecvNotice_ShowPendingInPlayer;
004b8f15      else if (eax_1 > 0x17c)
004b8f23      {
004b8f31          esi_1 = &gmCharacterInfoUI::`vftable'.RecvNotice_BeginDrag;
004b8f31          
004b8f36          if (eax_1 > 0x1b8)
004b8f38              esi_1 = &gmCharacterInfoUI::`vftable'.RecvNotice_AddSalvageItem;
004b8f23      }
004b8f23      else
004b8f25          esi_1 = &gmCharacterInfoUI::`vftable'.RecvNotice_ItemListDragOver;
004b8f25      
004b8f43      var_a4 = 0x10000001;
004b8f52      var_a4 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_a4);
004b8f56      PStringBase<char>::PStringBase<char>(&var_a4, esi_1);
004b8f66      StringInfo::AddVariable_String(&var_90, 0, var_a4);
004b8f6f      int32_t ecx_7 = var_98;
004b8f73      int32_t eax_3 = (ecx_7 + (var_94 << 1));
004b8f7b      char const* const eax_4;
004b8f7b      
004b8f7b      if (eax_3 <= 0xc8)
004b8f7d          eax_4 = "None";
004b8f7b      else if (eax_3 <= 0x15a)
004b8f8b          eax_4 = &gmCharacterInfoUI::`vftable'.RecvNotice_BeginEnterWorld;
004b8f89      else if (eax_3 <= 0x1d6)
004b8f99          eax_4 = &gmCharacterInfoUI::`vftable'.RecvNotice_ShowPendingInPlayer;
004b8f97      else if (eax_3 > 0x244)
004b8fa5      {
004b8fb3          eax_4 = &gmCharacterInfoUI::`vftable'.RecvNotice_BeginDrag;
004b8fb3          
004b8fb8          if (eax_3 > 0x2b2)
004b8fba              eax_4 = &gmCharacterInfoUI::`vftable'.RecvNotice_AddSalvageItem;
004b8fa5      }
004b8fa5      else
004b8fa7          eax_4 = &gmCharacterInfoUI::`vftable'.RecvNotice_ItemListDragOver;
004b8fa7      
004b8fbf      var_a4 = ecx_7;
004b8fc3      PStringBase<char>::PStringBase<char>(&var_a4, eax_4);
004b8fd3      StringInfo::AddVariable_String(&var_90, 0, var_a4);
004b8fd8      class UIElement_Text* m_pMainText = this->m_pMainText;
004b8fe2      var_a4 = &var_90;
004b8fe3      UIElement_Text::AppendStringInfo(m_pMainText, var_a4);
004b8fec      StringInfo::~StringInfo(&var_90);
004b8ff2      int32_t eax_5;
004b8ff2      eax_5 = 1;
004b8ffb      return 1;
004b8eb0  }

004b8ffe                                                                                            90 90                                ..

004b9000  uint8_t __thiscall gmCharacterInfoUI::UpdateAugmentations(class gmCharacterInfoUI* this, class CACQualities const* arg2)

004b9000  {
004b9010      void var_90;
004b9010      StringInfo::StringInfo(&var_90);
004b901e      class StringInfo* var_b0 = nullptr;
004b902f      int32_t var_98 = 0;
004b9033      int32_t ebx = 0;
004b9035      int32_t var_94 = 0;
004b9039      CBaseQualities::InqInt(&arg2->vtable, 0x162, &var_94, 0, var_b0);
004b9039      
004b9042      if (var_94 > 0)
004b9042      {
004b904e          var_b0 = 0x10000001;
004b9058          class StringInfo* ecx_3 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_b0);
004b9065          int32_t var_b4_8;
004b9065          
004b9065          if ((var_94 - 1) > 0xa)
004b9065          {
004b910a          label_4b910a:
004b910a              var_b0 = ecx_3;
004b9112              PStringBase<char>::PStringBase<char>(&var_b0, "Unknown");
004b911d              var_b4_8 = 0;
004b9065          }
004b9065          else
004b906b              switch (var_94)
004b906b              {
004b9072                  case 1:
004b9072                  {
004b9072                      var_b0 = ecx_3;
004b907a                      PStringBase<char>::PStringBase<char>(&var_b0, "Unarmed Weapons");
004b9085                      int32_t var_b4_1 = 0;
004b9072                      break;
004b9072                  }
004b908b                  case 2:
004b908b                  {
004b908b                      var_b0 = ecx_3;
004b9093                      PStringBase<char>::PStringBase<char>(&var_b0, "Swords");
004b909d                      int32_t var_b4_2 = 0;
004b908b                      break;
004b908b                  }
004b90a0                  case 3:
004b90a0                  {
004b90a0                      var_b0 = ecx_3;
004b9112                      PStringBase<char>::PStringBase<char>(&var_b0, "Axes");
004b911d                      var_b4_8 = 0;
004b90a0                      break;
004b90a0                  }
004b90aa                  case 4:
004b90aa                  {
004b90aa                      var_b0 = ecx_3;
004b90b2                      PStringBase<char>::PStringBase<char>(&var_b0, "Maces");
004b90bd                      int32_t var_b4_4 = 0;
004b90aa                      break;
004b90aa                  }
004b90c0                  case 5:
004b90c0                  {
004b90c0                      var_b0 = ecx_3;
004b90c8                      PStringBase<char>::PStringBase<char>(&var_b0, "Spears");
004b90d2                      int32_t var_b4_5 = 0;
004b90c0                      break;
004b90c0                  }
004b90d5                  case 6:
004b90d5                  {
004b90d5                      var_b0 = ecx_3;
004b9112                      PStringBase<char>::PStringBase<char>(&var_b0, "Daggers");
004b911d                      var_b4_8 = 0;
004b90d5                      break;
004b90d5                  }
004b90df                  case 7:
004b90df                  {
004b90df                      var_b0 = ecx_3;
004b90e7                      PStringBase<char>::PStringBase<char>(&var_b0, "Staves");
004b90f2                      int32_t var_b4_6 = 0;
004b90df                      break;
004b90df                  }
004b906b                  case 8:
004b906b                  case 9:
004b906b                  case 0xa:
004b906b                  {
004b906b                      goto label_4b910a;
004b906b                  }
004b90f5                  case 0xb:
004b90f5                  {
004b90f5                      var_b0 = ecx_3;
004b90fd                      PStringBase<char>::PStringBase<char>(&var_b0, "Two Handed Weapons");
004b9107                      int32_t var_b4_7 = 0;
004b90f5                      break;
004b90f5                  }
004b906b              }
004b9122          StringInfo::AddVariable_String(&var_90, 0, var_b0);
004b9127          class UIElement_Text* m_pMainText = this->m_pMainText;
004b9131          var_b0 = &var_90;
004b9132          UIElement_Text::AppendStringInfo(m_pMainText, var_b0);
004b9042      }
004b9042      
004b9137      var_b0 = nullptr;
004b9145      var_94 = 0;
004b9149      CBaseQualities::InqInt(&arg2->vtable, 0x163, &var_94, 0, var_b0);
004b9149      
004b9152      if (var_94 > 0)
004b9152      {
004b915e          var_b0 = 0x10000001;
004b9168          class StringInfo* ecx_14 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_b0);
004b9177          int32_t var_b4_13;
004b9177          
004b9177          if ((var_94 - 8) > 4)
004b9177          {
004b91cc          label_4b91cc:
004b91cc              var_b0 = ecx_14;
004b91d4              PStringBase<char>::PStringBase<char>(&var_b0, "Unknown");
004b91de              var_b4_13 = 0;
004b9177          }
004b9177          else
004b9179              switch (var_94)
004b9179              {
004b9180                  case 8:
004b9180                  {
004b9180                      var_b0 = ecx_14;
004b9188                      PStringBase<char>::PStringBase<char>(&var_b0, "Bows");
004b9193                      int32_t var_b4_9 = 0;
004b9180                      break;
004b9180                  }
004b9196                  case 9:
004b9196                  {
004b9196                      var_b0 = ecx_14;
004b91d4                      PStringBase<char>::PStringBase<char>(&var_b0, "Crossbows");
004b91de                      var_b4_13 = 0;
004b9196                      break;
004b9196                  }
004b91a0                  case 0xa:
004b91a0                  {
004b91a0                      var_b0 = ecx_14;
004b91a8                      PStringBase<char>::PStringBase<char>(&var_b0, "Thrown Weapons");
004b91b3                      int32_t var_b4_11 = 0;
004b91a0                      break;
004b91a0                  }
004b9179                  case 0xb:
004b9179                  {
004b9179                      goto label_4b91cc;
004b9179                  }
004b91b6                  case 0xc:
004b91b6                  {
004b91b6                      var_b0 = ecx_14;
004b91be                      PStringBase<char>::PStringBase<char>(&var_b0, "Magical Spells");
004b91c9                      int32_t var_b4_12 = 0;
004b91b6                      break;
004b91b6                  }
004b9179              }
004b91e3          StringInfo::AddVariable_String(&var_90, 0, var_b0);
004b91ec          var_b0 = &var_90;
004b91f3          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004b9152      }
004b9152      
004b91f8      var_b0 = nullptr;
004b9206      var_94 = 0;
004b920a      CBaseQualities::InqInt(&arg2->vtable, 0x16a, &var_94, 0, var_b0);
004b920a      
004b9213      if (var_94 > 0)
004b9213      {
004b921a          var_b0 = 0x10000001;
004b9224          class StringInfo* ecx_23 = StringInfo::SetStringIDandTableEnum(&var_90, 0, var_b0);
004b9229          int32_t eax_5 = var_94;
004b922e          var_b0 = ecx_23;
004b922f          class StringInfo** ecx_24 = &var_b0;
004b9231          int32_t var_b4_17;
004b9231          
004b9231          if (eax_5 == 1)
004b9231          {
004b926a              PStringBase<char>::PStringBase<char>(ecx_24, "Primalist");
004b9275              var_b4_17 = 0;
004b9231          }
004b9231          else if (eax_5 == 2)
004b9234          {
004b9258              PStringBase<char>::PStringBase<char>(ecx_24, "Necromancer");
004b9262              int32_t var_b4_16 = 0;
004b9234          }
004b9234          else if (eax_5 == 3)
004b9237          {
004b9245              PStringBase<char>::PStringBase<char>(ecx_24, "Naturalist");
004b9250              int32_t var_b4_15 = 0;
004b9237          }
004b9237          else
004b9237          {
004b926a              PStringBase<char>::PStringBase<char>(ecx_24, "Unknown");
004b9275              var_b4_17 = 0;
004b9237          }
004b927a          StringInfo::AddVariable_String(&var_90, 0, var_b0);
004b927f          class UIElement_Text* m_pMainText_1 = this->m_pMainText;
004b9289          var_b0 = &var_90;
004b928a          UIElement_Text::AppendStringInfo(m_pMainText_1, var_b0);
004b9213      }
004b9213      
004b928f      var_b0 = 0x10000001;
004b92a6      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Heade…"), var_b0);
004b92ab      class UIElement_Text* m_pMainText_2 = this->m_pMainText;
004b92b5      var_b0 = &var_90;
004b92b6      UIElement_Text::AppendStringInfo(m_pMainText_2, var_b0);
004b92bb      var_b0 = nullptr;
004b92c9      var_98 = 0;
004b92cd      CBaseQualities::InqInt(&arg2->vtable, 0x14d, &var_98, 0, var_b0);
004b92d2      int32_t eax_10 = var_98;
004b92d2      
004b92d9      if (eax_10 > 5)
004b92d9      {
004b92db          ebx = (eax_10 - 5);
004b92de          var_98 = 5;
004b92f0      label_4b92f0:
004b92f0          var_b0 = 0x10000001;
004b9307          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b9310          int32_t eax_13;
004b9310          class StringInfo* edx_1;
004b9310          edx_1 = HIGHD(((int64_t)var_98));
004b9310          eax_13 = LOWD(((int64_t)var_98));
004b9311          var_b0 = edx_1;
004b931e          StringInfo::AddVariable_Int(&var_90, 0, eax_13);
004b9323          class UIElement_Text* m_pMainText_3 = this->m_pMainText;
004b932d          var_b0 = &var_90;
004b932e          UIElement_Text::AppendStringInfo(m_pMainText_3, var_b0);
004b932e          
004b9335          if (ebx > 0)
004b9335          {
004b9337              var_b0 = 0x10000001;
004b934e              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Spec_…"), var_b0);
004b935b              int32_t eax_16;
004b935b              class StringInfo* edx_2;
004b935b              edx_2 = HIGHD(((int64_t)ebx));
004b935b              eax_16 = LOWD(((int64_t)ebx));
004b935c              var_b0 = edx_2;
004b9363              StringInfo::AddVariable_Int(&var_90, 0, eax_16);
004b9368              class UIElement_Text* m_pMainText_4 = this->m_pMainText;
004b9372              var_b0 = &var_90;
004b9373              UIElement_Text::AppendStringInfo(m_pMainText_4, var_b0);
004b9335          }
004b92d9      }
004b92d9      else if (eax_10 > 0)
004b92ea          goto label_4b92f0;
004b92ea      
004b9378      var_b0 = nullptr;
004b9386      var_98 = 0;
004b938a      int32_t ebx_1 = 0;
004b938c      CBaseQualities::InqInt(&arg2->vtable, 0x14e, &var_98, 0, var_b0);
004b9391      int32_t eax_17 = var_98;
004b9391      
004b9398      if (eax_17 > 5)
004b9398      {
004b939a          ebx_1 = (eax_17 - 5);
004b939d          var_98 = 5;
004b93af      label_4b93af:
004b93af          var_b0 = 0x10000001;
004b93c6          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b93d5          int32_t eax_20;
004b93d5          class StringInfo* edx_3;
004b93d5          edx_3 = HIGHD(((int64_t)var_98));
004b93d5          eax_20 = LOWD(((int64_t)var_98));
004b93d6          var_b0 = edx_3;
004b93dd          StringInfo::AddVariable_Int(&var_90, 0, eax_20);
004b93e2          class UIElement_Text* m_pMainText_5 = this->m_pMainText;
004b93ec          var_b0 = &var_90;
004b93ed          UIElement_Text::AppendStringInfo(m_pMainText_5, var_b0);
004b93ed          
004b93f4          if (ebx_1 > 0)
004b93f4          {
004b93f6              var_b0 = 0x10000001;
004b940d              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Spec_…"), var_b0);
004b9414              int32_t eax_23;
004b9414              class StringInfo* edx_4;
004b9414              edx_4 = HIGHD(((int64_t)ebx_1));
004b9414              eax_23 = LOWD(((int64_t)ebx_1));
004b9415              var_b0 = edx_4;
004b9421              StringInfo::AddVariable_Int(&var_90, 0, eax_23);
004b942a              var_b0 = &var_90;
004b9431              UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004b93f4          }
004b9398      }
004b9398      else if (eax_17 > 0)
004b93a9          goto label_4b93af;
004b93a9      
004b9436      var_b0 = nullptr;
004b9444      var_98 = 0;
004b9448      int32_t ebx_2 = 0;
004b944a      CBaseQualities::InqInt(&arg2->vtable, 0x14f, &var_98, 0, var_b0);
004b944f      int32_t eax_24 = var_98;
004b944f      
004b9456      if (eax_24 > 5)
004b9456      {
004b9458          ebx_2 = (eax_24 - 5);
004b945b          var_98 = 5;
004b946d      label_4b946d:
004b946d          var_b0 = 0x10000001;
004b9484          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b948d          int32_t eax_27;
004b948d          class StringInfo* edx_5;
004b948d          edx_5 = HIGHD(((int64_t)var_98));
004b948d          eax_27 = LOWD(((int64_t)var_98));
004b948e          var_b0 = edx_5;
004b949a          StringInfo::AddVariable_Int(&var_90, 0, eax_27);
004b94a3          var_b0 = &var_90;
004b94aa          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004b94aa          
004b94b1          if (ebx_2 > 0)
004b94b1          {
004b94b3              var_b0 = 0x10000001;
004b94ca              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Spec_…"), var_b0);
004b94d1              int32_t eax_30;
004b94d1              class StringInfo* edx_6;
004b94d1              edx_6 = HIGHD(((int64_t)ebx_2));
004b94d1              eax_30 = LOWD(((int64_t)ebx_2));
004b94d2              var_b0 = edx_6;
004b94df              StringInfo::AddVariable_Int(&var_90, 0, eax_30);
004b94e4              class UIElement_Text* m_pMainText_6 = this->m_pMainText;
004b94ee              var_b0 = &var_90;
004b94ef              UIElement_Text::AppendStringInfo(m_pMainText_6, var_b0);
004b94b1          }
004b9456      }
004b9456      else if (eax_24 > 0)
004b9467          goto label_4b946d;
004b9467      
004b94f4      var_b0 = nullptr;
004b9502      var_98 = 0;
004b9506      int32_t ebx_3 = 0;
004b9508      CBaseQualities::InqInt(&arg2->vtable, 0x150, &var_98, 0, var_b0);
004b950d      int32_t eax_31 = var_98;
004b950d      
004b9514      if (eax_31 > 5)
004b9514      {
004b9516          ebx_3 = (eax_31 - 5);
004b9519          var_98 = 5;
004b952b      label_4b952b:
004b952b          var_b0 = 0x10000001;
004b9542          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b954b          int32_t eax_34;
004b954b          class StringInfo* edx_7;
004b954b          edx_7 = HIGHD(((int64_t)var_98));
004b954b          eax_34 = LOWD(((int64_t)var_98));
004b954c          var_b0 = edx_7;
004b9559          StringInfo::AddVariable_Int(&var_90, 0, eax_34);
004b955e          class UIElement_Text* m_pMainText_7 = this->m_pMainText;
004b9568          var_b0 = &var_90;
004b9569          UIElement_Text::AppendStringInfo(m_pMainText_7, var_b0);
004b9569          
004b9570          if (ebx_3 > 0)
004b9570          {
004b9572              var_b0 = 0x10000001;
004b9589              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Spec_…"), var_b0);
004b9596              int32_t eax_37;
004b9596              class StringInfo* edx_8;
004b9596              edx_8 = HIGHD(((int64_t)ebx_3));
004b9596              eax_37 = LOWD(((int64_t)ebx_3));
004b9597              var_b0 = edx_8;
004b959e              StringInfo::AddVariable_Int(&var_90, 0, eax_37);
004b95a3              class UIElement_Text* m_pMainText_8 = this->m_pMainText;
004b95ad              var_b0 = &var_90;
004b95ae              UIElement_Text::AppendStringInfo(m_pMainText_8, var_b0);
004b9570          }
004b9514      }
004b9514      else if (eax_31 > 0)
004b9525          goto label_4b952b;
004b9525      
004b95b3      var_b0 = nullptr;
004b95c1      var_98 = 0;
004b95c5      CBaseQualities::InqInt(&arg2->vtable, 0x152, &var_98, 0, var_b0);
004b95c5      
004b95ce      if (var_98 > 0)
004b95ce      {
004b95d0          var_b0 = 0x10000001;
004b95e7          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b95f6          int32_t eax_40;
004b95f6          class StringInfo* edx_9;
004b95f6          edx_9 = HIGHD(((int64_t)var_98));
004b95f6          eax_40 = LOWD(((int64_t)var_98));
004b95f7          var_b0 = edx_9;
004b95fe          StringInfo::AddVariable_Int(&var_90, 0, eax_40);
004b9603          class UIElement_Text* m_pMainText_9 = this->m_pMainText;
004b960d          var_b0 = &var_90;
004b960e          UIElement_Text::AppendStringInfo(m_pMainText_9, var_b0);
004b95ce      }
004b95ce      
004b9613      var_b0 = nullptr;
004b9621      var_98 = 0;
004b9625      CBaseQualities::InqInt(&arg2->vtable, 0x153, &var_98, 0, var_b0);
004b9625      
004b962e      if (var_98 > 0)
004b962e      {
004b9630          var_b0 = 0x10000001;
004b9647          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b9659          int32_t eax_44;
004b9659          class StringInfo* edx_10;
004b9659          edx_10 = HIGHD(((int64_t)(var_98 * 5)));
004b9659          eax_44 = LOWD(((int64_t)(var_98 * 5)));
004b965a          var_b0 = edx_10;
004b9661          StringInfo::AddVariable_Int(&var_90, 0, eax_44);
004b9666          class UIElement_Text* m_pMainText_10 = this->m_pMainText;
004b9670          var_b0 = &var_90;
004b9671          UIElement_Text::AppendStringInfo(m_pMainText_10, var_b0);
004b962e      }
004b962e      
004b9676      var_b0 = nullptr;
004b9684      var_98 = 0;
004b9688      CBaseQualities::InqInt(&arg2->vtable, 0x154, &var_98, 0, var_b0);
004b9688      
004b9691      if (var_98 > 0)
004b9691      {
004b9693          var_b0 = 0x10000001;
004b96aa          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b96bc          int32_t eax_48;
004b96bc          class StringInfo* edx_11;
004b96bc          edx_11 = HIGHD(((int64_t)(var_98 * 5)));
004b96bc          eax_48 = LOWD(((int64_t)(var_98 * 5)));
004b96bd          var_b0 = edx_11;
004b96c4          StringInfo::AddVariable_Int(&var_90, 0, eax_48);
004b96c9          class UIElement_Text* m_pMainText_11 = this->m_pMainText;
004b96d3          var_b0 = &var_90;
004b96d4          UIElement_Text::AppendStringInfo(m_pMainText_11, var_b0);
004b9691      }
004b9691      
004b96d9      var_b0 = nullptr;
004b96e7      var_98 = 0;
004b96eb      CBaseQualities::InqInt(&arg2->vtable, 0x156, &var_98, 0, var_b0);
004b96eb      
004b96f4      if (var_98 > 0)
004b96f4      {
004b96f6          var_b0 = 0x10000001;
004b970d          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b971c          int32_t eax_51;
004b971c          class StringInfo* edx_12;
004b971c          edx_12 = HIGHD(((int64_t)var_98));
004b971c          eax_51 = LOWD(((int64_t)var_98));
004b971d          var_b0 = edx_12;
004b9724          StringInfo::AddVariable_Int(&var_90, 0, eax_51);
004b9729          class UIElement_Text* m_pMainText_12 = this->m_pMainText;
004b9733          var_b0 = &var_90;
004b9734          UIElement_Text::AppendStringInfo(m_pMainText_12, var_b0);
004b96f4      }
004b96f4      
004b9739      var_b0 = nullptr;
004b9747      var_98 = 0;
004b974b      CBaseQualities::InqInt(&arg2->vtable, 0x157, &var_98, 0, var_b0);
004b974b      
004b9754      if (var_98 > 0)
004b9754      {
004b9756          var_b0 = 0x10000001;
004b976d          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b977c          int32_t eax_54;
004b977c          class StringInfo* edx_13;
004b977c          edx_13 = HIGHD(((int64_t)var_98));
004b977c          eax_54 = LOWD(((int64_t)var_98));
004b977d          var_b0 = edx_13;
004b9784          StringInfo::AddVariable_Int(&var_90, 0, eax_54);
004b9789          class UIElement_Text* m_pMainText_13 = this->m_pMainText;
004b9793          var_b0 = &var_90;
004b9794          UIElement_Text::AppendStringInfo(m_pMainText_13, var_b0);
004b9754      }
004b9754      
004b9799      var_b0 = nullptr;
004b97a7      var_98 = 0;
004b97ab      CBaseQualities::InqInt(&arg2->vtable, 0x158, &var_98, 0, var_b0);
004b97ab      
004b97b4      if (var_98 > 0)
004b97b4      {
004b97b6          var_b0 = 0x10000001;
004b97cd          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Spec_…"), var_b0);
004b97de          int32_t eax_58;
004b97de          class StringInfo* edx_14;
004b97de          edx_14 = HIGHD(((int64_t)(var_98 * 2)));
004b97de          eax_58 = LOWD(((int64_t)(var_98 * 2)));
004b97df          var_b0 = edx_14;
004b97e6          StringInfo::AddVariable_Int(&var_90, 0, eax_58);
004b97eb          class UIElement_Text* m_pMainText_14 = this->m_pMainText;
004b97f5          var_b0 = &var_90;
004b97f6          UIElement_Text::AppendStringInfo(m_pMainText_14, var_b0);
004b97b4      }
004b97b4      
004b97fb      var_b0 = nullptr;
004b9809      var_98 = 0;
004b980d      CBaseQualities::InqInt(&arg2->vtable, 0x16d, &var_98, 0, var_b0);
004b980d      
004b9816      if (var_98 > 0)
004b9816      {
004b9818          var_b0 = 0x10000001;
004b982f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Luminance_Base_…"), var_b0);
004b983e          int32_t eax_61;
004b983e          class StringInfo* edx_15;
004b983e          edx_15 = HIGHD(((int64_t)var_98));
004b983e          eax_61 = LOWD(((int64_t)var_98));
004b983f          var_b0 = edx_15;
004b9846          StringInfo::AddVariable_Int(&var_90, 0, eax_61);
004b984b          class UIElement_Text* m_pMainText_15 = this->m_pMainText;
004b9855          var_b0 = &var_90;
004b9856          UIElement_Text::AppendStringInfo(m_pMainText_15, var_b0);
004b9816      }
004b9816      
004b985b      var_b0 = nullptr;
004b9869      int32_t var_9c = 0;
004b986d      CBaseQualities::InqInt(&arg2->vtable, 0xda, &var_9c, 0, var_b0);
004b986d      
004b9876      if (var_9c > 0)
004b9876      {
004b9878          var_b0 = 0x10000001;
004b988f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_At…"), var_b0);
004b989e          int32_t eax_64;
004b989e          class StringInfo* edx_16;
004b989e          edx_16 = HIGHD(((int64_t)var_9c));
004b989e          eax_64 = LOWD(((int64_t)var_9c));
004b989f          var_b0 = edx_16;
004b98a6          StringInfo::AddVariable_Int(&var_90, 0, eax_64);
004b98ab          class UIElement_Text* m_pMainText_16 = this->m_pMainText;
004b98b5          var_b0 = &var_90;
004b98b6          UIElement_Text::AppendStringInfo(m_pMainText_16, var_b0);
004b9876      }
004b9876      
004b98bb      var_b0 = nullptr;
004b98c9      var_9c = 0;
004b98cd      CBaseQualities::InqInt(&arg2->vtable, 0xdb, &var_9c, 0, var_b0);
004b98cd      
004b98d6      if (var_9c > 0)
004b98d6      {
004b98d8          var_b0 = 0x10000001;
004b98ef          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_At…"), var_b0);
004b98fe          int32_t eax_67;
004b98fe          class StringInfo* edx_17;
004b98fe          edx_17 = HIGHD(((int64_t)var_9c));
004b98fe          eax_67 = LOWD(((int64_t)var_9c));
004b98ff          var_b0 = edx_17;
004b9906          StringInfo::AddVariable_Int(&var_90, 0, eax_67);
004b990b          class UIElement_Text* m_pMainText_17 = this->m_pMainText;
004b9915          var_b0 = &var_90;
004b9916          UIElement_Text::AppendStringInfo(m_pMainText_17, var_b0);
004b98d6      }
004b98d6      
004b991b      var_b0 = nullptr;
004b9929      var_9c = 0;
004b992d      CBaseQualities::InqInt(&arg2->vtable, 0xdc, &var_9c, 0, var_b0);
004b992d      
004b9936      if (var_9c > 0)
004b9936      {
004b9938          var_b0 = 0x10000001;
004b994f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_At…"), var_b0);
004b995e          int32_t eax_70;
004b995e          class StringInfo* edx_18;
004b995e          edx_18 = HIGHD(((int64_t)var_9c));
004b995e          eax_70 = LOWD(((int64_t)var_9c));
004b995f          var_b0 = edx_18;
004b9966          StringInfo::AddVariable_Int(&var_90, 0, eax_70);
004b996b          class UIElement_Text* m_pMainText_18 = this->m_pMainText;
004b9975          var_b0 = &var_90;
004b9976          UIElement_Text::AppendStringInfo(m_pMainText_18, var_b0);
004b9936      }
004b9936      
004b997b      var_b0 = nullptr;
004b9989      var_9c = 0;
004b998d      CBaseQualities::InqInt(&arg2->vtable, 0xdd, &var_9c, 0, var_b0);
004b998d      
004b9996      if (var_9c > 0)
004b9996      {
004b9998          var_b0 = 0x10000001;
004b99af          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_At…"), var_b0);
004b99be          int32_t eax_73;
004b99be          class StringInfo* edx_19;
004b99be          edx_19 = HIGHD(((int64_t)var_9c));
004b99be          eax_73 = LOWD(((int64_t)var_9c));
004b99bf          var_b0 = edx_19;
004b99c6          StringInfo::AddVariable_Int(&var_90, 0, eax_73);
004b99cb          class UIElement_Text* m_pMainText_19 = this->m_pMainText;
004b99d5          var_b0 = &var_90;
004b99d6          UIElement_Text::AppendStringInfo(m_pMainText_19, var_b0);
004b9996      }
004b9996      
004b99db      var_b0 = nullptr;
004b99e9      var_9c = 0;
004b99ed      CBaseQualities::InqInt(&arg2->vtable, 0xde, &var_9c, 0, var_b0);
004b99ed      
004b99f6      if (var_9c > 0)
004b99f6      {
004b99f8          var_b0 = 0x10000001;
004b9a0f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_At…"), var_b0);
004b9a1e          int32_t eax_76;
004b9a1e          class StringInfo* edx_20;
004b9a1e          edx_20 = HIGHD(((int64_t)var_9c));
004b9a1e          eax_76 = LOWD(((int64_t)var_9c));
004b9a1f          var_b0 = edx_20;
004b9a26          StringInfo::AddVariable_Int(&var_90, 0, eax_76);
004b9a2b          class UIElement_Text* m_pMainText_20 = this->m_pMainText;
004b9a35          var_b0 = &var_90;
004b9a36          UIElement_Text::AppendStringInfo(m_pMainText_20, var_b0);
004b99f6      }
004b99f6      
004b9a3b      var_b0 = nullptr;
004b9a49      var_9c = 0;
004b9a4d      CBaseQualities::InqInt(&arg2->vtable, 0xdf, &var_9c, 0, var_b0);
004b9a4d      
004b9a56      if (var_9c > 0)
004b9a56      {
004b9a58          var_b0 = 0x10000001;
004b9a6f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_At…"), var_b0);
004b9a7e          int32_t eax_79;
004b9a7e          class StringInfo* edx_21;
004b9a7e          edx_21 = HIGHD(((int64_t)var_9c));
004b9a7e          eax_79 = LOWD(((int64_t)var_9c));
004b9a7f          var_b0 = edx_21;
004b9a86          StringInfo::AddVariable_Int(&var_90, 0, eax_79);
004b9a8b          class UIElement_Text* m_pMainText_21 = this->m_pMainText;
004b9a95          var_b0 = &var_90;
004b9a96          UIElement_Text::AppendStringInfo(m_pMainText_21, var_b0);
004b9a56      }
004b9a56      
004b9a9b      var_b0 = nullptr;
004b9aa9      var_9c = 0;
004b9aad      CBaseQualities::InqInt(&arg2->vtable, 0xf0, &var_9c, 0, var_b0);
004b9aad      
004b9ab6      if (var_9c > 0)
004b9ab6      {
004b9ab8          var_b0 = 0x10000001;
004b9acf          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Re…"), var_b0);
004b9ade          int32_t eax_82;
004b9ade          class StringInfo* edx_22;
004b9ade          edx_22 = HIGHD(((int64_t)var_9c));
004b9ade          eax_82 = LOWD(((int64_t)var_9c));
004b9adf          var_b0 = edx_22;
004b9ae6          StringInfo::AddVariable_Int(&var_90, 0, eax_82);
004b9aeb          class UIElement_Text* m_pMainText_22 = this->m_pMainText;
004b9af5          var_b0 = &var_90;
004b9af6          UIElement_Text::AppendStringInfo(m_pMainText_22, var_b0);
004b9ab6      }
004b9ab6      
004b9afb      var_b0 = nullptr;
004b9b09      var_9c = 0;
004b9b0d      CBaseQualities::InqInt(&arg2->vtable, 0xf1, &var_9c, 0, var_b0);
004b9b0d      
004b9b16      if (var_9c > 0)
004b9b16      {
004b9b18          var_b0 = 0x10000001;
004b9b2f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Re…"), var_b0);
004b9b3e          int32_t eax_85;
004b9b3e          class StringInfo* edx_23;
004b9b3e          edx_23 = HIGHD(((int64_t)var_9c));
004b9b3e          eax_85 = LOWD(((int64_t)var_9c));
004b9b3f          var_b0 = edx_23;
004b9b46          StringInfo::AddVariable_Int(&var_90, 0, eax_85);
004b9b4b          class UIElement_Text* m_pMainText_23 = this->m_pMainText;
004b9b55          var_b0 = &var_90;
004b9b56          UIElement_Text::AppendStringInfo(m_pMainText_23, var_b0);
004b9b16      }
004b9b16      
004b9b5b      var_b0 = nullptr;
004b9b69      var_9c = 0;
004b9b6d      CBaseQualities::InqInt(&arg2->vtable, 0xf2, &var_9c, 0, var_b0);
004b9b6d      
004b9b76      if (var_9c > 0)
004b9b76      {
004b9b78          var_b0 = 0x10000001;
004b9b8f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Re…"), var_b0);
004b9b9e          int32_t eax_88;
004b9b9e          class StringInfo* edx_24;
004b9b9e          edx_24 = HIGHD(((int64_t)var_9c));
004b9b9e          eax_88 = LOWD(((int64_t)var_9c));
004b9b9f          var_b0 = edx_24;
004b9ba6          StringInfo::AddVariable_Int(&var_90, 0, eax_88);
004b9bab          class UIElement_Text* m_pMainText_24 = this->m_pMainText;
004b9bb5          var_b0 = &var_90;
004b9bb6          UIElement_Text::AppendStringInfo(m_pMainText_24, var_b0);
004b9b76      }
004b9b76      
004b9bbb      var_b0 = nullptr;
004b9bc9      var_9c = 0;
004b9bcd      CBaseQualities::InqInt(&arg2->vtable, 0xf3, &var_9c, 0, var_b0);
004b9bcd      
004b9bd6      if (var_9c > 0)
004b9bd6      {
004b9bd8          var_b0 = 0x10000001;
004b9bef          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Re…"), var_b0);
004b9bfe          int32_t eax_91;
004b9bfe          class StringInfo* edx_25;
004b9bfe          edx_25 = HIGHD(((int64_t)var_9c));
004b9bfe          eax_91 = LOWD(((int64_t)var_9c));
004b9bff          var_b0 = edx_25;
004b9c06          StringInfo::AddVariable_Int(&var_90, 0, eax_91);
004b9c0b          class UIElement_Text* m_pMainText_25 = this->m_pMainText;
004b9c15          var_b0 = &var_90;
004b9c16          UIElement_Text::AppendStringInfo(m_pMainText_25, var_b0);
004b9bd6      }
004b9bd6      
004b9c1b      var_b0 = nullptr;
004b9c29      var_9c = 0;
004b9c2d      CBaseQualities::InqInt(&arg2->vtable, 0x147, &var_9c, 0, var_b0);
004b9c2d      
004b9c36      if (var_9c > 0)
004b9c36      {
004b9c38          var_b0 = 0x10000001;
004b9c4f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Re…"), var_b0);
004b9c5e          int32_t eax_94;
004b9c5e          class StringInfo* edx_26;
004b9c5e          edx_26 = HIGHD(((int64_t)var_9c));
004b9c5e          eax_94 = LOWD(((int64_t)var_9c));
004b9c5f          var_b0 = edx_26;
004b9c66          StringInfo::AddVariable_Int(&var_90, 0, eax_94);
004b9c6b          class UIElement_Text* m_pMainText_26 = this->m_pMainText;
004b9c75          var_b0 = &var_90;
004b9c76          UIElement_Text::AppendStringInfo(m_pMainText_26, var_b0);
004b9c36      }
004b9c36      
004b9c7b      var_b0 = nullptr;
004b9c89      var_9c = 0;
004b9c8d      CBaseQualities::InqInt(&arg2->vtable, 0xf4, &var_9c, 0, var_b0);
004b9c8d      
004b9c96      if (var_9c > 0)
004b9c96      {
004b9c98          var_b0 = 0x10000001;
004b9caf          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Re…"), var_b0);
004b9cbe          int32_t eax_97;
004b9cbe          class StringInfo* edx_27;
004b9cbe          edx_27 = HIGHD(((int64_t)var_9c));
004b9cbe          eax_97 = LOWD(((int64_t)var_9c));
004b9cbf          var_b0 = edx_27;
004b9cc6          StringInfo::AddVariable_Int(&var_90, 0, eax_97);
004b9ccb          class UIElement_Text* m_pMainText_27 = this->m_pMainText;
004b9cd5          var_b0 = &var_90;
004b9cd6          UIElement_Text::AppendStringInfo(m_pMainText_27, var_b0);
004b9c96      }
004b9c96      
004b9cdb      var_b0 = nullptr;
004b9ce9      var_9c = 0;
004b9ced      CBaseQualities::InqInt(&arg2->vtable, 0xf5, &var_9c, 0, var_b0);
004b9ced      
004b9cf6      if (var_9c > 0)
004b9cf6      {
004b9cf8          var_b0 = 0x10000001;
004b9d0f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Re…"), var_b0);
004b9d1e          int32_t eax_100;
004b9d1e          class StringInfo* edx_28;
004b9d1e          edx_28 = HIGHD(((int64_t)var_9c));
004b9d1e          eax_100 = LOWD(((int64_t)var_9c));
004b9d1f          var_b0 = edx_28;
004b9d26          StringInfo::AddVariable_Int(&var_90, 0, eax_100);
004b9d2b          class UIElement_Text* m_pMainText_28 = this->m_pMainText;
004b9d35          var_b0 = &var_90;
004b9d36          UIElement_Text::AppendStringInfo(m_pMainText_28, var_b0);
004b9cf6      }
004b9cf6      
004b9d3b      var_b0 = nullptr;
004b9d49      var_9c = 0;
004b9d4d      CBaseQualities::InqInt(&arg2->vtable, 0xf6, &var_9c, 0, var_b0);
004b9d4d      
004b9d56      if (var_9c > 0)
004b9d56      {
004b9d58          var_b0 = 0x10000001;
004b9d6f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Re…"), var_b0);
004b9d7e          int32_t eax_103;
004b9d7e          class StringInfo* edx_29;
004b9d7e          edx_29 = HIGHD(((int64_t)var_9c));
004b9d7e          eax_103 = LOWD(((int64_t)var_9c));
004b9d7f          var_b0 = edx_29;
004b9d86          StringInfo::AddVariable_Int(&var_90, 0, eax_103);
004b9d8b          class UIElement_Text* m_pMainText_29 = this->m_pMainText;
004b9d95          var_b0 = &var_90;
004b9d96          UIElement_Text::AppendStringInfo(m_pMainText_29, var_b0);
004b9d56      }
004b9d56      
004b9d9b      var_b0 = nullptr;
004b9da9      var_9c = 0;
004b9dad      CBaseQualities::InqInt(&arg2->vtable, 0xe0, &var_9c, 0, var_b0);
004b9dad      
004b9db6      if (var_9c > 0)
004b9db6      {
004b9db8          var_b0 = 0x10000001;
004b9dcf          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Sp…"), var_b0);
004b9dd8          var_b0 = &var_90;
004b9ddf          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004b9db6      }
004b9db6      
004b9de4      var_b0 = nullptr;
004b9df2      var_9c = 0;
004b9df6      CBaseQualities::InqInt(&arg2->vtable, 0xe1, &var_9c, 0, var_b0);
004b9df6      
004b9dff      if (var_9c > 0)
004b9dff      {
004b9e01          var_b0 = 0x10000001;
004b9e18          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Sp…"), var_b0);
004b9e1d          class UIElement_Text* m_pMainText_30 = this->m_pMainText;
004b9e27          var_b0 = &var_90;
004b9e28          UIElement_Text::AppendStringInfo(m_pMainText_30, var_b0);
004b9dff      }
004b9dff      
004b9e2d      var_b0 = nullptr;
004b9e3b      var_9c = 0;
004b9e3f      CBaseQualities::InqInt(&arg2->vtable, 0xe2, &var_9c, 0, var_b0);
004b9e3f      
004b9e48      if (var_9c > 0)
004b9e48      {
004b9e4a          var_b0 = 0x10000001;
004b9e61          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Sp…"), var_b0);
004b9e66          class UIElement_Text* m_pMainText_31 = this->m_pMainText;
004b9e70          var_b0 = &var_90;
004b9e71          UIElement_Text::AppendStringInfo(m_pMainText_31, var_b0);
004b9e48      }
004b9e48      
004b9e76      var_b0 = nullptr;
004b9e84      var_9c = 0;
004b9e88      CBaseQualities::InqInt(&arg2->vtable, 0xe3, &var_9c, 0, var_b0);
004b9e88      
004b9e91      if (var_9c > 0)
004b9e91      {
004b9e93          var_b0 = 0x10000001;
004b9eaa          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Sp…"), var_b0);
004b9eb3          var_b0 = &var_90;
004b9eba          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004b9e91      }
004b9e91      
004b9ebf      var_b0 = nullptr;
004b9ecd      var_9c = 0;
004b9ed1      CBaseQualities::InqInt(&arg2->vtable, 0xe4, &var_9c, 0, var_b0);
004b9ed1      
004b9eda      if (var_9c > 0)
004b9eda      {
004b9edc          var_b0 = 0x10000001;
004b9ef3          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Sp…"), var_b0);
004b9ef8          class UIElement_Text* m_pMainText_32 = this->m_pMainText;
004b9f02          var_b0 = &var_90;
004b9f03          UIElement_Text::AppendStringInfo(m_pMainText_32, var_b0);
004b9eda      }
004b9eda      
004b9f08      var_b0 = nullptr;
004b9f16      var_9c = 0;
004b9f1a      CBaseQualities::InqInt(&arg2->vtable, 0x125, &var_9c, 0, var_b0);
004b9f1a      
004b9f23      if (var_9c > 0)
004b9f23      {
004b9f25          var_b0 = 0x10000001;
004b9f3c          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Sp…"), var_b0);
004b9f41          class UIElement_Text* m_pMainText_33 = this->m_pMainText;
004b9f4b          var_b0 = &var_90;
004b9f4c          UIElement_Text::AppendStringInfo(m_pMainText_33, var_b0);
004b9f23      }
004b9f23      
004b9f51      var_b0 = nullptr;
004b9f5f      var_9c = 0;
004b9f63      CBaseQualities::InqInt(&arg2->vtable, 0xe5, &var_9c, 0, var_b0);
004b9f63      
004b9f6c      if (var_9c > 0)
004b9f6c      {
004b9f6e          var_b0 = 0x10000001;
004b9f85          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Ex…"), var_b0);
004b9f8e          var_b0 = &var_90;
004b9f95          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004b9f6c      }
004b9f6c      
004b9f9a      var_b0 = nullptr;
004b9fa8      var_9c = 0;
004b9fac      CBaseQualities::InqInt(&arg2->vtable, 0xe6, &var_9c, 0, var_b0);
004b9fac      
004b9fb5      if (var_9c > 0)
004b9fb5      {
004b9fb7          var_b0 = 0x10000001;
004b9fce          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_In…"), var_b0);
004b9fd7          int32_t eax_113;
004b9fd7          class StringInfo* edx_30;
004b9fd7          edx_30 = HIGHD(((int64_t)var_9c));
004b9fd7          eax_113 = LOWD(((int64_t)var_9c));
004b9fd8          var_b0 = edx_30;
004b9fe4          StringInfo::AddVariable_Int(&var_90, 0, eax_113);
004b9fed          var_b0 = &var_90;
004b9ff4          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004b9fb5      }
004b9fb5      
004b9ff9      var_b0 = nullptr;
004ba007      var_9c = 0;
004ba00b      CBaseQualities::InqInt(&arg2->vtable, 0xe7, &var_9c, 0, var_b0);
004ba00b      
004ba014      if (var_9c > 0)
004ba014      {
004ba016          var_b0 = 0x10000001;
004ba02d          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Le…"), var_b0);
004ba036          int32_t eax_116;
004ba036          class StringInfo* edx_31;
004ba036          edx_31 = HIGHD(((int64_t)var_9c));
004ba036          eax_116 = LOWD(((int64_t)var_9c));
004ba037          var_b0 = edx_31;
004ba043          StringInfo::AddVariable_Int(&var_90, 0, eax_116);
004ba04c          var_b0 = &var_90;
004ba053          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004ba014      }
004ba014      
004ba058      var_b0 = nullptr;
004ba066      var_9c = 0;
004ba06a      CBaseQualities::InqInt(&arg2->vtable, 0xe8, &var_9c, 0, var_b0);
004ba06a      
004ba073      if (var_9c > 0)
004ba073      {
004ba075          var_b0 = 0x10000001;
004ba08c          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Sp…"), var_b0);
004ba091          class UIElement_Text* m_pMainText_34 = this->m_pMainText;
004ba09b          var_b0 = &var_90;
004ba09c          UIElement_Text::AppendStringInfo(m_pMainText_34, var_b0);
004ba073      }
004ba073      
004ba0a1      var_b0 = nullptr;
004ba0af      var_9c = 0;
004ba0b3      CBaseQualities::InqInt(&arg2->vtable, 0xe9, &var_9c, 0, var_b0);
004ba0b3      
004ba0bc      if (var_9c > 0)
004ba0bc      {
004ba0be          var_b0 = 0x10000001;
004ba0d5          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Cr…"), var_b0);
004ba0da          class UIElement_Text* m_pMainText_35 = this->m_pMainText;
004ba0e4          var_b0 = &var_90;
004ba0e5          UIElement_Text::AppendStringInfo(m_pMainText_35, var_b0);
004ba0bc      }
004ba0bc      
004ba0ea      var_b0 = nullptr;
004ba0f8      var_9c = 0;
004ba0fc      CBaseQualities::InqInt(&arg2->vtable, 0xea, &var_9c, 0, var_b0);
004ba0fc      
004ba105      if (var_9c > 0)
004ba105      {
004ba107          var_b0 = 0x10000001;
004ba11e          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Bo…"), var_b0);
004ba127          var_b0 = &var_90;
004ba12e          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004ba105      }
004ba105      
004ba133      var_b0 = nullptr;
004ba141      var_9c = 0;
004ba145      CBaseQualities::InqInt(&arg2->vtable, 0xeb, &var_9c, 0, var_b0);
004ba145      
004ba14e      if (var_9c > 0)
004ba14e      {
004ba150          var_b0 = 0x10000001;
004ba167          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Bo…"), var_b0);
004ba170          int32_t eax_122;
004ba170          class StringInfo* edx_32;
004ba170          edx_32 = HIGHD(((int64_t)var_9c));
004ba170          eax_122 = LOWD(((int64_t)var_9c));
004ba171          var_b0 = edx_32;
004ba17d          StringInfo::AddVariable_Int(&var_90, 0, eax_122);
004ba186          var_b0 = &var_90;
004ba18d          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004ba14e      }
004ba14e      
004ba192      var_b0 = nullptr;
004ba1a0      var_9c = 0;
004ba1a4      CBaseQualities::InqInt(&arg2->vtable, 0xec, &var_9c, 0, var_b0);
004ba1a4      
004ba1ad      if (var_9c > 0)
004ba1ad      {
004ba1af          var_b0 = 0x10000001;
004ba1c6          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Bo…"), var_b0);
004ba1cb          class UIElement_Text* m_pMainText_36 = this->m_pMainText;
004ba1d5          var_b0 = &var_90;
004ba1d6          UIElement_Text::AppendStringInfo(m_pMainText_36, var_b0);
004ba1ad      }
004ba1ad      
004ba1db      var_b0 = nullptr;
004ba1e9      var_9c = 0;
004ba1ed      CBaseQualities::InqInt(&arg2->vtable, 0xed, &var_9c, 0, var_b0);
004ba1ed      
004ba1f6      if (var_9c > 0)
004ba1f6      {
004ba1f8          var_b0 = 0x10000001;
004ba20f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Fa…"), var_b0);
004ba218          int32_t eax_126;
004ba218          class StringInfo* edx_33;
004ba218          edx_33 = HIGHD(((int64_t)var_9c));
004ba218          eax_126 = LOWD(((int64_t)var_9c));
004ba219          var_b0 = edx_33;
004ba226          StringInfo::AddVariable_Int(&var_90, 0, eax_126);
004ba22b          class UIElement_Text* m_pMainText_37 = this->m_pMainText;
004ba235          var_b0 = &var_90;
004ba236          UIElement_Text::AppendStringInfo(m_pMainText_37, var_b0);
004ba1f6      }
004ba1f6      
004ba23b      var_b0 = nullptr;
004ba249      var_9c = 0;
004ba24d      CBaseQualities::InqInt(&arg2->vtable, 0xee, &var_9c, 0, var_b0);
004ba24d      
004ba256      if (var_9c > 0)
004ba256      {
004ba258          var_b0 = 0x10000001;
004ba26f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_In…"), var_b0);
004ba278          int32_t eax_129;
004ba278          class StringInfo* edx_34;
004ba278          edx_34 = HIGHD(((int64_t)var_9c));
004ba278          eax_129 = LOWD(((int64_t)var_9c));
004ba279          var_b0 = edx_34;
004ba286          StringInfo::AddVariable_Int(&var_90, 0, eax_129);
004ba28b          class UIElement_Text* m_pMainText_38 = this->m_pMainText;
004ba295          var_b0 = &var_90;
004ba296          UIElement_Text::AppendStringInfo(m_pMainText_38, var_b0);
004ba256      }
004ba256      
004ba29b      var_b0 = nullptr;
004ba2a9      var_9c = 0;
004ba2ad      CBaseQualities::InqInt(&arg2->vtable, 0x126, &var_9c, 0, var_b0);
004ba2ad      
004ba2b6      if (var_9c > 0)
004ba2b6      {
004ba2b8          var_b0 = 0x10000001;
004ba2cf          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_In…"), var_b0);
004ba2d8          int32_t eax_132;
004ba2d8          class StringInfo* edx_35;
004ba2d8          edx_35 = HIGHD(((int64_t)var_9c));
004ba2d8          eax_132 = LOWD(((int64_t)var_9c));
004ba2d9          var_b0 = edx_35;
004ba2e6          StringInfo::AddVariable_Int(&var_90, 0, eax_132);
004ba2eb          class UIElement_Text* m_pMainText_39 = this->m_pMainText;
004ba2f5          var_b0 = &var_90;
004ba2f6          UIElement_Text::AppendStringInfo(m_pMainText_39, var_b0);
004ba2b6      }
004ba2b6      
004ba2fb      var_b0 = nullptr;
004ba309      var_9c = 0;
004ba30d      CBaseQualities::InqInt(&arg2->vtable, 0x127, &var_9c, 0, var_b0);
004ba30d      
004ba316      if (var_9c > 0)
004ba316      {
004ba318          var_b0 = 0x10000001;
004ba32f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_In…"), var_b0);
004ba338          int32_t eax_135;
004ba338          class StringInfo* edx_36;
004ba338          edx_36 = HIGHD(((int64_t)var_9c));
004ba338          eax_135 = LOWD(((int64_t)var_9c));
004ba339          var_b0 = edx_36;
004ba346          StringInfo::AddVariable_Int(&var_90, 0, eax_135);
004ba34b          class UIElement_Text* m_pMainText_40 = this->m_pMainText;
004ba355          var_b0 = &var_90;
004ba356          UIElement_Text::AppendStringInfo(m_pMainText_40, var_b0);
004ba316      }
004ba316      
004ba35b      var_b0 = nullptr;
004ba369      var_9c = 0;
004ba36d      CBaseQualities::InqInt(&arg2->vtable, 0x128, &var_9c, 0, var_b0);
004ba36d      
004ba376      if (var_9c > 0)
004ba376      {
004ba378          var_b0 = 0x10000001;
004ba38f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_In…"), var_b0);
004ba398          int32_t eax_138;
004ba398          class StringInfo* edx_37;
004ba398          edx_37 = HIGHD(((int64_t)var_9c));
004ba398          eax_138 = LOWD(((int64_t)var_9c));
004ba399          var_b0 = edx_37;
004ba3a6          StringInfo::AddVariable_Int(&var_90, 0, eax_138);
004ba3ab          class UIElement_Text* m_pMainText_41 = this->m_pMainText;
004ba3b5          var_b0 = &var_90;
004ba3b6          UIElement_Text::AppendStringInfo(m_pMainText_41, var_b0);
004ba376      }
004ba376      
004ba3bb      var_b0 = nullptr;
004ba3c9      var_9c = 0;
004ba3cd      CBaseQualities::InqInt(&arg2->vtable, 0x129, &var_9c, 0, var_b0);
004ba3cd      
004ba3d6      if (var_9c > 0)
004ba3d6      {
004ba3d8          var_b0 = 0x10000001;
004ba3ef          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_In…"), var_b0);
004ba3f8          int32_t eax_141;
004ba3f8          class StringInfo* edx_38;
004ba3f8          edx_38 = HIGHD(((int64_t)var_9c));
004ba3f8          eax_141 = LOWD(((int64_t)var_9c));
004ba3f9          var_b0 = edx_38;
004ba406          StringInfo::AddVariable_Int(&var_90, 0, eax_141);
004ba40b          class UIElement_Text* m_pMainText_42 = this->m_pMainText;
004ba415          var_b0 = &var_90;
004ba416          UIElement_Text::AppendStringInfo(m_pMainText_42, var_b0);
004ba3d6      }
004ba3d6      
004ba41b      var_b0 = nullptr;
004ba429      var_9c = 0;
004ba42d      CBaseQualities::InqInt(&arg2->vtable, 0x148, &var_9c, 0, var_b0);
004ba42d      
004ba436      if (var_9c > 0)
004ba436      {
004ba438          var_b0 = 0x10000001;
004ba44f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_In…"), var_b0);
004ba458          int32_t eax_144;
004ba458          class StringInfo* edx_39;
004ba458          edx_39 = HIGHD(((int64_t)var_9c));
004ba458          eax_144 = LOWD(((int64_t)var_9c));
004ba459          var_b0 = edx_39;
004ba466          StringInfo::AddVariable_Int(&var_90, 0, eax_144);
004ba46b          class UIElement_Text* m_pMainText_43 = this->m_pMainText;
004ba475          var_b0 = &var_90;
004ba476          UIElement_Text::AppendStringInfo(m_pMainText_43, var_b0);
004ba436      }
004ba436      
004ba47b      var_b0 = nullptr;
004ba489      var_9c = 0;
004ba48d      CBaseQualities::InqInt(&arg2->vtable, 0x12c, &var_9c, 0, var_b0);
004ba48d      
004ba496      if (var_9c > 0)
004ba496      {
004ba498          var_b0 = 0x10000001;
004ba4af          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterInfo_Augmentation_Sk…"), var_b0);
004ba4b8          int32_t eax_147;
004ba4b8          class StringInfo* edx_40;
004ba4b8          edx_40 = HIGHD(((int64_t)var_9c));
004ba4b8          eax_147 = LOWD(((int64_t)var_9c));
004ba4b9          var_b0 = edx_40;
004ba4c6          StringInfo::AddVariable_Int(&var_90, 0, eax_147);
004ba4cb          class UIElement_Text* m_pMainText_44 = this->m_pMainText;
004ba4d5          var_b0 = &var_90;
004ba4d6          UIElement_Text::AppendStringInfo(m_pMainText_44, var_b0);
004ba496      }
004ba496      
004ba4db      var_b0 = nullptr;
004ba4e9      var_9c = 0;
004ba4ed      CBaseQualities::InqInt(&arg2->vtable, 0x12d, &var_9c, 0, var_b0);
004ba4ed      
004ba4f6      if (var_9c > 0)
004ba4f6      {
004ba4f8          var_b0 = 0x10000001;
004ba50f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmCharacterInfoUI::`vftable'.RecvNotice_UpdateSquelchPanel), var_b0);
004ba518          int32_t eax_150;
004ba518          class StringInfo* edx_41;
004ba518          edx_41 = HIGHD(((int64_t)var_9c));
004ba518          eax_150 = LOWD(((int64_t)var_9c));
004ba519          var_b0 = edx_41;
004ba526          StringInfo::AddVariable_Int(&var_90, 0, eax_150);
004ba52b          class UIElement_Text* m_pMainText_45 = this->m_pMainText;
004ba535          var_b0 = &var_90;
004ba536          UIElement_Text::AppendStringInfo(m_pMainText_45, var_b0);
004ba4f6      }
004ba4f6      
004ba53b      var_b0 = nullptr;
004ba549      var_9c = 0;
004ba54d      CBaseQualities::InqInt(&arg2->vtable, 0x12e, &var_9c, 0, var_b0);
004ba54d      
004ba556      if (var_9c > 0)
004ba556      {
004ba558          var_b0 = 0x10000001;
004ba56f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmCharacterInfoUI::`vftable'.RecvNotice_SelectionChanged), var_b0);
004ba578          int32_t eax_153;
004ba578          class StringInfo* edx_42;
004ba578          edx_42 = HIGHD(((int64_t)var_9c));
004ba578          eax_153 = LOWD(((int64_t)var_9c));
004ba579          var_b0 = edx_42;
004ba586          StringInfo::AddVariable_Int(&var_90, 0, eax_153);
004ba58b          class UIElement_Text* m_pMainText_46 = this->m_pMainText;
004ba595          var_b0 = &var_90;
004ba596          UIElement_Text::AppendStringInfo(m_pMainText_46, var_b0);
004ba556      }
004ba556      
004ba59b      var_b0 = nullptr;
004ba5a9      var_9c = 0;
004ba5ad      CBaseQualities::InqInt(&arg2->vtable, 0x135, &var_9c, 0, var_b0);
004ba5ad      
004ba5b6      if (var_9c > 0)
004ba5b6      {
004ba5b8          var_b0 = 0x10000001;
004ba5cf          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmCharacterInfoUI::`vftable'.RecvNotice_FontSettingsChanged), var_b0);
004ba5d8          int32_t eax_156;
004ba5d8          class StringInfo* edx_43;
004ba5d8          edx_43 = HIGHD(((int64_t)var_9c));
004ba5d8          eax_156 = LOWD(((int64_t)var_9c));
004ba5d9          var_b0 = edx_43;
004ba5e6          StringInfo::AddVariable_Int(&var_90, 0, eax_156);
004ba5eb          class UIElement_Text* m_pMainText_47 = this->m_pMainText;
004ba5f5          var_b0 = &var_90;
004ba5f6          UIElement_Text::AppendStringInfo(m_pMainText_47, var_b0);
004ba5b6      }
004ba5b6      
004ba5fb      var_b0 = nullptr;
004ba609      var_9c = 0;
004ba60d      CBaseQualities::InqInt(&arg2->vtable, 0x136, &var_9c, 0, var_b0);
004ba60d      
004ba616      if (var_9c > 0)
004ba616      {
004ba618          var_b0 = 0x10000001;
004ba62f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmCharacterInfoUI::`vftable'.RecvNotice_OpenTrade), var_b0);
004ba638          int32_t eax_159;
004ba638          class StringInfo* edx_44;
004ba638          edx_44 = HIGHD(((int64_t)var_9c));
004ba638          eax_159 = LOWD(((int64_t)var_9c));
004ba639          var_b0 = edx_44;
004ba646          StringInfo::AddVariable_Int(&var_90, 0, eax_159);
004ba64b          class UIElement_Text* m_pMainText_48 = this->m_pMainText;
004ba655          var_b0 = &var_90;
004ba656          UIElement_Text::AppendStringInfo(m_pMainText_48, var_b0);
004ba616      }
004ba616      
004ba65b      var_b0 = nullptr;
004ba669      var_9c = 0;
004ba66d      CBaseQualities::InqInt(&arg2->vtable, 0x12a, &var_9c, 0, var_b0);
004ba66d      
004ba676      if (var_9c > 0)
004ba676      {
004ba678          var_b0 = 0x10000001;
004ba68f          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmCharacterInfoUI::`vftable'.RecvNotice_ChatCommand_RemoveFriend), var_b0);
004ba694          class UIElement_Text* m_pMainText_49 = this->m_pMainText;
004ba69e          var_b0 = &var_90;
004ba69f          UIElement_Text::AppendStringInfo(m_pMainText_49, var_b0);
004ba676      }
004ba676      
004ba6a4      var_b0 = nullptr;
004ba6b2      var_9c = 0;
004ba6b6      CBaseQualities::InqInt(&arg2->vtable, 0x12b, &var_9c, 0, var_b0);
004ba6b6      
004ba6bf      if (var_9c > 0)
004ba6bf      {
004ba6c1          var_b0 = 0x10000001;
004ba6d8          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmCharacterInfoUI::`vftable'.RecvNotice_SetSelectedSpell), var_b0);
004ba6e1          var_b0 = &var_90;
004ba6e8          UIElement_Text::AppendStringInfo(this->m_pMainText, var_b0);
004ba6bf      }
004ba6bf      
004ba6ed      var_b0 = nullptr;
004ba6fb      var_9c = 0;
004ba6ff      CBaseQualities::InqInt(&arg2->vtable, 0x146, &var_9c, 0, var_b0);
004ba6ff      
004ba708      if (var_9c > 0)
004ba708      {
004ba70a          var_b0 = 0x10000001;
004ba721          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(&gmCharacterInfoUI::`vftable'.RecvNotice_CastCurrentSpell), var_b0);
004ba726          class UIElement_Text* m_pMainText_50 = this->m_pMainText;
004ba730          var_b0 = &var_90;
004ba731          UIElement_Text::AppendStringInfo(m_pMainText_50, var_b0);
004ba708      }
004ba708      
004ba73a      StringInfo::~StringInfo(&var_90);
004ba742      int32_t eax_163;
004ba742      eax_163 = 1;
004ba74b      return 1;
004b9000  }

004ba74e                                            8b ff                                                                ..
004ba750  uint32_t jump_table_4ba750[0xb] = 
004ba750  {
004ba750      [0x0] =  0x004b9072
004ba754      [0x1] =  0x004b908b
004ba758      [0x2] =  0x004b90a0
004ba75c      [0x3] =  0x004b90aa
004ba760      [0x4] =  0x004b90c0
004ba764      [0x5] =  0x004b90d5
004ba768      [0x6] =  0x004b90df
004ba76c      [0x7] =  0x004b910a
004ba770      [0x8] =  0x004b910a
004ba774      [0x9] =  0x004b910a
004ba778      [0xa] =  0x004b90f5
004ba77c  }
004ba77c  uint32_t jump_table_4ba77c[0x5] = 
004ba77c  {
004ba77c      [0x0] =  0x004b9180
004ba780      [0x1] =  0x004b9196
004ba784      [0x2] =  0x004b91a0
004ba788      [0x3] =  0x004b91cc
004ba78c      [0x4] =  0x004b91b6
004ba790  }

004ba790  uint8_t __thiscall gmCharacterInfoUI::Update(class gmCharacterInfoUI* this, class CACQualities const* arg2)

004ba790  {
004ba7a3      if ((((int8_t)(this->__bitfield164 >> 1)) & 1) == 0)
004ba7ae          return 0;
004ba7ae      
004ba7ba      void var_90;
004ba7ba      StringInfo::StringInfo(&var_90);
004ba7c8      void* __return;
004ba7c8      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &data_794320);
004ba7db      StringInfo::SetLiteralValue(&var_90, &__return, 1);
004ba7ea      int32_t* edi_1 = ((char*)__return - 0x14);
004ba7ea      
004ba7f9      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
004ba801          **(uint32_t**)edi_1(1);
004ba801      
004ba811      class PStringBase<unsigned short>* eax_4 = StringInfo::GetString(&var_90, &__return, 0);
004ba81d      UIElement_Text::SetText(this->m_pMainText, eax_4);
004ba826      int32_t* edi_3 = ((char*)__return - 0x14);
004ba826      
004ba835      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
004ba83d          **(uint32_t**)edi_3(1);
004ba83d      
004ba843      void var_120;
004ba843      StringInfo::StringInfo(&var_120);
004ba851      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &data_79c288);
004ba861      StringInfo::SetLiteralValue(&var_120, &__return, 1);
004ba86a      int32_t* edi_5 = ((char*)__return - 0x14);
004ba86a      
004ba879      if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
004ba881          **(uint32_t**)edi_5(1);
004ba881      
004ba88d      gmCharacterInfoUI::UpdatePlayerBirthAgeDeaths(this, arg2);
004ba89d      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_120);
004ba8a5      gmCharacterInfoUI::UpdateEnduranceInfo(this, arg2);
004ba8b5      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_120);
004ba8bd      gmCharacterInfoUI::UpdateInnateAttributeInfo(this, arg2);
004ba8cd      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_120);
004ba8d5      gmCharacterInfoUI::UpdateFakeSkills(this, arg2);
004ba8e5      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_120);
004ba8ed      gmCharacterInfoUI::UpdateAugmentations(this, arg2);
004ba8fd      UIElement_Text::AppendStringInfo(this->m_pMainText, &var_120);
004ba905      gmCharacterInfoUI::UpdateLoad(this, arg2);
004ba90e      StringInfo::~StringInfo(&var_120);
004ba91a      StringInfo::~StringInfo(&var_90);
004ba921      int32_t eax_9;
004ba921      eax_9 = 1;
004ba92a      return 1;
004ba790  }

004ba92d                                         90 90 90                                                               ...

004ba930  void __thiscall gmCharacterInfoUI::RecvNotice_PlayerDescReceived(class gmCharacterInfoUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004ba930  {
004ba93b      gmCharacterInfoUI::Update(((char*)this - 0x5f8), arg2);
004ba930  }

004ba943           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ba950  uint8_t __fastcall gmCharacterInfoUI::Update(class gmCharacterInfoUI* this)

004ba950  {
004ba962      int32_t __saved_edi;
004ba962      int32_t* esp = &__saved_edi;
004ba962      
004ba963      if (((this->__bitfield164 >> 1) & 1) != 0)
004ba963      {
004ba969          struct Turbine_GUID* var_14;
004ba969          int32_t* var_28_1 = &var_14;
004ba96e          struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004ba976          var_14 = nullptr;
004ba981          class TResult __return;
004ba981          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28_1);
004ba986          struct Turbine_GUID* esi_1 = var_14;
004ba98f          var_2c = esi_1;
004ba991          int32_t var_28_2 = 0;
004ba994          struct Turbine_GUID* eax_3 = var_2c;
004ba998          int32_t var_8 = 0;
004ba99c          int32_t var_4_1 = 0;
004ba99c          
004ba9a0          if (eax_3 != 0)
004ba9a6              *(uint32_t*)(eax_3->m_data1 + 0x10)();
004ba9a6          
004ba9b2          esp = &var_2c;
004ba9b9          void var_c;
004ba9b9          int32_t ebx_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004ba9b9          
004ba9bb          if (esi_1 != 0)
004ba9c1              *(uint32_t*)(esi_1->m_data1 + 0x14)();
004ba9c1          
004ba9c4          class TResult __return_1 = __return;
004ba9c4          
004ba9ca          if (__return_1 != 0)
004ba9ca          {
004ba9ce              if (ebx_1 >= 0)
004ba9ce              {
004ba9ed                  ebx_1 = gmCharacterInfoUI::Update(this, __return_1);
004ba9ef                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004ba9fb                  return ebx_1;
004ba9ce              }
004ba9ce              
004ba9d4              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004ba9d4              esp = &__saved_edi;
004ba9ca          }
004ba963      }
004ba963      
004ba9d7      uint32_t eax_1;
004ba9d7      eax_1 = 0;
004ba9d9      *(uint32_t*)esp;
004ba9d9      esp[1];
004ba9d9      esp[2];
004ba9d9      esp[3];
004ba9e0      return 0;
004ba950  }

004ba9fc                                                                                      90 90 90 90                              ....

004baa00  enum UIElementMessageListenResult __thiscall gmCharacterInfoUI::ListenToElementMessage(class gmCharacterInfoUI* this, struct UIElementMessageInfo const* arg2)

004baa00  {
004baa18      if ((arg2->idMessage == 0x18 && (arg2->pElement == this && arg2->dwParam1 != 0)))
004baa1a          gmCharacterInfoUI::Update(this);
004baa1a      
004baa29      return UIElement::ListenToElementMessage(this, arg2);
004baa00  }

004baa2c                                      90 90 90 90                                                              ....

004baa30  void __fastcall gmCharacterInfoUI::RecvNotice_LoadChanged(class gmCharacterInfoUI* this, float arg2)

004baa30  {
004baa36      gmCharacterInfoUI::Update(((char*)this - 0x5f8));
004baa30  }

004baa3e                                                                                            90 90                                ..

004baa40  void __fastcall gmCharacterInfoUI::OnQualityRemoved(class gmCharacterInfoUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004baa40  {
004baa46      gmCharacterInfoUI::Update(((char*)this - 0x5fc));
004baa40  }

004baa4e                                            90 90                                                                ..

004baa50  void __thiscall gmBookUI::OnObjectRangeExit(class gmBookUI* this, uint32_t arg2)

004baa50  {
004baa57      if (arg2 != this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4])
004baa70          return;
004baa70      
004baa65      arg2 = 0;
004baa6d      /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x5fc) + 0x18) */
004baa50  }

004baa73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004baa80  void __thiscall gmBookUI::gmBookUI(class gmBookUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004baa80  {
004baa91      UIElement_Field::UIElement_Field(this, arg2, arg3);
004baa9c      this->vtable = &gmUrgentAssistanceUI::`vftable';
004baaa6      this->vtable = &ObjectRangeHandler::`vftable';
004baab2      this->vtable = 0x7b31a8;
004baab8      this->vtable = &gmBookUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004baac2      this->vtable = &gmBookUI::`vftable';
004baacc      __builtin_memset(&this->m_nextButton, 0, 0x24);
004bab02      this->curPage = 0xffffffff;
004bab0c      this->requestPending = 0;
004bab12      class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004bab1e      this->inscription.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004bab24      InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_2 + 4));
004bab26      this->scribeID = 0;
004bab2c      class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004bab38      this->scribeName.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004bab3e      InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
004baa80  }

004bab48                          90 90 90 90 90 90 90 90                                                          ........

004bab50  class UIElement* __thiscall gmBookUI::DynamicCast(class gmBookUI* this, uint32_t arg2) __pure

004bab50  {
004bab5c      if (arg2 == 0x10000019)
004bab69          return this;
004bab69      
004bab63      int32_t edx_1;
004bab63      edx_1 = arg2 != 3;
004bab67      return (this & (edx_1 - 1));
004bab50  }

004bab6c                                      90 90 90 90                                                              ....

004bab70  uint32_t gmBookUI::GetUIElementType(class gmBookUI const* this @ ecx) __pure

004bab70  {
004bab75      return 0x10000019;
004bab70  }

004bab76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004bab80  void __fastcall gmBookUI::~gmBookUI(class gmBookUI* this)

004bab80  {
004bab92      this->vtable = 0x7b31a8;
004bab8b      this->vtable = &gmBookUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004bab84      this->vtable = &gmBookUI::`vftable';
004babab      CPlayerSystem::UnregisterAllObjectRangeHandlers(CPlayerSystem::GetPlayerSystem(), &this->vtable);
004babb0      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
004babb0      
004babb7      if (eax_2 != 0)
004babb9          eax_2->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004babb9      
004babc1      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->scribeName.m_buffer;
004babc1      
004babda      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004babdc          m_buffer->vtable->__vecDelDtor(1);
004babdc      
004babe4      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->inscription.m_buffer;
004babe4      
004babf7      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004babf9          m_buffer_1->vtable->__vecDelDtor(1);
004babf9      
004bab8b      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bac09      NoticeHandler::~NoticeHandler(&this->vtable);
004bac13      /* tailcall */
004bac13      return UIElement_Field::~UIElement_Field(this);
004bab80  }

004bac18                                                                          90 90 90 90 90 90 90 90                          ........

004bac20  class UIElement* gmBookUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004bac20  {
004bac25      void* eax = operator new(0x638);
004bac25      
004bac2f      if (eax == 0)
004bac45          return 0;
004bac45      
004bac42      return gmBookUI::gmBookUI(eax, arg1, arg2);
004bac20  }

004bac46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bac50  void __stdcall gmBookUI::SetEditable(class gmBookUI* this @ ecx, class UIElement_Text* arg2, int32_t arg3)

004bac50  {
004bac59      int32_t* var_8 = nullptr;
004bac61      int32_t* var_4 = nullptr;
004bac69      BaseProperty::SetPropertyName(&var_8, 0x16);
004bac69      
004bac74      if (var_4 != 0)
004bac74      {
004bac7a          BaseProperty::CheckCopyOnWrite(&var_8);
004bac8b          int32_t edx_1;
004bac8b          edx_1 = arg3 != 0;
004bac8f          *(uint32_t*)(*(uint32_t*)var_4 + 0x74)(edx_1);
004bac74      }
004bac74      
004bac96      arg2->vtable->SetProperty(&var_8);
004baca3      int32_t* eax_3 = var_8;
004baca3      
004baca9      if (eax_3 != 0)
004baca9      {
004bacb3          int32_t edx_3 = (eax_3[1] - 1);
004bacb0          eax_3[1] = edx_3;
004bacb0          
004bacb8          if (edx_3 == 0)
004bacbe              **(uint32_t**)eax_3(1);
004bacbe          
004bacc0          var_8 = nullptr;
004baca9      }
004baca9      
004bacce      if (var_4 != 0)
004bacce      {
004bacd8          int32_t edx_5 = (var_4[1] - 1);
004bacd5          var_4[1] = edx_5;
004bacd5          
004bacdd          if (edx_5 == 0)
004bace3              **(uint32_t**)var_4(1);
004bacce      }
004bac50  }

004baceb                                   90 90 90 90 90                                                             .....

004bacf0  void __thiscall PageData::SetPageText(class PageData* this, class AC1Legacy::PStringBase<char> const* arg2)

004bacf0  {
004bacfb      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->pageText.m_buffer;
004bacfb      
004bad00      if (m_buffer_1 == arg2->m_buffer)
004bad34          return;
004bad34      
004bad12      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004bad14          m_buffer_1->vtable->__vecDelDtor(1);
004bad14      
004bad1c      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
004bad1e      this->pageText.m_buffer = m_buffer;
004bad27      arg2 = &m_buffer->m_cRef;
004bad2b      /* tailcall */
004bad2b      return InterlockedIncrement();
004bacf0  }

004bad37                                                                       90 90 90 90 90 90 90 90 90                         .........

004bad40  void* __thiscall gmBookUI::`scalar deleting destructor'(class gmBookUI* this, uint32_t arg2)

004bad40  {
004bad43      gmBookUI::~gmBookUI(this);
004bad43      
004bad4d      if ((arg2 & 1) != 0)
004bad50          operator delete(this);
004bad50      
004bad5b      return this;
004bad40  }

004bad5e                                                                                            90 90                                ..

004bad60  void __fastcall gmBookUI::PostInit(class gmBookUI* this)

004bad60  {
004bad64      UIElement::PostInit(this);
004bad70      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000010f);
004bad77      class UIElement_Text* eax_1;
004bad77      
004bad77      if (eax == 0)
004bad87          eax_1 = nullptr;
004bad77      else
004bad7f          eax_1 = eax->vtable->DynamicCast(0xc);
004bad7f      
004bad90      this->m_titleText = eax_1;
004bad96      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x10000111);
004bad9d      class UIElement_Text* eax_3;
004bad9d      
004bad9d      if (eax_2 == 0)
004badad          eax_3 = nullptr;
004bad9d      else
004bada5          eax_3 = eax_2->vtable->DynamicCast(0xc);
004bada5      
004badb6      this->m_pageText = eax_3;
004badc8      this->m_nextButton = UIElement::GetChildRecursive(this, 0x10000115);
004badda      this->m_prevButton = UIElement::GetChildRecursive(this, 0x10000114);
004bade0      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x10000470);
004bade7      class UIElement_Menu* eax_7;
004bade7      
004bade7      if (eax_6 == 0)
004badf7          eax_7 = nullptr;
004bade7      else
004badef          eax_7 = eax_6->vtable->DynamicCast(6);
004badef      
004badfb      this->m_pageMenu = eax_7;
004badfb      
004bae01      if (eax_7 != 0)
004bae01      {
004bae0a          class UIElement* eax_8 = UIElement::GetChildRecursive(eax_7, 0x1000047b);
004bae11          class UIElement_Text* eax_9;
004bae11          
004bae11          if (eax_8 == 0)
004bae21              eax_9 = nullptr;
004bae11          else
004bae19              eax_9 = eax_8->vtable->DynamicCast(0xc);
004bae19          
004bae23          this->m_menuSelectionPageNumText = eax_9;
004bae01      }
004bae01      
004bae29      class GlobalEventHandler* eax_10 = GlobalEventHandler::GetGlobalEventHandler();
004bae30      eax_10->vtable->RegisterNoticeHandler(0x4dd1e9, &this->vtable);
004bae43      eax_10->vtable->RegisterNoticeHandler(0x4dd1ea, &this->vtable);
004bae50      eax_10->vtable->RegisterNoticeHandler(0x4dd1eb, &this->vtable);
004bae5d      eax_10->vtable->RegisterNoticeHandler(0x4dd1ec, &this->vtable);
004bad60  }

004bae6d                                         90 90 90                                                               ...

004bae70  void gmBookUI::Register()

004bae70  {
004bae7a      UIElement::RegisterElementClass(0x10000019, gmBookUI::Create);
004bae70  }

004bae83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004bae90  void __thiscall gmBookUI::AddPageInfo(class gmBookUI* this, int32_t arg2, class StringInfo const* arg3)

004bae90  {
004bae9b      int32_t edi = arg2;
004baea1      class UIElement_Text* eax = UIElement_Menu::ReplaceTextItem(this->m_pageMenu, arg3, edi);
004baea1      
004baea8      if (eax != 0)
004baea8      {
004baeb1          class UIElement* eax_1 = UIElement::GetChildRecursive(eax, 0x10000479);
004baeb1          
004baeb8          if (eax_1 != 0)
004baeb8          {
004baec1              class UIElement_Text* eax_2 = eax_1->vtable->DynamicCast(0xc);
004baec1              
004baecb              if (eax_2 != 0)
004baecb              {
004baece                  int32_t var_c_1 = (edi + 1);
004baee6                  UIElement_Text::SetText(eax_2, PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, &gmBookUI::`vftable'.RecvNotice_AddSalvageItem));
004baeef                  int32_t* esi_3 = (arg2 - 0x14);
004baeef                  
004baf02                  if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004baf0a                      **(uint32_t**)esi_3(1);
004baecb              }
004baeb8          }
004baea8      }
004bae90  }

004baf11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004baf20  void __thiscall gmBookUI::UpdateMenuSelectionInfo(class gmBookUI* this, int32_t arg2)

004baf20  {
004baf2b      if (this->m_menuSelectionPageNumText != 0)
004baf2b      {
004baf32          int32_t var_8_1 = (arg2 + 1);
004baf3f          class PStringBase<unsigned short>* eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, &gmBookUI::`vftable'.RecvNotice_AddSalvageItem);
004baf4e          UIElement_Text::SetText(this->m_menuSelectionPageNumText, eax_3);
004baf57          int32_t* esi_2 = (arg2 - 0x14);
004baf57          
004baf6a          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004baf72              **(uint32_t**)esi_2(1);
004baf2b      }
004baf20  }

004baf78                                                                          90 90 90 90 90 90 90 90                          ........

004baf80  void __fastcall gmBookUI::UpdateMenu(class gmBookUI* this)

004baf80  {
004baf86      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3;
004baf86      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_3;
004baf87      class gmBookUI* this_4;
004baf87      class gmBookUI* this_2 = this_4;
004baf88      int32_t edi;
004baf88      int32_t var_bc = edi;
004baf88      int32_t* esp = &var_bc;
004baf89      class gmBookUI* this_1 = this;
004baf91      class gmBookUI* this_3 = this_1;
004baf95      UIElement_Menu::Flush(this_1->m_pageMenu);
004baf95      
004bafa4      if (this_1->pageDataList != 0)
004bafa4      {
004bafae          void var_90;
004bafae          StringInfo::StringInfo(&var_90);
004bafb7          struct Turbine_GUID* var_ac;
004bafb7          int32_t* var_c0_1 = &var_ac;
004bafbc          struct Turbine_GUID* var_c4 = &PlayerDesc_ClassType;
004bafc2          var_ac = nullptr;
004bafcd          class TResult __return;
004bafcd          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_c4, var_c0_1);
004bafd2          struct Turbine_GUID* esi = var_ac;
004bafdb          var_c4 = esi;
004bafdd          int32_t var_c0_2 = 0;
004bafe0          struct Turbine_GUID* eax_2 = var_c4;
004bafe4          int32_t var_98 = 0;
004bafe8          int32_t var_94_1 = 0;
004bafe8          
004bafec          if (eax_2 != 0)
004baff2              *(uint32_t*)(eax_2->m_data1 + 0x10)();
004baff2          
004bb007          void* var_a8;
004bb007          var_ac = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_98, &var_a8);
004bb007          
004bb00b          if (esi != 0)
004bb011              *(uint32_t*)(esi->m_data1 + 0x14)();
004bb011          
004bb01a          class PageData* i = this_1->pageDataList->first;
004bb01d          int32_t var_b0 = 0;
004bb029          int32_t* var_a0;
004bb029          
004bb029          if (i != 0)
004bb029          {
004bb14d              do
004bb14d              {
004bb03d                  void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_c8_4;
004bb03d                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_2;
004bb03d                  
004bb03d                  if (*(int32_t*)((char*)ArrayPropertyValue::AccessArray(i)->m_data + 8) != 1)
004bb03d                  {
004bb080                      if ((var_a0 == 0 || var_ac < 0))
004bb080                      {
004bb0ee                      label_4bb0ee:
004bb0ee                          void* __offset(BaseProperty, 0x14) var_c8_7 = (ArrayPropertyValue::AccessArray(i)->m_data + 0x14);
004bb0fb                          PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, Formatted, &gmBookUI::`vftable'.RecvNotice_ShowPendingInPlayer);
004bb10e                          StringInfo::SetLiteralValue(&var_98, &__return, 1);
004bb117                          edi_2 = (__return - 0x14);
004bb11d                          var_c8_4 = ((char*)edi_2 + 4);
004bb11d                          goto label_4bb11e;
004bb080                      }
004bb080                      
004bb089                      if (PlayerDesc::PlayerIsPSR(var_a0) == 0)
004bb089                          goto label_4bb0ee;
004bb089                      
004bb08d                      class SmartArray<BaseProperty,1>* eax_10 = ArrayPropertyValue::AccessArray(i);
004bb09a                      char (* var_c8_5)[0x1] = &i->authorAccount.m_buffer->m_data;
004bb09e                      void* __offset(BaseProperty, 0x14) var_cc_2 = (eax_10->m_data + 0x14);
004bb0ab                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a8, Formatted, &gmBookUI::`vftable'.RecvNotice_BeginEnterWorld);
004bb0be                      StringInfo::SetLiteralValue(&var_98, &var_a8, 1);
004bb0c7                      int32_t* edi_4 = ((char*)var_a8 - 0x14);
004bb0c7                      
004bb0d6                      if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
004bb0de                          **(uint32_t**)edi_4(1);
004bb03d                  }
004bb03d                  else
004bb03d                  {
004bb03f                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004bb044                      PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004bb04c                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004bb05d                      StringInfo::SetLiteralValue(&var_98, &PStringBase<unsigned short>::s_NullBuffer_2, 1);
004bb066                      edi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
004bb06c                      var_c8_4 = ((char*)edi_2 + 4);
004bb11e                  label_4bb11e:
004bb11e                      
004bb126                      if ((InterlockedDecrement(var_c8_4) == 0 && edi_2 != 0))
004bb12e                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
004bb03d                  }
004bb13e                  gmBookUI::AddPageInfo(this_2, var_b0, &var_98);
004bb143                  i = i->next;
004bb149                  var_b0 += 1;
004bb14d              } while (i != 0);
004bb14d              
004bb153              this_1 = this_2;
004bb029          }
004bb029          
004bb160          PStringBase<unsigned short>::PStringBase<unsigned short>(&this_2, &gmBookUI::`vftable'.RecvNotice_EndPendingInPlayer);
004bb170          StringInfo::SetLiteralValue(&var_98, &this_2, 1);
004bb179          void* __offset(gmBookUI, -0x14) esi_2 = ((char*)this_2 - 0x14);
004bb180          esp = &var_c4;
004bb180          
004bb188          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004bb188          {
004bb190              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004bb190              esp = &var_c4;
004bb188          }
004bb188          
004bb1a1          for (int32_t numPages = this_1->pageDataList->numPages; numPages < this_1->maxNumPages; numPages += 1)
004bb1a1          {
004bb1ab              gmBookUI::AddPageInfo(this_1, numPages, &var_98);
004bb1ab              esp = &var_c4;
004bb1a1          }
004bb1a1          
004bb1c1          if (var_a0 != 0)
004bb1c5              *(uint32_t*)(*(uint32_t*)var_a0 + 0x14)();
004bb1c5          
004bb1cc          StringInfo::~StringInfo(&var_98);
004bafa4      }
004bafa4      
004bb1d1      *(uint32_t*)esp;
004bb1d1      esp[1];
004bb1d1      esp[2];
004baf80  }

004bb1db                                                                                   90 90 90 90 90                             .....

004bb1e0  void __thiscall gmBookUI::DisplayPageData(class gmBookUI* this, class PageData* arg2)

004bb1e0  {
004bb1f6      class PStringBase<unsigned short>* eax_2;
004bb1f6      void* ebx_1;
004bb1f6      eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &arg2->pageText.m_buffer->m_data);
004bb202      UIElement_Text::SetText(this->m_pageText, eax_2);
004bb20b      void* __offset(PageData, -0x14) esi_1 = ((char*)arg2 - 0x14);
004bb20b      
004bb21e      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004bb226          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004bb226      
004bb228      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004bb232      uint32_t player_id;
004bb232      
004bb232      if (SmartBox::smartbox_1 == 0)
004bb23c          player_id = 0;
004bb232      else
004bb234          player_id = SmartBox::smartbox_1->player_id;
004bb234      
004bb247      if ((*(uint32_t*)((char*)ebx_1 + 4) == player_id || *(uint32_t*)((char*)ebx_1 + 0x14) != 0))
004bb247      {
004bb275          gmBookUI::SetEditable(this, this->m_pageText, 1);
004bb27d          return;
004bb247      }
004bb247      
004bb24f      UIElement_Text::Deselect(this->m_pageText);
004bb25f      gmBookUI::SetEditable(this, this->m_pageText, 0);
004bb1e0  }


004bb280  int32_t __fastcall gmBookUI::PageTextBlank(class gmBookUI* this)

004bb280  {
004bb2a1      class PStringBase<unsigned short> __return;
004bb2a1      void* __return_1;
004bb2a1      PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pageText, &__return), &__return_1, 0);
004bb2b0      int32_t* esi_1 = (__return - 0x14);
004bb2b0      
004bb2bf      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004bb2c7          **(uint32_t**)esi_1(1);
004bb2c7      
004bb2cf      uint32_t _num_elements = this->m_pageText->m_glyphList.m_glyphList._num_elements;
004bb2d5      void* __return_2 = __return_1;
004bb2d9      char* ecx_4 = nullptr;
004bb2d9      
004bb2dd      if (_num_elements > 0)
004bb2dd      {
004bb2f2          do
004bb2f2          {
004bb2e0              int32_t eax_1;
004bb2e0              eax_1 = *(uint8_t*)(ecx_4 + __return_2);
004bb2e0              
004bb2ed              if ((eax_1 != 0x20 && (eax_1 != 0xa && eax_1 != 0)))
004bb2ed              {
004bb328                  if ((InterlockedDecrement(((char*)__return_2 - 0x10)) == 0 && __return_2 != 0x14))
004bb330                      **(uint32_t**)((char*)__return_2 - 0x14)(1);
004bb330                  
004bb33a                  return 0;
004bb2ed              }
004bb2ed              
004bb2ef              ecx_4 = &ecx_4[1];
004bb2f2          } while (ecx_4 < _num_elements);
004bb2dd      }
004bb2dd      
004bb303      if ((InterlockedDecrement(((char*)__return_2 - 0x10)) == 0 && __return_2 != 0x14))
004bb30b          **(uint32_t**)((char*)__return_2 - 0x14)(1);
004bb30b      
004bb318      return 1;
004bb280  }

004bb33b                                                                                   90 90 90 90 90                             .....

004bb340  int32_t __fastcall gmBookUI::CloseCurPage(class gmBookUI* this)

004bb340  {
004bb34f      if (this->bookID != 0)
004bb34f      {
004bb355          class PageDataList* pageDataList = this->pageDataList;
004bb355          
004bb36b          if ((pageDataList != 0 && this->requestPending == 0))
004bb36b          {
004bb378              class PageData* eax_3 = PageDataList::Get(pageDataList, this->curPage);
004bb378              
004bb381              if (eax_3 != 0)
004bb381              {
004bb387                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004bb391                  uint32_t player_id;
004bb391                  
004bb391                  if (SmartBox::smartbox_1 == 0)
004bb39b                      player_id = 0;
004bb391                  else
004bb393                      player_id = SmartBox::smartbox_1->player_id;
004bb393                  
004bb3a6                  if ((eax_3->authorID == player_id || eax_3->ignoreAuthor != 0))
004bb3a6                  {
004bb3b5                      if (gmBookUI::PageTextBlank(this) != 0)
004bb3b5                      {
004bb3b7                          uint32_t eax_6 = GetPlayerID();
004bb3b7                          
004bb3bf                          if (eax_3->authorID == eax_6)
004bb3bf                          {
004bb3cf                              CM_Writing::Event_BookDeletePage(this->bookID, this->curPage);
004bb3e4                              PageDataList::Delete(this->pageDataList, this->curPage);
004bb3eb                              gmBookUI::UpdateMenu(this);
004bb3fa                              return 1;
004bb3bf                          }
004bb3b5                      }
004bb3b5                      
004bb414                      class PStringBase<char> __return;
004bb414                      void __return_1;
004bb414                      PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pageText, &__return_1), &__return, 0);
004bb41d                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
004bb433                      void var_4;
004bb433                      PageData::SetPageText(eax_3, AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, __return));
004bb43c                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
004bb453                      CM_Writing::Event_BookModifyPage(this->bookID, this->curPage, &eax_3->pageText);
004bb45f                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004bb3a6                  }
004bb381              }
004bb36b          }
004bb34f      }
004bb34f      
004bb46b      return 0;
004bb340  }

004bb46c                                      90 90 90 90                                                              ....

004bb470  void __thiscall gmBookUI::BookPageDataResponseEvent(class gmBookUI* this, uint32_t arg2, int32_t arg3, class PageData const* arg4)

004bb470  {
004bb473      uint32_t bookID = this->bookID;
004bb473      
004bb481      if ((arg2 == bookID && bookID != 0))
004bb481      {
004bb486          void* eax = operator new(0x24);
004bb490          class PageData* edi_1;
004bb490          
004bb490          if (eax == 0)
004bb49d              edi_1 = nullptr;
004bb490          else
004bb499              edi_1 = PageData::PageData(eax);
004bb499          
004bb4a7          PageData::operator=(edi_1, arg4);
004bb4b7          class PageData* eax_3 = PageDataList::Remove(this->pageDataList, arg3);
004bb4b7          
004bb4be          if (eax_3 != 0)
004bb4c0              eax_3->vtable->__vecDelDtor(1);
004bb4c0          
004bb4d0          PageDataList::Insert(this->pageDataList, edi_1, arg3);
004bb4d0          
004bb4dc          if (arg3 == this->curPage)
004bb4e1              gmBookUI::DisplayPageData(this, edi_1);
004bb4e1          
004bb4e6          this->requestPending = 0;
004bb481      }
004bb470  }

004bb4f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004bb500  void __fastcall gmBookUI::CloseBook(class gmBookUI* this)

004bb500  {
004bb504      gmBookUI::CloseCurPage(this);
004bb509      class PageDataList* pageDataList = this->pageDataList;
004bb513      this->bookID = 0;
004bb519      this->maxNumPages = 0;
004bb519      
004bb51f      if (pageDataList != 0)
004bb521          pageDataList->vtable->__vecDelDtor(1);
004bb521      
004bb532      this->pageDataList = nullptr;
004bb538      this->curPage = 0xffffffff;
004bb542      AC1Legacy::PStringBase<char>::set(&this->inscription, &data_7928af);
004bb552      this->scribeID = 0;
004bb558      AC1Legacy::PStringBase<char>::set(&this->scribeName, &data_7928af);
004bb55d      this->requestPending = 0;
004bb500  }

004bb566                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bb570  void __thiscall gmBookUI::SetCurPage(class gmBookUI* this, int32_t arg2)

004bb570  {
004bb579      class PageDataList* pageDataList = this->pageDataList;
004bb579      
004bb58f      if ((pageDataList != 0 && this->requestPending == 0))
004bb58f      {
004bb597          int32_t edi_1 = arg2;
004bb597          
004bb5ac          if ((edi_1 >= 0 && edi_1 < this->maxNumPages))
004bb5ac          {
004bb5b2              int32_t curPage = this->curPage;
004bb5b2              
004bb5ba              if (edi_1 != curPage)
004bb5ba              {
004bb5c1                  class PageData* eax_2 = PageDataList::Get(pageDataList, curPage);
004bb5ce                  int32_t numPages = this->pageDataList->numPages;
004bb5ce                  
004bb5d3                  if (edi_1 <= numPages)
004bb5d3                  {
004bb5d9                      int32_t curPage_1 = this->curPage;
004bb5d9                      
004bb5eb                      if (((curPage_1 != (numPages - 1) || curPage_1 == 0xffffffff) || edi_1 <= curPage_1))
004bb5eb                      {
004bb60c                      label_4bb60c:
004bb60c                          
004bb61b                          if ((gmBookUI::CloseCurPage(this) != 0 && edi_1 > this->curPage))
004bb61d                              edi_1 -= 1;
004bb61d                          
004bb61e                          class PageDataList* pageDataList_1 = this->pageDataList;
004bb625                          this->curPage = edi_1;
004bb62b                          class PageData* eax_8 = PageDataList::Get(pageDataList_1, edi_1);
004bb62b                          
004bb632                          if (eax_8 == 0)
004bb632                          {
004bb689                              UIElement_Text::ClearAllText(this->m_pageText);
004bb694                              UIElement_Text::Deselect(this->m_pageText);
004bb6a4                              gmBookUI::SetEditable(this, this->m_pageText, 0);
004bb6b0                              CM_Writing::Event_BookAddPage(this->bookID);
004bb6b8                              this->requestPending = 1;
004bb632                          }
004bb632                          else if (eax_8->textIncluded == 0)
004bb639                          {
004bb64b                              UIElement_Text::ClearAllText(this->m_pageText);
004bb656                              UIElement_Text::Deselect(this->m_pageText);
004bb666                              gmBookUI::SetEditable(this, this->m_pageText, 0);
004bb679                              CM_Writing::Event_BookPageData(this->bookID, this->curPage);
004bb6b8                              this->requestPending = 1;
004bb639                          }
004bb639                          else
004bb63e                              gmBookUI::DisplayPageData(this, eax_8);
004bb63e                          
004bb6c8                          int32_t curPage_2 = this->curPage;
004bb6c8                          
004bb6d5                          if (UIElement_Menu::GetSelectedIndex(this->m_pageMenu) != curPage_2)
004bb6d5                          {
004bb6e0                              class UIElement* eax_11 = UIElement_Menu::GetItem(this->m_pageMenu, curPage_2);
004bb6ec                              UIElement_Menu::SetSelectedItem(this->m_pageMenu, eax_11, 1);
004bb6d5                          }
004bb6d5                          
004bb6f9                          class UIElement* m_prevButton = this->m_prevButton;
004bb6f9                          
004bb6ff                          if (this->curPage > 0)
004bb70d                              m_prevButton->vtable->SetState(1);
004bb6ff                          else
004bb701                              m_prevButton->vtable->SetState(0xd);
004bb701                          
004bb726                          class UIElement* m_nextButton = this->m_nextButton;
004bb726                          
004bb72c                          if (this->curPage >= (this->maxNumPages - 1))
004bb72c                          {
004bb72e                              m_nextButton->vtable->SetState(0xd);
004bb741                              return;
004bb72c                          }
004bb72c                          
004bb744                          m_nextButton->vtable->SetState(1);
004bb757                          return;
004bb5eb                      }
004bb5eb                      
004bb5fa                      if ((gmBookUI::PageTextBlank(this) == 0 || eax_2 == 0))
004bb5f6                          goto label_4bb60c;
004bb5f6                      
004bb5fc                      uint32_t eax_6 = GetPlayerID();
004bb5fc                      
004bb604                      if (eax_2->authorID != eax_6)
004bb604                          goto label_4bb60c;
004bb5d3                  }
004bb5d3                  
004bb771                  void __return;
004bb771                  class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(&__return, this->bookID, NAME_APPROPRIATE, 0)->m_charbuffer;
004bb77e                  void var_98;
004bb77e                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, &gmBookUI::`vftable'.RecvNotice_LastSpellSelection);
004bb78a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004bb793                  void var_90;
004bb793                  StringInfo::StringInfo(&var_90);
004bb7a3                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004bb7af                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004bb7ba                  int32_t curPage_3 = this->curPage;
004bb7ba                  
004bb7ca                  if (UIElement_Menu::GetSelectedIndex(this->m_pageMenu) != curPage_3)
004bb7ca                  {
004bb7d5                      class UIElement* eax_20 = UIElement_Menu::GetItem(this->m_pageMenu, curPage_3);
004bb7e1                      UIElement_Menu::SetSelectedItem(this->m_pageMenu, eax_20, 1);
004bb7ca                  }
004bb7ca                  
004bb7ea                  StringInfo::~StringInfo(&var_90);
004bb7f3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004bb5ba              }
004bb5ac          }
004bb58f      }
004bb570  }

004bb804              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004bb810  void __thiscall gmBookUI::RecvNotice_BookPageDataResponse(class gmBookUI* this, uint32_t arg2, int32_t arg3, class PageData const* arg4)

004bb810  {
004bb816      /* tailcall */
004bb816      return gmBookUI::BookPageDataResponseEvent(((char*)this - 0x5f8), arg2, arg3, arg4);
004bb810  }

004bb81b                                                                                   90 90 90 90 90                             .....

004bb820  void __thiscall gmBookUI::BookAddPageResponseEvent(class gmBookUI* this, uint32_t arg2, int32_t arg3, int32_t arg4)

004bb820  {
004bb827      int32_t ebx = 0;
004bb833      int32_t* __return = nullptr;
004bb837      uint32_t bookID = this->bookID;
004bb837      
004bb847      if ((arg2 == bookID && bookID != 0))
004bb847      {
004bb857          if (arg4 != 0)
004bb857          {
004bb86a              if (arg3 == this->curPage)
004bb86a              {
004bb870                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004bb875                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004bb87d                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004bb89a                  int32_t* var_98;
004bb89a                  InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_98, GetClassObject(&__return, &PlayerDesc_ClassType));
004bb89f                  int32_t* __return_1 = __return;
004bb89f                  
004bb8a5                  if (__return_1 != 0)
004bb8a9                      *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004bb8a9                  
004bb8bb                  CBaseQualities::InqString(&var_98[0xe], 1, &AC1Legacy::PStringBase<char>::s_NullBuffer_2);
004bb8c2                  void* eax_2 = operator new(0x24);
004bb8ce                  void var_9c;
004bb8ce                  class PageData* edi_1;
004bb8ce                  
004bb8ce                  if (eax_2 == 0)
004bb90b                      edi_1 = nullptr;
004bb8ce                  else
004bb8ce                  {
004bb8db                      ebx = 3;
004bb8e0                      class AC1Legacy::PStringBase<char>* eax_3 = AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &data_7928af);
004bb8ef                      class AC1Legacy::PStringBase<char>* eax_4 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_9c, &data_7928af);
004bb907                      edi_1 = PageData::PageData(eax_2, GetPlayerID(), &AC1Legacy::PStringBase<char>::s_NullBuffer_2, eax_4, eax_3, 0);
004bb8ce                  }
004bb8ce                  
004bb910                  if ((ebx & 2) != 0)
004bb910                  {
004bb916                      ebx &= 0xfffffffd;
004bb919                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_9c);
004bb910                  }
004bb910                  
004bb921                  if ((ebx & 1) != 0)
004bb927                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return);
004bb927                  
004bb934                  PageDataList::Insert(this->pageDataList, edi_1, arg3);
004bb945                  void* __offset(BaseProperty, 0x14) var_c0_3 = (ArrayPropertyValue::AccessArray(edi_1)->m_data + 0x14);
004bb952                  void var_a8;
004bb952                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a8, Formatted, &gmBookUI::`vftable'.RecvNotice_ShowPendingInPlayer);
004bb95e                  void var_90;
004bb95e                  StringInfo::StringInfo(&var_90);
004bb96e                  StringInfo::SetLiteralValue(&var_90, &var_a8, 1);
004bb97b                  gmBookUI::AddPageInfo(this, arg3, &var_90);
004bb980                  int32_t curPage = this->curPage;
004bb980                  
004bb988                  if (arg3 != curPage)
004bb988                  {
004bb9a2                      if (PageDataList::Get(this->pageDataList, curPage) == 0)
004bb9a7                          gmBookUI::SetCurPage(this, arg3);
004bb988                  }
004bb988                  else
004bb98d                      gmBookUI::DisplayPageData(this, edi_1);
004bb98d                  
004bb9b0                  this->requestPending = 0;
004bb9ba                  StringInfo::~StringInfo(&var_90);
004bb9c3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a8);
004bb9c8                  int32_t* ecx_20 = var_98;
004bb9c8                  
004bb9cf                  if (ecx_20 != 0)
004bb9d3                      *(uint32_t*)(*(uint32_t*)ecx_20 + 0x14)();
004bb9d3                  
004bb9da                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2);
004bb9e8                  return;
004bb86a              }
004bb86a              
004bb9eb              this->curPage = arg3;
004bb857          }
004bb857          
004bb9f2          CM_Writing::Event_BookData(bookID);
004bb847      }
004bb820  }

004bba06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bba10  enum UIElementMessageListenResult __thiscall gmBookUI::ListenToElementMessage(class gmBookUI* this, struct UIElementMessageInfo const* arg2)

004bba10  {
004bba19      struct UIElementMessageInfo* esi = arg2;
004bba20      uint32_t idMessage = esi->idMessage;
004bba20      
004bba28      if (idMessage == 1)
004bba28      {
004bba2a          uint32_t idElement = esi->idElement;
004bba2a          
004bba31          if (idElement == 0x10000114)
004bba31          {
004bba65              gmBookUI::SetCurPage(this, (this->curPage - 1));
004bba7b              return UIElement::ListenToElementMessage(this, esi);
004bba31          }
004bba31          
004bba34          if (idElement == 0x10000115)
004bba42              gmBookUI::SetCurPage(this, (this->curPage + 1));
004bba28      }
004bba28      else if (idMessage != 0x19)
004bba81      {
004bbc1a          if ((idMessage == 7 && esi->idElement == 0x10000470))
004bbc1a          {
004bbc2a              gmBookUI::SetCurPage(this, UIElement_Menu::GetSelectedIndex(this->m_pageMenu));
004bbc3d              gmBookUI::UpdateMenuSelectionInfo(this, UIElement_Menu::GetSelectedIndex(this->m_pageMenu));
004bbc1a          }
004bba81      }
004bba81      else if (esi->idElement == 0x10000111)
004bba8d      {
004bba93          class UIElement_Text* m_pageText = this->m_pageText;
004bbaa0          uint8_t var_99 = 0;
004bbaa5          UIElement::GetAttribute_Bool(m_pageText, 0x16, &var_99);
004bbaaa          class PageDataList* pageDataList = this->pageDataList;
004bbaaa          
004bbabe          if ((pageDataList != 0 && var_99 == 0))
004bbabe          {
004bbacb              class PageData* eax_8 = PageDataList::Get(pageDataList, this->curPage);
004bbacb              
004bbad4              if (eax_8 != 0)
004bbad4              {
004bbadf                  if (eax_8->ignoreAuthor != 0)
004bbadf                  {
004bbaec                      gmBookUI::SetEditable(this, this->m_pageText, 1);
004bbb02                      return UIElement::ListenToElementMessage(this, esi);
004bbadf                  }
004bbadf                  
004bbb12                  void var_90;
004bbb12                  
004bbb12                  if (*(int32_t*)((char*)ArrayPropertyValue::AccessArray(eax_8)->m_data + 8) > 1)
004bbb12                  {
004bbb22                      void* __offset(BaseProperty, 0x14) esi_2 = (ArrayPropertyValue::AccessArray(eax_8)->m_data + 0x14);
004bbb25                      void* const edi_1 = &data_794098;
004bbb2a                      int32_t i = 2;
004bbb2f                      bool cond:2_1 = true;
004bbb2f                      
004bbb31                      while (i != 0)
004bbb31                      {
004bbb31                          char temp3_1 = *(int8_t*)((char*)ADJ(esi_2) + 0x14);
004bbb31                          char temp4_1 = *(uint8_t*)edi_1;
004bbb31                          cond:2_1 = temp3_1 == temp4_1;
004bbb31                          esi_2 += 1;
004bbb31                          edi_1 += 1;
004bbb31                          i -= 1;
004bbb31                          
004bbb31                          if (temp3_1 != temp4_1)
004bbb31                              break;
004bbb31                      }
004bbb31                      
004bbb34                      if (!(cond:2_1))
004bbb34                      {
004bbb42                          void* __offset(BaseProperty, 0x14) __saved_edi_8 = (ArrayPropertyValue::AccessArray(eax_8)->m_data + 0x14);
004bbb4f                          void var_98;
004bbb4f                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, &gmBookUI::`vftable'.RecvNotice_TradeAnItemForDummies);
004bbb5b                          StringInfo::StringInfo(&var_90);
004bbb6b                          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004bbb77                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004bbb83                          StringInfo::~StringInfo(&var_90);
004bbb8c                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004bbba9                          return UIElement::ListenToElementMessage(this, arg2);
004bbb34                      }
004bbb34                      
004bbbac                      esi = arg2;
004bbb12                  }
004bbb12                  
004bbbb7                  StringInfo::StringInfo(&var_90);
004bbbc5                  void var_94;
004bbbc5                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, &gmBookUI::`vftable'.RecvNotice_SetDisplayContractTracker);
004bbbd5                  StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004bbbde                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
004bbbea                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004bbbf6                  StringInfo::~StringInfo(&var_90);
004bbad4              }
004bbabe          }
004bba8d      }
004bba8d      
004bbc53      return UIElement::ListenToElementMessage(this, esi);
004bba10  }

004bbc56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004bbc60  void __thiscall gmBookUI::OnVisibilityChanged(class gmBookUI* this, uint8_t arg2)

004bbc60  {
004bbc69      UIElement::OnVisibilityChanged(this, arg2);
004bbc69      
004bbc7d      if (((((int8_t)(this->__inner23 >> 0x11)) & 1) != 0 && arg2 == 0))
004bbc7d      {
004bbc8d          CPlayerSystem::UnregisterAllObjectRangeHandlers(CPlayerSystem::GetPlayerSystem(), &this->vtable);
004bbc94          gmBookUI::CloseBook(this);
004bbc7d      }
004bbc60  }

004bbc9e                                                                                            90 90                                ..

004bbca0  void __thiscall gmBookUI::OpenBook(class gmBookUI* this, uint32_t arg2, int32_t arg3, class PageDataList const* arg4, class AC1Legacy::PStringBase<char> const* arg5, uint32_t arg6, class AC1Legacy::PStringBase<char> const* arg7)

004bbca0  {
004bbca0      class gmBookUI* var_4 = this;
004bbca7      this->vtable->SetVisible(1);
004bbcae      uint32_t bookID = this->bookID;
004bbcb4      uint32_t ebx = arg2;
004bbcb8      int32_t curPage = 0;
004bbcbc      var_4 = nullptr;
004bbcbc      
004bbcc0      if (bookID == ebx)
004bbcc0      {
004bbcc2          curPage = this->curPage;
004bbcc8          var_4 = curPage;
004bbcc0      }
004bbcc0      
004bbcce      if (bookID != 0)
004bbcd2          gmBookUI::CloseBook(this);
004bbcd2      
004bbcd7      int32_t ecx_1 = arg3;
004bbcdd      this->bookID = ebx;
004bbce3      this->maxNumPages = ecx_1;
004bbce9      void* eax_1 = operator new(0x1c);
004bbcf3      class PageDataList* eax_2;
004bbcf3      
004bbcf3      if (eax_1 == 0)
004bbcfe          eax_2 = nullptr;
004bbcf3      else
004bbcf7          eax_2 = PageDataList::PageDataList(eax_1);
004bbcf7      
004bbd07      this->pageDataList = eax_2;
004bbd0d      PageDataList::operator=(eax_2, arg4);
004bbd14      gmBookUI::UpdateMenu(this);
004bbd22      uint32_t eax_5 = (this->pageDataList->numPages - 1);
004bbd23      arg2 = eax_5;
004bbd29      arg3 = 0;
004bbd31      class gmBookUI** eax_6 = &arg2;
004bbd31      
004bbd35      if (eax_5 >= curPage)
004bbd37          eax_6 = &var_4;
004bbd37      
004bbd3e      if (*(uint32_t*)eax_6 < 0)
004bbd40          eax_6 = &arg3;
004bbd40      
004bbd49      gmBookUI::SetCurPage(this, *(uint32_t*)eax_6);
004bbd52      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->inscription.m_buffer;
004bbd52      
004bbd60      if (m_buffer_2 != arg5->m_buffer)
004bbd60      {
004bbd6e          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
004bbd70              m_buffer_2->vtable->__vecDelDtor(1);
004bbd70          
004bbd78          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg5->m_buffer;
004bbd7a          this->inscription.m_buffer = m_buffer;
004bbd84          InterlockedIncrement(&m_buffer->m_cRef);
004bbd60      }
004bbd60      
004bbd92      this->scribeID = arg6;
004bbd98      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->scribeName.m_buffer;
004bbd98      
004bbda0      if (m_buffer_3 != arg7->m_buffer)
004bbda0      {
004bbdae          if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
004bbdb0              m_buffer_3->vtable->__vecDelDtor(1);
004bbdb0          
004bbdb8          class AC1Legacy::PStringBase<char> m_buffer_1 = arg7->m_buffer;
004bbdba          this->scribeName.m_buffer = m_buffer_1;
004bbdc4          InterlockedIncrement((m_buffer_1 + 4));
004bbda0      }
004bbda0      
004bbdd2      char* eax_15;
004bbdd2      
004bbdd2      if (this->scribeID != 0)
004bbdef          eax_15 = &this->inscription.m_buffer->m_data;
004bbdd2      else
004bbddf          eax_15 = ACCWeenieObject::GetObjectName(this->bookID, NAME_APPROPRIATE, 0);
004bbddf      
004bbdf9      class PStringBase<unsigned short>* eax_17;
004bbdf9      void* esi_1;
004bbdf9      eax_17 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, eax_15);
004bbe05      UIElement_Text::SetText(*(uint32_t*)((char*)esi_1 + 0x608), eax_17);
004bbe0e      int32_t* edi_1 = (arg2 - 0x14);
004bbe0e      
004bbe1d      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
004bbe25          **(uint32_t**)edi_1(1);
004bbe25      
004bbe2e      class ACCWeenieObject* eax_20 = ClientObjMaintSystem::GetWeenieObject(*(uint32_t*)((char*)esi_1 + 0x618));
004bbe2e      
004bbe3a      if (eax_20 != 0)
004bbe3a      {
004bbe3e          int32_t eax_21 = ACCWeenieObject::IsOwnedByPlayer(eax_20);
004bbe3e          
004bbe45          if (eax_21 == 0)
004bbe45          {
004bbe59              int32_t var_18_10 = eax_21;
004bbe5b              int32_t var_20_2 = 0x3ff00000;
004bbe7b              CPlayerSystem::RegisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), ((char*)esi_1 + 0x5fc), *(uint32_t*)((char*)esi_1 + 0x618), ((double)((long double)eax_20->pwd._useRadius)), 1, eax_21, 0f, eax_21);
004bbe45          }
004bbe3a      }
004bbca0  }

004bbe88                          90 90 90 90 90 90 90 90                                                          ........

004bbe90  void __thiscall gmBookUI::RecvNotice_BookAddPageResponse(class gmBookUI* this, uint32_t arg2, int32_t arg3, int32_t arg4)

004bbe90  {
004bbe96      /* tailcall */
004bbe96      return gmBookUI::BookAddPageResponseEvent(((char*)this - 0x5f8), arg2, arg3, arg4);
004bbe90  }

004bbe9b                                                                                   90 90 90 90 90                             .....

004bbea0  void __thiscall gmBookUI::RecvNotice_OpenBook(class gmBookUI* this, uint32_t arg2, int32_t arg3, class PageDataList const* arg4, class AC1Legacy::PStringBase<char> const* arg5, uint32_t arg6, class AC1Legacy::PStringBase<char> const* arg7)

004bbea0  {
004bbea6      /* tailcall */
004bbea6      return gmBookUI::OpenBook(((char*)this - 0x5f8), arg2, arg3, arg4, arg5, arg6, arg7);
004bbea0  }

004bbeab                                   90 90 90 90 90                                                             .....

004bbeb0  void __thiscall gmAbuseUI::gmAbuseUI(class gmAbuseUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004bbeb0  {
004bbebf      UIElement_Field::UIElement_Field(this, arg2, arg3);
004bbec4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bbed0      this->m_pNameBox = nullptr;
004bbed6      this->m_pEntryBox = nullptr;
004bbedc      this->m_pResultText = nullptr;
004bbee2      this->m_pContinueButton = nullptr;
004bbee8      this->vtable = 0x7b3878;
004bbeee      this->vtable = &gmAbuseUI::`vftable';
004bbeb0  }

004bbefe                                                                                            90 90                                ..

004bbf00  class UIElement* __thiscall gmAbuseUI::DynamicCast(class gmAbuseUI* this, uint32_t arg2) __pure

004bbf00  {
004bbf0c      if (arg2 == 0x10000018)
004bbf19          return this;
004bbf19      
004bbf13      int32_t edx_1;
004bbf13      edx_1 = arg2 != 3;
004bbf17      return (this & (edx_1 - 1));
004bbf00  }

004bbf1c                                                                                      90 90 90 90                              ....

004bbf20  uint32_t gmAbuseUI::GetUIElementType(class gmAbuseUI const* this @ ecx) __pure

004bbf20  {
004bbf25      return 0x10000018;
004bbf20  }

004bbf26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bbf30  void __fastcall gmAbuseUI::PostInit(class gmAbuseUI* this)

004bbf30  {
004bbf33      UIElement::PostInit(this);
004bbf4b      this->m_pNameBox = UIElement::GetChildRecursive(this, 0x10000105);
004bbf5d      this->m_pEntryBox = UIElement::GetChildRecursive(this, 0x10000107);
004bbf6f      this->m_pResultText = UIElement::GetChildRecursive(this, 0x1000010b);
004bbf7a      this->m_pContinueButton = UIElement::GetChildRecursive(this, 0x10000109);
004bbf80      GlobalEventHandler::GetGlobalEventHandler()->vtable->RegisterNoticeHandler(0x4dd221, &this->vtable);
004bbf30  }

004bbf9a                                                                                90 90 90 90 90 90                            ......

004bbfa0  void __fastcall gmAbuseUI::~gmAbuseUI(class gmAbuseUI* this)

004bbfa0  {
004bbfab      this->vtable = 0x7b3878;
004bbfa5      this->vtable = &gmAbuseUI::`vftable';
004bbfb7      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004bbfb7      
004bbfc0      if (eax != 0)
004bbfc2          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004bbfc2      
004bbfca      this->m_pNameBox = nullptr;
004bbfd0      this->m_pEntryBox = nullptr;
004bbfd6      this->m_pResultText = nullptr;
004bbfdc      this->m_pContinueButton = nullptr;
004bbfa5      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bbfea      NoticeHandler::~NoticeHandler(&this->vtable);
004bbff4      /* tailcall */
004bbff4      return UIElement_Field::~UIElement_Field(this);
004bbfa0  }

004bbff9                                                                             90 90 90 90 90 90 90                           .......

004bc000  class UIElement* gmAbuseUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004bc000  {
004bc005      void* eax = operator new(0x60c);
004bc005      
004bc00f      if (eax == 0)
004bc025          return 0;
004bc025      
004bc022      return gmAbuseUI::gmAbuseUI(eax, arg1, arg2);
004bc000  }

004bc026                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bc030  void* __thiscall gmAbuseUI::`scalar deleting destructor'(class gmAbuseUI* this, uint32_t arg2)

004bc030  {
004bc033      gmAbuseUI::~gmAbuseUI(this);
004bc033      
004bc03d      if ((arg2 & 1) != 0)
004bc040          operator delete(this);
004bc040      
004bc04b      return this;
004bc030  }

004bc04e                                            90 90                                                                ..

004bc050  void gmAbuseUI::Register()

004bc050  {
004bc05a      UIElement::RegisterElementClass(0x10000018, gmAbuseUI::Create);
004bc050  }

004bc063           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004bc070  uint8_t __fastcall gmAbuseUI::HandleTextEntry(class gmAbuseUI* this)

004bc070  {
004bc073      int32_t ebx;
004bc073      int32_t var_c = ebx;
004bc08b      class PStringBase<unsigned short> __return_1;
004bc08b      int32_t eax_1 = UIElement_Text::GetText(this->m_pNameBox, &__return_1)->m_charbuffer->m_data[0x7ffffffffffffffe];
004bc08b      
004bc09b      if (eax_1 != 1)
004bc09b      {
004bc0b6          class PStringBase<unsigned short> __return;
004bc0b6          ebx = UIElement_Text::GetText(this->m_pEntryBox, &__return)->m_charbuffer->m_data[0x7ffffffffffffffe] == 1;
004bc0b9          int32_t* esi_2 = (__return - 0x14);
004bc0b9          
004bc0c8          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004bc0d0              **(uint32_t**)esi_2(1);
004bc09b      }
004bc09b      
004bc0d4      if ((eax_1 == 1 || ebx != 0))
004bc0d6          ebx = 1;
004bc0d6      
004bc0dc      int32_t* esi_4 = (__return_1 - 0x14);
004bc0dc      
004bc0eb      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004bc0f3          **(uint32_t**)esi_4(1);
004bc0f3      
004bc0f7      class UIElement_Button* m_pContinueButton = this->m_pContinueButton;
004bc0f7      
004bc0fd      if (ebx != 0)
004bc0fd      {
004bc0ff          m_pContinueButton->vtable->SetState(0xd);
004bc10c          int32_t eax_8;
004bc10c          eax_8 = 1;
004bc112          return 1;
004bc0fd      }
004bc0fd      
004bc113      m_pContinueButton->vtable->SetState(1);
004bc120      int32_t eax_9;
004bc120      eax_9 = 1;
004bc126      return 1;
004bc070  }

004bc127                       90 90 90 90 90 90 90 90 90                                                         .........

004bc130  uint8_t __thiscall gmAbuseUI::SetPageThreeText(class gmAbuseUI* this, uint32_t const arg2)

004bc130  {
004bc13d      void var_90;
004bc13d      StringInfo::StringInfo(&var_90);
004bc153      StringInfo::SetStringIDandTableEnum(&var_90, arg2, 0x10000001);
004bc163      void* __return;
004bc163      class PStringBase<unsigned short>* eax_1 = StringInfo::GetString(&var_90, &__return, 0);
004bc16f      UIElement_Text::SetText(this->m_pResultText, eax_1);
004bc178      int32_t* esi_2 = ((char*)__return - 0x14);
004bc178      
004bc18b      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004bc193          **(uint32_t**)esi_2(1);
004bc193      
004bc199      StringInfo::~StringInfo(&var_90);
004bc19e      int32_t eax_4;
004bc19e      eax_4 = 1;
004bc1a7      return 1;
004bc130  }

004bc1aa                                90 90 90 90 90 90                                                            ......

004bc1b0  void __thiscall gmAbuseUI::RecvNotice_AbuseReportResponse(class gmAbuseUI* this, uint32_t arg2)

004bc1b0  {
004bc1b9      if (arg2 == 0x4b8)
004bc1f8          /* tailcall */
004bc1f8          return gmAbuseUI::SetPageThreeText(((char*)this - 0x5f8), 0);
004bc1f8      
004bc1bc      if (arg2 == 0x4b9)
004bc1e4          /* tailcall */
004bc1e4          return gmAbuseUI::SetPageThreeText(((char*)this - 0x5f8), 0);
004bc1e4      
004bc1bf      if (arg2 != 0x4ba)
004bc1fd          return;
004bc1fd      
004bc1d0      /* tailcall */
004bc1d0      return gmAbuseUI::SetPageThreeText(((char*)this - 0x5f8), 0);
004bc1b0  }


004bc200  uint8_t __fastcall gmAbuseUI::Reset(class gmAbuseUI* this)

004bc200  {
004bc200      class gmAbuseUI* var_4 = this;
004bc207      this->vtable->SetVisible(0);
004bc20e      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004bc219      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004bc221      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004bc22e      UIElement_Text::SetText(this->m_pNameBox, &var_4);
004bc23d      void* __offset(gmAbuseUI, -0x14) edi_1 = ((char*)var_4 - 0x14);
004bc23d      
004bc24c      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
004bc254          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
004bc254      
004bc256      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004bc25b      var_4 = PStringBase<unsigned short>::s_NullBuffer_2;
004bc263      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004bc270      UIElement_Text::SetText(this->m_pEntryBox, &var_4);
004bc279      void* __offset(gmAbuseUI, -0x14) edi_3 = ((char*)var_4 - 0x14);
004bc279      
004bc288      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
004bc290          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
004bc290      
004bc292      this->m_pContinueButton->vtable->SetState(0xd);
004bc2a2      this->vtable->SetState(0x10000008);
004bc2b4      int32_t eax_8;
004bc2b4      eax_8 = 1;
004bc2b8      return 1;
004bc200  }

004bc2b9                                                                             90 90 90 90 90 90 90                           .......

004bc2c0  uint8_t __fastcall gmAbuseUI::HandleSelection(class gmAbuseUI* this)

004bc2c0  {
004bc2c0      class gmAbuseUI* this_1 = this;
004bc2c1      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004bc2c9      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004bc2d1      uint32_t player_id;
004bc2d1      
004bc2d1      if (SmartBox::smartbox_1 == 0)
004bc2db          player_id = 0;
004bc2d1      else
004bc2d3          player_id = SmartBox::smartbox_1->player_id;
004bc2d3      
004bc2df      if (ACCWeenieObject::selectedID_1 != player_id)
004bc2df      {
004bc2ed          uint32_t esi_1 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
004bc2ed          
004bc2f4          if ((esi_1 != 0 && *(uint32_t*)(*(uint32_t*)esi_1 + 0x10)() != 0))
004bc2f4          {
004bc311              AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, ACCWeenieObject::GetObjectName(esi_1, NAME_APPROPRIATE, 0));
004bc316              class gmAbuseUI* this_2 = this_1;
004bc324              class PStringBase<unsigned short>* eax_2;
004bc324              void* ebx_1;
004bc324              eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, WidthConvert, &this_2->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2]);
004bc330              UIElement_Text::SetText(*(uint32_t*)((char*)ebx_1 + 0x5fc), eax_2);
004bc33f              void* __offset(gmAbuseUI, -0x14) esi_3 = ((char*)this_1 - 0x14);
004bc33f              
004bc34e              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004bc356                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004bc356              
004bc364              if ((InterlockedDecrement(&this_2->m_hashElementsRegisteredWith) == 0 && this_2 != 0))
004bc366                  this_2->vtable->__vecDelDtor(1);
004bc2f4          }
004bc2df      }
004bc2df      
004bc370      ACCWeenieObject::selectedID_1 = 1;
004bc374      return 1;
004bc2c0  }

004bc375                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004bc380  uint8_t __fastcall gmAbuseUI::ReportAbuse(class gmAbuseUI* this)

004bc380  {
004bc386      int32_t ebx;
004bc386      int32_t var_ac = ebx;
004bc39e      class PStringBase<unsigned short> __return;
004bc39e      int32_t eax_1 = UIElement_Text::GetText(this->m_pNameBox, &__return)->m_charbuffer->m_data[0x7ffffffffffffffe];
004bc3ae      class PStringBase<unsigned short> __return_1;
004bc3ae      
004bc3ae      if (eax_1 != 1)
004bc3ae      {
004bc3c9          ebx = UIElement_Text::GetText(this->m_pEntryBox, &__return_1)->m_charbuffer->m_data[0x7ffffffffffffffe] == 1;
004bc3cc          int32_t* edi_2 = (__return_1 - 0x14);
004bc3cc          
004bc3db          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004bc3e3              **(uint32_t**)edi_2(1);
004bc3ae      }
004bc3ae      
004bc3e7      if ((eax_1 == 1 || ebx != 0))
004bc3e9          ebx = 1;
004bc3e9      
004bc3ef      int32_t* edi_4 = (__return - 0x14);
004bc3ef      
004bc3fe      if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
004bc406          **(uint32_t**)edi_4(1);
004bc406      
004bc40a      class AC1Legacy::PStringBase<char> var_a8;
004bc40a      
004bc40a      if (ebx != 0)
004bc40a      {
004bc410          void var_90;
004bc410          StringInfo::StringInfo(&var_90);
004bc41e          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a8, u"Please specify character and com…");
004bc42e          StringInfo::SetLiteralValue(&var_90, &var_a8, 1);
004bc437          int32_t* edi_6 = (var_a8 - 0x14);
004bc437          
004bc446          if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
004bc44e              **(uint32_t**)edi_6(1);
004bc44e          
004bc457          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004bc463          StringInfo::~StringInfo(&var_90);
004bc46b          int32_t eax_8;
004bc46b          eax_8 = 0;
004bc474          return 0;
004bc40a      }
004bc40a      
004bc48e      class PStringBase<unsigned short> __return_3;
004bc48e      PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pEntryBox, &__return_3), &__return_1, 0);
004bc49c      AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, __return_1);
004bc4ba      class PStringBase<char> __return_2;
004bc4ba      void* __return_4;
004bc4ba      PStringBase<unsigned short>::to_spstring(UIElement_Text::GetText(this->m_pNameBox, &__return_4), &__return_2, 0);
004bc4bf      class PStringBase<char> __return_5 = __return_2;
004bc4c8      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_a8, __return_5);
004bc4d9      CM_Character::Event_AbuseLogRequest(&var_a8, 1, &__return);
004bc4de      class AC1Legacy::PStringBase<char> eax_12 = var_a8;
004bc4de      
004bc4f3      if ((InterlockedDecrement((eax_12 + 4)) == 0 && eax_12 != 0))
004bc4fb          **(uint32_t**)eax_12(1);
004bc4fb      
004bc50c      if ((InterlockedDecrement((__return_5 - 0x10)) == 0 && __return_5 != 0x14))
004bc514          **(uint32_t**)(__return_5 - 0x14)(1);
004bc514      
004bc51a      int32_t* edi_10 = ((char*)__return_4 - 0x14);
004bc51a      
004bc529      if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
004bc531          **(uint32_t**)edi_10(1);
004bc531      
004bc533      class PStringBase<unsigned short> __return_6 = __return;
004bc533      
004bc543      if ((InterlockedDecrement((__return_6 + 4)) == 0 && __return_6 != 0))
004bc54b          **(uint32_t**)__return_6(1);
004bc54b      
004bc551      int32_t* edi_12 = (__return_1 - 0x14);
004bc551      
004bc560      if ((InterlockedDecrement(&edi_12[1]) == 0 && edi_12 != 0))
004bc568          **(uint32_t**)edi_12(1);
004bc568      
004bc56e      int32_t* edi_14 = (__return_3 - 0x14);
004bc56e      
004bc57d      if ((InterlockedDecrement(&edi_14[1]) == 0 && edi_14 != 0))
004bc585          **(uint32_t**)edi_14(1);
004bc585      
004bc587      this->vtable->SetState(0x1000000a);
004bc5a0      gmAbuseUI::SetPageThreeText(this, 0);
004bc5a8      int32_t eax_26;
004bc5a8      eax_26 = 1;
004bc5b1      return 1;
004bc380  }

004bc5b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004bc5c0  enum UIElementMessageListenResult __thiscall gmAbuseUI::ListenToElementMessage(class gmAbuseUI* this, struct UIElementMessageInfo const* arg2)

004bc5c0  {
004bc5c6      uint32_t idMessage = arg2->idMessage;
004bc5c6      
004bc5cc      if (idMessage == 1)
004bc5f6          switch ((arg2->idElement - 0x10000101))
004bc5f6          {
004bc5ff              case nullptr:
004bc5ff              case 0xb:
004bc5ff              {
004bc5ff                  gmAbuseUI::Reset(this);
004bc5ff                  break;
004bc5ff              }
004bc60f              case 1:
004bc60f              {
004bc606                  this->vtable->SetState(0x10000009);
004bc617                  gmAbuseUI::HandleSelection(this);
004bc60f                  break;
004bc60f              }
004bc620              case 8:
004bc620              {
004bc620                  gmAbuseUI::ReportAbuse(this);
004bc620                  break;
004bc620              }
004bc5f6          }
004bc5cc      else if ((idMessage != 0x12 && idMessage != 0x44))
004bc5e0          return UIElement::ListenToElementMessage(this, arg2);
004bc5e0      
004bc625      uint32_t idElement = arg2->idElement;
004bc625      
004bc631      if ((idElement == 0x10000105 || idElement == 0x10000107))
004bc635          gmAbuseUI::HandleTextEntry(this);
004bc635      
004bc644      return UIElement::ListenToElementMessage(this, arg2);
004bc5c0  }

004bc647                       90                                                                                 .
004bc648  uint32_t jump_table_4bc648[0x4] = 
004bc648  {
004bc648      [0x0] =  0x004bc5fd
004bc64c      [0x1] =  0x004bc606
004bc650      [0x2] =  0x004bc61e
004bc654      [0x3] =  0x004bc625
004bc658  }
004bc658  uint8_t lookup_table_4bc658[0xc] = 
004bc658  {
004bc658      [0x0] =  0x00
004bc659      [0x1] =  0x01
004bc65a      [0x2] =  0x03
004bc65b      [0x3] =  0x03
004bc65c      [0x4] =  0x03
004bc65d      [0x5] =  0x03
004bc65e      [0x6] =  0x03
004bc65f      [0x7] =  0x03
004bc660      [0x8] =  0x02
004bc661      [0x9] =  0x03
004bc662      [0xa] =  0x03
004bc663      [0xb] =  0x00
004bc664  }

004bc664              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004bc670  enum UIElementMessageListenResult __thiscall gmPanelUI::ListenToElementMessage(class gmPanelUI* this, struct UIElementMessageInfo const* arg2)

004bc670  {
004bc67c      if (arg2->idMessage == 0x18)
004bc67c      {
004bc67f          uint32_t m_num = this->m_childrenInfoArray.m_num;
004bc685          int32_t edx_1 = 0;
004bc685          
004bc689          if (m_num > 0)
004bc689          {
004bc68b              struct gmPanelUI::PanelChildInfo* m_data = this->m_childrenInfoArray.m_data;
004bc68b              
004bc691              while (true)
004bc691              {
004bc691                  class UIElement* child = m_data->child;
004bc691                  
004bc69a                  if ((child != 0 && child == arg2->pElement))
004bc69a                  {
004bc6c7                      CM_UI::SendNotice_SetPanelVisibility(m_data->panelID, (((int8_t)(m_data->child->__bitfield164 >> 1)) & 1));
004bc6cc                      break;
004bc69a                  }
004bc69a                  
004bc69c                  edx_1 += 1;
004bc69d                  m_data = &m_data[1];
004bc69d                  
004bc6a2                  if (edx_1 >= m_num)
004bc6af                      return UIElement::ListenToElementMessage(this, arg2);
004bc691              }
004bc689          }
004bc67c      }
004bc67c      
004bc6da      return UIElement::ListenToElementMessage(this, arg2);
004bc670  }

004bc6dd                                                                                         90 90 90                               ...

004bc6e0  void __thiscall gmPanelUI::ResizeTo(class gmPanelUI* this, int32_t const arg2, int32_t const arg3)

004bc6e0  {
004bc6e0      /* tailcall */
004bc6e0      return UIElement::ResizeTo(this, arg2, arg3);
004bc6e0  }

004bc6e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004bc6f0  void __fastcall gmPanelUI::RecvNotice_SetPanelVisibility(class gmPanelUI* this, uint32_t arg2, uint8_t arg3)

004bc6f0  {
004bc6f0      class gmPanelUI* this_1 = this;
004bc6f1      uint32_t i = arg2;
004bc6f5      int32_t ebx;
004bc6f5      int32_t var_8 = ebx;
004bc6f6      int32_t ebp;
004bc6f6      int32_t var_c = ebp;
004bc6fb      int32_t esi;
004bc6fb      int32_t var_10 = esi;
004bc6fb      
004bc6fe      if (i != 0)
004bc6fe      {
004bc707          int32_t ecx = 0;
004bc707          
004bc70b          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] > 0)
004bc70b          {
004bc711              int32_t* vtable = this->m_hashElementsRegisteredWith.vtable;
004bc714              int32_t edi;
004bc714              int32_t var_14_1 = edi;
004bc714              
004bc71c              while ((*(uint32_t*)vtable == 0 || vtable[1] != i))
004bc71c              {
004bc721                  ecx += 1;
004bc722                  vtable = &vtable[2];
004bc722                  
004bc727                  if (ecx >= this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0])
004bc72e                      return;
004bc71c              }
004bc71c              
004bc731              class HashSetData<UIElement *>* edi_3 = *(uint32_t*)vtable;
004bc731              
004bc735              if (edi_3 != 0)
004bc735              {
004bc73f                  if (arg3 != 0)
004bc73f                  {
004bc745                      class HashSetData<UIElement *>* ebp_2 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004bc745                      
004bc74a                      if (ebp_2 == edi_3)
004bc74a                      {
004bc7e6                          ebp_2->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](1);
004bc7fe                          *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004bc806                          return;
004bc74a                      }
004bc74a                      
004bc752                      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = edi_3;
004bc752                      
004bc761                      if ((ebp_2 != 0 && (((int8_t)(*(int32_t*)((char*)ebp_2 + 0xa4) >> 1)) & 1) != 0))
004bc761                      {
004bc76f                          arg3 = 0;
004bc773                          UIElement::GetAttribute_Bool(edi_3, 0x10000049, &arg3);
004bc784                          arg2 = 0;
004bc788                          UIElement::GetAttribute_Bool(ebp_2, 0x10000049, &arg2);
004bc788                          
004bc797                          if ((arg3 == 0 || arg2 != 0))
004bc79e                              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = nullptr;
004bc797                          else
004bc799                              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = ebp_2;
004bc799                          
004bc7ad                          this_1 = nullptr;
004bc7b1                          UIElement::GetAttribute_Enum(ebp_2, 0x10000029, &this_1);
004bc7bc                          CM_UI::SendNotice_SetPanelVisibility(this_1, 0);
004bc761                      }
004bc761                      
004bc7c4                      edi_3->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](1);
004bc7db                      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004bc7e3                      return;
004bc73f                  }
004bc73f                  
004bc809                  class HashSetData<UIElement *>* ecx_12 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004bc809                  
004bc80f                  if (ecx_12 == edi_3)
004bc80f                  {
004bc811                      ecx_12->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](0);
004bc816                      class HashSetData<UIElement *>* ecx_13 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2];
004bc816                      
004bc81b                      if (ecx_13 == 0)
004bc81b                      {
004bc84a                          int32_t edx_3 = *(int32_t*)((char*)this + -0x5f8);
004bc857                          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = nullptr;
004bc85a                          *(uint32_t*)(edx_3 + 0x18)(0);
004bc862                          return;
004bc81b                      }
004bc81b                      
004bc827                      arg2 = 0;
004bc82b                      UIElement::GetAttribute_Enum(ecx_13, 0x10000029, &arg2);
004bc837                      CM_UI::SendNotice_SetPanelVisibility(arg2, 1);
004bc840                      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = nullptr;
004bc847                      return;
004bc80f                  }
004bc80f                  
004bc865                  edi_3->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](0);
004bc735              }
004bc70b          }
004bc6fe      }
004bc6f0  }

004bc874                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004bc880  void __thiscall gmPanelUI::gmPanelUI(class gmPanelUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004bc880  {
004bc88f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004bc894      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bc8a0      this->vtable = 0x7b3f00;
004bc8a6      this->vtable = &gmPanelUI::`vftable';
004bc8b0      __builtin_memset(&this->m_childrenInfoArray, 0, 0x19);
004bc880  }


004bc8e0  class UIElement* __thiscall gmPanelUI::DynamicCast(class gmPanelUI* this, uint32_t arg2) __pure

004bc8e0  {
004bc8ec      if (arg2 == 0x10000008)
004bc8f9          return this;
004bc8f9      
004bc8f3      int32_t edx_1;
004bc8f3      edx_1 = arg2 != 3;
004bc8f7      return (this & (edx_1 - 1));
004bc8e0  }

004bc8fc                                                                                      90 90 90 90                              ....

004bc900  uint32_t gmPanelUI::GetUIElementType(class gmPanelUI const* this @ ecx) __pure

004bc900  {
004bc905      return 0x10000008;
004bc900  }

004bc906                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bc910  class UIElement* gmPanelUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004bc910  {
004bc915      void* eax = operator new(0x618);
004bc915      
004bc91f      if (eax == 0)
004bc935          return 0;
004bc935      
004bc932      return gmPanelUI::gmPanelUI(eax, arg1, arg2);
004bc910  }

004bc936                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004bc940  void __fastcall gmPanelUI::~gmPanelUI(class gmPanelUI* this)

004bc940  {
004bc953      this->vtable = 0x7b3f00;
004bc94b      this->vtable = &gmPanelUI::`vftable';
004bc95f      SmartArray<VertexRange,1>::Reset(&this->m_childrenInfoArray);
004bc968      UIListener::UnRegisterForGlobalMessage(this, 1);
004bc968      
004bc97a      if ((this->m_childrenInfoArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004bc97f          operator delete[](this->m_childrenInfoArray.m_data);
004bc97f      
004bc94b      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bc98f      NoticeHandler::~NoticeHandler(&this->vtable);
004bc999      /* tailcall */
004bc999      return UIElement_Field::~UIElement_Field(this);
004bc940  }

004bc99e                                                                                            90 90                                ..

004bc9a0  void gmPanelUI::Register()

004bc9a0  {
004bc9aa      UIElement::RegisterElementClass(0x10000008, gmPanelUI::Create);
004bc9a0  }

004bc9b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004bc9c0  void* __thiscall gmPanelUI::`scalar deleting destructor'(class gmPanelUI* this, uint32_t arg2)

004bc9c0  {
004bc9c3      gmPanelUI::~gmPanelUI(this);
004bc9c3      
004bc9cd      if ((arg2 & 1) != 0)
004bc9d0          operator delete(this);
004bc9d0      
004bc9db      return this;
004bc9c0  }

004bc9de                                                                                            90 90                                ..

004bc9e0  void __fastcall gmPanelUI::SetupChildren(class gmPanelUI* this)

004bc9e0  {
004bc9f6      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000018b);
004bca0b      int32_t var_84;
004bca0b      UIElement::GetAttribute_Enum(eax, 0x10000029, &var_84);
004bca22      int32_t eax_2 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bca29      uint8_t eax_5;
004bca29      
004bca29      if (this->m_childrenInfoArray.m_num >= eax_2)
004bca37          eax_5 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_2 + 1)));
004bca37      
004bca3e      if ((this->m_childrenInfoArray.m_num < eax_2 || eax_5 != 0))
004bca3e      {
004bca40          uint32_t m_num_8 = this->m_childrenInfoArray.m_num;
004bca47          struct gmPanelUI::PanelChildInfo* m_data = this->m_childrenInfoArray.m_data;
004bca49          m_data[m_num_8].child = eax;
004bca50          m_data[m_num_8].panelID = var_84;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bca3e      }
004bca3e      
004bca5e      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x1000018f);
004bca73      int32_t var_7c;
004bca73      UIElement::GetAttribute_Enum(eax_6, 0x10000029, &var_7c);
004bca7e      int32_t eax_8 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bca85      uint8_t eax_11;
004bca85      
004bca85      if (this->m_childrenInfoArray.m_num >= eax_8)
004bca93          eax_11 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_8 + 1)));
004bca93      
004bca9a      if ((this->m_childrenInfoArray.m_num < eax_8 || eax_11 != 0))
004bca9a      {
004bca9c          uint32_t m_num = this->m_childrenInfoArray.m_num;
004bcaa3          struct gmPanelUI::PanelChildInfo* m_data_8 = this->m_childrenInfoArray.m_data;
004bcaa5          m_data_8[m_num].child = eax_6;
004bcaac          m_data_8[m_num].panelID = var_7c;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bca9a      }
004bca9a      
004bcaba      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x1000018e);
004bcacf      int32_t var_74;
004bcacf      UIElement::GetAttribute_Enum(eax_12, 0x10000029, &var_74);
004bcada      int32_t eax_14 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcae1      uint8_t eax_17;
004bcae1      
004bcae1      if (this->m_childrenInfoArray.m_num >= eax_14)
004bcaef          eax_17 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_14 + 1)));
004bcaef      
004bcaf6      if ((this->m_childrenInfoArray.m_num < eax_14 || eax_17 != 0))
004bcaf6      {
004bcaf8          uint32_t m_num_9 = this->m_childrenInfoArray.m_num;
004bcaff          struct gmPanelUI::PanelChildInfo* m_data_1 = this->m_childrenInfoArray.m_data;
004bcb01          m_data_1[m_num_9].child = eax_12;
004bcb08          m_data_1[m_num_9].panelID = var_74;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcaf6      }
004bcaf6      
004bcb16      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x10000559);
004bcb2b      int32_t var_6c;
004bcb2b      UIElement::GetAttribute_Enum(eax_18, 0x10000029, &var_6c);
004bcb36      int32_t eax_20 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcb3d      uint8_t eax_23;
004bcb3d      
004bcb3d      if (this->m_childrenInfoArray.m_num >= eax_20)
004bcb4b          eax_23 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_20 + 1)));
004bcb4b      
004bcb52      if ((this->m_childrenInfoArray.m_num < eax_20 || eax_23 != 0))
004bcb52      {
004bcb54          uint32_t m_num_1 = this->m_childrenInfoArray.m_num;
004bcb5b          struct gmPanelUI::PanelChildInfo* m_data_9 = this->m_childrenInfoArray.m_data;
004bcb5d          m_data_9[m_num_1].child = eax_18;
004bcb64          m_data_9[m_num_1].panelID = var_6c;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcb52      }
004bcb52      
004bcb72      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x1000018c);
004bcb87      int32_t var_64;
004bcb87      UIElement::GetAttribute_Enum(eax_24, 0x10000029, &var_64);
004bcb92      int32_t eax_26 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcb99      uint8_t eax_29;
004bcb99      
004bcb99      if (this->m_childrenInfoArray.m_num >= eax_26)
004bcba7          eax_29 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_26 + 1)));
004bcba7      
004bcbae      if ((this->m_childrenInfoArray.m_num < eax_26 || eax_29 != 0))
004bcbae      {
004bcbb0          uint32_t m_num_10 = this->m_childrenInfoArray.m_num;
004bcbb7          struct gmPanelUI::PanelChildInfo* m_data_2 = this->m_childrenInfoArray.m_data;
004bcbb9          m_data_2[m_num_10].child = eax_24;
004bcbc0          m_data_2[m_num_10].panelID = var_64;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcbae      }
004bcbae      
004bcbce      class UIElement* eax_30 = UIElement::GetChildRecursive(this, 0x10000182);
004bcbe3      int32_t var_5c;
004bcbe3      UIElement::GetAttribute_Enum(eax_30, 0x10000029, &var_5c);
004bcbee      int32_t eax_32 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcbf5      uint8_t eax_35;
004bcbf5      
004bcbf5      if (this->m_childrenInfoArray.m_num >= eax_32)
004bcc03          eax_35 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_32 + 1)));
004bcc03      
004bcc0a      if ((this->m_childrenInfoArray.m_num < eax_32 || eax_35 != 0))
004bcc0a      {
004bcc0c          uint32_t m_num_2 = this->m_childrenInfoArray.m_num;
004bcc13          struct gmPanelUI::PanelChildInfo* m_data_10 = this->m_childrenInfoArray.m_data;
004bcc15          m_data_10[m_num_2].child = eax_30;
004bcc1c          m_data_10[m_num_2].panelID = var_5c;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcc0a      }
004bcc0a      
004bcc2a      class UIElement* eax_36 = UIElement::GetChildRecursive(this, 0x1000018d);
004bcc3f      int32_t var_54;
004bcc3f      UIElement::GetAttribute_Enum(eax_36, 0x10000029, &var_54);
004bcc4a      int32_t eax_38 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcc51      uint8_t eax_41;
004bcc51      
004bcc51      if (this->m_childrenInfoArray.m_num >= eax_38)
004bcc5f          eax_41 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_38 + 1)));
004bcc5f      
004bcc66      if ((this->m_childrenInfoArray.m_num < eax_38 || eax_41 != 0))
004bcc66      {
004bcc68          uint32_t m_num_11 = this->m_childrenInfoArray.m_num;
004bcc6f          struct gmPanelUI::PanelChildInfo* m_data_3 = this->m_childrenInfoArray.m_data;
004bcc71          m_data_3[m_num_11].child = eax_36;
004bcc78          m_data_3[m_num_11].panelID = var_54;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcc66      }
004bcc66      
004bcc86      class UIElement* eax_42 = UIElement::GetChildRecursive(this, 0x10000190);
004bcc9b      int32_t var_4c;
004bcc9b      UIElement::GetAttribute_Enum(eax_42, 0x10000029, &var_4c);
004bcca6      int32_t eax_44 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bccad      uint8_t eax_47;
004bccad      
004bccad      if (this->m_childrenInfoArray.m_num >= eax_44)
004bccbb          eax_47 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_44 + 1)));
004bccbb      
004bccc2      if ((this->m_childrenInfoArray.m_num < eax_44 || eax_47 != 0))
004bccc2      {
004bccc4          uint32_t m_num_3 = this->m_childrenInfoArray.m_num;
004bcccb          struct gmPanelUI::PanelChildInfo* m_data_11 = this->m_childrenInfoArray.m_data;
004bcccd          m_data_11[m_num_3].child = eax_42;
004bccd4          m_data_11[m_num_3].panelID = var_4c;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bccc2      }
004bccc2      
004bcce2      class UIElement* eax_48 = UIElement::GetChildRecursive(this, 0x10000184);
004bccf7      int32_t var_44;
004bccf7      UIElement::GetAttribute_Enum(eax_48, 0x10000029, &var_44);
004bcd02      int32_t eax_50 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcd09      uint8_t eax_53;
004bcd09      
004bcd09      if (this->m_childrenInfoArray.m_num >= eax_50)
004bcd17          eax_53 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_50 + 1)));
004bcd17      
004bcd1e      if ((this->m_childrenInfoArray.m_num < eax_50 || eax_53 != 0))
004bcd1e      {
004bcd20          uint32_t m_num_12 = this->m_childrenInfoArray.m_num;
004bcd27          struct gmPanelUI::PanelChildInfo* m_data_4 = this->m_childrenInfoArray.m_data;
004bcd29          m_data_4[m_num_12].child = eax_48;
004bcd30          m_data_4[m_num_12].panelID = var_44;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcd1e      }
004bcd1e      
004bcd3e      class UIElement* eax_54 = UIElement::GetChildRecursive(this, 0x10000185);
004bcd53      int32_t var_3c;
004bcd53      UIElement::GetAttribute_Enum(eax_54, 0x10000029, &var_3c);
004bcd5e      int32_t eax_56 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcd65      uint8_t eax_59;
004bcd65      
004bcd65      if (this->m_childrenInfoArray.m_num >= eax_56)
004bcd73          eax_59 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_56 + 1)));
004bcd73      
004bcd7a      if ((this->m_childrenInfoArray.m_num < eax_56 || eax_59 != 0))
004bcd7a      {
004bcd7c          uint32_t m_num_4 = this->m_childrenInfoArray.m_num;
004bcd83          struct gmPanelUI::PanelChildInfo* m_data_12 = this->m_childrenInfoArray.m_data;
004bcd85          m_data_12[m_num_4].child = eax_54;
004bcd8c          m_data_12[m_num_4].panelID = var_3c;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcd7a      }
004bcd7a      
004bcd9a      class UIElement* eax_60 = UIElement::GetChildRecursive(this, 0x10000181);
004bcdaf      int32_t var_34;
004bcdaf      UIElement::GetAttribute_Enum(eax_60, 0x10000029, &var_34);
004bcdba      int32_t eax_62 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcdc1      uint8_t eax_65;
004bcdc1      
004bcdc1      if (this->m_childrenInfoArray.m_num >= eax_62)
004bcdcf          eax_65 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_62 + 1)));
004bcdcf      
004bcdd6      if ((this->m_childrenInfoArray.m_num < eax_62 || eax_65 != 0))
004bcdd6      {
004bcdd8          uint32_t m_num_13 = this->m_childrenInfoArray.m_num;
004bcddf          struct gmPanelUI::PanelChildInfo* m_data_5 = this->m_childrenInfoArray.m_data;
004bcde1          m_data_5[m_num_13].child = eax_60;
004bcde8          m_data_5[m_num_13].panelID = var_34;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcdd6      }
004bcdd6      
004bcdf6      class UIElement* eax_66 = UIElement::GetChildRecursive(this, 0x10000189);
004bce0b      int32_t var_2c;
004bce0b      UIElement::GetAttribute_Enum(eax_66, 0x10000029, &var_2c);
004bce16      int32_t eax_68 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bce1d      uint8_t eax_71;
004bce1d      
004bce1d      if (this->m_childrenInfoArray.m_num >= eax_68)
004bce2b          eax_71 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_68 + 1)));
004bce2b      
004bce32      if ((this->m_childrenInfoArray.m_num < eax_68 || eax_71 != 0))
004bce32      {
004bce34          uint32_t m_num_5 = this->m_childrenInfoArray.m_num;
004bce3b          struct gmPanelUI::PanelChildInfo* m_data_13 = this->m_childrenInfoArray.m_data;
004bce3d          m_data_13[m_num_5].child = eax_66;
004bce44          m_data_13[m_num_5].panelID = var_2c;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bce32      }
004bce32      
004bce52      class UIElement* eax_72 = UIElement::GetChildRecursive(this, 0x10000183);
004bce67      int32_t var_24;
004bce67      UIElement::GetAttribute_Enum(eax_72, 0x10000029, &var_24);
004bce72      int32_t eax_74 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bce79      uint8_t eax_77;
004bce79      
004bce79      if (this->m_childrenInfoArray.m_num >= eax_74)
004bce87          eax_77 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_74 + 1)));
004bce87      
004bce8e      if ((this->m_childrenInfoArray.m_num < eax_74 || eax_77 != 0))
004bce8e      {
004bce90          uint32_t m_num_14 = this->m_childrenInfoArray.m_num;
004bce97          struct gmPanelUI::PanelChildInfo* m_data_6 = this->m_childrenInfoArray.m_data;
004bce99          m_data_6[m_num_14].child = eax_72;
004bcea0          m_data_6[m_num_14].panelID = var_24;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bce8e      }
004bce8e      
004bceae      class UIElement* eax_78 = UIElement::GetChildRecursive(this, 0x1000018a);
004bcec6      int32_t var_1c;
004bcec6      UIElement::GetAttribute_Enum(eax_78, 0x10000029, &var_1c);
004bced1      int32_t eax_80 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bced8      uint8_t eax_83;
004bced8      
004bced8      if (this->m_childrenInfoArray.m_num >= eax_80)
004bcee6          eax_83 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_80 + 1)));
004bcee6      
004bceed      if ((this->m_childrenInfoArray.m_num < eax_80 || eax_83 != 0))
004bceed      {
004bceef          uint32_t m_num_6 = this->m_childrenInfoArray.m_num;
004bcef6          struct gmPanelUI::PanelChildInfo* m_data_14 = this->m_childrenInfoArray.m_data;
004bcef8          m_data_14[m_num_6].child = eax_78;
004bceff          m_data_14[m_num_6].panelID = var_1c;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bceed      }
004bceed      
004bcf0d      class UIElement* eax_84 = UIElement::GetChildRecursive(this, 0x10000187);
004bcf28      int32_t var_14;
004bcf28      UIElement::GetAttribute_Enum(eax_84, 0x10000029, &var_14);
004bcf33      int32_t eax_86 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcf3a      uint8_t eax_89;
004bcf3a      
004bcf3a      if (this->m_childrenInfoArray.m_num >= eax_86)
004bcf48          eax_89 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_86 + 1)));
004bcf48      
004bcf4f      if ((this->m_childrenInfoArray.m_num < eax_86 || eax_89 != 0))
004bcf4f      {
004bcf51          uint32_t m_num_15 = this->m_childrenInfoArray.m_num;
004bcf5b          struct gmPanelUI::PanelChildInfo* m_data_7 = this->m_childrenInfoArray.m_data;
004bcf5d          m_data_7[m_num_15].child = eax_84;
004bcf67          m_data_7[m_num_15].panelID = var_14;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcf4f      }
004bcf4f      
004bcf75      class UIElement* eax_90 = UIElement::GetChildRecursive(this, 0x10000188);
004bcf90      int32_t var_c;
004bcf90      UIElement::GetAttribute_Enum(eax_90, 0x10000029, &var_c);
004bcf9b      int32_t eax_92 = (this->m_childrenInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bcfa2      uint8_t eax_95;
004bcfa2      
004bcfa2      if (this->m_childrenInfoArray.m_num >= eax_92)
004bcfb0          eax_95 = SmartArray<VertexRange,1>::grow(&this->m_childrenInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_childrenInfoArray, (eax_92 + 1)));
004bcfb0      
004bcfb7      if ((this->m_childrenInfoArray.m_num < eax_92 || eax_95 != 0))
004bcfb7      {
004bcfb9          uint32_t m_num_7 = this->m_childrenInfoArray.m_num;
004bcfc3          struct gmPanelUI::PanelChildInfo* m_data_15 = this->m_childrenInfoArray.m_data;
004bcfc5          m_data_15[m_num_7].child = eax_90;
004bcfcf          m_data_15[m_num_7].panelID = var_c;
004bca1c          this->m_childrenInfoArray.m_num += 1;
004bcfb7      }
004bcfb7      
004bcfdc      int32_t i = 0;
004bcfdc      
004bcfe0      if (this->m_childrenInfoArray.m_num > 0)
004bcfe0      {
004bcffa          do
004bcffa          {
004bca1c              this->m_childrenInfoArray.m_data[i].child->vtable->SetVisible(0);
004bcff7              i += 1;
004bcffa          } while (i < this->m_childrenInfoArray.m_num);
004bcfe0      }
004bc9e0  }

004bd003           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004bd010  void __fastcall gmPanelUI::PostInit(class gmPanelUI* this)

004bd010  {
004bd014      UIElement::PostInit(this);
004bd019      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004bd022      struct gmNoticeHandler::VTable** eax_1;
004bd022      
004bd022      if (this == 0)
004bd02c          eax_1 = nullptr;
004bd022      else
004bd024          eax_1 = &this->vtable;
004bd024      
004bd02e      eax->vtable->RegisterNoticeHandler(0x4dd1f8, eax_1);
004bd03d      struct gmNoticeHandler::VTable** eax_2;
004bd03d      
004bd03d      if (this == 0)
004bd047          eax_2 = nullptr;
004bd03d      else
004bd03f          eax_2 = &this->vtable;
004bd03f      
004bd049      eax->vtable->RegisterNoticeHandler(0x4dd1f0, eax_2);
004bd058      struct gmNoticeHandler::VTable** eax_3;
004bd058      
004bd058      if (this == 0)
004bd062          eax_3 = nullptr;
004bd058      else
004bd05a          eax_3 = &this->vtable;
004bd05a      
004bd064      eax->vtable->RegisterNoticeHandler(0x4dd21f, eax_3);
004bd073      struct gmNoticeHandler::VTable** eax_4;
004bd073      
004bd073      if (this == 0)
004bd07d          eax_4 = nullptr;
004bd073      else
004bd075          eax_4 = &this->vtable;
004bd075      
004bd07f      eax->vtable->RegisterNoticeHandler(0x4dd25c, eax_4);
004bd090      UIListener::RegisterForGlobalMessage(this, 1);
004bd097      gmPanelUI::SetupChildren(this);
004bd097      
004bd0a6      if (this->m_currentlyShownPanel != 0)
004bd0a6      {
004bd0a8          this->vtable->SetVisible(1);
004bd0b1          return;
004bd0a6      }
004bd0a6      
004bd0b2      this->vtable->SetVisible(0);
004bd010  }

004bd0bc                                                                                      90 90 90 90                              ....

004bd0c0  void __thiscall gmToolbarUI::RecvNotice_UpdateItemMana(class gmToolbarUI* this, uint32_t arg2, float arg3, uint8_t arg4)

004bd0c0  {
004bd0ca      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xb] == arg2)
004bd0ca      {
004bd0cc          class HashSetData<UIElement *>* eax;
004bd0cc          eax = arg4;
004bd0cc          
004bd0d2          if (eax == 0)
004bd0d2          {
004bd0d6              CM_Item::Event_QueryItemMana(0);
004bd0df              return;
004bd0d2          }
004bd0d2          
004bd0e2          class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7];
004bd0e2          
004bd0f0          if ((((int8_t)(*(int32_t*)((char*)ecx + 0xa4) >> 1)) & 1) == 0)
004bd0f2              ecx->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](1);
004bd0f2          
004bd103          UIElement::SetAttribute_Float(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7], 0x69, arg3);
004bd0ca      }
004bd0c0  }

004bd10c                                      90 90 90 90                                                              ....

004bd110  void __thiscall gmToolbarUI::RecvNotice_UpdateObjectHealth(class gmToolbarUI* this, uint32_t arg2, float arg3)

004bd110  {
004bd11a      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xb] == arg2)
004bd11a      {
004bd11c          class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004bd11c          
004bd12a          if ((((int8_t)(*(int32_t*)((char*)ecx + 0xa4) >> 1)) & 1) == 0)
004bd12c              ecx->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](1);
004bd12c          
004bd13d          UIElement::SetAttribute_Float(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6], 0x69, arg3);
004bd11a      }
004bd110  }

004bd146                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bd150  uint8_t __stdcall gmToolbarUI::OnItemListDragOver(class gmToolbarUI* this @ ecx, class UIElement_UIItem* arg2, uint32_t arg3, uint32_t arg4, enum DropItemFlags arg5)

004bd150  {
004bd156      uint32_t eax;
004bd156      
004bd156      if (arg3 != 0)
004bd156      {
004bd158          eax = arg5;
004bd158          
004bd162          if (((eax & 0xe) == 0 || (eax & 4) != 0))
004bd16d              UIElement_UIItem::SetDragAcceptState(arg2, 0x10000040);
004bd156      }
004bd156      
004bd172      eax = 1;
004bd174      return 1;
004bd150  }

004bd177                                                                       90 90 90 90 90 90 90 90 90                         .........

004bd180  void __thiscall gmToolbarUI::HandleInventoryButtonDragOver(class gmToolbarUI* this, class UIElement* arg2)

004bd180  {
004bd19a      char var_8;
004bd19a      void var_4;
004bd19a      UIElement_ItemList::InqDropIconInfo(arg2, &arg2, &var_4, &var_8);
004bd19a      
004bd1af      if ((arg2 != 0 && (var_8 & 0xe) == 0))
004bd1b1          this->m_pInventoryButtonDragOverlay->vtable->SetState(0x10000046);
004bd180  }

004bd1cb                                   90 90 90 90 90                                                             .....

004bd1d0  uint8_t __stdcall gmToolbarUI::IsShortcutEligible(class gmToolbarUI* this @ ecx, class ACCWeenieObject* arg2)

004bd1d0  {
004bd1d7      class ClientUISystem* eax;
004bd1d7      
004bd1d7      if (arg2 != 0)
004bd1d7      {
004bd1e0          if ((arg2->pwd._bitfield & 4) == 0)
004bd1e0          {
004bd1f1          label_4bd1f1:
004bd1f1              eax = arg2->vtable->InqType();
004bd1f1              
004bd1f6              if ((eax & 0x10) == 0)
004bd1f6              {
004bd203              label_4bd203:
004bd203                  uint32_t _containerID = arg2->pwd._containerID;
004bd203                  
004bd20b                  if (_containerID != 0)
004bd20d                      eax = ClientUISystem::GetUISystem();
004bd20d                  
004bd215                  if ((_containerID == 0 || _containerID != eax->vendorID))
004bd215                  {
004bd21d                      eax = 1;
004bd220                      return 1;
004bd215                  }
004bd1f6              }
004bd1f6              else
004bd1f6              {
004bd1fc                  eax = arg2->vtable->IsPlayer();
004bd1fc                  
004bd201                  if (eax != 0)
004bd201                      goto label_4bd203;
004bd1f6              }
004bd1e0          }
004bd1e0          else if (arg2->vtable->IsPlayer() != 0)
004bd1eb              goto label_4bd1f1;
004bd1d7      }
004bd1d7      
004bd217      eax = 0;
004bd21a      return 0;
004bd1d0  }

004bd223           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004bd230  class IDClass<_tagDataID,32,0>* WClassIDToDataID(class IDClass<_tagDataID,32,0>* __return, uint32_t arg2)

004bd230  {
004bd23d      DBObj::GetDIDByEnum(__return, arg2, 0xc);
004bd248      return __return;
004bd230  }

004bd249                             90 90 90 90 90 90 90                                                           .......

004bd250  uint8_t __fastcall ACCWeenieObject::IsCoinstack(class ACCWeenieObject const* this)

004bd250  {
004bd251      uint32_t id = this->pwd._wcid.id;
004bd257      this = (*(uint8_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard');
004bd257      
004bd264      if ((1 & this) == 0)
004bd264      {
004bd27a          (*(uint32_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard') |= 1;
004bd280          DBObj::GetDIDByEnum(&WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack, 0x10000002, 0xc);
004bd28a          atexit(`WClassIDHelper::IsCoinstack'::`2'::didCoinstack);
004bd264      }
004bd264      
004bd29c      return id == (*(uint32_t*)WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack);
004bd250  }

004bd29d                                                                                         90 90 90                               ...

004bd2a0  void __thiscall gmToolbarUI::RecvNotice_SplitStack(class gmToolbarUI* this, uint32_t arg2)

004bd2a0  {
004bd2ad      if (arg2 == ACCWeenieObject::selectedID)
004bd2ad      {
004bd2b0          class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004bd2b0          
004bd2ba          if (eax != 0)
004bd2ba          {
004bd2bc              uint32_t _stackSize = eax->pwd._stackSize;
004bd2bc              
004bd2c9              if ((_stackSize != 0 && _stackSize > 1))
004bd2c9              {
004bd2cb                  class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8];
004bd2cb                  
004bd2d0                  if (ecx != 0)
004bd2d0                  {
004bd2d2                      ecx->m_hashKey->m_children.m_ihlIntrusive.m_hash.m_aInplaceBuckets[0x11]();
004bd2da                      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8]->m_hashKey->m_children.m_ihlIntrusive.m_hash.m_aInplaceBuckets[0x13]();
004bd2e8                      UIElement_Text::SelectAll(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8]);
004bd2d0                  }
004bd2c9              }
004bd2ba          }
004bd2ad      }
004bd2a0  }

004bd2f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004bd300  void __thiscall gmToolbarUI::RecvNotice_SetPanelVisibility(class gmToolbarUI* this, uint32_t arg2, uint8_t arg3)

004bd300  {
004bd301      class HashSetData<UIElement *>* esi = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004bd304      int32_t edx = 0;
004bd304      
004bd308      if (esi > 0)
004bd308      {
004bd30a          struct IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::VTable* vtable = this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable;
004bd30a          
004bd319          while ((vtable->__vecDelDtor == 0 || *(int32_t*)((char*)vtable + 4) != arg2))
004bd319          {
004bd31b              edx += 1;
004bd31c              vtable = &vtable[2];
004bd31c              
004bd321              if (edx >= esi)
004bd324                  return;
004bd319          }
004bd319          
004bd327          uint32_t ecx;
004bd327          ecx = arg3;
004bd32d          int32_t edx_1 = *(uint32_t*)vtable->__vecDelDtor;
004bd32d          
004bd333          if (ecx != 0)
004bd333          {
004bd337              *(uint32_t*)(edx_1 + 0x9c)(6);
004bd33e              return;
004bd333          }
004bd333          
004bd343          *(uint32_t*)(edx_1 + 0x9c)(1);
004bd308      }
004bd300  }

004bd34d                                         90 90 90                                                               ...

004bd350  void __thiscall gmToolbarUI::UseShortcut(class gmToolbarUI* this, int32_t arg2, uint8_t arg3)

004bd350  {
004bd362      if ((arg2 >= 0 && arg2 < this->m_shortcutSlots.m_num))
004bd362      {
004bd36e          class UIElement_ListBox* ecx_1 = this->m_shortcutSlots.m_data[arg2];
004bd36e          
004bd373          if (ecx_1 != 0)
004bd373          {
004bd37b              class UIElement* eax = UIElement_ListBox::GetItem(ecx_1, 0);
004bd37b              
004bd382              if (eax != 0)
004bd382              {
004bd392                  void* eax_1 = eax->vtable->DynamicCast(0x10000032);
004bd392                  
004bd39c                  if (eax_1 != 0)
004bd39c                  {
004bd3a5                      if ((ClientUISystem::GetUISystem() != 0 && ClientUISystem::GetUISystem()->targetMode != TARGET_MODE_NONE))
004bd3a5                      {
004bd3b3                          class ClientUISystem* eax_3 = ClientUISystem::GetUISystem();
004bd3b8                          uint32_t esi_2 = *(uint32_t*)((char*)eax_1 + 0x5fc);
004bd3b8                          
004bd3c3                          if (esi_2 != 0)
004bd3ce                              ClientUISystem::ExecuteTargetModeForItem(ClientUISystem::GetUISystem(), esi_2, eax_3->targetMode);
004bd3ce                          
004bd3dc                          ClientUISystem::SetTargetMode(ClientUISystem::GetUISystem(), TARGET_MODE_NONE);
004bd3e2                          return;
004bd3a5                      }
004bd3a5                      
004bd3e5                      class ClientUISystem* eax_2;
004bd3e5                      eax_2 = arg3;
004bd3e5                      
004bd3ed                      if (eax_2 != 0)
004bd3ed                      {
004bd3f8                          ItemHolder::UseObject(*(uint32_t*)((char*)eax_1 + 0x5fc), 0, 0);
004bd401                          return;
004bd3ed                      }
004bd3ed                      
004bd40b                      ACCWeenieObject::SetSelectedObject(*(uint32_t*)((char*)eax_1 + 0x5fc), 0);
004bd39c                  }
004bd382              }
004bd373          }
004bd362      }
004bd350  }

004bd417                                                                       90 90 90 90 90 90 90 90 90                         .........

004bd420  void __fastcall gmToolbarUI::FlushShortcuts(class gmToolbarUI* this)

004bd420  {
004bd42a      int32_t i = 0;
004bd42a      
004bd42e      if (this->m_shortcutSlots.m_num > 0)
004bd42e      {
004bd44b          do
004bd44b          {
004bd436              class UIElement_ItemList* ecx = this->m_shortcutSlots.m_data[i];
004bd436              
004bd43b              if (ecx != 0)
004bd43d                  UIElement_ItemList::ItemList_Flush(ecx);
004bd43d              
004bd448              i += 1;
004bd44b          } while (i < this->m_shortcutSlots.m_num);
004bd42e      }
004bd420  }


004bd450  int32_t __thiscall gmToolbarUI::RemoveShortcut(class gmToolbarUI* this, uint32_t arg2, uint8_t arg3)

004bd450  {
004bd45c      int32_t i = 0;
004bd45c      
004bd460      if (this->m_shortcutSlots.m_num > 0)
004bd460      {
004bd492          do
004bd492          {
004bd476              class UIElement_ItemList* esi_1 = this->m_shortcutSlots.m_data[i];
004bd476              
004bd47b              if ((esi_1 != 0 && UIElement_ItemList::ItemList_IsInList(esi_1, arg2) != 0))
004bd47b              {
004bd4a0                  UIElement_ItemList::ItemList_Flush(esi_1);
004bd4a6                  class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(arg2);
004bd4a6                  
004bd4b0                  if (eax_5 != 0)
004bd4b8                      ACCWeenieObject::SetShortcutNum(eax_5, 0xffffffff, 0);
004bd4b8                  
004bd4bd                  eax_5 = arg3;
004bd4bd                  
004bd4c3                  if (eax_5 != 0)
004bd4c3                  {
004bd4c6                      CM_Character::Event_RemoveShortCut(i);
004bd4d7                      PlayerModule::RemoveShortCut(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, i);
004bd4c3                  }
004bd4c3                  
004bd4e2                  return i;
004bd47b              }
004bd47b              
004bd48f              i += 1;
004bd492          } while (i < this->m_shortcutSlots.m_num);
004bd460      }
004bd460      
004bd49b      return 0xffffffff;
004bd450  }

004bd468                          8d a4 24 00 00 00 00 90                                                          ..$.....
004bd4e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004bd4f0  uint32_t __thiscall gmToolbarUI::RemoveShortcutInSlotNum(class gmToolbarUI* this, int32_t arg2, uint8_t arg3)

004bd4f0  {
004bd502      if ((arg2 >= 0 && arg2 < this->m_shortcutSlots.m_num))
004bd502      {
004bd50a          class UIElement_ListBox* ecx_1 = this->m_shortcutSlots.m_data[arg2];
004bd50a          
004bd50f          if (ecx_1 != 0)
004bd50f          {
004bd513              class UIElement* eax = UIElement_ListBox::GetItem(ecx_1, 0);
004bd513              
004bd51a              if (eax != 0)
004bd51a              {
004bd525                  void* eax_1 = eax->vtable->DynamicCast(0x10000032);
004bd525                  
004bd52d                  if (eax_1 != 0)
004bd52d                  {
004bd52f                      uint32_t result = *(uint32_t*)((char*)eax_1 + 0x5fc);
004bd52f                      
004bd537                      if (result != 0)
004bd537                      {
004bd541                          gmToolbarUI::RemoveShortcut(this, result, arg3);
004bd54a                          return result;
004bd537                      }
004bd52d                  }
004bd51a              }
004bd50f          }
004bd502      }
004bd502      
004bd551      return 0;
004bd4f0  }

004bd554                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004bd560  int32_t __thiscall gmToolbarUI::GetFirstEmptyShortcutToTheRightOf(class gmToolbarUI* this, uint32_t arg2)

004bd560  {
004bd574      int32_t i;
004bd574      
004bd574      for (i = (arg2 + 1); i < this->m_shortcutSlots.m_num; i += 1)
004bd574      {
004bd586          class UIElement_ItemList* ecx = this->m_shortcutSlots.m_data[i];
004bd586          
004bd58b          if ((ecx != 0 && UIElement_ItemList::GetNumUIItems(ecx) == 0))
004bd5d4              return i;
004bd574      }
004bd574      
004bd5a1      i = 0;
004bd5a1      
004bd5a9      while (true)
004bd5a9      {
004bd5a9          if (i < this->m_shortcutSlots.m_num)
004bd5a9          {
004bd5b1              class UIElement_ItemList* ecx_2 = this->m_shortcutSlots.m_data[i];
004bd5b1              
004bd5b6              if ((ecx_2 != 0 && UIElement_ItemList::GetNumUIItems(ecx_2) == 0))
004bd5bf                  break;
004bd5bf              
004bd5c1              i += 1;
004bd5c1              
004bd5c4              if (i <= arg2)
004bd5c4                  continue;
004bd5a9          }
004bd5a9          
004bd5cc          return 0xffffffff;
004bd5a9      }
004bd5a9      
004bd5d4      return i;
004bd560  }

004bd578                                                                          8d a4 24 00 00 00 00 90                          ..$.....
004bd5d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004bd5e0  uint8_t __thiscall gmToolbarUI::IsShortcutSlotAvailable(class gmToolbarUI* this, int32_t arg2)

004bd5e0  {
004bd5ee      int32_t eax;
004bd5ee      
004bd5ee      if ((arg2 >= 0 && arg2 < this->m_shortcutSlots.m_num))
004bd5ee      {
004bd5f6          class UIElement_ItemList* ecx_1 = this->m_shortcutSlots.m_data[arg2];
004bd5f6          
004bd5fb          if ((ecx_1 != 0 && UIElement_ItemList::GetNumUIItems(ecx_1) == 0))
004bd5fb          {
004bd606              eax = 1;
004bd608              return 1;
004bd5fb          }
004bd5ee      }
004bd5ee      
004bd60b      eax = 0;
004bd60d      return 0;
004bd5e0  }


004bd610  void __thiscall gmToolbarUI::RecvNotice_SetCombatMode(class gmToolbarUI* this, enum COMBAT_MODE arg2)

004bd610  {
004bd61e      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x10] = arg2 != MAGIC_COMBAT_MODE;
004bd625      int32_t i = 0;
004bd625      
004bd629      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe] > 0)
004bd629      {
004bd679          do
004bd679          {
004bd633              class UIElement_ListBox* ecx_1 = *(uint32_t*)(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xc] + (i << 2));
004bd633              
004bd638              if (ecx_1 != 0)
004bd638              {
004bd63c                  class UIElement* eax_2 = UIElement_ListBox::GetItem(ecx_1, 0);
004bd63c                  
004bd643                  if (eax_2 != 0)
004bd643                  {
004bd64e                      class UIElement_UIItem* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004bd64e                      
004bd660                      if ((eax_3 != 0 && eax_3->itemID != 0))
004bd660                      {
004bd662                          uint32_t ecx_3;
004bd662                          ecx_3 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x10];
004bd667                          ecx_3 = ecx_3 == 0;
004bd66e                          UIElement_UIItem::SetShortcutNum(eax_3, i, ecx_3);
004bd660                      }
004bd643                  }
004bd638              }
004bd638              
004bd676              i += 1;
004bd679          } while (i < this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe]);
004bd629      }
004bd629      
004bd688      class UIElement* eax_5;
004bd688      int32_t ecx_6;
004bd688      eax_5 = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000192);
004bd688      
004bd68f      if (eax_5 != 0)
004bd68f      {
004bd696          ecx_6 = arg2 == NONCOMBAT_COMBAT_MODE;
004bd691          eax_5->vtable->SetVisible(ecx_6);
004bd68f      }
004bd68f      
004bd6a6      class UIElement* eax_6;
004bd6a6      int32_t ecx_9;
004bd6a6      eax_6 = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000193);
004bd6a6      
004bd6ad      if (eax_6 != 0)
004bd6ad      {
004bd6b4          ecx_9 = arg2 == MELEE_COMBAT_MODE;
004bd6af          eax_6->vtable->SetVisible(ecx_9);
004bd6ad      }
004bd6ad      
004bd6c4      class UIElement* eax_7;
004bd6c4      int32_t ecx_12;
004bd6c4      eax_7 = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000194);
004bd6c4      
004bd6cb      if (eax_7 != 0)
004bd6cb      {
004bd6d2          ecx_12 = arg2 == MISSILE_COMBAT_MODE;
004bd6cd          eax_7->vtable->SetVisible(ecx_12);
004bd6cb      }
004bd6cb      
004bd6e2      class UIElement* eax_8;
004bd6e2      enum COMBAT_MODE ecx_15;
004bd6e2      eax_8 = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000195);
004bd6e2      
004bd6eb      if (eax_8 == 0)
004bd700          return;
004bd700      
004bd6f2      ecx_15 = arg2 == MAGIC_COMBAT_MODE;
004bd6f6      arg2 = ecx_15;
004bd6fc      /* jump -> eax_8->vtable->SetVisible */
004bd610  }

004bd62d                                         8d 49 00                                                               .I.
004bd703           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004bd710  void __thiscall gmToolbarUI::gmToolbarUI(class gmToolbarUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004bd710  {
004bd71f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004bd724      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bd72e      this->vtable = &ItemListDragHandler::`vftable';
004bd73a      this->vtable = 0x7b44e0;
004bd740      this->vtable = &gmToolbarUI::`vftable';
004bd74a      this->vtable = &gmToolbarUI::`vftable';
004bd754      __builtin_memset(&this->m_buttonInfoArray, 0, 0x44);
004bd7ba      this->m_idAmmoObject = 0;
004bd7c0      this->m_bToolbarActive = 1;
004bd710  }

004bd7cd                                         90 90 90                                                               ...

004bd7d0  class UIElement* __thiscall gmToolbarUI::DynamicCast(class gmToolbarUI* this, uint32_t arg2) __pure

004bd7d0  {
004bd7dc      if (arg2 == 0x10000007)
004bd7e9          return this;
004bd7e9      
004bd7e3      int32_t edx_1;
004bd7e3      edx_1 = arg2 != 3;
004bd7e7      return (this & (edx_1 - 1));
004bd7d0  }

004bd7ec                                      90 90 90 90                                                              ....

004bd7f0  uint32_t gmToolbarUI::GetUIElementType(class gmToolbarUI const* this @ ecx) __pure

004bd7f0  {
004bd7f5      return 0x10000007;
004bd7f0  }

004bd7f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004bd800  void __fastcall gmToolbarUI::~gmToolbarUI(class gmToolbarUI* this)

004bd800  {
004bd811      int32_t i = 0;
004bd813      bool cond:0 = this->m_shortcutSlots.m_num <= 0;
004bd815      this->vtable = 0x7b44e0;
004bd80b      this->vtable = &gmToolbarUI::`vftable';
004bd821      this->vtable = &gmToolbarUI::`vftable';
004bd821      
004bd82b      if (!(cond:0))
004bd82b      {
004bd84b          do
004bd84b          {
004bd836              class UIElement_ItemList* ecx_1 = this->m_shortcutSlots.m_data[i];
004bd836              
004bd83b              if (ecx_1 != 0)
004bd83d                  UIElement_ItemList::UnregisterItemListDragHandler(ecx_1);
004bd83d              
004bd848              i += 1;
004bd84b          } while (i < this->m_shortcutSlots.m_num);
004bd82b      }
004bd82b      
004bd851      UIListener::UnRegisterForGlobalMessage(this, 1);
004bd851      
004bd868      if ((this->m_shortcutSlots.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004bd871          operator delete[](this->m_shortcutSlots.m_data);
004bd871      
004bd889      if ((this->m_buttonInfoArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004bd892          operator delete[](this->m_buttonInfoArray.m_data);
004bd892      
004bd80b      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bd8a2      NoticeHandler::~NoticeHandler(&this->vtable);
004bd8ac      /* tailcall */
004bd8ac      return UIElement_Field::~UIElement_Field(this);
004bd800  }

004bd8b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004bd8c0  class UIElement* gmToolbarUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004bd8c0  {
004bd8c5      void* eax = operator new(0x64c);
004bd8c5      
004bd8cf      if (eax == 0)
004bd8e5          return 0;
004bd8e5      
004bd8e2      return gmToolbarUI::gmToolbarUI(eax, arg1, arg2);
004bd8c0  }

004bd8e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bd8f0  void __thiscall gmToolbarUI::RecvNotice_RemoveShortcut(class gmToolbarUI* this, uint32_t arg2)

004bd8f0  {
004bd8fd      gmToolbarUI::RemoveShortcut(((char*)this - 0x5f8), arg2, 1);
004bd8f0  }

004bd905                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004bd910  void __thiscall gmToolbarUI::RecvNotice_UseShortcut(class gmToolbarUI* this, int32_t arg2)

004bd910  {
004bd91d      gmToolbarUI::UseShortcut(((char*)this - 0x5f8), arg2, 1);
004bd910  }

004bd925                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004bd930  void __thiscall gmToolbarUI::RecvNotice_ItemListBeginDrag(class gmToolbarUI* this, class UIElement const* arg2, int32_t arg3)

004bd930  {
004bd937      class HashSetData<UIElement *>* edi = nullptr;
004bd937      
004bd93b      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe] > 0)
004bd93b      {
004bd93d          class HashSetData<UIElement *>* eax_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xc];
004bd944          class UIElement* m_hashKey;
004bd944          
004bd944          while (true)
004bd944          {
004bd944              m_hashKey = eax_1->m_hashKey;
004bd944              
004bd948              if (m_hashKey == arg2)
004bd948                  break;
004bd948              
004bd94d              edi = (&edi->m_hashKey + 1);
004bd94e              eax_1 = &eax_1->m_hashNext;
004bd94e              
004bd953              if (edi >= this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe])
004bd957                  return;
004bd944          }
004bd944          
004bd95c          class UIElement* eax_2 = UIElement_ListBox::GetItem(m_hashKey, 0);
004bd95c          
004bd963          if (eax_2 != 0)
004bd963          {
004bd96e              void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004bd96e              
004bd976              if (eax_3 != 0)
004bd976              {
004bd978                  uint32_t eax_4 = *(uint32_t*)((char*)eax_3 + 0x5fc);
004bd978                  
004bd980                  if (eax_4 != 0)
004bd980                  {
004bd98b                      gmToolbarUI::RemoveShortcut(((char*)this - 0x5f8), eax_4, 1);
004bd990                      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xf] = edi;
004bd980                  }
004bd976              }
004bd963          }
004bd93b      }
004bd930  }

004bd998                                                                          90 90 90 90 90 90 90 90                          ........

004bd9a0  void __thiscall gmToolbarUI::AddShortcut(class gmToolbarUI* this, uint32_t arg2, int32_t arg3, uint8_t arg4)

004bd9a0  {
004bd9a4      int32_t i_1 = arg3;
004bd9a4      
004bd9b6      if ((i_1 < 0 || i_1 >= this->m_shortcutSlots.m_num))
004bd9b6      {
004bd9be          int32_t i = 0;
004bd9be          
004bd9c2          if (this->m_shortcutSlots.m_num > 0)
004bd9c2          {
004bd9e3              do
004bd9e3              {
004bd9ca                  class UIElement_ItemList* ecx = this->m_shortcutSlots.m_data[i];
004bd9ca                  
004bd9cf                  if ((ecx != 0 && UIElement_ItemList::GetNumUIItems(ecx) == 0))
004bd9cf                  {
004bd9e7                      i_1 = i;
004bd9e7                      break;
004bd9cf                  }
004bd9cf                  
004bd9e0                  i += 1;
004bd9e3              } while (i < this->m_shortcutSlots.m_num);
004bd9c2          }
004bd9c2          
004bd9ef          if (i != this->m_shortcutSlots.m_num)
004bd9ef              goto label_4bd9f7;
004bd9b6      }
004bd9b6      else
004bd9b6      {
004bd9f7      label_4bd9f7:
004bd9f7          class UIElement_ItemList* esi_1 = this->m_shortcutSlots.m_data[i_1];
004bd9f7          
004bda04          if ((esi_1 != 0 && arg2 != 0))
004bda04          {
004bda08              UIElement_ItemList::ItemList_Flush(esi_1);
004bda10              class UIElement_UIItem* eax_5 = UIElement_ItemList::ItemList_AddItem(esi_1, arg2);
004bda18              class ACCWeenieObject* eax_6 = ClientObjMaintSystem::GetWeenieObject(arg2);
004bda18              
004bda22              if (eax_6 != 0)
004bda29                  ACCWeenieObject::SetShortcutNum(eax_6, i_1, 0);
004bda22              else if (eax_5 != 0)
004bda37                  UIElement_UIItem::SetDelayedShortcutNum(eax_5, i_1);
004bda37              
004bda3c              eax_6 = arg4;
004bda3c              
004bda42              if (eax_6 != 0)
004bda42              {
004bda4c                  void var_10;
004bda4c                  CShortCutData::CShortCutData(&var_10, i_1, arg2, 0);
004bda56                  CM_Character::Event_AddShortCut(&var_10);
004bda6b                  PlayerModule::AddShortCut(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, &var_10);
004bda42              }
004bda04          }
004bd9b6      }
004bd9a0  }

004bda79                                                                             90 90 90 90 90 90 90                           .......

004bda80  void* __thiscall gmToolbarUI::`scalar deleting destructor'(class gmToolbarUI* this, uint32_t arg2)

004bda80  {
004bda83      gmToolbarUI::~gmToolbarUI(this);
004bda83      
004bda8d      if ((arg2 & 1) != 0)
004bda90          operator delete(this);
004bda90      
004bda9b      return this;
004bda80  }

004bda9e                                                                                            90 90                                ..

004bdaa0  void gmToolbarUI::Register()

004bdaa0  {
004bdaaa      UIElement::RegisterElementClass(0x10000007, gmToolbarUI::Create);
004bdaa0  }

004bdab3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004bdac0  void __thiscall gmToolbarUI::CreateShortcutToItem(class gmToolbarUI* this, uint32_t arg2, int32_t arg3, uint8_t arg4, uint8_t arg5)

004bdac0  {
004bdad3      if (arg2 != 0)
004bdad3      {
004bdadc          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
004bdadc          
004bdae8          if (eax_1 != 0)
004bdae8          {
004bdaf8              void (__thiscall** const var_b4_1)(class gmNoticeHandler* this, uint32_t);
004bdaf8              void* var_b0_3;
004bdaf8              void var_9c;
004bdaf8              void __return;
004bdaf8              void var_90;
004bdaf8              
004bdaf8              if (gmToolbarUI::IsShortcutEligible(this, eax_1) != 0)
004bdaf8              {
004bdb8d                  if (ACCWeenieObject::IsOwnedByPlayer(eax_1) != 0)
004bdb8d                  {
004bdbb5                  label_4bdbb5:
004bdbb5                      
004bdbbd                      if (arg3 != 0xffffffff)
004bdbbd                      {
004bdd20                      label_4bdd20:
004bdd20                          gmToolbarUI::RemoveShortcut(this, arg2, 1);
004bdd32                          gmToolbarUI::AddShortcut(this, arg2, arg3, 1);
004bdbbd                      }
004bdbbd                      else
004bdbbd                      {
004bdbc9                          int32_t edi_1 = 0;
004bdbcd                          char var_95_1 = 0;
004bdbd2                          uint32_t eax_7;
004bdbd2                          
004bdbd2                          if (this->m_shortcutSlots.m_num <= 0)
004bdbd2                          {
004bdc2d                          label_4bdc2d:
004bdc2d                              eax_7 = arg5;
004bdc2d                              
004bdc36                              if (eax_7 == 0)
004bdc36                              {
004bdc40                                  StringInfo::StringInfo(&var_90);
004bdc4e                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, &gmToolbarUI::`vftable'.RecvNotice_ChatCommand_DisplayFriends);
004bdc5e                                  StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004bdc67                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
004bdc73                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004bdc7f                                  StringInfo::~StringInfo(&var_90);
004bdc36                              }
004bdbd2                          }
004bdbd2                          else
004bdbd2                          {
004bdbda                              int32_t eax_10;
004bdbda                              
004bdbda                              while (true)
004bdbda                              {
004bdbda                                  class UIElement_ListBox* ecx_11 = this->m_shortcutSlots.m_data[edi_1];
004bdbda                                  
004bdbdf                                  if (ecx_11 != 0)
004bdbdf                                  {
004bdbe3                                      class UIElement* eax_8 = UIElement_ListBox::GetItem(ecx_11, 0);
004bdbe3                                      
004bdbea                                      if (eax_8 != 0)
004bdbea                                      {
004bdbf5                                          void* eax_9 = eax_8->vtable->DynamicCast(0x10000032);
004bdbf5                                          
004bdbfd                                          if (eax_9 != 0)
004bdbfd                                          {
004bdbff                                              eax_10 = *(uint32_t*)((char*)eax_9 + 0x5fc);
004bdbff                                              
004bdc07                                              if (eax_10 == arg2)
004bdc07                                                  break;
004bdc07                                              
004bdc0f                                              if (eax_10 == 0)
004bdc11                                                  var_95_1 = 1;
004bdbfd                                          }
004bdbea                                      }
004bdbdf                                  }
004bdbdf                                  
004bdc1c                                  edi_1 += 1;
004bdc1c                                  
004bdc1f                                  if (edi_1 >= this->m_shortcutSlots.m_num)
004bdc1f                                  {
004bdc21                                      eax_7 = var_95_1;
004bdc21                                      
004bdc27                                      if (eax_7 != 0)
004bdc27                                          goto label_4bdd20;
004bdc27                                      
004bdc27                                      goto label_4bdc2d;
004bdc1f                                  }
004bdbda                              }
004bdbda                              
004bdcf3                              eax_10 = arg5;
004bdcf3                              
004bdcfc                              if (eax_10 == 0)
004bdcfc                              {
004bdd10                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004bdd11                                  var_b4_1 = &gmToolbarUI::`vftable'.RecvNotice_AddSalvageItem;
004bdd16                                  goto label_4bdb2c;
004bdcfc                              }
004bdbd2                          }
004bdbbd                      }
004bdb8d                  }
004bdb8d                  else
004bdb8d                  {
004bdb8f                      int32_t eax_4;
004bdb8f                      eax_4 = arg4;
004bdb8f                      
004bdb98                      if (eax_4 == 0)
004bdb98                      {
004bdc91                          eax_4 = arg5;
004bdc91                          
004bdc9a                          if (eax_4 == 0)
004bdc9a                          {
004bdcb2                              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004bdcbf                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, &gmToolbarUI::`vftable'.RecvNotice_LastSpellTab);
004bdccb                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004bdcd4                              StringInfo::StringInfo(&var_90);
004bdce4                              StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004bdced                              var_b0_3 = &var_90;
004bdcee                              goto label_4bdb5d;
004bdc9a                          }
004bdb98                      }
004bdb98                      else if (CPlayerSystem::PlaceInBackpack(CPlayerSystem::GetPlayerSystem(), arg2, 0) != 0)
004bdbaf                          goto label_4bdbb5;
004bdb8d                  }
004bdaf8              }
004bdaf8              else if (arg5 == 0)
004bdb07              {
004bdb1f                  class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004bdb20                  var_b4_1 = &gmToolbarUI::`vftable'.RecvNotice_TradeAnItemForDummies;
004bdb2c              label_4bdb2c:
004bdb2c                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, var_b4_1);
004bdb38                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004bdb41                  StringInfo::StringInfo(&var_90);
004bdb51                  StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004bdb5a                  var_b0_3 = &var_90;
004bdb5d              label_4bdb5d:
004bdb5d                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_b0_3);
004bdb69                  StringInfo::~StringInfo(&var_90);
004bdb72                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
004bdb07              }
004bdae8          }
004bdad3      }
004bdac0  }

004bdd44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004bdd50  void __fastcall gmToolbarUI::InitShortcutArray(class gmToolbarUI* this)

004bdd50  {
004bdd5a      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100001a7);
004bdd61      class UIElement_ItemList* edi;
004bdd61      
004bdd61      if (eax == 0)
004bdd76          edi = nullptr;
004bdd61      else
004bdd72          edi = eax->vtable->DynamicCast(0x10000031);
004bdd72      
004bdd7a      struct ItemListDragHandler::VTable** eax_2;
004bdd7a      
004bdd7a      if (this == 0)
004bdd84          eax_2 = nullptr;
004bdd7a      else
004bdd7c          eax_2 = &this->vtable;
004bdd7c      
004bdd89      UIElement_ItemList::RegisterItemListDragHandler(edi, eax_2);
004bdda0      int32_t eax_4 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004bdda7      uint8_t eax_7;
004bdda7      
004bdda7      if (this->m_shortcutSlots.m_num >= eax_4)
004bddb5          eax_7 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_4 + 1)));
004bddb5      
004bddbc      if ((this->m_shortcutSlots.m_num < eax_4 || eax_7 != 0))
004bddbc      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004bddbc      }
004bddbc      
004bddd0      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x100001a8);
004bddd7      class UIElement_ItemList* edi_1;
004bddd7      
004bddd7      if (eax_9 == 0)
004bddec          edi_1 = nullptr;
004bddd7      else
004bdde8          edi_1 = eax_9->vtable->DynamicCast(0x10000031);
004bdde8      
004bddf0      struct ItemListDragHandler::VTable** eax_11;
004bddf0      
004bddf0      if (this == 0)
004bddfa          eax_11 = nullptr;
004bddf0      else
004bddf2          eax_11 = &this->vtable;
004bddf2      
004bddff      UIElement_ItemList::RegisterItemListDragHandler(edi_1, eax_11);
004bde0a      int32_t eax_13 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004bde11      uint8_t eax_16;
004bde11      
004bde11      if (this->m_shortcutSlots.m_num >= eax_13)
004bde1f          eax_16 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_13 + 1)));
004bde1f      
004bde26      if ((this->m_shortcutSlots.m_num < eax_13 || eax_16 != 0))
004bde26      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_1;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004bde26      }
004bde26      
004bde3a      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x100001a9);
004bde41      class UIElement_ItemList* edi_2;
004bde41      
004bde41      if (eax_18 == 0)
004bde56          edi_2 = nullptr;
004bde41      else
004bde52          edi_2 = eax_18->vtable->DynamicCast(0x10000031);
004bde52      
004bde5a      struct ItemListDragHandler::VTable** eax_20;
004bde5a      
004bde5a      if (this == 0)
004bde64          eax_20 = nullptr;
004bde5a      else
004bde5c          eax_20 = &this->vtable;
004bde5c      
004bde69      UIElement_ItemList::RegisterItemListDragHandler(edi_2, eax_20);
004bde74      int32_t eax_22 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004bde7b      uint8_t eax_25;
004bde7b      
004bde7b      if (this->m_shortcutSlots.m_num >= eax_22)
004bde89          eax_25 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_22 + 1)));
004bde89      
004bde90      if ((this->m_shortcutSlots.m_num < eax_22 || eax_25 != 0))
004bde90      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_2;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004bde90      }
004bde90      
004bdea4      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x100001aa);
004bdeab      class UIElement_ItemList* edi_3;
004bdeab      
004bdeab      if (eax_27 == 0)
004bdec0          edi_3 = nullptr;
004bdeab      else
004bdebc          edi_3 = eax_27->vtable->DynamicCast(0x10000031);
004bdebc      
004bdec4      struct ItemListDragHandler::VTable** eax_29;
004bdec4      
004bdec4      if (this == 0)
004bdece          eax_29 = nullptr;
004bdec4      else
004bdec6          eax_29 = &this->vtable;
004bdec6      
004bded3      UIElement_ItemList::RegisterItemListDragHandler(edi_3, eax_29);
004bdede      int32_t eax_31 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004bdee5      uint8_t eax_34;
004bdee5      
004bdee5      if (this->m_shortcutSlots.m_num >= eax_31)
004bdef3          eax_34 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_31 + 1)));
004bdef3      
004bdefa      if ((this->m_shortcutSlots.m_num < eax_31 || eax_34 != 0))
004bdefa      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_3;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004bdefa      }
004bdefa      
004bdf0e      class UIElement* eax_36 = UIElement::GetChildRecursive(this, 0x100001ab);
004bdf15      class UIElement_ItemList* edi_4;
004bdf15      
004bdf15      if (eax_36 == 0)
004bdf2a          edi_4 = nullptr;
004bdf15      else
004bdf26          edi_4 = eax_36->vtable->DynamicCast(0x10000031);
004bdf26      
004bdf2e      struct ItemListDragHandler::VTable** eax_38;
004bdf2e      
004bdf2e      if (this == 0)
004bdf38          eax_38 = nullptr;
004bdf2e      else
004bdf30          eax_38 = &this->vtable;
004bdf30      
004bdf3d      UIElement_ItemList::RegisterItemListDragHandler(edi_4, eax_38);
004bdf48      int32_t eax_40 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004bdf4f      uint8_t eax_43;
004bdf4f      
004bdf4f      if (this->m_shortcutSlots.m_num >= eax_40)
004bdf5d          eax_43 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_40 + 1)));
004bdf5d      
004bdf64      if ((this->m_shortcutSlots.m_num < eax_40 || eax_43 != 0))
004bdf64      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_4;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004bdf64      }
004bdf64      
004bdf78      class UIElement* eax_45 = UIElement::GetChildRecursive(this, 0x100001ac);
004bdf7f      class UIElement_ItemList* edi_5;
004bdf7f      
004bdf7f      if (eax_45 == 0)
004bdf94          edi_5 = nullptr;
004bdf7f      else
004bdf90          edi_5 = eax_45->vtable->DynamicCast(0x10000031);
004bdf90      
004bdf98      struct ItemListDragHandler::VTable** eax_47;
004bdf98      
004bdf98      if (this == 0)
004bdfa2          eax_47 = nullptr;
004bdf98      else
004bdf9a          eax_47 = &this->vtable;
004bdf9a      
004bdfa7      UIElement_ItemList::RegisterItemListDragHandler(edi_5, eax_47);
004bdfb2      int32_t eax_49 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004bdfb9      uint8_t eax_52;
004bdfb9      
004bdfb9      if (this->m_shortcutSlots.m_num >= eax_49)
004bdfc7          eax_52 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_49 + 1)));
004bdfc7      
004bdfce      if ((this->m_shortcutSlots.m_num < eax_49 || eax_52 != 0))
004bdfce      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_5;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004bdfce      }
004bdfce      
004bdfe2      class UIElement* eax_54 = UIElement::GetChildRecursive(this, 0x100001ad);
004bdfe9      class UIElement_ItemList* edi_6;
004bdfe9      
004bdfe9      if (eax_54 == 0)
004bdffe          edi_6 = nullptr;
004bdfe9      else
004bdffa          edi_6 = eax_54->vtable->DynamicCast(0x10000031);
004bdffa      
004be002      struct ItemListDragHandler::VTable** eax_56;
004be002      
004be002      if (this == 0)
004be00c          eax_56 = nullptr;
004be002      else
004be004          eax_56 = &this->vtable;
004be004      
004be011      UIElement_ItemList::RegisterItemListDragHandler(edi_6, eax_56);
004be01c      int32_t eax_58 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be023      uint8_t eax_61;
004be023      
004be023      if (this->m_shortcutSlots.m_num >= eax_58)
004be031          eax_61 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_58 + 1)));
004be031      
004be038      if ((this->m_shortcutSlots.m_num < eax_58 || eax_61 != 0))
004be038      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_6;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be038      }
004be038      
004be04c      class UIElement* eax_63 = UIElement::GetChildRecursive(this, 0x100001ae);
004be053      class UIElement_ItemList* edi_7;
004be053      
004be053      if (eax_63 == 0)
004be068          edi_7 = nullptr;
004be053      else
004be064          edi_7 = eax_63->vtable->DynamicCast(0x10000031);
004be064      
004be06c      struct ItemListDragHandler::VTable** eax_65;
004be06c      
004be06c      if (this == 0)
004be076          eax_65 = nullptr;
004be06c      else
004be06e          eax_65 = &this->vtable;
004be06e      
004be07b      UIElement_ItemList::RegisterItemListDragHandler(edi_7, eax_65);
004be086      int32_t eax_67 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be08d      uint8_t eax_70;
004be08d      
004be08d      if (this->m_shortcutSlots.m_num >= eax_67)
004be09b          eax_70 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_67 + 1)));
004be09b      
004be0a2      if ((this->m_shortcutSlots.m_num < eax_67 || eax_70 != 0))
004be0a2      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_7;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be0a2      }
004be0a2      
004be0b6      class UIElement* eax_72 = UIElement::GetChildRecursive(this, 0x100001af);
004be0bd      class UIElement_ItemList* edi_8;
004be0bd      
004be0bd      if (eax_72 == 0)
004be0d2          edi_8 = nullptr;
004be0bd      else
004be0ce          edi_8 = eax_72->vtable->DynamicCast(0x10000031);
004be0ce      
004be0d6      struct ItemListDragHandler::VTable** eax_74;
004be0d6      
004be0d6      if (this == 0)
004be0e0          eax_74 = nullptr;
004be0d6      else
004be0d8          eax_74 = &this->vtable;
004be0d8      
004be0e5      UIElement_ItemList::RegisterItemListDragHandler(edi_8, eax_74);
004be0f0      int32_t eax_76 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be0f7      uint8_t eax_79;
004be0f7      
004be0f7      if (this->m_shortcutSlots.m_num >= eax_76)
004be105          eax_79 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_76 + 1)));
004be105      
004be10c      if ((this->m_shortcutSlots.m_num < eax_76 || eax_79 != 0))
004be10c      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_8;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be10c      }
004be10c      
004be120      class UIElement* eax_81 = UIElement::GetChildRecursive(this, 0x100006b7);
004be127      class UIElement_ItemList* edi_9;
004be127      
004be127      if (eax_81 == 0)
004be13c          edi_9 = nullptr;
004be127      else
004be138          edi_9 = eax_81->vtable->DynamicCast(0x10000031);
004be138      
004be140      struct ItemListDragHandler::VTable** eax_83;
004be140      
004be140      if (this == 0)
004be14a          eax_83 = nullptr;
004be140      else
004be142          eax_83 = &this->vtable;
004be142      
004be14f      UIElement_ItemList::RegisterItemListDragHandler(edi_9, eax_83);
004be15a      int32_t eax_85 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be161      uint8_t eax_88;
004be161      
004be161      if (this->m_shortcutSlots.m_num >= eax_85)
004be16f          eax_88 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_85 + 1)));
004be16f      
004be176      if ((this->m_shortcutSlots.m_num < eax_85 || eax_88 != 0))
004be176      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_9;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be176      }
004be176      
004be18a      class UIElement* eax_90 = UIElement::GetChildRecursive(this, 0x100006b8);
004be191      class UIElement_ItemList* edi_10;
004be191      
004be191      if (eax_90 == 0)
004be1a6          edi_10 = nullptr;
004be191      else
004be1a2          edi_10 = eax_90->vtable->DynamicCast(0x10000031);
004be1a2      
004be1aa      struct ItemListDragHandler::VTable** eax_92;
004be1aa      
004be1aa      if (this == 0)
004be1b4          eax_92 = nullptr;
004be1aa      else
004be1ac          eax_92 = &this->vtable;
004be1ac      
004be1b9      UIElement_ItemList::RegisterItemListDragHandler(edi_10, eax_92);
004be1c4      int32_t eax_94 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be1cb      uint8_t eax_97;
004be1cb      
004be1cb      if (this->m_shortcutSlots.m_num >= eax_94)
004be1d9          eax_97 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_94 + 1)));
004be1d9      
004be1e0      if ((this->m_shortcutSlots.m_num < eax_94 || eax_97 != 0))
004be1e0      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_10;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be1e0      }
004be1e0      
004be1f4      class UIElement* eax_99 = UIElement::GetChildRecursive(this, 0x100006b9);
004be1fb      class UIElement_ItemList* edi_11;
004be1fb      
004be1fb      if (eax_99 == 0)
004be210          edi_11 = nullptr;
004be1fb      else
004be20c          edi_11 = eax_99->vtable->DynamicCast(0x10000031);
004be20c      
004be214      struct ItemListDragHandler::VTable** eax_101;
004be214      
004be214      if (this == 0)
004be21e          eax_101 = nullptr;
004be214      else
004be216          eax_101 = &this->vtable;
004be216      
004be223      UIElement_ItemList::RegisterItemListDragHandler(edi_11, eax_101);
004be22e      int32_t eax_103 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be235      uint8_t eax_106;
004be235      
004be235      if (this->m_shortcutSlots.m_num >= eax_103)
004be243          eax_106 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_103 + 1)));
004be243      
004be24a      if ((this->m_shortcutSlots.m_num < eax_103 || eax_106 != 0))
004be24a      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_11;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be24a      }
004be24a      
004be25e      class UIElement* eax_108 = UIElement::GetChildRecursive(this, 0x100006ba);
004be265      class UIElement_ItemList* edi_12;
004be265      
004be265      if (eax_108 == 0)
004be27a          edi_12 = nullptr;
004be265      else
004be276          edi_12 = eax_108->vtable->DynamicCast(0x10000031);
004be276      
004be27e      struct ItemListDragHandler::VTable** eax_110;
004be27e      
004be27e      if (this == 0)
004be288          eax_110 = nullptr;
004be27e      else
004be280          eax_110 = &this->vtable;
004be280      
004be28d      UIElement_ItemList::RegisterItemListDragHandler(edi_12, eax_110);
004be298      int32_t eax_112 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be29f      uint8_t eax_115;
004be29f      
004be29f      if (this->m_shortcutSlots.m_num >= eax_112)
004be2ad          eax_115 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_112 + 1)));
004be2ad      
004be2b4      if ((this->m_shortcutSlots.m_num < eax_112 || eax_115 != 0))
004be2b4      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_12;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be2b4      }
004be2b4      
004be2c8      class UIElement* eax_117 = UIElement::GetChildRecursive(this, 0x100006bb);
004be2cf      class UIElement_ItemList* edi_13;
004be2cf      
004be2cf      if (eax_117 == 0)
004be2e4          edi_13 = nullptr;
004be2cf      else
004be2e0          edi_13 = eax_117->vtable->DynamicCast(0x10000031);
004be2e0      
004be2e8      struct ItemListDragHandler::VTable** eax_119;
004be2e8      
004be2e8      if (this == 0)
004be2f2          eax_119 = nullptr;
004be2e8      else
004be2ea          eax_119 = &this->vtable;
004be2ea      
004be2f7      UIElement_ItemList::RegisterItemListDragHandler(edi_13, eax_119);
004be302      int32_t eax_121 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be309      uint8_t eax_124;
004be309      
004be309      if (this->m_shortcutSlots.m_num >= eax_121)
004be317          eax_124 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_121 + 1)));
004be317      
004be31e      if ((this->m_shortcutSlots.m_num < eax_121 || eax_124 != 0))
004be31e      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_13;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be31e      }
004be31e      
004be332      class UIElement* eax_126 = UIElement::GetChildRecursive(this, 0x100006bc);
004be339      class UIElement_ItemList* edi_14;
004be339      
004be339      if (eax_126 == 0)
004be34e          edi_14 = nullptr;
004be339      else
004be34a          edi_14 = eax_126->vtable->DynamicCast(0x10000031);
004be34a      
004be352      struct ItemListDragHandler::VTable** eax_128;
004be352      
004be352      if (this == 0)
004be35c          eax_128 = nullptr;
004be352      else
004be354          eax_128 = &this->vtable;
004be354      
004be361      UIElement_ItemList::RegisterItemListDragHandler(edi_14, eax_128);
004be36c      int32_t eax_130 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be373      uint8_t eax_133;
004be373      
004be373      if (this->m_shortcutSlots.m_num >= eax_130)
004be381          eax_133 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_130 + 1)));
004be381      
004be388      if ((this->m_shortcutSlots.m_num < eax_130 || eax_133 != 0))
004be388      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_14;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be388      }
004be388      
004be39c      class UIElement* eax_135 = UIElement::GetChildRecursive(this, 0x100006bd);
004be3a3      class UIElement_ItemList* edi_15;
004be3a3      
004be3a3      if (eax_135 == 0)
004be3b8          edi_15 = nullptr;
004be3a3      else
004be3b4          edi_15 = eax_135->vtable->DynamicCast(0x10000031);
004be3b4      
004be3bc      struct ItemListDragHandler::VTable** eax_137;
004be3bc      
004be3bc      if (this == 0)
004be3c6          eax_137 = nullptr;
004be3bc      else
004be3be          eax_137 = &this->vtable;
004be3be      
004be3cb      UIElement_ItemList::RegisterItemListDragHandler(edi_15, eax_137);
004be3d6      int32_t eax_139 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be3dd      uint8_t eax_142;
004be3dd      
004be3dd      if (this->m_shortcutSlots.m_num >= eax_139)
004be3eb          eax_142 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_139 + 1)));
004be3eb      
004be3f2      if ((this->m_shortcutSlots.m_num < eax_139 || eax_142 != 0))
004be3f2      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_15;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be3f2      }
004be3f2      
004be406      class UIElement* eax_144 = UIElement::GetChildRecursive(this, 0x100006be);
004be40d      class UIElement_ItemList* edi_16;
004be40d      
004be40d      if (eax_144 == 0)
004be422          edi_16 = nullptr;
004be40d      else
004be41e          edi_16 = eax_144->vtable->DynamicCast(0x10000031);
004be41e      
004be426      struct ItemListDragHandler::VTable** eax_146;
004be426      
004be426      if (this == 0)
004be430          eax_146 = nullptr;
004be426      else
004be428          eax_146 = &this->vtable;
004be428      
004be435      UIElement_ItemList::RegisterItemListDragHandler(edi_16, eax_146);
004be440      int32_t eax_148 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be447      uint8_t eax_151;
004be447      
004be447      if (this->m_shortcutSlots.m_num >= eax_148)
004be455          eax_151 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_148 + 1)));
004be455      
004be45c      if ((this->m_shortcutSlots.m_num < eax_148 || eax_151 != 0))
004be45c      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_16;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be45c      }
004be45c      
004be470      class UIElement* eax_153 = UIElement::GetChildRecursive(this, 0x100006bf);
004be477      class UIElement_ItemList* edi_17;
004be477      
004be477      if (eax_153 == 0)
004be48c          edi_17 = nullptr;
004be477      else
004be488          edi_17 = eax_153->vtable->DynamicCast(0x10000031);
004be488      
004be490      struct ItemListDragHandler::VTable** eax_155;
004be490      
004be490      if (this == 0)
004be49a          eax_155 = nullptr;
004be490      else
004be492          eax_155 = &this->vtable;
004be492      
004be49f      UIElement_ItemList::RegisterItemListDragHandler(edi_17, eax_155);
004be4aa      int32_t eax_157 = (this->m_shortcutSlots.m_sizeAndDeallocate & 0x7fffffff);
004be4b1      uint8_t eax_160;
004be4b1      
004be4b1      if (this->m_shortcutSlots.m_num >= eax_157)
004be4bf          eax_160 = SmartArray<unsigned long,1>::grow(&this->m_shortcutSlots, SmartArray<unsigned long,1>::get_new_size(&this->m_shortcutSlots, (eax_157 + 1)));
004be4bf      
004be4c6      if ((this->m_shortcutSlots.m_num < eax_157 || eax_160 != 0))
004be4c6      {
004bdd9a          this->m_shortcutSlots.m_data[this->m_shortcutSlots.m_num] = edi_17;
004bdd9a          this->m_shortcutSlots.m_num += 1;
004be4c6      }
004be4c6      
004be4d8      /* tailcall */
004be4d8      return gmToolbarUI::FlushShortcuts(this);
004bdd50  }

004be4dd                                                                                         90 90 90                               ...

004be4e0  void __thiscall gmToolbarUI::ListenToGlobalMessage(class gmToolbarUI* this, uint32_t arg2, int32_t arg3)

004be4e0  {
004be4e8      if (arg2 == 1)
004be4e8      {
004be4fb          if (UIElement::GetHasFocus(this->m_pStackSizeEntryBox) == 0)
004be4fb          {
004be563              int32_t ecx_4 = arg3;
004be563              
004be572              if ((ecx_4 - 0x10000042) <= 0xfb)
004be572                  switch (ecx_4)
004be572                  {
004be58b                      case 0x10000042:
004be58b                      case 0x10000043:
004be58b                      case 0x10000044:
004be58b                      case 0x10000045:
004be58b                      case 0x10000046:
004be58b                      case 0x10000047:
004be58b                      case 0x10000048:
004be58b                      case 0x10000049:
004be58b                      case 0x1000004a:
004be58b                      case 0x1000004b:
004be58b                      case 0x1000004c:
004be58b                      case 0x1000004d:
004be58b                      {
004be58b                          gmToolbarUI::UseShortcut(this, (ecx_4 - 0x10000042), 1);
004be58b                          break;
004be58b                      }
004be5f9                      case 0x1000004e:
004be5f9                      case 0x1000004f:
004be5f9                      case 0x10000050:
004be5f9                      case 0x10000051:
004be5f9                      case 0x10000052:
004be5f9                      case 0x10000053:
004be5f9                      case 0x10000054:
004be5f9                      case 0x10000055:
004be5f9                      case 0x10000056:
004be5f9                      case 0x10000057:
004be5f9                      case 0x10000058:
004be5f9                      case 0x10000059:
004be5f9                      {
004be5f9                          gmToolbarUI::UseShortcut(this, (ecx_4 - 0x1000004e), 0);
004be5f9                          break;
004be5f9                      }
004be65c                      case 0x1000010d:
004be65c                      {
004be65c                          uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004be65c                          
004be663                          if (ACCWeenieObject::selectedID_1 != 0)
004be66e                              gmToolbarUI::CreateShortcutToItem(this, ACCWeenieObject::selectedID_1, 0xffffffff, 1, 0);
004be65c                          break;
004be65c                      }
004be59a                      case 0x10000132:
004be59a                      {
004be59a                          gmToolbarUI::UseShortcut(this, 0xc, 1);
004be59a                          break;
004be59a                      }
004be5a9                      case 0x10000133:
004be5a9                      {
004be5a9                          gmToolbarUI::UseShortcut(this, 0xd, 1);
004be5a9                          break;
004be5a9                      }
004be5b8                      case 0x10000134:
004be5b8                      {
004be5b8                          gmToolbarUI::UseShortcut(this, 0xe, 1);
004be5b8                          break;
004be5b8                      }
004be5c7                      case 0x10000135:
004be5c7                      {
004be5c7                          gmToolbarUI::UseShortcut(this, 0xf, 1);
004be5c7                          break;
004be5c7                      }
004be5d6                      case 0x10000136:
004be5d6                      {
004be5d6                          gmToolbarUI::UseShortcut(this, 0x10, 1);
004be5d6                          break;
004be5d6                      }
004be5e5                      case 0x10000137:
004be5e5                      {
004be5e5                          gmToolbarUI::UseShortcut(this, 0x11, 1);
004be5e5                          break;
004be5e5                      }
004be608                      case 0x10000138:
004be608                      {
004be608                          gmToolbarUI::UseShortcut(this, 0xc, 0);
004be608                          break;
004be608                      }
004be617                      case 0x10000139:
004be617                      {
004be617                          gmToolbarUI::UseShortcut(this, 0xd, 0);
004be617                          break;
004be617                      }
004be626                      case 0x1000013a:
004be626                      {
004be626                          gmToolbarUI::UseShortcut(this, 0xe, 0);
004be626                          break;
004be626                      }
004be635                      case 0x1000013b:
004be635                      {
004be635                          gmToolbarUI::UseShortcut(this, 0xf, 0);
004be635                          break;
004be635                      }
004be644                      case 0x1000013c:
004be644                      {
004be644                          gmToolbarUI::UseShortcut(this, 0x10, 0);
004be644                          break;
004be644                      }
004be653                      case 0x1000013d:
004be653                      {
004be653                          gmToolbarUI::UseShortcut(this, 0x11, 0);
004be653                          break;
004be653                      }
004be572                  }
004be4fb          }
004be4fb          else if (arg3 == 0x27)
004be502          {
004be50e              uint32_t GenItemHolder::splitSize_1 = GenItemHolder::splitSize;
004be51b              class PStringBase<unsigned short>* eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, Formatted, &data_7a0184);
004be52a              UIElement_Text::SetText(this->m_pStackSizeEntryBox, eax_3);
004be533              int32_t* edi_1 = (arg3 - 0x14);
004be533              
004be546              if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
004be54e                  **(uint32_t**)edi_1(1);
004be54e              
004be550              this->m_pStackSizeEntryBox->vtable->RelinquishFocus();
004be502          }
004be4e8      }
004be4e0  }

004be677                                                                       90                                                 .
004be678  uint32_t jump_table_4be678[0x10] = 
004be678  {
004be678      [0x0] =  0x004be586
004be67c      [0x1] =  0x004be5ee
004be680      [0x2] =  0x004be65c
004be684      [0x3] =  0x004be594
004be688      [0x4] =  0x004be5a3
004be68c      [0x5] =  0x004be5b2
004be690      [0x6] =  0x004be5c1
004be694      [0x7] =  0x004be5d0
004be698      [0x8] =  0x004be5df
004be69c      [0x9] =  0x004be602
004be6a0      [0xa] =  0x004be611
004be6a4      [0xb] =  0x004be620
004be6a8      [0xc] =  0x004be62f
004be6ac      [0xd] =  0x004be63e
004be6b0      [0xe] =  0x004be64d
004be6b4      [0xf] =  0x004be673
004be6b8  }
004be6b8  uint8_t lookup_table_4be6b8[0xfc] = 
004be6b8  {
004be6b8      [0x00] =  0x00
004be6b9      [0x01] =  0x00
004be6ba      [0x02] =  0x00
004be6bb      [0x03] =  0x00
004be6bc      [0x04] =  0x00
004be6bd      [0x05] =  0x00
004be6be      [0x06] =  0x00
004be6bf      [0x07] =  0x00
004be6c0      [0x08] =  0x00
004be6c1      [0x09] =  0x00
004be6c2      [0x0a] =  0x00
004be6c3      [0x0b] =  0x00
004be6c4      [0x0c] =  0x01
004be6c5      [0x0d] =  0x01
004be6c6      [0x0e] =  0x01
004be6c7      [0x0f] =  0x01
004be6c8      [0x10] =  0x01
004be6c9      [0x11] =  0x01
004be6ca      [0x12] =  0x01
004be6cb      [0x13] =  0x01
004be6cc      [0x14] =  0x01
004be6cd      [0x15] =  0x01
004be6ce      [0x16] =  0x01
004be6cf      [0x17] =  0x01
004be6d0      [0x18] =  0x0f
004be6d1      [0x19] =  0x0f
004be6d2      [0x1a] =  0x0f
004be6d3      [0x1b] =  0x0f
004be6d4      [0x1c] =  0x0f
004be6d5      [0x1d] =  0x0f
004be6d6      [0x1e] =  0x0f
004be6d7      [0x1f] =  0x0f
004be6d8      [0x20] =  0x0f
004be6d9      [0x21] =  0x0f
004be6da      [0x22] =  0x0f
004be6db      [0x23] =  0x0f
004be6dc      [0x24] =  0x0f
004be6dd      [0x25] =  0x0f
004be6de      [0x26] =  0x0f
004be6df      [0x27] =  0x0f
004be6e0      [0x28] =  0x0f
004be6e1      [0x29] =  0x0f
004be6e2      [0x2a] =  0x0f
004be6e3      [0x2b] =  0x0f
004be6e4      [0x2c] =  0x0f
004be6e5      [0x2d] =  0x0f
004be6e6      [0x2e] =  0x0f
004be6e7      [0x2f] =  0x0f
004be6e8      [0x30] =  0x0f
004be6e9      [0x31] =  0x0f
004be6ea      [0x32] =  0x0f
004be6eb      [0x33] =  0x0f
004be6ec      [0x34] =  0x0f
004be6ed      [0x35] =  0x0f
004be6ee      [0x36] =  0x0f
004be6ef      [0x37] =  0x0f
004be6f0      [0x38] =  0x0f
004be6f1      [0x39] =  0x0f
004be6f2      [0x3a] =  0x0f
004be6f3      [0x3b] =  0x0f
004be6f4      [0x3c] =  0x0f
004be6f5      [0x3d] =  0x0f
004be6f6      [0x3e] =  0x0f
004be6f7      [0x3f] =  0x0f
004be6f8      [0x40] =  0x0f
004be6f9      [0x41] =  0x0f
004be6fa      [0x42] =  0x0f
004be6fb      [0x43] =  0x0f
004be6fc      [0x44] =  0x0f
004be6fd      [0x45] =  0x0f
004be6fe      [0x46] =  0x0f
004be6ff      [0x47] =  0x0f
004be700      [0x48] =  0x0f
004be701      [0x49] =  0x0f
004be702      [0x4a] =  0x0f
004be703      [0x4b] =  0x0f
004be704      [0x4c] =  0x0f
004be705      [0x4d] =  0x0f
004be706      [0x4e] =  0x0f
004be707      [0x4f] =  0x0f
004be708      [0x50] =  0x0f
004be709      [0x51] =  0x0f
004be70a      [0x52] =  0x0f
004be70b      [0x53] =  0x0f
004be70c      [0x54] =  0x0f
004be70d      [0x55] =  0x0f
004be70e      [0x56] =  0x0f
004be70f      [0x57] =  0x0f
004be710      [0x58] =  0x0f
004be711      [0x59] =  0x0f
004be712      [0x5a] =  0x0f
004be713      [0x5b] =  0x0f
004be714      [0x5c] =  0x0f
004be715      [0x5d] =  0x0f
004be716      [0x5e] =  0x0f
004be717      [0x5f] =  0x0f
004be718      [0x60] =  0x0f
004be719      [0x61] =  0x0f
004be71a      [0x62] =  0x0f
004be71b      [0x63] =  0x0f
004be71c      [0x64] =  0x0f
004be71d      [0x65] =  0x0f
004be71e      [0x66] =  0x0f
004be71f      [0x67] =  0x0f
004be720      [0x68] =  0x0f
004be721      [0x69] =  0x0f
004be722      [0x6a] =  0x0f
004be723      [0x6b] =  0x0f
004be724      [0x6c] =  0x0f
004be725      [0x6d] =  0x0f
004be726      [0x6e] =  0x0f
004be727      [0x6f] =  0x0f
004be728      [0x70] =  0x0f
004be729      [0x71] =  0x0f
004be72a      [0x72] =  0x0f
004be72b      [0x73] =  0x0f
004be72c      [0x74] =  0x0f
004be72d      [0x75] =  0x0f
004be72e      [0x76] =  0x0f
004be72f      [0x77] =  0x0f
004be730      [0x78] =  0x0f
004be731      [0x79] =  0x0f
004be732      [0x7a] =  0x0f
004be733      [0x7b] =  0x0f
004be734      [0x7c] =  0x0f
004be735      [0x7d] =  0x0f
004be736      [0x7e] =  0x0f
004be737      [0x7f] =  0x0f
004be738      [0x80] =  0x0f
004be739      [0x81] =  0x0f
004be73a      [0x82] =  0x0f
004be73b      [0x83] =  0x0f
004be73c      [0x84] =  0x0f
004be73d      [0x85] =  0x0f
004be73e      [0x86] =  0x0f
004be73f      [0x87] =  0x0f
004be740      [0x88] =  0x0f
004be741      [0x89] =  0x0f
004be742      [0x8a] =  0x0f
004be743      [0x8b] =  0x0f
004be744      [0x8c] =  0x0f
004be745      [0x8d] =  0x0f
004be746      [0x8e] =  0x0f
004be747      [0x8f] =  0x0f
004be748      [0x90] =  0x0f
004be749      [0x91] =  0x0f
004be74a      [0x92] =  0x0f
004be74b      [0x93] =  0x0f
004be74c      [0x94] =  0x0f
004be74d      [0x95] =  0x0f
004be74e      [0x96] =  0x0f
004be74f      [0x97] =  0x0f
004be750      [0x98] =  0x0f
004be751      [0x99] =  0x0f
004be752      [0x9a] =  0x0f
004be753      [0x9b] =  0x0f
004be754      [0x9c] =  0x0f
004be755      [0x9d] =  0x0f
004be756      [0x9e] =  0x0f
004be757      [0x9f] =  0x0f
004be758      [0xa0] =  0x0f
004be759      [0xa1] =  0x0f
004be75a      [0xa2] =  0x0f
004be75b      [0xa3] =  0x0f
004be75c      [0xa4] =  0x0f
004be75d      [0xa5] =  0x0f
004be75e      [0xa6] =  0x0f
004be75f      [0xa7] =  0x0f
004be760      [0xa8] =  0x0f
004be761      [0xa9] =  0x0f
004be762      [0xaa] =  0x0f
004be763      [0xab] =  0x0f
004be764      [0xac] =  0x0f
004be765      [0xad] =  0x0f
004be766      [0xae] =  0x0f
004be767      [0xaf] =  0x0f
004be768      [0xb0] =  0x0f
004be769      [0xb1] =  0x0f
004be76a      [0xb2] =  0x0f
004be76b      [0xb3] =  0x0f
004be76c      [0xb4] =  0x0f
004be76d      [0xb5] =  0x0f
004be76e      [0xb6] =  0x0f
004be76f      [0xb7] =  0x0f
004be770      [0xb8] =  0x0f
004be771      [0xb9] =  0x0f
004be772      [0xba] =  0x0f
004be773      [0xbb] =  0x0f
004be774      [0xbc] =  0x0f
004be775      [0xbd] =  0x0f
004be776      [0xbe] =  0x0f
004be777      [0xbf] =  0x0f
004be778      [0xc0] =  0x0f
004be779      [0xc1] =  0x0f
004be77a      [0xc2] =  0x0f
004be77b      [0xc3] =  0x0f
004be77c      [0xc4] =  0x0f
004be77d      [0xc5] =  0x0f
004be77e      [0xc6] =  0x0f
004be77f      [0xc7] =  0x0f
004be780      [0xc8] =  0x0f
004be781      [0xc9] =  0x0f
004be782      [0xca] =  0x0f
004be783      [0xcb] =  0x02
004be784      [0xcc] =  0x0f
004be785      [0xcd] =  0x0f
004be786      [0xce] =  0x0f
004be787      [0xcf] =  0x0f
004be788      [0xd0] =  0x0f
004be789      [0xd1] =  0x0f
004be78a      [0xd2] =  0x0f
004be78b      [0xd3] =  0x0f
004be78c      [0xd4] =  0x0f
004be78d      [0xd5] =  0x0f
004be78e      [0xd6] =  0x0f
004be78f      [0xd7] =  0x0f
004be790      [0xd8] =  0x0f
004be791      [0xd9] =  0x0f
004be792      [0xda] =  0x0f
004be793      [0xdb] =  0x0f
004be794      [0xdc] =  0x0f
004be795      [0xdd] =  0x0f
004be796      [0xde] =  0x0f
004be797      [0xdf] =  0x0f
004be798      [0xe0] =  0x0f
004be799      [0xe1] =  0x0f
004be79a      [0xe2] =  0x0f
004be79b      [0xe3] =  0x0f
004be79c      [0xe4] =  0x0f
004be79d      [0xe5] =  0x0f
004be79e      [0xe6] =  0x0f
004be79f      [0xe7] =  0x0f
004be7a0      [0xe8] =  0x0f
004be7a1      [0xe9] =  0x0f
004be7a2      [0xea] =  0x0f
004be7a3      [0xeb] =  0x0f
004be7a4      [0xec] =  0x0f
004be7a5      [0xed] =  0x0f
004be7a6      [0xee] =  0x0f
004be7a7      [0xef] =  0x0f
004be7a8      [0xf0] =  0x03
004be7a9      [0xf1] =  0x04
004be7aa      [0xf2] =  0x05
004be7ab      [0xf3] =  0x06
004be7ac      [0xf4] =  0x07
004be7ad      [0xf5] =  0x08
004be7ae      [0xf6] =  0x09
004be7af      [0xf7] =  0x0a
004be7b0      [0xf8] =  0x0b
004be7b1      [0xf9] =  0x0c
004be7b2      [0xfa] =  0x0d
004be7b3      [0xfb] =  0x0e
004be7b4  }

004be7b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004be7c0  void __thiscall gmToolbarUI::HandleDropRelease(class gmToolbarUI* this, struct UIElementMessageInfo const* arg2)

004be7c0  {
004be7c4      uint32_t dwParam1 = arg2->dwParam1;
004be7cb      class UIElement* ebx = *(uint32_t*)(dwParam1 + 0x10);
004be7cf      class UIElement* ebp = *(uint32_t*)(dwParam1 + 8);
004be7cf      
004be7df      if ((ebp != 0 && ebx != 0))
004be7df      {
004be7ef          char var_8;
004be7ef          void var_4;
004be7ef          
004be7ef          if (ebx->m_desc.m_elementID != 0x100001b1)
004be7ef          {
004be889              int32_t i = 0;
004be889              
004be88d              if (this->m_shortcutSlots.m_num > 0)
004be88d              {
004be8ae                  do
004be8ae                  {
004be8a3                      if (UIElement::IsAncestorOfMe(ebx, this->m_shortcutSlots.m_data[i]) != 0)
004be8a3                          break;
004be8a3                      
004be8ab                      i += 1;
004be8ae                  } while (i < this->m_shortcutSlots.m_num);
004be88d              }
004be88d              
004be8b6              if (i != this->m_shortcutSlots.m_num)
004be8b6              {
004be8cc                  UIElement_ItemList::InqDropIconInfo(ebp, &arg2, &var_4, &var_8);
004be8cc                  
004be8da                  if (arg2 != 0)
004be8da                  {
004be8e0                      struct UIElementMessageInfo* eax_12;
004be8e0                      eax_12 = var_8;
004be8e0                      
004be8e6                      if ((eax_12 & 0xe) == 0)
004be8e6                      {
004be8ed                          uint32_t eax_13 = gmToolbarUI::RemoveShortcutInSlotNum(this, i, 1);
004be900                          gmToolbarUI::CreateShortcutToItem(this, arg2, i, 1, 0);
004be900                          
004be90d                          if ((eax_13 != 0 && eax_13 != arg2))
004be90d                          {
004be912                              int32_t eax_14 = gmToolbarUI::GetFirstEmptyShortcutToTheRightOf(this, i);
004be912                              
004be91a                              if (eax_14 != 0xffffffff)
004be922                                  gmToolbarUI::AddShortcut(this, eax_13, eax_14, 1);
004be90d                          }
004be8e6                      }
004be8e6                      else if ((eax_12 & 4) != 0)
004be933                      {
004be93a                          uint32_t eax_15 = gmToolbarUI::RemoveShortcutInSlotNum(this, i, 1);
004be94b                          gmToolbarUI::AddShortcut(this, arg2, i, 1);
004be94b                          
004be958                          if (((eax_15 != 0 && eax_15 != arg2) && gmToolbarUI::IsShortcutSlotAvailable(this, this->m_lastShortcutNumDragged) != 0))
004be978                              gmToolbarUI::AddShortcut(this, eax_15, this->m_lastShortcutNumDragged, 1);
004be933                      }
004be8da                  }
004be8b6              }
004be7ef          }
004be7ef          else
004be7ef          {
004be805              UIElement_ItemList::InqDropIconInfo(ebp, &arg2, &var_4, &var_8);
004be805              
004be813              if ((var_8 & 0xe) == 0)
004be813              {
004be81e                  class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
004be81e                  
004be82a                  if (eax_1 != 0)
004be82a                  {
004be832                      int32_t eax_2 = ACCWeenieObject::IsOwnedByPlayer(eax_1);
004be83b                      int32_t eax_4;
004be83b                      
004be83b                      if (eax_2 != 0)
004be866                          eax_4 = ((uint32_t)CPlayerSystem::PlaceInBackpack(CPlayerSystem::GetPlayerSystem(), arg2, 0));
004be83b                      else
004be83b                      {
004be840                          uint32_t eax_3 = GetPlayerID();
004be84b                          eax_4 = ItemHolder::AttemptToPlaceInContainer(arg2, eax_3, eax_2, 1, 0);
004be83b                      }
004be83b                      
004be86b                      if (eax_4 == 0)
004be874                          ACCWeenieObject::SetWaitingState(eax_1, eax_4);
004be82a                  }
004be813              }
004be7ef          }
004be7df      }
004be7c0  }

004be987                       90 90 90 90 90 90 90 90 90                                                         .........

004be990  void __thiscall gmToolbarUI::RecvNotice_AddShortcut(class gmToolbarUI* this, uint32_t arg2, int32_t arg3)

004be990  {
004be9a4      gmToolbarUI::CreateShortcutToItem(((char*)this - 0x5f8), arg2, arg3, 0, 1);
004be990  }

004be9ac                                      90 90 90 90                                                              ....

004be9b0  void __thiscall gmToolbarUI::RecvNotice_FullMergingItem(class gmToolbarUI* this, uint32_t arg2, uint32_t arg3)

004be9b0  {
004be9c0      int32_t eax = gmToolbarUI::RemoveShortcut(((char*)this - 0x5f8), arg2, 1);
004be9c0      
004be9c8      if (eax != 0xffffffff)
004be9d6          gmToolbarUI::CreateShortcutToItem(((char*)this - 0x5f8), arg3, eax, 0, 1);
004be9b0  }

004be9df                                                                                               90                                 .

004be9e0  void __fastcall gmToolbarUI::UpdateAmmoNumber(class gmToolbarUI* this)

004be9e0  {
004be9e0      class gmToolbarUI* var_4 = this;
004be9e9      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000194);
004be9e9      
004be9f0      if (eax != 0)
004be9f0      {
004be9fd          class UIElement_Text* eax_1 = eax->vtable->DynamicCast(1);
004be9fd          
004bea07          if (eax_1 != 0)
004bea07          {
004bea09              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004bea0e              var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004bea16              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004bea23              class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(this->m_idAmmoObject);
004bea23              
004bea2d              if (eax_4 != 0)
004bea2d              {
004bea2f                  uint32_t _stackSize = eax_4->pwd._stackSize;
004bea2f                  
004bea37                  if (_stackSize == 0)
004bea39                      _stackSize = 1;
004bea39                  
004bea43                  PStringBase<unsigned short>::append_int32(&var_4, _stackSize);
004bea2d              }
004bea2d              
004bea4f              UIElement_Text::SetText(eax_1, &var_4);
004bea58              void* __offset(gmToolbarUI, -0x14) esi_2 = ((char*)var_4 - 0x14);
004bea58              
004bea6b              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004bea73                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004bea07          }
004be9f0      }
004be9e0  }

004bea79                                                                             90 90 90 90 90 90 90                           .......

004bea80  void __fastcall gmToolbarUI::PostInit(class gmToolbarUI* this)

004bea80  {
004bea87      UIElement::PostInit(this);
004bea9f      this->m_pUseObjectButton = UIElement::GetChildRecursive(this, 0x1000019d);
004beab1      this->m_pExamineObjectButton = UIElement::GetChildRecursive(this, 0x100001a5);
004beab7      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x1000019e);
004beac3      this->m_pSelObjectField = eax_2;
004beac9      class UIElement* eax_3 = UIElement::GetChildRecursive(eax_2, 0x1000019f);
004bead0      class UIElement_Text* eax_4;
004bead0      
004bead0      if (eax_3 == 0)
004beae0          eax_4 = nullptr;
004bead0      else
004bead8          eax_4 = eax_3->vtable->DynamicCast(0xc);
004bead8      
004beae2      class UIElement* m_pSelObjectField = this->m_pSelObjectField;
004beaed      this->m_pSelObjectName = eax_4;
004beaf3      class UIElement* eax_5 = UIElement::GetChildRecursive(m_pSelObjectField, 0x100001a1);
004beafa      class UIElement_Meter* eax_6;
004beafa      
004beafa      if (eax_5 == 0)
004beb0a          eax_6 = nullptr;
004beafa      else
004beb02          eax_6 = eax_5->vtable->DynamicCast(7);
004beb02      
004beb0c      class UIElement* m_pSelObjectField_1 = this->m_pSelObjectField;
004beb17      this->m_pSelObjectHealthMeter = eax_6;
004beb1d      class UIElement* eax_7 = UIElement::GetChildRecursive(m_pSelObjectField_1, 0x100001a2);
004beb24      class UIElement_Meter* eax_8;
004beb24      
004beb24      if (eax_7 == 0)
004beb34          eax_8 = nullptr;
004beb24      else
004beb2c          eax_8 = eax_7->vtable->DynamicCast(7);
004beb2c      
004beb36      class UIElement* m_pSelObjectField_2 = this->m_pSelObjectField;
004beb41      this->m_pSelObjectManaMeter = eax_8;
004beb47      class UIElement* eax_9 = UIElement::GetChildRecursive(m_pSelObjectField_2, 0x100001a3);
004beb4e      class UIElement_Text* eax_10;
004beb4e      
004beb4e      if (eax_9 == 0)
004beb5e          eax_10 = nullptr;
004beb4e      else
004beb56          eax_10 = eax_9->vtable->DynamicCast(0xc);
004beb56      
004beb62      this->m_pStackSizeEntryBox = eax_10;
004beb62      
004beb68      if (eax_10 != 0)
004beb6a          eax_10->m_filter = NumberInputFilter;
004beb6a      
004beb7f      class UIElement* eax_11 = UIElement::GetChildRecursive(this->m_pSelObjectField, 0x100001a4);
004beb86      class UIElement_Scrollbar* eax_12;
004beb86      
004beb86      if (eax_11 == 0)
004beb96          eax_12 = nullptr;
004beb86      else
004beb8e          eax_12 = eax_11->vtable->DynamicCast(0xb);
004beb8e      
004beb9f      this->m_pStackSizeSlider = eax_12;
004beba5      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x10000197);
004bebba      int32_t var_34;
004bebba      UIElement::GetAttribute_Enum(eax_13, 0x10000029, &var_34);
004bebd1      int32_t eax_15 = (this->m_buttonInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bebd8      uint8_t eax_18;
004bebd8      
004bebd8      if (this->m_buttonInfoArray.m_num >= eax_15)
004bebe6          eax_18 = SmartArray<VertexRange,1>::grow(&this->m_buttonInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_buttonInfoArray, (eax_15 + 1)));
004bebe6      
004bebed      if ((this->m_buttonInfoArray.m_num < eax_15 || eax_18 != 0))
004bebed      {
004bebef          uint32_t m_num_3 = this->m_buttonInfoArray.m_num;
004bebf6          struct PanelButtonInfo* m_data = this->m_buttonInfoArray.m_data;
004bebf8          m_data[m_num_3].button = eax_13;
004bebff          m_data[m_num_3].panelID = var_34;
004bebcb          this->m_buttonInfoArray.m_num += 1;
004bebed      }
004bebed      
004bec0d      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x10000198);
004bec22      int32_t var_2c;
004bec22      UIElement::GetAttribute_Enum(eax_19, 0x10000029, &var_2c);
004bec2d      int32_t eax_21 = (this->m_buttonInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bec34      uint8_t eax_24;
004bec34      
004bec34      if (this->m_buttonInfoArray.m_num >= eax_21)
004bec42          eax_24 = SmartArray<VertexRange,1>::grow(&this->m_buttonInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_buttonInfoArray, (eax_21 + 1)));
004bec42      
004bec49      if ((this->m_buttonInfoArray.m_num < eax_21 || eax_24 != 0))
004bec49      {
004bec4b          uint32_t m_num = this->m_buttonInfoArray.m_num;
004bec52          struct PanelButtonInfo* m_data_4 = this->m_buttonInfoArray.m_data;
004bec54          m_data_4[m_num].button = eax_19;
004bec5b          m_data_4[m_num].panelID = var_2c;
004bebcb          this->m_buttonInfoArray.m_num += 1;
004bec49      }
004bec49      
004bec69      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x10000199);
004bec7e      int32_t var_24;
004bec7e      UIElement::GetAttribute_Enum(eax_25, 0x10000029, &var_24);
004bec89      int32_t eax_27 = (this->m_buttonInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bec90      uint8_t eax_30;
004bec90      
004bec90      if (this->m_buttonInfoArray.m_num >= eax_27)
004bec9e          eax_30 = SmartArray<VertexRange,1>::grow(&this->m_buttonInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_buttonInfoArray, (eax_27 + 1)));
004bec9e      
004beca5      if ((this->m_buttonInfoArray.m_num < eax_27 || eax_30 != 0))
004beca5      {
004beca7          uint32_t m_num_4 = this->m_buttonInfoArray.m_num;
004becae          struct PanelButtonInfo* m_data_1 = this->m_buttonInfoArray.m_data;
004becb0          m_data_1[m_num_4].button = eax_25;
004becb7          m_data_1[m_num_4].panelID = var_24;
004bebcb          this->m_buttonInfoArray.m_num += 1;
004beca5      }
004beca5      
004becc5      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x1000055a);
004becda      int32_t var_1c;
004becda      UIElement::GetAttribute_Enum(eax_31, 0x10000029, &var_1c);
004bece5      int32_t eax_33 = (this->m_buttonInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004becec      uint8_t eax_36;
004becec      
004becec      if (this->m_buttonInfoArray.m_num >= eax_33)
004becfa          eax_36 = SmartArray<VertexRange,1>::grow(&this->m_buttonInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_buttonInfoArray, (eax_33 + 1)));
004becfa      
004bed01      if ((this->m_buttonInfoArray.m_num < eax_33 || eax_36 != 0))
004bed01      {
004bed03          uint32_t m_num_1 = this->m_buttonInfoArray.m_num;
004bed0a          struct PanelButtonInfo* m_data_5 = this->m_buttonInfoArray.m_data;
004bed0c          m_data_5[m_num_1].button = eax_31;
004bed13          m_data_5[m_num_1].panelID = var_1c;
004bebcb          this->m_buttonInfoArray.m_num += 1;
004bed01      }
004bed01      
004bed21      class UIElement* eax_37 = UIElement::GetChildRecursive(this, 0x1000019a);
004bed36      int32_t var_14;
004bed36      UIElement::GetAttribute_Enum(eax_37, 0x10000029, &var_14);
004bed41      int32_t eax_39 = (this->m_buttonInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bed48      uint8_t eax_42;
004bed48      
004bed48      if (this->m_buttonInfoArray.m_num >= eax_39)
004bed56          eax_42 = SmartArray<VertexRange,1>::grow(&this->m_buttonInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_buttonInfoArray, (eax_39 + 1)));
004bed56      
004bed5d      if ((this->m_buttonInfoArray.m_num < eax_39 || eax_42 != 0))
004bed5d      {
004bed5f          uint32_t m_num_5 = this->m_buttonInfoArray.m_num;
004bed66          struct PanelButtonInfo* m_data_2 = this->m_buttonInfoArray.m_data;
004bed68          m_data_2[m_num_5].button = eax_37;
004bed6f          m_data_2[m_num_5].panelID = var_14;
004bebcb          this->m_buttonInfoArray.m_num += 1;
004bed5d      }
004bed5d      
004bed7d      class UIElement* eax_43 = UIElement::GetChildRecursive(this, 0x1000019b);
004bed92      int32_t var_c;
004bed92      UIElement::GetAttribute_Enum(eax_43, 0x10000029, &var_c);
004bed9d      int32_t eax_45 = (this->m_buttonInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004beda4      uint8_t eax_48;
004beda4      
004beda4      if (this->m_buttonInfoArray.m_num >= eax_45)
004bedb2          eax_48 = SmartArray<VertexRange,1>::grow(&this->m_buttonInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_buttonInfoArray, (eax_45 + 1)));
004bedb2      
004bedb9      if ((this->m_buttonInfoArray.m_num < eax_45 || eax_48 != 0))
004bedb9      {
004bedbb          uint32_t m_num_2 = this->m_buttonInfoArray.m_num;
004bedc2          struct PanelButtonInfo* m_data_6 = this->m_buttonInfoArray.m_data;
004bedc4          m_data_6[m_num_2].button = eax_43;
004bedcb          m_data_6[m_num_2].panelID = var_c;
004bebcb          this->m_buttonInfoArray.m_num += 1;
004bedb9      }
004bedb9      
004bedd9      class UIElement* eax_49 = UIElement::GetChildRecursive(this, 0x100001b1);
004bedee      int32_t var_4;
004bedee      UIElement::GetAttribute_Enum(eax_49, 0x10000029, &var_4);
004bedf9      int32_t eax_51 = (this->m_buttonInfoArray.m_sizeAndDeallocate & 0x7fffffff);
004bee00      uint8_t eax_54;
004bee00      
004bee00      if (this->m_buttonInfoArray.m_num >= eax_51)
004bee0e          eax_54 = SmartArray<VertexRange,1>::grow(&this->m_buttonInfoArray, SmartArray<unsigned long,1>::get_new_size(&this->m_buttonInfoArray, (eax_51 + 1)));
004bee0e      
004bee15      if ((this->m_buttonInfoArray.m_num < eax_51 || eax_54 != 0))
004bee15      {
004bee17          uint32_t m_num_6 = this->m_buttonInfoArray.m_num;
004bee1e          struct PanelButtonInfo* m_data_3 = this->m_buttonInfoArray.m_data;
004bee20          m_data_3[m_num_6].button = eax_49;
004bee27          m_data_3[m_num_6].panelID = var_4;
004bebcb          this->m_buttonInfoArray.m_num += 1;
004bee15      }
004bee15      
004bee3c      this->m_pInventoryButtonDragOverlay = UIElement::GetChildRecursive(this, 0x1000046c);
004bee42      gmToolbarUI::InitShortcutArray(this);
004bee47      this->m_pSelObjectHealthMeter->vtable->SetVisible(0);
004bee54      this->m_pSelObjectManaMeter->vtable->SetVisible(0);
004bee61      this->m_pStackSizeEntryBox->vtable->SetVisible(0);
004bee6e      this->m_pStackSizeSlider->vtable->SetVisible(0);
004bea80  }

004bee81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004bee90  enum UIElementMessageListenResult __thiscall gmToolbarUI::ListenToElementMessage(class gmToolbarUI* this, struct UIElementMessageInfo const* arg2)

004bee90  {
004bee92      struct UIElementMessageInfo* esi = arg2;
004bee96      uint32_t idElement = esi->idElement;
004bee96      
004beea0      if (idElement != 0x100001a3)
004beea0      {
004befef          if ((idElement == 0x100001a4 && esi->idMessage == 0xa))
004befef          {
004beff8              esi->dwParam1;
004beff5              esi->dwParam1;
004bf005              uint32_t GenItemHolder::maxSplitSize_2 = GenItemHolder::maxSplitSize;
004bf00b              GenItemHolder::maxSplitSize;
004bf02d              uint32_t esi_3 = (1 - _ftol2());
004bf02d              
004bf031              if (esi_3 > GenItemHolder::maxSplitSize_2)
004bf033                  esi_3 = GenItemHolder::maxSplitSize_2;
004bf031              else if (esi_3 < 1)
004bf03c                  esi_3 = 1;
004bf03c              
004bf041              uint32_t __saved_ebp_4 = esi_3;
004bf04e              GenItemHolder::splitSize = esi_3;
004bf054              class PStringBase<unsigned short>* eax_11 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, &data_7a0184);
004bf063              UIElement_Text::SetText(this->m_pStackSizeEntryBox, eax_11);
004bf06c              void* __offset(UIElementMessageInfo, -0x14) edi_2 = ((char*)arg2 - 0x14);
004bf06c              
004bf07f              if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
004bf087                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
004bf087              
004bf091              CM_UI::SendNotice_StackSliderChanged(esi_3, GenItemHolder::maxSplitSize);
004bf09e              return 0;
004befef          }
004beea0      }
004beea0      else if (esi->idMessage == 0x2f)
004beeaa      {
004beeb5          if (esi->dwParam1 != 0)
004beeb5          {
004beeb7              this->m_pStackSizeEntryBox->vtable->Activate();
004beecb              UIElement_Text::SelectAll(this->m_pStackSizeEntryBox);
004beed5              return 0;
004beeb5          }
004beeb5          
004beed9          uint32_t GenItemHolder::splitSize_1 = GenItemHolder::splitSize;
004beeef          class PSRefBufferCharData<unsigned short>* m_charbuffer = UIElement_Text::GetText(this->m_pStackSizeEntryBox, &arg2)->m_charbuffer;
004beefc          *(uint32_t*)_errno() = 0;
004bef02          int32_t GenItemHolder::maxSplitSize_5 = wcstoul(m_charbuffer, 0, 0);
004bef0c          void* __offset(UIElementMessageInfo, -0x14) esi_2 = ((char*)arg2 - 0x14);
004bef18          int32_t eax_5;
004bef18          int32_t __saved_ebp_12;
004bef18          eax_5 = InterlockedDecrement(((char*)esi_2 + 4));
004bef18          
004bef24          if ((eax_5 == 0 && esi_2 != 0))
004bef2c              __saved_ebp_12 = *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004bef2c          
004bef2e          uint32_t GenItemHolder::maxSplitSize_1 = GenItemHolder::maxSplitSize;
004bef35          int32_t GenItemHolder::maxSplitSize_3;
004bef35          
004bef35          if (GenItemHolder::maxSplitSize_5 <= GenItemHolder::maxSplitSize_1)
004bef35          {
004befd0              if (GenItemHolder::maxSplitSize_5 < 1)
004befd0              {
004befd2                  GenItemHolder::maxSplitSize_3 = 1;
004befd7                  goto label_4bef3d;
004befd0              }
004befd0              
004befdc              GenItemHolder::maxSplitSize_3 = GenItemHolder::maxSplitSize_5;
004bef35          }
004bef35          else
004bef35          {
004bef3b              GenItemHolder::maxSplitSize_3 = GenItemHolder::maxSplitSize_1;
004bef3d          label_4bef3d:
004bef3d              
004bef3f              if (GenItemHolder::maxSplitSize_5 != GenItemHolder::maxSplitSize_3)
004bef3f              {
004bef41                  int32_t GenItemHolder::maxSplitSize_4 = GenItemHolder::maxSplitSize_3;
004bef4e                  class PStringBase<unsigned short>* eax_7 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, &data_7a0184);
004bef5d                  UIElement_Text::SetText(this->m_pStackSizeEntryBox, eax_7);
004bef66                  __saved_ebp_12 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
004bef6b                  GenItemHolder::maxSplitSize_1 = GenItemHolder::maxSplitSize;
004bef3f              }
004bef35          }
004bef35          
004bef72          GenItemHolder::splitSize = GenItemHolder::maxSplitSize_3;
004bef72          
004bef79          if (GenItemHolder::maxSplitSize_3 != GenItemHolder::splitSize_1)
004bef79          {
004bef7d              arg2 = GenItemHolder::maxSplitSize_3;
004bef81              long double x87_r7_1 = ((long double)arg2);
004bef81              
004bef85              if (GenItemHolder::maxSplitSize_3 < 0)
004bef87                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
004bef87              
004bef8f              arg2 = GenItemHolder::maxSplitSize_1;
004bef93              long double x87_r6_1 = ((long double)arg2);
004bef93              
004bef97              if (GenItemHolder::maxSplitSize_1 < 0)
004bef99                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
004bef99              
004befa1              int32_t __saved_ebp_1 = __saved_ebp_12;
004befb0              UIElement::SetAttribute_Float(this->m_pStackSizeSlider, 0x86, ((float)(x87_r7_1 / x87_r6_1)));
004befbd              CM_UI::SendNotice_StackSliderChanged(GenItemHolder::maxSplitSize_3, GenItemHolder::maxSplitSize);
004bef79          }
004bef79          
004befca          return 0;
004beeaa      }
004beeaa      
004bf0a1      uint32_t idMessage = esi->idMessage;
004bf0a1      
004bf0a7      if (idMessage == 0x15)
004bf0a7      {
004bf0ae          if (idElement == 0x100001b1)
004bf0b0              this->m_pInventoryButtonDragOverlay->vtable->SetState(0x1000003f);
004bf0b0          
004bf0c6          gmToolbarUI::HandleDropRelease(this, esi);
004bf0d0          return 0;
004bf0a7      }
004bf0a7      
004bf0d6      if (idMessage != 1)
004bf0d6      {
004bf17e          if ((idMessage == 0x3e && idElement == 0x100001b1))
004bf17e          {
004bf185              if (esi->dwParam1 == 0)
004bf185              {
004bf1c2                  this->m_pInventoryButtonDragOverlay->vtable->SetState(0x1000003f);
004bf1da                  return 0;
004bf185              }
004bf185              
004bf18d              class UIElement* m_dragElement = UIElementManager::s_pInstance->m_dragElement;
004bf18d              
004bf195              if (m_dragElement == 0)
004bf195              {
004bf197                  this->m_pInventoryButtonDragOverlay->vtable->SetState(0x1000003f);
004bf1af                  return 0;
004bf195              }
004bf195              
004bf1b5              gmToolbarUI::HandleInventoryButtonDragOver(this, m_dragElement);
004bf1bf              return 0;
004bf17e          }
004bf0d6      }
004bf0d6      else if ((idElement - 0x10000192) <= 0x13)
004bf0e4          switch (idElement)
004bf0e4          {
004bf0ff              case 0x10000192:
004bf0ff              case 0x10000193:
004bf0ff              case 0x10000194:
004bf0ff              case 0x10000195:
004bf0ff              {
004bf0ff                  ClientCombatSystem::ToggleCombatMode(ClientCombatSystem::GetCombatSystem());
004bf109                  return 0;
004bf0ff                  break;
004bf0ff              }
004bf140              case 0x1000019d:
004bf140              {
004bf140                  uint32_t ACCWeenieObject::selectedID_2 = ACCWeenieObject::selectedID;
004bf140                  
004bf147                  if (ACCWeenieObject::selectedID_2 != 0)
004bf147                  {
004bf14e                      ItemHolder::UseObject(ACCWeenieObject::selectedID_2, 0, 0);
004bf15b                      return 0;
004bf147                  }
004bf147                  
004bf167                  ClientUISystem::SetTargetMode(ClientUISystem::GetUISystem(), TARGET_MODE_USE);
004bf171                  return 0;
004bf140                  break;
004bf140              }
004bf10c              case 0x100001a5:
004bf10c              {
004bf10c                  uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004bf10c                  
004bf113                  if (ACCWeenieObject::selectedID_1 != 0)
004bf113                  {
004bf11d                      ClientUISystem::ExamineObject(ClientUISystem::GetUISystem(), ACCWeenieObject::selectedID_1);
004bf127                      return 0;
004bf113                  }
004bf113                  
004bf133                  ClientUISystem::SetTargetMode(ClientUISystem::GetUISystem(), TARGET_MODE_EXAMINE);
004bf13d                  return 0;
004bf10c                  break;
004bf10c              }
004bf0e4          }
004bf0e4      
004bf1e8      return UIElement::ListenToElementMessage(this, esi);
004bee90  }

004bf1eb                                   90                                                                         .
004bf1ec  uint32_t jump_table_4bf1ec[0x4] = 
004bf1ec  {
004bf1ec      [0x0] =  0x004bf0f8
004bf1f0      [0x1] =  0x004bf140
004bf1f4      [0x2] =  0x004bf10c
004bf1f8      [0x3] =  0x004bf1dd
004bf1fc  }
004bf1fc  uint8_t lookup_table_4bf1fc[0x14] = 
004bf1fc  {
004bf1fc      [0x00] =  0x00
004bf1fd      [0x01] =  0x00
004bf1fe      [0x02] =  0x00
004bf1ff      [0x03] =  0x00
004bf200      [0x04] =  0x03
004bf201      [0x05] =  0x03
004bf202      [0x06] =  0x03
004bf203      [0x07] =  0x03
004bf204      [0x08] =  0x03
004bf205      [0x09] =  0x03
004bf206      [0x0a] =  0x03
004bf207      [0x0b] =  0x01
004bf208      [0x0c] =  0x03
004bf209      [0x0d] =  0x03
004bf20a      [0x0e] =  0x03
004bf20b      [0x0f] =  0x03
004bf20c      [0x10] =  0x03
004bf20d      [0x11] =  0x03
004bf20e      [0x12] =  0x03
004bf20f      [0x13] =  0x02
004bf210  }

004bf210  void __fastcall gmToolbarUI::UpdateAmmoID(class gmToolbarUI* this)

004bf210  {
004bf215      uint32_t m_idAmmoObject = this->m_idAmmoObject;
004bf21b      this->m_idAmmoObject = 0;
004bf225      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004bf22c      uint32_t player_id;
004bf22c      
004bf22c      if (SmartBox::smartbox_1 == 0)
004bf236          player_id = 0;
004bf22c      else
004bf22e          player_id = SmartBox::smartbox_1->player_id;
004bf22e      
004bf239      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(player_id);
004bf239      
004bf245      if (eax != 0)
004bf245      {
004bf251          uint32_t eax_1 = ACCWeenieObject::GetObjectAtLocation(eax, 0x400000, 0);
004bf251          
004bf25a          if (eax_1 != 0)
004bf25a          {
004bf25d              class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(eax_1);
004bf25d              
004bf270              if ((eax_2 != 0 && eax_2->pwd._maxStackSize > 1))
004bf272                  this->m_idAmmoObject = eax_1;
004bf25a          }
004bf25a          
004bf281          if (this->m_idAmmoObject == 0)
004bf291              this->m_idAmmoObject = ACCWeenieObject::GetObjectAtLocation(eax, "activation type (%s) with '%s' b…", 0);
004bf291          
004bf29d          if (this->m_idAmmoObject != m_idAmmoObject)
004bf2a4              /* tailcall */
004bf2a4              return gmToolbarUI::UpdateAmmoNumber(this);
004bf245      }
004bf210  }

004bf2ad                                         90 90 90                                                               ...

004bf2b0  void __thiscall gmToolbarUI::RecvNotice_ServerSaysMoveItem(class gmToolbarUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004bf2b0  {
004bf2b0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004bf2bb      uint32_t player_id_1;
004bf2bb      
004bf2bb      if (SmartBox::smartbox_1 == 0)
004bf2c5          player_id_1 = 0;
004bf2bb      else
004bf2bd          player_id_1 = SmartBox::smartbox_1->player_id;
004bf2bd      
004bf2cb      uint32_t player_id;
004bf2cb      
004bf2cb      if (arg4 != player_id_1)
004bf2cb      {
004bf2cf          if (SmartBox::smartbox_1 == 0)
004bf2d9              player_id = 0;
004bf2cf          else
004bf2d1              player_id = SmartBox::smartbox_1->player_id;
004bf2cb      }
004bf2cb      
004bf2df      if (((arg4 == player_id_1 || arg8 == player_id) && ((0xc00000 & arg5) != 0 || (arg9 & 0xc00000) != 0)))
004bf2fa          gmToolbarUI::UpdateAmmoID(((char*)this - 0x5f8));
004bf2fa      
004bf302      int32_t esi = 0;
004bf302      
004bf306      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe] > 0)
004bf306      {
004bf313          while (true)
004bf313          {
004bf313              class UIElement_ListBox* ecx_2 = *(uint32_t*)(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xc] + (esi << 2));
004bf313              
004bf318              if (ecx_2 != 0)
004bf318              {
004bf31c                  class UIElement* eax_2 = UIElement_ListBox::GetItem(ecx_2, 0);
004bf31c                  
004bf323                  if (eax_2 != 0)
004bf323                  {
004bf32e                      void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004bf32e                      
004bf33e                      if ((eax_3 != 0 && *(uint32_t*)((char*)eax_3 + 0x5fc) == arg2))
004bf33e                      {
004bf341                          class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(arg2);
004bf341                          
004bf34b                          if (eax_4 == 0)
004bf34b                              break;
004bf34b                          
004bf356                          if (ACCWeenieObject::IsOwnedByPlayer(eax_4) == 0)
004bf356                              break;
004bf33e                      }
004bf323                  }
004bf318              }
004bf318              
004bf35b              esi += 1;
004bf35b              
004bf35e              if (esi >= this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe])
004bf363                  return;
004bf313          }
004bf313          
004bf36f          gmToolbarUI::RemoveShortcutInSlotNum(((char*)this - 0x5f8), esi, 1);
004bf306      }
004bf2b0  }

004bf37a                                                                                90 90 90 90 90 90                            ......

004bf380  void __fastcall gmToolbarUI::HandleSelectionChanged(class gmToolbarUI* this)

004bf380  {
004bf384      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004bf38b      class gmToolbarUI* this_1 = this;
004bf38b      
004bf397      if (this_1->m_iidSelectedObject != ACCWeenieObject::selectedID_1)
004bf397      {
004bf39d          class UIElement_Text* m_pSelObjectName = this_1->m_pSelObjectName;
004bf3a8          this_1->m_iidSelectedObject = ACCWeenieObject::selectedID_1;
004bf3ae          UIElement_Text::SetText(m_pSelObjectName, &PStringBase<unsigned short>::null_string);
004bf3b3          this_1->m_pSelObjectField->vtable->SetState(0);
004bf3b3          
004bf3d4          if ((((int8_t)(this_1->m_pSelObjectHealthMeter->__bitfield164 >> 1)) & 1) != 0)
004bf3d4          {
004bf3d8              CM_Combat::Event_QueryHealth(0);
004bf3dd              this_1->m_pSelObjectHealthMeter->vtable->SetVisible(0);
004bf3d4          }
004bf3d4          
004bf3fe          if ((((int8_t)(this_1->m_pSelObjectManaMeter->__bitfield164 >> 1)) & 1) != 0)
004bf3fe          {
004bf402              CM_Item::Event_QueryItemMana(0);
004bf407              this_1->m_pSelObjectManaMeter->vtable->SetVisible(0);
004bf3fe          }
004bf3fe          
004bf417          this_1->m_pStackSizeEntryBox->vtable->SetVisible(0);
004bf424          this_1->m_pStackSizeSlider->vtable->SetVisible(0);
004bf397      }
004bf397      
004bf431      uint32_t m_iidSelectedObject = this_1->m_iidSelectedObject;
004bf431      
004bf439      if (m_iidSelectedObject == 0)
004bf439      {
004bf43b          this_1->m_pUseObjectButton->vtable->SetState(1);
004bf450          return;
004bf439      }
004bf439      
004bf453      class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(m_iidSelectedObject);
004bf453      
004bf45f      if (eax_5 != 0)
004bf45f      {
004bf465          int32_t ebp;
004bf465          int32_t var_2c_1 = ebp;
004bf468          uint8_t eax_6 = ACCWeenieObject::IsCoinstack(eax_5);
004bf46f          int32_t eax_7;
004bf46f          
004bf46f          if (eax_6 != 0)
004bf477              eax_7 = ACCWeenieObject::IsOwnedByPlayer(eax_5);
004bf477          
004bf47e          int32_t* var_14;
004bf47e          
004bf47e          if ((eax_6 == 0 || eax_7 == 0))
004bf47e          {
004bf678              uint32_t _stackSize_4 = eax_5->pwd._stackSize;
004bf684              char* eax_23 = ACCWeenieObject::GetObjectName(eax_5, NAME_APPROPRIATE, 0);
004bf684              
004bf691              if (_stackSize_4 <= 1)
004bf691              {
004bf6e1                  class PStringBase<unsigned short>* eax_27;
004bf6e1                  eax_27 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, WidthConvert, eax_23);
004bf6ed                  UIElement_Text::SetText(this_1->m_pSelObjectName, eax_27);
004bf6f6                  void* ebp_6 = &var_14[-5];
004bf6f6                  
004bf70d                  if ((InterlockedDecrement(((char*)ebp_6 + 4)) == 0 && ebp_6 != 0))
004bf71a                      **(uint32_t**)ebp_6(1);
004bf691              }
004bf691              else
004bf691              {
004bf693                  uint32_t _stackSize_6 = _stackSize_4;
004bf69c                  class PStringBase<unsigned short>* eax_24 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, Formatted, &gmToolbarUI::`vftable'.RecvNotice_SetDisplayInventory);
004bf6ab                  UIElement_Text::SetText(this_1->m_pSelObjectName, eax_24);
004bf6b4                  void* ebp_4 = &var_14[-5];
004bf6b4                  
004bf6cb                  if ((InterlockedDecrement(((char*)ebp_4 + 4)) == 0 && ebp_4 != 0))
004bf6d8                      **(uint32_t**)ebp_4(1);
004bf691              }
004bf47e          }
004bf47e          else
004bf47e          {
004bf48e              int32_t var_1c = 0;
004bf4a3              int32_t* __return;
004bf4a3              InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_14, GetClassObject(&__return, &PlayerDesc_ClassType));
004bf4a8              int32_t* __return_1 = __return;
004bf4a8              
004bf4ae              if (__return_1 != 0)
004bf4b2                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004bf4b2              
004bf4b5              int32_t* ebx = var_14;
004bf4c3              int32_t var_10;
004bf4c3              
004bf4c3              if ((ebx != 0 && var_10 >= 0))
004bf4d3                  CBaseQualities::InqInt(&ebx[0xe], 0x14, &var_1c, 0, 0);
004bf4d3              
004bf4dc              uint32_t _stackSize_3 = eax_5->pwd._stackSize;
004bf4e2              int32_t var_30_2 = var_1c;
004bf4ee              char* var_34_2 = ACCWeenieObject::GetObjectName(eax_5, NAME_APPROPRIATE, 0);
004bf4ef              uint32_t _stackSize_5 = _stackSize_3;
004bf4fc              class PStringBase<unsigned short>* eax_11 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, Formatted, &gmToolbarUI::`vftable'.RecvNotice_StackSliderChanged);
004bf50b              UIElement_Text::SetText(this_1->m_pSelObjectName, eax_11);
004bf514              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14);
004bf514              
004bf51b              if (ebx != 0)
004bf521                  *(uint32_t*)(*(uint32_t*)ebx + 0x14)();
004bf47e          }
004bf47e          
004bf52d          GenItemHolder::splitSize = 1;
004bf533          GenItemHolder::maxSplitSize = 1;
004bf539          this_1->m_pStackSizeEntryBox->vtable->SetVisible(0);
004bf546          this_1->m_pStackSizeSlider->vtable->SetVisible(0);
004bf553          uint32_t _stackSize = eax_5->pwd._stackSize;
004bf553          
004bf563          if ((_stackSize == 0 || _stackSize <= 1))
004bf563          {
004bf725              int32_t eax_29 = eax_5->vtable->IsPlayer();
004bf734              uint8_t eax_32;
004bf734              
004bf734              if ((eax_29 == 0 && eax_5->pwd._pet_owner == 0))
004bf73e                  eax_32 = ClientCombatSystem::ObjectIsAttackable(ClientCombatSystem::GetCombatSystem(), ACCWeenieObject::selectedID_1);
004bf73e              
004bf745              if (((eax_29 != 0 || eax_5->pwd._pet_owner != 0) || eax_32 != 0))
004bf745              {
004bf773                  this_1->m_pSelObjectField->vtable->SetState(0x1000000b);
004bf78d                  CM_Combat::Event_QueryHealth(this_1->m_iidSelectedObject);
004bf745              }
004bf745              else
004bf745              {
004bf747                  this_1->m_pSelObjectField->vtable->SetState(0x1000000b);
004bf747                  
004bf763                  if (ACCWeenieObject::IsOwnedByPlayer(eax_5) != 0)
004bf76c                      CM_Item::Event_QueryItemMana(this_1->m_iidSelectedObject);
004bf745              }
004bf563          }
004bf563          else
004bf563          {
004bf573              uint32_t _stackSize_1;
004bf573              
004bf573              if (ClientUISystem::GetUISystem()->vendorID == 0)
004bf573              {
004bf593              label_4bf593:
004bf593                  _stackSize_1 = eax_5->pwd._stackSize;
004bf593                  
004bf59b                  if (_stackSize_1 == 0)
004bf59d                      _stackSize_1 = 1;
004bf573              }
004bf573              else
004bf573              {
004bf583                  if (eax_5->pwd._containerID != ClientUISystem::GetUISystem()->vendorID)
004bf583                      goto label_4bf593;
004bf583                  
004bf591                  if ((eax_5->vtable->InqType() & 0xdc41cb0) == 0)
004bf591                      goto label_4bf593;
004bf591                  
004bf59d                  _stackSize_1 = 1;
004bf573              }
004bf573              
004bf5a2              GenItemHolder::splitSize = _stackSize_1;
004bf5a7              uint32_t _stackSize_2 = eax_5->pwd._stackSize;
004bf5af              GenItemHolder::maxSplitSize = _stackSize_2;
004bf5af              
004bf5b5              if (_stackSize_2 == 0)
004bf5b7                  GenItemHolder::maxSplitSize = 1;
004bf5b7              
004bf5c1              uint32_t _stackSize_7 = _stackSize_1;
004bf5ce              class PStringBase<unsigned short>* eax_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, Formatted, &data_7a0184);
004bf5dd              UIElement_Text::SetText(this_1->m_pStackSizeEntryBox, eax_18);
004bf5e6              void* ebp_2 = &var_14[-5];
004bf5e6              
004bf5f9              if ((InterlockedDecrement(((char*)ebp_2 + 4)) == 0 && ebp_2 != 0))
004bf602                  **(uint32_t**)ebp_2(1);
004bf602              
004bf604              uint32_t GenItemHolder::splitSize_1 = GenItemHolder::splitSize;
004bf60a              long double x87_r7_1 = ((long double)GenItemHolder::splitSize);
004bf60a              
004bf612              if (GenItemHolder::splitSize_1 < 0)
004bf614                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
004bf614              
004bf620              long double x87_r6_1 = ((long double)GenItemHolder::maxSplitSize);
004bf620              
004bf628              if (GenItemHolder::maxSplitSize < 0)
004bf62a                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
004bf62a              
004bf632              uint32_t GenItemHolder::splitSize_2 = GenItemHolder::splitSize_1;
004bf641              UIElement::SetAttribute_Float(this_1->m_pStackSizeSlider, 0x86, ((float)(x87_r7_1 / x87_r6_1)));
004bf646              this_1->m_pSelObjectField->vtable->SetState(0x1000000c);
004bf659              this_1->m_pStackSizeEntryBox->vtable->SetVisible(1);
004bf666              this_1->m_pStackSizeSlider->vtable->SetVisible(1);
004bf563          }
004bf563          
004bf7a0          void var_c;
004bf7a0          ItemUses::ItemUses(&var_c, eax_5->pwd._useability);
004bf7a0          
004bf7ae          if (((((eax_5->pwd._combatUse == COMBAT_USE_NONE && (eax_5->vtable->InqType() & 4) == 0) && (eax_5->vtable->InqType() & 2) == 0) && (eax_5->vtable->InqType() & 8) == 0) && ItemUses::IsUseable(&var_c) == 0))
004bf7ae          {
004bf7de              this_1->m_pUseObjectButton->vtable->SetState(0xd);
004bf7f4              return;
004bf7ae          }
004bf7ae          
004bf7f5          this_1->m_pUseObjectButton->vtable->SetState(1);
004bf45f      }
004bf380  }

004bf80e                                            90 90                                                                ..

004bf810  void __fastcall gmToolbarUI::UpdateFromPlayerDesc(class gmToolbarUI* this)

004bf810  {
004bf813      int32_t ebx;
004bf813      int32_t var_18 = ebx;
004bf814      int32_t ebp;
004bf814      int32_t var_1c = ebp;
004bf815      int32_t esi;
004bf815      int32_t var_20 = esi;
004bf816      struct Turbine_GUID* edi;
004bf816      struct Turbine_GUID* var_24 = edi;
004bf819      gmToolbarUI::FlushShortcuts(this);
004bf822      struct Turbine_GUID* var_14;
004bf822      int32_t* var_28 = &var_14;
004bf827      struct Turbine_GUID* var_2c = &CPlayerModule_ClassType;
004bf82f      var_14 = nullptr;
004bf83a      class TResult __return;
004bf83a      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004bf83f      struct Turbine_GUID* ecx_1 = var_14;
004bf848      var_2c = ecx_1;
004bf84a      int32_t var_28_1 = 0;
004bf84d      struct Turbine_GUID* eax_1 = var_2c;
004bf853      int32_t var_8 = 0;
004bf857      int32_t var_4 = 0;
004bf857      
004bf85b      if (eax_1 != 0)
004bf861          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004bf861      
004bf86d      struct Turbine_GUID** esp = &var_2c;
004bf874      void var_c;
004bf874      int32_t ecx_4 = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_c);
004bf874      
004bf87a      if (ecx_1 != 0)
004bf880          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004bf880      
004bf883      class TResult __return_1 = __return;
004bf883      
004bf88f      if (((__return_1 != 0 && ecx_4 >= 0) && CInputManager::GetMouseX((__return_1 + 4)) != 0))
004bf88f      {
004bf8a8          int32_t edi_2 = (CInputManager::GetMouseX((__return_1 + 4)) + 4);
004bf8a8          
004bf8cc          for (int32_t i = 0; i < 0x12; i += 1)
004bf8cc          {
004bf8b0              void* eax_5 = *(uint32_t*)(edi_2 + (i << 2));
004bf8b0              
004bf8b5              if (eax_5 != 0)
004bf8b5              {
004bf8b7                  uint32_t eax_6 = *(uint32_t*)((char*)eax_5 + 8);
004bf8b7                  
004bf8bc                  if (eax_6 != 0)
004bf8bc                  {
004bf8c3                      gmToolbarUI::AddShortcut(this, eax_6, i, 0);
004bf8c3                      esp = &var_2c;
004bf8bc                  }
004bf8b5              }
004bf8cc          }
004bf8cc          
004bf8ce          __return_1 = __return;
004bf88f      }
004bf88f      
004bf8d4      gmToolbarUI::UpdateAmmoID(this);
004bf8d4      
004bf8db      if (__return_1 != 0)
004bf8db      {
004bf8e1          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004bf8e1          esp = &var_24;
004bf8db      }
004bf8db      
004bf8e4      *(uint32_t*)esp;
004bf8e4      esp[1];
004bf8e4      esp[2];
004bf8e4      esp[3];
004bf810  }

004bf8ec                                      90 90 90 90                                                              ....

004bf8f0  void __thiscall gmToolbarUI::RecvNotice_ItemAttributesChanged(class gmToolbarUI* this, uint32_t arg2, uint32_t arg3)

004bf8f0  {
004bf8ff      if (arg2 == ACCWeenieObject::selectedID)
004bf8ff      {
004bf902          class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004bf902          
004bf90c          if (eax != 0)
004bf90c          {
004bf90e              uint32_t _stackSize = eax->pwd._stackSize;
004bf90e              
004bf916              if (_stackSize == 0)
004bf918                  _stackSize = 1;
004bf918              
004bf923              if (_stackSize != GenItemHolder::maxSplitSize)
004bf92b                  gmToolbarUI::HandleSelectionChanged(((char*)this - 0x5f8));
004bf90c          }
004bf8ff      }
004bf8ff      
004bf930      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004bf937      uint32_t player_id;
004bf937      
004bf937      if (SmartBox::smartbox_1 == 0)
004bf941          player_id = 0;
004bf937      else
004bf939          player_id = SmartBox::smartbox_1->player_id;
004bf939      
004bf945      if (arg2 == player_id)
004bf945      {
004bf94d          gmToolbarUI::UpdateAmmoID(((char*)this - 0x5f8));
004bf954          return;
004bf945      }
004bf945      
004bf95a      if (arg2 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x11])
004bf962          gmToolbarUI::UpdateAmmoNumber(((char*)this - 0x5f8));
004bf8f0  }

004bf96c                                      90 90 90 90                                                              ....

004bf970  void __fastcall gmToolbarUI::RecvNotice_SelectionChanged(class gmToolbarUI* this)

004bf970  {
004bf976      /* tailcall */
004bf976      return gmToolbarUI::HandleSelectionChanged(((char*)this - 0x5f8));
004bf970  }

004bf97b                                                                                   90 90 90 90 90                             .....

004bf980  void __fastcall gmToolbarUI::RecvNotice_PlayerDescReceived(class gmToolbarUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004bf980  {
004bf986      gmToolbarUI::UpdateFromPlayerDesc(((char*)this - 0x5f8));
004bf980  }

004bf98e                                            90 90                                                                ..

004bf990  void __thiscall gmIndicatorsUI::gmIndicatorsUI(class gmIndicatorsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004bf990  {
004bf99f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004bf9a4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bf9ae      this->vtable = 0x7b47e0;
004bf9b4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bf990  }

004bf9c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004bf9d0  class UIElement* __thiscall gmIndicatorsUI::DynamicCast(class gmIndicatorsUI* this, uint32_t arg2) __pure

004bf9d0  {
004bf9dc      if (arg2 == 0x1000000a)
004bf9e9          return this;
004bf9e9      
004bf9e3      int32_t edx_1;
004bf9e3      edx_1 = arg2 != 3;
004bf9e7      return (this & (edx_1 - 1));
004bf9d0  }

004bf9ec                                      90 90 90 90                                                              ....

004bf9f0  uint32_t gmIndicatorsUI::GetUIElementType(class gmIndicatorsUI const* this @ ecx) __pure

004bf9f0  {
004bf9f5      return 0x1000000a;
004bf9f0  }

004bf9f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004bfa00  void __fastcall gmCGProfessionPage::PostInit(class gmCGProfessionPage* this)

004bfa00  {
004bfa00      /* tailcall */
004bfa00      return UIElement::PostInit(this);
004bfa00  }

004bfa05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004bfa10  void __fastcall gmIndicatorsUI::~gmIndicatorsUI(class gmIndicatorsUI* this)

004bfa10  {
004bfa19      this->vtable = 0x7b47e0;
004bfa13      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bfa13      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bfa2b      NoticeHandler::~NoticeHandler(&this->vtable);
004bfa33      /* tailcall */
004bfa33      return UIElement_Field::~UIElement_Field(this);
004bfa10  }

004bfa38                                                                          90 90 90 90 90 90 90 90                          ........

004bfa40  class UIElement* gmIndicatorsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004bfa40  {
004bfa46      void* result = operator new(0x5fc);
004bfa46      
004bfa52      if (result == 0)
004bfa86          return 0;
004bfa86      
004bfa60      UIElement_Field::UIElement_Field(result, arg1, arg2);
004bfa65      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004bfa6f      *(uint32_t*)result = 0x7b47e0;
004bfa75      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004bfa82      return result;
004bfa40  }

004bfa87                       90 90 90 90 90 90 90 90 90                                                         .........

004bfa90  enum UIElementMessageListenResult __thiscall gmIndicatorsUI::ListenToElementMessage(class gmIndicatorsUI* this, struct UIElementMessageInfo const* arg2)

004bfa90  {
004bfaa4      if ((arg2->idMessage == 1 && arg2->idElement == 0x100000fa))
004bfaa8          CM_UI::SendNotice_EndCharacterSession(1);
004bfaa8      
004bfaba      return UIElement::ListenToElementMessage(this, arg2);
004bfa90  }

004bfabd                                                                                         90 90 90                               ...

004bfac0  void* __thiscall gmIndicatorsUI::`scalar deleting destructor'(class gmIndicatorsUI* this, uint32_t arg2)

004bfac0  {
004bfac9      this->vtable = 0x7b47e0;
004bfac3      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bfac3      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bfadb      NoticeHandler::~NoticeHandler(&this->vtable);
004bfae2      UIElement_Field::~UIElement_Field(this);
004bfae2      
004bfaec      if ((arg2 & 1) != 0)
004bfaef          operator delete(this);
004bfaef      
004bfafa      return this;
004bfac0  }

004bfafd                                                                                         90 90 90                               ...

004bfb00  void gmIndicatorsUI::Register()

004bfb00  {
004bfb0a      UIElement::RegisterElementClass(0x1000000a, gmIndicatorsUI::Create);
004bfb00  }

004bfb13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004bfb20  void __fastcall gmVitalsUI::~gmVitalsUI(class gmVitalsUI* this)

004bfb20  {
004bfb31      this->vtable = 0x7b4c38;
004bfb25      this->vtable = &gmVitalsUI::`vftable';
004bfb2b      this->vtable = &gmFloatySideVitalsUI::`vftable';
004bfb43      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004bfb43      
004bfb4a      if (eax != 0)
004bfb4c          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004bfb4c      
004bfb54      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(9, 2, &this->vtable);
004bfb64      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(9, 1, &this->vtable);
004bfb74      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(9, 4, &this->vtable);
004bfb84      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(9, 3, &this->vtable);
004bfb94      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(9, 6, &this->vtable);
004bfba4      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(9, 5, &this->vtable);
004bfb25      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bfbbc      NoticeHandler::~NoticeHandler(&this->vtable);
004bfbc6      /* tailcall */
004bfbc6      return UIElement_Field::~UIElement_Field(this);
004bfb20  }

004bfbcb                                   90 90 90 90 90                                                             .....

004bfbd0  class UIElement* __thiscall gmVitalsUI::DynamicCast(class gmVitalsUI* this, uint32_t arg2) __pure

004bfbd0  {
004bfbdc      if (arg2 == 0x10000009)
004bfbe9          return this;
004bfbe9      
004bfbe3      int32_t edx_1;
004bfbe3      edx_1 = arg2 != 3;
004bfbe7      return (this & (edx_1 - 1));
004bfbd0  }

004bfbec                                      90 90 90 90                                                              ....

004bfbf0  uint32_t gmVitalsUI::GetUIElementType(class gmVitalsUI const* this @ ecx) __pure

004bfbf0  {
004bfbf5      return 0x10000009;
004bfbf0  }

004bfbf6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004bfc00  enum UIElementMessageListenResult __thiscall gmVitalsUI::ListenToElementMessage(class gmVitalsUI* this, struct UIElementMessageInfo const* arg2)

004bfc00  {
004bfc0c      if (arg2->idMessage == 0x1c)
004bfc0c      {
004bfc0e          uint32_t dwParam1 = arg2->dwParam1;
004bfc0e          
004bfc19          if ((dwParam1 == 7 || dwParam1 == 0xa))
004bfc19          {
004bfc2b              int32_t ecx;
004bfc2b              ecx = this->m_state == 0x10000006;
004bfc21              this->vtable->SetState((ecx + 0x10000006));
004bfc19          }
004bfc0c      }
004bfc0c      
004bfc47      return UIElement::ListenToElementMessage(this, arg2);
004bfc00  }

004bfc4a                                90 90 90 90 90 90                                                            ......

004bfc50  void __thiscall gmVitalsUI::gmVitalsUI(class gmVitalsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004bfc50  {
004bfc5f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004bfc64      this->vtable = &gmUrgentAssistanceUI::`vftable';
004bfc6e      this->vtable = &QualityChangeHandler::`vftable';
004bfc7a      __builtin_memset(&this->m_pHealthMeter, 0, 0x18);
004bfc9e      this->vtable = 0x7b4c38;
004bfca4      this->vtable = &gmVitalsUI::`vftable';
004bfcae      this->vtable = &gmFloatySideVitalsUI::`vftable';
004bfc50  }

004bfcbe                                                                                            90 90                                ..

004bfcc0  void* __thiscall gmVitalsUI::`scalar deleting destructor'(class gmVitalsUI* this, uint32_t arg2)

004bfcc0  {
004bfcc3      gmVitalsUI::~gmVitalsUI(this);
004bfcc3      
004bfccd      if ((arg2 & 1) != 0)
004bfcd0          operator delete(this);
004bfcd0      
004bfcdb      return this;
004bfcc0  }

004bfcde                                                                                            90 90                                ..

004bfce0  void __fastcall gmVitalsUI::PostInit(class gmVitalsUI* this)

004bfce0  {
004bfce3      UIElement::PostInit(this);
004bfcef      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100000e6);
004bfcf6      class UIElement_Meter* eax_1;
004bfcf6      
004bfcf6      if (eax == 0)
004bfd06          eax_1 = nullptr;
004bfcf6      else
004bfcfe          eax_1 = eax->vtable->DynamicCast(7);
004bfcfe      
004bfd0f      this->m_pHealthMeter = eax_1;
004bfd15      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x100000ec);
004bfd1c      class UIElement_Meter* eax_3;
004bfd1c      
004bfd1c      if (eax_2 == 0)
004bfd2c          eax_3 = nullptr;
004bfd1c      else
004bfd24          eax_3 = eax_2->vtable->DynamicCast(7);
004bfd24      
004bfd35      this->m_pStaminaMeter = eax_3;
004bfd3b      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x100000ee);
004bfd42      class UIElement_Meter* eax_5;
004bfd42      
004bfd42      if (eax_4 == 0)
004bfd52          eax_5 = nullptr;
004bfd42      else
004bfd4a          eax_5 = eax_4->vtable->DynamicCast(7);
004bfd4a      
004bfd5b      this->m_pManaMeter = eax_5;
004bfd61      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x100000eb);
004bfd68      class UIElement_Text* eax_7;
004bfd68      
004bfd68      if (eax_6 == 0)
004bfd78          eax_7 = nullptr;
004bfd68      else
004bfd70          eax_7 = eax_6->vtable->DynamicCast(0xc);
004bfd70      
004bfd81      this->m_pHealthLabel = eax_7;
004bfd87      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x100000ed);
004bfd8e      class UIElement_Text* eax_9;
004bfd8e      
004bfd8e      if (eax_8 == 0)
004bfd9e          eax_9 = nullptr;
004bfd8e      else
004bfd96          eax_9 = eax_8->vtable->DynamicCast(0xc);
004bfd96      
004bfda7      this->m_pStaminaLabel = eax_9;
004bfdad      class UIElement* eax_10 = UIElement::GetChildRecursive(this, 0x100000ef);
004bfdad      
004bfdb4      if (eax_10 != 0)
004bfdb4      {
004bfdc2          this->m_pManaLabel = eax_10->vtable->DynamicCast(0xc);
004bfdc9          return;
004bfdb4      }
004bfdb4      
004bfdcc      this->m_pManaLabel = nullptr;
004bfce0  }

004bfdd4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004bfde0  class UIElement* gmVitalsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004bfde0  {
004bfde5      void* eax = operator new(0x618);
004bfde5      
004bfdef      if (eax == 0)
004bfe05          return 0;
004bfe05      
004bfe02      return gmVitalsUI::gmVitalsUI(eax, arg1, arg2);
004bfde0  }

004bfe06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004bfe10  void gmVitalsUI::Register()

004bfe10  {
004bfe1a      UIElement::RegisterElementClass(0x10000009, gmVitalsUI::Create);
004bfe10  }

004bfe23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004bfe30  void __fastcall gmVitalsUI::Update(class gmVitalsUI* this)

004bfe30  {
004bfe36      void* __return_2;
004bfe36      void* __return = __return_2;
004bfe37      int32_t ebp;
004bfe37      int32_t var_ac = ebp;
004bfe45      struct Turbine_GUID* var_bc = &PlayerDesc_ClassType;
004bfe4d      int32_t var_a4 = 0;
004bfe58      class TResult __return_1;
004bfe58      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, var_bc, &var_a4);
004bfe5d      struct Turbine_GUID* ecx_1 = var_a4;
004bfe66      var_bc = ecx_1;
004bfe68      int32_t var_b8_1 = 0;
004bfe6b      struct Turbine_GUID* eax_1 = var_bc;
004bfe71      int32_t var_98 = 0;
004bfe75      int32_t var_94 = 0;
004bfe75      
004bfe79      if (eax_1 != 0)
004bfe7f          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004bfe7f      
004bfe8b      struct Turbine_GUID** esp = &var_bc;
004bfe94      void var_9c;
004bfe94      var_ac = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_98, &var_9c);
004bfe94      
004bfe98      if (ecx_1 != 0)
004bfe9e          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004bfe9e      
004bfea1      class TResult __return_3 = __return_1;
004bfea1      
004bfea7      if (__return_3 != 0)
004bfea7      {
004bfeb1          if (var_ac < 0)
004bfeb1          {
004bfeb8              *(uint32_t*)(*(uint32_t*)__return_3 + 0x14)();
004bfec5              return;
004bfeb1          }
004bfeb1          
004bfecc          if (this->m_pHealthMeter != 0)
004bfecc          {
004bfedc              var_a4 = 0;
004bfee0              var_ac = 0;
004bfee4              CACQualities::InqAttribute2nd(__return_3, 2, &var_a4, 0);
004bfef3              CACQualities::InqAttribute2nd(__return_3, 1, &var_ac, 0);
004bfef8              long double x87_r7_1 = ((long double)var_a4);
004bfef8              
004bff02              if (var_a4 < 0)
004bff04                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
004bff04              
004bff0a              int32_t ecx_9 = var_ac;
004bff0e              long double x87_r6_1 = ((long double)var_ac);
004bff0e              
004bff14              if (ecx_9 < 0)
004bff16                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
004bff16              
004bff1e              int32_t var_c0_2 = ecx_9;
004bff2a              UIElement::SetAttribute_Float(this->m_pHealthMeter, 0x69, ((float)(x87_r7_1 / x87_r6_1)));
004bff2a              
004bff35              if (this->m_pHealthLabel != 0)
004bff35              {
004bff3f                  StringInfo::StringInfo(&var_98);
004bff54                  StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000001);
004bff63                  int32_t var_c0_4 = 0;
004bff6a                  StringInfo::AddVariable_Int(&var_98, 0, var_a4);
004bff78                  int32_t var_c0_5 = 0;
004bff7f                  StringInfo::AddVariable_Int(&var_98, 0, var_ac);
004bff8e                  class PStringBase<unsigned short>* eax_6 = StringInfo::GetString(&var_98, &__return, 0);
004bff9a                  UIElement_Text::SetText(this->m_pHealthLabel, eax_6);
004bffa3                  int32_t* ebx_3 = ((char*)__return - 0x14);
004bffa3                  
004bffb6                  if ((InterlockedDecrement(&ebx_3[1]) == 0 && ebx_3 != 0))
004bffbe                      **(uint32_t**)ebx_3(1);
004bffbe                  
004bffc4                  StringInfo::~StringInfo(&var_98);
004bff35              }
004bfecc          }
004bfecc          
004bffcf          if (this->m_pStaminaMeter != 0)
004bffcf          {
004bffdf              var_ac = 0;
004bffe3              var_a4 = 0;
004bffe7              CACQualities::InqAttribute2nd(__return_3, 4, &var_ac, 0);
004bfff6              CACQualities::InqAttribute2nd(__return_3, 3, &var_a4, 0);
004bfffb              long double x87_r7_3 = ((long double)var_ac);
004bfffb              
004c0005              if (var_ac < 0)
004c0007                  x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
004c0007              
004c000d              int32_t ecx_21 = var_a4;
004c0011              long double x87_r6_2 = ((long double)var_a4);
004c0011              
004c0017              if (ecx_21 < 0)
004c0019                  x87_r6_2 = (x87_r6_2 + ((long double)4.2949673e+09f));
004c0019              
004c0021              int32_t var_c0_8 = ecx_21;
004c002d              UIElement::SetAttribute_Float(this->m_pStaminaMeter, 0x69, ((float)(x87_r7_3 / x87_r6_2)));
004c002d              
004c0038              if (this->m_pStaminaLabel != 0)
004c0038              {
004c0042                  StringInfo::StringInfo(&var_98);
004c0057                  StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000001);
004c0066                  int32_t var_c0_10 = 0;
004c006d                  StringInfo::AddVariable_Int(&var_98, 0, var_ac);
004c007b                  int32_t var_c0_11 = 0;
004c0082                  StringInfo::AddVariable_Int(&var_98, 0, var_a4);
004c0091                  class PStringBase<unsigned short>* eax_11 = StringInfo::GetString(&var_98, &__return, 0);
004c009d                  UIElement_Text::SetText(this->m_pStaminaLabel, eax_11);
004c00a6                  void* ebx_5 = ((char*)__return - 0x14);
004c00a6                  
004c00b9                  if ((InterlockedDecrement(((char*)ebx_5 + 4)) == 0 && ebx_5 != 0))
004c00c1                      **(uint32_t**)ebx_5(1);
004c00c1                  
004c00c7                  StringInfo::~StringInfo(&var_98);
004c0038              }
004bffcf          }
004bffcf          
004c00d2          if (this->m_pManaMeter != 0)
004c00d2          {
004c00e2              var_ac = 0;
004c00e6              var_a4 = 0;
004c00ea              CACQualities::InqAttribute2nd(__return_3, 6, &var_ac, 0);
004c00f9              CACQualities::InqAttribute2nd(__return_3, 5, &var_a4, 0);
004c00fe              long double x87_r7_5 = ((long double)var_ac);
004c00fe              
004c0108              if (var_ac < 0)
004c010a                  x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
004c010a              
004c0110              int32_t ecx_33 = var_a4;
004c0114              long double x87_r6_3 = ((long double)var_a4);
004c0114              
004c011a              if (ecx_33 < 0)
004c011c                  x87_r6_3 = (x87_r6_3 + ((long double)4.2949673e+09f));
004c011c              
004c0124              int32_t var_c0_14 = ecx_33;
004c0130              UIElement::SetAttribute_Float(this->m_pManaMeter, 0x69, ((float)(x87_r7_5 / x87_r6_3)));
004c0130              
004c013b              if (this->m_pManaLabel != 0)
004c013b              {
004c0145                  StringInfo::StringInfo(&var_98);
004c015a                  StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000001);
004c0169                  int32_t var_c0_16 = 0;
004c0170                  StringInfo::AddVariable_Int(&var_98, 0, var_ac);
004c017e                  int32_t var_c0_17 = 0;
004c0185                  StringInfo::AddVariable_Int(&var_98, 0, var_a4);
004c0194                  class PStringBase<unsigned short>* eax_16 = StringInfo::GetString(&var_98, &__return, 0);
004c01a0                  UIElement_Text::SetText(this->m_pManaLabel, eax_16);
004c01a9                  void* esi_2 = ((char*)__return - 0x14);
004c01a9                  
004c01bc                  if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004c01c4                      **(uint32_t**)esi_2(1);
004c01c4                  
004c01ca                  StringInfo::~StringInfo(&var_98);
004c013b              }
004c00d2          }
004c00d2          
004c01d4          *(uint32_t*)(*(uint32_t*)__return_3 + 0x14)();
004c01d4          struct Turbine_GUID* __saved_edi;
004c01d4          esp = &__saved_edi;
004bfea7      }
004bfea7      
004c01d7      *(uint32_t*)esp;
004c01d7      esp[1];
004c01d7      esp[2];
004c01d7      esp[3];
004bfe30  }

004c01e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c01f0  void __fastcall gmVitalsUI::OnQualityRemoved(class gmVitalsUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004c01f0  {
004c01f6      gmVitalsUI::Update(((char*)this - 0x5fc));
004c01f0  }

004c01fe                                                                                            90 90                                ..

004c0200  void __fastcall gmVitalsUI::RecvNotice_PlayerDescReceived(class gmVitalsUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004c0200  {
004c0206      gmVitalsUI::Update(((char*)this - 0x5f8));
004c0200  }

004c020e                                            90 90                                                                ..

004c0210  uint32_t __fastcall VendorSubUI::GetShopVendorID(class VendorSubUI* this)

004c0210  {
004c0219      return this->m_parent->shopVendorID;
004c0210  }

004c021a                                                                                90 90 90 90 90 90                            ......

004c0220  void __stdcall gmVendorUI::SendShopEvent(class gmVendorUI* this @ ecx, uint32_t arg2, class PackableList<ItemProfile>* arg3, class IDClass<_tagDataID,32,0> arg4, enum ShopEvent arg5)

004c0220  {
004c0228      if (arg5 == SE_BUY)
004c0228      {
004c0250          CM_Vendor::Event_Buy(arg2, arg3, arg4);
004c025b          ACCWeenieObject::RecordRequest(arg2, IR_SHOP_EVENT);
004c026a          ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
004c0228      }
004c0228      else if (arg5 == 1)
004c022b      {
004c0237          CM_Vendor::Event_Sell(arg2, arg3);
004c025b          ACCWeenieObject::RecordRequest(arg2, IR_SHOP_EVENT);
004c026a          ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
004c022b      }
004c0220  }

004c0273                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c0280  void __thiscall gmVendorUI::RecvNotice_SetSelectedItem(class gmVendorUI* this, uint32_t arg2, uint32_t arg3)

004c0280  {
004c028d      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xc]->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.vtable(arg2, arg3);
004c0297      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe]->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.vtable(arg2, arg3);
004c02a1      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xd]->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.vtable(arg2, arg3);
004c0280  }

004c02b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004c02c0  void __thiscall gmVendorUI::RecvNotice_CloseVendor(class gmVendorUI* this, uint8_t arg2)

004c02c0  {
004c02c6      if (arg2 != 0)
004c02df          return;
004c02df      
004c02d4      arg2 = 0;
004c02dc      /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18) */
004c02c0  }

004c02e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c02f0  void __thiscall gmVendorUI::OnObjectRangeExit(class gmVendorUI* this, uint32_t arg2)

004c02f0  {
004c02f7      if (arg2 != this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable)
004c0310          return;
004c0310      
004c0305      arg2 = 0;
004c030d      /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x600) + 0x18) */
004c02f0  }

004c0313                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c0320  void __stdcall gmVendorUI::VendorItemSetSellState(class gmVendorUI* this @ ecx, uint32_t arg2, int32_t arg3)

004c0320  {
004c0325      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004c0325      
004c032f      if (eax != 0)
004c0338          ACCWeenieObject::SetSellState(eax, arg3);
004c0320  }


004c0340  void __stdcall gmVendorUI::DeleteItem(class gmVendorUI* this @ ecx, class UIElement_ItemList* arg2, uint32_t arg3, int32_t arg4)

004c0340  {
004c0347      if ((arg2 != 0 && UIElement_ItemList::ItemList_GetItem(arg2, arg3) != 0))
004c0347      {
004c035b          class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg3);
004c035b          
004c0365          if (eax_2 != 0)
004c0365          {
004c0371              if (arg2->m_desc.m_elementID == 0x100000ce)
004c0377                  ACCWeenieObject::SetSellState(eax_2, 0);
004c0377              
004c037f              UIElement_ItemList::ItemList_DeleteItem(arg2, arg3);
004c0365          }
004c0347      }
004c0340  }

004c0389                             90 90 90 90 90 90 90                                                           .......

004c0390  void __thiscall gmVendorUI::OpenTab(class gmVendorUI* this, uint32_t arg2)

004c0390  {
004c0392      class UIElement_Panel* m_vendorPanel = this->m_vendorPanel;
004c0392      
004c039a      if (m_vendorPanel == 0)
004c03ab          return;
004c03ab      
004c039c      this->m_last_sale = 0;
004c03a6      /* tailcall */
004c03a6      return UIElement_Panel::OpenTab(m_vendorPanel, arg2);
004c0390  }

004c03ae                                            90 90                                                                ..

004c03b0  void __fastcall gmVendorUI::UpdateDragOver(class gmVendorUI* this)

004c03b0  {
004c03dc      if ((UIElement::IsVisible(this) != 0 && (this->m_vendorPanel->m_OpenPageToken != 0x100000cd && UIElementManager::s_pInstance->m_dragElement != 0)))
004c03dc      {
004c03e8          int32_t eax_3 = ICIDM::s_cidm->vtable->GetMouseX();
004c03f5          int32_t eax_5 = ICIDM::s_cidm->vtable->GetMouseY();
004c03f5          
004c0403          if ((((eax_3 > UIRegion::GetScreenX0(this) && eax_3 < UIRegion::GetScreenX1(this)) && eax_5 > UIRegion::GetScreenY0(this)) && eax_5 < UIRegion::GetScreenY1(this)))
004c042d              gmVendorUI::OpenTab(this, 0x100000bb);
004c03dc      }
004c03b0  }

004c0436                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c0440  void __fastcall VendorBuyUI::CloseVendor(class VendorBuyUI* this)

004c0440  {
004c0443      /* tailcall */
004c0443      return UIElement_ItemList::ItemList_Flush(this->m_buyShopList);
004c0440  }

004c0448                          90 90 90 90 90 90 90 90                                                          ........

004c0450  void __fastcall VendorSellUI::CloseVendor(class VendorSellUI* this)

004c0450  {
004c0453      /* tailcall */
004c0453      return UIElement_ItemList::ItemList_Flush(this->m_sellShopList);
004c0450  }

004c0458                                                                          90 90 90 90 90 90 90 90                          ........

004c0460  void* __thiscall PackableHashIterator<IDClass<_tagDataID,32,0>,long>::`scalar deleting destructor'(class PackableHashIterator<IDClass<_tagDataID,32,0>,long>* this, uint32_t arg2)

004c0460  {
004c0468      this->vtable = 0x7b4fbc;
004c0468      
004c046e      if ((arg2 & 1) != 0)
004c0471          operator delete(this);
004c0471      
004c047c      return this;
004c0460  }

004c047f                                                                                               90                                 .

004c0480  void __thiscall gmVendorUI::ListenToGlobalMessage(class gmVendorUI* this, uint32_t arg2, int32_t arg3)

004c0480  {
004c0485      if (arg2 == 3)
004c0487          gmVendorUI::UpdateDragOver(this);
004c0480  }

004c048f                                               90                                                                 .

004c0490  void __stdcall VendorSubUI::SetObjectStackSize(class VendorSubUI* this @ ecx, class ACCWeenieObject* arg2, int32_t arg3)

004c0490  {
004c0494      uint32_t _stackSize = arg2->pwd._stackSize;
004c04a3      uint32_t _stackSize_1 = _stackSize;
004c04a3      
004c04a5      if (_stackSize == 0)
004c04a7          _stackSize_1 = 1;
004c04a7      
004c04ba      arg2->pwd._value = ((COMBINE(0, arg2->pwd._value) / _stackSize_1) * arg3);
004c04c0      arg2->pwd._stackSize = arg3;
004c0490  }

004c04c9                             90 90 90 90 90 90 90                                                           .......

004c04d0  void __thiscall VendorItemsUI::VendorItemsUI(class VendorItemsUI* this, class gmVendorUI* arg2)

004c04d0  {
004c04df      this->m_parent = arg2;
004c04e2      this->vtable = 0x7b4fc0;
004c04e8      __builtin_memset(&this->m_shopList, 0, 0x1c);
004c04fd      class UIElement* eax = UIElement::GetChildRecursive(arg2, 0x100000bd);
004c0504      class UIElement_ItemList* eax_1;
004c0504      
004c0504      if (eax == 0)
004c0517          eax_1 = nullptr;
004c0504      else
004c050f          eax_1 = eax->vtable->DynamicCast(0x10000031);
004c050f      
004c0519      class gmVendorUI* m_parent = this->m_parent;
004c0521      this->m_shopList = eax_1;
004c0524      class UIElement* eax_2 = UIElement::GetChildRecursive(m_parent, 0x100000bf);
004c052b      class UIElement_Menu* eax_3;
004c052b      
004c052b      if (eax_2 == 0)
004c053b          eax_3 = nullptr;
004c052b      else
004c0533          eax_3 = eax_2->vtable->DynamicCast(6);
004c0533      
004c053d      class gmVendorUI* m_parent_1 = this->m_parent;
004c0545      this->m_itemTypeMenu = eax_3;
004c0548      class UIElement* eax_4 = UIElement::GetChildRecursive(m_parent_1, 0x100000c0);
004c054d      class UIElement* m_parent_2 = this->m_parent;
004c0555      this->m_itemNameText = eax_4;
004c0558      class UIElement_Text* eax_5 = UIElement::GetChildRecursive(m_parent_2, 0x100000c1);
004c055d      class UIElement* m_parent_3 = this->m_parent;
004c0565      this->m_itemCostText = eax_5;
004c0568      class UIElement* eax_6 = UIElement::GetChildRecursive(m_parent_3, 0x100000c2);
004c056d      class UIElement* m_parent_4 = this->m_parent;
004c0575      this->m_buyButton = eax_6;
004c057d      this->m_addButton = UIElement::GetChildRecursive(m_parent_4, 0x100000c3);
004c04d0  }

004c0587                       90 90 90 90 90 90 90 90 90                                                         .........

004c0590  void __fastcall VendorItemsUI::CloseVendor(class VendorItemsUI* this)

004c0590  {
004c0596      UIElement_ItemList::ItemList_Flush(this->m_shopList);
004c059b      class UIElement_ItemList* m_shopList = this->m_shopList;
004c059b      
004c05a6      if (m_shopList->m_listItems.m_num != 0)
004c05aa          UIElement_ListBox::ScrollToShow(m_shopList, 0);
004c05aa      
004c05b3      /* tailcall */
004c05b3      return UIElement_Menu::Flush(this->m_itemTypeMenu);
004c0590  }

004c05b8                                                                          90 90 90 90 90 90 90 90                          ........

004c05c0  void __thiscall VendorItemsUI::AddTypeFilter(class VendorItemsUI* this, class StringInfo const* arg2, uint32_t arg3)

004c05c0  {
004c05c6      class UIElement_Menu* m_itemTypeMenu = this->m_itemTypeMenu;
004c05c6      
004c05cb      if (m_itemTypeMenu != 0)
004c05cb      {
004c05db          class UIElement_Text* eax_2 = UIElement_Menu::InsertTextItem(m_itemTypeMenu, arg2, this->m_numTypeFilters);
004c05db          
004c05e4          if (eax_2 != 0)
004c05e4          {
004c05f3              int32_t* var_8 = nullptr;
004c05fb              int32_t* var_4_1 = nullptr;
004c0603              BaseProperty::SetPropertyName(&var_8, 0x10000039);
004c0603              
004c060e              if (var_4_1 != 0)
004c060e              {
004c0614                  BaseProperty::CheckCopyOnWrite(&var_8);
004c0624                  *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(arg3);
004c060e              }
004c060e              
004c0627              eax_2->vtable->SetProperty(&var_8);
004c0639              int32_t* eax_6 = var_8;
004c0640              this->m_numTypeFilters += 1;
004c0640              
004c0643              if (eax_6 != 0)
004c0643              {
004c064d                  int32_t esi_2 = (eax_6[1] - 1);
004c064a                  eax_6[1] = esi_2;
004c064a                  
004c0654                  if (esi_2 == 0)
004c065a                      **(uint32_t**)eax_6(1);
004c065a                  
004c065c                  var_8 = nullptr;
004c0643              }
004c0643              
004c066a              if (var_4_1 != 0)
004c066a              {
004c0674                  int32_t esi_4 = (var_4_1[1] - 1);
004c0671                  var_4_1[1] = esi_4;
004c0671                  
004c067b                  if (esi_4 == 0)
004c0681                      **(uint32_t**)var_4_1(1);
004c066a              }
004c05e4          }
004c05cb      }
004c05c0  }

004c068b                                   90 90 90 90 90                                                             .....

004c0690  void __thiscall VendorBuyUI::VendorBuyUI(class VendorBuyUI* this, class gmVendorUI* arg2)

004c0690  {
004c069f      this->m_parent = arg2;
004c06a2      this->vtable = 0x7b4fcc;
004c06a8      __builtin_memset(&this->m_buyShopList, 0, 0x20);
004c06c0      class UIElement* eax = UIElement::GetChildRecursive(arg2, 0x100000c5);
004c06c7      class UIElement_ItemList* eax_1;
004c06c7      
004c06c7      if (eax == 0)
004c06da          eax_1 = nullptr;
004c06c7      else
004c06d2          eax_1 = eax->vtable->DynamicCast(0x10000031);
004c06d2      
004c06dc      class gmVendorUI* m_parent = this->m_parent;
004c06e4      this->m_buyShopList = eax_1;
004c06e7      class UIElement* eax_2 = UIElement::GetChildRecursive(m_parent, 0x100000c7);
004c06ec      class gmVendorUI* m_parent_1 = this->m_parent;
004c06f4      this->m_buyListText = eax_2;
004c06f7      class UIElement* eax_3 = UIElement::GetChildRecursive(m_parent_1, 0x100000c8);
004c06fc      class gmVendorUI* m_parent_2 = this->m_parent;
004c0704      this->m_buyPurseText = eax_3;
004c0707      class UIElement* eax_4 = UIElement::GetChildRecursive(m_parent_2, 0x100000c9);
004c070c      class UIElement* m_parent_3 = this->m_parent;
004c0714      this->m_buyItemButton = eax_4;
004c0717      class UIElement* eax_5 = UIElement::GetChildRecursive(m_parent_3, 0x100000ca);
004c071c      class UIElement* m_parent_4 = this->m_parent;
004c0724      this->m_buyAllButton = eax_5;
004c0727      class UIElement* eax_6 = UIElement::GetChildRecursive(m_parent_4, 0x100000cb);
004c072c      class UIElement* m_parent_5 = this->m_parent;
004c0734      this->m_buyClearItemButton = eax_6;
004c073c      this->m_buyClearListButton = UIElement::GetChildRecursive(m_parent_5, 0x100000cc);
004c0690  }

004c0746                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c0750  void __thiscall VendorSellUI::VendorSellUI(class VendorSellUI* this, class gmVendorUI* arg2)

004c0750  {
004c075b      this->m_parent = arg2;
004c075e      this->vtable = &ItemListDragHandler::`vftable';
004c0768      this->vtable = 0x7b4f9c;
004c0765      this->vtable = &VendorSellUI::`vftable';
004c0774      __builtin_memset(&this->m_sellShopList, 0, 0x24);
004c0795      this->m_splitItemClassID.id = INVALID_DID.id;
004c0798      class gmVendorUI* m_parent = this->m_parent;
004c07a0      this->m_splitItemStackSize = 0xffff;
004c07a6      class UIElement* eax = UIElement::GetChildRecursive(m_parent, 0x100000ce);
004c07ad      class UIElement_ItemList* eax_1;
004c07ad      
004c07ad      if (eax == 0)
004c07c0          eax_1 = nullptr;
004c07ad      else
004c07b8          eax_1 = eax->vtable->DynamicCast(0x10000031);
004c07b8      
004c07c4      this->m_sellShopList = eax_1;
004c07c4      
004c07c7      if (eax_1 != 0)
004c07cc          UIElement_ItemList::RegisterItemListDragHandler(eax_1, &this->vtable);
004c07cc      
004c07d9      class UIElement* eax_2 = UIElement::GetChildRecursive(this->m_parent, 0x100000d0);
004c07de      class gmVendorUI* m_parent_1 = this->m_parent;
004c07e6      this->m_sellListText = eax_2;
004c07e9      class UIElement* eax_3 = UIElement::GetChildRecursive(m_parent_1, 0x100000d1);
004c07ee      class gmVendorUI* m_parent_2 = this->m_parent;
004c07f6      this->m_sellPurseText = eax_3;
004c07f9      class UIElement* eax_4 = UIElement::GetChildRecursive(m_parent_2, 0x100000d2);
004c07fe      class gmVendorUI* m_parent_3 = this->m_parent;
004c0806      this->m_sellItemButton = eax_4;
004c0809      class UIElement* eax_5 = UIElement::GetChildRecursive(m_parent_3, 0x100000d3);
004c080e      class UIElement* m_parent_4 = this->m_parent;
004c0816      this->m_sellAllButton = eax_5;
004c0819      class UIElement* eax_6 = UIElement::GetChildRecursive(m_parent_4, 0x100000d4);
004c081e      class UIElement* m_parent_5 = this->m_parent;
004c0826      this->m_sellClearItemButton = eax_6;
004c082e      this->m_sellClearListButton = UIElement::GetChildRecursive(m_parent_5, 0x100000d5);
004c0750  }

004c0839                                                                             90 90 90 90 90 90 90                           .......

004c0840  void __thiscall PackableList<ItemProfile>::InsertHead(class PackableList<ItemProfile>* this, class ItemProfile const* arg2)

004c0840  {
004c084b      void* edi = operator new(0x18);
004c084b      
004c0852      if (edi == 0)
004c0870          edi = nullptr;
004c0852      else
004c0852      {
004c085b          ItemProfile::ItemProfile(edi, arg2);
004c0860          *(uint32_t*)((char*)edi + 0x10) = 0;
004c0867          *(uint32_t*)((char*)edi + 0x14) = 0;
004c0852      }
004c0852      
004c0872      class PackableLLNode<ItemProfile>* head = this->head;
004c0872      
004c0877      if (head == 0)
004c0877      {
004c0879          uint32_t curNum = this->curNum;
004c087c          this->tail = edi;
004c087f          this->head = edi;
004c0884          this->curNum = (curNum + 1);
004c0888          return;
004c0877      }
004c0877      
004c088b      head->prev = edi;
004c088e      *(uint32_t*)((char*)edi + 0x10) = head;
004c0891      uint32_t curNum_1 = this->curNum;
004c0894      this->head = edi;
004c0899      this->curNum = (curNum_1 + 1);
004c0840  }


004c08a0  uint32_t __thiscall PackableList<ItemProfile>::InsertTail(class PackableList<ItemProfile>* this, class ItemProfile const* arg2)

004c08a0  {
004c08ab      void* edi = operator new(0x18);
004c08ab      
004c08b2      if (edi == 0)
004c08d0          edi = nullptr;
004c08b2      else
004c08b2      {
004c08bb          ItemProfile::ItemProfile(edi, arg2);
004c08c0          *(uint32_t*)((char*)edi + 0x10) = 0;
004c08c7          *(uint32_t*)((char*)edi + 0x14) = 0;
004c08b2      }
004c08b2      
004c08d7      if (this->head == 0)
004c08d7      {
004c08d9          uint32_t curNum = this->curNum;
004c08dc          this->head = edi;
004c08df          this->tail = edi;
004c08e4          this->curNum = (curNum + 1);
004c08e8          return (curNum + 1);
004c08d7      }
004c08d7      
004c08eb      class PackableLLNode<ItemProfile>* tail = this->tail;
004c08ee      tail->next = edi;
004c08f1      *(uint32_t*)((char*)edi + 0x14) = tail;
004c08f4      uint32_t curNum_1 = this->curNum;
004c08f7      this->tail = edi;
004c08fc      this->curNum = (curNum_1 + 1);
004c0900      return (curNum_1 + 1);
004c08a0  }

004c0903           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004c0910  uint32_t __thiscall PackableList<ItemProfile>::Pack(class PackableList<ItemProfile>* this, void** arg2, uint32_t arg3)

004c0910  {
004c0915      uint32_t result = PackableList<ItemProfile>::pack_size(this);
004c0915      
004c0922      if (arg3 >= result)
004c0922      {
004c092c          if (arg3 >= 4)
004c092c          {
004c0933              **(uint32_t**)arg2 = this->curNum;
004c0935              *(uint32_t*)arg2 += 4;
004c092c          }
004c092c          
004c093d          for (class PackableLLNode<ItemProfile>* i = this->head; i != 0; i = i->next)
004c0940              i->data.vtable->Pack(arg2, arg3);
004c0922      }
004c0922      
004c0956      return result;
004c0910  }

004c0959                                                                             90 90 90 90 90 90 90                           .......

004c0960  uint32_t __fastcall PackableList<ItemProfile>::pack_size(class PackableList<ItemProfile>* this)

004c0960  {
004c0960      class PackableList<ItemProfile>* this_1 = this;
004c0962      class PackableLLNode<ItemProfile>* i = this->head;
004c0968      int32_t result = 4;
004c096d      this_1 = nullptr;
004c096d      
004c0975      while (i != 0)
004c0975      {
004c0982          int32_t eax_2 = i->data.vtable->Pack(&this_1, 0);
004c0985          i = i->next;
004c0988          result += eax_2;
004c0975      }
004c0975      
004c0993      return result;
004c0960  }

004c0994                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c09a0  void __fastcall gmVendorUI::PostInit(class gmVendorUI* this)

004c09a0  {
004c09a3      UIElement::PostInit(this);
004c09aa      void* eax = operator new(0x24);
004c09b4      class VendorItemsUI* eax_1;
004c09b4      
004c09b4      if (eax == 0)
004c09c0          eax_1 = nullptr;
004c09b4      else
004c09b9          eax_1 = VendorItemsUI::VendorItemsUI(eax, this);
004c09b9      
004c09c4      this->m_itemsUI = eax_1;
004c09ca      void* eax_2 = operator new(0x28);
004c09d4      class VendorBuyUI* eax_3;
004c09d4      
004c09d4      if (eax_2 == 0)
004c09e0          eax_3 = nullptr;
004c09d4      else
004c09d9          eax_3 = VendorBuyUI::VendorBuyUI(eax_2, this);
004c09d9      
004c09e4      this->m_buyUI = eax_3;
004c09ea      void* eax_4 = operator new(0x38);
004c09f4      class VendorSellUI* eax_5;
004c09f4      
004c09f4      if (eax_4 == 0)
004c0a00          eax_5 = nullptr;
004c09f4      else
004c09f9          eax_5 = VendorSellUI::VendorSellUI(eax_4, this);
004c09f9      
004c0a03      this->m_sellUI = eax_5;
004c0a09      class GlobalEventHandler* eax_6 = GlobalEventHandler::GetGlobalEventHandler();
004c0a09      
004c0a12      if (eax_6 != 0)
004c0a12      {
004c0a14          eax_6->vtable->RegisterNoticeHandler(0x4dd20e, &this->vtable);
004c0a28          eax_6->vtable->RegisterNoticeHandler(0x4dd218, &this->vtable);
004c0a35          eax_6->vtable->RegisterNoticeHandler(0x186aa, &this->vtable);
004c0a42          eax_6->vtable->RegisterNoticeHandler(0x186ab, &this->vtable);
004c0a4f          eax_6->vtable->RegisterNoticeHandler(0x4dd256, &this->vtable);
004c0a5c          eax_6->vtable->RegisterNoticeHandler(0x186a8, &this->vtable);
004c0a69          eax_6->vtable->RegisterNoticeHandler(0x4dd253, &this->vtable);
004c0a76          eax_6->vtable->RegisterNoticeHandler(0x4dd259, &this->vtable);
004c0a12      }
004c0a12      
004c0a88      UIListener::RegisterForGlobalMessage(this, 3);
004c0a8d      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x14, &this->vtable);
004c0aa3      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 5, &this->vtable);
004c0aba      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x100000b8);
004c0aba      
004c0ac2      if (eax_12 != 0)
004c0ac2      {
004c0ad0          this->m_vendorPanel = eax_12->vtable->DynamicCast(8);
004c0ad7          return;
004c0ac2      }
004c0ac2      
004c0ada      this->m_vendorPanel = nullptr;
004c09a0  }

004c0ae2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c0af0  class VendorProfile& __thiscall VendorProfile::operator=(class VendorProfile* this, class VendorProfile const& arg2)

004c0af0  {
004c0afc      this->item_types = arg2->item_types;
004c0b02      this->min_value = arg2->min_value;
004c0b08      this->max_value = arg2->max_value;
004c0b0e      this->magic = arg2->magic;
004c0b14      this->buy_price = arg2->buy_price;
004c0b1a      this->sell_price = arg2->sell_price;
004c0b20      this->trade_id.id = arg2->trade_id.id;
004c0b26      this->trade_num = arg2->trade_num;
004c0b29      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->trade_name.m_buffer;
004c0b29      
004c0b2f      if (m_buffer != arg2->trade_name.m_buffer)
004c0b2f      {
004c0b41          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004c0b43              m_buffer->vtable->__vecDelDtor(1);
004c0b43          
004c0b4b          class AC1Legacy::PStringBase<char> m_buffer_1 = arg2->trade_name.m_buffer;
004c0b4e          this->trade_name.m_buffer = m_buffer_1;
004c0b55          InterlockedIncrement((m_buffer_1 + 4));
004c0b2f      }
004c0b2f      
004c0b60      return this;
004c0af0  }

004c0b63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004c0b70  uint8_t __thiscall gmVendorUI::ShopHasItem(class gmVendorUI* this, class IDClass<_tagDataID,32,0> arg2, int32_t* arg3, uint32_t* arg4)

004c0b70  {
004c0b82      class PackableList<ItemProfile>* eax;
004c0b82      
004c0b82      for (class PackableLLNode<ItemProfile>* i = this->shopItemProfileList->head; i != 0; i = i->next)
004c0b82      {
004c0b88          eax = ClientObjMaintSystem::GetWeenieObject(i->data.iid);
004c0b88          
004c0b9a          if ((eax != 0 && *(int32_t*)((char*)eax + 0xa4) == arg2))
004c0b9a          {
004c0ba1              int32_t amount = i->data.amount;
004c0ba1              
004c0baf              if ((amount != 0xffffffff && amount < *(uint32_t*)arg3))
004c0bb1                  *(uint32_t*)arg3 = amount;
004c0bb1              
004c0bbb              *(uint32_t*)arg4 = i->data.iid;
004c0bbd              uint32_t* eax_1;
004c0bbd              eax_1 = 1;
004c0bc0              return 1;
004c0b9a          }
004c0b82      }
004c0b82      
004c0bc4      eax = 0;
004c0bc7      return 0;
004c0b70  }

004c0bca                                90 90 90 90 90 90                                                            ......

004c0bd0  void __stdcall gmVendorUI::FlushSellListSellState(class gmVendorUI* this @ ecx, class PackableList<ItemProfile>* arg2)

004c0bd0  {
004c0bda      for (class PackableLLNode<ItemProfile>* i = arg2->head; i != 0; i = i->next)
004c0bda      {
004c0be4          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(i->data.iid);
004c0be4          
004c0bee          if (eax_1 != 0)
004c0bf4              ACCWeenieObject::SetSellState(eax_1, 0);
004c0bda      }
004c0bd0  }

004c0c04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004c0c10  void __stdcall gmVendorUI::InqListSlotCount(class gmVendorUI* this @ ecx, class PackableList<ItemProfile>* arg2, uint32_t* arg3, uint32_t* arg4)

004c0c10  {
004c0c1f      *(uint32_t*)arg3 = 0;
004c0c25      *(uint32_t*)arg4 = 0;
004c0c25      
004c0c30      for (class PackableLLNode<ItemProfile>* i = arg2->head; i != 0; i = i->next)
004c0c30      {
004c0c44          class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(i->data.iid);
004c0c44          
004c0c4e          if (eax != 0)
004c0c4e          {
004c0c57              uint32_t _bitfield = eax->pwd._bitfield;
004c0c57              
004c0c5d              if (eax->pwd._maxStackSize <= 1)
004c0c5d              {
004c0c95                  if (((("activation type (%s) with '%s' b…" & _bitfield) != 0 || eax->pwd._itemsCapacity != 0) || eax->pwd._containersCapacity != 0))
004c0c9a                      *(uint32_t*)arg4 += i->data.amount;
004c0c95                  else
004c0ca1                      *(uint32_t*)arg3 += i->data.amount;
004c0c5d              }
004c0c5d              else if (((("activation type (%s) with '%s' b…" & _bitfield) != 0 || eax->pwd._itemsCapacity != 0) || eax->pwd._containersCapacity != 0))
004c0c77                  *(uint32_t*)arg4 += 1;
004c0c75              else
004c0c7b                  *(uint32_t*)arg3 += 1;
004c0c4e          }
004c0c30      }
004c0c10  }

004c0c3a                                                                                8d 9b 00 00 00 00                            ......
004c0cb1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004c0cc0  void __fastcall VendorItemsUI::UpdateQuantityOverlay(class VendorItemsUI* this)

004c0cc0  {
004c0cc5      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004c0cc5      
004c0ccf      if (ACCWeenieObject::selectedID_1 != 0)
004c0ccf      {
004c0cd5          class UIElement_ItemList* m_shopList = this->m_shopList;
004c0cdf          uint32_t esi_1 = 0;
004c0cdf          
004c0ce4          if (m_shopList->m_listItems.m_num > 0)
004c0ce4          {
004c0cf1              class UIElement_UIItem* eax_3;
004c0cf1              
004c0cf1              while (true)
004c0cf1              {
004c0cf1                  class UIElement* eax_2 = UIElement_ListBox::GetItem(m_shopList, esi_1);
004c0cf1                  
004c0cf8                  if (eax_2 != 0)
004c0cf8                  {
004c0d03                      eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c0d03                      
004c0d15                      if ((eax_3 != 0 && eax_3->itemID == ACCWeenieObject::selectedID_1))
004c0d15                          break;
004c0cf8                  }
004c0cf8                  
004c0d17                  m_shopList = this->m_shopList;
004c0d20                  esi_1 += 1;
004c0d20                  
004c0d23                  if (esi_1 >= m_shopList->m_listItems.m_num)
004c0d2c                      return;
004c0cf1              }
004c0cf1              
004c0d31              void var_10;
004c0d31              ItemProfile::ItemProfile(&var_10);
004c0d31              
004c0d44              for (class PackableLLNode<ItemProfile>* i = this->m_parent->shopItemProfileList->head; i != 0; i = i->next)
004c0d44              {
004c0d49                  if (i->data.iid == ACCWeenieObject::selectedID_1)
004c0d49                  {
004c0d59                      ItemProfile::operator=(&var_10, i);
004c0d59                      break;
004c0d49                  }
004c0d44              }
004c0d44              
004c0d66              int32_t var_24_3;
004c0d66              int32_t var_c;
004c0d66              
004c0d66              if (var_c <= 0)
004c0d6b                  var_24_3 = 0xffffffff;
004c0d66              else
004c0d68                  var_24_3 = var_c;
004c0d68              
004c0d6d              UIElement_UIItem::SetQuantity(eax_3, var_24_3);
004c0d74              UIElement_UIItem::UIItem_Update(eax_3);
004c0d7d              ItemProfile::~ItemProfile(&var_10);
004c0ce4          }
004c0ccf      }
004c0cc0  }

004c0d8a                                90 90 90 90 90 90                                                            ......

004c0d90  uint8_t __stdcall VendorItemsUI::ListContainsType(class VendorItemsUI* this @ ecx, class PackableList<ItemProfile>* arg2, int32_t arg3)

004c0d90  {
004c0d99      void var_10;
004c0d99      ItemProfile::ItemProfile(&var_10);
004c0d99      
004c0da7      for (class PackableLLNode<ItemProfile>* i = arg2->head; i != 0; i = i->next)
004c0da7      {
004c0db5          ItemProfile::operator=(&var_10, i);
004c0dbf          uint32_t var_8;
004c0dbf          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(var_8);
004c0dbf          
004c0dc9          if ((eax_1 != 0 && (arg3 & eax_1->vtable->InqType()) != 0))
004c0dc9          {
004c0df8              ItemProfile::~ItemProfile(&var_10);
004c0dfe              int32_t eax_4;
004c0dfe              eax_4 = 1;
004c0e04              return 1;
004c0dc9          }
004c0dc9          
004c0dd8          if (i == 0)
004c0dd8              break;
004c0da7      }
004c0da7      
004c0de5      ItemProfile::~ItemProfile(&var_10);
004c0deb      int32_t eax_3;
004c0deb      eax_3 = 0;
004c0df1      return 0;
004c0d90  }

004c0e07                       90 90 90 90 90 90 90 90 90                                                         .........

004c0e10  void __fastcall VendorBuyUI::UpdateBuyUI(class VendorBuyUI* this)

004c0e10  {
004c0e17      int32_t eax = UIElement_ItemList::GetNumUIItems(this->m_buyShopList);
004c0e22      struct UIElement::VTable* vtable = this->m_buyClearListButton->vtable;
004c0e24      int32_t var_c;
004c0e24      
004c0e24      if (eax < 1)
004c0e24      {
004c0e34          vtable->SetState(0xd);
004c0e3a          var_c = 0xd;
004c0e24      }
004c0e24      else
004c0e24      {
004c0e28          vtable->SetState(1);
004c0e2e          var_c = 1;
004c0e24      }
004c0e24      
004c0e3c      this->m_buyAllButton->vtable->SetState(var_c);
004c0e4a      class PackableLLNode<ItemProfile>* eax_2 = this->m_parent->m_buyList.head;
004c0e4a      
004c0e52      if (eax_2 == 0)
004c0e52      {
004c0e6c      label_4c0e6c:
004c0e6c          eax_2 = 0;
004c0e52      }
004c0e52      else
004c0e52      {
004c0e63          while (eax_2->data.iid != ACCWeenieObject::selectedID)
004c0e63          {
004c0e65              eax_2 = eax_2->next;
004c0e65              
004c0e6a              if (eax_2 == 0)
004c0e6a                  goto label_4c0e6c;
004c0e63          }
004c0e63          
004c0e95          eax_2 = 1;
004c0e52      }
004c0e52      
004c0e73      char temp0 = eax_2;
004c0e73      eax_2 = -(eax_2);
004c0e6e      this->m_buyClearItemButton->vtable->SetState(((((char*)eax_2 - eax_2) & 0xfffffff4) + 0xd));
004c0e86      this->m_buyItemButton->vtable->SetState(((((char*)eax_2 - eax_2) & 0xfffffff4) + 0xd));
004c0e10  }

004c0e99                                                                             90 90 90 90 90 90 90                           .......

004c0ea0  void __thiscall VendorBuyUI::HandleSetSelectedItem(class VendorBuyUI* this, uint32_t arg2, uint32_t arg3)

004c0ea0  {
004c0ea8      if (arg2 != arg3)
004c0eaa          VendorBuyUI::UpdateBuyUI(this);
004c0ea0  }

004c0eb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004c0ec0  void __fastcall VendorSellUI::UpdateSellUI(class VendorSellUI* this)

004c0ec0  {
004c0ec7      int32_t eax = UIElement_ItemList::GetNumUIItems(this->m_sellShopList);
004c0ed2      struct UIElement::VTable* vtable = this->m_sellClearListButton->vtable;
004c0ed4      int32_t var_c;
004c0ed4      
004c0ed4      if (eax < 1)
004c0ed4      {
004c0ee4          vtable->SetState(0xd);
004c0eea          var_c = 0xd;
004c0ed4      }
004c0ed4      else
004c0ed4      {
004c0ed8          vtable->SetState(1);
004c0ede          var_c = 1;
004c0ed4      }
004c0ed4      
004c0eec      this->m_sellAllButton->vtable->SetState(var_c);
004c0efa      class PackableLLNode<ItemProfile>* eax_2 = this->m_parent->m_sellList.head;
004c0efa      
004c0f02      if (eax_2 == 0)
004c0f02      {
004c0f1c      label_4c0f1c:
004c0f1c          eax_2 = 0;
004c0f02      }
004c0f02      else
004c0f02      {
004c0f13          while (eax_2->data.iid != ACCWeenieObject::selectedID)
004c0f13          {
004c0f15              eax_2 = eax_2->next;
004c0f15              
004c0f1a              if (eax_2 == 0)
004c0f1a                  goto label_4c0f1c;
004c0f13          }
004c0f13          
004c0f48          eax_2 = 1;
004c0f02      }
004c0f02      
004c0f23      uint32_t eax_3 = ((uint32_t)eax_2);
004c0f26      int32_t eax_4 = -(eax_3);
004c0f1e      this->m_sellClearItemButton->vtable->SetState((((eax_4 - eax_4) & 0xfffffff4) + 0xd));
004c0f39      this->m_sellItemButton->vtable->SetState((((eax_4 - eax_4) & 0xfffffff4) + 0xd));
004c0ec0  }

004c0f4c                                      90 90 90 90                                                              ....

004c0f50  void __thiscall VendorSellUI::HandleSetSelectedItem(class VendorSellUI* this, uint32_t arg2, uint32_t arg3)

004c0f50  {
004c0f61      if (arg2 != arg3)
004c0f63          VendorSellUI::UpdateSellUI(this);
004c0f50  }

004c0f6b                                   90 90 90 90 90                                                             .....

004c0f70  int32_t __thiscall PackableList<ItemProfile>::RemoveTail(class PackableList<ItemProfile>* this, class ItemProfile* arg2)

004c0f70  {
004c0f78      if (this->head == 0)
004c0f7d          return 0;
004c0f7d      
004c0f81      class PackableLLNode<ItemProfile>* tail = this->tail;
004c0f84      class PackableLLNode<ItemProfile>* prev = tail->prev;
004c0f89      this->tail = prev;
004c0f89      
004c0f8c      if (prev == 0)
004c0f97          this->head = nullptr;
004c0f8c      else
004c0f8e          prev->next = nullptr;
004c0f8e      
004c0fa3      ItemProfile::operator=(arg2, tail);
004c0fa3      
004c0faa      if (tail != 0)
004c0faa      {
004c0fae          ItemProfile::~ItemProfile(tail);
004c0fb4          operator delete(tail);
004c0faa      }
004c0faa      
004c0fbc      this->curNum -= 1;
004c0fc6      return 1;
004c0f70  }

004c0fc9                             90 90 90 90 90 90 90                                                           .......

004c0fd0  int32_t __thiscall PackableList<ItemProfile>::Remove(class PackableList<ItemProfile>* this, class ItemProfile* arg2)

004c0fd0  {
004c0fd3      class PackableLLNode<ItemProfile>* head = this->head;
004c0fd3      
004c0fd8      if (head == 0)
004c0fdd          return 0;
004c0fdd      
004c0fe7      class PackableLLNode<ItemProfile>* next_2 = head;
004c0fe7      
004c0ff0      if (ItemProfile::operator==(head, arg2) != 0)
004c0ff0      {
004c0ff8          ItemProfile::operator=(arg2, this->head);
004c1000          class PackableLLNode<ItemProfile>* next = this->head->next;
004c1005          this->head = next;
004c1005          
004c1008          if (next == 0)
004c1013              this->tail = nullptr;
004c1008          else
004c100a              next->prev = nullptr;
004c100a          
004c101c          if (next_2 != 0)
004c101c          {
004c1020              ItemProfile::~ItemProfile(next_2);
004c1026              operator delete(next_2);
004c101c          }
004c101c          
004c1033          this->curNum -= 1;
004c103d          return 1;
004c0ff0      }
004c0ff0      
004c1045      while (next_2->next != 0)
004c1045      {
004c1052          if (ItemProfile::operator==(next_2->next, arg2) != 0)
004c1052          {
004c106c              ItemProfile::operator=(arg2, next_2->next);
004c1071              void* next_1 = next_2->next;
004c1074              class PackableLLNode<ItemProfile>* eax_10 = *(uint32_t*)((char*)next_1 + 0x10);
004c1079              next_2->next = eax_10;
004c1079              
004c107c              if (eax_10 == 0)
004c1083                  this->tail = next_2;
004c107c              else
004c107e                  eax_10->prev = next_2;
004c107e              
004c1088              ItemProfile::~ItemProfile(next_1);
004c108e              operator delete(next_1);
004c109b              this->curNum -= 1;
004c10a5              return 1;
004c1052          }
004c1052          
004c1054          next_2 = next_2->next;
004c1045      }
004c1045      
004c1063      return 0;
004c0fd0  }

004c10a8                          90 90 90 90 90 90 90 90                                                          ........

004c10b0  void __fastcall PackableList<ItemProfile>::Flush(class PackableList<ItemProfile>* this)

004c10b0  {
004c10bb      void var_10;
004c10bb      ItemProfile::ItemProfile(&var_10);
004c10bb      
004c10c7      while (this->head != 0)
004c10c7      {
004c10d0          class PackableLLNode<ItemProfile>* head = this->head;
004c10d0          
004c10d5          if (head != 0)
004c10d5          {
004c10d7              class PackableLLNode<ItemProfile>* next = head->next;
004c10dc              this->head = next;
004c10dc              
004c10df              if (next == 0)
004c10e6                  this->tail = nullptr;
004c10df              else
004c10e1                  next->prev = nullptr;
004c10e1              
004c10ee              ItemProfile::operator=(&var_10, head);
004c10ee              
004c10f5              if (head != 0)
004c10f5              {
004c10f9                  ItemProfile::~ItemProfile(head);
004c10ff                  operator delete(head);
004c10f5              }
004c10f5              
004c1107              this->curNum -= 1;
004c10d5          }
004c10c7      }
004c10c7      
004c1114      ItemProfile::~ItemProfile(&var_10);
004c10b0  }

004c111f                                                                                               90                                 .

004c1120  int32_t __thiscall PackableList<ItemProfile>::UnPack(class PackableList<ItemProfile>* this, void** arg2, uint32_t arg3)

004c1120  {
004c1126      PackableList<ItemProfile>::Flush(this);
004c1126      
004c1130      if (arg3 < 4)
004c1195          return 0;
004c1195      
004c1137      void* eax = *(uint32_t*)arg2;
004c113b      int32_t edi = *(uint32_t*)eax;
004c1144      *(uint32_t*)arg2 = ((char*)eax + 4);
004c1146      int32_t var_10;
004c1146      ItemProfile::ItemProfile(&var_10);
004c114b      int32_t esi = 0;
004c114b      
004c114f      if (edi > 0)
004c114f      {
004c1175          do
004c1175          {
004c1164              if (*(uint32_t*)(var_10 + 0x10)(arg2, arg3) == 0)
004c1164              {
004c119c                  ItemProfile::~ItemProfile(&var_10);
004c11aa                  return 0;
004c1164              }
004c1164              
004c116d              PackableList<ItemProfile>::InsertTail(this, &var_10);
004c1172              esi += 1;
004c1175          } while (esi < edi);
004c114f      }
004c114f      
004c117b      ItemProfile::~ItemProfile(&var_10);
004c118c      return 1;
004c1120  }

004c11ad                                         90 90 90                                                               ...

004c11b0  class TResult __thiscall InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(InterfacePtr<class ClientObjMaintSystem>* this, class InterfacePtr<class Interface> arg2)

004c11b0  {
004c11b0      InterfacePtr<class ClientObjMaintSystem>* this_1 = this;
004c11b5      int32_t* edi = arg_8;
004c11bf      int32_t ebx;
004c11bf      
004c11bf      if (edi == 0)
004c11bf      {
004c1222          int32_t* ecx_4 = *(uint32_t*)this;
004c1222          
004c1226          if (ecx_4 != 0)
004c1226          {
004c1228              *(uint32_t*)this = 0;
004c122c              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
004c122f              *(uint32_t*)((char*)this + 4) = 0;
004c1226          }
004c1226          
004c1232          ebx = 0x80004002;
004c11bf      }
004c11bf      else
004c11bf      {
004c11c1          int32_t eax_1 = *(uint32_t*)edi;
004c11d4          arg_8 = nullptr;
004c11db          ebx = *(uint32_t*)*(uint32_t*)(eax_1 + 0xc)(&this_1, 0x7b4e40, &arg_8);
004c11df          int32_t* ecx_1 = *(uint32_t*)this;
004c11df          
004c11e1          if (ebx < 0)
004c11e1          {
004c11e5              if (ecx_1 != 0)
004c11e9                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
004c11e9              
004c11ec              *(uint32_t*)this = 0;
004c11ee              *(uint32_t*)((char*)this + 4) = 0;
004c11f1              int32_t* esi_1 = arg2;
004c11f5              *(uint32_t*)esi_1 = ebx;
004c11fb              *(uint32_t*)(*(uint32_t*)edi + 0x14)();
004c1205              return esi_1;
004c11e1          }
004c11e1          
004c120a          int32_t* ebp_1 = arg_8;
004c120a          
004c120e          if (ecx_1 != 0)
004c1212              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
004c1212          
004c1215          *(uint32_t*)this = ebp_1;
004c1217          *(uint32_t*)((char*)this + 4) = 0;
004c11bf      }
004c11bf      
004c1239      int32_t* esi_2 = arg2;
004c123d      *(uint32_t*)esi_2 = ebx;
004c123d      
004c123f      if (edi != 0)
004c1245          *(uint32_t*)(*(uint32_t*)edi + 0x14)();
004c1245      
004c124f      return esi_2;
004c11b0  }

004c1252                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004c1260  uint8_t __stdcall gmVendorUI::RemoveProfileFromList(class gmVendorUI* this @ ecx, class PackableList<ItemProfile>* arg2, uint32_t arg3, int32_t arg4)

004c1260  {
004c126a      void var_10;
004c126a      ItemProfile::ItemProfile(&var_10);
004c126a      
004c1278      for (class PackableLLNode<ItemProfile>* i = arg2->head; i != 0; i = i->next)
004c1278      {
004c1285          ItemProfile::operator=(&var_10, i);
004c128e          int32_t var_8;
004c128e          
004c128e          if (var_8 == arg3)
004c128e          {
004c12be              int32_t var_c;
004c12be              
004c12be              if ((arg4 == 0xffffffff || arg4 >= var_c))
004c12be              {
004c12ef                  PackableList<ItemProfile>::Remove(arg2, &var_10);
004c12f8                  ItemProfile::~ItemProfile(&var_10);
004c12ff                  int32_t eax_3;
004c12ff                  eax_3 = 1;
004c1305                  return 1;
004c12be              }
004c12be              
004c12cb              int32_t var_c_1 = (var_c - arg4);
004c12cf              ItemProfile::operator=(i, &var_10);
004c12d8              ItemProfile::~ItemProfile(&var_10);
004c12df              int32_t eax_2;
004c12df              eax_2 = 1;
004c12e5              return 1;
004c128e          }
004c128e          
004c1292          if (i == 0)
004c1292              break;
004c1278      }
004c1278      
004c129f      ItemProfile::~ItemProfile(&var_10);
004c12a6      int32_t eax;
004c12a6      eax = 0;
004c12ac      return 0;
004c1260  }

004c1308                          90 90 90 90 90 90 90 90                                                          ........

004c1310  uint8_t __stdcall gmVendorUI::RecordContents(class gmVendorUI* this @ ecx, class UIElement_ItemList* arg2, class PackableList<ItemProfile>* arg3, int32_t arg4, int32_t const arg5)

004c1310  {
004c1314      class PackableList<ItemProfile>* ebx = arg3;
004c131a      PackableList<ItemProfile>::Flush(ebx);
004c1323      void var_10;
004c1323      ItemProfile::ItemProfile(&var_10);
004c1332      uint32_t i = 0;
004c1336      arg3 = 0;
004c133b      char result = 0;
004c1340      uint32_t i_1 = 0;
004c1340      
004c1344      if (arg2->m_listItems.m_num > 0)
004c1344      {
004c134d          class UIElement_ItemList* ecx_3 = arg2;
004c134d          
004c1491          do
004c1491          {
004c1351              class UIElement* eax = UIElement_ListBox::GetItem(ecx_3, i);
004c1351              
004c1358              if (eax != 0)
004c1358              {
004c1367                  void* eax_1 = eax->vtable->DynamicCast(0x10000032);
004c1367                  
004c136f                  if (eax_1 != 0)
004c136f                  {
004c1375                      int32_t eax_2 = *(uint32_t*)((char*)eax_1 + 0x5fc);
004c1375                      
004c1381                      if (eax_2 != 0)
004c1381                      {
004c138d                          uint32_t _stackSize_1 = 1;
004c138d                          
004c1392                          if (arg5 != 0)
004c1392                          {
004c139a                              uint32_t _stackSize = ClientObjMaintSystem::GetWeenieObject(eax_2)->pwd._stackSize;
004c139a                              
004c13a9                              if ((_stackSize != 0 && _stackSize > 1))
004c13ab                                  _stackSize_1 = _stackSize;
004c1392                          }
004c1392                          
004c13b3                          int32_t k_1;
004c13b3                          
004c13b3                          if (arg4 == 0)
004c13b3                          {
004c1414                          label_4c1414:
004c1414                              k_1 = arg3;
004c1414                              
004c141a                              if (k_1 == 0)
004c141a                                  goto label_4c1429;
004c141a                              
004c141c                              result = 1;
004c13b3                          }
004c13b3                          else
004c13b3                          {
004c13b5                              class PackableLLNode<ItemProfile>* j = ebx->head;
004c13b8                              int32_t k_2 = 0;
004c13bc                              arg3 = 0;
004c13c1                              uint32_t _stackSize_2;
004c13c1                              int32_t var_8;
004c13c1                              
004c13c1                              if (j != 0)
004c13c1                              {
004c1412                                  do
004c1412                                  {
004c13c8                                      ItemProfile::operator=(&var_10, j);
004c13c8                                      
004c13d5                                      if (var_8 == eax_2)
004c13d5                                      {
004c13df                                          _stackSize_2 += _stackSize_1;
004c13e3                                          class PackableLLNode<ItemProfile>* ecx_9 = ebx->head;
004c13e6                                          arg3 = 1;
004c13e6                                          
004c13eb                                          if (k_2 > 0)
004c13eb                                          {
004c13ed                                              k_1 = k_2;
004c13f8                                              int32_t k;
004c13f8                                              
004c13f8                                              do
004c13f8                                              {
004c13f2                                                  if (ecx_9 != 0)
004c13f4                                                      ecx_9 = ecx_9->next;
004c13f4                                                  
004c13f7                                                  k = k_1;
004c13f7                                                  k_1 -= 1;
004c13f8                                              } while (k != 1);
004c13eb                                          }
004c13eb                                          
004c13fc                                          if (ecx_9 != 0)
004c1403                                              ItemProfile::operator=(ecx_9, &var_10);
004c13d5                                      }
004c13d5                                      
004c1408                                      k_2 += 1;
004c1408                                      
004c140b                                      if (j == 0)
004c140b                                          break;
004c140b                                      
004c140d                                      j = j->next;
004c1412                                  } while (j != 0);
004c1412                                  
004c140b                                  goto label_4c1414;
004c13c1                              }
004c13c1                              
004c1429                          label_4c1429:
004c1429                              var_8 = eax_2;
004c142d                              _stackSize_2 = _stackSize_1;
004c1431                              int32_t var_4_1 = 0;
004c143e                              void* esi_1 = operator new(0x18);
004c143e                              
004c1447                              if (esi_1 == 0)
004c145d                                  esi_1 = nullptr;
004c1447                              else
004c1447                              {
004c1450                                  ItemProfile::ItemProfile(esi_1, &var_10);
004c1455                                  *(uint32_t*)((char*)esi_1 + 0x10) = 0;
004c1458                                  *(uint32_t*)((char*)esi_1 + 0x14) = 0;
004c1447                              }
004c1447                              
004c1462                              if (ebx->head != 0)
004c1462                              {
004c1469                                  class PackableLLNode<ItemProfile>* tail = ebx->tail;
004c146c                                  tail->next = esi_1;
004c146f                                  *(uint32_t*)((char*)esi_1 + 0x14) = tail;
004c1462                              }
004c1462                              else
004c1464                                  ebx->head = esi_1;
004c1464                              
004c1475                              uint32_t eax_7 = (ebx->curNum + 1);
004c1476                              ebx->tail = esi_1;
004c1479                              ebx->curNum = eax_7;
004c13b3                          }
004c1381                      }
004c136f                  }
004c1358              }
004c1358              
004c1480              ecx_3 = arg2;
004c148a              i = (i_1 + 1);
004c148d              i_1 = i;
004c1491          } while (i < ecx_3->m_listItems.m_num);
004c1344      }
004c1344      
004c149e      ItemProfile::~ItemProfile(&var_10);
004c14ab      return result;
004c1310  }

004c14ae                                            90 90                                                                ..

004c14b0  int32_t __thiscall gmVendorUI::AddItem(class gmVendorUI* this, class UIElement_ItemList* arg2, uint32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, int32_t arg8, int32_t arg9)

004c14b0  {
004c14ca      int32_t var_a0 = 0xffffffff;
004c14ce      int32_t eax;
004c14ce      
004c14ce      if (arg2 == 0)
004c16c2          return eax;
004c14e6      int32_t ebp_1;
004c14e6      
004c14e6      if (arg5 == 0)
004c1515          ebp_1 = arg4;
004c14e6      else
004c14e6      {
004c14eb          class UIElement_UIItem* eax_2 = UIElement_ItemList::ItemList_GetItem(arg2, arg3);
004c14eb          
004c14f2          if (eax_2 == 0)
004c1515              ebp_1 = arg4;
004c14f2          else
004c14f2          {
004c14fc              ebp_1 = arg4;
004c14fc              
004c1505              if (UIElement_ListBox::WhatNum(arg2, eax_2) < ebp_1)
004c1507                  ebp_1 -= 1;
004c1507              
004c150e              gmVendorUI::DeleteItem(this, arg2, arg3, 1);
004c14f2          }
004c14e6      }
004c14e6      
004c151d      class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(arg3);
004c151d      
004c1530      if (((arg7 != 0 && VendorProfile::IsAcceptable(this->shopVendorProfile, &eax_4->pwd) == 0) && eax_4->vtable->IsPlayer() == 0))
004c1564          return 0xffffffff;
004c1564      
004c1570      if ((ACCWeenieObject::GetNumContainedItems(eax_4) == 0 && ACCWeenieObject::GetNumContainedContainers(eax_4) == 0))
004c1570      {
004c1587          if (arg2->m_desc.m_elementID == 0x100000ce)
004c158d              ACCWeenieObject::SetSellState(eax_4, 1);
004c158d          
004c1596          UIElement_ItemList::ItemList_InsertItem(arg2, arg3, ebp_1);
004c159b          var_a0 = ebp_1;
004c1570      }
004c1570      
004c15a8      if ((arg6 != 0 && ACCWeenieObject::GetNumContainedItems(eax_4) > 0))
004c15a8      {
004c15cf          void* __return;
004c15cf          class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax_4, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004c15dc          void* var_98;
004c15dc          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"Selling contents of %s");
004c15e5          int32_t* esi_3 = ((char*)__return - 0x14);
004c15e5          
004c15fb          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004c1603              **(uint32_t**)esi_3(1);
004c1603          
004c1609          void var_90;
004c1609          StringInfo::StringInfo(&var_90);
004c1619          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004c1625          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c162f          class IDList* eax_17 = ACCWeenieObject::GetContainedItemsList(eax_4);
004c162f          
004c1638          if (eax_17 != 0)
004c1638          {
004c163e              IDList::SetCurToNum(eax_17, 0);
004c1646              int32_t i = 0;
004c1646              
004c164a              if (eax_17->numIDs > 0)
004c164a              {
004c1688                  do
004c1688                  {
004c166e                      int32_t eax_20 = gmVendorUI::AddItem(this, arg2, IDList::GetCurID(eax_17), ebp_1, arg5, 0, 1, 1, 0xffffffff);
004c166e                      
004c1676                      if (eax_20 != 0xffffffff)
004c1678                          ebp_1 = (eax_20 + 1);
004c1678                      
004c167d                      IDList::SetCurToNext(eax_17);
004c1685                      i += 1;
004c1688                  } while (i < eax_17->numIDs);
004c164a              }
004c1638          }
004c1638          
004c168e          StringInfo::~StringInfo(&var_90);
004c1697          int32_t* esi_6 = ((char*)var_98 - 0x14);
004c1697          
004c16aa          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004c16b2              **(uint32_t**)esi_6(1);
004c15a8      }
004c15a8      
004c16b4      return var_a0;
004c14b0  }

004c16c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004c16d0  void __fastcall VendorItemsUI::OpenVendor(class VendorItemsUI* this, uint8_t arg2)

004c16d0  {
004c16dd      int32_t m_iScrollableX = this->m_shopList->m_iScrollableX;
004c16f4      int32_t var_9c = UIElement_Menu::GetSelectedIndex(this->m_itemTypeMenu);
004c16f8      void var_90;
004c16f8      StringInfo::StringInfo(&var_90);
004c1700      UIElement_ItemList::ItemList_Flush(this->m_shopList);
004c1708      UIElement_Menu::Flush(this->m_itemTypeMenu);
004c170d      class gmVendorUI* m_parent = this->m_parent;
004c1710      this->m_numTypeFilters = 0;
004c172f      int32_t var_a0;
004c172f      
004c172f      if (VendorItemsUI::ListContainsType(this, m_parent->shopItemProfileList, 2) != 0)
004c172f      {
004c173a          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Armor");
004c174a          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1753          int32_t* edi_2 = (var_a0 - 0x14);
004c1753          
004c1762          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004c176a              **(uint32_t**)edi_2(1);
004c176a          
004c1775          VendorItemsUI::AddTypeFilter(this, &var_90, 2);
004c172f      }
004c172f      
004c1792      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x2000) != 0)
004c1792      {
004c179d          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Books, Paper");
004c17ad          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c17b6          int32_t* edi_4 = (var_a0 - 0x14);
004c17b6          
004c17c5          if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
004c17cd              **(uint32_t**)edi_4(1);
004c17cd          
004c17db          VendorItemsUI::AddTypeFilter(this, &var_90, 0x2000);
004c1792      }
004c1792      
004c17f5      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 4) != 0)
004c17f5      {
004c1800          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Clothing");
004c1810          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1819          int32_t* edi_6 = (var_a0 - 0x14);
004c1819          
004c1828          if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
004c1830              **(uint32_t**)edi_6(1);
004c1830          
004c183b          VendorItemsUI::AddTypeFilter(this, &var_90, 4);
004c17f5      }
004c17f5      
004c1858      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x200) != 0)
004c1858      {
004c1863          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Containers");
004c1873          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c187c          int32_t* edi_8 = (var_a0 - 0x14);
004c187c          
004c188b          if ((InterlockedDecrement(&edi_8[1]) == 0 && edi_8 != 0))
004c1893              **(uint32_t**)edi_8(1);
004c1893          
004c18a1          VendorItemsUI::AddTypeFilter(this, &var_90, 0x200);
004c1858      }
004c1858      
004c18bb      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x20) != 0)
004c18bb      {
004c18c6          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Food");
004c18d6          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c18df          int32_t* edi_10 = (var_a0 - 0x14);
004c18df          
004c18ee          if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
004c18f6              **(uint32_t**)edi_10(1);
004c18f6          
004c1901          VendorItemsUI::AddTypeFilter(this, &var_90, 0x20);
004c18bb      }
004c18bb      
004c191e      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x800) != 0)
004c191e      {
004c1929          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Gems");
004c1939          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1942          int32_t* edi_12 = (var_a0 - 0x14);
004c1942          
004c1951          if ((InterlockedDecrement(&edi_12[1]) == 0 && edi_12 != 0))
004c1959              **(uint32_t**)edi_12(1);
004c1959          
004c1967          VendorItemsUI::AddTypeFilter(this, &var_90, 0x800);
004c191e      }
004c191e      
004c1981      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 8) != 0)
004c1981      {
004c198c          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Jewelry");
004c199c          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c19a5          int32_t* edi_14 = (var_a0 - 0x14);
004c19a5          
004c19b4          if ((InterlockedDecrement(&edi_14[1]) == 0 && edi_14 != 0))
004c19bc              **(uint32_t**)edi_14(1);
004c19bc          
004c19c7          VendorItemsUI::AddTypeFilter(this, &var_90, 8);
004c1981      }
004c1981      
004c19e4      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x20004000) != 0)
004c19e4      {
004c19ef          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Keys, Tools");
004c19ff          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1a08          int32_t* edi_16 = (var_a0 - 0x14);
004c1a08          
004c1a17          if ((InterlockedDecrement(&edi_16[1]) == 0 && edi_16 != 0))
004c1a1f              **(uint32_t**)edi_16(1);
004c1a1f          
004c1a2d          VendorItemsUI::AddTypeFilter(this, &var_90, 0x20004000);
004c19e4      }
004c19e4      
004c1a4a      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x490) != 0)
004c1a4a      {
004c1a55          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Miscellaneous");
004c1a65          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1a6e          int32_t* edi_18 = (var_a0 - 0x14);
004c1a6e          
004c1a7d          if ((InterlockedDecrement(&edi_18[1]) == 0 && edi_18 != 0))
004c1a85              **(uint32_t**)edi_18(1);
004c1a85          
004c1a93          VendorItemsUI::AddTypeFilter(this, &var_90, 0x490);
004c1a4a      }
004c1a4a      
004c1ab0      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x100000) != 0)
004c1ab0      {
004c1abb          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Services");
004c1acb          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1ad4          int32_t* edi_20 = (var_a0 - 0x14);
004c1ad4          
004c1ae3          if ((InterlockedDecrement(&edi_20[1]) == 0 && edi_20 != 0))
004c1aeb              **(uint32_t**)edi_20(1);
004c1aeb          
004c1af9          VendorItemsUI::AddTypeFilter(this, &var_90, 0x100000);
004c1ab0      }
004c1ab0      
004c1b16      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x1000) != 0)
004c1b16      {
004c1b21          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Spell Components");
004c1b31          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1b3a          int32_t* edi_22 = (var_a0 - 0x14);
004c1b3a          
004c1b49          if ((InterlockedDecrement(&edi_22[1]) == 0 && edi_22 != 0))
004c1b51              **(uint32_t**)edi_22(1);
004c1b51          
004c1b5f          VendorItemsUI::AddTypeFilter(this, &var_90, 0x1000);
004c1b16      }
004c1b16      
004c1b7c      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x40000) != 0)
004c1b7c      {
004c1b87          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Trade Notes");
004c1b97          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1ba0          int32_t* edi_24 = (var_a0 - 0x14);
004c1ba0          
004c1baf          if ((InterlockedDecrement(&edi_24[1]) == 0 && edi_24 != 0))
004c1bb7              **(uint32_t**)edi_24(1);
004c1bb7          
004c1bc5          VendorItemsUI::AddTypeFilter(this, &var_90, 0x40000);
004c1b7c      }
004c1b7c      
004c1be2      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x101) != 0)
004c1be2      {
004c1bed          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Weapons");
004c1bfd          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1c06          int32_t* edi_26 = (var_a0 - 0x14);
004c1c06          
004c1c15          if ((InterlockedDecrement(&edi_26[1]) == 0 && edi_26 != 0))
004c1c1d              **(uint32_t**)edi_26(1);
004c1c1d          
004c1c2b          VendorItemsUI::AddTypeFilter(this, &var_90, 0x101);
004c1be2      }
004c1be2      
004c1c48      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x80000) != 0)
004c1c48      {
004c1c53          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Mana Stones");
004c1c63          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1c6c          int32_t* edi_28 = (var_a0 - 0x14);
004c1c6c          
004c1c7b          if ((InterlockedDecrement(&edi_28[1]) == 0 && edi_28 != 0))
004c1c83              **(uint32_t**)edi_28(1);
004c1c83          
004c1c91          VendorItemsUI::AddTypeFilter(this, &var_90, 0x80000);
004c1c48      }
004c1c48      
004c1cae      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x8000) != 0)
004c1cae      {
004c1cb9          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Magic Items");
004c1cc9          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1cd2          int32_t* edi_30 = (var_a0 - 0x14);
004c1cd2          
004c1ce1          if ((InterlockedDecrement(&edi_30[1]) == 0 && edi_30 != 0))
004c1ce9              **(uint32_t**)edi_30(1);
004c1ce9          
004c1cf7          VendorItemsUI::AddTypeFilter(this, &var_90, 0x8000);
004c1cae      }
004c1cae      
004c1d14      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x4800000) != 0)
004c1d14      {
004c1d1f          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Alchemical Items");
004c1d2f          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1d38          int32_t* edi_32 = (var_a0 - 0x14);
004c1d38          
004c1d47          if ((InterlockedDecrement(&edi_32[1]) == 0 && edi_32 != 0))
004c1d4f              **(uint32_t**)edi_32(1);
004c1d4f          
004c1d5d          VendorItemsUI::AddTypeFilter(this, &var_90, 0x4800000);
004c1d14      }
004c1d14      
004c1d7a      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x400000) != 0)
004c1d7a      {
004c1d85          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Cooking Items");
004c1d95          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1d9e          int32_t* edi_34 = (var_a0 - 0x14);
004c1d9e          
004c1dad          if ((InterlockedDecrement(&edi_34[1]) == 0 && edi_34 != 0))
004c1db5              **(uint32_t**)edi_34(1);
004c1db5          
004c1dc3          VendorItemsUI::AddTypeFilter(this, &var_90, 0x400000);
004c1d7a      }
004c1d7a      
004c1de0      if (VendorItemsUI::ListContainsType(this, this->m_parent->shopItemProfileList, 0x9000000) != 0)
004c1de0      {
004c1deb          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"Fletching Items");
004c1dfb          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c1e04          int32_t* edi_36 = (var_a0 - 0x14);
004c1e04          
004c1e13          if ((InterlockedDecrement(&edi_36[1]) == 0 && edi_36 != 0))
004c1e1b              **(uint32_t**)edi_36(1);
004c1e1b          
004c1e29          VendorItemsUI::AddTypeFilter(this, &var_90, 0x9000000);
004c1de0      }
004c1de0      
004c1e2e      class UIElement_Menu* m_itemTypeMenu = this->m_itemTypeMenu;
004c1e31      int32_t var_98 = 0;
004c1e39      int32_t eax_73 = UIElement_Menu::GetNumItems(m_itemTypeMenu);
004c1e3e      int32_t ecx_112 = var_9c;
004c1e43      var_a0 = (eax_73 - 1);
004c1e49      int32_t* eax_75 = &var_9c;
004c1e49      
004c1e4d      if (ecx_112 >= (eax_73 - 1))
004c1e4f          eax_75 = &var_a0;
004c1e4f      
004c1e56      if (*(uint32_t*)eax_75 < 0)
004c1e58          eax_75 = &var_98;
004c1e58      
004c1e64      class UIElement* eax_76 = UIElement_Menu::GetItem(this->m_itemTypeMenu, *(uint32_t*)eax_75);
004c1e6d      UIElement_Menu::SetSelectedItem(this->m_itemTypeMenu, eax_76, 1);
004c1e7a      UIElement_ListBox::ScrollToX(this->m_shopList, m_iScrollableX);
004c1e83      StringInfo::~StringInfo(&var_90);
004c16d0  }

004c1e94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c1ea0  void __thiscall VendorItemsUI::UpdateItemsList(class VendorItemsUI* this, int32_t arg2, uint8_t arg3)

004c1ea0  {
004c1eac      uint32_t i_1 = 0;
004c1eb0      UIElement_ItemList::ItemList_Flush(this->m_shopList);
004c1eb0      
004c1ebe      if (this->m_parent->shopVendorID != 0)
004c1ebe      {
004c1eca          int32_t var_30 = 0;
004c1eca          
004c1ece          if (arg2 != 0)
004c1f15              var_30 = arg2;
004c1ece          else
004c1ece          {
004c1ed3              class UIElement* eax_2 = UIElement_Menu::GetSelectedItem(this->m_itemTypeMenu);
004c1ed3              
004c1eda              if (eax_2 != 0)
004c1eda              {
004c1edc                  struct UIElement::VTable* vtable = eax_2->vtable;
004c1eea                  int32_t var_28 = 0;
004c1eee                  int32_t* var_24_1 = nullptr;
004c1ef2                  vtable->InqProperty(0x10000039, &var_28);
004c1ef2                  
004c1efe                  if (var_24_1 != 0)
004c1f07                      *(uint32_t*)(*(uint32_t*)var_24_1 + 0x78)(&var_30);
004c1f07                  
004c1f0e                  BaseProperty::~BaseProperty(&var_28);
004c1eda              }
004c1ece          }
004c1ece          
004c1f1e          void var_20;
004c1f1e          ItemProfile::ItemProfile(&var_20);
004c1f27          void var_10;
004c1f27          ItemProfile::ItemProfile(&var_10);
004c1f35          class PackableLLNode<ItemProfile>* head_1 = this->m_parent->shopItemProfileList->head;
004c1f3a          class PackableLLNode<ItemProfile>* var_24_2 = head_1;
004c1f3a          
004c1f3e          if (head_1 != 0)
004c1f3e          {
004c1f55              while (true)
004c1f55              {
004c1f55                  ItemProfile::operator=(&var_20, head_1);
004c1f5f                  uint32_t i_2;
004c1f5f                  class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(i_2);
004c1f5f                  
004c1f6b                  if (eax_4 != 0)
004c1f6b                  {
004c1f75                      int32_t eax_5 = eax_4->vtable->InqType();
004c1f75                      
004c1f7c                      if ((var_30 & eax_5) != 0)
004c1f7c                      {
004c1f86                          uint32_t i = i_2;
004c1f86                          
004c1f8a                          if (i_1 == 0)
004c1f8c                              i_1 = i;
004c1f8c                          
004c1f90                          uint32_t _maxStackSize_4;
004c1f90                          uint32_t _maxStackSize_3 = _maxStackSize_4;
004c1f97                          int32_t _maxStackSize_2;
004c1f97                          
004c1f97                          if (_maxStackSize_3 != 0xffffffff)
004c1f97                          {
004c1faa                              class ItemProfile* head = this->m_parent->m_buyList.head;
004c1faa                              
004c1fb2                              if (head == 0)
004c1fb2                                  goto label_4c1fdc;
004c1fb2                              
004c1fb7                              while (head->iid != i)
004c1fb7                              {
004c1fb9                                  head = *(int32_t*)((char*)head + 0x10);
004c1fb9                                  
004c1fbe                                  if (head == 0)
004c1fbe                                      goto label_4c1fdc;
004c1fb7                              }
004c1fb7                              
004c1fc7                              ItemProfile::operator=(&var_10, head);
004c1fcc                              int32_t var_c;
004c1fcc                              _maxStackSize_3 -= var_c;
004c1fcc                              
004c1fd2                              if (_maxStackSize_3 > 0)
004c1fd2                              {
004c1fd8                                  i = i_2;
004c1fdc                              label_4c1fdc:
004c1fdc                                  uint32_t _maxStackSize_1 = eax_4->pwd._maxStackSize;
004c1fdc                                  
004c1fe5                                  if (_maxStackSize_1 <= 1)
004c1fe5                                      goto label_4c2000;
004c1fe5                                  
004c1fe9                                  if (_maxStackSize_3 > _maxStackSize_1)
004c1feb                                      _maxStackSize_3 = _maxStackSize_1;
004c1feb                                  
004c1fed                                  _maxStackSize_2 = _maxStackSize_3;
004c1fed                                  goto label_4c1ff1;
004c1fd2                              }
004c1f97                          }
004c1f97                          else
004c1f97                          {
004c1f99                              uint32_t _maxStackSize = eax_4->pwd._maxStackSize;
004c1f99                              
004c1fa2                              if (_maxStackSize <= 1)
004c1fa2                                  goto label_4c2000;
004c1fa2                              
004c1fa4                              _maxStackSize_2 = _maxStackSize;
004c1ff1                          label_4c1ff1:
004c1ff1                              VendorSubUI::SetObjectStackSize(this, eax_4, _maxStackSize_2);
004c1ff6                              i = i_2;
004c2000                          label_4c2000:
004c2000                              
004c2000                              if (ACCWeenieObject::selectedID == i)
004c2000                              {
004c2005                                  GenItemHolder::ItemAttributesChanged_s(i, 0);
004c200a                                  i = i_2;
004c2000                              }
004c2000                              
004c2011                              class UIElement_ItemList* m_shopList_1 = this->m_shopList;
004c2011                              
004c2018                              if (m_shopList_1 != 0)
004c2018                              {
004c201b                                  class ACCWeenieObject* eax_7 = ClientObjMaintSystem::GetWeenieObject(i);
004c201b                                  
004c202e                                  if ((ACCWeenieObject::GetNumContainedItems(eax_7) == 0 && ACCWeenieObject::GetNumContainedContainers(eax_7) == 0))
004c202e                                  {
004c2045                                      if (m_shopList_1->m_desc.m_elementID == 0x100000ce)
004c204b                                          ACCWeenieObject::SetSellState(eax_7, 1);
004c204b                                      
004c2055                                      UIElement_ItemList::ItemList_InsertItem(m_shopList_1, i, 0xffffffff);
004c202e                                  }
004c2018                              }
004c2018                              
004c205a                              head_1 = var_24_2;
004c1f97                          }
004c1f7c                      }
004c1f6b                  }
004c1f6b                  
004c2062                  if (head_1 == 0)
004c2062                      break;
004c2062                  
004c2064                  class PackableLLNode<ItemProfile>* next = head_1->next;
004c2069                  var_24_2 = next;
004c2069                  
004c206d                  if (next == 0)
004c206d                      break;
004c206d                  
004c1f47                  head_1 = var_24_2;
004c1f55              }
004c1f3e          }
004c1f3e          
004c2078          ItemProfile::~ItemProfile(&var_10);
004c2081          ItemProfile::~ItemProfile(&var_20);
004c1ebe      }
004c1ebe      
004c2087      class gmVendorUI* eax;
004c2087      eax = arg3;
004c2087      
004c208d      if (eax != 0)
004c2095          ACCWeenieObject::SetSelectedObject(i_1, 0);
004c2095      
004c209d      class UIElement_ItemList* m_shopList = this->m_shopList;
004c209d      
004c20a6      if (m_shopList->m_listItems.m_num != 0)
004c20a9          UIElement_ListBox::ScrollToShow(m_shopList, 0);
004c1ea0  }

004c1f4d                                         8d 49 00                                                               .I.
004c20b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c20c0  uint8_t __thiscall VendorSellUI::DragItemAcceptable(class VendorSellUI* this, uint32_t arg2, uint8_t arg3)

004c20c0  {
004c20d4      class ACCWeenieObject* esi = ClientObjMaintSystem::GetWeenieObject(arg2);
004c20db      class ACCWeenieObject* eax;
004c20db      
004c20db      if (esi != 0)
004c20db      {
004c20ea          void* var_a4;
004c20ea          void var_90;
004c20ea          
004c20ea          if (ACCWeenieObject::IsOwnedByPlayer(esi) == 0)
004c20ea          {
004c20ec              int32_t eax_1;
004c20ec              eax_1 = arg3;
004c20ec              
004c20f5              if (eax_1 == 0)
004c20f5              {
004c20fb                  StringInfo::StringInfo(&var_90);
004c2109                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a4, u"You can only sell items you are …");
004c2119                  StringInfo::SetLiteralValue(&var_90, &var_a4, 1);
004c2122                  int32_t* esi_2 = ((char*)var_a4 - 0x14);
004c2122                  
004c2135                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c213d                      **(uint32_t**)esi_2(1);
004c213d                  
004c2146                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c2152                  StringInfo::~StringInfo(&var_90);
004c20f5              }
004c20f5              
004c2158              eax_1 = 0;
004c2161              return 0;
004c20ea          }
004c20ea          
004c216d          if (ACCWeenieObject::GetNumContainedItems(esi) > 0)
004c216d          {
004c22de              eax = 1;
004c22e7              return 1;
004c216d          }
004c216d          
004c2183          eax = VendorProfile::InqAcceptability(this->m_parent->shopVendorProfile, &esi->pwd);
004c2183          
004c218a          if (eax == 0)
004c218a          {
004c22de              eax = 1;
004c22e7              return 1;
004c218a          }
004c218a          
004c2199          if (arg3 == 0)
004c2199          {
004c21a3              void* var_b0_4;
004c21a3              
004c21a3              if (((char*)eax - 1) > 3)
004c21a3              {
004c228c                  StringInfo::StringInfo(&var_90);
004c229a                  void var_98;
004c229a                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"You cannot sell that here");
004c22aa                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004c22b3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004c22bc                  var_b0_4 = &var_90;
004c21a3              }
004c21a3              else
004c21a3                  switch (eax)
004c21a3                  {
004c21b4                      case 1:
004c21b4                      {
004c21b4                          StringInfo::StringInfo(&var_90);
004c21c2                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a4, u"That item cannot be sold here");
004c21d2                          StringInfo::SetLiteralValue(&var_90, &var_a4, 1);
004c21db                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a4);
004c21e4                          var_b0_4 = &var_90;
004c21b4                          break;
004c21b4                      }
004c21ee                      case 2:
004c21ee                      {
004c21ee                          StringInfo::StringInfo(&var_90);
004c21fc                          void var_94;
004c21fc                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"That item has no value and canno…");
004c220c                          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004c22b3                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
004c22bc                          var_b0_4 = &var_90;
004c21ee                          break;
004c21ee                      }
004c221e                      case 3:
004c221e                      {
004c221e                          StringInfo::StringInfo(&var_90);
004c222c                          void var_a0;
004c222c                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"That item is too cheap to sell h…");
004c223c                          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
004c2245                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a0);
004c224e                          var_b0_4 = &var_90;
004c221e                          break;
004c221e                      }
004c2255                      case 4:
004c2255                      {
004c2255                          StringInfo::StringInfo(&var_90);
004c2263                          void var_9c;
004c2263                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, u"That item is too valuable to sel…");
004c2273                          StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004c227c                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
004c2285                          var_b0_4 = &var_90;
004c2255                          break;
004c2255                      }
004c21a3                  }
004c21a3              
004c22bf              ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_b0_4);
004c22cb              StringInfo::~StringInfo(&var_90);
004c2199          }
004c20db      }
004c20db      
004c22d1      eax = 0;
004c22da      return 0;
004c20c0  }

004c22ea                                8b ff                                                                        ..
004c22ec  uint32_t jump_table_4c22ec[0x4] = 
004c22ec  {
004c22ec      [0x0] =  0x004c21b0
004c22f0      [0x1] =  0x004c21ea
004c22f4      [0x2] =  0x004c221a
004c22f8      [0x3] =  0x004c2251
004c22fc  }

004c22fc                                                                                      90 90 90 90                              ....

004c2300  uint8_t __thiscall VendorSellUI::OnItemListDragOver(class VendorSellUI* this, class UIElement_UIItem* arg2, uint32_t arg3, uint32_t arg4, enum DropItemFlags arg5)

004c2300  {
004c230d      if ((arg3 != 0 && (arg5 & 0xe) == 0))
004c230d      {
004c2320          if (VendorSellUI::DragItemAcceptable(((char*)this - 8), arg3, 1) != 0)
004c2320          {
004c2327              UIElement_UIItem::SetDragAcceptState(arg2, 0x10000040);
004c232c              int32_t eax_1;
004c232c              eax_1 = 1;
004c232e              return 1;
004c2320          }
004c2320          
004c2336          UIElement_UIItem::SetDragAcceptState(arg2, 0x10000041);
004c230d      }
004c230d      
004c233b      uint32_t eax_2;
004c233b      eax_2 = 1;
004c233d      return 1;
004c2300  }


004c2340  class PackableList<ItemProfile>* __thiscall PackableList<ItemProfile>::operator=(class PackableList<ItemProfile>* arg1, void* arg2)

004c2340  {
004c2346      PackableList<ItemProfile>::Flush(arg1);
004c2346      
004c2356      for (class ItemProfile* i = *(uint32_t*)((char*)arg2 + 4); i != 0; i = *(int32_t*)((char*)i + 0x10))
004c2356      {
004c235f          void* esi_1 = operator new(0x18);
004c235f          
004c2366          if (esi_1 == 0)
004c2378              esi_1 = nullptr;
004c2366          else
004c2366          {
004c236b              ItemProfile::ItemProfile(esi_1, i);
004c2370              *(uint32_t*)((char*)esi_1 + 0x10) = 0;
004c2373              *(uint32_t*)((char*)esi_1 + 0x14) = 0;
004c2366          }
004c2366          
004c237d          if (arg1->head != 0)
004c237d          {
004c2384              class PackableLLNode<ItemProfile>* tail = arg1->tail;
004c2387              tail->next = esi_1;
004c238a              *(uint32_t*)((char*)esi_1 + 0x14) = tail;
004c237d          }
004c237d          else
004c237f              arg1->head = esi_1;
004c237f          
004c2390          uint32_t ecx_2 = (arg1->curNum + 1);
004c2393          arg1->tail = esi_1;
004c2396          arg1->curNum = ecx_2;
004c2396          
004c2399          if (i == 0)
004c2399              break;
004c2356      }
004c2356      
004c23a8      return arg1;
004c2340  }

004c23ab                                   90 90 90 90 90                                                             .....

004c23b0  void* __thiscall PackableList<ItemProfile>::`scalar deleting destructor'(class PackableList<ItemProfile>* this, uint32_t arg2)

004c23b0  {
004c23b3      this->vtable = 0x7b4fa8;
004c23b9      PackableList<ItemProfile>::Flush(this);
004c23c3      this->vtable = 0x79285c;
004c23c3      
004c23c9      if ((arg2 & 1) != 0)
004c23cc          operator delete(this);
004c23cc      
004c23d7      return this;
004c23b0  }

004c23da                                                                                90 90 90 90 90 90                            ......

004c23e0  void __thiscall InterfacePtr<ClientObjMaintSystem>::InterfacePtr<ClientObjMaintSystem>(class InterfacePtr<ClientObjMaintSystem>* this, class InterfacePtr<Interface> const* arg2)

004c23e0  {
004c23e4      int32_t esi;
004c23e4      int32_t var_4 = esi;
004c23e9      this->m_pInterface = 0;
004c23eb      this->m_trStatus.m_val = 0;
004c23f0      class Interface* m_pInterface;
004c23f0      int32_t* esp_1 = &m_pInterface;
004c23f5      m_pInterface = arg2->m_pInterface;
004c23f7      int32_t var_8 = 0;
004c23fa      class Interface* m_pInterface_1 = m_pInterface;
004c23fa      
004c23fe      if (m_pInterface_1 != 0)
004c23fe      {
004c2400          m_pInterface_1->vtable->AddRef();
004c2404          esp_1 = &var_4;
004c23fe      }
004c23fe      
004c240b      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[4];
004c2415      this->m_trStatus.m_val = InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(this)->m_val;
004c241a      *(uint32_t*)esp_1;
004c23e0  }

004c241e                                                                                            90 90                                ..

004c2420  void __thiscall ClientSystem::AddTextToScroll(class ClientSystem* this, class PStringBase<char> const* arg2, uint32_t arg3, uint8_t arg4, uint32_t arg5)

004c2420  {
004c2445      ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(arg2, &arg5, 0), arg3, arg4, arg5);
004c244e      int32_t* esi_2 = (arg5 - 0x14);
004c244e      
004c2461      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c2469          **(uint32_t**)esi_2(1);
004c2420  }

004c246f                                               90                                                                 .

004c2470  void __thiscall gmVendorUI::gmVendorUI(class gmVendorUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004c2470  {
004c247f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004c2484      this->vtable = &gmUrgentAssistanceUI::`vftable';
004c248e      this->vtable = &QualityChangeHandler::`vftable';
004c2498      this->vtable = &ObjectRangeHandler::`vftable';
004c24a4      this->m_vendorPanel = nullptr;
004c24aa      this->shopVendorID = 0;
004c24b0      this->shopVendorProfile = nullptr;
004c24b6      this->shopItemProfileList = nullptr;
004c24bc      this->vtable = 0x7b5618;
004c24c2      this->vtable = &gmVendorUI::`vftable'.ListenToGlobalMessage;
004c24cc      this->vtable = &gmVendorUI::`vftable'.OnLoseFocus;
004c24d6      this->vtable = &gmVendorUI::`vftable';
004c24e0      this->m_buyList.head = nullptr;
004c24e6      this->m_buyList.tail = nullptr;
004c24ec      this->m_buyList.curNum = 0;
004c24f7      this->m_buyList.vtable = 0x7b4fa8;
004c24fd      __builtin_memset(&this->m_sellList.head, 0, 0x20);
004c250f      this->m_sellList.vtable = 0x7b4fa8;
004c2470  }

004c2539                                                                             90 90 90 90 90 90 90                           .......

004c2540  class UIElement* __thiscall gmVendorUI::DynamicCast(class gmVendorUI* this, uint32_t arg2) __pure

004c2540  {
004c254c      if (arg2 == 0x10000017)
004c2559          return this;
004c2559      
004c2553      int32_t edx_1;
004c2553      edx_1 = arg2 != 3;
004c2557      return (this & (edx_1 - 1));
004c2540  }

004c255c                                                                                      90 90 90 90                              ....

004c2560  uint32_t gmVendorUI::GetUIElementType(class gmVendorUI const* this @ ecx) __pure

004c2560  {
004c2565      return 0x10000017;
004c2560  }

004c2566                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c2570  void __fastcall gmVendorUI::~gmVendorUI(class gmVendorUI* this)

004c2570  {
004c2575      class VendorItemsUI* m_itemsUI = this->m_itemsUI;
004c258c      this->vtable = 0x7b5618;
004c2580      this->vtable = &gmVendorUI::`vftable'.ListenToGlobalMessage;
004c2586      this->vtable = &gmVendorUI::`vftable'.OnLoseFocus;
004c259f      this->vtable = &gmVendorUI::`vftable';
004c259f      
004c25a9      if (m_itemsUI != 0)
004c25a9      {
004c25ac          m_itemsUI->vtable = 0x7b4f8c;
004c25b2          operator delete(m_itemsUI);
004c25a9      }
004c25a9      
004c25ba      class VendorBuyUI* m_buyUI = this->m_buyUI;
004c25c2      this->m_itemsUI = nullptr;
004c25c2      
004c25c8      if (m_buyUI != 0)
004c25c8      {
004c25cb          m_buyUI->vtable = 0x7b4f8c;
004c25d1          operator delete(m_buyUI);
004c25c8      }
004c25c8      
004c25d9      this->m_buyUI = nullptr;
004c25df      class VendorSellUI* m_sellUI = this->m_sellUI;
004c25df      
004c25e7      if (m_sellUI != 0)
004c25e7      {
004c25e9          class UIElement_ItemList* m_sellShopList = m_sellUI->m_sellShopList;
004c25ee          m_sellUI->vtable = 0x7b4f9c;
004c25f4          m_sellUI->vtable = &VendorSellUI::`vftable';
004c25f4          
004c25fb          if (m_sellShopList != 0)
004c25fd              UIElement_ItemList::UnregisterItemListDragHandler(m_sellShopList);
004c25fd          
004c2603          m_sellUI->vtable = 0x7b4f8c;
004c2609          operator delete(m_sellUI);
004c25e7      }
004c25e7      
004c2618      this->m_sellUI = nullptr;
004c2629      CPlayerSystem::UnregisterAllObjectRangeHandlers(CPlayerSystem::GetPlayerSystem(), &this->vtable);
004c2637      *(int32_t*)((char*)QualityRegistrar::s_pQR->vtable + 0x14)(&this->vtable);
004c263e      UIListener::UnRegisterForGlobalMessage(this, 3);
004c2643      class GlobalEventHandler* eax_3 = GlobalEventHandler::GetGlobalEventHandler();
004c2643      
004c264a      if (eax_3 != 0)
004c264c          eax_3->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004c264c      
004c2654      this->m_sellList.vtable = 0x7b4fa8;
004c2662      PackableList<ItemProfile>::Flush(&this->m_sellList);
004c2654      this->m_sellList.vtable = 0x79285c;
004c266d      this->m_buyList.vtable = 0x7b4fa8;
004c267b      PackableList<ItemProfile>::Flush(&this->m_buyList);
004c266d      this->m_buyList.vtable = 0x79285c;
004c2580      this->vtable = &gmUrgentAssistanceUI::`vftable';
004c268e      NoticeHandler::~NoticeHandler(&this->vtable);
004c2699      /* tailcall */
004c2699      return UIElement_Field::~UIElement_Field(this);
004c2570  }

004c269e                                                                                            90 90                                ..

004c26a0  class UIElement* gmVendorUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004c26a0  {
004c26a5      void* eax = operator new(0x648);
004c26a5      
004c26af      if (eax == 0)
004c26c5          return 0;
004c26c5      
004c26c2      return gmVendorUI::gmVendorUI(eax, arg1, arg2);
004c26a0  }

004c26c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c26d0  void __fastcall gmVendorUI::ResetShopState(class gmVendorUI* this, uint8_t arg2)

004c26d0  {
004c26d3      int32_t ebx;
004c26d3      int32_t var_14 = ebx;
004c26d4      int32_t ebp;
004c26d4      int32_t var_18 = ebp;
004c26d5      int32_t esi;
004c26d5      int32_t var_1c = esi;
004c26d6      int32_t edi;
004c26d6      int32_t var_20 = edi;
004c26d6      int32_t* esp_1 = &var_20;
004c26d6      
004c26e3      if (this->shopVendorID != 0)
004c26e3      {
004c26ed          if (arg2 == 0)
004c26ed          {
004c26f7              uint8_t* var_24_1 = &arg2;
004c26fc              struct Turbine_GUID* var_28 = &ClientObjMaintSystem_ClassType;
004c2702              arg2 = 0;
004c270d              class TResult __return;
004c270d              InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_28, var_24_1);
004c2712              struct Turbine_GUID* ecx_1 = arg2;
004c271b              var_28 = ecx_1;
004c271d              int32_t var_24_2 = 0;
004c2720              struct Turbine_GUID* eax_2 = var_28;
004c2726              int32_t var_8 = 0;
004c272a              int32_t var_4_1 = 0;
004c272a              
004c272e              if (eax_2 != 0)
004c2734                  *(uint32_t*)(eax_2->m_data1 + 0x10)();
004c2734              
004c2740              void var_c;
004c2740              InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&var_8, &var_c);
004c2740              esp_1 = &var_28;
004c2740              
004c2747              if (ecx_1 != 0)
004c274d                  *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004c274d              
004c2758              for (class PackableLLNode<ItemProfile>* i = this->m_sellList.head; i != 0; i = i->next)
004c2758              {
004c2764                  class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(i->data.iid);
004c2769                  esp_1 = &var_28;
004c2769                  
004c276e                  if (eax_4 != 0)
004c276e                  {
004c2770                      int32_t var_2c_4 = 0;
004c2773                      ACCWeenieObject::SetSellState(eax_4, 0);
004c2773                      esp_1 = &var_28;
004c276e                  }
004c2758              }
004c2758              
004c2785              class PackableLLNode<ItemProfile>* i_1 = this->shopItemProfileList->head;
004c278a              class TResult __return_1 = __return;
004c278a              
004c278e              for (; i_1 != 0; i_1 = i_1->next)
004c278e              {
004c2794                  class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(i_1->data.iid);
004c2799                  esp_1 = &var_28;
004c2799                  
004c27ac                  if ((eax_5 != 0 && eax_5->pwd._containerID == this->shopVendorID))
004c27ac                  {
004c27b8                      *(uint32_t*)(*(uint32_t*)(__return_1 + 8) + 0x1c)(i_1->data.iid);
004c27b8                      esp_1 = &var_28;
004c27ac                  }
004c278e              }
004c278e              
004c27c8              PackableList<ItemProfile>::Flush(&this->m_sellList);
004c27d3              PackableList<ItemProfile>::Flush(&this->m_buyList);
004c27d3              
004c27da              if (__return_1 != 0)
004c27e1                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004c26ed          }
004c26ed          
004c27e4          class VendorProfile* shopVendorProfile = this->shopVendorProfile;
004c27ec          this->shopVendorID = 0;
004c27ec          
004c27f2          if (shopVendorProfile != 0)
004c27f2          {
004c27f4              struct VendorProfile::VTable* vtable = shopVendorProfile->vtable;
004c27f6              *(uint32_t*)((char*)esp_1 - 4) = 1;
004c27f8              vtable->__vecDelDtor();
004c27f2          }
004c27f2          
004c27fa          class PackableList<ItemProfile>* shopItemProfileList = this->shopItemProfileList;
004c2802          this->shopVendorProfile = nullptr;
004c2802          
004c2808          if (shopItemProfileList != 0)
004c2808          {
004c280a              struct PackableList<ItemProfile>::VTable* vtable_1 = shopItemProfileList->vtable;
004c280c              *(uint32_t*)((char*)esp_1 - 4) = 1;
004c280e              vtable_1->__vecDelDtor();
004c2808          }
004c2808          
004c2810          this->shopItemProfileList = nullptr;
004c26e3      }
004c26e3      
004c2816      *(uint32_t*)esp_1;
004c2816      esp_1[1];
004c2816      esp_1[2];
004c2816      esp_1[3];
004c26d0  }


004c2820  uint8_t __thiscall gmVendorUI::BuySingleItem(class gmVendorUI* this, uint32_t arg2)

004c2820  {
004c282b      int32_t edi;
004c282b      int32_t var_c4 = edi;
004c282f      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004c282f      
004c283b      if (eax == 0)
004c283b      {
004c283e          eax = 0;
004c2847          return 0;
004c283b      }
004c283b      
004c284a      uint32_t _stackSize = eax->pwd._stackSize;
004c2857      uint32_t var_bc;
004c2857      
004c2857      if ((_stackSize == 0 || _stackSize <= 1))
004c2868          var_bc = 1;
004c2857      else
004c2862          var_bc = ItemHolder::GetObjectSplitSize(eax);
004c2862      
004c2874      int32_t ebx;
004c2874      int32_t var_c8_2 = ebx;
004c2875      int32_t ebp;
004c2875      int32_t var_cc = ebp;
004c2884      int32_t __return_3 = VendorProfile::VendorSellPrice(this->shopVendorProfile, &eax->pwd, var_bc);
004c2889      class VendorProfile* shopVendorProfile = this->shopVendorProfile;
004c288f      int32_t __return_2 = __return_3;
004c2896      int32_t __return = __return_2;
004c289a      class IDClass<_tagDataID,32,0> __return_1;
004c289a      VendorProfile::VendorTradeCurrency(shopVendorProfile, &__return_1);
004c28a9      void var_94;
004c28a9      void var_90;
004c28a9      
004c28a9      if (__return_1 != INVALID_DID.id)
004c28a9      {
004c2937          if (__return_2 <= (this->shopVendorProfile->trade_num - this->m_last_sale))
004c2937              goto label_4c29a8;
004c2937          
004c293d          StringInfo::StringInfo(&var_90);
004c294b          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_bc, &gmVendorUI::`vftable'.RecvNotice_SetSelectedSpell);
004c295b          StringInfo::SetLiteralValue(&var_90, &var_bc, 1);
004c2964          int32_t* esi_5 = (var_bc - 0x14);
004c2964          
004c2977          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004c297f              **(uint32_t**)esi_5(1);
004c297f          
004c2988          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_94);
004c2994          StringInfo::~StringInfo(&var_94);
004c299c          int32_t eax_6;
004c299c          eax_6 = 0;
004c29a5          return 0;
004c28a9      }
004c28a9      
004c28b1      void* var_d4_2;
004c28b1      
004c28b1      if (__return_2 <= this->m_totalValue)
004c28b1      {
004c29a8      label_4c29a8:
004c29a8          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004c29af          uint32_t player_id;
004c29af          
004c29af          if (SmartBox::smartbox_1 == 0)
004c29b9              player_id = 0;
004c29af          else
004c29b1              player_id = SmartBox::smartbox_1->player_id;
004c29b1          
004c29bc          class ACCWeenieObject* eax_7 = ClientObjMaintSystem::GetWeenieObject(player_id);
004c29bc          
004c29e5          if ((((eax->pwd._bitfield & "activation type (%s) with '%s' b…") == 0 && eax->pwd._itemsCapacity == 0) && eax->pwd._containersCapacity == 0))
004c29d1              goto label_4c2a1a;
004c29d1          
004c29f6          if (ACCWeenieObject::GetNumContainedContainers(eax_7) != eax_7->pwd._containersCapacity)
004c29f6          {
004c29f8              __return_2 = __return;
004c2a1a          label_4c2a1a:
004c2a1a              int32_t eax_14;
004c2a1a              int32_t _itemsCapacity;
004c2a1a              
004c2a1a              if ((((eax->pwd._bitfield & "activation type (%s) with '%s' b…") == 0 && eax->pwd._itemsCapacity == 0) && eax->pwd._containersCapacity == 0))
004c2a1a              {
004c2a1c                  _itemsCapacity = eax_7->pwd._itemsCapacity;
004c2a24                  eax_14 = ACCWeenieObject::GetNumContainedItems(eax_7);
004c2a1a              }
004c2a1a              
004c2a2b              if (((((eax->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || eax->pwd._itemsCapacity != 0) || eax->pwd._containersCapacity != 0) || eax_14 != _itemsCapacity))
004c2a2b              {
004c2a83                  void var_a0;
004c2a83                  ItemProfile::ItemProfile(&var_a0);
004c2a97                  uint32_t var_9c = var_bc;
004c2aa7                  uint32_t var_98 = arg2;
004c2aab                  int32_t var_b0 = 0x7b4fa8;
004c2aaf                  int32_t var_ac = 0;
004c2ab3                  int32_t var_a8 = 0;
004c2ab7                  int32_t var_a4 = 0;
004c2abb                  PackableList<ItemProfile>::InsertHead(&var_b0, &var_a0);
004c2abb                  
004c2aca                  if (__return_1 != INVALID_DID.id)
004c2acc                      this->m_last_sale = __return_2;
004c2acc                  
004c2ae2                  uint32_t id = VendorProfile::VendorTradeCurrency(this->shopVendorProfile, &__return)->id;
004c2ae4                  uint32_t shopVendorID = this->shopVendorID;
004c2af1                  CM_Vendor::Event_Buy(shopVendorID, &var_b0, id);
004c2af9                  ACCWeenieObject::RecordRequest(shopVendorID, IR_SHOP_EVENT);
004c2b08                  ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
004c2b11                  var_b0 = 0x7b4fa8;
004c2b15                  PackableList<ItemProfile>::Flush(&var_b0);
004c2b1e                  var_b0 = 0x79285c;
004c2b26                  ItemProfile::~ItemProfile(&var_a0);
004c2b2e                  int32_t eax_20;
004c2b2e                  eax_20 = 1;
004c2b37                  return 1;
004c2a2b              }
004c29f6          }
004c29f6          
004c2a31          StringInfo::StringInfo(&var_90);
004c2a3f          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_bc, &gmVendorUI::`vftable'.RecvNotice_AddSalvageItem);
004c2a4f          StringInfo::SetLiteralValue(&var_90, &var_bc, 1);
004c2a58          int32_t* esi_8 = (var_bc - 0x14);
004c2a58          
004c2a6b          if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
004c2a73              **(uint32_t**)esi_8(1);
004c2a73          
004c2a79          var_d4_2 = &var_94;
004c28b1      }
004c28b1      else
004c28b1      {
004c28bb          StringInfo::StringInfo(&var_90);
004c28c9          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_bc, &gmVendorUI::`vftable'.RecvNotice_SetSelectedSpell);
004c28d9          StringInfo::SetLiteralValue(&var_90, &var_bc, 1);
004c28e2          int32_t* esi_2 = (var_bc - 0x14);
004c28e2          
004c28f5          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c28fd              **(uint32_t**)esi_2(1);
004c28fd          
004c2903          var_d4_2 = &var_94;
004c28b1      }
004c28b1      
004c2906      ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_d4_2);
004c2912      StringInfo::~StringInfo(&var_94);
004c291a      int32_t eax_4;
004c291a      eax_4 = 0;
004c2923      return 0;
004c2820  }

004c2b3a                                                                                90 90 90 90 90 90                            ......

004c2b40  uint8_t __thiscall gmVendorUI::SellSingleItem(class gmVendorUI* this, uint32_t arg2)

004c2b40  {
004c2b54      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004c2b54      
004c2b62      if (eax != 0)
004c2b62      {
004c2b82          int32_t eax_1;
004c2b82          int32_t eax_2;
004c2b82          
004c2b82          if ((((eax->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || eax->pwd._itemsCapacity != 0) || eax->pwd._containersCapacity != 0))
004c2b82          {
004c2b86              eax_1 = ACCWeenieObject::GetNumContainedItems(eax);
004c2b86              
004c2b8d              if (eax_1 == 0)
004c2b91                  eax_2 = ACCWeenieObject::GetNumContainedContainers(eax);
004c2b82          }
004c2b82          
004c2b98          void var_90;
004c2b98          void* __return;
004c2b98          
004c2b98          if (((((eax->pwd._bitfield & "activation type (%s) with '%s' b…") == 0 && eax->pwd._itemsCapacity == 0) && eax->pwd._containersCapacity == 0) || (eax_1 == 0 && eax_2 == 0)))
004c2b98          {
004c2be4              uint32_t _stackSize = eax->pwd._stackSize;
004c2be4              
004c2bff              if (((_stackSize == 0 || _stackSize <= 1) || GenItemHolder::splitSize >= GenItemHolder::maxSplitSize))
004c2bff              {
004c2c5c                  void var_a0;
004c2c5c                  ItemProfile::ItemProfile(&var_a0);
004c2c65                  uint32_t var_98 = arg2;
004c2c73                  int32_t var_9c = 1;
004c2c7b                  int32_t var_b0 = 0x7b4fa8;
004c2c7f                  int32_t var_ac = 0;
004c2c83                  int32_t var_a8 = 0;
004c2c87                  int32_t var_a4 = 0;
004c2c8b                  PackableList<ItemProfile>::InsertHead(&var_b0, &var_a0);
004c2c90                  class VendorProfile* shopVendorProfile = this->shopVendorProfile;
004c2c9b                  this->m_last_sale = 0;
004c2ca1                  VendorProfile::VendorTradeCurrency(shopVendorProfile, &__return);
004c2ca6                  uint32_t shopVendorID = this->shopVendorID;
004c2cb2                  CM_Vendor::Event_Sell(shopVendorID, &var_b0);
004c2cba                  ACCWeenieObject::RecordRequest(shopVendorID, IR_SHOP_EVENT);
004c2cc9                  ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
004c2cd2                  var_b0 = 0x7b4fa8;
004c2cd6                  PackableList<ItemProfile>::Flush(&var_b0);
004c2cdf                  var_b0 = 0x79285c;
004c2ce7                  ItemProfile::~ItemProfile(&var_a0);
004c2cef                  int32_t eax_5;
004c2cef                  eax_5 = 1;
004c2cf8                  return 1;
004c2bff              }
004c2bff              
004c2c05              StringInfo::StringInfo(&var_90);
004c2c13              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &gmVendorUI::`vftable'.RecvNotice_UpdateCharacterTitleTable);
004c2c23              StringInfo::SetLiteralValue(&var_90, &__return, 1);
004c2c2c              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004c2b98          }
004c2b98          else
004c2b98          {
004c2b9e              StringInfo::StringInfo(&var_90);
004c2bac              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &gmVendorUI::`vftable'.RecvNotice_SkillAdvancementClassChanged);
004c2bbc              StringInfo::SetLiteralValue(&var_90, &__return, 1);
004c2bc5              int32_t* esi_2 = ((char*)__return - 0x14);
004c2bc5              
004c2bd8              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c2be0                  **(uint32_t**)esi_2(1);
004c2b98          }
004c2c38          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c2c44          StringInfo::~StringInfo(&var_90);
004c2b62      }
004c2b62      
004c2c4c      eax = 0;
004c2c55      return 0;
004c2b40  }

004c2cfb                                                                                   90 90 90 90 90                             .....

004c2d00  void __stdcall gmVendorUI::AdoptAsContents(class gmVendorUI* this @ ecx, class UIElement_ItemList* arg2, class PackableList<ItemProfile>* arg3, uint8_t const arg4)

004c2d00  {
004c2d0a      UIElement_ItemList::ItemList_Flush(arg2);
004c2d13      void var_10;
004c2d13      ItemProfile::ItemProfile(&var_10);
004c2d1c      class PackableLLNode<ItemProfile>* head = arg3->head;
004c2d21      class PackableLLNode<ItemProfile>* var_14 = head;
004c2d21      
004c2d25      if (head != 0)
004c2d25      {
004c2d2d          uint32_t edi;
004c2d2d          uint32_t var_28_1 = edi;
004c2e72          class PackableLLNode<ItemProfile>* next;
004c2e72          
004c2e72          do
004c2e72          {
004c2d39              ItemProfile::operator=(&var_10, var_14);
004c2d44              uint32_t var_c;
004c2d44              uint32_t var_8;
004c2d44              
004c2d44              if (arg4 == 0)
004c2d44              {
004c2e08              label_4c2e08:
004c2e08                  int32_t ebx_1 = 0;
004c2e08                  
004c2e0c                  if (var_c > 0)
004c2e0c                  {
004c2e5f                      do
004c2e5f                      {
004c2e16                          if (arg2 != 0)
004c2e16                          {
004c2e19                              class ACCWeenieObject* eax_12 = ClientObjMaintSystem::GetWeenieObject(var_8);
004c2e19                              
004c2e2c                              if ((ACCWeenieObject::GetNumContainedItems(eax_12) == 0 && ACCWeenieObject::GetNumContainedContainers(eax_12) == 0))
004c2e2c                              {
004c2e43                                  if (arg2->m_desc.m_elementID == 0x100000ce)
004c2e49                                      ACCWeenieObject::SetSellState(eax_12, 1);
004c2e49                                  
004c2e53                                  UIElement_ItemList::ItemList_InsertItem(arg2, var_8, 0xffffffff);
004c2e2c                              }
004c2e16                          }
004c2e16                          
004c2e5c                          ebx_1 += 1;
004c2e5f                      } while (ebx_1 < var_c);
004c2e0c                  }
004c2d44              }
004c2d44              else
004c2d44              {
004c2d4f                  class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(var_8);
004c2d5c                  uint32_t _stackSize_1 = 1;
004c2d5c                  
004c2d66                  if (eax_2->pwd._maxStackSize <= 1)
004c2d66                      goto label_4c2e08;
004c2d66                  
004c2d6c                  uint32_t _stackSize = eax_2->pwd._stackSize;
004c2d6c                  
004c2d7e                  if (_stackSize != 0)
004c2d80                      _stackSize_1 = _stackSize;
004c2d80                  
004c2d86                  eax_2->pwd._stackSize = var_c;
004c2d8f                  eax_2->pwd._value = ((COMBINE(0, eax_2->pwd._value) / _stackSize_1) * var_c);
004c2d95                  uint32_t eax_7 = var_8;
004c2d95                  
004c2d9f                  if (ACCWeenieObject::selectedID == eax_7)
004c2d9f                  {
004c2da4                      GenItemHolder::ItemAttributesChanged_s(eax_7, 0);
004c2da9                      eax_7 = var_8;
004c2d9f                  }
004c2d9f                  
004c2db4                  if (arg2 != 0)
004c2db4                  {
004c2dbb                      class ACCWeenieObject* eax_8 = ClientObjMaintSystem::GetWeenieObject(eax_7);
004c2dbb                      
004c2dce                      if ((ACCWeenieObject::GetNumContainedItems(eax_8) == 0 && ACCWeenieObject::GetNumContainedContainers(eax_8) == 0))
004c2dce                      {
004c2ded                          if (arg2->m_desc.m_elementID == 0x100000ce)
004c2df3                              ACCWeenieObject::SetSellState(eax_8, 1);
004c2df3                          
004c2dfd                          UIElement_ItemList::ItemList_InsertItem(arg2, eax_7, 0xffffffff);
004c2dce                      }
004c2db4                  }
004c2d44              }
004c2d44              
004c2e67              if (var_14 == 0)
004c2e67                  break;
004c2e67              
004c2e69              next = var_14->next;
004c2e6e              var_14 = next;
004c2e72          } while (next != 0);
004c2d25      }
004c2d25      
004c2e7f      ItemProfile::~ItemProfile(&var_10);
004c2d00  }

004c2e8b                                   90 90 90 90 90                                                             .....

004c2e90  void __thiscall gmVendorUI::AddMissingComp(class gmVendorUI* this, class IDClass<_tagDataID,32,0> arg2, class PStringBase<char>* arg3)

004c2e90  {
004c2e90      class gmVendorUI* var_4 = this;
004c2e91      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c2e98      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004c2ea1      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004c2ebf      ComponentTracker::GetCompNameFromWCID(CPlayerSystem::GetComponentTracker(CPlayerSystem::GetPlayerSystem()), arg2, &var_4);
004c2ece      class IDClass<_tagDataID,32,0>* ecx_2 = &arg2;
004c2ed2      void* var_14_3;
004c2ed2      int32_t* esi;
004c2ed2      
004c2ed2      if (arg3->m_charbuffer->m_data[-4] != 1)
004c2ed2      {
004c2f06          PStringBase<char>::PStringBase<char>(ecx_2, &data_794334);
004c2f0b          class IDClass<_tagDataID,32,0> eax_5 = arg2;
004c2f0f          int32_t ecx_7 = *(uint32_t*)(eax_5 - 4);
004c2f0f          
004c2f15          if (ecx_7 != 1)
004c2f15          {
004c2f1c              PStringBase<char>::append_n_chars(arg3, eax_5, (ecx_7 - 1));
004c2f21              eax_5 = arg2;
004c2f15          }
004c2f15          
004c2f25          esi = (eax_5 - 0x14);
004c2f2b          var_14_3 = &esi[1];
004c2ed2      }
004c2ed2      else
004c2ed2      {
004c2ed9          PStringBase<char>::PStringBase<char>(ecx_2, &gmVendorUI::`vftable'.RecvNotice_SetPanelVisibility);
004c2ede          class IDClass<_tagDataID,32,0> eax_4 = arg2;
004c2ee2          int32_t ecx_3 = *(uint32_t*)(eax_4 - 4);
004c2ee2          
004c2ee8          if (ecx_3 != 1)
004c2ee8          {
004c2eef              PStringBase<char>::append_n_chars(arg3, eax_4, (ecx_3 - 1));
004c2ef4              eax_4 = arg2;
004c2ee8          }
004c2ee8          
004c2ef8          esi = (eax_4 - 0x14);
004c2efe          var_14_3 = &esi[1];
004c2ed2      }
004c2ed2      
004c2f3a      if ((InterlockedDecrement(var_14_3) == 0 && esi != 0))
004c2f42          **(uint32_t**)esi(1);
004c2f42      
004c2f50      PStringBase<char>::PStringBase<char>(&arg2, &var_4->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2]);
004c2f55      class IDClass<_tagDataID,32,0> ecx_12 = arg2;
004c2f59      int32_t eax_10 = *(uint32_t*)(ecx_12 - 4);
004c2f59      
004c2f5f      if (eax_10 != 1)
004c2f5f      {
004c2f66          PStringBase<char>::append_n_chars(arg3, ecx_12, (eax_10 - 1));
004c2f6b          ecx_12 = arg2;
004c2f5f      }
004c2f5f      
004c2f7e      if ((InterlockedDecrement((ecx_12 - 0x10)) == 0 && ecx_12 != 0x14))
004c2f86          **(uint32_t**)(ecx_12 - 0x14)(1);
004c2f86      
004c2f88      class gmVendorUI* esi_2 = var_4;
004c2f88      
004c2f98      if ((InterlockedDecrement(&esi_2->m_hashElementsRegisteredWith) == 0 && esi_2 != 0))
004c2f9a          esi_2->vtable->__vecDelDtor(1);
004c2e90  }

004c2fa9                             90 90 90 90 90 90 90                                                           .......

004c2fb0  void __fastcall VendorSellUI::OpenVendor(class VendorSellUI* this, uint8_t arg2)

004c2fb0  {
004c2fb3      class gmVendorUI* m_parent = this->m_parent;
004c2fc3      gmVendorUI::AdoptAsContents(m_parent, this->m_sellShopList, &m_parent->m_sellList, 0);
004c2fca      VendorSellUI::UpdateSellUI(this);
004c2fb0  }

004c2fd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c2fe0  void* __thiscall gmVendorUI::`scalar deleting destructor'(class gmVendorUI* this, uint32_t arg2)

004c2fe0  {
004c2fe3      gmVendorUI::~gmVendorUI(this);
004c2fe3      
004c2fed      if ((arg2 & 1) != 0)
004c2ff0          operator delete(this);
004c2ff0      
004c2ffb      return this;
004c2fe0  }

004c2ffe                                                                                            90 90                                ..

004c3000  void gmVendorUI::Register()

004c3000  {
004c300a      UIElement::RegisterElementClass(0x10000017, gmVendorUI::Create);
004c3000  }

004c3013                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c3020  void __thiscall gmVendorUI::CloseVendor(class gmVendorUI* this, uint8_t arg2)

004c3020  {
004c3021      int32_t ebx = arg2;
004c302a      uint8_t edx;
004c302a      
004c302a      if (ebx == 0)
004c302a      {
004c302c          this->m_itemsUI->vtable->CloseVendor();
004c3037          this->m_sellUI->vtable->CloseVendor();
004c304a          edx = this->m_buyUI->vtable->CloseVendor();
004c302a      }
004c302a      
004c304d      uint32_t shopVendorID = this->shopVendorID;
004c304d      
004c3055      if (shopVendorID != 0)
004c3066          edx = CPlayerSystem::UnregisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), &this->vtable, shopVendorID);
004c3066      
004c306b      int32_t var_c_2 = ebx;
004c306e      gmVendorUI::ResetShopState(this, edx);
004c3020  }

004c3078                                                                          90 90 90 90 90 90 90 90                          ........

004c3080  void gmVendorUI::CloseVendorDialogCallback(class PropertyCollection const* arg1)

004c3080  {
004c308e      uint32_t temp1 = (COMBINE(0, 0x92) % arg1->m_hashProperties.m_intrusiveTable.m_numBuckets);
004c3091      class HashTableData<unsigned long,BaseProperty>** m_buckets = arg1->m_hashProperties.m_intrusiveTable.m_buckets;
004c3097      char var_9 = 0;
004c309b      int32_t* var_8 = nullptr;
004c309f      int32_t* var_4 = nullptr;
004c30a6      int32_t* eax_2 = m_buckets[temp1];
004c30a6      
004c30aa      if (eax_2 != 0)
004c30aa      {
004c30b6          while (*(uint32_t*)eax_2 != 0x92)
004c30b6          {
004c30b8              eax_2 = eax_2[1];
004c30b8              
004c30bd              if (eax_2 == 0)
004c30c3                  return;
004c30b6          }
004c30b6          
004c30c6          if (eax_2 != 0)
004c30c6          {
004c30d0              BaseProperty::operator=(&var_8, &eax_2[2]);
004c30d5              int32_t* ecx_2 = var_4;
004c30db              gmVendorUI::m_curDialogContext = 0;
004c30db              
004c30e1              if (ecx_2 != 0)
004c30e1              {
004c30ea                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&var_9);
004c30ed                  ecx_2 = var_4;
004c30e1              }
004c30e1              
004c30f5              if (var_9 != 0)
004c30f5              {
004c30f8                  CM_Vendor::SendNotice_CloseVendor(0);
004c30fd                  ecx_2 = var_4;
004c30f5              }
004c30f5              
004c3104              int32_t* eax_4 = var_8;
004c3104              
004c310a              if (eax_4 != 0)
004c310a              {
004c3114                  int32_t edx_4 = (eax_4[1] - 1);
004c3111                  eax_4[1] = edx_4;
004c3111                  
004c3119                  if (edx_4 == 0)
004c311f                      **(uint32_t**)eax_4(1);
004c311f                  
004c3121                  ecx_2 = var_4;
004c3125                  var_8 = nullptr;
004c310a              }
004c310a              
004c312b              if (ecx_2 != 0)
004c312b              {
004c3133                  int32_t edx_7 = (ecx_2[1] - 1);
004c3130                  ecx_2[1] = edx_7;
004c3130                  
004c3138                  if (edx_7 == 0)
004c313e                      **(uint32_t**)ecx_2(1);
004c312b              }
004c30c6          }
004c30aa      }
004c3080  }

004c3145                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004c3150  void __fastcall VendorBuyUI::UpdateTransactionValue(class VendorBuyUI* this)

004c3150  {
004c3158      class UIElement_ItemList* m_buyShopList = this->m_buyShopList;
004c315b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = nullptr;
004c315d      this->m_transactionValue = 0;
004c3167      uint32_t i = 0;
004c3169      bool cond:0 = m_buyShopList->m_listItems.m_num <= 0;
004c316b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = nullptr;
004c316b      
004c316f      if (!(cond:0))
004c316f      {
004c31ea          do
004c31ea          {
004c3175              class UIElement* eax = UIElement_ListBox::GetItem(this->m_buyShopList, i);
004c3175              
004c317c              if (eax != 0)
004c317c              {
004c3187                  void* eax_1 = eax->vtable->DynamicCast(0x10000032);
004c3187                  
004c318f                  if (eax_1 != 0)
004c318f                  {
004c3191                      uint32_t eax_2 = *(uint32_t*)((char*)eax_1 + 0x5fc);
004c3191                      
004c3199                      if (eax_2 != 0)
004c3199                      {
004c319c                          class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(eax_2);
004c319c                          
004c31a6                          if (eax_3 != 0)
004c31a6                          {
004c31a8                              uint32_t _stackSize = eax_3->pwd._stackSize;
004c31b0                              uint32_t _stackSize_1 = _stackSize;
004c31b0                              
004c31b2                              if (_stackSize == 0)
004c31b4                                  _stackSize_1 = 1;
004c31b4                              
004c31b9                              AC1Legacy::PStringBase<char>::s_NullBuffer_8 += _stackSize_1;
004c31bd                              uint32_t _stackSize_2 = _stackSize;
004c31bd                              
004c31bf                              if (_stackSize == 0)
004c31c1                                  _stackSize_2 = 1;
004c31c1                              
004c31d6                              int32_t eax_5 = VendorProfile::VendorSellPrice(this->m_parent->shopVendorProfile, &eax_3->pwd, _stackSize_2);
004c31db                              this->m_transactionValue += eax_5;
004c31a6                          }
004c3199                      }
004c318f                  }
004c317c              }
004c317c              
004c31e7              i += 1;
004c31ea          } while (i < this->m_buyShopList->m_listItems.m_num);
004c31ea          
004c31ec          AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
004c316f      }
004c316f      
004c31fe      class IDClass<_tagDataID,32,0> __return;
004c31fe      VendorProfile::VendorTradeCurrency(this->m_parent->shopVendorProfile, &__return);
004c320d      int32_t m_transactionValue_1;
004c320d      
004c320d      if (__return != INVALID_DID.id)
004c320d      {
004c3305          class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_parent->shopVendorProfile->trade_name.m_buffer;
004c3312          InterlockedIncrement(&m_buffer->m_cRef);
004c3314          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3319          AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004c3321          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004c3326          void (__thiscall** const eax_19)(class gmNoticeHandler* this, uint32_t, int32_t, int32_t) = &gmVendorUI::`vftable'.RecvNotice_BookDeletePageResponse;
004c3326          
004c332b          if (AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 1)
004c332d              eax_19 = &gmVendorUI::`vftable'.RecvNotice_OpenVendor;
004c332d          
004c3338          char (* var_24_15)[0x1] = &m_buffer->m_data;
004c3339          int32_t m_transactionValue = this->m_transactionValue;
004c333a          void (__thiscall** const var_2c)(class gmNoticeHandler* this, uint32_t, int32_t, int32_t) = eax_19;
004c333b          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
004c3346          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_5, &gmVendorUI::`vftable'.RecvNotice_UpdateRadarVisibility);
004c334b          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004c3352          char (* var_3c_1)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_data;
004c335f          class PStringBase<unsigned short>* eax_21 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_transactionValue_1, Formatted, &data_79f3f0);
004c336b          UIElement_Text::SetText(this->m_buyListText, eax_21);
004c337a          int32_t* esi_4 = (m_transactionValue_1 - 0x14);
004c337a          
004c3389          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004c3391              **(uint32_t**)esi_4(1);
004c3391          
004c339f          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_7 != 0))
004c33a1              AC1Legacy::PStringBase<char>::s_NullBuffer_7->vtable->__vecDelDtor(1);
004c33a1          
004c33b5          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004c33b7              m_buffer->vtable->__vecDelDtor(1);
004c320d      }
004c320d      else
004c320d      {
004c3213          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3223          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004c3227          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004c322c          m_transactionValue_1 = this->m_transactionValue;
004c322c          
004c3236          if (AC1Legacy::PStringBase<char>::s_NullBuffer_3 != AC1Legacy::PStringBase<char>::s_NullBuffer)
004c3236          {
004c3247              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004c3249                  AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
004c3249              
004c3251              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3256              AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004c325e              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004c3236          }
004c3236          
004c3271          AC1Legacy::PStringBase<char>::append_int32(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, m_transactionValue_1);
004c327a          AC1Legacy::PStringBase<char>::InsertCommas(&AC1Legacy::PStringBase<char>::s_NullBuffer_4);
004c327f          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004c3286          wchar16 const* const eax_11 = u"item";
004c3286          
004c328b          if (AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 1)
004c328d              eax_11 = u"items";
004c328d          
004c3292          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004c3299          char (* var_24_9)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_data;
004c329a          wchar16 const* const var_28_2 = eax_11;
004c329b          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004c32a8          class PStringBase<unsigned short>* eax_12 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_transactionValue_1, Formatted, &gmVendorUI::`vftable'.RecvNotice_OpenBook);
004c32b4          UIElement_Text::SetText(this->m_buyListText, eax_12);
004c32bd          int32_t* esi_2 = (m_transactionValue_1 - 0x14);
004c32bd          
004c32cc          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c32d4              **(uint32_t**)esi_2(1);
004c32d4          
004c32e6          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_9 != 0))
004c32ec              AC1Legacy::PStringBase<char>::s_NullBuffer_9->vtable->__vecDelDtor(1);
004c320d      }
004c3150  }

004c33c7                       90 90 90 90 90 90 90 90 90                                                         .........

004c33d0  void __fastcall VendorBuyUI::UpdateTotalValue(class VendorBuyUI* this)

004c33d0  {
004c33dd      uint32_t id = INVALID_DID.id;
004c33e4      class VendorProfile* shopVendorProfile = this->m_parent->shopVendorProfile;
004c33ed      class IDClass<_tagDataID,32,0> m_totalValue;
004c33ed      
004c33ed      if (shopVendorProfile != 0)
004c33ff          id = VendorProfile::VendorTradeCurrency(shopVendorProfile, &m_totalValue)->id;
004c33ff      
004c3403      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3413      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004c3417      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
004c3422      bool cond:1 = AC1Legacy::PStringBase<char>::s_NullBuffer_3 == AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3428      m_totalValue = this->m_parent->m_totalValue;
004c3428      
004c342c      if (!(cond:1))
004c342c      {
004c343b          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
004c343d              AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
004c343d          
004c3445          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c344a          AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004c3452          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004c342c      }
004c342c      
004c345d      AC1Legacy::PStringBase<char>::append_int32(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, m_totalValue);
004c3466      AC1Legacy::PStringBase<char>::InsertCommas(&AC1Legacy::PStringBase<char>::s_NullBuffer_4);
004c3475      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004c3475      
004c3475      if (id != INVALID_DID.id)
004c3475      {
004c34d3          class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_parent->shopVendorProfile->trade_name.m_buffer;
004c34da          InterlockedIncrement(&m_buffer->m_cRef);
004c34dc          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c34e1          id = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004c34e9          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004c34eb          class gmVendorUI* m_parent = this->m_parent;
004c34f7          char (* var_20_11)[0x1] = &m_buffer->m_data;
004c3501          int32_t var_24_1 = (m_parent->shopVendorProfile->trade_num - m_parent->m_last_sale);
004c350c          AC1Legacy::PStringBase<char>::sprintf(&id, "You have %d %s.");
004c3511          uint32_t id_1 = id;
004c3518          int32_t var_30_1 = (id_1 + 0x14);
004c3525          class PStringBase<unsigned short>* eax_12 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_totalValue, Formatted, &data_79f3f0);
004c3531          UIElement_Text::SetText(this->m_buyPurseText, eax_12);
004c353a          int32_t* esi_4 = (m_totalValue - 0x14);
004c353a          
004c354d          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004c3555              **(uint32_t**)esi_4(1);
004c3555          
004c3569          if ((InterlockedDecrement((id_1 + 4)) == 0 && id_1 != 0))
004c3571              **(uint32_t**)id_1(1);
004c3571          
004c357c          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004c357e              m_buffer->vtable->__vecDelDtor(1);
004c357e          
004c3586          AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004c3475      }
004c3475      else
004c3475      {
004c3477          AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004c347e          char (* var_20_6)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_data;
004c348b          class PStringBase<unsigned short>* eax_8 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_totalValue, Formatted, u"You have %hsp");
004c3497          UIElement_Text::SetText(this->m_buyPurseText, eax_8);
004c34a0          int32_t* esi_2 = (m_totalValue - 0x14);
004c34a0          
004c34b7          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c34c3              **(uint32_t**)esi_2(1);
004c3475      }
004c3475      
004c359a      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
004c359c          AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
004c33d0  }

004c35ac                                      90 90 90 90                                                              ....

004c35b0  void __fastcall VendorSellUI::UpdateTransactionValue(class VendorSellUI* this)

004c35b0  {
004c35b8      class gmVendorUI* m_parent = this->m_parent;
004c35bc      uint32_t i = 0;
004c35be      this->m_transactionValue = 0;
004c35c7      int32_t ebp = 0;
004c35ca      int32_t var_8 = 0;
004c35ce      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(m_parent->shopVendorID);
004c35ce      
004c35da      if (eax_1 != 0)
004c35da      {
004c35eb          if (this->m_sellShopList->m_listItems.m_num > 0)
004c35eb          {
004c3662              do
004c3662              {
004c35f4                  class UIElement* eax_3 = UIElement_ListBox::GetItem(this->m_sellShopList, i);
004c35f4                  
004c35fb                  if (eax_3 != 0)
004c35fb                  {
004c3606                      void* eax_4 = eax_3->vtable->DynamicCast(0x10000032);
004c3606                      
004c360e                      if (eax_4 != 0)
004c360e                      {
004c3610                          uint32_t eax_5 = *(uint32_t*)((char*)eax_4 + 0x5fc);
004c3610                          
004c3618                          if (eax_5 != 0)
004c3618                          {
004c361b                              class ACCWeenieObject* eax_6 = ClientObjMaintSystem::GetWeenieObject(eax_5);
004c361b                              
004c3625                              if (eax_6 != 0)
004c3625                              {
004c3627                                  uint32_t _stackSize = eax_6->pwd._stackSize;
004c3627                                  
004c362f                                  if (_stackSize == 0)
004c3631                                      _stackSize = 1;
004c3631                                  
004c3636                                  ebp += _stackSize;
004c364e                                  int32_t eax_8 = VendorProfile::VendorBuyPrice(this->m_parent->shopVendorProfile, &eax_1->pwd, &eax_6->pwd);
004c3653                                  this->m_transactionValue += eax_8;
004c3625                              }
004c3618                          }
004c360e                      }
004c35fb                  }
004c35fb                  
004c365f                  i += 1;
004c3662              } while (i < this->m_sellShopList->m_listItems.m_num);
004c3662              
004c3664              var_8 = ebp;
004c35eb          }
004c35eb          
004c3668          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3678          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004c367c          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004c367e          bool cond:0_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2 == AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3687          int32_t m_transactionValue = this->m_transactionValue;
004c3687          
004c368b          if (!(cond:0_1))
004c368b          {
004c369c              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
004c369e                  AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
004c369e              
004c36a6              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c36ab              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004c36b3              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004c368b          }
004c368b          
004c36c6          AC1Legacy::PStringBase<char>::append_int32(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, m_transactionValue);
004c36cf          AC1Legacy::PStringBase<char>::InsertCommas(&AC1Legacy::PStringBase<char>::s_NullBuffer_3);
004c36db          wchar16 const* const eax_13 = u"item";
004c36db          
004c36e0          if (var_8 != 1)
004c36e2              eax_13 = u"items";
004c36e2          
004c36e7          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004c36ee          char (* var_20_8)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data;
004c36ef          wchar16 const* const var_24_2 = eax_13;
004c36f0          int32_t var_28_1 = var_8;
004c36fd          class PStringBase<unsigned short>* eax_14 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_transactionValue, Formatted, u"Selling %d %s worth %hsp");
004c3709          UIElement_Text::SetText(this->m_sellListText, eax_14);
004c3712          int32_t* esi_2 = (m_transactionValue - 0x14);
004c3712          
004c3721          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c3729              **(uint32_t**)esi_2(1);
004c3729          
004c3737          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004c3739              AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004c35da      }
004c35b0  }

004c3749                             90 90 90 90 90 90 90                                                           .......

004c3750  void __fastcall VendorSellUI::UpdateTotalValue(class VendorSellUI* this)

004c3750  {
004c3750      class VendorSellUI* var_4 = this;
004c3754      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3761      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004c3765      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004c376e      int32_t m_totalValue = this->m_parent->m_totalValue;
004c376e      
004c377a      if (AC1Legacy::PStringBase<char>::s_NullBuffer_2 != AC1Legacy::PStringBase<char>::s_NullBuffer)
004c377a      {
004c3789          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
004c378b              AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
004c378b          
004c3793          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3798          var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004c37a0          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004c377a      }
004c377a      
004c37ab      AC1Legacy::PStringBase<char>::append_int32(&var_4, m_totalValue);
004c37b4      AC1Legacy::PStringBase<char>::InsertCommas(&var_4);
004c37b9      class VendorSellUI* ebx_1 = var_4;
004c37c0      class UIElement_Text** var_18_4 = &ebx_1->m_sellPurseText;
004c37cd      class PStringBase<unsigned short>* eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, Formatted, u"You have %hsp");
004c37d9      UIElement_Text::SetText(this->m_sellPurseText, eax_4);
004c37e8      void* __offset(VendorSellUI, -0x14) esi_1 = ((char*)var_4 - 0x14);
004c37e8      
004c37f7      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004c37ff          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004c37ff      
004c380d      if ((InterlockedDecrement(&ebx_1->m_parent) == 0 && ebx_1 != 0))
004c380f          ebx_1->vtable->OpenVendor(1);
004c3750  }

004c381d                                                                                         90 90 90                               ...

004c3820  void __thiscall gmVendorUI::OnVisibilityChanged(class gmVendorUI* this, uint8_t arg2)

004c3820  {
004c3829      UIElement::OnVisibilityChanged(this, arg2);
004c3829      
004c3841      if (((((int8_t)(this->__inner23 >> 0x11)) & 1) != 0 && arg2 == 0))
004c3841      {
004c3847          this->m_itemsUI->vtable->CloseVendor();
004c3852          this->m_sellUI->vtable->CloseVendor();
004c3865          uint8_t edx_3 = this->m_buyUI->vtable->CloseVendor();
004c3868          uint32_t shopVendorID = this->shopVendorID;
004c3868          
004c3870          if (shopVendorID != 0)
004c3881              edx_3 = CPlayerSystem::UnregisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), &this->vtable, shopVendorID);
004c3881          
004c3886          int32_t var_c_2 = 0;
004c388a          gmVendorUI::ResetShopState(this, edx_3);
004c3898          ClientUISystem::CloseVendor(ClientUISystem::GetUISystem(), 0);
004c389d          GlobalEventHandler::GetGlobalEventHandler()->vtable->UnRegisterNoticeHandler(0x4dd264, &this->vtable);
004c38b5          uint32_t gmVendorUI::m_curDialogContext_1 = gmVendorUI::m_curDialogContext;
004c38b5          
004c38bc          if (gmVendorUI::m_curDialogContext_1 != 0)
004c38bc          {
004c38bf              DialogFactory::CloseDialog(gmVendorUI::m_curDialogContext_1);
004c38c7              gmVendorUI::m_curDialogContext = 0;
004c38bc          }
004c3841      }
004c3820  }

004c38d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c38e0  void __fastcall VendorItemsUI::UpdateItemsUI(class VendorItemsUI* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004c38e0  {
004c38e3      int32_t ebx;
004c38e3      int32_t var_28 = ebx;
004c38e4      int32_t ebp;
004c38e4      int32_t var_2c = ebp;
004c38e5      int32_t esi;
004c38e5      int32_t var_30 = esi;
004c38e6      class VendorItemsUI* this_1 = this;
004c38e8      int32_t edi;
004c38e8      int32_t var_34 = edi;
004c38ed      void var_10;
004c38ed      ItemProfile::ItemProfile(&var_10);
004c38f2      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004c38fa      class UIElement_ItemList* m_shopList;
004c38fa      uint32_t __return_7;
004c38fa      
004c38fa      if (ACCWeenieObject::selectedID_1 != 0)
004c38fa      {
004c38fc          m_shopList = this_1->m_shopList;
004c3905          __return_7 = 0;
004c38fa      }
004c38fa      
004c3909      int32_t* esp;
004c3909      uint32_t __return;
004c3909      
004c3909      if ((ACCWeenieObject::selectedID_1 == 0 || m_shopList->m_listItems.m_num <= 0))
004c3909      {
004c3946      label_4c3946:
004c3946          UIElement_Text::ClearAllText(this_1->m_itemNameText);
004c394e          UIElement_Text::ClearAllText(this_1->m_itemCostText);
004c3956          struct UIElement::VTable* vtable = this_1->m_buyButton->vtable;
004c3958          __return = 0xd;
004c395a          vtable->SetState(__return);
004c3963          struct UIElement::VTable* vtable_5 = this_1->m_addButton->vtable;
004c3965          __return = 0xd;
004c3967          vtable_5->SetState(__return);
004c3967          esp = &var_34;
004c3909      }
004c3909      else
004c3909      {
004c3910          while (true)
004c3910          {
004c3910              __return = __return_7;
004c3911              class UIElement* eax_2 = UIElement_ListBox::GetItem(m_shopList, __return);
004c3911              
004c3918              if (eax_2 != 0)
004c3918              {
004c391a                  struct UIElement::VTable* vtable_4 = eax_2->vtable;
004c391c                  __return = 0x10000032;
004c3923                  void* eax_3 = vtable_4->DynamicCast(__return);
004c3923                  
004c3933                  if ((eax_3 != 0 && *(uint32_t*)((char*)eax_3 + 0x5fc) == ACCWeenieObject::selectedID_1))
004c3933                  {
004c397e                      __return = ACCWeenieObject::selectedID_1;
004c397f                      class ACCWeenieObject* __return_1 = ClientObjMaintSystem::GetWeenieObject(__return);
004c3986                      esp = &var_34;
004c3986                      
004c398b                      if (__return_1 != 0)
004c398b                      {
004c398d                          __return = __return_1;
004c3996                          bool cond:0_1 = ItemHolder::GetObjectSplitSize(__return) <= 1;
004c399b                          __return = 0;
004c399d                          int32_t var_18;
004c399d                          int32_t* ebx_3;
004c399d                          
004c399d                          if (cond:0_1)
004c399d                          {
004c39e2                              __return = ACCWeenieObject::GetObjectName(__return_1, NAME_SINGULAR, __return);
004c39e9                              uint32_t __return_3;
004c39e9                              __return_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, WidthConvert, __return);
004c39ee                              class UIElement_Text* m_itemNameText_1 = this_1->m_itemNameText;
004c39f1                              __return = __return_3;
004c39f2                              UIElement_Text::SetText(m_itemNameText_1, __return);
004c39fb                              ebx_3 = (var_18 - 0x14);
004c3a01                              __return = &ebx_3[1];
004c399d                          }
004c399d                          else
004c399d                          {
004c39a6                              __return = ACCWeenieObject::GetObjectName(__return_1, NAME_PLURAL, __return);
004c39b0                              uint32_t var_3c_2 = ItemHolder::GetObjectSplitSize(__return_1);
004c39bd                              uint32_t __return_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, Formatted, &gmToolbarUI::`vftable'.RecvNotice_SetDisplayInventory);
004c39c2                              class UIElement_Text* m_itemNameText = this_1->m_itemNameText;
004c39c8                              __return = __return_2;
004c39c9                              UIElement_Text::SetText(m_itemNameText, __return);
004c39d2                              ebx_3 = (var_18 - 0x14);
004c39d8                              __return = &ebx_3[1];
004c399d                          }
004c399d                          
004c3a0e                          if ((InterlockedDecrement() == 0 && ebx_3 != 0))
004c3a0e                          {
004c3a10                              int32_t edx_1 = *(uint32_t*)ebx_3;
004c3a14                              __return = 1;
004c3a16                              *(uint32_t*)edx_1(__return);
004c3a0e                          }
004c3a0e                          
004c3a18                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3a27                          __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef;
004c3a28                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004c3a2c                          InterlockedIncrement(__return);
004c3a31                          class VendorProfile* shopVendorProfile = this_1->m_parent->shopVendorProfile;
004c3a37                          __return = __return_1;
004c3a38                          var_18 = shopVendorProfile;
004c3a3c                          uint32_t __return_4 = ItemHolder::GetObjectSplitSize(__return);
004c3a41                          class VendorProfile* ecx_11 = var_18;
004c3a48                          __return = __return_4;
004c3a55                          var_18 = VendorProfile::VendorSellPrice(ecx_11, &__return_1->pwd, __return);
004c3a55                          
004c3a5f                          if (AC1Legacy::PStringBase<char>::s_NullBuffer_4 != AC1Legacy::PStringBase<char>::s_NullBuffer)
004c3a5f                          {
004c3a64                              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef;
004c3a64                              
004c3a71                              if ((InterlockedDecrement(__return) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004c3a71                              {
004c3a73                                  struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable;
004c3a76                                  __return = 1;
004c3a7a                                  vtable_1->__vecDelDtor(__return);
004c3a71                              }
004c3a71                              
004c3a7c                              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3a81                              AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004c3a88                              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
004c3a89                              InterlockedIncrement(__return);
004c3a5f                          }
004c3a5f                          
004c3a8f                          __return = var_18;
004c3a94                          AC1Legacy::PStringBase<char>::append_int32(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, __return);
004c3a9d                          AC1Legacy::PStringBase<char>::InsertCommas(&AC1Legacy::PStringBase<char>::s_NullBuffer_7);
004c3aa2                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3aab                          __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef;
004c3aac                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
004c3ab0                          InterlockedIncrement(__return);
004c3abb                          int32_t m_totalValue = this_1->m_parent->m_totalValue;
004c3abb                          
004c3ac5                          if (AC1Legacy::PStringBase<char>::s_NullBuffer_5 != AC1Legacy::PStringBase<char>::s_NullBuffer)
004c3ac5                          {
004c3aca                              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef;
004c3aca                              
004c3ad7                              if ((InterlockedDecrement(__return) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
004c3ad7                              {
004c3ad9                                  struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable;
004c3adc                                  __return = 1;
004c3ae0                                  vtable_6->__vecDelDtor(__return);
004c3ad7                              }
004c3ad7                              
004c3ae2                              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3ae7                              AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004c3aee                              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef;
004c3aef                              InterlockedIncrement(__return);
004c3ac5                          }
004c3ac5                          
004c3af5                          __return = m_totalValue;
004c3afa                          AC1Legacy::PStringBase<char>::append_int32(&AC1Legacy::PStringBase<char>::s_NullBuffer_6, __return);
004c3b03                          AC1Legacy::PStringBase<char>::InsertCommas(&AC1Legacy::PStringBase<char>::s_NullBuffer_6);
004c3b08                          class gmVendorUI* m_parent_1 = this_1->m_parent;
004c3b0f                          int32_t var_14;
004c3b0f                          __return = &var_14;
004c3b16                          VendorProfile::VendorTradeCurrency(m_parent_1->shopVendorProfile, __return);
004c3b25                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8;
004c3b25                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9;
004c3b25                          
004c3b25                          if (var_14 != INVALID_DID.id)
004c3b25                          {
004c3ba4                              class AC1Legacy::PSRefBuffer<char>* m_buffer = this_1->m_parent->shopVendorProfile->trade_name.m_buffer;
004c3baa                              __return = &m_buffer->m_cRef;
004c3bab                              InterlockedIncrement(__return);
004c3bad                              int32_t AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c3bb2                              m_totalValue = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004c3bb9                              __return = (AC1Legacy::PStringBase<char>::s_NullBuffer_3 + 4);
004c3bba                              InterlockedIncrement(__return);
004c3bbc                              class gmVendorUI* m_parent = this_1->m_parent;
004c3bc5                              int32_t m_last_sale = m_parent->m_last_sale;
004c3bcb                              int32_t trade_num = m_parent->shopVendorProfile->trade_num;
004c3bd1                              __return = &m_buffer->m_data;
004c3bd4                              int32_t var_3c_5 = (trade_num - m_last_sale);
004c3bd5                              char (* var_40_2)[0x1] = &m_buffer->m_data;
004c3bda                              int32_t var_44_1 = var_18;
004c3be5                              AC1Legacy::PStringBase<char>::sprintf(&m_totalValue, "This item costs %d %s. You have …");
004c3bf1                              int32_t var_50_1 = (m_totalValue + 0x14);
004c3bfe                              uint32_t __return_6 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, Formatted, &data_79f3f0);
004c3c03                              class UIElement_Text* m_itemCostText_1 = this_1->m_itemCostText;
004c3c09                              __return = __return_6;
004c3c0a                              UIElement_Text::SetText(m_itemCostText_1, __return);
004c3c13                              int32_t* ebx_6 = (var_18 - 0x14);
004c3c19                              __return = &ebx_6[1];
004c3c19                              
004c3c26                              if ((InterlockedDecrement(__return) == 0 && ebx_6 != 0))
004c3c26                              {
004c3c28                                  int32_t edx_10 = *(uint32_t*)ebx_6;
004c3c2a                                  __return = 1;
004c3c2e                                  *(uint32_t*)edx_10(__return);
004c3c26                              }
004c3c26                              
004c3c30                              int32_t m_totalValue_1 = m_totalValue;
004c3c37                              __return = (m_totalValue_1 + 4);
004c3c37                              
004c3c44                              if ((InterlockedDecrement(__return) == 0 && m_totalValue_1 != 0))
004c3c44                              {
004c3c46                                  int32_t edx_11 = *(uint32_t*)m_totalValue_1;
004c3c48                                  __return = 1;
004c3c4c                                  *(uint32_t*)edx_11(__return);
004c3c44                              }
004c3c44                              
004c3c4e                              __return = &m_buffer->m_cRef;
004c3c4e                              
004c3c5b                              if ((InterlockedDecrement(__return) == 0 && m_buffer != 0))
004c3c5b                              {
004c3c5d                                  struct AC1Legacy::PSRefBuffer<char>::VTable* vtable_2 = m_buffer->vtable;
004c3c5f                                  __return = 1;
004c3c63                                  vtable_2->__vecDelDtor(__return);
004c3c5b                              }
004c3c5b                              
004c3c65                              AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004c3c69                              AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004c3b25                          }
004c3b25                          else
004c3b25                          {
004c3b27                              __return = __return_1;
004c3b33                              wchar16 const* const eax_25 = u"cost";
004c3b33                              
004c3b38                              if (ItemHolder::GetObjectSplitSize(__return) <= 1)
004c3b3a                                  eax_25 = u"costs";
004c3b3a                              
004c3b3f                              AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
004c3b43                              AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
004c3b4a                              __return = &AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_data;
004c3b4e                              char (* var_3c_4)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_data;
004c3b4f                              wchar16 const* const var_40_1 = eax_25;
004c3b5c                              uint32_t __return_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, Formatted, u"%s %hsp (you have %hsp)");
004c3b61                              class UIElement_Text* m_itemCostText = this_1->m_itemCostText;
004c3b67                              __return = __return_5;
004c3b68                              UIElement_Text::SetText(m_itemCostText, __return);
004c3b71                              int32_t* edi_4 = (var_18 - 0x14);
004c3b77                              __return = &edi_4[1];
004c3b77                              
004c3b88                              if ((InterlockedDecrement(__return) == 0 && edi_4 != 0))
004c3b88                              {
004c3b8e                                  int32_t edx_5 = *(uint32_t*)edi_4;
004c3b90                                  __return = 1;
004c3b94                                  *(uint32_t*)edx_5(__return);
004c3b88                              }
004c3b25                          }
004c3b25                          
004c3c70                          struct UIElement::VTable* vtable_7 = this_1->m_buyButton->vtable;
004c3c72                          __return = 1;
004c3c74                          vtable_7->SetState(__return);
004c3c7d                          struct UIElement::VTable* vtable_3 = this_1->m_addButton->vtable;
004c3c7f                          __return = 1;
004c3c83                          vtable_3->SetState(__return);
004c3c83                          
004c3c9b                          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
004c3c9d                              AC1Legacy::PStringBase<char>::s_NullBuffer_8->vtable->__vecDelDtor(1);
004c3c9d                          
004c3ca9                          esp = &__return;
004c3ca9                          
004c3cb5                          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_9 != 0))
004c3cb5                          {
004c3cbb                              AC1Legacy::PStringBase<char>::s_NullBuffer_9->vtable->__vecDelDtor(1);
004c3cc8                              ItemProfile::~ItemProfile(&var_18);
004c3cd4                              return;
004c3cb5                          }
004c398b                      }
004c398b                      
004c398b                      break;
004c3933                  }
004c3918              }
004c3918              
004c3935              m_shopList = this_1->m_shopList;
004c393e              __return_7 += 1;
004c393e              
004c3941              if (__return_7 >= m_shopList->m_listItems.m_num)
004c3941                  goto label_4c3946;
004c3910          }
004c3909      }
004c3971      ItemProfile::~ItemProfile(&esp[9]);
004c3976      *(uint32_t*)esp;
004c3976      esp[1];
004c3976      esp[2];
004c3976      esp[3];
004c38e0  }

004c390d                                         8d 49 00                                                               .I.
004c3cd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c3ce0  void __thiscall VendorItemsUI::RemoveFromShop(class VendorItemsUI* this, class ACCWeenieObject* arg2, int32_t arg3)

004c3ce0  {
004c3ceb      void var_10;
004c3ceb      ItemProfile::ItemProfile(&var_10);
004c3ceb      
004c3d05      for (class PackableLLNode<ItemProfile>* i = this->m_parent->shopItemProfileList->head; i != 0; i = i->next)
004c3d05      {
004c3d0a          if (i->data.iid == arg2->id)
004c3d0a          {
004c3d1a              ItemProfile::operator=(&var_10, i);
004c3d1a              break;
004c3d0a          }
004c3d05      }
004c3d05      
004c3d26      int32_t var_c;
004c3d26      
004c3d26      if (var_c != 0xffffffff)
004c3d26      {
004c3d2c          uint32_t _maxStackSize_1 = (var_c - arg3);
004c3d2c          
004c3d32          if (_maxStackSize_1 <= 0)
004c3d32          {
004c3d41              gmVendorUI::DeleteItem(this->m_parent, this->m_shopList, arg2->id, 1);
004c3d4a              ACCWeenieObject::SetSelectedObject(0, 0);
004c3d56              ItemProfile::~ItemProfile(&var_10);
004c3d60              return;
004c3d32          }
004c3d32          
004c3d63          uint32_t _maxStackSize = arg2->pwd._maxStackSize;
004c3d63          
004c3d6c          if (_maxStackSize > 1)
004c3d6c          {
004c3d70              if (_maxStackSize_1 > _maxStackSize)
004c3d72                  _maxStackSize_1 = _maxStackSize;
004c3d72              
004c3d74              uint32_t _stackSize = arg2->pwd._stackSize;
004c3d74              
004c3d7c              if (_stackSize == 0)
004c3d7e                  _stackSize = 1;
004c3d7e              
004c3d85              if (_stackSize != _maxStackSize_1)
004c3d85              {
004c3d8b                  VendorSubUI::SetObjectStackSize(this, arg2, _maxStackSize_1);
004c3d90                  uint32_t id = arg2->id;
004c3d90                  
004c3d99                  if (ACCWeenieObject::selectedID == id)
004c3d9e                      GenItemHolder::ItemAttributesChanged_s(id, 0);
004c3d9e                  
004c3da8                  VendorItemsUI::UpdateItemsUI(this);
004c3d85              }
004c3d6c          }
004c3d26      }
004c3d26      
004c3db1      ItemProfile::~ItemProfile(&var_10);
004c3ce0  }

004c3dbe                                                                                            90 90                                ..

004c3dc0  void __thiscall VendorItemsUI::AddToBuyList(class VendorItemsUI* this, class ACCWeenieObject* arg2, int32_t arg3)

004c3dc0  {
004c3dcf      int32_t i_1 = 0;
004c3dd1      void var_a0;
004c3dd1      ItemProfile::ItemProfile(&var_a0);
004c3dd9      class PackableLLNode<ItemProfile>* esi = this->m_parent->m_buyList.head;
004c3de1      int32_t eax_8;
004c3de1      
004c3de1      if (esi == 0)
004c3de1      {
004c3e20      label_4c3e20:
004c3e20          uint32_t id = arg2->id;
004c3e24          int32_t var_9c_1 = arg3;
004c3e28          int32_t var_94_1 = 0;
004c3e30          class PackableList<ItemProfile>* esi_2 = &this->m_parent->m_buyList;
004c3e3b          void* edi = operator new(0x18);
004c3e3b          
004c3e42          if (edi == 0)
004c3f26              edi = nullptr;
004c3e42          else
004c3e42          {
004c3e4f              ItemProfile::ItemProfile(edi, &var_a0);
004c3e56              *(uint32_t*)((char*)edi + 0x10) = 0;
004c3e59              *(uint32_t*)((char*)edi + 0x14) = 0;
004c3e42          }
004c3e42          
004c3f2d          if (esi_2->head != 0)
004c3f2d          {
004c3f34              class PackableLLNode<ItemProfile>* tail = esi_2->tail;
004c3f37              tail->next = edi;
004c3f3a              *(uint32_t*)((char*)edi + 0x14) = tail;
004c3f2d          }
004c3f2d          else
004c3f2f              esi_2->head = edi;
004c3f2f          
004c3f3d          esi_2->curNum += 1;
004c3f40          eax_8 = arg3;
004c3f42          esi_2->tail = edi;
004c3de1      }
004c3de1      else
004c3de1      {
004c3de8          while (true)
004c3de8          {
004c3de8              ItemProfile::operator=(&var_a0, esi);
004c3dfb              int32_t var_98;
004c3dfb              
004c3dfb              if (var_98 == arg2->id)
004c3dfb              {
004c3e6c                  int32_t var_9c;
004c3e6c                  int32_t eax_3 = (arg3 + var_9c);
004c3e6c                  
004c3e73                  if (eax_3 > 0x1388)
004c3e73                  {
004c3eab                      void var_90;
004c3eab                      StringInfo::StringInfo(&var_90);
004c3ec3                      class PStringBase<unsigned short> var_a4;
004c3ec3                      PStringBase<unsigned short>::allocate_ref_buffer(&var_a4, wcslen(u"I can't possibly sell you that m…"));
004c3ed2                      wcscpy(var_a4, u"I can't possibly sell you that m…");
004c3ee6                      StringInfo::SetLiteralValue(&var_90, &var_a4, 1);
004c3eef                      int32_t* esi_4 = (var_a4 - 0x14);
004c3eef                      
004c3f02                      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004c3f0a                          **(uint32_t**)esi_4(1);
004c3f0a                      
004c3f13                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c3f1f                      StringInfo::~StringInfo(&var_90);
004c3f24                      goto label_4c3f5a;
004c3e73                  }
004c3e73                  
004c3e7e                  class PackableLLNode<ItemProfile>* ecx_6 = this->m_parent->m_buyList.head;
004c3e7e                  
004c3e84                  if (i_1 > 0)
004c3e84                  {
004c3e8e                      int32_t i;
004c3e8e                      
004c3e8e                      do
004c3e8e                      {
004c3e88                          if (ecx_6 != 0)
004c3e8a                              ecx_6 = ecx_6->next;
004c3e8a                          
004c3e8d                          i = i_1;
004c3e8d                          i_1 -= 1;
004c3e8e                      } while (i != 1);
004c3e84                  }
004c3e84                  
004c3e92                  if (ecx_6 != 0)
004c3e99                      ItemProfile::operator=(ecx_6, &var_a0);
004c3e99                  
004c3e9e                  eax_8 = eax_3;
004c3e92                  break;
004c3dfb              }
004c3dfb              
004c3dfd              i_1 += 1;
004c3dfd              
004c3e00              if (esi == 0)
004c3e00                  goto label_4c3e20;
004c3e00              
004c3e02              esi = esi->next;
004c3e02              
004c3e07              if (esi == 0)
004c3e07                  goto label_4c3e20;
004c3de8          }
004c3de1      }
004c3de1      
004c3f51      VendorItemsUI::RemoveFromShop(this, arg2, eax_8);
004c3f5a  label_4c3f5a:
004c3f5a      ItemProfile::~ItemProfile(&var_a0);
004c3dc0  }

004c3f6b                                   90 90 90 90 90                                                             .....

004c3f70  void __fastcall VendorBuyUI::Update(class VendorBuyUI* this)

004c3f70  {
004c3f73      class gmVendorUI* m_parent = this->m_parent;
004c3f83      gmVendorUI::AdoptAsContents(m_parent, this->m_buyShopList, &m_parent->m_buyList, 1);
004c3f8a      VendorBuyUI::UpdateBuyUI(this);
004c3f91      VendorBuyUI::UpdateTransactionValue(this);
004c3f99      /* tailcall */
004c3f99      return VendorBuyUI::UpdateTotalValue(this);
004c3f70  }

004c3f9e                                                                                            90 90                                ..

004c3fa0  void __fastcall VendorSellUI::Update(class VendorSellUI* this)

004c3fa0  {
004c3fa3      class gmVendorUI* m_parent = this->m_parent;
004c3fb3      gmVendorUI::AdoptAsContents(m_parent, this->m_sellShopList, &m_parent->m_sellList, 1);
004c3fba      VendorSellUI::UpdateSellUI(this);
004c3fc1      VendorSellUI::UpdateTransactionValue(this);
004c3fc9      /* tailcall */
004c3fc9      return VendorSellUI::UpdateTotalValue(this);
004c3fa0  }

004c3fce                                            90 90                                                                ..

004c3fd0  void __thiscall VendorSellUI::ItemAttributesChanged(class VendorSellUI* this, uint32_t arg2, int32_t arg3)

004c3fd0  {
004c3fe3      if ((this->m_splitItem != 0 && (arg3 & 1) != 0))
004c3fe3      {
004c3fef          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
004c3fef          
004c4008          if ((eax_1 != 0 && eax_1->pwd._wcid.id == this->m_splitItemClassID.id))
004c4008          {
004c400e              uint32_t _stackSize = eax_1->pwd._stackSize;
004c400e              
004c4016              if (_stackSize == 0)
004c4018                  _stackSize = 1;
004c4018              
004c4021              if (_stackSize == this->m_splitItemStackSize)
004c4021              {
004c402c                  class UIElement_ItemList* m_sellShopList_1 = this->m_sellShopList;
004c4032                  int32_t eax_3 = UIElement_ListBox::WhatNum(m_sellShopList_1, this->m_splitItem);
004c4032                  
004c403b                  if (m_sellShopList_1 != 0)
004c403b                  {
004c403e                      class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(arg2);
004c403e                      
004c4051                      if ((ACCWeenieObject::GetNumContainedItems(eax_4) == 0 && ACCWeenieObject::GetNumContainedContainers(eax_4) == 0))
004c4051                      {
004c4068                          if (m_sellShopList_1->m_desc.m_elementID == 0x100000ce)
004c406e                              ACCWeenieObject::SetSellState(eax_4, 1);
004c406e                          
004c407b                          UIElement_ItemList::ItemList_InsertItem(m_sellShopList_1, arg2, eax_3);
004c4051                      }
004c403b                  }
004c403b                  
004c4093                  gmVendorUI::DeleteItem(this->m_parent, this->m_sellShopList, this->m_splitItem->itemID, 1);
004c4098                  class gmVendorUI* m_parent = this->m_parent;
004c409b                  class UIElement_ItemList* m_sellShopList = this->m_sellShopList;
004c40aa                  this->m_splitItem = nullptr;
004c40b1                  gmVendorUI::RecordContents(m_parent, m_sellShopList, &m_parent->m_sellList, 0, 1);
004c40b8                  VendorSellUI::Update(this);
004c4021              }
004c4008          }
004c3fe3      }
004c3fd0  }

004c40c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004c40d0  void __thiscall gmVendorUI::HandleMousePresses(class gmVendorUI* this, struct UIElementMessageInfo const* arg2)

004c40d0  {
004c40e7      class UIElement_ItemList* m_shopList = this->m_itemsUI->m_shopList;
004c40ec      uint8_t eax_1;
004c40ec      
004c40ec      if (m_shopList != 0)
004c40f2          eax_1 = UIElement::IsAncestorOfMe(arg2->pElement, m_shopList);
004c40f2      
004c40f9      if ((m_shopList != 0 && eax_1 != 0))
004c40f9      {
004c4104          class UIElement* eax_2 = UIElement_ListBox::GetItemUnderMouse(this->m_itemsUI->m_shopList);
004c4104          
004c410b          if (eax_2 != 0)
004c410b          {
004c411a              void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c411a              
004c412c              if ((eax_3 != 0 && arg2->dwParam1 == 0xa))
004c412c              {
004c4132                  uint32_t eax_4 = *(uint32_t*)((char*)eax_3 + 0x5fc);
004c4132                  
004c413a                  if (eax_4 != 0)
004c4143                      gmVendorUI::BuySingleItem(this, eax_4);
004c412c              }
004c410b          }
004c410b          
004c410b          return;
004c40f9      }
004c40f9      
004c4159      class UIElement_ItemList* m_buyShopList = this->m_buyUI->m_buyShopList;
004c415f      uint8_t eax_6;
004c415f      
004c415f      if (m_buyShopList != 0)
004c4169          eax_6 = UIElement::IsAncestorOfMe(arg2->pElement, m_buyShopList);
004c4169      
004c4170      void var_98;
004c4170      void __return;
004c4170      void var_90;
004c4170      
004c4170      if ((m_buyShopList == 0 || eax_6 == 0))
004c4170      {
004c4268          class UIElement_ItemList* m_sellShopList = this->m_sellUI->m_sellShopList;
004c4268          
004c426d          if ((m_sellShopList != 0 && UIElement::IsAncestorOfMe(arg2->pElement, m_sellShopList) != 0))
004c426d          {
004c428d              class UIElement* eax_15 = UIElement_ListBox::GetItemUnderMouse(this->m_sellUI->m_sellShopList);
004c428d              
004c4294              if (eax_15 != 0)
004c4294              {
004c42a3                  void* eax_16 = eax_15->vtable->DynamicCast(0x10000032);
004c42a3                  
004c42b7                  if ((eax_16 != 0 && arg2->dwParam1 == 0xa))
004c42b7                  {
004c42bd                      uint32_t eax_17 = *(uint32_t*)((char*)eax_16 + 0x5fc);
004c42bd                      
004c42c5                      if (eax_17 != 0)
004c42c5                      {
004c42cc                          class ACCWeenieObject* eax_18 = ClientObjMaintSystem::GetWeenieObject(eax_17);
004c42cc                          
004c42d6                          if (eax_18 != 0)
004c42d6                          {
004c42ea                              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(eax_18, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004c42f7                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"Removing %s from shopping list");
004c4303                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004c430c                              StringInfo::StringInfo(&var_90);
004c431c                              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004c4328                              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c4334                              StringInfo::~StringInfo(&var_90);
004c433d                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004c42d6                          }
004c42d6                          
004c434d                          gmVendorUI::VendorItemSetSellState(this, *(uint32_t*)((char*)eax_16 + 0x5fc), 0);
004c4364                          gmVendorUI::RemoveProfileFromList(this, &this->m_sellList, *(uint32_t*)((char*)eax_16 + 0x5fc), 0xffffffff);
004c436f                          VendorSellUI::Update(this->m_sellUI);
004c42c5                      }
004c42b7                  }
004c4294              }
004c426d          }
004c4170      }
004c4170      else
004c4170      {
004c417f          class UIElement* eax_7 = UIElement_ListBox::GetItemUnderMouse(this->m_buyUI->m_buyShopList);
004c417f          
004c4186          if (eax_7 != 0)
004c4186          {
004c4195              void* eax_8 = eax_7->vtable->DynamicCast(0x10000032);
004c4195              
004c41a9              if ((eax_8 != 0 && arg2->dwParam1 == 0xa))
004c41a9              {
004c41af                  uint32_t eax_9 = *(uint32_t*)((char*)eax_8 + 0x5fc);
004c41af                  
004c41b7                  if (eax_9 != 0)
004c41b7                  {
004c41be                      class ACCWeenieObject* eax_10 = ClientObjMaintSystem::GetWeenieObject(eax_9);
004c41be                      
004c41c8                      if (eax_10 != 0)
004c41c8                      {
004c41dc                          class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax_10, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004c41e9                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"Removing %s from shopping list");
004c41f5                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004c41fe                          StringInfo::StringInfo(&var_90);
004c420e                          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004c421a                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c4226                          StringInfo::~StringInfo(&var_90);
004c422f                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004c41c8                      }
004c41c8                      
004c4246                      gmVendorUI::RemoveProfileFromList(this, &this->m_buyList, *(uint32_t*)((char*)eax_8 + 0x5fc), 1);
004c4251                      VendorBuyUI::Update(this->m_buyUI);
004c41b7                  }
004c41a9              }
004c4186          }
004c4170      }
004c40d0  }


004c4380  void __thiscall gmVendorUI::RecvNotice_ItemListBeginDrag(class gmVendorUI* this, class UIElement const* arg2, int32_t arg3)

004c4380  {
004c4389      class HashSetData<UIElement *>* eax = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe];
004c4389      
004c438e      if (eax != 0)
004c438e      {
004c4394          class UIElement_ListBox* eax_1 = *(int32_t*)((char*)eax + 0xc);
004c4394          
004c439e          if (eax_1 == arg2)
004c439e          {
004c43ae              class UIElement* eax_2 = UIElement_ListBox::GetItem(eax_1, arg3);
004c43ae              
004c43b5              if (eax_2 != 0)
004c43b5              {
004c43c5                  void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c43c5                  
004c43cf                  if (eax_3 != 0)
004c43cf                  {
004c43d5                      uint32_t eax_4 = *(uint32_t*)((char*)eax_3 + 0x5fc);
004c43d5                      
004c43dd                      if (eax_4 != 0)
004c43dd                      {
004c43e4                          ClientObjMaintSystem::GetWeenieObject(eax_4);
004c43f0                          class ACCWeenieObject* eax_6 = ClientObjMaintSystem::GetWeenieObject(*(uint32_t*)((char*)eax_3 + 0x5fc));
004c43f0                          
004c43fa                          if (eax_6 != 0)
004c4400                              ACCWeenieObject::SetSellState(eax_6, 0);
004c4400                          
004c4418                          gmVendorUI::RemoveProfileFromList(((char*)this - 0x5f8), &this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8], *(uint32_t*)((char*)eax_3 + 0x5fc), 0xffffffff);
004c4420                          VendorSellUI::Update(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe]);
004c4420                          
004c4431                          if (GenItemHolder::splitSize < GenItemHolder::maxSplitSize)
004c4431                          {
004c4437                              void var_90;
004c4437                              StringInfo::StringInfo(&var_90);
004c4445                              void var_94;
004c4445                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You cannot split items from this…");
004c4455                              StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004c445e                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
004c446a                              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c4478                              GenItemHolder::splitSize = GenItemHolder::maxSplitSize;
004c447e                              CM_UI::SendNotice_UpdateToolbarSelectionDisplay();
004c4487                              StringInfo::~StringInfo(&var_90);
004c4431                          }
004c43dd                      }
004c43cf                  }
004c43b5              }
004c439e          }
004c438e      }
004c4380  }

004c4497                                                                       90 90 90 90 90 90 90 90 90                         .........

004c44a0  void __thiscall gmVendorUI::RecvNotice_ServerSaysMoveItem(class gmVendorUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004c44a0  {
004c44b6      if (UIElement_ItemList::ItemList_IsInList(*(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe] + 0xc), arg2) != 0)
004c44b6      {
004c44b9          class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
004c44b9          
004c44c3          if ((eax_2 != 0 && ACCWeenieObject::IsOwnedByPlayer(eax_2) == 0))
004c44c3          {
004c44dd              gmVendorUI::RemoveProfileFromList(((char*)this - 0x5f8), &this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8], arg2, 0xffffffff);
004c44e5              VendorSellUI::Update(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe]);
004c44c3          }
004c44b6      }
004c44a0  }

004c44ef                                               90                                                                 .

004c44f0  void __thiscall gmVendorUI::RecvNotice_ItemAttributesChanged(class gmVendorUI* this, uint32_t arg2, uint32_t arg3)

004c44f0  {
004c44f3      /* tailcall */
004c44f3      return VendorSellUI::ItemAttributesChanged(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe], arg2, arg3);
004c44f0  }

004c44f8                                                                          90 90 90 90 90 90 90 90                          ........

004c4500  void __fastcall gmVendorUI::RecvNotice_StackSliderChanged(class gmVendorUI* this, uint32_t arg2, uint32_t arg3)

004c4500  {
004c4510      if (UIElement::IsVisible(((char*)this - 0x5f8)) != 0)
004c4510      {
004c4512          class HashSetData<UIElement *>* eax_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xc];
004c4512          
004c4517          if (eax_1 != 0)
004c4517          {
004c4519              uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004c4519              
004c4521              if ((ACCWeenieObject::selectedID_1 != 0 && UIElement_ItemList::ItemList_IsInList(*(int32_t*)((char*)eax_1 + 8), ACCWeenieObject::selectedID_1) != 0))
004c4533                  VendorItemsUI::UpdateItemsUI(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xc]);
004c4517          }
004c4510      }
004c4500  }

004c453c                                                                                      90 90 90 90                              ....

004c4540  void __thiscall gmVendorUI::FillComponentList(class gmVendorUI* this, enum SpellComponentCategory arg2, int32_t arg3)

004c4540  {
004c454f      int32_t eax_2;
004c454f      int32_t* esi_4;
004c454f      
004c454f      if (this->shopVendorID != 0)
004c454f      {
004c459f          VendorItemsUI::UpdateItemsList(this->m_itemsUI, 0x1000, 0);
004c45b0          class ComponentTracker* ebx_1 = CPlayerSystem::GetComponentTracker(CPlayerSystem::GetPlayerSystem());
004c45b2          class ComponentTracker* var_34_1 = ebx_1;
004c45c3          void __return;
004c45c3          PlayerModule::GetDesiredCompHashStart(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, &__return);
004c45d5          void __return_1;
004c45d5          PlayerModule::GetDesiredCompHashEnd(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, &__return_1);
004c45da          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004c45df          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
004c45e7          int32_t var_44_1 = 0;
004c45ef          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004c45f5          class IDClass<_tagDataID,32,0>* var_2c;
004c45f5          class IDClass<_tagDataID,32,0>* eax_8 = var_2c;
004c45fd          int32_t var_c;
004c45fd          
004c45fd          while (var_c != eax_8)
004c45fd          {
004c4603              int32_t ecx_7 = arg3;
004c460f              void var_20;
004c460f              
004c460f              if ((var_44_1 >= ecx_7 && ecx_7 != 0))
004c460f              {
004c486c                  ItemProfile::ItemProfile(&var_20);
004c487c                  PackableList<ItemProfile>::RemoveTail(&this->m_buyList, &var_20);
004c4881                  ClientUISystem::GetUISystem();
004c48a5                  ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, WidthConvert, "Buying aborted; max price reache…"), &arg3, 0, 1, 0);
004c48b4                  int32_t* esi_18 = (arg3 - 0x14);
004c48b4                  
004c48c3                  if ((InterlockedDecrement(&esi_18[1]) == 0 && esi_18 != 0))
004c48cb                      **(uint32_t**)esi_18(1);
004c48cb                  
004c48d1                  ItemProfile::~ItemProfile(&var_20);
004c48d6                  break;
004c460f              }
004c460f              
004c4615              class IDClass<_tagDataID,32,0> id = eax_8->id;
004c4617              int32_t esi_5 = *(int32_t*)((char*)eax_8 + 4);
004c4622              int32_t var_40 = 0;
004c462a              ComponentTracker::GetNumComponent(ebx_1, id, &var_40);
004c462a              
004c4642              if ((ComponentTracker::DetermineComponentCategory(ebx_1, id) == arg2 || arg2 == Undef_SpellComponentCategory))
004c4642              {
004c4648                  int32_t eax_10 = var_40;
004c4648                  
004c464e                  if (eax_10 < esi_5)
004c464e                  {
004c465e                      uint32_t esi_6 = (esi_5 - eax_10);
004c4663                      uint32_t var_3c = esi_6;
004c466e                      uint32_t var_38;
004c466e                      
004c466e                      if (gmVendorUI::ShopHasItem(this, id, &var_3c, &var_38) == 0)
004c470c                          gmVendorUI::AddMissingComp(this, id, &PStringBase<char>::s_NullBuffer_2);
004c466e                      else
004c466e                      {
004c4678                          ItemProfile::ItemProfile(&var_20);
004c4678                          
004c4685                          for (class PackableLLNode<ItemProfile>* i = this->m_buyList.head; i != 0; i = i->next)
004c4685                          {
004c468e                              if (i->data.iid == var_38)
004c468e                              {
004c469e                                  ItemProfile::operator=(&var_20, i);
004c46a3                                  int32_t var_1c;
004c46a3                                  esi_6 -= var_1c;
004c46a3                                  break;
004c468e                              }
004c4685                          }
004c4685                          
004c46a7                          uint32_t ebx_2 = var_3c;
004c46a7                          
004c46ad                          if (ebx_2 < esi_6)
004c46ad                          {
004c46b7                              gmVendorUI::AddMissingComp(this, id, &PStringBase<char>::s_NullBuffer_2);
004c46bc                              esi_6 = ebx_2;
004c46ad                          }
004c46ad                          
004c46c3                          class ACCWeenieObject* eax_13 = ClientObjMaintSystem::GetWeenieObject(var_38);
004c46c3                          
004c46cf                          if (eax_13 != 0)
004c46cf                          {
004c46d9                              VendorItemsUI::AddToBuyList(this->m_itemsUI, eax_13, esi_6);
004c46f1                              var_44_1 += VendorProfile::VendorSellPrice(this->shopVendorProfile, &eax_13->pwd, esi_6);
004c46cf                          }
004c46cf                          
004c46f9                          ItemProfile::~ItemProfile(&var_20);
004c46fe                          ebx_1 = var_34_1;
004c466e                      }
004c464e                  }
004c4642              }
004c4642              
004c4715              eax_8 = *(int32_t*)((char*)var_2c + 8);
004c4715              
004c471a              if (eax_8 == 0)
004c471a              {
004c4723                  int32_t eax_16 = (*(int32_t*)((char*)var_2c + 0xc) + 1);
004c4726                  int32_t var_24;
004c4726                  
004c4726                  if (eax_16 >= var_24)
004c4726                  {
004c473f                  label_4c473f:
004c473f                      eax_8 = nullptr;
004c4726                  }
004c4726                  else
004c4726                  {
004c4734                      int32_t var_28;
004c4734                      
004c4734                      while (*(uint32_t*)(var_28 + (eax_16 << 2)) == 0)
004c4734                      {
004c473a                          eax_16 += 1;
004c473a                          
004c473d                          if (eax_16 >= var_24)
004c473d                              goto label_4c473f;
004c4734                      }
004c4734                      
004c4860                      eax_8 = *(uint32_t*)(var_28 + (eax_16 << 2));
004c4726                  }
004c471a              }
004c471a              
004c4745              var_2c = eax_8;
004c45fd          }
004c45fd          
004c475d          if (PStringBase<char>::s_NullBuffer_2->m_data[-4] != 1)
004c475d          {
004c4783              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &arg3, 0), 0, 1, 0);
004c478c              int32_t* esi_9 = (arg3 - 0x14);
004c478c              
004c479b              if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
004c47a3                  **(uint32_t**)esi_9(1);
004c47a3              
004c47a5              ClientUISystem::GetUISystem();
004c47c9              ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, WidthConvert, &data_794508), &arg3, 0, 1, 0);
004c47d2              int32_t* esi_13 = (arg3 - 0x14);
004c47d2              
004c47e1              if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
004c47e9                  **(uint32_t**)esi_13(1);
004c475d          }
004c475d          
004c47eb          class VendorBuyUI* m_buyUI = this->m_buyUI;
004c47f1          class gmVendorUI* m_parent = m_buyUI->m_parent;
004c4801          gmVendorUI::AdoptAsContents(m_parent, m_buyUI->m_buyShopList, &m_parent->m_buyList, 1);
004c4808          VendorBuyUI::UpdateBuyUI(m_buyUI);
004c480f          VendorBuyUI::UpdateTransactionValue(m_buyUI);
004c4816          VendorBuyUI::UpdateTotalValue(m_buyUI);
004c481b          class UIElement_Panel* m_vendorPanel = this->m_vendorPanel;
004c481b          
004c4823          if (m_vendorPanel != 0)
004c4823          {
004c482a              this->m_last_sale = 0;
004c4834              UIElement_Panel::OpenTab(m_vendorPanel, 0x100000ba);
004c4823          }
004c4823          
004c483d          esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
004c4844          eax_2 = InterlockedDecrement(&esi_4[1]);
004c454f      }
004c454f      else
004c454f      {
004c4551          ClientUISystem::GetUISystem();
004c4575          ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, WidthConvert, "You need an open vendor."), &arg3, 0x1a, 1, 0);
004c457e          esi_4 = (arg3 - 0x14);
004c4585          eax_2 = InterlockedDecrement(&esi_4[1]);
004c454f      }
004c454f      
004c484e      if ((eax_2 == 0 && esi_4 != 0))
004c4856          **(uint32_t**)esi_4(1);
004c4540  }

004c48db                                                                                   90 90 90 90 90                             .....

004c48e0  void __fastcall gmVendorUI::UpdateTotalValue(class gmVendorUI* this)

004c48e0  {
004c48e3      int32_t ebx;
004c48e3      int32_t var_18 = ebx;
004c48e4      int32_t ebp;
004c48e4      int32_t var_1c = ebp;
004c48e5      int32_t esi;
004c48e5      int32_t var_20 = esi;
004c48e6      struct Turbine_GUID* edi;
004c48e6      struct Turbine_GUID* var_24 = edi;
004c48eb      struct Turbine_GUID* var_14;
004c48eb      int32_t* var_28 = &var_14;
004c48f2      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004c48fa      var_14 = nullptr;
004c4905      class TResult __return;
004c4905      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004c490a      struct Turbine_GUID* ecx_1 = var_14;
004c4913      var_2c = ecx_1;
004c4915      int32_t var_28_1 = 0;
004c4918      struct Turbine_GUID* eax_1 = var_2c;
004c491e      int32_t var_8 = 0;
004c4922      int32_t var_4 = 0;
004c4922      
004c4926      if (eax_1 != 0)
004c492c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004c492c      
004c4938      struct Turbine_GUID** esp = &var_2c;
004c493f      void var_c;
004c493f      int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004c493f      
004c4941      if (ecx_1 != 0)
004c4947          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004c4947      
004c494a      class TResult __return_1 = __return;
004c494a      
004c4954      if ((__return_1 == 0 || ebp_1 < 0))
004c496b          this->m_totalValue = 0;
004c4954      else
004c4954      {
004c4964          CBaseQualities::InqInt((__return_1 + 0x38), 0x14, &this->m_totalValue, 0, 0);
004c4964          esp = &var_2c;
004c4954      }
004c4954      
004c4977      VendorItemsUI::UpdateItemsUI(this->m_itemsUI);
004c4982      VendorBuyUI::UpdateTotalValue(this->m_buyUI);
004c498d      VendorSellUI::UpdateTotalValue(this->m_sellUI);
004c498d      
004c4994      if (__return_1 != 0)
004c4994      {
004c499a          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004c499a          esp = &var_24;
004c4994      }
004c4994      
004c499d      *(uint32_t*)esp;
004c499d      esp[1];
004c499d      esp[2];
004c499d      esp[3];
004c48e0  }

004c49a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004c49b0  void __fastcall VendorItemsUI::HandleSetSelectedItem(class VendorItemsUI* this, uint32_t arg2, uint32_t arg3)

004c49b0  {
004c49b3      VendorItemsUI::UpdateItemsUI(this);
004c49ba      VendorItemsUI::UpdateQuantityOverlay(this);
004c49b0  }

004c49c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004c49d0  void __thiscall VendorBuyUI::OpenVendor(class VendorBuyUI* this, uint8_t arg2)

004c49d0  {
004c49d9      if (arg2 == 0)
004c49d9      {
004c4a0c          UIElement_ItemList::ItemList_Flush(this->m_buyShopList);
004c4a12          return;
004c49d9      }
004c49d9      
004c49db      class gmVendorUI* m_parent = this->m_parent;
004c49eb      gmVendorUI::AdoptAsContents(m_parent, this->m_buyShopList, &m_parent->m_buyList, 1);
004c49f2      VendorBuyUI::UpdateBuyUI(this);
004c49f9      VendorBuyUI::UpdateTransactionValue(this);
004c4a00      VendorBuyUI::UpdateTotalValue(this);
004c49d0  }

004c4a15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c4a20  void __thiscall VendorSellUI::AddItemToSell(class VendorSellUI* this, uint32_t arg2)

004c4a20  {
004c4a23      class gmVendorUI* m_parent = this->m_parent;
004c4a26      class UIElement_Panel* m_vendorPanel = m_parent->m_vendorPanel;
004c4a26      
004c4a2f      if (m_vendorPanel != 0)
004c4a2f      {
004c4a36          m_parent->m_last_sale = 0;
004c4a40          UIElement_Panel::OpenTab(m_vendorPanel, 0x100000bb);
004c4a2f      }
004c4a2f      
004c4a4c      ACCWeenieObject::SetSelectedObject(arg2, 0);
004c4a68      gmVendorUI::AddItem(this->m_parent, this->m_sellShopList, arg2, 0xffffffff, 1, 1, 0, 1, 0xffffffff);
004c4a6d      class gmVendorUI* m_parent_1 = this->m_parent;
004c4a7f      gmVendorUI::RecordContents(m_parent_1, this->m_sellShopList, &m_parent_1->m_sellList, 0, 1);
004c4a84      class gmVendorUI* m_parent_2 = this->m_parent;
004c4a94      gmVendorUI::AdoptAsContents(m_parent_2, this->m_sellShopList, &m_parent_2->m_sellList, 1);
004c4a9b      VendorSellUI::UpdateSellUI(this);
004c4aa2      VendorSellUI::UpdateTransactionValue(this);
004c4aa9      VendorSellUI::UpdateTotalValue(this);
004c4a20  }

004c4ab3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c4ac0  void __thiscall gmVendorUI::RecvNotice_AddItemToSell(class gmVendorUI* this, uint32_t arg2)

004c4ac0  {
004c4ac3      /* tailcall */
004c4ac3      return VendorSellUI::AddItemToSell(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe], arg2);
004c4ac0  }

004c4ac8                          90 90 90 90 90 90 90 90                                                          ........

004c4ad0  void __thiscall gmVendorUI::RecvNotice_FillComponentBuyList(class gmVendorUI* this, enum SpellComponentCategory arg2, int32_t arg3)

004c4ad0  {
004c4ad6      /* tailcall */
004c4ad6      return gmVendorUI::FillComponentList(((char*)this - 0x5f8), arg2, arg3);
004c4ad0  }

004c4adb                                                                                   90 90 90 90 90                             .....

004c4ae0  void __thiscall gmVendorUI::OnQualityChanged(class gmVendorUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004c4ae0  {
004c4ae1      uint32_t esi = arg4;
004c4ae1      
004c4aeb      if (esi == 0x14)
004c4aeb      {
004c4af3          gmVendorUI::UpdateTotalValue(((char*)this - 0x5fc));
004c4afa          return;
004c4aeb      }
004c4aeb      
004c4afd      class HashSetData<UIElement *>* ecx_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004c4afd      
004c4b02      if (ecx_1 != 0)
004c4b02      {
004c4b09          VendorProfile::VendorTradeCurrency(ecx_1, &arg4);
004c4b09          
004c4b11          if (esi == 5)
004c4b11          {
004c4b13              uint32_t id = INVALID_DID.id;
004c4b13              
004c4b1d              if (arg4 != id)
004c4b1d              {
004c4b26                  class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
004c4b26                  
004c4b30                  if (eax_1 != 0)
004c4b32                      id = eax_1->pwd._wcid.id;
004c4b32                  
004c4b3c                  if (id == arg4)
004c4b4c                      *(uint32_t*)(*(int32_t*)((char*)this + -0x5fc) + 0x18)(0);
004c4b1d              }
004c4b11          }
004c4b02      }
004c4ae0  }

004c4b54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c4b60  void __thiscall gmVendorUI::OnQualityRemoved(class gmVendorUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004c4b60  {
004c4b62      uint32_t edi = arg4;
004c4b62      
004c4b6b      if (edi == 0x14)
004c4b6b      {
004c4b95          gmVendorUI::UpdateTotalValue(((char*)this - 0x5fc));
004c4b95          return;
004c4b6b      }
004c4b6b      
004c4b6d      class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004c4b6d      
004c4b72      if (ecx != 0)
004c4b72      {
004c4b79          VendorProfile::VendorTradeCurrency(ecx, &arg4);
004c4b79          
004c4b8d          if ((edi == 5 && arg4 != INVALID_DID.id))
004c4b95              gmVendorUI::UpdateTotalValue(((char*)this - 0x5fc));
004c4b72      }
004c4b60  }

004c4b9f                                                                                               90                                 .

004c4ba0  void __fastcall gmVendorUI::OpenVendor(class gmVendorUI* this, uint32_t arg2, class VendorProfile const* arg3, class PackableList<ItemProfile> const* arg4, enum ShopMode arg5)

004c4ba0  {
004c4ba9      gmVendorUI::UpdateTotalValue(this);
004c4bb5      uint32_t edi = arg2;
004c4bb5      
004c4bc1      if ((ACCWeenieObject::prevRequest == IR_SHOP_EVENT && ACCWeenieObject::prevRequestObjectID == edi))
004c4bc4          ACCWeenieObject::RecordResponse(edi);
004c4bc4      
004c4bcc      uint32_t shopVendorID = this->shopVendorID;
004c4bd6      int32_t ebx_1;
004c4bd6      ebx_1 = shopVendorID == edi;
004c4bdd      int32_t var_2c = ebx_1;
004c4bdd      
004c4be1      if (shopVendorID != 0)
004c4be1      {
004c4be5          shopVendorID = ebx_1 != 0;
004c4beb          gmVendorUI::CloseVendor(this, shopVendorID);
004c4be1      }
004c4be1      
004c4bf1      this->shopVendorID = edi;
004c4bf7      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(edi);
004c4bf7      
004c4c01      if (eax != 0)
004c4c01      {
004c4c18          int32_t var_40_4 = 0;
004c4c1a          int32_t var_48_1 = 0x3ff00000;
004c4c34          CPlayerSystem::RegisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), &this->vtable, eax->id, ((double)((long double)eax->pwd._useRadius)), 1, 0, 0f, 0f);
004c4c01      }
004c4c01      
004c4c3b      void* eax_4 = operator new(0x28);
004c4c45      class VendorProfile* eax_5;
004c4c45      
004c4c45      if (eax_4 == 0)
004c4c50          eax_5 = nullptr;
004c4c45      else
004c4c49          eax_5 = VendorProfile::VendorProfile(eax_4);
004c4c49      
004c4c52      class VendorProfile* ecx_3 = arg3;
004c4c59      this->shopVendorProfile = eax_5;
004c4c5f      VendorProfile::operator=(eax_5, ecx_3);
004c4c66      void* eax_6 = operator new(0x10);
004c4c66      
004c4c70      if (eax_6 == 0)
004c4c83          eax_6 = nullptr;
004c4c70      else
004c4c70      {
004c4c72          *(uint32_t*)eax_6 = 0x7b4fa8;
004c4c78          *(uint32_t*)((char*)eax_6 + 4) = 0;
004c4c7b          *(uint32_t*)((char*)eax_6 + 8) = 0;
004c4c7e          *(uint32_t*)((char*)eax_6 + 0xc) = 0;
004c4c70      }
004c4c70      
004c4c85      class PackableList<ItemProfile>* edx = arg4;
004c4c8c      this->shopItemProfileList = eax_6;
004c4c92      PackableList<ItemProfile>::operator=(eax_6, edx);
004c4ca6      arg2 = 0;
004c4cb1      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &arg3, &ClientObjMaintSystem_ClassType, &arg2);
004c4cb6      uint32_t ecx_7 = arg2;
004c4cca      int32_t* var_28 = nullptr;
004c4cce      int32_t var_24 = 0;
004c4cce      
004c4cd2      if (ecx_7 != 0)
004c4cd8          *(uint32_t*)(*(uint32_t*)ecx_7 + 0x10)(ecx_7, 0);
004c4cd8      
004c4ce4      InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&var_28, &arg4);
004c4ce4      
004c4ceb      if (ecx_7 != 0)
004c4cf1          *(uint32_t*)(*(uint32_t*)ecx_7 + 0x14)(ecx_7, 0);
004c4cf1      
004c4cfa      class PackableLLNode<ItemProfile>* i = this->shopItemProfileList->head;
004c4cff      int32_t var_4 = 0;
004c4cff      
004c4d03      while (i != 0)
004c4d03      {
004c4d13          if (i->data.pwd != 0)
004c4d13          {
004c4d1d              class ACCWeenieObject* eax_10 = ClientObjMaintSystem::GetWeenieObject(i->data.iid);
004c4d29              void* ebx;
004c4d29              
004c4d29              if (eax_10 == 0)
004c4d29              {
004c4d5b                  class CWeenieObject* eax_13 = CFactory::MakeCWeenieObject(i->data.iid);
004c4d6d                  CObjectMaint::AddWeenieObject(((char*)ebx + 8), eax_13);
004c4d7c                  PublicWeenieDesc::operator=(((char*)eax_13 + 0x98), i->data.pwd);
004c4d83                  ACCWeenieObject::DeterminePositionState(eax_13);
004c4d8a                  ACCWeenieObject::DeclareValid(eax_13);
004c4d29              }
004c4d29              else
004c4d29              {
004c4d2d                  int32_t eax_11;
004c4d2d                  uint32_t edx_3;
004c4d2d                  eax_11 = ACCWeenieObject::IsOwnedByPlayer(eax_10);
004c4d2d                  
004c4d34                  if (eax_11 == 0)
004c4d40                      edx_3 = PublicWeenieDesc::operator=(&eax_10->pwd, i->data.pwd);
004c4d40                  
004c4d4c                  uint32_t iid = i->data.iid;
004c4d50                  CObjectMaint::RemoveObjectToBeDestroyed(((char*)ebx + 8), edx_3);
004c4d29              }
004c4d95              class PackableLLNode<ItemProfile>* eax_15 = this->shopItemProfileList->head;
004c4d98              int32_t ecx_22 = 0;
004c4d98              
004c4d9c              if (eax_15 == 0)
004c4d9c              {
004c4dae              label_4c4dae:
004c4dae                  eax_15 = nullptr;
004c4d9c              }
004c4d9c              else
004c4d9c              {
004c4da4                  while (ecx_22 != var_4)
004c4da4                  {
004c4da6                      eax_15 = eax_15->next;
004c4da9                      ecx_22 += 1;
004c4da9                      
004c4dac                      if (eax_15 == 0)
004c4dac                          goto label_4c4dae;
004c4da4                  }
004c4d9c              }
004c4d9c              
004c4db2              ItemProfile::Clear(eax_15);
004c4db7              int32_t ebp;
004c4db7              ebx_1 = ebp;
004c4d13          }
004c4d13          
004c4dbf          i = i->next;
004c4dc5          var_4 += 1;
004c4d03      }
004c4d03      
004c4dd1      if (ebx_1 == 0)
004c4dd1      {
004c4e66          class VendorProfile* eax_17 = arg3;
004c4e6d          class UIElement_Panel* m_vendorPanel;
004c4e6d          
004c4e6d          if (eax_17 == 2)
004c4e6d          {
004c4e83              m_vendorPanel = this->m_vendorPanel;
004c4e83              
004c4e8b              if (m_vendorPanel != 0)
004c4e8b              {
004c4e92                  this->m_last_sale = 0;
004c4e98                  UIElement_Panel::OpenTab(m_vendorPanel, 0x100000b9);
004c4e8b              }
004c4e6d          }
004c4e6d          else if (eax_17 == 3)
004c4e70          {
004c4e72              m_vendorPanel = this->m_vendorPanel;
004c4e72              
004c4e7a              if (m_vendorPanel != 0)
004c4e7a              {
004c4e92                  this->m_last_sale = 0;
004c4e98                  UIElement_Panel::OpenTab(m_vendorPanel, 0x100000bb);
004c4e7a              }
004c4e70          }
004c4dd1      }
004c4dd1      else
004c4dd1      {
004c4de0          while (true)
004c4de0          {
004c4de0              class PackableLLNode<ItemProfile>* head = this->m_buyList.head;
004c4de0              
004c4de8              if (head == 0)
004c4de8                  break;
004c4de8              
004c4dee              class PackableLLNode<ItemProfile>* next = head;
004c4dee              
004c4df4              while (true)
004c4df4              {
004c4df4                  ItemProfile::ItemProfile(&var_28);
004c4dff                  class PackableLLNode<ItemProfile>* eax_16 = this->shopItemProfileList->head;
004c4dff                  
004c4e07                  if (eax_16 == 0)
004c4e07                  {
004c4e21                  label_4c4e21:
004c4e21                      void var_18;
004c4e21                      ItemProfile::ItemProfile(&var_18, next);
004c4e31                      PackableList<ItemProfile>::Remove(&this->m_buyList, &var_18);
004c4e3a                      ItemProfile::~ItemProfile(&var_18);
004c4e43                      ItemProfile::~ItemProfile(&var_28);
004c4e48                      break;
004c4e07                  }
004c4e07                  
004c4e13                  while (eax_16->data.iid != next->data.iid)
004c4e13                  {
004c4e15                      eax_16 = eax_16->next;
004c4e15                      
004c4e1a                      if (eax_16 == 0)
004c4e1a                          goto label_4c4e21;
004c4e13                  }
004c4e13                  
004c4e4f                  ItemProfile::operator=(&var_28, eax_16);
004c4e58                  ItemProfile::~ItemProfile(&var_28);
004c4e5d                  next = next->next;
004c4e5d                  
004c4e62                  if (next == 0)
004c4e62                      goto label_4c4ea7;
004c4df4              }
004c4de0          }
004c4dd1      }
004c4dd1      
004c4ea7  label_4c4ea7:
004c4ea7      ebx_1 = ebx_1 != 0;
004c4e9d      this->m_itemsUI->vtable->OpenVendor(ebx_1, ecx_7, 0);
004c4ead      this->m_sellUI->vtable->OpenVendor(ebx_1);
004c4eb8      this->m_buyUI->vtable->OpenVendor(ebx_1);
004c4ec3      GlobalEventHandler::GetGlobalEventHandler()->vtable->RegisterNoticeHandler(0x4dd264, &this->vtable);
004c4edb      this->vtable->SetVisible(1);
004c4ee4      int32_t* ecx_40 = var_28;
004c4ee4      
004c4eea      if (ecx_40 != 0)
004c4eee          *(uint32_t*)(*(uint32_t*)ecx_40 + 0x14)();
004c4ba0  }

004c4dd9                                                                             8d a4 24 00 00 00 00                           ..$....
004c4efb                                                                                   90 90 90 90 90                             .....

004c4f00  uint8_t __thiscall VendorSellUI::AcceptDragObject(class VendorSellUI* this, uint32_t arg2)

004c4f00  {
004c4f14      uint8_t result = VendorSellUI::DragItemAcceptable(this, arg2, 0);
004c4f14      
004c4f1b      if (result == 0)
004c4f25          return result;
004c4f25      
004c4f2b      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004c4f2b      
004c4f37      if (eax != 0)
004c4f37      {
004c4f48          int32_t ebx_1 = 0;
004c4f48          
004c4f4c          if (GenItemHolder::splitSize == GenItemHolder::maxSplitSize)
004c4f4c          {
004c506a              ACCWeenieObject::SetWaitingState(eax, 0);
004c5072          label_4c5072:
004c5072              VendorSellUI::AddItemToSell(this, arg2);
004c5072              
004c5079              if (ebx_1 != 0)
004c5079              {
004c507e                  int32_t eax_7 = UIElement_ItemList::GetNumUIItems(this->m_sellShopList);
004c5088                  class UIElement* eax_9 = UIElement_ListBox::GetItem(this->m_sellShopList, (eax_7 - 1));
004c5088                  
004c508f                  if (eax_9 != 0)
004c508f                  {
004c50a2                      this->m_splitItem = eax_9->vtable->DynamicCast(0x10000032);
004c50a6                      class UIElement_UIItem* eax_10;
004c50a6                      eax_10 = 1;
004c50af                      return 1;
004c508f                  }
004c508f                  
004c50b4                  this->m_splitItem = nullptr;
004c5079              }
004c5079              
004c50ba              int32_t eax_6;
004c50ba              eax_6 = 1;
004c50c3              return 1;
004c4f4c          }
004c4f4c          
004c4f52          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004c4f5f          uint32_t player_id;
004c4f5f          
004c4f5f          if (SmartBox::smartbox_1 == 0)
004c4f69              player_id = 0;
004c4f5f          else
004c4f61              player_id = SmartBox::smartbox_1->player_id;
004c4f61          
004c4f7c          void var_98;
004c4f7c          void var_90;
004c4f7c          
004c4f7c          if (ItemHolder::AttemptToPlaceInContainer(arg2, player_id, eax->pwd._containerID, 0, 0) != 0)
004c4f7c          {
004c4f82              this->m_splitItem = nullptr;
004c4f90              ebx_1 = 1;
004c4f95              this->m_splitItemClassID.id = eax->pwd._wcid.id;
004c4fab              this->m_splitItemStackSize = ItemHolder::GetObjectSplitSize(eax);
004c4fb6              void __return;
004c4fb6              class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004c4fc3              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"Splitting the %s before selling …");
004c4fcf              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004c4fd8              StringInfo::StringInfo(&var_90);
004c4fe7              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004c4ff3              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c4fff              StringInfo::~StringInfo(&var_90);
004c5008              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004c500d              goto label_4c5072;
004c4f7c          }
004c4f7c          
004c5013          StringInfo::StringInfo(&var_90);
004c5021          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"Cannot split the stack to sell i…");
004c5031          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004c503a          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004c5046          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c5052          StringInfo::~StringInfo(&var_90);
004c4f37      }
004c4f37      
004c505a      eax = 0;
004c5063      return 0;
004c4f00  }

004c50c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c50d0  void __thiscall gmVendorUI::HandleButtonClicks(class gmVendorUI* this, uint32_t arg2)

004c50d0  {
004c50e5      class IDClass<_tagDataID,32,0> __return;
004c50e5      VendorProfile::VendorTradeCurrency(this->shopVendorProfile, &__return);
004c5102      class PackableList<ItemProfile>* var_14c_1;
004c5102      uint32_t ACCWeenieObject::selectedID_1;
004c5102      int32_t var_144_10;
004c5102      uint32_t var_130;
004c5102      void var_108;
004c5102      class PackableList<ItemProfile>* edi_7;
004c5102      
004c5102      if ((arg2 - 0x100000c2) <= 0x14)
004c5111          switch (arg2)
004c5111          {
004c5235              case 0x100000c2:
004c5235              {
004c5235                  gmVendorUI::BuySingleItem(this, ACCWeenieObject::selectedID);
004c5235                  break;
004c5235              }
004c524d              case 0x100000c3:
004c524d              {
004c524d                  class ACCWeenieObject* eax_8 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
004c524d                  
004c5259                  if (eax_8 != 0)
004c5259                  {
004c525f                      uint32_t _stackSize = eax_8->pwd._stackSize;
004c525f                      
004c526c                      if ((_stackSize == 0 || _stackSize <= 1))
004c526c                      {
004c529e                          VendorItemsUI::AddToBuyList(this->m_itemsUI, eax_8, 1);
004c52ad                          return;
004c526c                      }
004c526c                      
004c526f                      uint32_t eax_9 = ItemHolder::GetObjectSplitSize(eax_8);
004c527f                      VendorItemsUI::AddToBuyList(this->m_itemsUI, eax_8, eax_9);
004c5259                  }
004c524d                  break;
004c524d              }
004c5331              case 0x100000c9:
004c5331              {
004c5331                  class ACCWeenieObject* eax_12 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
004c5339                  int32_t ebx;
004c5339                  ebx = 0;
004c5339                  
004c533d                  if (eax_12 != 0)
004c5346                      ebx = eax_12->pwd._maxStackSize > 1;
004c5346                  
004c5358                  if (gmVendorUI::BuySingleItem(this, ACCWeenieObject::selectedID) != 0)
004c5358                  {
004c5368                      int32_t ecx_29;
004c5368                      ecx_29 = ebx == 0;
004c5375                      var_144_10 = ((ecx_29 * 2) - 1);
004c5376                      ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004c5377                      var_14c_1 = &this->m_buyList;
004c52ea                  label_4c52ea:
004c52ea                      gmVendorUI::RemoveProfileFromList(this, var_14c_1, ACCWeenieObject::selectedID_1, var_144_10);
004c52f5                      VendorBuyUI::Update(this->m_buyUI);
004c5358                  }
004c5331                  break;
004c5331              }
004c5388              case 0x100000ca:
004c5388              {
004c5388                  class VendorBuyUI* m_buyUI = this->m_buyUI;
004c5388                  
004c538e                  if (__return == INVALID_DID.id)
004c538e                  {
004c5401                      if (m_buyUI->m_transactionValue <= this->m_totalValue)
004c5401                          goto label_4c5469;
004c5401                      
004c5407                      StringInfo::StringInfo(&var_108);
004c5415                      void var_128;
004c5415                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_128, &gmVendorUI::`vftable'.RecvNotice_SetSelectedSpell);
004c5425                      StringInfo::SetLiteralValue(&var_108, &var_128, 1);
004c542e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_128);
004c543a                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_108);
004c5446                      StringInfo::~StringInfo(&var_108);
004c5455                      return;
004c538e                  }
004c538e                  
004c539d                  void* var_144_13;
004c539d                  
004c539d                  if (m_buyUI->m_transactionValue > (this->shopVendorProfile->trade_num - this->m_last_sale))
004c539d                  {
004c53a7                      StringInfo::StringInfo(&var_108);
004c53b5                      void var_11c;
004c53b5                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, &gmVendorUI::`vftable'.RecvNotice_SetSelectedSpell);
004c53c5                      StringInfo::SetLiteralValue(&var_108, &var_11c, 1);
004c53ce                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
004c53d7                      var_144_13 = &var_108;
004c53da                  label_4c53da:
004c53da                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_144_13);
004c53e6                      StringInfo::~StringInfo(&var_108);
004c53f5                      return;
004c539d                  }
004c539d                  
004c5469              label_4c5469:
004c5469                  gmVendorUI::RecordContents(this, m_buyUI->m_buyShopList, &this->m_buyList, 1, 1);
004c547b                  int32_t var_114;
004c547b                  gmVendorUI::InqListSlotCount(this, &this->m_buyList, &var_130, &var_114);
004c5486                  class ACCWeenieObject* eax_18 = ClientObjMaintSystem::GetWeenieObject(GetPlayerID());
004c549d                  int32_t edi_4 = (eax_18->pwd._containersCapacity - ACCWeenieObject::GetNumContainedContainers(eax_18));
004c549d                  
004c54a3                  if (var_114 > edi_4)
004c54a3                  {
004c5509                  label_4c5509:
004c5509                      StringInfo::StringInfo(&var_108);
004c5517                      void var_120;
004c5517                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_120, &gmVendorUI::`vftable'.RecvNotice_AddSalvageItem);
004c5527                      StringInfo::SetLiteralValue(&var_108, &var_120, 1);
004c5530                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_120);
004c5539                      var_144_13 = &var_108;
004c553a                      goto label_4c53da;
004c54a3                  }
004c54a3                  
004c54b2                  int32_t edi_6 = (eax_18->pwd._itemsCapacity - ACCWeenieObject::GetNumContainedItems(eax_18));
004c54b2                  
004c54b8                  if (var_130 > edi_6)
004c54b8                      goto label_4c5509;
004c54b8                  
004c54c4                  if (__return != INVALID_DID.id)
004c54cf                      this->m_last_sale = this->m_buyUI->m_transactionValue;
004c54cf                  
004c54e5                  void __return_2;
004c54e5                  class IDClass<_tagDataID,32,0> id = VendorProfile::VendorTradeCurrency(this->shopVendorProfile, &__return_2)->id;
004c54f4                  gmVendorUI::SendShopEvent(this, this->shopVendorID, &this->m_buyList, id, SE_BUY);
004c54fb                  PackableList<ItemProfile>::Flush(&this->m_buyList);
004c52f5                  VendorBuyUI::Update(this->m_buyUI);
004c5388                  break;
004c5388              }
004c52b7              case 0x100000cb:
004c52b7              {
004c52b7                  class ACCWeenieObject* eax_10 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
004c52bf                  bool ecx_22 = false;
004c52bf                  
004c52c3                  if (eax_10 != 0)
004c52cc                      ecx_22 = eax_10->pwd._maxStackSize > 1;
004c52cc                  
004c52d8                  int32_t edx_3;
004c52d8                  edx_3 = ecx_22 == 0;
004c52e5                  var_144_10 = ((edx_3 * 2) - 1);
004c52e6                  ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004c52e7                  var_14c_1 = &this->m_buyList;
004c52e7                  goto label_4c52ea;
004c52b7              }
004c530d              case 0x100000cc:
004c530d              {
004c530d                  PackableList<ItemProfile>::Flush(&this->m_buyList);
004c5318                  VendorBuyUI::Update(this->m_buyUI);
004c530d                  break;
004c530d              }
004c5576              case 0x100000d2:
004c5576              {
004c5576                  uint32_t ACCWeenieObject::selectedID_2 = ACCWeenieObject::selectedID;
004c5576                  
004c5586                  if (gmVendorUI::SellSingleItem(this, ACCWeenieObject::selectedID_2) != 0)
004c5586                  {
004c5591                      gmVendorUI::VendorItemSetSellState(this, ACCWeenieObject::selectedID_2, 0);
004c55a2                      gmVendorUI::RemoveProfileFromList(this, &this->m_sellList, ACCWeenieObject::selectedID_2, 0xffffffff);
004c561c                      VendorSellUI::Update(this->m_sellUI);
004c5586                  }
004c5576                  break;
004c5576              }
004c55b6              case 0x100000d3:
004c55b6              {
004c55b6                  edi_7 = &this->m_sellList;
004c55b6                  
004c55c7                  if (gmVendorUI::RecordContents(this, this->m_sellUI->m_sellShopList, edi_7, 1, 1) == 0)
004c55c7                  {
004c55ce                      class VendorProfile* shopVendorProfile = this->shopVendorProfile;
004c55d4                      this->m_last_sale = 0;
004c55de                      void __return_1;
004c55de                      VendorProfile::VendorTradeCurrency(shopVendorProfile, &__return_1);
004c55e3                      uint32_t shopVendorID = this->shopVendorID;
004c55eb                      CM_Vendor::Event_Sell(shopVendorID, edi_7);
004c55f3                      ACCWeenieObject::RecordRequest(shopVendorID, IR_SHOP_EVENT);
004c5602                      ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
004c5602                      goto label_4c560a;
004c55c7                  }
004c55b6                  break;
004c55b6              }
004c554a              case 0x100000d4:
004c554a              {
004c554a                  gmVendorUI::VendorItemSetSellState(this, ACCWeenieObject::selectedID, 0);
004c5561                  gmVendorUI::RemoveProfileFromList(this, &this->m_sellList, ACCWeenieObject::selectedID, 0xffffffff);
004c561c                  VendorSellUI::Update(this->m_sellUI);
004c554a                  break;
004c554a              }
004c556b              case 0x100000d5:
004c556b              {
004c556b                  edi_7 = &this->m_sellList;
004c560a              label_4c560a:
004c560a                  gmVendorUI::FlushSellListSellState(this, edi_7);
004c5611                  PackableList<ItemProfile>::Flush(edi_7);
004c561c                  VendorSellUI::Update(this->m_sellUI);
004c556b                  break;
004c556b              }
004c512a              case 0x100000d6:
004c512a              {
004c512a                  if ((this->m_buyList.head == 0 && this->m_sellList.head == 0))
004c512a                  {
004c512c                      this->vtable->SetVisible(0);
004c513e                      return;
004c512a                  }
004c512a                  
004c5147                  if (gmVendorUI::m_curDialogContext == 0)
004c5147                  {
004c5151                      StringInfo::StringInfo(&var_108);
004c515f                      void var_118;
004c515f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, u"You have not completed all trans…");
004c516f                      StringInfo::SetLiteralValue(&var_108, &var_118, 1);
004c5178                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
004c5184                      void var_78;
004c5184                      PropertyCollection::PropertyCollection(&var_78);
004c5192                      var_130 = 0;
004c5196                      int32_t var_12c = 0;
004c519a                      BaseProperty::SetPropertyName(&var_130, 0x8e);
004c51a5                      BaseProperty::SetEnum(&var_130, 1);
004c51b6                      PropertyCollection::AddProperty(&var_78, &var_130);
004c51c4                      BaseProperty::SetPropertyName(&var_130, 0xc5);
004c51d2                      BaseProperty::SetStringInfo(&var_130, &var_108);
004c51e3                      class PropertyCollection* eax_4;
004c51e3                      void (* edx_2)(class PropertyCollection const*);
004c51e3                      eax_4 = PropertyCollection::AddProperty(&var_78, &var_130);
004c51ef                      void (* var_144_4)(class PropertyCollection const* arg1) = gmVendorUI::CloseVendorDialogCallback;
004c51f4                      void* var_148_2 = &var_78;
004c5201                      gmVendorUI::m_curDialogContext = DialogFactory::MakeCallbackDialogInCurrentUI(eax_4, edx_2);
004c5206                      BaseProperty::~BaseProperty(&var_130);
004c5212                      PropertyCollection::~PropertyCollection(&var_78);
004c521b                      StringInfo::~StringInfo(&var_108);
004c5147                  }
004c512a                  break;
004c512a              }
004c5111          }
004c50d0  }

004c562e                                            8b ff                                                                ..
004c5630  uint32_t jump_table_4c5630[0xc] = 
004c5630  {
004c5630      [0x0] =  0x004c522d
004c5634      [0x1] =  0x004c5247
004c5638      [0x2] =  0x004c532a
004c563c      [0x3] =  0x004c537d
004c5640      [0x4] =  0x004c52b0
004c5644      [0x5] =  0x004c5307
004c5648      [0x6] =  0x004c5576
004c564c      [0x7] =  0x004c55a9
004c5650      [0x8] =  0x004c553f
004c5654      [0x9] =  0x004c556b
004c5658      [0xa] =  0x004c5118
004c565c      [0xb] =  0x004c5621
004c5660  }
004c5660  uint8_t lookup_table_4c5660[0x15] = 
004c5660  {
004c5660      [0x00] =  0x00
004c5661      [0x01] =  0x01
004c5662      [0x02] =  0x0b
004c5663      [0x03] =  0x0b
004c5664      [0x04] =  0x0b
004c5665      [0x05] =  0x0b
004c5666      [0x06] =  0x0b
004c5667      [0x07] =  0x02
004c5668      [0x08] =  0x03
004c5669      [0x09] =  0x04
004c566a      [0x0a] =  0x05
004c566b      [0x0b] =  0x0b
004c566c      [0x0c] =  0x0b
004c566d      [0x0d] =  0x0b
004c566e      [0x0e] =  0x0b
004c566f      [0x0f] =  0x0b
004c5670      [0x10] =  0x06
004c5671      [0x11] =  0x07
004c5672      [0x12] =  0x08
004c5673      [0x13] =  0x09
004c5674      [0x14] =  0x0a
004c5675  }

004c5675                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c5680  void __thiscall gmVendorUI::HandleDropRelease(class gmVendorUI* this, struct UIElementMessageInfo const* arg2)

004c5680  {
004c5684      uint32_t dwParam1 = arg2->dwParam1;
004c568b      class UIElement* esi = *(uint32_t*)(dwParam1 + 8);
004c5690      class UIElement* eax = *(uint32_t*)(dwParam1 + 0x10);
004c5690      
004c569a      if (((esi != 0 && eax != 0) && UIElement::IsAncestorOfMe(eax, this->m_sellUI->m_sellShopList) != 0))
004c569a      {
004c56c1          char var_8;
004c56c1          void var_4;
004c56c1          UIElement_ItemList::InqDropIconInfo(esi, &arg2, &var_4, &var_8);
004c56c6          struct UIElementMessageInfo* eax_2 = arg2;
004c56c6          
004c56d6          if ((eax_2 != 0 && (var_8 & 0xe) == 0))
004c56df              VendorSellUI::AcceptDragObject(this->m_sellUI, eax_2);
004c569a      }
004c5680  }

004c56ec                                      90 90 90 90                                                              ....

004c56f0  void __thiscall gmVendorUI::RecvNotice_OpenVendor(class gmVendorUI* this, uint32_t arg2, class VendorProfile const* arg3, class PackableList<ItemProfile> const* arg4, enum ShopMode arg5)

004c56f0  {
004c56f6      uint32_t edx;
004c56f6      /* tailcall */
004c56f6      return gmVendorUI::OpenVendor(((char*)this - 0x5f8), edx, arg2, arg3, arg4);
004c56f0  }

004c56fb                                                                                   90 90 90 90 90                             .....

004c5700  enum UIElementMessageListenResult __thiscall gmVendorUI::ListenToElementMessage(class gmVendorUI* this, struct UIElementMessageInfo const* arg2)

004c5700  {
004c5706      uint32_t idMessage = arg2->idMessage;
004c5706      
004c570e      if (idMessage != 0x1c)
004c570e      {
004c5734          if (idMessage == 1)
004c5734          {
004c573b              gmVendorUI::HandleButtonClicks(this, arg2->idElement);
004c574a              return UIElement::ListenToElementMessage(this, arg2);
004c5734          }
004c5734          
004c5750          if (idMessage != 7)
004c5750          {
004c5785              if ((idMessage == 0x2c && arg2->idElement == 0x100000b8))
004c5785              {
004c5787                  class UIElement_Panel* m_vendorPanel = this->m_vendorPanel;
004c5787                  
004c578f                  if (m_vendorPanel != 0)
004c578f                  {
004c5791                      uint32_t m_OpenPageToken = m_vendorPanel->m_OpenPageToken;
004c5791                      
004c579c                      if (m_OpenPageToken == 0x100000bc)
004c579c                      {
004c57e2                          VendorItemsUI::UpdateItemsList(this->m_itemsUI, 0, 0);
004c57f1                          return UIElement::ListenToElementMessage(this, arg2);
004c579c                      }
004c579c                      
004c57a1                      if (m_OpenPageToken == 0x100000c4)
004c57a1                      {
004c57c6                          VendorBuyUI::Update(this->m_buyUI);
004c57d5                          return UIElement::ListenToElementMessage(this, arg2);
004c57a1                      }
004c57a1                      
004c57a6                      if (m_OpenPageToken == 0x100000cd)
004c57ae                          VendorSellUI::Update(this->m_sellUI);
004c578f                  }
004c5785              }
004c5785              else if (idMessage == 0x15)
004c57fc                  gmVendorUI::HandleDropRelease(this, arg2);
004c5750          }
004c5750          else if (arg2->idElement == 0x100000bf)
004c5768              VendorItemsUI::UpdateItemsList(this->m_itemsUI, 0, 1);
004c570e      }
004c570e      else if (this->m_itemsUI != 0)
004c571f          gmVendorUI::HandleMousePresses(this, arg2);
004c571f      
004c580b      return UIElement::ListenToElementMessage(this, arg2);
004c5700  }

004c580e                                            90 90                                                                ..

004c5810  uint32_t __stdcall gmSpellcastingUI::GetNextTabID(class gmSpellcastingUI* this @ ecx, uint32_t arg2)

004c5810  {
004c5825      if ((arg2 <= 0x100005c2 && (arg2 != 0x100005c2 && (arg2 - 0x100000a3) <= 6)))
004c5819          switch (arg2)
004c5819          {
004c5833              case 0x100000a3:
004c5833              {
004c5833                  return 0x100000a4;
004c5833                  break;
004c5833              }
004c583b              case 0x100000a4:
004c583b              {
004c583b                  return 0x100000a5;
004c583b                  break;
004c583b              }
004c5843              case 0x100000a5:
004c5843              {
004c5843                  return 0x100000a6;
004c5843                  break;
004c5843              }
004c584b              case 0x100000a6:
004c584b              {
004c584b                  return 0x100000a7;
004c584b                  break;
004c584b              }
004c5853              case 0x100000a7:
004c5853              {
004c5853                  return 0x100000a8;
004c5853                  break;
004c5853              }
004c585b              case 0x100000a8:
004c585b              {
004c585b                  return 0x100000a9;
004c585b                  break;
004c585b              }
004c5863              case 0x100000a9:
004c5863              {
004c5863                  return 0x100005c2;
004c5863                  break;
004c5863              }
004c5819          }
004c5819      
004c586b      return 0x100000a3;
004c5810  }

004c586e                                            8b ff                                                                ..
004c5870  uint32_t jump_table_4c5870[0x7] = 
004c5870  {
004c5870      [0x0] =  0x004c582e
004c5874      [0x1] =  0x004c5836
004c5878      [0x2] =  0x004c583e
004c587c      [0x3] =  0x004c5846
004c5880      [0x4] =  0x004c584e
004c5884      [0x5] =  0x004c5856
004c5888      [0x6] =  0x004c585e
004c588c  }

004c588c                                      90 90 90 90                                                              ....

004c5890  uint32_t __stdcall gmSpellcastingUI::GetPrevTabID(class gmSpellcastingUI* this @ ecx, uint32_t arg2)

004c5890  {
004c5899      if (arg2 <= 0x100005c2)
004c5899      {
004c589b          if (arg2 == 0x100005c2)
004c58e3              return 0x100000a9;
004c58e3          
004c58a5          if ((arg2 - 0x100000a3) <= 6)
004c5899              switch (arg2)
004c5899              {
004c58b3                  case 0x100000a3:
004c58b3                  {
004c58b3                      return 0x100005c2;
004c58b3                      break;
004c58b3                  }
004c58bb                  case 0x100000a5:
004c58bb                  {
004c58bb                      return 0x100000a4;
004c58bb                      break;
004c58bb                  }
004c58c3                  case 0x100000a6:
004c58c3                  {
004c58c3                      return 0x100000a5;
004c58c3                      break;
004c58c3                  }
004c58cb                  case 0x100000a7:
004c58cb                  {
004c58cb                      return 0x100000a6;
004c58cb                      break;
004c58cb                  }
004c58d3                  case 0x100000a8:
004c58d3                  {
004c58d3                      return 0x100000a7;
004c58d3                      break;
004c58d3                  }
004c58db                  case 0x100000a9:
004c58db                  {
004c58db                      return 0x100000a8;
004c58db                      break;
004c58db                  }
004c5899              }
004c5899      }
004c5899      
004c58eb      return 0x100000a3;
004c5890  }

004c58ee                                            8b ff                                                                ..
004c58f0  uint32_t jump_table_4c58f0[0x7] = 
004c58f0  {
004c58f0      [0x0] =  0x004c58ae
004c58f4      [0x1] =  0x004c58e6
004c58f8      [0x2] =  0x004c58b6
004c58fc      [0x3] =  0x004c58be
004c5900      [0x4] =  0x004c58c6
004c5904      [0x5] =  0x004c58ce
004c5908      [0x6] =  0x004c58d6
004c590c  }

004c590c                                      90 90 90 90                                                              ....

004c5910  int32_t __fastcall gmSpellcastingUI::GetOpenSubMenuIndex(class gmSpellcastingUI* this)

004c5910  {
004c5910      class UIElement_Panel* m_spellcastPanel = this->m_spellcastPanel;
004c5910      
004c5918      if (m_spellcastPanel != 0)
004c5918      {
004c591a          uint32_t m_OpenPageToken = m_spellcastPanel->m_OpenPageToken;
004c591a          
004c5925          if (m_OpenPageToken <= 0x100005c3)
004c5925          {
004c5927              if (m_OpenPageToken == 0x100005c3)
004c5963                  return 7;
004c5963              
004c5931              if ((m_OpenPageToken - 0x100000aa) <= 6)
004c5931                  switch (m_OpenPageToken)
004c5931                  {
004c593f                      case 0x100000ab:
004c593f                      {
004c593f                          return 1;
004c593f                          break;
004c593f                      }
004c5945                      case 0x100000ac:
004c5945                      {
004c5945                          return 2;
004c5945                          break;
004c5945                      }
004c594b                      case 0x100000ad:
004c594b                      {
004c594b                          return 3;
004c594b                          break;
004c594b                      }
004c5951                      case 0x100000ae:
004c5951                      {
004c5951                          return 4;
004c5951                          break;
004c5951                      }
004c5957                      case 0x100000af:
004c5957                      {
004c5957                          return 5;
004c5957                          break;
004c5957                      }
004c595d                      case 0x100000b0:
004c595d                      {
004c595d                          return 6;
004c595d                          break;
004c595d                      }
004c5931                  }
004c5925          }
004c5918      }
004c5918      
004c5966      return 0;
004c5910  }

004c5967                       90                                                                                 .
004c5968  uint32_t jump_table_4c5968[0x7] = 
004c5968  {
004c5968      [0x0] =  0x004c5964
004c596c      [0x1] =  0x004c593a
004c5970      [0x2] =  0x004c5940
004c5974      [0x3] =  0x004c5946
004c5978      [0x4] =  0x004c594c
004c597c      [0x5] =  0x004c5952
004c5980      [0x6] =  0x004c5958
004c5984  }

004c5984              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004c5990  uint8_t __stdcall SpellCastSubMenu::OnItemListDragOver(class SpellCastSubMenu* this @ ecx, class UIElement_UIItem* arg2, uint32_t arg3, uint32_t arg4, enum DropItemFlags arg5)

004c5990  {
004c5996      if (arg4 != 0)
004c59a1          UIElement_UIItem::SetDragAcceptState(arg2, 0x10000040);
004c59a1      
004c59a6      uint32_t eax;
004c59a6      eax = 1;
004c59a8      return 1;
004c5990  }

004c59ab                                   90 90 90 90 90                                                             .....

004c59b0  void __fastcall NIList<NetBlob *>::DeleteContents(class NIList<NetBlob *>* this)

004c59b0  {
004c59b4      class NIListElement<NetBlob *>* i = this->head_;
004c59b4      
004c59b8      while (i != 0)
004c59b8      {
004c59c0          class NIListElement<NetBlob *>* i_1 = i;
004c59c2          i = i->next_;
004c59c6          operator delete(i_1);
004c59b8      }
004c59b8      
004c59d2      this->head_ = 0;
004c59d8      this->tail_ = nullptr;
004c59b0  }

004c59e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c59f0  void __fastcall gmSpellcastingUI::~gmSpellcastingUI(class gmSpellcastingUI* this)

004c59f0  {
004c59fc      this->vtable = 0x7b6130;
004c59f6      this->vtable = &gmSpellcastingUI::`vftable';
004c5a08      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004c5a08      
004c5a0f      if (eax != 0)
004c5a11          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004c5a11      
004c5a19      void* __offset(gmSpellcastingUI, 0x708) esi = &this[1];
004c5a1f      int32_t i_1 = 8;
004c5a3a      int32_t i;
004c5a3a      
004c5a3a      do
004c5a3a      {
004c5a24          class UIElement_ItemList* m_spellItemList = ADJ(esi)->m_subMenus[7].m_spellItemList;
004c5a27          esi -= 0x1c;
004c5a2c          *(int32_t*)((char*)ADJ(esi) + 0x708) = 0x7b5e84;
004c5a2c          
004c5a32          if (m_spellItemList != 0)
004c5a34              UIElement_ItemList::UnregisterItemListDragHandler(m_spellItemList);
004c5a34          
004c5a39          i = i_1;
004c5a39          i_1 -= 1;
004c5a3a      } while (i != 1);
004c59f6      this->vtable = &gmUrgentAssistanceUI::`vftable';
004c5a44      NoticeHandler::~NoticeHandler(&this->vtable);
004c5a4f      /* tailcall */
004c5a4f      return UIElement_Field::~UIElement_Field(this);
004c59f0  }

004c5a54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c5a60  class UIElement* __thiscall gmSpellcastingUI::DynamicCast(class gmSpellcastingUI* this, uint32_t arg2) __pure

004c5a60  {
004c5a6c      if (arg2 == 0x10000015)
004c5a79          return this;
004c5a79      
004c5a73      int32_t edx_1;
004c5a73      edx_1 = arg2 != 3;
004c5a77      return (this & (edx_1 - 1));
004c5a60  }

004c5a7c                                                                                      90 90 90 90                              ....

004c5a80  uint32_t gmSpellcastingUI::GetUIElementType(class gmSpellcastingUI const* this @ ecx) __pure

004c5a80  {
004c5a85      return 0x10000015;
004c5a80  }

004c5a86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c5a90  void __thiscall SpellCastSubMenu::Init(class SpellCastSubMenu* this, class UIElement* arg2, uint32_t arg3, uint32_t arg4, int32_t arg5)

004c5a90  {
004c5a9f      class UIElement* eax = UIElement::GetChildRecursive(arg2, arg3);
004c5aaa      this->m_tabIndex = arg5;
004c5aaa      
004c5aad      if (eax != 0)
004c5aad      {
004c5ab6          class UIElement* eax_1 = UIElement::GetChildRecursive(eax, 0x100000b6);
004c5abd          class UIElement_ItemList* eax_2;
004c5abd          
004c5abd          if (eax_1 == 0)
004c5ad0              eax_2 = nullptr;
004c5abd          else
004c5ac8              eax_2 = eax_1->vtable->DynamicCast(0x10000031);
004c5ac8          
004c5ad4          this->m_spellItemList = eax_2;
004c5ad4          
004c5ad7          if (eax_2 != 0)
004c5adc              UIElement_ItemList::RegisterItemListDragHandler(eax_2, this);
004c5aad      }
004c5aad      
004c5aee      this->m_spellTabElement = UIElement::GetChildRecursive(arg2, arg4);
004c5a90  }

004c5af5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c5b00  void __thiscall SpellCastSubMenu::SetSelected(class SpellCastSubMenu* this, uint32_t arg2)

004c5b00  {
004c5b0d      uint32_t i = 0;
004c5b0d      
004c5b11      if (this->m_spellItemList->m_listItems.m_num <= 0)
004c5b11      {
004c5b87          this->m_selectedSpellID = arg2;
004c5b8b          return;
004c5b11      }
004c5b11      
004c5b77      do
004c5b77      {
004c5b24          class UIElement* eax_1 = UIElement_ListBox::GetItem(this->m_spellItemList, i);
004c5b24          
004c5b2b          if (eax_1 != 0)
004c5b2b          {
004c5b36              class UIElement_UIItem* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
004c5b36              
004c5b40              if (eax_2 != 0)
004c5b40              {
004c5b4c                  if ((arg2 == 0 || eax_2->spellID != arg2))
004c5b66                      UIElement_UIItem::SetSelectedState(eax_2, 0);
004c5b4c                  else
004c5b4c                  {
004c5b50                      UIElement_UIItem::SetSelectedState(eax_2, 1);
004c5b55                      class UIElement_ListBox* m_spellItemList = this->m_spellItemList;
004c5b59                      this->m_endowmentSelected = 0;
004c5b5d                      UIElement_ListBox::ScrollToView(m_spellItemList, i);
004c5b4c                  }
004c5b40              }
004c5b2b          }
004c5b2b          
004c5b74          i += 1;
004c5b77      } while (i < this->m_spellItemList->m_listItems.m_num);
004c5b77      
004c5b79      this->m_selectedSpellID = arg2;
004c5b00  }

004c5b1a                                                                                8d 9b 00 00 00 00                            ......
004c5b8e                                            90 90                                                                ..

004c5b90  uint8_t __thiscall SpellCastSubMenu::SelectSpellFromIndex(class SpellCastSubMenu* this, int32_t arg2)

004c5b90  {
004c5b93      class UIElement_ItemList* m_spellItemList = this->m_spellItemList;
004c5b98      class UIElement* eax;
004c5b98      
004c5b98      if (m_spellItemList != 0)
004c5b98      {
004c5b9f          eax = UIElement_ListBox::GetItem(m_spellItemList, arg2);
004c5b9f          
004c5ba6          if (eax != 0)
004c5ba6          {
004c5bb1              eax = eax->vtable->DynamicCast(0x10000032);
004c5bb1              
004c5bb9              if (eax != 0)
004c5bb9              {
004c5bbb                  eax = *(int32_t*)((char*)eax + 0x600);
004c5bbb                  
004c5bc3                  if (eax != 0)
004c5bc3                  {
004c5bc8                      int32_t eax_2;
004c5bc8                      int80_t st0;
004c5bc8                      eax_2 = SpellCastSubMenu::SetSelected(this, eax);
004c5bcd                      eax_2 = 1;
004c5bd0                      return 1;
004c5bc3                  }
004c5bb9              }
004c5ba6          }
004c5b98      }
004c5b98      
004c5bd3      eax = 0;
004c5bd6      return 0;
004c5b90  }

004c5bd9                                                                             90 90 90 90 90 90 90                           .......

004c5be0  void __fastcall SpellCastSubMenu::UpdateShortcutOverlays(class SpellCastSubMenu* this)

004c5be0  {
004c5be3      class UIElement_ItemList* m_spellItemList = this->m_spellItemList;
004c5be3      
004c5be8      if (m_spellItemList != 0)
004c5be8      {
004c5bf1          uint32_t i = 0;
004c5bf1          
004c5bf5          if (m_spellItemList->m_listItems.m_num > 0)
004c5bf5          {
004c5c39              do
004c5c39              {
004c5bf8                  class UIElement* eax_2 = UIElement_ListBox::GetItem(m_spellItemList, i);
004c5bf8                  
004c5bff                  if (eax_2 != 0)
004c5bff                  {
004c5c0a                      class UIElement_UIItem* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c5c0a                      
004c5c14                      if (eax_3 != 0)
004c5c14                      {
004c5c1d                          uint32_t i_1;
004c5c1d                          
004c5c1d                          if ((i < 0 || i >= 9))
004c5c1d                          {
004c5c24                              int32_t var_c_3 = 0;
004c5c26                              i_1 = 0xffffffff;
004c5c1d                          }
004c5c1d                          else
004c5c1d                          {
004c5c1f                              int32_t var_c_2 = 0;
004c5c21                              i_1 = i;
004c5c1d                          }
004c5c1d                          
004c5c28                          UIElement_UIItem::SetShortcutNum(eax_3, i_1, 0);
004c5c14                      }
004c5bff                  }
004c5bff                  
004c5c2d                  m_spellItemList = this->m_spellItemList;
004c5c36                  i += 1;
004c5c39              } while (i < m_spellItemList->m_listItems.m_num);
004c5bf5          }
004c5be8      }
004c5be0  }

004c5c3e                                                                                            90 90                                ..

004c5c40  void __thiscall gmSpellcastingUI::gmSpellcastingUI(class gmSpellcastingUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004c5c40  {
004c5c4f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004c5c54      this->vtable = &gmUrgentAssistanceUI::`vftable';
004c5c60      this->vtable = 0x7b6130;
004c5c66      this->vtable = &gmSpellcastingUI::`vftable';
004c5c70      __builtin_memset(&this->m_spellcastPanel, 0, 0x21);
004c5ca6      class SpellCastSubMenu (* eax)[0x8] = &this->m_subMenus;
004c5cac      int32_t i_1 = 8;
004c5ccd      int32_t i;
004c5ccd      
004c5ccd      do
004c5ccd      {
004c5ccf          ADJ(eax)->m_subMenus[0].vtable = 0x7b5e84;
004c5cb7          __builtin_memset(((char*)eax + 4), 0, 0x15);
004c5cc9          eax = &*(uint224_t*)eax[1];
004c5ccc          i = i_1;
004c5ccc          i_1 -= 1;
004c5ccd      } while (i != 1);
004c5c40  }

004c5cd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c5ce0  void* __thiscall gmSpellcastingUI::`scalar deleting destructor'(class gmSpellcastingUI* this, uint32_t arg2)

004c5ce0  {
004c5ce3      gmSpellcastingUI::~gmSpellcastingUI(this);
004c5ce3      
004c5ced      if ((arg2 & 1) != 0)
004c5cf0          operator delete(this);
004c5cf0      
004c5cfb      return this;
004c5ce0  }

004c5cfe                                                                                            90 90                                ..

004c5d00  void __fastcall gmSpellcastingUI::PostInit(class gmSpellcastingUI* this)

004c5d00  {
004c5d04      UIElement::PostInit(this);
004c5d10      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100000a2);
004c5d17      class UIElement_Panel* eax_1;
004c5d17      
004c5d17      if (eax == 0)
004c5d27          eax_1 = nullptr;
004c5d17      else
004c5d1f          eax_1 = eax->vtable->DynamicCast(8);
004c5d1f      
004c5d30      this->m_spellcastPanel = eax_1;
004c5d36      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x1000048b);
004c5d3d      class UIElement_Text* eax_3;
004c5d3d      
004c5d3d      if (eax_2 == 0)
004c5d4d          eax_3 = nullptr;
004c5d3d      else
004c5d45          eax_3 = eax_2->vtable->DynamicCast(0xc);
004c5d45      
004c5d56      this->m_spellName = eax_3;
004c5d5c      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x100000a0);
004c5d63      this->m_spellcastBackground = eax_4;
004c5d63      
004c5d69      if (eax_4 != 0)
004c5d6b          eax_4->vtable->SetMouseVisible(1);
004c5d6b      
004c5d7e      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100000b2);
004c5d85      class UIElement_Button* eax_6;
004c5d85      
004c5d85      if (eax_5 == 0)
004c5d95          eax_6 = nullptr;
004c5d85      else
004c5d8d          eax_6 = eax_5->vtable->DynamicCast(1);
004c5d8d      
004c5d9e      this->m_spellcastButton = eax_6;
004c5da4      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x100000b1);
004c5dab      this->m_endowmentIcon = eax_7;
004c5dab      
004c5db1      if (eax_7 != 0)
004c5db1      {
004c5dba          class UIElement* eax_8 = UIElement::GetChildRecursive(eax_7, 0x10000453);
004c5dbf          class UIElement* m_endowmentIcon = this->m_endowmentIcon;
004c5dca          this->m_endowmentIcon_Overlay = eax_8;
004c5dd0          class UIElement* eax_9 = UIElement::GetChildRecursive(m_endowmentIcon, 0x10000452);
004c5dd5          class UIElement* m_endowmentIcon_1 = this->m_endowmentIcon;
004c5de0          this->m_endowmentIcon_Underlay = eax_9;
004c5de6          class UIElement* eax_10 = UIElement::GetChildRecursive(m_endowmentIcon_1, 0x10000454);
004c5deb          class UIElement* m_endowmentIcon_2 = this->m_endowmentIcon;
004c5df1          this->m_endowmentIcon_Selected = eax_10;
004c5df7          m_endowmentIcon_2->vtable->SetMouseVisible(1);
004c5e01          this->m_endowmentIcon->vtable->SetVisible(0);
004c5db1      }
004c5db1      
004c5e27      SpellCastSubMenu::Init(&this->m_subMenus, this->m_spellcastPanel, 0x100000aa, 0x100000a3, 0);
004c5e45      SpellCastSubMenu::Init(&this->m_subMenus[1], this->m_spellcastPanel, 0x100000ab, 0x100000a4, 1);
004c5e63      SpellCastSubMenu::Init(&this->m_subMenus[2], this->m_spellcastPanel, 0x100000ac, 0x100000a5, 2);
004c5e81      SpellCastSubMenu::Init(&this->m_subMenus[3], this->m_spellcastPanel, 0x100000ad, 0x100000a6, 3);
004c5e9f      SpellCastSubMenu::Init(&this->m_subMenus[4], this->m_spellcastPanel, 0x100000ae, 0x100000a7, 4);
004c5ebd      SpellCastSubMenu::Init(&this->m_subMenus[5], this->m_spellcastPanel, 0x100000af, 0x100000a8, 5);
004c5edb      SpellCastSubMenu::Init(&this->m_subMenus[6], this->m_spellcastPanel, 0x100000b0, 0x100000a9, 6);
004c5ef9      SpellCastSubMenu::Init(&this->m_subMenus[7], this->m_spellcastPanel, 0x100005c3, 0x100005c2, 7);
004c5efe      class GlobalEventHandler* eax_15 = GlobalEventHandler::GetGlobalEventHandler();
004c5efe      
004c5f07      if (eax_15 != 0)
004c5f07      {
004c5f0d          eax_15->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004c5f20          eax_15->vtable->RegisterNoticeHandler(0x4dd1ef, &this->vtable);
004c5f2d          eax_15->vtable->RegisterNoticeHandler(0x186a8, &this->vtable);
004c5f3a          eax_15->vtable->RegisterNoticeHandler(0x4dd256, &this->vtable);
004c5f47          eax_15->vtable->RegisterNoticeHandler(0x4dd1fb, &this->vtable);
004c5f54          eax_15->vtable->RegisterNoticeHandler(0x4dd202, &this->vtable);
004c5f61          eax_15->vtable->RegisterNoticeHandler(0x4dd203, &this->vtable);
004c5f6e          eax_15->vtable->RegisterNoticeHandler(0x4dd260, &this->vtable);
004c5f7b          eax_15->vtable->RegisterNoticeHandler(0x4dd24a, &this->vtable);
004c5f88          eax_15->vtable->RegisterNoticeHandler(0x4dd24b, &this->vtable);
004c5f95          eax_15->vtable->RegisterNoticeHandler(0x4dd24c, &this->vtable);
004c5fa2          eax_15->vtable->RegisterNoticeHandler(0x4dd24d, &this->vtable);
004c5faf          eax_15->vtable->RegisterNoticeHandler(0x4dd268, &this->vtable);
004c5fbc          eax_15->vtable->RegisterNoticeHandler(0x4dd26b, &this->vtable);
004c5fc9          eax_15->vtable->RegisterNoticeHandler(0x4dd26a, &this->vtable);
004c5fd6          eax_15->vtable->RegisterNoticeHandler(0x4dd269, &this->vtable);
004c5fe3          eax_15->vtable->RegisterNoticeHandler(0x4dd24e, &this->vtable);
004c5ff0          eax_15->vtable->RegisterNoticeHandler(0x4dd24f, &this->vtable);
004c5f07      }
004c5d00  }


004c6000  class UIElement* gmSpellcastingUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004c6000  {
004c6005      void* eax = operator new(0x708);
004c6005      
004c600f      if (eax == 0)
004c6025          return 0;
004c6025      
004c6022      return gmSpellcastingUI::gmSpellcastingUI(eax, arg1, arg2);
004c6000  }

004c6026                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c6030  void gmSpellcastingUI::Register()

004c6030  {
004c603a      UIElement::RegisterElementClass(0x10000015, gmSpellcastingUI::Create);
004c6030  }

004c6043           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004c6050  void __fastcall gmSpellcastingUI::Cast(class gmSpellcastingUI* this)

004c6050  {
004c605f      uint32_t esi = &*(uint32_t*)((char*)this->m_subMenus[0])[0xc][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 7)];
004c605f      
004c6077      if (&*(uint8_t*)((char*)this->m_subMenus[0])[0x18][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 0x1c)] != 0)
004c6077      {
004c6079          uint32_t m_endowmentItemID = this->m_endowmentItemID;
004c6079          
004c6081          if (m_endowmentItemID != 0)
004c6081          {
004c60f4              ItemHolder::UseObject(m_endowmentItemID, 1, 1);
004c6103              return;
004c6081          }
004c6077      }
004c6077      
004c6085      if (esi != 0)
004c6085      {
004c610b          if (ClientMagicSystem::GetMagicSystem() != 0)
004c6110              ClientMagicSystem::CastSpell(esi, 1);
004c6110          
004c611f          return;
004c6085      }
004c6085      
004c608b      void var_90;
004c608b      StringInfo::StringInfo(&var_90);
004c6099      void* var_94;
004c6099      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, &gmSpellcastingUI::`vftable'.RecvNotice_AddSalvageItem);
004c60a9      StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004c60b2      int32_t* esi_2 = ((char*)var_94 - 0x14);
004c60b2      
004c60c5      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c60cd          **(uint32_t**)esi_2(1);
004c60cd      
004c60d6      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c60e2      StringInfo::~StringInfo(&var_90);
004c6050  }


004c6120  void __fastcall gmSpellcastingUI::UpdateEndowmentIcon(class gmSpellcastingUI* this)

004c6120  {
004c614c      if ((this->m_endowmentIcon != 0 && (this->m_endowmentIcon_Overlay != 0 && this->m_endowmentIcon_Underlay != 0)))
004c614c      {
004c6152          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004c615e          uint32_t player_id;
004c615e          
004c615e          if (SmartBox::smartbox_1 == 0)
004c6168              player_id = 0;
004c615e          else
004c6160              player_id = SmartBox::smartbox_1->player_id;
004c6160          
004c616d          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(player_id);
004c616d          
004c6177          if (eax_1 == 0)
004c6177          {
004c625c          label_4c625c:
004c625c              this->m_endowmentItemID = 0;
004c6262              this->m_endowmentSpellID = 0;
004c6270              &*(uint8_t*)((char*)this->m_subMenus[0])[0x18][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 0x1c)] = 0;
004c6278              this->m_endowmentIcon->vtable->SetVisible(0);
004c63e2              this->m_endowmentPresent = 0;
004c6177          }
004c6177          else
004c6177          {
004c6185              uint32_t eax_2 = ACCWeenieObject::GetObjectAtLocation(eax_1, 0x1000000, 0);
004c6185              
004c618e              if (eax_2 == 0)
004c618e                  goto label_4c625c;
004c618e              
004c6195              class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(eax_2);
004c6195              
004c61a1              if (eax_3 == 0)
004c61a1                  goto label_4c625c;
004c61a1              
004c61bc              if ((*(uint8_t*)((char*)eax_3->vtable->InqType())[1] >= 0 || eax_3->pwd._spellID == 0))
004c61b0                  goto label_4c625c;
004c61b0              
004c61ce              int32_t eax_7 = (gmSpellcastingUI::GetOpenSubMenuIndex(this) * 0x1c);
004c61ce              
004c61d8              if (*(uint32_t*)(&*(uint32_t*)((char*)this->m_subMenus[0])[0xc] + eax_7) == 0)
004c61d8              {
004c61e4                  void* ecx_4 = &this->m_subMenus[gmSpellcastingUI::GetOpenSubMenuIndex(this)];
004c61ec                  *(uint8_t*)((char*)ecx_4 + 0x18) = 1;
004c61f0                  SpellCastSubMenu::SetSelected(ecx_4, 0);
004c61d8              }
004c61d8              
004c61f5              class UIElement* m_endowmentIcon_Underlay = this->m_endowmentIcon_Underlay;
004c61fb              this->m_endowmentItemID = eax_2;
004c6207              this->m_endowmentSpellID = eax_3->pwd._spellID;
004c620d              uint32_t edx_1 = UIRegion::ClearImage(m_endowmentIcon_Underlay);
004c6212              class ClientMagicSystem* eax_11 = ClientMagicSystem::GetMagicSystem();
004c6212              
004c621b              if (eax_11 != 0)
004c621b              {
004c6227                  uint32_t m_endowmentSpellID = this->m_endowmentSpellID;
004c622a                  class Graphic* eax_12 = ClientMagicSystem::GetSpellIcon(eax_11, edx_1);
004c622a                  
004c6233                  if (eax_12 != 0)
004c6233                  {
004c623d                      UIRegion::SetBlitMode(this->m_endowmentIcon_Underlay, Blit_3Alpha);
004c6244                      void* eax_13 = operator new(0xc);
004c624e                      class Graphic* eax_14;
004c624e                      
004c624e                      if (eax_13 == 0)
004c6289                          eax_14 = nullptr;
004c624e                      else
004c6253                          eax_14 = Graphic::Graphic(eax_13, eax_12);
004c6253                      
004c6292                      UIRegion::SetImage(this->m_endowmentIcon_Underlay, eax_14);
004c6233                  }
004c6233                  
004c629d                  UIRegion::ClearImage(this->m_endowmentIcon_Overlay);
004c62aa                  UIRegion::SetBlitMode(this->m_endowmentIcon_Overlay, Blit_3Alpha);
004c62b1                  class Graphic* eax_18 = operator new(0xc);
004c62bd                  class Graphic* eax_20;
004c62bd                  
004c62bd                  if (eax_18 == 0)
004c62d0                      eax_20 = nullptr;
004c62bd                  else
004c62c9                      eax_20 = Graphic::Graphic(eax_18, ACCWeenieObject::GetDragIcon(eax_3));
004c62c9                  
004c62d9                  UIRegion::SetImage(this->m_endowmentIcon_Overlay, eax_20);
004c62e8                  class gmSpellcastingUI* ecx_17;
004c62e8                  ecx_17 = &*(uint8_t*)((char*)this->m_subMenus[0])[0x18][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 0x1c)];
004c62f1                  class UIElement* m_endowmentIcon_Selected = this->m_endowmentIcon_Selected;
004c62f1                  
004c62f7                  if (ecx_17 == 0)
004c6302                      m_endowmentIcon_Selected->vtable->SetVisible(0);
004c62f7                  else
004c62f9                      m_endowmentIcon_Selected->vtable->SetVisible(1);
004c62f9                  
004c6310                  void var_90;
004c6310                  CSpellBase::CSpellBase(&var_90);
004c6326                  ClientMagicSystem::InqSpellBase(eax_11, this->m_endowmentSpellID, &var_90);
004c6337                  void __return_1;
004c6337                  class AC1Legacy::PStringBase<char>* eax_24 = CSpellBase::InqName(&var_90, &__return_1);
004c6349                  void __return;
004c6349                  class PStringBase<unsigned short>* eax_25 = ACCWeenieObject::GetObjectNameWide(eax_3, &__return, NAME_APPROPRIATE, 0);
004c6355                  char (* var_144_9)[0x1] = &eax_24->m_buffer->m_data;
004c6356                  class PSRefBufferCharData<unsigned short>* m_charbuffer = eax_25->m_charbuffer;
004c6363                  void var_12c;
004c6363                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_12c, Formatted, &gmSpellcastingUI::`vftable'.RecvNotice_FirstSpellSelection);
004c636f                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004c6378                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return_1);
004c6381                  void var_120;
004c6381                  StringInfo::StringInfo(&var_120);
004c6391                  StringInfo::SetLiteralValue(&var_120, &var_12c, 1);
004c63a1                  UIElement::SetTooltip(this->m_endowmentIcon, &var_120);
004c63a6                  class UIElement* m_endowmentIcon = this->m_endowmentIcon;
004c63ac                  m_endowmentIcon->__bitfield164 |= 0x20;
004c63b3                  this->m_endowmentIcon->vtable->SetVisible(1);
004c63c4                  StringInfo::~StringInfo(&var_120);
004c63cd                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_12c);
004c63d9                  CSpellBase::~CSpellBase(&var_90);
004c63e2                  this->m_endowmentPresent = 1;
004c621b              }
004c6177          }
004c614c      }
004c6120  }

004c63f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c6400  void __fastcall gmSpellcastingUI::RecvNotice_CastCurrentSpell(class gmSpellcastingUI* this)

004c6400  {
004c6406      /* tailcall */
004c6406      return gmSpellcastingUI::Cast(((char*)this - 0x5f8));
004c6400  }

004c640b                                   90 90 90 90 90                                                             .....

004c6410  void __fastcall SpellCastSubMenu::RemoveSpellFromPlayerModule(class SpellCastSubMenu* this, uint32_t arg2)

004c6410  {
004c6413      int32_t ebx;
004c6413      int32_t var_18 = ebx;
004c6414      int32_t ebp;
004c6414      int32_t var_1c = ebp;
004c6415      int32_t esi;
004c6415      int32_t var_20 = esi;
004c6416      struct Turbine_GUID* edi;
004c6416      struct Turbine_GUID* var_24 = edi;
004c641b      struct Turbine_GUID* var_14;
004c641b      int32_t* var_28 = &var_14;
004c6422      struct Turbine_GUID* var_2c = &CPlayerModule_ClassType;
004c642a      var_14 = nullptr;
004c6435      class TResult __return;
004c6435      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004c643a      struct Turbine_GUID* ecx_1 = var_14;
004c6443      var_2c = ecx_1;
004c6445      int32_t var_28_1 = 0;
004c6448      struct Turbine_GUID* eax_1 = var_2c;
004c644e      int32_t var_8 = 0;
004c6452      uint32_t var_4 = 0;
004c6452      
004c6456      if (eax_1 != 0)
004c645c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004c645c      
004c6468      struct Turbine_GUID** esp = &var_2c;
004c646f      void var_c;
004c646f      int32_t ebp_1 = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_c);
004c646f      
004c6471      if (ecx_1 != 0)
004c6477          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004c6477      
004c647a      class TResult __return_1 = __return;
004c647a      
004c6480      if (__return_1 != 0)
004c6480      {
004c6484          if (ebp_1 >= 0)
004c6484          {
004c6492              PlayerModule::RemoveSpellFavorite((__return_1 + 4), var_4, this->m_tabIndex);
004c649c              CM_Character::Event_RemoveSpellFavorite(var_4, this->m_tabIndex);
004c6484          }
004c6484          
004c64a8          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004c64a8          esp = &var_24;
004c6480      }
004c6480      
004c64ab      *(uint32_t*)esp;
004c64ab      esp[1];
004c64ab      esp[2];
004c64ab      esp[3];
004c6410  }

004c64b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c64c0  void __fastcall SpellCastSubMenu::AddSpellToPlayerModule(class SpellCastSubMenu* this, uint32_t arg2, uint32_t arg3)

004c64c0  {
004c64c3      int32_t ebx;
004c64c3      int32_t var_18 = ebx;
004c64c4      int32_t ebp;
004c64c4      int32_t var_1c = ebp;
004c64c5      int32_t esi;
004c64c5      int32_t var_20 = esi;
004c64c6      struct Turbine_GUID* edi;
004c64c6      struct Turbine_GUID* var_24 = edi;
004c64cb      struct Turbine_GUID* var_14;
004c64cb      int32_t* var_28 = &var_14;
004c64d2      struct Turbine_GUID* var_2c = &CPlayerModule_ClassType;
004c64da      var_14 = nullptr;
004c64e5      class TResult __return;
004c64e5      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004c64ea      struct Turbine_GUID* ecx_1 = var_14;
004c64f3      var_2c = ecx_1;
004c64f5      int32_t var_28_1 = 0;
004c64f8      struct Turbine_GUID* eax_1 = var_2c;
004c64fe      int32_t var_8 = 0;
004c6502      uint32_t var_4 = 0;
004c6502      
004c6506      if (eax_1 != 0)
004c650c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004c650c      
004c6518      struct Turbine_GUID** esp = &var_2c;
004c651f      void var_c;
004c651f      int32_t ebp_1 = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_8, &var_c);
004c651f      
004c6521      if (ecx_1 != 0)
004c6527          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004c6527      
004c652a      class TResult __return_1 = __return;
004c652a      
004c6530      if (__return_1 != 0)
004c6530      {
004c6534          if (ebp_1 >= 0)
004c6534          {
004c6547              PlayerModule::AddSpellFavorite((__return_1 + 4), var_4, __return_addr, this->m_tabIndex);
004c6552              CM_Character::Event_AddSpellFavorite(var_4, __return_addr, this->m_tabIndex);
004c6534          }
004c6534          
004c655e          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004c655e          esp = &var_24;
004c6530      }
004c6530      
004c6561      *(uint32_t*)esp;
004c6561      esp[1];
004c6561      esp[2];
004c6561      esp[3];
004c64c0  }

004c656b                                   90 90 90 90 90                                                             .....

004c6570  void __fastcall SpellCastSubMenu::UpdateFromPlayerModule(class SpellCastSubMenu* this)

004c6570  {
004c6576      int32_t ebx;
004c6576      int32_t var_14c = ebx;
004c6577      struct Turbine_GUID* ebp;
004c6577      struct Turbine_GUID* var_150 = ebp;
004c657a      class UIElement_ItemList* m_spellItemList = this->m_spellItemList;
004c657d      int32_t* __return_4;
004c657d      int32_t* __return_1 = __return_4;
004c657e      void* i_1 = nullptr;
004c6580      void* edi;
004c6580      void* var_158 = edi;
004c6581      class SpellCastSubMenu* this_1 = this;
004c6585      this->m_numSpells = 0;
004c6588      UIElement_ItemList::ItemList_Flush(m_spellItemList);
004c6591      struct Turbine_GUID* var_148;
004c6591      int32_t* var_15c = &var_148;
004c6596      struct Turbine_GUID* var_160 = &CPlayerModule_ClassType;
004c659b      class TResult var_144;
004c659b      class TResult* __return = &var_144;
004c659c      var_148 = nullptr;
004c65a7      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), __return, var_160, var_15c);
004c65ac      struct Turbine_GUID* ecx_1 = var_148;
004c65b5      var_160 = ecx_1;
004c65b7      int32_t var_15c_1 = 0;
004c65ba      struct Turbine_GUID* eax_1 = var_160;
004c65c0      int32_t var_134 = 0;
004c65c4      int32_t var_130 = 0;
004c65c4      
004c65c8      if (eax_1 != 0)
004c65ce          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004c65ce      
004c65da      struct Turbine_GUID** esp_1 = &var_160;
004c65e1      void var_124;
004c65e1      int32_t edi_1 = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_134, &var_124);
004c65e1      
004c65e3      if (ecx_1 != 0)
004c65e9          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004c65e9      
004c65ec      class TResult var_13c;
004c65ec      class TResult ecx_38 = var_13c;
004c65ec      
004c65f2      if (ecx_38 != 0)
004c65f2      {
004c65fa          if (edi_1 >= 0)
004c65fa          {
004c6607              class PackableList<unsigned long>* eax_3 = PlayerModule::GetFavoriteSpellsList((ecx_38 + 4), this->m_tabIndex);
004c660c              class PackableLLNode<unsigned long>* i = eax_3->head;
004c6617              int32_t* var_164_2 = &var_150;
004c661c              struct Turbine_GUID* var_168 = &PlayerDesc_ClassType;
004c6622              var_150 = nullptr;
004c662d              class TResult __return_2;
004c662d              InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_2, var_168, var_164_2);
004c6632              struct Turbine_GUID* ecx_7 = var_150;
004c663b              var_168 = ecx_7;
004c663d              int32_t var_164_3 = 0;
004c6640              struct Turbine_GUID* eax_5 = var_168;
004c6646              var_144 = 0;
004c664a              int32_t var_140 = 0;
004c664a              
004c664e              if (eax_5 != 0)
004c6654                  *(uint32_t*)(eax_5->m_data1 + 0x10)();
004c6654              
004c6667              int32_t ebx_2 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_144, &var_134);
004c6667              
004c6669              if (ecx_7 != 0)
004c666f                  *(uint32_t*)(ecx_7->m_data1 + 0x14)();
004c666f              
004c6672              class PackableList<unsigned long>* edi_3 = eax_3;
004c6672              
004c6678              if (edi_3 == 0)
004c6678              {
004c668b                  *(uint32_t*)(*(uint32_t*)var_144 + 0x14)();
004c6698                  return;
004c6678              }
004c6678              
004c667c              if (ebx_2 < 0)
004c667c              {
004c6682                  *(int32_t*)((char*)edi_3->vtable + 0x14)();
004c668b                  *(uint32_t*)(*(uint32_t*)var_144 + 0x14)();
004c6698                  return;
004c667c              }
004c667c              
004c6699              void* i_8 = nullptr;
004c6699              
004c669d              if (i != 0)
004c669d              {
004c66d8                  do
004c66d8                  {
004c66ac                      if (CACQualities::IsSpellKnown(edi_3, i->data) == 0)
004c66ac                      {
004c66ae                          uint32_t data = i->data;
004c66b0                          int32_t var_16c_4 = 8;
004c66b2                          void* i_4 = operator new(8);
004c66b2                          
004c66bc                          if (i_4 == 0)
004c66c5                              i_4 = nullptr;
004c66bc                          else
004c66bc                          {
004c66be                              *(uint32_t*)i_4 = data;
004c66c0                              *(uint32_t*)((char*)i_4 + 4) = i_1;
004c66bc                          }
004c66bc                          
004c66c9                          edi_3 = eax_3;
004c66cd                          i_1 = i_4;
004c66cd                          
004c66cf                          if (i_8 == 0)
004c66d1                              i_8 = i_4;
004c66ac                      }
004c66ac                      
004c66d3                      i = i->next;
004c66d8                  } while (i != 0);
004c66d8                  
004c66dc                  while (i_1 != 0)
004c66dc                  {
004c66de                      void* i_5 = i_1;
004c66e0                      i_1 = *(uint32_t*)((char*)i_1 + 4);
004c66e3                      int32_t esi_2 = *(uint32_t*)i_5;
004c66e6                      uint32_t edx_7 = operator delete(i_5);
004c66f2                      int32_t var_16c_6 = esi_2;
004c66f3                      SpellCastSubMenu::RemoveSpellFromPlayerModule(var_150, edx_7);
004c66dc                  }
004c669d              }
004c669d              
004c6700              int32_t* eax_10 = __return_1[1];
004c6705              int32_t* var_138_1 = eax_10;
004c6709              struct PackableList<unsigned long>::VTable* vtable;
004c6709              
004c6709              if (eax_10 == 0)
004c6709              {
004c6879              label_4c6879:
004c6879                  struct Turbine_GUID* esi_7 = var_150;
004c687d                  uint32_t ecx_34;
004c687d                  ecx_34 = esi_7->m_data4[4];
004c687d                  *(uint8_t*)((char*)ecx_34)[1] = esi_7->m_data4[5];
004c687d                  *(uint8_t*)((char*)ecx_34)[2] = esi_7->m_data4[6];
004c687d                  *(uint8_t*)((char*)ecx_34)[3] = esi_7->m_data4[7];
004c6883                  SpellCastSubMenu::SetSelected(esi_7, ecx_34);
004c6883                  esp_1 = &var_168;
004c688a                  SpellCastSubMenu::UpdateShortcutOverlays(esi_7);
004c6891                  void* i_2 = i_1;
004c6891                  
004c6893                  if (i_1 != 0)
004c6893                  {
004c68a5                      do
004c68a5                      {
004c6895                          void* i_6 = i_2;
004c6897                          i_2 = *(uint32_t*)((char*)i_2 + 4);
004c689b                          operator delete(i_6);
004c68a0                          esp_1 = &var_168;
004c68a5                      } while (i_2 != 0);
004c6893                  }
004c6893                  
004c68a7                  vtable = edi_3->vtable;
004c6709              }
004c6709              else
004c6709              {
004c6722                  while (true)
004c6722                  {
004c6722                      struct Turbine_GUID* edi_5 = var_150;
004c6726                      class UIElement_ItemList* ecx_16;
004c6726                      ecx_16 = edi_5->m_data2;
004c6726                      *(uint16_t*)((char*)ecx_16)[2] = edi_5->m_data3;
004c672a                      class UIElement_UIItem* eax_11 = UIElement_ItemList::ItemList_AddSpellShortcut(ecx_16, *(uint32_t*)eax_10);
004c672a                      esp_1 = &var_168;
004c6735                      *(int32_t*)((char*)edi_5 + 0x10) += 1;
004c6738                      class ClientMagicSystem* eax_12 = ClientMagicSystem::GetMagicSystem();
004c6738                      
004c6741                      if (eax_12 == 0)
004c6741                      {
004c68c4                          void* i_3 = i_1;
004c68c4                          
004c68c6                          if (i_1 != 0)
004c68c6                          {
004c68d8                              do
004c68d8                              {
004c68c8                                  void* i_7 = i_3;
004c68ca                                  i_3 = *(uint32_t*)((char*)i_3 + 4);
004c68ce                                  operator delete(i_7);
004c68d3                                  esp_1 = &var_168;
004c68d8                              } while (i_3 != 0);
004c68c6                          }
004c68c6                          
004c68de                          vtable = *(uint32_t*)eax_3;
004c68e0                          break;
004c6741                      }
004c6741                      
004c674b                      CSpellBase::CSpellBase(&var_130);
004c674b                      
004c6765                      if (ClientMagicSystem::InqSpellBase(eax_12, *(uint32_t*)var_138_1, &var_130) != 0)
004c6765                      {
004c677e                          char (* var_16c_10)[0x1] = &CSpellBase::InqName(&var_130, &__return_1)->m_buffer->m_data;
004c677f                          void (__thiscall** const var_170_2)(class gmNoticeHandler* this, class CContractTracker const*) = &gmSpellcastingUI::`vftable'.RecvNotice_SetDisplayContractTracker;
004c6788                          int32_t var_174_1 = 0;
004c678b                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_158, Formatted, &gmSpellcastingUI::`vftable'.RecvNotice_SetDisplayContractTracker);
004c6790                          int32_t* __return_3 = __return_1;
004c6790                          
004c67a5                          if ((InterlockedDecrement(&__return_3[1]) == 0 && __return_3 != 0))
004c67a5                          {
004c67a9                              int32_t var_16c_12 = 1;
004c67ad                              **(uint32_t**)__return_3(1);
004c67a5                          }
004c67a5                          
004c67b6                          void var_a0;
004c67b6                          StringInfo::StringInfo(&var_a0);
004c67bb                          int32_t var_16c_13 = 1;
004c67c9                          StringInfo::SetLiteralValue(&var_a0, &var_158, 1);
004c67d8                          UIElement::SetTooltip(eax_11, &var_a0);
004c67ed                          eax_11->__bitfield164 |= 0x20;
004c67f3                          StringInfo::~StringInfo(&var_a0);
004c67fc                          int32_t* esi_5 = ((char*)var_158 - 0x14);
004c67fc                          
004c680b                          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004c680b                          {
004c680f                              int32_t var_16c_16 = 1;
004c6813                              **(uint32_t**)esi_5(1);
004c680b                          }
004c6765                      }
004c6765                      
004c681c                      void var_ac;
004c681c                      MetaSpell::~MetaSpell(&var_ac);
004c682e                      int32_t var_f4_1 = 0x79285c;
004c683a                      int32_t* var_128;
004c683a                      
004c683a                      if ((InterlockedDecrement(&var_128[1]) == 0 && var_128 != 0))
004c683a                      {
004c683e                          int32_t var_16c_18 = 1;
004c6842                          **(uint32_t**)var_128(1);
004c683a                      }
004c683a                      
004c6844                      class TResult __return_5 = __return_2;
004c6844                      
004c6854                      if ((InterlockedDecrement((__return_5 + 4)) == 0 && __return_5 != 0))
004c6854                      {
004c6858                          int32_t var_16c_20 = 1;
004c685c                          **(uint32_t**)__return_5(1);
004c6854                      }
004c6854                      
004c6862                      int32_t* eax_25 = var_138_1[1];
004c6867                      var_130 = 0x79285c;
004c686b                      var_138_1 = eax_25;
004c686b                      
004c686f                      if (eax_25 == 0)
004c686f                      {
004c6875                          edi_3 = eax_3;
004c6875                          goto label_4c6879;
004c686f                      }
004c686f                      
004c6717                      eax_10 = var_138_1;
004c6722                  }
004c6709              }
004c6709              
004c68ab              *(int32_t*)((char*)vtable + 0x14)();
004c68ae              ecx_38 = var_144;
004c65fa          }
004c65fa          
004c68b4          *(uint32_t*)(*(uint32_t*)ecx_38 + 0x14)();
004c68b4          esp_1 = &esp_1[2];
004c65f2      }
004c65f2      
004c68b7      *(uint32_t*)esp_1;
004c68b7      esp_1[1];
004c68b7      esp_1[2];
004c68b7      esp_1[3];
004c6570  }

004c671d                                                                                         8d 49 00                               .I.
004c68e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c68f0  int32_t __thiscall SpellCastSubMenu::RemoveSpellFromMenu(class SpellCastSubMenu* this, uint32_t arg2)

004c68f0  {
004c68f9      if (arg2 == 0)
004c68ff          return 0xffffffff;
004c68ff      
004c6908      int32_t eax_1 = UIElement_ItemList::GetNumUIItems(this->m_spellItemList);
004c690f      uint32_t result = 0;
004c690f      
004c6913      if (eax_1 > 0)
004c6913      {
004c6954          do
004c6954          {
004c6919              class UIElement* eax_2 = UIElement_ListBox::GetItem(this->m_spellItemList, result);
004c6919              
004c6920              if (eax_2 != 0)
004c6920              {
004c692b                  class UIElement_UIItem* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c692b                  
004c6935                  if ((eax_3 != 0 && (UIElement_UIItem::UIItem_GetState(eax_3) == 0x1000001d && eax_3->spellID == arg2)))
004c6935                  {
004c6967                      uint32_t edx_3 = (this->m_numSpells - 1);
004c6968                      uint32_t var_14_2 = arg2;
004c696b                      this->m_numSpells = edx_3;
004c696e                      SpellCastSubMenu::RemoveSpellFromPlayerModule(this, edx_3);
004c6975                      SpellCastSubMenu::UpdateFromPlayerModule(this);
004c6975                      
004c697d                      if (arg2 == this->m_selectedSpellID)
004c6983                          SpellCastSubMenu::SetSelected(this, 0);
004c6983                      
004c698e                      return result;
004c6935                  }
004c6920              }
004c6920              
004c6951              result += 1;
004c6954          } while (result < eax_1);
004c6913      }
004c6913      
004c695d      return 0xffffffff;
004c68f0  }

004c6991                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004c69a0  void __fastcall gmSpellcastingUI::RecvNotice_PlayerDescReceived(class gmSpellcastingUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004c69a0  {
004c69a2      class HashSetData<UIElement *>** esi = &this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[9];
004c69a5      int32_t i_1 = 8;
004c69bb      int32_t i;
004c69bb      
004c69bb      do
004c69bb      {
004c69b2          SpellCastSubMenu::UpdateFromPlayerModule(esi);
004c69b7          esi = &esi[7];
004c69ba          i = i_1;
004c69ba          i_1 -= 1;
004c69bb      } while (i != 1);
004c69a0  }

004c69c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c69d0  void __thiscall gmSpellcastingUI::RecvNotice_RemoveSpellShortcut(class gmSpellcastingUI* this, uint32_t arg2)

004c69d0  {
004c69ea      SpellCastSubMenu::RemoveSpellFromMenu((((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628), arg2);
004c69d0  }

004c69f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004c6a00  void __fastcall gmSpellcastingUI::RecvNotice_SpellRemoved(class gmSpellcastingUI* this, uint32_t arg2)

004c6a00  {
004c6a02      class HashSetData<UIElement *>** esi = &this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[9];
004c6a05      int32_t i_1 = 8;
004c6a1b      int32_t i;
004c6a1b      
004c6a1b      do
004c6a1b      {
004c6a12          SpellCastSubMenu::UpdateFromPlayerModule(esi);
004c6a17          esi = &esi[7];
004c6a1a          i = i_1;
004c6a1a          i_1 -= 1;
004c6a1b      } while (i != 1);
004c6a00  }

004c6a22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c6a30  void __fastcall gmSpellcastingUI::UpdateCastButtonTooltip(class gmSpellcastingUI* this)

004c6a30  {
004c6a37      class gmSpellcastingUI* this_1 = this;
004c6a39      class ClientMagicSystem* eax = ClientMagicSystem::GetMagicSystem();
004c6a40      class ClientMagicSystem* var_98 = eax;
004c6a40      
004c6a44      if (eax != 0)
004c6a44      {
004c6a8b          uint32_t edi_6 = (((((this_1->m_subMenus[0].m_numSpells + this_1->m_subMenus[1].m_numSpells) + this_1->m_subMenus[2].m_numSpells) + this_1->m_subMenus[3].m_numSpells) + this_1->m_subMenus[4].m_numSpells) + this_1->m_subMenus[5].m_numSpells);
004c6a93          uint32_t edi_8 = ((edi_6 + this_1->m_subMenus[6].m_numSpells) + this_1->m_subMenus[7].m_numSpells);
004c6a85          this_1->m_spellcastButton->vtable->SetState(0xd);
004c6a9b          class UIElement_Button* m_spellcastButton = this_1->m_spellcastButton;
004c6aa1          m_spellcastButton->__bitfield164 &= 0xffffffdf;
004c6aae          UIElement::ClearTooltip(this_1->m_spellcastButton);
004c6abd          class PStringBase<unsigned short> __return_4 = &*(uint32_t*)((char*)this_1->m_subMenus[0])[0xc][(gmSpellcastingUI::GetOpenSubMenuIndex(this_1) * 7)];
004c6ac4          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004c6acf          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004c6ad7          class PStringBase<unsigned short> __return_2 = __return_4;
004c6adb          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004c6ae3          UIElement_Text::ClearAllText(this_1->m_spellName);
004c6ae8          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004c6aed          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
004c6af5          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004c6af7          uint32_t m_endowmentItemID = this_1->m_endowmentItemID;
004c6af7          
004c6aff          if (m_endowmentItemID == 0)
004c6aff          {
004c6b03              if (__return_4 != 0)
004c6b03                  goto label_4c6d62;
004c6b03              
004c6b09              m_endowmentItemID = this_1->m_endowmentPresent;
004c6b09              
004c6b15              if ((m_endowmentItemID != 0 || edi_8 > 0))
004c6b33                  PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"Select a spell to cast");
004c6b15              else
004c6b20                  PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u"You have no spells ready to cast");
004c6b20              
004c6b15              goto label_4c6f98;
004c6aff          }
004c6aff          
004c6b3f          class PStringBase<unsigned short> __return;
004c6b3f          int32_t* __return_1;
004c6b3f          void var_90;
004c6b3f          
004c6b3f          if (__return_4 != 0)
004c6b3f          {
004c6d62          label_4c6d62:
004c6d62              CSpellBase::CSpellBase(&var_90);
004c6d62              
004c6d78              if (ClientMagicSystem::InqSpellBase(var_98, __return_4, &var_90) != 0)
004c6d78              {
004c6d98                  int32_t* eax_28;
004c6d98                  int32_t ebx_4;
004c6d98                  eax_28 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, &CSpellBase::InqName(&var_90, &__return_1)->m_buffer->m_data);
004c6d9f                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer_4;
004c6d9f                  
004c6da6                  if (PStringBase<unsigned short>::s_NullBuffer_9 != *(uint32_t*)eax_28)
004c6da6                  {
004c6dbb                      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_9->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_9 != 0x14))
004c6dc3                          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_9 + -0x14)(1);
004c6dc3                      
004c6dc5                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_10 = *(uint32_t*)eax_28;
004c6dc8                      PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_10;
004c6dd0                      ebx_4(&PStringBase<unsigned short>::s_NullBuffer_10->m_data[-8]);
004c6da6                  }
004c6da6                  
004c6ddc                  int32_t* edi_16 = (__return - 0x14);
004c6ddc                  
004c6deb                  if ((InterlockedDecrement(&edi_16[1]) == 0 && edi_16 != 0))
004c6df3                      **(uint32_t**)edi_16(1);
004c6df3                  
004c6df5                  int32_t* __return_6 = __return_1;
004c6df5                  
004c6e05                  if ((InterlockedDecrement(&__return_6[1]) == 0 && __return_6 != 0))
004c6e0d                      **(uint32_t**)__return_6(1);
004c6e0d                  
004c6e25                  char var_78;
004c6e25                  
004c6e25                  if ((CSpellBase::IsUntargeted(&var_90) != 0 || (var_78 & 8) != 0))
004c6e25                  {
004c6f35                      this_1->m_spellcastButton->vtable->SetState(1);
004c6f58                      char (* var_bc_29)[0x1] = &CSpellBase::InqName(&var_90, &__return)->m_buffer->m_data;
004c6f63                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, &gmSpellcastingUI::`vftable'.RecvNotice_UpdateCharacterInformation);
004c6f68                      class PStringBase<unsigned short> __return_3 = __return;
004c6f68                      
004c6f7d                      if ((InterlockedDecrement((__return_3 + 4)) == 0 && __return_3 != 0))
004c6f85                          **(uint32_t**)__return_3(1);
004c6e25                  }
004c6e25                  else if (ACCWeenieObject::selectedID != 0)
004c6e32                  {
004c6e57                      ClientMagicSystem::GetMagicSystem();
004c6e57                      
004c6e76                      if (ClientMagicSystem::ObjectCompatibleWithSpell(ACCWeenieObject::selectedID, __return_2, 1, 0) == 0)
004c6e76                      {
004c6f17                          char (* var_bc_27)[0x1] = &CSpellBase::InqName(&var_90, &__return)->m_buffer->m_data;
004c6f22                          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, &gmSpellcastingUI::`vftable'.RecvNotice_EnableChatTargetSelection);
004c6f2e                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return);
004c6e76                      }
004c6e76                      else
004c6e76                      {
004c6e7c                          this_1->m_spellcastButton->vtable->SetState(1);
004c6e9f                          char (* var_bc_24)[0x1] = &CSpellBase::InqName(&var_90, &__return)->m_buffer->m_data;
004c6eaa                          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, &gmSpellcastingUI::`vftable'.RecvNotice_UpdateCharacterInformation);
004c6eb6                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return);
004c6ec1                          class ACCWeenieObject* eax_42 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
004c6ec1                          
004c6ecb                          if (eax_42 != 0)
004c6ecb                          {
004c6edc                              class PStringBase<unsigned short>* eax_43 = ACCWeenieObject::GetObjectNameWide(eax_42, &__return, NAME_APPROPRIATE, 0);
004c6ee1                              uint16_t* m_charbuffer_2 = eax_43->m_charbuffer;
004c6ee3                              uint16_t* m_charbuffer_4 = m_charbuffer_2;
004c6ee8                              wchar16 const* const var_c0_5 = u" on %s";
004c6eed                              class PSRefBufferCharData<unsigned short>** var_c4_13 = &PStringBase<unsigned short>::s_NullBuffer_3;
004c6eee                              PStringBase<unsigned short>::sprintf_append(eax_43, m_charbuffer_2);
004c6efa                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004c6ecb                          }
004c6e76                      }
004c6e32                  }
004c6e32                  else
004c6e32                  {
004c6e47                      char (* var_bc_22)[0x1] = &CSpellBase::InqName(&var_90, &__return)->m_buffer->m_data;
004c6f22                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, &gmSpellcastingUI::`vftable'.RecvNotice_UserPreferenceChanged_Menu);
004c6f2e                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return);
004c6e32                  }
004c6d78              }
004c6d78              
004c6d78              goto label_4c6f8b;
004c6b3f          }
004c6b3f          
004c6b46          class ACCWeenieObject* eax_7 = ClientObjMaintSystem::GetWeenieObject(m_endowmentItemID);
004c6b52          void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_bc_5;
004c6b52          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3;
004c6b52          
004c6b52          if (eax_7 != 0)
004c6b52          {
004c6b8b              CSpellBase::CSpellBase(&var_90);
004c6b8b              
004c6ba7              if (ClientMagicSystem::InqSpellBase(var_98, this_1->m_endowmentSpellID, &var_90) != 0)
004c6ba7              {
004c6bb6                  class AC1Legacy::PStringBase<char>* eax_11 = CSpellBase::InqName(&var_90, &__return_1);
004c6bc8                  class PStringBase<unsigned short>* eax_12 = ACCWeenieObject::GetObjectNameWide(eax_7, &__return_2, NAME_APPROPRIATE, 0);
004c6bd4                  char (* var_bc_8)[0x1] = &eax_11->m_buffer->m_data;
004c6bd5                  class PSRefBufferCharData<unsigned short>* m_charbuffer = eax_12->m_charbuffer;
004c6bef                  PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_4, PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"%s (%hs)"));
004c6bfe                  void* __offset(ClientMagicSystem, -0x14) edi_11 = ((char*)var_98 - 0x14);
004c6bfe                  
004c6c0d                  if ((InterlockedDecrement(((char*)edi_11 + 4)) == 0 && edi_11 != 0))
004c6c15                      *(uint32_t*)*(int32_t*)((char*)ADJ(edi_11) + -0x14)(1);
004c6c15                  
004c6c1b                  int32_t* edi_13 = (__return_2 - 0x14);
004c6c1b                  
004c6c2a                  if ((InterlockedDecrement(&edi_13[1]) == 0 && edi_13 != 0))
004c6c32                      **(uint32_t**)edi_13(1);
004c6c32                  
004c6c34                  int32_t* __return_5 = __return_1;
004c6c34                  
004c6c44                  if ((InterlockedDecrement(&__return_5[1]) == 0 && __return_5 != 0))
004c6c4c                      **(uint32_t**)__return_5(1);
004c6ba7              }
004c6ba7              
004c6c59              ItemUses::ItemUses(&__return, eax_7->pwd._useability);
004c6c59              
004c6c69              if (ItemUses::IsUseable_SelfTarget(&__return) == 0)
004c6c69              {
004c6c97                  uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004c6c97                  
004c6c9e                  if (ACCWeenieObject::selectedID_1 != 0)
004c6c9e                  {
004c6cd2                      if (ItemHolder::TargetCompatibleWithObject(ACCWeenieObject::selectedID_1, this_1->m_endowmentItemID, 1, 0) == 0)
004c6cd2                      {
004c6d46                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer_4;
004c6d51                          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, u"You must select an appropriate\n…");
004c6cd2                      }
004c6cd2                      else
004c6cd2                      {
004c6cd4                          this_1->m_spellcastButton->vtable->SetState(1);
004c6ce8                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_4;
004c6cf3                          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, u"USE the %s");
004c6cff                          class ACCWeenieObject* eax_24 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
004c6cff                          
004c6d09                          if (eax_24 != 0)
004c6d09                          {
004c6d1a                              class PStringBase<unsigned short>* eax_25 = ACCWeenieObject::GetObjectNameWide(eax_24, &__return_1, NAME_APPROPRIATE, 0);
004c6d1f                              uint16_t* m_charbuffer_1 = eax_25->m_charbuffer;
004c6d21                              uint16_t* m_charbuffer_3 = m_charbuffer_1;
004c6d26                              wchar16 const* const var_c0_2 = u" on %s";
004c6d2b                              class PSRefBufferCharData<unsigned short>** var_c4_7 = &PStringBase<unsigned short>::s_NullBuffer_3;
004c6d2c                              PStringBase<unsigned short>::sprintf_append(eax_25, m_charbuffer_1);
004c6d38                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
004c6d09                          }
004c6cd2                      }
004c6c9e                  }
004c6c9e                  else
004c6c9e                  {
004c6ca4                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_4;
004c6caf                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, u"You must select a target for the…");
004c6c9e                  }
004c6c69              }
004c6c69              else
004c6c69              {
004c6c6b                  this_1->m_spellcastButton->vtable->SetState(1);
004c6c7f                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_4;
004c6c8a                  PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, u"USE the %s");
004c6c69              }
004c6c69              
004c6f8b          label_4c6f8b:
004c6f8b              CSpellBase::~CSpellBase(&var_90);
004c6f98          label_4c6f98:
004c6f98              
004c6f98              if (PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe] != 1)
004c6f98              {
004c6fbf                  UIElement_Text::SetText(this_1->m_spellName, &PStringBase<unsigned short>::s_NullBuffer_4);
004c6fc8                  StringInfo::StringInfo(&var_90);
004c6fd8                  StringInfo::SetLiteralValue(&var_90, &PStringBase<unsigned short>::s_NullBuffer_3, 1);
004c6fe8                  UIElement::SetTooltip(this_1->m_spellcastButton, &var_90);
004c6fed                  class UIElement_Button* m_spellcastButton_2 = this_1->m_spellcastButton;
004c7000                  m_spellcastButton_2->__bitfield164 |= 0x20;
004c7006                  StringInfo::~StringInfo(&var_90);
004c6f98              }
004c6f98              else
004c6f98              {
004c6f9a                  class UIElement_Button* m_spellcastButton_1 = this_1->m_spellcastButton;
004c6fa0                  m_spellcastButton_1->__bitfield164 &= 0xffffffdf;
004c6fad                  UIElement::ClearTooltip(this_1->m_spellcastButton);
004c6f98              }
004c6f98              
004c7015              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_5 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004c7015              
004c7024              if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
004c702c                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
004c702c              
004c7032              esi_3 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
004c7038              var_bc_5 = ((char*)esi_3 + 4);
004c6b52          }
004c6b52          else
004c6b52          {
004c6b5e              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004c6b5e              
004c6b6d              if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004c6b75                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004c6b75              
004c6b7b              esi_3 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
004c6b81              var_bc_5 = ((char*)esi_3 + 4);
004c6b52          }
004c6b52          
004c7041          if ((InterlockedDecrement(var_bc_5) == 0 && esi_3 != 0))
004c7049              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004c6a44      }
004c6a30  }

004c7056                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c7060  void __thiscall SpellCastSubMenu::AddFavorite(class SpellCastSubMenu* this, uint32_t arg2, int32_t arg3, uint8_t arg4)

004c7060  {
004c7067      class ClientMagicSystem* ebp;
004c7067      class ClientMagicSystem* var_13c = ebp;
004c7075      struct Turbine_GUID* var_14c = &CPlayerModule_ClassType;
004c707d      int32_t* var_134 = nullptr;
004c7088      void __return;
004c7088      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_14c, &var_134);
004c708d      struct Turbine_GUID* ecx_1 = var_134;
004c7096      var_14c = ecx_1;
004c7098      int32_t var_148_1 = 0;
004c709b      struct Turbine_GUID* eax_1 = var_14c;
004c70a1      int32_t var_12c = 0;
004c70a5      int32_t var_128 = 0;
004c70a5      
004c70a9      if (eax_1 != 0)
004c70af          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004c70af      
004c70bb      struct Turbine_GUID** esp = &var_14c;
004c70c4      void var_124;
004c70c4      var_13c = *(uint32_t*)InterfacePtr<class CPlayerModule>::_QueryInterface(&var_12c, &var_124);
004c70c4      
004c70c8      if (ecx_1 != 0)
004c70ce          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004c70ce      
004c70d1      int32_t* ebp_1 = var_134;
004c70d1      
004c70d7      if (ebp_1 != 0)
004c70d7      {
004c70e1          if (var_13c < 0)
004c70e1          {
004c711c              *(uint32_t*)(*(uint32_t*)ebp_1 + 0x14)();
004c7129              return;
004c70e1          }
004c70e1          
004c70ea          class PackableList<unsigned long>* eax_3 = PlayerModule::GetFavoriteSpellsList(&ebp_1[1], this->m_tabIndex);
004c70ef          class PlayerModule* ecx_7;
004c70ef          ecx_7 = arg2;
004c70ff          uint32_t var_4;
004c70ff          
004c70ff          if (ecx_7 == 0)
004c70ff          {
004c7106              for (class PackableLLNode<unsigned long>* i = eax_3->head; i != 0; i = i->next)
004c7106              {
004c710a                  if (i->data == var_4)
004c710a                  {
004c7131                      *(uint32_t*)(*(uint32_t*)ebp_1 + 0x14)();
004c713e                      return;
004c710a                  }
004c7106              }
004c70ff          }
004c70ff          
004c7115          if (var_4 == 0)
004c7115          {
004c711c              *(uint32_t*)(*(uint32_t*)ebp_1 + 0x14)();
004c7129              return;
004c7115          }
004c7115          
004c7144          int32_t eax_5 = SpellCastSubMenu::RemoveSpellFromMenu(this, var_4);
004c714c          uint32_t m_numSpells = __return_addr;
004c714c          
004c7157          if ((eax_5 != 0xffffffff && eax_5 < m_numSpells))
004c7159              m_numSpells -= 1;
004c7159          
004c715f          class UIElement_UIItem* eax_6 = UIElement_ItemList::ItemList_InsertSpellShortcut(this->m_spellItemList, var_4, m_numSpells);
004c716a          this->m_numSpells += 1;
004c716d          class ClientMagicSystem* eax_7 = ClientMagicSystem::GetMagicSystem();
004c7174          var_13c = eax_7;
004c7174          
004c7178          if (eax_7 == 0)
004c7178          {
004c7180              *(uint32_t*)(*(uint32_t*)var_134 + 0x14)();
004c718d              return;
004c7178          }
004c7178          
004c7197          void var_98;
004c7197          CSpellBase::CSpellBase(&var_98);
004c71a9          uint8_t eax_8;
004c71a9          uint32_t edx_7;
004c71a9          eax_8 = ClientMagicSystem::InqSpellBase(var_13c, var_4, &var_98);
004c71a9          
004c71b0          if (eax_8 != 0)
004c71b0          {
004c71c8              int32_t __saved_ebx;
004c71c8              char (* var_150_7)[0x1] = &CSpellBase::InqName(&var_98, &__saved_ebx)->m_buffer->m_data;
004c71d5              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_13c, Formatted, &gmSpellcastingUI::`vftable'.RecvNotice_SetDisplayContractTracker);
004c71e1              AC1Legacy::PStringBase<char>::~PStringBase<char>(&__saved_ebx);
004c71ea              StringInfo::StringInfo(&var_128);
004c71fa              StringInfo::SetLiteralValue(&var_128, &var_13c, 1);
004c7206              UIElement::SetTooltip(eax_6, &var_128);
004c7218              eax_6->__bitfield164 |= 0x20;
004c721e              StringInfo::~StringInfo(&var_128);
004c7227              edx_7 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_13c);
004c71b0          }
004c71b0          
004c722f          if (m_numSpells == 0xffffffff)
004c7231              m_numSpells = this->m_numSpells;
004c7231          
004c7234          uint32_t m_numSpells_1 = m_numSpells;
004c7238          SpellCastSubMenu::AddSpellToPlayerModule(this, edx_7, var_4);
004c7240          SpellCastSubMenu::SetSelected(this, var_4);
004c7247          SpellCastSubMenu::UpdateShortcutOverlays(this);
004c7253          CSpellBase::~CSpellBase(&var_98);
004c725e          *(uint32_t*)(*(uint32_t*)var_134 + 0x14)();
004c725e          struct Turbine_GUID* __saved_edi;
004c725e          esp = &__saved_edi;
004c70d7      }
004c70d7      
004c7261      *(uint32_t*)esp;
004c7261      esp[1];
004c7261      esp[2];
004c7261      esp[3];
004c7060  }

004c726e                                            90 90                                                                ..

004c7270  void __fastcall gmSpellcastingUI::RecvNotice_SelectionChanged(class gmSpellcastingUI* this)

004c7270  {
004c7276      /* tailcall */
004c7276      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7270  }

004c727b                                                                                   90 90 90 90 90                             .....

004c7280  void __thiscall gmSpellcastingUI::RecvNotice_SetCombatMode(class gmSpellcastingUI* this, enum COMBAT_MODE arg2)

004c7280  {
004c7285      if (arg2 != MAGIC_COMBAT_MODE)
004c7285      {
004c72b9          arg2 = UNDEF_COMBAT_MODE;
004c72c1          /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18) */
004c7285      }
004c7285      
004c7298      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004c729d      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c72a4      gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7280  }

004c72c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004c72d0  void __thiscall gmSpellcastingUI::RecvNotice_ServerSaysMoveItem(class gmSpellcastingUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004c72d0  {
004c72d0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004c72d7      uint32_t player_id_1;
004c72d7      
004c72d7      if (SmartBox::smartbox_1 == 0)
004c72e1          player_id_1 = 0;
004c72d7      else
004c72d9          player_id_1 = SmartBox::smartbox_1->player_id;
004c72d9      
004c72e8      uint32_t player_id;
004c72e8      
004c72e8      if (arg4 != player_id_1)
004c72e8      {
004c72ec          if (SmartBox::smartbox_1 == 0)
004c72f6              player_id = 0;
004c72ec          else
004c72ee              player_id = SmartBox::smartbox_1->player_id;
004c72e8      }
004c72e8      
004c72fc      if ((arg4 == player_id_1 || arg8 == player_id))
004c72fc      {
004c7306          gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c730d          gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c72fc      }
004c72d0  }

004c7316                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c7320  void __thiscall gmSpellcastingUI::AddSpellShortcut(class gmSpellcastingUI* this, uint32_t arg2, int32_t arg3, uint8_t arg4)

004c7320  {
004c7343      SpellCastSubMenu::AddFavorite(&this->m_subMenus[gmSpellcastingUI::GetOpenSubMenuIndex(this)], arg2, arg3, arg4);
004c734a      gmSpellcastingUI::UpdateEndowmentIcon(this);
004c7351      gmSpellcastingUI::UpdateCastButtonTooltip(this);
004c7320  }

004c735a                                                                                90 90 90 90 90 90                            ......

004c7360  void __thiscall gmSpellcastingUI::RecvNotice_ItemListBeginDrag(class gmSpellcastingUI* this, class UIElement const* arg2, int32_t arg3)

004c7360  {
004c7368      int32_t esi = 0;
004c736a      class HashSetData<UIElement *>** eax = &this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xa];
004c7370      class HashSetData<UIElement *>* ecx_1;
004c7370      
004c7370      while (true)
004c7370      {
004c7370          ecx_1 = ADJ(eax)->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xa];
004c7370          
004c7374          if (ecx_1 == arg2)
004c7374              break;
004c7374          
004c7376          esi += 1;
004c7377          eax = &eax[7];
004c7377          
004c737d          if (esi >= 8)
004c7381              return;
004c7370      }
004c7370      
004c7389      class UIElement* eax_2 = UIElement_ListBox::GetItem(ecx_1, arg3);
004c7389      
004c7390      if (eax_2 != 0)
004c7390      {
004c739b          void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c739b          
004c73a3          if (eax_3 != 0)
004c73a3          {
004c73a5              uint32_t eax_4 = *(uint32_t*)((char*)eax_3 + 0x600);
004c73a5              
004c73ad              if (eax_4 != 0)
004c73ad              {
004c73b7                  SpellCastSubMenu::RemoveSpellFromMenu(&*(uint92_t*)((char*)*(uint112_t*)((char*)this->m_hashElementsRegisteredWith)[4])[4][(9 + (esi * 7))], eax_4);
004c73c4                  gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c73cb                  gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c73ad              }
004c73a3          }
004c7390      }
004c7360  }

004c73d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c73e0  void __fastcall gmSpellcastingUI::RecvNotice_NextSpellTab(class gmSpellcastingUI* this)

004c73e0  {
004c73e0      struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004c73e0      
004c73e5      if (vtable == 0)
004c7413          return;
004c7413      
004c73ff      UIElement_Panel::OpenTab(vtable, gmSpellcastingUI::GetNextTabID(((char*)this - 0x5f8), *(int32_t*)((char*)vtable + 0x6dc)));
004c7406      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c740e      /* tailcall */
004c740e      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c73e0  }

004c7414                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c7420  void __fastcall gmSpellcastingUI::RecvNotice_PrevSpellTab(class gmSpellcastingUI* this)

004c7420  {
004c7420      struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004c7420      
004c7425      if (vtable == 0)
004c7453          return;
004c7453      
004c743f      UIElement_Panel::OpenTab(vtable, gmSpellcastingUI::GetPrevTabID(((char*)this - 0x5f8), *(int32_t*)((char*)vtable + 0x6dc)));
004c7446      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c744e      /* tailcall */
004c744e      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7420  }

004c7454                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c7460  void __fastcall gmSpellcastingUI::RecvNotice_NextSpellSelection(class gmSpellcastingUI* this)

004c7460  {
004c747d      class UIElement_ItemList* ebx = *(uint32_t*)(((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x62c);
004c7486      int32_t eax_2 = UIElement_ItemList::GetNumUIItems(ebx);
004c7486      
004c748f      if (eax_2 == 0)
004c748f      {
004c7491          eax_2 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004c7491          
004c7496          if (eax_2 == 0)
004c75cc              return;
004c75cc          
004c7496          goto label_4c74a6;
004c748f      }
004c748f      
004c74c2      void* __offset(gmSpellcastingUI, -0x5f8) ecx_4;
004c74c2      ecx_4 = *(uint8_t*)(((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x640);
004c74c2      
004c74cb      if (ecx_4 == 0)
004c74cb      {
004c74ec          uint32_t var_8_1 = 0;
004c74ec          
004c74f4          if (ebx == 0)
004c74f4              goto label_4c7568;
004c74f4          
004c74f6          uint32_t edi_1 = 0;
004c74f6          
004c74fa          if (eax_2 <= 0)
004c74fa              goto label_4c7568;
004c74fa          
004c7503          int32_t eax_12;
004c7503          
004c7503          while (true)
004c7503          {
004c7503              class UIElement* eax_9 = UIElement_ListBox::GetItem(ebx, edi_1);
004c7503              
004c750a              if (eax_9 != 0)
004c750a              {
004c7515                  void* eax_10 = eax_9->vtable->DynamicCast(0x10000032);
004c7515                  
004c751f                  if (eax_10 != 0)
004c751f                  {
004c7528                      eax_12 = (gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c);
004c7528                      
004c7538                      if (*(uint32_t*)((char*)eax_10 + 0x600) == *(uint32_t*)((eax_12 + ((char*)this - 0x5f8)) + 0x634))
004c7538                          break;
004c751f                  }
004c750a              }
004c750a              
004c753a              edi_1 += 1;
004c753a              
004c753d              if (edi_1 >= eax_2)
004c753d                  goto label_4c7568;
004c7503          }
004c7503          
004c7544          var_8_1 = (edi_1 + 1);
004c7544          
004c7548          if ((edi_1 + 1) != eax_2)
004c7548              goto label_4c7568;
004c7548          
004c754e          eax_12 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004c754e          
004c7553          if (eax_12 != 0)
004c7553          {
004c74a6          label_4c74a6:
004c74a6              void* ecx_3 = (((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628);
004c74ad              *(uint8_t*)((char*)ecx_3 + 0x18) = 1;
004c75ab              SpellCastSubMenu::SetSelected(ecx_3, 0);
004c7553          }
004c7553          else
004c7553          {
004c7559              var_8_1 = 0;
004c7568          label_4c7568:
004c7568              int32_t eax_14 = (gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c);
004c756b              class UIElement_ListBox* ecx_12 = *(uint32_t*)((eax_14 + ((char*)this - 0x5f8)) + 0x62c);
004c756b              
004c757b              if (ecx_12 != 0)
004c757b              {
004c7582                  class UIElement* eax_16 = UIElement_ListBox::GetItem(ecx_12, var_8_1);
004c7582                  
004c7589                  if (eax_16 != 0)
004c7589                  {
004c7594                      void* eax_17 = eax_16->vtable->DynamicCast(0x10000032);
004c7594                      
004c759c                      if (eax_17 != 0)
004c759c                      {
004c759e                          uint32_t eax_18 = *(uint32_t*)((char*)eax_17 + 0x600);
004c759e                          
004c75a6                          if (eax_18 != 0)
004c75ab                              SpellCastSubMenu::SetSelected(((eax_14 + ((char*)this - 0x5f8)) + 0x628), eax_18);
004c759c                      }
004c7589                  }
004c757b              }
004c7553          }
004c74cb      }
004c74cb      else
004c74e0          SpellCastSubMenu::SelectSpellFromIndex((((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628), 0);
004c74e0      
004c75b2      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c75c0      /* tailcall */
004c75c0      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7460  }

004c75cd                                         90 90 90                                                               ...

004c75d0  void __fastcall gmSpellcastingUI::RecvNotice_PrevSpellSelection(class gmSpellcastingUI* this)

004c75d0  {
004c75ed      class UIElement_ItemList* ebx = *(uint32_t*)(((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x62c);
004c75f6      int32_t eax_2 = UIElement_ItemList::GetNumUIItems(ebx);
004c75f6      
004c75ff      if (eax_2 == 0)
004c75ff      {
004c7601          eax_2 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004c7601          
004c7606          if (eax_2 == 0)
004c7739              return;
004c7739          
004c7606          goto label_4c7616;
004c75ff      }
004c75ff      
004c7632      void* __offset(gmSpellcastingUI, -0x5f8) ecx_4;
004c7632      ecx_4 = *(uint8_t*)(((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x640);
004c7632      
004c763b      if (ecx_4 == 0)
004c763b      {
004c765c          uint32_t var_8_1 = 0;
004c765c          
004c7664          if (ebx == 0)
004c7664              goto label_4c76d5;
004c7664          
004c7666          uint32_t edi_1 = 0;
004c7666          
004c766a          if (eax_2 <= 0)
004c766a              goto label_4c76d5;
004c766a          
004c7673          int32_t eax_12;
004c7673          
004c7673          while (true)
004c7673          {
004c7673              class UIElement* eax_9 = UIElement_ListBox::GetItem(ebx, edi_1);
004c7673              
004c767a              if (eax_9 != 0)
004c767a              {
004c7685                  void* eax_10 = eax_9->vtable->DynamicCast(0x10000032);
004c7685                  
004c768f                  if (eax_10 != 0)
004c768f                  {
004c7698                      eax_12 = (gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c);
004c7698                      
004c76a8                      if (*(uint32_t*)((char*)eax_10 + 0x600) == *(uint32_t*)((eax_12 + ((char*)this - 0x5f8)) + 0x634))
004c76a8                          break;
004c768f                  }
004c767a              }
004c767a              
004c76aa              edi_1 += 1;
004c76aa              
004c76ad              if (edi_1 >= eax_2)
004c76ad                  goto label_4c76d5;
004c7673          }
004c7673          
004c76b4          var_8_1 = (edi_1 - 1);
004c76b4          
004c76b8          if ((edi_1 - 1) >= 0)
004c76b8              goto label_4c76d5;
004c76b8          
004c76be          eax_12 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004c76be          
004c76c3          if (eax_12 != 0)
004c76c3          {
004c7616          label_4c7616:
004c7616              void* ecx_3 = (((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628);
004c761d              *(uint8_t*)((char*)ecx_3 + 0x18) = 1;
004c7718              SpellCastSubMenu::SetSelected(ecx_3, 0);
004c76c3          }
004c76c3          else
004c76c3          {
004c76ca              var_8_1 = (eax_2 - 1);
004c76d5          label_4c76d5:
004c76d5              int32_t eax_14 = (gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c);
004c76d8              class UIElement_ListBox* ecx_12 = *(uint32_t*)((eax_14 + ((char*)this - 0x5f8)) + 0x62c);
004c76d8              
004c76e8              if (ecx_12 != 0)
004c76e8              {
004c76ef                  class UIElement* eax_16 = UIElement_ListBox::GetItem(ecx_12, var_8_1);
004c76ef                  
004c76f6                  if (eax_16 != 0)
004c76f6                  {
004c7701                      void* eax_17 = eax_16->vtable->DynamicCast(0x10000032);
004c7701                      
004c7709                      if (eax_17 != 0)
004c7709                      {
004c770b                          uint32_t eax_18 = *(uint32_t*)((char*)eax_17 + 0x600);
004c770b                          
004c7713                          if (eax_18 != 0)
004c7718                              SpellCastSubMenu::SetSelected(((eax_14 + ((char*)this - 0x5f8)) + 0x628), eax_18);
004c7709                      }
004c76f6                  }
004c76e8              }
004c76c3          }
004c763b      }
004c763b      else
004c7650          SpellCastSubMenu::SelectSpellFromIndex((((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628), (eax_2 - 1));
004c7650      
004c771f      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c772d      /* tailcall */
004c772d      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c75d0  }

004c773a                                                                                90 90 90 90 90 90                            ......

004c7740  void __fastcall gmSpellcastingUI::RecvNotice_FirstSpellTab(class gmSpellcastingUI* this)

004c7740  {
004c7743      struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004c7743      
004c7748      if (vtable == 0)
004c776a          return;
004c776a      
004c774f      UIElement_Panel::OpenTab(vtable, 0x100000a3);
004c775c      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c7764      /* tailcall */
004c7764      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7740  }

004c776b                                   90 90 90 90 90                                                             .....

004c7770  void __fastcall gmSpellcastingUI::RecvNotice_LastSpellTab(class gmSpellcastingUI* this)

004c7770  {
004c7773      struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004c7773      
004c7778      if (vtable == 0)
004c779a          return;
004c779a      
004c777f      UIElement_Panel::OpenTab(vtable, 0x100005c2);
004c778c      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c7794      /* tailcall */
004c7794      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7770  }

004c779b                                                                                   90 90 90 90 90                             .....

004c77a0  void __fastcall gmSpellcastingUI::RecvNotice_FirstSpellSelection(class gmSpellcastingUI* this)

004c77a0  {
004c77ae      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] != 0)
004c77ae      {
004c77b8          void* ecx_1 = (((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628);
004c77c1          *(uint8_t*)((char*)ecx_1 + 0x18) = 1;
004c77c5          SpellCastSubMenu::SetSelected(ecx_1, 0);
004c77cc          gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c77d4          /* tailcall */
004c77d4          return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c77ae      }
004c77ae      
004c77ef      if (UIElement_ItemList::GetNumUIItems(*(uint32_t*)(((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x62c)) <= 0)
004c7819          return;
004c7819      
004c7804      SpellCastSubMenu::SelectSpellFromIndex((((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628), 0);
004c780b      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c7813      /* tailcall */
004c7813      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c77a0  }

004c781a                                                                                90 90 90 90 90 90                            ......

004c7820  void __fastcall gmSpellcastingUI::RecvNotice_LastSpellSelection(class gmSpellcastingUI* this)

004c7820  {
004c783b      int32_t eax_2 = UIElement_ItemList::GetNumUIItems(*(uint32_t*)(((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x62c));
004c783b      
004c7842      if (eax_2 > 0)
004c7842      {
004c7857          SpellCastSubMenu::SelectSpellFromIndex((((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628), (eax_2 - 1));
004c785e          gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c7867          /* tailcall */
004c7867          return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7842      }
004c7842      
004c786c      eax_2 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004c786c      
004c7871      if (eax_2 == 0)
004c78a1          return;
004c78a1      
004c787d      void* ecx_8 = (((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628);
004c7886      *(uint8_t*)((char*)ecx_8 + 0x18) = 1;
004c788a      SpellCastSubMenu::SetSelected(ecx_8, 0);
004c7891      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c789a      /* tailcall */
004c789a      return gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7820  }

004c78a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c78b0  void __thiscall gmSpellcastingUI::RecvNotice_CastQuickslotSpell(class gmSpellcastingUI* this, int32_t arg2)

004c78b0  {
004c78bf      int32_t eax_1 = (gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c);
004c78c2      class UIElement_ListBox* ecx_1 = *(uint32_t*)((eax_1 + ((char*)this - 0x5f8)) + 0x62c);
004c78c2      
004c78d2      if (ecx_1 != 0)
004c78d2      {
004c78d9          class UIElement* eax_3 = UIElement_ListBox::GetItem(ecx_1, arg2);
004c78d9          
004c78e0          if (eax_3 != 0)
004c78e0          {
004c78eb              void* eax_4 = eax_3->vtable->DynamicCast(0x10000032);
004c78eb              
004c78f3              if (eax_4 != 0)
004c78f3              {
004c78f5                  uint32_t eax_5 = *(uint32_t*)((char*)eax_4 + 0x600);
004c78f5                  
004c78fd                  if (eax_5 != 0)
004c78fd                  {
004c7902                      SpellCastSubMenu::SetSelected(((eax_1 + ((char*)this - 0x5f8)) + 0x628), eax_5);
004c7909                      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c7910                      gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7917                      gmSpellcastingUI::Cast(((char*)this - 0x5f8));
004c78fd                  }
004c78f3              }
004c78e0          }
004c78d2      }
004c78b0  }

004c7921     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004c7930  void __thiscall gmSpellcastingUI::HandleDropRelease(class gmSpellcastingUI* this, struct UIElementMessageInfo const* arg2)

004c7930  {
004c7934      uint32_t dwParam1 = arg2->dwParam1;
004c793d      class UIElement* ecx = *(uint32_t*)(dwParam1 + 8);
004c7943      class UIElement* i = *(uint32_t*)(dwParam1 + 0x10);
004c7943      
004c794e      if ((ecx != 0 && i != 0))
004c794e      {
004c7964          char var_8;
004c7964          void var_4;
004c7964          UIElement_ItemList::InqDropIconInfo(ecx, &var_4, &arg2, &var_8);
004c7964          
004c7987          if (UIElement::IsAncestorOfMe(i, &*(uint32_t*)((char*)this->m_subMenus[0])[4][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 7)]) == 0)
004c7987          {
004c7a02              if (i == this->m_spellcastBackground)
004c7a02              {
004c7a0f                  gmSpellcastingUI::AddSpellShortcut(this, arg2, 0xffffffff, 1);
004c7a19                  return;
004c7a02              }
004c7a02              
004c7a1c              int32_t eax_13 = 0;
004c7a1e              class UIElement** ecx_11 = &this->m_subMenus[0].m_spellTabElement;
004c7a1e              
004c7a26              while (i != ADJ(ecx_11)->m_subMenus[0].m_spellTabElement)
004c7a26              {
004c7a28                  eax_13 += 1;
004c7a29                  ecx_11 = &ecx_11[7];
004c7a29                  
004c7a2f                  if (eax_13 >= 8)
004c7a36                      return;
004c7a26              }
004c7a26              
004c7a39              struct UIElementMessageInfo* ecx_12 = arg2;
004c7a39              
004c7a3f              if (ecx_12 != 0)
004c7a3f              {
004c7a50                  SpellCastSubMenu::AddFavorite(&this->m_subMenus[eax_13], ecx_12, 0xffffffff, 1);
004c7a57                  gmSpellcastingUI::UpdateEndowmentIcon(this);
004c7a5e                  gmSpellcastingUI::UpdateCastButtonTooltip(this);
004c7a3f              }
004c7987          }
004c7987          else if (arg2 != 0)
004c798f          {
004c7995              struct UIElementMessageInfo* eax_4;
004c7995              eax_4 = var_8;
004c79aa              class UIElement* eax_7 = UIElement_ListBox::GetItemUnderMouse(&*(uint32_t*)((char*)this->m_subMenus[0])[4][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 7)]);
004c79aa              
004c79b1              if (eax_7 != 0)
004c79b1              {
004c79c0                  class UIElement* eax_8 = eax_7->vtable->DynamicCast(0x10000032);
004c79c0                  
004c79c8                  if (eax_8 != 0)
004c79c8                  {
004c79e2                      int32_t eax_11 = UIElement_ListBox::WhatNum(&*(uint32_t*)((char*)this->m_subMenus[0])[4][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 7)], eax_8);
004c79ef                      gmSpellcastingUI::AddSpellShortcut(this, arg2, eax_11, 1);
004c79c8                  }
004c79b1              }
004c798f          }
004c794e      }
004c7930  }

004c7a6b                                   90 90 90 90 90                                                             .....

004c7a70  void __thiscall gmSpellcastingUI::RecvNotice_AddSpellShortcut(class gmSpellcastingUI* this, uint32_t arg2)

004c7a70  {
004c7a91      SpellCastSubMenu::AddFavorite((((gmSpellcastingUI::GetOpenSubMenuIndex(((char*)this - 0x5f8)) * 0x1c) + ((char*)this - 0x5f8)) + 0x628), arg2, 0xffffffff, 0);
004c7a98      gmSpellcastingUI::UpdateEndowmentIcon(((char*)this - 0x5f8));
004c7a9f      gmSpellcastingUI::UpdateCastButtonTooltip(((char*)this - 0x5f8));
004c7a70  }

004c7aa8                          90 90 90 90 90 90 90 90                                                          ........

004c7ab0  void __thiscall gmSpellcastingUI::ListenToElementMessage(class gmSpellcastingUI* this, struct UIElementMessageInfo const* arg2)

004c7ab0  {
004c7ab6      uint32_t idMessage = arg2->idMessage;
004c7ab6      
004c7abe      if (idMessage == 0x1c)
004c7abe      {
004c7ad5          if (&*(uint32_t*)((char*)this->m_subMenus[0])[4][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 7)] != 0)
004c7ad5          {
004c7ae5              class UIElement* eax_4 = &*(uint32_t*)((char*)this->m_subMenus[0])[4][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 7)];
004c7ae5              
004c7af7              if (UIElement::IsAncestorOfMe(arg2->pElement, eax_4) != 0)
004c7af7              {
004c7b0a                  class UIElement* eax_8 = UIElement_ListBox::GetItemUnderMouse(&*(uint32_t*)((char*)this->m_subMenus[0])[4][(gmSpellcastingUI::GetOpenSubMenuIndex(this) * 7)]);
004c7b0a                  
004c7b11                  if (eax_8 != 0)
004c7b11                  {
004c7b1c                      void* eax_9 = eax_8->vtable->DynamicCast(0x10000032);
004c7b1c                      
004c7b24                      if (eax_9 != 0)
004c7b24                      {
004c7b26                          uint32_t dwParam1_1 = arg2->dwParam1;
004c7b26                          
004c7b2c                          if (dwParam1_1 == 7)
004c7b2c                          {
004c7b2e                              uint32_t eax_10 = *(uint32_t*)((char*)eax_9 + 0x600);
004c7b2e                              
004c7b36                              if (eax_10 != 0)
004c7b36                              {
004c7b4a                                  SpellCastSubMenu::SetSelected(&this->m_subMenus[gmSpellcastingUI::GetOpenSubMenuIndex(this)], eax_10);
004c7b51                                  gmSpellcastingUI::UpdateEndowmentIcon(this);
004c7b58                                  gmSpellcastingUI::UpdateCastButtonTooltip(this);
004c7b36                              }
004c7b2c                          }
004c7b2c                          else if ((dwParam1_1 == 0xa && *(uint32_t*)((char*)eax_9 + 0x600) != 0))
004c7b70                              gmSpellcastingUI::Cast(this);
004c7b24                      }
004c7b11                  }
004c7af7              }
004c7ad5          }
004c7ad5          
004c7b7b          if (arg2->idElement == 0x100000b1)
004c7b7b          {
004c7b81              uint32_t dwParam1 = arg2->dwParam1;
004c7b81              
004c7b87              if (dwParam1 == 7)
004c7b87              {
004c7b93                  void* ecx_13 = &this->m_subMenus[gmSpellcastingUI::GetOpenSubMenuIndex(this)];
004c7b9c                  *(uint8_t*)((char*)ecx_13 + 0x18) = 1;
004c7ba0                  SpellCastSubMenu::SetSelected(ecx_13, 0);
004c7ba7                  gmSpellcastingUI::UpdateEndowmentIcon(this);
004c7bae                  gmSpellcastingUI::UpdateCastButtonTooltip(this);
004c7bb6                  UIElement::ListenToElementMessage(this, arg2);
004c7bbd                  return;
004c7b87              }
004c7b87              
004c7bc3              if (dwParam1 == 0xa)
004c7bc3                  goto label_4c7c01;
004c7bc3              
004c7bc8              if (dwParam1 == 8)
004c7bc8              {
004c7bce                  uint32_t m_endowmentItemID = this->m_endowmentItemID;
004c7bce                  
004c7bd6                  if (m_endowmentItemID != 0)
004c7bd6                  {
004c7be0                      ClientUISystem::ExamineObject(ClientUISystem::GetUISystem(), m_endowmentItemID);
004c7be8                      UIElement::ListenToElementMessage(this, arg2);
004c7bef                      return;
004c7bd6                  }
004c7bc8              }
004c7b7b          }
004c7abe      }
004c7abe      else if (idMessage != 1)
004c7bf5      {
004c7c16          if (idMessage == 0x15)
004c7c16          {
004c7c1b              gmSpellcastingUI::HandleDropRelease(this, arg2);
004c7c23              UIElement::ListenToElementMessage(this, arg2);
004c7c2a              return;
004c7c16          }
004c7c16          
004c7c30          if (idMessage == 0x2c)
004c7c30          {
004c7c34              gmSpellcastingUI::UpdateEndowmentIcon(this);
004c7c3b              gmSpellcastingUI::UpdateCastButtonTooltip(this);
004c7c51              SpellCastSubMenu::UpdateShortcutOverlays(&this->m_subMenus[gmSpellcastingUI::GetOpenSubMenuIndex(this)]);
004c7c30          }
004c7bf5      }
004c7bf5      else if (arg2->idElement == 0x100000b2)
004c7bfd      {
004c7c01      label_4c7c01:
004c7c01          gmSpellcastingUI::Cast(this);
004c7c09          UIElement::ListenToElementMessage(this, arg2);
004c7c10          return;
004c7bfd      }
004c7bfd      
004c7c59      UIElement::ListenToElementMessage(this, arg2);
004c7ab0  }

004c7c63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004c7c70  void __thiscall gmSlumlordUI::OnVisibilityChanged(class gmSlumlordUI* this, uint8_t arg2)

004c7c70  {
004c7c79      UIElement::OnVisibilityChanged(this, arg2);
004c7c79      
004c7c8d      if (((((int8_t)(this->__inner23 >> 0x11)) & 1) != 0 && arg2 == 0))
004c7c9d          CPlayerSystem::UnregisterAllObjectRangeHandlers(CPlayerSystem::GetPlayerSystem(), &this->vtable);
004c7c70  }

004c7ca7                       90 90 90 90 90 90 90 90 90                                                         .........

004c7cb0  void __thiscall gmSlumlordUI::OnObjectRangeExit(class gmSlumlordUI* this, uint32_t arg2)

004c7cb0  {
004c7cb7      if (arg2 != this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable)
004c7cd0          return;
004c7cd0      
004c7cc5      arg2 = 0;
004c7ccd      /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x6e4) + 0x18) */
004c7cb0  }

004c7cd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c7ce0  uint8_t __fastcall gmSlumlordUI::BackupHouseProfile(class gmSlumlordUI* this)

004c7ce0  {
004c7ce3      class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c7ce3      
004c7ceb      if (m_pHouseProfile != 0)
004c7ceb      {
004c7ced          class HouseProfile* m_pBackupHouseProfile = this->m_pBackupHouseProfile;
004c7ced          
004c7cf5          if (m_pBackupHouseProfile != 0)
004c7cf5          {
004c7d26              HouseProfile::operator=(m_pBackupHouseProfile, m_pHouseProfile);
004c7d2b              m_pHouseProfile = 1;
004c7d2e              return 1;
004c7cf5          }
004c7cf5          
004c7cf9          void* eax = operator new(0x4c);
004c7cf9          
004c7d03          if (eax == 0)
004c7d15              m_pHouseProfile = nullptr;
004c7d03          else
004c7d0e              m_pHouseProfile = HouseProfile::HouseProfile(eax, this->m_pHouseProfile);
004c7d0e          
004c7d19          this->m_pBackupHouseProfile = m_pHouseProfile;
004c7d19          
004c7d1f          if (m_pHouseProfile != 0)
004c7d1f          {
004c7d2b              m_pHouseProfile = 1;
004c7d2e              return 1;
004c7d1f          }
004c7ceb      }
004c7ceb      
004c7d21      m_pHouseProfile = 0;
004c7d24      return 0;
004c7ce0  }

004c7d2f                                               90                                                                 .

004c7d30  uint8_t __fastcall gmSlumlordUI::AmIHouseOwner(class gmSlumlordUI const* this)

004c7d30  {
004c7d30      class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c7d30      
004c7d38      if (m_pHouseProfile == 0)
004c7d38      {
004c7d5b          int32_t eax;
004c7d5b          eax = 0;
004c7d5d          return 0;
004c7d38      }
004c7d38      
004c7d3a      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004c7d3a      
004c7d41      if (SmartBox::smartbox_1 == 0)
004c7d5a          return m_pHouseProfile->_owner == 0;
004c7d5a      
004c7d4c      uint32_t eax_1;
004c7d4c      eax_1 = m_pHouseProfile->_owner == SmartBox::smartbox_1->player_id;
004c7d4f      return eax_1;
004c7d30  }

004c7d5e                                                                                            90 90                                ..

004c7d60  uint8_t __fastcall gmSlumlordUI::IsPaymentAllowed(class gmSlumlordUI* this)

004c7d60  {
004c7d60      class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c7d60      
004c7d68      if (m_pHouseProfile != 0)
004c7d68      {
004c7d6a          enum HouseOp m_eCurrentHouseOp = this->m_eCurrentHouseOp;
004c7d6a          
004c7d71          if (m_eCurrentHouseOp == Buy_House)
004c7d71          {
004c7d8c              m_pHouseProfile = m_pHouseProfile->_owner == 0;
004c7d8e              return m_pHouseProfile;
004c7d71          }
004c7d71          
004c7d74          if (m_eCurrentHouseOp == 2)
004c7d74          {
004c7d7e              m_pHouseProfile = m_pHouseProfile->_owner != 0;
004c7d81              return m_pHouseProfile;
004c7d74          }
004c7d68      }
004c7d68      
004c7d76      m_pHouseProfile = 0;
004c7d78      return 0;
004c7d60  }

004c7d8f                                               90                                                                 .

004c7d90  uint8_t __thiscall gmSlumlordUI::AddPayment(class gmSlumlordUI* this, class HousePayment const* arg2)

004c7d90  {
004c7d92      class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c7d92      
004c7d9a      if (m_pHouseProfile != 0)
004c7d9a      {
004c7daf          int32_t eax_1;
004c7daf          eax_1 = HouseProfile::Pay(m_pHouseProfile, this->m_eCurrentHouseOp, arg2) != 0;
004c7db2          return eax_1;
004c7d9a      }
004c7d9a      
004c7db5      class gmSlumlordUI* eax_2;
004c7db5      eax_2 = 0;
004c7db7      return 0;
004c7d90  }

004c7dba                                                                                90 90 90 90 90 90                            ......

004c7dc0  uint8_t __thiscall gmSlumlordUI::NeedsMore(class gmSlumlordUI const* this, class IDClass<_tagDataID,32,0> arg2)

004c7dc0  {
004c7dc2      class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c7dc2      
004c7dca      if (m_pHouseProfile != 0)
004c7dca      {
004c7ddf          int32_t eax_1;
004c7ddf          eax_1 = HouseProfile::NeedsMore(m_pHouseProfile, this->m_eCurrentHouseOp, arg2) != 0;
004c7de2          return eax_1;
004c7dca      }
004c7dca      
004c7de5      class gmSlumlordUI* eax_2;
004c7de5      eax_2 = 0;
004c7de7      return 0;
004c7dc0  }

004c7dea                                90 90 90 90 90 90                                                            ......

004c7df0  void __thiscall gmSlumlordUI::gmSlumlordUI(class gmSlumlordUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004c7df0  {
004c7dff      UIElement_Panel::UIElement_Panel(this, arg2, arg3);
004c7e04      this->vtable = &gmUrgentAssistanceUI::`vftable';
004c7e0e      this->vtable = &ObjectRangeHandler::`vftable';
004c7e18      this->vtable = &ItemListDragHandler::`vftable';
004c7e24      __builtin_memset(&this->m_iidOwner, 0, 0x3c);
004c7e7e      this->vtable = 0x7b6a08;
004c7e84      this->vtable = &gmSlumlordUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004c7e8e      this->vtable = &gmSlumlordUI::`vftable'.OnAction;
004c7e98      this->vtable = &gmSlumlordUI::`vftable';
004c7df0  }

004c7ea8                          90 90 90 90 90 90 90 90                                                          ........

004c7eb0  class UIElement* __thiscall gmSlumlordUI::DynamicCast(class gmSlumlordUI* this, uint32_t arg2) __pure

004c7eb0  {
004c7ebc      if (arg2 == 0x10000013)
004c7ec9          return this;
004c7ec9      
004c7ec3      int32_t edx_1;
004c7ec3      edx_1 = arg2 != 8;
004c7ec7      return (this & (edx_1 - 1));
004c7eb0  }

004c7ecc                                      90 90 90 90                                                              ....

004c7ed0  uint32_t gmSlumlordUI::GetUIElementType(class gmSlumlordUI const* this @ ecx) __pure

004c7ed0  {
004c7ed5      return 0x10000013;
004c7ed0  }

004c7ed6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c7ee0  void __fastcall gmSlumlordUI::~gmSlumlordUI(class gmSlumlordUI* this)

004c7ee0  {
004c7ef1      this->vtable = 0x7b6a08;
004c7eea      this->vtable = &gmSlumlordUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004c7ee3      this->vtable = &gmSlumlordUI::`vftable'.OnAction;
004c7f03      this->vtable = &gmSlumlordUI::`vftable';
004c7f14      CPlayerSystem::UnregisterAllObjectRangeHandlers(CPlayerSystem::GetPlayerSystem(), &this->vtable);
004c7f19      class UIElement_ItemList* m_pBuyItemList = this->m_pBuyItemList;
004c7f19      
004c7f21      if (m_pBuyItemList != 0)
004c7f23          UIElement_ItemList::UnregisterItemListDragHandler(m_pBuyItemList);
004c7f23      
004c7f28      class UIElement_ItemList* m_pRentItemList = this->m_pRentItemList;
004c7f28      
004c7f30      if (m_pRentItemList != 0)
004c7f32          UIElement_ItemList::UnregisterItemListDragHandler(m_pRentItemList);
004c7f32      
004c7f37      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
004c7f37      
004c7f3e      if (eax_2 != 0)
004c7f40          eax_2->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004c7f40      
004c7f4f      DialogFactory::CloseDialog(this->m_uiHousePurchaseDialogContext);
004c7f54      this->m_uiHousePurchaseDialogContext = 0;
004c7f65      DialogFactory::CloseDialog(this->m_uiRentPaymentByProxyDialogContext);
004c7f6a      this->m_uiRentPaymentByProxyDialogContext = 0;
004c7eea      this->vtable = &gmUrgentAssistanceUI::`vftable';
004c7f7f      NoticeHandler::~NoticeHandler(&this->vtable);
004c7f88      /* tailcall */
004c7f88      return UIElement_Panel::~UIElement_Panel(this);
004c7ee0  }

004c7f8d                                         90 90 90                                                               ...

004c7f90  class UIElement* gmSlumlordUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004c7f90  {
004c7f95      void* eax = operator new(0x728);
004c7f95      
004c7f9f      if (eax == 0)
004c7fb5          return 0;
004c7fb5      
004c7fb2      return gmSlumlordUI::gmSlumlordUI(eax, arg1, arg2);
004c7f90  }

004c7fb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c7fc0  void __fastcall gmSlumlordUI::RecvNotice_FailedHouseTransaction(class gmSlumlordUI* this, uint32_t arg2)

004c7fc0  {
004c7fc5      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] != 0)
004c7fcb          CM_House::Event_QueryLord(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0]);
004c7fc0  }

004c7fd4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c7fe0  void __fastcall gmSlumlordUI::UpdateButtons(class gmSlumlordUI* this)

004c7fe0  {
004c7feb      if (this->m_eCurrentHouseOp != Undef_HouseOp)
004c7feb      {
004c800f          class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c800f          
004c8017          if (m_pHouseProfile == 0)
004c804b              this->m_pBuyButton->vtable->SetState(0xd);
004c8017          else
004c8017          {
004c801e              uint32_t eax_2;
004c801e              eax_2 = m_pHouseProfile->_owner != 0;
004c801e              
004c8027              if ((eax_2 != 0 || m_pHouseProfile == 0))
004c804b                  this->m_pBuyButton->vtable->SetState(0xd);
004c8027              else
004c8027              {
004c8032                  int32_t eax_3;
004c8032                  eax_3 = HouseProfile::IsPaidInFull(m_pHouseProfile, Buy_House) != 0;
004c8032                  
004c8037                  if (eax_3 == 0)
004c804b                      this->m_pBuyButton->vtable->SetState(0xd);
004c8037                  else
004c8039                      this->m_pBuyButton->vtable->SetState(1);
004c8027              }
004c8017          }
004c8017          
004c8068          if (UIElement_ItemList::GetNumUIItems(this->m_pRentItemList) > 0)
004c8068          {
004c806a              this->m_pRentButton->vtable->SetState(1);
004c807b              return;
004c8068          }
004c7feb      }
004c7feb      else
004c7fed          this->m_pBuyButton->vtable->SetState(0xd);
004c7fed      
004c7ffd      this->m_pRentButton->vtable->SetState(0xd);
004c7fe0  }

004c807c                                                                                      90 90 90 90                              ....

004c8080  void __fastcall gmSlumlordUI::CleanItemLists(class gmSlumlordUI* this)

004c8080  {
004c808a      gmSalvageUI::ClearAllTradeStates(this, this->m_pBuyItemList);
004c8095      UIElement_ItemList::ItemList_Flush(this->m_pBuyItemList);
004c809a      this->m_pBuyButton->vtable->SetState(0xd);
004c80b3      gmSalvageUI::ClearAllTradeStates(this, this->m_pRentItemList);
004c80be      UIElement_ItemList::ItemList_Flush(this->m_pRentItemList);
004c80c3      this->m_pRentButton->vtable->SetState(0xd);
004c80d3      class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c80d3      
004c80db      if (m_pHouseProfile == 0)
004c80ef          return;
004c80ef      
004c80e0      HousePaymentList::ClearPayment(&m_pHouseProfile->_buy);
004c80e9      /* tailcall */
004c80e9      return HousePaymentList::ClearPayment(&m_pHouseProfile->_rent);
004c8080  }


004c80f0  uint8_t __thiscall gmSlumlordUI::AddItem(class gmSlumlordUI* this, class ACCWeenieObject* arg2)

004c80f0  {
004c80fd      if ((arg2 != 0 && ACCWeenieObject::GetNumContainedItems(arg2) <= 0))
004c80fd      {
004c810a          class UIElement_ItemList* m_pCurItemList = this->m_pCurItemList;
004c810a          
004c8112          if ((m_pCurItemList != 0 && UIElement_ItemList::ItemList_IsInList(m_pCurItemList, arg2->id) == 0))
004c8112          {
004c8125              void var_18;
004c8125              HousePayment::HousePayment(&var_18);
004c8132              uint32_t id = arg2->pwd._wcid.id;
004c8142              int32_t var_10_1 = ACCWeenieObject::GetHousePayment(arg2);
004c8142              
004c814d              if (gmSlumlordUI::AddPayment(this, &var_18) != 0)
004c814d              {
004c8166                  ACCWeenieObject::SetTradeState(arg2, 1);
004c8175                  UIElement_ItemList::ItemList_AddItem(this->m_pCurItemList, arg2->id);
004c817a                  arg2->vtable->RegisterNoticeHandler(0x186af, &this->vtable);
004c8193                  HousePayment::~HousePayment(&var_18);
004c8199                  int32_t eax_6;
004c8199                  eax_6 = 1;
004c819f                  return 1;
004c814d              }
004c814d              
004c8153              HousePayment::~HousePayment(&var_18);
004c8112          }
004c80fd      }
004c80fd      
004c8159      int32_t eax;
004c8159      eax = 0;
004c815f      return 0;
004c80f0  }

004c81a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c81b0  void __thiscall gmSlumlordUI::RemoveItem(class gmSlumlordUI* this, class ACCWeenieObject* arg2)

004c81b0  {
004c81b6      class UIElement_ItemList* m_pCurItemList = this->m_pCurItemList;
004c81b6      
004c81cd      if ((m_pCurItemList != 0 && arg2 != 0))
004c81cd      {
004c81d3          int32_t eax_1 = UIElement_ItemList::GetNumUIItems(m_pCurItemList);
004c81da          uint32_t ebx_1 = 0;
004c81da          
004c81de          if (eax_1 > 0)
004c81de          {
004c81eb              while (true)
004c81eb              {
004c81eb                  class UIElement* eax_2 = UIElement_ListBox::GetItem(this->m_pCurItemList, ebx_1);
004c81eb                  
004c81f2                  if (eax_2 != 0)
004c81f2                  {
004c81fd                      void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c81fd                      
004c8210                      if ((eax_3 != 0 && *(uint32_t*)((char*)eax_3 + 0x5fc) == arg2->id))
004c8210                          break;
004c81f2                  }
004c81f2                  
004c8212                  ebx_1 += 1;
004c8212                  
004c8215                  if (ebx_1 >= eax_1)
004c821e                      return;
004c81eb              }
004c81eb              
004c8225              ACCWeenieObject::SetTradeState(arg2, 0);
004c822a              arg2->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004c8244              UIElement_ItemList::ItemList_DeleteItem(this->m_pCurItemList, arg2->id);
004c824d              void var_18;
004c824d              HousePayment::HousePayment(&var_18);
004c825a              uint32_t id = arg2->pwd._wcid.id;
004c825e              int32_t eax_6 = ACCWeenieObject::GetHousePayment(arg2);
004c8263              class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c826b              int32_t var_10_1 = eax_6;
004c826b              
004c826f              if (m_pHouseProfile != 0)
004c827d                  HouseProfile::RemovePayment(m_pHouseProfile, this->m_eCurrentHouseOp, &var_18);
004c827d              
004c8286              HousePayment::~HousePayment(&var_18);
004c81de          }
004c81cd      }
004c81b0  }

004c8295                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c82a0  void* __thiscall gmSlumlordUI::`scalar deleting destructor'(class gmSlumlordUI* this, uint32_t arg2)

004c82a0  {
004c82a3      gmSlumlordUI::~gmSlumlordUI(this);
004c82a3      
004c82ad      if ((arg2 & 1) != 0)
004c82b0          operator delete(this);
004c82b0      
004c82bb      return this;
004c82a0  }

004c82be                                                                                            90 90                                ..

004c82c0  void __fastcall gmSlumlordUI::PostInit(class gmSlumlordUI* this)

004c82c0  {
004c82c4      UIElement::PostInit(this);
004c82c9      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004c82c9      
004c82d2      if (eax != 0)
004c82d2      {
004c82da          struct gmNoticeHandler::VTable** eax_1;
004c82da          
004c82da          if (this == 0)
004c82e4              eax_1 = nullptr;
004c82da          else
004c82dc              eax_1 = &this->vtable;
004c82dc          
004c82e6          eax->vtable->RegisterNoticeHandler(0x4dd229, eax_1);
004c82f5          struct gmNoticeHandler::VTable** eax_2;
004c82f5          
004c82f5          if (this == 0)
004c82ff              eax_2 = nullptr;
004c82f5          else
004c82f7              eax_2 = &this->vtable;
004c82f7          
004c8301          eax->vtable->RegisterNoticeHandler(0x4dd226, eax_2);
004c8310          struct gmNoticeHandler::VTable** eax_3;
004c8310          
004c8310          if (this == 0)
004c831a              eax_3 = nullptr;
004c8310          else
004c8312              eax_3 = &this->vtable;
004c8312          
004c831c          eax->vtable->RegisterNoticeHandler(0x4dd256, eax_3);
004c832b          struct gmNoticeHandler::VTable** eax_4;
004c832b          
004c832b          if (this == 0)
004c8335              eax_4 = nullptr;
004c832b          else
004c832d              eax_4 = &this->vtable;
004c832d          
004c8337          eax->vtable->RegisterNoticeHandler(0x186a8, eax_4);
004c8346          struct gmNoticeHandler::VTable** eax_5;
004c8346          
004c8346          if (this == 0)
004c8350              eax_5 = nullptr;
004c8346          else
004c8348              eax_5 = &this->vtable;
004c8348          
004c8352          eax->vtable->RegisterNoticeHandler(0x186a4, eax_5);
004c82d2      }
004c82d2      
004c8366      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x10000091);
004c836d      class UIElement_Text* eax_7;
004c836d      
004c836d      if (eax_6 == 0)
004c837d          eax_7 = nullptr;
004c836d      else
004c8375          eax_7 = eax_6->vtable->DynamicCast(0xc);
004c8375      
004c8386      this->m_pBuyRequirementsText = eax_7;
004c838c      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x10000093);
004c8393      class UIElement_Text* eax_9;
004c8393      
004c8393      if (eax_8 == 0)
004c83a3          eax_9 = nullptr;
004c8393      else
004c839b          eax_9 = eax_8->vtable->DynamicCast(0xc);
004c839b      
004c83ac      this->m_pBuyHouseOwnerText = eax_9;
004c83b2      class UIElement* eax_10 = UIElement::GetChildRecursive(this, 0x10000095);
004c83b9      class UIElement_ItemList* eax_11;
004c83b9      
004c83b9      if (eax_10 == 0)
004c83cc          eax_11 = nullptr;
004c83b9      else
004c83c4          eax_11 = eax_10->vtable->DynamicCast(0x10000031);
004c83c4      
004c83d0      this->m_pBuyItemList = eax_11;
004c83d0      
004c83d6      if (eax_11 != 0)
004c83e1          UIElement_ItemList::RegisterItemListDragHandler(eax_11, &this->vtable);
004c83e1      
004c83ed      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x10000094);
004c83f4      class UIElement_Button* eax_13;
004c83f4      
004c83f4      if (eax_12 == 0)
004c8404          eax_13 = nullptr;
004c83f4      else
004c83fc          eax_13 = eax_12->vtable->DynamicCast(1);
004c83fc      
004c840d      this->m_pBuyButton = eax_13;
004c8413      class UIElement* eax_14 = UIElement::GetChildRecursive(this, 0x10000098);
004c841a      class UIElement_Text* eax_15;
004c841a      
004c841a      if (eax_14 == 0)
004c842a          eax_15 = nullptr;
004c841a      else
004c8422          eax_15 = eax_14->vtable->DynamicCast(0xc);
004c8422      
004c8433      this->m_pRentRequirementsText = eax_15;
004c8439      class UIElement* eax_16 = UIElement::GetChildRecursive(this, 0x1000009a);
004c8440      class UIElement_Text* eax_17;
004c8440      
004c8440      if (eax_16 == 0)
004c8450          eax_17 = nullptr;
004c8440      else
004c8448          eax_17 = eax_16->vtable->DynamicCast(0xc);
004c8448      
004c8459      this->m_pRentHouseOwnerText = eax_17;
004c845f      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x1000009c);
004c8466      class UIElement_ItemList* eax_19;
004c8466      
004c8466      if (eax_18 == 0)
004c8479          eax_19 = nullptr;
004c8466      else
004c8471          eax_19 = eax_18->vtable->DynamicCast(0x10000031);
004c8471      
004c847d      this->m_pRentItemList = eax_19;
004c847d      
004c8483      if (eax_19 != 0)
004c848e          UIElement_ItemList::RegisterItemListDragHandler(eax_19, &this->vtable);
004c848e      
004c849a      class UIElement* eax_20 = UIElement::GetChildRecursive(this, 0x1000009b);
004c84a1      class UIElement_Button* eax_21;
004c84a1      
004c84a1      if (eax_20 == 0)
004c84b1          eax_21 = nullptr;
004c84a1      else
004c84a9          eax_21 = eax_20->vtable->DynamicCast(1);
004c84a9      
004c84b5      this->m_pRentButton = eax_21;
004c84bb      gmSlumlordUI::CleanItemLists(this);
004c84c4      /* tailcall */
004c84c4      return gmSlumlordUI::UpdateButtons(this);
004c82c0  }

004c84c9                             90 90 90 90 90 90 90                                                           .......

004c84d0  void gmSlumlordUI::Register()

004c84d0  {
004c84da      UIElement::RegisterElementClass(0x10000013, gmSlumlordUI::Create);
004c84d0  }

004c84e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004c84f0  void __thiscall gmSlumlordUI::RecvNotice_ItemListBeginDrag(class gmSlumlordUI* this, class UIElement const* arg2, int32_t arg3)

004c84f0  {
004c84f7      class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4];
004c84f7      
004c84fc      if (ecx == arg2)
004c84fc      {
004c8503          class UIElement* eax_1 = UIElement_ListBox::GetItem(ecx, arg3);
004c8503          
004c850a          if (eax_1 != 0)
004c850a          {
004c8515              void* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
004c8515              
004c851d              if (eax_2 != 0)
004c851d              {
004c851f                  uint32_t eax_3 = *(uint32_t*)((char*)eax_2 + 0x5fc);
004c851f                  
004c8527                  if (eax_3 != 0)
004c8527                  {
004c853b                      gmSlumlordUI::RemoveItem(((char*)this - 0x6e0), ClientObjMaintSystem::GetWeenieObject(eax_3));
004c8542                      gmSlumlordUI::UpdateButtons(((char*)this - 0x6e0));
004c8527                  }
004c851d              }
004c850a          }
004c84fc      }
004c84f0  }

004c854b                                   90 90 90 90 90                                                             .....

004c8550  void __thiscall gmSlumlordUI::RecvNotice_ServerSaysMoveItem(class gmSlumlordUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004c8550  {
004c8553      class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4];
004c8553      
004c8558      if ((ecx != 0 && UIElement_ItemList::ItemList_GetItem(ecx, arg2) != 0))
004c8558      {
004c856a          class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
004c856a          
004c8576          if ((eax_2 != 0 && ACCWeenieObject::IsOwnedByPlayer(eax_2) == 0))
004c8576          {
004c858c              gmSlumlordUI::RemoveItem(((char*)this - 0x6e0), eax_2);
004c8593              gmSlumlordUI::UpdateButtons(((char*)this - 0x6e0));
004c8576          }
004c8558      }
004c8550  }

004c859d                                                                                         90 90 90                               ...

004c85a0  void __thiscall gmSlumlordUI::RecvNotice_BeingDeleted(class gmSlumlordUI* this, class CWeenieObject* arg2)

004c85a0  {
004c85a6      /* tailcall */
004c85a6      return gmSlumlordUI::RemoveItem(((char*)this - 0x6e0), arg2);
004c85a0  }

004c85ab                                   90 90 90 90 90                                                             .....

004c85b0  uint8_t __thiscall gmSlumlordUI::AddObject(class gmSlumlordUI* this, class ACCWeenieObject* arg2)

004c85b0  {
004c85ba      if (arg2 == 0)
004c85ba      {
004c85bd          int32_t eax;
004c85bd          eax = 0;
004c85c0          return 0;
004c85ba      }
004c85ba      
004c85cf      if (ACCWeenieObject::GetNumContainedItems(arg2) != 0)
004c85e2          return gmSlumlordUI::AddContainer(this, arg2);
004c85e2      
004c85d8      return gmSlumlordUI::AddItem(this, arg2);
004c85b0  }

004c85e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004c85f0  uint8_t __thiscall gmSlumlordUI::DragItemAcceptable(class gmSlumlordUI* this, uint32_t arg2, uint8_t arg3)

004c85f0  {
004c8601      if (this->m_pCurItemList == 0)
004c8601      {
004c8603          class UIElement_ItemList* eax;
004c8603          eax = 0;
004c860c          return 0;
004c8601      }
004c8601      
004c861d      class ACCWeenieObject* esi = ClientObjMaintSystem::GetWeenieObject(arg2);
004c8624      class ACCWeenieObject* eax_2;
004c8624      
004c8624      if (esi != 0)
004c8624      {
004c862f          if (ACCWeenieObject::IsOwnedByPlayer(esi) != 0)
004c862f          {
004c86a2              if ((UIElement_ItemList::ItemList_IsInList(this->m_pCurItemList, esi->id) == 0 && gmSlumlordUI::IsPaymentAllowed(this) != 0))
004c86a2              {
004c86b8                  if (ACCWeenieObject::GetNumContainedItems(esi) <= 0)
004c86dd                      return gmSlumlordUI::NeedsMore(this, esi->pwd._wcid.id);
004c86dd                  
004c86bb                  int32_t eax_4;
004c86bb                  eax_4 = 1;
004c86c4                  return 1;
004c86a2              }
004c862f          }
004c862f          else
004c862f          {
004c8631              eax_2 = arg3;
004c8631              
004c863a              if (eax_2 == 0)
004c863a              {
004c8640                  void var_90;
004c8640                  StringInfo::StringInfo(&var_90);
004c864e                  void var_94;
004c864e                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, &gmSlumlordUI::`vftable'.RecvNotice_AddSalvageItem);
004c865e                  StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004c8667                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
004c8673                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c867f                  StringInfo::~StringInfo(&var_90);
004c863a              }
004c862f          }
004c8624      }
004c8624      
004c8685      eax_2 = 0;
004c868e      return 0;
004c85f0  }


004c86e0  uint8_t __thiscall gmSlumlordUI::AddContainer(class gmSlumlordUI* this, class ACCWeenieObject* arg2)

004c86e0  {
004c86ea      class IDList* eax;
004c86ea      
004c86ea      if ((arg2 != 0 && ACCWeenieObject::GetNumContainedItems(arg2) != 0))
004c86ea      {
004c86f9          eax = ACCWeenieObject::GetContainedItemsList(arg2);
004c86f9          
004c8702          if (eax != 0)
004c8702          {
004c8709              IDList::SetCurToNum(eax, 0);
004c8711              int32_t i = 0;
004c8711              
004c8715              if (eax->numIDs > 0)
004c8715              {
004c8755                  do
004c8755                  {
004c872a                      if (gmSlumlordUI::DragItemAcceptable(this, IDList::GetCurID(eax), 1) == 0)
004c874a                          IDList::SetCurToNext(eax);
004c872a                      else
004c872a                      {
004c8734                          class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(IDList::GetCurID(eax));
004c8734                          
004c873e                          if (eax_5 != 0)
004c873e                          {
004c8743                              gmSlumlordUI::AddObject(this, eax_5);
004c874a                              IDList::SetCurToNext(eax);
004c873e                          }
004c872a                      }
004c872a                      
004c8752                      i += 1;
004c8755                  } while (i < eax->numIDs);
004c8715              }
004c8715              
004c8759              int32_t eax_1;
004c8759              eax_1 = 1;
004c875c              return 1;
004c8702          }
004c86ea      }
004c86ea      
004c8760      eax = 0;
004c8763      return 0;
004c86e0  }

004c8766                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c8770  uint8_t __thiscall gmSlumlordUI::OnItemListDragOver(class gmSlumlordUI* this, class UIElement_UIItem* arg2, uint32_t arg3, uint32_t arg4, enum DropItemFlags arg5)

004c8770  {
004c877d      if ((arg3 != 0 && (arg5 & 0xe) == 0))
004c877d      {
004c8793          if (gmSlumlordUI::DragItemAcceptable(((char*)this - 0x6e8), arg3, 1) != 0)
004c8793          {
004c879a              UIElement_UIItem::SetDragAcceptState(arg2, 0x10000040);
004c879f              int32_t eax_1;
004c879f              eax_1 = 1;
004c87a1              return 1;
004c8793          }
004c8793          
004c87a9          UIElement_UIItem::SetDragAcceptState(arg2, 0x10000041);
004c877d      }
004c877d      
004c87ae      uint32_t eax_2;
004c87ae      eax_2 = 1;
004c87b0      return 1;
004c8770  }

004c87b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c87c0  uint8_t __thiscall gmSlumlordUI::AcceptDragObject(class gmSlumlordUI* this, uint32_t arg2)

004c87c0  {
004c87d4      uint8_t result = gmSlumlordUI::DragItemAcceptable(this, arg2, 0);
004c87d4      
004c87db      if (result == 0)
004c87e5          return result;
004c87e5      
004c87ea      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004c87ea      
004c87f6      if (eax != 0)
004c87f6      {
004c8807          if (GenItemHolder::splitSize == GenItemHolder::maxSplitSize)
004c8807          {
004c8918              ACCWeenieObject::SetWaitingState(eax, 0);
004c8920              gmSlumlordUI::AddObject(this, eax);
004c8927              gmSlumlordUI::UpdateButtons(this);
004c892e              int32_t eax_5;
004c892e              eax_5 = 1;
004c8937              return 1;
004c8807          }
004c8807          
004c880d          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004c881a          uint32_t player_id;
004c881a          
004c881a          if (SmartBox::smartbox_1 == 0)
004c8824              player_id = 0;
004c881a          else
004c881c              player_id = SmartBox::smartbox_1->player_id;
004c881c          
004c8837          void var_98;
004c8837          void var_90;
004c8837          
004c8837          if (ItemHolder::AttemptToPlaceInContainer(arg2, player_id, eax->pwd._containerID, 0, 0) != 0)
004c8837          {
004c883e              ItemHolder::GetObjectSplitSize(eax);
004c8858              void __return;
004c8858              class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004c8865              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, &gmSlumlordUI::`vftable'.RecvNotice_AddItemToTrade);
004c8871              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004c887a              StringInfo::StringInfo(&var_90);
004c888a              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004c8896              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c88a2              StringInfo::~StringInfo(&var_90);
004c88ab              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004c88b2              int32_t eax_4;
004c88b2              eax_4 = 1;
004c88bb              return 1;
004c8837          }
004c8837          
004c88c2          StringInfo::StringInfo(&var_90);
004c88d0          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, &gmSlumlordUI::`vftable'.RecvNotice_PrevSpellSelection);
004c88e0          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004c88e9          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004c88f5          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004c8901          StringInfo::~StringInfo(&var_90);
004c87f6      }
004c87f6      
004c8908      eax = 0;
004c8911      return 0;
004c87c0  }

004c893a                                                                                90 90 90 90 90 90                            ......

004c8940  uint8_t __fastcall gmSlumlordUI::MakePayment(class gmSlumlordUI* this)

004c8940  {
004c8946      enum HouseOp eax = this->m_eCurrentHouseOp;
004c8946      
004c8954      if ((eax == Buy_House || eax == Rent_House))
004c8954      {
004c895a          class UIElement_ItemList* m_pCurItemList = this->m_pCurItemList;
004c895a          
004c8962          if (m_pCurItemList != 0)
004c8962          {
004c8968              eax = this->m_iidOwner;
004c8968              
004c8974              if (eax != Undef_HouseOp)
004c8974              {
004c897c                  int32_t var_10 = 0x7a3e80;
004c8984                  int32_t var_c_1 = 0;
004c898c                  int32_t var_8_1 = 0;
004c8994                  int32_t var_4_1 = 0;
004c899c                  int32_t eax_1 = UIElement_ItemList::GetNumUIItems(m_pCurItemList);
004c89a3                  uint32_t esi_1 = 0;
004c89a3                  
004c89a7                  if (eax_1 > 0)
004c89a7                  {
004c89f2                      do
004c89f2                      {
004c89b7                          class UIElement* eax_2 = UIElement_ListBox::GetItem(this->m_pCurItemList, esi_1);
004c89b7                          
004c89be                          if (eax_2 != 0)
004c89be                          {
004c89c9                              void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c89c9                              
004c89d1                              if (eax_3 != 0)
004c89d1                              {
004c89d3                                  int32_t eax_4 = *(uint32_t*)((char*)eax_3 + 0x5fc);
004c89d3                                  
004c89db                                  if (eax_4 != 0)
004c89db                                  {
004c89dd                                      int32_t var_14 = eax_4;
004c89ea                                      PackableList<unsigned long>::InsertTail(&var_10, &var_14);
004c89db                                  }
004c89d1                              }
004c89be                          }
004c89be                          
004c89ef                          esi_1 += 1;
004c89f2                      } while (esi_1 < eax_1);
004c89a7                  }
004c89a7                  
004c89fc                  if (var_c_1 != 0)
004c89fc                  {
004c8a18                      gmSlumlordUI::CleanItemLists(this);
004c8a1f                      gmSlumlordUI::UpdateButtons(this);
004c8a1f                      
004c8a2a                      if (var_c_1 != 0)
004c8a2a                      {
004c8a2c                          enum HouseOp m_eCurrentHouseOp = this->m_eCurrentHouseOp;
004c8a2c                          
004c8a33                          if (m_eCurrentHouseOp == Buy_House)
004c8a53                              CM_House::Event_BuyHouse(eax, &var_10);
004c8a33                          else if (m_eCurrentHouseOp == 2)
004c8a42                              CM_House::Event_RentHouse(eax, &var_10);
004c8a2a                      }
004c8a2a                      
004c8a5f                      var_10 = 0x7a3e80;
004c8a67                      PackableList<unsigned long>::Flush(&var_10);
004c8a6c                      int32_t eax_7;
004c8a6c                      eax_7 = 1;
004c8a72                      return 1;
004c89fc                  }
004c89fc                  
004c8a02                  var_10 = 0x7a3e80;
004c8a0a                  PackableList<unsigned long>::Flush(&var_10);
004c8974              }
004c8962          }
004c8954      }
004c8954      
004c8a0f      eax = 0;
004c8a15      return 0;
004c8940  }

004c8a73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c8a80  void __thiscall gmSlumlordUI::HandleDropRelease(class gmSlumlordUI* this, struct UIElementMessageInfo const* arg2)

004c8a80  {
004c8a84      uint32_t dwParam1 = arg2->dwParam1;
004c8a8b      class UIElement* esi = *(uint32_t*)(dwParam1 + 0x10);
004c8a91      class UIElement* ecx = *(uint32_t*)(dwParam1 + 8);
004c8a91      
004c8a9a      if ((ecx != 0 && esi != 0))
004c8a9a      {
004c8aac          char var_8;
004c8aac          void var_4;
004c8aac          UIElement_ItemList::InqDropIconInfo(ecx, &arg2, &var_4, &var_8);
004c8aac          
004c8aba          if (arg2 != 0)
004c8aba          {
004c8acc              if (UIElement::IsAncestorOfMe(esi, this->m_pBuyItemList) == 0)
004c8acc              {
004c8b00                  if ((UIElement::IsAncestorOfMe(esi, this->m_pRentItemList) != 0 && (var_8 & 0xe) == 0))
004c8b09                      gmSlumlordUI::AcceptDragObject(this, arg2);
004c8acc              }
004c8acc              else if ((var_8 & 0xe) == 0)
004c8adc                  gmSlumlordUI::AcceptDragObject(this, arg2);
004c8aba          }
004c8a9a      }
004c8a80  }

004c8b16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c8b20  uint8_t __fastcall gmSlumlordUI::RefreshHouse(class gmSlumlordUI* this)

004c8b20  {
004c8b24      class gmSlumlordUI* this_1 = this;
004c8b24      
004c8b2e      if (this_1->m_pHouseProfile == 0)
004c8b2e      {
004c8d7f          class HouseProfile* eax;
004c8d7f          eax = 0;
004c8d85          return 0;
004c8b2e      }
004c8b2e      
004c8b3d      int32_t (* const ebx)() = InterlockedIncrement;
004c8b4b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004c8b4b      class PStringBase<unsigned short> var_4;
004c8b4b      
004c8b4b      if (this_1->m_pBuyRequirementsText != 0)
004c8b4b      {
004c8b4d          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c8b52          AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004c8b5a          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004c8b69          HouseProfile::ComposeText(this_1->m_pHouseProfile, Buy_House, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
004c8b7c          class PStringBase<unsigned short>* eax_3;
004c8b7c          eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
004c8b88          UIElement_Text::SetText(this_1->m_pBuyRequirementsText, eax_3);
004c8b91          int32_t* edi_2 = (var_4 - 0x14);
004c8b91          
004c8ba0          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004c8ba8              **(uint32_t**)edi_2(1);
004c8ba8          
004c8baa          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004c8baa          
004c8bba          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
004c8bbc              AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
004c8b4b      }
004c8b4b      
004c8bcc      if (this_1->m_pRentRequirementsText != 0)
004c8bcc      {
004c8bce          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004c8bd3          AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004c8bdb          ebx(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004c8bea          HouseProfile::ComposeText2(this_1->m_pHouseProfile, Rent_House, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
004c8bfd          class PStringBase<unsigned short>* eax_9;
004c8bfd          eax_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
004c8c09          UIElement_Text::SetText(this_1->m_pRentRequirementsText, eax_9);
004c8c12          int32_t* edi_4 = (var_4 - 0x14);
004c8c12          
004c8c21          if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
004c8c29              **(uint32_t**)edi_4(1);
004c8c29          
004c8c2b          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004c8c2b          
004c8c3b          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0))
004c8c3d              AC1Legacy::PStringBase<char>::s_NullBuffer_6->vtable->__vecDelDtor(1);
004c8bcc      }
004c8bcc      
004c8c4e      AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &gmSlumlordUI::`vftable'.RecvNotice_RefreshOptionsPanel);
004c8c53      class HouseProfile* m_pHouseProfile = this_1->m_pHouseProfile;
004c8c53      
004c8c60      if (m_pHouseProfile->_name.m_buffer->m_len != 1)
004c8c60      {
004c8ca7          class AC1Legacy::PSRefBuffer<char>* m_buffer = m_pHouseProfile->_name.m_buffer;
004c8caa          uint32_t m_len = m_buffer->m_len;
004c8caa          
004c8cb8          if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
004c8cc4              AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &m_buffer->m_data, (m_len - 1));
004c8c60      }
004c8c60      else
004c8c60      {
004c8c6b          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "None");
004c8c70          class PStringBase<unsigned short> edi_5 = var_4;
004c8c74          int32_t eax_13 = *(uint32_t*)(edi_5 + 8);
004c8c74          
004c8c82          if ((eax_13 != 1 && edi_5 != AC1Legacy::PStringBase<char>::s_NullBuffer))
004c8c8e              AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, (edi_5 + 0x14), (eax_13 - 1));
004c8c8e          
004c8c9b          if (InterlockedDecrement((edi_5 + 4)) == 0)
004c8ca3              **(uint32_t**)edi_5(1);
004c8c60      }
004c8c60      
004c8cd1      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004c8cd1      
004c8cd5      if (this_1->m_pBuyHouseOwnerText != 0)
004c8cd5      {
004c8ce1          class PStringBase<unsigned short>* eax_20;
004c8ce1          eax_20 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data);
004c8ced          UIElement_Text::SetText(this_1->m_pBuyHouseOwnerText, eax_20);
004c8cf6          int32_t* edi_7 = (var_4 - 0x14);
004c8cf6          
004c8d05          if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
004c8d0d              **(uint32_t**)edi_7(1);
004c8cd5      }
004c8cd5      
004c8d17      if (this_1->m_pRentHouseOwnerText != 0)
004c8d17      {
004c8d23          class PStringBase<unsigned short>* eax_24;
004c8d23          eax_24 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data);
004c8d2f          UIElement_Text::SetText(this_1->m_pRentHouseOwnerText, eax_24);
004c8d38          int32_t* edi_9 = (var_4 - 0x14);
004c8d38          
004c8d47          if ((InterlockedDecrement(&edi_9[1]) == 0 && edi_9 != 0))
004c8d4f              **(uint32_t**)edi_9(1);
004c8d17      }
004c8d17      
004c8d53      gmSlumlordUI::CleanItemLists(this_1);
004c8d5a      gmSlumlordUI::UpdateButtons(this_1);
004c8d5a      
004c8d6b      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
004c8d6d          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
004c8d6d      
004c8d78      int32_t eax_27;
004c8d78      eax_27 = 1;
004c8d7e      return 1;
004c8b20  }

004c8d86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c8d90  uint8_t __thiscall gmSlumlordUI::CloseBuyHouseConfirmationDialog(class gmSlumlordUI* this, uint8_t arg2)

004c8d90  {
004c8d93      class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c8d9b      this->m_uiHousePurchaseDialogContext = 0;
004c8d9b      
004c8da5      if (m_pHouseProfile == 0)
004c8daa          return 0;
004c8daa      
004c8db3      if (arg2 == 0)
004c8db3      {
004c8dd2          this->vtable->SetVisible(0);
004c8ddb          int32_t eax_3;
004c8ddb          eax_3 = 1;
004c8dde          return 1;
004c8db3      }
004c8db3      
004c8dbe      int32_t eax_1;
004c8dbe      eax_1 = HouseProfile::IsPaidInFull(m_pHouseProfile, Buy_House) != 0;
004c8dbe      
004c8dc3      if (eax_1 != 0)
004c8dc7          gmSlumlordUI::MakePayment(this);
004c8dc7      
004c8dcc      eax_1 = 1;
004c8dcf      return 1;
004c8d90  }

004c8de1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004c8df0  uint8_t __thiscall gmSlumlordUI::CloseRentPaymentByProxyConfirmationDialog(class gmSlumlordUI* this, uint8_t arg2)

004c8df0  {
004c8df3      class UIElement_ItemList* m_pRentItemList = this->m_pRentItemList;
004c8dfb      this->m_uiRentPaymentByProxyDialogContext = 0;
004c8dfb      
004c8e05      if (m_pRentItemList == 0)
004c8e0a          return 0;
004c8e0a      
004c8e13      if (arg2 == 0)
004c8e13      {
004c8e2b          this->vtable->SetVisible(0);
004c8e34          int32_t eax_3;
004c8e34          eax_3 = 1;
004c8e37          return 1;
004c8e13      }
004c8e13      
004c8e1c      if (UIElement_ItemList::GetNumUIItems(m_pRentItemList) != 0)
004c8e20          gmSlumlordUI::MakePayment(this);
004c8e20      
004c8e25      int32_t eax_1;
004c8e25      eax_1 = 1;
004c8e28      return 1;
004c8df0  }

004c8e3a                                                                                90 90 90 90 90 90                            ......

004c8e40  void __thiscall gmSlumlordUI::RecvNotice_CloseDialog(class gmSlumlordUI* this, uint32_t arg2, class PropertyCollection const* arg3)

004c8e40  {
004c8e45      class PropertyCollection* esi = arg3;
004c8e50      uint32_t temp1 = (COMBINE(0, 0x8e) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004c8e53      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004c8e58      int32_t var_14 = 0;
004c8e5c      int32_t* var_8 = nullptr;
004c8e60      int32_t* var_4 = nullptr;
004c8e60      
004c8e6e      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
004c8e6e      {
004c8e76          if (*(uint32_t*)i == 0x8e)
004c8e76          {
004c8e83              if (i != 0)
004c8e83              {
004c8e8d                  BaseProperty::operator=(&var_8, &i[2]);
004c8e8d                  
004c8e98                  if (var_4 != 0)
004c8ea1                      *(uint32_t*)(*(uint32_t*)var_4 + 0xa8)(&var_14);
004c8e83              }
004c8e83              
004c8e83              break;
004c8e76          }
004c8e6e      }
004c8e6e      
004c8eac      if (var_14 == 1)
004c8eac      {
004c8eb9          uint32_t temp1_1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004c8ebc          class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004c8ebf          int32_t* ecx_2 = nullptr;
004c8ec1          arg3 = 0;
004c8ec5          int32_t* var_10 = nullptr;
004c8ec9          int32_t* var_c_1 = nullptr;
004c8ec9          
004c8ed4          for (int32_t* i_1 = m_buckets_1[temp1_1]; i_1 != 0; i_1 = i_1[1])
004c8ed4          {
004c8edc              if (*(uint32_t*)i_1 == 0x92)
004c8edc              {
004c8ee9                  if (i_1 != 0)
004c8ee9                  {
004c8ef3                      BaseProperty::operator=(&var_10, &i_1[2]);
004c8ef8                      ecx_2 = var_c_1;
004c8ef8                      
004c8efe                      if (ecx_2 != 0)
004c8efe                      {
004c8f07                          *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&arg3);
004c8f0a                          ecx_2 = var_c_1;
004c8efe                      }
004c8ee9                  }
004c8ee9                  
004c8ee9                  break;
004c8edc              }
004c8ed4          }
004c8ed4          
004c8f15          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xd] == arg2)
004c8f15          {
004c8f22              gmSlumlordUI::CloseBuyHouseConfirmationDialog(((char*)this - 0x6e0), ((int8_t)arg3));
004c8f3e              ecx_2 = var_c_1;
004c8f15          }
004c8f15          else if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xe] == arg2)
004c8f2c          {
004c8f39              gmSlumlordUI::CloseRentPaymentByProxyConfirmationDialog(((char*)this - 0x6e0), ((int8_t)arg3));
004c8f3e              ecx_2 = var_c_1;
004c8f2c          }
004c8f2c          
004c8f42          int32_t* eax_9 = var_10;
004c8f42          
004c8f48          if (eax_9 != 0)
004c8f48          {
004c8f52              int32_t esi_2 = (eax_9[1] - 1);
004c8f4f              eax_9[1] = esi_2;
004c8f4f              
004c8f59              if (esi_2 == 0)
004c8f5f                  **(uint32_t**)eax_9(1);
004c8f5f              
004c8f61              ecx_2 = var_c_1;
004c8f65              var_10 = nullptr;
004c8f48          }
004c8f48          
004c8f6b          if (ecx_2 != 0)
004c8f6b          {
004c8f73              int32_t esi_4 = (ecx_2[1] - 1);
004c8f70              ecx_2[1] = esi_4;
004c8f70              
004c8f7a              if (esi_4 == 0)
004c8f80                  **(uint32_t**)ecx_2(1);
004c8f6b          }
004c8eac      }
004c8eac      
004c8f82      int32_t* eax_13 = var_8;
004c8f82      
004c8f88      if (eax_13 != 0)
004c8f88      {
004c8f92          int32_t esi_6 = (eax_13[1] - 1);
004c8f8f          eax_13[1] = esi_6;
004c8f8f          
004c8f99          if (esi_6 == 0)
004c8f9f              **(uint32_t**)eax_13(1);
004c8f9f          
004c8fa1          var_8 = nullptr;
004c8f88      }
004c8f88      
004c8fab      if (var_4 != 0)
004c8fab      {
004c8fb5          int32_t esi_8 = (var_4[1] - 1);
004c8fb2          var_4[1] = esi_8;
004c8fb2          
004c8fbc          if (esi_8 == 0)
004c8fc2              **(uint32_t**)var_4(1);
004c8fab      }
004c8e40  }

004c8fcd                                         90 90 90                                                               ...

004c8fd0  uint8_t __thiscall gmSlumlordUI::UpdateHouse(class gmSlumlordUI* this, uint32_t arg2, class HouseProfile const* arg3)

004c8fd0  {
004c8fd7      class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c8fdf      this->m_iidOwner = arg2;
004c8fdf      
004c8fe5      if (m_pHouseProfile != 0)
004c901a          HouseProfile::operator=(m_pHouseProfile, arg3);
004c8fe5      else
004c8fe5      {
004c8fe9          void* eax = operator new(0x4c);
004c8ff3          class HouseProfile* eax_1;
004c8ff3          
004c8ff3          if (eax == 0)
004c9003              eax_1 = nullptr;
004c8ff3          else
004c8ffc              eax_1 = HouseProfile::HouseProfile(eax, arg3);
004c8ffc          
004c9007          this->m_pHouseProfile = eax_1;
004c9007          
004c900d          if (eax_1 == 0)
004c900d          {
004c900f              eax_1 = 0;
004c9012              return 0;
004c900d          }
004c8fe5      }
004c8fe5      
004c9021      gmSlumlordUI::BackupHouseProfile(this);
004c9028      gmSlumlordUI::RefreshHouse(this);
004c902d      int32_t eax_2;
004c902d      eax_2 = 1;
004c9030      return 1;
004c8fd0  }

004c9033                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c9040  void __thiscall gmSlumlordUI::RecvNotice_UpdateHouseProfile(class gmSlumlordUI* this, uint32_t arg2, class HouseProfile const* arg3)

004c9040  {
004c9056      gmSlumlordUI::UpdateHouse(((char*)this - 0x6e0), arg2, arg3);
004c9061      *(uint32_t*)(*(int32_t*)((char*)this + -0x6e0) + 0x18)(1);
004c906c      class HashSet<UIElement *>* eax_1;
004c906c      
004c906c      if (this == 0x6e0)
004c9073          eax_1 = nullptr;
004c906c      else
004c906e          eax_1 = &this->m_hashElementsRegisteredWith;
004c906e      
004c908a      int32_t var_c_1 = 0;
004c908e      int32_t var_14 = 0x3ff00000;
004c90a3      CPlayerSystem::RegisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), eax_1, this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0], ((double)((long double)9f)), 1, 0, 0f, 0f);
004c9040  }

004c90ad                                         90 90 90                                                               ...

004c90b0  uint8_t __fastcall gmSlumlordUI::MakeBuyHouseConfirmationDialog(class gmSlumlordUI* this)

004c90b0  {
004c90c4      if (this->m_uiHousePurchaseDialogContext != 0)
004c90c4      {
004c90c7          uint32_t eax;
004c90c7          eax = 0;
004c90d0          return 0;
004c90c4      }
004c90c4      
004c90d9      void var_90;
004c90d9      StringInfo::StringInfo(&var_90);
004c90e7      uint32_t var_10c;
004c90e7      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10c, &gmSlumlordUI::`vftable'.RecvNotice_SelectionChanged);
004c90fa      StringInfo::SetLiteralValue(&var_90, &var_10c, 1);
004c9103      int32_t* esi_1 = (var_10c - 0x14);
004c9103      
004c9116      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004c911e          **(uint32_t**)esi_1(1);
004c911e      
004c9124      void var_108;
004c9124      PropertyCollection::PropertyCollection(&var_108);
004c9132      int32_t* var_114 = nullptr;
004c9136      int32_t* var_110 = nullptr;
004c913a      BaseProperty::SetPropertyName(&var_114, 0x8e);
004c913a      
004c9143      if (var_110 != 0)
004c9143      {
004c9149          BaseProperty::CheckCopyOnWrite(&var_114);
004c9156          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(1);
004c9143      }
004c9143      
004c9173      var_10c = BaseProperty::GetPropertyName(&var_114);
004c9177      void var_104;
004c9177      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004c9185      BaseProperty::SetPropertyName(&var_114, 0xc5);
004c9185      
004c918e      if (var_110 != 0)
004c918e      {
004c9194          BaseProperty::CheckCopyOnWrite(&var_114);
004c91a7          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
004c918e      }
004c918e      
004c91b6      var_10c = BaseProperty::GetPropertyName(&var_114);
004c91c8      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004c91d2      uint32_t eax_6 = DialogFactory::MakeDialogInCurrentUI(&var_108);
004c91da      this->m_uiHousePurchaseDialogContext = eax_6;
004c91e2      int32_t* eax_7 = var_114;
004c91e2      
004c91e6      if (eax_6 == 0)
004c91e6      {
004c924d          if (eax_7 != 0)
004c924d          {
004c9257              int32_t esi_7 = (eax_7[1] - 1);
004c9254              eax_7[1] = esi_7;
004c9254              
004c925e              if (esi_7 == 0)
004c9264                  **(uint32_t**)eax_7(1);
004c9264              
004c9266              var_114 = nullptr;
004c924d          }
004c924d          
004c9270          if (var_110 != 0)
004c9270          {
004c927a              int32_t esi_9 = (var_110[1] - 1);
004c9277              var_110[1] = esi_9;
004c9277              
004c9281              if (esi_9 == 0)
004c9287                  **(uint32_t**)var_110(1);
004c9287              
004c9289              int32_t var_110_2 = 0;
004c9270          }
004c9270          
004c9291          PropertyCollection::~PropertyCollection(&var_108);
004c929d          StringInfo::~StringInfo(&var_90);
004c92a4          int32_t eax_17;
004c92a4          eax_17 = 0;
004c92ad          return 0;
004c91e6      }
004c91e6      
004c91ea      if (eax_7 != 0)
004c91ea      {
004c91f4          int32_t esi_3 = (eax_7[1] - 1);
004c91f1          eax_7[1] = esi_3;
004c91f1          
004c91fb          if (esi_3 == 0)
004c9201              **(uint32_t**)eax_7(1);
004c9201          
004c9203          var_114 = nullptr;
004c91ea      }
004c91ea      
004c920d      if (var_110 != 0)
004c920d      {
004c9217          int32_t esi_5 = (var_110[1] - 1);
004c9214          var_110[1] = esi_5;
004c9214          
004c921e          if (esi_5 == 0)
004c9224              **(uint32_t**)var_110(1);
004c9224          
004c9226          int32_t var_110_1 = 0;
004c920d      }
004c920d      
004c922e      PropertyCollection::~PropertyCollection(&var_108);
004c923a      StringInfo::~StringInfo(&var_90);
004c9241      int32_t eax_12;
004c9241      eax_12 = 1;
004c924a      return 1;
004c90b0  }

004c92ae                                            90 90                                                                ..

004c92b0  uint8_t __fastcall gmSlumlordUI::MakeRentPaymentByProxyConfirmationDialog(class gmSlumlordUI* this)

004c92b0  {
004c92c4      if (this->m_uiRentPaymentByProxyDialogContext != 0)
004c92c4      {
004c92c7          uint32_t eax;
004c92c7          eax = 0;
004c92d0          return 0;
004c92c4      }
004c92c4      
004c92d9      void var_90;
004c92d9      StringInfo::StringInfo(&var_90);
004c92e7      uint32_t var_10c;
004c92e7      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10c, u"You are paying maintenance on so…");
004c92fa      StringInfo::SetLiteralValue(&var_90, &var_10c, 1);
004c9303      int32_t* esi_1 = (var_10c - 0x14);
004c9303      
004c9316      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004c931e          **(uint32_t**)esi_1(1);
004c931e      
004c9324      void var_108;
004c9324      PropertyCollection::PropertyCollection(&var_108);
004c9332      int32_t* var_114 = nullptr;
004c9336      int32_t* var_110 = nullptr;
004c933a      BaseProperty::SetPropertyName(&var_114, 0x8e);
004c933a      
004c9343      if (var_110 != 0)
004c9343      {
004c9349          BaseProperty::CheckCopyOnWrite(&var_114);
004c9356          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(1);
004c9343      }
004c9343      
004c9373      var_10c = BaseProperty::GetPropertyName(&var_114);
004c9377      void var_104;
004c9377      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004c9385      BaseProperty::SetPropertyName(&var_114, 0xc5);
004c9385      
004c938e      if (var_110 != 0)
004c938e      {
004c9394          BaseProperty::CheckCopyOnWrite(&var_114);
004c93a7          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
004c938e      }
004c938e      
004c93b6      var_10c = BaseProperty::GetPropertyName(&var_114);
004c93c8      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004c93d2      uint32_t eax_6 = DialogFactory::MakeDialogInCurrentUI(&var_108);
004c93da      this->m_uiRentPaymentByProxyDialogContext = eax_6;
004c93e2      int32_t* eax_7 = var_114;
004c93e2      
004c93e6      if (eax_6 == 0)
004c93e6      {
004c944d          if (eax_7 != 0)
004c944d          {
004c9457              int32_t esi_7 = (eax_7[1] - 1);
004c9454              eax_7[1] = esi_7;
004c9454              
004c945e              if (esi_7 == 0)
004c9464                  **(uint32_t**)eax_7(1);
004c9464              
004c9466              var_114 = nullptr;
004c944d          }
004c944d          
004c9470          if (var_110 != 0)
004c9470          {
004c947a              int32_t esi_9 = (var_110[1] - 1);
004c9477              var_110[1] = esi_9;
004c9477              
004c9481              if (esi_9 == 0)
004c9487                  **(uint32_t**)var_110(1);
004c9487              
004c9489              int32_t var_110_2 = 0;
004c9470          }
004c9470          
004c9491          PropertyCollection::~PropertyCollection(&var_108);
004c949d          StringInfo::~StringInfo(&var_90);
004c94a4          int32_t eax_17;
004c94a4          eax_17 = 0;
004c94ad          return 0;
004c93e6      }
004c93e6      
004c93ea      if (eax_7 != 0)
004c93ea      {
004c93f4          int32_t esi_3 = (eax_7[1] - 1);
004c93f1          eax_7[1] = esi_3;
004c93f1          
004c93fb          if (esi_3 == 0)
004c9401              **(uint32_t**)eax_7(1);
004c9401          
004c9403          var_114 = nullptr;
004c93ea      }
004c93ea      
004c940d      if (var_110 != 0)
004c940d      {
004c9417          int32_t esi_5 = (var_110[1] - 1);
004c9414          var_110[1] = esi_5;
004c9414          
004c941e          if (esi_5 == 0)
004c9424              **(uint32_t**)var_110(1);
004c9424          
004c9426          int32_t var_110_1 = 0;
004c940d      }
004c940d      
004c942e      PropertyCollection::~PropertyCollection(&var_108);
004c943a      StringInfo::~StringInfo(&var_90);
004c9441      int32_t eax_12;
004c9441      eax_12 = 1;
004c944a      return 1;
004c92b0  }

004c94ae                                            90 90                                                                ..

004c94b0  enum UIElementMessageListenResult __thiscall gmSlumlordUI::ListenToElementMessage(class gmSlumlordUI* this, struct UIElementMessageInfo const* arg2)

004c94b0  {
004c94b6      uint32_t idMessage = arg2->idMessage;
004c94b6      
004c94bc      if (idMessage == 1)
004c94bc      {
004c95bf          uint32_t idElement = arg2->idElement;
004c95bf          
004c95c6          if (idElement == 0x1000009e)
004c95c6          {
004c95c8              this->vtable->SetVisible(0);
004c95db              return UIElement_Panel::ListenToElementMessage(this, arg2);
004c95c6          }
004c95c6          
004c95e3          if (idElement == 0x10000094)
004c95e3          {
004c95e5              class HouseProfile* m_pHouseProfile = this->m_pHouseProfile;
004c95e5              
004c95f3              if ((m_pHouseProfile == 0 || m_pHouseProfile->_type != 4))
004c95f3              {
004c95f7                  gmSlumlordUI::MakeBuyHouseConfirmationDialog(this);
004c9606                  return UIElement_Panel::ListenToElementMessage(this, arg2);
004c95f3              }
004c95f3              
004c9631              gmSlumlordUI::MakePayment(this);
004c95e3          }
004c95e3          else if (idElement == 0x1000009b)
004c960e          {
004c9619              if (gmSlumlordUI::AmIHouseOwner(this) == 0)
004c9619              {
004c961d                  gmSlumlordUI::MakeRentPaymentByProxyConfirmationDialog(this);
004c962c                  return UIElement_Panel::ListenToElementMessage(this, arg2);
004c9619              }
004c9619              
004c9631              gmSlumlordUI::MakePayment(this);
004c960e          }
004c94bc      }
004c94bc      else if (idMessage == 0x15)
004c94c5      {
004c95a4          if (UIElement::IsAncestorOfMe(arg2->pElement, this->m_pCurItemList) != 0)
004c95ad              gmSlumlordUI::HandleDropRelease(this, arg2);
004c94c5      }
004c94c5      else if (idMessage == 0x18)
004c94ce      {
004c94de          uint32_t eax_3;
004c94de          eax_3 = arg2->dwParam1 != 0;
004c94de          
004c94e3          if (arg2->pElement == this)
004c94e3          {
004c94e7              gmSlumlordUI::CleanItemLists(this);
004c94ee              gmSlumlordUI::UpdateButtons(this);
004c94fd              return UIElement_Panel::ListenToElementMessage(this, arg2);
004c94e3          }
004c94e3          
004c9500          uint32_t idElement_1 = arg2->idElement;
004c9508          bool cond:1_1;
004c9508          
004c9508          if (idElement_1 == 0x10000090)
004c9508          {
004c950c              if (eax_3 == 0)
004c950c              {
004c9531                  cond:1_1 = this->m_eCurrentHouseOp != Buy_House;
004c950c                  goto label_4c9538;
004c950c              }
004c950c              
004c950e              class UIElement_ItemList* m_pBuyItemList = this->m_pBuyItemList;
004c9517              this->m_eCurrentHouseOp = Buy_House;
004c9521              this->m_pCurItemList = m_pBuyItemList;
004c952e              return UIElement_Panel::ListenToElementMessage(this, arg2);
004c9508          }
004c9508          
004c955d          if (idElement_1 == 0x10000097)
004c955d          {
004c9565              if (eax_3 != 0)
004c9565              {
004c956d                  this->m_pCurItemList = this->m_pRentItemList;
004c9576                  this->m_eCurrentHouseOp = Rent_House;
004c9587                  return UIElement_Panel::ListenToElementMessage(this, arg2);
004c9565              }
004c9565              
004c958a              cond:1_1 = this->m_eCurrentHouseOp != Rent_House;
004c9538          label_4c9538:
004c9538              
004c9538              if (!(cond:1_1))
004c9538              {
004c9541                  this->m_eCurrentHouseOp = Undef_HouseOp;
004c9547                  this->m_pCurItemList = nullptr;
004c9538              }
004c955d          }
004c94ce      }
004c94ce      
004c9640      return UIElement_Panel::ListenToElementMessage(this, arg2);
004c94b0  }

004c9643           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004c9650  void __fastcall gmSecureTradeUI::~gmSecureTradeUI(class gmSecureTradeUI* this)

004c9650  {
004c9654      class UIElement_ItemList* m_pSelfItemsList = this->m_pSelfItemsList;
004c9669      this->vtable = 0x7b72d0;
004c965d      this->vtable = &gmSecureTradeUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004c9663      this->vtable = &gmSecureTradeUI::`vftable';
004c967b      this->vtable = &gmSecureTradeUI::`vftable';
004c967b      
004c9685      if (m_pSelfItemsList != 0)
004c9687          UIElement_ItemList::UnregisterItemListDragHandler(m_pSelfItemsList);
004c9687      
004c9694      CPlayerSystem::UnregisterAllObjectRangeHandlers(CPlayerSystem::GetPlayerSystem(), &this->vtable);
004c9699      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
004c9699      
004c96a0      if (eax_1 != 0)
004c96a2          eax_1->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004c96a2      
004c965d      this->vtable = &gmUrgentAssistanceUI::`vftable';
004c96b2      NoticeHandler::~NoticeHandler(&this->vtable);
004c96bc      /* tailcall */
004c96bc      return UIElement_Field::~UIElement_Field(this);
004c9650  }

004c96c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004c96d0  class UIElement* __thiscall gmSecureTradeUI::DynamicCast(class gmSecureTradeUI* this, uint32_t arg2) __pure

004c96d0  {
004c96dc      if (arg2 == 0x10000012)
004c96e9          return this;
004c96e9      
004c96e3      int32_t edx_1;
004c96e3      edx_1 = arg2 != 3;
004c96e7      return (this & (edx_1 - 1));
004c96d0  }

004c96ec                                      90 90 90 90                                                              ....

004c96f0  uint32_t gmSecureTradeUI::GetUIElementType(class gmSecureTradeUI const* this @ ecx) __pure

004c96f0  {
004c96f5      return 0x10000012;
004c96f0  }

004c96f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c9700  void __fastcall gmSecureTradeUI::UpdateTradeButtonState(class gmSecureTradeUI* this)

004c9700  {
004c9719      if ((this->m_pTradeButton != 0 && this->m_pSelfItemsList != 0))
004c9719      {
004c971b          class UIElement_ItemList* m_pOtherItemsList = this->m_pOtherItemsList;
004c971b          
004c9723          if (m_pOtherItemsList != 0)
004c9723          {
004c9726              int32_t eax_2 = UIElement_ItemList::GetNumUIItems(m_pOtherItemsList);
004c9733              int32_t eax_3 = UIElement_ItemList::GetNumUIItems(this->m_pSelfItemsList);
004c9738              class UIElement_Button* m_pTradeButton = this->m_pTradeButton;
004c973e              int32_t edi_2 = (eax_2 + eax_3);
004c973e              
004c974b              if ((m_pTradeButton->m_state == 6 && edi_2 == 0))
004c974d                  m_pTradeButton->vtable->SetState(0xd);
004c974d              
004c9757              class UIElement_Button* m_pTradeButton_1 = this->m_pTradeButton;
004c9757              
004c9768              if ((m_pTradeButton_1->m_state == 1 && edi_2 == 0))
004c976a                  m_pTradeButton_1->vtable->SetState(0xd);
004c976a              
004c9774              class UIElement_Button* m_pTradeButton_2 = this->m_pTradeButton;
004c9774              
004c9785              if ((m_pTradeButton_2->m_state == 0xd && edi_2 > 0))
004c9787                  m_pTradeButton_2->vtable->SetState(1);
004c9723          }
004c9719      }
004c9700  }

004c9794                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c97a0  uint8_t __fastcall InterfacePtr<ClientObjMaintSystem>::IsValid(class InterfacePtr<ClientObjMaintSystem> const* this)

004c97a0  {
004c97aa      if ((this->m_pInterface != 0 && this->m_trStatus.m_val >= 0))
004c97b1          return 1;
004c97b1      
004c97b4      return 0;
004c97a0  }

004c97b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004c97c0  void __thiscall gmSecureTradeUI::gmSecureTradeUI(class gmSecureTradeUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004c97c0  {
004c97cf      UIElement_Field::UIElement_Field(this, arg2, arg3);
004c97d4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004c97de      this->vtable = &ObjectRangeHandler::`vftable';
004c97e8      this->vtable = &ItemListDragHandler::`vftable';
004c97f4      __builtin_memset(&this->m_pTradeButton, 0, 0x28);
004c9830      this->vtable = 0x7b72d0;
004c9836      this->vtable = &gmSecureTradeUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004c9840      this->vtable = &gmSecureTradeUI::`vftable';
004c984a      this->vtable = &gmSecureTradeUI::`vftable';
004c985a      this->splitItemStackSize = 0;
004c9860      this->splitItemClassID.id = INVALID_DID.id;
004c97c0  }

004c986c                                      90 90 90 90                                                              ....

004c9870  void* __thiscall gmSecureTradeUI::`scalar deleting destructor'(class gmSecureTradeUI* this, uint32_t arg2)

004c9870  {
004c9873      gmSecureTradeUI::~gmSecureTradeUI(this);
004c9873      
004c987d      if ((arg2 & 1) != 0)
004c9880          operator delete(this);
004c9880      
004c988b      return this;
004c9870  }

004c988e                                            90 90                                                                ..

004c9890  class UIElement* gmSecureTradeUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004c9890  {
004c9895      void* eax = operator new(0x634);
004c9895      
004c989f      if (eax == 0)
004c98b5          return 0;
004c98b5      
004c98b2      return gmSecureTradeUI::gmSecureTradeUI(eax, arg1, arg2);
004c9890  }

004c98b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004c98c0  void __fastcall gmSecureTradeUI::RecvNotice_ServerSaysAttemptFailed(class gmSecureTradeUI* this, uint32_t arg2)

004c98c0  {
004c98c0      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[9] = nullptr;
004c98c0  }

004c98ca                                90 90 90 90 90 90                                                            ......

004c98d0  void __fastcall gmSecureTradeUI::SetMyItemNumber(class gmSecureTradeUI* this)

004c98d0  {
004c98e1      if (this->m_pSelfTotalItemsLabel != 0)
004c98e1      {
004c98eb          void var_90;
004c98eb          StringInfo::StringInfo(&var_90);
004c98ff          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004c9915          int32_t eax_2;
004c9915          int32_t edx_1;
004c9915          edx_1 = HIGHD(((int64_t)UIElement_ItemList::GetNumUIItems(this->m_pSelfItemsList)));
004c9915          eax_2 = LOWD(((int64_t)UIElement_ItemList::GetNumUIItems(this->m_pSelfItemsList)));
004c9916          int32_t var_9c_1 = edx_1;
004c991d          StringInfo::AddVariable_Int(&var_90, 0, eax_2);
004c992d          void* __return;
004c992d          class PStringBase<unsigned short>* eax_3 = StringInfo::GetString(&var_90, &__return, 0);
004c9939          UIElement_Text::SetText(this->m_pSelfTotalItemsLabel, eax_3);
004c9942          int32_t* esi_2 = ((char*)__return - 0x14);
004c9942          
004c9955          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c995d              **(uint32_t**)esi_2(1);
004c995d          
004c9963          StringInfo::~StringInfo(&var_90);
004c98e1      }
004c98d0  }


004c9970  void __fastcall gmSecureTradeUI::SetOtherItemNumber(class gmSecureTradeUI* this)

004c9970  {
004c9981      if (this->m_pOtherItemsList != 0)
004c9981      {
004c998b          void var_90;
004c998b          StringInfo::StringInfo(&var_90);
004c999f          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004c99b5          int32_t eax_2;
004c99b5          int32_t edx_1;
004c99b5          edx_1 = HIGHD(((int64_t)UIElement_ItemList::GetNumUIItems(this->m_pOtherItemsList)));
004c99b5          eax_2 = LOWD(((int64_t)UIElement_ItemList::GetNumUIItems(this->m_pOtherItemsList)));
004c99b6          int32_t var_9c_1 = edx_1;
004c99bd          StringInfo::AddVariable_Int(&var_90, 0, eax_2);
004c99cd          void* __return;
004c99cd          class PStringBase<unsigned short>* eax_3 = StringInfo::GetString(&var_90, &__return, 0);
004c99d9          UIElement_Text::SetText(this->m_pOtherTotalItemsLabel, eax_3);
004c99e2          int32_t* esi_2 = ((char*)__return - 0x14);
004c99e2          
004c99f5          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c99fd              **(uint32_t**)esi_2(1);
004c99fd          
004c9a03          StringInfo::~StringInfo(&var_90);
004c9981      }
004c9970  }


004c9a10  void __fastcall gmSecureTradeUI::AcceptTheTrade(class gmSecureTradeUI* this)

004c9a10  {
004c9a1c      uint32_t eax_1 = ClientTradeSystem::GetNumSelfObjectsInTrade(ClientTradeSystem::GetTradeSystem());
004c9a2a      uint32_t eax_3 = ClientTradeSystem::GetNumPartnerObjectsInTrade(ClientTradeSystem::GetTradeSystem());
004c9a37      int32_t eax_4 = UIElement_ItemList::GetNumUIItems(this->m_pSelfItemsList);
004c9a3e      int32_t eax_5;
004c9a3e      
004c9a3e      if (eax_1 == eax_4)
004c9a46          eax_5 = UIElement_ItemList::GetNumUIItems(this->m_pOtherItemsList);
004c9a46      
004c9a4d      if ((eax_1 != eax_4 || eax_3 != eax_5))
004c9a64          ClientTradeSystem::NotifyServerThatTradeIsOutOfSync(ClientTradeSystem::GetTradeSystem());
004c9a4d      else
004c9a56          ClientTradeSystem::AcceptTrade(ClientTradeSystem::GetTradeSystem());
004c9a56      
004c9a69      class UIElement_Button* m_pTradeButton = this->m_pTradeButton;
004c9a69      
004c9a71      if (m_pTradeButton != 0)
004c9a73          m_pTradeButton->vtable->SetState(6);
004c9a73      
004c9a82      /* tailcall */
004c9a82      return gmSecureTradeUI::UpdateTradeButtonState(this);
004c9a10  }

004c9a87                       90 90 90 90 90 90 90 90 90                                                         .........

004c9a90  void __fastcall gmSecureTradeUI::DeclineTheTrade(class gmSecureTradeUI* this)

004c9a90  {
004c9a9a      ClientTradeSystem::DeclineTrade(ClientTradeSystem::GetTradeSystem());
004c9a9f      class UIElement_Button* m_pTradeButton = this->m_pTradeButton;
004c9a9f      
004c9aa7      if (m_pTradeButton != 0)
004c9aa9          m_pTradeButton->vtable->SetState(1);
004c9aa9      
004c9ab6      /* tailcall */
004c9ab6      return gmSecureTradeUI::UpdateTradeButtonState(this);
004c9a90  }

004c9abb                                                                                   90 90 90 90 90                             .....

004c9ac0  void __fastcall gmSecureTradeUI::FlushTradeLists(class gmSecureTradeUI* this)

004c9ac0  {
004c9ac3      class UIElement_ItemList* m_pSelfItemsList = this->m_pSelfItemsList;
004c9ac3      
004c9acd      if (m_pSelfItemsList != 0)
004c9acd      {
004c9acf          int32_t eax_1 = UIElement_ItemList::GetNumUIItems(m_pSelfItemsList);
004c9ad6          uint32_t esi_1 = 0;
004c9ad6          
004c9ada          if (eax_1 > 0)
004c9ada          {
004c9b22              do
004c9b22              {
004c9ae7                  class UIElement* eax_2 = UIElement_ListBox::GetItem(this->m_pSelfItemsList, esi_1);
004c9ae7                  
004c9aee                  if (eax_2 != 0)
004c9aee                  {
004c9af9                      void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004c9af9                      
004c9b01                      if (eax_3 != 0)
004c9b01                      {
004c9b0a                          class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(*(uint32_t*)((char*)eax_3 + 0x5fc));
004c9b0a                          
004c9b14                          if (eax_5 != 0)
004c9b1a                              ACCWeenieObject::SetTradeState(eax_5, 0);
004c9b01                      }
004c9aee                  }
004c9aee                  
004c9b1f                  esi_1 += 1;
004c9b22              } while (esi_1 < eax_1);
004c9ada          }
004c9ada          
004c9b2a          UIElement_ItemList::ItemList_Flush(this->m_pSelfItemsList);
004c9acd      }
004c9acd      
004c9b2f      class UIElement_ItemList* m_pOtherItemsList = this->m_pOtherItemsList;
004c9b2f      
004c9b37      if (m_pOtherItemsList == 0)
004c9bd2          return;
004c9bd2      
004c9b3e      int32_t eax_6 = UIElement_ItemList::GetNumUIItems(m_pOtherItemsList);
004c9b45      uint32_t edi_2 = 0;
004c9b45      
004c9b49      if (eax_6 > 0)
004c9b49      {
004c9bbe          do
004c9bbe          {
004c9b57              class UIElement* eax_7 = UIElement_ListBox::GetItem(this->m_pOtherItemsList, edi_2);
004c9b57              
004c9b5e              if (eax_7 != 0)
004c9b5e              {
004c9b69                  void* eax_8 = eax_7->vtable->DynamicCast(0x10000032);
004c9b69                  
004c9b71                  if (eax_8 != 0)
004c9b71                  {
004c9b7a                      class ACCWeenieObject* eax_10 = ClientObjMaintSystem::GetWeenieObject(*(uint32_t*)((char*)eax_8 + 0x5fc));
004c9b7a                      
004c9b86                      if ((((eax_10 != 0 && ClientTradeSystem::GetTradeSystem() != 0) && ClientTradeSystem::GetTradeSystem()->m_iidTradePartner != 0) && (ACCWeenieObject::IsOwnedByPlayer(eax_10) == 0 && (eax_10->pwd._location & 0x3f00000) == 0)))
004c9bb6                          ACCWeenieObject::AddContentsToDestructionQueue(eax_10);
004c9b71                  }
004c9b5e              }
004c9b5e              
004c9bbb              edi_2 += 1;
004c9bbe          } while (edi_2 < eax_6);
004c9b49      }
004c9b49      
004c9bca      /* tailcall */
004c9bca      return UIElement_ItemList::ItemList_Flush(this->m_pOtherItemsList);
004c9ac0  }

004c9b4d                                         8d 49 00                                                               .I.
004c9bd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c9be0  void __thiscall gmSecureTradeUI::RemoveItem(class gmSecureTradeUI* this, class ACCWeenieObject* arg2)

004c9be0  {
004c9bf8      if ((this->m_pSelfItemsList != 0 && arg2 != 0))
004c9bf8      {
004c9bfe          arg2->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004c9bfe          
004c9c1f          if (UIElement_ItemList::ItemList_IsInList(this->m_pSelfItemsList, arg2->id) != 0)
004c9c1f          {
004c9c25              ACCWeenieObject::SetTradeState(arg2, 0);
004c9c34              UIElement_ItemList::ItemList_DeleteItem(this->m_pSelfItemsList, arg2->id);
004c9c3b              gmSecureTradeUI::SetMyItemNumber(this);
004c9c42              gmSecureTradeUI::UpdateTradeButtonState(this);
004c9c49              return;
004c9c1f          }
004c9c1f          
004c9c5d          if (UIElement_ItemList::ItemList_IsInList(this->m_pOtherItemsList, arg2->id) != 0)
004c9c5d          {
004c9c69              UIElement_ItemList::ItemList_DeleteItem(this->m_pOtherItemsList, arg2->id);
004c9c70              gmSecureTradeUI::SetOtherItemNumber(this);
004c9c77              gmSecureTradeUI::UpdateTradeButtonState(this);
004c9c77              
004c9c83              if (((ClientTradeSystem::GetTradeSystem() != 0 && ClientTradeSystem::GetTradeSystem()->m_iidTradePartner != 0) && (ACCWeenieObject::IsOwnedByPlayer(arg2) == 0 && (arg2->pwd._location & 0x3f00000) == 0)))
004c9caa                  ACCWeenieObject::AddContentsToDestructionQueue(arg2);
004c9c5d          }
004c9bf8      }
004c9be0  }

004c9cb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004c9cc0  void gmSecureTradeUI::Register()

004c9cc0  {
004c9cca      UIElement::RegisterElementClass(0x10000012, gmSecureTradeUI::Create);
004c9cc0  }

004c9cd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004c9ce0  void __thiscall gmSecureTradeUI::RecvNotice_AcceptTrade(class gmSecureTradeUI* this, uint32_t arg2)

004c9ce0  {
004c9ce7      void* __offset(gmSecureTradeUI, -0x5f8) esi_1;
004c9ce7      
004c9ce7      if (arg2 == 0)
004c9ce7      {
004c9ce9          esi_1 = ((char*)this - 0x5f8);
004c9cef          class HashSetData<UIElement *>* ecx = ADJ(esi_1)->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0];
004c9cef          
004c9cf7          if (ecx != 0)
004c9cf7          {
004c9cf9              ecx->m_hashKey->m_alphaImage(1);
004c9d05              gmSecureTradeUI::UpdateTradeButtonState(esi_1);
004c9d0b              return;
004c9cf7          }
004c9cf7          
004c9d59          gmSecureTradeUI::UpdateTradeButtonState(esi_1);
004c9d59          return;
004c9ce7      }
004c9ce7      
004c9d0e      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004c9d15      uint32_t player_id;
004c9d15      
004c9d15      if (SmartBox::smartbox_1 == 0)
004c9d1f          player_id = 0;
004c9d15      else
004c9d17          player_id = SmartBox::smartbox_1->player_id;
004c9d17      
004c9d23      if (arg2 == player_id)
004c9d23      {
004c9d3d          esi_1 = ((char*)this - 0x5f8);
004c9d43          class HashSetData<UIElement *>* ecx_3 = ADJ(esi_1)->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0];
004c9d43          
004c9d4b          if (ecx_3 != 0)
004c9d4d              ecx_3->m_hashKey->m_alphaImage(6);
004c9d4d          
004c9d59          gmSecureTradeUI::UpdateTradeButtonState(esi_1);
004c9d23      }
004c9d23      else
004c9d23      {
004c9d25          class HashSetData<UIElement *>* ecx_2 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4];
004c9d25          
004c9d2a          if (ecx_2 != 0)
004c9d2a          {
004c9d2f              arg2 = 6;
004c9d37              /* jump -> ecx_2->m_hashKey->m_alphaImage */
004c9d2a          }
004c9d23      }
004c9ce0  }

004c9d62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004c9d70  void __thiscall gmSecureTradeUI::RecvNotice_DeclineTrade(class gmSecureTradeUI* this, uint32_t arg2)

004c9d70  {
004c9d70      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004c9d77      uint32_t player_id;
004c9d77      
004c9d77      if (SmartBox::smartbox_1 == 0)
004c9d81          player_id = 0;
004c9d77      else
004c9d79          player_id = SmartBox::smartbox_1->player_id;
004c9d79      
004c9d87      if (arg2 != player_id)
004c9d87      {
004c9daf          class HashSetData<UIElement *>* ecx_2 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4];
004c9daf          
004c9db4          if (ecx_2 != 0)
004c9db4          {
004c9db8              arg2 = 0xd;
004c9dc0              /* jump -> ecx_2->m_hashKey->m_alphaImage */
004c9db4          }
004c9d87      }
004c9d87      else
004c9d87      {
004c9d90          class HashSetData<UIElement *>* ecx = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0];
004c9d90          
004c9d98          if (ecx != 0)
004c9d9a              ecx->m_hashKey->m_alphaImage(1);
004c9d9a          
004c9da6          gmSecureTradeUI::UpdateTradeButtonState(((char*)this - 0x5f8));
004c9d87      }
004c9d70  }

004c9dc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004c9dd0  void __fastcall gmSecureTradeUI::SetTradePartner(class gmSecureTradeUI* this, uint32_t arg2)

004c9dd0  {
004c9dd0      class gmSecureTradeUI* var_4 = this;
004c9dd0      
004c9ddc      if (this->m_pOtherPlayerName != 0)
004c9ddc      {
004c9de2          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004c9de8          var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004c9df1          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004c9df7          uint32_t eax_2 = arg2;
004c9df7          
004c9e03          if (eax_2 != 0)
004c9e03          {
004c9e1c              PStringBase<unsigned short>::operator=(&var_4, ACCWeenieObject::GetObjectNameWide(&arg2, eax_2, NAME_APPROPRIATE, 0));
004c9e25              int32_t* esi_2 = (arg2 - 0x14);
004c9e25              
004c9e34              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004c9e3c                  **(uint32_t**)esi_2(1);
004c9e03          }
004c9e03          
004c9e49          UIElement_Text::SetText(this->m_pOtherPlayerName, &var_4);
004c9e52          void* __offset(gmSecureTradeUI, -0x14) esi_4 = ((char*)var_4 - 0x14);
004c9e52          
004c9e61          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004c9e69              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004c9ddc      }
004c9dd0  }

004c9e72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004c9e80  uint8_t __thiscall gmSecureTradeUI::AddMyItem(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3)

004c9e80  {
004c9e8b      if (this->m_pSelfItemsList == 0)
004c9e8b      {
004c9e8d          class UIElement_ItemList* eax;
004c9e8d          eax = 0;
004c9e90          return 0;
004c9e8b      }
004c9e8b      
004c9e93      class UIElement_Button* m_pTradeButton = this->m_pTradeButton;
004c9e93      
004c9e9b      if (m_pTradeButton != 0)
004c9e9d          m_pTradeButton->vtable->SetState(1);
004c9e9d      
004c9ea9      gmSecureTradeUI::UpdateTradeButtonState(this);
004c9eae      class UIElement* m_pOtherTradeStatusIndicator = this->m_pOtherTradeStatusIndicator;
004c9eae      
004c9eb6      if (m_pOtherTradeStatusIndicator != 0)
004c9eb8          m_pOtherTradeStatusIndicator->vtable->SetState(0xd);
004c9eb8      
004c9ece      class UIElement_UIItem* eax_2 = UIElement_ItemList::ItemList_GetItem(this->m_pSelfItemsList, arg2);
004c9ece      
004c9ed5      if (eax_2 != 0)
004c9ed5      {
004c9edb          UIElement_UIItem::SetWaitingState(eax_2, 0);
004c9ee1          int32_t eax_3;
004c9ee1          eax_3 = 1;
004c9ee4          return 1;
004c9ed5      }
004c9ed5      
004c9ee8      class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(arg2);
004c9ee8      
004c9ef2      if (eax_4 != 0)
004c9ef8          ACCWeenieObject::SetTradeState(eax_4, 1);
004c9ef8      
004c9f09      UIElement_ItemList::ItemList_InsertItem(this->m_pSelfItemsList, arg2, arg3);
004c9f10      gmSecureTradeUI::SetMyItemNumber(this);
004c9f17      gmSecureTradeUI::UpdateTradeButtonState(this);
004c9f1d      int32_t eax_6;
004c9f1d      eax_6 = 1;
004c9f20      return 1;
004c9e80  }

004c9f23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004c9f30  uint8_t __thiscall gmSecureTradeUI::AddPartnerItem(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3)

004c9f30  {
004c9f3b      if (this->m_pOtherItemsList == 0)
004c9f3b      {
004c9f3d          class UIElement_ItemList* eax;
004c9f3d          eax = 0;
004c9f40          return 0;
004c9f3b      }
004c9f3b      
004c9f43      class UIElement_Button* m_pTradeButton = this->m_pTradeButton;
004c9f43      
004c9f4b      if (m_pTradeButton != 0)
004c9f4d          m_pTradeButton->vtable->SetState(1);
004c9f4d      
004c9f59      gmSecureTradeUI::UpdateTradeButtonState(this);
004c9f5e      class UIElement* m_pOtherTradeStatusIndicator = this->m_pOtherTradeStatusIndicator;
004c9f5e      
004c9f66      if (m_pOtherTradeStatusIndicator != 0)
004c9f68          m_pOtherTradeStatusIndicator->vtable->SetState(0xd);
004c9f68      
004c9f7e      class UIElement_UIItem* eax_2 = UIElement_ItemList::ItemList_GetItem(this->m_pOtherItemsList, arg2);
004c9f7e      
004c9f85      if (eax_2 != 0)
004c9f85      {
004c9f8b          UIElement_UIItem::SetWaitingState(eax_2, 0);
004c9f91          int32_t eax_3;
004c9f91          eax_3 = 1;
004c9f94          return 1;
004c9f85      }
004c9f85      
004c9fa3      UIElement_ItemList::ItemList_InsertItem(this->m_pOtherItemsList, arg2, arg3);
004c9faa      gmSecureTradeUI::SetOtherItemNumber(this);
004c9fb1      gmSecureTradeUI::UpdateTradeButtonState(this);
004c9fb7      int32_t eax_5;
004c9fb7      eax_5 = 1;
004c9fba      return 1;
004c9f30  }

004c9fbd                                                                                         90 90 90                               ...

004c9fc0  uint8_t __thiscall gmSecureTradeUI::RemoveAddedItem(class gmSecureTradeUI* this, uint32_t arg2)

004c9fc0  {
004c9fcb      if (this->m_pSelfItemsList == 0)
004c9fcb      {
004c9fcd          class UIElement_ItemList* eax;
004c9fcd          eax = 0;
004c9fd0          return 0;
004c9fcb      }
004c9fcb      
004c9fd3      class UIElement_Button* m_pTradeButton = this->m_pTradeButton;
004c9fd3      
004c9fdb      if (m_pTradeButton != 0)
004c9fdd          m_pTradeButton->vtable->SetState(1);
004c9fdd      
004c9fe9      gmSecureTradeUI::UpdateTradeButtonState(this);
004c9fee      class UIElement* m_pOtherTradeStatusIndicator = this->m_pOtherTradeStatusIndicator;
004c9fee      
004c9ff6      if (m_pOtherTradeStatusIndicator != 0)
004c9ff8          m_pOtherTradeStatusIndicator->vtable->SetState(0xd);
004c9ff8      
004ca00e      class UIElement_UIItem* eax_3 = UIElement_ItemList::ItemList_GetItem(this->m_pSelfItemsList, arg2);
004ca00e      
004ca015      if (eax_3 != 0)
004ca015      {
004ca020          eax_3 = eax_3->vtable->DynamicCast(0x10000032);
004ca020          
004ca02a          if (eax_3 != 0)
004ca02a          {
004ca037              UIElement_UIItem::SetWaitingState(eax_3, 0);
004ca045              gmSecureTradeUI::RemoveItem(this, eax_3->weenObj);
004ca04c              gmSecureTradeUI::SetMyItemNumber(this);
004ca053              gmSecureTradeUI::UpdateTradeButtonState(this);
004ca059              int32_t eax_5;
004ca059              eax_5 = 1;
004ca05c              return 1;
004ca02a          }
004ca015      }
004ca015      
004ca02d      eax_3 = 0;
004ca030      return 0;
004c9fc0  }

004ca05f                                                                                               90                                 .

004ca060  uint8_t __thiscall gmSecureTradeUI::RemovePartnerItem(class gmSecureTradeUI* this, uint32_t arg2)

004ca060  {
004ca06b      if (this->m_pOtherItemsList == 0)
004ca06b      {
004ca06d          class UIElement_ItemList* eax;
004ca06d          eax = 0;
004ca070          return 0;
004ca06b      }
004ca06b      
004ca073      class UIElement_Button* m_pTradeButton = this->m_pTradeButton;
004ca073      
004ca07b      if (m_pTradeButton != 0)
004ca07d          m_pTradeButton->vtable->SetState(1);
004ca07d      
004ca089      gmSecureTradeUI::UpdateTradeButtonState(this);
004ca08e      class UIElement* m_pOtherTradeStatusIndicator = this->m_pOtherTradeStatusIndicator;
004ca08e      
004ca096      if (m_pOtherTradeStatusIndicator != 0)
004ca098          m_pOtherTradeStatusIndicator->vtable->SetState(0xd);
004ca098      
004ca0ae      class UIElement_UIItem* eax_3 = UIElement_ItemList::ItemList_GetItem(this->m_pOtherItemsList, arg2);
004ca0ae      
004ca0b5      if (eax_3 != 0)
004ca0b5      {
004ca0c0          eax_3 = eax_3->vtable->DynamicCast(0x10000032);
004ca0c0          
004ca0ca          if (eax_3 != 0)
004ca0ca          {
004ca0d7              UIElement_UIItem::SetWaitingState(eax_3, 0);
004ca0e5              gmSecureTradeUI::RemoveItem(this, eax_3->weenObj);
004ca0ec              gmSecureTradeUI::SetOtherItemNumber(this);
004ca0f3              gmSecureTradeUI::UpdateTradeButtonState(this);
004ca0f9              int32_t eax_5;
004ca0f9              eax_5 = 1;
004ca0fc              return 1;
004ca0ca          }
004ca0b5      }
004ca0b5      
004ca0cd      eax_3 = 0;
004ca0d0      return 0;
004ca060  }

004ca0ff                                                                                               90                                 .

004ca100  void __fastcall gmSecureTradeUI::Reset(class gmSecureTradeUI* this)

004ca100  {
004ca10e      if ((((int8_t)(this->__inner23 >> 0x11)) & 1) == 0)
004ca15b          return;
004ca15b      
004ca110      class ClientTradeSystem* m_iidTradePartner = ClientTradeSystem::GetTradeSystem();
004ca110      
004ca117      if (m_iidTradePartner != 0)
004ca11e          m_iidTradePartner = ClientTradeSystem::GetTradeSystem()->m_iidTradePartner;
004ca11e      
004ca121      class ClientTradeSystem* m_iidTradePartner_1 = m_iidTradePartner;
004ca124      uint32_t edx;
004ca124      gmSecureTradeUI::SetTradePartner(this, edx);
004ca129      class UIElement* m_pOtherTradeStatusIndicator = this->m_pOtherTradeStatusIndicator;
004ca129      
004ca131      if (m_pOtherTradeStatusIndicator != 0)
004ca133          m_pOtherTradeStatusIndicator->vtable->SetState(0xd);
004ca133      
004ca13f      gmSecureTradeUI::FlushTradeLists(this);
004ca146      gmSecureTradeUI::SetMyItemNumber(this);
004ca14d      gmSecureTradeUI::SetOtherItemNumber(this);
004ca155      /* tailcall */
004ca155      return gmSecureTradeUI::UpdateTradeButtonState(this);
004ca100  }

004ca15c                                                                                      90 90 90 90                              ....

004ca160  void __fastcall gmSecureTradeUI::PostInit(class gmSecureTradeUI* this)

004ca160  {
004ca164      UIElement::PostInit(this);
004ca169      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ca169      
004ca172      if (eax != 0)
004ca172      {
004ca17a          struct gmNoticeHandler::VTable** eax_1;
004ca17a          
004ca17a          if (this == 0)
004ca184              eax_1 = nullptr;
004ca17a          else
004ca17c              eax_1 = &this->vtable;
004ca17c          
004ca186          eax->vtable->RegisterNoticeHandler(0x4dd231, eax_1);
004ca195          struct gmNoticeHandler::VTable** eax_2;
004ca195          
004ca195          if (this == 0)
004ca19f              eax_2 = nullptr;
004ca195          else
004ca197              eax_2 = &this->vtable;
004ca197          
004ca1a1          eax->vtable->RegisterNoticeHandler(0x4dd236, eax_2);
004ca1b0          struct gmNoticeHandler::VTable** eax_3;
004ca1b0          
004ca1b0          if (this == 0)
004ca1ba              eax_3 = nullptr;
004ca1b0          else
004ca1b2              eax_3 = &this->vtable;
004ca1b2          
004ca1bc          eax->vtable->RegisterNoticeHandler(0x4dd233, eax_3);
004ca1cb          struct gmNoticeHandler::VTable** eax_4;
004ca1cb          
004ca1cb          if (this == 0)
004ca1d5              eax_4 = nullptr;
004ca1cb          else
004ca1cd              eax_4 = &this->vtable;
004ca1cd          
004ca1d7          eax->vtable->RegisterNoticeHandler(0x4dd235, eax_4);
004ca1e6          struct gmNoticeHandler::VTable** eax_5;
004ca1e6          
004ca1e6          if (this == 0)
004ca1f0              eax_5 = nullptr;
004ca1e6          else
004ca1e8              eax_5 = &this->vtable;
004ca1e8          
004ca1f2          eax->vtable->RegisterNoticeHandler(0x4dd238, eax_5);
004ca201          struct gmNoticeHandler::VTable** eax_6;
004ca201          
004ca201          if (this == 0)
004ca20b              eax_6 = nullptr;
004ca201          else
004ca203              eax_6 = &this->vtable;
004ca203          
004ca20d          eax->vtable->RegisterNoticeHandler(gmKeyboardUI::ListenToElementMessage, eax_6);
004ca21c          struct gmNoticeHandler::VTable** eax_7;
004ca21c          
004ca21c          if (this == 0)
004ca226              eax_7 = nullptr;
004ca21c          else
004ca21e              eax_7 = &this->vtable;
004ca21e          
004ca228          eax->vtable->RegisterNoticeHandler(0x4dd239, eax_7);
004ca237          struct gmNoticeHandler::VTable** eax_8;
004ca237          
004ca237          if (this == 0)
004ca241              eax_8 = nullptr;
004ca237          else
004ca239              eax_8 = &this->vtable;
004ca239          
004ca243          eax->vtable->RegisterNoticeHandler(0x4dd237, eax_8);
004ca252          struct gmNoticeHandler::VTable** eax_9;
004ca252          
004ca252          if (this == 0)
004ca25c              eax_9 = nullptr;
004ca252          else
004ca254              eax_9 = &this->vtable;
004ca254          
004ca25e          eax->vtable->RegisterNoticeHandler(0x4dd234, eax_9);
004ca26d          struct gmNoticeHandler::VTable** eax_10;
004ca26d          
004ca26d          if (this == 0)
004ca277              eax_10 = nullptr;
004ca26d          else
004ca26f              eax_10 = &this->vtable;
004ca26f          
004ca279          eax->vtable->RegisterNoticeHandler(0x4dd232, eax_10);
004ca288          struct gmNoticeHandler::VTable** eax_11;
004ca288          
004ca288          if (this == 0)
004ca292              eax_11 = nullptr;
004ca288          else
004ca28a              eax_11 = &this->vtable;
004ca28a          
004ca294          eax->vtable->RegisterNoticeHandler(0x4dd23a, eax_11);
004ca2a3          struct gmNoticeHandler::VTable** eax_12;
004ca2a3          
004ca2a3          if (this == 0)
004ca2ad              eax_12 = nullptr;
004ca2a3          else
004ca2a5              eax_12 = &this->vtable;
004ca2a5          
004ca2af          eax->vtable->RegisterNoticeHandler(0x186a8, eax_12);
004ca2be          struct gmNoticeHandler::VTable** eax_13;
004ca2be          
004ca2be          if (this == 0)
004ca2c8              eax_13 = nullptr;
004ca2be          else
004ca2c0              eax_13 = &this->vtable;
004ca2c0          
004ca2ca          eax->vtable->RegisterNoticeHandler(0x186a9, eax_13);
004ca2d9          struct gmNoticeHandler::VTable** eax_14;
004ca2d9          
004ca2d9          if (this == 0)
004ca2e3              eax_14 = nullptr;
004ca2d9          else
004ca2db              eax_14 = &this->vtable;
004ca2db          
004ca2e5          eax->vtable->RegisterNoticeHandler(0x186ab, eax_14);
004ca172      }
004ca172      
004ca2f9      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x10000086);
004ca300      class UIElement_Button* eax_16;
004ca300      
004ca300      if (eax_15 == 0)
004ca310          eax_16 = nullptr;
004ca300      else
004ca308          eax_16 = eax_15->vtable->DynamicCast(1);
004ca308      
004ca319      this->m_pTradeButton = eax_16;
004ca31f      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x10000085);
004ca326      class UIElement_Text* eax_18;
004ca326      
004ca326      if (eax_17 == 0)
004ca336          eax_18 = nullptr;
004ca326      else
004ca32e          eax_18 = eax_17->vtable->DynamicCast(0xc);
004ca32e      
004ca33f      this->m_pSelfPlayerName = eax_18;
004ca345      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x10000087);
004ca34c      class UIElement_Text* eax_20;
004ca34c      
004ca34c      if (eax_19 == 0)
004ca35c          eax_20 = nullptr;
004ca34c      else
004ca354          eax_20 = eax_19->vtable->DynamicCast(0xc);
004ca354      
004ca365      this->m_pSelfTotalItemsLabel = eax_20;
004ca36b      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x10000088);
004ca372      class UIElement_ItemList* eax_22;
004ca372      
004ca372      if (eax_21 == 0)
004ca385          eax_22 = nullptr;
004ca372      else
004ca37d          eax_22 = eax_21->vtable->DynamicCast(0x10000031);
004ca37d      
004ca389      this->m_pSelfItemsList = eax_22;
004ca389      
004ca38f      if (eax_22 != 0)
004ca39a          UIElement_ItemList::RegisterItemListDragHandler(eax_22, &this->vtable);
004ca39a      
004ca3b2      this->m_pOtherTradeStatusIndicator = UIElement::GetChildRecursive(this, 0x1000007f);
004ca3b8      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x1000007e);
004ca3bf      class UIElement_Text* eax_25;
004ca3bf      
004ca3bf      if (eax_24 == 0)
004ca3cf          eax_25 = nullptr;
004ca3bf      else
004ca3c7          eax_25 = eax_24->vtable->DynamicCast(0xc);
004ca3c7      
004ca3d8      this->m_pOtherPlayerName = eax_25;
004ca3de      class UIElement* eax_26 = UIElement::GetChildRecursive(this, 0x10000080);
004ca3e5      class UIElement_Text* eax_27;
004ca3e5      
004ca3e5      if (eax_26 == 0)
004ca3f5          eax_27 = nullptr;
004ca3e5      else
004ca3ed          eax_27 = eax_26->vtable->DynamicCast(0xc);
004ca3ed      
004ca3fe      this->m_pOtherTotalItemsLabel = eax_27;
004ca404      class UIElement* eax_28 = UIElement::GetChildRecursive(this, 0x10000081);
004ca40b      class UIElement_ItemList* eax_29;
004ca40b      
004ca40b      if (eax_28 == 0)
004ca41e          eax_29 = nullptr;
004ca40b      else
004ca416          eax_29 = eax_28->vtable->DynamicCast(0x10000031);
004ca416      
004ca427      this->m_pOtherItemsList = eax_29;
004ca42d      class UIElement* eax_30 = UIElement::GetChildRecursive(this, 0x1000008a);
004ca42d      
004ca434      if (eax_30 != 0)
004ca434      {
004ca443          this->m_pClearAllItemsButton = eax_30->vtable->DynamicCast(1);
004ca44c          /* tailcall */
004ca44c          return gmSecureTradeUI::Reset(this);
004ca434      }
004ca434      
004ca454      this->m_pClearAllItemsButton = nullptr;
004ca45d      /* tailcall */
004ca45d      return gmSecureTradeUI::Reset(this);
004ca160  }

004ca462        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004ca470  void __thiscall gmSecureTradeUI::OnVisibilityChanged(class gmSecureTradeUI* this, uint8_t arg2)

004ca470  {
004ca479      UIElement::OnVisibilityChanged(this, arg2);
004ca479      
004ca48d      if (((((int8_t)(this->__inner23 >> 0x11)) & 1) != 0 && arg2 == 0))
004ca48d      {
004ca49d          CPlayerSystem::UnregisterAllObjectRangeHandlers(CPlayerSystem::GetPlayerSystem(), &this->vtable);
004ca4a9          ClientTradeSystem::CloseTradeNegotiations(ClientTradeSystem::GetTradeSystem());
004ca4b0          gmSecureTradeUI::Reset(this);
004ca48d      }
004ca470  }

004ca4ba                                                                                90 90 90 90 90 90                            ......

004ca4c0  void __thiscall gmSecureTradeUI::OnObjectRangeExit(class gmSecureTradeUI* this, uint32_t arg2)

004ca4c0  {
004ca4c3      class ClientTradeSystem* m_iidTradePartner = ClientTradeSystem::GetTradeSystem();
004ca4c3      
004ca4ca      if (m_iidTradePartner != 0)
004ca4d1          m_iidTradePartner = ClientTradeSystem::GetTradeSystem()->m_iidTradePartner;
004ca4d1      
004ca4d8      if (arg2 == m_iidTradePartner)
004ca4d8      {
004ca4e1          ClientTradeSystem::CloseTradeNegotiations(ClientTradeSystem::GetTradeSystem());
004ca4ec          gmSecureTradeUI::Reset(((char*)this - 0x5fc));
004ca4d8      }
004ca4c0  }

004ca4f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004ca500  void __thiscall gmSecureTradeUI::RecvNotice_AddItemToTrade(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

004ca500  {
004ca507      if (arg3 == 2)
004ca507      {
004ca519          gmSecureTradeUI::AddPartnerItem(((char*)this - 0x5f8), arg2, arg4);
004ca51e          return;
004ca507      }
004ca507      
004ca524      if (arg3 == 1)
004ca536          gmSecureTradeUI::AddMyItem(((char*)this - 0x5f8), arg2, arg4);
004ca500  }

004ca53e                                                                                            90 90                                ..

004ca540  void __fastcall gmSecureTradeUI::RecvNotice_ClearTradeAcceptance(class gmSecureTradeUI* this)

004ca540  {
004ca546      /* tailcall */
004ca546      return gmSecureTradeUI::Reset(((char*)this - 0x5f8));
004ca540  }

004ca54b                                   90 90 90 90 90                                                             .....

004ca550  void __fastcall gmSecureTradeUI::RecvNotice_CloseTrade(class gmSecureTradeUI* this, uint32_t arg2)

004ca550  {
004ca550      class gmSecureTradeUI* var_4 = this;
004ca55a      gmSecureTradeUI::Reset(((char*)this - 0x5f8));
004ca55a      
004ca567      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5] != 0)
004ca567      {
004ca569          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004ca56e          var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004ca576          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004ca587          UIElement_Text::SetText(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5], &var_4);
004ca590          void* __offset(gmSecureTradeUI, -0x14) esi_2 = ((char*)var_4 - 0x14);
004ca590          
004ca5a3          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004ca5ab              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004ca567      }
004ca550  }

004ca5b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004ca5c0  void __thiscall gmSecureTradeUI::RecvNotice_RegisterTrade(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3, double arg4)

004ca5c0  {
004ca5dc      uint32_t var_10 = arg3;
004ca5df      gmSecureTradeUI::SetTradePartner(((char*)this - 0x5f8), *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1));
004ca5ec      class HashSet<UIElement *>* eax_1;
004ca5ec      
004ca5ec      if (this == 0x5f8)
004ca5f3          eax_1 = nullptr;
004ca5ec      else
004ca5ee          eax_1 = &this->m_hashElementsRegisteredWith;
004ca5ee      
004ca601      int32_t var_10_1 = 0;
004ca605      int32_t var_18 = 0x3ff00000;
004ca60b      int32_t var_28 = 0x40140000;
004ca61b      CPlayerSystem::RegisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), eax_1, arg3, 0f, 1, 0, 0f, 0f);
004ca5c0  }

004ca626                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004ca630  void __thiscall gmSecureTradeUI::RecvNotice_RemoveItemFromTrade(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3)

004ca630  {
004ca637      if (arg3 == 2)
004ca637      {
004ca644          gmSecureTradeUI::RemovePartnerItem(((char*)this - 0x5f8), arg2);
004ca649          return;
004ca637      }
004ca637      
004ca64f      if (arg3 == 1)
004ca65c          gmSecureTradeUI::RemoveAddedItem(((char*)this - 0x5f8), arg2);
004ca630  }

004ca664              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004ca670  void __fastcall gmSecureTradeUI::RecvNotice_ResetTrade(class gmSecureTradeUI* this, uint32_t arg2)

004ca670  {
004ca676      gmSecureTradeUI::Reset(((char*)this - 0x5f8));
004ca670  }

004ca67e                                                                                            90 90                                ..

004ca680  void __thiscall gmSecureTradeUI::RecvNotice_TradeFailure(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3)

004ca680  {
004ca68b      gmSecureTradeUI::RemoveAddedItem(((char*)this - 0x5f8), arg2);
004ca680  }

004ca693                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004ca6a0  uint8_t __thiscall gmSecureTradeUI::DragItemAcceptable(class gmSecureTradeUI* this, uint32_t arg2, uint8_t arg3)

004ca6a0  {
004ca6b4      class ACCWeenieObject* esi = ClientObjMaintSystem::GetWeenieObject(arg2);
004ca6bb      class ACCWeenieObject* eax;
004ca6bb      
004ca6bb      if (esi != 0)
004ca6bb      {
004ca6c6          if (ACCWeenieObject::IsOwnedByPlayer(esi) != 0)
004ca6c6          {
004ca751              if (UIElement_ItemList::ItemList_IsInList(this->m_pSelfItemsList, esi->id) == 0)
004ca751              {
004ca75c                  int32_t eax_4;
004ca75c                  
004ca75c                  if (ACCWeenieObject::GetNumContainedItems(esi) != 0)
004ca75e                      eax_4 = esi->pwd._bitfield;
004ca75e                  
004ca765                  eax_4 = 1;
004ca76e                  return 1;
004ca751              }
004ca6c6          }
004ca6c6          else
004ca6c6          {
004ca6c8              eax = arg3;
004ca6c8              
004ca6d1              if (eax == 0)
004ca6d1              {
004ca6d7                  void var_90;
004ca6d7                  StringInfo::StringInfo(&var_90);
004ca6e5                  void* var_94;
004ca6e5                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, &gmSlumlordUI::`vftable'.RecvNotice_AddSalvageItem);
004ca6f5                  StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004ca6fe                  int32_t* esi_2 = ((char*)var_94 - 0x14);
004ca6fe                  
004ca711                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004ca719                      **(uint32_t**)esi_2(1);
004ca719                  
004ca722                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004ca72e                  StringInfo::~StringInfo(&var_90);
004ca6d1              }
004ca6c6          }
004ca6bb      }
004ca6bb      
004ca734      eax = 0;
004ca73d      return 0;
004ca6a0  }

004ca771                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004ca780  int32_t __thiscall gmSecureTradeUI::AddItem(class gmSecureTradeUI* this, uint32_t arg2, int32_t arg3, uint8_t arg4, uint8_t arg5, uint8_t arg6)

004ca780  {
004ca791      if (this->m_pSelfItemsList == 0)
004ca79d          return 0xffffffff;
004ca79d      
004ca7ab      int32_t result = 0xffffffff;
004ca7b3      class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(arg2);
004ca7c6      int32_t ebp = arg3;
004ca7c6      
004ca7cd      if ((ACCWeenieObject::GetNumContainedItems(eax_3) == 0 && ACCWeenieObject::GetNumContainedContainers(eax_3) == 0))
004ca7cd      {
004ca7eb          if (UIElement_ItemList::ItemList_IsInList(this->m_pSelfItemsList, eax_3->id) != 0)
004ca7fa              return 0xffffffff;
004ca7fa          
004ca801          ACCWeenieObject::SetTradeState(eax_3, 1);
004ca811          class UIElement_UIItem* eax_9 = UIElement_ItemList::ItemList_InsertItem(this->m_pSelfItemsList, eax_3->id, ebp);
004ca81a          gmSecureTradeUI::SetMyItemNumber(this);
004ca821          gmSecureTradeUI::UpdateTradeButtonState(this);
004ca82d          int32_t result_1 = UIElement_ListBox::WhatNum(this->m_pSelfItemsList, eax_9);
004ca839          result = result_1;
004ca844          ClientTradeSystem::AddItemToSelfTradeList(ClientTradeSystem::GetTradeSystem(), eax_3->id, result_1);
004ca7cd      }
004ca7cd      
004ca849      int32_t eax_4;
004ca849      eax_4 = arg5;
004ca849      
004ca852      if ((eax_4 != 0 && ACCWeenieObject::GetNumContainedItems(eax_3) > 0))
004ca852      {
004ca879          void* __return;
004ca879          class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax_3, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004ca886          void* var_98;
004ca886          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"Trading contents of %s");
004ca88f          int32_t* ebx_3 = ((char*)__return - 0x14);
004ca88f          
004ca8a5          if ((InterlockedDecrement(&ebx_3[1]) == 0 && ebx_3 != 0))
004ca8ad              **(uint32_t**)ebx_3(1);
004ca8ad          
004ca8b3          void var_90;
004ca8b3          StringInfo::StringInfo(&var_90);
004ca8c3          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004ca8cf          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004ca8d9          class IDList* eax_15 = ACCWeenieObject::GetContainedItemsList(eax_3);
004ca8d9          
004ca8e2          if (eax_15 != 0)
004ca8e2          {
004ca8e8              IDList::SetCurToNum(eax_15, 0);
004ca8f0              bool cond:1_1 = eax_15->numIDs <= 0;
004ca8f2              __return = nullptr;
004ca8f2              
004ca8fa              if (!(cond:1_1))
004ca8fa              {
004ca934                  bool cond:2_1;
004ca934                  
004ca934                  do
004ca934                  {
004ca91b                      if (gmSecureTradeUI::AddItem(this, IDList::GetCurID(eax_15), ebp, arg4, 0, 1) != 0xffffffff)
004ca91d                          ebp = 0;
004ca91d                      
004ca921                      IDList::SetCurToNext(eax_15);
004ca92e                      cond:2_1 = ((char*)__return + 1) < eax_15->numIDs;
004ca930                      __return += 1;
004ca934                  } while (cond:2_1);
004ca8fa              }
004ca8e2          }
004ca8e2          
004ca93a          StringInfo::~StringInfo(&var_90);
004ca943          int32_t* esi_3 = ((char*)var_98 - 0x14);
004ca943          
004ca956          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004ca95e              **(uint32_t**)esi_3(1);
004ca852      }
004ca852      
004ca96e      return result;
004ca780  }

004ca971                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004ca980  uint8_t __thiscall gmSecureTradeUI::OnItemListDragOver(class gmSecureTradeUI* this, class UIElement_UIItem* arg2, uint32_t arg3, uint32_t arg4, enum DropItemFlags arg5)

004ca980  {
004ca98d      if ((arg3 != 0 && (arg5 & 0xe) == 0))
004ca98d      {
004ca9a3          if (gmSecureTradeUI::DragItemAcceptable(((char*)this - 0x600), arg3, 1) != 0)
004ca9a3          {
004ca9aa              UIElement_UIItem::SetDragAcceptState(arg2, 0x10000040);
004ca9af              int32_t eax_1;
004ca9af              eax_1 = 1;
004ca9b1              return 1;
004ca9a3          }
004ca9a3          
004ca9b9          UIElement_UIItem::SetDragAcceptState(arg2, 0x10000041);
004ca98d      }
004ca98d      
004ca9be      uint32_t eax_2;
004ca9be      eax_2 = 1;
004ca9c0      return 1;
004ca980  }

004ca9c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ca9d0  void __thiscall gmSecureTradeUI::ItemAttributesChanged(class gmSecureTradeUI* this, uint32_t arg2, int32_t arg3)

004ca9d0  {
004ca9e2      if ((this->splitItemID != 0 && (arg3 & 1) != 0))
004ca9e2      {
004ca9ea          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
004ca9ea          
004caa02          if ((eax_1 != 0 && eax_1->pwd._wcid.id == this->splitItemClassID.id))
004caa02          {
004caa04              uint32_t _stackSize = eax_1->pwd._stackSize;
004caa04              
004caa0c              if (_stackSize == 0)
004caa0e                  _stackSize = 1;
004caa0e              
004caa19              if (_stackSize == this->splitItemStackSize)
004caa19              {
004caa26                  gmSecureTradeUI::AddItem(this, arg2, 0, 0, 0, 1);
004caa2b                  this->splitItemID = 0;
004caa19              }
004caa02          }
004ca9e2      }
004ca9d0  }

004caa3a                                                                                90 90 90 90 90 90                            ......

004caa40  uint8_t __thiscall gmSecureTradeUI::AcceptDragObject(class gmSecureTradeUI* this, uint32_t arg2)

004caa40  {
004caa5b      if (gmSecureTradeUI::DragItemAcceptable(this, arg2, 0) != 0)
004caa5b      {
004caa62          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
004caa79          int32_t eax_12;
004caa79          
004caa79          if (GenItemHolder::splitSize == GenItemHolder::maxSplitSize)
004caa79          {
004cabf4              ACCWeenieObject::SetWaitingState(eax_1, 0);
004cac07              gmSecureTradeUI::AddItem(this, eax_1->id, 0, 1, 1, 0);
004cac0d              eax_12 = 1;
004cac16              return 1;
004caa79          }
004caa79          
004caa7f          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004caa8c          uint32_t player_id;
004caa8c          
004caa8c          if (SmartBox::smartbox_1 == 0)
004caa96              player_id = 0;
004caa8c          else
004caa8e              player_id = SmartBox::smartbox_1->player_id;
004caa8e          
004caaac          void* var_98;
004caaac          void var_90;
004caaac          
004caaac          if (ItemHolder::AttemptToPlaceInContainer(eax_1->id, player_id, eax_1->pwd._containerID, 0, 0) != 0)
004caaac          {
004caab5              this->splitItemID = eax_1->id;
004caac2              this->splitItemClassID.id = eax_1->pwd._wcid.id;
004caadb              this->splitItemStackSize = ItemHolder::GetObjectSplitSize(eax_1);
004caae8              void* __return;
004caae8              class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004caaf5              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"Splitting the %s before trading …");
004cab04              int32_t* esi_3 = ((char*)__return - 0x14);
004cab04              
004cab16              if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004cab1e                  **(uint32_t**)esi_3(1);
004cab1e              
004cab24              StringInfo::StringInfo(&var_90);
004cab34              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004cab40              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004cab4c              StringInfo::~StringInfo(&var_90);
004cab55              int32_t* esi_5 = ((char*)var_98 - 0x14);
004cab55              
004cab68              if ((InterlockedDecrement(&esi_5[1]) != 0 || esi_5 == 0))
004cab68              {
004cac0d                  eax_12 = 1;
004cac16                  return 1;
004cab68              }
004cab68              
004cab74              **(uint32_t**)esi_5(1);
004cab77              int32_t eax_13;
004cab77              eax_13 = 1;
004cab80              return 1;
004caaac          }
004caaac          
004cab87          StringInfo::StringInfo(&var_90);
004cab95          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"Cannot split the stack to trade …");
004caba5          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004cabae          void* esi_7 = ((char*)var_98 - 0x14);
004cabae          
004cabc1          if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
004cabc9              **(uint32_t**)esi_7(1);
004cabc9          
004cabd2          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004cabde          StringInfo::~StringInfo(&var_90);
004caa5b      }
004caa5b      
004cabed      return 0;
004caa40  }

004cac19                                                                             90 90 90 90 90 90 90                           .......

004cac20  void __thiscall gmSecureTradeUI::ServerSaysMoveItem(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004cac20  {
004cac2e      if (this->m_pOtherItemsList != 0)
004cac2e      {
004cac34          class ClientTradeSystem* m_iidTradePartner = ClientTradeSystem::GetTradeSystem();
004cac34          
004cac3b          if (m_iidTradePartner != 0)
004cac42              m_iidTradePartner = ClientTradeSystem::GetTradeSystem()->m_iidTradePartner;
004cac42          
004cac49          if (((((arg6 == m_iidTradePartner && ClientTradeSystem::GetTradeSystem() != 0) && ClientTradeSystem::GetTradeSystem()->m_iidTradePartner != 0) && ClientTradeSystem::IsPartnerTradingItem(ClientTradeSystem::GetTradeSystem(), arg2) != 0) && UIElement_ItemList::ItemList_IsInList(this->m_pOtherItemsList, arg2) == 0))
004cac49          {
004cac9c              class ACCWeenieObject* eax_7 = ClientObjMaintSystem::GetWeenieObject(arg2);
004cacba              int32_t* var_10;
004cacba              int32_t* __return;
004cacba              uint32_t edx_1 = InterfacePtr<ClientObjMaintSystem>::InterfacePtr<ClientObjMaintSystem>(&var_10, GetClassObject(&__return, &ClientObjMaintSystem_ClassType));
004cacbf              int32_t* __return_1 = __return;
004cacbf              
004cacc5              if (__return_1 != 0)
004cacc9                  edx_1 = *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004cacc9              
004cacce              if (eax_7 != 0)
004cacd2                  edx_1 = ACCWeenieObject::RemoveContentsFromDestructionQueue(eax_7);
004cacd2              
004cace0              bool cond:0_1 = InterfacePtr<ClientObjMaintSystem>::IsValid(&var_10) == 0;
004cace2              int32_t* ebx_2 = var_10;
004cace2              
004cace6              if (!(cond:0_1))
004cace6              {
004cace8                  uint32_t var_20_5 = arg2;
004cacec                  CObjectMaint::RemoveObjectToBeDestroyed(&ebx_2[2], edx_1);
004cace6              }
004cace6              
004cad02              gmSecureTradeUI::AddPartnerItem(this, arg2, ClientTradeSystem::GetItemLocationInPartnerTradeList(ClientTradeSystem::GetTradeSystem(), arg2));
004cad09              gmSecureTradeUI::SetOtherItemNumber(this);
004cad10              gmSecureTradeUI::UpdateTradeButtonState(this);
004cad10              
004cad17              if (ebx_2 != 0)
004cad1d                  *(uint32_t*)(*(uint32_t*)ebx_2 + 0x14)();
004cac49          }
004cac2e      }
004cac20  }

004cad29                             90 90 90 90 90 90 90                                                           .......

004cad30  void __thiscall gmSecureTradeUI::RecvNotice_ServerSaysMoveItem(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004cad30  {
004cad36      /* tailcall */
004cad36      return gmSecureTradeUI::ServerSaysMoveItem(((char*)this - 0x5f8), arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
004cad30  }

004cad3b                                                                                   90 90 90 90 90                             .....

004cad40  void __thiscall gmSecureTradeUI::RecvNotice_ItemAttributesChanged(class gmSecureTradeUI* this, uint32_t arg2, uint32_t arg3)

004cad40  {
004cad46      /* tailcall */
004cad46      return gmSecureTradeUI::ItemAttributesChanged(((char*)this - 0x5f8), arg2, arg3);
004cad40  }

004cad4b                                   90 90 90 90 90                                                             .....

004cad50  uint8_t __thiscall gmSecureTradeUI::TradeAnItemForDummies(class gmSecureTradeUI* this, uint32_t arg2)

004cad50  {
004cad59      class UIElement_ItemList* m_pSelfItemsList = this->m_pSelfItemsList;
004cad59      
004cad61      if (m_pSelfItemsList == 0)
004cad61      {
004cad63          int32_t eax;
004cad63          eax = 0;
004cad6c          return 0;
004cad61      }
004cad61      
004cad7f      if (UIElement_ItemList::ItemList_IsInList(m_pSelfItemsList, arg2) == 0)
004cad7f      {
004cad94          if ((arg2 != ACCWeenieObject::selectedID || GenItemHolder::splitSize == GenItemHolder::maxSplitSize))
004cad94          {
004cadf6              gmSecureTradeUI::AddItem(this, arg2, 0, 1, 1, 0);
004cadfc              int32_t eax_3;
004cadfc              eax_3 = 1;
004cae05              return 1;
004cad94          }
004cad94          
004cad9a          void var_90;
004cad9a          StringInfo::StringInfo(&var_90);
004cada8          void var_94;
004cada8          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You must split the stack before …");
004cadb8          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004cadc1          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
004cadcd          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004cadd9          StringInfo::~StringInfo(&var_90);
004cad7f      }
004cad7f      
004caddf      int32_t eax_1;
004caddf      eax_1 = 0;
004cade8      return 0;
004cad50  }

004cae08                          90 90 90 90 90 90 90 90                                                          ........

004cae10  void __thiscall gmSecureTradeUI::HandleDropRelease(class gmSecureTradeUI* this, struct UIElementMessageInfo const* arg2)

004cae10  {
004cae14      uint32_t dwParam1 = arg2->dwParam1;
004cae1b      class UIElement* esi = *(uint32_t*)(dwParam1 + 8);
004cae20      class UIElement* eax = *(uint32_t*)(dwParam1 + 0x10);
004cae20      
004cae2a      if (((esi != 0 && eax != 0) && UIElement::IsAncestorOfMe(eax, this->m_pSelfItemsList) != 0))
004cae2a      {
004cae4e          char var_8;
004cae4e          void var_4;
004cae4e          UIElement_ItemList::InqDropIconInfo(esi, &arg2, &var_4, &var_8);
004cae53          struct UIElementMessageInfo* eax_2 = arg2;
004cae53          
004cae63          if ((eax_2 != 0 && (var_8 & 0xe) == 0))
004cae68              gmSecureTradeUI::AcceptDragObject(this, eax_2);
004cae2a      }
004cae10  }

004cae75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004cae80  enum UIElementMessageListenResult __thiscall gmSecureTradeUI::ListenToElementMessage(class gmSecureTradeUI* this, struct UIElementMessageInfo const* arg2)

004cae80  {
004cae86      uint32_t idMessage = arg2->idMessage;
004cae86      
004cae8c      if (idMessage == 1)
004cae8c      {
004caeaa          uint32_t idElement = arg2->idElement;
004caeaa          
004caeb1          if (idElement == 0x10000086)
004caeb1          {
004caeea              class UIElement_Button* m_pTradeButton = this->m_pTradeButton;
004caeea              
004caef2              if (m_pTradeButton != 0)
004caef2              {
004caef4                  uint32_t m_state = m_pTradeButton->m_state;
004caef4                  
004caefd                  if (m_state == 6)
004caefd                  {
004caf01                      gmSecureTradeUI::AcceptTheTrade(this);
004caf10                      return UIElement::ListenToElementMessage(this, arg2);
004caefd                  }
004caefd                  
004caf16                  if (m_state == 1)
004caf1a                      gmSecureTradeUI::DeclineTheTrade(this);
004caef2              }
004caeb1          }
004caeb1          else
004caeb1          {
004caeb6              if (idElement == 0x1000008a)
004caeb6              {
004caed8                  ClientTradeSystem::ResetTrade(ClientTradeSystem::GetTradeSystem());
004caee7                  return UIElement::ListenToElementMessage(this, arg2);
004caeb6              }
004caeb6              
004caeb9              if (idElement == 0x1000008b)
004caebb                  this->vtable->SetVisible(0);
004caeb1          }
004cae8c      }
004cae8c      else if (idMessage == 0x15)
004cae98          gmSecureTradeUI::HandleDropRelease(this, arg2);
004cae98      
004caf29      return UIElement::ListenToElementMessage(this, arg2);
004cae80  }

004caf2c                                      90 90 90 90                                                              ....

004caf30  void __thiscall gmSecureTradeUI::RecvNotice_TradeAnItemForDummies(class gmSecureTradeUI* this, uint32_t arg2)

004caf30  {
004caf36      /* tailcall */
004caf36      return gmSecureTradeUI::TradeAnItemForDummies(((char*)this - 0x5f8), arg2);
004caf30  }

004caf3b                                                                                   90 90 90 90 90                             .....

004caf40  void __fastcall gmSalvageUI::~gmSalvageUI(class gmSalvageUI* this)

004caf40  {
004caf43      class UIElement_ItemList* m_salvageList = this->m_salvageList;
004caf52      this->vtable = 0x7b79d8;
004caf4c      this->vtable = &gmSalvageUI::`vftable'.OnAction;
004caf5e      this->vtable = &gmSalvageUI::`vftable';
004caf5e      
004caf68      if (m_salvageList != 0)
004caf6a          UIElement_ItemList::UnregisterItemListDragHandler(m_salvageList);
004caf6a      
004caf6f      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004caf6f      
004caf76      if (eax != 0)
004caf78          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004caf78      
004caf4c      this->vtable = &gmUrgentAssistanceUI::`vftable';
004caf88      NoticeHandler::~NoticeHandler(&this->vtable);
004caf91      /* tailcall */
004caf91      return UIElement_Field::~UIElement_Field(this);
004caf40  }

004caf96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cafa0  class UIElement* __thiscall gmSalvageUI::DynamicCast(class gmSalvageUI* this, uint32_t arg2) __pure

004cafa0  {
004cafac      if (arg2 == 0x10000011)
004cafb9          return this;
004cafb9      
004cafb3      int32_t edx_1;
004cafb3      edx_1 = arg2 != 3;
004cafb7      return (this & (edx_1 - 1));
004cafa0  }

004cafbc                                                                                      90 90 90 90                              ....

004cafc0  uint32_t gmSalvageUI::GetUIElementType(class gmSalvageUI const* this @ ecx) __pure

004cafc0  {
004cafc5      return 0x10000011;
004cafc0  }

004cafc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004cafd0  void __thiscall gmSalvageUI::RemoveItem(class gmSalvageUI* this, uint32_t arg2)

004cafd0  {
004cafdb      if (this->m_salvageList != 0)
004cafdb      {
004cafe3          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
004cafe3          
004cafed          if (eax_1 != 0)
004caff3              ACCWeenieObject::SetTradeState(eax_1, 0);
004caff3          
004cafff          UIElement_ItemList::ItemList_DeleteItem(this->m_salvageList, arg2);
004cb00a          uint32_t eax_2 = UIElement_ItemList::GetNumUIItems(this->m_salvageList);
004cb00a          
004cb012          if (eax_2 == 0)
004cb012          {
004cb014              class UIElement* m_salvageButton = this->m_salvageButton;
004cb01c              this->m_material = eax_2;
004cb01c              
004cb022              if (m_salvageButton != 0)
004cb022              {
004cb027                  arg2 = 0xd;
004cb02f                  /* jump -> m_salvageButton->vtable->SetState */
004cb022              }
004cb012          }
004cafdb      }
004cafd0  }

004cb039                                                                             90 90 90 90 90 90 90                           .......

004cb040  uint8_t __thiscall gmSalvageUI::IsItemSuitable(class gmSalvageUI* this, class ACCWeenieObject* arg2)

004cb040  {
004cb04a      if (arg2 == 0)
004cb04a      {
004cb04d          int32_t eax;
004cb04d          eax = 0;
004cb050          return 0;
004cb04a      }
004cb04a      
004cb054      int32_t _material_type = arg2->pwd._material_type;
004cb076      uint32_t m_material;
004cb076      
004cb076      if ((TinkeringSystem::IsValidMaterialType(_material_type) != 0 && arg2->pwd._structure < 0x64))
004cb076      {
004cb087          if (PlayerModule::SalvageMultiple(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0)
004cb087          {
004cb097          label_4cb097:
004cb097              m_material = *(uint8_t*)((char*)arg2->pwd._bitfield)[3];
004cb09e              m_material = !(m_material);
004cb0a1              m_material &= 1;
004cb0a4              return m_material;
004cb087          }
004cb087          
004cb089          m_material = this->m_material;
004cb089          
004cb095          if ((m_material == 0 || _material_type == m_material))
004cb091              goto label_4cb097;
004cb076      }
004cb076      
004cb069      m_material = 0;
004cb06c      return 0;
004cb040  }

004cb0a7                       90 90 90 90 90 90 90 90 90                                                         .........

004cb0b0  void __thiscall gmSalvageUI::gmSalvageUI(class gmSalvageUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004cb0b0  {
004cb0bf      UIElement_Field::UIElement_Field(this, arg2, arg3);
004cb0c4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004cb0ce      this->vtable = &ItemListDragHandler::`vftable';
004cb0da      this->m_salvageList = nullptr;
004cb0e0      this->m_salvageButton = nullptr;
004cb0e6      this->m_toolID = 0;
004cb0ec      this->m_material = 0;
004cb0f2      this->vtable = 0x7b79d8;
004cb0f8      this->vtable = &gmSalvageUI::`vftable'.OnAction;
004cb102      this->vtable = &gmSalvageUI::`vftable';
004cb0b0  }

004cb112                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004cb120  void* __thiscall gmSalvageUI::`scalar deleting destructor'(class gmSalvageUI* this, uint32_t arg2)

004cb120  {
004cb123      gmSalvageUI::~gmSalvageUI(this);
004cb123      
004cb12d      if ((arg2 & 1) != 0)
004cb130          operator delete(this);
004cb130      
004cb13b      return this;
004cb120  }

004cb13e                                                                                            90 90                                ..

004cb140  void __fastcall gmSalvageUI::PostInit(class gmSalvageUI* this)

004cb140  {
004cb144      UIElement::PostInit(this);
004cb150      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000074);
004cb157      class UIElement_ItemList* eax_1;
004cb157      
004cb157      if (eax == 0)
004cb16a          eax_1 = nullptr;
004cb157      else
004cb162          eax_1 = eax->vtable->DynamicCast(0x10000031);
004cb162      
004cb16e      this->m_salvageList = eax_1;
004cb16e      
004cb174      if (eax_1 != 0)
004cb17f          UIElement_ItemList::RegisterItemListDragHandler(eax_1, &this->vtable);
004cb17f      
004cb190      this->m_salvageButton = UIElement::GetChildRecursive(this, 0x10000076);
004cb196      class GlobalEventHandler* eax_3 = GlobalEventHandler::GetGlobalEventHandler();
004cb196      
004cb19f      if (eax_3 != 0)
004cb19f      {
004cb1a1          eax_3->vtable->RegisterNoticeHandler(0x4dd222, &this->vtable);
004cb1b4          eax_3->vtable->RegisterNoticeHandler(0x4dd223, &this->vtable);
004cb1c1          eax_3->vtable->RegisterNoticeHandler(0x4dd224, &this->vtable);
004cb1ce          eax_3->vtable->RegisterNoticeHandler(0x4dd256, &this->vtable);
004cb19f      }
004cb140  }

004cb1de                                                                                            90 90                                ..

004cb1e0  class UIElement* gmSalvageUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004cb1e0  {
004cb1e5      void* eax = operator new(0x610);
004cb1e5      
004cb1ef      if (eax == 0)
004cb205          return 0;
004cb205      
004cb202      return gmSalvageUI::gmSalvageUI(eax, arg1, arg2);
004cb1e0  }

004cb206                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004cb210  void __thiscall gmSalvageUI::RecvNotice_RemoveSalvageItem(class gmSalvageUI* this, uint32_t arg2)

004cb210  {
004cb216      /* tailcall */
004cb216      return gmSalvageUI::RemoveItem(((char*)this - 0x5f8), arg2);
004cb210  }

004cb21b                                                                                   90 90 90 90 90                             .....

004cb220  void __thiscall gmSalvageUI::RecvNotice_ItemListBeginDrag(class gmSalvageUI* this, class UIElement const* arg2, int32_t arg3)

004cb220  {
004cb227      struct IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::VTable* vtable = this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable;
004cb227      
004cb22c      if (vtable == arg2)
004cb22c      {
004cb233          class UIElement* eax_1 = UIElement_ListBox::GetItem(vtable, arg3);
004cb233          
004cb23a          if (eax_1 != 0)
004cb23a          {
004cb245              void* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
004cb245              
004cb24d              if (eax_2 != 0)
004cb24d              {
004cb24f                  uint32_t eax_3 = *(uint32_t*)((char*)eax_2 + 0x5fc);
004cb24f                  
004cb257                  if (eax_3 != 0)
004cb260                      gmSalvageUI::RemoveItem(((char*)this - 0x5f8), eax_3);
004cb24d              }
004cb23a          }
004cb22c      }
004cb220  }

004cb269                             90 90 90 90 90 90 90                                                           .......

004cb270  void __stdcall gmSalvageUI::ClearAllTradeStates(class gmSalvageUI* this @ ecx, class UIElement_ItemList* arg2)

004cb270  {
004cb279      int32_t eax = UIElement_ItemList::GetNumUIItems(arg2);
004cb280      uint32_t esi = 0;
004cb280      
004cb284      if (eax > 0)
004cb284      {
004cb2c4          do
004cb2c4          {
004cb289              class UIElement* eax_1 = UIElement_ListBox::GetItem(arg2, esi);
004cb289              
004cb290              if (eax_1 != 0)
004cb290              {
004cb29b                  void* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
004cb29b                  
004cb2a3                  if (eax_2 != 0)
004cb2a3                  {
004cb2ac                      class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(*(uint32_t*)((char*)eax_2 + 0x5fc));
004cb2ac                      
004cb2b6                      if (eax_4 != 0)
004cb2bc                          ACCWeenieObject::SetTradeState(eax_4, 0);
004cb2a3                  }
004cb290              }
004cb290              
004cb2c1              esi += 1;
004cb2c4          } while (esi < eax);
004cb284      }
004cb270  }

004cb2cc                                      90 90 90 90                                                              ....

004cb2d0  uint8_t __thiscall gmSalvageUI::_AddItem(class gmSalvageUI* this, class ACCWeenieObject* arg2)

004cb2d0  {
004cb2d3      class UIElement_ItemList* m_salvageList = this->m_salvageList;
004cb2d3      
004cb2db      if (m_salvageList == 0)
004cb2db      {
004cb2dd          int32_t eax;
004cb2dd          eax = 0;
004cb2e0          return 0;
004cb2db      }
004cb2db      
004cb2f3      if ((UIElement_ItemList::ItemList_IsInList(m_salvageList, arg2->id) == 0 && gmSalvageUI::IsItemSuitable(this, arg2) != 0))
004cb2f3      {
004cb30c          ACCWeenieObject::SetTradeState(arg2, 1);
004cb31b          UIElement_ItemList::ItemList_AddItem(this->m_salvageList, arg2->id);
004cb326          int32_t eax_4 = UIElement_ItemList::GetNumUIItems(this->m_salvageList);
004cb326          
004cb32e          if (eax_4 == 1)
004cb32e          {
004cb336              this->m_material = arg2->pwd._material_type;
004cb33c              class UIElement* m_salvageButton = this->m_salvageButton;
004cb33c              
004cb344              if (m_salvageButton != 0)
004cb346                  m_salvageButton->vtable->SetState(eax_4);
004cb32e          }
004cb32e          
004cb350          eax_4 = 1;
004cb353          return 1;
004cb2f3      }
004cb2f3      
004cb2f6      int32_t eax_2;
004cb2f6      eax_2 = 0;
004cb2f9      return 0;
004cb2d0  }

004cb356                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cb360  void gmSalvageUI::Register()

004cb360  {
004cb36a      UIElement::RegisterElementClass(0x10000011, gmSalvageUI::Create);
004cb360  }

004cb373                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004cb380  void __thiscall gmSalvageUI::OpenSalvagePanel(class gmSalvageUI* this, uint32_t arg2)

004cb380  {
004cb387      class UIElement_ItemList* m_salvageList = this->m_salvageList;
004cb390      this->m_toolID = arg2;
004cb396      gmSalvageUI::ClearAllTradeStates(this, m_salvageList);
004cb3a1      UIElement_ItemList::ItemList_Flush(this->m_salvageList);
004cb3a6      class UIElement* m_salvageButton = this->m_salvageButton;
004cb3ae      this->m_material = 0;
004cb3ae      
004cb3b8      if (m_salvageButton != 0)
004cb3ba          m_salvageButton->vtable->SetState(0xd);
004cb3ba      
004cb3c4      this->vtable->SetVisible(1);
004cb380  }

004cb3d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004cb3e0  void __fastcall gmSalvageUI::CloseSalvagePanel(class gmSalvageUI* this)

004cb3e0  {
004cb3e3      class UIElement_ItemList* m_salvageList = this->m_salvageList;
004cb3ea      this->m_toolID = 0;
004cb3f4      gmSalvageUI::ClearAllTradeStates(this, m_salvageList);
004cb3ff      UIElement_ItemList::ItemList_Flush(this->m_salvageList);
004cb404      class UIElement* m_salvageButton = this->m_salvageButton;
004cb40c      this->m_material = 0;
004cb40c      
004cb417      if (m_salvageButton != 0)
004cb419          m_salvageButton->vtable->SetState(0xd);
004cb3e0  }

004cb424              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004cb430  uint8_t __thiscall gmSalvageUI::AddNewItem(class gmSalvageUI* this, uint32_t arg2)

004cb430  {
004cb439      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004cb439      
004cb445      if (eax == 0)
004cb445      {
004cb448          eax = 0;
004cb44b          return 0;
004cb445      }
004cb445      
004cb45a      if (ACCWeenieObject::GetNumContainedItems(eax) <= 0)
004cb46d          return gmSalvageUI::_AddItem(this, eax);
004cb46d      
004cb463      return gmSalvageUI::_AddContainedItems(this, eax);
004cb430  }


004cb470  void __thiscall gmSalvageUI::OnVisibilityChanged(class gmSalvageUI* this, uint8_t arg2)

004cb470  {
004cb479      UIElement::OnVisibilityChanged(this, arg2);
004cb479      
004cb48d      if (((((int8_t)(this->__inner23 >> 0x11)) & 1) != 0 && arg2 == 0))
004cb491          gmSalvageUI::CloseSalvagePanel(this);
004cb470  }

004cb49b                                                                                   90 90 90 90 90                             .....

004cb4a0  void __thiscall gmSalvageUI::RecvNotice_OpenSalvagePanel(class gmSalvageUI* this, uint32_t arg2)

004cb4a0  {
004cb4a6      /* tailcall */
004cb4a6      return gmSalvageUI::OpenSalvagePanel(((char*)this - 0x5f8), arg2);
004cb4a0  }

004cb4ab                                   90 90 90 90 90                                                             .....

004cb4b0  void __thiscall gmSalvageUI::RecvNotice_AddSalvageItem(class gmSalvageUI* this, uint32_t arg2)

004cb4b0  {
004cb4bd      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004cb4bd      
004cb4c9      if (eax != 0)
004cb4c9      {
004cb4d7          if (ACCWeenieObject::GetNumContainedItems(eax) > 0)
004cb4d7          {
004cb4d9              gmSalvageUI::_AddContainedItems(((char*)this - 0x5f8), eax);
004cb4e0              return;
004cb4d7          }
004cb4d7          
004cb4e3          gmSalvageUI::_AddItem(((char*)this - 0x5f8), eax);
004cb4c9      }
004cb4b0  }

004cb4ed                                         90 90 90                                                               ...

004cb4f0  uint8_t __stdcall gmSalvageUI::_AddContainedItems(class gmSalvageUI* this @ ecx, class ACCWeenieObject* arg2)

004cb4f0  {
004cb4f6      int32_t __saved_ebx_1;
004cb4f6      int32_t __saved_ebx = __saved_ebx_1;
004cb4f7      int32_t __saved_ebp_1;
004cb4f7      int32_t __saved_ebp = __saved_ebp_1;
004cb4f8      int32_t __saved_esi_1;
004cb4f8      int32_t __saved_esi = __saved_esi_1;
004cb4f9      int32_t __saved_edi_2;
004cb4f9      int32_t __saved_edi_1 = __saved_edi_2;
004cb501      int32_t var_ac = 0;
004cb503      int32_t var_b0 = 2;
004cb515      void* __return;
004cb515      class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(arg2, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
004cb516      wchar16 const* const var_b0_1 = u"Adding contents of %s";
004cb51f      int32_t var_b4_1 = 0;
004cb522      void* var_98;
004cb522      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"Adding contents of %s");
004cb531      int32_t* esi_1 = ((char*)__return - 0x14);
004cb531      
004cb543      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004cb543      {
004cb547          int32_t var_ac_2 = 1;
004cb54b          **(uint32_t**)esi_1(1);
004cb543      }
004cb543      
004cb551      void var_90;
004cb551      StringInfo::StringInfo(&var_90);
004cb556      int32_t var_ac_3 = 1;
004cb561      StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004cb56b      int32_t var_b0_3 = 0x1a;
004cb56d      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004cb577      class IDList* eax_3 = ACCWeenieObject::GetContainedItemsList(arg2);
004cb577      
004cb580      if (eax_3 == 0)
004cb580      {
004cb614          StringInfo::~StringInfo(&var_90);
004cb61d          int32_t* esi_7 = ((char*)var_98 - 0x14);
004cb61d          
004cb62c          if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
004cb62c          {
004cb630              int32_t var_ac_7 = 1;
004cb634              **(uint32_t**)esi_7(1);
004cb62c          }
004cb62c          
004cb639          int32_t eax_11;
004cb639          eax_11 = 0;
004cb642          return 0;
004cb580      }
004cb580      
004cb586      int32_t var_ac_5 = 0;
004cb58a      IDList::SetCurToNum(eax_3, 0);
004cb58a      int32_t __saved_edi;
004cb58a      int32_t* esp_1 = &__saved_edi;
004cb592      int32_t i = 0;
004cb592      
004cb596      if (eax_3->numIDs > 0)
004cb596      {
004cb5d5          do
004cb5d5          {
004cb59f              *(uint32_t*)((char*)esp_1 - 4) = IDList::GetCurID(eax_3);
004cb5a0              class ACCWeenieObject* eax_6 = ClientObjMaintSystem::GetWeenieObject();
004cb5a0              
004cb5ac              if (eax_6 != 0)
004cb5ac              {
004cb5b5                  bool cond:0_1 = ACCWeenieObject::GetNumContainedItems(eax_6) <= 0;
004cb5b9                  *(uint32_t*)((char*)esp_1 - 4) = eax_6;
004cb5b9                  esp_1 -= 4;
004cb5b9                  
004cb5ba                  if (cond:0_1)
004cb5ba                  {
004cb5c3                      gmSalvageUI::_AddItem(this);
004cb5c3                      esp_1 = &esp_1[1];
004cb5ba                  }
004cb5ba                  else
004cb5bc                      gmSalvageUI::_AddContainedItems(this);
004cb5ac              }
004cb5ac              
004cb5ca              IDList::SetCurToNext(eax_3);
004cb5d2              i += 1;
004cb5d5          } while (i < eax_3->numIDs);
004cb596      }
004cb596      
004cb5db      StringInfo::~StringInfo(&esp_1[6]);
004cb5e4      int32_t* esi_4 = (esp_1[4] - 0x14);
004cb5ea      *(uint32_t*)((char*)esp_1 - 4) = &esi_4[1];
004cb5eb      void* esp_4 = esp_1;
004cb5eb      
004cb5f7      if ((InterlockedDecrement() == 0 && esi_4 != 0))
004cb5f7      {
004cb5f9          int32_t eax_10 = *(uint32_t*)esi_4;
004cb5fb          *(uint32_t*)((char*)esp_4 - 4) = 1;
004cb5ff          *(uint32_t*)eax_10();
004cb5f7      }
004cb5f7      
004cb601      *(uint32_t*)esp_4;
004cb602      *(uint32_t*)((char*)esp_4 + 4);
004cb603      *(uint32_t*)((char*)esp_4 + 8);
004cb604      int32_t eax_9;
004cb604      eax_9 = 1;
004cb606      *(uint32_t*)((char*)esp_4 + 0xc);
004cb60d      return 1;
004cb4f0  }

004cb645                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004cb650  uint8_t __thiscall gmSalvageUI::DragItemAcceptable(class gmSalvageUI* this, uint32_t arg2, uint8_t arg3)

004cb650  {
004cb668      int32_t esi = ClientObjMaintSystem::GetWeenieObject(arg2);
004cb66f      int32_t eax;
004cb66f      
004cb66f      if (esi != 0)
004cb66f      {
004cb67a          if (ACCWeenieObject::IsOwnedByPlayer(esi) != 0)
004cb67a          {
004cb6f5              class UIElement_ItemList* m_salvageList = this->m_salvageList;
004cb6f5              
004cb6fd              if ((m_salvageList != 0 && UIElement_ItemList::ItemList_IsInList(m_salvageList, arg2) == 0))
004cb6fd              {
004cb712                  if (ACCWeenieObject::GetNumContainedItems(esi) <= 0)
004cb733                      return gmSalvageUI::IsItemSuitable(this, esi);
004cb733                  
004cb716                  int32_t eax_2;
004cb716                  eax_2 = 1;
004cb71f                  return 1;
004cb6fd              }
004cb67a          }
004cb67a          else
004cb67a          {
004cb67c              eax = arg3;
004cb67c              
004cb685              if (eax == 0)
004cb685              {
004cb68b                  void var_90;
004cb68b                  StringInfo::StringInfo(&var_90);
004cb699                  void* var_94;
004cb699                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You can only salvage items that …");
004cb6a9                  StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004cb6b2                  int32_t* esi_2 = ((char*)var_94 - 0x14);
004cb6b2                  
004cb6c5                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004cb6cd                      **(uint32_t**)esi_2(1);
004cb6cd                  
004cb6d6                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004cb6e2                  StringInfo::~StringInfo(&var_90);
004cb685              }
004cb67a          }
004cb66f      }
004cb66f      
004cb6e9      eax = 0;
004cb6f2      return 0;
004cb650  }

004cb736                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cb740  uint8_t __thiscall gmSalvageUI::OnItemListDragOver(class gmSalvageUI* this, class UIElement_UIItem* arg2, uint32_t arg3, uint32_t arg4, enum DropItemFlags arg5)

004cb740  {
004cb74d      if ((arg3 != 0 && (arg5 & 0xe) == 0))
004cb74d      {
004cb763          if (gmSalvageUI::DragItemAcceptable(((char*)this - 0x5fc), arg3, 1) != 0)
004cb763          {
004cb76a              UIElement_UIItem::SetDragAcceptState(arg2, 0x10000040);
004cb76f              int32_t eax_1;
004cb76f              eax_1 = 1;
004cb771              return 1;
004cb763          }
004cb763          
004cb779          UIElement_UIItem::SetDragAcceptState(arg2, 0x10000041);
004cb74d      }
004cb74d      
004cb77e      uint32_t eax_2;
004cb77e      eax_2 = 1;
004cb780      return 1;
004cb740  }

004cb783           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004cb790  uint8_t __thiscall gmSalvageUI::AcceptDragObject(class gmSalvageUI* this, uint32_t arg2)

004cb790  {
004cb79b      uint8_t result = gmSalvageUI::DragItemAcceptable(this, arg2, 0);
004cb79b      
004cb7a2      if (result == 0)
004cb7a6          return result;
004cb7a6      
004cb7b1      if (this->m_salvageList != 0)
004cb7b6          gmSalvageUI::AddNewItem(this, arg2);
004cb7b6      
004cb7bc      class UIElement_ItemList* eax;
004cb7bc      eax = 1;
004cb7bf      return 1;
004cb790  }

004cb7c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004cb7d0  void __thiscall gmSalvageUI::HandleDropRelease(class gmSalvageUI* this, struct UIElementMessageInfo const* arg2)

004cb7d0  {
004cb7d4      uint32_t dwParam1 = arg2->dwParam1;
004cb7db      class UIElement* esi = *(uint32_t*)(dwParam1 + 8);
004cb7e0      class UIElement* eax = *(uint32_t*)(dwParam1 + 0x10);
004cb7e0      
004cb7ea      if (((esi != 0 && eax != 0) && UIElement::IsAncestorOfMe(eax, this->m_salvageList) != 0))
004cb7ea      {
004cb80e          char var_8;
004cb80e          void var_4;
004cb80e          UIElement_ItemList::InqDropIconInfo(esi, &arg2, &var_4, &var_8);
004cb813          struct UIElementMessageInfo* eax_2 = arg2;
004cb813          
004cb823          if ((eax_2 != 0 && (var_8 & 0xe) == 0))
004cb828              gmSalvageUI::AcceptDragObject(this, eax_2);
004cb7ea      }
004cb7d0  }

004cb835                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004cb840  uint8_t __fastcall gmSalvageUI::Salvage(class gmSalvageUI* this)

004cb840  {
004cb847      class UIElement_ItemList* m_salvageList = this->m_salvageList;
004cb847      
004cb851      if (m_salvageList != 0)
004cb851      {
004cb858          int32_t var_10 = 0x7a3e80;
004cb860          int32_t var_c_1 = 0;
004cb864          int32_t var_8_1 = 0;
004cb868          int32_t var_4_1 = 0;
004cb86c          int32_t eax_1 = UIElement_ItemList::GetNumUIItems(m_salvageList);
004cb873          uint32_t edi_2 = (eax_1 - 1);
004cb873          
004cb874          if ((eax_1 - 1) >= 0)
004cb874          {
004cb8c0              uint32_t temp1_1;
004cb8c0              
004cb8c0              do
004cb8c0              {
004cb887                  class UIElement* eax_2 = UIElement_ListBox::GetItem(this->m_salvageList, edi_2);
004cb887                  
004cb88e                  if (eax_2 != 0)
004cb88e                  {
004cb899                      void* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004cb899                      
004cb8a1                      if (eax_3 != 0)
004cb8a1                      {
004cb8a3                          int32_t eax_4 = *(uint32_t*)((char*)eax_3 + 0x5fc);
004cb8a3                          
004cb8ab                          if (eax_4 != 0)
004cb8ab                          {
004cb8ad                              int32_t var_14 = eax_4;
004cb8ba                              PackableList<unsigned long>::InsertTail(&var_10, &var_14);
004cb8ab                          }
004cb8a1                      }
004cb88e                  }
004cb88e                  
004cb8bf                  temp1_1 = edi_2;
004cb8bf                  edi_2 -= 1;
004cb8c0              } while ((temp1_1 - 1) >= 0);
004cb874          }
004cb874          
004cb8cf          if ((var_c_1 != 0 && this->m_toolID != 0))
004cb8cf          {
004cb8da              gmSalvageUI::ClearAllTradeStates(this, this->m_salvageList);
004cb8eb              CM_Inventory::Event_CreateTinkeringTool(this->m_toolID, &var_10);
004cb8f9              UIElement_ItemList::ItemList_Flush(this->m_salvageList);
004cb8fe              class UIElement* m_salvageButton = this->m_salvageButton;
004cb906              this->m_material = 0;
004cb906              
004cb90c              if (m_salvageButton != 0)
004cb90e                  m_salvageButton->vtable->SetState(0xd);
004cb90e              
004cb91c              var_10 = 0x7a3e80;
004cb924              PackableList<unsigned long>::Flush(&var_10);
004cb92a              int32_t eax_6;
004cb92a              eax_6 = 1;
004cb930              return 1;
004cb8cf          }
004cb8cf          
004cb935          var_10 = 0x7a3e80;
004cb93d          PackableList<unsigned long>::Flush(&var_10);
004cb851      }
004cb851      
004cb943      int32_t eax;
004cb943      eax = 0;
004cb949      return 0;
004cb840  }

004cb878                                                                          8d a4 24 00 00 00 00 90                          ..$.....
004cb94a                                90 90 90 90 90 90                                                            ......

004cb950  enum UIElementMessageListenResult __thiscall gmSalvageUI::ListenToElementMessage(class gmSalvageUI* this, struct UIElementMessageInfo const* arg2)

004cb950  {
004cb956      uint32_t idMessage = arg2->idMessage;
004cb956      
004cb95e      if (idMessage == 0x1c)
004cb95e      {
004cb960          class UIElement_ItemList* m_salvageList = this->m_salvageList;
004cb960          
004cb968          if ((m_salvageList != 0 && UIElement::IsAncestorOfMe(arg2->pElement, m_salvageList) != 0))
004cb968          {
004cb985              class UIElement* eax_1 = UIElement_ListBox::GetItemUnderMouse(this->m_salvageList);
004cb985              
004cb98c              if (eax_1 != 0)
004cb98c              {
004cb99b                  void* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
004cb99b                  
004cb9a9                  if ((eax_2 != 0 && arg2->dwParam1 == 0xa))
004cb9b4                      gmSalvageUI::RemoveItem(this, *(uint32_t*)((char*)eax_2 + 0x5fc));
004cb98c              }
004cb968          }
004cb95e      }
004cb95e      else if (idMessage == 1)
004cb9c9      {
004cb9cb          uint32_t idElement = arg2->idElement;
004cb9cb          
004cb9d2          if (idElement == 0x10000078)
004cb9d2          {
004cb9d4              this->vtable->SetVisible(0);
004cb9e7              return UIElement::ListenToElementMessage(this, arg2);
004cb9d2          }
004cb9d2          
004cb9ef          if (idElement == 0x10000076)
004cb9f3              gmSalvageUI::Salvage(this);
004cb9c9      }
004cb9c9      else if (idMessage == 0x15)
004cba0d          gmSalvageUI::HandleDropRelease(this, arg2);
004cba0d      
004cba1c      return UIElement::ListenToElementMessage(this, arg2);
004cb950  }

004cba1f                                                                                               90                                 .

004cba20  void __fastcall gmExternalContainerUI::~gmExternalContainerUI(class gmExternalContainerUI* this)

004cba20  {
004cba24      class UIElement_ItemList* m_itemList = this->m_itemList;
004cba39      this->vtable = 0x7b8030;
004cba2d      this->vtable = &gmExternalContainerUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004cba33      this->vtable = &gmExternalContainerUI::`vftable'.OnAction;
004cba4b      this->vtable = &gmExternalContainerUI::`vftable';
004cba4b      
004cba55      if (m_itemList != 0)
004cba57          UIElement_ItemList::UnregisterItemListDragHandler(m_itemList);
004cba57      
004cba64      CPlayerSystem::UnregisterAllObjectRangeHandlers(CPlayerSystem::GetPlayerSystem(), &this->vtable);
004cba69      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
004cba69      
004cba70      if (eax_1 != 0)
004cba72          eax_1->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004cba72      
004cba2d      this->vtable = &gmUrgentAssistanceUI::`vftable';
004cba82      NoticeHandler::~NoticeHandler(&this->vtable);
004cba8c      /* tailcall */
004cba8c      return UIElement_Field::~UIElement_Field(this);
004cba20  }

004cba91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004cbaa0  class UIElement* __thiscall gmExternalContainerUI::DynamicCast(class gmExternalContainerUI* this, uint32_t arg2) __pure

004cbaa0  {
004cbaac      if (arg2 == 0x1000000d)
004cbab9          return this;
004cbab9      
004cbab3      int32_t edx_1;
004cbab3      edx_1 = arg2 != 3;
004cbab7      return (this & (edx_1 - 1));
004cbaa0  }

004cbabc                                                                                      90 90 90 90                              ....

004cbac0  uint32_t gmExternalContainerUI::GetUIElementType(class gmExternalContainerUI const* this @ ecx) __pure

004cbac0  {
004cbac5      return 0x1000000d;
004cbac0  }

004cbac6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004cbad0  enum UIElementMessageListenResult __thiscall gmExternalContainerUI::ListenToElementMessage(class gmExternalContainerUI* this, struct UIElementMessageInfo const* arg2)

004cbad0  {
004cbae4      if ((arg2->idMessage == 1 && arg2->idElement == 0x10000068))
004cbae6          this->vtable->SetVisible(0);
004cbae6      
004cbaf7      return UIElement::ListenToElementMessage(this, arg2);
004cbad0  }

004cbafa                                                                                90 90 90 90 90 90                            ......

004cbb00  void __thiscall gmExternalContainerUI::RecvNotice_StopViewingObject(class gmExternalContainerUI* this, uint32_t arg2)

004cbb00  {
004cbb07      if (arg2 != this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3])
004cbb20          return;
004cbb20      
004cbb15      arg2 = 0;
004cbb1d      /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18) */
004cbb00  }

004cbb23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004cbb30  void __thiscall gmExternalContainerUI::RecvNotice_ServerSaysMoveItem(class gmExternalContainerUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004cbb30  {
004cbb4c      if ((arg2 == *(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] + 0x66c) && arg6 != *(int32_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] + 0x66c)))
004cbb51          UIElement_ItemList::ItemList_OpenFirstContainer(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0]);
004cbb30  }

004cbb59                                                                             90 90 90 90 90 90 90                           .......

004cbb60  uint8_t __thiscall gmExternalContainerUI::DragItemAcceptable(class gmExternalContainerUI* this, uint32_t arg2, uint8_t arg3)

004cbb60  {
004cbb60      class gmExternalContainerUI* this_1 = this;
004cbb61      uint32_t groundObjectID = this->groundObjectID;
004cbb61      
004cbb69      if (groundObjectID == 0)
004cbb69      {
004cbb6b          groundObjectID = 1;
004cbb6e          return 1;
004cbb69      }
004cbb69      
004cbb73      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(groundObjectID);
004cbb73      
004cbb7f      if (eax == 0)
004cbb7f      {
004cbb81          eax = 1;
004cbb85          return 1;
004cbb7f      }
004cbb7f      
004cbb8d      class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
004cbb8d      
004cbb97      if (eax_2 == 0)
004cbb97      {
004cbb99          eax_2 = 0;
004cbb9d          return 0;
004cbb97      }
004cbb97      
004cbba7      this_1 = 1;
004cbbb9      int32_t eax_3;
004cbbb9      eax_3 = ItemHolder::CheckHookStatus(eax_2, eax, &this_1) != 0;
004cbbbe      return eax_3;
004cbb60  }

004cbbc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004cbbd0  void __thiscall gmExternalContainerUI::SetGroundObject(class gmExternalContainerUI* this, uint32_t arg2)

004cbbd0  {
004cbbd3      uint32_t groundObjectID = this->groundObjectID;
004cbbd3      
004cbbdc      if (groundObjectID != 0)
004cbbed          CPlayerSystem::UnregisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), &this->vtable, groundObjectID);
004cbbed      
004cbbf6      class UIElement_ItemList* m_topContainer = this->m_topContainer;
004cbbfc      this->groundObjectID = arg2;
004cbc02      UIElement_ItemList::ItemList_Flush(m_topContainer);
004cbc0e      UIElement_ItemList::ItemList_AddItem(this->m_topContainer, arg2);
004cbc1e      UIElement_ItemList::ItemList_SetParentContainer(this->m_containerList, arg2, 0, 1);
004cbc2c      int32_t eax_2;
004cbc2c      int80_t st0;
004cbc2c      st0 = UIElement_ItemList::ItemList_OpenContainer(this->m_topContainer, arg2, 1);
004cbc2c      
004cbc33      if (eax_2 == 0)
004cbc3f          UIElement_ItemList::ItemList_SetParentContainer(this->m_itemList, eax_2, eax_2, 1);
004cbc3f      
004cbc46      if (arg2 == 0)
004cbc46      {
004cbc48          this->vtable->SetVisible(arg2);
004cbc52          return;
004cbc46      }
004cbc46      
004cbc56      class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(arg2);
004cbc56      
004cbc60      if (eax_3 != 0)
004cbc60      {
004cbc77          int32_t var_c_5 = 0;
004cbc7b          int32_t var_14_2 = 0x3ff00000;
004cbc96          CPlayerSystem::RegisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), &this->vtable, eax_3->id, ((double)((long double)eax_3->pwd._useRadius)), 1, 0, 0f, 0f);
004cbc60      }
004cbc60      
004cbc9b      this->vtable->SetVisible(1);
004cbbd0  }

004cbca9                             90 90 90 90 90 90 90                                                           .......

004cbcb0  void __fastcall gmExternalContainerUI::CloseCurrentContainer(class gmExternalContainerUI* this)

004cbcb0  {
004cbcb3      uint32_t groundObjectID = this->groundObjectID;
004cbcb3      
004cbcbb      if (groundObjectID != 0)
004cbcbb      {
004cbcc2          ItemHolder::UseObject(groundObjectID, 0, 0);
004cbcdf          CPlayerSystem::UnregisterObjectRangeHandler(CPlayerSystem::GetPlayerSystem(), &this->vtable, this->groundObjectID);
004cbce4          class UIElement_ItemList* m_topContainer = this->m_topContainer;
004cbcea          this->groundObjectID = 0;
004cbcf4          UIElement_ItemList::ItemList_Flush(m_topContainer);
004cbd05          UIElement_ItemList::ItemList_SetParentContainer(this->m_containerList, 0, 0, 1);
004cbcbb      }
004cbcb0  }

004cbd0c                                      90 90 90 90                                                              ....

004cbd10  void __thiscall gmExternalContainerUI::OnObjectRangeExit(class gmExternalContainerUI* this, uint32_t arg2)

004cbd10  {
004cbd17      if (arg2 != this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2])
004cbd30          return;
004cbd30      
004cbd25      arg2 = 0;
004cbd2d      /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x5fc) + 0x18) */
004cbd10  }

004cbd33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004cbd40  void __thiscall gmExternalContainerUI::gmExternalContainerUI(class gmExternalContainerUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004cbd40  {
004cbd4f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004cbd54      this->vtable = &gmUrgentAssistanceUI::`vftable';
004cbd5e      this->vtable = &ObjectRangeHandler::`vftable';
004cbd68      this->vtable = &ItemListDragHandler::`vftable';
004cbd74      this->m_topContainer = nullptr;
004cbd7a      this->m_containerList = nullptr;
004cbd80      this->m_itemList = nullptr;
004cbd86      this->groundObjectID = 0;
004cbd8c      this->vtable = 0x7b8030;
004cbd92      this->vtable = &gmExternalContainerUI::`vftable'.RecvNotice_RuntimeDDDStatus;
004cbd9c      this->vtable = &gmExternalContainerUI::`vftable'.OnAction;
004cbda6      this->vtable = &gmExternalContainerUI::`vftable';
004cbd40  }

004cbdb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cbdc0  void* __thiscall gmExternalContainerUI::`scalar deleting destructor'(class gmExternalContainerUI* this, uint32_t arg2)

004cbdc0  {
004cbdc3      gmExternalContainerUI::~gmExternalContainerUI(this);
004cbdc3      
004cbdcd      if ((arg2 & 1) != 0)
004cbdd0          operator delete(this);
004cbdd0      
004cbddb      return this;
004cbdc0  }

004cbdde                                                                                            90 90                                ..

004cbde0  void __fastcall gmExternalContainerUI::PostInit(class gmExternalContainerUI* this)

004cbde0  {
004cbde4      UIElement::PostInit(this);
004cbde9      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004cbde9      
004cbdf2      if (eax != 0)
004cbdf2      {
004cbdf6          struct gmNoticeHandler::VTable** eax_1;
004cbdf6          
004cbdf6          if (this == 0)
004cbe00              eax_1 = nullptr;
004cbdf6          else
004cbdf8              eax_1 = &this->vtable;
004cbdf8          
004cbe02          eax->vtable->RegisterNoticeHandler(0x4dd1f9, eax_1);
004cbe11          struct gmNoticeHandler::VTable** eax_2;
004cbe11          
004cbe11          if (this == 0)
004cbe1b              eax_2 = nullptr;
004cbe11          else
004cbe13              eax_2 = &this->vtable;
004cbe13          
004cbe1d          eax->vtable->RegisterNoticeHandler(0x4dd254, eax_2);
004cbe2c          struct gmNoticeHandler::VTable** eax_3;
004cbe2c          
004cbe2c          if (this == 0)
004cbe36              eax_3 = nullptr;
004cbe2c          else
004cbe2e              eax_3 = &this->vtable;
004cbe2e          
004cbe38          eax->vtable->RegisterNoticeHandler(0x186a8, eax_3);
004cbe47          struct gmNoticeHandler::VTable** eax_4;
004cbe47          
004cbe47          if (this == 0)
004cbe51              eax_4 = nullptr;
004cbe47          else
004cbe49              eax_4 = &this->vtable;
004cbe49          
004cbe53          eax->vtable->RegisterNoticeHandler(0x4dd258, eax_4);
004cbdf2      }
004cbdf2      
004cbe67      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x10000064);
004cbe6e      class UIElement_ItemList* eax_6;
004cbe6e      
004cbe6e      if (eax_5 == 0)
004cbe81          eax_6 = nullptr;
004cbe6e      else
004cbe79          eax_6 = eax_5->vtable->DynamicCast(0x10000031);
004cbe79      
004cbe8a      this->m_topContainer = eax_6;
004cbe90      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x10000067);
004cbe97      class UIElement_ItemList* eax_8;
004cbe97      
004cbe97      if (eax_7 == 0)
004cbeaa          eax_8 = nullptr;
004cbe97      else
004cbea2          eax_8 = eax_7->vtable->DynamicCast(0x10000031);
004cbea2      
004cbeb3      this->m_containerList = eax_8;
004cbeb9      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x1000006a);
004cbec0      class UIElement_ItemList* eax_10;
004cbec0      
004cbec0      if (eax_9 == 0)
004cbed3          eax_10 = nullptr;
004cbec0      else
004cbecb          eax_10 = eax_9->vtable->DynamicCast(0x10000031);
004cbecb      
004cbed7      this->m_itemList = eax_10;
004cbed7      
004cbedd      if (eax_10 != 0)
004cbee8          UIElement_ItemList::RegisterItemListDragHandler(eax_10, &this->vtable);
004cbee8      
004cbefa      UIElement_ItemList::ItemList_SetChildList(this->m_topContainer, this->m_itemList);
004cbf0c      UIElement_ItemList::ItemList_SetChildList(this->m_containerList, this->m_itemList);
004cbf11      this->vtable->SetVisible(0);
004cbde0  }

004cbf1d                                                                                         90 90 90                               ...

004cbf20  class UIElement* gmExternalContainerUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004cbf20  {
004cbf25      void* eax = operator new(0x614);
004cbf25      
004cbf2f      if (eax == 0)
004cbf45          return 0;
004cbf45      
004cbf42      return gmExternalContainerUI::gmExternalContainerUI(eax, arg1, arg2);
004cbf20  }

004cbf46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004cbf50  void __thiscall gmExternalContainerUI::OnVisibilityChanged(class gmExternalContainerUI* this, uint8_t arg2)

004cbf50  {
004cbf59      UIElement::OnVisibilityChanged(this, arg2);
004cbf59      
004cbf6d      if (((((int8_t)(this->__inner23 >> 0x11)) & 1) != 0 && arg2 == 0))
004cbf71          gmExternalContainerUI::CloseCurrentContainer(this);
004cbf50  }

004cbf7b                                                                                   90 90 90 90 90                             .....

004cbf80  uint8_t __thiscall gmExternalContainerUI::OnItemListDragOver(class gmExternalContainerUI* this, class UIElement_UIItem* arg2, uint32_t arg3, uint32_t arg4, enum DropItemFlags arg5)

004cbf80  {
004cbf8d      if ((arg3 != 0 && (arg5 & 0xe) == 0))
004cbf8d      {
004cbfa3          if (gmExternalContainerUI::DragItemAcceptable(((char*)this - 0x600), arg3, 1) != 0)
004cbfa3          {
004cbfaa              UIElement_UIItem::SetDragAcceptState(arg2, 0x10000040);
004cbfaf              int32_t eax_1;
004cbfaf              eax_1 = 1;
004cbfb1              return 1;
004cbfa3          }
004cbfa3          
004cbfb9          UIElement_UIItem::SetDragAcceptState(arg2, 0x10000041);
004cbf8d      }
004cbf8d      
004cbfbe      uint32_t eax_2;
004cbfbe      eax_2 = 1;
004cbfc0      return 1;
004cbf80  }

004cbfc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004cbfd0  void __thiscall gmExternalContainerUI::RecvNotice_SetGroundObject(class gmExternalContainerUI* this, uint32_t arg2)

004cbfd0  {
004cbfd6      /* tailcall */
004cbfd6      return gmExternalContainerUI::SetGroundObject(((char*)this - 0x5f8), arg2);
004cbfd0  }

004cbfdb                                                                                   90 90 90 90 90                             .....

004cbfe0  void gmExternalContainerUI::Register()

004cbfe0  {
004cbfea      UIElement::RegisterElementClass(0x1000000d, gmExternalContainerUI::Create);
004cbfe0  }

004cbff3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004cc000  class UIElement* __thiscall gmCombatUI::DynamicCast(class gmCombatUI* this, uint32_t arg2) __pure

004cc000  {
004cc00c      if (arg2 == 0x1000000c)
004cc019          return this;
004cc019      
004cc013      int32_t edx_1;
004cc013      edx_1 = arg2 != 3;
004cc017      return (this & (edx_1 - 1));
004cc000  }

004cc01c                                                                                      90 90 90 90                              ....

004cc020  uint32_t gmCombatUI::GetUIElementType(class gmCombatUI const* this @ ecx) __pure

004cc020  {
004cc025      return 0x1000000c;
004cc020  }

004cc026                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004cc030  class UIElement* gmCombatUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004cc030  {
004cc036      void* result = operator new(0x600);
004cc036      
004cc042      if (result == 0)
004cc076          return 0;
004cc076      
004cc050      UIElement_Field::UIElement_Field(result, arg1, arg2);
004cc055      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004cc05f      *(uint32_t*)result = 0x7b8608;
004cc065      *(uint32_t*)((char*)result + 0x5f8) = 0x7b8360;
004cc072      return result;
004cc030  }

004cc077                                                                       90 90 90 90 90 90 90 90 90                         .........

004cc080  void __thiscall gmCombatUI::RecvNotice_AttackHeightChanged(class gmCombatUI* this, enum ATTACK_HEIGHT arg2)

004cc080  {
004cc08b      class UIElement* eax = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000056);
004cc08b      
004cc094      if (eax != 0)
004cc094      {
004cc09b          if (arg2 == HIGH_ATTACK_HEIGHT)
004cc0d1              UIElement::SetAttribute_Enum(eax, 0xb1, 0x10000057);
004cc09b          else
004cc09b          {
004cc09e              if (arg2 == 2)
004cc09e              {
004cc0bf                  UIElement::SetAttribute_Enum(eax, 0xb1, 0x10000058);
004cc0c4                  return;
004cc09e              }
004cc09e              
004cc0a1              if (arg2 == 3)
004cc0ad                  UIElement::SetAttribute_Enum(eax, 0xb1, 0x10000059);
004cc09b          }
004cc094      }
004cc080  }

004cc0d9                                                                             90 90 90 90 90 90 90                           .......

004cc0e0  void __thiscall gmCombatUI::RecvNotice_SetPowerbarLevel(class gmCombatUI* this, enum PowerBarMode arg2, float arg3)

004cc0e0  {
004cc0e5      if (arg2 == PBM_COMBAT)
004cc0e5      {
004cc0f2          class UIElement* eax_1 = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000050);
004cc0f2          
004cc0f9          if (eax_1 != 0)
004cc105              /* tailcall */
004cc105              return UIElement::SetAttribute_Float(eax_1, 0x69, arg3);
004cc0e5      }
004cc0e0  }

004cc10d                                         90 90 90                                                               ...

004cc110  void __thiscall gmCombatUI::RecvNotice_DesiredAttackPowerChanged(class gmCombatUI* this, float arg2)

004cc110  {
004cc11b      class UIElement* eax = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x1000004f);
004cc11b      
004cc122      if (eax != 0)
004cc130          UIElement::SetAttribute_Float(eax, 0x85, arg2);
004cc110  }

004cc138                                                                          90 90 90 90 90 90 90 90                          ........

004cc140  void* __thiscall gmCombatUI::`scalar deleting destructor'(class gmCombatUI* this, uint32_t arg2)

004cc140  {
004cc14a      this->vtable = 0x7b8608;
004cc144      this->vtable = &gmCombatUI::`vftable';
004cc156      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004cc156      
004cc15d      if (eax != 0)
004cc15f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004cc15f      
004cc144      this->vtable = &gmUrgentAssistanceUI::`vftable';
004cc16f      NoticeHandler::~NoticeHandler(&this->vtable);
004cc176      UIElement_Field::~UIElement_Field(this);
004cc176      
004cc180      if ((arg2 & 1) != 0)
004cc183          operator delete(this);
004cc183      
004cc18f      return this;
004cc140  }

004cc192                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004cc1a0  void __fastcall gmCombatUI::PostInit(class gmCombatUI* this)

004cc1a0  {
004cc1aa      UIElement::PostInit(this);
004cc1af      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004cc1af      
004cc1b8      if (eax != 0)
004cc1b8      {
004cc1bc          struct gmNoticeHandler::VTable** eax_1;
004cc1bc          
004cc1bc          if (this == 0)
004cc1c6              eax_1 = nullptr;
004cc1bc          else
004cc1be              eax_1 = &this->vtable;
004cc1be          
004cc1c8          eax->vtable->RegisterNoticeHandler(0x4dd1fb, eax_1);
004cc1d7          struct gmNoticeHandler::VTable** eax_2;
004cc1d7          
004cc1d7          if (this == 0)
004cc1e1              eax_2 = nullptr;
004cc1d7          else
004cc1d9              eax_2 = &this->vtable;
004cc1d9          
004cc1e3          eax->vtable->RegisterNoticeHandler(0x4dd1fc, eax_2);
004cc1f2          struct gmNoticeHandler::VTable** eax_3;
004cc1f2          
004cc1f2          if (this == 0)
004cc1fc              eax_3 = nullptr;
004cc1f2          else
004cc1f4              eax_3 = &this->vtable;
004cc1f4          
004cc1fe          eax->vtable->RegisterNoticeHandler(0x4dd249, eax_3);
004cc20d          struct gmNoticeHandler::VTable** eax_4;
004cc20d          
004cc20d          if (this == 0)
004cc217              eax_4 = nullptr;
004cc20d          else
004cc20f              eax_4 = &this->vtable;
004cc20f          
004cc219          eax->vtable->RegisterNoticeHandler(0x4dd1e6, eax_4);
004cc1b8      }
004cc1b8      
004cc22a      void var_90;
004cc22a      StringInfo::StringInfo(&var_90);
004cc236      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100005ef);
004cc23d      class UIElement_Field* eax_6;
004cc23d      
004cc23d      if (eax_5 == 0)
004cc24d          eax_6 = nullptr;
004cc23d      else
004cc245          eax_6 = eax_5->vtable->DynamicCast(3);
004cc245      
004cc24f      this->m_RecklessnessField = eax_6;
004cc255      eax_6->vtable->SetVisible(0);
004cc265      class UIElement* eax_7;
004cc265      enum PlayerOption edx_7;
004cc265      eax_7 = UIElement::GetChildRecursive(this, 0x10000053);
004cc26c      void* eax_8;
004cc26c      
004cc26c      if (eax_7 != 0)
004cc277          eax_8 = eax_7->vtable->DynamicCast(0x10000035);
004cc277      
004cc27f      int32_t* edi_1;
004cc27f      
004cc27f      if ((eax_7 == 0 || eax_8 == 0))
004cc286          edi_1 = nullptr;
004cc27f      else
004cc281          edi_1 = ((char*)eax_8 - 0x20);
004cc281      
004cc288      int32_t var_9c_5 = 0;
004cc28c      UIOption_Checkbox::SetPlayerOption(edi_1, edx_7);
004cc2a8      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CombatPanelOption_AutoRepeatA…"), 0x10000003);
004cc2b5      UIElement_Text::SetStringInfo(&edi_1[8], &var_90);
004cc2d1      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_AutoRepeatAttack…"), 0x10000003);
004cc2df      *(uint32_t*)(*(uint32_t*)edi_1 + 0x2b4)(&var_90);
004cc2ec      class UIElement* eax_11;
004cc2ec      enum PlayerOption edx_10;
004cc2ec      eax_11 = UIElement::GetChildRecursive(this, 0x10000054);
004cc2f3      void* eax_12;
004cc2f3      
004cc2f3      if (eax_11 != 0)
004cc2fe          eax_12 = eax_11->vtable->DynamicCast(0x10000035);
004cc2fe      
004cc306      int32_t* edi_2;
004cc306      
004cc306      if ((eax_11 == 0 || eax_12 == 0))
004cc30d          edi_2 = nullptr;
004cc306      else
004cc308          edi_2 = ((char*)eax_12 - 0x20);
004cc308      
004cc30f      int32_t var_9c_8 = 0xd;
004cc313      UIOption_Checkbox::SetPlayerOption(edi_2, edx_10);
004cc32f      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CombatPanelOption_AutoTarget"), 0x10000003);
004cc33c      UIElement_Text::SetStringInfo(&edi_2[8], &var_90);
004cc358      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_AutoTarget_Help"), 0x10000003);
004cc366      *(uint32_t*)(*(uint32_t*)edi_2 + 0x2b4)(&var_90);
004cc373      class UIElement* eax_15;
004cc373      enum PlayerOption edx_13;
004cc373      eax_15 = UIElement::GetChildRecursive(this, 0x10000055);
004cc37a      void* eax_16;
004cc37a      
004cc37a      if (eax_15 != 0)
004cc385          eax_16 = eax_15->vtable->DynamicCast(0x10000035);
004cc385      
004cc38d      int32_t* esi_1;
004cc38d      
004cc38d      if ((eax_15 == 0 || eax_16 == 0))
004cc394          esi_1 = nullptr;
004cc38d      else
004cc38f          esi_1 = ((char*)eax_16 - 0x20);
004cc38f      
004cc396      int32_t var_9c_11 = 7;
004cc39a      UIOption_Checkbox::SetPlayerOption(esi_1, edx_13);
004cc3b6      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CombatPanelOption_ViewCombatT…"), 0x10000003);
004cc3c3      UIElement_Text::SetStringInfo(&esi_1[8], &var_90);
004cc3df      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_PlayerOption_ViewCombatTarget…"), 0x10000003);
004cc3ed      *(uint32_t*)(*(uint32_t*)esi_1 + 0x2b4)(&var_90);
004cc3f7      StringInfo::~StringInfo(&var_90);
004cc1a0  }

004cc405                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004cc410  void gmCombatUI::Register()

004cc410  {
004cc41a      UIElement::RegisterElementClass(0x1000000c, gmCombatUI::Create);
004cc410  }

004cc423           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004cc430  enum UIElementMessageListenResult __fastcall gmCombatUI::ListenToElementMessage(class gmCombatUI* this, struct UIElementMessageInfo const* arg2)

004cc430  {
004cc433      int32_t __saved_ebx_1;
004cc433      int32_t __saved_ebx = __saved_ebx_1;
004cc434      enum SKILL_ADVANCEMENT_CLASS ebp;
004cc434      enum SKILL_ADVANCEMENT_CLASS var_1c = ebp;
004cc435      struct UIElementMessageInfo* ebp_1 = arg2;
004cc439      uint32_t idMessage = ebp_1->idMessage;
004cc43d      int32_t __saved_esi_1;
004cc43d      int32_t __saved_esi = __saved_esi_1;
004cc43e      int32_t __saved_edi_2;
004cc43e      int32_t __saved_edi_1 = __saved_edi_2;
004cc43e      int32_t __saved_edi;
004cc43e      int32_t* esp_1 = &__saved_edi;
004cc441      struct Turbine_GUID* var_2c;
004cc441      
004cc441      if (idMessage == 1)
004cc441      {
004cc5c9          uint32_t idElement_1 = ebp_1->idElement;
004cc5d1          float var_28_10;
004cc5d1          
004cc5d1          if (idElement_1 == 0x10000057)
004cc5d1          {
004cc5f4              var_28_10 = -1f;
004cc5f5              var_2c = 1;
004cc5fe              ClientCombatSystem::EndAttackRequest(ClientCombatSystem::GetCombatSystem(), var_2c, var_28_10);
004cc5fe              esp_1 = &__saved_edi;
004cc5d1          }
004cc5d1          else if (idElement_1 == 0x10000058)
004cc5d4          {
004cc5ea              var_28_10 = -1f;
004cc5eb              var_2c = 2;
004cc5fe              ClientCombatSystem::EndAttackRequest(ClientCombatSystem::GetCombatSystem(), var_2c, var_28_10);
004cc5fe              esp_1 = &__saved_edi;
004cc5d4          }
004cc5d4          else if (idElement_1 == 0x10000059)
004cc5d7          {
004cc5df              var_28_10 = -1f;
004cc5e0              var_2c = 3;
004cc5fe              ClientCombatSystem::EndAttackRequest(ClientCombatSystem::GetCombatSystem(), var_2c, var_28_10);
004cc5fe              esp_1 = &__saved_edi;
004cc5d7          }
004cc441      }
004cc441      else if (idMessage == 0xa)
004cc44a      {
004cc4cd          struct UIElementMessageInfo const** var_28_7 = &arg2;
004cc4d2          var_2c = &PlayerDesc_ClassType;
004cc4da          arg2 = nullptr;
004cc4e5          class TResult __return;
004cc4e5          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28_7);
004cc4ea          struct UIElementMessageInfo* ecx_7 = arg2;
004cc4f3          var_2c = ecx_7;
004cc4f5          int32_t var_28_8 = 0;
004cc4f8          struct Turbine_GUID* eax_13 = var_2c;
004cc4fe          int32_t var_8 = 0;
004cc502          int32_t var_4_1 = 0;
004cc502          
004cc506          if (eax_13 != 0)
004cc50c              *(uint32_t*)(eax_13->m_data1 + 0x10)();
004cc50c          
004cc518          void var_c;
004cc518          InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004cc518          
004cc51f          if (ecx_7 != 0)
004cc525              *(uint32_t*)(ecx_7->idElement + 0x14)();
004cc525          
004cc528          class TResult __return_1 = __return;
004cc531          int32_t var_34_1 = 0x32;
004cc535          CACQualities::InqSkillAdvancementClass(__return_1, 0x32, &var_1c);
004cc53f          class UIElement_Field* m_RecklessnessField = this->m_RecklessnessField;
004cc53f          
004cc545          if (var_1c < TRAINED_SKILL_ADVANCEMENT_CLASS)
004cc545          {
004cc552              int32_t var_30_5 = 0;
004cc550              m_RecklessnessField->vtable->SetVisible(0);
004cc553              esp_1 = &var_2c;
004cc545          }
004cc545          else
004cc545          {
004cc549              int32_t var_30_4 = 1;
004cc547              m_RecklessnessField->vtable->SetVisible(1);
004cc54b              esp_1 = &var_2c;
004cc545          }
004cc545          
004cc559          long double x87_r7_1 = ((long double)ebp_1->dwParam1);
004cc559          
004cc55e          if (ebp_1->dwParam1 < 0)
004cc560              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
004cc560          
004cc566          long double x87_r7_2 = (x87_r7_1 * ((long double)0.00100000005f));
004cc56c          float var_4_2 = ((float)x87_r7_2);
004cc570          long double temp10_1 = ((long double)1f);
004cc570          (x87_r7_2 - temp10_1);
004cc570          
004cc57b          if ((*(uint8_t*)((char*)((((x87_r7_2 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp10_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
004cc57b          {
004cc58b              (((long double)var_4_2) - ((long double)0f));
004cc593              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004cc593              
004cc596              if (!(p_1))
004cc598                  var_4_2 = 0f;
004cc57b          }
004cc57b          else
004cc57d              var_4_2 = 1f;
004cc57d          
004cc5a0          ClientCombatSystem::GetCombatSystem()->m_rUIRequestedPower = var_4_2;
004cc5a0          
004cc5ae          if (__return_1 != 0)
004cc5ae          {
004cc5b4              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004cc5c6              return UIElement::ListenToElementMessage(this, ebp_1);
004cc5ae          }
004cc44a      }
004cc44a      else if (idMessage == 0x1c)
004cc44f      {
004cc455          uint32_t idElement = ebp_1->idElement;
004cc455          
004cc45d          if (idElement == 0x10000057)
004cc45d          {
004cc4b2              ClientCombatSystem::SetRequestedAttackHeight(ClientCombatSystem::GetCombatSystem(), HIGH_ATTACK_HEIGHT);
004cc4c6              return UIElement::ListenToElementMessage(this, ebp_1);
004cc45d          }
004cc45d          
004cc460          if (idElement == 0x10000058)
004cc460          {
004cc492              ClientCombatSystem::SetRequestedAttackHeight(ClientCombatSystem::GetCombatSystem(), MEDIUM_ATTACK_HEIGHT);
004cc4a6              return UIElement::ListenToElementMessage(this, ebp_1);
004cc460          }
004cc460          
004cc463          if (idElement == 0x10000059)
004cc463          {
004cc472              ClientCombatSystem::SetRequestedAttackHeight(ClientCombatSystem::GetCombatSystem(), LOW_ATTACK_HEIGHT);
004cc486              return UIElement::ListenToElementMessage(this, ebp_1);
004cc463          }
004cc44f      }
004cc603      *(uint32_t*)((char*)esp_1 - 4) = ebp_1;
004cc606      int32_t result = UIElement::ListenToElementMessage(this);
004cc60b      *(uint32_t*)esp_1;
004cc603      esp_1[1];
004cc603      esp_1[2];
004cc603      esp_1[3];
004cc612      return result;
004cc430  }

004cc615                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004cc620  void __fastcall gmCombatUI::RecvNotice_SetCombatMode(class gmCombatUI* this, enum COMBAT_MODE arg2)

004cc620  {
004cc624      enum SKILL_ADVANCEMENT_CLASS esi;
004cc624      enum SKILL_ADVANCEMENT_CLASS var_1c = esi;
004cc637      struct Turbine_GUID** esp;
004cc637      struct Turbine_GUID* __saved_edi;
004cc637      
004cc637      if (PlayerModule::AdvancedCombatUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0)
004cc637      {
004cc748          *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(0);
004cc748          esp = &__saved_edi;
004cc637      }
004cc637      else
004cc637      {
004cc63d          enum COMBAT_MODE eax_2 = arg2;
004cc63d          
004cc644          if (eax_2 != MELEE_COMBAT_MODE)
004cc644          {
004cc70d              if (eax_2 == MISSILE_COMBAT_MODE)
004cc70d              {
004cc722                  *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x9c)(0x10000004);
004cc72e                  *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004cc737                  return;
004cc70d              }
004cc70d              
004cc748              *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(0);
004cc748              esp = &__saved_edi;
004cc644          }
004cc644          else
004cc644          {
004cc65d              *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x9c)(0x10000003);
004cc669              *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004cc670              enum COMBAT_MODE* var_24_2 = &arg2;
004cc675              struct Turbine_GUID* var_28 = &PlayerDesc_ClassType;
004cc67d              arg2 = UNDEF_COMBAT_MODE;
004cc688              class TResult __return;
004cc688              InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_28, var_24_2);
004cc68d              enum COMBAT_MODE ecx_4 = arg2;
004cc696              var_28 = ecx_4;
004cc698              int32_t var_24_3 = 0;
004cc69b              struct Turbine_GUID* eax_5 = var_28;
004cc6a1              int32_t var_8 = 0;
004cc6a5              int32_t var_4_1 = 0;
004cc6a5              
004cc6a9              if (eax_5 != 0)
004cc6af                  *(uint32_t*)(eax_5->m_data1 + 0x10)();
004cc6af              
004cc6bb              void var_c;
004cc6bb              InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004cc6bb              
004cc6c2              if (ecx_4 != UNDEF_COMBAT_MODE)
004cc6c8                  *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
004cc6c8              
004cc6cb              class TResult __return_1 = __return;
004cc6d8              CACQualities::InqSkillAdvancementClass(__return_1, 0x32, &var_1c);
004cc6e2              struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004cc6e2              
004cc6e5              if (var_1c < TRAINED_SKILL_ADVANCEMENT_CLASS)
004cc6e5              {
004cc6f3                  *(uint32_t*)(vtable->__vecDelDtor + 0x18)(0);
004cc6f3                  esp = &var_28;
004cc6e5              }
004cc6e5              else
004cc6e5              {
004cc6eb                  *(uint32_t*)(vtable->__vecDelDtor + 0x18)(1);
004cc6eb                  esp = &var_28;
004cc6e5              }
004cc6e5              
004cc6f8              if (__return_1 != 0)
004cc6f8              {
004cc6fe                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004cc707                  return;
004cc6f8              }
004cc644          }
004cc637      }
004cc74b      *(uint32_t*)esp;
004cc74b      esp[1];
004cc74b      esp[2];
004cc620  }

004cc754                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004cc760  void __thiscall gmEnvPanelUI::RecvNotice_SetPanelVisibility(class gmEnvPanelUI* this, uint32_t arg2, uint8_t arg3)

004cc760  {
004cc769      int32_t __saved_esi;
004cc769      int32_t* esp = &__saved_esi;
004cc769      
004cc76c      if (arg2 != 0)
004cc76c      {
004cc775          int32_t ecx = 0;
004cc775          
004cc779          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] > 0)
004cc779          {
004cc77f              struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004cc783              int32_t __saved_edi;
004cc783              int32_t* esp_1 = &__saved_edi;
004cc783              
004cc78b              while ((vtable->__vecDelDtor == 0 || *(int32_t*)((char*)vtable + 4) != arg2))
004cc78b              {
004cc790                  ecx += 1;
004cc791                  vtable = &vtable[3];
004cc791                  
004cc796                  if (ecx >= this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0])
004cc79c                      return;
004cc78b              }
004cc78b              
004cc79f              void* (__thiscall* __vecDelDtor)(class HashSet<UIElement *>* this, uint32_t) = vtable->__vecDelDtor;
004cc7a3              int32_t ebx;
004cc7a3              ebx = *(int32_t*)((char*)vtable + 8);
004cc7a3              
004cc7a6              if (__vecDelDtor != 0)
004cc7a6              {
004cc7ac                  vtable = arg3;
004cc7b2                  class HashSetData<UIElement *>* ecx_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004cc7b5                  int32_t var_14;
004cc7b5                  
004cc7b5                  if (vtable == 0)
004cc7b5                  {
004cc85b                      var_14 = 0;
004cc85b                      esp_1 = &var_14;
004cc85b                      
004cc85c                      if (ecx_1 == __vecDelDtor)
004cc85c                      {
004cc85e                          ecx_1->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3]();
004cc85e                          
004cc869                          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2])
004cc86b                              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = nullptr;
004cc86b                          
004cc86e                          class HashSetData<UIElement *>* ecx_9 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2];
004cc86e                          
004cc873                          if (ecx_9 == 0)
004cc873                          {
004cc8a8                              int32_t eax_13 = *(int32_t*)((char*)this + -0x5f8);
004cc8b5                              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = nullptr;
004cc8b8                              *(uint32_t*)(eax_13 + 0x18)(0);
004cc8bf                              return;
004cc873                          }
004cc873                          
004cc875                          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = ecx_9;
004cc878                          ecx_9->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](1);
004cc882                          int32_t ebx_1 = *(int32_t*)((char*)this + -0x5f8);
004cc893                          var_14 = UIRegion::GetHeight(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1]);
004cc89e                          *(uint32_t*)(ebx_1 + 0x30)(UIRegion::GetWidth(((char*)this - 0x5f8)), var_14);
004cc8a5                          return;
004cc85c                      }
004cc85c                      
004cc8c6                      *(uint32_t*)(*(uint32_t*)__vecDelDtor + 0x18)();
004cc7b5                  }
004cc7b5                  else
004cc7b5                  {
004cc7bd                      int32_t eax_9;
004cc7bd                      
004cc7bd                      if (ecx_1 == __vecDelDtor)
004cc7bd                      {
004cc82c                          class UIElement* m_hashKey = ecx_1->m_hashKey;
004cc82e                          var_14 = 1;
004cc830                          m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](var_14);
004cc833                          eax_9 = *(int32_t*)((char*)this + -0x5f8);
004cc7bd                      }
004cc7bd                      else
004cc7bd                      {
004cc7c1                          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = __vecDelDtor;
004cc7c1                          
004cc7d0                          if ((ecx_1 != 0 && (((int8_t)(*(int32_t*)((char*)ecx_1 + 0xa4) >> 1)) & 1) != 0))
004cc7d0                          {
004cc7d6                              var_14 = &arg3;
004cc7dc                              arg3 = 0;
004cc7e0                              UIElement::GetAttribute_Enum(ecx_1, 0x10000029, var_14);
004cc7e5                              uint32_t eax_4 = arg3;
004cc7e9                              var_14 = 0;
004cc7eb                              CM_UI::SendNotice_SetPanelVisibility(eax_4, var_14);
004cc7d0                          }
004cc7d0                          
004cc7f3                          int32_t edx = *(uint32_t*)__vecDelDtor;
004cc7f5                          var_14 = 1;
004cc7f9                          *(uint32_t*)(edx + 0x18)(var_14);
004cc80a                          arg3 = *(int32_t*)((char*)this + -0x5f8);
004cc813                          var_14 = UIRegion::GetHeight(__vecDelDtor);
004cc822                          *(uint32_t*)(arg3 + 0x30)(UIRegion::GetWidth(((char*)this - 0x5f8)), var_14);
004cc825                          eax_9 = *(int32_t*)((char*)this + -0x5f8);
004cc7bd                      }
004cc7bd                      
004cc83f                      var_14 = 1;
004cc841                      *(uint32_t*)(eax_9 + 0x18)(var_14);
004cc841                      esp_1 = &__saved_edi;
004cc841                      
004cc846                      if (ebx != 0)
004cc846                      {
004cc851                          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004cc856                          return;
004cc846                      }
004cc7b5                  }
004cc7a6              }
004cc7a6              
004cc8c9              *(uint32_t*)esp_1;
004cc8c9              esp_1[1];
004cc8ca              esp = &esp_1[2];
004cc779          }
004cc76c      }
004cc76c      
004cc8cb      *(uint32_t*)esp;
004cc8cb      esp[1];
004cc760  }


004cc8d0  void __thiscall gmEnvPanelUI::gmEnvPanelUI(class gmEnvPanelUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004cc8d0  {
004cc8df      UIElement_Field::UIElement_Field(this, arg2, arg3);
004cc8e4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004cc8f0      this->vtable = 0x7b8c38;
004cc8f6      this->vtable = &gmEnvPanelUI::`vftable';
004cc900      __builtin_memset(&this->m_childrenInfoArray, 0, 0x14);
004cc8d0  }

004cc924              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004cc930  class UIElement* __thiscall gmEnvPanelUI::DynamicCast(class gmEnvPanelUI* this, uint32_t arg2) __pure

004cc930  {
004cc93c      if (arg2 == 0x10000033)
004cc949          return this;
004cc949      
004cc943      int32_t edx_1;
004cc943      edx_1 = arg2 != 3;
004cc947      return (this & (edx_1 - 1));
004cc930  }

004cc94c                                      90 90 90 90                                                              ....

004cc950  uint32_t gmEnvPanelUI::GetUIElementType(class gmEnvPanelUI const* this @ ecx) __pure

004cc950  {
004cc955      return 0x10000033;
004cc950  }

004cc956                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cc960  class UIElement* gmEnvPanelUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004cc960  {
004cc965      void* eax = operator new(0x610);
004cc965      
004cc96f      if (eax == 0)
004cc985          return 0;
004cc985      
004cc982      return gmEnvPanelUI::gmEnvPanelUI(eax, arg1, arg2);
004cc960  }

004cc986                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004cc990  void __fastcall gmEnvPanelUI::~gmEnvPanelUI(class gmEnvPanelUI* this)

004cc990  {
004cc9a3      this->vtable = 0x7b8c38;
004cc99b      this->vtable = &gmEnvPanelUI::`vftable';
004cc9af      SmartArray<Vector3,1>::Reset(&this->m_childrenInfoArray);
004cc9b4      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004cc9b4      
004cc9bb      if (eax != 0)
004cc9bd          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004cc9bd      
004cc9d2      if ((this->m_childrenInfoArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004cc9d7          operator delete[](this->m_childrenInfoArray.m_data);
004cc9d7      
004cc99b      this->vtable = &gmUrgentAssistanceUI::`vftable';
004cc9e7      NoticeHandler::~NoticeHandler(&this->vtable);
004cc9f1      /* tailcall */
004cc9f1      return UIElement_Field::~UIElement_Field(this);
004cc990  }

004cc9f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cca00  void gmEnvPanelUI::Register()

004cca00  {
004cca0a      UIElement::RegisterElementClass(0x10000033, gmEnvPanelUI::Create);
004cca00  }

004cca13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004cca20  void* __thiscall gmEnvPanelUI::`scalar deleting destructor'(class gmEnvPanelUI* this, uint32_t arg2)

004cca20  {
004cca23      gmEnvPanelUI::~gmEnvPanelUI(this);
004cca23      
004cca2d      if ((arg2 & 1) != 0)
004cca30          operator delete(this);
004cca30      
004cca3b      return this;
004cca20  }

004cca3e                                                                                            90 90                                ..

004cca40  void __fastcall gmEnvPanelUI::SetupChildren(class gmEnvPanelUI* this)

004cca40  {
004cca4d      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000005d);
004cca5e      class UIElement* var_c = eax;
004cca62      void var_8;
004cca62      UIElement::GetAttribute_Enum(eax, 0x10000029, &var_8);
004cca74      char var_4 = 0;
004cca79      SmartArray<gmCombatPanelUI::PanelChildInfo,1>::AddToEnd(&this->m_childrenInfoArray.m_data, &var_c);
004cca85      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x1000005e);
004cca96      var_c = eax_1;
004cca9a      UIElement::GetAttribute_Enum(eax_1, 0x10000029, &var_8);
004ccaa6      char var_4_1 = 0;
004ccaab      SmartArray<gmCombatPanelUI::PanelChildInfo,1>::AddToEnd(&this->m_childrenInfoArray.m_data, &var_c);
004ccab7      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x1000005f);
004ccac8      var_c = eax_2;
004ccacc      UIElement::GetAttribute_Enum(eax_2, 0x10000029, &var_8);
004ccad8      char var_4_2 = 0;
004ccadd      SmartArray<gmCombatPanelUI::PanelChildInfo,1>::AddToEnd(&this->m_childrenInfoArray.m_data, &var_c);
004ccae9      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x10000060);
004ccafa      var_c = eax_3;
004ccafe      UIElement::GetAttribute_Enum(eax_3, 0x10000029, &var_8);
004ccb0a      char var_4_3 = 0;
004ccb0f      SmartArray<gmCombatPanelUI::PanelChildInfo,1>::AddToEnd(&this->m_childrenInfoArray.m_data, &var_c);
004ccb1b      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000062);
004ccb2c      var_c = eax_4;
004ccb30      UIElement::GetAttribute_Enum(eax_4, 0x10000029, &var_8);
004ccb3c      char var_4_4 = 0;
004ccb41      SmartArray<gmCombatPanelUI::PanelChildInfo,1>::AddToEnd(&this->m_childrenInfoArray, &var_c);
004ccb4c      int32_t i = 0;
004ccb4c      
004ccb50      if (this->m_childrenInfoArray.m_num > 0)
004ccb50      {
004ccb53          int32_t ebx_1 = 0;
004ccb53          
004ccb70          do
004ccb70          {
004ccb61              *(uint32_t*)(**(uint32_t**)(this->m_childrenInfoArray.m_data + ebx_1) + 0x18)(0);
004ccb6a              i += 1;
004ccb6b              ebx_1 += 0xc;
004ccb70          } while (i < this->m_childrenInfoArray.m_num);
004ccb50      }
004cca40  }

004ccb7a                                                                                90 90 90 90 90 90                            ......

004ccb80  void __fastcall gmEnvPanelUI::PostInit(class gmEnvPanelUI* this)

004ccb80  {
004ccb84      UIElement::PostInit(this);
004ccb89      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ccb89      
004ccb92      if (eax != 0)
004ccb92      {
004ccb96          struct gmNoticeHandler::VTable** eax_1;
004ccb96          
004ccb96          if (this == 0)
004ccba0              eax_1 = nullptr;
004ccb96          else
004ccb98              eax_1 = &this->vtable;
004ccb98          
004ccba2          eax->vtable->RegisterNoticeHandler(0x4dd1f8, eax_1);
004ccbb1          struct gmNoticeHandler::VTable** eax_2;
004ccbb1          
004ccbb1          if (this == 0)
004ccbbb              eax_2 = nullptr;
004ccbb1          else
004ccbb3              eax_2 = &this->vtable;
004ccbb3          
004ccbbd          eax->vtable->RegisterNoticeHandler(0x4dd1fb, eax_2);
004ccb92      }
004ccb92      
004ccbce      /* tailcall */
004ccbce      return gmEnvPanelUI::SetupChildren(this);
004ccb80  }

004ccbd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004ccbe0  class UIElement* __thiscall gmAdminQualitiesUI::DynamicCast(class gmAdminQualitiesUI* this, uint32_t arg2) __pure

004ccbe0  {
004ccbec      if (arg2 == 0x1000003f)
004ccbf9          return this;
004ccbf9      
004ccbf3      int32_t edx_1;
004ccbf3      edx_1 = arg2 != 3;
004ccbf7      return (this & (edx_1 - 1));
004ccbe0  }

004ccbfc                                                                                      90 90 90 90                              ....

004ccc00  uint32_t gmAdminQualitiesUI::GetUIElementType(class gmAdminQualitiesUI const* this @ ecx) __pure

004ccc00  {
004ccc05      return 0x1000003f;
004ccc00  }

004ccc06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004ccc10  class UIElement* gmAdminQualitiesUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004ccc10  {
004ccc16      void* result = operator new(0x5fc);
004ccc16      
004ccc22      if (result == 0)
004ccc56          return 0;
004ccc56      
004ccc30      UIElement_Field::UIElement_Field(result, arg1, arg2);
004ccc35      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004ccc3f      *(uint32_t*)result = 0x7b8f50;
004ccc45      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004ccc52      return result;
004ccc10  }

004ccc57                                                                       90 90 90 90 90 90 90 90 90                         .........

004ccc60  void* __thiscall gmAdminQualitiesUI::`scalar deleting destructor'(class gmAdminQualitiesUI* this, uint32_t arg2)

004ccc60  {
004ccc69      this->vtable = 0x7b8f50;
004ccc63      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ccc63      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ccc7b      NoticeHandler::~NoticeHandler(&this->vtable);
004ccc82      UIElement_Field::~UIElement_Field(this);
004ccc82      
004ccc8c      if ((arg2 & 1) != 0)
004ccc8f          operator delete(this);
004ccc8f      
004ccc9a      return this;
004ccc60  }

004ccc9d                                                                                         90 90 90                               ...

004ccca0  void gmAdminQualitiesUI::Register()

004ccca0  {
004cccaa      UIElement::RegisterElementClass(0x1000003f, gmAdminQualitiesUI::Create);
004ccca0  }

004cccb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004cccc0  void __thiscall gmMainChatUI::MoveTo(class gmMainChatUI* this, int32_t const arg2, int32_t const arg3)

004cccc0  {
004cccc6      int32_t eax = UIRegion::GetScreenX0(this);
004ccccf      int32_t eax_1 = UIRegion::GetScreenY0(this);
004ccce2      UIElement::MoveTo(this, arg2, arg3);
004ccce9      int32_t eax_3 = UIRegion::GetScreenX0(this);
004cccf2      int32_t eax_4 = UIRegion::GetScreenY0(this);
004cccf2      
004cccfd      if (eax != eax_3)
004cccfd      {
004ccd08          arg3 = 0;
004ccd17          int32_t const eax_6;
004ccd17          
004ccd17          if (UIElement::GetAttribute_Int(this, 0x54, &arg3) != 0)
004ccd21              eax_6 = arg3;
004ccd17          else
004ccd17          {
004ccd19              eax_6 = 0;
004ccd1b              arg3 = 0;
004ccd17          }
004ccd17          
004ccd2e          UIElement::SetAttribute_Int(this, 0x54, ((eax_6 - eax) + eax_3));
004cccfd      }
004cccfd      
004ccd37      if (eax_1 != eax_4)
004ccd37      {
004ccd42          arg3 = 0;
004ccd51          int32_t const eax_10;
004ccd51          
004ccd51          if (UIElement::GetAttribute_Int(this, 0x55, &arg3) != 0)
004ccd5b              eax_10 = arg3;
004ccd51          else
004ccd51          {
004ccd53              eax_10 = 0;
004ccd55              arg3 = 0;
004ccd51          }
004ccd51          
004ccd6c          UIElement::SetAttribute_Int(this, 0x55, ((eax_10 - eax_1) + eax_4));
004ccd37      }
004cccc0  }

004ccd78                                                                          90 90 90 90 90 90 90 90                          ........

004ccd80  void __thiscall gmMainChatUI::RecvNotice_SetPanelVisibility(class gmMainChatUI* this, uint32_t arg2, uint8_t arg3)

004ccd80  {
004ccd8c      uint32_t eax_2;
004ccd8c      
004ccd8c      if ((arg2 - 0x10000505) <= 0xb)
004ccd95          switch (arg2)
004ccd95          {
004ccd9c              case 0x10000505:
004ccd9c              {
004ccd9c                  eax_2 = 0x10000522;
004ccdbf              label_4ccdbf:
004ccdbf                  class UIElement* ecx_1 = UIElement::GetChildRecursive(&this->vtable, eax_2);
004ccdbf                  
004ccdc3                  if (ecx_1 != 0)
004ccdc3                  {
004ccdc5                      class UIElement* eax_3;
004ccdc5                      eax_3 = arg3;
004ccdc5                      
004ccdcb                      if (eax_3 != 0)
004ccdcb                      {
004ccdcd                          ecx_1->vtable->SetState(6);
004ccdd7                          return;
004ccdcb                      }
004ccdcb                      
004ccdda                      ecx_1->vtable->SetState(1);
004ccdc3                  }
004ccd9c                  break;
004ccd9c              }
004ccda3              case 0x1000050e:
004ccda3              {
004ccda3                  eax_2 = 0x10000523;
004ccda8                  goto label_4ccdbf;
004ccda3              }
004ccdaa              case 0x1000050f:
004ccdaa              {
004ccdaa                  eax_2 = 0x10000524;
004ccdaf                  goto label_4ccdbf;
004ccdaa              }
004ccdb1              case 0x10000510:
004ccdb1              {
004ccdb1                  eax_2 = 0x10000525;
004ccdb1                  goto label_4ccdbf;
004ccdb1              }
004ccd95          }
004ccd80  }

004ccde7                       90                                                                                 .
004ccde8  uint32_t jump_table_4ccde8[0x5] = 
004ccde8  {
004ccde8      [0x0] =  0x004ccd9c
004ccdec      [0x1] =  0x004ccda3
004ccdf0      [0x2] =  0x004ccdaa
004ccdf4      [0x3] =  0x004ccdb1
004ccdf8      [0x4] =  0x004ccde4
004ccdfc  }
004ccdfc  uint8_t lookup_table_4ccdfc[0xc] = 
004ccdfc  {
004ccdfc      [0x0] =  0x00
004ccdfd      [0x1] =  0x04
004ccdfe      [0x2] =  0x04
004ccdff      [0x3] =  0x04
004cce00      [0x4] =  0x04
004cce01      [0x5] =  0x04
004cce02      [0x6] =  0x04
004cce03      [0x7] =  0x04
004cce04      [0x8] =  0x04
004cce05      [0x9] =  0x01
004cce06      [0xa] =  0x02
004cce07      [0xb] =  0x03
004cce08  }

004cce08                          90 90 90 90 90 90 90 90                                                          ........

004cce10  void __thiscall gmMainChatUI::RecvNotice_TextTag_IIDStringClick(class gmMainChatUI* this, uint32_t arg2, uint32_t arg3, class PStringBase<unsigned short> const* arg4)

004cce10  {
004cce1b      if ((arg2 == 0x10000001 && ChatInterface::IsTextEntryFocused(this) == 0))
004cce2d          ChatInterface::StartTell(this, arg4);
004cce10  }

004cce36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cce40  void __thiscall gmMainChatUI::RecvNotice_StartTell(class gmMainChatUI* this, class PStringBase<unsigned short> const* arg2)

004cce40  {
004cce40      /* tailcall */
004cce40      return ChatInterface::StartTell(this, arg2);
004cce40  }

004cce45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004cce50  void __fastcall gmMainChatUI::HandleMaximizeButton(class gmMainChatUI* this)

004cce50  {
004cce64      int32_t var_10 = 0;
004cce68      int32_t var_18 = 0;
004cce6c      class UIElement* eax = UIElement::GetChildRecursive(&this->vtable, 0x1000046f);
004cce6c      
004cce77      if (((eax != 0 && UIElement::GetAttribute_Int(&this->vtable, 0x3c, &var_10) != 0) && UIElement::GetAttribute_Int(&this->vtable, 0x3e, &var_18) != 0))
004cce77      {
004ccebb          int32_t eax_5;
004ccebb          int32_t edx_2;
004ccebb          edx_2 = HIGHD(((int64_t)UIRegion::GetHeight(this->vtable->GetParent())));
004ccebb          eax_5 = LOWD(((int64_t)UIRegion::GetHeight(this->vtable->GetParent())));
004ccec2          int32_t ebx_2 = ((eax_5 - edx_2) >> 1);
004ccec4          int32_t eax_7 = UIRegion::GetHeight(&this->vtable);
004ccec9          int32_t m_y0_2 = this->m_box.m_y0;
004cced1          int32_t var_14_1 = (eax_7 + ebx_2);
004ccee6          int32_t eax_12;
004ccee6          int32_t edx_3;
004ccee6          edx_3 = HIGHD(((int64_t)UIRegion::GetHeight(this->vtable->GetParent())));
004ccee6          eax_12 = LOWD(((int64_t)UIRegion::GetHeight(this->vtable->GetParent())));
004ccee9          int32_t m_y0_1 = this->m_box.m_y0;
004ccef7          int32_t ecx_8;
004ccef7          ecx_8 = m_y0_2 < ((eax_12 - edx_3) >> 1);
004ccf0c          int32_t eax_17 = UIRegion::GetHeight(this->vtable->GetParent());
004ccf28          int32_t m_y0;
004ccf28          int32_t m_y0_3;
004ccf28          
004ccf28          if (((UIRegion::GetHeight(&this->vtable) + m_y0_1) >= eax_17 || ecx_8 == 0))
004ccf28          {
004ccf34              m_y0 = this->m_box.m_y0;
004ccf3c              m_y0_3 = (m_y0 - ebx_2);
004ccf28          }
004ccf28          else
004ccf28          {
004ccf2a              m_y0 = this->m_box.m_y0;
004ccf30              m_y0_3 = m_y0;
004ccf28          }
004ccf28          
004ccf3e          struct UIElement_Field::VTable** ecx_11;
004ccf3e          ecx_11 = this->m_Maximized;
004ccf3e          
004ccf46          if (ecx_11 != 0)
004ccf46          {
004ccf4c              int32_t eax_21 = var_18;
004ccf4c              
004ccf56              if (this->m_OldHeight < eax_21)
004ccf58                  this->m_OldHeight = eax_21;
004ccf58              
004ccf5e              int32_t eax_22 = var_10;
004ccf5e              
004ccf68              if (this->m_OldHeight > eax_22)
004ccf6a                  this->m_OldHeight = eax_22;
004ccf6a              
004ccf78              if (this->m_OldY < 0)
004ccf7a                  this->m_OldY = 0;
004ccf7a              
004ccf90              int32_t eax_25 = UIRegion::GetHeight(this->vtable->GetParent());
004ccf90              
004ccfa3              if (this->m_OldY > (eax_25 - var_18))
004ccfba                  this->m_OldY = (UIRegion::GetHeight(this->vtable->GetParent()) - var_18);
004ccfba              
004ccfc4              this->m_Maximized = 0;
004ccfcb              eax->vtable->SetState(0x10000048);
004cce5a              this->vtable->ResizeTo(UIRegion::GetWidth(&this->vtable), this->m_OldHeight);
004cce5a              this->vtable->MoveTo(this->m_box.m_x0, this->m_OldY);
004cd00a              return;
004ccf46          }
004ccf46          
004cd00d          this->m_OldY = m_y0;
004cd01c          this->m_OldHeight = UIRegion::GetHeight(&this->vtable);
004cd022          this->m_Maximized = 1;
004cd029          eax->vtable->SetState(0x10000047);
004cd029          
004cd038          if (m_y0_3 < 0)
004cd03a              m_y0_3 = 0;
004cd03a          
004cd055          if ((var_14_1 + m_y0_3) > UIRegion::GetHeight(this->vtable->GetParent()))
004cd06a              var_14_1 = (UIRegion::GetHeight(this->vtable->GetParent()) - m_y0_3);
004cd06a          
004cce5a          this->vtable->ResizeTo(UIRegion::GetWidth(&this->vtable), var_14_1);
004cce5a          this->vtable->MoveTo(this->m_box.m_x0, m_y0_3);
004cce77      }
004cce50  }

004cd099                                                                             90 90 90 90 90 90 90                           .......

004cd0a0  void __thiscall gmMainChatUI::ResizeTo(class gmMainChatUI* this, int32_t const arg2, int32_t const arg3)

004cd0a0  {
004cd0a4      class UIElement_Text* m_chatEntry = this->m_chatEntry;
004cd0aa      int32_t ebx;
004cd0aa      ebx = 0;
004cd0aa      
004cd0ae      if (m_chatEntry != 0)
004cd0b5          ebx = UIElement_Text::IsAtVerticalEnd(m_chatEntry);
004cd0b5      
004cd0c3      ChatInterface::ResizeTo(this, arg2, arg3);
004cd0c3      
004cd0ca      if (ebx != 0)
004cd0ca      {
004cd0cc          class UIElement_Text* m_chatEntry_1 = this->m_chatEntry;
004cd0d2          int32_t _num_elements = m_chatEntry_1->m_glyphList.m_glyphList._num_elements;
004cd0d8          int32_t _num_elements_1 = _num_elements;
004cd0d9          UIElement_Text::ScrollToPosition(m_chatEntry_1, _num_elements);
004cd0ca      }
004cd0a0  }

004cd0e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004cd0f0  void __thiscall gmMainChatUI::gmMainChatUI(class gmMainChatUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004cd0f0  {
004cd0ff      ChatInterface::ChatInterface(this, arg2, arg3);
004cd106      __builtin_memset(&this->m_pSquelchToggleButton, 0, 0x15);
004cd10c      this->vtable = 0x7b93b8;
004cd112      this->vtable = &gmMainChatUI::`vftable';
004cd137      this->m_OldY = 0;
004cd13d      this->m_OldHeight = 0;
004cd148      this->m_fDefaultOpacity = 1f;
004cd14e      this->m_fCurrentOpacity = 1f;
004cd0f0  }

004cd15a                                                                                90 90 90 90 90 90                            ......

004cd160  class UIElement* __thiscall gmMainChatUI::DynamicCast(class gmMainChatUI* this, uint32_t arg2) __pure

004cd160  {
004cd169      if (arg2 == 0x10000041)
004cd169      {
004cd16e          int32_t eax_1 = -(((char*)this - 4));
004cd174          return ((eax_1 - eax_1) & this);
004cd169      }
004cd169      
004cd17c      int32_t edx;
004cd17c      edx = arg2 != 3;
004cd184      return ((edx - 1) & this);
004cd160  }

004cd187                       90 90 90 90 90 90 90 90 90                                                         .........

004cd190  uint32_t gmMainChatUI::GetUIElementType(class gmMainChatUI const* this @ ecx) __pure

004cd190  {
004cd195      return 0x10000041;
004cd190  }

004cd196                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cd1a0  void __fastcall gmMainChatUI::~gmMainChatUI(class gmMainChatUI* this)

004cd1a0  {
004cd1a4      this->vtable = 0x7b93b8;
004cd1af      this->vtable = 0x7b9280;
004cd1b5      UIListener::UnRegisterForGlobalMessage(this, 3);
004cd1be      UIListener::UnRegisterForGlobalMessage(this, 0xb);
004cd1c3      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004cd1c3      
004cd1ca      if (eax != 0)
004cd1cc          eax->vtable->UnRegisterAllNoticeHandlers(((char*)this - 4));
004cd1cc      
004cd1e4      if ((this->m_aTalkFocusButtons.m_data & 0x80000000) == 0x80000000)
004cd1ed          operator delete[](this->m_pSquelchToggleButton);
004cd1ed      
004cd1f9      /* tailcall */
004cd1f9      return ChatInterface::~ChatInterface(this);
004cd1a0  }

004cd1fe                                                                                            90 90                                ..

004cd200  class UIElement* gmMainChatUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004cd200  {
004cd205      void* eax = operator new(0x658);
004cd205      
004cd20f      if (eax != 0)
004cd20f      {
004cd21d          int32_t eax_1 = gmMainChatUI::gmMainChatUI(eax, arg1, arg2);
004cd21d          
004cd224          if (eax_1 != 0)
004cd229              return (eax_1 + 4);
004cd20f      }
004cd20f      
004cd22c      return 0;
004cd200  }

004cd22d                                         90 90 90                                                               ...

004cd230  void __fastcall gmMainChatUI::ToggleSquelchOnCurrentSpeakableTarget(class gmMainChatUI* this)

004cd230  {
004cd238      uint32_t eax = gmCCommunicationSystem::GetLastSpeakableTarget();
004cd238      
004cd241      if (eax != 0)
004cd241      {
004cd248          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(eax);
004cd248          
004cd252          if (eax_1 != 0)
004cd252          {
004cd258              class AC1Legacy::PSRefBuffer<char>* m_buffer = eax_1->pwd._name.m_buffer;
004cd260              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = m_buffer;
004cd269              InterlockedIncrement(&m_buffer->m_cRef);
004cd278              int32_t* var_8;
004cd278              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &data_7928af);
004cd285              int32_t eax_3 = gmCCommunicationSystem::IsSquelched(eax, &var_8, 1);
004cd292              int32_t* eax_4 = var_8;
004cd292              
004cd2a7              if ((InterlockedDecrement(&eax_4[1]) == 0 && eax_4 != 0))
004cd2af                  **(uint32_t**)eax_4(1);
004cd2af              
004cd2b3              int32_t var_2c_1;
004cd2b3              uint32_t var_28_2;
004cd2b3              class AC1Legacy::PStringBase<char>* var_24_2;
004cd2b3              
004cd2b3              if (eax_3 == 0)
004cd2b3              {
004cd2d9                  this->m_pSquelchToggleButton->vtable->SetState(0x10000001);
004cd2ec                  int32_t var_20_4 = 1;
004cd2f2                  var_24_2 = &m_buffer_1;
004cd2f3                  var_28_2 = eax;
004cd2f4                  var_2c_1 = 1;
004cd2b3              }
004cd2b3              else
004cd2b3              {
004cd2b9                  this->m_pSquelchToggleButton->vtable->SetState(1);
004cd2c9                  int32_t var_20_3 = 1;
004cd2cf                  var_24_2 = &m_buffer_1;
004cd2d0                  var_28_2 = eax;
004cd2d1                  var_2c_1 = 0;
004cd2b3              }
004cd2b3              
004cd2f6              CM_Communication::Event_ModifyCharacterSquelch(var_2c_1, var_28_2, var_24_2, 1);
004cd2fb              class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = m_buffer_1;
004cd2fb              
004cd311              if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
004cd313                  m_buffer_2->vtable->__vecDelDtor(1);
004cd252          }
004cd241      }
004cd230  }


004cd320  void* __thiscall gmMainChatUI::`vector deleting destructor'(class gmMainChatUI* this, uint32_t arg2)

004cd320  {
004cd323      gmMainChatUI::~gmMainChatUI(this);
004cd32d      void* __offset(gmMainChatUI, -0x4) result = ((char*)this - 4);
004cd32d      
004cd330      if ((arg2 & 1) == 0)
004cd33f          return result;
004cd33f      
004cd333      operator delete(result);
004cd33b      return ((char*)this - 4);
004cd320  }

004cd342        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004cd350  void gmMainChatUI::Register()

004cd350  {
004cd35a      UIElement::RegisterElementClass(0x10000041, gmMainChatUI::Create);
004cd350  }

004cd363           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004cd370  class UIElement_Text* __thiscall gmMainChatUI::GetTalkFocusMenuItem(class gmMainChatUI* this, uint32_t arg2)

004cd370  {
004cd37c      int32_t i = 0;
004cd37c      
004cd380      if (this->m_aTalkFocusButtons.m_num > 0)
004cd380      {
004cd382          uint32_t ebp_1 = arg2;
004cd382          
004cd3bd          do
004cd3bd          {
004cd396              class UIElement* result = this->m_aTalkFocusButtons.m_data[i];
004cd396              
004cd39b              if (result != 0)
004cd39b              {
004cd3a9                  UIElement::GetAttribute_Enum(result, 0x1000000b, &arg2);
004cd3a9                  
004cd3b2                  if (arg2 == ebp_1)
004cd3ce                      return result;
004cd39b              }
004cd39b              
004cd3ba              i += 1;
004cd3bd          } while (i < this->m_aTalkFocusButtons.m_num);
004cd380      }
004cd380      
004cd3c5      return 0;
004cd370  }

004cd388                          8d a4 24 00 00 00 00 90                                                          ..$.....
004cd3d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004cd3e0  int32_t IsOlthoi()

004cd3e0  {
004cd3e3      int32_t ebx;
004cd3e3      int32_t var_1c = ebx;
004cd3ea      struct Turbine_GUID* var_18;
004cd3ea      int32_t* var_28 = &var_18;
004cd3f1      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004cd3f7      int32_t var_14 = 0;
004cd3fb      var_18 = nullptr;
004cd406      class TResult __return;
004cd406      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004cd40b      struct Turbine_GUID* edi = var_18;
004cd414      var_2c = edi;
004cd416      int32_t var_28_1 = 0;
004cd419      struct Turbine_GUID* eax_1 = var_2c;
004cd41d      int32_t var_8 = 0;
004cd421      int32_t var_4 = 0;
004cd421      
004cd425      if (eax_1 != 0)
004cd42b          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004cd42b      
004cd437      struct Turbine_GUID** esp = &var_2c;
004cd43e      void var_c;
004cd43e      int32_t ebx_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004cd43e      
004cd440      if (edi != 0)
004cd446          *(uint32_t*)(edi->m_data1 + 0x14)();
004cd446      
004cd449      class TResult __return_1 = __return;
004cd449      
004cd44f      if (__return_1 != 0)
004cd44f      {
004cd453          if (ebx_1 >= 0)
004cd453          {
004cd464              CBaseQualities::InqInt((__return_1 + 0x38), 0xbc, &var_1c, 0, 0);
004cd469              int32_t eax_3 = var_1c;
004cd469              
004cd475              if ((eax_3 == 0xc || eax_3 == 0xd))
004cd475              {
004cd47b                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004cd489                  return 1;
004cd475              }
004cd453          }
004cd453          
004cd48e          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004cd48e          struct Turbine_GUID* __saved_edi;
004cd48e          esp = &__saved_edi;
004cd44f      }
004cd44f      
004cd491      *(uint32_t*)esp;
004cd491      esp[1];
004cd491      esp[2];
004cd499      return 0;
004cd3e0  }

004cd49a                                                                                90 90 90 90 90 90                            ......

004cd4a0  void __fastcall gmMainChatUI::ResetAllTalkFocusMenuButtons(class gmMainChatUI* this)

004cd4a0  {
004cd4a0      class gmMainChatUI* this_1 = this;
004cd4ab      int32_t i = 0;
004cd4ab      
004cd4af      if (this->m_aTalkFocusButtons.m_num > 0)
004cd4af      {
004cd52c          do
004cd52c          {
004cd4b8              class UIElement* esi_1 = this->m_aTalkFocusButtons.m_data[i];
004cd4b8              
004cd4bd              if (esi_1 != 0)
004cd4bd              {
004cd4cb                  UIElement::GetAttribute_Enum(esi_1, 0x1000000b, &this_1);
004cd4cb                  
004cd4d6                  if (this_1 != 0)
004cd4d6                  {
004cd4df                      if (IsOlthoi() == 0)
004cd4df                      {
004cd506                          int32_t eax_5 = gmCCommunicationSystem::IsTalkFocusEnabled(this_1);
004cd50e                          char temp0_1 = eax_5;
004cd50e                          eax_5 = -(eax_5);
004cd519                          esi_1->vtable->SetState((((eax_5 - eax_5) & 0xfffffff4) + 0xd));
004cd4df                      }
004cd4df                      else
004cd4df                      {
004cd4e1                          class gmMainChatUI* this_2 = this_1;
004cd4e1                          
004cd4ed                          if ((this_2 == 0xd || this_2 == 1))
004cd4f3                              esi_1->vtable->SetState(1);
004cd4ed                          else
004cd519                              esi_1->vtable->SetState(0xd);
004cd4df                      }
004cd4d6                  }
004cd4bd              }
004cd4bd              
004cd529              i += 1;
004cd52c          } while (i < this->m_aTalkFocusButtons.m_num);
004cd4af      }
004cd4af      
004cd537      gmMainChatUI::SetSelected(this, gmCCommunicationSystem::GetLastSpeakableTarget());
004cd4a0  }


004cd540  void __thiscall gmMainChatUI::HandleSelection(class gmMainChatUI* this, uint32_t arg2)

004cd540  {
004cd553      class UIElement_Text* eax = gmMainChatUI::GetTalkFocusMenuItem(this, arg2);
004cd553      
004cd569      if ((eax != 0 && eax->m_state != 0xd))
004cd569      {
004cd573          void var_90;
004cd573          StringInfo::StringInfo(&var_90);
004cd581          StringInfo::SetTableEnum(&var_90, 0x10000001);
004cd581          
004cd58c          if ((arg2 - 1) <= 0xc)
004cd58c          {
004cd592              int32_t var_8c_10;
004cd592              
004cd592              switch (arg2)
004cd592              {
004cd5ac                  case 1:
004cd5ac                  {
004cd5ac                      gmCCommunicationSystem::SetTalkFocus(1);
004cd5b7                      int32_t var_8c_1 = 0;
004cd5ac                      break;
004cd5ac                  }
004cd59b                  case 2:
004cd59b                  {
004cd59b                      gmCCommunicationSystem::SetTalkFocus(2);
004cd695                      var_8c_10 = 0;
004cd59b                      break;
004cd59b                  }
004cd5c2                  case 3:
004cd5c2                  {
004cd5c2                      gmCCommunicationSystem::SetTalkFocus(3);
004cd5cd                      int32_t var_8c_2 = 0;
004cd5c2                      break;
004cd5c2                  }
004cd5d8                  case 4:
004cd5d8                  {
004cd5d8                      gmCCommunicationSystem::SetTalkFocus(4);
004cd695                      var_8c_10 = 0;
004cd5d8                      break;
004cd5d8                  }
004cd5e9                  case 5:
004cd5e9                  {
004cd5e9                      gmCCommunicationSystem::SetTalkFocus(5);
004cd5f4                      int32_t var_8c_3 = 0;
004cd5e9                      break;
004cd5e9                  }
004cd5ff                  case 6:
004cd5ff                  {
004cd5ff                      gmCCommunicationSystem::SetTalkFocus(6);
004cd60a                      int32_t var_8c_4 = 0;
004cd5ff                      break;
004cd5ff                  }
004cd615                  case 7:
004cd615                  {
004cd615                      gmCCommunicationSystem::SetWantsToBeInAllegChat(1);
004cd61c                      gmCCommunicationSystem::SetTalkFocus(7);
004cd629                      int32_t var_8c_5 = 0;
004cd615                      break;
004cd615                  }
004cd631                  case 8:
004cd631                  {
004cd631                      gmCCommunicationSystem::SetTalkFocus(8);
004cd63c                      int32_t var_8c_6 = 0;
004cd631                      break;
004cd631                  }
004cd644                  case 9:
004cd644                  {
004cd644                      gmCCommunicationSystem::SetTalkFocus(9);
004cd64f                      int32_t var_8c_7 = 0;
004cd644                      break;
004cd644                  }
004cd657                  case 0xa:
004cd657                  {
004cd657                      gmCCommunicationSystem::SetTalkFocus(0xa);
004cd695                      var_8c_10 = 0;
004cd657                      break;
004cd657                  }
004cd665                  case 0xb:
004cd665                  {
004cd665                      gmCCommunicationSystem::SetTalkFocus(0xb);
004cd670                      int32_t var_8c_8 = 0;
004cd665                      break;
004cd665                  }
004cd68b                  case 0xc:
004cd68b                  {
004cd68b                      gmCCommunicationSystem::SetTalkFocus(0xc);
004cd695                      var_8c_10 = 0;
004cd68b                      break;
004cd68b                  }
004cd678                  case 0xd:
004cd678                  {
004cd678                      gmCCommunicationSystem::SetTalkFocus(0xd);
004cd683                      int32_t var_8c_9 = 0;
004cd678                      break;
004cd678                  }
004cd592              }
004cd592              
004cd6a4              if ((this->m_pChatTargetButtonText != 0 && StringInfo::IsValid(&var_90, 1) != 0))
004cd6c0                  UIElement_Text::SetStringInfo(this->m_pChatTargetButtonText, &var_90);
004cd6c0              
004cd6c7              gmMainChatUI::ResetAllTalkFocusMenuButtons(this);
004cd6cc              eax->vtable->SetState(0x10000001);
004cd58c          }
004cd58c          
004cd6df          StringInfo::~StringInfo(&var_90);
004cd569      }
004cd540  }

004cd6f0  uint32_t jump_table_4cd6f0[0xd] = 
004cd6f0  {
004cd6f0      [0x0] =  0x004cd5aa
004cd6f4      [0x1] =  0x004cd599
004cd6f8      [0x2] =  0x004cd5c0
004cd6fc      [0x3] =  0x004cd5d6
004cd700      [0x4] =  0x004cd5e7
004cd704      [0x5] =  0x004cd5fd
004cd708      [0x6] =  0x004cd613
004cd70c      [0x7] =  0x004cd62f
004cd710      [0x8] =  0x004cd642
004cd714      [0x9] =  0x004cd655
004cd718      [0xa] =  0x004cd663
004cd71c      [0xb] =  0x004cd689
004cd720      [0xc] =  0x004cd676
004cd724  }

004cd724              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004cd730  void __thiscall gmMainChatUI::SetSelected(class gmMainChatUI* this, uint32_t arg2)

004cd730  {
004cd73e      class UIElement_Text* eax = gmMainChatUI::GetTalkFocusMenuItem(this, 2);
004cd743      class PSRefBufferCharData<unsigned short>* esi = PStringBase<unsigned short>::s_NullBuffer;
004cd74f      void* __offset(PSRefBufferCharData<unsigned short>, -0x10) edi = &esi->m_data[-8];
004cd753      class UIElement_Text* var_9c = eax;
004cd757      InterlockedIncrement(edi);
004cd761      class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
004cd761      
004cd76b      if (eax_2 != 0)
004cd76b      {
004cd778          class PStringBase<unsigned short> __return;
004cd778          class PStringBase<unsigned short>* eax_3 = ACCWeenieObject::GetObjectNameWide(eax_2, &__return, NAME_SINGULAR, 0);
004cd778          
004cd783          if (esi != eax_3->m_charbuffer)
004cd783          {
004cd798              if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
004cd7a0                  *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
004cd7a0              
004cd7a6              esi = eax_3->m_charbuffer;
004cd7a8              edi = &esi->m_data[-8];
004cd7ac              InterlockedIncrement(edi);
004cd783          }
004cd783          
004cd7b2          int32_t* eax_7 = (__return - 0x14);
004cd7b2          
004cd7cd          if ((InterlockedDecrement(&eax_7[1]) == 0 && eax_7 != 0))
004cd7d3              **(uint32_t**)eax_7(1);
004cd76b      }
004cd76b      
004cd7d9      class UIElement_Text* m_pSquelchToggleButton = this->m_pSquelchToggleButton;
004cd7df      uint32_t edi_2;
004cd7df      void var_90;
004cd7df      
004cd7df      if (esi->m_data[0x7ffffffffffffffe] != 1)
004cd7df      {
004cd8e9          if (m_pSquelchToggleButton != 0)
004cd8e9          {
004cd8ef              StringInfo::StringInfo(&var_90);
004cd909              int32_t var_b0_11 = StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cd90f              InterlockedIncrement(edi);
004cd91c              StringInfo::AddVariable_String(&var_90, 0, esi);
004cd92c              UIElement_Text::SetStringInfo(this->m_pSquelchToggleButton, &var_90);
004cd931              this->m_pSquelchToggleButton->vtable->SetState(1);
004cd945              StringInfo::~StringInfo(&var_90);
004cd8e9          }
004cd8e9          
004cd950          if (var_9c != 0)
004cd950          {
004cd956              StringInfo::StringInfo(&var_90);
004cd96f              int32_t var_b0_14 = StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cd975              InterlockedIncrement(edi);
004cd982              StringInfo::AddVariable_String(&var_90, 0, esi);
004cd987              class UIElement_Text* edi_3 = var_9c;
004cd992              UIElement_Text::SetStringInfo(edi_3, &var_90);
004cd997              edi_3->vtable->SetState(1);
004cd9a7              StringInfo::~StringInfo(&var_90);
004cd950          }
004cd950          
004cd9b0          gmCCommunicationSystem::SetTalkFocusEnabled(2, 1);
004cd9b5          edi_2 = arg2;
004cd9b5          
004cd9c1          if (edi_2 != 0)
004cd9c1          {
004cd9c8              class ACCWeenieObject* eax_17 = ClientObjMaintSystem::GetWeenieObject(edi_2);
004cd9c8              
004cd9d2              if ((eax_17 != 0 && PublicWeenieDesc::IsTalkable(eax_17->vtable->InqType()) != 0))
004cd9d2              {
004cd9f9                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_9c, &data_7928af);
004cda06                  int32_t eax_20 = gmCCommunicationSystem::IsSquelched(edi_2, &var_9c, 1);
004cda14                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_9c);
004cda14                  
004cda1b                  if (eax_20 != 0)
004cda21                      this->m_pSquelchToggleButton->vtable->SetState(0x10000001);
004cd9d2              }
004cd9c1          }
004cd7df      }
004cd7df      else
004cd7df      {
004cd7e7          if (m_pSquelchToggleButton != 0)
004cd7e7          {
004cd7ed              StringInfo::StringInfo(&var_90);
004cd806              int32_t var_b0_5 = StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cd80c              InterlockedIncrement(edi);
004cd819              StringInfo::AddVariable_String(&var_90, 0, esi);
004cd829              UIElement_Text::SetStringInfo(this->m_pSquelchToggleButton, &var_90);
004cd82e              this->m_pSquelchToggleButton->vtable->SetState(0xd);
004cd842              StringInfo::~StringInfo(&var_90);
004cd7e7          }
004cd7e7          
004cd847          class UIElement_Text* edi_1 = var_9c;
004cd847          
004cd84d          if (edi_1 != 0)
004cd84d          {
004cd853              StringInfo::StringInfo(&var_90);
004cd868              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cd874              UIElement_Text::SetStringInfo(edi_1, &var_90);
004cd879              edi_1->vtable->SetState(0xd);
004cd889              StringInfo::~StringInfo(&var_90);
004cd84d          }
004cd84d          
004cd892          gmCCommunicationSystem::SetTalkFocusEnabled(2, 0);
004cd892          
004cd8a2          if (gmCCommunicationSystem::GetTalkFocus() == 2)
004cd8a8              gmMainChatUI::HandleSelection(this, 1);
004cd8a8          
004cd8ad          edi_2 = arg2;
004cd7df      }
004cd8b5      gmCCommunicationSystem::SetLastSpeakableTarget(edi_2);
004cd8b5      
004cd8d0      if ((InterlockedDecrement(&esi->m_data[-8]) == 0 && esi != 0x14))
004cd8d8          *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
004cd730  }

004cda3b                                                                                   90 90 90 90 90                             .....

004cda40  void __thiscall SmartArray<UIElement_Text *,1>::push_back(class SmartArray<UIElement_Text *,1>* this, class UIElement_Text** arg2)

004cda40  {
004cda49      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
004cda50      uint8_t eax_4;
004cda50      
004cda50      if (this->m_num >= eax_1)
004cda5e          eax_4 = SmartArray<unsigned long,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
004cda5e      
004cda65      if ((this->m_num < eax_1 || eax_4 != 0))
004cda65      {
004cda70          this->m_data[this->m_num] = *(uint32_t*)arg2;
004cda75          this->m_num += 1;
004cda65      }
004cda40  }

004cda7c                                                                                      90 90 90 90                              ....

004cda80  enum UIElementMessageListenResult __thiscall gmMainChatUI::ListenToElementMessage(class gmMainChatUI* this, struct UIElementMessageInfo const* arg2)

004cda80  {
004cda81      struct UIElementMessageInfo* esi = arg2;
004cda85      uint32_t idMessage = esi->idMessage;
004cda85      
004cda8c      if (idMessage == 1)
004cda8c      {
004cdb06          if (esi->idElement == 0x1000046f)
004cdb0b              gmMainChatUI::HandleMaximizeButton(((char*)this - 4));
004cda8c      }
004cda8c      else if (idMessage == 7)
004cda91      {
004cda9a          class UIElement_Menu* eax_3 = esi->pElement->vtable->DynamicCast(6);
004cda9a          
004cdaa2          if (eax_3 != 0)
004cdaaa              UIElement_Menu::SetSelectedItem(eax_3, nullptr, 0);
004cdaaa          
004cdaaf          uint32_t dwParam2 = esi->dwParam2;
004cdaaf          
004cdab4          if (dwParam2 != 0)
004cdab4          {
004cdabc              if (dwParam2 == this->m_pCCS)
004cdabc              {
004cdac1                  gmMainChatUI::ToggleSquelchOnCurrentSpeakableTarget(((char*)this - 4));
004cdad0                  return ChatInterface::ListenToElementMessage(this, esi);
004cdabc              }
004cdabc              
004cdae4              if (UIElement::GetAttribute_Enum(dwParam2, 0x1000000b, &arg2) != 0)
004cdaee                  gmMainChatUI::HandleSelection(((char*)this - 4), arg2);
004cdab4          }
004cda91      }
004cda91      
004cdb1a      return ChatInterface::ListenToElementMessage(this, esi);
004cda80  }

004cdb1d                                                                                         90 90 90                               ...

004cdb20  void __fastcall gmMainChatUI::UseTime(class gmMainChatUI* this)

004cdb20  {
004cdb23      long double x87_r7 = ((long double)Timer::cur_time);
004cdb30      long double temp0 = ((long double)nextCheckChatSelectedTime);
004cdb30      (x87_r7 - temp0);
004cdb30      
004cdb3b      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004cdb3b      {
004cdb4a          uint32_t _containerID_1 = gmCCommunicationSystem::GetLastSpeakableTarget();
004cdb4a          
004cdb56          if (gmCCommunicationSystem::IsTalkFocusEnabled(2) == 0)
004cdb56          {
004cdb58              uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004cdb5f              class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
004cdb5f              
004cdb69              if (eax_3 != 0)
004cdb69              {
004cdb6f                  class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
004cdb77                  uint32_t player_id;
004cdb77                  
004cdb77                  if (SmartBox::smartbox_2 == 0)
004cdb81                      player_id = 0;
004cdb77                  else
004cdb79                      player_id = SmartBox::smartbox_2->player_id;
004cdb79                  
004cdb85                  if ((ACCWeenieObject::selectedID_1 != player_id && PublicWeenieDesc::IsTalkable(eax_3->vtable->InqType()) != 0))
004cdb85                  {
004cdbb6                      double var_24_1 = ((double)CPlayerSystem::GetRadarRadius(CPlayerSystem::GetPlayerSystem()));
004cdbb6                      
004cdbca                      if (ACCWeenieObject::ObjectsInRange(ACCWeenieObject::selectedID_1, GetPlayerID(), var_24_1, 1, 0) != 0)
004cdc33                          gmMainChatUI::SetSelected(this, ACCWeenieObject::selectedID_1);
004cdb85                  }
004cdb69              }
004cdb56          }
004cdb56          else if (_containerID_1 != 0)
004cdbd1          {
004cdbd4              class ACCWeenieObject* eax_9 = ClientObjMaintSystem::GetWeenieObject(_containerID_1);
004cdbd4              
004cdbe0              if (eax_9 == 0)
004cdbe0              {
004cdbf9              label_4cdbf9:
004cdbf9                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004cdc00                  uint32_t player_id_1;
004cdc00                  
004cdc00                  if (SmartBox::smartbox_1 == 0)
004cdc0a                      player_id_1 = 0;
004cdc00                  else
004cdc02                      player_id_1 = SmartBox::smartbox_1->player_id;
004cdc02                  
004cdc24                  int32_t eax_12 = ACCWeenieObject::ObjectsInRange(_containerID_1, player_id_1, ((double)CPlayerSystem::GetRadarRadius(CPlayerSystem::GetPlayerSystem())), 1, 0);
004cdc24                  
004cdc2e                  if (eax_12 == 0)
004cdc33                      gmMainChatUI::SetSelected(this, eax_12);
004cdbe0              }
004cdbe0              else if (ACCWeenieObject::IsOwnedByPlayer(eax_9) == 0)
004cdbeb              {
004cdbed                  uint32_t _containerID = eax_9->pwd._containerID;
004cdbed                  
004cdbf5                  if (_containerID != 0)
004cdbf7                      _containerID_1 = _containerID;
004cdbf7                  
004cdbf5                  goto label_4cdbf9;
004cdbeb              }
004cdbd1          }
004cdbd1          
004cdc44          nextCheckChatSelectedTime = ((double)(((long double)1.0) + ((long double)((double)x87_r7))));
004cdb3b      }
004cdb20  }

004cdc4f                                               90                                                                 .

004cdc50  void __fastcall gmMainChatUI::InitTalkFocusMenu(class gmMainChatUI* this)

004cdc50  {
004cdc61      class UIElement* eax = UIElement::GetChildRecursive(&this->vtable, 0x10000014);
004cdc61      
004cdc68      if (eax != 0)
004cdc68      {
004cdc75          class UIElement_Menu* eax_1 = eax->vtable->DynamicCast(6);
004cdc75          
004cdc7f          if (eax_1 != 0)
004cdc7f          {
004cdc8e              SmartArray<unsigned long,1>::Reset(&this->m_aTalkFocusButtons);
004cdc95              UIElement_Menu::Flush(eax_1);
004cdc9e              void var_90;
004cdc9e              StringInfo::StringInfo(&var_90);
004cdcb2              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdcd3              this->m_pSquelchToggleButton = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdcd9              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdce5              class UIElement_Text* eax_3 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdcec              class UIElement_Text* var_94 = eax_3;
004cdcec              
004cdcf0              if (eax_3 != 0)
004cdcf0              {
004cdcfb                  UIElement::SetAttribute_Enum(eax_3, 0x1000000b, 5);
004cdd07                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cdcf0              }
004cdcf0              
004cdd1c              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdd28              class UIElement_Text* eax_4 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdd2f              var_94 = eax_4;
004cdd2f              
004cdd33              if (eax_4 != 0)
004cdd33              {
004cdd3e                  UIElement::SetAttribute_Enum(eax_4, 0x1000000b, 2);
004cdd4a                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cdd33              }
004cdd33              
004cdd5f              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdd6b              class UIElement_Text* eax_5 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdd72              var_94 = eax_5;
004cdd72              
004cdd76              if (eax_5 != 0)
004cdd76              {
004cdd81                  UIElement::SetAttribute_Enum(eax_5, 0x1000000b, 4);
004cdd8d                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cdd76              }
004cdd76              
004cdda2              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cddae              class UIElement_Text* eax_6 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cddb5              var_94 = eax_6;
004cddb5              
004cddb9              if (eax_6 != 0)
004cddb9              {
004cddc4                  UIElement::SetAttribute_Enum(eax_6, 0x1000000b, 1);
004cddd0                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cddb9              }
004cddb9              
004cdde5              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cddf1              class UIElement_Text* eax_7 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cddf8              var_94 = eax_7;
004cddf8              
004cddfc              if (eax_7 != 0)
004cddfc              {
004cde07                  UIElement::SetAttribute_Enum(eax_7, 0x1000000b, 6);
004cde13                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cddfc              }
004cddfc              
004cde28              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cde34              class UIElement_Text* eax_8 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cde3b              var_94 = eax_8;
004cde3b              
004cde3f              if (eax_8 != 0)
004cde3f              {
004cde4a                  UIElement::SetAttribute_Enum(eax_8, 0x1000000b, 3);
004cde56                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cde3f              }
004cde3f              
004cde6b              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cde77              class UIElement_Text* eax_9 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cde7e              var_94 = eax_9;
004cde7e              
004cde82              if (eax_9 != 0)
004cde82              {
004cde8d                  UIElement::SetAttribute_Enum(eax_9, 0x1000000b, 7);
004cde99                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cde82              }
004cde82              
004cdeae              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdeba              class UIElement_Text* eax_10 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdec1              var_94 = eax_10;
004cdec1              
004cdec5              if (eax_10 != 0)
004cdec5              {
004cded0                  UIElement::SetAttribute_Enum(eax_10, 0x1000000b, 8);
004cdedc                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cdec5              }
004cdec5              
004cdef1              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdefd              class UIElement_Text* eax_11 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdf04              var_94 = eax_11;
004cdf04              
004cdf08              if (eax_11 != 0)
004cdf08              {
004cdf13                  UIElement::SetAttribute_Enum(eax_11, 0x1000000b, 9);
004cdf1f                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cdf08              }
004cdf08              
004cdf34              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdf40              class UIElement_Text* eax_12 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdf47              var_94 = eax_12;
004cdf47              
004cdf4b              if (eax_12 != 0)
004cdf4b              {
004cdf56                  UIElement::SetAttribute_Enum(eax_12, 0x1000000b, 0xa);
004cdf62                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cdf4b              }
004cdf4b              
004cdf77              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdf83              class UIElement_Text* eax_13 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdf8a              var_94 = eax_13;
004cdf8a              
004cdf8e              if (eax_13 != 0)
004cdf8e              {
004cdf99                  UIElement::SetAttribute_Enum(eax_13, 0x1000000b, 0xb);
004cdfa5                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cdf8e              }
004cdf8e              
004cdfba              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004cdfc6              class UIElement_Text* eax_14 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004cdfcd              var_94 = eax_14;
004cdfcd              
004cdfd1              if (eax_14 != 0)
004cdfd1              {
004cdfdc                  UIElement::SetAttribute_Enum(eax_14, 0x1000000b, 0xc);
004cdfe8                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004cdfd1              }
004cdfd1              
004cdffd              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004ce009              class UIElement_Text* eax_15 = UIElement_Menu::AddTextItem(eax_1, &var_90);
004ce010              var_94 = eax_15;
004ce010              
004ce014              if (eax_15 != 0)
004ce014              {
004ce01f                  UIElement::SetAttribute_Enum(eax_15, 0x1000000b, 0xd);
004ce02b                  SmartArray<UIElement_Text *,1>::push_back(&this->m_aTalkFocusButtons, &var_94);
004ce014              }
004ce014              
004ce034              StringInfo::~StringInfo(&var_90);
004cdc7f          }
004cdc68      }
004cdc50  }

004ce043           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ce050  void __fastcall gmMainChatUI::RecvNotice_SelectionChanged(class gmMainChatUI* this)

004ce050  {
004ce051      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004ce05b      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
004ce05b      
004ce065      if ((eax != 0 && PublicWeenieDesc::IsTalkable(eax->vtable->InqType()) != 0))
004ce065      {
004ce07b          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004ce082          uint32_t player_id;
004ce082          
004ce082          if (SmartBox::smartbox_1 == 0)
004ce08c              player_id = 0;
004ce082          else
004ce084              player_id = SmartBox::smartbox_1->player_id;
004ce084          
004ce090          if (ACCWeenieObject::selectedID_1 != player_id)
004ce095              gmMainChatUI::SetSelected(this, ACCWeenieObject::selectedID_1);
004ce065      }
004ce050  }

004ce09d                                                                                         90 90 90                               ...

004ce0a0  void __thiscall gmMainChatUI::EnableSelection(class gmMainChatUI* this, uint32_t arg2, uint8_t arg3)

004ce0a0  {
004ce0aa      class UIElement_Text* eax = gmMainChatUI::GetTalkFocusMenuItem(this, arg2);
004ce0aa      
004ce0b3      if (eax != 0)
004ce0b3      {
004ce0cb          if ((IsOlthoi() != 0 && (arg2 != 0xd && (arg2 != 1 && arg2 != 2))))
004ce0cb          {
004ce0cd              eax->vtable->SetState(0xd);
004ce0dc              return;
004ce0cb          }
004ce0cb          
004ce0ea          int32_t ecx_1;
004ce0ea          ecx_1 = eax->m_state == 0xd;
004ce0ee          int32_t ebx;
004ce0ee          ebx = arg3;
004ce0ee          
004ce0f7          if (((uint32_t)ebx) == ecx_1)
004ce0f7          {
004ce0fb              ecx_1 = ebx;
004ce0fd              char temp1_1 = ecx_1;
004ce0fd              ecx_1 = -(ecx_1);
004ce0f9              eax->vtable->SetState((((ecx_1 - ecx_1) & 0xfffffff4) + 0xd));
004ce0f9              
004ce112              if ((ebx == 0 && gmCCommunicationSystem::GetTalkFocus() == arg2))
004ce121                  gmMainChatUI::HandleSelection(this, 1);
004ce0f7          }
004ce0b3      }
004ce0a0  }

004ce12d                                         90 90 90                                                               ...

004ce130  void __fastcall gmMainChatUI::PostInit(class gmMainChatUI* this)

004ce130  {
004ce134      ChatInterface::PostInit(this);
004ce140      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000015);
004ce147      uint32_t eax_1;
004ce147      
004ce147      if (eax == 0)
004ce157          eax_1 = 0;
004ce147      else
004ce14f          eax_1 = eax->vtable->DynamicCast(0xc);
004ce14f      
004ce15d      this->m_aTalkFocusButtons.m_num = eax_1;
004ce163      UIListener::RegisterForGlobalMessage(this, 3);
004ce16c      UIListener::RegisterForGlobalMessage(this, 0xb);
004ce171      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004ce171      
004ce17c      if (ICIDM::s_cidm_1 != 0)
004ce17c      {
004ce180          class gmMainChatUI* this_1;
004ce180          
004ce180          if (this == 4)
004ce187              this_1 = nullptr;
004ce180          else
004ce182              this_1 = this;
004ce182          
004ce189          ICIDM::s_cidm_1->vtable->RegisterInputMap(0x1000000d, this_1, 0xbc2);
004ce19d          class gmMainChatUI* this_2;
004ce19d          
004ce19d          if (this == 4)
004ce1a4              this_2 = nullptr;
004ce19d          else
004ce19f              this_2 = this;
004ce19f          
004ce1a6          ICIDM::s_cidm_1->vtable->RegisterInputMap(0x1000000a, this_2, 0x3e8);
004ce17c      }
004ce17c      
004ce1b8      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
004ce1b8      
004ce1c1      if (eax_2 != 0)
004ce1c1      {
004ce1c3          eax_2->vtable->RegisterNoticeHandler(0x4dd1ef, ((char*)this - 4));
004ce1d0          eax_2->vtable->RegisterNoticeHandler(0x4dd251, ((char*)this - 4));
004ce1dd          eax_2->vtable->RegisterNoticeHandler(0x4dd1f8, ((char*)this - 4));
004ce1ea          eax_2->vtable->RegisterNoticeHandler(0x186b2, ((char*)this - 4));
004ce1f7          eax_2->vtable->RegisterNoticeHandler(0x4dd271, ((char*)this - 4));
004ce1c1      }
004ce1c1      
004ce206      gmMainChatUI::InitTalkFocusMenu(((char*)this - 4));
004ce20f      gmMainChatUI::SetSelected(((char*)this - 4), 0);
004ce218      gmMainChatUI::HandleSelection(((char*)this - 4), 1);
004ce130  }


004ce220  void __thiscall gmMainChatUI::ListenToGlobalMessage(class gmMainChatUI* this, uint32_t arg2, int32_t arg3)

004ce220  {
004ce22b      if (arg2 == 3)
004ce245          gmMainChatUI::UseTime(((char*)this - 4));
004ce22b      else if (arg2 != 0xb)
004ce230      {
004ce238          ChatInterface::ListenToGlobalMessage(this, arg2, arg3);
004ce23f          return;
004ce230      }
004ce230      
004ce24d      gmMainChatUI::ResetAllTalkFocusMenuButtons(((char*)this - 4));
004ce25a      ChatInterface::ListenToGlobalMessage(this, arg2, arg3);
004ce220  }

004ce264              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004ce270  void __thiscall gmMainChatUI::RecvNotice_EnableChatTargetSelection(class gmMainChatUI* this, uint32_t arg2, uint8_t arg3)

004ce270  {
004ce270      /* tailcall */
004ce270      return gmMainChatUI::EnableSelection(this, arg2, arg3);
004ce270  }

004ce275                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004ce280  class UIElement* __thiscall gmFloatyChatUI::DynamicCast(class gmFloatyChatUI* this, uint32_t arg2) __pure

004ce280  {
004ce289      if (arg2 == 0x10000040)
004ce289      {
004ce28e          int32_t eax_1 = -(((char*)this - 4));
004ce294          return ((eax_1 - eax_1) & this);
004ce289      }
004ce289      
004ce29c      int32_t edx;
004ce29c      edx = arg2 != 3;
004ce2a4      return ((edx - 1) & this);
004ce280  }

004ce2a7                       90 90 90 90 90 90 90 90 90                                                         .........

004ce2b0  uint32_t gmFloatyChatUI::GetUIElementType(class gmFloatyChatUI const* this @ ecx) __pure

004ce2b0  {
004ce2b5      return 0x10000040;
004ce2b0  }

004ce2b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004ce2c0  class UIElement* gmFloatyChatUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004ce2c0  {
004ce2c6      void* eax = operator new(0x638);
004ce2c6      
004ce2d2      if (eax == 0)
004ce2f9          return 0;
004ce2f9      
004ce2e0      ChatInterface::ChatInterface(eax, arg1, arg2);
004ce2e8      *(uint32_t*)eax = 0x7b9be0;
004ce2ee      *(uint32_t*)((char*)eax + 4) = 0x7b9aa8;
004ce2f5      return ((char*)eax + 4);
004ce2c0  }

004ce2fa                                                                                90 90 90 90 90 90                            ......

004ce300  void __fastcall gmFloatyChatUI::PostInit(class gmFloatyChatUI* this)

004ce300  {
004ce303      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ce303      
004ce30a      if (eax != 0)
004ce30c          eax->vtable->RegisterNoticeHandler(0x4dd270, ((char*)this - 4));
004ce30c      
004ce31f      /* tailcall */
004ce31f      return ChatInterface::PostInit(this);
004ce300  }

004ce324              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004ce330  enum UIElementMessageListenResult __thiscall gmFloatyChatUI::ListenToElementMessage(class gmFloatyChatUI* this, struct UIElementMessageInfo const* arg2)

004ce330  {
004ce344      if ((arg2->idMessage == 1 && arg2->idElement == 0x1000052a))
004ce346          this->vtable->RecvNotice_ServerSaysMoveItem(0);
004ce346      
004ce357      return ChatInterface::ListenToElementMessage(this, arg2);
004ce330  }

004ce35a                                                                                90 90 90 90 90 90                            ......

004ce360  void __thiscall gmFloatyChatUI::RecvNotice_SetChatWindowTitle(class gmFloatyChatUI* this, uint32_t arg2, class StringInfo const* arg3)

004ce360  {
004ce36a      if (arg2 == this->m_eWindowID)
004ce370          this->vtable->SetWindowTitle(arg3);
004ce360  }

004ce37c                                                                                      90 90 90 90                              ....

004ce380  void* __thiscall gmFloatyChatUI::`vector deleting destructor'(class gmFloatyChatUI* this, uint32_t arg2)

004ce380  {
004ce384      this->vtable = 0x7b9be0;
004ce38d      this->vtable = 0x7b9aa8;
004ce393      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ce393      
004ce39a      if (eax != 0)
004ce39c          eax->vtable->UnRegisterAllNoticeHandlers(((char*)this - 4));
004ce39c      
004ce3a6      ChatInterface::~ChatInterface(this);
004ce3a6      
004ce3b0      if ((arg2 & 1) != 0)
004ce3b3          operator delete(((char*)this - 4));
004ce3b3      
004ce3bf      return ((char*)this - 4);
004ce380  }

004ce3c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004ce3d0  void gmFloatyChatUI::Register()

004ce3d0  {
004ce3da      UIElement::RegisterElementClass(0x10000040, gmFloatyChatUI::Create);
004ce3d0  }

004ce3e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ce3f0  void __fastcall gmFloatyChatUI::UpdateFromPlayerModule(class gmFloatyChatUI* this)

004ce3f0  {
004ce403      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004ce414      int32_t* var_bc = nullptr;
004ce418      int32_t* var_b8 = nullptr;
004ce42b      float var_c0;
004ce42b      
004ce42b      if (((PlayerModule::InqOption(edi, 0x10000080, &var_bc) != 0 && var_b8 != 0) && *(uint32_t*)(*(uint32_t*)var_b8 + 0x88)(&var_c0) != 0))
004ce445          ChatInterface::SetDefaultOpacity(this, var_c0);
004ce445      
004ce465      if (((PlayerModule::InqOption(edi, 0x10000081, &var_bc) != 0 && var_b8 != 0) && *(uint32_t*)(*(uint32_t*)var_b8 + 0x88)(&var_c0) != 0))
004ce47f          ChatInterface::SetActiveOpacity(this, var_c0);
004ce47f      
004ce48a      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004ce48a      {
004ce4a8          int32_t var_b4;
004ce4a8          
004ce4a8          if (CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0)
004ce4a8          {
004ce4ae              uint32_t m_eWindowID = this->m_eWindowID;
004ce4c1              int32_t var_a0 = 0;
004ce4c5              int32_t* var_9c_1 = nullptr;
004ce4c9              int32_t var_a8 = 0;
004ce4cd              int32_t* var_a4_1 = nullptr;
004ce4cd              
004ce4d8              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000086, &var_a0) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_a8) != 0 && var_9c_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_9c_1 + 0x78)(&var_b4) != 0 && var_a4_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_a4_1 + 0x78)(&var_c0) != 0))
004ce526                  this->vtable->MoveTo(var_b4, var_c0);
004ce526              
004ce535              uint32_t m_eWindowID_1 = this->m_eWindowID;
004ce548              int32_t var_98 = 0;
004ce54c              int32_t* var_94_1 = nullptr;
004ce550              int32_t var_b0 = 0;
004ce554              int32_t* var_ac_1 = nullptr;
004ce554              
004ce55f              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000088, &var_98) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_b0) != 0 && var_94_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_94_1 + 0x78)(&var_c0) != 0 && var_ac_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_ac_1 + 0x78)(&var_b4) != 0))
004ce5ad                  this->vtable->ResizeTo(var_c0, var_b4);
004ce5ad              
004ce5c0              BaseProperty::~BaseProperty(&var_b0);
004ce5c9              BaseProperty::~BaseProperty(&var_98);
004ce5d2              BaseProperty::~BaseProperty(&var_a8);
004ce5db              BaseProperty::~BaseProperty(&var_a0);
004ce4a8          }
004ce4a8          
004ce602          if (((PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x1000008a, &var_bc) != 0 && var_b8 != 0) && *(uint32_t*)(*(uint32_t*)var_b8 + 0x70)(&var_b4) != 0))
004ce616              this->vtable->SetVisible(var_b4);
004ce616          
004ce63a          if (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x1000008d, &var_bc) != 0)
004ce63a          {
004ce640              void var_90;
004ce640              StringInfo::StringInfo(&var_90);
004ce640              
004ce64b              if ((var_b8 != 0 && *(uint32_t*)(*(uint32_t*)var_b8 + 0xc0)(&var_90) != 0))
004ce65e                  this->vtable->SetWindowTitle(&var_90);
004ce65e              
004ce671              StringInfo::~StringInfo(&var_90);
004ce63a          }
004ce48a      }
004ce48a      
004ce678      ChatInterface::UpdateFromPlayerModule(this);
004ce67d      int32_t* eax_28 = var_bc;
004ce67d      
004ce683      if (eax_28 != 0)
004ce683      {
004ce68d          int32_t esi_2 = (eax_28[1] - 1);
004ce68a          eax_28[1] = esi_2;
004ce68a          
004ce694          if (esi_2 == 0)
004ce69a              **(uint32_t**)eax_28(1);
004ce69a          
004ce69c          var_bc = nullptr;
004ce683      }
004ce683      
004ce6a6      if (var_b8 != 0)
004ce6a6      {
004ce6b0          int32_t esi_4 = (var_b8[1] - 1);
004ce6ad          var_b8[1] = esi_4;
004ce6ad          
004ce6b7          if (esi_4 == 0)
004ce6bd              **(uint32_t**)var_b8(1);
004ce6a6      }
004ce3f0  }

004ce6c9                             90 90 90 90 90 90 90                                                           .......

004ce6d0  void __thiscall gmFloatyChatUI::ResizeTo(class gmFloatyChatUI* this, int32_t const arg2, int32_t const arg3)

004ce6d0  {
004ce6e3      ChatInterface::ResizeTo(this, arg2, arg3);
004ce6e3      
004ce6f2      if ((this->m_oldState != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004ce6f2      {
004ce717          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004ce71a          int32_t* var_8 = nullptr;
004ce71e          int32_t* var_4_1 = nullptr;
004ce722          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004ce729          int32_t eax_3 = UIRegion::GetWidth(this);
004ce729          
004ce734          if (var_4_1 != 0)
004ce734          {
004ce73a              BaseProperty::CheckCopyOnWrite(&var_8);
004ce746              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_3);
004ce734          }
004ce734          
004ce75a          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_oldState, &var_8);
004ce768          int32_t* var_10 = nullptr;
004ce76c          int32_t* var_c_1 = nullptr;
004ce770          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004ce777          int32_t eax_4 = UIRegion::GetHeight(this);
004ce777          
004ce782          if (var_c_1 != 0)
004ce782          {
004ce788              BaseProperty::CheckCopyOnWrite(&var_10);
004ce794              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_4);
004ce782          }
004ce782          
004ce7a5          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_oldState, &var_10);
004ce7aa          int32_t* eax_5 = var_10;
004ce7aa          
004ce7b2          if (eax_5 != 0)
004ce7b2          {
004ce7bc              int32_t esi_2 = (eax_5[1] - 1);
004ce7b9              eax_5[1] = esi_2;
004ce7b9              
004ce7c3              if (esi_2 == 0)
004ce7c9                  **(uint32_t**)eax_5(1);
004ce7c9              
004ce7cb              var_10 = nullptr;
004ce7b2          }
004ce7b2          
004ce7d5          if (var_c_1 != 0)
004ce7d5          {
004ce7df              int32_t esi_4 = (var_c_1[1] - 1);
004ce7dc              var_c_1[1] = esi_4;
004ce7dc              
004ce7e6              if (esi_4 == 0)
004ce7ec                  **(uint32_t**)var_c_1(1);
004ce7ec              
004ce7ee              int32_t var_c_2 = 0;
004ce7d5          }
004ce7d5          
004ce7f2          int32_t* eax_10 = var_8;
004ce7f2          
004ce7f8          if (eax_10 != 0)
004ce7f8          {
004ce802              int32_t esi_6 = (eax_10[1] - 1);
004ce7ff              eax_10[1] = esi_6;
004ce7ff              
004ce809              if (esi_6 == 0)
004ce80f                  **(uint32_t**)eax_10(1);
004ce80f              
004ce811              var_8 = nullptr;
004ce7f8          }
004ce7f8          
004ce81b          if (var_4_1 != 0)
004ce81b          {
004ce825              int32_t esi_8 = (var_4_1[1] - 1);
004ce822              var_4_1[1] = esi_8;
004ce822              
004ce82c              if (esi_8 == 0)
004ce832                  **(uint32_t**)var_4_1(1);
004ce81b          }
004ce6f2      }
004ce6d0  }

004ce83c                                                                                      90 90 90 90                              ....

004ce840  void __thiscall gmFloatyChatUI::MoveTo(class gmFloatyChatUI* this, int32_t const arg2, int32_t const arg3)

004ce840  {
004ce853      UIElement::MoveTo(this, arg2, arg3);
004ce853      
004ce862      if ((this->m_oldState != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004ce862      {
004ce887          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004ce88a          int32_t* var_8 = nullptr;
004ce88e          int32_t* var_4_1 = nullptr;
004ce892          BaseProperty::SetPropertyName(&var_8, 0x10000086);
004ce89b          uint32_t m_timestamp = this->m_tsSerialNumberLastListenedTo.m_timestamp;
004ce89b          
004ce89e          if (var_4_1 != 0)
004ce89e          {
004ce8a4              BaseProperty::CheckCopyOnWrite(&var_8);
004ce8b0              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(m_timestamp);
004ce89e          }
004ce89e          
004ce8c4          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_oldState, &var_8);
004ce8d2          int32_t* var_10 = nullptr;
004ce8d6          int32_t* var_c_1 = nullptr;
004ce8da          BaseProperty::SetPropertyName(&var_10, 0x10000087);
004ce8e3          int32_t m_x0 = this->m_box.m_x0;
004ce8e3          
004ce8e9          if (var_c_1 != 0)
004ce8e9          {
004ce8ef              BaseProperty::CheckCopyOnWrite(&var_10);
004ce8fb              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(m_x0);
004ce8e9          }
004ce8e9          
004ce90c          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_oldState, &var_10);
004ce911          int32_t* eax_3 = var_10;
004ce911          
004ce919          if (eax_3 != 0)
004ce919          {
004ce923              int32_t esi_2 = (eax_3[1] - 1);
004ce920              eax_3[1] = esi_2;
004ce920              
004ce92a              if (esi_2 == 0)
004ce930                  **(uint32_t**)eax_3(1);
004ce930              
004ce932              var_10 = nullptr;
004ce919          }
004ce919          
004ce93c          if (var_c_1 != 0)
004ce93c          {
004ce946              int32_t esi_4 = (var_c_1[1] - 1);
004ce943              var_c_1[1] = esi_4;
004ce943              
004ce94d              if (esi_4 == 0)
004ce953                  **(uint32_t**)var_c_1(1);
004ce953              
004ce955              int32_t var_c_2 = 0;
004ce93c          }
004ce93c          
004ce959          int32_t* eax_8 = var_8;
004ce959          
004ce95f          if (eax_8 != 0)
004ce95f          {
004ce969              int32_t esi_6 = (eax_8[1] - 1);
004ce966              eax_8[1] = esi_6;
004ce966              
004ce970              if (esi_6 == 0)
004ce976                  **(uint32_t**)eax_8(1);
004ce976              
004ce978              var_8 = nullptr;
004ce95f          }
004ce95f          
004ce982          if (var_4_1 != 0)
004ce982          {
004ce98c              int32_t esi_8 = (var_4_1[1] - 1);
004ce989              var_4_1[1] = esi_8;
004ce989              
004ce993              if (esi_8 == 0)
004ce999                  **(uint32_t**)var_4_1(1);
004ce982          }
004ce862      }
004ce840  }

004ce9a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ce9b0  void __thiscall gmFloatyMainChatUI::SetVisible(class gmFloatyMainChatUI* this, uint8_t arg2)

004ce9b0  {
004ce9bb      UIElement::SetVisible(this, arg2);
004ce9bb      
004ce9c8      if ((this->m_oldState != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004ce9c8      {
004ce9ec          class CPlayerModule* esi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004ce9ef          int32_t* var_8 = nullptr;
004ce9f7          int32_t* var_4_1 = nullptr;
004ce9ff          BaseProperty::SetPropertyName(&var_8, 0x1000008a);
004cea10          uint8_t ecx_2 = (((int8_t)(this->m_alphaBlendMod >> 1)) & 1);
004cea10          
004cea19          if (var_4_1 != 0)
004cea19          {
004cea1f              BaseProperty::CheckCopyOnWrite(&var_8);
004cea2f              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x74)(ecx_2);
004cea19          }
004cea19          
004cea41          PlayerModule::SetChatWindowOption(&esi_2->vtable, this->m_oldState, &var_8);
004cea46          int32_t* eax_5 = var_8;
004cea46          
004cea4c          if (eax_5 != 0)
004cea4c          {
004cea56              int32_t esi_4 = (eax_5[1] - 1);
004cea53              eax_5[1] = esi_4;
004cea53              
004cea5d              if (esi_4 == 0)
004cea63                  **(uint32_t**)eax_5(1);
004cea63              
004cea65              var_8 = nullptr;
004cea4c          }
004cea4c          
004cea73          if (var_4_1 != 0)
004cea73          {
004cea7d              int32_t esi_6 = (var_4_1[1] - 1);
004cea7a              var_4_1[1] = esi_6;
004cea7a              
004cea84              if (esi_6 == 0)
004cea8a                  **(uint32_t**)var_4_1(1);
004cea73          }
004ce9c8      }
004ce9b0  }

004cea94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004ceaa0  uint8_t __thiscall gmFloatyChatUI::SetWindowTitle(class gmFloatyChatUI* this, class StringInfo const* arg2)

004ceaa0  {
004ceab0      class UIElement* eax = UIElement::GetChildRecursive(&this->vtable, 0x100004d9);
004ceab5      class StringInfo* ebx = arg2;
004ceab5      
004ceabd      if (eax == 0)
004ceba0          arg2 = nullptr;
004ceabd      else
004ceabd      {
004ceac9          class StringInfo* eax_1 = eax->vtable->DynamicCast(0xc);
004cead1          arg2 = eax_1;
004cead1          
004cead5          if (eax_1 != 0)
004ceada              UIElement_Text::SetStringInfo(eax_1, ebx);
004ceabd      }
004ceabd      
004ceae5      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004ceae5      {
004ceb09          class CPlayerModule* esi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004ceb0c          int32_t* var_8 = nullptr;
004ceb10          int32_t* var_4_1 = nullptr;
004ceb14          BaseProperty::SetPropertyName(&var_8, 0x1000008d);
004ceb14          
004ceb1d          if (var_4_1 != 0)
004ceb1d          {
004ceb23              BaseProperty::CheckCopyOnWrite(&var_8);
004ceb2f              *(uint32_t*)(*(uint32_t*)var_4_1 + 0xc4)(ebx);
004ceb1d          }
004ceb1d          
004ceb44          PlayerModule::SetChatWindowOption(&esi_2->vtable, this->m_eWindowID, &var_8);
004ceb49          int32_t* eax_5 = var_8;
004ceb49          
004ceb4f          if (eax_5 != 0)
004ceb4f          {
004ceb59              int32_t esi_4 = (eax_5[1] - 1);
004ceb56              eax_5[1] = esi_4;
004ceb56              
004ceb60              if (esi_4 == 0)
004ceb66                  **(uint32_t**)eax_5(1);
004ceb66              
004ceb68              var_8 = nullptr;
004ceb4f          }
004ceb4f          
004ceb72          if (var_4_1 != 0)
004ceb72          {
004ceb7c              int32_t esi_6 = (var_4_1[1] - 1);
004ceb79              var_4_1[1] = esi_6;
004ceb79              
004ceb83              if (esi_6 == 0)
004ceb89                  **(uint32_t**)var_4_1(1);
004ceb72          }
004ceae5      }
004ceae5      
004ceb9d      return arg2 != 0;
004ceaa0  }

004ceba9                             90 90 90 90 90 90 90                                                           .......

004cebb0  void __thiscall gmFloatyVitalsUI::gmFloatyVitalsUI(class gmFloatyVitalsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004cebb0  {
004cebbf      gmVitalsUI::gmVitalsUI(this, arg2, arg3);
004cebc6      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004cec2c      this->vtable = 0x7b9f80;
004cec32      this->vtable = &gmFloatyVitalsUI::`vftable';
004cec3c      this->vtable = &gmFloatySideVitalsUI::`vftable';
004cebb0  }

004cec4c                                      90 90 90 90                                                              ....

004cec50  class UIElement* __thiscall gmFloatyVitalsUI::DynamicCast(class gmFloatyVitalsUI* this, uint32_t arg2) __pure

004cec50  {
004cec64      if ((arg2 == 0x1000004d || arg2 == 0x10000009))
004cec71          return this;
004cec71      
004cec6b      int32_t edx_1;
004cec6b      edx_1 = arg2 != 3;
004cec6f      return (this & (edx_1 - 1));
004cec50  }

004cec74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004cec80  uint32_t gmFloatyVitalsUI::GetUIElementType(class gmFloatyVitalsUI const* this @ ecx) __pure

004cec80  {
004cec85      return 0x1000004d;
004cec80  }

004cec86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004cec90  class UIElement* gmFloatyVitalsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004cec90  {
004cec95      void* eax = operator new(0x65c);
004cec95      
004cec9f      if (eax == 0)
004cecb5          return 0;
004cecb5      
004cecb2      return gmFloatyVitalsUI::gmFloatyVitalsUI(eax, arg1, arg2);
004cec90  }

004cecb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cecc0  enum UIElementMessageListenResult __thiscall gmFloatySideVitalsUI::ListenToElementMessage(class gmFloatySideVitalsUI* this, struct UIElementMessageInfo const* arg2)

004cecc0  {
004cecc0      /* tailcall */
004cecc0      return gmVitalsUI::ListenToElementMessage(this, arg2);
004cecc0  }

004cecc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004cecd0  uint8_t __thiscall gmFloatyCombatPanelUI::OnChildAction(class gmFloatyCombatPanelUI* this, class UIElement const* arg2, class InputEvent const* arg3)

004cecd0  {
004cecd0      /* tailcall */
004cecd0      return UIElement::OnChildAction(this, arg2, arg3);
004cecd0  }

004cecd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004cece0  void __stdcall gmFloatyCombatPanelUI::RecvNotice_GameplayOptionChanged(class gmFloatyCombatPanelUI* this @ ecx, class BaseProperty const* arg2, uint32_t arg3)

004cece0  {
004cece1      class BaseProperty* esi = arg2;
004cece7      uint32_t eax = BaseProperty::GetPropertyName(esi);
004cece7      
004cecf4      if ((eax == 0x10000080 || eax == 0x10000081))
004cecf4      {
004cecf6          class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
004cecf6          
004cecfb          if (m_pcPropertyValue != 0)
004cecfd              m_pcPropertyValue->vtable->InqFloat(&arg2);
004cecf4      }
004cece0  }

004ced0e                                            90 90                                                                ..

004ced10  void __thiscall gmFloatyCombatPanelUI::SetVisible(class gmFloatyCombatPanelUI* this, uint8_t arg2)

004ced10  {
004ced10      /* tailcall */
004ced10      return UIElement::SetVisible(this, arg2);
004ced10  }

004ced15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004ced20  void __thiscall gmFloatySideVitalsUI::RecvNotice_PlayerDescReceived(class gmFloatySideVitalsUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004ced20  {
004ced2f      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x138)();
004ced3d      class CPlayerModule* var_8 = arg3;
004ced41      gmVitalsUI::RecvNotice_PlayerDescReceived(this, arg2, arg2);
004ced20  }

004ced4a                                90 90 90 90 90 90                                                            ......

004ced50  void* __thiscall gmFloatyVitalsUI::`scalar deleting destructor'(class gmFloatyVitalsUI* this, uint32_t arg2)

004ced50  {
004ced53      this->vtable = 0x7b9f80;
004ced59      this->vtable = &gmFloatyVitalsUI::`vftable';
004ced63      this->vtable = &gmFloatySideVitalsUI::`vftable';
004ced6d      gmVitalsUI::~gmVitalsUI(this);
004ced6d      
004ced77      if ((arg2 & 1) != 0)
004ced7a          operator delete(this);
004ced7a      
004ced85      return this;
004ced50  }

004ced88                          90 90 90 90 90 90 90 90                                                          ........

004ced90  void gmFloatyVitalsUI::Register()

004ced90  {
004ced9a      UIElement::RegisterElementClass(0x1000004d, gmFloatyVitalsUI::Create);
004ced90  }

004ceda3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004cedb0  void __thiscall gmFloatyVitalsUI::PostInit(class gmFloatyVitalsUI* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004cedb0  {
004cedb3      gmVitalsUI::PostInit(this);
004cedc6      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004cedcd      struct QualityChangeHandler::VTable** eax_1;
004cedcd      
004cedcd      if (this == 0)
004cedd7          eax_1 = nullptr;
004cedcd      else
004cedcf          eax_1 = &this->vtable;
004cedcf      
004cedd9      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 2, eax_1);
004cedeb      struct QualityChangeHandler::VTable** eax_2;
004cedeb      
004cedeb      if (this == 0)
004cedf5          eax_2 = nullptr;
004cedeb      else
004ceded          eax_2 = &this->vtable;
004ceded      
004cedf7      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 1, eax_2);
004cee09      struct QualityChangeHandler::VTable** eax_3;
004cee09      
004cee09      if (this == 0)
004cee13          eax_3 = nullptr;
004cee09      else
004cee0b          eax_3 = &this->vtable;
004cee0b      
004cee15      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 4, eax_3);
004cee27      struct QualityChangeHandler::VTable** eax_4;
004cee27      
004cee27      if (this == 0)
004cee31          eax_4 = nullptr;
004cee27      else
004cee29          eax_4 = &this->vtable;
004cee29      
004cee33      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 3, eax_4);
004cee45      struct QualityChangeHandler::VTable** eax_5;
004cee45      
004cee45      if (this == 0)
004cee4f          eax_5 = nullptr;
004cee45      else
004cee47          eax_5 = &this->vtable;
004cee47      
004cee51      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 6, eax_5);
004cee63      struct QualityChangeHandler::VTable** eax_6;
004cee63      
004cee63      if (this == 0)
004cee6d          eax_6 = nullptr;
004cee63      else
004cee65          eax_6 = &this->vtable;
004cee65      
004cee6f      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 5, eax_6);
004cee86      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x1000063c);
004cee8d      class UIElement* eax_8;
004cee8d      
004cee8d      if (eax_7 == 0)
004cee9d          eax_8 = nullptr;
004cee8d      else
004cee95          eax_8 = eax_7->vtable->DynamicCast(2);
004cee95      
004ceea6      this->m_pTopBorder = eax_8;
004ceeac      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x1000063e);
004ceeb3      class UIElement* eax_10;
004ceeb3      
004ceeb3      if (eax_9 == 0)
004ceec3          eax_10 = nullptr;
004ceeb3      else
004ceebb          eax_10 = eax_9->vtable->DynamicCast(9);
004ceebb      
004ceecc      this->m_pLeftBorder = eax_10;
004ceed2      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x10000640);
004ceed9      class UIElement* eax_12;
004ceed9      
004ceed9      if (eax_11 == 0)
004ceee9          eax_12 = nullptr;
004ceed9      else
004ceee1          eax_12 = eax_11->vtable->DynamicCast(2);
004ceee1      
004ceef2      this->m_pBottomBorder = eax_12;
004ceef8      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x10000642);
004ceeff      class UIElement* eax_14;
004ceeff      
004ceeff      if (eax_13 == 0)
004cef0f          eax_14 = nullptr;
004ceeff      else
004cef07          eax_14 = eax_13->vtable->DynamicCast(9);
004cef07      
004cef18      this->m_pRightBorder = eax_14;
004cef1e      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x1000063b);
004cef25      class UIElement* eax_16;
004cef25      
004cef25      if (eax_15 == 0)
004cef35          eax_16 = nullptr;
004cef25      else
004cef2d          eax_16 = eax_15->vtable->DynamicCast(9);
004cef2d      
004cef3e      this->m_pTopLeftCorner = eax_16;
004cef44      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x1000063d);
004cef4b      class UIElement* eax_18;
004cef4b      
004cef4b      if (eax_17 == 0)
004cef5b          eax_18 = nullptr;
004cef4b      else
004cef53          eax_18 = eax_17->vtable->DynamicCast(9);
004cef53      
004cef64      this->m_pTopRightCorner = eax_18;
004cef6a      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x1000063f);
004cef71      class UIElement* eax_20;
004cef71      
004cef71      if (eax_19 == 0)
004cef81          eax_20 = nullptr;
004cef71      else
004cef79          eax_20 = eax_19->vtable->DynamicCast(9);
004cef79      
004cef8a      this->m_pBottomLeftCorner = eax_20;
004cef90      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x10000641);
004cef97      class UIElement* eax_22;
004cef97      
004cef97      if (eax_21 == 0)
004cefa7          eax_22 = nullptr;
004cef97      else
004cef9f          eax_22 = eax_21->vtable->DynamicCast(9);
004cef9f      
004cefb0      this->m_pBottomRightCorner = eax_22;
004cefb6      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x10000634);
004cefbd      class UIElement* eax_24;
004cefbd      
004cefbd      if (eax_23 == 0)
004cefcd          eax_24 = nullptr;
004cefbd      else
004cefc5          eax_24 = eax_23->vtable->DynamicCast(3);
004cefc5      
004cefd6      this->m_pTopBorder_Locked = eax_24;
004cefdc      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x10000636);
004cefe3      class UIElement* eax_26;
004cefe3      
004cefe3      if (eax_25 == 0)
004ceff3          eax_26 = nullptr;
004cefe3      else
004cefeb          eax_26 = eax_25->vtable->DynamicCast(3);
004cefeb      
004ceffc      this->m_pLeftBorder_Locked = eax_26;
004cf002      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x10000638);
004cf009      class UIElement* eax_28;
004cf009      
004cf009      if (eax_27 == 0)
004cf019          eax_28 = nullptr;
004cf009      else
004cf011          eax_28 = eax_27->vtable->DynamicCast(3);
004cf011      
004cf022      this->m_pBottomBorder_Locked = eax_28;
004cf028      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x1000063a);
004cf02f      class UIElement* eax_30;
004cf02f      
004cf02f      if (eax_29 == 0)
004cf03f          eax_30 = nullptr;
004cf02f      else
004cf037          eax_30 = eax_29->vtable->DynamicCast(3);
004cf037      
004cf048      this->m_pRightBorder_Locked = eax_30;
004cf04e      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x10000633);
004cf055      class UIElement* eax_32;
004cf055      
004cf055      if (eax_31 == 0)
004cf065          eax_32 = nullptr;
004cf055      else
004cf05d          eax_32 = eax_31->vtable->DynamicCast(3);
004cf05d      
004cf06e      this->m_pTopLeftCorner_Locked = eax_32;
004cf074      class UIElement* eax_33 = UIElement::GetChildRecursive(this, 0x10000635);
004cf07b      class UIElement* eax_34;
004cf07b      
004cf07b      if (eax_33 == 0)
004cf08b          eax_34 = nullptr;
004cf07b      else
004cf083          eax_34 = eax_33->vtable->DynamicCast(3);
004cf083      
004cf094      this->m_pTopRightCorner_Locked = eax_34;
004cf09a      class UIElement* eax_35 = UIElement::GetChildRecursive(this, 0x10000637);
004cf0a1      class UIElement* eax_36;
004cf0a1      
004cf0a1      if (eax_35 == 0)
004cf0b1          eax_36 = nullptr;
004cf0a1      else
004cf0a9          eax_36 = eax_35->vtable->DynamicCast(3);
004cf0a9      
004cf0ba      this->m_pBottomLeftCorner_Locked = eax_36;
004cf0c0      class UIElement* eax_37 = UIElement::GetChildRecursive(this, 0x10000639);
004cf0c7      class UIElement* eax_38;
004cf0c7      
004cf0c7      if (eax_37 == 0)
004cf0d7          eax_38 = nullptr;
004cf0c7      else
004cf0cf          eax_38 = eax_37->vtable->DynamicCast(3);
004cf0cf      
004cf0d9      this->m_pBottomRightCorner_Locked = eax_38;
004cf0df      GlobalEventHandler::GetGlobalEventHandler()->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004cf0fb      UIListener::RegisterForGlobalMessage(this, 0xd);
004cf105      /* jump -> this->vtable->UpdateFromPlayerModule */
004cedb0  }

004cf10b                                   90 90 90 90 90                                                             .....

004cf110  void __thiscall gmFloatyPanelUI::ListenToGlobalMessage(class gmFloatyPanelUI* this, uint32_t arg2, int32_t arg3)

004cf110  {
004cf11b      if (arg2 == 0xd)
004cf11d          gmFloatyPanelUI::UpdateLockedStatus(this);
004cf11d      
004cf12a      NoticeHandler::RecvNotice_DisplayWeenieError(this, arg2, arg3);
004cf110  }

004cf134                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004cf140  void __fastcall gmFloatyVitalsUI::UpdateFromPlayerModule(class gmFloatyVitalsUI* this)

004cf140  {
004cf150      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004cf150      
004cf160      if (PlayerModule::SideBySideVitals(edi) == 0)
004cf16a          this->vtable->SetVisible(1);
004cf160      else
004cf162          this->vtable->SetVisible(0);
004cf162      
004cf17d      int32_t* var_28 = nullptr;
004cf181      int32_t* var_24 = nullptr;
004cf194      int32_t var_2c;
004cf194      
004cf194      if ((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0))
004cf19d          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004cf19d      
004cf1be      if ((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0))
004cf1c7          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004cf1c7      
004cf1d3      if (((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0) && CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0))
004cf1d3      {
004cf1f7          uint32_t m_eWindowID_1 = this->m_eWindowID;
004cf20a          int32_t var_8 = 0;
004cf20e          int32_t* var_4_1 = nullptr;
004cf212          int32_t var_10 = 0;
004cf216          int32_t* var_c_1 = nullptr;
004cf221          int32_t var_30;
004cf221          
004cf221          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004cf273              this->vtable->MoveTo(var_2c, var_30);
004cf273          
004cf27c          uint32_t m_eWindowID = this->m_eWindowID;
004cf28f          int32_t var_18 = 0;
004cf293          int32_t* var_14_1 = nullptr;
004cf297          int32_t var_20 = 0;
004cf29b          int32_t* var_1c_1 = nullptr;
004cf29b          
004cf2a6          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004cf2f8              this->vtable->ResizeTo(var_30, var_2c);
004cf2f8          
004cf305          BaseProperty::~BaseProperty(&var_20);
004cf30e          BaseProperty::~BaseProperty(&var_18);
004cf317          BaseProperty::~BaseProperty(&var_10);
004cf320          BaseProperty::~BaseProperty(&var_8);
004cf1d3      }
004cf1d3      
004cf327      gmFloatyPanelUI::UpdateLockedStatus(this);
004cf32c      int32_t* eax_20 = var_28;
004cf32c      
004cf332      if (eax_20 != 0)
004cf332      {
004cf33c          int32_t esi_2 = (eax_20[1] - 1);
004cf339          eax_20[1] = esi_2;
004cf339          
004cf343          if (esi_2 == 0)
004cf349              **(uint32_t**)eax_20(1);
004cf349          
004cf34b          var_28 = nullptr;
004cf332      }
004cf332      
004cf355      if (var_24 != 0)
004cf355      {
004cf35f          int32_t esi_4 = (var_24[1] - 1);
004cf35c          var_24[1] = esi_4;
004cf35c          
004cf366          if (esi_4 == 0)
004cf36c              **(uint32_t**)var_24(1);
004cf355      }
004cf140  }

004cf375                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004cf380  void __thiscall gmFloatyToolbarUI::gmFloatyToolbarUI(class gmFloatyToolbarUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004cf380  {
004cf38f      gmToolbarUI::gmToolbarUI(this, arg2, arg3);
004cf396      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004cf3fc      this->vtable = 0x7ba458;
004cf402      this->vtable = &gmFloatyToolbarUI::`vftable';
004cf40c      this->vtable = &gmToolbarUI::`vftable';
004cf380  }

004cf41c                                                                                      90 90 90 90                              ....

004cf420  class UIElement* __thiscall gmFloatyToolbarUI::DynamicCast(class gmFloatyToolbarUI* this, uint32_t arg2) __pure

004cf420  {
004cf434      if ((arg2 == 0x10000051 || arg2 == 0x10000007))
004cf441          return this;
004cf441      
004cf43b      int32_t edx_1;
004cf43b      edx_1 = arg2 != 3;
004cf43f      return (this & (edx_1 - 1));
004cf420  }

004cf444              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004cf450  uint32_t gmFloatyToolbarUI::GetUIElementType(class gmFloatyToolbarUI const* this @ ecx) __pure

004cf450  {
004cf455      return 0x10000051;
004cf450  }

004cf456                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004cf460  class UIElement* gmFloatyToolbarUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004cf460  {
004cf465      void* eax = operator new(0x690);
004cf465      
004cf46f      if (eax == 0)
004cf485          return 0;
004cf485      
004cf482      return gmFloatyToolbarUI::gmFloatyToolbarUI(eax, arg1, arg2);
004cf460  }

004cf486                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004cf490  void __fastcall gmFloatyToolbarUI::UpdateLockedStatus(class gmFloatyToolbarUI* this)

004cf490  {
004cf4a0      bool cond:0 = PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0;
004cf4a2      class UIElement* m_pTopBorder = this->m_pTopBorder;
004cf4a2      
004cf4a8      if (!(cond:0))
004cf4a8      {
004cf4ae          m_pTopBorder->vtable->SetVisible(0);
004cf4b5          this->m_pTopBorder->vtable->SetVisible(0);
004cf4c2          this->m_pLeftBorder->vtable->SetVisible(0);
004cf4cf          this->m_pBottomBorder->vtable->SetVisible(0);
004cf4dc          this->m_pRightBorder->vtable->SetVisible(0);
004cf4e9          this->m_pTopLeftCorner->vtable->SetVisible(0);
004cf4f6          this->m_pTopRightCorner->vtable->SetVisible(0);
004cf503          this->m_pBottomLeftCorner->vtable->SetVisible(0);
004cf510          this->m_pBottomRightCorner->vtable->SetVisible(0);
004cf51d          this->m_pTopBorder_Locked->vtable->SetVisible(1);
004cf52a          this->m_pLeftBorder_Locked->vtable->SetVisible(1);
004cf537          this->m_pBottomBorder_Locked->vtable->SetVisible(1);
004cf544          this->m_pRightBorder_Locked->vtable->SetVisible(1);
004cf551          this->m_pTopLeftCorner_Locked->vtable->SetVisible(1);
004cf55e          this->m_pTopRightCorner_Locked->vtable->SetVisible(1);
004cf56b          this->m_pBottomLeftCorner_Locked->vtable->SetVisible(1);
004cf578          this->m_pBottomRightCorner_Locked->vtable->SetVisible(1);
004cf586          return;
004cf4a8      }
004cf4a8      
004cf587      m_pTopBorder->vtable->SetVisible(1);
004cf58e      this->m_pTopBorder->vtable->SetVisible(1);
004cf59b      this->m_pLeftBorder->vtable->SetVisible(1);
004cf5a8      this->m_pBottomBorder->vtable->SetVisible(1);
004cf5b5      this->m_pRightBorder->vtable->SetVisible(1);
004cf5c2      this->m_pTopLeftCorner->vtable->SetVisible(1);
004cf5cf      this->m_pTopRightCorner->vtable->SetVisible(1);
004cf5dc      this->m_pBottomLeftCorner->vtable->SetVisible(1);
004cf5e9      this->m_pBottomRightCorner->vtable->SetVisible(1);
004cf5f6      this->m_pTopBorder_Locked->vtable->SetVisible(0);
004cf603      this->m_pLeftBorder_Locked->vtable->SetVisible(0);
004cf610      this->m_pBottomBorder_Locked->vtable->SetVisible(0);
004cf61d      this->m_pRightBorder_Locked->vtable->SetVisible(0);
004cf62a      this->m_pTopLeftCorner_Locked->vtable->SetVisible(0);
004cf637      this->m_pTopRightCorner_Locked->vtable->SetVisible(0);
004cf644      this->m_pBottomLeftCorner_Locked->vtable->SetVisible(0);
004cf651      this->m_pBottomRightCorner_Locked->vtable->SetVisible(0);
004cf490  }


004cf660  void __thiscall gmFloatyToolbarUI::RecvNotice_PlayerDescReceived(class gmFloatyToolbarUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004cf660  {
004cf66f      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x138)();
004cf67d      class CPlayerModule* var_8 = arg3;
004cf681      gmToolbarUI::RecvNotice_PlayerDescReceived(this, arg2, arg2);
004cf660  }

004cf68a                                90 90 90 90 90 90                                                            ......

004cf690  void* __thiscall gmFloatyToolbarUI::`scalar deleting destructor'(class gmFloatyToolbarUI* this, uint32_t arg2)

004cf690  {
004cf693      this->vtable = 0x7ba458;
004cf699      this->vtable = &gmFloatyToolbarUI::`vftable';
004cf6a3      this->vtable = &gmToolbarUI::`vftable';
004cf6ad      gmToolbarUI::~gmToolbarUI(this);
004cf6ad      
004cf6b7      if ((arg2 & 1) != 0)
004cf6ba          operator delete(this);
004cf6ba      
004cf6c5      return this;
004cf690  }

004cf6c8                          90 90 90 90 90 90 90 90                                                          ........

004cf6d0  void gmFloatyToolbarUI::Register()

004cf6d0  {
004cf6da      UIElement::RegisterElementClass(0x10000051, gmFloatyToolbarUI::Create);
004cf6d0  }

004cf6e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004cf6f0  void __thiscall gmFloatyToolbarUI::PostInit(class gmFloatyToolbarUI* this)

004cf6f0  {
004cf700      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004cf707      gmToolbarUI::PostInit(this);
004cf713      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x1000062c);
004cf71a      class UIElement* eax_2;
004cf71a      
004cf71a      if (eax_1 == 0)
004cf72a          eax_2 = nullptr;
004cf71a      else
004cf722          eax_2 = eax_1->vtable->DynamicCast(2);
004cf722      
004cf733      this->m_pTopBorder = eax_2;
004cf739      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x1000062e);
004cf740      class UIElement* eax_4;
004cf740      
004cf740      if (eax_3 == 0)
004cf750          eax_4 = nullptr;
004cf740      else
004cf748          eax_4 = eax_3->vtable->DynamicCast(2);
004cf748      
004cf759      this->m_pLeftBorder = eax_4;
004cf75f      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x10000630);
004cf766      class UIElement* eax_6;
004cf766      
004cf766      if (eax_5 == 0)
004cf776          eax_6 = nullptr;
004cf766      else
004cf76e          eax_6 = eax_5->vtable->DynamicCast(9);
004cf76e      
004cf77f      this->m_pBottomBorder = eax_6;
004cf785      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x10000632);
004cf78c      class UIElement* eax_8;
004cf78c      
004cf78c      if (eax_7 == 0)
004cf79c          eax_8 = nullptr;
004cf78c      else
004cf794          eax_8 = eax_7->vtable->DynamicCast(2);
004cf794      
004cf7a5      this->m_pRightBorder = eax_8;
004cf7ab      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x1000062b);
004cf7b2      class UIElement* eax_10;
004cf7b2      
004cf7b2      if (eax_9 == 0)
004cf7c2          eax_10 = nullptr;
004cf7b2      else
004cf7ba          eax_10 = eax_9->vtable->DynamicCast(2);
004cf7ba      
004cf7cb      this->m_pTopLeftCorner = eax_10;
004cf7d1      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x1000062d);
004cf7d8      class UIElement* eax_12;
004cf7d8      
004cf7d8      if (eax_11 == 0)
004cf7e8          eax_12 = nullptr;
004cf7d8      else
004cf7e0          eax_12 = eax_11->vtable->DynamicCast(2);
004cf7e0      
004cf7f1      this->m_pTopRightCorner = eax_12;
004cf7f7      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x1000062f);
004cf7fe      class UIElement* eax_14;
004cf7fe      
004cf7fe      if (eax_13 == 0)
004cf80e          eax_14 = nullptr;
004cf7fe      else
004cf806          eax_14 = eax_13->vtable->DynamicCast(9);
004cf806      
004cf817      this->m_pBottomLeftCorner = eax_14;
004cf81d      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x10000631);
004cf824      class UIElement* eax_16;
004cf824      
004cf824      if (eax_15 == 0)
004cf834          eax_16 = nullptr;
004cf824      else
004cf82c          eax_16 = eax_15->vtable->DynamicCast(9);
004cf82c      
004cf83d      this->m_pBottomRightCorner = eax_16;
004cf843      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x10000624);
004cf84a      class UIElement* eax_18;
004cf84a      
004cf84a      if (eax_17 == 0)
004cf85a          eax_18 = nullptr;
004cf84a      else
004cf852          eax_18 = eax_17->vtable->DynamicCast(3);
004cf852      
004cf863      this->m_pTopBorder_Locked = eax_18;
004cf869      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x10000626);
004cf870      class UIElement* eax_20;
004cf870      
004cf870      if (eax_19 == 0)
004cf880          eax_20 = nullptr;
004cf870      else
004cf878          eax_20 = eax_19->vtable->DynamicCast(3);
004cf878      
004cf889      this->m_pLeftBorder_Locked = eax_20;
004cf88f      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x10000628);
004cf896      class UIElement* eax_22;
004cf896      
004cf896      if (eax_21 == 0)
004cf8a6          eax_22 = nullptr;
004cf896      else
004cf89e          eax_22 = eax_21->vtable->DynamicCast(3);
004cf89e      
004cf8af      this->m_pBottomBorder_Locked = eax_22;
004cf8b5      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x1000062a);
004cf8bc      class UIElement* eax_24;
004cf8bc      
004cf8bc      if (eax_23 == 0)
004cf8cc          eax_24 = nullptr;
004cf8bc      else
004cf8c4          eax_24 = eax_23->vtable->DynamicCast(3);
004cf8c4      
004cf8d5      this->m_pRightBorder_Locked = eax_24;
004cf8db      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x10000623);
004cf8e2      class UIElement* eax_26;
004cf8e2      
004cf8e2      if (eax_25 == 0)
004cf8f2          eax_26 = nullptr;
004cf8e2      else
004cf8ea          eax_26 = eax_25->vtable->DynamicCast(3);
004cf8ea      
004cf8fb      this->m_pTopLeftCorner_Locked = eax_26;
004cf901      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x10000625);
004cf908      class UIElement* eax_28;
004cf908      
004cf908      if (eax_27 == 0)
004cf918          eax_28 = nullptr;
004cf908      else
004cf910          eax_28 = eax_27->vtable->DynamicCast(3);
004cf910      
004cf921      this->m_pTopRightCorner_Locked = eax_28;
004cf927      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x10000627);
004cf92e      class UIElement* eax_30;
004cf92e      
004cf92e      if (eax_29 == 0)
004cf93e          eax_30 = nullptr;
004cf92e      else
004cf936          eax_30 = eax_29->vtable->DynamicCast(3);
004cf936      
004cf947      this->m_pBottomLeftCorner_Locked = eax_30;
004cf94d      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x10000629);
004cf954      class UIElement* eax_32;
004cf954      
004cf954      if (eax_31 == 0)
004cf964          eax_32 = nullptr;
004cf954      else
004cf95c          eax_32 = eax_31->vtable->DynamicCast(3);
004cf95c      
004cf966      this->m_pBottomRightCorner_Locked = eax_32;
004cf96c      class GlobalEventHandler* eax_33 = GlobalEventHandler::GetGlobalEventHandler();
004cf96c      
004cf975      if (eax_33 != 0)
004cf975      {
004cf97b          eax_33->vtable->RegisterNoticeHandler(0x4dd1ef, &this->vtable);
004cf98f          eax_33->vtable->RegisterNoticeHandler(0x4dd244, &this->vtable);
004cf99c          eax_33->vtable->RegisterNoticeHandler(0x4dd1f5, &this->vtable);
004cf9a9          eax_33->vtable->RegisterNoticeHandler(0x186ab, &this->vtable);
004cf9b6          eax_33->vtable->RegisterNoticeHandler(0x4dd256, &this->vtable);
004cf9c3          eax_33->vtable->RegisterNoticeHandler(0x186a8, &this->vtable);
004cf9d0          eax_33->vtable->RegisterNoticeHandler(0x4dd1f4, &this->vtable);
004cf9dd          eax_33->vtable->RegisterNoticeHandler(0x4dd1f8, &this->vtable);
004cf9ea          eax_33->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004cf9f7          eax_33->vtable->RegisterNoticeHandler(0x4dd26e, &this->vtable);
004cfa04          eax_33->vtable->RegisterNoticeHandler(0x4dd22d, &this->vtable);
004cfa11          eax_33->vtable->RegisterNoticeHandler(0x4dd22e, &this->vtable);
004cfa1e          eax_33->vtable->RegisterNoticeHandler(0x4dd22f, &this->vtable);
004cfa2b          eax_33->vtable->RegisterNoticeHandler(0x4dd1fb, &this->vtable);
004cfa38          eax_33->vtable->RegisterNoticeHandler(0x4dd25e, &this->vtable);
004cfa45          eax_33->vtable->RegisterNoticeHandler(0x4dd1e8, &this->vtable);
004cf975      }
004cf975      
004cfa57      UIListener::RegisterForGlobalMessage(this, 1);
004cfa60      UIListener::RegisterForGlobalMessage(this, 0xd);
004cfa6b      /* jump -> this->vtable->UpdateFromPlayerModule */
004cf6f0  }

004cfa71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004cfa80  void __thiscall gmFloatyToolbarUI::ListenToGlobalMessage(class gmFloatyToolbarUI* this, uint32_t arg2, int32_t arg3)

004cfa80  {
004cfa8b      if (arg2 == 0xd)
004cfa8d          gmFloatyToolbarUI::UpdateLockedStatus(this);
004cfa8d      
004cfa9a      gmToolbarUI::ListenToGlobalMessage(this, arg2, arg3);
004cfa80  }

004cfaa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004cfab0  void __fastcall gmFloatyToolbarUI::UpdateFromPlayerModule(class gmFloatyToolbarUI* this)

004cfab0  {
004cfac0      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004cfad1      int32_t* var_28 = nullptr;
004cfad5      int32_t* var_24 = nullptr;
004cfae8      int32_t var_2c;
004cfae8      
004cfae8      if ((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0))
004cfaf1          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004cfaf1      
004cfb12      if ((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0))
004cfb1b          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004cfb1b      
004cfb27      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004cfb27      {
004cfb45          if (CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0)
004cfb45          {
004cfb4b              uint32_t m_eWindowID_1 = this->m_eWindowID;
004cfb5e              int32_t var_8 = 0;
004cfb62              int32_t* var_4_1 = nullptr;
004cfb66              int32_t var_10 = 0;
004cfb6a              int32_t* var_c_1 = nullptr;
004cfb75              int32_t var_30;
004cfb75              
004cfb75              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004cfbc7                  this->vtable->MoveTo(var_2c, var_30);
004cfbc7              
004cfbd0              uint32_t m_eWindowID = this->m_eWindowID;
004cfbe3              int32_t var_18 = 0;
004cfbe7              int32_t* var_14_1 = nullptr;
004cfbeb              int32_t var_20 = 0;
004cfbef              int32_t* var_1c_1 = nullptr;
004cfbef              
004cfbfa              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004cfc4c                  this->vtable->ResizeTo(var_30, var_2c);
004cfc4c              
004cfc59              BaseProperty::~BaseProperty(&var_20);
004cfc62              BaseProperty::~BaseProperty(&var_18);
004cfc6b              BaseProperty::~BaseProperty(&var_10);
004cfc74              BaseProperty::~BaseProperty(&var_8);
004cfb45          }
004cfb45          
004cfc9b          if (((PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x1000008a, &var_28) != 0 && var_24 != 0) && *(uint32_t*)(*(uint32_t*)var_24 + 0x70)(&var_2c) != 0))
004cfcaf              this->vtable->SetVisible(var_2c);
004cfb27      }
004cfb27      
004cfcb9      gmFloatyToolbarUI::UpdateLockedStatus(this);
004cfcbe      int32_t* eax_21 = var_28;
004cfcbe      
004cfcc4      if (eax_21 != 0)
004cfcc4      {
004cfcce          int32_t esi_2 = (eax_21[1] - 1);
004cfccb          eax_21[1] = esi_2;
004cfccb          
004cfcd5          if (esi_2 == 0)
004cfcdb              **(uint32_t**)eax_21(1);
004cfcdb          
004cfcdd          var_28 = nullptr;
004cfcc4      }
004cfcc4      
004cfce7      if (var_24 != 0)
004cfce7      {
004cfcf1          int32_t esi_4 = (var_24[1] - 1);
004cfcee          var_24[1] = esi_4;
004cfcee          
004cfcf8          if (esi_4 == 0)
004cfcfe              **(uint32_t**)var_24(1);
004cfce7      }
004cfab0  }

004cfd07                       90 90 90 90 90 90 90 90 90                                                         .........

004cfd10  void __thiscall gmFloatyToolbarUI::ResizeTo(class gmFloatyToolbarUI* this, int32_t const arg2, int32_t const arg3)

004cfd10  {
004cfd23      UIElement::ResizeTo(this, arg2, arg3);
004cfd23      
004cfd32      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004cfd32      {
004cfd57          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004cfd5a          int32_t* var_8 = nullptr;
004cfd5e          int32_t* var_4_1 = nullptr;
004cfd62          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004cfd69          int32_t eax_3 = UIRegion::GetWidth(this);
004cfd69          
004cfd74          if (var_4_1 != 0)
004cfd74          {
004cfd7a              BaseProperty::CheckCopyOnWrite(&var_8);
004cfd86              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_3);
004cfd74          }
004cfd74          
004cfd9a          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_8);
004cfda8          int32_t* var_10 = nullptr;
004cfdac          int32_t* var_c_1 = nullptr;
004cfdb0          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004cfdb7          int32_t eax_4 = UIRegion::GetHeight(this);
004cfdb7          
004cfdc2          if (var_c_1 != 0)
004cfdc2          {
004cfdc8              BaseProperty::CheckCopyOnWrite(&var_10);
004cfdd4              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_4);
004cfdc2          }
004cfdc2          
004cfde5          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_10);
004cfdea          int32_t* eax_5 = var_10;
004cfdea          
004cfdf2          if (eax_5 != 0)
004cfdf2          {
004cfdfc              int32_t esi_2 = (eax_5[1] - 1);
004cfdf9              eax_5[1] = esi_2;
004cfdf9              
004cfe03              if (esi_2 == 0)
004cfe09                  **(uint32_t**)eax_5(1);
004cfe09              
004cfe0b              var_10 = nullptr;
004cfdf2          }
004cfdf2          
004cfe15          if (var_c_1 != 0)
004cfe15          {
004cfe1f              int32_t esi_4 = (var_c_1[1] - 1);
004cfe1c              var_c_1[1] = esi_4;
004cfe1c              
004cfe26              if (esi_4 == 0)
004cfe2c                  **(uint32_t**)var_c_1(1);
004cfe2c              
004cfe2e              int32_t var_c_2 = 0;
004cfe15          }
004cfe15          
004cfe32          int32_t* eax_10 = var_8;
004cfe32          
004cfe38          if (eax_10 != 0)
004cfe38          {
004cfe42              int32_t esi_6 = (eax_10[1] - 1);
004cfe3f              eax_10[1] = esi_6;
004cfe3f              
004cfe49              if (esi_6 == 0)
004cfe4f                  **(uint32_t**)eax_10(1);
004cfe4f              
004cfe51              var_8 = nullptr;
004cfe38          }
004cfe38          
004cfe5b          if (var_4_1 != 0)
004cfe5b          {
004cfe65              int32_t esi_8 = (var_4_1[1] - 1);
004cfe62              var_4_1[1] = esi_8;
004cfe62              
004cfe6c              if (esi_8 == 0)
004cfe72                  **(uint32_t**)var_4_1(1);
004cfe5b          }
004cfd32      }
004cfd10  }

004cfe7c                                                                                      90 90 90 90                              ....

004cfe80  void __thiscall gmFloatyToolbarUI::MoveTo(class gmFloatyToolbarUI* this, int32_t const arg2, int32_t const arg3)

004cfe80  {
004cfe84      int32_t const ebx = arg2;
004cfe8f      int32_t const edi = arg3;
004cfe8f      
004cfe9d      if (this->vtable->GetParent() != 0)
004cfe9d      {
004cfec3          if (ebx > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
004cfedf              ebx = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
004cfedf          
004cfee3          if (ebx < 0)
004cfee5              ebx = 0;
004cfee5          
004cff07          if (arg3 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
004cff23              edi = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
004cff23          
004cff29          if (edi < 0)
004cff2b              edi = 0;
004cfe9d      }
004cfe9d      
004cff31      UIElement::MoveTo(this, ebx, edi);
004cff31      
004cff3c      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004cff3c      {
004cff5f          class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004cff62          int32_t* var_8 = nullptr;
004cff66          int32_t* var_4_1 = nullptr;
004cff6a          BaseProperty::SetPropertyName(&var_8, 0x10000086);
004cff73          int32_t m_x0 = this->m_box.m_x0;
004cff73          
004cff76          if (var_4_1 != 0)
004cff76          {
004cff7c              BaseProperty::CheckCopyOnWrite(&var_8);
004cff88              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(m_x0);
004cff76          }
004cff76          
004cff9c          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_8);
004cffaa          int32_t* var_10 = nullptr;
004cffae          int32_t* var_c_1 = nullptr;
004cffb2          BaseProperty::SetPropertyName(&var_10, 0x10000087);
004cffbb          int32_t m_y0 = this->m_box.m_y0;
004cffbb          
004cffc1          if (var_c_1 != 0)
004cffc1          {
004cffc7              BaseProperty::CheckCopyOnWrite(&var_10);
004cffd3              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(m_y0);
004cffc1          }
004cffc1          
004cffe4          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_10);
004cffe9          int32_t* eax_19 = var_10;
004cffe9          
004cffef          if (eax_19 != 0)
004cffef          {
004cfff9              int32_t esi_2 = (eax_19[1] - 1);
004cfff6              eax_19[1] = esi_2;
004cfff6              
004d0000              if (esi_2 == 0)
004d0006                  **(uint32_t**)eax_19(1);
004d0006              
004d0008              var_10 = nullptr;
004cffef          }
004cffef          
004d0012          if (var_c_1 != 0)
004d0012          {
004d001c              int32_t esi_4 = (var_c_1[1] - 1);
004d0019              var_c_1[1] = esi_4;
004d0019              
004d0023              if (esi_4 == 0)
004d0029                  **(uint32_t**)var_c_1(1);
004d0029              
004d002b              int32_t var_c_2 = 0;
004d0012          }
004d0012          
004d002f          int32_t* eax_24 = var_8;
004d002f          
004d0035          if (eax_24 != 0)
004d0035          {
004d003f              int32_t esi_6 = (eax_24[1] - 1);
004d003c              eax_24[1] = esi_6;
004d003c              
004d0046              if (esi_6 == 0)
004d004c                  **(uint32_t**)eax_24(1);
004d004c              
004d004e              var_8 = nullptr;
004d0035          }
004d0035          
004d0058          if (var_4_1 != 0)
004d0058          {
004d0062              int32_t esi_8 = (var_4_1[1] - 1);
004d005f              var_4_1[1] = esi_8;
004d005f              
004d0069              if (esi_8 == 0)
004d006f                  **(uint32_t**)var_4_1(1);
004d0058          }
004cff3c      }
004cfe80  }

004d007b                                                                                   90 90 90 90 90                             .....

004d0080  void __thiscall gmFloatyToolbarUI::SetVisible(class gmFloatyToolbarUI* this, uint8_t arg2)

004d0080  {
004d008b      UIElement::SetVisible(this, arg2);
004d008b      
004d0098      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d0098      {
004d00bc          class CPlayerModule* esi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d00bf          int32_t* var_8 = nullptr;
004d00c7          int32_t* var_4_1 = nullptr;
004d00cf          BaseProperty::SetPropertyName(&var_8, 0x1000008a);
004d00e0          uint8_t ecx_2 = (((int8_t)(this->__bitfield164 >> 1)) & 1);
004d00e0          
004d00e9          if (var_4_1 != 0)
004d00e9          {
004d00ef              BaseProperty::CheckCopyOnWrite(&var_8);
004d00ff              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x74)(ecx_2);
004d00e9          }
004d00e9          
004d0111          PlayerModule::SetChatWindowOption(&esi_2->vtable, this->m_eWindowID, &var_8);
004d0116          int32_t* eax_5 = var_8;
004d0116          
004d011c          if (eax_5 != 0)
004d011c          {
004d0126              int32_t esi_4 = (eax_5[1] - 1);
004d0123              eax_5[1] = esi_4;
004d0123              
004d012d              if (esi_4 == 0)
004d0133                  **(uint32_t**)eax_5(1);
004d0133              
004d0135              var_8 = nullptr;
004d011c          }
004d011c          
004d0143          if (var_4_1 != 0)
004d0143          {
004d014d              int32_t esi_6 = (var_4_1[1] - 1);
004d014a              var_4_1[1] = esi_6;
004d014a              
004d0154              if (esi_6 == 0)
004d015a                  **(uint32_t**)var_4_1(1);
004d0143          }
004d0098      }
004d0080  }

004d0164              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d0170  void __thiscall gmFloatySideVitalsUI::gmFloatySideVitalsUI(class gmFloatySideVitalsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d0170  {
004d017f      gmVitalsUI::gmVitalsUI(this, arg2, arg3);
004d0186      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004d01ec      this->vtable = 0x7ba930;
004d01f2      this->vtable = &gmFloatyVitalsUI::`vftable';
004d01fc      this->vtable = &gmFloatySideVitalsUI::`vftable';
004d0170  }

004d020c                                      90 90 90 90                                                              ....

004d0210  class UIElement* __thiscall gmFloatySideVitalsUI::DynamicCast(class gmFloatySideVitalsUI* this, uint32_t arg2) __pure

004d0210  {
004d0224      if ((arg2 == 0x10000056 || arg2 == 0x10000009))
004d0231          return this;
004d0231      
004d022b      int32_t edx_1;
004d022b      edx_1 = arg2 != 3;
004d022f      return (this & (edx_1 - 1));
004d0210  }

004d0234                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d0240  uint32_t gmFloatySideVitalsUI::GetUIElementType(class gmFloatySideVitalsUI const* this @ ecx) __pure

004d0240  {
004d0245      return 0x10000056;
004d0240  }

004d0246                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d0250  class UIElement* gmFloatySideVitalsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d0250  {
004d0255      void* eax = operator new(0x65c);
004d0255      
004d025f      if (eax == 0)
004d0275          return 0;
004d0275      
004d0272      return gmFloatySideVitalsUI::gmFloatySideVitalsUI(eax, arg1, arg2);
004d0250  }

004d0276                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d0280  void __fastcall gmFloatyPanelUI::UpdateLockedStatus(class gmFloatyPanelUI* this)

004d0280  {
004d0290      bool cond:0 = PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0;
004d0292      class UIElement* m_pTopBorder = this->m_pTopBorder;
004d0292      
004d0298      if (!(cond:0))
004d0298      {
004d029e          m_pTopBorder->vtable->SetVisible(0);
004d02a5          this->m_pTopBorder->vtable->SetVisible(0);
004d02b2          this->m_pLeftBorder->vtable->SetVisible(0);
004d02bf          this->m_pBottomBorder->vtable->SetVisible(0);
004d02cc          this->m_pRightBorder->vtable->SetVisible(0);
004d02d9          this->m_pTopLeftCorner->vtable->SetVisible(0);
004d02e6          this->m_pTopRightCorner->vtable->SetVisible(0);
004d02f3          this->m_pBottomLeftCorner->vtable->SetVisible(0);
004d0300          this->m_pBottomRightCorner->vtable->SetVisible(0);
004d030d          this->m_pTopBorder_Locked->vtable->SetVisible(1);
004d031a          this->m_pLeftBorder_Locked->vtable->SetVisible(1);
004d0327          this->m_pBottomBorder_Locked->vtable->SetVisible(1);
004d0334          this->m_pRightBorder_Locked->vtable->SetVisible(1);
004d0341          this->m_pTopLeftCorner_Locked->vtable->SetVisible(1);
004d034e          this->m_pTopRightCorner_Locked->vtable->SetVisible(1);
004d035b          this->m_pBottomLeftCorner_Locked->vtable->SetVisible(1);
004d0368          this->m_pBottomRightCorner_Locked->vtable->SetVisible(1);
004d0376          return;
004d0298      }
004d0298      
004d0377      m_pTopBorder->vtable->SetVisible(1);
004d037e      this->m_pTopBorder->vtable->SetVisible(1);
004d038b      this->m_pLeftBorder->vtable->SetVisible(1);
004d0398      this->m_pBottomBorder->vtable->SetVisible(1);
004d03a5      this->m_pRightBorder->vtable->SetVisible(1);
004d03b2      this->m_pTopLeftCorner->vtable->SetVisible(1);
004d03bf      this->m_pTopRightCorner->vtable->SetVisible(1);
004d03cc      this->m_pBottomLeftCorner->vtable->SetVisible(1);
004d03d9      this->m_pBottomRightCorner->vtable->SetVisible(1);
004d03e6      this->m_pTopBorder_Locked->vtable->SetVisible(0);
004d03f3      this->m_pLeftBorder_Locked->vtable->SetVisible(0);
004d0400      this->m_pBottomBorder_Locked->vtable->SetVisible(0);
004d040d      this->m_pRightBorder_Locked->vtable->SetVisible(0);
004d041a      this->m_pTopLeftCorner_Locked->vtable->SetVisible(0);
004d0427      this->m_pTopRightCorner_Locked->vtable->SetVisible(0);
004d0434      this->m_pBottomLeftCorner_Locked->vtable->SetVisible(0);
004d0441      this->m_pBottomRightCorner_Locked->vtable->SetVisible(0);
004d0280  }


004d0450  void* __thiscall gmFloatySideVitalsUI::`scalar deleting destructor'(class gmFloatySideVitalsUI* this, uint32_t arg2)

004d0450  {
004d0453      this->vtable = 0x7ba930;
004d0459      this->vtable = &gmFloatyVitalsUI::`vftable';
004d0463      this->vtable = &gmFloatySideVitalsUI::`vftable';
004d046d      gmVitalsUI::~gmVitalsUI(this);
004d046d      
004d0477      if ((arg2 & 1) != 0)
004d047a          operator delete(this);
004d047a      
004d0485      return this;
004d0450  }

004d0488                          90 90 90 90 90 90 90 90                                                          ........

004d0490  void gmFloatySideVitalsUI::Register()

004d0490  {
004d049a      UIElement::RegisterElementClass(0x10000056, gmFloatySideVitalsUI::Create);
004d0490  }

004d04a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d04b0  void __thiscall gmFloatySideVitalsUI::PostInit(class gmFloatySideVitalsUI* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004d04b0  {
004d04b3      gmVitalsUI::PostInit(this);
004d04c6      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d04cd      struct QualityChangeHandler::VTable** eax_1;
004d04cd      
004d04cd      if (this == 0)
004d04d7          eax_1 = nullptr;
004d04cd      else
004d04cf          eax_1 = &this->vtable;
004d04cf      
004d04d9      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 2, eax_1);
004d04eb      struct QualityChangeHandler::VTable** eax_2;
004d04eb      
004d04eb      if (this == 0)
004d04f5          eax_2 = nullptr;
004d04eb      else
004d04ed          eax_2 = &this->vtable;
004d04ed      
004d04f7      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 1, eax_2);
004d0509      struct QualityChangeHandler::VTable** eax_3;
004d0509      
004d0509      if (this == 0)
004d0513          eax_3 = nullptr;
004d0509      else
004d050b          eax_3 = &this->vtable;
004d050b      
004d0515      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 4, eax_3);
004d0527      struct QualityChangeHandler::VTable** eax_4;
004d0527      
004d0527      if (this == 0)
004d0531          eax_4 = nullptr;
004d0527      else
004d0529          eax_4 = &this->vtable;
004d0529      
004d0533      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 3, eax_4);
004d0545      struct QualityChangeHandler::VTable** eax_5;
004d0545      
004d0545      if (this == 0)
004d054f          eax_5 = nullptr;
004d0545      else
004d0547          eax_5 = &this->vtable;
004d0547      
004d0551      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 6, eax_5);
004d0563      struct QualityChangeHandler::VTable** eax_6;
004d0563      
004d0563      if (this == 0)
004d056d          eax_6 = nullptr;
004d0563      else
004d0565          eax_6 = &this->vtable;
004d0565      
004d056f      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, 5, eax_6);
004d0586      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x100006df);
004d058d      class UIElement* eax_8;
004d058d      
004d058d      if (eax_7 == 0)
004d059d          eax_8 = nullptr;
004d058d      else
004d0595          eax_8 = eax_7->vtable->DynamicCast(2);
004d0595      
004d05a6      this->m_pTopBorder = eax_8;
004d05ac      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x100006e1);
004d05b3      class UIElement* eax_10;
004d05b3      
004d05b3      if (eax_9 == 0)
004d05c3          eax_10 = nullptr;
004d05b3      else
004d05bb          eax_10 = eax_9->vtable->DynamicCast(9);
004d05bb      
004d05cc      this->m_pLeftBorder = eax_10;
004d05d2      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x100006e3);
004d05d9      class UIElement* eax_12;
004d05d9      
004d05d9      if (eax_11 == 0)
004d05e9          eax_12 = nullptr;
004d05d9      else
004d05e1          eax_12 = eax_11->vtable->DynamicCast(2);
004d05e1      
004d05f2      this->m_pBottomBorder = eax_12;
004d05f8      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x100006e5);
004d05ff      class UIElement* eax_14;
004d05ff      
004d05ff      if (eax_13 == 0)
004d060f          eax_14 = nullptr;
004d05ff      else
004d0607          eax_14 = eax_13->vtable->DynamicCast(9);
004d0607      
004d0618      this->m_pRightBorder = eax_14;
004d061e      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x100006de);
004d0625      class UIElement* eax_16;
004d0625      
004d0625      if (eax_15 == 0)
004d0635          eax_16 = nullptr;
004d0625      else
004d062d          eax_16 = eax_15->vtable->DynamicCast(9);
004d062d      
004d063e      this->m_pTopLeftCorner = eax_16;
004d0644      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x100006e0);
004d064b      class UIElement* eax_18;
004d064b      
004d064b      if (eax_17 == 0)
004d065b          eax_18 = nullptr;
004d064b      else
004d0653          eax_18 = eax_17->vtable->DynamicCast(9);
004d0653      
004d0664      this->m_pTopRightCorner = eax_18;
004d066a      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x100006e2);
004d0671      class UIElement* eax_20;
004d0671      
004d0671      if (eax_19 == 0)
004d0681          eax_20 = nullptr;
004d0671      else
004d0679          eax_20 = eax_19->vtable->DynamicCast(9);
004d0679      
004d068a      this->m_pBottomLeftCorner = eax_20;
004d0690      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x100006e4);
004d0697      class UIElement* eax_22;
004d0697      
004d0697      if (eax_21 == 0)
004d06a7          eax_22 = nullptr;
004d0697      else
004d069f          eax_22 = eax_21->vtable->DynamicCast(9);
004d069f      
004d06b0      this->m_pBottomRightCorner = eax_22;
004d06b6      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x100006d7);
004d06bd      class UIElement* eax_24;
004d06bd      
004d06bd      if (eax_23 == 0)
004d06cd          eax_24 = nullptr;
004d06bd      else
004d06c5          eax_24 = eax_23->vtable->DynamicCast(3);
004d06c5      
004d06d6      this->m_pTopBorder_Locked = eax_24;
004d06dc      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x100006d9);
004d06e3      class UIElement* eax_26;
004d06e3      
004d06e3      if (eax_25 == 0)
004d06f3          eax_26 = nullptr;
004d06e3      else
004d06eb          eax_26 = eax_25->vtable->DynamicCast(3);
004d06eb      
004d06fc      this->m_pLeftBorder_Locked = eax_26;
004d0702      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x100006db);
004d0709      class UIElement* eax_28;
004d0709      
004d0709      if (eax_27 == 0)
004d0719          eax_28 = nullptr;
004d0709      else
004d0711          eax_28 = eax_27->vtable->DynamicCast(3);
004d0711      
004d0722      this->m_pBottomBorder_Locked = eax_28;
004d0728      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x100006dd);
004d072f      class UIElement* eax_30;
004d072f      
004d072f      if (eax_29 == 0)
004d073f          eax_30 = nullptr;
004d072f      else
004d0737          eax_30 = eax_29->vtable->DynamicCast(3);
004d0737      
004d0748      this->m_pRightBorder_Locked = eax_30;
004d074e      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x100006d6);
004d0755      class UIElement* eax_32;
004d0755      
004d0755      if (eax_31 == 0)
004d0765          eax_32 = nullptr;
004d0755      else
004d075d          eax_32 = eax_31->vtable->DynamicCast(3);
004d075d      
004d076e      this->m_pTopLeftCorner_Locked = eax_32;
004d0774      class UIElement* eax_33 = UIElement::GetChildRecursive(this, 0x100006d8);
004d077b      class UIElement* eax_34;
004d077b      
004d077b      if (eax_33 == 0)
004d078b          eax_34 = nullptr;
004d077b      else
004d0783          eax_34 = eax_33->vtable->DynamicCast(3);
004d0783      
004d0794      this->m_pTopRightCorner_Locked = eax_34;
004d079a      class UIElement* eax_35 = UIElement::GetChildRecursive(this, 0x100006da);
004d07a1      class UIElement* eax_36;
004d07a1      
004d07a1      if (eax_35 == 0)
004d07b1          eax_36 = nullptr;
004d07a1      else
004d07a9          eax_36 = eax_35->vtable->DynamicCast(3);
004d07a9      
004d07ba      this->m_pBottomLeftCorner_Locked = eax_36;
004d07c0      class UIElement* eax_37 = UIElement::GetChildRecursive(this, 0x100006dc);
004d07c7      class UIElement* eax_38;
004d07c7      
004d07c7      if (eax_37 == 0)
004d07d7          eax_38 = nullptr;
004d07c7      else
004d07cf          eax_38 = eax_37->vtable->DynamicCast(3);
004d07cf      
004d07d9      this->m_pBottomRightCorner_Locked = eax_38;
004d07df      GlobalEventHandler::GetGlobalEventHandler()->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004d07fb      UIListener::RegisterForGlobalMessage(this, 0xd);
004d0805      /* jump -> this->vtable->UpdateFromPlayerModule */
004d04b0  }

004d080b                                   90 90 90 90 90                                                             .....

004d0810  void __fastcall gmFloatySideVitalsUI::UpdateFromPlayerModule(class gmFloatySideVitalsUI* this)

004d0810  {
004d0820      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004d0820      
004d0830      if (PlayerModule::SideBySideVitals(edi) == 0)
004d083b          this->vtable->SetVisible(0);
004d0830      else
004d0832          this->vtable->SetVisible(1);
004d0832      
004d084d      int32_t* var_28 = nullptr;
004d0851      int32_t* var_24 = nullptr;
004d0864      int32_t var_2c;
004d0864      
004d0864      if ((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0))
004d086d          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d086d      
004d088e      if ((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0))
004d0897          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d0897      
004d08a3      if (((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0) && CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0))
004d08a3      {
004d08c7          uint32_t m_eWindowID_1 = this->m_eWindowID;
004d08da          int32_t var_8 = 0;
004d08de          int32_t* var_4_1 = nullptr;
004d08e2          int32_t var_10 = 0;
004d08e6          int32_t* var_c_1 = nullptr;
004d08f1          int32_t var_30;
004d08f1          
004d08f1          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004d0943              this->vtable->MoveTo(var_2c, var_30);
004d0943          
004d094c          uint32_t m_eWindowID = this->m_eWindowID;
004d095f          int32_t var_18 = 0;
004d0963          int32_t* var_14_1 = nullptr;
004d0967          int32_t var_20 = 0;
004d096b          int32_t* var_1c_1 = nullptr;
004d096b          
004d0976          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004d09c8              this->vtable->ResizeTo(var_30, var_2c);
004d09c8          
004d09d5          BaseProperty::~BaseProperty(&var_20);
004d09de          BaseProperty::~BaseProperty(&var_18);
004d09e7          BaseProperty::~BaseProperty(&var_10);
004d09f0          BaseProperty::~BaseProperty(&var_8);
004d08a3      }
004d08a3      
004d09f7      gmFloatyPanelUI::UpdateLockedStatus(this);
004d09fc      int32_t* eax_20 = var_28;
004d09fc      
004d0a02      if (eax_20 != 0)
004d0a02      {
004d0a0c          int32_t esi_2 = (eax_20[1] - 1);
004d0a09          eax_20[1] = esi_2;
004d0a09          
004d0a13          if (esi_2 == 0)
004d0a19              **(uint32_t**)eax_20(1);
004d0a19          
004d0a1b          var_28 = nullptr;
004d0a02      }
004d0a02      
004d0a25      if (var_24 != 0)
004d0a25      {
004d0a2f          int32_t esi_4 = (var_24[1] - 1);
004d0a2c          var_24[1] = esi_4;
004d0a2c          
004d0a36          if (esi_4 == 0)
004d0a3c              **(uint32_t**)var_24(1);
004d0a25      }
004d0810  }

004d0a45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004d0a50  void __thiscall gmFloatySideVitalsUI::ResizeTo(class gmFloatySideVitalsUI* this, int32_t const arg2, int32_t const arg3)

004d0a50  {
004d0a63      UIElement::ResizeTo(this, arg2, arg3);
004d0a63      
004d0a72      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d0a72      {
004d0a97          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d0a9a          int32_t* var_8 = nullptr;
004d0a9e          int32_t* var_4_1 = nullptr;
004d0aa2          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004d0aa9          int32_t eax_3 = UIRegion::GetWidth(this);
004d0aa9          
004d0ab4          if (var_4_1 != 0)
004d0ab4          {
004d0aba              BaseProperty::CheckCopyOnWrite(&var_8);
004d0ac6              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_3);
004d0ab4          }
004d0ab4          
004d0ada          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_8);
004d0ae8          int32_t* var_10 = nullptr;
004d0aec          int32_t* var_c_1 = nullptr;
004d0af0          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004d0af7          int32_t eax_4 = UIRegion::GetHeight(this);
004d0af7          
004d0b02          if (var_c_1 != 0)
004d0b02          {
004d0b08              BaseProperty::CheckCopyOnWrite(&var_10);
004d0b14              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_4);
004d0b02          }
004d0b02          
004d0b25          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_10);
004d0b2a          int32_t* eax_5 = var_10;
004d0b2a          
004d0b32          if (eax_5 != 0)
004d0b32          {
004d0b3c              int32_t esi_2 = (eax_5[1] - 1);
004d0b39              eax_5[1] = esi_2;
004d0b39              
004d0b43              if (esi_2 == 0)
004d0b49                  **(uint32_t**)eax_5(1);
004d0b49              
004d0b4b              var_10 = nullptr;
004d0b32          }
004d0b32          
004d0b55          if (var_c_1 != 0)
004d0b55          {
004d0b5f              int32_t esi_4 = (var_c_1[1] - 1);
004d0b5c              var_c_1[1] = esi_4;
004d0b5c              
004d0b66              if (esi_4 == 0)
004d0b6c                  **(uint32_t**)var_c_1(1);
004d0b6c              
004d0b6e              int32_t var_c_2 = 0;
004d0b55          }
004d0b55          
004d0b72          int32_t* eax_10 = var_8;
004d0b72          
004d0b78          if (eax_10 != 0)
004d0b78          {
004d0b82              int32_t esi_6 = (eax_10[1] - 1);
004d0b7f              eax_10[1] = esi_6;
004d0b7f              
004d0b89              if (esi_6 == 0)
004d0b8f                  **(uint32_t**)eax_10(1);
004d0b8f              
004d0b91              var_8 = nullptr;
004d0b78          }
004d0b78          
004d0b9b          if (var_4_1 != 0)
004d0b9b          {
004d0ba5              int32_t esi_8 = (var_4_1[1] - 1);
004d0ba2              var_4_1[1] = esi_8;
004d0ba2              
004d0bac              if (esi_8 == 0)
004d0bb2                  **(uint32_t**)var_4_1(1);
004d0b9b          }
004d0a72      }
004d0a50  }

004d0bbc                                                                                      90 90 90 90                              ....

004d0bc0  void __thiscall gmFloatyPowerBarUI::gmFloatyPowerBarUI(class gmFloatyPowerBarUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d0bc0  {
004d0bcf      gmPowerbarUI::gmPowerbarUI(this, arg2, arg3);
004d0bd6      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004d0c3c      this->vtable = 0x7bae08;
004d0c42      this->vtable = &gmFloatyPowerBarUI::`vftable';
004d0bc0  }

004d0c52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004d0c60  class UIElement* __thiscall gmFloatyPowerBarUI::DynamicCast(class gmFloatyPowerBarUI* this, uint32_t arg2) __pure

004d0c60  {
004d0c74      if ((arg2 == 0x10000053 || arg2 == 0x1000000f))
004d0c81          return this;
004d0c81      
004d0c7b      int32_t edx_1;
004d0c7b      edx_1 = arg2 != 3;
004d0c7f      return (this & (edx_1 - 1));
004d0c60  }

004d0c84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d0c90  uint32_t gmFloatyPowerBarUI::GetUIElementType(class gmFloatyPowerBarUI const* this @ ecx) __pure

004d0c90  {
004d0c95      return 0x10000053;
004d0c90  }

004d0c96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d0ca0  class UIElement* gmFloatyPowerBarUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d0ca0  {
004d0ca5      void* eax = operator new(0x648);
004d0ca5      
004d0caf      if (eax == 0)
004d0cc5          return 0;
004d0cc5      
004d0cc2      return gmFloatyPowerBarUI::gmFloatyPowerBarUI(eax, arg1, arg2);
004d0ca0  }

004d0cc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d0cd0  enum UIElementMessageListenResult __thiscall gmFloatyPowerBarUI::ListenToElementMessage(class gmFloatyPowerBarUI* this, struct UIElementMessageInfo const* arg2)

004d0cd0  {
004d0cd0      /* tailcall */
004d0cd0      return UIElement::ListenToElementMessage(this, arg2);
004d0cd0  }

004d0cd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004d0ce0  void __fastcall gmFloatyPowerBarUI::UpdateLockedStatus(class gmFloatyPowerBarUI* this)

004d0ce0  {
004d0cf0      bool cond:0 = PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0;
004d0cf2      class UIElement* m_pTopBorder = this->m_pTopBorder;
004d0cf2      
004d0cf8      if (!(cond:0))
004d0cf8      {
004d0cfe          m_pTopBorder->vtable->SetVisible(0);
004d0d05          this->m_pTopBorder->vtable->SetVisible(0);
004d0d12          this->m_pLeftBorder->vtable->SetVisible(0);
004d0d1f          this->m_pBottomBorder->vtable->SetVisible(0);
004d0d2c          this->m_pRightBorder->vtable->SetVisible(0);
004d0d39          this->m_pTopLeftCorner->vtable->SetVisible(0);
004d0d46          this->m_pTopRightCorner->vtable->SetVisible(0);
004d0d53          this->m_pBottomLeftCorner->vtable->SetVisible(0);
004d0d60          this->m_pBottomRightCorner->vtable->SetVisible(0);
004d0d6d          this->m_pTopBorder_Locked->vtable->SetVisible(1);
004d0d7a          this->m_pLeftBorder_Locked->vtable->SetVisible(1);
004d0d87          this->m_pBottomBorder_Locked->vtable->SetVisible(1);
004d0d94          this->m_pRightBorder_Locked->vtable->SetVisible(1);
004d0da1          this->m_pTopLeftCorner_Locked->vtable->SetVisible(1);
004d0dae          this->m_pTopRightCorner_Locked->vtable->SetVisible(1);
004d0dbb          this->m_pBottomLeftCorner_Locked->vtable->SetVisible(1);
004d0dc8          this->m_pBottomRightCorner_Locked->vtable->SetVisible(1);
004d0dd6          return;
004d0cf8      }
004d0cf8      
004d0dd7      m_pTopBorder->vtable->SetVisible(1);
004d0dde      this->m_pTopBorder->vtable->SetVisible(1);
004d0deb      this->m_pLeftBorder->vtable->SetVisible(1);
004d0df8      this->m_pBottomBorder->vtable->SetVisible(1);
004d0e05      this->m_pRightBorder->vtable->SetVisible(1);
004d0e12      this->m_pTopLeftCorner->vtable->SetVisible(1);
004d0e1f      this->m_pTopRightCorner->vtable->SetVisible(1);
004d0e2c      this->m_pBottomLeftCorner->vtable->SetVisible(1);
004d0e39      this->m_pBottomRightCorner->vtable->SetVisible(1);
004d0e46      this->m_pTopBorder_Locked->vtable->SetVisible(0);
004d0e53      this->m_pLeftBorder_Locked->vtable->SetVisible(0);
004d0e60      this->m_pBottomBorder_Locked->vtable->SetVisible(0);
004d0e6d      this->m_pRightBorder_Locked->vtable->SetVisible(0);
004d0e7a      this->m_pTopLeftCorner_Locked->vtable->SetVisible(0);
004d0e87      this->m_pTopRightCorner_Locked->vtable->SetVisible(0);
004d0e94      this->m_pBottomLeftCorner_Locked->vtable->SetVisible(0);
004d0ea1      this->m_pBottomRightCorner_Locked->vtable->SetVisible(0);
004d0ce0  }


004d0eb0  void* __thiscall gmFloatyPowerBarUI::`scalar deleting destructor'(class gmFloatyPowerBarUI* this, uint32_t arg2)

004d0eb0  {
004d0eb3      this->vtable = 0x7bae08;
004d0eb9      this->vtable = &gmFloatyPowerBarUI::`vftable';
004d0ec3      gmPowerbarUI::~gmPowerbarUI(this);
004d0ec3      
004d0ecd      if ((arg2 & 1) != 0)
004d0ed0          operator delete(this);
004d0ed0      
004d0edb      return this;
004d0eb0  }

004d0ede                                                                                            90 90                                ..

004d0ee0  void gmFloatyPowerBarUI::Register()

004d0ee0  {
004d0eea      UIElement::RegisterElementClass(0x10000053, gmFloatyPowerBarUI::Create);
004d0ee0  }

004d0ef3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d0f00  void __thiscall gmFloatyPowerBarUI::PostInit(class gmFloatyPowerBarUI* this)

004d0f00  {
004d0f04      gmPowerbarUI::PostInit(this);
004d0f17      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d0f23      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x1000068c);
004d0f2a      class UIElement* eax_2;
004d0f2a      
004d0f2a      if (eax_1 == 0)
004d0f3a          eax_2 = nullptr;
004d0f2a      else
004d0f32          eax_2 = eax_1->vtable->DynamicCast(2);
004d0f32      
004d0f43      this->m_pTopBorder = eax_2;
004d0f49      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x1000068e);
004d0f50      class UIElement* eax_4;
004d0f50      
004d0f50      if (eax_3 == 0)
004d0f60          eax_4 = nullptr;
004d0f50      else
004d0f58          eax_4 = eax_3->vtable->DynamicCast(9);
004d0f58      
004d0f69      this->m_pLeftBorder = eax_4;
004d0f6f      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x10000690);
004d0f76      class UIElement* eax_6;
004d0f76      
004d0f76      if (eax_5 == 0)
004d0f86          eax_6 = nullptr;
004d0f76      else
004d0f7e          eax_6 = eax_5->vtable->DynamicCast(2);
004d0f7e      
004d0f8f      this->m_pBottomBorder = eax_6;
004d0f95      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x10000692);
004d0f9c      class UIElement* eax_8;
004d0f9c      
004d0f9c      if (eax_7 == 0)
004d0fac          eax_8 = nullptr;
004d0f9c      else
004d0fa4          eax_8 = eax_7->vtable->DynamicCast(9);
004d0fa4      
004d0fb5      this->m_pRightBorder = eax_8;
004d0fbb      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x1000068b);
004d0fc2      class UIElement* eax_10;
004d0fc2      
004d0fc2      if (eax_9 == 0)
004d0fd2          eax_10 = nullptr;
004d0fc2      else
004d0fca          eax_10 = eax_9->vtable->DynamicCast(9);
004d0fca      
004d0fdb      this->m_pTopLeftCorner = eax_10;
004d0fe1      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x1000068d);
004d0fe8      class UIElement* eax_12;
004d0fe8      
004d0fe8      if (eax_11 == 0)
004d0ff8          eax_12 = nullptr;
004d0fe8      else
004d0ff0          eax_12 = eax_11->vtable->DynamicCast(9);
004d0ff0      
004d1001      this->m_pTopRightCorner = eax_12;
004d1007      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x1000068f);
004d100e      class UIElement* eax_14;
004d100e      
004d100e      if (eax_13 == 0)
004d101e          eax_14 = nullptr;
004d100e      else
004d1016          eax_14 = eax_13->vtable->DynamicCast(9);
004d1016      
004d1027      this->m_pBottomLeftCorner = eax_14;
004d102d      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x10000691);
004d1034      class UIElement* eax_16;
004d1034      
004d1034      if (eax_15 == 0)
004d1044          eax_16 = nullptr;
004d1034      else
004d103c          eax_16 = eax_15->vtable->DynamicCast(9);
004d103c      
004d104d      this->m_pBottomRightCorner = eax_16;
004d1053      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x10000684);
004d105a      class UIElement* eax_18;
004d105a      
004d105a      if (eax_17 == 0)
004d106a          eax_18 = nullptr;
004d105a      else
004d1062          eax_18 = eax_17->vtable->DynamicCast(3);
004d1062      
004d1073      this->m_pTopBorder_Locked = eax_18;
004d1079      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x10000686);
004d1080      class UIElement* eax_20;
004d1080      
004d1080      if (eax_19 == 0)
004d1090          eax_20 = nullptr;
004d1080      else
004d1088          eax_20 = eax_19->vtable->DynamicCast(3);
004d1088      
004d1099      this->m_pLeftBorder_Locked = eax_20;
004d109f      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x10000688);
004d10a6      class UIElement* eax_22;
004d10a6      
004d10a6      if (eax_21 == 0)
004d10b6          eax_22 = nullptr;
004d10a6      else
004d10ae          eax_22 = eax_21->vtable->DynamicCast(3);
004d10ae      
004d10bf      this->m_pBottomBorder_Locked = eax_22;
004d10c5      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x1000068a);
004d10cc      class UIElement* eax_24;
004d10cc      
004d10cc      if (eax_23 == 0)
004d10dc          eax_24 = nullptr;
004d10cc      else
004d10d4          eax_24 = eax_23->vtable->DynamicCast(3);
004d10d4      
004d10e5      this->m_pRightBorder_Locked = eax_24;
004d10eb      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x10000683);
004d10f2      class UIElement* eax_26;
004d10f2      
004d10f2      if (eax_25 == 0)
004d1102          eax_26 = nullptr;
004d10f2      else
004d10fa          eax_26 = eax_25->vtable->DynamicCast(3);
004d10fa      
004d110b      this->m_pTopLeftCorner_Locked = eax_26;
004d1111      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x10000685);
004d1118      class UIElement* eax_28;
004d1118      
004d1118      if (eax_27 == 0)
004d1128          eax_28 = nullptr;
004d1118      else
004d1120          eax_28 = eax_27->vtable->DynamicCast(3);
004d1120      
004d1131      this->m_pTopRightCorner_Locked = eax_28;
004d1137      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x10000687);
004d113e      class UIElement* eax_30;
004d113e      
004d113e      if (eax_29 == 0)
004d114e          eax_30 = nullptr;
004d113e      else
004d1146          eax_30 = eax_29->vtable->DynamicCast(3);
004d1146      
004d1157      this->m_pBottomLeftCorner_Locked = eax_30;
004d115d      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x10000689);
004d1164      class UIElement* eax_32;
004d1164      
004d1164      if (eax_31 == 0)
004d1174          eax_32 = nullptr;
004d1164      else
004d116c          eax_32 = eax_31->vtable->DynamicCast(3);
004d116c      
004d1176      this->m_pBottomRightCorner_Locked = eax_32;
004d117c      class GlobalEventHandler* eax_33 = GlobalEventHandler::GetGlobalEventHandler();
004d117c      
004d1185      if (eax_33 != 0)
004d1185      {
004d1187          eax_33->vtable->RegisterNoticeHandler(0x4dd1fd, &this->vtable);
004d119b          eax_33->vtable->RegisterNoticeHandler(0x4dd1e6, &this->vtable);
004d11a8          eax_33->vtable->RegisterNoticeHandler(0x4dd1fe, &this->vtable);
004d11b5          eax_33->vtable->RegisterNoticeHandler(0x186b1, &this->vtable);
004d11c2          eax_33->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004d1185      }
004d1185      
004d11d4      UIListener::RegisterForGlobalMessage(this, 0xd);
004d11df      /* jump -> this->vtable->UpdateFromPlayerModule */
004d0f00  }

004d11e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004d11f0  void __thiscall gmFloatyPowerBarUI::ListenToGlobalMessage(class gmFloatyPowerBarUI* this, uint32_t arg2, int32_t arg3)

004d11f0  {
004d11f5      if (arg2 == 0xd)
004d11f7          gmFloatyPowerBarUI::UpdateLockedStatus(this);
004d11f0  }

004d11ff                                                                                               90                                 .

004d1200  void __fastcall gmFloatyPowerBarUI::UpdateFromPlayerModule(class gmFloatyPowerBarUI* this)

004d1200  {
004d1210      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004d1221      int32_t* var_28 = nullptr;
004d1225      int32_t* var_24 = nullptr;
004d1238      int32_t var_2c;
004d1238      
004d1238      if ((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0))
004d1241          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d1241      
004d1262      if ((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0))
004d126b          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d126b      
004d1277      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d1277      {
004d1295          if (CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0)
004d1295          {
004d129b              uint32_t m_eWindowID_1 = this->m_eWindowID;
004d12ae              int32_t var_8 = 0;
004d12b2              int32_t* var_4_1 = nullptr;
004d12b6              int32_t var_10 = 0;
004d12ba              int32_t* var_c_1 = nullptr;
004d12c5              int32_t var_30;
004d12c5              
004d12c5              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004d1317                  this->vtable->MoveTo(var_2c, var_30);
004d1317              
004d1320              uint32_t m_eWindowID = this->m_eWindowID;
004d1333              int32_t var_18 = 0;
004d1337              int32_t* var_14_1 = nullptr;
004d133b              int32_t var_20 = 0;
004d133f              int32_t* var_1c_1 = nullptr;
004d133f              
004d134a              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004d139c                  this->vtable->ResizeTo(var_30, var_2c);
004d139c              
004d13a9              BaseProperty::~BaseProperty(&var_20);
004d13b2              BaseProperty::~BaseProperty(&var_18);
004d13bb              BaseProperty::~BaseProperty(&var_10);
004d13c4              BaseProperty::~BaseProperty(&var_8);
004d1295          }
004d1295          
004d13eb          if (((PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x1000008a, &var_28) != 0 && var_24 != 0) && *(uint32_t*)(*(uint32_t*)var_24 + 0x70)(&var_2c) != 0))
004d13ff              this->vtable->SetVisible(var_2c);
004d1277      }
004d1277      
004d1409      gmFloatyPowerBarUI::UpdateLockedStatus(this);
004d140e      int32_t* eax_21 = var_28;
004d140e      
004d1414      if (eax_21 != 0)
004d1414      {
004d141e          int32_t esi_2 = (eax_21[1] - 1);
004d141b          eax_21[1] = esi_2;
004d141b          
004d1425          if (esi_2 == 0)
004d142b              **(uint32_t**)eax_21(1);
004d142b          
004d142d          var_28 = nullptr;
004d1414      }
004d1414      
004d1437      if (var_24 != 0)
004d1437      {
004d1441          int32_t esi_4 = (var_24[1] - 1);
004d143e          var_24[1] = esi_4;
004d143e          
004d1448          if (esi_4 == 0)
004d144e              **(uint32_t**)var_24(1);
004d1437      }
004d1200  }

004d1457                                                                       90 90 90 90 90 90 90 90 90                         .........

004d1460  void __thiscall gmFloatyPowerBarUI::ResizeTo(class gmFloatyPowerBarUI* this, int32_t const arg2, int32_t const arg3)

004d1460  {
004d1473      UIElement::ResizeTo(this, arg2, arg3);
004d1473      
004d1482      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d1482      {
004d14a7          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d14aa          int32_t* var_8 = nullptr;
004d14ae          int32_t* var_4_1 = nullptr;
004d14b2          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004d14b9          int32_t eax_3 = UIRegion::GetWidth(this);
004d14b9          
004d14c4          if (var_4_1 != 0)
004d14c4          {
004d14ca              BaseProperty::CheckCopyOnWrite(&var_8);
004d14d6              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_3);
004d14c4          }
004d14c4          
004d14ea          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_8);
004d14f8          int32_t* var_10 = nullptr;
004d14fc          int32_t* var_c_1 = nullptr;
004d1500          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004d1507          int32_t eax_4 = UIRegion::GetHeight(this);
004d1507          
004d1512          if (var_c_1 != 0)
004d1512          {
004d1518              BaseProperty::CheckCopyOnWrite(&var_10);
004d1524              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_4);
004d1512          }
004d1512          
004d1535          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_10);
004d153a          int32_t* eax_5 = var_10;
004d153a          
004d1542          if (eax_5 != 0)
004d1542          {
004d154c              int32_t esi_2 = (eax_5[1] - 1);
004d1549              eax_5[1] = esi_2;
004d1549              
004d1553              if (esi_2 == 0)
004d1559                  **(uint32_t**)eax_5(1);
004d1559              
004d155b              var_10 = nullptr;
004d1542          }
004d1542          
004d1565          if (var_c_1 != 0)
004d1565          {
004d156f              int32_t esi_4 = (var_c_1[1] - 1);
004d156c              var_c_1[1] = esi_4;
004d156c              
004d1576              if (esi_4 == 0)
004d157c                  **(uint32_t**)var_c_1(1);
004d157c              
004d157e              int32_t var_c_2 = 0;
004d1565          }
004d1565          
004d1582          int32_t* eax_10 = var_8;
004d1582          
004d1588          if (eax_10 != 0)
004d1588          {
004d1592              int32_t esi_6 = (eax_10[1] - 1);
004d158f              eax_10[1] = esi_6;
004d158f              
004d1599              if (esi_6 == 0)
004d159f                  **(uint32_t**)eax_10(1);
004d159f              
004d15a1              var_8 = nullptr;
004d1588          }
004d1588          
004d15ab          if (var_4_1 != 0)
004d15ab          {
004d15b5              int32_t esi_8 = (var_4_1[1] - 1);
004d15b2              var_4_1[1] = esi_8;
004d15b2              
004d15bc              if (esi_8 == 0)
004d15c2                  **(uint32_t**)var_4_1(1);
004d15ab          }
004d1482      }
004d1460  }

004d15cc                                      90 90 90 90                                                              ....

004d15d0  void __thiscall gmFloatyPowerBarUI::MoveTo(class gmFloatyPowerBarUI* this, int32_t const arg2, int32_t const arg3)

004d15d0  {
004d15d4      int32_t const ebx = arg2;
004d15df      int32_t const edi = arg3;
004d15df      
004d15ed      if (this->vtable->GetParent() != 0)
004d15ed      {
004d1613          if (ebx > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
004d162f              ebx = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
004d162f          
004d1633          if (ebx < 0)
004d1635              ebx = 0;
004d1635          
004d1657          if (arg3 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
004d1673              edi = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
004d1673          
004d1679          if (edi < 0)
004d167b              edi = 0;
004d15ed      }
004d15ed      
004d1681      UIElement::MoveTo(this, ebx, edi);
004d1681      
004d168c      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d168c      {
004d16af          class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d16b2          int32_t* var_8 = nullptr;
004d16b6          int32_t* var_4_1 = nullptr;
004d16ba          BaseProperty::SetPropertyName(&var_8, 0x10000086);
004d16c3          int32_t m_x0 = this->m_box.m_x0;
004d16c3          
004d16c6          if (var_4_1 != 0)
004d16c6          {
004d16cc              BaseProperty::CheckCopyOnWrite(&var_8);
004d16d8              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(m_x0);
004d16c6          }
004d16c6          
004d16ec          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_8);
004d16fa          int32_t* var_10 = nullptr;
004d16fe          int32_t* var_c_1 = nullptr;
004d1702          BaseProperty::SetPropertyName(&var_10, 0x10000087);
004d170b          int32_t m_y0 = this->m_box.m_y0;
004d170b          
004d1711          if (var_c_1 != 0)
004d1711          {
004d1717              BaseProperty::CheckCopyOnWrite(&var_10);
004d1723              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(m_y0);
004d1711          }
004d1711          
004d1734          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_10);
004d1739          int32_t* eax_19 = var_10;
004d1739          
004d173f          if (eax_19 != 0)
004d173f          {
004d1749              int32_t esi_2 = (eax_19[1] - 1);
004d1746              eax_19[1] = esi_2;
004d1746              
004d1750              if (esi_2 == 0)
004d1756                  **(uint32_t**)eax_19(1);
004d1756              
004d1758              var_10 = nullptr;
004d173f          }
004d173f          
004d1762          if (var_c_1 != 0)
004d1762          {
004d176c              int32_t esi_4 = (var_c_1[1] - 1);
004d1769              var_c_1[1] = esi_4;
004d1769              
004d1773              if (esi_4 == 0)
004d1779                  **(uint32_t**)var_c_1(1);
004d1779              
004d177b              int32_t var_c_2 = 0;
004d1762          }
004d1762          
004d177f          int32_t* eax_24 = var_8;
004d177f          
004d1785          if (eax_24 != 0)
004d1785          {
004d178f              int32_t esi_6 = (eax_24[1] - 1);
004d178c              eax_24[1] = esi_6;
004d178c              
004d1796              if (esi_6 == 0)
004d179c                  **(uint32_t**)eax_24(1);
004d179c              
004d179e              var_8 = nullptr;
004d1785          }
004d1785          
004d17a8          if (var_4_1 != 0)
004d17a8          {
004d17b2              int32_t esi_8 = (var_4_1[1] - 1);
004d17af              var_4_1[1] = esi_8;
004d17af              
004d17b9              if (esi_8 == 0)
004d17bf                  **(uint32_t**)var_4_1(1);
004d17a8          }
004d168c      }
004d15d0  }

004d17cb                                   90 90 90 90 90                                                             .....

004d17d0  void __thiscall gmFloatyPowerBarUI::SetVisible(class gmFloatyPowerBarUI* this, uint8_t arg2)

004d17d0  {
004d17db      UIElement::SetVisible(this, arg2);
004d17db      
004d17e8      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d17e8      {
004d180c          class CPlayerModule* esi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d180f          int32_t* var_8 = nullptr;
004d1817          int32_t* var_4_1 = nullptr;
004d181f          BaseProperty::SetPropertyName(&var_8, 0x1000008a);
004d1830          uint8_t ecx_2 = (((int8_t)(this->__bitfield164 >> 1)) & 1);
004d1830          
004d1839          if (var_4_1 != 0)
004d1839          {
004d183f              BaseProperty::CheckCopyOnWrite(&var_8);
004d184f              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x74)(ecx_2);
004d1839          }
004d1839          
004d1861          PlayerModule::SetChatWindowOption(&esi_2->vtable, this->m_eWindowID, &var_8);
004d1866          int32_t* eax_5 = var_8;
004d1866          
004d186c          if (eax_5 != 0)
004d186c          {
004d1876              int32_t esi_4 = (eax_5[1] - 1);
004d1873              eax_5[1] = esi_4;
004d1873              
004d187d              if (esi_4 == 0)
004d1883                  **(uint32_t**)eax_5(1);
004d1883              
004d1885              var_8 = nullptr;
004d186c          }
004d186c          
004d1893          if (var_4_1 != 0)
004d1893          {
004d189d              int32_t esi_6 = (var_4_1[1] - 1);
004d189a              var_4_1[1] = esi_6;
004d189a              
004d18a4              if (esi_6 == 0)
004d18aa                  **(uint32_t**)var_4_1(1);
004d1893          }
004d17e8      }
004d17d0  }

004d18b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d18c0  void __thiscall gmFloatyPanelUI::gmFloatyPanelUI(class gmFloatyPanelUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d18c0  {
004d18cf      gmPanelUI::gmPanelUI(this, arg2, arg3);
004d18d6      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004d193c      this->vtable = 0x7bb2e0;
004d1942      this->vtable = &gmFloatyPanelUI::`vftable';
004d18c0  }

004d1952                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004d1960  class UIElement* __thiscall gmFloatyPanelUI::DynamicCast(class gmFloatyPanelUI* this, uint32_t arg2) __pure

004d1960  {
004d1974      if ((arg2 == 0x1000004f || arg2 == 0x10000008))
004d1981          return this;
004d1981      
004d197b      int32_t edx_1;
004d197b      edx_1 = arg2 != 3;
004d197f      return (this & (edx_1 - 1));
004d1960  }

004d1984              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d1990  uint32_t gmFloatyPanelUI::GetUIElementType(class gmFloatyPanelUI const* this @ ecx) __pure

004d1990  {
004d1995      return 0x1000004f;
004d1990  }

004d1996                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d19a0  class UIElement* gmFloatyPanelUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d19a0  {
004d19a5      void* eax = operator new(0x65c);
004d19a5      
004d19af      if (eax == 0)
004d19c5          return 0;
004d19c5      
004d19c2      return gmFloatyPanelUI::gmFloatyPanelUI(eax, arg1, arg2);
004d19a0  }

004d19c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d19d0  enum UIElementMessageListenResult __thiscall gmFloatyPanelUI::ListenToElementMessage(class gmFloatyPanelUI* this, struct UIElementMessageInfo const* arg2)

004d19d0  {
004d19d0      /* tailcall */
004d19d0      return gmPanelUI::ListenToElementMessage(this, arg2);
004d19d0  }

004d19d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004d19e0  void* __thiscall gmFloatyPanelUI::`scalar deleting destructor'(class gmFloatyPanelUI* this, uint32_t arg2)

004d19e0  {
004d19e3      this->vtable = 0x7bb2e0;
004d19e9      this->vtable = &gmFloatyPanelUI::`vftable';
004d19f3      gmPanelUI::~gmPanelUI(this);
004d19f3      
004d19fd      if ((arg2 & 1) != 0)
004d1a00          operator delete(this);
004d1a00      
004d1a0b      return this;
004d19e0  }

004d1a0e                                            90 90                                                                ..

004d1a10  void gmFloatyPanelUI::Register()

004d1a10  {
004d1a1a      UIElement::RegisterElementClass(0x1000004f, gmFloatyPanelUI::Create);
004d1a10  }

004d1a23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d1a30  void __thiscall gmFloatyPanelUI::PostInit(class gmFloatyPanelUI* this)

004d1a30  {
004d1a34      gmPanelUI::PostInit(this);
004d1a47      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d1a53      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x1000065c);
004d1a5a      class UIElement* eax_2;
004d1a5a      
004d1a5a      if (eax_1 == 0)
004d1a6a          eax_2 = nullptr;
004d1a5a      else
004d1a62          eax_2 = eax_1->vtable->DynamicCast(2);
004d1a62      
004d1a73      this->m_pTopBorder = eax_2;
004d1a79      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x1000065e);
004d1a80      class UIElement* eax_4;
004d1a80      
004d1a80      if (eax_3 == 0)
004d1a90          eax_4 = nullptr;
004d1a80      else
004d1a88          eax_4 = eax_3->vtable->DynamicCast(2);
004d1a88      
004d1a99      this->m_pLeftBorder = eax_4;
004d1a9f      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x10000660);
004d1aa6      class UIElement* eax_6;
004d1aa6      
004d1aa6      if (eax_5 == 0)
004d1ab6          eax_6 = nullptr;
004d1aa6      else
004d1aae          eax_6 = eax_5->vtable->DynamicCast(9);
004d1aae      
004d1abf      this->m_pBottomBorder = eax_6;
004d1ac5      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x10000662);
004d1acc      class UIElement* eax_8;
004d1acc      
004d1acc      if (eax_7 == 0)
004d1adc          eax_8 = nullptr;
004d1acc      else
004d1ad4          eax_8 = eax_7->vtable->DynamicCast(2);
004d1ad4      
004d1ae5      this->m_pRightBorder = eax_8;
004d1aeb      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x1000065b);
004d1af2      class UIElement* eax_10;
004d1af2      
004d1af2      if (eax_9 == 0)
004d1b02          eax_10 = nullptr;
004d1af2      else
004d1afa          eax_10 = eax_9->vtable->DynamicCast(9);
004d1afa      
004d1b0b      this->m_pTopLeftCorner = eax_10;
004d1b11      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x1000065d);
004d1b18      class UIElement* eax_12;
004d1b18      
004d1b18      if (eax_11 == 0)
004d1b28          eax_12 = nullptr;
004d1b18      else
004d1b20          eax_12 = eax_11->vtable->DynamicCast(9);
004d1b20      
004d1b31      this->m_pTopRightCorner = eax_12;
004d1b37      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x1000065f);
004d1b3e      class UIElement* eax_14;
004d1b3e      
004d1b3e      if (eax_13 == 0)
004d1b4e          eax_14 = nullptr;
004d1b3e      else
004d1b46          eax_14 = eax_13->vtable->DynamicCast(9);
004d1b46      
004d1b57      this->m_pBottomLeftCorner = eax_14;
004d1b5d      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x10000661);
004d1b64      class UIElement* eax_16;
004d1b64      
004d1b64      if (eax_15 == 0)
004d1b74          eax_16 = nullptr;
004d1b64      else
004d1b6c          eax_16 = eax_15->vtable->DynamicCast(9);
004d1b6c      
004d1b7d      this->m_pBottomRightCorner = eax_16;
004d1b83      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x10000654);
004d1b8a      class UIElement* eax_18;
004d1b8a      
004d1b8a      if (eax_17 == 0)
004d1b9a          eax_18 = nullptr;
004d1b8a      else
004d1b92          eax_18 = eax_17->vtable->DynamicCast(3);
004d1b92      
004d1ba3      this->m_pTopBorder_Locked = eax_18;
004d1ba9      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x10000656);
004d1bb0      class UIElement* eax_20;
004d1bb0      
004d1bb0      if (eax_19 == 0)
004d1bc0          eax_20 = nullptr;
004d1bb0      else
004d1bb8          eax_20 = eax_19->vtable->DynamicCast(3);
004d1bb8      
004d1bc9      this->m_pLeftBorder_Locked = eax_20;
004d1bcf      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x10000658);
004d1bd6      class UIElement* eax_22;
004d1bd6      
004d1bd6      if (eax_21 == 0)
004d1be6          eax_22 = nullptr;
004d1bd6      else
004d1bde          eax_22 = eax_21->vtable->DynamicCast(3);
004d1bde      
004d1bef      this->m_pBottomBorder_Locked = eax_22;
004d1bf5      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x1000065a);
004d1bfc      class UIElement* eax_24;
004d1bfc      
004d1bfc      if (eax_23 == 0)
004d1c0c          eax_24 = nullptr;
004d1bfc      else
004d1c04          eax_24 = eax_23->vtable->DynamicCast(3);
004d1c04      
004d1c15      this->m_pRightBorder_Locked = eax_24;
004d1c1b      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x10000653);
004d1c22      class UIElement* eax_26;
004d1c22      
004d1c22      if (eax_25 == 0)
004d1c32          eax_26 = nullptr;
004d1c22      else
004d1c2a          eax_26 = eax_25->vtable->DynamicCast(3);
004d1c2a      
004d1c3b      this->m_pTopLeftCorner_Locked = eax_26;
004d1c41      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x10000655);
004d1c48      class UIElement* eax_28;
004d1c48      
004d1c48      if (eax_27 == 0)
004d1c58          eax_28 = nullptr;
004d1c48      else
004d1c50          eax_28 = eax_27->vtable->DynamicCast(3);
004d1c50      
004d1c61      this->m_pTopRightCorner_Locked = eax_28;
004d1c67      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x10000657);
004d1c6e      class UIElement* eax_30;
004d1c6e      
004d1c6e      if (eax_29 == 0)
004d1c7e          eax_30 = nullptr;
004d1c6e      else
004d1c76          eax_30 = eax_29->vtable->DynamicCast(3);
004d1c76      
004d1c87      this->m_pBottomLeftCorner_Locked = eax_30;
004d1c8d      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x10000659);
004d1c94      class UIElement* eax_32;
004d1c94      
004d1c94      if (eax_31 == 0)
004d1ca4          eax_32 = nullptr;
004d1c94      else
004d1c9c          eax_32 = eax_31->vtable->DynamicCast(3);
004d1c9c      
004d1ca6      this->m_pBottomRightCorner_Locked = eax_32;
004d1cac      class GlobalEventHandler* eax_33 = GlobalEventHandler::GetGlobalEventHandler();
004d1cac      
004d1cb5      if (eax_33 != 0)
004d1cb5      {
004d1cb7          eax_33->vtable->RegisterNoticeHandler(0x4dd1f8, &this->vtable);
004d1ccb          eax_33->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004d1cd8          eax_33->vtable->RegisterNoticeHandler(0x4dd21f, &this->vtable);
004d1ce5          eax_33->vtable->RegisterNoticeHandler(0x4dd25c, &this->vtable);
004d1cb5      }
004d1cb5      
004d1cf7      UIListener::RegisterForGlobalMessage(this, 1);
004d1d00      UIListener::RegisterForGlobalMessage(this, 0xd);
004d1d0b      /* jump -> this->vtable->UpdateFromPlayerModule */
004d1a30  }

004d1d11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004d1d20  void __fastcall gmFloatyPanelUI::UpdateFromPlayerModule(class gmFloatyPanelUI* this)

004d1d20  {
004d1d30      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004d1d41      int32_t* var_28 = nullptr;
004d1d45      int32_t* var_24 = nullptr;
004d1d58      int32_t var_2c;
004d1d58      
004d1d58      if ((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0))
004d1d61          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d1d61      
004d1d82      if ((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0))
004d1d8b          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d1d8b      
004d1d97      if (((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0) && CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0))
004d1d97      {
004d1dbb          uint32_t m_eWindowID_1 = this->m_eWindowID;
004d1dce          int32_t var_8 = 0;
004d1dd2          int32_t* var_4_1 = nullptr;
004d1dd6          int32_t var_10 = 0;
004d1dda          int32_t* var_c_1 = nullptr;
004d1de5          int32_t var_30;
004d1de5          
004d1de5          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004d1e37              this->vtable->MoveTo(var_2c, var_30);
004d1e37          
004d1e40          uint32_t m_eWindowID = this->m_eWindowID;
004d1e53          int32_t var_18 = 0;
004d1e57          int32_t* var_14_1 = nullptr;
004d1e5b          int32_t var_20 = 0;
004d1e5f          int32_t* var_1c_1 = nullptr;
004d1e5f          
004d1e6a          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004d1ebc              this->vtable->ResizeTo(var_30, var_2c);
004d1ebc          
004d1ec9          BaseProperty::~BaseProperty(&var_20);
004d1ed2          BaseProperty::~BaseProperty(&var_18);
004d1edb          BaseProperty::~BaseProperty(&var_10);
004d1ee4          BaseProperty::~BaseProperty(&var_8);
004d1d97      }
004d1d97      
004d1eeb      gmFloatyPanelUI::UpdateLockedStatus(this);
004d1ef0      int32_t* eax_18 = var_28;
004d1ef0      
004d1ef6      if (eax_18 != 0)
004d1ef6      {
004d1f00          int32_t esi_2 = (eax_18[1] - 1);
004d1efd          eax_18[1] = esi_2;
004d1efd          
004d1f07          if (esi_2 == 0)
004d1f0d              **(uint32_t**)eax_18(1);
004d1f0d          
004d1f0f          var_28 = nullptr;
004d1ef6      }
004d1ef6      
004d1f19      if (var_24 != 0)
004d1f19      {
004d1f23          int32_t esi_4 = (var_24[1] - 1);
004d1f20          var_24[1] = esi_4;
004d1f20          
004d1f2a          if (esi_4 == 0)
004d1f30              **(uint32_t**)var_24(1);
004d1f19      }
004d1d20  }

004d1f39                                                                             90 90 90 90 90 90 90                           .......

004d1f40  void __thiscall gmFloatyPanelUI::ResizeTo(class gmFloatyPanelUI* this, int32_t const arg2, int32_t const arg3)

004d1f40  {
004d1f53      gmPanelUI::ResizeTo(this, arg2, arg3);
004d1f53      
004d1f62      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d1f62      {
004d1f87          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d1f8a          int32_t* var_8 = nullptr;
004d1f8e          int32_t* var_4_1 = nullptr;
004d1f92          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004d1f99          int32_t eax_3 = UIRegion::GetWidth(this);
004d1f99          
004d1fa4          if (var_4_1 != 0)
004d1fa4          {
004d1faa              BaseProperty::CheckCopyOnWrite(&var_8);
004d1fb6              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_3);
004d1fa4          }
004d1fa4          
004d1fca          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_8);
004d1fd8          int32_t* var_10 = nullptr;
004d1fdc          int32_t* var_c_1 = nullptr;
004d1fe0          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004d1fe7          int32_t eax_4 = UIRegion::GetHeight(this);
004d1fe7          
004d1ff2          if (var_c_1 != 0)
004d1ff2          {
004d1ff8              BaseProperty::CheckCopyOnWrite(&var_10);
004d2004              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_4);
004d1ff2          }
004d1ff2          
004d2015          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_10);
004d201a          int32_t* eax_5 = var_10;
004d201a          
004d2022          if (eax_5 != 0)
004d2022          {
004d202c              int32_t esi_2 = (eax_5[1] - 1);
004d2029              eax_5[1] = esi_2;
004d2029              
004d2033              if (esi_2 == 0)
004d2039                  **(uint32_t**)eax_5(1);
004d2039              
004d203b              var_10 = nullptr;
004d2022          }
004d2022          
004d2045          if (var_c_1 != 0)
004d2045          {
004d204f              int32_t esi_4 = (var_c_1[1] - 1);
004d204c              var_c_1[1] = esi_4;
004d204c              
004d2056              if (esi_4 == 0)
004d205c                  **(uint32_t**)var_c_1(1);
004d205c              
004d205e              int32_t var_c_2 = 0;
004d2045          }
004d2045          
004d2062          int32_t* eax_10 = var_8;
004d2062          
004d2068          if (eax_10 != 0)
004d2068          {
004d2072              int32_t esi_6 = (eax_10[1] - 1);
004d206f              eax_10[1] = esi_6;
004d206f              
004d2079              if (esi_6 == 0)
004d207f                  **(uint32_t**)eax_10(1);
004d207f              
004d2081              var_8 = nullptr;
004d2068          }
004d2068          
004d208b          if (var_4_1 != 0)
004d208b          {
004d2095              int32_t esi_8 = (var_4_1[1] - 1);
004d2092              var_4_1[1] = esi_8;
004d2092              
004d209c              if (esi_8 == 0)
004d20a2                  **(uint32_t**)var_4_1(1);
004d208b          }
004d1f62      }
004d1f40  }

004d20ac                                      90 90 90 90                                                              ....

004d20b0  void __thiscall gmFloatyPanelUI::MoveTo(class gmFloatyPanelUI* this, int32_t const arg2, int32_t const arg3)

004d20b0  {
004d20b4      int32_t const ebx = arg2;
004d20bf      int32_t const edi = arg3;
004d20bf      
004d20cd      if (this->vtable->GetParent() != 0)
004d20cd      {
004d20f3          if (ebx > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
004d210f              ebx = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
004d210f          
004d2113          if (ebx < 0)
004d2115              ebx = 0;
004d2115          
004d2137          if (arg3 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
004d2153              edi = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
004d2153          
004d2159          if (edi < 0)
004d215b              edi = 0;
004d20cd      }
004d20cd      
004d2161      UIElement::MoveTo(this, ebx, edi);
004d2161      
004d216c      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d216c      {
004d218f          class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d2192          int32_t* var_8 = nullptr;
004d2196          int32_t* var_4_1 = nullptr;
004d219a          BaseProperty::SetPropertyName(&var_8, 0x10000086);
004d21a3          int32_t m_x0 = this->m_box.m_x0;
004d21a3          
004d21a6          if (var_4_1 != 0)
004d21a6          {
004d21ac              BaseProperty::CheckCopyOnWrite(&var_8);
004d21b8              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(m_x0);
004d21a6          }
004d21a6          
004d21cc          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_8);
004d21da          int32_t* var_10 = nullptr;
004d21de          int32_t* var_c_1 = nullptr;
004d21e2          BaseProperty::SetPropertyName(&var_10, 0x10000087);
004d21eb          int32_t m_y0 = this->m_box.m_y0;
004d21eb          
004d21f1          if (var_c_1 != 0)
004d21f1          {
004d21f7              BaseProperty::CheckCopyOnWrite(&var_10);
004d2203              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(m_y0);
004d21f1          }
004d21f1          
004d2214          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_10);
004d2219          int32_t* eax_19 = var_10;
004d2219          
004d221f          if (eax_19 != 0)
004d221f          {
004d2229              int32_t esi_2 = (eax_19[1] - 1);
004d2226              eax_19[1] = esi_2;
004d2226              
004d2230              if (esi_2 == 0)
004d2236                  **(uint32_t**)eax_19(1);
004d2236              
004d2238              var_10 = nullptr;
004d221f          }
004d221f          
004d2242          if (var_c_1 != 0)
004d2242          {
004d224c              int32_t esi_4 = (var_c_1[1] - 1);
004d2249              var_c_1[1] = esi_4;
004d2249              
004d2253              if (esi_4 == 0)
004d2259                  **(uint32_t**)var_c_1(1);
004d2259              
004d225b              int32_t var_c_2 = 0;
004d2242          }
004d2242          
004d225f          int32_t* eax_24 = var_8;
004d225f          
004d2265          if (eax_24 != 0)
004d2265          {
004d226f              int32_t esi_6 = (eax_24[1] - 1);
004d226c              eax_24[1] = esi_6;
004d226c              
004d2276              if (esi_6 == 0)
004d227c                  **(uint32_t**)eax_24(1);
004d227c              
004d227e              var_8 = nullptr;
004d2265          }
004d2265          
004d2288          if (var_4_1 != 0)
004d2288          {
004d2292              int32_t esi_8 = (var_4_1[1] - 1);
004d228f              var_4_1[1] = esi_8;
004d228f              
004d2299              if (esi_8 == 0)
004d229f                  **(uint32_t**)var_4_1(1);
004d2288          }
004d216c      }
004d20b0  }

004d22ab                                   90 90 90 90 90                                                             .....

004d22b0  void __thiscall gmFloatyMainChatUI::gmFloatyMainChatUI(class gmFloatyMainChatUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d22b0  {
004d22bf      gmMainChatUI::gmMainChatUI(this, arg2, arg3);
004d22c6      __builtin_memset(&this->m_pTopBorder, 0, 0x40);
004d2326      this->vtable = 0x7bb658;
004d232c      this->vtable = &gmFloatyMainChatUI::`vftable';
004d22b0  }

004d2339                                                                             90 90 90 90 90 90 90                           .......

004d2340  class UIElement* __thiscall gmFloatyMainChatUI::DynamicCast(class gmFloatyMainChatUI* this, uint32_t arg2) __pure

004d2340  {
004d235c      if ((arg2 == 0x10000050 || arg2 == 0x10000041))
004d235c      {
004d234e          int32_t eax_1 = -(((char*)this - 4));
004d2354          return ((eax_1 - eax_1) & this);
004d235c      }
004d235c      
004d2363      int32_t edx;
004d2363      edx = arg2 != 3;
004d236b      return ((edx - 1) & this);
004d2340  }

004d236e                                            90 90                                                                ..

004d2370  uint32_t gmFloatyMainChatUI::GetUIElementType(class gmFloatyMainChatUI const* this @ ecx) __pure

004d2370  {
004d2375      return 0x10000050;
004d2370  }

004d2376                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d2380  class UIElement* gmFloatyMainChatUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d2380  {
004d2385      void* eax = operator new(0x698);
004d2385      
004d238f      if (eax != 0)
004d238f      {
004d239d          int32_t eax_1 = gmFloatyMainChatUI::gmFloatyMainChatUI(eax, arg1, arg2);
004d239d          
004d23a4          if (eax_1 != 0)
004d23a9              return (eax_1 + 4);
004d238f      }
004d238f      
004d23ac      return 0;
004d2380  }

004d23ad                                         90 90 90                                                               ...

004d23b0  enum UIElementMessageListenResult __thiscall gmFloatyMainChatUI::ListenToElementMessage(class gmFloatyMainChatUI* this, struct UIElementMessageInfo const* arg2)

004d23b0  {
004d23b0      /* tailcall */
004d23b0      return gmMainChatUI::ListenToElementMessage(this, arg2);
004d23b0  }

004d23b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004d23c0  uint8_t __thiscall gmFloatyMainChatUI::OnChildAction(class gmFloatyMainChatUI* this, class UIElement const* arg2, class InputEvent const* arg3)

004d23c0  {
004d23c0      /* tailcall */
004d23c0      return ChatInterface::OnChildAction(this, arg2, arg3);
004d23c0  }

004d23c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004d23d0  void __fastcall gmFloatyMainChatUI::UpdateLockedStatus(class gmFloatyMainChatUI* this)

004d23d0  {
004d23da      if ((CPlayerSystem::GetPlayerSystem() != 0 && PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0))
004d23da      {
004d23f5          this->m_pTopBorder->vtable->SetVisible(0);
004d2402          this->m_pLeftBorder->vtable->SetVisible(0);
004d240f          this->m_pBottomBorder->vtable->SetVisible(0);
004d241c          this->m_pRightBorder->vtable->SetVisible(0);
004d2429          this->m_pTopLeftCorner->vtable->SetVisible(0);
004d2436          this->m_pTopRightCorner->vtable->SetVisible(0);
004d2443          this->m_pBottomLeftCorner->vtable->SetVisible(0);
004d2450          this->m_pBottomRightCorner->vtable->SetVisible(0);
004d245d          this->m_pTopBorder_Locked->vtable->SetVisible(1);
004d246a          this->m_pLeftBorder_Locked->vtable->SetVisible(1);
004d2477          this->m_pBottomBorder_Locked->vtable->SetVisible(1);
004d2484          this->m_pRightBorder_Locked->vtable->SetVisible(1);
004d2491          this->m_pTopLeftCorner_Locked->vtable->SetVisible(1);
004d249e          this->m_pTopRightCorner_Locked->vtable->SetVisible(1);
004d24ab          this->m_pBottomLeftCorner_Locked->vtable->SetVisible(1);
004d24b8          this->m_pBottomRightCorner_Locked->vtable->SetVisible(1);
004d24c6          return;
004d23da      }
004d23da      
004d24c7      this->m_pTopBorder->vtable->SetVisible(1);
004d24d4      this->m_pLeftBorder->vtable->SetVisible(1);
004d24e1      this->m_pBottomBorder->vtable->SetVisible(1);
004d24ee      this->m_pRightBorder->vtable->SetVisible(1);
004d24fb      this->m_pTopLeftCorner->vtable->SetVisible(1);
004d2508      this->m_pTopRightCorner->vtable->SetVisible(1);
004d2515      this->m_pBottomLeftCorner->vtable->SetVisible(1);
004d2522      this->m_pBottomRightCorner->vtable->SetVisible(1);
004d252f      this->m_pTopBorder_Locked->vtable->SetVisible(0);
004d253c      this->m_pLeftBorder_Locked->vtable->SetVisible(0);
004d2549      this->m_pBottomBorder_Locked->vtable->SetVisible(0);
004d2556      this->m_pRightBorder_Locked->vtable->SetVisible(0);
004d2563      this->m_pTopLeftCorner_Locked->vtable->SetVisible(0);
004d2570      this->m_pTopRightCorner_Locked->vtable->SetVisible(0);
004d257d      this->m_pBottomLeftCorner_Locked->vtable->SetVisible(0);
004d258a      this->m_pBottomRightCorner_Locked->vtable->SetVisible(0);
004d23d0  }

004d2599                                                                             90 90 90 90 90 90 90                           .......

004d25a0  void __thiscall gmFloatyMainChatUI::RecvNotice_GameplayOptionChanged(class gmFloatyMainChatUI* this, class BaseProperty const* arg2, uint32_t arg3)

004d25a0  {
004d25a1      class BaseProperty* esi = arg2;
004d25aa      uint32_t eax = BaseProperty::GetPropertyName(esi);
004d25aa      
004d25b4      if (eax == 0x10000080)
004d25b4      {
004d25f4          class BasePropertyValue* m_pcPropertyValue_1 = esi->m_pcPropertyValue;
004d25f4          
004d25f9          if ((m_pcPropertyValue_1 != 0 && m_pcPropertyValue_1->vtable->InqFloat(&arg2) != 0))
004d2613              ChatInterface::SetDefaultOpacity(this, arg2);
004d25b4      }
004d25b4      else
004d25b4      {
004d25b7          if (eax != 0x10000081)
004d25b7          {
004d25c1              ChatInterface::RecvNotice_GameplayOptionChanged(this, esi, arg3);
004d25c8              return;
004d25b7          }
004d25b7          
004d25cb          class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
004d25cb          
004d25d0          if ((m_pcPropertyValue != 0 && m_pcPropertyValue->vtable->InqFloat(&arg2) != 0))
004d25ea              ChatInterface::SetActiveOpacity(this, arg2);
004d25b4      }
004d25a0  }

004d261d                                                                                         90 90 90                               ...

004d2620  void* __thiscall gmFloatyMainChatUI::`scalar deleting destructor'(class gmFloatyMainChatUI* this, uint32_t arg2)

004d2620  {
004d2621      this->vtable = 0x7bb658;
004d262a      this->vtable = &gmFloatyMainChatUI::`vftable';
004d2630      gmMainChatUI::~gmMainChatUI(this);
004d2630      
004d263a      if ((arg2 & 1) != 0)
004d263d          operator delete(((char*)this - 4));
004d263d      
004d2648      return ((char*)this - 4);
004d2620  }

004d264b                                   90 90 90 90 90                                                             .....

004d2650  void gmFloatyMainChatUI::Register()

004d2650  {
004d265a      UIElement::RegisterElementClass(0x10000050, gmFloatyMainChatUI::Create);
004d2650  }

004d2663           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d2670  void __fastcall gmFloatyMainChatUI::PostInit(class gmFloatyMainChatUI* this)

004d2670  {
004d2679      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000069c);
004d2680      int32_t eax_1;
004d2680      
004d2680      if (eax == 0)
004d2690          eax_1 = 0;
004d2680      else
004d2688          eax_1 = eax->vtable->DynamicCast(2);
004d2688      
004d2699      this->m_OldHeight = eax_1;
004d269f      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x1000069e);
004d26a6      class UIElement* eax_3;
004d26a6      
004d26a6      if (eax_2 == 0)
004d26b6          eax_3 = nullptr;
004d26a6      else
004d26ae          eax_3 = eax_2->vtable->DynamicCast(9);
004d26ae      
004d26bf      this->m_pTopBorder = eax_3;
004d26c5      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x100006a0);
004d26cc      class UIElement* eax_5;
004d26cc      
004d26cc      if (eax_4 == 0)
004d26dc          eax_5 = nullptr;
004d26cc      else
004d26d4          eax_5 = eax_4->vtable->DynamicCast(9);
004d26d4      
004d26e5      this->m_pLeftBorder = eax_5;
004d26eb      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x100006a2);
004d26f2      class UIElement* eax_7;
004d26f2      
004d26f2      if (eax_6 == 0)
004d2702          eax_7 = nullptr;
004d26f2      else
004d26fa          eax_7 = eax_6->vtable->DynamicCast(9);
004d26fa      
004d270b      this->m_pBottomBorder = eax_7;
004d2711      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x1000069b);
004d2718      class UIElement* eax_9;
004d2718      
004d2718      if (eax_8 == 0)
004d2728          eax_9 = nullptr;
004d2718      else
004d2720          eax_9 = eax_8->vtable->DynamicCast(9);
004d2720      
004d2731      this->m_pRightBorder = eax_9;
004d2737      class UIElement* eax_10 = UIElement::GetChildRecursive(this, 0x1000069d);
004d273e      class UIElement* eax_11;
004d273e      
004d273e      if (eax_10 == 0)
004d274e          eax_11 = nullptr;
004d273e      else
004d2746          eax_11 = eax_10->vtable->DynamicCast(9);
004d2746      
004d2757      this->m_pTopLeftCorner = eax_11;
004d275d      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x1000069f);
004d2764      class UIElement* eax_13;
004d2764      
004d2764      if (eax_12 == 0)
004d2774          eax_13 = nullptr;
004d2764      else
004d276c          eax_13 = eax_12->vtable->DynamicCast(9);
004d276c      
004d277d      this->m_pTopRightCorner = eax_13;
004d2783      class UIElement* eax_14 = UIElement::GetChildRecursive(this, 0x100006a1);
004d278a      class UIElement* eax_15;
004d278a      
004d278a      if (eax_14 == 0)
004d279a          eax_15 = nullptr;
004d278a      else
004d2792          eax_15 = eax_14->vtable->DynamicCast(9);
004d2792      
004d27a3      this->m_pBottomLeftCorner = eax_15;
004d27a9      class UIElement* eax_16 = UIElement::GetChildRecursive(this, 0x10000694);
004d27b0      class UIElement* eax_17;
004d27b0      
004d27b0      if (eax_16 == 0)
004d27c0          eax_17 = nullptr;
004d27b0      else
004d27b8          eax_17 = eax_16->vtable->DynamicCast(3);
004d27b8      
004d27c9      this->m_pBottomRightCorner = eax_17;
004d27cf      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x10000696);
004d27d6      class UIElement* eax_19;
004d27d6      
004d27d6      if (eax_18 == 0)
004d27e6          eax_19 = nullptr;
004d27d6      else
004d27de          eax_19 = eax_18->vtable->DynamicCast(3);
004d27de      
004d27ef      this->m_pTopBorder_Locked = eax_19;
004d27f5      class UIElement* eax_20 = UIElement::GetChildRecursive(this, 0x10000698);
004d27fc      class UIElement* eax_21;
004d27fc      
004d27fc      if (eax_20 == 0)
004d280c          eax_21 = nullptr;
004d27fc      else
004d2804          eax_21 = eax_20->vtable->DynamicCast(3);
004d2804      
004d2815      this->m_pLeftBorder_Locked = eax_21;
004d281b      class UIElement* eax_22 = UIElement::GetChildRecursive(this, 0x1000069a);
004d2822      class UIElement* eax_23;
004d2822      
004d2822      if (eax_22 == 0)
004d2832          eax_23 = nullptr;
004d2822      else
004d282a          eax_23 = eax_22->vtable->DynamicCast(3);
004d282a      
004d283b      this->m_pBottomBorder_Locked = eax_23;
004d2841      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x10000693);
004d2848      class UIElement* eax_25;
004d2848      
004d2848      if (eax_24 == 0)
004d2858          eax_25 = nullptr;
004d2848      else
004d2850          eax_25 = eax_24->vtable->DynamicCast(3);
004d2850      
004d2861      this->m_pRightBorder_Locked = eax_25;
004d2867      class UIElement* eax_26 = UIElement::GetChildRecursive(this, 0x10000695);
004d286e      class UIElement* eax_27;
004d286e      
004d286e      if (eax_26 == 0)
004d287e          eax_27 = nullptr;
004d286e      else
004d2876          eax_27 = eax_26->vtable->DynamicCast(3);
004d2876      
004d2887      this->m_pTopLeftCorner_Locked = eax_27;
004d288d      class UIElement* eax_28 = UIElement::GetChildRecursive(this, 0x10000697);
004d2894      class UIElement* eax_29;
004d2894      
004d2894      if (eax_28 == 0)
004d28a4          eax_29 = nullptr;
004d2894      else
004d289c          eax_29 = eax_28->vtable->DynamicCast(3);
004d289c      
004d28ad      this->m_pTopRightCorner_Locked = eax_29;
004d28b3      class UIElement* eax_30 = UIElement::GetChildRecursive(this, 0x10000699);
004d28ba      class UIElement* eax_31;
004d28ba      
004d28ba      if (eax_30 == 0)
004d28ca          eax_31 = nullptr;
004d28ba      else
004d28c2          eax_31 = eax_30->vtable->DynamicCast(3);
004d28c2      
004d28ce      this->m_pBottomLeftCorner_Locked = eax_31;
004d28d4      gmMainChatUI::PostInit(this);
004d28d9      class GlobalEventHandler* eax_32 = GlobalEventHandler::GetGlobalEventHandler();
004d28d9      
004d28e2      if (eax_32 != 0)
004d28e2      {
004d28e4          eax_32->vtable->RegisterNoticeHandler(0x186b6, ((char*)this - 4));
004d28f5          eax_32->vtable->RegisterNoticeHandler(0x4dd252, ((char*)this - 4));
004d2902          eax_32->vtable->RegisterNoticeHandler(0x4dd267, ((char*)this - 4));
004d290f          eax_32->vtable->RegisterNoticeHandler(0x4dd26e, ((char*)this - 4));
004d291c          eax_32->vtable->RegisterNoticeHandler(0x4dd1f0, ((char*)this - 4));
004d28e2      }
004d28e2      
004d292e      UIListener::RegisterForGlobalMessage(this, 1);
004d2937      UIListener::RegisterForGlobalMessage(this, 0xd);
004d2670  }

004d293f                                                                                               90                                 .

004d2940  void __thiscall gmFloatyMainChatUI::ListenToGlobalMessage(class gmFloatyMainChatUI* this, uint32_t arg2, int32_t arg3)

004d2940  {
004d294b      if (arg2 == 0xd)
004d2950          gmFloatyMainChatUI::UpdateLockedStatus(((char*)this - 4));
004d2950      
004d295d      gmMainChatUI::ListenToGlobalMessage(this, arg2, arg3);
004d2940  }

004d2967                       90 90 90 90 90 90 90 90 90                                                         .........

004d2970  void __fastcall gmFloatyMainChatUI::UpdateFromPlayerModule(class gmFloatyMainChatUI* this)

004d2970  {
004d2980      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004d2991      int32_t* var_28 = nullptr;
004d2995      int32_t* var_24 = nullptr;
004d29a8      float var_30;
004d29a8      
004d29a8      if (((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0) && *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_30) != 0))
004d29c2          ChatInterface::SetDefaultOpacity(this, var_30);
004d29c2      
004d29e2      if (((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0) && *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_30) != 0))
004d29fc          ChatInterface::SetActiveOpacity(this, var_30);
004d29fc      
004d2a07      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d2a07      {
004d2a25          int32_t var_2c;
004d2a25          
004d2a25          if (CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0)
004d2a25          {
004d2a2b              uint32_t m_eWindowID = this->m_eWindowID;
004d2a3e              int32_t var_8 = 0;
004d2a42              int32_t* var_4_1 = nullptr;
004d2a46              int32_t var_10 = 0;
004d2a4a              int32_t* var_c_1 = nullptr;
004d2a4a              
004d2a55              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004d2aa3                  this->vtable->MoveTo(var_2c, var_30);
004d2aa3              
004d2ab2              uint32_t m_eWindowID_1 = this->m_eWindowID;
004d2ac5              int32_t var_18 = 0;
004d2ac9              int32_t* var_14_1 = nullptr;
004d2acd              int32_t var_20 = 0;
004d2ad1              int32_t* var_1c_1 = nullptr;
004d2ad1              
004d2adc              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004d2b2a                  this->vtable->ResizeTo(var_30, var_2c);
004d2b2a              
004d2b3d              BaseProperty::~BaseProperty(&var_20);
004d2b46              BaseProperty::~BaseProperty(&var_18);
004d2b4f              BaseProperty::~BaseProperty(&var_10);
004d2b58              BaseProperty::~BaseProperty(&var_8);
004d2a25          }
004d2a25          
004d2b7f          if (((PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x1000008a, &var_28) != 0 && var_24 != 0) && *(uint32_t*)(*(uint32_t*)var_24 + 0x70)(&var_2c) != 0))
004d2b93              this->vtable->SetVisible(var_2c);
004d2a07      }
004d2a07      
004d2b9f      ChatInterface::UpdateFromPlayerModule(this);
004d2ba6      gmFloatyMainChatUI::UpdateLockedStatus(this);
004d2bab      int32_t* eax_26 = var_28;
004d2bab      
004d2bb1      if (eax_26 != 0)
004d2bb1      {
004d2bbb          int32_t esi_2 = (eax_26[1] - 1);
004d2bb8          eax_26[1] = esi_2;
004d2bb8          
004d2bc2          if (esi_2 == 0)
004d2bc8              **(uint32_t**)eax_26(1);
004d2bc8          
004d2bca          var_28 = nullptr;
004d2bb1      }
004d2bb1      
004d2bd4      if (var_24 != 0)
004d2bd4      {
004d2bde          int32_t esi_4 = (var_24[1] - 1);
004d2bdb          var_24[1] = esi_4;
004d2bdb          
004d2be5          if (esi_4 == 0)
004d2beb              **(uint32_t**)var_24(1);
004d2bd4      }
004d2970  }

004d2bf4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d2c00  void __thiscall gmFloatyMainChatUI::ResizeTo(class gmFloatyMainChatUI* this, int32_t const arg2, int32_t const arg3)

004d2c00  {
004d2c13      gmMainChatUI::ResizeTo(this, arg2, arg3);
004d2c13      
004d2c2e      if (((this->m_pChatTargetButtonText == 0 && this->m_oldState != 0) && CPlayerSystem::GetPlayerSystem() != 0))
004d2c2e      {
004d2c53          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d2c56          int32_t var_8 = 0;
004d2c5a          int32_t* var_4_1 = nullptr;
004d2c5e          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004d2c65          int32_t eax_3 = UIRegion::GetWidth(this);
004d2c65          
004d2c70          if (var_4_1 != 0)
004d2c70          {
004d2c76              BaseProperty::CheckCopyOnWrite(&var_8);
004d2c82              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_3);
004d2c70          }
004d2c70          
004d2c96          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_oldState, &var_8);
004d2ca4          int32_t var_10 = 0;
004d2ca8          int32_t* var_c_1 = nullptr;
004d2cac          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004d2cb3          int32_t eax_4 = UIRegion::GetHeight(this);
004d2cb3          
004d2cbe          if (var_c_1 != 0)
004d2cbe          {
004d2cc4              BaseProperty::CheckCopyOnWrite(&var_10);
004d2cd0              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_4);
004d2cbe          }
004d2cbe          
004d2ce1          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_oldState, &var_10);
004d2cea          BaseProperty::~BaseProperty(&var_10);
004d2cf3          BaseProperty::~BaseProperty(&var_8);
004d2c2e      }
004d2c00  }

004d2d02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d2d10  void __thiscall gmFloatyMainChatUI::MoveTo(class gmFloatyMainChatUI* this, int32_t const arg2, int32_t const arg3)

004d2d10  {
004d2d15      int32_t const ebp = arg2;
004d2d1f      int32_t const edi = arg3;
004d2d1f      
004d2d2d      if (this->vtable->RecvNotice_LoadChanged() != 0)
004d2d2d      {
004d2d53          if (ebp > (UIRegion::GetWidth(this->vtable->RecvNotice_LoadChanged()) - UIRegion::GetWidth(this)))
004d2d6f              ebp = (UIRegion::GetWidth(this->vtable->RecvNotice_LoadChanged()) - UIRegion::GetWidth(this));
004d2d6f          
004d2d73          if (ebp < 0)
004d2d75              ebp = 0;
004d2d75          
004d2d97          if (arg3 > (UIRegion::GetHeight(this->vtable->RecvNotice_LoadChanged()) - UIRegion::GetHeight(this)))
004d2db3              edi = (UIRegion::GetHeight(this->vtable->RecvNotice_LoadChanged()) - UIRegion::GetHeight(this));
004d2db3          
004d2db9          if (edi < 0)
004d2dbb              edi = 0;
004d2d2d      }
004d2d2d      
004d2dc1      gmMainChatUI::MoveTo(this, ebp, edi);
004d2dc1      
004d2dd8      if (((this->m_pChatTargetButtonText == 0 && this->m_oldState != 0) && CPlayerSystem::GetPlayerSystem() != 0))
004d2dd8      {
004d2dfb          class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d2dfe          int32_t var_8 = 0;
004d2e02          int32_t* var_4_1 = nullptr;
004d2e06          BaseProperty::SetPropertyName(&var_8, 0x10000086);
004d2e0f          uint32_t m_timestamp = this->m_tsSerialNumberLastListenedTo.m_timestamp;
004d2e0f          
004d2e12          if (var_4_1 != 0)
004d2e12          {
004d2e18              BaseProperty::CheckCopyOnWrite(&var_8);
004d2e24              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(m_timestamp);
004d2e12          }
004d2e12          
004d2e38          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_oldState, &var_8);
004d2e46          int32_t var_10 = 0;
004d2e4a          int32_t* var_c_1 = nullptr;
004d2e4e          BaseProperty::SetPropertyName(&var_10, 0x10000087);
004d2e57          int32_t m_x0 = this->m_box.m_x0;
004d2e57          
004d2e5d          if (var_c_1 != 0)
004d2e5d          {
004d2e63              BaseProperty::CheckCopyOnWrite(&var_10);
004d2e6f              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(m_x0);
004d2e5d          }
004d2e5d          
004d2e80          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_oldState, &var_10);
004d2e89          BaseProperty::~BaseProperty(&var_10);
004d2e92          BaseProperty::~BaseProperty(&var_8);
004d2dd8      }
004d2d10  }

004d2ea1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004d2eb0  void __thiscall gmFloatyIndicatorsUI::gmFloatyIndicatorsUI(class gmFloatyIndicatorsUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d2eb0  {
004d2ebf      gmIndicatorsUI::gmIndicatorsUI(this, arg2, arg3);
004d2ec6      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004d2f2c      this->vtable = 0x7bbca0;
004d2f32      this->vtable = &gmFloatyIndicatorsUI::`vftable';
004d2eb0  }

004d2f42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d2f50  class UIElement* __thiscall gmFloatyIndicatorsUI::DynamicCast(class gmFloatyIndicatorsUI* this, uint32_t arg2) __pure

004d2f50  {
004d2f64      if ((arg2 == 0x10000052 || arg2 == 0x1000000a))
004d2f71          return this;
004d2f71      
004d2f6b      int32_t edx_1;
004d2f6b      edx_1 = arg2 != 3;
004d2f6f      return (this & (edx_1 - 1));
004d2f50  }

004d2f74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d2f80  uint32_t gmFloatyIndicatorsUI::GetUIElementType(class gmFloatyIndicatorsUI const* this @ ecx) __pure

004d2f80  {
004d2f85      return 0x10000052;
004d2f80  }

004d2f86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d2f90  class UIElement* gmFloatyIndicatorsUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d2f90  {
004d2f95      void* eax = operator new(0x640);
004d2f95      
004d2f9f      if (eax == 0)
004d2fb5          return 0;
004d2fb5      
004d2fb2      return gmFloatyIndicatorsUI::gmFloatyIndicatorsUI(eax, arg1, arg2);
004d2f90  }

004d2fb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d2fc0  enum UIElementMessageListenResult __thiscall gmFloatyIndicatorsUI::ListenToElementMessage(class gmFloatyIndicatorsUI* this, struct UIElementMessageInfo const* arg2)

004d2fc0  {
004d2fd4      if ((arg2->idMessage == 1 && arg2->idElement == 0x100000fa))
004d2fd8          CM_UI::SendNotice_EndCharacterSession(1);
004d2fd8      
004d2fea      return gmIndicatorsUI::ListenToElementMessage(this, arg2);
004d2fc0  }

004d2fed                                         90 90 90                                                               ...

004d2ff0  void __fastcall gmFloatyIndicatorsUI::UpdateLockedStatus(class gmFloatyIndicatorsUI* this)

004d2ff0  {
004d3000      bool cond:0 = PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0;
004d3002      class UIElement* m_pTopBorder = this->m_pTopBorder;
004d3002      
004d3008      if (!(cond:0))
004d3008      {
004d300e          m_pTopBorder->vtable->SetVisible(0);
004d3015          this->m_pTopBorder->vtable->SetVisible(0);
004d3022          this->m_pLeftBorder->vtable->SetVisible(0);
004d302f          this->m_pBottomBorder->vtable->SetVisible(0);
004d303c          this->m_pRightBorder->vtable->SetVisible(0);
004d3049          this->m_pTopLeftCorner->vtable->SetVisible(0);
004d3056          this->m_pTopRightCorner->vtable->SetVisible(0);
004d3063          this->m_pBottomLeftCorner->vtable->SetVisible(0);
004d3070          this->m_pBottomRightCorner->vtable->SetVisible(0);
004d307d          this->m_pTopBorder_Locked->vtable->SetVisible(1);
004d308a          this->m_pLeftBorder_Locked->vtable->SetVisible(1);
004d3097          this->m_pBottomBorder_Locked->vtable->SetVisible(1);
004d30a4          this->m_pRightBorder_Locked->vtable->SetVisible(1);
004d30b1          this->m_pTopLeftCorner_Locked->vtable->SetVisible(1);
004d30be          this->m_pTopRightCorner_Locked->vtable->SetVisible(1);
004d30cb          this->m_pBottomLeftCorner_Locked->vtable->SetVisible(1);
004d30d8          this->m_pBottomRightCorner_Locked->vtable->SetVisible(1);
004d30e6          return;
004d3008      }
004d3008      
004d30e7      m_pTopBorder->vtable->SetVisible(1);
004d30ee      this->m_pTopBorder->vtable->SetVisible(1);
004d30fb      this->m_pLeftBorder->vtable->SetVisible(1);
004d3108      this->m_pBottomBorder->vtable->SetVisible(1);
004d3115      this->m_pRightBorder->vtable->SetVisible(1);
004d3122      this->m_pTopLeftCorner->vtable->SetVisible(1);
004d312f      this->m_pTopRightCorner->vtable->SetVisible(1);
004d313c      this->m_pBottomLeftCorner->vtable->SetVisible(1);
004d3149      this->m_pBottomRightCorner->vtable->SetVisible(1);
004d3156      this->m_pTopBorder_Locked->vtable->SetVisible(0);
004d3163      this->m_pLeftBorder_Locked->vtable->SetVisible(0);
004d3170      this->m_pBottomBorder_Locked->vtable->SetVisible(0);
004d317d      this->m_pRightBorder_Locked->vtable->SetVisible(0);
004d318a      this->m_pTopLeftCorner_Locked->vtable->SetVisible(0);
004d3197      this->m_pTopRightCorner_Locked->vtable->SetVisible(0);
004d31a4      this->m_pBottomLeftCorner_Locked->vtable->SetVisible(0);
004d31b1      this->m_pBottomRightCorner_Locked->vtable->SetVisible(0);
004d2ff0  }


004d31c0  void* __thiscall gmFloatyIndicatorsUI::`scalar deleting destructor'(class gmFloatyIndicatorsUI* this, uint32_t arg2)

004d31c0  {
004d31c3      this->vtable = 0x7bbca0;
004d31c9      this->vtable = &gmFloatyIndicatorsUI::`vftable';
004d31d3      gmIndicatorsUI::~gmIndicatorsUI(this);
004d31d3      
004d31dd      if ((arg2 & 1) != 0)
004d31e0          operator delete(this);
004d31e0      
004d31eb      return this;
004d31c0  }

004d31ee                                            90 90                                                                ..

004d31f0  void gmFloatyIndicatorsUI::Register()

004d31f0  {
004d31fa      UIElement::RegisterElementClass(0x10000052, gmFloatyIndicatorsUI::Create);
004d31f0  }

004d3203           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d3210  void __thiscall gmFloatyIndicatorsUI::PostInit(class gmFloatyIndicatorsUI* this)

004d3210  {
004d3213      gmCGProfessionPage::PostInit(this);
004d321f      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000064c);
004d3226      class UIElement* eax_1;
004d3226      
004d3226      if (eax == 0)
004d3236          eax_1 = nullptr;
004d3226      else
004d322e          eax_1 = eax->vtable->DynamicCast(2);
004d322e      
004d323f      this->m_pTopBorder = eax_1;
004d3245      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x1000064e);
004d324c      class UIElement* eax_3;
004d324c      
004d324c      if (eax_2 == 0)
004d325c          eax_3 = nullptr;
004d324c      else
004d3254          eax_3 = eax_2->vtable->DynamicCast(2);
004d3254      
004d3265      this->m_pLeftBorder = eax_3;
004d326b      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000650);
004d3272      class UIElement* eax_5;
004d3272      
004d3272      if (eax_4 == 0)
004d3282          eax_5 = nullptr;
004d3272      else
004d327a          eax_5 = eax_4->vtable->DynamicCast(2);
004d327a      
004d328b      this->m_pBottomBorder = eax_5;
004d3291      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x10000652);
004d3298      class UIElement* eax_7;
004d3298      
004d3298      if (eax_6 == 0)
004d32a8          eax_7 = nullptr;
004d3298      else
004d32a0          eax_7 = eax_6->vtable->DynamicCast(2);
004d32a0      
004d32b1      this->m_pRightBorder = eax_7;
004d32b7      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x1000064b);
004d32be      class UIElement* eax_9;
004d32be      
004d32be      if (eax_8 == 0)
004d32ce          eax_9 = nullptr;
004d32be      else
004d32c6          eax_9 = eax_8->vtable->DynamicCast(2);
004d32c6      
004d32d7      this->m_pTopLeftCorner = eax_9;
004d32dd      class UIElement* eax_10 = UIElement::GetChildRecursive(this, 0x1000064d);
004d32e4      class UIElement* eax_11;
004d32e4      
004d32e4      if (eax_10 == 0)
004d32f4          eax_11 = nullptr;
004d32e4      else
004d32ec          eax_11 = eax_10->vtable->DynamicCast(2);
004d32ec      
004d32fd      this->m_pTopRightCorner = eax_11;
004d3303      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x1000064f);
004d330a      class UIElement* eax_13;
004d330a      
004d330a      if (eax_12 == 0)
004d331a          eax_13 = nullptr;
004d330a      else
004d3312          eax_13 = eax_12->vtable->DynamicCast(2);
004d3312      
004d3323      this->m_pBottomLeftCorner = eax_13;
004d3329      class UIElement* eax_14 = UIElement::GetChildRecursive(this, 0x10000651);
004d3330      class UIElement* eax_15;
004d3330      
004d3330      if (eax_14 == 0)
004d3340          eax_15 = nullptr;
004d3330      else
004d3338          eax_15 = eax_14->vtable->DynamicCast(2);
004d3338      
004d3349      this->m_pBottomRightCorner = eax_15;
004d334f      class UIElement* eax_16 = UIElement::GetChildRecursive(this, 0x10000644);
004d3356      class UIElement* eax_17;
004d3356      
004d3356      if (eax_16 == 0)
004d3366          eax_17 = nullptr;
004d3356      else
004d335e          eax_17 = eax_16->vtable->DynamicCast(3);
004d335e      
004d336f      this->m_pTopBorder_Locked = eax_17;
004d3375      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x10000646);
004d337c      class UIElement* eax_19;
004d337c      
004d337c      if (eax_18 == 0)
004d338c          eax_19 = nullptr;
004d337c      else
004d3384          eax_19 = eax_18->vtable->DynamicCast(3);
004d3384      
004d3395      this->m_pLeftBorder_Locked = eax_19;
004d339b      class UIElement* eax_20 = UIElement::GetChildRecursive(this, 0x10000648);
004d33a2      class UIElement* eax_21;
004d33a2      
004d33a2      if (eax_20 == 0)
004d33b2          eax_21 = nullptr;
004d33a2      else
004d33aa          eax_21 = eax_20->vtable->DynamicCast(3);
004d33aa      
004d33bb      this->m_pBottomBorder_Locked = eax_21;
004d33c1      class UIElement* eax_22 = UIElement::GetChildRecursive(this, 0x1000064a);
004d33c8      class UIElement* eax_23;
004d33c8      
004d33c8      if (eax_22 == 0)
004d33d8          eax_23 = nullptr;
004d33c8      else
004d33d0          eax_23 = eax_22->vtable->DynamicCast(3);
004d33d0      
004d33e1      this->m_pRightBorder_Locked = eax_23;
004d33e7      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x10000643);
004d33ee      class UIElement* eax_25;
004d33ee      
004d33ee      if (eax_24 == 0)
004d33fe          eax_25 = nullptr;
004d33ee      else
004d33f6          eax_25 = eax_24->vtable->DynamicCast(3);
004d33f6      
004d3407      this->m_pTopLeftCorner_Locked = eax_25;
004d340d      class UIElement* eax_26 = UIElement::GetChildRecursive(this, 0x10000645);
004d3414      class UIElement* eax_27;
004d3414      
004d3414      if (eax_26 == 0)
004d3424          eax_27 = nullptr;
004d3414      else
004d341c          eax_27 = eax_26->vtable->DynamicCast(3);
004d341c      
004d342d      this->m_pTopRightCorner_Locked = eax_27;
004d3433      class UIElement* eax_28 = UIElement::GetChildRecursive(this, 0x10000647);
004d343a      class UIElement* eax_29;
004d343a      
004d343a      if (eax_28 == 0)
004d344a          eax_29 = nullptr;
004d343a      else
004d3442          eax_29 = eax_28->vtable->DynamicCast(3);
004d3442      
004d3453      this->m_pBottomLeftCorner_Locked = eax_29;
004d3459      class UIElement* eax_30 = UIElement::GetChildRecursive(this, 0x10000649);
004d3460      class UIElement* eax_31;
004d3460      
004d3460      if (eax_30 == 0)
004d3470          eax_31 = nullptr;
004d3460      else
004d3468          eax_31 = eax_30->vtable->DynamicCast(3);
004d3468      
004d3472      this->m_pBottomRightCorner_Locked = eax_31;
004d3486      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d348b      class GlobalEventHandler* eax_33 = GlobalEventHandler::GetGlobalEventHandler();
004d348b      
004d3492      if (eax_33 != 0)
004d3494          eax_33->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004d3494      
004d34ab      UIListener::RegisterForGlobalMessage(this, 0xd);
004d34b5      /* jump -> this->vtable->UpdateFromPlayerModule */
004d3210  }

004d34bb                                                                                   90 90 90 90 90                             .....

004d34c0  void __thiscall gmFloatyIndicatorsUI::ListenToGlobalMessage(class gmFloatyIndicatorsUI* this, uint32_t arg2, int32_t arg3)

004d34c0  {
004d34cb      if (arg2 == 0xd)
004d34cd          gmFloatyIndicatorsUI::UpdateLockedStatus(this);
004d34cd      
004d34da      NoticeHandler::RecvNotice_DisplayWeenieError(this, arg2, arg3);
004d34c0  }

004d34e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d34f0  void __fastcall gmFloatyIndicatorsUI::UpdateFromPlayerModule(class gmFloatyIndicatorsUI* this)

004d34f0  {
004d3500      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004d3511      int32_t* var_28 = nullptr;
004d3515      int32_t* var_24 = nullptr;
004d3528      int32_t var_2c;
004d3528      
004d3528      if ((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0))
004d3531          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d3531      
004d3552      if ((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0))
004d355b          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d355b      
004d3567      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d3567      {
004d3585          if (CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0)
004d3585          {
004d358b              uint32_t m_eWindowID_1 = this->m_eWindowID;
004d359e              int32_t var_8 = 0;
004d35a2              int32_t* var_4_1 = nullptr;
004d35a6              int32_t var_10 = 0;
004d35aa              int32_t* var_c_1 = nullptr;
004d35b5              int32_t var_30;
004d35b5              
004d35b5              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004d3607                  this->vtable->MoveTo(var_2c, var_30);
004d3607              
004d3610              uint32_t m_eWindowID = this->m_eWindowID;
004d3623              int32_t var_18 = 0;
004d3627              int32_t* var_14_1 = nullptr;
004d362b              int32_t var_20 = 0;
004d362f              int32_t* var_1c_1 = nullptr;
004d362f              
004d363a              if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004d368c                  this->vtable->ResizeTo(var_30, var_2c);
004d368c              
004d3699              BaseProperty::~BaseProperty(&var_20);
004d36a2              BaseProperty::~BaseProperty(&var_18);
004d36ab              BaseProperty::~BaseProperty(&var_10);
004d36b4              BaseProperty::~BaseProperty(&var_8);
004d3585          }
004d3585          
004d36db          if (((PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x1000008a, &var_28) != 0 && var_24 != 0) && *(uint32_t*)(*(uint32_t*)var_24 + 0x70)(&var_2c) != 0))
004d36ef              this->vtable->SetVisible(var_2c);
004d3567      }
004d3567      
004d36f9      gmFloatyIndicatorsUI::UpdateLockedStatus(this);
004d36fe      int32_t* eax_21 = var_28;
004d36fe      
004d3704      if (eax_21 != 0)
004d3704      {
004d370e          int32_t esi_2 = (eax_21[1] - 1);
004d370b          eax_21[1] = esi_2;
004d370b          
004d3715          if (esi_2 == 0)
004d371b              **(uint32_t**)eax_21(1);
004d371b          
004d371d          var_28 = nullptr;
004d3704      }
004d3704      
004d3727      if (var_24 != 0)
004d3727      {
004d3731          int32_t esi_4 = (var_24[1] - 1);
004d372e          var_24[1] = esi_4;
004d372e          
004d3738          if (esi_4 == 0)
004d373e              **(uint32_t**)var_24(1);
004d3727      }
004d34f0  }

004d3747                       90 90 90 90 90 90 90 90 90                                                         .........

004d3750  void __thiscall gmFloatyIndicatorsUI::ResizeTo(class gmFloatyIndicatorsUI* this, int32_t const arg2, int32_t const arg3)

004d3750  {
004d3763      UIElement::ResizeTo(this, arg2, arg3);
004d3763      
004d3772      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d3772      {
004d3797          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d379a          int32_t* var_8 = nullptr;
004d379e          int32_t* var_4_1 = nullptr;
004d37a2          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004d37a9          int32_t eax_3 = UIRegion::GetWidth(this);
004d37a9          
004d37b4          if (var_4_1 != 0)
004d37b4          {
004d37ba              BaseProperty::CheckCopyOnWrite(&var_8);
004d37c6              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_3);
004d37b4          }
004d37b4          
004d37da          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_8);
004d37e8          int32_t* var_10 = nullptr;
004d37ec          int32_t* var_c_1 = nullptr;
004d37f0          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004d37f7          int32_t eax_4 = UIRegion::GetHeight(this);
004d37f7          
004d3802          if (var_c_1 != 0)
004d3802          {
004d3808              BaseProperty::CheckCopyOnWrite(&var_10);
004d3814              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_4);
004d3802          }
004d3802          
004d3825          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_10);
004d382a          int32_t* eax_5 = var_10;
004d382a          
004d3832          if (eax_5 != 0)
004d3832          {
004d383c              int32_t esi_2 = (eax_5[1] - 1);
004d3839              eax_5[1] = esi_2;
004d3839              
004d3843              if (esi_2 == 0)
004d3849                  **(uint32_t**)eax_5(1);
004d3849              
004d384b              var_10 = nullptr;
004d3832          }
004d3832          
004d3855          if (var_c_1 != 0)
004d3855          {
004d385f              int32_t esi_4 = (var_c_1[1] - 1);
004d385c              var_c_1[1] = esi_4;
004d385c              
004d3866              if (esi_4 == 0)
004d386c                  **(uint32_t**)var_c_1(1);
004d386c              
004d386e              int32_t var_c_2 = 0;
004d3855          }
004d3855          
004d3872          int32_t* eax_10 = var_8;
004d3872          
004d3878          if (eax_10 != 0)
004d3878          {
004d3882              int32_t esi_6 = (eax_10[1] - 1);
004d387f              eax_10[1] = esi_6;
004d387f              
004d3889              if (esi_6 == 0)
004d388f                  **(uint32_t**)eax_10(1);
004d388f              
004d3891              var_8 = nullptr;
004d3878          }
004d3878          
004d389b          if (var_4_1 != 0)
004d389b          {
004d38a5              int32_t esi_8 = (var_4_1[1] - 1);
004d38a2              var_4_1[1] = esi_8;
004d38a2              
004d38ac              if (esi_8 == 0)
004d38b2                  **(uint32_t**)var_4_1(1);
004d389b          }
004d3772      }
004d3750  }

004d38bc                                                                                      90 90 90 90                              ....

004d38c0  void __thiscall gmFloatyIndicatorsUI::MoveTo(class gmFloatyIndicatorsUI* this, int32_t const arg2, int32_t const arg3)

004d38c0  {
004d38c4      int32_t const ebx = arg2;
004d38cf      int32_t const edi = arg3;
004d38cf      
004d38dd      if (this->vtable->GetParent() != 0)
004d38dd      {
004d3903          if (ebx > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
004d391f              ebx = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
004d391f          
004d3923          if (ebx < 0)
004d3925              ebx = 0;
004d3925          
004d3947          if (arg3 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
004d3963              edi = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
004d3963          
004d3969          if (edi < 0)
004d396b              edi = 0;
004d38dd      }
004d38dd      
004d3971      UIElement::MoveTo(this, ebx, edi);
004d3971      
004d397c      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d397c      {
004d399f          class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d39a2          int32_t* var_8 = nullptr;
004d39a6          int32_t* var_4_1 = nullptr;
004d39aa          BaseProperty::SetPropertyName(&var_8, 0x10000086);
004d39b3          int32_t m_x0 = this->m_box.m_x0;
004d39b3          
004d39b6          if (var_4_1 != 0)
004d39b6          {
004d39bc              BaseProperty::CheckCopyOnWrite(&var_8);
004d39c8              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(m_x0);
004d39b6          }
004d39b6          
004d39dc          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_8);
004d39ea          int32_t* var_10 = nullptr;
004d39ee          int32_t* var_c_1 = nullptr;
004d39f2          BaseProperty::SetPropertyName(&var_10, 0x10000087);
004d39fb          int32_t m_y0 = this->m_box.m_y0;
004d39fb          
004d3a01          if (var_c_1 != 0)
004d3a01          {
004d3a07              BaseProperty::CheckCopyOnWrite(&var_10);
004d3a13              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(m_y0);
004d3a01          }
004d3a01          
004d3a24          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_10);
004d3a29          int32_t* eax_19 = var_10;
004d3a29          
004d3a2f          if (eax_19 != 0)
004d3a2f          {
004d3a39              int32_t esi_2 = (eax_19[1] - 1);
004d3a36              eax_19[1] = esi_2;
004d3a36              
004d3a40              if (esi_2 == 0)
004d3a46                  **(uint32_t**)eax_19(1);
004d3a46              
004d3a48              var_10 = nullptr;
004d3a2f          }
004d3a2f          
004d3a52          if (var_c_1 != 0)
004d3a52          {
004d3a5c              int32_t esi_4 = (var_c_1[1] - 1);
004d3a59              var_c_1[1] = esi_4;
004d3a59              
004d3a63              if (esi_4 == 0)
004d3a69                  **(uint32_t**)var_c_1(1);
004d3a69              
004d3a6b              int32_t var_c_2 = 0;
004d3a52          }
004d3a52          
004d3a6f          int32_t* eax_24 = var_8;
004d3a6f          
004d3a75          if (eax_24 != 0)
004d3a75          {
004d3a7f              int32_t esi_6 = (eax_24[1] - 1);
004d3a7c              eax_24[1] = esi_6;
004d3a7c              
004d3a86              if (esi_6 == 0)
004d3a8c                  **(uint32_t**)eax_24(1);
004d3a8c              
004d3a8e              var_8 = nullptr;
004d3a75          }
004d3a75          
004d3a98          if (var_4_1 != 0)
004d3a98          {
004d3aa2              int32_t esi_8 = (var_4_1[1] - 1);
004d3a9f              var_4_1[1] = esi_8;
004d3a9f              
004d3aa9              if (esi_8 == 0)
004d3aaf                  **(uint32_t**)var_4_1(1);
004d3a98          }
004d397c      }
004d38c0  }

004d3abb                                                                                   90 90 90 90 90                             .....

004d3ac0  void __thiscall gmFloatyIndicatorsUI::SetVisible(class gmFloatyIndicatorsUI* this, uint8_t arg2)

004d3ac0  {
004d3acb      UIElement::SetVisible(this, arg2);
004d3acb      
004d3ad8      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d3ad8      {
004d3afc          class CPlayerModule* esi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d3aff          int32_t* var_8 = nullptr;
004d3b07          int32_t* var_4_1 = nullptr;
004d3b0f          BaseProperty::SetPropertyName(&var_8, 0x1000008a);
004d3b20          uint8_t ecx_2 = (((int8_t)(this->__bitfield164 >> 1)) & 1);
004d3b20          
004d3b29          if (var_4_1 != 0)
004d3b29          {
004d3b2f              BaseProperty::CheckCopyOnWrite(&var_8);
004d3b3f              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x74)(ecx_2);
004d3b29          }
004d3b29          
004d3b51          PlayerModule::SetChatWindowOption(&esi_2->vtable, this->m_eWindowID, &var_8);
004d3b56          int32_t* eax_5 = var_8;
004d3b56          
004d3b5c          if (eax_5 != 0)
004d3b5c          {
004d3b66              int32_t esi_4 = (eax_5[1] - 1);
004d3b63              eax_5[1] = esi_4;
004d3b63              
004d3b6d              if (esi_4 == 0)
004d3b73                  **(uint32_t**)eax_5(1);
004d3b73              
004d3b75              var_8 = nullptr;
004d3b5c          }
004d3b5c          
004d3b83          if (var_4_1 != 0)
004d3b83          {
004d3b8d              int32_t esi_6 = (var_4_1[1] - 1);
004d3b8a              var_4_1[1] = esi_6;
004d3b8a              
004d3b94              if (esi_6 == 0)
004d3b9a                  **(uint32_t**)var_4_1(1);
004d3b83          }
004d3ad8      }
004d3ac0  }

004d3ba4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d3bb0  void __thiscall gmFloatyExaminationUI::gmFloatyExaminationUI(class gmFloatyExaminationUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d3bb0  {
004d3bbf      gmExaminationUI::gmExaminationUI(this, arg2, arg3);
004d3bc6      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004d3c2c      this->vtable = 0x7bc178;
004d3c32      this->vtable = &gmFloatyExaminationUI::`vftable';
004d3bb0  }

004d3c42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d3c50  class UIElement* __thiscall gmFloatyExaminationUI::DynamicCast(class gmFloatyExaminationUI* this, uint32_t arg2) __pure

004d3c50  {
004d3c64      if ((arg2 == 0x1000004c || arg2 == 0x1000001c))
004d3c71          return this;
004d3c71      
004d3c6b      int32_t edx_1;
004d3c6b      edx_1 = arg2 != 3;
004d3c6f      return (this & (edx_1 - 1));
004d3c50  }

004d3c74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d3c80  uint32_t gmFloatyExaminationUI::GetUIElementType(class gmFloatyExaminationUI const* this @ ecx) __pure

004d3c80  {
004d3c85      return 0x1000004c;
004d3c80  }

004d3c86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d3c90  class UIElement* gmFloatyExaminationUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d3c90  {
004d3c95      void* eax = operator new(0x670);
004d3c95      
004d3c9f      if (eax == 0)
004d3cb5          return 0;
004d3cb5      
004d3cb2      return gmFloatyExaminationUI::gmFloatyExaminationUI(eax, arg1, arg2);
004d3c90  }

004d3cb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d3cc0  enum UIElementMessageListenResult __thiscall gmFloatyExaminationUI::ListenToElementMessage(class gmFloatyExaminationUI* this, struct UIElementMessageInfo const* arg2)

004d3cc0  {
004d3cd4      if ((arg2->idMessage == 1 && arg2->idElement == 0x100005f3))
004d3cd6          this->vtable->SetVisible(0);
004d3cd6      
004d3ce7      return gmExaminationUI::ListenToElementMessage(this, arg2);
004d3cc0  }

004d3cea                                90 90 90 90 90 90                                                            ......

004d3cf0  uint8_t __thiscall gmFloatyExaminationUI::OnChildAction(class gmFloatyExaminationUI* this, class UIElement const* arg2, class InputEvent const* arg3)

004d3cf0  {
004d3cf0      /* tailcall */
004d3cf0      return gmExaminationUI::OnChildAction(this, arg2, arg3);
004d3cf0  }

004d3cf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004d3d00  void __fastcall gmFloatyExaminationUI::UpdateLockedStatus(class gmFloatyExaminationUI* this)

004d3d00  {
004d3d10      bool cond:0 = PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0;
004d3d12      class UIElement* m_pTopBorder = this->m_pTopBorder;
004d3d12      
004d3d18      if (!(cond:0))
004d3d18      {
004d3d1e          m_pTopBorder->vtable->SetVisible(0);
004d3d25          this->m_pTopBorder->vtable->SetVisible(0);
004d3d32          this->m_pLeftBorder->vtable->SetVisible(0);
004d3d3f          this->m_pBottomBorder->vtable->SetVisible(0);
004d3d4c          this->m_pRightBorder->vtable->SetVisible(0);
004d3d59          this->m_pTopLeftCorner->vtable->SetVisible(0);
004d3d66          this->m_pTopRightCorner->vtable->SetVisible(0);
004d3d73          this->m_pBottomLeftCorner->vtable->SetVisible(0);
004d3d80          this->m_pBottomRightCorner->vtable->SetVisible(0);
004d3d8d          this->m_pTopBorder_Locked->vtable->SetVisible(1);
004d3d9a          this->m_pLeftBorder_Locked->vtable->SetVisible(1);
004d3da7          this->m_pBottomBorder_Locked->vtable->SetVisible(1);
004d3db4          this->m_pRightBorder_Locked->vtable->SetVisible(1);
004d3dc1          this->m_pTopLeftCorner_Locked->vtable->SetVisible(1);
004d3dce          this->m_pTopRightCorner_Locked->vtable->SetVisible(1);
004d3ddb          this->m_pBottomLeftCorner_Locked->vtable->SetVisible(1);
004d3de8          this->m_pBottomRightCorner_Locked->vtable->SetVisible(1);
004d3df6          return;
004d3d18      }
004d3d18      
004d3df7      m_pTopBorder->vtable->SetVisible(1);
004d3dfe      this->m_pTopBorder->vtable->SetVisible(1);
004d3e0b      this->m_pLeftBorder->vtable->SetVisible(1);
004d3e18      this->m_pBottomBorder->vtable->SetVisible(1);
004d3e25      this->m_pRightBorder->vtable->SetVisible(1);
004d3e32      this->m_pTopLeftCorner->vtable->SetVisible(1);
004d3e3f      this->m_pTopRightCorner->vtable->SetVisible(1);
004d3e4c      this->m_pBottomLeftCorner->vtable->SetVisible(1);
004d3e59      this->m_pBottomRightCorner->vtable->SetVisible(1);
004d3e66      this->m_pTopBorder_Locked->vtable->SetVisible(0);
004d3e73      this->m_pLeftBorder_Locked->vtable->SetVisible(0);
004d3e80      this->m_pBottomBorder_Locked->vtable->SetVisible(0);
004d3e8d      this->m_pRightBorder_Locked->vtable->SetVisible(0);
004d3e9a      this->m_pTopLeftCorner_Locked->vtable->SetVisible(0);
004d3ea7      this->m_pTopRightCorner_Locked->vtable->SetVisible(0);
004d3eb4      this->m_pBottomLeftCorner_Locked->vtable->SetVisible(0);
004d3ec1      this->m_pBottomRightCorner_Locked->vtable->SetVisible(0);
004d3d00  }


004d3ed0  void* __thiscall gmFloatyExaminationUI::`scalar deleting destructor'(class gmFloatyExaminationUI* this, uint32_t arg2)

004d3ed0  {
004d3ed3      this->vtable = 0x7bc178;
004d3ed9      this->vtable = &gmFloatyExaminationUI::`vftable';
004d3ee3      gmExaminationUI::~gmExaminationUI(this);
004d3ee3      
004d3eed      if ((arg2 & 1) != 0)
004d3ef0          operator delete(this);
004d3ef0      
004d3efb      return this;
004d3ed0  }

004d3efe                                                                                            90 90                                ..

004d3f00  void gmFloatyExaminationUI::Register()

004d3f00  {
004d3f0a      UIElement::RegisterElementClass(0x1000004c, gmFloatyExaminationUI::Create);
004d3f00  }

004d3f13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d3f20  void __thiscall gmFloatyExaminationUI::PostInit(class gmFloatyExaminationUI* this)

004d3f20  {
004d3f24      gmExaminationUI::PostInit(this);
004d3f37      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d3f43      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x1000067c);
004d3f4a      class UIElement* eax_2;
004d3f4a      
004d3f4a      if (eax_1 == 0)
004d3f5a          eax_2 = nullptr;
004d3f4a      else
004d3f52          eax_2 = eax_1->vtable->DynamicCast(2);
004d3f52      
004d3f63      this->m_pTopBorder = eax_2;
004d3f69      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x1000067e);
004d3f70      class UIElement* eax_4;
004d3f70      
004d3f70      if (eax_3 == 0)
004d3f80          eax_4 = nullptr;
004d3f70      else
004d3f78          eax_4 = eax_3->vtable->DynamicCast(9);
004d3f78      
004d3f89      this->m_pLeftBorder = eax_4;
004d3f8f      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x10000680);
004d3f96      class UIElement* eax_6;
004d3f96      
004d3f96      if (eax_5 == 0)
004d3fa6          eax_6 = nullptr;
004d3f96      else
004d3f9e          eax_6 = eax_5->vtable->DynamicCast(9);
004d3f9e      
004d3faf      this->m_pBottomBorder = eax_6;
004d3fb5      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x10000682);
004d3fbc      class UIElement* eax_8;
004d3fbc      
004d3fbc      if (eax_7 == 0)
004d3fcc          eax_8 = nullptr;
004d3fbc      else
004d3fc4          eax_8 = eax_7->vtable->DynamicCast(9);
004d3fc4      
004d3fd5      this->m_pRightBorder = eax_8;
004d3fdb      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x1000067b);
004d3fe2      class UIElement* eax_10;
004d3fe2      
004d3fe2      if (eax_9 == 0)
004d3ff2          eax_10 = nullptr;
004d3fe2      else
004d3fea          eax_10 = eax_9->vtable->DynamicCast(9);
004d3fea      
004d3ffb      this->m_pTopLeftCorner = eax_10;
004d4001      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x1000067d);
004d4008      class UIElement* eax_12;
004d4008      
004d4008      if (eax_11 == 0)
004d4018          eax_12 = nullptr;
004d4008      else
004d4010          eax_12 = eax_11->vtable->DynamicCast(9);
004d4010      
004d4021      this->m_pTopRightCorner = eax_12;
004d4027      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x1000067f);
004d402e      class UIElement* eax_14;
004d402e      
004d402e      if (eax_13 == 0)
004d403e          eax_14 = nullptr;
004d402e      else
004d4036          eax_14 = eax_13->vtable->DynamicCast(9);
004d4036      
004d4047      this->m_pBottomLeftCorner = eax_14;
004d404d      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x10000681);
004d4054      class UIElement* eax_16;
004d4054      
004d4054      if (eax_15 == 0)
004d4064          eax_16 = nullptr;
004d4054      else
004d405c          eax_16 = eax_15->vtable->DynamicCast(9);
004d405c      
004d406d      this->m_pBottomRightCorner = eax_16;
004d4073      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x10000674);
004d407a      class UIElement* eax_18;
004d407a      
004d407a      if (eax_17 == 0)
004d408a          eax_18 = nullptr;
004d407a      else
004d4082          eax_18 = eax_17->vtable->DynamicCast(3);
004d4082      
004d4093      this->m_pTopBorder_Locked = eax_18;
004d4099      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x10000676);
004d40a0      class UIElement* eax_20;
004d40a0      
004d40a0      if (eax_19 == 0)
004d40b0          eax_20 = nullptr;
004d40a0      else
004d40a8          eax_20 = eax_19->vtable->DynamicCast(3);
004d40a8      
004d40b9      this->m_pLeftBorder_Locked = eax_20;
004d40bf      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x10000678);
004d40c6      class UIElement* eax_22;
004d40c6      
004d40c6      if (eax_21 == 0)
004d40d6          eax_22 = nullptr;
004d40c6      else
004d40ce          eax_22 = eax_21->vtable->DynamicCast(3);
004d40ce      
004d40df      this->m_pBottomBorder_Locked = eax_22;
004d40e5      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x1000067a);
004d40ec      class UIElement* eax_24;
004d40ec      
004d40ec      if (eax_23 == 0)
004d40fc          eax_24 = nullptr;
004d40ec      else
004d40f4          eax_24 = eax_23->vtable->DynamicCast(3);
004d40f4      
004d4105      this->m_pRightBorder_Locked = eax_24;
004d410b      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x10000673);
004d4112      class UIElement* eax_26;
004d4112      
004d4112      if (eax_25 == 0)
004d4122          eax_26 = nullptr;
004d4112      else
004d411a          eax_26 = eax_25->vtable->DynamicCast(3);
004d411a      
004d412b      this->m_pTopLeftCorner_Locked = eax_26;
004d4131      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x10000675);
004d4138      class UIElement* eax_28;
004d4138      
004d4138      if (eax_27 == 0)
004d4148          eax_28 = nullptr;
004d4138      else
004d4140          eax_28 = eax_27->vtable->DynamicCast(3);
004d4140      
004d4151      this->m_pTopRightCorner_Locked = eax_28;
004d4157      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x10000677);
004d415e      class UIElement* eax_30;
004d415e      
004d415e      if (eax_29 == 0)
004d416e          eax_30 = nullptr;
004d415e      else
004d4166          eax_30 = eax_29->vtable->DynamicCast(3);
004d4166      
004d4177      this->m_pBottomLeftCorner_Locked = eax_30;
004d417d      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x10000679);
004d4184      class UIElement* eax_32;
004d4184      
004d4184      if (eax_31 == 0)
004d4194          eax_32 = nullptr;
004d4184      else
004d418c          eax_32 = eax_31->vtable->DynamicCast(3);
004d418c      
004d4196      this->m_pBottomRightCorner_Locked = eax_32;
004d419c      class GlobalEventHandler* eax_33 = GlobalEventHandler::GetGlobalEventHandler();
004d419c      
004d41a5      if (eax_33 != 0)
004d41a5      {
004d41a7          eax_33->vtable->RegisterNoticeHandler(0x4dd1e7, &this->vtable);
004d41bb          eax_33->vtable->RegisterNoticeHandler(0x4dd1ed, &this->vtable);
004d41c8          eax_33->vtable->RegisterNoticeHandler(0x4dd1ee, &this->vtable);
004d41d5          eax_33->vtable->RegisterNoticeHandler(0x4dd1ef, &this->vtable);
004d41e2          eax_33->vtable->RegisterNoticeHandler(0x4dd255, &this->vtable);
004d41ef          eax_33->vtable->RegisterNoticeHandler(0x186a8, &this->vtable);
004d41fc          eax_33->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004d41a5      }
004d41a5      
004d420e      UIListener::RegisterForGlobalMessage(this, 0xd);
004d4219      /* jump -> this->vtable->UpdateFromPlayerModule */
004d3f20  }

004d421f                                                                                               90                                 .

004d4220  void __thiscall gmFloatyExaminationUI::ListenToGlobalMessage(class gmFloatyExaminationUI* this, uint32_t arg2, int32_t arg3)

004d4220  {
004d422b      if (arg2 == 0xd)
004d422d          gmFloatyExaminationUI::UpdateLockedStatus(this);
004d422d      
004d423a      gmExaminationUI::ListenToGlobalMessage(this, arg2, arg3);
004d4220  }

004d4244              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d4250  void __fastcall gmFloatyExaminationUI::UpdateFromPlayerModule(class gmFloatyExaminationUI* this)

004d4250  {
004d4260      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004d4271      int32_t* var_28 = nullptr;
004d4275      int32_t* var_24 = nullptr;
004d4288      int32_t var_2c;
004d4288      
004d4288      if ((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0))
004d4291          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d4291      
004d42b2      if ((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0))
004d42bb          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d42bb      
004d42c7      if (((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0) && CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0))
004d42c7      {
004d42eb          uint32_t m_eWindowID_1 = this->m_eWindowID;
004d42fe          int32_t var_8 = 0;
004d4302          int32_t* var_4_1 = nullptr;
004d4306          int32_t var_10 = 0;
004d430a          int32_t* var_c_1 = nullptr;
004d4315          int32_t var_30;
004d4315          
004d4315          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004d4367              this->vtable->MoveTo(var_2c, var_30);
004d4367          
004d4370          uint32_t m_eWindowID = this->m_eWindowID;
004d4383          int32_t var_18 = 0;
004d4387          int32_t* var_14_1 = nullptr;
004d438b          int32_t var_20 = 0;
004d438f          int32_t* var_1c_1 = nullptr;
004d438f          
004d439a          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004d43ec              this->vtable->ResizeTo(var_30, var_2c);
004d43ec          
004d43f9          BaseProperty::~BaseProperty(&var_20);
004d4402          BaseProperty::~BaseProperty(&var_18);
004d440b          BaseProperty::~BaseProperty(&var_10);
004d4414          BaseProperty::~BaseProperty(&var_8);
004d42c7      }
004d42c7      
004d441b      gmFloatyExaminationUI::UpdateLockedStatus(this);
004d4420      int32_t* eax_18 = var_28;
004d4420      
004d4426      if (eax_18 != 0)
004d4426      {
004d4430          int32_t esi_2 = (eax_18[1] - 1);
004d442d          eax_18[1] = esi_2;
004d442d          
004d4437          if (esi_2 == 0)
004d443d              **(uint32_t**)eax_18(1);
004d443d          
004d443f          var_28 = nullptr;
004d4426      }
004d4426      
004d4449      if (var_24 != 0)
004d4449      {
004d4453          int32_t esi_4 = (var_24[1] - 1);
004d4450          var_24[1] = esi_4;
004d4450          
004d445a          if (esi_4 == 0)
004d4460              **(uint32_t**)var_24(1);
004d4449      }
004d4250  }

004d4469                             90 90 90 90 90 90 90                                                           .......

004d4470  void __thiscall gmFloatyExaminationUI::ResizeTo(class gmFloatyExaminationUI* this, int32_t const arg2, int32_t const arg3)

004d4470  {
004d4483      UIElement::ResizeTo(this, arg2, arg3);
004d4483      
004d4492      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d4492      {
004d44b7          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d44ba          int32_t* var_8 = nullptr;
004d44be          int32_t* var_4_1 = nullptr;
004d44c2          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004d44c9          int32_t eax_3 = UIRegion::GetWidth(this);
004d44c9          
004d44d4          if (var_4_1 != 0)
004d44d4          {
004d44da              BaseProperty::CheckCopyOnWrite(&var_8);
004d44e6              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_3);
004d44d4          }
004d44d4          
004d44fa          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_8);
004d4508          int32_t* var_10 = nullptr;
004d450c          int32_t* var_c_1 = nullptr;
004d4510          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004d4517          int32_t eax_4 = UIRegion::GetHeight(this);
004d4517          
004d4522          if (var_c_1 != 0)
004d4522          {
004d4528              BaseProperty::CheckCopyOnWrite(&var_10);
004d4534              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_4);
004d4522          }
004d4522          
004d4545          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_10);
004d454a          int32_t* eax_5 = var_10;
004d454a          
004d4552          if (eax_5 != 0)
004d4552          {
004d455c              int32_t esi_2 = (eax_5[1] - 1);
004d4559              eax_5[1] = esi_2;
004d4559              
004d4563              if (esi_2 == 0)
004d4569                  **(uint32_t**)eax_5(1);
004d4569              
004d456b              var_10 = nullptr;
004d4552          }
004d4552          
004d4575          if (var_c_1 != 0)
004d4575          {
004d457f              int32_t esi_4 = (var_c_1[1] - 1);
004d457c              var_c_1[1] = esi_4;
004d457c              
004d4586              if (esi_4 == 0)
004d458c                  **(uint32_t**)var_c_1(1);
004d458c              
004d458e              int32_t var_c_2 = 0;
004d4575          }
004d4575          
004d4592          int32_t* eax_10 = var_8;
004d4592          
004d4598          if (eax_10 != 0)
004d4598          {
004d45a2              int32_t esi_6 = (eax_10[1] - 1);
004d459f              eax_10[1] = esi_6;
004d459f              
004d45a9              if (esi_6 == 0)
004d45af                  **(uint32_t**)eax_10(1);
004d45af              
004d45b1              var_8 = nullptr;
004d4598          }
004d4598          
004d45bb          if (var_4_1 != 0)
004d45bb          {
004d45c5              int32_t esi_8 = (var_4_1[1] - 1);
004d45c2              var_4_1[1] = esi_8;
004d45c2              
004d45cc              if (esi_8 == 0)
004d45d2                  **(uint32_t**)var_4_1(1);
004d45bb          }
004d4492      }
004d4470  }

004d45dc                                                                                      90 90 90 90                              ....

004d45e0  void __thiscall gmFloatyExaminationUI::MoveTo(class gmFloatyExaminationUI* this, int32_t const arg2, int32_t const arg3)

004d45e0  {
004d45e4      int32_t const ebx = arg2;
004d45ef      int32_t const edi = arg3;
004d45ef      
004d45fd      if (this->vtable->GetParent() != 0)
004d45fd      {
004d4623          if (ebx > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
004d463f              ebx = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
004d463f          
004d4643          if (ebx < 0)
004d4645              ebx = 0;
004d4645          
004d4667          if (arg3 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
004d4683              edi = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
004d4683          
004d4689          if (edi < 0)
004d468b              edi = 0;
004d45fd      }
004d45fd      
004d4691      UIElement::MoveTo(this, ebx, edi);
004d46a6      class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d46a9      int32_t* var_8 = nullptr;
004d46ad      int32_t* var_4 = nullptr;
004d46b1      BaseProperty::SetPropertyName(&var_8, 0x10000086);
004d46ba      int32_t m_x0 = this->m_box.m_x0;
004d46ba      
004d46bd      if (var_4 != 0)
004d46bd      {
004d46c3          BaseProperty::CheckCopyOnWrite(&var_8);
004d46cf          *(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(m_x0);
004d46bd      }
004d46bd      
004d46e3      PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_8);
004d46f1      int32_t* var_10 = nullptr;
004d46f5      int32_t* var_c = nullptr;
004d46f9      BaseProperty::SetPropertyName(&var_10, 0x10000087);
004d4702      int32_t m_y0 = this->m_box.m_y0;
004d4702      
004d4708      if (var_c != 0)
004d4708      {
004d470e          BaseProperty::CheckCopyOnWrite(&var_10);
004d471a          *(uint32_t*)(*(uint32_t*)var_c + 0x7c)(m_y0);
004d4708      }
004d4708      
004d472b      PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_10);
004d4730      int32_t* eax_18 = var_10;
004d4730      
004d4736      if (eax_18 != 0)
004d4736      {
004d4740          int32_t esi_2 = (eax_18[1] - 1);
004d473d          eax_18[1] = esi_2;
004d473d          
004d4747          if (esi_2 == 0)
004d474d              **(uint32_t**)eax_18(1);
004d474d          
004d474f          var_10 = nullptr;
004d4736      }
004d4736      
004d4759      if (var_c != 0)
004d4759      {
004d4763          int32_t esi_4 = (var_c[1] - 1);
004d4760          var_c[1] = esi_4;
004d4760          
004d476a          if (esi_4 == 0)
004d4770              **(uint32_t**)var_c(1);
004d4770          
004d4772          int32_t var_c_1 = 0;
004d4759      }
004d4759      
004d4776      int32_t* eax_23 = var_8;
004d4776      
004d477c      if (eax_23 != 0)
004d477c      {
004d4786          int32_t esi_6 = (eax_23[1] - 1);
004d4783          eax_23[1] = esi_6;
004d4783          
004d478d          if (esi_6 == 0)
004d4793              **(uint32_t**)eax_23(1);
004d4793          
004d4795          var_8 = nullptr;
004d477c      }
004d477c      
004d479f      if (var_4 != 0)
004d479f      {
004d47a9          int32_t esi_8 = (var_4[1] - 1);
004d47a6          var_4[1] = esi_8;
004d47a6          
004d47b0          if (esi_8 == 0)
004d47b6              **(uint32_t**)var_4(1);
004d479f      }
004d45e0  }

004d47c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d47d0  void __thiscall gmFloatyEnvPanelUI::gmFloatyEnvPanelUI(class gmFloatyEnvPanelUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d47d0  {
004d47df      gmEnvPanelUI::gmEnvPanelUI(this, arg2, arg3);
004d47e6      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004d484c      this->vtable = 0x7bc650;
004d4852      this->vtable = &gmFloatyEnvPanelUI::`vftable';
004d47d0  }

004d4862        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d4870  class UIElement* __thiscall gmFloatyEnvPanelUI::DynamicCast(class gmFloatyEnvPanelUI* this, uint32_t arg2) __pure

004d4870  {
004d4884      if ((arg2 == 0x1000004e || arg2 == 0x10000033))
004d4891          return this;
004d4891      
004d488b      int32_t edx_1;
004d488b      edx_1 = arg2 != 3;
004d488f      return (this & (edx_1 - 1));
004d4870  }

004d4894                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d48a0  uint32_t gmFloatyEnvPanelUI::GetUIElementType(class gmFloatyEnvPanelUI const* this @ ecx) __pure

004d48a0  {
004d48a5      return 0x1000004e;
004d48a0  }

004d48a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d48b0  class UIElement* gmFloatyEnvPanelUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d48b0  {
004d48b5      void* eax = operator new(0x654);
004d48b5      
004d48bf      if (eax == 0)
004d48d5          return 0;
004d48d5      
004d48d2      return gmFloatyEnvPanelUI::gmFloatyEnvPanelUI(eax, arg1, arg2);
004d48b0  }

004d48d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d48e0  enum UIElementMessageListenResult __thiscall gmFloatyCombatPanelUI::ListenToElementMessage(class gmFloatyCombatPanelUI* this, struct UIElementMessageInfo const* arg2)

004d48e0  {
004d48e0      /* tailcall */
004d48e0      return gmCombatPanelUI::ListenToElementMessage(this, arg2);
004d48e0  }

004d48e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004d48f0  void __fastcall gmFloatyCombatPanelUI::UpdateLockedStatus(class gmFloatyCombatPanelUI* this)

004d48f0  {
004d4900      bool cond:0 = PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0;
004d4902      class UIElement* m_pTopBorder = this->m_pTopBorder;
004d4902      
004d4908      if (!(cond:0))
004d4908      {
004d490e          m_pTopBorder->vtable->SetVisible(0);
004d4915          this->m_pTopBorder->vtable->SetVisible(0);
004d4922          this->m_pLeftBorder->vtable->SetVisible(0);
004d492f          this->m_pBottomBorder->vtable->SetVisible(0);
004d493c          this->m_pRightBorder->vtable->SetVisible(0);
004d4949          this->m_pTopLeftCorner->vtable->SetVisible(0);
004d4956          this->m_pTopRightCorner->vtable->SetVisible(0);
004d4963          this->m_pBottomLeftCorner->vtable->SetVisible(0);
004d4970          this->m_pBottomRightCorner->vtable->SetVisible(0);
004d497d          this->m_pTopBorder_Locked->vtable->SetVisible(1);
004d498a          this->m_pLeftBorder_Locked->vtable->SetVisible(1);
004d4997          this->m_pBottomBorder_Locked->vtable->SetVisible(1);
004d49a4          this->m_pRightBorder_Locked->vtable->SetVisible(1);
004d49b1          this->m_pTopLeftCorner_Locked->vtable->SetVisible(1);
004d49be          this->m_pTopRightCorner_Locked->vtable->SetVisible(1);
004d49cb          this->m_pBottomLeftCorner_Locked->vtable->SetVisible(1);
004d49d8          this->m_pBottomRightCorner_Locked->vtable->SetVisible(1);
004d49e6          return;
004d4908      }
004d4908      
004d49e7      m_pTopBorder->vtable->SetVisible(1);
004d49ee      this->m_pTopBorder->vtable->SetVisible(1);
004d49fb      this->m_pLeftBorder->vtable->SetVisible(1);
004d4a08      this->m_pBottomBorder->vtable->SetVisible(1);
004d4a15      this->m_pRightBorder->vtable->SetVisible(1);
004d4a22      this->m_pTopLeftCorner->vtable->SetVisible(1);
004d4a2f      this->m_pTopRightCorner->vtable->SetVisible(1);
004d4a3c      this->m_pBottomLeftCorner->vtable->SetVisible(1);
004d4a49      this->m_pBottomRightCorner->vtable->SetVisible(1);
004d4a56      this->m_pTopBorder_Locked->vtable->SetVisible(0);
004d4a63      this->m_pLeftBorder_Locked->vtable->SetVisible(0);
004d4a70      this->m_pBottomBorder_Locked->vtable->SetVisible(0);
004d4a7d      this->m_pRightBorder_Locked->vtable->SetVisible(0);
004d4a8a      this->m_pTopLeftCorner_Locked->vtable->SetVisible(0);
004d4a97      this->m_pTopRightCorner_Locked->vtable->SetVisible(0);
004d4aa4      this->m_pBottomLeftCorner_Locked->vtable->SetVisible(0);
004d4ab1      this->m_pBottomRightCorner_Locked->vtable->SetVisible(0);
004d48f0  }


004d4ac0  void* __thiscall gmFloatyEnvPanelUI::`scalar deleting destructor'(class gmFloatyEnvPanelUI* this, uint32_t arg2)

004d4ac0  {
004d4ac3      this->vtable = 0x7bc650;
004d4ac9      this->vtable = &gmFloatyEnvPanelUI::`vftable';
004d4ad3      gmEnvPanelUI::~gmEnvPanelUI(this);
004d4ad3      
004d4add      if ((arg2 & 1) != 0)
004d4ae0          operator delete(this);
004d4ae0      
004d4aeb      return this;
004d4ac0  }

004d4aee                                            90 90                                                                ..

004d4af0  void gmFloatyEnvPanelUI::Register()

004d4af0  {
004d4afa      UIElement::RegisterElementClass(0x1000004e, gmFloatyEnvPanelUI::Create);
004d4af0  }

004d4b03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d4b10  void __thiscall gmFloatyEnvPanelUI::PostInit(class gmFloatyEnvPanelUI* this)

004d4b10  {
004d4b14      gmEnvPanelUI::PostInit(this);
004d4b27      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d4b33      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x1000066c);
004d4b3a      class UIElement* eax_2;
004d4b3a      
004d4b3a      if (eax_1 == 0)
004d4b4a          eax_2 = nullptr;
004d4b3a      else
004d4b42          eax_2 = eax_1->vtable->DynamicCast(2);
004d4b42      
004d4b53      this->m_pTopBorder = eax_2;
004d4b59      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x1000066e);
004d4b60      class UIElement* eax_4;
004d4b60      
004d4b60      if (eax_3 == 0)
004d4b70          eax_4 = nullptr;
004d4b60      else
004d4b68          eax_4 = eax_3->vtable->DynamicCast(9);
004d4b68      
004d4b79      this->m_pLeftBorder = eax_4;
004d4b7f      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x10000670);
004d4b86      class UIElement* eax_6;
004d4b86      
004d4b86      if (eax_5 == 0)
004d4b96          eax_6 = nullptr;
004d4b86      else
004d4b8e          eax_6 = eax_5->vtable->DynamicCast(2);
004d4b8e      
004d4b9f      this->m_pBottomBorder = eax_6;
004d4ba5      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x10000672);
004d4bac      class UIElement* eax_8;
004d4bac      
004d4bac      if (eax_7 == 0)
004d4bbc          eax_8 = nullptr;
004d4bac      else
004d4bb4          eax_8 = eax_7->vtable->DynamicCast(9);
004d4bb4      
004d4bc5      this->m_pRightBorder = eax_8;
004d4bcb      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x1000066b);
004d4bd2      class UIElement* eax_10;
004d4bd2      
004d4bd2      if (eax_9 == 0)
004d4be2          eax_10 = nullptr;
004d4bd2      else
004d4bda          eax_10 = eax_9->vtable->DynamicCast(9);
004d4bda      
004d4beb      this->m_pTopLeftCorner = eax_10;
004d4bf1      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x1000066d);
004d4bf8      class UIElement* eax_12;
004d4bf8      
004d4bf8      if (eax_11 == 0)
004d4c08          eax_12 = nullptr;
004d4bf8      else
004d4c00          eax_12 = eax_11->vtable->DynamicCast(9);
004d4c00      
004d4c11      this->m_pTopRightCorner = eax_12;
004d4c17      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x1000066f);
004d4c1e      class UIElement* eax_14;
004d4c1e      
004d4c1e      if (eax_13 == 0)
004d4c2e          eax_14 = nullptr;
004d4c1e      else
004d4c26          eax_14 = eax_13->vtable->DynamicCast(9);
004d4c26      
004d4c37      this->m_pBottomLeftCorner = eax_14;
004d4c3d      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x10000671);
004d4c44      class UIElement* eax_16;
004d4c44      
004d4c44      if (eax_15 == 0)
004d4c54          eax_16 = nullptr;
004d4c44      else
004d4c4c          eax_16 = eax_15->vtable->DynamicCast(9);
004d4c4c      
004d4c5d      this->m_pBottomRightCorner = eax_16;
004d4c63      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x10000664);
004d4c6a      class UIElement* eax_18;
004d4c6a      
004d4c6a      if (eax_17 == 0)
004d4c7a          eax_18 = nullptr;
004d4c6a      else
004d4c72          eax_18 = eax_17->vtable->DynamicCast(3);
004d4c72      
004d4c83      this->m_pTopBorder_Locked = eax_18;
004d4c89      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x10000666);
004d4c90      class UIElement* eax_20;
004d4c90      
004d4c90      if (eax_19 == 0)
004d4ca0          eax_20 = nullptr;
004d4c90      else
004d4c98          eax_20 = eax_19->vtable->DynamicCast(3);
004d4c98      
004d4ca9      this->m_pLeftBorder_Locked = eax_20;
004d4caf      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x10000668);
004d4cb6      class UIElement* eax_22;
004d4cb6      
004d4cb6      if (eax_21 == 0)
004d4cc6          eax_22 = nullptr;
004d4cb6      else
004d4cbe          eax_22 = eax_21->vtable->DynamicCast(3);
004d4cbe      
004d4ccf      this->m_pBottomBorder_Locked = eax_22;
004d4cd5      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x1000066a);
004d4cdc      class UIElement* eax_24;
004d4cdc      
004d4cdc      if (eax_23 == 0)
004d4cec          eax_24 = nullptr;
004d4cdc      else
004d4ce4          eax_24 = eax_23->vtable->DynamicCast(3);
004d4ce4      
004d4cf5      this->m_pRightBorder_Locked = eax_24;
004d4cfb      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x10000663);
004d4d02      class UIElement* eax_26;
004d4d02      
004d4d02      if (eax_25 == 0)
004d4d12          eax_26 = nullptr;
004d4d02      else
004d4d0a          eax_26 = eax_25->vtable->DynamicCast(3);
004d4d0a      
004d4d1b      this->m_pTopLeftCorner_Locked = eax_26;
004d4d21      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x10000665);
004d4d28      class UIElement* eax_28;
004d4d28      
004d4d28      if (eax_27 == 0)
004d4d38          eax_28 = nullptr;
004d4d28      else
004d4d30          eax_28 = eax_27->vtable->DynamicCast(3);
004d4d30      
004d4d41      this->m_pTopRightCorner_Locked = eax_28;
004d4d47      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x10000667);
004d4d4e      class UIElement* eax_30;
004d4d4e      
004d4d4e      if (eax_29 == 0)
004d4d5e          eax_30 = nullptr;
004d4d4e      else
004d4d56          eax_30 = eax_29->vtable->DynamicCast(3);
004d4d56      
004d4d67      this->m_pBottomLeftCorner_Locked = eax_30;
004d4d6d      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x10000669);
004d4d74      class UIElement* eax_32;
004d4d74      
004d4d74      if (eax_31 == 0)
004d4d84          eax_32 = nullptr;
004d4d74      else
004d4d7c          eax_32 = eax_31->vtable->DynamicCast(3);
004d4d7c      
004d4d86      this->m_pBottomRightCorner_Locked = eax_32;
004d4d8c      class GlobalEventHandler* eax_33 = GlobalEventHandler::GetGlobalEventHandler();
004d4d8c      
004d4d95      if (eax_33 != 0)
004d4d95      {
004d4d97          eax_33->vtable->RegisterNoticeHandler(0x4dd1f8, &this->vtable);
004d4dab          eax_33->vtable->RegisterNoticeHandler(0x4dd1fb, &this->vtable);
004d4db8          eax_33->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004d4d95      }
004d4d95      
004d4dca      UIListener::RegisterForGlobalMessage(this, 0xd);
004d4dd5      /* jump -> this->vtable->UpdateFromPlayerModule */
004d4b10  }

004d4ddb                                                                                   90 90 90 90 90                             .....

004d4de0  void __thiscall gmFloatyCombatPanelUI::ListenToGlobalMessage(class gmFloatyCombatPanelUI* this, uint32_t arg2, int32_t arg3)

004d4de0  {
004d4deb      if (arg2 == 0xd)
004d4ded          gmFloatyCombatPanelUI::UpdateLockedStatus(this);
004d4ded      
004d4dfa      NoticeHandler::RecvNotice_DisplayWeenieError(this, arg2, arg3);
004d4de0  }

004d4e04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d4e10  void __fastcall gmFloatyCombatPanelUI::UpdateFromPlayerModule(class gmFloatyCombatPanelUI* this)

004d4e10  {
004d4e20      struct PlayerModule::VTable** edi = &CPlayerSystem::GetPlayerSystem()->playerModule.vtable;
004d4e31      int32_t* var_28 = nullptr;
004d4e35      int32_t* var_24 = nullptr;
004d4e48      int32_t var_2c;
004d4e48      
004d4e48      if ((PlayerModule::InqOption(edi, 0x10000080, &var_28) != 0 && var_24 != 0))
004d4e51          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d4e51      
004d4e72      if ((PlayerModule::InqOption(edi, 0x10000081, &var_28) != 0 && var_24 != 0))
004d4e7b          *(uint32_t*)(*(uint32_t*)var_24 + 0x88)(&var_2c);
004d4e7b      
004d4e87      if (((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0) && CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0))
004d4e87      {
004d4eab          uint32_t m_eWindowID_1 = this->m_eWindowID;
004d4ebe          int32_t var_8 = 0;
004d4ec2          int32_t* var_4_1 = nullptr;
004d4ec6          int32_t var_10 = 0;
004d4eca          int32_t* var_c_1 = nullptr;
004d4ed5          int32_t var_30;
004d4ed5          
004d4ed5          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID_1, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_2c) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_30) != 0))
004d4f27              this->vtable->MoveTo(var_2c, var_30);
004d4f27          
004d4f30          uint32_t m_eWindowID = this->m_eWindowID;
004d4f43          int32_t var_18 = 0;
004d4f47          int32_t* var_14_1 = nullptr;
004d4f4b          int32_t var_20 = 0;
004d4f4f          int32_t* var_1c_1 = nullptr;
004d4f4f          
004d4f5a          if ((((PlayerModule::InqChatWindowOption(edi, m_eWindowID, 0x10000088, &var_18) != 0 && (PlayerModule::InqChatWindowOption(edi, this->m_eWindowID, 0x10000089, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_30) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_2c) != 0))
004d4fac              this->vtable->ResizeTo(var_30, var_2c);
004d4fac          
004d4fb9          BaseProperty::~BaseProperty(&var_20);
004d4fc2          BaseProperty::~BaseProperty(&var_18);
004d4fcb          BaseProperty::~BaseProperty(&var_10);
004d4fd4          BaseProperty::~BaseProperty(&var_8);
004d4e87      }
004d4e87      
004d4fdb      gmFloatyCombatPanelUI::UpdateLockedStatus(this);
004d4fe0      int32_t* eax_18 = var_28;
004d4fe0      
004d4fe6      if (eax_18 != 0)
004d4fe6      {
004d4ff0          int32_t esi_2 = (eax_18[1] - 1);
004d4fed          eax_18[1] = esi_2;
004d4fed          
004d4ff7          if (esi_2 == 0)
004d4ffd              **(uint32_t**)eax_18(1);
004d4ffd          
004d4fff          var_28 = nullptr;
004d4fe6      }
004d4fe6      
004d5009      if (var_24 != 0)
004d5009      {
004d5013          int32_t esi_4 = (var_24[1] - 1);
004d5010          var_24[1] = esi_4;
004d5010          
004d501a          if (esi_4 == 0)
004d5020              **(uint32_t**)var_24(1);
004d5009      }
004d4e10  }

004d5029                             90 90 90 90 90 90 90                                                           .......

004d5030  void __thiscall gmFloatyCombatPanelUI::ResizeTo(class gmFloatyCombatPanelUI* this, int32_t const arg2, int32_t const arg3)

004d5030  {
004d5045      UIElement::ResizeTo(this, arg2, arg3);
004d505c      class CPlayerModule* edi_1 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d505f      int32_t* var_8 = nullptr;
004d5063      int32_t* var_4 = nullptr;
004d5067      BaseProperty::SetPropertyName(&var_8, 0x10000088);
004d506e      int32_t eax_2 = UIRegion::GetWidth(this);
004d506e      
004d5079      if (var_4 != 0)
004d5079      {
004d507f          BaseProperty::CheckCopyOnWrite(&var_8);
004d508b          *(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(eax_2);
004d5079      }
004d5079      
004d509f      PlayerModule::SetChatWindowOption(&edi_1->vtable, this->m_eWindowID, &var_8);
004d50ad      int32_t* var_10 = nullptr;
004d50b1      int32_t* var_c = nullptr;
004d50b5      BaseProperty::SetPropertyName(&var_10, 0x10000089);
004d50bc      int32_t eax_3 = UIRegion::GetHeight(this);
004d50bc      
004d50c7      if (var_c != 0)
004d50c7      {
004d50cd          BaseProperty::CheckCopyOnWrite(&var_10);
004d50d9          *(uint32_t*)(*(uint32_t*)var_c + 0x7c)(eax_3);
004d50c7      }
004d50c7      
004d50ea      PlayerModule::SetChatWindowOption(&edi_1->vtable, this->m_eWindowID, &var_10);
004d50ef      int32_t* eax_4 = var_10;
004d50ef      
004d50f5      if (eax_4 != 0)
004d50f5      {
004d50ff          int32_t esi_2 = (eax_4[1] - 1);
004d50fc          eax_4[1] = esi_2;
004d50fc          
004d5106          if (esi_2 == 0)
004d510c              **(uint32_t**)eax_4(1);
004d510c          
004d510e          var_10 = nullptr;
004d50f5      }
004d50f5      
004d5118      if (var_c != 0)
004d5118      {
004d5122          int32_t esi_4 = (var_c[1] - 1);
004d511f          var_c[1] = esi_4;
004d511f          
004d5129          if (esi_4 == 0)
004d512f              **(uint32_t**)var_c(1);
004d512f          
004d5131          int32_t var_c_1 = 0;
004d5118      }
004d5118      
004d5135      int32_t* eax_9 = var_8;
004d5135      
004d513b      if (eax_9 != 0)
004d513b      {
004d5145          int32_t esi_6 = (eax_9[1] - 1);
004d5142          eax_9[1] = esi_6;
004d5142          
004d514c          if (esi_6 == 0)
004d5152              **(uint32_t**)eax_9(1);
004d5152          
004d5154          var_8 = nullptr;
004d513b      }
004d513b      
004d515e      if (var_4 != 0)
004d515e      {
004d5168          int32_t esi_8 = (var_4[1] - 1);
004d5165          var_4[1] = esi_8;
004d5165          
004d516f          if (esi_8 == 0)
004d5175              **(uint32_t**)var_4(1);
004d515e      }
004d5030  }

004d5181     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004d5190  void __thiscall gmFloatyCombatPanelUI::MoveTo(class gmFloatyCombatPanelUI* this, int32_t const arg2, int32_t const arg3)

004d5190  {
004d5194      int32_t const ebx = arg2;
004d519f      int32_t const edi = arg3;
004d519f      
004d51ad      if (this->vtable->GetParent() != 0)
004d51ad      {
004d51d3          if (ebx > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
004d51ef              ebx = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
004d51ef          
004d51f3          if (ebx < 0)
004d51f5              ebx = 0;
004d51f5          
004d5217          if (arg3 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
004d5233              edi = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
004d5233          
004d5239          if (edi < 0)
004d523b              edi = 0;
004d51ad      }
004d51ad      
004d5241      UIElement::MoveTo(this, ebx, edi);
004d5241      
004d524c      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d524c      {
004d526f          class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d5272          int32_t* var_8 = nullptr;
004d5276          int32_t* var_4_1 = nullptr;
004d527a          BaseProperty::SetPropertyName(&var_8, 0x10000086);
004d5283          int32_t m_x0 = this->m_box.m_x0;
004d5283          
004d5286          if (var_4_1 != 0)
004d5286          {
004d528c              BaseProperty::CheckCopyOnWrite(&var_8);
004d5298              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(m_x0);
004d5286          }
004d5286          
004d52ac          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_8);
004d52ba          int32_t* var_10 = nullptr;
004d52be          int32_t* var_c_1 = nullptr;
004d52c2          BaseProperty::SetPropertyName(&var_10, 0x10000087);
004d52cb          int32_t m_y0 = this->m_box.m_y0;
004d52cb          
004d52d1          if (var_c_1 != 0)
004d52d1          {
004d52d7              BaseProperty::CheckCopyOnWrite(&var_10);
004d52e3              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(m_y0);
004d52d1          }
004d52d1          
004d52f4          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_10);
004d52f9          int32_t* eax_19 = var_10;
004d52f9          
004d52ff          if (eax_19 != 0)
004d52ff          {
004d5309              int32_t esi_2 = (eax_19[1] - 1);
004d5306              eax_19[1] = esi_2;
004d5306              
004d5310              if (esi_2 == 0)
004d5316                  **(uint32_t**)eax_19(1);
004d5316              
004d5318              var_10 = nullptr;
004d52ff          }
004d52ff          
004d5322          if (var_c_1 != 0)
004d5322          {
004d532c              int32_t esi_4 = (var_c_1[1] - 1);
004d5329              var_c_1[1] = esi_4;
004d5329              
004d5333              if (esi_4 == 0)
004d5339                  **(uint32_t**)var_c_1(1);
004d5339              
004d533b              int32_t var_c_2 = 0;
004d5322          }
004d5322          
004d533f          int32_t* eax_24 = var_8;
004d533f          
004d5345          if (eax_24 != 0)
004d5345          {
004d534f              int32_t esi_6 = (eax_24[1] - 1);
004d534c              eax_24[1] = esi_6;
004d534c              
004d5356              if (esi_6 == 0)
004d535c                  **(uint32_t**)eax_24(1);
004d535c              
004d535e              var_8 = nullptr;
004d5345          }
004d5345          
004d5368          if (var_4_1 != 0)
004d5368          {
004d5372              int32_t esi_8 = (var_4_1[1] - 1);
004d536f              var_4_1[1] = esi_8;
004d536f              
004d5379              if (esi_8 == 0)
004d537f                  **(uint32_t**)var_4_1(1);
004d5368          }
004d524c      }
004d5190  }

004d538b                                   90 90 90 90 90                                                             .....

004d5390  void __thiscall gmFloatyCombatPanelUI::gmFloatyCombatPanelUI(class gmFloatyCombatPanelUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d5390  {
004d539f      gmCombatPanelUI::gmCombatPanelUI(this, arg2, arg3);
004d53a6      __builtin_memset(&this->m_eWindowID, 0, 0x44);
004d540c      this->vtable = 0x7bcb28;
004d5412      this->vtable = &gmFloatyCombatPanelUI::`vftable';
004d5390  }

004d5422        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d5430  class UIElement* __thiscall gmFloatyCombatPanelUI::DynamicCast(class gmFloatyCombatPanelUI* this, uint32_t arg2) __pure

004d5430  {
004d5444      if ((arg2 == 0x10000054 || arg2 == 0x10000055))
004d5451          return this;
004d5451      
004d544b      int32_t edx_1;
004d544b      edx_1 = arg2 != 3;
004d544f      return (this & (edx_1 - 1));
004d5430  }

004d5454                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d5460  uint32_t gmFloatyCombatPanelUI::GetUIElementType(class gmFloatyCombatPanelUI const* this @ ecx) __pure

004d5460  {
004d5465      return 0x10000054;
004d5460  }

004d5466                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d5470  class UIElement* gmFloatyCombatPanelUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d5470  {
004d5475      void* eax = operator new(0x654);
004d5475      
004d547f      if (eax == 0)
004d5495          return 0;
004d5495      
004d5492      return gmFloatyCombatPanelUI::gmFloatyCombatPanelUI(eax, arg1, arg2);
004d5470  }

004d5496                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d54a0  void* __thiscall gmFloatyCombatPanelUI::`scalar deleting destructor'(class gmFloatyCombatPanelUI* this, uint32_t arg2)

004d54a0  {
004d54a3      this->vtable = 0x7bcb28;
004d54a9      this->vtable = &gmFloatyCombatPanelUI::`vftable';
004d54b3      gmCombatPanelUI::~gmCombatPanelUI(this);
004d54b3      
004d54bd      if ((arg2 & 1) != 0)
004d54c0          operator delete(this);
004d54c0      
004d54cb      return this;
004d54a0  }

004d54ce                                            90 90                                                                ..

004d54d0  void gmFloatyCombatPanelUI::Register()

004d54d0  {
004d54da      UIElement::RegisterElementClass(0x10000054, gmFloatyCombatPanelUI::Create);
004d54d0  }

004d54e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d54f0  void __thiscall gmFloatyCombatPanelUI::PostInit(class gmFloatyCombatPanelUI* this)

004d54f0  {
004d54f4      gmCombatPanelUI::PostInit(this);
004d5507      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d5513      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x100006ae);
004d551a      class UIElement* eax_2;
004d551a      
004d551a      if (eax_1 == 0)
004d552a          eax_2 = nullptr;
004d551a      else
004d5522          eax_2 = eax_1->vtable->DynamicCast(2);
004d5522      
004d5533      this->m_pTopBorder = eax_2;
004d5539      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x100006b0);
004d5540      class UIElement* eax_4;
004d5540      
004d5540      if (eax_3 == 0)
004d5550          eax_4 = nullptr;
004d5540      else
004d5548          eax_4 = eax_3->vtable->DynamicCast(9);
004d5548      
004d5559      this->m_pLeftBorder = eax_4;
004d555f      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100006b2);
004d5566      class UIElement* eax_6;
004d5566      
004d5566      if (eax_5 == 0)
004d5576          eax_6 = nullptr;
004d5566      else
004d556e          eax_6 = eax_5->vtable->DynamicCast(9);
004d556e      
004d557f      this->m_pBottomBorder = eax_6;
004d5585      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x100006b4);
004d558c      class UIElement* eax_8;
004d558c      
004d558c      if (eax_7 == 0)
004d559c          eax_8 = nullptr;
004d558c      else
004d5594          eax_8 = eax_7->vtable->DynamicCast(9);
004d5594      
004d55a5      this->m_pRightBorder = eax_8;
004d55ab      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x100006ad);
004d55b2      class UIElement* eax_10;
004d55b2      
004d55b2      if (eax_9 == 0)
004d55c2          eax_10 = nullptr;
004d55b2      else
004d55ba          eax_10 = eax_9->vtable->DynamicCast(9);
004d55ba      
004d55cb      this->m_pTopLeftCorner = eax_10;
004d55d1      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x100006af);
004d55d8      class UIElement* eax_12;
004d55d8      
004d55d8      if (eax_11 == 0)
004d55e8          eax_12 = nullptr;
004d55d8      else
004d55e0          eax_12 = eax_11->vtable->DynamicCast(9);
004d55e0      
004d55f1      this->m_pTopRightCorner = eax_12;
004d55f7      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x100006b1);
004d55fe      class UIElement* eax_14;
004d55fe      
004d55fe      if (eax_13 == 0)
004d560e          eax_14 = nullptr;
004d55fe      else
004d5606          eax_14 = eax_13->vtable->DynamicCast(9);
004d5606      
004d5617      this->m_pBottomLeftCorner = eax_14;
004d561d      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x100006b3);
004d5624      class UIElement* eax_16;
004d5624      
004d5624      if (eax_15 == 0)
004d5634          eax_16 = nullptr;
004d5624      else
004d562c          eax_16 = eax_15->vtable->DynamicCast(9);
004d562c      
004d563d      this->m_pBottomRightCorner = eax_16;
004d5643      class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x100006a6);
004d564a      class UIElement* eax_18;
004d564a      
004d564a      if (eax_17 == 0)
004d565a          eax_18 = nullptr;
004d564a      else
004d5652          eax_18 = eax_17->vtable->DynamicCast(3);
004d5652      
004d5663      this->m_pTopBorder_Locked = eax_18;
004d5669      class UIElement* eax_19 = UIElement::GetChildRecursive(this, 0x100006a8);
004d5670      class UIElement* eax_20;
004d5670      
004d5670      if (eax_19 == 0)
004d5680          eax_20 = nullptr;
004d5670      else
004d5678          eax_20 = eax_19->vtable->DynamicCast(3);
004d5678      
004d5689      this->m_pLeftBorder_Locked = eax_20;
004d568f      class UIElement* eax_21 = UIElement::GetChildRecursive(this, 0x100006aa);
004d5696      class UIElement* eax_22;
004d5696      
004d5696      if (eax_21 == 0)
004d56a6          eax_22 = nullptr;
004d5696      else
004d569e          eax_22 = eax_21->vtable->DynamicCast(3);
004d569e      
004d56af      this->m_pBottomBorder_Locked = eax_22;
004d56b5      class UIElement* eax_23 = UIElement::GetChildRecursive(this, 0x100006ac);
004d56bc      class UIElement* eax_24;
004d56bc      
004d56bc      if (eax_23 == 0)
004d56cc          eax_24 = nullptr;
004d56bc      else
004d56c4          eax_24 = eax_23->vtable->DynamicCast(3);
004d56c4      
004d56d5      this->m_pRightBorder_Locked = eax_24;
004d56db      class UIElement* eax_25 = UIElement::GetChildRecursive(this, 0x100006a5);
004d56e2      class UIElement* eax_26;
004d56e2      
004d56e2      if (eax_25 == 0)
004d56f2          eax_26 = nullptr;
004d56e2      else
004d56ea          eax_26 = eax_25->vtable->DynamicCast(3);
004d56ea      
004d56fb      this->m_pTopLeftCorner_Locked = eax_26;
004d5701      class UIElement* eax_27 = UIElement::GetChildRecursive(this, 0x100006a7);
004d5708      class UIElement* eax_28;
004d5708      
004d5708      if (eax_27 == 0)
004d5718          eax_28 = nullptr;
004d5708      else
004d5710          eax_28 = eax_27->vtable->DynamicCast(3);
004d5710      
004d5721      this->m_pTopRightCorner_Locked = eax_28;
004d5727      class UIElement* eax_29 = UIElement::GetChildRecursive(this, 0x100006a9);
004d572e      class UIElement* eax_30;
004d572e      
004d572e      if (eax_29 == 0)
004d573e          eax_30 = nullptr;
004d572e      else
004d5736          eax_30 = eax_29->vtable->DynamicCast(3);
004d5736      
004d5747      this->m_pBottomLeftCorner_Locked = eax_30;
004d574d      class UIElement* eax_31 = UIElement::GetChildRecursive(this, 0x100006ab);
004d5754      class UIElement* eax_32;
004d5754      
004d5754      if (eax_31 == 0)
004d5764          eax_32 = nullptr;
004d5754      else
004d575c          eax_32 = eax_31->vtable->DynamicCast(3);
004d575c      
004d5766      this->m_pBottomRightCorner_Locked = eax_32;
004d576c      class GlobalEventHandler* eax_33 = GlobalEventHandler::GetGlobalEventHandler();
004d576c      
004d5775      if (eax_33 != 0)
004d5775      {
004d5777          eax_33->vtable->RegisterNoticeHandler(0x4dd1f8, &this->vtable);
004d578b          eax_33->vtable->RegisterNoticeHandler(0x4dd1fb, &this->vtable);
004d5798          eax_33->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004d5775      }
004d5775      
004d57aa      UIListener::RegisterForGlobalMessage(this, 0xd);
004d57b5      /* jump -> this->vtable->UpdateFromPlayerModule */
004d54f0  }

004d57bb                                                                                   90 90 90 90 90                             .....

004d57c0  enum UIElementMessageListenResult __thiscall gmSpewBoxUI::ListenToElementMessage(class gmSpewBoxUI* this, struct UIElementMessageInfo const* arg2)

004d57c0  {
004d57d7      if ((arg2->idElement == 0x1000004a && arg2->idMessage == 0x10000003))
004d57e3          UIElement_ListBox::DeleteItem(this->m_listBox, arg2->pElement);
004d57e3      
004d57f2      return UIElement::ListenToElementMessage(this, arg2);
004d57c0  }

004d57f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004d5800  void __fastcall SmartArray<StringInfo,1>::Reset(class SmartArray<StringInfo,1>* this)

004d5800  {
004d580b      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004d581c      this->m_num = 0;
004d581c      
004d5823      if ((m_sizeAndDeallocate & 0x80000000) != 0x80000000)
004d5823      {
004d5874          if (this->m_data != 0)
004d5874          {
004d5876              int32_t i_3 = (m_sizeAndDeallocate & 0x7fffffff);
004d5876              
004d587c              if ((i_3 - 1) >= 0)
004d587c              {
004d5881                  int32_t esi_5 = ((i_3 - 1) * 0x90);
004d5884                  int32_t i_2 = i_3;
004d58aa                  int32_t i;
004d58aa                  
004d58aa                  do
004d58aa                  {
004d588b                      void var_90;
004d588b                      class StringInfo* eax_2 = StringInfo::StringInfo(&var_90);
004d5895                      StringInfo::operator=((this->m_data + esi_5), eax_2);
004d589e                      StringInfo::~StringInfo(&var_90);
004d58a3                      esi_5 -= 0x90;
004d58a9                      i = i_2;
004d58a9                      i_2 -= 1;
004d58aa                  } while (i != 1);
004d587c              }
004d5874          }
004d5874          
004d58b5          return;
004d5823      }
004d5823      
004d5825      class StringInfo* m_data = this->m_data;
004d5825      
004d5829      if (m_data != 0)
004d5829      {
004d582b          int32_t m_strToken = m_data->m_strToken;
004d5838          void* esi_3 = &m_data[m_strToken];
004d5838          
004d583b          if ((m_strToken - 1) >= 0)
004d583b          {
004d583d              int32_t ebx_1 = m_strToken;
004d584e              int32_t i_1;
004d584e              
004d584e              do
004d584e              {
004d5840                  esi_3 -= 0x90;
004d5848                  StringInfo::~StringInfo(esi_3);
004d584d                  i_1 = ebx_1;
004d584d                  ebx_1 -= 1;
004d584e              } while (i_1 != 1);
004d583b          }
004d583b          
004d5851          operator delete[](((char*)m_data - 4));
004d5829      }
004d5829      
004d585a      this->m_data = 0;
004d5860      this->m_sizeAndDeallocate = 0;
004d5800  }

004d58b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d58c0  void __fastcall SmartArray<StringInfo,1>::~SmartArray<StringInfo,1>(class SmartArray<StringInfo,1>* this)

004d58c0  {
004d58cd      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004d58cd      {
004d58cf          class StringInfo* m_data = this->m_data;
004d58cf          
004d58d3          if (m_data != 0)
004d58d3          {
004d58d5              int32_t m_strToken = m_data->m_strToken;
004d58e3              void* esi_3 = &m_data[m_strToken];
004d58e3              
004d58e6              if ((m_strToken - 1) >= 0)
004d58e6              {
004d58e9                  int32_t edi_1 = m_strToken;
004d58fe                  int32_t i;
004d58fe                  
004d58fe                  do
004d58fe                  {
004d58f0                      esi_3 -= 0x90;
004d58f8                      StringInfo::~StringInfo(esi_3);
004d58fd                      i = edi_1;
004d58fd                      edi_1 -= 1;
004d58fe                  } while (i != 1);
004d58e6              }
004d58e6              
004d5902              operator delete[](((char*)m_data - 4));
004d58d3          }
004d58cd      }
004d58c0  }

004d590d                                         90 90 90                                                               ...

004d5910  uint8_t __thiscall SmartArray<StringInfo,1>::grow(class SmartArray<StringInfo,1>* this, uint32_t arg2)

004d5910  {
004d5910      class SmartArray<StringInfo,1>* this_1 = this;
004d5913      uint32_t ebp = arg2;
004d591d      uint32_t* eax;
004d591d      
004d591d      if (ebp >= this->m_num)
004d591d      {
004d592d          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
004d592d          {
004d5a1e              eax = 1;
004d5a22              return 1;
004d592d          }
004d592d          
004d5935          if (ebp == 0)
004d5935          {
004d5937              SmartArray<StringInfo,1>::Reset(this);
004d593e              int32_t eax_2;
004d593e              eax_2 = 1;
004d5942              return 1;
004d5935          }
004d5935          
004d5950          eax = operator new[](((ebp * 0x90) + 4));
004d5950          
004d595a          if (eax != 0)
004d595a          {
004d5966              void* ebx_1 = &eax[1];
004d596f              *(uint32_t*)eax = ebp;
004d5971              `vector constructor iterator'(ebx_1, 0x90, ebp, StringInfo::StringInfo);
004d5971              
004d5978              if (ebx_1 != 0)
004d5978              {
004d5981                  if (this->m_data != 0)
004d5981                  {
004d5987                      uint32_t m_num = this->m_num;
004d5987                      
004d598c                      if ((m_num - 1) >= 0)
004d598c                      {
004d5991                          void* esi_2 = ((m_num - 1) * 0x90);
004d5995                          arg2 = m_num;
004d59bc                          bool cond:1_1;
004d59bc                          
004d59bc                          do
004d59bc                          {
004d59a8                              StringInfo::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
004d59b1                              esi_2 -= 0x90;
004d59b7                              cond:1_1 = arg2 != 1;
004d59b8                              arg2 -= 1;
004d59bc                          } while (cond:1_1);
004d598c                      }
004d598c                      
004d59cb                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004d59cb                      {
004d59cd                          class StringInfo* m_data = this->m_data;
004d59cd                          
004d59d1                          if (m_data != 0)
004d59d1                          {
004d59d3                              int32_t m_strToken = m_data->m_strToken;
004d59df                              void* esi_5 = &m_data[m_strToken];
004d59df                              
004d59e6                              if ((m_strToken - 1) >= 0)
004d59e6                              {
004d59e9                                  arg2 = m_strToken;
004d5a01                                  uint32_t i;
004d5a01                                  
004d5a01                                  do
004d5a01                                  {
004d59f0                                      esi_5 -= 0x90;
004d59f8                                      StringInfo::~StringInfo(esi_5);
004d59fd                                      i = arg2;
004d59fd                                      arg2 -= 1;
004d5a01                                  } while (i != 1);
004d59e6                              }
004d59e6                              
004d5a08                              operator delete[](((char*)m_data - 4));
004d59d1                          }
004d59cb                      }
004d5981                  }
004d5981                  
004d5a17                  this->m_data = ebx_1;
004d5a19                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
004d5a1e                  eax = 1;
004d5a22                  return 1;
004d5978              }
004d595a          }
004d591d      }
004d591d      
004d5a27      eax = 0;
004d5a2b      return 0;
004d5910  }

004d5a2e                                            90 90                                                                ..

004d5a30  void __thiscall gmSpewBoxUI::gmSpewBoxUI(class gmSpewBoxUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d5a30  {
004d5a3f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004d5a44      this->vtable = &gmUrgentAssistanceUI::`vftable';
004d5a50      this->vtable = 0x7bcf58;
004d5a56      this->vtable = &gmSpewBoxUI::`vftable';
004d5a60      this->m_spewBoxPending.m_data = 0;
004d5a66      this->m_spewBoxPending.m_sizeAndDeallocate = 0;
004d5a6c      this->m_spewBoxPending.m_num = 0;
004d5a30  }

004d5a78                                                                          90 90 90 90 90 90 90 90                          ........

004d5a80  class UIElement* __thiscall gmSpewBoxUI::DynamicCast(class gmSpewBoxUI* this, uint32_t arg2) __pure

004d5a80  {
004d5a8c      if (arg2 == 0x10000016)
004d5a99          return this;
004d5a99      
004d5a93      int32_t edx_1;
004d5a93      edx_1 = arg2 != 3;
004d5a97      return (this & (edx_1 - 1));
004d5a80  }

004d5a9c                                                                                      90 90 90 90                              ....

004d5aa0  uint32_t gmSpewBoxUI::GetUIElementType(class gmSpewBoxUI const* this @ ecx) __pure

004d5aa0  {
004d5aa5      return 0x10000016;
004d5aa0  }

004d5aa6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d5ab0  void __fastcall gmSpewBoxUI::PostInit(class gmSpewBoxUI* this)

004d5ab0  {
004d5ab6      UIElement::PostInit(this);
004d5abb      this->vtable->SetShouldEraseBackground(1);
004d5ac4      this->vtable->SetMouseVisible(0);
004d5ad7      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x10000049);
004d5ade      class UIElement_ListBox* eax_2;
004d5ade      
004d5ade      if (eax_1 == 0)
004d5aee          eax_2 = nullptr;
004d5ade      else
004d5ae6          eax_2 = eax_1->vtable->DynamicCast(5);
004d5ae6      
004d5af2      this->m_listBox = eax_2;
004d5af2      
004d5af8      if (eax_2 != 0)
004d5af8      {
004d5afe          eax_2->vtable->SetMouseVisible(0);
004d5b0a          class UIElement_ListBox* m_listBox = this->m_listBox;
004d5b15          int32_t* var_8 = nullptr;
004d5b1d          int32_t* var_4_1 = nullptr;
004d5b34          int32_t* ecx_5;
004d5b34          
004d5b34          if (m_listBox->vtable->InqProperty(0x10000028, &var_8) == 0)
004d5b5e              ecx_5 = var_4_1;
004d5b34          else
004d5b34          {
004d5b36              ecx_5 = var_4_1;
004d5b36              
004d5b3c              if (ecx_5 == 0)
004d5b52                  this->m_maxConcurrentItems = 1;
004d5b3c              else if (*(uint32_t*)(*(uint32_t*)ecx_5 + 0x78)(&this->m_maxConcurrentItems) != 0)
004d5b5e                  ecx_5 = var_4_1;
004d5b4c              else
004d5b4c              {
004d5b4e                  ecx_5 = var_4_1;
004d5b52                  this->m_maxConcurrentItems = 1;
004d5b4c              }
004d5b34          }
004d5b34          
004d5b62          int32_t* eax_7 = var_8;
004d5b62          
004d5b68          if (eax_7 != 0)
004d5b68          {
004d5b72              int32_t edx_5 = (eax_7[1] - 1);
004d5b6f              eax_7[1] = edx_5;
004d5b6f              
004d5b77              if (edx_5 == 0)
004d5b7d                  **(uint32_t**)eax_7(1);
004d5b7d              
004d5b7f              ecx_5 = var_4_1;
004d5b83              var_8 = nullptr;
004d5b68          }
004d5b68          
004d5b8d          if (ecx_5 != 0)
004d5b8d          {
004d5b95              int32_t edx_7 = (ecx_5[1] - 1);
004d5b92              ecx_5[1] = edx_7;
004d5b92              
004d5b9a              if (edx_7 == 0)
004d5ba0                  **(uint32_t**)ecx_5(1);
004d5b8d          }
004d5af8      }
004d5af8      
004d5ba6      UIListener::RegisterForGlobalMessage(this, 3);
004d5bab      class GlobalEventHandler* eax_11 = GlobalEventHandler::GetGlobalEventHandler();
004d5bab      
004d5bb2      if (eax_11 != 0)
004d5bb4          eax_11->vtable->RegisterNoticeHandler(0x186b6, &this->vtable);
004d5ab0  }

004d5bcc                                      90 90 90 90                                                              ....

004d5bd0  void __fastcall gmSpewBoxUI::~gmSpewBoxUI(class gmSpewBoxUI* this)

004d5bd0  {
004d5bdc      this->vtable = 0x7bcf58;
004d5bd4      this->vtable = &gmSpewBoxUI::`vftable';
004d5be8      UIListener::UnRegisterForGlobalMessage(this, 3);
004d5bed      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004d5bed      
004d5bf4      if (eax != 0)
004d5bf6          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004d5bf6      
004d5c04      this->m_listBox = nullptr;
004d5c0e      SmartArray<StringInfo,1>::~SmartArray<StringInfo,1>(&this->m_spewBoxPending);
004d5bd4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004d5c1b      NoticeHandler::~NoticeHandler(&this->vtable);
004d5c24      /* tailcall */
004d5c24      return UIElement_Field::~UIElement_Field(this);
004d5bd0  }

004d5c29                             90 90 90 90 90 90 90                                                           .......

004d5c30  class UIElement* gmSpewBoxUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d5c30  {
004d5c35      void* eax = operator new(0x610);
004d5c35      
004d5c3f      if (eax == 0)
004d5c55          return 0;
004d5c55      
004d5c52      return gmSpewBoxUI::gmSpewBoxUI(eax, arg1, arg2);
004d5c30  }

004d5c56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d5c60  void __thiscall PStringBase<unsigned short>::trim(class PStringBase<unsigned short>* this, uint8_t arg2, uint8_t arg3, class PStringBase<unsigned short> arg4)

004d5c60  {
004d5c60      class PStringBase<unsigned short>* this_1 = this;
004d5c61      int32_t eax;
004d5c61      eax = arg2;
004d5c6e      class PStringBase<unsigned short>* this_2 = this;
004d5c71      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = this_2->m_charbuffer;
004d5c76      uint32_t i = (m_charbuffer_2->m_data[0x7ffffffffffffffe] - 1);
004d5c79      class PStringBase<unsigned short>* this_3 = this_2;
004d5c79      
004d5c7d      if (eax != 0)
004d5c7d      {
004d5c81          eax = m_charbuffer_2->m_data[0];
004d5c81          
004d5c87          while (eax != 0)
004d5c87          {
004d5c9d              if (wcschr(arg4, eax) == 0)
004d5c9d                  break;
004d5c9d              
004d5c9f              eax = m_charbuffer_2->m_data[1];
004d5ca3              m_charbuffer_2 = &m_charbuffer_2->m_data[1];
004d5ca6              i -= 1;
004d5c87          }
004d5c7d      }
004d5c7d      
004d5cac      eax = arg3;
004d5cac      
004d5cb6      if ((eax != 0 && i > 0))
004d5cb6      {
004d5cb8          void* ebx = &m_charbuffer_2->m_data[(i - 1)];
004d5cb8          
004d5cda          do
004d5cda          {
004d5cc6              int32_t eax_2;
004d5cc6              eax_2 = *(uint16_t*)ebx;
004d5cc6              
004d5cd2              if (wcschr(arg4, eax_2) == 0)
004d5cd2                  break;
004d5cd2              
004d5cd4              i -= 1;
004d5cd5              ebx -= 2;
004d5cda          } while (i > 0);
004d5cda          
004d5cdc          this_2 = this_3;
004d5cb6      }
004d5cb6      
004d5ce0      class PSRefBufferCharData<unsigned short>* m_charbuffer = this_2->m_charbuffer;
004d5cec      int32_t eax_5;
004d5cec      int32_t* esi_2;
004d5cec      
004d5cec      if ((m_charbuffer_2 != m_charbuffer || i != (m_charbuffer->m_data[0x7ffffffffffffffe] - 1)))
004d5cec      {
004d5d0a          InterlockedIncrement(&m_charbuffer->m_data[-8]);
004d5d10          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this_2->m_charbuffer;
004d5d10          
004d5d18          if (m_charbuffer_1 != PStringBase<unsigned short>::s_NullBuffer)
004d5d18          {
004d5d2d              if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
004d5d35                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
004d5d35              
004d5d37              class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004d5d47              this_3->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
004d5d49              InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
004d5d4f              this_2 = this_3;
004d5d18          }
004d5d18          
004d5d55          if (i != 0)
004d5d5b              PStringBase<unsigned short>::append_n_chars(this_2, m_charbuffer_2, i);
004d5d5b          
004d5d75          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
004d5d7d              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004d5d7d          
004d5d83          esi_2 = (arg4 - 0x14);
004d5d8a          eax_5 = InterlockedDecrement(&esi_2[1]);
004d5cec      }
004d5cec      else
004d5cec      {
004d5cf2          esi_2 = (arg4 - 0x14);
004d5cf9          eax_5 = InterlockedDecrement(&esi_2[1]);
004d5cec      }
004d5cec      
004d5d92      if ((eax_5 == 0 && esi_2 != 0))
004d5d9a          **(uint32_t**)esi_2(1);
004d5c60  }

004d5da4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d5db0  void* __thiscall gmSpewBoxUI::`scalar deleting destructor'(class gmSpewBoxUI* this, uint32_t arg2)

004d5db0  {
004d5db3      gmSpewBoxUI::~gmSpewBoxUI(this);
004d5db3      
004d5dbd      if ((arg2 & 1) != 0)
004d5dc0          operator delete(this);
004d5dc0      
004d5dcb      return this;
004d5db0  }

004d5dce                                            90 90                                                                ..

004d5dd0  void gmSpewBoxUI::Register()

004d5dd0  {
004d5dda      UIElement::RegisterElementClass(0x10000016, gmSpewBoxUI::Create);
004d5dd0  }

004d5de3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d5df0  void __fastcall gmSpewBoxUI::Update(class gmSpewBoxUI* this)

004d5df0  {
004d5e01      if (this->m_listBox != 0)
004d5e01      {
004d5e0d          int32_t ebx;
004d5e0d          ebx = 0;
004d5e11          int32_t var_c_1 = 0;
004d5e11          
004d5e19          if (this->m_spewBoxPending.m_num > 0)
004d5e19          {
004d5e1f              int32_t var_10_1 = 0;
004d6001              bool cond:1_1;
004d6001              
004d6001              do
004d6001              {
004d5e42                  class UIElement* eax_2 = UIElementManager::CreateChildElementByEnum(UIElementManager::s_pInstance, nullptr, 0x10000012, 0x1000004a);
004d5e42                  
004d5e49                  if (eax_2 != 0)
004d5e49                  {
004d5e55                      class UIElement_Text* eax_3 = eax_2->vtable->DynamicCast(0xc);
004d5e55                      
004d5e5f                      if (eax_3 != 0)
004d5e5f                      {
004d5e7d                          class PStringBase<unsigned short> __return;
004d5e7d                          int32_t var_28_1 = StringInfo::GetString((this->m_spewBoxPending.m_data + var_10_1), &__return, 0);
004d5e7e                          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = PStringBase<unsigned short>::whitespace_string.m_charbuffer;
004d5e8e                          InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
004d5e9c                          PStringBase<unsigned short>::trim(&__return, 0, 1, m_charbuffer_1);
004d5ea8                          UIElement_Text::SetText(eax_3, &__return);
004d5ead                          struct UIElement_Text::VTable* vtable = eax_3->vtable;
004d5eb1                          int32_t eax_4 = UIRegion::GetHeight(eax_3);
004d5ec5                          vtable->ResizeTo(UIRegion::GetWidth(this->m_listBox), eax_4);
004d5eca                          UIElement_Text::RecalculateGlyphList(eax_3);
004d5eca                          int16_t top = (top - 1);
004d5eca                          /* unimplemented  {call UIElement_Text::RecalculateGlyphList} */;
004d5ee6                          *(uint32_t*)(eax_3->vtable + 0x30)(UIRegion::GetWidth(this->m_listBox), eax_3->m_iScrollableHeight);
004d5ee9                          class UIElement_ListBox* m_listBox = this->m_listBox;
004d5ee9                          
004d5ef6                          if (m_listBox->m_listItems.m_num >= 1)
004d5ef6                          {
004d5f09                              class UIElement* eax_9 = UIElement_ListBox::GetItem(m_listBox, 0)->vtable->DynamicCast(0xc);
004d5f09                              
004d5f15                              if (eax_9 != 0)
004d5f15                              {
004d5f23                                  class PStringBase<unsigned short> __return_1;
004d5f23                                  class PSRefBufferCharData<unsigned short>* m_charbuffer = UIElement_Text::GetText(eax_9, &__return_1)->m_charbuffer;
004d5f25                                  class PStringBase<unsigned short> __return_2 = __return;
004d5f25                                  
004d5f2f                                  if (*(uint32_t*)(__return_2 - 4) == m_charbuffer->m_data[0x7ffffffffffffffe])
004d5f2f                                  {
004d5f35                                      int32_t ecx_16 = *(uint32_t*)(__return_2 - 8);
004d5f38                                      ebx = *(int32_t*)((char*)m_charbuffer + -8);
004d5f38                                      
004d5f47                                      if (((ecx_16 == ebx || ecx_16 == 0xffffffff) || ebx == 0xffffffff))
004d5f47                                      {
004d5f4f                                          int32_t eax_11 = wcscmp(__return_2, m_charbuffer);
004d5f5a                                          ebx = -(eax_11);
004d5f5c                                          ebx = (ebx - ebx);
004d5f5e                                          ebx += 1;
004d5f47                                      }
004d5f47                                      else
004d5f49                                          ebx = 0;
004d5f2f                                  }
004d5f2f                                  else
004d5f31                                      ebx = 0;
004d5f31                                  
004d5f64                                  int32_t* ebp_2 = (__return_1 - 0x14);
004d5f64                                  
004d5f77                                  if ((InterlockedDecrement(&ebp_2[1]) == 0 && ebp_2 != 0))
004d5f80                                      **(uint32_t**)ebp_2(1);
004d5f80                                  
004d5f84                                  if (ebx != 0)
004d5f91                                      UIElement_ListBox::DeleteItem(this->m_listBox, eax_9);
004d5f15                              }
004d5ef6                          }
004d5ef6                          
004d5f9f                          UIElement_ListBox::InsertItem(this->m_listBox, eax_3, 0);
004d5fa4                          class UIElement_ListBox* m_listBox_1 = this->m_listBox;
004d5faa                          uint32_t m_num = m_listBox_1->m_listItems.m_num;
004d5faa                          
004d5fb6                          if (m_num > this->m_maxConcurrentItems)
004d5fba                              UIElement_ListBox::DeleteItem(m_listBox_1, (m_num - 1));
004d5fba                          
004d5fc3                          int32_t* esi_3 = (__return - 0x14);
004d5fca                          ebx = 1;
004d5fca                          
004d5fd8                          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004d5fe0                              **(uint32_t**)esi_3(1);
004d5e5f                      }
004d5e49                  }
004d5e49                  
004d5ff7                  cond:1_1 = (var_c_1 + 1) < this->m_spewBoxPending.m_num;
004d5ff9                  var_c_1 += 1;
004d5ffd                  var_10_1 += 0x90;
004d6001              } while (cond:1_1);
004d6001              
004d6009              if (ebx != 0)
004d6009              {
004d600b                  class UIElement_ListBox* m_listBox_2 = this->m_listBox;
004d600b                  
004d6019                  if (m_listBox_2->m_listItems.m_num != 0)
004d6019                  {
004d601d                      UIElement_ListBox::ScrollToShow(m_listBox_2, 0);
004d601d                      /* unimplemented  {call UIElement_ListBox::ScrollToShow} */;
004d6019                  }
004d6019                  
004d6022                  this->m_spewBoxPending.m_num = 0;
004d6009              }
004d5e19          }
004d5e01      }
004d5df0  }

004d5e29                             8d a4 24 00 00 00 00                                                           ..$....
004d6034                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d6040  uint8_t __thiscall SmartArray<StringInfo,1>::AddToEnd(class SmartArray<StringInfo,1>* this, class StringInfo const* arg2)

004d6040  {
004d6049      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
004d6049      
004d6050      if (this->m_num >= eax_1)
004d6050      {
004d605e          uint8_t result = SmartArray<StringInfo,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
004d605e          
004d6065          if (result == 0)
004d6068              return result;
004d6050      }
004d6050      
004d607d      StringInfo::operator=(&this->m_data[this->m_num], arg2);
004d6082      this->m_num += 1;
004d6085      class StringInfo* eax_6;
004d6085      eax_6 = 1;
004d6088      return 1;
004d6040  }

004d608b                                   90 90 90 90 90                                                             .....

004d6090  void __thiscall gmSpewBoxUI::ListenToGlobalMessage(class gmSpewBoxUI* this, uint32_t arg2, int32_t arg3)

004d6090  {
004d6095      if (arg2 == 3)
004d6097          gmSpewBoxUI::Update(this);
004d6090  }

004d609f                                                                                               90                                 .

004d60a0  void __thiscall gmSpewBoxUI::RecvNotice_DisplayFinalStringInfo(class gmSpewBoxUI* this, uint32_t arg2, class StringInfo const* arg3, class StringInfo const* arg4, uint32_t arg5)

004d60a0  {
004d60a5      if (arg2 == 0x1a)
004d60af          SmartArray<StringInfo,1>::AddToEnd(&this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable, arg3);
004d60a0  }

004d60b7                                                                       90 90 90 90 90 90 90 90 90                         .........

004d60c0  void __thiscall gmSmartBoxUI::gmSmartBoxUI(class gmSmartBoxUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d60c0  {
004d60d0      UIElement_SmartBoxWrapper::UIElement_SmartBoxWrapper(this, arg2, arg3);
004d60dd      this->vtable = &gmSmartBoxUI::`vftable';
004d60e3      this->vtable = &gmSmartBoxUI::`vftable';
004d60ed      __builtin_memset(&this->m_pSmartBox, 0, 0x14);
004d610b      __builtin_memset(&this->teleportRotationStartTime, 0, 0x3c);
004d6165      VividTargetIndicator::VividTargetIndicator(&this->m_vti);
004d616a      __builtin_memset(&this->m_eWindowID, 0, 0x24);
004d60c0  }

004d61a7                       90 90 90 90 90 90 90 90 90                                                         .........

004d61b0  class UIElement* __thiscall gmSmartBoxUI::DynamicCast(class gmSmartBoxUI* this, uint32_t arg2) __pure

004d61b0  {
004d61c4      if ((arg2 == 0x10000014 || arg2 == 0x10000030))
004d61d1          return this;
004d61d1      
004d61cb      int32_t edx_1;
004d61cb      edx_1 = arg2 != 3;
004d61cf      return (this & (edx_1 - 1));
004d61b0  }

004d61d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d61e0  uint32_t gmSmartBoxUI::GetUIElementType(class gmSmartBoxUI const* this @ ecx) __pure

004d61e0  {
004d61e5      return 0x10000014;
004d61e0  }

004d61e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d61f0  void __fastcall gmSmartBoxUI::~gmSmartBoxUI(class gmSmartBoxUI* this)

004d61f0  {
004d61fa      bool cond:0 = this->teleportAnimState == TAS_OFF;
004d6202      this->vtable = &gmSmartBoxUI::`vftable';
004d61fc      this->vtable = &gmSmartBoxUI::`vftable';
004d61fc      
004d620e      if (!(cond:0))
004d6210          this->teleportAnimState = TAS_OFF;
004d6210      
004d621a      class UIElement_Viewport* m_pPortalSpace = this->m_pPortalSpace;
004d621a      
004d6222      if (m_pPortalSpace != 0)
004d622a          CreatureMode::RemoveAllObjects(&m_pPortalSpace->creature_mode_objects);
004d622a      
004d622f      class CPhysicsObj* teleportObj = this->teleportObj;
004d622f      
004d6237      if (teleportObj != 0)
004d6239          teleportObj->vtable->__vecDelDtor(1);
004d6239      
004d623f      class SmartBox* m_pSmartBox = this->m_pSmartBox;
004d6247      this->teleportObj = nullptr;
004d6251      SmartBox::Reset(m_pSmartBox, 1);
004d6256      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
004d6256      
004d625d      if (eax_2 != 0)
004d625f          eax_2->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004d625f      
004d626d      VividTargetIndicator::~VividTargetIndicator(&this->m_vti);
004d6276      /* tailcall */
004d6276      return UIElement_SmartBoxWrapper::~UIElement_SmartBoxWrapper(this);
004d61f0  }

004d627b                                                                                   90 90 90 90 90                             .....

004d6280  class UIElement* gmSmartBoxUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d6280  {
004d6285      void* eax = operator new(0x708);
004d6285      
004d628f      if (eax == 0)
004d62a5          return 0;
004d62a5      
004d62a2      return gmSmartBoxUI::gmSmartBoxUI(eax, arg1, arg2);
004d6280  }

004d62a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d62b0  enum UIElementMessageListenResult __thiscall gmSmartBoxUI::ListenToElementMessage(class gmSmartBoxUI* this, struct UIElementMessageInfo const* arg2)

004d62b0  {
004d62b0      /* tailcall */
004d62b0      return UIElement_SmartBoxWrapper::ListenToElementMessage(this, arg2);
004d62b0  }

004d62b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004d62c0  void __fastcall gmSmartBoxUI::RecvNotice_UpdateGameView(class gmSmartBoxUI* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5)

004d62c0  {
004d62c9      struct RenderDevice::VTable* vtable = RenderDevice::render_device->vtable;
004d62d5      int32_t eax = UIRegion::GetHeight(((char*)this - 0x5f8));
004d62dd      int32_t eax_1 = UIRegion::GetWidth(((char*)this - 0x5f8));
004d62e5      int32_t eax_2 = UIRegion::GetScreenY0(((char*)this - 0x5f8));
004d62f5      vtable->SetViewport(UIRegion::GetScreenX0(((char*)this - 0x5f8)), eax_2, eax_1, eax, 0);
004d62c0  }

004d62fe                                                                                            90 90                                ..

004d6300  void __thiscall gmSmartBoxUI::BeginTeleportAnimation(class gmSmartBoxUI* this, enum TeleportAnimState arg2)

004d6300  {
004d630e      if (this->teleportAnimState == TAS_OFF)
004d630e      {
004d6316          SmartBox::GetOverrideFovDistance(this->m_pSmartBox);
004d631b          long double x87_r7;
004d631b          this->gameVDist = ((double)x87_r7);
004d630e      }
004d630e      
004d632b      this->teleportCurVDist = ((float)((long double)this->gameVDist));
004d6331      __builtin_memset(&this->teleportRotationStartTime, 0, 0x20);
004d6361      this->teleportAnimState = arg2;
004d6373      this->teleportTransitionStartTime = (*(uint32_t*)Timer::cur_time);
004d6379      *(uint32_t*)((char*)this->teleportTransitionStartTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004d638e      SoundManager::PlaySoundFromCenter(Sound_UI_EnterPortal, ClientUISystem::GetUISoundTable(ClientUISystem::GetUISystem()));
004d6300  }

004d639b                                                                                   90 90 90 90 90                             .....

004d63a0  void __fastcall gmSmartBoxUI::UpdateFPSMeter(class gmSmartBoxUI* this)

004d63a0  {
004d63a6      int32_t __saved_esi_1;
004d63a6      int32_t __saved_esi = __saved_esi_1;
004d63ad      void var_90;
004d63ad      StringInfo::StringInfo(&var_90);
004d63b7      int32_t var_98 = 0x10000001;
004d63bc      int32_t var_9c = 0;
004d63c1      StringInfo::SetStringIDandTableEnum(&var_90);
004d63c6      int32_t var_98_1 = 2;
004d63d9      int32_t var_a4 = 0;
004d63de      StringInfo::AddVariable_Float(&var_90, 0, ((double)Render::GetFramerate()), 2);
004d63ea      long double x87_r7_1;
004d63ea      
004d63ea      if (Render::auto_update_deg_mul == 0)
004d63f4          x87_r7_1 = ((long double)Render::s_rUserSuppliedDegradeBias);
004d63ea      else
004d63ec          x87_r7_1 = ((long double)Render::deg_mul);
004d63ec      
004d6400      int32_t var_98_2 = 2;
004d6408      int32_t var_a4_1 = 0;
004d640d      StringInfo::AddVariable_Float(&var_90, 0, ((double)x87_r7_1), 2);
004d641d      UIElement_Text::SetStringInfo(this->m_pFPSDisplay, &var_90);
004d6426      StringInfo::~StringInfo(&var_90);
004d63a0  }

004d6433                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d6440  void __fastcall gmSmartBoxUI::UpdateLockedStatus(class gmSmartBoxUI* this)

004d6440  {
004d644a      if ((CPlayerSystem::GetPlayerSystem() != 0 && PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0))
004d644a      {
004d645d          this->m_pTopBorder->vtable->SetVisible(0);
004d646a          this->m_pLeftBorder->vtable->SetVisible(0);
004d6477          this->m_pBottomBorder->vtable->SetVisible(0);
004d6484          this->m_pRightBorder->vtable->SetVisible(0);
004d6491          this->m_pTopLeftCorner->vtable->SetVisible(0);
004d649e          this->m_pTopRightCorner->vtable->SetVisible(0);
004d64ab          this->m_pBottomLeftCorner->vtable->SetVisible(0);
004d64b8          this->m_pBottomRightCorner->vtable->SetVisible(0);
004d64c6          return;
004d644a      }
004d644a      
004d64c7      this->m_pTopBorder->vtable->SetVisible(1);
004d64d4      this->m_pLeftBorder->vtable->SetVisible(1);
004d64e1      this->m_pBottomBorder->vtable->SetVisible(1);
004d64ee      this->m_pRightBorder->vtable->SetVisible(1);
004d64fb      this->m_pTopLeftCorner->vtable->SetVisible(1);
004d6508      this->m_pTopRightCorner->vtable->SetVisible(1);
004d6515      this->m_pBottomLeftCorner->vtable->SetVisible(1);
004d6522      this->m_pBottomRightCorner->vtable->SetVisible(1);
004d6440  }

004d6531                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004d6540  void __fastcall gmSmartBoxUI::RecvNotice_PlayerDescReceived(class gmSmartBoxUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004d6540  {
004d654c      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x138)();
004d6540  }

004d6555                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004d6560  void* __thiscall gmSmartBoxUI::`scalar deleting destructor'(class gmSmartBoxUI* this, uint32_t arg2)

004d6560  {
004d6563      gmSmartBoxUI::~gmSmartBoxUI(this);
004d6563      
004d656d      if ((arg2 & 1) != 0)
004d6570          operator delete(this);
004d6570      
004d657b      return this;
004d6560  }

004d657e                                                                                            90 90                                ..

004d6580  void gmSmartBoxUI::Register()

004d6580  {
004d658a      UIElement::RegisterElementClass(0x10000014, gmSmartBoxUI::Create);
004d6580  }

004d6593                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d65a0  void __fastcall gmSmartBoxUI::EndTeleportAnimation(class gmSmartBoxUI* this)

004d65a0  {
004d65a8      if (this->teleportAnimState != TAS_OFF)
004d65a8      {
004d65aa          this->teleportAnimState = TAS_TUNNEL_CONTINUE;
004d65c1          this->teleportTransitionStartTime = (*(uint32_t*)Timer::cur_time);
004d65c7          *(uint32_t*)((char*)this->teleportTransitionStartTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004d65d5          SmartBox::SetOverrideFovDistance(this->m_pSmartBox, 0, 0f);
004d65a8      }
004d65a0  }

004d65db                                                                                   90 90 90 90 90                             .....

004d65e0  void __thiscall gmSmartBoxUI::RecvNotice_SetFramerateDisplay(class gmSmartBoxUI* this, uint8_t arg2)

004d65e0  {
004d65ea      if (arg2 == 0)
004d65ea      {
004d6632          int32_t m_x0 = this->m_box.m_x0;
004d6632          
004d6637          if (m_x0 != 0)
004d6637          {
004d663d              *(uint32_t*)(*(uint32_t*)m_x0 + 0x18)(0);
004d6640              this->m_box.m_x0 = 0;
004d6637          }
004d65ea      }
004d65ea      else
004d65ea      {
004d65f9          class UIElement* eax_1 = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000047);
004d6600          int32_t eax_2;
004d6600          
004d6600          if (eax_1 == 0)
004d6610              eax_2 = 0;
004d6600          else
004d6608              eax_2 = eax_1->vtable->DynamicCast(0xc);
004d6608          
004d6614          this->m_box.m_x0 = eax_2;
004d6614          
004d6617          if (eax_2 != 0)
004d6617          {
004d661b              gmSmartBoxUI::UpdateFPSMeter(((char*)this - 0x5f8));
004d6627              arg2 = 1;
004d662f              /* jump -> *(uint32_t*)(*(uint32_t*)this->m_box.m_x0 + 0x18) */
004d6617          }
004d65ea      }
004d65e0  }

004d664c                                      90 90 90 90                                                              ....

004d6650  void __thiscall gmSmartBoxUI::ResizeTo(class gmSmartBoxUI* this, int32_t const arg2, int32_t const arg3)

004d6650  {
004d6660      int32_t const edi = arg2;
004d6666      int32_t eax = _ftol2();
004d6666      
004d666d      if (edi < eax)
004d666f          edi = eax;
004d666f      
004d6679      UIElement_SmartBoxWrapper::ResizeTo(this, edi, arg3);
004d6679      
004d6688      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d6688      {
004d66ac          class CPlayerModule* edi_2 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d66af          int32_t* var_8 = nullptr;
004d66b3          int32_t* var_4_1 = nullptr;
004d66b7          BaseProperty::SetPropertyName(&var_8, 0x10000088);
004d66be          int32_t eax_5 = UIRegion::GetWidth(this);
004d66be          
004d66c9          if (var_4_1 != 0)
004d66c9          {
004d66cf              BaseProperty::CheckCopyOnWrite(&var_8);
004d66db              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(eax_5);
004d66c9          }
004d66c9          
004d66ef          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_8);
004d66fd          int32_t* var_10 = nullptr;
004d6701          int32_t* var_c_1 = nullptr;
004d6705          BaseProperty::SetPropertyName(&var_10, 0x10000089);
004d670c          int32_t eax_6 = UIRegion::GetHeight(this);
004d670c          
004d6717          if (var_c_1 != 0)
004d6717          {
004d671d              BaseProperty::CheckCopyOnWrite(&var_10);
004d6729              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(eax_6);
004d6717          }
004d6717          
004d673a          PlayerModule::SetChatWindowOption(&edi_2->vtable, this->m_eWindowID, &var_10);
004d673f          int32_t* eax_7 = var_10;
004d673f          
004d6746          if (eax_7 != 0)
004d6746          {
004d6750              int32_t esi_2 = (eax_7[1] - 1);
004d674d              eax_7[1] = esi_2;
004d674d              
004d6757              if (esi_2 == 0)
004d675d                  **(uint32_t**)eax_7(1);
004d675d              
004d675f              var_10 = nullptr;
004d6746          }
004d6746          
004d6769          if (var_c_1 != 0)
004d6769          {
004d6773              int32_t esi_4 = (var_c_1[1] - 1);
004d6770              var_c_1[1] = esi_4;
004d6770              
004d677a              if (esi_4 == 0)
004d6780                  **(uint32_t**)var_c_1(1);
004d6780              
004d6782              int32_t var_c_2 = 0;
004d6769          }
004d6769          
004d6786          int32_t* eax_12 = var_8;
004d6786          
004d678c          if (eax_12 != 0)
004d678c          {
004d6796              int32_t esi_6 = (eax_12[1] - 1);
004d6793              eax_12[1] = esi_6;
004d6793              
004d679d              if (esi_6 == 0)
004d67a3                  **(uint32_t**)eax_12(1);
004d67a3              
004d67a5              var_8 = nullptr;
004d678c          }
004d678c          
004d67af          if (var_4_1 != 0)
004d67af          {
004d67b9              int32_t esi_8 = (var_4_1[1] - 1);
004d67b6              var_4_1[1] = esi_8;
004d67b6              
004d67c0              if (esi_8 == 0)
004d67c6                  **(uint32_t**)var_4_1(1);
004d67af          }
004d6688      }
004d6650  }

004d67d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004d67e0  void __thiscall gmSmartBoxUI::MoveTo(class gmSmartBoxUI* this, int32_t const arg2, int32_t const arg3)

004d67e0  {
004d67e4      int32_t const ebx = arg2;
004d67ef      int32_t const edi = arg3;
004d67ef      
004d67fd      if (this->vtable->GetParent() != 0)
004d67fd      {
004d6823          if (ebx > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
004d683f              ebx = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
004d683f          
004d6843          if (ebx < 0)
004d6845              ebx = 0;
004d6845          
004d6867          if (arg3 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
004d6883              edi = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
004d6883          
004d6889          if (edi < 0)
004d688b              edi = 0;
004d67fd      }
004d67fd      
004d6891      UIElement_SmartBoxWrapper::MoveTo(this, ebx, edi);
004d6891      
004d689c      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004d689c      {
004d68bf          class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d68c2          int32_t* var_8 = nullptr;
004d68c6          int32_t* var_4_1 = nullptr;
004d68ca          BaseProperty::SetPropertyName(&var_8, 0x10000086);
004d68d3          int32_t m_x0 = this->m_box.m_x0;
004d68d3          
004d68d6          if (var_4_1 != 0)
004d68d6          {
004d68dc              BaseProperty::CheckCopyOnWrite(&var_8);
004d68e8              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x7c)(m_x0);
004d68d6          }
004d68d6          
004d68fc          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_8);
004d690a          int32_t* var_10 = nullptr;
004d690e          int32_t* var_c_1 = nullptr;
004d6912          BaseProperty::SetPropertyName(&var_10, 0x10000087);
004d691b          int32_t m_y0 = this->m_box.m_y0;
004d691b          
004d6921          if (var_c_1 != 0)
004d6921          {
004d6927              BaseProperty::CheckCopyOnWrite(&var_10);
004d6933              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x7c)(m_y0);
004d6921          }
004d6921          
004d6944          PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_10);
004d6949          int32_t* eax_19 = var_10;
004d6949          
004d694f          if (eax_19 != 0)
004d694f          {
004d6959              int32_t esi_2 = (eax_19[1] - 1);
004d6956              eax_19[1] = esi_2;
004d6956              
004d6960              if (esi_2 == 0)
004d6966                  **(uint32_t**)eax_19(1);
004d6966              
004d6968              var_10 = nullptr;
004d694f          }
004d694f          
004d6972          if (var_c_1 != 0)
004d6972          {
004d697c              int32_t esi_4 = (var_c_1[1] - 1);
004d6979              var_c_1[1] = esi_4;
004d6979              
004d6983              if (esi_4 == 0)
004d6989                  **(uint32_t**)var_c_1(1);
004d6989              
004d698b              int32_t var_c_2 = 0;
004d6972          }
004d6972          
004d698f          int32_t* eax_24 = var_8;
004d698f          
004d6995          if (eax_24 != 0)
004d6995          {
004d699f              int32_t esi_6 = (eax_24[1] - 1);
004d699c              eax_24[1] = esi_6;
004d699c              
004d69a6              if (esi_6 == 0)
004d69ac                  **(uint32_t**)eax_24(1);
004d69ac              
004d69ae              var_8 = nullptr;
004d6995          }
004d6995          
004d69b8          if (var_4_1 != 0)
004d69b8          {
004d69c2              int32_t esi_8 = (var_4_1[1] - 1);
004d69bf              var_4_1[1] = esi_8;
004d69bf              
004d69c9              if (esi_8 == 0)
004d69cf                  **(uint32_t**)var_4_1(1);
004d69b8          }
004d689c      }
004d67e0  }

004d69db                                                                                   90 90 90 90 90                             .....

004d69e0  void __fastcall gmSmartBoxUI::UpdateFromPlayerModule(class gmSmartBoxUI* this)

004d69e0  {
004d69e6      class gmSmartBoxUI* this_1 = this;
004d69ef      class CPlayerModule* esi_1 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d69f7      this = CPlayerSystem::GetPlayerSystem()->m_layoutFromFile;
004d69f7      
004d6a0d      if (((this == 0 && this_1->m_eWindowID != 0) && CPlayerSystem::GetPlayerSystem() != 0))
004d6a0d      {
004d6a20          uint32_t m_eWindowID_1 = this_1->m_eWindowID;
004d6a36          int32_t var_8 = 0;
004d6a3a          int32_t* var_4_1 = nullptr;
004d6a3e          int32_t var_10 = 0;
004d6a42          int32_t* var_c_1 = nullptr;
004d6a4d          int32_t var_28;
004d6a4d          int32_t var_24;
004d6a4d          
004d6a4d          if ((((PlayerModule::InqChatWindowOption(&esi_1->vtable, m_eWindowID_1, 0x10000088, &var_8) != 0 && (PlayerModule::InqChatWindowOption(&esi_1->vtable, this_1->m_eWindowID, 0x10000089, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_24) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_28) != 0))
004d6a9f              this_1->vtable->ResizeTo(var_24, var_28);
004d6a9f          
004d6aa8          uint32_t m_eWindowID = this_1->m_eWindowID;
004d6abb          int32_t var_18 = 0;
004d6abf          int32_t* var_14_1 = nullptr;
004d6ac3          int32_t var_20 = 0;
004d6ac7          int32_t* var_1c_1 = nullptr;
004d6ac7          
004d6ad2          if ((((PlayerModule::InqChatWindowOption(&esi_1->vtable, m_eWindowID, 0x10000086, &var_18) != 0 && (PlayerModule::InqChatWindowOption(&esi_1->vtable, this_1->m_eWindowID, 0x10000087, &var_20) != 0 && var_14_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_14_1 + 0x78)(&var_28) != 0 && var_1c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x78)(&var_24) != 0))
004d6b24              this_1->vtable->MoveTo(var_28, var_24);
004d6b24          
004d6b31          BaseProperty::~BaseProperty(&var_20);
004d6b3a          BaseProperty::~BaseProperty(&var_18);
004d6b43          BaseProperty::~BaseProperty(&var_10);
004d6b4c          BaseProperty::~BaseProperty(&var_8);
004d6a0d      }
004d6a0d      
004d6b53      gmSmartBoxUI::UpdateLockedStatus(this_1);
004d69e0  }

004d6b5f                                                                                               90                                 .

004d6b60  void __fastcall gmSmartBoxUI::PostInit(class gmSmartBoxUI* this)

004d6b60  {
004d6b67      UIElement_SmartBoxWrapper::PostInit(this);
004d6b7a      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d6b86      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x100006cb);
004d6b8d      class UIElement* eax_2;
004d6b8d      
004d6b8d      if (eax_1 == 0)
004d6b9d          eax_2 = nullptr;
004d6b8d      else
004d6b95          eax_2 = eax_1->vtable->DynamicCast(9);
004d6b95      
004d6ba6      this->m_pTopBorder = eax_2;
004d6bac      class UIElement* eax_3 = UIElement::GetChildRecursive(this, 0x100006cd);
004d6bb3      class UIElement* eax_4;
004d6bb3      
004d6bb3      if (eax_3 == 0)
004d6bc3          eax_4 = nullptr;
004d6bb3      else
004d6bbb          eax_4 = eax_3->vtable->DynamicCast(9);
004d6bbb      
004d6bcc      this->m_pLeftBorder = eax_4;
004d6bd2      class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x100006cf);
004d6bd9      class UIElement* eax_6;
004d6bd9      
004d6bd9      if (eax_5 == 0)
004d6be9          eax_6 = nullptr;
004d6bd9      else
004d6be1          eax_6 = eax_5->vtable->DynamicCast(9);
004d6be1      
004d6bf2      this->m_pBottomBorder = eax_6;
004d6bf8      class UIElement* eax_7 = UIElement::GetChildRecursive(this, 0x100006d1);
004d6bff      class UIElement* eax_8;
004d6bff      
004d6bff      if (eax_7 == 0)
004d6c0f          eax_8 = nullptr;
004d6bff      else
004d6c07          eax_8 = eax_7->vtable->DynamicCast(9);
004d6c07      
004d6c18      this->m_pRightBorder = eax_8;
004d6c1e      class UIElement* eax_9 = UIElement::GetChildRecursive(this, 0x100006ca);
004d6c25      class UIElement* eax_10;
004d6c25      
004d6c25      if (eax_9 == 0)
004d6c35          eax_10 = nullptr;
004d6c25      else
004d6c2d          eax_10 = eax_9->vtable->DynamicCast(9);
004d6c2d      
004d6c3e      this->m_pTopLeftCorner = eax_10;
004d6c44      class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x100006cc);
004d6c4b      class UIElement* eax_12;
004d6c4b      
004d6c4b      if (eax_11 == 0)
004d6c5b          eax_12 = nullptr;
004d6c4b      else
004d6c53          eax_12 = eax_11->vtable->DynamicCast(9);
004d6c53      
004d6c64      this->m_pTopRightCorner = eax_12;
004d6c6a      class UIElement* eax_13 = UIElement::GetChildRecursive(this, 0x100006ce);
004d6c71      class UIElement* eax_14;
004d6c71      
004d6c71      if (eax_13 == 0)
004d6c81          eax_14 = nullptr;
004d6c71      else
004d6c79          eax_14 = eax_13->vtable->DynamicCast(9);
004d6c79      
004d6c8a      this->m_pBottomLeftCorner = eax_14;
004d6c90      class UIElement* eax_15 = UIElement::GetChildRecursive(this, 0x100006d0);
004d6c97      class UIElement* eax_16;
004d6c97      
004d6c97      if (eax_15 == 0)
004d6ca7          eax_16 = nullptr;
004d6c97      else
004d6c9f          eax_16 = eax_15->vtable->DynamicCast(9);
004d6c9f      
004d6ca9      this->m_pBottomRightCorner = eax_16;
004d6caf      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004d6cb7      this->m_pSmartBox = SmartBox::smartbox_1;
004d6cc4      ClientUISystem::InitializeCameraSet(ClientUISystem::GetUISystem(), SmartBox::smartbox_1);
004d6cd5      class IDClass<_tagDataID,32,0> __return;
004d6cd5      DBObj::GetDIDByEnum(&__return, 0x10000001, 7);
004d6cf2      this->teleportObj = CPhysicsObj::makeObject(__return, 0, 1);
004d6cf8      class UIElement* eax_20 = UIElement::GetChildRecursive(this, 0x10000436);
004d6cff      class UIElement_Viewport* eax_21;
004d6cff      
004d6cff      if (eax_20 == 0)
004d6d0f          eax_21 = nullptr;
004d6cff      else
004d6d07          eax_21 = eax_20->vtable->DynamicCast(0xd);
004d6d07      
004d6d13      this->m_pPortalSpace = eax_21;
004d6d13      
004d6d19      if (eax_21 != 0)
004d6d19      {
004d6d2c          CreatureMode::AddObject(&eax_21->creature_mode_objects, this->teleportObj);
004d6d44          CreatureMode::AddLight(&this->m_pPortalSpace->creature_mode_objects, DISTANT_LIGHT, 2f);
004d6d5c          int32_t var_c = 0x3e99999a;
004d6d64          int32_t var_8_1 = 0xbff33333;
004d6d6c          int32_t var_4_1;
004d6d6c          __builtin_strncpy(&var_4_1, "ff&?", 4);
004d6d74          CreatureMode::SetLightDirection(&this->m_pPortalSpace->creature_mode_objects, 0, &var_c);
004d6d8a          var_c = 0x3e75c28f;
004d6d92          int32_t var_8_2 = 0xc02ccccd;
004d6d9a          int32_t var_4_2 = 0x3f6147ae;
004d6da2          CreatureMode::SetCameraPosition(&this->m_pPortalSpace->creature_mode_objects, &var_c);
004d6db3          CreatureMode::UseSmartboxFOV(&this->m_pPortalSpace->creature_mode_objects);
004d6d19      }
004d6d19      
004d6db8      class GlobalEventHandler* eax_22 = GlobalEventHandler::GetGlobalEventHandler();
004d6db8      
004d6dc1      if (eax_22 != 0)
004d6dc1      {
004d6dc3          eax_22->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004d6dd7          eax_22->vtable->RegisterNoticeHandler(0x186ad, &this->vtable);
004d6de4          eax_22->vtable->RegisterNoticeHandler(0x4dd1ff, &this->vtable);
004d6dc1      }
004d6dc1      
004d6df6      UIListener::RegisterForGlobalMessage(this, 3);
004d6dff      UIListener::RegisterForGlobalMessage(this, 0xd);
004d6e0b      VividTargetIndicator::Initialized(&this->m_vti, this);
004d6e10      this->vtable->SetVisible(1);
004d6e1e      /* tailcall */
004d6e1e      return RenderUI::RecalculateClampedPosition();
004d6b60  }

004d6e23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d6e30  void __fastcall gmSmartBoxUI::UseTime(class gmSmartBoxUI* this)

004d6e30  {
004d6e30      int32_t ebp;
004d6e30      int32_t var_4 = ebp;
004d6e3c      enum TeleportAnimState Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
004d6e46      class SmartBox* m_pSmartBox_7 = *(int32_t*)((char*)Timer::cur_time + 4);
004d6e5a      class CPlayerSystem* ebp_1 = CPlayerSystem::GetPlayerSystem();
004d6e5a      
004d6e5e      if (ebp_1 != 0)
004d6e5e      {
004d6e64          class CPlayerSystem* eax;
004d6e64          eax = ebp_1->logOffRequested;
004d6e6c          int16_t top;
004d6e6c          
004d6e6c          if (eax != 0)
004d6e6c          {
004d6e6e              long double x87_r7_1 = ((long double)ebp_1->logOffRequestTime);
004d6e74              long double temp0_1 = ((long double)Timer::cur_time_1);
004d6e74              (x87_r7_1 - temp0_1);
004d6e74              top = 0;
004d6e78              eax = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004d6e7a              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004d6e7a              
004d6e7d              if (!(p_1))
004d6e7d              {
004d6e83                  gmSmartBoxUI::BeginTeleportAnimation(this, TAS_WORLD_FADE_OUT);
004d6e8c                  CPlayerSystem::SetTeleportInProgress(ebp_1, 1);
004d6e93                  CPlayerSystem::SetLogOffStarted(ebp_1);
004d6e7d              }
004d6e6c          }
004d6e6c          
004d6e98          class SmartBox* m_pSmartBox = this->m_pSmartBox;
004d6e9e          int32_t ebx;
004d6e9e          ebx = ebp_1->teleportInProgress;
004d6e9e          
004d6eab          if (SmartBox::teleport_in_progress(m_pSmartBox) != ebx)
004d6eab          {
004d6ead              m_pSmartBox = this->m_pSmartBox;
004d6ead              
004d6eba              if (SmartBox::teleport_in_progress(m_pSmartBox) != 0)
004d6eba              {
004d6ec0                  CPlayerSystem::SetTeleportInProgress(ebp_1, 1);
004d6ec9                  m_pSmartBox = gmSmartBoxUI::BeginTeleportAnimation(this, TAS_TUNNEL);
004d6eba              }
004d6eba              else if (this->teleportAnimState == TAS_TUNNEL)
004d6edb                  m_pSmartBox = gmSmartBoxUI::EndTeleportAnimation(this);
004d6eab          }
004d6eab          
004d6ee0          enum TeleportAnimState teleportAnimState = this->teleportAnimState;
004d6ee0          
004d6ee8          if (teleportAnimState == TAS_OFF)
004d6ee8          {
004d749e              if (SmartBox::teleport_occured(this->m_pSmartBox) != 0)
004d74a2                  CPlayerSystem::SendLoginCompleteNotification(ebp_1);
004d6ee8          }
004d6ee8          else
004d6ee8          {
004d6ef6              if ((teleportAnimState == TAS_WORLD_FADE_OUT || teleportAnimState == TAS_WORLD_FADE_IN))
004d6f00                  m_pSmartBox = VividTargetIndicator::SetEnabled(&this->m_vti, 1);
004d6f00              
004d6f05              enum TeleportAnimState teleportAnimState_1 = this->teleportAnimState;
004d6f21              float __return;
004d6f21              int32_t var_a8;
004d6f21              
004d6f21              if ((((teleportAnimState_1 == TAS_TUNNEL_FADE_IN || teleportAnimState_1 == TAS_TUNNEL) || teleportAnimState_1 == TAS_TUNNEL_CONTINUE) || teleportAnimState_1 == TAS_TUNNEL_FADE_OUT))
004d6f21              {
004d6f2d                  uint8_t eax_3;
004d6f2d                  class SmartBox* m_pSmartBox_1;
004d6f2d                  eax_3 = UIElement::IsVisible(this->m_pPortalSpace);
004d6f2d                  
004d6f34                  if (eax_3 == 0)
004d6f34                  {
004d6f42                      VividTargetIndicator::SetEnabled(&this->m_vti, 0);
004d6f53                      DBObj::GetDIDByEnum(&__return, 0x10000002, 7);
004d6f70                      CPhysicsObj::set_sequence_animation(this->teleportObj, __return, 1, 1, 40f);
004d6f86                      var_a8 = 0x3e75c28f;
004d6f8e                      int32_t var_a4_1 = 0xc02ccccd;
004d6f96                      int32_t var_a0_1 = 0x3f6147ae;
004d6f9e                      CreatureMode::SetCameraPosition(&this->m_pPortalSpace->creature_mode_objects, &var_a8);
004d6fa3                      this->m_pPortalSpace->vtable->SetVisible(1);
004d6fb0                      m_pSmartBox_1 = this->m_pSmartBox;
004d6fb6                      SmartBox::Hide(m_pSmartBox_1);
004d6f34                  }
004d6f34                  
004d6fc7                  ((((long double)this->teleportRotationDuration) + ((long double)this->teleportRotationStartTime)) - ((long double)Timer::cur_time_1));
004d6fcd                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
004d6fd0                  int16_t top_1;
004d6fd0                  
004d6fd0                  if (p_2)
004d6fd0                  {
004d70b8                      class SmartBox* m_pSmartBox_3 = m_pSmartBox_1;
004d70c8                      int16_t __return_1;
004d70c8                      int80_t st0_3;
004d70c8                      st0_3 = UIGlobals::GetAnimLevel(((float)((((long double)Timer::cur_time_1) - ((long double)this->teleportRotationStartTime)) / ((long double)this->teleportRotationDuration))));
004d70d0                      __return = ((int32_t)__return_1);
004d70f5                      this->teleportRotationCurAngle = ((double)(((((long double)this->teleportRotationEndAngle) - ((long double)this->teleportRotationStartAngle)) * (((long double)__return) * ((long double)0.0009765625))) + ((long double)this->teleportRotationStartAngle)));
004d70fb                      top_1 = 0;
004d6fd0                  }
004d6fd0                  else
004d6fd0                  {
004d6fe6                      int32_t var_cc_2 = 0x3ffccccc;
004d6ff0                      this->teleportRotationCurAngle = this->teleportRotationEndAngle;
004d6ffa                      int32_t var_d4_2 = 0x3fe33333;
004d7004                      *(uint32_t*)((char*)this->teleportRotationCurAngle)[4] = *(uint32_t*)((char*)this->teleportRotationEndAngle)[4];
004d700a                      this->teleportRotationStartTime = Timer::cur_time_1;
004d7010                      *(uint32_t*)((char*)this->teleportRotationStartTime)[4] = m_pSmartBox_7;
004d701b                      this->teleportRotationDuration = ((double)RandDouble(4.17232506e-08f, -107374184f));
004d702d                      int32_t var_dc_1 = 0x40768000;
004d7034                      int32_t var_e4_1 = 0;
004d7038                      this->teleportRotationStartAngle = this->teleportRotationCurAngle;
004d703e                      *(uint32_t*)((char*)this->teleportRotationStartAngle)[4] = *(uint32_t*)((char*)this->teleportRotationCurAngle)[4];
004d7049                      this->teleportRotationEndAngle = ((double)RandDouble(0f, 0f));
004d7049                      top_1 = 2;
004d7056                      void var_98;
004d7056                      StringInfo::StringInfo(&var_98);
004d7064                      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"In Portal Space - Please Wait...");
004d7074                      StringInfo::SetLiteralValue(&var_98, &__return, 1);
004d707d                      int32_t* edi_2 = (__return - 0x14);
004d707d                      
004d7090                      if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004d7098                          **(uint32_t**)edi_2(1);
004d7098                      
004d70a1                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_98);
004d70ad                      StringInfo::~StringInfo(&var_98);
004d6fd0                  }
004d6fd0                  
004d70fd                  /* unimplemented  {fld st0, qword [esi+0x668]} */;
004d710d                  float var_a4_2 = ((float)/* float var_a4_2 = fconvert.s(unimplemented  {fstp dword [esp+0x24], st0}) */);
004d710d                  /* unimplemented  {fstp dword [esp+0x24], st0} */;
004d710d                  top = top_1;
004d7118                  var_a8 = 0;
004d7120                  int32_t var_a0_2 = 0;
004d7128                  m_pSmartBox = CreatureMode::SetCameraDirection_Degrees(&this->m_pPortalSpace->creature_mode_objects, &var_a8);
004d6f21              }
004d6f21              
004d712d              enum TeleportAnimState teleportAnimState_2 = this->teleportAnimState;
004d712d              
004d713b              if ((teleportAnimState_2 == TAS_WORLD_FADE_OUT || teleportAnimState_2 == TAS_TUNNEL_FADE_OUT))
004d713b              {
004d7141                  /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d7145                  __return = 0f;
004d714d                  /* unimplemented  {fsub st0, qword [esi+0x660]} */;
004d7153                  int32_t var_b4_1 = 0x3ff00000;
004d715b                  /* unimplemented  {fdiv st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d7161                  var_a8 = ((double)/* var_a8.q = fconvert.d(unimplemented  {fst qword [esp+0x20], st0}) */);
004d7165                  (/* unimplemented  {fcomp st0, qword [&data_7928c0]} f- fconvert.t(1.0) */ - ((long double)1.0));
004d7165                  /* unimplemented  {fcomp st0, qword [&data_7928c0]} */;
004d716d                  /* unimplemented  {test ah, 0x5} */;
004d717a                  /* unimplemented  {fld st0, qword [eax]} */;
004d717c                  class SmartBox* m_pSmartBox_4 = m_pSmartBox;
004d717d                  float var_cc_7 = ((float)/* float var_cc_7 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
004d717d                  /* unimplemented  {fstp dword [esp], st0} */;
004d7180                  int16_t __return_2 = UIGlobals::GetAnimLevel(var_cc_7);
004d7180                  /* unimplemented  {call UIGlobals::GetAnimLevel} */;
004d7188                  __return = ((int32_t)__return_2);
004d718c                  m_pSmartBox = this->m_pSmartBox;
004d7192                  /* unimplemented  {fild st0, dword [esp+0x14]} */;
004d7199                  /* unimplemented  {fmul st0, qword [&data_7bd6a0]} */;
004d719f                  /* unimplemented  {fld st0, qword [&TRANSITION_VIEW_PLANE_DISTANCE]} */;
004d71a5                  /* unimplemented  {fsub st0, qword [esi+0x630]} */;
004d71ab                  /* unimplemented  {fmulp st1, st0} */;
004d71ab                  /* unimplemented  {fmulp st1, st0} */;
004d71ad                  /* unimplemented  {fadd qword [esi+0x630]} */;
004d71b3                  __return = ((float)/* __return = fconvert.s(unimplemented  {fst dword [esp+0x10], st0}) */);
004d71b7                  float __return_5 = __return;
004d71bc                  this->teleportCurVDist = ((float)/* this->teleportCurVDist = fconvert.s(unimplemented  {fstp dword [esi+0x670], st0}) */);
004d71bc                  /* unimplemented  {fstp dword [esi+0x670], st0} */;
004d71c4                  SmartBox::SetOverrideFovDistance(m_pSmartBox, 1, __return_5);
004d713b              }
004d713b              
004d71c9              enum TeleportAnimState teleportAnimState_3 = this->teleportAnimState;
004d71c9              
004d71d6              if ((teleportAnimState_3 == TAS_TUNNEL_FADE_IN || teleportAnimState_3 == TAS_WORLD_FADE_IN))
004d71d6              {
004d71dc                  /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d71e0                  __return = 0f;
004d71e8                  /* unimplemented  {fsub st0, qword [esi+0x660]} */;
004d71ee                  int32_t var_b4_2 = 0x3ff00000;
004d71f6                  /* unimplemented  {fdiv st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d71fc                  var_a8 = ((double)/* var_a8.q = fconvert.d(unimplemented  {fst qword [esp+0x20], st0}) */);
004d7200                  (/* unimplemented  {fcomp st0, qword [&data_7928c0]} f- fconvert.t(1.0) */ - ((long double)1.0));
004d7200                  /* unimplemented  {fcomp st0, qword [&data_7928c0]} */;
004d7208                  /* unimplemented  {test ah, 0x5} */;
004d7215                  /* unimplemented  {fld st0, qword [eax]} */;
004d7217                  class SmartBox* m_pSmartBox_5 = m_pSmartBox;
004d7218                  float var_cc_9 = ((float)/* float var_cc_9 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
004d7218                  /* unimplemented  {fstp dword [esp], st0} */;
004d721b                  int16_t __return_3 = UIGlobals::GetAnimLevel(var_cc_9);
004d721b                  /* unimplemented  {call UIGlobals::GetAnimLevel} */;
004d7223                  __return = ((int32_t)__return_3);
004d722a                  /* unimplemented  {fild st0, dword [esp+0x10]} */;
004d722e                  /* unimplemented  {fmul st0, qword [&data_7bd6a0]} */;
004d7234                  /* unimplemented  {fld st0, qword [esi+0x630]} */;
004d723a                  /* unimplemented  {fsub st0, qword [&TRANSITION_VIEW_PLANE_DISTANCE]} */;
004d7240                  /* unimplemented  {fmulp st1, st0} */;
004d7240                  /* unimplemented  {fmulp st1, st0} */;
004d7242                  /* unimplemented  {fadd qword [&TRANSITION_VIEW_PLANE_DISTANCE]} */;
004d7248                  __return = ((float)/* __return = fconvert.s(unimplemented  {fst dword [esp+0x10], st0}) */);
004d724c                  float __return_4 = __return;
004d7251                  this->teleportCurVDist = ((float)/* this->teleportCurVDist = fconvert.s(unimplemented  {fstp dword [esi+0x670], st0}) */);
004d7251                  /* unimplemented  {fstp dword [esi+0x670], st0} */;
004d7257                  m_pSmartBox = this->m_pSmartBox;
004d725f                  SmartBox::SetOverrideFovDistance(m_pSmartBox, 1, __return_4);
004d71d6              }
004d71d6              
004d726b              if (this->teleportAnimState == TAS_TUNNEL_CONTINUE)
004d726b              {
004d7271                  /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d7275                  /* unimplemented  {fsub st0, qword [esi+0x660]} */;
004d727b                  long double temp4_1 = ((long double)2.0);
004d727b                  (/* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MIN_CONTINUE_TIME]} f- temp4_1 */ - temp4_1);
004d727b                  bool c0_3 = /* bool c0_3 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MIN_CONTINUE_TIME]} f< temp4_1 */ < temp4_1;
004d727b                  bool c2_3 = (FCMP_UO(/* bool c2_3 = is_unordered.t(unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MIN_CONTINUE_TIME]}, temp4_1) */, temp4_1));
004d727b                  bool c3_3 = /* bool c3_3 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MIN_CONTINUE_TIME]} f== temp4_1 */ == temp4_1;
004d727b                  /* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MIN_CONTINUE_TIME]} */;
004d7281                  teleportAnimState_3 = ((((c0_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_3) ? 1 : 0) << 0xa) | ((((c3_3) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004d7281                  
004d7286                  if ((*(uint8_t*)((char*)teleportAnimState_3)[1] & 1) == 0)
004d7286                  {
004d7292                      teleportAnimState_3 = CPhysicsObj::get_curr_frame_number(this->teleportObj);
004d72a0                      __return = (0x78 - teleportAnimState_3);
004d72a4                      /* unimplemented  {fild st0, dword [esp+0x10]} */;
004d72a4                      
004d72a8                      if ((0x78 - teleportAnimState_3) < 0)
004d72aa                          /* unimplemented  {fadd dword [&data_79820c]} */;
004d72aa                      
004d72b0                      /* unimplemented  {fdiv st0, dword [&TELEPORT_ANIM_FPS]} */;
004d72b6                      __return = ((float)/* __return = fconvert.s(unimplemented  {fstp dword [esp+0x10], st0}) */);
004d72b6                      /* unimplemented  {fstp dword [esp+0x10], st0} */;
004d72ba                      /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d72be                      /* unimplemented  {fsub st0, qword [esi+0x660]} */;
004d72c4                      long double temp7_1 = ((long double)5.0);
004d72c4                      (/* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MAX_CONTINUE_TIME]} f- temp7_1 */ - temp7_1);
004d72c4                      bool c0_4 = /* bool c0_4 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MAX_CONTINUE_TIME]} f< temp7_1 */ < temp7_1;
004d72c4                      bool c2_4 = (FCMP_UO(/* bool c2_4 = is_unordered.t(unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MAX_CONTINUE_TIME]}, temp7_1) */, temp7_1));
004d72c4                      bool c3_4 = /* bool c3_4 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MAX_CONTINUE_TIME]} f== temp7_1 */ == temp7_1;
004d72c4                      /* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_MAX_CONTINUE_TIME]} */;
004d72ca                      teleportAnimState_3 = ((((c0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_4) ? 1 : 0) << 0xa) | ((((c3_4) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004d72ca                      
004d72cf                      if ((*(uint8_t*)((char*)teleportAnimState_3)[1] & 1) == 0)
004d72cf                      {
004d7307                      label_4d7307:
004d7307                          m_pSmartBox = m_pSmartBox_7;
004d730b                          this->teleportAnimState = TAS_TUNNEL_FADE_OUT;
004d7315                          this->teleportTransitionStartTime = Timer::cur_time_1;
004d731b                          *(uint32_t*)((char*)this->teleportTransitionStartTime)[4] = m_pSmartBox;
004d72cf                      }
004d72cf                      else
004d72cf                      {
004d72d1                          /* unimplemented  {fld st0, dword [esp+0x10]} */;
004d72d5                          /* unimplemented  {fld st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d72db                          /* unimplemented  {fadd qword [&data_7bd698]} */;
004d72e1                          (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
004d72e1                          bool c0_5 = /* bool c0_5 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_5 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
004d72e1                          bool c2_5 = (FCMP_UO(/* bool c2_5 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_5 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
004d72e1                          bool c3_5 = /* bool c3_5 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_5 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
004d72e1                          /* unimplemented  {fcompp } */;
004d72e1                          /* unimplemented  {fcompp } */;
004d72e3                          teleportAnimState_3 = ((((c0_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_5) ? 1 : 0) << 0xa) | ((((c3_5) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004d72e5                          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
004d72e5                          
004d72e8                          if (!(p_5))
004d72e8                          {
004d72ea                              /* unimplemented  {fld st0, dword [esp+0x10]} */;
004d72ee                              /* unimplemented  {fld st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d72f4                              /* unimplemented  {fadd qword [&data_7bd690]} */;
004d72fa                              (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
004d72fa                              bool c0_6 = /* bool c0_6 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_6 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
004d72fa                              bool c2_6 = (FCMP_UO(/* bool c2_6 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_6 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
004d72fa                              bool c3_6 = /* bool c3_6 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_6 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
004d72fa                              /* unimplemented  {fcompp } */;
004d72fa                              /* unimplemented  {fcompp } */;
004d72fc                              teleportAnimState_3 = ((((c0_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_6) ? 1 : 0) << 0xa) | ((((c3_6) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004d72fc                              
004d7301                              if ((*(uint8_t*)((char*)teleportAnimState_3)[1] & 0x41) == 0)
004d7301                                  goto label_4d7307;
004d72e8                          }
004d72cf                      }
004d7286                  }
004d726b              }
004d726b              
004d7328              if (this->teleportAnimState == TAS_WORLD_FADE_OUT)
004d7328              {
004d732a                  /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d732e                  /* unimplemented  {fsub st0, qword [esi+0x660]} */;
004d7334                  long double temp5_1 = ((long double)1.0);
004d7334                  (/* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f- temp5_1 */ - temp5_1);
004d7334                  bool c0_7 = /* bool c0_7 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f< temp5_1 */ < temp5_1;
004d7334                  bool c2_7 = (FCMP_UO(/* bool c2_7 = is_unordered.t(unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]}, temp5_1) */, temp5_1));
004d7334                  bool c3_7 = /* bool c3_7 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f== temp5_1 */ == temp5_1;
004d7334                  /* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d733a                  teleportAnimState_3 = ((((c0_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_7) ? 1 : 0) << 0xa) | ((((c3_7) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004d733a                  
004d733f                  if ((*(uint8_t*)((char*)teleportAnimState_3)[1] & 1) == 0)
004d733f                  {
004d7349                      this->teleportAnimState = TAS_TUNNEL_FADE_IN;
004d734f                      this->teleportTransitionStartTime = Timer::cur_time_1;
004d7355                      *(uint32_t*)((char*)this->teleportTransitionStartTime)[4] = m_pSmartBox_7;
004d733f                  }
004d7328              }
004d7328              
004d7361              if (this->teleportAnimState == TAS_TUNNEL_FADE_IN)
004d7361              {
004d7363                  /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d7367                  /* unimplemented  {fsub st0, qword [esi+0x660]} */;
004d736d                  long double temp6_1 = ((long double)1.0);
004d736d                  (/* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f- temp6_1 */ - temp6_1);
004d736d                  bool c0_8 = /* bool c0_8 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f< temp6_1 */ < temp6_1;
004d736d                  bool c2_8 = (FCMP_UO(/* bool c2_8 = is_unordered.t(unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]}, temp6_1) */, temp6_1));
004d736d                  bool c3_8 = /* bool c3_8 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f== temp6_1 */ == temp6_1;
004d736d                  /* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d7373                  teleportAnimState_3 = ((((c0_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_8) ? 1 : 0) << 0xa) | ((((c3_8) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004d7373                  
004d7378                  if ((*(uint8_t*)((char*)teleportAnimState_3)[1] & 1) == 0)
004d7378                  {
004d737a                      m_pSmartBox = Timer::cur_time_1;
004d7382                      this->teleportAnimState = TAS_TUNNEL;
004d738c                      this->teleportTransitionStartTime = m_pSmartBox;
004d7392                      *(uint32_t*)((char*)this->teleportTransitionStartTime)[4] = m_pSmartBox_7;
004d7378                  }
004d7361              }
004d7361              
004d739f              if (this->teleportAnimState == TAS_TUNNEL_FADE_OUT)
004d739f              {
004d73a5                  /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d73a9                  /* unimplemented  {fsub st0, qword [esi+0x660]} */;
004d73af                  long double temp8_1 = ((long double)1.0);
004d73af                  (/* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f- temp8_1 */ - temp8_1);
004d73af                  bool c0_9 = /* bool c0_9 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f< temp8_1 */ < temp8_1;
004d73af                  bool c2_9 = (FCMP_UO(/* bool c2_9 = is_unordered.t(unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]}, temp8_1) */, temp8_1));
004d73af                  bool c3_9 = /* bool c3_9 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f== temp8_1 */ == temp8_1;
004d73af                  /* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d73b5                  teleportAnimState_3 = ((((c0_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_9) ? 1 : 0) << 0xa) | ((((c3_9) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004d73b5                  
004d73ba                  if ((*(uint8_t*)((char*)teleportAnimState_3)[1] & 1) == 0)
004d73ba                  {
004d73bc                      /* unimplemented  {fld st0, dword [esi+0x670]} */;
004d73c2                      class SmartBox* m_pSmartBox_6 = m_pSmartBox;
004d73c9                      float var_cc_11 = ((float)/* float var_cc_11 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
004d73c9                      /* unimplemented  {fstp dword [esp], st0} */;
004d73ce                      SmartBox::SetOverrideFovDistance(this->m_pSmartBox, 1, var_cc_11);
004d73d3                      this->m_pPortalSpace->vtable->SetVisible(0);
004d73e6                      SmartBox::Show(this->m_pSmartBox);
004d73f1                      CPhysicsObj::clear_sequence_anims(this->teleportObj);
004d7405                      SoundManager::PlaySoundFromCenter(Sound_UI_ExitPortal, ClientUISystem::GetUISoundTable(ClientUISystem::GetUISystem()));
004d7405                      /* unimplemented  {call SoundManager::PlaySoundFromCenter} */;
004d7415                      this->teleportAnimState = TAS_WORLD_FADE_IN;
004d741f                      this->teleportTransitionStartTime = Timer::cur_time_1;
004d7425                      *(uint32_t*)((char*)this->teleportTransitionStartTime)[4] = m_pSmartBox_7;
004d73ba                  }
004d739f              }
004d739f              
004d7432              if (this->teleportAnimState == TAS_WORLD_FADE_IN)
004d7432              {
004d7434                  /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d7438                  /* unimplemented  {fsub st0, qword [esi+0x660]} */;
004d743e                  long double temp9_1 = ((long double)1.0);
004d743e                  (/* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f- temp9_1 */ - temp9_1);
004d743e                  bool c0_10 = /* bool c0_10 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f< temp9_1 */ < temp9_1;
004d743e                  bool c2_10 = (FCMP_UO(/* bool c2_10 = is_unordered.t(unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]}, temp9_1) */, temp9_1));
004d743e                  bool c3_10 = /* bool c3_10 = unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} f== temp9_1 */ == temp9_1;
004d743e                  /* unimplemented  {fcomp st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d7444                  teleportAnimState_3 = ((((c0_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_10) ? 1 : 0) << 0xa) | ((((c3_10) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
004d7444                  
004d7449                  if ((*(uint8_t*)((char*)teleportAnimState_3)[1] & 1) == 0)
004d7449                  {
004d744b                      /* unimplemented  {fld st0, qword [esp+0x18]} */;
004d7451                      /* unimplemented  {fsub st0, qword [&TELEPORT_ANIM_FADE_TIME]} */;
004d7457                      this->teleportTransitionStartTime = ((double)/* this->teleportTransitionStartTime = fconvert.d(unimplemented  {fstp qword [esi+0x660], st0}) */);
004d7457                      /* unimplemented  {fstp qword [esi+0x660], st0} */;
004d745d                      CPlayerSystem::SendLoginCompleteNotification(ebp_1);
004d7466                      CPlayerSystem::SetTeleportInProgress(ebp_1, 0);
004d746b                      class SmartBox* m_pSmartBox_2 = this->m_pSmartBox;
004d7475                      this->teleportAnimState = TAS_OFF;
004d747f                      SmartBox::SetOverrideFovDistance(m_pSmartBox_2, 0, 0f);
004d748a                      SmartBox::teleport_occured(this->m_pSmartBox);
004d7449                  }
004d7432              }
004d6ee8          }
004d6e5e      }
004d6e5e      
004d74ae      class CameraSet* eax_15 = ClientUISystem::AccessCameraSet(ClientUISystem::GetUISystem());
004d74ae      
004d74b5      if (eax_15 != 0)
004d74b5      {
004d74b9          CameraSet::UpdateCamera(eax_15);
004d74b9          /* unimplemented  {call CameraSet::UpdateCamera} */;
004d74b5      }
004d74b5      
004d74c6      if (this->m_pFPSDisplay != 0)
004d74ca          gmSmartBoxUI::UpdateFPSMeter(this);
004d74ca      
004d6e42      var_4;
004d6e30  }

004d74d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004d74e0  void __thiscall gmSmartBoxUI::ListenToGlobalMessage(class gmSmartBoxUI* this, uint32_t arg2, int32_t arg3)

004d74e0  {
004d74eb      if (arg2 == 3)
004d750b          gmSmartBoxUI::UseTime(this);
004d74eb      else if (arg2 == 0xd)
004d74f0      {
004d74f2          gmSmartBoxUI::UpdateLockedStatus(this);
004d74ff          UIElement_SmartBoxWrapper::ListenToGlobalMessage(this, arg2, arg3);
004d7506          return;
004d74f0      }
004d74f0      
004d7518      UIElement_SmartBoxWrapper::ListenToGlobalMessage(this, arg2, arg3);
004d74e0  }

004d7522        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d7530  void __thiscall RadarInfo::RadarInfo(struct RadarInfo* this, class ACCWeenieObject* arg2)

004d7530  {
004d7536      this->object = arg2;
004d753e      this->color.r = RGBAColor_Null.r;
004d753e      this->color.g = RGBAColor_Null.g;
004d753e      this->color.b = RGBAColor_Null.b;
004d753e      this->color.a = RGBAColor_Null.a;
004d755e      this->shape = Undef_RadarBlipShape;
004d7530  }

004d7568                          90 90 90 90 90 90 90 90                                                          ........

004d7570  void __fastcall RadarInfo::RadarInfo(struct RadarInfo* this)

004d7570  {
004d7572      this->object = 0;
004d757e      this->color.r = RGBAColor_Null.r;
004d757e      this->color.g = RGBAColor_Null.g;
004d757e      this->color.b = RGBAColor_Null.b;
004d757e      this->color.a = RGBAColor_Null.a;
004d759e      this->shape = Undef_RadarBlipShape;
004d7570  }

004d75a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004d75b0  enum UIElementMessageListenResult __thiscall gmRadarUI::ListenToElementMessage(class gmRadarUI* this, struct UIElementMessageInfo const* arg2)

004d75b0  {
004d75b6      uint32_t idMessage = arg2->idMessage;
004d75b6      
004d75be      if (idMessage != 0x18)
004d75be      {
004d75f9          if (idMessage == 0x19)
004d75f9          {
004d7601              if (arg2->idElement == 0x10000619)
004d7601              {
004d760a                  if (CPlayerSystem::GetPlayerSystem() != 0)
004d760a                  {
004d761b                      uint8_t var_c_2;
004d761b                      class CPlayerSystem* eax_6;
004d761b                      
004d761b                      if (PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0)
004d761b                      {
004d7626                          eax_6 = CPlayerSystem::GetPlayerSystem();
004d762b                          var_c_2 = 1;
004d761b                      }
004d761b                      else
004d761b                      {
004d761d                          eax_6 = CPlayerSystem::GetPlayerSystem();
004d7622                          var_c_2 = 0;
004d761b                      }
004d761b                      
004d7630                      PlayerModule::SetLockUI(&eax_6->playerModule.vtable, var_c_2);
004d763f                      UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance, 0xd, 0);
004d760a                  }
004d7601              }
004d7601              else if (arg2->pElement == this)
004d7654              {
004d7656                  uint32_t m_iidObjectUnderMouse = this->m_iidObjectUnderMouse;
004d7656                  
004d765e                  if (m_iidObjectUnderMouse != 0)
004d7663                      ACCWeenieObject::SetSelectedObject(m_iidObjectUnderMouse, 0);
004d7654              }
004d75f9          }
004d75be      }
004d75be      else if (arg2->pElement == this)
004d75c3      {
004d75d0          if (arg2->dwParam1 != 0)
004d75d0          {
004d75d2              UIListener::RegisterForGlobalMessage(this, 3);
004d75e1              return UIElement::ListenToElementMessage(this, arg2);
004d75d0          }
004d75d0          
004d75e4          UIListener::UnRegisterForGlobalMessage(this, 3);
004d75c3      }
004d75c3      
004d7675      return UIElement::ListenToElementMessage(this, arg2);
004d75b0  }

004d7678                                                                          90 90 90 90 90 90 90 90                          ........

004d7680  void __fastcall gmRadarUI::UpdateLockedStatus(class gmRadarUI* this)

004d7680  {
004d768a      if ((CPlayerSystem::GetPlayerSystem() != 0 && PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0))
004d768a      {
004d769d          this->m_pLockUIButton->vtable->SetState(0x10000063);
004d76b0          this->m_pDragButton->vtable->SetVisible(0);
004d76be          return;
004d768a      }
004d768a      
004d76bf      this->m_pLockUIButton->vtable->SetState(0x10000064);
004d76d2      this->m_pDragButton->vtable->SetVisible(1);
004d7680  }

004d76e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004d76f0  class RGBAColor* gmRadarUI::GetBlipColor(class RGBAColor* __return, class ACCWeenieObject* arg2)

004d76f0  {
004d76f8      if (arg2 != 0)
004d76f8      {
004d76fe          uint32_t _bitfield_1 = arg2->pwd._bitfield;
004d76fe          
004d7706          if (_bitfield_1 >= 0)
004d7706          {
004d770c              int32_t _blipColor = arg2->pwd._blipColor;
004d770c              
004d7714              if (_blipColor == 0)
004d7714              {
004d7915                  if ((_bitfield_1 & 0x40000) != 0)
004d7915                  {
004d7921                      float* __return_12 = __return;
004d7923                      *(uint32_t*)__return_12 = RGBAColor_RadarPortal.r;
004d792b                      __return_12[1] = RGBAColor_RadarPortal.g;
004d7934                      __return_12[2] = RGBAColor_RadarPortal.b;
004d793d                      __return_12[3] = RGBAColor_RadarPortal.a;
004d7942                      return __return;
004d7915                  }
004d7915                  
004d7946                  if ((*(uint8_t*)((char*)_bitfield_1)[1] & 2) != 0)
004d7946                  {
004d7952                      float* __return_13 = __return;
004d7954                      *(uint32_t*)__return_13 = RGBAColor_RadarVendor.r;
004d795c                      __return_13[1] = RGBAColor_RadarVendor.g;
004d7965                      __return_13[2] = RGBAColor_RadarVendor.b;
004d796e                      __return_13[3] = RGBAColor_RadarVendor.a;
004d7973                      return __return;
004d7946                  }
004d7946                  
004d7977                  if ((((_bitfield_1 & 0x10) != 0 && arg2->vtable->IsCreature() != 0) && arg2->vtable->IsPlayer() == 0))
004d7977                  {
004d7999                      float* __return_14 = __return;
004d799b                      *(uint32_t*)__return_14 = RGBAColor_RadarCreature.r;
004d79a3                      __return_14[1] = RGBAColor_RadarCreature.g;
004d79ac                      __return_14[2] = RGBAColor_RadarCreature.b;
004d79b5                      __return_14[3] = RGBAColor_RadarCreature.a;
004d79ba                      return __return;
004d7977                  }
004d7977                  
004d79c4                  if (arg2->vtable->IsPlayer() != 0)
004d79c4                  {
004d79ce                      uint32_t _bitfield = arg2->pwd._bitfield;
004d79d9                      float r = RGBAColor_RadarDefault.r;
004d79e0                      float b = RGBAColor_RadarDefault.b;
004d79e7                      float a = RGBAColor_RadarDefault.a;
004d79ee                      float g = RGBAColor_RadarDefault.g;
004d79ee                      
004d79f8                      if (((_bitfield & 0x100000) == 0 || (_bitfield & 0x40) != 0))
004d79f8                      {
004d7a1b                          if (arg2->vtable->IsPK() == 0)
004d7a1b                          {
004d7a42                              if (arg2->vtable->IsPKLite() != 0)
004d7a42                              {
004d7a44                                  r = RGBAColor_RadarPKLite.r;
004d7a4a                                  g = RGBAColor_RadarPKLite.g;
004d7a50                                  b = RGBAColor_RadarPKLite.b;
004d7a56                                  a = RGBAColor_RadarPKLite.a;
004d7a42                              }
004d7a42                              else if ((arg2->pwd._bitfield & 0x200000) != 0)
004d7a6c                              {
004d7a6e                                  r = RGBAColor_RadarCreature.r;
004d7a74                                  g = RGBAColor_RadarCreature.g;
004d7a7a                                  b = RGBAColor_RadarCreature.b;
004d7a80                                  a = RGBAColor_RadarCreature.a;
004d7a6c                              }
004d7a1b                          }
004d7a1b                          else
004d7a1b                          {
004d7a1d                              r = RGBAColor_RadarPlayerKiller.r;
004d7a23                              g = RGBAColor_RadarPlayerKiller.g;
004d7a29                              b = RGBAColor_RadarPlayerKiller.b;
004d7a2f                              a = RGBAColor_RadarPlayerKiller.a;
004d7a1b                          }
004d79f8                      }
004d79f8                      else
004d79f8                      {
004d79fa                          r = RGBAColor_RadarAdmin.r;
004d7a00                          g = RGBAColor_RadarAdmin.g;
004d7a06                          b = RGBAColor_RadarAdmin.b;
004d7a0c                          a = RGBAColor_RadarAdmin.a;
004d79f8                      }
004d79f8                      
004d7a86                      class ClientFellowshipSystem* eax_24 = ClientFellowshipSystem::GetFellowshipSystem();
004d7a86                      
004d7aa0                      if (ClientFellowshipSystem::IsFellowshipLeader(eax_24, arg2->id) == 0)
004d7aa0                      {
004d7acf                          if (ClientFellowshipSystem::IsFellow(eax_24, arg2->id) != 0)
004d7acf                          {
004d7ad1                              r = RGBAColor_RadarFellowship.r;
004d7ad7                              g = RGBAColor_RadarFellowship.g;
004d7add                              b = RGBAColor_RadarFellowship.b;
004d7ae3                              a = RGBAColor_RadarFellowship.a;
004d7acf                          }
004d7aa0                      }
004d7aa0                      else
004d7aa0                      {
004d7aa2                          r = RGBAColor_RadarFellowshipLeader.r;
004d7aa8                          g = RGBAColor_RadarFellowshipLeader.g;
004d7aae                          b = RGBAColor_RadarFellowshipLeader.b;
004d7ab4                          a = RGBAColor_RadarFellowshipLeader.a;
004d7aa0                      }
004d7aa0                      
004d7aed                      float* __return_15 = __return;
004d7aef                      *(uint32_t*)__return_15 = r;
004d7af1                      __return_15[1] = g;
004d7af4                      __return_15[2] = b;
004d7af8                      __return_15[3] = a;
004d7aff                      return __return;
004d79c4                  }
004d7714              }
004d7714              else
004d7714              {
004d771e                  if ((_blipColor - 1) > 9)
004d771e                  {
004d78ed                      float* __return_11 = __return;
004d78ef                      *(uint32_t*)__return_11 = RGBAColor_RadarDefault.r;
004d78f7                      __return_11[1] = RGBAColor_RadarDefault.g;
004d7900                      __return_11[2] = RGBAColor_RadarDefault.b;
004d7909                      __return_11[3] = RGBAColor_RadarDefault.a;
004d790e                      return __return;
004d771e                  }
004d771e                  
004d771e                  switch (_blipColor)
004d771e                  {
004d7735                      case 1:
004d7735                      {
004d7735                          float* __return_1 = __return;
004d7737                          *(uint32_t*)__return_1 = RGBAColor_RadarBlue.r;
004d773f                          __return_1[1] = RGBAColor_RadarBlue.g;
004d7748                          __return_1[2] = RGBAColor_RadarBlue.b;
004d7751                          __return_1[3] = RGBAColor_RadarBlue.a;
004d7756                          return __return;
004d7735                          break;
004d7735                      }
004d7761                      case 2:
004d7761                      {
004d7761                          float* __return_2 = __return;
004d7763                          *(uint32_t*)__return_2 = RGBAColor_RadarGold.r;
004d776b                          __return_2[1] = RGBAColor_RadarGold.g;
004d7774                          __return_2[2] = RGBAColor_RadarGold.b;
004d777d                          __return_2[3] = RGBAColor_RadarGold.a;
004d7782                          return __return;
004d7761                          break;
004d7761                      }
004d778d                      case 3:
004d778d                      {
004d778d                          float* __return_3 = __return;
004d778f                          *(uint32_t*)__return_3 = RGBAColor_RadarWhite.r;
004d7797                          __return_3[1] = RGBAColor_RadarWhite.g;
004d77a0                          __return_3[2] = RGBAColor_RadarWhite.b;
004d77a9                          __return_3[3] = RGBAColor_RadarWhite.a;
004d77ae                          return __return;
004d778d                          break;
004d778d                      }
004d77b9                      case 4:
004d77b9                      {
004d77b9                          float* __return_4 = __return;
004d77bb                          *(uint32_t*)__return_4 = RGBAColor_RadarPurple.r;
004d77c3                          __return_4[1] = RGBAColor_RadarPurple.g;
004d77cc                          __return_4[2] = RGBAColor_RadarPurple.b;
004d77d5                          __return_4[3] = RGBAColor_RadarPurple.a;
004d77da                          return __return;
004d77b9                          break;
004d77b9                      }
004d77e5                      case 5:
004d77e5                      {
004d77e5                          float* __return_5 = __return;
004d77e7                          *(uint32_t*)__return_5 = RGBAColor_RadarRed.r;
004d77ef                          __return_5[1] = RGBAColor_RadarRed.g;
004d77f8                          __return_5[2] = RGBAColor_RadarRed.b;
004d7801                          __return_5[3] = RGBAColor_RadarRed.a;
004d7806                          return __return;
004d77e5                          break;
004d77e5                      }
004d7811                      case 6:
004d7811                      {
004d7811                          float* __return_6 = __return;
004d7813                          *(uint32_t*)__return_6 = RGBAColor_RadarPink.r;
004d781b                          __return_6[1] = RGBAColor_RadarPink.g;
004d7824                          __return_6[2] = RGBAColor_RadarPink.b;
004d782d                          __return_6[3] = RGBAColor_RadarPink.a;
004d7832                          return __return;
004d7811                          break;
004d7811                      }
004d783d                      case 7:
004d783d                      {
004d783d                          float* __return_7 = __return;
004d783f                          *(uint32_t*)__return_7 = RGBAColor_RadarGreen.r;
004d7847                          __return_7[1] = RGBAColor_RadarGreen.g;
004d7850                          __return_7[2] = RGBAColor_RadarGreen.b;
004d7859                          __return_7[3] = RGBAColor_RadarGreen.a;
004d785e                          return __return;
004d783d                          break;
004d783d                      }
004d7869                      case 8:
004d7869                      {
004d7869                          float* __return_8 = __return;
004d786b                          *(uint32_t*)__return_8 = RGBAColor_RadarYellow.r;
004d7873                          __return_8[1] = RGBAColor_RadarYellow.g;
004d787c                          __return_8[2] = RGBAColor_RadarYellow.b;
004d7885                          __return_8[3] = RGBAColor_RadarYellow.a;
004d788a                          return __return;
004d7869                          break;
004d7869                      }
004d7895                      case 9:
004d7895                      {
004d7895                          float* __return_9 = __return;
004d7897                          *(uint32_t*)__return_9 = RGBAColor_RadarCyan.r;
004d789f                          __return_9[1] = RGBAColor_RadarCyan.g;
004d78a8                          __return_9[2] = RGBAColor_RadarCyan.b;
004d78b1                          __return_9[3] = RGBAColor_RadarCyan.a;
004d78b6                          return __return;
004d7895                          break;
004d7895                      }
004d78c1                      case 0xa:
004d78c1                      {
004d78c1                          float* __return_10 = __return;
004d78c3                          *(uint32_t*)__return_10 = RGBAColor_RadarBrightGreen.r;
004d78cb                          __return_10[1] = RGBAColor_RadarBrightGreen.g;
004d78d4                          __return_10[2] = RGBAColor_RadarBrightGreen.b;
004d78dd                          __return_10[3] = RGBAColor_RadarBrightGreen.a;
004d78e2                          return __return;
004d78c1                          break;
004d78c1                      }
004d771e                  }
004d7714              }
004d7706          }
004d76f8      }
004d76f8      
004d7b0a      float* __return_16 = __return;
004d7b0c      *(uint32_t*)__return_16 = RGBAColor_RadarDefault.r;
004d7b14      __return_16[1] = RGBAColor_RadarDefault.g;
004d7b1d      __return_16[2] = RGBAColor_RadarDefault.b;
004d7b26      __return_16[3] = RGBAColor_RadarDefault.a;
004d7b2b      return __return;
004d76f0  }

004d7b2c  uint32_t jump_table_4d7b2c[0xa] = 
004d7b2c  {
004d7b2c      [0x0] =  0x004d772b
004d7b30      [0x1] =  0x004d7757
004d7b34      [0x2] =  0x004d7783
004d7b38      [0x3] =  0x004d77af
004d7b3c      [0x4] =  0x004d77db
004d7b40      [0x5] =  0x004d7807
004d7b44      [0x6] =  0x004d7833
004d7b48      [0x7] =  0x004d785f
004d7b4c      [0x8] =  0x004d788b
004d7b50      [0x9] =  0x004d78b7
004d7b54  }

004d7b54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d7b60  enum RadarBlipShape __stdcall gmRadarUI::GetBlipShape(class gmRadarUI* this @ ecx, class ACCWeenieObject* arg2)

004d7b60  {
004d7b76      if ((arg2 == 0 || arg2->pwd._bitfield < 0))
004d7c25          return 0;
004d7c25      
004d7b7c      class ClientFellowshipSystem* eax_1 = ClientFellowshipSystem::GetFellowshipSystem();
004d7b7c      
004d7b90      if (ClientFellowshipSystem::IsFellow(eax_1, arg2->id) != 0)
004d7b90      {
004d7b98          int32_t eax_4 = ClientFellowshipSystem::IsFellowshipLeader(eax_1, arg2->id);
004d7b9d          char temp1 = eax_4;
004d7b9d          eax_4 = -(eax_4);
004d7ba6          return ((eax_4 - eax_4) + 6);
004d7b90      }
004d7b90      
004d7ba9      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004d7bb0      uint32_t player_id;
004d7bb0      
004d7bb0      if (SmartBox::smartbox_1 == 0)
004d7bba          player_id = 0;
004d7bb0      else
004d7bb2          player_id = SmartBox::smartbox_1->player_id;
004d7bb2      
004d7bbd      class ACCWeenieObject* eax_7 = ClientObjMaintSystem::GetWeenieObject(player_id);
004d7bbd      
004d7bc9      if (eax_7 != 0)
004d7bc9      {
004d7bd5          if (ACCWeenieObject::IsAllegianceMember(arg2, eax_7) != 0)
004d7bde              return 2;
004d7bde          
004d7be5          int32_t eax_11 = arg2->vtable->IsPK();
004d7bea          int32_t eax_12;
004d7bea          
004d7bea          if (eax_11 != 0)
004d7bf0              eax_12 = eax_7->vtable->IsPK();
004d7bf0          
004d7bf5          if ((eax_11 != 0 && eax_12 != 0))
004d7c14              return 3;
004d7c14          
004d7c00          if ((arg2->vtable->IsPKLite() != 0 && eax_7->vtable->IsPKLite() != 0))
004d7c14              return 3;
004d7bc9      }
004d7bc9      
004d7c1e      return 4;
004d7b60  }

004d7c28                          90 90 90 90 90 90 90 90                                                          ........

004d7c30  void __stdcall gmRadarUI::DrawPoint(class gmRadarUI const* this @ ecx, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d7c30  {
004d7c37      if (arg2 != 0)
004d7c37      {
004d7c3b          UISurface::PrepareSurface(arg2);
004d7c5a          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, arg4, arg5, arg4, arg5);
004d7c37      }
004d7c30  }

004d7c63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004d7c70  void __stdcall gmRadarUI::DrawEdges(class gmRadarUI const* this @ ecx, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d7c70  {
004d7c85      class RGBAColor* ebp_1;
004d7c85      
004d7c85      if (arg2 == 0)
004d7ca7          ebp_1 = arg3;
004d7c85      else
004d7c85      {
004d7c89          UISurface::PrepareSurface(arg2);
004d7c94          ebp_1 = arg3;
004d7ca0          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, arg4, (arg5 - 1), arg4, (arg5 - 1));
004d7c85      }
004d7c85      
004d7cad      if (arg2 != 0)
004d7cad      {
004d7cb1          UISurface::PrepareSurface(arg2);
004d7cc7          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, arg4, (arg5 + 1), arg4, (arg5 + 1));
004d7cc7          
004d7cce          if (arg2 != 0)
004d7cce          {
004d7cd2              UISurface::PrepareSurface(arg2);
004d7ce8              SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, (arg4 - 1), arg5, (arg4 - 1), arg5);
004d7cce          }
004d7cad      }
004d7cad      
004d7cf0      if (arg2 != 0)
004d7cf0      {
004d7cf4          UISurface::PrepareSurface(arg2);
004d7d07          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, (arg4 + 1), arg5, (arg4 + 1), arg5);
004d7cf0      }
004d7c70  }

004d7d13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d7d20  void __stdcall gmRadarUI::DrawCorners(class gmRadarUI const* this @ ecx, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d7d20  {
004d7d3c      if (arg2 != 0)
004d7d3c      {
004d7d40          UISurface::PrepareSurface(arg2);
004d7d5b          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 + 1), (arg5 + 1), (arg4 + 1), (arg5 + 1));
004d7d3c      }
004d7d3c      
004d7d64      if (arg2 != 0)
004d7d64      {
004d7d68          UISurface::PrepareSurface(arg2);
004d7d7f          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 - 1), (arg5 - 1), (arg4 - 1), (arg5 - 1));
004d7d7f          
004d7d86          if (arg2 != 0)
004d7d86          {
004d7d8a              UISurface::PrepareSurface(arg2);
004d7da1              SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 - 1), (arg5 + 1), (arg4 - 1), (arg5 + 1));
004d7da1              
004d7da8              if (arg2 != 0)
004d7da8              {
004d7dac                  UISurface::PrepareSurface(arg2);
004d7dc7                  SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 + 1), (arg5 - 1), (arg4 + 1), (arg5 - 1));
004d7da8              }
004d7d86          }
004d7d64      }
004d7d20  }

004d7dd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d7de0  void __thiscall gmRadarUI::DrawCross(class gmRadarUI const* this, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d7de0  {
004d7de0      class gmRadarUI* this_1 = this;
004d7de0      
004d7dfb      if (arg2 != 0)
004d7dfb      {
004d7dff          UISurface::PrepareSurface(arg2);
004d7e12          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, arg4, arg5, arg4, arg5);
004d7dfb      }
004d7dfb      
004d7e1f      gmRadarUI::DrawEdges(this, arg2, arg3, arg4, arg5);
004d7de0  }

004d7e2c                                      90 90 90 90                                                              ....

004d7e30  void __thiscall gmRadarUI::DrawX(class gmRadarUI const* this, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d7e30  {
004d7e30      class gmRadarUI* this_1 = this;
004d7e30      
004d7e4b      if (arg2 != 0)
004d7e4b      {
004d7e4f          UISurface::PrepareSurface(arg2);
004d7e62          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, arg4, arg5, arg4, arg5);
004d7e4b      }
004d7e4b      
004d7e6f      gmRadarUI::DrawCorners(this, arg2, arg3, arg4, arg5);
004d7e30  }

004d7e7c                                                                                      90 90 90 90                              ....

004d7e80  void __stdcall gmRadarUI::DrawTriangle(class gmRadarUI const* this @ ecx, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d7e80  {
004d7e92      if (arg2 != 0)
004d7e92      {
004d7e96          UISurface::PrepareSurface(arg2);
004d7ead          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, arg4, arg5, arg4, arg5);
004d7e92      }
004d7e92      
004d7eb8      class RGBAColor* ebp_1;
004d7eb8      
004d7eb8      if (arg2 == 0)
004d7eda          ebp_1 = arg3;
004d7eb8      else
004d7eb8      {
004d7ebc          UISurface::PrepareSurface(arg2);
004d7ec8          ebp_1 = arg3;
004d7ed3          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, (arg4 - 1), (arg5 + 1), (arg4 - 1), (arg5 + 1));
004d7eb8      }
004d7eb8      
004d7ee0      if (arg2 != 0)
004d7ee0      {
004d7ee4          UISurface::PrepareSurface(arg2);
004d7ef7          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, arg4, (arg5 + 1), arg4, (arg5 + 1));
004d7ee0      }
004d7ee0      
004d7eff      if (arg2 != 0)
004d7eff      {
004d7f03          UISurface::PrepareSurface(arg2);
004d7f16          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, (arg4 + 1), (arg5 + 1), (arg4 + 1), (arg5 + 1));
004d7eff      }
004d7e80  }

004d7f22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d7f30  void __stdcall gmRadarUI::DrawInvertedTriangle(class gmRadarUI const* this @ ecx, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d7f30  {
004d7f42      if (arg2 != 0)
004d7f42      {
004d7f46          UISurface::PrepareSurface(arg2);
004d7f5d          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, arg4, arg5, arg4, arg5);
004d7f42      }
004d7f42      
004d7f68      class RGBAColor* ebp_1;
004d7f68      
004d7f68      if (arg2 == 0)
004d7f8a          ebp_1 = arg3;
004d7f68      else
004d7f68      {
004d7f6c          UISurface::PrepareSurface(arg2);
004d7f78          ebp_1 = arg3;
004d7f83          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, (arg4 - 1), (arg5 - 1), (arg4 - 1), (arg5 - 1));
004d7f68      }
004d7f68      
004d7f90      if (arg2 != 0)
004d7f90      {
004d7f94          UISurface::PrepareSurface(arg2);
004d7fa7          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, arg4, (arg5 - 1), arg4, (arg5 - 1));
004d7f90      }
004d7f90      
004d7faf      if (arg2 != 0)
004d7faf      {
004d7fb3          UISurface::PrepareSurface(arg2);
004d7fc6          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, ebp_1, (arg4 + 1), (arg5 - 1), (arg4 + 1), (arg5 - 1));
004d7faf      }
004d7f30  }

004d7fd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004d7fe0  void __stdcall gmRadarUI::DrawSelected(class gmRadarUI const* this @ ecx, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d7fe0  {
004d7fe7      if (arg2 != 0)
004d7fe7      {
004d7ff2          UISurface::PrepareSurface(arg2);
004d801a          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 - 2), (arg5 + 3), (arg4 + 2), (arg5 + 3));
004d8021          UISurface::PrepareSurface(arg2);
004d8045          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 + 3), (arg5 - 2), (arg4 + 3), (arg5 + 2));
004d804c          UISurface::PrepareSurface(arg2);
004d8068          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 - 2), (arg5 - 3), (arg4 + 2), (arg5 - 3));
004d806f          UISurface::PrepareSurface(arg2);
004d808d          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 - 3), (arg5 - 2), (arg4 - 3), (arg5 + 2));
004d7fe7      }
004d7fe0  }

004d8099                                                                             90 90 90 90 90 90 90                           .......

004d80a0  void __fastcall HashBaseIter<unsigned long>::Next(class HashBaseIter<unsigned long>* this)

004d80a0  {
004d80a0      class HashBaseData<unsigned long>* curPtr_ = this->curPtr_;
004d80a0      
004d80a5      if (curPtr_ != 0)
004d80a5      {
004d80a7          this->lastThisChain_ = curPtr_;
004d80ad          this->curPtr_ = curPtr_->hash_next;
004d80a5      }
004d80a5      
004d80b5      if (this->curPtr_ == 0)
004d80b5      {
004d80b7          class HashBase<unsigned long>* myHash_ = this->myHash_;
004d80b7          
004d80c3          while (true)
004d80c3          {
004d80c3              uint32_t eax_3 = (this->curBucket_ + 1);
004d80c4              this->lastThisChain_ = nullptr;
004d80cb              this->curBucket_ = eax_3;
004d80cb              
004d80d1              if (eax_3 >= myHash_->table_size)
004d80d1              {
004d80e2                  this->fEnd_ = 1;
004d80e9                  break;
004d80d1              }
004d80d1              
004d80d6              class HashBaseData<unsigned long>* eax_4 = myHash_->buckets[eax_3];
004d80db              this->curPtr_ = eax_4;
004d80db              
004d80de              if (eax_4 != 0)
004d80e1                  return;
004d80c3          }
004d80b5      }
004d80a0  }

004d80eb                                   90 90 90 90 90                                                             .....

004d80f0  uint8_t __thiscall SmartArray<RadarInfo,1>::RemoveUnOrdered(class SmartArray<RadarInfo,1>* this, struct RadarInfo const* arg2)

004d80f0  {
004d80f6      struct RadarInfo* m_data = this->m_data;
004d80fa      uint32_t m_num = this->m_num;
004d8101      struct RadarInfo* i = m_data;
004d8108      class SmartArray<RadarInfo,1>* eax;
004d8108      
004d8108      if (i < &m_data[m_num])
004d8108      {
004d8125          do
004d8125          {
004d8112              if (i->object == arg2->object)
004d8112              {
004d8136                  this->m_num = (m_num - 1);
004d8144                  __builtin_memcpy(i, &m_data[(m_num - 1)], 0x18);
004d814c                  float r = RGBAColor_Null.r;
004d8158                  float g = RGBAColor_Null.g;
004d815c                  float b = RGBAColor_Null.b;
004d8162                  int32_t var_18 = 0;
004d8166                  float b_1 = b;
004d8170                  int32_t var_4 = 0;
004d8177                  float a = RGBAColor_Null.a;
004d818c                  __builtin_memcpy(&this->m_data[this->m_num], &var_18, 0x18);
004d8191                  eax = 1;
004d8197                  return 1;
004d8112              }
004d8112              
004d811c              i = &i[1];
004d8125          } while (i < &this->m_data[this->m_num]);
004d8108      }
004d8108      
004d812a      eax = 0;
004d8130      return 0;
004d80f0  }

004d819a                                                                                90 90 90 90 90 90                            ......

004d81a0  void __thiscall gmRadarUI::MoveTo(class gmRadarUI* this, int32_t const arg2, int32_t const arg3)

004d81a0  {
004d81a4      int32_t const ebx = arg2;
004d81af      int32_t const edi = arg3;
004d81af      
004d81bd      if (this->vtable->GetParent() != 0)
004d81bd      {
004d81e3          if (ebx > (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this)))
004d81ff              ebx = (UIRegion::GetWidth(this->vtable->GetParent()) - UIRegion::GetWidth(this));
004d81ff          
004d8203          if (ebx < 0)
004d8205              ebx = 0;
004d8205          
004d8227          if (arg3 > (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this)))
004d8243              edi = (UIRegion::GetHeight(this->vtable->GetParent()) - UIRegion::GetHeight(this));
004d8243          
004d8249          if (edi < 0)
004d824b              edi = 0;
004d81bd      }
004d81bd      
004d8251      UIElement::MoveTo(this, ebx, edi);
004d8266      class CPlayerModule* edi_3 = &CPlayerSystem::GetPlayerSystem()->playerModule;
004d8269      int32_t* var_8 = nullptr;
004d826d      int32_t* var_4 = nullptr;
004d8271      BaseProperty::SetPropertyName(&var_8, 0x10000086);
004d827a      int32_t m_x0 = this->m_box.m_x0;
004d827a      
004d827d      if (var_4 != 0)
004d827d      {
004d8283          BaseProperty::CheckCopyOnWrite(&var_8);
004d828f          *(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(m_x0);
004d827d      }
004d827d      
004d82a3      PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_8);
004d82b1      int32_t* var_10 = nullptr;
004d82b5      int32_t* var_c = nullptr;
004d82b9      BaseProperty::SetPropertyName(&var_10, 0x10000087);
004d82c2      int32_t m_y0 = this->m_box.m_y0;
004d82c2      
004d82c8      if (var_c != 0)
004d82c8      {
004d82ce          BaseProperty::CheckCopyOnWrite(&var_10);
004d82da          *(uint32_t*)(*(uint32_t*)var_c + 0x7c)(m_y0);
004d82c8      }
004d82c8      
004d82eb      PlayerModule::SetChatWindowOption(&edi_3->vtable, this->m_eWindowID, &var_10);
004d82f0      int32_t* eax_18 = var_10;
004d82f0      
004d82f6      if (eax_18 != 0)
004d82f6      {
004d8300          int32_t esi_2 = (eax_18[1] - 1);
004d82fd          eax_18[1] = esi_2;
004d82fd          
004d8307          if (esi_2 == 0)
004d830d              **(uint32_t**)eax_18(1);
004d830d          
004d830f          var_10 = nullptr;
004d82f6      }
004d82f6      
004d8319      if (var_c != 0)
004d8319      {
004d8323          int32_t esi_4 = (var_c[1] - 1);
004d8320          var_c[1] = esi_4;
004d8320          
004d832a          if (esi_4 == 0)
004d8330              **(uint32_t**)var_c(1);
004d8330          
004d8332          int32_t var_c_1 = 0;
004d8319      }
004d8319      
004d8336      int32_t* eax_23 = var_8;
004d8336      
004d833c      if (eax_23 != 0)
004d833c      {
004d8346          int32_t esi_6 = (eax_23[1] - 1);
004d8343          eax_23[1] = esi_6;
004d8343          
004d834d          if (esi_6 == 0)
004d8353              **(uint32_t**)eax_23(1);
004d8353          
004d8355          var_8 = nullptr;
004d833c      }
004d833c      
004d835f      if (var_4 != 0)
004d835f      {
004d8369          int32_t esi_8 = (var_4[1] - 1);
004d8366          var_4[1] = esi_8;
004d8366          
004d8370          if (esi_8 == 0)
004d8376              **(uint32_t**)var_4(1);
004d835f      }
004d81a0  }

004d8382        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d8390  void __thiscall gmRadarUI::RemoveObject(class gmRadarUI* this, class ACCWeenieObject* arg2)

004d8390  {
004d839d      if (arg2 != 0)
004d839d      {
004d83a1          struct gmNoticeHandler::VTable** eax_1;
004d83a1          
004d83a1          if (this == 0)
004d83ab              eax_1 = nullptr;
004d83a1          else
004d83a3              eax_1 = &this->vtable;
004d83a3          
004d83ad          arg2->vtable->UnRegisterAllNoticeHandlers(eax_1);
004d83c2          float b = RGBAColor_Null.b;
004d83c8          float g = RGBAColor_Null.g;
004d83d0          float r = RGBAColor_Null.r;
004d83d4          float a = RGBAColor_Null.a;
004d83e0          class ACCWeenieObject* var_18 = arg2;
004d83e4          float b_1 = b;
004d83e8          float a_1 = a;
004d83ec          int32_t var_4_1 = 0;
004d83f4          SmartArray<RadarInfo,1>::RemoveUnOrdered(&this->m_aRadarInfos, &var_18);
004d839d      }
004d8390  }

004d8401     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004d8410  class RGBAColor* gmRadarUI::GetBlipColor(class RGBAColor* __return, uint32_t arg2)

004d8410  {
004d8421      gmRadarUI::GetBlipColor(__return, ClientObjMaintSystem::GetWeenieObject(arg2));
004d842c      return __return;
004d8410  }

004d842d                                         90 90 90                                                               ...

004d8430  void __thiscall gmRadarUI::DrawHollow(class gmRadarUI const* this, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d8430  {
004d844a      gmRadarUI::DrawEdges(this, arg2, arg3, arg4, arg5);
004d8459      gmRadarUI::DrawCorners(this, arg2, arg3, arg4, arg5);
004d8430  }

004d8465                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004d8470  void __thiscall gmRadarUI::DrawXBox(class gmRadarUI const* this, class UISurface* arg2, class RGBAColor const* arg3, int32_t arg4, int32_t arg5)

004d8470  {
004d848a      gmRadarUI::DrawEdges(this, arg2, arg3, arg4, arg5);
004d8499      gmRadarUI::DrawCorners(this, arg2, arg3, arg4, arg5);
004d8499      
004d84ae      if (arg2 != 0)
004d84ae      {
004d84b2          UISurface::PrepareSurface(arg2);
004d84c9          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 - 2), (arg5 - 2), (arg4 - 2), (arg5 - 2));
004d84ae      }
004d84ae      
004d84d3      if (arg2 != 0)
004d84d3      {
004d84d7          UISurface::PrepareSurface(arg2);
004d84ea          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 + 2), (arg5 - 2), (arg4 + 2), (arg5 - 2));
004d84d3      }
004d84d3      
004d84f8      if (arg2 != 0)
004d84f8      {
004d84fc          UISurface::PrepareSurface(arg2);
004d8513          SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 - 2), (arg5 + 2), (arg4 - 2), (arg5 + 2));
004d8513          
004d851a          if (arg2 != 0)
004d851a          {
004d851e              UISurface::PrepareSurface(arg2);
004d8531              SurfaceWindow::FillArea(&arg2->m_pLocalSurface->window, arg3, (arg4 + 2), (arg5 + 2), (arg4 + 2), (arg5 + 2));
004d851a          }
004d84f8      }
004d8470  }

004d853d                                                                                         90 90 90                               ...

004d8540  void __fastcall gmRadarUI::UpdateFromPlayerModule(class gmRadarUI* this)

004d8540  {
004d8548      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
004d8548      
004d855c      if (((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0) && CPlayerSystem::GetPlayerSystem()->m_layoutFromFile == 0))
004d855c      {
004d8580          uint32_t m_eWindowID = this->m_eWindowID;
004d8596          int32_t var_8 = 0;
004d859a          int32_t* var_4_1 = nullptr;
004d859e          int32_t var_10 = 0;
004d85a2          int32_t* var_c_1 = nullptr;
004d85ad          int32_t var_18;
004d85ad          int32_t var_14;
004d85ad          
004d85ad          if ((((PlayerModule::InqChatWindowOption(&eax->playerModule.vtable, m_eWindowID, 0x10000086, &var_8) != 0 && (PlayerModule::InqChatWindowOption(&eax->playerModule.vtable, this->m_eWindowID, 0x10000087, &var_10) != 0 && var_4_1 != 0)) && (*(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_14) != 0 && var_c_1 != 0)) && *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_18) != 0))
004d85ff              this->vtable->MoveTo(var_14, var_18);
004d85ff          
004d860c          BaseProperty::~BaseProperty(&var_10);
004d8615          BaseProperty::~BaseProperty(&var_8);
004d855c      }
004d855c      
004d861c      gmRadarUI::UpdateLockedStatus(this);
004d8540  }

004d8628                          90 90 90 90 90 90 90 90                                                          ........

004d8630  void __fastcall SmartArray<RadarInfo,1>::Reset(class SmartArray<RadarInfo,1>* this)

004d8630  {
004d8636      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004d864a      this->m_num = 0;
004d864a      
004d864d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004d864d      {
004d8652          operator delete[](this->m_data);
004d865a          this->m_data = 0;
004d865c          this->m_sizeAndDeallocate = 0;
004d8664          return;
004d864d      }
004d864d      
004d8667      if (this->m_data != 0)
004d8667      {
004d8669          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
004d8669          
004d8671          if ((i_2 - 1) >= 0)
004d8671          {
004d8676              int32_t var_18 = 0;
004d867a              int32_t var_4_1 = 0;
004d867e              int32_t eax_2 = ((i_2 - 1) * 0x18);
004d8681              int32_t i_1 = i_2;
004d86cb              int32_t i;
004d86cb              
004d86cb              do
004d86cb              {
004d8698                  float r = RGBAColor_Null.r;
004d86a2                  float g = RGBAColor_Null.g;
004d86ac                  float b = RGBAColor_Null.b;
004d86b6                  void* edi_2 = (this->m_data + eax_2);
004d86b8                  float a = RGBAColor_Null.a;
004d86c5                  eax_2 -= 0x18;
004d86c8                  i = i_1;
004d86c8                  i_1 -= 1;
004d86c9                  __builtin_memcpy(edi_2, &var_18, 0x18);
004d86cb              } while (i != 1);
004d8671          }
004d8667      }
004d8630  }

004d8687                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
004d86d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004d86e0  uint8_t __thiscall SmartArray<RadarInfo,1>::grow(class SmartArray<RadarInfo,1>* this, uint32_t arg2)

004d86e0  {
004d86e8      uint32_t esi = arg2;
004d86ee      uint32_t eax;
004d86ee      
004d86ee      if (esi >= this->m_num)
004d86ee      {
004d86fe          int32_t eax_2;
004d86fe          
004d86fe          if (esi <= (this->m_sizeAndDeallocate & 0x7fffffff))
004d86fe          {
004d8792              eax_2 = 1;
004d8795              return 1;
004d86fe          }
004d86fe          
004d8706          if (esi == 0)
004d8706          {
004d8708              SmartArray<RadarInfo,1>::Reset(this);
004d870f              int32_t eax_3;
004d870f              eax_3 = 1;
004d8712              return 1;
004d8706          }
004d8706          
004d871c          eax = operator new[]((esi * 0x18));
004d871c          
004d8728          if (eax != 0)
004d8728          {
004d8733              `vector constructor iterator'(eax, 0x18, esi, RadarInfo::RadarInfo);
004d8733              
004d873b              if (this->m_data != 0)
004d873b              {
004d873d                  uint32_t m_num = this->m_num;
004d873d                  
004d8741                  if ((m_num - 1) >= 0)
004d8741                  {
004d8746                      eax_2 = ((m_num - 1) * 0x18);
004d8749                      int32_t edx_1 = m_num;
004d8762                      int32_t i;
004d8762                      
004d8762                      do
004d8762                      {
004d8752                          void* esi_2 = (this->m_data + eax_2);
004d8754                          int32_t edi_1 = (eax_2 + eax);
004d875c                          eax_2 -= 0x18;
004d875f                          i = edx_1;
004d875f                          edx_1 -= 1;
004d8760                          __builtin_memcpy(edi_1, esi_2, 0x18);
004d8762                      } while (i != 1);
004d8764                      esi = arg2;
004d8741                  }
004d8741                  
004d8778                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004d877d                      operator delete[](this->m_data);
004d873b              }
004d873b              
004d878b              this->m_data = eax;
004d878d              this->m_sizeAndDeallocate = (esi | 0x80000000);
004d8792              eax_2 = 1;
004d8795              return 1;
004d8728          }
004d86ee      }
004d86ee      
004d879a      eax = 0;
004d879d      return 0;
004d86e0  }


004d87a0  void __thiscall gmRadarUI::gmRadarUI(class gmRadarUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004d87a0  {
004d87b0      UIElement_Field::UIElement_Field(this, arg2, arg3);
004d87bb      this->vtable = &gmUrgentAssistanceUI::`vftable';
004d87c5      this->vtable = &QualityChangeHandler::`vftable';
004d87d1      this->vtable = 0x7bdbc0;
004d87d7      this->vtable = &gmRadarUI::`vftable';
004d87e1      this->vtable = &gmRadarUI::`vftable';
004d87eb      this->m_fRadarRange = 75f;
004d87f2      __builtin_memset(&this->m_aRadarInfos, 0, 0x14);
004d8817      Vector2::Vector2(&this->m_vecCenterPoint, 0f, 0f);
004d881c      __builtin_memset(&this->m_nRadarRadius, 0, 0x3c);
004d8876      __builtin_memset(&this->m_ttNextUpdateTime, 0, 0x1c);
004d87a0  }

004d88a7                       90 90 90 90 90 90 90 90 90                                                         .........

004d88b0  class UIElement* __thiscall gmRadarUI::DynamicCast(class gmRadarUI* this, uint32_t arg2) __pure

004d88b0  {
004d88bc      if (arg2 == 0x10000010)
004d88c9          return this;
004d88c9      
004d88c3      int32_t edx_1;
004d88c3      edx_1 = arg2 != 3;
004d88c7      return (this & (edx_1 - 1));
004d88b0  }

004d88cc                                      90 90 90 90                                                              ....

004d88d0  uint32_t gmRadarUI::GetUIElementType(class gmRadarUI const* this @ ecx) __pure

004d88d0  {
004d88d5      return 0x10000010;
004d88d0  }

004d88d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d88e0  void __fastcall gmRadarUI::~gmRadarUI(class gmRadarUI* this)

004d88e0  {
004d88f3      this->vtable = 0x7bdbc0;
004d88e5      this->vtable = &gmRadarUI::`vftable';
004d88eb      this->vtable = &gmRadarUI::`vftable';
004d8905      UIListener::UnRegisterForGlobalMessage(this, 3);
004d8913      *(int32_t*)((char*)QualityRegistrar::s_pQR->vtable + 0x14)(&this->vtable);
004d8916      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
004d8916      
004d891d      if (eax_1 != 0)
004d891f          eax_1->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004d891f      
004d892d      CAsyncStateHandler::OnStateHandlerInit(&this->m_vecCenterPoint);
004d892d      
004d8942      if ((this->m_aRadarInfos.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004d894b          operator delete[](this->m_aRadarInfos.m_data);
004d894b      
004d88e5      this->vtable = &gmUrgentAssistanceUI::`vftable';
004d895b      NoticeHandler::~NoticeHandler(&this->vtable);
004d8965      /* tailcall */
004d8965      return UIElement_Field::~UIElement_Field(this);
004d88e0  }

004d896a                                90 90 90 90 90 90                                                            ......

004d8970  class UIElement* gmRadarUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004d8970  {
004d8975      void* eax = operator new(0x680);
004d8975      
004d897f      if (eax == 0)
004d8995          return 0;
004d8995      
004d8992      return gmRadarUI::gmRadarUI(eax, arg1, arg2);
004d8970  }

004d8996                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004d89a0  void __thiscall gmRadarUI::RecvNotice_BeingDeleted(class gmRadarUI* this, class CWeenieObject* arg2)

004d89a0  {
004d89a6      /* tailcall */
004d89a6      return gmRadarUI::RemoveObject(((char*)this - 0x5f8), arg2);
004d89a0  }

004d89ab                                   90 90 90 90 90                                                             .....

004d89b0  void __thiscall gmRadarUI::UpdateRadarLook(class gmRadarUI* this, class ACCWeenieObject* arg2)

004d89b0  {
004d89bd      if (arg2 != 0)
004d89bd      {
004d89bf          uint32_t m_num = this->m_aRadarInfos.m_num;
004d89c5          int32_t eax_1 = 0;
004d89c5          
004d89c9          if (m_num > 0)
004d89c9          {
004d89cc              struct RadarInfo* m_data = this->m_aRadarInfos.m_data;
004d89cc              
004d89d4              while (m_data->object != arg2)
004d89d4              {
004d89d6                  eax_1 += 1;
004d89d7                  m_data = &m_data[1];
004d89d7                  
004d89dc                  if (eax_1 >= m_num)
004d89e4                      return;
004d89d4              }
004d89d4              
004d89ed              void __return;
004d89ed              int32_t* eax_2 = gmRadarUI::GetBlipColor(&__return, arg2);
004d89f4              m_data->color.r = *(uint32_t*)eax_2;
004d89f4              m_data->color.g = eax_2[1];
004d89f4              m_data->color.b = eax_2[2];
004d89f4              m_data->color.a = eax_2[3];
004d8a16              m_data->shape = gmRadarUI::GetBlipShape(this, arg2);
004d89c9          }
004d89bd      }
004d89b0  }

004d8a22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004d8a30  void __thiscall gmRadarUI::DrawBlip(class gmRadarUI const* this, class UISurface* arg2, struct RadarInfo const* arg3, float arg4, int32_t arg5, int32_t arg6, uint8_t arg7)

004d8a30  {
004d8a34      class gmRadarUI* this_1 = this;
004d8a3b      this = ClientUISystem::GetUISystem()->m_bRadarBlank;
004d8a3b      
004d8a40      if (this == 0)
004d8a40      {
004d8a4f          enum RadarBlipShape shape = arg3->shape;
004d8a52          float r = arg3->color.r;
004d8a6b          r = ((float)(((long double)r) * ((long double)arg4)));
004d8a85          float var_c_2 = ((float)(((long double)arg3->color.g) * ((long double)arg4)));
004d8a9a          float var_8_2 = ((float)(((long double)arg3->color.b) * ((long double)arg4)));
004d8a9e          float a = arg3->color.a;
004d8a9e          
004d8aa2          if ((shape - 1) <= 6)
004d8aa4              switch (shape)
004d8aa4              {
004d8ab5                  case Circle_RadarBlipShape:
004d8ab5                  {
004d8ab5                      gmRadarUI::DrawPoint(this_1, arg2, &r, arg5, arg6);
004d8ab5                      break;
004d8ab5                  }
004d8ac6                  case Box_RadarBlipShape:
004d8ac6                  {
004d8ac6                      gmRadarUI::DrawHollow(this_1, arg2, &r, arg5, arg6);
004d8ac6                      break;
004d8ac6                  }
004d8ae8                  case X_RadarBlipShape:
004d8ae8                  {
004d8ae8                      gmRadarUI::DrawX(this_1, arg2, &r, arg5, arg6);
004d8ae8                      break;
004d8ae8                  }
004d8ad7                  case Plus_RadarBlipShape:
004d8ad7                  {
004d8ad7                      gmRadarUI::DrawCross(this_1, arg2, &r, arg5, arg6);
004d8ad7                      break;
004d8ad7                  }
004d8b0a                  case Triangle_RadarBlipShape:
004d8b0a                  {
004d8b0a                      gmRadarUI::DrawTriangle(this_1, arg2, &r, arg5, arg6);
004d8b0a                      break;
004d8b0a                  }
004d8b1b                  case InvertedTriangle_RadarBlipShape:
004d8b1b                  {
004d8b1b                      gmRadarUI::DrawInvertedTriangle(this_1, arg2, &r, arg5, arg6);
004d8b1b                      break;
004d8b1b                  }
004d8af9                  case XBox_RadarBlipShape:
004d8af9                  {
004d8af9                      gmRadarUI::DrawXBox(this_1, arg2, &r, arg5, arg6);
004d8af9                      break;
004d8af9                  }
004d8aa4              }
004d8aa4          
004d8b20          int32_t eax_2;
004d8b20          eax_2 = arg7;
004d8b20          
004d8b26          if (eax_2 != 0)
004d8b32              gmRadarUI::DrawSelected(this_1, arg2, &r, arg5, arg6);
004d8a40      }
004d8a30  }

004d8b41     8d 49 00                                                                                       .I.
004d8b44  uint32_t jump_table_4d8b44[0x7] = 
004d8b44  {
004d8b44      [0x0] =  0x004d8aab
004d8b48      [0x1] =  0x004d8abc
004d8b4c      [0x2] =  0x004d8ade
004d8b50      [0x3] =  0x004d8acd
004d8b54      [0x4] =  0x004d8b00
004d8b58      [0x5] =  0x004d8b11
004d8b5c      [0x6] =  0x004d8aef
004d8b60  }

004d8b60  void* __thiscall gmRadarUI::`scalar deleting destructor'(class gmRadarUI* this, uint32_t arg2)

004d8b60  {
004d8b63      gmRadarUI::~gmRadarUI(this);
004d8b63      
004d8b6d      if ((arg2 & 1) != 0)
004d8b70          operator delete(this);
004d8b70      
004d8b7b      return this;
004d8b60  }

004d8b7e                                                                                            90 90                                ..

004d8b80  void gmRadarUI::Register()

004d8b80  {
004d8b8a      UIElement::RegisterElementClass(0x10000010, gmRadarUI::Create);
004d8b80  }

004d8b93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d8ba0  void __thiscall gmRadarUI::RecvNotice_ChangeRadarLook(class gmRadarUI* this, class CWeenieObject* arg2)

004d8ba0  {
004d8ba6      /* tailcall */
004d8ba6      return gmRadarUI::UpdateRadarLook(((char*)this - 0x5f8), arg2);
004d8ba0  }

004d8bab                                   90 90 90 90 90                                                             .....

004d8bb0  void __thiscall gmRadarUI::OnQualityChanged(class gmRadarUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004d8bb0  {
004d8bb0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004d8bc5      uint32_t player_id;
004d8bc5      
004d8bc5      if (SmartBox::smartbox_1 == 0)
004d8bcf          player_id = 0;
004d8bc5      else
004d8bc7          player_id = SmartBox::smartbox_1->player_id;
004d8bc7      
004d8bd3      if (arg2->id != player_id)
004d8bd3      {
004d8c4d          gmRadarUI::UpdateRadarLook(((char*)this - 0x5fc), arg2);
004d8c4d          return;
004d8bd3      }
004d8bd3      
004d8bd8      int32_t i = 0;
004d8bd8      
004d8bdc      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] > 0)
004d8bdc      {
004d8be0          int32_t ebx = 0;
004d8be0          
004d8c3a          do
004d8c3a          {
004d8be2              struct IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::VTable* vtable = this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable;
004d8be5              int32_t* ecx_1 = *(uint32_t*)((char*)vtable + ebx);
004d8be8              int32_t* esi_1 = ((char*)vtable + ebx);
004d8be8              
004d8bec              if ((ecx_1 != 0 && *(uint32_t*)(*(uint32_t*)ecx_1 + 0x10)() != 0))
004d8bec              {
004d8bff                  void __return;
004d8bff                  class RGBAColor* eax_3 = gmRadarUI::GetBlipColor(&__return, *(uint32_t*)esi_1);
004d8c06                  esi_1[1] = eax_3->r;
004d8c06                  esi_1[2] = eax_3->g;
004d8c06                  esi_1[3] = eax_3->b;
004d8c06                  esi_1[4] = eax_3->a;
004d8c2e                  esi_1[5] = gmRadarUI::GetBlipShape(((char*)this - 0x5fc), *(uint32_t*)esi_1);
004d8bec              }
004d8bec              
004d8c34              i += 1;
004d8c35              ebx += 0x18;
004d8c3a          } while (i < this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1]);
004d8bdc      }
004d8bb0  }

004d8c5a                                                                                90 90 90 90 90 90                            ......

004d8c60  void __thiscall gmRadarUI::OnQualityRemoved(class gmRadarUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004d8c60  {
004d8c6b      gmRadarUI::UpdateRadarLook(((char*)this - 0x5fc), arg2);
004d8c60  }

004d8c73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d8c80  void __fastcall gmRadarUI::UpdateCoordinates(class gmRadarUI* this)

004d8c80  {
004d8c8d      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
004d8c8d      
004d8c96      if (eax != 0)
004d8c96      {
004d8c9f          char var_24_1 = 0;
004d8c9f          
004d8cab          if (PlayerModule::CoordinatesOnRadar(&eax->playerModule.vtable) != 0)
004d8cab          {
004d8cbd              class UIElement_Text* var_18 = nullptr;
004d8cc5              int32_t var_14_1 = 0;
004d8ccd              int32_t var_20 = 0;
004d8cd5              int32_t var_1c_1 = 0;
004d8cd5              
004d8ce4              if (CPlayerSystem::InqPlayerCoords(eax, &var_18, &var_20) != 0)
004d8ce4              {
004d8cee                  var_24_1 = 1;
004d8cf3                  (((long double)var_18) - ((long double)this->m_fCurXCoord));
004d8cfb                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004d8cfe                  bool p_2;
004d8cfe                  
004d8cfe                  if (!(p_1))
004d8cfe                  {
004d8d04                      (((long double)var_20) - ((long double)this->m_fCurYCoord));
004d8d0c                      p_2 = /* p_2 = unimplemented  {test ah, 0x44} */;
004d8cfe                  }
004d8cfe                  
004d8d0f                  if ((p_1 || p_2))
004d8d0f                  {
004d8d21                      *(uint32_t*)((char*)this->m_fCurXCoord)[4] = var_14_1;
004d8d2f                      this->m_fCurXCoord = var_18;
004d8d39                      this->m_fCurYCoord = var_20;
004d8d3f                      *(uint32_t*)((char*)this->m_fCurYCoord)[4] = var_1c_1;
004d8d45                      double var_30;
004d8d45                      double var_10;
004d8d45                      
004d8d45                      if (this->m_pCombinedCoordsText != 0)
004d8d45                      {
004d8d4b                          long double x87_r7_3 = ((long double)var_18);
004d8d4f                          long double temp2_1 = ((long double)0.0);
004d8d4f                          (x87_r7_3 - temp2_1);
004d8d55                          class UIElement_Text* eax_4;
004d8d55                          eax_4 = ((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
004d8d57                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
004d8d5a                          void (__thiscall** const edx_3)(class gmNoticeHandler* this);
004d8d5a                          
004d8d5a                          if (p_3)
004d8d5a                          {
004d8d63                              long double x87_r7_4 = ((long double)var_18);
004d8d67                              edx_3 = &gmJournalUI::`vftable'.RecvNotice_LastSpellTab;
004d8d6c                              long double temp4_1 = ((long double)0.0);
004d8d6c                              (x87_r7_4 - temp4_1);
004d8d72                              eax_4 = ((((x87_r7_4 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp4_1) ? 1 : 0) << 0xe) | 0))));
004d8d72                              
004d8d77                              if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) != 0)
004d8d79                                  edx_3 = &data_794320;
004d8d5a                          }
004d8d5a                          else
004d8d5c                              edx_3 = &gmJournalUI::`vftable'.RecvNotice_NextSpellSelection;
004d8d5c                          
004d8d7e                          long double x87_r7_5 = ((long double)var_20);
004d8d82                          long double temp7_1 = ((long double)0.0);
004d8d82                          (x87_r7_5 - temp7_1);
004d8d88                          eax_4 = ((((x87_r7_5 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp7_1) ? 1 : 0) << 0xe) | 0))));
004d8d8a                          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
004d8d8d                          void (__thiscall** const ecx_3)(class gmNoticeHandler* this);
004d8d8d                          
004d8d8d                          if (p_4)
004d8d8d                          {
004d8d96                              long double x87_r7_6 = ((long double)var_20);
004d8d9a                              ecx_3 = &gmJournalUI::`vftable'.RecvNotice_FirstSpellTab;
004d8d9f                              long double temp10_1 = ((long double)0.0);
004d8d9f                              (x87_r7_6 - temp10_1);
004d8da5                              eax_4 = ((((x87_r7_6 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp10_1) ? 1 : 0) << 0xe) | 0))));
004d8da5                              
004d8daa                              if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) != 0)
004d8dac                                  ecx_3 = &data_794320;
004d8d8d                          }
004d8d8d                          else
004d8d8f                              ecx_3 = &gmJournalUI::`vftable'.RecvNotice_LastSpellSelection;
004d8d8f                          
004d8db1                          long double x87_r7_7 = ((long double)var_18);
004d8db5                          long double temp12_1 = ((long double)0.0);
004d8db5                          (x87_r7_7 - temp12_1);
004d8dbb                          eax_4 = ((((x87_r7_7 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp12_1) ? 1 : 0) << 0xe) | 0))));
004d8dbb                          
004d8dc0                          if ((*(uint8_t*)((char*)eax_4)[1] & 1) != 0)
004d8dda                              var_30 = ((double)-(((long double)var_18)));
004d8dc0                          else
004d8dc0                          {
004d8dca                              var_30 = var_18;
004d8dce                              *(uint32_t*)((char*)var_30)[4] = var_14_1;
004d8dc0                          }
004d8dc0                          
004d8dde                          long double x87_r7_10 = ((long double)var_20);
004d8de2                          long double temp13_1 = ((long double)0.0);
004d8de2                          (x87_r7_10 - temp13_1);
004d8de8                          eax_4 = ((((x87_r7_10 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp13_1) ? 1 : 0) << 0xe) | 0))));
004d8de8                          
004d8ded                          if ((*(uint8_t*)((char*)eax_4)[1] & 1) != 0)
004d8e07                              var_10 = ((double)-(((long double)var_20)));
004d8ded                          else
004d8ded                          {
004d8df7                              var_10 = var_20;
004d8dfb                              *(uint32_t*)((char*)var_10)[4] = var_1c_1;
004d8ded                          }
004d8ded                          
004d8e0f                          void (__thiscall** const var_3c_2)(class gmNoticeHandler* this) = edx_3;
004d8e14                          int32_t var_40_2 = *(uint32_t*)((char*)var_30)[4];
004d8e19                          int32_t var_44_1 = var_30;
004d8e1a                          void (__thiscall** const var_48_1)(class gmNoticeHandler* this) = ecx_3;
004d8e1f                          int32_t var_4c_1 = *(uint32_t*)((char*)var_10)[4];
004d8e20                          int32_t var_50_1 = var_10;
004d8e2d                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_30, Formatted, u"%.1f%s,%.1f%s");
004d8e40                          UIElement_Text::SetText(this->m_pCombinedCoordsText, &var_30);
004d8e49                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30);
004d8d45                      }
004d8d45                      
004d8e56                      if (this->m_pYCoordText != 0)
004d8e56                      {
004d8e5c                          long double x87_r7_13 = ((long double)var_20);
004d8e60                          long double temp3_1 = ((long double)0.0);
004d8e60                          (x87_r7_13 - temp3_1);
004d8e66                          class UIElement_Text* eax_7;
004d8e66                          eax_7 = ((((x87_r7_13 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004d8e68                          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
004d8e6b                          void (__thiscall** const ecx_7)(class gmNoticeHandler* this);
004d8e6b                          
004d8e6b                          if (p_5)
004d8e6b                          {
004d8e74                              long double x87_r7_14 = ((long double)var_20);
004d8e78                              ecx_7 = &gmJournalUI::`vftable'.RecvNotice_FirstSpellTab;
004d8e7d                              long double temp6_1 = ((long double)0.0);
004d8e7d                              (x87_r7_14 - temp6_1);
004d8e83                              eax_7 = ((((x87_r7_14 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_14, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_14 == temp6_1) ? 1 : 0) << 0xe) | 0))));
004d8e83                              
004d8e88                              if ((*(uint8_t*)((char*)eax_7)[1] & 0x41) != 0)
004d8e8a                                  ecx_7 = &data_794320;
004d8e6b                          }
004d8e6b                          else
004d8e6d                              ecx_7 = &gmJournalUI::`vftable'.RecvNotice_LastSpellSelection;
004d8e6d                          
004d8e8f                          long double x87_r7_15 = ((long double)var_20);
004d8e93                          long double temp9_1 = ((long double)0.0);
004d8e93                          (x87_r7_15 - temp9_1);
004d8e99                          eax_7 = ((((x87_r7_15 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_15, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_15 == temp9_1) ? 1 : 0) << 0xe) | 0))));
004d8e99                          
004d8e9e                          if ((*(uint8_t*)((char*)eax_7)[1] & 1) != 0)
004d8eb8                              var_10 = ((double)-(((long double)var_20)));
004d8e9e                          else
004d8e9e                          {
004d8ea8                              var_10 = var_20;
004d8eac                              *(uint32_t*)((char*)var_10)[4] = var_1c_1;
004d8e9e                          }
004d8e9e                          
004d8ec0                          void (__thiscall** const var_3c_4)(class gmNoticeHandler* this) = ecx_7;
004d8ec5                          int32_t var_40_3 = *(uint32_t*)((char*)var_10)[4];
004d8ec6                          int32_t var_44_2 = var_10;
004d8ed3                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_30, Formatted, u"%.1f%s");
004d8ee6                          UIElement_Text::SetText(this->m_pYCoordText, &var_30);
004d8eef                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30);
004d8e56                      }
004d8e56                      
004d8efc                      if (this->m_pXCoordText != 0)
004d8efc                      {
004d8f02                          long double x87_r7_18 = ((long double)var_18);
004d8f06                          long double temp5_1 = ((long double)0.0);
004d8f06                          (x87_r7_18 - temp5_1);
004d8f0c                          class UIElement_Text* eax_9;
004d8f0c                          eax_9 = ((((x87_r7_18 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_18, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_18 == temp5_1) ? 1 : 0) << 0xe) | 0))));
004d8f0e                          bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
004d8f11                          void (__thiscall** const ecx_11)(class gmNoticeHandler* this);
004d8f11                          
004d8f11                          if (p_6)
004d8f11                          {
004d8f1a                              long double x87_r7_19 = ((long double)var_18);
004d8f1e                              ecx_11 = &gmJournalUI::`vftable'.RecvNotice_LastSpellTab;
004d8f23                              long double temp8_1 = ((long double)0.0);
004d8f23                              (x87_r7_19 - temp8_1);
004d8f29                              eax_9 = ((((x87_r7_19 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_19, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_19 == temp8_1) ? 1 : 0) << 0xe) | 0))));
004d8f29                              
004d8f2e                              if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
004d8f30                                  ecx_11 = &data_794320;
004d8f11                          }
004d8f11                          else
004d8f13                              ecx_11 = &gmJournalUI::`vftable'.RecvNotice_NextSpellSelection;
004d8f13                          
004d8f35                          long double x87_r7_20 = ((long double)var_18);
004d8f39                          long double temp11_1 = ((long double)0.0);
004d8f39                          (x87_r7_20 - temp11_1);
004d8f3f                          eax_9 = ((((x87_r7_20 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_20, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r7_20 == temp11_1) ? 1 : 0) << 0xe) | 0))));
004d8f3f                          
004d8f44                          if ((*(uint8_t*)((char*)eax_9)[1] & 1) != 0)
004d8f5e                              var_10 = ((double)-(((long double)var_18)));
004d8f44                          else
004d8f44                          {
004d8f4e                              var_10 = var_18;
004d8f52                              *(uint32_t*)((char*)var_10)[4] = var_14_1;
004d8f44                          }
004d8f44                          
004d8f66                          void (__thiscall** const var_3c_6)(class gmNoticeHandler* this) = ecx_11;
004d8f6b                          int32_t var_40_4 = *(uint32_t*)((char*)var_10)[4];
004d8f6c                          int32_t var_44_3 = var_10;
004d8f79                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_30, Formatted, u"%.1f%s");
004d8f8c                          UIElement_Text::SetText(this->m_pXCoordText, &var_30);
004d8f95                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30);
004d8efc                      }
004d8d0f                  }
004d8ce4              }
004d8cab          }
004d8cab          
004d8f9a          class UIElement* m_pCoordinateContainerField = this->m_pCoordinateContainerField;
004d8fa2          int32_t edi_3 = var_24_1;
004d8fa2          
004d8fa6          if (m_pCoordinateContainerField != 0)
004d8fa8              m_pCoordinateContainerField->vtable->SetVisible(edi_3);
004d8fa8          
004d8fae          class UIElement_Text* m_pCombinedCoordsText = this->m_pCombinedCoordsText;
004d8fae          
004d8fb6          if (m_pCombinedCoordsText != 0)
004d8fb8              m_pCombinedCoordsText->vtable->SetVisible(edi_3);
004d8fb8          
004d8fbe          class UIElement_Text* m_pXCoordText = this->m_pXCoordText;
004d8fbe          
004d8fc6          if (m_pXCoordText != 0)
004d8fc8              m_pXCoordText->vtable->SetVisible(edi_3);
004d8fc8          
004d8fce          class UIElement_Text* m_pYCoordText = this->m_pYCoordText;
004d8fce          
004d8fd6          if (m_pYCoordText != 0)
004d8fd8              m_pYCoordText->vtable->SetVisible(edi_3);
004d8fd8          
004d8fde          this->m_pLockUIButton->vtable->SetVisible(1);
004d8c96      }
004d8c80  }

004d8ff1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004d9000  uint8_t __thiscall SmartArray<RadarInfo,1>::AddToEnd(class SmartArray<RadarInfo,1>* this, struct RadarInfo const* arg2)

004d9000  {
004d9009      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
004d9009      
004d9010      if (this->m_num >= eax_1)
004d9010      {
004d901e          uint8_t result = SmartArray<RadarInfo,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
004d901e          
004d9025          if (result == 0)
004d9028              return result;
004d9010      }
004d9010      
004d9041      __builtin_memcpy(&this->m_data[this->m_num], arg2, 0x18);
004d9048      this->m_num += 1;
004d904c      uint32_t eax_7;
004d904c      eax_7 = 1;
004d904f      return 1;
004d9000  }

004d9052                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004d9060  void __fastcall gmRadarUI::UpdateCompassTokens(class gmRadarUI* this)

004d9060  {
004d906b      struct Turbine_GUID* var_14;
004d906b      int32_t* var_28 = &var_14;
004d9072      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004d907a      var_14 = nullptr;
004d9085      void __return;
004d9085      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004d908a      struct Turbine_GUID* ecx_1 = var_14;
004d9093      var_2c = ecx_1;
004d9095      int32_t var_28_1 = 0;
004d9098      struct Turbine_GUID* eax_1 = var_2c;
004d909e      float var_10 = 0f;
004d90a2      int32_t var_c = 0;
004d90a2      
004d90a6      if (eax_1 != 0)
004d90ac          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004d90ac      
004d90b8      struct Turbine_GUID** esp = &var_2c;
004d90bf      void var_8;
004d90bf      int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_10, &var_8);
004d90bf      
004d90c1      if (ecx_1 != 0)
004d90c7          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004d90c7      
004d90d0      int32_t* ebx;
004d90d0      
004d90d0      if (ebx != 0)
004d90d0      {
004d90d8          if (ebp >= 0)
004d90d8          {
004d90e4              class CPhysicsObj* player = SmartBox::smartbox->player;
004d90e4              
004d90ec              if (player == 0)
004d90ec              {
004d90f2                  *(uint32_t*)(*(uint32_t*)ebx + 0x14)();
004d90fc                  return;
004d90ec              }
004d90ec              
004d90fd              CPhysicsObj::get_heading(player);
004d9102              long double temp0_1 = ((long double)this->m_fPlayerHeading);
004d9102              long double x87_r0;
004d9102              (x87_r0 - temp0_1);
004d9108              int32_t eax_3;
004d9108              eax_3 = ((((x87_r0 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r0 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004d910a              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004d910a              
004d910d              if (p_1)
004d910d              {
004d9113                  class UIElement* m_pNorthToken = this->m_pNorthToken;
004d9119                  this->m_fPlayerHeading = ((float)x87_r0);
004d9127                  float __saved_ebp_1 = ((float)(x87_r0 * ((long double)0.0174532924f)));
004d9127                  
004d912b                  if (m_pNorthToken != 0)
004d912b                  {
004d9135                      struct UIElement::VTable* vtable_1 = m_pNorthToken->vtable;
004d9137                      long double x87_r0_3 = (((long double)__saved_ebp_1) + ((long double)3.1415926535897931));
004d913f                      long double st0_1;
004d913f                      bool c2_2;
004d913f                      st0_1 = __fsin(x87_r0_3);
004d9147                      float var_c_1 = ((float)(st0_1 * ((long double)this->m_fNorthTokenMagnitude)));
004d914b                      long double st0_2;
004d914b                      bool c2_3;
004d914b                      st0_2 = __fcos(x87_r0_3);
004d9159                      var_10 = ((float)((st0_2 * ((long double)this->m_fNorthTokenMagnitude)) + ((long double)this->m_vecCenterPoint.y)));
004d915d                      UIRegion::GetHeight(m_pNorthToken);
004d9174                      int32_t eax_5 = _ftol2();
004d9183                      class UIElement* m_pNorthToken_1 = this->m_pNorthToken;
004d918a                      var_10 = ((float)(((long double)var_c_1) + ((long double)this->m_vecCenterPoint.x)));
004d918e                      UIRegion::GetWidth(m_pNorthToken_1);
004d91a5                      int32_t eax_7 = _ftol2();
004d91aa                      this->m_pNorthToken;
004d91b1                      vtable_1->MoveTo(eax_7, eax_5);
004d912b                  }
004d912b                  
004d91b4                  class UIElement* m_pEastToken = this->m_pEastToken;
004d91b4                  
004d91bc                  if (m_pEastToken != 0)
004d91bc                  {
004d91c6                      struct UIElement::VTable* vtable_2 = m_pEastToken->vtable;
004d91c8                      long double x87_r0_16 = (((long double)__saved_ebp_1) + ((long double)1.57079637f));
004d91d0                      long double st0_3;
004d91d0                      bool c2_4;
004d91d0                      st0_3 = __fsin(x87_r0_16);
004d91d8                      float var_18_2 = ((float)(st0_3 * ((long double)this->m_fEastTokenMagnitude)));
004d91dc                      long double st0_4;
004d91dc                      bool c2_5;
004d91dc                      st0_4 = __fcos(x87_r0_16);
004d91ea                      var_10 = ((float)((st0_4 * ((long double)this->m_fEastTokenMagnitude)) + ((long double)this->m_vecCenterPoint.y)));
004d91ee                      UIRegion::GetHeight(m_pEastToken);
004d9205                      int32_t eax_9 = _ftol2();
004d9214                      class UIElement* m_pEastToken_1 = this->m_pEastToken;
004d921b                      var_10 = ((float)(((long double)var_18_2) + ((long double)this->m_vecCenterPoint.x)));
004d921f                      UIRegion::GetWidth(m_pEastToken_1);
004d9236                      int32_t eax_11 = _ftol2();
004d923b                      this->m_pEastToken;
004d9242                      vtable_2->MoveTo(eax_11, eax_9);
004d91bc                  }
004d91bc                  
004d9245                  class UIElement* m_pSouthToken = this->m_pSouthToken;
004d9245                  
004d924d                  if (m_pSouthToken != 0)
004d924d                  {
004d9253                      struct UIElement::VTable* vtable_3 = m_pSouthToken->vtable;
004d9255                      long double st0_5;
004d9255                      bool c2_6;
004d9255                      st0_5 = __fsin(((long double)__saved_ebp_1));
004d925d                      float var_18_3 = ((float)(st0_5 * ((long double)this->m_fSouthTokenMagnitude)));
004d9265                      long double st0_6;
004d9265                      bool c2_7;
004d9265                      st0_6 = __fcos(((long double)__saved_ebp_1));
004d9273                      var_10 = ((float)((st0_6 * ((long double)this->m_fSouthTokenMagnitude)) + ((long double)this->m_vecCenterPoint.y)));
004d9277                      UIRegion::GetHeight(m_pSouthToken);
004d928e                      int32_t eax_13 = _ftol2();
004d929d                      class UIElement* m_pSouthToken_1 = this->m_pSouthToken;
004d92a4                      var_10 = ((float)(((long double)var_18_3) + ((long double)this->m_vecCenterPoint.x)));
004d92a8                      UIRegion::GetWidth(m_pSouthToken_1);
004d92bf                      int32_t eax_15 = _ftol2();
004d92c4                      this->m_pSouthToken;
004d92cb                      vtable_3->MoveTo(eax_15, eax_13);
004d924d                  }
004d924d                  
004d92ce                  class UIElement* m_pWestToken = this->m_pWestToken;
004d92ce                  
004d92d6                  if (m_pWestToken != 0)
004d92d6                  {
004d92e0                      struct UIElement::VTable* vtable = m_pWestToken->vtable;
004d92e2                      long double x87_r0_44 = (((long double)__saved_ebp_1) + ((long double)4.71238899f));
004d92ea                      long double st0_7;
004d92ea                      bool c2_8;
004d92ea                      st0_7 = __fsin(x87_r0_44);
004d92f2                      float var_18_4 = ((float)(st0_7 * ((long double)this->m_fWestTokenMagnitude)));
004d92f6                      long double st0_8;
004d92f6                      bool c2_9;
004d92f6                      st0_8 = __fcos(x87_r0_44);
004d9304                      var_10 = ((float)((st0_8 * ((long double)this->m_fWestTokenMagnitude)) + ((long double)this->m_vecCenterPoint.y)));
004d9308                      UIRegion::GetHeight(m_pWestToken);
004d931f                      int32_t eax_17 = _ftol2();
004d932e                      class UIElement* m_pWestToken_1 = this->m_pWestToken;
004d9335                      var_10 = ((float)(((long double)var_18_4) + ((long double)this->m_vecCenterPoint.x)));
004d9339                      UIRegion::GetWidth(m_pWestToken_1);
004d9350                      int32_t eax_19 = _ftol2();
004d9355                      this->m_pWestToken;
004d935c                      vtable->MoveTo(eax_19, eax_17);
004d9363                      *(uint32_t*)(*(uint32_t*)ebx + 0x14)();
004d936d                      return;
004d92d6                  }
004d910d              }
004d90d8          }
004d90d8          
004d9374          *(uint32_t*)(*(uint32_t*)ebx + 0x14)();
004d9374          struct Turbine_GUID* __saved_edi;
004d9374          esp = &__saved_edi;
004d90d0      }
004d90d0      
004d9377      *(uint32_t*)esp;
004d9377      esp[1];
004d9377      esp[2];
004d9377      esp[3];
004d9060  }

004d937f                                                                                               90                                 .

004d9380  void __fastcall gmRadarUI::DrawObjects(class gmRadarUI* this, class UISurface* arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004d9380  {
004d9386      int32_t ebx;
004d9386      int32_t var_e0 = ebx;
004d9387      int32_t ebp;
004d9387      int32_t var_e4 = ebp;
004d9388      int32_t esi;
004d9388      int32_t var_e8 = esi;
004d9397      long double x87_r7_1 = (((long double)this->m_fRadarRange) - ((long double)1f));
004d939f      bool cond:0 = this->m_aRadarInfos.m_num <= 0;
004d93a1      int32_t edi;
004d93a1      int32_t var_ec = edi;
004d93a1      int32_t* esp_1 = &var_ec;
004d93a4      this->m_iidObjectUnderMouse = 0;
004d93ac      int32_t var_b8 = 0;
004d93b0      int32_t var_b4 = 0xffffffff;
004d93b8      int32_t var_cc = 0;
004d93bc      float var_a4 = ((float)(x87_r7_1 * x87_r7_1));
004d93bc      
004d93c2      if (!(cond:0))
004d93c2      {
004d93c8          int32_t var_d4_1 = 0;
004d93cc          esp_1 = &var_ec;
004d96ba          bool cond:1_1;
004d96ba          
004d96ba          do
004d96ba          {
004d93d0              struct RadarInfo* m_data = this->m_aRadarInfos.m_data;
004d93d6              int32_t edx_1 = esp_1[6];
004d93da              int32_t eax_1 = *(uint32_t*)((char*)m_data + edx_1);
004d93dd              void* edi_1 = ((char*)m_data + edx_1);
004d93e1              esp_1[0x13] = edi_1;
004d93e5              esp_1[7] = eax_1;
004d93e5              
004d93e9              if (eax_1 != 0)
004d93e9              {
004d93f3                  *(uint32_t*)((char*)esp_1 - 4) = &esp_1[4];
004d93f8                  *(uint32_t*)((char*)esp_1 - 8) = 0x7bd748;
004d93fd                  *(uint32_t*)((char*)esp_1 - 0xc) = &esp_1[0x16];
004d93f3                  esp_1[4] = 0;
004d9409                  InterfaceSystem::GetClass(InterfaceSystem::GetInstance());
004d940e                  int32_t* ecx_2 = esp_1[4];
004d9417                  *(uint32_t*)((char*)esp_1 - 8) = ecx_2;
004d9419                  *(uint32_t*)((char*)esp_1 - 4) = 0;
004d941c                  int32_t* eax_5 = *(uint32_t*)((char*)esp_1 - 8);
004d93f3                  esp_1[0xb] = 0;
004d93f3                  esp_1[0xc] = 0;
004d93f3                  
004d942a                  if (eax_5 != 0)
004d9430                      *(uint32_t*)(*(uint32_t*)eax_5 + 0x10)();
004d9430                  
004d9437                  *(uint32_t*)((char*)esp_1 - 0xc) = &esp_1[0x15];
004d943c                  esp_1 -= 8;
004d9443                  int32_t eax_8 = *(uint32_t*)InterfacePtr<class CObjectMaint>::_QueryInterface(&esp_1[0xb]);
004d9445                  esp_1[4] = eax_8;
004d9449                  esp_1[0xc] = eax_8;
004d9449                  
004d944d                  if (ecx_2 != 0)
004d9454                      *(uint32_t*)(*(uint32_t*)ecx_2 + 0x14)();
004d9454                  
004d9457                  int32_t* ebx_1 = esp_1[0xb];
004d9457                  
004d945d                  if (ebx_1 == 0)
004d945d                      goto label_4d96ec;
004d945d                  
004d9469                  if (esp_1[4] < 0)
004d9469                  {
004d96fb                      if (ebx_1 == 0)
004d96fb                          goto label_4d96ec;
004d96fb                      
004d9701                      *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9704                      *(uint32_t*)esp_1;
004d9704                      esp_1[1];
004d9704                      esp_1[2];
004d9704                      esp_1[3];
004d970e                      return;
004d9469                  }
004d9469                  
004d9474                  *(uint32_t*)((char*)esp_1 - 4) = *(uint32_t*)(*(uint32_t*)edi_1 + 8);
004d9477                  void* eax_12 = CObjectMaint::GetObjectA(ebx_1);
004d9477                  
004d9497                  if (((eax_12 == 0 || *(uint32_t*)((char*)eax_12 + 0x90) == 0) || *(uint32_t*)((char*)eax_12 + 0x4c) <= 0))
004d9699                      *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9497                  else
004d9497                  {
004d94a1                      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[0xf];
004d94a2                      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004d94a8                      *(uint32_t*)((char*)esp_1 - 8) = eax_12;
004d94a9                      SmartBox::convert_to_player_space(SmartBox::smartbox_1);
004d94be                      long double x87_r7_4 = ((((long double)esp_1[0x10]) * ((long double)esp_1[0x10])) + (((long double)esp_1[0xf]) * ((long double)esp_1[0xf])));
004d94c0                      long double temp1_1 = ((long double)esp_1[0x12]);
004d94c0                      (x87_r7_4 - temp1_1);
004d94c0                      
004d94c9                      if ((*(uint8_t*)((char*)((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
004d94c9                      {
004d94dd                          esp_1[5] = ((float)((long double)this->m_nRadarRadius));
004d94e1                          this->m_fRadarRange;
004d94e7                          esp_1[0xf];
004d94ed                          this->m_vecCenterPoint;
004d94f3                          int32_t eax_14 = _ftol2();
004d94f8                          esp_1[0x10];
004d94fe                          esp_1[0x14] = eax_14;
004d9502                          this->m_vecCenterPoint;
004d9508                          int32_t eax_15 = _ftol2();
004d950d                          long double x87_r7_9 = ((long double)esp_1[0x14]);
004d9511                          long double x87_r6_7 = ((long double)this->m_vecCenterPoint.x);
004d9517                          esp_1[4] = eax_15;
004d951b                          long double x87_r6_8 = (x87_r6_7 - ((long double)esp_1[5]));
004d9521                          (x87_r7_9 - x87_r6_8);
004d9523                          eax_15 = ((((x87_r7_9 < x87_r6_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, x87_r6_8))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == x87_r6_8) ? 1 : 0) << 0xe) | 0x3800))));
004d9525                          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004d9525                          
004d9528                          if (!(p_1))
004d9690                              *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9528                          else
004d9528                          {
004d9538                              long double x87_r7_10 = (((long double)esp_1[5]) + ((long double)this->m_vecCenterPoint.x));
004d953a                              (x87_r7_9 - x87_r7_10);
004d953c                              eax_15 = ((((x87_r7_9 < x87_r7_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, x87_r7_10))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == x87_r7_10) ? 1 : 0) << 0xe) | 0))));
004d953c                              
004d9541                              if ((*(uint8_t*)((char*)eax_15)[1] & 0x41) == 0)
004d9690                                  *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9541                              else
004d9541                              {
004d9547                                  x87_r7_9 = ((long double)esp_1[4]);
004d9551                                  long double x87_r6_13 = (((long double)this->m_vecCenterPoint.y) - ((long double)esp_1[5]));
004d9557                                  (x87_r7_9 - x87_r6_13);
004d9559                                  eax_15 = ((((x87_r7_9 < x87_r6_13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, x87_r6_13))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == x87_r6_13) ? 1 : 0) << 0xe) | 0x3800))));
004d955b                                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
004d955b                                  
004d955e                                  if (!(p_2))
004d9690                                      *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d955e                                  else
004d955e                                  {
004d956e                                      long double x87_r7_11 = (((long double)esp_1[5]) + ((long double)this->m_vecCenterPoint.y));
004d9570                                      (x87_r7_9 - x87_r7_11);
004d9572                                      eax_15 = ((((x87_r7_9 < x87_r7_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, x87_r7_11))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == x87_r7_11) ? 1 : 0) << 0xe) | 0))));
004d9572                                      
004d9577                                      if ((*(uint8_t*)((char*)eax_15)[1] & 0x41) == 0)
004d9690                                          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9577                                      else
004d9577                                      {
004d9585                                          int32_t eax_17 = ICIDM::s_cidm->vtable->GetMouseX();
004d958c                                          int32_t eax_18 = UIRegion::GetScreenX0(this);
004d95a9                                          int32_t edi_4 = ((ICIDM::s_cidm->vtable->GetMouseY() - UIRegion::GetScreenY0(this)) - esp_1[4]);
004d95af                                          int32_t eax_22 = ((eax_17 - eax_18) - eax_14);
004d95b9                                          int32_t eax_24 = ((eax_22 * eax_22) + (edi_4 * edi_4));
004d95c4                                          int32_t ecx_16;
004d95c4                                          void* edi_5;
004d95c4                                          
004d95c4                                          if ((eax_24 > 0x24 || eax_24 >= esp_1[0xe]))
004d962d                                              edi_5 = esp_1[7];
004d95c4                                          else
004d95c4                                          {
004d95c6                                              edi_5 = esp_1[7];
004d95ca                                              int32_t edx_6 = *(uint32_t*)((char*)edi_5 + 8);
004d95cd                                              *(uint32_t*)((char*)esp_1 - 4) = 0;
004d95cd                                              esp_1[0xe] = eax_24;
004d95d3                                              *(uint32_t*)((char*)esp_1 - 8) = 2;
004d95d9                                              *(uint32_t*)((char*)esp_1 - 0xc) = &esp_1[9];
004d95cd                                              esp_1[0xd] = edx_6;
004d95e0                                              ACCWeenieObject::GetObjectNameWide(edi_5);
004d95e9                                              StringInfo::StringInfo(&esp_1[0x17]);
004d95ee                                              *(uint32_t*)((char*)esp_1 - 4) = 1;
004d95f4                                              *(uint32_t*)((char*)esp_1 - 8) = &esp_1[9];
004d95f9                                              StringInfo::SetLiteralValue(&esp_1[0x17]);
004d9602                                              *(uint32_t*)((char*)esp_1 - 4) = &esp_1[0x17];
004d9605                                              UIElement::SetTooltip(this);
004d9617                                              this->__bitfield164 |= 0x20;
004d961d                                              StringInfo::~StringInfo(&esp_1[0x17]);
004d9626                                              eax_24 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&esp_1[9]);
004d95c4                                          }
004d95c4                                          
004d9631                                          long double x87_r7_12 = ((long double)esp_1[0x11]);
004d9635                                          __builtin_strncpy(&esp_1[0xa], "ff&?", 4);
004d963d                                          long double x87_r7_13 = fabsl(x87_r7_12);
004d963f                                          long double temp2_1 = ((long double)5.0);
004d963f                                          (x87_r7_13 - temp2_1);
004d9645                                          eax_24 = ((((x87_r7_13 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp2_1) ? 1 : 0) << 0xe) | 0))));
004d9645                                          
004d964a                                          if ((*(uint8_t*)((char*)eax_24)[1] & 1) != 0)
004d964c                                              esp_1[0xa] = 0x3f800000;
004d964c                                          
004d965d                                          int32_t edx_8 = esp_1[4];
004d9663                                          int32_t eax_29 = esp_1[0xa];
004d9667                                          ecx_16 = *(uint32_t*)((char*)edi_5 + 8) == ACCWeenieObject::selectedID;
004d966a                                          *(uint32_t*)((char*)esp_1 - 4) = ecx_16;
004d966b                                          int32_t ecx_24 = esp_1[0x13];
004d966f                                          *(uint32_t*)((char*)esp_1 - 8) = edx_8;
004d9670                                          int32_t edx_9 = esp_1[0x3c];
004d9677                                          *(uint32_t*)((char*)esp_1 - 0xc) = eax_14;
004d9678                                          *(uint32_t*)((char*)esp_1 - 0x10) = eax_29;
004d9679                                          *(uint32_t*)((char*)esp_1 - 0x14) = ecx_24;
004d967a                                          *(uint32_t*)((char*)esp_1 - 0x18) = edx_9;
004d967d                                          gmRadarUI::DrawBlip(this);
004d9699                                          *(uint32_t*)(*(uint32_t*)esp_1[0xb] + 0x14)();
004d9577                                      }
004d955e                                  }
004d9541                              }
004d9528                          }
004d94c9                      }
004d94c9                      else
004d94cf                          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9497                  }
004d93e9              }
004d93e9              
004d96ac              int32_t eax_32 = (esp_1[8] + 1);
004d96ad              int32_t edx_12 = (esp_1[6] + 0x18);
004d96b0              cond:1_1 = eax_32 < this->m_aRadarInfos.m_num;
004d96b2              esp_1[8] = eax_32;
004d96b6              esp_1[6] = edx_12;
004d96ba          } while (cond:1_1);
004d96c0          uint32_t eax_33 = esp_1[0xd];
004d96c0          
004d96c6          if (eax_33 != 0)
004d96c8              this->m_iidObjectUnderMouse = eax_33;
004d93c2      }
004d93c2      
004d96d4      if (this->m_iidObjectUnderMouse == 0)
004d96d4      {
004d96e1          this->__bitfield164 &= 0xffffffdf;
004d96e7          UIElement::ClearTooltip(this);
004d96d4      }
004d96d4      
004d96ec  label_4d96ec:
004d96ec      *(uint32_t*)esp_1;
004d96ec      esp_1[1];
004d96ec      esp_1[2];
004d96ec      esp_1[3];
004d9380  }

004d9711                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004d9720  void __thiscall gmRadarUI::DrawChildren(class gmRadarUI* this, class Box2D const* arg2, class Box2D const* arg3, class SmartArray<Box2D,1> const* arg4, class UISurface* arg5)

004d9720  {
004d9741      class UISurface* var_14_1 = arg5;
004d9744      gmRadarUI::DrawObjects(this, UIRegion::DrawChildren(this, arg2, arg3, arg4, arg5));
004d9749      this->m_vecCenterPoint;
004d974f      int32_t eax = _ftol2();
004d9754      this->m_vecCenterPoint;
004d975c      int32_t eax_1 = _ftol2();
004d975c      
004d9765      if (arg5 != 0)
004d9765      {
004d9769          UISurface::PrepareSurface(arg5);
004d9780          SurfaceWindow::FillArea(&arg5->m_pLocalSurface->window, &RGBAColor_RadarBrightGreen, eax_1, eax, eax_1, eax);
004d9765      }
004d9765      
004d978f      gmRadarUI::DrawEdges(this, arg5, &RGBAColor_RadarBrightGreen, eax_1, eax);
004d9794      this->m_vecCenterPoint;
004d979a      int32_t eax_2 = _ftol2();
004d979f      this->m_vecCenterPoint;
004d97ae      int32_t ebx_2 = (_ftol2() - 2);
004d97ae      
004d97b3      if (arg5 != 0)
004d97b3      {
004d97b7          UISurface::PrepareSurface(arg5);
004d97ce          SurfaceWindow::FillArea(&arg5->m_pLocalSurface->window, &RGBAColor_RadarBrightGreen, ebx_2, eax_2, ebx_2, eax_2);
004d97b3      }
004d97b3      
004d97d3      this->m_vecCenterPoint;
004d97d9      int32_t eax_4 = _ftol2();
004d97de      this->m_vecCenterPoint;
004d97ed      int32_t ebx_4 = (_ftol2() + 2);
004d97ed      
004d97f2      if (arg5 != 0)
004d97f2      {
004d97f6          UISurface::PrepareSurface(arg5);
004d980d          SurfaceWindow::FillArea(&arg5->m_pLocalSurface->window, &RGBAColor_RadarBrightGreen, ebx_4, eax_4, ebx_4, eax_4);
004d97f2      }
004d97f2      
004d9812      this->m_vecCenterPoint;
004d9818      int32_t eax_6 = _ftol2();
004d981d      this->m_vecCenterPoint;
004d9828      int32_t eax_7 = _ftol2();
004d9828      
004d9831      if (arg5 != 0)
004d9831      {
004d9835          UISurface::PrepareSurface(arg5);
004d984c          SurfaceWindow::FillArea(&arg5->m_pLocalSurface->window, &RGBAColor_RadarBrightGreen, eax_7, (eax_6 - 2), eax_7, (eax_6 - 2));
004d9831      }
004d9831      
004d9851      this->m_vecCenterPoint;
004d9857      int32_t eax_8 = _ftol2();
004d985c      this->m_vecCenterPoint;
004d9867      int32_t eax_9 = _ftol2();
004d9867      
004d9870      if (arg5 != 0)
004d9870      {
004d9874          UISurface::PrepareSurface(arg5);
004d988b          SurfaceWindow::FillArea(&arg5->m_pLocalSurface->window, &RGBAColor_RadarBrightGreen, eax_9, (eax_8 + 2), eax_9, (eax_8 + 2));
004d9870      }
004d9720  }

004d9897                                                                       90 90 90 90 90 90 90 90 90                         .........

004d98a0  void __fastcall gmRadarUI::UseTime(class gmRadarUI* this)

004d98a0  {
004d98a3      long double x87_r7 = ((long double)Timer::cur_time);
004d98a9      int32_t ebx;
004d98a9      int32_t var_20 = ebx;
004d98ac      double var_8 = ((double)x87_r7);
004d98b0      long double temp0 = ((long double)this->m_ttNextUpdateTime);
004d98b0      (x87_r7 - temp0);
004d98b6      int32_t ebp;
004d98b6      int32_t var_24 = ebp;
004d98b7      int32_t esi;
004d98b7      int32_t var_28 = esi;
004d98b8      int32_t edi;
004d98b8      int32_t var_2c = edi;
004d98b8      int32_t* esp = &var_2c;
004d98b8      
004d98be      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004d98be      {
004d98c8          struct Turbine_GUID* var_1c;
004d98c8          int32_t* var_30_1 = &var_1c;
004d98cd          struct Turbine_GUID* var_34 = &PlayerDesc_ClassType;
004d98d5          var_1c = nullptr;
004d98e0          class TResult __return;
004d98e0          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_34, var_30_1);
004d98e5          struct Turbine_GUID* esi_1 = var_1c;
004d98ee          var_34 = esi_1;
004d98f0          int32_t var_30_2 = 0;
004d98f3          struct Turbine_GUID* eax_2 = var_34;
004d98f7          int32_t var_10 = 0;
004d98fb          int32_t var_c_1 = 0;
004d98fb          
004d98ff          if (eax_2 != 0)
004d9905              *(uint32_t*)(eax_2->m_data1 + 0x10)();
004d9905          
004d9911          esp = &var_34;
004d9918          void var_14;
004d9918          int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_10, &var_14);
004d9918          
004d991a          if (esi_1 != 0)
004d9920              *(uint32_t*)(esi_1->m_data1 + 0x14)();
004d9920          
004d9923          class TResult __return_1 = __return;
004d9923          
004d993a          if ((__return_1 != 0 && (ebp_1 >= 0 && SmartBox::smartbox->player != 0)))
004d993a          {
004d9948              this->m_fRadarRange = ((float)CPlayerSystem::GetRadarRadius(CPlayerSystem::GetPlayerSystem()));
004d9950              gmRadarUI::UpdateCompassTokens(this);
004d9957              gmRadarUI::UpdateCoordinates(this);
004d995c              this->m_pLockUIButton->vtable->SetVisible(1);
004d9966              esp = &var_34;
004d996b              UIRegion::MakeRootDirtyHere(this);
004d993a          }
004d993a          
004d997c          this->m_ttNextUpdateTime = ((double)(((long double)0.025000000000000001) + ((long double)var_10)));
004d997c          
004d9982          if (__return_1 != 0)
004d9982          {
004d9988              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004d9988              esp = &var_2c;
004d9982          }
004d98be      }
004d98be      
004d998b      *(uint32_t*)esp;
004d998b      esp[1];
004d998b      esp[2];
004d998b      esp[3];
004d98a0  }

004d9993                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004d99a0  uint8_t __thiscall SmartArray<RadarInfo,1>::add_unique(class SmartArray<RadarInfo,1>* this, struct RadarInfo const* arg2)

004d99a0  {
004d99a6      uint32_t m_num = this->m_num;
004d99a9      int32_t eax = 0;
004d99a9      
004d99ae      if (m_num > 0)
004d99ae      {
004d99b2          int32_t* m_data = this->m_data;
004d99b2          
004d99be          do
004d99be          {
004d99b6              if (*(uint32_t*)m_data == arg2->object)
004d99b6              {
004d99cf                  if (eax == 0xffffffff)
004d99cf                      break;
004d99cf                  
004d99d3                  eax = 0;
004d99d6                  return 0;
004d99b6              }
004d99b6              
004d99b8              eax += 1;
004d99b9              m_data = &m_data[6];
004d99be          } while (eax < m_num);
004d99ae      }
004d99ae      
004d99c9      return SmartArray<RadarInfo,1>::AddToEnd(this, arg2);
004d99a0  }

004d99d9                                                                             90 90 90 90 90 90 90                           .......

004d99e0  void __thiscall gmRadarUI::ListenToGlobalMessage(class gmRadarUI* this, uint32_t arg2, int32_t arg3)

004d99e0  {
004d99e7      if (arg2 == 3)
004d99f6          gmRadarUI::UseTime(this);
004d99e7      else if (arg2 == 0xd)
004d99ee          gmRadarUI::UpdateLockedStatus(this);
004d99e0  }

004d99fe                                                                                            90 90                                ..

004d9a00  void __thiscall gmRadarUI::AddObject(class gmRadarUI* this, class ACCWeenieObject* arg2)

004d9a00  {
004d9a1b      if ((arg2 != 0 && arg2->pwd._bitfield >= 0))
004d9a1b      {
004d9a21          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004d9a28          uint32_t player_id;
004d9a28          
004d9a28          if (SmartBox::smartbox_1 == 0)
004d9a32              player_id = 0;
004d9a28          else
004d9a2a              player_id = SmartBox::smartbox_1->player_id;
004d9a2a          
004d9a37          if (player_id != arg2->id)
004d9a37          {
004d9a54              int32_t* var_3c;
004d9a54              int32_t* __return;
004d9a54              InterfacePtr<CObjectMaint>::InterfacePtr<CObjectMaint>(&var_3c, GetClassObject(&__return, &CObjectMaint_ClassType));
004d9a59              int32_t* __return_1 = __return;
004d9a59              
004d9a5f              if (__return_1 != 0)
004d9a63                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004d9a63              
004d9a67              int32_t* ebx_1 = var_3c;
004d9a67              
004d9a6d              if (ebx_1 != 0)
004d9a6d              {
004d9a7b                  int32_t var_38;
004d9a7b                  
004d9a7b                  if (var_38 < 0)
004d9a7b                  {
004d9a7f                      *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9a88                      return;
004d9a7b                  }
004d9a7b                  
004d9a8f                  class CPhysicsObj* eax_5;
004d9a8f                  class AC1Legacy::Vector3* edx_2;
004d9a8f                  eax_5 = CObjectMaint::GetObjectA(ebx_1, arg2->id);
004d9a8f                  
004d9a96                  if (eax_5 != 0)
004d9a96                  {
004d9aa0                      void var_24;
004d9aa0                      void* var_4c_3 = &var_24;
004d9aa0                      
004d9aaa                      if (ACCWeenieObject::InqShowableOnRadar(arg2, edx_2) != 0)
004d9aaa                      {
004d9ab5                          void var_18;
004d9ab5                          RadarInfo::RadarInfo(&var_18, arg2);
004d9ac0                          class RGBAColor* eax_7 = gmRadarUI::GetBlipColor(&__return, arg2);
004d9aca                          float r = eax_7->r;
004d9ad4                          float g = eax_7->g;
004d9adb                          float b = eax_7->b;
004d9ae2                          float a = eax_7->a;
004d9ae6                          enum RadarBlipShape eax_8 = gmRadarUI::GetBlipShape(this, arg2);
004d9aed                          enum RadarBlipShape var_4_1 = eax_8;
004d9aed                          
004d9af1                          if (eax_8 == Undef_RadarBlipShape)
004d9af1                          {
004d9af7                              *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9b00                              return;
004d9af1                          }
004d9af1                          
004d9b05                          struct gmNoticeHandler::VTable** eax_10;
004d9b05                          
004d9b05                          if (this == 0)
004d9b0f                              eax_10 = nullptr;
004d9b05                          else
004d9b07                              eax_10 = &this->vtable;
004d9b07                          
004d9b11                          arg2->vtable->RegisterNoticeHandler(0x4dd245, eax_10);
004d9b24                          struct gmNoticeHandler::VTable** eax_11;
004d9b24                          
004d9b24                          if (this == 0)
004d9b2e                              eax_11 = nullptr;
004d9b24                          else
004d9b26                              eax_11 = &this->vtable;
004d9b26                          
004d9b14                          arg2->vtable->RegisterNoticeHandler(0x186af, eax_11);
004d9b48                          SmartArray<RadarInfo,1>::add_unique(&this->m_aRadarInfos, &var_18);
004d9aaa                      }
004d9a96                  }
004d9a96                  
004d9b51                  *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
004d9a6d              }
004d9a37          }
004d9a1b      }
004d9a00  }

004d9b5d                                                                                         90 90 90                               ...

004d9b60  void __thiscall gmRadarUI::RecvNotice_CreateObject(class gmRadarUI* this, uint32_t arg2)

004d9b60  {
004d9b68      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004d9b68      
004d9b72      if (eax != 0)
004d9b7b          gmRadarUI::AddObject(((char*)this - 0x5f8), eax);
004d9b60  }

004d9b84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004d9b90  void __fastcall gmRadarUI::Init(class gmRadarUI* this)

004d9b90  {
004d9b95      int32_t esi;
004d9b95      int32_t var_38 = esi;
004d9b96      class gmRadarUI* this_1 = this;
004d9b98      int32_t edi;
004d9b98      int32_t var_3c = edi;
004d9b99      class gmRadarUI* this_2 = this_1;
004d9b9d      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004d9b9d      
004d9ba6      if (eax != 0)
004d9ba6      {
004d9baa          struct gmNoticeHandler::VTable** ecx;
004d9baa          
004d9baa          if (this_1 == 0)
004d9bb4              ecx = nullptr;
004d9baa          else
004d9bac              ecx = &this_1->vtable;
004d9bac          
004d9bb6          eax->vtable->RegisterNoticeHandler(0x186ae, ecx);
004d9ba6      }
004d9ba6      
004d9bc9      SmartArray<RadarInfo,1>::Reset(&this_1->m_aRadarInfos);
004d9bc9      
004d9bd5      if (CPlayerSystem::GetPlayerSystem() != 0)
004d9be3          this_1->m_fRadarRange = ((float)CPlayerSystem::GetRadarRadius(CPlayerSystem::GetPlayerSystem()));
004d9be3      
004d9bf8      int32_t* var_2c = nullptr;
004d9c03      class TResult __return;
004d9c03      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, &CObjectMaint_ClassType, &var_2c);
004d9c08      int32_t* esi_1 = var_2c;
004d9c1a      void* var_1c = nullptr;
004d9c1e      int32_t var_18 = 0;
004d9c1e      
004d9c22      if (esi_1 != 0)
004d9c28          *(uint32_t*)(*(uint32_t*)esi_1 + 0x10)(esi_1, 0);
004d9c28      
004d9c3b      void var_20;
004d9c3b      int32_t edi_1 = *(uint32_t*)InterfacePtr<class CObjectMaint>::_QueryInterface(&var_1c, &var_20);
004d9c3b      
004d9c3d      if (esi_1 != 0)
004d9c43          *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)(esi_1, 0);
004d9c43      
004d9c46      class TResult __return_1 = __return;
004d9c46      
004d9c4c      if (__return_1 != 0)
004d9c4c      {
004d9c54          if (edi_1 < 0)
004d9c54          {
004d9c5a              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)(esi_1, 0);
004d9c64              return;
004d9c54          }
004d9c54          
004d9c6d          var_1c = (__return_1 + 0x84);
004d9c71          int32_t var_10_1 = 0;
004d9c75          int32_t var_18_1 = 0;
004d9c75          
004d9c79          if (__return_1 != 0xffffff7c)
004d9c79          {
004d9c7e              void* eax_8 = **(uint32_t**)(__return_1 + 0x90);
004d9c82              int32_t i = 0;
004d9c86              void* var_14_1 = eax_8;
004d9c86              
004d9c8a              if (eax_8 != 0)
004d9c8a                  goto label_4d9cd2;
004d9c8a              
004d9c90              HashBaseIter<unsigned long>::Next(&var_1c);
004d9c90              
004d9c99              if (i == 0)
004d9c99              {
004d9c9b                  eax_8 = var_14_1;
004d9cd2              label_4d9cd2:
004d9cd2                  class gmRadarUI* this_3;
004d9cd2                  
004d9cd2                  do
004d9cd2                  {
004d9ca3                      if (eax_8 != 0)
004d9ca3                      {
004d9cab                          if ((*(uint8_t*)((char*)eax_8 + 0xa8) & 1) != 0)
004d9cab                          {
004d9cc5                              HashBaseIter<unsigned long>::Next(&var_1c);
004d9cca                              eax_8 = var_14_1;
004d9cab                          }
004d9cab                          else
004d9cab                          {
004d9cad                              class ACCWeenieObject* ecx_11 = *(uint32_t*)((char*)eax_8 + 0x12c);
004d9cad                              
004d9cb5                              if (ecx_11 != 0)
004d9cb5                              {
004d9cbc                                  gmRadarUI::AddObject(this_3, ecx_11);
004d9cc5                                  HashBaseIter<unsigned long>::Next(&var_1c);
004d9cca                                  eax_8 = var_14_1;
004d9cb5                              }
004d9cab                          }
004d9ca3                      }
004d9cd2                  } while (i == 0);
004d9cd2                  
004d9cd4                  this_1 = this_3;
004d9c99              }
004d9c79          }
004d9c79          
004d9ce5          bool cond:3_1 = PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0;
004d9ce7          class UIElement* m_pLockUIButton = this_1->m_pLockUIButton;
004d9ce7          
004d9ced          if (!(cond:3_1))
004d9ced          {
004d9cef              m_pLockUIButton->vtable->SetState(0x10000063, esi_1, 0);
004d9d00              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004d9d0a              return;
004d9ced          }
004d9ced          
004d9d0b          m_pLockUIButton->vtable->SetState(0x10000064);
004d9d1c          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)(esi_1, 0);
004d9c4c      }
004d9b90  }

004d9d27                       90 90 90 90 90 90 90 90 90                                                         .........

004d9d30  void __fastcall gmRadarUI::PostInit(class gmRadarUI* this)

004d9d30  {
004d9d38      UIElement::PostInit(this);
004d9d4b      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_eWindowID);
004d9d50      struct gmRadarUI::VTable* vtable = this->vtable;
004d9d60      int32_t* var_10 = nullptr;
004d9d64      int32_t* var_c = nullptr;
004d9d70      int32_t var_3c;
004d9d70      int32_t* var_8;
004d9d70      int32_t* var_4;
004d9d70      
004d9d70      if (vtable->InqProperty(0x1000002e, &var_10) != 0)
004d9d70      {
004d9d7c          var_8 = nullptr;
004d9d80          var_4 = nullptr;
004d9d84          int32_t* var_18 = nullptr;
004d9d88          int32_t* var_14_1 = nullptr;
004d9d88          
004d9d8c          if (var_c != 0)
004d9d8c          {
004d9dae              int32_t* ecx_5;
004d9dae              
004d9dae              if ((*(uint32_t*)(*(uint32_t*)var_c + 0x118)(0x1000002f, &var_8) == 0 || var_c == 0))
004d9e0c                  ecx_5 = var_14_1;
004d9dae              else if (*(uint32_t*)(*(uint32_t*)var_c + 0x118)(0x10000030, &var_18) == 0)
004d9e0c                  ecx_5 = var_14_1;
004d9dc4              else
004d9dc4              {
004d9dcc                  int32_t var_40 = 0;
004d9dd0                  var_3c = 0;
004d9dd0                  
004d9dd4                  if (var_4 != 0)
004d9ddd                      *(uint32_t*)(*(uint32_t*)var_4 + 0x78)(&var_40);
004d9ddd                  
004d9de0                  ecx_5 = var_14_1;
004d9de0                  
004d9de6                  if (ecx_5 != 0)
004d9de6                  {
004d9def                      *(uint32_t*)(*(uint32_t*)ecx_5 + 0x78)(&var_3c);
004d9df2                      ecx_5 = var_14_1;
004d9de6                  }
004d9de6                  
004d9dfa                  this->m_vecCenterPoint.x = ((float)((long double)var_40));
004d9e04                  this->m_vecCenterPoint.y = ((float)((long double)var_3c));
004d9dc4              }
004d9dc4              
004d9e10              int32_t* eax_4 = var_18;
004d9e10              
004d9e16              if (eax_4 != 0)
004d9e16              {
004d9e20                  int32_t edi_2 = (eax_4[1] - 1);
004d9e1d                  eax_4[1] = edi_2;
004d9e1d                  
004d9e27                  if (edi_2 == 0)
004d9e2d                      **(uint32_t**)eax_4(1);
004d9e2d                  
004d9e2f                  ecx_5 = var_14_1;
004d9e33                  var_18 = nullptr;
004d9e16              }
004d9e16              
004d9e39              if (ecx_5 != 0)
004d9e39              {
004d9e41                  int32_t edi_4 = (ecx_5[1] - 1);
004d9e3e                  ecx_5[1] = edi_4;
004d9e3e                  
004d9e48                  if (edi_4 == 0)
004d9e4e                      **(uint32_t**)ecx_5(1);
004d9e4e                  
004d9e50                  int32_t var_14_2 = 0;
004d9e39              }
004d9e39              
004d9e54              int32_t* eax_8 = var_8;
004d9e54              
004d9e5a              if (eax_8 != 0)
004d9e5a              {
004d9e64                  int32_t edi_6 = (eax_8[1] - 1);
004d9e61                  eax_8[1] = edi_6;
004d9e61                  
004d9e6b                  if (edi_6 == 0)
004d9e71                      **(uint32_t**)eax_8(1);
004d9e71                  
004d9e73                  var_8 = nullptr;
004d9e5a              }
004d9e5a              
004d9e7d              if (var_4 != 0)
004d9e7d              {
004d9e87                  int32_t edi_8 = (var_4[1] - 1);
004d9e84                  var_4[1] = edi_8;
004d9e84                  
004d9e8e                  if (edi_8 == 0)
004d9e94                      **(uint32_t**)var_4(1);
004d9e7d              }
004d9d8c          }
004d9d70      }
004d9d70      
004d9ea4      UIElement::GetAttribute_Int(this, 0x1000002d, &this->m_nRadarRadius);
004d9ea9      this->vtable->SetMouseVisible(1);
004d9ec8      this->m_pLockUIButton = UIElement::GetChildRecursive(this, 0x10000619);
004d9ece      class UIElement* eax_14 = UIElement::GetChildRecursive(this, 0x100006a3);
004d9ed3      this->m_pDragButton = eax_14;
004d9ed9      eax_14->vtable->SetVisible(0);
004d9ef4      uint32_t var_38;
004d9ef4      
004d9ef4      if (UIElement::GetAttribute_Enum(this, 0x10000031, &var_38) != 0)
004d9ef4      {
004d9f01          class UIElement* eax_16 = UIElement::GetChildRecursive(this, var_38);
004d9f08          this->m_pNorthToken = eax_16;
004d9f08          
004d9f0e          if (eax_16 != 0)
004d9f0e          {
004d9f1e              int32_t m_x1 = eax_16->m_box.m_x1;
004d9f24              var_3c = (eax_16->m_box.m_y1 + eax_16->m_box.m_y0);
004d9f32              long double x87_r7_4 = (((long double)var_3c) * ((long double)0.5f));
004d9f3a              var_3c = (m_x1 + eax_16->m_box.m_x0);
004d9f53              Vector2::Vector2(&var_8, ((float)(((long double)var_3c) * ((long double)0.5f))), ((float)x87_r7_4));
004d9f58              this->m_vecCenterPoint;
004d9f80              this->m_fNorthTokenMagnitude = ((float)(((long double)this->m_vecCenterPoint.y) - ((long double)var_4)));
004d9f86              CAsyncStateHandler::OnStateHandlerInit(&var_8);
004d9f0e          }
004d9ef4      }
004d9ef4      
004d9f9e      uint32_t var_34;
004d9f9e      
004d9f9e      if (UIElement::GetAttribute_Enum(this, 0x10000033, &var_34) != 0)
004d9f9e      {
004d9fab          class UIElement* eax_19 = UIElement::GetChildRecursive(this, var_34);
004d9fb2          this->m_pEastToken = eax_19;
004d9fb2          
004d9fb8          if (eax_19 != 0)
004d9fb8          {
004d9fc6              int32_t m_x1_2 = eax_19->m_box.m_x1;
004d9fce              var_3c = (eax_19->m_box.m_y1 + eax_19->m_box.m_y0);
004d9fdc              long double x87_r7_11 = (((long double)var_3c) * ((long double)0.5f));
004d9fe4              var_3c = (m_x1_2 + eax_19->m_box.m_x0);
004d9ffd              Vector2::Vector2(&var_8, ((float)(((long double)var_3c) * ((long double)0.5f))), ((float)x87_r7_11));
004da002              this->m_vecCenterPoint;
004da02a              this->m_fEastTokenMagnitude = ((float)(((long double)this->m_vecCenterPoint.y) - ((long double)var_4)));
004da030              CAsyncStateHandler::OnStateHandlerInit(&var_8);
004d9fb8          }
004d9f9e      }
004d9f9e      
004da048      uint32_t var_30;
004da048      
004da048      if (UIElement::GetAttribute_Enum(this, 0x10000032, &var_30) != 0)
004da048      {
004da055          class UIElement* eax_21 = UIElement::GetChildRecursive(this, var_30);
004da05c          this->m_pSouthToken = eax_21;
004da05c          
004da062          if (eax_21 != 0)
004da062          {
004da072              int32_t m_x1_1 = eax_21->m_box.m_x1;
004da078              var_3c = (eax_21->m_box.m_y1 + eax_21->m_box.m_y0);
004da086              long double x87_r7_18 = (((long double)var_3c) * ((long double)0.5f));
004da08e              var_3c = (m_x1_1 + eax_21->m_box.m_x0);
004da0a7              Vector2::Vector2(&var_8, ((float)(((long double)var_3c) * ((long double)0.5f))), ((float)x87_r7_18));
004da0ac              this->m_vecCenterPoint;
004da0d4              this->m_fSouthTokenMagnitude = ((float)(((long double)this->m_vecCenterPoint.y) - ((long double)var_4)));
004da0da              CAsyncStateHandler::OnStateHandlerInit(&var_8);
004da062          }
004da048      }
004da048      
004da0f2      uint32_t var_2c;
004da0f2      
004da0f2      if (UIElement::GetAttribute_Enum(this, 0x10000034, &var_2c) != 0)
004da0f2      {
004da0ff          class UIElement* eax_24 = UIElement::GetChildRecursive(this, var_2c);
004da106          this->m_pWestToken = eax_24;
004da106          
004da10c          if (eax_24 != 0)
004da10c          {
004da11a              int32_t m_x1_3 = eax_24->m_box.m_x1;
004da122              var_3c = (eax_24->m_box.m_y1 + eax_24->m_box.m_y0);
004da130              long double x87_r7_25 = (((long double)var_3c) * ((long double)0.5f));
004da138              var_3c = (m_x1_3 + eax_24->m_box.m_x0);
004da151              Vector2::Vector2(&var_8, ((float)(((long double)var_3c) * ((long double)0.5f))), ((float)x87_r7_25));
004da156              this->m_vecCenterPoint;
004da17e              this->m_fWestTokenMagnitude = ((float)(((long double)this->m_vecCenterPoint.y) - ((long double)var_4)));
004da184              CAsyncStateHandler::OnStateHandlerInit(&var_8);
004da10c          }
004da0f2      }
004da0f2      
004da19c      uint32_t var_28;
004da19c      
004da19c      if (UIElement::GetAttribute_Enum(this, 0x10000035, &var_28) != 0)
004da1aa          this->m_pCoordinateContainerField = UIElement::GetChildRecursive(this, var_28);
004da1aa      
004da1c3      uint32_t var_24;
004da1c3      
004da1c3      if (UIElement::GetAttribute_Enum(this, 0x10000036, &var_24) != 0)
004da1c3      {
004da1cc          class UIElement* eax_29 = UIElement::GetChildRecursive(this, var_24);
004da1d3          class UIElement_Text* eax_30;
004da1d3          
004da1d3          if (eax_29 == 0)
004da1e3              eax_30 = nullptr;
004da1d3          else
004da1db              eax_30 = eax_29->vtable->DynamicCast(0xc);
004da1db          
004da1e5          this->m_pCombinedCoordsText = eax_30;
004da1c3      }
004da1c3      
004da1fe      uint32_t var_20;
004da1fe      
004da1fe      if (UIElement::GetAttribute_Enum(this, 0x10000037, &var_20) != 0)
004da1fe      {
004da207          class UIElement* eax_32 = UIElement::GetChildRecursive(this, var_20);
004da20e          class UIElement_Text* eax_33;
004da20e          
004da20e          if (eax_32 == 0)
004da21e              eax_33 = nullptr;
004da20e          else
004da216              eax_33 = eax_32->vtable->DynamicCast(0xc);
004da216          
004da220          this->m_pXCoordText = eax_33;
004da1fe      }
004da1fe      
004da239      uint32_t var_1c;
004da239      
004da239      if (UIElement::GetAttribute_Enum(this, 0x10000038, &var_1c) != 0)
004da239      {
004da242          class UIElement* eax_35 = UIElement::GetChildRecursive(this, var_1c);
004da249          class UIElement_Text* eax_36;
004da249          
004da249          if (eax_35 == 0)
004da259              eax_36 = nullptr;
004da249          else
004da251              eax_36 = eax_35->vtable->DynamicCast(0xc);
004da251          
004da25b          this->m_pYCoordText = eax_36;
004da239      }
004da239      
004da261      class GlobalEventHandler* eax_37 = GlobalEventHandler::GetGlobalEventHandler();
004da261      
004da268      if (eax_37 != 0)
004da26a          eax_37->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004da26a      
004da27d      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(7, 0x1a, &this->vtable);
004da293      QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 7, 0x1a, &this->vtable);
004da2a4      QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 1, 0x86, &this->vtable);
004da2b8      QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 1, 0x5f, &this->vtable);
004da2c9      QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 1, 0x85, &this->vtable);
004da2dd      QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 5, 1, &this->vtable);
004da2dd      
004da2f9      if ((((int8_t)(this->__bitfield164 >> 1)) & 1) != 0)
004da2ff          UIListener::RegisterForGlobalMessage(this, 3);
004da2ff      
004da308      UIListener::RegisterForGlobalMessage(this, 0xd);
004da308      
004da318      if (CPlayerSystem::GetPlayerSystem()->player_desc_received != 0)
004da31c          gmRadarUI::Init(this);
004da31c      
004da321      this->vtable->SetState(0x10000063);
004da330      int32_t* eax_42 = var_10;
004da330      
004da336      if (eax_42 != 0)
004da336      {
004da340          int32_t esi_2 = (eax_42[1] - 1);
004da33d          eax_42[1] = esi_2;
004da33d          
004da347          if (esi_2 == 0)
004da34d              **(uint32_t**)eax_42(1);
004da34d          
004da34f          var_10 = nullptr;
004da336      }
004da336      
004da359      if (var_c != 0)
004da359      {
004da363          int32_t esi_4 = (var_c[1] - 1);
004da360          var_c[1] = esi_4;
004da360          
004da36a          if (esi_4 == 0)
004da370              **(uint32_t**)var_c(1);
004da359      }
004d9d30  }

004da379                                                                             90 90 90 90 90 90 90                           .......

004da380  void __fastcall gmRadarUI::RecvNotice_PlayerDescReceived(class gmRadarUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004da380  {
004da389      gmRadarUI::Init(((char*)this - 0x5f8));
004da392      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x138)();
004da380  }

004da39c                                                                                      90 90 90 90                              ....

004da3a0  void __thiscall gmPowerbarUI::gmPowerbarUI(class gmPowerbarUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004da3a0  {
004da3af      UIElement_Field::UIElement_Field(this, arg2, arg3);
004da3b4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004da3be      this->vtable = 0x7be0d8;
004da3c4      this->vtable = &gmPowerbarUI::`vftable';
004da3ce      this->m_pbmCurrentMode = PBM_UNDEF;
004da3a0  }

004da3de                                                                                            90 90                                ..

004da3e0  class UIElement* __thiscall gmPowerbarUI::DynamicCast(class gmPowerbarUI* this, uint32_t arg2) __pure

004da3e0  {
004da3ec      if (arg2 == 0x1000000f)
004da3f9          return this;
004da3f9      
004da3f3      int32_t edx_1;
004da3f3      edx_1 = arg2 != 3;
004da3f7      return (this & (edx_1 - 1));
004da3e0  }

004da3fc                                                                                      90 90 90 90                              ....

004da400  uint32_t gmPowerbarUI::GetUIElementType(class gmPowerbarUI const* this @ ecx) __pure

004da400  {
004da405      return 0x1000000f;
004da400  }

004da406                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004da410  void __fastcall gmPowerbarUI::~gmPowerbarUI(class gmPowerbarUI* this)

004da410  {
004da419      this->vtable = 0x7be0d8;
004da413      this->vtable = &gmPowerbarUI::`vftable';
004da413      this->vtable = &gmUrgentAssistanceUI::`vftable';
004da42b      NoticeHandler::~NoticeHandler(&this->vtable);
004da433      /* tailcall */
004da433      return UIElement_Field::~UIElement_Field(this);
004da410  }

004da438                                                                          90 90 90 90 90 90 90 90                          ........

004da440  class UIElement* gmPowerbarUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004da440  {
004da446      void* result = operator new(0x604);
004da446      
004da452      if (result == 0)
004da490          return 0;
004da490      
004da460      UIElement_Field::UIElement_Field(result, arg1, arg2);
004da465      *(uint32_t*)((char*)result + 0x5f8) = 0x7bf328;
004da46f      *(uint32_t*)result = 0x7be0d8;
004da475      *(uint32_t*)((char*)result + 0x5f8) = 0x7bde30;
004da47f      *(uint32_t*)((char*)result + 0x5fc) = 0;
004da48c      return result;
004da440  }

004da491                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004da4a0  void* __thiscall gmPowerbarUI::`scalar deleting destructor'(class gmPowerbarUI* this, uint32_t arg2)

004da4a0  {
004da4a9      this->vtable = 0x7be0d8;
004da4a3      this->vtable = &gmPowerbarUI::`vftable';
004da4a3      this->vtable = &gmUrgentAssistanceUI::`vftable';
004da4bb      NoticeHandler::~NoticeHandler(&this->vtable);
004da4c2      UIElement_Field::~UIElement_Field(this);
004da4c2      
004da4cc      if ((arg2 & 1) != 0)
004da4cf          operator delete(this);
004da4cf      
004da4da      return this;
004da4a0  }

004da4dd                                                                                         90 90 90                               ...

004da4e0  void __fastcall gmPowerbarUI::PostInit(class gmPowerbarUI* this)

004da4e0  {
004da4e3      UIElement::PostInit(this);
004da4ef      class UIElement* eax = UIElement::GetChildRecursive(this, 0x100005ee);
004da4ef      
004da4f6      if (eax == 0)
004da4f6      {
004da517          this->m_RecklessnessField = nullptr;
004da522          *(uint32_t*)(*nullptr + 0x18)(0);
004da526          return;
004da4f6      }
004da4f6      
004da4fe      class UIElement_Field* eax_1 = eax->vtable->DynamicCast(3);
004da504      this->m_RecklessnessField = eax_1;
004da50a      eax_1->vtable->SetVisible(0);
004da4e0  }

004da527                       90 90 90 90 90 90 90 90 90                                                         .........

004da530  void gmPowerbarUI::Register()

004da530  {
004da53a      UIElement::RegisterElementClass(0x1000000f, gmPowerbarUI::Create);
004da530  }

004da543           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004da550  void __thiscall gmPowerbarUI::RecvNotice_SetPowerbarLevel(class gmPowerbarUI* this, enum PowerBarMode arg2, float arg3)

004da550  {
004da557      if (arg2 == this->m_hashElementsRegisteredWith.vtable)
004da557      {
004da564          class UIElement* eax = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000034);
004da564          
004da56b          if (eax != 0)
004da577              /* tailcall */
004da577              return UIElement::SetAttribute_Float(eax, 0x69, arg3);
004da557      }
004da550  }

004da57f                                                                                               90                                 .

004da580  void __thiscall gmPowerbarUI::RecvNotice_FinishPowerbar(class gmPowerbarUI* this, enum PowerBarMode arg2)

004da580  {
004da587      if (arg2 == this->m_hashElementsRegisteredWith.vtable)
004da587      {
004da590          this->m_hashElementsRegisteredWith.vtable = 0;
004da59e          class UIElement* eax = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000034);
004da59e          
004da5a5          if (eax != 0)
004da5ad              UIElement::SetAttribute_Float(eax, 0x69, 0f);
004da5ad          
004da5b8          *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(0);
004da587      }
004da580  }

004da5bf                                                                                               90                                 .

004da5c0  void __thiscall gmPowerbarUI::RecvNotice_RuntimeDDDStatus(class gmPowerbarUI* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

004da5c0  {
004da5d1      uint32_t var_a4;
004da5d1      
004da5d1      if (arg2 == 0)
004da5d1      {
004da70d          struct gmPowerbarUI::VTable* vtable_1 = this->vtable;
004da70f          var_a4 = 4;
004da713          vtable_1->SetState(var_a4);
004da722          return;
004da5d1      }
004da5d1      
004da5db      if (this->m_hashElementsRegisteredWith.vtable != 4)
004da5db      {
004da5dd          struct gmPowerbarUI::VTable* vtable = this->vtable;
004da5df          var_a4 = 4;
004da5e1          vtable->MouseTap(var_a4);
004da5db      }
004da5db      
004da5eb      float var_94 = 0f;
004da5f3      void var_90;
004da5f3      StringInfo::StringInfo(&var_90);
004da5f8      var_a4 = 0x10000001;
004da60f      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_Powerbar_DDDModeText"), var_a4);
004da61b      var_a4 = 0;
004da630      StringInfo::AddVariable_Int(&var_90, compute_str_hash("CURRENT"), arg3);
004da630      
004da63e      if (arg4 == 0)
004da63e      {
004da686          var_a4 = "TOTAL";
004da68b          uint32_t eax_4 = compute_str_hash(var_a4);
004da699          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a4, &data_7b0f34);
004da6a3          StringInfo::AddVariable_String(&var_90, eax_4);
004da63e      }
004da63e      else
004da63e      {
004da640          var_a4 = 0;
004da655          StringInfo::AddVariable_Int(&var_90, compute_str_hash("TOTAL"), arg4);
004da660          long double x87_r7_1 = ((long double)arg3);
004da660          
004da664          if (arg3 < 0)
004da666              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
004da666          
004da672          long double x87_r6_1 = ((long double)arg4);
004da672          
004da676          if (arg4 < 0)
004da678              x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
004da678          
004da680          var_94 = ((float)(x87_r7_1 / x87_r6_1));
004da63e      }
004da63e      
004da6ae      var_a4 = 0x10000035;
004da6b5      class UIElement* eax_5 = UIElement::GetChildRecursive(((char*)this - 0x5f8), var_a4);
004da6bc      class UIElement_Text* eax_6;
004da6bc      
004da6bc      if (eax_5 == 0)
004da6cc          eax_6 = nullptr;
004da6bc      else
004da6bc      {
004da6be          struct UIElement::VTable* vtable_2 = eax_5->vtable;
004da6c0          var_a4 = 0xc;
004da6c4          eax_6 = vtable_2->DynamicCast(var_a4);
004da6bc      }
004da6bc      
004da6d2      var_a4 = &var_90;
004da6d5      UIElement_Text::SetStringInfo(eax_6, var_a4);
004da6da      var_a4 = 0x10000034;
004da6e1      class UIElement* eax_7 = UIElement::GetChildRecursive(((char*)this - 0x5f8), var_a4);
004da6e1      
004da6e8      if (eax_7 != 0)
004da6e8      {
004da6ee          var_a4 = var_94;
004da6f3          UIElement::SetAttribute_Float(eax_7, 0x69, var_a4);
004da6e8      }
004da6e8      
004da6fc      StringInfo::~StringInfo(&var_90);
004da5c0  }

004da725                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004da730  void __thiscall gmPowerbarUI::RecvNotice_BeginPowerbar(class gmPowerbarUI* this, enum PowerBarMode arg2)

004da730  {
004da734      enum PowerBarMode ebp = arg2;
004da734      
004da742      if ((ebp - 1) > 3)
004da742          goto label_4da804;
004da742      
004da748      int32_t var_20_3;
004da748      int32_t eax_2;
004da748      
004da748      switch (ebp)
004da748      {
004da754          case PBM_ADVANCED_COMBAT:
004da754          {
004da754              enum COMBAT_MODE combatMode = ClientCombatSystem::GetCombatSystem()->combatMode;
004da757              eax_2 = *(int32_t*)((char*)this + -0x5f8);
004da757              
004da766              if (combatMode == MELEE_COMBAT_MODE)
004da766              {
004da76d                  *(uint32_t*)(eax_2 + 0x9c)(0x10000043);
004da78a                  int32_t* __return;
004da78a                  class CACQualities* var_8;
004da78a                  InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_8, GetClassObject(&__return, &PlayerDesc_ClassType));
004da78f                  int32_t* __return_1 = __return;
004da78f                  
004da795                  if (__return_1 != 0)
004da799                      *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004da799                  
004da79c                  class CACQualities* edi_1 = var_8;
004da7a9                  CACQualities::InqSkillAdvancementClass(edi_1, 0x32, &arg2);
004da7b3                  struct IntrusiveHashTable<UIElement *,HashSetData<UIElement *> *,1>::VTable* vtable = this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable;
004da7b3                  
004da7b6                  if (arg2 < PBM_ADVANCED_COMBAT)
004da7c5                      *(uint32_t*)(vtable->__vecDelDtor + 0x18)(0);
004da7b6                  else
004da7bc                      *(uint32_t*)(vtable->__vecDelDtor + 0x18)(1);
004da7bc                  
004da7ca                  if (edi_1 != 0)
004da7cc                      edi_1->vtable->Release();
004da7cc                  
004da7b6                  goto label_4da804;
004da766              }
004da766              
004da7d5              var_20_3 = 0x10000044;
004da7f4          label_4da7f4:
004da7f4              *(uint32_t*)(eax_2 + 0x9c)(var_20_3);
004da801              *(uint32_t*)(this->m_hashElementsRegisteredWith.m_intrusiveTable.vtable->__vecDelDtor + 0x18)(0);
004da804          label_4da804:
004da804              this->m_hashElementsRegisteredWith.vtable = ebp;
004da814              class UIElement* eax_5 = UIElement::GetChildRecursive(((char*)this - 0x5f8), 0x10000034);
004da814              
004da81b              if (eax_5 != 0)
004da823                  UIElement::SetAttribute_Float(eax_5, 0x69, 0f);
004da823              
004da82e              *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004da754              break;
004da754          }
004da7dc          case PBM_JUMP:
004da7dc          {
004da7dc              var_20_3 = 0x10000042;
004da7e8          label_4da7e8:
004da7e8              eax_2 = *(int32_t*)((char*)this + -0x5f8);
004da7ee              goto label_4da7f4;
004da7dc          }
004da7e3          case PBM_DDD:
004da7e3          {
004da7e3              var_20_3 = 0x10000045;
004da7e3              goto label_4da7e8;
004da7e3          }
004da748      }
004da730  }

004da83a                                                                                8b ff                                        ..
004da83c  uint32_t jump_table_4da83c[0x4] = 
004da83c  {
004da83c      [0x0] =  0x004da831
004da840      [0x1] =  0x004da74f
004da844      [0x2] =  0x004da7dc
004da848      [0x3] =  0x004da7e3
004da84c  }

004da84c                                      90 90 90 90                                                              ....

004da850  uint8_t __fastcall gmKeyboardUI::RestoreDefaultValues(class gmKeyboardUI* this)

004da850  {
004da851      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004da851      
004da85c      if (ICIDM::s_cidm_1 != 0)
004da85c      {
004da85e          ICIDM::s_cidm_1->vtable->ClearKeyMap();
004da865          ICIDM::s_cidm_1->vtable->AddKeyMap(0x10000001);
004da871          ICIDM::s_cidm_1->vtable->AddKeyMap(1);
004da85c      }
004da85c      
004da87e      /* tailcall */
004da87e      return OptionPage::RestoreDefaultValues(this);
004da850  }

004da883           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004da890  void __thiscall gmKeyboardUI::OnOptionChanged(class gmKeyboardUI* this, class UIOption const* arg2)

004da890  {
004da898      if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] == 0)
004da8ce          return;
004da8ce      
004da8a5      bool cond:0 = OptionPage::Changed(((char*)this - 0x5f0)) == 0;
004da8a7      class HashSetData<UIElement *>* ecx_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004da8a7      
004da8ab      if (!(cond:0))
004da8ab      {
004da8af          arg2 = 1;
004da8b7          /* jump -> ecx_1->m_hashKey->m_alphaImage */
004da8ab      }
004da8ab      
004da8bf      arg2 = 0xd;
004da8c7      /* jump -> ecx_1->m_hashKey->m_alphaImage */
004da890  }

004da8d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004da8e0  class PStringBase<char>* __stdcall gmKeyboardUI::GetKeymapDirectory(class gmKeyboardUI* this @ ecx, class PStringBase<char>* __return)

004da8e0  {
004da8e3      class PSRefBufferCharData<char>* m_charbuffer = UserPreferences::sm_strDefaultFile.m_charbuffer;
004da8f0      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
004da8f9      InterlockedIncrement(&m_charbuffer[-1]);
004da8fb      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004da900      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
004da908      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004da914      PSUtils::get_directory(&PStringBase<char>::s_NullBuffer_2, &m_charbuffer_1);
004da919      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004da921      __return->m_charbuffer = PStringBase<char>::s_NullBuffer_3;
004da92a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
004da936      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
004da936      
004da945      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004da94d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004da94d      
004da953      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &m_charbuffer_1->m_data[0xffffffec];
004da953      
004da962      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004da96a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004da96a      
004da974      return __return;
004da8e0  }

004da977                                                                       90 90 90 90 90 90 90 90 90                         .........

004da980  class StringInfo* __stdcall gmKeyboardUI::GetStringInfoFromInputMapID(class gmKeyboardUI* this @ ecx, class StringInfo* __return, uint32_t arg3)

004da980  {
004da98a      void var_90;
004da98a      StringInfo::StringInfo(&var_90);
004da98a      
004da99b      if (arg3 > 0x10000002)
004da99b      {
004daa29          if ((arg3 - 0x10000003) <= 0xa)
004da99b              switch (arg3)
004da99b              {
004daa32                  case 0x10000003:
004daa32                  {
004daa32                      int32_t __saved_esi_10 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_MeleeCombat"), 7);
004daa32                      break;
004daa32                  }
004daa3b                  case 0x10000004:
004daa3b                  {
004daa3b                      int32_t __saved_esi_11 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_MissileCombat"), 7);
004daa3b                      break;
004daa3b                  }
004daa44                  case 0x10000005:
004daa44                  {
004daa44                      int32_t __saved_esi_12 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_MagicCombat"), 7);
004daa44                      break;
004daa44                  }
004daa4d                  case 0x10000006:
004daa4d                  {
004daa4d                      int32_t __saved_esi_13 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_Emotes"), 7);
004daa4d                      break;
004daa4d                  }
004daa56                  case 0x10000007:
004daa56                  {
004daa56                      int32_t __saved_esi_14 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_ItemSelectionCommand…"), 7);
004daa56                      break;
004daa56                  }
004daa68                  case 0x10000008:
004daa68                  {
004daa68                      int32_t __saved_esi_16 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_CharacterOptionComma…"), 7);
004daa68                      break;
004daa68                  }
004daa71                  case 0x10000009:
004daa71                  {
004daa71                      int32_t __saved_esi_17 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_UICommands"), 7);
004daa71                      break;
004daa71                  }
004daa83                  case 0x1000000a:
004daa83                  {
004daa83                      int32_t __saved_esi_19 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_ChatCommands"), 7);
004daa83                      break;
004daa83                  }
004daa5f                  case 0x1000000c:
004daa5f                  {
004daa5f                      int32_t __saved_esi_15 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_QuickslotCommands"), 7);
004daa5f                      break;
004daa5f                  }
004daa7a                  case 0x1000000d:
004daa7a                  {
004daa7a                      int32_t __saved_esi_18 = 7;
004daa97                      StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_ToggleChatEntry"), 7);
004daa7a                      break;
004daa7a                  }
004da99b              }
004da99b      }
004da99b      else if (arg3 == 0x10000002)
004da9a1      {
004daa13          int32_t __saved_esi_9 = 7;
004daa97          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_InputMap_Combat"), 7);
004da9a1      }
004da9a1      else if ((arg3 - 4) <= 0xa)
004da99b          switch (arg3)
004da99b          {
004da9b6              case 4:
004da9b6              {
004da9b6                  int32_t __saved_esi_1 = 7;
004daa97                  StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_MovementCommands"), 7);
004da9b6                  break;
004da9b6              }
004da9c2              case 5:
004da9c2              {
004da9c2                  int32_t __saved_esi_2 = 7;
004daa97                  StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_CameraControls"), 7);
004da9c2                  break;
004da9c2              }
004da9ce              case 6:
004da9ce              {
004da9ce                  int32_t __saved_esi_3 = 7;
004daa97                  StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_CameraAlternateContr…"), 7);
004da9ce                  break;
004da9ce              }
004da9da              case 9:
004da9da              {
004da9da                  int32_t __saved_esi_4 = 7;
004daa97                  StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_DialogBoxes"), 7);
004da9da                  break;
004da9da              }
004da9e6              case 0xb:
004da9e6              {
004da9e6                  int32_t __saved_esi_5 = 7;
004daa97                  StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_DebugConsole"), 7);
004da9e6                  break;
004da9e6              }
004da9f2              case 0xc:
004da9f2              {
004da9f2                  int32_t __saved_esi_6 = 7;
004daa97                  StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_ProfilerUI"), 7);
004da9f2                  break;
004da9f2              }
004da9fe              case 0xd:
004da9fe              {
004da9fe                  int32_t __saved_esi_7 = 7;
004daa97                  StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_UIDebugger"), 7);
004da9fe                  break;
004da9fe              }
004daa0a              case 0xe:
004daa0a              {
004daa0a                  int32_t __saved_esi_8 = 7;
004daa97                  StringInfo::SetStringIDandTableEnum(&var_90, Tokenize("ID_InputMap_DebugCommands"), 7);
004daa0a                  break;
004daa0a              }
004da99b          }
004da99b      
004daaab      StringInfo::StringInfo(__return, &var_90);
004daab4      StringInfo::~StringInfo(&var_90);
004daac2      return __return;
004da980  }

004daac5                 8d 49 00                                                                               .I.
004daac8  uint32_t jump_table_4daac8[0xb] = 
004daac8  {
004daac8      [0x0] =  0x004da9b6
004daacc      [0x1] =  0x004da9c2
004daad0      [0x2] =  0x004da9ce
004daad4      [0x3] =  0x004daa9c
004daad8      [0x4] =  0x004daa9c
004daadc      [0x5] =  0x004da9da
004daae0      [0x6] =  0x004daa9c
004daae4      [0x7] =  0x004da9e6
004daae8      [0x8] =  0x004da9f2
004daaec      [0x9] =  0x004da9fe
004daaf0      [0xa] =  0x004daa0a
004daaf4  }
004daaf4  uint32_t jump_table_4daaf4[0xb] = 
004daaf4  {
004daaf4      [0x0] =  0x004daa32
004daaf8      [0x1] =  0x004daa3b
004daafc      [0x2] =  0x004daa44
004dab00      [0x3] =  0x004daa4d
004dab04      [0x4] =  0x004daa56
004dab08      [0x5] =  0x004daa68
004dab0c      [0x6] =  0x004daa71
004dab10      [0x7] =  0x004daa83
004dab14      [0x8] =  0x004daa9c
004dab18      [0x9] =  0x004daa5f
004dab1c      [0xa] =  0x004daa7a
004dab20  }

004dab20  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement_ListBox *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement_ListBox *> *,0>* this, uint32_t arg2)

004dab20  {
004dab23      class HashTableData<unsigned long,UIElement_ListBox *>** m_buckets = this->m_buckets;
004dab2b      this->vtable = 0x7be668;
004dab2b      
004dab31      if (m_buckets != &this->m_aInplaceBuckets)
004dab34          operator delete[](m_buckets);
004dab34      
004dab3e      this->m_buckets = nullptr;
004dab41      this->m_firstInterestingBucket = nullptr;
004dab44      this->m_numBuckets = 0;
004dab47      this->m_numElements = 0;
004dab47      
004dab4f      if ((arg2 & 1) != 0)
004dab52          operator delete(this);
004dab52      
004dab5d      return this;
004dab20  }


004dab60  void* __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* this, uint32_t arg2)

004dab60  {
004dab63      struct HashList<unsigned long,ActionMapValue,1>::HashListData** m_buckets = this->m_buckets;
004dab6b      this->vtable = 0x7be66c;
004dab6b      
004dab71      if (m_buckets != &this->m_aInplaceBuckets)
004dab74          operator delete[](m_buckets);
004dab74      
004dab7e      this->m_buckets = nullptr;
004dab81      this->m_firstInterestingBucket = nullptr;
004dab84      this->m_numBuckets = 0;
004dab87      this->m_numElements = 0;
004dab87      
004dab8f      if ((arg2 & 1) != 0)
004dab92          operator delete(this);
004dab92      
004dab9d      return this;
004dab60  }


004daba0  void* __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this, uint32_t arg2)

004daba0  {
004daba3      struct HashList<unsigned long,List<unsigned long>,1>::HashListData** m_buckets = this->m_buckets;
004dabab      this->vtable = 0x7be670;
004dabab      
004dabb1      if (m_buckets != &this->m_aInplaceBuckets)
004dabb4          operator delete[](m_buckets);
004dabb4      
004dabbe      this->m_buckets = nullptr;
004dabc1      this->m_firstInterestingBucket = nullptr;
004dabc4      this->m_numBuckets = 0;
004dabc7      this->m_numElements = 0;
004dabc7      
004dabcf      if ((arg2 & 1) != 0)
004dabd2          operator delete(this);
004dabd2      
004dabdd      return this;
004daba0  }


004dabe0  void* __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this, uint32_t arg2)

004dabe0  {
004dabe3      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_buckets = this->m_buckets;
004dabeb      this->vtable = 0x7be674;
004dabeb      
004dabf1      if (m_buckets != &this->m_aInplaceBuckets)
004dabf4          operator delete[](m_buckets);
004dabf4      
004dabfe      this->m_buckets = nullptr;
004dac01      this->m_firstInterestingBucket = nullptr;
004dac04      this->m_numBuckets = 0;
004dac07      this->m_numElements = 0;
004dac07      
004dac0f      if ((arg2 & 1) != 0)
004dac12          operator delete(this);
004dac12      
004dac1d      return this;
004dabe0  }


004dac20  void __thiscall gmKeyboardUI::HandleCloseLoadKeymapDialog(class gmKeyboardUI* this, uint32_t arg2)

004dac20  {
004dac2a      this->m_uiLoadKeymapDialogContext = 0;
004dac2a      
004dac34      if (arg2 != 0xffffffff)
004dac34      {
004dac36          class ListNode<PStringBase<char> >* eax_1 = this->m_listCachedKeymapFilenames._head;
004dac36          
004dac46          if ((eax_1 != 0 && arg2 < this->m_listCachedKeymapFilenames._num_elements))
004dac46          {
004dac48              int32_t ecx = 0;
004dac48              
004dac52              while (ecx != arg2)
004dac52              {
004dac56                  if (eax_1 != 0)
004dac58                      eax_1 = eax_1->next;
004dac58                  
004dac5b                  ecx += 1;
004dac5b                  
004dac5e                  if (eax_1 == 0)
004dac61                      return;
004dac52              }
004dac52              
004dac6e              if ((eax_1 != 0 && eax_1->data.m_charbuffer->m_data[-4] != 1))
004dac6e              {
004dac70                  class Client* Client::m_instance_1 = Client::m_instance;
004dac70                  
004dac78                  if (Client::m_instance_1 != 0)
004dac78                  {
004dac7d                      *(int32_t*)((char*)Client::m_instance_1->vtable + 0x90)(eax_1);
004dac83                      this->vtable->InitOptions();
004dac78                  }
004dac6e              }
004dac46          }
004dac34      }
004dac20  }

004dac91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004daca0  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::grow(class IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this)

004daca0  {
004daca0      class IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* m_numBuckets = this;
004daca2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004dacae      m_numBuckets = this->m_numBuckets;
004dacc5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
004dacc5      
004daccf      if (eax_2 != bucketSizesEnd_1)
004dacd8          eax_2 = &eax_2[1];
004daccf      else
004daccf      {
004dacd1          eax_2 -= 4;
004dacd1          
004dacd6          if (eax_2 != bucketSizesEnd_1)
004dacd8              eax_2 = &eax_2[1];
004daccf      }
004daccf      
004dace8      return IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
004daca0  }

004dace9                             90 90 90 90 90 90 90                                                           .......

004dacf0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement_ListBox *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement_ListBox *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement_ListBox *> *,0>* this, uint32_t arg2)

004dacf0  {
004dacfb      arg2 = arg2;
004dacff      uint8_t edx = ((int8_t)arg2);
004dad03      this->m_buckets = nullptr;
004dad06      this->m_firstInterestingBucket = nullptr;
004dad09      this->m_numBuckets = 0;
004dad0c      this->m_numElements = 0;
004dad10      this->vtable = 0x7be668;
004dad16      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004dad29      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004dad29      
004dad33      if (eax == bucketSizesEnd_1)
004dad35          eax -= 4;
004dad35      
004dad38      uint32_t eax_1 = *(uint32_t*)eax;
004dad3d      this->m_numBuckets = eax_1;
004dad3d      
004dad40      if (eax_1 > 0x17)
004dad56          this->m_buckets = operator new[]((eax_1 << 2));
004dad40      else
004dad45          this->m_buckets = &this->m_aInplaceBuckets;
004dad45      
004dad5c      class HashTableData<unsigned long,UIElement_ListBox *>** m_buckets = this->m_buckets;
004dad5f      uint32_t ecx_3 = (this->m_numBuckets << 2);
004dad65      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004dad76      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004dacf0  }

004dad7f                                                                                               90                                 .

004dad80  void __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>(class IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* this, uint32_t arg2)

004dad80  {
004dad8b      arg2 = arg2;
004dad8f      uint8_t edx = ((int8_t)arg2);
004dad93      this->m_buckets = nullptr;
004dad96      this->m_firstInterestingBucket = nullptr;
004dad99      this->m_numBuckets = 0;
004dad9c      this->m_numElements = 0;
004dada0      this->vtable = 0x7be66c;
004dada6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004dadb9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004dadb9      
004dadc3      if (eax == bucketSizesEnd_1)
004dadc5          eax -= 4;
004dadc5      
004dadc8      uint32_t eax_1 = *(uint32_t*)eax;
004dadcd      this->m_numBuckets = eax_1;
004dadcd      
004dadd0      if (eax_1 > 0x17)
004dade6          this->m_buckets = operator new[]((eax_1 << 2));
004dadd0      else
004dadd5          this->m_buckets = &this->m_aInplaceBuckets;
004dadd5      
004dadec      struct HashList<unsigned long,ActionMapValue,1>::HashListData** m_buckets = this->m_buckets;
004dadef      uint32_t ecx_3 = (this->m_numBuckets << 2);
004dadf5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004dae06      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004dad80  }

004dae0f                                               90                                                                 .

004dae10  void __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>(class IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this, uint32_t arg2)

004dae10  {
004dae1b      arg2 = arg2;
004dae1f      uint8_t edx = ((int8_t)arg2);
004dae23      this->m_buckets = nullptr;
004dae26      this->m_firstInterestingBucket = nullptr;
004dae29      this->m_numBuckets = 0;
004dae2c      this->m_numElements = 0;
004dae30      this->vtable = 0x7be670;
004dae36      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004dae49      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004dae49      
004dae53      if (eax == bucketSizesEnd_1)
004dae55          eax -= 4;
004dae55      
004dae58      uint32_t eax_1 = *(uint32_t*)eax;
004dae5d      this->m_numBuckets = eax_1;
004dae5d      
004dae60      if (eax_1 > 0x17)
004dae76          this->m_buckets = operator new[]((eax_1 << 2));
004dae60      else
004dae65          this->m_buckets = &this->m_aInplaceBuckets;
004dae65      
004dae7c      struct HashList<unsigned long,List<unsigned long>,1>::HashListData** m_buckets = this->m_buckets;
004dae7f      uint32_t ecx_3 = (this->m_numBuckets << 2);
004dae85      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004dae96      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004dae10  }

004dae9f                                                                                               90                                 .

004daea0  void __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this, uint32_t arg2)

004daea0  {
004daeab      arg2 = arg2;
004daeaf      uint8_t edx = ((int8_t)arg2);
004daeb3      this->m_buckets = nullptr;
004daeb6      this->m_firstInterestingBucket = nullptr;
004daeb9      this->m_numBuckets = 0;
004daebc      this->m_numElements = 0;
004daec0      this->vtable = 0x7be674;
004daec6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004daed9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004daed9      
004daee3      if (eax == bucketSizesEnd_1)
004daee5          eax -= 4;
004daee5      
004daee8      uint32_t eax_1 = *(uint32_t*)eax;
004daeed      this->m_numBuckets = eax_1;
004daeed      
004daef0      if (eax_1 > 0x17)
004daf06          this->m_buckets = operator new[]((eax_1 << 2));
004daef0      else
004daef5          this->m_buckets = &this->m_aInplaceBuckets;
004daef5      
004daf0c      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_buckets = this->m_buckets;
004daf0f      uint32_t ecx_3 = (this->m_numBuckets << 2);
004daf15      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004daf26      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004daea0  }

004daf2f                                               90                                                                 .

004daf30  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* this, uint32_t arg2)

004daf30  {
004daf3a      if (arg2 == this->m_numBuckets)
004daf3a      {
004daf3c          uint32_t eax;
004daf3c          eax = 0;
004daf3f          return 0;
004daf3a      }
004daf3a      
004daf49      struct HashList<unsigned long,ActionMapValue,1>::HashListData* m_hashNext_2 = nullptr;
004daf49      
004daf4e      while (this->m_numElements != 0)
004daf4e      {
004daf59          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004daf5e          struct HashList<unsigned long,ActionMapValue,1>::HashListData* m_hashNext_3;
004daf5e          int32_t* m_firstInterestingBucket_2;
004daf5e          
004daf5e          if (this->m_firstInterestingBucket == ecx_1)
004daf5e          {
004daf71          label_4daf71:
004daf71              m_firstInterestingBucket_2 = nullptr;
004daf73              m_hashNext_3 = nullptr;
004daf5e          }
004daf5e          else
004daf5e          {
004daf60              while (true)
004daf60              {
004daf60                  struct HashList<unsigned long,ActionMapValue,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
004daf60                  
004daf65                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004daf65                  {
004daf77                      struct HashList<unsigned long,ActionMapValue,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004daf7a                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
004daf7c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004daf7c                      break;
004daf65                  }
004daf65                  
004daf6c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004daf6c                  
004daf6f                  if (&m_firstInterestingBucket[1] == ecx_1)
004daf6f                      goto label_4daf71;
004daf60              }
004daf5e          }
004daf5e          
004daf7e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
004daf7e          
004daf82          if (eax_4 == m_hashNext_3)
004daf94              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004daf82          else
004daf82          {
004daf8b              void* edx_2;
004daf8b              
004daf8b              do
004daf8b              {
004daf84                  edx_2 = eax_4;
004daf86                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
004daf8b              } while (eax_4 != m_hashNext_3);
004daf8b              
004daf8f              if (edx_2 != 0)
004daf9b                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
004daf8f              else
004daf94                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004daf82          }
004daf82          
004daf9e          this->m_numElements -= 1;
004dafa1          m_hashNext_3->m_hashNext = m_hashNext_2;
004dafa7          m_hashNext_2 = m_hashNext_3;
004daf4e      }
004daf4e      
004dafab      struct HashList<unsigned long,ActionMapValue,1>::HashListData** m_buckets = this->m_buckets;
004dafab      
004dafb3      if (m_buckets != &this->m_aInplaceBuckets)
004dafb6          operator delete[](m_buckets);
004dafb6      
004dafc5      this->m_buckets = nullptr;
004dafc8      this->m_firstInterestingBucket = nullptr;
004dafcb      this->m_numBuckets = 0;
004dafce      this->m_numElements = 0;
004dafd1      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
004dafd8      struct HashList<unsigned long,ActionMapValue,1>::HashListData* m_hashNext_1 = m_hashNext_2;
004dafd8      
004dafda      if (m_hashNext_2 != 0)
004dafda      {
004dafef          struct HashList<unsigned long,ActionMapValue,1>::HashListData* m_hashNext;
004dafef          
004dafef          do
004dafef          {
004dafe0              m_hashNext = m_hashNext_1->m_hashNext;
004dafe6              IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::add_internal(this, m_hashNext_1);
004dafed              m_hashNext_1 = m_hashNext;
004dafef          } while (m_hashNext != 0);
004dafda      }
004dafda      
004daff4      m_hashNext_1 = 1;
004daff7      return 1;
004daf30  }

004daffa                                                                                90 90 90 90 90 90                            ......

004db000  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this, uint32_t arg2)

004db000  {
004db00d      if (arg2 == this->m_numBuckets)
004db00d      {
004db00f          uint32_t eax;
004db00f          eax = 0;
004db015          return 0;
004db00d      }
004db00d      
004db01d      int32_t* i_2 = nullptr;
004db01d      
004db021      while (this->m_numElements != 0)
004db021      {
004db02c          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004db031          int32_t** m_firstInterestingBucket_2;
004db031          int32_t* i_3;
004db031          
004db031          if (this->m_firstInterestingBucket == ecx_1)
004db031          {
004db044          label_4db044:
004db044              m_firstInterestingBucket_2 = nullptr;
004db046              i_3 = nullptr;
004db031          }
004db031          else
004db031          {
004db033              while (true)
004db033              {
004db033                  struct HashList<unsigned long,List<unsigned long>,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
004db033                  
004db038                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004db038                  {
004db04a                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004db04d                      i_3 = *(uint32_t*)m_firstInterestingBucket_1;
004db04f                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004db04f                      break;
004db038                  }
004db038                  
004db03f                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004db03f                  
004db042                  if (&m_firstInterestingBucket[1] == ecx_1)
004db042                      goto label_4db044;
004db033              }
004db031          }
004db031          
004db056          int32_t** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
004db05d          int32_t* i_4 = i_3;
004db060          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, this);
004db065          i_3[1] = i_2;
004db06b          i_2 = i_3;
004db021      }
004db021      
004db06f      struct HashList<unsigned long,List<unsigned long>,1>::HashListData** m_buckets = this->m_buckets;
004db06f      
004db077      if (m_buckets != &this->m_aInplaceBuckets)
004db07a          operator delete[](m_buckets);
004db07a      
004db082      uint32_t edx_2 = arg2;
004db089      this->m_buckets = nullptr;
004db08c      this->m_firstInterestingBucket = nullptr;
004db08f      this->m_numBuckets = 0;
004db092      this->m_numElements = 0;
004db095      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, edx_2);
004db09c      int32_t* i_1 = i_2;
004db09e      void** eax_4;
004db09e      
004db09e      if (i_2 != 0)
004db09e      {
004db116          int32_t* i;
004db116          
004db116          do
004db116          {
004db0a0              uint32_t m_numBuckets = this->m_numBuckets;
004db0a6              i = i_1[1];
004db0a6              
004db0af              if ((m_numBuckets * 2) < (this->m_numElements + 1))
004db0af              {
004db0b1                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004db0b7                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
004db0bf                  arg2 = m_numBuckets;
004db0cf                  uint32_t* eax_6 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
004db0cf                  
004db0d9                  if (eax_6 != bucketSizesEnd_1)
004db0e2                      eax_6 = &eax_6[1];
004db0d9                  else
004db0d9                  {
004db0db                      eax_6 -= 4;
004db0db                      
004db0e0                      if (eax_6 != bucketSizesEnd_1)
004db0e2                          eax_6 = &eax_6[1];
004db0d9                  }
004db0d9                  
004db0ea                  IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_6);
004db0af              }
004db0af              
004db0f9              eax_4 = &this->m_buckets[(COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets)];
004db0fe              i_1[1] = *(uint32_t*)eax_4;
004db101              *(uint32_t*)eax_4 = i_1;
004db101              
004db106              if (eax_4 < this->m_firstInterestingBucket)
004db108                  this->m_firstInterestingBucket = eax_4;
004db108              
004db111              this->m_numElements += 1;
004db114              i_1 = i;
004db116          } while (i != 0);
004db09e      }
004db09e      
004db11b      eax_4 = 1;
004db11e      return 1;
004db000  }

004db121     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004db130  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this, uint32_t arg2)

004db130  {
004db13a      if (arg2 == this->m_numBuckets)
004db13a      {
004db13c          uint32_t eax;
004db13c          eax = 0;
004db13f          return 0;
004db13a      }
004db13a      
004db149      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* m_hashNext_2 = nullptr;
004db149      
004db14e      while (this->m_numElements != 0)
004db14e      {
004db159          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004db15e          struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* m_hashNext_3;
004db15e          int32_t* m_firstInterestingBucket_2;
004db15e          
004db15e          if (this->m_firstInterestingBucket == ecx_1)
004db15e          {
004db171          label_4db171:
004db171              m_firstInterestingBucket_2 = nullptr;
004db173              m_hashNext_3 = nullptr;
004db15e          }
004db15e          else
004db15e          {
004db160              while (true)
004db160              {
004db160                  struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
004db160                  
004db165                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004db165                  {
004db177                      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004db17a                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
004db17c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004db17c                      break;
004db165                  }
004db165                  
004db16c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004db16c                  
004db16f                  if (&m_firstInterestingBucket[1] == ecx_1)
004db16f                      goto label_4db171;
004db160              }
004db15e          }
004db15e          
004db17e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
004db17e          
004db182          if (eax_4 == m_hashNext_3)
004db194              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004db182          else
004db182          {
004db18b              void* edx_2;
004db18b              
004db18b              do
004db18b              {
004db184                  edx_2 = eax_4;
004db186                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
004db18b              } while (eax_4 != m_hashNext_3);
004db18b              
004db18f              if (edx_2 != 0)
004db19b                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
004db18f              else
004db194                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
004db182          }
004db182          
004db19e          this->m_numElements -= 1;
004db1a1          m_hashNext_3->m_hashNext = m_hashNext_2;
004db1a7          m_hashNext_2 = m_hashNext_3;
004db14e      }
004db14e      
004db1ab      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_buckets = this->m_buckets;
004db1ab      
004db1b3      if (m_buckets != &this->m_aInplaceBuckets)
004db1b6          operator delete[](m_buckets);
004db1b6      
004db1c5      this->m_buckets = nullptr;
004db1c8      this->m_firstInterestingBucket = nullptr;
004db1cb      this->m_numBuckets = 0;
004db1ce      this->m_numElements = 0;
004db1d1      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
004db1d8      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* m_hashNext_1 = m_hashNext_2;
004db1d8      
004db1da      if (m_hashNext_2 != 0)
004db1da      {
004db1ef          struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* m_hashNext;
004db1ef          
004db1ef          do
004db1ef          {
004db1e0              m_hashNext = m_hashNext_1->m_hashNext;
004db1e6              IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::add_internal(this, m_hashNext_1);
004db1ed              m_hashNext_1 = m_hashNext;
004db1ef          } while (m_hashNext != 0);
004db1da      }
004db1da      
004db1f4      m_hashNext_1 = 1;
004db1f7      return 1;
004db130  }

004db1fa                                                                                90 90 90 90 90 90                            ......

004db200  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::grow(class IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* this)

004db200  {
004db200      class IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* m_numBuckets = this;
004db202      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004db20e      m_numBuckets = this->m_numBuckets;
004db225      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
004db225      
004db22f      if (eax_2 != bucketSizesEnd_1)
004db238          eax_2 = &eax_2[1];
004db22f      else
004db22f      {
004db231          eax_2 -= 4;
004db231          
004db236          if (eax_2 != bucketSizesEnd_1)
004db238              eax_2 = &eax_2[1];
004db22f      }
004db22f      
004db248      return IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
004db200  }

004db249                             90 90 90 90 90 90 90                                                           .......

004db250  class CInputMap const* __thiscall CMasterInputMap::GetInputMapByID(class CMasterInputMap const* this, uint32_t arg2)

004db250  {
004db26f      for (int32_t* i = this->m_hashSections.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, arg2) % this->m_hashSections.m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
004db26f      {
004db273          if (*(uint32_t*)i == arg2)
004db273          {
004db285              if (i != 0)
004db28c                  return i[4];
004db28c              
004db285              break;
004db273          }
004db26f      }
004db26f      
004db280      return 0;
004db250  }

004db28f                                               90                                                                 .

004db290  void __fastcall gmKeyboardUI::UpdateKeymapFilenameLabel(class gmKeyboardUI* this)

004db290  {
004db290      class gmKeyboardUI* this_1 = this;
004db290      
004db29c      if (this->m_pKeyboardCurrentKeymapLabel != 0)
004db29c      {
004db29e          class Client* Client::m_instance_1 = Client::m_instance;
004db29e          
004db2a5          if (Client::m_instance_1 != 0)
004db2a5          {
004db2ac              void* __offset(Client, 0x144) var_c_1 = ((char*)Client::m_instance_1 + 0x144);
004db2b3              enum _WidthConvert edx;
004db2b3              PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, edx, nullptr);
004db2c3              UIElement_Text::SetText(this->m_pKeyboardCurrentKeymapLabel, &this_1);
004db2cc              void* __offset(gmKeyboardUI, -0x14) esi_2 = ((char*)this_1 - 0x14);
004db2cc              
004db2df              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004db2e7                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004db2a5          }
004db29c      }
004db290  }

004db2ec                                      90 90 90 90                                                              ....

004db2f0  class UIOption_ActionKeyMap* __thiscall gmKeyboardUI::AddActionKeyMap(class gmKeyboardUI* this, class UIElement_ListBox* arg2, uint32_t arg3, uint32_t arg4, class StringInfo const* arg5, class StringInfo const* arg6, class List<QualifiedControl> arg7)

004db2f0  {
004db2f9      if (arg2 == 0)
004db2f9      {
004db2ff          arg7.vtable = 0x7a2be8;
004db307          List<CInputManager::InputMapEntry>::flush(&arg7);
004db30f          return 0;
004db2f9      }
004db2f9      
004db313      class UIOption* result = nullptr;
004db318      class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(arg2, 1, nullptr);
004db318      
004db31f      if (eax_1 != 0)
004db31f      {
004db32a          void* eax_2 = eax_1->vtable->DynamicCast(0x10000034);
004db32a          
004db332          if (eax_2 == 0)
004db37b              result = nullptr;
004db332          else
004db332          {
004db334              result = ((char*)eax_2 - 0x20);
004db334              
004db339              if (result != 0)
004db339              {
004db356                  UIOption_ActionKeyMap::Init(result, arg3, arg4, arg5, arg6, &arg7);
004db35e                  OptionPage::RegisterOption(this, result);
004db339              }
004db332          }
004db31f      }
004db31f      
004db367      arg7.vtable = 0x7a2be8;
004db36f      List<CInputManager::InputMapEntry>::flush(&arg7);
004db378      return result;
004db2f0  }

004db37f                                                                                               90                                 .

004db380  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::add(class IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this, struct HashList<unsigned long,List<unsigned long>,1>::HashListData* arg2)

004db380  {
004db388      uint32_t m_hashKey = arg2->m_hashKey;
004db38b      uint32_t m_numBuckets = this->m_numBuckets;
004db38b      
004db39e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
004db39e      {
004db3a2          if (*(uint32_t*)i == m_hashKey)
004db3a2          {
004db3ee              if (i == 0)
004db3ee                  break;
004db3ee              
004db3f2              i = 0;
004db3f5              return 0;
004db3a2          }
004db39e      }
004db39e      
004db3b4      if ((m_numBuckets * 2) < (this->m_numElements + 1))
004db3b8          IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::grow(this);
004db3b8      
004db3c1      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
004db3c4      struct HashList<unsigned long,List<unsigned long>,1>::HashListData** m_buckets = this->m_buckets;
004db3ca      arg2->m_hashNext = m_buckets[temp1_1];
004db3cd      m_buckets[temp1_1] = arg2;
004db3d3      struct HashList<unsigned long,List<unsigned long>,1>::HashListData** eax_4 = &m_buckets[temp1_1];
004db3d3      
004db3d8      if (eax_4 < this->m_firstInterestingBucket)
004db3da          this->m_firstInterestingBucket = eax_4;
004db3da      
004db3e2      this->m_numElements += 1;
004db3e6      uint32_t eax_6;
004db3e6      eax_6 = 1;
004db3e9      return 1;
004db380  }

004db3f8                                                                          90 90 90 90 90 90 90 90                          ........

004db400  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::grow(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this)

004db400  {
004db400      class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* m_numBuckets = this;
004db402      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004db40e      m_numBuckets = this->m_numBuckets;
004db425      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
004db425      
004db42f      if (eax_2 != bucketSizesEnd_1)
004db438          eax_2 = &eax_2[1];
004db42f      else
004db42f      {
004db431          eax_2 -= 4;
004db431          
004db436          if (eax_2 != bucketSizesEnd_1)
004db438              eax_2 = &eax_2[1];
004db42f      }
004db42f      
004db448      return IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
004db400  }

004db449                             90 90 90 90 90 90 90                                                           .......

004db450  void __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::add_internal(class IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* this, struct HashList<unsigned long,ActionMapValue,1>::HashListData* arg2)

004db450  {
004db45e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
004db462          IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::grow(this);
004db462      
004db475      struct HashList<unsigned long,ActionMapValue,1>::HashListData** eax_4 = &this->m_buckets[(COMBINE(0, arg2->m_hashKey) % this->m_numBuckets)];
004db47a      arg2->m_hashNext = *(uint32_t*)eax_4;
004db47d      *(uint32_t*)eax_4 = arg2;
004db47d      
004db482      if (eax_4 < this->m_firstInterestingBucket)
004db484          this->m_firstInterestingBucket = eax_4;
004db484      
004db487      this->m_numElements += 1;
004db450  }

004db48e                                            90 90                                                                ..

004db490  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::place_at_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this, struct HashList<unsigned long,List<unsigned long>,1>::HashListData* arg2)

004db490  {
004db498      uint32_t m_hashKey = arg2->m_hashKey;
004db4a7      int32_t* eax_3 = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)];
004db4a7      
004db4ab      if (eax_3 == 0)
004db4ab      {
004db4be      label_4db4be:
004db4be          IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::add(this, arg2);
004db4ab      }
004db4ab      else
004db4ab      {
004db4b2          while (*(uint32_t*)eax_3 != m_hashKey)
004db4b2          {
004db4b4              eax_3 = eax_3[1];
004db4b4              
004db4b9              if (eax_3 == 0)
004db4b9                  goto label_4db4be_1;
004db4b2          }
004db4b2          
004db4dc          if (eax_3 == 0)
004db4dc          {
004db4be          label_4db4be_1:
004db4be              IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::add(this, arg2);
004db4dc          }
004db4dc          else
004db4e5              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
004db4ab      }
004db4ab      
004db4ce      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
004db4d4      int32_t eax_5;
004db4d4      eax_5 = 1;
004db4d7      return 1;
004db490  }

004db4ec                                      90 90 90 90                                                              ....

004db4f0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::add(class IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* this, struct HashList<unsigned long,ActionMapValue,1>::HashListData* arg2)

004db4f0  {
004db4f8      uint32_t m_hashKey = arg2->m_hashKey;
004db4fb      uint32_t m_numBuckets = this->m_numBuckets;
004db4fb      
004db50e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
004db50e      {
004db512          if (*(uint32_t*)i == m_hashKey)
004db512          {
004db55e              if (i == 0)
004db55e                  break;
004db55e              
004db562              i = 0;
004db565              return 0;
004db512          }
004db50e      }
004db50e      
004db524      if ((m_numBuckets * 2) < (this->m_numElements + 1))
004db528          IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::grow(this);
004db528      
004db531      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
004db534      struct HashList<unsigned long,ActionMapValue,1>::HashListData** m_buckets = this->m_buckets;
004db53a      arg2->m_hashNext = m_buckets[temp1_1];
004db53d      m_buckets[temp1_1] = arg2;
004db543      struct HashList<unsigned long,ActionMapValue,1>::HashListData** eax_4 = &m_buckets[temp1_1];
004db543      
004db548      if (eax_4 < this->m_firstInterestingBucket)
004db54a          this->m_firstInterestingBucket = eax_4;
004db54a      
004db552      this->m_numElements += 1;
004db556      uint32_t eax_6;
004db556      eax_6 = 1;
004db559      return 1;
004db4f0  }

004db568                          90 90 90 90 90 90 90 90                                                          ........

004db570  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::place_at_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* this, struct HashList<unsigned long,ActionMapValue,1>::HashListData* arg2)

004db570  {
004db578      uint32_t m_hashKey = arg2->m_hashKey;
004db587      int32_t* eax_3 = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)];
004db587      
004db58b      if (eax_3 == 0)
004db58b      {
004db59e      label_4db59e:
004db59e          IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::add(this, arg2);
004db58b      }
004db58b      else
004db58b      {
004db592          while (*(uint32_t*)eax_3 != m_hashKey)
004db592          {
004db594              eax_3 = eax_3[1];
004db594              
004db599              if (eax_3 == 0)
004db599                  goto label_4db59e_1;
004db592          }
004db592          
004db5bc          if (eax_3 == 0)
004db5bc          {
004db59e          label_4db59e_1:
004db59e              IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::add(this, arg2);
004db5bc          }
004db5bc          else
004db5c5              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
004db58b      }
004db58b      
004db5ae      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
004db5b4      int32_t eax_5;
004db5b4      eax_5 = 1;
004db5b7      return 1;
004db570  }

004db5cc                                      90 90 90 90                                                              ....

004db5d0  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::push_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this, struct HashList<unsigned long,List<unsigned long>,1>::HashListData* arg2)

004db5d0  {
004db5d8      uint32_t m_hashKey = arg2->m_hashKey;
004db5d8      
004db5eb      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
004db5eb      {
004db5f2          if (*(uint32_t*)i == m_hashKey)
004db5f2          {
004db61c              if (i == 0)
004db61c                  break;
004db61c              
004db61f              i = 0;
004db622              return 0;
004db5f2          }
004db5eb      }
004db5eb      
004db5fe      IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::add(this, arg2);
004db60e      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
004db614      int32_t eax_4;
004db614      eax_4 = 1;
004db617      return 1;
004db5d0  }

004db625                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004db630  uint8_t __thiscall HashList<unsigned long,List<unsigned long>,1>::move_to_tail(class HashList<unsigned long,List<unsigned long>,1>* this, uint32_t const* arg2)

004db630  {
004db635      uint32_t const i = *(uint32_t*)arg2;
004db644      int32_t* eax_3 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
004db644      
004db648      if (eax_3 != 0)
004db648      {
004db652          while (*(uint32_t*)eax_3 != i)
004db652          {
004db654              eax_3 = eax_3[1];
004db654              
004db659              if (eax_3 == 0)
004db659              {
004db65b                  eax_3 = 0;
004db65e                  return 0;
004db659              }
004db652          }
004db652          
004db663          if (eax_3 != 0)
004db670              /* tailcall */
004db670              return IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::place_at_tail(this, eax_3);
004db648      }
004db648      
004db665      eax_3 = 0;
004db668      return 0;
004db630  }

004db675                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004db680  void __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::add_internal(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this, struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* arg2)

004db680  {
004db68e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
004db692          IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::grow(this);
004db692      
004db6a5      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** eax_4 = &this->m_buckets[(COMBINE(0, arg2->m_hashKey) % this->m_numBuckets)];
004db6aa      arg2->m_hashNext = *(uint32_t*)eax_4;
004db6ad      *(uint32_t*)eax_4 = arg2;
004db6ad      
004db6b2      if (eax_4 < this->m_firstInterestingBucket)
004db6b4          this->m_firstInterestingBucket = eax_4;
004db6b4      
004db6b7      this->m_numElements += 1;
004db680  }

004db6be                                                                                            90 90                                ..

004db6c0  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::push_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* this, struct HashList<unsigned long,ActionMapValue,1>::HashListData* arg2)

004db6c0  {
004db6c8      uint32_t m_hashKey = arg2->m_hashKey;
004db6c8      
004db6db      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
004db6db      {
004db6e2          if (*(uint32_t*)i == m_hashKey)
004db6e2          {
004db70c              if (i == 0)
004db70c                  break;
004db70c              
004db70f              i = 0;
004db712              return 0;
004db6e2          }
004db6db      }
004db6db      
004db6ee      IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::add(this, arg2);
004db6fe      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
004db704      int32_t eax_4;
004db704      eax_4 = 1;
004db707      return 1;
004db6c0  }

004db715                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004db720  uint8_t __thiscall HashList<unsigned long,ActionMapValue,1>::move_to_tail(class HashList<unsigned long,ActionMapValue,1>* this, uint32_t const* arg2)

004db720  {
004db725      uint32_t const i = *(uint32_t*)arg2;
004db734      int32_t* eax_3 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
004db734      
004db738      if (eax_3 != 0)
004db738      {
004db742          while (*(uint32_t*)eax_3 != i)
004db742          {
004db744              eax_3 = eax_3[1];
004db744              
004db749              if (eax_3 == 0)
004db749              {
004db74b                  eax_3 = 0;
004db74e                  return 0;
004db749              }
004db742          }
004db742          
004db753          if (eax_3 != 0)
004db760              /* tailcall */
004db760              return IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::place_at_tail(this, eax_3);
004db738      }
004db738      
004db755      eax_3 = 0;
004db758      return 0;
004db720  }

004db765                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004db770  void __fastcall gmKeyboardUI::PostInit(class gmKeyboardUI* this)

004db770  {
004db776      UIElement::PostInit(this);
004db77b      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004db77b      
004db782      if (eax != 0)
004db782      {
004db78a          struct gmNoticeHandler::VTable** ecx;
004db78a          
004db78a          if (this == 0)
004db794              ecx = nullptr;
004db78a          else
004db78c              ecx = &this->vtable;
004db78c          
004db796          eax->vtable->RegisterNoticeHandler(0x186a4, ecx);
004db7af          uint32_t var_c = 0;
004db7be          uint32_t var_4;
004db7be          
004db7be          if (UIElement::GetAttribute_Enum(this, 0x10000018, &var_4) != 0)
004db7be          {
004db7cb              class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x1000049d);
004db7d2              enum ControlType var_8;
004db7d2              
004db7d2              if (eax_2 != 0)
004db7d2              {
004db7db                  class UIElement* eax_3 = UIElement::GetChildRecursive(eax_2, var_4);
004db7e2                  enum ControlType eax_4;
004db7e2                  
004db7e2                  if (eax_3 == 0)
004db7f2                      eax_4 = ct_Invalid;
004db7e2                  else
004db7ea                      eax_4 = eax_3->vtable->DynamicCast(5);
004db7ea                  
004db7f6                  var_8 = eax_4;
004db7f6                  
004db7fa                  if (eax_4 != ct_Invalid)
004db80c                      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashMappingListBoxes.vtable, &Movement, &var_8);
004db7d2              }
004db7d2              
004db818              class UIElement* eax_5 = UIElement::GetChildRecursive(this, 0x1000049f);
004db818              
004db81f              if (eax_5 != 0)
004db81f              {
004db828                  class UIElement* eax_6 = UIElement::GetChildRecursive(eax_5, var_4);
004db82f                  enum ControlType eax_7;
004db82f                  
004db82f                  if (eax_6 == 0)
004db83f                      eax_7 = ct_Invalid;
004db82f                  else
004db837                      eax_7 = eax_6->vtable->DynamicCast(5);
004db837                  
004db843                  var_8 = eax_7;
004db843                  
004db847                  if (eax_7 != ct_Invalid)
004db859                      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashMappingListBoxes.vtable, &Camera, &var_8);
004db81f              }
004db81f              
004db865              class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x100004a1);
004db865              
004db86c              if (eax_8 != 0)
004db86c              {
004db875                  class UIElement* eax_9 = UIElement::GetChildRecursive(eax_8, var_4);
004db87c                  enum ControlType eax_10;
004db87c                  
004db87c                  if (eax_9 == 0)
004db88c                      eax_10 = ct_Invalid;
004db87c                  else
004db884                      eax_10 = eax_9->vtable->DynamicCast(5);
004db884                  
004db890                  var_8 = eax_10;
004db890                  
004db894                  if (eax_10 != ct_Invalid)
004db8a6                      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashMappingListBoxes.vtable, &Combat, &var_8);
004db86c              }
004db86c              
004db8b2              class UIElement* eax_11 = UIElement::GetChildRecursive(this, 0x100004a3);
004db8b2              
004db8b9              if (eax_11 != 0)
004db8b9              {
004db8c2                  class UIElement* eax_12 = UIElement::GetChildRecursive(eax_11, var_4);
004db8c9                  enum ControlType eax_13;
004db8c9                  
004db8c9                  if (eax_12 == 0)
004db8d9                      eax_13 = ct_Invalid;
004db8c9                  else
004db8d1                      eax_13 = eax_12->vtable->DynamicCast(5);
004db8d1                  
004db8dd                  var_8 = eax_13;
004db8dd                  
004db8e1                  if (eax_13 != ct_Invalid)
004db8f3                      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashMappingListBoxes.vtable, &UI, &var_8);
004db8b9              }
004db8b9              
004db8ff              class UIElement* eax_14 = UIElement::GetChildRecursive(this, 0x10000211);
004db8ff              
004db906              if (eax_14 != 0)
004db906              {
004db90f                  class UIElement* eax_15 = UIElement::GetChildRecursive(eax_14, var_4);
004db916                  enum ControlType eax_16;
004db916                  
004db916                  if (eax_15 == 0)
004db926                      eax_16 = ct_Invalid;
004db916                  else
004db91e                      eax_16 = eax_15->vtable->DynamicCast(5);
004db91e                  
004db92a                  var_8 = eax_16;
004db92a                  
004db92e                  if (eax_16 != ct_Invalid)
004db940                      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashMappingListBoxes.vtable, &CharacterSettings, &var_8);
004db906              }
004db906              
004db94c              class UIElement* eax_17 = UIElement::GetChildRecursive(this, 0x100004a5);
004db94c              
004db953              if (eax_17 != 0)
004db953              {
004db95c                  class UIElement* eax_18 = UIElement::GetChildRecursive(eax_17, var_4);
004db963                  enum ControlType eax_19;
004db963                  
004db963                  if (eax_18 == 0)
004db973                      eax_19 = ct_Invalid;
004db963                  else
004db96b                      eax_19 = eax_18->vtable->DynamicCast(5);
004db96b                  
004db977                  var_8 = eax_19;
004db977                  
004db97b                  if (eax_19 != ct_Invalid)
004db98d                      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashMappingListBoxes, &Emote, &var_8);
004db953              }
004db7be          }
004db7be          
004db9a5          if (UIElement::GetAttribute_Enum(this, 0x1000001e, &var_c) != 0)
004db9a5          {
004db9ae              class UIElement* eax_21 = UIElement::GetChildRecursive(this, var_c);
004db9b5              class UIElement_Button* eax_22;
004db9b5              
004db9b5              if (eax_21 == 0)
004db9c5                  eax_22 = nullptr;
004db9b5              else
004db9bd                  eax_22 = eax_21->vtable->DynamicCast(1);
004db9bd              
004db9c7              this->m_pKeyboardLoadKeymapButton = eax_22;
004db9a5          }
004db9a5          
004db9e0          if (UIElement::GetAttribute_Enum(this, 0x1000001f, &var_c) != 0)
004db9e0          {
004db9e9              class UIElement* eax_24 = UIElement::GetChildRecursive(this, var_c);
004db9f0              class UIElement_Button* eax_25;
004db9f0              
004db9f0              if (eax_24 == 0)
004dba00                  eax_25 = nullptr;
004db9f0              else
004db9f8                  eax_25 = eax_24->vtable->DynamicCast(1);
004db9f8              
004dba02              this->m_pKeyboardSaveKeymapButton = eax_25;
004db9e0          }
004db9e0          
004dba1b          if (UIElement::GetAttribute_Enum(this, 0x1000001d, &var_c) != 0)
004dba1b          {
004dba24              class UIElement* eax_27 = UIElement::GetChildRecursive(this, var_c);
004dba2b              class UIElement_Text* eax_28;
004dba2b              
004dba2b              if (eax_27 == 0)
004dba3b                  eax_28 = nullptr;
004dba2b              else
004dba33                  eax_28 = eax_27->vtable->DynamicCast(0xc);
004dba33              
004dba3d              this->m_pKeyboardCurrentKeymapLabel = eax_28;
004dba1b          }
004dba1b          
004dba56          if (UIElement::GetAttribute_Enum(this, 0x1000001b, &var_c) != 0)
004dba56          {
004dba5f              class UIElement* eax_30 = UIElement::GetChildRecursive(this, var_c);
004dba66              class UIElement_Button* eax_31;
004dba66              
004dba66              if (eax_30 == 0)
004dba76                  eax_31 = nullptr;
004dba66              else
004dba6e                  eax_31 = eax_30->vtable->DynamicCast(1);
004dba6e              
004dba78              this->m_pKeyboardResetToDefaultsButton = eax_31;
004dba56          }
004dba56          
004dba91          if (UIElement::GetAttribute_Enum(this, 0x1000001c, &var_c) != 0)
004dba91          {
004dba9a              class UIElement* eax_33 = UIElement::GetChildRecursive(this, var_c);
004dbaa1              class UIElement_Button* eax_34;
004dbaa1              
004dbaa1              if (eax_33 == 0)
004dbab1                  eax_34 = nullptr;
004dbaa1              else
004dbaa9                  eax_34 = eax_33->vtable->DynamicCast(1);
004dbaa9              
004dbab3              this->m_pKeyboardRevertToSavedButton = eax_34;
004dba91          }
004dba91          
004dbacc          if (UIElement::GetAttribute_Enum(this, 0x10000019, &var_c) != 0)
004dbacc          {
004dbad5              class UIElement* eax_36 = UIElement::GetChildRecursive(this, var_c);
004dbadc              class UIElement_Button* eax_37;
004dbadc              
004dbadc              if (eax_36 == 0)
004dbaec                  eax_37 = nullptr;
004dbadc              else
004dbae4                  eax_37 = eax_36->vtable->DynamicCast(1);
004dbae4              
004dbaee              this->m_pKeyboardOKButton = eax_37;
004dbacc          }
004dbacc          
004dbb07          if (UIElement::GetAttribute_Enum(this, 0x1000001a, &var_c) != 0)
004dbb07          {
004dbb10              class UIElement* eax_39 = UIElement::GetChildRecursive(this, var_c);
004dbb17              class UIElement_Button* eax_40;
004dbb17              
004dbb17              if (eax_39 == 0)
004dbb27                  eax_40 = nullptr;
004dbb17              else
004dbb1f                  eax_40 = eax_39->vtable->DynamicCast(1);
004dbb1f              
004dbb29              this->m_pKeyboardCancelButton = eax_40;
004dbb07          }
004dbb07          
004dbb2f          this->vtable->InitOptions();
004db782      }
004db770  }

004dbb3e                                                                                            90 90                                ..

004dbb40  void* __thiscall HashTable<unsigned long,UIElement_ListBox *,0>::`scalar deleting destructor'(class HashTable<unsigned long,UIElement_ListBox *,0>* this, uint32_t arg2)

004dbb40  {
004dbb49      this->vtable = 0x7be678;
004dbb4f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
004dbb54      class HashTableData<unsigned long,UIElement_ListBox *>** m_buckets = this->m_intrusiveTable.m_buckets;
004dbb44      this->m_intrusiveTable.vtable = 0x7be668;
004dbb44      
004dbb62      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004dbb65          operator delete[](m_buckets);
004dbb65      
004dbb44      this->m_intrusiveTable.m_buckets = nullptr;
004dbb44      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004dbb44      this->m_intrusiveTable.m_numBuckets = 0;
004dbb44      this->m_intrusiveTable.m_numElements = 0;
004dbb44      
004dbb80      if ((arg2 & 1) != 0)
004dbb83          operator delete(this);
004dbb83      
004dbb8f      return this;
004dbb40  }

004dbb92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004dbba0  uint8_t __thiscall HashList<unsigned long,List<unsigned long>,1>::push_tail(class HashList<unsigned long,List<unsigned long>,1>* this, uint32_t const* arg2, class List<unsigned long> const* arg3)

004dbba0  {
004dbba9      uint32_t const ecx = *(uint32_t*)arg2;
004dbba9      
004dbbbd      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ecx) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
004dbbbd      {
004dbbc2          if (*(uint32_t*)i == ecx)
004dbbc2          {
004dbc0a              if (i != 0)
004dbc17                  return HashList<unsigned long,List<unsigned long>,1>::move_to_tail(this, arg2);
004dbc17              
004dbc0a              break;
004dbbc2          }
004dbbbd      }
004dbbbd      
004dbbd3      void* esi = operator new(0x20);
004dbbd3      
004dbbda      if (esi == 0)
004dbc1a          esi = nullptr;
004dbbda      else
004dbbda      {
004dbbe3          *(uint32_t*)esi = *(uint32_t*)arg2;
004dbbe5          *(uint32_t*)((char*)esi + 4) = 0;
004dbbeb          *(uint32_t*)((char*)esi + 8) = 0;
004dbbee          *(uint32_t*)((char*)esi + 0xc) = 0;
004dbbe8          ((char*)esi + 0x10)->vtable = 0x7a2be4;
004dbbe8          ((char*)esi + 0x10)->_head = nullptr;
004dbbe8          ((char*)esi + 0x10)->_tail = nullptr;
004dbbe8          ((char*)esi + 0x10)->_num_elements = 0;
004dbc01          List<unsigned long>::operator=(((char*)esi + 0x10), arg3);
004dbbda      }
004dbbda      
004dbc1f      uint8_t result = IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::push_tail(this, esi);
004dbc26      arg2 = result;
004dbc26      
004dbc2e      if ((result != 0 || esi == 0))
004dbc4f          return result;
004dbc4f      
004dbc33      *(uint32_t*)((char*)esi + 0x10) = 0x7a2be4;
004dbc39      List<StringTableMetaLanguage::Node const *>::flush(((char*)esi + 0x10));
004dbc3f      operator delete(esi);
004dbc44      return arg2;
004dbba0  }

004dbc52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004dbc60  uint8_t __thiscall HashList<unsigned long,ActionMapValue,1>::push_tail(class HashList<unsigned long,ActionMapValue,1>* this, uint32_t const* arg2, class ActionMapValue* arg3)

004dbc60  {
004dbc68      uint32_t const ecx = *(uint32_t*)arg2;
004dbc68      
004dbc79      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ecx) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
004dbc79      {
004dbc82          if (*(uint32_t*)i == ecx)
004dbc82          {
004dbcd5              if (i != 0)
004dbce1                  return HashList<unsigned long,ActionMapValue,1>::move_to_tail(this, arg2);
004dbce1              
004dbcd5              break;
004dbc82          }
004dbc79      }
004dbc79      
004dbc8d      void* eax_2 = operator new(0x20);
004dbc97      void* esi_4;
004dbc97      
004dbc97      if (eax_2 == 0)
004dbce4          esi_4 = nullptr;
004dbc97      else
004dbc97      {
004dbc9b          *(uint32_t*)eax_2 = *(uint32_t*)arg2;
004dbca1          *(uint32_t*)((char*)eax_2 + 4) = 0;
004dbca8          *(uint32_t*)((char*)eax_2 + 8) = 0;
004dbcaf          *(uint32_t*)((char*)eax_2 + 0xc) = 0;
004dbcbb          *(uint32_t*)((char*)eax_2 + 0x10) = arg3->m_eToggleType;
004dbcc0          *(uint32_t*)((char*)eax_2 + 0x14) = arg3->m_userBindingData.m_eActionClass;
004dbcc6          *(uint32_t*)((char*)eax_2 + 0x18) = arg3->m_userBindingData.m_action_name;
004dbccc          *(uint32_t*)((char*)eax_2 + 0x1c) = arg3->m_userBindingData.m_description;
004dbccf          esi_4 = eax_2;
004dbc97      }
004dbc97      
004dbcef      int32_t ebx;
004dbcef      ebx = IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::push_tail(this, esi_4);
004dbcef      
004dbcf7      if ((ebx == 0 && esi_4 != 0))
004dbcfa          operator delete(esi_4);
004dbcfa      
004dbd07      return ebx;
004dbc60  }

004dbc7d                                                                                         8d 49 00                               .I.
004dbd0a                                90 90 90 90 90 90                                                            ......

004dbd10  void __fastcall IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::delete_contents(class IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this)

004dbd10  {
004dbd1b      while (this->m_numElements != 0)
004dbd1b      {
004dbd28          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004dbd2e          int32_t* m_firstInterestingBucket_2;
004dbd2e          void* esi_1;
004dbd2e          
004dbd2e          if (this->m_firstInterestingBucket == ecx_1)
004dbd2e          {
004dbd41          label_4dbd41:
004dbd41              m_firstInterestingBucket_2 = nullptr;
004dbd43              esi_1 = nullptr;
004dbd2e          }
004dbd2e          else
004dbd2e          {
004dbd30              while (true)
004dbd30              {
004dbd30                  struct HashList<unsigned long,List<unsigned long>,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
004dbd30                  
004dbd35                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004dbd35                  {
004dbd47                      int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004dbd4a                      esi_1 = *(uint32_t*)m_firstInterestingBucket_1;
004dbd4c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004dbd4c                      break;
004dbd35                  }
004dbd35                  
004dbd3c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004dbd3c                  
004dbd3f                  if (&m_firstInterestingBucket[1] == ecx_1)
004dbd3f                      goto label_4dbd41;
004dbd30              }
004dbd2e          }
004dbd2e          
004dbd4e          void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
004dbd4e          
004dbd52          if (eax_3 == esi_1)
004dbd64              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
004dbd52          else
004dbd52          {
004dbd5b              void* ecx_2;
004dbd5b              
004dbd5b              do
004dbd5b              {
004dbd54                  ecx_2 = eax_3;
004dbd56                  eax_3 = *(uint32_t*)((char*)eax_3 + 4);
004dbd5b              } while (eax_3 != esi_1);
004dbd5b              
004dbd5f              if (ecx_2 != 0)
004dbd6b                  *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
004dbd5f              else
004dbd64                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
004dbd52          }
004dbd52          
004dbd74          this->m_numElements -= 1;
004dbd74          
004dbd77          if (esi_1 != 0)
004dbd77          {
004dbd79              *(uint32_t*)((char*)esi_1 + 0x10) = 0x7a2be4;
004dbd79              
004dbd80              while (true)
004dbd80              {
004dbd80                  void* ecx_5 = *(uint32_t*)((char*)esi_1 + 0x14);
004dbd80                  
004dbd85                  if (ecx_5 == 0)
004dbd85                      break;
004dbd85                  
004dbd87                  void* eax_5 = *(uint32_t*)((char*)ecx_5 + 4);
004dbd8c                  *(uint32_t*)((char*)esi_1 + 0x14) = eax_5;
004dbd8c                  
004dbd8f                  if (eax_5 == 0)
004dbd96                      *(uint32_t*)((char*)esi_1 + 0x18) = 0;
004dbd8f                  else
004dbd91                      *(uint32_t*)((char*)eax_5 + 8) = 0;
004dbd91                  
004dbd9b                  if (ecx_5 != 0)
004dbd9e                      operator delete(ecx_5);
004dbd9e                  
004dbda6                  *(uint32_t*)((char*)esi_1 + 0x1c) -= 1;
004dbd80              }
004dbd80              
004dbdac              operator delete(esi_1);
004dbd77          }
004dbd1b      }
004dbd10  }

004dbdc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004dbdd0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::add(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this, struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* arg2)

004dbdd0  {
004dbdd8      uint32_t m_hashKey = arg2->m_hashKey;
004dbddb      uint32_t m_numBuckets = this->m_numBuckets;
004dbddb      
004dbdee      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
004dbdee      {
004dbdf2          if (*(uint32_t*)i == m_hashKey)
004dbdf2          {
004dbe3e              if (i == 0)
004dbe3e                  break;
004dbe3e              
004dbe42              i = 0;
004dbe45              return 0;
004dbdf2          }
004dbdee      }
004dbdee      
004dbe04      if ((m_numBuckets * 2) < (this->m_numElements + 1))
004dbe08          IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::grow(this);
004dbe08      
004dbe11      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
004dbe14      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_buckets = this->m_buckets;
004dbe1a      arg2->m_hashNext = m_buckets[temp1_1];
004dbe1d      m_buckets[temp1_1] = arg2;
004dbe23      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** eax_4 = &m_buckets[temp1_1];
004dbe23      
004dbe28      if (eax_4 < this->m_firstInterestingBucket)
004dbe2a          this->m_firstInterestingBucket = eax_4;
004dbe2a      
004dbe32      this->m_numElements += 1;
004dbe36      uint32_t eax_6;
004dbe36      eax_6 = 1;
004dbe39      return 1;
004dbdd0  }

004dbe48                          90 90 90 90 90 90 90 90                                                          ........

004dbe50  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::place_at_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this, struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* arg2)

004dbe50  {
004dbe58      uint32_t m_hashKey = arg2->m_hashKey;
004dbe67      int32_t* eax_3 = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)];
004dbe67      
004dbe6b      if (eax_3 == 0)
004dbe6b      {
004dbe7e      label_4dbe7e:
004dbe7e          IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::add(this, arg2);
004dbe6b      }
004dbe6b      else
004dbe6b      {
004dbe72          while (*(uint32_t*)eax_3 != m_hashKey)
004dbe72          {
004dbe74              eax_3 = eax_3[1];
004dbe74              
004dbe79              if (eax_3 == 0)
004dbe79                  goto label_4dbe7e_1;
004dbe72          }
004dbe72          
004dbe9c          if (eax_3 == 0)
004dbe9c          {
004dbe7e          label_4dbe7e_1:
004dbe7e              IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::add(this, arg2);
004dbe9c          }
004dbe9c          else
004dbea5              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
004dbe6b      }
004dbe6b      
004dbe8e      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
004dbe94      int32_t eax_5;
004dbe94      eax_5 = 1;
004dbe97      return 1;
004dbe50  }

004dbeac                                      90 90 90 90                                                              ....

004dbeb0  void __thiscall gmKeyboardUI::gmKeyboardUI(class gmKeyboardUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004dbeb0  {
004dbec0      OptionPage::OptionPage(this, arg2, arg3);
004dbec5      this->vtable = &gmUrgentAssistanceUI::`vftable';
004dbed1      this->vtable = 0x7be930;
004dbed7      this->vtable = &gmKeyboardUI::`vftable';
004dbee1      this->vtable = &gmKeyboardUI::`vftable';
004dbeeb      __builtin_memset(&this->m_pKeyboardLoadKeymapButton, 0, 0x1c);
004dbf1d      this->m_hashMappingListBoxes.vtable = 0x7be678;
004dbf27      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement_ListBox *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,UIElement_ListBox *> *,0>(&this->m_hashMappingListBoxes.m_intrusiveTable, 0x17);
004dbf2c      this->m_uiLoadKeymapDialogContext = 0;
004dbf32      this->m_uiSaveKeymapDialogContext = 0;
004dbf38      this->m_uiCantOverwriteReadOnlyKeymapDialogContext = 0;
004dbf3e      this->m_uiOverwriteKeymapDialogContext = 0;
004dbf44      this->m_listCachedKeymapFilenames._head = nullptr;
004dbf4a      this->m_listCachedKeymapFilenames._tail = nullptr;
004dbf50      this->m_listCachedKeymapFilenames._num_elements = 0;
004dbf57      this->m_listCachedKeymapFilenames.vtable = &List<class PStringBase<char> >::`vftable';
004dbeb0  }

004dbf67                       90 90 90 90 90 90 90 90 90                                                         .........

004dbf70  class UIElement* __thiscall gmKeyboardUI::DynamicCast(class gmKeyboardUI* this, uint32_t arg2) __pure

004dbf70  {
004dbf7c      int32_t eax;
004dbf7c      eax = arg2 != 0x1000000e;
004dbf82      return ((eax - 1) & this);
004dbf70  }

004dbf85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004dbf90  uint32_t gmKeyboardUI::GetUIElementType(class gmKeyboardUI const* this @ ecx) __pure

004dbf90  {
004dbf95      return 0x1000000e;
004dbf90  }

004dbf96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004dbfa0  void __fastcall gmKeyboardUI::~gmKeyboardUI(class gmKeyboardUI* this)

004dbfa0  {
004dbfab      this->vtable = 0x7be930;
004dbfb1      this->vtable = &gmKeyboardUI::`vftable';
004dbfa5      this->vtable = &gmKeyboardUI::`vftable';
004dbfc9      DialogFactory::CloseDialog(this->m_uiLoadKeymapDialogContext);
004dbfd0      this->m_uiLoadKeymapDialogContext = 0;
004dbfdd      DialogFactory::CloseDialog(this->m_uiSaveKeymapDialogContext);
004dbfe2      this->m_uiSaveKeymapDialogContext = 0;
004dbfef      DialogFactory::CloseDialog(this->m_uiCantOverwriteReadOnlyKeymapDialogContext);
004dbff4      this->m_uiCantOverwriteReadOnlyKeymapDialogContext = 0;
004dc001      DialogFactory::CloseDialog(this->m_uiOverwriteKeymapDialogContext);
004dc00c      this->m_uiOverwriteKeymapDialogContext = 0;
004dc006      this->m_listCachedKeymapFilenames.vtable = &List<class PStringBase<char> >::`vftable';
004dc01b      List<PStringBase<char> >::flush(&this->m_listCachedKeymapFilenames);
004dc028      this->m_hashMappingListBoxes.vtable = 0x7be678;
004dc032      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashMappingListBoxes.m_intrusiveTable);
004dc037      class HashTableData<unsigned long,UIElement_ListBox *>** m_buckets = this->m_hashMappingListBoxes.m_intrusiveTable.m_buckets;
004dc020      this->m_hashMappingListBoxes.m_intrusiveTable.vtable = 0x7be668;
004dc020      
004dc045      if (m_buckets != &this->m_hashMappingListBoxes.m_intrusiveTable.m_aInplaceBuckets)
004dc048          operator delete[](m_buckets);
004dc048      
004dc020      this->m_hashMappingListBoxes.m_intrusiveTable.m_buckets = nullptr;
004dc020      this->m_hashMappingListBoxes.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004dc020      this->m_hashMappingListBoxes.m_intrusiveTable.m_numBuckets = 0;
004dc020      this->m_hashMappingListBoxes.m_intrusiveTable.m_numElements = 0;
004dbfa5      this->vtable = &gmUrgentAssistanceUI::`vftable';
004dc064      NoticeHandler::~NoticeHandler(&this->vtable);
004dc06f      /* tailcall */
004dc06f      return OptionPage::~OptionPage(this);
004dbfa0  }

004dc074                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004dc080  class UIElement* gmKeyboardUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004dc080  {
004dc085      void* eax = operator new(0x6b4);
004dc085      
004dc08f      if (eax == 0)
004dc0a5          return 0;
004dc0a5      
004dc0a2      return gmKeyboardUI::gmKeyboardUI(eax, arg1, arg2);
004dc080  }

004dc0a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004dc0b0  uint8_t __fastcall gmKeyboardUI::MakeLoadKeymapDialog(class gmKeyboardUI* this)

004dc0b0  {
004dc0b0      int32_t ebp;
004dc0b0      int32_t var_4 = ebp;
004dc0bd      int32_t* var_1d8 = &var_4;
004dc0c0      class gmKeyboardUI* this_1 = this;
004dc0ca      bool cond:0 = this_1->m_uiLoadKeymapDialogContext == 0;
004dc0cc      class gmKeyboardUI* this_2 = this_1;
004dc0cc      
004dc0d0      if (!(cond:0))
004dc0d0      {
004dc0d2          uint32_t eax;
004dc0d2          eax = 0;
004dc0da          *(uint32_t*)var_1d8;
004dc0db          return 0;
004dc0d0      }
004dc0d0      
004dc0e0      void var_1a0;
004dc0e0      PropertyCollection::PropertyCollection(&var_1a0);
004dc0ee      int32_t* var_1d0 = nullptr;
004dc0f2      int32_t* var_1cc = nullptr;
004dc0f6      BaseProperty::SetPropertyName(&var_1d0, 0x8e);
004dc0f6      
004dc0ff      if (var_1cc != 0)
004dc0ff      {
004dc105          BaseProperty::CheckCopyOnWrite(&var_1d0);
004dc112          *(uint32_t*)(*(uint32_t*)var_1cc + 0xac)(7);
004dc0ff      }
004dc0ff      
004dc12f      uint32_t var_1c8 = BaseProperty::GetPropertyName(&var_1d0);
004dc133      void var_19c;
004dc133      HashTable<unsigned long,BaseProperty,1>::add(&var_19c, &var_1c8, &var_1d0);
004dc141      BaseProperty::SetPropertyName(&var_1d0, 0xc3);
004dc141      
004dc14a      if (var_1cc != 0)
004dc14a      {
004dc150          BaseProperty::CheckCopyOnWrite(&var_1d0);
004dc160          *(uint32_t*)(*(uint32_t*)var_1cc + 0xac)(0x10000001);
004dc14a      }
004dc14a      
004dc17d      var_1c8 = BaseProperty::GetPropertyName(&var_1d0);
004dc181      HashTable<unsigned long,BaseProperty,1>::add(&var_19c, &var_1c8, &var_1d0);
004dc18f      BaseProperty::SetPropertyName(&var_1d0, 0xac);
004dc18f      
004dc198      if (var_1cc != 0)
004dc198      {
004dc19e          BaseProperty::CheckCopyOnWrite(&var_1d0);
004dc1ab          *(uint32_t*)(*(uint32_t*)var_1cc + 0x74)(1);
004dc198      }
004dc198      
004dc1c5      var_1c8 = BaseProperty::GetPropertyName(&var_1d0);
004dc1c9      HashTable<unsigned long,BaseProperty,1>::add(&var_19c, &var_1c8, &var_1d0);
004dc1d5      void var_98;
004dc1d5      StringInfo::StringInfo(&var_98);
004dc1ec      StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000004);
004dc1fa      BaseProperty::SetPropertyName(&var_1d0, 0xc5);
004dc1fa      
004dc203      if (var_1cc != 0)
004dc203      {
004dc209          BaseProperty::CheckCopyOnWrite(&var_1d0);
004dc21c          *(uint32_t*)(*(uint32_t*)var_1cc + 0xc4)(&var_98);
004dc203      }
004dc203      
004dc239      var_1c8 = BaseProperty::GetPropertyName(&var_1d0);
004dc23d      HashTable<unsigned long,BaseProperty,1>::add(&var_19c, &var_1c8, &var_1d0);
004dc24b      BaseProperty::SetPropertyName(&var_1d0, 0xa6);
004dc257      class PStringBase<char> __return;
004dc257      gmKeyboardUI::GetKeymapDirectory(this_1, &__return);
004dc25c      char const* const eax_8 = "\*.keymap";
004dc269      char const i;
004dc269      
004dc269      do
004dc269      {
004dc264          i = *(uint8_t*)eax_8;
004dc266          eax_8 = &eax_8[1];
004dc269      } while (i != 0);
004dc277      PStringBase<char>::append_n_chars(&__return, "\*.keymap", (eax_8 - "*.keymap"));
004dc284      List<PStringBase<char> >::flush(&this_1->m_listCachedKeymapFilenames);
004dc291      PSUtils::find_files(&__return, &this_1->m_listCachedKeymapFilenames, nullptr, 0);
004dc296      class ListNode<PStringBase<char> >* i_1 = this_1->m_listCachedKeymapFilenames._head;
004dc29f      var_1c8 = 0;
004dc29f      
004dc2a5      while (i_1 != 0)
004dc2a5      {
004dc2ac          PSUtils::strip_directory(i_1);
004dc2b1          class PSRefBufferCharData<char>* m_charbuffer_1 = i_1->data.m_charbuffer;
004dc2c1          class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
004dc2c5          InterlockedIncrement(&m_charbuffer_1[-1]);
004dc2df          uint32_t PStringBase<unsigned short>::s_NullBuffer_2;
004dc2df          
004dc2df          if (_stricmp(m_charbuffer_1, *(int32_t*)((char*)Client::m_instance + 0x144)) == 0)
004dc2df          {
004dc2ee              int32_t* var_1c0 = nullptr;
004dc2f2              int32_t* var_1bc_1 = nullptr;
004dc2f6              BaseProperty::SetPropertyName(&var_1c0, 0xab);
004dc2f6              
004dc2ff              if (var_1bc_1 != 0)
004dc2ff              {
004dc305                  BaseProperty::CheckCopyOnWrite(&var_1c0);
004dc315                  *(uint32_t*)(*(uint32_t*)var_1bc_1 + 0x7c)(var_1c8);
004dc2ff              }
004dc2ff              
004dc32f              PStringBase<unsigned short>::s_NullBuffer_2 = BaseProperty::GetPropertyName(&var_1c0);
004dc333              HashTable<unsigned long,BaseProperty,1>::add(&var_19c, &PStringBase<unsigned short>::s_NullBuffer_2, &var_1c0);
004dc338              int32_t* eax_15 = var_1c0;
004dc338              
004dc33e              if (eax_15 != 0)
004dc33e              {
004dc348                  int32_t edx_5 = (eax_15[1] - 1);
004dc345                  eax_15[1] = edx_5;
004dc345                  
004dc34d                  if (edx_5 == 0)
004dc353                      **(uint32_t**)eax_15(1);
004dc353                  
004dc355                  var_1c0 = nullptr;
004dc33e              }
004dc33e              
004dc35f              if (var_1bc_1 != 0)
004dc35f              {
004dc369                  int32_t edx_7 = (var_1bc_1[1] - 1);
004dc366                  var_1bc_1[1] = edx_7;
004dc366                  
004dc36e                  if (edx_7 == 0)
004dc374                      **(uint32_t**)var_1bc_1(1);
004dc374                  
004dc376                  int32_t var_1bc_2 = 0;
004dc35f              }
004dc2df          }
004dc2df          
004dc383          int32_t* var_1b8 = nullptr;
004dc387          int32_t* var_1b4_1 = nullptr;
004dc38b          BaseProperty::SetPropertyName(&var_1b8, 0xa7);
004dc397          void var_128;
004dc397          StringInfo::StringInfo(&var_128);
004dc39c          uint32_t PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004dc3a1          PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004dc3a9          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
004dc3ba          class PStringBase<unsigned short> __return_1;
004dc3ba          class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<char>::to_wpstring(&m_charbuffer_2, &__return_1, 0)->m_charbuffer;
004dc3bc          int32_t ecx_37 = m_charbuffer->m_data[0x7ffffffffffffffe];
004dc3bc          
004dc3c2          if (ecx_37 != 1)
004dc3cb              PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_2, m_charbuffer, (ecx_37 - 1));
004dc3cb          
004dc3d4          int32_t* esi_2 = (__return_1 - 0x14);
004dc3d4          
004dc3e7          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004dc3ef              **(uint32_t**)esi_2(1);
004dc3ef          
004dc3ff          StringInfo::SetLiteralValue(&var_128, &PStringBase<unsigned short>::s_NullBuffer_2, 1);
004dc408          int32_t* esi_4 = (PStringBase<unsigned short>::s_NullBuffer_2 - 0x14);
004dc408          
004dc41b          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004dc423              **(uint32_t**)esi_4(1);
004dc423          
004dc429          if (var_1b4_1 != 0)
004dc429          {
004dc42f              BaseProperty::CheckCopyOnWrite(&var_1b8);
004dc442              *(uint32_t*)(*(uint32_t*)var_1b4_1 + 0xc4)(&var_128);
004dc429          }
004dc429          
004dc44c          if (var_1cc != 0)
004dc44c          {
004dc452              BaseProperty::CheckCopyOnWrite(&var_1d0);
004dc462              *(uint32_t*)(*(uint32_t*)var_1cc + 0xfc)(&var_1b8);
004dc44c          }
004dc44c          
004dc474          var_1c8 += 1;
004dc478          StringInfo::~StringInfo(&var_128);
004dc47d          int32_t* eax_26 = var_1b8;
004dc47d          
004dc483          if (eax_26 != 0)
004dc483          {
004dc48d              int32_t esi_6 = (eax_26[1] - 1);
004dc48a              eax_26[1] = esi_6;
004dc48a              
004dc494              if (esi_6 == 0)
004dc49a                  **(uint32_t**)eax_26(1);
004dc49a              
004dc49c              var_1b8 = nullptr;
004dc483          }
004dc483          
004dc4a6          if (var_1b4_1 != 0)
004dc4a6          {
004dc4b0              int32_t esi_8 = (var_1b4_1[1] - 1);
004dc4ad              var_1b4_1[1] = esi_8;
004dc4ad              
004dc4b7              if (esi_8 == 0)
004dc4bd                  **(uint32_t**)var_1b4_1(1);
004dc4bd              
004dc4bf              int32_t var_1b4_2 = 0;
004dc4a6          }
004dc4a6          
004dc4d6          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
004dc4de              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
004dc4de          
004dc4e0          i_1 = i_1->next;
004dc4e3          this_1 = this_2;
004dc2a5      }
004dc2a5      
004dc4f5      this_2 = BaseProperty::GetPropertyName(&var_1d0);
004dc507      HashTable<unsigned long,BaseProperty,1>::add(&var_19c, &this_2, &var_1d0);
004dc511      uint32_t eax_34 = DialogFactory::MakeDialogInCurrentUI(&var_1a0);
004dc516      class PStringBase<char> __return_2 = __return;
004dc51a      this_1->m_uiLoadKeymapDialogContext = eax_34;
004dc51a      
004dc536      if ((InterlockedDecrement((__return_2 - 0x10)) == 0 && __return_2 != 0x14))
004dc53e          **(uint32_t**)(__return_2 - 0x14)(1);
004dc53e      
004dc547      StringInfo::~StringInfo(&var_98);
004dc54c      int32_t* eax_37 = var_1d0;
004dc54c      
004dc552      if (eax_37 != 0)
004dc552      {
004dc55c          int32_t esi_12 = (eax_37[1] - 1);
004dc559          eax_37[1] = esi_12;
004dc559          
004dc563          if (esi_12 == 0)
004dc569              **(uint32_t**)eax_37(1);
004dc569          
004dc56b          var_1d0 = nullptr;
004dc552      }
004dc552      
004dc575      if (var_1cc != 0)
004dc575      {
004dc57f          int32_t esi_14 = (var_1cc[1] - 1);
004dc57c          var_1cc[1] = esi_14;
004dc57c          
004dc586          if (esi_14 == 0)
004dc58c              **(uint32_t**)var_1cc(1);
004dc58c          
004dc58e          int32_t var_1cc_1 = 0;
004dc575      }
004dc575      
004dc596      PropertyCollection::~PropertyCollection(&var_1a0);
004dc59c      int32_t eax_42;
004dc59c      eax_42 = 1;
004dc5a3      *(uint32_t*)var_1d8;
004dc5a4      return 1;
004dc0b0  }

004dc5a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004dc5b0  uint8_t __fastcall gmKeyboardUI::MakeSaveKeymapDialog(class gmKeyboardUI* this)

004dc5b0  {
004dc5ca      if (this->m_uiSaveKeymapDialogContext != 0)
004dc5ca      {
004dc5cc          uint32_t eax;
004dc5cc          eax = 0;
004dc5d3          return 0;
004dc5ca      }
004dc5ca      
004dc5d8      void var_110;
004dc5d8      PropertyCollection::PropertyCollection(&var_110);
004dc5e6      int32_t* var_11c = nullptr;
004dc5ea      int32_t* var_118 = nullptr;
004dc5ee      BaseProperty::SetPropertyName(&var_11c, 0x8e);
004dc5ee      
004dc5f7      if (var_118 != 0)
004dc5f7      {
004dc5fd          BaseProperty::CheckCopyOnWrite(&var_11c);
004dc60a          *(uint32_t*)(*(uint32_t*)var_118 + 0xac)(5);
004dc5f7      }
004dc5f7      
004dc627      uint32_t var_114 = BaseProperty::GetPropertyName(&var_11c);
004dc62b      void var_10c;
004dc62b      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dc639      BaseProperty::SetPropertyName(&var_11c, 0xc3);
004dc639      
004dc642      if (var_118 != 0)
004dc642      {
004dc648          BaseProperty::CheckCopyOnWrite(&var_11c);
004dc658          *(uint32_t*)(*(uint32_t*)var_118 + 0xac)(0x10000001);
004dc642      }
004dc642      
004dc675      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dc679      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dc687      BaseProperty::SetPropertyName(&var_11c, 0xac);
004dc687      
004dc690      if (var_118 != 0)
004dc690      {
004dc696          BaseProperty::CheckCopyOnWrite(&var_11c);
004dc6a3          *(uint32_t*)(*(uint32_t*)var_118 + 0x74)(1);
004dc690      }
004dc690      
004dc6bd      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dc6c1      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dc6cd      void var_98;
004dc6cd      StringInfo::StringInfo(&var_98);
004dc6e4      StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000004);
004dc6f2      BaseProperty::SetPropertyName(&var_11c, 0xc5);
004dc6f2      
004dc6fb      if (var_118 != 0)
004dc6fb      {
004dc701          BaseProperty::CheckCopyOnWrite(&var_11c);
004dc714          *(uint32_t*)(*(uint32_t*)var_118 + 0xc4)(&var_98);
004dc6fb      }
004dc6fb      
004dc731      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dc735      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dc74e      this->m_uiSaveKeymapDialogContext = DialogFactory::MakeDialogInCurrentUI(&var_110);
004dc754      StringInfo::~StringInfo(&var_98);
004dc759      int32_t* eax_9 = var_11c;
004dc759      
004dc75f      if (eax_9 != 0)
004dc75f      {
004dc769          int32_t esi_2 = (eax_9[1] - 1);
004dc766          eax_9[1] = esi_2;
004dc766          
004dc770          if (esi_2 == 0)
004dc776              **(uint32_t**)eax_9(1);
004dc776          
004dc778          var_11c = nullptr;
004dc75f      }
004dc75f      
004dc782      if (var_118 != 0)
004dc782      {
004dc78c          int32_t esi_4 = (var_118[1] - 1);
004dc789          var_118[1] = esi_4;
004dc789          
004dc793          if (esi_4 == 0)
004dc799              **(uint32_t**)var_118(1);
004dc799          
004dc79b          int32_t var_118_1 = 0;
004dc782      }
004dc782      
004dc7a3      PropertyCollection::~PropertyCollection(&var_110);
004dc7a9      int32_t eax_14;
004dc7a9      eax_14 = 1;
004dc7af      return 1;
004dc5b0  }


004dc7b0  uint8_t __thiscall gmKeyboardUI::MakeCantOverwriteReadOnlyKeymapDialog(class gmKeyboardUI* this, class PStringBase<char> arg2)

004dc7b0  {
004dc7bc      int32_t ebx;
004dc7bc      int32_t var_120 = ebx;
004dc7bd      int32_t esi;
004dc7bd      int32_t var_124 = esi;
004dc7ca      int32_t edi;
004dc7ca      int32_t var_128 = edi;
004dc7ca      
004dc7cb      if (this->m_uiCantOverwriteReadOnlyKeymapDialogContext != 0)
004dc7cb      {
004dc7e3          if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
004dc7eb              **(uint32_t**)(arg2 - 0x14)(1);
004dc7eb          
004dc7ed          int32_t eax_2;
004dc7ed          eax_2 = 0;
004dc7f5          return 0;
004dc7cb      }
004dc7cb      
004dc7fc      void var_110;
004dc7fc      PropertyCollection::PropertyCollection(&var_110);
004dc80a      int32_t* var_11c = nullptr;
004dc80e      int32_t* var_118 = nullptr;
004dc812      BaseProperty::SetPropertyName(&var_11c, 0x8e);
004dc812      
004dc81b      if (var_118 != 0)
004dc81b      {
004dc821          BaseProperty::CheckCopyOnWrite(&var_11c);
004dc82e          *(uint32_t*)(*(uint32_t*)var_118 + 0xac)(3);
004dc81b      }
004dc81b      
004dc84b      uint32_t var_114 = BaseProperty::GetPropertyName(&var_11c);
004dc84f      void var_10c;
004dc84f      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dc85d      BaseProperty::SetPropertyName(&var_11c, 0xc3);
004dc85d      
004dc866      if (var_118 != 0)
004dc866      {
004dc86c          BaseProperty::CheckCopyOnWrite(&var_11c);
004dc87c          *(uint32_t*)(*(uint32_t*)var_118 + 0xac)(0x10000001);
004dc866      }
004dc866      
004dc899      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dc89d      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dc8ab      BaseProperty::SetPropertyName(&var_11c, 0xac);
004dc8ab      
004dc8b4      if (var_118 != 0)
004dc8b4      {
004dc8ba          BaseProperty::CheckCopyOnWrite(&var_11c);
004dc8c7          *(uint32_t*)(*(uint32_t*)var_118 + 0x74)(1);
004dc8b4      }
004dc8b4      
004dc8e1      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dc8e5      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dc8f1      void var_98;
004dc8f1      StringInfo::StringInfo(&var_98);
004dc910      int32_t var_12c_4 = StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000004);
004dc919      InterlockedIncrement((arg2 - 0x10));
004dc92d      StringInfo::AddVariable_String(&var_98, 0, arg2);
004dc93b      BaseProperty::SetPropertyName(&var_11c, 0xc5);
004dc93b      
004dc944      if (var_118 != 0)
004dc944      {
004dc94a          BaseProperty::CheckCopyOnWrite(&var_11c);
004dc95d          *(uint32_t*)(*(uint32_t*)var_118 + 0xc4)(&var_98);
004dc944      }
004dc944      
004dc96c      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dc97e      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dc997      this->m_uiCantOverwriteReadOnlyKeymapDialogContext = DialogFactory::MakeDialogInCurrentUI(&var_110);
004dc99d      StringInfo::~StringInfo(&var_98);
004dc9a2      int32_t* eax_12 = var_11c;
004dc9a2      
004dc9a8      if (eax_12 != 0)
004dc9a8      {
004dc9b2          int32_t esi_6 = (eax_12[1] - 1);
004dc9af          eax_12[1] = esi_6;
004dc9af          
004dc9b9          if (esi_6 == 0)
004dc9bf              **(uint32_t**)eax_12(1);
004dc9bf          
004dc9c1          var_11c = nullptr;
004dc9a8      }
004dc9a8      
004dc9cb      if (var_118 != 0)
004dc9cb      {
004dc9d5          int32_t esi_8 = (var_118[1] - 1);
004dc9d2          var_118[1] = esi_8;
004dc9d2          
004dc9dc          if (esi_8 == 0)
004dc9e2              **(uint32_t**)var_118(1);
004dc9e2          
004dc9e4          int32_t var_118_1 = 0;
004dc9cb      }
004dc9cb      
004dc9ec      PropertyCollection::~PropertyCollection(&var_110);
004dc9ec      
004dca04      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
004dca0c          **(uint32_t**)(arg2 - 0x14)(1);
004dca0c      
004dca10      int32_t eax_18;
004dca10      eax_18 = 1;
004dca16      return 1;
004dc7b0  }

004dca19                                                                             90 90 90 90 90 90 90                           .......

004dca20  uint8_t __thiscall gmKeyboardUI::MakeOverwriteKeymapDialog(class gmKeyboardUI* this, class PStringBase<char> arg2)

004dca20  {
004dca2c      int32_t esi;
004dca2c      int32_t var_124 = esi;
004dca35      int32_t edi;
004dca35      int32_t var_128 = edi;
004dca35      
004dca3a      if (this->m_uiOverwriteKeymapDialogContext != 0)
004dca3a      {
004dca3f          int32_t* esi_3 = (arg2 - 0x14);
004dca3f          
004dca52          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004dca5a              **(uint32_t**)esi_3(1);
004dca5a          
004dca5c          int32_t eax_2;
004dca5c          eax_2 = 0;
004dca63          return 0;
004dca3a      }
004dca3a      
004dca6a      void var_110;
004dca6a      PropertyCollection::PropertyCollection(&var_110);
004dca78      int32_t* var_11c = nullptr;
004dca7c      int32_t* var_118 = nullptr;
004dca80      BaseProperty::SetPropertyName(&var_11c, 0x8e);
004dca80      
004dca89      if (var_118 != 0)
004dca89      {
004dca8f          BaseProperty::CheckCopyOnWrite(&var_11c);
004dca9c          *(uint32_t*)(*(uint32_t*)var_118 + 0xac)(1);
004dca89      }
004dca89      
004dcab9      uint32_t var_114 = BaseProperty::GetPropertyName(&var_11c);
004dcabd      void var_10c;
004dcabd      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dcacb      BaseProperty::SetPropertyName(&var_11c, 0xc3);
004dcacb      
004dcad4      if (var_118 != 0)
004dcad4      {
004dcada          BaseProperty::CheckCopyOnWrite(&var_11c);
004dcaea          *(uint32_t*)(*(uint32_t*)var_118 + 0xac)(0x10000001);
004dcad4      }
004dcad4      
004dcb07      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dcb0b      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dcb19      BaseProperty::SetPropertyName(&var_11c, 0xac);
004dcb19      
004dcb22      if (var_118 != 0)
004dcb22      {
004dcb28          BaseProperty::CheckCopyOnWrite(&var_11c);
004dcb35          *(uint32_t*)(*(uint32_t*)var_118 + 0x74)(1);
004dcb22      }
004dcb22      
004dcb4f      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dcb53      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dcb61      BaseProperty::SetPropertyName(&var_11c, 0x10000020);
004dcb61      
004dcb6a      if (var_118 != 0)
004dcb6a      {
004dcb70          BaseProperty::CheckCopyOnWrite(&var_11c);
004dcb7f          *(uint32_t*)(*(uint32_t*)var_118 + 0xa4)(&arg2);
004dcb6a      }
004dcb6a      
004dcb8e      var_114 = BaseProperty::GetPropertyName(&var_11c);
004dcba0      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004dcbac      void var_98;
004dcbac      StringInfo::StringInfo(&var_98);
004dcbc9      int32_t var_12c_6 = StringInfo::SetStringIDandTableEnum(&var_98, 0, 0x10000004);
004dcbd8      InterlockedIncrement((arg2 - 0x10), arg2);
004dcbeb      void var_9c;
004dcbeb      StringInfo::AddVariable_String(&var_9c, 0);
004dcbf9      int32_t* var_120;
004dcbf9      BaseProperty::SetPropertyName(&var_120, 0xc5);
004dcbf9      
004dcc02      if (var_11c != 0)
004dcc02      {
004dcc08          BaseProperty::CheckCopyOnWrite(&var_120);
004dcc1b          *(uint32_t*)(*(uint32_t*)var_11c + 0xc4)(&var_9c);
004dcc02      }
004dcc02      
004dcc38      var_118 = BaseProperty::GetPropertyName(&var_120);
004dcc3c      HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_118, &var_120);
004dcc55      this->m_uiOverwriteKeymapDialogContext = DialogFactory::MakeDialogInCurrentUI(&var_114);
004dcc5b      StringInfo::~StringInfo(&var_9c);
004dcc60      int32_t* eax_13 = var_120;
004dcc60      
004dcc66      if (eax_13 != 0)
004dcc66      {
004dcc70          int32_t esi_6 = (eax_13[1] - 1);
004dcc6d          eax_13[1] = esi_6;
004dcc6d          
004dcc77          if (esi_6 == 0)
004dcc7d              **(uint32_t**)eax_13(1);
004dcc7d          
004dcc7f          var_120 = nullptr;
004dcc66      }
004dcc66      
004dcc83      int32_t* eax_15 = var_11c;
004dcc83      
004dcc89      if (eax_15 != 0)
004dcc89      {
004dcc93          int32_t esi_8 = (eax_15[1] - 1);
004dcc90          eax_15[1] = esi_8;
004dcc90          
004dcc9a          if (esi_8 == 0)
004dcca0              **(uint32_t**)eax_15(1);
004dcca0          
004dcca2          var_11c = nullptr;
004dcc89      }
004dcc89      
004dccaa      PropertyCollection::~PropertyCollection(&var_114);
004dccb2      int32_t* esi_10 = (arg2 - 0x14);
004dccb2      
004dccc5      if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
004dcccd          **(uint32_t**)esi_10(1);
004dcccd      
004dccd0      int32_t eax_18;
004dccd0      eax_18 = 1;
004dccd6      return 1;
004dca20  }

004dccd9                                                                             90 90 90 90 90 90 90                           .......

004dcce0  class HashList<ControlSpecification,unsigned long,1>* __thiscall HashList<unsigned long,ActionMapValue,1>::operator=(class HashList<ControlSpecification,unsigned long,1>* arg1, void* arg2)

004dcce0  {
004dcce7      HashList<ControlSpecification,unsigned long,1>::flush(arg1);
004dccf3      uint32_t* i = nullptr;
004dccf3      
004dccf7      if (*(uint32_t*)((char*)arg2 + 0x6c) > 0)
004dccf7      {
004dccf9          void* ecx_1 = *(uint32_t*)((char*)arg2 + 0x70);
004dccf9          
004dccfe          if (ecx_1 == 0)
004dcd05              i = nullptr;
004dccfe          else
004dcd00              i = ((char*)ecx_1 - 8);
004dccf7      }
004dccf7      
004dcd09      void* var_4 = arg2;
004dcd0d      void* esi;
004dcd0d      
004dcd0d      for (; i != 0; i = ((char*)esi - 8))
004dcd0d      {
004dcd17          HashList<unsigned long,ActionMapValue,1>::push_tail(arg1, i, &i[4]);
004dcd1c          esi = i[2];
004dcd1c          
004dcd21          if (esi == 0)
004dcd21              break;
004dcd0d      }
004dcd0d      
004dcd31      return arg1;
004dcce0  }

004dcd34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004dcd40  void __fastcall IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::delete_contents(class IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>* this)

004dcd40  {
004dcd88      class DLListData* head_;
004dcd88      
004dcd88      do
004dcd88      {
004dcd44          head_ = this->m_list.head_;
004dcd44          
004dcd49          if (head_ == 0)
004dcd49              break;
004dcd49          
004dcd4b          class DLListData* dllist_prev = head_->dllist_prev;
004dcd4b          
004dcd50          if (dllist_prev == 0)
004dcd50          {
004dcd58              class DLListData* dllist_next = head_->dllist_next;
004dcd5c              this->m_list.head_ = dllist_next;
004dcd5c              
004dcd5f              if (dllist_next != 0)
004dcd61                  dllist_next->dllist_prev = nullptr;
004dcd50          }
004dcd50          else
004dcd54              dllist_prev->dllist_next = head_->dllist_next;
004dcd54          
004dcd64          class DLListData* dllist_next_1 = head_->dllist_next;
004dcd64          
004dcd68          if (dllist_next_1 == 0)
004dcd68          {
004dcd75              class DLListData* dllist_prev_1 = this->m_list.tail_->dllist_prev;
004dcd7a              this->m_list.tail_ = dllist_prev_1;
004dcd7a              
004dcd7d              if (dllist_prev_1 != 0)
004dcd7f                  dllist_prev_1->dllist_next = 0;
004dcd68          }
004dcd68          else
004dcd6d              dllist_next_1->dllist_prev = head_->dllist_prev;
004dcd6d          
004dcd83          head_->dllist_next = 0;
004dcd85          head_->dllist_prev = nullptr;
004dcd88      } while (head_ != 0);
004dcd8c      /* tailcall */
004dcd8c      return IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::delete_contents(this);
004dcd40  }

004dcd91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004dcda0  void __fastcall HashList<unsigned long,List<unsigned long>,1>::flush(class HashList<unsigned long,List<unsigned long>,1>* this)

004dcda0  {
004dcda9      while (true)
004dcda9      {
004dcda9          void* __offset(DLListData, -0x8) esi_1 = nullptr;
004dcda9          
004dcdad          if (this->m_ihlIntrusive.m_hash.m_numElements <= 0)
004dcdad              break;
004dcdad          
004dcdb3          class DLListData* head_ = this->m_ihlIntrusive.m_list.head_;
004dcdb3          
004dcdb8          if (head_ != 0)
004dcdb8          {
004dcdba              class DLListData* dllist_prev = head_->dllist_prev;
004dcdba              
004dcdbf              if (dllist_prev == 0)
004dcdbf              {
004dcdc7                  class DLListData* dllist_next = head_->dllist_next;
004dcdcb                  this->m_ihlIntrusive.m_list.head_ = dllist_next;
004dcdcb                  
004dcdce                  if (dllist_next != 0)
004dcdd0                      dllist_next->dllist_prev = nullptr;
004dcdbf              }
004dcdbf              else
004dcdc3                  dllist_prev->dllist_next = head_->dllist_next;
004dcdc3              
004dcdd3              class DLListData* dllist_next_1 = head_->dllist_next;
004dcdd3              
004dcdd7              if (dllist_next_1 == 0)
004dcdd7              {
004dcde4                  class DLListData* dllist_prev_1 = this->m_ihlIntrusive.m_list.tail_->dllist_prev;
004dcde9                  this->m_ihlIntrusive.m_list.tail_ = dllist_prev_1;
004dcde9                  
004dcdec                  if (dllist_prev_1 != 0)
004dcdee                      dllist_prev_1->dllist_next = 0;
004dcdd7              }
004dcdd7              else
004dcddc                  dllist_next_1->dllist_prev = head_->dllist_prev;
004dcddc              
004dcdf2              head_->dllist_next = 0;
004dcdf4              head_->dllist_prev = nullptr;
004dcdf4              
004dcdf7              if (head_ != 0)
004dcdf9                  esi_1 = &head_[-1];
004dcdb8          }
004dcdb8          
004dcdfc          int32_t edi_1 = *(int32_t*)((char*)ADJ(esi_1) + -8);
004dce02          uint32_t temp1_1 = (COMBINE(0, edi_1) % this->m_ihlIntrusive.m_hash.m_numBuckets);
004dce05          struct HashList<unsigned long,List<unsigned long>,1>::HashListData** m_buckets = this->m_ihlIntrusive.m_hash.m_buckets;
004dce08          int32_t* i_1 = m_buckets[temp1_1];
004dce08          
004dce12          for (int32_t* i = i_1; i != 0; i = i[1])
004dce12          {
004dce16              if (*(uint32_t*)i == edi_1)
004dce16              {
004dce23                  if (i != 0)
004dce23                  {
004dce27                      if (i_1 == i)
004dce0b                          m_buckets[temp1_1] = i_1[1];
004dce27                      else
004dce27                      {
004dce37                          int32_t* i_2;
004dce37                          
004dce37                          do
004dce37                          {
004dce30                              i_2 = i_1;
004dce32                              i_1 = i_1[1];
004dce37                          } while (i_1 != i);
004dce37                          
004dce3b                          if (i_2 != 0)
004dce47                              i_2[1] = i_1[1];
004dce3b                          else
004dce0b                              m_buckets[temp1_1] = i_1[1];
004dce27                      }
004dce27                      
004dce4a                      this->m_ihlIntrusive.m_hash.m_numElements -= 1;
004dce23                  }
004dce23                  
004dce23                  break;
004dce16              }
004dce12          }
004dce12          
004dce4d          *(int32_t*)((char*)ADJ(esi_1) + 8) = 0x7a2be4;
004dce4d          
004dce54          while (true)
004dce54          {
004dce54              void* ecx_2 = *(int32_t*)((char*)ADJ(esi_1) + 0xc);
004dce54              
004dce5b              if (ecx_2 == 0)
004dce5b                  break;
004dce5b              
004dce5d              void* eax_4 = *(uint32_t*)((char*)ecx_2 + 4);
004dce62              *(int32_t*)((char*)ADJ(esi_1) + 0xc) = eax_4;
004dce62              
004dce65              if (eax_4 == 0)
004dce6c                  *(int32_t*)((char*)ADJ(esi_1) + 0x10) = 0;
004dce65              else
004dce67                  *(uint32_t*)((char*)eax_4 + 8) = 0;
004dce67              
004dce71              if (ecx_2 != 0)
004dce74                  operator delete(ecx_2);
004dce74              
004dce7c              *(int32_t*)((char*)ADJ(esi_1) + 0x14) -= 1;
004dce54          }
004dce54          
004dce82          operator delete(esi_1);
004dcda9      }
004dcda0  }

004dce94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004dcea0  uint8_t __thiscall HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::move_to_tail(class HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>* this, uint32_t const* arg2)

004dcea0  {
004dcea5      uint32_t const i = *(uint32_t*)arg2;
004dceb4      int32_t* eax_3 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
004dceb4      
004dceb8      if (eax_3 != 0)
004dceb8      {
004dcec2          while (*(uint32_t*)eax_3 != i)
004dcec2          {
004dcec4              eax_3 = eax_3[1];
004dcec4              
004dcec9              if (eax_3 == 0)
004dcec9              {
004dcecb                  eax_3 = 0;
004dcece                  return 0;
004dcec9              }
004dcec2          }
004dcec2          
004dced3          if (eax_3 != 0)
004dcee0              /* tailcall */
004dcee0              return IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::place_at_tail(this, eax_3);
004dceb8      }
004dceb8      
004dced5      eax_3 = 0;
004dced8      return 0;
004dcea0  }

004dcee5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004dcef0  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::push_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this, struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* arg2)

004dcef0  {
004dcef8      uint32_t m_hashKey = arg2->m_hashKey;
004dcef8      
004dcf0b      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
004dcf0b      {
004dcf12          if (*(uint32_t*)i == m_hashKey)
004dcf12          {
004dcf3c              if (i == 0)
004dcf3c                  break;
004dcf3c              
004dcf3f              i = 0;
004dcf42              return 0;
004dcf12          }
004dcf0b      }
004dcf0b      
004dcf1e      IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::add(this, arg2);
004dcf2e      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
004dcf34      int32_t eax_4;
004dcf34      eax_4 = 1;
004dcf37      return 1;
004dcef0  }

004dcf45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004dcf50  void* __thiscall gmKeyboardUI::`scalar deleting destructor'(class gmKeyboardUI* this, uint32_t arg2)

004dcf50  {
004dcf53      gmKeyboardUI::~gmKeyboardUI(this);
004dcf53      
004dcf5d      if ((arg2 & 1) != 0)
004dcf60          operator delete(this);
004dcf60      
004dcf6b      return this;
004dcf50  }

004dcf6e                                            90 90                                                                ..

004dcf70  void gmKeyboardUI::Register()

004dcf70  {
004dcf7a      UIElement::RegisterElementClass(0x1000000e, gmKeyboardUI::Create);
004dcf70  }

004dcf83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004dcf90  void __thiscall gmKeyboardUI::SaveKeymap(class gmKeyboardUI* this, class PStringBase<char> const* arg2, uint8_t arg3)

004dcf90  {
004dcf97      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004dcfa3      arg2 = m_charbuffer;
004dcfad      InterlockedIncrement(&m_charbuffer[-1]);
004dcfb8      void* var_8;
004dcfb8      PStringBase<char>::PStringBase<char>(&var_8, ".keymap");
004dcfd6      void* __return_1;
004dcfd6      uint8_t eax_3 = PStringBase<char>::operator!=(PSUtils::get_extension(&__return_1, &arg2), &var_8);
004dcfdf      int32_t* esi_1 = ((char*)__return_1 - 0x14);
004dcfe6      int32_t ebx;
004dcfe6      ebx = eax_3;
004dcfe6      
004dcff4      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004dcffc          **(uint32_t**)esi_1(1);
004dcffc      
004dd002      int32_t* esi_3 = ((char*)var_8 - 0x14);
004dd002      
004dd015      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004dd01d          **(uint32_t**)esi_3(1);
004dd01d      
004dd021      if (ebx != 0)
004dd021      {
004dd023          char const* const eax_7 = ".keymap";
004dd035          char const i;
004dd035          
004dd035          do
004dd035          {
004dd030              i = *(uint8_t*)eax_7;
004dd032              eax_7 = &eax_7[1];
004dd035          } while (i != 0);
004dd043          PStringBase<char>::append_n_chars(&arg2, ".keymap", (eax_7 - "keymap"));
004dd021      }
004dd021      
004dd04f      void* __return;
004dd04f      gmKeyboardUI::GetKeymapDirectory(this, &__return);
004dd05e      PSUtils::path_append(&__return, &arg2);
004dd05e      
004dd074      if (PSUtils::check_access(&__return, 0) == 0)
004dd074      {
004dd0c9      label_4dd0c9:
004dd0c9          class Client* Client::m_instance_1 = Client::m_instance;
004dd0c9          
004dd0da          if ((Client::m_instance_1 != 0 && ICIDM::s_cidm != 0))
004dd0da          {
004dd0e1              int32_t ecx_11 = gmClient::SetKeyMapFileName(Client::m_instance_1, &arg2);
004dd0e6              class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004dd0ec              int32_t var_20_12 = ecx_11;
004dd0ed              void* __return_2 = __return;
004dd0fd              InterlockedIncrement(((char*)__return - 0x10));
004dd0ff              ICIDM::s_cidm_1->vtable->SaveKeyMap(__return_2);
004dd108              gmKeyboardUI::UpdateKeymapFilenameLabel(this);
004dd10d              UserPreferences::Save();
004dd0da          }
004dd074      }
004dd074      else
004dd074      {
004dd07d          uint8_t eax_10;
004dd07d          int32_t ecx_7;
004dd07d          eax_10 = PSUtils::check_access(&__return, 2);
004dd07d          
004dd087          if (eax_10 != 0)
004dd087          {
004dd0ab              if (arg3 == 0)
004dd0ab                  goto label_4dd0c9;
004dd0ab              
004dd0ad              int32_t var_20_9 = ecx_7;
004dd0b4              class PStringBase<char> var_20_10 = arg2;
004dd0be              InterlockedIncrement(&arg2[-4]);
004dd0c2              gmKeyboardUI::MakeOverwriteKeymapDialog(this, var_20_10);
004dd087          }
004dd087          else
004dd087          {
004dd089              class PStringBase<char>* edx_3 = arg2;
004dd08d              int32_t var_20_7 = ecx_7;
004dd09a              InterlockedIncrement(&arg2[-4]);
004dd09e              gmKeyboardUI::MakeCantOverwriteReadOnlyKeymapDialog(this, edx_3);
004dd087          }
004dd074      }
004dd074      
004dd11c      int32_t* esi_5 = ((char*)__return - 0x14);
004dd11c      
004dd12b      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004dd133          **(uint32_t**)esi_5(1);
004dd133      
004dd139      void* __offset(PStringBase<char>, -0x14) esi_7 = &arg2[-5];
004dd139      
004dd148      if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
004dd150          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
004dcf90  }

004dd02d                                         8d 49 00                                                               .I.
004dd15c                                                                                      90 90 90 90                              ....

004dd160  void __thiscall gmKeyboardUI::HandleCloseSaveKeymapDialog(class gmKeyboardUI* this, class PStringBase<char> const* arg2)

004dd160  {
004dd16f      this->m_uiSaveKeymapDialogContext = 0;
004dd16f      
004dd180      if (PStringBase<char>::operator!=(arg2, &PStringBase<char>::null_string) != 0)
004dd187          gmKeyboardUI::SaveKeymap(this, arg2, 1);
004dd160  }

004dd191                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004dd1a0  void __thiscall gmKeyboardUI::HandleCloseOverwriteKeymapDialog(class gmKeyboardUI* this, uint8_t arg2, class PStringBase<char> const* arg3)

004dd1a0  {
004dd1a6      this->m_uiOverwriteKeymapDialogContext = 0;
004dd1a6      
004dd1b0      if (arg2 != 0)
004dd1b9          gmKeyboardUI::SaveKeymap(this, arg3, 0);
004dd1a0  }

004dd1c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004dd1d0  class HashList<unsigned long,List<unsigned long>,1>* __thiscall HashList<unsigned long,List<unsigned long>,1>::operator=(class HashList<unsigned long,List<unsigned long>,1>* arg1, void* arg2)

004dd1d0  {
004dd1d7      HashList<unsigned long,List<unsigned long>,1>::flush(arg1);
004dd1e3      uint32_t* i = nullptr;
004dd1e3      
004dd1e7      if (*(uint32_t*)((char*)arg2 + 0x6c) > 0)
004dd1e7      {
004dd1e9          void* ecx_1 = *(uint32_t*)((char*)arg2 + 0x70);
004dd1e9          
004dd1ee          if (ecx_1 == 0)
004dd1f5              i = nullptr;
004dd1ee          else
004dd1f0              i = ((char*)ecx_1 - 8);
004dd1e7      }
004dd1e7      
004dd1f9      void* var_4 = arg2;
004dd1fd      void* esi;
004dd1fd      
004dd1fd      for (; i != 0; i = ((char*)esi - 8))
004dd1fd      {
004dd207          HashList<unsigned long,List<unsigned long>,1>::push_tail(arg1, i, &i[4]);
004dd20c          esi = i[2];
004dd20c          
004dd211          if (esi == 0)
004dd211              break;
004dd1fd      }
004dd1fd      
004dd221      return arg1;
004dd1d0  }

004dd224              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004dd230  enum UIElementMessageListenResult __thiscall gmKeyboardUI::ListenToElementMessage(class gmKeyboardUI* this, struct UIElementMessageInfo const* arg2)

004dd230  {
004dd236      uint32_t idMessage = arg2->idMessage;
004dd236      
004dd23c      if (idMessage == 1)
004dd23c      {
004dd2f2          if (DialogFactory::IsDialogOpen(0x10000001) == 0)
004dd2f2          {
004dd2f4              class UIElement* pElement_1 = arg2->pElement;
004dd2f4              
004dd2fd              if (pElement_1 == this->m_pKeyboardLoadKeymapButton)
004dd2fd              {
004dd301                  gmKeyboardUI::MakeLoadKeymapDialog(this);
004dd310                  return UIElement::ListenToElementMessage(this, arg2);
004dd2fd              }
004dd2fd              
004dd319              if (pElement_1 == this->m_pKeyboardSaveKeymapButton)
004dd319              {
004dd31d                  gmKeyboardUI::MakeSaveKeymapDialog(this);
004dd32c                  return UIElement::ListenToElementMessage(this, arg2);
004dd319              }
004dd319              
004dd335              if (pElement_1 == this->m_pKeyboardResetToDefaultsButton)
004dd335              {
004dd337                  this->vtable->RestoreDefaultValues();
004dd34b                  return UIElement::ListenToElementMessage(this, arg2);
004dd335              }
004dd335              
004dd354              if (pElement_1 == this->m_pKeyboardRevertToSavedButton)
004dd356                  this->vtable->RestoreSavedValues();
004dd2f2          }
004dd23c      }
004dd23c      else if ((idMessage == 0x19 && (DialogFactory::IsDialogOpen(0x10000001) == 0 && arg2->dwParam1 == 7)))
004dd245      {
004dd26a          class UIElement* pElement = arg2->pElement;
004dd26d          class UIElement_Button* m_pKeyboardOKButton = this->m_pKeyboardOKButton;
004dd26d          
004dd275          if (pElement != m_pKeyboardOKButton)
004dd275          {
004dd2c2              class UIElement_Button* m_pKeyboardCancelButton = this->m_pKeyboardCancelButton;
004dd2c2              
004dd2df              if ((pElement == m_pKeyboardCancelButton && (m_pKeyboardCancelButton != 0 && m_pKeyboardCancelButton->m_state != 0xd)))
004dd356                  this->vtable->RestoreSavedValues();
004dd275          }
004dd275          else if ((m_pKeyboardOKButton != 0 && m_pKeyboardOKButton->m_state != 0xd))
004dd286          {
004dd295              if (OptionPage::Changed(this) != 0)
004dd2a6                  gmKeyboardUI::SaveKeymap(this, (Client::m_instance + 0x144), 0);
004dd2a6              
004dd2ab              this->vtable->SaveCurrentValues();
004dd286          }
004dd245      }
004dd245      
004dd36a      return UIElement::ListenToElementMessage(this, arg2);
004dd230  }

004dd36d                                         90 90 90                                                               ...

004dd370  void __thiscall gmKeyboardUI::RecvNotice_CloseDialog(class gmKeyboardUI* this, uint32_t arg2, class PropertyCollection const* arg3)

004dd370  {
004dd375      class PropertyCollection* esi = arg3;
004dd380      uint32_t temp1 = (COMBINE(0, 0x8e) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004dd383      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004dd388      int32_t var_18 = 0;
004dd38c      int32_t* var_8 = nullptr;
004dd390      int32_t* var_4 = nullptr;
004dd390      
004dd39e      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
004dd39e      {
004dd3a6          if (*(uint32_t*)i == 0x8e)
004dd3a6          {
004dd3b3              if (i != 0)
004dd3b3              {
004dd3bd                  BaseProperty::operator=(&var_8, &i[2]);
004dd3bd                  
004dd3c8                  if (var_4 != 0)
004dd3d1                      *(uint32_t*)(*(uint32_t*)var_4 + 0xa8)(&var_18);
004dd3b3              }
004dd3b3              
004dd3b3              break;
004dd3a6          }
004dd39e      }
004dd39e      
004dd3df      int32_t var_10;
004dd3df      
004dd3df      if ((var_18 - 1) <= 6)
004dd3e5          switch (var_18)
004dd3e5          {
004dd54c              case 1:
004dd54c              {
004dd54c                  uint32_t temp1_3 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004dd54f                  class HashTableData<unsigned long,BaseProperty>** m_buckets_3 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004dd552                  char var_14 = 0;
004dd556                  var_10 = 0;
004dd55a                  int32_t* var_c_3 = nullptr;
004dd55a                  
004dd565                  for (int32_t* i_1 = m_buckets_3[temp1_3]; i_1 != 0; i_1 = i_1[1])
004dd565                  {
004dd56d                      if (*(uint32_t*)i_1 == 0x92)
004dd56d                      {
004dd57a                          if (i_1 != 0)
004dd57a                          {
004dd584                              BaseProperty::operator=(&var_10, &i_1[2]);
004dd584                              
004dd58f                              if (var_c_3 != 0)
004dd598                                  *(uint32_t*)(*(uint32_t*)var_c_3 + 0x70)(&var_14);
004dd57a                          }
004dd57a                          
004dd57a                          break;
004dd56d                      }
004dd565                  }
004dd565                  
004dd59b                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004dd5a0                  arg3 = PStringBase<char>::s_NullBuffer_2;
004dd5a8                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004dd5a8                  
004dd5c2                  for (int32_t* i_2 = esi->m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0x10000020) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets)]; i_2 != 0; i_2 = i_2[1])
004dd5c2                  {
004dd5ca                      if (*(uint32_t*)i_2 == 0x10000020)
004dd5ca                      {
004dd5d7                          if (i_2 != 0)
004dd5d7                          {
004dd5e1                              BaseProperty::operator=(&var_10, &i_2[2]);
004dd5e1                              
004dd5ec                              if (var_c_3 != 0)
004dd5f5                                  *(uint32_t*)(*(uint32_t*)var_c_3 + 0xa0)(&arg3);
004dd5d7                          }
004dd5d7                          
004dd5d7                          break;
004dd5ca                      }
004dd5c2                  }
004dd5c2                  
004dd605                  if (this->m_alphaBlendMod == arg2)
004dd617                      gmKeyboardUI::HandleCloseOverwriteKeymapDialog(((char*)this - 0x600), ((int8_t)var_14), &arg3);
004dd617                  
004dd620                  void* __offset(PropertyCollection, -0x14) esi_4 = ((char*)arg3 - 0x14);
004dd620                  
004dd633                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004dd63b                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004dd63b                  
004dd641                  BaseProperty::~BaseProperty(&var_10);
004dd54c                  break;
004dd54c              }
004dd534              case 3:
004dd534              {
004dd534                  if (this->m_alphaImage == arg2)
004dd53a                      this->m_alphaImage = nullptr;
004dd534                  break;
004dd534              }
004dd46b              case 5:
004dd46b              {
004dd46b                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004dd470                  arg3 = PStringBase<char>::s_NullBuffer_1;
004dd478                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004dd485                  uint32_t temp1_2 = (COMBINE(0, 0x9c) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004dd488                  class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004dd48b                  var_10 = 0;
004dd48f                  int32_t* var_c_2 = nullptr;
004dd48f                  
004dd49a                  for (int32_t* i_3 = m_buckets_1[temp1_2]; i_3 != 0; i_3 = i_3[1])
004dd49a                  {
004dd4a6                      if (*(uint32_t*)i_3 == 0x9c)
004dd4a6                      {
004dd4b3                          if (i_3 != 0)
004dd4b3                          {
004dd4bd                              BaseProperty::operator=(&var_10, &i_3[2]);
004dd4bd                              
004dd4c8                              if (var_c_2 != 0)
004dd4d1                                  *(uint32_t*)(*(uint32_t*)var_c_2 + 0xa0)(&arg3);
004dd4b3                          }
004dd4b3                          
004dd4b3                          break;
004dd4a6                      }
004dd49a                  }
004dd49a                  
004dd4e1                  if (this->m_image == arg2)
004dd4ee                      gmKeyboardUI::HandleCloseSaveKeymapDialog(((char*)this - 0x600), &arg3);
004dd4ee                  
004dd4f7                  BaseProperty::~BaseProperty(&var_10);
004dd500                  void* __offset(PropertyCollection, -0x14) esi_2 = ((char*)arg3 - 0x14);
004dd500                  
004dd517                  if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004dd523                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004dd46b                  break;
004dd46b              }
004dd3f3              case 7:
004dd3f3              {
004dd3f3                  uint32_t temp1_1 = (COMBINE(0, 0xab) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004dd3f6                  class HashTableData<unsigned long,BaseProperty>** m_buckets_2 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004dd3f9                  arg3 = 0xffffffff;
004dd401                  var_10 = 0;
004dd405                  int32_t* var_c_1 = nullptr;
004dd405                  
004dd410                  for (int32_t* i_4 = m_buckets_2[temp1_1]; i_4 != 0; i_4 = i_4[1])
004dd410                  {
004dd418                      if (*(uint32_t*)i_4 == 0xab)
004dd418                      {
004dd425                          if (i_4 != 0)
004dd425                          {
004dd42f                              BaseProperty::operator=(&var_10, &i_4[2]);
004dd42f                              
004dd43a                              if (var_c_1 != 0)
004dd443                                  *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&arg3);
004dd425                          }
004dd425                          
004dd425                          break;
004dd418                      }
004dd410                  }
004dd410                  
004dd450                  if (this->m_zlevel == arg2)
004dd461                      gmKeyboardUI::HandleCloseLoadKeymapDialog(((char*)this - 0x600), arg3);
004dd461                  
004dd641                  BaseProperty::~BaseProperty(&var_10);
004dd3f3                  break;
004dd3f3              }
004dd3e5          }
004dd646      int32_t* eax_24 = var_8;
004dd646      
004dd64c      if (eax_24 != 0)
004dd64c      {
004dd656          int32_t esi_6 = (eax_24[1] - 1);
004dd653          eax_24[1] = esi_6;
004dd653          
004dd65d          if (esi_6 == 0)
004dd663              **(uint32_t**)eax_24(1);
004dd663          
004dd665          var_8 = nullptr;
004dd64c      }
004dd64c      
004dd66f      if (var_4 != 0)
004dd66f      {
004dd679          int32_t esi_8 = (var_4[1] - 1);
004dd676          var_4[1] = esi_8;
004dd676          
004dd680          if (esi_8 == 0)
004dd686              **(uint32_t**)var_4(1);
004dd66f      }
004dd370  }

004dd691                                                     8d 49 00                                                       .I.
004dd694  uint32_t jump_table_4dd694[0x7] = 
004dd694  {
004dd694      [0x0] =  0x004dd545
004dd698      [0x1] =  0x004dd646
004dd69c      [0x2] =  0x004dd52a
004dd6a0      [0x3] =  0x004dd646
004dd6a4      [0x4] =  0x004dd46b
004dd6a8      [0x5] =  0x004dd646
004dd6ac      [0x6] =  0x004dd3ec
004dd6b0  }

004dd6b0  void __fastcall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::delete_contents(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this)

004dd6b0  {
004dd6bb      while (this->m_numElements != 0)
004dd6bb      {
004dd6c9          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004dd6cf          struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_firstInterestingBucket_2;
004dd6cf          void* ebx_1;
004dd6cf          
004dd6cf          if (this->m_firstInterestingBucket == ecx_1)
004dd6cf          {
004dd6e2          label_4dd6e2:
004dd6e2              m_firstInterestingBucket_2 = nullptr;
004dd6e4              ebx_1 = nullptr;
004dd6cf          }
004dd6cf          else
004dd6cf          {
004dd6d1              while (true)
004dd6d1              {
004dd6d1                  struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
004dd6d1                  
004dd6d6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004dd6d6                  {
004dd6e8                      struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004dd6eb                      ebx_1 = *(uint32_t*)m_firstInterestingBucket_1;
004dd6ed                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004dd6ed                      break;
004dd6d6                  }
004dd6d6                  
004dd6dd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004dd6dd                  
004dd6e0                  if (&m_firstInterestingBucket[1] == ecx_1)
004dd6e0                      goto label_4dd6e2;
004dd6d1              }
004dd6cf          }
004dd6cf          
004dd6ef          struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
004dd6ef          
004dd6f3          if (m_hashNext == ebx_1)
004dd705              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
004dd6f3          else
004dd6f3          {
004dd6fc              struct HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData* m_hashNext_1;
004dd6fc              
004dd6fc              do
004dd6fc              {
004dd6f5                  m_hashNext_1 = m_hashNext;
004dd6f7                  m_hashNext = m_hashNext->m_hashNext;
004dd6fc              } while (m_hashNext != ebx_1);
004dd6fc              
004dd700              if (m_hashNext_1 != 0)
004dd70c                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
004dd700              else
004dd705                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
004dd6f3          }
004dd6f3          
004dd715          this->m_numElements -= 1;
004dd715          
004dd718          if (ebx_1 != 0)
004dd718          {
004dd71f              IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::delete_contents(((char*)ebx_1 + 0x10));
004dd724              void* eax_4 = *(uint32_t*)((char*)ebx_1 + 0x70);
004dd72c              *(uint32_t*)((char*)ebx_1 + 0x10) = 0x7be670;
004dd72c              
004dd732              if (eax_4 != ((char*)ebx_1 + 0x14))
004dd735                  operator delete[](eax_4);
004dd735              
004dd73e              *(uint32_t*)((char*)ebx_1 + 0x70) = 0;
004dd741              *(uint32_t*)((char*)ebx_1 + 0x74) = 0;
004dd744              *(uint32_t*)((char*)ebx_1 + 0x78) = 0;
004dd747              *(uint32_t*)((char*)ebx_1 + 0x7c) = 0;
004dd74a              operator delete(ebx_1);
004dd718          }
004dd6bb      }
004dd6b0  }


004dd760  uint8_t __thiscall HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::push_tail(class HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>* this, uint32_t const* arg2, class HashList<unsigned long,List<unsigned long>,1> const* arg3)

004dd760  {
004dd760      class HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>* this_1 = this;
004dd76a      uint32_t const ecx = *(uint32_t*)arg2;
004dd76a      
004dd782      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ecx) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
004dd782      {
004dd786          if (*(uint32_t*)i == ecx)
004dd786          {
004dd7d9              if (i != 0)
004dd7e7                  return HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::move_to_tail(this, arg2);
004dd7e7              
004dd7d9              break;
004dd786          }
004dd782      }
004dd782      
004dd79a      void* esi = operator new(0x88);
004dd79a      
004dd7a1      if (esi == 0)
004dd7ea          esi = nullptr;
004dd7a1      else
004dd7a1      {
004dd7aa          *(uint32_t*)esi = *(uint32_t*)arg2;
004dd7ac          *(uint32_t*)((char*)esi + 4) = 0;
004dd7af          *(uint32_t*)((char*)esi + 8) = 0;
004dd7b2          *(uint32_t*)((char*)esi + 0xc) = 0;
004dd7be          IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>(((char*)esi + 0x10), arg3->m_ihlIntrusive.m_hash.m_numBuckets);
004dd7c6          *(uint32_t*)((char*)esi + 0x80) = 0;
004dd7c9          *(uint32_t*)((char*)esi + 0x84) = 0;
004dd7cc          HashList<unsigned long,List<unsigned long>,1>::operator=(((char*)esi + 0x10), arg3);
004dd7a1      }
004dd7a1      
004dd7ef      uint8_t result = IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::push_tail(this, esi);
004dd7f6      arg2 = result;
004dd7f6      
004dd7fe      if ((result != 0 || esi == 0))
004dd841          return result;
004dd841      
004dd805      IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::delete_contents(((char*)esi + 0x10));
004dd80a      void* eax_4 = *(uint32_t*)((char*)esi + 0x70);
004dd812      *(uint32_t*)((char*)esi + 0x10) = 0x7be670;
004dd812      
004dd818      if (eax_4 != ((char*)esi + 0x14))
004dd81b          operator delete[](eax_4);
004dd81b      
004dd824      *(uint32_t*)((char*)esi + 0x70) = 0;
004dd827      *(uint32_t*)((char*)esi + 0x74) = 0;
004dd82a      *(uint32_t*)((char*)esi + 0x78) = 0;
004dd82d      *(uint32_t*)((char*)esi + 0x7c) = 0;
004dd830      operator delete(esi);
004dd835      return arg2;
004dd760  }

004dd844              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004dd850  void __fastcall IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::delete_contents(class IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>* this)

004dd850  {
004dd898      class DLListData* head_;
004dd898      
004dd898      do
004dd898      {
004dd854          head_ = this->m_list.head_;
004dd854          
004dd859          if (head_ == 0)
004dd859              break;
004dd859          
004dd85b          class DLListData* dllist_prev = head_->dllist_prev;
004dd85b          
004dd860          if (dllist_prev == 0)
004dd860          {
004dd868              class DLListData* dllist_next = head_->dllist_next;
004dd86c              this->m_list.head_ = dllist_next;
004dd86c              
004dd86f              if (dllist_next != 0)
004dd871                  dllist_next->dllist_prev = nullptr;
004dd860          }
004dd860          else
004dd864              dllist_prev->dllist_next = head_->dllist_next;
004dd864          
004dd874          class DLListData* dllist_next_1 = head_->dllist_next;
004dd874          
004dd878          if (dllist_next_1 == 0)
004dd878          {
004dd885              class DLListData* dllist_prev_1 = this->m_list.tail_->dllist_prev;
004dd88a              this->m_list.tail_ = dllist_prev_1;
004dd88a              
004dd88d              if (dllist_prev_1 != 0)
004dd88f                  dllist_prev_1->dllist_next = 0;
004dd878          }
004dd878          else
004dd87d              dllist_next_1->dllist_prev = head_->dllist_prev;
004dd87d          
004dd893          head_->dllist_next = 0;
004dd895          head_->dllist_prev = nullptr;
004dd898      } while (head_ != 0);
004dd89c      /* tailcall */
004dd89c      return IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::delete_contents(this);
004dd850  }

004dd8a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004dd8b0  void __fastcall gmKeyboardUI::InitOptions(class gmKeyboardUI* this)

004dd8b0  {
004dd8c0      gmKeyboardUI::UpdateKeymapFilenameLabel(this);
004dd8cb      SmartArray<unsigned long,1>::Reset(&this->m_UIOptionArray);
004dd8db      int32_t* __return_1;
004dd8db      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashMappingListBoxes.m_intrusiveTable, &__return_1);
004dd8e0      class HashTableData<unsigned long,DBOCache *>* i_5 = eax->m_currElement;
004dd8e3      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
004dd8e5      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
004dd8e5      
004dd8ec      if (i_5 != 0)
004dd8ec      {
004dd8f3          while (true)
004dd8f3          {
004dd8f3              UIElement_ListBox::Flush(i_5->m_data);
004dd8f8              i_5 = i_5->m_hashNext;
004dd8f8              
004dd8fd              if (i_5 == 0)
004dd8fd              {
004dd913                  class HashTableData<unsigned long,DBOCache *>* i;
004dd913                  
004dd913                  do
004dd913                  {
004dd908                      m_currBucket = &m_currBucket[1];
004dd908                      
004dd90d                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
004dd90d                          goto label_4dd91b;
004dd90d                      
004dd90f                      i = *(uint32_t*)m_currBucket;
004dd913                  } while (i == 0);
004dd913                  
004dd915                  i_5 = i;
004dd915                  
004dd919                  if (i_5 == 0)
004dd919                      break;
004dd8fd              }
004dd8f3          }
004dd8ec      }
004dd8ec      
004dd91b  label_4dd91b:
004dd91b      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004dd91b      
004dd923      if (ICIDM::s_cidm_1 != 0)
004dd923      {
004dd92b          class ActionMap* eax_3 = ICIDM::s_cidm_1->vtable->GetActionMap();
004dd92b          
004dd936          if (eax_3 != 0)
004dd936          {
004dd944              int32_t var_228;
004dd944              IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>(&var_228, 0);
004dd949              uint32_t ecx_5 = &eax_3->m_hashInputMaps;
004dd94c              void* var_1b8_1 = nullptr;
004dd953              int32_t var_1b4_1 = 0;
004dd95a              int32_t edx_2 = *(uint32_t*)(ecx_5 + 0x6c);
004dd95d              int32_t i_3 = 0;
004dd95d              
004dd961              if (edx_2 > 0)
004dd961              {
004dd963                  int32_t eax_4 = *(uint32_t*)(ecx_5 + 0x70);
004dd963                  
004dd968                  if (eax_4 == 0)
004dd96f                      i_3 = 0;
004dd968                  else
004dd96a                      i_3 = (eax_4 - 8);
004dd961              }
004dd961              
004dd973              int32_t i_1 = i_3;
004dd975              int32_t __return = i_1;
004dd979              uint32_t var_2b0_1 = ecx_5;
004dd97d              uint32_t PStringBase<unsigned short>::s_NullBuffer_3;
004dd97d              int32_t var_2f0;
004dd97d              class DBObj* k_11;
004dd97d              uint32_t k_12;
004dd97d              int32_t var_2a0;
004dd97d              void var_29c;
004dd97d              void* var_240;
004dd97d              int32_t var_234;
004dd97d              void* var_1c8;
004dd97d              int32_t __return_2;
004dd97d              
004dd97d              if (i_3 != 0)
004dd97d              {
004ddc3d                  do
004ddc3d                  {
004dd983                      uint32_t ecx_6 = *(uint32_t*)(i_1 + 0x78);
004dd986                      class DBObj* k_1 = *(uint32_t*)i_1;
004dd990                      k_11 = k_1;
004dd994                      IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>(&var_2a0, ecx_6);
004dd99e                      void* var_230_1 = nullptr;
004dd9a5                      int32_t var_22c_1 = 0;
004dd9ac                      uint32_t PStringBase<unsigned short>::s_NullBuffer_5 = HashList<unsigned long,ActionMapValue,1>::operator=(&var_2a0, (i_1 + 0x10));
004dd9b8                      int32_t* j_4 = nullptr;
004dd9b8                      
004dd9bc                      if (var_234 > 0)
004dd9bc                      {
004dd9c7                          if (var_230_1 == 0)
004dd9ce                              j_4 = nullptr;
004dd9c7                          else
004dd9c9                              j_4 = ((char*)var_230_1 - 8);
004dd9bc                      }
004dd9bc                      
004dd9d2                      int32_t* j = j_4;
004dd9d8                      int32_t* j_3 = j;
004dd9dc                      int32_t* var_2cc_1 = &var_2a0;
004dd9dc                      
004dd9e0                      if (j_4 != 0)
004dd9e0                      {
004ddbde                          do
004ddbde                          {
004dd9e6                              uint32_t PStringBase<unsigned short>::s_NullBuffer_6 = *(uint32_t*)j;
004dd9ec                              class DBObj* k_5 = k_1;
004dd9f0                              PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_6;
004dd9f4                              uint8_t eax_6;
004dd9f4                              eax_6 = ActionMap::IsUserBindable(eax_3, PStringBase<unsigned short>::s_NullBuffer_5, PStringBase<unsigned short>::s_NullBuffer_6);
004dd9f4                              
004dd9fb                              if (eax_6 != 0)
004dd9fb                              {
004dda01                                  class DBObj* k_6 = k_1;
004dda05                                  uint32_t k = ActionMap::GetActionClass(eax_3, PStringBase<unsigned short>::s_NullBuffer_5, PStringBase<unsigned short>::s_NullBuffer_6);
004dda1c                                  k_12 = k;
004dda20                                  int32_t var_1c0;
004dda20                                  int32_t* edx_5 = *(uint32_t*)((char*)var_1c8 + ((COMBINE(0, k) % var_1c0) << 2));
004dda20                                  
004dda25                                  if (edx_5 == 0)
004dda25                                  {
004dda44                                  label_4dda44:
004dda44                                      IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>(&__return_2, 0);
004dda5d                                      int32_t var_140_1 = 0;
004dda64                                      int32_t var_13c_1 = 0;
004dda6b                                      HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::push_tail(&var_228, &k_12, &__return_2);
004dda77                                      IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::delete_contents(&__return_2);
004dda8c                                      __return_2 = 0x7be670;
004dda97                                      void var_1ac;
004dda97                                      void* var_150;
004dda97                                      
004dda97                                      if (var_150 != &var_1ac)
004dda9a                                          operator delete[](var_150);
004dda9a                                      
004ddaa2                                      var_150 = nullptr;
004ddaa9                                      int32_t var_14c_1 = 0;
004ddab0                                      int32_t var_148_1 = 0;
004ddab7                                      int32_t var_144_1 = 0;
004dda25                                  }
004dda25                                  else
004dda25                                  {
004dda29                                      while (*(uint32_t*)edx_5 != k)
004dda29                                      {
004dda2b                                          edx_5 = edx_5[1];
004dda2b                                          
004dda30                                          if (edx_5 == 0)
004dda30                                              goto label_4dda44;
004dda29                                      }
004dda29                                      
004dda36                                      if (edx_5 == 0)
004dda36                                          goto label_4dda44;
004dda25                                  }
004dda25                                  
004ddad0                                  int32_t* edx_8 = *(uint32_t*)((char*)var_1c8 + ((COMBINE(0, k) % var_1c0) << 2));
004ddad0                                  
004ddad5                                  if (edx_8 != 0)
004ddad5                                  {
004ddad9                                      while (*(uint32_t*)edx_8 != k)
004ddad9                                      {
004ddadb                                          edx_8 = edx_8[1];
004ddadb                                          
004ddae0                                          if (edx_8 == 0)
004ddae0                                              break;
004ddad9                                      }
004ddad5                                  }
004ddad5                                  
004ddaef                                  int32_t* edx_11 = *(uint32_t*)(edx_8[0x1c] + ((COMBINE(0, k_1) % edx_8[0x1e]) << 2));
004ddaef                                  
004ddaf4                                  if (edx_11 != 0)
004ddaf4                                  {
004ddaf8                                      while (*(uint32_t*)edx_11 != k_1)
004ddaf8                                      {
004ddafa                                          edx_11 = edx_11[1];
004ddafa                                          
004ddaff                                          if (edx_11 == 0)
004ddaff                                              break;
004ddaf8                                      }
004ddaf4                                  }
004ddaf4                                  
004ddb03                                  int32_t* esi_4 = edx_11;
004ddb05                                  void* var_2a8_1 = &edx_8[4];
004ddb05                                  
004ddb09                                  if (edx_11 == 0)
004ddb09                                  {
004ddb13                                      int32_t* var_308_7 = &var_2f0;
004ddb1d                                      int32_t* var_30c_4 = &k_11;
004ddb20                                      var_2f0 = 0x7a2be4;
004ddb24                                      void* k_7 = nullptr;
004ddb28                                      int32_t var_2e8_1 = 0;
004ddb2c                                      int32_t var_2e4_1 = 0;
004ddb30                                      HashList<unsigned long,List<unsigned long>,1>::push_tail(&edx_8[4], var_30c_4, var_308_7);
004ddb35                                      void* k_2 = k_7;
004ddb39                                      var_2f0 = 0x7a2be4;
004ddb39                                      
004ddb42                                      while (k_2 != 0)
004ddb42                                      {
004ddb44                                          void* k_13 = k_2;
004ddb46                                          k_2 = *(uint32_t*)((char*)k_2 + 4);
004ddb4b                                          void* k_8 = k_2;
004ddb4b                                          
004ddb4f                                          if (k_2 == 0)
004ddb5a                                              int32_t var_2e8_2 = 0;
004ddb4f                                          else
004ddb4f                                          {
004ddb51                                              *(uint32_t*)((char*)k_2 + 8) = 0;
004ddb54                                              k_2 = k_8;
004ddb4f                                          }
004ddb4f                                          
004ddb60                                          if (k_13 != 0)
004ddb60                                          {
004ddb63                                              operator delete(k_13);
004ddb68                                              k_2 = k_8;
004ddb60                                          }
004ddb60                                          
004ddb6f                                          var_2e4_1 -= 1;
004ddb42                                      }
004ddb42                                      
004ddb7f                                      int32_t* edx_14 = *(uint32_t*)(edx_8[0x1c] + ((COMBINE(0, k_1) % edx_8[0x1e]) << 2));
004ddb7f                                      
004ddb84                                      if (edx_14 != 0)
004ddb84                                      {
004ddb88                                          while (*(uint32_t*)edx_14 != k_1)
004ddb88                                          {
004ddb8a                                              edx_14 = edx_14[1];
004ddb8a                                              
004ddb8f                                              if (edx_14 == 0)
004ddb8f                                                  break;
004ddb88                                          }
004ddb84                                      }
004ddb84                                      
004ddb91                                      esi_4 = edx_14;
004ddb93                                      void* var_2a8_2 = &edx_8[4];
004ddb09                                  }
004ddb09                                  
004ddb99                                  void* eax_15;
004ddb99                                  eax_15 = operator new(0xc);
004ddb99                                  
004ddba3                                  if (eax_15 != 0)
004ddba3                                  {
004ddba5                                      PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_3;
004ddba9                                      *(uint32_t*)eax_15 = PStringBase<unsigned short>::s_NullBuffer_5;
004ddbab                                      *(uint32_t*)((char*)eax_15 + 4) = 0;
004ddbae                                      *(uint32_t*)((char*)eax_15 + 8) = 0;
004ddbae                                      
004ddbb4                                      if (esi_4[5] != 0)
004ddbb4                                      {
004ddbbb                                          void* ecx_20 = esi_4[6];
004ddbbe                                          *(uint32_t*)((char*)ecx_20 + 4) = eax_15;
004ddbc1                                          *(uint32_t*)((char*)eax_15 + 8) = ecx_20;
004ddbb4                                      }
004ddbb4                                      else
004ddbb6                                          esi_4[5] = eax_15;
004ddbb6                                      
004ddbc4                                      esi_4[6] = eax_15;
004ddbc7                                      esi_4[7] += 1;
004ddba3                                  }
004dd9fb                              }
004dd9fb                              
004ddbce                              void* eax_17 = j_3[2];
004ddbce                              
004ddbd3                              if (eax_17 == 0)
004ddbd3                                  break;
004ddbd3                              
004ddbd5                              j = ((char*)eax_17 - 8);
004ddbda                              j_3 = j;
004ddbde                          } while (j != 0);
004ddbde                          
004ddbe4                          i_1 = __return;
004dd9e0                      }
004dd9e0                      
004ddbec                      ecx_5 = IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_2a0);
004ddbfe                      var_2a0 = 0x7be66c;
004ddbfe                      
004ddc06                      if (var_240 != &var_29c)
004ddc09                          ecx_5 = operator delete[](var_240);
004ddc09                      
004ddc11                      i_3 = *(uint32_t*)(i_1 + 8);
004ddc16                      var_240 = nullptr;
004ddc1d                      int32_t var_23c_1 = 0;
004ddc24                      int32_t var_238_1 = 0;
004ddc2b                      var_234 = 0;
004ddc2b                      
004ddc32                      if (i_3 == 0)
004ddc32                          break;
004ddc32                      
004ddc34                      i_1 = (i_3 - 8);
004ddc39                      __return = i_1;
004ddc3d                  } while (i_1 != 0);
004dd97d              }
004dd97d              
004ddc43              int32_t var_308_11 = 0x1d;
004ddc45              int32_t var_30c_5 = 0xa;
004ddc47              int32_t var_310_1 = 0x10000001;
004ddc4c              class DBObj* k_17;
004ddc4c              uint32_t ecx_22;
004ddc4c              int32_t edx_15;
004ddc4c              k_17 = DBObj::GetByEnum(i_3, edx_2, ecx_5);
004ddc51              class DBObj* k_16 = k_17;
004ddc58              k_11 = k_16;
004ddc5c              void* eax_51;
004ddc5c              bool cond:6_1;
004ddc5c              void var_224;
004ddc5c              
004ddc5c              if (k_16 == 0)
004ddc5c              {
004de0e3              label_4de0e3:
004de0e3                  IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::delete_contents(&var_228);
004de0e8                  eax_51 = var_1c8;
004de0f6                  cond:6_1 = eax_51 == &var_224;
004ddc5c              }
004ddc5c              else
004ddc5c              {
004ddc62                  int32_t var_308_12 = 0x1d;
004ddc64                  int32_t var_30c_6 = 0xa;
004ddc66                  int32_t var_310_2 = 1;
004ddc68                  class DBObj* eax_19 = DBObj::GetByEnum(k_17, edx_15, ecx_22);
004ddc68                  
004ddc74                  if (eax_19 != 0)
004ddc74                  {
004ddc7e                      CMasterInputMap::Merge(k_16, eax_19, 0);
004ddc83                      eax_19->vtable->Release();
004ddc91                      int32_t* i_4 = nullptr;
004ddc9c                      int32_t var_1bc;
004ddc9c                      
004ddc9c                      if (var_1bc > 0)
004ddc9c                      {
004ddca7                          if (var_1b8_1 == 0)
004ddcae                              i_4 = nullptr;
004ddca7                          else
004ddca9                              i_4 = ((char*)var_1b8_1 - 8);
004ddc9c                      }
004ddc9c                      
004ddcb2                      int32_t* i_2 = i_4;
004ddcb4                      __return_1 = i_2;
004ddcb8                      int32_t* var_2a8_3 = &var_228;
004ddcb8                      
004ddcbc                      if (i_4 != 0)
004ddcbc                      {
004de0bf                          do
004de0bf                          {
004ddcc5                              int32_t j_1 = *(uint32_t*)i_2;
004ddcd0                              IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>(&var_2a0, i_2[0x1e]);
004ddcda                              void* var_230_2 = nullptr;
004ddce1                              int32_t var_22c_2 = 0;
004ddce8                              HashList<unsigned long,List<unsigned long>,1>::operator=(&var_2a0, &i_2[4]);
004ddd01                              int32_t* edx_20 = this->m_hashMappingListBoxes.m_intrusiveTable.m_buckets[(COMBINE(0, j_1) % this->m_hashMappingListBoxes.m_intrusiveTable.m_numBuckets)];
004ddd01                              
004ddd06                              if (edx_20 == 0)
004ddd06                              {
004ddd17                              label_4ddd17:
004ddd17                                  IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::delete_contents(&var_2a0);
004ddd29                                  var_2a0 = 0x7be670;
004ddd29                                  
004ddd31                                  if (var_240 != &var_29c)
004ddd38                                      operator delete[](var_240);
004ddd06                              }
004ddd06                              else
004ddd06                              {
004ddd0a                                  while (*(uint32_t*)edx_20 != j_1)
004ddd0a                                  {
004ddd0c                                      edx_20 = edx_20[1];
004ddd0c                                      
004ddd11                                      if (edx_20 == 0)
004ddd11                                          goto label_4ddd17;
004ddd0a                                  }
004ddd0a                                  
004ddd47                                  if (edx_20 == 0)
004ddd47                                      goto label_4ddd17;
004ddd47                                  
004ddd4c                                  k_12 = edx_20[2];
004ddd57                                  uint32_t* eax_25 = nullptr;
004ddd57                                  
004ddd5f                                  if (var_234 > 0)
004ddd5f                                  {
004ddd6a                                      if (var_230_2 == 0)
004ddd71                                          eax_25 = nullptr;
004ddd6a                                      else
004ddd6c                                          eax_25 = ((char*)var_230_2 - 8);
004ddd5f                                  }
004ddd5f                                  
004ddd75                                  uint32_t* var_2d0_1 = eax_25;
004ddd79                                  int32_t* var_2cc_2 = &var_2a0;
004ddd79                                  
004ddd7d                                  if (eax_25 != 0)
004ddd7d                                  {
004de060                                      void* j_2;
004de060                                      
004de060                                      do
004de060                                      {
004ddd87                                          uint32_t ebx_2 = *(uint32_t*)var_2d0_1;
004ddd91                                          var_2f0 = 0x7a2be4;
004ddd99                                          uint32_t* k_9 = nullptr;
004ddd9d                                          int32_t var_2e8_3 = 0;
004ddda1                                          int32_t var_2e4_2 = 0;
004ddda5                                          List<unsigned long>::operator=(&var_2f0, &var_2d0_1[4]);
004dddb0                                          class UIElement* eax_29 = UIElement_ListBox::AddItemFromTemplateList(k_12, 0, nullptr);
004dddb0                                          
004dddb7                                          if (eax_29 != 0)
004dddb7                                          {
004dddc3                                              class UIElement_Text* eax_30 = eax_29->vtable->DynamicCast(0xc);
004dddc3                                              
004dddcd                                              if (eax_30 != 0)
004dddcd                                              {
004ddddc                                                  gmKeyboardUI::GetStringInfoFromInputMapID(this, &__return_2, ebx_2);
004ddddc                                                  
004dddf1                                                  if (StringInfo::IsValid(&__return_2, 1) != 0)
004dddf1                                                  {
004dde08                                                      UIElement_Text::SetText(eax_30, StringInfo::GetString(&__return_2, &__return, 0));
004dde11                                                      int32_t* esi_9 = (__return - 0x14);
004dde11                                                      
004dde24                                                      if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
004dde2c                                                          **(uint32_t**)esi_9(1);
004dddf1                                                  }
004dddf1                                                  
004dde35                                                  StringInfo::~StringInfo(&__return_2);
004dddcd                                              }
004dddb7                                          }
004dddb7                                          
004dde3a                                          uint32_t* k_4 = k_9;
004dde3e                                          uint32_t* k_3 = k_4;
004dde3e                                          
004dde42                                          while (k_3 != 0)
004dde42                                          {
004dde48                                              uint32_t PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004dde4d                                              uint32_t esi_10 = *(uint32_t*)k_3;
004dde50                                              PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
004dde58                                              InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
004dde5e                                              class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004dde63                                              class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
004dde6b                                              InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
004dde75                                              class PStringBase<unsigned short>* var_308_28 = &PStringBase<unsigned short>::s_NullBuffer_4;
004dde7e                                              uint32_t* var_30c_11 = &PStringBase<unsigned short>::s_NullBuffer_3;
004dde80                                              uint32_t var_314 = esi_10;
004dde88                                              void* var_308_29;
004dde88                                              int32_t* esi_12;
004dde88                                              
004dde88                                              if (ActionMap::GetDescripValues(eax_3, var_314, ebx_2, var_30c_11, var_308_28) != 0)
004dde88                                              {
004ddea1                                                  void var_90;
004ddea1                                                  StringInfo::StringInfo(&var_90);
004ddeb4                                                  StringInfo::SetLiteralValue(&var_90, &PStringBase<unsigned short>::s_NullBuffer_3, 1);
004ddec0                                                  void var_120;
004ddec0                                                  StringInfo::StringInfo(&var_120);
004dded3                                                  StringInfo::SetLiteralValue(&var_120, &PStringBase<unsigned short>::s_NullBuffer_4, 1);
004dded8                                                  class DBObj* k_15 = k_11;
004ddee0                                                  uint32_t temp1_6 = (COMBINE(0, ebx_2) % *(int32_t*)((char*)k_15 + 0x130));
004ddee6                                                  int32_t eax_40 = *(int32_t*)((char*)k_15 + 0x128);
004ddeec                                                  int32_t var_2c8 = 0x7a2be8;
004ddef4                                                  void* var_2c4_1 = nullptr;
004ddef8                                                  int32_t var_2c0_1 = 0;
004ddefc                                                  int32_t var_2bc_1 = 0;
004ddefc                                                  
004ddf05                                                  for (int32_t* edx_27 = *(uint32_t*)(eax_40 + (temp1_6 << 2)); edx_27 != 0; edx_27 = edx_27[1])
004ddf05                                                  {
004ddf09                                                      if (*(uint32_t*)edx_27 == ebx_2)
004ddf09                                                      {
004ddf16                                                          if (edx_27 != 0)
004ddf16                                                          {
004ddf18                                                              class CInputMap* ecx_45 = edx_27[4];
004ddf18                                                              
004ddf1d                                                              if (ecx_45 != 0)
004ddf25                                                                  CInputMap::FindKeysForAction(ecx_45, esi_10, &var_2c8);
004ddf16                                                          }
004ddf16                                                          
004ddf16                                                          break;
004ddf09                                                      }
004ddf05                                                  }
004ddf05                                                  
004ddf34                                                  var_314 = 0x7a2be8;
004ddf3a                                                  int32_t var_310_4 = 0;
004ddf3d                                                  int32_t var_30c_15 = 0;
004ddf40                                                  int32_t var_308_33 = 0;
004ddf43                                                  List<QualifiedControl>::operator=(&var_314, &var_2c8);
004ddf63                                                  gmKeyboardUI::AddActionKeyMap(this, k_12, esi_10, ebx_2, &var_90, &var_120, var_314);
004ddf68                                                  void* eax_42 = var_2c4_1;
004ddf6c                                                  var_2c8 = 0x7a2be8;
004ddf6c                                                  
004ddf76                                                  while (eax_42 != 0)
004ddf76                                                  {
004ddf78                                                      void* ecx_48 = eax_42;
004ddf7a                                                      eax_42 = *(uint32_t*)((char*)eax_42 + 0xc);
004ddf7f                                                      void* var_2c4_2 = eax_42;
004ddf7f                                                      
004ddf83                                                      if (eax_42 == 0)
004ddf8e                                                          int32_t var_2c0_2 = 0;
004ddf83                                                      else
004ddf83                                                      {
004ddf85                                                          *(uint32_t*)((char*)eax_42 + 0x10) = 0;
004ddf88                                                          eax_42 = var_2c4_2;
004ddf83                                                      }
004ddf83                                                      
004ddf94                                                      if (ecx_48 != 0)
004ddf94                                                      {
004ddf97                                                          operator delete(ecx_48);
004ddf9c                                                          eax_42 = var_2c4_2;
004ddf94                                                      }
004ddf94                                                      
004ddfa3                                                      var_2bc_1 -= 1;
004ddf76                                                  }
004ddf76                                                  
004ddfb0                                                  StringInfo::~StringInfo(&var_120);
004ddfbc                                                  StringInfo::~StringInfo(&var_90);
004ddfc5                                                  esi_12 = (PStringBase<unsigned short>::s_NullBuffer_4 - 0x14);
004ddfcb                                                  var_308_29 = &esi_12[1];
004dde88                                              }
004dde88                                              else
004dde88                                              {
004dde8e                                                  esi_12 = (PStringBase<unsigned short>::s_NullBuffer_4 - 0x14);
004dde94                                                  var_308_29 = &esi_12[1];
004dde88                                              }
004dde88                                              
004ddfd8                                              if ((InterlockedDecrement(var_308_29) == 0 && esi_12 != 0))
004ddfe0                                                  **(uint32_t**)esi_12(1);
004ddfe0                                              
004ddfe6                                              int32_t* esi_15 = (PStringBase<unsigned short>::s_NullBuffer_3 - 0x14);
004ddfe6                                              
004ddff9                                              if ((InterlockedDecrement(&esi_15[1]) == 0 && esi_15 != 0))
004de001                                                  **(uint32_t**)esi_15(1);
004de001                                              
004de003                                              k_3 = k_3[1];
004de006                                              k_4 = k_9;
004dde42                                          }
004dde42                                          
004de00f                                          var_2f0 = 0x7a2be4;
004de00f                                          
004de019                                          while (k_4 != 0)
004de019                                          {
004de01b                                              uint32_t* k_14 = k_4;
004de01d                                              k_4 = k_4[1];
004de022                                              uint32_t* k_10 = k_4;
004de022                                              
004de026                                              if (k_4 == 0)
004de031                                                  int32_t var_2e8_4 = 0;
004de026                                              else
004de026                                              {
004de028                                                  k_4[2] = 0;
004de02b                                                  k_4 = k_10;
004de026                                              }
004de026                                              
004de037                                              if (k_14 != 0)
004de037                                              {
004de03a                                                  operator delete(k_14);
004de03f                                                  k_4 = k_10;
004de037                                              }
004de037                                              
004de046                                              var_2e4_2 -= 1;
004de019                                          }
004de019                                          
004de050                                          j_2 = var_2d0_1[2];
004de050                                          
004de055                                          if (j_2 == 0)
004de055                                              break;
004de055                                          
004de05c                                          var_2d0_1 = ((char*)j_2 - 8);
004de060                                      } while (j_2 != 8);
004ddd7d                                  }
004ddd7d                                  
004de06a                                  IntrusiveHashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>::HashListData *,1>::delete_contents(&var_2a0);
004de07c                                  var_2a0 = 0x7be670;
004de07c                                  
004de084                                  if (var_240 != &var_29c)
004de087                                      operator delete[](var_240);
004de087                                  
004de08f                                  i_2 = __return_1;
004ddd06                              }
004ddd06                              
004de093                              void* eax_49 = i_2[2];
004de098                              var_240 = nullptr;
004de09f                              int32_t var_23c_2 = 0;
004de0a6                              int32_t var_238_2 = 0;
004de0ad                              var_234 = 0;
004de0ad                              
004de0b4                              if (eax_49 == 0)
004de0b4                                  break;
004de0b4                              
004de0b6                              i_2 = ((char*)eax_49 - 8);
004de0bb                              __return_1 = i_2;
004de0bf                          } while (i_2 != 0);
004de0bf                          
004de0c5                          k_16 = k_11;
004ddcbc                      }
004ddcbc                      
004de0c9                      k_16->vtable->Release();
004de0d4                      this->vtable->SaveCurrentValues();
004ddcbc                      goto label_4de0e3;
004ddc74                  }
004ddc74                  
004de120                  IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,List<unsigned long>,1>,1>::HashListData *,1>::delete_contents(&var_228);
004de125                  eax_51 = var_1c8;
004de133                  cond:6_1 = eax_51 == &var_224;
004ddc5c              }
004de0f8              var_228 = 0x7be674;
004de0f8              
004de103              if (!(cond:6_1))
004de106                  operator delete[](eax_51);
004dd936          }
004dd923      }
004dd8b0  }

004de137                                                                       90 90 90 90 90 90 90 90 90                         .........

004de140  void __fastcall CharAppearanceData::CharAppearanceData(class CharAppearanceData* this)

004de140  {
004de148      this->base_palette.id = INVALID_DID.id;
004de150      this->head_object.id = INVALID_DID.id;
004de159      this->eyes_texture.id = INVALID_DID.id;
004de162      this->nose_texture.id = INVALID_DID.id;
004de16b      this->mouth_texture.id = INVALID_DID.id;
004de174      this->default_eyes_texture.id = INVALID_DID.id;
004de17d      this->default_nose_texture.id = INVALID_DID.id;
004de186      this->default_mouth_texture.id = INVALID_DID.id;
004de18f      this->hair_palette.id = INVALID_DID.id;
004de198      this->eyes_palette.id = INVALID_DID.id;
004de1a1      this->skin_palette.id = INVALID_DID.id;
004de140  }

004de1a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004de1b0  void __thiscall gmBarberUI::gmBarberUI(class gmBarberUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004de1b0  {
004de1bf      UIElement_Field::UIElement_Field(this, arg2, arg3);
004de1c4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004de1d0      this->vtable = 0x7befa8;
004de1d6      this->vtable = &gmBarberUI::`vftable';
004de1e0      this->m_pRotateClockButton = nullptr;
004de1e6      this->m_pRotateCounterClockButton = nullptr;
004de1ec      this->m_pShadeScroll = nullptr;
004de1f2      this->m_pGradCircle = nullptr;
004de1f8      this->m_pGradGraphic = nullptr;
004de1fe      this->m_pGradPlug = nullptr;
004de204      this->m_iCurColor = 0xffffffff;
004de20e      this->m_iHoldheadgear = 0xfffffc19;
004de218      this->m_bRotating = 0;
004de21e      this->m_fCurHeading = 0f;
004de224      this->m_dAnimStartTime = 0f;
004de22a      *(uint32_t*)((char*)this->m_dAnimStartTime)[4] = 0;
004de230      this->m_dAnimDuration = 0f;
004de236      *(uint32_t*)((char*)this->m_dAnimDuration)[4] = 0;
004de23c      this->m_dRotationPerSec = 0f;
004de242      *(uint32_t*)((char*)this->m_dRotationPerSec)[4] = 0x40080000;
004de24c      this->m_eRotateDir = ECG_ROTATE_INVALID;
004de258      int32_t i_2 = 9;
004de25d      struct gmBarberUI::tagChoices (* s)[0x9] = &this->m_tChoices;
004de275      int32_t i;
004de275      
004de275      do
004de275      {
004de260          __builtin_memset(s, 0, 0x18);
004de271          s = &*(uint216_t*)s[1];
004de274          i = i_2;
004de274          i_2 -= 1;
004de275      } while (i != 1);
004de277      this->m_eCurPart = ECG_PARTS_HAIR;
004de281      struct gmBarberUI::tagColorWheel (* s_1)[0x9] = &this->m_tColorWheel;
004de287      int32_t i_3 = 9;
004de2a8      int32_t i_1;
004de2a8      
004de2a8      do
004de2a8      {
004de290          __builtin_memset(s_1, 0, 0x1c);
004de2a4          s_1 = &*(uint252_t*)s_1[1];
004de2a7          i_1 = i_3;
004de2a7          i_3 -= 1;
004de2a8      } while (i_1 != 1);
004de1b0  }


004de2b0  class UIElement* __thiscall gmBarberUI::DynamicCast(class gmBarberUI* this, uint32_t arg2) __pure

004de2b0  {
004de2bc      if (arg2 == 0x1000004a)
004de2c9          return this;
004de2c9      
004de2c3      int32_t edx_1;
004de2c3      edx_1 = arg2 != 3;
004de2c7      return (this & (edx_1 - 1));
004de2b0  }

004de2cc                                      90 90 90 90                                                              ....

004de2d0  uint32_t gmBarberUI::GetUIElementType(class gmBarberUI const* this @ ecx) __pure

004de2d0  {
004de2d5      return 0x1000004a;
004de2d0  }

004de2d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004de2e0  void __fastcall gmBarberUI::PostInit(class gmBarberUI* this)

004de2e0  {
004de2e4      UIElement::PostInit(this);
004de2e9      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004de2f2      struct gmNoticeHandler::VTable** eax_1;
004de2f2      
004de2f2      if (this == 0)
004de2fc          eax_1 = nullptr;
004de2f2      else
004de2f4          eax_1 = &this->vtable;
004de2f4      
004de2fe      eax->vtable->RegisterNoticeHandler(0x186b0, eax_1);
004de30d      struct gmNoticeHandler::VTable** eax_2;
004de30d      
004de30d      if (this == 0)
004de317          eax_2 = nullptr;
004de30d      else
004de30f          eax_2 = &this->vtable;
004de30f      
004de319      eax->vtable->RegisterNoticeHandler(0x4dd27e, eax_2);
004de32a      UIListener::RegisterForGlobalMessage(this, 3);
004de330      this->m_fCurHeading = 180f;
004de2e0  }

004de33c                                                                                      90 90 90 90                              ....

004de340  class UIElement* gmBarberUI::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004de340  {
004de345      void* eax = operator new(0x868);
004de345      
004de34f      if (eax == 0)
004de365          return 0;
004de365      
004de362      return gmBarberUI::gmBarberUI(eax, arg1, arg2);
004de340  }

004de366                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004de370  void __thiscall HairStyle_CG::HairStyle_CG(class HairStyle_CG* this, class HairStyle_CG const* arg2)

004de370  {
004de377      this->vtable = 0x79fa80;
004de380      this->iconImage.id = arg2->iconImage.id;
004de386      this->bald = arg2->bald;
004de38f      this->alternateSetup.id = arg2->alternateSetup.id;
004de396      ObjDesc::ObjDesc(&this->objDesc, &arg2->objDesc);
004de370  }

004de3a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004de3b0  void __fastcall gmBarberUI::RecvNotice_PlayerObjDescChanged(class gmBarberUI* this)

004de3b0  {
004de3c0      if (UIElement::IsVisible(((char*)this - 0x5f8)) == 0)
004de3cc          return;
004de3cc      
004de3c6      /* tailcall */
004de3c6      return gmCG3DView::Update(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x12]);
004de3b0  }

004de3cd                                         90 90 90                                                               ...

004de3d0  void __thiscall gmBarberUI::SetShade(class gmBarberUI* this, double arg2)

004de3d0  {
004de3d5      class gmBarberUI* this_1 = this;
004de3e6      UIElement::SetAttribute_Float(this->m_pShadeScroll, 0x86, ((float)((long double)arg2)));
004de3f1      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004de3f6      enum gmBarberUI::EParts m_eCurPart = this->m_eCurPart;
004de3f6      
004de401      if (m_eCurPart == ECG_PARTS_HAIR)
004de401      {
004de426          int32_t var_8_2 = *(uint32_t*)((char*)arg2)[4];
004de428          CharGenState::SetHairShade(eax, arg2);
004de401      }
004de401      else if ((m_eCurPart > ECG_PARTS_EYES && m_eCurPart <= ECG_PARTS_SKIN))
004de40b      {
004de415          int32_t var_8_1 = *(uint32_t*)((char*)arg2)[4];
004de417          CharGenState::SetSkinShade(eax, arg2);
004de40b      }
004de40b      
004de438      if (UIElement::IsVisible(this) != 0)
004de440          gmCG3DView::Update(this->m_p3DView);
004de3d0  }

004de449                             90 90 90 90 90 90 90                                                           .......

004de450  void __fastcall gmBarberUI::DoRotation(class gmBarberUI* this)

004de450  {
004de450      long double x87_r7 = ((long double)this->m_dLastRotateTime);
004de456      long double temp0 = ((long double)0.0);
004de456      (x87_r7 - temp0);
004de45c      int32_t eax;
004de45c      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
004de45e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004de45e      
004de461      if (!(p))
004de461      {
004de46e          this->m_dLastRotateTime = (*(uint32_t*)Timer::cur_time);
004de474          *(uint32_t*)((char*)this->m_dLastRotateTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004de461      }
004de461      
004de47a      long double x87_r7_1 = ((long double)Timer::cur_time);
004de497      long double x87_r6_3 = (((x87_r7_1 - ((long double)this->m_dLastRotateTime)) / ((long double)this->m_dRotationPerSec)) * ((long double)360.0));
004de497      
004de49d      if (this->m_eRotateDir != ECG_ROTATE_CLOCKWISE)
004de49d      {
004de4b5          this->m_fCurHeading = ((float)(((long double)this->m_fCurHeading) - x87_r6_3));
004de4bb          x87_r7_1 = x87_r6_3;
004de49d      }
004de49d      else
004de4a5          this->m_fCurHeading = ((float)(x87_r6_3 + ((long double)this->m_fCurHeading)));
004de4a5      
004de4bd      long double x87_r6_5 = ((long double)this->m_fCurHeading);
004de4c3      long double temp1 = ((long double)0f);
004de4c3      (x87_r6_5 - temp1);
004de4c9      enum gmBarberUI::ERotateDirection eax_2;
004de4c9      eax_2 = ((((x87_r6_5 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
004de4cb      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004de4cb      
004de4ce      if (!(p_1))
004de4dc          this->m_fCurHeading = ((float)(((long double)this->m_fCurHeading) + ((long double)360f)));
004de4dc      
004de4e2      long double x87_r6_8 = ((long double)this->m_fCurHeading);
004de4e8      long double temp2 = ((long double)360f);
004de4e8      (x87_r6_8 - temp2);
004de4ee      eax_2 = ((((x87_r6_8 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_8, temp2))) ? 1 : 0) << 0xa) | ((((x87_r6_8 == temp2) ? 1 : 0) << 0xe) | 0x3800))));
004de4ee      
004de4f3      if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
004de501          this->m_fCurHeading = ((float)(((long double)this->m_fCurHeading) - ((long double)360f)));
004de501      
004de507      float m_fCurHeading = this->m_fCurHeading;
004de50d      this->m_dLastRotateTime = ((double)x87_r7_1);
004de51a      gmCG3DView::SetPlayerHeading(this->m_p3DView, m_fCurHeading);
004de450  }


004de520  void __thiscall gmBarberUI::Rotate(class gmBarberUI* this, enum gmBarberUI::ERotateDirection arg2)

004de520  {
004de538      if ((this->m_bRotating != 0 && arg2 == this->m_eRotateDir))
004de538      {
004de53b          this->m_bRotating = 0;
004de543          return;
004de538      }
004de538      
004de549      if (arg2 == ECG_ROTATE_CLOCKWISE)
004de560          this->m_pRotateCounterClockButton->vtable->SetState(1);
004de549      else if (arg2 == 2)
004de54e          this->m_pRotateClockButton->vtable->SetState(1);
004de54e      
004de570      this->m_eRotateDir = arg2;
004de577      this->m_dLastRotateTime = 0f;
004de581      *(uint32_t*)((char*)this->m_dLastRotateTime)[4] = 0xbff00000;
004de58b      this->m_bRotating = 1;
004de520  }

004de596                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004de5a0  void* __thiscall gmBarberUI::`scalar deleting destructor'(class gmBarberUI* this, uint32_t arg2)

004de5a0  {
004de5aa      this->vtable = 0x7befa8;
004de5a4      this->vtable = &gmBarberUI::`vftable';
004de5b6      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004de5b6      
004de5bd      if (eax != 0)
004de5bf          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004de5bf      
004de5a4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004de5cf      NoticeHandler::~NoticeHandler(&this->vtable);
004de5d6      UIElement_Field::~UIElement_Field(this);
004de5d6      
004de5e0      if ((arg2 & 1) != 0)
004de5e3          operator delete(this);
004de5e3      
004de5ef      return this;
004de5a0  }

004de5f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004de600  void gmBarberUI::Register()

004de600  {
004de60a      UIElement::RegisterElementClass(0x1000004a, gmBarberUI::Create);
004de600  }

004de613                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004de620  void __thiscall gmBarberUI::ListenToGlobalMessage(class gmBarberUI* this, uint32_t arg2, int32_t arg3)

004de620  {
004de62f      if ((arg2 == 3 && this->m_bRotating != 0))
004de631          gmBarberUI::DoRotation(this);
004de620  }

004de639                                                                             90 90 90 90 90 90 90                           .......

004de640  void __thiscall gmBarberUI::DoColorSpots(class gmBarberUI* this, int32_t arg2)

004de640  {
004de646      int32_t i = 0;
004de64d      int32_t i_1 = 0;
004de651      class Graphic** esi = &this->m_tColorWheel[0].pGraphic;
004de651      
004de86c      do
004de86c      {
004de66c          class IDClass<_tagDataID,32,0> __return;
004de66c          DBObj::GetDIDByEnum(&__return, 0x1000000d, 7);
004de67d          class IDClass<_tagDataID,32,0> __return_1;
004de67d          DBObj::GetDIDByEnum(&__return_1, 0x1000000f, 7);
004de841          ADJ(esi)->m_tColorWheel[0].pColor->vtable->SetVisible(1);
004de6a0          void var_30;
004de6a0          class DBObj* eax_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_30, __return, 0xc));
004de6c5          void var_28;
004de6c5          class DBObj* ebp_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_28, __return_1, 0xc));
004de6c5          
004de6cb          if (eax_3 != 0)
004de6cb          {
004de6d4              long double x87_r7_1 = ((long double)ADJ(esi)->m_tColorWheel[0].iRed);
004de6d7              bool cond:1_1 = ADJ(esi)->m_tColorWheel[0].iRed >= 0;
004de6d9              int32_t var_10 = 0;
004de6e1              int32_t var_c_1 = 0;
004de6e9              int32_t var_8_1 = 0;
004de6f1              int32_t var_4_1 = 0x3f800000;
004de6f1              
004de6f9              if (!(cond:1_1))
004de6fb                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
004de6fb              
004de70a              bool cond:2_1 = ADJ(esi)->m_tColorWheel[0].iGreen >= 0;
004de70c              float var_20 = ((float)(x87_r7_1 * ((long double)0.00392156886f)));
004de710              long double x87_r7_3 = ((long double)ADJ(esi)->m_tColorWheel[0].iGreen);
004de710              
004de713              if (!(cond:2_1))
004de715                  x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
004de715              
004de726              float var_1c_1 = ((float)(x87_r7_3 * ((long double)0.00392156886f)));
004de72a              long double x87_r7_5 = ((long double)ADJ(esi)->m_tColorWheel[0].iBlue);
004de72a              
004de72d              if (ADJ(esi)->m_tColorWheel[0].iBlue < 0)
004de72f                  x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
004de72f              
004de73f              int32_t var_14_1 = 0x3f800000;
004de747              float var_18_1 = ((float)(x87_r7_5 * ((long double)0.00392156886f)));
004de747              
004de74b              if (ADJ(esi)->m_tColorWheel[0].pGraphic == 0)
004de74b              {
004de755                  int32_t* eax_8 = RenderDevice::render_device->vtable->CreateLocalSurface();
004de755                  
004de75c                  if (eax_8 != 0)
004de75c                  {
004de78e                      *(uint32_t*)(*(uint32_t*)eax_8 + 0x58)(*(int32_t*)((char*)eax_3 + 0xa0), *(int32_t*)((char*)eax_3 + 0xa4), RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1);
004de793                      void* eax_12 = operator new(0xc);
004de79d                      class Graphic* eax_13;
004de79d                      
004de79d                      if (eax_12 == 0)
004de7a9                          eax_13 = nullptr;
004de79d                      else
004de7a2                          eax_13 = Graphic::Graphic(eax_12, eax_8);
004de7a2                      
004de841                      ADJ(esi)->m_tColorWheel[0].pGraphic = eax_13;
004de75c                  }
004de74b              }
004de74b              
004de7b9              i = i_1;
004de7b9              
004de7ce              if (i >= &*(uint32_t*)((char*)this->m_tChoices[0])[8][(arg2 * 6)])
004de815                  SurfaceWindow::Blit(&ADJ(esi)->m_tColorWheel[0].pGraphic->m_image->window, ((char*)ebp_1 + 0xac), Blit_Normal, 1f);
004de7ce              else
004de7ce              {
004de7e2                  SurfaceWindow::Blit(&ADJ(esi)->m_tColorWheel[0].pGraphic->m_image->window, ((char*)eax_3 + 0xac), Blit_Normal, 1f);
004de7fc                  SurfaceWindow::ReplaceColor(&ADJ(esi)->m_tColorWheel[0].pGraphic->m_image->window, &var_10, &var_20);
004de7ce              }
004de7ce              
004de81d              UIRegion::ClearImage(ADJ(esi)->m_tColorWheel[0].pColor);
004de824              class Graphic* eax_17 = operator new(0xc);
004de82e              class Graphic* eax_18;
004de82e              
004de82e              if (eax_17 == 0)
004de83f                  eax_18 = nullptr;
004de82e              else
004de838                  eax_18 = Graphic::Graphic(eax_17, ADJ(esi)->m_tColorWheel[0].pGraphic->m_image);
004de838              
004de845              UIRegion::SetImage(ADJ(esi)->m_tColorWheel[0].pColor, eax_18);
004de6cb          }
004de6cb          
004de84c          if (ebp_1 != 0)
004de84e              ebp_1->vtable->Release();
004de84e          
004de858          if (eax_3 != 0)
004de85a              eax_3->vtable->Release();
004de85a          
004de861          i += 1;
004de862          esi = &esi[7];
004de868          i_1 = i;
004de86c      } while (i < 9);
004de640  }

004de659                                                                             8d a4 24 00 00 00 00                           ..$....
004de87c                                                                                      90 90 90 90                              ....

004de880  void __thiscall gmBarberUI::DoGradDisk(class gmBarberUI* this, uint8_t arg2)

004de880  {
004de894      class IDClass<_tagDataID,32,0> __return;
004de894      DBObj::GetDIDByEnum(&__return, 0x1000000e, 7);
004de8a5      class IDClass<_tagDataID,32,0> __return_1;
004de8a5      DBObj::GetDIDByEnum(&__return_1, 0x10000010, 7);
004de8c6      void var_20;
004de8c6      class DBObj* ebp = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_20, __return, 0xc));
004de8d3      class DBObj* var_30 = ebp;
004de8e7      void var_18;
004de8e7      class DBObj* ebx = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_18, __return_1, 0xc));
004de8e9      class DBObj* var_34 = ebx;
004de8e9      
004de8ed      if (ebp == 0)
004de8ed      {
004deb1b      label_4deb1b:
004deb1b          
004deb1d          if (ebx != 0)
004deb1f              ebx->vtable->Release();
004de8ed      }
004de8ed      else if (ebx != 0)
004de8f5      {
004de8fb          int32_t m_iCurColor = this->m_iCurColor;
004de903          void* ecx_3 = (m_iCurColor * 0x1c);
004de906          long double x87_r7_1 = ((long double)*(uint32_t*)(&this->m_tColorWheel + ecx_3));
004de906          
004de919          if (*(uint32_t*)(&this->m_tColorWheel + ecx_3) < 0)
004de91b              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
004de91b          
004de92d          float var_10 = ((float)(x87_r7_1 * ((long double)0.00392156886f)));
004de931          int32_t eax_7 = *(uint32_t*)(((m_iCurColor + 0x44) * 0x1c) + this);
004de93a          long double x87_r7_3 = ((long double)eax_7);
004de93a          
004de93e          if (eax_7 < 0)
004de940              x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
004de940          
004de94c          int32_t ecx_5 = *(uint32_t*)(&*(uint32_t*)((char*)this->m_tColorWheel[0])[8] + ecx_3);
004de958          float var_c_1 = ((float)(x87_r7_3 * ((long double)0.00392156886f)));
004de95c          long double x87_r7_5 = ((long double)ecx_5);
004de95c          
004de960          if (ecx_5 < 0)
004de962              x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
004de962          
004de976          int32_t var_4_1 = 0x3f800000;
004de97e          float var_8_1 = ((float)(x87_r7_5 * ((long double)0.00392156886f)));
004de97e          
004de982          if (this->m_pGradGraphic == 0)
004de982          {
004de98c              int32_t* eax_9 = RenderDevice::render_device->vtable->CreateLocalSurface();
004de98c              
004de993              if (eax_9 != 0)
004de993              {
004de9bd                  *(uint32_t*)(*(uint32_t*)eax_9 + 0x58)(*(int32_t*)((char*)ebp + 0xa0), *(int32_t*)((char*)ebp + 0xa4), RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1);
004de9c2                  class Graphic* eax_12 = operator new(0xc);
004de9cc                  class Graphic* eax_13;
004de9cc                  
004de9cc                  if (eax_12 == 0)
004de9d8                      eax_13 = nullptr;
004de9cc                  else
004de9d1                      eax_13 = Graphic::Graphic(eax_12, eax_9);
004de9d1                  
004de9da                  ebp = var_30;
004de9de                  ebx = var_34;
004de9e2                  this->m_pGradGraphic = eax_13;
004de993              }
004de982          }
004de982          
004de9f0          class Graphic* eax_14;
004de9f0          
004de9f0          if (this->m_pGradPlug == 0)
004de9f0          {
004de9fa              eax_14 = RenderDevice::render_device->vtable->CreateLocalSurface();
004de9fa              
004dea01              if (eax_14 != 0)
004dea01              {
004dea2f                  *(int32_t*)((char*)eax_14->vtable + 0x58)(*(int32_t*)((char*)var_34 + 0xa0), *(int32_t*)((char*)ebx + 0xa4), RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1);
004dea34                  class Graphic* eax_17 = operator new(0xc);
004dea34                  
004dea3e                  if (eax_17 == 0)
004dea4a                      eax_14 = nullptr;
004dea3e                  else
004dea43                      eax_14 = Graphic::Graphic(eax_17, eax_14);
004dea43                  
004dea4c                  ebp = var_30;
004dea50                  ebx = var_34;
004dea54                  this->m_pGradPlug = eax_14;
004dea01              }
004de9f0          }
004de9f0          
004dea5a          eax_14 = arg2;
004dea61          class Graphic* eax_21;
004dea61          
004dea61          if (eax_14 != 0)
004dea61          {
004deadc              SurfaceWindow::Blit(&this->m_pGradPlug->m_image->window, ((char*)ebx + 0xac), Blit_Normal, 1f);
004deae7              UIRegion::ClearImage(this->m_pGradCircle);
004deaee              class Graphic* eax_23 = operator new(0xc);
004deaee              
004deaf8              if (eax_23 == 0)
004deb0d                  eax_21 = nullptr;
004deaf8              else
004deb06                  eax_21 = Graphic::Graphic(eax_23, this->m_pGradPlug->m_image);
004dea61          }
004dea61          else
004dea61          {
004dea67              uint32_t eax_18 = RGBAColor::GetColor32(&var_10);
004dea8e              SurfaceWindow::BlitAndColor(&this->m_pGradGraphic->m_image->window, ((char*)ebp + 0xac), Blit_Normal, 1f, nullptr, Blit_Multiply, eax_18);
004dea99              UIRegion::ClearImage(this->m_pGradCircle);
004deaa0              void* eax_20 = operator new(0xc);
004deaa0              
004deaaa              if (eax_20 == 0)
004deb0d                  eax_21 = nullptr;
004deaaa              else
004deab8                  eax_21 = Graphic::Graphic(eax_20, this->m_pGradGraphic->m_image);
004dea61          }
004dea61          
004deb16          UIRegion::SetImage(this->m_pGradCircle, eax_21);
004de93e          goto label_4deb1b;
004de8f5      }
004de8f5      
004deb28      if (ebp != 0)
004deb2a          ebp->vtable->Release();
004de880  }

004deb3b                                                                                   90 90 90 90 90                             .....

004deb40  void __thiscall gmBarberUI::SetColor(class gmBarberUI* this, int32_t arg2)

004deb40  {
004deb43      int32_t m_iCurColor = this->m_iCurColor;
004deb43      
004deb4c      if (m_iCurColor != 0xffffffff)
004deb51          &*(uint32_t*)((char*)this->m_tColorWheel[0])[0x10][(m_iCurColor * 7)]->vtable->SetVisible(0);
004deb51      
004deb69      if (arg2 != 0xffffffff)
004deb70          &*(uint32_t*)((char*)this->m_tColorWheel[0])[0x10][(arg2 * 7)]->vtable->SetVisible(1);
004deb70      
004deb7e      class CPlayerSystem* m_pPlayerSystem = this->m_pPlayerSystem;
004deb84      this->m_iCurColor = arg2;
004deb8a      class ClientCharGenState* eax_4 = CPlayerSystem::GetCharGenState(m_pPlayerSystem);
004deb8f      enum gmBarberUI::EParts m_eCurPart = this->m_eCurPart;
004deb96      class CharGenState* ecx_2 = eax_4;
004deb98      arg2 = 0;
004deb98      
004deb9e      if (m_eCurPart == ECG_PARTS_HAIR)
004debbd          CharGenState::SetHairColor(ecx_2, this->m_iCurColor);
004deb9e      else if (m_eCurPart == 2)
004deba1      {
004debaa          CharGenState::SetEyeColor(ecx_2, this->m_iCurColor);
004debaf          arg2 = 1;
004deba1      }
004deba1      
004debc9      gmBarberUI::DoGradDisk(this, arg2);
004debc9      
004debd7      if (UIElement::IsVisible(this) != 0)
004debdf          gmCG3DView::Update(this->m_p3DView);
004deb40  }

004debe8                          90 90 90 90 90 90 90 90                                                          ........

004debf0  void __fastcall gmBarberUI::SetupParts(class gmBarberUI* this)

004debf0  {
004dec06      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004dec22      void __return_1;
004dec22      ACCharGenData::GetHG(eax->charGenData, &__return_1, eax->mHeritageGroup);
004dec3a      void __return;
004dec3a      HeritageGroup_CG::GetSX(&__return_1, &__return, eax->mGender);
004dec49      int32_t var_13c;
004dec49      this->m_tChoices[0].iNumChoices = var_13c;
004dec4f      this->m_tChoices[0].iCurrentChoice = eax->hairStyle;
004dec5f      this->m_tChoices[0].iCurrentColor = eax->hairColor;
004dec6c      int32_t var_148;
004dec6c      this->m_tChoices[0].iNumColors = var_148;
004dec78      this->m_tChoices[0].dShade = ((double)((long double)eax->hairShade));
004dec84      this->m_tChoices[1].iCurrentChoice = eax->eyesStrip;
004dec91      int32_t var_124;
004dec91      this->m_tChoices[1].iNumChoices = var_124;
004dec9d      int32_t var_130;
004dec9d      this->m_tChoices[1].iNumColors = var_130;
004decac      this->m_tChoices[1].iCurrentColor = eax->eyeColor;
004decb2      this->m_tChoices[1].dShade = 0f;
004decb8      *(uint32_t*)((char*)this->m_tChoices[1].dShade)[4] = 0;
004decc4      this->m_tChoices[2].iCurrentChoice = eax->noseStrip;
004decca      int32_t var_118;
004decca      this->m_tChoices[2].iNumChoices = var_118;
004decd0      this->m_tChoices[2].iNumColors = 0;
004decd6      this->m_tChoices[2].dShade = 0f;
004decdc      *(uint32_t*)((char*)this->m_tChoices[2].dShade)[4] = 0;
004dece5      this->m_tChoices[2].iCurrentColor = 0xffffffff;
004decf1      this->m_tChoices[3].iCurrentChoice = eax->mouthStrip;
004decfe      int32_t var_10c;
004decfe      this->m_tChoices[3].iNumChoices = var_10c;
004ded04      this->m_tChoices[3].iCurrentColor = 0xffffffff;
004ded11      this->m_tChoices[3].iNumColors = 0;
004ded17      this->m_tChoices[3].dShade = 0f;
004ded1d      *(uint32_t*)((char*)this->m_tChoices[3].dShade)[4] = 0;
004ded29      this->m_tChoices[6].iCurrentChoice = eax->shirtStyle;
004ded2f      int32_t var_f4;
004ded2f      this->m_tChoices[6].iNumChoices = var_f4;
004ded3b      this->m_tChoices[6].iCurrentColor = eax->shirtColor;
004ded4e      this->m_tChoices[6].iNumColors = eax->numShirtColors;
004ded5a      this->m_tChoices[6].dShade = ((double)((long double)eax->shirtShade));
004ded66      this->m_tChoices[7].iCurrentChoice = eax->trousersStyle;
004ded6c      int32_t var_e8;
004ded6c      this->m_tChoices[7].iNumChoices = var_e8;
004ded78      this->m_tChoices[7].iCurrentColor = eax->trousersColor;
004ded84      this->m_tChoices[7].iNumColors = eax->numTrousersColors;
004ded90      this->m_tChoices[7].dShade = ((double)((long double)eax->trousersShade));
004ded9c      this->m_tChoices[8].iCurrentChoice = eax->footwearStyle;
004deda9      int32_t var_dc;
004deda9      this->m_tChoices[8].iNumChoices = var_dc;
004dedb5      this->m_tChoices[8].iCurrentColor = eax->footwearColor;
004dedc1      this->m_tChoices[8].iNumColors = eax->numFootwearColors;
004dedcd      this->m_tChoices[8].dShade = ((double)((long double)eax->footwearShade));
004dedd7      Sex_CG::~Sex_CG(&__return);
004dede3      HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
004debf0  }

004dedee                                            90 90                                                                ..

004dedf0  void __thiscall gmBarberUI::SetSelection(class gmBarberUI* this, enum gmBarberUI::EParts arg2)

004dedf0  {
004dee04      int32_t var_1dc = 0;
004dee08      int32_t var_1d4 = 0;
004dee0c      int32_t var_1e8 = 0;
004dee10      int32_t eyeColor = 0;
004dee14      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004dee30      void __return_2;
004dee30      ACCharGenData::GetHG(eax->charGenData, &__return_2, eax->mHeritageGroup);
004dee48      void __return_1;
004dee48      HeritageGroup_CG::GetSX(&__return_2, &__return_1, eax->mGender);
004dee54      this->m_eCurPart = arg2;
004dee5a      class UIElement** esi = &this->m_tColorWheel[0].pPointer;
004dee60      int32_t i_2 = 9;
004dee7c      int32_t i;
004dee7c      
004dee7c      do
004dee7c      {
004df110          ADJ(esi)->m_tColorWheel[0].pColor->vtable->SetVisible(1);
004df110          ADJ(esi)->m_tColorWheel[0].pPointer->vtable->SetVisible(0);
004dee78          esi = &esi[7];
004dee7b          i = i_2;
004dee7b          i_2 -= 1;
004dee7c      } while (i != 1);
004dee7e      class UIElement* m_pCurSelection = this->m_pCurSelection;
004dee84      int32_t esi_1 = 0;
004dee84      
004dee88      if (m_pCurSelection != 0)
004dee8a          m_pCurSelection->vtable->SetState(1);
004dee8a      
004dee9f      if ((arg2 - 1) > 4)
004dee9f          goto label_4df0c9;
004dee9f      
004deea5      int32_t var_1e4;
004deea5      int32_t var_1e0;
004deea5      class DBObj* var_1c0;
004deea5      class IDClass<_tagDataID,32,0> var_148;
004deea5      
004deea5      switch (arg2)
004deea5      {
004deeb5          case ECG_PARTS_HAIR:
004deeb5          {
004deeb5              int32_t var_13c;
004deeb5              var_1e8 = var_13c;
004deeb5              
004deeb9              if (var_13c > 0)
004deeb9              {
004deee6                  do
004deee6                  {
004deedf                      int32_t var_144;
004deedf                      *(uint32_t*)&&var_1c0[esi_1] = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e4, *(uint32_t*)(var_144 + (esi_1 << 2)), 0x18));
004deee3                      esi_1 += 1;
004deee6                  } while (esi_1 < var_13c);
004deeb9              }
004deeb9              
004deeee              this->m_pCurSelection = this->m_pHairSpin;
004deef4              int32_t hairColor = eax->hairColor;
004def05              int32_t edx_3;
004def05              edx_3 = hairColor == 0xffffffff;
004def08              var_1d4 = 0xd0;
004def10              var_1dc = 0;
004def18              var_1e0 = *(uint32_t*)((char*)eax->hairShade)[4];
004def25              eyeColor = ((edx_3 - 1) & hairColor);
004def29              var_1e4 = eax->hairShade;
004def2f              goto label_4df0c9;
004deeb5          }
004def34          case ECG_PARTS_EYES:
004def34          {
004def34              int32_t var_124;
004def34              int32_t eax_10 = var_124;
004def3b              int32_t ebp_1 = 0;
004def3b              
004def3f              if (eax_10 > 0)
004def3f              {
004def41                  uint32_t* esi_2 = &this->m_tColorWheel[0].iGreen;
004def41                  
004def8f                  do
004def8f                  {
004def62                      int32_t var_12c;
004def62                      uint32_t eax_12 = ClientCharGenState::GetColorFromPal(eax, *(uint32_t*)(var_12c + (ebp_1 << 2)), 0x103);
004df110                      ADJ(esi_2)->m_tColorWheel[0].iRed = ((uint32_t)((int8_t)(eax_12 >> 0x10)));
004df110                      ADJ(esi_2)->m_tColorWheel[0].iBlue = ((uint32_t)eax_12);
004def80                      eax_10 = var_124;
004df110                      ADJ(esi_2)->m_tColorWheel[0].iGreen = ((uint32_t)((int8_t)(eax_12 >> 8)));
004def89                      ebp_1 += 1;
004def8a                      esi_2 = &esi_2[7];
004def8f                  } while (ebp_1 < eax_10);
004def3f              }
004def3f              
004def97              this->m_pCurSelection = this->m_pEyesSpin;
004defa3              var_1e8 = eax_10;
004defa7              var_1dc = 1;
004defaf              eyeColor = eax->eyeColor;
004defb3              var_1e4 = 0;
004defbb              var_1e0 = 0x3fe00000;
004def34              break;
004def34          }
004defd6          case ECG_PARTS_NOSE:
004defd6          {
004defd6              var_1e8 = 1;
004defe4              class DBObj* eax_16 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e4, var_148, 0x18));
004defef              this->m_pCurSelection = this->m_pNoseSpin;
004deff5              int32_t edx_10 = eax->skinShade;
004deffb              var_1c0 = eax_16;
004defff              int32_t eax_17 = *(uint32_t*)((char*)eax->skinShade)[4];
004df005              var_1dc = 2;
004df00d              var_1e4 = edx_10;
004df011              var_1e0 = eax_17;
004df0b9          label_4df0b9:
004df0b9              var_1d4 = 0xb0;
004df0c1              eyeColor = 0;
004df0c9          label_4df0c9:
004df0c9              int32_t eax_24 = 0;
004df0cd              int32_t var_1d0_1 = 0;
004df0cd              
004df0d1              if (var_1e8 > 0)
004df0d1              {
004df0d7                  uint32_t* esi_3 = &this->m_tColorWheel[0].iGreen;
004df0d7                  
004df18f                  do
004df18f                  {
004df0e0                      class PalSet* ecx_24 = *(uint32_t*)&&var_1c0[eax_24];
004df0e8                      int32_t i_1 = 0;
004df0ec                      class PalSet* var_1cc_1 = ecx_24;
004df0ec                      
004df0f0                      if (ecx_24 != 0)
004df0f0                      {
004df110                          ADJ(esi_3)->m_tColorWheel[0].iBlue = 0;
004df110                          ADJ(esi_3)->m_tColorWheel[0].iGreen = 0;
004df110                          ADJ(esi_3)->m_tColorWheel[0].iRed = 0;
004df110                          
004df103                          if (ecx_24->num_pals > 0)
004df103                          {
004df107                              class PalSet* var_1c8_1 = ecx_24;
004df107                              
004df15c                              do
004df15c                              {
004df125                                  void __return;
004df125                                  uint32_t eax_28 = ClientCharGenState::GetColorFromPal(eax, PalSet::GetPaletteID_Integral(ecx_24, &__return, i_1)->id, var_1d4);
004df110                                  ADJ(esi_3)->m_tColorWheel[0].iRed += ((uint32_t)((int8_t)(eax_28 >> 0x10)));
004df110                                  ADJ(esi_3)->m_tColorWheel[0].iGreen += ((uint32_t)((int8_t)(eax_28 >> 8)));
004df110                                  ADJ(esi_3)->m_tColorWheel[0].iBlue += ((uint32_t)eax_28);
004df155                                  ecx_24 = var_1cc_1;
004df159                                  i_1 += 1;
004df15c                              } while (i_1 < var_1c8_1->num_pals);
004df103                          }
004df103                          
004df110                          ADJ(esi_3)->m_tColorWheel[0].iRed = (COMBINE(0, ADJ(esi_3)->m_tColorWheel[0].iRed) / ecx_24->num_pals);
004df110                          ADJ(esi_3)->m_tColorWheel[0].iGreen = (COMBINE(0, ADJ(esi_3)->m_tColorWheel[0].iGreen) / ecx_24->num_pals);
004df110                          ADJ(esi_3)->m_tColorWheel[0].iBlue = (COMBINE(0, ADJ(esi_3)->m_tColorWheel[0].iBlue) / ecx_24->num_pals);
004df17d                          eax_24 = var_1d0_1;
004df0f0                      }
004df0f0                      
004df185                      eax_24 += 1;
004df186                      esi_3 = &esi_3[7];
004df18b                      var_1d0_1 = eax_24;
004df18f                  } while (eax_24 < var_1e8);
004df0d1              }
004defd6              break;
004defd6          }
004df028          case ECG_PARTS_MOUTH:
004df028          {
004df028              var_1e8 = 1;
004df036              class DBObj* eax_19 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e4, var_148, 0x18));
004df041              this->m_pCurSelection = this->m_pMouthSpin;
004df047              int32_t ecx_19 = *(uint32_t*)((char*)eax->skinShade)[4];
004df04d              var_1c0 = eax_19;
004df057              var_1dc = 3;
004df05f              var_1e4 = eax->skinShade;
004df063              var_1e0 = ecx_19;
004df067              goto label_4df0b9;
004df028          }
004df077          case ECG_PARTS_SKIN:
004df077          {
004df077              var_1e8 = 1;
004df08a              var_1c0 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1e4, var_148, 0x18));
004df094              this->m_pCurSelection = this->m_pSkinSpin;
004df0a0              int32_t edx_13 = *(uint32_t*)((char*)eax->skinShade)[4];
004df0a6              var_1dc = 4;
004df0ae              var_1e4 = eax->skinShade;
004df0b2              var_1e0 = edx_13;
004df0b2              goto label_4df0b9;
004df077          }
004deea5      }
004deea5      
004df1a1      this->m_iCurColor = eyeColor;
004df1a7      this->m_iPartIndex = var_1dc;
004df1b0      &*(uint32_t*)((char*)this->m_tChoices[0])[8][(var_1dc * 6)] = var_1e8;
004df1b7      this->m_pCurSelection->vtable->SetState(6);
004df1ca      gmBarberUI::DoColorSpots(this, var_1dc);
004df1ca      
004df1d9      if (arg2 != ECG_PARTS_EYES)
004df1d9      {
004df1f3          gmBarberUI::DoGradDisk(this, 0);
004df1f8          this->m_pShadeScroll->vtable->SetVisible(1);
004df20d          int32_t var_1fc_9 = var_1e0;
004df211          gmBarberUI::SetShade(this, var_1e4);
004df1d9      }
004df1d9      else
004df1d9      {
004df1dd          gmBarberUI::DoGradDisk(this, 1);
004df1e2          this->m_pShadeScroll->vtable->SetVisible(0);
004df1d9      }
004df1d9      
004df219      gmBarberUI::SetColor(this, eyeColor);
004df222      Sex_CG::~Sex_CG(&__return_1);
004df22e      HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
004dedf0  }

004deebd                                                                                         8d 49 00                               .I.
004def49                             8d a4 24 00 00 00 00                                                           ..$....
004df10d                                         8d 49 00                                                               .I.
004df240  uint32_t jump_table_4df240[0x5] = 
004df240  {
004df240      [0x0] =  0x004deeac
004df244      [0x1] =  0x004def34
004df248      [0x2] =  0x004defc8
004df24c      [0x3] =  0x004df01a
004df250      [0x4] =  0x004df069
004df254  }

004df254                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004df260  void __thiscall gmBarberUI::ListenToElementMessage(class gmBarberUI* this, struct UIElementMessageInfo const* arg2)

004df260  {
004df267      struct UIElementMessageInfo* ebx = arg2;
004df26e      uint32_t idElement = ebx->idElement;
004df26e      
004df279      if (idElement > 0x10000321)
004df279      {
004df830          class IDClass<_tagDataID,32,0> id;
004df830          
004df830          if ((idElement - 0x1000059e) <= 0x2b)
004df830              switch (idElement)
004df830              {
004df849                  case 0x1000059e:
004df849                  {
004df849                      if (ebx->idMessage == 1)
004df849                      {
004df84f                          int32_t iCurrentChoice = this->m_tChoices[0].iCurrentChoice;
004df855                          int32_t iNumChoices_6 = this->m_tChoices[0].iNumChoices;
004df855                          
004df85d                          if (iCurrentChoice >= iNumChoices_6)
004df85f                              this->m_tChoices[0].iCurrentChoice = 0;
004df85d                          else if (iCurrentChoice < 0)
004df870                              this->m_tChoices[0].iCurrentChoice = (iNumChoices_6 - 1);
004df870                          
004df87c                          class ClientCharGenState* eax_38 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df88b                          eax_38->hairStyle = this->m_tChoices[0].iCurrentChoice;
004df891                          gmBarberUI::SetSelection(this, ECG_PARTS_HAIR);
004df849                      }
004df849                      break;
004df849                  }
004df89f                  case 0x1000059f:
004df89f                  {
004df89f                      if (ebx->idMessage == 1)
004df89f                      {
004df8a5                          int32_t iCurrentChoice_1 = this->m_tChoices[1].iCurrentChoice;
004df8ab                          int32_t iNumChoices_7 = this->m_tChoices[1].iNumChoices;
004df8ab                          
004df8b3                          if (iCurrentChoice_1 >= iNumChoices_7)
004df8b5                              this->m_tChoices[1].iCurrentChoice = 0;
004df8b3                          else if (iCurrentChoice_1 < 0)
004df8c6                              this->m_tChoices[1].iCurrentChoice = (iNumChoices_7 - 1);
004df8c6                          
004df8d2                          class ClientCharGenState* eax_40 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df8dd                          eax_40->eyesStrip = this->m_tChoices[1].iCurrentChoice;
004df8e7                          gmBarberUI::SetSelection(this, ECG_PARTS_EYES);
004df89f                      }
004df89f                      break;
004df89f                  }
004df8f5                  case 0x100005a0:
004df8f5                  {
004df8f5                      if (ebx->idMessage == 1)
004df8f5                      {
004df8fb                          int32_t iCurrentChoice_2 = this->m_tChoices[2].iCurrentChoice;
004df901                          int32_t iNumChoices_8 = this->m_tChoices[2].iNumChoices;
004df901                          
004df909                          if (iCurrentChoice_2 >= iNumChoices_8)
004df90b                              this->m_tChoices[2].iCurrentChoice = 0;
004df909                          else if (iCurrentChoice_2 < 0)
004df91c                              this->m_tChoices[2].iCurrentChoice = (iNumChoices_8 - 1);
004df91c                          
004df928                          class ClientCharGenState* eax_42 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df937                          eax_42->noseStrip = this->m_tChoices[2].iCurrentChoice;
004df93d                          gmBarberUI::SetSelection(this, ECG_PARTS_NOSE);
004df8f5                      }
004df8f5                      break;
004df8f5                  }
004df94b                  case 0x100005a1:
004df94b                  {
004df94b                      if (ebx->idMessage == 1)
004df94b                      {
004df951                          int32_t iCurrentChoice_3 = this->m_tChoices[3].iCurrentChoice;
004df957                          int32_t iNumChoices_9 = this->m_tChoices[3].iNumChoices;
004df957                          
004df95f                          if (iCurrentChoice_3 >= iNumChoices_9)
004df961                              this->m_tChoices[3].iCurrentChoice = 0;
004df95f                          else if (iCurrentChoice_3 < 0)
004df972                              this->m_tChoices[3].iCurrentChoice = (iNumChoices_9 - 1);
004df972                          
004df97e                          class ClientCharGenState* eax_44 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df989                          eax_44->mouthStrip = this->m_tChoices[3].iCurrentChoice;
004df993                          gmBarberUI::SetSelection(this, ECG_PARTS_MOUTH);
004df94b                      }
004df94b                      break;
004df94b                  }
004df9a1                  case 0x100005a2:
004df9a1                  {
004df9a1                      if (ebx->idMessage == 1)
004df9a1                      {
004df9a7                          int32_t iCurrentChoice_4 = this->m_tChoices[4].iCurrentChoice;
004df9ad                          int32_t iNumChoices_10 = this->m_tChoices[4].iNumChoices;
004df9ad                          
004df9b5                          if (iCurrentChoice_4 >= iNumChoices_10)
004df9b7                              this->m_tChoices[4].iCurrentChoice = 0;
004df9b5                          else if (iCurrentChoice_4 < 0)
004df9c8                              this->m_tChoices[4].iCurrentChoice = (iNumChoices_10 - 1);
004df9c8                          
004df9d4                          CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df9dd                          gmBarberUI::SetSelection(this, ECG_PARTS_SKIN);
004df9a1                      }
004df9a1                      break;
004df9a1                  }
004df9eb                  case 0x100005a4:
004df9eb                  {
004df9eb                      if (ebx->idMessage == 1)
004df9f5                          gmBarberUI::Rotate(this, ECG_ROTATE_CLOCKWISE);
004df9eb                      break;
004df9eb                  }
004dfa03                  case 0x100005a5:
004dfa03                  {
004dfa03                      if (ebx->idMessage == 1)
004dfa03                      {
004dfa09                          void* eax_36;
004dfa09                          eax_36 = this->m_bRotating;
004dfa09                          
004dfa1e                          if ((eax_36 == 0 || this->m_eRotateDir != ECG_ROTATE_COUNTERCLOCKWISE))
004dfa1e                          {
004dfa2c                              this->m_pRotateClockButton->vtable->SetState(1);
004dfa3c                              this->m_dLastRotateTime = 0f;
004dfa46                              *(uint32_t*)((char*)this->m_dLastRotateTime)[4] = 0xbff00000;
004dfa50                              this->m_eRotateDir = ECG_ROTATE_COUNTERCLOCKWISE;
004dfa56                              this->m_bRotating = 1;
004dfa1e                          }
004dfa1e                          else
004dfa20                              this->m_bRotating = 0;
004dfa03                      }
004dfa03                      break;
004dfa03                  }
004dfb78                  case 0x100005a6:
004dfb78                  {
004dfb78                      if (ebx->idMessage == 1)
004dfb78                      {
004dfb84                          class ClientCharGenState* eax_49 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004dfb8b                          class ACCharGenData* charGenData = eax_49->charGenData;
004dfb97                          class ACCharGenResult* eax_50 = CharGenState::GetCharGenResult(eax_49);
004dfba5                          int32_t var_234_1 = 0;
004dfbad                          CharGenState::GetSetupID(eax_49, &id);
004dfbb5                          uint32_t id_6 = INVALID_DID.id;
004dfbc6                          uint32_t id_1 = id_6;
004dfbca                          uint32_t id_2 = id_6;
004dfbce                          void __return;
004dfbce                          ACCharGenData::GetHG(charGenData, &__return, eax_50->heritageGroup);
004dfbe6                          void __return_1;
004dfbe6                          HeritageGroup_CG::GetSX(&__return, &__return_1, eax_50->gender);
004dfbeb                          uint32_t heritageGroup = eax_50->heritageGroup;
004dfbeb                          
004dfbfb                          if ((heritageGroup != 6 && (heritageGroup != 0xc && heritageGroup != 0xd)))
004dfbfb                          {
004dfc14                              int32_t var_1d8;
004dfc14                              int32_t var_78;
004dfc14                              HairStyle_CG::HairStyle_CG(&var_1d8, ((eax_50->hairStyle * 0x3c) + var_78));
004dfc22                              void var_1c8;
004dfc22                              class TextureMapChange* eax_53 = ObjDesc::GetTextureMapChange(&var_1c8, 0);
004dfc22                              
004dfc29                              if (eax_53 != 0)
004dfc29                              {
004dfc31                                  id_1 = eax_53->new_tex_id.id;
004dfc35                                  id_2 = eax_53->old_tex_id.id;
004dfc29                              }
004dfc29                              
004dfc40                              var_1d8 = 0x79fa80;
004dfc4b                              ObjDesc::~ObjDesc(&var_1c8);
004dfbfb                          }
004dfbfb                          
004dfc59                          if (eax_50->heritageGroup == 9)
004dfc59                          {
004dfc68                              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004dfc6d                              class CPhysicsObj* player;
004dfc6d                              
004dfc6d                              if (this->m_pOption1Checkbox->m_state == 6)
004dfc6d                              {
004dfc71                                  var_234_1 = 1;
004dfc71                                  
004dfc79                                  if (SmartBox::smartbox_1 != 0)
004dfc79                                  {
004dfc7b                                      player = SmartBox::smartbox_1->player;
004dfc7b                                      
004dfc84                                      if (eax_50->gender != 2)
004dfcb4                                          CPhysicsObj::SetMotionTableID(player, EmpyreanMaleMotionDID.id);
004dfc84                                      else
004dfcb4                                          CPhysicsObj::SetMotionTableID(player, EmpyreanFemaleMotionDID.id);
004dfc79                                  }
004dfc6d                              }
004dfc6d                              else if (SmartBox::smartbox_1 != 0)
004dfc98                              {
004dfc9a                                  player = SmartBox::smartbox_1->player;
004dfc9a                                  
004dfca3                                  if (eax_50->gender != 2)
004dfcb4                                      CPhysicsObj::SetMotionTableID(player, EmpyreanMaleFloatMotionDID.id);
004dfca3                                  else
004dfcb4                                      CPhysicsObj::SetMotionTableID(player, EmpyreanFemaleFloatMotionDID.id);
004dfc98                              }
004dfc59                          }
004dfc59                          
004dfcbc                          int32_t eax_56 = 0;
004dfcbc                          
004dfcc1                          if (eax_50->heritageGroup == 0xb)
004dfcc1                          {
004dfcc7                              class IDClass<_tagDataID,32,0> id_8 = id;
004dfccb                              uint32_t id_4 = UNDEAD_FEMALE_ZOMBIE_SETUP.id;
004dfcd3                              uint32_t id_5 = UNDEAD_FEMALE_ZOMBIE_NOFLAME_SETUP.id;
004dfcd9                              uint32_t id_7 = UNDEAD_MALE_ZOMBIE_SETUP.id;
004dfcef                              int32_t eax_57;
004dfcef                              
004dfcef                              if ((((id_8 == id_4 || id_8 == id_5) || id_8 == id_7) || id_8 == UNDEAD_MALE_ZOMBIE_NOFLAME_SETUP.id))
004dfcf5                                  eax_57 = 1;
004dfcef                              else
004dfcf1                                  eax_57 = 0;
004dfcf1                              
004dfd0c                              if (this->m_pOption1Checkbox->m_state != 6)
004dfd0c                              {
004dfd64                                  if (eax_50->gender == 2)
004dfd64                                  {
004dfd68                                      eax_56 = 1;
004dfd68                                      
004dfd6d                                      if (eax_57 == 0)
004dfd6d                                      {
004dfd81                                          id_6 = UNDEAD_FEMALE_SKELETON_PES.id;
004dfd87                                          id = UNDEAD_FEMALE_SKELETON_SETUP.id;
004dfd6d                                      }
004dfd6d                                      else
004dfd6d                                      {
004dfd6f                                          id_6 = UNDEAD_FEMALE_ZOMBIE_PES.id;
004dfd75                                          id = id_4;
004dfd6d                                      }
004dfd64                                  }
004dfd64                                  else if (eax_57 == 0)
004dfd8f                                  {
004dfda8                                      id_6 = UNDEAD_MALE_SKELETON_PES.id;
004dfdae                                      eax_56 = 1;
004dfdb3                                      id = UNDEAD_MALE_SKELETON_SETUP.id;
004dfd8f                                  }
004dfd8f                                  else
004dfd8f                                  {
004dfd91                                      id = id_7;
004dfd95                                      id_6 = UNDEAD_MALE_ZOMBIE_PES.id;
004dfd9b                                      eax_56 = 1;
004dfd8f                                  }
004dfd0c                              }
004dfd0c                              else if (eax_50->gender == 2)
004dfd11                              {
004dfd15                                  eax_56 = 1;
004dfd15                                  
004dfd1a                                  if (eax_57 == 0)
004dfd1a                                  {
004dfd2d                                      id_6 = UNDEAD_FEMALE_SKELETON_NOFLAME_PES.id;
004dfd33                                      id = UNDEAD_FEMALE_SKELETON_NOFLAME_SETUP.id;
004dfd1a                                  }
004dfd1a                                  else
004dfd1a                                  {
004dfd1c                                      id_6 = UNDEAD_FEMALE_ZOMBIE_NOFLAME_PES.id;
004dfdb3                                      id = id_5;
004dfd1a                                  }
004dfd11                              }
004dfd11                              else if (eax_57 == 0)
004dfd3b                              {
004dfd50                                  id_6 = UNDEAD_MALE_SKELETON_NOFLAME_PES.id;
004dfd56                                  id = UNDEAD_MALE_SKELETON_NOFLAME_SETUP.id;
004dfd5a                                  eax_56 = 1;
004dfd3b                              }
004dfd3b                              else
004dfd3b                              {
004dfd43                                  id_6 = UNDEAD_MALE_ZOMBIE_NOFLAME_PES.id;
004dfdae                                  eax_56 = 1;
004dfdb3                                  id = UNDEAD_MALE_ZOMBIE_NOFLAME_SETUP.id;
004dfd3b                              }
004dfcc1                          }
004dfcc1                          
004dfdbb                          if (eax_50->heritageGroup == 5)
004dfdbb                          {
004dfdca                              uint32_t gender = eax_50->gender;
004dfdca                              
004dfdcd                              if (this->m_pOption1Checkbox->m_state == 6)
004dfdcd                              {
004dfdd1                                  eax_56 = 1;
004dfdd1                                  
004dfdd6                                  if (gender != 2)
004dfdd6                                  {
004dfdec                                      id_6 = UMBRAEN_MALE_NOCROWN_PES.id;
004dfdf2                                      id = UMBRAEN_MALE_NOCROWN_SETUP.id;
004dfdd6                                  }
004dfdd6                                  else
004dfdd6                                  {
004dfdde                                      id_6 = UMBRAEN_FEMALE_NOCROWN_PES.id;
004dfe23                                      id = UMBRAEN_FEMALE_NOCROWN_SETUP.id;
004dfdd6                                  }
004dfdcd                              }
004dfdcd                              else if (gender != 2)
004dfdfa                              {
004dfe18                                  id_6 = UMBRAEN_MALE_CROWN_PES.id;
004dfe1e                                  eax_56 = 1;
004dfe23                                  id = UMBRAEN_MALE_CROWN_SETUP.id;
004dfdfa                              }
004dfdfa                              else
004dfdfa                              {
004dfe01                                  id_6 = UMBRAEN_FEMALE_CROWN_PES.id;
004dfe07                                  id = UMBRAEN_FEMALE_CROWN_SETUP.id;
004dfe0b                                  eax_56 = 1;
004dfdfa                              }
004dfdbb                          }
004dfdbb                          
004dfe2b                          if (eax_50->heritageGroup == 0xa)
004dfe2b                          {
004dfe3a                              uint32_t gender_1 = eax_50->gender;
004dfe3a                              
004dfe3d                              if (this->m_pOption1Checkbox->m_state != 6)
004dfe3d                              {
004dfe64                                  if (gender_1 != 2)
004dfe64                                  {
004dfe7d                                      id_6 = PENUMBRAEN_MALE_CROWN_PES.id;
004dfe83                                      id = PENUMBRAEN_MALE_CROWN_SETUP.id;
004dfe64                                  }
004dfe64                                  else
004dfe64                                  {
004dfe6c                                      id_6 = PENUMBRAEN_FEMALE_CROWN_PES.id;
004dfe72                                      id = PENUMBRAEN_FEMALE_CROWN_SETUP.id;
004dfe64                                  }
004dfe3d                              }
004dfe3d                              else if (gender_1 != 2)
004dfe41                              {
004dfe56                                  id_6 = PENUMBRAEN_MALE_NOCROWN_PES.id;
004dfe5c                                  id = PENUMBRAEN_MALE_NOCROWN_SETUP.id;
004dfe41                              }
004dfe41                              else
004dfe41                              {
004dfe48                                  id_6 = PENUMBRAEN_FEMALE_NOCROWN_PES.id;
004dfe83                                  id = PENUMBRAEN_FEMALE_NOCROWN_SETUP.id;
004dfe41                              }
004dfe41                              
004dfe87                              eax_56 = 1;
004dfe2b                          }
004dfe2b                          
004dfe8c                          class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
004dfe8c                          
004dfe94                          if (SmartBox::smartbox_2 != 0)
004dfe94                          {
004dfe98                              if (eax_56 != 0)
004dfea0                                  CPhysicsObj::destroy_particle_manager(SmartBox::smartbox_2->player);
004dfea0                              
004dfeab                              if (id_6 != INVALID_DID.id)
004dfeb4                                  CPhysicsObj::play_script(SmartBox::smartbox_2->player, id_6);
004dfe94                          }
004dfe94                          
004dfebd                          void var_204;
004dfebd                          ObjDesc::ObjDesc(&var_204);
004dfec6                          class IDClass<_tagDataID,32,0> var_230;
004dfec6                          CharAppearanceData::CharAppearanceData(&var_230);
004dfee1                          class IDClass<_tagDataID,32,0> var_22c;
004dfee1                          class IDClass<_tagDataID,32,0> var_228;
004dfee1                          class IDClass<_tagDataID,32,0> var_224;
004dfee1                          class IDClass<_tagDataID,32,0> var_220;
004dfee1                          class IDClass<_tagDataID,32,0> var_21c;
004dfee1                          class IDClass<_tagDataID,32,0> var_218;
004dfee1                          class IDClass<_tagDataID,32,0> var_214;
004dfee1                          class IDClass<_tagDataID,32,0> var_210;
004dfee1                          class IDClass<_tagDataID,32,0> var_20c;
004dfee1                          class IDClass<_tagDataID,32,0> var_208;
004dfee1                          
004dfee1                          if (ACCharGenData::GenerateBaseAppearanceData(charGenData, eax_50, &var_230, &var_204) != 0)
004dff30                              CM_Character::Event_FinishBarber(var_230, var_22c, id_1, id_2, var_228, var_21c, var_224, var_218, var_220, var_214, var_208, var_210, var_20c, id, var_234_1, 0);
004dff38                          this->vtable->SetVisible(0);
004dff45                          ObjDesc::~ObjDesc(&var_204);
004dff51                          Sex_CG::~Sex_CG(&__return_1);
004dff5d                          HeritageGroup_CG::~HeritageGroup_CG(&__return);
004dff62                          ebx = arg2;
004dfb78                      }
004dfb78                      break;
004dfb78                  }
004dff6f                  case 0x100005a7:
004dff6f                  {
004dff6f                      if (ebx->idMessage == 1)
004dff71                          this->vtable->SetVisible(0);
004dff6f                      break;
004dff6f                  }
004dfa66                  case 0x100005c9:
004dfa66                  {
004dfa66                      if (ebx->idMessage == 1)
004dfa66                      {
004dfa72                          class CharGenState* eax_46 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004dfa7b                          class ACCharGenResult* eax_47 = CharGenState::GetCharGenResult(eax_46);
004dfa89                          CharGenState::GetSetupID(eax_46, &id);
004dfaaa                          class IDClass<_tagDataID,32,0> id_3;
004dfaaa                          
004dfaaa                          if ((eax_47->heritageGroup != 0xb || this->m_pOption1Checkbox->m_state != 6))
004dfafd                              id_3 = id;
004dfaaa                          else
004dfaaa                          {
004dfaaf                              id_3 = id;
004dfaaf                              
004dfab3                              if (eax_47->gender != 2)
004dfab3                              {
004dfadf                                  if (id_3 == UNDEAD_MALE_SKELETON_SETUP.id)
004dfadf                                  {
004dfae1                                      id_3 = UNDEAD_MALE_SKELETON_NOFLAME_SETUP.id;
004dfae6                                      id = id_3;
004dfadf                                  }
004dfadf                                  
004dfaf0                                  if (id_3 == UNDEAD_MALE_ZOMBIE_SETUP.id)
004dfaf0                                  {
004dfaf2                                      id_3 = UNDEAD_MALE_ZOMBIE_NOFLAME_SETUP.id;
004dfaf7                                      id = id_3;
004dfaf0                                  }
004dfab3                              }
004dfab3                              else
004dfab3                              {
004dfabb                                  if (id_3 == UNDEAD_FEMALE_SKELETON_SETUP.id)
004dfabb                                  {
004dfabd                                      id_3 = UNDEAD_FEMALE_SKELETON_NOFLAME_SETUP.id;
004dfac2                                      id = id_3;
004dfabb                                  }
004dfabb                                  
004dfacc                                  if (id_3 == UNDEAD_FEMALE_ZOMBIE_SETUP.id)
004dfacc                                  {
004dface                                      id_3 = UNDEAD_FEMALE_ZOMBIE_NOFLAME_SETUP.id;
004dfad3                                      id = id_3;
004dfacc                                  }
004dfab3                              }
004dfaaa                          }
004dfaaa                          
004dfb13                          if ((eax_47->heritageGroup == 5 && this->m_pOption1Checkbox->m_state == 6))
004dfb13                          {
004dfb18                              id_3 = UMBRAEN_FEMALE_NOCROWN_SETUP.id;
004dfb18                              
004dfb1d                              if (eax_47->gender != 2)
004dfb1f                                  id_3 = UMBRAEN_MALE_NOCROWN_SETUP.id;
004dfb1f                              
004dfb24                              id = id_3;
004dfb13                          }
004dfb13                          
004dfb3a                          if ((eax_47->heritageGroup == 0xa && this->m_pOption1Checkbox->m_state == 6))
004dfb3a                          {
004dfb3f                              id_3 = PENUMBRAEN_FEMALE_NOCROWN_SETUP.id;
004dfb3f                              
004dfb44                              if (eax_47->gender != 2)
004dfb46                                  id_3 = PENUMBRAEN_MALE_NOCROWN_SETUP.id;
004dfb46                              
004dfb4b                              id = id_3;
004dfb3a                          }
004dfb3a                          
004dfb55                          if (id_3 != INVALID_DID.id)
004dfb55                          {
004dfb5b                              this->m_p3DView->m_alternateSetupID.id = id_3;
004dfb6a                              gmCG3DView::Update(this->m_p3DView);
004dfb55                          }
004dfa66                      }
004dfa66                      break;
004dfa66                  }
004df830              }
004df279      }
004df279      else if (idElement == 0x10000321)
004df27f      {
004df7a1          if (ebx->idMessage == 0xa)
004df7a1          {
004df7aa              long double x87_r7 = ((long double)ebx->dwParam1);
004df7aa              
004df7af              if (ebx->dwParam1 < 0)
004df7b1                  x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
004df7b1              
004df7b7              long double x87_r7_1 = (x87_r7 * ((long double)0.00100000005f));
004df7bd              long double temp1 = ((long double)1.0);
004df7bd              (x87_r7_1 - temp1);
004df7c3              idElement = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
004df7c8              int32_t var_244;
004df7c8              int32_t __saved_ebp_18;
004df7c8              
004df7c8              if ((*(uint8_t*)((char*)idElement)[1] & 0x41) != 0)
004df7c8              {
004df7de                  long double temp2_1 = ((long double)0.0);
004df7de                  (x87_r7_1 - temp2_1);
004df7e4                  idElement = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
004df7e6                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004df7e6                  
004df7e9                  if (p_1)
004df7ff                      var_244 = ((double)x87_r7_1);
004df7e9                  else
004df7e9                  {
004df7ed                      var_244 = 0;
004df7f5                      __saved_ebp_18 = 0;
004df7e9                  }
004df7c8              }
004df7c8              else
004df7c8              {
004df7cc                  var_244 = 0;
004df7d4                  __saved_ebp_18 = 0x3ff00000;
004df7c8              }
004df7c8              
004df80b              int32_t __saved_ebp_15 = __saved_ebp_18;
004df80f              gmBarberUI::SetShade(this, var_244);
004df817              UIElement::ListenToElementMessage(this, ebx);
004df825              return;
004df7a1          }
004df27f      }
004df27f      else
004df27f      {
004df28d          int32_t edi_2;
004df28d          int32_t edi_8;
004df28d          
004df28d          if ((idElement - 0x1000030a) <= 0xd)
004df28d              switch (idElement)
004df28d              {
004df29e                  case 0x1000030a:
004df29e                  {
004df29e                      if (ebx->idMessage == 1)
004df2c3                          switch ((*(uint32_t*)(ebx->pElement->vtable->GetParent() + 0x2e4) - 0x1000059e))
004df2c3                          {
004df2d0                              case 0:
004df2d0                              {
004df2d0                                  edi_2 = (this->m_tChoices[0].iCurrentChoice - 1);
004df439                              label_4df439:
004df439                                  this->m_tChoices[0].iCurrentChoice = edi_2;
004df43f                                  int32_t iNumChoices_3 = this->m_tChoices[0].iNumChoices;
004df43f                                  
004df449                                  if (edi_2 >= iNumChoices_3)
004df44b                                      this->m_tChoices[0].iCurrentChoice = 0;
004df449                                  else if (edi_2 < 0)
004df45c                                      this->m_tChoices[0].iCurrentChoice = (iNumChoices_3 - 1);
004df45c                                  
004df468                                  class ClientCharGenState* eax_16 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df473                                  eax_16->hairStyle = this->m_tChoices[0].iCurrentChoice;
004df47d                                  gmBarberUI::SetSelection(this, ECG_PARTS_HAIR);
004df485                                  UIElement::ListenToElementMessage(this, ebx);
004df493                                  return;
004df2d0                                  break;
004df2d0                              }
004df2dc                              case 1:
004df2dc                              {
004df2dc                                  int32_t iNumChoices = this->m_tChoices[1].iNumChoices;
004df2e2                                  int32_t edi_4 = (this->m_tChoices[1].iCurrentChoice - 1);
004df2e7                                  this->m_tChoices[1].iCurrentChoice = edi_4;
004df2e7                                  
004df2ed                                  if (edi_4 >= iNumChoices)
004df2ef                                      this->m_tChoices[1].iCurrentChoice = 0;
004df2ed                                  else if (edi_4 < 0)
004df300                                      this->m_tChoices[1].iCurrentChoice = (iNumChoices - 1);
004df300                                  
004df30c                                  class ClientCharGenState* eax_6 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df31b                                  eax_6->eyesStrip = this->m_tChoices[1].iCurrentChoice;
004df321                                  gmBarberUI::SetSelection(this, ECG_PARTS_EYES);
004df329                                  UIElement::ListenToElementMessage(this, ebx);
004df337                                  return;
004df2dc                                  break;
004df2dc                              }
004df340                              case 2:
004df340                              {
004df340                                  int32_t iNumChoices_1 = this->m_tChoices[2].iNumChoices;
004df346                                  int32_t edi_6 = (this->m_tChoices[2].iCurrentChoice - 1);
004df34b                                  this->m_tChoices[2].iCurrentChoice = edi_6;
004df34b                                  
004df351                                  if (edi_6 >= iNumChoices_1)
004df353                                      this->m_tChoices[2].iCurrentChoice = 0;
004df351                                  else if (edi_6 < 0)
004df364                                      this->m_tChoices[2].iCurrentChoice = (iNumChoices_1 - 1);
004df364                                  
004df370                                  class ClientCharGenState* eax_8 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df37b                                  eax_8->noseStrip = this->m_tChoices[2].iCurrentChoice;
004df385                                  gmBarberUI::SetSelection(this, ECG_PARTS_NOSE);
004df38d                                  UIElement::ListenToElementMessage(this, ebx);
004df39b                                  return;
004df340                                  break;
004df340                              }
004df3a4                              case 3:
004df3a4                              {
004df3a4                                  edi_8 = (this->m_tChoices[3].iCurrentChoice - 1);
004df3a5                              label_4df3a5:
004df3a5                                  this->m_tChoices[3].iCurrentChoice = edi_8;
004df3ab                                  int32_t iNumChoices_2 = this->m_tChoices[3].iNumChoices;
004df3ab                                  
004df3b5                                  if (edi_8 >= iNumChoices_2)
004df3b7                                      this->m_tChoices[3].iCurrentChoice = 0;
004df3b5                                  else if (edi_8 < 0)
004df3c8                                      this->m_tChoices[3].iCurrentChoice = (iNumChoices_2 - 1);
004df3c8                                  
004df3d4                                  class ClientCharGenState* eax_10 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df3e3                                  eax_10->mouthStrip = this->m_tChoices[3].iCurrentChoice;
004df3e9                                  gmBarberUI::SetSelection(this, ECG_PARTS_MOUTH);
004df3f1                                  UIElement::ListenToElementMessage(this, ebx);
004df3ff                                  return;
004df3a4                                  break;
004df3a4                              }
004df2c3                          }
004df29e                      break;
004df29e                  }
004df406                  case 0x1000030b:
004df406                  {
004df406                      if (ebx->idMessage == 1)
004df42b                          switch ((*(uint32_t*)(ebx->pElement->vtable->GetParent() + 0x2e4) - 0x1000059e))
004df42b                          {
004df438                              case 0:
004df438                              {
004df438                                  edi_2 = (this->m_tChoices[0].iCurrentChoice + 1);
004df438                                  goto label_4df439;
004df438                              }
004df49c                              case 1:
004df49c                              {
004df49c                                  int32_t iNumChoices_4 = this->m_tChoices[1].iNumChoices;
004df4a2                                  int32_t edi_11 = (this->m_tChoices[1].iCurrentChoice + 1);
004df4a7                                  this->m_tChoices[1].iCurrentChoice = edi_11;
004df4a7                                  
004df4ad                                  if (edi_11 >= iNumChoices_4)
004df4af                                      this->m_tChoices[1].iCurrentChoice = 0;
004df4ad                                  else if (edi_11 < 0)
004df4c0                                      this->m_tChoices[1].iCurrentChoice = (iNumChoices_4 - 1);
004df4c0                                  
004df4cc                                  class ClientCharGenState* eax_18 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df4db                                  eax_18->eyesStrip = this->m_tChoices[1].iCurrentChoice;
004df4e1                                  gmBarberUI::SetSelection(this, ECG_PARTS_EYES);
004df4e9                                  UIElement::ListenToElementMessage(this, ebx);
004df4f7                                  return;
004df49c                                  break;
004df49c                              }
004df500                              case 2:
004df500                              {
004df500                                  int32_t iNumChoices_5 = this->m_tChoices[2].iNumChoices;
004df506                                  int32_t edi_13 = (this->m_tChoices[2].iCurrentChoice + 1);
004df50b                                  this->m_tChoices[2].iCurrentChoice = edi_13;
004df50b                                  
004df511                                  if (edi_13 >= iNumChoices_5)
004df513                                      this->m_tChoices[2].iCurrentChoice = 0;
004df511                                  else if (edi_13 < 0)
004df524                                      this->m_tChoices[2].iCurrentChoice = (iNumChoices_5 - 1);
004df524                                  
004df530                                  class ClientCharGenState* eax_20 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004df53b                                  eax_20->noseStrip = this->m_tChoices[2].iCurrentChoice;
004df545                                  gmBarberUI::SetSelection(this, ECG_PARTS_NOSE);
004df54d                                  UIElement::ListenToElementMessage(this, ebx);
004df55b                                  return;
004df500                                  break;
004df500                              }
004df564                              case 3:
004df564                              {
004df564                                  edi_8 = (this->m_tChoices[3].iCurrentChoice + 1);
004df565                                  goto label_4df3a5;
004df564                              }
004df42b                          }
004df406                      break;
004df406                  }
004df56e                  case 0x1000030f:
004df56e                  {
004df56e                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 0))
004df56e                      {
004df590                          gmBarberUI::SetColor(this, 0);
004df598                          UIElement::ListenToElementMessage(this, ebx);
004df5a6                          return;
004df56e                      }
004df56e                      break;
004df56e                  }
004df5b3                  case 0x10000310:
004df5b3                  {
004df5b3                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 1))
004df5b3                      {
004df5d2                          gmBarberUI::SetColor(this, 1);
004df5da                          UIElement::ListenToElementMessage(this, ebx);
004df5e8                          return;
004df5b3                      }
004df5b3                      break;
004df5b3                  }
004df5ef                  case 0x10000311:
004df5ef                  {
004df5ef                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 2))
004df5ef                      {
004df610                          gmBarberUI::SetColor(this, 2);
004df618                          UIElement::ListenToElementMessage(this, ebx);
004df626                          return;
004df5ef                      }
004df5ef                      break;
004df5ef                  }
004df62d                  case 0x10000312:
004df62d                  {
004df62d                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 3))
004df62d                      {
004df64e                          gmBarberUI::SetColor(this, 3);
004df656                          UIElement::ListenToElementMessage(this, ebx);
004df664                          return;
004df62d                      }
004df62d                      break;
004df62d                  }
004df66b                  case 0x10000313:
004df66b                  {
004df66b                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 4))
004df66b                      {
004df68c                          gmBarberUI::SetColor(this, 4);
004df694                          UIElement::ListenToElementMessage(this, ebx);
004df6a2                          return;
004df66b                      }
004df66b                      break;
004df66b                  }
004df6a9                  case 0x10000314:
004df6a9                  {
004df6a9                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 5))
004df6a9                      {
004df6ca                          gmBarberUI::SetColor(this, 5);
004df6d2                          UIElement::ListenToElementMessage(this, ebx);
004df6e0                          return;
004df6a9                      }
004df6a9                      break;
004df6a9                  }
004df6e7                  case 0x10000315:
004df6e7                  {
004df6e7                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 6))
004df6e7                      {
004df708                          gmBarberUI::SetColor(this, 6);
004df710                          UIElement::ListenToElementMessage(this, ebx);
004df71e                          return;
004df6e7                      }
004df6e7                      break;
004df6e7                  }
004df725                  case 0x10000316:
004df725                  {
004df725                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 7))
004df725                      {
004df746                          gmBarberUI::SetColor(this, 7);
004df74e                          UIElement::ListenToElementMessage(this, ebx);
004df75c                          return;
004df725                      }
004df725                      break;
004df725                  }
004df763                  case 0x10000317:
004df763                  {
004df763                      if ((ebx->idMessage == 1 && &*(uint32_t*)((char*)this->m_tChoices[0])[8][(this->m_iPartIndex * 6)] > 8))
004df763                      {
004df784                          gmBarberUI::SetColor(this, 8);
004df78c                          UIElement::ListenToElementMessage(this, ebx);
004df79a                          return;
004df763                      }
004df763                      break;
004df763                  }
004df28d              }
004df27f      }
004df27f      
004dff7e      UIElement::ListenToElementMessage(this, ebx);
004df260  }

004dff8f                                               90                                                                 .
004dff90  uint32_t jump_table_4dff90[0xe] = 
004dff90  {
004dff90      [0x0] =  0x004df29a
004dff94      [0x1] =  0x004df402
004dff98      [0x2] =  0x004dff7b
004dff9c      [0x3] =  0x004dff7b
004dffa0      [0x4] =  0x004dff7b
004dffa4      [0x5] =  0x004df56a
004dffa8      [0x6] =  0x004df5a9
004dffac      [0x7] =  0x004df5eb
004dffb0      [0x8] =  0x004df629
004dffb4      [0x9] =  0x004df667
004dffb8      [0xa] =  0x004df6a5
004dffbc      [0xb] =  0x004df6e3
004dffc0      [0xc] =  0x004df721
004dffc4      [0xd] =  0x004df75f
004dffc8  }
004dffc8  uint32_t jump_table_4dffc8[0x4] = 
004dffc8  {
004dffc8      [0x0] =  0x004df2ca
004dffcc      [0x1] =  0x004df2d6
004dffd0      [0x2] =  0x004df33a
004dffd4      [0x3] =  0x004df39e
004dffd8  }
004dffd8  uint32_t jump_table_4dffd8[0x4] = 
004dffd8  {
004dffd8      [0x0] =  0x004df432
004dffdc      [0x1] =  0x004df496
004dffe0      [0x2] =  0x004df4fa
004dffe4      [0x3] =  0x004df55e
004dffe8  }
004dffe8  uint32_t jump_table_4dffe8[0xb] = 
004dffe8  {
004dffe8      [0x0] =  0x004df845
004dffec      [0x1] =  0x004df89b
004dfff0      [0x2] =  0x004df8f1
004dfff4      [0x3] =  0x004df947
004dfff8      [0x4] =  0x004df99d
004dfffc      [0x5] =  0x004df9e7
004e0000      [0x6] =  0x004df9ff
004e0004      [0x7] =  0x004dfb74
004e0008      [0x8] =  0x004dff6b
004e000c      [0x9] =  0x004dfa62
004e0010      [0xa] =  0x004dff7a
004e0014  }
004e0014  uint8_t lookup_table_4e0014[0x2c] = 
004e0014  {
004e0014      [0x00] =  0x00
004e0015      [0x01] =  0x01
004e0016      [0x02] =  0x02
004e0017      [0x03] =  0x03
004e0018      [0x04] =  0x04
004e0019      [0x05] =  0x0a
004e001a      [0x06] =  0x05
004e001b      [0x07] =  0x06
004e001c      [0x08] =  0x07
004e001d      [0x09] =  0x08
004e001e      [0x0a] =  0x0a
004e001f      [0x0b] =  0x0a
004e0020      [0x0c] =  0x0a
004e0021      [0x0d] =  0x0a
004e0022      [0x0e] =  0x0a
004e0023      [0x0f] =  0x0a
004e0024      [0x10] =  0x0a
004e0025      [0x11] =  0x0a
004e0026      [0x12] =  0x0a
004e0027      [0x13] =  0x0a
004e0028      [0x14] =  0x0a
004e0029      [0x15] =  0x0a
004e002a      [0x16] =  0x0a
004e002b      [0x17] =  0x0a
004e002c      [0x18] =  0x0a
004e002d      [0x19] =  0x0a
004e002e      [0x1a] =  0x0a
004e002f      [0x1b] =  0x0a
004e0030      [0x1c] =  0x0a
004e0031      [0x1d] =  0x0a
004e0032      [0x1e] =  0x0a
004e0033      [0x1f] =  0x0a
004e0034      [0x20] =  0x0a
004e0035      [0x21] =  0x0a
004e0036      [0x22] =  0x0a
004e0037      [0x23] =  0x0a
004e0038      [0x24] =  0x0a
004e0039      [0x25] =  0x0a
004e003a      [0x26] =  0x0a
004e003b      [0x27] =  0x0a
004e003c      [0x28] =  0x0a
004e003d      [0x29] =  0x0a
004e003e      [0x2a] =  0x0a
004e003f      [0x2b] =  0x09
004e0040  }

004e0040  void __thiscall gmBarberUI::InitializePage(class gmBarberUI* this, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3, class IDClass<_tagDataID,32,0> arg4, class IDClass<_tagDataID,32,0> arg5, class IDClass<_tagDataID,32,0> arg6, class IDClass<_tagDataID,32,0> arg7, class IDClass<_tagDataID,32,0> arg8, class IDClass<_tagDataID,32,0> arg9, class IDClass<_tagDataID,32,0> arg10, class IDClass<_tagDataID,32,0> arg11, class IDClass<_tagDataID,32,0> arg12, class IDClass<_tagDataID,32,0> arg13, class IDClass<_tagDataID,32,0> arg14, class IDClass<_tagDataID,32,0> arg15, int32_t arg16, int32_t arg17)

004e0040  {
004e0046      uint32_t ebx;
004e0046      uint32_t var_200 = ebx;
004e0047      int32_t ebp;
004e0047      int32_t var_204 = ebp;
004e0048      int32_t esi;
004e0048      int32_t var_208 = esi;
004e0049      struct Turbine_GUID* edi;
004e0049      struct Turbine_GUID* var_20c = edi;
004e004c      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
004e0053      this->m_pPlayerSystem = eax;
004e0059      class ClientCharGenState* eax_1 = CPlayerSystem::GetCharGenState(eax);
004e0066      uint8_t var_210 = 1;
004e006e      class ACCharGenData* charGenData = eax_1->charGenData;
004e0072      CharGenState::RandomizeCharacter(eax_1, var_210);
004e007b      CharGenState::SetHeadgearStyle(eax_1, 0xffffffff);
004e0089      struct Turbine_GUID* var_214 = &PlayerDesc_ClassType;
004e008e      int32_t ebp_1 = 0;
004e0091      struct Turbine_GUID* var_1fc = nullptr;
004e009c      void __return;
004e009c      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_214, &var_1fc);
004e00a1      struct Turbine_GUID* ecx_4 = var_1fc;
004e00aa      var_214 = ecx_4;
004e00ac      int32_t var_210_3 = 0;
004e00af      struct Turbine_GUID* eax_4 = var_214;
004e00b5      uint32_t id = 0;
004e00b9      class ACCharGenData* var_1c0 = nullptr;
004e00b9      
004e00bd      if (eax_4 != 0)
004e00c3          *(uint32_t*)(eax_4->m_data1 + 0x10)();
004e00c3      
004e00cf      void var_1c8;
004e00cf      InterfacePtr<class PlayerDesc>::_QueryInterface(&id, &var_1c8);
004e00cf      
004e00d6      if (ecx_4 != 0)
004e00dc          *(uint32_t*)(ecx_4->m_data1 + 0x14)();
004e00dc      
004e00e3      int32_t var_218_2 = 0;
004e00e4      int32_t var_21c = 0;
004e00ed      int32_t var_224 = 0x71;
004e00f1      var_1fc = nullptr;
004e00f5      CBaseQualities::InqInt(&eax_1->charGenResult.footwearStyle, 0x71, &var_1fc, 0, 0);
004e0101      CharGenState::SetGender(eax_1, var_1fc);
004e0106      int32_t var_218_4 = 0;
004e0107      int32_t var_21c_1 = 0;
004e010d      int32_t var_224_1 = 0xbc;
004e0114      var_200 = 0;
004e0118      CBaseQualities::InqInt(&eax_1->charGenResult.footwearStyle, 0xbc, &var_200, 0, 0);
004e0124      CharGenState::SetHeritageGroup(eax_1, var_200);
004e0134      id = INVALID_DID.id;
004e0138      int32_t var_21c_2 = 6;
004e013c      CBaseQualities::InqDataID(&eax_1->charGenResult.footwearStyle, 6, &id);
004e0141      int32_t var_218_7 = 0x1000059e;
004e0148      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x1000059e);
004e014f      class UIElement_Button* eax_7;
004e014f      
004e014f      if (eax_6 == 0)
004e015f          eax_7 = nullptr;
004e014f      else
004e014f      {
004e0153          int32_t var_218_8 = 1;
004e0157          eax_7 = eax_6->vtable->DynamicCast(1);
004e014f      }
004e014f      
004e0161      int32_t var_218_9 = 0x1000059f;
004e0168      this->m_pHairSpin = eax_7;
004e016e      this->m_pCurSelection = eax_7;
004e0174      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x1000059f);
004e017b      class UIElement_Button* eax_9;
004e017b      
004e017b      if (eax_8 == 0)
004e018b          eax_9 = nullptr;
004e017b      else
004e017b      {
004e017f          int32_t var_218_10 = 1;
004e0183          eax_9 = eax_8->vtable->DynamicCast(1);
004e017b      }
004e017b      
004e018d      int32_t var_218_11 = 0x100005a0;
004e0194      this->m_pEyesSpin = eax_9;
004e019a      class UIElement* eax_10 = UIElement::GetChildRecursive(this, 0x100005a0);
004e01a1      class UIElement_Button* eax_11;
004e01a1      
004e01a1      if (eax_10 == 0)
004e01b1          eax_11 = nullptr;
004e01a1      else
004e01a1      {
004e01a5          int32_t var_218_12 = 1;
004e01a9          eax_11 = eax_10->vtable->DynamicCast(1);
004e01a1      }
004e01a1      
004e01b3      int32_t var_218_13 = 0x100005a1;
004e01ba      this->m_pNoseSpin = eax_11;
004e01c0      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x100005a1);
004e01c7      class UIElement_Button* eax_13;
004e01c7      
004e01c7      if (eax_12 == 0)
004e01d7          eax_13 = nullptr;
004e01c7      else
004e01c7      {
004e01cb          int32_t var_218_14 = 1;
004e01cf          eax_13 = eax_12->vtable->DynamicCast(1);
004e01c7      }
004e01c7      
004e01d9      int32_t var_218_15 = 0x100005a2;
004e01e0      this->m_pMouthSpin = eax_13;
004e01e6      class UIElement* eax_14 = UIElement::GetChildRecursive(this, 0x100005a2);
004e01ed      class UIElement_Button* eax_15;
004e01ed      
004e01ed      if (eax_14 == 0)
004e01fd          eax_15 = nullptr;
004e01ed      else
004e01ed      {
004e01f1          int32_t var_218_16 = 1;
004e01f5          eax_15 = eax_14->vtable->DynamicCast(1);
004e01ed      }
004e01ed      
004e0201      this->m_pSkinSpin = eax_15;
004e0201      
004e0207      if (eax_15 != 0)
004e0207      {
004e0209          int32_t var_218_17 = 0x1000030a;
004e0210          class UIElement* eax_16 = UIElement::GetChildRecursive(eax_15, 0x1000030a);
004e0210          
004e0217          if (eax_16 != 0)
004e0217          {
004e0219              int32_t var_218_18 = 1;
004e021b              int32_t var_21c_3 = 0xd;
004e021f              UIElement::SetAttribute_Bool(eax_16, 0xd, 1);
004e0217          }
004e0217          
004e022a          int32_t var_218_19 = 0x1000030b;
004e022f          class UIElement* eax_17 = UIElement::GetChildRecursive(this->m_pSkinSpin, 0x1000030b);
004e022f          
004e0236          if (eax_17 != 0)
004e0236          {
004e0238              int32_t var_218_20 = 1;
004e023a              int32_t var_21c_4 = 0xd;
004e023e              UIElement::SetAttribute_Bool(eax_17, 0xd, 1);
004e0236          }
004e0207      }
004e0207      
004e0243      int32_t var_218_21 = 0x1000059d;
004e024f      uint32_t var_1d0;
004e024f      uint32_t edi_2 = var_1d0;
004e0253      uint32_t ebx_4 = var_1d0;
004e0257      this->m_pFaceChoices = UIElement::GetChildRecursive(this, 0x1000059d);
004e025d      int32_t var_204_1 = 0;
004e025d      
004e026a      while (true)
004e026a      {
004e026c          switch (ebp_1)
004e026c          {
004e0273              case 0:
004e0273              {
004e0273                  edi_2 = 0x1000030f;
004e0278                  ebx_4 = 0x10000318;
004e0273                  break;
004e0273              }
004e027f              case 1:
004e027f              {
004e027f                  edi_2 = 0x10000310;
004e0284                  ebx_4 = 0x10000319;
004e027f                  break;
004e027f              }
004e028b              case 2:
004e028b              {
004e028b                  edi_2 = 0x10000311;
004e0290                  ebx_4 = 0x1000031a;
004e028b                  break;
004e028b              }
004e0297              case 3:
004e0297              {
004e0297                  edi_2 = 0x10000312;
004e029c                  ebx_4 = 0x1000031b;
004e0297                  break;
004e0297              }
004e02a3              case 4:
004e02a3              {
004e02a3                  edi_2 = 0x10000313;
004e02a8                  ebx_4 = 0x1000031c;
004e02a3                  break;
004e02a3              }
004e02af              case 5:
004e02af              {
004e02af                  edi_2 = 0x10000314;
004e02b4                  ebx_4 = 0x1000031d;
004e02af                  break;
004e02af              }
004e02bb              case 6:
004e02bb              {
004e02bb                  edi_2 = 0x10000315;
004e02c0                  ebx_4 = 0x1000031e;
004e02bb                  break;
004e02bb              }
004e02c7              case 7:
004e02c7              {
004e02c7                  edi_2 = 0x10000316;
004e02cc                  ebx_4 = 0x1000031f;
004e02c7                  break;
004e02c7              }
004e02d3              case 8:
004e02d3              {
004e02d3                  edi_2 = 0x10000317;
004e02d8                  ebx_4 = 0x10000320;
004e02d3                  break;
004e02d3              }
004e026c          }
004e026c          
004e02e7          void* ebp_2 = ((var_204_1 * 0x1c) + this);
004e02f2          *(uint32_t*)((char*)ebp_2 + 0x778) = UIElement::GetChildRecursive(this, edi_2);
004e02fd          *(uint32_t*)((char*)ebp_2 + 0x77c) = UIElement::GetChildRecursive(this, ebx_4);
004e0308          bool cond:2_1 = (var_204_1 + 1) < 9;
004e030b          var_204_1 += 1;
004e030b          
004e030f          if (!(cond:2_1))
004e030f              break;
004e030f          
004e0263          ebp_1 = var_204_1;
004e026a      }
004e026a      
004e0315      int32_t var_218_24 = 0x1000030e;
004e0321      int32_t var_218_25 = 0x10000321;
004e0328      this->m_pGradCircle = UIElement::GetChildRecursive(this, 0x1000030e);
004e032e      class UIElement* eax_26 = UIElement::GetChildRecursive(this, 0x10000321);
004e0335      class UIElement_Scrollbar* eax_27;
004e0335      
004e0335      if (eax_26 == 0)
004e0345          eax_27 = nullptr;
004e0335      else
004e0335      {
004e0339          int32_t var_218_26 = 0xb;
004e033d          eax_27 = eax_26->vtable->DynamicCast(0xb);
004e0335      }
004e0335      
004e0347      int32_t var_218_27 = 0x1000059b;
004e034e      this->m_pShadeScroll = eax_27;
004e0354      class UIElement* eax_28 = UIElement::GetChildRecursive(this, 0x1000059b);
004e035b      class UIElement_Viewport* eax_29;
004e035b      
004e035b      if (eax_28 == 0)
004e036b          eax_29 = nullptr;
004e035b      else
004e035b      {
004e035f          int32_t var_218_28 = 0xd;
004e0363          eax_29 = eax_28->vtable->DynamicCast(0xd);
004e035b      }
004e035b      
004e036d      int32_t var_218_29 = 0x60;
004e036f      this->m_pViewport = eax_29;
004e0375      void* eax_30;
004e0375      class UIElement_Viewport* edx_10;
004e0375      eax_30 = operator new(0x60);
004e037f      class gmCG3DView* eax_31;
004e037f      
004e037f      if (eax_30 == 0)
004e038a          eax_31 = nullptr;
004e037f      else
004e0383          eax_31 = gmCG3DView::gmCG3DView(eax_30);
004e0383      
004e0392      class UIElement_Viewport* m_pViewport = this->m_pViewport;
004e0395      this->m_p3DView = eax_31;
004e039b      gmCG3DView::Initialize(eax_31, edx_10);
004e03a0      class gmCG3DView* m_p3DView = this->m_p3DView;
004e03a6      int32_t var_218_30 = 0x43340000;
004e03ab      this->m_fCurHeading = 180f;
004e03b5      gmCG3DView::SetPlayerHeading(m_p3DView, 180f);
004e03ba      class gmCG3DView* m_p3DView_1 = this->m_p3DView;
004e03ca      int32_t var_1e0 = 0;
004e03d2      int32_t var_1dc = 0;
004e03da      int32_t var_1d8 = 0;
004e03e2      int32_t var_1f4 = 0;
004e03ea      int32_t var_1f0 = 0xbf266666;
004e03f2      int32_t var_1ec = 0x3fd9999a;
004e03fa      gmCG3DView::SetCamera(m_p3DView_1, &var_1f4, &var_1e0);
004e03ff      class gmCG3DView* m_p3DView_4 = this->m_p3DView;
004e040a      int32_t var_21c_6 = 0x40000000;
004e040f      var_1f4 = 0x3e99999a;
004e0417      int32_t var_1f0_1 = 0x3ff33333;
004e041f      int32_t var_1ec_1;
004e041f      __builtin_strncpy(&var_1ec_1, "ff&?", 4);
004e042a      int32_t var_220_2 = 1;
004e042c      UIElement_Viewport::SetLight(m_p3DView_4->m_pViewport, DISTANT_LIGHT, 2f, &var_1f4);
004e0440      CreatureMode::UseSharpMode(&this->m_p3DView->m_pViewport->creature_mode_objects);
004e0449      class CharGenState* var_1d4;
004e0449      uint32_t mHeritageGroup = var_1d4->mHeritageGroup;
004e0452      void var_128;
004e0452      void var_98;
004e0452      
004e0452      if (mHeritageGroup == 6)
004e0452      {
004e0458          class gmCG3DView* m_p3DView_2 = this->m_p3DView;
004e0468          var_1f4 = 0;
004e0470          int32_t var_1f0_2 = 0;
004e0478          int32_t var_1ec_2 = 0;
004e0480          var_1e0 = 0;
004e0488          int32_t var_1dc_1 = 0xbf4ccccd;
004e0490          int32_t var_1d8_1 = 0x3fc00000;
004e0498          gmCG3DView::SetCamera(m_p3DView_2, &var_1e0, &var_1f4);
004e04a5          int32_t var_218_34 = 0;
004e049d          this->m_pNoseSpin->vtable->SetVisible(0);
004e04b2          int32_t var_218_35 = 0;
004e04aa          this->m_pMouthSpin->vtable->SetVisible(0);
004e04bb          StringInfo::StringInfo(&charGenData);
004e04c7          StringInfo::StringInfo(&var_128);
004e04d3          StringInfo::StringInfo(&var_98);
004e04d8          int32_t var_218_36 = 0x10000002;
004e04dd          char const* const var_21c_8 = "ID_CharGen_GearText_HairButton";
004e04ef          StringInfo::SetStringIDandTableEnum(&charGenData, compute_str_hash("ID_CharGen_GearText_HairButton"), 0x10000002);
004e04f4          int32_t var_218_37 = 1;
004e04f6          int32_t var_21c_10 = 0;
004e0503          UIElement_Text::SetStringInfoWithFont(this->m_pHairSpin, &charGenData, 0, 1);
004e0508          int32_t var_218_38 = 0x10000002;
004e050d          char const* const var_21c_11 = "ID_CharGen_GearText_EyesButton";
004e0522          StringInfo::SetStringIDandTableEnum(&var_98, compute_str_hash("ID_CharGen_GearText_EyesButton"), 0x10000002);
004e052d          int32_t var_218_39 = 1;
004e052f          int32_t var_21c_13 = 0;
004e0539          UIElement_Text::SetStringInfoWithFont(this->m_pEyesSpin, &var_98, 0, 1);
004e053e          class UIElement_Button* m_pEyesSpin = this->m_pEyesSpin;
004e053e          
004e0546          if (m_pEyesSpin != 0)
004e0546          {
004e0548              int32_t var_218_40 = 0x1000030a;
004e054d              class UIElement* eax_36 = UIElement::GetChildRecursive(m_pEyesSpin, 0x1000030a);
004e054d              
004e0554              if (eax_36 != 0)
004e0554              {
004e0556                  int32_t var_218_41 = 1;
004e0558                  int32_t var_21c_14 = 0xd;
004e055c                  UIElement::SetAttribute_Bool(eax_36, 0xd, 1);
004e0554              }
004e0554              
004e0567              int32_t var_218_42 = 0x1000030b;
004e056c              class UIElement* eax_37 = UIElement::GetChildRecursive(this->m_pEyesSpin, 0x1000030b);
004e056c              
004e0573              if (eax_37 != 0)
004e0573              {
004e0575                  int32_t var_218_43 = 1;
004e0577                  int32_t var_21c_15 = 0xd;
004e057b                  UIElement::SetAttribute_Bool(eax_37, 0xd, 1);
004e0573              }
004e0546          }
004e0546          
004e0588          int32_t var_218_44 = 0x58;
004e058a          int32_t var_21c_16 = 0;
004e0580          this->m_pSkinSpin->vtable->MoveTo(0, 0x58);
004e058f          int32_t var_218_45 = 0x10000002;
004e0594          char const* const var_21c_17 = "ID_CharGen_GearText_SkinButton";
004e05a9          StringInfo::SetStringIDandTableEnum(&var_128, compute_str_hash("ID_CharGen_GearText_SkinButton"), 0x10000002);
004e05ae          int32_t var_218_46 = 1;
004e05b0          int32_t var_21c_19 = 0;
004e05c0          UIElement_Text::SetStringInfoWithFont(this->m_pSkinSpin, &var_128, 0, 1);
004e05cc          StringInfo::~StringInfo(&var_98);
004e05d8          StringInfo::~StringInfo(&var_128);
004e077d          StringInfo::~StringInfo(&charGenData);
004e0452      }
004e0452      else if ((mHeritageGroup == 0xc || mHeritageGroup == 0xd))
004e05ee      {
004e05f4          class gmCG3DView* m_p3DView_3 = this->m_p3DView;
004e0604          var_1f4 = 0;
004e060c          int32_t var_1f0_3 = 0;
004e0614          int32_t var_1ec_3 = 0;
004e061c          var_1e0 = 0;
004e0624          int32_t var_1dc_2 = 0xbf4ccccd;
004e062c          int32_t var_1d8_2 = 0x3fc00000;
004e0634          gmCG3DView::SetCamera(m_p3DView_3, &var_1e0, &var_1f4);
004e0641          int32_t var_218_48 = 0;
004e0639          this->m_pNoseSpin->vtable->SetVisible(0);
004e064e          int32_t var_218_49 = 0;
004e0646          this->m_pMouthSpin->vtable->SetVisible(0);
004e065a          StringInfo::StringInfo(&var_98);
004e0666          StringInfo::StringInfo(&var_128);
004e066f          StringInfo::StringInfo(&charGenData);
004e0674          int32_t var_218_50 = 0x10000002;
004e0679          char const* const var_21c_21 = "ID_CharGen_OlthoiText_HairButton";
004e068e          StringInfo::SetStringIDandTableEnum(&var_98, compute_str_hash("ID_CharGen_OlthoiText_HairButton"), 0x10000002);
004e0693          int32_t var_218_51 = 1;
004e0695          int32_t var_21c_23 = 0;
004e06a5          UIElement_Text::SetStringInfoWithFont(this->m_pHairSpin, &var_98, 0, 1);
004e06aa          int32_t var_218_52 = 0x10000002;
004e06af          char const* const var_21c_24 = "ID_CharGen_OlthoiText_EyesButton";
004e06c1          StringInfo::SetStringIDandTableEnum(&charGenData, compute_str_hash("ID_CharGen_OlthoiText_EyesButton"), 0x10000002);
004e06cc          int32_t var_218_53 = 1;
004e06ce          int32_t var_21c_26 = 0;
004e06d5          UIElement_Text::SetStringInfoWithFont(this->m_pEyesSpin, &charGenData, 0, 1);
004e06da          class UIElement_Button* m_pEyesSpin_1 = this->m_pEyesSpin;
004e06da          
004e06e2          if (m_pEyesSpin_1 != 0)
004e06e2          {
004e06e4              int32_t var_218_54 = 0x1000030a;
004e06e9              class UIElement* eax_43 = UIElement::GetChildRecursive(m_pEyesSpin_1, 0x1000030a);
004e06e9              
004e06f0              if (eax_43 != 0)
004e06f0              {
004e06f2                  int32_t var_218_55 = 1;
004e06f4                  int32_t var_21c_27 = 0xd;
004e06f8                  UIElement::SetAttribute_Bool(eax_43, 0xd, 1);
004e06f0              }
004e06f0              
004e0703              int32_t var_218_56 = 0x1000030b;
004e0708              class UIElement* eax_44 = UIElement::GetChildRecursive(this->m_pEyesSpin, 0x1000030b);
004e0708              
004e070f              if (eax_44 != 0)
004e070f              {
004e0711                  int32_t var_218_57 = 1;
004e0713                  int32_t var_21c_28 = 0xd;
004e0717                  UIElement::SetAttribute_Bool(eax_44, 0xd, 1);
004e070f              }
004e06e2          }
004e06e2          
004e0724          int32_t var_218_58 = 0x58;
004e0726          int32_t var_21c_29 = 0;
004e071c          this->m_pSkinSpin->vtable->MoveTo(0, 0x58);
004e072b          int32_t var_218_59 = 0x10000002;
004e0730          char const* const var_21c_30 = "ID_CharGen_OlthoiText_SkinButton";
004e0745          StringInfo::SetStringIDandTableEnum(&var_128, compute_str_hash("ID_CharGen_OlthoiText_SkinButton"), 0x10000002);
004e074a          int32_t var_218_60 = 1;
004e074c          int32_t var_21c_32 = 0;
004e075c          UIElement_Text::SetStringInfoWithFont(this->m_pSkinSpin, &var_128, 0, 1);
004e0765          StringInfo::~StringInfo(&charGenData);
004e0771          StringInfo::~StringInfo(&var_128);
004e077d          StringInfo::~StringInfo(&var_98);
004e05ee      }
004e0784      gmBarberUI::SetupParts(this);
004e07a8      int32_t ebx_5 = 0;
004e07a8      
004e07c7      if ((((arg13 == UNDEAD_MALE_SKELETON_SETUP.id || arg13 == UNDEAD_MALE_SKELETON_NOFLAME_SETUP.id) || arg13 == UNDEAD_FEMALE_SKELETON_SETUP.id) || arg13 == UNDEAD_FEMALE_SKELETON_NOFLAME_SETUP.id))
004e07c9          ebx_5 = 1;
004e07c9      
004e07df      uint32_t eax_48;
004e07df      eax_48 = arg2 == BALD_TEXTURE.id != 0;
004e07e2      var_204_1 = eax_48;
004e07f0      uint32_t eax_50 = ACCharGenData::GetHairIndexFromID(var_1c0, var_200, var_1fc, __return_addr, eax_48);
004e07f5      this->m_tChoices[0].iCurrentChoice = eax_50;
004e07fb      int32_t iNumChoices = this->m_tChoices[0].iNumChoices;
004e07fb      
004e0803      if (eax_50 >= iNumChoices)
004e0805          this->m_tChoices[0].iCurrentChoice = 0;
004e0803      else if (eax_50 < 0)
004e0816          this->m_tChoices[0].iCurrentChoice = (iNumChoices - 1);
004e0816      
004e0822      class ClientCharGenState* eax_51 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004e082d      eax_51->hairStyle = this->m_tChoices[0].iCurrentChoice;
004e0833      int32_t var_218_62 = 1;
004e0837      gmBarberUI::SetSelection(this, ECG_PARTS_HAIR);
004e084d      ebx_5 = ebx_5 != 0;
004e085b      uint32_t eax_53 = ACCharGenData::GetEyeStripIndexFromID(var_1c0, var_200, var_1fc, arg4, ebx_5, var_204_1);
004e0860      this->m_tChoices[1].iCurrentChoice = eax_53;
004e0866      int32_t iNumChoices_1 = this->m_tChoices[1].iNumChoices;
004e0866      
004e086e      if (eax_53 >= iNumChoices_1)
004e0870          this->m_tChoices[1].iCurrentChoice = 0;
004e086e      else if (eax_53 < 0)
004e0881          this->m_tChoices[1].iCurrentChoice = (iNumChoices_1 - 1);
004e0881      
004e088d      class ClientCharGenState* eax_54 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004e0898      eax_54->eyesStrip = this->m_tChoices[1].iCurrentChoice;
004e089e      int32_t var_218_64 = 2;
004e08a2      gmBarberUI::SetSelection(this, ECG_PARTS_EYES);
004e08bc      uint32_t eax_56 = ACCharGenData::GetNoseStripIndexFromID(var_1c0, var_200, var_1fc, arg6, ebx_5);
004e08c1      this->m_tChoices[2].iCurrentChoice = eax_56;
004e08c7      int32_t iNumChoices_2 = this->m_tChoices[2].iNumChoices;
004e08c7      
004e08cf      if (eax_56 >= iNumChoices_2)
004e08d1          this->m_tChoices[2].iCurrentChoice = 0;
004e08cf      else if (eax_56 < 0)
004e08e2          this->m_tChoices[2].iCurrentChoice = (iNumChoices_2 - 1);
004e08e2      
004e08ee      class ClientCharGenState* eax_57 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004e08f9      int32_t var_218_66 = 3;
004e08fd      eax_57->noseStrip = this->m_tChoices[2].iCurrentChoice;
004e0903      gmBarberUI::SetSelection(this, ECG_PARTS_NOSE);
004e091d      uint32_t eax_59 = ACCharGenData::GetMouthStripIndexFromID(var_1c0, var_200, var_1fc, arg8, ebx_5);
004e0922      this->m_tChoices[3].iCurrentChoice = eax_59;
004e0928      int32_t iNumChoices_3 = this->m_tChoices[3].iNumChoices;
004e0928      
004e0930      if (eax_59 >= iNumChoices_3)
004e0932          this->m_tChoices[3].iCurrentChoice = 0;
004e0930      else if (eax_59 < 0)
004e0943          this->m_tChoices[3].iCurrentChoice = (iNumChoices_3 - 1);
004e0943      
004e094f      class ClientCharGenState* eax_60 = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004e095a      eax_60->mouthStrip = this->m_tChoices[3].iCurrentChoice;
004e0960      int32_t var_218_68 = 4;
004e0964      gmBarberUI::SetSelection(this, ECG_PARTS_MOUTH);
004e0969      int32_t var_218_69 = 1;
004e096d      uint32_t var_1f8 = 0;
004e0975      int32_t var_1e8 = 0;
004e097d      int32_t var_1e4 = 0;
004e0985      gmBarberUI::SetSelection(this, ECG_PARTS_HAIR);
004e09a8      ACCharGenData::GetHairColorFromID(var_1c0, var_200, var_1fc, arg11, &var_1f8, &var_1e8);
004e09b8      CharGenState::SetHairColor(var_1d4, var_1f8);
004e09c5      int32_t var_218_72 = var_1e4;
004e09c9      CharGenState::SetHairShade(var_1d4, var_1e8);
004e09d7      gmBarberUI::SetColor(this, var_1f8);
004e09e4      int32_t var_218_74 = var_1e4;
004e09e8      gmBarberUI::SetShade(this, var_1e8);
004e0a06      ACCharGenData::GetSkinShadeFromID(var_1c0, var_200, var_1fc, arg10, &var_1e8);
004e0a13      int32_t var_218_76 = var_1e4;
004e0a17      CharGenState::SetSkinShade(var_1d4, var_1e8);
004e0a37      ACCharGenData::GetEyeColorFromID(var_1c0, var_200, var_1fc, arg12, &var_1f8);
004e0a43      CharGenState::SetEyeColor(var_1d4, var_1f8);
004e0a43      
004e0a51      if (UIElement::IsVisible(this) != 0)
004e0a59          gmCG3DView::Update(this->m_p3DView);
004e0a59      
004e0a5e      int32_t var_218_79 = 0x100005a4;
004e0a65      class UIElement* eax_68 = UIElement::GetChildRecursive(this, 0x100005a4);
004e0a6c      class UIElement_Button* eax_69;
004e0a6c      
004e0a6c      if (eax_68 == 0)
004e0a7c          eax_69 = nullptr;
004e0a6c      else
004e0a6c      {
004e0a70          int32_t var_218_80 = 1;
004e0a74          eax_69 = eax_68->vtable->DynamicCast(1);
004e0a6c      }
004e0a6c      
004e0a7e      int32_t var_218_81 = 0x100005a5;
004e0a85      this->m_pRotateClockButton = eax_69;
004e0a8b      class UIElement* eax_70 = UIElement::GetChildRecursive(this, 0x100005a5);
004e0a92      class UIElement_Button* eax_71;
004e0a92      
004e0a92      if (eax_70 == 0)
004e0aa2          eax_71 = nullptr;
004e0a92      else
004e0a92      {
004e0a96          int32_t var_218_82 = 1;
004e0a9a          eax_71 = eax_70->vtable->DynamicCast(1);
004e0a92      }
004e0a92      
004e0aa4      int32_t var_218_83 = 0x100005a6;
004e0aab      this->m_pRotateCounterClockButton = eax_71;
004e0ab1      class UIElement* eax_72 = UIElement::GetChildRecursive(this, 0x100005a6);
004e0ab8      class UIElement_Button* eax_73;
004e0ab8      
004e0ab8      if (eax_72 == 0)
004e0ac8          eax_73 = nullptr;
004e0ab8      else
004e0ab8      {
004e0abc          int32_t var_218_84 = 1;
004e0ac0          eax_73 = eax_72->vtable->DynamicCast(1);
004e0ab8      }
004e0ab8      
004e0aca      int32_t var_218_85 = 0x100005a7;
004e0ad1      this->m_pApplyButton = eax_73;
004e0ad7      class UIElement* eax_74 = UIElement::GetChildRecursive(this, 0x100005a7);
004e0ade      class UIElement_Button* eax_75;
004e0ade      
004e0ade      if (eax_74 == 0)
004e0aee          eax_75 = nullptr;
004e0ade      else
004e0ade      {
004e0ae2          int32_t var_218_86 = 1;
004e0ae6          eax_75 = eax_74->vtable->DynamicCast(1);
004e0ade      }
004e0ade      
004e0af0      int32_t var_218_87 = 0x100005c9;
004e0af7      this->m_pCancelButton = eax_75;
004e0afd      class UIElement* eax_76 = UIElement::GetChildRecursive(this, 0x100005c9);
004e0b04      class UIElement_Button* eax_77;
004e0b04      
004e0b04      if (eax_76 == 0)
004e0b14          eax_77 = nullptr;
004e0b04      else
004e0b04      {
004e0b08          int32_t var_218_88 = 1;
004e0b0c          eax_77 = eax_76->vtable->DynamicCast(1);
004e0b04      }
004e0b04      
004e0b16      int32_t var_218_89 = 0x100005ca;
004e0b1d      this->m_pOption1Checkbox = eax_77;
004e0b23      class UIElement* eax_78 = UIElement::GetChildRecursive(this, 0x100005ca);
004e0b2a      class UIElement_Button* eax_79;
004e0b2a      
004e0b2a      if (eax_78 == 0)
004e0b3a          eax_79 = nullptr;
004e0b2a      else
004e0b2a      {
004e0b2e          int32_t var_218_90 = 1;
004e0b32          eax_79 = eax_78->vtable->DynamicCast(1);
004e0b2a      }
004e0b2a      
004e0b3c      int32_t var_218_91 = 0x100005cb;
004e0b43      this->m_pOption2Checkbox = eax_79;
004e0b49      class UIElement* eax_80 = UIElement::GetChildRecursive(this, 0x100005cb);
004e0b50      class UIElement_Button* eax_81;
004e0b50      
004e0b50      if (eax_80 == 0)
004e0b60          eax_81 = nullptr;
004e0b50      else
004e0b50      {
004e0b54          int32_t var_218_92 = 1;
004e0b58          eax_81 = eax_80->vtable->DynamicCast(1);
004e0b50      }
004e0b50      
004e0b62      this->m_pOption3Checkbox = eax_81;
004e0b68      uint32_t mHeritageGroup_1 = var_1d4->mHeritageGroup;
004e0b71      struct Turbine_GUID** esp_1;
004e0b71      
004e0b71      if (mHeritageGroup_1 == 6)
004e0b71      {
004e0b7b          int32_t var_218_93 = 0;
004e0b73          this->m_pOption1Checkbox->vtable->SetVisible(0);
004e0b88          int32_t var_218_94 = 0;
004e0b80          this->m_pOption2Checkbox->vtable->SetVisible(0);
004e0b95          int32_t var_218_95 = 0;
004e0b8d          this->m_pOption3Checkbox->vtable->SetVisible(0);
004e0ba2          int32_t var_218_96 = 0x112;
004e0ba7          int32_t var_21c_43 = 0x160;
004e0b9a          this->m_pApplyButton->vtable->MoveTo(0x160, 0x112);
004e0bb7          int32_t var_218_97 = 0x112;
004e0bbc          int32_t var_21c_44 = 0xe8;
004e0baf          this->m_pCancelButton->vtable->MoveTo(0xe8, 0x112);
004e0bc3          esp_1 = &var_214;
004e0b71      }
004e0b71      else
004e0b71      {
004e0bce          void var_1b0;
004e0bce          class UIElement_Button* m_pOption1Checkbox_1;
004e0bce          
004e0bce          if (mHeritageGroup_1 != 9)
004e0bce          {
004e0c3d              uint32_t id_1;
004e0c3d              
004e0c3d              if (mHeritageGroup_1 == 0xb)
004e0c3d              {
004e0c47                  StringInfo::StringInfo(&charGenData);
004e0c47                  
004e0c52                  if (arg13 != INVALID_DID.id)
004e0c54                      this->m_p3DView->m_alternateSetupID.id = arg13;
004e0c54                  
004e0c65                  int32_t var_218_100 = 1;
004e0c5d                  this->m_pOption1Checkbox->vtable->SetVisible(1);
004e0c6a                  int32_t var_210_7 = 0x10000001;
004e0c6f                  var_214 = "ID_Barber_Undead_NoFlame";
004e0c7c                  var_214 = compute_str_hash(var_214);
004e0c81                  StringInfo::SetStringIDandTableEnum(&var_1b0, var_214, var_210_7);
004e0c86                  class UIElement_Button* m_pOption1Checkbox_2 = this->m_pOption1Checkbox;
004e0c8c                  int32_t var_210_8 = 1;
004e0c8e                  var_214 = nullptr;
004e0c95                  UIElement_Text::SetStringInfoWithFont(m_pOption1Checkbox_2, &var_1b0, var_214, var_210_8);
004e0c95                  
004e0cb8                  if (((arg13 != UNDEAD_FEMALE_SKELETON_NOFLAME_SETUP.id && arg13 != UNDEAD_FEMALE_ZOMBIE_NOFLAME_SETUP.id) && arg13 != UNDEAD_MALE_SKELETON_NOFLAME_SETUP.id))
004e0cb8                  {
004e0cbe                      id_1 = UNDEAD_MALE_ZOMBIE_NOFLAME_SETUP.id;
004e0cc3                      goto label_4e0e04;
004e0cb8                  }
004e0cb8                  
004e0e0c                  this->m_pOption1Checkbox->vtable->SetState(6);
004e0e1c                  goto label_4e0ce2;
004e0c3d              }
004e0c3d              
004e0d2f              if (mHeritageGroup_1 == 5)
004e0d2f              {
004e0d35                  StringInfo::StringInfo(&charGenData);
004e0d35                  
004e0d40                  if (arg13 != INVALID_DID.id)
004e0d42                      this->m_p3DView->m_alternateSetupID.id = arg13;
004e0d42                  
004e0d53                  int32_t var_218_102 = 1;
004e0d4b                  this->m_pOption1Checkbox->vtable->SetVisible(1);
004e0d58                  int32_t var_210_14 = 0x10000001;
004e0d5d                  var_214 = "ID_Barber_Shadow_NoCrown";
004e0d6a                  var_214 = compute_str_hash(var_214);
004e0d6f                  StringInfo::SetStringIDandTableEnum(&var_1b0, var_214, var_210_14);
004e0d74                  class UIElement_Button* m_pOption1Checkbox_3 = this->m_pOption1Checkbox;
004e0d7a                  int32_t var_210_15 = 1;
004e0d7c                  var_214 = nullptr;
004e0d83                  UIElement_Text::SetStringInfoWithFont(m_pOption1Checkbox_3, &var_1b0, var_214, var_210_15);
004e0d83                  
004e0d8e                  if (arg13 == UMBRAEN_MALE_NOCROWN_SETUP.id)
004e0d8e                  {
004e0e0c                      this->m_pOption1Checkbox->vtable->SetState(6);
004e0e1c                      goto label_4e0ce2;
004e0d8e                  }
004e0d8e                  
004e0d90                  id_1 = UMBRAEN_FEMALE_NOCROWN_SETUP.id;
004e0e04              label_4e0e04:
004e0e04                  
004e0e06                  if (arg13 == id_1)
004e0e06                  {
004e0e0c                      this->m_pOption1Checkbox->vtable->SetState(6);
004e0e1c                      goto label_4e0ce2;
004e0e06                  }
004e0e06                  
004e0cc8                  m_pOption1Checkbox_1 = this->m_pOption1Checkbox;
004e0cd2              label_4e0cd2:
004e0cce                  m_pOption1Checkbox_1->vtable->SetState(1);
004e0cd2                  goto label_4e0ce2;
004e0d2f              }
004e0d2f              
004e0d9a              if (mHeritageGroup_1 == 0xa)
004e0d9a              {
004e0da4                  StringInfo::StringInfo(&charGenData);
004e0da4                  
004e0daf                  if (arg13 != INVALID_DID.id)
004e0db1                      this->m_p3DView->m_alternateSetupID.id = arg13;
004e0db1                  
004e0dc2                  int32_t var_218_104 = 1;
004e0dba                  this->m_pOption1Checkbox->vtable->SetVisible(1);
004e0dc7                  int32_t var_210_16 = 0x10000001;
004e0dcc                  var_214 = "ID_Barber_Shadow_NoCrown";
004e0dd9                  var_214 = compute_str_hash(var_214);
004e0dde                  StringInfo::SetStringIDandTableEnum(&var_1b0, var_214, var_210_16);
004e0de3                  class UIElement_Text* m_pOption1Checkbox_4 = this->m_pOption1Checkbox;
004e0de9                  int32_t var_210_17 = 1;
004e0deb                  var_214 = nullptr;
004e0df2                  UIElement_Text::SetStringInfoWithFont(m_pOption1Checkbox_4, &var_1b0, var_214, var_210_17);
004e0df2                  
004e0dfd                  if (arg13 != PENUMBRAEN_MALE_NOCROWN_SETUP.id)
004e0dfd                  {
004e0dff                      id_1 = PENUMBRAEN_FEMALE_NOCROWN_SETUP.id;
004e0dff                      goto label_4e0e04;
004e0dfd                  }
004e0dfd                  
004e0e0c                  this->m_pOption1Checkbox->vtable->SetState(6);
004e0e1c                  goto label_4e0ce2;
004e0d9a              }
004e0d9a              
004e0e29              int32_t var_218_106 = 0;
004e0e21              this->m_pOption1Checkbox->vtable->SetVisible(0);
004e0e2e              this->m_pOption2Checkbox->vtable->SetVisible(0);
004e0e3b              this->m_pOption3Checkbox->vtable->SetVisible(0);
004e0e4e              struct UIElement_Button::VTable* vtable_1 = this->m_pApplyButton->vtable;
004e0e50              int32_t var_210_21 = 0x112;
004e0e55              var_214 = 0x160;
004e0e5a              vtable_1->MoveTo(var_214, var_210_21);
004e0e63              struct UIElement_Button::VTable* vtable_3 = this->m_pCancelButton->vtable;
004e0e65              int32_t var_210_22 = 0x112;
004e0e6a              var_214 = 0xe8;
004e0e71              vtable_3->MoveTo(var_214, var_210_22);
004e0e71              esp_1 = &var_20c;
004e0bce          }
004e0bce          else
004e0bce          {
004e0bd4              StringInfo::StringInfo(&charGenData);
004e0be1              int32_t var_218_98 = 1;
004e0bd9              this->m_pOption1Checkbox->vtable->SetVisible(1);
004e0be6              int32_t var_210_4 = 0x10000001;
004e0beb              var_214 = "ID_Barber_Empyrean_Earthbound";
004e0bf8              var_214 = compute_str_hash(var_214);
004e0bfd              StringInfo::SetStringIDandTableEnum(&var_1b0, var_214, var_210_4);
004e0c02              class UIElement_Button* m_pOption1Checkbox = this->m_pOption1Checkbox;
004e0c08              int32_t var_210_5 = 1;
004e0c0a              var_214 = nullptr;
004e0c11              UIElement_Text::SetStringInfoWithFont(m_pOption1Checkbox, &var_1b0, var_214, var_210_5);
004e0c1f              m_pOption1Checkbox_1 = this->m_pOption1Checkbox;
004e0c1f              
004e0c25              if (arg16 == 0)
004e0c25                  goto label_4e0cd2;
004e0c25              
004e0c2b              m_pOption1Checkbox_1->vtable->SetState(6);
004e0ce2          label_4e0ce2:
004e0cd8              this->m_pOption2Checkbox->vtable->SetVisible(0);
004e0ce5              this->m_pOption3Checkbox->vtable->SetVisible(0);
004e0cf8              struct UIElement_Button::VTable* vtable_2 = this->m_pApplyButton->vtable;
004e0cfa              int32_t var_210_12 = 0x12a;
004e0cff              var_214 = 0x160;
004e0d04              vtable_2->MoveTo(var_214, var_210_12);
004e0d0d              struct UIElement_Button::VTable* vtable = this->m_pCancelButton->vtable;
004e0d0f              int32_t var_210_13 = 0x12a;
004e0d14              var_214 = 0xe8;
004e0d1b              vtable->MoveTo(var_214, var_210_13);
004e0d1b              esp_1 = &var_20c;
004e0d22              StringInfo::~StringInfo(&var_1b0);
004e0bce          }
004e0b71      }
004e0b71      
004e0e74      int32_t* ecx_166 = esp_1[0x12];
004e0e74      
004e0e7a      if (ecx_166 != 0)
004e0e7e          *(uint32_t*)(*(uint32_t*)ecx_166 + 0x14)();
004e0e7e      
004e0e81      *(uint32_t*)esp_1;
004e0e81      esp_1[1];
004e0e81      esp_1[2];
004e0e81      esp_1[3];
004e0040  }

004e0e8e                                            8b ff                                                                ..
004e0e90  uint32_t jump_table_4e0e90[0x9] = 
004e0e90  {
004e0e90      [0x0] =  0x004e0273
004e0e94      [0x1] =  0x004e027f
004e0e98      [0x2] =  0x004e028b
004e0e9c      [0x3] =  0x004e0297
004e0ea0      [0x4] =  0x004e02a3
004e0ea4      [0x5] =  0x004e02af
004e0ea8      [0x6] =  0x004e02bb
004e0eac      [0x7] =  0x004e02c7
004e0eb0      [0x8] =  0x004e02d3
004e0eb4  }

004e0eb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004e0ec0  void __thiscall gmBarberUI::RecvNotice_StartBarberNotice(class gmBarberUI* this, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3, class IDClass<_tagDataID,32,0> arg4, class IDClass<_tagDataID,32,0> arg5, class IDClass<_tagDataID,32,0> arg6, class IDClass<_tagDataID,32,0> arg7, class IDClass<_tagDataID,32,0> arg8, class IDClass<_tagDataID,32,0> arg9, class IDClass<_tagDataID,32,0> arg10, class IDClass<_tagDataID,32,0> arg11, class IDClass<_tagDataID,32,0> arg12, class IDClass<_tagDataID,32,0> arg13, class IDClass<_tagDataID,32,0> arg14, class IDClass<_tagDataID,32,0> arg15, int32_t arg16, int32_t arg17)

004e0ec0  {
004e0f1c      gmBarberUI::InitializePage(((char*)this - 0x5f8), arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17);
004e0f24      gmCG3DView::Update(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x12]);
004e0f2f      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x18)(1);
004e0ec0  }

004e0f37                                                                       90 90 90 90 90 90 90 90 90                         .........

004e0f40  void __thiscall UIElement_UIItem::UIElement_UIItem(class UIElement_UIItem* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004e0f40  {
004e0f4f      UIElement_Field::UIElement_Field(this, arg2, arg3);
004e0f54      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e0f63      this->vtable = 0x7bf5d0;
004e0f69      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e0f73      __builtin_memset(&this->itemID, 0, 0x34);
004e0fc1      this->m_sellState = 0;
004e0fc7      this->m_tradeState = 0;
004e0fcd      this->m_selectable = 1;
004e0fd4      this->m_shortcutNum = 0xffffffff;
004e0fda      this->m_delayedShortcutNum = 0xffffffff;
004e0fe0      this->m_shortcutGhosted = 0;
004e0fe6      this->m_quantity = 0xffffffff;
004e0fec      this->openState = 0;
004e0ff2      this->m_heartbeatInterval = 0f;
004e0ff8      *(uint32_t*)((char*)this->m_heartbeatInterval)[4] = 0x3ff00000;
004e1002      __builtin_memset(&this->m_lastHeartbeat, 0, 0x68);
004e109e      GlobalEventHandler::GetGlobalEventHandler();
004e0f40  }

004e10a9                             90 90 90 90 90 90 90                                                           .......

004e10b0  class UIElement* __thiscall UIElement_UIItem::DynamicCast(class UIElement_UIItem* this, uint32_t arg2) __pure

004e10b0  {
004e10bc      if (arg2 == 0x10000032)
004e10c9          return this;
004e10c9      
004e10c3      int32_t edx_1;
004e10c3      edx_1 = arg2 != 3;
004e10c7      return (this & (edx_1 - 1));
004e10b0  }

004e10cc                                      90 90 90 90                                                              ....

004e10d0  uint32_t UIElement_UIItem::GetUIElementType(class UIElement_UIItem const* this @ ecx) __pure

004e10d0  {
004e10d5      return 0x10000032;
004e10d0  }

004e10d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e10e0  class UIElement* UIElement_UIItem::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e10e0  {
004e10e5      void* eax = operator new(0x6c8);
004e10e5      
004e10ef      if (eax == 0)
004e1105          return 0;
004e1105      
004e1102      return UIElement_UIItem::UIElement_UIItem(eax, arg1, arg2);
004e10e0  }

004e1106                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e1110  void __thiscall UIElement_UIItem::Init_UIItem(class UIElement_UIItem* this, uint32_t arg2, int32_t arg3)

004e1110  {
004e1118      this->itemID = arg2;
004e1120      this->spellID = 0;
004e1126      this->containerDisplay = arg3;
004e112c      this->weenObj = nullptr;
004e1110  }

004e1135                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004e1140  void __thiscall UIElement_UIItem::Init_UIItem_Spell_Shortcut(class UIElement_UIItem* this, uint32_t arg2)

004e1140  {
004e1146      this->itemID = 0;
004e114c      this->spellID = arg2;
004e1152      this->containerDisplay = 0;
004e1158      this->weenObj = nullptr;
004e1140  }

004e1161     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004e1170  void __fastcall UIElement_UIItem::Clear_UIItem(class UIElement_UIItem* this)

004e1170  {
004e1172      this->itemID = 0;
004e1178      this->spellID = 0;
004e117e      this->containerDisplay = 0;
004e1184      this->weenObj = nullptr;
004e1170  }

004e118b                                   90 90 90 90 90                                                             .....

004e1190  uint32_t __fastcall UIElement_UIItem::UIItem_GetState(class UIElement_UIItem* this)

004e1190  {
004e1190      class UIElement* m_elem_Icon = this->m_elem_Icon;
004e1190      
004e1198      if (m_elem_Icon != 0)
004e11a1          return m_elem_Icon->m_state;
004e11a1      
004e119a      return m_elem_Icon;
004e1190  }

004e11a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004e11b0  void __thiscall UIElement_UIItem::SetWaitingState(class UIElement_UIItem* this, int32_t arg2)

004e11b0  {
004e11b3      class ACCWeenieObject* weenObj = this->weenObj;
004e11b3      
004e11bb      if (weenObj != 0)
004e11bb      {
004e11c3          ACCWeenieObject::SetWaitingState(weenObj, arg2);
004e11c3          
004e11d0          if (this->unghostable == 0)
004e11d0          {
004e11d2              class UIElement* m_elem_Icon_Ghosted = this->m_elem_Icon_Ghosted;
004e11d2              
004e11da              if (m_elem_Icon_Ghosted != 0)
004e11da              {
004e11e1                  int32_t edx_1;
004e11e1                  edx_1 = arg2 != 0;
004e11e5                  arg2 = edx_1;
004e11e9                  /* jump -> m_elem_Icon_Ghosted->vtable->SetVisible */
004e11da              }
004e11d0          }
004e11bb      }
004e11b0  }

004e11f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004e1200  void __thiscall UIElement_UIItem::SetOpenContainerState(class UIElement_UIItem* this, uint8_t arg2)

004e1200  {
004e1203      class UIElement* m_elem_Icon_OpenContainer = this->m_elem_Icon_OpenContainer;
004e1203      
004e120b      if (m_elem_Icon_OpenContainer != 0)
004e120b      {
004e1212          int32_t edx_1 = arg2;
004e1212          
004e1218          if (UIElement::IsVisible(m_elem_Icon_OpenContainer) != edx_1)
004e1218          {
004e1223              arg2 = edx_1;
004e1227              /* jump -> this->m_elem_Icon_OpenContainer->vtable->SetVisible */
004e1218          }
004e120b      }
004e1200  }

004e122e                                            90 90                                                                ..

004e1230  void __thiscall UIElement_UIItem::SetDelayedShortcutNum(class UIElement_UIItem* this, int32_t arg2)

004e1230  {
004e1234      this->m_delayedShortcutNum = arg2;
004e1230  }

004e123d                                                                                         90 90 90                               ...

004e1240  void __thiscall UIElement_UIItem::SetSelectedState(class UIElement_UIItem* this, int32_t arg2)

004e1240  {
004e1250      if ((arg2 == 0 || this->m_selectable != 0))
004e1250      {
004e1252          this->selected = arg2;
004e1258          class UIElement* m_elem_Icon_Selected = this->m_elem_Icon_Selected;
004e1258          
004e1260          if (m_elem_Icon_Selected != 0)
004e1260          {
004e1266              int32_t eax;
004e1266              eax = arg2 != 0;
004e1269              arg2 = eax;
004e126d              /* jump -> m_elem_Icon_Selected->vtable->SetVisible */
004e1260          }
004e1250      }
004e1240  }

004e1273                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e1280  void __thiscall UIElement_UIItem::SetSelectableState(class UIElement_UIItem* this, uint8_t arg2)

004e1280  {
004e1284      this->m_selectable = arg2;
004e1280  }

004e128d                                         90 90 90                                                               ...

004e1290  void __thiscall UIElement_UIItem::SetDragAcceptState(class UIElement_UIItem* this, uint32_t arg2)

004e1290  {
004e1290      class UIElement* m_elem_Icon_DragAccept = this->m_elem_Icon_DragAccept;
004e1290      
004e12a4      if ((m_elem_Icon_DragAccept != 0 && arg2 != m_elem_Icon_DragAccept->m_state))
004e12ac          /* jump -> m_elem_Icon_DragAccept->vtable->SetState */
004e1290  }

004e12b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004e12c0  void __thiscall UIElement_UIItem::SetQuantity(class UIElement_UIItem* this, int32_t arg2)

004e12c0  {
004e12c4      this->m_quantity = arg2;
004e12c0  }

004e12cd                                         90 90 90                                                               ...

004e12d0  void __thiscall UIElement_UIItem::ListenToGlobalMessage(class UIElement_UIItem* this, uint32_t arg2, int32_t arg3)

004e12d0  {
004e12d4      long double x87_r7 = ((long double)Timer::cur_time);
004e12d4      
004e12dd      if (arg2 == 3)
004e12dd      {
004e12e5          long double x87_r6_2 = (((long double)this->m_heartbeatInterval) + ((long double)this->m_lastHeartbeat));
004e12ed          (x87_r7 - x87_r6_2);
004e12ef          uint32_t eax;
004e12ef          eax = ((((x87_r7 < x87_r6_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, x87_r6_2))) ? 1 : 0) << 0xa) | ((((x87_r7 == x87_r6_2) ? 1 : 0) << 0xe) | 0x3800))));
004e12ef          
004e12f4          if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
004e12f4          {
004e12f6              struct UIElement_UIItem::VTable* vtable = this->vtable;
004e12f8              this->m_lastHeartbeat = ((double)x87_r7);
004e12fe              vtable->DoHeartbeat();
004e12f4          }
004e12dd      }
004e12d0  }

004e130c                                      90 90 90 90                                                              ....

004e1310  void* __thiscall UIElement_UIItem::`scalar deleting destructor'(class UIElement_UIItem* this, uint32_t arg2)

004e1310  {
004e131a      this->vtable = 0x7bf5d0;
004e1314      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e1326      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e1326      
004e132d      if (eax != 0)
004e132f          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e132f      
004e133b      UIListener::UnRegisterForGlobalMessage(this, 3);
004e1314      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e1348      NoticeHandler::~NoticeHandler(&this->vtable);
004e134f      UIElement_Field::~UIElement_Field(this);
004e134f      
004e1359      if ((arg2 & 1) != 0)
004e135c          operator delete(this);
004e135c      
004e1368      return this;
004e1310  }

004e136b                                   90 90 90 90 90                                                             .....

004e1370  void UIElement_UIItem::Register()

004e1370  {
004e137a      UIElement::RegisterElementClass(0x10000032, UIElement_UIItem::Create);
004e1370  }

004e1383           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e1390  enum UIElementMessageListenResult __thiscall UIElement_UIItem::ListenToElementMessage(class UIElement_UIItem* this, struct UIElementMessageInfo const* arg2)

004e1390  {
004e1395      uint32_t idMessage = arg2->idMessage;
004e1395      
004e139f      if (idMessage != 0x3e)
004e139f      {
004e1474          if (idMessage == 0x21)
004e1474          {
004e147a              int32_t* eax_9 = this->vtable->GetParent();
004e147a              
004e1482              if (eax_9 != 0)
004e1482              {
004e148d                  class UIElement_ItemList* eax_10 = *(uint32_t*)(*(uint32_t*)eax_9 + 0x94)(0x10000031);
004e148d                  
004e1495                  if (eax_10 != 0)
004e14a1                      UIElement_ItemList::ItemList_BeginDrag(eax_10, arg2->ptWindow.x, arg2->ptWindow.y);
004e1482              }
004e1474          }
004e1474          else if (idMessage == 0x15)
004e14b7          {
004e14b9              class ACCWeenieObject* weenObj = this->weenObj;
004e14b9              
004e14c1              if (weenObj != 0)
004e14c1              {
004e14c5                  ACCWeenieObject::SetWaitingState(weenObj, 0);
004e14c5                  
004e14d2                  if (this->unghostable == 0)
004e14d2                  {
004e14d4                      class UIElement* m_elem_Icon_Ghosted = this->m_elem_Icon_Ghosted;
004e14d4                      
004e14dc                      if (m_elem_Icon_Ghosted != 0)
004e14de                          m_elem_Icon_Ghosted->vtable->SetVisible(0);
004e14d2                  }
004e14c1              }
004e14b7          }
004e139f      }
004e139f      else if (arg2->dwParam1 == 0)
004e13aa      {
004e1438          class UIElement* m_elem_Icon_DragAccept_1 = this->m_elem_Icon_DragAccept;
004e1438          
004e1450          if ((m_elem_Icon_DragAccept_1 != 0 && m_elem_Icon_DragAccept_1->m_state != 0x1000003f))
004e1456              m_elem_Icon_DragAccept_1->vtable->SetState(0x1000003f);
004e13aa      }
004e13aa      else
004e13aa      {
004e13b5          class UIElement* m_dragElement = UIElementManager::s_pInstance->m_dragElement;
004e13b5          
004e13bd          if (m_dragElement != 0)
004e13bd          {
004e13fc              int32_t* eax_4 = this->vtable->GetParent();
004e13fc              
004e1404              if (eax_4 != 0)
004e1404              {
004e1413                  class UIElement_ItemList* eax_5;
004e1413                  class UIElement* edx_3;
004e1413                  eax_5 = *(uint32_t*)(*(uint32_t*)eax_4 + 0x94)(0x10000031);
004e1413                  
004e141b                  if (eax_5 != 0)
004e141b                  {
004e1421                      class UIElement_UIItem* this_1 = this;
004e1425                      UIElement_ItemList::ItemList_DragOver(eax_5, edx_3, m_dragElement);
004e141b                  }
004e1404              }
004e13bd          }
004e13bd          else
004e13bd          {
004e13bf              class UIElement* m_elem_Icon_DragAccept = this->m_elem_Icon_DragAccept;
004e13bf              
004e13d7              if ((m_elem_Icon_DragAccept != 0 && m_elem_Icon_DragAccept->m_state != 0x1000003f))
004e13dd                  m_elem_Icon_DragAccept->vtable->SetState(0x1000003f);
004e13bd          }
004e13aa      }
004e13aa      
004e14f0      return UIElement::ListenToElementMessage(this, arg2);
004e1390  }

004e14f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e1500  uint8_t __thiscall UIElement_UIItem::UIItem_SetState(class UIElement_UIItem* this, uint32_t arg2)

004e1500  {
004e1503      class UIElement* m_elem_Icon = this->m_elem_Icon;
004e1503      
004e150b      if (m_elem_Icon == 0)
004e150b      {
004e150d          int32_t eax;
004e150d          eax = 0;
004e1510          return 0;
004e150b      }
004e150b      
004e1513      m_elem_Icon->vtable->SetState(arg2);
004e1521      class UIElement_Text* m_elem_Text = this->m_elem_Text;
004e1521      
004e1529      if (m_elem_Text != 0)
004e152b          m_elem_Text->vtable->SetState(arg2);
004e152b      
004e1534      class UIElement* m_elem_Icon_Overlays = this->m_elem_Icon_Overlays;
004e1534      
004e153c      if (m_elem_Icon_Overlays != 0)
004e153e          m_elem_Icon_Overlays->vtable->SetState(arg2);
004e153e      
004e154e      if (arg2 == 0x1000001c)
004e154e      {
004e1550          this->__bitfield164 &= 0xffffffdf;
004e1559          this->isContainer = 0;
004e1563          UIElement::ClearTooltip(this);
004e1568          class UIElement* m_elem_Icon_Selected = this->m_elem_Icon_Selected;
004e1570          this->selected = 0;
004e1570          
004e157a          if (m_elem_Icon_Selected != 0)
004e157c              m_elem_Icon_Selected->vtable->SetVisible(0);
004e154e      }
004e154e      
004e1583      int32_t eax_2;
004e1583      eax_2 = 1;
004e1586      return 1;
004e1500  }

004e1589                             90 90 90 90 90 90 90                                                           .......

004e1590  void __thiscall UIElement_UIItem::SetShortcutNum(class UIElement_UIItem* this, int32_t arg2, uint8_t arg3)

004e1590  {
004e1597      class UIElement* m_elem_Icon_ShortcutNum = this->m_elem_Icon_ShortcutNum;
004e15a2      int32_t edi = arg2;
004e15a2      
004e15a6      if (m_elem_Icon_ShortcutNum != 0)
004e15a6      {
004e15ae          if (edi >= 0)
004e15ae          {
004e15bb              class UIElement* m_elem_Icon = this->m_elem_Icon;
004e15c3              int32_t* var_10 = nullptr;
004e15c7              int32_t* var_c_1 = nullptr;
004e15d7              int32_t var_24_1;
004e15d7              int32_t* var_20_1;
004e15d7              
004e15d7              if ((m_elem_Icon == 0 || m_elem_Icon->m_state != 0x1000001c))
004e15d7              {
004e15ed                  var_20_1 = &var_10;
004e15ed                  
004e15ee                  if (arg3 == 0)
004e15f7                      var_24_1 = 0x10000042;
004e15ee                  else
004e15f0                      var_24_1 = 0x10000043;
004e15d7              }
004e15d7              else
004e15d7              {
004e15dd                  var_20_1 = &var_10;
004e15de                  var_24_1 = 0x1000005e;
004e15d7              }
004e15d7              
004e1606              if (m_elem_Icon_ShortcutNum->vtable->InqProperty(var_24_1, var_20_1) != 0)
004e1606              {
004e160e                  int32_t var_8 = 0;
004e1612                  int32_t* var_4_1 = nullptr;
004e1612                  
004e1616                  if ((var_c_1 != 0 && *(uint32_t*)(*(uint32_t*)var_c_1 + 0xf4)(edi, &var_8) != 0))
004e1616                  {
004e1630                      arg2 = INVALID_DID.id;
004e1630                      
004e163a                      if (var_4_1 != 0)
004e1643                          *(uint32_t*)(*(uint32_t*)var_4_1 + 0xb0)(&arg2);
004e1643                      
004e1656                      UIElement::SetMediaImage(this->m_elem_Icon_ShortcutNum, arg2, 3);
004e1616                  }
004e1616                  
004e165b                  this->m_elem_Icon_ShortcutNum->vtable->SetVisible(1);
004e166c                  BaseProperty::~BaseProperty(&var_8);
004e1606              }
004e1606              
004e1671              int32_t* eax_5 = var_10;
004e1671              
004e1677              if (eax_5 != 0)
004e1677              {
004e1681                  int32_t edx_6 = (eax_5[1] - 1);
004e167e                  eax_5[1] = edx_6;
004e167e                  
004e1686                  if (edx_6 == 0)
004e168c                      **(uint32_t**)eax_5(1);
004e168c                  
004e168e                  var_10 = nullptr;
004e1677              }
004e1677              
004e1698              if (var_c_1 != 0)
004e1698              {
004e16a2                  int32_t edx_8 = (var_c_1[1] - 1);
004e169f                  var_c_1[1] = edx_8;
004e169f                  
004e16a7                  if (edx_8 == 0)
004e16ad                      **(uint32_t**)var_c_1(1);
004e1698              }
004e15ae          }
004e15ae          else
004e15b0              m_elem_Icon_ShortcutNum->vtable->SetVisible(0);
004e15b0          
004e16af          int32_t* eax_2;
004e16af          eax_2 = arg3;
004e16b3          this->m_shortcutNum = edi;
004e16b9          this->m_shortcutGhosted = eax_2;
004e15a6      }
004e15a6      
004e16bf      class ACCWeenieObject* weenObj = this->weenObj;
004e16bf      
004e16c7      if (weenObj != 0)
004e16cf          ACCWeenieObject::SetShortcutNum(weenObj, edi, arg3);
004e1590  }

004e16dd                                                                                         90 90 90                               ...

004e16e0  void __fastcall UIElement_UIItem::UpdateCapacityDisplay(class UIElement_UIItem* this)

004e16e0  {
004e16e6      class UIElement_Meter* m_elem_Icon_CapacityBar = this->m_elem_Icon_CapacityBar;
004e16e6      
004e16ee      if (m_elem_Icon_CapacityBar != 0)
004e16ee      {
004e16f4          class ACCWeenieObject* weenObj = this->weenObj;
004e16f4          
004e16fc          if (weenObj != 0)
004e16fc          {
004e170a              int32_t _itemsCapacity;
004e170a              
004e170a              if (this->isContainer != 0)
004e1710                  _itemsCapacity = weenObj->pwd._itemsCapacity;
004e1710              
004e1718              if ((this->isContainer == 0 || _itemsCapacity <= 0))
004e1794                  m_elem_Icon_CapacityBar->vtable->SetVisible(0);
004e1718              else
004e1718              {
004e1729                  long double x87_r7_1 = ((long double)ACCWeenieObject::GetNumContainedItems(weenObj));
004e172d                  class UIElement_Meter* m_elem_Icon_CapacityBar_1 = this->m_elem_Icon_CapacityBar;
004e1733                  long double x87_r7_2 = (x87_r7_1 / ((long double)_itemsCapacity));
004e1737                  int32_t var_8_1;
004e1737                  var_8_1 = ((double)x87_r7_2);
004e173b                  long double temp0_1 = ((long double)0.0);
004e173b                  (x87_r7_2 - temp0_1);
004e1741                  int32_t eax_1;
004e1741                  eax_1 = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004e1743                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004e1743                  
004e1746                  if (!(p_1))
004e1746                  {
004e1748                      m_elem_Icon_CapacityBar_1->vtable->SetVisible(0);
004e1753                      return;
004e1746                  }
004e1746                  
004e1754                  m_elem_Icon_CapacityBar_1->vtable->SetVisible(1);
004e175b                  class UIElement_Meter* m_elem_Icon_CapacityBar_2 = this->m_elem_Icon_CapacityBar;
004e175b                  
004e1763                  if (m_elem_Icon_CapacityBar_2 != 0)
004e1763                  {
004e176d                      int32_t var_14 = 0x3ff00000;
004e1774                      int32_t var_1c = 0;
004e1778                      int32_t var_4;
004e1778                      int32_t var_24 = var_4;
004e178a                      UIElement::SetAttribute_Float(m_elem_Icon_CapacityBar_2, 0x69, ((float)MathLib::Clamp(var_8_1, 0f, 0f)));
004e1763                  }
004e1718              }
004e16fc          }
004e16ee      }
004e16e0  }


004e17a0  void __fastcall UIElement_UIItem::UpdateStructureDisplay(class UIElement_UIItem* this)

004e17a0  {
004e17a6      class UIElement_Meter* m_elem_Icon_StructureBar = this->m_elem_Icon_StructureBar;
004e17a6      
004e17ae      if (m_elem_Icon_StructureBar != 0)
004e17ae      {
004e17b4          class ACCWeenieObject* weenObj = this->weenObj;
004e17b4          
004e17bc          if (weenObj != 0)
004e17bc          {
004e17c2              uint32_t _maxStructure = weenObj->pwd._maxStructure;
004e17c2              
004e17ca              if (_maxStructure <= 0)
004e1859                  m_elem_Icon_StructureBar->vtable->SetVisible(0);
004e17ca              else
004e17ca              {
004e17d0                  uint32_t _structure = weenObj->pwd._structure;
004e17dc                  long double x87_r7_1 = ((long double)_structure);
004e17dc                  
004e17e0                  if (_structure < 0)
004e17e2                      x87_r7_1 = (x87_r7_1 + ((long double)4294967296.0));
004e17e2                  
004e17ee                  long double x87_r6_1 = ((long double)_maxStructure);
004e17ee                  
004e17f2                  if (_maxStructure < 0)
004e17f4                      x87_r6_1 = (x87_r6_1 + ((long double)4294967296.0));
004e17f4                  
004e17fa                  long double x87_r7_2 = (x87_r7_1 / x87_r6_1);
004e17fc                  uint32_t var_8_2;
004e17fc                  var_8_2 = ((double)x87_r7_2);
004e1800                  long double temp0_1 = ((long double)1.0);
004e1800                  (x87_r7_2 - temp0_1);
004e1806                  _structure = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004e1808                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004e1808                  
004e180b                  if (!(p_1))
004e180b                  {
004e180d                      m_elem_Icon_StructureBar->vtable->SetVisible(0);
004e1818                      return;
004e180b                  }
004e180b                  
004e1819                  m_elem_Icon_StructureBar->vtable->SetVisible(1);
004e1820                  class UIElement_Meter* m_elem_Icon_StructureBar_1 = this->m_elem_Icon_StructureBar;
004e1820                  
004e1828                  if (m_elem_Icon_StructureBar_1 != 0)
004e1828                  {
004e1832                      int32_t var_10 = 0x3ff00000;
004e1839                      int32_t var_18 = 0;
004e183d                      int32_t var_4;
004e183d                      int32_t var_20 = var_4;
004e184f                      UIElement::SetAttribute_Float(m_elem_Icon_StructureBar_1, 0x69, ((float)MathLib::Clamp(var_8_2, 0f, 0f)));
004e1828                  }
004e17ca              }
004e17bc          }
004e17ae      }
004e17a0  }

004e1865                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004e1870  void __fastcall UIElement_UIItem::PostInit(class UIElement_UIItem* this)

004e1870  {
004e1878      UIElement::PostInit(this);
004e1890      this->m_elem_Icon = UIElement::GetChildRecursive(this, 0x1000033b);
004e18a2      this->m_elem_Icon_Overlays = UIElement::GetChildRecursive(this, 0x1000033c);
004e18b4      this->m_elem_Icon_Selected = UIElement::GetChildRecursive(this, 0x10000342);
004e18c6      this->m_elem_Icon_Ghosted = UIElement::GetChildRecursive(this, 0x10000349);
004e18d8      this->m_elem_Icon_ShortcutNum = UIElement::GetChildRecursive(this, 0x1000034a);
004e18ea      this->m_elem_Icon_SellState = UIElement::GetChildRecursive(this, 0x10000437);
004e18fc      this->m_elem_Icon_TradeState = UIElement::GetChildRecursive(this, 0x10000438);
004e190e      this->m_elem_Icon_OpenContainer = UIElement::GetChildRecursive(this, 0x10000450);
004e1920      this->m_elem_Icon_DragAccept = UIElement::GetChildRecursive(this, 0x1000045a);
004e1932      this->m_elem_Icon_Ghosted = UIElement::GetChildRecursive(this, 0x10000349);
004e1944      this->m_elem_Icon_Cooldown_10 = UIElement::GetChildRecursive(this, 0x1000054f);
004e1956      this->m_elem_Icon_Cooldown_20 = UIElement::GetChildRecursive(this, 0x10000550);
004e1968      this->m_elem_Icon_Cooldown_30 = UIElement::GetChildRecursive(this, 0x10000551);
004e197a      this->m_elem_Icon_Cooldown_40 = UIElement::GetChildRecursive(this, 0x10000552);
004e198c      this->m_elem_Icon_Cooldown_50 = UIElement::GetChildRecursive(this, 0x10000553);
004e199e      this->m_elem_Icon_Cooldown_60 = UIElement::GetChildRecursive(this, 0x10000554);
004e19b0      this->m_elem_Icon_Cooldown_70 = UIElement::GetChildRecursive(this, 0x10000555);
004e19c2      this->m_elem_Icon_Cooldown_80 = UIElement::GetChildRecursive(this, 0x10000556);
004e19d4      this->m_elem_Icon_Cooldown_90 = UIElement::GetChildRecursive(this, 0x10000557);
004e19e6      this->m_elem_Icon_Cooldown_100 = UIElement::GetChildRecursive(this, 0x10000558);
004e19ec      class UIElement* eax_20 = UIElement::GetChildRecursive(this, 0x10000347);
004e19f5      class UIElement_Meter* eax_21;
004e19f5      
004e19f5      if (eax_20 == 0)
004e1a05          eax_21 = nullptr;
004e19f5      else
004e19fd          eax_21 = eax_20->vtable->DynamicCast(7);
004e19fd      
004e1a0e      this->m_elem_Icon_CapacityBar = eax_21;
004e1a14      class UIElement* eax_22 = UIElement::GetChildRecursive(this, 0x10000348);
004e1a1b      class UIElement_Meter* eax_23;
004e1a1b      
004e1a1b      if (eax_22 == 0)
004e1a2b          eax_23 = nullptr;
004e1a1b      else
004e1a23          eax_23 = eax_22->vtable->DynamicCast(7);
004e1a23      
004e1a34      this->m_elem_Icon_StructureBar = eax_23;
004e1a3a      class UIElement* eax_24 = UIElement::GetChildRecursive(this, 0x10000344);
004e1a41      class UIElement_Text* eax_25;
004e1a41      
004e1a41      if (eax_24 == 0)
004e1a51          eax_25 = nullptr;
004e1a41      else
004e1a49          eax_25 = eax_24->vtable->DynamicCast(0xc);
004e1a49      
004e1a5a      this->m_elem_Text = eax_25;
004e1a60      class UIElement* eax_26;
004e1a60      uint32_t ecx_27;
004e1a60      int32_t edx_4;
004e1a60      eax_26 = UIElement::GetChildRecursive(this, 0x100004f5);
004e1a67      class UIElement_Text* eax_27;
004e1a67      
004e1a67      if (eax_26 == 0)
004e1a77          eax_27 = nullptr;
004e1a67      else
004e1a6f          eax_27 = eax_26->vtable->DynamicCast(0xc);
004e1a6f      
004e1a79      int32_t var_28 = 0x23;
004e1a7b      int32_t var_2c = 5;
004e1a7d      int32_t var_30 = 0x10000038;
004e1a82      this->m_elem_Icon_Quantity = eax_27;
004e1a88      class DBObj* eax_28 = DBObj::GetByEnum(eax_27, edx_4, ecx_27);
004e1a88      
004e1a94      if (eax_28 != 0)
004e1a94      {
004e1aa7          class UIElement* eax_29 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance, this, eax_28, 0x10000345);
004e1aac          this->m_dragIcon = eax_29;
004e1ab2          eax_29->vtable->SetVisible(0);
004e1aba          this->vtable->SetMouseVisible(1);
004e1acc          int32_t* var_8 = nullptr;
004e1ad0          int32_t* var_4_1 = nullptr;
004e1ad4          BaseProperty::SetPropertyName(&var_8, 0x36);
004e1ad4          
004e1add          if (var_4_1 != 0)
004e1add          {
004e1ae3              BaseProperty::CheckCopyOnWrite(&var_8);
004e1af0              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x74)(1);
004e1add          }
004e1add          
004e1af3          this->vtable->SetProperty(&var_8);
004e1b08          int32_t* var_10 = nullptr;
004e1b0c          int32_t* var_c_1 = nullptr;
004e1b10          BaseProperty::SetPropertyName(&var_10, 0x3a);
004e1b10          
004e1b19          if (var_c_1 != 0)
004e1b19          {
004e1b1f              BaseProperty::CheckCopyOnWrite(&var_10);
004e1b2b              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x74)(0);
004e1b19          }
004e1b19          
004e1b2e          this->vtable->SetProperty(&var_10);
004e1b43          int32_t* var_18 = nullptr;
004e1b47          int32_t* var_14_1 = nullptr;
004e1b4b          BaseProperty::SetPropertyName(&var_18, 0x39);
004e1b4b          
004e1b54          if (var_14_1 != 0)
004e1b54          {
004e1b5a              BaseProperty::CheckCopyOnWrite(&var_18);
004e1b66              *(uint32_t*)(*(uint32_t*)var_14_1 + 0x74)(0);
004e1b54          }
004e1b54          
004e1b69          this->vtable->SetProperty(&var_18);
004e1b7c          UIListener::RegisterForGlobalMessage(this, 3);
004e1b81          int32_t* eax_34 = var_18;
004e1b81          
004e1b87          if (eax_34 != 0)
004e1b87          {
004e1b91              int32_t esi_2 = (eax_34[1] - 1);
004e1b8e              eax_34[1] = esi_2;
004e1b8e              
004e1b98              if (esi_2 == 0)
004e1b9e                  **(uint32_t**)eax_34(1);
004e1b9e              
004e1ba0              var_18 = nullptr;
004e1b87          }
004e1b87          
004e1baa          if (var_14_1 != 0)
004e1baa          {
004e1bb4              int32_t esi_4 = (var_14_1[1] - 1);
004e1bb1              var_14_1[1] = esi_4;
004e1bb1              
004e1bbb              if (esi_4 == 0)
004e1bc1                  **(uint32_t**)var_14_1(1);
004e1bc1              
004e1bc3              int32_t var_14_2 = 0;
004e1baa          }
004e1baa          
004e1bc7          int32_t* eax_39 = var_10;
004e1bc7          
004e1bcd          if (eax_39 != 0)
004e1bcd          {
004e1bd7              int32_t esi_6 = (eax_39[1] - 1);
004e1bd4              eax_39[1] = esi_6;
004e1bd4              
004e1bde              if (esi_6 == 0)
004e1be4                  **(uint32_t**)eax_39(1);
004e1be4              
004e1be6              var_10 = nullptr;
004e1bcd          }
004e1bcd          
004e1bf0          if (var_c_1 != 0)
004e1bf0          {
004e1bfa              int32_t esi_8 = (var_c_1[1] - 1);
004e1bf7              var_c_1[1] = esi_8;
004e1bf7              
004e1c01              if (esi_8 == 0)
004e1c07                  **(uint32_t**)var_c_1(1);
004e1c07              
004e1c09              int32_t var_c_2 = 0;
004e1bf0          }
004e1bf0          
004e1c0d          int32_t* eax_44 = var_8;
004e1c0d          
004e1c13          if (eax_44 != 0)
004e1c13          {
004e1c1d              int32_t esi_10 = (eax_44[1] - 1);
004e1c1a              eax_44[1] = esi_10;
004e1c1a              
004e1c24              if (esi_10 == 0)
004e1c2a                  **(uint32_t**)eax_44(1);
004e1c2a              
004e1c2c              var_8 = nullptr;
004e1c13          }
004e1c13          
004e1c36          if (var_4_1 != 0)
004e1c36          {
004e1c40              int32_t esi_12 = (var_4_1[1] - 1);
004e1c3d              var_4_1[1] = esi_12;
004e1c3d              
004e1c47              if (esi_12 == 0)
004e1c4d                  **(uint32_t**)var_4_1(1);
004e1c4d              
004e1c4f              int32_t var_4_2 = 0;
004e1c36          }
004e1c36          
004e1c53          eax_28->vtable->Release();
004e1a94      }
004e1870  }

004e1c61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004e1c70  uint8_t __thiscall UIElement_UIItem::InqAvailableProperties(class UIElement_UIItem const* this, class AvailablePropertySet* arg2)

004e1c70  {
004e1c76      int32_t ebx;
004e1c76      ebx = 1;
004e1c76      
004e1c7f      if (UIElement_Field::InqAvailableProperties(this, arg2) == 0)
004e1c81          ebx = 0;
004e1c81      
004e1c87      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
004e1c8c      class AvailablePropertySet* ecx_1 = arg2;
004e1c8c      
004e1c92      if (ecx_1 == 0)
004e1c92      {
004e1c94          int32_t eax_1;
004e1c94          eax_1 = 0;
004e1c97          return 0;
004e1c92      }
004e1c92      
004e1c9c      *(int32_t*)((char*)ecx_1->m_reqHash.vtable + 0x14)();
004e1ca2      return ebx;
004e1c70  }

004e1ca5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004e1cb0  void __fastcall UIElement_UIItem::UpdateTooltip(class UIElement_UIItem* this)

004e1cb0  {
004e1cb9      uint32_t itemID = this->itemID;
004e1cb9      
004e1cc1      if (itemID != 0)
004e1cc1      {
004e1cc9          class ACCWeenieObject* eax;
004e1cc9          int32_t edx_1;
004e1cc9          eax = ClientObjMaintSystem::GetWeenieObject(itemID);
004e1cc9          
004e1cd5          if (eax != 0)
004e1cd5          {
004e1cdb              uint32_t _stackSize = eax->pwd._stackSize;
004e1cdb              
004e1ce3              if (_stackSize == 0)
004e1ce5                  _stackSize = 1;
004e1ce5              
004e1d00              void* __return;
004e1d00              ACCWeenieObject::GetObjectNameWide(eax, &__return, ((edx_1 - edx_1) + 2), 0);
004e1d05              uint32_t _stackSize_1 = eax->pwd._stackSize;
004e1d05              
004e1d12              if ((_stackSize_1 != 0 && _stackSize_1 > 1))
004e1d12              {
004e1d18                  void* __return_1 = __return;
004e1d19                  uint32_t _stackSize_2 = _stackSize_1;
004e1d24                  PStringBase<unsigned short>::sprintf(&__return, u"%d %s");
004e1d12              }
004e1d12              
004e1d30              void var_90;
004e1d30              StringInfo::StringInfo(&var_90);
004e1d40              StringInfo::SetLiteralValue(&var_90, &__return, 1);
004e1d4c              UIElement::SetTooltip(this, &var_90);
004e1d5e              this->__bitfield164 |= 0x20;
004e1d64              StringInfo::~StringInfo(&var_90);
004e1d6d              int32_t* esi_3 = ((char*)__return - 0x14);
004e1d6d              
004e1d80              if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004e1d88                  **(uint32_t**)esi_3(1);
004e1cd5          }
004e1cc1      }
004e1cb0  }

004e1d93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e1da0  void __fastcall UIElement_UIItem::UpdateQuantityDisplay(class UIElement_UIItem* this)

004e1da0  {
004e1da0      class UIElement_UIItem* this_1 = this;
004e1da4      class UIElement_Text* m_elem_Icon_Quantity = this->m_elem_Icon_Quantity;
004e1da4      
004e1dac      if (m_elem_Icon_Quantity != 0)
004e1dac      {
004e1dae          int32_t m_quantity = this->m_quantity;
004e1dae          
004e1db6          if (m_quantity < 0)
004e1e0e              m_elem_Icon_Quantity->vtable->SetVisible(0);
004e1db6          else
004e1db6          {
004e1db8              int32_t m_quantity_1 = m_quantity;
004e1dc5              PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, Formatted, &data_7a0184);
004e1dd8              UIElement_Text::SetText(this->m_elem_Icon_Quantity, &this_1);
004e1ddd              this->m_elem_Icon_Quantity->vtable->SetVisible(1);
004e1dee              void* __offset(UIElement_UIItem, -0x14) esi_2 = ((char*)this_1 - 0x14);
004e1dee              
004e1e01              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004e1e09                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004e1db6          }
004e1dac      }
004e1da0  }

004e1e18                                                                          90 90 90 90 90 90 90 90                          ........

004e1e20  void __fastcall UIElement_UIItem::UpdateCooldownDisplay(class UIElement_UIItem* this)

004e1e20  {
004e1e2e      if (this->m_elem_Icon_StructureBar != 0)
004e1e2e      {
004e1e34          class ACCWeenieObject* weenObj = this->weenObj;
004e1e3c          int32_t esi_1 = 0;
004e1e3e          int32_t ebp_1 = 0;
004e1e42          int32_t var_20 = 0;
004e1e4a          int32_t var_1c_1 = 0;
004e1e52          int32_t var_24_1 = 0;
004e1e52          
004e1e56          if (weenObj != 0)
004e1e56          {
004e1e5c              int32_t ecx = weenObj->pwd._cooldown_duration;
004e1e69              int32_t _cooldown_id = weenObj->pwd._cooldown_id;
004e1e75              int32_t var_14_1 = *(uint32_t*)((char*)weenObj->pwd._cooldown_duration)[4];
004e1e75              
004e1e79              if (_cooldown_id > 0)
004e1e79              {
004e1e96                  int32_t* var_10;
004e1e96                  int32_t* __return;
004e1e96                  InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_10, GetClassObject(&__return, &PlayerDesc_ClassType));
004e1e9b                  int32_t* __return_1 = __return;
004e1e9b                  
004e1ea1                  if (__return_1 != 0)
004e1ea5                      *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004e1ea5                  
004e1ea8                  int32_t* esi_2 = var_10;
004e1ea8                  
004e1eae                  if (esi_2 != 0)
004e1eae                  {
004e1eb6                      int32_t var_c;
004e1eb6                      
004e1eb6                      if (((var_c >= 0 && CACQualities::HasEnchantmentRegistry(esi_2) != 0) && CEnchantmentRegistry::OnCooldown(esi_2[0x1c], (_cooldown_id + 0x8000), &var_20) != 0))
004e1eb6                      {
004e1edb                          long double x87_r7_1 = ((long double)ecx);
004e1edf                          long double temp0_1 = ((long double)0.0);
004e1edf                          (x87_r7_1 - temp0_1);
004e1ee5                          int32_t eax_4;
004e1ee5                          eax_4 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004e1ee5                          
004e1eea                          if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) == 0)
004e1f0b                              var_24_1 = _ftol2();
004e1f0b                          
004e1f0f                          ebp_1 = 1;
004e1eb6                      }
004e1eb6                      
004e1f18                      *(uint32_t*)(*(uint32_t*)esi_2 + 0x14)();
004e1eae                  }
004e1eae                  
004e1f1b                  esi_1 = var_24_1;
004e1e79              }
004e1e56          }
004e1e56          
004e1f20          class UIElement* m_elem_Icon_Cooldown_10 = this->m_elem_Icon_Cooldown_10;
004e1f20          
004e1f28          if (m_elem_Icon_Cooldown_10 != 0)
004e1f28          {
004e1f31              if ((ebp_1 == 0 || esi_1 != 1))
004e1f37                  weenObj = 0;
004e1f31              else
004e1f33                  weenObj = 1;
004e1f33              
004e1f39              m_elem_Icon_Cooldown_10->vtable->SetVisible(weenObj);
004e1f28          }
004e1f28          
004e1f3f          class UIElement* m_elem_Icon_Cooldown_20 = this->m_elem_Icon_Cooldown_20;
004e1f3f          
004e1f47          if (m_elem_Icon_Cooldown_20 != 0)
004e1f47          {
004e1f50              if ((ebp_1 == 0 || esi_1 != 2))
004e1f56                  weenObj = 0;
004e1f50              else
004e1f52                  weenObj = 1;
004e1f52              
004e1f58              m_elem_Icon_Cooldown_20->vtable->SetVisible(weenObj);
004e1f47          }
004e1f47          
004e1f5e          class UIElement* m_elem_Icon_Cooldown_30 = this->m_elem_Icon_Cooldown_30;
004e1f5e          
004e1f66          if (m_elem_Icon_Cooldown_30 != 0)
004e1f66          {
004e1f6f              if ((ebp_1 == 0 || esi_1 != 3))
004e1f75                  weenObj = 0;
004e1f6f              else
004e1f71                  weenObj = 1;
004e1f71              
004e1f77              m_elem_Icon_Cooldown_30->vtable->SetVisible(weenObj);
004e1f66          }
004e1f66          
004e1f7d          class UIElement* m_elem_Icon_Cooldown_40 = this->m_elem_Icon_Cooldown_40;
004e1f7d          
004e1f85          if (m_elem_Icon_Cooldown_40 != 0)
004e1f85          {
004e1f8e              if ((ebp_1 == 0 || esi_1 != 4))
004e1f94                  weenObj = 0;
004e1f8e              else
004e1f90                  weenObj = 1;
004e1f90              
004e1f96              m_elem_Icon_Cooldown_40->vtable->SetVisible(weenObj);
004e1f85          }
004e1f85          
004e1f9c          class UIElement* m_elem_Icon_Cooldown_50 = this->m_elem_Icon_Cooldown_50;
004e1f9c          
004e1fa4          if (m_elem_Icon_Cooldown_50 != 0)
004e1fa4          {
004e1fad              if ((ebp_1 == 0 || esi_1 != 5))
004e1fb3                  weenObj = 0;
004e1fad              else
004e1faf                  weenObj = 1;
004e1faf              
004e1fb5              m_elem_Icon_Cooldown_50->vtable->SetVisible(weenObj);
004e1fa4          }
004e1fa4          
004e1fbb          class UIElement* m_elem_Icon_Cooldown_60 = this->m_elem_Icon_Cooldown_60;
004e1fbb          
004e1fc3          if (m_elem_Icon_Cooldown_60 != 0)
004e1fc3          {
004e1fcc              if ((ebp_1 == 0 || esi_1 != 6))
004e1fd2                  weenObj = 0;
004e1fcc              else
004e1fce                  weenObj = 1;
004e1fce              
004e1fd4              m_elem_Icon_Cooldown_60->vtable->SetVisible(weenObj);
004e1fc3          }
004e1fc3          
004e1fda          class UIElement* m_elem_Icon_Cooldown_70 = this->m_elem_Icon_Cooldown_70;
004e1fda          
004e1fe2          if (m_elem_Icon_Cooldown_70 != 0)
004e1fe2          {
004e1feb              if ((ebp_1 == 0 || esi_1 != 7))
004e1ff1                  weenObj = 0;
004e1feb              else
004e1fed                  weenObj = 1;
004e1fed              
004e1ff3              m_elem_Icon_Cooldown_70->vtable->SetVisible(weenObj);
004e1fe2          }
004e1fe2          
004e1ff9          class UIElement* m_elem_Icon_Cooldown_80 = this->m_elem_Icon_Cooldown_80;
004e1ff9          
004e2001          if (m_elem_Icon_Cooldown_80 != 0)
004e2001          {
004e200a              if ((ebp_1 == 0 || esi_1 != 8))
004e2010                  weenObj = 0;
004e200a              else
004e200c                  weenObj = 1;
004e200c              
004e2012              m_elem_Icon_Cooldown_80->vtable->SetVisible(weenObj);
004e2001          }
004e2001          
004e2018          class UIElement* m_elem_Icon_Cooldown_90 = this->m_elem_Icon_Cooldown_90;
004e2018          
004e2020          if (m_elem_Icon_Cooldown_90 != 0)
004e2020          {
004e2029              if ((ebp_1 == 0 || esi_1 != 9))
004e202f                  weenObj = 0;
004e2029              else
004e202b                  weenObj = 1;
004e202b              
004e2031              m_elem_Icon_Cooldown_90->vtable->SetVisible(weenObj);
004e2020          }
004e2020          
004e2037          class UIElement* m_elem_Icon_Cooldown_100 = this->m_elem_Icon_Cooldown_100;
004e2037          
004e203f          if (m_elem_Icon_Cooldown_100 != 0)
004e203f          {
004e2048              if ((ebp_1 != 0 && esi_1 >= 0xa))
004e2048              {
004e204c                  weenObj = 1;
004e204a                  m_elem_Icon_Cooldown_100->vtable->SetVisible(weenObj);
004e2058                  return;
004e2048              }
004e2048              
004e205b              weenObj = 0;
004e2059              m_elem_Icon_Cooldown_100->vtable->SetVisible(weenObj);
004e203f          }
004e1e2e      }
004e1e20  }

004e2068                          90 90 90 90 90 90 90 90                                                          ........

004e2070  void __fastcall UIElement_UIItem::DoHeartbeat(class UIElement_UIItem* this)

004e2070  {
004e2070      /* tailcall */
004e2070      return UIElement_UIItem::UpdateCooldownDisplay(this);
004e2070  }

004e2075                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004e2080  uint8_t __fastcall UIElement_UIItem::UIItem_SetIcon(class UIElement_UIItem* this)

004e2080  {
004e2086      class UIElement* m_elem_Icon = this->m_elem_Icon;
004e2086      
004e208e      if (m_elem_Icon == 0)
004e208e      {
004e2090          int32_t eax;
004e2090          eax = 0;
004e2096          return 0;
004e208e      }
004e208e      
004e20a1      class UIElement_Text* eax_12;
004e20a1      
004e20a1      if (this->spellID == 0)
004e20a1      {
004e2167          eax_12 = ClientObjMaintSystem::GetWeenieObject(this->itemID);
004e2167          
004e2173          if (eax_12 != 0)
004e2173          {
004e217b              UIRegion::ClearImage(this->m_elem_Icon);
004e2188              UIRegion::SetBlitMode(this->m_elem_Icon, Blit_Normal);
004e218f              class Graphic* eax_13 = operator new(0xc);
004e219b              class Graphic* eax_15;
004e219b              
004e219b              if (eax_13 == 0)
004e21ae                  eax_15 = nullptr;
004e219b              else
004e21a7                  eax_15 = Graphic::Graphic(eax_13, ACCWeenieObject::GetIcon(eax_12));
004e21a7              
004e21b7              UIRegion::SetImage(this->m_elem_Icon, eax_15);
004e2173          }
004e20a1      }
004e20a1      else
004e20a1      {
004e20a7          uint32_t edx_1 = UIRegion::ClearImage(m_elem_Icon);
004e20ac          class ClientMagicSystem* eax_2 = ClientMagicSystem::GetMagicSystem();
004e20ac          
004e20b5          if (eax_2 == 0)
004e20b5          {
004e20b9              eax_2 = 0;
004e20bf              return 0;
004e20b5          }
004e20b5          
004e20c6          uint32_t spellID = this->spellID;
004e20c9          class Graphic* eax_4 = ClientMagicSystem::GetSpellIcon(eax_2, edx_1);
004e20c9          
004e20d2          if (eax_4 != 0)
004e20d2          {
004e20dc              UIRegion::SetBlitMode(this->m_elem_Icon, Blit_3Alpha);
004e20e3              void* eax_5 = operator new(0xc);
004e20ed              class Graphic* eax_6;
004e20ed              
004e20ed              if (eax_5 == 0)
004e20f9                  eax_6 = nullptr;
004e20ed              else
004e20f2                  eax_6 = Graphic::Graphic(eax_5, eax_4);
004e20f2              
004e2102              UIRegion::SetImage(this->m_elem_Icon, eax_6);
004e20d2          }
004e20d2          
004e210f          if (this->m_elem_Text != 0)
004e210f          {
004e2134              void var_8;
004e2134              void __return;
004e2134              class PStringBase<unsigned short>* eax_10;
004e2134              void* esi_1;
004e2134              eax_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, WidthConvert, &ClientMagicSystem::GetSpellName(eax_2, &__return, this->spellID)->m_buffer->m_data);
004e2140              UIElement_Text::SetText(*(uint32_t*)((char*)esi_1 + 0x698), eax_10);
004e2149              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
004e2152              AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return);
004e2159              int32_t eax_11;
004e2159              eax_11 = 1;
004e215f              return 1;
004e210f          }
004e20a1      }
004e20a1      
004e21be      eax_12 = 1;
004e21c4      return 1;
004e2080  }

004e21c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004e21d0  void __fastcall UIElement_UIItem::UIItem_Update(class UIElement_UIItem* this)

004e21d0  {
004e21d0      class UIElement_UIItem* this_1 = this;
004e21d4      uint32_t itemID = this->itemID;
004e21d4      
004e21dc      if (itemID == 0)
004e21ef          this->weenObj = nullptr;
004e21dc      else
004e21e7          this->weenObj = ClientObjMaintSystem::GetWeenieObject(itemID);
004e21e7      
004e2201      if (this->weenObj == 0)
004e2201      {
004e245e          if (this->spellID != 0)
004e245e          {
004e2465              UIElement_UIItem::UIItem_SetState(this, 0x1000001d);
004e2470              /* tailcall */
004e2470              return UIElement_UIItem::UIItem_SetIcon(this);
004e245e          }
004e245e          
004e247a          UIElement_UIItem::UIItem_SetState(this, 0x1000001c);
004e247f          this->__bitfield164 &= 0xffffffdf;
004e248c          /* tailcall */
004e248c          return UIElement::ClearTooltip(this);
004e2201      }
004e2201      
004e2207      class UIElement* m_elem_Icon = this->m_elem_Icon;
004e2207      
004e220f      if (m_elem_Icon != 0)
004e220f      {
004e2211          m_elem_Icon->vtable->SetState(0x1000001d);
004e221e          class UIElement_Text* m_elem_Text = this->m_elem_Text;
004e221e          
004e2226          if (m_elem_Text != 0)
004e2228              m_elem_Text->vtable->SetState(0x1000001d);
004e2228          
004e2235          class UIElement* m_elem_Icon_Overlays = this->m_elem_Icon_Overlays;
004e2235          
004e223d          if (m_elem_Icon_Overlays != 0)
004e223f              m_elem_Icon_Overlays->vtable->SetState(0x1000001d);
004e220f      }
004e220f      
004e224e      UIElement_UIItem::UIItem_SetIcon(this);
004e2259      int32_t selected = this->weenObj->selected;
004e2259      
004e2262      if (this->selected != selected)
004e2262      {
004e2266          this->selected = selected;
004e226c          class ACCWeenieObject* ecx_1;
004e226c          
004e226c          if (selected != 0)
004e226e              ecx_1 = this->m_selectable;
004e226e          
004e2276          if ((selected == 0 || ecx_1 != 0))
004e2276          {
004e2278              class UIElement* m_elem_Icon_Selected = this->m_elem_Icon_Selected;
004e2280              this->selected = selected;
004e2280              
004e2286              if (m_elem_Icon_Selected != 0)
004e2286              {
004e228c                  selected = selected != 0;
004e2288                  m_elem_Icon_Selected->vtable->SetVisible(selected);
004e2286              }
004e2276          }
004e2262      }
004e2262      
004e2293      class ACCWeenieObject* weenObj = this->weenObj;
004e2299      uint32_t _effects = weenObj->pwd._effects;
004e2299      
004e22a5      if (this->effects != _effects)
004e22a7          this->effects = _effects;
004e22a7      
004e22ca      if ((("activation type (%s) with '%s' b…" & weenObj->pwd._bitfield) == 0 && weenObj->pwd._itemsCapacity == 0))
004e22ca      {
004e22d4          if ((weenObj->pwd._containersCapacity == 0 || (weenObj->pwd._bitfield & 1) == 0))
004e22d4              goto label_4e22de;
004e22d4          
004e22fa          this->isOpenable = 1;
004e22ca      }
004e22ca      else if ((weenObj->pwd._bitfield & 1) != 0)
004e22fa          this->isOpenable = 1;
004e22dc      else
004e22dc      {
004e22de      label_4e22de:
004e22de          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004e22e6          uint32_t player_id;
004e22e6          
004e22e6          if (SmartBox::smartbox_1 == 0)
004e22f0              player_id = 0;
004e22e6          else
004e22e8              player_id = SmartBox::smartbox_1->player_id;
004e22e8          
004e22f8          if (this->itemID != player_id)
004e2302              this->isOpenable = 0;
004e22f8          else
004e22fa              this->isOpenable = 1;
004e22dc      }
004e22dc      
004e2326      if ((((weenObj->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || weenObj->pwd._itemsCapacity != 0) || weenObj->pwd._containersCapacity != 0))
004e2328          this->isContainer = 1;
004e2326      else
004e2330          this->isContainer = 0;
004e2330      
004e2344      int32_t ecx_7;
004e2344      ecx_7 = weenObj->pwd._containersCapacity != 0;
004e2347      this->isContainerHolder = ecx_7;
004e234f      UIElement_UIItem::UpdateCapacityDisplay(this);
004e2356      UIElement_UIItem::UpdateStructureDisplay(this);
004e235d      UIElement_UIItem::UpdateQuantityDisplay(this);
004e2364      UIElement_UIItem::UpdateCooldownDisplay(this);
004e236f      int32_t waiting = this->weenObj->waiting;
004e236f      
004e2378      if (this->waiting != waiting)
004e2378      {
004e237d          this->waiting = waiting;
004e2383          UIElement_UIItem::SetWaitingState(this, waiting);
004e2378      }
004e2378      
004e2388      int32_t m_delayedShortcutNum = this->m_delayedShortcutNum;
004e2388      
004e2391      if (m_delayedShortcutNum != 0xffffffff)
004e2391      {
004e239c          ACCWeenieObject::SetShortcutNum(this->weenObj, m_delayedShortcutNum, 0);
004e23a1          this->m_delayedShortcutNum = 0xffffffff;
004e2391      }
004e2391      
004e23ab      class ACCWeenieObject* weenObj_1 = this->weenObj;
004e23b1      int32_t shortcutNum = weenObj_1->shortcutNum;
004e23ba      class ACCWeenieObject* edx_4;
004e23ba      
004e23ba      if (this->m_shortcutNum == shortcutNum)
004e23bc          edx_4 = this->m_shortcutGhosted;
004e23bc      
004e23c8      if ((this->m_shortcutNum != shortcutNum || edx_4 != weenObj_1->m_bShortcutGhosted))
004e23d5          UIElement_UIItem::SetShortcutNum(this, shortcutNum, weenObj_1->m_bShortcutGhosted);
004e23d5      
004e23e0      int32_t sellState = this->weenObj->sellState;
004e23e9      bool ebx_1;
004e23e9      
004e23e9      if (this->m_sellState != sellState)
004e23e9      {
004e23eb          class UIElement* m_elem_Icon_SellState = this->m_elem_Icon_SellState;
004e23f3          ebx_1 = sellState != 0;
004e23f8          this_1 = ebx_1;
004e23f8          
004e23fc          if (m_elem_Icon_SellState != 0)
004e2402              m_elem_Icon_SellState->vtable->SetVisible(this_1);
004e2402          
004e240b          this->m_sellState = ((uint32_t)ebx_1);
004e23e9      }
004e23e9      
004e2417      int32_t tradeState = this->weenObj->tradeState;
004e2417      
004e2420      if (this->m_tradeState != tradeState)
004e2420      {
004e2422          class UIElement* m_elem_Icon_TradeState = this->m_elem_Icon_TradeState;
004e242a          ebx_1 = tradeState != 0;
004e242f          this_1 = ebx_1;
004e242f          
004e2433          if (m_elem_Icon_TradeState != 0)
004e2439              m_elem_Icon_TradeState->vtable->SetVisible(this_1);
004e2439          
004e2442          this->m_tradeState = ((uint32_t)ebx_1);
004e2420      }
004e2420      
004e244f      /* tailcall */
004e244f      return UIElement_UIItem::UpdateTooltip(this);
004e21d0  }

004e2491                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004e24a0  uint8_t __fastcall UIElement_ItemList::IsAliasList(class UIElement_ItemList* this)

004e24a0  {
004e24bc      if ((this->vendorItemList == 0 && (this->salvageList == 0 && this->shortcutList == 0)))
004e24c0          return 0;
004e24c0      
004e24c6      return 1;
004e24a0  }

004e24c7                       90 90 90 90 90 90 90 90 90                                                         .........

004e24d0  void __stdcall UIElement_ItemList::HandleTargetedUseLeftClick(class UIElement_ItemList* this @ ecx, class UIElement_UIItem* arg2)

004e24d0  {
004e24d7      if ((arg2 != 0 && ClientUISystem::GetUISystem() != 0))
004e24d7      {
004e24e7          enum Target_Mode targetMode = ClientUISystem::GetUISystem()->targetMode;
004e24ea          uint32_t spellID = arg2->spellID;
004e24ea          
004e24f2          if (spellID != 0)
004e24f2          {
004e24fd              ClientUISystem::ExecuteTargetModeForSpell(ClientUISystem::GetUISystem(), spellID, targetMode);
004e2503              return;
004e24f2          }
004e24f2          
004e2506          uint32_t itemID = arg2->itemID;
004e2506          
004e250e          if (itemID != 0)
004e2519              ClientUISystem::ExecuteTargetModeForItem(ClientUISystem::GetUISystem(), itemID, targetMode);
004e24d7      }
004e24d0  }

004e2522        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004e2530  void __thiscall UIElement_ItemList::ItemList_SetChildList(class UIElement_ItemList* this, class UIElement_ItemList* arg2)

004e2530  {
004e2534      this->childList = arg2;
004e2530  }

004e253d                                                                                         90 90 90                               ...

004e2540  void __thiscall UIElement_ItemList::RecvNotice_BeginDrag(class UIElement_ItemList* this, uint32_t arg2, uint32_t arg3, uint8_t arg4)

004e2540  {
004e2543      uint32_t eax;
004e2543      eax = *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xc])[1];
004e2543      
004e2550      if ((eax != 0 && arg2 != 0))
004e2550      {
004e2552          eax = arg4;
004e2552          
004e2558          if (eax == 0)
004e2562              UIListener::RegisterForGlobalMessage(((char*)this - 0x668), 3);
004e2550      }
004e2550      
004e2567      eax = *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xc])[2];
004e2567      
004e2574      if ((eax != 0 && arg3 != 0))
004e257e          UIListener::RegisterForGlobalMessage(((char*)this - 0x668), 3);
004e2540  }

004e2587                       90 90 90 90 90 90 90 90 90                                                         .........

004e2590  void __thiscall UIElement_ItemList::RegisterItemListDragHandler(class UIElement_ItemList* this, class ItemListDragHandler* arg2)

004e2590  {
004e2594      this->m_dragHandler = arg2;
004e2590  }

004e259d                                                                                         90 90 90                               ...

004e25a0  void __fastcall UIElement_ItemList::UnregisterItemListDragHandler(class UIElement_ItemList* this)

004e25a0  {
004e25a0      this->m_dragHandler = nullptr;
004e25a0  }

004e25ab                                   90 90 90 90 90                                                             .....

004e25b0  void __thiscall UIElement_ItemList::SetAsPendingItem(class UIElement_ItemList* this, class UIElement_UIItem* arg2)

004e25b0  {
004e25b4      this->m_pendingItem = arg2;
004e25b0  }

004e25bd                                                                                         90 90 90                               ...

004e25c0  void __fastcall UIElement_ItemList::DeletePendingItem(class UIElement_ItemList* this)

004e25c0  {
004e25c3      class UIElement_UIItem* m_pendingItem = this->m_pendingItem;
004e25c3      
004e25cb      if (m_pendingItem != 0)
004e25cb      {
004e25cd          UIElement_UIItem::Clear_UIItem(m_pendingItem);
004e25dd          UIElement_UIItem::UIItem_SetState(this->m_pendingItem, 0x1000001c);
004e25e2          this->m_pendingItem = nullptr;
004e25cb      }
004e25c0  }

004e25ee                                            90 90                                                                ..

004e25f0  int32_t __thiscall UIElement_ItemList::WhatDragScrollRegion(class UIElement_ItemList* this, int32_t arg2, int32_t arg3)

004e25f0  {
004e25fa      if (UIElement::IsVisible(this) == 0)
004e25ff          return 0;
004e25ff      
004e2602      int32_t eax;
004e2602      eax = this->m_dragScrollVertical;
004e2602      
004e2614      if (((eax != 0 && arg2 >= UIRegion::GetScreenX0(this)) && arg2 <= UIRegion::GetScreenX1(this)))
004e2614      {
004e2635          if ((arg3 < UIRegion::GetScreenY0(this) && arg3 >= (UIRegion::GetScreenY0(this) - this->m_dragScrollMarginHeight)))
004e2650              return 1;
004e2650          
004e265c          if ((arg3 > UIRegion::GetScreenY1(this) && arg3 <= (UIRegion::GetScreenY1(this) + this->m_dragScrollMarginHeight)))
004e2677              return 2;
004e2614      }
004e2614      
004e267a      eax = this->m_dragScrollHorizontal;
004e267a      
004e2682      if (((eax != 0 && arg3 >= UIRegion::GetScreenY0(this)) && arg3 <= UIRegion::GetScreenY1(this)))
004e2682      {
004e26a3          if ((arg2 < UIRegion::GetScreenX0(this) && arg2 >= (UIRegion::GetScreenX0(this) - this->m_dragScrollMarginWidth)))
004e26be              return 3;
004e26be          
004e26ca          if ((arg2 > UIRegion::GetScreenX1(this) && arg2 <= (UIRegion::GetScreenX1(this) + this->m_dragScrollMarginWidth)))
004e26e5              return 4;
004e2682      }
004e2682      
004e26ed      return 0;
004e25f0  }


004e26f0  void UIElement_ItemList::InqDropIconInfo(class UIElement const* arg1, uint32_t* arg2, uint32_t* arg3, enum DropItemFlags* arg4)

004e26f0  {
004e26f9      uint32_t* ebp = arg3;
004e26fe      class UIElement* esi = arg1;
004e2707      uint32_t* edi = arg2;
004e270b      *(uint32_t*)edi = 0;
004e270d      *(uint32_t*)ebp = 0;
004e2710      *(uint32_t*)arg4 = DROPITEM_FLAGS_NONE;
004e2710      
004e2712      if (esi != 0)
004e2712      {
004e2718          struct UIElement::VTable* vtable_1 = esi->vtable;
004e2726          uint32_t var_38 = 0;
004e272a          uint32_t var_34 = 0;
004e272e          int32_t* var_8 = nullptr;
004e2732          int32_t* var_4_1 = nullptr;
004e2732          
004e2746          if ((vtable_1->InqProperty(0x1000000f, &var_8) != 0 && var_4_1 != 0))
004e274f              *(uint32_t*)(*(uint32_t*)var_4_1 + 0x78)(&var_38);
004e274f          
004e2752          struct UIElement::VTable* vtable_2 = esi->vtable;
004e2760          int32_t* var_10 = nullptr;
004e2764          int32_t* var_c_1 = nullptr;
004e2764          
004e2778          if ((vtable_2->InqProperty(0x10000010, &var_10) != 0 && var_c_1 != 0))
004e2781              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x78)(&var_34);
004e2781          
004e2788          uint32_t edx_3 = var_34;
004e278c          *(uint32_t*)edi = var_38;
004e2793          *(uint32_t*)ebp = edx_3;
004e2796          struct UIElement::VTable* vtable = esi->vtable;
004e279f          char var_39 = 0;
004e27a3          arg1 = 0;
004e27a7          arg3 = 0;
004e27ab          arg2 = 0;
004e27af          int32_t* var_18 = nullptr;
004e27b3          int32_t* var_14_1 = nullptr;
004e27b3          
004e27c7          if ((vtable->InqProperty(0x10000011, &var_18) != 0 && var_14_1 != 0))
004e27d0              *(uint32_t*)(*(uint32_t*)var_14_1 + 0x70)(&var_39);
004e27d0          
004e27d3          struct UIElement::VTable* vtable_3 = esi->vtable;
004e27e1          int32_t* var_20 = nullptr;
004e27e5          int32_t* var_1c_1 = nullptr;
004e27e5          
004e27f9          if ((vtable_3->InqProperty(0x10000013, &var_20) != 0 && var_1c_1 != 0))
004e2802              *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x70)(&arg3);
004e2802          
004e2805          struct UIElement::VTable* vtable_4 = esi->vtable;
004e2813          int32_t* var_28 = nullptr;
004e2817          int32_t* var_24_1 = nullptr;
004e2817          
004e282b          if ((vtable_4->InqProperty(0x10000012, &var_28) != 0 && var_24_1 != 0))
004e2834              *(uint32_t*)(*(uint32_t*)var_24_1 + 0x70)(&arg1);
004e2834          
004e2837          struct UIElement::VTable* vtable_5 = esi->vtable;
004e2845          int32_t* var_30 = nullptr;
004e2849          int32_t* var_2c_1 = nullptr;
004e284d          int32_t eax_5;
004e284d          int32_t ecx_13;
004e284d          int32_t edx_7;
004e284d          eax_5 = vtable_5->InqProperty(0x10000014, &var_30);
004e2855          int32_t* esi_1 = var_2c_1;
004e2855          
004e285d          if ((eax_5 != 0 && esi_1 != 0))
004e285d          {
004e2868              eax_5 = *(uint32_t*)(*(uint32_t*)esi_1 + 0x70)(&arg2);
004e286b              esi_1 = var_2c_1;
004e285d          }
004e285d          
004e286f          ecx_13 = arg2;
004e2873          edx_7 = arg3;
004e2877          eax_5 = arg1;
004e287b          char temp0_1 = ecx_13;
004e287b          ecx_13 = -(ecx_13);
004e2882          char temp1_1 = edx_7;
004e2882          edx_7 = -(edx_7);
004e288b          char temp2_1 = eax_5;
004e288b          eax_5 = -(eax_5);
004e2894          int32_t eax_7;
004e2894          eax_7 = var_39;
004e28a0          int32_t edx_11;
004e28a0          edx_11 = eax_7 != 0;
004e28a5          *(uint32_t*)arg4 = (((((ecx_13 - ecx_13) & 8) | ((edx_7 - edx_7) & 2)) | ((eax_5 - eax_5) & 4)) | edx_11);
004e28a7          int32_t* eax_9 = var_30;
004e28a7          
004e28ad          if (eax_9 != 0)
004e28ad          {
004e28b7              int32_t esi_3 = (eax_9[1] - 1);
004e28b4              eax_9[1] = esi_3;
004e28b4              
004e28be              if (esi_3 == 0)
004e28c4                  **(uint32_t**)eax_9(1);
004e28c4              
004e28c6              esi_1 = var_2c_1;
004e28ca              var_30 = nullptr;
004e28ad          }
004e28ad          
004e28d0          if (esi_1 != 0)
004e28d0          {
004e28d9              int32_t esi_5 = (esi_1[1] - 1);
004e28d2              esi_1[1] = esi_5;
004e28d2              
004e28e0              if (esi_5 == 0)
004e28e6                  **(uint32_t**)esi_1(1);
004e28e6              
004e28e8              int32_t var_2c_2 = 0;
004e28d0          }
004e28d0          
004e28ec          int32_t* eax_13 = var_28;
004e28ec          
004e28f2          if (eax_13 != 0)
004e28f2          {
004e28fc              int32_t esi_7 = (eax_13[1] - 1);
004e28f9              eax_13[1] = esi_7;
004e28f9              
004e2903              if (esi_7 == 0)
004e2909                  **(uint32_t**)eax_13(1);
004e2909              
004e290b              var_28 = nullptr;
004e28f2          }
004e28f2          
004e2915          if (var_24_1 != 0)
004e2915          {
004e291f              int32_t esi_9 = (var_24_1[1] - 1);
004e291c              var_24_1[1] = esi_9;
004e291c              
004e2926              if (esi_9 == 0)
004e292c                  **(uint32_t**)var_24_1(1);
004e292c              
004e292e              int32_t var_24_2 = 0;
004e2915          }
004e2915          
004e2932          int32_t* eax_18 = var_20;
004e2932          
004e2938          if (eax_18 != 0)
004e2938          {
004e2942              int32_t esi_11 = (eax_18[1] - 1);
004e293f              eax_18[1] = esi_11;
004e293f              
004e2949              if (esi_11 == 0)
004e294f                  **(uint32_t**)eax_18(1);
004e294f              
004e2951              var_20 = nullptr;
004e2938          }
004e2938          
004e295b          if (var_1c_1 != 0)
004e295b          {
004e2965              int32_t esi_13 = (var_1c_1[1] - 1);
004e2962              var_1c_1[1] = esi_13;
004e2962              
004e296c              if (esi_13 == 0)
004e2972                  **(uint32_t**)var_1c_1(1);
004e2972              
004e2974              int32_t var_1c_2 = 0;
004e295b          }
004e295b          
004e2978          int32_t* eax_23 = var_18;
004e2978          
004e297e          if (eax_23 != 0)
004e297e          {
004e2988              int32_t esi_15 = (eax_23[1] - 1);
004e2985              eax_23[1] = esi_15;
004e2985              
004e298f              if (esi_15 == 0)
004e2995                  **(uint32_t**)eax_23(1);
004e2995              
004e2997              var_18 = nullptr;
004e297e          }
004e297e          
004e29a1          if (var_14_1 != 0)
004e29a1          {
004e29ab              int32_t esi_17 = (var_14_1[1] - 1);
004e29a8              var_14_1[1] = esi_17;
004e29a8              
004e29b2              if (esi_17 == 0)
004e29b8                  **(uint32_t**)var_14_1(1);
004e29b8              
004e29ba              int32_t var_14_2 = 0;
004e29a1          }
004e29a1          
004e29be          int32_t* eax_28 = var_10;
004e29be          
004e29c4          if (eax_28 != 0)
004e29c4          {
004e29ce              int32_t esi_19 = (eax_28[1] - 1);
004e29cb              eax_28[1] = esi_19;
004e29cb              
004e29d5              if (esi_19 == 0)
004e29db                  **(uint32_t**)eax_28(1);
004e29db              
004e29dd              var_10 = nullptr;
004e29c4          }
004e29c4          
004e29e7          if (var_c_1 != 0)
004e29e7          {
004e29f1              int32_t esi_21 = (var_c_1[1] - 1);
004e29ee              var_c_1[1] = esi_21;
004e29ee              
004e29f8              if (esi_21 == 0)
004e29fe                  **(uint32_t**)var_c_1(1);
004e29fe              
004e2a00              int32_t var_c_2 = 0;
004e29e7          }
004e29e7          
004e2a04          int32_t* eax_33 = var_8;
004e2a04          
004e2a0a          if (eax_33 != 0)
004e2a0a          {
004e2a14              int32_t esi_23 = (eax_33[1] - 1);
004e2a11              eax_33[1] = esi_23;
004e2a11              
004e2a1b              if (esi_23 == 0)
004e2a21                  **(uint32_t**)eax_33(1);
004e2a21              
004e2a23              var_8 = nullptr;
004e2a0a          }
004e2a0a          
004e2a2d          if (var_4_1 != 0)
004e2a2d          {
004e2a37              int32_t esi_25 = (var_4_1[1] - 1);
004e2a34              var_4_1[1] = esi_25;
004e2a34              
004e2a3e              if (esi_25 == 0)
004e2a44                  **(uint32_t**)var_4_1(1);
004e2a2d          }
004e2712      }
004e26f0  }

004e2a4e                                            90 90                                                                ..

004e2a50  uint8_t __thiscall UIElement_ItemList::PrepareDragIcon(class UIElement_ItemList* this, class UIElement_UIItem* arg2)

004e2a50  {
004e2a5a      int32_t esi;
004e2a5a      int32_t var_44 = esi;
004e2a5b      int32_t edi;
004e2a5b      int32_t var_48 = edi;
004e2a5f      class UIElement* m_dragIcon = arg2->m_dragIcon;
004e2a67      class UIElement_ItemList* this_1 = this;
004e2a67      
004e2a6b      if (m_dragIcon != 0)
004e2a6b      {
004e2a79          void* var_34;
004e2a79          int32_t* var_1c;
004e2a79          int32_t* var_18;
004e2a79          int32_t* var_14;
004e2a79          int32_t var_10;
004e2a79          
004e2a79          if (arg2->itemID != 0)
004e2a79          {
004e2a81              UIRegion::ClearImage(m_dragIcon);
004e2a8d              class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(arg2->itemID);
004e2a8d              
004e2a99              if (eax_3 != 0)
004e2a99              {
004e2a9f                  UIRegion::SetBlitMode(m_dragIcon, Blit_3Alpha);
004e2aa6                  void* eax_4 = operator new(0xc);
004e2ab4                  class Graphic* eax_6;
004e2ab4                  
004e2ab4                  if (eax_4 == 0)
004e2ac9                      eax_6 = nullptr;
004e2ab4                  else
004e2ac2                      eax_6 = Graphic::Graphic(eax_4, ACCWeenieObject::GetDragIcon(eax_3));
004e2ac2                  
004e2ace                  UIRegion::SetImage(m_dragIcon, eax_6);
004e2a99              }
004e2a99              
004e2ade              var_10 = 0;
004e2ae2              int32_t* var_c = nullptr;
004e2ae6              BaseProperty::SetPropertyName(&var_10, 0x1000000f);
004e2af1              uint32_t itemID = arg2->itemID;
004e2af1              
004e2af7              if (var_c != 0)
004e2af7              {
004e2afd                  BaseProperty::CheckCopyOnWrite(&var_10);
004e2b09                  *(uint32_t*)(*(uint32_t*)var_c + 0x7c)(itemID);
004e2af7              }
004e2af7              
004e2b0c              m_dragIcon->vtable->SetProperty(&var_10);
004e2b26              var_18 = nullptr;
004e2b2a              var_14 = nullptr;
004e2b2e              BaseProperty::SetPropertyName(&var_18, 0x10000011);
004e2b37              int32_t isContainer = arg2->isContainer;
004e2b37              
004e2b3d              if (var_14 != 0)
004e2b3d              {
004e2b43                  BaseProperty::CheckCopyOnWrite(&var_18);
004e2b50                  int32_t eax_9;
004e2b50                  eax_9 = isContainer != 0;
004e2b54                  *(uint32_t*)(*(uint32_t*)var_14 + 0x74)(eax_9);
004e2b3d              }
004e2b3d              
004e2b57              m_dragIcon->vtable->SetProperty(&var_18);
004e2b6f              int32_t* var_20 = nullptr;
004e2b73              var_1c = nullptr;
004e2b77              BaseProperty::SetPropertyName(&var_20, 0x10000013);
004e2b7c              class UIElement_ItemList* this_3 = this_1;
004e2b8a              var_34 = this_3->vendorItemList;
004e2b8a              
004e2b8e              if (var_1c != 0)
004e2b8e              {
004e2b94                  BaseProperty::CheckCopyOnWrite(&var_20);
004e2ba4                  *(uint32_t*)(*(uint32_t*)var_1c + 0x74)(var_34);
004e2b8e              }
004e2b8e              
004e2ba7              m_dragIcon->vtable->SetProperty(&var_20);
004e2bbf              int32_t* var_2c = nullptr;
004e2bc3              int32_t* var_28 = nullptr;
004e2bc7              BaseProperty::SetPropertyName(&var_2c, 0x10000012);
004e2bd6              this_1 = this_3->shortcutList;
004e2bd6              
004e2bda              if (var_28 != 0)
004e2bda              {
004e2be0                  BaseProperty::CheckCopyOnWrite(&var_2c);
004e2bf0                  *(uint32_t*)(*(uint32_t*)var_28 + 0x74)(this_1);
004e2bda              }
004e2bda              
004e2bf3              m_dragIcon->vtable->SetProperty(&var_2c);
004e2c0b              this_1 = nullptr;
004e2c0f              int32_t* var_34_1 = nullptr;
004e2c13              BaseProperty::SetPropertyName(&this_1, 0x10000014);
004e2c1c              uint8_t salvageList = this_3->salvageList;
004e2c1c              
004e2c26              if (var_34_1 != 0)
004e2c26              {
004e2c2c                  BaseProperty::CheckCopyOnWrite(&this_1);
004e2c3c                  *(uint32_t*)(*(uint32_t*)var_34_1 + 0x74)(salvageList);
004e2c26              }
004e2c26              
004e2c3f              m_dragIcon->vtable->SetProperty(&this_1);
004e2c4e              int32_t* eax_13 = salvageList;
004e2c4e              
004e2c54              if (eax_13 != 0)
004e2c54              {
004e2c5e                  int32_t esi_2 = (eax_13[1] - 1);
004e2c5b                  eax_13[1] = esi_2;
004e2c5b                  
004e2c65                  if (esi_2 == 0)
004e2c6b                      **(uint32_t**)eax_13(1);
004e2c6b                  
004e2c6d                  uint8_t var_3c;
004e2c6d                  var_3c = 0;
004e2c54              }
004e2c54              
004e2c71              class UIElement_ItemList* this_2 = this_1;
004e2c71              
004e2c77              if (this_2 != 0)
004e2c77              {
004e2c81                  void* __offset(HashSet<UIElement *>::VTable, -0x1) esi_4 = (this_2->m_hashElementsRegisteredWith.vtable - 1);
004e2c7e                  this_2->m_hashElementsRegisteredWith.vtable = esi_4;
004e2c7e                  
004e2c88                  if (esi_4 == 0)
004e2c8a                      this_2->vtable->__vecDelDtor(1);
004e2c8a                  
004e2c90                  this_1 = nullptr;
004e2c77              }
004e2c77              
004e2c9a              if (var_34_1 != 0)
004e2c9a              {
004e2ca4                  int32_t esi_6 = (var_34_1[1] - 1);
004e2ca1                  var_34_1[1] = esi_6;
004e2ca1                  
004e2cab                  if (esi_6 == 0)
004e2cb1                      **(uint32_t**)var_34_1(1);
004e2cb1                  
004e2cb3                  int32_t var_34_2 = 0;
004e2c9a              }
004e2c9a              
004e2cbd              int32_t* var_30;
004e2cbd              
004e2cbd              if (var_30 != 0)
004e2cbd              {
004e2cc7                  int32_t esi_8 = (var_30[1] - 1);
004e2cc4                  var_30[1] = esi_8;
004e2cc4                  
004e2cce                  if (esi_8 == 0)
004e2cd4                      **(uint32_t**)var_30(1);
004e2cd4                  
004e2cd6                  int32_t var_30_1 = 0;
004e2cbd              }
004e2cbd              
004e2cda              int32_t* eax_22 = var_2c;
004e2cda              
004e2ce0              if (eax_22 != 0)
004e2ce0              {
004e2cea                  int32_t esi_10 = (eax_22[1] - 1);
004e2ce7                  eax_22[1] = esi_10;
004e2ce7                  
004e2cf1                  if (esi_10 == 0)
004e2cf7                      **(uint32_t**)eax_22(1);
004e2cf7                  
004e2cf9                  var_2c = nullptr;
004e2ce0              }
004e2ce0              
004e2d03              if (var_28 != 0)
004e2d03              {
004e2d0d                  int32_t esi_12 = (var_28[1] - 1);
004e2d0a                  var_28[1] = esi_12;
004e2d0a                  
004e2d14                  if (esi_12 == 0)
004e2d1a                      **(uint32_t**)var_28(1);
004e2d1a                  
004e2d1c                  int32_t var_28_1 = 0;
004e2d03              }
004e2d03              
004e2d26              int32_t* var_24;
004e2d26              
004e2d26              if (var_24 != 0)
004e2d26              {
004e2d30                  int32_t esi_14 = (var_24[1] - 1);
004e2d2d                  var_24[1] = esi_14;
004e2d2d                  
004e2d37                  if (esi_14 == 0)
004e2d3d                      **(uint32_t**)var_24(1);
004e2d3d                  
004e2d3f                  int32_t var_24_1 = 0;
004e2d26              }
004e2d26              
004e2d43              int32_t* eax_29 = var_20;
004e2d43              
004e2d49              if (eax_29 != 0)
004e2d49              {
004e2d53                  int32_t esi_16 = (eax_29[1] - 1);
004e2d50                  eax_29[1] = esi_16;
004e2d50                  
004e2d5a                  if (esi_16 == 0)
004e2d60                      **(uint32_t**)eax_29(1);
004e2d60                  
004e2d62                  var_20 = nullptr;
004e2d49              }
004e2d49              
004e2d66              int32_t* eax_32 = var_1c;
004e2d66              
004e2d6c              if (eax_32 != 0)
004e2d6c              {
004e2d76                  int32_t esi_18 = (eax_32[1] - 1);
004e2d73                  eax_32[1] = esi_18;
004e2d73                  
004e2d7d                  if (esi_18 == 0)
004e2d83                      **(uint32_t**)eax_32(1);
004e2d83                  
004e2d85                  var_1c = nullptr;
004e2d6c              }
004e2d6c              
004e2d89              int32_t* eax_34 = var_18;
004e2d89              
004e2d8f              if (eax_34 != 0)
004e2d8f              {
004e2d91                  int32_t esi_19 = eax_34[1];
004e2d96                  eax_34[1] = (esi_19 - 1);
004e2d96                  
004e2da0                  if (esi_19 == 1)
004e2da6                      **(uint32_t**)eax_34(1);
004e2d8f              }
004e2d8f              
004e2da8              eax_34 = 1;
004e2db0              return 1;
004e2a79          }
004e2a79          
004e2dbb          if (arg2->spellID != 0)
004e2dbb          {
004e2dc3              uint32_t edx_24 = UIRegion::ClearImage(m_dragIcon);
004e2dce              uint32_t spellID = arg2->spellID;
004e2dd6              class Graphic* eax_38 = ClientMagicSystem::GetSpellIcon(ClientMagicSystem::GetMagicSystem(), edx_24);
004e2dd6              
004e2ddf              if (eax_38 != 0)
004e2ddf              {
004e2de5                  UIRegion::SetBlitMode(m_dragIcon, Blit_3Alpha);
004e2dec                  class Graphic* eax_39 = operator new(0xc);
004e2df6                  class Graphic* eax_40;
004e2df6                  
004e2df6                  if (eax_39 == 0)
004e2e02                      eax_40 = nullptr;
004e2df6                  else
004e2dfb                      eax_40 = Graphic::Graphic(eax_39, eax_38);
004e2dfb                  
004e2e07                  UIRegion::SetImage(m_dragIcon, eax_40);
004e2ddf              }
004e2ddf              
004e2e17              var_18 = nullptr;
004e2e1b              var_14 = nullptr;
004e2e1f              BaseProperty::SetPropertyName(&var_18, 0x10000010);
004e2e28              uint32_t spellID_1 = arg2->spellID;
004e2e28              
004e2e32              if (var_14 != 0)
004e2e32              {
004e2e38                  BaseProperty::CheckCopyOnWrite(&var_18);
004e2e44                  *(uint32_t*)(*(uint32_t*)var_14 + 0x7c)(spellID_1);
004e2e32              }
004e2e32              
004e2e47              m_dragIcon->vtable->SetProperty(&var_18);
004e2e5f              var_10 = 0;
004e2e63              int32_t* var_c_1 = nullptr;
004e2e67              BaseProperty::SetPropertyName(&var_10, 0x10000012);
004e2e76              var_34 = this_1->shortcutList;
004e2e76              
004e2e7e              if (var_c_1 != 0)
004e2e7e              {
004e2e84                  BaseProperty::CheckCopyOnWrite(&var_10);
004e2e94                  *(uint32_t*)(*(uint32_t*)var_c_1 + 0x74)(var_34);
004e2e7e              }
004e2e7e              
004e2e97              m_dragIcon->vtable->SetProperty(&var_10);
004e2eaa              BaseProperty::~BaseProperty(&var_14);
004e2eb3              BaseProperty::~BaseProperty(&var_1c);
004e2eb8              int32_t eax_45;
004e2eb8              eax_45 = 1;
004e2ec0              return 1;
004e2dbb          }
004e2a6b      }
004e2a6b      
004e2ec5      uint32_t eax;
004e2ec5      eax = 0;
004e2ecb      return 0;
004e2a50  }

004e2ece                                            90 90                                                                ..

004e2ed0  int32_t __thiscall UIElement_ItemList::ItemList_IsInList(class UIElement_ItemList* this, uint32_t arg2)

004e2ed0  {
004e2edb      int32_t i = 0;
004e2edb      
004e2edf      if (this->m_listItems.m_num > 0)
004e2edf      {
004e2f14          do
004e2f14          {
004e2eeb              int32_t* ecx = this->m_listItems.m_data[i];
004e2eeb              
004e2ef0              if (ecx != 0)
004e2ef0              {
004e2ef9                  void* eax_2 = *(uint32_t*)(*(uint32_t*)ecx + 0x94)(0x10000032);
004e2ef9                  
004e2f09                  if ((eax_2 != 0 && *(uint32_t*)((char*)eax_2 + 0x5fc) == arg2))
004e2f26                      return 1;
004e2ef0              }
004e2ef0              
004e2f11              i += 1;
004e2f14          } while (i < this->m_listItems.m_num);
004e2edf      }
004e2edf      
004e2f1b      return 0;
004e2ed0  }

004e2f29                             90 90 90 90 90 90 90                                                           .......

004e2f30  class UIElement_UIItem* __thiscall UIElement_ItemList::ItemList_GetItem(class UIElement_ItemList* this, uint32_t arg2)

004e2f30  {
004e2f3b      int32_t i = 0;
004e2f3b      
004e2f3f      if (this->m_listItems.m_num > 0)
004e2f3f      {
004e2f74          do
004e2f74          {
004e2f4b              int32_t* ecx = this->m_listItems.m_data[i];
004e2f4b              
004e2f50              if (ecx != 0)
004e2f50              {
004e2f59                  void* const result = *(uint32_t*)(*(uint32_t*)ecx + 0x94)(0x10000032);
004e2f59                  
004e2f69                  if ((result != 0 && *(uint32_t*)((char*)result + 0x5fc) == arg2))
004e2f7b                      return result;
004e2f50              }
004e2f50              
004e2f71              i += 1;
004e2f74          } while (i < this->m_listItems.m_num);
004e2f3f      }
004e2f3f      
004e2f76      return nullptr;
004e2f30  }

004e2f7e                                                                                            90 90                                ..

004e2f80  int32_t __fastcall UIElement_ItemList::GetNumUIItems(class UIElement_ItemList* this)

004e2f80  {
004e2f8b      int32_t result = 0;
004e2f8d      uint32_t i = 0;
004e2f8d      
004e2f91      if (this->m_listItems.m_num > 0)
004e2f91      {
004e2fca          do
004e2fca          {
004e2f96              class UIElement* eax_1 = UIElement_ListBox::GetItem(this, i);
004e2f96              
004e2f9d              if (eax_1 != 0)
004e2f9d              {
004e2fa8                  class UIElement_UIItem* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
004e2fa8                  
004e2fb0                  if ((eax_2 != 0 && UIElement_UIItem::UIItem_GetState(eax_2) != 0x1000001c))
004e2fc0                      result += 1;
004e2f9d              }
004e2f9d              
004e2fc7              i += 1;
004e2fca          } while (i < this->m_listItems.m_num);
004e2f91      }
004e2f91      
004e2fd1      return result;
004e2f80  }

004e2fd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004e2fe0  void __thiscall UIElement_ItemList::ItemList_SetSelectedItem(class UIElement_ItemList* this, uint32_t arg2, uint32_t arg3)

004e2fe0  {
004e2fea      int32_t i = 0;
004e2fea      
004e2fee      if (this->m_listItems.m_num > 0)
004e2fee      {
004e305d          do
004e305d          {
004e3006              int32_t* ecx = this->m_listItems.m_data[i];
004e3006              
004e300b              if (ecx != 0)
004e300b              {
004e3014                  class UIElement_UIItem* eax_2 = *(uint32_t*)(*(uint32_t*)ecx + 0x94)(0x10000032);
004e3014                  
004e3028                  if ((eax_2 != 0 && eax_2->spellID == 0))
004e3028                  {
004e3034                      if (eax_2->itemID == arg2)
004e303a                          UIElement_UIItem::SetSelectedState(eax_2, 0);
004e303a                      
004e3049                      if ((eax_2->itemID == arg3 && arg3 != 0))
004e304f                          UIElement_UIItem::SetSelectedState(eax_2, 1);
004e3028                  }
004e300b              }
004e300b              
004e305a              i += 1;
004e305d          } while (i < this->m_listItems.m_num);
004e2fee      }
004e2fe0  }

004e2ff8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
004e3066                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e3070  void __thiscall UIElement_ItemList::UpdateOpenContainerIndicator(class UIElement_ItemList* this, uint32_t arg2)

004e3070  {
004e307a      int32_t i = 0;
004e307a      
004e307e      if (this->m_listItems.m_num > 0)
004e307e      {
004e30c5          do
004e30c5          {
004e308b              int32_t* ecx = this->m_listItems.m_data[i];
004e308b              
004e3090              if (ecx != 0)
004e3090              {
004e3099                  class UIElement_UIItem* eax_2 = *(uint32_t*)(*(uint32_t*)ecx + 0x94)(0x10000032);
004e3099                  
004e30a3                  if (eax_2 != 0)
004e30a3                  {
004e30af                      uint8_t var_10_1;
004e30af                      
004e30af                      if ((arg2 == 0 || eax_2->itemID != arg2))
004e30b5                          var_10_1 = 0;
004e30af                      else
004e30b1                          var_10_1 = 1;
004e30b1                      
004e30b7                      UIElement_UIItem::SetOpenContainerState(eax_2, var_10_1);
004e30a3                  }
004e3090              }
004e3090              
004e30c2              i += 1;
004e30c5          } while (i < this->m_listItems.m_num);
004e307e      }
004e3070  }

004e30cd                                         90 90 90                                                               ...

004e30d0  void __fastcall UIElement_ItemList::TrackDragScrolling(class UIElement_ItemList* this)

004e30d0  {
004e30f5      int32_t ecx_3 = UIElement_ItemList::WhatDragScrollRegion(this, ICIDM::s_cidm->vtable->GetMouseX(), ICIDM::s_cidm->vtable->GetMouseY());
004e30f7      int32_t eax_3;
004e30f7      eax_3 = this->m_inDragScrollRegion;
004e30f7      
004e30ff      if (eax_3 != 0)
004e30ff      {
004e3107          if (ecx_3 == 0)
004e3107          {
004e310a              this->m_inDragScrollRegion = ecx_3;
004e3111              return;
004e3107          }
004e3107          
004e3112          long double x87_r7_1 = ((long double)Timer::cur_time);
004e3118          long double temp0_1 = ((long double)this->m_nextDragScrollTime);
004e3118          (x87_r7_1 - temp0_1);
004e311e          eax_3 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004e311e          
004e3123          if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
004e3123          {
004e313b              this->m_nextDragScrollTime = ((double)(((long double)this->m_dragScrollDelay) + ((long double)Timer::cur_time)));
004e313b              
004e3141              if ((ecx_3 - 1) <= 3)
004e3147                  switch (ecx_3)
004e3147                  {
004e315d                      case 1:
004e315d                      {
004e315d                          UIElement_ListBox::ScrollToY(this, (this->m_iScrollableY - this->m_dragScrollJumpDistance));
004e315d                          break;
004e315d                      }
004e3174                      case 2:
004e3174                      {
004e3174                          UIElement_ListBox::ScrollToY(this, (this->m_dragScrollJumpDistance + this->m_iScrollableY));
004e3174                          break;
004e3174                      }
004e318d                      case 3:
004e318d                      {
004e318d                          UIElement_ListBox::ScrollToX(this, (this->m_iScrollableX - this->m_dragScrollJumpDistance));
004e318d                          break;
004e318d                      }
004e31a4                      case 4:
004e31a4                      {
004e31a4                          UIElement_ListBox::ScrollToX(this, (this->m_dragScrollJumpDistance + this->m_iScrollableX));
004e31a4                          break;
004e31a4                      }
004e3147                  }
004e3123          }
004e30ff      }
004e30ff      else if (ecx_3 != 0)
004e31ae      {
004e31b0          long double x87_r7_4 = ((long double)this->m_dragScrollDelay);
004e31b6          this->m_inDragScrollRegion = 1;
004e31c3          this->m_nextDragScrollTime = ((double)(x87_r7_4 + ((long double)Timer::cur_time)));
004e31ae      }
004e30d0  }

004e31cc  uint32_t jump_table_4e31cc[0x4] = 
004e31cc  {
004e31cc      [0x0] =  0x004e314e
004e31d0      [0x1] =  0x004e3165
004e31d4      [0x2] =  0x004e317c
004e31d8      [0x3] =  0x004e3195
004e31dc  }

004e31dc                                                                                      90 90 90 90                              ....

004e31e0  uint8_t __thiscall UIElement_ItemList::InqAvailableProperties(class UIElement_ItemList const* this, class AvailablePropertySet* arg2)

004e31e0  {
004e31e6      int32_t ebx;
004e31e6      ebx = 1;
004e31e6      
004e31ef      if (UIElement_ListBox::InqAvailableProperties(this, arg2) == 0)
004e31f1          ebx = 0;
004e31f1      
004e31f7      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
004e31fc      class AvailablePropertySet* ecx_1 = arg2;
004e31fc      
004e3202      if (ecx_1 == 0)
004e3202      {
004e3204          int32_t eax_1;
004e3204          eax_1 = 0;
004e3207          return 0;
004e3202      }
004e3202      
004e320c      *(int32_t*)((char*)ecx_1->m_reqHash.vtable + 0x14)();
004e3212      return ebx;
004e31e0  }

004e3215                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004e3220  void __thiscall UIElement_ItemList::ListenToGlobalMessage(class UIElement_ItemList* this, uint32_t arg2, int32_t arg3)

004e3220  {
004e3225      if (arg2 == 3)
004e3225      {
004e3234          if (UIElementManager::s_pInstance->m_dragElement == 0)
004e3234          {
004e3238              this->m_inDragScrollRegion = 0;
004e323f              UIListener::UnRegisterForGlobalMessage(this, 3);
004e3244              return;
004e3234          }
004e3234          
004e3247          UIElement_ItemList::TrackDragScrolling(this);
004e3225      }
004e3220  }

004e324f                                               90                                                                 .

004e3250  void __thiscall UIElement_ItemList::HandleSingleSelection(class UIElement_ItemList* this, class UIElement_UIItem* arg2)

004e3250  {
004e3256      int32_t eax = UIElement_ItemList::GetNumUIItems(this);
004e325d      uint32_t edi = 0;
004e325d      
004e3261      if (eax > 0)
004e3261      {
004e32af          do
004e32af          {
004e3266              class UIElement* eax_1 = UIElement_ListBox::GetItem(this, edi);
004e3266              
004e326d              if (eax_1 != 0)
004e326d              {
004e3278                  class UIElement_UIItem* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
004e3278                  
004e3298                  if ((eax_2 != 0 && (eax_2->itemID == arg2->itemID && eax_2 != arg2)))
004e3298                  {
004e329e                      UIElement_UIItem::SetSelectableState(eax_2, 0);
004e32a7                      UIElement_UIItem::SetSelectedState(eax_2, 0);
004e3298                  }
004e326d              }
004e326d              
004e32ac              edi += 1;
004e32af          } while (edi < eax);
004e3261      }
004e3261      
004e32b9      UIElement_UIItem::SetSelectableState(arg2, 1);
004e32c2      UIElement_UIItem::SetSelectedState(arg2, 1);
004e3250  }

004e32ce                                            90 90                                                                ..

004e32d0  void __thiscall UIElement_ItemList::ItemList_BeginDrag(class UIElement_ItemList* this, int32_t arg2, int32_t arg3)

004e32d0  {
004e32d0      class UIElement_ItemList* this_1 = this;
004e32de      UIElement::GetAttribute_Bool(this, 0x10000016, &*(uint32_t*)((char*)this_1)[3]);
004e32de      
004e32e9      if (*(uint8_t*)((char*)this_1)[3] != 0)
004e32e9      {
004e32fa          int32_t ecx_2 = (arg3 - UIRegion::GetScreenY0(this));
004e330d          class UIElement* eax_3 = UIElement_ListBox::GetItemAtPoint(this, (arg2 - UIRegion::GetScreenX0(this)), ecx_2);
004e330d          
004e3314          if (eax_3 != 0)
004e3314          {
004e3324              class UIElement_UIItem* eax_4 = eax_3->vtable->DynamicCast(0x10000032);
004e3324              
004e332e              if ((eax_4 != 0 && UIElement_ItemList::PrepareDragIcon(this, eax_4) != 0))
004e332e              {
004e334c                  if (eax_4->selected == 0)
004e3357                      ACCWeenieObject::SetSelectedObject(eax_4->itemID, 0);
004e3357                  
004e335f                  int32_t eax_6;
004e335f                  eax_6 = this->vendorItemList;
004e335f                  
004e3367                  if (eax_6 == 0)
004e3367                  {
004e3369                      eax_6 = this->salvageList;
004e3369                      
004e3371                      if (eax_6 == 0)
004e3371                      {
004e3373                          eax_6 = this->shortcutList;
004e3373                          
004e337b                          if (eax_6 == 0)
004e3381                              UIElement_UIItem::SetWaitingState(eax_4, 1);
004e3371                      }
004e3367                  }
004e3367                  
004e3397                  UIElementManager::StartDragandDrop(UIElementManager::s_pInstance, eax_4->m_dragIcon, 0x10, 0x10);
004e33b8                  uint8_t eax_9;
004e33b8                  
004e33b8                  if (((this->vendorItemList != 0 || this->salvageList != 0) || this->shortcutList != 0))
004e33be                      eax_9 = 1;
004e33b8                  else
004e33ba                      eax_9 = 0;
004e33ba                  
004e33d2                  CM_Item::SendNotice_BeginDrag(eax_4->itemID, eax_4->spellID, eax_9);
004e33e4                  CM_Item::SendNotice_ItemListBeginDrag(this, UIElement_ListBox::WhatNum(this, eax_4));
004e332e              }
004e3314          }
004e32e9      }
004e32d0  }

004e33f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004e3400  void __fastcall UIElement_ItemList::ItemList_DragOver(class UIElement_ItemList* this, class UIElement* arg2, class UIElement_UIItem* arg3)

004e3400  {
004e3400      class UIElement_ItemList* this_1 = this;
004e3401      class UIElement* eax = arg2;
004e3401      
004e340a      if (eax != 0)
004e340a      {
004e3413          class UIElement_UIItem* edi_1 = arg3;
004e3413          
004e3419          if (edi_1 != 0)
004e3419          {
004e342f              UIElement_ItemList::InqDropIconInfo(eax, &arg3, &this_1, &arg2);
004e3434              class ItemListDragHandler* m_dragHandler = this->m_dragHandler;
004e343a              class UIElement* ebx_1 = arg2;
004e343e              class UIElement_UIItem* ebp_1 = arg3;
004e3447              uint8_t containerList;
004e3447              
004e3447              if (m_dragHandler != 0)
004e3453                  containerList = m_dragHandler->vtable->OnItemListDragOver(edi_1, ebp_1, this_1, ebx_1);
004e3453              
004e3492              if (((m_dragHandler == 0 || containerList == 0) && (this->vendorItemList == 0 && (this->salvageList == 0 && (this->shortcutList == 0 && (ebp_1 != 0 && (ebx_1 & 0xe) == 0))))))
004e3492              {
004e349b                  containerList = this->containerList;
004e349b                  
004e34a3                  if ((ebx_1 & 1) == 0)
004e34a3                  {
004e34bd                      if (containerList != 0)
004e34bd                      {
004e34c9                          if (UIElement_UIItem::UIItem_GetState(edi_1) != 0x1000001c)
004e34c9                          {
004e34d2                              class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(edi_1->itemID);
004e34d2                              
004e34dc                              if ((eax_4 != 0 && ACCWeenieObject::GetNumEmptyItemSlots(eax_4) != 0))
004e34dc                              {
004e34f0                                  UIElement_UIItem::SetDragAcceptState(edi_1, 0x10000046);
004e34fa                                  return;
004e34dc                              }
004e34c9                          }
004e34c9                          
004e3504                          UIElement_UIItem::SetDragAcceptState(edi_1, 0x10000041);
004e350e                          return;
004e34bd                      }
004e34a3                  }
004e34a3                  else if (containerList == 0)
004e34a7                  {
004e34ae                      UIElement_UIItem::SetDragAcceptState(edi_1, 0x10000041);
004e34b8                      return;
004e34a7                  }
004e34a7                  
004e3516                  UIElement_UIItem::SetDragAcceptState(edi_1, 0x10000040);
004e3492              }
004e3419          }
004e340a      }
004e3400  }

004e3523           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e3530  uint8_t __thiscall UIElement_ItemList::InternalDeleteItem(class UIElement_ItemList* this, class UIElement_UIItem* arg2)

004e3530  {
004e3540      int32_t ebx;
004e3540      ebx = UIElement_ListBox::RemoveItem(this, arg2) != 0;
004e3540      
004e3545      if (ebx != 0)
004e3552          List<PFileNode *>::push_back(&this->m_listUIItemCache, &arg2);
004e3552      
004e3558      class UIElement* eax;
004e3558      eax = ebx;
004e355b      return eax;
004e3530  }

004e355e                                                                                            90 90                                ..

004e3560  void __thiscall UIElement_ItemList::RecvNotice_SetSelectedItem(class UIElement_ItemList* this, uint32_t arg2, uint32_t arg3)

004e3560  {
004e3566      /* tailcall */
004e3566      return UIElement_ItemList::ItemList_SetSelectedItem(((char*)this - 0x668), arg2, arg3);
004e3560  }

004e356b                                   90 90 90 90 90                                                             .....

004e3570  class UIElement_UIItem* __fastcall UIElement_ItemList::InternalCreateItem(class UIElement_ItemList* this)

004e3570  {
004e3570      class UIElement_ItemList* this_1 = this;
004e3574      class ListNode<UIElement_UIItem *>* _head = this->m_listUIItemCache._head;
004e3574      
004e3581      if ((_head != 0 && _head != 0))
004e3581      {
004e3583          class ListNode<UIElement_UIItem *>* next = _head->next;
004e3588          this->m_listUIItemCache._head = next;
004e3588          
004e358e          if (next == 0)
004e3599              this->m_listUIItemCache._tail = nullptr;
004e358e          else
004e3590              next->prev = nullptr;
004e3590          
004e35a3          class UIElement_UIItem* data = _head->data;
004e35a6          operator delete(_head);
004e35b7          this->m_listUIItemCache._num_elements -= 1;
004e35b7          
004e35bd          if (data != 0)
004e35bd          {
004e35c6              UIElement_UIItem::UIItem_SetState(data, 0x1000001c);
004e35d2              UIElement_UIItem::SetDragAcceptState(data, 0x1000003f);
004e35dc              return data;
004e35bd          }
004e3581      }
004e3581      
004e35e9      int32_t eax_1;
004e35e9      uint32_t ecx_6;
004e35e9      int32_t edx;
004e35e9      eax_1 = UIElement::GetAttribute_Enum(this, 0x1000000e, &this_1);
004e35ee      int32_t var_10_3 = 0x23;
004e35f0      int32_t var_14 = 5;
004e35f2      int32_t var_18 = 0x10000038;
004e35f7      class DBObj* eax_2 = DBObj::GetByEnum(eax_1, edx, ecx_6);
004e35f7      
004e3603      if (eax_2 == 0)
004e3608          return eax_2;
004e3608      
004e3616      class UIElement* eax_3 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance, this, eax_2, this_1);
004e3616      
004e361d      if (eax_3 == 0)
004e361d      {
004e363d          eax_2->vtable->Release();
004e364b          return 0;
004e361d      }
004e361d      
004e3628      int32_t eax_4 = eax_3->vtable->DynamicCast(0x10000032);
004e3630      eax_2->vtable->Release();
004e363c      return eax_4;
004e3570  }

004e364c                                      90 90 90 90                                                              ....

004e3650  void __thiscall UIElement_ItemList::ItemList_SetParentList(class UIElement_ItemList* this, class UIElement_ItemList* arg2)

004e3650  {
004e3653      class UIElement_ItemList* parentList = this->parentList;
004e3653      
004e365c      if (parentList == 0)
004e365c      {
004e369a          this->parentList = arg2;
004e36a1          return;
004e365c      }
004e365c      
004e3660      if (parentList == this)
004e3660      {
004e368b          this->parentList = arg2;
004e3692          return;
004e3660      }
004e3660      
004e3668      if (parentList != arg2)
004e3668      {
004e366c          parentList->openItemID = 0;
004e3676          UIElement_ItemList::UpdateOpenContainerIndicator(parentList, 0);
004e3668      }
004e3668      
004e367b      this->parentList = arg2;
004e3650  }

004e36a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004e36b0  void __thiscall UIElement_ItemList::ItemList_AddEmptySlot(class UIElement_ItemList* this, int32_t arg2)

004e36b0  {
004e36b4      class UIElement_UIItem* eax = UIElement_ItemList::InternalCreateItem(this);
004e36b4      
004e36bd      if (eax != 0)
004e36bd      {
004e36c1          UIElement_UIItem::Clear_UIItem(eax);
004e36cd          UIElement_UIItem::UIItem_SetState(eax, 0x1000001c);
004e36bd      }
004e36bd      
004e36db      if (arg2 == 0xffffffff)
004e36db      {
004e36de          UIElement_ListBox::AddItem(this, eax);
004e36e5          return;
004e36db      }
004e36db      
004e36ea      UIElement_ListBox::InsertItem(this, eax, arg2);
004e36b0  }

004e36f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004e3700  void __fastcall UIElement_ItemList::UpdateEmptySlots(class UIElement_ItemList* this)

004e3700  {
004e370d      if (UIElement::IsVisible(this) != 0)
004e370d      {
004e3722          int32_t var_c;
004e3722          UIElement::GetAttribute_Int(this, 0x10000015, &var_c);
004e3722          
004e3730          if (var_c == 0xffffffff)
004e3730          {
004e3738              int32_t eax_2 = UIRegion::GetWidth(this);
004e3741              UIRegion::GetHeight(this);
004e374f              int32_t var_8;
004e374f              UIElement::GetAttribute_Int(this, 0x5f, &var_8);
004e375d              int32_t var_4;
004e375d              UIElement::GetAttribute_Int(this, 0x60, &var_4);
004e375d              
004e3766              if (var_8 == 0xffffffff)
004e3766              {
004e376c                  int32_t m_cellW = this->m_cellW;
004e3778                  int32_t ecx_6 = (this->m_listItems.m_num * m_cellW);
004e3778                  
004e377d                  if (ecx_6 < eax_2)
004e377d                  {
004e3784                      int32_t i_2 = (((int64_t)(eax_2 - ecx_6)) / m_cellW);
004e3784                      
004e3788                      if (i_2 > 0)
004e3788                      {
004e378e                          int32_t i_1 = i_2;
004e37b9                          int32_t i;
004e37b9                          
004e37b9                          do
004e37b9                          {
004e3792                              class UIElement_UIItem* eax_7 = UIElement_ItemList::InternalCreateItem(this);
004e3792                              
004e379b                              if (eax_7 != 0)
004e379b                              {
004e379f                                  UIElement_UIItem::Clear_UIItem(eax_7);
004e37ab                                  UIElement_UIItem::UIItem_SetState(eax_7, 0x1000001c);
004e379b                              }
004e379b                              
004e37b3                              UIElement_ListBox::AddItem(this, eax_7);
004e37b8                              i = i_1;
004e37b8                              i_1 -= 1;
004e37b9                          } while (i != 1);
004e3788                      }
004e377d                  }
004e377d                  else if (ecx_6 > eax_2)
004e37bd                  {
004e37c8                      int32_t temp0_1 = (((int64_t)(((m_cellW - eax_2) + ecx_6) - 1)) / m_cellW);
004e37ca                      int32_t ebx_2 = 0;
004e37ca                      
004e37d0                      if (temp0_1 > 0)
004e37d0                      {
004e3813                          do
004e3813                          {
004e37dc                              class UIElement* eax_15 = UIElement_ListBox::GetItem(this, (this->m_listItems.m_num - 1));
004e37dc                              
004e37e3                              if (eax_15 == 0)
004e37e3                                  break;
004e37e3                              
004e37ee                              class UIElement_UIItem* eax_16 = eax_15->vtable->DynamicCast(0x10000032);
004e37ee                              
004e37f8                              if (eax_16 == 0)
004e37f8                                  break;
004e37f8                              
004e3806                              if (UIElement_UIItem::UIItem_GetState(eax_16) != 0x1000001c)
004e3806                                  break;
004e3806                              
004e380b                              UIElement_ItemList::InternalDeleteItem(this, eax_16);
004e3810                              ebx_2 += 1;
004e3813                          } while (ebx_2 < temp0_1);
004e37d0                      }
004e37bd                  }
004e37bd                  
004e3821                  uint8_t var_d = 0;
004e3826                  UIElement::GetAttribute_Bool(this, 0x10000017, &var_d);
004e3826                  
004e3831                  if (var_d != 0)
004e3831                  {
004e3841                      class UIElement* eax_21 = UIElement_ListBox::GetItem(this, (this->m_listItems.m_num - 1));
004e3841                      
004e3848                      if (eax_21 != 0)
004e3848                      {
004e3857                          class UIElement_UIItem* eax_22 = eax_21->vtable->DynamicCast(0x10000032);
004e3857                          
004e385f                          if ((eax_22 != 0 && UIElement_UIItem::UIItem_GetState(eax_22) != 0x1000001c))
004e385f                          {
004e3879                              class UIElement_UIItem* eax_24 = UIElement_ItemList::InternalCreateItem(this);
004e3879                              
004e3882                              if (eax_24 != 0)
004e3882                              {
004e3886                                  UIElement_UIItem::Clear_UIItem(eax_24);
004e3892                                  UIElement_UIItem::UIItem_SetState(eax_24, 0x1000001c);
004e3882                              }
004e3882                              
004e389a                              UIElement_ListBox::AddItem(this, eax_24);
004e385f                          }
004e3848                      }
004e3831                  }
004e3766              }
004e3766              else if (var_4 == 0xffffffff)
004e38ab              {
004e38ad                  uint32_t m_num = this->m_listItems.m_num;
004e38b3                  int32_t ebx_3 = 0;
004e38b3                  
004e38b7                  if (m_num > 0)
004e38b7                  {
004e3901                      do
004e3901                      {
004e38ca                          class UIElement* eax_27 = UIElement_ListBox::GetItem(this, (this->m_listItems.m_num - 1));
004e38ca                          
004e38d1                          if (eax_27 == 0)
004e38d1                              break;
004e38d1                          
004e38dc                          class UIElement_UIItem* eax_28 = eax_27->vtable->DynamicCast(0x10000032);
004e38dc                          
004e38e6                          if (eax_28 == 0)
004e38e6                              break;
004e38e6                          
004e38f4                          if (UIElement_UIItem::UIItem_GetState(eax_28) != 0x1000001c)
004e38f4                              break;
004e38f4                          
004e38f9                          UIElement_ItemList::InternalDeleteItem(this, eax_28);
004e38fe                          ebx_3 += 1;
004e3901                      } while (ebx_3 < m_num);
004e38b7                  }
004e38ab              }
004e3730          }
004e370d      }
004e3700  }

004e390b                                   90 90 90 90 90                                                             .....

004e3910  void __fastcall UIElement_ItemList::UpdateFixedSlots(class UIElement_ItemList* this)

004e3910  {
004e3920      int32_t var_8;
004e3920      UIElement::GetAttribute_Int(this, 0x10000015, &var_8);
004e3925      int32_t ecx = var_8;
004e3925      
004e392c      if (ecx != 0xffffffff)
004e392c      {
004e3932          uint32_t m_num = this->m_listItems.m_num;
004e3932          
004e393b          if (m_num < ecx)
004e393b          {
004e393d              int32_t i_5 = (ecx - m_num);
004e393d              
004e3941              if (i_5 > 0)
004e3941              {
004e394a                  int32_t i_2 = i_5;
004e3979                  int32_t i;
004e3979                  
004e3979                  do
004e3979                  {
004e3952                      class UIElement_UIItem* eax_1 = UIElement_ItemList::InternalCreateItem(this);
004e3952                      
004e395b                      if (eax_1 != 0)
004e395b                      {
004e395f                          UIElement_UIItem::Clear_UIItem(eax_1);
004e396b                          UIElement_UIItem::UIItem_SetState(eax_1, 0x1000001c);
004e395b                      }
004e395b                      
004e3973                      UIElement_ListBox::AddItem(this, eax_1);
004e3978                      i = i_2;
004e3978                      i_2 -= 1;
004e3979                  } while (i != 1);
004e3941              }
004e393b          }
004e393b          else if (m_num > ecx)
004e3982          {
004e3984              int32_t i_4 = (m_num - ecx);
004e3984              
004e3988              if (i_4 > 0)
004e3988              {
004e398a                  int32_t i_3 = i_4;
004e39d7                  int32_t i_1;
004e39d7                  
004e39d7                  do
004e39d7                  {
004e399a                      class UIElement* eax_4 = UIElement_ListBox::GetItem(this, (this->m_listItems.m_num - 1));
004e399a                      
004e39a1                      if (eax_4 != 0)
004e39a1                      {
004e39ac                          class PFileNode* eax_5 = eax_4->vtable->DynamicCast(0x10000032);
004e39ac                          
004e39b4                          if (eax_5 != 0)
004e39b4                          {
004e39b9                              class PFileNode* var_4 = eax_5;
004e39b9                              
004e39c4                              if (UIElement_ListBox::RemoveItem(this, eax_5) != 0)
004e39d1                                  List<PFileNode *>::push_back(&this->m_listUIItemCache, &var_4);
004e39b4                          }
004e39a1                      }
004e39a1                      
004e39d6                      i_1 = i_3;
004e39d6                      i_3 -= 1;
004e39d7                  } while (i_1 != 1);
004e3988              }
004e3982          }
004e392c      }
004e3910  }

004e39df                                                                                               90                                 .

004e39e0  void __fastcall UIElement_ItemList::ItemList_UpdateContainerListSize(class UIElement_ItemList* this)

004e39e0  {
004e39e3      uint32_t parentContainerID = this->parentContainerID;
004e39e3      
004e39eb      if (parentContainerID != 0)
004e39eb      {
004e39ee          class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(parentContainerID);
004e39ee          
004e39f8          if (eax != 0)
004e39f8          {
004e3a02              int32_t ecx_1;
004e3a02              
004e3a02              if (this->containerList == 0)
004e3a0c                  ecx_1 = eax->pwd._itemsCapacity;
004e3a02              else
004e3a04                  ecx_1 = eax->pwd._containersCapacity;
004e3a04              
004e3a19              uint32_t player_id;
004e3a19              
004e3a19              if ((eax->pwd._bitfield & 1) == 0)
004e3a19              {
004e3a1b                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004e3a1b                  
004e3a22                  if (SmartBox::smartbox_1 == 0)
004e3a2c                      player_id = 0;
004e3a22                  else
004e3a24                      player_id = SmartBox::smartbox_1->player_id;
004e3a19              }
004e3a19              
004e3a34              if (((eax->pwd._bitfield & 1) == 0 && this->parentContainerID != player_id))
004e3a36                  ecx_1 = 0;
004e3a34              else if (ecx_1 < 0)
004e3a4f              {
004e3a5a                  UIElement::SetAttribute_Int(this, 0x10000015, 0xffffffff);
004e3a62                  /* tailcall */
004e3a62                  return UIElement_ItemList::UpdateEmptySlots(this);
004e3a4f              }
004e3a4f              
004e3a40              UIElement::SetAttribute_Int(this, 0x10000015, ecx_1);
004e3a48              /* tailcall */
004e3a48              return UIElement_ItemList::UpdateFixedSlots(this);
004e39f8          }
004e39eb      }
004e39e0  }

004e3a69                             90 90 90 90 90 90 90                                                           .......

004e3a70  void* __thiscall List<UIElement_UIItem *>::`scalar deleting destructor'(class List<UIElement_UIItem *>* this, uint32_t arg2)

004e3a70  {
004e3a73      this->vtable = &List<class UIElement_UIItem*>::`vftable';
004e3a79      List<StringTableMetaLanguage::Node const *>::flush(this);
004e3a79      
004e3a83      if ((arg2 & 1) != 0)
004e3a86          operator delete(this);
004e3a86      
004e3a91      return this;
004e3a70  }

004e3a94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004e3aa0  void __thiscall UIElement_ItemList::UIElement_ItemList(class UIElement_ItemList* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004e3aa0  {
004e3aaf      UIElement_ListBox::UIElement_ListBox(this, arg2, arg3);
004e3ab4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e3ac0      __builtin_memset(&this->parentContainerID, 0, 0x1c);
004e3afc      this->vtable = &UIElement_ItemList::`vftable';
004e3b02      this->vtable = &UIElement_ItemList::`vftable';
004e3b11      this->m_cellW = 0x20;
004e3b17      this->m_cellH = 0x20;
004e3b1d      this->m_listUIItemCache._head = nullptr;
004e3b23      this->m_listUIItemCache._tail = nullptr;
004e3b29      this->m_listUIItemCache._num_elements = 0;
004e3b2f      this->m_listUIItemCache.vtable = &List<class UIElement_UIItem*>::`vftable';
004e3b39      this->m_dragHandler = nullptr;
004e3b3f      this->m_singleSelection = 0;
004e3b45      this->m_dragScrollItemScrolling = 0;
004e3b4b      this->m_dragScrollSpellScrolling = 0;
004e3b51      this->m_dragScrollVertical = 0;
004e3b57      this->m_dragScrollHorizontal = 0;
004e3b5d      this->m_dragScrollMarginWidth = 0;
004e3b63      this->m_dragScrollMarginHeight = 0;
004e3b69      this->m_inDragScrollRegion = 0;
004e3b6f      this->m_nextDragScrollTime = 0f;
004e3b75      *(uint32_t*)((char*)this->m_nextDragScrollTime)[4] = 0;
004e3b7b      this->m_dragScrollJumpDistance = 1;
004e3b85      this->m_dragScrollDelay = 1f;
004e3aa0  }

004e3b95                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004e3ba0  class UIElement* __thiscall UIElement_ItemList::DynamicCast(class UIElement_ItemList* this, uint32_t arg2) __pure

004e3ba0  {
004e3bb1      if ((arg2 == 0x10000031 || arg2 == 5))
004e3bbe          return this;
004e3bbe      
004e3bb8      int32_t edx_1;
004e3bb8      edx_1 = arg2 != 0xa;
004e3bbc      return (this & (edx_1 - 1));
004e3ba0  }

004e3bc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004e3bd0  uint32_t UIElement_ItemList::GetUIElementType(class UIElement_ItemList const* this @ ecx) __pure

004e3bd0  {
004e3bd5      return 0x10000031;
004e3bd0  }

004e3bd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e3be0  void __fastcall UIElement_ItemList::~UIElement_ItemList(class UIElement_ItemList* this)

004e3be0  {
004e3bed      this->vtable = &UIElement_ItemList::`vftable';
004e3be5      this->vtable = &UIElement_ItemList::`vftable';
004e3bfa      UIListener::UnRegisterForGlobalMessage(this, 3);
004e3bff      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e3bff      
004e3c08      if (eax != 0)
004e3c0a          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e3c0a      
004e3c22      for (class ListNode<UIElement_UIItem *>* i = this->m_listUIItemCache._head; i != 0; i = i->next)
004e3c22      {
004e3c24          class UIElement_UIItem* data = i->data;
004e3c24          
004e3c28          if (data != 0)
004e3c2a              UIElement::AddToDeleteQueue(data);
004e3c22      }
004e3c22      
004e3c35      while (true)
004e3c35      {
004e3c35          class ListNode<UIElement_UIItem *>* _head = this->m_listUIItemCache._head;
004e3c35          
004e3c3d          if (_head == 0)
004e3c3d              break;
004e3c3d          
004e3c3f          class ListNode<UIElement_UIItem *>* next = _head->next;
004e3c44          this->m_listUIItemCache._head = next;
004e3c44          
004e3c4a          if (next == 0)
004e3c51              this->m_listUIItemCache._tail = nullptr;
004e3c4a          else
004e3c4c              next->prev = nullptr;
004e3c4c          
004e3c59          if (_head != 0)
004e3c5c              operator delete(_head);
004e3c5c          
004e3c64          this->m_listUIItemCache._num_elements -= 1;
004e3c35      }
004e3c35      
004e3c6e      UIElement_ListBox::Flush(this);
004e3c73      this->m_listUIItemCache.vtable = &List<class UIElement_UIItem*>::`vftable';
004e3c73      
004e3c80      while (true)
004e3c80      {
004e3c80          void* _head_1 = this->m_listUIItemCache._head;
004e3c80          
004e3c88          if (_head_1 == 0)
004e3c88              break;
004e3c88          
004e3c8a          class ListNode<UIElement_UIItem *>* eax_1 = *(uint32_t*)((char*)_head_1 + 4);
004e3c8f          this->m_listUIItemCache._head = eax_1;
004e3c8f          
004e3c95          if (eax_1 == 0)
004e3c9c              this->m_listUIItemCache._tail = nullptr;
004e3c95          else
004e3c97              eax_1->prev = nullptr;
004e3c97          
004e3ca4          if (_head_1 != 0)
004e3ca7              operator delete(_head_1);
004e3ca7          
004e3caf          this->m_listUIItemCache._num_elements -= 1;
004e3c80      }
004e3c80      
004e3be5      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e3cc0      NoticeHandler::~NoticeHandler(&this->vtable);
004e3cca      /* tailcall */
004e3cca      return UIElement_ListBox::~UIElement_ListBox(this);
004e3be0  }

004e3ccf                                               90                                                                 .

004e3cd0  class UIElement* UIElement_ItemList::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e3cd0  {
004e3cd5      void* eax = operator new(0x6c8);
004e3cd5      
004e3cdf      if (eax == 0)
004e3cf5          return 0;
004e3cf5      
004e3cf2      return UIElement_ItemList::UIElement_ItemList(eax, arg1, arg2);
004e3cd0  }

004e3cf6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e3d00  void __thiscall UIElement_ItemList::OnVisibilityChanged(class UIElement_ItemList* this, uint8_t arg2)

004e3d00  {
004e3d09      UIElement::OnVisibilityChanged(this, arg2);
004e3d09      
004e3d1d      if (((((int8_t)(this->__inner23 >> 0x11)) & 1) != 0 && arg2 != 0))
004e3d21          UIElement_ItemList::UpdateEmptySlots(this);
004e3d00  }

004e3d2b                                   90 90 90 90 90                                                             .....

004e3d30  void __thiscall UIElement_ItemList::ResizeTo(class UIElement_ItemList* this, int32_t const arg2, int32_t const arg3)

004e3d30  {
004e3d3f      UIElement_ListBox::ResizeTo(this, arg2, arg3);
004e3d3f      
004e3d50      if ((((int8_t)(this->__inner23 >> 0x11)) & 1) != 0)
004e3d54          UIElement_ItemList::UpdateEmptySlots(this);
004e3d30  }

004e3d5d                                                                                         90 90 90                               ...

004e3d60  void __fastcall UIElement_ItemList::ItemList_Flush(class UIElement_ItemList* this)

004e3d60  {
004e3d64      class UIElement_UIItem* m_pendingItem = this->m_pendingItem;
004e3d64      
004e3d6c      if (m_pendingItem != 0)
004e3d6c      {
004e3d6e          UIElement_UIItem::Clear_UIItem(m_pendingItem);
004e3d7e          UIElement_UIItem::UIItem_SetState(this->m_pendingItem, 0x1000001c);
004e3d83          this->m_pendingItem = nullptr;
004e3d6c      }
004e3d6c      
004e3d97      if (this->m_listItems.m_num > 0)
004e3d97      {
004e3d9a          uint32_t i = 0;
004e3d9a          
004e3ddd          do
004e3ddd          {
004e3da3              class UIElement* eax_1 = UIElement_ListBox::GetItem(this, i);
004e3da3              
004e3daa              if (eax_1 != 0)
004e3daa              {
004e3db5                  class UIElement_UIItem* eax_2 = eax_1->vtable->DynamicCast(0x10000032);
004e3db5                  
004e3dbf                  if (eax_2 != 0)
004e3dbf                  {
004e3dc3                      UIElement_UIItem::Clear_UIItem(eax_2);
004e3dcf                      UIElement_UIItem::UIItem_SetState(eax_2, 0x1000001c);
004e3dbf                  }
004e3daa              }
004e3daa              
004e3dda              i += 1;
004e3ddd          } while (i < this->m_listItems.m_num);
004e3d97      }
004e3d97      
004e3de4      this->openItemID = 0;
004e3dee      UIElement_ItemList::UpdateOpenContainerIndicator(this, 0);
004e3df7      /* tailcall */
004e3df7      return UIElement_ItemList::UpdateEmptySlots(this);
004e3d60  }

004e3dfc                                                                                      90 90 90 90                              ....

004e3e00  class UIElement_UIItem* __thiscall UIElement_ItemList::ItemList_AddItem(class UIElement_ItemList* this, uint32_t arg2)

004e3e00  {
004e3e0d      int32_t ebx = 0;
004e3e12      class UIElement_UIItem* result;
004e3e12      
004e3e12      if (this->m_listItems.m_num <= 0)
004e3e12      {
004e3e5d      label_4e3e5d:
004e3e5d          int32_t var_4;
004e3e5d          UIElement::GetAttribute_Int(this, 0x10000015, &var_4);
004e3e5d          
004e3e67          if (var_4 != 0xffffffff)
004e3f3d              return 0;
004e3f3d          
004e3e6f          class UIElement_UIItem* eax_5 = UIElement_ItemList::InternalCreateItem(this);
004e3e6f          
004e3e78          if (eax_5 != 0)
004e3e78          {
004e3e7c              UIElement_UIItem::Clear_UIItem(eax_5);
004e3e88              UIElement_UIItem::UIItem_SetState(eax_5, 0x1000001c);
004e3e78          }
004e3e78          
004e3e90          UIElement_ListBox::AddItem(this, eax_5);
004e3e9f          class UIElement* eax_8 = UIElement_ListBox::GetItem(this, (this->m_listItems.m_num - 1));
004e3e9f          
004e3ea6          if (eax_8 == 0)
004e3f3d              return 0;
004e3f3d          
004e3ebb          result = eax_8->vtable->DynamicCast(0x10000032);
004e3ebb          
004e3ebf          if (result == 0)
004e3f3d              return 0;
004e3f3d          
004e3ecd          if (UIElement_UIItem::UIItem_GetState(result) != 0x1000001c)
004e3f3d              return 0;
004e3e12      }
004e3e12      else
004e3e12      {
004e3e1a          while (true)
004e3e1a          {
004e3e1a              int32_t* ecx = this->m_listItems.m_data[ebx];
004e3e1a              
004e3e1f              if (ecx != 0)
004e3e1f              {
004e3e2e                  result = *(uint32_t*)(*(uint32_t*)ecx + 0x94)(0x10000032);
004e3e2e                  
004e3e32                  if ((result != 0 && UIElement_UIItem::UIItem_GetState(result) == 0x1000001c))
004e3e40                      break;
004e3e1f              }
004e3e1f              
004e3e4c              ebx += 1;
004e3e4c              
004e3e4f              if (ebx >= this->m_listItems.m_num)
004e3e4f                  goto label_4e3e5d;
004e3e1a          }
004e3e12      }
004e3e12      
004e3ecf      uint32_t eax_3;
004e3ecf      eax_3 = this->m_singleSelection;
004e3edb      char var_8 = 1;
004e3edb      
004e3ee0      if (eax_3 != 0)
004e3ee0      {
004e3ee5          int32_t eax_10 = UIElement_ItemList::ItemList_IsInList(this, arg2);
004e3eea          char eax_11 = ((int8_t)-(eax_10));
004e3ef0          var_8 = ((eax_11 - eax_11) + 1);
004e3ee0      }
004e3ee0      
004e3eff      UIElement_UIItem::Init_UIItem(result, arg2, ((uint32_t)this->containerList));
004e3f0b      UIElement_UIItem::UIItem_SetState(result, 0x1000001d);
004e3f17      UIElement_UIItem::SetSelectableState(result, var_8);
004e3f1e      UIElement_UIItem::UIItem_Update(result);
004e3f25      UIElement_ItemList::UpdateEmptySlots(this);
004e3f32      return result;
004e3e00  }


004e3f40  class UIElement_UIItem* __thiscall UIElement_ItemList::ItemList_InsertItem(class UIElement_ItemList* this, uint32_t arg2, int32_t arg3)

004e3f40  {
004e3f4f      class UIElement* eax_2 = UIElement_ListBox::GetItem(this, (this->m_listItems.m_num - 1));
004e3f4f      
004e3f56      if (eax_2 == 0)
004e3f56      {
004e3fc7      label_4e3fc7:
004e3fc7          int32_t var_4;
004e3fc7          UIElement::GetAttribute_Int(this, 0x10000015, &var_4);
004e3fc7          
004e3fd1          if (var_4 != 0xffffffff)
004e3fda              return 0;
004e3f56      }
004e3f56      else
004e3f56      {
004e3f61          class PFileNode* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004e3f61          
004e3f6b          if (eax_3 == 0)
004e3f6b              goto label_4e3fc7;
004e3f6b          
004e3f79          if (UIElement_UIItem::UIItem_GetState(eax_3) != 0x1000001c)
004e3f79              goto label_4e3fc7;
004e3f79          
004e3f7e          class PFileNode* var_8 = eax_3;
004e3f7e          
004e3f89          if (UIElement_ListBox::RemoveItem(this, eax_3) != 0)
004e3f96              List<PFileNode *>::push_back(&this->m_listUIItemCache, &var_8);
004e3f56      }
004e3f56      
004e3fa2      UIElement_ItemList::ItemList_AddEmptySlot(this, arg3);
004e3fb8      return UIElement_ItemList::ItemList_AddItem(this, arg2);
004e3f40  }

004e3fdd                                                                                         90 90 90                               ...

004e3fe0  void __thiscall UIElement_ItemList::ItemList_DeleteItem(class UIElement_ItemList* this, uint32_t arg2)

004e3fe0  {
004e3fee      if (this->m_listItems.m_num > 0)
004e3fee      {
004e3ff5          uint32_t ebp_1 = arg2;
004e3ffa          int32_t ebx_1 = 0;
004e4006          uint32_t esi_1;
004e4006          
004e4006          while (true)
004e4006          {
004e4006              int32_t* ecx = this->m_listItems.m_data[ebx_1];
004e4006              
004e400b              if (ecx != 0)
004e400b              {
004e401a                  esi_1 = *(uint32_t*)(*(uint32_t*)ecx + 0x94)(0x10000032);
004e401a                  
004e4026                  if ((esi_1 != 0 && *(uint32_t*)(esi_1 + 0x5fc) == ebp_1))
004e4026                      break;
004e400b              }
004e400b              
004e402e              ebx_1 += 1;
004e402e              
004e4031              if (ebx_1 >= this->m_listItems.m_num)
004e4031              {
004e4037                  UIElement_ItemList::UpdateEmptySlots(this);
004e403e                  return;
004e4031              }
004e4006          }
004e4006          
004e4041          uint32_t eax_2;
004e4041          eax_2 = this->m_singleSelection;
004e4041          
004e4049          if (eax_2 != 0)
004e4049          {
004e404b              eax_2 = *(uint8_t*)(esi_1 + 0x640);
004e404b              
004e4053              if (eax_2 != 0)
004e4053              {
004e4058                  class UIElement_UIItem* eax_4 = UIElement_ItemList::ItemList_GetItem(this, ebp_1);
004e4058                  
004e405f                  if (eax_4 != 0)
004e4065                      UIElement_UIItem::SetSelectableState(eax_4, 1);
004e4053              }
004e4049          }
004e4049          
004e406d          arg2 = esi_1;
004e406d          
004e4078          if (UIElement_ListBox::RemoveItem(this, esi_1) != 0)
004e4085              List<PFileNode *>::push_back(&this->m_listUIItemCache.vtable, &arg2);
004e3fee      }
004e3fee      
004e408e      UIElement_ItemList::UpdateEmptySlots(this);
004e3fe0  }

004e4098                                                                          90 90 90 90 90 90 90 90                          ........

004e40a0  class UIElement_UIItem* __thiscall UIElement_ItemList::ItemList_AddSpellShortcut(class UIElement_ItemList* this, uint32_t arg2)

004e40a0  {
004e40a0      class UIElement_ItemList* this_1 = this;
004e40ab      int32_t i = 0;
004e40b0      class UIElement_UIItem* result;
004e40b0      
004e40b0      if (this->m_listItems.m_num > 0)
004e40b0      {
004e40ed          do
004e40ed          {
004e40b8              int32_t* ecx = this->m_listItems.m_data[i];
004e40b8              
004e40bd              if (ecx != 0)
004e40bd              {
004e40cc                  result = *(uint32_t*)(*(uint32_t*)ecx + 0x94)(0x10000032);
004e40cc                  
004e40d0                  if ((result != 0 && UIElement_UIItem::UIItem_GetState(result) == 0x1000001c))
004e40de                      goto label_4e4170;
004e40bd              }
004e40bd              
004e40ea              i += 1;
004e40ed          } while (i < this->m_listItems.m_num);
004e40b0      }
004e40b0      
004e40fb      UIElement::GetAttribute_Int(this, 0x10000015, &this_1);
004e40fb      
004e4105      if (this_1 != 0xffffffff)
004e419e          return 0;
004e419e      
004e410d      class UIElement_UIItem* eax_5 = UIElement_ItemList::InternalCreateItem(this);
004e410d      
004e4116      if (eax_5 != 0)
004e4116      {
004e411a          UIElement_UIItem::Clear_UIItem(eax_5);
004e4126          UIElement_UIItem::UIItem_SetState(eax_5, 0x1000001c);
004e4116      }
004e4116      
004e412e      UIElement_ListBox::AddItem(this, eax_5);
004e413d      class UIElement* eax_8 = UIElement_ListBox::GetItem(this, (this->m_listItems.m_num - 1));
004e413d      
004e4144      if (eax_8 == 0)
004e419e          return 0;
004e419e      
004e4155      result = eax_8->vtable->DynamicCast(0x10000032);
004e4155      
004e4159      if (result == 0)
004e419e          return 0;
004e419e      
004e4167      if (UIElement_UIItem::UIItem_GetState(result) != 0x1000001c)
004e419e          return 0;
004e419e      
004e4170  label_4e4170:
004e4170      UIElement_UIItem::Init_UIItem_Spell_Shortcut(result, arg2);
004e417c      UIElement_UIItem::UIItem_SetState(result, 0x1000001d);
004e4183      UIElement_UIItem::UIItem_Update(result);
004e418a      UIElement_ItemList::UpdateEmptySlots(this);
004e4195      return result;
004e40a0  }

004e41a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004e41b0  class UIElement_UIItem* __thiscall UIElement_ItemList::ItemList_InsertSpellShortcut(class UIElement_ItemList* this, uint32_t arg2, int32_t arg3)

004e41b0  {
004e41bf      class UIElement* eax_2 = UIElement_ListBox::GetItem(this, (this->m_listItems.m_num - 1));
004e41bf      
004e41c6      if (eax_2 == 0)
004e41c6      {
004e4237      label_4e4237:
004e4237          int32_t var_4;
004e4237          UIElement::GetAttribute_Int(this, 0x10000015, &var_4);
004e4237          
004e4241          if (var_4 != 0xffffffff)
004e424a              return 0;
004e41c6      }
004e41c6      else
004e41c6      {
004e41d1          class PFileNode* eax_3 = eax_2->vtable->DynamicCast(0x10000032);
004e41d1          
004e41db          if (eax_3 == 0)
004e41db              goto label_4e4237;
004e41db          
004e41e9          if (UIElement_UIItem::UIItem_GetState(eax_3) != 0x1000001c)
004e41e9              goto label_4e4237;
004e41e9          
004e41ee          class PFileNode* var_8 = eax_3;
004e41ee          
004e41f9          if (UIElement_ListBox::RemoveItem(this, eax_3) != 0)
004e4206              List<PFileNode *>::push_back(&this->m_listUIItemCache, &var_8);
004e41c6      }
004e41c6      
004e4212      UIElement_ItemList::ItemList_AddEmptySlot(this, arg3);
004e4228      return UIElement_ItemList::ItemList_AddSpellShortcut(this, arg2);
004e41b0  }

004e424d                                         90 90 90                                                               ...

004e4250  uint8_t __thiscall UIElement_ItemList::AcceptDragObject(class UIElement_ItemList* this, uint32_t arg2, uint8_t arg3)

004e4250  {
004e425a      char var_96 = 0;
004e425f      class UIElement_UIItem* var_9c = 0xffffffff;
004e4267      class UIElement* eax = UIElement_ListBox::GetItemUnderMouse(this);
004e4267      
004e426e      if (eax != 0)
004e426e      {
004e4279          eax = eax->vtable->DynamicCast(0x10000032);
004e4279          
004e4283          if (eax != 0)
004e4283          {
004e429c              class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
004e42b0              class UIElement_UIItem* eax_2;
004e42b0              void var_90;
004e42b0              uint32_t ecx_1;
004e42b0              
004e42b0              if ((this->parentContainerID != arg2 || eax_1 == 0))
004e42b0              {
004e4314              label_4e4314:
004e4314                  eax_1 = this->containerList;
004e4314                  
004e431c                  if (eax_1 == 0)
004e431c                  {
004e436e                  label_4e436e:
004e436e                      eax_1 = arg3;
004e436e                      
004e4377                      if (eax_1 != 0)
004e4377                      {
004e437d                          StringInfo::StringInfo(&var_90);
004e438b                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, &UIElement_ItemList::`vftable'.RecvNotice_AddItemToTrade);
004e439b                          StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004e43a4                          int32_t* esi_3 = ((char*)var_9c - 0x14);
004e43a4                          
004e43bb                          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004e43c7                              **(uint32_t**)esi_3(1);
004e43c7                          
004e43bb                          goto label_4e42f1;
004e4377                      }
004e4377                      
004e43ce                  label_4e43ce:
004e43ce                      class UIElement_UIItem* m_pendingItem = this->m_pendingItem;
004e43d6                      class PStringBase<unsigned short> __return;
004e43d6                      
004e43d6                      if (m_pendingItem == 0)
004e43d6                      {
004e44a4                          if (ItemHolder::AttemptMerge(arg2, *(int32_t*)((char*)eax + 0x5fc), 1) != 0)
004e44a4                          {
004e4736                          label_4e4736:
004e473b                              eax_2 = 1;
004e4749                              return eax_2;
004e44a4                          }
004e44a4                          
004e44b4                          int32_t ebx_1 = UIElement_ListBox::WhatNum(this, eax);
004e44b6                          int32_t eax_14 = UIElement_ItemList::GetNumUIItems(this);
004e44b6                          
004e44bd                          if (ebx_1 > eax_14)
004e44bf                              ebx_1 = eax_14;
004e44bf                          
004e44c8                          class ACCWeenieObject* eax_16 = ClientObjMaintSystem::GetWeenieObject(*(int32_t*)((char*)eax + 0x5fc));
004e44cd                          uint32_t parentContainerID = this->parentContainerID;
004e44d8                          char var_95_1 = 0;
004e44d8                          
004e44dd                          if (eax_16 != 0)
004e44dd                          {
004e44e8                              if (arg3 == 0)
004e44e8                              {
004e453c                                  if (eax_16->pwd._itemsCapacity == 0)
004e453c                                  {
004e4554                                      if (ACCWeenieObject::IsContainer(eax_16) != 0)
004e4554                                      {
004e456d                                          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(&__return, *(int32_t*)((char*)eax + 0x5fc), NAME_APPROPRIATE, 0)->m_charbuffer;
004e457a                                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, &UIElement_ItemList::`vftable'.RecvNotice_BeginEnterWorld);
004e4586                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004e458f                                          StringInfo::StringInfo(&var_90);
004e459f                                          StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004e45ab                                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004e45b7                                          StringInfo::~StringInfo(&var_90);
004e45c0                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
004e45c8                                          int32_t eax_20;
004e45c8                                          eax_20 = 0;
004e45d1                                          return 0;
004e4554                                      }
004e453c                                  }
004e453c                                  else
004e453c                                  {
004e453e                                      parentContainerID = *(int32_t*)((char*)eax + 0x5fc);
004e4544                                      var_95_1 = 1;
004e453c                                  }
004e44e8                              }
004e44e8                              else if (eax_16->pwd._containersCapacity != 0)
004e44f4                                  parentContainerID = *(int32_t*)((char*)eax + 0x5fc);
004e44dd                          }
004e44dd                          
004e4500                          class ACCWeenieObject* ecx_26 = ClientObjMaintSystem::GetWeenieObject(parentContainerID);
004e4507                          class UIElement_UIItem* esi_8;
004e4507                          
004e4507                          if (ecx_26 == 0)
004e4507                          {
004e4618                              esi_8 = var_9c;
004e4624                          label_4e4624:
004e4624                              eax_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
004e4624                              
004e4642                              if (((eax_2 == 0 || eax_2->m_tsSerialNumberLastListenedTo.m_timestamp != 1) || GenItemHolder::splitSize == GenItemHolder::maxSplitSize))
004e4642                              {
004e464a                                  if ((parentContainerID > 0 && (ItemHolder::IsDragIntoContainerAttemptLegal(arg2, parentContainerID) != 0 && parentContainerID == this->parentContainerID)))
004e464a                                  {
004e4681                                      class UIElement_UIItem* esi_10 = UIElement_ItemList::ItemList_InsertItem(this, arg2, ebx_1);
004e4681                                      
004e4685                                      if (esi_10 != 0)
004e4685                                      {
004e46dd                                          UIElement_UIItem::SetWaitingState(esi_10, 1);
004e46e2                                          this->m_pendingItem = esi_10;
004e4685                                      }
004e4685                                      else
004e4685                                      {
004e4692                                          class UIElement* eax_27 = UIElement_ListBox::GetItem(this, (UIElement_ItemList::GetNumUIItems(this) - 1));
004e4692                                          
004e4699                                          if (eax_27 != 0)
004e4699                                          {
004e46a4                                              class UIElement_UIItem* eax_28 = eax_27->vtable->DynamicCast(0x10000032);
004e46a4                                              
004e46ae                                              if (eax_28 != 0)
004e46ae                                              {
004e46b2                                                  UIElement_UIItem::Clear_UIItem(eax_28);
004e46be                                                  UIElement_UIItem::UIItem_SetState(eax_28, 0x1000001c);
004e46ae                                              }
004e4699                                          }
004e4699                                          
004e46d3                                          esi_10 = UIElement_ItemList::ItemList_InsertItem(this, arg2, ebx_1);
004e46d3                                          
004e46d7                                          if (esi_10 != 0)
004e46d7                                          {
004e46dd                                              UIElement_UIItem::SetWaitingState(esi_10, 1);
004e46e2                                              this->m_pendingItem = esi_10;
004e46d7                                          }
004e4685                                      }
004e4685                                      
004e46e8                                      esi_8 = var_9c;
004e464a                                  }
004e464a                                  
004e4701                                  if ((esi_8 != 0xffffffff && (esi_8 < ebx_1 && GenItemHolder::splitSize == GenItemHolder::maxSplitSize)))
004e4703                                      ebx_1 -= 1;
004e4703                                  
004e4706                                  if (parentContainerID <= 0)
004e4706                                  {
004e473b                                      eax_2 = var_96;
004e4749                                      return eax_2;
004e4706                                  }
004e4706                                  
004e471e                                  int32_t edx_10;
004e471e                                  edx_10 = parentContainerID != this->parentContainerID;
004e471e                                  
004e4734                                  if (ItemHolder::AttemptToPlaceInContainer(arg2, parentContainerID, 0, ((uint32_t)var_95_1), ((edx_10 - 1) & ebx_1)) != 0)
004e4734                                      goto label_4e4736;
004e4734                                  
004e473b                                  eax_2 = var_96;
004e4749                                  return eax_2;
004e4642                              }
004e4507                          }
004e4507                          else
004e4507                          {
004e450d                              class ACCWeenieObject* eax_17;
004e450d                              eax_17 = arg3;
004e450d                              
004e4516                              if (eax_17 == 0)
004e4516                              {
004e45dc                                  eax_2 = ACCWeenieObject::GetPlaceInItemsList(ecx_26, arg2);
004e45e1                                  var_9c = eax_2;
004e45e5                                  esi_8 = eax_2;
004e4516                              }
004e4516                              else
004e4516                              {
004e4529                                  esi_8 = ACCWeenieObject::GetPlaceInContainersList(ecx_26, arg2);
004e452b                                  var_9c = esi_8;
004e4516                              }
004e4516                              
004e45ea                              if (esi_8 == 0xffffffff)
004e45ea                                  goto label_4e4624;
004e45ea                              
004e45ee                              if (ebx_1 != esi_8)
004e45ee                              {
004e4607                                  if ((ebx_1 != (&esi_8->vtable + 1) || GenItemHolder::splitSize != GenItemHolder::maxSplitSize))
004e4607                                      goto label_4e4624;
004e4607                                  
004e460c                                  eax_2 = 0;
004e4615                                  return 0;
004e45ee                              }
004e4507                          }
004e43d6                      }
004e43d6                      else
004e43d6                      {
004e43f3                          class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(&__return, m_pendingItem->itemID, NAME_APPROPRIATE, 0)->m_charbuffer;
004e4400                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, &UIElement_ItemList::`vftable'.RecvNotice_SpellAdded);
004e440f                          int32_t* esi_5 = (__return - 0x14);
004e440f                          
004e4421                          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004e4429                              **(uint32_t**)esi_5(1);
004e4429                          
004e442f                          StringInfo::StringInfo(&var_90);
004e443f                          StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004e444b                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004e4457                          StringInfo::~StringInfo(&var_90);
004e4460                          int32_t* esi_7 = ((char*)var_9c - 0x14);
004e4460                          
004e4473                          if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
004e4473                          {
004e447f                              **(uint32_t**)esi_7(1);
004e4484                              int32_t eax_11;
004e4484                              eax_11 = 0;
004e448d                              return 0;
004e4473                          }
004e43d6                      }
004e431c                  }
004e431c                  else
004e431c                  {
004e431e                      ecx_1 = arg3;
004e431e                      
004e4331                      if ((ecx_1 != 0 || *(int32_t*)((char*)eax + 0x61c) != 0))
004e4331                      {
004e436c                          if (eax_1 != 0)
004e436c                              goto label_4e43ce;
004e436c                          
004e436c                          goto label_4e436e;
004e4331                      }
004e4331                      
004e4337                      StringInfo::StringInfo(&var_90);
004e4345                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, &UIElement_ItemList::`vftable'.RecvNotice_LoadUI);
004e4355                      StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004e435e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
004e42f4                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004e4300                      StringInfo::~StringInfo(&var_90);
004e431c                  }
004e42b0              }
004e42b0              else
004e42b0              {
004e42b6                  eax_1 = eax_1->vtable->IsThePlayer();
004e42b6                  
004e42bb                  if (eax_1 == 0)
004e42bb                      goto label_4e4314;
004e42bb                  
004e42c1                  StringInfo::StringInfo(&var_90);
004e42cf                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, &UIElement_ItemList::`vftable'.RecvNotice_UpdateRadarVisibility);
004e42df                  StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
004e42e8                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
004e42f1              label_4e42f1:
004e42f4                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004e4300                  StringInfo::~StringInfo(&var_90);
004e42b0              }
004e4308              eax_2 = 0;
004e4311              return 0;
004e4283          }
004e426e      }
004e426e      
004e4286      eax = 0;
004e428f      return 0;
004e4250  }

004e474c                                      90 90 90 90                                                              ....

004e4750  void* __thiscall UIElement_ItemList::`scalar deleting destructor'(class UIElement_ItemList* this, uint32_t arg2)

004e4750  {
004e4753      UIElement_ItemList::~UIElement_ItemList(this);
004e4753      
004e475d      if ((arg2 & 1) != 0)
004e4760          operator delete(this);
004e4760      
004e476b      return this;
004e4750  }

004e476e                                            90 90                                                                ..

004e4770  void UIElement_ItemList::Register()

004e4770  {
004e477a      UIElement::RegisterElementClass(0x10000031, UIElement_ItemList::Create);
004e4770  }

004e4783           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e4790  void __thiscall UIElement_ItemList::HandleDropRelease(class UIElement_ItemList* this, struct UIElementMessageInfo const* arg2)

004e4790  {
004e4794      uint32_t dwParam1 = arg2->dwParam1;
004e479b      class UIElement* ebp = *(uint32_t*)(dwParam1 + 0x10);
004e479f      class UIElement* esi = *(uint32_t*)(dwParam1 + 8);
004e479f      
004e47ab      if (((esi != 0 && ebp != 0) && (UIElement::IsAncestorOfMe(ebp, this) != 0 || ebp == this)))
004e47ab      {
004e47ce          uint32_t var_8;
004e47ce          void var_4;
004e47ce          UIElement_ItemList::InqDropIconInfo(esi, &var_8, &var_4, &arg2);
004e47d3          uint32_t ebx_1 = var_8;
004e47d3          
004e47e3          if ((ebx_1 != 0 && (arg2 & 0xe) == 0))
004e47e3          {
004e47e6              class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(ebx_1);
004e47e6              
004e47f2              if (ebp == this)
004e47f2              {
004e4815              label_4e4815:
004e4815                  
004e4817                  if (eax_1 != 0)
004e481d                      ACCWeenieObject::SetWaitingState(eax_1, 0);
004e47f2              }
004e47f2              else
004e47f2              {
004e47fd                  if (UIElement_ItemList::IsAliasList(this) != 0)
004e47fd                      goto label_4e4815;
004e47fd                  
004e4813                  if (UIElement_ItemList::AcceptDragObject(this, ebx_1, (((int8_t)arg2) & 1)) == 0)
004e4813                      goto label_4e4815;
004e47f2              }
004e47e3          }
004e47ab      }
004e4790  }

004e482c                                      90 90 90 90                                                              ....

004e4830  void __fastcall UIElement_ItemList::InitItemList(class UIElement_ItemList* this)

004e4830  {
004e4830      class UIElement_ItemList* this_1 = this;
004e4842      UIElement::GetAttribute_Bool(this, 0x10000011, &this->containerList);
004e4855      UIElement::GetAttribute_Bool(this, 0x10000013, &this->vendorItemList);
004e4868      UIElement::GetAttribute_Bool(this, 0x10000012, &this->shortcutList);
004e487b      UIElement::GetAttribute_Bool(this, 0x10000014, &this->salvageList);
004e488e      UIElement::GetAttribute_Bool(this, 0x10000052, &this->m_singleSelection);
004e48a1      UIElement::GetAttribute_Bool(this, 0x1000005c, &this->m_dragScrollItemScrolling);
004e48b4      UIElement::GetAttribute_Bool(this, 0x1000005d, &this->m_dragScrollSpellScrolling);
004e48c7      UIElement::GetAttribute_Bool(this, 0x10000054, &this->m_dragScrollVertical);
004e48da      UIElement::GetAttribute_Bool(this, 0x10000053, &this->m_dragScrollHorizontal);
004e48ed      UIElement::GetAttribute_Int(this, 0x10000059, &this->m_dragScrollMarginWidth);
004e4900      UIElement::GetAttribute_Int(this, 0x1000005a, &this->m_dragScrollMarginHeight);
004e4913      UIElement::GetAttribute_Int(this, 0x10000057, &this->m_dragScrollJumpDistance);
004e4926      UIElement::GetAttribute_Float(this, 0x1000005b, &this->m_dragScrollDelay);
004e4937      UIElement::GetAttribute_Int(this, 0x10000015, &this_1);
004e493c      class UIElement_ItemList* this_2 = this_1;
004e493c      
004e4942      if (this_2 < 0)
004e4942      {
004e4996          class UIElement_UIItem* eax_9 = UIElement_ItemList::InternalCreateItem(this);
004e4996          
004e499f          if (eax_9 != 0)
004e499f          {
004e49aa              this->m_cellW = UIRegion::GetWidth(eax_9);
004e49b8              this->m_cellH = UIRegion::GetHeight(eax_9);
004e49be              UIElement_ListBox::AddItem(this, eax_9);
004e499f          }
004e4942      }
004e4942      else if (this_2 > 0)
004e4948      {
004e494a          int32_t ebx = 0;
004e494a          
004e4986          do
004e4986          {
004e4952              class UIElement_UIItem* eax_5 = UIElement_ItemList::InternalCreateItem(this);
004e4952              
004e495b              if (eax_5 != 0)
004e495b              {
004e4966                  this->m_cellW = UIRegion::GetWidth(eax_5);
004e4974                  this->m_cellH = UIRegion::GetHeight(eax_5);
004e497a                  UIElement_ListBox::AddItem(this, eax_5);
004e495b              }
004e495b              
004e4983              ebx += 1;
004e4986          } while (ebx < this_1);
004e4986          
004e498a          UIElement_ItemList::ItemList_Flush(this);
004e4993          return;
004e4948      }
004e4948      
004e49c5      UIElement_ItemList::ItemList_Flush(this);
004e4830  }

004e49cf                                               90                                                                 .

004e49d0  void __thiscall UIElement_ItemList::ItemList_SetParentContainer(class UIElement_ItemList* this, uint32_t arg2, int32_t arg3, int32_t arg4)

004e49d0  {
004e49d1      uint32_t ebp = arg2;
004e49da      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(ebp);
004e49da      
004e4a08      if ((eax == 0 || (((eax->pwd._bitfield & "activation type (%s) with '%s' b…") == 0 && eax->pwd._itemsCapacity == 0) && eax->pwd._containersCapacity == 0)))
004e4a08      {
004e4ac3          this->parentContainerID = 0;
004e4ac9          UIElement_ItemList::ItemList_Flush(this);
004e4ac9          return;
004e4a08      }
004e4a08      
004e4a0e      arg2 = 0;
004e4a0e      
004e4a1e      if (this->parentContainerID != ebp)
004e4a1e      {
004e4a20          arg2 = 1;
004e4a24          this->parentContainerID = ebp;
004e4a1e      }
004e4a1e      
004e4a2c      UIElement_ItemList::ItemList_UpdateContainerListSize(this);
004e4a33      UIElement_ItemList::ItemList_Flush(this);
004e4a3e      uint32_t player_id;
004e4a3e      
004e4a3e      if ((eax->pwd._bitfield & 1) == 0)
004e4a3e      {
004e4a40          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004e4a40          
004e4a47          if (SmartBox::smartbox_1 == 0)
004e4a51              player_id = 0;
004e4a47          else
004e4a49              player_id = SmartBox::smartbox_1->player_id;
004e4a3e      }
004e4a3e      
004e4a55      if (((eax->pwd._bitfield & 1) != 0 || ebp == player_id))
004e4a55      {
004e4a57          player_id = this->containerList;
004e4a61          class IDList* eax_1;
004e4a61          
004e4a61          if (player_id == 0)
004e4a6a              eax_1 = ACCWeenieObject::GetContainedItemsList(eax);
004e4a61          else
004e4a63              eax_1 = ACCWeenieObject::GetContainedContainersList(eax);
004e4a63          
004e4a73          if (eax_1 != 0)
004e4a73          {
004e4a79              IDList::SetCurToNum(eax_1, 0);
004e4a81              int32_t i = 0;
004e4a81              
004e4a85              if (eax_1->numIDs > 0)
004e4a85              {
004e4aa7                  do
004e4aa7                  {
004e4a89                      uint32_t eax_3 = IDList::GetCurID(eax_1);
004e4a89                      
004e4a90                      if (eax_3 != 0)
004e4a95                          UIElement_ItemList::ItemList_AddItem(this, eax_3);
004e4a95                      
004e4a9c                      IDList::SetCurToNext(eax_1);
004e4aa4                      i += 1;
004e4aa7                  } while (i < eax_1->numIDs);
004e4a85              }
004e4a73          }
004e4a55      }
004e4a55      
004e4ab0      if (arg2 != 0)
004e4ab3          CM_UI::SendNotice_NewParentContainer(ebp);
004e49d0  }

004e4ad4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004e4ae0  void __thiscall UIElement_ItemList::ItemList_OpenContainer(class UIElement_ItemList* this, uint32_t arg2, int32_t arg3)

004e4ae0  {
004e4aea      if (arg2 != 0)
004e4aea      {
004e4af2          if (this->openItemID == arg2)
004e4b59              return;
004e4b59          
004e4afa          if (arg3 == 0)
004e4afa          {
004e4b0d          label_4e4b0d:
004e4b0d              class UIElement_ItemList* childList = this->childList;
004e4b0d              
004e4b15              if (childList != 0)
004e4b15              {
004e4b18                  UIElement_ItemList::ItemList_SetParentList(childList, this);
004e4b28                  UIElement_ItemList::ItemList_SetParentContainer(this->childList, arg2, 0, 1);
004e4b2d                  class UIElement_ItemList* childList_1 = this->childList;
004e4b2d                  
004e4b3b                  if (childList_1->m_listItems.m_num != 0)
004e4b3f                      UIElement_ListBox::ScrollToShow(childList_1, 0);
004e4b15              }
004e4b15              
004e4b47              this->openItemID = arg2;
004e4b4d              UIElement_ItemList::UpdateOpenContainerIndicator(this, arg2);
004e4b59              return;
004e4afa          }
004e4afa          
004e4b04          if (UIElement_ItemList::ItemList_IsInList(this, arg2) != 0)
004e4b04              goto label_4e4b0d;
004e4aea      }
004e4ae0  }

004e4b5c                                                                                      90 90 90 90                              ....

004e4b60  void __fastcall UIElement_ItemList::ItemList_OpenFirstContainer(class UIElement_ItemList* this)

004e4b60  {
004e4b69      class UIElement* ecx = *(uint32_t*)this->m_listItems.m_data;
004e4b6e      void* eax_1;
004e4b6e      
004e4b6e      if (ecx != 0)
004e4b77          eax_1 = ecx->vtable->DynamicCast(0x10000032);
004e4b77      
004e4b7f      if ((ecx == 0 || eax_1 == 0))
004e4b7f      {
004e4be7          class UIElement_ItemList* childList_2 = this->childList;
004e4be7          
004e4bef          if (childList_2 != 0)
004e4bf7              UIElement_ItemList::ItemList_SetParentContainer(childList_2, 0, 0, 1);
004e4bf7          
004e4bef          return;
004e4b7f      }
004e4b7f      
004e4b81      uint32_t edi_1 = *(uint32_t*)((char*)eax_1 + 0x5fc);
004e4b81      
004e4b91      if (((edi_1 != 0 && this->openItemID != edi_1) && UIElement_ItemList::ItemList_IsInList(this, edi_1) != 0))
004e4b91      {
004e4b9f          class UIElement_ItemList* childList = this->childList;
004e4b9f          
004e4ba7          if (childList != 0)
004e4ba7          {
004e4baa              UIElement_ItemList::ItemList_SetParentList(childList, this);
004e4bba              UIElement_ItemList::ItemList_SetParentContainer(this->childList, edi_1, 0, 1);
004e4bbf              class UIElement_ItemList* childList_1 = this->childList;
004e4bbf              
004e4bcd              if (childList_1->m_listItems.m_num != 0)
004e4bd1                  UIElement_ListBox::ScrollToShow(childList_1, 0);
004e4ba7          }
004e4ba7          
004e4bd9          this->openItemID = edi_1;
004e4bdf          UIElement_ItemList::UpdateOpenContainerIndicator(this, edi_1);
004e4b91      }
004e4b60  }

004e4bff                                                                                               90                                 .

004e4c00  void __fastcall UIElement_ItemList::RefreshList(class UIElement_ItemList* this)

004e4c00  {
004e4c0b      UIElement_ItemList::ItemList_SetParentContainer(this, this->parentContainerID, 1, 1);
004e4c00  }

004e4c11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004e4c20  void __thiscall UIElement_ItemList::ServerSaysAttemptFailed(class UIElement_ItemList* this, uint32_t arg2)

004e4c20  {
004e4c23      uint32_t parentContainerID = this->parentContainerID;
004e4c23      
004e4c2b      if (parentContainerID != 0)
004e4c2b      {
004e4c35          if (parentContainerID == arg2)
004e4c87              UIElement_ItemList::ItemList_SetParentContainer(this, parentContainerID, 1, 1);
004e4c35          else
004e4c35          {
004e4c3d              int32_t edi_1 = 0;
004e4c3d              
004e4c41              if (this->m_listItems.m_num > 0)
004e4c41              {
004e4c49                  while (true)
004e4c49                  {
004e4c49                      int32_t* ecx = this->m_listItems.m_data[edi_1];
004e4c49                      
004e4c4e                      if (ecx != 0)
004e4c4e                      {
004e4c57                          void* eax_2 = *(uint32_t*)(*(uint32_t*)ecx + 0x94)(0x10000032);
004e4c57                          
004e4c67                          if ((eax_2 != 0 && *(uint32_t*)((char*)eax_2 + 0x5fc) == arg2))
004e4c67                              break;
004e4c4e                      }
004e4c4e                      
004e4c6f                      edi_1 += 1;
004e4c6f                      
004e4c72                      if (edi_1 >= this->m_listItems.m_num)
004e4c77                          return;
004e4c49                  }
004e4c49                  
004e4c87                  UIElement_ItemList::ItemList_SetParentContainer(this, this->parentContainerID, 1, 1);
004e4c41              }
004e4c35          }
004e4c2b      }
004e4c20  }

004e4c92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004e4ca0  void __fastcall UIElement_ItemList::PostInit(class UIElement_ItemList* this)

004e4ca0  {
004e4ca4      UIElement_Scrollable::PostInit(this);
004e4ca9      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e4ca9      
004e4cb2      if (eax != 0)
004e4cb2      {
004e4cba          struct gmNoticeHandler::VTable** eax_1;
004e4cba          
004e4cba          if (this == 0)
004e4cc4              eax_1 = nullptr;
004e4cba          else
004e4cbc              eax_1 = &this->vtable;
004e4cbc          
004e4cc6          eax->vtable->RegisterNoticeHandler(0x186ab, eax_1);
004e4cd5          struct gmNoticeHandler::VTable** eax_2;
004e4cd5          
004e4cd5          if (this == 0)
004e4cdf              eax_2 = nullptr;
004e4cd5          else
004e4cd7              eax_2 = &this->vtable;
004e4cd7          
004e4ce1          eax->vtable->RegisterNoticeHandler(0x186aa, eax_2);
004e4cf0          struct gmNoticeHandler::VTable** eax_3;
004e4cf0          
004e4cf0          if (this == 0)
004e4cfa              eax_3 = nullptr;
004e4cf0          else
004e4cf2              eax_3 = &this->vtable;
004e4cf2          
004e4cfc          eax->vtable->RegisterNoticeHandler(0x186a8, eax_3);
004e4d0b          struct gmNoticeHandler::VTable** eax_4;
004e4d0b          
004e4d0b          if (this == 0)
004e4d15              eax_4 = nullptr;
004e4d0b          else
004e4d0d              eax_4 = &this->vtable;
004e4d0d          
004e4d17          eax->vtable->RegisterNoticeHandler(0x186a9, eax_4);
004e4d26          struct gmNoticeHandler::VTable** eax_5;
004e4d26          
004e4d26          if (this == 0)
004e4d30              eax_5 = nullptr;
004e4d26          else
004e4d28              eax_5 = &this->vtable;
004e4d28          
004e4d32          eax->vtable->RegisterNoticeHandler(0x4dd263, eax_5);
004e4cb2      }
004e4cb2      
004e4d43      /* tailcall */
004e4d43      return UIElement_ItemList::InitItemList(this);
004e4ca0  }

004e4d48                          90 90 90 90 90 90 90 90                                                          ........

004e4d50  enum UIElementMessageListenResult __thiscall UIElement_ItemList::ListenToElementMessage(class UIElement_ItemList* this, struct UIElementMessageInfo const* arg2)

004e4d50  {
004e4d56      uint32_t idMessage = arg2->idMessage;
004e4d56      
004e4d60      if (idMessage == 0x1c)
004e4d60      {
004e4d66          class UIElement* eax = UIElement_ListBox::GetItemUnderMouse(this);
004e4d66          
004e4d6d          if (eax != 0)
004e4d6d          {
004e4d7c              class UIElement_UIItem* eax_1 = eax->vtable->DynamicCast(0x10000032);
004e4d7c              
004e4d86              if (eax_1 != 0)
004e4d86              {
004e4d8c                  uint32_t dwParam1 = arg2->dwParam1;
004e4d8c                  
004e4d92                  if (dwParam1 == 7)
004e4d92                  {
004e4da2                      if (ClientUISystem::GetUISystem()->targetMode != TARGET_MODE_NONE)
004e4da2                      {
004e4da7                          UIElement_ItemList::HandleTargetedUseLeftClick(this, eax_1);
004e4db8                          return UIElement_ListBox::ListenToElementMessage(this, arg2);
004e4da2                      }
004e4da2                      
004e4dc3                      if (eax_1->itemID != 0)
004e4dc3                      {
004e4dc9                          uint32_t eax_4;
004e4dc9                          eax_4 = this->m_singleSelection;
004e4dc9                          
004e4dd1                          if (eax_4 != 0)
004e4dd6                              UIElement_ItemList::HandleSingleSelection(this, eax_1);
004e4dd6                          
004e4de4                          ACCWeenieObject::SetSelectedObject(eax_1->itemID, 0);
004e4de4                          
004e4df4                          if (this->containerList != 0)
004e4df4                          {
004e4dfa                              class UIElement_ItemList* childList = this->childList;
004e4dfa                              
004e4e02                              if (childList != 0)
004e4e02                              {
004e4e09                                  UIElement_ItemList::ItemList_SetParentList(childList, this);
004e4e1f                                  UIElement_ItemList::ItemList_SetParentContainer(this->childList, eax_1->itemID, 0, 1);
004e4e24                                  uint32_t itemID_1 = eax_1->itemID;
004e4e24                                  
004e4e30                                  if (this->openItemID != itemID_1)
004e4e30                                  {
004e4e39                                      this->openItemID = itemID_1;
004e4e3f                                      UIElement_ItemList::UpdateOpenContainerIndicator(this, itemID_1);
004e4e4a                                      UIElement_ListBox::ScrollToHome(this->childList);
004e4e30                                  }
004e4e02                              }
004e4df4                          }
004e4dc3                      }
004e4d92                  }
004e4d92                  else if (dwParam1 == 0xa)
004e4e61                  {
004e4e63                      uint32_t itemID = eax_1->itemID;
004e4e63                      
004e4e6b                      if (itemID != 0)
004e4e6b                      {
004e4e71                          dwParam1 = this->vendorItemList;
004e4e71                          
004e4e79                          if (dwParam1 == 0)
004e4e79                          {
004e4e7f                              dwParam1 = this->salvageList;
004e4e7f                              
004e4e87                              if (dwParam1 == 0)
004e4e87                              {
004e4e8d                                  dwParam1 = this->containerList;
004e4e95                                  class ClientUISystem* eax_8;
004e4e95                                  
004e4e95                                  if (dwParam1 != 0)
004e4e97                                      eax_8 = ClientUISystem::GetUISystem();
004e4e97                                  
004e4e9f                                  if ((dwParam1 == 0 || itemID == eax_8->groundObject))
004e4eb0                                      ItemHolder::UseObject(eax_1->itemID, 0, 0);
004e4e87                              }
004e4e79                          }
004e4e6b                      }
004e4e61                  }
004e4e61                  else if (dwParam1 == 8)
004e4eca                  {
004e4ed8                      if (eax_1->itemID != 0)
004e4ed8                      {
004e4eda                          uint32_t eax_10;
004e4eda                          eax_10 = this->m_singleSelection;
004e4eda                          
004e4ee2                          if (eax_10 != 0)
004e4ee7                              UIElement_ItemList::HandleSingleSelection(this, eax_1);
004e4ee7                          
004e4ef5                          ACCWeenieObject::SetSelectedObject(eax_1->itemID, 0);
004e4f0b                          ClientUISystem::ExamineObject(ClientUISystem::GetUISystem(), eax_1->itemID);
004e4f1c                          return UIElement_ListBox::ListenToElementMessage(this, arg2);
004e4ed8                      }
004e4ed8                      
004e4f1f                      uint32_t spellID = eax_1->spellID;
004e4f1f                      
004e4f27                      if (spellID != 0)
004e4f31                          ClientUISystem::ExamineSpell(ClientUISystem::GetUISystem(), spellID);
004e4eca                  }
004e4d86              }
004e4d6d          }
004e4d60      }
004e4d60      else if (idMessage == 0x15)
004e4f48      {
004e4f4a          class UIElement* pElement = arg2->pElement;
004e4f4a          
004e4f4f          if (pElement != 0)
004e4f4f          {
004e4f58              class UIElement_UIItem* eax_16 = pElement->vtable->DynamicCast(0x10000032);
004e4f58              
004e4f60              if (eax_16 != 0)
004e4f69                  UIElement_UIItem::SetDragAcceptState(eax_16, 0x1000003f);
004e4f4f          }
004e4f4f          
004e4f71          UIElement_ItemList::HandleDropRelease(this, arg2);
004e4f48      }
004e4f48      
004e4f82      return UIElement_ListBox::ListenToElementMessage(this, arg2);
004e4d50  }

004e4f85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004e4f90  void __thiscall UIElement_ItemList::ItemAttributesChanged(class UIElement_ItemList* this, uint32_t arg2, int32_t arg3)

004e4f90  {
004e4f98      uint32_t parentContainerID = this->parentContainerID;
004e4f98      
004e4fa8      if ((arg2 == parentContainerID && (arg3 & 1) != 0))
004e4fb1          UIElement_ItemList::ItemList_SetParentContainer(this, parentContainerID, 1, 1);
004e4fb1      
004e4fbc      int32_t i = 0;
004e4fbc      
004e4fc0      if (this->m_listItems.m_num > 0)
004e4fc0      {
004e4ff8          do
004e4ff8          {
004e4fc8              int32_t* ecx_1 = this->m_listItems.m_data[i];
004e4fc8              
004e4fcd              if (ecx_1 != 0)
004e4fcd              {
004e4fd6                  class UIElement_UIItem* eax_2 = *(uint32_t*)(*(uint32_t*)ecx_1 + 0x94)(0x10000032);
004e4fd6                  
004e4fe6                  if ((eax_2 != 0 && eax_2->itemID == arg2))
004e4fea                      UIElement_UIItem::UIItem_Update(eax_2);
004e4fcd              }
004e4fcd              
004e4ff5              i += 1;
004e4ff8          } while (i < this->m_listItems.m_num);
004e4fc0      }
004e4f90  }


004e5000  void __thiscall UIElement_ItemList::ServerSaysMoveItem(class UIElement_ItemList* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004e5000  {
004e500a      class ACCWeenieObject* eax;
004e500a      int32_t ecx;
004e500a      eax = ClientObjMaintSystem::GetWeenieObject(arg2);
004e500a      
004e5016      if (eax == 0)
004e5016      {
004e506a      label_4e506a:
004e506a          uint32_t parentContainerID = this->parentContainerID;
004e506a          
004e5072          if (parentContainerID != 0)
004e5072          {
004e5081              if ((arg3 == parentContainerID || arg6 == parentContainerID))
004e50af                  UIElement_ItemList::ItemList_SetParentContainer(this, parentContainerID, 1, 1);
004e5081              else if (UIElement_ItemList::ItemList_IsInList(this, arg2) != 0)
004e508d              {
004e509c                  UIElement_ItemList::ItemList_SetParentContainer(this, this->parentContainerID, 1, 1);
004e50a5                  return;
004e508d              }
004e508d              
004e50be              if (((eax != 0 && arg6 == this->parentContainerID) && (ACCWeenieObject::IsContainer(eax) != 0 && ACCWeenieObject::selectedID == arg2)))
004e50d8                  UIElement_ItemList::ItemList_OpenContainer(this, arg2, 0);
004e5072          }
004e5016      }
004e5016      else
004e5016      {
004e5021          int32_t eax_3 = ((eax->pwd._bitfield >> 0x17) & 1);
004e5021          
004e5038          if (((eax_3 != 0 || eax->pwd._itemsCapacity != 0) || eax->pwd._containersCapacity != 0))
004e503a              ecx = this->containerList;
004e503a          
004e5038          if ((((eax_3 == 0 && eax->pwd._itemsCapacity == 0) && eax->pwd._containersCapacity == 0) || ecx != 0))
004e5038          {
004e505e              if (((eax_3 != 0 || eax->pwd._itemsCapacity != 0) || eax->pwd._containersCapacity != 0))
004e504a                  goto label_4e506a;
004e504a              
004e5060              int32_t eax_5;
004e5060              eax_5 = this->containerList;
004e5060              
004e5068              if (eax_5 == 0)
004e5068                  goto label_4e506a;
004e5038          }
004e5016      }
004e5000  }

004e50e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004e50f0  void __thiscall UIElement_ItemList::RecvNotice_ServerSaysAttemptFailed(class UIElement_ItemList* this, uint32_t arg2)

004e50f0  {
004e50f6      /* tailcall */
004e50f6      return UIElement_ItemList::ServerSaysAttemptFailed(((char*)this - 0x668), arg2);
004e50f0  }

004e50fb                                                                                   90 90 90 90 90                             .....

004e5100  void __thiscall UIElement_ItemList::RecvNotice_ItemAttributesChanged(class UIElement_ItemList* this, uint32_t arg2, uint32_t arg3)

004e5100  {
004e5106      /* tailcall */
004e5106      return UIElement_ItemList::ItemAttributesChanged(((char*)this - 0x668), arg2, arg3);
004e5100  }

004e510b                                   90 90 90 90 90                                                             .....

004e5110  void __thiscall UIElement_ItemList::RecvNotice_ServerSaysMoveItem(class UIElement_ItemList* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004e5110  {
004e5116      /* tailcall */
004e5116      return UIElement_ItemList::ServerSaysMoveItem(((char*)this - 0x668), arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
004e5110  }

004e511b                                                                                   90 90 90 90 90                             .....

004e5120  void __thiscall UIElement_SmartBoxWrapper::UIElement_SmartBoxWrapper(class UIElement_SmartBoxWrapper* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004e5120  {
004e5130      UIElement_Field::UIElement_Field(this, arg2, arg3);
004e5135      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e514b      this->vtable = 0x7c0318;
004e5141      this->vtable = &UIElement_SmartBoxWrapper::`vftable';
004e5157      __builtin_memset(&this->m_cFlipCount, 0, 0x1a);
004e5187      this->m_CurrentSection = CENTER_SECTION;
004e5191      this->m_dropItemID = 0;
004e5197      this->m_targetMode = 0;
004e519d      this->m_dragIcon = nullptr;
004e51a3      UIListener::RegisterForGlobalMessage(this, 3);
004e51a8      GlobalEventHandler::GetGlobalEventHandler()->vtable->RegisterNoticeHandler(0x186a7, &this->vtable);
004e5120  }

004e51c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004e51d0  class UIElement* __thiscall UIElement_SmartBoxWrapper::DynamicCast(class UIElement_SmartBoxWrapper* this, uint32_t arg2) __pure

004e51d0  {
004e51dc      if (arg2 == 0x10000030)
004e51e9          return this;
004e51e9      
004e51e3      int32_t edx_1;
004e51e3      edx_1 = arg2 != 3;
004e51e7      return (this & (edx_1 - 1));
004e51d0  }

004e51ec                                      90 90 90 90                                                              ....

004e51f0  uint32_t UIElement_SmartBoxWrapper::GetUIElementType(class UIElement_SmartBoxWrapper const* this @ ecx) __pure

004e51f0  {
004e51f5      return 0x10000030;
004e51f0  }

004e51f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e5200  void __fastcall UIElement_SmartBoxWrapper::~UIElement_SmartBoxWrapper(class UIElement_SmartBoxWrapper* this)

004e5200  {
004e520c      this->vtable = 0x7c0318;
004e5204      this->vtable = &UIElement_SmartBoxWrapper::`vftable';
004e5218      UIListener::UnRegisterForGlobalMessage(this, 3);
004e521d      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e521d      
004e5224      if (eax != 0)
004e5226          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e5226      
004e5204      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e5236      NoticeHandler::~NoticeHandler(&this->vtable);
004e523f      /* tailcall */
004e523f      return UIElement_Field::~UIElement_Field(this);
004e5200  }

004e5244              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004e5250  class UIElement* UIElement_SmartBoxWrapper::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e5250  {
004e5255      void* eax = operator new(0x628);
004e5255      
004e525f      if (eax == 0)
004e5275          return 0;
004e5275      
004e5272      return UIElement_SmartBoxWrapper::UIElement_SmartBoxWrapper(eax, arg1, arg2);
004e5250  }

004e5276                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e5280  void __thiscall UIElement_SmartBoxWrapper::ResizeTo(class UIElement_SmartBoxWrapper* this, int32_t const arg2, int32_t const arg3)

004e5280  {
004e5290      UIElement::ResizeTo(this, arg2, arg3);
004e5295      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004e529d      int32_t eax = UIRegion::GetHeight(this);
004e52a5      int32_t eax_1 = UIRegion::GetWidth(this);
004e52ad      int32_t eax_2 = UIRegion::GetScreenY0(this);
004e52bd      SmartBox::SetMode(SmartBox::smartbox_1, UIRegion::GetScreenX0(this), eax_2, eax_1, eax);
004e5280  }

004e52c7                       90 90 90 90 90 90 90 90 90                                                         .........

004e52d0  void __thiscall UIElement_SmartBoxWrapper::MoveTo(class UIElement_SmartBoxWrapper* this, int32_t const arg2, int32_t const arg3)

004e52d0  {
004e52e0      UIElement::MoveTo(this, arg2, arg3);
004e52e5      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004e52ed      int32_t eax = UIRegion::GetHeight(this);
004e52f5      int32_t eax_1 = UIRegion::GetWidth(this);
004e52fd      int32_t eax_2 = UIRegion::GetScreenY0(this);
004e530d      SmartBox::SetMode(SmartBox::smartbox_1, UIRegion::GetScreenX0(this), eax_2, eax_1, eax);
004e52d0  }

004e5317                                                                       90 90 90 90 90 90 90 90 90                         .........

004e5320  void __stdcall UIElement_SmartBoxWrapper::ApplyLighting(class UIElement_SmartBoxWrapper* this @ ecx, uint32_t arg2, enum LightingMode arg3)

004e5320  {
004e532b      class CPhysicsObj* eax = CObjectMaint::GetObjectA(CObjectMaint::s_pcInstance, arg2);
004e532b      
004e5334      if (eax != 0)
004e5334      {
004e533d          if (arg3 == LM_RESTORE_LIGHTING)
004e5375              CPhysicsObj::RestoreLighting(eax);
004e533d          else
004e533d          {
004e5340              if (arg3 == 1)
004e5370                  /* tailcall */
004e5370                  return CPhysicsObj::SetLighting(eax, 0f, 0.349999994f);
004e5370              
004e5343              if (arg3 == 2)
004e5358                  /* tailcall */
004e5358                  return CPhysicsObj::SetLighting(eax, 0.99000001f, 1f);
004e533d          }
004e5334      }
004e5320  }

004e537d                                                                                         90 90 90                               ...

004e5380  void __stdcall UIElement_SmartBoxWrapper::HandleTargetedUseLeftClick(class UIElement_SmartBoxWrapper* this @ ecx, uint32_t arg2, uint32_t arg3)

004e5380  {
004e5387      if ((arg2 != 0 && ClientUISystem::GetUISystem() != 0))
004e539f          ClientUISystem::ExecuteTargetModeForItem(ClientUISystem::GetUISystem(), arg2, arg3);
004e5380  }

004e53a8                          90 90 90 90 90 90 90 90                                                          ........

004e53b0  void* __thiscall UIElement_SmartBoxWrapper::`scalar deleting destructor'(class UIElement_SmartBoxWrapper* this, uint32_t arg2)

004e53b0  {
004e53bc      this->vtable = 0x7c0318;
004e53b4      this->vtable = &UIElement_SmartBoxWrapper::`vftable';
004e53c8      UIListener::UnRegisterForGlobalMessage(this, 3);
004e53cd      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e53cd      
004e53d4      if (eax != 0)
004e53d6          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e53d6      
004e53b4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e53e6      NoticeHandler::~NoticeHandler(&this->vtable);
004e53ed      UIElement_Field::~UIElement_Field(this);
004e53ed      
004e53f7      if ((arg2 & 1) != 0)
004e53fa          operator delete(this);
004e53fa      
004e5406      return this;
004e53b0  }

004e5409                             90 90 90 90 90 90 90                                                           .......

004e5410  void UIElement_SmartBoxWrapper::Register()

004e5410  {
004e541a      UIElement::RegisterElementClass(0x10000030, UIElement_SmartBoxWrapper::Create);
004e5410  }

004e5423           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e5430  void __stdcall UIElement_SmartBoxWrapper::FindObject(class UIElement_SmartBoxWrapper* this @ ecx, int32_t arg2, int32_t arg3, uint8_t arg4)

004e5430  {
004e5430      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004e5430      
004e5437      if (UIElementManager::s_pInstance_1 != 0)
004e5437      {
004e5439          class UIElement* m_pElementLastOver = UIElementManager::s_pInstance_1->m_pElementLastOver;
004e5439          
004e5441          if (m_pElementLastOver != 0)
004e5441          {
004e544a              void* eax_1 = m_pElementLastOver->vtable->DynamicCast(0x10000032);
004e544a              
004e5452              if (eax_1 != 0)
004e5452              {
004e545d                  SmartBox::set_found_object(*(uint32_t*)((char*)eax_1 + 0x5fc), 0xffffffff);
004e5465                  return;
004e5452              }
004e5441          }
004e5437      }
004e5437      
004e5472      SmartBox::find_object(arg2, arg3);
004e5430  }

004e547d                                                                                         90 90 90                               ...

004e5480  void __thiscall UIElement_SmartBoxWrapper::HandleDropRelease(class UIElement_SmartBoxWrapper* this, struct UIElementMessageInfo const* arg2)

004e5480  {
004e5484      uint32_t dwParam1 = arg2->dwParam1;
004e548d      class UIElement* ecx = *(uint32_t*)(dwParam1 + 8);
004e5492      void* eax = *(uint32_t*)(dwParam1 + 0x10);
004e5492      
004e54a7      if ((ecx != 0 && (eax != 0 && *(uint32_t*)((char*)eax + 0x2e4) == this->m_desc.m_elementID)))
004e54a7      {
004e54b9          char var_8;
004e54b9          void var_4;
004e54b9          UIElement_ItemList::InqDropIconInfo(ecx, &arg2, &var_4, &var_8);
004e54b9          
004e54ce          if ((arg2 != 0 && (var_8 & 0xe) == 0))
004e54ce          {
004e54d9              int32_t eax_2 = ICIDM::s_cidm->vtable->GetMouseX();
004e54e6              int32_t eax_4 = ICIDM::s_cidm->vtable->GetMouseY();
004e54f0              this->m_dropItemID = arg2;
004e54f9              this->m_SearchReason = sr_Drop;
004e5503              UIElement_SmartBoxWrapper::FindObject(this, eax_2, eax_4, 1);
004e54ce          }
004e54a7      }
004e5480  }


004e5510  void __thiscall UIElement_SmartBoxWrapper::PostInit(class UIElement_SmartBoxWrapper* this)

004e5510  {
004e5514      int32_t eax;
004e5514      uint32_t ecx;
004e5514      int32_t edx;
004e5514      eax = UIElement::PostInit(this);
004e5519      int32_t var_c = 0x23;
004e551b      int32_t var_10 = 5;
004e551d      int32_t var_14 = 0x10000038;
004e5522      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
004e5522      
004e552e      if (eax_1 != 0)
004e552e      {
004e553d          class UIElement* eax_2 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance, this, eax_1, 0x10000345);
004e5542          this->m_dragIcon = eax_2;
004e5548          eax_2->vtable->SetVisible(0);
004e552e      }
004e552e      
004e5551      this->vtable->SetMouseVisible(1);
004e5551      
004e555f      if (eax_1 == 0)
004e556c          return;
004e556c      
004e5567      /* jump -> eax_1->vtable->Release */
004e5510  }

004e556d                                         90 90 90                                                               ...

004e5570  uint8_t __thiscall UIElement_SmartBoxWrapper::InqAvailableProperties(class UIElement_SmartBoxWrapper const* this, class AvailablePropertySet* arg2)

004e5570  {
004e5573      class AvailablePropertySet* edi = arg2;
004e5578      int32_t ebx;
004e5578      ebx = 1;
004e5578      
004e5581      if (UIElement_Field::InqAvailableProperties(this, edi) == 0)
004e5583          ebx = 0;
004e5583      
004e5589      MasterPropertyGrabber::MasterPropertyGrabber(&arg2);
004e558e      class AvailablePropertySet* esi = arg2;
004e558e      
004e5594      if (esi == 0)
004e5594      {
004e5598          int32_t eax_1;
004e5598          eax_1 = 0;
004e559b          return 0;
004e5594      }
004e5594      
004e55ad      if (MasterProperty::InqAvailablePropertiesByPropertyGroup(esi, 0x10000003, edi) == 0)
004e55af          ebx = 0;
004e55af      
004e55b5      *(int32_t*)((char*)esi->m_reqHash.vtable + 0x14)();
004e55bd      return ebx;
004e5570  }


004e55c0  enum UIElementMessageListenResult __thiscall UIElement_SmartBoxWrapper::ListenToElementMessage(class UIElement_SmartBoxWrapper* this, struct UIElementMessageInfo const* arg2)

004e55c0  {
004e55c6      uint32_t idMessage = arg2->idMessage;
004e55c6      
004e55ce      if (idMessage == 0x15)
004e55ce      {
004e55d6          UIElementManager::ResetTooltip(UIElementManager::s_pInstance);
004e55de          UIElement_SmartBoxWrapper::HandleDropRelease(this, arg2);
004e55ed          return UIElement::ListenToElementMessage(this, arg2);
004e55ce      }
004e55ce      
004e55f3      if (idMessage == 0x21)
004e55f3      {
004e55f5          int32_t y = arg2->ptWindow.y;
004e55f8          int32_t x = arg2->ptWindow.x;
004e5601          this->m_SearchReason = sr_Drag;
004e560b          UIElement_SmartBoxWrapper::FindObject(this, x, y, 1);
004e55f3      }
004e55f3      
004e561a      return UIElement::ListenToElementMessage(this, arg2);
004e55c0  }

004e561d                                                                                         90 90 90                               ...

004e5620  void __fastcall UIElement_SmartBoxWrapper::Global_Loop(class UIElement_SmartBoxWrapper* this)

004e5620  {
004e5623      uint32_t m_cFlipCount = this->m_cFlipCount;
004e5623      
004e562c      if (m_cFlipCount != 0)
004e562c      {
004e562e          long double x87_r7_1 = ((long double)Timer::cur_time);
004e5634          long double temp0_1 = ((long double)this->m_timeNextFlip);
004e5634          (x87_r7_1 - temp0_1);
004e5634          
004e563f          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004e563f          {
004e5644              enum LightingMode ecx = LM_RESTORE_LIGHTING;
004e5649              this->m_cFlipCount = (m_cFlipCount + 1);
004e5649              
004e564f              if ((m_cFlipCount + 1) < 5)
004e564f              {
004e566c                  int32_t ecx_1;
004e566c                  ecx_1 = ((m_cFlipCount + 1) & 1) != 0;
004e566f                  this->m_timeNextFlip = ((double)(((long double)Timer::cur_time) + ((long double)0.20000000000000001)));
004e5675                  ecx = (ecx_1 + 1);
004e564f              }
004e564f              else
004e5651                  this->m_cFlipCount = 0;
004e5651              
004e5680              UIElement_SmartBoxWrapper::ApplyLighting(this, this->m_iidSelectedObject, ecx);
004e563f          }
004e562c      }
004e562c      
004e5685      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004e5685      
004e5696      if ((ICIDM::s_cidm_1 != 0 && this->m_SearchReason < sr_MouseOver))
004e5696      {
004e5698          this->m_SearchReason = sr_MouseOver;
004e56b6          UIElement_SmartBoxWrapper::FindObject(this, ICIDM::s_cidm_1->vtable->GetMouseX(ICIDM::s_cidm_1->vtable->GetMouseY(0)));
004e5696      }
004e5620  }

004e56be                                                                                            90 90                                ..

004e56c0  void __thiscall UIElement_SmartBoxWrapper::MouseMove(class UIElement_SmartBoxWrapper* this, int32_t arg2, int32_t arg3)

004e56c0  {
004e56cf      UIElement::MouseMove(this, arg2, arg3);
004e56cf      
004e56e1      if (this->m_SearchReason < sr_MouseOver)
004e56e1      {
004e56e9          this->m_SearchReason = sr_MouseOver;
004e56ef          UIElement_SmartBoxWrapper::FindObject(this, arg2, arg3, 0);
004e56e1      }
004e56c0  }

004e56fa                                                                                90 90 90 90 90 90                            ......

004e5700  void __thiscall UIElement_SmartBoxWrapper::MouseDown(class UIElement_SmartBoxWrapper* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

004e5700  {
004e5715      UIElement::MouseDown(this, arg2, arg3, arg4);
004e5715      
004e571f      if (arg4 == 7)
004e571f      {
004e57c7          if ((SmartBox::smartbox->cmdinterp->vtable->HandleSelectLeft(1) == 0 && this->m_SearchReason < sr_Select))
004e57c7          {
004e57d3              if (ClientUISystem::GetUISystem()->targetMode != TARGET_MODE_NONE)
004e57d3              {
004e57d5                  this->m_SearchReason = sr_TargetedUse;
004e57ea                  this->m_targetMode = ClientUISystem::GetUISystem()->targetMode;
004e57f3                  UIElement_SmartBoxWrapper::FindObject(this, arg2, arg3, 1);
004e57fc                  return;
004e57d3              }
004e57d3              
004e5805              this->m_SearchReason = sr_Select;
004e580b              UIElement_SmartBoxWrapper::FindObject(this, arg2, arg3, 1);
004e57c7          }
004e571f      }
004e571f      else if (arg4 == 8)
004e5722      {
004e5780          if (*(int32_t*)((char*)ICIDM::s_cidm + 0x89) != 0)
004e5794              CameraManager::ToggleMouseLook(SmartBox::smartbox->camera_manager, 1);
004e5722      }
004e5722      else if ((arg4 == 0xa && (SmartBox::smartbox->cmdinterp->vtable->GetMouseLookActive() == 0 && this->m_SearchReason < sr_Use)))
004e5727      {
004e5761          this->m_SearchReason = sr_Use;
004e5767          UIElement_SmartBoxWrapper::FindObject(this, arg2, arg3, 1);
004e5727      }
004e5700  }

004e5817                                                                       90 90 90 90 90 90 90 90 90                         .........

004e5820  void __thiscall UIElement_SmartBoxWrapper::MouseUp(class UIElement_SmartBoxWrapper* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

004e5820  {
004e5835      UIElement::MouseUp(this, arg2, arg3, arg4);
004e5835      
004e583f      if (arg4 == 7)
004e58ca          SmartBox::smartbox->cmdinterp->vtable->HandleSelectLeft(0);
004e583f      else if (arg4 == 8)
004e5846      {
004e5854          if (this->m_fMouseMovementActive != 0)
004e5854          {
004e585e              if (this->m_fMouseMovementInProgress != 0)
004e5860                  this->m_fMouseMovementInProgress = 0;
004e5860              
004e586e              ClientUISystem::UpdateCursorState(ClientUISystem::GetUISystem());
004e5877              return;
004e5854          }
004e5854          
004e5887          if (*(int32_t*)((char*)ICIDM::s_cidm + 0x89) != 0)
004e5887          {
004e5897              CameraManager::ToggleMouseLook(SmartBox::smartbox->camera_manager, 0);
004e58a0              return;
004e5887          }
004e5887          
004e58b0          if (this->m_SearchReason < sr_Examine)
004e58b0          {
004e58b8              this->m_SearchReason = sr_Examine;
004e58be              UIElement_SmartBoxWrapper::FindObject(this, arg2, arg3, 1);
004e58b0          }
004e5846      }
004e5820  }

004e58e7                       90 90 90 90 90 90 90 90 90                                                         .........

004e58f0  uint8_t __thiscall UIElement_SmartBoxWrapper::PrepareDragIcon(class UIElement_SmartBoxWrapper* this, uint32_t arg2)

004e58f0  {
004e58f5      uint32_t ebp = arg2;
004e58f5      
004e5900      if (ebp == 0)
004e5900      {
004e5ab1          int32_t eax;
004e5ab1          eax = 0;
004e5ab7          return 0;
004e5900      }
004e5900      
004e590d      char var_14 = 0;
004e5911      UIRegion::ClearImage(this->m_dragIcon);
004e5917      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(ebp);
004e5917      
004e5923      if (eax_1 != 0)
004e5923      {
004e592d          UIRegion::SetBlitMode(this->m_dragIcon, Blit_3Alpha);
004e5934          void* eax_2 = operator new(0xc);
004e5940          class Graphic* eax_4;
004e5940          
004e5940          if (eax_2 == 0)
004e5953              eax_4 = nullptr;
004e5940          else
004e594c              eax_4 = Graphic::Graphic(eax_2, ACCWeenieObject::GetDragIcon(eax_1));
004e594c          
004e595c          UIRegion::SetImage(this->m_dragIcon, eax_4);
004e597b          int32_t eax_5;
004e597b          
004e597b          if ((((eax_1->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || eax_1->pwd._itemsCapacity != 0) || eax_1->pwd._containersCapacity != 0))
004e5981              eax_5 = 1;
004e597b          else
004e597d              eax_5 = 0;
004e597d          
004e5986          ebp = arg2;
004e598c          eax_5 = eax_5 != 0;
004e598f          var_14 = eax_5;
004e5923      }
004e5923      
004e599c      int32_t* var_8 = nullptr;
004e59a0      int32_t* var_4 = nullptr;
004e59a4      BaseProperty::SetPropertyName(&var_8, 0x1000000f);
004e59a4      
004e59ad      if (var_4 != 0)
004e59ad      {
004e59b3          BaseProperty::CheckCopyOnWrite(&var_8);
004e59bf          *(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(ebp);
004e59ad      }
004e59ad      
004e59c2      this->m_dragIcon->vtable->SetProperty(&var_8);
004e59de      int32_t* var_10 = nullptr;
004e59e2      int32_t* var_c = nullptr;
004e59e6      BaseProperty::SetPropertyName(&var_10, 0x10000011);
004e59e6      
004e59ef      if (var_c != 0)
004e59ef      {
004e59f5          BaseProperty::CheckCopyOnWrite(&var_10);
004e5a05          *(uint32_t*)(*(uint32_t*)var_c + 0x74)(var_14);
004e59ef      }
004e59ef      
004e5a08      this->m_dragIcon->vtable->SetProperty(&var_10);
004e5a1b      int32_t* eax_9 = var_10;
004e5a1b      
004e5a21      if (eax_9 != 0)
004e5a21      {
004e5a2b          int32_t esi_2 = (eax_9[1] - 1);
004e5a28          eax_9[1] = esi_2;
004e5a28          
004e5a32          if (esi_2 == 0)
004e5a38              **(uint32_t**)eax_9(1);
004e5a38          
004e5a3a          var_10 = nullptr;
004e5a21      }
004e5a21      
004e5a44      if (var_c != 0)
004e5a44      {
004e5a4e          int32_t esi_4 = (var_c[1] - 1);
004e5a4b          var_c[1] = esi_4;
004e5a4b          
004e5a55          if (esi_4 == 0)
004e5a5b              **(uint32_t**)var_c(1);
004e5a5b          
004e5a5d          int32_t var_c_1 = 0;
004e5a44      }
004e5a44      
004e5a61      int32_t* eax_14 = var_8;
004e5a61      
004e5a67      if (eax_14 != 0)
004e5a67      {
004e5a71          int32_t esi_6 = (eax_14[1] - 1);
004e5a6e          eax_14[1] = esi_6;
004e5a6e          
004e5a78          if (esi_6 == 0)
004e5a7e              **(uint32_t**)eax_14(1);
004e5a7e          
004e5a80          var_8 = nullptr;
004e5a67      }
004e5a67      
004e5a8a      if (var_4 != 0)
004e5a8a      {
004e5a94          int32_t esi_8 = (var_4[1] - 1);
004e5a91          var_4[1] = esi_8;
004e5a91          
004e5a9b          if (esi_8 == 0)
004e5aa1              **(uint32_t**)var_4(1);
004e5a8a      }
004e5a8a      
004e5aa6      int32_t* eax_17;
004e5aa6      eax_17 = 1;
004e5aac      return 1;
004e58f0  }

004e5aba                                                                                90 90 90 90 90 90                            ......

004e5ac0  void __thiscall UIElement_SmartBoxWrapper::ListenToGlobalMessage(class UIElement_SmartBoxWrapper* this, uint32_t arg2, int32_t arg3)

004e5ac0  {
004e5ac5      if (arg2 == 3)
004e5ac7          UIElement_SmartBoxWrapper::Global_Loop(this);
004e5ac0  }

004e5acf                                               90                                                                 .

004e5ad0  void __thiscall UIElement_SmartBoxWrapper::RecvNotice_SmartBoxObjectFound(class UIElement_SmartBoxWrapper* this, uint32_t arg2)

004e5ad0  {
004e5ad7      uint32_t ebp = arg2;
004e5ae4      class UIElement_SmartBoxWrapper* this_1 = this;
004e5ae6      int32_t edx;
004e5ae6      
004e5ae6      if (ebp != 0)
004e5ae6      {
004e5ae9          class ACCWeenieObject* eax_1;
004e5ae9          eax_1 = ClientObjMaintSystem::GetWeenieObject(ebp);
004e5ae9          
004e5af3          if (eax_1 != 0)
004e5af5              this = eax_1->pwd._bitfield;
004e5af5          
004e5afd          if ((eax_1 == 0 || this < 0))
004e5afd          {
004e5b02              SmartBox::set_found_object(0, 0xffffffff);
004e5b13              return;
004e5afd          }
004e5ae6      }
004e5ae6      
004e5b16      class HashSetData<UIElement *>* eax_2 = this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2];
004e5b1b      this = eax_2 != ebp;
004e5b20      bool var_9a = ebp != 0;
004e5b20      
004e5b30      if ((this != 0 && this_1->m_hashElementsRegisteredWith.vtable != 0))
004e5b30      {
004e5b39          eax_2 = CObjectMaint::GetObjectA(CObjectMaint::s_pcInstance, eax_2);
004e5b39          
004e5b40          if (eax_2 != 0)
004e5b44              eax_2 = CPhysicsObj::RestoreLighting(eax_2);
004e5b44          
004e5b49          this_1->m_hashElementsRegisteredWith.vtable = 0;
004e5b30      }
004e5b30      
004e5b4c      eax_2 = var_9a;
004e5b4c      
004e5b58      if (eax_2 != 0)
004e5b58      {
004e5b62          if (this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] >= 2)
004e5b62          {
004e5b6b              class CPhysicsObj* eax_3;
004e5b6b              eax_3 = CObjectMaint::GetObjectA(CObjectMaint::s_pcInstance, ebp);
004e5b6b              
004e5b72              if (eax_3 != 0)
004e5b84                  CPhysicsObj::SetLighting(eax_3, 0.99000001f, 1f);
004e5b84              
004e5b8f              class HashSetData<UIElement *>* eax_4 = this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3];
004e5b9b              this_1->m_hashElementsRegisteredWith.vtable = 1;
004e5ba2              this_1->m_hashElementsRegisteredWith.m_intrusiveTable.vtable = ((double)(((long double)Timer::cur_time) + ((long double)0.20000000000000001)));
004e5ba2              
004e5baa              if ((eax_4 != 5 && eax_4 != 7))
004e5bae                  ACCWeenieObject::SetSelectedObject(ebp, 0);
004e5b62          }
004e5b62          
004e5bb9          if (this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] == 4)
004e5bb9          {
004e5bc1              class ACCWeenieObject* eax_6;
004e5bc1              eax_6 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
004e5bc1              
004e5bcb              if (eax_6 != 0)
004e5bcb              {
004e5bcd                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004e5bdb                  uint32_t player_id;
004e5bdb                  
004e5bdb                  if (SmartBox::smartbox_1 == 0)
004e5be5                      player_id = 0;
004e5bdb                  else
004e5bdd                      player_id = SmartBox::smartbox_1->player_id;
004e5bdd                  
004e5be9                  int80_t st0_1;
004e5be9                  
004e5be9                  if (eax_6->pwd._wielderID != player_id)
004e5bf4                      edx = ItemHolder::UseObject(ACCWeenieObject::selectedID, 0, 0);
004e5bcb              }
004e5bb9          }
004e5bb9          
004e5c00          if (this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] == 3)
004e5c0a              ClientUISystem::ExamineObject(ClientUISystem::GetUISystem(), ebp);
004e5b58      }
004e5b58      
004e5c0f      class HashSetData<UIElement *>* eax_10 = this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3];
004e5c0f      
004e5c15      if (eax_10 == 5)
004e5c15      {
004e5c17          edx = var_9a;
004e5c1e          char temp1_1 = edx;
004e5c1e          edx = -(edx);
004e5c1e          
004e5c32          if (ItemHolder::AttemptPlaceIn3D(this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6], ((edx - edx) & ebp), 1) == 0)
004e5c32          {
004e5c38              eax_10 = ClientObjMaintSystem::GetWeenieObject(this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6]);
004e5c38              
004e5c42              if (eax_10 != 0)
004e5c47                  ACCWeenieObject::SetWaitingState(eax_10, 0);
004e5c32          }
004e5c32          
004e5c4c          this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = nullptr;
004e5c15      }
004e5c15      else if (eax_10 != 6)
004e5c57      {
004e5ce5          if (eax_10 == 7)
004e5ce5          {
004e5cf2              int80_t st0_2;
004e5cf2              eax_10 = UIElement_SmartBoxWrapper::HandleTargetedUseLeftClick(((char*)this_1 - 0x5f8), ebp, this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7]);
004e5cf7              this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = nullptr;
004e5ce5          }
004e5c57      }
004e5c57      else if (ebp != 0)
004e5c5f      {
004e5c65          eax_10 = ClientCombatSystem::GetCombatSystem();
004e5c65          
004e5c6e          if (*(int32_t*)((char*)eax_10 + 0x1c) == 1)
004e5c6e          {
004e5c7a              class HashSetData<UIElement *>* esi_1 = ClientObjMaintSystem::GetWeenieObject(ebp);
004e5c7a              
004e5c88              if ((esi_1 != 0 && *(int32_t*)((char*)esi_1 + 0x70) == 0))
004e5c88              {
004e5c90                  char eax_11;
004e5c90                  
004e5c90                  if ((*(int32_t*)((char*)esi_1 + 0x100) & 4) == 0)
004e5c96                      eax_11 = esi_1->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3]();
004e5c96                  
004e5c9b                  if (((*(int32_t*)((char*)esi_1 + 0x100) & 4) != 0 || (eax_11 & 0x10) != 0))
004e5c9d                      eax_10 = GetPlayerID();
004e5c9d                  
004e5cae                  if ((((((*(int32_t*)((char*)esi_1 + 0x100) & 4) == 0 && (eax_11 & 0x10) == 0) || ebp == eax_10) && *(int32_t*)((char*)esi_1 + 0xb8) == 0) && UIElement_SmartBoxWrapper::PrepareDragIcon(((char*)this_1 - 0x5f8), ebp) != 0))
004e5cae                  {
004e5cce                      UIElementManager::StartDragandDrop(UIElementManager::s_pInstance, this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8], 0x10, 0x10);
004e5cd8                      CM_Item::SendNotice_BeginDrag(ebp, 0, 0);
004e5cae                  }
004e5c88              }
004e5c6e          }
004e5c5f      }
004e5c5f      
004e5cfa      eax_10 = this;
004e5cfa      
004e5d00      if (eax_10 != 0)
004e5d00      {
004e5d13          struct PlayerModule::VTable** ecx_13;
004e5d13          ecx_13 = var_9a;
004e5d13          
004e5d21          if ((ecx_13 == 0 || PlayerModule::ShowTooltips(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0))
004e5d21          {
004e5e2a              *(int32_t*)((char*)this_1 + -0x554) &= 0xffffffdf;
004e5e30              UIElement::ClearTooltip(((char*)this_1 - 0x5f8));
004e5d21          }
004e5d21          else
004e5d21          {
004e5d3b              class PStringBase<unsigned short> var_98;
004e5d3b              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, WidthConvert, ACCWeenieObject::GetObjectName(ebp, NAME_APPROPRIATE, 0));
004e5d3b              
004e5d48              if (*(uint32_t*)(var_98 - 4) != 1)
004e5d48              {
004e5d52                  void var_90;
004e5d52                  StringInfo::StringInfo(&var_90);
004e5d62                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
004e5d74                  UIElement::SetTooltip(((char*)this_1 - 0x5f8), &var_90);
004e5d79                  *(int32_t*)((char*)this_1 + -0x554) |= 0x20;
004e5d79                  
004e5d8e                  if (UIElementManager::s_pInstance->m_dragElement != 0)
004e5d8e                  {
004e5d90                      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004e5d90                      
004e5d98                      if (ICIDM::s_cidm_1 != 0)
004e5d98                      {
004e5d9f                          uint32_t m_viewportX = RenderDevice::render_device->m_viewportX;
004e5dad                          int32_t eax_18 = ICIDM::s_cidm_1->vtable->GetMouseX();
004e5dbd                          uint32_t m_viewportY = RenderDevice::render_device->m_viewportY;
004e5dc9                          int32_t eax_20 = ICIDM::s_cidm_1->vtable->GetMouseY();
004e5dcc                          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
004e5dcc                          
004e5de8                          if (((eax_18 - m_viewportX) < RenderDevice::render_device_1->m_viewportWidth && (eax_20 - m_viewportY) < RenderDevice::render_device_1->m_viewportHeight))
004e5de8                          {
004e5df0                              UIElementManager::ResetTooltip(UIElementManager::s_pInstance);
004e5df5                              int32_t var_b0_10 = 0;
004e5dfb                              UIElement::StartTooltipAtMouse(((char*)this_1 - 0x5f8), 0f);
004e5de8                          }
004e5de8                          
004e5e00                          ebp = arg2;
004e5d98                      }
004e5d8e                  }
004e5d8e                  
004e5e0b                  StringInfo::~StringInfo(&var_90);
004e5d48              }
004e5d48              
004e5e14              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
004e5d21          }
004e5d21          
004e5e35          this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = ebp;
004e5e3f          ClientUISystem::UpdateCursorState(ClientUISystem::GetUISystem());
004e5d00      }
004e5d00      
004e5e45      this_1->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] = nullptr;
004e5ad0  }

004e5e58                                                                          90 90 90 90 90 90 90 90                          ........

004e5e60  class UIElement* __thiscall gmUIElement_VitaeIndicator::DynamicCast(class gmUIElement_VitaeIndicator* this, uint32_t arg2) __pure

004e5e60  {
004e5e76      if ((arg2 == 0x10000006 || (arg2 == 1 || arg2 == 0xc)))
004e5e83          return this;
004e5e83      
004e5e7d      int32_t edx_1;
004e5e7d      edx_1 = arg2 != 0xa;
004e5e81      return (this & (edx_1 - 1));
004e5e60  }

004e5e86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e5e90  uint32_t gmUIElement_VitaeIndicator::GetUIElementType(class gmUIElement_VitaeIndicator const* this @ ecx) __pure

004e5e90  {
004e5e95      return 0x10000006;
004e5e90  }

004e5e96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e5ea0  void __fastcall gmUIElement_VitaeIndicator::PostInit(class gmUIElement_VitaeIndicator* this)

004e5ea0  {
004e5ea4      UIElement_Button::PostInit(this);
004e5ea9      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e5eb2      struct gmNoticeHandler::VTable** eax_1;
004e5eb2      
004e5eb2      if (this == 0)
004e5ebc          eax_1 = nullptr;
004e5eb2      else
004e5eb4          eax_1 = &this->vtable;
004e5eb4      
004e5ebe      eax->vtable->RegisterNoticeHandler(0x4dd1f0, eax_1);
004e5ebe      
004e5ecd      if (this != 0)
004e5ecd      {
004e5ecf          eax->vtable->RegisterNoticeHandler(0x4dd215, &this->vtable);
004e5ee4          return;
004e5ecd      }
004e5ecd      
004e5ee5      eax->vtable->RegisterNoticeHandler(0x4dd215, 0);
004e5ea0  }

004e5ef7                                                                       90 90 90 90 90 90 90 90 90                         .........

004e5f00  class UIElement* gmUIElement_VitaeIndicator::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e5f00  {
004e5f06      void* result = operator new(0x728);
004e5f06      
004e5f12      if (result == 0)
004e5f50          return 0;
004e5f50      
004e5f20      UIElement_Button::UIElement_Button(result, arg1, arg2);
004e5f25      *(uint32_t*)((char*)result + 0x720) = 0x7bf328;
004e5f2f      *(uint32_t*)result = &gmUIElement_VitaeIndicator::`vftable';
004e5f35      *(uint32_t*)((char*)result + 0x608) = 0x7c126c;
004e5f3f      *(uint32_t*)((char*)result + 0x720) = 0x7c04c8;
004e5f4c      return result;
004e5f00  }

004e5f51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004e5f60  void* __thiscall gmUIElement_VitaeIndicator::`scalar deleting destructor'(class gmUIElement_VitaeIndicator* this, uint32_t arg2)

004e5f60  {
004e5f6a      this->vtable = &gmUIElement_VitaeIndicator::`vftable';
004e5f70      this->vtable = &UIOption_Menu::`vftable';
004e5f64      this->vtable = &gmUIElement_VitaeIndicator::`vftable';
004e5f80      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e5f80      
004e5f87      if (eax != 0)
004e5f89          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e5f89      
004e5f64      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e5f99      NoticeHandler::~NoticeHandler(&this->vtable);
004e5fa0      UIElement_Button::~UIElement_Button(this);
004e5fa0      
004e5faa      if ((arg2 & 1) != 0)
004e5fad          operator delete(this);
004e5fad      
004e5fb9      return this;
004e5f60  }

004e5fbc                                                                                      90 90 90 90                              ....

004e5fc0  void gmUIElement_VitaeIndicator::Register()

004e5fc0  {
004e5fca      UIElement::RegisterElementClass(0x10000006, gmUIElement_VitaeIndicator::Create);
004e5fc0  }

004e5fd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e5fe0  void __fastcall gmUIElement_VitaeIndicator::Update(class gmUIElement_VitaeIndicator* this)

004e5fe0  {
004e5feb      struct Turbine_GUID* var_64;
004e5feb      int32_t* var_78 = &var_64;
004e5ff2      struct Turbine_GUID* var_7c = &PlayerDesc_ClassType;
004e5ffa      var_64 = nullptr;
004e6005      class TResult __return;
004e6005      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_7c, var_78);
004e600a      struct Turbine_GUID* ecx_1 = var_64;
004e6013      var_7c = ecx_1;
004e6015      int32_t var_78_1 = 0;
004e6018      struct Turbine_GUID* eax_1 = var_7c;
004e601e      int32_t var_58 = 0;
004e6022      int32_t var_54 = 0;
004e6022      
004e6026      if (eax_1 != 0)
004e602c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004e602c      
004e6038      struct Turbine_GUID** esp = &var_7c;
004e603f      void var_5c;
004e603f      int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_58, &var_5c);
004e603f      
004e6041      if (ecx_1 != 0)
004e6047          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004e6047      
004e604a      class TResult __return_1 = __return;
004e604a      
004e6050      if (__return_1 != 0)
004e6050      {
004e6056          if (ebp >= 0)
004e6056          {
004e605f              if (CACQualities::HasEnchantmentRegistry(__return_1) != 0)
004e605f              {
004e6061                  class CEnchantmentRegistry* edi_1 = *(uint32_t*)(__return_1 + 0x70);
004e6068                  Enchantment::Enchantment(&var_58);
004e6068                  
004e607b                  if (CEnchantmentRegistry::InqVitae(edi_1, &var_58) != 0)
004e607b                  {
004e607d                      float var_c;
004e607d                      long double x87_r7_1 = ((long double)var_c);
004e6081                      long double temp0_1 = ((long double)1f);
004e6081                      (x87_r7_1 - temp0_1);
004e6087                      int32_t eax_4;
004e6087                      eax_4 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004e6089                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004e6089                      
004e608c                      if (!(p_1))
004e608c                      {
004e608e                          this->vtable->SetState(1);
004e609f                          int32_t var_10 = 0x79285c;
004e60a3                          int32_t var_50 = 0x79285c;
004e60ab                          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004e60b5                          return;
004e608c                      }
004e607b                  }
004e605f              }
004e605f              
004e60b6              this->vtable->SetState(0xd);
004e6056          }
004e6056          
004e60c6          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004e60c6          struct Turbine_GUID* __saved_edi;
004e60c6          esp = &__saved_edi;
004e6050      }
004e6050      
004e60c9      *(uint32_t*)esp;
004e60c9      esp[1];
004e60c9      esp[2];
004e60c9      esp[3];
004e5fe0  }

004e60d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004e60e0  void __fastcall gmUIElement_VitaeIndicator::RecvNotice_PlayerDescReceived(class gmUIElement_VitaeIndicator* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004e60e0  {
004e60e6      gmUIElement_VitaeIndicator::Update(((char*)this - 0x720));
004e60e0  }

004e60ee                                            90 90                                                                ..

004e60f0  void __fastcall gmUIElement_VitaeIndicator::RecvNotice_VitaeChanged(class gmUIElement_VitaeIndicator* this)

004e60f0  {
004e60f6      /* tailcall */
004e60f6      return gmUIElement_VitaeIndicator::Update(((char*)this - 0x720));
004e60f0  }

004e60fb                                                                                   90 90 90 90 90                             .....

004e6100  void __thiscall gmUIElement_PortalStormIndicator::gmUIElement_PortalStormIndicator(class gmUIElement_PortalStormIndicator* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004e6100  {
004e610f      UIElement_Button::UIElement_Button(this, arg2, arg3);
004e6114      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e6120      this->m_ttLastPortalStormWarningTime = 0f;
004e6126      *(uint32_t*)((char*)this->m_ttLastPortalStormWarningTime)[4] = 0;
004e612c      this->vtable = 0x7c0bb8;
004e6132      this->vtable = &UIOption_Menu::`vftable';
004e613c      this->vtable = &gmUIElement_PortalStormIndicator::`vftable';
004e6100  }

004e614c                                      90 90 90 90                                                              ....

004e6150  class UIElement* __thiscall gmUIElement_PortalStormIndicator::DynamicCast(class gmUIElement_PortalStormIndicator* this, uint32_t arg2) __pure

004e6150  {
004e6166      if ((arg2 == 0x10000005 || (arg2 == 1 || arg2 == 0xc)))
004e6173          return this;
004e6173      
004e616d      int32_t edx_1;
004e616d      edx_1 = arg2 != 0xa;
004e6171      return (this & (edx_1 - 1));
004e6150  }

004e6176                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e6180  uint32_t gmUIElement_PortalStormIndicator::GetUIElementType(class gmUIElement_PortalStormIndicator const* this @ ecx) __pure

004e6180  {
004e6185      return 0x10000005;
004e6180  }

004e6186                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e6190  void __fastcall gmUIElement_PortalStormIndicator::PostInit(class gmUIElement_PortalStormIndicator* this)

004e6190  {
004e6193      UIElement_Button::PostInit(this);
004e6198      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e6198      
004e619f      if (this != 0)
004e619f      {
004e61a7          eax->vtable->RegisterNoticeHandler(0x4dd21b, &this->vtable);
004e61b5          return;
004e619f      }
004e619f      
004e61b6      eax->vtable->RegisterNoticeHandler(0x4dd21b, 0);
004e6190  }

004e61c7                       90 90 90 90 90 90 90 90 90                                                         .........

004e61d0  void __fastcall gmUIElement_PortalStormIndicator::~gmUIElement_PortalStormIndicator(class gmUIElement_PortalStormIndicator* this)

004e61d0  {
004e61dc      this->vtable = 0x7c0bb8;
004e61e2      this->vtable = &UIOption_Menu::`vftable';
004e61d4      this->vtable = &gmUIElement_PortalStormIndicator::`vftable';
004e61f2      UIListener::UnRegisterForGlobalMessage(this, 3);
004e61f7      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e61f7      
004e61fe      if (eax != 0)
004e6200          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e6200      
004e61d4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e6210      NoticeHandler::~NoticeHandler(&this->vtable);
004e6219      /* tailcall */
004e6219      return UIElement_Button::~UIElement_Button(this);
004e61d0  }

004e621e                                                                                            90 90                                ..

004e6220  class UIElement* gmUIElement_PortalStormIndicator::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e6220  {
004e6225      void* eax = operator new(0x730);
004e6225      
004e622f      if (eax == 0)
004e6245          return 0;
004e6245      
004e6242      return gmUIElement_PortalStormIndicator::gmUIElement_PortalStormIndicator(eax, arg1, arg2);
004e6220  }

004e6246                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e6250  void __thiscall gmUIElement_PortalStormIndicator::Update(class gmUIElement_PortalStormIndicator* this, float arg2)

004e6250  {
004e6250      long double x87_r7 = ((long double)arg2);
004e6255      long double temp1 = ((long double)0f);
004e6255      (x87_r7 - temp1);
004e6262      struct gmUIElement_PortalStormIndicator::VTable* vtable = this->vtable;
004e6262      
004e6264      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
004e6264      {
004e6268          vtable->SetState(1);
004e627a          this->m_ttLastPortalStormWarningTime = (*(uint32_t*)Timer::cur_time);
004e6284          *(uint32_t*)((char*)this->m_ttLastPortalStormWarningTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004e628a          UIListener::RegisterForGlobalMessage(this, 3);
004e6290          return;
004e6264      }
004e6264      
004e6295      vtable->SetState(0xd);
004e62a1      this->m_ttLastPortalStormWarningTime = 0f;
004e62a7      *(uint32_t*)((char*)this->m_ttLastPortalStormWarningTime)[4] = 0;
004e62ad      UIListener::UnRegisterForGlobalMessage(this, 3);
004e6250  }

004e62b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e62c0  void* __thiscall gmUIElement_PortalStormIndicator::`scalar deleting destructor'(class gmUIElement_PortalStormIndicator* this, uint32_t arg2)

004e62c0  {
004e62c3      gmUIElement_PortalStormIndicator::~gmUIElement_PortalStormIndicator(this);
004e62c3      
004e62cd      if ((arg2 & 1) != 0)
004e62d0          operator delete(this);
004e62d0      
004e62db      return this;
004e62c0  }

004e62de                                                                                            90 90                                ..

004e62e0  void gmUIElement_PortalStormIndicator::Register()

004e62e0  {
004e62ea      UIElement::RegisterElementClass(0x10000005, gmUIElement_PortalStormIndicator::Create);
004e62e0  }

004e62f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e6300  void __thiscall gmUIElement_PortalStormIndicator::ListenToGlobalMessage(class gmUIElement_PortalStormIndicator* this, uint32_t arg2, int32_t arg3)

004e6300  {
004e630b      if (arg2 == 3)
004e630b      {
004e6313          long double x87_r7_2 = (((long double)Timer::cur_time) - ((long double)this->m_ttLastPortalStormWarningTime));
004e6319          long double temp1_1 = ((long double)120.0);
004e6319          (x87_r7_2 - temp1_1);
004e6319          
004e6324          if ((*(uint8_t*)((char*)((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004e6328              gmUIElement_PortalStormIndicator::Update(this, 0f);
004e630b      }
004e630b      
004e6335      UIElement_Button::ListenToGlobalMessage(this, arg2, arg3);
004e6300  }

004e633f                                                                                               90                                 .

004e6340  void __thiscall gmUIElement_PortalStormIndicator::RecvNotice_PortalStormLevel(class gmUIElement_PortalStormIndicator* this, float arg2)

004e6340  {
004e6346      /* tailcall */
004e6346      return gmUIElement_PortalStormIndicator::Update(((char*)this - 0x720), arg2);
004e6340  }

004e634b                                   90 90 90 90 90                                                             .....

004e6350  class UIElement* __thiscall gmUIElement_MiniGameIndicator::DynamicCast(class gmUIElement_MiniGameIndicator* this, uint32_t arg2) __pure

004e6350  {
004e6366      if ((arg2 == 0x10000004 || (arg2 == 1 || arg2 == 0xc)))
004e6373          return this;
004e6373      
004e636d      int32_t edx_1;
004e636d      edx_1 = arg2 != 0xa;
004e6371      return (this & (edx_1 - 1));
004e6350  }

004e6376                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e6380  uint32_t gmUIElement_MiniGameIndicator::GetUIElementType(class gmUIElement_MiniGameIndicator const* this @ ecx) __pure

004e6380  {
004e6385      return 0x10000004;
004e6380  }

004e6386                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e6390  void __fastcall gmUIElement_MiniGameIndicator::PostInit(class gmUIElement_MiniGameIndicator* this)

004e6390  {
004e6394      UIElement_Button::PostInit(this);
004e6399      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e63a2      struct gmNoticeHandler::VTable** eax_1;
004e63a2      
004e63a2      if (this == 0)
004e63ac          eax_1 = nullptr;
004e63a2      else
004e63a4          eax_1 = &this->vtable;
004e63a4      
004e63ae      eax->vtable->RegisterNoticeHandler(0x4dd219, eax_1);
004e63ae      
004e63bd      if (this != 0)
004e63bd      {
004e63bf          eax->vtable->RegisterNoticeHandler(0x4dd21a, &this->vtable);
004e63d4          return;
004e63bd      }
004e63bd      
004e63d5      eax->vtable->RegisterNoticeHandler(0x4dd21a, 0);
004e6390  }

004e63e7                       90 90 90 90 90 90 90 90 90                                                         .........

004e63f0  class UIElement* gmUIElement_MiniGameIndicator::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e63f0  {
004e63f6      void* result = operator new(0x728);
004e63f6      
004e6402      if (result == 0)
004e6440          return 0;
004e6440      
004e6410      UIElement_Button::UIElement_Button(result, arg1, arg2);
004e6415      *(uint32_t*)((char*)result + 0x720) = 0x7bf328;
004e641f      *(uint32_t*)result = 0x7c0ff0;
004e6425      *(uint32_t*)((char*)result + 0x608) = 0x7c126c;
004e642f      *(uint32_t*)((char*)result + 0x720) = 0x7c0d48;
004e643c      return result;
004e63f0  }

004e6441     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004e6450  void __thiscall gmUIElement_MiniGameIndicator::RecvNotice_BeginGame(class gmUIElement_MiniGameIndicator* this, uint32_t arg2)

004e6450  {
004e645c      arg2 = 1;
004e6464      /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x720) + 0x9c) */
004e6450  }

004e646a                                90 90 90 90 90 90                                                            ......

004e6470  void __fastcall gmUIElement_MiniGameIndicator::RecvNotice_EndGame(class gmUIElement_MiniGameIndicator* this)

004e6470  {
004e647e      *(uint32_t*)(*(int32_t*)((char*)this + -0x720) + 0x9c)(0xd);
004e6470  }

004e6485                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004e6490  void* __thiscall gmUIElement_MiniGameIndicator::`scalar deleting destructor'(class gmUIElement_MiniGameIndicator* this, uint32_t arg2)

004e6490  {
004e649a      this->vtable = 0x7c0ff0;
004e64a0      this->vtable = &UIOption_Menu::`vftable';
004e6494      this->vtable = &gmUIElement_MiniGameIndicator::`vftable';
004e64b0      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e64b0      
004e64b7      if (eax != 0)
004e64b9          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e64b9      
004e6494      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e64c9      NoticeHandler::~NoticeHandler(&this->vtable);
004e64d0      UIElement_Button::~UIElement_Button(this);
004e64d0      
004e64da      if ((arg2 & 1) != 0)
004e64dd          operator delete(this);
004e64dd      
004e64e9      return this;
004e6490  }

004e64ec                                      90 90 90 90                                                              ....

004e64f0  void gmUIElement_MiniGameIndicator::Register()

004e64f0  {
004e64fa      UIElement::RegisterElementClass(0x10000004, gmUIElement_MiniGameIndicator::Create);
004e64f0  }

004e6503           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e6510  void __thiscall gmUIElement_LinkStatusIndicator::gmUIElement_LinkStatusIndicator(class gmUIElement_LinkStatusIndicator* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004e6510  {
004e651f      UIElement_Button::UIElement_Button(this, arg2, arg3);
004e6524      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e6530      __builtin_memset(&this->m_eLinkState, 0, 0x14);
004e654e      this->vtable = &gmUIElement_LinkStatusIndicator::`vftable';
004e6554      this->vtable = &UIOption_Menu::`vftable';
004e655e      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e6510  }

004e656e                                            90 90                                                                ..

004e6570  class UIElement* __thiscall gmUIElement_LinkStatusIndicator::DynamicCast(class gmUIElement_LinkStatusIndicator* this, uint32_t arg2) __pure

004e6570  {
004e6586      if ((arg2 == 0x10000003 || (arg2 == 1 || arg2 == 0xc)))
004e6593          return this;
004e6593      
004e658d      int32_t edx_1;
004e658d      edx_1 = arg2 != 0xa;
004e6591      return (this & (edx_1 - 1));
004e6570  }

004e6596                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e65a0  uint32_t gmUIElement_LinkStatusIndicator::GetUIElementType(class gmUIElement_LinkStatusIndicator const* this @ ecx) __pure

004e65a0  {
004e65a5      return 0x10000003;
004e65a0  }

004e65a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e65b0  class UIElement* gmUIElement_LinkStatusIndicator::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e65b0  {
004e65b5      void* eax = operator new(0x738);
004e65b5      
004e65bf      if (eax == 0)
004e65d5          return 0;
004e65d5      
004e65d2      return gmUIElement_LinkStatusIndicator::gmUIElement_LinkStatusIndicator(eax, arg1, arg2);
004e65b0  }

004e65d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e65e0  void __thiscall gmUIElement_LinkStatusIndicator::SetLinkState(class gmUIElement_LinkStatusIndicator* this, uint32_t arg2)

004e65e0  {
004e65ed      if (this->m_eLinkState != arg2)
004e65ed      {
004e65ef          this->m_eLinkState = arg2;
004e65ef          
004e65f9          if ((arg2 - 1) <= 3)
004e65ed              switch (arg2)
004e65ed              {
004e6608                  case 1:
004e6608                  {
004e6602                      this->vtable->SetState(0x11);
004e6608                      break;
004e6608                  }
004e6618                  case 2:
004e6618                  {
004e6612                      this->vtable->SetState(0x12);
004e6618                      break;
004e6618                  }
004e6628                  case 3:
004e6628                  {
004e6622                      this->vtable->SetState(0x13);
004e663a                      this->m_ttLastFlash = (*(uint32_t*)Timer::cur_time);
004e6640                      *(uint32_t*)((char*)this->m_ttLastFlash)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004e6628                      break;
004e6628                  }
004e6650                  case 4:
004e6650                  {
004e664a                      this->vtable->SetState(0x14);
004e6650                      break;
004e6650                  }
004e65ed              }
004e65ed      }
004e65e0  }

004e665a                                                                                8b ff                                        ..
004e665c  uint32_t jump_table_4e665c[0x4] = 
004e665c  {
004e665c      [0x0] =  0x004e6602
004e6660      [0x1] =  0x004e6612
004e6664      [0x2] =  0x004e6622
004e6668      [0x3] =  0x004e664a
004e666c  }

004e666c                                      90 90 90 90                                                              ....

004e6670  void* __thiscall gmUIElement_LinkStatusIndicator::`scalar deleting destructor'(class gmUIElement_LinkStatusIndicator* this, uint32_t arg2)

004e6670  {
004e667c      this->vtable = &gmUIElement_LinkStatusIndicator::`vftable';
004e6682      this->vtable = &UIOption_Menu::`vftable';
004e6674      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e6692      UIListener::UnRegisterForGlobalMessage(this, 3);
004e6674      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e669f      NoticeHandler::~NoticeHandler(&this->vtable);
004e66a6      UIElement_Button::~UIElement_Button(this);
004e66a6      
004e66b0      if ((arg2 & 1) != 0)
004e66b3          operator delete(this);
004e66b3      
004e66bf      return this;
004e6670  }

004e66c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004e66d0  void __fastcall gmUIElement_LinkStatusIndicator::PostInit(class gmUIElement_LinkStatusIndicator* this)

004e66d0  {
004e66d3      UIElement_Button::PostInit(this);
004e66dc      UIListener::RegisterForGlobalMessage(this, 3);
004e66dc      
004e66ee      if (this->m_eLinkState != 1)
004e66ee      {
004e66f0          this->m_eLinkState = 1;
004e66f6          this->vtable->SetState(0x11);
004e66ee      }
004e66d0  }

004e6704              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004e6710  void gmUIElement_LinkStatusIndicator::Register()

004e6710  {
004e671a      UIElement::RegisterElementClass(0x10000003, gmUIElement_LinkStatusIndicator::Create);
004e6710  }

004e6723           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e6730  void __fastcall gmUIElement_LinkStatusIndicator::UpdateLinkState(class gmUIElement_LinkStatusIndicator* this)

004e6730  {
004e6730      class gmUIElement_LinkStatusIndicator* this_1 = this;
004e6739      this_1 = nullptr;
004e674b      long double st0 = LinkStatusHolder::GetConnectionStatus(&Client::GetInstance()->vtable, &this_1);
004e6750      long double temp0 = ((long double)5.0);
004e6750      (st0 - temp0);
004e6756      class gmUIElement_LinkStatusIndicator* this_2 = this_1;
004e675a      uint32_t ecx_2 = 1;
004e675a      
004e6768      if (((*(uint8_t*)((char*)((((st0 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp0))) ? 1 : 0) << 0xa) | ((((st0 == temp0) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0 || this_2 == 0))
004e6768      {
004e676a          long double temp1_1 = ((long double)20.0);
004e676a          (st0 - temp1_1);
004e676a          
004e6779          if (((*(uint8_t*)((char*)((((st0 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp1_1))) ? 1 : 0) << 0xa) | ((((st0 == temp1_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0 || this_2 == 0))
004e6779          {
004e678d              long double temp2 = ((long double)40.0);
004e678d              (st0 - temp2);
004e678d              
004e679c              if (((*(uint8_t*)((char*)((((st0 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp2))) ? 1 : 0) << 0xa) | ((((st0 == temp2) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0 || this_2 == 0))
004e679c              {
004e67b6                  gmUIElement_LinkStatusIndicator::SetLinkState(this, 4);
004e67bd                  return;
004e679c              }
004e679c              
004e67a6              gmUIElement_LinkStatusIndicator::SetLinkState(this, 3);
004e67ad              return;
004e6779          }
004e6779          
004e677b          ecx_2 = 2;
004e6768      }
004e6768      
004e6785      gmUIElement_LinkStatusIndicator::SetLinkState(this, ecx_2);
004e6730  }

004e67be                                                                                            90 90                                ..

004e67c0  void __fastcall gmUIElement_LinkStatusIndicator::UseTime(class gmUIElement_LinkStatusIndicator* this)

004e67c0  {
004e67cb      int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
004e67d1      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
004e67dd      long double x87_r7_1 = (((long double)Timer::cur_time_1) - ((long double)this->m_ttLastUpdate));
004e67e3      long double temp0 = ((long double)4.0);
004e67e3      (x87_r7_1 - temp0);
004e67e9      int32_t eax;
004e67e9      eax = ((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0))));
004e67e9      
004e67ee      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
004e67ee      {
004e67f2          gmUIElement_LinkStatusIndicator::UpdateLinkState(this);
004e67ff          this->m_ttLastUpdate = Timer::cur_time_1;
004e6805          *(uint32_t*)((char*)this->m_ttLastUpdate)[4] = ecx;
004e67ee      }
004e67ee      
004e6812      if (this->m_eLinkState == 3)
004e6812      {
004e6818          long double x87_r7_3 = (((long double)Timer::cur_time_1) - ((long double)this->m_ttLastFlash));
004e681e          long double temp1_1 = ((long double)0.75);
004e681e          (x87_r7_3 - temp1_1);
004e6824          eax = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004e6824          
004e6829          if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
004e6829          {
004e6834              if (this->m_state != 0x12)
004e6842                  this->vtable->SetState(0x12);
004e6834              else
004e6836                  this->vtable->SetState(0x13);
004e6836              
004e6854              this->m_ttLastFlash = Timer::cur_time_1;
004e685a              *(uint32_t*)((char*)this->m_ttLastFlash)[4] = ecx;
004e6829          }
004e6812      }
004e67c0  }

004e6865                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004e6870  void __thiscall gmUIElement_LinkStatusIndicator::ListenToGlobalMessage(class gmUIElement_LinkStatusIndicator* this, uint32_t arg2, int32_t arg3)

004e6870  {
004e687b      if (arg2 == 3)
004e687d          gmUIElement_LinkStatusIndicator::UseTime(this);
004e687d      
004e688a      UIElement_Button::ListenToGlobalMessage(this, arg2, arg3);
004e6870  }

004e6894                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004e68a0  void __thiscall gmUIElement_EffectsIndicator::gmUIElement_EffectsIndicator(class gmUIElement_EffectsIndicator* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004e68a0  {
004e68af      UIElement_Button::UIElement_Button(this, arg2, arg3);
004e68b4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e68be      this->vtable = 0x7c16e8;
004e68c4      this->vtable = &UIOption_Menu::`vftable';
004e68ce      this->vtable = &gmUIElement_LinkStatusIndicator::`vftable'.RecvNotice_AddCharacterTitle;
004e68d8      this->m_eEffectTypeIndicator = 0;
004e68a0  }

004e68e8                          90 90 90 90 90 90 90 90                                                          ........

004e68f0  class UIElement* __thiscall gmUIElement_EffectsIndicator::DynamicCast(class gmUIElement_EffectsIndicator* this, uint32_t arg2) __pure

004e68f0  {
004e6906      if ((arg2 == 0x10000002 || (arg2 == 1 || arg2 == 0xc)))
004e6913          return this;
004e6913      
004e690d      int32_t edx_1;
004e690d      edx_1 = arg2 != 0xa;
004e6911      return (this & (edx_1 - 1));
004e68f0  }

004e6916                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e6920  uint32_t gmUIElement_EffectsIndicator::GetUIElementType(class gmUIElement_EffectsIndicator const* this @ ecx) __pure

004e6920  {
004e6925      return 0x10000002;
004e6920  }

004e6926                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e6930  void __fastcall gmUIElement_EffectsIndicator::PostInit(class gmUIElement_EffectsIndicator* this)

004e6930  {
004e6934      UIElement_Button::PostInit(this);
004e6947      UIElement::GetAttribute_Enum(this, 0x1000000c, &this->m_eEffectTypeIndicator);
004e694c      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
004e6955      struct gmNoticeHandler::VTable** eax_2;
004e6955      
004e6955      if (this == 0)
004e695f          eax_2 = nullptr;
004e6955      else
004e6957          eax_2 = &this->vtable;
004e6957      
004e6961      eax_1->vtable->RegisterNoticeHandler(0x4dd1f0, eax_2);
004e6961      
004e6970      if (this != 0)
004e6970      {
004e6972          eax_1->vtable->RegisterNoticeHandler(0x4dd201, &this->vtable);
004e6987          return;
004e6970      }
004e6970      
004e6988      eax_1->vtable->RegisterNoticeHandler(0x4dd201, 0);
004e6930  }

004e699a                                                                                90 90 90 90 90 90                            ......

004e69a0  class UIElement* gmUIElement_EffectsIndicator::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e69a0  {
004e69a5      void* eax = operator new(0x728);
004e69a5      
004e69af      if (eax == 0)
004e69c5          return 0;
004e69c5      
004e69c2      return gmUIElement_EffectsIndicator::gmUIElement_EffectsIndicator(eax, arg1, arg2);
004e69a0  }

004e69c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e69d0  void* __thiscall gmUIElement_EffectsIndicator::`scalar deleting destructor'(class gmUIElement_EffectsIndicator* this, uint32_t arg2)

004e69d0  {
004e69da      this->vtable = 0x7c16e8;
004e69e0      this->vtable = &UIOption_Menu::`vftable';
004e69d4      this->vtable = &gmUIElement_LinkStatusIndicator::`vftable'.RecvNotice_AddCharacterTitle;
004e69f0      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e69f0      
004e69f7      if (eax != 0)
004e69f9          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e69f9      
004e69d4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e6a09      NoticeHandler::~NoticeHandler(&this->vtable);
004e6a10      UIElement_Button::~UIElement_Button(this);
004e6a10      
004e6a1a      if ((arg2 & 1) != 0)
004e6a1d          operator delete(this);
004e6a1d      
004e6a29      return this;
004e69d0  }

004e6a2c                                      90 90 90 90                                                              ....

004e6a30  void gmUIElement_EffectsIndicator::Register()

004e6a30  {
004e6a3a      UIElement::RegisterElementClass(0x10000002, gmUIElement_EffectsIndicator::Create);
004e6a30  }

004e6a43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e6a50  void __fastcall gmUIElement_EffectsIndicator::Update(class gmUIElement_EffectsIndicator* this)

004e6a50  {
004e6a53      int32_t ebx;
004e6a53      int32_t var_18 = ebx;
004e6a54      int32_t ebp;
004e6a54      int32_t var_1c = ebp;
004e6a55      int32_t esi;
004e6a55      int32_t var_20 = esi;
004e6a56      struct Turbine_GUID* edi;
004e6a56      struct Turbine_GUID* var_24 = edi;
004e6a5b      struct Turbine_GUID* var_14;
004e6a5b      int32_t* var_28 = &var_14;
004e6a62      struct Turbine_GUID* var_2c = &gmUIElement_LinkStatusIndicator::`vftable'.RecvNotice_NextSpellSelection;
004e6a6a      var_14 = nullptr;
004e6a75      class TResult __return;
004e6a75      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004e6a7a      struct Turbine_GUID* ecx_1 = var_14;
004e6a83      var_2c = ecx_1;
004e6a85      int32_t var_28_1 = 0;
004e6a88      struct Turbine_GUID* eax_1 = var_2c;
004e6a8e      int32_t var_8 = 0;
004e6a92      int32_t var_4 = 0;
004e6a92      
004e6a96      if (eax_1 != 0)
004e6a9c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004e6a9c      
004e6aa8      struct Turbine_GUID** esp = &var_2c;
004e6aaf      void var_c;
004e6aaf      int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004e6aaf      
004e6ab1      if (ecx_1 != 0)
004e6ab7          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004e6ab7      
004e6aba      class TResult __return_1 = __return;
004e6aba      
004e6ac0      if (__return_1 != 0)
004e6ac0      {
004e6ac6          if (ebp_1 >= 0)
004e6ac6          {
004e6acf              int32_t var_30_2;
004e6acf              
004e6acf              if (CACQualities::HasEnchantmentRegistry(__return_1) == 0)
004e6b03                  var_30_2 = 0xd;
004e6acf              else
004e6acf              {
004e6ad1                  uint32_t m_eEffectTypeIndicator = this->m_eEffectTypeIndicator;
004e6ad7                  void* edx_3 = *(uint32_t*)(__return_1 + 0x70);
004e6ada                  int32_t ecx_6 = 0;
004e6ada                  
004e6ae3                  if ((m_eEffectTypeIndicator == 1 || m_eEffectTypeIndicator == 0))
004e6ae5                      ecx_6 = *(uint32_t*)((char*)edx_3 + 0x14);
004e6ae5                  
004e6aef                  if ((m_eEffectTypeIndicator == 2 || m_eEffectTypeIndicator == 0))
004e6af1                      ecx_6 += *(uint32_t*)((char*)edx_3 + 0x18);
004e6af1                  
004e6b00                  var_30_2 = (((ecx_6 - ecx_6) & 0xfffffff4) + 0xd);
004e6acf              }
004e6acf              
004e6b05              this->vtable->SetState(var_30_2);
004e6ac6          }
004e6ac6          
004e6b13          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004e6b13          esp = &var_24;
004e6ac0      }
004e6ac0      
004e6b16      *(uint32_t*)esp;
004e6b16      esp[1];
004e6b16      esp[2];
004e6b16      esp[3];
004e6a50  }

004e6b1e                                                                                            90 90                                ..

004e6b20  void __fastcall gmUIElement_EffectsIndicator::RecvNotice_PlayerDescReceived(class gmUIElement_EffectsIndicator* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004e6b20  {
004e6b26      gmUIElement_EffectsIndicator::Update(((char*)this - 0x720));
004e6b20  }

004e6b2e                                            90 90                                                                ..

004e6b30  void __fastcall gmUIElement_EffectsIndicator::RecvNotice_EnchantmentsChanged(class gmUIElement_EffectsIndicator* this)

004e6b30  {
004e6b36      /* tailcall */
004e6b36      return gmUIElement_EffectsIndicator::Update(((char*)this - 0x720));
004e6b30  }

004e6b3b                                                                                   90 90 90 90 90                             .....

004e6b40  class UIElement* __thiscall gmUIElement_BurdenIndicator::DynamicCast(class gmUIElement_BurdenIndicator* this, uint32_t arg2) __pure

004e6b40  {
004e6b56      if ((arg2 == 0x10000001 || (arg2 == 1 || arg2 == 0xc)))
004e6b63          return this;
004e6b63      
004e6b5d      int32_t edx_1;
004e6b5d      edx_1 = arg2 != 0xa;
004e6b61      return (this & (edx_1 - 1));
004e6b40  }

004e6b66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004e6b70  uint32_t gmEffectsUI::GetUIElementType(class gmEffectsUI const* this @ ecx) __pure

004e6b70  {
004e6b75      return 0x1000001b;
004e6b70  }

004e6b76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004e6b80  void __fastcall gmUIElement_BurdenIndicator::PostInit(class gmUIElement_BurdenIndicator* this)

004e6b80  {
004e6b84      UIElement_Button::PostInit(this);
004e6b89      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e6b92      struct gmNoticeHandler::VTable** eax_1;
004e6b92      
004e6b92      if (this == 0)
004e6b9c          eax_1 = nullptr;
004e6b92      else
004e6b94          eax_1 = &this->vtable;
004e6b94      
004e6b9e      eax->vtable->RegisterNoticeHandler(0x4dd1f0, eax_1);
004e6b9e      
004e6bad      if (this != 0)
004e6bad      {
004e6baf          eax->vtable->RegisterNoticeHandler(0x4dd220, &this->vtable);
004e6bc4          return;
004e6bad      }
004e6bad      
004e6bc5      eax->vtable->RegisterNoticeHandler(0x4dd220, 0);
004e6b80  }

004e6bd7                                                                       90 90 90 90 90 90 90 90 90                         .........

004e6be0  class UIElement* gmUIElement_BurdenIndicator::Create(class LayoutDesc const* arg1, class ElementDesc const* arg2)

004e6be0  {
004e6be6      void* result = operator new(0x728);
004e6be6      
004e6bf2      if (result == 0)
004e6c30          return 0;
004e6c30      
004e6c00      UIElement_Button::UIElement_Button(result, arg1, arg2);
004e6c05      *(uint32_t*)((char*)result + 0x720) = 0x7bf328;
004e6c0f      *(uint32_t*)result = &gmUIElement_BurdenIndicator::`vftable';
004e6c15      *(uint32_t*)((char*)result + 0x608) = 0x7c126c;
004e6c1f      *(uint32_t*)((char*)result + 0x720) = 0x7c18a0;
004e6c2c      return result;
004e6be0  }

004e6c31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004e6c40  void __thiscall gmUIElement_BurdenIndicator::ListenToGlobalMessage(class gmUIElement_BurdenIndicator* this, uint32_t arg2, int32_t arg3)

004e6c40  {
004e6c40      /* tailcall */
004e6c40      return UIElement_Button::ListenToGlobalMessage(this, arg2, arg3);
004e6c40  }

004e6c45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004e6c50  enum UIElementMessageListenResult __thiscall gmUIElement_BurdenIndicator::ListenToElementMessage(class gmUIElement_BurdenIndicator* this, struct UIElementMessageInfo const* arg2)

004e6c50  {
004e6c50      /* tailcall */
004e6c50      return UIElement_Button::ListenToElementMessage(this, arg2);
004e6c50  }

004e6c55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004e6c60  void* __thiscall gmUIElement_BurdenIndicator::`scalar deleting destructor'(class gmUIElement_BurdenIndicator* this, uint32_t arg2)

004e6c60  {
004e6c6a      this->vtable = &gmUIElement_BurdenIndicator::`vftable';
004e6c70      this->vtable = &UIOption_Menu::`vftable';
004e6c64      this->vtable = &gmUIElement_BurdenIndicator::`vftable';
004e6c80      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e6c80      
004e6c87      if (eax != 0)
004e6c89          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004e6c89      
004e6c64      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e6c99      NoticeHandler::~NoticeHandler(&this->vtable);
004e6ca0      UIElement_Button::~UIElement_Button(this);
004e6ca0      
004e6caa      if ((arg2 & 1) != 0)
004e6cad          operator delete(this);
004e6cad      
004e6cb9      return this;
004e6c60  }

004e6cbc                                                                                      90 90 90 90                              ....

004e6cc0  void gmUIElement_BurdenIndicator::Register()

004e6cc0  {
004e6cca      UIElement::RegisterElementClass(0x10000001, gmUIElement_BurdenIndicator::Create);
004e6cc0  }

004e6cd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e6ce0  void __fastcall gmUIElement_BurdenIndicator::Update(class gmUIElement_BurdenIndicator* this)

004e6ce0  {
004e6ce3      float ebx;
004e6ce3      float var_1c = ebx;
004e6ceb      struct Turbine_GUID* var_18;
004e6ceb      int32_t* var_2c = &var_18;
004e6cf2      struct Turbine_GUID* var_30 = &PlayerDesc_ClassType;
004e6cfa      var_18 = nullptr;
004e6d05      class TResult __return;
004e6d05      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_30, var_2c);
004e6d0a      struct Turbine_GUID* ecx_1 = var_18;
004e6d13      var_30 = ecx_1;
004e6d15      int32_t var_2c_1 = 0;
004e6d18      struct Turbine_GUID* eax_1 = var_30;
004e6d1e      int32_t var_8 = 0;
004e6d22      int32_t var_4 = 0;
004e6d22      
004e6d26      if (eax_1 != 0)
004e6d2c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004e6d2c      
004e6d38      struct Turbine_GUID** esp = &var_30;
004e6d3f      void var_c;
004e6d3f      int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004e6d3f      
004e6d41      if (ecx_1 != 0)
004e6d47          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004e6d47      
004e6d4a      class TResult __return_1 = __return;
004e6d4a      
004e6d50      if (__return_1 != 0)
004e6d50      {
004e6d58          if (ebp < 0)
004e6d58          {
004e6d5e              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004e6d68              return;
004e6d58          }
004e6d58          
004e6d79          int32_t var_34_3;
004e6d79          
004e6d79          if (CACQualities::InqLoad(__return_1, &var_1c) == 0)
004e6dd3              var_34_3 = 0xe;
004e6d79          else
004e6d79          {
004e6d7b              long double x87_r7_1 = ((long double)var_1c);
004e6d7f              long double temp0_1 = ((long double)1f);
004e6d7f              (x87_r7_1 - temp0_1);
004e6d85              int32_t eax_4;
004e6d85              eax_4 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004e6d87              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004e6d87              
004e6d8a              if (!(p_1))
004e6d8a              {
004e6d8c                  this->vtable->SetState(0xe);
004e6d9a                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004e6da4                  return;
004e6d8a              }
004e6d8a              
004e6da5              long double x87_r7_2 = ((long double)var_1c);
004e6da9              long double temp1_1 = ((long double)2.0);
004e6da9              (x87_r7_2 - temp1_1);
004e6daf              eax_4 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004e6db1              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
004e6db1              
004e6db4              if (p_2)
004e6db4              {
004e6dba                  this->vtable->SetState(0x10);
004e6dc8                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004e6dd2                  return;
004e6db4              }
004e6db4              
004e6db6              var_34_3 = 0xf;
004e6d79          }
004e6d79          
004e6dd5          this->vtable->SetState(var_34_3);
004e6dd7          struct Turbine_GUID* __saved_edi;
004e6dd7          esp = &__saved_edi;
004e6de1          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004e6d50      }
004e6d50      
004e6de4      *(uint32_t*)esp;
004e6de4      esp[1];
004e6de4      esp[2];
004e6de4      esp[3];
004e6ce0  }

004e6dec                                      90 90 90 90                                                              ....

004e6df0  void __fastcall gmUIElement_BurdenIndicator::RecvNotice_LoadChanged(class gmUIElement_BurdenIndicator* this, float arg2)

004e6df0  {
004e6df6      gmUIElement_BurdenIndicator::Update(((char*)this - 0x720));
004e6df0  }

004e6dfe                                                                                            90 90                                ..

004e6e00  void __fastcall gmUIElement_BurdenIndicator::RecvNotice_PlayerDescReceived(class gmUIElement_BurdenIndicator* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004e6e00  {
004e6e06      gmUIElement_BurdenIndicator::Update(((char*)this - 0x720));
004e6e00  }

004e6e0e                                            90 90                                                                ..

004e6e10  void* __thiscall gmUIMainFramework::`scalar deleting destructor'(class gmUIMainFramework* this, uint32_t arg2)

004e6e10  {
004e6e13      this->vtable = 0x7c1ca0;
004e6e19      UIMainFramework::~UIMainFramework(this);
004e6e19      
004e6e23      if ((arg2 & 1) != 0)
004e6e26          operator delete(this);
004e6e26      
004e6e31      return this;
004e6e10  }

004e6e34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004e6e40  void __thiscall gmCreditsUI::ListenToGlobalMessage(class gmCreditsUI* this, uint32_t arg2, int32_t arg3)

004e6e40  {
004e6e45      if (arg2 == 3)
004e6e47          this->vtable->Update();
004e6e40  }

004e6e4f                                               90                                                                 .

004e6e50  uint8_t __fastcall UIFramework::Shown(class UIFramework const* this)

004e6e50  {
004e6e5f      if ((this->m_bCanForceHide != 0 && this->m_bIsForcedHidden != 0))
004e6e61          return 0;
004e6e61      
004e6e63      return this->m_shown;
004e6e50  }

004e6e64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004e6e70  class IDClass<_tagDataID,32,0>* __thiscall gmCreditsUI::GetNextPictureID(class gmCreditsUI* this, class IDClass<_tagDataID,32,0>* __return)

004e6e70  {
004e6e7e      if (this->m_numPictures == 0)
004e6e7e      {
004e6e8a          __return->id = INVALID_DID.id;
004e6e90          return __return;
004e6e7e      }
004e6e7e      
004e6e93      class BasePropertyValue* m_pcPropertyValue = this->m_pictureProp.m_pcPropertyValue;
004e6e99      int32_t* eax_2 = nullptr;
004e6e9b      int32_t* edx = nullptr;
004e6ea0      int32_t m_lastPicture = this->m_lastPicture;
004e6ea6      int32_t* var_8 = nullptr;
004e6eaa      int32_t* var_4 = nullptr;
004e6eaa      
004e6eae      if (m_pcPropertyValue == 0)
004e6eae          goto label_4e6f64;
004e6eae      
004e6ec4      class IDClass<_tagDataID,32,0>* __return_1;
004e6ec4      
004e6ec4      if (m_pcPropertyValue->vtable->InqArrayElement(m_lastPicture, &var_8) == 0)
004e6ec4      {
004e6f5a          edx = var_4;
004e6f5e          eax_2 = var_8;
004e6f64      label_4e6f64:
004e6f64          __return_1 = __return;
004e6f6e          __return_1->id = INVALID_DID.id;
004e6f6e          
004e6f70          if (eax_2 != 0)
004e6f70          {
004e6f7a              int32_t edi_5 = (eax_2[1] - 1);
004e6f77              eax_2[1] = edi_5;
004e6f77              
004e6f81              if (edi_5 == 0)
004e6f87                  **(uint32_t**)eax_2(1);
004e6f87              
004e6f89              edx = var_4;
004e6f8d              var_8 = nullptr;
004e6f70          }
004e6f70          
004e6f97          if (edx != 0)
004e6f97          {
004e6f9f              int32_t edi_7 = (edx[1] - 1);
004e6f9c              edx[1] = edi_7;
004e6f9c              
004e6fa8              if (edi_7 == 0)
004e6fae                  **(uint32_t**)edx(1);
004e6f97          }
004e6ec4      }
004e6ec4      else
004e6ec4      {
004e6ed0          uint32_t id = INVALID_DID.id;
004e6ed4          int32_t* ecx_2 = var_4;
004e6ed4          
004e6eda          if (ecx_2 != 0)
004e6eda          {
004e6ee3              *(uint32_t*)(*(uint32_t*)ecx_2 + 0xb0)(&id);
004e6ee9              ecx_2 = var_4;
004e6eda          }
004e6eda          
004e6efc          int32_t* eax_6 = var_8;
004e6f02          this->m_lastPicture = (COMBINE(0, (this->m_lastPicture + 1)) % this->m_numPictures);
004e6f08          __return_1 = __return;
004e6f10          __return_1->id = id;
004e6f10          
004e6f12          if (eax_6 != 0)
004e6f12          {
004e6f1c              int32_t edi_1 = (eax_6[1] - 1);
004e6f19              eax_6[1] = edi_1;
004e6f19              
004e6f23              if (edi_1 == 0)
004e6f29                  **(uint32_t**)eax_6(1);
004e6f29              
004e6f2b              ecx_2 = var_4;
004e6f2f              var_8 = nullptr;
004e6f12          }
004e6f12          
004e6f39          if (ecx_2 != 0)
004e6f39          {
004e6f41              int32_t edi_3 = (ecx_2[1] - 1);
004e6f3e              ecx_2[1] = edi_3;
004e6f3e              
004e6f48              if (edi_3 == 0)
004e6f4e                  **(uint32_t**)ecx_2(1);
004e6f39          }
004e6ec4      }
004e6ec4      
004e6fb7      return __return_1;
004e6e70  }

004e6fba                                                                                90 90 90 90 90 90                            ......

004e6fc0  void __fastcall gmCreditsUI::~gmCreditsUI(class gmCreditsUI* this)

004e6fc0  {
004e6fcb      this->vtable = 0x7c1ce8;
004e6fd1      UIMainFramework::RemoveRootElement(this, &this->m_pictureField);
004e6fdf      UIMainFramework::RemoveRootElement(this, &this->m_textField);
004e6fec      SmartArray<unsigned long,1>::Reset(&this->m_aPictureElements);
004e6ff8      DialogFactory::CloseDialog(this->m_waitContext);
004e6ffd      this->m_waitContext = 0;
004e6ffd      
004e7017      if ((this->m_aPictureElements.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004e701c          operator delete[](this->m_aPictureElements.m_data);
004e701c      
004e7024      class BasePropertyDesc* m_pcPropertyDesc = this->m_pictureProp.m_pcPropertyDesc;
004e7024      
004e702c      if (m_pcPropertyDesc != 0)
004e702c      {
004e702e          uint32_t m_cRef = m_pcPropertyDesc->m_cRef;
004e702e          m_pcPropertyDesc->m_cRef -= 1;
004e702e          
004e7031          if (m_cRef == 1)
004e7033              m_pcPropertyDesc->vtable->__vecDelDtor(1);
004e7033          
004e7039          this->m_pictureProp.m_pcPropertyDesc = 0;
004e702c      }
004e702c      
004e7043      class BasePropertyValue* m_pcPropertyValue = this->m_pictureProp.m_pcPropertyValue;
004e7043      
004e704b      if (m_pcPropertyValue != 0)
004e704b      {
004e704d          uint32_t m_cRef_1 = m_pcPropertyValue->m_cRef;
004e704d          m_pcPropertyValue->m_cRef -= 1;
004e704d          
004e7050          if (m_cRef_1 == 1)
004e7052              m_pcPropertyValue->vtable->__vecDelDtor(1);
004e7052          
004e7058          this->m_pictureProp.m_pcPropertyValue = nullptr;
004e704b      }
004e704b      
004e7063      this->vtable = 0x7c1ca0;
004e706c      /* tailcall */
004e706c      return UIMainFramework::~UIMainFramework(this);
004e6fc0  }

004e7071                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004e7080  void* __thiscall gmCreditsUI::`scalar deleting destructor'(class gmCreditsUI* this, uint32_t arg2)

004e7080  {
004e7083      gmCreditsUI::~gmCreditsUI(this);
004e7083      
004e708d      if ((arg2 & 1) != 0)
004e7090          operator delete(this);
004e7090      
004e709b      return this;
004e7080  }

004e709e                                                                                            90 90                                ..

004e70a0  void __fastcall gmCreditsUI::Initialize(class gmCreditsUI* this)

004e70a0  {
004e70bf      if ((this->m_textField != 0 && this->m_textArea != 0))
004e70bf      {
004e70c7          UIListener::RegisterForGlobalMessage(this, 3);
004e70d6          class UIElement* m_textField = this->m_textField;
004e70e1          uint32_t id = INVALID_DID.id;
004e70e5          UIElement::GetAttribute_DataID(m_textField, 0x10000003, &id);
004e70e5          
004e70f4          if (id != INVALID_DID.id)
004e70f4          {
004e7103              int32_t ebx_1 = 1;
004e7110              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2;
004e7110              void var_90;
004e7110              
004e7110              while (true)
004e7110              {
004e7110                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004e7115                  PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
004e711d                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004e711f                  int32_t var_b4_2 = ebx_1;
004e712a                  PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "ID_Credits%d");
004e7136                  StringInfo::StringInfo(&var_90);
004e713b                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004e7141                  uint32_t eax_4;
004e7141                  
004e7141                  if (PStringBase<char>::s_NullBuffer_3 == 0)
004e714e                      eax_4 = 0;
004e7141                  else
004e7144                      eax_4 = compute_str_hash(PStringBase<char>::s_NullBuffer_3);
004e7144                  
004e715a                  StringInfo::SetStringIDandTableID(&var_90, eax_4, id);
004e715a                  
004e716c                  if (StringInfo::IsValid(&var_90, 1) == 0)
004e716c                      break;
004e716c                  
004e7179                  UIElement_Text::AppendStringInfo(this->m_textArea, &var_90);
004e7182                  StringInfo::~StringInfo(&var_90);
004e718b                  void* __offset(PSRefBufferCharData<char>, -0x14) edi_2 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
004e718b                  
004e719e                  if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
004e71a6                      *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
004e71a6                  
004e71a8                  ebx_1 += 1;
004e7110              }
004e7110              
004e71b2              StringInfo::~StringInfo(&var_90);
004e71bb              void* __offset(PSRefBufferCharData<char>, -0x14) edi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
004e71bb              
004e71ce              if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
004e71d6                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
004e71d6              
004e71e4              struct UIElement_Text::VTable* vtable = this->m_textArea->vtable;
004e71e6              int32_t eax_11 = UIRegion::GetHeight(this->m_textField);
004e71eb              this->m_textArea;
004e71f4              vtable->MoveTo(0, eax_11);
004e71fd              struct UIElement_Text::VTable* vtable_1 = this->m_textArea->vtable;
004e7207              int32_t eax_12 = UIRegion::GetWidth(this->m_textField);
004e720c              this->m_textArea;
004e7213              vtable_1->ResizeTo(eax_12, 0);
004e721c              UIElement_Text::RecalculateGlyphList(this->m_textArea);
004e7221              class UIElement_Text* m_textArea = this->m_textArea;
004e7227              int32_t m_iScrollableHeight = m_textArea->m_iScrollableHeight;
004e722d              struct UIElement_Text::VTable* vtable_2 = m_textArea->vtable;
004e7236              int32_t eax_13 = UIRegion::GetWidth(this->m_textField);
004e723b              this->m_textArea;
004e7242              vtable_2->ResizeTo(eax_13, m_iScrollableHeight);
004e725c              float var_98;
004e725c              
004e725c              if (UIElement::GetAttribute_Float(this->m_textField, 0x10000004, &var_98) == 0)
004e725e                  var_98 = 1f;
004e725e              
004e726c              int32_t PStringBase<char>::s_NullBuffer_4 = UIRegion::GetHeight(this->m_textField);
004e7271              class UIElement_Text* m_textArea_1 = this->m_textArea;
004e7277              PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_4;
004e727f              PStringBase<char>::s_NullBuffer_2 = ((float)((long double)PStringBase<char>::s_NullBuffer_2));
004e728e              long double x87_r6_2 = ((long double)UIRegion::GetHeight(m_textArea_1));
004e729c              long double x87_r4_1 = ((long double)ebx_1);
004e729c              
004e72a0              if (ebx_1 < 0)
004e72a2                  x87_r4_1 = (x87_r4_1 + ((long double)4.2949673e+09f));
004e72a2              
004e72b4              this->m_duration = ((float)((((long double)PStringBase<char>::s_NullBuffer_2) + x87_r6_2) / (((x87_r6_2 / x87_r4_1) + ((long double)PStringBase<char>::s_NullBuffer_2)) / ((long double)var_98))));
004e72bc              Timer::compute_time();
004e72c7              class UIElement* m_pictureField = this->m_pictureField;
004e72d4              this->m_endTime = ((double)(x87_r6_2 + ((long double)this->m_duration)));
004e72da              m_pictureField->vtable->InqProperty(0x10000005, &this->m_pictureProp);
004e72e7              class BasePropertyValue* m_pcPropertyValue = this->m_pictureProp.m_pcPropertyValue;
004e72e7              
004e72ef              if (m_pcPropertyValue != 0)
004e72f1                  m_pcPropertyValue->vtable->InqArrayNumElements(&this->m_numPictures);
004e70f4          }
004e70bf      }
004e70a0  }

004e710a                                8d 9b 00 00 00 00                                                            ......
004e7308                          90 90 90 90 90 90 90 90                                                          ........

004e7310  void __fastcall gmCreditsUI::gmCreditsUI(class gmCreditsUI* this)

004e7310  {
004e7318      UIMainFramework::UIMainFramework(this);
004e732a      this->vtable = 0x7c1ce8;
004e7330      __builtin_memset(&this->m_waitContext, 0, 0x24);
004e7354      *(uint32_t*)((char*)this->m_endTime)[4] = 0xbff00000;
004e736c      __builtin_memset(&this->m_aPictureElements, 0, 0x18);
004e7390      class ICIDM* ICIDM::s_cidm_2 = ICIDM::s_cidm;
004e739f      char var_d_1;
004e739f      
004e739f      if (ICIDM::s_cidm_2->vtable->CtrlKeyDown() == 0)
004e73bc          var_d_1 = 0;
004e739f      else if (ICIDM::s_cidm_2->vtable->AltKeyDown() == 0)
004e73bc          var_d_1 = 0;
004e73aa      else
004e73aa      {
004e73b5          var_d_1 = 1;
004e73b5          
004e73ba          if (ICIDM::s_cidm_2->vtable->ShiftKeyDown() != 0)
004e73bc              var_d_1 = 0;
004e73aa      }
004e73aa      
004e73c8      int32_t eax_4;
004e73c8      eax_4 = var_d_1 != 0;
004e73df      this->m_pictureField = UIMainFramework::CreateAndAddRootElement(this, 0x10000004, (eax_4 + 0x10000413));
004e73e9      int32_t ecx_5;
004e73e9      ecx_5 = var_d_1 != 0;
004e73fb      class UIElement* eax_7 = UIMainFramework::CreateAndAddRootElement(this, 0x10000004, ((ecx_5 * 2) + 0x10000410));
004e7402      this->m_textField = eax_7;
004e7402      
004e7408      if (eax_7 != 0)
004e7408      {
004e7413          uint32_t var_c = 0;
004e7417          int32_t* var_8 = nullptr;
004e741b          int32_t* var_4_1 = nullptr;
004e741f          eax_7->vtable->InqProperty(0x10000002, &var_8);
004e741f          
004e7434          if (var_4_1 != 0)
004e743d              *(uint32_t*)(*(uint32_t*)var_4_1 + 0xa8)(&var_c);
004e743d          
004e744e          class UIElement* eax_8 = UIElement::GetChildRecursive(this->m_textField, var_c);
004e744e          
004e7455          if (eax_8 != 0)
004e7463              this->m_textArea = eax_8->vtable->DynamicCast(0xc);
004e7463          
004e7469          int32_t* eax_10 = var_8;
004e7469          
004e746f          if (eax_10 != 0)
004e746f          {
004e7479              int32_t edi_1 = (eax_10[1] - 1);
004e7476              eax_10[1] = edi_1;
004e7476              
004e7480              if (edi_1 == 0)
004e7486                  **(uint32_t**)eax_10(1);
004e7486              
004e7488              var_8 = nullptr;
004e746f          }
004e746f          
004e7492          if (var_4_1 != 0)
004e7492          {
004e749c              int32_t edi_3 = (var_4_1[1] - 1);
004e7499              var_4_1[1] = edi_3;
004e7499              
004e74a3              if (edi_3 == 0)
004e74a9                  **(uint32_t**)var_4_1(1);
004e7492          }
004e7408      }
004e7408      
004e74ad      gmCreditsUI::Initialize(this);
004e74b2      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004e74b2      
004e74ba      if (ICIDM::s_cidm_1 != 0)
004e74bc          ICIDM::s_cidm_1->vtable->RegisterInputMap(9, this, 0xbb8);
004e7310  }

004e74d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004e74e0  class UIMainFramework* gmCreditsUI::Create()

004e74e0  {
004e74e5      void* eax = operator new(0xe0);
004e74e5      
004e74ef      if (eax == 0)
004e74fa          return 0;
004e74fa      
004e74f3      /* tailcall */
004e74f3      return gmCreditsUI::gmCreditsUI(eax);
004e74e0  }

004e74fb                                                                                   90 90 90 90 90                             .....

004e7500  void gmCreditsUI::Register(uint32_t arg1)

004e7500  {
004e750a      UIFlow::RegisterFrameworkClass(arg1, gmCreditsUI::Create);
004e7500  }

004e7513                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e7520  void __fastcall gmCreditsUI::CreateAndAddPicture(class gmCreditsUI* this)

004e7520  {
004e752f      class UIElement* __return;
004e752f      gmCreditsUI::GetNextPictureID(this, &__return);
004e7534      class IDClass<_tagDataID,32,0> __return_2 = __return;
004e7534      
004e753e      if (__return_2 != INVALID_DID.id)
004e753e      {
004e7549          void var_1c4;
004e7549          ElementDesc::ElementDesc(&var_1c4);
004e754e          class UIElement* m_pictureField = this->m_pictureField;
004e7558          int32_t var_118_1 = 3;
004e7563          int32_t var_11c_1 = 0x10000415;
004e757d          class UIElement* __return_1 = UIElementManager::CreateChildElement(UIElementManager::s_pInstance, m_pictureField, m_pictureField->m_layout, &var_1c4);
004e7586          __return = __return_1;
004e7586          
004e758a          if (__return_1 != 0)
004e758a          {
004e7592              int32_t eax_1 = UIRegion::GetHeight(this->m_pictureField);
004e7597              uint32_t m_num = this->m_aPictureElements.m_num;
004e759d              int32_t eax_2 = (eax_1 + 1);
004e759d              
004e75a0              if (m_num != 0)
004e75b1                  eax_2 = (UIRegion::GetScreenY1(this->m_aPictureElements.m_data[(m_num - 1)]) + 1);
004e75b1              
004e75b2              __return_1->vtable->MoveTo(0, eax_2);
004e75c1              UIElement::SetMediaImage(__return_1, __return_2, 1);
004e75d2              int32_t var_1cc;
004e75d2              int32_t var_1c8;
004e75d2              UIElement::InqImageSize(__return_1, &var_1c8, &var_1cc);
004e75df              __return_1->vtable->ResizeTo(var_1c8, var_1cc);
004e75f3              SmartArray<unsigned long,1>::AddToEnd(&this->m_aPictureElements.m_data, &__return);
004e758a          }
004e758a          
004e75fc          ElementDesc::~ElementDesc(&var_1c4);
004e753e      }
004e7520  }

004e760b                                   90 90 90 90 90                                                             .....

004e7610  void __thiscall gmCreditsUI::ScrollPictures(class gmCreditsUI* this, int32_t arg2)

004e7610  {
004e761b      if (this->m_pictureField != 0)
004e761b      {
004e7621          uint32_t m_num = this->m_aPictureElements.m_num;
004e7621          
004e762a          if (m_num != 0)
004e762a          {
004e7637              int32_t i = 0;
004e7637              
004e763b              if (m_num > 0)
004e763b              {
004e7667                  do
004e7667                  {
004e7648                      int32_t* edi_1 = this->m_aPictureElements.m_data[i];
004e765b                      *(uint32_t*)(*(uint32_t*)edi_1 + 0x2c)(0, (UIRegion::GetScreenY0(edi_1) - arg2));
004e7664                      i += 1;
004e7667                  } while (i < this->m_aPictureElements.m_num);
004e763b              }
004e763b              
004e7670              class UIElement* edi_2 = *(uint32_t*)this->m_aPictureElements.m_data;
004e7670              
004e767c              if (UIRegion::GetScreenY1(edi_2) < 0)
004e767c              {
004e767e                  uint32_t m_num_1 = this->m_aPictureElements.m_num;
004e767e                  
004e7686                  if (m_num_1 > 0)
004e7686                  {
004e768b                      this->m_aPictureElements.m_num = (m_num_1 - 1);
004e768b                      
004e7691                      if (m_num_1 != 1)
004e7691                      {
004e7693                          class UIElement** m_data = this->m_aPictureElements.m_data;
004e769c                          *(uint32_t*)m_data = m_data[(m_num_1 - 1)];
004e76a4                          this->m_aPictureElements.m_data[this->m_aPictureElements.m_num] = 0;
004e7691                      }
004e7686                  }
004e7686                  
004e76b3                  UIElement::AddToDeleteQueue(edi_2);
004e767c              }
004e762a          }
004e762a          else
004e762c              gmCreditsUI::CreateAndAddPicture(this);
004e762c          
004e76b8          uint32_t m_num_2 = this->m_aPictureElements.m_num;
004e76b8          
004e76c0          if ((m_num_2 > 0 && UIRegion::GetScreenY0(this->m_aPictureElements.m_data[(m_num_2 - 1)]) < UIRegion::GetHeight(this->m_pictureField)))
004e76e4              gmCreditsUI::CreateAndAddPicture(this);
004e761b      }
004e7610  }

004e76ee                                            90 90                                                                ..

004e76f0  void __fastcall gmCreditsUI::MakePleaseWaitDialog(class gmCreditsUI* this)

004e76f0  {
004e7701      void var_90;
004e7701      StringInfo::StringInfo(&var_90);
004e7720      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_Wait_PleaseWait"), 0x10000001);
004e7729      void var_108;
004e7729      PropertyCollection::PropertyCollection(&var_108);
004e7739      int32_t* var_114 = nullptr;
004e773d      int32_t* var_110 = nullptr;
004e7741      BaseProperty::SetPropertyName(&var_114, 0x8e);
004e7741      
004e774a      if (var_110 != 0)
004e774a      {
004e7750          BaseProperty::CheckCopyOnWrite(&var_114);
004e775d          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(2);
004e774a      }
004e774a      
004e777a      uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004e777e      void var_104;
004e777e      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e778c      BaseProperty::SetPropertyName(&var_114, 0xc5);
004e778c      
004e7795      if (var_110 != 0)
004e7795      {
004e779b          BaseProperty::CheckCopyOnWrite(&var_114);
004e77ae          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
004e7795      }
004e7795      
004e77bd      var_10c = BaseProperty::GetPropertyName(&var_114);
004e77cf      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e77df      this->m_waitContext = DialogFactory::MakeDialog(this, &var_108);
004e77e5      int32_t* eax_6 = var_114;
004e77e5      
004e77ee      if (eax_6 != 0)
004e77ee      {
004e77f8          int32_t esi_2 = (eax_6[1] - 1);
004e77f5          eax_6[1] = esi_2;
004e77f5          
004e77ff          if (esi_2 == 0)
004e7805              **(uint32_t**)eax_6(1);
004e7805          
004e7807          var_114 = nullptr;
004e77ee      }
004e77ee      
004e7811      if (var_110 != 0)
004e7811      {
004e781b          int32_t esi_4 = (var_110[1] - 1);
004e7818          var_110[1] = esi_4;
004e7818          
004e7822          if (esi_4 == 0)
004e7828              **(uint32_t**)var_110(1);
004e7828          
004e782a          int32_t var_110_1 = 0;
004e7811      }
004e7811      
004e7832      PropertyCollection::~PropertyCollection(&var_108);
004e783e      StringInfo::~StringInfo(&var_90);
004e76f0  }

004e784c                                      90 90 90 90                                                              ....

004e7850  void __fastcall gmCreditsUI::ScrollText(class gmCreditsUI* this)

004e7850  {
004e786d      if ((this->m_textArea != 0 && this->m_textField != 0))
004e786d      {
004e7873          Timer::compute_time();
004e7878          long double x87_r7_1 = ((long double)this->m_duration);
004e787e          long double temp0_1 = ((long double)0f);
004e787e          (x87_r7_1 - temp0_1);
004e7884          float var_8 = 1f;
004e788c          int32_t eax_2;
004e788c          eax_2 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
004e788e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
004e7891          long double x87_r0;
004e7891          
004e7891          if (p_1)
004e78a5              var_8 = ((float)(((long double)1f) - ((((long double)this->m_endTime) - x87_r0) / ((long double)this->m_duration))));
004e78ad          long double x87_r0_4 = ((long double)var_8);
004e78b1          float var_4 = 1f;
004e78b9          (x87_r0_4 - ((long double)1f));
004e78c1          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
004e78c4          float* eax_3 = &var_8;
004e78c4          
004e78c8          if (p_2)
004e78ca              eax_3 = &var_4;
004e78ca          
004e78d6          var_8 = *(uint32_t*)eax_3;
004e78da          (((long double)0f) - ((long double)var_8));
004e78de          var_4 = 0f;
004e78e8          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
004e78eb          float* eax_5 = &var_8;
004e78eb          
004e78ef          if (p_3)
004e78f1              eax_5 = &var_4;
004e78f1          
004e78f7          var_8 = *(uint32_t*)eax_5;
004e7902          UIElement_Text::RecalculateGlyphList(this->m_textArea);
004e7920          var_4 = (UIRegion::GetHeight(this->m_textField) + this->m_textArea->m_iScrollableHeight);
004e792c          int32_t eax_8 = _ftol2();
004e7946          int32_t edi_3 = (UIRegion::GetHeight(this->m_textField) - eax_8);
004e7948          UIRegion::GetScreenY0(this->m_textArea);
004e794d          this->m_textArea->vtable->MoveTo(0, edi_3);
004e795f          long double x87_r7_4 = ((long double)var_8);
004e7963          long double temp3_1 = ((long double)1f);
004e7963          (x87_r7_4 - temp3_1);
004e796a          int32_t eax_12;
004e796a          eax_12 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004e796c          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
004e796c          
004e796f          if (p_4)
004e799c              return;
004e799c          
004e7975          UIListener::UnRegisterForGlobalMessage(this, 3);
004e797c          gmCreditsUI::MakePleaseWaitDialog(this);
004e7988          UIFramework::QueueUIMode(this, 0x1000000a);
004e786d      }
004e7850  }

004e799d                                                                                         90 90 90                               ...

004e79a0  uint8_t __fastcall gmCreditsUI::OnAction(class gmCreditsUI* this, class InputEvent const* arg2)

004e79a0  {
004e79a5      UIListener::UnRegisterForGlobalMessage(this, 3);
004e79ac      gmCreditsUI::MakePleaseWaitDialog(this);
004e79b8      UIFramework::QueueUIMode(this, 0x1000000a);
004e79bd      int32_t eax;
004e79bd      eax = 1;
004e79c0      return 1;
004e79a0  }

004e79c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e79d0  void __fastcall gmCreditsUI::Update(class gmCreditsUI* this)

004e79d0  {
004e79d3      int32_t eax;
004e79d3      int80_t st0;
004e79d3      st0 = gmCreditsUI::ScrollText(this);
004e79db      gmCreditsUI::ScrollPictures(this, eax);
004e79d0  }

004e79e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004e79f0  void __fastcall gmCharacterManagementUI::RecvNotice_BeginEnterWorld(class gmCharacterManagementUI* this)

004e79f0  {
004e79fb      UIFramework::QueueUIMode(((char*)this - 0x98), 0x10000008);
004e79f0  }

004e7a01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004e7a10  void __thiscall gmCharGenMainUI::SetProgressState(class gmCharGenMainUI* this, enum gmCharGenMainUI::ECGProgress arg2)

004e7a10  {
004e7a13      this->m_pHeritagePage->vtable->SetVisible(0);
004e7a21      this->m_pProfessionPage->vtable->SetVisible(0);
004e7a2e      this->m_pSkillsPage->vtable->SetVisible(0);
004e7a3b      this->m_pAppearancePage->vtable->SetVisible(0);
004e7a48      this->m_pTownPage->vtable->SetVisible(0);
004e7a55      this->m_pSummaryPage->vtable->SetVisible(0);
004e7a62      this->m_pRightButton->vtable->SetVisible(1);
004e7a6f      this->m_pFinishButton->vtable->SetVisible(0);
004e7a80      enum gmCharGenMainUI::ECGProgress m_eProgressState_1 = this->m_eProgressState;
004e7a86      class UIElement_Button* m_pHeritageButton = this->m_pHeritageButton;
004e7a8c      this->m_eProgressState = arg2;
004e7a92      m_pHeritageButton->vtable->SetState(1);
004e7a9c      this->m_pProfessionButton->vtable->SetState(1);
004e7aac      this->m_pSkillsButton->vtable->SetState(1);
004e7abc      this->m_pAppearanceButton->vtable->SetState(1);
004e7acc      this->m_pTownButton->vtable->SetState(1);
004e7adc      this->m_pSummaryButton->vtable->SetState(1);
004e7af7      uint32_t mHeritageGroup = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem)->mHeritageGroup;
004e7af7      
004e7b05      if ((mHeritageGroup == 0xc || mHeritageGroup == 0xd))
004e7b05      {
004e7b30          this->m_pProfessionButton->vtable->SetVisible(0);
004e7b3d          this->m_pSkillsButton->vtable->SetVisible(0);
004e7b4a          this->m_pTownButton->vtable->SetVisible(0);
004e7b57          enum gmCharGenMainUI::ECGProgress m_eProgressState = this->m_eProgressState;
004e7b57          
004e7b5f          if (m_eProgressState < m_eProgressState_1)
004e7b5f          {
004e7b84              if ((m_eProgressState == ECG_PROFESSION || m_eProgressState == ECG_SKILLS))
004e7b97                  this->m_eProgressState = ECG_HERTAGE;
004e7b84              else if (m_eProgressState == ECG_TOWN)
004e7b8b                  this->m_eProgressState = ECG_APPEARANCE;
004e7b5f          }
004e7b5f          else if ((m_eProgressState == ECG_PROFESSION || m_eProgressState == ECG_SKILLS))
004e7b8b              this->m_eProgressState = ECG_APPEARANCE;
004e7b69          else if (m_eProgressState == ECG_TOWN)
004e7b70              this->m_eProgressState = ECG_SUMMARY;
004e7b05      }
004e7b05      else
004e7b05      {
004e7b07          this->m_pProfessionButton->vtable->SetVisible(1);
004e7b14          this->m_pSkillsButton->vtable->SetVisible(1);
004e7b21          this->m_pTownButton->vtable->SetVisible(1);
004e7b05      }
004e7b05      
004e7bad      switch ((this->m_eProgressState - 1))
004e7bad      {
004e7bc1          case 0:
004e7bc1          {
004e7bb4              this->m_pMasterPage->vtable->SetState(0x10000025);
004e7bc7              this->m_pHeritagePage->vtable->SetVisible(1);
004e7bd4              this->m_pHeritageButton->vtable->SetState(6);
004e7bea              gmCGHeritagePage::Update(this->m_pHeritagePage);
004e7bc1              break;
004e7bc1          }
004e7c01          case 1:
004e7c01          {
004e7bf4              this->m_pMasterPage->vtable->SetState(0x10000026);
004e7c07              this->m_pProfessionPage->vtable->SetVisible(1);
004e7c14              this->m_pProfessionButton->vtable->SetState(6);
004e7c2a              gmCGProfessionPage::Update(this->m_pProfessionPage);
004e7c01              break;
004e7c01          }
004e7c41          case 2:
004e7c41          {
004e7c34              this->m_pMasterPage->vtable->SetState(0x10000027);
004e7c47              this->m_pSkillsPage->vtable->SetVisible(1);
004e7c54              this->m_pSkillsButton->vtable->SetState(6);
004e7c6a              gmCGSkillsPage::Update(this->m_pSkillsPage);
004e7c41              break;
004e7c41          }
004e7c81          case 3:
004e7c81          {
004e7c74              this->m_pMasterPage->vtable->SetState(0x10000028);
004e7c87              this->m_pAppearancePage->vtable->SetVisible(1);
004e7c94              this->m_pAppearanceButton->vtable->SetState(6);
004e7caa              gmCGAppearancePage::Update(this->m_pAppearancePage);
004e7c81              break;
004e7c81          }
004e7cc1          case 4:
004e7cc1          {
004e7cb4              this->m_pMasterPage->vtable->SetState(0x10000029);
004e7cc7              this->m_pTownPage->vtable->SetVisible(1);
004e7cd4              this->m_pTownButton->vtable->SetState(6);
004e7cea              gmCGTownPage::Update(this->m_pTownPage);
004e7cc1              break;
004e7cc1          }
004e7d01          case 5:
004e7d01          {
004e7cf4              this->m_pMasterPage->vtable->SetState(0x1000002a);
004e7d07              this->m_pSummaryPage->vtable->SetVisible(1);
004e7d14              this->m_pSummaryButton->vtable->SetState(6);
004e7d2a              gmCGSummaryPage::Update(this->m_pSummaryPage);
004e7d2f              this->m_pRightButton->vtable->SetVisible(0);
004e7d46              int32_t __saved_esi = 1;
004e7d4e              /* jump -> this->m_pFinishButton->vtable->SetVisible */
004e7d01          }
004e7bad      }
004e7a10  }

004e7d51                                                     8d 49 00                                                       .I.
004e7d54  uint32_t jump_table_4e7d54[0x6] = 
004e7d54  {
004e7d54      [0x0] =  0x004e7bb4
004e7d58      [0x1] =  0x004e7bf4
004e7d5c      [0x2] =  0x004e7c34
004e7d60      [0x3] =  0x004e7c74
004e7d64      [0x4] =  0x004e7cb4
004e7d68      [0x5] =  0x004e7cf4
004e7d6c  }

004e7d6c                                      90 90 90 90                                                              ....

004e7d70  void __fastcall gmCharGenMainUI::DoRandom(class gmCharGenMainUI* this)

004e7d70  {
004e7d7a      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004e7d87      int32_t eax_2 = (this->m_eProgressState - 1);
004e7d87      
004e7d8b      if (eax_2 > 5)
004e7e6d          return;
004e7e6d      
004e7d91      switch (eax_2)
004e7d91      {
004e7da6          case 0:
004e7da6          {
004e7da6              CharGenState::RandomizeHeritageGroup(eax, CPlayerSystem::AccountHasThroneOfDestiny(this->m_pPlayerSystem));
004e7db3              /* tailcall */
004e7db3              return gmCGHeritagePage::Update(this->m_pHeritagePage);
004e7da6          }
004e7dba          case 1:
004e7dba          {
004e7dba              CharGenState::RandomizeTemplate(eax);
004e7dc7              /* tailcall */
004e7dc7              return gmCGProfessionPage::UpdateToDefaultAttributes(this->m_pProfessionPage);
004e7dba          }
004e7dce          case 2:
004e7dce          {
004e7dce              CharGenState::RandomizeSkills(eax);
004e7ddb              /* tailcall */
004e7ddb              return gmCGSkillsPage::Update(this->m_pSkillsPage);
004e7dce          }
004e7def          case 3:
004e7def          {
004e7def              if (this->m_pAppearancePage->m_eCurType == ECG_CHOICE_CLOTHES)
004e7def              {
004e7df3                  CharGenState::RandomizeClothing(eax, 1);
004e7e00                  /* tailcall */
004e7e00                  return gmCGAppearancePage::Update(this->m_pAppearancePage);
004e7def              }
004e7def              
004e7e07              CharGenState::RandomizeAppearance(eax, 0);
004e7e14              /* tailcall */
004e7e14              return gmCGAppearancePage::Update(this->m_pAppearancePage);
004e7def          }
004e7e1f          case 4:
004e7e1f          {
004e7e26              int32_t var_c_1;
004e7e26              
004e7e26              if (CPlayerSystem::AccountHasThroneOfDestiny(this->m_pPlayerSystem) == 0)
004e7e2c                  var_c_1 = 3;
004e7e26              else
004e7e28                  var_c_1 = 4;
004e7e28              
004e7e39              CharGenState::SetStartArea(eax, RandInt(var_c_1));
004e7e46              /* tailcall */
004e7e46              return gmCGTownPage::Update(this->m_pTownPage);
004e7e1f          }
004e7e59          case 5:
004e7e59          {
004e7e59              CharGenState::RandomizeCharacter(eax, CPlayerSystem::AccountHasThroneOfDestiny(this->m_pPlayerSystem));
004e7e66              /* tailcall */
004e7e66              return gmCGSummaryPage::Update(this->m_pSummaryPage);
004e7e59          }
004e7d91      }
004e7d70  }

004e7e6e                                            8b ff                                                                ..
004e7e70  uint32_t jump_table_4e7e70[0x6] = 
004e7e70  {
004e7e70      [0x0] =  0x004e7d98
004e7e74      [0x1] =  0x004e7db8
004e7e78      [0x2] =  0x004e7dcc
004e7e7c      [0x3] =  0x004e7de0
004e7e80      [0x4] =  0x004e7e19
004e7e84      [0x5] =  0x004e7e4b
004e7e88  }

004e7e88                          90 90 90 90 90 90 90 90                                                          ........

004e7e90  class CharacterIdentity* __thiscall CharacterSet::GetIdentity(class CharacterSet* this, int32_t arg2)

004e7e90  {
004e7e97      if (arg2 < this->set_.m_num)
004e7e97      {
004e7e9f          void* result = &this->set_.m_data[arg2];
004e7e9f          
004e7ea6          if (*(uint32_t*)((char*)result + 4) != 0)
004e7eaa              return result;
004e7e97      }
004e7e97      
004e7ea8      return nullptr;
004e7e90  }

004e7ead                                         90 90 90                                                               ...

004e7eb0  void __fastcall gmCharGenMainUI::gmCharGenMainUI(class gmCharGenMainUI* this)

004e7eb0  {
004e7eb6      UIMainFramework::UIMainFramework(this);
004e7ebb      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e7ecd      this->vtable = 0x7c20d8;
004e7ec7      this->vtable = &gmCharGenMainUI::`vftable';
004e7eda      __builtin_memset(&this->m_pPlayerSystem, 0, 0x2c);
004e7f1c      this->m_pLeftButton = nullptr;
004e7f22      this->m_pRightButton = nullptr;
004e7f28      __builtin_memset(&this->m_pHelpButton, 0, 0x11);
004e7f46      __builtin_memset(&this->m_uiExitContext, 0, 0x18);
004e7f6a      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004e7f6a      
004e7f73      if (eax != 0)
004e7f73      {
004e7f79          eax->vtable->RegisterNoticeHandler(0x186a4, &this->vtable);
004e7f86          eax->vtable->RegisterNoticeHandler(0x4dd22c, &this->vtable);
004e7f93          eax->vtable->RegisterNoticeHandler(0x4dd1e1, &this->vtable);
004e7fa4          UIListener::RegisterForGlobalMessage(this, 1);
004e7fb5          class UIElement* eax_3 = UIMainFramework::CreateAndAddRootElement(this, 0x10000039, 0x100003cc);
004e7fbc          this->m_rootField = eax_3;
004e7fbc          
004e7fc2          if (eax_3 != 0)
004e7fc2          {
004e7fcf              class UIElement* eax_4 = UIElement::GetChildRecursive(eax_3, 0x100003ce);
004e7fd4              class UIElement* m_rootField = this->m_rootField;
004e7fdf              this->m_ProgressBar = eax_4;
004e7fe5              class UIElement* eax_5 = UIElement::GetChildRecursive(m_rootField, 0x100003cf);
004e7fea              class UIElement* m_rootField_1 = this->m_rootField;
004e7ff5              this->m_MainMenu = eax_5;
004e7ffb              class UIElement* eax_6 = UIElement::GetChildRecursive(m_rootField_1, 0x100003ef);
004e8002              class UIElement_Button* eax_7;
004e8002              
004e8002              if (eax_6 == 0)
004e8012                  eax_7 = nullptr;
004e8002              else
004e800a                  eax_7 = eax_6->vtable->DynamicCast(1);
004e800a              
004e8014              class UIElement* m_rootField_2 = this->m_rootField;
004e801f              this->m_pHeritageButton = eax_7;
004e8025              class UIElement* eax_8 = UIElement::GetChildRecursive(m_rootField_2, 0x100003f0);
004e802c              class UIElement_Button* eax_9;
004e802c              
004e802c              if (eax_8 == 0)
004e803c                  eax_9 = nullptr;
004e802c              else
004e8034                  eax_9 = eax_8->vtable->DynamicCast(1);
004e8034              
004e803e              class UIElement* m_rootField_3 = this->m_rootField;
004e8049              this->m_pProfessionButton = eax_9;
004e804f              class UIElement* eax_10 = UIElement::GetChildRecursive(m_rootField_3, 0x100003f1);
004e8056              class UIElement_Button* eax_11;
004e8056              
004e8056              if (eax_10 == 0)
004e8066                  eax_11 = nullptr;
004e8056              else
004e805e                  eax_11 = eax_10->vtable->DynamicCast(1);
004e805e              
004e8068              class UIElement* m_rootField_4 = this->m_rootField;
004e8073              this->m_pSkillsButton = eax_11;
004e8079              class UIElement* eax_12 = UIElement::GetChildRecursive(m_rootField_4, 0x100003f2);
004e8080              class UIElement_Button* eax_13;
004e8080              
004e8080              if (eax_12 == 0)
004e8090                  eax_13 = nullptr;
004e8080              else
004e8088                  eax_13 = eax_12->vtable->DynamicCast(1);
004e8088              
004e8092              class UIElement* m_rootField_5 = this->m_rootField;
004e809d              this->m_pAppearanceButton = eax_13;
004e80a3              class UIElement* eax_14 = UIElement::GetChildRecursive(m_rootField_5, 0x100003f3);
004e80aa              class UIElement_Button* eax_15;
004e80aa              
004e80aa              if (eax_14 == 0)
004e80ba                  eax_15 = nullptr;
004e80aa              else
004e80b2                  eax_15 = eax_14->vtable->DynamicCast(1);
004e80b2              
004e80bc              class UIElement* m_rootField_6 = this->m_rootField;
004e80c7              this->m_pTownButton = eax_15;
004e80cd              class UIElement* eax_16 = UIElement::GetChildRecursive(m_rootField_6, 0x100003f4);
004e80d4              class UIElement_Button* eax_17;
004e80d4              
004e80d4              if (eax_16 == 0)
004e80e4                  eax_17 = nullptr;
004e80d4              else
004e80dc                  eax_17 = eax_16->vtable->DynamicCast(1);
004e80dc              
004e80e6              class UIElement* m_rootField_7 = this->m_rootField;
004e80f1              this->m_pSummaryButton = eax_17;
004e80f7              class UIElement* eax_18 = UIElement::GetChildRecursive(m_rootField_7, 0x100003c6);
004e80fe              class UIElement_Button* eax_19;
004e80fe              
004e80fe              if (eax_18 == 0)
004e810e                  eax_19 = nullptr;
004e80fe              else
004e8106                  eax_19 = eax_18->vtable->DynamicCast(1);
004e8106              
004e8110              class UIElement* m_rootField_8 = this->m_rootField;
004e811b              this->m_pLeftButton = eax_19;
004e8121              class UIElement* eax_20 = UIElement::GetChildRecursive(m_rootField_8, 0x100003c7);
004e8128              class UIElement_Button* eax_21;
004e8128              
004e8128              if (eax_20 == 0)
004e8138                  eax_21 = nullptr;
004e8128              else
004e8130                  eax_21 = eax_20->vtable->DynamicCast(1);
004e8130              
004e813a              class UIElement* m_rootField_9 = this->m_rootField;
004e8145              this->m_pRightButton = eax_21;
004e814b              class UIElement* eax_22 = UIElement::GetChildRecursive(m_rootField_9, 0x100003c8);
004e8152              class UIElement_Button* eax_23;
004e8152              
004e8152              if (eax_22 == 0)
004e8162                  eax_23 = nullptr;
004e8152              else
004e815a                  eax_23 = eax_22->vtable->DynamicCast(1);
004e815a              
004e8164              class UIElement* m_rootField_10 = this->m_rootField;
004e816f              this->m_pFinishButton = eax_23;
004e8175              class UIElement* eax_24 = UIElement::GetChildRecursive(m_rootField_10, 0x100003c9);
004e817c              class UIElement_Button* eax_25;
004e817c              
004e817c              if (eax_24 == 0)
004e818c                  eax_25 = nullptr;
004e817c              else
004e8184                  eax_25 = eax_24->vtable->DynamicCast(1);
004e8184              
004e818e              class UIElement* m_rootField_11 = this->m_rootField;
004e8199              this->m_pHelpButton = eax_25;
004e819f              class UIElement* eax_26 = UIElement::GetChildRecursive(m_rootField_11, 0x100003ca);
004e81a6              class UIElement_Button* eax_27;
004e81a6              
004e81a6              if (eax_26 == 0)
004e81b6                  eax_27 = nullptr;
004e81a6              else
004e81ae                  eax_27 = eax_26->vtable->DynamicCast(1);
004e81ae              
004e81b8              class UIElement* m_rootField_12 = this->m_rootField;
004e81c3              this->m_pExitButton = eax_27;
004e81c9              class UIElement* eax_28 = UIElement::GetChildRecursive(m_rootField_12, 0x100003cb);
004e81d0              class UIElement_Button* eax_29;
004e81d0              
004e81d0              if (eax_28 == 0)
004e81e0                  eax_29 = nullptr;
004e81d0              else
004e81d8                  eax_29 = eax_28->vtable->DynamicCast(1);
004e81d8              
004e81e2              this->m_pRandomButton = eax_29;
004e81e8              class CPlayerSystem* eax_30 = CPlayerSystem::GetPlayerSystem();
004e81ef              this->m_pPlayerSystem = eax_30;
004e81f5              uint8_t eax_31 = CPlayerSystem::AccountHasThroneOfDestiny(eax_30);
004e8208              CharGenState::RandomizeCharacter(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem), eax_31);
004e8218              class UIElement* eax_33 = UIElement::GetChildRecursive(this->m_rootField, 0x100003d0);
004e821d              class UIElement* m_rootField_13 = this->m_rootField;
004e8228              this->m_pMasterPage = eax_33;
004e822e              class UIElement* eax_34 = UIElement::GetChildRecursive(m_rootField_13, 0x100003d1);
004e8235              class gmCGHeritagePage* eax_35;
004e8235              
004e8235              if (eax_34 == 0)
004e8248                  eax_35 = nullptr;
004e8235              else
004e8240                  eax_35 = eax_34->vtable->DynamicCast(0x10000039);
004e8240              
004e824d              this->m_pHeritagePage = eax_35;
004e8253              gmCGHeritagePage::InitializePage(eax_35, this);
004e8263              class UIElement* eax_36 = UIElement::GetChildRecursive(this->m_rootField, 0x100003d2);
004e826a              class gmCGProfessionPage* eax_37;
004e826a              
004e826a              if (eax_36 == 0)
004e827d                  eax_37 = nullptr;
004e826a              else
004e8275                  eax_37 = eax_36->vtable->DynamicCast(0x1000003a);
004e8275              
004e8282              this->m_pProfessionPage = eax_37;
004e8288              gmCGProfessionPage::InitializePage(eax_37, this);
004e8298              class UIElement* eax_38 = UIElement::GetChildRecursive(this->m_rootField, 0x100003d3);
004e829f              class gmCGSkillsPage* eax_39;
004e829f              
004e829f              if (eax_38 == 0)
004e82b2                  eax_39 = nullptr;
004e829f              else
004e82aa                  eax_39 = eax_38->vtable->DynamicCast(0x1000003b);
004e82aa              
004e82b7              this->m_pSkillsPage = eax_39;
004e82bd              gmCGSkillsPage::InitializePage(eax_39, this);
004e82cd              class UIElement* eax_40 = UIElement::GetChildRecursive(this->m_rootField, 0x100003d4);
004e82d4              class gmCGAppearancePage* eax_41;
004e82d4              
004e82d4              if (eax_40 == 0)
004e82e7                  eax_41 = nullptr;
004e82d4              else
004e82df                  eax_41 = eax_40->vtable->DynamicCast(0x1000003c);
004e82df              
004e82ec              this->m_pAppearancePage = eax_41;
004e82f2              gmCGAppearancePage::InitializePage(eax_41, this);
004e8302              class UIElement* eax_42 = UIElement::GetChildRecursive(this->m_rootField, 0x100003d5);
004e8309              class gmCGTownPage* eax_43;
004e8309              
004e8309              if (eax_42 == 0)
004e831c                  eax_43 = nullptr;
004e8309              else
004e8314                  eax_43 = eax_42->vtable->DynamicCast(0x1000003d);
004e8314              
004e8321              this->m_pTownPage = eax_43;
004e8327              gmCGTownPage::InitializePage(eax_43, this);
004e8337              class UIElement* eax_44 = UIElement::GetChildRecursive(this->m_rootField, 0x100003d6);
004e833e              class gmCGSummaryPage* eax_45;
004e833e              
004e833e              if (eax_44 == 0)
004e8351                  eax_45 = nullptr;
004e833e              else
004e8349                  eax_45 = eax_44->vtable->DynamicCast(0x1000003e);
004e8349              
004e8356              this->m_pSummaryPage = eax_45;
004e835c              gmCGSummaryPage::InitializePage(eax_45, this);
004e8365              gmCharGenMainUI::SetProgressState(this, ECG_HERTAGE);
004e7fc2          }
004e7f73      }
004e7eb0  }

004e8371                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004e8380  void __fastcall gmCharGenMainUI::~gmCharGenMainUI(class gmCharGenMainUI* this)

004e8380  {
004e838c      this->vtable = 0x7c20d8;
004e8384      this->vtable = &gmCharGenMainUI::`vftable';
004e8398      UIListener::UnRegisterForGlobalMessage(this, 1);
004e83a6      UIMainFramework::RemoveRootElement(this, &this->m_rootField);
004e83ad      this->m_uiPleaseWaitContext = 0;
004e83b3      this->m_uiErrorMessageContext = 0;
004e83b9      this->m_uiExitContext = 0;
004e8384      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e83c7      NoticeHandler::~NoticeHandler(&this->vtable);
004e83d0      /* tailcall */
004e83d0      return UIMainFramework::~UIMainFramework(this);
004e8380  }

004e83d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004e83e0  class UIMainFramework* gmCharGenMainUI::Create()

004e83e0  {
004e83e5      void* eax = operator new(0x118);
004e83e5      
004e83ef      if (eax == 0)
004e83fa          return 0;
004e83fa      
004e83f3      /* tailcall */
004e83f3      return gmCharGenMainUI::gmCharGenMainUI(eax);
004e83e0  }

004e83fb                                                                                   90 90 90 90 90                             .....

004e8400  uint8_t __thiscall gmCharGenMainUI::CloseRandomizeWarningDialog(class gmCharGenMainUI* this, uint8_t arg2)

004e8400  {
004e8406      this->m_uiRandomizeWarningContext = 0;
004e8406      
004e8410      if (arg2 != 0)
004e8412          gmCharGenMainUI::DoRandom(this);
004e8412      
004e8419      return 1;
004e8400  }

004e841c                                                                                      90 90 90 90                              ....

004e8420  void* __thiscall gmCharGenMainUI::`scalar deleting destructor'(class gmCharGenMainUI* this, uint32_t arg2)

004e8420  {
004e8423      gmCharGenMainUI::~gmCharGenMainUI(this);
004e8423      
004e842d      if ((arg2 & 1) != 0)
004e8430          operator delete(this);
004e8430      
004e843b      return this;
004e8420  }

004e843e                                                                                            90 90                                ..

004e8440  void gmCharGenMainUI::Register(uint32_t arg1)

004e8440  {
004e844a      UIFlow::RegisterFrameworkClass(arg1, gmCharGenMainUI::Create);
004e8440  }

004e8453                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e8460  void __fastcall gmCharGenMainUI::Update(class gmCharGenMainUI* this)

004e8460  {
004e8464      class gmCharGenMainUI* this_1 = this;
004e846e      class gmCharGenMainUI* this_2 = this_1;
004e8472      char var_15 = 0;
004e8472      
004e8477      if (this_1->m_bAwaitingCharSetForLogin == 0)
004e8477      {
004e85e0          UIFramework::QueueUIMode(this_1, 0x1000000a);
004e85e0          return;
004e8477      }
004e8477      
004e8493      class PStringBase<char> __saved_ebx_4;
004e8493      PStringBase<char>::PStringBase<char>(&__saved_ebx_4, &CPlayerSystem::GetCharGenState(this_1->m_pPlayerSystem)->name);
004e84a9      int32_t i = 0;
004e84a9      
004e84ad      if (CPlayerSystem::GetCharGenState(this_1->m_pPlayerSystem)->createAsAdmin != 0)
004e84ad      {
004e84b3          class PStringBase<char> __saved_ebx_2 = __saved_ebx_4;
004e84b4          int32_t __saved_ebp_1 = 0x2b;
004e84c0          PStringBase<char>::sprintf(&__saved_ebx_4, "%c%s");
004e84ad      }
004e84ad      
004e84ca      class UIPersistantData* eax_5;
004e84ca      int32_t ecx_5;
004e84ca      eax_5 = UIFramework::GetPersistantData(this_1);
004e84ca      
004e84d1      if (eax_5 != 0)
004e84d1      {
004e84df          int32_t i_1 = 0;
004e84df          
004e84e3          if (eax_5->_charSet.set_.m_num > 0)
004e84e3          {
004e84e9              void* var_c_1 = nullptr;
004e84e9              
004e8585              do
004e8585              {
004e84fa                  if (CharacterSet::GetGreyedOutFor(&eax_5->_charSet, i) <= 0)
004e84fa                  {
004e84ff                      class CharacterIdentity* m_data;
004e84ff                      
004e84ff                      if (i < eax_5->_charSet.set_.m_num)
004e8501                          m_data = eax_5->_charSet.set_.m_data;
004e8501                      
004e8510                      void* edi;
004e8510                      
004e8510                      if ((i >= eax_5->_charSet.set_.m_num || *(uint32_t*)(&m_data->gid_ + var_c_1) == 0))
004e8516                          edi = nullptr;
004e8510                      else
004e8512                          edi = ((char*)var_c_1 + m_data);
004e8512                      
004e8523                      void* var_8;
004e8523                      PStringBase<char>::PStringBase<char>(&var_8, (*(uint32_t*)((char*)edi + 8) + 0x14));
004e8532                      int32_t eax_10 = _stricmp(__saved_ebx_4, var_8);
004e8541                      char ebx_2 = ((int8_t)-(eax_10));
004e8545                      int32_t* esi_2 = ((char*)var_8 - 0x14);
004e8545                      
004e855a                      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004e8562                          **(uint32_t**)esi_2(1);
004e8562                      
004e8566                      if ((ebx_2 - ebx_2) != 0xff)
004e8566                      {
004e858d                          uint32_t edi_1 = *(uint32_t*)((char*)edi + 4);
004e858d                          
004e8592                          if (edi_1 != 0)
004e8592                          {
004e859f                              var_15 = 1;
004e85a4                              CPlayerSystem::LogOnCharacter(this_2->m_pPlayerSystem, edi_1);
004e8592                          }
004e8592                          
004e85a9                          this_1 = this_2;
004e85a9                          break;
004e8566                      }
004e8566                      
004e8568                      i = i_1;
004e856c                      this_1 = this_2;
004e84fa                  }
004e84fa                  
004e8577                  i += 1;
004e857d                  i_1 = i;
004e8581                  var_c_1 += 0x10;
004e8585              } while (i < eax_5->_charSet.set_.m_num);
004e84e3          }
004e84d1      }
004e84d1      
004e85b3      int32_t* esi_4 = (__saved_ebx_4 - 0x14);
004e85b3      
004e85c6      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004e85ce          **(uint32_t**)esi_4(1);
004e85ce      
004e85d0      int32_t eax_14;
004e85d0      eax_14 = var_15;
004e85d0      
004e85d7      if (eax_14 == 0)
004e85e0          UIFramework::QueueUIMode(this_1, 0x1000000a);
004e8460  }

004e85ea                                90 90 90 90 90 90                                                            ......

004e85f0  void __thiscall accountID::accountID(class accountID* this, class accountID const* arg2)

004e85f0  {
004e85f0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004e85f6      class AC1Legacy::PSRefBuffer<char>** this_1 = this;
004e85ff      *(uint32_t*)this_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004e8601      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004e8613      AC1Legacy::PStringBase<char>::set(this_1, &arg2->m_buffer->m_data);
004e861a      AC1Legacy::PStringBase<char>::break_reference(this_1);
004e8625      _strlwr(&*(uint32_t*)this_1->m_data);
004e862e      this_1[1] = arg2->fIsDarkMajestyExpansion_;
004e8634      this_1[2] = arg2->m_fIsThroneOfDestinyExpansion;
004e863d      this_1[3] = arg2->m_fPreOrderedThroneOfDestinyExpansion;
004e85f0  }

004e8647                       90 90 90 90 90 90 90 90 90                                                         .........

004e8650  uint8_t __fastcall gmCharGenMainUI::DoExit(class gmCharGenMainUI* this)

004e8650  {
004e8664      if (this->m_uiExitContext == 0)
004e8664      {
004e8671          void var_90;
004e8671          StringInfo::StringInfo(&var_90);
004e8690          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_ExitWarning"), 0x10000002);
004e8699          void var_108;
004e8699          PropertyCollection::PropertyCollection(&var_108);
004e86a7          int32_t* var_114 = nullptr;
004e86ab          int32_t* var_110_1 = nullptr;
004e86af          BaseProperty::SetPropertyName(&var_114, 0x8e);
004e86af          
004e86b8          if (var_110_1 != 0)
004e86b8          {
004e86be              BaseProperty::CheckCopyOnWrite(&var_114);
004e86cb              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xac)(1);
004e86b8          }
004e86b8          
004e86e8          uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004e86ec          void var_104;
004e86ec          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e86fa          BaseProperty::SetPropertyName(&var_114, 0xac);
004e86fa          
004e8703          if (var_110_1 != 0)
004e8703          {
004e8709              BaseProperty::CheckCopyOnWrite(&var_114);
004e8716              *(uint32_t*)(*(uint32_t*)var_110_1 + 0x74)(1);
004e8703          }
004e8703          
004e8730          var_10c = BaseProperty::GetPropertyName(&var_114);
004e8734          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e8742          BaseProperty::SetPropertyName(&var_114, 0xc5);
004e8742          
004e874b          if (var_110_1 != 0)
004e874b          {
004e8751              BaseProperty::CheckCopyOnWrite(&var_114);
004e8764              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xc4)(&var_90);
004e874b          }
004e874b          
004e8773          var_10c = BaseProperty::GetPropertyName(&var_114);
004e8785          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e878f          uint32_t eax_8 = DialogFactory::MakeDialogInCurrentUI(&var_108);
004e8797          this->m_uiExitContext = eax_8;
004e879f          int32_t* eax_9 = var_114;
004e879f          
004e87a3          if (eax_8 != 0)
004e87a3          {
004e8809              if (eax_9 != 0)
004e8809              {
004e8813                  int32_t esi_6 = (eax_9[1] - 1);
004e8810                  eax_9[1] = esi_6;
004e8810                  
004e881a                  if (esi_6 == 0)
004e8820                      **(uint32_t**)eax_9(1);
004e8820                  
004e8822                  var_114 = nullptr;
004e8809              }
004e8809              
004e882c              if (var_110_1 != 0)
004e882c              {
004e8836                  int32_t esi_8 = (var_110_1[1] - 1);
004e8833                  var_110_1[1] = esi_8;
004e8833                  
004e883d                  if (esi_8 == 0)
004e8843                      **(uint32_t**)var_110_1(1);
004e8843                  
004e8845                  int32_t var_110_3 = 0;
004e882c              }
004e882c              
004e884d              PropertyCollection::~PropertyCollection(&var_108);
004e8859              StringInfo::~StringInfo(&var_90);
004e885f              int32_t eax_18;
004e885f              eax_18 = 1;
004e8868              return 1;
004e87a3          }
004e87a3          
004e87a7          if (eax_9 != 0)
004e87a7          {
004e87b1              int32_t esi_2 = (eax_9[1] - 1);
004e87ae              eax_9[1] = esi_2;
004e87ae              
004e87b8              if (esi_2 == 0)
004e87be                  **(uint32_t**)eax_9(1);
004e87be              
004e87c0              var_114 = nullptr;
004e87a7          }
004e87a7          
004e87ca          if (var_110_1 != 0)
004e87ca          {
004e87d4              int32_t esi_4 = (var_110_1[1] - 1);
004e87d1              var_110_1[1] = esi_4;
004e87d1              
004e87db              if (esi_4 == 0)
004e87e1                  **(uint32_t**)var_110_1(1);
004e87e1              
004e87e3              int32_t var_110_2 = 0;
004e87ca          }
004e87ca          
004e87eb          PropertyCollection::~PropertyCollection(&var_108);
004e87f7          StringInfo::~StringInfo(&var_90);
004e8664      }
004e8664      
004e87fd      uint32_t eax;
004e87fd      eax = 0;
004e8806      return 0;
004e8650  }

004e8869                             90 90 90 90 90 90 90                                                           .......

004e8870  uint8_t __fastcall gmCharGenMainUI::MakeCreditWarningDialog(class gmCharGenMainUI* this)

004e8870  {
004e8884      if (this->m_uiCreditWarningContext == 0)
004e8884      {
004e8891          void var_90;
004e8891          StringInfo::StringInfo(&var_90);
004e88b0          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_CreditWarning"), 0x10000002);
004e88b9          void var_108;
004e88b9          PropertyCollection::PropertyCollection(&var_108);
004e88c7          int32_t* var_114 = nullptr;
004e88cb          int32_t* var_110_1 = nullptr;
004e88cf          BaseProperty::SetPropertyName(&var_114, 0x8e);
004e88cf          
004e88d8          if (var_110_1 != 0)
004e88d8          {
004e88de              BaseProperty::CheckCopyOnWrite(&var_114);
004e88eb              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xac)(1);
004e88d8          }
004e88d8          
004e8908          uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004e890c          void var_104;
004e890c          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e891a          BaseProperty::SetPropertyName(&var_114, 0xac);
004e891a          
004e8923          if (var_110_1 != 0)
004e8923          {
004e8929              BaseProperty::CheckCopyOnWrite(&var_114);
004e8936              *(uint32_t*)(*(uint32_t*)var_110_1 + 0x74)(1);
004e8923          }
004e8923          
004e8950          var_10c = BaseProperty::GetPropertyName(&var_114);
004e8954          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e8962          BaseProperty::SetPropertyName(&var_114, 0xc5);
004e8962          
004e896b          if (var_110_1 != 0)
004e896b          {
004e8971              BaseProperty::CheckCopyOnWrite(&var_114);
004e8984              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xc4)(&var_90);
004e896b          }
004e896b          
004e8993          var_10c = BaseProperty::GetPropertyName(&var_114);
004e89a5          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e89af          uint32_t eax_8 = DialogFactory::MakeDialogInCurrentUI(&var_108);
004e89b7          this->m_uiCreditWarningContext = eax_8;
004e89bf          int32_t* eax_9 = var_114;
004e89bf          
004e89c3          if (eax_8 != 0)
004e89c3          {
004e8a29              if (eax_9 != 0)
004e8a29              {
004e8a33                  int32_t esi_6 = (eax_9[1] - 1);
004e8a30                  eax_9[1] = esi_6;
004e8a30                  
004e8a3a                  if (esi_6 == 0)
004e8a40                      **(uint32_t**)eax_9(1);
004e8a40                  
004e8a42                  var_114 = nullptr;
004e8a29              }
004e8a29              
004e8a4c              if (var_110_1 != 0)
004e8a4c              {
004e8a56                  int32_t esi_8 = (var_110_1[1] - 1);
004e8a53                  var_110_1[1] = esi_8;
004e8a53                  
004e8a5d                  if (esi_8 == 0)
004e8a63                      **(uint32_t**)var_110_1(1);
004e8a63                  
004e8a65                  int32_t var_110_3 = 0;
004e8a4c              }
004e8a4c              
004e8a6d              PropertyCollection::~PropertyCollection(&var_108);
004e8a79              StringInfo::~StringInfo(&var_90);
004e8a7f              int32_t eax_18;
004e8a7f              eax_18 = 1;
004e8a88              return 1;
004e89c3          }
004e89c3          
004e89c7          if (eax_9 != 0)
004e89c7          {
004e89d1              int32_t esi_2 = (eax_9[1] - 1);
004e89ce              eax_9[1] = esi_2;
004e89ce              
004e89d8              if (esi_2 == 0)
004e89de                  **(uint32_t**)eax_9(1);
004e89de              
004e89e0              var_114 = nullptr;
004e89c7          }
004e89c7          
004e89ea          if (var_110_1 != 0)
004e89ea          {
004e89f4              int32_t esi_4 = (var_110_1[1] - 1);
004e89f1              var_110_1[1] = esi_4;
004e89f1              
004e89fb              if (esi_4 == 0)
004e8a01                  **(uint32_t**)var_110_1(1);
004e8a01              
004e8a03              int32_t var_110_2 = 0;
004e89ea          }
004e89ea          
004e8a0b          PropertyCollection::~PropertyCollection(&var_108);
004e8a17          StringInfo::~StringInfo(&var_90);
004e8884      }
004e8884      
004e8a1d      uint32_t eax;
004e8a1d      eax = 0;
004e8a26      return 0;
004e8870  }

004e8a89                             90 90 90 90 90 90 90                                                           .......

004e8a90  uint8_t __fastcall gmCharGenMainUI::MakeRandomizeWarningDialog(class gmCharGenMainUI* this)

004e8a90  {
004e8aa4      if (this->m_uiRandomizeWarningContext == 0)
004e8aa4      {
004e8ab1          void var_90;
004e8ab1          StringInfo::StringInfo(&var_90);
004e8ad0          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_RandomizeWarning"), 0x10000002);
004e8ad9          void var_108;
004e8ad9          PropertyCollection::PropertyCollection(&var_108);
004e8ae7          int32_t* var_114 = nullptr;
004e8aeb          int32_t* var_110_1 = nullptr;
004e8aef          BaseProperty::SetPropertyName(&var_114, 0x8e);
004e8aef          
004e8af8          if (var_110_1 != 0)
004e8af8          {
004e8afe              BaseProperty::CheckCopyOnWrite(&var_114);
004e8b0b              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xac)(1);
004e8af8          }
004e8af8          
004e8b28          uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004e8b2c          void var_104;
004e8b2c          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e8b3a          BaseProperty::SetPropertyName(&var_114, 0xac);
004e8b3a          
004e8b43          if (var_110_1 != 0)
004e8b43          {
004e8b49              BaseProperty::CheckCopyOnWrite(&var_114);
004e8b56              *(uint32_t*)(*(uint32_t*)var_110_1 + 0x74)(1);
004e8b43          }
004e8b43          
004e8b70          var_10c = BaseProperty::GetPropertyName(&var_114);
004e8b74          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e8b82          BaseProperty::SetPropertyName(&var_114, 0xc5);
004e8b82          
004e8b8b          if (var_110_1 != 0)
004e8b8b          {
004e8b91              BaseProperty::CheckCopyOnWrite(&var_114);
004e8ba4              *(uint32_t*)(*(uint32_t*)var_110_1 + 0xc4)(&var_90);
004e8b8b          }
004e8b8b          
004e8bb3          var_10c = BaseProperty::GetPropertyName(&var_114);
004e8bc5          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e8bcf          uint32_t eax_8 = DialogFactory::MakeDialogInCurrentUI(&var_108);
004e8bd7          this->m_uiRandomizeWarningContext = eax_8;
004e8bdf          int32_t* eax_9 = var_114;
004e8bdf          
004e8be3          if (eax_8 != 0)
004e8be3          {
004e8c49              if (eax_9 != 0)
004e8c49              {
004e8c53                  int32_t esi_6 = (eax_9[1] - 1);
004e8c50                  eax_9[1] = esi_6;
004e8c50                  
004e8c5a                  if (esi_6 == 0)
004e8c60                      **(uint32_t**)eax_9(1);
004e8c60                  
004e8c62                  var_114 = nullptr;
004e8c49              }
004e8c49              
004e8c6c              if (var_110_1 != 0)
004e8c6c              {
004e8c76                  int32_t esi_8 = (var_110_1[1] - 1);
004e8c73                  var_110_1[1] = esi_8;
004e8c73                  
004e8c7d                  if (esi_8 == 0)
004e8c83                      **(uint32_t**)var_110_1(1);
004e8c83                  
004e8c85                  int32_t var_110_3 = 0;
004e8c6c              }
004e8c6c              
004e8c8d              PropertyCollection::~PropertyCollection(&var_108);
004e8c99              StringInfo::~StringInfo(&var_90);
004e8c9f              int32_t eax_18;
004e8c9f              eax_18 = 1;
004e8ca8              return 1;
004e8be3          }
004e8be3          
004e8be7          if (eax_9 != 0)
004e8be7          {
004e8bf1              int32_t esi_2 = (eax_9[1] - 1);
004e8bee              eax_9[1] = esi_2;
004e8bee              
004e8bf8              if (esi_2 == 0)
004e8bfe                  **(uint32_t**)eax_9(1);
004e8bfe              
004e8c00              var_114 = nullptr;
004e8be7          }
004e8be7          
004e8c0a          if (var_110_1 != 0)
004e8c0a          {
004e8c14              int32_t esi_4 = (var_110_1[1] - 1);
004e8c11              var_110_1[1] = esi_4;
004e8c11              
004e8c1b              if (esi_4 == 0)
004e8c21                  **(uint32_t**)var_110_1(1);
004e8c21              
004e8c23              int32_t var_110_2 = 0;
004e8c0a          }
004e8c0a          
004e8c2b          PropertyCollection::~PropertyCollection(&var_108);
004e8c37          StringInfo::~StringInfo(&var_90);
004e8aa4      }
004e8aa4      
004e8c3d      uint32_t eax;
004e8c3d      eax = 0;
004e8c46      return 0;
004e8a90  }

004e8ca9                             90 90 90 90 90 90 90                                                           .......

004e8cb0  uint8_t __thiscall gmCharGenMainUI::MakeErrorMessageDialog(class gmCharGenMainUI* this, class StringInfo const* arg2)

004e8cb0  {
004e8cc4      if (this->m_uiErrorMessageContext != 0)
004e8cc4      {
004e8cc7          uint32_t eax;
004e8cc7          eax = 0;
004e8cd0          return 0;
004e8cc4      }
004e8cc4      
004e8cd7      void var_78;
004e8cd7      PropertyCollection::PropertyCollection(&var_78);
004e8ce5      int32_t* var_84 = nullptr;
004e8ce9      int32_t* var_80 = nullptr;
004e8ced      BaseProperty::SetPropertyName(&var_84, 0x8e);
004e8ced      
004e8cf6      if (var_80 != 0)
004e8cf6      {
004e8cfc          BaseProperty::CheckCopyOnWrite(&var_84);
004e8d09          *(uint32_t*)(*(uint32_t*)var_80 + 0xac)(3);
004e8cf6      }
004e8cf6      
004e8d26      uint32_t var_7c = BaseProperty::GetPropertyName(&var_84);
004e8d2a      void var_74;
004e8d2a      HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004e8d38      BaseProperty::SetPropertyName(&var_84, 0xac);
004e8d38      
004e8d41      if (var_80 != 0)
004e8d41      {
004e8d47          BaseProperty::CheckCopyOnWrite(&var_84);
004e8d54          *(uint32_t*)(*(uint32_t*)var_80 + 0x74)(1);
004e8d41      }
004e8d41      
004e8d6e      var_7c = BaseProperty::GetPropertyName(&var_84);
004e8d72      HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004e8d80      BaseProperty::SetPropertyName(&var_84, 0xc5);
004e8d80      
004e8d89      if (var_80 != 0)
004e8d89      {
004e8d8f          BaseProperty::CheckCopyOnWrite(&var_84);
004e8da2          *(uint32_t*)(*(uint32_t*)var_80 + 0xc4)(arg2);
004e8d89      }
004e8d89      
004e8db1      var_7c = BaseProperty::GetPropertyName(&var_84);
004e8dc3      HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004e8dd3      this->m_uiErrorMessageContext = DialogFactory::MakeDialog(this, &var_78);
004e8dd9      int32_t* eax_8 = var_84;
004e8dd9      
004e8de2      if (eax_8 != 0)
004e8de2      {
004e8dec          int32_t esi_2 = (eax_8[1] - 1);
004e8de9          eax_8[1] = esi_2;
004e8de9          
004e8df3          if (esi_2 == 0)
004e8df9              **(uint32_t**)eax_8(1);
004e8df9          
004e8dfb          var_84 = nullptr;
004e8de2      }
004e8de2      
004e8e05      if (var_80 != 0)
004e8e05      {
004e8e0f          int32_t esi_4 = (var_80[1] - 1);
004e8e0c          var_80[1] = esi_4;
004e8e0c          
004e8e16          if (esi_4 == 0)
004e8e1c              **(uint32_t**)var_80(1);
004e8e1c          
004e8e1e          int32_t var_80_1 = 0;
004e8e05      }
004e8e05      
004e8e26      PropertyCollection::~PropertyCollection(&var_78);
004e8e2c      int32_t eax_13;
004e8e2c      eax_13 = 1;
004e8e35      return 1;
004e8cb0  }

004e8e38                                                                          90 90 90 90 90 90 90 90                          ........

004e8e40  uint8_t __fastcall gmCharGenMainUI::MakeToDWarningDialog(class gmCharGenMainUI* this)

004e8e40  {
004e8e54      if (this->m_uiToDRequiredMessage != 0)
004e8e54      {
004e8e57          uint32_t eax;
004e8e57          eax = 0;
004e8e60          return 0;
004e8e54      }
004e8e54      
004e8e68      void var_90;
004e8e68      StringInfo::StringInfo(&var_90);
004e8e87      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_ToDRequiredWarning"), 0x10000002);
004e8e90      void var_108;
004e8e90      PropertyCollection::PropertyCollection(&var_108);
004e8e9e      int32_t* var_114 = nullptr;
004e8ea2      int32_t* var_110 = nullptr;
004e8ea6      BaseProperty::SetPropertyName(&var_114, 0x8e);
004e8ea6      
004e8eaf      if (var_110 != 0)
004e8eaf      {
004e8eb5          BaseProperty::CheckCopyOnWrite(&var_114);
004e8ec2          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(3);
004e8eaf      }
004e8eaf      
004e8edf      uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004e8ee3      void var_104;
004e8ee3      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e8ef1      BaseProperty::SetPropertyName(&var_114, 0xac);
004e8ef1      
004e8efa      if (var_110 != 0)
004e8efa      {
004e8f00          BaseProperty::CheckCopyOnWrite(&var_114);
004e8f0d          *(uint32_t*)(*(uint32_t*)var_110 + 0x74)(1);
004e8efa      }
004e8efa      
004e8f27      var_10c = BaseProperty::GetPropertyName(&var_114);
004e8f2b      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e8f39      BaseProperty::SetPropertyName(&var_114, 0xc5);
004e8f39      
004e8f42      if (var_110 != 0)
004e8f42      {
004e8f48          BaseProperty::CheckCopyOnWrite(&var_114);
004e8f5b          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
004e8f42      }
004e8f42      
004e8f6a      var_10c = BaseProperty::GetPropertyName(&var_114);
004e8f7c      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004e8f8c      this->m_uiToDRequiredMessage = DialogFactory::MakeDialog(this, &var_108);
004e8f92      int32_t* eax_9 = var_114;
004e8f92      
004e8f9b      if (eax_9 != 0)
004e8f9b      {
004e8fa5          int32_t esi_2 = (eax_9[1] - 1);
004e8fa2          eax_9[1] = esi_2;
004e8fa2          
004e8fac          if (esi_2 == 0)
004e8fb2              **(uint32_t**)eax_9(1);
004e8fb2          
004e8fb4          var_114 = nullptr;
004e8f9b      }
004e8f9b      
004e8fbe      if (var_110 != 0)
004e8fbe      {
004e8fc8          int32_t esi_4 = (var_110[1] - 1);
004e8fc5          var_110[1] = esi_4;
004e8fc5          
004e8fcf          if (esi_4 == 0)
004e8fd5              **(uint32_t**)var_110(1);
004e8fd5          
004e8fd7          int32_t var_110_1 = 0;
004e8fbe      }
004e8fbe      
004e8fdf      PropertyCollection::~PropertyCollection(&var_108);
004e8feb      StringInfo::~StringInfo(&var_90);
004e8ff1      int32_t eax_14;
004e8ff1      eax_14 = 1;
004e8ffa      return 1;
004e8e40  }

004e8ffb                                                                                   90 90 90 90 90                             .....

004e9000  void __thiscall gmCharGenMainUI::ListenToGlobalMessage(class gmCharGenMainUI* this, uint32_t arg2, int32_t arg3)

004e9000  {
004e9005      if (arg2 == 1)
004e9005      {
004e900e          if (arg3 == 0x27)
004e9027              gmCharGenMainUI::DoExit(this);
004e900e          else if (arg3 == 0x7b)
004e901c              KeyStone::OpenHelp(0, 0x10000001);
004e9005      }
004e9000  }

004e902f                                               90                                                                 .

004e9030  void __thiscall gmCharGenMainUI::RecvNotice_CharGenVerificationResponse(class gmCharGenMainUI* this, enum CG_VERIFICATION_RESPONSE arg2)

004e9030  {
004e9041      char const* const var_9c;
004e9041      class StringInfo* var_98_4;
004e9041      void var_90;
004e9041      
004e9041      if ((arg2 - 1) > 6)
004e9041      {
004e9100      label_4e9100:
004e9100          DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_firstInterestingBucket);
004e910c          StringInfo::StringInfo(&var_90);
004e9111          int32_t var_98_7 = 0x10000002;
004e9116          var_9c = "ID_Character_Err_NameDBDown";
004e9128      label_4e9128:
004e9128          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash(var_9c), 0x10000002);
004e9131          var_98_4 = &var_90;
004e9131          goto label_4e9138;
004e9041      }
004e9041      
004e9047      switch (arg2)
004e9047      {
004e9052          case CG_VERIFICATION_RESPONSE_OK:
004e9052          {
004e9052              DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_firstInterestingBucket);
004e905a              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0x16] = 1;
004e9065              return;
004e9052              break;
004e9052          }
004e9047          case CG_VERIFICATION_RESPONSE_PENDING:
004e9047          case CG_VERIFICATION_RESPONSE_CORRUPT:
004e9047          case CG_VERIFICATION_RESPONSE_DATABASE_DOWN:
004e9047          {
004e9047              goto label_4e9100;
004e9047          }
004e906c          case CG_VERIFICATION_RESPONSE_NAME_IN_USE:
004e906c          {
004e906c              DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_firstInterestingBucket);
004e9078              StringInfo::StringInfo(&var_90);
004e907d              int32_t var_98_2 = 0x10000002;
004e9082              var_9c = "ID_Character_Err_NameReserved";
004e9087              goto label_4e9128;
004e906c          }
004e9090          case CG_VERIFICATION_RESPONSE_NAME_BANNED:
004e9090          {
004e9090              DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_firstInterestingBucket);
004e909c              StringInfo::StringInfo(&var_90);
004e90b8              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_Character_Err_NameBanned"), 0x10000002);
004e90c1              var_98_4 = &var_90;
004e9138          label_4e9138:
004e9138              gmCharGenMainUI::MakeErrorMessageDialog(((char*)this - 0x98), var_98_4);
004e9141              StringInfo::~StringInfo(&var_90);
004e914d              return;
004e9090              break;
004e9090          }
004e90c8          case CG_VERIFICATION_RESPONSE_ADMIN_PRIVILEGE_DENIED:
004e90c8          {
004e90c8              DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_firstInterestingBucket);
004e90d4              StringInfo::StringInfo(&var_90);
004e90f0              StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_Character_Err_NameAdminDenied"), 0x10000002);
004e90f9              var_98_4 = &var_90;
004e90fa              goto label_4e9138;
004e90c8          }
004e9047      }
004e9030  }

004e9150  uint32_t jump_table_4e9150[0x7] = 
004e9150  {
004e9150      [0x0] =  0x004e904e
004e9154      [0x1] =  0x004e90fc
004e9158      [0x2] =  0x004e9068
004e915c      [0x3] =  0x004e908c
004e9160      [0x4] =  0x004e90fc
004e9164      [0x5] =  0x004e90fc
004e9168      [0x6] =  0x004e90c4
004e916c  }

004e916c                                      90 90 90 90                                                              ....

004e9170  uint8_t __thiscall gmCharGenMainUI::DoFinish(class gmCharGenMainUI* this, uint8_t arg2)

004e9170  {
004e9182      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004e918f      char (* createAsAdmin)[0x21] = &eax->name;
004e9199      char (* createAsAdmin_1)[0x21];
004e9199      createAsAdmin = PStringBase<char>::PStringBase<char>(&createAsAdmin_1, createAsAdmin);
004e91a1      PStringBase<char>::PStringBase<char>(&createAsAdmin, &data_7c2248);
004e91ae      PStringBase<char>::trim(&createAsAdmin_1, 1, 1, createAsAdmin);
004e91b7      createAsAdmin = createAsAdmin_1;
004e91ba      CharGenState::SetName(eax, createAsAdmin);
004e91ba      
004e91dd      if ((this->m_pSummaryPage->m_bNameEntered == 0 || *(uint32_t*)((char*)createAsAdmin_1 - 4) == 1))
004e91dd      {
004e929a          void var_90;
004e929a          StringInfo::StringInfo(&var_90);
004e929f          createAsAdmin = 0x10000002;
004e92b9          StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharGen_NoNameWarning"), createAsAdmin);
004e92c2          void var_108;
004e92c2          PropertyCollection::PropertyCollection(&var_108);
004e92c7          createAsAdmin = 0x8e;
004e92d0          int32_t* var_118 = nullptr;
004e92d4          int32_t* var_114_1 = nullptr;
004e92d8          BaseProperty::SetPropertyName(&var_118, createAsAdmin);
004e92d8          
004e92e1          if (var_114_1 != 0)
004e92e1          {
004e92e7              BaseProperty::CheckCopyOnWrite(&var_118);
004e92f0              int32_t eax_11 = *(uint32_t*)var_114_1;
004e92f2              createAsAdmin = 3;
004e92f4              *(uint32_t*)(eax_11 + 0xac)(createAsAdmin);
004e92e1          }
004e92e1          
004e92fe          uint32_t eax_12 = BaseProperty::GetPropertyName(&var_118);
004e9307          createAsAdmin = &var_118;
004e930c          uint32_t var_10c;
004e930c          uint32_t* var_130_4 = &var_10c;
004e9311          var_10c = eax_12;
004e9315          void var_104;
004e9315          HashTable<unsigned long,BaseProperty,1>::add(&var_104, var_130_4, createAsAdmin);
004e931a          createAsAdmin = 0xac;
004e9323          BaseProperty::SetPropertyName(&var_118, createAsAdmin);
004e9323          
004e932c          if (var_114_1 != 0)
004e932c          {
004e9332              BaseProperty::CheckCopyOnWrite(&var_118);
004e933b              int32_t eax_13 = *(uint32_t*)var_114_1;
004e933d              createAsAdmin = 1;
004e933f              *(uint32_t*)(eax_13 + 0x74)(createAsAdmin);
004e932c          }
004e932c          
004e9346          uint32_t eax_14 = BaseProperty::GetPropertyName(&var_118);
004e934f          createAsAdmin = &var_118;
004e9354          uint32_t* var_130_5 = &var_10c;
004e9359          var_10c = eax_14;
004e935d          HashTable<unsigned long,BaseProperty,1>::add(&var_104, var_130_5, createAsAdmin);
004e9362          createAsAdmin = 0xc5;
004e936b          BaseProperty::SetPropertyName(&var_118, createAsAdmin);
004e936b          
004e9374          if (var_114_1 != 0)
004e9374          {
004e937a              BaseProperty::CheckCopyOnWrite(&var_118);
004e9383              int32_t eax_15 = *(uint32_t*)var_114_1;
004e938c              createAsAdmin = &var_90;
004e938d              *(uint32_t*)(eax_15 + 0xc4)(createAsAdmin);
004e9374          }
004e9374          
004e939c          var_10c = BaseProperty::GetPropertyName(&var_118);
004e93a4          createAsAdmin = &var_118;
004e93ae          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, createAsAdmin);
004e93b7          createAsAdmin = &var_108;
004e93b8          DialogFactory::MakeDialogInCurrentUI(createAsAdmin);
004e93bd          int32_t* eax_17 = var_118;
004e93bd          
004e93c6          if (eax_17 != 0)
004e93c6          {
004e93d0              int32_t esi_5 = (eax_17[1] - 1);
004e93cd              eax_17[1] = esi_5;
004e93cd              
004e93d7              if (esi_5 == 0)
004e93d7              {
004e93d9                  int32_t eax_19 = *(uint32_t*)eax_17;
004e93db                  createAsAdmin = 1;
004e93dd                  *(uint32_t*)eax_19(createAsAdmin);
004e93d7              }
004e93d7              
004e93df              var_118 = nullptr;
004e93c6          }
004e93c6          
004e93e9          if (var_114_1 != 0)
004e93e9          {
004e93f3              int32_t esi_7 = (var_114_1[1] - 1);
004e93f0              var_114_1[1] = esi_7;
004e93f0              
004e93fa              if (esi_7 == 0)
004e93fa              {
004e93fc                  int32_t edx_5 = *(uint32_t*)var_114_1;
004e93fe                  createAsAdmin = 1;
004e9400                  *(uint32_t*)edx_5(createAsAdmin);
004e93fa              }
004e93fa              
004e9402              int32_t var_114_2 = 0;
004e93e9          }
004e93e9          
004e940a          PropertyCollection::~PropertyCollection(&var_108);
004e9416          StringInfo::~StringInfo(&var_90);
004e91dd      }
004e91dd      else
004e91dd      {
004e91f2          if ((arg2 != 0 && eax->remainingAtrbCredits > 0))
004e91f2          {
004e91f6              gmCharGenMainUI::MakeCreditWarningDialog(this);
004e91ff              PStringBase<unsigned short>::~PStringBase<unsigned short>(&createAsAdmin_1);
004e9204              int32_t eax_4;
004e9204              eax_4 = 0;
004e9210              return 0;
004e91f2          }
004e91f2          
004e921c          if (CharGenState::GetVerificationState(eax) == UNDEF_CG_VERIFICATION_RESPONSE)
004e921c          {
004e9222              createAsAdmin = 2;
004e9226              CharGenState::SetVerificationState(eax, createAsAdmin);
004e9238              class ACCharGenResult* eax_7 = CharGenState::GetCharGenResult(CPlayerSystem::GetCharGenState(this->m_pPlayerSystem));
004e9243              class CPlayerSystem* m_pPlayerSystem = this->m_pPlayerSystem;
004e9249              createAsAdmin = eax->createAsAdmin;
004e9255              void var_13c;
004e9255              accountID::accountID(&var_13c, &m_pPlayerSystem->account_);
004e925b              Proto_UI::SendCharGenResult(eax_7, var_13c, createAsAdmin);
004e9264              void* esi_3 = &*(uint33_t*)createAsAdmin_1[0xffffffec];
004e926d              createAsAdmin = ((char*)esi_3 + 4);
004e926d              
004e927a              if ((InterlockedDecrement(createAsAdmin) == 0 && esi_3 != 0))
004e927a              {
004e927c                  int32_t edx_2 = *(uint32_t*)esi_3;
004e927e                  createAsAdmin = 1;
004e9282                  *(uint32_t*)edx_2(createAsAdmin);
004e927a              }
004e927a              
004e9284              int32_t eax_9;
004e9284              eax_9 = 1;
004e9290              return 1;
004e921c          }
004e91dd      }
004e91dd      
004e941f      void* esi_9 = &*(uint33_t*)createAsAdmin_1[0xffffffec];
004e9425      createAsAdmin = ((char*)esi_9 + 4);
004e9425      
004e9432      if ((InterlockedDecrement(createAsAdmin) == 0 && esi_9 != 0))
004e9432      {
004e9434          int32_t edx_6 = *(uint32_t*)esi_9;
004e9438          createAsAdmin = 1;
004e943a          *(uint32_t*)edx_6(createAsAdmin);
004e9432      }
004e9432      
004e943f      int32_t eax_23;
004e943f      eax_23 = 0;
004e9448      return 0;
004e9170  }

004e944b                                   90 90 90 90 90                                                             .....

004e9450  enum UIElementMessageListenResult __thiscall gmCharGenMainUI::ListenToElementMessage(class gmCharGenMainUI* this, struct UIElementMessageInfo const* arg2)

004e9450  {
004e9456      uint32_t idElement = arg2->idElement;
004e9456      
004e945f      if (idElement <= 0x100003f1)
004e945f      {
004e9465          if (idElement == 0x100003f1)
004e9465          {
004e95ad              if (arg2->idMessage != 1)
004e96ec                  return UIFramework::ListenToElementMessage(this, arg2);
004e96ec              
004e95b7              gmCharGenMainUI::SetProgressState(this, ECG_SKILLS);
004e95c6              return UIFramework::ListenToElementMessage(this, arg2);
004e9465          }
004e9465          
004e9473          if ((idElement - 0x100003bf) > 0x31)
004e96ec              return UIFramework::ListenToElementMessage(this, arg2);
004e96ec          
004e9473          switch (idElement)
004e9473          {
004e9480              case 0x100003bf:
004e9480              case 0x100003c1:
004e9480              case 0x100003c2:
004e9480              case 0x100003c3:
004e9480              {
004e9480                  goto label_4e9663;
004e9480              }
004e96ec              case 0x100003c0:
004e96ec              case 0x100003c4:
004e96ec              case 0x100003c5:
004e96ec              case 0x100003c9:
004e96ec              case 0x100003cc:
004e96ec              case 0x100003cd:
004e96ec              case 0x100003ce:
004e96ec              case 0x100003cf:
004e96ec              case 0x100003d0:
004e96ec              case 0x100003d1:
004e96ec              case 0x100003d2:
004e96ec              case 0x100003d3:
004e96ec              case 0x100003d4:
004e96ec              case 0x100003d5:
004e96ec              case 0x100003d6:
004e96ec              case 0x100003d7:
004e96ec              case 0x100003d8:
004e96ec              case 0x100003d9:
004e96ec              case 0x100003da:
004e96ec              case 0x100003db:
004e96ec              case 0x100003dc:
004e96ec              case 0x100003dd:
004e96ec              case 0x100003de:
004e96ec              case 0x100003df:
004e96ec              case 0x100003e0:
004e96ec              case 0x100003e1:
004e96ec              case 0x100003e2:
004e96ec              case 0x100003e3:
004e96ec              case 0x100003e4:
004e96ec              case 0x100003e5:
004e96ec              case 0x100003e6:
004e96ec              case 0x100003e7:
004e96ec              case 0x100003e8:
004e96ec              case 0x100003e9:
004e96ec              case 0x100003ea:
004e96ec              case 0x100003eb:
004e96ec              case 0x100003ec:
004e96ec              case 0x100003ed:
004e96ec              case 0x100003ee:
004e96ec              {
004e96ec                  return UIFramework::ListenToElementMessage(this, arg2);
004e96ec                  break;
004e96ec              }
004e94cb              case 0x100003c6:
004e94cb              {
004e94cb                  if (arg2->idMessage != 1)
004e96ec                      return UIFramework::ListenToElementMessage(this, arg2);
004e96ec                  
004e94d1                  enum gmCharGenMainUI::ECGProgress m_eProgressState = this->m_eProgressState;
004e94d1                  
004e94dc                  if (m_eProgressState <= ECG_HERTAGE)
004e94dc                  {
004e9597                      gmCharGenMainUI::DoExit(this);
004e95a6                      return UIFramework::ListenToElementMessage(this, arg2);
004e94dc                  }
004e94dc                  
004e94e4                  gmCharGenMainUI::SetProgressState(this, (m_eProgressState - 1));
004e94f3                  return UIFramework::ListenToElementMessage(this, arg2);
004e94cb                  break;
004e94cb              }
004e94fa              case 0x100003c7:
004e94fa              {
004e94fa                  if (arg2->idMessage == 1)
004e94fa                  {
004e9500                      enum gmCharGenMainUI::ECGProgress m_eProgressState_1 = this->m_eProgressState;
004e9500                      
004e9509                      if (m_eProgressState_1 < ECG_SUMMARY)
004e9513                          gmCharGenMainUI::SetProgressState(this, (m_eProgressState_1 + 1));
004e94fa                  }
004e94fa                  
004e96ec                  return UIFramework::ListenToElementMessage(this, arg2);
004e94fa                  break;
004e94fa              }
004e956f              case 0x100003c8:
004e956f              {
004e956f                  if ((arg2->idMessage != 1 || this->m_eProgressState != ECG_SUMMARY))
004e96ec                      return UIFramework::ListenToElementMessage(this, arg2);
004e96ec                  
004e9579                  gmCharGenMainUI::DoFinish(this, 1);
004e9588                  return UIFramework::ListenToElementMessage(this, arg2);
004e956f                  break;
004e956f              }
004e958f              case 0x100003ca:
004e958f              {
004e958f                  if (arg2->idMessage != 1)
004e96ec                      return UIFramework::ListenToElementMessage(this, arg2);
004e96ec                  
004e9597                  gmCharGenMainUI::DoExit(this);
004e95a6                  return UIFramework::ListenToElementMessage(this, arg2);
004e958f                  break;
004e958f              }
004e9529              case 0x100003cb:
004e9529              {
004e9529                  if (arg2->idMessage != 1)
004e96ec                      return UIFramework::ListenToElementMessage(this, arg2);
004e96ec                  
004e9538                  if (this->m_eProgressState != ECG_SUMMARY)
004e9538                  {
004e954c                      gmCharGenMainUI::DoRandom(this);
004e955b                      return UIFramework::ListenToElementMessage(this, arg2);
004e9538                  }
004e9538                  
004e953a                  gmCharGenMainUI::MakeRandomizeWarningDialog(this);
004e9549                  return UIFramework::ListenToElementMessage(this, arg2);
004e9529                  break;
004e9529              }
004e948b              case 0x100003ef:
004e948b              {
004e948b                  if (arg2->idMessage != 1)
004e96ec                      return UIFramework::ListenToElementMessage(this, arg2);
004e96ec                  
004e9495                  gmCharGenMainUI::SetProgressState(this, ECG_HERTAGE);
004e94a4                  return UIFramework::ListenToElementMessage(this, arg2);
004e948b                  break;
004e948b              }
004e94ab              case 0x100003f0:
004e94ab              {
004e94ab                  if (arg2->idMessage != 1)
004e96ec                      return UIFramework::ListenToElementMessage(this, arg2);
004e96ec                  
004e94b5                  gmCharGenMainUI::SetProgressState(this, ECG_PROFESSION);
004e94c4                  return UIFramework::ListenToElementMessage(this, arg2);
004e94ab                  break;
004e94ab              }
004e9473          }
004e9473          
004e9473          return;
004e945f      }
004e945f      
004e95ce      if (idElement <= 0x100005a9)
004e95ce      {
004e95d4          if (idElement == 0x100005a9)
004e95d4          {
004e9663          label_4e9663:
004e9663              
004e9667              if (arg2->idMessage != 1)
004e96ec                  return UIFramework::ListenToElementMessage(this, arg2);
004e96ec              
004e9673          label_4e9673:
004e9669              this->m_pProfessionButton->vtable->SetVisible(1);
004e9676              this->m_pSkillsButton->vtable->SetVisible(1);
004e9683              this->m_pTownButton->vtable->SetVisible(1);
004e969a              return UIFramework::ListenToElementMessage(this, arg2);
004e95d4          }
004e95d4          
004e95df          if (idElement > 0x100003f4)
004e95df          {
004e9661              if (((idElement < 0x10000590 || idElement > 0x10000591) || arg2->idMessage != 1))
004e96ec                  return UIFramework::ListenToElementMessage(this, arg2);
004e96ec              
004e9656              goto label_4e9673;
004e95df          }
004e95df          
004e95e1          if (idElement == 0x100003f4)
004e95e1          {
004e9635              if (arg2->idMessage == 1)
004e963f                  gmCharGenMainUI::SetProgressState(this, ECG_SUMMARY);
004e95e1          }
004e95e1          else if (idElement == 0x100003f2)
004e95e8          {
004e9615              if (arg2->idMessage == 1)
004e961f                  gmCharGenMainUI::SetProgressState(this, ECG_APPEARANCE);
004e95e8          }
004e95e8          else if ((idElement == 0x100003f3 && arg2->idMessage == 1))
004e95ff              gmCharGenMainUI::SetProgressState(this, ECG_TOWN);
004e95ff          
004e96ec          return UIFramework::ListenToElementMessage(this, arg2);
004e95ce      }
004e95ce      
004e96a5      if ((idElement - 0x100005bf) > 0x29)
004e96ec          return UIFramework::ListenToElementMessage(this, arg2);
004e96ec      
004e96a5      switch (idElement)
004e96a5      {
004e96ae          case 0x100005bf:
004e96ae          case 0x100005c4:
004e96ae          case 0x100005e8:
004e96ae          {
004e96ae              goto label_4e9663;
004e96ae          }
004e96ec          case 0x100005c0:
004e96ec          case 0x100005c1:
004e96ec          case 0x100005c2:
004e96ec          case 0x100005c3:
004e96ec          case 0x100005c5:
004e96ec          case 0x100005c6:
004e96ec          case 0x100005c9:
004e96ec          case 0x100005ca:
004e96ec          case 0x100005cb:
004e96ec          case 0x100005cc:
004e96ec          case 0x100005cd:
004e96ec          case 0x100005ce:
004e96ec          case 0x100005cf:
004e96ec          case 0x100005d0:
004e96ec          case 0x100005d1:
004e96ec          case 0x100005d2:
004e96ec          case 0x100005d3:
004e96ec          case 0x100005d4:
004e96ec          case 0x100005d5:
004e96ec          case 0x100005d6:
004e96ec          case 0x100005d7:
004e96ec          case 0x100005d8:
004e96ec          case 0x100005d9:
004e96ec          case 0x100005da:
004e96ec          case 0x100005db:
004e96ec          case 0x100005dc:
004e96ec          case 0x100005dd:
004e96ec          case 0x100005de:
004e96ec          case 0x100005df:
004e96ec          case 0x100005e0:
004e96ec          case 0x100005e1:
004e96ec          case 0x100005e2:
004e96ec          case 0x100005e3:
004e96ec          case 0x100005e4:
004e96ec          case 0x100005e5:
004e96ec          case 0x100005e6:
004e96ec          case 0x100005e7:
004e96ec          {
004e96ec              return UIFramework::ListenToElementMessage(this, arg2);
004e96ec              break;
004e96ec          }
004e96b9          case 0x100005c7:
004e96b9          case 0x100005c8:
004e96b9          {
004e96b9              if (arg2->idMessage == 1)
004e96b9              {
004e96bb                  this->m_pProfessionButton->vtable->SetVisible(0);
004e96c8                  this->m_pSkillsButton->vtable->SetVisible(0);
004e96d5                  this->m_pTownButton->vtable->SetVisible(0);
004e96b9              }
004e96b9              
004e96ec              return UIFramework::ListenToElementMessage(this, arg2);
004e96b9              break;
004e96b9          }
004e96a5      }
004e9450  }

004e96ef                                               90                                                                 .
004e96f0  uint32_t jump_table_4e96f0[0x9] = 
004e96f0  {
004e96f0      [0x0] =  0x004e9663
004e96f4      [0x1] =  0x004e94c7
004e96f8      [0x2] =  0x004e94f6
004e96fc      [0x3] =  0x004e955e
004e9700      [0x4] =  0x004e958b
004e9704      [0x5] =  0x004e9525
004e9708      [0x6] =  0x004e9487
004e970c      [0x7] =  0x004e94a7
004e9710      [0x8] =  0x004e96e2
004e9714  }
004e9714  uint8_t lookup_table_4e9714[0x32] = 
004e9714  {
004e9714      [0x00] =  0x00
004e9715      [0x01] =  0x08
004e9716      [0x02] =  0x00
004e9717      [0x03] =  0x00
004e9718      [0x04] =  0x00
004e9719      [0x05] =  0x08
004e971a      [0x06] =  0x08
004e971b      [0x07] =  0x01
004e971c      [0x08] =  0x02
004e971d      [0x09] =  0x03
004e971e      [0x0a] =  0x08
004e971f      [0x0b] =  0x04
004e9720      [0x0c] =  0x05
004e9721      [0x0d] =  0x08
004e9722      [0x0e] =  0x08
004e9723      [0x0f] =  0x08
004e9724      [0x10] =  0x08
004e9725      [0x11] =  0x08
004e9726      [0x12] =  0x08
004e9727      [0x13] =  0x08
004e9728      [0x14] =  0x08
004e9729      [0x15] =  0x08
004e972a      [0x16] =  0x08
004e972b      [0x17] =  0x08
004e972c      [0x18] =  0x08
004e972d      [0x19] =  0x08
004e972e      [0x1a] =  0x08
004e972f      [0x1b] =  0x08
004e9730      [0x1c] =  0x08
004e9731      [0x1d] =  0x08
004e9732      [0x1e] =  0x08
004e9733      [0x1f] =  0x08
004e9734      [0x20] =  0x08
004e9735      [0x21] =  0x08
004e9736      [0x22] =  0x08
004e9737      [0x23] =  0x08
004e9738      [0x24] =  0x08
004e9739      [0x25] =  0x08
004e973a      [0x26] =  0x08
004e973b      [0x27] =  0x08
004e973c      [0x28] =  0x08
004e973d      [0x29] =  0x08
004e973e      [0x2a] =  0x08
004e973f      [0x2b] =  0x08
004e9740      [0x2c] =  0x08
004e9741      [0x2d] =  0x08
004e9742      [0x2e] =  0x08
004e9743      [0x2f] =  0x08
004e9744      [0x30] =  0x06
004e9745      [0x31] =  0x07
004e9746  }

004e9746                    8b ff                                                                                ..
004e9748  uint32_t jump_table_4e9748[0x3] = 
004e9748  {
004e9748      [0x0] =  0x004e9663
004e974c      [0x1] =  0x004e96b5
004e9750      [0x2] =  0x004e96e2
004e9754  }
004e9754  uint8_t lookup_table_4e9754[0x2a] = 
004e9754  {
004e9754      [0x00] =  0x00
004e9755      [0x01] =  0x02
004e9756      [0x02] =  0x02
004e9757      [0x03] =  0x02
004e9758      [0x04] =  0x02
004e9759      [0x05] =  0x00
004e975a      [0x06] =  0x02
004e975b      [0x07] =  0x02
004e975c      [0x08] =  0x01
004e975d      [0x09] =  0x01
004e975e      [0x0a] =  0x02
004e975f      [0x0b] =  0x02
004e9760      [0x0c] =  0x02
004e9761      [0x0d] =  0x02
004e9762      [0x0e] =  0x02
004e9763      [0x0f] =  0x02
004e9764      [0x10] =  0x02
004e9765      [0x11] =  0x02
004e9766      [0x12] =  0x02
004e9767      [0x13] =  0x02
004e9768      [0x14] =  0x02
004e9769      [0x15] =  0x02
004e976a      [0x16] =  0x02
004e976b      [0x17] =  0x02
004e976c      [0x18] =  0x02
004e976d      [0x19] =  0x02
004e976e      [0x1a] =  0x02
004e976f      [0x1b] =  0x02
004e9770      [0x1c] =  0x02
004e9771      [0x1d] =  0x02
004e9772      [0x1e] =  0x02
004e9773      [0x1f] =  0x02
004e9774      [0x20] =  0x02
004e9775      [0x21] =  0x02
004e9776      [0x22] =  0x02
004e9777      [0x23] =  0x02
004e9778      [0x24] =  0x02
004e9779      [0x25] =  0x02
004e977a      [0x26] =  0x02
004e977b      [0x27] =  0x02
004e977c      [0x28] =  0x02
004e977d      [0x29] =  0x00
004e977e  }

004e977e                                                                                            90 90                                ..

004e9780  void __thiscall gmCharGenMainUI::RecvNotice_CloseDialog(class gmCharGenMainUI* this, uint32_t arg2, class PropertyCollection const* arg3)

004e9780  {
004e9785      class PropertyCollection* esi = arg3;
004e9790      uint32_t temp1 = (COMBINE(0, 0x8e) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004e9793      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004e9798      int32_t var_14 = 0;
004e979c      int32_t* var_8 = nullptr;
004e97a0      int32_t* var_4 = nullptr;
004e97a0      
004e97ae      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
004e97ae      {
004e97b6          if (*(uint32_t*)i == 0x8e)
004e97b6          {
004e97c3              if (i != 0)
004e97c3              {
004e97cd                  BaseProperty::operator=(&var_8, &i[2]);
004e97cd                  
004e97d8                  if (var_4 != 0)
004e97e1                      *(uint32_t*)(*(uint32_t*)var_4 + 0xa8)(&var_14);
004e97c3              }
004e97c3              
004e97c3              break;
004e97b6          }
004e97ae      }
004e97ae      
004e97e7      int32_t eax_3 = var_14;
004e97e7      
004e97ec      if (eax_3 == 1)
004e97ec      {
004e982d          uint32_t temp1_1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004e9830          class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004e9833          arg3 = 0;
004e9837          int32_t* var_10 = nullptr;
004e983b          int32_t* var_c_1 = nullptr;
004e983b          
004e9846          for (int32_t* i_1 = m_buckets_1[temp1_1]; i_1 != 0; i_1 = i_1[1])
004e9846          {
004e984e              if (*(uint32_t*)i_1 == 0x92)
004e984e              {
004e985b                  if (i_1 != 0)
004e985b                  {
004e9865                      BaseProperty::operator=(&var_10, &i_1[2]);
004e9865                      
004e9870                      if (var_c_1 != 0)
004e9879                          *(uint32_t*)(*(uint32_t*)var_c_1 + 0x70)(&arg3);
004e985b                  }
004e985b                  
004e985b                  break;
004e984e              }
004e9846          }
004e9846          
004e9883          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_buckets == arg2)
004e9883          {
004e9889              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_buckets = nullptr;
004e9889              
004e9895              if (arg3 != 0)
004e989c                  UIFramework::QueueUIMode(((char*)this - 0x98), 0x1000000a);
004e9883          }
004e9883          else if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_numElements == arg2)
004e98a6          {
004e98ac              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_numElements = 0;
004e98ac              
004e98b8              if (arg3 != 0)
004e98bb                  gmCharGenMainUI::DoFinish(((char*)this - 0x98), 0);
004e98a6          }
004e98a6          else if (this->m_tsSerialNumberLastListenedTo.m_timestamp == arg2)
004e98d2              gmCharGenMainUI::CloseRandomizeWarningDialog(((char*)this - 0x98), ((int8_t)arg3));
004e98d2          
004e98d7          int32_t* eax_11 = var_10;
004e98d7          
004e98dd          if (eax_11 != 0)
004e98dd          {
004e98e7              int32_t esi_2 = (eax_11[1] - 1);
004e98e4              eax_11[1] = esi_2;
004e98e4              
004e98ee              if (esi_2 == 0)
004e98f4                  **(uint32_t**)eax_11(1);
004e98f4              
004e98f6              var_10 = nullptr;
004e98dd          }
004e98dd          
004e9900          if (var_c_1 != 0)
004e9900          {
004e990a              int32_t esi_4 = (var_c_1[1] - 1);
004e9907              var_c_1[1] = esi_4;
004e9907              
004e9911              if (esi_4 == 0)
004e9917                  **(uint32_t**)var_c_1(1);
004e9900          }
004e97ec      }
004e97ec      else if (eax_3 == 3)
004e97f1      {
004e97fe          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_firstInterestingBucket == arg2)
004e9800              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004e97fe          else if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_numBuckets == arg2)
004e980d              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_numBuckets = 0;
004e980b          else if (this->m_bCanForceHide*(int32_t*)((char*)this + 0x7c) == arg2)
004e9818          {
004e981e              this->m_bCanForceHide = 0;
004e981e              this->m_bIsForcedHidden = 0;
004e981e              this->m_shown = 0;
004e9818          }
004e97f1      }
004e97f1      
004e9919      int32_t* eax_16 = var_8;
004e9919      
004e991f      if (eax_16 != 0)
004e991f      {
004e9929          int32_t esi_6 = (eax_16[1] - 1);
004e9926          eax_16[1] = esi_6;
004e9926          
004e9930          if (esi_6 == 0)
004e9936              **(uint32_t**)eax_16(1);
004e9936          
004e9938          var_8 = nullptr;
004e991f      }
004e991f      
004e9942      if (var_4 != 0)
004e9942      {
004e994c          int32_t esi_8 = (var_4[1] - 1);
004e9949          var_4[1] = esi_8;
004e9949          
004e9953          if (esi_8 == 0)
004e9959              **(uint32_t**)var_4(1);
004e9942      }
004e9780  }

004e9964              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004e9970  void __fastcall gmDisconnectedUI::~gmDisconnectedUI(class gmDisconnectedUI* this)

004e9970  {
004e9981      this->vtable = 0x7c22b8;
004e9976      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e998d      UIListener::UnRegisterForElementMessage(this, 0x10000418, 1);
004e999b      UIMainFramework::RemoveRootElement(this, &this->m_disconnectedField);
004e99a0      this->m_errorText = nullptr;
004e9976      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e99b2      NoticeHandler::~NoticeHandler(&this->vtable);
004e99bb      /* tailcall */
004e99bb      return UIMainFramework::~UIMainFramework(this);
004e9970  }


004e99c0  enum UIElementMessageListenResult __thiscall gmDisconnectedUI::ListenToElementMessage(class gmDisconnectedUI* this, struct UIElementMessageInfo const* arg2)

004e99c0  {
004e99d4      if ((arg2->idElement == 0x10000418 && arg2->idMessage == 1))
004e99db          UIFramework::QueueUIMode(this, 0x10000009);
004e99db      
004e99ea      return UIFramework::ListenToElementMessage(this, arg2);
004e99c0  }

004e99ed                                         90 90 90                                                               ...

004e99f0  void __thiscall gmDisconnectedUI::SetErrorMsg(class gmDisconnectedUI* this, class StringInfo const* arg2)

004e99f0  {
004e99f0      class UIElement_Text* m_errorText = this->m_errorText;
004e99f0      
004e99f8      if (m_errorText == 0)
004e99ff          return;
004e99ff      
004e99fa      /* tailcall */
004e99fa      return UIElement_Text::SetStringInfo(m_errorText, arg2);
004e99f0  }

004e9a02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004e9a10  void __fastcall gmDisconnectedUI::gmDisconnectedUI(class gmDisconnectedUI* this)

004e9a10  {
004e9a13      UIMainFramework::UIMainFramework(this);
004e9a18      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e9a2e      this->vtable = 0x7c22b8;
004e9a34      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e9a3e      this->m_disconnectedField = nullptr;
004e9a48      this->m_errorText = nullptr;
004e9a52      class UIElement* eax = UIMainFramework::CreateAndAddRootElement(this, 0x10000003, 0x10000416);
004e9a59      this->m_disconnectedField = eax;
004e9a59      
004e9a5f      if (eax != 0)
004e9a5f      {
004e9a68          class UIElement* eax_1 = UIElement::GetChildRecursive(eax, 0x10000417);
004e9a68          
004e9a6f          if (eax_1 != 0)
004e9a6f          {
004e9a7d              this->m_errorText = eax_1->vtable->DynamicCast(0xc);
004e9a86              return;
004e9a6f          }
004e9a6f          
004e9a89          this->m_errorText = nullptr;
004e9a5f      }
004e9a10  }

004e9a93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e9aa0  void* __thiscall gmDisconnectedUI::`scalar deleting destructor'(class gmDisconnectedUI* this, uint32_t arg2)

004e9aa0  {
004e9aa3      gmDisconnectedUI::~gmDisconnectedUI(this);
004e9aa3      
004e9aad      if ((arg2 & 1) != 0)
004e9ab0          operator delete(this);
004e9ab0      
004e9abb      return this;
004e9aa0  }

004e9abe                                                                                            90 90                                ..

004e9ac0  class UIMainFramework* gmDisconnectedUI::Create()

004e9ac0  {
004e9ac5      void* eax = operator new(0xa4);
004e9ac5      
004e9acf      if (eax == 0)
004e9ada          return 0;
004e9ada      
004e9ad3      /* tailcall */
004e9ad3      return gmDisconnectedUI::gmDisconnectedUI(eax);
004e9ac0  }

004e9adb                                                                                   90 90 90 90 90                             .....

004e9ae0  void gmDisconnectedUI::Register(uint32_t arg1)

004e9ae0  {
004e9aea      UIFlow::RegisterFrameworkClass(arg1, gmDisconnectedUI::Create);
004e9ae0  }

004e9af3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e9b00  void __fastcall gmEpilogueUI::gmEpilogueUI(class gmEpilogueUI* this)

004e9b00  {
004e9b03      UIMainFramework::UIMainFramework(this);
004e9b08      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e9b1e      this->vtable = 0x7c2408;
004e9b24      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e9b2e      this->m_epilogueField = nullptr;
004e9b38      UIListener::RegisterForElementMessage(this, 0x10000399, 0x10000002);
004e9b52      this->m_epilogueField = UIMainFramework::CreateAndAddRootElement(this, 0x10000037, 0x10000399);
004e9b58      UIListener::RegisterForGlobalMessage(this, 1);
004e9b5d      class CPlayerSystem* eax_1 = CPlayerSystem::GetPlayerSystem();
004e9b5d      
004e9b74      if ((eax_1 != 0 && *(int32_t*)((char*)SharedNet::s_pNet + 0x8a6e) != 0))
004e9b7a          CPlayerSystem::LogOffCharacter(eax_1, 1);
004e9b00  }

004e9b83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e9b90  class UIMainFramework* gmEpilogueUI::Create()

004e9b90  {
004e9b95      void* eax = operator new(0xa0);
004e9b95      
004e9b9f      if (eax == 0)
004e9baa          return 0;
004e9baa      
004e9ba3      /* tailcall */
004e9ba3      return gmEpilogueUI::gmEpilogueUI(eax);
004e9b90  }

004e9bab                                   90 90 90 90 90                                                             .....

004e9bb0  void* __thiscall gmEpilogueUI::`scalar deleting destructor'(class gmEpilogueUI* this, uint32_t arg2)

004e9bb0  {
004e9bbc      this->vtable = 0x7c2408;
004e9bb4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e9bc8      UIListener::UnRegisterForGlobalMessage(this, 1);
004e9bd6      UIMainFramework::RemoveRootElement(this, &this->m_epilogueField);
004e9bb4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004e9be3      NoticeHandler::~NoticeHandler(&this->vtable);
004e9bea      this->vtable = 0x7c1ca0;
004e9bf0      UIMainFramework::~UIMainFramework(this);
004e9bf0      
004e9bfa      if ((arg2 & 1) != 0)
004e9bfd          operator delete(this);
004e9bfd      
004e9c09      return this;
004e9bb0  }

004e9c0c                                      90 90 90 90                                                              ....

004e9c10  void gmEpilogueUI::Register(uint32_t arg1)

004e9c10  {
004e9c1a      UIFlow::RegisterFrameworkClass(arg1, gmEpilogueUI::Create);
004e9c10  }

004e9c23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004e9c30  void __stdcall gmEpilogueUI::ListenToGlobalMessage(class gmEpilogueUI* this @ ecx, uint32_t arg2, int32_t arg3)

004e9c30  {
004e9c35      if (arg2 == 1)
004e9c37          Device::Done();
004e9c30  }

004e9c3f                                                                                               90                                 .

004e9c40  enum UIElementMessageListenResult __stdcall gmEpilogueUI::ListenToElementMessage(class gmEpilogueUI* this @ ecx, uint32_t arg2, class UIElement* arg3, uint32_t arg4, int32_t arg5)

004e9c40  {
004e9c48      if (arg4 == 0x10000002)
004e9c4a          Device::Done();
004e9c4a      
004e9c51      return 0;
004e9c40  }

004e9c54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004e9c60  void __thiscall gmGamePlayUI::Show(class gmGamePlayUI* this, uint8_t arg2)

004e9c60  {
004e9c6f      if (arg2 != this->vtable->Shown())
004e9c6f      {
004e9c71          this->m_bCurrentlyTogglingUIVisibility = 1;
004e9c78          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004e9c78          
004e9c80          if (UIElementManager::s_pInstance_1 != 0)
004e9c80          {
004e9c83              UIElementManager::SetVisible(UIElementManager::s_pInstance_1, arg2);
004e9c83              
004e9c90              if (this->m_waitContext == 0)
004e9c90              {
004e9c92                  uint32_t eax_2;
004e9c92                  eax_2 = this->m_endingSession;
004e9c92                  
004e9c9a                  if (eax_2 == 0)
004e9c9a                  {
004e9c9f                      UIFramework::Show(this, arg2);
004e9ca4                      this->m_bCurrentlyTogglingUIVisibility = 0;
004e9cad                      return;
004e9c9a                  }
004e9c90              }
004e9c90              
004e9cb4              UIFramework::Show(this, 1);
004e9cb9              this->m_bCurrentlyTogglingUIVisibility = 0;
004e9c80          }
004e9c6f      }
004e9c60  }

004e9cc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004e9cd0  void __fastcall gmGamePlayUI::Update(class gmGamePlayUI* this)

004e9cd0  {
004e9cd5      UIFramework::QueueUIMode(this, 0x1000000a);
004e9cd0  }

004e9cdb                                                                                   90 90 90 90 90                             .....

004e9ce0  enum UIElementMessageListenResult __thiscall gmGamePlayUI::ListenToElementMessage(class gmGamePlayUI* this, struct UIElementMessageInfo const* arg2)

004e9ce0  {
004e9ce5      uint32_t idMessage = arg2->idMessage;
004e9ce5      
004e9cee      if (idMessage == 0x18)
004e9cee      {
004e9d22          uint32_t idElement = arg2->idElement;
004e9d22          
004e9d29          if (idElement == 0x10000505)
004e9d4c              CM_UI::SendNotice_SetPanelVisibility(idElement, (((int8_t)(arg2->pElement->__bitfield164 >> 1)) & 1));
004e9d29          else if ((idElement > 0x1000050d && idElement <= 0x10000510))
004e9d4c              CM_UI::SendNotice_SetPanelVisibility(idElement, (((int8_t)(arg2->pElement->__bitfield164 >> 1)) & 1));
004e9cee      }
004e9cee      else if (idMessage == 0x1c)
004e9cf3      {
004e9cf5          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
004e9cf5          
004e9cfc          if (UIElementManager::s_pInstance_1 != 0)
004e9cfc          {
004e9cfe              class UIElement* m_focusElement = UIElementManager::s_pInstance_1->m_focusElement;
004e9cfe              
004e9d0b              if ((m_focusElement != 0 && m_focusElement != arg2->pElement))
004e9d0d                  m_focusElement->vtable->RelinquishFocus();
004e9cfc          }
004e9cf3      }
004e9cf3      
004e9d5e      return UIFramework::ListenToElementMessage(this, arg2);
004e9ce0  }

004e9d61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004e9d70  void __thiscall gmGamePlayUI::RecvNotice_AbortConfirmationRequest(class gmGamePlayUI* this, int32_t arg2, uint32_t arg3)

004e9d70  {
004e9d83      if ((arg2 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] && arg3 == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7]))
004e9d83      {
004e9d89          DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5]);
004e9d93          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5] = nullptr;
004e9d96          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = nullptr;
004e9d99          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = nullptr;
004e9d83      }
004e9d70  }


004e9da0  void __thiscall gmGamePlayUI::RecvNotice_PlayerOptionChanged(class gmGamePlayUI* this, enum PlayerOption arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004e9da0  {
004e9da8      if (arg2 != SideBySideVitals_PlayerOption)
004e9ded          return;
004e9ded      
004e9db2      uint8_t eax_1 = PlayerModule::SideBySideVitals(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
004e9dbc      class UIElement* m_hashKey = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1]->m_hashKey;
004e9dbc      
004e9dbe      if (eax_1 != 0)
004e9dbe      {
004e9dc2          m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](0);
004e9dcb          __return_addr = 1;
004e9dd3          /* jump -> this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2]->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] */
004e9dbe      }
004e9dbe      
004e9dd8      m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](1);
004e9de1      __return_addr = nullptr;
004e9de9      /* jump -> this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2]->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3] */
004e9da0  }


004e9df0  void __thiscall gmGamePlayUI::HandleKeyPress(class gmGamePlayUI* this, int32_t arg2)

004e9df0  {
004e9df3      CPlayerSystem::GetPlayerSystem();
004e9df3      
004e9e03      if (arg2 == 0x10000026)
004e9e03      {
004e9e3d          this->m_shouldQuitOnLogout = 0;
004e9e44          this->m_bLogoutConfirmed = 1;
004e9e4a          this->m_doEndSession = 1;
004e9e51          return;
004e9e03      }
004e9e03      
004e9e08      if (arg2 == 0x54)
004e9e08      {
004e9e23          struct gmGamePlayUI::VTable* vtable = this->vtable;
004e9e27          int32_t eax_1 = vtable->Shown();
004e9e2a          char temp1 = eax_1;
004e9e2a          eax_1 = -(eax_1);
004e9e2c          eax_1 = (eax_1 - eax_1);
004e9e2e          eax_1 += 1;
004e9e33          vtable->Show(eax_1);
004e9e38          return;
004e9e08      }
004e9e08      
004e9e0d      if (arg2 == 0x7b)
004e9e16          KeyStone::OpenHelp(0, 0x10000001);
004e9e16      
004e9e59      if (arg2 == 0x10000027)
004e9e59      {
004e9e5d          this->m_shouldQuitOnLogout = 1;
004e9e63          this->m_bLogoutConfirmed = 1;
004e9e69          this->m_doEndSession = 1;
004e9e59      }
004e9df0  }

004e9e73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004e9e80  uint8_t __thiscall gmGamePlayUI::CloseGameplayConfirmationDialog(class gmGamePlayUI* this, uint8_t arg2)

004e9e80  {
004e9e97      CM_Character::Event_ConfirmationResponse(this->m_gameplayConfirmationType, this->m_gameplayConfirmationContextServer, ((uint32_t)arg2));
004e9ea1      this->m_gameplayConfirmationContext = 0;
004e9ea7      this->m_gameplayConfirmationType = UNDEF_CONFIRM;
004e9ead      this->m_gameplayConfirmationContextServer = 0;
004e9eb3      int32_t eax;
004e9eb3      eax = 1;
004e9eb6      return 1;
004e9e80  }

004e9eb9                                                                             90 90 90 90 90 90 90                           .......

004e9ec0  void __fastcall gmGamePlayUI::SetupChildren(class gmGamePlayUI* this)

004e9ec0  {
004e9ed5      class UIElement* eax_1 = this->vtable->CreateAndAddRootElement(0x10000006, 0x10000495);
004e9eda      this->m_pGameplayUI = eax_1;
004e9eda      
004e9ee0      if (eax_1 != 0)
004e9ee0      {
004e9eee          class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x1000049a);
004e9ef3          class UIElement* m_pGameplayUI = this->m_pGameplayUI;
004e9efe          this->m_pSmartBoxUI = eax_2;
004e9f04          class UIElement* eax_3 = UIElement::GetChildRecursive(m_pGameplayUI, 0x100006d2);
004e9f09          class UIElement* m_pGameplayUI_1 = this->m_pGameplayUI;
004e9f14          this->m_pSmartBoxRadar = eax_3;
004e9f1a          class UIElement* eax_4 = UIElement::GetChildRecursive(m_pGameplayUI_1, 0x100005fa);
004e9f1f          class UIElement* m_pGameplayUI_2 = this->m_pGameplayUI;
004e9f2a          this->m_pStackedVitals = eax_4;
004e9f3a          this->m_pSideBySideVitals = UIElement::GetChildRecursive(m_pGameplayUI_2, 0x100006d5);
004e9f40          int32_t var_b0 = 0x10000505;
004e9f48          int32_t var_ac_1 = 0x1000050e;
004e9f50          int32_t var_a8_1 = 0x1000050f;
004e9f58          int32_t var_a4_1 = 0x10000510;
004e9f6a          uint32_t var_a0 = compute_str_hash("ID_Chat_Chat1_DefaultTitle");
004e9f78          uint32_t var_9c_1 = compute_str_hash("ID_Chat_Chat2_DefaultTitle");
004e9f86          uint32_t var_98_1 = compute_str_hash("ID_Chat_Chat3_DefaultTitle");
004e9f96          uint32_t var_94_1 = compute_str_hash("ID_Chat_Chat4_DefaultTitle");
004e9f9a          void var_90;
004e9f9a          StringInfo::StringInfo(&var_90);
004e9f9a          
004e9ff5          for (int32_t i = 0; i < 0x10; i += 4)
004e9ff5          {
004e9faf              StringInfo::SetStringIDandTableEnum(&var_90, *(uint32_t*)(&var_a0 + i), 0x10000001);
004e9fbf              class UIElement* eax_10 = UIElement::GetChildRecursive(this->m_pGameplayUI, *(uint32_t*)(&var_b0 + i));
004e9fbf              
004e9fc6              if (eax_10 != 0)
004e9fc6              {
004e9fd1                  void* eax_11 = eax_10->vtable->DynamicCast(0x10000040);
004e9fd1                  
004e9fe0                  if ((eax_11 != 0 && eax_11 != 4))
004e9fe9                      *(uint32_t*)(*(uint32_t*)((char*)eax_11 - 4) + 0x2ac)(&var_90);
004e9fc6              }
004e9ff5          }
004e9ff5          
004e9ffb          StringInfo::~StringInfo(&var_90);
004e9ee0      }
004e9ec0  }

004ea009                             90 90 90 90 90 90 90                                                           .......

004ea010  void __fastcall gmGamePlayUI::gmGamePlayUI(class gmGamePlayUI* this)

004ea010  {
004ea016      GamePlayUI::GamePlayUI(this);
004ea01b      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ea038      this->vtable = 0x7c2978;
004ea02c      this->vtable = &gmGamePlayUI::`vftable';
004ea045      this->m_pGameplayUI = nullptr;
004ea04b      this->m_pSmartBoxUI = nullptr;
004ea051      this->m_pSmartBoxRadar = nullptr;
004ea057      __builtin_memset(&this->m_waitContext, 0, 0x19);
004ea093      Device::ForceDisplayResolution(0, 0x320, 0x258);
004ea09f      UIListener::RegisterForGlobalMessage(this, 1);
004ea0a8      UIListener::RegisterForGlobalMessage(this, 3);
004ea0b1      UIListener::RegisterForGlobalMessage(this, 0xe);
004ea0b6      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ea0b6      
004ea0bf      if (eax != 0)
004ea0bf      {
004ea0c5          eax->vtable->RegisterNoticeHandler(0x186a4, &this->vtable);
004ea0d2          eax->vtable->RegisterNoticeHandler(0x4dd209, &this->vtable);
004ea0df          eax->vtable->RegisterNoticeHandler(0x4dd20a, &this->vtable);
004ea0ec          eax->vtable->RegisterNoticeHandler(0x4dd20b, &this->vtable);
004ea0f9          eax->vtable->RegisterNoticeHandler(0x4dd20c, &this->vtable);
004ea106          eax->vtable->RegisterNoticeHandler(0x4dd20d, &this->vtable);
004ea113          eax->vtable->RegisterNoticeHandler(0x4dd27a, &this->vtable);
004ea120          eax->vtable->RegisterNoticeHandler(0x4dd1e2, &this->vtable);
004ea12d          eax->vtable->RegisterNoticeHandler(0x4dd1e3, &this->vtable);
004ea13a          eax->vtable->RegisterNoticeHandler(0x4dd21f, &this->vtable);
004ea147          eax->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004ea154          eax->vtable->RegisterNoticeHandler(0x4dd283, &this->vtable);
004ea161          eax->vtable->RegisterNoticeHandler(0x4dd284, &this->vtable);
004ea0bf      }
004ea0bf      
004ea170      gmGamePlayUI::SetupChildren(this);
004ea179      gmGamePlayUI::Show(this, 1);
004ea010  }

004ea185                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004ea190  class UIMainFramework* gmGamePlayUI::Create()

004ea190  {
004ea195      void* eax = operator new(0xcc);
004ea195      
004ea19f      if (eax == 0)
004ea1aa          return 0;
004ea1aa      
004ea1a3      /* tailcall */
004ea1a3      return gmGamePlayUI::gmGamePlayUI(eax);
004ea190  }

004ea1ab                                   90 90 90 90 90                                                             .....

004ea1b0  uint8_t __thiscall gmGamePlayUI::EndSession(class gmGamePlayUI* this, uint8_t arg2)

004ea1b0  {
004ea1be      if (this->m_endingSession == 0)
004ea1be      {
004ea1c9          this->m_endingSession = 1;
004ea1c9          
004ea1da          if ((arg2 == 0 || this->m_bLogoutConfirmed != 0))
004ea1da          {
004ea1f3              if ((this->m_shouldQuitOnLogout != 0 && arg2 != 0))
004ea1f3              {
004ea1fa                  UIFramework::QueueUIMode(this, 0x10000009);
004ea1ff                  int32_t eax_1;
004ea1ff                  eax_1 = 1;
004ea207                  return 1;
004ea1f3              }
004ea1f3              
004ea20a              class SmartBox* eax_2 = SmartBox::smartbox;
004ea20a              
004ea211              if (eax_2 != 0)
004ea211              {
004ea213                  eax_2 = eax_2->player;
004ea213                  
004ea21b                  if (eax_2 != 0)
004ea21b                  {
004ea224                      if ((eax_2->m_pObjMaint & 1) == 0)
004ea224                      {
004ea243                          this->m_endingSession = 0;
004ea24e                          void var_90;
004ea24e                          StringInfo::StringInfo(&var_90);
004ea25c                          void var_94;
004ea25c                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, &gmGamePlayUI::`vftable'.RecvNotice_SmartBoxObjectFound);
004ea26c                          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004ea275                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
004ea281                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004ea28d                          StringInfo::~StringInfo(&var_90);
004ea224                      }
004ea224                      else
004ea224                      {
004ea226                          eax_2 = CPlayerSystem::GetPlayerSystem();
004ea226                          
004ea22d                          if (eax_2 != 0)
004ea22d                          {
004ea233                              CPlayerSystem::LogOffCharacter(eax_2, 0);
004ea238                              int32_t eax_3;
004ea238                              eax_3 = 1;
004ea240                              return 1;
004ea22d                          }
004ea224                      }
004ea21b                  }
004ea211              }
004ea211              
004ea292              eax_2 = 1;
004ea29a              return 1;
004ea1da          }
004ea1be      }
004ea1be      
004ea1e4      return 0;
004ea1b0  }

004ea29d                                                                                         90 90 90                               ...

004ea2a0  void __fastcall gmGamePlayUI::~gmGamePlayUI(class gmGamePlayUI* this)

004ea2a0  {
004ea2ac      this->vtable = 0x7c2978;
004ea2a4      this->vtable = &gmGamePlayUI::`vftable';
004ea2b8      gmGamePlayUI::EndSession(this, 0);
004ea2c1      UIListener::UnRegisterForGlobalMessage(this, 3);
004ea2ca      UIListener::UnRegisterForGlobalMessage(this, 1);
004ea2cf      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ea2cf      
004ea2d6      if (eax != 0)
004ea2d8          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004ea2d8      
004ea2e7      DialogFactory::CloseDialog(this->m_waitContext);
004ea2ec      this->m_waitContext = 0;
004ea2fd      DialogFactory::CloseDialog(this->m_logoutContext);
004ea302      this->m_logoutContext = 0;
004ea313      DialogFactory::CloseDialog(this->m_gameplayConfirmationContext);
004ea321      this->m_gameplayConfirmationContext = 0;
004ea32b      this->vtable->RemoveRootElement(&this->m_pGameplayUI);
004ea339      UIQueueManager::OnEndCharacterSession(IQueuedUIEventDeliverer::s_pInstance);
004ea339      
004ea345      if (Device::m_bIsDone == 0)
004ea353          Device::ForceDisplayResolution(1, 0x320, 0x258);
004ea353      
004ea2a4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ea363      NoticeHandler::~NoticeHandler(&this->vtable);
004ea36c      /* tailcall */
004ea36c      return GamePlayUI::~GamePlayUI(this);
004ea2a0  }

004ea371                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004ea380  void gmGamePlayUI::Register(uint32_t arg1)

004ea380  {
004ea38a      UIFlow::RegisterFrameworkClass(arg1, gmGamePlayUI::Create);
004ea380  }

004ea393                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004ea3a0  void __fastcall gmGamePlayUI::UseTime(class gmGamePlayUI* this)

004ea3a0  {
004ea3b7      class CameraSet* eax_1;
004ea3b7      int80_t st0_1;
004ea3b7      
004ea3b7      if (ClientUISystem::AccessCameraSet(ClientUISystem::GetUISystem()) != 0)
004ea3cc          eax_1 = CameraSet::SetScale(ClientUISystem::AccessCameraSet(ClientUISystem::GetUISystem()), 1.10000002f);
004ea3d1      eax_1 = this->m_doEndSession;
004ea3d1      
004ea3d9      if (eax_1 != 0)
004ea3d9      {
004ea3df          eax_1 = this->m_endingSession;
004ea3df          
004ea3e7          if (eax_1 == 0)
004ea3e7          {
004ea3ed              eax_1 = this->m_bLogoutConfirmed;
004ea3f5              this->m_endingSession = 1;
004ea3f5              
004ea3fc              if (eax_1 != 0)
004ea3fc              {
004ea402                  eax_1 = this->m_shouldQuitOnLogout;
004ea402                  
004ea40a                  if (eax_1 != 0)
004ea40a                  {
004ea413                      UIFramework::QueueUIMode(this, 0x10000009);
004ea418                      this->m_doEndSession = 0;
004ea426                      return;
004ea40a                  }
004ea40a                  
004ea427                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004ea427                  
004ea42e                  if (SmartBox::smartbox_1 != 0)
004ea42e                  {
004ea434                      class CPhysicsObj* player = SmartBox::smartbox_1->player;
004ea434                      
004ea43c                      if (player != 0)
004ea43c                      {
004ea445                          if ((player->transient_state & 1) == 0)
004ea445                          {
004ea46c                              this->m_endingSession = 0;
004ea473                              void var_90;
004ea473                              StringInfo::StringInfo(&var_90);
004ea481                              void var_94;
004ea481                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, &gmGamePlayUI::`vftable'.RecvNotice_SmartBoxObjectFound);
004ea491                              StringInfo::SetLiteralValue(&var_90, &var_94, 1);
004ea49a                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
004ea4a6                              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
004ea4b2                              StringInfo::~StringInfo(&var_90);
004ea445                          }
004ea445                          else
004ea445                          {
004ea447                              class CPlayerSystem* eax_4 = CPlayerSystem::GetPlayerSystem();
004ea447                              
004ea44e                              if (eax_4 != 0)
004ea44e                              {
004ea454                                  CPlayerSystem::LogOffCharacter(eax_4, 0);
004ea459                                  this->m_doEndSession = 0;
004ea467                                  return;
004ea44e                              }
004ea445                          }
004ea43c                      }
004ea42e                  }
004ea3fc              }
004ea3e7          }
004ea3e7          
004ea4b7          this->m_doEndSession = 0;
004ea3d9      }
004ea3a0  }

004ea4c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004ea4d0  void* __thiscall gmGamePlayUI::`scalar deleting destructor'(class gmGamePlayUI* this, uint32_t arg2)

004ea4d0  {
004ea4d3      gmGamePlayUI::~gmGamePlayUI(this);
004ea4d3      
004ea4dd      if ((arg2 & 1) != 0)
004ea4e0          operator delete(this);
004ea4e0      
004ea4eb      return this;
004ea4d0  }

004ea4ee                                            90 90                                                                ..

004ea4f0  void __thiscall gmGamePlayUI::RecvNotice_CloseDialog(class gmGamePlayUI* this, uint32_t arg2, class PropertyCollection const* arg3)

004ea4f0  {
004ea4f5      class PropertyCollection* esi = arg3;
004ea500      uint32_t temp1 = (COMBINE(0, 0x8e) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004ea503      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004ea508      int32_t var_14 = 0;
004ea50c      int32_t* var_8 = nullptr;
004ea510      int32_t* var_4 = nullptr;
004ea510      
004ea51e      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
004ea51e      {
004ea526          if (*(uint32_t*)i == 0x8e)
004ea526          {
004ea533              if (i != 0)
004ea533              {
004ea53d                  BaseProperty::operator=(&var_8, &i[2]);
004ea53d                  
004ea548                  if (var_4 != 0)
004ea551                      *(uint32_t*)(*(uint32_t*)var_4 + 0xa8)(&var_14);
004ea533              }
004ea533              
004ea533              break;
004ea526          }
004ea51e      }
004ea51e      
004ea55c      if (var_14 == 1)
004ea55c      {
004ea569          uint32_t temp1_1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
004ea56c          class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
004ea56f          int32_t* ecx_2 = nullptr;
004ea571          arg3 = 0;
004ea575          int32_t* var_10 = nullptr;
004ea579          int32_t* var_c_1 = nullptr;
004ea579          
004ea584          for (int32_t* i_1 = m_buckets_1[temp1_1]; i_1 != 0; i_1 = i_1[1])
004ea584          {
004ea58c              if (*(uint32_t*)i_1 == 0x92)
004ea58c              {
004ea599                  if (i_1 != 0)
004ea599                  {
004ea5a3                      BaseProperty::operator=(&var_10, &i_1[2]);
004ea5a8                      ecx_2 = var_c_1;
004ea5a8                      
004ea5ae                      if (ecx_2 != 0)
004ea5ae                      {
004ea5b7                          *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&arg3);
004ea5ba                          ecx_2 = var_c_1;
004ea5ae                      }
004ea599                  }
004ea599                  
004ea599                  break;
004ea58c              }
004ea584          }
004ea584          
004ea5c5          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4] == arg2)
004ea5c5          {
004ea5cb              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8] = nullptr;
004ea5cb              
004ea5ce              if (arg3 != 0)
004ea5ce              {
004ea5d0                  *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[3] = 1;
004ea5d4                  *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[1] = 1;
004ea5ce              }
004ea5ce              
004ea5d8              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[4] = nullptr;
004ea5c5          }
004ea5c5          else if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5] == arg2)
004ea5e0          {
004ea5ed              gmGamePlayUI::CloseGameplayConfirmationDialog(((char*)this - 0x98), ((int8_t)arg3));
004ea5f2              ecx_2 = var_c_1;
004ea5e0          }
004ea5e0          
004ea5f6          int32_t* eax_9 = var_10;
004ea5f6          
004ea5fc          if (eax_9 != 0)
004ea5fc          {
004ea606              int32_t esi_2 = (eax_9[1] - 1);
004ea603              eax_9[1] = esi_2;
004ea603              
004ea60d              if (esi_2 == 0)
004ea613                  **(uint32_t**)eax_9(1);
004ea613              
004ea615              ecx_2 = var_c_1;
004ea619              var_10 = nullptr;
004ea5fc          }
004ea5fc          
004ea61f          if (ecx_2 != 0)
004ea61f          {
004ea627              int32_t esi_4 = (ecx_2[1] - 1);
004ea624              ecx_2[1] = esi_4;
004ea624              
004ea62e              if (esi_4 == 0)
004ea634                  **(uint32_t**)ecx_2(1);
004ea61f          }
004ea55c      }
004ea55c      
004ea636      int32_t* eax_13 = var_8;
004ea636      
004ea63c      if (eax_13 != 0)
004ea63c      {
004ea646          int32_t esi_6 = (eax_13[1] - 1);
004ea643          eax_13[1] = esi_6;
004ea643          
004ea64d          if (esi_6 == 0)
004ea653              **(uint32_t**)eax_13(1);
004ea653          
004ea655          var_8 = nullptr;
004ea63c      }
004ea63c      
004ea65f      if (var_4 != 0)
004ea65f      {
004ea669          int32_t esi_8 = (var_4[1] - 1);
004ea666          var_4[1] = esi_8;
004ea666          
004ea670          if (esi_8 == 0)
004ea676              **(uint32_t**)var_4(1);
004ea65f      }
004ea4f0  }

004ea681     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004ea690  void __thiscall gmGamePlayUI::CreateScreenLayoutPath(class gmGamePlayUI* this, class PStringBase<char> arg2, class PStringBase<char>* arg3)

004ea690  {
004ea694      class PSRefBufferCharData<char>* m_charbuffer = arg3->m_charbuffer;
004ea694      
004ea6b1      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
004ea6b1      {
004ea6c2          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
004ea6ca              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004ea6ca          
004ea6cc          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004ea6dc          *(uint32_t*)arg3 = PStringBase<char>::s_NullBuffer_2;
004ea6de          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
004ea6b1      }
004ea6b1      
004ea6e0      class PSRefBufferCharData<char>* m_charbuffer_1 = UserPreferences::sm_strDefaultFile.m_charbuffer;
004ea6e5      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
004ea6ed      InterlockedIncrement(&m_charbuffer_1[-1]);
004ea6ef      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004ea6f4      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
004ea6fc      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004ea708      PSUtils::get_directory(&PStringBase<char>::s_NullBuffer_3, &m_charbuffer_2);
004ea719      class PStringBase<char> var_10;
004ea719      PStringBase<char>::PStringBase<char>(&var_10, &gmGamePlayUI::`vftable'.RecvNotice_AttackHeightChanged);
004ea727      uint8_t eax_4 = PStringBase<char>::operator==(&arg2, &var_10);
004ea734      int32_t* esi_3 = (var_10 - 0x14);
004ea734      
004ea743      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004ea74b          **(uint32_t**)esi_3(1);
004ea74b      
004ea74d      int32_t eax_6;
004ea74d      eax_6 = eax_4;
004ea74d      
004ea753      if (eax_6 == 0)
004ea753      {
004ea8a0          class PStringBase<char> eax_24 = arg2;
004ea8a0          
004ea8a8          if (*(uint32_t*)(eax_24 - 4) != 1)
004ea8a8          {
004ea8ca              class PStringBase<char> var_2c_17 = eax_24;
004ea8cf              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
004ea8d6              PStringBase<char>::sprintf(arg3, &gmGamePlayUI::`vftable'.RecvNotice_Augmentation_ConfirmationRequest);
004ea8a8          }
004ea8a8          else
004ea8a8          {
004ea8b2              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
004ea8b9              PStringBase<char>::sprintf(arg3, &gmGamePlayUI::`vftable'.RecvNotice_CraftInteraction_ConfirmationRequest);
004ea8a8          }
004ea753      }
004ea753      else
004ea753      {
004ea759          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004ea760          uint32_t player_id;
004ea760          
004ea760          if (SmartBox::smartbox_1 == 0)
004ea76a              player_id = 0;
004ea760          else
004ea762              player_id = SmartBox::smartbox_1->player_id;
004ea762          
004ea77e          PStringBase<char>::PStringBase<char>(&var_10, ACCWeenieObject::GetObjectName(player_id, NAME_SINGULAR, 0));
004ea78f          class PStringBase<unsigned short> edi_1 = *(uint32_t*)Client::GetInstance()->vtable->GetWorldName();
004ea795          class PStringBase<unsigned short> var_8 = edi_1;
004ea799          InterlockedIncrement((edi_1 - 0x10));
004ea7a6          void* __return;
004ea7a6          PStringBase<unsigned short>::to_spstring(&var_8, &__return, 0);
004ea7b1          class PStringBase<char> esi_4 = var_10;
004ea7b5          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_3;
004ea7c4          int32_t var_2c_10 = UIRegion::GetHeight(this->m_pGameplayUI);
004ea7ce          int32_t var_30_2 = UIRegion::GetWidth(this->m_pGameplayUI);
004ea7cf          class PStringBase<char> var_34_2 = esi_4;
004ea7d0          void* __return_1 = __return;
004ea7d4          void* __return_2 = __return_1;
004ea7d5          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_6;
004ea7dc          PStringBase<char>::sprintf(arg3, &gmGamePlayUI::`vftable'.RecvNotice_ReloadOptions);
004ea7dc          
004ea7f9          if ((InterlockedDecrement(((char*)__return_1 - 0x10)) == 0 && __return_1 != 0x14))
004ea801              **(uint32_t**)((char*)__return_1 - 0x14)(1);
004ea801          
004ea812          if ((InterlockedDecrement((edi_1 - 0x10)) == 0 && edi_1 != 0x14))
004ea81a              **(uint32_t**)(edi_1 - 0x14)(1);
004ea81a          
004ea820          int32_t* esi_7 = (var_10 - 0x14);
004ea820          
004ea82f          if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
004ea837              **(uint32_t**)esi_7(1);
004ea753      }
004ea753      
004ea843      void* __offset(PSRefBufferCharData<char>, -0x14) esi_9 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
004ea843      
004ea852      if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
004ea85a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
004ea85a      
004ea860      void* __offset(PSRefBufferCharData<char>, -0x14) esi_11 = &m_charbuffer_2->m_data[0xffffffec];
004ea860      
004ea86f      if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
004ea877          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_11) + -0x14)(1);
004ea877      
004ea87d      int32_t* esi_13 = (arg2 - 0x14);
004ea87d      
004ea88c      if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
004ea894          **(uint32_t**)esi_13(1);
004ea690  }

004ea8e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ea8f0  int32_t __fastcall gmGamePlayUI::LoadScreenLayout(class gmGamePlayUI* this, class PStringBase<char> arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004ea8f0  {
004ea8f6      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004ea8fb      int32_t ebx;
004ea8fb      int32_t var_870 = ebx;
004ea8fc      int32_t ebp;
004ea8fc      int32_t var_874 = ebp;
004ea8fd      int32_t esi;
004ea8fd      int32_t var_878 = esi;
004ea904      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
004ea908      int32_t edi;
004ea908      int32_t var_87c = edi;
004ea916      int32_t var_888 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004ea926      void var_860;
004ea926      InterlockedIncrement(((char*)__return_addr - 0x10), __return_addr, &var_860);
004ea92a      gmGamePlayUI::CreateScreenLayoutPath(this);
004ea92f      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004ea939      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_2;
004ea93d      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004ea94b      var_878 = 0;
004ea94f      var_874 = 0;
004ea953      void* var_86c = nullptr;
004ea957      var_870 = 0;
004ea95b      int32_t var_868;
004ea95b      int32_t eax_1 = fopen(var_868, &gmJournalUI::`vftable'.RecvNotice_UpdateToolbarSelectionDisplay);
004ea968      void* var_10;
004ea968      
004ea968      if (eax_1 == 0)
004ea968      {
004ea97f          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
004ea987              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
004ea987          
004ea98d          int32_t* esi_3 = ((char*)var_86c - 0x14);
004ea98d          
004ea99c          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004ea9a4              **(uint32_t**)esi_3(1);
004ea9a4          
004ea9bc          if ((InterlockedDecrement(((char*)var_10 - 0x10)) == 0 && var_10 != 0x14))
004ea9c4              **(uint32_t**)((char*)var_10 - 0x14)(1);
004ea9c4          
004ea9d2          return 0;
004ea968      }
004ea968      
004ea9eb      if (fgets(&PStringBase<char>::s_NullBuffer_5, 0x834, eax_1) != 0)
004ea9eb      {
004eaccd          int32_t i;
004eaccd          
004eaccd          do
004eaccd          {
004eaa14              void var_864;
004eaa14              int32_t eax_10 = sscanf(&PStringBase<char>::s_NullBuffer_5, &gmGamePlayUI::`vftable'.RecvNotice_ItemListBeginDrag, &var_864, &var_878, &var_874, &var_870, &var_86c);
004eaa14              
004eaa20              if (eax_10 == 5)
004eaa20              {
004eaa26                  void (__thiscall** const edi_2)(class gmNoticeHandler* this, uint32_t, uint32_t, uint8_t) = &gmGamePlayUI::`vftable'.RecvNotice_BeginDrag;
004eaa2b                  void* esi_7 = &var_864;
004eaa2f                  int32_t j = 7;
004eaa34                  int32_t eax_11 = 0;
004eaa34                  bool c_1 = false;
004eaa34                  bool z_1 = eax_10 == eax_10;
004eaa34                  
004eaa36                  while (j != 0)
004eaa36                  {
004eaa36                      char temp3_1 = *(uint8_t*)esi_7;
004eaa36                      char temp4_1 = *(uint8_t*)edi_2;
004eaa36                      c_1 = temp3_1 < temp4_1;
004eaa36                      z_1 = temp3_1 == temp4_1;
004eaa36                      esi_7 += 1;
004eaa36                      edi_2 += 1;
004eaa36                      j -= 1;
004eaa36                      
004eaa36                      if (!(z_1))
004eaa36                          break;
004eaa36                  }
004eaa36                  
004eaa38                  if (!(z_1))
004eaa38                  {
004eaa3a                      bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004eaa3c                      eax_11 = ((0 - 0) + 1);
004eaa38                  }
004eaa38                  
004eaa41                  uint32_t var_88c_4;
004eaa41                  
004eaa41                  if (eax_11 != 0)
004eaa41                  {
004eaa4d                      void (__thiscall** const edi_3)(class gmNoticeHandler* this, uint32_t) = &gmGamePlayUI::`vftable'.RecvNotice_OpenSalvagePanel;
004eaa52                      void* esi_8 = &var_864;
004eaa56                      int32_t j_1 = 7;
004eaa5b                      int32_t eax_13 = 0;
004eaa5b                      bool c_3 = false;
004eaa5b                      bool z_2 = eax_11 == eax_11;
004eaa5b                      
004eaa5d                      while (j_1 != 0)
004eaa5d                      {
004eaa5d                          char temp9_1 = *(uint8_t*)esi_8;
004eaa5d                          char temp10_1 = *(uint8_t*)edi_3;
004eaa5d                          c_3 = temp9_1 < temp10_1;
004eaa5d                          z_2 = temp9_1 == temp10_1;
004eaa5d                          esi_8 += 1;
004eaa5d                          edi_3 += 1;
004eaa5d                          j_1 -= 1;
004eaa5d                          
004eaa5d                          if (!(z_2))
004eaa5d                              break;
004eaa5d                      }
004eaa5d                      
004eaa5f                      if (!(z_2))
004eaa5f                      {
004eaa61                          bool c_4 = /* bool c_4 = unimplemented  {sbb eax, eax} */;
004eaa63                          eax_13 = ((0 - 0) + 1);
004eaa5f                      }
004eaa5f                      
004eaa68                      if (eax_13 == 0)
004eaa68                      {
004eaa6a                          var_88c_4 = 0x10000601;
004eaa6f                          goto label_4eac8e;
004eaa68                      }
004eaa68                      
004eaa74                      void (__thiscall** const edi_4)(class gmNoticeHandler* this, int32_t) = &gmGamePlayUI::`vftable'.RecvNotice_UpdateRentTime;
004eaa79                      void* esi_9 = &var_864;
004eaa7d                      int32_t j_2 = 7;
004eaa82                      int32_t eax_15 = 0;
004eaa82                      bool c_5 = false;
004eaa82                      bool z_3 = eax_13 == eax_13;
004eaa82                      
004eaa84                      while (j_2 != 0)
004eaa84                      {
004eaa84                          char temp15_1 = *(uint8_t*)esi_9;
004eaa84                          char temp16_1 = *(uint8_t*)edi_4;
004eaa84                          c_5 = temp15_1 < temp16_1;
004eaa84                          z_3 = temp15_1 == temp16_1;
004eaa84                          esi_9 += 1;
004eaa84                          edi_4 += 1;
004eaa84                          j_2 -= 1;
004eaa84                          
004eaa84                          if (!(z_3))
004eaa84                              break;
004eaa84                      }
004eaa84                      
004eaa86                      if (!(z_3))
004eaa86                      {
004eaa88                          bool c_6 = /* bool c_6 = unimplemented  {sbb eax, eax} */;
004eaa8a                          eax_15 = ((0 - 0) + 1);
004eaa86                      }
004eaa86                      
004eaa8f                      if (eax_15 == 0)
004eaa8f                      {
004eaa91                          var_88c_4 = 0x10000505;
004eaa96                          goto label_4eac8e;
004eaa8f                      }
004eaa8f                      
004eaa9b                      void (__thiscall** const edi_5)(class gmNoticeHandler* this, uint32_t, class HouseProfile const*) = &gmGamePlayUI::`vftable'.RecvNotice_UpdateHouseProfile;
004eaaa0                      void* esi_10 = &var_864;
004eaaa4                      int32_t j_3 = 7;
004eaaa9                      int32_t eax_17 = 0;
004eaaa9                      bool c_7 = false;
004eaaa9                      bool z_4 = eax_15 == eax_15;
004eaaa9                      
004eaaab                      while (j_3 != 0)
004eaaab                      {
004eaaab                          char temp21_1 = *(uint8_t*)esi_10;
004eaaab                          char temp22_1 = *(uint8_t*)edi_5;
004eaaab                          c_7 = temp21_1 < temp22_1;
004eaaab                          z_4 = temp21_1 == temp22_1;
004eaaab                          esi_10 += 1;
004eaaab                          edi_5 += 1;
004eaaab                          j_3 -= 1;
004eaaab                          
004eaaab                          if (!(z_4))
004eaaab                              break;
004eaaab                      }
004eaaab                      
004eaaad                      if (!(z_4))
004eaaad                      {
004eaaaf                          bool c_8 = /* bool c_8 = unimplemented  {sbb eax, eax} */;
004eaab1                          eax_17 = ((0 - 0) + 1);
004eaaad                      }
004eaaad                      
004eaab6                      if (eax_17 == 0)
004eaab6                      {
004eaab8                          var_88c_4 = 0x1000050e;
004eaabd                          goto label_4eac8e;
004eaab6                      }
004eaab6                      
004eaac2                      void (__thiscall** const edi_6)(class gmNoticeHandler* this, uint32_t) = &gmGamePlayUI::`vftable'.RecvNotice_FailedHouseTransaction;
004eaac7                      void* esi_11 = &var_864;
004eaacb                      int32_t j_4 = 7;
004eaad0                      int32_t eax_19 = 0;
004eaad0                      bool c_9 = false;
004eaad0                      bool z_5 = eax_17 == eax_17;
004eaad0                      
004eaad2                      while (j_4 != 0)
004eaad2                      {
004eaad2                          char temp27_1 = *(uint8_t*)esi_11;
004eaad2                          char temp28_1 = *(uint8_t*)edi_6;
004eaad2                          c_9 = temp27_1 < temp28_1;
004eaad2                          z_5 = temp27_1 == temp28_1;
004eaad2                          esi_11 += 1;
004eaad2                          edi_6 += 1;
004eaad2                          j_4 -= 1;
004eaad2                          
004eaad2                          if (!(z_5))
004eaad2                              break;
004eaad2                      }
004eaad2                      
004eaad4                      if (!(z_5))
004eaad4                      {
004eaad6                          bool c_10 = /* bool c_10 = unimplemented  {sbb eax, eax} */;
004eaad8                          eax_19 = ((0 - 0) + 1);
004eaad4                      }
004eaad4                      
004eaadd                      if (eax_19 == 0)
004eaadd                      {
004eaadf                          var_88c_4 = 0x1000050f;
004eaae4                          goto label_4eac8e;
004eaadd                      }
004eaadd                      
004eaae9                      void (__thiscall** const edi_7)(class gmNoticeHandler* this, uint32_t, int32_t) = &gmGamePlayUI::`vftable'.RecvNotice_StartGame;
004eaaee                      void* esi_12 = &var_864;
004eaaf2                      int32_t j_5 = 7;
004eaaf7                      int32_t eax_21 = 0;
004eaaf7                      bool c_11 = false;
004eaaf7                      bool z_6 = eax_19 == eax_19;
004eaaf7                      
004eaaf9                      while (j_5 != 0)
004eaaf9                      {
004eaaf9                          char temp33_1 = *(uint8_t*)esi_12;
004eaaf9                          char temp34_1 = *(uint8_t*)edi_7;
004eaaf9                          c_11 = temp33_1 < temp34_1;
004eaaf9                          z_6 = temp33_1 == temp34_1;
004eaaf9                          esi_12 += 1;
004eaaf9                          edi_7 += 1;
004eaaf9                          j_5 -= 1;
004eaaf9                          
004eaaf9                          if (!(z_6))
004eaaf9                              break;
004eaaf9                      }
004eaaf9                      
004eaafb                      if (!(z_6))
004eaafb                      {
004eaafd                          bool c_12 = /* bool c_12 = unimplemented  {sbb eax, eax} */;
004eaaff                          eax_21 = ((0 - 0) + 1);
004eaafb                      }
004eaafb                      
004eab04                      if (eax_21 == 0)
004eab04                      {
004eab06                          var_88c_4 = 0x10000510;
004eab0b                          goto label_4eac8e;
004eab04                      }
004eab04                      
004eab10                      void (__thiscall** const edi_8)(class gmNoticeHandler* this, uint32_t, int32_t, int32_t) = &gmGamePlayUI::`vftable'.RecvNotice_OpponentOffersStalemate;
004eab15                      void* esi_13 = &var_864;
004eab19                      int32_t j_6 = 7;
004eab1e                      int32_t eax_23 = 0;
004eab1e                      bool c_13 = false;
004eab1e                      bool z_7 = eax_21 == eax_21;
004eab1e                      
004eab20                      while (j_6 != 0)
004eab20                      {
004eab20                          char temp39_1 = *(uint8_t*)esi_13;
004eab20                          char temp40_1 = *(uint8_t*)edi_8;
004eab20                          c_13 = temp39_1 < temp40_1;
004eab20                          z_7 = temp39_1 == temp40_1;
004eab20                          esi_13 += 1;
004eab20                          edi_8 += 1;
004eab20                          j_6 -= 1;
004eab20                          
004eab20                          if (!(z_7))
004eab20                              break;
004eab20                      }
004eab20                      
004eab22                      if (!(z_7))
004eab22                      {
004eab24                          bool c_14 = /* bool c_14 = unimplemented  {sbb eax, eax} */;
004eab26                          eax_23 = ((0 - 0) + 1);
004eab22                      }
004eab22                      
004eab2b                      if (eax_23 == 0)
004eab2b                      {
004eab2d                          var_88c_4 = 0x100005f7;
004eab32                          goto label_4eac8e;
004eab2b                      }
004eab2b                      
004eab37                      void (__thiscall** const edi_9)(class gmNoticeHandler* this, uint32_t, int32_t) = &gmGamePlayUI::`vftable'.RecvNotice_JoinGameResponse;
004eab3c                      void* esi_14 = &var_864;
004eab40                      int32_t j_7 = 7;
004eab45                      int32_t eax_25 = 0;
004eab45                      bool c_15 = false;
004eab45                      bool z_8 = eax_23 == eax_23;
004eab45                      
004eab47                      while (j_7 != 0)
004eab47                      {
004eab47                          char temp45_1 = *(uint8_t*)esi_14;
004eab47                          char temp46_1 = *(uint8_t*)edi_9;
004eab47                          c_15 = temp45_1 < temp46_1;
004eab47                          z_8 = temp45_1 == temp46_1;
004eab47                          esi_14 += 1;
004eab47                          edi_9 += 1;
004eab47                          j_7 -= 1;
004eab47                          
004eab47                          if (!(z_8))
004eab47                              break;
004eab47                      }
004eab47                      
004eab49                      if (!(z_8))
004eab49                      {
004eab4b                          bool c_16 = /* bool c_16 = unimplemented  {sbb eax, eax} */;
004eab4d                          eax_25 = ((0 - 0) + 1);
004eab49                      }
004eab49                      
004eab52                      if (eax_25 == 0)
004eab52                      {
004eab54                          var_88c_4 = 0x100005fa;
004eab59                          goto label_4eac8e;
004eab52                      }
004eab52                      
004eab5e                      void (__thiscall** const edi_10)(class gmNoticeHandler* this) = &gmGamePlayUI::`vftable'.RecvNotice_EndGame;
004eab63                      void* esi_15 = &var_864;
004eab67                      int32_t j_8 = 7;
004eab6c                      int32_t eax_27 = 0;
004eab6c                      bool c_17 = false;
004eab6c                      bool z_9 = eax_25 == eax_25;
004eab6c                      
004eab6e                      while (j_8 != 0)
004eab6e                      {
004eab6e                          char temp51_1 = *(uint8_t*)esi_15;
004eab6e                          char temp52_1 = *(uint8_t*)edi_10;
004eab6e                          c_17 = temp51_1 < temp52_1;
004eab6e                          z_9 = temp51_1 == temp52_1;
004eab6e                          esi_15 += 1;
004eab6e                          edi_10 += 1;
004eab6e                          j_8 -= 1;
004eab6e                          
004eab6e                          if (!(z_9))
004eab6e                              break;
004eab6e                      }
004eab6e                      
004eab70                      if (!(z_9))
004eab70                      {
004eab72                          bool c_18 = /* bool c_18 = unimplemented  {sbb eax, eax} */;
004eab74                          eax_27 = ((0 - 0) + 1);
004eab70                      }
004eab70                      
004eab79                      if (eax_27 == 0)
004eab79                      {
004eab7b                          var_88c_4 = 0x100006d5;
004eab80                          goto label_4eac8e;
004eab79                      }
004eab79                      
004eab85                      void (__thiscall** const edi_11)(class gmNoticeHandler* this, class CFellowship const*) = &gmGamePlayUI::`vftable'.RecvNotice_FellowshipUpdate;
004eab8a                      void* esi_16 = &var_864;
004eab8e                      int32_t j_9 = 7;
004eab93                      int32_t eax_29 = 0;
004eab93                      bool c_19 = false;
004eab93                      bool z_10 = eax_27 == eax_27;
004eab93                      
004eab95                      while (j_9 != 0)
004eab95                      {
004eab95                          char temp57_1 = *(uint8_t*)esi_16;
004eab95                          char temp58_1 = *(uint8_t*)edi_11;
004eab95                          c_19 = temp57_1 < temp58_1;
004eab95                          z_10 = temp57_1 == temp58_1;
004eab95                          esi_16 += 1;
004eab95                          edi_11 += 1;
004eab95                          j_9 -= 1;
004eab95                          
004eab95                          if (!(z_10))
004eab95                              break;
004eab95                      }
004eab95                      
004eab97                      if (!(z_10))
004eab97                      {
004eab99                          bool c_20 = /* bool c_20 = unimplemented  {sbb eax, eax} */;
004eab9b                          eax_29 = ((0 - 0) + 1);
004eab97                      }
004eab97                      
004eaba0                      if (eax_29 == 0)
004eaba0                      {
004eaba2                          var_88c_4 = 0x100005fd;
004eaba7                          goto label_4eac8e;
004eaba0                      }
004eaba0                      
004eabac                      void (__thiscall** const edi_12)(class gmNoticeHandler* this, uint32_t, uint32_t) = &gmGamePlayUI::`vftable'.RecvNotice_FellowshipLeaderChanged;
004eabb1                      void* esi_17 = &var_864;
004eabb5                      int32_t j_10 = 7;
004eabba                      int32_t eax_31 = 0;
004eabba                      bool c_21 = false;
004eabba                      bool z_11 = eax_29 == eax_29;
004eabba                      
004eabbc                      while (j_10 != 0)
004eabbc                      {
004eabbc                          char temp63_1 = *(uint8_t*)esi_17;
004eabbc                          char temp64_1 = *(uint8_t*)edi_12;
004eabbc                          c_21 = temp63_1 < temp64_1;
004eabbc                          z_11 = temp63_1 == temp64_1;
004eabbc                          esi_17 += 1;
004eabbc                          edi_12 += 1;
004eabbc                          j_10 -= 1;
004eabbc                          
004eabbc                          if (!(z_11))
004eabbc                              break;
004eabbc                      }
004eabbc                      
004eabbe                      if (!(z_11))
004eabbe                      {
004eabc0                          bool c_22 = /* bool c_22 = unimplemented  {sbb eax, eax} */;
004eabc2                          eax_31 = ((0 - 0) + 1);
004eabbe                      }
004eabbe                      
004eabc7                      if (eax_31 == 0)
004eabc7                      {
004eabc9                          var_88c_4 = 0x100005ff;
004eabce                          goto label_4eac8e;
004eabc7                      }
004eabc7                      
004eabd3                      void (__thiscall** const edi_13)(class gmNoticeHandler* this, uint32_t, class Fellow const*, uint32_t) = &gmGamePlayUI::`vftable'.RecvNotice_FellowUpdated;
004eabd8                      void* esi_18 = &var_864;
004eabdc                      int32_t j_11 = 7;
004eabe1                      int32_t eax_33 = 0;
004eabe1                      bool c_23 = false;
004eabe1                      bool z_12 = eax_31 == eax_31;
004eabe1                      
004eabe3                      while (j_11 != 0)
004eabe3                      {
004eabe3                          char temp69_1 = *(uint8_t*)esi_18;
004eabe3                          char temp70_1 = *(uint8_t*)edi_13;
004eabe3                          c_23 = temp69_1 < temp70_1;
004eabe3                          z_12 = temp69_1 == temp70_1;
004eabe3                          esi_18 += 1;
004eabe3                          edi_13 += 1;
004eabe3                          j_11 -= 1;
004eabe3                          
004eabe3                          if (!(z_12))
004eabe3                              break;
004eabe3                      }
004eabe3                      
004eabe5                      if (!(z_12))
004eabe5                      {
004eabe7                          bool c_24 = /* bool c_24 = unimplemented  {sbb eax, eax} */;
004eabe9                          eax_33 = ((0 - 0) + 1);
004eabe5                      }
004eabe5                      
004eabee                      if (eax_33 == 0)
004eabee                      {
004eabf0                          var_88c_4 = 0x10000603;
004eabf5                          goto label_4eac8e;
004eabee                      }
004eabee                      
004eabfa                      void (__thiscall** const edi_14)(class gmNoticeHandler* this, uint32_t) = &gmGamePlayUI::`vftable'.RecvNotice_FellowDismissed;
004eabff                      void* esi_19 = &var_864;
004eac03                      int32_t j_12 = 7;
004eac08                      int32_t eax_35 = 0;
004eac08                      bool c_25 = false;
004eac08                      bool z_13 = eax_33 == eax_33;
004eac08                      
004eac0a                      while (j_12 != 0)
004eac0a                      {
004eac0a                          char temp75_1 = *(uint8_t*)esi_19;
004eac0a                          char temp76_1 = *(uint8_t*)edi_14;
004eac0a                          c_25 = temp75_1 < temp76_1;
004eac0a                          z_13 = temp75_1 == temp76_1;
004eac0a                          esi_19 += 1;
004eac0a                          edi_14 += 1;
004eac0a                          j_12 -= 1;
004eac0a                          
004eac0a                          if (!(z_13))
004eac0a                              break;
004eac0a                      }
004eac0a                      
004eac0c                      if (!(z_13))
004eac0c                      {
004eac0e                          bool c_26 = /* bool c_26 = unimplemented  {sbb eax, eax} */;
004eac10                          eax_35 = ((0 - 0) + 1);
004eac0c                      }
004eac0c                      
004eac15                      if (eax_35 == 0)
004eac15                      {
004eac17                          var_88c_4 = 0x10000611;
004eac1c                          goto label_4eac8e;
004eac15                      }
004eac15                      
004eac1e                      void (__thiscall** const edi_15)(class gmNoticeHandler* this, uint32_t, class AppraisalProfile const*) = &gmGamePlayUI::`vftable'.RecvNotice_SetAppraiseInfo;
004eac23                      void* esi_20 = &var_864;
004eac27                      int32_t j_13 = 7;
004eac2c                      int32_t eax_37 = 0;
004eac2c                      bool c_27 = false;
004eac2c                      bool z_14 = eax_35 == eax_35;
004eac2c                      
004eac2e                      while (j_13 != 0)
004eac2e                      {
004eac2e                          char temp81_1 = *(uint8_t*)esi_20;
004eac2e                          char temp82_1 = *(uint8_t*)edi_15;
004eac2e                          c_27 = temp81_1 < temp82_1;
004eac2e                          z_14 = temp81_1 == temp82_1;
004eac2e                          esi_20 += 1;
004eac2e                          edi_15 += 1;
004eac2e                          j_13 -= 1;
004eac2e                          
004eac2e                          if (!(z_14))
004eac2e                              break;
004eac2e                      }
004eac2e                      
004eac30                      if (!(z_14))
004eac30                      {
004eac32                          bool c_28 = /* bool c_28 = unimplemented  {sbb eax, eax} */;
004eac34                          eax_37 = ((0 - 0) + 1);
004eac30                      }
004eac30                      
004eac39                      if (eax_37 == 0)
004eac39                      {
004eac3b                          var_88c_4 = 0x10000613;
004eac40                          goto label_4eac8e;
004eac39                      }
004eac39                      
004eac42                      void (__thiscall** const edi_16)(class gmNoticeHandler* this, uint32_t) = &gmGamePlayUI::`vftable'.RecvNotice_ExamineObject;
004eac47                      void* esi_21 = &var_864;
004eac4b                      int32_t j_14 = 7;
004eac50                      int32_t eax_39 = 0;
004eac50                      bool c_29 = false;
004eac50                      bool z_15 = eax_37 == eax_37;
004eac50                      
004eac52                      while (j_14 != 0)
004eac52                      {
004eac52                          char temp87_1 = *(uint8_t*)esi_21;
004eac52                          char temp88_1 = *(uint8_t*)edi_16;
004eac52                          c_29 = temp87_1 < temp88_1;
004eac52                          z_15 = temp87_1 == temp88_1;
004eac52                          esi_21 += 1;
004eac52                          edi_16 += 1;
004eac52                          j_14 -= 1;
004eac52                          
004eac52                          if (!(z_15))
004eac52                              break;
004eac52                      }
004eac52                      
004eac54                      if (!(z_15))
004eac54                      {
004eac56                          bool c_30 = /* bool c_30 = unimplemented  {sbb eax, eax} */;
004eac58                          eax_39 = ((0 - 0) + 1);
004eac54                      }
004eac54                      
004eac5d                      if (eax_39 == 0)
004eac5d                      {
004eac5f                          var_88c_4 = 0x100006b5;
004eac64                          goto label_4eac8e;
004eac5d                      }
004eac5d                      
004eac66                      void (__thiscall** const edi_17)(class gmNoticeHandler* this, enum COMBAT_MODE) = &gmGamePlayUI::`vftable'.RecvNotice_SetCombatMode;
004eac6b                      void* esi_22 = &var_864;
004eac6f                      int32_t j_15 = 7;
004eac74                      int32_t eax_41 = 0;
004eac74                      bool c_31 = false;
004eac74                      bool z_16 = eax_39 == eax_39;
004eac74                      
004eac76                      while (j_15 != 0)
004eac76                      {
004eac76                          char temp93_1 = *(uint8_t*)esi_22;
004eac76                          char temp94_1 = *(uint8_t*)edi_17;
004eac76                          c_31 = temp93_1 < temp94_1;
004eac76                          z_16 = temp93_1 == temp94_1;
004eac76                          esi_22 += 1;
004eac76                          edi_17 += 1;
004eac76                          j_15 -= 1;
004eac76                          
004eac76                          if (!(z_16))
004eac76                              break;
004eac76                      }
004eac76                      
004eac78                      if (!(z_16))
004eac78                      {
004eac7a                          bool c_32 = /* bool c_32 = unimplemented  {sbb eax, eax} */;
004eac7c                          eax_41 = ((0 - 0) + 1);
004eac78                      }
004eac78                      
004eac81                      if (eax_41 == 0)
004eac81                      {
004eac83                          var_88c_4 = 0x100006d2;
004eac83                          goto label_4eac8e;
004eac81                      }
004eaa41                  }
004eaa41                  else
004eaa41                  {
004eaa43                      var_88c_4 = 0x1000049a;
004eac8e                  label_4eac8e:
004eac8e                      class UIElement* eax_43 = UIElement::GetChildRecursive(this->m_pGameplayUI, var_88c_4);
004eac9d                      eax_43->vtable->ResizeTo(var_870, var_86c);
004eacae                      eax_43->vtable->MoveTo(var_878, var_874);
004eaa41                  }
004eaa20              }
004eaa20              
004eacc2              i = fgets(&PStringBase<char>::s_NullBuffer_5, 0x834, eax_1);
004eaccd          } while (i != 0);
004eacd3          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4;
004eacd3          PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_4;
004ea9eb      }
004ea9eb      
004eacd8      fclose(eax_1);
004eacd8      
004eacf6      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
004eacfe          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
004eacfe      
004ead04      void* esi_26 = ((char*)var_86c - 0x14);
004ead04      
004ead13      if ((InterlockedDecrement(((char*)esi_26 + 4)) == 0 && esi_26 != 0))
004ead1b          **(uint32_t**)esi_26(1);
004ead1b      
004ead33      if ((InterlockedDecrement(((char*)var_10 - 0x10)) == 0 && var_10 != 0x14))
004ead3b          **(uint32_t**)((char*)var_10 - 0x14)(1);
004ead3b      
004ead4c      return 1;
004ea8f0  }

004ead4f                                               90                                                                 .

004ead50  void __thiscall gmGamePlayUI::SaveScreenLayout(class gmGamePlayUI* this, class PStringBase<char> arg2)

004ead50  {
004ead53      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004ead62      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_1;
004ead6c      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004ead6e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004ead73      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
004ead7b      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004ead82      void* __offset(PSRefBufferCharData<char>, -0x14) ebx = &PStringBase<char>::s_NullBuffer->m_data[0xffffffec];
004ead8d      InterlockedIncrement(((char*)ebx + 4));
004ead98      class PSRefBufferCharData<char>** var_30 = &PStringBase<char>::s_NullBuffer_4;
004eada1      InterlockedIncrement((arg2 - 0x10));
004eada5      gmGamePlayUI::CreateScreenLayoutPath(this, arg2, &PStringBase<char>::s_NullBuffer_4);
004eadba      int32_t esi = fopen(PStringBase<char>::s_NullBuffer_4, &data_7945dc);
004eadba      
004eadc1      if (esi == 0)
004eadc1      {
004eadd7          esi = fopen(PStringBase<char>::s_NullBuffer_4, &data_7a6738);
004eadd7          
004eadde          if (esi != 0)
004eadde              goto label_4eae71;
004eadde          
004eadf6          if ((InterlockedDecrement(((char*)ebx + 4)) == 0 && ebx != 0))
004eadfe              *(uint32_t*)*(int32_t*)((char*)ADJ(ebx) + -0x14)(1);
004eadfe          
004eae04          void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
004eae04          
004eae13          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004eae1b              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004eae1b          
004eae21          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
004eae21          
004eae30          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
004eae38              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
004eae38          
004eae4d          if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
004eae5a              **(uint32_t**)(arg2 - 0x14)(1);
004eae5a          
004eae4d          return;
004eadc1      }
004eadc1      
004eae71  label_4eae71:
004eae71      class UIElement* eax_14 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x1000049a);
004eae7a      int32_t eax_15 = UIRegion::GetScreenX0(eax_14);
004eae83      int32_t eax_16 = UIRegion::GetScreenY0(eax_14);
004eaea6      int32_t var_2c_8 = UIRegion::GetHeight(eax_14);
004eaea7      int32_t var_30_4 = UIRegion::GetWidth(eax_14);
004eaea8      int32_t var_34_1 = eax_16;
004eaea9      int32_t var_38_1 = eax_15;
004eaeb4      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "<SBOX> X:%d Y: %d W: %d H: %d\n");
004eaeb9      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
004eaecc      fwrite(PStringBase<char>::s_NullBuffer_5, 1, (PStringBase<char>::s_NullBuffer_5->m_data[-4] - 1), esi);
004eaedc      class UIElement* eax_19 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x10000601);
004eaee5      int32_t eax_20 = UIRegion::GetScreenX0(eax_19);
004eaef0      int32_t eax_21 = UIRegion::GetScreenY0(eax_19);
004eaf13      int32_t var_2c_9 = UIRegion::GetHeight(eax_19);
004eaf14      int32_t var_30_5 = UIRegion::GetWidth(eax_19);
004eaf19      int32_t var_34_2 = eax_21;
004eaf1a      int32_t var_38_2 = eax_20;
004eaf25      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "<CHAT> X:%d Y: %d W: %d H: %d\n");
004eaf2a      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_3;
004eaf37      fwrite(PStringBase<char>::s_NullBuffer_6, 1, (PStringBase<char>::s_NullBuffer_6->m_data[-4] - 1), esi);
004eaf47      class UIElement* eax_25 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x10000505);
004eaf50      int32_t eax_26 = UIRegion::GetScreenX0(eax_25);
004eaf5b      int32_t eax_27 = UIRegion::GetScreenY0(eax_25);
004eaf7e      int32_t var_2c_10 = UIRegion::GetHeight(eax_25);
004eaf7f      int32_t var_30_6 = UIRegion::GetWidth(eax_25);
004eaf84      int32_t var_34_3 = eax_27;
004eaf85      int32_t var_38_3 = eax_26;
004eaf90      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "<FCH1> X:%d Y: %d W: %d H: %d\n");
004eaf95      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_3;
004eafa2      fwrite(PStringBase<char>::s_NullBuffer_7, 1, (PStringBase<char>::s_NullBuffer_7->m_data[-4] - 1), esi);
004eafb2      class UIElement* eax_31 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x1000050e);
004eafbb      int32_t eax_32 = UIRegion::GetScreenX0(eax_31);
004eafc6      int32_t eax_33 = UIRegion::GetScreenY0(eax_31);
004eafe9      int32_t var_2c_11 = UIRegion::GetHeight(eax_31);
004eafea      int32_t var_30_7 = UIRegion::GetWidth(eax_31);
004eafef      int32_t var_34_4 = eax_33;
004eaff0      int32_t var_38_4 = eax_32;
004eaffb      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "<FCH2> X:%d Y: %d W: %d H: %d\n");
004eb000      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_3;
004eb00d      fwrite(PStringBase<char>::s_NullBuffer_8, 1, (PStringBase<char>::s_NullBuffer_8->m_data[-4] - 1), esi);
004eb01d      class UIElement* eax_37 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x1000050f);
004eb026      int32_t eax_38 = UIRegion::GetScreenX0(eax_37);
004eb031      int32_t eax_39 = UIRegion::GetScreenY0(eax_37);
004eb054      int32_t var_2c_12 = UIRegion::GetHeight(eax_37);
004eb055      int32_t var_30_8 = UIRegion::GetWidth(eax_37);
004eb05a      int32_t var_34_5 = eax_39;
004eb05b      int32_t var_38_5 = eax_38;
004eb066      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "<FCH3> X:%d Y: %d W: %d H: %d\n");
004eb06b      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_3;
004eb078      fwrite(PStringBase<char>::s_NullBuffer_9, 1, (PStringBase<char>::s_NullBuffer_9->m_data[-4] - 1), esi);
004eb088      class UIElement* eax_43 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x10000510);
004eb091      int32_t eax_44 = UIRegion::GetScreenX0(eax_43);
004eb09c      int32_t eax_45 = UIRegion::GetScreenY0(eax_43);
004eb0bf      int32_t var_2c_13 = UIRegion::GetHeight(eax_43);
004eb0c0      int32_t var_30_9 = UIRegion::GetWidth(eax_43);
004eb0c5      int32_t var_34_6 = eax_45;
004eb0c6      int32_t var_38_6 = eax_44;
004eb0d1      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "<FCH4> X:%d Y: %d W: %d H: %d\n");
004eb0d6      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_3;
004eb0e3      fwrite(PStringBase<char>::s_NullBuffer_10, 1, (PStringBase<char>::s_NullBuffer_10->m_data[-4] - 1), esi);
004eb0f3      class UIElement* eax_49 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x100005f7);
004eb0fc      int32_t eax_50 = UIRegion::GetScreenX0(eax_49);
004eb107      int32_t eax_51 = UIRegion::GetScreenY0(eax_49);
004eb12a      int32_t var_2c_14 = UIRegion::GetHeight(eax_49);
004eb12b      int32_t var_30_10 = UIRegion::GetWidth(eax_49);
004eb130      int32_t var_34_7 = eax_51;
004eb131      int32_t var_38_7 = eax_50;
004eb13c      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_UserPreferenceChanged_Menu);
004eb141      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_3;
004eb14e      fwrite(PStringBase<char>::s_NullBuffer_11, 1, (PStringBase<char>::s_NullBuffer_11->m_data[-4] - 1), esi);
004eb15e      class UIElement* eax_55 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x100005fa);
004eb167      int32_t eax_56 = UIRegion::GetScreenX0(eax_55);
004eb172      int32_t eax_57 = UIRegion::GetScreenY0(eax_55);
004eb195      int32_t var_2c_15 = UIRegion::GetHeight(eax_55);
004eb196      int32_t var_30_11 = UIRegion::GetWidth(eax_55);
004eb19b      int32_t var_34_8 = eax_57;
004eb19c      int32_t var_38_8 = eax_56;
004eb1a7      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_StackSliderChanged);
004eb1ac      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_3;
004eb1b9      fwrite(PStringBase<char>::s_NullBuffer_12, 1, (PStringBase<char>::s_NullBuffer_12->m_data[-4] - 1), esi);
004eb1c9      class UIElement* eax_61 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x100006d5);
004eb1d2      int32_t eax_62 = UIRegion::GetScreenX0(eax_61);
004eb1dd      int32_t eax_63 = UIRegion::GetScreenY0(eax_61);
004eb200      int32_t var_2c_16 = UIRegion::GetHeight(eax_61);
004eb201      int32_t var_30_12 = UIRegion::GetWidth(eax_61);
004eb206      int32_t var_34_9 = eax_63;
004eb207      int32_t var_38_9 = eax_62;
004eb212      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_RefreshOptionsPanel);
004eb217      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_13 = PStringBase<char>::s_NullBuffer_3;
004eb224      fwrite(PStringBase<char>::s_NullBuffer_13, 1, (PStringBase<char>::s_NullBuffer_13->m_data[-4] - 1), esi);
004eb234      class UIElement* eax_67 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x100005fd);
004eb23d      int32_t eax_68 = UIRegion::GetScreenX0(eax_67);
004eb248      int32_t eax_69 = UIRegion::GetScreenY0(eax_67);
004eb26b      int32_t var_2c_17 = UIRegion::GetHeight(eax_67);
004eb26c      int32_t var_30_13 = UIRegion::GetWidth(eax_67);
004eb271      int32_t var_34_10 = eax_69;
004eb272      int32_t var_38_10 = eax_68;
004eb27d      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_FullMergingItem);
004eb282      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_3;
004eb28f      fwrite(PStringBase<char>::s_NullBuffer_14, 1, (PStringBase<char>::s_NullBuffer_14->m_data[-4] - 1), esi);
004eb29f      class UIElement* eax_73 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x100005ff);
004eb2a8      int32_t eax_74 = UIRegion::GetScreenX0(eax_73);
004eb2b3      int32_t eax_75 = UIRegion::GetScreenY0(eax_73);
004eb2d6      int32_t var_2c_18 = UIRegion::GetHeight(eax_73);
004eb2d7      int32_t var_30_14 = UIRegion::GetWidth(eax_73);
004eb2dc      int32_t var_34_11 = eax_75;
004eb2dd      int32_t var_38_11 = eax_74;
004eb2e8      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_TradeAnItemForDummies);
004eb2ed      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_15 = PStringBase<char>::s_NullBuffer_3;
004eb2fa      fwrite(PStringBase<char>::s_NullBuffer_15, 1, (PStringBase<char>::s_NullBuffer_15->m_data[-4] - 1), esi);
004eb30a      class UIElement* eax_79 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x10000603);
004eb313      int32_t eax_80 = UIRegion::GetScreenX0(eax_79);
004eb31e      int32_t eax_81 = UIRegion::GetScreenY0(eax_79);
004eb33d      int32_t var_2c_19 = UIRegion::GetHeight(eax_79);
004eb33e      int32_t var_30_15 = UIRegion::GetWidth(eax_79);
004eb343      int32_t var_34_12 = eax_81;
004eb348      int32_t var_38_12 = eax_80;
004eb353      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_AddItemToTrade);
004eb358      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_16 = PStringBase<char>::s_NullBuffer_3;
004eb365      fwrite(PStringBase<char>::s_NullBuffer_16, 1, (PStringBase<char>::s_NullBuffer_16->m_data[-4] - 1), esi);
004eb375      class UIElement* eax_85 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x10000611);
004eb37e      int32_t eax_86 = UIRegion::GetScreenX0(eax_85);
004eb389      int32_t eax_87 = UIRegion::GetScreenY0(eax_85);
004eb3ac      int32_t var_2c_20 = UIRegion::GetHeight(eax_85);
004eb3ad      int32_t var_30_16 = UIRegion::GetWidth(eax_85);
004eb3b2      int32_t var_34_13 = eax_87;
004eb3b3      int32_t var_38_13 = eax_86;
004eb3be      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_ChatCommand_RemoveFriend);
004eb3c3      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_3;
004eb3d0      fwrite(PStringBase<char>::s_NullBuffer_17, 1, (PStringBase<char>::s_NullBuffer_17->m_data[-4] - 1), esi);
004eb3e0      class UIElement* eax_91 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x10000613);
004eb3e9      int32_t eax_92 = UIRegion::GetScreenX0(eax_91);
004eb3f4      int32_t eax_93 = UIRegion::GetScreenY0(eax_91);
004eb417      int32_t var_2c_21 = UIRegion::GetHeight(eax_91);
004eb418      int32_t var_30_17 = UIRegion::GetWidth(eax_91);
004eb41d      int32_t var_34_14 = eax_93;
004eb41e      int32_t var_38_14 = eax_92;
004eb429      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_UpdateSpellComponents);
004eb42e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_18 = PStringBase<char>::s_NullBuffer_3;
004eb43b      fwrite(PStringBase<char>::s_NullBuffer_18, 1, (PStringBase<char>::s_NullBuffer_18->m_data[-4] - 1), esi);
004eb44b      class UIElement* eax_97 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x100006b5);
004eb454      int32_t eax_98 = UIRegion::GetScreenX0(eax_97);
004eb45f      int32_t eax_99 = UIRegion::GetScreenY0(eax_97);
004eb482      int32_t var_2c_22 = UIRegion::GetHeight(eax_97);
004eb483      int32_t var_30_18 = UIRegion::GetWidth(eax_97);
004eb488      int32_t var_34_15 = eax_99;
004eb489      int32_t var_38_15 = eax_98;
004eb494      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_NextSpellSelection);
004eb499      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_19 = PStringBase<char>::s_NullBuffer_3;
004eb4a6      fwrite(PStringBase<char>::s_NullBuffer_19, 1, (PStringBase<char>::s_NullBuffer_19->m_data[-4] - 1), esi);
004eb4b6      class UIElement* eax_103 = UIElement::GetChildRecursive(this->m_pGameplayUI, 0x100006d2);
004eb4bf      int32_t eax_104 = UIRegion::GetScreenX0(eax_103);
004eb4c8      int32_t eax_105 = UIRegion::GetScreenY0(eax_103);
004eb4e7      int32_t var_2c_23 = UIRegion::GetHeight(eax_103);
004eb4e8      int32_t var_30_19 = UIRegion::GetWidth(eax_103);
004eb4ed      int32_t var_34_16 = eax_105;
004eb4ee      int32_t var_38_16 = eax_104;
004eb4f9      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, &gmGamePlayUI::`vftable'.RecvNotice_AddSpellShortcut);
004eb4fe      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_20 = PStringBase<char>::s_NullBuffer_3;
004eb50b      fwrite(PStringBase<char>::s_NullBuffer_20, 1, (PStringBase<char>::s_NullBuffer_20->m_data[-4] - 1), esi);
004eb50e      fclose(esi);
004eb50e      
004eb52d      if ((InterlockedDecrement(((char*)ebx + 4)) == 0 && ebx != 0))
004eb535          *(uint32_t*)*(int32_t*)((char*)ADJ(ebx) + -0x14)(1);
004eb535      
004eb53b      void* __offset(PSRefBufferCharData<char>, -0x14) edi_4 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
004eb53b      
004eb54a      if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
004eb552          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
004eb552      
004eb558      void* __offset(PSRefBufferCharData<char>, -0x14) edi_6 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
004eb558      
004eb567      if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
004eb56f          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_6) + -0x14)(1);
004eb56f      
004eb584      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
004eb58c          **(uint32_t**)(arg2 - 0x14)(1);
004ead50  }

004eb598                                                                          90 90 90 90 90 90 90 90                          ........

004eb5a0  void __thiscall gmGamePlayUI::ListenToGlobalMessage(class gmGamePlayUI* this, uint32_t arg2, int32_t arg3)

004eb5a0  {
004eb5a8      class PStringBase<char> this_1;
004eb5a8      
004eb5a8      if (arg2 == 1)
004eb5a8      {
004eb5e5          this_1 = arg3;
004eb5e8          gmGamePlayUI::HandleKeyPress(this, this_1);
004eb5e8          return;
004eb5a8      }
004eb5a8      
004eb5ad      if (arg2 == 3)
004eb5ad      {
004eb5d8          gmGamePlayUI::UseTime(this);
004eb5de          return;
004eb5ad      }
004eb5ad      
004eb5bc      if ((arg2 == 0xe && this->m_endingSession == 0))
004eb5bc      {
004eb5be          this_1 = this;
004eb5cd          gmGamePlayUI::LoadScreenLayout(this, PStringBase<char>::PStringBase<char>(&this_1, &gmGamePlayUI::`vftable'.RecvNotice_AttackHeightChanged));
004eb5bc      }
004eb5a0  }

004eb5f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004eb600  void __thiscall gmGamePlayUI::RecvNotice_SaveUI(class gmGamePlayUI* this, class PStringBase<char> const* arg2)

004eb600  {
004eb604      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004eb607      class gmGamePlayUI* this_1 = this;
004eb612      InterlockedIncrement(&m_charbuffer[-1]);
004eb61e      gmGamePlayUI::SaveScreenLayout(((char*)this - 0x98), m_charbuffer);
004eb600  }

004eb627                       90 90 90 90 90 90 90 90 90                                                         .........

004eb630  void __thiscall gmGamePlayUI::RecvNotice_LoadUI(class gmGamePlayUI* this, class PStringBase<char> const* arg2)

004eb630  {
004eb634      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004eb637      class gmGamePlayUI* this_1 = this;
004eb63c      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
004eb64e      gmGamePlayUI::LoadScreenLayout(((char*)this - 0x98), InterlockedIncrement(&m_charbuffer[-1]));
004eb630  }

004eb657                                                                       90 90 90 90 90 90 90 90 90                         .........

004eb660  void __fastcall gmGamePlayUI::RecvNotice_PlayerDescReceived(class gmGamePlayUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004eb660  {
004eb664      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
004eb664      
004eb66d      if (eax != 0)
004eb66d      {
004eb66f          class gmGamePlayUI* this_1 = this;
004eb689          int32_t eax_1;
004eb689          eax_1 = gmGamePlayUI::LoadScreenLayout(((char*)this - 0x98), PStringBase<char>::PStringBase<char>(&this_1, &gmGamePlayUI::`vftable'.RecvNotice_AttackHeightChanged)) != 0;
004eb68c          eax->m_layoutFromFile = eax_1;
004eb66d      }
004eb660  }

004eb697                                                                       90 90 90 90 90 90 90 90 90                         .........

004eb6a0  uint8_t __thiscall gmGamePlayUI::MakeLogoutConfirmationDialog(class gmGamePlayUI* this, class StringInfo const* arg2)

004eb6a0  {
004eb6b4      if (this->m_logoutContext == 0)
004eb6b4      {
004eb6ba          struct gmGamePlayUI::VTable* vtable = this->vtable;
004eb6be          this->m_bLogoutConfirmed = 0;
004eb6c4          vtable->Show(1);
004eb6cb          void var_78;
004eb6cb          PropertyCollection::PropertyCollection(&var_78);
004eb6d9          int32_t* var_84 = nullptr;
004eb6dd          int32_t* var_80_1 = nullptr;
004eb6e1          BaseProperty::SetPropertyName(&var_84, 0x8e);
004eb6e1          
004eb6ea          if (var_80_1 != 0)
004eb6ea          {
004eb6f0              BaseProperty::CheckCopyOnWrite(&var_84);
004eb6fd              *(uint32_t*)(*(uint32_t*)var_80_1 + 0xac)(1);
004eb6ea          }
004eb6ea          
004eb70c          uint32_t var_7c = BaseProperty::GetPropertyName(&var_84);
004eb71e          void var_74;
004eb71e          HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004eb72c          BaseProperty::SetPropertyName(&var_84, 0xc3);
004eb72c          
004eb735          if (var_80_1 != 0)
004eb735          {
004eb73b              BaseProperty::CheckCopyOnWrite(&var_84);
004eb748              *(uint32_t*)(*(uint32_t*)var_80_1 + 0xac)(1);
004eb735          }
004eb735          
004eb757          var_7c = BaseProperty::GetPropertyName(&var_84);
004eb769          HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004eb777          BaseProperty::SetPropertyName(&var_84, 0xc5);
004eb777          
004eb780          if (var_80_1 != 0)
004eb780          {
004eb786              BaseProperty::CheckCopyOnWrite(&var_84);
004eb799              *(uint32_t*)(*(uint32_t*)var_80_1 + 0xc4)(arg2);
004eb780          }
004eb780          
004eb7b6          var_7c = BaseProperty::GetPropertyName(&var_84);
004eb7ba          HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004eb7c5          uint32_t eax_5 = DialogFactory::MakeDialog(this, &var_78);
004eb7cd          this->m_logoutContext = eax_5;
004eb7d5          int32_t* eax_6 = var_84;
004eb7d5          
004eb7d9          if (eax_5 != 0)
004eb7d9          {
004eb7dd              if (eax_6 != 0)
004eb7dd              {
004eb7e7                  int32_t esi_2 = (eax_6[1] - 1);
004eb7e4                  eax_6[1] = esi_2;
004eb7e4                  
004eb7ee                  if (esi_2 == 0)
004eb7f4                      **(uint32_t**)eax_6(1);
004eb7f4                  
004eb7f6                  var_84 = nullptr;
004eb7dd              }
004eb7dd              
004eb800              if (var_80_1 != 0)
004eb800              {
004eb80a                  int32_t esi_4 = (var_80_1[1] - 1);
004eb807                  var_80_1[1] = esi_4;
004eb807                  
004eb811                  if (esi_4 == 0)
004eb817                      **(uint32_t**)var_80_1(1);
004eb817                  
004eb819                  int32_t var_80_2 = 0;
004eb800              }
004eb800              
004eb821              PropertyCollection::~PropertyCollection(&var_78);
004eb827              int32_t eax_11;
004eb827              eax_11 = 1;
004eb830              return 1;
004eb7d9          }
004eb7d9          
004eb835          if (eax_6 != 0)
004eb835          {
004eb83f              int32_t esi_6 = (eax_6[1] - 1);
004eb83c              eax_6[1] = esi_6;
004eb83c              
004eb846              if (esi_6 == 0)
004eb84c                  **(uint32_t**)eax_6(1);
004eb84c              
004eb84e              var_84 = nullptr;
004eb835          }
004eb835          
004eb858          if (var_80_1 != 0)
004eb858          {
004eb862              int32_t esi_8 = (var_80_1[1] - 1);
004eb85f              var_80_1[1] = esi_8;
004eb85f              
004eb869              if (esi_8 == 0)
004eb86f                  **(uint32_t**)var_80_1(1);
004eb86f              
004eb871              int32_t var_80_3 = 0;
004eb858          }
004eb858          
004eb879          PropertyCollection::~PropertyCollection(&var_78);
004eb6b4      }
004eb6b4      
004eb87f      uint32_t eax;
004eb87f      eax = 0;
004eb888      return 0;
004eb6a0  }

004eb88b                                   90 90 90 90 90                                                             .....

004eb890  uint8_t __thiscall gmGamePlayUI::MakeGameplayConfirmationDialog(class gmGamePlayUI* this, class StringInfo const* arg2)

004eb890  {
004eb8a4      if (this->m_gameplayConfirmationContext == 0)
004eb8a4      {
004eb8ae          void var_78;
004eb8ae          PropertyCollection::PropertyCollection(&var_78);
004eb8bc          int32_t* var_84 = nullptr;
004eb8c0          int32_t* var_80_1 = nullptr;
004eb8c4          BaseProperty::SetPropertyName(&var_84, 0x8e);
004eb8c4          
004eb8cd          if (var_80_1 != 0)
004eb8cd          {
004eb8d3              BaseProperty::CheckCopyOnWrite(&var_84);
004eb8e0              *(uint32_t*)(*(uint32_t*)var_80_1 + 0xac)(1);
004eb8cd          }
004eb8cd          
004eb8fd          uint32_t var_7c = BaseProperty::GetPropertyName(&var_84);
004eb901          void var_74;
004eb901          HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004eb90f          BaseProperty::SetPropertyName(&var_84, 0xac);
004eb90f          
004eb918          if (var_80_1 != 0)
004eb918          {
004eb91e              BaseProperty::CheckCopyOnWrite(&var_84);
004eb92b              *(uint32_t*)(*(uint32_t*)var_80_1 + 0x74)(1);
004eb918          }
004eb918          
004eb945          var_7c = BaseProperty::GetPropertyName(&var_84);
004eb949          HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004eb957          BaseProperty::SetPropertyName(&var_84, 0xc5);
004eb957          
004eb960          if (var_80_1 != 0)
004eb960          {
004eb966              BaseProperty::CheckCopyOnWrite(&var_84);
004eb979              *(uint32_t*)(*(uint32_t*)var_80_1 + 0xc4)(arg2);
004eb960          }
004eb960          
004eb988          var_7c = BaseProperty::GetPropertyName(&var_84);
004eb99a          HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004eb9a5          uint32_t eax_7 = DialogFactory::MakeDialog(this, &var_78);
004eb9ad          this->m_gameplayConfirmationContext = eax_7;
004eb9b5          int32_t* eax_8 = var_84;
004eb9b5          
004eb9b9          if (eax_7 != 0)
004eb9b9          {
004eba15              if (eax_8 != 0)
004eba15              {
004eba1f                  int32_t esi_6 = (eax_8[1] - 1);
004eba1c                  eax_8[1] = esi_6;
004eba1c                  
004eba26                  if (esi_6 == 0)
004eba2c                      **(uint32_t**)eax_8(1);
004eba2c                  
004eba2e                  var_84 = nullptr;
004eba15              }
004eba15              
004eba38              if (var_80_1 != 0)
004eba38              {
004eba42                  int32_t esi_8 = (var_80_1[1] - 1);
004eba3f                  var_80_1[1] = esi_8;
004eba3f                  
004eba49                  if (esi_8 == 0)
004eba4f                      **(uint32_t**)var_80_1(1);
004eba4f                  
004eba51                  int32_t var_80_3 = 0;
004eba38              }
004eba38              
004eba59              PropertyCollection::~PropertyCollection(&var_78);
004eba5f              int32_t eax_17;
004eba5f              eax_17 = 1;
004eba68              return 1;
004eb9b9          }
004eb9b9          
004eb9bd          if (eax_8 != 0)
004eb9bd          {
004eb9c7              int32_t esi_2 = (eax_8[1] - 1);
004eb9c4              eax_8[1] = esi_2;
004eb9c4              
004eb9ce              if (esi_2 == 0)
004eb9d4                  **(uint32_t**)eax_8(1);
004eb9d4              
004eb9d6              var_84 = nullptr;
004eb9bd          }
004eb9bd          
004eb9e0          if (var_80_1 != 0)
004eb9e0          {
004eb9ea              int32_t esi_4 = (var_80_1[1] - 1);
004eb9e7              var_80_1[1] = esi_4;
004eb9e7              
004eb9f1              if (esi_4 == 0)
004eb9f7                  **(uint32_t**)var_80_1(1);
004eb9f7              
004eb9f9              int32_t var_80_2 = 0;
004eb9e0          }
004eb9e0          
004eba01          PropertyCollection::~PropertyCollection(&var_78);
004eb8a4      }
004eb8a4      
004eba07      uint32_t eax;
004eba07      eax = 0;
004eba10      return 0;
004eb890  }

004eba6b                                   90 90 90 90 90                                                             .....

004eba70  void __thiscall gmGamePlayUI::RecvNotice_AlterSkill_ConfirmationRequest(class gmGamePlayUI* this, class AC1Legacy::PStringBase<char> const* arg2, uint32_t arg3)

004eba70  {
004eba89      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = arg3;
004eba8c      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = 2;
004eba93      int32_t* var_94;
004eba93      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_94, " Continue?");
004ebaa9      class AC1Legacy::PStringBase<char> __return;
004ebaa9      AC1Legacy::PStringBase<char>::operator+(arg2, &__return, &var_94);
004ebaae      int32_t* esi = var_94;
004ebaae      
004ebac4      if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
004ebacc          **(uint32_t**)esi(1);
004ebacc      
004ebad2      void var_90;
004ebad2      StringInfo::StringInfo(&var_90);
004ebad7      class AC1Legacy::PStringBase<char> __return_1 = __return;
004ebae7      class PStringBase<unsigned short>* eax_3;
004ebae7      void* ebx_1;
004ebae7      eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, (__return_1 + 0x14));
004ebaf1      StringInfo::SetLiteralValue(&var_90, eax_3, 1);
004ebafa      int32_t* esi_2 = (__return - 0x14);
004ebafa      
004ebb09      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004ebb11          **(uint32_t**)esi_2(1);
004ebb11      
004ebb1e      gmGamePlayUI::MakeGameplayConfirmationDialog(((char*)ebx_1 - 0x98), &var_90);
004ebb27      StringInfo::~StringInfo(&var_90);
004ebb27      
004ebb38      if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004ebb40          **(uint32_t**)__return_1(1);
004eba70  }

004ebb4f                                               90                                                                 .

004ebb50  void __thiscall gmGamePlayUI::RecvNotice_AlterAttribute_ConfirmationRequest(class gmGamePlayUI* this, class AC1Legacy::PStringBase<char> const* arg2, uint32_t arg3)

004ebb50  {
004ebb69      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = arg3;
004ebb6c      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = 3;
004ebb73      int32_t* var_94;
004ebb73      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_94, " Continue?");
004ebb89      class AC1Legacy::PStringBase<char> __return;
004ebb89      AC1Legacy::PStringBase<char>::operator+(arg2, &__return, &var_94);
004ebb8e      int32_t* esi = var_94;
004ebb8e      
004ebba4      if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
004ebbac          **(uint32_t**)esi(1);
004ebbac      
004ebbb2      void var_90;
004ebbb2      StringInfo::StringInfo(&var_90);
004ebbb7      class AC1Legacy::PStringBase<char> __return_1 = __return;
004ebbc7      class PStringBase<unsigned short>* eax_3;
004ebbc7      void* ebx_1;
004ebbc7      eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, (__return_1 + 0x14));
004ebbd1      StringInfo::SetLiteralValue(&var_90, eax_3, 1);
004ebbda      int32_t* esi_2 = (__return - 0x14);
004ebbda      
004ebbe9      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004ebbf1          **(uint32_t**)esi_2(1);
004ebbf1      
004ebbfe      gmGamePlayUI::MakeGameplayConfirmationDialog(((char*)ebx_1 - 0x98), &var_90);
004ebc07      StringInfo::~StringInfo(&var_90);
004ebc07      
004ebc18      if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004ebc20          **(uint32_t**)__return_1(1);
004ebb50  }

004ebc2f                                               90                                                                 .

004ebc30  void __thiscall gmGamePlayUI::RecvNotice_Augmentation_ConfirmationRequest(class gmGamePlayUI* this, class AC1Legacy::PStringBase<char> const* arg2, uint32_t arg3)

004ebc30  {
004ebc49      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = arg3;
004ebc4c      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = 6;
004ebc53      int32_t* var_94;
004ebc53      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_94, " Continue?");
004ebc69      class AC1Legacy::PStringBase<char> __return;
004ebc69      AC1Legacy::PStringBase<char>::operator+(arg2, &__return, &var_94);
004ebc6e      int32_t* esi = var_94;
004ebc6e      
004ebc84      if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
004ebc8c          **(uint32_t**)esi(1);
004ebc8c      
004ebc92      void var_90;
004ebc92      StringInfo::StringInfo(&var_90);
004ebc97      class AC1Legacy::PStringBase<char> __return_1 = __return;
004ebca7      class PStringBase<unsigned short>* eax_3;
004ebca7      void* ebx_1;
004ebca7      eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, (__return_1 + 0x14));
004ebcb1      StringInfo::SetLiteralValue(&var_90, eax_3, 1);
004ebcba      int32_t* esi_2 = (__return - 0x14);
004ebcba      
004ebcc9      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004ebcd1          **(uint32_t**)esi_2(1);
004ebcd1      
004ebcde      gmGamePlayUI::MakeGameplayConfirmationDialog(((char*)ebx_1 - 0x98), &var_90);
004ebce7      StringInfo::~StringInfo(&var_90);
004ebce7      
004ebcf8      if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004ebd00          **(uint32_t**)__return_1(1);
004ebc30  }

004ebd0f                                               90                                                                 .

004ebd10  void __thiscall gmGamePlayUI::RecvNotice_YesNo_ConfirmationRequest(class gmGamePlayUI* this, class AC1Legacy::PStringBase<char> const* arg2, uint32_t arg3)

004ebd10  {
004ebd27      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = arg3;
004ebd2a      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = 7;
004ebd31      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
004ebd37      InterlockedIncrement(&m_buffer->m_cRef);
004ebd41      void var_90;
004ebd41      StringInfo::StringInfo(&var_90);
004ebd52      class PStringBase<unsigned short> var_94;
004ebd52      class PStringBase<unsigned short>* eax;
004ebd52      int32_t* esi;
004ebd52      eax = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, WidthConvert, &m_buffer->m_data);
004ebd5c      StringInfo::SetLiteralValue(&var_90, eax, 1);
004ebd65      int32_t* ebx_1 = (var_94 - 0x14);
004ebd65      
004ebd78      if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
004ebd80          **(uint32_t**)ebx_1(1);
004ebd80      
004ebd8d      gmGamePlayUI::MakeGameplayConfirmationDialog(((char*)this - 0x98), &var_90);
004ebd96      StringInfo::~StringInfo(&var_90);
004ebd96      
004ebda8      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && esi != 0))
004ebdb0          **(uint32_t**)esi(1);
004ebd10  }

004ebdbf                                                                                               90                                 .

004ebdc0  void __thiscall gmGamePlayUI::RecvNotice_CraftInteraction_ConfirmationRequest(class gmGamePlayUI* this, class AC1Legacy::PStringBase<char> const* arg2, uint32_t arg3)

004ebdc0  {
004ebdd9      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = arg3;
004ebddc      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = 5;
004ebde3      int32_t* var_94;
004ebde3      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_94, " Continue?");
004ebdf9      class AC1Legacy::PStringBase<char> __return;
004ebdf9      AC1Legacy::PStringBase<char>::operator+(arg2, &__return, &var_94);
004ebdfe      int32_t* esi = var_94;
004ebdfe      
004ebe14      if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
004ebe1c          **(uint32_t**)esi(1);
004ebe1c      
004ebe22      void var_90;
004ebe22      StringInfo::StringInfo(&var_90);
004ebe27      class AC1Legacy::PStringBase<char> __return_1 = __return;
004ebe37      class PStringBase<unsigned short>* eax_3;
004ebe37      void* ebx_1;
004ebe37      eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, (__return_1 + 0x14));
004ebe41      StringInfo::SetLiteralValue(&var_90, eax_3, 1);
004ebe4a      int32_t* esi_2 = (__return - 0x14);
004ebe4a      
004ebe59      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004ebe61          **(uint32_t**)esi_2(1);
004ebe61      
004ebe6e      gmGamePlayUI::MakeGameplayConfirmationDialog(((char*)ebx_1 - 0x98), &var_90);
004ebe77      StringInfo::~StringInfo(&var_90);
004ebe77      
004ebe88      if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004ebe90          **(uint32_t**)__return_1(1);
004ebdc0  }

004ebe9f                                                                                               90                                 .

004ebea0  void __thiscall gmGamePlayUI::RecvNotice_EndCharacterSession(class gmGamePlayUI* this, int32_t arg2)

004ebea0  {
004ebeaf      if (arg2 == 0)
004ebeaf      {
004ebefb          *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[3] = 1;
004ebefe          *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[1] = 1;
004ebf01          *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[2] = 1;
004ebf0b          return;
004ebeaf      }
004ebeaf      
004ebeb5      *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[1] = 1;
004ebeb9      *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[2] = 0;
004ebebd      void var_90;
004ebebd      StringInfo::StringInfo(&var_90);
004ebed1      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004ebee1      gmGamePlayUI::MakeLogoutConfirmationDialog(((char*)this - 0x98), &var_90);
004ebeea      StringInfo::~StringInfo(&var_90);
004ebea0  }

004ebf0e                                            90 90                                                                ..

004ebf10  void __fastcall gmGamePlayUI::RecvNotice_Logoff(class gmGamePlayUI* this)

004ebf10  {
004ebf1f      *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[1] = 1;
004ebf22      *(uint8_t*)((char*)this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8])[2] = 1;
004ebf25      void var_90;
004ebf25      StringInfo::StringInfo(&var_90);
004ebf39      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004ebf49      gmGamePlayUI::MakeLogoutConfirmationDialog(((char*)this - 0x98), &var_90);
004ebf52      StringInfo::~StringInfo(&var_90);
004ebf10  }

004ebf5f                                                                                               90                                 .

004ebf60  void __thiscall gmCharacterManagementUI::RecvNotice_CharGenVerificationResponse(class gmCharacterManagementUI* this, enum CG_VERIFICATION_RESPONSE arg2)

004ebf60  {
004ebf6d      DialogFactory::CloseDialog(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[9]);
004ebf7f      void var_90;
004ebf7f      
004ebf7f      if (arg2 == CG_VERIFICATION_RESPONSE_NAME_IN_USE)
004ebf7f      {
004ebfaf          StringInfo::StringInfo(&var_90);
004ebfc4      label_4ebfc4:
004ebfc4          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ebfda          *(uint32_t*)(*(int32_t*)((char*)this + -0x98) + 0x3c)(&var_90);
004ebfe1          StringInfo::~StringInfo(&var_90);
004ebfe1          return;
004ebf7f      }
004ebf7f      
004ebf84      if (arg2 == 5)
004ebf84      {
004ebf9e          StringInfo::StringInfo(&var_90);
004ebfa9          goto label_4ebfc4;
004ebf84      }
004ebf84      
004ebf87      if (arg2 == 6)
004ebf87      {
004ebf8d          StringInfo::StringInfo(&var_90);
004ebf98          goto label_4ebfc4;
004ebf87      }
004ebf60  }


004ebff0  void __fastcall gmCharacterManagementUI::ResetPreviouslySelectedCharacterSlot(class gmCharacterManagementUI* this)

004ebff0  {
004ebff0      class gmCharacterManagementUI* this_1 = this;
004ebff5      class UIPersistantData* eax = UIFramework::GetPersistantData(this);
004ebff5      
004ebffe      if (eax != 0)
004ebffe      {
004ec00e          class UIElement* eax_2 = UIElement_ListBox::GetItem(this->m_charListField, this->m_uiCharListSelectedItem);
004ec00e          
004ec017          if (eax_2 != 0)
004ec017          {
004ec025              this_1 = nullptr;
004ec02d              UIElement::GetAttribute_InstanceID(eax_2, 0x10000009, &this_1);
004ec02d              
004ec03c              if (this->m_iidSelectedCharacter == this_1)
004ec044                  UIElement::SetAttribute_Bool(eax_2, 0xe, 0);
004ec017          }
004ec017          
004ec049          eax->m_iidSelectedAvatar = 0;
004ec052          this->m_iidSelectedCharacter = 0;
004ec05c          this->m_uiCharListSelectedItem = 0xffffffff;
004ec074          CharGenState::SetSlot(CPlayerSystem::GetCharGenState(CPlayerSystem::GetPlayerSystem()), 0xffffffff);
004ebffe      }
004ebff0  }

004ec07e                                                                                            90 90                                ..

004ec080  void __fastcall gmCharacterManagementUI::~gmCharacterManagementUI(class gmCharacterManagementUI* this)

004ec080  {
004ec092      this->vtable = 0x7c3100;
004ec08b      this->vtable = &gmCharacterManagementUI::`vftable';
004ec09e      UIMainFramework::RemoveRootElement(this, &this->m_rootField);
004ec0aa      DialogFactory::CloseDialog(this->m_errorMessageDialogContext);
004ec0b1      this->m_errorMessageDialogContext = 0;
004ec0be      DialogFactory::CloseDialog(this->m_confirmExitDialogContext);
004ec0c3      this->m_confirmExitDialogContext = 0;
004ec0d0      DialogFactory::CloseDialog(this->m_deleteCharacterDialogContext);
004ec0d5      this->m_deleteCharacterDialogContext = 0;
004ec0e2      DialogFactory::CloseDialog(this->m_pleaseWaitDialogContext);
004ec0e7      this->m_pleaseWaitDialogContext = 0;
004ec0f4      DialogFactory::CloseDialog(this->m_enteringWorldDialogContext);
004ec0f9      this->m_enteringWorldDialogContext = 0;
004ec08b      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ec10a      NoticeHandler::~NoticeHandler(&this->vtable);
004ec114      /* tailcall */
004ec114      return UIMainFramework::~UIMainFramework(this);
004ec080  }

004ec119                                                                             90 90 90 90 90 90 90                           .......

004ec120  void __fastcall gmCharacterManagementUI::UpdateWorldName(class gmCharacterManagementUI* this)

004ec120  {
004ec12b      class UIElement* eax = UIElement::GetChildRecursive(this->m_rootField, 0x1000039b);
004ec12b      
004ec132      if (eax != 0)
004ec132      {
004ec13b          class UIElement_Text* eax_1 = eax->vtable->DynamicCast(0xc);
004ec13b          
004ec145          if (eax_1 != 0)
004ec156              UIElement_Text::SetText(eax_1, Client::GetInstance()->vtable->GetWorldName());
004ec132      }
004ec120  }

004ec15d                                                                                         90 90 90                               ...

004ec160  void __thiscall gmCharacterManagementUI::SelectCharacter(class gmCharacterManagementUI* this, uint32_t arg2)

004ec160  {
004ec160      class gmCharacterManagementUI* this_1 = this;
004ec162      uint32_t ebx = arg2;
004ec162      
004ec16f      if (this->m_iidSelectedCharacter != ebx)
004ec16f      {
004ec177          class UIPersistantData* eax_1 = UIFramework::GetPersistantData(this);
004ec177          
004ec18f          if ((eax_1 != 0 && eax_1 != 0xfffffffc))
004ec18f          {
004ec197              gmCharacterManagementUI::ResetPreviouslySelectedCharacterSlot(this);
004ec197              
004ec19e              if (ebx != 0)
004ec19e              {
004ec1b0                  uint32_t edi_1 = 0;
004ec1b0                  
004ec1b4                  if (this->m_charListField->m_listItems.m_num > 0)
004ec1b4                  {
004ec1d8                      while (true)
004ec1d8                      {
004ec1d8                          UIElement::GetAttribute_InstanceID(UIElement_ListBox::GetItem(this->m_charListField, edi_1), 0x10000009, &arg2);
004ec1d8                          
004ec1e1                          if (arg2 == ebx)
004ec1e1                          {
004ec200                              this->m_iidSelectedCharacter = ebx;
004ec206                              eax_1->m_iidSelectedAvatar = ebx;
004ec209                              uint32_t m_iidSelectedCharacter = this->m_iidSelectedCharacter;
004ec210                              this->m_uiCharListSelectedItem = edi_1;
004ec216                              int32_t eax_6 = CharacterSet::GetSlot(&eax_1->_charSet, m_iidSelectedCharacter);
004ec22a                              CharGenState::SetSlot(CPlayerSystem::GetCharGenState(CPlayerSystem::GetPlayerSystem()), eax_6);
004ec22a                              break;
004ec1e1                          }
004ec1e1                          
004ec1ef                          edi_1 += 1;
004ec1ef                          
004ec1f2                          if (edi_1 >= this->m_charListField->m_listItems.m_num)
004ec1f9                              return;
004ec1d8                      }
004ec1b4                  }
004ec19e              }
004ec18f          }
004ec16f      }
004ec160  }

004ec1b8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
004ec237                                                                       90 90 90 90 90 90 90 90 90                         .........

004ec240  void __fastcall gmCharacterManagementUI::UpdateButtons(class gmCharacterManagementUI* this)

004ec240  {
004ec243      class UIPersistantData* eax = UIFramework::GetPersistantData(this);
004ec243      
004ec256      if ((eax != 0 && eax != 0xfffffffc))
004ec256      {
004ec262          int32_t eax_1 = UIElement_ListBox::GetSelectedIndex(this->m_charListField);
004ec26a          uint32_t eax_4;
004ec26a          
004ec26a          if (eax_1 != 0xffffffff)
004ec27d              eax_4 = CharacterSet::GetGreyedOutFor(&eax->_charSet, CharacterSet::GetSlot(&eax->_charSet, this->m_iidSelectedCharacter));
004ec27d          
004ec284          int32_t var_c_3;
004ec284          
004ec284          if ((eax_1 == 0xffffffff || eax_4 != 0))
004ec284          {
004ec29a              this->m_pEnterGameButton->vtable->SetState(0xd);
004ec2aa              var_c_3 = 0xd;
004ec284          }
004ec284          else
004ec284          {
004ec286              this->m_pEnterGameButton->vtable->SetState(1);
004ec296              var_c_3 = 1;
004ec284          }
004ec284          
004ec2ac          this->m_pDeleteCharacterButton->vtable->SetState(var_c_3);
004ec2cb          uint32_t eax_7 = CharacterSet::GetGreyedOutFor(&eax->_charSet, CharacterSet::GetSlot(&eax->_charSet, this->m_iidSelectedCharacter));
004ec2d2          int32_t eax_8;
004ec2d2          
004ec2d2          if (eax_7 != 0)
004ec2da              eax_8 = UIElement_ListBox::GetSelectedIndex(this->m_charListField);
004ec2da          
004ec2e2          class UIElement* ecx_11;
004ec2e2          
004ec2e2          if ((eax_7 == 0 || eax_8 == 0xffffffff))
004ec2e2          {
004ec2f9              this->m_pRestoreCharacterButton->vtable->SetVisible(0);
004ec306              ecx_11 = this->m_pDeleteCharacterButton;
004ec2e2          }
004ec2e2          else
004ec2e2          {
004ec2e4              this->m_pDeleteCharacterButton->vtable->SetVisible(0);
004ec2f1              ecx_11 = this->m_pRestoreCharacterButton;
004ec2e2          }
004ec2e2          
004ec30c          ecx_11->vtable->SetVisible(1);
004ec319          class UIElement* m_pCreateCharacterButton = this->m_pCreateCharacterButton;
004ec319          
004ec31f          if (eax->_charSet.set_.m_num < eax->_charSet.numAllowedCharacters_)
004ec31f          {
004ec321              m_pCreateCharacterButton->vtable->SetState(1);
004ec32d              return;
004ec31f          }
004ec31f          
004ec32e          m_pCreateCharacterButton->vtable->SetState(0xd);
004ec256      }
004ec240  }

004ec33b                                                                                   90 90 90 90 90                             .....

004ec340  void* __thiscall gmCharacterManagementUI::`scalar deleting destructor'(class gmCharacterManagementUI* this, uint32_t arg2)

004ec340  {
004ec343      gmCharacterManagementUI::~gmCharacterManagementUI(this);
004ec343      
004ec34d      if ((arg2 & 1) != 0)
004ec350          operator delete(this);
004ec350      
004ec35b      return this;
004ec340  }

004ec35e                                                                                            90 90                                ..

004ec360  void __fastcall gmCharacterManagementUI::RecvNotice_WorldName(class gmCharacterManagementUI* this, class AC1Legacy::PStringBase<char> const* arg2)

004ec360  {
004ec368      class UIElement* eax = UIElement::GetChildRecursive(this->m_hashElementsRegisteredWith.vtable, 0x1000039b);
004ec368      
004ec36f      if (eax != 0)
004ec36f      {
004ec378          class UIElement_Text* eax_1 = eax->vtable->DynamicCast(0xc);
004ec378          
004ec382          if (eax_1 != 0)
004ec393              UIElement_Text::SetText(eax_1, Client::GetInstance()->vtable->GetWorldName());
004ec36f      }
004ec360  }

004ec39c                                                                                      90 90 90 90                              ....

004ec3a0  void __fastcall gmCharacterManagementUI::RebuildCharacterList(class gmCharacterManagementUI* this)

004ec3a0  {
004ec3a0      int32_t ebp;
004ec3a0      int32_t var_4 = ebp;
004ec3b5      uint32_t m_iidSelectedCharacter = this->m_iidSelectedCharacter;
004ec3b9      gmCharacterManagementUI::ResetPreviouslySelectedCharacterSlot(this);
004ec3c4      UIElement_ListBox::Flush(this->m_charListField);
004ec3cb      class UIPersistantData* eax_1 = UIFramework::GetPersistantData(this);
004ec3cb      
004ec3df      if ((eax_1 != 0 && eax_1->_receivedSet != 0))
004ec3df      {
004ec3e5          class CharacterSet* ebx_1 = &eax_1->_charSet;
004ec3ea          class CharacterSet* var_48_1 = ebx_1;
004ec3ea          
004ec3ee          if (ebx_1 != 0)
004ec3ee          {
004ec3f4              int32_t numAllowedCharacters_ = ebx_1->numAllowedCharacters_;
004ec3f7              uint32_t m_num = ebx_1->set_.m_num;
004ec3fc              int32_t* numAllowedCharacters_5 = nullptr;
004ec400              int32_t* numAllowedCharacters_6 = nullptr;
004ec404              int32_t numAllowedCharacters = numAllowedCharacters_;
004ec408              uint32_t m_num_1 = m_num;
004ec40c              int32_t* esi_1 = &numAllowedCharacters;
004ec40c              
004ec410              if (m_num >= numAllowedCharacters_)
004ec412                  esi_1 = &m_num_1;
004ec412              
004ec422              int32_t numAllowedCharacters_4 = (((int64_t)UIRegion::GetHeight(this->m_charListField)) / *(uint32_t*)esi_1);
004ec422              *(uint32_t*)esi_1;
004ec424              class UIElement_ListBox* m_charListField = this->m_charListField;
004ec42c              numAllowedCharacters = numAllowedCharacters_4;
004ec43c              int32_t eax_6;
004ec43c              int32_t edx_3;
004ec43c              edx_3 = HIGHD((0x66666667 * UIRegion::GetHeight(m_charListField)));
004ec43c              eax_6 = LOWD((0x66666667 * UIRegion::GetHeight(m_charListField)));
004ec43e              int32_t edx_4 = (edx_3 >> 3);
004ec446              int32_t m_num_3 = (edx_4 + (edx_4 >> 0x1f));
004ec44a              m_num_1 = m_num_3;
004ec44e              int32_t* eax_7 = &numAllowedCharacters;
004ec44e              
004ec452              if (m_num_3 >= numAllowedCharacters_4)
004ec454                  eax_7 = &m_num_1;
004ec454              
004ec45a              bool cond:3_1 = ebx_1->set_.m_num <= 0;
004ec45d              int32_t __return = *(uint32_t*)eax_7;
004ec461              m_num_1 = 0;
004ec465              int32_t* __return_1;
004ec465              
004ec465              if (!(cond:3_1))
004ec465              {
004ec6a8                  bool cond:8_1;
004ec6a8                  
004ec6a8                  do
004ec6a8                  {
004ec477                      uint32_t eax_9 = CharacterSet::GetGID(ebx_1, m_num_1);
004ec488                      class UIElement* eax_10 = UIElement_ListBox::AddItemFromTemplateList(this->m_charListField, 0, nullptr);
004ec488                      
004ec48f                      if (eax_10 == 0)
004ec48f                          break;
004ec48f                      
004ec49b                      int32_t* numAllowedCharacters_7 = eax_10->vtable->DynamicCast(0xc);
004ec49b                      
004ec4a5                      if (numAllowedCharacters_7 == 0)
004ec4a5                          break;
004ec4a5                      
004ec4bc                      *(uint32_t*)(*(uint32_t*)numAllowedCharacters_7 + 0x30)(UIRegion::GetWidth(numAllowedCharacters_7), __return);
004ec4c5                      *(uint32_t*)(*(uint32_t*)numAllowedCharacters_7 + 0x110)(1);
004ec4cb                      numAllowedCharacters_7[0x155] |= "activation type (%s) with '%s' b…";
004ec4e0                      __return_1 = nullptr;
004ec4e4                      int32_t* var_2c_1 = nullptr;
004ec4e8                      BaseProperty::SetPropertyName(&__return_1, 0x10000009);
004ec4e8                      
004ec4f1                      if (var_2c_1 != 0)
004ec4f1                      {
004ec4f7                          BaseProperty::CheckCopyOnWrite(&__return_1);
004ec503                          *(uint32_t*)(*(uint32_t*)var_2c_1 + 0xcc)(eax_9);
004ec4f1                      }
004ec4f1                      
004ec512                      *(uint32_t*)(*(uint32_t*)numAllowedCharacters_7 + 0xd4)(&__return_1);
004ec52f                      class CharacterSet* ebx_4;
004ec52f                      uint32_t esi_4;
004ec52f                      ebx_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&numAllowedCharacters, WidthConvert, CharacterSet::GetName(var_48_1, m_num_1));
004ec53b                      UIElement_Text::SetText(numAllowedCharacters_7, &numAllowedCharacters);
004ec53b                      
004ec552                      if (CharacterSet::GetGreyedOutFor(ebx_4, CharacterSet::GetSlot(ebx_4, esi_4)) > 0)
004ec552                      {
004ec560                          int32_t var_20 = 0;
004ec564                          int32_t* var_1c_1 = nullptr;
004ec568                          BaseProperty::SetPropertyName(&var_20, 0x19);
004ec573                          int32_t var_18 = 0x3f800000;
004ec57b                          int32_t var_14_1 = 0;
004ec583                          int32_t var_10_1 = 0;
004ec58b                          int32_t var_c_1 = 0x3f800000;
004ec58b                          
004ec593                          if (var_1c_1 != 0)
004ec593                          {
004ec599                              BaseProperty::CheckCopyOnWrite(&var_20);
004ec5a9                              *(uint32_t*)(*(uint32_t*)var_1c_1 + 0x9c)(&var_18);
004ec593                          }
004ec593                          
004ec5b7                          int32_t var_28 = 0;
004ec5bb                          int32_t* var_24_1 = nullptr;
004ec5bf                          BaseProperty::SetPropertyName(&var_28, 0x1b);
004ec5bf                          
004ec5ca                          if (var_24_1 != 0)
004ec5ca                          {
004ec5d0                              BaseProperty::CheckCopyOnWrite(&var_28);
004ec5e0                              *(uint32_t*)(*(uint32_t*)var_24_1 + 0xfc)(&var_20);
004ec5ca                          }
004ec5ca                          
004ec5ef                          *(uint32_t*)(*(uint32_t*)numAllowedCharacters_7 + 0xd4)(&var_28);
004ec5f9                          BaseProperty::~BaseProperty(&var_28);
004ec602                          BaseProperty::~BaseProperty(&var_20);
004ec552                      }
004ec552                      
004ec60b                      if (esi_4 == m_iidSelectedCharacter)
004ec60d                          numAllowedCharacters_6 = numAllowedCharacters_7;
004ec60d                      
004ec618                      class ClientCharGenState* eax_23 = CPlayerSystem::GetCharGenState(CPlayerSystem::GetPlayerSystem());
004ec618                      
004ec627                      if (m_num_1 == eax_23->slot)
004ec629                          numAllowedCharacters_5 = numAllowedCharacters_7;
004ec629                      
004ec631                      int32_t* esi_6 = (numAllowedCharacters - 0x14);
004ec631                      
004ec644                      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004ec64c                          **(uint32_t**)esi_6(1);
004ec64c                      
004ec64e                      int32_t* __return_2 = __return_1;
004ec64e                      
004ec656                      if (__return_2 != 0)
004ec656                      {
004ec660                          int32_t edi_3 = (__return_2[1] - 1);
004ec65d                          __return_2[1] = edi_3;
004ec65d                          
004ec667                          if (edi_3 == 0)
004ec66d                              **(uint32_t**)__return_2(1);
004ec66d                          
004ec66f                          __return_1 = nullptr;
004ec656                      }
004ec656                      
004ec679                      if (var_2c_1 != 0)
004ec679                      {
004ec683                          int32_t edi_5 = (var_2c_1[1] - 1);
004ec680                          var_2c_1[1] = edi_5;
004ec680                          
004ec68a                          if (edi_5 == 0)
004ec690                              **(uint32_t**)var_2c_1(1);
004ec690                          
004ec692                          int32_t var_2c_2 = 0;
004ec679                      }
004ec679                      
004ec69d                      ebx_1 = var_48_1;
004ec6a2                      cond:8_1 = (m_num_1 + 1) < ebx_4->set_.m_num;
004ec6a4                      m_num_1 += 1;
004ec6a8                  } while (cond:8_1);
004ec465              }
004ec465              
004ec6b6              class UIElement* numAllowedCharacters_1 = UIElement_ListBox::GetItem(this->m_charListField, 0);
004ec6bb              class UIElement_ListBox* m_charListField_1 = this->m_charListField;
004ec6c1              numAllowedCharacters = numAllowedCharacters_1;
004ec6cb              uint32_t i = 0;
004ec6cb              
004ec6cf              if (m_charListField_1->m_listItems.m_num > 0)
004ec6cf              {
004ec715                  do
004ec715                  {
004ec6d2                      class UIElement* numAllowedCharacters_2 = UIElement_ListBox::GetItem(m_charListField_1, i);
004ec6e5                      UIElement::GetAttribute_InstanceID(numAllowedCharacters_2, 0x10000009, &m_iidSelectedCharacter);
004ec6ea                      uint32_t m_iidSelectedCharacter_1 = m_iidSelectedCharacter;
004ec6ea                      
004ec6f0                      if ((m_iidSelectedCharacter_1 != 0 && CharacterSet::GetGreyedOutFor(ebx_1, CharacterSet::GetSlot(ebx_1, m_iidSelectedCharacter_1)) == 0))
004ec6f0                      {
004ec719                          numAllowedCharacters = numAllowedCharacters_2;
004ec719                          break;
004ec6f0                      }
004ec6f0                      
004ec706                      m_charListField_1 = this->m_charListField;
004ec712                      i += 1;
004ec715                  } while (i < m_charListField_1->m_listItems.m_num);
004ec6cf              }
004ec6cf              
004ec729              uint32_t m_num_2 = (this->m_charListField->m_listItems.m_num - 1);
004ec72a              m_num_1 = m_num_2;
004ec82c              class UIElement_ListBox* ecx_41;
004ec82c              
004ec82c              do
004ec82c              {
004ec730                  int32_t esi_8 = 0;
004ec734                  char var_4e_1 = 0;
004ec734                  
004ec739                  if (m_num_2 > 0)
004ec739                  {
004ec81b                      do
004ec81b                      {
004ec752                          class UIElement_Text* eax_38 = UIElement_ListBox::GetItem(this->m_charListField, esi_8)->vtable->DynamicCast(0xc);
004ec788                          m_iidSelectedCharacter = UIElement_Text::GetText(UIElement_ListBox::GetItem(this->m_charListField, (esi_8 + 1))->vtable->DynamicCast(0xc), &__return_1);
004ec79b                          int32_t eax_44 = wcscmp(UIElement_Text::GetText(eax_38, &__return)->m_charbuffer, *(uint32_t*)m_iidSelectedCharacter);
004ec7af                          int32_t* edi_9 = (__return - 0x14);
004ec7af                          
004ec7c2                          if ((InterlockedDecrement(&edi_9[1]) == 0 && edi_9 != 0))
004ec7ca                              **(uint32_t**)edi_9(1);
004ec7ca                          
004ec7d0                          void* edi_11 = &__return_1[-5];
004ec7d7                          int32_t eax_47;
004ec7d7                          eax_47 = InterlockedDecrement(((char*)edi_11 + 4));
004ec7d7                          
004ec7e3                          if ((eax_47 == 0 && edi_11 != 0))
004ec7eb                              eax_47 = **(uint32_t**)edi_11(1);
004ec7eb                          
004ec7ed                          eax_47 = eax_44 > 0;
004ec7ed                          
004ec7f3                          if (eax_47 != 0)
004ec7f3                          {
004ec7fc                              class UIElement* eax_48 = UIElement_ListBox::RemoveItem(this->m_charListField, (esi_8 + 1));
004ec809                              UIElement_ListBox::InsertItem(this->m_charListField, eax_48, esi_8);
004ec80e                              var_4e_1 = 1;
004ec7f3                          }
004ec7f3                          
004ec813                          m_num_2 = m_num_1;
004ec817                          esi_8 += 1;
004ec81b                      } while (esi_8 < m_num_2);
004ec739                  }
004ec739                  
004ec821                  ecx_41 = var_4e_1;
004ec825                  m_num_2 -= 1;
004ec828                  m_num_1 = m_num_2;
004ec82c              } while (ecx_41 != 0);
004ec832              class UIElement_ListBox* m_charListField_2 = this->m_charListField;
004ec83e              uint32_t esi_9 = 0;
004ec840              int32_t i_1 = 0;
004ec840              
004ec844              if (m_charListField_2->m_listItems.m_num > 0)
004ec844              {
004ec8b0                  do
004ec8b0                  {
004ec847                      class UIElement* eax_50 = UIElement_ListBox::GetItem(m_charListField_2, esi_9);
004ec85a                      UIElement::GetAttribute_InstanceID(eax_50, 0x10000009, &__return_1);
004ec85f                      int32_t* __return_3 = __return_1;
004ec85f                      
004ec865                      if (__return_3 != 0)
004ec865                      {
004ec87d                          if (CharacterSet::GetGreyedOutFor(var_48_1, CharacterSet::GetSlot(var_48_1, __return_3)) <= 0)
004ec8a0                              esi_9 += 1;
004ec87d                          else
004ec87d                          {
004ec886                              UIElement_ListBox::RemoveItem(this->m_charListField, eax_50);
004ec88b                              class UIElement_ListBox* m_charListField_3 = this->m_charListField;
004ec899                              UIElement_ListBox::InsertItem(m_charListField_3, eax_50, m_charListField_3->m_listItems.m_num);
004ec87d                          }
004ec865                      }
004ec865                      
004ec8a1                      m_charListField_2 = this->m_charListField;
004ec8ad                      i_1 += 1;
004ec8b0                  } while (i_1 < m_charListField_2->m_listItems.m_num);
004ec844              }
004ec844              
004ec8b2              int32_t* numAllowedCharacters_3 = numAllowedCharacters_5;
004ec8b2              
004ec8b8              if (numAllowedCharacters_3 == 0)
004ec8b8              {
004ec8ba                  numAllowedCharacters_3 = numAllowedCharacters_6;
004ec8ba                  
004ec8c0                  if (numAllowedCharacters_3 == 0)
004ec8c2                      numAllowedCharacters_3 = numAllowedCharacters;
004ec8b8              }
004ec8b8              
004ec8cf              UIElement_ListBox::SetSelectedItem(this->m_charListField, numAllowedCharacters_3, 1);
004ec8d6              gmCharacterManagementUI::UpdateButtons(this);
004ec3ee          }
004ec3df      }
004ec3df      
004ec3aa      var_4;
004ec3a0  }

004ec46d                                         8d 49 00                                                               .I.
004ec8e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ec8f0  void __fastcall gmCharacterManagementUI::gmCharacterManagementUI(class gmCharacterManagementUI* this)

004ec8f0  {
004ec8f5      UIMainFramework::UIMainFramework(this);
004ec8fa      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ec918      this->vtable = 0x7c3100;
004ec906      this->vtable = &gmCharacterManagementUI::`vftable';
004ec925      __builtin_memset(&this->m_rootField, 0, 0x18);
004ec949      this->m_uiCharListSelectedItem = 0xffffffff;
004ec953      __builtin_memset(&this->m_iidSelectedCharacter, 0, 0x18);
004ec977      class UIElement* eax = UIMainFramework::CreateAndAddRootElement(this, 0x10000005, 0x1000039a);
004ec97e      this->m_rootField = eax;
004ec97e      
004ec984      if (eax != 0)
004ec984      {
004ec991          class UIElement* eax_1 = UIElement::GetChildRecursive(eax, 0x1000039d);
004ec998          class UIElement_ListBox* eax_2;
004ec998          
004ec998          if (eax_1 == 0)
004ec9a8              eax_2 = nullptr;
004ec998          else
004ec9a0              eax_2 = eax_1->vtable->DynamicCast(5);
004ec9a0          
004ec9aa          class UIElement* m_rootField = this->m_rootField;
004ec9b6          this->m_charListField = eax_2;
004ec9bc          class UIElement* eax_3 = UIElement::GetChildRecursive(m_rootField, 0x100003a0);
004ec9c1          class UIElement* m_rootField_1 = this->m_rootField;
004ec9cc          this->m_pCreateCharacterButton = eax_3;
004ec9d2          class UIElement* eax_4 = UIElement::GetChildRecursive(m_rootField_1, 0x100003a2);
004ec9d7          class UIElement* m_rootField_2 = this->m_rootField;
004ec9e2          this->m_pEnterGameButton = eax_4;
004ec9e8          class UIElement* eax_5 = UIElement::GetChildRecursive(m_rootField_2, 0x1000039f);
004ec9ed          class UIElement* m_rootField_3 = this->m_rootField;
004ec9f8          this->m_pDeleteCharacterButton = eax_5;
004eca03          this->m_pRestoreCharacterButton = UIElement::GetChildRecursive(m_rootField_3, 0x1000039e);
004eca09          class GlobalEventHandler* eax_7 = GlobalEventHandler::GetGlobalEventHandler();
004eca09          
004eca12          if (eax_7 != 0)
004eca12          {
004eca14              eax_7->vtable->RegisterNoticeHandler(0x186a4, &this->vtable);
004eca21              eax_7->vtable->RegisterNoticeHandler(0x186a2, &this->vtable);
004eca2e              eax_7->vtable->RegisterNoticeHandler(0x4dd1e1, &this->vtable);
004eca3b              eax_7->vtable->RegisterNoticeHandler(0x4dd22c, &this->vtable);
004eca4a              gmCharacterManagementUI::UpdateWorldName(this);
004eca51              class UIPersistantData* eax_10 = UIFramework::GetPersistantData(this);
004eca51              
004eca5d              if ((eax_10 != 0 && eax_10->_receivedSet != 0))
004eca5d              {
004eca64                  this->m_iidSelectedCharacter = eax_10->m_iidSelectedAvatar;
004eca6a                  gmCharacterManagementUI::RebuildCharacterList(this);
004eca5d              }
004eca5d              
004eca6f              class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004eca6f              
004eca77              if (ICIDM::s_cidm_1 != 0)
004eca79                  ICIDM::s_cidm_1->vtable->RegisterInputMap(9, this, 0xbb8);
004eca12          }
004ec984      }
004ec8f0  }

004eca8d                                         90 90 90                                                               ...

004eca90  class UIMainFramework* gmCharacterManagementUI::Create()

004eca90  {
004eca95      void* eax = operator new(0xd0);
004eca95      
004eca9f      if (eax == 0)
004ecaaa          return 0;
004ecaaa      
004ecaa3      /* tailcall */
004ecaa3      return gmCharacterManagementUI::gmCharacterManagementUI(eax);
004eca90  }

004ecaab                                   90 90 90 90 90                                                             .....

004ecab0  void __fastcall gmCharacterManagementUI::Update(class gmCharacterManagementUI* this)

004ecab0  {
004ecab3      class UIPersistantData* eax = UIFramework::GetPersistantData(this);
004ecab3      
004ecac1      if ((eax != 0 && eax->_receivedSet != 0))
004ecac1      {
004ecac5          gmCharacterManagementUI::UpdateWorldName(this);
004ecacc          gmCharacterManagementUI::RebuildCharacterList(this);
004ecad8          DialogFactory::CloseDialog(this->m_pleaseWaitDialogContext);
004ecae0          this->m_pleaseWaitDialogContext = 0;
004ecac1      }
004ecab0  }

004ecaec                                      90 90 90 90                                                              ....

004ecaf0  void gmCharacterManagementUI::Register(uint32_t arg1)

004ecaf0  {
004ecafa      UIFlow::RegisterFrameworkClass(arg1, gmCharacterManagementUI::Create);
004ecaf0  }

004ecb03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ecb10  uint8_t __thiscall gmCharacterManagementUI::MakeErrorMessageDialog(class gmCharacterManagementUI* this, class StringInfo const* arg2)

004ecb10  {
004ecb24      if (this->m_errorMessageDialogContext != 0)
004ecb24      {
004ecb27          uint32_t eax;
004ecb27          eax = 0;
004ecb30          return 0;
004ecb24      }
004ecb24      
004ecb37      void var_78;
004ecb37      PropertyCollection::PropertyCollection(&var_78);
004ecb45      int32_t* var_84 = nullptr;
004ecb49      int32_t* var_80 = nullptr;
004ecb4d      BaseProperty::SetPropertyName(&var_84, 0x8e);
004ecb4d      
004ecb56      if (var_80 != 0)
004ecb56      {
004ecb5c          BaseProperty::CheckCopyOnWrite(&var_84);
004ecb69          *(uint32_t*)(*(uint32_t*)var_80 + 0xac)(3);
004ecb56      }
004ecb56      
004ecb86      uint32_t var_7c = BaseProperty::GetPropertyName(&var_84);
004ecb8a      void var_74;
004ecb8a      HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004ecb98      BaseProperty::SetPropertyName(&var_84, 0xac);
004ecb98      
004ecba1      if (var_80 != 0)
004ecba1      {
004ecba7          BaseProperty::CheckCopyOnWrite(&var_84);
004ecbb4          *(uint32_t*)(*(uint32_t*)var_80 + 0x74)(1);
004ecba1      }
004ecba1      
004ecbce      var_7c = BaseProperty::GetPropertyName(&var_84);
004ecbd2      HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004ecbe0      BaseProperty::SetPropertyName(&var_84, 0xc5);
004ecbe0      
004ecbe9      if (var_80 != 0)
004ecbe9      {
004ecbef          BaseProperty::CheckCopyOnWrite(&var_84);
004ecc02          *(uint32_t*)(*(uint32_t*)var_80 + 0xc4)(arg2);
004ecbe9      }
004ecbe9      
004ecc11      var_7c = BaseProperty::GetPropertyName(&var_84);
004ecc23      HashTable<unsigned long,BaseProperty,1>::add(&var_74, &var_7c, &var_84);
004ecc33      this->m_errorMessageDialogContext = DialogFactory::MakeDialog(this, &var_78);
004ecc39      int32_t* eax_8 = var_84;
004ecc39      
004ecc42      if (eax_8 != 0)
004ecc42      {
004ecc4c          int32_t esi_2 = (eax_8[1] - 1);
004ecc49          eax_8[1] = esi_2;
004ecc49          
004ecc53          if (esi_2 == 0)
004ecc59              **(uint32_t**)eax_8(1);
004ecc59          
004ecc5b          var_84 = nullptr;
004ecc42      }
004ecc42      
004ecc65      if (var_80 != 0)
004ecc65      {
004ecc6f          int32_t esi_4 = (var_80[1] - 1);
004ecc6c          var_80[1] = esi_4;
004ecc6c          
004ecc76          if (esi_4 == 0)
004ecc7c              **(uint32_t**)var_80(1);
004ecc7c          
004ecc7e          int32_t var_80_1 = 0;
004ecc65      }
004ecc65      
004ecc86      PropertyCollection::~PropertyCollection(&var_78);
004ecc8c      int32_t eax_13;
004ecc8c      eax_13 = 1;
004ecc95      return 1;
004ecb10  }

004ecc98                                                                          90 90 90 90 90 90 90 90                          ........

004ecca0  uint8_t __fastcall gmCharacterManagementUI::MakeDeleteCharacterConfirmationDialog(class gmCharacterManagementUI* this)

004ecca0  {
004eccb5      if (this->m_deleteCharacterDialogContext != 0)
004eccb5      {
004eccb7          uint32_t eax;
004eccb7          eax = 0;
004eccc2          return 0;
004eccb5      }
004eccb5      
004ecceb      class PStringBase<unsigned short> var_10c;
004ecceb      int32_t* ebx = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10c, WidthConvert, CharacterSet::GetName(&UIFramework::GetPersistantData(this)->_charSet, CharacterSet::GetSlot(&UIFramework::GetPersistantData(this)->_charSet, this->m_iidSelectedCharacter)));
004eccf4      void var_108;
004eccf4      PropertyCollection::PropertyCollection(&var_108);
004ecd02      int32_t* var_118 = ebx;
004ecd0a      BaseProperty::SetPropertyName(&var_118, 0x8e);
004ecd0a      
004ecd13      if (ebx != ebx)
004ecd13      {
004ecd19          BaseProperty::CheckCopyOnWrite(&var_118);
004ecd26          *(uint32_t*)(*(uint32_t*)ebx + 0xac)(5);
004ecd13      }
004ecd13      
004ecd35      uint32_t var_110 = BaseProperty::GetPropertyName(&var_118);
004ecd47      void var_104;
004ecd47      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_110, &var_118);
004ecd55      BaseProperty::SetPropertyName(&var_118, 0xac);
004ecd55      
004ecd5e      if (ebx != ebx)
004ecd5e      {
004ecd64          BaseProperty::CheckCopyOnWrite(&var_118);
004ecd71          *(uint32_t*)(*(uint32_t*)ebx + 0x74)(1);
004ecd5e      }
004ecd5e      
004ecd7d      var_110 = BaseProperty::GetPropertyName(&var_118);
004ecd8f      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_110, &var_118);
004ecd9b      void var_90;
004ecd9b      StringInfo::StringInfo(&var_90);
004ecdb8      int32_t var_128_5 = StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ecdb9      class PStringBase<unsigned short> ecx_18 = var_10c;
004ecdc9      InterlockedIncrement((var_10c - 0x10));
004ecddc      StringInfo::AddVariable_String(&var_90, 0, ecx_18);
004ecdea      BaseProperty::SetPropertyName(&var_118, 0xc5);
004ecdea      
004ecdf3      if (ebx != ebx)
004ecdf3      {
004ecdf9          BaseProperty::CheckCopyOnWrite(&var_118);
004ece0c          *(uint32_t*)(*(uint32_t*)ebx + 0xc4)(&var_90);
004ecdf3      }
004ecdf3      
004ece29      var_110 = BaseProperty::GetPropertyName(&var_118);
004ece2d      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_110, &var_118);
004ece47      this->m_deleteCharacterDialogContext = DialogFactory::MakeDialog(this, &var_108);
004ece4d      StringInfo::~StringInfo(&var_90);
004ece52      int32_t* eax_9 = var_118;
004ece52      
004ece58      if (eax_9 != ebx)
004ece58      {
004ece62          int32_t esi_3 = (eax_9[1] - 1);
004ece5f          eax_9[1] = esi_3;
004ece5f          
004ece69          if (esi_3 == ebx)
004ece6f              **(uint32_t**)eax_9(1);
004ece6f          
004ece71          var_118 = ebx;
004ece58      }
004ece58      
004ece7b      if (ebx != ebx)
004ece7b      {
004ece85          int32_t esi_5 = (ebx[1] - 1);
004ece82          ebx[1] = esi_5;
004ece82          
004ece8c          if (esi_5 == ebx)
004ece92              **(uint32_t**)ebx(1);
004ece92          
004ece94          int32_t* var_114_1 = ebx;
004ece7b      }
004ece7b      
004ece9c      PropertyCollection::~PropertyCollection(&var_108);
004ecea5      int32_t* esi_7 = (var_10c - 0x14);
004ecea5      
004eceb8      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != ebx))
004ecec0          **(uint32_t**)esi_7(1);
004ecec0      
004ecec4      int32_t eax_14;
004ecec4      eax_14 = 1;
004ececd      return 1;
004ecca0  }

004ecece                                            90 90                                                                ..

004eced0  uint8_t __fastcall gmCharacterManagementUI::MakePleaseWaitDialog(class gmCharacterManagementUI* this)

004eced0  {
004ecee4      if (this->m_pleaseWaitDialogContext != 0)
004ecee4      {
004ecee7          uint32_t eax;
004ecee7          eax = 0;
004ecef0          return 0;
004ecee4      }
004ecee4      
004ecef8      void var_90;
004ecef8      StringInfo::StringInfo(&var_90);
004ecf0f      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ecf18      void var_108;
004ecf18      PropertyCollection::PropertyCollection(&var_108);
004ecf26      int32_t* var_114 = nullptr;
004ecf2a      int32_t* var_110 = nullptr;
004ecf2e      BaseProperty::SetPropertyName(&var_114, 0x8e);
004ecf2e      
004ecf37      if (var_110 != 0)
004ecf37      {
004ecf3d          BaseProperty::CheckCopyOnWrite(&var_114);
004ecf4a          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(2);
004ecf37      }
004ecf37      
004ecf59      uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004ecf6b      void var_104;
004ecf6b      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ecf79      BaseProperty::SetPropertyName(&var_114, 0xac);
004ecf79      
004ecf82      if (var_110 != 0)
004ecf82      {
004ecf88          BaseProperty::CheckCopyOnWrite(&var_114);
004ecf95          *(uint32_t*)(*(uint32_t*)var_110 + 0x74)(1);
004ecf82      }
004ecf82      
004ecfa1      var_10c = BaseProperty::GetPropertyName(&var_114);
004ecfb3      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ecfc1      BaseProperty::SetPropertyName(&var_114, 0xc5);
004ecfc1      
004ecfca      if (var_110 != 0)
004ecfca      {
004ecfd0          BaseProperty::CheckCopyOnWrite(&var_114);
004ecfe3          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
004ecfca      }
004ecfca      
004ed000      var_10c = BaseProperty::GetPropertyName(&var_114);
004ed004      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ed014      this->m_pleaseWaitDialogContext = DialogFactory::MakeDialog(this, &var_108);
004ed01a      int32_t* eax_5 = var_114;
004ed01a      
004ed023      if (eax_5 != 0)
004ed023      {
004ed02d          int32_t esi_2 = (eax_5[1] - 1);
004ed02a          eax_5[1] = esi_2;
004ed02a          
004ed034          if (esi_2 == 0)
004ed03a              **(uint32_t**)eax_5(1);
004ed03a          
004ed03c          var_114 = nullptr;
004ed023      }
004ed023      
004ed046      if (var_110 != 0)
004ed046      {
004ed050          int32_t esi_4 = (var_110[1] - 1);
004ed04d          var_110[1] = esi_4;
004ed04d          
004ed057          if (esi_4 == 0)
004ed05d              **(uint32_t**)var_110(1);
004ed05d          
004ed05f          int32_t var_110_1 = 0;
004ed046      }
004ed046      
004ed067      PropertyCollection::~PropertyCollection(&var_108);
004ed073      StringInfo::~StringInfo(&var_90);
004ed079      int32_t eax_10;
004ed079      eax_10 = 1;
004ed082      return 1;
004eced0  }

004ed083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ed090  uint8_t __fastcall gmCharacterManagementUI::MakeEnteringWorldDialog(class gmCharacterManagementUI* this)

004ed090  {
004ed0a4      if (this->m_enteringWorldDialogContext != 0)
004ed0a4      {
004ed0a7          uint32_t eax;
004ed0a7          eax = 0;
004ed0b0          return 0;
004ed0a4      }
004ed0a4      
004ed0b8      void var_90;
004ed0b8      StringInfo::StringInfo(&var_90);
004ed0cf      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ed0d8      void var_108;
004ed0d8      PropertyCollection::PropertyCollection(&var_108);
004ed0e6      int32_t* var_114 = nullptr;
004ed0ea      int32_t* var_110 = nullptr;
004ed0ee      BaseProperty::SetPropertyName(&var_114, 0x8e);
004ed0ee      
004ed0f7      if (var_110 != 0)
004ed0f7      {
004ed0fd          BaseProperty::CheckCopyOnWrite(&var_114);
004ed10a          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(2);
004ed0f7      }
004ed0f7      
004ed119      uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004ed12b      void var_104;
004ed12b      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ed139      BaseProperty::SetPropertyName(&var_114, 0xac);
004ed139      
004ed142      if (var_110 != 0)
004ed142      {
004ed148          BaseProperty::CheckCopyOnWrite(&var_114);
004ed155          *(uint32_t*)(*(uint32_t*)var_110 + 0x74)(1);
004ed142      }
004ed142      
004ed161      var_10c = BaseProperty::GetPropertyName(&var_114);
004ed173      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ed181      BaseProperty::SetPropertyName(&var_114, 0xc5);
004ed181      
004ed18a      if (var_110 != 0)
004ed18a      {
004ed190          BaseProperty::CheckCopyOnWrite(&var_114);
004ed1a3          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
004ed18a      }
004ed18a      
004ed1c0      var_10c = BaseProperty::GetPropertyName(&var_114);
004ed1c4      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ed1d4      this->m_enteringWorldDialogContext = DialogFactory::MakeDialog(this, &var_108);
004ed1da      int32_t* eax_5 = var_114;
004ed1da      
004ed1e3      if (eax_5 != 0)
004ed1e3      {
004ed1ed          int32_t esi_2 = (eax_5[1] - 1);
004ed1ea          eax_5[1] = esi_2;
004ed1ea          
004ed1f4          if (esi_2 == 0)
004ed1fa              **(uint32_t**)eax_5(1);
004ed1fa          
004ed1fc          var_114 = nullptr;
004ed1e3      }
004ed1e3      
004ed206      if (var_110 != 0)
004ed206      {
004ed210          int32_t esi_4 = (var_110[1] - 1);
004ed20d          var_110[1] = esi_4;
004ed20d          
004ed217          if (esi_4 == 0)
004ed21d              **(uint32_t**)var_110(1);
004ed21d          
004ed21f          int32_t var_110_1 = 0;
004ed206      }
004ed206      
004ed227      PropertyCollection::~PropertyCollection(&var_108);
004ed233      StringInfo::~StringInfo(&var_90);
004ed239      int32_t eax_10;
004ed239      eax_10 = 1;
004ed242      return 1;
004ed090  }

004ed243           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ed250  uint8_t __fastcall gmCharacterManagementUI::MakeConfirmExitDialog(class gmCharacterManagementUI* this)

004ed250  {
004ed264      if (this->m_confirmExitDialogContext != 0)
004ed264      {
004ed267          uint32_t eax;
004ed267          eax = 0;
004ed270          return 0;
004ed264      }
004ed264      
004ed275      void var_108;
004ed275      PropertyCollection::PropertyCollection(&var_108);
004ed283      int32_t* var_114 = nullptr;
004ed287      int32_t* var_110 = nullptr;
004ed28b      BaseProperty::SetPropertyName(&var_114, 0x8e);
004ed28b      
004ed294      if (var_110 != 0)
004ed294      {
004ed29a          BaseProperty::CheckCopyOnWrite(&var_114);
004ed2a7          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(1);
004ed294      }
004ed294      
004ed2c4      uint32_t var_10c = BaseProperty::GetPropertyName(&var_114);
004ed2c8      void var_104;
004ed2c8      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ed2d6      BaseProperty::SetPropertyName(&var_114, 0xac);
004ed2d6      
004ed2df      if (var_110 != 0)
004ed2df      {
004ed2e5          BaseProperty::CheckCopyOnWrite(&var_114);
004ed2f2          *(uint32_t*)(*(uint32_t*)var_110 + 0x74)(1);
004ed2df      }
004ed2df      
004ed30c      var_10c = BaseProperty::GetPropertyName(&var_114);
004ed310      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ed31c      void var_90;
004ed31c      StringInfo::StringInfo(&var_90);
004ed33b      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_CharacterManagement_ConfirmEx…"), 0x10000002);
004ed349      BaseProperty::SetPropertyName(&var_114, 0xc5);
004ed349      
004ed352      if (var_110 != 0)
004ed352      {
004ed358          BaseProperty::CheckCopyOnWrite(&var_114);
004ed36b          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
004ed352      }
004ed352      
004ed37a      var_10c = BaseProperty::GetPropertyName(&var_114);
004ed38c      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
004ed3a6      this->m_confirmExitDialogContext = DialogFactory::MakeDialog(this, &var_108);
004ed3ac      StringInfo::~StringInfo(&var_90);
004ed3b1      int32_t* eax_9 = var_114;
004ed3b1      
004ed3b7      if (eax_9 != 0)
004ed3b7      {
004ed3c1          int32_t esi_2 = (eax_9[1] - 1);
004ed3be          eax_9[1] = esi_2;
004ed3be          
004ed3c8          if (esi_2 == 0)
004ed3ce              **(uint32_t**)eax_9(1);
004ed3ce          
004ed3d0          var_114 = nullptr;
004ed3b7      }
004ed3b7      
004ed3da      if (var_110 != 0)
004ed3da      {
004ed3e4          int32_t esi_4 = (var_110[1] - 1);
004ed3e1          var_110[1] = esi_4;
004ed3e1          
004ed3eb          if (esi_4 == 0)
004ed3f1              **(uint32_t**)var_110(1);
004ed3f1          
004ed3f3          int32_t var_110_1 = 0;
004ed3da      }
004ed3da      
004ed3fb      PropertyCollection::~PropertyCollection(&var_108);
004ed401      int32_t eax_14;
004ed401      eax_14 = 1;
004ed40a      return 1;
004ed250  }

004ed40b                                   90 90 90 90 90                                                             .....

004ed410  uint8_t __thiscall gmCharacterManagementUI::OnAction(class gmCharacterManagementUI* this, class InputEvent const* arg2)

004ed410  {
004ed41d      if (arg2->m_InputAction != 0x27)
004ed426          return 0;
004ed426      
004ed41f      gmCharacterManagementUI::MakeConfirmExitDialog(this);
004ed424      return 1;
004ed410  }

004ed429                             90 90 90 90 90 90 90                                                           .......

004ed430  void __thiscall gmCharacterManagementUI::SetErrorMsg(class gmCharacterManagementUI* this, class StringInfo const* arg2)

004ed430  {
004ed430      /* tailcall */
004ed430      return gmCharacterManagementUI::MakeErrorMessageDialog(this, arg2);
004ed430  }

004ed435                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004ed440  void __fastcall gmCharacterManagementUI::EnterGame(class gmCharacterManagementUI* this)

004ed440  {
004ed444      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
004ed444      
004ed457      if (((eax != 0 && this->m_iidSelectedCharacter != 0) && CharacterSet::GetGreyedOutFor(&UIFramework::GetPersistantData(this)->_charSet, CharacterSet::GetSlot(&UIFramework::GetPersistantData(this)->_charSet, this->m_iidSelectedCharacter)) <= 0))
004ed457      {
004ed483          gmCharacterManagementUI::MakeEnteringWorldDialog(this);
004ed491          CPlayerSystem::LogOnCharacter(eax, this->m_iidSelectedCharacter);
004ed457      }
004ed440  }

004ed499                                                                             90 90 90 90 90 90 90                           .......

004ed4a0  void __thiscall gmCharacterManagementUI::CloseDeleteCharacterDialog(class gmCharacterManagementUI* this, class PStringBase<char> const* arg2)

004ed4a0  {
004ed4ad      this->m_deleteCharacterDialogContext = 0;
004ed4b7      void var_90;
004ed4b7      StringInfo::StringInfo(&var_90);
004ed4cb      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ed4cb      
004ed4dd      if (StringInfo::IsValid(&var_90, 1) != 0)
004ed4dd      {
004ed4ff          void* __return;
004ed4ff          class PStringBase<char> __return_1;
004ed4ff          PStringBase<unsigned short>::to_spstring(StringInfo::GetString(&var_90, &__return, 0), &__return_1, 0);
004ed50b          class PStringBase<char> __return_2 = __return_1;
004ed513          int32_t eax_4 = _stricmp(arg2->m_charbuffer, __return_2);
004ed524          char ebx_2 = ((int8_t)-(eax_4));
004ed524          
004ed539          if ((InterlockedDecrement((__return_2 - 0x10)) == 0 && __return_2 != 0x14))
004ed541              **(uint32_t**)(__return_2 - 0x14)(1);
004ed541          
004ed547          int32_t* esi_3 = ((char*)__return - 0x14);
004ed547          
004ed556          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004ed55e              **(uint32_t**)esi_3(1);
004ed55e          
004ed562          if ((ebx_2 - ebx_2) != 0xff)
004ed562          {
004ed56b              uint32_t m_iidSelectedAvatar = UIFramework::GetPersistantData(this)->m_iidSelectedAvatar;
004ed570              gmCharacterManagementUI::MakePleaseWaitDialog(this);
004ed57d              CPlayerSystem::DeleteCharacter(CPlayerSystem::GetPlayerSystem(), m_iidSelectedAvatar);
004ed562          }
004ed4dd      }
004ed4dd      
004ed589      StringInfo::~StringInfo(&var_90);
004ed4a0  }

004ed598                                                                          90 90 90 90 90 90 90 90                          ........

004ed5a0  enum UIElementMessageListenResult __thiscall gmCharacterManagementUI::ListenToElementMessage(class gmCharacterManagementUI* this, struct UIElementMessageInfo const* arg2)

004ed5a0  {
004ed5a1      struct UIElementMessageInfo* ebx = arg2;
004ed5a1      
004ed5b9      switch ((ebx->idElement - 0x1000039d))
004ed5b9      {
004ed5c4          case 0:
004ed5c4          {
004ed5c4              if (ebx->idMessage == 4)
004ed5c4              {
004ed5cc                  gmCharacterManagementUI::ResetPreviouslySelectedCharacterSlot(this);
004ed5d1                  uint32_t dwParam2 = ebx->dwParam2;
004ed5d6                  arg2 = nullptr;
004ed5d6                  
004ed5de                  if (dwParam2 != 0)
004ed5de                  {
004ed5e6                      UIElement::SetAttribute_Bool(dwParam2, 0xe, 1);
004ed5f7                      UIElement::GetAttribute_InstanceID(dwParam2, 0x10000009, &arg2);
004ed5de                  }
004ed5de                  
004ed603                  gmCharacterManagementUI::SelectCharacter(this, arg2);
004ed60a                  gmCharacterManagementUI::UpdateButtons(this);
004ed5c4              }
004ed5c4              break;
004ed5c4          }
004ed692          case 1:
004ed692          {
004ed692              if (ebx->idMessage == 1)
004ed692              {
004ed698                  class CPlayerSystem* eax_7 = CPlayerSystem::GetPlayerSystem();
004ed698                  
004ed6a1                  if (eax_7 != 0)
004ed6a1                  {
004ed6ad                      class UIElement* m_pSelectedItem = this->m_charListField->m_pSelectedItem;
004ed6ad                      
004ed6b5                      if (m_pSelectedItem != 0)
004ed6b5                      {
004ed6c1                          UIElement::GetAttribute_InstanceID(m_pSelectedItem, 0x10000009, &arg2);
004ed6c8                          UIFramework::GetPersistantData(this);
004ed6cf                          gmCharacterManagementUI::MakePleaseWaitDialog(this);
004ed6db                          CPlayerSystem::RestoreCharacter(eax_7, arg2);
004ed6b5                      }
004ed6a1                  }
004ed692              }
004ed692              break;
004ed692          }
004ed673          case 2:
004ed673          {
004ed673              if ((ebx->idMessage == 1 && this->m_charListField->m_pSelectedItem != 0))
004ed67b                  gmCharacterManagementUI::MakeDeleteCharacterConfirmationDialog(this);
004ed673              break;
004ed673          }
004ed71a          case 3:
004ed71a          {
004ed71a              if (ebx->idMessage == 1)
004ed723                  UIFramework::QueueUIMode(this, 0x1000000b);
004ed71a              break;
004ed71a          }
004ed621          case 5:
004ed621          {
004ed621              if (ebx->idMessage == 1)
004ed629                  gmCharacterManagementUI::EnterGame(this);
004ed621              break;
004ed621          }
004ed6f2          case 6:
004ed6f2          {
004ed6f2              if (ebx->idMessage == 1)
004ed723                  UIFramework::QueueUIMode(this, 0x10000005);
004ed6f2              break;
004ed6f2          }
004ed6ff          case 7:
004ed6ff          {
004ed6ff              if (ebx->idMessage == 1)
004ed703                  gmCharacterManagementUI::MakeConfirmExitDialog(this);
004ed6ff              break;
004ed6ff          }
004ed640          case 8:
004ed640          {
004ed640              if (ebx->idMessage == 0x1a)
004ed648                  gmCharacterManagementUI::EnterGame(this);
004ed640              break;
004ed640          }
004ed5b9      }
004ed5b9      
004ed733      return UIFramework::ListenToElementMessage(this, ebx);
004ed5a0  }

004ed736                                                                    8b ff                                                ..
004ed738  uint32_t jump_table_4ed738[0x9] = 
004ed738  {
004ed738      [0x0] =  0x004ed5c0
004ed73c      [0x1] =  0x004ed68e
004ed740      [0x2] =  0x004ed65b
004ed744      [0x3] =  0x004ed716
004ed748      [0x4] =  0x004ed728
004ed74c      [0x5] =  0x004ed61d
004ed750      [0x6] =  0x004ed6ee
004ed754      [0x7] =  0x004ed6fb
004ed758      [0x8] =  0x004ed63c
004ed75c  }

004ed75c                                                                                      90 90 90 90                              ....

004ed760  void __thiscall gmCharacterManagementUI::RecvNotice_CloseDialog(class gmCharacterManagementUI* this, uint32_t arg2, class PropertyCollection const* arg3)

004ed760  {
004ed770      uint32_t temp1 = (COMBINE(0, 0x8e) % arg3->m_hashProperties.m_intrusiveTable.m_numBuckets);
004ed773      class HashTableData<unsigned long,BaseProperty>** m_buckets = arg3->m_hashProperties.m_intrusiveTable.m_buckets;
004ed77b      int32_t* ecx = nullptr;
004ed77d      int32_t var_14 = 0;
004ed781      int32_t* var_8 = nullptr;
004ed785      int32_t* var_4 = nullptr;
004ed785      
004ed790      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
004ed790      {
004ed798          if (*(uint32_t*)i == 0x8e)
004ed798          {
004ed7a5              if (i != 0)
004ed7a5              {
004ed7af                  BaseProperty::operator=(&var_8, &i[2]);
004ed7b4                  ecx = var_4;
004ed7b4                  
004ed7ba                  if (ecx != 0)
004ed7ba                  {
004ed7c3                      *(uint32_t*)(*(uint32_t*)ecx + 0xa8)(&var_14);
004ed7c9                      ecx = var_4;
004ed7ba                  }
004ed7a5              }
004ed7a5              
004ed7a5              break;
004ed798          }
004ed790      }
004ed790      
004ed7d5      if ((var_14 - 1) <= 4)
004ed7d5      {
004ed7dc          uint32_t ebp_1 = arg2;
004ed7e0          int32_t* var_10;
004ed7e0          
004ed7e0          switch (var_14)
004ed7e0          {
004ed803              case 1:
004ed803              {
004ed803                  uint32_t temp1_1 = (COMBINE(0, 0x92) % arg3->m_hashProperties.m_intrusiveTable.m_numBuckets);
004ed806                  class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = arg3->m_hashProperties.m_intrusiveTable.m_buckets;
004ed809                  arg2 = 0;
004ed80d                  var_10 = nullptr;
004ed811                  int32_t* var_c_1 = nullptr;
004ed811                  
004ed81c                  for (int32_t* i_1 = m_buckets_1[temp1_1]; i_1 != 0; i_1 = i_1[1])
004ed81c                  {
004ed826                      if (*(uint32_t*)i_1 == 0x92)
004ed826                      {
004ed833                          if (i_1 != 0)
004ed833                          {
004ed83d                              BaseProperty::operator=(&var_10, &i_1[2]);
004ed83d                              
004ed848                              if (var_c_1 != 0)
004ed851                                  *(uint32_t*)(*(uint32_t*)var_c_1 + 0x70)(&arg2);
004ed833                          }
004ed833                          
004ed833                          break;
004ed826                      }
004ed81c                  }
004ed81c                  
004ed857                  if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] == ebp_1)
004ed857                  {
004ed85d                      if (arg2 != 0)
004ed86a                          UIFramework::QueueUIMode(((char*)this - 0x98), 0x10000009);
004ed86a                      
004ed86f                      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = nullptr;
004ed857                  }
004ed857                  
004ed876                  BaseProperty::~BaseProperty(&var_10);
004ed857                  goto label_4ed87b;
004ed803              }
004ed9b7              case 2:
004ed9b7              {
004ed9b7                  uint32_t eax_21 = arg2;
004ed9b7                  
004ed9be                  if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[9] == eax_21)
004ed9c0                      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[9] = nullptr;
004ed9be                  else if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xa] == eax_21)
004ed9ca                      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xa] = nullptr;
004ed9b7                  break;
004ed9b7              }
004ed7ee              case 3:
004ed7ee              {
004ed7ee                  if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] == arg2)
004ed7f4                      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = nullptr;
004ed7ee                  break;
004ed7ee              }
004ed87b              case 5:
004ed87b              {
004ed87b              label_4ed87b:
004ed87b                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004ed880                  arg2 = PStringBase<char>::s_NullBuffer_1;
004ed888                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004ed895                  uint32_t temp1_2 = (COMBINE(0, 0x9c) % arg3->m_hashProperties.m_intrusiveTable.m_numBuckets);
004ed898                  class HashTableData<unsigned long,BaseProperty>** m_buckets_2 = arg3->m_hashProperties.m_intrusiveTable.m_buckets;
004ed89b                  int32_t* ecx_6 = nullptr;
004ed89d                  var_10 = nullptr;
004ed8a1                  int32_t* var_c_2 = nullptr;
004ed8a1                  
004ed8ac                  for (int32_t* i_2 = m_buckets_2[temp1_2]; i_2 != 0; i_2 = i_2[1])
004ed8ac                  {
004ed8b6                      if (*(uint32_t*)i_2 == 0x9c)
004ed8b6                      {
004ed8c3                          if (i_2 != 0)
004ed8c3                          {
004ed8cd                              BaseProperty::operator=(&var_10, &i_2[2]);
004ed8d2                              ecx_6 = var_c_2;
004ed8d2                              
004ed8d8                              if (ecx_6 != 0)
004ed8d8                              {
004ed8e1                                  *(uint32_t*)(*(uint32_t*)ecx_6 + 0xa0)(&arg2);
004ed8e7                                  ecx_6 = var_c_2;
004ed8d8                              }
004ed8c3                          }
004ed8c3                          
004ed8c3                          break;
004ed8b6                      }
004ed8ac                  }
004ed8ac                  
004ed8ee                  if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[8] == ebp_1)
004ed8ee                  {
004ed8fb                      gmCharacterManagementUI::CloseDeleteCharacterDialog(((char*)this - 0x98), &arg2);
004ed900                      ecx_6 = var_c_2;
004ed8ee                  }
004ed8ee                  
004ed904                  int32_t* eax_12 = var_10;
004ed904                  
004ed90a                  if (eax_12 != 0)
004ed90a                  {
004ed914                      int32_t esi_2 = (eax_12[1] - 1);
004ed911                      eax_12[1] = esi_2;
004ed911                      
004ed91b                      if (esi_2 == 0)
004ed921                          **(uint32_t**)eax_12(1);
004ed921                      
004ed923                      ecx_6 = var_c_2;
004ed927                      var_10 = nullptr;
004ed90a                  }
004ed90a                  
004ed92d                  if (ecx_6 != 0)
004ed92d                  {
004ed935                      int32_t esi_4 = (ecx_6[1] - 1);
004ed932                      ecx_6[1] = esi_4;
004ed932                      
004ed93c                      if (esi_4 == 0)
004ed942                          **(uint32_t**)ecx_6(1);
004ed942                      
004ed944                      int32_t var_c_3 = 0;
004ed92d                  }
004ed92d                  
004ed94c                  int32_t* esi_6 = (arg2 - 0x14);
004ed94c                  
004ed95f                  if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004ed967                      **(uint32_t**)esi_6(1);
004ed967                  
004ed969                  ecx = var_4;
004ed87b                  break;
004ed87b              }
004ed7e0          }
004ed7d5      }
004ed7d5      
004ed96e      int32_t* eax_17 = var_8;
004ed96e      
004ed974      if (eax_17 != 0)
004ed974      {
004ed97e          int32_t esi_8 = (eax_17[1] - 1);
004ed97b          eax_17[1] = esi_8;
004ed97b          
004ed985          if (esi_8 == 0)
004ed98b              **(uint32_t**)eax_17(1);
004ed98b          
004ed98d          ecx = var_4;
004ed991          var_8 = nullptr;
004ed974      }
004ed974      
004ed997      if (ecx != 0)
004ed997      {
004ed99f          int32_t esi_10 = (ecx[1] - 1);
004ed99c          ecx[1] = esi_10;
004ed99c          
004ed9a6          if (esi_10 == 0)
004ed9ac              **(uint32_t**)ecx(1);
004ed997      }
004ed760  }

004ed9cf                                               90                                                                 .
004ed9d0  uint32_t jump_table_4ed9d0[0x5] = 
004ed9d0  {
004ed9d0      [0x0] =  0x004ed7fc
004ed9d4      [0x1] =  0x004ed9b7
004ed9d8      [0x2] =  0x004ed7e7
004ed9dc      [0x3] =  0x004ed96d
004ed9e0      [0x4] =  0x004ed87b
004ed9e4  }

004ed9e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004ed9f0  void __fastcall gmIntroUI::NextFrame(class gmIntroUI* this)

004ed9f0  {
004ed9f3      class ListNode<unsigned long>* _head = this->m_listStates._head;
004ed9f3      
004ed9fd      if (_head == 0)
004ed9fd      {
004eda49          UIFramework::QueueUIMode(this, 0x1000000a);
004eda4f          return;
004ed9fd      }
004ed9fd      
004ed9ff      class ListNode<unsigned long>* next = _head->next;
004eda04      this->m_listStates._head = next;
004eda04      
004eda0a      if (next == 0)
004eda11          this->m_listStates._tail = nullptr;
004eda0a      else
004eda0c          next->prev = nullptr;
004eda0c      
004eda18      uint32_t data = _head->data;
004eda1b      operator delete(_head);
004eda2a      this->m_listStates._num_elements -= 1;
004eda30      this->m_introField->vtable->SetState(data);
004ed9f0  }


004eda50  enum UIElementMessageListenResult __thiscall gmIntroUI::ListenToElementMessage(class gmIntroUI* this, struct UIElementMessageInfo const* arg2)

004eda50  {
004eda56      uint32_t idMessage = arg2->idMessage;
004eda56      
004eda60      if (idMessage == 0x1000000d)
004eda60      {
004eda62          gmIntroUI::NextFrame(this);
004eda71          return UIFramework::ListenToElementMessage(this, arg2);
004eda60      }
004eda60      
004eda79      if (idMessage == 0x10000001)
004eda82          UIFramework::QueueUIMode(this, 0x1000000a);
004eda82      
004eda91      return UIFramework::ListenToElementMessage(this, arg2);
004eda50  }

004eda94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004edaa0  void __thiscall gmIntroUI::CharacterHandler(class gmIntroUI* this, wchar16 arg2)

004edaa0  {
004edaa9      if (arg2 == 0x1b)
004edab6          UIFramework::QueueUIMode(((char*)this - 0x98), 0x1000000a);
004edab6      
004edac1      gmIntroUI::NextFrame(((char*)this - 0x98));
004edaa0  }

004edaca                                90 90 90 90 90 90                                                            ......

004edad0  uint8_t __thiscall gmIntroUI::OnAction(class gmIntroUI* this, class InputEvent const* arg2)

004edad0  {
004edad9      if (arg2->m_fStart == 0)
004edad9      {
004edadb          class InputEvent* eax;
004edadb          eax = 0;
004edadd          return 0;
004edad9      }
004edad9      
004edae3      if (arg2->m_InputAction != 0x27)
004edae3      {
004edaf4          gmIntroUI::NextFrame(this);
004edaf9          int32_t eax_2;
004edaf9          eax_2 = 1;
004edafb          return 1;
004edae3      }
004edae3      
004edaea      UIFramework::QueueUIMode(this, 0x1000000a);
004edaef      int32_t eax_1;
004edaef      eax_1 = 1;
004edaf1      return 1;
004edad0  }

004edafe                                                                                            90 90                                ..

004edb00  void __fastcall gmIntroUI::gmIntroUI(class gmIntroUI* this)

004edb00  {
004edb09      UIMainFramework::UIMainFramework(this);
004edb0e      this->vtable = &CInputHandler::`vftable';
004edb18      this->vtable = &gmUrgentAssistanceUI::`vftable';
004edb24      this->vtable = 0x7c3320;
004edb2a      this->vtable = &gmIntroUI::`vftable';
004edb34      this->vtable = &gmUrgentAssistanceUI::`vftable';
004edb3e      this->m_introField = nullptr;
004edb44      this->m_listStates.vtable = 0x7a2be4;
004edb44      this->m_listStates._head = nullptr;
004edb44      this->m_listStates._tail = nullptr;
004edb44      this->m_listStates._num_elements = 0;
004edb66      class UIElement* eax = UIMainFramework::CreateAndAddRootElement(this, 0x10000002, 0x10000419);
004edb70      this->m_introField = eax;
004edb76      int32_t* var_8 = nullptr;
004edb7a      int32_t* var_4 = nullptr;
004edb7a      
004edb8f      if (eax->vtable->InqProperty(0x10000047, &var_8) != 0)
004edb8f      {
004edb95          int32_t* ecx_2 = var_4;
004edb9b          int32_t var_18 = 0;
004edb9b          
004edb9f          if (ecx_2 != 0)
004edb9f          {
004edba8              *(uint32_t*)(*(uint32_t*)ecx_2 + 0xf0)(&var_18);
004edbae              ecx_2 = var_4;
004edb9f          }
004edb9f          
004edbb6          int32_t esi_1 = 0;
004edbb6          
004edbba          if (var_18 > 0)
004edbba          {
004edc5a              do
004edc5a              {
004edbc2                  int32_t* var_10 = nullptr;
004edbc6                  int32_t* var_c_1 = nullptr;
004edbc6                  
004edbca                  if (ecx_2 != 0)
004edbca                  {
004edbe0                      int32_t* ecx_3;
004edbe0                      
004edbe0                      if (*(uint32_t*)(*(uint32_t*)ecx_2 + 0xf4)(esi_1, &var_10) == 0)
004edc0b                          ecx_3 = var_c_1;
004edbe0                      else
004edbe0                      {
004edbe2                          ecx_3 = var_c_1;
004edbe8                          class PFileNode* var_14 = nullptr;
004edbe8                          
004edbec                          if (ecx_3 != 0)
004edbec                          {
004edbfd                              if (*(uint32_t*)(*(uint32_t*)ecx_3 + 0xa8)(&var_14) != 0)
004edc06                                  List<PFileNode *>::push_back(&this->m_listStates, &var_14);
004edc06                              
004edc0b                              ecx_3 = var_c_1;
004edbec                          }
004edbe0                      }
004edbe0                      
004edc0f                      int32_t* eax_5 = var_10;
004edc0f                      
004edc15                      if (eax_5 != 0)
004edc15                      {
004edc1f                          int32_t edx_5 = (eax_5[1] - 1);
004edc1c                          eax_5[1] = edx_5;
004edc1c                          
004edc24                          if (edx_5 == 0)
004edc2a                              **(uint32_t**)eax_5(1);
004edc2a                          
004edc2c                          ecx_3 = var_c_1;
004edc30                          var_10 = nullptr;
004edc15                      }
004edc15                      
004edc36                      if (ecx_3 != 0)
004edc36                      {
004edc3e                          int32_t edx_8 = (ecx_3[1] - 1);
004edc3b                          ecx_3[1] = edx_8;
004edc3b                          
004edc43                          if (edx_8 == 0)
004edc49                              **(uint32_t**)ecx_3(1);
004edc49                          
004edc4b                          int32_t var_c_2 = 0;
004edc36                      }
004edc36                      
004edc4f                      ecx_2 = var_4;
004edbca                  }
004edbca                  
004edc57                  esi_1 += 1;
004edc5a              } while (esi_1 < var_18);
004edbba          }
004edb8f      }
004edb8f      
004edc60      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004edc60      
004edc68      if (ICIDM::s_cidm_1 != 0)
004edc68      {
004edc6a          ICIDM::s_cidm_1->vtable->RegisterInputMap(9, this, 0xbb8);
004edc79          ICIDM::s_cidm_1->vtable->RegisterInputMap(3, this, 0xbb8);
004edc88          ICIDM::s_cidm_1->vtable->SetTextMode(1);
004edc94          ICIDM::s_cidm_1->vtable->RegisterInputHandler(&this->vtable, 2);
004edc68      }
004edc68      
004edca4      void* _head = this->m_listStates._head;
004edca4      
004edca9      if (_head == 0)
004edce7          UIFramework::QueueUIMode(this, 0x1000000a);
004edca9      else
004edca9      {
004edcab          class ListNode<unsigned long>* ecx_10 = *(uint32_t*)((char*)_head + 4);
004edb44          this->m_listStates._head = ecx_10;
004edb44          
004edcb3          if (ecx_10 == 0)
004edb44              this->m_listStates._tail = nullptr;
004edcb3          else
004edcb5              ecx_10->prev = nullptr;
004edcb5          
004edcbd          int32_t esi_2 = *(uint32_t*)_head;
004edcc0          operator delete(_head);
004edb44          this->m_listStates._num_elements -= 1;
004edccf          this->m_introField->vtable->SetState(esi_2);
004edca9      }
004edca9      
004edcec      int32_t* eax_15 = var_8;
004edcec      
004edcf2      if (eax_15 != 0)
004edcf2      {
004edcfc          int32_t esi_4 = (eax_15[1] - 1);
004edcf9          eax_15[1] = esi_4;
004edcf9          
004edd03          if (esi_4 == 0)
004edd09              **(uint32_t**)eax_15(1);
004edd09          
004edd0b          var_8 = nullptr;
004edcf2      }
004edcf2      
004edd15      if (var_4 != 0)
004edd15      {
004edd1d          int32_t esi_6 = (var_4[1] - 1);
004edd1a          var_4[1] = esi_6;
004edd1a          
004edd24          if (esi_6 == 0)
004edd2a              **(uint32_t**)var_4(1);
004edd15      }
004edb00  }

004edd36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004edd40  void __fastcall gmIntroUI::~gmIntroUI(class gmIntroUI* this)

004edd40  {
004edd59      this->vtable = 0x7c3320;
004edd4c      this->vtable = &gmIntroUI::`vftable';
004edd52      this->vtable = &gmUrgentAssistanceUI::`vftable';
004edd6c      UIMainFramework::RemoveRootElement(this, &this->m_introField);
004edd71      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
004edd71      
004edd79      if (ICIDM::s_cidm_1 != 0)
004edd79      {
004edd7b          ICIDM::s_cidm_1->vtable->UnregisterCallback(this);
004edd83          ICIDM::s_cidm_1->vtable->SetTextMode(0);
004edd8f          ICIDM::s_cidm_1->vtable->UnregisterInputHandler(&this->vtable, 2);
004edd79      }
004edd79      
004edd99      this->m_listStates.vtable = 0x7a2be4;
004edda5      List<StringTableMetaLanguage::Node const *>::flush(&this->m_listStates);
004edd52      this->vtable = &gmUrgentAssistanceUI::`vftable';
004eddb3      NoticeHandler::~NoticeHandler(&this->vtable);
004eddbe      /* tailcall */
004eddbe      return UIMainFramework::~UIMainFramework(this);
004edd40  }

004eddc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004eddd0  class UIMainFramework* gmIntroUI::Create()

004eddd0  {
004eddd5      void* eax = operator new(0xb4);
004eddd5      
004edddf      if (eax == 0)
004eddea          return 0;
004eddea      
004edde3      /* tailcall */
004edde3      return gmIntroUI::gmIntroUI(eax);
004eddd0  }

004eddeb                                   90 90 90 90 90                                                             .....

004eddf0  void* __thiscall gmIntroUI::`scalar deleting destructor'(class gmIntroUI* this, uint32_t arg2)

004eddf0  {
004eddf3      gmIntroUI::~gmIntroUI(this);
004eddf3      
004eddfd      if ((arg2 & 1) != 0)
004ede00          operator delete(this);
004ede00      
004ede0b      return this;
004eddf0  }

004ede0e                                            90 90                                                                ..

004ede10  void gmIntroUI::Register(uint32_t arg1)

004ede10  {
004ede1a      UIFlow::RegisterFrameworkClass(arg1, gmIntroUI::Create);
004ede10  }

004ede23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ede30  enum UIElementMessageListenResult __thiscall gmDataPatchUI::ListenToElementMessage(class gmDataPatchUI* this, struct UIElementMessageInfo const* arg2)

004ede30  {
004ede44      if ((arg2->idMessage == 1 && arg2->idElement == 0x1000041c))
004ede4b          UIFramework::QueueUIMode(this, 0x10000009);
004ede4b      
004ede5a      return UIFramework::ListenToElementMessage(this, arg2);
004ede30  }

004ede5d                                                                                         90 90 90                               ...

004ede60  void __thiscall gmDataPatchUI::SetConnectLevel(class gmDataPatchUI* this, float arg2)

004ede60  {
004ede60      long double x87_r7 = ((long double)arg2);
004ede67      long double temp1 = ((long double)this->m_fConnectLevel);
004ede67      (x87_r7 - temp1);
004ede6d      int32_t eax;
004ede6d      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
004ede6f      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004ede6f      
004ede72      if (!(p))
004eded7          return;
004eded7      
004ede7b      class UIElement* m_connectMeter = this->m_connectMeter;
004ede83      this->m_fConnectLevel = arg2;
004ede89      UIElement::SetAttribute_Float(m_connectMeter, 0x66, arg2);
004ede8e      long double x87_r7_1 = ((long double)this->m_fConnectLevel);
004ede94      long double temp2 = ((long double)0.0);
004ede94      (x87_r7_1 - temp2);
004ede9a      float edx = 1.40129846e-45f;
004ede9a      
004edea4      if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
004edea4      {
004edeac          edx = 2.52437265e-29f;
004edeb1          (((long double)this->m_fConnectLevel) - ((long double)1.0));
004edeb9          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
004edeb9          
004edebc          if (p_1)
004edebe              edx = 2.52437295e-29f;
004edea4      }
004edea4      
004edecc      arg2 = edx;
004eded0      /* jump -> this->m_connectText->vtable->SetState */
004ede60  }

004ededa                                                                                90 90 90 90 90 90                            ......

004edee0  void __thiscall gmDataPatchUI::SetPatchLevel(class gmDataPatchUI* this, float arg2)

004edee0  {
004edee0      long double x87_r7 = ((long double)arg2);
004edee4      long double temp1 = ((long double)this->m_fPatchLevel);
004edee4      (x87_r7 - temp1);
004edeea      int32_t eax;
004edeea      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
004edeec      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004edeec      
004edeef      if (p)
004edeef      {
004edef8          this->m_fPatchLevel = arg2;
004edf06          UIElement::SetAttribute_Float(this->m_patchMeter, 0x66, arg2);
004edeef      }
004edee0  }

004edf0e                                            90 90                                                                ..

004edf10  void __fastcall gmDataPatchUI::UseTime(class gmDataPatchUI* this)

004edf10  {
004edf16      long double x87_r7 = ((long double)this->m_fConnectLevel);
004edf1c      long double temp0 = ((long double)1f);
004edf1c      (x87_r7 - temp0);
004edf22      int32_t eax;
004edf22      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
004edf24      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004edf24      
004edf36      if ((!(p) && *(int32_t*)((char*)SharedNet::s_pNet + 0x8a6e) != 0))
004edf3d          gmDataPatchUI::SetConnectLevel(this, 1f);
004edf3d      
004edf4a      uint32_t eax_2;
004edf4a      
004edf4a      if (this->m_expected > 0)
004edf4a      {
004edf4c          long double x87_r7_1 = ((long double)Timer::cur_time);
004edf52          long double temp2_1 = ((long double)this->m_timeNextDiskspaceCheck);
004edf52          (x87_r7_1 - temp2_1);
004edf58          eax_2 = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
004edf58          
004edf5d          if ((*(uint8_t*)((char*)eax_2)[1] & 1) == 0)
004edf5d          {
004edf63              void var_c;
004edf63              Vector3::Vector3(&var_c);
004edf73              void var_8;
004edf73              DiskSpace::GetDriveFreeBytes(&var_c, nullptr, &var_8);
004edf88              this->m_timeNextDiskspaceCheck = ((double)(((long double)Timer::cur_time) + ((long double)60.0)));
004edf8e              IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&var_c);
004edf5d          }
004edf4a      }
004edf4a      
004edf93      long double x87_r7_4 = ((long double)this->m_fConnectLevel);
004edf99      long double temp1 = ((long double)1.0);
004edf99      (x87_r7_4 - temp1);
004edf9f      eax_2 = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0))));
004edf9f      
004edfa4      if ((*(uint8_t*)((char*)eax_2)[1] & 1) == 0)
004edfa4      {
004edfa6          long double x87_r7_5 = ((long double)this->m_fPatchLevel);
004edfac          long double temp3_1 = ((long double)1.0);
004edfac          (x87_r7_5 - temp3_1);
004edfb2          eax_2 = ((((x87_r7_5 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp3_1) ? 1 : 0) << 0xe) | 0))));
004edfb2          
004edfb7          if ((*(uint8_t*)((char*)eax_2)[1] & 1) == 0)
004edfb7          {
004edfc2              if (PacketController::Instance() == 0)
004edfd7                  UIFramework::QueueUIMode(this, 0x10000001);
004edfc2              else if (UIFramework::GetPersistantData(this)->_receivedSet != 0)
004edfd7                  UIFramework::QueueUIMode(this, 0x10000001);
004edfb7          }
004edfa4      }
004edf10  }

004edfe1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004edff0  void __thiscall gmDataPatchUI::OnDDDEvent(class gmDataPatchUI* this, enum DDDEvent arg2, uint32_t arg3)

004edff0  {
004edffd      void var_90;
004edffd      StringInfo::StringInfo(&var_90);
004edffd      
004ee00c      switch (arg2)
004ee00c      {
004ee029          case DDD_PatchtimeInterrogation:
004ee029          {
004ee029              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ee029              
004ee032              if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] == 0xffffffff)
004ee1d2                  UIElement_Text::SetStringInfo(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2], &var_90);
004ee029              break;
004ee029          }
004ee052          case DDD_PatchtimePending:
004ee052          {
004ee052              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ee064              int32_t var_a0_2 = 0;
004ee06c              StringInfo::AddVariable_Int(&var_90, 0, arg3);
004ee06c              
004ee075              if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] == 0xffffffff)
004ee1d2                  UIElement_Text::SetStringInfo(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2], &var_90);
004ee052              break;
004ee052          }
004ee09c          case DDD_PatchtimeBegin:
004ee09c          {
004ee09c              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = arg3;
004ee09f              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ee1d2              UIElement_Text::SetStringInfo(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2], &var_90);
004ee09c              break;
004ee09c          }
004ee175          case DDD_PatchtimeEnd:
004ee175          {
004ee175              class Client* eax_6 = Client::GetInstance();
004ee175              
004ee17c              if (eax_6 != 0)
004ee17c              {
004ee186                  int32_t edx_2 = -(((char*)this - 0x9c));
004ee17e                  eax_6->vtable->RemoveDDDStatusPlugin(((edx_2 - edx_2) & this));
004ee17c              }
004ee17c              
004ee196              if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] == 0xffffffff)
004ee198                  this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] = nullptr;
004ee198              
004ee1a2              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004ee1b0              gmDataPatchUI::SetPatchLevel(((char*)this - 0x9c), 1f);
004ee1c5              StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ee1d2              UIElement_Text::SetStringInfo(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2], &var_90);
004ee175              break;
004ee175          }
004ee0b8          case DDD_DataDownloaded:
004ee0b8          {
004ee0b8              void* edi_2 = (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] + arg3);
004ee0ba              class HashSetData<UIElement *>* eax_4 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6];
004ee0c0              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[7] = edi_2;
004ee0c0              
004ee0c5              if (eax_4 != 0xffffffff)
004ee0c5              {
004ee0cd                  float var_94_1;
004ee0cd                  
004ee0cd                  if (eax_4 != 0)
004ee0cd                  {
004ee0df                      long double x87_r7_1 = ((long double)edi_2);
004ee0df                      
004ee0e3                      if (edi_2 < 0)
004ee0e5                          x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
004ee0e5                      
004ee0f1                      long double x87_r6_1 = ((long double)eax_4);
004ee0f1                      
004ee0f5                      if (eax_4 < 0)
004ee0f7                          x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
004ee0f7                      
004ee0ff                      var_94_1 = ((float)(x87_r7_1 / x87_r6_1));
004ee0cd                  }
004ee0cd                  else
004ee0cf                      var_94_1 = 1f;
004ee0cf                  
004ee120                  gmDataPatchUI::SetPatchLevel(((char*)this - 0x9c), ((float)MathLib::Clamp(var_94_1, 0f, 1f)));
004ee135                  StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000002);
004ee13a                  this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[5];
004ee148                  int32_t var_a0_4 = 0;
004ee155                  StringInfo::AddVariable_UInt(&var_90, 0, _ftol2());
004ee166                  int32_t var_a0_5 = 0;
004ee16e                  StringInfo::AddVariable_UInt(&var_90, 0, (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[6] >> 0xa));
004ee1d2                  UIElement_Text::SetStringInfo(this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2], &var_90);
004ee0c5              }
004ee0b8              break;
004ee0b8          }
004ee00c      }
004ee00c      
004ee1dc      StringInfo::~StringInfo(&var_90);
004edff0  }

004ee1eb                                   90                                                                         .
004ee1ec  uint32_t jump_table_4ee1ec[0x6] = 
004ee1ec  {
004ee1ec      [0x0] =  0x004ee01a
004ee1f0      [0x1] =  0x004ee1d7
004ee1f4      [0x2] =  0x004ee042
004ee1f8      [0x3] =  0x004ee085
004ee1fc      [0x4] =  0x004ee175
004ee200      [0x5] =  0x004ee0ae
004ee204  }

004ee204              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004ee210  void __thiscall gmDataPatchUI::ListenToGlobalMessage(class gmDataPatchUI* this, uint32_t arg2, int32_t arg3)

004ee210  {
004ee215      if (arg2 == 3)
004ee217          gmDataPatchUI::UseTime(this);
004ee210  }

004ee21f                                                                                               90                                 .

004ee220  void __fastcall gmDataPatchUI::~gmDataPatchUI(class gmDataPatchUI* this)

004ee220  {
004ee231      this->vtable = 0x7c3430;
004ee225      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ee22b      this->vtable = &gmDataPatchUI::`vftable';
004ee243      class Client* eax = Client::GetInstance();
004ee243      
004ee24a      if (eax != 0)
004ee24c          eax->vtable->RemoveDDDStatusPlugin(&this->vtable);
004ee24c      
004ee258      UIListener::UnRegisterForGlobalMessage(this, 3);
004ee266      UIMainFramework::RemoveRootElement(this, &this->m_datapatchField);
004ee26b      class CPluginManager* m_pManager = this->m_pManager;
004ee22b      this->vtable = &CPluginPrototype::`vftable';
004ee22b      
004ee276      if (m_pManager != 0)
004ee276      {
004ee279          CPluginManager::RemovePluginPrototype(m_pManager, &this->vtable);
004ee22b          this->m_pManager = nullptr;
004ee276      }
004ee276      
004ee225      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ee28d      NoticeHandler::~NoticeHandler(&this->vtable);
004ee297      /* tailcall */
004ee297      return UIMainFramework::~UIMainFramework(this);
004ee220  }

004ee29c                                                                                      90 90 90 90                              ....

004ee2a0  void* __thiscall gmDataPatchUI::`vector deleting destructor'(class gmDataPatchUI* this, uint32_t arg2)

004ee2a0  {
004ee2a6      /* tailcall */
004ee2a6      return gmDataPatchUI::`scalar deleting destructor'(((char*)this - 0x9c), arg2);
004ee2a0  }

004ee2ab                                   cc cc cc cc cc                                                             .....

004ee2b0  void __fastcall gmDataPatchUI::gmDataPatchUI(class gmDataPatchUI* this)

004ee2b0  {
004ee2b5      UIMainFramework::UIMainFramework(this);
004ee2ba      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ee2c4      this->vtable = &CDDDStatusPlugin::`vftable';
004ee2d0      this->m_pManager = nullptr;
004ee2ed      this->vtable = 0x7c3430;
004ee2f3      this->vtable = &gmUrgentAssistanceUI::`vftable';
004ee2d6      this->vtable = &gmDataPatchUI::`vftable';
004ee303      __builtin_memset(&this->m_datapatchField, 0, 0x14);
004ee321      this->m_fConnectLevel = -1f;
004ee327      this->m_fPatchLevel = -1f;
004ee32d      this->m_expected = 0xffffffff;
004ee337      this->m_recieved = 0;
004ee33d      class UIElement* eax = UIMainFramework::CreateAndAddRootElement(this, 0x10000001, 0x1000041a);
004ee344      this->m_datapatchField = eax;
004ee344      
004ee34a      if (eax != 0)
004ee34a      {
004ee35e          class UIElement_Text* eax_2 = UIElement::GetChildRecursive(eax, 0x10000420)->vtable->DynamicCast(0xc);
004ee364          class UIElement* m_datapatchField = this->m_datapatchField;
004ee36f          this->m_connectText = eax_2;
004ee380          class UIElement_Text* eax_4 = UIElement::GetChildRecursive(m_datapatchField, 0x10000421)->vtable->DynamicCast(0xc);
004ee386          class UIElement* m_datapatchField_1 = this->m_datapatchField;
004ee391          this->m_patchText = eax_4;
004ee397          class UIElement* eax_5 = UIElement::GetChildRecursive(m_datapatchField_1, 0x1000041e);
004ee39c          class UIElement* m_datapatchField_2 = this->m_datapatchField;
004ee3a7          this->m_connectMeter = eax_5;
004ee3b2          this->m_patchMeter = UIElement::GetChildRecursive(m_datapatchField_2, 0x1000041f);
004ee34a      }
004ee34a      
004ee3b8      class Client* eax_7 = Client::GetInstance();
004ee3b8      
004ee3bf      if (eax_7 != 0)
004ee3c1          eax_7->vtable->AddDDDStatusPlugin(&this->vtable);
004ee3c1      
004ee3cd      UIListener::RegisterForGlobalMessage(this, 3);
004ee3d5      gmDataPatchUI::SetConnectLevel(this, 0f);
004ee3da      long double x87_r7 = ((long double)0f);
004ee3e0      long double temp0 = ((long double)this->m_fPatchLevel);
004ee3e0      (x87_r7 - temp0);
004ee3e6      int32_t eax_8;
004ee3e6      eax_8 = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
004ee3e8      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
004ee3e8      
004ee3eb      if (p)
004ee3eb      {
004ee3ed          class UIElement* m_patchMeter = this->m_patchMeter;
004ee3f6          this->m_fPatchLevel = 0f;
004ee3fc          UIElement::SetAttribute_Float(m_patchMeter, 0x66, 0f);
004ee3eb      }
004ee2b0  }

004ee407                       90 90 90 90 90 90 90 90 90                                                         .........

004ee410  void* __thiscall gmDataPatchUI::`scalar deleting destructor'(class gmDataPatchUI* this, uint32_t arg2)

004ee410  {
004ee413      gmDataPatchUI::~gmDataPatchUI(this);
004ee413      
004ee41d      if ((arg2 & 1) != 0)
004ee420          operator delete(this);
004ee420      
004ee42b      return this;
004ee410  }

004ee42e                                            90 90                                                                ..

004ee430  class UIMainFramework* gmDataPatchUI::Create()

004ee430  {
004ee435      void* eax = operator new(0xd0);
004ee435      
004ee43f      if (eax == 0)
004ee44a          return 0;
004ee44a      
004ee443      /* tailcall */
004ee443      return gmDataPatchUI::gmDataPatchUI(eax);
004ee430  }

004ee44b                                   90 90 90 90 90                                                             .....

004ee450  void gmDataPatchUI::Register(uint32_t arg1)

004ee450  {
004ee45a      UIFlow::RegisterFrameworkClass(arg1, gmDataPatchUI::Create);
004ee450  }

004ee463           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004ee470  void UIGlobals::Init()

004ee470  {
004ee470      int32_t i_2;
004ee470      int32_t i_1 = i_2;
004ee470      
004ee478      if (UIGlobals::s_pLevelArray == 0)
004ee478      {
004ee48f          int32_t ebp_1 = 0;
004ee491          int32_t ebx_1 = 0;
004ee493          void* UIGlobals::s_pLevelArray_1 = operator new[](0xc8);
004ee495          int32_t i = 0;
004ee497          UIGlobals::s_pLevelArray = UIGlobals::s_pLevelArray_1;
004ee49d          i_1 = 0;
004ee49d          
004ee4e5          do
004ee4e5          {
004ee4c0              long double st0_1;
004ee4c0              bool c2_1;
004ee4c0              st0_1 = __fsin(((((long double)i_1) * ((long double)3.1415920000000002)) * ((long double)0.010101010101010102)));
004ee4cd              *(uint16_t*)((char*)UIGlobals::s_pLevelArray_1 + (i << 1)) = _ftol2();
004ee4d1              UIGlobals::s_pLevelArray_1 = UIGlobals::s_pLevelArray;
004ee4db              ebp_1 += ((int32_t)*(uint16_t*)((char*)UIGlobals::s_pLevelArray_1 + (i << 1)));
004ee4dd              i += 1;
004ee4e1              i_1 = i;
004ee4e5          } while (i < 0x64);
004ee4e5          
004ee4e7          void* ecx = nullptr;
004ee4e7          
004ee4f5          while (true)
004ee4f5          {
004ee4f5              ebx_1 += ((int32_t)*(uint16_t*)((char*)ecx + UIGlobals::s_pLevelArray_1));
004ee4ff              ecx += 2;
004ee508              *(uint16_t*)(((char*)ecx + UIGlobals::s_pLevelArray_1) - 2) = ((int16_t)(((int64_t)(ebx_1 << 0xa)) / ebp_1));
004ee508              
004ee50d              if (ecx >= 0xc8)
004ee50d                  break;
004ee50d              
004ee4eb              UIGlobals::s_pLevelArray_1 = UIGlobals::s_pLevelArray;
004ee4f5          }
004ee478      }
004ee470  }

004ee4a3           8d a4 24 00 00 00 00 8d 9b 00 00 00 00                                                     ..$..........
004ee515                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004ee520  void UIGlobals::Cleanup()

004ee520  {
004ee526      operator delete[](UIGlobals::s_pLevelArray);
004ee52e      UIGlobals::s_pLevelArray = nullptr;
004ee520  }

004ee539                                                                             90 90 90 90 90 90 90                           .......

004ee540  void UIGlobals::GetAnimLevel(float arg1)

004ee540  {
004ee540      long double x87_r7 = ((long double)arg1);
004ee544      (x87_r7 - ((long double)0.0));
004ee54c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004ee54c      
004ee54f      if (!(p))
004ee553          x87_r7 = ((long double)0f);
004ee553      
004ee559      (x87_r7 - ((long double)1.0));
004ee574      int32_t eax_1 = _ftol2();
004ee583      int32_t eax_2;
004ee583      eax_2 = *(uint16_t*)(UIGlobals::s_pLevelArray - (eax_1 << 1));
004ee540  }

004ee587                       90 90 90 90 90 90 90 90 90                                                         .........

004ee590  void __thiscall gmCG3DView::SetPlayerHeading(class gmCG3DView* this, float arg2)

004ee590  {
004ee598      this->m_fHeading = arg2;
004ee59f      CPhysicsObj::set_heading(this->m_pPlayerObject, arg2, 1);
004ee590  }

004ee5a7                       90 90 90 90 90 90 90 90 90                                                         .........

004ee5b0  void __thiscall gmCG3DView::SetCamera(class gmCG3DView* this, class AC1Legacy::Vector3 const* arg2, class AC1Legacy::Vector3 const* arg3)

004ee5b0  {
004ee5b7      this->m_vectPosition.x = arg2->x;
004ee5bd      this->m_vectPosition.y = arg2->y;
004ee5c7      this->m_vectPosition.z = arg2->z;
004ee5d0      this->m_vectDirection.x = arg3->x;
004ee5d0      this->m_vectDirection.y = arg3->y;
004ee5d0      this->m_vectDirection.z = arg3->z;
004ee5ee      /* tailcall */
004ee5ee      return UIElement_Viewport::SetCamera(this->m_pViewport, &this->m_vectPosition, &this->m_vectDirection);
004ee5b0  }

004ee5f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004ee600  void __fastcall gmCG3DView::StartAnimation(class gmCG3DView* this)

004ee600  {
004ee606      CPhysicsObj::clear_sequence_anims(this->m_pPlayerObject);
004ee61b      CPhysicsObj::set_sequence_animation(this->m_pPlayerObject, this->m_didAnimation.id, 1, 0, 30f);
004ee62c      this->m_dLastAnimTime = (*(uint32_t*)Timer::cur_time);
004ee62f      *(uint32_t*)((char*)this->m_dLastAnimTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
004ee600  }

004ee634                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004ee640  void __fastcall gmCG3DView::StopAnimation(class gmCG3DView* this)

004ee640  {
004ee646      CPhysicsObj::clear_sequence_anims(this->m_pPlayerObject);
004ee658      CPhysicsObj::set_sequence_animation(this->m_pPlayerObject, this->m_didAnimationRest.id, 1, 0, 0f);
004ee640  }

004ee65f                                                                                               90                                 .

004ee660  class ClothingTable* ClothingTable::Get(class IDClass<_tagDataID,32,0> arg1)

004ee660  {
004ee67c      void var_8;
004ee67c      return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0x19));
004ee660  }

004ee67d                                                                                         90 90 90                               ...

004ee680  void __fastcall gmCG3DView::gmCG3DView(class gmCG3DView* this)

004ee680  {
004ee680      class gmCG3DView* __return = this;
004ee686      this->m_pViewport = nullptr;
004ee689      this->m_pPlayerObject = nullptr;
004ee68c      this->m_pbgObject = nullptr;
004ee695      this->m_alternateSetupID.id = INVALID_DID.id;
004ee698      this->m_fHeading = 0f;
004ee69d      __builtin_memset(&this->m_vectPosition, 0, 0x18);
004ee6cc      this->m_didAnimation.id = DBObj::GetDIDByEnum(&__return, 0x10000006, 7)->id;
004ee6e2      this->m_didAnimationRest.id = DBObj::GetDIDByEnum(&__return, 0x10000005, 7)->id;
004ee6f8      this->m_didAnimArray[0].id = DBObj::GetDIDByEnum(&__return, 0x10000007, 7)->id;
004ee70e      this->m_didAnimArray[1].id = DBObj::GetDIDByEnum(&__return, 0x10000008, 7)->id;
004ee724      this->m_didAnimArray[2].id = DBObj::GetDIDByEnum(&__return, 0x10000009, 7)->id;
004ee73d      this->m_didAnimArray[3].id = DBObj::GetDIDByEnum(&__return, 0x1000000a, 7)->id;
004ee747      this->m_didAnimArray[4].id = DBObj::GetDIDByEnum(&__return, 0x1000000b, 7)->id;
004ee753      this->m_SetupID.id = HUMAN_SETUP_ID.id;
004ee680  }

004ee75b                                                                                   90 90 90 90 90                             .....

004ee760  void __fastcall gmCG3DView::Initialize(class gmCG3DView* this, class UIElement_Viewport* arg2)

004ee760  {
004ee760      class gmCG3DView* __return = this;
004ee76a      this->m_pViewport = arg2;
004ee76d      class CPlayerSystem* eax_1 = CPlayerSystem::GetPlayerSystem();
004ee774      this->m_pPlayerSystem = eax_1;
004ee776      class ClientCharGenState* eax_2 = CPlayerSystem::GetCharGenState(eax_1);
004ee784      CharGenState::GetSetupID(eax_2, &arg2);
004ee79d      uint32_t id;
004ee79d      
004ee79d      if (*(uint32_t*)CharGenState::GetSetupID(eax_2, &__return) != INVALID_DID.id)
004ee7aa          id = arg2;
004ee79d      else
004ee79d      {
004ee79f          id = HUMAN_SETUP_ID.id;
004ee7a4          arg2 = id;
004ee79d      }
004ee79d      
004ee7ae      uint32_t mHeritageGroup = eax_2->mHeritageGroup;
004ee7c3      this->m_pPlayerObject = CPhysicsObj::makeObject(id, 0, 1);
004ee7c3      
004ee7c6      if (mHeritageGroup == 0xc)
004ee7c6      {
004ee7e9          this->m_didAnimation.id = DBObj::GetDIDByEnum(&__return, 0x10000011, 7)->id;
004ee7ff          this->m_didAnimationRest.id = DBObj::GetDIDByEnum(&__return, 0x10000011, 7)->id;
004ee815          this->m_didAnimArray[0].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004ee82b          this->m_didAnimArray[1].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004ee844          this->m_didAnimArray[2].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004ee85a          this->m_didAnimArray[3].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004ee864          this->m_didAnimArray[4].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004ee7c6      }
004ee7c6      else if (mHeritageGroup != 0xd)
004ee86f      {
004ee932          this->m_didAnimation.id = DBObj::GetDIDByEnum(&__return, 0x10000006, 7)->id;
004ee948          this->m_didAnimationRest.id = DBObj::GetDIDByEnum(&__return, 0x10000005, 7)->id;
004ee95e          this->m_didAnimArray[0].id = DBObj::GetDIDByEnum(&__return, 0x10000007, 7)->id;
004ee974          this->m_didAnimArray[1].id = DBObj::GetDIDByEnum(&__return, 0x10000008, 7)->id;
004ee98d          this->m_didAnimArray[2].id = DBObj::GetDIDByEnum(&__return, 0x10000009, 7)->id;
004ee9a3          this->m_didAnimArray[3].id = DBObj::GetDIDByEnum(&__return, 0x1000000a, 7)->id;
004ee9ad          this->m_didAnimArray[4].id = DBObj::GetDIDByEnum(&__return, 0x1000000b, 7)->id;
004ee86f      }
004ee86f      else
004ee86f      {
004ee892          this->m_didAnimation.id = DBObj::GetDIDByEnum(&__return, 0x10000013, 7)->id;
004ee8a8          this->m_didAnimationRest.id = DBObj::GetDIDByEnum(&__return, 0x10000013, 7)->id;
004ee8be          this->m_didAnimArray[0].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004ee8d4          this->m_didAnimArray[1].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004ee8ed          this->m_didAnimArray[2].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004ee903          this->m_didAnimArray[3].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004ee90d          this->m_didAnimArray[4].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004ee86f      }
004ee86f      
004ee9bc      CreatureMode::UseSharpMode(&this->m_pViewport->creature_mode_objects);
004ee760  }

004ee9c8                          90 90 90 90 90 90 90 90                                                          ........

004ee9d0  void __fastcall gmCG3DView::Update(class gmCG3DView* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004ee9d0  {
004ee9d0      int32_t ebp;
004ee9d0      int32_t var_4 = ebp;
004ee9e3      uint32_t __return_1 = 0;
004ee9ea      class ClientCharGenState* eax = CPlayerSystem::GetCharGenState(this->m_pPlayerSystem);
004ee9f1      uint32_t mHeritageGroup = eax->mHeritageGroup;
004ee9f1      
004eea05      if ((mHeritageGroup != 0 && eax->mGender != 0))
004eea05      {
004eea1a          void __return_3;
004eea1a          ACCharGenData::GetHG(eax->charGenData, &__return_3, mHeritageGroup);
004eea35          void __return_2;
004eea35          HeritageGroup_CG::GetSX(&__return_3, &__return_2, eax->mGender);
004eea41          CharGenState::GetSetupID(eax, &__return_1);
004eea46          uint32_t id = this->m_alternateSetupID.id;
004eea49          uint32_t id_1 = INVALID_DID.id;
004eea49          
004eea51          if (id == id_1)
004eea59              id = __return_1;
004eea51          else
004eea53              __return_1 = id;
004eea53          
004eea5f          if (id == id_1)
004eea5f          {
004eea61              id = HUMAN_SETUP_ID.id;
004eea66              __return_1 = id;
004eea5f          }
004eea5f          
004eea6d          if (this->m_SetupID.id != id)
004eea6d          {
004eea7c              CreatureMode::RemoveObject(&this->m_pViewport->creature_mode_objects, this->m_pPlayerObject);
004eea81              class CPhysicsObj* m_pPlayerObject = this->m_pPlayerObject;
004eea8a              this->m_SetupID.id = __return_1;
004eea8a              
004eea8d              if (m_pPlayerObject != 0)
004eea8f                  m_pPlayerObject->vtable->__vecDelDtor(1);
004eea8f              
004eea9c              class CPhysicsObj* eax_2 = CPhysicsObj::makeObject(this->m_SetupID.id, 0, 1);
004eeaae              this->m_pPlayerObject = eax_2;
004eeab1              CreatureMode::AddObject(&this->m_pViewport->creature_mode_objects, eax_2);
004eea6d          }
004eea6d          
004eeab6          uint32_t mHeritageGroup_1 = eax->mHeritageGroup;
004eeac1          int32_t __return;
004eeac1          
004eeac1          if (mHeritageGroup_1 == 0xc)
004eeac1          {
004eeae4              this->m_didAnimation.id = DBObj::GetDIDByEnum(&__return, 0x10000011, 7)->id;
004eeafa              this->m_didAnimationRest.id = DBObj::GetDIDByEnum(&__return, 0x10000011, 7)->id;
004eeb10              this->m_didAnimArray[0].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004eeb26              this->m_didAnimArray[1].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004eeb3c              this->m_didAnimArray[2].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004eeb55              this->m_didAnimArray[3].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004eeb5f              this->m_didAnimArray[4].id = DBObj::GetDIDByEnum(&__return, 0x10000012, 7)->id;
004eeac1          }
004eeac1          else if (mHeritageGroup_1 != 0xd)
004eeb6a          {
004eec2d              this->m_didAnimation.id = DBObj::GetDIDByEnum(&__return, 0x10000006, 7)->id;
004eec43              this->m_didAnimationRest.id = DBObj::GetDIDByEnum(&__return, 0x10000005, 7)->id;
004eec59              this->m_didAnimArray[0].id = DBObj::GetDIDByEnum(&__return, 0x10000007, 7)->id;
004eec6f              this->m_didAnimArray[1].id = DBObj::GetDIDByEnum(&__return, 0x10000008, 7)->id;
004eec85              this->m_didAnimArray[2].id = DBObj::GetDIDByEnum(&__return, 0x10000009, 7)->id;
004eec9e              this->m_didAnimArray[3].id = DBObj::GetDIDByEnum(&__return, 0x1000000a, 7)->id;
004eeca8              this->m_didAnimArray[4].id = DBObj::GetDIDByEnum(&__return, 0x1000000b, 7)->id;
004eeb6a          }
004eeb6a          else
004eeb6a          {
004eeb8d              this->m_didAnimation.id = DBObj::GetDIDByEnum(&__return, 0x10000013, 7)->id;
004eeba3              this->m_didAnimationRest.id = DBObj::GetDIDByEnum(&__return, 0x10000013, 7)->id;
004eebb9              this->m_didAnimArray[0].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004eebcf              this->m_didAnimArray[1].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004eebe5              this->m_didAnimArray[2].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004eebfe              this->m_didAnimArray[3].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004eec08              this->m_didAnimArray[4].id = DBObj::GetDIDByEnum(&__return, 0x10000014, 7)->id;
004eeb6a          }
004eeb6a          
004eecb7          CreatureMode::RemoveAllObjects(&this->m_pViewport->creature_mode_objects);
004eecbc          class UIElement_Viewport* m_pViewport = this->m_pViewport;
004eeccb          int32_t var_200 = 0x3e99999a;
004eecd3          int32_t var_1fc_1 = 0x3ff33333;
004eecdb          int32_t var_1f8;
004eecdb          __builtin_strncpy(&var_1f8, "ff&?", 4);
004eece3          UIElement_Viewport::SetLight(m_pViewport, DISTANT_LIGHT, 2f, &var_200);
004eecf1          CPhysicsObj::set_heading(this->m_pPlayerObject, this->m_fHeading, 1);
004eecf6          this->m_pPlayerObject->m_bExaminationObject = 1;
004eecfd          class IDClass<_tagDataID,32,0> var_b8;
004eecfd          class IDClass<_tagDataID,32,0> eax_32 = var_b8;
004eecfd          
004eed07          if (this->m_bgSetupID.id != eax_32)
004eed07          {
004eed09              class CPhysicsObj* m_pbgObject = this->m_pbgObject;
004eed09              
004eed0e              if (m_pbgObject != 0)
004eed0e              {
004eed10                  m_pbgObject->vtable->__vecDelDtor(1);
004eed16                  eax_32 = var_b8;
004eed1d                  this->m_pbgObject = nullptr;
004eed0e              }
004eed07          }
004eed07          
004eed20          this->m_bgSetupID.id = eax_32;
004eed20          
004eed29          if (eax_32 != INVALID_DID.id)
004eed29          {
004eed2f              class CPhysicsObj* eax_33 = CPhysicsObj::makeObject(eax_32, 0, 1);
004eed41              this->m_pbgObject = eax_33;
004eed44              CreatureMode::AddObject(&this->m_pViewport->creature_mode_objects, eax_33);
004eed29          }
004eed29          
004eed4d          void var_1f4;
004eed4d          ObjDesc::ObjDesc(&var_1f4);
004eed65          int32_t var_158;
004eed65          int32_t var_1f0_1 = var_158;
004eed69          void var_190;
004eed69          ObjDesc::operator+=(&var_1f4, &var_190);
004eed6e          int32_t hairStyle = eax->hairStyle;
004eed77          int32_t var_144;
004eed77          
004eed77          if (hairStyle != 0xffffffff)
004eed8c              ObjDesc::operator+=(&var_1f4, (((hairStyle * 0x3c) + var_144) + 0x10));
004eed91          int32_t headgearStyle = eax->headgearStyle;
004eed9a          int32_t var_208;
004eed9a          void var_1c8;
004eed9a          
004eed9a          if (headgearStyle != 0xffffffff)
004eed9a          {
004eedb7              int32_t var_108;
004eedb7              class DBObj* eax_40 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_208, *(uint32_t*)(((headgearStyle << 4) + var_108) + 8), 0x19));
004eedb7              
004eedc3              if (eax_40 != 0)
004eedc3              {
004eedce                  uint32_t eax_42 = CharGenState::GetHeadgearPaletteTemplateID(eax, eax->headgearColor);
004eeddb                  int32_t eax_43 = *(uint32_t*)((char*)eax->headgearShade)[4];
004eede1                  __return = eax->headgearShade;
004eedec                  int32_t var_210_1 = eax_43;
004eedf4                  int32_t var_230_5 = eax_43;
004eedfa                  class ShadePackage* eax_45 = ShadePackage::ShadePackage(&var_1c8, __return);
004eee07                  ClothingTable::BuildObjDesc(eax_40, this->m_SetupID.id, eax_42, eax_45, &var_1f4);
004eee0c                  eax_40->vtable->Release();
004eedc3              }
004eed9a          }
004eed9a          
004eee13          int32_t trousersStyle = eax->trousersStyle;
004eee13          
004eee1c          if (trousersStyle != 0xffffffff)
004eee1c          {
004eee39              int32_t var_f0;
004eee39              class DBObj* eax_49 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_208, *(uint32_t*)(((trousersStyle << 4) + var_f0) + 8), 0x19));
004eee39              
004eee45              if (eax_49 != 0)
004eee45              {
004eee50                  uint32_t eax_51 = CharGenState::GetTrousersPaletteTemplateID(eax, eax->trousersColor);
004eee5d                  int32_t eax_52 = *(uint32_t*)((char*)eax->trousersShade)[4];
004eee63                  __return = eax->trousersShade;
004eee6e                  int32_t var_210_2 = eax_52;
004eee76                  int32_t var_230_8 = eax_52;
004eee7c                  class ShadePackage* eax_54 = ShadePackage::ShadePackage(&var_1c8, __return);
004eee89                  ClothingTable::BuildObjDesc(eax_49, this->m_SetupID.id, eax_51, eax_54, &var_1f4);
004eee8e                  eax_49->vtable->Release();
004eee45              }
004eee1c          }
004eee1c          
004eee95          int32_t shirtStyle = eax->shirtStyle;
004eee95          
004eee9e          if (shirtStyle != 0xffffffff)
004eee9e          {
004eeebb              int32_t var_fc;
004eeebb              class DBObj* eax_58 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_208, *(uint32_t*)(((shirtStyle << 4) + var_fc) + 8), 0x19));
004eeebb              
004eeec7              if (eax_58 != 0)
004eeec7              {
004eeed2                  uint32_t eax_60 = CharGenState::GetShirtPaletteTemplateID(eax, eax->shirtColor);
004eeedf                  int32_t eax_61 = *(uint32_t*)((char*)eax->shirtShade)[4];
004eeee5                  __return = eax->shirtShade;
004eeef0                  int32_t var_210_3 = eax_61;
004eeef8                  int32_t var_230_11 = eax_61;
004eeefe                  class ShadePackage* eax_63 = ShadePackage::ShadePackage(&var_1c8, __return);
004eef0b                  ClothingTable::BuildObjDesc(eax_58, this->m_SetupID.id, eax_60, eax_63, &var_1f4);
004eef10                  eax_58->vtable->Release();
004eeec7              }
004eee9e          }
004eee9e          
004eef17          int32_t footwearStyle = eax->footwearStyle;
004eef17          
004eef20          if (footwearStyle != 0xffffffff)
004eef20          {
004eef3d              int32_t var_e4;
004eef3d              class DBObj* eax_67 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_208, *(uint32_t*)(((footwearStyle << 4) + var_e4) + 8), 0x19));
004eef3d              
004eef49              if (eax_67 != 0)
004eef49              {
004eef54                  uint32_t eax_69 = CharGenState::GetFootwearPaletteTemplateID(eax, eax->footwearColor);
004eef61                  int32_t eax_70 = *(uint32_t*)((char*)eax->footwearShade)[4];
004eef67                  __return = eax->footwearShade;
004eef72                  int32_t var_210_4 = eax_70;
004eef7a                  int32_t var_230_14 = eax_70;
004eef80                  class ShadePackage* eax_72 = ShadePackage::ShadePackage(&var_1c8, __return);
004eef8d                  ClothingTable::BuildObjDesc(eax_67, this->m_SetupID.id, eax_69, eax_72, &var_1f4);
004eef92                  eax_67->vtable->Release();
004eef49              }
004eef20          }
004eef20          
004eef99          int32_t eyesStrip = eax->eyesStrip;
004eef99          
004eefa2          if (eyesStrip != 0xffffffff)
004eefa2          {
004eefae              int32_t var_12c;
004eefae              void* eax_74 = ((eyesStrip * 0x64) + var_12c);
004eefbf              class ObjDesc* ebx_6;
004eefbf              
004eefbf              if (CharGenState::GetBaldState(eax) == 0)
004eefc6                  ebx_6 = ((char*)eax_74 + 0xc);
004eefbf              else
004eefc1                  ebx_6 = ((char*)eax_74 + 0x38);
004eefc1              
004eefca              ObjDesc::operator+=(&var_1f4, ebx_6);
004eefa2          }
004eefa2          
004eefcf          int32_t noseStrip = eax->noseStrip;
004eefd8          int32_t var_120;
004eefd8          
004eefd8          if (noseStrip != 0xffffffff)
004eefed              ObjDesc::operator+=(&var_1f4, (((noseStrip * 0x34) + var_120) + 8));
004eeff2          int32_t mouthStrip = eax->mouthStrip;
004eeffb          int32_t var_114;
004eeffb          
004eeffb          if (mouthStrip != 0xffffffff)
004ef010              ObjDesc::operator+=(&var_1f4, (((mouthStrip * 0x34) + var_114) + 8));
004ef029          class IDClass<_tagDataID,32,0> var_154;
004ef029          class DBObj* eax_80 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_200, var_154, 0x18));
004ef037          void* ebx_7 = operator new(0x18);
004ef037          
004ef03e          if (ebx_7 == 0)
004ef083              ebx_7 = nullptr;
004ef03e          else
004ef03e          {
004ef040              int32_t edx_26 = *(uint32_t*)((char*)eax->skinShade)[4];
004ef046              int32_t ecx_62 = eax->skinShade;
004ef04e              int32_t var_22c_26 = edx_26;
004ef04f              int32_t var_204_1 = edx_26;
004ef058              var_208 = ecx_62;
004ef066              *(uint32_t*)((char*)ebx_7 + 4) = PalSet::GetPaletteID(eax_80, &__return, ecx_62)->id;
004ef06b              *(uint32_t*)ebx_7 = 0x7c3674;
004ef071              *(uint32_t*)((char*)ebx_7 + 8) = 0;
004ef074              *(uint32_t*)((char*)ebx_7 + 0xc) = 0xc0;
004ef07b              *(uint32_t*)((char*)ebx_7 + 0x10) = 0;
004ef07e              *(uint32_t*)((char*)ebx_7 + 0x14) = 0;
004ef03e          }
004ef03e          
004ef08a          ObjDesc::AddSubpalette(&var_1f4, ebx_7);
004ef08f          eax_80->vtable->Release();
004ef097          int32_t hairColor = eax->hairColor;
004ef097          
004ef0a0          if (hairColor != 0xffffffff)
004ef0a0          {
004ef0bd              int32_t var_150;
004ef0bd              class DBObj* eax_88 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_200, *(uint32_t*)(var_150 + (hairColor << 2)), 0x18));
004ef0cb              void* ebx_8 = operator new(0x18);
004ef0cb              
004ef0d2              if (ebx_8 == 0)
004ef11b                  ebx_8 = nullptr;
004ef0d2              else
004ef0d2              {
004ef0d4                  int32_t eax_90 = *(uint32_t*)((char*)eax->hairShade)[4];
004ef0da                  int32_t edx_27 = eax->hairShade;
004ef0e2                  int32_t var_22c_29 = eax_90;
004ef0e3                  int32_t var_204_2 = eax_90;
004ef0ef                  var_208 = edx_27;
004ef0fa                  *(uint32_t*)((char*)ebx_8 + 4) = PalSet::GetPaletteID(eax_88, &__return, edx_27)->id;
004ef0ff                  *(uint32_t*)ebx_8 = 0x7c3674;
004ef105                  *(uint32_t*)((char*)ebx_8 + 8) = 0xc0;
004ef10c                  *(uint32_t*)((char*)ebx_8 + 0xc) = 0x40;
004ef113                  *(uint32_t*)((char*)ebx_8 + 0x10) = 0;
004ef116                  *(uint32_t*)((char*)ebx_8 + 0x14) = 0;
004ef0d2              }
004ef0d2              
004ef122              ObjDesc::AddSubpalette(&var_1f4, ebx_8);
004ef127              eax_88->vtable->Release();
004ef0a0          }
004ef0a0          
004ef12f          int32_t eyeColor = eax->eyeColor;
004ef12f          
004ef138          if (eyeColor != 0xffffffff)
004ef138          {
004ef141              int32_t var_138;
004ef141              int32_t edi_1 = *(uint32_t*)(var_138 + (eyeColor << 2));
004ef146              void* eax_94 = operator new(0x18);
004ef146              
004ef152              if (eax_94 == 0)
004ef173                  eax_94 = nullptr;
004ef152              else
004ef152              {
004ef154                  *(uint32_t*)eax_94 = 0x7c3674;
004ef15a                  *(uint32_t*)((char*)eax_94 + 4) = edi_1;
004ef15d                  *(uint32_t*)((char*)eax_94 + 8) = 0x100;
004ef164                  *(uint32_t*)((char*)eax_94 + 0xc) = 0x40;
004ef16b                  *(uint32_t*)((char*)eax_94 + 0x10) = 0;
004ef16e                  *(uint32_t*)((char*)eax_94 + 0x14) = 0;
004ef152              }
004ef152              
004ef17a              ObjDesc::AddSubpalette(&var_1f4, eax_94);
004ef138          }
004ef138          
004ef187          CPhysicsObj::DoObjDescChangesFromDefault(this->m_pPlayerObject, &var_1f4);
004ef199          CreatureMode::AddObject(&this->m_pViewport->creature_mode_objects, this->m_pPlayerObject);
004ef1a9          UIElement_Viewport::SetCamera(this->m_pViewport, &this->m_vectPosition, &this->m_vectDirection);
004ef1b2          ObjDesc::~ObjDesc(&var_1f4);
004ef1be          Sex_CG::~Sex_CG(&__return_2);
004ef1ca          HeritageGroup_CG::~HeritageGroup_CG(&__return_3);
004eea05      }
004eea05      
004ee9dd      var_4;
004ee9d0  }

004ef1d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004ef1e0  void __fastcall UIOption::UIOption(class UIOption* this)

004ef1e0  {
004ef1e7      this->vtable = 0x7c3870;
004ef1ed      this->m_confirmChange = 0;
004ef1f0      this->m_bDelayConfirmation = 0;
004ef1f3      this->m_dialogContext = 0;
004ef1f6      this->m_shouldReloadOptions = 0;
004ef1f9      this->m_shouldRefreshOptionsPanel = 0;
004ef1fc      this->m_noticeFuncPtr = nullptr;
004ef1ff      this->m_pOCH = nullptr;
004ef202      this->m_nUserData = 0;
004ef205      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ef205      
004ef20e      if (eax != 0)
004ef20e      {
004ef210          eax->vtable->RegisterNoticeHandler(0x186a4, this);
004ef21d          eax->vtable->RegisterNoticeHandler(0x4dd217, this);
004ef22a          eax->vtable->RegisterNoticeHandler(0x4dd216, this);
004ef20e      }
004ef1e0  }

004ef23d                                                                                         90 90 90                               ...

004ef240  void __fastcall UIOption::~UIOption(class UIOption* this)

004ef240  {
004ef243      this->vtable = 0x7c3870;
004ef249      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ef249      
004ef250      if (eax != 0)
004ef252          eax->vtable->UnRegisterAllNoticeHandlers(this);
004ef252      
004ef25a      this->vtable = 0x7bf328;
004ef263      /* tailcall */
004ef263      return NoticeHandler::~NoticeHandler(this);
004ef240  }

004ef268                          90 90 90 90 90 90 90 90                                                          ........

004ef270  void __thiscall UIOption::SetLabel(class UIOption* this, uint32_t arg2, uint32_t arg3)

004ef270  {
004ef27d      void var_90;
004ef27d      StringInfo::StringInfo(&var_90);
004ef296      StringInfo::SetStringIDandTableEnum(&var_90, arg2, arg3);
004ef2a4      *(int32_t*)((char*)this->vtable + 0x2b0)(&var_90);
004ef2ae      StringInfo::~StringInfo(&var_90);
004ef270  }

004ef2bd                                                                                         90 90 90                               ...

004ef2c0  void __thiscall UIOption::SetTooltip(class UIOption* this, uint32_t arg2, uint32_t arg3)

004ef2c0  {
004ef2cd      void var_90;
004ef2cd      StringInfo::StringInfo(&var_90);
004ef2e6      StringInfo::SetStringIDandTableEnum(&var_90, arg2, arg3);
004ef2f4      *(int32_t*)((char*)this->vtable + 0x2b4)(&var_90);
004ef2fe      StringInfo::~StringInfo(&var_90);
004ef2c0  }

004ef30d                                         90 90 90                                                               ...

004ef310  void __thiscall UIOption::SetConfirmChange(class UIOption* this, uint8_t arg2)

004ef310  {
004ef314      this->m_confirmChange = 1;
004ef318      this->m_bDelayConfirmation = arg2;
004ef310  }

004ef31e                                                                                            90 90                                ..

004ef320  void __thiscall UIOption::SetChangeNotification(class UIOption* this, class IOptionChangeHandler* arg2)

004ef320  {
004ef324      this->m_pOCH = arg2;
004ef320  }

004ef32a                                90 90 90 90 90 90                                                            ......

004ef330  void __thiscall UIOption::SetUserData(class UIOption* this, uint32_t arg2)

004ef330  {
004ef334      this->m_nUserData = arg2;
004ef330  }

004ef33a                                                                                90 90 90 90 90 90                            ......

004ef340  void* __thiscall UIOption::`scalar deleting destructor'(class UIOption* this, uint32_t arg2)

004ef340  {
004ef343      this->vtable = 0x7c3870;
004ef349      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004ef349      
004ef350      if (eax != 0)
004ef352          eax->vtable->UnRegisterAllNoticeHandlers(this);
004ef352      
004ef35c      this->vtable = 0x7bf328;
004ef362      NoticeHandler::~NoticeHandler(this);
004ef362      
004ef36c      if ((arg2 & 1) != 0)
004ef36f          operator delete(this);
004ef36f      
004ef37a      return this;
004ef340  }

004ef37d                                                                                         90 90 90                               ...

004ef380  uint8_t __thiscall DBObjGrabber<DBPropertyCollection>::set(class DBObjGrabber<DBPropertyCollection>* this, class IDClass<_tagDataID,32,0> arg2)

004ef380  {
004ef387      class DBPropertyCollection* m_object = this->m_object;
004ef38b      struct DBObj::VTable** esi;
004ef38b      
004ef38b      if (m_object == 0)
004ef392          esi = nullptr;
004ef38b      else
004ef38d          esi = &m_object->vtable;
004ef38d      
004ef3a5      void var_8;
004ef3a5      class DBObj* eax_2 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x31));
004ef3af      void* __offset(DBObj, -0x78) eax_3;
004ef3af      
004ef3af      if (eax_2 == 0)
004ef3b6          eax_3 = nullptr;
004ef3af      else
004ef3b1          eax_3 = ((char*)eax_2 - 0x78);
004ef3b1      
004ef3ba      this->m_object = eax_3;
004ef3ba      
004ef3bc      if (esi != 0)
004ef3be          ADJ(esi)->vtable->Release();
004ef3be      
004ef3c9      eax_3 = this->m_object != 0;
004ef3d0      return eax_3;
004ef380  }

004ef3d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004ef3e0  void __thiscall UIOption::RecvNotice_CloseDialog(class UIOption* this, uint32_t arg2, class PropertyCollection const* arg3)

004ef3e0  {
004ef3ed      if (this->m_dialogContext == arg2)
004ef3ed      {
004ef400          uint32_t temp1_1 = (COMBINE(0, 0x92) % arg3->m_hashProperties.m_intrusiveTable.m_numBuckets);
004ef403          class HashTableData<unsigned long,BaseProperty>** m_buckets = arg3->m_hashProperties.m_intrusiveTable.m_buckets;
004ef408          int32_t* ecx = nullptr;
004ef40a          arg2 = 0;
004ef40e          int32_t* var_8 = nullptr;
004ef412          int32_t* var_4_1 = nullptr;
004ef412          
004ef41d          for (int32_t* i = m_buckets[temp1_1]; i != 0; i = i[1])
004ef41d          {
004ef426              if (*(uint32_t*)i == 0x92)
004ef426              {
004ef433                  if (i != 0)
004ef433                  {
004ef43d                      BaseProperty::operator=(&var_8, &i[2]);
004ef442                      ecx = var_4_1;
004ef442                      
004ef448                      if (ecx != 0)
004ef448                      {
004ef451                          *(uint32_t*)(*(uint32_t*)ecx + 0x70)(&arg2);
004ef454                          ecx = var_4_1;
004ef448                      }
004ef433                  }
004ef433                  
004ef433                  break;
004ef426              }
004ef41d          }
004ef41d          
004ef458          bool cond:0_1 = arg2 != 0;
004ef45c          this->m_dialogContext = 0;
004ef45c          
004ef45f          if (!(cond:0_1))
004ef45f          {
004ef461              this->vtable->RestoreSavedValue();
004ef46b              ecx = var_4_1;
004ef45f          }
004ef45f          
004ef46f          class IOptionChangeHandler* m_pOCH = this->m_pOCH;
004ef46f          
004ef474          if (m_pOCH != 0)
004ef474          {
004ef47a              m_pOCH->vtable->OnOptionChangeConfirmed(this, arg2);
004ef483              ecx = var_4_1;
004ef474          }
004ef474          
004ef487          int32_t* eax_4 = var_8;
004ef487          
004ef48d          if (eax_4 != 0)
004ef48d          {
004ef497              int32_t esi_3 = (eax_4[1] - 1);
004ef494              eax_4[1] = esi_3;
004ef494              
004ef49e              if (esi_3 == 0)
004ef4a4                  **(uint32_t**)eax_4(1);
004ef4a4              
004ef4a6              ecx = var_4_1;
004ef4aa              var_8 = nullptr;
004ef48d          }
004ef48d          
004ef4b0          if (ecx != 0)
004ef4b0          {
004ef4b8              int32_t esi_5 = (ecx[1] - 1);
004ef4b5              ecx[1] = esi_5;
004ef4b5              
004ef4bf              if (esi_5 == 0)
004ef4c5                  **(uint32_t**)ecx(1);
004ef4b0          }
004ef3ed      }
004ef3e0  }


004ef4d0  uint8_t __stdcall UIOption::InqGameplayOptionProperty(class UIOption* this @ ecx, uint32_t arg2, class BaseProperty* arg3)

004ef4d0  {
004ef4e5      class IDClass<_tagDataID,32,0> __return;
004ef4e5      DBCache::GetDIDFromEnumStatic(&__return, 0x15, 2);
004ef4f8      void* var_30 = nullptr;
004ef4fc      DBObjGrabber<DBPropertyCollection>::set(&var_30, __return);
004ef501      void* edi = var_30;
004ef501      
004ef507      if (edi != 0)
004ef507      {
004ef50d          int32_t* var_20 = nullptr;
004ef511          int32_t* var_1c_1 = nullptr;
004ef525          int32_t* eax_4 = *(uint32_t*)(*(uint32_t*)((char*)edi + 0x68) + ((COMBINE(0, 0xd2) % *(uint32_t*)((char*)edi + 0x70)) << 2));
004ef525          
004ef529          if (eax_4 == 0)
004ef529          {
004ef545          label_4ef545:
004ef545              *(uint32_t*)(*(uint32_t*)((char*)edi + 0x78) + 0x14)();
004ef548              int32_t eax_5;
004ef548              eax_5 = 0;
004ef550              return 0;
004ef529          }
004ef529          
004ef536          while (*(uint32_t*)eax_4 != 0xd2)
004ef536          {
004ef538              eax_4 = eax_4[1];
004ef538              
004ef53d              if (eax_4 == 0)
004ef53d                  goto label_4ef545;
004ef536          }
004ef536          
004ef555          if (eax_4 == 0)
004ef555              goto label_4ef545;
004ef555          
004ef55f          BaseProperty::operator=(&var_20, &eax_4[2]);
004ef564          int32_t* ecx_4 = var_1c_1;
004ef56a          int32_t var_2c = 0;
004ef56a          
004ef56e          if (ecx_4 != 0)
004ef56e          {
004ef577              *(uint32_t*)(*(uint32_t*)ecx_4 + 0xf0)(&var_2c);
004ef57d              ecx_4 = var_1c_1;
004ef56e          }
004ef56e          
004ef585          int32_t* eax_8 = nullptr;
004ef587          int32_t esi_1 = 0;
004ef589          bool cond:1_1 = var_2c <= 0;
004ef58b          int32_t* var_18 = nullptr;
004ef58f          int32_t* var_14_1 = nullptr;
004ef58f          
004ef593          if (!(cond:1_1))
004ef593          {
004ef658              do
004ef658              {
004ef5a2                  if (ecx_4 != 0)
004ef5a2                  {
004ef5b8                      if (*(uint32_t*)(*(uint32_t*)ecx_4 + 0xf4)(esi_1, &var_18) == 0)
004ef649                          eax_8 = var_14_1;
004ef5b8                      else
004ef5b8                      {
004ef5be                          eax_8 = var_14_1;
004ef5c4                          int32_t* var_10 = nullptr;
004ef5c8                          int32_t* var_c_1 = nullptr;
004ef5c8                          
004ef5cc                          if (eax_8 != 0)
004ef5cc                          {
004ef5e4                              int32_t* ecx_6 = var_c_1;
004ef5e4                              
004ef5e8                              if (*(uint32_t*)(*(uint32_t*)eax_8 + 0x118)(0xd6, &var_10) != 0)
004ef5e8                              {
004ef5ec                                  int32_t var_24;
004ef5ec                                  
004ef5ec                                  if (ecx_6 != 0)
004ef5ec                                  {
004ef5f5                                      *(uint32_t*)(*(uint32_t*)ecx_6 + 0xa8)(&var_24);
004ef5fb                                      ecx_6 = var_c_1;
004ef5ec                                  }
004ef5ec                                  
004ef603                                  if (var_24 == arg2)
004ef603                                  {
004ef710                                      BaseProperty::operator=(arg3, &var_18);
004ef719                                      BaseProperty::~BaseProperty(&var_10);
004ef722                                      BaseProperty::~BaseProperty(&var_18);
004ef72b                                      BaseProperty::~BaseProperty(&var_20);
004ef73a                                      *(uint32_t*)(*(uint32_t*)((char*)var_30 + 0x78) + 0x14)();
004ef73f                                      int32_t eax_24;
004ef73f                                      eax_24 = 1;
004ef745                                      return 1;
004ef603                                  }
004ef5e8                              }
004ef5e8                              
004ef609                              int32_t* eax_12 = var_10;
004ef609                              
004ef60f                              if (eax_12 != 0)
004ef60f                              {
004ef619                                  int32_t edx_8 = (eax_12[1] - 1);
004ef616                                  eax_12[1] = edx_8;
004ef616                                  
004ef61e                                  if (edx_8 == 0)
004ef624                                      **(uint32_t**)eax_12(1);
004ef624                                  
004ef626                                  ecx_6 = var_c_1;
004ef62a                                  var_10 = nullptr;
004ef60f                              }
004ef60f                              
004ef630                              if (ecx_6 != 0)
004ef630                              {
004ef638                                  int32_t edx_11 = (ecx_6[1] - 1);
004ef635                                  ecx_6[1] = edx_11;
004ef635                                  
004ef63d                                  if (edx_11 == 0)
004ef643                                      **(uint32_t**)ecx_6(1);
004ef643                                  
004ef645                                  int32_t var_c_2 = 0;
004ef630                              }
004ef630                              
004ef649                              eax_8 = var_14_1;
004ef5cc                          }
004ef5b8                      }
004ef5b8                      
004ef64d                      ecx_4 = var_1c_1;
004ef5a2                  }
004ef5a2                  
004ef655                  esi_1 += 1;
004ef658              } while (esi_1 < var_2c);
004ef658              
004ef65e              int32_t* edx_13 = var_18;
004ef65e              
004ef664              if (edx_13 != 0)
004ef664              {
004ef66c                  int32_t esi_3 = (edx_13[1] - 1);
004ef669                  edx_13[1] = esi_3;
004ef669                  
004ef675                  if (esi_3 == 0)
004ef67b                      **(uint32_t**)edx_13(1);
004ef67b                  
004ef67d                  ecx_4 = var_1c_1;
004ef681                  eax_8 = var_14_1;
004ef685                  var_18 = nullptr;
004ef664              }
004ef664              
004ef68b              if (eax_8 != 0)
004ef68b              {
004ef695                  int32_t esi_5 = (eax_8[1] - 1);
004ef692                  eax_8[1] = esi_5;
004ef692                  
004ef69c                  if (esi_5 == 0)
004ef6a2                      **(uint32_t**)eax_8(1);
004ef6a2                  
004ef6a4                  ecx_4 = var_1c_1;
004ef6a8                  int32_t var_14_2 = 0;
004ef68b              }
004ef68b              
004ef6ac              edi = var_30;
004ef593          }
004ef593          
004ef6b0          int32_t* eax_19 = var_20;
004ef6b0          
004ef6b6          if (eax_19 != 0)
004ef6b6          {
004ef6c0              int32_t esi_7 = (eax_19[1] - 1);
004ef6bd              eax_19[1] = esi_7;
004ef6bd              
004ef6c7              if (esi_7 == 0)
004ef6cd                  **(uint32_t**)eax_19(1);
004ef6cd              
004ef6cf              ecx_4 = var_1c_1;
004ef6d3              var_20 = nullptr;
004ef6b6          }
004ef6b6          
004ef6d9          if (ecx_4 != 0)
004ef6d9          {
004ef6e1              int32_t esi_9 = (ecx_4[1] - 1);
004ef6de              ecx_4[1] = esi_9;
004ef6de              
004ef6e8              if (esi_9 == 0)
004ef6ee                  **(uint32_t**)ecx_4(1);
004ef6ee              
004ef6f0              int32_t var_1c_2 = 0;
004ef6d9          }
004ef6d9          
004ef6fa          *(uint32_t*)(*(uint32_t*)((char*)edi + 0x78) + 0x14)();
004ef507      }
004ef507      
004ef6fd      int32_t eax;
004ef6fd      eax = 0;
004ef705      return 0;
004ef4d0  }

004ef52d                                         8d 49 00                                                               .I.
004ef748                          90 90 90 90 90 90 90 90                                                          ........

004ef750  uint8_t __thiscall UIOption::InqGameplayOptionNameAndTooltip(class UIOption* this, uint32_t arg2, class StringInfo* arg3, class StringInfo* arg4)

004ef750  {
004ef760      char var_11 = 1;
004ef765      int32_t* var_8 = nullptr;
004ef769      int32_t* var_4 = nullptr;
004ef769      
004ef774      if (UIOption::InqGameplayOptionProperty(this, arg2, &var_8) == 0)
004ef774      {
004ef776          int32_t* eax_1 = var_8;
004ef776          
004ef77c          if (eax_1 != 0)
004ef77c          {
004ef786              int32_t edx_2 = (eax_1[1] - 1);
004ef783              eax_1[1] = edx_2;
004ef783              
004ef78b              if (edx_2 == 0)
004ef791                  **(uint32_t**)eax_1(1);
004ef791              
004ef793              var_8 = nullptr;
004ef77c          }
004ef77c          
004ef79d          if (var_4 != 0)
004ef79d          {
004ef7a7              int32_t edx_4 = (var_4[1] - 1);
004ef7a4              var_4[1] = edx_4;
004ef7a4              
004ef7ac              if (edx_4 == 0)
004ef7b2                  **(uint32_t**)var_4(1);
004ef79d          }
004ef79d          
004ef7b4          int32_t* eax_4;
004ef7b4          eax_4 = 0;
004ef7ba          return 0;
004ef774      }
004ef774      
004ef7c1      int32_t* ecx_2 = nullptr;
004ef7c5      int32_t* var_10 = nullptr;
004ef7c9      int32_t* var_c = nullptr;
004ef7c9      
004ef7cd      if (var_4 == 0)
004ef802          var_11 = 0;
004ef7cd      else
004ef7cd      {
004ef7e5          ecx_2 = var_c;
004ef7e5          
004ef7e9          if (*(uint32_t*)(*(uint32_t*)var_4 + 0x118)(0xd4, &var_10) == 0)
004ef802              var_11 = 0;
004ef7e9          else if (ecx_2 != 0)
004ef7ed          {
004ef7f6              *(uint32_t*)(*(uint32_t*)ecx_2 + 0xc0)(arg3);
004ef7fc              ecx_2 = var_c;
004ef7ed          }
004ef7cd      }
004ef7cd      
004ef80c      if (var_4 == 0)
004ef841          var_11 = 0;
004ef80c      else
004ef80c      {
004ef824          ecx_2 = var_c;
004ef824          
004ef828          if (*(uint32_t*)(*(uint32_t*)var_4 + 0x118)(0xd5, &var_10) == 0)
004ef841              var_11 = 0;
004ef828          else if (ecx_2 != 0)
004ef82c          {
004ef835              *(uint32_t*)(*(uint32_t*)ecx_2 + 0xc0)(arg4);
004ef83b              ecx_2 = var_c;
004ef82c          }
004ef80c      }
004ef80c      
004ef845      int32_t* eax_11 = var_10;
004ef845      
004ef84b      if (eax_11 != 0)
004ef84b      {
004ef855          int32_t edx_11 = (eax_11[1] - 1);
004ef852          eax_11[1] = edx_11;
004ef852          
004ef85a          if (edx_11 == 0)
004ef860              **(uint32_t**)eax_11(1);
004ef860          
004ef862          ecx_2 = var_c;
004ef866          var_10 = nullptr;
004ef84b      }
004ef84b      
004ef86c      if (ecx_2 != 0)
004ef86c      {
004ef874          int32_t edx_14 = (ecx_2[1] - 1);
004ef871          ecx_2[1] = edx_14;
004ef871          
004ef879          if (edx_14 == 0)
004ef87f              **(uint32_t**)ecx_2(1);
004ef87f          
004ef881          int32_t var_c_1 = 0;
004ef86c      }
004ef86c      
004ef885      int32_t* eax_15 = var_8;
004ef885      
004ef88b      if (eax_15 != 0)
004ef88b      {
004ef895          int32_t edx_16 = (eax_15[1] - 1);
004ef892          eax_15[1] = edx_16;
004ef892          
004ef89a          if (edx_16 == 0)
004ef8a0              **(uint32_t**)eax_15(1);
004ef8a0          
004ef8a2          var_8 = nullptr;
004ef88b      }
004ef88b      
004ef8ac      if (var_4 != 0)
004ef8ac      {
004ef8b6          int32_t edx_19 = (var_4[1] - 1);
004ef8b3          var_4[1] = edx_19;
004ef8b3          
004ef8bb          if (edx_19 == 0)
004ef8c1              **(uint32_t**)var_4(1);
004ef8ac      }
004ef8ac      
004ef8c3      int32_t* eax_17;
004ef8c3      eax_17 = var_11;
004ef8cb      return eax_17;
004ef750  }

004ef8ce                                            90 90                                                                ..

004ef8d0  uint8_t __stdcall UIOption::InqDefaultGameplayOptionProperty(class UIOption* this @ ecx, uint32_t arg2, class BaseProperty* arg3)

004ef8d0  {
004ef8dd      class IDClass<_tagDataID,32,0> __return;
004ef8dd      DBCache::GetDIDFromEnumStatic(&__return, 0x16, 2);
004ef8e2      class IDClass<_tagDataID,32,0> __return_1 = __return;
004ef8ee      void* var_8 = nullptr;
004ef8f6      DBObjGrabber<DBPropertyCollection>::set(&var_8, __return_1);
004ef8fb      void* esi = var_8;
004ef8fb      
004ef901      if (esi == 0)
004ef901      {
004ef903          int32_t eax;
004ef903          eax = 0;
004ef909          return 0;
004ef901      }
004ef901      
004ef91e      arg2 = arg2;
004ef92d      int32_t ebx;
004ef92d      ebx = HashTable<unsigned long,BaseProperty,1>::find(((char*)esi + 4), &arg2, arg3);
004ef92f      *(uint32_t*)(*(uint32_t*)((char*)esi + 0x78) + 0x14)();
004ef939      return ebx;
004ef8d0  }

004ef93c                                                                                      90 90 90 90                              ....

004ef940  void __fastcall UIOption::HandleDialog(class UIOption* this)

004ef940  {
004ef954      void var_110;
004ef954      PropertyCollection::PropertyCollection(&var_110);
004ef964      int32_t* var_11c = nullptr;
004ef968      int32_t* var_118 = nullptr;
004ef96c      BaseProperty::SetPropertyName(&var_11c, 0x8e);
004ef96c      
004ef975      if (var_118 != 0)
004ef975      {
004ef97b          BaseProperty::CheckCopyOnWrite(&var_11c);
004ef988          *(uint32_t*)(*(uint32_t*)var_118 + 0xac)(1);
004ef975      }
004ef975      
004ef9a5      uint32_t var_114 = BaseProperty::GetPropertyName(&var_11c);
004ef9a9      void var_10c;
004ef9a9      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004ef9b7      BaseProperty::SetPropertyName(&var_11c, 0xc3);
004ef9b7      
004ef9c0      if (var_118 != 0)
004ef9c0      {
004ef9c6          BaseProperty::CheckCopyOnWrite(&var_11c);
004ef9d3          *(uint32_t*)(*(uint32_t*)var_118 + 0xac)(1);
004ef9c0      }
004ef9c0      
004ef9f0      var_114 = BaseProperty::GetPropertyName(&var_11c);
004ef9f4      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004efa00      void var_98;
004efa00      StringInfo::StringInfo(&var_98);
004efa1f      StringInfo::SetStringIDandTableEnum(&var_98, compute_str_hash("ID_Option_ConfirmChange"), 0x10000004);
004efa2d      BaseProperty::SetPropertyName(&var_11c, 0xc5);
004efa2d      
004efa36      if (var_118 != 0)
004efa36      {
004efa3c          BaseProperty::CheckCopyOnWrite(&var_11c);
004efa4f          *(uint32_t*)(*(uint32_t*)var_118 + 0xc4)(&var_98);
004efa36      }
004efa36      
004efa5e      var_114 = BaseProperty::GetPropertyName(&var_11c);
004efa70      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004efa7e      BaseProperty::SetPropertyName(&var_11c, 0xc6);
004efa8d      var_114 = 0x41200000;
004efa8d      
004efa91      if (var_118 != 0)
004efa91      {
004efa97          BaseProperty::CheckCopyOnWrite(&var_11c);
004efaa7          *(uint32_t*)(*(uint32_t*)var_118 + 0x8c)(var_114);
004efa91      }
004efa91      
004efab6      var_114 = BaseProperty::GetPropertyName(&var_11c);
004efac8      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004efad6      BaseProperty::SetPropertyName(&var_11c, 0xac);
004efad6      
004efadf      if (var_118 != 0)
004efadf      {
004efae5          BaseProperty::CheckCopyOnWrite(&var_11c);
004efaf2          *(uint32_t*)(*(uint32_t*)var_118 + 0x74)(1);
004efadf      }
004efadf      
004efafe      var_114 = BaseProperty::GetPropertyName(&var_11c);
004efb10      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &var_114, &var_11c);
004efb29      this->m_dialogContext = DialogFactory::MakeDialogInCurrentUI(&var_110);
004efb2c      StringInfo::~StringInfo(&var_98);
004efb31      int32_t* eax_12 = var_11c;
004efb31      
004efb37      if (eax_12 != 0)
004efb37      {
004efb41          int32_t esi_2 = (eax_12[1] - 1);
004efb3e          eax_12[1] = esi_2;
004efb3e          
004efb48          if (esi_2 == 0)
004efb4e              **(uint32_t**)eax_12(1);
004efb4e          
004efb50          var_11c = nullptr;
004efb37      }
004efb37      
004efb5a      if (var_118 != 0)
004efb5a      {
004efb64          int32_t esi_4 = (var_118[1] - 1);
004efb61          var_118[1] = esi_4;
004efb61          
004efb6b          if (esi_4 == 0)
004efb71              **(uint32_t**)var_118(1);
004efb71          
004efb73          int32_t var_118_1 = 0;
004efb5a      }
004efb5a      
004efb7b      PropertyCollection::~PropertyCollection(&var_110);
004ef940  }

004efb86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004efb90  void __thiscall UIOption::HandleDialogAndNotices(class UIOption* this, uint8_t arg2)

004efb90  {
004efb91      int32_t ebx;
004efb91      ebx = arg2;
004efb91      
004efba1      if ((this->m_confirmChange != 0 && ebx != 0))
004efba3          UIOption::HandleDialog(this);
004efba3      
004efbad      if (this->m_shouldReloadOptions != 0)
004efbaf          CM_Character::SendNotice_ReloadOptions();
004efbaf      
004efbb9      if (this->m_shouldRefreshOptionsPanel != 0)
004efbbb          CM_UI::SendNotice_RefreshOptionsPanel();
004efbbb      
004efbc0      uint8_t (* m_noticeFuncPtr)() = this->m_noticeFuncPtr;
004efbc0      
004efbc5      if (m_noticeFuncPtr != 0)
004efbc7          m_noticeFuncPtr();
004efbc7      
004efbc9      class IOptionChangeHandler* m_pOCH = this->m_pOCH;
004efbc9      
004efbd2      if ((m_pOCH != 0 && ebx != 0))
004efbd4          m_pOCH->vtable->OnOptionChanged(this);
004efb90  }

004efbde                                                                                            90 90                                ..

004efbe0  enum UIElementMessageListenResult __thiscall gmStatManagementUI::ListenToElementMessage(class gmStatManagementUI* this, struct UIElementMessageInfo const* arg2)

004efbe0  {
004efbe6      uint32_t idMessage = arg2->idMessage;
004efbe6      
004efbee      if (idMessage != 0x18)
004efbee      {
004efc1c          class UIElement_ListBox* m_pListBox;
004efc1c          
004efc1c          if (idMessage == 0x1c)
004efc1e              m_pListBox = this->m_pListBox;
004efc1e          
004efc26          if ((idMessage == 0x1c && m_pListBox != 0))
004efc26          {
004efc28              class UIElement* eax_3 = UIElement_ListBox::GetItemUnderMouse(m_pListBox);
004efc28              
004efc2f              if (eax_3 != 0)
004efc2f              {
004efc35                  uint32_t dwParam1 = arg2->dwParam1;
004efc35                  
004efc4a                  if ((((dwParam1 == 7 || dwParam1 == 0xa) || dwParam1 == 8) || dwParam1 == 0xb))
004efc50                      this->vtable->SetSelection(eax_3);
004efc2f              }
004efc26          }
004efc26          else if (idMessage == 1)
004efc6b          {
004efc73              if (arg2->idElement == 0x10000246)
004efc73              {
004efc75                  idMessage = this->m_bAwaitingRaise;
004efc75                  
004efc7d                  if (idMessage == 0)
004efc7f                      this->vtable->RaiseSelection();
004efc73              }
004efc73              
004efc8f              if (arg2->idElement == 0x100005eb)
004efc8f              {
004efc91                  idMessage = this->m_bAwaitingRaise;
004efc91                  
004efc99                  if (idMessage == 0)
004efc9b                      this->vtable->Raise10Selection();
004efc8f              }
004efc6b          }
004efc6b          else if (idMessage == 0x10000004)
004efcb7          {
004efcb9              struct gmStatManagementUI::VTable* vtable = this->vtable;
004efcbb              this->m_bAwaitingRaise = 0;
004efcbb              
004efcd4              if (vtable->MessageIsFromSelectedElement(arg2->dwParam1, arg2->dwParam2) != 0)
004efcd6                  this->vtable->UpdateSelection();
004efcb7          }
004efbee      }
004efbee      else if ((arg2->pElement == this && arg2->dwParam1 != 0))
004efc04          this->vtable->Update();
004efc04      
004efcea      return UIElement::ListenToElementMessage(this, arg2);
004efbe0  }

004efced                                         90 90 90                                                               ...

004efcf0  void __thiscall gmStatManagementUI::RecvNotice_PlayerDescReceived(class gmStatManagementUI* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004efcf0  {
004efd01      *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x138)(arg2);
004efcf0  }

004efd0a                                90 90 90 90 90 90                                                            ......

004efd10  void __thiscall gmStatManagementUI::RecvNotice_EnchantmentsChanged(class gmStatManagementUI* this)

004efd10  {
004efd1c      /* jump -> *(uint32_t*)(*(int32_t*)((char*)this + -0x5f8) + 0x13c) */
004efd10  }

004efd22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004efd30  void __thiscall gmStatManagementUI::RecvNotice_UpdateCharacterTitleTable(class gmStatManagementUI* this, class CharacterTitleTable const* arg2)

004efd30  {
004efd37      int32_t eax = *(int32_t*)((char*)this + -0x5f8);
004efd3d      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xd] = arg2->mDisplayTitle;
004efd46      *(uint32_t*)(eax + 0x13c)();
004efd30  }

004efd4f                                               90                                                                 .

004efd50  void __thiscall gmStatManagementUI::RecvNotice_SetDisplayCharacterTitle(class gmStatManagementUI* this, uint32_t arg2)

004efd50  {
004efd54      int32_t edx = *(int32_t*)((char*)this + -0x5f8);
004efd5a      this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0xd] = arg2;
004efd63      *(uint32_t*)(edx + 0x13c)();
004efd50  }

004efd6c                                      90 90 90 90                                                              ....

004efd70  void __fastcall gmStatManagementUI::OnQualityRemoved(class gmStatManagementUI* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004efd70  {
004efd7c      *(uint32_t*)(*(int32_t*)((char*)this + -0x5fc) + 0x13c)();
004efd70  }

004efd85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004efd90  void __fastcall gmStatManagementUI::PostInit(class gmStatManagementUI* this)

004efd90  {
004efd95      UIElement::PostInit(this);
004efda1      class UIElement* eax = UIElement::GetChildRecursive(this, 0x10000231);
004efda8      class UIElement_Text* eax_1;
004efda8      
004efda8      if (eax == 0)
004efdb8          eax_1 = nullptr;
004efda8      else
004efdb0          eax_1 = eax->vtable->DynamicCast(0xc);
004efdb0      
004efdc1      this->m_pNameText = eax_1;
004efdc7      class UIElement* eax_2 = UIElement::GetChildRecursive(this, 0x10000232);
004efdce      class UIElement_Text* eax_3;
004efdce      
004efdce      if (eax_2 == 0)
004efdde          eax_3 = nullptr;
004efdce      else
004efdd6          eax_3 = eax_2->vtable->DynamicCast(0xc);
004efdd6      
004efde7      this->m_pHeritageText = eax_3;
004efded      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000233);
004efdf4      class UIElement_Text* eax_5;
004efdf4      
004efdf4      if (eax_4 == 0)
004efe04          eax_5 = nullptr;
004efdf4      else
004efdfc          eax_5 = eax_4->vtable->DynamicCast(0xc);
004efdfc      
004efe0d      this->m_pPKStatusText = eax_5;
004efe13      class UIElement* eax_6 = UIElement::GetChildRecursive(this, 0x1000023b);
004efe1a      class UIElement_Text* eax_7;
004efe1a      
004efe1a      if (eax_6 == 0)
004efe2a          eax_7 = nullptr;
004efe1a      else
004efe22          eax_7 = eax_6->vtable->DynamicCast(0xc);
004efe22      
004efe33      this->m_pLevelText = eax_7;
004efe39      class UIElement* eax_8 = UIElement::GetChildRecursive(this, 0x10000235);
004efe40      class UIElement_Text* eax_9;
004efe40      
004efe40      if (eax_8 == 0)
004efe50          eax_9 = nullptr;
004efe40      else
004efe48          eax_9 = eax_8->vtable->DynamicCast(0xc);
004efe48      
004efe59      this->m_pTotalXPText = eax_9;
004efe5f      class UIElement* eax_10 = UIElement::GetChildRecursive(this, 0x10000238);
004efe66      class UIElement_Text* eax_11;
004efe66      
004efe66      if (eax_10 == 0)
004efe76          eax_11 = nullptr;
004efe66      else
004efe6e          eax_11 = eax_10->vtable->DynamicCast(0xc);
004efe6e      
004efe7f      this->m_pXPToLevelText = eax_11;
004efe85      class UIElement* eax_12 = UIElement::GetChildRecursive(this, 0x100005c5);
004efe8c      class UIElement_Text* eax_13;
004efe8c      
004efe8c      if (eax_12 == 0)
004efe9c          eax_13 = nullptr;
004efe8c      else
004efe94          eax_13 = eax_12->vtable->DynamicCast(0xc);
004efe94      
004efea5      this->m_pLuminanceLabelText = eax_13;
004efeab      class UIElement* eax_14 = UIElement::GetChildRecursive(this, 0x100005c6);
004efeb2      class UIElement_Text* eax_15;
004efeb2      
004efeb2      if (eax_14 == 0)
004efec2          eax_15 = nullptr;
004efeb2      else
004efeba          eax_15 = eax_14->vtable->DynamicCast(0xc);
004efeba      
004efecb      this->m_pLuminanceText = eax_15;
004efed1      class UIElement* eax_16 = UIElement::GetChildRecursive(this, 0x10000236);
004efed8      class UIElement_Meter* eax_17;
004efed8      
004efed8      if (eax_16 == 0)
004efee8          eax_17 = nullptr;
004efed8      else
004efee0          eax_17 = eax_16->vtable->DynamicCast(7);
004efee0      
004efef1      this->m_pXPToLevelMeter = eax_17;
004efef7      class UIElement* eax_18 = UIElement::GetChildRecursive(this, 0x1000023d);
004efefe      class UIElement_ListBox* eax_19;
004efefe      
004efefe      if (eax_18 == 0)
004eff0e          eax_19 = nullptr;
004efefe      else
004eff06          eax_19 = eax_18->vtable->DynamicCast(5);
004eff06      
004eff10      this->m_pListBox = eax_19;
004eff16      class GlobalEventHandler* eax_20 = GlobalEventHandler::GetGlobalEventHandler();
004eff1d      eax_20->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
004eff30      eax_20->vtable->RegisterNoticeHandler(0x4dd201, &this->vtable);
004eff3d      eax_20->vtable->RegisterNoticeHandler(0x4dd277, &this->vtable);
004eff4a      eax_20->vtable->RegisterNoticeHandler(0x4dd278, &this->vtable);
004eff57      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x19, &this->vtable);
004eff6d      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x18, &this->vtable);
004eff7d      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x1e, &this->vtable);
004eff8d      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x86, &this->vtable);
004effa0      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0xbc, &this->vtable);
004effb3      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x71, &this->vtable);
004effc3      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(0xe, 1, &this->vtable);
004effd3      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(0xe, 2, &this->vtable);
004effe3      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(0xe, 6, &this->vtable);
004efff3      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(0xe, 7, &this->vtable);
004f0003      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(5, 1, &this->vtable);
004efd90  }

004f0017                                                                       90 90 90 90 90 90 90 90 90                         .........

004f0020  uint8_t __thiscall gmStatManagementUI::Update(class gmStatManagementUI* this, class CACQualities const* arg2)

004f0020  {
004f002d      if ((((int8_t)(this->__bitfield164 >> 1)) & 1) == 0)
004f0032          return 0;
004f0032      
004f0035      this->vtable->UpdateCharacterInfo(arg2);
004f0046      this->vtable->UpdatePKStatus(arg2);
004f0051      this->vtable->UpdateExperience(arg2);
004f0062      int32_t i = 0;
004f0062      
004f0066      if (this->m_rgTokens.m_num > 0)
004f0066      {
004f0088          do
004f0088          {
004f007c              *(int32_t*)((char*)this->m_rgTokens.m_data[i]->vtable + 0x20)(arg2);
004f0085              i += 1;
004f0088          } while (i < this->m_rgTokens.m_num);
004f0066      }
004f0066      
004f008a      this->vtable->UpdateSelection();
004f0096      int32_t eax_7;
004f0096      eax_7 = 1;
004f0099      return 1;
004f0020  }

004f006a                                8d 9b 00 00 00 00                                                            ......
004f009c                                                                                      90 90 90 90                              ....

004f00a0  uint8_t __fastcall gmStatManagementUI::UpdatePKStatus(class gmStatManagementUI* this, class CACQualities const* arg2)

004f00a0  {
004f00ae      void var_90;
004f00ae      StringInfo::StringInfo(&var_90);
004f00b3      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004f00ba      uint32_t player_id;
004f00ba      
004f00ba      if (SmartBox::smartbox_1 == 0)
004f00c4          player_id = 0;
004f00ba      else
004f00bc          player_id = SmartBox::smartbox_1->player_id;
004f00bc      
004f00c7      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(player_id);
004f00d3      int32_t var_a4_1;
004f00d3      int32_t var_a0_2;
004f00d3      
004f00d3      if (eax == 0)
004f00d3      {
004f0106          var_a0_2 = 0x10000001;
004f010b          var_a4_1 = 0;
004f00d3      }
004f00d3      else if (eax->vtable->IsPK() == 0)
004f00de      {
004f00f1          if (eax->vtable->IsPKLite() == 0)
004f00f1          {
004f0106              var_a0_2 = 0x10000001;
004f010b              var_a4_1 = 0;
004f00f1          }
004f00f1          else
004f00f1          {
004f00f8              int32_t var_a0_1 = 0x10000001;
004f00fd              int32_t var_a4 = 0;
004f00f1          }
004f00de      }
004f00de      else
004f00de      {
004f0106          var_a0_2 = 0x10000001;
004f010b          var_a4_1 = 0;
004f00de      }
004f0110      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004f0120      void* __return;
004f0120      class PStringBase<unsigned short>* eax_4 = StringInfo::GetString(&var_90, &__return, 0);
004f012c      UIElement_Text::SetText(this->m_pPKStatusText, eax_4);
004f0135      int32_t* esi_2 = ((char*)__return - 0x14);
004f0135      
004f0148      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004f0150          **(uint32_t**)esi_2(1);
004f0150      
004f0156      StringInfo::~StringInfo(&var_90);
004f015c      int32_t eax_7;
004f015c      eax_7 = 1;
004f0165      return 1;
004f00a0  }

004f0168                          90 90 90 90 90 90 90 90                                                          ........

004f0170  class UIElement_Text* __fastcall gmStatManagementUI::GetFooterTitleLabel(class gmStatManagementUI const* this)

004f0170  {
004f0170      uint32_t m_state = this->m_state;
004f017b      uint32_t var_4;
004f017b      
004f017b      if (m_state == 0x10000012)
004f017d          var_4 = 0x10000241;
004f017b      else if (m_state != 0x10000013)
004f0192          var_4 = 0x10000240;
004f0189      else
004f018b          var_4 = 0x10000247;
004f018b      
004f01a3      class UIElement* eax_1 = UIElement::GetChildRecursive(UIElement::GetChildRecursive(this, var_4), 0x1000024e);
004f01a3      
004f01aa      if (eax_1 == 0)
004f01bb          return 0;
004f01bb      
004f01b8      return eax_1->vtable->DynamicCast(0xc);
004f0170  }

004f01bc                                                                                      90 90 90 90                              ....

004f01c0  class UIElement_Text* __fastcall gmStatManagementUI::GetFooterLineOneLabel(class gmStatManagementUI const* this)

004f01c0  {
004f01c0      uint32_t m_state = this->m_state;
004f01cb      uint32_t var_4;
004f01cb      
004f01cb      if (m_state == 0x10000012)
004f01cd          var_4 = 0x10000241;
004f01cb      else if (m_state != 0x10000013)
004f01e2          var_4 = 0x10000240;
004f01d9      else
004f01db          var_4 = 0x10000247;
004f01db      
004f01f3      class UIElement* eax_1 = UIElement::GetChildRecursive(UIElement::GetChildRecursive(this, var_4), 0x10000242);
004f01f3      
004f01fa      if (eax_1 == 0)
004f020b          return 0;
004f020b      
004f0208      return eax_1->vtable->DynamicCast(0xc);
004f01c0  }

004f020c                                      90 90 90 90                                                              ....

004f0210  class UIElement_Text* __fastcall gmStatManagementUI::GetFooterLineOneValue(class gmStatManagementUI const* this)

004f0210  {
004f0210      uint32_t m_state = this->m_state;
004f021b      uint32_t var_4;
004f021b      
004f021b      if (m_state == 0x10000012)
004f021d          var_4 = 0x10000241;
004f021b      else if (m_state != 0x10000013)
004f0232          var_4 = 0x10000240;
004f0229      else
004f022b          var_4 = 0x10000247;
004f022b      
004f0243      class UIElement* eax_1 = UIElement::GetChildRecursive(UIElement::GetChildRecursive(this, var_4), 0x10000243);
004f0243      
004f024a      if (eax_1 == 0)
004f025b          return 0;
004f025b      
004f0258      return eax_1->vtable->DynamicCast(0xc);
004f0210  }

004f025c                                                                                      90 90 90 90                              ....

004f0260  class UIElement_Meter* __fastcall gmStatManagementUI::GetFooterMeter(class gmStatManagementUI const* this)

004f0260  {
004f0260      uint32_t m_state = this->m_state;
004f026b      uint32_t var_4;
004f026b      
004f026b      if (m_state == 0x10000012)
004f026d          var_4 = 0x10000241;
004f026b      else if (m_state != 0x10000013)
004f0282          var_4 = 0x10000240;
004f0279      else
004f027b          var_4 = 0x10000247;
004f027b      
004f0293      class UIElement* eax_1 = UIElement::GetChildRecursive(UIElement::GetChildRecursive(this, var_4), 0x10000247);
004f0293      
004f029a      if (eax_1 == 0)
004f02ab          return 0;
004f02ab      
004f02a8      return eax_1->vtable->DynamicCast(7);
004f0260  }

004f02ac                                      90 90 90 90                                                              ....

004f02b0  class UIElement_Text* __fastcall gmStatManagementUI::GetFooterLineTwoLabel(class gmStatManagementUI const* this)

004f02b0  {
004f02b0      uint32_t m_state = this->m_state;
004f02bb      uint32_t var_4;
004f02bb      
004f02bb      if (m_state == 0x10000012)
004f02bd          var_4 = 0x10000241;
004f02bb      else if (m_state != 0x10000013)
004f02d2          var_4 = 0x10000240;
004f02c9      else
004f02cb          var_4 = 0x10000247;
004f02cb      
004f02e3      class UIElement* eax_1 = UIElement::GetChildRecursive(UIElement::GetChildRecursive(this, var_4), 0x10000244);
004f02e3      
004f02ea      if (eax_1 == 0)
004f02fb          return 0;
004f02fb      
004f02f8      return eax_1->vtable->DynamicCast(0xc);
004f02b0  }

004f02fc                                                                                      90 90 90 90                              ....

004f0300  class UIElement_Text* __fastcall gmStatManagementUI::GetFooterLineTwoValue(class gmStatManagementUI const* this)

004f0300  {
004f0300      uint32_t m_state = this->m_state;
004f030b      uint32_t var_4;
004f030b      
004f030b      if (m_state == 0x10000012)
004f030d          var_4 = 0x10000241;
004f030b      else if (m_state != 0x10000013)
004f0322          var_4 = 0x10000240;
004f0319      else
004f031b          var_4 = 0x10000247;
004f031b      
004f0333      class UIElement* eax_1 = UIElement::GetChildRecursive(UIElement::GetChildRecursive(this, var_4), 0x10000245);
004f0333      
004f033a      if (eax_1 == 0)
004f034b          return 0;
004f034b      
004f0348      return eax_1->vtable->DynamicCast(0xc);
004f0300  }

004f034c                                      90 90 90 90                                                              ....

004f0350  class UIElement_Button* __fastcall gmStatManagementUI::GetFooterButton(class gmStatManagementUI const* this)

004f0350  {
004f0350      uint32_t m_state = this->m_state;
004f035b      uint32_t var_4;
004f035b      
004f035b      if (m_state == 0x10000012)
004f035d          var_4 = 0x10000241;
004f035b      else if (m_state != 0x10000013)
004f0372          var_4 = 0x10000240;
004f0369      else
004f036b          var_4 = 0x10000247;
004f036b      
004f0383      class UIElement* eax_1 = UIElement::GetChildRecursive(UIElement::GetChildRecursive(this, var_4), 0x10000246);
004f0383      
004f038a      if (eax_1 == 0)
004f039b          return 0;
004f039b      
004f0398      return eax_1->vtable->DynamicCast(1);
004f0350  }

004f039c                                                                                      90 90 90 90                              ....

004f03a0  class UIElement_Button* __fastcall gmStatManagementUI::GetFooter10Button(class gmStatManagementUI const* this)

004f03a0  {
004f03a0      uint32_t m_state = this->m_state;
004f03ab      uint32_t var_4;
004f03ab      
004f03ab      if (m_state == 0x10000012)
004f03ad          var_4 = 0x10000241;
004f03ab      else if (m_state != 0x10000013)
004f03c2          var_4 = 0x10000240;
004f03b9      else
004f03bb          var_4 = 0x10000247;
004f03bb      
004f03d3      class UIElement* eax_1 = UIElement::GetChildRecursive(UIElement::GetChildRecursive(this, var_4), 0x100005eb);
004f03d3      
004f03da      if (eax_1 == 0)
004f03eb          return 0;
004f03eb      
004f03e8      return eax_1->vtable->DynamicCast(1);
004f03a0  }

004f03ec                                      90 90 90 90                                                              ....

004f03f0  void __thiscall gmStatManagementUI::gmStatManagementUI(class gmStatManagementUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004f03f0  {
004f03ff      UIElement_Field::UIElement_Field(this, arg2, arg3);
004f0404      this->vtable = &gmUrgentAssistanceUI::`vftable';
004f040e      this->vtable = &QualityChangeHandler::`vftable';
004f041a      __builtin_memset(&this->m_pNameText, 0, 0x28);
004f0456      this->vtable = 0x7c3c68;
004f045c      this->vtable = &gmAttributeUI::`vftable';
004f0466      this->vtable = &gmStatManagementUI::`vftable';
004f0470      this->m_rgTokens.m_data = 0;
004f0476      this->m_rgTokens.m_sizeAndDeallocate = 0;
004f047c      this->m_rgTokens.m_num = 0;
004f0482      this->m_bAwaitingRaise = 0;
004f0488      this->m_titleID = 0;
004f03f0  }

004f0494                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f04a0  uint8_t __fastcall gmStatManagementUI::Update(class gmStatManagementUI* this)

004f04a0  {
004f04b2      int32_t __saved_edi;
004f04b2      int32_t* esp = &__saved_edi;
004f04b2      
004f04b3      if (((this->__bitfield164 >> 1) & 1) != 0)
004f04b3      {
004f04b9          struct Turbine_GUID* var_14;
004f04b9          int32_t* var_28_1 = &var_14;
004f04be          struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004f04c6          var_14 = nullptr;
004f04d1          class TResult __return;
004f04d1          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28_1);
004f04d6          struct Turbine_GUID* esi_1 = var_14;
004f04df          var_2c = esi_1;
004f04e1          int32_t var_28_2 = 0;
004f04e4          struct Turbine_GUID* eax_3 = var_2c;
004f04e8          int32_t var_8 = 0;
004f04ec          int32_t var_4_1 = 0;
004f04ec          
004f04f0          if (eax_3 != 0)
004f04f6              *(uint32_t*)(eax_3->m_data1 + 0x10)();
004f04f6          
004f0502          esp = &var_2c;
004f0509          void var_c;
004f0509          int32_t ebx_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004f0509          
004f050b          if (esi_1 != 0)
004f0511              *(uint32_t*)(esi_1->m_data1 + 0x14)();
004f0511          
004f0514          class TResult __return_1 = __return;
004f0514          
004f051a          if (__return_1 != 0)
004f051a          {
004f051e              if (ebx_1 >= 0)
004f051e              {
004f053d                  ebx_1 = this->vtable->RecvNotice_AddSalvageItem(__return_1);
004f0543                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004f054f                  return ebx_1;
004f051e              }
004f051e              
004f0524              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004f0524              esp = &__saved_edi;
004f051a          }
004f04b3      }
004f04b3      
004f0527      uint32_t eax_1;
004f0527      eax_1 = 0;
004f0529      *(uint32_t*)esp;
004f0529      esp[1];
004f0529      esp[2];
004f0529      esp[3];
004f0530      return 0;
004f04a0  }


004f0550  uint8_t __fastcall gmStatManagementUI::FlushList(class gmStatManagementUI* this)

004f0550  {
004f0550      class gmStatManagementUI* this_1 = this;
004f055c      UIElement_ListBox::Flush(this->m_pListBox);
004f0561      class gmStatManagementUI* this_2 = this;
004f056b      int32_t i = 0;
004f056b      
004f056f      if (this_2->m_rgTokens.m_num > 0)
004f056f      {
004f05a3          do
004f05a3          {
004f0577              int32_t* ecx_3 = this_2->m_rgTokens.m_data[i];
004f0577              
004f057c              if (ecx_3 != 0)
004f057c              {
004f0582                  *(uint32_t*)(*(uint32_t*)ecx_3 + 8)(1);
004f0585                  this_2 = this;
004f057c              }
004f057c              
004f0589              this_2->m_rgTokens.m_data[i] = 0;
004f0596              this_2 = this;
004f05a0              i += 1;
004f05a3          } while (i < this_2->m_rgTokens.m_num);
004f056f      }
004f056f      
004f05b0      int32_t i_1 = 0;
004f05b0      
004f05b5      if (this_2->m_rgTokens.m_num > 0)
004f05b5      {
004f05cf          do
004f05cf          {
004f05ab              this_2->m_rgTokens.m_data[i_1] = 0;
004f05cc              i_1 += 1;
004f05cf          } while (i_1 < this_2->m_rgTokens.m_num);
004f05b5      }
004f05b5      
004f05ab      this_2->m_rgTokens.m_num = 0;
004f05d8      class SmartArray<InfoRegion *,1>* eax_1;
004f05d8      eax_1 = 1;
004f05db      return 1;
004f0550  }

004f05b9                                                                             8d a4 24 00 00 00 00                           ..$....
004f05dc                                                                                      90 90 90 90                              ....

004f05e0  void __fastcall gmStatManagementUI::~gmStatManagementUI(class gmStatManagementUI* this)

004f05e0  {
004f05f2      this->vtable = 0x7c3c68;
004f05e6      this->vtable = &gmAttributeUI::`vftable';
004f05ec      this->vtable = &gmStatManagementUI::`vftable';
004f0605      gmStatManagementUI::FlushList(this);
004f060c      __builtin_memset(&this->m_pNameText, 0, 0x28);
004f0648      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004f0648      
004f064f      if (eax != 0)
004f0651          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004f0651      
004f0659      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x19, &this->vtable);
004f0669      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x18, &this->vtable);
004f0679      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x1e, &this->vtable);
004f0689      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x86, &this->vtable);
004f069c      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0xbc, &this->vtable);
004f06af      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x71, &this->vtable);
004f06bf      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(0xe, 1, &this->vtable);
004f06cf      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(0xe, 2, &this->vtable);
004f06df      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(0xe, 6, &this->vtable);
004f06ef      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(0xe, 7, &this->vtable);
004f06ff      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(5, 1, &this->vtable);
004f06ff      
004f0721      if ((this->m_rgTokens.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f072a          operator delete[](this->m_rgTokens.m_data);
004f072a      
004f05e6      this->vtable = &gmUrgentAssistanceUI::`vftable';
004f073b      NoticeHandler::~NoticeHandler(&this->vtable);
004f0746      /* tailcall */
004f0746      return UIElement_Field::~UIElement_Field(this);
004f05e0  }

004f074b                                   90 90 90 90 90                                                             .....

004f0750  void* __thiscall gmStatManagementUI::`scalar deleting destructor'(class gmStatManagementUI* this, uint32_t arg2)

004f0750  {
004f0753      gmStatManagementUI::~gmStatManagementUI(this);
004f0753      
004f075d      if ((arg2 & 1) != 0)
004f0760          operator delete(this);
004f0760      
004f076b      return this;
004f0750  }

004f076e                                            90 90                                                                ..

004f0770  uint8_t __fastcall gmStatManagementUI::UpdateCharacterInfo(class gmStatManagementUI* this, class CACQualities const* arg2)

004f0770  {
004f077d      void var_38;
004f077d      CAllegianceData::CAllegianceData(&var_38);
004f0782      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004f078b      uint32_t player_id;
004f078b      
004f078b      if (SmartBox::smartbox_1 == 0)
004f0795          player_id = 0;
004f078b      else
004f078d          player_id = SmartBox::smartbox_1->player_id;
004f078d      
004f07a7      class AC1Legacy::PStringBase<char> var_3c;
004f07a7      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_3c, ACCWeenieObject::GetObjectName(player_id, NAME_SINGULAR, 0));
004f07b0      class AC1Legacy::PStringBase<char> esi = var_3c;
004f07bc      int32_t* var_30;
004f07bc      
004f07bc      if (var_30 != esi)
004f07bc      {
004f07cc          if ((InterlockedDecrement(&var_30[1]) == 0 && var_30 != 0))
004f07d4              **(uint32_t**)var_30(1);
004f07d4          
004f07da          class AC1Legacy::PStringBase<char> var_30_1 = esi;
004f07de          InterlockedIncrement((esi + 4));
004f07bc      }
004f07bc      
004f07f2      if ((InterlockedDecrement((esi + 4)) == 0 && esi != 0))
004f07fa          **(uint32_t**)esi(1);
004f07fa      
004f0807      struct CBaseQualities::VTable** esi_2 = &arg2->vtable;
004f080e      uint32_t var_54 = 0;
004f0812      CBaseQualities::InqInt(esi_2, 0x71, &var_54, 0, 0);
004f0829      uint32_t var_2c = var_54;
004f082d      uint32_t var_58 = 0;
004f0831      CBaseQualities::InqInt(esi_2, 0xbc, &var_58, 0, 0);
004f0842      uint32_t var_28 = var_58;
004f084a      int32_t var_44 = 0;
004f084e      CBaseQualities::InqInt(esi_2, 0x1e, &var_44, 1, 0);
004f0857      int32_t var_24 = var_44;
004f085b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004f0860      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004f0868      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004f0877      AllegianceData::GetFullName(&var_38, &AC1Legacy::PStringBase<char>::s_NullBuffer_4);
004f0889      class PStringBase<unsigned short>* eax_9;
004f0889      int32_t ebx;
004f0889      eax_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data);
004f0895      UIElement_Text::SetText(this->m_pNameText, eax_9);
004f089e      void* __offset(CACQualities, -0x14) edi_3 = ((char*)arg2 - 0x14);
004f089e      
004f08ad      if ((ebx(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
004f08b5          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
004f08b5      
004f08b7      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004f08bc      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004f08c4      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004f08db      AppraisalSystem::InqGenderHeritageDisplay(var_54, var_58, 0, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
004f08f1      class PStringBase<unsigned short>* eax_15;
004f08f1      int32_t ebx_1;
004f08f1      class CBaseQualities* esi_3;
004f08f1      eax_15 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
004f08fd      UIElement_Text::SetText(this->m_pHeritageText, eax_15);
004f0906      void* __offset(CACQualities, -0x14) edi_5 = ((char*)arg2 - 0x14);
004f0906      
004f0915      if ((ebx_1(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
004f091d          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
004f091d      
004f091f      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f0924      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f092c      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f092c      
004f0948      if (CharacterTitleTable::GetCharacterTitleFromID(this->m_titleID, &PStringBase<unsigned short>::s_NullBuffer_2) != 0)
004f0948      {
004f0953          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_794358);
004f0963          UIElement_Text::AppendText(this->m_pHeritageText, &arg2);
004f096c          void* __offset(CACQualities, -0x14) edi_7 = ((char*)arg2 - 0x14);
004f096c          
004f097b          if ((ebx_1(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
004f0983              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_7) + -0x14)(1);
004f0983          
004f0990          UIElement_Text::AppendText(this->m_pHeritageText, &PStringBase<unsigned short>::s_NullBuffer_2);
004f0948      }
004f0948      
004f09a2      int32_t var_40 = 0;
004f09b1      class PStringBase<unsigned short>* eax_22;
004f09b1      
004f09b1      if (CBaseQualities::InqInt(esi_3, 0x19, &var_40, 0, 0) == 0)
004f09b1      {
004f09d7          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_7b0f34);
004f09dc          eax_22 = &arg2;
004f09b1      }
004f09b1      else
004f09b1      {
004f09b7          int32_t var_6c_19 = var_40;
004f09c4          eax_22 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, &data_7a0184);
004f09b1      }
004f09b1      
004f09e7      UIElement_Text::SetText(this->m_pLevelText, eax_22);
004f09f0      void* __offset(CACQualities, -0x14) esi_5 = ((char*)arg2 - 0x14);
004f09f0      
004f09ff      if ((ebx_1(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
004f0a07          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
004f0a07      
004f0a0d      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_7 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
004f0a0d      
004f0a1c      if ((ebx_1(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
004f0a24          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
004f0a24      
004f0a26      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
004f0a26      
004f0a36      if ((ebx_1(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
004f0a38          AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
004f0a38      
004f0a40      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
004f0a40      
004f0a50      if ((ebx_1(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0))
004f0a52          AC1Legacy::PStringBase<char>::s_NullBuffer_6->vtable->__vecDelDtor(1);
004f0a52      
004f0a5e      AllegianceData::~AllegianceData(&var_38);
004f0a66      int32_t eax_30;
004f0a66      eax_30 = 1;
004f0a6c      return 1;
004f0770  }

004f0a6f                                               90                                                                 .

004f0a70  uint8_t __thiscall gmStatManagementUI::UpdateExperience(class gmStatManagementUI* this, class CACQualities const* arg2)

004f0a70  {
004f0a93      int32_t var_f8 = 0;
004f0a97      int32_t var_f4 = 0;
004f0a9b      CBaseQualities::InqInt64(&arg2->vtable, 1, &var_f8);
004f0aa9      int32_t var_e0 = 0;
004f0aad      int32_t var_dc = 0;
004f0ab1      CBaseQualities::InqInt64(&arg2->vtable, 6, &var_e0);
004f0abf      int32_t var_e8 = 0;
004f0ac3      int32_t var_e4 = 0;
004f0ac7      CBaseQualities::InqInt64(&arg2->vtable, 7, &var_e8);
004f0acc      class CPlayerSystem* __return_2 = CPlayerSystem::GetPlayerSystem();
004f0ad3      class CPlayerSystem* __return = __return_2;
004f0ad3      
004f0ad7      if ((__return_2 != 0 && (CPlayerSystem::AccountHasThroneOfDestiny(__return_2) == 0 && (var_f4 > 0 || var_f8 > 0xffffffff))))
004f0ad7      {
004f0af5          var_f8 = 0xffffffff;
004f0af9          var_f4 = 0;
004f0ad7      }
004f0ad7      
004f0b08      uint32_t var_f0 = 0;
004f0b0c      CBaseQualities::InqInt(&arg2->vtable, 0x19, &var_f0, 0, 0);
004f0b16      int32_t eax_1;
004f0b16      int32_t edx;
004f0b16      eax_1 = ExperienceSystem::ExperienceToLevel(var_f0);
004f0b25      int32_t eax_2;
004f0b25      int32_t edx_3;
004f0b25      eax_2 = ExperienceSystem::ExperienceToLevel((var_f0 + 1));
004f0b2a      int32_t ecx_7 = var_f8;
004f0b33      int32_t ebx_1 = (eax_2 - eax_1);
004f0b37      int32_t ebp_1 = (edx_3 - edx);
004f0b45      int32_t esi_4 = (var_f4 - edx);
004f0b4d      class CPlayerSystem* __return_6 = __return;
004f0b55      int32_t var_104 = (eax_2 - var_f8);
004f0b59      int32_t var_100 = (edx_3 - var_f4);
004f0b59      
004f0b5d      if ((__return_6 != 0 && (CPlayerSystem::AccountHasThroneOfDestiny(__return_6) == 0 && var_f0 == 0x7e)))
004f0b5d      {
004f0b6f          var_104 = 0;
004f0b73          var_100 = 0;
004f0b5d      }
004f0b5d      
004f0b7e      void var_90;
004f0b7e      StringInfo::StringInfo(&var_90);
004f0b95      StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004f0ba7      int32_t var_11c_4 = var_f4;
004f0bb1      StringInfo::AddVariable_Int(&var_90, 0, var_f8);
004f0bc3      class PStringBase<unsigned short>* eax_5 = StringInfo::GetString(&var_90, &__return, 0);
004f0bc8      class gmStatManagementUI* this_1 = this;
004f0bd3      UIElement_Text::SetText(this_1->m_pTotalXPText, eax_5);
004f0bdc      void* __offset(CPlayerSystem, -0x14) __return_3 = ((char*)__return - 0x14);
004f0bdf      class PStringBase<unsigned short> __return_1 = __return_3;
004f0bdf      
004f0bef      if (InterlockedDecrement(((char*)__return_3 + 4)) == 0)
004f0bef      {
004f0bf1          class PStringBase<unsigned short> __return_7 = __return_1;
004f0bf1          
004f0bf7          if (__return_7 != 0)
004f0bfd              **(uint32_t**)__return_7(1);
004f0bef      }
004f0bef      
004f0c0d      if ((var_100 > 0 || var_104 > 0))
004f0c0d      {
004f0c21          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004f0c33          int32_t var_11c_7 = var_100;
004f0c3d          StringInfo::AddVariable_Int(&var_90, 0, var_104);
004f0c0d      }
004f0c0d      else
004f0c57          StringInfo::SetStringIDandTableEnum(&var_90, 0, 0x10000001);
004f0c57      
004f0c6a      class PStringBase<unsigned short>* eax_11 = StringInfo::GetString(&var_90, &__return_1, 0);
004f0c76      UIElement_Text::SetText(this_1->m_pXPToLevelText, eax_11);
004f0c7f      class CPlayerSystem* __return_4 = (__return_1 - 0x14);
004f0c82      __return = __return_4;
004f0c82      
004f0c92      if (InterlockedDecrement(&__return_4->vtable) == 0)
004f0c92      {
004f0c94          class CPlayerSystem* __return_8 = __return;
004f0c94          
004f0c9a          if (__return_8 != 0)
004f0c9c              __return_8->vtable->__vecDelDtor(1);
004f0c92      }
004f0c92      
004f0cb8      if ((var_f0 < 0xc8 || (var_e8 | var_e4) == 0))
004f0cb8      {
004f0e31          UIElement_Text::ClearAllText(this_1->m_pLuminanceLabelText);
004f0e3c          UIElement_Text::ClearAllText(this_1->m_pLuminanceText);
004f0cb8      }
004f0cb8      else
004f0cb8      {
004f0cc7          PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &gmStatManagementUI::`vftable'.RecvNotice_CastCurrentSpell);
004f0cd7          UIElement_Text::SetText(this_1->m_pLuminanceLabelText, &__return);
004f0ce0          class PStringBase<unsigned short> __return_5 = ((char*)__return - 0x14);
004f0ce3          __return_1 = __return_5;
004f0ce3          
004f0cf3          if (InterlockedDecrement((__return_5 + 4)) == 0)
004f0cf3          {
004f0cf5              class PStringBase<unsigned short> __return_9 = __return_1;
004f0cf5              
004f0cfb              if (__return_9 != 0)
004f0d01                  **(uint32_t**)__return_9(1);
004f0cf3          }
004f0cf3          
004f0d03          class CPlayerSystem* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004f0d08          __return = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004f0d10          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable);
004f0d23          int32_t var_120_5 = var_dc;
004f0d25          void var_b0;
004f0d25          ExperienceSystem::XPToString(var_e0, &var_b0);
004f0d37          int32_t var_12c_1 = var_e4;
004f0d39          void var_d0;
004f0d39          ExperienceSystem::XPToString(var_e8, &var_d0);
004f0d42          void* var_134_1 = &var_d0;
004f0d4a          void* var_138_1 = &var_b0;
004f0d55          AC1Legacy::PStringBase<char>::sprintf(&__return, &gmStatManagementUI::`vftable'.RecvNotice_BeginEnterWorld);
004f0d6b          class PStringBase<unsigned short>* eax_23;
004f0d6b          eax_23 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, WidthConvert, &__return->m_cTurbineRefCount);
004f0d77          UIElement_Text::SetText(this_1->m_pLuminanceText, eax_23);
004f0d80          int32_t* edi_2 = (__return_1 - 0x14);
004f0d80          
004f0d93          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004f0d9b              **(uint32_t**)edi_2(1);
004f0d9b          
004f0d9d          class CPlayerSystem* __return_10 = __return;
004f0d9d          
004f0db1          if ((InterlockedDecrement(&__return_10->vtable) == 0 && __return_10 != 0))
004f0db3              __return_10->vtable->__vecDelDtor(1);
004f0db3          
004f0dbb          this_1 = this;
004f0cb8      }
004f0cb8      
004f0dc7      float var_11c_19;
004f0dc7      
004f0dc7      if ((ebp_1 > 0 || ebx_1 > 0))
004f0dc7      {
004f0dda          int32_t var_100_1 = (esi_4 & 0x7fffffff);
004f0de8          int32_t var_100_2 = (esi_4 & 0x80000000);
004f0e05          int32_t var_100_3 = (ebp_1 & 0x7fffffff);
004f0e0d          int32_t ecx_36 = (ebp_1 & 0x80000000);
004f0e13          int32_t var_100_4 = ecx_36;
004f0e1f          int32_t var_11c_18 = ecx_36;
004f0e26          var_11c_19 = ((float)((((long double)(ecx_7 - eax_1)) + -(((long double)0))) / (((long double)ebx_1) + -(((long double)0)))));
004f0dc7      }
004f0dc7      else
004f0e46          var_11c_19 = 0f;
004f0e46      
004f0e4f      UIElement::SetAttribute_Float(this_1->m_pXPToLevelMeter, 0x69, var_11c_19);
004f0e5b      StringInfo::~StringInfo(&var_90);
004f0e63      int32_t eax_32;
004f0e63      eax_32 = 1;
004f0e6c      return 1;
004f0a70  }

004f0e6f                                               90                                                                 .

004f0e70  void __fastcall InfoRegion::~InfoRegion(class InfoRegion* this)

004f0e70  {
004f0e72      this->vtable = 0x7c3ff0;
004f0e81      *(int32_t*)((char*)QualityRegistrar::s_pQR->vtable + 0x14)(this);
004f0e70  }

004f0e85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004f0e90  int32_t __fastcall CInputManager::GetMouseX(class CInputManager* this)

004f0e90  {
004f0e93      return this->m_ptMousePos.x;
004f0e90  }

004f0e94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f0ea0  Collection* DBOCache::GetCollection(class DBOCache* this @ ecx, class IDClass<_tagDataID,32,0> arg2) __pure

004f0ea0  {
004f0ea2      return 0;
004f0ea0  }

004f0ea5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004f0eb0  void __fastcall InfoRegion::OnQualityChanged(class InfoRegion* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004f0eb0  {
004f0eb5      uint32_t eax_1 = this->vtable->GetStat();
004f0ec5      UIElement::BroadcastElementMessage(this->m_pElement, 0x10000004, this->m_StatType, eax_1);
004f0eca      this->vtable->Update();
004f0eb0  }

004f0ed5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004f0ee0  uint8_t __thiscall InfoRegion::SetState(class InfoRegion* this, uint32_t arg2)

004f0ee0  {
004f0ee0      class UIElement* m_pElement = this->m_pElement;
004f0ee0      
004f0ee5      if (m_pElement != 0)
004f0ee9          /* jump -> m_pElement->vtable->SetState */
004f0ee9      
004f0eef      int32_t eax;
004f0eef      eax = 0;
004f0ef1      return 0;
004f0ee0  }

004f0ef4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f0f00  uint8_t __thiscall AttributeInfoRegion::GetLabel(class AttributeInfoRegion const* this, class PStringBase<unsigned short>* arg2)

004f0f00  {
004f0f11      return SkillSystem::InqAttributeName(this->m_Attribute, arg2);
004f0f00  }

004f0f14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f0f20  uint8_t __thiscall AttributeInfoRegion::GetTooltip(class AttributeInfoRegion const* this, class PStringBase<unsigned short>* arg2)

004f0f20  {
004f0f31      return SkillSystem::InqAttributeDescription(this->m_Attribute, arg2);
004f0f20  }

004f0f34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f0f40  uint8_t __thiscall Attribute2ndInfoRegion::GetLabel(class Attribute2ndInfoRegion const* this, class PStringBase<unsigned short>* arg2)

004f0f40  {
004f0f51      return SkillSystem::InqAttribute2ndName(this->m_CurAttribute, arg2);
004f0f40  }

004f0f54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f0f60  uint8_t __thiscall Attribute2ndInfoRegion::GetTooltip(class Attribute2ndInfoRegion const* this, class PStringBase<unsigned short>* arg2)

004f0f60  {
004f0f71      return SkillSystem::InqAttribute2ndDescription(this->m_CurAttribute, arg2);
004f0f60  }

004f0f74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f0f80  uint8_t __thiscall SkillInfoRegion::GetLabel(class SkillInfoRegion const* this, class PStringBase<unsigned short>* arg2)

004f0f80  {
004f0f87      class PStringBase<unsigned short>* var_4 = arg2;
004f0f88      uint32_t m_Skill = this->m_Skill;
004f0f91      class PStringBase<unsigned short>* edx;
004f0f91      return SkillSystem::InqSkillName(arg2, edx);
004f0f80  }

004f0f94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f0fa0  int32_t __thiscall SkillInfoRegion::GetVitaeModifier(class SkillInfoRegion const* this, class CACQualities const* arg2)

004f0fa0  {
004f0fab      void var_50;
004f0fab      Enchantment::Enchantment(&var_50);
004f0fab      
004f0fc2      if (CACQualities::InqVitae(arg2, &var_50) != 0)
004f0fc2      {
004f0fc4          float var_4;
004f0fc4          long double x87_r7_1 = ((long double)var_4);
004f0fc8          long double temp1_1 = ((long double)1.0);
004f0fc8          (x87_r7_1 - temp1_1);
004f0fce          int32_t eax;
004f0fce          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004f0fce          
004f0fd3          if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
004f0fd3          {
004f0fd5              uint32_t m_Skill = this->m_Skill;
004f0fe2              int32_t var_58 = 0;
004f0fea              CACQualities::InqSkill(arg2, m_Skill, &var_58, 1);
004f0ffc              float var_54 = ((float)((long double)var_58));
004f1000              Enchantment::Enchant(&var_50, &var_54);
004f101f              return (_ftol2() - var_58);
004f0fd3          }
004f0fc2      }
004f0fc2      
004f1029      return 0;
004f0fa0  }

004f102c                                      90 90 90 90                                                              ....

004f1030  void* __thiscall Attribute2ndBase::`scalar deleting destructor'(class Attribute2ndBase* this, uint32_t arg2)

004f1030  {
004f1038      this->_formula.vtable = 0x79285c;
004f103f      this->vtable = 0x79285c;
004f103f      
004f1045      if ((arg2 & 1) != 0)
004f1048          operator delete(this);
004f1048      
004f1053      return this;
004f1030  }

004f1056                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004f1060  void* __thiscall InfoRegion::`scalar deleting destructor'(class InfoRegion* this, uint32_t arg2)

004f1060  {
004f1063      this->vtable = 0x7c3ff0;
004f1072      *(int32_t*)((char*)QualityRegistrar::s_pQR->vtable + 0x14)(this);
004f1072      
004f107a      if ((arg2 & 1) != 0)
004f107d          operator delete(this);
004f107d      
004f1088      return this;
004f1060  }

004f108b                                   90 90 90 90 90                                                             .....

004f1090  void __thiscall InfoRegion::SetID(class InfoRegion* this, int32_t arg2)

004f1090  {
004f109f      int32_t* var_8 = nullptr;
004f10a7      int32_t* var_4 = nullptr;
004f10af      BaseProperty::SetPropertyName(&var_8, 0x1000003a);
004f10af      
004f10ba      if (var_4 != 0)
004f10ba      {
004f10c0          BaseProperty::CheckCopyOnWrite(&var_8);
004f10d0          *(uint32_t*)(*(uint32_t*)var_4 + 0x7c)(arg2);
004f10ba      }
004f10ba      
004f10d3      this->m_pElement->vtable->SetProperty(&var_8);
004f10e3      int32_t* eax_3 = var_8;
004f10e3      
004f10e9      if (eax_3 != 0)
004f10e9      {
004f10f3          int32_t esi_2 = (eax_3[1] - 1);
004f10f0          eax_3[1] = esi_2;
004f10f0          
004f10fa          if (esi_2 == 0)
004f1100              **(uint32_t**)eax_3(1);
004f1100          
004f1102          var_8 = nullptr;
004f10e9      }
004f10e9      
004f1110      if (var_4 != 0)
004f1110      {
004f111a          int32_t esi_4 = (var_4[1] - 1);
004f1117          var_4[1] = esi_4;
004f1117          
004f1121          if (esi_4 == 0)
004f1127              **(uint32_t**)var_4(1);
004f1110      }
004f1090  }


004f1130  int32_t __thiscall Attribute2ndInfoRegion::GetVitaeModifier(class Attribute2ndInfoRegion const* this, class CACQualities const* arg2)

004f1130  {
004f113b      void var_50;
004f113b      Enchantment::Enchantment(&var_50);
004f113b      
004f1152      if (CACQualities::InqVitae(arg2, &var_50) != 0)
004f1152      {
004f1154          float var_4;
004f1154          long double x87_r7_1 = ((long double)var_4);
004f1158          long double temp1_1 = ((long double)1.0);
004f1158          (x87_r7_1 - temp1_1);
004f115e          int32_t eax;
004f115e          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
004f115e          
004f1163          if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
004f1163          {
004f1165              uint32_t m_MaxAttribute = this->m_MaxAttribute;
004f1172              int32_t var_58 = 0;
004f117a              CACQualities::InqAttribute2nd(arg2, m_MaxAttribute, &var_58, 1);
004f117f              long double x87_r7_2 = ((long double)var_58);
004f117f              
004f1189              if (var_58 < 0)
004f118b                  x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
004f118b              
004f1195              float var_54 = ((float)x87_r7_2);
004f119e              Enchantment::Enchant(&var_50, &var_54);
004f11bd              return (_ftol2() - var_58);
004f1163          }
004f1152      }
004f1152      
004f11c7      return 0;
004f1130  }

004f11ca                                90 90 90 90 90 90                                                            ......

004f11d0  int32_t __thiscall Attribute2ndTable::InqAttribute2ndBase(class Attribute2ndTable const* this, uint32_t arg2, class Attribute2ndBase* arg3)

004f11d0  {
004f11d5      if (arg2 == 1)
004f11d5      {
004f1263          arg3->_formula._w = this->_max_health._formula._w;
004f1269          arg3->_formula._x = this->_max_health._formula._x;
004f126f          arg3->_formula._y = this->_max_health._formula._y;
004f1275          arg3->_formula._z = this->_max_health._formula._z;
004f127b          arg3->_formula._attr1 = this->_max_health._formula._attr1;
004f1281          arg3->_formula._attr2 = this->_max_health._formula._attr2;
004f1289          return 1;
004f11d5      }
004f11d5      
004f11de      if (arg2 == 3)
004f11de      {
004f1233          arg3->_formula._w = this->_max_stamina._formula._w;
004f1239          arg3->_formula._x = this->_max_stamina._formula._x;
004f123f          arg3->_formula._y = this->_max_stamina._formula._y;
004f1245          arg3->_formula._z = this->_max_stamina._formula._z;
004f124b          arg3->_formula._attr1 = this->_max_stamina._formula._attr1;
004f1251          arg3->_formula._attr2 = this->_max_stamina._formula._attr2;
004f1259          return 1;
004f11de      }
004f11de      
004f11e3      if (arg2 != 5)
004f11e7          return 0;
004f11e7      
004f11f4      arg3->_formula._w = this->_max_mana._formula._w;
004f11fd      arg3->_formula._x = this->_max_mana._formula._x;
004f1206      arg3->_formula._y = this->_max_mana._formula._y;
004f120f      arg3->_formula._z = this->_max_mana._formula._z;
004f1218      arg3->_formula._attr1 = this->_max_mana._formula._attr1;
004f1221      arg3->_formula._attr2 = this->_max_mana._formula._attr2;
004f1229      return 1;
004f11d0  }

004f128c                                      90 90 90 90                                                              ....

004f1290  void __fastcall SkillBase::SkillBase(class SkillBase* this)

004f1290  {
004f1293      this->vtable = 0x7c4020;
004f1299      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004f12ab      this->_description.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004f12ae      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004f12b0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004f12bc      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004f12bf      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004f12c9      __builtin_memset(&this->_trained_cost, 0, 0x14);
004f12d8      this->_iconID.id = INVALID_DID.id;
004f12db      this->_formula._w = 0;
004f12de      this->_formula._x = 0;
004f12e1      this->_formula._y = 0;
004f12e4      __builtin_memset(&this->_formula._attr1, 0, 0x20);
004f12ea      this->_formula.vtable = 0x7a016c;
004f12f1      this->_formula._z = 1;
004f1290  }

004f130f                                               90                                                                 .

004f1310  void __fastcall SkillBase::~SkillBase(class SkillBase* this)

004f1310  {
004f131b      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
004f1322      this->_formula.vtable = 0x79285c;
004f1322      
004f1331      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004f1333          m_buffer->vtable->__vecDelDtor(1);
004f1333      
004f133b      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_description.m_buffer;
004f133b      
004f134a      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004f134c          m_buffer_1->vtable->__vecDelDtor(1);
004f134c      
004f1355      this->vtable = 0x79285c;
004f1310  }

004f135e                                                                                            90 90                                ..

004f1360  class SkillBase& __thiscall SkillBase::operator=(class SkillBase* this, class SkillBase const& arg2)

004f1360  {
004f1373      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->_description.m_buffer;
004f1373      
004f1378      if (m_buffer_2 != arg2->_description.m_buffer)
004f1378      {
004f138a          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
004f138c              m_buffer_2->vtable->__vecDelDtor(1);
004f138c          
004f1394          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_description.m_buffer;
004f1397          this->_description.m_buffer = m_buffer;
004f139e          InterlockedIncrement(&m_buffer->m_cRef);
004f1378      }
004f1378      
004f13a0      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->_name.m_buffer;
004f13a0      
004f13a6      if (m_buffer_3 != arg2->_name.m_buffer)
004f13a6      {
004f13b8          if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
004f13ba              m_buffer_3->vtable->__vecDelDtor(1);
004f13ba          
004f13c2          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->_name.m_buffer;
004f13c5          this->_name.m_buffer = m_buffer_1;
004f13cc          InterlockedIncrement(&m_buffer_1->m_cRef);
004f13a6      }
004f13a6      
004f13d1      this->_iconID.id = arg2->_iconID.id;
004f13d7      this->_trained_cost = arg2->_trained_cost;
004f13dd      this->_specialized_cost = arg2->_specialized_cost;
004f13e3      this->_category = arg2->_category;
004f13e9      this->_chargen_use = arg2->_chargen_use;
004f13ef      this->_min_level = arg2->_min_level;
004f13f5      this->_formula._w = arg2->_formula._w;
004f13fb      this->_formula._x = arg2->_formula._x;
004f1401      this->_formula._y = arg2->_formula._y;
004f1407      this->_formula._z = arg2->_formula._z;
004f140d      this->_formula._attr1 = arg2->_formula._attr1;
004f1413      this->_formula._attr2 = arg2->_formula._attr2;
004f1419      this->_upper_bound = arg2->_upper_bound;
004f141f      *(uint32_t*)((char*)this->_upper_bound)[4] = *(uint32_t*)((char*)arg2->_upper_bound)[4];
004f1425      this->_lower_bound = arg2->_lower_bound;
004f142b      *(uint32_t*)((char*)this->_lower_bound)[4] = *(uint32_t*)((char*)arg2->_lower_bound)[4];
004f1431      this->_learn_mod = arg2->_learn_mod;
004f1438      *(uint32_t*)((char*)this->_learn_mod)[4] = *(uint32_t*)((char*)arg2->_learn_mod)[4];
004f1440      return this;
004f1360  }

004f1443           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004f1450  void __thiscall InfoRegion::InfoRegion(class InfoRegion* this, class UIElement_ListBox* arg2, int32_t arg3, int32_t arg4, enum StatType arg5, uint32_t arg6, class IDClass<_tagDataID,32,0> arg7)

004f1450  {
004f145d      this->vtable = 0x7c3ff0;
004f1463      this->m_StatType = arg5;
004f1466      this->m_pElement = nullptr;
004f146d      this->m_pLabelText = nullptr;
004f1474      this->m_pValueText = nullptr;
004f1474      
004f147b      if (arg2 != 0)
004f147b      {
004f1488          class UIElement* eax_1;
004f1488          
004f1488          if (arg3 == 0xffffffff)
004f1498              eax_1 = UIElement_ListBox::AddItemFromTemplateList(arg2, 0, nullptr);
004f1488          else
004f148d              eax_1 = UIElement_ListBox::AddItemFromTemplateList(arg2, 0, arg3);
004f148d          
004f14a1          this->m_pElement = eax_1;
004f14a1          
004f14a4          if (eax_1 != 0)
004f14a4          {
004f14ab              class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x1000012a);
004f14b2              class UIElement_Text* eax_3;
004f14b2              
004f14b2              if (eax_2 == 0)
004f14c2                  eax_3 = nullptr;
004f14b2              else
004f14ba                  eax_3 = eax_2->vtable->DynamicCast(0xc);
004f14ba              
004f14c4              class UIElement* m_pElement = this->m_pElement;
004f14cc              this->m_pLabelText = eax_3;
004f14cf              class UIElement* eax_4 = UIElement::GetChildRecursive(m_pElement, 0x1000012b);
004f14d6              class UIElement_Text* eax_5;
004f14d6              
004f14d6              if (eax_4 == 0)
004f14e6                  eax_5 = nullptr;
004f14d6              else
004f14de                  eax_5 = eax_4->vtable->DynamicCast(0xc);
004f14de              
004f14ed              this->m_pValueText = eax_5;
004f14ed              
004f14f6              if (arg7 != INVALID_DID.id)
004f14f6              {
004f1500                  class UIElement* eax_6 = UIElement::GetChildRecursive(this->m_pElement, 0x10000129);
004f1500                  
004f1507                  if (eax_6 != 0)
004f150e                      UIRegion::SetImageByDID(eax_6, arg7, 3);
004f14f6              }
004f14f6              
004f151a              InfoRegion::SetID(this, arg4);
004f14a4          }
004f147b      }
004f1450  }

004f1526                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f1530  void __thiscall AttributeInfoRegion::AttributeInfoRegion(class AttributeInfoRegion* this, class UIElement_ListBox* arg2, int32_t arg3, uint32_t arg4, class IDClass<_tagDataID,32,0> arg5, uint8_t arg6)

004f1530  {
004f155c      InfoRegion::InfoRegion(this, arg2, 0xffffffff, arg3, Attribute_StatType, arg4, arg5);
004f1564      bool cond:0 = this->m_pLabelText == 0;
004f1572      this->vtable = 0x7c4034;
004f1578      this->m_Attribute = arg4;
004f157b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3;
004f157b      
004f157b      if (!(cond:0))
004f157b      {
004f157d          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f1582          PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
004f158a          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f158a          
004f159f          if (SkillSystem::InqAttributeName(this->m_Attribute, &PStringBase<unsigned short>::s_NullBuffer_3) != 0)
004f15a9              UIElement_Text::SetText(this->m_pLabelText, &PStringBase<unsigned short>::s_NullBuffer_3);
004f15a9          
004f15b2          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_2 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004f15b2          
004f15c1          if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
004f15c9              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
004f157b      }
004f157b      
004f15d0      if (this->m_pElement != 0)
004f15d0      {
004f15d2          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004f15d7          PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
004f15df          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004f15df          
004f15f4          if (SkillSystem::InqAttributeDescription(this->m_Attribute, &PStringBase<unsigned short>::s_NullBuffer_3) != 0)
004f15f4          {
004f15fa              void var_90;
004f15fa              StringInfo::StringInfo(&var_90);
004f160a              StringInfo::SetLiteralValue(&var_90, &PStringBase<unsigned short>::s_NullBuffer_3, 1);
004f1617              UIElement::SetTooltip(this->m_pElement, &var_90);
004f161c              this->m_pElement->vtable->SetMouseVisible(1);
004f162d              StringInfo::~StringInfo(&var_90);
004f15f4          }
004f15f4          
004f1636          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_4 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004f1636          
004f1645          if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
004f164d              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
004f15d0      }
004f15d0      
004f164f      class UIElement* eax_8;
004f164f      eax_8 = arg6;
004f164f      
004f1658      if (eax_8 != 0)
004f165d          QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(8, this->m_Attribute, this);
004f1530  }

004f167b                                                                                   90 90 90 90 90                             .....

004f1680  void __thiscall Attribute2ndInfoRegion::Attribute2ndInfoRegion(class Attribute2ndInfoRegion* this, class UIElement_ListBox* arg2, int32_t arg3, uint32_t arg4, uint8_t arg5, class IDClass<_tagDataID,32,0> arg6, uint8_t arg7)

004f1680  {
004f16ac      InfoRegion::InfoRegion(this, arg2, 0xffffffff, arg3, Attribute_2nd_StatType, arg4, arg6);
004f16be      this->m_bShowPercent = arg5;
004f16c1      class UIElement_Text* m_pLabelText = this->m_pLabelText;
004f16c4      this->m_CurAttribute = arg4;
004f16cc      this->vtable = 0x7c4064;
004f16d2      this->m_MaxAttribute = (arg4 - 1);
004f16d5      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3;
004f16d5      
004f16d5      if (m_pLabelText != 0)
004f16d5      {
004f16d7          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f16dc          PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
004f16e4          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f16e4          
004f16f9          if (SkillSystem::InqAttribute2ndName(this->m_CurAttribute, &PStringBase<unsigned short>::s_NullBuffer_3) != 0)
004f1703              UIElement_Text::SetText(this->m_pLabelText, &PStringBase<unsigned short>::s_NullBuffer_3);
004f1703          
004f170c          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_3 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004f170c          
004f171f          if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
004f1727              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
004f16d5      }
004f16d5      
004f172c      if (this->m_pElement != 0)
004f172c      {
004f1732          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004f1737          PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
004f173f          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004f173f          
004f1754          if (SkillSystem::InqAttribute2ndDescription(this->m_CurAttribute, &PStringBase<unsigned short>::s_NullBuffer_3) != 0)
004f1754          {
004f175a              void var_90;
004f175a              StringInfo::StringInfo(&var_90);
004f176a              StringInfo::SetLiteralValue(&var_90, &PStringBase<unsigned short>::s_NullBuffer_3, 1);
004f1777              UIElement::SetTooltip(this->m_pElement, &var_90);
004f177c              this->m_pElement->vtable->SetMouseVisible(1);
004f178d              StringInfo::~StringInfo(&var_90);
004f1754          }
004f1754          
004f1796          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_5 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004f1796          
004f17a9          if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
004f17b1              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
004f172c      }
004f172c      
004f17ba      if (arg7 != 0)
004f17ba      {
004f17c3          QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, this->m_CurAttribute, this);
004f17e1          int32_t eax_10;
004f17e1          uint32_t ecx_14;
004f17e1          int32_t edx_7;
004f17e1          eax_10 = QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, this->m_MaxAttribute, this);
004f17e4          int32_t var_c8_11 = 0x10000003;
004f17e9          int32_t var_cc_6 = 2;
004f17eb          int32_t var_d0_1 = 1;
004f17ed          class DBObj* eax_11 = DBObj::GetByEnum(eax_10, edx_7, ecx_14);
004f17ed          
004f17f9          if (eax_11 != 0)
004f17f9          {
004f17fb              uint32_t m_MaxAttribute = this->m_MaxAttribute;
004f1806              int32_t var_b0 = 0x7c3fdc;
004f180e              int32_t var_ac_1 = 0x7a016c;
004f1816              int32_t var_a8_1 = 0;
004f181a              int32_t var_a4_1 = 0;
004f181e              int32_t var_a0_1 = 0;
004f1822              int32_t var_9c_1 = 1;
004f182a              int32_t var_98_1 = 0;
004f182e              int32_t var_94_1 = 0;
004f1832              Attribute2ndTable::InqAttribute2ndBase(eax_11, m_MaxAttribute, &var_b0);
004f1832              
004f183d              if (var_98_1 != 0)
004f183f                  QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, var_98_1, this);
004f183f              
004f1854              if (var_94_1 != 0)
004f1856                  QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(9, var_94_1, this);
004f1856              
004f1865              eax_11->vtable->Release();
004f17f9          }
004f17ba      }
004f1680  }

004f187b                                                                                   90 90 90 90 90                             .....

004f1880  uint32_t __fastcall Attribute2ndInfoRegion::GetStat(class Attribute2ndInfoRegion const* this)

004f1880  {
004f1883      return this->m_MaxAttribute;
004f1880  }

004f1884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004f1890  void* __thiscall SkillBase::`scalar deleting destructor'(class SkillBase* this, uint32_t arg2)

004f1890  {
004f1893      SkillBase::~SkillBase(this);
004f1893      
004f189d      if ((arg2 & 1) != 0)
004f18a0          operator delete(this);
004f18a0      
004f18ab      return this;
004f1890  }

004f18ae                                            90 90                                                                ..

004f18b0  int32_t __thiscall SkillTable::InqSkillBase(class SkillTable const* this, uint32_t arg2, class SkillBase* arg3)

004f18b0  {
004f18b1      uint32_t _table_size = this->_skillBaseHash._table_size;
004f18b1      
004f18b7      if (_table_size != 0)
004f18b7      {
004f18b9          class PackableHashData<unsigned long,SkillBase>** _buckets = this->_skillBaseHash._buckets;
004f18b9          
004f18be          if (_buckets != 0)
004f18be          {
004f18ca              int32_t* edx_3 = _buckets[(COMBINE(0, arg2) % _table_size)];
004f18ca              
004f18cf              if (edx_3 != 0)
004f18cf              {
004f18d3                  while (arg2 != *(uint32_t*)edx_3)
004f18d3                  {
004f18d5                      edx_3 = edx_3[0x18];
004f18d5                      
004f18da                      if (edx_3 == 0)
004f18e0                          return 0;
004f18d3                  }
004f18d3                  
004f18e8                  if (edx_3 != 0xfffffff8)
004f18e8                  {
004f18f6                      SkillBase::operator=(arg3, &edx_3[2]);
004f1902                      return 1;
004f18e8                  }
004f18cf              }
004f18be          }
004f18b7      }
004f18b7      
004f18ee      return 0;
004f18b0  }

004f1905                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004f1910  uint8_t __thiscall AttributeInfoRegion::Update(class AttributeInfoRegion* this, class CACQualities const* arg2)

004f1910  {
004f191b      if (this->m_pValueText != 0)
004f191b      {
004f1921          uint32_t m_Attribute_1 = this->m_Attribute;
004f1925          class CACQualities* edi_1 = arg2;
004f1933          uint32_t var_4 = 0;
004f193b          CACQualities::InqAttribute(edi_1, m_Attribute_1, &var_4, 1);
004f1940          uint32_t m_Attribute = this->m_Attribute;
004f194d          arg2 = nullptr;
004f1955          CACQualities::InqAttribute(edi_1, m_Attribute, &arg2, 0);
004f195a          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f195f          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f1967          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f1971          class CACQualities* var_14_2 = arg2;
004f197c          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, &data_7a0184);
004f1981          uint32_t ecx_3 = var_4;
004f1985          class CACQualities* edx_1 = arg2;
004f198c          int32_t eax_2 = 0;
004f198c          
004f1991          if (ecx_3 < edx_1)
004f1993              eax_2 = 1;
004f1991          else if (ecx_3 > edx_1)
004f199c              eax_2 = 2;
004f199c          
004f19ac          UIElement_Text::SetTextWithFont(this->m_pValueText, &PStringBase<unsigned short>::s_NullBuffer_2, 0, eax_2);
004f19b5          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
004f19b5          
004f19c8          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004f19d0              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004f191b      }
004f191b      
004f19d2      class UIElement_Text* eax;
004f19d2      eax = 1;
004f19d8      return 1;
004f1910  }

004f19db                                                                                   90 90 90 90 90                             .....

004f19e0  uint8_t __thiscall Attribute2ndInfoRegion::Update(class Attribute2ndInfoRegion* this, class CACQualities const* arg2)

004f19e0  {
004f19eb      if (this->m_pValueText != 0)
004f19eb      {
004f19f1          uint32_t m_MaxAttribute_1 = this->m_MaxAttribute;
004f19f6          class CACQualities* edi_1 = arg2;
004f1a04          uint32_t var_4 = 0;
004f1a0c          CACQualities::InqAttribute2nd(edi_1, m_MaxAttribute_1, &var_4, 1);
004f1a11          uint32_t m_MaxAttribute = this->m_MaxAttribute;
004f1a1e          arg2 = nullptr;
004f1a26          CACQualities::InqAttribute2nd(edi_1, m_MaxAttribute, &arg2, 0);
004f1a2b          uint32_t m_CurAttribute = this->m_CurAttribute;
004f1a38          uint32_t var_8 = 0;
004f1a40          CACQualities::InqAttribute2nd(edi_1, m_CurAttribute, &var_8, 0);
004f1a45          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f1a4a          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f1a52          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f1a60          class CACQualities* var_1c_2 = arg2;
004f1a61          uint32_t var_20_4 = var_8;
004f1a6c          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%d/%d");
004f1a79          int32_t ebx_1 = 0;
004f1a7b          int32_t eax_4 = this->vtable->GetVitaeModifier(edi_1);
004f1a82          void* ecx_6 = ((char*)arg2 - eax_4);
004f1a84          uint32_t eax_5 = var_4;
004f1a8a          arg2 = ecx_6;
004f1a8a          
004f1a8e          if (eax_5 < ecx_6)
004f1a90              ebx_1 = 1;
004f1a8e          else if (eax_5 > ecx_6)
004f1a99              ebx_1 = 2;
004f1a99          
004f1aa9          UIElement_Text::SetTextWithFont(this->m_pValueText, &PStringBase<unsigned short>::s_NullBuffer_2, 0, ebx_1);
004f1ab2          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
004f1ab2          
004f1ac7          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004f1acf              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004f19eb      }
004f19eb      
004f1ad1      class UIElement_Text* eax;
004f1ad1      eax = 1;
004f1ad7      return 1;
004f19e0  }

004f1ada                                                                                90 90 90 90 90 90                            ......

004f1ae0  uint8_t __thiscall SkillInfoRegion::Update(class SkillInfoRegion* this, class CACQualities const* arg2)

004f1ae0  {
004f1ae6      class CACQualities* edi = arg2;
004f1aec      uint32_t m_Skill_1 = this->m_Skill;
004f1af9      enum SKILL_ADVANCEMENT_CLASS var_c = UNDEF_SKILL_ADVANCEMENT_CLASS;
004f1afd      CACQualities::InqSkillAdvancementClass(edi, m_Skill_1, &var_c);
004f1b02      enum SKILL_ADVANCEMENT_CLASS eax = var_c;
004f1b02      
004f1b09      if (this->m_AdvancementClass != eax)
004f1b09      {
004f1b0d          this->m_AdvancementClass = eax;
004f1b0d          
004f1b10          if (eax != UNDEF_SKILL_ADVANCEMENT_CLASS)
004f1b10          {
004f1b12              CM_Train::SendNotice_SkillAdvancementClassChanged();
004f1b19              int32_t eax_1;
004f1b19              eax_1 = 1;
004f1b1f              return 1;
004f1b10          }
004f1b09      }
004f1b09      
004f1b25      if (this->m_pValueText != 0)
004f1b25      {
004f1b2b          uint32_t m_Skill = this->m_Skill;
004f1b38          int32_t var_4 = 0;
004f1b3c          CACQualities::InqSkillBaseLevel(edi, m_Skill, &var_4, 0);
004f1b41          uint32_t m_Skill_3 = this->m_Skill;
004f1b4e          int32_t var_8 = 0;
004f1b52          CACQualities::InqSkill(edi, m_Skill_3, &var_8, 1);
004f1b57          uint32_t m_Skill_2 = this->m_Skill;
004f1b63          arg2 = nullptr;
004f1b67          CACQualities::InqSkill(edi, m_Skill_2, &arg2, 0);
004f1b71          int32_t ebx_1 = 0;
004f1b73          int32_t eax_2 = this->vtable->GetVitaeModifier(edi);
004f1b7a          void* ecx_6 = ((char*)arg2 - eax_2);
004f1b7c          int32_t eax_3 = var_8;
004f1b7c          
004f1b82          if (eax_3 < ecx_6)
004f1b84              ebx_1 = 1;
004f1b82          else if (eax_3 > ecx_6)
004f1b8d              ebx_1 = 2;
004f1b8d          
004f1b92          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f1b97          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f1b9f          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f1ba9          class CACQualities* var_24_3 = arg2;
004f1bb4          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, &data_7a0184);
004f1bc6          UIElement_Text::SetTextWithFont(this->m_pValueText, &PStringBase<unsigned short>::s_NullBuffer_2, 0, ebx_1);
004f1bcf          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
004f1bcf          
004f1be3          if ((InterlockedDecrement(((char*)esi_2 + 4)) == UNDEF_SKILL_ADVANCEMENT_CLASS && esi_2 != 0))
004f1beb              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004f1b25      }
004f1b25      
004f1bef      eax = 1;
004f1bf5      return 1;
004f1ae0  }

004f1bf8                                                                          90 90 90 90 90 90 90 90                          ........

004f1c00  uint8_t __thiscall EffectInfoRegion::Update(class EffectInfoRegion* this, double arg2)

004f1c00  {
004f1c00      class EffectInfoRegion* var_4 = this;
004f1c04      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
004f1c04      
004f1c0b      if (eax == 0)
004f1c0b      {
004f1c0d          eax = 0;
004f1c11          return 0;
004f1c0b      }
004f1c0b      
004f1c29      if ((PlayerModule::SpellDuration(&eax->playerModule.vtable) != 0 && this->m_pValueText != 0))
004f1c29      {
004f1c2f          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f1c34          var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004f1c3c          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f1c42          long double x87_r7_1 = ((long double)arg2);
004f1c46          long double temp3_1 = ((long double)0.0);
004f1c46          (x87_r7_1 - temp3_1);
004f1c46          
004f1c51          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f1c51          {
004f1c58              int32_t eax_4 = _ftol2();
004f1c5d              int32_t edx_1 = 0;
004f1c64              uint32_t temp0_1 = (COMBINE(edx_1, eax_4) / 0xe10);
004f1c64              uint32_t temp1_1 = (COMBINE(edx_1, eax_4) % 0xe10);
004f1c6f              int32_t edx_3 = 0;
004f1c76              uint32_t __saved_edi_2 = (COMBINE(edx_3, temp1_1) % 0x3c);
004f1c77              uint32_t var_10_1 = (COMBINE(edx_3, temp1_1) / 0x3c);
004f1c77              
004f1c78              if (temp0_1 <= 0)
004f1c99                  PStringBase<unsigned short>::sprintf(&var_4, u"%d:%02d");
004f1c78              else
004f1c78              {
004f1c7a                  uint32_t var_14_1 = temp0_1;
004f1c85                  PStringBase<unsigned short>::sprintf(&var_4, u"%d:%02d:%02d");
004f1c78              }
004f1c51          }
004f1c51          
004f1ca9          UIElement_Text::SetText(this->m_pValueText, &var_4);
004f1cb2          void* __offset(EffectInfoRegion, -0x14) esi_2 = ((char*)var_4 - 0x14);
004f1cb2          
004f1cc5          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004f1ccd              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004f1c29      }
004f1c29      
004f1ccf      class UIElement_Text* eax_1;
004f1ccf      eax_1 = 1;
004f1cd3      return 1;
004f1c00  }

004f1cd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004f1ce0  uint8_t __fastcall InfoRegion::Update(class InfoRegion* this)

004f1ce0  {
004f1ceb      struct Turbine_GUID* var_14;
004f1ceb      int32_t* var_28 = &var_14;
004f1cf2      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
004f1cfa      var_14 = nullptr;
004f1d05      class TResult __return;
004f1d05      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
004f1d0a      struct Turbine_GUID* ecx_1 = var_14;
004f1d13      var_2c = ecx_1;
004f1d15      int32_t var_28_1 = 0;
004f1d18      struct Turbine_GUID* eax_1 = var_2c;
004f1d1e      int32_t var_8 = 0;
004f1d22      int32_t var_4 = 0;
004f1d22      
004f1d26      if (eax_1 != 0)
004f1d2c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
004f1d2c      
004f1d38      struct Turbine_GUID** esp = &var_2c;
004f1d3f      void var_c;
004f1d3f      int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
004f1d3f      
004f1d41      if (ecx_1 != 0)
004f1d47          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
004f1d47      
004f1d4a      class TResult __return_1 = __return;
004f1d4a      
004f1d50      if (__return_1 != 0)
004f1d50      {
004f1d54          if (ebp >= 0)
004f1d54          {
004f1d6f              class InfoRegion* ebx;
004f1d6f              ebx = *(int32_t*)((char*)this->vtable + 0x20)(__return_1);
004f1d75              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004f1d81              return ebx;
004f1d54          }
004f1d54          
004f1d5a          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
004f1d5a          struct Turbine_GUID* __saved_edi;
004f1d5a          esp = &__saved_edi;
004f1d50      }
004f1d50      
004f1d5d      class TResult eax_2;
004f1d5d      eax_2.m_val = 0;
004f1d5f      *(uint32_t*)esp;
004f1d5f      esp[1];
004f1d5f      esp[2];
004f1d5f      esp[3];
004f1d66      return 0;
004f1ce0  }

004f1d82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004f1d90  uint8_t __thiscall AttributeInfoRegion::Update(class AttributeInfoRegion* this, class AppraisalProfile const* arg2)

004f1d90  {
004f1d9a      int32_t ebx = 0;
004f1d9e      class UIElement_Text* eax;
004f1d9e      
004f1d9e      if (this->m_pValueText != 0)
004f1d9e      {
004f1da5          class AppraisalProfile* ebp_1 = arg2;
004f1dac          eax = CInputManager::GetMouseY(ebp_1);
004f1dac          
004f1db5          if (eax != 0)
004f1db5          {
004f1dbb              uint32_t m_Attribute = this->m_Attribute;
004f1dc6              int32_t var_8 = 0;
004f1dca              CreatureAppraisalProfile::InqAttribute(eax, m_Attribute, &var_8);
004f1dcf              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f1dd4              arg2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f1ddc              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f1de2              int32_t eax_2 = var_8;
004f1de2              
004f1de8              if (eax_2 != 0)
004f1de8              {
004f1dfa                  int32_t var_1c_3 = eax_2;
004f1e05                  PStringBase<unsigned short>::sprintf(&arg2, &data_7a0184);
004f1de8              }
004f1de8              else
004f1df3                  PStringBase<unsigned short>::set(&arg2, &data_7b0f34);
004f1df3              
004f1e12              int32_t var_4;
004f1e12              
004f1e12              if (ebp_1->success_flag == 0)
004f1e36                  ebx = 3;
004f1e12              else if (CreatureAppraisalProfile::InqAttributeEnchantmentMod(eax, this->m_Attribute, &var_4) != 0)
004f1e26              {
004f1e30                  int32_t ebx_1;
004f1e30                  ebx_1 = var_4 == 0;
004f1e33                  ebx = (ebx_1 + 1);
004f1e26              }
004f1e46              UIElement_Text::SetTextWithFont(this->m_pValueText, &arg2, 0, ebx);
004f1e4f              void* __offset(AppraisalProfile, -0x14) esi_3 = ((char*)arg2 - 0x14);
004f1e4f              
004f1e62              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004f1e6a                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004f1db5          }
004f1d9e      }
004f1d9e      
004f1e6f      eax = 1;
004f1e75      return 1;
004f1d90  }

004f1e78                                                                          90 90 90 90 90 90 90 90                          ........

004f1e80  uint8_t __thiscall Attribute2ndInfoRegion::Update(class Attribute2ndInfoRegion* this, class AppraisalProfile const* arg2)

004f1e80  {
004f1e83      int32_t nDenominator_3;
004f1e83      int32_t nDenominator = nDenominator_3;
004f1e8b      class UIElement_Text* eax;
004f1e8b      
004f1e8b      if (this->m_pValueText != 0)
004f1e8b      {
004f1e93          class AppraisalProfile* ebp_1 = arg2;
004f1e99          eax = CInputManager::GetMouseY(ebp_1);
004f1e99          
004f1ea2          if (eax != 0)
004f1ea2          {
004f1ea8              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f1ead              arg2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f1eb5              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f1ecd              int32_t nNumerator;
004f1ecd              
004f1ecd              if (CreatureAppraisalProfile::InqAttribute2nd(eax, this->m_CurAttribute, &nNumerator) == 0)
004f1f5e                  PStringBase<unsigned short>::set(&__return_addr, &data_7b0f34);
004f1ecd              else if (CreatureAppraisalProfile::InqAttribute2nd(eax, this->m_MaxAttribute, &nDenominator) == 0)
004f1f5e                  PStringBase<unsigned short>::set(&__return_addr, &data_7b0f34);
004f1ee5              else
004f1ee5              {
004f1ef3                  int32_t eax_5 = MulDiv(0x64, nNumerator, nDenominator);
004f1efe                  int32_t ecx_5;
004f1efe                  ecx_5 = this->m_bShowPercent;
004f1efe                  
004f1f01                  if (ebp_1->success_flag != 0)
004f1f01                  {
004f1f05                      int32_t nNumerator_1 = nNumerator;
004f1f05                      
004f1f0d                      if (ecx_5 == 0)
004f1f0d                      {
004f1f2a                          int32_t nDenominator_2 = nDenominator;
004f1f2b                          int32_t nNumerator_3 = nNumerator_1;
004f1f32                          PStringBase<unsigned short>::sprintf(&__return_addr, u"%d/%d");
004f1f0d                      }
004f1f0d                      else
004f1f0d                      {
004f1f0f                          int32_t var_20_4 = eax_5;
004f1f14                          int32_t nDenominator_1 = nDenominator;
004f1f15                          int32_t nNumerator_2 = nNumerator_1;
004f1f1c                          PStringBase<unsigned short>::sprintf(&__return_addr, u"%d/%d (%d %%)");
004f1f0d                      }
004f1f01                  }
004f1f01                  else if (ecx_5 == 0)
004f1f5e                      PStringBase<unsigned short>::set(&__return_addr, &data_7b0f34);
004f1f3e                  else
004f1f3e                  {
004f1f40                      int32_t var_20_5 = eax_5;
004f1f4b                      PStringBase<unsigned short>::sprintf(&__return_addr, u"%d %%");
004f1f3e                  }
004f1ee5              }
004f1ee5              
004f1f66              int32_t edi;
004f1f66              int32_t var_20_6 = edi;
004f1f67              int32_t edi_1 = 0;
004f1f6b              int32_t var_8;
004f1f6b              
004f1f6b              if (ebp_1->success_flag == 0)
004f1f91                  edi_1 = 3;
004f1f6b              else if (CreatureAppraisalProfile::InqAttribute2ndEnchantmentMod(eax, this->m_MaxAttribute, &var_8) != 0)
004f1f7f              {
004f1f89                  int32_t eax_10;
004f1f89                  eax_10 = var_8 == 0;
004f1f8d                  edi_1 = (eax_10 + 1);
004f1f7f              }
004f1fa1              UIElement_Text::SetTextWithFont(this->m_pValueText, &__return_addr, 0, edi_1);
004f1faa              void* esi_2 = ((char*)__return_addr - 0x14);
004f1faa              
004f1fbe              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004f1fc6                  **(uint32_t**)esi_2(1);
004f1ea2          }
004f1e8b      }
004f1e8b      
004f1fca      eax = 1;
004f1fd0      return 1;
004f1e80  }

004f1fd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004f1fe0  uint8_t __thiscall SkillInfoRegion::GetTooltip(class SkillInfoRegion const* this, class PStringBase<unsigned short>* arg2)

004f1fe0  {
004f1fe3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f1ff1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004f1ffc      int32_t eax_1;
004f1ffc      class PStringBase<unsigned short>* edx;
004f1ffc      eax_1 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f2005      class PSRefBufferCharData<unsigned short>** var_24_1 = &PStringBase<unsigned short>::s_NullBuffer_4;
004f2006      uint32_t m_Skill = this->m_Skill;
004f2006      
004f2011      if (SkillSystem::InqSkillFormula(eax_1, edx) != 0)
004f2011      {
004f2020          void* var_8;
004f2020          class PStringBase<unsigned short>* __return;
004f2020          class PStringBase<unsigned short>* edx_1;
004f2020          __return = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, &data_79c288);
004f2029          int32_t* var_24_2 = &var_8;
004f202e          void* var_4;
004f202e          int32_t* var_28 = &var_4;
004f2033          class PStringBase<unsigned short>* eax_3 = PStringBase<unsigned short>::operator+(&PStringBase<unsigned short>::s_NullBuffer_4, __return, edx_1);
004f203e          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
004f203e          
004f2042          if (m_charbuffer != eax_3->m_charbuffer)
004f2042          {
004f2057              if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
004f205f                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004f205f              
004f2061              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax_3->m_charbuffer;
004f2067              arg2->m_charbuffer = m_charbuffer_1;
004f206d              InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
004f2042          }
004f2042          
004f2079          int32_t* esi_3 = ((char*)var_4 - 0x14);
004f2079          
004f2088          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004f2090              **(uint32_t**)esi_3(1);
004f2090          
004f2096          int32_t* esi_5 = ((char*)var_8 - 0x14);
004f2096          
004f20a5          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004f20ad              **(uint32_t**)esi_5(1);
004f2011      }
004f2011      
004f20b7      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004f20bc      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
004f20c4      int32_t eax_11;
004f20c4      class PStringBase<unsigned short>* edx_5;
004f20c4      eax_11 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004f20cd      class PSRefBufferCharData<unsigned short>** var_24_8 = &PStringBase<unsigned short>::s_NullBuffer_3;
004f20ce      uint32_t m_Skill_1 = this->m_Skill;
004f20cf      SkillSystem::InqSkillDescription(eax_11, edx_5);
004f20d4      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_3;
004f20d8      int32_t eax_12 = PStringBase<unsigned short>::s_NullBuffer_5->m_data[0x7ffffffffffffffe];
004f20d8      
004f20e1      if (eax_12 != 1)
004f20e1      {
004f20ea          PStringBase<unsigned short>::append_n_chars(arg2, PStringBase<unsigned short>::s_NullBuffer_5, (eax_12 - 1));
004f20ef          PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_3;
004f20e1      }
004f20e1      
004f2102      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_5 != 0x14))
004f210a          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_5 + -0x14)(1);
004f210a      
004f2110      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_8 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
004f2110      
004f211f      if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
004f2127          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
004f2127      
004f212c      int32_t eax_16;
004f212c      eax_16 = 1;
004f2132      return 1;
004f1fe0  }

004f2135                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004f2140  void __thiscall SkillInfoRegion::SkillInfoRegion(class SkillInfoRegion* this, class UIElement_ListBox* arg2, int32_t arg3, int32_t arg4, uint32_t arg5, class IDClass<_tagDataID,32,0> arg6, uint8_t arg7)

004f2140  {
004f214e      int32_t ebx;
004f214e      int32_t var_a8 = ebx;
004f214f      int32_t ebp;
004f214f      int32_t var_ac = ebp;
004f2150      int32_t esi;
004f2150      int32_t var_b0 = esi;
004f2151      uint32_t m_Skill_5;
004f2151      uint32_t m_Skill = m_Skill_5;
004f216b      int32_t var_c0 = 4;
004f2172      InfoRegion::InfoRegion(this, arg2, arg3, arg4, Skill_StatType, arg5, arg6);
004f2172      int32_t* esp_1 = &m_Skill;
004f217a      bool cond:0 = this->m_pLabelText == 0;
004f2188      this->vtable = 0x7c40f4;
004f218e      this->m_Skill = arg5;
004f2191      this->m_AdvancementClass = UNDEF_SKILL_ADVANCEMENT_CLASS;
004f2198      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3;
004f2198      
004f2198      if (!(cond:0))
004f2198      {
004f219a          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f219f          PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
004f21a7          int32_t eax_3 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f21a9          class PStringBase<unsigned short>* m_Skill_1 = this->m_Skill;
004f21b0          class PSRefBufferCharData<unsigned short>** var_b8_2 = &PStringBase<unsigned short>::s_NullBuffer_3;
004f21b1          class PStringBase<unsigned short>* m_Skill_2 = m_Skill_1;
004f21b1          
004f21bc          if (SkillSystem::InqSkillName(eax_3, m_Skill_1) != 0)
004f21c6              UIElement_Text::SetText(this->m_pLabelText, &PStringBase<unsigned short>::s_NullBuffer_3);
004f21c6          
004f21cf          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_2 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004f21d6          esp_1 = &m_Skill;
004f21d6          
004f21de          if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
004f21de          {
004f21e2              int32_t var_b8_5 = 1;
004f21e6              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
004f21e6              esp_1 = &m_Skill;
004f21de          }
004f2198      }
004f2198      
004f21ed      if (this->m_pElement != 0)
004f21ed      {
004f21ef          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
004f21f4          PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
004f21fc          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
004f21fc          
004f220c          if (SkillInfoRegion::GetTooltip(this, &PStringBase<unsigned short>::s_NullBuffer_3) != 0)
004f220c          {
004f2212              void var_90;
004f2212              StringInfo::StringInfo(&var_90);
004f2217              int32_t var_b8_8 = 1;
004f2222              StringInfo::SetLiteralValue(&var_90, &PStringBase<unsigned short>::s_NullBuffer_3, 1);
004f222f              UIElement::SetTooltip(this->m_pElement, &var_90);
004f2239              int32_t var_b8_10 = 1;
004f2234              this->m_pElement->vtable->SetMouseVisible(1);
004f2245              StringInfo::~StringInfo(&var_90);
004f220c          }
004f220c          
004f224e          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_4 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
004f2255          esp_1 = &m_Skill;
004f2255          
004f225d          if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
004f225d          {
004f2261              int32_t var_b8_12 = 1;
004f2265              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
004f2265              esp_1 = &m_Skill;
004f225d          }
004f21ed      }
004f21ed      
004f2267      class UIElement* eax_9;
004f2267      eax_9 = arg7;
004f2267      
004f2270      if (eax_9 != 0)
004f2270      {
004f2283          int32_t var_c0_1 = 4;
004f2285          int32_t eax_11;
004f2285          uint32_t ecx_14;
004f2285          int32_t edx_4;
004f2285          eax_11 = QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(4, this->m_Skill, this);
004f2288          int32_t var_b0_1 = 0x10000004;
004f228d          m_Skill = 2;
004f228f          int32_t var_b8_14 = 4;
004f2291          class DBObj* eax_12 = DBObj::GetByEnum(eax_11, edx_4, ecx_14);
004f2298          esp_1 = &var_ac;
004f2298          
004f229d          if (eax_12 != 0)
004f229d          {
004f22a3              void var_88;
004f22a3              SkillBase::SkillBase(&var_88);
004f22af              void* var_b0_2 = &var_88;
004f22b0              m_Skill = this->m_Skill;
004f22b3              SkillTable::InqSkillBase(eax_12, m_Skill, var_b0_2);
004f22b3              esp_1 = &var_ac;
004f22be              uint32_t m_Skill_3;
004f22be              
004f22be              if (m_Skill_3 != 0)
004f22be              {
004f22c6                  struct QualityRegistrar::VTable* vtable = QualityRegistrar::s_pQR->vtable;
004f22c9                  m_Skill = m_Skill_3;
004f22ca                  int32_t var_b8_15 = 4;
004f22cc                  vtable->RegisterQualityHandlerForThePlayer(4, m_Skill, this);
004f22cc                  esp_1 = &var_ac;
004f22be              }
004f22be              
004f22d5              uint32_t m_Skill_4;
004f22d5              
004f22d5              if (m_Skill_4 != 0)
004f22d5              {
004f22dd                  struct QualityRegistrar::VTable* vtable_1 = QualityRegistrar::s_pQR->vtable;
004f22e0                  m_Skill = m_Skill_4;
004f22e1                  int32_t var_b8_16 = 4;
004f22e3                  vtable_1->RegisterQualityHandlerForThePlayer(4, m_Skill, this);
004f22e3                  esp_1 = &var_ac;
004f22d5              }
004f22d5              
004f22ea              SkillBase::~SkillBase(&var_88);
004f22ef              eax_12->vtable->Release();
004f229d          }
004f2270      }
004f2270      
004f22fa      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[4];
004f22ff      *(uint32_t*)((char*)esp_1 - 8) = 0x7c3f2c;
004f2304      *(uint32_t*)((char*)esp_1 - 0xc) = &esp_1[8];
004f22fa      esp_1[4] = 0;
004f2314      InterfaceSystem::GetClass(InterfaceSystem::GetInstance());
004f2319      int32_t* edi_6 = esp_1[4];
004f2324      *(uint32_t*)((char*)esp_1 - 8) = edi_6;
004f2326      *(uint32_t*)((char*)esp_1 - 4) = 0;
004f2329      int32_t* eax_18 = *(uint32_t*)((char*)esp_1 - 8);
004f22fa      esp_1[5] = 0;
004f22fa      esp_1[6] = 0;
004f22fa      
004f2335      if (eax_18 != 0)
004f233b          *(uint32_t*)(*(uint32_t*)eax_18 + 0x10)();
004f233b      
004f2342      *(uint32_t*)((char*)esp_1 - 0xc) = &esp_1[7];
004f2347      void* esp_8 = ((char*)esp_1 - 8);
004f234e      int32_t ebp_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&esp_1[5]);
004f234e      
004f2350      if (edi_6 != 0)
004f2356          *(uint32_t*)(*(uint32_t*)edi_6 + 0x14)();
004f2356      
004f2359      int32_t* edi_7 = *(uint32_t*)((char*)esp_8 + 0x14);
004f2359      
004f235f      if (edi_7 != 0)
004f235f      {
004f2363          if (ebp_1 >= 0)
004f2363          {
004f2368              *(uint32_t*)((char*)esp_8 - 4) = &this->m_AdvancementClass;
004f236c              *(uint32_t*)((char*)esp_8 - 8) = this->m_Skill;
004f236f              CACQualities::InqSkillAdvancementClass(edi_7);
004f2363          }
004f2363          
004f2378          *(uint32_t*)(*(uint32_t*)edi_7 + 0x14)();
004f235f      }
004f235f      
004f237b      *(uint32_t*)esp_8;
004f237e      *(uint32_t*)((char*)esp_8 + 4);
004f237f      *(uint32_t*)((char*)esp_8 + 8);
004f2380      *(uint32_t*)((char*)esp_8 + 0xc);
004f2140  }

004f238a                                90 90 90 90 90 90                                                            ......

004f2390  int32_t __thiscall EffectInfoRegion::GetDuration(class EffectInfoRegion* this, class CACQualities const* arg2)

004f2390  {
004f23a5      int32_t var_60 = 0x7b15c4;
004f23a9      class Enchantment* i_1 = nullptr;
004f23b1      int32_t var_58 = 0;
004f23b9      int32_t var_54 = 0;
004f23b9      
004f23c8      if (CACQualities::GetEnchantmentsInEffect(arg2, &var_60) != 0)
004f23c8      {
004f23d2          for (class Enchantment* i = i_1; i != 0; i = *(int32_t*)((char*)i + 0x50))
004f23d2          {
004f23e2              if (this->m_Spell == ((uint32_t)((int16_t)i->_id)))
004f23e2              {
004f23ee                  void var_50;
004f23ee                  Enchantment::Enchantment(&var_50, i);
004f23ff                  var_60 = 0x7b15c4;
004f2409                  double var_38;
004f2409                  double var_30;
004f2409                  double var_68 = ((double)((((long double)var_38) + ((long double)var_30)) - ((long double)Timer::cur_time)));
004f241b                  return PackableList<Enchantment>::Flush(&var_60);
004f23e2              }
004f23d2          }
004f23c8      }
004f23c8      
004f2422      var_60 = 0x7b15c4;
004f2436      return PackableList<Enchantment>::Flush(&var_60);
004f2390  }

004f2439                                                                             90 90 90 90 90 90 90                           .......

004f2440  uint8_t __thiscall EffectInfoRegion::GetLabel(class EffectInfoRegion const* this, class PStringBase<unsigned short>* arg2)

004f2440  {
004f2446      class ClientMagicSystem* eax = ClientMagicSystem::GetMagicSystem();
004f2446      
004f244d      if (eax == 0)
004f244d      {
004f244f          eax = 0;
004f2455          return 0;
004f244d      }
004f244d      
004f2476      class PStringBase<unsigned short> var_8;
004f2476      class AC1Legacy::PStringBase<char> __return;
004f2476      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, WidthConvert, &ClientMagicSystem::GetSpellName(eax, &__return, this->m_Spell)->m_buffer->m_data);
004f247b      class AC1Legacy::PStringBase<char> __return_1 = __return;
004f247b      
004f2493      if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
004f249b          **(uint32_t**)__return_1(1);
004f249b      
004f24a1      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
004f24a1      
004f24a7      if (m_charbuffer != var_8)
004f24a7      {
004f24b8          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
004f24c0              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
004f24c0          
004f24c2          class PStringBase<unsigned short> eax_8 = var_8;
004f24c6          arg2->m_charbuffer = eax_8;
004f24cc          InterlockedIncrement((eax_8 - 0x10));
004f24a7      }
004f24a7      
004f24d6      int32_t* esi_4 = (var_8 - 0x14);
004f24d6      
004f24e7      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004f24ef          **(uint32_t**)esi_4(1);
004f24ef      
004f24f1      int32_t eax_11;
004f24f1      eax_11 = 1;
004f24f7      return 1;
004f2440  }

004f24fa                                                                                90 90 90 90 90 90                            ......

004f2500  uint8_t __thiscall EffectInfoRegion::Update(class EffectInfoRegion* this, class CACQualities const* arg2)

004f2500  {
004f2506      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
004f2506      
004f250d      if (eax == 0)
004f250d      {
004f250f          eax = 0;
004f2515          return 0;
004f250d      }
004f250d      
004f2522      if (PlayerModule::SpellDuration(&eax->playerModule.vtable) == 0)
004f252a          return 1;
004f252a      
004f2539      double var_8 = ((double)EffectInfoRegion::GetDuration(this, arg2));
004f2552      return *(int32_t*)((char*)this->vtable + 0x30)(var_8, *(uint32_t*)((char*)var_8)[4]);
004f2500  }

004f2555                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004f2560  void __thiscall EffectInfoRegion::EffectInfoRegion(class EffectInfoRegion* this, class UIElement_ListBox* arg2, int32_t arg3, uint32_t arg4, uint8_t arg5)

004f2560  {
004f2566      uint32_t ebx = arg4;
004f257f      InfoRegion::InfoRegion(this, arg2, arg3, arg3, Undef_StatType, ebx, INVALID_DID.id);
004f2587      bool cond:0 = this->m_pLabelText == 0;
004f2589      this->vtable = 0x7c4124;
004f258f      this->m_Spell = ebx;
004f258f      
004f2592      if (!(cond:0))
004f2592      {
004f2594          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f2599          arg4 = PStringBase<unsigned short>::s_NullBuffer_1;
004f25a1          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f25a1          
004f25b5          if (EffectInfoRegion::GetLabel(this, &arg4) != 0)
004f25bf              UIElement_Text::SetText(this->m_pLabelText, &arg4);
004f25bf          
004f25c8          int32_t* edi_2 = (arg4 - 0x14);
004f25c8          
004f25db          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004f25e3              **(uint32_t**)edi_2(1);
004f2592      }
004f2592      
004f25ed      class UIElement* eax_5;
004f25ed      uint32_t edx_2;
004f25ed      eax_5 = UIElement::GetChildRecursive(this->m_pElement, 0x10000129);
004f25ed      
004f25f6      if (eax_5 != 0)
004f25f6      {
004f25f8          uint32_t var_10_5 = ebx;
004f2600          class Graphic* eax_7 = ClientMagicSystem::GetSpellIcon(ClientMagicSystem::GetMagicSystem(), edx_2);
004f2600          
004f2609          if (eax_7 != 0)
004f2609          {
004f260f              UIRegion::SetBlitMode(eax_5, Blit_3Alpha);
004f2616              class Graphic* eax_8 = operator new(0xc);
004f2616              
004f2620              if (eax_8 != 0)
004f2620              {
004f262d                  UIRegion::SetImage(eax_5, Graphic::Graphic(eax_8, eax_7));
004f2637                  return;
004f2620              }
004f2620              
004f263f              UIRegion::SetImage(eax_5, nullptr);
004f2609          }
004f25f6      }
004f2560  }

004f264c                                      90 90 90 90                                                              ....

004f2650  uint32_t __fastcall EffectInfoRegion::GetStat(class EffectInfoRegion const* this)

004f2650  {
004f2653      return this->m_Spell;
004f2650  }

004f2654                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f2660  void* __thiscall Attribute2ndInfoRegion::`scalar deleting destructor'(class Attribute2ndInfoRegion* this, uint32_t arg2)

004f2660  {
004f2663      InfoRegion::~InfoRegion(this);
004f2663      
004f266d      if ((arg2 & 1) != 0)
004f2670          operator delete(this);
004f2670      
004f267b      return this;
004f2660  }

004f267e                                                                                            90 90                                ..

004f2680  void __thiscall PlayerOptionPage::PlayerOptionPage(class PlayerOptionPage* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004f2680  {
004f268f      OptionPage::OptionPage(this, arg2, arg3);
004f2694      this->vtable = 0x7c4350;
004f269a      this->vtable = &gmCharacterSettingsUI::`vftable';
004f26a4      this->m_pOptionBox = nullptr;
004f2680  }

004f26b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f26c0  void __fastcall PlayerOptionPage::~PlayerOptionPage(class PlayerOptionPage* this)

004f26c0  {
004f26c0      this->vtable = 0x7c4350;
004f26c6      this->vtable = &gmCharacterSettingsUI::`vftable';
004f26d0      /* tailcall */
004f26d0      return OptionPage::~OptionPage(this);
004f26c0  }

004f26d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004f26e0  void __thiscall PlayerOptionPage::OnVisibilityChanged(class PlayerOptionPage* this, uint8_t arg2)

004f26e0  {
004f26e9      UIElement::OnVisibilityChanged(this, arg2);
004f26e9      
004f26f2      if (arg2 != 0)
004f26f2      {
004f26f4          this->vtable->SaveCurrentValues();
004f26fe          return;
004f26f2      }
004f26f2      
004f2701      this->vtable->RestoreSavedValues();
004f26e0  }

004f270e                                            90 90                                                                ..

004f2710  uint8_t __fastcall PlayerOptionPage::SaveCurrentValues(class PlayerOptionPage* this)

004f2710  {
004f271d      CPlayerModule::SaveToServer(&CPlayerSystem::GetPlayerSystem()->playerModule, 0);
004f2725      /* tailcall */
004f2725      return OptionPage::SaveCurrentValues(this);
004f2710  }

004f272a                                90 90 90 90 90 90                                                            ......

004f2730  uint8_t __fastcall PlayerOptionPage::AddSeperator(class PlayerOptionPage* this)

004f2730  {
004f2730      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
004f2730      
004f2738      if (m_pOptionBox == 0)
004f2738      {
004f274a          int32_t eax;
004f274a          eax = 0;
004f274c          return 0;
004f2738      }
004f2738      
004f273e      class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, 1, nullptr);
004f2743      int32_t eax_2 = -(eax_1);
004f2749      return ((int8_t)-((eax_2 - eax_2)));
004f2730  }

004f274d                                         90 90 90                                                               ...

004f2750  void __stdcall PlayerOptionPage::SetToggleLabel(class PlayerOptionPage* this @ ecx, class UIOption_Checkbox* arg2, uint32_t arg3, uint32_t arg4)

004f2750  {
004f275b      void var_90;
004f275b      StringInfo::StringInfo(&var_90);
004f2771      StringInfo::SetStringIDandTableEnum(&var_90, arg3, 0x10000003);
004f2785      UIElement_Text::SetStringInfo(&arg2->vtable, &var_90);
004f279b      StringInfo::SetStringIDandTableEnum(&var_90, arg4, 0x10000003);
004f27a9      *(int32_t*)((char*)arg2->vtable + 0x2b4)(&var_90);
004f27b3      StringInfo::~StringInfo(&var_90);
004f2750  }

004f27c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004f27d0  void __fastcall PlayerOptionPage::OnOptionChanged(class PlayerOptionPage* this, class UIOption const* arg2)

004f27d0  {
004f27e0      class UIElement* eax = UIElement::GetChildRecursive(((char*)this - 0x5f0), 0x100001fc);
004f27ee      class UIElement* eax_1 = UIElement::GetChildRecursive(((char*)this - 0x5f0), 0x100001fd);
004f27ee      
004f27fe      if (OptionPage::Changed(((char*)this - 0x5f0)) == 0)
004f27fe      {
004f2828          if (eax != 0)
004f282a              eax->vtable->SetState(0xd);
004f282a          
004f2838          if (eax_1 != 0)
004f283a              eax_1->vtable->SetState(0xd);
004f27fe      }
004f27fe      else
004f27fe      {
004f2802          if (eax != 0)
004f2804              eax->vtable->SetState(1);
004f2804          
004f2812          if (eax_1 != 0)
004f2814              eax_1->vtable->SetState(1);
004f27fe      }
004f27d0  }

004f284c                                      90 90 90 90                                                              ....

004f2850  void __thiscall PlayerOptionPage::OnOptionChangeConfirmed(class PlayerOptionPage* this, class UIOption const* arg2, uint8_t arg3)

004f2850  {
004f2859      if (arg3 != 0)
004f2867          *(uint32_t*)(*(int32_t*)((char*)this + -0x5f0) + 0x138)();
004f2867      
004f2871      this->vtable->__vecDelDtor(arg2);
004f2850  }

004f287c                                                                                      90 90 90 90                              ....

004f2880  void* __thiscall PlayerOptionPage::`scalar deleting destructor'(class PlayerOptionPage* this, uint32_t arg2)

004f2880  {
004f2883      this->vtable = 0x7c4350;
004f2889      this->vtable = &gmCharacterSettingsUI::`vftable';
004f2893      OptionPage::~OptionPage(this);
004f2893      
004f289d      if ((arg2 & 1) != 0)
004f28a0          operator delete(this);
004f28a0      
004f28ab      return this;
004f2880  }

004f28ae                                            90 90                                                                ..

004f28b0  uint8_t __thiscall PlayerOptionPage::AddHeader(class PlayerOptionPage* this, uint32_t arg2)

004f28b0  {
004f28b0      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
004f28bf      class UIElement* eax;
004f28bf      
004f28bf      if (m_pOptionBox != 0)
004f28bf      {
004f28c5          eax = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, 0, nullptr);
004f28c5          
004f28cc          if (eax != 0)
004f28cc          {
004f28d4              eax = eax->vtable->DynamicCast(0xc);
004f28d4              
004f28de              if (eax != 0)
004f28de              {
004f28e4                  void var_90;
004f28e4                  StringInfo::StringInfo(&var_90);
004f28fa                  StringInfo::SetStringIDandTableEnum(&var_90, arg2, 0x10000003);
004f28fa                  
004f290c                  if (StringInfo::IsValid(&var_90, 1) != 0)
004f2915                      UIElement_Text::SetStringInfo(eax, &var_90);
004f2915                  
004f291e                  StringInfo::~StringInfo(&var_90);
004f28de              }
004f28cc          }
004f28bf      }
004f28bf      
004f2923      eax = 0;
004f292c      return 0;
004f28b0  }

004f292f                                               90                                                                 .

004f2930  class UIOption_CheckboxSlider* __thiscall PlayerOptionPage::AddToggleWithSliderOption(class PlayerOptionPage* this, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3)

004f2930  {
004f2934      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
004f293a      class UIOption_CheckboxSlider* result = nullptr;
004f293a      
004f293e      if (m_pOptionBox != 0)
004f293e      {
004f2943          class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, 5, nullptr);
004f2943          
004f294a          if (eax_1 != 0)
004f294a          {
004f2955              void* eax_2 = eax_1->vtable->DynamicCast(0x10000036);
004f2955              
004f295d              if (eax_2 == 0)
004f298a                  return 0;
004f298a              
004f295f              result = ((char*)eax_2 - 0x1c);
004f295f              
004f2964              if (result != 0)
004f2964              {
004f2972                  UIOption_CheckboxSlider::SetUIPreference(result, arg2, arg3);
004f297a                  OptionPage::RegisterOption(this, result);
004f2964              }
004f294a          }
004f293e      }
004f293e      
004f2983      return result;
004f2930  }

004f298d                                         90 90 90                                                               ...

004f2990  class UIOption_Checkbox* __thiscall PlayerOptionPage::AddToggleOption(class PlayerOptionPage* this, class PStringBase<char> const* arg2)

004f2990  {
004f2994      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
004f299a      class UIOption_Checkbox* result = nullptr;
004f299a      
004f299e      if (m_pOptionBox != 0)
004f299e      {
004f29a3          class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, 2, nullptr);
004f29a3          
004f29aa          if (eax_1 != 0)
004f29aa          {
004f29b3              class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x10000219);
004f29b3              
004f29ba              if (eax_2 != 0)
004f29ba              {
004f29c5                  void* eax_3 = eax_2->vtable->DynamicCast(0x10000035);
004f29c5                  
004f29cd                  if (eax_3 == 0)
004f29f5                      return 0;
004f29f5                  
004f29cf                  result = ((char*)eax_3 - 0x20);
004f29cf                  
004f29d4                  if (result != 0)
004f29d4                  {
004f29dd                      UIOption_Checkbox::SetUIPreference(result, arg2);
004f29e5                      OptionPage::RegisterOption(this, result);
004f29d4                  }
004f29ba              }
004f29aa          }
004f299e      }
004f299e      
004f29ee      return result;
004f2990  }

004f29f8                                                                          90 90 90 90 90 90 90 90                          ........

004f2a00  class UIOption_Checkbox* __thiscall PlayerOptionPage::AddToggleOption(class PlayerOptionPage* this, enum PlayerOption arg2)

004f2a00  {
004f2a04      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
004f2a0a      class UIOption* result = nullptr;
004f2a0a      
004f2a0e      if (m_pOptionBox != 0)
004f2a0e      {
004f2a13          class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, 2, nullptr);
004f2a13          
004f2a1a          if (eax_1 != 0)
004f2a1a          {
004f2a23              class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x10000219);
004f2a23              
004f2a2a              if (eax_2 != 0)
004f2a2a              {
004f2a35                  void* eax_3;
004f2a35                  enum PlayerOption edx_2;
004f2a35                  eax_3 = eax_2->vtable->DynamicCast(0x10000035);
004f2a35                  
004f2a3d                  if (eax_3 == 0)
004f2a65                      return 0;
004f2a65                  
004f2a3f                  result = ((char*)eax_3 - 0x20);
004f2a3f                  
004f2a44                  if (result != 0)
004f2a44                  {
004f2a4a                      enum PlayerOption var_c_1 = arg2;
004f2a4d                      UIOption_Checkbox::SetPlayerOption(result, edx_2);
004f2a55                      OptionPage::RegisterOption(this, result);
004f2a44                  }
004f2a2a              }
004f2a1a          }
004f2a0e      }
004f2a0e      
004f2a5e      return result;
004f2a00  }

004f2a68                          90 90 90 90 90 90 90 90                                                          ........

004f2a70  class UIOption_Slider* __thiscall PlayerOptionPage::AddSliderOption(class PlayerOptionPage* this, class PStringBase<char> const* arg2, uint8_t arg3)

004f2a70  {
004f2a74      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
004f2a7a      class UIOption_Slider* result = nullptr;
004f2a7a      
004f2a7e      if (m_pOptionBox != 0)
004f2a7e      {
004f2a80          int32_t eax;
004f2a80          eax = arg3;
004f2a84          char temp1_1 = eax;
004f2a84          eax = -(eax);
004f2a90          class UIElement* eax_4 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, (((eax - eax) & 3) + 3), nullptr);
004f2a90          
004f2a97          if (eax_4 != 0)
004f2a97          {
004f2aa0              class UIElement* eax_5 = UIElement::GetChildRecursive(eax_4, 0x1000021c);
004f2aa0              
004f2aa7              if (eax_5 != 0)
004f2aa7              {
004f2ab2                  void* eax_6 = eax_5->vtable->DynamicCast(0x10000037);
004f2ab2                  
004f2aba                  if (eax_6 == 0)
004f2ae2                      return 0;
004f2ae2                  
004f2abc                  result = ((char*)eax_6 - 0x20);
004f2abc                  
004f2ac1                  if (result != 0)
004f2ac1                  {
004f2aca                      UIOption_Slider::SetUIPreference(result, arg2);
004f2ad2                      OptionPage::RegisterOption(this, result);
004f2ac1                  }
004f2aa7              }
004f2a97          }
004f2a7e      }
004f2a7e      
004f2adb      return result;
004f2a70  }

004f2ae5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004f2af0  class UIOption_Menu* __thiscall PlayerOptionPage::AddMenuOption(class PlayerOptionPage* this, class PStringBase<char> const* arg2, uint8_t arg3)

004f2af0  {
004f2af4      class UIElement_ListBox* m_pOptionBox = this->m_pOptionBox;
004f2afa      class UIOption_Menu* result = nullptr;
004f2afa      
004f2afe      if (m_pOptionBox != 0)
004f2afe      {
004f2b03          class UIElement* eax_1 = UIElement_ListBox::AddItemFromTemplateList(m_pOptionBox, 4, nullptr);
004f2b03          
004f2b0a          if (eax_1 != 0)
004f2b0a          {
004f2b13              class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x10000224);
004f2b13              
004f2b1a              if (eax_2 != 0)
004f2b1a              {
004f2b25                  void* eax_3 = eax_2->vtable->DynamicCast(0x10000038);
004f2b25                  
004f2b2d                  if (eax_3 == 0)
004f2b5d                      return 0;
004f2b5d                  
004f2b2f                  result = ((char*)eax_3 - 0x20);
004f2b2f                  
004f2b34                  if (result != 0)
004f2b34                  {
004f2b36                      eax_3 = arg3;
004f2b36                      
004f2b3c                      if (eax_3 != 0)
004f2b3c                      {
004f2b45                          UIOption_Menu::SetUIPreference(result, arg2);
004f2b4d                          OptionPage::RegisterOption(this, result);
004f2b56                          return result;
004f2b3c                      }
004f2b3c                      
004f2b67                      UIOption_Menu::SetUserPreference(result, arg2);
004f2b6f                      OptionPage::RegisterOption(this, result);
004f2b34                  }
004f2b1a              }
004f2b0a          }
004f2afe      }
004f2afe      
004f2b78      return result;
004f2af0  }

004f2b7b                                                                                   90 90 90 90 90                             .....

004f2b80  void __stdcall PlayerOptionPage::SetSliderLabel(class PlayerOptionPage* this @ ecx, class UIOption_Slider* arg2, uint32_t arg3, uint32_t arg4)

004f2b80  {
004f2b91      class UIElement* eax_1 = arg2->vtable->GetParent();
004f2b91      
004f2b9b      if (eax_1 != 0)
004f2b9b      {
004f2ba8          class UIElement* eax_2 = UIElement::GetChildRecursive(eax_1, 0x1000021e);
004f2baf          void var_90;
004f2baf          
004f2baf          if (eax_2 != 0)
004f2baf          {
004f2bb8              class UIElement_Text* eax_3 = eax_2->vtable->DynamicCast(0xc);
004f2bb8              
004f2bc2              if (eax_3 != 0)
004f2bc2              {
004f2bc8                  StringInfo::StringInfo(&var_90);
004f2bde                  StringInfo::SetStringIDandTableEnum(&var_90, arg3, 0x10000003);
004f2bea                  UIElement_Text::SetStringInfo(eax_3, &var_90);
004f2bf3                  StringInfo::~StringInfo(&var_90);
004f2bc2              }
004f2baf          }
004f2baf          
004f2c00          class UIElement* eax_5 = UIElement::GetChildRecursive(eax_1, 0x1000021f);
004f2c00          
004f2c07          if (eax_5 != 0)
004f2c07          {
004f2c0f              class UIElement_Text* eax_6 = eax_5->vtable->DynamicCast(0xc);
004f2c0f              
004f2c19              if (eax_6 != 0)
004f2c19              {
004f2c1f                  StringInfo::StringInfo(&var_90);
004f2c35                  StringInfo::SetStringIDandTableEnum(&var_90, arg4, 0x10000003);
004f2c41                  UIElement_Text::SetStringInfo(eax_6, &var_90);
004f2c4a                  StringInfo::~StringInfo(&var_90);
004f2c19              }
004f2c07          }
004f2b9b      }
004f2b80  }

004f2c59                                                                             90 90 90 90 90 90 90                           .......

004f2c60  uint8_t __fastcall OptionPage::SaveCurrentValues(class OptionPage* this)

004f2c60  {
004f2c6b      int32_t i = 0;
004f2c6f      int32_t ebx;
004f2c6f      ebx = 1;
004f2c6f      
004f2c71      if (this->m_UIOptionArray.m_num > 0)
004f2c71      {
004f2c93          do
004f2c93          {
004f2c79              int32_t* ecx = this->m_UIOptionArray.m_data[i];
004f2c79              
004f2c7e              if (ecx != 0)
004f2c88                  ebx &= *(uint32_t*)(*(uint32_t*)ecx + 0x2c8)();
004f2c88              
004f2c90              i += 1;
004f2c93          } while (i < this->m_UIOptionArray.m_num);
004f2c71      }
004f2c71      
004f2c95      this->vtable->OnOptionChanged(0);
004f2caa      return ebx;
004f2c60  }

004f2cab                                   90 90 90 90 90                                                             .....

004f2cb0  uint8_t __fastcall OptionPage::RestoreDefaultValues(class OptionPage* this)

004f2cb0  {
004f2cbb      int32_t i = 0;
004f2cbf      int32_t ebx;
004f2cbf      ebx = 1;
004f2cbf      
004f2cc1      if (this->m_UIOptionArray.m_num > 0)
004f2cc1      {
004f2ce3          do
004f2ce3          {
004f2cc9              int32_t* ecx = this->m_UIOptionArray.m_data[i];
004f2cc9              
004f2cce              if (ecx != 0)
004f2cd8                  ebx &= *(uint32_t*)(*(uint32_t*)ecx + 0x2c4)();
004f2cd8              
004f2ce0              i += 1;
004f2ce3          } while (i < this->m_UIOptionArray.m_num);
004f2cc1      }
004f2cc1      
004f2ce5      this->vtable->OnOptionChanged(0);
004f2cfa      return ebx;
004f2cb0  }

004f2cfb                                                                                   90 90 90 90 90                             .....

004f2d00  uint8_t __fastcall OptionPage::RestoreSavedValues(class OptionPage* this)

004f2d00  {
004f2d0b      int32_t i = 0;
004f2d0f      int32_t ebx;
004f2d0f      ebx = 1;
004f2d0f      
004f2d11      if (this->m_UIOptionArray.m_num > 0)
004f2d11      {
004f2d48          do
004f2d48          {
004f2d19              int32_t* ecx = this->m_UIOptionArray.m_data[i];
004f2d19              
004f2d1e              if ((ecx != 0 && *(uint32_t*)(*(uint32_t*)ecx + 0x2bc)() != 0))
004f2d3d                  ebx &= this->m_UIOptionArray.m_data[i]->vtable->RestoreSavedValue();
004f2d3d              
004f2d45              i += 1;
004f2d48          } while (i < this->m_UIOptionArray.m_num);
004f2d11      }
004f2d11      
004f2d4a      this->vtable->OnOptionChanged(0);
004f2d5f      return ebx;
004f2d00  }


004f2d60  uint8_t __fastcall OptionPage::Changed(class OptionPage* this)

004f2d60  {
004f2d6a      int32_t i = 0;
004f2d6a      
004f2d6e      if (this->m_UIOptionArray.m_num > 0)
004f2d6e      {
004f2d92          do
004f2d92          {
004f2d76              int32_t* ecx = this->m_UIOptionArray.m_data[i];
004f2d76              
004f2d7b              if ((ecx != 0 && *(uint32_t*)(*(uint32_t*)ecx + 0x2bc)() != 0))
004f2d9d                  return 1;
004f2d9d              
004f2d8f              i += 1;
004f2d92          } while (i < this->m_UIOptionArray.m_num);
004f2d6e      }
004f2d6e      
004f2d95      uint32_t eax;
004f2d95      eax = 0;
004f2d98      return 0;
004f2d60  }

004f2d9e                                                                                            90 90                                ..

004f2da0  void __thiscall OptionPage::OptionPage(class OptionPage* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004f2da0  {
004f2daf      UIElement::UIElement(this, arg2, arg3);
004f2db4      this->vtable = &IOptionChangeHandler::`vftable';
004f2dc0      this->vtable = &OptionPage::`vftable';
004f2dc6      this->vtable = &IOptionChangeHandler::`vftable';
004f2dd0      this->m_UIOptionArray.m_data = 0;
004f2dd6      this->m_UIOptionArray.m_sizeAndDeallocate = 0;
004f2ddc      this->m_UIOptionArray.m_num = 0;
004f2da0  }

004f2de8                          90 90 90 90 90 90 90 90                                                          ........

004f2df0  void __fastcall OptionPage::~OptionPage(class OptionPage* this)

004f2df0  {
004f2df3      this->vtable = &OptionPage::`vftable';
004f2df9      this->vtable = &IOptionChangeHandler::`vftable';
004f2df9      
004f2e13      if ((this->m_UIOptionArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f2e1c          operator delete[](this->m_UIOptionArray.m_data);
004f2e1c      
004f2e27      /* tailcall */
004f2e27      return UIElement::~UIElement(this);
004f2df0  }

004f2e2c                                      90 90 90 90                                                              ....

004f2e30  void* __thiscall OptionPage::`scalar deleting destructor'(class OptionPage* this, uint32_t arg2)

004f2e30  {
004f2e33      this->vtable = &OptionPage::`vftable';
004f2e39      this->vtable = &IOptionChangeHandler::`vftable';
004f2e39      
004f2e53      if ((this->m_UIOptionArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f2e5c          operator delete[](this->m_UIOptionArray.m_data);
004f2e5c      
004f2e66      UIElement::~UIElement(this);
004f2e66      
004f2e70      if ((arg2 & 1) != 0)
004f2e73          operator delete(this);
004f2e73      
004f2e7e      return this;
004f2e30  }

004f2e81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004f2e90  void __thiscall OptionPage::RegisterOption(class OptionPage* this, class UIOption* arg2)

004f2e90  {
004f2e9a      if (arg2 != 0)
004f2e9a      {
004f2eaf          int32_t eax_2 = (this->m_UIOptionArray.m_sizeAndDeallocate & 0x7fffffff);
004f2eb6          uint8_t eax_5;
004f2eb6          
004f2eb6          if (this->m_UIOptionArray.m_num >= eax_2)
004f2ec4              eax_5 = SmartArray<unsigned long,1>::grow(&this->m_UIOptionArray, SmartArray<unsigned long,1>::get_new_size(&this->m_UIOptionArray, (eax_2 + 1)));
004f2ec4          
004f2ecb          if ((this->m_UIOptionArray.m_num < eax_2 || eax_5 != 0))
004f2ecb          {
004f2ea9              this->m_UIOptionArray.m_data[this->m_UIOptionArray.m_num] = arg2;
004f2ea9              this->m_UIOptionArray.m_num += 1;
004f2ecb          }
004f2ecb          
004f2edb          if (this != 0)
004f2edb          {
004f2edd              arg2->vtable->SetChangeNotification(&this->vtable);
004f2ef0              return;
004f2edb          }
004f2edb          
004f2ef3          arg2->vtable->SetChangeNotification(0);
004f2e9a      }
004f2e90  }

004f2f05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004f2f10  uint8_t __thiscall ChatInterface::TypeIsActive(class ChatInterface* this, uint32_t arg2)

004f2f10  {
004f2f1e      int32_t eax_1;
004f2f1e      int32_t edx_1;
004f2f1e      eax_1 = _allshl();
004f2f1e      
004f2f3a      if (((this->m_llTextTypeFilter & eax_1) == 0 && (*(uint32_t*)((char*)this->m_llTextTypeFilter)[4] & edx_1) == 0))
004f2f46          return 0;
004f2f46      
004f2f41      return 1;
004f2f10  }

004f2f49                             90 90 90 90 90 90 90                                                           .......

004f2f50  void __fastcall ChatInterface::RecvNotice_PlayerDescReceived(class ChatInterface* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004f2f50  {
004f2f50      this->vtable->UpdateFromPlayerModule();
004f2f50  }

004f2f5b                                                                                   90 90 90 90 90                             .....

004f2f60  void __thiscall ChatInterface::RecvNotice_ClearChatBuffer(class ChatInterface* this, uint32_t arg2)

004f2f60  {
004f2f62      class UIElement_Text* m_chatLog = this->m_chatLog;
004f2f62      
004f2f7a      if ((m_chatLog != 0 && (arg2 == 0 || arg2 == this->m_eWindowID)))
004f2f7c          UIElement_Text::ClearAllText(m_chatLog);
004f2f60  }

004f2f84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004f2f90  void __fastcall ChatInterface::ActivateChatEntry(class ChatInterface* this)

004f2f90  {
004f2f93      this->m_chatEntry->vtable->Activate();
004f2fa1      this->m_chatEntry->vtable->TakeFocus();
004f2fb1      CM_UI::SendNotice_ToggleChatEntry(1);
004f2f90  }

004f2fbb                                                                                   90 90 90 90 90                             .....

004f2fc0  void __fastcall ChatInterface::DeactivateChatEntry(class ChatInterface* this)

004f2fc0  {
004f2fc3      this->m_chatEntry->vtable->RelinquishFocus();
004f2fd1      this->m_chatEntry->vtable->Deactivate();
004f2fe1      CM_UI::SendNotice_ToggleChatEntry(0);
004f2fc0  }

004f2feb                                   90 90 90 90 90                                                             .....

004f2ff0  void __thiscall ChatInterface::HandleCommandOrAliasKey(class ChatInterface* this, uint32_t arg2)

004f2ff0  {
004f2ffd      void var_90;
004f2ffd      StringInfo::StringInfo(&var_90);
004f301f      int32_t var_8c = 0;
004f3023      StringInfo::SetTableEnum(&var_90, 6);
004f3023      
004f3035      if (StringInfo::IsValid(&var_90, 1) != 0)
004f3035      {
004f3037          class UIElement_Text* m_chatEntry = this->m_chatEntry;
004f3037          
004f303f          if (m_chatEntry != 0)
004f303f          {
004f3041              m_chatEntry->vtable->Activate();
004f3049              this->m_chatEntry->vtable->TakeFocus();
004f3059              CM_UI::SendNotice_ToggleChatEntry(1);
004f306c              UIElement_Text::SetStringInfo(this->m_chatEntry, &var_90);
004f3077              UIElement_Text::Deselect(this->m_chatEntry);
004f3082              UIElement_Text::MoveCursorToEnd(this->m_chatEntry);
004f303f          }
004f3035      }
004f3035      
004f308b      StringInfo::~StringInfo(&var_90);
004f2ff0  }

004f309a                                                                                90 90 90 90 90 90                            ......

004f30a0  uint8_t __fastcall ChatInterface::IsTextEntryFocused(class ChatInterface* this)

004f30a0  {
004f30a6      class UIElement* m_activeElement = UIElementManager::s_pInstance->m_activeElement;
004f30b1      class UIElementManager* eax;
004f30b1      
004f30b1      if (((m_activeElement != 0 && m_activeElement == UIElement::GetRootElement(&this->vtable)) && UIElement::GetFocusDescendant(m_activeElement) == this->m_chatEntry))
004f30b1      {
004f30cf          eax = 1;
004f30d2          return 1;
004f30b1      }
004f30b1      
004f30d4      eax = 0;
004f30d7      return 0;
004f30a0  }

004f30d8                                                                          90 90 90 90 90 90 90 90                          ........

004f30e0  void __thiscall ChatInterface::RecvNotice_GameplayOptionChanged(class ChatInterface* this, class BaseProperty const* arg2, uint32_t arg3)

004f30e0  {
004f3100      if ((BaseProperty::GetPropertyName(arg2) == 0x1000007f && arg3 == this->m_eWindowID))
004f3100      {
004f3102          class BasePropertyValue* m_pcPropertyValue = arg2->m_pcPropertyValue;
004f3102          
004f3107          if (m_pcPropertyValue != 0)
004f3109              m_pcPropertyValue->vtable->InqBitfield64(&this->m_llTextTypeFilter);
004f3100      }
004f30e0  }

004f311d                                                                                         90 90 90                               ...

004f3120  void __thiscall ChatInterface::SetOpacity(class ChatInterface* this, float arg2)

004f3120  {
004f3124      this->m_fCurrentOpacity = arg2;
004f312a      class UIObject* m_object = this->m_object;
004f312a      
004f3132      if (m_object != 0)
004f3132      {
004f314b      label_4f314b:
004f314b          int32_t* eax = *(int32_t*)((char*)m_object->vtable + 0x1c)();
004f314b          
004f3150          if (eax != 0)
004f3156              /* jump -> *(uint32_t*)(*(uint32_t*)eax + 0x48) */
004f3132      }
004f3132      else
004f3132      {
004f3134          class UIRegion* m_parent = this->m_parent;
004f3134          
004f313c          if (m_parent != 0)
004f313c          {
004f313e              m_object = UIRegion::GetObjectA(m_parent);
004f313e              
004f3145              if (m_object != 0)
004f3145                  goto label_4f314b;
004f313c          }
004f3132      }
004f3120  }

004f315c                                                                                      90 90 90 90                              ....

004f3160  uint8_t __thiscall ChatInterface::SetUIObject(class ChatInterface* this, class UIObject* arg2)

004f3160  {
004f3169      uint8_t eax = UIElement::SetUIObject(this, arg2);
004f316e      long double x87_r7 = ((long double)this->m_fActiveOpacity);
004f3178      int32_t ebx;
004f3178      ebx = eax;
004f317a      this->m_fActiveOpacity = ((float)x87_r7);
004f3180      class UIObject* m_parent = this->m_parent;
004f3180      
004f3188      if (m_parent != 0)
004f3188      {
004f31a1      label_4f31a1:
004f31a1          m_parent = *(int32_t*)((char*)m_parent->vtable + 0x1c)();
004f31a1          
004f31a6          if (m_parent != 0)
004f31b1              *(int32_t*)((char*)m_parent->vtable + 0x48)(((float)x87_r7));
004f3188      }
004f3188      else
004f3188      {
004f318a          enum BlitMode m_eBlitMode = this->m_eBlitMode;
004f318a          
004f3192          if (m_eBlitMode != Blit_Normal)
004f3192          {
004f3194              m_parent = UIRegion::GetObjectA(m_eBlitMode);
004f3194              
004f319b              if (m_parent != 0)
004f319b                  goto label_4f31a1;
004f3192          }
004f3188      }
004f3188      
004f31b5      m_parent = ebx;
004f31b8      return m_parent;
004f3160  }

004f31bb                                                                                   90 90 90 90 90                             .....

004f31c0  void __fastcall ChatInterface::BuildChatColorLookupTable(class ChatInterface* this)

004f31c0  {
004f31d8      if (this->m_chatLog != 0)
004f31d8      {
004f31e4          int32_t* var_18 = nullptr;
004f31e8          int32_t* var_14_1 = nullptr;
004f31ec          BaseProperty::SetPropertyName(&var_18, 0x1b);
004f31f7          int32_t* var_10 = nullptr;
004f31fb          int32_t* var_c_1 = nullptr;
004f31ff          BaseProperty::SetPropertyName(&var_10, 0x19);
004f31ff          
004f3208          if (var_c_1 != 0)
004f3208          {
004f320e              BaseProperty::CheckCopyOnWrite(&var_10);
004f321e              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c578);
004f3208          }
004f3208          
004f3224          int32_t i_1 = 0x22;
004f3251          int32_t i;
004f3251          
004f3251          do
004f3251          {
004f3234              if (var_14_1 != 0)
004f3234              {
004f323a                  BaseProperty::CheckCopyOnWrite(&var_18);
004f324a                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xfc)(&var_10);
004f3234              }
004f3234              
004f3250              i = i_1;
004f3250              i_1 -= 1;
004f3251          } while (i != 1);
004f3251          
004f3257          if (var_c_1 != 0)
004f3257          {
004f325d              BaseProperty::CheckCopyOnWrite(&var_10);
004f326d              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c4b8);
004f3257          }
004f3257          
004f3277          if (var_14_1 != 0)
004f3277          {
004f327d              BaseProperty::CheckCopyOnWrite(&var_18);
004f328f              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(2, &var_10);
004f3277          }
004f3277          
004f3299          if (var_c_1 != 0)
004f3299          {
004f329f              BaseProperty::CheckCopyOnWrite(&var_10);
004f32af              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c558);
004f3299          }
004f3299          
004f32b9          if (var_14_1 != 0)
004f32b9          {
004f32bf              BaseProperty::CheckCopyOnWrite(&var_18);
004f32d1              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0xc, &var_10);
004f32b9          }
004f32b9          
004f32db          if (var_c_1 != 0)
004f32db          {
004f32e1              BaseProperty::CheckCopyOnWrite(&var_10);
004f32f1              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c4c8);
004f32db          }
004f32db          
004f32fb          if (var_14_1 != 0)
004f32fb          {
004f3305              BaseProperty::CheckCopyOnWrite(&var_18);
004f3317              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(3, &var_10);
004f3317              
004f3321              if (var_14_1 != 0)
004f3321              {
004f3327                  BaseProperty::CheckCopyOnWrite(&var_18);
004f3339                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x1f, &var_10);
004f3339                  
004f3343                  if (var_14_1 != 0)
004f3343                  {
004f3349                      BaseProperty::CheckCopyOnWrite(&var_18);
004f335b                      *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0xa, &var_10);
004f335b                      
004f3365                      if (var_14_1 != 0)
004f3365                      {
004f336b                          BaseProperty::CheckCopyOnWrite(&var_18);
004f337d                          *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x13, &var_10);
004f3365                      }
004f3343                  }
004f3321              }
004f32fb          }
004f32fb          
004f3387          if (var_c_1 != 0)
004f3387          {
004f338d              BaseProperty::CheckCopyOnWrite(&var_10);
004f339d              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c4d8);
004f3387          }
004f3387          
004f33a7          if (var_14_1 != 0)
004f33a7          {
004f33ad              BaseProperty::CheckCopyOnWrite(&var_18);
004f33bf              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(4, &var_10);
004f33bf              
004f33c9              if (var_14_1 != 0)
004f33c9              {
004f33cf                  BaseProperty::CheckCopyOnWrite(&var_18);
004f33e1                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0xb, &var_10);
004f33c9              }
004f33a7          }
004f33a7          
004f33eb          if (var_c_1 != 0)
004f33eb          {
004f33f1              BaseProperty::CheckCopyOnWrite(&var_10);
004f3401              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c528);
004f33eb          }
004f33eb          
004f340b          if (var_14_1 != 0)
004f340b          {
004f3411              BaseProperty::CheckCopyOnWrite(&var_18);
004f3423              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(8, &var_10);
004f3423              
004f342d              if (var_14_1 != 0)
004f342d              {
004f3433                  BaseProperty::CheckCopyOnWrite(&var_18);
004f3445                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(9, &var_10);
004f342d              }
004f340b          }
004f340b          
004f344f          if (var_c_1 != 0)
004f344f          {
004f3455              BaseProperty::CheckCopyOnWrite(&var_10);
004f3465              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c568);
004f344f          }
004f344f          
004f346f          if (var_14_1 != 0)
004f346f          {
004f3475              BaseProperty::CheckCopyOnWrite(&var_18);
004f3487              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x12, &var_10);
004f3487              
004f3491              if (var_14_1 != 0)
004f3491              {
004f3497                  BaseProperty::CheckCopyOnWrite(&var_18);
004f34a9                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x21, &var_10);
004f3491              }
004f346f          }
004f346f          
004f34b3          if (var_c_1 != 0)
004f34b3          {
004f34b9              BaseProperty::CheckCopyOnWrite(&var_10);
004f34c9              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c548);
004f34b3          }
004f34b3          
004f34d3          if (var_14_1 != 0)
004f34d3          {
004f34dd              BaseProperty::CheckCopyOnWrite(&var_18);
004f34ef              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x1b, &var_10);
004f34ef              
004f34f9              if (var_14_1 != 0)
004f34f9              {
004f3503                  BaseProperty::CheckCopyOnWrite(&var_18);
004f3515                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x1c, &var_10);
004f3515                  
004f351f                  if (var_14_1 != 0)
004f351f                  {
004f3529                      BaseProperty::CheckCopyOnWrite(&var_18);
004f353b                      *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x1d, &var_10);
004f353b                      
004f3545                      if (var_14_1 != 0)
004f3545                      {
004f354b                          BaseProperty::CheckCopyOnWrite(&var_18);
004f355d                          *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x1e, &var_10);
004f355d                          
004f3567                          if (var_14_1 != 0)
004f3567                          {
004f356d                              BaseProperty::CheckCopyOnWrite(&var_18);
004f357f                              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x20, &var_10);
004f357f                              
004f3589                              if (var_14_1 != 0)
004f3589                              {
004f358f                                  BaseProperty::CheckCopyOnWrite(&var_18);
004f35a1                                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0xe, &var_10);
004f3589                              }
004f3567                          }
004f3545                      }
004f351f                  }
004f34f9              }
004f34d3          }
004f34d3          
004f35ab          if (var_c_1 != 0)
004f35ab          {
004f35b1              BaseProperty::CheckCopyOnWrite(&var_10);
004f35c1              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c4f8);
004f35ab          }
004f35ab          
004f35cb          if (var_14_1 != 0)
004f35cb          {
004f35d1              BaseProperty::CheckCopyOnWrite(&var_18);
004f35e3              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0xf, &var_10);
004f35e3              
004f35ed              if (var_14_1 != 0)
004f35ed              {
004f35f3                  BaseProperty::CheckCopyOnWrite(&var_18);
004f3605                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(6, &var_10);
004f3605                  
004f360f                  if (var_14_1 != 0)
004f360f                  {
004f3615                      BaseProperty::CheckCopyOnWrite(&var_18);
004f3627                      *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x15, &var_10);
004f360f                  }
004f35ed              }
004f35cb          }
004f35cb          
004f3631          if (var_c_1 != 0)
004f3631          {
004f3637              BaseProperty::CheckCopyOnWrite(&var_10);
004f3647              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c508);
004f3631          }
004f3631          
004f3651          if (var_14_1 != 0)
004f3651          {
004f3657              BaseProperty::CheckCopyOnWrite(&var_18);
004f3669              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x16, &var_10);
004f3651          }
004f3651          
004f3673          if (var_c_1 != 0)
004f3673          {
004f3679              BaseProperty::CheckCopyOnWrite(&var_10);
004f3689              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c518);
004f3673          }
004f3673          
004f3693          if (var_14_1 != 0)
004f3693          {
004f3699              BaseProperty::CheckCopyOnWrite(&var_18);
004f36ab              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(7, &var_10);
004f36ab              
004f36b5              if (var_14_1 != 0)
004f36b5              {
004f36bb                  BaseProperty::CheckCopyOnWrite(&var_18);
004f36cd                  *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x11, &var_10);
004f36b5              }
004f3693          }
004f3693          
004f36d7          if (var_c_1 != 0)
004f36d7          {
004f36dd              BaseProperty::CheckCopyOnWrite(&var_10);
004f36ed              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c538);
004f36d7          }
004f36d7          
004f36f7          if (var_14_1 != 0)
004f36f7          {
004f36fd              BaseProperty::CheckCopyOnWrite(&var_18);
004f370f              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0xd, &var_10);
004f36f7          }
004f36f7          
004f3719          if (var_c_1 != 0)
004f3719          {
004f371f              BaseProperty::CheckCopyOnWrite(&var_10);
004f372f              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c4e8);
004f3719          }
004f3719          
004f3739          if (var_14_1 != 0)
004f3739          {
004f373f              BaseProperty::CheckCopyOnWrite(&var_18);
004f3751              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(5, &var_10);
004f3739          }
004f3739          
004f375b          if (var_c_1 != 0)
004f375b          {
004f3761              BaseProperty::CheckCopyOnWrite(&var_10);
004f3771              *(uint32_t*)(*(uint32_t*)var_c_1 + 0x9c)(0x81c4a8);
004f375b          }
004f375b          
004f377b          if (var_14_1 != 0)
004f377b          {
004f3781              BaseProperty::CheckCopyOnWrite(&var_18);
004f3793              *(uint32_t*)(*(uint32_t*)var_14_1 + 0xf8)(0x1a, &var_10);
004f377b          }
004f377b          
004f3799          this->m_chatLog->vtable->SetProperty(&var_18);
004f37ac          int32_t* eax_25 = var_10;
004f37ac          
004f37b2          if (eax_25 != 0)
004f37b2          {
004f37bc              int32_t esi_2 = (eax_25[1] - 1);
004f37b9              eax_25[1] = esi_2;
004f37b9              
004f37c3              if (esi_2 == 0)
004f37c9                  **(uint32_t**)eax_25(1);
004f37c9              
004f37cb              var_10 = nullptr;
004f37b2          }
004f37b2          
004f37d5          if (var_c_1 != 0)
004f37d5          {
004f37df              int32_t esi_4 = (var_c_1[1] - 1);
004f37dc              var_c_1[1] = esi_4;
004f37dc              
004f37e6              if (esi_4 == 0)
004f37ec                  **(uint32_t**)var_c_1(1);
004f37ec              
004f37ee              int32_t var_c_2 = 0;
004f37d5          }
004f37d5          
004f37f2          int32_t* eax_30 = var_18;
004f37f2          
004f37f8          if (eax_30 != 0)
004f37f8          {
004f3802              int32_t esi_6 = (eax_30[1] - 1);
004f37ff              eax_30[1] = esi_6;
004f37ff              
004f3809              if (esi_6 == 0)
004f380f                  **(uint32_t**)eax_30(1);
004f380f              
004f3811              var_18 = nullptr;
004f37f8          }
004f37f8          
004f381b          if (var_14_1 != 0)
004f381b          {
004f3825              int32_t esi_8 = (var_14_1[1] - 1);
004f3822              var_14_1[1] = esi_8;
004f3822              
004f382c              if (esi_8 == 0)
004f3832                  **(uint32_t**)var_14_1(1);
004f381b          }
004f31d8      }
004f31c0  }

004f383b                                                                                   90 90 90 90 90                             .....

004f3840  void __thiscall ChatInterface::ListenToGlobalMessage(class ChatInterface* this, uint32_t arg2, int32_t arg3)

004f3840  {
004f3848      if (arg2 == 3)
004f3848      {
004f3859          uint16_t eax_2;
004f3859          
004f3859          if ((((int16_t)(this->m_alphaBlendMod >> 4)) & 1) == 0)
004f385e              eax_2 = ChatInterface::IsTextEntryFocused(((char*)this - 4));
004f385e          
004f3865          if (((((int16_t)(this->m_alphaBlendMod >> 4)) & 1) != 0 || eax_2 != 0))
004f3867              eax_2 = 1;
004f3867          
004f3879          long double x87_r7_4 = (fabsl((((long double)this->m_fDefaultOpacity) - ((long double)this->m_eWindowID))) * ((long double)0.0500000007f));
004f3879          
004f387f          if (eax_2 == 0)
004f387f          {
004f38a8              long double x87_r7_6 = (((long double)this->m_fActiveOpacity) - x87_r7_4);
004f38ae              this->m_fActiveOpacity = ((float)x87_r7_6);
004f38b4              (x87_r7_6 - ((long double)this->m_eWindowID));
004f38bc              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
004f38bc              
004f38bf              if (!(p_1))
004f38bf              {
004f38c7                  this->m_fActiveOpacity = this->m_eWindowID;
004f38d1                  UIListener::UnRegisterForGlobalMessage(this, 3);
004f38bf              }
004f387f          }
004f387f          else
004f387f          {
004f3881              long double x87_r7_5 = (x87_r7_4 + ((long double)this->m_fActiveOpacity));
004f3887              this->m_fActiveOpacity = ((float)x87_r7_5);
004f388d              long double temp2_1 = ((long double)this->m_fDefaultOpacity);
004f388d              (x87_r7_5 - temp2_1);
004f388d              
004f3898              if ((*(uint8_t*)((char*)((((x87_r7_5 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f3898              {
004f38a0                  this->m_fActiveOpacity = this->m_fDefaultOpacity;
004f38d1                  UIListener::UnRegisterForGlobalMessage(this, 3);
004f3898              }
004f387f          }
004f387f          
004f38d6          long double x87_r7_7 = ((long double)this->m_fActiveOpacity);
004f38e0          this->m_fActiveOpacity = ((float)x87_r7_7);
004f38e6          class UIRegion* m_parent = this->m_parent;
004f38e6          
004f38ee          if (m_parent != 0)
004f38ee          {
004f3907          label_4f3907:
004f3907              int32_t* eax_3 = m_parent->vtable->SetShouldBlockClicks();
004f3907              
004f390c              if (eax_3 != 0)
004f3917                  *(uint32_t*)(*(uint32_t*)eax_3 + 0x48)(((float)x87_r7_7));
004f38ee          }
004f38ee          else
004f38ee          {
004f38f0              enum BlitMode m_eBlitMode = this->m_eBlitMode;
004f38f0              
004f38f8              if (m_eBlitMode != Blit_Normal)
004f38f8              {
004f38fa                  m_parent = UIRegion::GetObjectA(m_eBlitMode);
004f38fa                  
004f3901                  if (m_parent != 0)
004f3901                      goto label_4f3907;
004f38f8              }
004f38ee          }
004f3848      }
004f3840  }

004f391e                                                                                            90 90                                ..

004f3920  void __fastcall ChatInterface::UpdateFromPlayerModule(class ChatInterface* this)

004f3920  {
004f392e      if ((this->m_eWindowID != 0 && CPlayerSystem::GetPlayerSystem() != 0))
004f392e      {
004f3941          class CPlayerSystem* eax_2 = CPlayerSystem::GetPlayerSystem();
004f3946          uint32_t m_eWindowID = this->m_eWindowID;
004f395a          int32_t* var_8 = nullptr;
004f3962          int32_t* var_4_1 = nullptr;
004f3971          int32_t* ecx_1 = var_4_1;
004f3971          
004f3979          if ((PlayerModule::InqChatWindowOption(&eax_2->playerModule.vtable, m_eWindowID, 0x1000007f, &var_8) != 0 && ecx_1 != 0))
004f3979          {
004f3984              *(uint32_t*)(*(uint32_t*)ecx_1 + 0xe8)(&this->m_llTextTypeFilter);
004f398a              ecx_1 = var_4_1;
004f3979          }
004f3979          
004f398e          int32_t* eax_5 = var_8;
004f398e          
004f3994          if (eax_5 != 0)
004f3994          {
004f399e              int32_t esi_3 = (eax_5[1] - 1);
004f399b              eax_5[1] = esi_3;
004f399b              
004f39a5              if (esi_3 == 0)
004f39ab                  **(uint32_t**)eax_5(1);
004f39ab              
004f39ad              ecx_1 = var_4_1;
004f39b1              var_8 = nullptr;
004f3994          }
004f3994          
004f39bb          if (ecx_1 != 0)
004f39bb          {
004f39c3              int32_t esi_5 = (ecx_1[1] - 1);
004f39c0              ecx_1[1] = esi_5;
004f39c0              
004f39ca              if (esi_5 == 0)
004f39d0                  **(uint32_t**)ecx_1(1);
004f39bb          }
004f392e      }
004f3920  }

004f39d7                                                                       90 90 90 90 90 90 90 90 90                         .........

004f39e0  void __thiscall ChatInterface::ResizeTo(class ChatInterface* this, int32_t const arg2, int32_t const arg3)

004f39e0  {
004f39e4      class UIElement_Text* m_chatEntry = this->m_chatEntry;
004f39ea      int32_t ebx;
004f39ea      ebx = 0;
004f39ea      
004f39ee      if (m_chatEntry != 0)
004f39f5          ebx = UIElement_Text::IsAtVerticalEnd(m_chatEntry);
004f39f5      
004f3a03      UIElement::ResizeTo(this, arg2, arg3);
004f3a03      
004f3a0a      if (ebx != 0)
004f3a0a      {
004f3a0c          class UIElement_Text* m_chatEntry_1 = this->m_chatEntry;
004f3a12          int32_t _num_elements = m_chatEntry_1->m_glyphList.m_glyphList._num_elements;
004f3a18          int32_t _num_elements_1 = _num_elements;
004f3a19          UIElement_Text::ScrollToPosition(m_chatEntry_1, _num_elements);
004f3a0a      }
004f39e0  }

004f3a23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004f3a30  void __thiscall ChatInterface::SelectCommandFromHistory(class ChatInterface* this, uint8_t arg2)

004f3a30  {
004f3a39      uint32_t m_LastInputHistoryPos = this->m_LastInputHistoryPos;
004f3a39      
004f3a3f      if (arg2 == 0)
004f3a3f      {
004f3a9b          if (m_LastInputHistoryPos == 0xffffffff)
004f3a9b          {
004f3ab6              uint8_t eax_6 = PStringBase<unsigned short>::operator!=(UIElement_Text::GetText(this->m_chatEntry, &arg2), &PStringBase<unsigned short>::null_string);
004f3abf              int32_t* edi_2 = (arg2 - 0x14);
004f3ac6              int32_t ebx;
004f3ac6              ebx = eax_6;
004f3ac6              
004f3ad4              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004f3adc                  **(uint32_t**)edi_2(1);
004f3adc              
004f3ae2              if (ebx != 0)
004f3aef                  UIElement_Text::SetText(this->m_chatEntry, &PStringBase<unsigned short>::null_string);
004f3aef              
004f3af5              return;
004f3a9b          }
004f3a9b          
004f3aff          bool cond:1_1 = (m_LastInputHistoryPos + 1) < this->m_InputHistory.m_num;
004f3b01          this->m_LastInputHistoryPos = (m_LastInputHistoryPos + 1);
004f3b01          
004f3b07          if (!(cond:1_1))
004f3b07          {
004f3b18              UIElement_Text::SetText(this->m_chatEntry, &PStringBase<unsigned short>::null_string);
004f3b1d              this->m_LastInputHistoryPos = 0xffffffff;
004f3b28              return;
004f3b07          }
004f3a3f      }
004f3a3f      else
004f3a3f      {
004f3a41          uint32_t m_num = this->m_InputHistory.m_num;
004f3a41          
004f3a49          if (m_LastInputHistoryPos < m_num)
004f3a49          {
004f3a8d              if (m_LastInputHistoryPos == 0)
004f3af5                  return;
004f3af5              
004f3a90              this->m_LastInputHistoryPos = (m_LastInputHistoryPos - 1);
004f3a49          }
004f3a49          else
004f3a49          {
004f3a4d              if (m_num == 0)
004f3af5                  return;
004f3af5              
004f3a54              this->m_LastInputHistoryPos = (m_num - 1);
004f3a49          }
004f3a3f      }
004f3a3f      
004f3a70      int32_t edx_2 = UIElement_Text::SetText(this->m_chatEntry, &this->m_InputHistory.m_data[this->m_LastInputHistoryPos]);
004f3a75      class UIElement_Text* m_chatEntry = this->m_chatEntry;
004f3a82      arg2 = m_chatEntry->m_glyphList.m_glyphList._num_elements;
004f3a86      /* tailcall */
004f3a86      return UIElement_Text::ScrollToPosition(m_chatEntry, edx_2);
004f3a30  }

004f3b2b                                   90 90 90 90 90                                                             .....

004f3b30  uint8_t __fastcall ChatInterface::OnToggleChatEntry(class ChatInterface* this)

004f3b30  {
004f3b36      class UIElement* m_activeElement = UIElementManager::s_pInstance->m_activeElement;
004f3b36      
004f3b42      if ((m_activeElement != 0 && m_activeElement == UIElement::GetRootElement(&this->vtable)))
004f3b42      {
004f3b50          class UIElement_Text* m_chatEntry = this->m_chatEntry;
004f3b50          
004f3b5f          if (UIElement::GetFocusDescendant(m_activeElement) == m_chatEntry)
004f3b5f          {
004f3b61              m_chatEntry->vtable->RelinquishFocus();
004f3b6b              this->m_chatEntry->vtable->Deactivate();
004f3b7b              CM_UI::SendNotice_ToggleChatEntry(0);
004f3b85              int32_t eax_3;
004f3b85              eax_3 = 1;
004f3b88              return 1;
004f3b5f          }
004f3b42      }
004f3b42      
004f3b89      this->m_chatEntry->vtable->Activate();
004f3b97      this->m_chatEntry->vtable->TakeFocus();
004f3ba7      CM_UI::SendNotice_ToggleChatEntry(1);
004f3bb1      int32_t eax_5;
004f3bb1      eax_5 = 1;
004f3bb4      return 1;
004f3b30  }

004f3bb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004f3bc0  void __thiscall ChatInterface::SetDefaultOpacity(class ChatInterface* this, float arg2)

004f3bc0  {
004f3bc7      long double x87_r7 = ((long double)this->m_fActiveOpacity);
004f3bcd      this->m_fDefaultOpacity = arg2;
004f3bd3      long double temp1 = ((long double)arg2);
004f3bd3      (x87_r7 - temp1);
004f3bd7      float eax;
004f3bd7      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
004f3bd9      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004f3bd9      
004f3bdc      if (!(p))
004f3be5          ChatInterface::SetActiveOpacity(this, arg2);
004f3be5      
004f3bf6      if ((((int8_t)(this->__bitfield164 >> 4)) & 1) == 0)
004f3bf6      {
004f3bfe          class UIElement* m_activeElement = UIElementManager::s_pInstance->m_activeElement;
004f3bfe          
004f3c06          if (m_activeElement == 0)
004f3c2c              ChatInterface::SetOpacity(this, this->m_fDefaultOpacity);
004f3c06          else if (m_activeElement != UIElement::GetRootElement(&this->vtable))
004f3c2c              ChatInterface::SetOpacity(this, this->m_fDefaultOpacity);
004f3c12          else if (UIElement::GetFocusDescendant(m_activeElement) != this->m_chatEntry)
004f3c2c              ChatInterface::SetOpacity(this, this->m_fDefaultOpacity);
004f3bf6      }
004f3bc0  }

004f3c36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004f3c40  void __thiscall ChatInterface::SetActiveOpacity(class ChatInterface* this, float arg2)

004f3c40  {
004f3c47      long double x87_r7 = ((long double)this->m_fDefaultOpacity);
004f3c4d      this->m_fActiveOpacity = arg2;
004f3c53      long double temp1 = ((long double)arg2);
004f3c53      (x87_r7 - temp1);
004f3c58      float eax;
004f3c58      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
004f3c58      
004f3c5d      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
004f3c66          ChatInterface::SetDefaultOpacity(this, arg2);
004f3c66      
004f3c77      if ((((int8_t)(this->__bitfield164 >> 4)) & 1) != 0)
004f3c77      {
004f3ca3      label_4f3ca3:
004f3ca3          long double x87_r7_1 = ((long double)this->m_fActiveOpacity);
004f3cad          this->m_fCurrentOpacity = ((float)x87_r7_1);
004f3cb3          class UIObject* m_object = this->m_object;
004f3cb3          
004f3cbb          if (m_object != 0)
004f3cbb          {
004f3cd4          label_4f3cd4:
004f3cd4              int32_t* eax_4 = *(int32_t*)((char*)m_object->vtable + 0x1c)();
004f3cd4              
004f3cd9              if (eax_4 != 0)
004f3cd9              {
004f3ce3                  arg2 = ((float)x87_r7_1);
004f3ce9                  /* jump -> *(uint32_t*)(*(uint32_t*)eax_4 + 0x48) */
004f3cd9              }
004f3cbb          }
004f3cbb          else
004f3cbb          {
004f3cbd              class UIRegion* m_parent = this->m_parent;
004f3cbd              
004f3cc5              if (m_parent != 0)
004f3cc5              {
004f3cc7                  m_object = UIRegion::GetObjectA(m_parent);
004f3cc7                  
004f3cce                  if (m_object != 0)
004f3cce                      goto label_4f3cd4;
004f3cc5              }
004f3cbb          }
004f3c77      }
004f3c77      else
004f3c77      {
004f3c7e          class UIElement* m_activeElement = UIElementManager::s_pInstance->m_activeElement;
004f3c7e          
004f3c86          if (((m_activeElement != 0 && m_activeElement == UIElement::GetRootElement(&this->vtable)) && UIElement::GetFocusDescendant(m_activeElement) == this->m_chatEntry))
004f3ca1              goto label_4f3ca3;
004f3c77      }
004f3c40  }

004f3cf1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004f3d00  uint8_t __thiscall SmartArray<PStringBase<unsigned short>,1>::RemoveOrderedByIndex(class SmartArray<PStringBase<unsigned short>,1>* this, uint32_t arg2)

004f3d00  {
004f3d07      uint32_t m_num = this->m_num;
004f3d07      
004f3d0c      if (arg2 >= m_num)
004f3d0c      {
004f3dca          m_num = 0;
004f3dcd          return 0;
004f3d0c      }
004f3d0c      
004f3d12      class PStringBase<unsigned short>* m_data = this->m_data;
004f3d18      void* i = &m_data[arg2];
004f3d20      this->m_num = (m_num - 1);
004f3d20      
004f3d23      for (; i < &m_data[(m_num - 1)]; i += 4)
004f3d23      {
004f3d25          void* eax_1 = *(uint32_t*)i;
004f3d25          
004f3d2a          if (eax_1 != *(uint32_t*)((char*)i + 4))
004f3d2a          {
004f3d3f              if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
004f3d47                  **(uint32_t**)((char*)eax_1 - 0x14)(1);
004f3d47              
004f3d49              int32_t eax_4 = *(uint32_t*)((char*)i + 4);
004f3d4c              *(uint32_t*)i = eax_4;
004f3d52              InterlockedIncrement((eax_4 - 0x10));
004f3d2a          }
004f3d23      }
004f3d23      
004f3d5f      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f3d69      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f3d74      class PSRefBufferCharData<unsigned short>** edi_1 = &this->m_data[this->m_num];
004f3d77      class PSRefBufferCharData<unsigned short>* eax_7 = *(uint32_t*)edi_1;
004f3d77      
004f3d7b      if (eax_7 != PStringBase<unsigned short>::s_NullBuffer_1)
004f3d7b      {
004f3d90          if ((InterlockedDecrement(&eax_7->m_data[-8]) == 0 && eax_7 != 0x14))
004f3d99              *(uint32_t*)*(int32_t*)((char*)eax_7 + -0x14)(1);
004f3d99          
004f3d9c          *(uint32_t*)edi_1 = PStringBase<unsigned short>::s_NullBuffer_1;
004f3d9e          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f3d7b      }
004f3d7b      
004f3db7      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
004f3dbf          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
004f3dbf      
004f3dc4      int32_t eax_10;
004f3dc4      eax_10 = 1;
004f3dc7      return 1;
004f3d00  }


004f3dd0  void __thiscall ChatInterface::PostInit(class ChatInterface* this)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004f3dd0  {
004f3dd2      int32_t edi;
004f3dd2      int32_t var_c = edi;
004f3dd5      UIElement::PostInit(this);
004f3de8      UIElement::GetAttribute_Enum(this, 0x1000007e, &this->m_oldState);
004f3de8      
004f3df9      switch ((this->m_oldState - 1))
004f3df9      {
004f3e00          case 0:
004f3e00          case 7:
004f3e00          {
004f3e00              this->m_chatNewNonVisibleTextIndicator = 0xfbffffff;
004f3e3a              this->m_llTextTypeFilter = 0;
004f3e00              break;
004f3e00          }
004f3e0c          case 1:
004f3e0c          {
004f3e0c              this->m_chatNewNonVisibleTextIndicator = 0x101c;
004f3e3a              this->m_llTextTypeFilter = 0;
004f3e0c              break;
004f3e0c          }
004f3e18          case 2:
004f3e18          {
004f3e18              this->m_chatNewNonVisibleTextIndicator = 0x40c00;
004f3e3a              this->m_llTextTypeFilter = 0;
004f3e18              break;
004f3e18          }
004f3e24          case 3:
004f3e24          {
004f3e24              this->m_chatNewNonVisibleTextIndicator = 0x80000;
004f3e3a              this->m_llTextTypeFilter = 0;
004f3e24              break;
004f3e24          }
004f3e30          case 4:
004f3e30          {
004f3e30              this->m_chatNewNonVisibleTextIndicator = 0x78000000;
004f3e3a              this->m_llTextTypeFilter = 0;
004f3e30              break;
004f3e30          }
004f3df9      }
004f3df9      
004f3e47      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x10000011);
004f3e4e      class UIElement_Text* eax_2;
004f3e4e      
004f3e4e      if (eax_1 == 0)
004f3e5e          eax_2 = nullptr;
004f3e4e      else
004f3e56          eax_2 = eax_1->vtable->DynamicCast(0xc);
004f3e56      
004f3e67      this->m_chatEntry = eax_2;
004f3e79      this->m_chatLog = UIElement::GetChildRecursive(this, 0x1000048c);
004f3e7f      class UIElement* eax_4 = UIElement::GetChildRecursive(this, 0x10000016);
004f3e86      float eax_5;
004f3e86      
004f3e86      if (eax_4 == 0)
004f3e96          eax_5 = 0f;
004f3e86      else
004f3e8e          eax_5 = eax_4->vtable->DynamicCast(0xc);
004f3e8e      
004f3e98      this->m_fCurrentOpacity = eax_5;
004f3e9e      class GlobalEventHandler* eax_6 = GlobalEventHandler::GetGlobalEventHandler();
004f3e9e      
004f3ea7      if (eax_6 != 0)
004f3ea7      {
004f3ea9          eax_6->vtable->RegisterNoticeHandler(0x186b6, ((char*)this - 4));
004f3eba          eax_6->vtable->RegisterNoticeHandler(0x4dd252, ((char*)this - 4));
004f3ec7          eax_6->vtable->RegisterNoticeHandler(0x4dd267, ((char*)this - 4));
004f3ed4          eax_6->vtable->RegisterNoticeHandler(0x4dd26e, ((char*)this - 4));
004f3ee1          eax_6->vtable->RegisterNoticeHandler(0x4dd1f0, ((char*)this - 4));
004f3ea7      }
004f3ea7      
004f3ef3      UIListener::RegisterForGlobalMessage(this, 1);
004f3ef8      class ClientCommunicationSystem* eax_10 = ClientCommunicationSystem::GetCommunicationSystem();
004f3eff      this->m_LastInputHistoryPos = eax_10;
004f3eff      
004f3f05      if (eax_10 != 0)
004f3f07          eax_10->vtable->AddRef();
004f3f07      
004f3f13      ChatInterface::BuildChatColorLookupTable(((char*)this - 4));
004f3f2a      *(uint32_t*)(this->vtable + 0x224)(gmClient::sm_nFontFace, gmClient::sm_nFontSize);
004f3f37      /* jump -> *(uint32_t*)(this->vtable + 0x2a8) */
004f3dd0  }

004f3f3d                                                                                         8d 49 00                               .I.
004f3f40  uint32_t jump_table_4f3f40[0x8] = 
004f3f40  {
004f3f40      [0x0] =  0x004f3e00
004f3f44      [0x1] =  0x004f3e0c
004f3f48      [0x2] =  0x004f3e18
004f3f4c      [0x3] =  0x004f3e24
004f3f50      [0x4] =  0x004f3e30
004f3f54      [0x5] =  0x004f3e40
004f3f58      [0x6] =  0x004f3e40
004f3f5c      [0x7] =  0x004f3e00
004f3f60  }

004f3f60  void __thiscall ChatInterface::OnSetAttribute(class ChatInterface* this, class BaseProperty const* arg2)

004f3f60  {
004f3f61      class BaseProperty* esi = arg2;
004f3f69      UIElement::OnSetAttribute(this, esi);
004f3f70      uint32_t eax = BaseProperty::GetPropertyName(esi);
004f3f70      
004f3f7a      if (eax == 0x10000080)
004f3f7a      {
004f3fad          class BasePropertyValue* m_pcPropertyValue_1 = esi->m_pcPropertyValue;
004f3fb2          arg2 = 0x3f800000;
004f3fb2          
004f3fba          if (m_pcPropertyValue_1 != 0)
004f3fbc              m_pcPropertyValue_1->vtable->InqFloat(&arg2);
004f3fbc          
004f3fd1          ChatInterface::SetDefaultOpacity(((char*)this - 4), arg2);
004f3f7a      }
004f3f7a      else if (eax == 0x10000081)
004f3f7d      {
004f3f7f          class BasePropertyValue* m_pcPropertyValue = esi->m_pcPropertyValue;
004f3f84          arg2 = 0x3f800000;
004f3f84          
004f3f8c          if (m_pcPropertyValue != 0)
004f3f8e              m_pcPropertyValue->vtable->InqFloat(&arg2);
004f3f8e          
004f3fa3          ChatInterface::SetActiveOpacity(((char*)this - 4), arg2);
004f3f7d      }
004f3f60  }

004f3fdb                                                                                   90 90 90 90 90                             .....

004f3fe0  class PStringBase<unsigned short>* __thiscall PStringBase<unsigned short>::substring(class PStringBase<unsigned short> const* this, class PStringBase<unsigned short>* __return, uint32_t arg3, uint32_t arg4)

004f3fe0  {
004f3fe0      class PStringBase<unsigned short>* var_4 = this;
004f3fe1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f3fef      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
004f3ff9      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f3ffb      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_charbuffer;
004f4004      int32_t ecx_1 = (m_charbuffer->m_data[0x7ffffffffffffffe] - 1);
004f4007      void* __offset(PStringBase<unsigned short>, -0x10) var_14_2;
004f4007      class PStringBase<unsigned short>* result;
004f4007      void* __offset(PStringBase<unsigned short>, -0x14) esi_2;
004f4007      
004f4007      if (arg3 < ecx_1)
004f4007      {
004f4026          uint32_t eax_4 = arg4;
004f4026          
004f402c          if (eax_4 >= ecx_1)
004f402e              eax_4 = (ecx_1 - 1);
004f402e          
004f403d          PStringBase<unsigned short>::append_n_chars(&var_4, &m_charbuffer->m_data[arg3], ((eax_4 - arg3) + 1));
004f4042          class PStringBase<unsigned short>* eax_8 = var_4;
004f4046          result = __return;
004f404a          result->m_charbuffer = eax_8;
004f4050          InterlockedIncrement(&eax_8[-4]);
004f4056          esi_2 = &var_4[-5];
004f405c          var_14_2 = ((char*)esi_2 + 4);
004f4007      }
004f4007      else
004f4007      {
004f4009          class PStringBase<unsigned short>* eax_1 = var_4;
004f400d          result = __return;
004f4011          result->m_charbuffer = eax_1;
004f4017          InterlockedIncrement(&eax_1[-4]);
004f401d          esi_2 = &var_4[-5];
004f4023          var_14_2 = ((char*)esi_2 + 4);
004f4007      }
004f4007      
004f4069      if ((InterlockedDecrement(var_14_2) == 0 && esi_2 != 0))
004f4071          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004f4071      
004f4079      return result;
004f3fe0  }

004f407c                                                                                      90 90 90 90                              ....

004f4080  uint8_t __thiscall PStringBaseIter_Common<unsigned short>::FindChar(class PStringBaseIter_Common<unsigned short>* this, class PStringBase<unsigned short> const* arg2, uint8_t arg3)

004f4080  {
004f408a      class PStringBase<unsigned short>* var_4 = arg2;
004f4096      int32_t var_10 = 0x79449c;
004f409e      int32_t var_c = 0;
004f40a2      int32_t var_8 = 0;
004f40a6      uint32_t curr;
004f40a6      
004f40a6      if (arg3 == 0)
004f40a6      {
004f4100          if (PStringBaseIter_Common<unsigned short>::FindChar(&var_10, this->vtable->IndexToChar(this->curr), 0) != 0)
004f4154              return 1;
004f4154          
004f4109          while (true)
004f4109          {
004f4109              uint32_t edi_2 = (this->curr + 1);
004f4109              
004f410e              if (edi_2 <= this->vtable->GetStrLen())
004f411b                  this->curr = edi_2;
004f410e              else
004f4116                  this->curr = this->vtable->GetStrLen();
004f4116              
004f412c              if (this->vtable->IndexToChar(this->curr) == 0)
004f412c                  break;
004f412c              
004f4137              int32_t var_c_2 = 0;
004f4137              
004f414a              if (PStringBaseIter_Common<unsigned short>::FindChar(&var_10, this->vtable->IndexToChar(this->curr), 0) != 0)
004f4154                  return 1;
004f4109          }
004f40a6      }
004f40a6      else
004f40a6      {
004f40a8          while (true)
004f40a8          {
004f40a8              curr = this->curr;
004f40a8              
004f40ae              if (curr < 1)
004f40ae              {
004f40da                  this->curr = 0;
004f40da                  break;
004f40ae              }
004f40ae              
004f40b0              struct PStringBaseIter_Common<unsigned short>::VTable* vtable = this->vtable;
004f40b7              this->curr = (curr - 1);
004f40ba              int32_t var_c_1 = 0;
004f40ba              
004f40cd              if (PStringBaseIter_Common<unsigned short>::FindChar(&var_10, vtable->IndexToChar((curr - 1)), 0) != 0)
004f40d7                  return 1;
004f40a8          }
004f40a6      }
004f40a6      
004f40df      curr = 0;
004f40e5      return 0;
004f4080  }

004f4157                                                                       90 90 90 90 90 90 90 90 90                         .........

004f4160  void __fastcall ChatInterface::~ChatInterface(class ChatInterface* this)

004f4160  {
004f4164      this->vtable = 0x7c4970;
004f416f      this->vtable = 0x7c4838;
004f4175      UIListener::UnRegisterForGlobalMessage(this, 1);
004f417a      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004f417a      
004f4181      if (eax != 0)
004f4183          eax->vtable->UnRegisterAllNoticeHandlers(((char*)this - 4));
004f4183      
004f418b      uint32_t m_LastInputHistoryPos = this->m_LastInputHistoryPos;
004f418b      
004f4193      if (m_LastInputHistoryPos != 0)
004f4193      {
004f4197          *(uint32_t*)(*(uint32_t*)m_LastInputHistoryPos + 0x14)();
004f419a          this->m_LastInputHistoryPos = 0;
004f4193      }
004f4193      
004f41b6      if ((this->m_InputHistory.m_data & 0x80000000) == 0x80000000)
004f41b6      {
004f41b8          class UIElement_Text* m_pChatTargetButtonText = this->m_pChatTargetButtonText;
004f41b8          
004f41c0          if (m_pChatTargetButtonText != 0)
004f41c4              PStringBase<char>::`vector deleting destructor'(m_pChatTargetButtonText, 3);
004f41b6      }
004f41b6      
004f41cc      int32_t ecx_4 = -(((char*)this - 4));
004f41d2      UIElement_Field::~UIElement_Field(((ecx_4 - ecx_4) & this));
004f4164      this->vtable = 0x7bf328;
004f41e1      /* tailcall */
004f41e1      return NoticeHandler::~NoticeHandler(((char*)this - 4));
004f4160  }

004f41e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f41f0  void __thiscall ChatInterface::StartTell(class ChatInterface* this, class PStringBase<unsigned short> const* arg2)

004f41f0  {
004f41f9      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
004f4206      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, u"@tell %s, ");
004f420b      this->m_chatEntry->vtable->Activate();
004f421c      this->m_chatEntry->vtable->TakeFocus();
004f422c      CM_UI::SendNotice_ToggleChatEntry(1);
004f423f      UIElement_Text::SetText(this->m_chatEntry, &arg2);
004f4252      UIElement_Text::MoveCursorToPosition(this->m_chatEntry, arg2->m_charbuffer);
004f425d      UIElement_Text::ClearSelection(this->m_chatEntry);
004f4266      void* __offset(PStringBase<unsigned short>, -0x14) esi_2 = &arg2[-5];
004f4266      
004f4279      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
004f4281          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
004f41f0  }

004f4287                       90 90 90 90 90 90 90 90 90                                                         .........

004f4290  void __fastcall ChatInterface::TruncateChatLog(class ChatInterface* this, uint32_t arg2)

004f4290  {
004f4298      class UIElement_Text* m_chatLog = this->m_chatLog;
004f4298      
004f42a4      if (m_chatLog != 0)
004f42a4      {
004f42b0          class PStringBase<unsigned short> __return;
004f42b0          UIElement_Text::GetText(m_chatLog, &__return);
004f42b5          class PStringBase<unsigned short> __return_1 = __return;
004f42b9          int32_t eax_1 = *(uint32_t*)(__return_1 - 4);
004f42bc          uint32_t ecx = arg2;
004f42bc          
004f42c2          if (eax_1 <= ecx)
004f42c2          {
004f444a              if ((InterlockedDecrement((__return_1 - 0x10)) == 0 && __return_1 != 0x14))
004f4452                  **(uint32_t**)(__return_1 - 0x14)(1);
004f42c2          }
004f42c2          else
004f42c2          {
004f42c8              int32_t eax_2 = (eax_1 - ecx);
004f42d0              int32_t var_10 = 0x79449c;
004f42d8              class PStringBase<unsigned short>* var_4_1 = &__return;
004f42dc              int32_t var_8_1 = 0;
004f42e0              int32_t var_c_1 = 0;
004f42e0              
004f42e4              if (eax_1 != ecx)
004f42eb                  PStringBaseIter_Common<unsigned short>::Next(&var_10, eax_2);
004f42eb              
004f42f9              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_79c288);
004f4309              uint8_t eax_3 = PStringBaseIter_Common<unsigned short>::FindChar(&var_10, &arg2, 1);
004f431a              int32_t* esi_2 = (arg2 - 0x14);
004f431a              
004f4329              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004f4331                  **(uint32_t**)esi_2(1);
004f4331              
004f4335              int32_t ecx_5;
004f4335              int32_t edx_3;
004f4335              
004f4335              if (eax_3 != 0)
004f4335              {
004f433b                  ecx_5 = var_c_1;
004f4344                  int32_t eax_6;
004f4344                  edx_3 = HIGHD((0xcccccccd * *(uint32_t*)(__return - 4)));
004f4344                  eax_6 = LOWD((0xcccccccd * *(uint32_t*)(__return - 4)));
004f4335              }
004f4335              
004f4350              if ((eax_3 != 0 && (eax_2 - ecx_5) < (edx_3 >> 3)))
004f4350              {
004f4360              label_4f4360:
004f4360                  UIElement_Text::BeheadText(this->m_chatLog, (ecx_5 + 1), 1);
004f4369                  var_10 = 0x794478;
004f4371                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004f437d                  return;
004f4350              }
004f4350              
004f4382              int32_t var_c_2 = 0;
004f4382              
004f438a              if (eax_2 > 0)
004f4391                  PStringBaseIter_Common<unsigned short>::Next(&var_10, eax_2);
004f4391              
004f439f              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &data_79c288);
004f43af              uint8_t eax_8 = PStringBaseIter_Common<unsigned short>::FindChar(&var_10, &arg2, 0);
004f43b8              int32_t* esi_6 = (arg2 - 0x14);
004f43b8              
004f43c9              if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004f43d1                  **(uint32_t**)esi_6(1);
004f43d1              
004f43d5              if (eax_8 != 0)
004f43d5              {
004f43db                  ecx_5 = var_c_2;
004f43e4                  int32_t eax_11;
004f43e4                  int32_t edx_7;
004f43e4                  edx_7 = HIGHD((0xcccccccd * *(uint32_t*)(__return - 4)));
004f43e4                  eax_11 = LOWD((0xcccccccd * *(uint32_t*)(__return - 4)));
004f43e4                  
004f43f0                  if ((ecx_5 - eax_2) < (edx_7 >> 3))
004f43f0                      goto label_4f4360;
004f43d5              }
004f43d5              
004f4403              UIElement_Text::BeheadText(this->m_chatLog, eax_2, 1);
004f440c              int32_t* esi_10 = (__return - 0x14);
004f4413              var_10 = 0x794478;
004f4413              
004f4423              if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
004f442b                  **(uint32_t**)esi_10(1);
004f42c2          }
004f42a4      }
004f4290  }

004f445e                                                                                            90 90                                ..

004f4460  void __fastcall ChatInterface::RecvNotice_FontSettingsChanged(class ChatInterface* this, uint32_t arg2, uint32_t arg3)

004f4460  {
004f4460      class ChatInterface* this_1 = this;
004f4462      uint32_t ebx = arg2;
004f4462      
004f446c      if (ebx <= 5)
004f446c      {
004f4473          uint32_t esi_1 = arg3;
004f4473          
004f447b          if (esi_1 <= 5)
004f447b          {
004f4481              int32_t var_18_1 = 0x26;
004f4483              int32_t var_1c_1 = 2;
004f4485              int32_t var_20_1 = 0x10000001;
004f448a              int32_t eax;
004f448a              int32_t edx;
004f448a              class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
004f448a              
004f4496              if (eax_1 != 0)
004f4496              {
004f44aa                  int32_t m_charbuffer_1 = UI_ChatFontSize_Choices[esi_1].m_charbuffer;
004f44ab                  int32_t m_charbuffer = UI_ChatFontFace_Choices[ebx].m_charbuffer;
004f44b8                  PStringBase<char>::PStringBase<char>(&arg3, Formatted, "Chat_%s_%s");
004f44b8                  
004f44d3                  if ((EnumIDMap::NameToEnum(eax_1, &arg3, &this_1) != 0 && EnumIDMap::EnumToDID(eax_1, this_1, &arg2) != 0))
004f44d3                  {
004f44ef                      class Font* eax_6 = Font::Get(arg2);
004f44ef                      
004f44fb                      if (eax_6 != 0)
004f44fb                      {
004f4504                          UIElement_Text::ChangeExistingTextToNewFont(this->m_chatLog, eax_6);
004f4514                          UIElement_Text::SetFontDIDWithoutChangingExistingText(this->m_chatLog, arg2);
004f4519                          eax_6->vtable->Release();
004f44fb                      }
004f44d3                  }
004f44d3                  
004f4524                  int32_t* esi_4 = (arg3 - 0x14);
004f4524                  
004f4537                  if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004f453f                      **(uint32_t**)esi_4(1);
004f453f                  
004f4541                  eax_1->vtable->Release();
004f4496              }
004f447b          }
004f446c      }
004f4460  }


004f4550  void __thiscall ChatInterface::ChatInterface(class ChatInterface* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004f4550  {
004f4563      this->vtable = 0x7bf328;
004f4569      UIElement_Field::UIElement_Field(&this->vtable, arg2, arg3);
004f4570      this->m_eWindowID = 0;
004f4576      this->m_chatEntry = nullptr;
004f457c      this->m_chatLog = nullptr;
004f4582      this->m_chatNewNonVisibleTextIndicator = nullptr;
004f4588      this->m_pChatTargetButtonText = nullptr;
004f458e      this->vtable = 0x7c4970;
004f455d      this->vtable = &ChatInterface::`vftable';
004f459f      this->m_fDefaultOpacity = 0.5f;
004f45a5      this->m_fCurrentOpacity = 0.5f;
004f45ab      this->m_fActiveOpacity = 1f;
004f45b8      this->m_llTextTypeFilter = 0xffffffff;
004f45be      *(uint32_t*)((char*)this->m_llTextTypeFilter)[4] = 0xffffffff;
004f45c4      this->m_InputHistory.m_data = 0;
004f45ca      this->m_InputHistory.m_sizeAndDeallocate = 0;
004f45d0      this->m_InputHistory.m_num = 0;
004f45d6      this->m_pCCS = nullptr;
004f45dc      this->m_LastInputHistoryPos = 0xffffffff;
004f45f3      this->m_llTextTypeFilter &= 0xfbffffff;
004f45fa      *(uint32_t*)((char*)this->m_llTextTypeFilter)[4] = *(uint32_t*)((char*)this->m_llTextTypeFilter)[4];
004f4550  }

004f4606                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f4610  void* __thiscall ChatInterface::`scalar deleting destructor'(class ChatInterface* this, uint32_t arg2)

004f4610  {
004f4613      ChatInterface::~ChatInterface(this);
004f461d      void* __offset(ChatInterface, -0x4) result = ((char*)this - 4);
004f461d      
004f4620      if ((arg2 & 1) == 0)
004f462f          return result;
004f462f      
004f4623      operator delete(result);
004f462b      return ((char*)this - 4);
004f4610  }

004f4632                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004f4640  void __thiscall ChatInterface::RecvNotice_DisplayFinalStringInfo(class ChatInterface* this, uint32_t arg2, class StringInfo const* arg3, class StringInfo const* arg4, uint32_t arg5)

004f4640  {
004f4640      uint32_t eax_7 = arg5;
004f4640      
004f4652      if (eax_7 == this->m_eWindowID)
004f4652      {
004f467c      label_4f467c:
004f467c          
004f467c          if (this->m_chatLog->m_glyphList.m_glyphList._num_elements > 0)
004f467c          {
004f4687              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg5, &data_79c288);
004f469a              UIElement_Text::AppendTextWithFont(this->m_chatLog, &arg5, 0, arg2);
004f46a3              int32_t* edi_2 = (arg5 - 0x14);
004f46a3              
004f46b6              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004f46be                  **(uint32_t**)edi_2(1);
004f467c          }
004f467c          
004f46d3          int32_t ebx;
004f46d3          ebx = UIElement_Text::IsAtVerticalEnd(this->m_chatLog);
004f46d3          
004f46dc          if (StringInfo::IsValid(arg4, 1) != 0)
004f46e9              UIElement_Text::AppendStringInfoWithFont(this->m_chatLog, arg4, 0, 0xc);
004f46e9          
004f46fc          UIElement_Text::AppendStringInfoWithFont(this->m_chatLog, arg3, 0, arg2);
004f4701          int32_t m_chatLog_1 = this->m_chatLog;
004f4701          
004f4711          if (*(uint32_t*)(m_chatLog_1 + 0x61c) > 0x2710)
004f4711          {
004f4713              int32_t var_14_4 = 0x1d4c;
004f471a              m_chatLog_1 = ChatInterface::TruncateChatLog(this, m_chatLog_1);
004f4711          }
004f4711          
004f4723          if (ebx != 0)
004f4723          {
004f4725              class UIElement_Text* m_chatLog = this->m_chatLog;
004f4731              uint32_t __saved_ebx_2 = m_chatLog->m_glyphList.m_glyphList._num_elements;
004f4732              UIElement_Text::ScrollToPosition(m_chatLog, m_chatLog_1);
004f4739              return;
004f4723          }
004f4723          
004f473c          this->m_chatNewNonVisibleTextIndicator->vtable->SetState(1);
004f4652      }
004f4652      else if ((eax_7 == 0 && ChatInterface::TypeIsActive(this, arg2) != 0))
004f4666          goto label_4f467c;
004f4640  }

004f4751                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004f4760  void __fastcall ChatInterface::SetReplyTextInChatBox(class ChatInterface* this)

004f4760  {
004f478c      void* __return_1;
004f478c      int32_t ebx;
004f478c      ebx = gmCCommunicationSystem::GetLastTellerName(&__return_1)->m_charbuffer->m_data[-4] == 1;
004f478f      int32_t* esi_1 = ((char*)__return_1 - 0x14);
004f478f      
004f479e      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004f47a6          **(uint32_t**)esi_1(1);
004f47a6      
004f47aa      if (ebx == 0)
004f47aa      {
004f47bb          class PStringBase<unsigned short> __return;
004f47bb          int32_t ecx_3 = UIElement_Text::GetText(this->m_chatEntry, &__return);
004f47c0          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = PStringBase<unsigned short>::whitespace_string.m_charbuffer;
004f47cc          int32_t var_38_3 = ecx_3;
004f47d7          InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
004f47e1          PStringBase<unsigned short>::trim(&__return, 1, 0, m_charbuffer_1);
004f47e6          class PStringBase<unsigned short> __return_3 = __return;
004f47ea          int32_t ecx_5 = *(uint32_t*)(__return_3 - 4);
004f47ef          class PStringBase<unsigned short> __return_6 = ((__return_3 + (ecx_5 << 1)) - 2);
004f47ef          
004f47f3          if (ecx_5 > 0)
004f47f5              __return_6 = __return_3;
004f47f5          
004f47fb          class PStringBase<unsigned short> __return_5;
004f47fb          
004f47fb          if (*(uint16_t*)__return_6 != 0x2f)
004f47fb          {
004f47ff              __return_5 = ((__return_3 + (ecx_5 << 1)) - 2);
004f47ff              
004f4803              if (ecx_5 > 0)
004f4805                  __return_5 = __return_3;
004f47fb          }
004f47fb          
004f480b          if ((*(uint16_t*)__return_6 == 0x2f || *(uint16_t*)__return_5 == 0x40))
004f480b          {
004f4847              class PStringBase<unsigned short>* eax_7 = PStringBase<unsigned short>::substring(&__return, &__return_1, 1, *(uint32_t*)(__return_3 - 4));
004f484e              class PStringBase<unsigned short> __return_4 = __return;
004f484e              
004f4854              if (__return_4 != eax_7->m_charbuffer)
004f4854              {
004f4865                  if ((InterlockedDecrement((__return_4 - 0x10)) == 0 && __return_4 != 0x14))
004f486d                      **(uint32_t**)(__return_4 - 0x14)(1);
004f486d                  
004f486f                  class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = eax_7->m_charbuffer;
004f4871                  __return = m_charbuffer_2;
004f4879                  InterlockedIncrement(&m_charbuffer_2->m_data[-8]);
004f4854              }
004f4854              
004f487f              int32_t* esi_5 = ((char*)__return_1 - 0x14);
004f487f              
004f488e              if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
004f4896                  **(uint32_t**)esi_5(1);
004f4896              
004f48a7              int32_t var_10 = 0x79449c;
004f48af              class PStringBase<unsigned short>* var_4_1 = &__return;
004f48b3              int32_t var_c_1 = 0;
004f48b7              int32_t var_8_1 = 0;
004f48bb              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, &data_7c4c70);
004f48df              class PStringBase<unsigned short> __return_2;
004f48df              int32_t eax_13 = _wcsicmp(PStringBase<unsigned short>::substring(&__return, &__return_2, 0, 1)->m_charbuffer, __return_1);
004f48ea              char ebx_4 = ((int8_t)-(eax_13));
004f48ee              int32_t* esi_7 = (__return_2 - 0x14);
004f48ee              
004f48ff              if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
004f4907                  **(uint32_t**)esi_7(1);
004f4907              
004f490d              void* esi_9 = ((char*)__return_1 - 0x14);
004f490d              
004f491c              if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
004f4924                  **(uint32_t**)esi_9(1);
004f4924              
004f4928              if ((ebx_4 - ebx_4) != 0xff)
004f4928              {
004f4937                  if (*(uint32_t*)var_10() >= 1)
004f494c                      int32_t var_8_3 = 1;
004f4937                  else
004f4943                      int32_t var_8_2 = *(uint32_t*)var_10();
004f4943                  
004f4937                  goto label_4f4a89;
004f4928              }
004f4928              
004f4962              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, &data_7c4c68);
004f4981              int32_t eax_23 = _wcsicmp(PStringBase<unsigned short>::substring(&__return, &__return_2, 0, 2)->m_charbuffer, __return_1);
004f498c              char ebx_6 = ((int8_t)-(eax_23));
004f4990              int32_t* esi_11 = (__return_2 - 0x14);
004f4990              
004f49a1              if ((InterlockedDecrement(&esi_11[1]) == 0 && esi_11 != 0))
004f49a9                  **(uint32_t**)esi_11(1);
004f49a9              
004f49af              void* esi_13 = ((char*)__return_1 - 0x14);
004f49af              
004f49be              if ((InterlockedDecrement(((char*)esi_13 + 4)) == 0 && esi_13 != 0))
004f49c6                  **(uint32_t**)esi_13(1);
004f49c6              
004f49ca              if ((ebx_6 - ebx_6) != 0xff)
004f49ca              {
004f49d9                  if (*(uint32_t*)var_10() >= 2)
004f49ee                      int32_t var_8_5 = 2;
004f49d9                  else
004f49e5                      int32_t var_8_4 = *(uint32_t*)var_10();
004f49e5                  
004f49d9                  goto label_4f4a89;
004f49ca              }
004f49ca              
004f4a04              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, u"reply ");
004f4a23              int32_t eax_32 = _wcsicmp(PStringBase<unsigned short>::substring(&__return, &__return_2, 0, 5)->m_charbuffer, __return_1);
004f4a2e              char ebx_8 = ((int8_t)-(eax_32));
004f4a32              void* esi_15 = (__return_2 - 0x14);
004f4a32              
004f4a43              if ((InterlockedDecrement(((char*)esi_15 + 4)) == 0 && esi_15 != 0))
004f4a4b                  **(uint32_t**)esi_15(1);
004f4a4b              
004f4a51              void* esi_17 = ((char*)__return_1 - 0x14);
004f4a51              
004f4a60              if ((InterlockedDecrement(((char*)esi_17 + 4)) == 0 && esi_17 != 0))
004f4a68                  **(uint32_t**)esi_17(1);
004f4a68              
004f4a6c              if ((ebx_8 - ebx_8) == 0xff)
004f4a6c              {
004f4b4f                  var_10 = 0x794478;
004f4b57                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
004f4a6c              }
004f4a6c              else
004f4a6c              {
004f4a78                  PStringBaseIter_Common<unsigned short>::SetMark(&var_10, 5);
004f4a89              label_4f4a89:
004f4a89                  class PSRefBufferCharData<char>* m_charbuffer = gmCCommunicationSystem::GetLastTellerName(&__return_2)->m_charbuffer;
004f4a96                  void* var_20;
004f4a96                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, Formatted, u"@tell %hs,");
004f4a9f                  int32_t* esi_19 = (__return_2 - 0x14);
004f4a9f                  
004f4ab1                  if ((InterlockedDecrement(&esi_19[1]) == 0 && esi_19 != 0))
004f4ab9                      **(uint32_t**)esi_19(1);
004f4ab9                  
004f4acb                  if (PStringBaseIter<unsigned short>::Replace(&var_10, &var_20) != 0)
004f4acb                  {
004f4adc                      UIElement_Text::SetText(this->m_chatEntry, &__return);
004f4aef                      UIElement_Text::MoveCursorToPosition(this->m_chatEntry, *(uint32_t*)((char*)var_20 - 4));
004f4afa                      UIElement_Text::ClearSelection(this->m_chatEntry);
004f4acb                  }
004f4acb                  
004f4b03                  void* esi_22 = ((char*)var_20 - 0x14);
004f4b03                  
004f4b12                  if ((InterlockedDecrement(((char*)esi_22 + 4)) == 0 && esi_22 != 0))
004f4b1a                      **(uint32_t**)esi_22(1);
004f4b1a                  
004f4b20                  int32_t* esi_24 = (__return - 0x14);
004f4b27                  var_10 = 0x794478;
004f4b27                  
004f4b37                  if ((InterlockedDecrement(&esi_24[1]) == 0 && esi_24 != 0))
004f4b37                  {
004f4b3f                      **(uint32_t**)esi_24(1);
004f4b41                      int32_t eax_43;
004f4b41                      eax_43 = 0;
004f4b4a                      return;
004f4b37                  }
004f4a6c              }
004f480b          }
004f480b          else if ((InterlockedDecrement((__return_3 - 0x10)) == 0 && __return_3 != 0x14))
004f4820          {
004f482c              **(uint32_t**)(__return_3 - 0x14)(1);
004f482e              int32_t eax_5;
004f482e              eax_5 = 0;
004f4837              return;
004f4820          }
004f47aa      }
004f47aa      
004f4b5f      int32_t eax_1;
004f4b5f      eax_1 = 0;
004f4760  }

004f4b66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f4b70  void __fastcall ChatInterface::SetMonarchReplyTextInChatBox(class ChatInterface* this)

004f4b70  {
004f4b89      int32_t* __return_1;
004f4b89      uint32_t m_len = gmCCommunicationSystem::GetLastAtMonarchUserName(&__return_1)->m_buffer->m_len;
004f4b8c      int32_t* __return_3 = __return_1;
004f4b9c      int32_t ebx;
004f4b9c      ebx = m_len == 1;
004f4b9c      
004f4bad      if ((InterlockedDecrement(&__return_3[1]) == 0 && __return_3 != 0))
004f4bb5          **(uint32_t**)__return_3(1);
004f4bb5      
004f4bb9      if (ebx == 0)
004f4bb9      {
004f4bd5          void* __return;
004f4bd5          int32_t var_38_3 = UIElement_Text::GetText(this->m_chatEntry, &__return);
004f4bd6          class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<unsigned short>::whitespace_string.m_charbuffer;
004f4be6          InterlockedIncrement(((char*)m_charbuffer - 0x10));
004f4bf0          PStringBase<unsigned short>::trim(&__return, 1, 0, m_charbuffer);
004f4bf5          void* __return_4 = __return;
004f4bf9          int32_t ecx_5 = *(uint32_t*)((char*)__return_4 - 4);
004f4bfe          void* __return_8 = (((char*)__return_4 + (ecx_5 << 1)) - 2);
004f4bfe          
004f4c02          if (ecx_5 > 0)
004f4c04              __return_8 = __return_4;
004f4c04          
004f4c0a          void* __return_7;
004f4c0a          
004f4c0a          if (*(uint16_t*)__return_8 != 0x2f)
004f4c0a          {
004f4c0e              __return_7 = (((char*)__return_4 + (ecx_5 << 1)) - 2);
004f4c0e              
004f4c12              if (ecx_5 > 0)
004f4c14                  __return_7 = __return_4;
004f4c0a          }
004f4c0a          
004f4c1a          void* esi_1;
004f4c1a          bool cond:2_1;
004f4c1a          
004f4c1a          if ((*(uint16_t*)__return_8 == 0x2f || *(uint16_t*)__return_7 == 0x40))
004f4c1a          {
004f4c43              class PStringBase<unsigned short>* eax_5 = PStringBase<unsigned short>::substring(&__return, &__return_1, 1, *(uint32_t*)((char*)__return_4 - 4));
004f4c4a              void* __return_5 = __return;
004f4c4a              
004f4c50              if (__return_5 != eax_5->m_charbuffer)
004f4c50              {
004f4c61                  if ((InterlockedDecrement(((char*)__return_5 - 0x10)) == 0 && __return_5 != 0x14))
004f4c69                      **(uint32_t**)((char*)__return_5 - 0x14)(1);
004f4c69                  
004f4c6b                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax_5->m_charbuffer;
004f4c6d                  __return = m_charbuffer_1;
004f4c75                  InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
004f4c50              }
004f4c50              
004f4c7b              int32_t* esi_4 = &__return_1[-5];
004f4c7b              
004f4c8a              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004f4c92                  **(uint32_t**)esi_4(1);
004f4c92              
004f4ca3              int32_t var_10 = 0x79449c;
004f4cab              void** var_4_1 = &__return;
004f4caf              int32_t var_c_1 = 0;
004f4cb3              int32_t var_8_1 = 0;
004f4cb7              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, &data_7c4c78);
004f4cd5              class PStringBase<unsigned short> __return_2;
004f4cd5              int32_t eax_11 = _wcsicmp(PStringBase<unsigned short>::substring(&__return, &__return_2, 0, 2)->m_charbuffer, __return_1);
004f4ce4              char ebx_4 = ((int8_t)-(eax_11));
004f4ce8              int32_t* esi_6 = (__return_2 - 0x14);
004f4ce8              
004f4cf9              if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004f4d01                  **(uint32_t**)esi_6(1);
004f4d01              
004f4d07              void* esi_8 = &__return_1[-5];
004f4d07              
004f4d16              if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
004f4d1e                  **(uint32_t**)esi_8(1);
004f4d1e              
004f4d22              if ((ebx_4 - ebx_4) != 0xff)
004f4d22              {
004f4d35                  if (*(uint32_t*)var_10() >= 2)
004f4d47                      int32_t var_8_3 = 2;
004f4d35                  else
004f4d41                      int32_t var_8_2 = *(uint32_t*)var_10();
004f4d41                  
004f4d5e                  char (* var_3c_3)[0x1] = &gmCCommunicationSystem::GetLastAtMonarchUserName(&__return_2)->m_buffer->m_data;
004f4d6a                  void* var_20;
004f4d6a                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, Formatted, u"@tell %hs,");
004f4d6f                  class PStringBase<unsigned short> __return_6 = __return_2;
004f4d6f                  
004f4d82                  if ((InterlockedDecrement((__return_6 + 4)) == 0 && __return_6 != 0))
004f4d8a                      **(uint32_t**)__return_6(1);
004f4d8a                  
004f4d9c                  if (PStringBaseIter<unsigned short>::Replace(&var_10, &var_20) != 0)
004f4d9c                  {
004f4dad                      UIElement_Text::SetText(this->m_chatEntry, &__return);
004f4dc0                      UIElement_Text::MoveCursorToPosition(this->m_chatEntry, *(uint32_t*)((char*)var_20 - 4));
004f4dcb                      UIElement_Text::ClearSelection(this->m_chatEntry);
004f4d9c                  }
004f4d9c                  
004f4dd4                  void* esi_11 = ((char*)var_20 - 0x14);
004f4dd4                  
004f4de3                  if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
004f4deb                      **(uint32_t**)esi_11(1);
004f4d22              }
004f4d22              
004f4df1              esi_1 = ((char*)__return - 0x14);
004f4df8              var_10 = 0x794478;
004f4df8              
004f4e04              if (InterlockedDecrement(((char*)esi_1 + 4)) == 0)
004f4e04              {
004f4e06                  cond:2_1 = esi_1 == 0;
004f4e06                  goto label_4f4e08;
004f4e04              }
004f4c1a          }
004f4c1a          else
004f4c1a          {
004f4c1c              esi_1 = ((char*)__return_4 - 0x14);
004f4c1c              
004f4c27              if (InterlockedDecrement(((char*)esi_1 + 4)) == 0)
004f4c27              {
004f4c2d                  cond:2_1 = esi_1 == 0;
004f4e08              label_4f4e08:
004f4e08                  
004f4e08                  if (!(cond:2_1))
004f4e10                      **(uint32_t**)esi_1(1);
004f4c27              }
004f4c1a          }
004f4bb9      }
004f4bb9      
004f4e15      int32_t eax_2;
004f4e15      eax_2 = 0;
004f4b70  }

004f4e1c                                                                                      90 90 90 90                              ....

004f4e20  void __fastcall ChatInterface::SetPatronReplyTextInChatBox(class ChatInterface* this)

004f4e20  {
004f4e39      int32_t* __return_1;
004f4e39      uint32_t m_len = gmCCommunicationSystem::GetLastAtPatronUserName(&__return_1)->m_buffer->m_len;
004f4e3c      int32_t* __return_3 = __return_1;
004f4e4c      int32_t ebx;
004f4e4c      ebx = m_len == 1;
004f4e4c      
004f4e5d      if ((InterlockedDecrement(&__return_3[1]) == 0 && __return_3 != 0))
004f4e65          **(uint32_t**)__return_3(1);
004f4e65      
004f4e69      if (ebx == 0)
004f4e69      {
004f4e85          void* __return;
004f4e85          int32_t var_38_3 = UIElement_Text::GetText(this->m_chatEntry, &__return);
004f4e86          class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<unsigned short>::whitespace_string.m_charbuffer;
004f4e96          InterlockedIncrement(((char*)m_charbuffer - 0x10));
004f4ea0          PStringBase<unsigned short>::trim(&__return, 1, 0, m_charbuffer);
004f4ea5          void* __return_4 = __return;
004f4ea9          int32_t ecx_5 = *(uint32_t*)((char*)__return_4 - 4);
004f4eae          void* __return_8 = (((char*)__return_4 + (ecx_5 << 1)) - 2);
004f4eae          
004f4eb2          if (ecx_5 > 0)
004f4eb4              __return_8 = __return_4;
004f4eb4          
004f4eba          void* __return_7;
004f4eba          
004f4eba          if (*(uint16_t*)__return_8 != 0x2f)
004f4eba          {
004f4ebe              __return_7 = (((char*)__return_4 + (ecx_5 << 1)) - 2);
004f4ebe              
004f4ec2              if (ecx_5 > 0)
004f4ec4                  __return_7 = __return_4;
004f4eba          }
004f4eba          
004f4eca          void* esi_1;
004f4eca          bool cond:2_1;
004f4eca          
004f4eca          if ((*(uint16_t*)__return_8 == 0x2f || *(uint16_t*)__return_7 == 0x40))
004f4eca          {
004f4ef3              class PStringBase<unsigned short>* eax_5 = PStringBase<unsigned short>::substring(&__return, &__return_1, 1, *(uint32_t*)((char*)__return_4 - 4));
004f4efa              void* __return_5 = __return;
004f4efa              
004f4f00              if (__return_5 != eax_5->m_charbuffer)
004f4f00              {
004f4f11                  if ((InterlockedDecrement(((char*)__return_5 - 0x10)) == 0 && __return_5 != 0x14))
004f4f19                      **(uint32_t**)((char*)__return_5 - 0x14)(1);
004f4f19                  
004f4f1b                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax_5->m_charbuffer;
004f4f1d                  __return = m_charbuffer_1;
004f4f25                  InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
004f4f00              }
004f4f00              
004f4f2b              int32_t* esi_4 = &__return_1[-5];
004f4f2b              
004f4f3a              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004f4f42                  **(uint32_t**)esi_4(1);
004f4f42              
004f4f53              int32_t var_10 = 0x79449c;
004f4f5b              void** var_4_1 = &__return;
004f4f5f              int32_t var_c_1 = 0;
004f4f63              int32_t var_8_1 = 0;
004f4f67              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, &data_7c4c80);
004f4f85              class PStringBase<unsigned short> __return_2;
004f4f85              int32_t eax_11 = _wcsicmp(PStringBase<unsigned short>::substring(&__return, &__return_2, 0, 2)->m_charbuffer, __return_1);
004f4f94              char ebx_4 = ((int8_t)-(eax_11));
004f4f98              int32_t* esi_6 = (__return_2 - 0x14);
004f4f98              
004f4fa9              if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004f4fb1                  **(uint32_t**)esi_6(1);
004f4fb1              
004f4fb7              void* esi_8 = &__return_1[-5];
004f4fb7              
004f4fc6              if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
004f4fce                  **(uint32_t**)esi_8(1);
004f4fce              
004f4fd2              if ((ebx_4 - ebx_4) != 0xff)
004f4fd2              {
004f4fe5                  if (*(uint32_t*)var_10() >= 2)
004f4ff7                      int32_t var_8_3 = 2;
004f4fe5                  else
004f4ff1                      int32_t var_8_2 = *(uint32_t*)var_10();
004f4ff1                  
004f500e                  char (* var_3c_3)[0x1] = &gmCCommunicationSystem::GetLastAtPatronUserName(&__return_2)->m_buffer->m_data;
004f501a                  void* var_20;
004f501a                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, Formatted, u"@tell %hs,");
004f501f                  class PStringBase<unsigned short> __return_6 = __return_2;
004f501f                  
004f5032                  if ((InterlockedDecrement((__return_6 + 4)) == 0 && __return_6 != 0))
004f503a                      **(uint32_t**)__return_6(1);
004f503a                  
004f504c                  if (PStringBaseIter<unsigned short>::Replace(&var_10, &var_20) != 0)
004f504c                  {
004f505d                      UIElement_Text::SetText(this->m_chatEntry, &__return);
004f5070                      UIElement_Text::MoveCursorToPosition(this->m_chatEntry, *(uint32_t*)((char*)var_20 - 4));
004f507b                      UIElement_Text::ClearSelection(this->m_chatEntry);
004f504c                  }
004f504c                  
004f5084                  void* esi_11 = ((char*)var_20 - 0x14);
004f5084                  
004f5093                  if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
004f509b                      **(uint32_t**)esi_11(1);
004f4fd2              }
004f4fd2              
004f50a1              esi_1 = ((char*)__return - 0x14);
004f50a8              var_10 = 0x794478;
004f50a8              
004f50b4              if (InterlockedDecrement(((char*)esi_1 + 4)) == 0)
004f50b4              {
004f50b6                  cond:2_1 = esi_1 == 0;
004f50b6                  goto label_4f50b8;
004f50b4              }
004f4eca          }
004f4eca          else
004f4eca          {
004f4ecc              esi_1 = ((char*)__return_4 - 0x14);
004f4ecc              
004f4ed7              if (InterlockedDecrement(((char*)esi_1 + 4)) == 0)
004f4ed7              {
004f4edd                  cond:2_1 = esi_1 == 0;
004f50b8              label_4f50b8:
004f50b8                  
004f50b8                  if (!(cond:2_1))
004f50c0                      **(uint32_t**)esi_1(1);
004f4ed7              }
004f4eca          }
004f4e69      }
004f4e69      
004f50c5      int32_t eax_2;
004f50c5      eax_2 = 0;
004f4e20  }

004f50cc                                      90 90 90 90                                                              ....

004f50d0  void __fastcall ChatInterface::HandleTextReplacements(class ChatInterface* this)

004f50d0  {
004f50db      if (this->m_chatEntry != 0)
004f50db      {
004f50dd          char eax_1;
004f50dd          int80_t st0_1;
004f50dd          st0_1 = ChatInterface::SetReplyTextInChatBox(this);
004f50dd          
004f50e4          if (eax_1 == 0)
004f50e4          {
004f50e8              char eax_2;
004f50e8              int80_t st0_2;
004f50e8              st0_2 = ChatInterface::SetMonarchReplyTextInChatBox(this);
004f50e8              
004f50ef              if (eax_2 == 0)
004f50f4                  /* tailcall */
004f50f4                  return ChatInterface::SetPatronReplyTextInChatBox(this);
004f50e4          }
004f50db      }
004f50d0  }

004f50fb                                                                                   90 90 90 90 90                             .....

004f5100  void __fastcall ChatInterface::ProcessCommand(class ChatInterface* this)

004f5100  {
004f5100      class ChatInterface* __return = this;
004f5104      class UIElement_Text* m_chatEntry = this->m_chatEntry;
004f5104      
004f510c      if (m_chatEntry != 0)
004f510c      {
004f5117          class PStringBase<unsigned short>* edx_1 = UIElement_Text::GetPreParsedText(m_chatEntry, &__return);
004f511c          class ChatInterface* __return_1 = __return;
004f5124          int32_t eax_1;
004f5124          void* __offset(ChatInterface, -0x14) esi_1;
004f5124          
004f5124          if (__return_1->vtable != 1)
004f5124          {
004f5135              class ClientCommunicationSystem* m_pCCS = this->m_pCCS;
004f5135              
004f513d              if (m_pCCS != 0)
004f513d              {
004f5145                  uint32_t __saved_edi_3 = this->m_eWindowID;
004f514b                  ClientCommunicationSystem::OnChatCommand(m_pCCS, edx_1, &__return);
004f513d              }
004f513d              
004f515e              SmartArray<PStringBase<unsigned short>,1>::AddToEnd(&this->m_InputHistory, &__return);
004f5163              bool cond:0_1 = this->m_InputHistory.m_num <= 0x64;
004f516a              this->m_LastInputHistoryPos = 0xffffffff;
004f516a              
004f5174              if (!(cond:0_1))
004f5174              {
004f5186                  do
004f517a                      SmartArray<PStringBase<unsigned short>,1>::RemoveOrderedByIndex(&this->m_InputHistory, 0);
004f5186                   while (this->m_InputHistory.m_num > 0x64);
004f5174              }
004f5174              
004f518e              UIElement_Text::ClearAllText(this->m_chatEntry);
004f5197              esi_1 = ((char*)__return - 0x14);
004f519e              eax_1 = InterlockedDecrement(((char*)esi_1 + 4));
004f5124          }
004f5124          else
004f5124          {
004f5126              esi_1 = ((char*)__return_1 - 0x14);
004f512d              eax_1 = InterlockedDecrement(((char*)esi_1 + 4));
004f5124          }
004f5124          
004f51ab          if ((eax_1 == 0 && esi_1 != 0))
004f51b3              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004f510c      }
004f5100  }

004f51b8                                                                          90 90 90 90 90 90 90 90                          ........

004f51c0  enum UIElementMessageListenResult __thiscall ChatInterface::ListenToElementMessage(class ChatInterface* this, struct UIElementMessageInfo const* arg2)

004f51c0  {
004f51dc      switch ((arg2->idMessage - 1))
004f51dc      {
004f51e3          case nullptr:
004f51e3          {
004f51e3              uint32_t idElement = arg2->idElement;
004f51e3              
004f51ea              if (idElement == 0x10000019)
004f51ea              {
004f522d                  ChatInterface::ProcessCommand(((char*)this - 4));
004f523c                  return UIElement::ListenToElementMessage(this, arg2);
004f51ea              }
004f51ea              
004f51f1              if (idElement == 0x1000048c)
004f51f1              {
004f51f7                  class UIElement_Text* m_chatEntry = this->m_chatEntry;
004f51f7                  
004f51ff                  if (m_chatEntry != 0)
004f51ff                  {
004f5201                      int32_t _num_elements = m_chatEntry->m_glyphList.m_glyphList._num_elements;
004f5207                      int32_t _num_elements_1 = _num_elements;
004f5208                      UIElement_Text::ScrollToPosition(m_chatEntry, _num_elements);
004f520d                      this->m_chatLog->vtable->SetState(0xd);
004f51ff                  }
004f51f1              }
004f51e3              break;
004f51e3          }
004f524f          case 0x11:
004f524f          {
004f524f              if ((arg2->pElement == this->m_fCurrentOpacity && arg2->dwParam1 == 0x20))
004f5254                  ChatInterface::HandleTextReplacements(((char*)this - 4));
004f524f              break;
004f524f          }
004f5275          case 0x1a:
004f5275          case 0x1e:
004f5275          {
004f5275              UIListener::RegisterForGlobalMessage(this, 3);
004f5275              break;
004f5275          }
004f526f          case 0x28:
004f526f          case 0x29:
004f526f          case 0x2e:
004f526f          {
004f526f              if (arg2->pElement == this->m_fCurrentOpacity)
004f5275                  UIListener::RegisterForGlobalMessage(this, 3);
004f526f              break;
004f526f          }
004f51dc      }
004f51dc      
004f5284      return UIElement::ListenToElementMessage(this, arg2);
004f51c0  }

004f5287                       90                                                                                 .
004f5288  uint32_t jump_table_4f5288[0x5] = 
004f5288  {
004f5288      [0x0] =  0x004f51e3
004f528c      [0x1] =  0x004f523f
004f5290      [0x2] =  0x004f5271
004f5294      [0x3] =  0x004f5266
004f5298      [0x4] =  0x004f527a
004f529c  }
004f529c  uint8_t lookup_table_4f529c[0x2f] = 
004f529c  {
004f529c      [0x00] =  0x00
004f529d      [0x01] =  0x04
004f529e      [0x02] =  0x04
004f529f      [0x03] =  0x04
004f52a0      [0x04] =  0x04
004f52a1      [0x05] =  0x04
004f52a2      [0x06] =  0x04
004f52a3      [0x07] =  0x04
004f52a4      [0x08] =  0x04
004f52a5      [0x09] =  0x04
004f52a6      [0x0a] =  0x04
004f52a7      [0x0b] =  0x04
004f52a8      [0x0c] =  0x04
004f52a9      [0x0d] =  0x04
004f52aa      [0x0e] =  0x04
004f52ab      [0x0f] =  0x04
004f52ac      [0x10] =  0x04
004f52ad      [0x11] =  0x01
004f52ae      [0x12] =  0x04
004f52af      [0x13] =  0x04
004f52b0      [0x14] =  0x04
004f52b1      [0x15] =  0x04
004f52b2      [0x16] =  0x04
004f52b3      [0x17] =  0x04
004f52b4      [0x18] =  0x04
004f52b5      [0x19] =  0x04
004f52b6      [0x1a] =  0x02
004f52b7      [0x1b] =  0x04
004f52b8      [0x1c] =  0x04
004f52b9      [0x1d] =  0x04
004f52ba      [0x1e] =  0x02
004f52bb      [0x1f] =  0x04
004f52bc      [0x20] =  0x04
004f52bd      [0x21] =  0x04
004f52be      [0x22] =  0x04
004f52bf      [0x23] =  0x04
004f52c0      [0x24] =  0x04
004f52c1      [0x25] =  0x04
004f52c2      [0x26] =  0x04
004f52c3      [0x27] =  0x04
004f52c4      [0x28] =  0x03
004f52c5      [0x29] =  0x03
004f52c6      [0x2a] =  0x04
004f52c7      [0x2b] =  0x04
004f52c8      [0x2c] =  0x04
004f52c9      [0x2d] =  0x04
004f52ca      [0x2e] =  0x03
004f52cb  }

004f52cb                                   90 90 90 90 90                                                             .....

004f52d0  void __fastcall ChatInterface::HandleEnterKey(class ChatInterface* this)

004f52d0  {
004f52d7      class UIElement* m_activeElement = UIElementManager::s_pInstance->m_activeElement;
004f52d7      
004f52e1      if (((m_activeElement != 0 && m_activeElement == UIElement::GetRootElement(&this->vtable)) && UIElement::GetFocusDescendant(m_activeElement) == this->m_chatEntry))
004f52e1      {
004f530d          if (PlayerModule::StayInChatMode(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0)
004f530d          {
004f530f              this->m_chatEntry->vtable->RelinquishFocus();
004f531d              this->m_chatEntry->vtable->Deactivate();
004f532d              CM_UI::SendNotice_ToggleChatEntry(0);
004f530d          }
004f530d          
004f5339          /* tailcall */
004f5339          return ChatInterface::ProcessCommand(this);
004f52e1      }
004f52d0  }

004f5341     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004f5350  void __thiscall ChatInterface::HandleReplyKey(class ChatInterface* this, uint32_t arg2)

004f5350  {
004f5359      class ChatInterface* this_1 = this;
004f5360      void var_120;
004f5360      StringInfo::StringInfo(&var_120);
004f5371      StringInfo::SetStringIDandTableEnum(&var_120, 0, 6);
004f537d      void var_90;
004f537d      StringInfo::StringInfo(&var_90);
004f5392      StringInfo::SetStringIDandTableEnum(&var_90, 0, 6);
004f53a9      StringInfo::AddVariable_StringInfo(&var_120, 0, &var_90);
004f53ae      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f53be      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f53c2      int32_t ecx_6 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f53d6      void* var_150_6;
004f53d6      int32_t* __return_3;
004f53d6      
004f53d6      if (arg2 == 0x10000020)
004f53d6      {
004f549a          class PStringBase<unsigned short> var_134;
004f549a          int32_t* __return_2;
004f549a          class PStringBase<unsigned short>* eax_14;
004f549a          eax_14 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_134, WidthConvert, &gmCCommunicationSystem::GetLastAtMonarchUserName(&__return_2)->m_buffer->m_data);
004f54a4          PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, eax_14);
004f54ad          int32_t* esi_6 = (var_134 - 0x14);
004f54ad          
004f54bc          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004f54c4              **(uint32_t**)esi_6(1);
004f54c4          
004f54c6          __return_3 = __return_2;
004f54cd      label_4f54cd:
004f54cd          var_150_6 = &__return_3[1];
004f54ce      label_4f54ce:
004f54ce          int32_t eax_17;
004f54ce          eax_17 = InterlockedDecrement(var_150_6);
004f54ce          
004f54d6          if ((eax_17 == 0 && __return_3 != 0))
004f54de              ecx_6 = **(uint32_t**)__return_3(1);
004f54de          
004f54e0          PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer_2;
004f53d6      }
004f53d6      else
004f53d6      {
004f53dd          if (arg2 == 0x10000021)
004f53dd          {
004f544f              int32_t* __return;
004f544f              class PStringBase<unsigned short> var_124;
004f544f              class PStringBase<unsigned short>* eax_10;
004f544f              eax_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_124, WidthConvert, &gmCCommunicationSystem::GetLastAtPatronUserName(&__return)->m_buffer->m_data);
004f5459              PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, eax_10);
004f5462              int32_t* esi_4 = (var_124 - 0x14);
004f5462              
004f5471              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004f5479                  **(uint32_t**)esi_4(1);
004f5479              
004f547b              __return_3 = __return;
004f547f              goto label_4f54cd;
004f53dd          }
004f53dd          
004f53e0          if (arg2 == 0x10000022)
004f53e0          {
004f53eb              void* __return_1;
004f53eb              class PStringBase<char>* eax_4;
004f53eb              enum _WidthConvert edx_1;
004f53eb              eax_4 = gmCCommunicationSystem::GetLastTellerName(&__return_1);
004f53f3              class PStringBase<char>* var_150_3 = eax_4;
004f5404              void* var_128;
004f5404              PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::PStringBase<unsigned short>(&var_128, edx_1, nullptr));
004f540d              int32_t* esi_1 = ((char*)var_128 - 0x14);
004f540d              
004f541c              if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
004f5424                  **(uint32_t**)esi_1(1);
004f5424              
004f542a              __return_3 = ((char*)__return_1 - 0x14);
004f5430              var_150_6 = &__return_3[1];
004f5431              goto label_4f54ce;
004f53e0          }
004f53d6      }
004f53d6      
004f54e8      if (PStringBase<unsigned short>::s_NullBuffer_1->m_data[0x7ffffffffffffffe] != 1)
004f54e8      {
004f54ea          int32_t var_150_15 = ecx_6;
004f54f3          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f5500          StringInfo::AddVariable_String(&var_120, 0, PStringBase<unsigned short>::s_NullBuffer_1);
004f5500          
004f551c          if ((StringInfo::IsValid(&var_120, 1) != 0 && this_1->m_chatEntry != 0))
004f551c          {
004f5520              ChatInterface::ActivateChatEntry(this_1);
004f5530              UIElement_Text::SetStringInfo(this_1->m_chatEntry, &var_120);
004f553b              UIElement_Text::Deselect(this_1->m_chatEntry);
004f5546              UIElement_Text::MoveCursorToEnd(this_1->m_chatEntry);
004f551c          }
004f54e8      }
004f54e8      
004f555a      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
004f5562          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
004f5562      
004f556b      StringInfo::~StringInfo(&var_90);
004f5574      StringInfo::~StringInfo(&var_120);
004f5350  }

004f5586                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f5590  uint8_t __thiscall ChatInterface::OnChildAction(class ChatInterface* this, class UIElement const* arg2, class InputEvent const* arg3)

004f5590  {
004f55aa      if ((arg3->m_fStart != 0 && arg2 == this->m_fCurrentOpacity))
004f55aa      {
004f55b2          int32_t edx_2 = (arg3->m_InputAction - 0x1c);
004f55b2          
004f55be          switch (edx_2)
004f55be          {
004f55d9              case 0:
004f55d9              {
004f55d9                  int32_t var_8 = 0;
004f55db                  UIElement_Text::ScrollToPosition(this->m_chatEntry, edx_2);
004f55e0                  int32_t eax_1;
004f55e0                  eax_1 = 1;
004f55e3                  return 1;
004f55d9                  break;
004f55d9              }
004f55e6              case 1:
004f55e6              {
004f55e6                  class UIElement_Text* m_chatEntry = this->m_chatEntry;
004f55f2                  uint32_t _num_elements = m_chatEntry->m_glyphList.m_glyphList._num_elements;
004f55f3                  UIElement_Text::ScrollToPosition(m_chatEntry, edx_2);
004f55f8                  int32_t eax_3;
004f55f8                  eax_3 = 1;
004f55fb                  return 1;
004f55e6                  break;
004f55e6              }
004f5629              case 2:
004f5629              {
004f5629                  ChatInterface::SelectCommandFromHistory(((char*)this - 4), 1);
004f562e                  int32_t eax_6;
004f562e                  eax_6 = 1;
004f5631                  return 1;
004f5629                  break;
004f5629              }
004f5639              case 3:
004f5639              {
004f5639                  ChatInterface::SelectCommandFromHistory(((char*)this - 4), 0);
004f563e                  int32_t eax_7;
004f563e                  eax_7 = 1;
004f5641                  return 1;
004f5639                  break;
004f5639              }
004f5606              case 4:
004f5606              {
004f5606                  UIElement_Text::ScrollPage(this->m_chatEntry, 1);
004f560b                  int32_t eax_4;
004f560b                  eax_4 = 1;
004f560e                  return 1;
004f5606                  break;
004f5606              }
004f5619              case 5:
004f5619              {
004f5619                  UIElement_Text::ScrollPage(this->m_chatEntry, 0);
004f561e                  int32_t eax_5;
004f561e                  eax_5 = 1;
004f5621                  return 1;
004f5619                  break;
004f5619              }
004f55c8              case 9:
004f55c8              {
004f55c8                  ChatInterface::HandleEnterKey(((char*)this - 4));
004f55cd                  int32_t eax;
004f55cd                  eax = 1;
004f55d0                  return 1;
004f55c8                  break;
004f55c8              }
004f5647              case 0xb:
004f5647              {
004f5647                  ChatInterface::DeactivateChatEntry(((char*)this - 4));
004f564c                  int32_t eax_8;
004f564c                  eax_8 = 1;
004f564f                  return 1;
004f5647                  break;
004f5647              }
004f55be          }
004f55aa      }
004f55aa      
004f565a      return UIElement::OnChildAction(this, arg2, arg3);
004f5590  }

004f565d                                                                                         8d 49 00                               .I.
004f5660  uint32_t jump_table_4f5660[0xc] = 
004f5660  {
004f5660      [0x0] =  0x004f55d3
004f5664      [0x1] =  0x004f55e6
004f5668      [0x2] =  0x004f5624
004f566c      [0x3] =  0x004f5634
004f5670      [0x4] =  0x004f55fe
004f5674      [0x5] =  0x004f5611
004f5678      [0x6] =  0x004f5652
004f567c      [0x7] =  0x004f5652
004f5680      [0x8] =  0x004f5652
004f5684      [0x9] =  0x004f55c5
004f5688      [0xa] =  0x004f5652
004f568c      [0xb] =  0x004f5644
004f5690  }

004f5690  uint8_t __thiscall ChatInterface::OnAction(class ChatInterface* this, class InputEvent const* arg2)

004f5690  {
004f5690      class InputEvent* edx = arg2;
004f5694      uint32_t m_InputAction = edx->m_InputAction;
004f5694      
004f56a5      if ((m_InputAction - 0x10000020) <= 0xf9)
004f56a5          switch (m_InputAction)
004f56a5          {
004f572b              case 0x10000020:
004f572b              case 0x10000021:
004f572b              case 0x10000022:
004f572b              {
004f572b                  int32_t eax_4;
004f572b                  int80_t st0_1;
004f572b                  eax_4 = ChatInterface::HandleReplyKey(((char*)this - 4), m_InputAction);
004f5730                  eax_4 = 1;
004f5733                  return 1;
004f572b                  break;
004f572b              }
004f56d7              case 0x10000023:
004f56d7              {
004f56d7                  ChatInterface::ActivateChatEntry(((char*)this - 4));
004f56e2                  UIElement_Text::SelectAll(this->m_fCurrentOpacity);
004f56e7                  int32_t eax_2;
004f56e7                  eax_2 = 1;
004f56ea                  return 1;
004f56d7                  break;
004f56d7              }
004f56c2              case 0x10000024:
004f56c2              {
004f56c2                  return ChatInterface::OnToggleChatEntry(((char*)this - 4));
004f56c2                  break;
004f56c2              }
004f56c9              case 0x10000028:
004f56c9              {
004f56c9                  int32_t eax_1;
004f56c9                  int80_t st0;
004f56c9                  eax_1 = ChatInterface::HandleCommandOrAliasKey(((char*)this - 4), m_InputAction);
004f56ce                  eax_1 = 1;
004f56d1                  return 1;
004f56c9                  break;
004f56c9              }
004f56ed              case 0x10000119:
004f56ed              {
004f56ed                  uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
004f56ed                  
004f56fe                  if ((ACCWeenieObject::selectedID_1 >= 0x50000001 && ACCWeenieObject::selectedID_1 <= 0x6fffffff))
004f56fe                  {
004f5710                      CM_UI::SendNotice_StartTell(ACCWeenieObject::GetObjectNameWide(&arg2, ACCWeenieObject::selectedID_1, NAME_APPROPRIATE, 0));
004f571c                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
004f56fe                  }
004f56fe                  
004f5721                  ACCWeenieObject::selectedID_1 = 1;
004f5724                  return 1;
004f56ed                  break;
004f56ed              }
004f56a5          }
004f56a5      
004f573f      return UIElement::OnAction(this, edx);
004f5690  }

004f5742        8b ff                                                                                        ..
004f5744  uint32_t jump_table_4f5744[0x6] = 
004f5744  {
004f5744      [0x0] =  0x004f5727
004f5748      [0x1] =  0x004f56d4
004f574c      [0x2] =  0x004f56b9
004f5750      [0x3] =  0x004f56c5
004f5754      [0x4] =  0x004f56ed
004f5758      [0x5] =  0x004f5736
004f575c  }
004f575c  uint8_t lookup_table_4f575c[0xfa] = 
004f575c  {
004f575c      [0x00] =  0x00
004f575d      [0x01] =  0x00
004f575e      [0x02] =  0x00
004f575f      [0x03] =  0x01
004f5760      [0x04] =  0x02
004f5761      [0x05] =  0x05
004f5762      [0x06] =  0x05
004f5763      [0x07] =  0x05
004f5764      [0x08] =  0x03
004f5765      [0x09] =  0x05
004f5766      [0x0a] =  0x05
004f5767      [0x0b] =  0x05
004f5768      [0x0c] =  0x05
004f5769      [0x0d] =  0x05
004f576a      [0x0e] =  0x05
004f576b      [0x0f] =  0x05
004f576c      [0x10] =  0x05
004f576d      [0x11] =  0x05
004f576e      [0x12] =  0x05
004f576f      [0x13] =  0x05
004f5770      [0x14] =  0x05
004f5771      [0x15] =  0x05
004f5772      [0x16] =  0x05
004f5773      [0x17] =  0x05
004f5774      [0x18] =  0x05
004f5775      [0x19] =  0x05
004f5776      [0x1a] =  0x05
004f5777      [0x1b] =  0x05
004f5778      [0x1c] =  0x05
004f5779      [0x1d] =  0x05
004f577a      [0x1e] =  0x05
004f577b      [0x1f] =  0x05
004f577c      [0x20] =  0x05
004f577d      [0x21] =  0x05
004f577e      [0x22] =  0x05
004f577f      [0x23] =  0x05
004f5780      [0x24] =  0x05
004f5781      [0x25] =  0x05
004f5782      [0x26] =  0x05
004f5783      [0x27] =  0x05
004f5784      [0x28] =  0x05
004f5785      [0x29] =  0x05
004f5786      [0x2a] =  0x05
004f5787      [0x2b] =  0x05
004f5788      [0x2c] =  0x05
004f5789      [0x2d] =  0x05
004f578a      [0x2e] =  0x05
004f578b      [0x2f] =  0x05
004f578c      [0x30] =  0x05
004f578d      [0x31] =  0x05
004f578e      [0x32] =  0x05
004f578f      [0x33] =  0x05
004f5790      [0x34] =  0x05
004f5791      [0x35] =  0x05
004f5792      [0x36] =  0x05
004f5793      [0x37] =  0x05
004f5794      [0x38] =  0x05
004f5795      [0x39] =  0x05
004f5796      [0x3a] =  0x05
004f5797      [0x3b] =  0x05
004f5798      [0x3c] =  0x05
004f5799      [0x3d] =  0x05
004f579a      [0x3e] =  0x05
004f579b      [0x3f] =  0x05
004f579c      [0x40] =  0x05
004f579d      [0x41] =  0x05
004f579e      [0x42] =  0x05
004f579f      [0x43] =  0x05
004f57a0      [0x44] =  0x05
004f57a1      [0x45] =  0x05
004f57a2      [0x46] =  0x05
004f57a3      [0x47] =  0x05
004f57a4      [0x48] =  0x05
004f57a5      [0x49] =  0x05
004f57a6      [0x4a] =  0x05
004f57a7      [0x4b] =  0x05
004f57a8      [0x4c] =  0x05
004f57a9      [0x4d] =  0x05
004f57aa      [0x4e] =  0x05
004f57ab      [0x4f] =  0x05
004f57ac      [0x50] =  0x05
004f57ad      [0x51] =  0x05
004f57ae      [0x52] =  0x05
004f57af      [0x53] =  0x05
004f57b0      [0x54] =  0x05
004f57b1      [0x55] =  0x05
004f57b2      [0x56] =  0x05
004f57b3      [0x57] =  0x05
004f57b4      [0x58] =  0x05
004f57b5      [0x59] =  0x05
004f57b6      [0x5a] =  0x05
004f57b7      [0x5b] =  0x05
004f57b8      [0x5c] =  0x05
004f57b9      [0x5d] =  0x05
004f57ba      [0x5e] =  0x05
004f57bb      [0x5f] =  0x05
004f57bc      [0x60] =  0x05
004f57bd      [0x61] =  0x05
004f57be      [0x62] =  0x05
004f57bf      [0x63] =  0x05
004f57c0      [0x64] =  0x05
004f57c1      [0x65] =  0x05
004f57c2      [0x66] =  0x05
004f57c3      [0x67] =  0x05
004f57c4      [0x68] =  0x05
004f57c5      [0x69] =  0x05
004f57c6      [0x6a] =  0x05
004f57c7      [0x6b] =  0x05
004f57c8      [0x6c] =  0x05
004f57c9      [0x6d] =  0x05
004f57ca      [0x6e] =  0x05
004f57cb      [0x6f] =  0x05
004f57cc      [0x70] =  0x05
004f57cd      [0x71] =  0x05
004f57ce      [0x72] =  0x05
004f57cf      [0x73] =  0x05
004f57d0      [0x74] =  0x05
004f57d1      [0x75] =  0x05
004f57d2      [0x76] =  0x05
004f57d3      [0x77] =  0x05
004f57d4      [0x78] =  0x05
004f57d5      [0x79] =  0x05
004f57d6      [0x7a] =  0x05
004f57d7      [0x7b] =  0x05
004f57d8      [0x7c] =  0x05
004f57d9      [0x7d] =  0x05
004f57da      [0x7e] =  0x05
004f57db      [0x7f] =  0x05
004f57dc      [0x80] =  0x05
004f57dd      [0x81] =  0x05
004f57de      [0x82] =  0x05
004f57df      [0x83] =  0x05
004f57e0      [0x84] =  0x05
004f57e1      [0x85] =  0x05
004f57e2      [0x86] =  0x05
004f57e3      [0x87] =  0x05
004f57e4      [0x88] =  0x05
004f57e5      [0x89] =  0x05
004f57e6      [0x8a] =  0x05
004f57e7      [0x8b] =  0x05
004f57e8      [0x8c] =  0x05
004f57e9      [0x8d] =  0x05
004f57ea      [0x8e] =  0x05
004f57eb      [0x8f] =  0x05
004f57ec      [0x90] =  0x05
004f57ed      [0x91] =  0x05
004f57ee      [0x92] =  0x05
004f57ef      [0x93] =  0x05
004f57f0      [0x94] =  0x05
004f57f1      [0x95] =  0x05
004f57f2      [0x96] =  0x05
004f57f3      [0x97] =  0x05
004f57f4      [0x98] =  0x05
004f57f5      [0x99] =  0x05
004f57f6      [0x9a] =  0x05
004f57f7      [0x9b] =  0x05
004f57f8      [0x9c] =  0x05
004f57f9      [0x9d] =  0x05
004f57fa      [0x9e] =  0x05
004f57fb      [0x9f] =  0x05
004f57fc      [0xa0] =  0x05
004f57fd      [0xa1] =  0x05
004f57fe      [0xa2] =  0x05
004f57ff      [0xa3] =  0x05
004f5800      [0xa4] =  0x05
004f5801      [0xa5] =  0x05
004f5802      [0xa6] =  0x05
004f5803      [0xa7] =  0x05
004f5804      [0xa8] =  0x05
004f5805      [0xa9] =  0x05
004f5806      [0xaa] =  0x05
004f5807      [0xab] =  0x05
004f5808      [0xac] =  0x05
004f5809      [0xad] =  0x05
004f580a      [0xae] =  0x05
004f580b      [0xaf] =  0x05
004f580c      [0xb0] =  0x05
004f580d      [0xb1] =  0x05
004f580e      [0xb2] =  0x05
004f580f      [0xb3] =  0x05
004f5810      [0xb4] =  0x05
004f5811      [0xb5] =  0x05
004f5812      [0xb6] =  0x05
004f5813      [0xb7] =  0x05
004f5814      [0xb8] =  0x05
004f5815      [0xb9] =  0x05
004f5816      [0xba] =  0x05
004f5817      [0xbb] =  0x05
004f5818      [0xbc] =  0x05
004f5819      [0xbd] =  0x05
004f581a      [0xbe] =  0x05
004f581b      [0xbf] =  0x05
004f581c      [0xc0] =  0x05
004f581d      [0xc1] =  0x05
004f581e      [0xc2] =  0x05
004f581f      [0xc3] =  0x05
004f5820      [0xc4] =  0x05
004f5821      [0xc5] =  0x05
004f5822      [0xc6] =  0x05
004f5823      [0xc7] =  0x05
004f5824      [0xc8] =  0x05
004f5825      [0xc9] =  0x05
004f5826      [0xca] =  0x05
004f5827      [0xcb] =  0x05
004f5828      [0xcc] =  0x05
004f5829      [0xcd] =  0x05
004f582a      [0xce] =  0x05
004f582b      [0xcf] =  0x05
004f582c      [0xd0] =  0x05
004f582d      [0xd1] =  0x05
004f582e      [0xd2] =  0x05
004f582f      [0xd3] =  0x05
004f5830      [0xd4] =  0x05
004f5831      [0xd5] =  0x05
004f5832      [0xd6] =  0x05
004f5833      [0xd7] =  0x05
004f5834      [0xd8] =  0x05
004f5835      [0xd9] =  0x05
004f5836      [0xda] =  0x05
004f5837      [0xdb] =  0x05
004f5838      [0xdc] =  0x05
004f5839      [0xdd] =  0x05
004f583a      [0xde] =  0x05
004f583b      [0xdf] =  0x05
004f583c      [0xe0] =  0x05
004f583d      [0xe1] =  0x05
004f583e      [0xe2] =  0x05
004f583f      [0xe3] =  0x05
004f5840      [0xe4] =  0x05
004f5841      [0xe5] =  0x05
004f5842      [0xe6] =  0x05
004f5843      [0xe7] =  0x05
004f5844      [0xe8] =  0x05
004f5845      [0xe9] =  0x05
004f5846      [0xea] =  0x05
004f5847      [0xeb] =  0x05
004f5848      [0xec] =  0x05
004f5849      [0xed] =  0x05
004f584a      [0xee] =  0x05
004f584b      [0xef] =  0x05
004f584c      [0xf0] =  0x05
004f584d      [0xf1] =  0x05
004f584e      [0xf2] =  0x05
004f584f      [0xf3] =  0x05
004f5850      [0xf4] =  0x05
004f5851      [0xf5] =  0x05
004f5852      [0xf6] =  0x05
004f5853      [0xf7] =  0x05
004f5854      [0xf8] =  0x05
004f5855      [0xf9] =  0x04
004f5856  }

004f5856                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004f5860  void NoticeHandler::RecvNotice_DisplayWeenieError(class NoticeHandler* this @ ecx, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3) __pure

004f5860  {
004f5860      return;
004f5860  }

004f5863           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004f5870  void __thiscall gmCombatPanelUI::RecvNotice_SetCombatMode(class gmCombatPanelUI* this, enum COMBAT_MODE arg2)

004f5870  {
004f5875      if (arg2 == NONCOMBAT_COMBAT_MODE)
004f5877          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = nullptr;
004f5870  }

004f5881     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004f5890  enum UIElementMessageListenResult __thiscall gmCombatPanelUI::ListenToElementMessage(class gmCombatPanelUI* this, struct UIElementMessageInfo const* arg2)

004f5890  {
004f589c      if (arg2->idMessage == 0x18)
004f589c      {
004f589f          uint32_t m_num = this->m_childrenInfoArray.m_num;
004f58a5          int32_t edx_1 = 0;
004f58a5          
004f58a9          if (m_num > 0)
004f58a9          {
004f58ab              struct gmCombatPanelUI::PanelChildInfo* m_data = this->m_childrenInfoArray.m_data;
004f58ab              
004f58b1              while (true)
004f58b1              {
004f58b1                  class UIElement* child = m_data->child;
004f58b1                  
004f58ba                  if ((child != 0 && child == arg2->pElement))
004f58ba                  {
004f58e7                      CM_UI::SendNotice_SetPanelVisibility(m_data->panelID, (((int8_t)(m_data->child->__bitfield164 >> 1)) & 1));
004f58ec                      break;
004f58ba                  }
004f58ba                  
004f58bc                  edx_1 += 1;
004f58bd                  m_data = &m_data[1];
004f58bd                  
004f58c2                  if (edx_1 >= m_num)
004f58cf                      return UIElement::ListenToElementMessage(this, arg2);
004f58b1              }
004f58a9          }
004f589c      }
004f589c      
004f58fa      return UIElement::ListenToElementMessage(this, arg2);
004f5890  }

004f58fd                                                                                         90 90 90                               ...

004f5900  void __thiscall gmCombatPanelUI::RecvNotice_SetPanelVisibility(class gmCombatPanelUI* this, uint32_t arg2, uint8_t arg3)

004f5900  {
004f5906      int32_t __saved_esi;
004f5906      int32_t* esp = &__saved_esi;
004f5906      
004f5909      if (arg2 != 0)
004f5909      {
004f5912          int32_t ecx = 0;
004f5912          
004f5916          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] > 0)
004f5916          {
004f591c              struct HashSet<UIElement *>::VTable* vtable = this->m_hashElementsRegisteredWith.vtable;
004f5920              int32_t __saved_edi;
004f5920              int32_t* esp_1 = &__saved_edi;
004f5920              
004f5929              while ((vtable->__vecDelDtor == 0 || *(int32_t*)((char*)vtable + 4) != arg2))
004f5929              {
004f592e                  ecx += 1;
004f592f                  vtable = &vtable[3];
004f592f                  
004f5934                  if (ecx >= this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0])
004f5939                      return;
004f5929              }
004f5929              
004f593c              void* (__thiscall* __vecDelDtor)(class HashSet<UIElement *>* this, uint32_t) = vtable->__vecDelDtor;
004f5940              int32_t ebx;
004f5940              ebx = *(int32_t*)((char*)vtable + 8);
004f5940              
004f5943              if (__vecDelDtor != 0)
004f5943              {
004f5949                  vtable = arg3;
004f594f                  class HashSetData<UIElement *>* ecx_1 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004f5952                  uint32_t* var_10;
004f5952                  
004f5952                  if (vtable == 0)
004f5952                  {
004f59c1                      var_10 = nullptr;
004f59c1                      esp_1 = &var_10;
004f59c1                      
004f59c3                      if (ecx_1 == __vecDelDtor)
004f59c3                      {
004f59c5                          ecx_1->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3]();
004f59c5                          
004f59d0                          if (this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] == this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2])
004f59d2                              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = nullptr;
004f59d2                          
004f59d9                          class HashSetData<UIElement *>* ecx_5 = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2];
004f59d9                          
004f59de                          if (ecx_5 != 0)
004f59de                          {
004f59e0                              this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = ecx_5;
004f59e3                              ecx_5->m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](1);
004f59ed                              return;
004f59de                          }
004f59de                          
004f59f0                          int32_t eax_7 = *(int32_t*)((char*)this + -0x5f8);
004f59fe                          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = nullptr;
004f5a05                          *(uint32_t*)(eax_7 + 0x18)(0);
004f5a0b                          return;
004f59c3                      }
004f59c3                      
004f5a12                      *(uint32_t*)(*(uint32_t*)__vecDelDtor + 0x18)();
004f5952                  }
004f5952                  else
004f5952                  {
004f5956                      class UIElement* m_hashKey;
004f5956                      
004f5956                      if (ecx_1 == __vecDelDtor)
004f5997                          m_hashKey = ecx_1->m_hashKey;
004f5956                      else
004f5956                      {
004f595a                          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] = __vecDelDtor;
004f595a                          
004f5969                          if ((ecx_1 != 0 && (((int8_t)(*(int32_t*)((char*)ecx_1 + 0xa4) >> 1)) & 1) != 0))
004f5969                          {
004f596f                              var_10 = &arg3;
004f5975                              arg3 = 0;
004f597d                              UIElement::GetAttribute_Enum(ecx_1, 0x10000029, var_10);
004f5982                              uint32_t eax_4 = arg3;
004f5986                              var_10 = nullptr;
004f5989                              CM_UI::SendNotice_SetPanelVisibility(eax_4, var_10);
004f5969                          }
004f5969                          
004f5991                          m_hashKey = *(uint32_t*)__vecDelDtor;
004f5956                      }
004f5956                      
004f5999                      var_10 = 1;
004f599b                      m_hashKey->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[3](var_10);
004f599e                      int32_t eax_5 = *(int32_t*)((char*)this + -0x5f8);
004f59aa                      var_10 = 1;
004f59ac                      *(uint32_t*)(eax_5 + 0x18)(var_10);
004f59ac                      esp_1 = &__saved_edi;
004f59ac                      
004f59b1                      if (ebx != 0)
004f59b1                      {
004f59b8                          this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[2] = this->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1];
004f59bc                          return;
004f59b1                      }
004f5952                  }
004f5943              }
004f5943              
004f5a15              *(uint32_t*)esp_1;
004f5a15              esp_1[1];
004f5a16              esp = &esp_1[2];
004f5916          }
004f5909      }
004f5909      
004f5a17      *(uint32_t*)esp;
004f5900  }

004f5a1b                                                                                   90 90 90 90 90                             .....

004f5a20  void __fastcall SmartArray<Vector3,1>::Reset(class SmartArray<Vector3,1>* this)

004f5a20  {
004f5a26      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004f5a3a      this->m_num = 0;
004f5a3a      
004f5a3d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f5a3d      {
004f5a42          operator delete[](this->m_data);
004f5a4a          this->m_data = 0;
004f5a4c          this->m_sizeAndDeallocate = 0;
004f5a54          return;
004f5a3d      }
004f5a3d      
004f5a57      if (this->m_data != 0)
004f5a57      {
004f5a59          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
004f5a59          
004f5a61          if ((i_2 - 1) >= 0)
004f5a61          {
004f5a73              int32_t eax_2 = ((i_2 - 1) * 0xc);
004f5a77              int32_t i_1 = i_2;
004f5a89              int32_t i;
004f5a89              
004f5a89              do
004f5a89              {
004f5a7a                  void* ebp_2 = (this->m_data + eax_2);
004f5a7c                  int32_t var_c;
004f5a7c                  *(uint32_t*)ebp_2 = var_c;
004f5a7f                  int32_t var_8;
004f5a7f                  *(uint32_t*)((char*)ebp_2 + 4) = var_8;
004f5a82                  eax_2 -= 0xc;
004f5a85                  i = i_1;
004f5a85                  i_1 -= 1;
004f5a86                  int32_t var_4;
004f5a86                  *(uint32_t*)((char*)ebp_2 + 8) = var_4;
004f5a89              } while (i != 1);
004f5a61          }
004f5a57      }
004f5a20  }

004f5a93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004f5aa0  void __thiscall gmCombatPanelUI::gmCombatPanelUI(class gmCombatPanelUI* this, class LayoutDesc const* arg2, class ElementDesc const* arg3)

004f5aa0  {
004f5aaf      UIElement_Field::UIElement_Field(this, arg2, arg3);
004f5ab4      this->vtable = &gmUrgentAssistanceUI::`vftable';
004f5ac0      this->vtable = 0x7c5110;
004f5ac6      this->vtable = &gmCombatPanelUI::`vftable';
004f5ad0      __builtin_memset(&this->m_childrenInfoArray, 0, 0x14);
004f5aa0  }

004f5af4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f5b00  class UIElement* __thiscall gmCombatPanelUI::DynamicCast(class gmCombatPanelUI* this, uint32_t arg2) __pure

004f5b00  {
004f5b0c      if (arg2 == 0x10000055)
004f5b19          return this;
004f5b19      
004f5b13      int32_t edx_1;
004f5b13      edx_1 = arg2 != 3;
004f5b17      return (this & (edx_1 - 1));
004f5b00  }

004f5b1c                                                                                      90 90 90 90                              ....

004f5b20  uint32_t gmCombatPanelUI::GetUIElementType(class gmCombatPanelUI const* this @ ecx) __pure

004f5b20  {
004f5b25      return 0x10000055;
004f5b20  }

004f5b26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f5b30  void __fastcall gmCombatPanelUI::~gmCombatPanelUI(class gmCombatPanelUI* this)

004f5b30  {
004f5b43      this->vtable = 0x7c5110;
004f5b3b      this->vtable = &gmCombatPanelUI::`vftable';
004f5b4f      SmartArray<Vector3,1>::Reset(&this->m_childrenInfoArray);
004f5b54      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
004f5b54      
004f5b5b      if (eax != 0)
004f5b5d          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
004f5b5d      
004f5b72      if ((this->m_childrenInfoArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f5b77          operator delete[](this->m_childrenInfoArray.m_data);
004f5b77      
004f5b3b      this->vtable = &gmUrgentAssistanceUI::`vftable';
004f5b87      NoticeHandler::~NoticeHandler(&this->vtable);
004f5b91      /* tailcall */
004f5b91      return UIElement_Field::~UIElement_Field(this);
004f5b30  }

004f5b96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004f5ba0  uint8_t __thiscall SmartArray<gmCombatPanelUI::PanelChildInfo,1>::AddToEnd(class SmartArray<gmCombatPanelUI::PanelChildInfo,1>* this, struct gmCombatPanelUI::PanelChildInfo const* arg2)

004f5ba0  {
004f5ba9      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
004f5ba9      
004f5bb0      if (this->m_num >= eax_1)
004f5bb0      {
004f5bbe          uint8_t result = SmartArray<RenderMeshFragmentTopology::TopTriangleType,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
004f5bbe          
004f5bc5          if (result == 0)
004f5bc8              return result;
004f5bb0      }
004f5bb0      
004f5bd3      void* edx = &this->m_data[this->m_num];
004f5bdc      *(uint32_t*)edx = arg2->child;
004f5be1      *(uint32_t*)((char*)edx + 4) = arg2->panelID;
004f5be7      *(uint32_t*)((char*)edx + 8) = arg2->bShouldBeDefault*(int32_t*)((char*)arg2 + 8);
004f5bea      this->m_num += 1;
004f5bed      int32_t eax_7;
004f5bed      eax_7 = 1;
004f5bf0      return 1;
004f5ba0  }

004f5bf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004f5c00  void* __thiscall gmCombatPanelUI::`scalar deleting destructor'(class gmCombatPanelUI* this, uint32_t arg2)

004f5c00  {
004f5c03      gmCombatPanelUI::~gmCombatPanelUI(this);
004f5c03      
004f5c0d      if ((arg2 & 1) != 0)
004f5c10          operator delete(this);
004f5c10      
004f5c1b      return this;
004f5c00  }

004f5c1e                                                                                            90 90                                ..

004f5c20  void __fastcall gmCombatPanelUI::SetupChildren(class gmCombatPanelUI* this)

004f5c20  {
004f5c2d      class UIElement* eax = UIElement::GetChildRecursive(this, 0x1000005c);
004f5c3e      class UIElement* var_c = eax;
004f5c42      void var_8;
004f5c42      UIElement::GetAttribute_Enum(eax, 0x10000029, &var_8);
004f5c54      char var_4 = 0;
004f5c59      SmartArray<gmCombatPanelUI::PanelChildInfo,1>::AddToEnd(&this->m_childrenInfoArray, &var_c);
004f5c65      class UIElement* eax_1 = UIElement::GetChildRecursive(this, 0x10000061);
004f5c76      var_c = eax_1;
004f5c7a      UIElement::GetAttribute_Enum(eax_1, 0x10000029, &var_8);
004f5c86      char var_4_1 = 0;
004f5c8b      SmartArray<gmCombatPanelUI::PanelChildInfo,1>::AddToEnd(&this->m_childrenInfoArray, &var_c);
004f5c96      int32_t i = 0;
004f5c96      
004f5c9a      if (this->m_childrenInfoArray.m_num > 0)
004f5c9a      {
004f5c9d          int32_t ebx_1 = 0;
004f5c9d          
004f5cbc          do
004f5cbc          {
004f5cad              *(uint32_t*)(**(uint32_t**)(this->m_childrenInfoArray.m_data + ebx_1) + 0x18)(0);
004f5cb6              i += 1;
004f5cb7              ebx_1 += 0xc;
004f5cbc          } while (i < this->m_childrenInfoArray.m_num);
004f5c9a      }
004f5c20  }

004f5cc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f5cd0  void __fastcall gmCombatPanelUI::PostInit(class gmCombatPanelUI* this)

004f5cd0  {
004f5cd3      UIElement::PostInit(this);
004f5cdb      /* tailcall */
004f5cdb      return gmCombatPanelUI::SetupChildren(this);
004f5cd0  }


004f5ce0  void __thiscall VividTargetIndicator::SetSelected(class VividTargetIndicator* this, uint32_t arg2)

004f5ce0  {
004f5ce0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004f5cee      uint32_t player_id;
004f5cee      
004f5cee      if (SmartBox::smartbox_1 == 0)
004f5cf8          player_id = 0;
004f5cee      else
004f5cf0          player_id = SmartBox::smartbox_1->player_id;
004f5cf0      
004f5cfa      uint32_t esi = arg2;
004f5cfa      
004f5d00      if (player_id == esi)
004f5d02          esi = 0;
004f5d02      
004f5d0b      class ACCWeenieObject* ebx = ClientObjMaintSystem::GetWeenieObject(esi);
004f5d12      int32_t eax_1;
004f5d12      
004f5d12      if (ebx != 0)
004f5d16          eax_1 = ACCWeenieObject::IsOwnedByPlayer(ebx);
004f5d16      
004f5d23      if (((ebx == 0 || eax_1 != 0) || ebx->current_state == IN_CONTAINER))
004f5d23      {
004f5d25          esi = 0;
004f5d27          ebx = nullptr;
004f5d23      }
004f5d23      
004f5d29      uint32_t m_idSelectedTarget = this->m_idSelectedTarget;
004f5d29      
004f5d2e      if (esi != m_idSelectedTarget)
004f5d2e      {
004f5d31          m_idSelectedTarget = ClientObjMaintSystem::GetWeenieObject(m_idSelectedTarget);
004f5d31          
004f5d3b          if (m_idSelectedTarget != 0)
004f5d43              *(uint32_t*)(*(uint32_t*)(m_idSelectedTarget + 0xc) + 0xc)(this);
004f5d43          
004f5d48          this->m_idSelectedTarget = esi;
004f5d48          
004f5d4b          if (ebx != 0)
004f5d4d              ebx->vtable->RegisterNoticeHandler(0x4dd245, this);
004f5d2e      }
004f5d2e      
004f5d5c      class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
004f5d5c      
004f5d65      if (SmartBox::smartbox_2 != 0)
004f5d68          SmartBox::SetTargetObjectID(SmartBox::smartbox_2, esi);
004f5d68      
004f5d6d      m_idSelectedTarget = this->m_bDisplayOn;
004f5d6d      
004f5d72      if (m_idSelectedTarget != 0)
004f5d72      {
004f5d76          if (esi == 0)
004f5d76          {
004f5d78              this->m_pOnScreen->vtable->SetVisible(esi);
004f5d81              this->m_pOffScreen->vtable->SetVisible(esi);
004f5d91              return;
004f5d76          }
004f5d76          
004f5d9a          void __return;
004f5d9a          class RGBAColor* eax_4 = gmRadarUI::GetBlipColor(&__return, esi);
004f5da4          this->m_clrSelectedObjectColor.r = eax_4->r;
004f5da4          this->m_clrSelectedObjectColor.g = eax_4->g;
004f5da4          this->m_clrSelectedObjectColor.b = eax_4->b;
004f5da4          this->m_clrSelectedObjectColor.a = eax_4->a;
004f5d72      }
004f5ce0  }

004f5dc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004f5dd0  class Graphic* __thiscall VividTargetIndicator::CopyImage(class VividTargetIndicator* this, class RenderSurface* arg2, class RGBAColor const* arg3)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004f5dd0  {
004f5dd0      class VividTargetIndicator* width = this;
004f5dd7      struct RenderDevice::VTable* vtable = RenderDevice::render_device->vtable;
004f5dd9      int32_t ebx;
004f5dd9      int32_t var_8 = ebx;
004f5dda      int32_t esi;
004f5dda      int32_t var_c = esi;
004f5dda      int32_t* esp = &var_c;
004f5ddd      int32_t* eax = vtable->CreateLocalSurface();
004f5ddd      
004f5de4      if (eax != 0)
004f5de4      {
004f5dea          int32_t ebp;
004f5dea          int32_t var_10_1 = ebp;
004f5deb          int32_t ebp_1 = *(uint32_t*)eax;
004f5ded          int32_t edi;
004f5ded          int32_t var_14_1 = edi;
004f5df8          uint32_t height = arg2->height;
004f5dfe          width = arg2->width;
004f5e0e          enum PixelFormatID eax_1 = RenderDevice::GetUISurfaceFormat(RenderDevice::render_device);
004f5e0e          
004f5e25          if (*(uint32_t*)(ebp_1 + 0x58)(width, height, eax_1, 1) != 0)
004f5e25          {
004f5e3a              switch ((s_BlitMethod - 1))
004f5e3a              {
004f5e57                  case 0:
004f5e57                  {
004f5e57                      SurfaceWindow::Blit(&eax[0x2b], &arg2->window, Blit_Normal, 1f);
004f5e67                      SurfaceWindow::Color(&eax[0x2b], nullptr, Blit_Multiply, arg_10);
004f5e57                      break;
004f5e57                  }
004f5e87                  case 1:
004f5e87                  {
004f5e87                      SurfaceWindow::Blit(&eax[0x2b], &arg2->window, Blit_Normal, 1f);
004f5e97                      SurfaceWindow::Color(&eax[0x2b], nullptr, Blit_Colorize, arg_10);
004f5e87                      break;
004f5e87                  }
004f5eb4                  case 2:
004f5eb4                  {
004f5eb4                      SurfaceWindow::Blit(&eax[0x2b], &arg2->window, Blit_Normal, 1f);
004f5ec4                      SurfaceWindow::Color(&eax[0x2b], nullptr, Blit_Screen, arg_10);
004f5eb4                      break;
004f5eb4                  }
004f5eed                  case 3:
004f5eed                  {
004f5eed                      SurfaceWindow::BlitAndColor(&eax[0x2b], &arg2->window, Blit_Normal, 1f, nullptr, Blit_Colorize, RGBAColor::GetColor32(arg_10));
004f5eed                      break;
004f5eed                  }
004f5e3a              }
004f5e3a              
004f5ef4              void* eax_8 = operator new(0xc);
004f5ef4              
004f5efe              if (eax_8 != 0)
004f5efe              {
004f5f03                  int32_t result = Graphic::Graphic(eax_8, eax);
004f5f0e                  *(uint32_t*)(*(uint32_t*)eax + 0x14)();
004f5f18                  return result;
004f5efe              }
004f5e25          }
004f5e25          
004f5f21          *(uint32_t*)(*(uint32_t*)eax + 0x14)();
004f5f25          esp = &width;
004f5de4      }
004f5de4      
004f5f26      *(uint32_t*)esp;
004f5f26      esp[1];
004f5f26      esp[2];
004f5f2b      return 0;
004f5dd0  }

004f5f2e                                            8b ff                                                                ..
004f5f30  uint32_t jump_table_4f5f30[0x4] = 
004f5f30  {
004f5f30      [0x0] =  0x004f5e41
004f5f34      [0x1] =  0x004f5e71
004f5f38      [0x2] =  0x004f5e9e
004f5f3c      [0x3] =  0x004f5ecb
004f5f40  }

004f5f40  void __fastcall VividTargetIndicator::RecvNotice_ServerSaysMoveItem(class VividTargetIndicator* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

004f5f40  {
004f5f46      VividTargetIndicator::SetSelected(this, ACCWeenieObject::selectedID);
004f5f40  }

004f5f4e                                            90 90                                                                ..

004f5f50  void __fastcall SmartArray<unsigned long,1>::Reset(class SmartArray<unsigned long,1>* this)

004f5f50  {
004f5f53      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004f5f64      this->m_num = 0;
004f5f64      
004f5f6b      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f5f6b      {
004f5f70          operator delete[](this->m_data);
004f5f78          this->m_data = 0;
004f5f7e          this->m_sizeAndDeallocate = 0;
004f5f86          return;
004f5f6b      }
004f5f6b      
004f5f8a      if (this->m_data != 0)
004f5f8a      {
004f5f8c          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
004f5f91          int32_t eax_1 = (eax - 1);
004f5f91          
004f5f92          if ((eax - 1) >= 0)
004f5f92          {
004f5f9f              int32_t temp1_1;
004f5f9f              
004f5f9f              do
004f5f9f              {
004f5f94                  temp1_1 = eax_1;
004f5f94                  eax_1 -= 1;
004f5f95                  this->m_data[(eax_1 + 1)] = 0;
004f5f9f              } while ((temp1_1 - 1) >= 0);
004f5f92          }
004f5f8a      }
004f5f50  }

004f5fa3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004f5fb0  void __fastcall VividTargetIndicator::UpdateDisplayState(class VividTargetIndicator* this)

004f5fb0  {
004f5fbb      uint8_t eax_1 = PlayerModule::VividTargetingIndicator(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
004f5fc0      struct PlayerModule::VTable** ecx;
004f5fc0      ecx = this->m_bEnabled;
004f5fc5      this->m_bDisplayOn = eax_1;
004f5fc5      
004f5fcc      if ((ecx != 0 && eax_1 != 0))
004f5fcc      {
004f5fd4          VividTargetIndicator::SetSelected(this, this->m_idSelectedTarget);
004f5fda          return;
004f5fcc      }
004f5fcc      
004f5fdb      this->m_pOnScreen->vtable->SetVisible(0);
004f5fe5      this->m_pOffScreen->vtable->SetVisible(0);
004f5fb0  }

004f5ff1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004f6000  void __fastcall VividTargetIndicator::RecvNotice_PlayerDescReceived(class VividTargetIndicator* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

004f6000  {
004f600b      uint8_t eax_1 = PlayerModule::VividTargetingIndicator(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
004f6010      struct PlayerModule::VTable** ecx;
004f6010      ecx = this->m_bEnabled;
004f6015      this->m_bDisplayOn = eax_1;
004f6015      
004f601c      if ((ecx != 0 && eax_1 != 0))
004f601c      {
004f6024          VividTargetIndicator::SetSelected(this, this->m_idSelectedTarget);
004f602a          return;
004f601c      }
004f601c      
004f602d      this->m_pOnScreen->vtable->SetVisible(0);
004f6037      this->m_pOffScreen->vtable->SetVisible(0);
004f6000  }

004f6045                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004f6050  void __thiscall VividTargetIndicator::RecvNotice_PlayerOptionChanged(class VividTargetIndicator* this, enum PlayerOption arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004f6050  {
004f6058      if (arg2 == VividTargetingIndicator_PlayerOption)
004f6058      {
004f6062          uint8_t eax_2 = PlayerModule::VividTargetingIndicator(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
004f6067          struct PlayerModule::VTable** ecx;
004f6067          ecx = this->m_bEnabled;
004f606c          this->m_bDisplayOn = eax_2;
004f606c          
004f6073          if ((ecx == 0 || eax_2 == 0))
004f6073          {
004f6084              this->m_pOnScreen->vtable->SetVisible(0);
004f6094              __return_addr = nullptr;
004f609c              /* jump -> this->m_pOffScreen->vtable->SetVisible */
004f6073          }
004f6073          
004f607b          VividTargetIndicator::SetSelected(this, this->m_idSelectedTarget);
004f6058      }
004f6050  }

004f609f                                                                                               90                                 .

004f60a0  void __thiscall VividTargetIndicator::SetEnabled(class VividTargetIndicator* this, uint8_t arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004f60a0  {
004f60aa      if (this->m_bEnabled != arg2)
004f60aa      {
004f60ac          this->m_bEnabled = arg2;
004f60b7          uint8_t eax_2 = PlayerModule::VividTargetingIndicator(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
004f60bc          struct PlayerModule::VTable** ecx;
004f60bc          ecx = this->m_bEnabled;
004f60c1          this->m_bDisplayOn = eax_2;
004f60c1          
004f60c8          if ((ecx == 0 || eax_2 == 0))
004f60c8          {
004f60d9              this->m_pOnScreen->vtable->SetVisible(0);
004f60e9              __return_addr = nullptr;
004f60f1              /* jump -> this->m_pOffScreen->vtable->SetVisible */
004f60c8          }
004f60c8          
004f60d0          VividTargetIndicator::SetSelected(this, this->m_idSelectedTarget);
004f60aa      }
004f60a0  }

004f60f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f6100  void __fastcall VividTargetIndicator::RecvNotice_SelectionChanged(class VividTargetIndicator* this)

004f6100  {
004f6106      VividTargetIndicator::SetSelected(this, ACCWeenieObject::selectedID);
004f6100  }

004f610c                                      90 90 90 90                                                              ....

004f6110  void __fastcall VividTargetIndicator::RecvNotice_ChangeRadarLook(class VividTargetIndicator* this, class CWeenieObject* arg2)

004f6110  {
004f6119      /* tailcall */
004f6119      return VividTargetIndicator::SetSelected(this, ACCWeenieObject::selectedID);
004f6110  }

004f611e                                                                                            90 90                                ..

004f6120  void __fastcall VividTargetIndicator::OnQualityChanged(class VividTargetIndicator* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

004f6120  {
004f6129      VividTargetIndicator::SetSelected(((char*)this - 4), ACCWeenieObject::selectedID);
004f6120  }

004f6131                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004f6140  void __thiscall VividTargetIndicator::SetOffScreenImage(class VividTargetIndicator* this, uint32_t arg2, class RGBAColor const* arg3)

004f6140  {
004f6150      if (arg2 != this->m_vtiCurrent)
004f6150      {
004f616c      label_4f616c:
004f616c          class Graphic* eax_3 = VividTargetIndicator::CopyImage(this, this->m_rgSourceImages.m_data[arg2], arg3);
004f6176          UIRegion::ClearImage(this->m_pOffScreen);
004f617f          UIRegion::SetImage(this->m_pOffScreen, eax_3);
004f6186          this->m_clrOffScreen.r = arg3->r;
004f6186          this->m_clrOffScreen.g = arg3->g;
004f6186          this->m_clrOffScreen.b = arg3->b;
004f6186          this->m_clrOffScreen.a = arg3->a;
004f619d          this->m_vtiCurrent = arg2;
004f6150      }
004f6150      else if (RGBAColor::operator==(arg3, &this->m_clrOffScreen) == 0)
004f615f          goto label_4f616c;
004f6140  }

004f61a7                       90 90 90 90 90 90 90 90 90                                                         .........

004f61b0  void __thiscall VividTargetIndicator::SetOnScreenColor(class VividTargetIndicator* this, class RGBAColor const* arg2)

004f61b0  {
004f61b0      class VividTargetIndicator* this_1 = this;
004f61b0      
004f61ca      if (RGBAColor::operator==(arg2, &this->m_clrOnScreen) == 0)
004f61ca      {
004f6201          for (int32_t i = 4; i <= 0x10; i += 4)
004f6201          {
004f61dd              class Graphic* eax_3 = VividTargetIndicator::CopyImage(this, *(uint32_t*)(this->m_rgSourceImages.m_data + i), arg2);
004f61ea              UIRegion::ClearImage(*(uint32_t*)(this->m_rgOnScreenCorners.m_data + i));
004f61f6              UIRegion::SetImage(*(uint32_t*)(this->m_rgOnScreenCorners.m_data + i), eax_3);
004f6201          }
004f6201          
004f61b9          this->m_clrOnScreen.r = arg2->r;
004f61b9          this->m_clrOnScreen.g = arg2->g;
004f61b9          this->m_clrOnScreen.b = arg2->b;
004f61b9          this->m_clrOnScreen.a = arg2->a;
004f61ca      }
004f61b0  }

004f6226                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f6230  void __fastcall VividTargetIndicator::~VividTargetIndicator(class VividTargetIndicator* this)

004f6230  {
004f6236      this->vtable = 0x7c5370;
004f6233      this->vtable = &VividTargetIndicator::`vftable';
004f6242      class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
004f6248      VividTargetIndicator::s_pVTInstance = nullptr;
004f6255      *(int32_t*)((char*)QualityRegistrar::s_pQR_1->vtable + 0x14)(&this->vtable);
004f6258      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
004f6258      
004f625f      if (eax_1 != 0)
004f6261          eax_1->vtable->UnRegisterAllNoticeHandlers(this);
004f6261      
004f6276      if ((this->m_rgOnScreenCorners.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f627c          operator delete[](this->m_rgOnScreenCorners.m_data);
004f627c      
004f6293      if ((this->m_rgSourceImages.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f6299          operator delete[](this->m_rgSourceImages.m_data);
004f6299      
004f62a1      this->vtable = 0x7bf328;
004f62aa      /* tailcall */
004f62aa      return NoticeHandler::~NoticeHandler(this);
004f6230  }

004f62af                                               90                                                                 .

004f62b0  void __thiscall VividTargetIndicator::OnDraw(class VividTargetIndicator* this, uint32_t arg2, enum ObjectSelectStatus arg3, struct tagRECT const* arg4, float const arg5)

004f62b0  {
004f62b0      class VividTargetIndicator* this_1 = this;
004f62b0      
004f62d3      if (((this->m_bEnabled == 0 || this->m_bDisplayOn == 0) || arg2 == 0))
004f62d3      {
004f6ab7          this->m_pOnScreen->vtable->SetVisible(0);
004f6abf          this->m_pOffScreen->vtable->SetVisible(0);
004f62d3      }
004f62d3      else if (arg3 == ObjectOnscreen_OSS)
004f62de      {
004f69bd          VividTargetIndicator::SetOnScreenColor(this, &this->m_clrSelectedObjectColor);
004f69c8          int32_t eax_21 = UIRegion::GetWidth(this->m_rgOnScreenCorners.m_data[1]);
004f69d9          class VividTargetIndicator* eax_23 = UIRegion::GetHeight(this->m_rgOnScreenCorners.m_data[1]);
004f69de          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
004f69f5          arg3 = ((RenderDevice::render_device_1->m_viewportHeight - eax_23) - 8);
004f6a00          int32_t right = arg4->right;
004f6a03          arg5 = arg4->bottom;
004f6a0b          int32_t edi_3 = (arg4->left - eax_21);
004f6a10          int32_t right_1 = ((RenderDevice::render_device_1->m_viewportWidth - eax_21) - 8);
004f6a13          void* ebp_3 = (arg4->top - eax_23);
004f6a13          
004f6a1b          if (edi_3 > right)
004f6a1d              edi_3 = (right - 1);
004f6a1d          
004f6a26          if (ebp_3 > arg5)
004f6a28              ebp_3 = (arg5 - 1);
004f6a28          
004f6a2e          if (edi_3 < 8)
004f6a30              edi_3 = 8;
004f6a30          
004f6a38          if (ebp_3 < 8)
004f6a3a              ebp_3 = 8;
004f6a3a          
004f6a48          if (right < (eax_21 + 8))
004f6a4a              right = (eax_21 + 8);
004f6a4a          
004f6a55          if (arg5 < &eax_23->m_idSelectedTarget)
004f6a57              arg5 = &eax_23->m_idSelectedTarget;
004f6a57          
004f6a61          int32_t eax_26 = (right_1 - eax_21);
004f6a61          
004f6a65          if (edi_3 > eax_26)
004f6a67              edi_3 = eax_26;
004f6a67          
004f6a6d          void* eax_28 = (arg3 - eax_23);
004f6a6d          
004f6a73          if (ebp_3 > eax_28)
004f6a75              ebp_3 = eax_28;
004f6a75          
004f6a79          if (right > right_1)
004f6a7b              right = right_1;
004f6a7b          
004f6a85          if (arg5 > arg3)
004f6a87              arg5 = arg3;
004f6a87          
004f6a8b          this->m_pOnScreen->vtable->MoveTo(edi_3, ebp_3);
004f6a99          this->m_pOnScreen->vtable->ResizeTo(((right - edi_3) + eax_21), ((arg5 - ebp_3) + eax_23));
004f6ab7          this->m_pOnScreen->vtable->SetVisible(1);
004f6abf          this->m_pOffScreen->vtable->SetVisible(0);
004f62de      }
004f62de      else if (arg3 == 2)
004f62e5      {
004f62eb          long double x87_r7_1 = ((long double)arg5);
004f62ef          long double temp3_1 = ((long double)338.0);
004f62ef          (x87_r7_1 - temp3_1);
004f62fa          bool p_1;
004f62fa          
004f62fa          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
004f62fa          {
004f6304              (((long double)arg5) - ((long double)23.0));
004f630c              p_1 = /* p_1 = unimplemented  {test ah, 0x5} */;
004f62fa          }
004f62fa          
004f630f          if (((*(uint8_t*)((char*)((((x87_r7_1 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0 || !(p_1)))
004f644f              VividTargetIndicator::SetOffScreenImage(this, 6, &this->m_clrSelectedObjectColor);
004f630f          else
004f630f          {
004f6315              long double x87_r7_3 = ((long double)arg5);
004f6319              long double temp5_1 = ((long double)23.0);
004f6319              (x87_r7_3 - temp5_1);
004f6324              bool p_2;
004f6324              
004f6324              if ((*(uint8_t*)((char*)((((x87_r7_3 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp5_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f6324              {
004f632a                  (((long double)arg5) - ((long double)68.0));
004f6332                  p_2 = /* p_2 = unimplemented  {test ah, 0x5} */;
004f6324              }
004f6324              
004f6335              if (((*(uint8_t*)((char*)((((x87_r7_3 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp5_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0 || p_2))
004f6335              {
004f6342                  long double x87_r7_5 = ((long double)arg5);
004f6346                  long double temp6_1 = ((long double)68.0);
004f6346                  (x87_r7_5 - temp6_1);
004f6351                  bool p_3;
004f6351                  
004f6351                  if ((*(uint8_t*)((char*)((((x87_r7_5 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp6_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f6351                  {
004f6357                      (((long double)arg5) - ((long double)113.0));
004f635f                      p_3 = /* p_3 = unimplemented  {test ah, 0x5} */;
004f6351                  }
004f6351                  
004f6362                  if (((*(uint8_t*)((char*)((((x87_r7_5 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp6_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0 || p_3))
004f6362                  {
004f636f                      long double x87_r7_7 = ((long double)arg5);
004f6373                      long double temp9_1 = ((long double)113.0);
004f6373                      (x87_r7_7 - temp9_1);
004f637e                      bool p_4;
004f637e                      
004f637e                      if ((*(uint8_t*)((char*)((((x87_r7_7 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp9_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f637e                      {
004f6384                          (((long double)arg5) - ((long double)158.0));
004f638c                          p_4 = /* p_4 = unimplemented  {test ah, 0x5} */;
004f637e                      }
004f637e                      
004f638f                      if (((*(uint8_t*)((char*)((((x87_r7_7 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp9_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0 || p_4))
004f638f                      {
004f639c                          long double x87_r7_9 = ((long double)arg5);
004f63a0                          long double temp12_1 = ((long double)158.0);
004f63a0                          (x87_r7_9 - temp12_1);
004f63ab                          bool p_5;
004f63ab                          
004f63ab                          if ((*(uint8_t*)((char*)((((x87_r7_9 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp12_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f63ab                          {
004f63b1                              (((long double)arg5) - ((long double)203.0));
004f63b9                              p_5 = /* p_5 = unimplemented  {test ah, 0x5} */;
004f63ab                          }
004f63ab                          
004f63bc                          if (((*(uint8_t*)((char*)((((x87_r7_9 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp12_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0 || p_5))
004f63bc                          {
004f63c9                              long double x87_r7_11 = ((long double)arg5);
004f63cd                              long double temp16_1 = ((long double)203.0);
004f63cd                              (x87_r7_11 - temp16_1);
004f63d8                              bool p_6;
004f63d8                              
004f63d8                              if ((*(uint8_t*)((char*)((((x87_r7_11 < temp16_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp16_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp16_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f63d8                              {
004f63de                                  (((long double)arg5) - ((long double)248.0));
004f63e6                                  p_6 = /* p_6 = unimplemented  {test ah, 0x5} */;
004f63d8                              }
004f63d8                              
004f63e9                              if (((*(uint8_t*)((char*)((((x87_r7_11 < temp16_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp16_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp16_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0 || p_6))
004f63e9                              {
004f63f3                                  long double x87_r7_13 = ((long double)arg5);
004f63f7                                  long double temp20_1 = ((long double)248.0);
004f63f7                                  (x87_r7_13 - temp20_1);
004f6402                                  bool p_7;
004f6402                                  
004f6402                                  if ((*(uint8_t*)((char*)((((x87_r7_13 < temp20_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp20_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp20_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f6402                                  {
004f6408                                      (((long double)arg5) - ((long double)293.0));
004f6410                                      p_7 = /* p_7 = unimplemented  {test ah, 0x5} */;
004f6402                                  }
004f6402                                  
004f6413                                  if (((*(uint8_t*)((char*)((((x87_r7_13 < temp20_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp20_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp20_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0 || p_7))
004f6413                                  {
004f641d                                      long double x87_r7_15 = ((long double)arg5);
004f6421                                      long double temp24_1 = ((long double)293.0);
004f6421                                      (x87_r7_15 - temp24_1);
004f6421                                      
004f642c                                      if ((*(uint8_t*)((char*)((((x87_r7_15 < temp24_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_15, temp24_1))) ? 1 : 0) << 0xa) | ((((x87_r7_15 == temp24_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
004f642c                                      {
004f6432                                          (((long double)arg5) - ((long double)338.0));
004f643a                                          bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
004f643a                                          
004f643d                                          if (!(p_8))
004f644f                                              VividTargetIndicator::SetOffScreenImage(this, 5, &this->m_clrSelectedObjectColor);
004f642c                                      }
004f6413                                  }
004f6413                                  else
004f644f                                      VividTargetIndicator::SetOffScreenImage(this, 8, &this->m_clrSelectedObjectColor);
004f63e9                              }
004f63e9                              else
004f644f                                  VividTargetIndicator::SetOffScreenImage(this, 0xa, &this->m_clrSelectedObjectColor);
004f63bc                          }
004f63bc                          else
004f644f                              VividTargetIndicator::SetOffScreenImage(this, 0xb, &this->m_clrSelectedObjectColor);
004f638f                      }
004f638f                      else
004f644f                          VividTargetIndicator::SetOffScreenImage(this, 0xc, &this->m_clrSelectedObjectColor);
004f6362                  }
004f6362                  else
004f644f                      VividTargetIndicator::SetOffScreenImage(this, 9, &this->m_clrSelectedObjectColor);
004f6335              }
004f6335              else
004f644f                  VividTargetIndicator::SetOffScreenImage(this, 7, &this->m_clrSelectedObjectColor);
004f630f          }
004f630f          
004f6454          class UIElement* m_pOffScreen = this->m_pOffScreen;
004f6454          
004f6459          if (m_pOffScreen != 0)
004f6459          {
004f646f              arg3 = ((float)((long double)UIRegion::GetWidth(m_pOffScreen)));
004f6473              int32_t eax_9 = UIRegion::GetHeight(this->m_pOffScreen);
004f6478              class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
004f647e              arg2 = eax_9;
004f6486              long double x87_r6 = ((long double)arg5);
004f648a              long double temp8 = ((long double)45.0);
004f648a              (x87_r6 - temp8);
004f6490              eax_9 = ((((x87_r6 < temp8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, temp8))) ? 1 : 0) << 0xa) | ((((x87_r6 == temp8) ? 1 : 0) << 0xe) | 0x3800))));
004f6492              bool p_9 = /* bool p_9 = unimplemented  {test ah, 0x41} */;
004f6492              
004f6495              if (!(p_9))
004f6495              {
004f64a3                  bool cond:2_1 = RenderDevice::render_device_2->m_viewportHeight >= 0;
004f64a9                  long double st0_1;
004f64a9                  bool c2_18;
004f64a9                  st0_1 = __fptan((((long double)0.0174532924f) * ((long double)arg5)));
004f64ab                  /* unimplemented  {fstp st0, st0} */;
004f64ab                  /* unimplemented  {fstp st0, st0} */;
004f64ad                  /* unimplemented  {fld st0, st0} */;
004f64af                  /* unimplemented  {fild st0, dword [edi+0x98]} */;
004f64af                  
004f64b5                  if (!(cond:2_1))
004f64b7                      /* unimplemented  {fadd dword [&data_79820c]} */;
004f64b7                  
004f64bd                  /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f64cb                  /* unimplemented  {fmulp st1, st0} */;
004f64cb                  /* unimplemented  {fmulp st1, st0} */;
004f64cd                  /* unimplemented  {fild st0, dword [edi+0x94]} */;
004f64cd                  
004f64d3                  if (RenderDevice::render_device_2->m_viewportWidth < 0)
004f64d5                      /* unimplemented  {fadd dword [&data_79820c]} */;
004f64d5                  
004f64db                  /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f64e7                  arg5 = 8f;
004f64eb                  /* unimplemented  {faddp st1, st0} */;
004f64eb                  /* unimplemented  {faddp st1, st0} */;
004f64d3                  goto label_4f6901;
004f6495              }
004f6495              
004f64f2              long double x87_r6_4 = ((long double)arg5);
004f64f6              long double temp11_1 = ((long double)45.0);
004f64f6              (x87_r6_4 - temp11_1);
004f64fc              eax_9 = ((((x87_r6_4 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == temp11_1) ? 1 : 0) << 0xe) | 0x3800))));
004f64fc              
004f6501              if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
004f6501              {
004f6595              label_4f6595:
004f6595                  long double x87_r6_11 = ((long double)arg5);
004f6599                  long double temp14_1 = ((long double)90.0);
004f6599                  (x87_r6_11 - temp14_1);
004f659f                  eax_9 = ((((x87_r6_11 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp14_1) ? 1 : 0) << 0xe) | 0x3800))));
004f659f                  
004f65a4                  if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
004f65a4                  {
004f6634                  label_4f6634:
004f6634                      long double x87_r6_14 = ((long double)arg5);
004f6638                      long double temp18_1 = ((long double)135.0);
004f6638                      (x87_r6_14 - temp18_1);
004f663e                      eax_9 = ((((x87_r6_14 < temp18_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_14, temp18_1))) ? 1 : 0) << 0xa) | ((((x87_r6_14 == temp18_1) ? 1 : 0) << 0xe) | 0x3800))));
004f663e                      
004f6643                      if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
004f6643                      {
004f66d1                      label_4f66d1:
004f66d1                          long double x87_r6_18 = ((long double)arg5);
004f66d5                          long double temp22_1 = ((long double)180.0);
004f66d5                          (x87_r6_18 - temp22_1);
004f66db                          eax_9 = ((((x87_r6_18 < temp22_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_18, temp22_1))) ? 1 : 0) << 0xa) | ((((x87_r6_18 == temp22_1) ? 1 : 0) << 0xe) | 0x3800))));
004f66db                          
004f66e0                          if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
004f66e0                          {
004f676e                          label_4f676e:
004f676e                              long double x87_r6_22 = ((long double)arg5);
004f6772                              long double temp26_1 = ((long double)225.0);
004f6772                              (x87_r6_22 - temp26_1);
004f6778                              eax_9 = ((((x87_r6_22 < temp26_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_22, temp26_1))) ? 1 : 0) << 0xa) | ((((x87_r6_22 == temp26_1) ? 1 : 0) << 0xe) | 0x3800))));
004f6778                              
004f677d                              if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
004f677d                              {
004f6803                              label_4f6803:
004f6803                                  long double x87_r6_28 = ((long double)arg5);
004f6807                                  long double temp29_1 = ((long double)270.0);
004f6807                                  (x87_r6_28 - temp29_1);
004f680d                                  eax_9 = ((((x87_r6_28 < temp29_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_28, temp29_1))) ? 1 : 0) << 0xa) | ((((x87_r6_28 == temp29_1) ? 1 : 0) << 0xe) | 0x3800))));
004f680d                                  
004f6812                                  if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
004f6812                                  {
004f6893                                  label_4f6893:
004f6893                                      long double x87_r6_32 = ((long double)arg5);
004f6897                                      long double temp31_1 = ((long double)315.0);
004f6897                                      (x87_r6_32 - temp31_1);
004f689d                                      eax_9 = ((((x87_r6_32 < temp31_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_32, temp31_1))) ? 1 : 0) << 0xa) | ((((x87_r6_32 == temp31_1) ? 1 : 0) << 0xe) | 0x3800))));
004f689d                                      
004f68a2                                      if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) == 0)
004f68a2                                      {
004f68aa                                          RenderDevice::render_device_2->m_viewportWidth;
004f68a4                                          RenderDevice::render_device_2->m_viewportWidth;
004f68c6                                          bool cond:12_1 = RenderDevice::render_device_2->m_viewportHeight >= 0;
004f68d8                                          long double st0_8;
004f68d8                                          bool c2_38;
004f68d8                                          st0_8 = __fptan(((((long double)360f) - ((long double)arg5)) * ((long double)0.0174532924f)));
004f68da                                          /* unimplemented  {fstp st0, st0} */;
004f68da                                          /* unimplemented  {fstp st0, st0} */;
004f68dc                                          /* unimplemented  {fxch st0, st1} */;
004f68dc                                          /* unimplemented  {fxch st0, st1} */;
004f68de                                          /* unimplemented  {fld st0, st1} */;
004f68e0                                          /* unimplemented  {fild st0, dword [edi+0x98]} */;
004f68e0                                          
004f68e6                                          if (!(cond:12_1))
004f68e8                                              /* unimplemented  {fadd dword [&data_79820c]} */;
004f68e8                                          
004f68ee                                          /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f68f9                                          arg5 = 8f;
004f68fd                                          /* unimplemented  {fmulp st1, st0} */;
004f68fd                                          /* unimplemented  {fmulp st1, st0} */;
004f68ff                                          /* unimplemented  {fsubp st1, st0} */;
004f68ff                                          /* unimplemented  {fsubp st1, st0} */;
004f6901                                      label_4f6901:
004f6901                                          /* unimplemented  {fld st0, dword [esp+0x1c]} */;
004f6905                                          /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f690b                                          /* unimplemented  {fsubp st1, st0} */;
004f690b                                          /* unimplemented  {fsubp st1, st0} */;
004f690d                                          arg2 = ((float)/* arg2 = fconvert.s(unimplemented  {fstp dword [esp+0x18], st0}) */);
004f690d                                          /* unimplemented  {fstp dword [esp+0x18], st0} */;
004f6911                                          /* unimplemented  {fstp st0, st0} */;
004f6911                                          /* unimplemented  {fstp st0, st0} */;
004f68a2                                      }
004f6812                                  }
004f6812                                  else
004f6812                                  {
004f6814                                      long double x87_r6_29 = ((long double)arg5);
004f6818                                      long double temp32_1 = ((long double)315.0);
004f6818                                      (x87_r6_29 - temp32_1);
004f681e                                      eax_9 = ((((x87_r6_29 < temp32_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_29, temp32_1))) ? 1 : 0) << 0xa) | ((((x87_r6_29 == temp32_1) ? 1 : 0) << 0xe) | 0x3800))));
004f6820                                      bool p_15 = /* bool p_15 = unimplemented  {test ah, 0x41} */;
004f6820                                      
004f6823                                      if (p_15)
004f6823                                          goto label_4f6893;
004f6823                                      
004f682b                                      RenderDevice::render_device_2->m_viewportHeight;
004f6839                                      arg2 = 0x41000000;
004f6825                                      RenderDevice::render_device_2->m_viewportHeight;
004f6851                                      bool cond:13_1 = RenderDevice::render_device_2->m_viewportWidth >= 0;
004f6863                                      long double st0_7;
004f6863                                      bool c2_36;
004f6863                                      st0_7 = __fptan(((((long double)arg5) - ((long double)270f)) * ((long double)0.0174532924f)));
004f6865                                      /* unimplemented  {fstp st0, st0} */;
004f6865                                      /* unimplemented  {fstp st0, st0} */;
004f6867                                      /* unimplemented  {fxch st0, st1} */;
004f6867                                      /* unimplemented  {fxch st0, st1} */;
004f6869                                      /* unimplemented  {fld st0, st1} */;
004f686b                                      /* unimplemented  {fild st0, dword [edi+0x94]} */;
004f686b                                      
004f6871                                      if (!(cond:13_1))
004f6873                                          /* unimplemented  {fadd dword [&data_79820c]} */;
004f6873                                      
004f6879                                      /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f687f                                      /* unimplemented  {fmulp st1, st0} */;
004f687f                                      /* unimplemented  {fmulp st1, st0} */;
004f6881                                      /* unimplemented  {fsubp st1, st0} */;
004f6881                                      /* unimplemented  {fsubp st1, st0} */;
004f6883                                      /* unimplemented  {fld st0, st2} */;
004f6885                                      /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f688b                                      /* unimplemented  {fsubp st1, st0} */;
004f688b                                      /* unimplemented  {fsubp st1, st0} */;
004f688d                                      arg5 = ((float)/* arg5 = fconvert.s(unimplemented  {fstp dword [esp+0x24], st0}) */);
004f688d                                      /* unimplemented  {fstp dword [esp+0x24], st0} */;
004f6911                                      /* unimplemented  {fstp st0, st0} */;
004f6911                                      /* unimplemented  {fstp st0, st0} */;
004f6812                                  }
004f677d                              }
004f677d                              else
004f677d                              {
004f6783                                  long double x87_r6_23 = ((long double)arg5);
004f6787                                  long double temp30_1 = ((long double)270.0);
004f6787                                  (x87_r6_23 - temp30_1);
004f678d                                  eax_9 = ((((x87_r6_23 < temp30_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_23, temp30_1))) ? 1 : 0) << 0xa) | ((((x87_r6_23 == temp30_1) ? 1 : 0) << 0xe) | 0x3800))));
004f678f                                  bool p_14 = /* bool p_14 = unimplemented  {test ah, 0x41} */;
004f678f                                  
004f6792                                  if (p_14)
004f6792                                      goto label_4f6803;
004f6792                                  
004f67a0                                  bool cond:9_1 = RenderDevice::render_device_2->m_viewportWidth >= 0;
004f67ac                                  arg2 = 0x41000000;
004f67b6                                  long double st0_6;
004f67b6                                  bool c2_33;
004f67b6                                  st0_6 = __fptan(((((long double)270f) - ((long double)arg5)) * ((long double)0.0174532924f)));
004f67b8                                  /* unimplemented  {fstp st0, st0} */;
004f67b8                                  /* unimplemented  {fstp st0, st0} */;
004f67ba                                  /* unimplemented  {fld st0, st0} */;
004f67bc                                  /* unimplemented  {fild st0, dword [edi+0x94]} */;
004f67bc                                  
004f67c2                                  if (!(cond:9_1))
004f67c4                                      /* unimplemented  {fadd dword [&data_79820c]} */;
004f67c4                                  
004f67ca                                  /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f67d8                                  /* unimplemented  {fmulp st1, st0} */;
004f67d8                                  /* unimplemented  {fmulp st1, st0} */;
004f67da                                  /* unimplemented  {fild st0, dword [edi+0x98]} */;
004f67da                                  
004f67e0                                  if (RenderDevice::render_device_2->m_viewportHeight < 0)
004f67e2                                      /* unimplemented  {fadd dword [&data_79820c]} */;
004f67e2                                  
004f67e8                                  /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f67ee                                  /* unimplemented  {faddp st1, st0} */;
004f67ee                                  /* unimplemented  {faddp st1, st0} */;
004f67f0                                  /* unimplemented  {fld st0, st2} */;
004f67f2                                  /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f67f8                                  /* unimplemented  {fsubp st1, st0} */;
004f67f8                                  /* unimplemented  {fsubp st1, st0} */;
004f67fa                                  arg5 = ((float)/* arg5 = fconvert.s(unimplemented  {fstp dword [esp+0x24], st0}) */);
004f67fa                                  /* unimplemented  {fstp dword [esp+0x24], st0} */;
004f6911                                  /* unimplemented  {fstp st0, st0} */;
004f6911                                  /* unimplemented  {fstp st0, st0} */;
004f677d                              }
004f66e0                          }
004f66e0                          else
004f66e0                          {
004f66e6                              long double x87_r6_19 = ((long double)arg5);
004f66ea                              long double temp27_1 = ((long double)225.0);
004f66ea                              (x87_r6_19 - temp27_1);
004f66f0                              eax_9 = ((((x87_r6_19 < temp27_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_19, temp27_1))) ? 1 : 0) << 0xa) | ((((x87_r6_19 == temp27_1) ? 1 : 0) << 0xe) | 0x3800))));
004f66f2                              bool p_13 = /* bool p_13 = unimplemented  {test ah, 0x41} */;
004f66f2                              
004f66f5                              if (p_13)
004f66f5                                  goto label_4f676e;
004f66f5                              
004f66fd                              RenderDevice::render_device_2->m_viewportHeight;
004f66f7                              RenderDevice::render_device_2->m_viewportHeight;
004f6713                              RenderDevice::render_device_2->m_viewportWidth;
004f670d                              RenderDevice::render_device_2->m_viewportWidth;
004f6739                              long double st0_5;
004f6739                              bool c2_30;
004f6739                              st0_5 = __fptan(((((long double)arg5) - ((long double)180f)) * ((long double)0.0174532924f)));
004f673b                              /* unimplemented  {fstp st0, st0} */;
004f673b                              /* unimplemented  {fstp st0, st0} */;
004f673d                              /* unimplemented  {fxch st0, st1} */;
004f673d                              /* unimplemented  {fxch st0, st1} */;
004f673f                              /* unimplemented  {fld st0, st2} */;
004f6741                              /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f6747                              /* unimplemented  {fmulp st2, st0} */;
004f6747                              /* unimplemented  {fmulp st2, st0} */;
004f6749                              /* unimplemented  {fxch st0, st1} */;
004f6749                              /* unimplemented  {fxch st0, st1} */;
004f674b                              /* unimplemented  {fsubp st1, st0} */;
004f674b                              /* unimplemented  {fsubp st1, st0} */;
004f674d                              /* unimplemented  {fld st0, dword [esp+0x1c]} */;
004f6751                              /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f6757                              /* unimplemented  {fsubp st1, st0} */;
004f6757                              /* unimplemented  {fsubp st1, st0} */;
004f6759                              arg2 = ((float)/* arg2 = fconvert.s(unimplemented  {fstp dword [esp+0x18], st0}) */);
004f6759                              /* unimplemented  {fstp dword [esp+0x18], st0} */;
004f675d                              /* unimplemented  {fsub st0, dword [&min_dist]} */;
004f6763                              /* unimplemented  {fsub st0, st1} */;
004f6765                              arg5 = ((float)/* arg5 = fconvert.s(unimplemented  {fstp dword [esp+0x24], st0}) */);
004f6765                              /* unimplemented  {fstp dword [esp+0x24], st0} */;
004f66e0                          }
004f6643                      }
004f6643                      else
004f6643                      {
004f6649                          long double x87_r6_15 = ((long double)arg5);
004f664d                          long double temp23_1 = ((long double)180.0);
004f664d                          (x87_r6_15 - temp23_1);
004f6653                          eax_9 = ((((x87_r6_15 < temp23_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_15, temp23_1))) ? 1 : 0) << 0xa) | ((((x87_r6_15 == temp23_1) ? 1 : 0) << 0xe) | 0x3800))));
004f6655                          bool p_12 = /* bool p_12 = unimplemented  {test ah, 0x41} */;
004f6655                          
004f6658                          if (p_12)
004f6658                              goto label_4f66d1;
004f6658                          
004f6660                          RenderDevice::render_device_2->m_viewportHeight;
004f665a                          RenderDevice::render_device_2->m_viewportHeight;
004f667c                          bool cond:7_1 = RenderDevice::render_device_2->m_viewportWidth >= 0;
004f6688                          long double st0_4;
004f6688                          bool c2_27;
004f6688                          st0_4 = __fptan(((((long double)180f) - ((long double)arg5)) * ((long double)0.0174532924f)));
004f668a                          /* unimplemented  {fstp st0, st0} */;
004f668a                          /* unimplemented  {fstp st0, st0} */;
004f668c                          /* unimplemented  {fld st0, st0} */;
004f668e                          /* unimplemented  {fld st0, st2} */;
004f6690                          /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f6696                          /* unimplemented  {fmulp st1, st0} */;
004f6696                          /* unimplemented  {fmulp st1, st0} */;
004f6698                          /* unimplemented  {fild st0, dword [edi+0x94]} */;
004f6698                          
004f669e                          if (!(cond:7_1))
004f66a0                              /* unimplemented  {fadd dword [&data_79820c]} */;
004f66a0                          
004f66a6                          /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f66ac                          /* unimplemented  {faddp st1, st0} */;
004f66ac                          /* unimplemented  {faddp st1, st0} */;
004f66ae                          /* unimplemented  {fld st0, dword [esp+0x1c]} */;
004f66b2                          /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f66b8                          /* unimplemented  {fsubp st1, st0} */;
004f66b8                          /* unimplemented  {fsubp st1, st0} */;
004f66ba                          arg2 = ((float)/* arg2 = fconvert.s(unimplemented  {fstp dword [esp+0x18], st0}) */);
004f66ba                          /* unimplemented  {fstp dword [esp+0x18], st0} */;
004f66be                          /* unimplemented  {fstp st0, st0} */;
004f66be                          /* unimplemented  {fstp st0, st0} */;
004f66c0                          /* unimplemented  {fsub st0, dword [&min_dist]} */;
004f66c6                          /* unimplemented  {fsub st0, st1} */;
004f66c8                          arg5 = ((float)/* arg5 = fconvert.s(unimplemented  {fstp dword [esp+0x24], st0}) */);
004f66c8                          /* unimplemented  {fstp dword [esp+0x24], st0} */;
004f6643                      }
004f65a4                  }
004f65a4                  else
004f65a4                  {
004f65aa                      long double x87_r6_12 = ((long double)arg5);
004f65ae                      long double temp19_1 = ((long double)135.0);
004f65ae                      (x87_r6_12 - temp19_1);
004f65b4                      eax_9 = ((((x87_r6_12 < temp19_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_12, temp19_1))) ? 1 : 0) << 0xa) | ((((x87_r6_12 == temp19_1) ? 1 : 0) << 0xe) | 0x3800))));
004f65b6                      bool p_11 = /* bool p_11 = unimplemented  {test ah, 0x41} */;
004f65b6                      
004f65b9                      if (p_11)
004f65b9                          goto label_4f6634;
004f65b9                      
004f65c1                      long double x87_r6_13 = ((long double)RenderDevice::render_device_2->m_viewportWidth);
004f65c1                      
004f65c9                      if (RenderDevice::render_device_2->m_viewportWidth < 0)
004f65cb                          x87_r6_13 = (x87_r6_13 + ((long double)4.2949673e+09f));
004f65cb                      
004f65dd                      bool cond:5_1 = RenderDevice::render_device_2->m_viewportHeight >= 0;
004f65e5                      arg2 = ((float)((x87_r6_13 - ((long double)8f)) - ((long double)arg3)));
004f65f9                      long double st0_3;
004f65f9                      bool c2_24;
004f65f9                      st0_3 = __fptan(((((long double)arg5) - ((long double)90f)) * ((long double)0.0174532924f)));
004f65fb                      /* unimplemented  {fstp st0, st0} */;
004f65fb                      /* unimplemented  {fstp st0, st0} */;
004f65fd                      /* unimplemented  {fld st0, st0} */;
004f65ff                      /* unimplemented  {fld st0, st2} */;
004f6601                      /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f6607                      /* unimplemented  {fmulp st1, st0} */;
004f6607                      /* unimplemented  {fmulp st1, st0} */;
004f6609                      /* unimplemented  {fild st0, dword [edi+0x98]} */;
004f6609                      
004f660f                      if (!(cond:5_1))
004f6611                          /* unimplemented  {fadd dword [&data_79820c]} */;
004f6611                      
004f6617                      /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f661d                      /* unimplemented  {faddp st1, st0} */;
004f661d                      /* unimplemented  {faddp st1, st0} */;
004f661f                      /* unimplemented  {fld st0, st3} */;
004f6621                      /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f6627                      /* unimplemented  {fsubp st1, st0} */;
004f6627                      /* unimplemented  {fsubp st1, st0} */;
004f6629                      arg5 = ((float)/* arg5 = fconvert.s(unimplemented  {fstp dword [esp+0x24], st0}) */);
004f6629                      /* unimplemented  {fstp dword [esp+0x24], st0} */;
004f662d                      /* unimplemented  {fstp st0, st0} */;
004f662d                      /* unimplemented  {fstp st0, st0} */;
004f6911                      /* unimplemented  {fstp st0, st0} */;
004f6911                      /* unimplemented  {fstp st0, st0} */;
004f65a4                  }
004f6501              }
004f6501              else
004f6501              {
004f6507                  long double x87_r6_5 = ((long double)arg5);
004f650b                  long double temp15_1 = ((long double)90.0);
004f650b                  (x87_r6_5 - temp15_1);
004f6511                  eax_9 = ((((x87_r6_5 < temp15_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, temp15_1))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == temp15_1) ? 1 : 0) << 0xe) | 0x3800))));
004f6513                  bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x41} */;
004f6513                  
004f6516                  if (p_10)
004f6516                      goto label_4f6595;
004f6516                  
004f651e                  long double x87_r6_6 = ((long double)RenderDevice::render_device_2->m_viewportWidth);
004f651e                  
004f6526                  if (RenderDevice::render_device_2->m_viewportWidth < 0)
004f6528                      x87_r6_6 = (x87_r6_6 + ((long double)4.2949673e+09f));
004f6528                  
004f6534                  arg4 = ((float)x87_r6_6);
004f6544                  arg2 = ((float)((x87_r6_6 - ((long double)8f)) - ((long double)arg3)));
004f6548                  RenderDevice::render_device_2->m_viewportHeight;
004f652e                  RenderDevice::render_device_2->m_viewportHeight;
004f656c                  long double st0_2;
004f656c                  bool c2_21;
004f656c                  st0_2 = __fptan(((((long double)90f) - ((long double)arg5)) * ((long double)0.0174532924f)));
004f656e                  /* unimplemented  {fstp st0, st0} */;
004f656e                  /* unimplemented  {fstp st0, st0} */;
004f6570                  /* unimplemented  {fxch st0, st1} */;
004f6570                  /* unimplemented  {fxch st0, st1} */;
004f6572                  /* unimplemented  {fld st0, dword [esp+0x20]} */;
004f6576                  /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f657c                  /* unimplemented  {fmulp st2, st0} */;
004f657c                  /* unimplemented  {fmulp st2, st0} */;
004f657e                  /* unimplemented  {fxch st0, st1} */;
004f657e                  /* unimplemented  {fxch st0, st1} */;
004f6580                  /* unimplemented  {fsubp st1, st0} */;
004f6580                  /* unimplemented  {fsubp st1, st0} */;
004f6582                  /* unimplemented  {fld st0, st1} */;
004f6584                  /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
004f658a                  /* unimplemented  {fsubp st1, st0} */;
004f658a                  /* unimplemented  {fsubp st1, st0} */;
004f658c                  arg5 = ((float)/* arg5 = fconvert.s(unimplemented  {fstp dword [esp+0x24], st0}) */);
004f658c                  /* unimplemented  {fstp dword [esp+0x24], st0} */;
004f6501              }
004f6501              
004f6913              uint32_t m_viewportHeight = RenderDevice::render_device_2->m_viewportHeight;
004f6919              /* unimplemented  {fild st0, dword [edi+0x98]} */;
004f6924              struct UIElement::VTable* vtable = this->m_pOffScreen->vtable;
004f6924              
004f6926              if (m_viewportHeight < 0)
004f6928                  /* unimplemented  {fadd dword [&data_79820c]} */;
004f6928              
004f692e              /* unimplemented  {fsub st0, dword [&min_dist]} */;
004f693e              uint32_t m_viewportHeight_1 = m_viewportHeight;
004f693f              /* unimplemented  {fsub st0, st1} */;
004f6941              float var_18_2 = ((float)/* float var_18_2 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
004f6941              /* unimplemented  {fstp dword [esp], st0} */;
004f6946              /* unimplemented  {fstp st0, st0} */;
004f6946              /* unimplemented  {fstp st0, st0} */;
004f6948              MathLib::Clamp(arg5, 8f, var_18_2);
004f6948              /* unimplemented  {call MathLib::Clamp} */;
004f6950              int32_t eax_17 = _ftol2();
004f6955              /* unimplemented  {fild st0, dword [edi+0x94]} */;
004f695b              uint32_t m_viewportWidth = RenderDevice::render_device_2->m_viewportWidth;
004f695b              
004f6964              if (m_viewportWidth < 0)
004f6966                  /* unimplemented  {fadd dword [&data_79820c]} */;
004f6966              
004f696c              /* unimplemented  {fsub st0, dword [&min_dist]} */;
004f697c              uint32_t m_viewportWidth_1 = m_viewportWidth;
004f697d              /* unimplemented  {fsub st0, dword [esp+0x24]} */;
004f6981              float var_1c_2 = ((float)/* float var_1c_2 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
004f6981              /* unimplemented  {fstp dword [esp], st0} */;
004f6986              MathLib::Clamp(arg2, 8f, var_1c_2);
004f6986              /* unimplemented  {call MathLib::Clamp} */;
004f6996              vtable->MoveTo(_ftol2(), eax_17);
004f6999              this->m_pOnScreen->vtable->SetVisible(0);
004f69a3              this->m_pOffScreen->vtable->SetVisible(1);
004f6459          }
004f62e5      }
004f62b0  }

004f6ad3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004f6ae0  void __fastcall VividTargetIndicator::VividTargetIndicator(class VividTargetIndicator* this)

004f6ae0  {
004f6ae0      class VividTargetIndicator* this_1 = this;
004f6ae5      this->vtable = 0x7cbd20;
004f6aef      this->vtable = 0x7bf328;
004f6af9      this->vtable = &QualityChangeHandler::`vftable';
004f6b04      this->vtable = 0x7c5370;
004f6b0e      this->vtable = &VividTargetIndicator::`vftable';
004f6b19      this->m_rgSourceImages.m_data = 0;
004f6b19      this->m_rgSourceImages.m_sizeAndDeallocate = 0;
004f6b19      this->m_rgSourceImages.m_num = 0;
004f6b2b      this->m_pOffScreen = nullptr;
004f6b32      this->m_pOnScreen = nullptr;
004f6b39      this->m_rgOnScreenCorners.m_data = 0;
004f6b39      this->m_rgOnScreenCorners.m_sizeAndDeallocate = 0;
004f6b39      this->m_rgOnScreenCorners.m_num = 0;
004f6b48      this->m_bDisplayOn = 0;
004f6b4f      this->m_bEnabled = 1;
004f6b5b      VividTargetIndicator::s_pVTInstance = this;
004f6b5b      
004f6b6c      if ((this->m_rgSourceImages.m_sizeAndDeallocate & 0x7fffffff) >= 0xd)
004f6b6c      {
004f6b80          int32_t i = 0xd;
004f6b80          
004f6b87          if (this->m_rgSourceImages.m_num > 0xd)
004f6b87          {
004f6b9b              do
004f6b9b              {
004f6b58                  this->m_rgSourceImages.m_data[i] = 0;
004f6b98                  i += 1;
004f6b9b              } while (i < this->m_rgSourceImages.m_num);
004f6b87          }
004f6b87          
004f6b58          this->m_rgSourceImages.m_num = 0xd;
004f6b6c      }
004f6b6c      else if (SmartArray<unsigned long,1>::grow(&this->m_rgSourceImages, 0xd) != 0)
004f6b58          this->m_rgSourceImages.m_num = 0xd;
004f6b58      
004f6bae      int32_t edx_5 = (this->m_rgOnScreenCorners.m_sizeAndDeallocate & 0x7fffffff);
004f6bb7      int32_t eax_9;
004f6bb7      uint32_t m_num;
004f6bb7      
004f6bb7      if (edx_5 >= 5)
004f6bb7      {
004f6bc8          m_num = this->m_rgOnScreenCorners.m_num;
004f6bcb          eax_9 = 5;
004f6bcb          
004f6bd2          if (m_num > 5)
004f6bd2          {
004f6bdf              do
004f6bdf              {
004f6bab                  this->m_rgOnScreenCorners.m_data[eax_9] = 0;
004f6bd9                  m_num = this->m_rgOnScreenCorners.m_num;
004f6bdc                  eax_9 += 1;
004f6bdf              } while (eax_9 < m_num);
004f6bd2          }
004f6bd2          
004f6bab          this->m_rgOnScreenCorners.m_num = 5;
004f6bb7      }
004f6bb7      else
004f6bb7      {
004f6bbd          eax_9 = SmartArray<unsigned long,1>::grow(&this->m_rgOnScreenCorners, 5);
004f6bbd          
004f6bc4          if (eax_9 != 0)
004f6bab              this->m_rgOnScreenCorners.m_num = 5;
004f6bb7      }
004f6bb7      
004f6be8      int32_t i_1 = 1;
004f6bed      class VividTargetIndicator* ecx_9 = m_num;
004f6bed      
004f6c19      do
004f6c19      {
004f6bf0          int32_t var_10_1 = 0xc;
004f6bf2          int32_t var_14_1 = 0x10000009;
004f6bf7          int32_t i_2 = i_1;
004f6bf8          eax_9 = DBObj::GetByEnum(eax_9, edx_5, ecx_9);
004f6bfd          ecx_9 = this;
004f6c01          edx_5 = ecx_9->m_rgSourceImages.m_num;
004f6c01          
004f6c09          if (i_1 < edx_5)
004f6c09          {
004f6c0b              edx_5 = ecx_9->m_rgSourceImages.m_data;
004f6c0e              *(uint32_t*)(edx_5 + (i_1 << 2)) = eax_9;
004f6c11              ecx_9 = this;
004f6c09          }
004f6c09          
004f6c15          i_1 += 1;
004f6c19      } while (i_1 <= 0xc);
004f6ae0  }

004f6c21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004f6c30  void VividTargetIndicator::Draw(uint32_t arg1, enum ObjectSelectStatus arg2, struct tagRECT const* arg3, float const arg4)

004f6c30  {
004f6c30      class VividTargetIndicator* VividTargetIndicator::s_pVTInstance_1 = VividTargetIndicator::s_pVTInstance;
004f6c30      
004f6c38      if (VividTargetIndicator::s_pVTInstance_1 != 0)
004f6c4e          VividTargetIndicator::OnDraw(VividTargetIndicator::s_pVTInstance_1, arg1, arg2, arg3, arg4);
004f6c30  }

004f6c54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f6c60  uint8_t __thiscall VividTargetIndicator::Initialized(class VividTargetIndicator* this, class gmSmartBoxUI* arg2)

004f6c60  {
004f6c7b      this->m_pOffScreen = UIElement::GetChild(arg2, 0x10000045);
004f6c7e      class UIElement* eax_1 = UIElement::GetChild(arg2, 0x10000038);
004f6c8a      this->m_pOnScreen = eax_1;
004f6c8d      class UIElement* eax_2 = UIElement::GetChild(eax_1, 0x10000039);
004f6c8d      
004f6c96      if (this->m_rgOnScreenCorners.m_num > 1)
004f6c98          this->m_rgOnScreenCorners.m_data[1] = eax_2;
004f6c98      
004f6ca6      class UIElement* eax_3 = UIElement::GetChild(this->m_pOnScreen, 0x1000003a);
004f6ca6      
004f6caf      if (this->m_rgOnScreenCorners.m_num > 2)
004f6cb1          this->m_rgOnScreenCorners.m_data[2] = eax_3;
004f6cb1      
004f6cbf      class UIElement* eax_4 = UIElement::GetChild(this->m_pOnScreen, 0x1000003b);
004f6cbf      
004f6cc8      if (this->m_rgOnScreenCorners.m_num > 3)
004f6cca          this->m_rgOnScreenCorners.m_data[3] = eax_4;
004f6cca      
004f6cd8      class UIElement* eax_5 = UIElement::GetChild(this->m_pOnScreen, 0x1000003c);
004f6cd8      
004f6ce1      if (this->m_rgOnScreenCorners.m_num > 4)
004f6ce3          this->m_rgOnScreenCorners.m_data[4] = eax_5;
004f6ce3      
004f6cf9      class UIElement* m_data;
004f6cf9      
004f6cf9      if ((this->m_pOffScreen != 0 && this->m_pOnScreen != 0))
004f6cf9      {
004f6cff          m_data = this->m_rgOnScreenCorners.m_data;
004f6cff          
004f6d28          if ((m_data->m_hashElementsRegisteredWith.vtable != 0 && (m_data->m_hashElementsRegisteredWith.m_intrusiveTable.vtable != 0 && (m_data->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[0] != 0 && m_data->m_hashElementsRegisteredWith.m_intrusiveTable.m_aInplaceBuckets[1] != 0))))
004f6d28          {
004f6d2e              class GlobalEventHandler* eax_6 = GlobalEventHandler::GetGlobalEventHandler();
004f6d2e              
004f6d37              if (eax_6 != 0)
004f6d37              {
004f6d39                  eax_6->vtable->RegisterNoticeHandler(0x4dd1ef, this);
004f6d46                  eax_6->vtable->RegisterNoticeHandler(0x4dd1f0, this);
004f6d53                  eax_6->vtable->RegisterNoticeHandler(0x4dd21f, this);
004f6d60                  eax_6->vtable->RegisterNoticeHandler(0x186a8, this);
004f6d37              }
004f6d37              
004f6d6d              QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(7, 0x1a, &this->vtable);
004f6d80              QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 7, 0x1a, &this->vtable);
004f6d92              QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 1, 0x86, &this->vtable);
004f6da7              QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 1, 0x5f, &this->vtable);
004f6db9              QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 1, 0x85, &this->vtable);
004f6dce              QualityRegistrar::s_pQR->vtable->RegisterQualityHandler(0, 5, 1, &this->vtable);
004f6de2              VividTargetIndicator::UpdateDisplayState(this);
004f6de7              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
004f6de7              
004f6def              if (SmartBox::smartbox_1 != 0)
004f6df6                  SmartBox::SetTargettingCallback(SmartBox::smartbox_1, VividTargetIndicator::Draw);
004f6df6              
004f6dfc              int32_t eax_12;
004f6dfc              eax_12 = 1;
004f6dff              return 1;
004f6d28          }
004f6cf9      }
004f6cf9      
004f6e02      this->m_bDisplayOn = 0;
004f6e07      m_data = 0;
004f6e0a      return 0;
004f6c60  }

004f6e0d                                         90 90 90                                                               ...

004f6e10  class DBObj* CLandBlockInfo::Allocator()

004f6e10  {
004f6e12      void* eax = operator new(0x60);
004f6e12      
004f6e1c      if (eax == 0)
004f6e27          return 0;
004f6e27      
004f6e20      /* tailcall */
004f6e20      return CLandBlockInfo::CLandBlockInfo(eax);
004f6e10  }

004f6e28                          90 90 90 90 90 90 90 90                                                          ........

004f6e30  class DBObj* CLandBlock::Allocator()

004f6e30  {
004f6e35      void* eax = operator new(0x130);
004f6e35      
004f6e3f      if (eax == 0)
004f6e4a          return 0;
004f6e4a      
004f6e43      /* tailcall */
004f6e43      return CLandBlock::CLandBlock(eax);
004f6e30  }

004f6e4b                                   90 90 90 90 90                                                             .....

004f6e50  void __thiscall TransientArchive::TransientArchive(class TransientArchive* this, enum Archive::tagUnpacking arg2, void* arg3, uint32_t arg4)

004f6e50  {
004f6e59      this->vtable = 0x792b3c;
004f6e5f      this->m_flags = 0;
004f6e65      this->m_hrError.m_val = 0;
004f6e68      SmartBuffer::SmartBuffer(&this->m_buffer);
004f6e7b      this->m_currOffset = 0;
004f6e7e      this->m_pcUserDataHash = nullptr;
004f6e81      this->m_pVersionStack = nullptr;
004f6e84      this->vtable = 0x792b50;
004f6e97      void var_c;
004f6e97      Archive::InitForUnpacking(this, &Archive::SetCurrentCoreVersion, SmartBuffer::SmartBuffer(&var_c, arg3, arg4));
004f6ea0      SmartBuffer::~SmartBuffer(&var_c);
004f6e50  }

004f6eaf                                               90                                                                 .

004f6eb0  class DBObj* CEnvCell::Allocator()

004f6eb0  {
004f6eb5      void* eax = operator new(0x148);
004f6eb5      
004f6ebf      if (eax == 0)
004f6eca          return 0;
004f6eca      
004f6ec3      /* tailcall */
004f6ec3      return CEnvCell::CEnvCell(eax);
004f6eb0  }

004f6ecb                                   90 90 90 90 90                                                             .....

004f6ed0  class DBObj* CGfxObj::Allocator()

004f6ed0  {
004f6ed5      void* eax = operator new(0xb8);
004f6ed5      
004f6edf      if (eax == 0)
004f6eea          return 0;
004f6eea      
004f6ee3      /* tailcall */
004f6ee3      return CGfxObj::CGfxObj(eax);
004f6ed0  }

004f6eeb                                   90 90 90 90 90                                                             .....

004f6ef0  class DBObj* CAnimation::Allocator()

004f6ef0  {
004f6ef2      void* eax = operator new(0x50);
004f6ef2      
004f6efc      if (eax == 0)
004f6f07          return 0;
004f6f07      
004f6f00      /* tailcall */
004f6f00      return CAnimation::CAnimation(eax);
004f6ef0  }

004f6f08                          90 90 90 90 90 90 90 90                                                          ........

004f6f10  class DBObj* CSetup::Allocator()

004f6f10  {
004f6f15      void* eax = operator new(0xd8);
004f6f15      
004f6f1f      if (eax == 0)
004f6f2a          return 0;
004f6f2a      
004f6f23      /* tailcall */
004f6f23      return CSetup::CSetup(eax);
004f6f10  }

004f6f2b                                   90 90 90 90 90                                                             .....

004f6f30  class DBObj* Palette::Allocator()

004f6f30  {
004f6f32      void* eax = operator new(0x48);
004f6f32      
004f6f3c      if (eax == 0)
004f6f4d          return 0;
004f6f4d      
004f6f4a      return Palette::Palette(eax, 0x800);
004f6f30  }

004f6f4e                                            90 90                                                                ..

004f6f50  class DBObj* ImgTex::Allocator()

004f6f50  {
004f6f55      void* eax = operator new(0x88);
004f6f55      
004f6f5f      if (eax == 0)
004f6f6d          return 0;
004f6f6d      
004f6f6a      return ImgTex::ImgTex(eax, nullptr);
004f6f50  }

004f6f6e                                            90 90                                                                ..

004f6f70  class DBObj* CSurface::Allocator()

004f6f70  {
004f6f75      void* eax = operator new(0x90);
004f6f75      
004f6f7f      if (eax == 0)
004f6f8a          return 0;
004f6f8a      
004f6f83      /* tailcall */
004f6f83      return CSurface::CSurface(eax);
004f6f70  }

004f6f8b                                   90 90 90 90 90                                                             .....

004f6f90  class DBObj* DBWave::Allocator()

004f6f90  {
004f6f95      void* eax = operator new(0xa0);
004f6f95      
004f6f9f      if (eax == 0)
004f6fb2          return 0;
004f6fb2      
004f6faf      return DBWave::DBWave(eax, INVALID_DID.id);
004f6f90  }

004f6fb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004f6fc0  class DBObj* CEnvironment::Allocator()

004f6fc0  {
004f6fc2      void* eax = operator new(0x40);
004f6fc2      
004f6fcc      if (eax == 0)
004f6fd7          return 0;
004f6fd7      
004f6fd0      /* tailcall */
004f6fd0      return CEnvironment::CEnvironment(eax);
004f6fc0  }

004f6fd8                                                                          90 90 90 90 90 90 90 90                          ........

004f6fe0  class DBObj* ChatPoseTable::Allocator()

004f6fe0  {
004f6fe2      void* eax = operator new(0x60);
004f6fe2      
004f6fec      if (eax == 0)
004f6fff          return 0;
004f6fff      
004f6ffc      return ChatPoseTable::ChatPoseTable(eax, INVALID_DID.id);
004f6fe0  }


004f7000  class DBObj* cWObjHierRootNode::Allocator()

004f7000  {
004f7002      void* eax = operator new(0x50);
004f7002      
004f700c      if (eax == 0)
004f701f          return 0;
004f701f      
004f701c      return cWObjHierRootNode::cWObjHierRootNode(eax, INVALID_DID.id);
004f7000  }


004f7020  class DBObj* BadData::Allocator()

004f7020  {
004f7022      void* eax = operator new(0x50);
004f7022      
004f702c      if (eax == 0)
004f703f          return 0;
004f703f      
004f703c      return BadData::BadData(eax, INVALID_DID.id);
004f7020  }


004f7040  class DBObj* TabooTable::Allocator()

004f7040  {
004f7045      void* eax = operator new(0xa8);
004f7045      
004f704f      if (eax == 0)
004f705a          return 0;
004f705a      
004f7053      /* tailcall */
004f7053      return TabooTable::TabooTable(eax);
004f7040  }

004f705b                                                                                   90 90 90 90 90                             .....

004f7060  class DBObj* DBFile2IDTable::Allocate(class DBFile2IDTable const* this @ ecx)

004f7060  {
004f7066      void* result = operator new(0x120);
004f7066      
004f7072      if (result == 0)
004f70a2          return 0;
004f70a2      
004f7085      int32_t var_c_1 = 0;
004f7089      TFile2IDTable::TFile2IDTable(((char*)result + 0x30), DBObj::DBObj(result, INVALID_DID.id));
004f708e      *(uint32_t*)((char*)result + 0x30) = 0x7c5860;
004f7095      *(uint32_t*)result = 0x7c5808;
004f709e      return result;
004f7060  }

004f70a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004f70b0  uint32_t ConfirmationTextInputDialog::GetUIElementType(class ConfirmationTextInputDialog const* this @ ecx) __pure

004f70b0  {
004f70b5      return 0x15;
004f70b0  }

004f70b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004f70c0  void* __thiscall DBFile2IDTable::`scalar deleting destructor'(class DBFile2IDTable* this, uint32_t arg2)

004f70c0  {
004f70c3      DBFile2IDTable::~DBFile2IDTable(this);
004f70c3      
004f70cd      if ((arg2 & 1) != 0)
004f70d0          operator delete(this);
004f70d0      
004f70db      return this;
004f70c0  }

004f70de                                                                                            90 90                                ..

004f70e0  void __fastcall DBFile2IDTable::~DBFile2IDTable(class DBFile2IDTable* this)

004f70e0  {
004f70e6      this->vtable = 0x7c5808;
004f70e3      this->vtable = &TFile2IDTable::`vftable';
004f70f2      TFile2IDTable::~TFile2IDTable(&this->vtable);
004f70fa      /* tailcall */
004f70fa      return DBObj::~DBObj(this);
004f70e0  }

004f70ff                                                                                               90                                 .

004f7100  class DBObj* NameFilterTable::Allocator()

004f7100  {
004f7105      void* eax = operator new(0xa8);
004f7105      
004f710f      if (eax == 0)
004f711a          return 0;
004f711a      
004f7113      /* tailcall */
004f7113      return NameFilterTable::NameFilterTable(eax);
004f7100  }

004f711b                                                                                   90 90 90 90 90                             .....

004f7120  class DBObj* PalSet::Allocator()

004f7120  {
004f7122      void* eax = operator new(0x40);
004f7122      
004f712c      if (eax == 0)
004f713f          return 0;
004f713f      
004f713c      return PalSet::PalSet(eax, INVALID_DID.id);
004f7120  }


004f7140  class DBObj* ClothingTable::Allocator()

004f7140  {
004f7142      void* eax = operator new(0x60);
004f7142      
004f714c      if (eax == 0)
004f715f          return 0;
004f715f      
004f715c      return ClothingTable::ClothingTable(eax, INVALID_DID.id);
004f7140  }


004f7160  class DBObj* GfxObjDegradeInfo::Allocator()

004f7160  {
004f7162      void* eax = operator new(0x40);
004f7162      
004f716c      if (eax == 0)
004f7177          return 0;
004f7177      
004f7170      /* tailcall */
004f7170      return GfxObjDegradeInfo::GfxObjDegradeInfo(eax);
004f7160  }

004f7178                                                                          90 90 90 90 90 90 90 90                          ........

004f7180  class DBObj* Scene::Allocator()

004f7180  {
004f7182      void* eax = operator new(0x48);
004f7182      
004f718c      if (eax == 0)
004f719f          return 0;
004f719f      
004f719c      return Scene::Scene(eax, INVALID_DID.id);
004f7180  }


004f71a0  class DBObj* CRegionDesc::Allocator()

004f71a0  {
004f71a2      void* eax = operator new(0x78);
004f71a2      
004f71ac      if (eax == 0)
004f71bf          return 0;
004f71bf      
004f71bc      return CRegionDesc::CRegionDesc(eax, INVALID_DID.id);
004f71a0  }


004f71c0  class DBObj* CMasterInputMap::Allocator()

004f71c0  {
004f71c5      void* eax = operator new(0x148);
004f71c5      
004f71cf      if (eax == 0)
004f71da          return 0;
004f71da      
004f71d3      /* tailcall */
004f71d3      return CMasterInputMap::CMasterInputMap(eax);
004f71c0  }

004f71db                                                                                   90 90 90 90 90                             .....

004f71e0  class DBObj* CSoundTable::Allocator()

004f71e0  {
004f71e5      void* eax = operator new(0xc0);
004f71e5      
004f71ef      if (eax == 0)
004f7202          return 0;
004f7202      
004f71ff      return CSoundTable::CSoundTable(eax, INVALID_DID.id);
004f71e0  }

004f7203           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004f7210  class DBObj* ActionMap::Allocator()

004f7210  {
004f7215      void* eax = operator new(0x120);
004f7215      
004f721f      if (eax == 0)
004f722a          return 0;
004f722a      
004f7223      /* tailcall */
004f7223      return ActionMap::ActionMap(eax);
004f7210  }

004f722b                                   90 90 90 90 90                                                             .....

004f7230  class DBObj* String::Allocator()

004f7230  {
004f7232      void* eax = operator new(0x38);
004f7232      
004f723c      if (eax == 0)
004f724f          return 0;
004f724f      
004f724c      return String::String(eax, INVALID_DID.id);
004f7230  }


004f7250  class DBObj* ParticleEmitterInfo::Allocator()

004f7250  {
004f7255      void* eax = operator new(0xf8);
004f7255      
004f725f      if (eax == 0)
004f726a          return 0;
004f726a      
004f7263      /* tailcall */
004f7263      return ParticleEmitterInfo::ParticleEmitterInfo(eax);
004f7250  }

004f726b                                   90 90 90 90 90                                                             .....

004f7270  class DBObj* PhysicsScript::Allocator()

004f7270  {
004f7272      void* eax = operator new(0x50);
004f7272      
004f727c      if (eax == 0)
004f7287          return 0;
004f7287      
004f7280      /* tailcall */
004f7280      return PhysicsScript::PhysicsScript(eax);
004f7270  }

004f7288                          90 90 90 90 90 90 90 90                                                          ........

004f7290  class DBObj* PhysicsScriptTable::Allocator()

004f7290  {
004f7295      void* eax = operator new(0xb0);
004f7295      
004f729f      if (eax == 0)
004f72aa          return 0;
004f72aa      
004f72a3      /* tailcall */
004f72a3      return PhysicsScriptTable::PhysicsScriptTable(eax);
004f7290  }

004f72ab                                   90 90 90 90 90                                                             .....

004f72b0  class DBObj* DBPropertyCollection::Allocator()

004f72b0  {
004f72b5      void* eax = operator new(0xa8);
004f72b5      
004f72bf      if (eax != 0)
004f72bf      {
004f72c3          int32_t eax_1 = DBPropertyCollection::DBPropertyCollection(eax);
004f72c3          
004f72ca          if (eax_1 != 0)
004f72cf              return (eax_1 + 0x78);
004f72bf      }
004f72bf      
004f72d2      return 0;
004f72b0  }

004f72d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004f72e0  uint32_t __fastcall DDD_DataMessage::GetCompressedSize(class DDD_DataMessage const* this)

004f72e0  {
004f72ee      if (SmartBuffer::GetSize(&this->m_cpData.m_buff) <= 4)
004f72ff          return 0;
004f72ff      
004f72fb      return (SmartBuffer::GetSize(&this->m_cpData.m_buff) - 4);
004f72e0  }


004f7300  void __fastcall CLCache::ResetCache(class CLCache* this)

004f7300  {
004f7300      this->m_DDDState = dddIdle;
004f730a      /* tailcall */
004f730a      return DBCache::ResetCache(this);
004f7300  }

004f730f                                               90                                                                 .

004f7310  class DBObj* __thiscall CLCache::BlockingGet(class CLCache* this, uint32_t arg2, struct QualifiedDataID const* arg3)

004f7310  {
004f7310      /* tailcall */
004f7310      return AsyncCache::BlockingGet(this, arg2, arg3);
004f7310  }

004f7315                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004f7320  uint8_t __thiscall CLCache::ReloadObject(class CLCache* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

004f7320  {
004f7320      /* tailcall */
004f7320      return DBCache::ReloadObject(this, arg2, arg3);
004f7320  }

004f7325                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004f7330  void __thiscall CLCache::SetNetQueue(class CLCache* this, class NIList<NetBlob *>* arg2)

004f7330  {
004f7334      this->m_pNetQueue = arg2;
004f7330  }

004f733d                                                                                         90 90 90                               ...

004f7340  void __thiscall CLCache::WorkerExecuteRequest(class CLCache* this, struct AsyncCache::CAsyncRequest* arg2)

004f7340  {
004f734c      if (arg2->__inner1 == 3)
004f7355          /* jump -> this->vtable->WorkerExecuteBeginDDDRequest */
004f7355      
004f734e      /* tailcall */
004f734e      return ThreadedCache::WorkerExecuteRequest(this, arg2);
004f7340  }

004f7358                                                                          90 90 90 90 90 90 90 90                          ........

004f7360  void __thiscall CLCache::OnRequestFinished(class CLCache* this, struct AsyncCache::CAsyncRequest* arg2)

004f7360  {
004f736c      if (arg2->__inner1 == 3)
004f7379          /* jump -> *(uint32_t*)(this->vtable + 0x78) */
004f7379      
004f736e      /* tailcall */
004f736e      return AsyncCache::OnRequestFinished(this, arg2);
004f7360  }

004f737c                                                                                      90 90 90 90                              ....

004f7380  void __fastcall HashBase<unsigned long>::~HashBase<unsigned long>(class HashBase<unsigned long>* this)

004f7380  {
004f7383      bool cond:0 = this->fPlacementNew_ != 0;
004f7385      this->vtable = 0x7c66b0;
004f7385      
004f738b      if (!(cond:0))
004f7391          operator delete[](this->buckets);
004f7380  }

004f7398                                                                          90 90 90 90 90 90 90 90                          ........

004f73a0  void __thiscall HashBase<unsigned long>::InternalInit(class HashBase<unsigned long>* this, uint32_t arg2)

004f73a0  {
004f73a4      int32_t eax = 1;
004f73ab      this->table_size = arg2;
004f73ae      this->key_shift = 8;
004f73b5      this->table_mask = 0;
004f73b5      
004f73bc      if (arg2 > 1)
004f73bc      {
004f73d3          uint32_t edi_2;
004f73d3          
004f73d3          do
004f73d3          {
004f73c3              edi_2 = (this->table_mask | eax);
004f73c5              eax <<= 1;
004f73c9              this->table_mask = edi_2;
004f73d3          } while ((edi_2 | eax) < this->table_size);
004f73bc      }
004f73bc      
004f73d7      int32_t i = 0;
004f73d7      
004f73db      if (arg2 > 0)
004f73db      {
004f73f0          do
004f73f0          {
004f73e0              this->buckets[i] = 0;
004f73ed              i += 1;
004f73f0          } while (i < this->table_size);
004f73db      }
004f73a0  }

004f73f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004f7400  void __fastcall HashBaseIter<unsigned long>::DeleteCurrent(class HashBaseIter<unsigned long>* this)

004f7400  {
004f7408      if (this->fEnd_ == 0)
004f7408      {
004f740a          class HashBaseData<unsigned long>* lastThisChain_ = this->lastThisChain_;
004f740f          class HashBaseData<unsigned long>* curPtr_ = this->curPtr_;
004f7413          class HashBaseData<unsigned long>* hash_next;
004f7413          
004f7413          if (lastThisChain_ == 0)
004f7413          {
004f7423              this->myHash_->buckets[this->curBucket_] = curPtr_->hash_next;
004f7439              hash_next = this->myHash_->buckets[this->curBucket_];
004f7413          }
004f7413          else
004f7413          {
004f7418              lastThisChain_->hash_next = curPtr_->hash_next;
004f741e              hash_next = this->lastThisChain_->hash_next;
004f7413          }
004f7413          
004f743c          class HashBaseData<unsigned long>* curPtr__1 = this->curPtr_;
004f743c          
004f7441          if (curPtr__1 != 0)
004f7443              curPtr__1->vtable->__vecDelDtor(1);
004f7443          
004f744b          if (hash_next == 0)
004f744b          {
004f744d              class HashBase<unsigned long>* myHash_ = this->myHash_;
004f744d              
004f746f              do
004f746f              {
004f7453                  uint32_t edi_2 = (this->curBucket_ + 1);
004f7454                  this->lastThisChain_ = nullptr;
004f745b                  this->curBucket_ = edi_2;
004f745b                  
004f7465                  if (edi_2 >= myHash_->table_size)
004f7465                  {
004f7478                      this->fEnd_ = 1;
004f747f                      this->curPtr_ = nullptr;
004f7487                      return;
004f7465                  }
004f7465                  
004f746a                  hash_next = myHash_->buckets[edi_2];
004f746f              } while (hash_next == 0);
004f744b          }
004f744b          
004f7471          this->curPtr_ = hash_next;
004f7408      }
004f7400  }

004f7488                          90 90 90 90 90 90 90 90                                                          ........

004f7490  void __fastcall SerializeUsingPackDBObj::Serialize(class SerializeUsingPackDBObj* this, class Archive* arg2)

004f7490  {
004f7490      class SerializeUsingPackDBObj* this_1 = this;
004f7493      class Archive* esi = arg2;
004f749b      DBObj::Serialize(this, esi);
004f749b      
004f74a4      if ((esi->m_flags & 1) == 0)
004f74a4      {
004f74e9          uint32_t eax_1 = Archive::GetSizeLeft(esi);
004f74fb          uint8_t* eax_3 = Archive::PeekBytes(esi, Archive::GetCurrentPosition(esi), eax_1);
004f7500          struct PackObj::VTable* vtable_1 = this->vtable;
004f750e          arg2 = eax_3;
004f750e          
004f7517          if (vtable_1->UnPack(&arg2, eax_1) != 0)
004f7517          {
004f7522              Archive::GetBytes(esi, ((char*)arg2 - eax_3));
004f752c              return;
004f7517          }
004f7517          
004f7531          Archive::RaiseError(esi);
004f74a4      }
004f74a4      else
004f74a4      {
004f74a6          struct PackObj::VTable* vtable = this->vtable;
004f74b5          arg2 = nullptr;
004f74bd          uint32_t eax = vtable->Pack(&arg2, 0);
004f74c5          uint8_t* this_2 = Archive::GetBytes(esi, eax);
004f74cc          this_1 = this_2;
004f74cc          
004f74d0          if (this_2 != 0)
004f74af              this->vtable->Pack(&this_1, eax);
004f74a4      }
004f7490  }

004f753e                                                                                            90 90                                ..

004f7540  void* __thiscall SerializeUsingPackDBObj::`vector deleting destructor'(class SerializeUsingPackDBObj* this, uint32_t arg2)

004f7540  {
004f7543      /* tailcall */
004f7543      return SerializeUsingPackDBObj::`scalar deleting destructor'(((char*)this - 0x30), arg2);
004f7540  }

004f7548                          cc cc cc cc cc cc cc cc                                                          ........

004f7550  void __fastcall SerializeUsingPackDBObj::~SerializeUsingPackDBObj(class SerializeUsingPackDBObj* this)

004f7550  {
004f7552      if (this != 0)
004f7552      {
004f7554          this->vtable = &PackObj::`vftable';
004f755d          /* tailcall */
004f755d          return DBObj::~DBObj(this);
004f7552      }
004f7552      
004f7564      *nullptr = 0x79285c;
004f756a      /* tailcall */
004f756a      return DBObj::~DBObj(this);
004f7550  }

004f756f                                               90                                                                 .

004f7570  void __fastcall Font::Font(class Font* this)

004f7570  {
004f757a      DBObj::DBObj(this, INVALID_DID.id);
004f7585      this->vtable = 0x7c5938;
004f758b      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004f7597      this->m_ForegroundSurfaceFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
004f759a      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
004f759c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004f75a7      this->m_BackgroundSurfaceFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004f75aa      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
004f75ae      Font::Begin(this);
004f7570  }

004f75b8                                                                          90 90 90 90 90 90 90 90                          ........

004f75c0  uint32_t Font::GetDBOType(class Font const* this @ ecx) __pure

004f75c0  {
004f75c5      return 0x2e;
004f75c0  }

004f75c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f75d0  void __fastcall Font::~Font(class Font* this)

004f75d0  {
004f75d5      this->vtable = 0x7c5938;
004f75db      Font::End(this);
004f75e9      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_BackgroundSurfaceFileName.m_charbuffer - 0x14);
004f75e9      
004f75f8      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
004f7600          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
004f7600      
004f7605      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->m_ForegroundSurfaceFileName.m_charbuffer - 0x14);
004f7605      
004f7614      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
004f761c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
004f761c      
004f7623      /* tailcall */
004f7623      return DBObj::~DBObj(this);
004f75d0  }

004f7628                          90 90 90 90 90 90 90 90                                                          ........

004f7630  class DBObj* Font::Allocate(class Font const* this @ ecx)

004f7630  {
004f7632      void* eax = operator new(0x70);
004f7632      
004f763c      if (eax == 0)
004f7647          return 0;
004f7647      
004f7640      /* tailcall */
004f7640      return Font::Font(eax);
004f7630  }

004f7648                          90 90 90 90 90 90 90 90                                                          ........

004f7650  void __fastcall FontLocal::FontLocal(class FontLocal* this)

004f7650  {
004f765a      DBObj::DBObj(this, INVALID_DID.id);
004f7665      this->vtable = 0x7c5938;
004f766b      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004f7677      this->m_ForegroundSurfaceFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
004f767a      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
004f767c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004f7687      this->m_BackgroundSurfaceFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
004f768a      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
004f768e      Font::Begin(this);
004f7694      this->vtable = 0x7c5990;
004f7650  }

004f769e                                                                                            90 90                                ..

004f76a0  uint32_t FontLocal::GetDBOType(class FontLocal const* this @ ecx) __pure

004f76a0  {
004f76a5      return 0x2f;
004f76a0  }

004f76a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f76b0  void __thiscall FakeMessageData::Serialize(class FakeMessageData* this, class Archive* arg2)

004f76b0  {
004f76bc      if ((arg2->m_flags & 1) != 0)
004f76bc      {
004f76c2          Archive::CheckAlignment(arg2, 4);
004f76cb          uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
004f76cb          
004f76d2          if (eax_1 != 0)
004f76d2          {
004f76d8              if ((arg2->m_flags & 1) != 0)
004f76d8              {
004f76de                  *(uint32_t*)eax_1 = this->m_et;
004f76e1                  return;
004f76d8              }
004f76d8              
004f76e6              this->m_et = *(uint32_t*)eax_1;
004f76d2          }
004f76bc      }
004f76b0  }

004f76ee                                            90 90                                                                ..

004f76f0  void __fastcall DDD_DataMessage::DDD_DataMessage(class DDD_DataMessage* this)

004f76f0  {
004f76f5      this->m_et = 0xf7e2;
004f76fc      this->vtable = 0x7c59e8;
004f7705      this->m_cpData.m_dwOffset = 0;
004f7708      this->m_cpData.m_iVersion = 0;
004f770b      SmartBuffer::SmartBuffer(&this->m_cpData.m_buff);
004f76f0  }

004f7714                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f7720  class TResult* __thiscall CLCache::QueryInterface(class CLCache* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

004f7720  {
004f7729      int32_t* i = &CLCache_InterfaceType;
004f772f      uint32_t m_data1 = arg3->m_data1;
004f7731      int32_t var_10 = 0x7c56a0;
004f7735      int32_t var_c = 0;
004f773d      int32_t var_8 = 0;
004f7745      int32_t var_4 = 0;
004f774d      int32_t* edx = &var_10;
004f774d      
004f7775      do
004f7775      {
004f776b          if ((*(uint32_t*)i == m_data1 && (i[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (i[2] == arg3->m_data4[0] && i[3] == arg3->m_data4[4]))))
004f776b          {
004f779a              void** edi = arg4;
004f779a              
004f77a0              if (edi != 0)
004f77a0              {
004f77a2                  int32_t* esi_1 = edx[1];
004f77ac                  *(uint32_t*)(*(uint32_t*)((char*)esi_1 + this) + 0x10)();
004f77af                  *(uint32_t*)edi = ((char*)esi_1 + this);
004f77a0              }
004f77a0              
004f77b9              __return->m_val = 0;
004f77bf              return __return;
004f776b          }
004f776b          
004f776d          i = edx[2];
004f7770          edx = &edx[2];
004f7775      } while (i != 0);
004f7775      
004f7789      uint32_t* __return_1 = __return;
004f778f      *(uint32_t*)__return_1 = DBCache::QueryInterface(this, &arg4, arg3, arg4)->m_val;
004f7797      return __return_1;
004f7720  }

004f77c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004f77d0  void __thiscall CLCache::WorkerExecuteBeginDDDRequest(class CLCache* this, struct CLCache::CAsyncBeginDDDRequest* arg2)

004f77d0  {
004f77d3      int32_t __saved_ebx_1;
004f77d3      int32_t __saved_ebx = __saved_ebx_1;
004f77dc      int32_t eax = 0;
004f77e0      int32_t var_c = 0;
004f77e0      
004f77e4      if (this->m_MissingIters.m_num <= 0)
004f77e4      {
004f78f9          arg2->Result = AsyncResult_Success;
004f7904          return;
004f77e4      }
004f77e4      
004f77ea      int32_t ebp;
004f77ea      int32_t var_1c = ebp;
004f77eb      int32_t esi;
004f77eb      int32_t var_20 = esi;
004f77ec      int32_t edi;
004f77ec      int32_t var_24 = edi;
004f77ec      int32_t* esp_1 = &var_24;
004f77ed      int32_t var_14 = 0;
004f78da      bool cond:2_1;
004f78da      
004f78da      do
004f78da      {
004f77f1          class MissingIteration* m_data_1 = this->m_MissingIters.m_data;
004f77f7          int32_t ebp_1 = *(uint32_t*)(&m_data_1->idDatFile + eax);
004f77fb          int32_t ecx_1 = *(uint32_t*)((eax + m_data_1) + 0xc);
004f7805          int32_t i = 0;
004f7807          bool cond:3_1 = this->m_DatFiles.m_num <= 0;
004f7809          esp_1[8] = ecx_1;
004f7809          
004f780d          if (cond:3_1)
004f780d              goto label_4f7840;
004f780d          
004f7831          do
004f7831          {
004f781b              int32_t eax_3;
004f781b              int32_t edx_2;
004f781b              eax_3 = this->m_DatFiles.m_data[i]->vtable->GetDatFileID();
004f781b              
004f7826              if ((ebp_1 == eax_3 && esp_1[8] == edx_2))
004f7826                  break;
004f7826              
004f782e              i += 1;
004f7831          } while (i < this->m_DatFiles.m_num);
004f7831          
004f7836          if (i < 4)
004f7836          {
004f783c              ecx_1 = esp_1[8];
004f7840          label_4f7840:
004f7840              class MissingIteration* m_data = this->m_MissingIters.m_data;
004f784e              bool cond:1_1 = *(uint32_t*)(&*(uint32_t*)((char*)m_data->IDsToPurge)[8] + esp_1[4]) <= 0;
004f7850              esp_1[5] = 0;
004f7850              
004f7858              if (!(cond:1_1))
004f7858              {
004f786f                  while (true)
004f786f                  {
004f786f                      void* esi_2 = (*(uint32_t*)(&m_data->IDsToPurge + esp_1[4]) + (esp_1[5] << 3));
004f7872                      bool cond:4_1 = *(uint32_t*)esi_2 != 1;
004f7875                      *(uint32_t*)((char*)esp_1 - 4) = ecx_1;
004f7876                      *(uint32_t*)((char*)esp_1 - 8) = ebp_1;
004f7879                      *(uint32_t*)((char*)esp_1 - 0xc) = esi_2;
004f7879                      esp_1 -= 0xc;
004f7879                      
004f787a                      if (cond:4_1)
004f785a                          this->vtable->PurgeData();
004f787a                      else
004f787a                      {
004f787e                          int32_t* eax_7 = this->vtable->GetDiskController();
004f787e                          
004f7886                          if (eax_7 != 0)
004f7886                          {
004f7888                              int32_t edx_6 = *(uint32_t*)eax_7;
004f788f                              *(uint32_t*)((char*)esp_1 - 4) = 0xffff0000;
004f7893                              *(uint32_t*)((char*)esp_1 - 8) = *(uint32_t*)((char*)esi_2 + 4);
004f7896                              *(uint32_t*)(edx_6 + 0x18)();
004f7886                          }
004f787a                      }
004f787a                      
004f78a7                      m_data = this->m_MissingIters.m_data;
004f78b5                      int32_t ecx_7 = (esp_1[5] + 1);
004f78b6                      bool cond:5_1 = ecx_7 < *(uint32_t*)(&*(uint32_t*)((char*)m_data->IDsToPurge)[8] + esp_1[4]);
004f78b8                      esp_1[5] = ecx_7;
004f78b8                      
004f78bc                      if (!(cond:5_1))
004f78bc                          break;
004f78bc                      
004f785f                      ecx_1 = esp_1[8];
004f786f                  }
004f7858              }
004f7836          }
004f7836          
004f78cc          int32_t ecx_9 = (esp_1[6] + 1);
004f78cd          eax = (esp_1[4] + 0x30);
004f78d0          cond:2_1 = ecx_9 < this->m_MissingIters.m_num;
004f78d2          esp_1[6] = ecx_9;
004f78d6          esp_1[4] = eax;
004f78da      } while (cond:2_1);
004f78e4      *(uint32_t*)esp_1;
004f78e4      esp_1[1];
004f78e4      esp_1[2];
004f78e7      *(uint32_t*)(esp_1[0xa] + 8) = 1;
004f78e4      esp_1[3];
004f77d0  }

004f7907                       90 90 90 90 90 90 90 90 90                                                         .........

004f7910  uint8_t __thiscall CLCache::InqDatIDStamp(class CLCache const* this, class DatIDStamp* arg2)

004f7910  {
004f7916      class DiskController* ecx = *(uint32_t*)this->m_DatFiles.m_data;
004f7916      
004f791d      if (ecx == 0)
004f791d      {
004f7944          class DiskController** eax_3;
004f7944          eax_3 = 0;
004f7949          return 0;
004f791d      }
004f791d      
004f792e      void var_14;
004f792e      DatIDStamp::DatIDStamp(arg2, ecx->vtable->GetDatIDStamp(&var_14));
004f7937      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&var_14);
004f793c      int32_t eax_2;
004f793c      eax_2 = 1;
004f7941      return 1;
004f7910  }

004f794c                                      90 90 90 90                                                              ....

004f7950  class TResult* __stdcall CLCache::AdoptAndDeliverMessage(class CLCache* this @ ecx, class TResult* __return, class FakeMessageData* arg3)

004f7950  {
004f7954      int32_t var_38 = 0;
004f795a      void var_24;
004f795a      enum Archive::tagPacking edx;
004f795a      TransientArchive::TransientArchive(&var_24, edx);
004f7963      arg3->vtable->Serialize(&var_24);
004f7975      int32_t var_20;
004f7975      
004f7975      if ((((int8_t)(var_20 >> 2)) & 1) == 0)
004f7975      {
004f7980          void __return_1;
004f7980          Archive::GetSerializedBuffer(&var_24, &__return_1);
004f7989          uint32_t eax_3 = SmartBuffer::GetSize(&__return_1);
004f79a3          void* ecx_5 = &__return_1;
004f79a3          
004f79a7          if (Proto_UI::SendToDatabase(SmartBuffer::GetBuffer(&__return_1), eax_3) != 0)
004f79a7          {
004f79a9              SmartBuffer::Orphan(ecx_5);
004f79b6              __return->m_val = 0;
004f79bc              SmartBuffer::~SmartBuffer(&__return_1);
004f79c5              Archive::~Archive(&var_24);
004f79d0              return __return;
004f79a7          }
004f79a7          
004f79d3          SmartBuffer::~SmartBuffer(ecx_5);
004f7975      }
004f7975      
004f79e0      __return->m_val = 0x80004005;
004f79e6      Archive::~Archive(&var_24);
004f79f1      return __return;
004f7950  }

004f79f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f7a00  void* __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>* this, uint32_t arg2)

004f7a00  {
004f7a03      class HashTableData<QualifiedDataID,MissingIteration *>** m_buckets = this->m_buckets;
004f7a0b      this->vtable = 0x7c59f4;
004f7a0b      
004f7a11      if (m_buckets != &this->m_aInplaceBuckets)
004f7a14          operator delete[](m_buckets);
004f7a14      
004f7a1e      this->m_buckets = nullptr;
004f7a21      this->m_firstInterestingBucket = nullptr;
004f7a24      this->m_numBuckets = 0;
004f7a27      this->m_numElements = 0;
004f7a27      
004f7a2f      if ((arg2 & 1) != 0)
004f7a32          operator delete(this);
004f7a32      
004f7a3d      return this;
004f7a00  }


004f7a40  void* __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,DiskController *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,DiskController *> *,0>* this, uint32_t arg2)

004f7a40  {
004f7a43      class HashTableData<unsigned __int64,DiskController *>** m_buckets = this->m_buckets;
004f7a4b      this->vtable = &IntrusiveHashTable<uint64_t,class HashTableData<uint64_t,class DiskController*>*,0>::`vftable';
004f7a4b      
004f7a51      if (m_buckets != &this->m_aInplaceBuckets)
004f7a54          operator delete[](m_buckets);
004f7a54      
004f7a5e      this->m_buckets = nullptr;
004f7a61      this->m_firstInterestingBucket = nullptr;
004f7a64      this->m_numBuckets = 0;
004f7a67      this->m_numElements = 0;
004f7a67      
004f7a6f      if ((arg2 & 1) != 0)
004f7a72          operator delete(this);
004f7a72      
004f7a7d      return this;
004f7a40  }


004f7a80  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,unsigned long> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,unsigned long> *,0>* this, uint32_t arg2)

004f7a80  {
004f7a83      class HashTableData<IDClass<_tagDataID,32,0>,unsigned long>** m_buckets = this->m_buckets;
004f7a8b      this->vtable = 0x7c59fc;
004f7a8b      
004f7a91      if (m_buckets != &this->m_aInplaceBuckets)
004f7a94          operator delete[](m_buckets);
004f7a94      
004f7a9e      this->m_buckets = nullptr;
004f7aa1      this->m_firstInterestingBucket = nullptr;
004f7aa4      this->m_numBuckets = 0;
004f7aa7      this->m_numElements = 0;
004f7aa7      
004f7aaf      if ((arg2 & 1) != 0)
004f7ab2          operator delete(this);
004f7ab2      
004f7abd      return this;
004f7a80  }


004f7ac0  void __thiscall DiskConInitInfo::DiskConInitInfo(struct DiskConInitInfo* this, class PStringBase<char> const* arg2, class PStringBase<unsigned short> const* arg3, enum DATFILE_TYPE arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, int32_t arg8, int32_t arg9, int32_t arg10, uint8_t arg11)

004f7ac0  {
004f7ac4      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004f7ad0      this->file.m_charbuffer = m_charbuffer;
004f7ad6      InterlockedIncrement(&m_charbuffer[-1]);
004f7adc      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg3->m_charbuffer;
004f7ade      this->path.m_charbuffer = m_charbuffer_1;
004f7ae5      InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
004f7af3      this->data_subset_lm = arg5;
004f7afa      this->data_set_lm = arg4;
004f7b01      this->block_size_lm = arg8;
004f7b04      int32_t eax_3;
004f7b04      eax_3 = arg11;
004f7b08      this->open_flags_lm = arg6;
004f7b0f      this->file_size_lm = arg7;
004f7b16      this->eng_only = eax_3;
004f7b1a      this->eng_pack_vnum = arg9;
004f7b1d      this->game_pack_vnum = arg10;
004f7ac0  }

004f7b26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f7b30  void* __thiscall CLCache::CAsyncBeginDDDRequest::`scalar deleting destructor'(struct CLCache::CAsyncBeginDDDRequest* this, uint32_t arg2)

004f7b30  {
004f7b33      this->vtable = &CLCache::CAsyncBeginDDDRequest::`vftable';
004f7b39      AsyncCache::CAsyncRequest::~CAsyncRequest(this);
004f7b39      
004f7b43      if ((arg2 & 1) != 0)
004f7b46          operator delete(this);
004f7b46      
004f7b51      return this;
004f7b30  }

004f7b54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f7b60  void* __thiscall SerializeUsingPackDBObj::`scalar deleting destructor'(class SerializeUsingPackDBObj* this, uint32_t arg2)

004f7b60  {
004f7b65      struct PackObj::VTable** eax;
004f7b65      
004f7b65      if (this == 0)
004f7b6c          eax = nullptr;
004f7b65      else
004f7b67          eax = &this->vtable;
004f7b67      
004f7b82      ADJ(eax)->vtable = &PackObj::`vftable';
004f7b76      DBObj::~DBObj(this);
004f7b76      
004f7b80      if ((arg2 & 1) != 0)
004f7b83          operator delete(this);
004f7b83      
004f7b8e      return this;
004f7b60  }

004f7b91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004f7ba0  class DBObj* FontLocal::Allocator()

004f7ba0  {
004f7ba2      void* eax = operator new(0x70);
004f7ba2      
004f7bac      if (eax == 0)
004f7bb7          return 0;
004f7bb7      
004f7bb0      /* tailcall */
004f7bb0      return FontLocal::FontLocal(eax);
004f7ba0  }

004f7bb8                                                                          90 90 90 90 90 90 90 90                          ........

004f7bc0  void* __thiscall Font::`scalar deleting destructor'(class Font* this, uint32_t arg2)

004f7bc0  {
004f7bc3      Font::~Font(this);
004f7bc3      
004f7bcd      if ((arg2 & 1) != 0)
004f7bd0          operator delete(this);
004f7bd0      
004f7bdb      return this;
004f7bc0  }

004f7bde                                                                                            90 90                                ..

004f7be0  void __thiscall DDD_DataMessage::Serialize(class DDD_DataMessage* this, class Archive* arg2)

004f7be0  {
004f7bec      if ((arg2->m_flags & 1) != 0)
004f7bec      {
004f7bf2          Archive::CheckAlignment(arg2, 4);
004f7bfb          uint32_t* eax_1 = Archive::GetBytes(arg2, 4);
004f7bfb          
004f7c02          if (eax_1 != 0)
004f7c02          {
004f7c08              if ((arg2->m_flags & 1) == 0)
004f7c13                  this->m_et = *(uint32_t*)eax_1;
004f7c08              else
004f7c0d                  *(uint32_t*)eax_1 = this->m_et;
004f7c02          }
004f7bec      }
004f7bec      
004f7c1b      Serializer::SerializePrimitive(&this->m_idDatFile, arg2);
004f7c27      Archive::CheckAlignment(arg2, 8);
004f7c30      uint8_t* eax_3 = Archive::GetBytes(arg2, 8);
004f7c30      
004f7c37      if (eax_3 != 0)
004f7c37      {
004f7c3d          if ((arg2->m_flags & 1) == 0)
004f7c3d          {
004f7c4e              this->m_qdid.Type = *(uint32_t*)eax_3;
004f7c54              this->m_qdid.ID.id = *(uint32_t*)(eax_3 + 4);
004f7c3d          }
004f7c3d          else
004f7c3d          {
004f7c42              *(uint32_t*)eax_3 = this->m_qdid.Type;
004f7c47              *(uint32_t*)(eax_3 + 4) = this->m_qdid.ID.id;
004f7c3d          }
004f7c37      }
004f7c37      
004f7c5c      Serializer::SerializeObject(&this->m_idIteration, arg2);
004f7c66      Serializer::SerializeObject(&this->m_bCompressed, arg2);
004f7c72      Cache_Pack_t::SerializeOrWindow(&this->m_cpData, arg2);
004f7be0  }

004f7c7c                                                                                      90 90 90 90                              ....

004f7c80  void __thiscall Cache_Pack_t::SerializeOrWindow(class Cache_Pack_t* this, class Archive* arg2)

004f7c80  {
004f7c84      class Archive* esi = arg2;
004f7c8f      Archive::CheckAlignment(esi, 4);
004f7c98      uint8_t* eax = Archive::GetBytes(esi, 4);
004f7c98      
004f7c9f      if (eax != 0)
004f7c9f      {
004f7ca5          if ((esi->m_flags & 1) == 0)
004f7cb0              this->m_iVersion = *(uint32_t*)eax;
004f7ca5          else
004f7caa              *(uint32_t*)eax = this->m_iVersion;
004f7c9f      }
004f7c9f      
004f7cb7      if ((esi->m_flags & 1) != 0)
004f7cb7      {
004f7cc3          arg2 = SmartBuffer::GetSize(&this->m_buff);
004f7ccd          Serializer::SerializeObject(&arg2, esi);
004f7ccd          
004f7cdf          if (SmartBuffer::GetSize(&this->m_buff) >= 4)
004f7cdf          {
004f7ced              uint32_t eax_4 = (SmartBuffer::GetSize(&this->m_buff) - 4);
004f7cfc              Serializer::SerializeBytes(&SmartBuffer::GetBuffer(&this->m_buff)[4], eax_4, esi);
004f7cdf          }
004f7cdf          
004f7cdf          return;
004f7cb7      }
004f7cb7      
004f7d10      uint32_t eax_7 = Archive::GetCurrentPosition(esi);
004f7d1b      Archive::CheckAlignment(esi, 4);
004f7d24      uint8_t* eax_8 = Archive::GetBytes(esi, 4);
004f7d2b      class Archive* ebp_1;
004f7d2b      
004f7d2b      if (eax_8 == 0)
004f7d3f          ebp_1 = arg2;
004f7d2b      else if ((esi->m_flags & 1) == 0)
004f7d3b          ebp_1 = *(uint32_t*)eax_8;
004f7d31      else
004f7d31      {
004f7d33          ebp_1 = arg2;
004f7d37          *(uint32_t*)eax_8 = ebp_1;
004f7d31      }
004f7d31      
004f7d4e      if ((!(((int8_t)(esi->m_flags >> 2))) & 1) != 0)
004f7d4e      {
004f7d53          Archive::SetCurrentPosition(esi, eax_7);
004f7d79          void __return;
004f7d79          void __return_1;
004f7d79          SmartBuffer::operator=(&this->m_buff, SmartBuffer::MakeWindow(Archive::GetRemainingBuffer(esi, &__return_1), &__return, 0, ebp_1));
004f7d82          SmartBuffer::~SmartBuffer(&__return);
004f7d8b          SmartBuffer::~SmartBuffer(&__return_1);
004f7d93          Archive::GetBytes(esi, ebp_1);
004f7d9f          *(uint32_t*)SmartBuffer::GetBuffer(&this->m_buff) = 0;
004f7d4e      }
004f7c80  }

004f7daf                                               90                                                                 .

004f7db0  void __thiscall DDD_RequestDataMessage::Serialize(class DDD_RequestDataMessage* this, class Archive* arg2)

004f7db0  {
004f7dbc      if ((arg2->m_flags & 1) != 0)
004f7dbc      {
004f7dc2          Archive::CheckAlignment(arg2, 4);
004f7dcb          uint32_t* eax_1 = Archive::GetBytes(arg2, 4);
004f7dcb          
004f7dd2          if (eax_1 != 0)
004f7dd2          {
004f7dd8              if ((arg2->m_flags & 1) == 0)
004f7de3                  this->m_et = *(uint32_t*)eax_1;
004f7dd8              else
004f7ddd                  *(uint32_t*)eax_1 = this->m_et;
004f7dd2          }
004f7dbc      }
004f7dbc      
004f7dea      Archive::CheckAlignment(arg2, 8);
004f7df3      uint8_t* eax_2 = Archive::GetBytes(arg2, 8);
004f7df3      
004f7dfa      if (eax_2 != 0)
004f7dfa      {
004f7e00          if ((arg2->m_flags & 1) != 0)
004f7e00          {
004f7e05              *(uint32_t*)eax_2 = this->m_qdid.Type;
004f7e0b              *(uint32_t*)(eax_2 + 4) = this->m_qdid.ID.id;
004f7e0f              return;
004f7e00          }
004f7e00          
004f7e14          this->m_qdid.Type = *(uint32_t*)eax_2;
004f7e1a          this->m_qdid.ID.id = *(uint32_t*)(eax_2 + 4);
004f7dfa      }
004f7db0  }

004f7e22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004f7e30  void __thiscall DDD_ErrorMessage::Serialize(class DDD_ErrorMessage* this, class Archive* arg2)

004f7e30  {
004f7e3c      if ((arg2->m_flags & 1) != 0)
004f7e3c      {
004f7e42          Archive::CheckAlignment(arg2, 4);
004f7e4b          uint32_t* eax_1 = Archive::GetBytes(arg2, 4);
004f7e4b          
004f7e52          if (eax_1 != 0)
004f7e52          {
004f7e58              if ((arg2->m_flags & 1) == 0)
004f7e63                  this->m_et = *(uint32_t*)eax_1;
004f7e58              else
004f7e5d                  *(uint32_t*)eax_1 = this->m_et;
004f7e52          }
004f7e3c      }
004f7e3c      
004f7e6a      Archive::CheckAlignment(arg2, 8);
004f7e73      uint8_t* eax_2 = Archive::GetBytes(arg2, 8);
004f7e73      
004f7e7a      if (eax_2 != 0)
004f7e7a      {
004f7e80          if ((arg2->m_flags & 1) != 0)
004f7e80          {
004f7e85              *(uint32_t*)eax_2 = this->m_qdid.Type;
004f7e8f              *(uint32_t*)(eax_2 + 4) = this->m_qdid.ID.id;
004f7e92              Serializer::SerializeObject(&*(int32_t*)((char*)this + 0x10), arg2);
004f7e9c              return;
004f7e80          }
004f7e80          
004f7ea1          this->m_qdid.Type = *(uint32_t*)eax_2;
004f7ea7          this->m_qdid.ID.id = *(uint32_t*)(eax_2 + 4);
004f7e7a      }
004f7e7a      
004f7eaf      Serializer::SerializeObject(&*(int32_t*)((char*)this + 0x10), arg2);
004f7e30  }

004f7ebc                                                                                      90 90 90 90                              ....

004f7ec0  uint8_t __thiscall CThreadsafeDiskController::LoadDataEx(class CThreadsafeDiskController* this, class IDClass<_tagDataID,32,0> arg2, class Cache_Pack_t* arg3, struct BTEntry* arg4, uint32_t arg5)

004f7ec0  {
004f7ec5      this->m_DiskLock.vtable->EnterCriticalSection();
004f7ef3      int32_t ebx;
004f7ef3      ebx = DiskController::LoadDataEx(this, arg2, arg3, arg4, arg5);
004f7ef5      SharedCriticalSection::LeaveCriticalSection(&this->m_DiskLock);
004f7eff      return ebx;
004f7ec0  }

004f7f02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004f7f10  uint8_t __thiscall CThreadsafeDiskController::SaveDataEx(class CThreadsafeDiskController* this, struct BTEntry* arg2, class Cache_Pack_t* arg3, uint32_t arg4)

004f7f10  {
004f7f15      this->m_DiskLock.vtable->EnterCriticalSection();
004f7f3e      int32_t ebx;
004f7f3e      ebx = DiskController::SaveDataEx(this, arg2, arg3, arg4);
004f7f40      SharedCriticalSection::LeaveCriticalSection(&this->m_DiskLock);
004f7f4a      return ebx;
004f7f10  }

004f7f4d                                         90 90 90                                                               ...

004f7f50  uint8_t __thiscall CThreadsafeDiskController::DeleteData(class CThreadsafeDiskController* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

004f7f50  {
004f7f55      this->m_DiskLock.vtable->EnterCriticalSection();
004f7f79      int32_t ebx;
004f7f79      ebx = DiskController::DeleteData(this, arg2, arg3);
004f7f7b      SharedCriticalSection::LeaveCriticalSection(&this->m_DiskLock);
004f7f85      return ebx;
004f7f50  }

004f7f88                          90 90 90 90 90 90 90 90                                                          ........

004f7f90  uint8_t __thiscall CThreadsafeDiskController::DeleteDataByMask(class CThreadsafeDiskController* this, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3)

004f7f90  {
004f7f95      this->m_DiskLock.vtable->EnterCriticalSection();
004f7fb9      int32_t ebx;
004f7fb9      ebx = DiskController::DeleteDataByMask(this, arg2, arg3);
004f7fbb      SharedCriticalSection::LeaveCriticalSection(&this->m_DiskLock);
004f7fc5      return ebx;
004f7f90  }

004f7fc8                          90 90 90 90 90 90 90 90                                                          ........

004f7fd0  void __fastcall CMostlyConsecutiveIntSet::~CMostlyConsecutiveIntSet(class CMostlyConsecutiveIntSet* this)

004f7fd0  {
004f7fdd      if ((this->m_Ints.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f7fe3          operator delete[](this->m_Ints.m_data);
004f7fd0  }

004f7fea                                90 90 90 90 90 90                                                            ......

004f7ff0  void __fastcall DDD_InterrogationMessage::~DDD_InterrogationMessage(class DDD_InterrogationMessage* this)

004f7ff0  {
004f7ffd      if ((this->m_SupportedLanguages.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f8003          operator delete[](this->m_SupportedLanguages.m_data);
004f7ff0  }

004f800a                                90 90 90 90 90 90                                                            ......

004f8010  uint8_t __fastcall CLCache::AsyncGetFromOtherSources(class CLCache* this, struct QualifiedDataID const* arg2, class DBOCache* arg3)

004f8010  {
004f801d      if (PacketController::Instance() == 0)
004f801d      {
004f8064          class PacketController* eax;
004f8064          eax = 0;
004f806a          return 0;
004f801d      }
004f801d      
004f801f      struct QualifiedDataID* eax_1 = arg2;
004f8025      uint32_t id = eax_1->ID.id;
004f8028      uint32_t Type = eax_1->Type;
004f8039      int32_t var_c = 0xf7e3;
004f8041      int32_t var_10 = 0x7c59ec;
004f8049      uint32_t id_1 = id;
004f804d      CLCache::AdoptAndDeliverMessage(((char*)this - 4), &arg2, &var_10);
004f8061      return arg2 >= 0;
004f8010  }

004f806d                                         90 90 90                                                               ...

004f8070  void __thiscall CLCache::NotifyDDDEvent(class CLCache* this, enum DDDEvent arg2, uint32_t arg3)

004f8070  {
004f8074      uint32_t m_num = this->m_Plugins.m_num;
004f8074      
004f807c      if (m_num > 0)
004f807c      {
004f80a2          uint32_t i;
004f80a2          
004f80a2          do
004f80a2          {
004f8090              this->m_Plugins.m_data[(m_num - 1)]->vtable[1].__vecDelDtor(arg2, arg3);
004f80a1              i = m_num;
004f80a1              m_num -= 1;
004f80a2          } while (i != 1);
004f807c      }
004f8070  }

004f808a                                8d 9b 00 00 00 00                                                            ......
004f80ab                                   90 90 90 90 90                                                             .....

004f80b0  void* __thiscall LongHash<MotionData>::`scalar deleting destructor'(class LongHash<MotionData>* this, uint32_t arg2)

004f80b0  {
004f80b6      bool cond:0 = this->fPlacementNew_ != 0;
004f80b8      this->vtable = 0x7c66b0;
004f80b8      
004f80be      if (!(cond:0))
004f80c4          operator delete[](this->buckets);
004f80c4      
004f80d1      if ((arg2 & 1) != 0)
004f80d4          operator delete(this);
004f80d4      
004f80df      return this;
004f80b0  }

004f80e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004f80f0  void __fastcall SmartArray<FontReference,1>::Reset(class SmartArray<FontReference,1>* this)

004f80f0  {
004f80f7      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004f8106      this->m_num = 0;
004f8106      
004f810d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f810d      {
004f810f          class FontReference* m_data = this->m_data;
004f810f          
004f8113          if (m_data != 0)
004f8119              operator delete[](((char*)m_data - 4));
004f8119          
004f8122          this->m_data = 0;
004f8128          this->m_sizeAndDeallocate = 0;
004f8133          return;
004f810d      }
004f810d      
004f8137      if (this->m_data != 0)
004f8137      {
004f8139          int32_t edi = (m_sizeAndDeallocate & 0x7fffffff);
004f813f          int32_t edi_1 = (edi - 1);
004f813f          
004f8140          if ((edi - 1) >= 0)
004f8140          {
004f8146              void var_8;
004f8146              int32_t* eax_3 = Vector3::Vector3(&var_8);
004f8160              int32_t temp1_1;
004f8160              
004f8160              do
004f8160              {
004f8150                  temp1_1 = edi_1;
004f8150                  edi_1 -= 1;
004f8153                  class FontReference* m_data_1 = this->m_data;
004f8155                  m_data_1[(edi_1 + 1)].dataID.id = *(uint32_t*)eax_3;
004f815c                  *(uint32_t*)(&m_data_1[edi_1] + 0xc) = eax_3[1];
004f8160              } while ((temp1_1 - 1) >= 0);
004f8140          }
004f8137      }
004f80f0  }

004f814d                                         8d 49 00                                                               .I.
004f8168                          90 90 90 90 90 90 90 90                                                          ........

004f8170  void __fastcall MissingIteration::MissingIteration(class MissingIteration* this)

004f8170  {
004f8174      this->vtable = 0x7c5a1c;
004f817a      __builtin_memset(&this->IDsToDownload, 0, 0x18);
004f8170  }

004f818d                                         90 90 90                                                               ...

004f8190  void __fastcall MissingIteration::~MissingIteration(class MissingIteration* this)

004f8190  {
004f81a0      if ((this->IDsToPurge.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f81a0      {
004f81a2          struct QualifiedDataID* m_data = this->IDsToPurge.m_data;
004f81a2          
004f81a7          if (m_data != 0)
004f81ad              operator delete[](((char*)m_data - 4));
004f81a0      }
004f81a0      
004f81c4      if ((this->IDsToDownload.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f81c4      {
004f81c6          struct QualifiedDataID* m_data_1 = this->IDsToDownload.m_data;
004f81c6          
004f81cb          if (m_data_1 != 0)
004f81d1              operator delete[](((char*)m_data_1 - 4));
004f81c4      }
004f8190  }

004f81db                                                                                   90 90 90 90 90                             .....

004f81e0  void __fastcall CThreadsafeDiskController::CThreadsafeDiskController(class CThreadsafeDiskController* this)

004f81e0  {
004f81e3      DiskController::DiskController(this);
004f81ee      this->vtable = 0x7c5a20;
004f81f4      SharedCriticalSection::SharedCriticalSection(&this->m_DiskLock);
004f81ff      CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(&this->m_Iters);
004f81e0  }

004f8208                          90 90 90 90 90 90 90 90                                                          ........

004f8210  int32_t __fastcall DiskConBase::GetDatFileID(class DiskConBase const* this)

004f8210  {
004f8210      this->data_set_lm;
004f8225      return (0 | this->data_subset_lm);
004f8210  }

004f8226                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f8230  uint8_t __fastcall DiskConBase::IsInitialized(class DiskConBase* this)

004f8230  {
004f8233      return this->initialized_fm;
004f8230  }

004f8234                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f8240  uint8_t __fastcall DiskConBase::IsReadOnly(class DiskConBase* this)

004f8240  {
004f8243      return this->read_only_fm;
004f8240  }

004f8244              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004f8250  uint8_t __fastcall DiskConBase::IsExpandable(class DiskConBase* this)

004f8250  {
004f8253      return this->expandable_fm;
004f8250  }

004f8254                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f8260  int32_t __fastcall DiskController::HowmuchFreeSpace(class DiskController* this)

004f8260  {
004f826d      return (this->file_info_m.iFreeBlocks_ * this->file_info_m.iBlockSize_);
004f8260  }

004f826e                                            90 90                                                                ..

004f8270  class DatIDStamp* __thiscall DiskController::GetDatIDStamp(class DiskController const* this, class DatIDStamp* __return)

004f8270  {
004f827e      DatIDStamp::DatIDStamp(__return, &this->file_info_m.id_vnum);
004f8286      return __return;
004f8270  }

004f8289                             90 90 90 90 90 90 90                                                           .......

004f8290  class PStringBase<char> const* __fastcall DiskController::GetFilename(class DiskController const* this) __pure

004f8290  {
004f8296      return &this->filename_m;
004f8290  }

004f8297                                                                       90 90 90 90 90 90 90 90 90                         .........

004f82a0  class IDClass<_tagDataID,32,0>* __thiscall DiskController::GetMasterMapDID(class DiskController* this, class IDClass<_tagDataID,32,0>* __return)

004f82a0  {
004f82a6      uint32_t* result = __return;
004f82aa      *(uint32_t*)result = this->file_info_m.master_map_id_m.id;
004f82ac      return result;
004f82a0  }

004f82af                                               90                                                                 .

004f82b0  void* __thiscall CThreadsafeDiskController::`scalar deleting destructor'(class CThreadsafeDiskController* this, uint32_t arg2)

004f82b0  {
004f82b9      CMostlyConsecutiveIntSet::~CMostlyConsecutiveIntSet(&this->m_Iters);
004f82c4      SharedCriticalSection::~SharedCriticalSection(&this->m_DiskLock);
004f82cb      DiskController::~DiskController(this);
004f82cb      
004f82d5      if ((arg2 & 1) != 0)
004f82d8          operator delete(this);
004f82d8      
004f82e3      return this;
004f82b0  }

004f82e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f82f0  class AsyncContext* __thiscall CLCache::AsyncSaveDDDMessage(class CLCache* this, class AsyncContext* __return, class DDD_DataMessage const* arg3)

004f82f0  {
004f82f0      class CLCache* this_1 = this;
004f82f1      uint32_t m_id = INVALID_ASYNCCONTEXT.m_id;
004f8307      void* esi = operator new(0x58);
004f8307      
004f8310      if (esi == 0)
004f833e          esi = nullptr;
004f8310      else
004f8310      {
004f8312          *(uint32_t*)((char*)esi + 4) = 1;
004f8319          *(uint32_t*)((char*)esi + 8) = 0;
004f831c          __builtin_memset(((char*)esi + 0x18), 0, 0x18);
004f8328          *(uint32_t*)esi = 0x795394;
004f8337          SmartBuffer::SmartBuffer(((char*)esi + 0x30));
004f8310      }
004f8310      
004f8344      *(uint32_t*)((char*)esi + 0xc) = 2;
004f834e      *(uint32_t*)((char*)esi + 0x10) = arg3->m_qdid.Type;
004f8354      *(uint32_t*)((char*)esi + 0x14) = arg3->m_qdid.ID.id;
004f835a      *(uint32_t*)((char*)esi + 0x28) = arg3->m_cpData.m_dwOffset;
004f8363      *(uint32_t*)((char*)esi + 0x2c) = arg3->m_cpData.m_iVersion;
004f836a      SmartBuffer::operator=(((char*)esi + 0x30), &arg3->m_cpData.m_buff);
004f8372      *(uint32_t*)((char*)esi + 0x40) = arg3->m_idDatFile;
004f8378      *(uint32_t*)((char*)esi + 0x44) = *(uint32_t*)((char*)arg3->m_idDatFile)[4];
004f837b      int32_t edx_2;
004f837b      edx_2 = arg3->m_bCompressed;
004f837e      char temp1 = edx_2;
004f837e      edx_2 = -(edx_2);
004f8380      *(uint32_t*)((char*)esi + 0x50) = 0;
004f838d      *(uint32_t*)((char*)esi + 0x48) = (((edx_2 - edx_2) & 0xb) + 1);
004f8393      *(uint32_t*)((char*)esi + 0x4c) = arg3->m_idIteration;
004f8383      this->vtable->EnqueueAsyncRequest(esi);
004f8383      
004f83a7      if (InterlockedDecrement(((char*)esi + 4)) != 0)
004f83a7      {
004f83ce          __return->m_id = m_id;
004f83d2          return __return;
004f83a7      }
004f83a7      
004f83af      **(uint32_t**)esi(1);
004f83b1      uint32_t* __return_1 = __return;
004f83bc      *(uint32_t*)__return_1 = m_id;
004f83c0      return __return_1;
004f82f0  }

004f83d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004f83e0  void* __thiscall MissingIteration::`vector deleting destructor'(class MissingIteration* this, uint32_t arg2)

004f83e0  {
004f83e1      int32_t ebx;
004f83e1      ebx = arg2;
004f83e1      
004f83eb      if ((ebx & 2) == 0)
004f83eb      {
004f849a          MissingIteration::~MissingIteration(this);
004f849a          
004f84a2          if ((ebx & 1) != 0)
004f84a5              operator delete(this);
004f84a5          
004f84b1          return this;
004f83eb      }
004f83eb      
004f83f1      int32_t vtable = this->vtable;
004f83f1      
004f8401      if ((vtable - 1) >= 0)
004f8401      {
004f840b          ebx = vtable;
004f840e          void* edi_2 = &*(uint32_t*)((char*)this[vtable].IDsToDownload)[4];
004f847b          int32_t i;
004f847b          
004f847b          do
004f847b          {
004f8410              int32_t eax_1 = *(uint32_t*)((char*)edi_2 - 0x24);
004f8413              edi_2 -= 0x30;
004f8413              
004f8420              if ((eax_1 & 0x80000000) == 0x80000000)
004f8420              {
004f8422                  void* eax_3 = *(uint32_t*)((char*)edi_2 + 8);
004f8422                  
004f8427                  if (eax_3 != 0)
004f8427                  {
004f8438                      `vector destructor iterator'(eax_3, 8, *(uint32_t*)((char*)eax_3 - 4), IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>);
004f843e                      operator delete[](((char*)eax_3 - 4));
004f8427                  }
004f8420              }
004f8420              
004f8454              if ((*(uint32_t*)edi_2 & 0x80000000) == 0x80000000)
004f8454              {
004f8456                  void* eax_4 = *(uint32_t*)((char*)edi_2 - 4);
004f8456                  
004f845b                  if (eax_4 != 0)
004f845b                  {
004f846c                      `vector destructor iterator'(eax_4, 8, *(uint32_t*)((char*)eax_4 - 4), IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>);
004f8472                      operator delete[](((char*)eax_4 - 4));
004f845b                  }
004f8454              }
004f8454              
004f847a              i = ebx;
004f847a              ebx -= 1;
004f847b          } while (i != 1);
004f847d          ebx = arg2;
004f8401      }
004f8401      
004f8485      if ((ebx & 1) != 0)
004f8488          operator delete[](((char*)this - 4));
004f8488      
004f8495      return ((char*)this - 4);
004f83e0  }

004f84b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004f84c0  void* __thiscall CAllIterationList::PTaggedIterationList::`vector deleting destructor'(class CAllIterationList::PTaggedIterationList* this, uint32_t arg2)

004f84c0  {
004f84c1      int32_t ebx;
004f84c1      ebx = arg2;
004f84c1      
004f84cb      if ((ebx & 2) == 0)
004f84cb      {
004f852c          if ((this->List.m_Ints.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f8532              operator delete[](this->List.m_Ints.m_data);
004f8532          
004f853d          if ((ebx & 1) != 0)
004f8540              operator delete(this);
004f8540          
004f854c          return this;
004f84cb      }
004f84cb      
004f84cd      int32_t vtable = this->vtable;
004f84cd      
004f84db      if ((vtable - 1) >= 0)
004f84db      {
004f84de          void* esi_1 = &*(uint12_t*)((char*)this[vtable].List)[4];
004f84e1          int32_t ebp_1 = vtable;
004f8504          int32_t i;
004f8504          
004f8504          do
004f8504          {
004f84e4              int32_t edx_1 = *(uint32_t*)((char*)esi_1 - 0x24);
004f84e7              esi_1 -= 0x28;
004f84e7              
004f84f6              if ((edx_1 & 0x80000000) == 0x80000000)
004f84fb                  operator delete[](*(uint32_t*)esi_1);
004f84fb              
004f8503              i = ebp_1;
004f8503              ebp_1 -= 1;
004f8504          } while (i != 1);
004f84db      }
004f84db      
004f850a      if ((ebx & 1) != 0)
004f850d          operator delete[](((char*)this - 4));
004f850d      
004f851a      return ((char*)this - 4);
004f84c0  }

004f854f                                               90                                                                 .

004f8550  int32_t* __thiscall SmartArray<QualifiedDataID,1>::operator=(int32_t* arg1, int32_t* arg2)

004f8550  {
004f856e      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
004f856e      {
004f858c      label_4f858c:
004f858c          int32_t* eax_3 = *(uint32_t*)arg2;
004f8591          void* edx_3 = &eax_3[(arg2[2] * 2)];
004f8596          int32_t* ecx_4 = *(uint32_t*)arg1;
004f8596          
004f8599          while (eax_3 < edx_3)
004f8599          {
004f85a2              *(uint32_t*)ecx_4 = *(uint32_t*)eax_3;
004f85a7              ecx_4[1] = eax_3[1];
004f85aa              eax_3 = &eax_3[2];
004f85ad              ecx_4 = &ecx_4[2];
004f8599          }
004f8599          
004f85b4          int32_t i = arg2[2];
004f85b4          
004f85ba          if (i < arg1[2])
004f85ba          {
004f85c0              void var_8;
004f85c0              int32_t* eax_4 = Vector3::Vector3(&var_8);
004f85c0              
004f85d9              do
004f85d9              {
004f85c7                  int32_t edx_4 = *(uint32_t*)arg1;
004f85c9                  *(uint32_t*)(edx_4 + (i << 3)) = *(uint32_t*)eax_4;
004f85cf                  *(uint32_t*)((edx_4 + (i << 3)) + 4) = eax_4[1];
004f85d6                  i += 1;
004f85d9              } while (i < arg1[2]);
004f85ba          }
004f85ba          
004f85de          arg1[2] = arg2[2];
004f856e      }
004f856e      else
004f856e      {
004f8570          arg1[2] = 0;
004f8570          
004f858a          if (SmartArray<FontReference,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
004f858a              goto label_4f858c;
004f856e      }
004f856e      
004f85e9      return arg1;
004f8550  }

004f859d                                                                                         8d 49 00                               .I.
004f85ec                                      90 90 90 90                                                              ....

004f85f0  void __thiscall DDD_InterrogationMessage::Serialize(class DDD_InterrogationMessage* this, class Archive* arg2)

004f85f0  {
004f8600      if ((1 & arg2->m_flags) != 0)
004f8600      {
004f8606          Archive::CheckAlignment(arg2, 4);
004f860f          uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
004f860f          
004f8616          if (eax_1 != 0)
004f8616          {
004f861b              if ((arg2->m_flags & 1) == 0)
004f8626                  this->m_et = *(uint32_t*)eax_1;
004f861b              else
004f8620                  *(uint32_t*)eax_1 = this->m_et;
004f8616          }
004f8600      }
004f8600      
004f862d      Archive::CheckAlignment(arg2, 4);
004f8636      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
004f8636      
004f863d      if (eax_2 != 0)
004f863d      {
004f8642          if ((arg2->m_flags & 1) == 0)
004f864d              this->m_dwServersRegion = *(uint32_t*)eax_2;
004f8642          else
004f8647              *(uint32_t*)eax_2 = this->m_dwServersRegion;
004f863d      }
004f863d      
004f8654      Archive::CheckAlignment(arg2, 4);
004f865d      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
004f865d      
004f8664      if (eax_3 != 0)
004f8664      {
004f8669          if ((arg2->m_flags & 1) == 0)
004f8674              this->m_NameRuleLanguage = *(uint32_t*)eax_3;
004f8669          else
004f866e              *(uint32_t*)eax_3 = this->m_NameRuleLanguage;
004f8664      }
004f8664      
004f867b      Archive::CheckAlignment(arg2, 4);
004f8684      uint32_t* eax_4 = Archive::GetBytes(arg2, 4);
004f8684      
004f868b      if (eax_4 != 0)
004f868b      {
004f8690          if ((arg2->m_flags & 1) != 0)
004f8690          {
004f8695              *(uint32_t*)eax_4 = this->m_dwProductID;
004f869b              SmartArray<unsigned long,1>::Serialize(&this->m_SupportedLanguages, arg2);
004f86a3              return;
004f8690          }
004f8690          
004f86a8          this->m_dwProductID = *(uint32_t*)eax_4;
004f868b      }
004f868b      
004f86af      SmartArray<unsigned long,1>::Serialize(&this->m_SupportedLanguages, arg2);
004f85f0  }

004f86ba                                                                                90 90 90 90 90 90                            ......

004f86c0  uint8_t __thiscall CThreadsafeDiskController::InitFile(class CThreadsafeDiskController* this, struct DiskConInitInfo* arg2)

004f86c0  {
004f86cf      int32_t ebx;
004f86cf      ebx = DiskController::InitFile(this, arg2);
004f86cf      
004f86d3      if (ebx != 0)
004f86d3      {
004f86e0          uint8_t eax;
004f86e0          int32_t ecx_2;
004f86e0          eax = this->vtable->LoadIterationList(&this->m_Iters);
004f86e3          ebx &= eax;
004f86e3          
004f86e5          if (ebx == 0)
004f86e5          {
004f86e7              int32_t var_10_2 = 0;
004f86e9              int32_t var_14 = ecx_2;
004f86ec              uint16_t* var_18 = &data_794320;
004f86f6              var_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, var_18);
004f86f9              uint16_t* __return = &data_794320;
004f8703              __return = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, __return);
004f870b              uint16_t eax_2;
004f870b              class PStringBase<unsigned short> ecx_8;
004f870b              class PStringBase<unsigned short> edx_1;
004f870b              eax_2 = PStringBase<char>::to_wpstring(arg2, &__return, 0);
004f8715              PlatformString::DisplayString(eax_2, edx_1, ecx_8, 0xce, __return);
004f871f              DiskController::Close(&data_4f871a);
004f86e5          }
004f86d3      }
004f86d3      
004f8729      return ebx;
004f86c0  }

004f872c                                      90 90 90 90                                                              ....

004f8730  uint8_t __thiscall CLCache::SetRegion(class CLCache* this, uint32_t arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004f8730  {
004f8733      int32_t ebx;
004f8733      int32_t var_54 = ebx;
004f8734      class PStringBase<char> __return_6;
004f8734      class PStringBase<char> __return_5 = __return_6;
004f8735      int32_t DBCache::s_GameCellPackVer_3;
004f8735      int32_t DBCache::s_GameCellPackVer_1 = DBCache::s_GameCellPackVer_3;
004f8736      int32_t edi;
004f8736      int32_t var_60 = edi;
004f873d      int32_t var_48;
004f873d      int32_t* var_64 = &var_48;
004f8740      var_48 = 0;
004f8744      DBCache::GetCurrentRegion(var_64);
004f8751      int32_t* esp = &var_60;
004f8751      
004f8756      if (var_48 != arg2)
004f8756      {
004f8762          int32_t* ecx_1 = this->m_DatFiles.m_data[2];
004f8762          
004f8767          if (ecx_1 != 0)
004f876d              **(uint32_t**)ecx_1(1);
004f876d          
004f8775          void* const var_64_2 = &data_794500;
004f876f          this->m_DatFiles.m_data[2] = 0;
004f8781          void var_4c;
004f8781          PStringBase<char>::PStringBase<char>(&var_4c, var_64_2);
004f878b          PStringBase<char>::append_uint32(&var_4c, arg2);
004f8799          class PStringBase<char> __return_2;
004f8799          PStringBase<char>::PStringBase<char>(&__return_2, ".dat");
004f87b8          class PStringBase<char> __return_1;
004f87b8          class PStringBase<char> var_38;
004f87b8          PStringBase<char>::operator+(PStringBase<char>::PStringBase<char>(&var_38, "client_cell"), &__return_1, &var_4c);
004f87c7          int32_t* esi_2 = (var_38 - 0x14);
004f87c7          
004f87d6          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004f87de              **(uint32_t**)esi_2(1);
004f87de          
004f87ee          PStringBase<char>::operator+(&var_48, &__return_2, &__return_1);
004f87f7          int32_t* esi_4 = (var_48 - 0x14);
004f87f7          
004f8806          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004f880e              **(uint32_t**)esi_4(1);
004f880e          
004f8814          int32_t* esi_6 = (var_48 - 0x14);
004f8814          
004f8823          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004f882b              **(uint32_t**)esi_6(1);
004f882b          
004f882d          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f8838          __return_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f8840          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f8842          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004f8847          __return_2 = PStringBase<char>::s_NullBuffer_1;
004f884f          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004f8851          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004f8856          __return_2 = PStringBase<char>::s_NullBuffer_2;
004f885e          int32_t ecx_12 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004f8860          class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_strDatFilePath.m_charbuffer;
004f8867          int32_t var_80_1 = ecx_12;
004f8872          class PStringBase<unsigned short> var_88 = InterlockedIncrement(&m_charbuffer->m_data[-8], m_charbuffer, 0);
004f8875          uint16_t var_8c_1 = 0;
004f8876          enum DDDEvent __return = &var_88;
004f887b          PStringBase<char>::to_wpstring(&__return_5, __return, var_8c_1);
004f8884          void var_50;
004f8884          uint8_t eax_12 = LookFile::LookForFile(&var_50, var_88);
004f8898          int32_t ebx_1;
004f8898          ebx_1 = this->m_fReadOnly != 0;
004f88a4          void* ebx_3;
004f88a4          
004f88a4          if (eax_12 == 0 == 0)
004f88ab              ebx_3 = (((ebx_1 << 2) + 3) & 0xfffffff7);
004f88a4          else
004f88a6              ebx_3 = (((ebx_1 << 2) + 3) | 8);
004f88a6          
004f88b4          class PStringBase<char> __return_4 = __return_5;
004f88be          int32_t DBCache::s_EngCellPackVer_1 = DBCache::s_EngCellPackVer;
004f88c3          void* var_6c_4;
004f88c3          var_6c_4 = this->m_fEngineOnly;
004f88cb          DBCache::s_GameCellPackVer_1 = DBCache::s_GameCellPackVer;
004f88cf          int32_t DBCache::s_EngCellPackVer_2 = DBCache::s_EngCellPackVer_1;
004f88d3          __return_1 = __return_4;
004f88d7          InterlockedIncrement((__return_4 - 0x10));
004f88d9          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_strDatFilePath.m_charbuffer;
004f88df          __return_1 = m_charbuffer_1;
004f88e7          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
004f88ed          int32_t DBCache::s_GameCellPackVer_2 = DBCache::s_GameCellPackVer_1;
004f88f5          class PStringBase<char> __return_3;
004f88f5          __return_2 = __return_3;
004f88f9          class PStringBase<char> edx_7;
004f88f9          edx_7.m_charbuffer = &PStringBase<char>::s_NullBuffer_1[-1];
004f88fd          var_88 = 0x788;
004f8902          __return_1 = 2;
004f890a          void* var_3c_1 = ebx_3;
004f890e          var_38 = 0x100000;
004f8916          int32_t var_34_1 = 0x100;
004f891e          int32_t DBCache::s_GameCellPackVer_4 = DBCache::s_GameCellPackVer_2;
004f8922          void* var_2c_1 = &esi_2[1];
004f8926          char var_28_1 = edx_7.m_charbuffer;
004f892f          void* esi_7 = operator new(var_88);
004f892f          
004f8936          if (esi_7 == 0)
004f895d              esi_7 = nullptr;
004f8936          else
004f8936          {
004f893a              DiskController::DiskController(esi_7);
004f8945              *(uint32_t*)esi_7 = 0x7c5a20;
004f894b              SharedCriticalSection::SharedCriticalSection(((char*)esi_7 + 0x750));
004f8956              CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(((char*)esi_7 + 0x774));
004f8936          }
004f8936          
004f895f          this->m_DatFiles.m_data[2] = esi_7;
004f8971          int32_t vtable = this->m_DatFiles.m_data[2]->vtable;
004f8977          var_88 = &var_4c;
004f8977          
004f897d          if (*(uint32_t*)(vtable + 4)(var_88) == 0)
004f897d          {
004f8983              _STL::pair<PStringBase<char>,PStringBase<char> >::~pair<PStringBase<char>,PStringBase<char> >(&var_50);
004f898c              PageInfo::~PageInfo(&DBCache::s_GameCellPackVer_1);
004f898c              
004f89a6              if ((InterlockedDecrement((__return_4 - 0x10)) == 0 && __return_4 != 0x14))
004f89a6              {
004f89a8                  int32_t edx_8 = *(uint32_t*)(__return_4 - 0x14);
004f89ab                  __return = DDD_RegionSet;
004f89af                  *(uint32_t*)edx_8(__return);
004f89a6              }
004f89a6              
004f89bb              __return = &PStringBase<char>::s_NullBuffer_2[-2];
004f89bb              
004f89c4              if ((InterlockedDecrement(__return) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x24))
004f89cc                  *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x24)(1);
004f89cc              
004f89ce              int32_t eax_19;
004f89ce              eax_19 = 0;
004f89d7              return 0;
004f897d          }
004f897d          
004f89e1          uint32_t var_24;
004f89e1          DBCache::SetRegion(this, var_24);
004f89e7          __return = DDD_RegionSet;
004f89eb          CLCache::NotifyDDDEvent(this, __return, var_24);
004f89f4          _STL::pair<PStringBase<char>,PStringBase<char> >::~pair<PStringBase<char>,PStringBase<char> >(&var_50);
004f89fd          PageInfo::~PageInfo(&DBCache::s_GameCellPackVer_1);
004f89fd          
004f8a17          if ((InterlockedDecrement((__return_4 - 0x10)) == 0 && __return_4 != 0x14))
004f8a17          {
004f8a19              int32_t edx_10 = *(uint32_t*)(__return_4 - 0x14);
004f8a1c              __return = DDD_RegionSet;
004f8a20              *(uint32_t*)edx_10(__return);
004f8a17          }
004f8a17          
004f8a2c          __return = &PStringBase<char>::s_NullBuffer_2[-2];
004f8a2c          esp = &__return;
004f8a2c          
004f8a35          if ((InterlockedDecrement(__return) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x24))
004f8a35          {
004f8a3d              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x24)(1);
004f8a3d              esp = &__return;
004f8a35          }
004f8756      }
004f8756      
004f8a3f      *(uint32_t*)esp;
004f8a3f      esp[1];
004f8a3f      esp[2];
004f8a42      int32_t eax;
004f8a42      eax = 1;
004f8a3f      esp[3];
004f8a48      return 1;
004f8730  }

004f8a4b                                   90 90 90 90 90                                                             .....

004f8a50  uint8_t __thiscall CLCache::SetLanguageInternal(class CLCache* this, uint32_t arg2, uint8_t arg3)
// This function has unresolved stack usage. View graph of stack usage to resolve.

004f8a50  {
004f8a53      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004f8a59      int32_t ebp;
004f8a59      int32_t var_68 = ebp;
004f8a5a      int32_t esi;
004f8a5a      int32_t var_6c = esi;
004f8a5b      int32_t edi;
004f8a5b      int32_t var_70 = edi;
004f8a62      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_1;
004f8a6a      class CLCache* __return_5 = this;
004f8a6e      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004f8a70      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
004f8a76      void* __offset(PSRefBufferCharData<char>, -0x14) ebx = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
004f8a7d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
004f8a81      InterlockedIncrement(((char*)ebx + 4));
004f8a83      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f8a88      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f8a90      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f8a92      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004f8a97      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_2;
004f8a9f      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004f8aa1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
004f8aa6      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_3;
004f8aae      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
004f8ab8      class PSRefBufferCharData<char>** var_74_5 = &PStringBase<char>::s_NullBuffer_6;
004f8ab9      uint32_t __return_2 = arg2;
004f8aba      uint32_t __return_1 = 0xc;
004f8abc      uint8_t eax_5;
004f8abc      uint32_t __return_6;
004f8abc      eax_5 = EnumMapper::GetString(__return_1, __return_2, var_74_5);
004f8ac6      uint16_t* __return;
004f8ac6      void* __offset(PSRefBufferCharData<char>, -0x10) var_74_7;
004f8ac6      
004f8ac6      if (eax_5 != 0)
004f8ac6      {
004f8b21          class PStringBase<char> var_3c;
004f8b21          class PStringBase<char>* eax_7 = PStringBase<char>::PStringBase<char>(&var_3c, ".dat");
004f8b2b          void* var_58;
004f8b2b          __return_2 = &var_58;
004f8b30          __return_1 = &PStringBase<char>::s_NullBuffer_6;
004f8b35          void* var_54;
004f8b35          __return = &var_54;
004f8b3f          void* var_40;
004f8b3f          class PStringBase<char>* eax_8 = PStringBase<char>::PStringBase<char>(&var_40, &data_794500);
004f8b53          void* var_44;
004f8b53          class PStringBase<char>* eax_9 = PStringBase<char>::PStringBase<char>(&var_44, "local");
004f8b88          void* __return_3;
004f8b88          void* __return_4;
004f8b88          void* var_48;
004f8b88          int32_t* ebp_1 = PStringBase<char>::operator+(PStringBase<char>::operator+(PStringBase<char>::operator+(PStringBase<char>::operator+(PStringBase<char>::PStringBase<char>(&var_48, "client_"), &__return_4, eax_9), &__return_3, eax_8), __return, __return_1), __return_2, eax_7);
004f8b88          
004f8b8d          if (PStringBase<char>::s_NullBuffer_4 != *(uint32_t*)ebp_1)
004f8b8d          {
004f8b9f              if ((InterlockedDecrement(((char*)ebx + 4)) == 0 && ebx != 0))
004f8ba7                  *(uint32_t*)*(int32_t*)((char*)ADJ(ebx) + -0x14)(1);
004f8ba7              
004f8ba9              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_9 = *(uint32_t*)ebp_1;
004f8bac              PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_9;
004f8bb0              ebx = &PStringBase<char>::s_NullBuffer_9->m_data[0xffffffec];
004f8bb7              InterlockedIncrement(((char*)ebx + 4));
004f8b8d          }
004f8b8d          
004f8bc3          int32_t* esi_2 = ((char*)var_58 - 0x14);
004f8bc3          
004f8bd2          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004f8bda              **(uint32_t**)esi_2(1);
004f8bda          
004f8be0          int32_t* esi_4 = ((char*)var_54 - 0x14);
004f8be0          
004f8bef          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004f8bf7              **(uint32_t**)esi_4(1);
004f8bf7          
004f8bfd          int32_t* esi_6 = ((char*)__return_3 - 0x14);
004f8bfd          
004f8c0c          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
004f8c14              **(uint32_t**)esi_6(1);
004f8c14          
004f8c1a          int32_t* esi_8 = ((char*)__return_4 - 0x14);
004f8c1a          
004f8c29          if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
004f8c31              **(uint32_t**)esi_8(1);
004f8c31          
004f8c37          int32_t* esi_10 = ((char*)var_48 - 0x14);
004f8c37          
004f8c46          if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
004f8c4e              **(uint32_t**)esi_10(1);
004f8c4e          
004f8c54          int32_t* esi_12 = ((char*)var_44 - 0x14);
004f8c54          
004f8c63          if ((InterlockedDecrement(&esi_12[1]) == 0 && esi_12 != 0))
004f8c6b              **(uint32_t**)esi_12(1);
004f8c6b          
004f8c71          int32_t* esi_14 = ((char*)var_40 - 0x14);
004f8c71          
004f8c80          if ((InterlockedDecrement(&esi_14[1]) == 0 && esi_14 != 0))
004f8c88              **(uint32_t**)esi_14(1);
004f8c88          
004f8c8e          int32_t* esi_16 = (var_3c - 0x14);
004f8c95          int32_t eax_31;
004f8c95          uint32_t __return_7;
004f8c95          eax_31 = InterlockedDecrement(&esi_16[1]);
004f8c95          
004f8c9d          if ((eax_31 == 0 && esi_16 != 0))
004f8ca5              __return_7 = **(uint32_t**)esi_16(1);
004f8ca5          
004f8ca7          class CLCache* __return_9 = __return_5;
004f8cab          class PSRefBufferCharData<unsigned short>* m_charbuffer = __return_9->m_strDatFilePath.m_charbuffer;
004f8cb1          uint8_t var_74_29 = 0;
004f8cb3          __return_2 = __return_7;
004f8cb6          __return_2 = m_charbuffer;
004f8cbb          __return_1 = &m_charbuffer->m_data[-8];
004f8cbe          __return_1 = InterlockedIncrement(__return_1);
004f8cc1          __return = nullptr;
004f8cc8          PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_5, &__return_1, __return);
004f8cd1          uint8_t eax_33;
004f8cd1          uint32_t __return_8;
004f8cd1          eax_33 = LookFile::LookForFile(&PStringBase<unsigned short>::s_NullBuffer_2, __return_1, __return_2, var_74_29);
004f8cd8          uint8_t var_74_30 = 0;
004f8cd8          
004f8cda          if (eax_33 != 0)
004f8cda          {
004f8d6c              __return_8 = __return_9->m_fReadOnly;
004f8d76              __return_2 = 0xffffffff;
004f8d78              int32_t eax_39;
004f8d78              eax_39 = __return_8 != 0;
004f8d7b              __return_1 = 0xffffffff;
004f8d7d              __return = nullptr;
004f8dab              void var_28;
004f8dab              DiskConInitInfo::DiskConInitInfo(&var_28, &PStringBase<char>::s_NullBuffer_5, LookFile::GetFoundPath(&PStringBase<unsigned short>::s_NullBuffer_2, &__return_5), LOCAL_DATFILE, arg2, ((eax_39 << 2) + 3), 0, __return, __return_1, __return_2, var_74_30);
004f8dba              void* __offset(CLCache, -0x14) esi_21 = ((char*)__return_5 - 0x14);
004f8dba              
004f8dc9              if ((InterlockedDecrement(((char*)esi_21 + 4)) == 0 && esi_21 != 0))
004f8dd1                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_21) + -0x14)(1);
004f8dd1              
004f8de6              void var_24;
004f8de6              PStringBase<unsigned short>::operator=(&var_24, LookFile::GetFoundPath(&PStringBase<unsigned short>::s_NullBuffer_2, &__return_5));
004f8def              void* __offset(CLCache, -0x14) esi_23 = ((char*)__return_5 - 0x14);
004f8def              
004f8dfe              if ((InterlockedDecrement(((char*)esi_23 + 4)) == 0 && esi_23 != 0))
004f8e06                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_23) + -0x14)(1);
004f8e06              
004f8e17              int32_t DBCache::s_EngDataPackVer_1 = DBCache::s_EngDataPackVer;
004f8e21              int32_t DBCache::s_GameDataPackVer_1 = DBCache::s_GameDataPackVer;
004f8e25              uint8_t var_4_1 = arg3;
004f8e29              int32_t* ecx_48 = __return_9->m_DatFiles.m_data[1];
004f8e29              
004f8e2e              if (ecx_48 != 0)
004f8e34                  **(uint32_t**)ecx_48(1);
004f8e34              
004f8e3c              uint32_t var_74_42 = 0x788;
004f8e36              __return_9->m_DatFiles.m_data[1] = 0;
004f8e48              void* eax_50 = operator new(var_74_42);
004f8e52              int32_t eax_51;
004f8e52              
004f8e52              if (eax_50 == 0)
004f8e5d                  eax_51 = 0;
004f8e52              else
004f8e56                  eax_51 = CThreadsafeDiskController::CThreadsafeDiskController(eax_50);
004f8e56              
004f8e5f              __return_9->m_DatFiles.m_data[1] = eax_51;
004f8e6e              int32_t* ecx_51 = __return_9->m_DatFiles.m_data[1];
004f8e6e              
004f8e73              if (ecx_51 == 0)
004f8e73              {
004f8e79                  _STL::pair<PStringBase<char>,PStringBase<char> >::~pair<PStringBase<char>,PStringBase<char> >(&var_28);
004f8e82                  PageInfo::~PageInfo(&PStringBase<unsigned short>::s_NullBuffer_2);
004f8e8a                  var_74_7 = ((char*)ebx + 4);
004f8dfa                  goto label_4f8e8b;
004f8e73              }
004f8e73              
004f8ed2              class PSRefBufferCharData<char>** ecx_56 = &PStringBase<char>::s_NullBuffer_8;
004f8ed6              int32_t __saved_ebx;
004f8ed6              
004f8ed6              if (*(uint32_t*)(*(uint32_t*)ecx_51 + 4)(&var_28) == 0)
004f8ed6              {
004f8ed8                  _STL::pair<PStringBase<char>,PStringBase<char> >::~pair<PStringBase<char>,PStringBase<char> >(ecx_56);
004f8ee1                  PageInfo::~PageInfo(&__return_5);
004f8eea                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__saved_ebx);
004f8ef3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_5);
004f8ef8                  int32_t eax_57;
004f8ef8                  eax_57 = 0;
004f8f01                  return 0;
004f8ed6              }
004f8ed6              
004f8f08              __return_9->m_LocalLanguage = __return_addr;
004f8f0e              _STL::pair<PStringBase<char>,PStringBase<char> >::~pair<PStringBase<char>,PStringBase<char> >(ecx_56);
004f8f17              PageInfo::~PageInfo(&__return_5);
004f8f20              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__saved_ebx);
004f8f29              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_5);
004f8f31              int32_t eax_59;
004f8f31              eax_59 = 1;
004f8f37              return 1;
004f8cda          }
004f8cda          
004f8ce0          __return_2 = __return_8;
004f8ce3          __return_1 = 0x794320;
004f8ced          __return_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_2, __return_1);
004f8cf0          __return = &data_794320;
004f8cfa          __return = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, __return);
004f8d04          uint16_t eax_34;
004f8d04          class PStringBase<unsigned short> ecx_35;
004f8d04          class PStringBase<unsigned short> edx_11;
004f8d04          eax_34 = PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_5, &__return, 0);
004f8d0e          PlatformString::DisplayString(eax_34, edx_11, ecx_35, 0xca, __return);
004f8d1a          PageInfo::~PageInfo(&PStringBase<unsigned short>::s_NullBuffer_2);
004f8d1a          
004f8d31          if ((InterlockedDecrement(((char*)ebx + 4)) == 0 && ebx != 0))
004f8d39              *(uint32_t*)*(int32_t*)((char*)ADJ(ebx) + -0x14)(1);
004f8d39          
004f8d3f          void* __offset(PSRefBufferCharData<char>, -0x14) esi_18 = &PStringBase<char>::s_NullBuffer_6->m_data[0xffffffec];
004f8d3f          
004f8d52          if ((InterlockedDecrement(((char*)esi_18 + 4)) == 0 && esi_18 != 0))
004f8d52          {
004f8d5e              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_18) + -0x14)(1);
004f8d60              int32_t eax_38;
004f8d60              eax_38 = 0;
004f8d69              return 0;
004f8d52          }
004f8ac6      }
004f8ac6      else
004f8ac6      {
004f8ac8          int32_t var_74_6 = 0;
004f8aca          __return_2 = __return_6;
004f8acd          __return_1 = 0x794320;
004f8ad7          __return_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_2, __return_1);
004f8ada          __return = &data_794320;
004f8ae4          __return = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, __return);
004f8aee          uint16_t eax_6;
004f8aee          class PStringBase<unsigned short> ecx_5;
004f8aee          class PStringBase<unsigned short> edx_1;
004f8aee          eax_6 = PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_5, &__return, 0);
004f8af8          PlatformString::DisplayString(eax_6, edx_1, ecx_5, 0xca, __return);
004f8b04          PageInfo::~PageInfo(&PStringBase<unsigned short>::s_NullBuffer_2);
004f8b12          var_74_7 = ((char*)ebx + 4);
004f8e8b      label_4f8e8b:
004f8e8b          
004f8e93          if ((InterlockedDecrement(var_74_7) == 0 && ebx != 0))
004f8e9b              *(uint32_t*)*(int32_t*)((char*)ADJ(ebx) + -0x14)(1);
004f8e9b          
004f8ea1          void* __offset(PSRefBufferCharData<char>, -0x14) esi_25 = &PStringBase<char>::s_NullBuffer_6->m_data[0xffffffec];
004f8ea1          
004f8eb0          if ((InterlockedDecrement(((char*)esi_25 + 4)) == 0 && esi_25 != 0))
004f8eb8              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_25) + -0x14)(1);
004f8ac6      }
004f8eba      int32_t eax_37;
004f8eba      eax_37 = 0;
004f8ec3      return 0;
004f8a50  }

004f8f3a                                                                                90 90 90 90 90 90                            ......

004f8f40  class MissingIteration& __thiscall MissingIteration::operator=(class MissingIteration* this, class MissingIteration const& arg2)

004f8f40  {
004f8f4b      this->idDatFile = arg2->idDatFile;
004f8f51      *(uint32_t*)((char*)this->idDatFile)[4] = *(uint32_t*)((char*)arg2->idDatFile)[4];
004f8f5e      this->idIteration = arg2->idIteration;
004f8f61      SmartArray<QualifiedDataID,1>::operator=(&this->IDsToDownload.m_data, &arg2->IDsToDownload);
004f8f6d      SmartArray<QualifiedDataID,1>::operator=(&this->IDsToPurge, &arg2->IDsToPurge);
004f8f76      return this;
004f8f40  }

004f8f79                                                                             90 90 90 90 90 90 90                           .......

004f8f80  void __fastcall DDD_BeginDDDMessage::~DDD_BeginDDDMessage(class DDD_BeginDDDMessage* this)

004f8f80  {
004f8f8d      if ((this->m_MissingIterations.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f8f8d      {
004f8f8f          class MissingIteration* m_data = this->m_MissingIterations.m_data;
004f8f8f          
004f8f94          if (m_data != 0)
004f8f98              MissingIteration::`vector deleting destructor'(m_data, 3);
004f8f8d      }
004f8f80  }

004f8f9e                                                                                            90 90                                ..

004f8fa0  class DiskController* __thiscall CLCache::GetDiskController(class CLCache* this, struct QualifiedDataID const* arg2, uint64_t arg3)

004f8fa0  {
004f8fb3      if ((arg3 | *(uint32_t*)((char*)arg3)[4]) != 0)
004f8fb3      {
004f8fc5          void __return;
004f8fc5          IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_DatFileByIDTable.vtable, &__return, &arg3);
004f8fd0          void* var_4;
004f8fd0          
004f8fd0          if (var_4 != 0)
004f8fda              return *(uint32_t*)((char*)var_4 + 0x10);
004f8fb3      }
004f8fb3      
004f8fe3      uint32_t Type = arg2->Type;
004f8fe3      
004f8fe7      if (Type == 0)
004f8ff5          Type = MasterDBMap::DivineType(arg2->ID.id);
004f8ff5      
004f9002      if (MasterDBMap::IsPortalType(Type) != 0)
004f9002      {
004f901a          if (*(uint32_t*)(**(uint32_t**)(this->m_Plugins.m_num + 0xc) + 0x1c)(arg2->ID.id, 0) == 0)
004f903e              return *(uint32_t*)this->m_Plugins.m_num;
004f903e          
004f902c          return *(uint32_t*)(this->m_Plugins.m_num + 0xc);
004f9002      }
004f9002      
004f904c      if (MasterDBMap::IsCellType(Type) != 0)
004f905e          return *(uint32_t*)(this->m_Plugins.m_num + 8);
004f905e      
004f906c      if (MasterDBMap::IsLocalType(Type) == 0)
004f908a          return 0;
004f908a      
004f907e      return *(uint32_t*)(this->m_Plugins.m_num + 4);
004f8fa0  }

004f908d                                         90 90 90                                                               ...

004f9090  uint8_t __fastcall CLCache::IsDatFileLoaded(class CLCache const* this, uint64_t arg2)

004f9090  {
004f90a3      void __return;
004f90a3      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_DatFileByIDTable.vtable, &__return, &arg2);
004f90ae      void* var_4;
004f90ae      
004f90ae      if (var_4 != 0)
004f90bb          return *(uint32_t*)(**(uint32_t**)((char*)var_4 + 0x10) + 0x3c)();
004f90bb      
004f90be      void* eax;
004f90be      eax = 0;
004f90c3      return 0;
004f9090  }

004f90c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004f90d0  void* __thiscall LongNIValHash<unsigned long>::`scalar deleting destructor'(class LongNIValHash<unsigned long>* this, uint32_t arg2)

004f90d0  {
004f90d3      this->vtable = 0x7c5a14;
004f90d9      LongNIValHash<LongHash<MotionData> *>::destroy_contents(this);
004f90e1      bool cond:0 = this->fPlacementNew_ != 0;
004f90e3      this->vtable = 0x7c66b0;
004f90e3      
004f90e9      if (!(cond:0))
004f90ef          operator delete[](this->buckets);
004f90ef      
004f90fc      if ((arg2 & 1) != 0)
004f90ff          operator delete(this);
004f90ff      
004f910a      return this;
004f90d0  }

004f910d                                         90 90 90                                                               ...

004f9110  void* __thiscall LongNIValHash<LongHash<MotionData> *>::`scalar deleting destructor'(class LongNIValHash<LongHash<MotionData> *>* this, uint32_t arg2)

004f9110  {
004f9113      this->vtable = 0x7c5a18;
004f9119      LongNIValHash<LongHash<MotionData> *>::destroy_contents(this);
004f9121      bool cond:0 = this->fPlacementNew_ != 0;
004f9123      this->vtable = 0x7c66b0;
004f9123      
004f9129      if (!(cond:0))
004f912f          operator delete[](this->buckets);
004f912f      
004f913c      if ((arg2 & 1) != 0)
004f913f          operator delete(this);
004f913f      
004f914a      return this;
004f9110  }

004f914d                                         90 90 90                                                               ...

004f9150  void __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,DiskController *> *,0>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,DiskController *> *,0>(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,DiskController *> *,0>* this, uint32_t arg2)

004f9150  {
004f915b      arg2 = arg2;
004f915f      uint8_t edx = ((int8_t)arg2);
004f9163      this->m_buckets = nullptr;
004f9166      this->m_firstInterestingBucket = nullptr;
004f9169      this->m_numBuckets = 0;
004f916c      this->m_numElements = 0;
004f9170      this->vtable = &IntrusiveHashTable<uint64_t,class HashTableData<uint64_t,class DiskController*>*,0>::`vftable';
004f9176      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004f9189      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004f9189      
004f9193      if (eax == bucketSizesEnd_1)
004f9195          eax -= 4;
004f9195      
004f9198      uint32_t eax_1 = *(uint32_t*)eax;
004f919d      this->m_numBuckets = eax_1;
004f919d      
004f91a0      if (eax_1 > 0x17)
004f91b6          this->m_buckets = operator new[]((eax_1 << 2));
004f91a0      else
004f91a5          this->m_buckets = &this->m_aInplaceBuckets;
004f91a5      
004f91bc      class HashTableData<unsigned __int64,DiskController *>** m_buckets = this->m_buckets;
004f91bf      uint32_t ecx_3 = (this->m_numBuckets << 2);
004f91c5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004f91d6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004f9150  }

004f91df                                                                                               90                                 .

004f91e0  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,unsigned long> *,0>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,unsigned long> *,0>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,unsigned long> *,0>* this, uint32_t arg2)

004f91e0  {
004f91eb      arg2 = arg2;
004f91ef      uint8_t edx = ((int8_t)arg2);
004f91f3      this->m_buckets = nullptr;
004f91f6      this->m_firstInterestingBucket = nullptr;
004f91f9      this->m_numBuckets = 0;
004f91fc      this->m_numElements = 0;
004f9200      this->vtable = 0x7c59fc;
004f9206      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004f9219      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004f9219      
004f9223      if (eax == bucketSizesEnd_1)
004f9225          eax -= 4;
004f9225      
004f9228      uint32_t eax_1 = *(uint32_t*)eax;
004f922d      this->m_numBuckets = eax_1;
004f922d      
004f9230      if (eax_1 > 0x17)
004f9246          this->m_buckets = operator new[]((eax_1 << 2));
004f9230      else
004f9235          this->m_buckets = &this->m_aInplaceBuckets;
004f9235      
004f924c      class HashTableData<IDClass<_tagDataID,32,0>,unsigned long>** m_buckets = this->m_buckets;
004f924f      uint32_t ecx_3 = (this->m_numBuckets << 2);
004f9255      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004f9266      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004f91e0  }

004f926f                                               90                                                                 .

004f9270  void __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>::IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>* this, uint32_t arg2)

004f9270  {
004f927b      arg2 = arg2;
004f927f      uint8_t edx = ((int8_t)arg2);
004f9283      this->m_buckets = nullptr;
004f9286      this->m_firstInterestingBucket = nullptr;
004f9289      this->m_numBuckets = 0;
004f928c      this->m_numElements = 0;
004f9290      this->vtable = 0x7c59f4;
004f9296      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004f92a9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
004f92a9      
004f92b3      if (eax == bucketSizesEnd_1)
004f92b5          eax -= 4;
004f92b5      
004f92b8      uint32_t eax_1 = *(uint32_t*)eax;
004f92bd      this->m_numBuckets = eax_1;
004f92bd      
004f92c0      if (eax_1 > 0x17)
004f92d6          this->m_buckets = operator new[]((eax_1 << 2));
004f92c0      else
004f92c5          this->m_buckets = &this->m_aInplaceBuckets;
004f92c5      
004f92dc      class HashTableData<QualifiedDataID,MissingIteration *>** m_buckets = this->m_buckets;
004f92df      uint32_t ecx_3 = (this->m_numBuckets << 2);
004f92e5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
004f92f6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
004f9270  }

004f92ff                                                                                               90                                 .

004f9300  void __fastcall SmartArray<MissingIteration,1>::Reset(class SmartArray<MissingIteration,1>* this)

004f9300  {
004f9306      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
004f931a      this->m_num = 0;
004f931a      
004f931d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f931d      {
004f931f          class MissingIteration* m_data = this->m_data;
004f931f          
004f9324          if (m_data != 0)
004f9328              MissingIteration::`vector deleting destructor'(m_data, 3);
004f9328          
004f932d          this->m_data = 0;
004f9330          this->m_sizeAndDeallocate = 0;
004f9338          return;
004f931d      }
004f931d      
004f933c      if (this->m_data != 0)
004f933c      {
004f9342          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
004f9342          
004f9348          if ((eax - 1) >= 0)
004f9348          {
004f9352              int32_t ebx_2 = ((eax - 1) * 0x30);
004f9357              int32_t var_34_1 = eax;
004f93c9              bool cond:1_1;
004f93c9              
004f93c9              do
004f93c9              {
004f936f                  void* esi_2 = (this->m_data + ebx_2);
004f9371                  int32_t var_28;
004f9371                  *(uint32_t*)((char*)esi_2 + 8) = var_28;
004f9378                  int32_t var_20;
004f9378                  *(uint32_t*)((char*)esi_2 + 0x10) = var_20;
004f937f                  int32_t var_30 = 0x7c5a1c;
004f9387                  int32_t s;
004f9387                  __builtin_memset(&s, 0, 0x18);
004f939f                  int32_t var_24;
004f939f                  *(uint32_t*)((char*)esi_2 + 0xc) = var_24;
004f93a2                  SmartArray<QualifiedDataID,1>::operator=(((char*)esi_2 + 0x14), &s);
004f93af                  int32_t var_10;
004f93af                  SmartArray<QualifiedDataID,1>::operator=(((char*)esi_2 + 0x20), &var_10);
004f93b8                  MissingIteration::~MissingIteration(&var_30);
004f93c1                  ebx_2 -= 0x30;
004f93c4                  cond:1_1 = var_34_1 != 1;
004f93c5                  var_34_1 -= 1;
004f93c9              } while (cond:1_1);
004f9348          }
004f933c      }
004f9300  }

004f935d                                                                                         8d 49 00                               .I.
004f93d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004f93e0  void* __thiscall List<AsyncCache::CAsyncRequest *>::`scalar deleting destructor'(class List<AsyncCache::CAsyncRequest *>* this, uint32_t arg2)

004f93e0  {
004f93e3      this->vtable = 0x7c5ad8;
004f93e9      List<StringTableMetaLanguage::Node const *>::flush(this);
004f93e9      
004f93f3      if ((arg2 & 1) != 0)
004f93f6          operator delete(this);
004f93f6      
004f9401      return this;
004f93e0  }

004f9404              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004f9410  uint8_t __thiscall SmartArray<MissingIteration,1>::grow(class SmartArray<MissingIteration,1>* this, uint32_t arg2)

004f9410  {
004f9412      uint32_t ebp = arg2;
004f941c      uint32_t* eax;
004f941c      
004f941c      if (ebp >= this->m_num)
004f941c      {
004f942c          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
004f942c          {
004f94cd              eax = 1;
004f94d0              return 1;
004f942c          }
004f942c          
004f9434          if (ebp == 0)
004f9434          {
004f9436              SmartArray<MissingIteration,1>::Reset(this);
004f943d              int32_t eax_2;
004f943d              eax_2 = 1;
004f9440              return 1;
004f9434          }
004f9434          
004f944e          eax = operator new[](((ebp * 0x30) + 4));
004f944e          
004f9458          if (eax != 0)
004f9458          {
004f9460              void* ebx_1 = &eax[1];
004f9466              *(uint32_t*)eax = ebp;
004f9468              `vector constructor iterator'(ebx_1, 0x30, ebp, MissingIteration::MissingIteration);
004f9468              
004f946f              if (ebx_1 != 0)
004f946f              {
004f9474                  if (this->m_data != 0)
004f9474                  {
004f9476                      uint32_t m_num = this->m_num;
004f9476                      
004f947a                      if ((m_num - 1) >= 0)
004f947a                      {
004f9480                          void* esi_2 = ((m_num - 1) * 0x30);
004f9484                          arg2 = m_num;
004f94a1                          bool cond:0_1;
004f94a1                          
004f94a1                          do
004f94a1                          {
004f9490                              MissingIteration::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
004f9499                              esi_2 -= 0x30;
004f949c                              cond:0_1 = arg2 != 1;
004f949d                              arg2 -= 1;
004f94a1                          } while (cond:0_1);
004f947a                      }
004f947a                      
004f94b1                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004f94b1                      {
004f94b3                          class MissingIteration* m_data = this->m_data;
004f94b3                          
004f94b7                          if (m_data != 0)
004f94bb                              MissingIteration::`vector deleting destructor'(m_data, 3);
004f94b1                      }
004f9474                  }
004f9474                  
004f94c6                  this->m_data = ebx_1;
004f94c8                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
004f94cd                  eax = 1;
004f94d0                  return 1;
004f946f              }
004f9458          }
004f941c      }
004f941c      
004f94d5      eax = 0;
004f94d8      return 0;
004f9410  }

004f94db                                                                                   90 90 90 90 90                             .....

004f94e0  void __fastcall CMotionTable::CMotionTable(class CMotionTable* this)

004f94e0  {
004f94eb      DBObj::DBObj(this, INVALID_DID.id);
004f94f0      this->vtable = &PackObj::`vftable';
004f94f7      this->vtable = 0x7c5af0;
004f94fd      this->vtable = &CMotionTable::`vftable';
004f950b      this->style_defaults.vtable = 0x7c66b0;
004f9512      this->style_defaults.fPlacementNew_ = 0;
004f951f      this->style_defaults.buckets = operator new[](0x100);
004f9525      this->style_defaults.table_size = 0x40;
004f952c      this->style_defaults.key_shift = 8;
004f952f      this->style_defaults.table_mask = 0;
004f9532      int32_t eax_1 = 1;
004f954a      uint32_t edx_2;
004f954a      
004f954a      do
004f954a      {
004f953a          edx_2 = (this->style_defaults.table_mask | eax_1);
004f953c          eax_1 <<= 1;
004f9540          this->style_defaults.table_mask = edx_2;
004f954a      } while ((edx_2 | eax_1) < this->style_defaults.table_size);
004f954c      int32_t i = 0;
004f954c      
004f955c      do
004f955c      {
004f9550          this->style_defaults.buckets[i] = 0;
004f9559          i += 1;
004f955c      } while (i < this->style_defaults.table_size);
004f955c      
004f955e      this->style_defaults.vtable = 0x7c5a14;
004f956a      this->cycles.vtable = 0x7c66b0;
004f9571      this->cycles.fPlacementNew_ = 0;
004f9579      this->cycles.buckets = operator new[](0x100);
004f957f      this->cycles.table_size = 0x40;
004f9586      this->cycles.key_shift = 8;
004f9589      this->cycles.table_mask = 0;
004f958c      int32_t eax_3 = 1;
004f95a4      uint32_t edx_6;
004f95a4      
004f95a4      do
004f95a4      {
004f9594          edx_6 = (this->cycles.table_mask | eax_3);
004f9596          eax_3 <<= 1;
004f959a          this->cycles.table_mask = edx_6;
004f95a4      } while ((edx_6 | eax_3) < this->cycles.table_size);
004f95a6      int32_t i_1 = 0;
004f95a6      
004f95bc      do
004f95bc      {
004f95b0          this->cycles.buckets[i_1] = 0;
004f95b9          i_1 += 1;
004f95bc      } while (i_1 < this->cycles.table_size);
004f95bc      
004f95be      this->cycles.vtable = 0x7c66b0;
004f95c7      this->modifiers.vtable = 0x7c66b0;
004f95ce      this->modifiers.fPlacementNew_ = 0;
004f95d6      this->modifiers.buckets = operator new[](0x40);
004f95dc      this->modifiers.table_size = 0x10;
004f95e3      this->modifiers.key_shift = 8;
004f95e6      this->modifiers.table_mask = 0;
004f95e9      int32_t eax_5 = 1;
004f9603      uint32_t edx_10;
004f9603      
004f9603      do
004f9603      {
004f95f3          edx_10 = (this->modifiers.table_mask | eax_5);
004f95f5          eax_5 <<= 1;
004f95f9          this->modifiers.table_mask = edx_10;
004f9603      } while ((edx_10 | eax_5) < this->modifiers.table_size);
004f9605      int32_t i_2 = 0;
004f9605      
004f9613      do
004f9613      {
004f9607          this->modifiers.buckets[i_2] = 0;
004f9610          i_2 += 1;
004f9613      } while (i_2 < this->modifiers.table_size);
004f9613      
004f9615      this->modifiers.vtable = 0x7c66b0;
004f9621      this->links.vtable = 0x7c66b0;
004f962b      this->links.fPlacementNew_ = 0;
004f9636      this->links.buckets = operator new[](0x100);
004f963f      this->links.table_size = 0x40;
004f9649      this->links.key_shift = 8;
004f964f      this->links.table_mask = 0;
004f9655      int32_t eax_7 = 1;
004f967c      uint32_t edx_14;
004f967c      
004f967c      do
004f967c      {
004f9666          edx_14 = (this->links.table_mask | eax_7);
004f9668          eax_7 <<= 1;
004f966c          this->links.table_mask = edx_14;
004f967c      } while ((edx_14 | eax_7) < this->links.table_size);
004f967e      int32_t i_3 = 0;
004f967e      
004f9692      do
004f9692      {
004f9680          this->links.buckets[i_3] = 0;
004f968f          i_3 += 1;
004f9692      } while (i_3 < this->links.table_size);
004f9692      
004f9695      this->links.vtable = 0x7c5a18;
004f94e0  }

004f95aa                                8d 9b 00 00 00 00                                                            ......
004f96a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004f96b0  void* __thiscall CMotionTable::`scalar deleting destructor'(class CMotionTable* this, uint32_t arg2)

004f96b0  {
004f96b3      CMotionTable::~CMotionTable(this);
004f96b3      
004f96bd      if ((arg2 & 1) != 0)
004f96c0          operator delete(this);
004f96c0      
004f96cb      return this;
004f96b0  }

004f96ce                                            90 90                                                                ..

004f96d0  void* __thiscall CMotionTable::`vector deleting destructor'(class CMotionTable* this, uint32_t arg2)

004f96d0  {
004f96d3      /* tailcall */
004f96d3      return CMotionTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
004f96d0  }

004f96d8                                                                          cc cc cc cc cc cc cc cc                          ........

004f96e0  class DBObj* CMotionTable::Allocate(class CMotionTable const* this @ ecx)

004f96e0  {
004f96e5      void* eax = operator new(0xa0);
004f96e5      
004f96ef      if (eax == 0)
004f96fa          return 0;
004f96fa      
004f96f3      /* tailcall */
004f96f3      return CMotionTable::CMotionTable(eax);
004f96e0  }

004f96fb                                                                                   90 90 90 90 90                             .....

004f9700  void __thiscall DDD_InterrogationResponseMessage::Serialize(class DDD_InterrogationResponseMessage* this, class Archive* arg2)

004f9700  {
004f9710      if ((1 & arg2->m_flags) != 0)
004f9710      {
004f9716          Archive::CheckAlignment(arg2, 4);
004f971f          uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
004f971f          
004f9726          if (eax_1 != 0)
004f9726          {
004f972b              if ((arg2->m_flags & 1) == 0)
004f9736                  this->m_et = *(uint32_t*)eax_1;
004f972b              else
004f9730                  *(uint32_t*)eax_1 = this->m_et;
004f9726          }
004f9710      }
004f9710      
004f973d      Archive::CheckAlignment(arg2, 4);
004f9746      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
004f9746      
004f974d      if (eax_2 != 0)
004f974d      {
004f9752          if ((arg2->m_flags & 1) == 0)
004f975d              this->m_ClientLanguage = *(uint32_t*)eax_2;
004f9752          else
004f9757              *(uint32_t*)eax_2 = this->m_ClientLanguage;
004f974d      }
004f974d      
004f9760      this->m_ItersWithKeys.vtable->Serialize(arg2);
004f9769      this->m_ItersWithoutKeys.vtable->Serialize(arg2);
004f9776      Archive::CheckAlignment(arg2, 4);
004f977f      uint8_t* eax_4 = Archive::GetBytes(arg2, 4);
004f977f      
004f9786      if (eax_4 != 0)
004f9786      {
004f978b          if ((arg2->m_flags & 1) != 0)
004f978b          {
004f9792              *(uint32_t*)eax_4 = this->m_dwFlags;
004f9795              return;
004f978b          }
004f978b          
004f979a          this->m_dwFlags = *(uint32_t*)eax_4;
004f9786      }
004f9700  }

004f97a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004f97b0  uint8_t __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>::resize_internal(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>* this, uint32_t arg2)

004f97b0  {
004f97b1      uint32_t ebp = arg2;
004f97b1      
004f97bb      if (ebp == this->m_numBuckets)
004f97bb      {
004f97be          int32_t eax;
004f97be          eax = 0;
004f97c1          return 0;
004f97bb      }
004f97bb      
004f97c9      int32_t* i_1 = nullptr;
004f97c9      
004f97cd      while (this->m_numElements != 0)
004f97cd      {
004f97d6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
004f97dc          int32_t* i_2;
004f97dc          int32_t* m_firstInterestingBucket_2;
004f97dc          
004f97dc          if (this->m_firstInterestingBucket == ecx_1)
004f97dc          {
004f97f2          label_4f97f2:
004f97f2              m_firstInterestingBucket_2 = nullptr;
004f97f4              i_2 = nullptr;
004f97dc          }
004f97dc          else
004f97dc          {
004f97e0              while (true)
004f97e0              {
004f97e0                  class HashTableData<QualifiedDataID,MissingIteration *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
004f97e0                  
004f97e6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
004f97e6                  {
004f97f8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
004f97fb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
004f97fd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
004f97fd                      break;
004f97e6                  }
004f97e6                  
004f97ed                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
004f97ed                  
004f97f0                  if (&m_firstInterestingBucket[1] == ecx_1)
004f97f0                      goto label_4f97f2;
004f97e0              }
004f97dc          }
004f97dc          
004f97ff          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
004f97ff          
004f9803          if (eax_4 == i_2)
004f9815              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
004f9803          else
004f9803          {
004f980c              void* edx_1;
004f980c              
004f980c              do
004f980c              {
004f9805                  edx_1 = eax_4;
004f9807                  eax_4 = *(uint32_t*)((char*)eax_4 + 8);
004f980c              } while (eax_4 != i_2);
004f980c              
004f9810              if (edx_1 != 0)
004f981c                  *(uint32_t*)((char*)edx_1 + 8) = *(uint32_t*)((char*)eax_4 + 8);
004f9810              else
004f9815                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
004f9803          }
004f9803          
004f981f          this->m_numElements -= 1;
004f9822          i_2[2] = i_1;
004f982a          i_1 = i_2;
004f97cd      }
004f97cd      
004f982e      class HashTableData<QualifiedDataID,MissingIteration *>** m_buckets = this->m_buckets;
004f982e      
004f9836      if (m_buckets != &this->m_aInplaceBuckets)
004f9839          operator delete[](m_buckets);
004f9839      
004f9846      this->m_buckets = nullptr;
004f9849      this->m_firstInterestingBucket = nullptr;
004f984c      this->m_numBuckets = 0;
004f984f      this->m_numElements = 0;
004f9852      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
004f9859      void* eax_7;
004f9859      
004f9859      if (i_1 != 0)
004f9859      {
004f98e0          int32_t* i;
004f98e0          
004f98e0          do
004f98e0          {
004f9860              uint32_t m_numBuckets = this->m_numBuckets;
004f9866              i = i_1[2];
004f9866              
004f986f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
004f986f              {
004f9871                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
004f9878                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
004f987e                  arg2 = m_numBuckets;
004f988e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
004f988e                  
004f9898                  if (eax_8 != bucketSizesEnd_1)
004f98a1                      eax_8 = &eax_8[1];
004f9898                  else
004f9898                  {
004f989a                      eax_8 -= 4;
004f989a                      
004f989f                      if (eax_8 != bucketSizesEnd_1)
004f98a1                          eax_8 = &eax_8[1];
004f9898                  }
004f9898                  
004f98a9                  IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
004f986f              }
004f986f              
004f98b7              uint32_t temp1_1 = (COMBINE(0, (i_1[1] + *(uint32_t*)i_1)) % this->m_numBuckets);
004f98ba              class HashTableData<QualifiedDataID,MissingIteration *>** m_buckets_1 = this->m_buckets;
004f98c0              i_1[2] = m_buckets_1[temp1_1];
004f98c3              m_buckets_1[temp1_1] = i_1;
004f98c9              eax_7 = &m_buckets_1[temp1_1];
004f98c9              
004f98ce              if (eax_7 < this->m_firstInterestingBucket)
004f98d0                  this->m_firstInterestingBucket = eax_7;
004f98d0              
004f98db              this->m_numElements += 1;
004f98de              i_1 = i;
004f98e0          } while (i != 0);
004f9859      }
004f9859      
004f98e9      eax_7 = 1;
004f98ec      return 1;
004f97b0  }

004f98ef                                               90                                                                 .

004f98f0  int32_t* __thiscall SmartArray<MissingIteration,1>::operator=(int32_t* arg1, int32_t* arg2)

004f98f0  {
004f98f4      int32_t* ebx = arg2;
004f9911      uint8_t eax_2;
004f9911      
004f9911      if ((arg1[1] & 0x7fffffff) < (ebx[1] & 0x7fffffff))
004f9911      {
004f9913          arg1[2] = 0;
004f9922          eax_2 = SmartArray<MissingIteration,1>::grow(arg1, (ebx[1] & 0x7fffffff));
004f9911      }
004f9911      
004f9929      if (((arg1[1] & 0x7fffffff) >= (ebx[1] & 0x7fffffff) || eax_2 != 0))
004f9929      {
004f9938          void* esi_1 = *(uint32_t*)ebx;
004f993d          void* eax_6 = ((ebx[2] * 0x30) + esi_1);
004f993d          
004f9945          if (esi_1 < eax_6)
004f9945          {
004f994a              void* ebx_2 = (*(uint32_t*)arg1 + 0x10);
004f994a              
004f9985              do
004f9985              {
004f9953                  *(uint32_t*)((char*)ebx_2 - 8) = *(uint32_t*)((char*)esi_1 + 8);
004f9959                  *(uint32_t*)((char*)ebx_2 - 4) = *(uint32_t*)((char*)esi_1 + 0xc);
004f9966                  *(uint32_t*)ebx_2 = *(uint32_t*)((char*)esi_1 + 0x10);
004f9968                  SmartArray<QualifiedDataID,1>::operator=(((char*)ebx_2 + 4), ((char*)esi_1 + 0x14));
004f9974                  SmartArray<QualifiedDataID,1>::operator=(((char*)ebx_2 + 0x10), ((char*)esi_1 + 0x20));
004f997d                  esi_1 += 0x30;
004f9980                  ebx_2 += 0x30;
004f9985              } while (esi_1 < eax_6);
004f9985              
004f9987              ebx = arg2;
004f9945          }
004f9945          
004f998b          int32_t ebx_3 = ebx[2];
004f998b          
004f9991          if (ebx_3 < arg1[2])
004f9991          {
004f9996              int32_t eax_11 = (ebx_3 * 0x30);
004f9999              int32_t var_34_2 = eax_11;
004f9999              
004f99ad              while (true)
004f99ad              {
004f99ad                  void* esi_3 = (*(uint32_t*)arg1 + eax_11);
004f99b3                  int32_t var_28;
004f99b3                  *(uint32_t*)((char*)esi_3 + 8) = var_28;
004f99ba                  int32_t var_20;
004f99ba                  *(uint32_t*)((char*)esi_3 + 0x10) = var_20;
004f99c1                  int32_t var_30_1 = 0x7c5a1c;
004f99c9                  int32_t s;
004f99c9                  __builtin_memset(&s, 0, 0x18);
004f99e1                  int32_t var_24;
004f99e1                  *(uint32_t*)((char*)esi_3 + 0xc) = var_24;
004f99e4                  SmartArray<QualifiedDataID,1>::operator=(((char*)esi_3 + 0x14), &s);
004f99f1                  int32_t var_10;
004f99f1                  SmartArray<QualifiedDataID,1>::operator=(((char*)esi_3 + 0x20), &var_10);
004f99fd                  ebx_3 += 1;
004f9a03                  var_34_2 += 0x30;
004f9a03                  
004f9a07                  if (ebx_3 >= arg1[2])
004f9a07                      break;
004f9a07                  
004f999f                  eax_11 = var_34_2;
004f99ad              }
004f9991          }
004f9991          
004f9a10          arg1[2] = arg2[2];
004f9929      }
004f9929      
004f9a1c      return arg1;
004f98f0  }

004f9a1f                                                                                               90                                 .

004f9a20  void __fastcall ThreadedCache::~ThreadedCache(class ThreadedCache* this)

004f9a20  {
004f9a29      PortalEvent::~PortalEvent(&this->m_evtWorkerHasJobs);
004f9a35      operator delete[](this->m_WorkerThreadReplyQueue.buckets_);
004f9a43      this->m_WorkerThreadReplyQueue.buckets_ = 0;
004f9a4d      SharedCriticalSection::~SharedCriticalSection(&this->m_WorkerThreadReplyQueue.m_backupListCritSec);
004f9a52      this->m_WorkerThreadReplyQueue.m_backupList.vtable = 0x7c5ad8;
004f9a5e      List<StringTableMetaLanguage::Node const *>::flush(&this->m_WorkerThreadReplyQueue.m_backupList);
004f9a6a      operator delete[](this->m_WorkerThreadJobQueue.buckets_);
004f9a78      this->m_WorkerThreadJobQueue.buckets_ = 0;
004f9a82      SharedCriticalSection::~SharedCriticalSection(&this->m_WorkerThreadJobQueue.m_backupListCritSec);
004f9a87      this->m_WorkerThreadJobQueue.m_backupList.vtable = 0x7c5ad8;
004f9a93      List<StringTableMetaLanguage::Node const *>::flush(&this->m_WorkerThreadJobQueue.m_backupList);
004f9a93      
004f9a9a      if (this != 0)
004f9a9a      {
004f9aa2          PortalThread::~PortalThread(&this->vtable);
004f9aaa          /* tailcall */
004f9aaa          return DBCache::~DBCache(this);
004f9a9a      }
004f9a9a      
004f9ab1      PortalThread::~PortalThread(nullptr);
004f9ab9      /* tailcall */
004f9ab9      return DBCache::~DBCache(this);
004f9a20  }

004f9abe                                                                                            90 90                                ..

004f9ac0  void __thiscall CLCache::OnBeginDDD(class CLCache* this, class DDD_BeginDDDMessage const* arg2)

004f9ac0  {
004f9ad2      this->m_DDDState = dddPatching;
004f9adc      SmartArray<MissingIteration,1>::operator=(&this->m_MissingIters, &arg2->m_MissingIterations);
004f9ae1      uint32_t m_cbDataExpected = arg2->m_cbDataExpected;
004f9ae1      
004f9aea      if (m_cbDataExpected != this->m_cbEarlySaves)
004f9af1          CLCache::NotifyDDDEvent(this, DDD_PatchtimeBegin, (m_cbDataExpected - this->m_cbEarlySaves));
004f9af1      
004f9af8      void* eax_2 = operator new(0x28);
004f9af8      
004f9b04      if (eax_2 == 0)
004f9b2b          eax_2 = nullptr;
004f9b04      else
004f9b04      {
004f9b06          *(uint32_t*)((char*)eax_2 + 4) = 1;
004f9b0d          *(uint32_t*)((char*)eax_2 + 8) = 0;
004f9b10          *(uint32_t*)((char*)eax_2 + 0x18) = 0;
004f9b13          *(uint32_t*)((char*)eax_2 + 0x1c) = 0;
004f9b16          *(uint32_t*)((char*)eax_2 + 0x20) = 0;
004f9b19          *(uint32_t*)((char*)eax_2 + 0x24) = 0;
004f9b1c          *(uint32_t*)eax_2 = &CLCache::CAsyncBeginDDDRequest::`vftable';
004f9b22          *(uint32_t*)((char*)eax_2 + 0xc) = 3;
004f9b04      }
004f9b04      
004f9b35      arg2 = eax_2;
004f9b39      /* jump -> this->vtable->EnqueueAsyncRequest */
004f9ac0  }

004f9b3c                                                                                      90 90 90 90                              ....

004f9b40  void __thiscall DDD_BeginDDDMessage::Serialize(class DDD_BeginDDDMessage* this, class Archive* arg2)

004f9b40  {
004f9b4c      if ((arg2->m_flags & 1) != 0)
004f9b4c      {
004f9b52          Archive::CheckAlignment(arg2, 4);
004f9b5b          uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
004f9b5b          
004f9b62          if (eax_1 != 0)
004f9b62          {
004f9b68              if ((arg2->m_flags & 1) == 0)
004f9b73                  this->m_et = *(uint32_t*)eax_1;
004f9b68              else
004f9b6d                  *(uint32_t*)eax_1 = this->m_et;
004f9b62          }
004f9b4c      }
004f9b4c      
004f9b7b      Serializer::SerializeObject(&this->m_cbDataExpected, arg2);
004f9b87      SmartArray<MissingIteration,1>::Serialize(&this->m_MissingIterations, arg2);
004f9b40  }

004f9b91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004f9ba0  void __thiscall SmartArray<MissingIteration,1>::Serialize(class SmartArray<MissingIteration,1>* this, class Archive* arg2)

004f9ba0  {
004f9baa      uint32_t m_num = this->m_num;
004f9bb1      Archive::CheckAlignment(arg2, 4);
004f9bba      uint8_t* eax = Archive::GetBytes(arg2, 4);
004f9bbf      int32_t ebp = 0;
004f9bbf      
004f9bc3      if (eax != 0)
004f9bc3      {
004f9bc9          if ((arg2->m_flags & 1) == 0)
004f9bcf              m_num = *(uint32_t*)eax;
004f9bc9          else
004f9bcb              *(uint32_t*)eax = m_num;
004f9bc3      }
004f9bc3      
004f9bd1      eax = arg2->m_flags;
004f9bd4      eax = !(eax);
004f9bd4      
004f9bd8      if ((eax & 1) != 0)
004f9bd8      {
004f9be3          if (m_num > Archive::GetSizeLeft(arg2))
004f9be3          {
004f9be7              Archive::RaiseError(arg2);
004f9bf0              return;
004f9be3          }
004f9be3          
004f9bf8          this->m_num = 0;
004f9bfb          SmartArray<MissingIteration,1>::SetNElements(this, m_num, 1);
004f9bd8      }
004f9bd8      
004f9c03      int32_t i = 0;
004f9c03      
004f9c07      if (this->m_num > 0)
004f9c07      {
004f9c23          do
004f9c23          {
004f9c18              **(uint32_t**)(this->m_data + ebp)(arg2);
004f9c1d              i += 1;
004f9c1e              ebp += 0x30;
004f9c23          } while (i < this->m_num);
004f9c07      }
004f9ba0  }

004f9c2c                                      90 90 90 90                                                              ....

004f9c30  uint8_t __thiscall SmartArray<MissingIteration,1>::SetNElements(class SmartArray<MissingIteration,1>* this, uint32_t const arg2, uint8_t arg3)

004f9c30  {
004f9c3a      uint32_t const ebp = arg2;
004f9c45      int32_t eax_1;
004f9c45      
004f9c45      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= ebp)
004f9c45      {
004f9c76          arg3 = ebp;
004f9c76          
004f9c7a          if (ebp < this->m_num)
004f9c7a          {
004f9c86              uint32_t ebp_2 = (ebp * 0x30);
004f9cf4              bool cond:1_1;
004f9cf4              
004f9cf4              do
004f9cf4              {
004f9c9e                  void* esi_2 = (this->m_data + ebp_2);
004f9ca0                  int32_t var_28;
004f9ca0                  *(uint32_t*)((char*)esi_2 + 8) = var_28;
004f9cab                  int32_t var_30_1 = 0x7c5a1c;
004f9cb3                  int32_t s;
004f9cb3                  __builtin_memset(&s, 0, 0x18);
004f9ccb                  int32_t var_24;
004f9ccb                  *(uint32_t*)((char*)esi_2 + 0xc) = var_24;
004f9cce                  int32_t var_20;
004f9cce                  *(uint32_t*)((char*)esi_2 + 0x10) = var_20;
004f9cd1                  SmartArray<QualifiedDataID,1>::operator=(((char*)esi_2 + 0x14), &s);
004f9cde                  int32_t var_10;
004f9cde                  SmartArray<QualifiedDataID,1>::operator=(((char*)esi_2 + 0x20), &var_10);
004f9ceb                  ebp_2 += 0x30;
004f9cee                  cond:1_1 = (arg3 + 1) < this->m_num;
004f9cf0                  arg3 += 1;
004f9cf4              } while (cond:1_1);
004f9cf6              ebp = arg2;
004f9c7a          }
004f9c45      }
004f9c45      else
004f9c45      {
004f9c47          eax_1 = arg3;
004f9c4d          uint32_t const eax_2;
004f9c4d          
004f9c4d          if (eax_1 == 0)
004f9c56              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, ebp);
004f9c4d          else
004f9c4f              eax_2 = ebp;
004f9c4f          
004f9c5e          eax_1 = SmartArray<MissingIteration,1>::grow(this, eax_2);
004f9c5e          
004f9c65          if (eax_1 == 0)
004f9c70              return eax_1;
004f9c45      }
004f9c45      
004f9cfc      this->m_num = ebp;
004f9d00      eax_1 = 1;
004f9d06      return 1;
004f9c30  }

004f9c8d                                         8d 49 00                                                               .I.
004f9d09                             90 90 90 90 90 90 90                                                           .......

004f9d10  uint8_t __thiscall CLCache::Init(class CLCache* this, class PStringBase<char> const* arg2, uint8_t arg3, uint8_t arg4, uint8_t arg5, uint8_t arg6, uint32_t arg7, int32_t arg8)

004f9d10  {
004f9d22      DBCache::Init(this, 0, &PStringBase<char>::null_string);
004f9d2f      this->m_fReadOnly = arg3;
004f9d39      class CLCache* eax;
004f9d39      eax = arg6;
004f9d3d      this->m_fEngineOnly = eax;
004f9d3d      
004f9d60      if ((this->m_DatFiles.m_sizeAndDeallocate & 0x7fffffff) >= 4)
004f9d60      {
004f9d73          int32_t i = 4;
004f9d73          
004f9d75          if (this->m_DatFiles.m_num > 4)
004f9d75          {
004f9d8f              do
004f9d8f              {
004f9d4d                  this->m_DatFiles.m_data[i] = 0;
004f9d8c                  i += 1;
004f9d8f              } while (i < this->m_DatFiles.m_num);
004f9d75          }
004f9d75          
004f9d4d          this->m_DatFiles.m_num = 4;
004f9d60      }
004f9d60      else if (SmartArray<unsigned long,1>::grow(&this->m_DatFiles, 4) != 0)
004f9d4d          this->m_DatFiles.m_num = 4;
004f9d4d      
004f9d98      this->m_DDDState = dddIdle;
004f9da2      class CLCache* this_1 = this;
004f9dac      int32_t i_1 = 0;
004f9dac      
004f9db0      if (this_1->m_DatFiles.m_num > 0)
004f9db0      {
004f9dcc          do
004f9dcc          {
004f9db2              this_1->m_DatFiles.m_data[i_1] = 0;
004f9dbf              this_1 = this;
004f9dc9              i_1 += 1;
004f9dcc          } while (i_1 < this_1->m_DatFiles.m_num);
004f9db0      }
004f9db0      
004f9dce      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004f9dd9      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004f9de1      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004f9de3      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004f9df0      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004f9df2      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004f9dff      int32_t ecx_6 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004f9e01      class PSRefBufferCharData<char>* m_charbuffer_4 = PStringBase<char>::null_string.m_charbuffer;
004f9e09      int32_t var_60 = ecx_6;
004f9e14      int32_t ecx_7 = InterlockedIncrement(&m_charbuffer_4[-1]);
004f9e1a      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
004f9e1c      int32_t var_64_1 = ecx_7;
004f9e25      InterlockedIncrement(&m_charbuffer[-1]);
004f9e39      uint8_t var_45 = LookFile::LookForFile(&PStringBase<unsigned short>::s_NullBuffer_2, m_charbuffer, m_charbuffer_4, 1);
004f9e3d      int32_t* __return;
004f9e3d      class PStringBase<unsigned short>* eax_11 = LookFile::GetFoundPath(&PStringBase<unsigned short>::s_NullBuffer_2, &__return);
004f9e48      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = this->m_strDatFilePath.m_charbuffer;
004f9e48      
004f9e59      if (m_charbuffer_1 != eax_11->m_charbuffer)
004f9e59      {
004f9e6e          if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
004f9e76              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
004f9e76          
004f9e78          class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = eax_11->m_charbuffer;
004f9e51          this->m_strDatFilePath.m_charbuffer = m_charbuffer_5;
004f9e81          InterlockedIncrement(&m_charbuffer_5->m_data[-8]);
004f9e59      }
004f9e59      
004f9e87      int32_t* ebx_3 = &__return[-5];
004f9e87      
004f9e9a      if ((InterlockedDecrement(&ebx_3[1]) == 0 && ebx_3 != 0))
004f9ea2          **(uint32_t**)ebx_3(1);
004f9ea2      
004f9ea4      ebx_3 = arg5;
004f9eb6      int32_t ecx_14;
004f9eb6      ecx_14 = ebx_3 != 0;
004f9ebe      int32_t* __return_4;
004f9ebe      
004f9ebe      if (this->m_fReadOnly == 0)
004f9ec5          __return_4 = ((ecx_14 + 2) & 0xfffffffb);
004f9ebe      else
004f9ec0          __return_4 = ((ecx_14 + 2) | 4);
004f9ec0      
004f9ec8      ebx_3 = this->m_fEngineOnly;
004f9ece      int32_t DBCache::s_GameDataPackVer_1 = DBCache::s_GameDataPackVer;
004f9ed4      int32_t DBCache::s_EngDataPackVer_1 = DBCache::s_EngDataPackVer;
004f9ede      __return = __return_4;
004f9ef0      void* __return_2;
004f9ef0      class PStringBase<unsigned short>* __return_1 = LookFile::GetFoundPath(&PStringBase<unsigned short>::s_NullBuffer_2, &__return_2);
004f9ef4      class PSRefBufferCharData<char>* m_charbuffer_2 = arg2->m_charbuffer;
004f9ef6      class PSRefBufferCharData<char>* m_charbuffer_6 = m_charbuffer_2;
004f9efe      InterlockedIncrement(&m_charbuffer_2[-1]);
004f9f04      class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = __return_1->m_charbuffer;
004f9f0e      InterlockedIncrement(&m_charbuffer_3->m_data[-8]);
004f9f1a      int32_t* esi_3 = ((char*)__return_2 - 0x14);
004f9f20      int32_t DBCache::s_EngDataPackVer_2 = DBCache::s_EngDataPackVer_1;
004f9f2b      int32_t var_20 = 1;
004f9f33      int32_t var_1c = 0;
004f9f37      int32_t* __return_3 = __return;
004f9f3b      int32_t var_14 = 0;
004f9f3f      int32_t var_10 = 0;
004f9f43      int32_t DBCache::s_GameDataPackVer_2 = DBCache::s_GameDataPackVer_1;
004f9f47      char var_4 = ebx_3;
004f9f47      
004f9f53      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
004f9f5b          **(uint32_t**)esi_3(1);
004f9f5b      
004f9f5d      int32_t eax_19;
004f9f5d      eax_19 = var_45;
004f9f5d      
004f9f63      if (eax_19 != 0)
004f9f63      {
004f9f73          void* esi_4 = operator new(0x788);
004f9f73          
004f9f7a          if (esi_4 == 0)
004f9fa1              esi_4 = nullptr;
004f9f7a          else
004f9f7a          {
004f9f7e              DiskController::DiskController(esi_4);
004f9f89              *(uint32_t*)esi_4 = 0x7c5a20;
004f9f8f              SharedCriticalSection::SharedCriticalSection(((char*)esi_4 + 0x750));
004f9f9a              CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(((char*)esi_4 + 0x774));
004f9f7a          }
004f9f7a          
004f9fad          *(uint32_t*)this->m_DatFiles.m_data = esi_4;
004f9fb9          class DiskController* ecx_25 = *(uint32_t*)this->m_DatFiles.m_data;
004f9fbd          class CLCache* eax_22;
004f9fbd          eax_22 = ecx_25 != 0;
004f9fc2          var_45 = eax_22;
004f9fc2          
004f9fc6          if (eax_22 != 0)
004f9fc6          {
004f9fd3              uint8_t eax_23 = ecx_25->vtable->InitFile(&m_charbuffer_6);
004f9fd8              var_45 = eax_23;
004f9fd8              
004f9fdc              if (eax_23 != 0)
004f9fdc              {
004f9fec                  void* esi_5 = operator new(0x788);
004f9fec                  
004f9ff3                  if (esi_5 == 0)
004fa01a                      esi_5 = nullptr;
004f9ff3                  else
004f9ff3                  {
004f9ff7                      DiskController::DiskController(esi_5);
004fa002                      *(uint32_t*)esi_5 = 0x7c5a20;
004fa008                      SharedCriticalSection::SharedCriticalSection(((char*)esi_5 + 0x750));
004fa013                      CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(((char*)esi_5 + 0x774));
004f9ff3                  }
004f9ff3                  
004fa020                  this->m_DatFiles.m_data[3] = esi_5;
004fa038                  class DiskController** eax_25;
004fa038                  eax_25 = this->m_DatFiles.m_data[3] != 0;
004fa03d                  var_45 = eax_25;
004fa03d                  
004fa041                  if (eax_25 != 0)
004fa041                  {
004fa061                      DBCache::SetMasterMapDID(this, &__return_1, *(uint32_t*)*(uint32_t*)this->m_DatFiles.m_data->vtable->GetMasterMapDID(&__return_2));
004fa06a                      this->vtable->Init_Internal();
004fa06a                      
004fa075                      if (arg8 != 0)
004fa081                          var_45 = this->vtable->SetRegion(arg8);
004fa081                      
004fa085                      int32_t eax_28;
004fa085                      eax_28 = var_45;
004fa085                      
004fa093                      if ((eax_28 != 0 && arg7 != 0))
004fa0a4                          var_45 = this->vtable->SetLanguageInternal(arg7, arg6);
004fa041                  }
004f9fdc              }
004f9fc6          }
004f9f63      }
004f9f63      
004fa0a8      int32_t* i_2 = nullptr;
004fa0aa      __return = nullptr;
004fa0aa      
004fa18f      do
004fa18f      {
004fa0ba          int32_t* ecx_39 = *(uint32_t*)((char*)i_2 + this->m_DatFiles.m_data);
004fa0ba          
004fa0bf          if (ecx_39 != 0)
004fa0bf          {
004fa0c7              int32_t eax_32;
004fa0c7              int32_t edx_16;
004fa0c7              eax_32 = *(uint32_t*)(*(uint32_t*)ecx_39 + 0x38)();
004fa0c7              
004fa0cc              if ((eax_32 | edx_16) != 0)
004fa0cc              {
004fa0e1                  int32_t eax_35;
004fa0e1                  int32_t edx_18;
004fa0e1                  eax_35 = *(uint32_t*)(**(uint32_t**)((char*)i_2 + this->m_DatFiles.m_data) + 0x38)();
004fa0f4                  void* esi_9 = (this->m_DatFiles.m_data + i_2);
004fa0f6                  void* eax_37 = operator new(0x18);
004fa100                  void* edi_3;
004fa100                  
004fa100                  if (eax_37 == 0)
004fa117                      edi_3 = nullptr;
004fa100                  else
004fa100                  {
004fa102                      *(uint32_t*)((char*)eax_37 + 4) = edx_18;
004fa105                      *(uint32_t*)eax_37 = eax_35;
004fa107                      *(uint32_t*)((char*)eax_37 + 8) = 0;
004fa110                      *(uint32_t*)((char*)eax_37 + 0x10) = *(uint32_t*)esi_9;
004fa113                      edi_3 = eax_37;
004fa100                  }
004fa100                  
004fa123                  int32_t ebx_4 = *(uint32_t*)((char*)edi_3 + 4);
004fa126                  int32_t ebp_3 = *(uint32_t*)edi_3;
004fa128                  int32_t var_5c_16 = 0;
004fa130                  uint32_t m_numBuckets = this->m_DatFileByIDTable.m_intrusiveTable.m_numBuckets;
004fa131                  int32_t var_64_3 = ebx_4;
004fa132                  int32_t var_68_1 = ebp_3;
004fa13b                  void** ecx_44 = &this->m_DatFileByIDTable.m_intrusiveTable.m_buckets[_aullrem()];
004fa13e                  void* eax_39 = *(uint32_t*)ecx_44;
004fa13e                  
004fa142                  if (eax_39 == 0)
004fa142                  {
004fa160                  label_4fa160:
004fa160                      *(uint32_t*)((char*)edi_3 + 8) = *(uint32_t*)ecx_44;
004fa163                      *(uint32_t*)ecx_44 = edi_3;
004fa163                      
004fa168                      if (ecx_44 < this->m_DatFileByIDTable.m_intrusiveTable.m_firstInterestingBucket)
004fa12a                          this->m_DatFileByIDTable.m_intrusiveTable.m_firstInterestingBucket = ecx_44;
004fa12a                      
004fa12a                      this->m_DatFileByIDTable.m_intrusiveTable.m_numElements += 1;
004fa142                  }
004fa142                  else
004fa142                  {
004fa14f                      while ((*(uint32_t*)eax_39 != ebp_3 || *(uint32_t*)((char*)eax_39 + 4) != ebx_4))
004fa14f                      {
004fa151                          eax_39 = *(uint32_t*)((char*)eax_39 + 8);
004fa151                          
004fa156                          if (eax_39 == 0)
004fa156                              goto label_4fa160;
004fa14f                      }
004fa14f                      
004fa15c                      if (eax_39 == 0)
004fa15c                          goto label_4fa160;
004fa15c                      
004fa173                      operator delete(edi_3);
004fa142                  }
004fa142                  
004fa17b                  i_2 = __return;
004fa0cc              }
004fa0bf          }
004fa0bf          
004fa185          i_2 = &i_2[1];
004fa18b          __return = i_2;
004fa18f      } while (i_2 < 0x10);
004fa18f      
004fa199      i_2 = var_45;
004fa1a3      DBCache::s_bCacheInitialized = i_2;
004fa1a9      PortalThread::Resume(&this->vtable);
004fa1a9      
004fa1c1      if ((InterlockedDecrement(&m_charbuffer_3->m_data[-8]) == 0 && m_charbuffer_3 != 0x14))
004fa1c9          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_3 + -0x14)(1);
004fa1c9      
004fa1cf      void* __offset(PSRefBufferCharData<char>, -0x14) esi_15 = &m_charbuffer_6->m_data[0xffffffec];
004fa1cf      
004fa1de      if ((InterlockedDecrement(((char*)esi_15 + 4)) == 0 && esi_15 != 0))
004fa1e6          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_15) + -0x14)(1);
004fa1e6      
004fa1fb      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
004fa203          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
004fa203      
004fa218      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
004fa220          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
004fa220      
004fa226      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_21 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
004fa226      
004fa235      if ((InterlockedDecrement(((char*)esi_21 + 4)) == 0 && esi_21 != 0))
004fa23d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_21) + -0x14)(1);
004fa23d      
004fa242      int32_t eax_49;
004fa242      eax_49 = i_2;
004fa248      return eax_49;
004f9d10  }

004f9d79                                                                             8d a4 24 00 00 00 00                           ..$....
004fa24b                                   90 90 90 90 90                                                             .....

004fa250  void __fastcall CLCache::LoadHighResDat(class CLCache* this)

004fa250  {
004fa263      if (this->m_DatFiles.m_data[3] != 0)
004fa263      {
004fa272          class PStringBase<char> var_40;
004fa272          PStringBase<char>::PStringBase<char>(&var_40, "client_highres.dat");
004fa277          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004fa282          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
004fa28a          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
004fa28c          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
004fa291          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
004fa299          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
004fa29b          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
004fa2a0          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
004fa2a8          int32_t ecx_2 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
004fa2aa          class PSRefBufferCharData<unsigned short>* m_charbuffer = this->m_strDatFilePath.m_charbuffer;
004fa2b0          uint8_t var_50_5 = 0;
004fa2b2          int32_t var_54_1 = ecx_2;
004fa2ba          int32_t DBCache::s_EngDataPackVer_1 = &m_charbuffer->m_data[-8];
004fa2bd          DBCache::s_EngDataPackVer_1 = InterlockedIncrement(DBCache::s_EngDataPackVer_1);
004fa2c7          PStringBase<char>::to_wpstring(&var_40, &DBCache::s_EngDataPackVer_1, 0);
004fa2c7          
004fa2dd          if (LookFile::LookForFile(&PStringBase<unsigned short>::s_NullBuffer_2, DBCache::s_EngDataPackVer_1, m_charbuffer, var_50_5) != 0)
004fa2dd          {
004fa2ed              int32_t DBCache::s_GameDataPackVer_1 = DBCache::s_GameDataPackVer;
004fa2f3              int32_t eax_6;
004fa2f3              eax_6 = this->m_fReadOnly != 0;
004fa2f8              uint8_t m_fEngineOnly = this->m_fEngineOnly;
004fa30d              DBCache::s_EngDataPackVer_1 = DBCache::s_EngDataPackVer;
004fa332              class PStringBase<unsigned short> __return;
004fa332              void var_28;
004fa332              DiskConInitInfo::DiskConInitInfo(&var_28, &var_40, LookFile::GetFoundPath(&PStringBase<unsigned short>::s_NullBuffer_2, &__return), PORTAL_DATFILE, 0x69466948, ((eax_6 << 2) + 2), 0, 0, DBCache::s_EngDataPackVer_1, DBCache::s_GameDataPackVer_1, m_fEngineOnly);
004fa33b              int32_t* esi_2 = (__return - 0x14);
004fa33b              
004fa34a              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
004fa352                  **(uint32_t**)esi_2(1);
004fa352              
004fa369              if (this->m_DatFiles.m_data[3]->vtable->InitFile(&var_28) != 0)
004fa369              {
004fa376                  class PStringBase<unsigned short> __return_1;
004fa376                  int32_t edx_5;
004fa376                  __return_1 = this->m_DatFiles.m_data[3]->vtable->GetDatFileID();
004fa379                  __return = __return_1;
004fa392                  int32_t var_38_1 = edx_5;
004fa396                  HashTable<unsigned __int64,SmartArray<QualityChangeHandler *,1> *,0>::add(&this->m_DatFileByIDTable, &__return, &this->m_DatFiles.m_data[3]);
004fa369              }
004fa369              
004fa39f              _STL::pair<PStringBase<char>,PStringBase<char> >::~pair<PStringBase<char>,PStringBase<char> >(&var_28);
004fa2dd          }
004fa2dd          
004fa3a8          PageInfo::~PageInfo(&PStringBase<unsigned short>::s_NullBuffer_2);
004fa3b1          int32_t* esi_4 = (var_40 - 0x14);
004fa3b1          
004fa3c0          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
004fa3c8              **(uint32_t**)esi_4(1);
004fa263      }
004fa250  }

004fa3d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004fa3e0  void __thiscall CLCache::OnServerInterrogation(class CLCache* this, class DDD_InterrogationMessage const* arg2)

004fa3e0  {
004fa3e5      class DDD_InterrogationMessage* ebp = arg2;
004fa3ed      int32_t i = 0;
004fa3ef      this->m_DDDState = dddInterrogationReceved;
004fa3f9      this->m_EarlySaves.m_num = 0;
004fa3ff      this->m_cbEarlySaves = 0;
004fa3ff      
004fa409      if ((ebp->m_dwProductID & 4) != 0)
004fa40b          CLCache::LoadHighResDat(this);
004fa40b      
004fa413      struct CLCache::VTable* vtable = this->vtable;
004fa415      this->m_ridDDDRegion = ebp->m_dwServersRegion;
004fa421      char eax_2;
004fa421      class TResult* __return_2;
004fa421      eax_2 = vtable->SetRegion(ebp->m_dwServersRegion);
004fa424      int32_t ebx;
004fa424      ebx = eax_2;
004fa428      class TResult* __return;
004fa428      
004fa428      if (ebx == 0)
004fa428      {
004fa59f          int32_t var_44_8 = 0;
004fa5a0          __return = __return_2;
004fa5a3          uint16_t* var_4c = &data_794320;
004fa5ad          var_4c = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, var_4c);
004fa5b0          uint16_t* var_50 = &data_794320;
004fa5ba          var_50 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4c, var_50);
004fa5c2          uint16_t eax_20;
004fa5c2          class PStringBase<unsigned short> ecx_20;
004fa5c2          class PStringBase<unsigned short> edx_6;
004fa5c2          eax_20 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_50, &data_794320);
004fa5cc          PlatformString::DisplayString(eax_20, edx_6, ecx_20, 0xc9, var_50);
004fa5d4          Turbine::Debug::Abort();
004fa5d4          return;
004fa428      }
004fa428      
004fa433      int32_t var_24 = 0x7c5ad0;
004fa437      int32_t var_14_1 = 0x7c5ad0;
004fa441      bool cond:0_1 = this->m_DatFiles.m_num <= 0;
004fa443      int32_t var_2c_1 = 0xf7e6;
004fa44b      int32_t var_30 = 0x7c5b48;
004fa453      void* var_20_1 = nullptr;
004fa457      int32_t var_1c_1 = 0;
004fa45b      int32_t var_18_1 = 0;
004fa45f      void* var_10_1 = nullptr;
004fa463      int32_t var_c_1 = 0;
004fa467      int32_t var_8_1 = 0;
004fa46b      int32_t var_4_1 = 0;
004fa46b      
004fa46f      if (!(cond:0_1))
004fa46f      {
004fa4ba          do
004fa4ba          {
004fa481              if (this->m_DatFiles.m_data[i]->vtable->IsInitialized() != 0)
004fa481              {
004fa48e                  class TResult* __return_1;
004fa48e                  int32_t edx_2;
004fa48e                  __return_1 = this->m_DatFiles.m_data[i]->vtable->GetDatFileID();
004fa491                  int32_t var_44_1 = edx_2;
004fa492                  __return = __return_1;
004fa492                  
004fa4ad                  if (this->m_DatFiles.m_data[i]->vtable->LoadIterationList(CAllIterationList::AddIterationList(&var_24, __return)) == 0)
004fa4af                      ebx = 0;
004fa481              }
004fa481              
004fa4b7              i += 1;
004fa4ba          } while (i < this->m_DatFiles.m_num);
004fa46f      }
004fa46f      
004fa4c3      uint32_t var_28_1 = DBCache::GetLocalLanguage();
004fa4ca      this->m_eNameRuleLanguage = ebp->m_NameRuleLanguage;
004fa4ca      
004fa4d0      if (ebx != 0)
004fa4d0      {
004fa4d6          class FakeMessageData* var_44_3 = &var_30;
004fa4db          __return = &arg2;
004fa4de          CLCache::AdoptAndDeliverMessage(this, __return, var_44_3);
004fa4d0      }
004fa4d0      
004fa4f9      if (((var_c_1 & 0x80000000) == 0x80000000 && var_10_1 != 0))
004fa4f9      {
004fa4fb          int32_t i_5 = *(uint32_t*)((char*)var_10_1 - 4);
004fa4fb          
004fa508          if ((i_5 - 1) >= 0)
004fa508          {
004fa50a              void* esi_1 = (((char*)var_10_1 + (i_5 * 0x28)) + 0x14);
004fa50d              int32_t i_3 = i_5;
004fa52a              int32_t i_1;
004fa52a              
004fa52a              do
004fa52a              {
004fa510                  esi_1 -= 0x28;
004fa510                  
004fa51c                  if (SmartArray<int,1>::ShouldDeallocate_(esi_1) != 0)
004fa521                      operator delete[](*(uint32_t*)esi_1);
004fa521                  
004fa529                  i_1 = i_3;
004fa529                  i_3 -= 1;
004fa52a              } while (i_1 != 1);
004fa508          }
004fa508          
004fa52d          operator delete[](((char*)var_10_1 - 4));
004fa4f9      }
004fa4f9      
004fa551      if (((var_1c_1 & 0x80000000) == 0x80000000 && var_20_1 != 0))
004fa551      {
004fa557          int32_t i_6 = *(uint32_t*)((char*)var_20_1 - 4);
004fa557          
004fa564          if ((i_6 - 1) >= 0)
004fa564          {
004fa566              void* esi_2 = (((char*)var_20_1 + (i_6 * 0x28)) + 0x14);
004fa569              int32_t i_4 = i_6;
004fa58a              int32_t i_2;
004fa58a              
004fa58a              do
004fa58a              {
004fa570                  esi_2 -= 0x28;
004fa570                  
004fa57c                  if (SmartArray<int,1>::ShouldDeallocate_(esi_2) != 0)
004fa581                      operator delete[](*(uint32_t*)esi_2);
004fa581                  
004fa589                  i_2 = i_4;
004fa589                  i_4 -= 1;
004fa58a              } while (i_2 != 1);
004fa564          }
004fa564          
004fa58d          operator delete[](((char*)var_20_1 - 4));
004fa551      }
004fa3e0  }

004fa5e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004fa5f0  void __fastcall HashTable<IDClass<_tagDataID,32,0>,unsigned long,0>::~HashTable<IDClass<_tagDataID,32,0>,unsigned long,0>(class HashTable<IDClass<_tagDataID,32,0>,unsigned long,0>* this)

004fa5f0  {
004fa5f4      this->vtable = 0x7c5b50;
004fa5fc      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
004fa601      class HashTableData<IDClass<_tagDataID,32,0>,unsigned long>** m_buckets = this->m_intrusiveTable.m_buckets;
004fa5f1      this->m_intrusiveTable.vtable = 0x7c59fc;
004fa5f1      
004fa60f      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004fa612          operator delete[](m_buckets);
004fa612      
004fa5f1      this->m_intrusiveTable.m_buckets = nullptr;
004fa5f1      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004fa5f1      this->m_intrusiveTable.m_numBuckets = 0;
004fa5f1      this->m_intrusiveTable.m_numElements = 0;
004fa5f0  }

004fa62a                                90 90 90 90 90 90                                                            ......

004fa630  void* __thiscall HashTable<unsigned __int64,DiskController *,0>::`scalar deleting destructor'(class HashTable<unsigned __int64,DiskController *,0>* this, uint32_t arg2)

004fa630  {
004fa639      this->vtable = 0x7c5b4c;
004fa63f      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_intrusiveTable);
004fa644      class HashTableData<unsigned __int64,DiskController *>** m_buckets = this->m_intrusiveTable.m_buckets;
004fa634      this->m_intrusiveTable.vtable = &IntrusiveHashTable<uint64_t,class HashTableData<uint64_t,class DiskController*>*,0>::`vftable';
004fa634      
004fa652      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004fa655          operator delete[](m_buckets);
004fa655      
004fa634      this->m_intrusiveTable.m_buckets = nullptr;
004fa634      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004fa634      this->m_intrusiveTable.m_numBuckets = 0;
004fa634      this->m_intrusiveTable.m_numElements = 0;
004fa634      
004fa670      if ((arg2 & 1) != 0)
004fa673          operator delete(this);
004fa673      
004fa67f      return this;
004fa630  }

004fa682        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004fa690  void* __thiscall HashTable<IDClass<_tagDataID,32,0>,unsigned long,0>::`scalar deleting destructor'(class HashTable<IDClass<_tagDataID,32,0>,unsigned long,0>* this, uint32_t arg2)

004fa690  {
004fa699      this->vtable = 0x7c5b50;
004fa69f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
004fa6a4      class HashTableData<IDClass<_tagDataID,32,0>,unsigned long>** m_buckets = this->m_intrusiveTable.m_buckets;
004fa694      this->m_intrusiveTable.vtable = 0x7c59fc;
004fa694      
004fa6b2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004fa6b5          operator delete[](m_buckets);
004fa6b5      
004fa694      this->m_intrusiveTable.m_buckets = nullptr;
004fa694      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004fa694      this->m_intrusiveTable.m_numBuckets = 0;
004fa694      this->m_intrusiveTable.m_numElements = 0;
004fa694      
004fa6d0      if ((arg2 & 1) != 0)
004fa6d3          operator delete(this);
004fa6d3      
004fa6df      return this;
004fa690  }

004fa6e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004fa6f0  uint8_t __thiscall CLCache::RemovePendingDownload(class CLCache* this, struct QualifiedDataID const* arg2)

004fa6f0  {
004fa6f5      struct QualifiedDataID* ebp = arg2;
004fa6fa      class CLCache* this_1 = this;
004fa708      class CLCache* this_2 = this_1;
004fa70e      void __return;
004fa70e      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::find_internal(&this_1->m_PendingDownloads.m_intrusiveTable.vtable, &__return, ebp);
004fa719      void* var_4;
004fa719      
004fa719      if (var_4 == 0)
004fa719      {
004fa8a3          void* eax;
004fa8a3          eax = 0;
004fa8a9          return 0;
004fa719      }
004fa719      
004fa720      void* esi = *(uint32_t*)((char*)var_4 + 0xc);
004fa723      int32_t edx = *(uint32_t*)((char*)esi + 0x1c);
004fa726      int32_t eax_1 = 0;
004fa726      
004fa72a      if (edx > 0)
004fa72a      {
004fa736          int32_t* ecx_2 = (*(uint32_t*)((char*)esi + 0x14) + 4);
004fa736          
004fa74a          do
004fa74a          {
004fa742              if (*(uint32_t*)ecx_2 == ebp->ID.id)
004fa742              {
004fa754                  if (eax_1 != 0xffffffff)
004fa754                  {
004fa75a                      int32_t edx_1 = *(uint32_t*)((char*)esi + 0x1c);
004fa75a                      
004fa75f                      if (eax_1 < edx_1)
004fa75f                      {
004fa764                          *(uint32_t*)((char*)esi + 0x1c) = (edx_1 - 1);
004fa764                          
004fa767                          if (eax_1 != (edx_1 - 1))
004fa767                          {
004fa769                              int32_t ecx_3 = *(uint32_t*)((char*)esi + 0x14);
004fa76f                              *(uint32_t*)(ecx_3 + (eax_1 << 3)) = *(uint32_t*)(ecx_3 + ((edx_1 - 1) << 3));
004fa776                              *(uint32_t*)((ecx_3 + (eax_1 << 3)) + 4) = *(uint32_t*)((ecx_3 + ((edx_1 - 1) << 3)) + 4);
004fa77a                              int32_t eax_2 = *(uint32_t*)((char*)esi + 0x1c);
004fa77d                              int32_t ecx_4 = *(uint32_t*)((char*)esi + 0x14);
004fa784                              *(uint32_t*)(ecx_4 + (eax_2 << 3)) = this_2;
004fa78b                              int32_t var_10;
004fa78b                              *(uint32_t*)((ecx_4 + (eax_2 << 3)) + 4) = var_10;
004fa767                          }
004fa75f                      }
004fa75f                      
004fa794                      if (*(uint32_t*)((char*)esi + 0x1c) == 0)
004fa794                      {
004fa7a5                          int32_t* eax_5 = this_1->vtable->GetDiskController(ebp, *(uint32_t*)((char*)esi + 8), *(uint32_t*)((char*)esi + 0xc));
004fa7b0                          int32_t edx_8 = eax_5[0x1d4];
004fa7be                          arg2 = *(uint32_t*)((char*)esi + 0x10);
004fa7c2                          *(uint32_t*)(edx_8 + 4)();
004fa7d2                          CMostlyConsecutiveIntSet::Add(&eax_5[0x1dd], arg2);
004fa7d9                          CMostlyConsecutiveIntSet::Sort(&eax_5[0x1dd]);
004fa7e3                          *(uint32_t*)(*(uint32_t*)eax_5 + 0x2c)(&eax_5[0x1dd]);
004fa7e8                          SharedCriticalSection::LeaveCriticalSection(&eax_5[0x1d4]);
004fa7ed                          this_1 = this_2;
004fa794                      }
004fa754                  }
004fa754                  
004fa754                  break;
004fa742              }
004fa742              
004fa744              eax_1 += 1;
004fa745              ecx_2 = &ecx_2[2];
004fa74a          } while (eax_1 < edx);
004fa72a      }
004fa72a      
004fa7f1      uint32_t id = ebp->ID.id;
004fa7f4      uint32_t Type = ebp->Type;
004fa7fc      uint32_t temp1 = (COMBINE(0, (id + Type)) % this_1->m_PendingDownloads.m_intrusiveTable.m_numBuckets);
004fa802      class HashTableData<QualifiedDataID,MissingIteration *>** m_buckets = this_1->m_PendingDownloads.m_intrusiveTable.m_buckets;
004fa808      int32_t* i_1 = m_buckets[temp1];
004fa808      
004fa812      for (int32_t* i = i_1; i != 0; i = i[2])
004fa812      {
004fa81b          if ((*(uint32_t*)i == Type && i[1] == id))
004fa81b          {
004fa828              if (i != 0)
004fa828              {
004fa82c                  if (i_1 == i)
004fa80b                      m_buckets[temp1] = i_1[2];
004fa82c                  else
004fa82c                  {
004fa837                      int32_t* i_2;
004fa837                      
004fa837                      do
004fa837                      {
004fa830                          i_2 = i_1;
004fa832                          i_1 = i_1[2];
004fa837                      } while (i_1 != i);
004fa837                      
004fa83b                      if (i_2 != 0)
004fa847                          i_2[2] = i_1[2];
004fa83b                      else
004fa80b                          m_buckets[temp1] = i_1[2];
004fa82c                  }
004fa82c                  
004fa852                  this_1->m_PendingDownloads.m_intrusiveTable.m_numElements -= 1;
004fa858                  operator delete(i);
004fa828              }
004fa828              
004fa828              break;
004fa81b          }
004fa812      }
004fa812      
004fa869      if (this_1->m_PendingDownloads.m_intrusiveTable.m_numElements == 0)
004fa869      {
004fa877          this_1->m_DDDState = dddEndSent;
004fa881          int32_t var_10_1 = 0xf7ea;
004fa889          this_2 = &DDD_PatchPendingMessage::`vftable';
004fa891          CLCache::AdoptAndDeliverMessage(this_1, &arg2, &this_2);
004fa869      }
004fa869      
004fa898      class TResult* eax_9;
004fa898      eax_9 = 1;
004fa89e      return 1;
004fa6f0  }

004fa8ac                                      90 90 90 90                                                              ....

004fa8b0  void __fastcall CLCache::OnEndDDD(class CLCache* this)

004fa8b0  {
004fa8bc      SmartArray<MissingIteration,1>::Reset(&this->m_MissingIters);
004fa8c7      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_PendingDownloads.m_intrusiveTable);
004fa8d2      SmartArray<FontReference,1>::Reset(&this->m_EarlySaves);
004fa8d2      
004fa8de      if (this->m_DDDState == dddInterrogationReceved)
004fa8de      {
004fa8ec          this->m_DDDState = dddEndSent;
004fa8f6          int32_t var_4_1 = 0xf7ea;
004fa8fe          int32_t var_8 = 0x7c58c8;
004fa906          void __return;
004fa906          CLCache::AdoptAndDeliverMessage(this, &__return, &var_8);
004fa8de      }
004fa8de      
004fa910      this->m_DDDState = dddRunTime;
004fa91a      uint32_t var_10 = 0;
004fa922      DBCache::GetCurrentRegion(&var_10);
004fa933      CLCache::NotifyDDDEvent(this, DDD_PatchtimeEnd, var_10);
004fa8b0  }

004fa93d                                                                                         90 90 90                               ...

004fa940  void __fastcall CLCache::OnBeginDDDRequestFinished(class CLCache* this, struct CLCache::CAsyncBeginDDDRequest* arg2)

004fa940  {
004fa945      class CLCache* ebp = this;
004fa94d      void* ebx = nullptr;
004fa94f      bool cond:0 = ebp->m_MissingIters.m_num <= 0;
004fa952      class CLCache* __return = ebp;
004fa956      int32_t var_14 = 0;
004fa95a      uint32_t m_numBuckets_1;
004fa95a      
004fa95a      if (!(cond:0))
004fa95a      {
004fa960          void* var_24_1 = nullptr;
004fabb9          bool cond:2_1;
004fabb9          
004fabb9          do
004fabb9          {
004fa96b              int32_t i = 0;
004fa96b              
004fa96f              if (ebp->m_DatFiles.m_num > 0)
004fa96f              {
004fa99e                  do
004fa99e                  {
004fa97c                      int32_t eax_3;
004fa97c                      int32_t edx_2;
004fa97c                      eax_3 = ebp->m_DatFiles.m_data[i]->vtable->GetDatFileID();
004fa97f                      class MissingIteration* m_data_1 = ebp->m_MissingIters.m_data;
004fa97f                      
004fa993                      if ((*(uint32_t*)(&m_data_1->idDatFile + ebx) == eax_3 && *(uint32_t*)(((char*)ebx + m_data_1) + 0xc) == edx_2))
004fa993                          break;
004fa993                      
004fa99b                      i += 1;
004fa99e                  } while (i < ebp->m_DatFiles.m_num);
004fa96f              }
004fa96f              
004fa9a3              if ((ebp->m_DatFiles.m_num <= 0 || i < 4))
004fa9a3              {
004fa9af                  void* eax_6 = ((char*)ebx + ebp->m_MissingIters.m_data);
004fa9b2                  int32_t ecx_2 = *(uint32_t*)((char*)eax_6 + 0x1c);
004fa9b7                  int32_t bucketSizesEnd_1;
004fa9b7                  
004fa9b7                  if (ecx_2 != 0)
004fa9b7                  {
004faa0d                      int32_t var_1c_1 = 0;
004faa0d                      
004faa15                      if (ecx_2 > 0)
004faa15                      {
004fab9b                          bool cond:3_1;
004fab9b                          
004fab9b                          do
004fab9b                          {
004faa20                              class MissingIteration* m_data = ebp->m_MissingIters.m_data;
004faa33                              int32_t* edi_3 = (*(uint32_t*)(&m_data->IDsToDownload + ebx) + (var_1c_1 << 3));
004faa36                              void* eax_10 = operator new(0x10);
004faa42                              void* var_20_1;
004faa42                              void* esi_3;
004faa42                              
004faa42                              if (eax_10 == 0)
004faa42                              {
004faa5c                                  var_20_1 = nullptr;
004faa60                                  esi_3 = nullptr;
004faa42                              }
004faa42                              else
004faa42                              {
004faa46                                  *(uint32_t*)eax_10 = *(uint32_t*)edi_3;
004faa48                                  int32_t edx_8 = edi_3[1];
004faa4b                                  *(uint32_t*)((char*)eax_10 + 0xc) = ((char*)ebx + m_data);
004faa4e                                  esi_3 = eax_10;
004faa50                                  *(uint32_t*)((char*)eax_10 + 4) = edx_8;
004faa53                                  *(uint32_t*)((char*)eax_10 + 8) = 0;
004faa56                                  var_20_1 = esi_3;
004faa42                              }
004faa42                              
004faa62                              int32_t ecx_9 = *(uint32_t*)((char*)esi_3 + 4);
004faa65                              int32_t edi_4 = *(uint32_t*)esi_3;
004faa67                              uint32_t m_numBuckets = ebp->m_PendingDownloads.m_intrusiveTable.m_numBuckets;
004faa74                              class HashTableData<QualifiedDataID,MissingIteration *>** m_buckets = ebp->m_PendingDownloads.m_intrusiveTable.m_buckets;
004faa7a                              m_numBuckets_1 = m_numBuckets;
004faa7e                              int32_t* edx_11 = m_buckets[(COMBINE(0, (edi_4 + ecx_9)) % m_numBuckets)];
004faa7e                              
004faa83                              if (edx_11 == 0)
004faa83                              {
004faaa5                              label_4faaa5:
004faaa5                                  class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>* edi_5 = &ebp->m_PendingDownloads.m_intrusiveTable;
004faaa5                                  
004faab1                                  if ((m_numBuckets * 2) < (ebp->m_PendingDownloads.m_intrusiveTable.m_numElements + 1))
004faab1                                  {
004faabc                                      uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
004faacc                                      bucketSizesEnd_1 = g_bucketSizesEnd;
004faad0                                      uint32_t* bucketSizesBegin_2 = bucketSizesBegin_1;
004faad9                                      int32_t i_1 = _STL::distance(&bucketSizesBegin_2, &bucketSizesEnd_1);
004faad9                                      
004faae0                                      if (i_1 > 0)
004faae0                                      {
004fab1f                                          do
004fab1f                                          {
004faae4                                              int32_t i_3 = (i_1 >> 1);
004faaec                                              bucketSizesEnd_1 = bucketSizesBegin_1;
004faaf0                                              _STL::advance(&bucketSizesEnd_1, i_3);
004faaf9                                              int32_t bucketSizesEnd_3 = bucketSizesEnd_1;
004faaf9                                              
004fab0d                                              if (_STL::__less_2<unsigned long,unsigned long>::operator()(&__return, bucketSizesEnd_3, m_numBuckets_1) == 0)
004fab1b                                                  i_1 = i_3;
004fab0d                                              else
004fab0d                                              {
004fab14                                                  bucketSizesBegin_1 = (bucketSizesEnd_3 + 4);
004fab17                                                  i_1 += (0xffffffff - i_3);
004fab0d                                              }
004fab1f                                          } while (i_1 > 0);
004fab1f                                          
004fab21                                          ebp = __return;
004fab25                                          esi_3 = var_20_1;
004faae0                                      }
004faae0                                      
004fab29                                      uint32_t const* bucketSizesEnd_2 = g_bucketSizesEnd;
004fab29                                      
004fab31                                      if (bucketSizesBegin_1 == bucketSizesEnd_2)
004fab33                                          bucketSizesBegin_1 = &bucketSizesBegin_1[-1];
004fab33                                      
004fab38                                      void* bucketSizesBegin_3 = bucketSizesBegin_1;
004fab38                                      
004fab3a                                      if (bucketSizesBegin_1 != bucketSizesEnd_2)
004fab3c                                          bucketSizesBegin_3 = &bucketSizesBegin_1[1];
004fab3c                                      
004fab41                                      edi_5 = &ebp->m_PendingDownloads.m_intrusiveTable;
004fab4a                                      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>::resize_internal(edi_5, *(uint32_t*)bucketSizesBegin_3);
004faab1                                  }
004faab1                                  
004fab5e                                  ebx = var_24_1;
004fab62                                  void** eax_18 = &edi_5->m_buckets[(COMBINE(0, (*(uint32_t*)esi_3 + *(uint32_t*)((char*)esi_3 + 4))) % edi_5->m_numBuckets)];
004fab67                                  *(uint32_t*)((char*)esi_3 + 8) = *(uint32_t*)eax_18;
004fab6a                                  *(uint32_t*)eax_18 = esi_3;
004fab6a                                  
004fab6f                                  if (eax_18 < edi_5->m_firstInterestingBucket)
004fab71                                      edi_5->m_firstInterestingBucket = eax_18;
004fab71                                  
004fab74                                  edi_5->m_numElements += 1;
004faa83                              }
004faa83                              else
004faa83                              {
004faa8c                                  while ((*(uint32_t*)edx_11 != edi_4 || edx_11[1] != ecx_9))
004faa8c                                  {
004faa8e                                      edx_11 = edx_11[2];
004faa8e                                      
004faa93                                      if (edx_11 == 0)
004faa93                                          goto label_4faaa5;
004faa8c                                  }
004faa8c                                  
004faa99                                  if (edx_11 == 0)
004faa99                                      goto label_4faaa5;
004faa99                                  
004fab7a                                  operator delete(esi_3);
004fab7f                                  ebx = var_24_1;
004faa83                              }
004faa83                              
004fab95                              cond:3_1 = (var_1c_1 + 1) < *(uint32_t*)(&*(uint32_t*)((char*)ebp->m_MissingIters.m_data->IDsToDownload)[8] + ebx);
004fab97                              var_1c_1 += 1;
004fab9b                          } while (cond:3_1);
004faa15                      }
004fa9b7                  }
004fa9b7                  else
004fa9b7                  {
004fa9c2                      int32_t* esi_1 = ebp->m_DatFiles.m_data[i];
004fa9cb                      bucketSizesEnd_1 = *(uint32_t*)((char*)eax_6 + 0x10);
004fa9d3                      *(uint32_t*)(esi_1[0x1d4] + 4)();
004fa9e1                      CMostlyConsecutiveIntSet::Add(&esi_1[0x1dd], bucketSizesEnd_1);
004fa9ec                      CMostlyConsecutiveIntSet::Sort(&esi_1[0x1dd]);
004fa9fc                      *(uint32_t*)(*(uint32_t*)esi_1 + 0x2c)(&esi_1[0x1dd]);
004faa01                      SharedCriticalSection::LeaveCriticalSection(&esi_1[0x1d4]);
004fa9b7                  }
004fa9a3              }
004fa9a3              
004fabac              ebx += 0x30;
004fabaf              cond:2_1 = (var_14 + 1) < ebp->m_MissingIters.m_num;
004fabb1              var_14 += 1;
004fabb5              var_24_1 = ebx;
004fabb9          } while (cond:2_1);
004fa95a      }
004fa95a      
004fabc8      if (ebp->m_PendingDownloads.m_intrusiveTable.m_numElements == 0)
004fabc8      {
004fabd6          ebp->m_DDDState = dddEndSent;
004fabe0          int32_t var_8 = 0xf7ea;
004fabe8          m_numBuckets_1 = 0x7c58c8;
004fabf0          CLCache::AdoptAndDeliverMessage(ebp, &__return, &m_numBuckets_1);
004fabfb          return;
004fabc8      }
004fabc8      
004fac04      int32_t i_2 = 0;
004fac04      
004fac08      if (ebp->m_EarlySaves.m_num > 0)
004fac08      {
004fac2a          do
004fac2a          {
004fac1c              CLCache::RemovePendingDownload(ebp, &ebp->m_EarlySaves.m_data[i_2]);
004fac27              i_2 += 1;
004fac2a          } while (i_2 < ebp->m_EarlySaves.m_num);
004fac08      }
004fa940  }

004faa1d                                                                                         8d 49 00                               .I.
004fac35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004fac40  class DBObj* DualEnumIDMap::Allocate(class DualEnumIDMap const* this @ ecx)

004fac40  {
004fac46      void* result = operator new(0x278);
004fac46      
004fac52      if (result == 0)
004fac7f          return 0;
004fac7f      
004fac56      EnumIDMap::EnumIDMap(result);
004fac5b      *(uint32_t*)result = 0x7c5b68;
004fac69      *(uint32_t*)((char*)result + 0x200) = 0x7c5b50;
004fac73      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,unsigned long> *,0>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,unsigned long> *,0>(((char*)result + 0x204), 0x17);
004fac7b      return result;
004fac40  }


004fac80  void* __thiscall DualEnumIDMap::`scalar deleting destructor'(class DualEnumIDMap* this, uint32_t arg2)

004fac80  {
004fac89      HashTable<IDClass<_tagDataID,32,0>,unsigned long,0>::~HashTable<IDClass<_tagDataID,32,0>,unsigned long,0>(&this->m_IDToEnum);
004fac90      EnumIDMap::~EnumIDMap(this);
004fac90      
004fac9a      if ((arg2 & 1) != 0)
004fac9d          operator delete(this);
004fac9d      
004faca8      return this;
004fac80  }

004facab                                   90 90 90 90 90                                                             .....

004facb0  void CLCache::Init_Internal(class CLCache* this @ ecx)

004facb0  {
004facb7      void* eax = operator new(0x114);
004facc3      int32_t esi;
004facc3      
004facc3      if (eax == 0)
004facd7          esi = 0;
004facc3      else
004facd3          esi = CLOCache::CLOCache(eax, CLandBlock::Allocator, 1);
004facd3      
004facdb      void* eax_2 = operator new(0xc);
004face5      void* esi_1;
004face5      
004face5      if (eax_2 == 0)
004facf7          esi_1 = nullptr;
004face5      else
004face5      {
004face7          *(uint32_t*)((char*)eax_2 + 8) = esi;
004facea          *(uint32_t*)eax_2 = 1;
004facf0          *(uint32_t*)((char*)eax_2 + 4) = 0;
004facf3          esi_1 = eax_2;
004face5      }
004face5      
004fad0a      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_1) == 0 && esi_1 != 0))
004fad0d          operator delete(esi_1);
004fad0d      
004fad1a      void* eax_4 = operator new(0x114);
004fad24      int32_t esi_2;
004fad24      
004fad24      if (eax_4 == 0)
004fad38          esi_2 = 0;
004fad24      else
004fad34          esi_2 = CLOCache::CLOCache(eax_4, CLandBlockInfo::Allocator, 2);
004fad34      
004fad3c      void* eax_6 = operator new(0xc);
004fad46      void* esi_3;
004fad46      
004fad46      if (eax_6 == 0)
004fad58          esi_3 = nullptr;
004fad46      else
004fad46      {
004fad48          *(uint32_t*)((char*)eax_6 + 8) = esi_2;
004fad4b          *(uint32_t*)eax_6 = 2;
004fad51          *(uint32_t*)((char*)eax_6 + 4) = 0;
004fad54          esi_3 = eax_6;
004fad46      }
004fad46      
004fad6b      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_3) == 0 && esi_3 != 0))
004fad6e          operator delete(esi_3);
004fad6e      
004fad7b      void* eax_8 = operator new(0x114);
004fad85      int32_t esi_4;
004fad85      
004fad85      if (eax_8 == 0)
004fad99          esi_4 = 0;
004fad85      else
004fad95          esi_4 = CLOCache::CLOCache(eax_8, CEnvCell::Allocator, 3);
004fad95      
004fad9d      void* eax_10 = operator new(0xc);
004fada7      void* esi_5;
004fada7      
004fada7      if (eax_10 == 0)
004fadb9          esi_5 = nullptr;
004fada7      else
004fada7      {
004fada9          *(uint32_t*)((char*)eax_10 + 8) = esi_4;
004fadac          *(uint32_t*)eax_10 = 3;
004fadb2          *(uint32_t*)((char*)eax_10 + 4) = 0;
004fadb5          esi_5 = eax_10;
004fada7      }
004fada7      
004fadcc      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_5) == 0 && esi_5 != 0))
004fadcf          operator delete(esi_5);
004fadcf      
004faddc      void* eax_12 = operator new(0x114);
004fade6      int32_t esi_6;
004fade6      
004fade6      if (eax_12 == 0)
004fadfa          esi_6 = 0;
004fade6      else
004fadf6          esi_6 = CLOCache::CLOCache(eax_12, CGfxObj::Allocator, 6);
004fadf6      
004fadfe      void* eax_14 = operator new(0xc);
004fae08      void* esi_7;
004fae08      
004fae08      if (eax_14 == 0)
004fae1a          esi_7 = nullptr;
004fae08      else
004fae08      {
004fae0a          *(uint32_t*)((char*)eax_14 + 8) = esi_6;
004fae0d          *(uint32_t*)eax_14 = 6;
004fae13          *(uint32_t*)((char*)eax_14 + 4) = 0;
004fae16          esi_7 = eax_14;
004fae08      }
004fae08      
004fae2d      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_7) == 0 && esi_7 != 0))
004fae30          operator delete(esi_7);
004fae30      
004fae3d      void* eax_16 = operator new(0x114);
004fae47      int32_t esi_8;
004fae47      
004fae47      if (eax_16 == 0)
004fae5b          esi_8 = 0;
004fae47      else
004fae57          esi_8 = CLOCache::CLOCache(eax_16, CSetup::Allocator, 7);
004fae57      
004fae5f      void* eax_18 = operator new(0xc);
004fae69      void* esi_9;
004fae69      
004fae69      if (eax_18 == 0)
004fae7b          esi_9 = nullptr;
004fae69      else
004fae69      {
004fae6b          *(uint32_t*)((char*)eax_18 + 8) = esi_8;
004fae6e          *(uint32_t*)eax_18 = 7;
004fae74          *(uint32_t*)((char*)eax_18 + 4) = 0;
004fae77          esi_9 = eax_18;
004fae69      }
004fae69      
004fae8e      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_9) == 0 && esi_9 != 0))
004fae91          operator delete(esi_9);
004fae91      
004fae9e      void* eax_20 = operator new(0x114);
004faea8      int32_t esi_10;
004faea8      
004faea8      if (eax_20 == 0)
004faebc          esi_10 = 0;
004faea8      else
004faeb8          esi_10 = CLOCache::CLOCache(eax_20, CAnimation::Allocator, 8);
004faeb8      
004faec0      void* eax_22 = operator new(0xc);
004faeca      void* esi_11;
004faeca      
004faeca      if (eax_22 == 0)
004faedc          esi_11 = nullptr;
004faeca      else
004faeca      {
004faecc          *(uint32_t*)((char*)eax_22 + 8) = esi_10;
004faecf          *(uint32_t*)eax_22 = 8;
004faed5          *(uint32_t*)((char*)eax_22 + 4) = 0;
004faed8          esi_11 = eax_22;
004faeca      }
004faeca      
004faeef      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_11) == 0 && esi_11 != 0))
004faef2          operator delete(esi_11);
004faef2      
004faeff      void* eax_24 = operator new(0x114);
004faf09      int32_t esi_12;
004faf09      
004faf09      if (eax_24 == 0)
004faf1d          esi_12 = 0;
004faf09      else
004faf19          esi_12 = CLOCache::CLOCache(eax_24, Palette::Allocator, 0xa);
004faf19      
004faf21      void* eax_26 = operator new(0xc);
004faf2b      void* esi_13;
004faf2b      
004faf2b      if (eax_26 == 0)
004faf3d          esi_13 = nullptr;
004faf2b      else
004faf2b      {
004faf2d          *(uint32_t*)((char*)eax_26 + 8) = esi_12;
004faf30          *(uint32_t*)eax_26 = 0xa;
004faf36          *(uint32_t*)((char*)eax_26 + 4) = 0;
004faf39          esi_13 = eax_26;
004faf2b      }
004faf2b      
004faf50      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_13) == 0 && esi_13 != 0))
004faf53          operator delete(esi_13);
004faf53      
004faf60      void* eax_28 = operator new(0x114);
004faf6a      int32_t esi_14;
004faf6a      
004faf6a      if (eax_28 == 0)
004faf7e          esi_14 = 0;
004faf6a      else
004faf7a          esi_14 = CLOCache::CLOCache(eax_28, ImgTex::Allocator, 0xb);
004faf7a      
004faf82      void* eax_30 = operator new(0xc);
004faf8c      void* esi_15;
004faf8c      
004faf8c      if (eax_30 == 0)
004faf9e          esi_15 = nullptr;
004faf8c      else
004faf8c      {
004faf8e          *(uint32_t*)((char*)eax_30 + 8) = esi_14;
004faf91          *(uint32_t*)eax_30 = 0xb;
004faf97          *(uint32_t*)((char*)eax_30 + 4) = 0;
004faf9a          esi_15 = eax_30;
004faf8c      }
004faf8c      
004fafb1      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_15) == 0 && esi_15 != 0))
004fafb4          operator delete(esi_15);
004fafb4      
004fafc1      void* eax_32 = operator new(0x114);
004fafcb      int32_t esi_16;
004fafcb      
004fafcb      if (eax_32 == 0)
004fafdf          esi_16 = 0;
004fafcb      else
004fafdb          esi_16 = CLOCache::CLOCache(eax_32, RenderSurface::Allocator, 0xc);
004fafdb      
004fafe3      void* eax_34 = operator new(0xc);
004fafed      void* esi_17;
004fafed      
004fafed      if (eax_34 == 0)
004fafff          esi_17 = nullptr;
004fafed      else
004fafed      {
004fafef          *(uint32_t*)((char*)eax_34 + 8) = esi_16;
004faff2          *(uint32_t*)eax_34 = 0xc;
004faff8          *(uint32_t*)((char*)eax_34 + 4) = 0;
004faffb          esi_17 = eax_34;
004fafed      }
004fafed      
004fb012      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_17) == 0 && esi_17 != 0))
004fb015          operator delete(esi_17);
004fb015      
004fb022      void* eax_36 = operator new(0x114);
004fb02c      int32_t esi_18;
004fb02c      
004fb02c      if (eax_36 == 0)
004fb040          esi_18 = 0;
004fb02c      else
004fb03c          esi_18 = CLOCache::CLOCache(eax_36, CSurface::Allocator, 0xd);
004fb03c      
004fb044      void* eax_38 = operator new(0xc);
004fb04e      void* esi_19;
004fb04e      
004fb04e      if (eax_38 == 0)
004fb060          esi_19 = nullptr;
004fb04e      else
004fb04e      {
004fb050          *(uint32_t*)((char*)eax_38 + 8) = esi_18;
004fb053          *(uint32_t*)eax_38 = 0xd;
004fb059          *(uint32_t*)((char*)eax_38 + 4) = 0;
004fb05c          esi_19 = eax_38;
004fb04e      }
004fb04e      
004fb073      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_19) == 0 && esi_19 != 0))
004fb076          operator delete(esi_19);
004fb076      
004fb083      void* eax_40 = operator new(0x114);
004fb08d      int32_t esi_20;
004fb08d      
004fb08d      if (eax_40 == 0)
004fb0a1          esi_20 = 0;
004fb08d      else
004fb09d          esi_20 = CLOCache::CLOCache(eax_40, CMotionTable::Allocate, 0xe);
004fb09d      
004fb0a5      void* eax_42 = operator new(0xc);
004fb0af      void* esi_21;
004fb0af      
004fb0af      if (eax_42 == 0)
004fb0c1          esi_21 = nullptr;
004fb0af      else
004fb0af      {
004fb0b1          *(uint32_t*)((char*)eax_42 + 8) = esi_20;
004fb0b4          *(uint32_t*)eax_42 = 0xe;
004fb0ba          *(uint32_t*)((char*)eax_42 + 4) = 0;
004fb0bd          esi_21 = eax_42;
004fb0af      }
004fb0af      
004fb0d4      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_21) == 0 && esi_21 != 0))
004fb0d7          operator delete(esi_21);
004fb0d7      
004fb0e4      void* eax_44 = operator new(0x114);
004fb0ee      int32_t esi_22;
004fb0ee      
004fb0ee      if (eax_44 == 0)
004fb102          esi_22 = 0;
004fb0ee      else
004fb0fe          esi_22 = CLOCache::CLOCache(eax_44, DBWave::Allocator, 0xf);
004fb0fe      
004fb106      void* eax_46 = operator new(0xc);
004fb110      void* esi_23;
004fb110      
004fb110      if (eax_46 == 0)
004fb122          esi_23 = nullptr;
004fb110      else
004fb110      {
004fb112          *(uint32_t*)((char*)eax_46 + 8) = esi_22;
004fb115          *(uint32_t*)eax_46 = 0xf;
004fb11b          *(uint32_t*)((char*)eax_46 + 4) = 0;
004fb11e          esi_23 = eax_46;
004fb110      }
004fb110      
004fb135      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_23) == 0 && esi_23 != 0))
004fb138          operator delete(esi_23);
004fb138      
004fb145      void* eax_48 = operator new(0x114);
004fb14f      int32_t esi_24;
004fb14f      
004fb14f      if (eax_48 == 0)
004fb163          esi_24 = 0;
004fb14f      else
004fb15f          esi_24 = CLOCache::CLOCache(eax_48, CEnvironment::Allocator, 0x10);
004fb15f      
004fb167      void* eax_50 = operator new(0xc);
004fb171      void* esi_25;
004fb171      
004fb171      if (eax_50 == 0)
004fb183          esi_25 = nullptr;
004fb171      else
004fb171      {
004fb173          *(uint32_t*)((char*)eax_50 + 8) = esi_24;
004fb176          *(uint32_t*)eax_50 = 0x10;
004fb17c          *(uint32_t*)((char*)eax_50 + 4) = 0;
004fb17f          esi_25 = eax_50;
004fb171      }
004fb171      
004fb196      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_25) == 0 && esi_25 != 0))
004fb199          operator delete(esi_25);
004fb199      
004fb1a6      void* eax_52 = operator new(0x114);
004fb1b0      int32_t esi_26;
004fb1b0      
004fb1b0      if (eax_52 == 0)
004fb1c4          esi_26 = 0;
004fb1b0      else
004fb1c0          esi_26 = CLOCache::CLOCache(eax_52, ChatPoseTable::Allocator, 0x11);
004fb1c0      
004fb1c8      void* eax_54 = operator new(0xc);
004fb1d2      void* esi_27;
004fb1d2      
004fb1d2      if (eax_54 == 0)
004fb1e4          esi_27 = nullptr;
004fb1d2      else
004fb1d2      {
004fb1d4          *(uint32_t*)((char*)eax_54 + 8) = esi_26;
004fb1d7          *(uint32_t*)eax_54 = 0x11;
004fb1dd          *(uint32_t*)((char*)eax_54 + 4) = 0;
004fb1e0          esi_27 = eax_54;
004fb1d2      }
004fb1d2      
004fb1f7      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_27) == 0 && esi_27 != 0))
004fb1fa          operator delete(esi_27);
004fb1fa      
004fb207      void* eax_56 = operator new(0x114);
004fb211      int32_t esi_28;
004fb211      
004fb211      if (eax_56 == 0)
004fb225          esi_28 = 0;
004fb211      else
004fb221          esi_28 = CLOCache::CLOCache(eax_56, cWObjHierRootNode::Allocator, 0x12);
004fb221      
004fb229      void* eax_58 = operator new(0xc);
004fb233      void* esi_29;
004fb233      
004fb233      if (eax_58 == 0)
004fb245          esi_29 = nullptr;
004fb233      else
004fb233      {
004fb235          *(uint32_t*)((char*)eax_58 + 8) = esi_28;
004fb238          *(uint32_t*)eax_58 = 0x12;
004fb23e          *(uint32_t*)((char*)eax_58 + 4) = 0;
004fb241          esi_29 = eax_58;
004fb233      }
004fb233      
004fb258      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_29) == 0 && esi_29 != 0))
004fb25b          operator delete(esi_29);
004fb25b      
004fb268      void* eax_60 = operator new(0x114);
004fb272      int32_t esi_30;
004fb272      
004fb272      if (eax_60 == 0)
004fb286          esi_30 = 0;
004fb272      else
004fb282          esi_30 = CLOCache::CLOCache(eax_60, BadData::Allocator, 0x13);
004fb282      
004fb28a      void* eax_62 = operator new(0xc);
004fb294      void* esi_31;
004fb294      
004fb294      if (eax_62 == 0)
004fb2a6          esi_31 = nullptr;
004fb294      else
004fb294      {
004fb296          *(uint32_t*)((char*)eax_62 + 8) = esi_30;
004fb299          *(uint32_t*)eax_62 = 0x13;
004fb29f          *(uint32_t*)((char*)eax_62 + 4) = 0;
004fb2a2          esi_31 = eax_62;
004fb294      }
004fb294      
004fb2b9      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_31) == 0 && esi_31 != 0))
004fb2bc          operator delete(esi_31);
004fb2bc      
004fb2c9      void* eax_64 = operator new(0x114);
004fb2d3      int32_t esi_32;
004fb2d3      
004fb2d3      if (eax_64 == 0)
004fb2e7          esi_32 = 0;
004fb2d3      else
004fb2e3          esi_32 = CLOCache::CLOCache(eax_64, TabooTable::Allocator, 0x14);
004fb2e3      
004fb2eb      void* eax_66 = operator new(0xc);
004fb2f5      void* esi_33;
004fb2f5      
004fb2f5      if (eax_66 == 0)
004fb307          esi_33 = nullptr;
004fb2f5      else
004fb2f5      {
004fb2f7          *(uint32_t*)((char*)eax_66 + 8) = esi_32;
004fb2fa          *(uint32_t*)eax_66 = 0x14;
004fb300          *(uint32_t*)((char*)eax_66 + 4) = 0;
004fb303          esi_33 = eax_66;
004fb2f5      }
004fb2f5      
004fb31a      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_33) == 0 && esi_33 != 0))
004fb31d          operator delete(esi_33);
004fb31d      
004fb32a      void* eax_68 = operator new(0x114);
004fb334      int32_t esi_34;
004fb334      
004fb334      if (eax_68 == 0)
004fb348          esi_34 = 0;
004fb334      else
004fb344          esi_34 = CLOCache::CLOCache(eax_68, DBFile2IDTable::Allocate, 0x15);
004fb344      
004fb34c      void* eax_70 = operator new(0xc);
004fb356      void* esi_35;
004fb356      
004fb356      if (eax_70 == 0)
004fb368          esi_35 = nullptr;
004fb356      else
004fb356      {
004fb358          *(uint32_t*)((char*)eax_70 + 8) = esi_34;
004fb35b          *(uint32_t*)eax_70 = 0x15;
004fb361          *(uint32_t*)((char*)eax_70 + 4) = 0;
004fb364          esi_35 = eax_70;
004fb356      }
004fb356      
004fb37b      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_35) == 0 && esi_35 != 0))
004fb37e          operator delete(esi_35);
004fb37e      
004fb38b      void* eax_72 = operator new(0x114);
004fb395      int32_t esi_36;
004fb395      
004fb395      if (eax_72 == 0)
004fb3a9          esi_36 = 0;
004fb395      else
004fb3a5          esi_36 = CLOCache::CLOCache(eax_72, NameFilterTable::Allocator, 0x16);
004fb3a5      
004fb3ad      void* eax_74 = operator new(0xc);
004fb3b7      void* esi_37;
004fb3b7      
004fb3b7      if (eax_74 == 0)
004fb3c9          esi_37 = nullptr;
004fb3b7      else
004fb3b7      {
004fb3b9          *(uint32_t*)((char*)eax_74 + 8) = esi_36;
004fb3bc          *(uint32_t*)eax_74 = 0x16;
004fb3c2          *(uint32_t*)((char*)eax_74 + 4) = 0;
004fb3c5          esi_37 = eax_74;
004fb3b7      }
004fb3b7      
004fb3dc      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_37) == 0 && esi_37 != 0))
004fb3df          operator delete(esi_37);
004fb3df      
004fb3ec      void* eax_76 = operator new(0x114);
004fb3f6      int32_t esi_38;
004fb3f6      
004fb3f6      if (eax_76 == 0)
004fb40a          esi_38 = 0;
004fb3f6      else
004fb406          esi_38 = CLOCache::CLOCache(eax_76, PalSet::Allocator, 0x18);
004fb406      
004fb40e      void* eax_78 = operator new(0xc);
004fb418      void* esi_39;
004fb418      
004fb418      if (eax_78 == 0)
004fb42a          esi_39 = nullptr;
004fb418      else
004fb418      {
004fb41a          *(uint32_t*)((char*)eax_78 + 8) = esi_38;
004fb41d          *(uint32_t*)eax_78 = 0x18;
004fb423          *(uint32_t*)((char*)eax_78 + 4) = 0;
004fb426          esi_39 = eax_78;
004fb418      }
004fb418      
004fb43d      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_39) == 0 && esi_39 != 0))
004fb440          operator delete(esi_39);
004fb440      
004fb44d      void* eax_80 = operator new(0x114);
004fb457      int32_t esi_40;
004fb457      
004fb457      if (eax_80 == 0)
004fb46b          esi_40 = 0;
004fb457      else
004fb467          esi_40 = CLOCache::CLOCache(eax_80, ClothingTable::Allocator, 0x19);
004fb467      
004fb46f      void* eax_82 = operator new(0xc);
004fb479      void* esi_41;
004fb479      
004fb479      if (eax_82 == 0)
004fb48b          esi_41 = nullptr;
004fb479      else
004fb479      {
004fb47b          *(uint32_t*)((char*)eax_82 + 8) = esi_40;
004fb47e          *(uint32_t*)eax_82 = 0x19;
004fb484          *(uint32_t*)((char*)eax_82 + 4) = 0;
004fb487          esi_41 = eax_82;
004fb479      }
004fb479      
004fb49e      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_41) == 0 && esi_41 != 0))
004fb4a1          operator delete(esi_41);
004fb4a1      
004fb4ae      void* eax_84 = operator new(0x114);
004fb4b8      int32_t esi_42;
004fb4b8      
004fb4b8      if (eax_84 == 0)
004fb4cc          esi_42 = 0;
004fb4b8      else
004fb4c8          esi_42 = CLOCache::CLOCache(eax_84, GfxObjDegradeInfo::Allocator, 0x1a);
004fb4c8      
004fb4d0      void* eax_86 = operator new(0xc);
004fb4da      void* esi_43;
004fb4da      
004fb4da      if (eax_86 == 0)
004fb4ec          esi_43 = nullptr;
004fb4da      else
004fb4da      {
004fb4dc          *(uint32_t*)((char*)eax_86 + 8) = esi_42;
004fb4df          *(uint32_t*)eax_86 = 0x1a;
004fb4e5          *(uint32_t*)((char*)eax_86 + 4) = 0;
004fb4e8          esi_43 = eax_86;
004fb4da      }
004fb4da      
004fb4ff      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_43) == 0 && esi_43 != 0))
004fb502          operator delete(esi_43);
004fb502      
004fb50f      void* eax_88 = operator new(0x114);
004fb519      int32_t esi_44;
004fb519      
004fb519      if (eax_88 == 0)
004fb52d          esi_44 = 0;
004fb519      else
004fb529          esi_44 = CLOCache::CLOCache(eax_88, Scene::Allocator, 0x1b);
004fb529      
004fb531      void* eax_90 = operator new(0xc);
004fb53b      void* esi_45;
004fb53b      
004fb53b      if (eax_90 == 0)
004fb54d          esi_45 = nullptr;
004fb53b      else
004fb53b      {
004fb53d          *(uint32_t*)((char*)eax_90 + 8) = esi_44;
004fb540          *(uint32_t*)eax_90 = 0x1b;
004fb546          *(uint32_t*)((char*)eax_90 + 4) = 0;
004fb549          esi_45 = eax_90;
004fb53b      }
004fb53b      
004fb560      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_45) == 0 && esi_45 != 0))
004fb563          operator delete(esi_45);
004fb563      
004fb570      void* eax_92 = operator new(0x114);
004fb57a      int32_t esi_46;
004fb57a      
004fb57a      if (eax_92 == 0)
004fb58e          esi_46 = 0;
004fb57a      else
004fb58a          esi_46 = CLOCache::CLOCache(eax_92, CRegionDesc::Allocator, 0x1c);
004fb58a      
004fb592      void* eax_94 = operator new(0xc);
004fb59c      void* esi_47;
004fb59c      
004fb59c      if (eax_94 == 0)
004fb5ae          esi_47 = nullptr;
004fb59c      else
004fb59c      {
004fb59e          *(uint32_t*)((char*)eax_94 + 8) = esi_46;
004fb5a1          *(uint32_t*)eax_94 = 0x1c;
004fb5a7          *(uint32_t*)((char*)eax_94 + 4) = 0;
004fb5aa          esi_47 = eax_94;
004fb59c      }
004fb59c      
004fb5c1      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_47) == 0 && esi_47 != 0))
004fb5c4          operator delete(esi_47);
004fb5c4      
004fb5d1      void* eax_96 = operator new(0x114);
004fb5db      int32_t esi_48;
004fb5db      
004fb5db      if (eax_96 == 0)
004fb5ef          esi_48 = 0;
004fb5db      else
004fb5eb          esi_48 = CLOCache::CLOCache(eax_96, CMasterInputMap::Allocator, 0x1d);
004fb5eb      
004fb5f3      void* eax_98 = operator new(0xc);
004fb5fd      void* esi_49;
004fb5fd      
004fb5fd      if (eax_98 == 0)
004fb60f          esi_49 = nullptr;
004fb5fd      else
004fb5fd      {
004fb5ff          *(uint32_t*)((char*)eax_98 + 8) = esi_48;
004fb602          *(uint32_t*)eax_98 = 0x1d;
004fb608          *(uint32_t*)((char*)eax_98 + 4) = 0;
004fb60b          esi_49 = eax_98;
004fb5fd      }
004fb5fd      
004fb622      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_49) == 0 && esi_49 != 0))
004fb625          operator delete(esi_49);
004fb625      
004fb632      void* eax_100 = operator new(0x114);
004fb63c      int32_t esi_50;
004fb63c      
004fb63c      if (eax_100 == 0)
004fb650          esi_50 = 0;
004fb63c      else
004fb64c          esi_50 = CLOCache::CLOCache(eax_100, RenderTexture::Allocator, 0x1e);
004fb64c      
004fb654      void* eax_102 = operator new(0xc);
004fb65e      void* esi_51;
004fb65e      
004fb65e      if (eax_102 == 0)
004fb670          esi_51 = nullptr;
004fb65e      else
004fb65e      {
004fb660          *(uint32_t*)((char*)eax_102 + 8) = esi_50;
004fb663          *(uint32_t*)eax_102 = 0x1e;
004fb669          *(uint32_t*)((char*)eax_102 + 4) = 0;
004fb66c          esi_51 = eax_102;
004fb65e      }
004fb65e      
004fb683      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_51) == 0 && esi_51 != 0))
004fb686          operator delete(esi_51);
004fb686      
004fb693      void* eax_104 = operator new(0x114);
004fb69d      int32_t esi_52;
004fb69d      
004fb69d      if (eax_104 == 0)
004fb6b1          esi_52 = 0;
004fb69d      else
004fb6ad          esi_52 = CLOCache::CLOCache(eax_104, RenderMaterial::Allocator, 0x1f);
004fb6ad      
004fb6b5      void* eax_106 = operator new(0xc);
004fb6bf      void* esi_53;
004fb6bf      
004fb6bf      if (eax_106 == 0)
004fb6d1          esi_53 = nullptr;
004fb6bf      else
004fb6bf      {
004fb6c1          *(uint32_t*)((char*)eax_106 + 8) = esi_52;
004fb6c4          *(uint32_t*)eax_106 = 0x1f;
004fb6ca          *(uint32_t*)((char*)eax_106 + 4) = 0;
004fb6cd          esi_53 = eax_106;
004fb6bf      }
004fb6bf      
004fb6e4      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_53) == 0 && esi_53 != 0))
004fb6e7          operator delete(esi_53);
004fb6e7      
004fb6f4      void* eax_108 = operator new(0x114);
004fb6fe      int32_t esi_54;
004fb6fe      
004fb6fe      if (eax_108 == 0)
004fb712          esi_54 = 0;
004fb6fe      else
004fb70e          esi_54 = CLOCache::CLOCache(eax_108, MaterialModifier::Allocator, 0x20);
004fb70e      
004fb716      void* eax_110 = operator new(0xc);
004fb720      void* esi_55;
004fb720      
004fb720      if (eax_110 == 0)
004fb732          esi_55 = nullptr;
004fb720      else
004fb720      {
004fb722          *(uint32_t*)((char*)eax_110 + 8) = esi_54;
004fb725          *(uint32_t*)eax_110 = 0x20;
004fb72b          *(uint32_t*)((char*)eax_110 + 4) = 0;
004fb72e          esi_55 = eax_110;
004fb720      }
004fb720      
004fb745      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_55) == 0 && esi_55 != 0))
004fb748          operator delete(esi_55);
004fb748      
004fb755      void* eax_112 = operator new(0x114);
004fb75f      int32_t esi_56;
004fb75f      
004fb75f      if (eax_112 == 0)
004fb773          esi_56 = 0;
004fb75f      else
004fb76f          esi_56 = CLOCache::CLOCache(eax_112, MaterialInstance::Allocator, 0x21);
004fb76f      
004fb777      void* eax_114 = operator new(0xc);
004fb781      void* esi_57;
004fb781      
004fb781      if (eax_114 == 0)
004fb793          esi_57 = nullptr;
004fb781      else
004fb781      {
004fb783          *(uint32_t*)((char*)eax_114 + 8) = esi_56;
004fb786          *(uint32_t*)eax_114 = 0x21;
004fb78c          *(uint32_t*)((char*)eax_114 + 4) = 0;
004fb78f          esi_57 = eax_114;
004fb781      }
004fb781      
004fb7a6      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_57) == 0 && esi_57 != 0))
004fb7a9          operator delete(esi_57);
004fb7a9      
004fb7b6      void* eax_116 = operator new(0x114);
004fb7c0      int32_t esi_58;
004fb7c0      
004fb7c0      if (eax_116 == 0)
004fb7d4          esi_58 = 0;
004fb7c0      else
004fb7d0          esi_58 = CLOCache::CLOCache(eax_116, RenderMesh::Allocator, 0x43);
004fb7d0      
004fb7d8      void* eax_118 = operator new(0xc);
004fb7e2      void* esi_59;
004fb7e2      
004fb7e2      if (eax_118 == 0)
004fb7f4          esi_59 = nullptr;
004fb7e2      else
004fb7e2      {
004fb7e4          *(uint32_t*)((char*)eax_118 + 8) = esi_58;
004fb7e7          *(uint32_t*)eax_118 = 0x43;
004fb7ed          *(uint32_t*)((char*)eax_118 + 4) = 0;
004fb7f0          esi_59 = eax_118;
004fb7e2      }
004fb7e2      
004fb807      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_59) == 0 && esi_59 != 0))
004fb80a          operator delete(esi_59);
004fb80a      
004fb817      void* eax_120 = operator new(0x114);
004fb821      int32_t esi_60;
004fb821      
004fb821      if (eax_120 == 0)
004fb835          esi_60 = 0;
004fb821      else
004fb831          esi_60 = CLOCache::CLOCache(eax_120, CSoundTable::Allocator, 0x22);
004fb831      
004fb839      void* eax_122 = operator new(0xc);
004fb843      void* esi_61;
004fb843      
004fb843      if (eax_122 == 0)
004fb855          esi_61 = nullptr;
004fb843      else
004fb843      {
004fb845          *(uint32_t*)((char*)eax_122 + 8) = esi_60;
004fb848          *(uint32_t*)eax_122 = 0x22;
004fb84e          *(uint32_t*)((char*)eax_122 + 4) = 0;
004fb851          esi_61 = eax_122;
004fb843      }
004fb843      
004fb868      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_61) == 0 && esi_61 != 0))
004fb86b          operator delete(esi_61);
004fb86b      
004fb878      void* eax_124 = operator new(0x114);
004fb882      int32_t esi_62;
004fb882      
004fb882      if (eax_124 == 0)
004fb896          esi_62 = 0;
004fb882      else
004fb892          esi_62 = CLOCache::CLOCache(eax_124, LayoutDesc::Allocator, 0x23);
004fb892      
004fb89a      void* eax_126 = operator new(0xc);
004fb8a4      void* esi_63;
004fb8a4      
004fb8a4      if (eax_126 == 0)
004fb8b6          esi_63 = nullptr;
004fb8a4      else
004fb8a4      {
004fb8a6          *(uint32_t*)((char*)eax_126 + 8) = esi_62;
004fb8a9          *(uint32_t*)eax_126 = 0x23;
004fb8af          *(uint32_t*)((char*)eax_126 + 4) = 0;
004fb8b2          esi_63 = eax_126;
004fb8a4      }
004fb8a4      
004fb8c9      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_63) == 0 && esi_63 != 0))
004fb8cc          operator delete(esi_63);
004fb8cc      
004fb8d9      void* eax_128 = operator new(0x114);
004fb8e3      int32_t esi_64;
004fb8e3      
004fb8e3      if (eax_128 == 0)
004fb8f7          esi_64 = 0;
004fb8e3      else
004fb8f3          esi_64 = CLOCache::CLOCache(eax_128, EnumMapper::Allocator, 0x24);
004fb8f3      
004fb8fb      void* eax_130 = operator new(0xc);
004fb905      void* esi_65;
004fb905      
004fb905      if (eax_130 == 0)
004fb917          esi_65 = nullptr;
004fb905      else
004fb905      {
004fb907          *(uint32_t*)((char*)eax_130 + 8) = esi_64;
004fb90a          *(uint32_t*)eax_130 = 0x24;
004fb910          *(uint32_t*)((char*)eax_130 + 4) = 0;
004fb913          esi_65 = eax_130;
004fb905      }
004fb905      
004fb92a      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_65) == 0 && esi_65 != 0))
004fb92d          operator delete(esi_65);
004fb92d      
004fb93a      void* eax_132 = operator new(0x114);
004fb944      int32_t esi_66;
004fb944      
004fb944      if (eax_132 == 0)
004fb958          esi_66 = 0;
004fb944      else
004fb954          esi_66 = CLOCache::CLOCache(eax_132, StringTable::Allocator, 0x25);
004fb954      
004fb95c      void* eax_134 = operator new(0xc);
004fb966      void* esi_67;
004fb966      
004fb966      if (eax_134 == 0)
004fb978          esi_67 = nullptr;
004fb966      else
004fb966      {
004fb968          *(uint32_t*)((char*)eax_134 + 8) = esi_66;
004fb96b          *(uint32_t*)eax_134 = 0x25;
004fb971          *(uint32_t*)((char*)eax_134 + 4) = 0;
004fb974          esi_67 = eax_134;
004fb966      }
004fb966      
004fb98b      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_67) == 0 && esi_67 != 0))
004fb98e          operator delete(esi_67);
004fb98e      
004fb99b      void* eax_136 = operator new(0x114);
004fb9a5      int32_t esi_68;
004fb9a5      
004fb9a5      if (eax_136 == 0)
004fb9b9          esi_68 = 0;
004fb9a5      else
004fb9b5          esi_68 = CLOCache::CLOCache(eax_136, EnumIDMap::Allocator, 0x26);
004fb9b5      
004fb9bd      void* eax_138 = operator new(0xc);
004fb9c7      void* esi_69;
004fb9c7      
004fb9c7      if (eax_138 == 0)
004fb9d9          esi_69 = nullptr;
004fb9c7      else
004fb9c7      {
004fb9c9          *(uint32_t*)((char*)eax_138 + 8) = esi_68;
004fb9cc          *(uint32_t*)eax_138 = 0x26;
004fb9d2          *(uint32_t*)((char*)eax_138 + 4) = 0;
004fb9d5          esi_69 = eax_138;
004fb9c7      }
004fb9c7      
004fb9ec      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_69) == 0 && esi_69 != 0))
004fb9ef          operator delete(esi_69);
004fb9ef      
004fb9fc      void* eax_140 = operator new(0x114);
004fba06      int32_t esi_70;
004fba06      
004fba06      if (eax_140 == 0)
004fba1a          esi_70 = 0;
004fba06      else
004fba16          esi_70 = CLOCache::CLOCache(eax_140, ActionMap::Allocator, 0x27);
004fba16      
004fba1e      void* eax_142 = operator new(0xc);
004fba28      void* esi_71;
004fba28      
004fba28      if (eax_142 == 0)
004fba3a          esi_71 = nullptr;
004fba28      else
004fba28      {
004fba2a          *(uint32_t*)((char*)eax_142 + 8) = esi_70;
004fba2d          *(uint32_t*)eax_142 = 0x27;
004fba33          *(uint32_t*)((char*)eax_142 + 4) = 0;
004fba36          esi_71 = eax_142;
004fba28      }
004fba28      
004fba4d      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_71) == 0 && esi_71 != 0))
004fba50          operator delete(esi_71);
004fba50      
004fba5d      void* eax_144 = operator new(0x114);
004fba67      int32_t esi_72;
004fba67      
004fba67      if (eax_144 == 0)
004fba7b          esi_72 = 0;
004fba67      else
004fba77          esi_72 = CLOCache::CLOCache(eax_144, DualEnumIDMap::Allocate, 0x28);
004fba77      
004fba7f      void* eax_146 = operator new(0xc);
004fba89      void* esi_73;
004fba89      
004fba89      if (eax_146 == 0)
004fba9b          esi_73 = nullptr;
004fba89      else
004fba89      {
004fba8b          *(uint32_t*)((char*)eax_146 + 8) = esi_72;
004fba8e          *(uint32_t*)eax_146 = 0x28;
004fba94          *(uint32_t*)((char*)eax_146 + 4) = 0;
004fba97          esi_73 = eax_146;
004fba89      }
004fba89      
004fbaae      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_73) == 0 && esi_73 != 0))
004fbab1          operator delete(esi_73);
004fbab1      
004fbabe      void* eax_148 = operator new(0x114);
004fbac8      int32_t esi_74;
004fbac8      
004fbac8      if (eax_148 == 0)
004fbadc          esi_74 = 0;
004fbac8      else
004fbad8          esi_74 = CLOCache::CLOCache(eax_148, String::Allocator, 0x29);
004fbad8      
004fbae0      void* eax_150 = operator new(0xc);
004fbaea      void* esi_75;
004fbaea      
004fbaea      if (eax_150 == 0)
004fbafc          esi_75 = nullptr;
004fbaea      else
004fbaea      {
004fbaec          *(uint32_t*)((char*)eax_150 + 8) = esi_74;
004fbaef          *(uint32_t*)eax_150 = 0x29;
004fbaf5          *(uint32_t*)((char*)eax_150 + 4) = 0;
004fbaf8          esi_75 = eax_150;
004fbaea      }
004fbaea      
004fbb0f      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_75) == 0 && esi_75 != 0))
004fbb12          operator delete(esi_75);
004fbb12      
004fbb1f      void* eax_152 = operator new(0x114);
004fbb29      int32_t esi_76;
004fbb29      
004fbb29      if (eax_152 == 0)
004fbb3d          esi_76 = 0;
004fbb29      else
004fbb39          esi_76 = CLOCache::CLOCache(eax_152, ParticleEmitterInfo::Allocator, 0x2a);
004fbb39      
004fbb41      void* eax_154 = operator new(0xc);
004fbb4b      void* esi_77;
004fbb4b      
004fbb4b      if (eax_154 == 0)
004fbb5d          esi_77 = nullptr;
004fbb4b      else
004fbb4b      {
004fbb4d          *(uint32_t*)((char*)eax_154 + 8) = esi_76;
004fbb50          *(uint32_t*)eax_154 = 0x2a;
004fbb56          *(uint32_t*)((char*)eax_154 + 4) = 0;
004fbb59          esi_77 = eax_154;
004fbb4b      }
004fbb4b      
004fbb70      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_77) == 0 && esi_77 != 0))
004fbb73          operator delete(esi_77);
004fbb73      
004fbb80      void* eax_156 = operator new(0x114);
004fbb8a      int32_t esi_78;
004fbb8a      
004fbb8a      if (eax_156 == 0)
004fbb9e          esi_78 = 0;
004fbb8a      else
004fbb9a          esi_78 = CLOCache::CLOCache(eax_156, PhysicsScript::Allocator, 0x2b);
004fbb9a      
004fbba2      void* eax_158 = operator new(0xc);
004fbbac      void* esi_79;
004fbbac      
004fbbac      if (eax_158 == 0)
004fbbbe          esi_79 = nullptr;
004fbbac      else
004fbbac      {
004fbbae          *(uint32_t*)((char*)eax_158 + 8) = esi_78;
004fbbb1          *(uint32_t*)eax_158 = 0x2b;
004fbbb7          *(uint32_t*)((char*)eax_158 + 4) = 0;
004fbbba          esi_79 = eax_158;
004fbbac      }
004fbbac      
004fbbd1      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_79) == 0 && esi_79 != 0))
004fbbd4          operator delete(esi_79);
004fbbd4      
004fbbe1      void* eax_160 = operator new(0x114);
004fbbeb      int32_t esi_80;
004fbbeb      
004fbbeb      if (eax_160 == 0)
004fbbff          esi_80 = 0;
004fbbeb      else
004fbbfb          esi_80 = CLOCache::CLOCache(eax_160, PhysicsScriptTable::Allocator, 0x2c);
004fbbfb      
004fbc03      void* eax_162 = operator new(0xc);
004fbc0d      void* esi_81;
004fbc0d      
004fbc0d      if (eax_162 == 0)
004fbc1f          esi_81 = nullptr;
004fbc0d      else
004fbc0d      {
004fbc0f          *(uint32_t*)((char*)eax_162 + 8) = esi_80;
004fbc12          *(uint32_t*)eax_162 = 0x2c;
004fbc18          *(uint32_t*)((char*)eax_162 + 4) = 0;
004fbc1b          esi_81 = eax_162;
004fbc0d      }
004fbc0d      
004fbc32      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_81) == 0 && esi_81 != 0))
004fbc35          operator delete(esi_81);
004fbc35      
004fbc42      void* eax_164 = operator new(0x114);
004fbc4c      int32_t esi_82;
004fbc4c      
004fbc4c      if (eax_164 == 0)
004fbc60          esi_82 = 0;
004fbc4c      else
004fbc5c          esi_82 = CLOCache::CLOCache(eax_164, MasterProperty::Allocator, 0x2d);
004fbc5c      
004fbc64      void* eax_166 = operator new(0xc);
004fbc6e      void* esi_83;
004fbc6e      
004fbc6e      if (eax_166 == 0)
004fbc80          esi_83 = nullptr;
004fbc6e      else
004fbc6e      {
004fbc70          *(uint32_t*)((char*)eax_166 + 8) = esi_82;
004fbc73          *(uint32_t*)eax_166 = 0x2d;
004fbc79          *(uint32_t*)((char*)eax_166 + 4) = 0;
004fbc7c          esi_83 = eax_166;
004fbc6e      }
004fbc6e      
004fbc93      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_83) == 0 && esi_83 != 0))
004fbc96          operator delete(esi_83);
004fbc96      
004fbca3      void* eax_168 = operator new(0x114);
004fbcad      int32_t esi_84;
004fbcad      
004fbcad      if (eax_168 == 0)
004fbcc1          esi_84 = 0;
004fbcad      else
004fbcbd          esi_84 = CLOCache::CLOCache(eax_168, Font::Allocate, 0x2e);
004fbcbd      
004fbcc5      void* eax_170 = operator new(0xc);
004fbccf      void* esi_85;
004fbccf      
004fbccf      if (eax_170 == 0)
004fbce1          esi_85 = nullptr;
004fbccf      else
004fbccf      {
004fbcd1          *(uint32_t*)((char*)eax_170 + 8) = esi_84;
004fbcd4          *(uint32_t*)eax_170 = 0x2e;
004fbcda          *(uint32_t*)((char*)eax_170 + 4) = 0;
004fbcdd          esi_85 = eax_170;
004fbccf      }
004fbccf      
004fbcf4      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_85) == 0 && esi_85 != 0))
004fbcf7          operator delete(esi_85);
004fbcf7      
004fbd04      void* eax_172 = operator new(0x114);
004fbd0e      int32_t esi_86;
004fbd0e      
004fbd0e      if (eax_172 == 0)
004fbd22          esi_86 = 0;
004fbd0e      else
004fbd1e          esi_86 = CLOCache::CLOCache(eax_172, FontLocal::Allocator, 0x2f);
004fbd1e      
004fbd26      void* eax_174 = operator new(0xc);
004fbd30      void* esi_87;
004fbd30      
004fbd30      if (eax_174 == 0)
004fbd42          esi_87 = nullptr;
004fbd30      else
004fbd30      {
004fbd32          *(uint32_t*)((char*)eax_174 + 8) = esi_86;
004fbd35          *(uint32_t*)eax_174 = 0x2f;
004fbd3b          *(uint32_t*)((char*)eax_174 + 4) = 0;
004fbd3e          esi_87 = eax_174;
004fbd30      }
004fbd30      
004fbd55      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_87) == 0 && esi_87 != 0))
004fbd58          operator delete(esi_87);
004fbd58      
004fbd65      void* eax_176 = operator new(0x114);
004fbd6f      int32_t esi_88;
004fbd6f      
004fbd6f      if (eax_176 == 0)
004fbd83          esi_88 = 0;
004fbd6f      else
004fbd7f          esi_88 = CLOCache::CLOCache(eax_176, CLanguageInfo::Allocator, 0x30);
004fbd7f      
004fbd87      void* eax_178 = operator new(0xc);
004fbd91      void* esi_89;
004fbd91      
004fbd91      if (eax_178 == 0)
004fbda3          esi_89 = nullptr;
004fbd91      else
004fbd91      {
004fbd93          *(uint32_t*)((char*)eax_178 + 8) = esi_88;
004fbd96          *(uint32_t*)eax_178 = 0x30;
004fbd9c          *(uint32_t*)((char*)eax_178 + 4) = 0;
004fbd9f          esi_89 = eax_178;
004fbd91      }
004fbd91      
004fbdb6      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_89) == 0 && esi_89 != 0))
004fbdb9          operator delete(esi_89);
004fbdb9      
004fbdc6      void* eax_180 = operator new(0x114);
004fbdd0      int32_t esi_90;
004fbdd0      
004fbdd0      if (eax_180 == 0)
004fbde4          esi_90 = 0;
004fbdd0      else
004fbde0          esi_90 = CLOCache::CLOCache(eax_180, DBPropertyCollection::Allocator, 0x31);
004fbde0      
004fbde8      void* eax_182 = operator new(0xc);
004fbdf2      void* esi_91;
004fbdf2      
004fbdf2      if (eax_182 == 0)
004fbe04          esi_91 = nullptr;
004fbdf2      else
004fbdf2      {
004fbdf4          *(uint32_t*)((char*)eax_182 + 8) = esi_90;
004fbdf7          *(uint32_t*)eax_182 = 0x31;
004fbdfd          *(uint32_t*)((char*)eax_182 + 4) = 0;
004fbe00          esi_91 = eax_182;
004fbdf2      }
004fbdf2      
004fbe17      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_91) == 0 && esi_91 != 0))
004fbe1a          operator delete(esi_91);
004facb0  }

004fbe25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004fbe30  void __fastcall CLCache::~CLCache(class CLCache* this)

004fbe30  {
004fbe35      this->vtable = 0x7c5c78;
004fbe3b      this->vtable = &gmCLCache::`vftable';
004fbe42      this->vtable = &CLCache::`vftable';
004fbe4c      DBCache::DestroyObjectCaches(this);
004fbe59      int32_t i = 0;
004fbe59      
004fbe5d      if (this->m_DatFiles.m_num > 0)
004fbe5d      {
004fbe85          do
004fbe85          {
004fbe66              int32_t* ecx = this->m_DatFiles.m_data[i];
004fbe66              
004fbe6b              if (ecx != 0)
004fbe71                  **(uint32_t**)ecx(1);
004fbe71              
004fbe73              this->m_DatFiles.m_data[i] = 0;
004fbe82              i += 1;
004fbe85          } while (i < this->m_DatFiles.m_num);
004fbe5d      }
004fbe5d      
004fbe8d      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_1 = (this->m_strDatFilePath.m_charbuffer - 0x14);
004fbe94      this->m_DatFiles.m_num = 0;
004fbe94      
004fbea6      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
004fbeae          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
004fbeae      
004fbec0      if ((this->m_EarlySaves.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004fbec0      {
004fbec2          struct QualifiedDataID* m_data = this->m_EarlySaves.m_data;
004fbec2          
004fbeca          if (m_data != 0)
004fbed0              operator delete[](((char*)m_data - 4));
004fbec0      }
004fbec0      
004fbee0      this->m_DatFileByIDTable.vtable = 0x7c5b4c;
004fbeea      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_DatFileByIDTable.m_intrusiveTable);
004fbeef      class HashTableData<unsigned __int64,DiskController *>** m_buckets = this->m_DatFileByIDTable.m_intrusiveTable.m_buckets;
004fbed8      this->m_DatFileByIDTable.m_intrusiveTable.vtable = &IntrusiveHashTable<uint64_t,class HashTableData<uint64_t,class DiskController*>*,0>::`vftable';
004fbed8      
004fbefd      if (m_buckets != &this->m_DatFileByIDTable.m_intrusiveTable.m_aInplaceBuckets)
004fbf00          operator delete[](m_buckets);
004fbf00      
004fbed8      this->m_DatFileByIDTable.m_intrusiveTable.m_buckets = nullptr;
004fbed8      this->m_DatFileByIDTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004fbed8      this->m_DatFileByIDTable.m_intrusiveTable.m_numBuckets = 0;
004fbed8      this->m_DatFileByIDTable.m_intrusiveTable.m_numElements = 0;
004fbf1c      this->m_PendingDownloads.vtable = 0x7c5cf4;
004fbf26      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_PendingDownloads.m_intrusiveTable);
004fbf2b      class HashTableData<QualifiedDataID,MissingIteration *>** m_buckets_1 = this->m_PendingDownloads.m_intrusiveTable.m_buckets;
004fbf14      this->m_PendingDownloads.m_intrusiveTable.vtable = 0x7c59f4;
004fbf14      
004fbf39      if (m_buckets_1 != &this->m_PendingDownloads.m_intrusiveTable.m_aInplaceBuckets)
004fbf3c          operator delete[](m_buckets_1);
004fbf3c      
004fbf14      this->m_PendingDownloads.m_intrusiveTable.m_buckets = nullptr;
004fbf14      this->m_PendingDownloads.m_intrusiveTable.m_firstInterestingBucket = nullptr;
004fbf14      this->m_PendingDownloads.m_intrusiveTable.m_numBuckets = 0;
004fbf14      this->m_PendingDownloads.m_intrusiveTable.m_numElements = 0;
004fbf14      
004fbf60      if ((this->m_MissingIters.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004fbf60      {
004fbf62          class MissingIteration* m_data_1 = this->m_MissingIters.m_data;
004fbf62          
004fbf6a          if (m_data_1 != 0)
004fbf6e              MissingIteration::`vector deleting destructor'(m_data_1, 3);
004fbf60      }
004fbf60      
004fbf85      if ((this->m_DatFiles.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004fbf8e          operator delete[](this->m_DatFiles.m_data);
004fbf8e      
004fbf9c      int32_t i_1 = 0;
004fbf9c      
004fbfa0      if (this->m_Plugins.m_num > 0)
004fbfa0      {
004fbfb7          do
004fbfb7          {
004fbfa2              this->m_Plugins.m_data[i_1]->m_pManager = 0;
004fbfb4              i_1 += 1;
004fbfb7          } while (i_1 < this->m_Plugins.m_num);
004fbfa0      }
004fbfa0      
004fbfc9      this->m_Plugins.m_num = 0;
004fbfc9      
004fbfcf      if ((this->m_Plugins.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
004fbfd8          operator delete[](this->m_Plugins.m_data);
004fbfd8      
004fbfe5      /* tailcall */
004fbfe5      return ThreadedCache::~ThreadedCache(this);
004fbe30  }

004fbfea                                90 90 90 90 90 90                                                            ......

004fbff0  void __thiscall PortalThread::SetShouldExit(class PortalThread* this, uint8_t arg2)

004fbff0  {
004fbff6      this->m_fShouldExit = arg2;
004fbff6      
004fbff9      if (arg2 != 0)
004fbffb          this->vtable->WakeForTheReaper();
004fbff0  }

004fc003           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004fc010  void* __thiscall CLCache::`vector deleting destructor'(class CLCache* this, uint32_t arg2)

004fc010  {
004fc016      /* tailcall */
004fc016      return CLCache::`scalar deleting destructor'(((char*)this - 0x130), arg2);
004fc010  }

004fc01b                                                                                   cc cc cc cc cc                             .....

004fc020  uint32_t __fastcall CLCache::AddRef(class CLCache const* this)

004fc020  {
004fc020      /* tailcall */
004fc020      return DBCache::AddRef(this);
004fc020  }

004fc025                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004fc030  uint32_t __fastcall CLCache::Release(class CLCache const* this)

004fc030  {
004fc030      /* tailcall */
004fc030      return DBCache::Release(this);
004fc030  }

004fc035                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004fc040  void __fastcall CLCache::UseTime(class CLCache* this)

004fc040  {
004fc047      ThreadedCache::UseTime(this);
004fc04c      uint32_t m_eNameRuleLanguage = this->m_eNameRuleLanguage;
004fc04c      
004fc056      if (m_eNameRuleLanguage != 0)
004fc056      {
004fc05c          void** ecx = *(uint32_t*)m_eNameRuleLanguage;
004fc061          void* esi_1;
004fc061          
004fc061          if (ecx != 0)
004fc061          {
004fc067              int32_t edx_1 = ecx[1];
004fc06c              *(uint32_t*)m_eNameRuleLanguage = edx_1;
004fc06c              
004fc06e              if (edx_1 == 0)
004fc070                  *(uint32_t*)(m_eNameRuleLanguage + 4) = 0;
004fc070              
004fc073              esi_1 = *(uint32_t*)ecx;
004fc076              operator delete(ecx);
004fc061          }
004fc061          else
004fc063              esi_1 = nullptr;
004fc063          
004fc080          if (esi_1 != 0)
004fc080          {
004fc093              void var_24;
004fc093              TransientArchive::TransientArchive(&var_24, Unpacking, *(uint32_t*)((char*)esi_1 + 0x2c), *(uint32_t*)((char*)esi_1 + 0x30));
004fc09e              int32_t esi_2 = 0;
004fc0a0              Archive::CheckAlignment(&var_24, 4);
004fc0ab              uint8_t* eax_1;
004fc0ab              class FakeMessageData* ecx_5;
004fc0ab              eax_1 = Archive::GetBytes(&var_24, 4);
004fc0b2              char var_20;
004fc0b2              
004fc0b2              if (eax_1 != 0)
004fc0b2              {
004fc0b9                  if ((var_20 & 1) == 0)
004fc0bf                      esi_2 = *(uint32_t*)eax_1;
004fc0b9                  else
004fc0bb                      *(uint32_t*)eax_1 = 0;
004fc0b2              }
004fc0b2              
004fc0ca              DDD_ErrorMessage::VTable* const var_5c;
004fc0ca              uint32_t var_54;
004fc0ca              int32_t var_4c;
004fc0ca              
004fc0ca              if ((esi_2 - 0xf7e2) <= 9)
004fc0ca                  switch (esi_2)
004fc0ca                  {
004fc0db                      case 0xf7e2:
004fc0db                      {
004fc0db                          DDD_DataMessage::DDD_DataMessage(&var_5c);
004fc0ed                          *(uint32_t*)var_5c(&var_24);
004fc0ed                          
004fc0f9                          if ((((int8_t)(var_20 >> 2)) & 1) == 0)
004fc0f9                          {
004fc102                              if (this->m_ridDDDRegion == 1)
004fc102                              {
004fc10f                                  SmartArray<BaseInfo,1>::add(&this->m_DatFileByIDTable.m_intrusiveTable.m_numElements, &var_4c);
004fc118                                  uint32_t eax_4 = DDD_DataMessage::GetCompressedSize(&var_5c);
004fc11d                                  this->m_EarlySaves.m_num += eax_4;
004fc102                              }
004fc102                              
004fc135                              void var_60;
004fc135                              *(uint32_t*)(this->vtable + 0x70)(&var_60, &var_5c);
004fc146                              CLCache::NotifyDDDEvent(((char*)this - 4), DDD_DataDownloaded, DDD_DataMessage::GetCompressedSize(&var_5c));
004fc0f9                          }
004fc0f9                          
004fc14f                          void var_3c;
004fc14f                          SmartBuffer::~SmartBuffer(&var_3c);
004fc158                          SmartBuffer::~SmartBuffer(&var_3c);
004fc161                          Archive::~Archive(&var_24);
004fc16c                          return;
004fc0db                          break;
004fc0db                      }
004fc176                      case 0xf7e4:
004fc176                      {
004fc176                          int32_t var_58_1 = 0xf7e4;
004fc17e                          var_5c = &DDD_ErrorMessage::`vftable';
004fc186                          DDD_ErrorMessage::Serialize(ecx_5, &var_24);
004fc186                          
004fc196                          if ((((int8_t)(var_20 >> 2)) & 1) == 0)
004fc196                          {
004fc1a1                              MasterDBMap::IsCellType(var_54);
004fc1a6                              this->vtable->OnAsyncGetFromOtherSourcesFailed(&var_54);
004fc1bc                              Archive::~Archive(&var_24);
004fc1c7                              return;
004fc196                          }
004fc176                          break;
004fc176                      }
004fc1d1                      case 0xf7e5:
004fc1d1                      {
004fc1d1                          int32_t var_58_2 = 0xf7e5;
004fc1d9                          var_5c = &DDD_InterrogationMessage::`vftable';
004fc1e1                          int32_t var_48 = 0;
004fc1e5                          int32_t var_44 = 0;
004fc1e9                          int32_t var_40 = 0;
004fc1ed                          DDD_InterrogationMessage::Serialize(ecx_5, &var_24);
004fc1ed                          
004fc1fc                          if ((((int8_t)(var_20 >> 2)) & 1) == 0)
004fc206                              CLCache::OnServerInterrogation(((char*)this - 4), &var_5c);
004fc206                          
004fc20f                          DDD_InterrogationMessage::~DDD_InterrogationMessage(&var_5c);
004fc218                          Archive::~Archive(&var_24);
004fc223                          return;
004fc1d1                          break;
004fc1d1                      }
004fc22d                      case 0xf7e7:
004fc22d                      {
004fc22d                          int32_t var_58_3 = 0xf7e7;
004fc235                          var_5c = &DDD_BeginDDDMessage::`vftable';
004fc23d                          int32_t var_50 = 0;
004fc241                          var_4c = 0;
004fc245                          int32_t var_48_1 = 0;
004fc249                          DDD_BeginDDDMessage::Serialize(ecx_5, &var_24);
004fc249                          
004fc258                          if ((((int8_t)(var_20 >> 2)) & 1) == 0)
004fc262                              CLCache::OnBeginDDD(((char*)this - 4), &var_5c);
004fc262                          
004fc26b                          DDD_BeginDDDMessage::~DDD_BeginDDDMessage(&var_5c);
004fc274                          Archive::~Archive(&var_24);
004fc27f                          return;
004fc22d                          break;
004fc22d                      }
004fc283                      case 0xf7ea:
004fc283                      {
004fc283                          CLCache::OnEndDDD(((char*)this - 4));
004fc28c                          Archive::~Archive(&var_24);
004fc297                          return;
004fc283                          break;
004fc283                      }
004fc2a1                      case 0xf7eb:
004fc2a1                      {
004fc2a1                          int32_t var_58_4 = 0xf7eb;
004fc2a9                          var_5c = &DDD_PatchPendingMessage::`vftable';
004fc2b1                          FakeMessageData::Serialize(ecx_5, &var_24);
004fc2b1                          
004fc2c0                          if ((((int8_t)(var_20 >> 2)) & 1) == 0)
004fc2cc                              CLCache::NotifyDDDEvent(((char*)this - 4), DDD_PatchtimePending, var_54);
004fc2a1                          break;
004fc2a1                      }
004fc0ca                  }
004fc2d5              Archive::~Archive(&var_24);
004fc080          }
004fc056      }
004fc040  }

004fc2e1     8d 49 00                                                                                       .I.
004fc2e4  uint32_t jump_table_4fc2e4[0xa] = 
004fc2e4  {
004fc2e4      [0x0] =  0x004fc0d7
004fc2e8      [0x1] =  0x004fc2d1
004fc2ec      [0x2] =  0x004fc16d
004fc2f0      [0x3] =  0x004fc1c8
004fc2f4      [0x4] =  0x004fc2d1
004fc2f8      [0x5] =  0x004fc224
004fc2fc      [0x6] =  0x004fc2d1
004fc300      [0x7] =  0x004fc2d1
004fc304      [0x8] =  0x004fc280
004fc308      [0x9] =  0x004fc298
004fc30c  }

004fc30c                                      90 90 90 90                                                              ....

004fc310  void __thiscall CLCache::OnSaveRequestFinished(class CLCache* this, struct CAsyncSaveRequest* arg2)

004fc310  {
004fc31c      if (arg2->Result == AsyncResult_Success)
004fc31c      {
004fc36d          if (this->m_ridDDDRegion == 2)
004fc376              CLCache::RemovePendingDownload(((char*)this - 4), &arg2->qdid);
004fc376          
004fc37e          AsyncCache::OnSaveRequestFinished(this, arg2);
004fc385          return;
004fc31c      }
004fc31c      
004fc31e      int32_t var_c_1 = 0;
004fc320      class CLCache* this_1 = this;
004fc323      uint16_t* var_14 = &data_794320;
004fc32d      var_14 = PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, var_14);
004fc330      uint16_t* var_18 = &data_794320;
004fc33a      var_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, var_18);
004fc342      uint16_t eax_1;
004fc342      class PStringBase<unsigned short> ecx_5;
004fc342      class PStringBase<unsigned short> edx;
004fc342      eax_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, &data_794320);
004fc34c      struct CAsyncSaveRequest* edi_1 = PlatformString::DisplayString(eax_1, edx, ecx_5, 0xcf, var_18);
004fc354      Turbine::Debug::Abort();
004fc35c      AsyncCache::OnSaveRequestFinished(&data_4fc351, edi_1);
004fc310  }

004fc388                          90 90 90 90 90 90 90 90                                                          ........

004fc390  void* __thiscall HashTable<QualifiedDataID,MissingIteration *,1>::`scalar deleting destructor'(class HashTable<QualifiedDataID,MissingIteration *,1>* this, uint32_t arg2)

004fc390  {
004fc399      this->vtable = 0x7c5cf4;
004fc39f      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_intrusiveTable);
004fc3a4      class HashTableData<QualifiedDataID,MissingIteration *>** m_buckets = this->m_intrusiveTable.m_buckets;
004fc394      this->m_intrusiveTable.vtable = 0x7c59f4;
004fc394      
004fc3b2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
004fc3b5          operator delete[](m_buckets);
004fc3b5      
004fc394      this->m_intrusiveTable.m_buckets = nullptr;
004fc394      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
004fc394      this->m_intrusiveTable.m_numBuckets = 0;
004fc394      this->m_intrusiveTable.m_numElements = 0;
004fc394      
004fc3d0      if ((arg2 & 1) != 0)
004fc3d3          operator delete(this);
004fc3d3      
004fc3df      return this;
004fc390  }

004fc3e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004fc3f0  void __fastcall CLCache::CLCache(class CLCache* this)

004fc3f0  {
004fc3f4      ThreadedCache::ThreadedCache(this);
004fc3fb      __builtin_memset(&this->m_Plugins, 0, 0x18);
004fc40d      this->vtable = 0x7c5c78;
004fc413      this->vtable = &gmCLCache::`vftable';
004fc41a      this->vtable = &CLCache::`vftable';
004fc436      this->m_fReadOnly = 1;
004fc43d      this->m_ridDDDRegion = 0;
004fc443      this->m_MissingIters.m_data = 0;
004fc449      this->m_MissingIters.m_sizeAndDeallocate = 0;
004fc44f      this->m_MissingIters.m_num = 0;
004fc45c      this->m_PendingDownloads.vtable = 0x7c5cf4;
004fc466      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>::IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,MissingIteration *> *,1>(&this->m_PendingDownloads.m_intrusiveTable, 0);
004fc46b      this->m_PendingDownloads.vtable = 0x7c5cf4;
004fc47d      this->m_DatFileByIDTable.vtable = 0x7c5b4c;
004fc487      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,DiskController *> *,0>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,DiskController *> *,0>(&this->m_DatFileByIDTable.m_intrusiveTable, 0x17);
004fc48c      this->m_EarlySaves.m_data = 0;
004fc492      this->m_EarlySaves.m_sizeAndDeallocate = 0;
004fc498      this->m_EarlySaves.m_num = 0;
004fc49e      this->m_eNameRuleLanguage = 1;
004fc4a8      this->m_pNetQueue = nullptr;
004fc4ae      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
004fc4b9      this->m_strDatFilePath.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
004fc4bf      InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
004fc4c6      this->m_bIsClient = 1;
004fc3f0  }

004fc4d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004fc4e0  void* __thiscall CLCache::`scalar deleting destructor'(class CLCache* this, uint32_t arg2)

004fc4e0  {
004fc4e3      CLCache::~CLCache(this);
004fc4e3      
004fc4ed      if ((arg2 & 1) != 0)
004fc4f0          operator delete(this);
004fc4f0      
004fc4fb      return this;
004fc4e0  }

004fc4fe                                                                                            90 90                                ..

004fc500  void __thiscall CLOCache::CLOCache(class CLOCache* this, class DBObj* (* arg2)(), uint32_t arg3)

004fc500  {
004fc50f      DBOCache::DBOCache(this, arg2, arg3);
004fc514      this->vtable = &CLCache::`vftable'.SerializeFromCachePack;
004fc500  }


004fc520  void GenItemHolder::ServerSaysAttemptFailed_s(uint32_t arg1)

004fc520  {
004fc520      /* tailcall */
004fc520      return ECM_Item::SendNotice_ServerSaysAttemptFailed(arg1);
004fc520  }

004fc525                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004fc530  void GenItemHolder::SetSelectedItem_s(uint32_t arg1, uint32_t arg2)

004fc530  {
004fc530      /* tailcall */
004fc530      return ECM_Item::SendNotice_SetSelectedItem(arg1, arg2);
004fc530  }

004fc535                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004fc540  void GenItemHolder::ItemAttributesChanged_s(uint32_t arg1, int32_t arg2)

004fc540  {
004fc540      /* tailcall */
004fc540      return ECM_Item::SendNotice_ItemAttributesChanged(arg1, arg2);
004fc540  }

004fc545                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004fc550  void GenItemHolder::ServerSaysMoveItem_s(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, int32_t arg6, uint32_t arg7, uint32_t arg8)

004fc550  {
004fc57a      ECM_Item::SendNotice_ServerSaysMoveItem(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
004fc57a      
004fc584      if (arg2 != 0)
004fc589          ECM_Item::SendNotice_ItemAttributesChanged(arg2, 0);
004fc589      
004fc593      if (arg5 != 0)
004fc598          ECM_Item::SendNotice_ItemAttributesChanged(arg5, 0);
004fc550  }

004fc5a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004fc5b0  void __fastcall IQueuedUIEventDeliverer::~IQueuedUIEventDeliverer(class IQueuedUIEventDeliverer* this)

004fc5b0  {
004fc5b0      this->vtable = 0x7c5d84;
004fc5b0  }

004fc5b7                                                                       90 90 90 90 90 90 90 90 90                         .........

004fc5c0  void IQueuedUIEventDeliverer::OnShutdown(class IQueuedUIEventDeliverer* this @ ecx)

004fc5c0  {
004fc5c0      IQueuedUIEventDeliverer::s_pInstance = nullptr;
004fc5c0  }

004fc5cb                                   90 90 90 90 90                                                             .....

004fc5d0  void __fastcall IQueuedUIEventDeliverer::IQueuedUIEventDeliverer(class IQueuedUIEventDeliverer* this)

004fc5d0  {
004fc5d2      this->vtable = 0x7c5d84;
004fc5d8      IQueuedUIEventDeliverer::s_pInstance = this;
004fc5d0  }

004fc5de                                                                                            90 90                                ..

004fc5e0  int32_t PackObj::UNPACK_TYPE(uint32_t* arg1, void** arg2, uint32_t* arg3)

004fc5e0  {
004fc5e7      if (*(uint32_t*)arg3 < 4)
004fc5eb          return 0;
004fc5eb      
004fc5f9      *(uint32_t*)arg1 = **(uint32_t**)arg2;
004fc5fb      *(uint32_t*)arg2 += 4;
004fc5fe      *(uint32_t*)arg3 -= 4;
004fc607      return 1;
004fc5e0  }

004fc608                          90 90 90 90 90 90 90 90                                                          ........

004fc610  uint32_t PackObj::ALIGN_PTR(void** arg1)

004fc610  {
004fc616      void* edx_1 = (*(uint32_t*)arg1 & 0x80000003);
004fc616      bool cond:0 = edx_1 == 0;
004fc616      
004fc61c      if (edx_1 < 0)
004fc61c      {
004fc61f          void* edx_3 = (((char*)edx_1 - 1) | 0xfffffffc);
004fc622          edx_1 = ((char*)edx_3 + 1);
004fc622          cond:0 = edx_3 == 0xffffffff;
004fc61c      }
004fc61c      
004fc623      if (cond:0)
004fc640          return edx_1;
004fc640      
004fc62a      void* i_2 = (4 - edx_1);
004fc62a      
004fc62c      if (4 == edx_1)
004fc642          return i_2;
004fc642      
004fc62e      void* i_1 = i_2;
004fc63c      void* i;
004fc63c      
004fc63c      do
004fc63c      {
004fc633          **(uint8_t**)arg1 = 0;
004fc639          i = i_1;
004fc639          i_1 -= 1;
004fc63a          *(uint32_t*)arg1 += 1;
004fc63c      } while (i != 1);
004fc63f      return i_2;
004fc610  }

004fc643           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004fc650  uint32_t __fastcall AC1Legacy::PStringBase<char>::GetPackSize(class AC1Legacy::PStringBase<char> const* this)

004fc650  {
004fc655      int32_t eax_1 = (this->m_buffer->m_len - 1);
004fc656      int32_t ecx = 0;
004fc656      
004fc65d      if (eax_1 >= 0xffff)
004fc65f          ecx = 4;
004fc65f      
004fc66a      int32_t ecx_2 = (((ecx + eax_1) + 2) & 3);
004fc66a      
004fc66d      if (ecx_2 == 0)
004fc67d          return ((ecx + eax_1) + 2);
004fc67d      
004fc678      return ((4 - ecx_2) + ((ecx + eax_1) + 2));
004fc650  }

004fc67e                                                                                            90 90                                ..

004fc680  void __fastcall cWObjHierNode::~cWObjHierNode(class cWObjHierNode* this)

004fc680  {
004fc684      uint32_t m_num_1 = this->m_num;
004fc687      int32_t esi = (m_num_1 - 1);
004fc687      
004fc688      if ((m_num_1 - 1) >= 0)
004fc688      {
004fc6bf          int32_t temp1_1;
004fc6bf          
004fc6bf          do
004fc6bf          {
004fc690              uint32_t m_num = this->m_num;
004fc695              class cWObjHierNode** m_data = this->m_data;
004fc697              class cWObjHierNode* ebx_1 = m_data[esi];
004fc697              
004fc69a              if (esi < m_num)
004fc69a              {
004fc69f                  this->m_num = (m_num - 1);
004fc69f                  
004fc6a2                  if (esi != (m_num - 1))
004fc6a7                      m_data[esi] = m_data[(m_num - 1)];
004fc69a              }
004fc69a              
004fc6ac              if (ebx_1 != 0)
004fc6ac              {
004fc6b0                  cWObjHierNode::~cWObjHierNode(ebx_1);
004fc6b6                  operator delete(ebx_1);
004fc6ac              }
004fc6ac              
004fc6be              temp1_1 = esi;
004fc6be              esi -= 1;
004fc6bf          } while ((temp1_1 - 1) >= 0);
004fc688      }
004fc688      
004fc6c2      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_menu_name.m_buffer;
004fc6c2      
004fc6d5      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004fc6d7          m_buffer->vtable->__vecDelDtor(1);
004fc6d7      
004fc6e2      operator delete[](this->m_data);
004fc680  }

004fc68d                                         8d 49 00                                                               .I.
004fc6ed                                         90 90 90                                                               ...

004fc6f0  uint32_t __thiscall AC1Legacy::PStringBase<char>::Pack(class AC1Legacy::PStringBase<char> const* this, void** arg2, uint32_t arg3)

004fc6f0  {
004fc6f0      class AC1Legacy::PStringBase<char>* this_1 = this;
004fc6f7      int32_t ebp_1 = (this->m_buffer->m_len - 1);
004fc6f8      int32_t eax_1 = 0;
004fc6f8      
004fc701      if (ebp_1 >= 0xffff)
004fc703          eax_1 = 4;
004fc703      
004fc70e      int32_t eax_3 = (((eax_1 + ebp_1) + 2) & 3);
004fc711      int32_t edx;
004fc711      
004fc711      if (eax_3 == 0)
004fc71c          edx = 0;
004fc711      else
004fc718          edx = (4 - eax_3);
004fc718      
004fc71e      int32_t result = (edx + ((eax_1 + ebp_1) + 2));
004fc71e      
004fc729      if (arg3 < result)
004fc7ba          return result;
004fc7ba      
004fc735      int16_t eax_4 = ebp_1;
004fc735      
004fc737      if (ebp_1 >= 0xffff)
004fc739          eax_4 = -1;
004fc739      
004fc745      **(uint16_t**)arg2 = eax_4;
004fc74b      void* edi_2 = (*(uint32_t*)arg2 + 2);
004fc752      *(uint32_t*)arg2 = edi_2;
004fc752      
004fc756      if (eax_4 == 0xffff)
004fc756      {
004fc758          *(uint32_t*)edi_2 = ebp_1;
004fc75a          *(uint32_t*)arg2 += 4;
004fc756      }
004fc756      
004fc75d      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004fc763      arg3 = m_buffer;
004fc767      InterlockedIncrement(&m_buffer->m_cRef);
004fc779      int32_t esi_2;
004fc779      int32_t edi_4;
004fc779      edi_4 = __builtin_memcpy(*(uint32_t*)arg2, &m_buffer->m_data, ((ebp_1 >> 2) << 2));
004fc780      __builtin_memcpy(edi_4, esi_2, (ebp_1 & 3));
004fc787      *(uint32_t*)arg2 += ebp_1;
004fc789      PackObj::ALIGN_PTR(arg2);
004fc789      
004fc7ab      if ((InterlockedDecrement((arg3 + 4)) == 0 && arg3 != 0))
004fc7b1          **(uint32_t**)arg3(1);
004fc7b1      
004fc7b3      return result;
004fc6f0  }

004fc7bd                                                                                         90 90 90                               ...

004fc7c0  void __thiscall cWObjHierRootNode::cWObjHierRootNode(class cWObjHierRootNode* this, class IDClass<_tagDataID,32,0> arg2)

004fc7c0  {
004fc7c5      this->m_data = nullptr;
004fc7c8      this->m_size = 0;
004fc7cb      this->m_num = 0;
004fc7ce      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004fc7d9      this->_menu_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004fc7dc      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004fc7ef      this->_wcid.id = INVALID_DID.id;
004fc7f2      DBObj::DBObj(this, arg2);
004fc7f7      this->vtable = &PackObj::`vftable';
004fc7fe      this->vtable = 0x7c5dc8;
004fc804      this->vtable = &cWObjHierRootNode::`vftable';
004fc7c0  }

004fc811                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004fc820  void* __thiscall cWObjHierRootNode::`vector deleting destructor'(class cWObjHierRootNode* this, uint32_t arg2)

004fc820  {
004fc823      /* tailcall */
004fc823      return cWObjHierRootNode::`scalar deleting destructor'(((char*)this - 0x30), arg2);
004fc820  }

004fc828                          cc cc cc cc cc cc cc cc                                                          ........

004fc830  uint32_t __thiscall cWObjHierNode::Pack(class cWObjHierNode* this, void** arg2, uint32_t arg3)

004fc830  {
004fc830      class cWObjHierNode* this_1 = this;
004fc835      uint32_t result = cWObjHierNode::pack_size(this);
004fc835      
004fc844      if (arg3 < result)
004fc8bb          return result;
004fc8bb      
004fc851      AC1Legacy::PStringBase<char>::Pack(&this->_menu_name, arg2, arg3);
004fc85b      **(uint32_t**)arg2 = this->_wcid.id;
004fc85f      void* edx_2 = (*(uint32_t*)arg2 + 4);
004fc862      *(uint32_t*)arg2 = edx_2;
004fc869      *(uint32_t*)edx_2 = this->m_num;
004fc86b      *(uint32_t*)arg2 += 4;
004fc871      int32_t i = 0;
004fc871      
004fc875      if (this->m_num > 0)
004fc875      {
004fc889          do
004fc889          {
004fc87e              cWObjHierNode::Pack(this->m_data[i], arg2, arg3);
004fc886              i += 1;
004fc889          } while (i < this->m_num);
004fc875      }
004fc875      
004fc88d      void* ecx_4 = (*(uint32_t*)arg2 & 0x80000003);
004fc88d      bool cond:1_1 = ecx_4 == 0;
004fc88d      
004fc893      if (ecx_4 < 0)
004fc893      {
004fc896          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
004fc899          ecx_4 = ((char*)ecx_6 + 1);
004fc899          cond:1_1 = ecx_6 == 0xffffffff;
004fc893      }
004fc893      
004fc89a      if (!(cond:1_1))
004fc89a      {
004fc8a1          void* i_2 = (4 - ecx_4);
004fc8a1          
004fc8a3          if (4 != ecx_4)
004fc8a3          {
004fc8b0              void* i_1;
004fc8b0              
004fc8b0              do
004fc8b0              {
004fc8a7                  **(uint8_t**)arg2 = 0;
004fc8ad                  i_1 = i_2;
004fc8ad                  i_2 -= 1;
004fc8ae                  *(uint32_t*)arg2 += 1;
004fc8b0              } while (i_1 != 1);
004fc8a3          }
004fc89a      }
004fc89a      
004fc8b2      return result;
004fc830  }

004fc8be                                                                                            90 90                                ..

004fc8c0  int32_t __thiscall AC1Legacy::PStringBase<char>::UnPack(class AC1Legacy::PStringBase<char>* this, void** arg2, uint32_t arg3)

004fc8c0  {
004fc8c0      class AC1Legacy::PStringBase<char>* this_1 = this;
004fc8c0      
004fc8cf      if (arg3 < 2)
004fc925          return 0;
004fc925      
004fc8d6      void* eax = *(uint32_t*)arg2;
004fc8d8      int16_t edx = *(uint16_t*)eax;
004fc8de      int32_t ecx_1 = (arg3 - 2);
004fc8e7      *(uint32_t*)arg2 = ((char*)eax + 2);
004fc8e9      uint32_t ebp = ((uint32_t)edx);
004fc8e9      
004fc8ec      if (edx != 0xffff)
004fc8ec          goto label_4fc8fd;
004fc8ec      
004fc8f1      if (ecx_1 >= 4)
004fc8f1      {
004fc8f3          ebp = *(uint32_t*)((char*)eax + 2);
004fc8f8          *(uint32_t*)arg2 = ((char*)eax + 6);
004fc8fa          ecx_1 -= 4;
004fc8fd      label_4fc8fd:
004fc8fd          
004fc8ff          if (ecx_1 >= ebp)
004fc8ff          {
004fc903              if (ebp == 0)
004fc982                  AC1Legacy::PStringBase<char>::clear(this);
004fc903              else if ((ebp != 1 || **(uint8_t**)arg2 != 0))
004fc90f              {
004fc934                  ReferenceCountTemplate<268435456,0>::Release(this->m_buffer);
004fc93c                  AC1Legacy::PStringBase<char>::allocate_ref_buffer(this, ebp);
004fc94f                  int32_t esi_2;
004fc94f                  int32_t edi_3;
004fc94f                  edi_3 = __builtin_memcpy(&this->m_buffer->m_data, *(uint32_t*)arg2, ((ebp >> 2) << 2));
004fc956                  __builtin_memcpy(edi_3, esi_2, (ebp & 3));
004fc960                  *(uint32_t*)arg2 += ebp;
004fc962                  class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004fc967                  *(uint8_t*)((m_buffer->m_len + m_buffer) + 0x13) = 0;
004fc96c                  class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
004fc96e                  uint32_t m_len = m_buffer_1->m_len;
004fc971                  uint32_t edx_2;
004fc971                  edx_2 = *(uint8_t*)((m_len + m_buffer_1) + 0x12);
004fc971                  
004fc978                  if (edx_2 == 0)
004fc97b                      m_buffer_1->m_len = (m_len - 1);
004fc90f              }
004fc90f              else
004fc90f              {
004fc918                  AC1Legacy::PStringBase<char>::operator=(this, &AC1Legacy::PStringBase<char>::null_string);
004fc91d                  *(uint32_t*)arg2 += 1;
004fc90f              }
004fc90f              
004fc987              void* eax_6 = *(uint32_t*)arg2;
004fc98b              void* ecx_15 = (eax_6 & 0x80000003);
004fc98b              bool cond:2 = ecx_15 == 0;
004fc98b              
004fc991              if (ecx_15 < 0)
004fc991              {
004fc994                  void* ecx_17 = (((char*)ecx_15 - 1) | 0xfffffffc);
004fc997                  ecx_15 = ((char*)ecx_17 + 1);
004fc997                  cond:2 = ecx_17 == 0xffffffff;
004fc991              }
004fc991              
004fc998              if (!(cond:2))
004fc99f                  *(uint32_t*)arg2 = (((char*)eax_6 - ecx_15) + 4);
004fc99f              
004fc9aa              return 1;
004fc8ff          }
004fc8f1      }
004fc8f1      
004fc92e      return 0;
004fc8c0  }

004fc9ad                                         90 90 90                                                               ...

004fc9b0  class DBObj* cWObjHierRootNode::Allocate(class cWObjHierRootNode const* this @ ecx)

004fc9b0  {
004fc9b0      /* tailcall */
004fc9b0      return cWObjHierRootNode::Allocator();
004fc9b0  }

004fc9b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004fc9c0  void* __thiscall cWObjHierRootNode::`scalar deleting destructor'(class cWObjHierRootNode* this, uint32_t arg2)

004fc9c0  {
004fc9c3      SerializeUsingPackDBObj::~SerializeUsingPackDBObj(this);
004fc9ca      class cWObjHierNode*** ecx;
004fc9ca      
004fc9ca      if (this == 0)
004fc9d1          ecx = nullptr;
004fc9ca      else
004fc9cc          ecx = &this->m_data;
004fc9cc      
004fc9d3      cWObjHierNode::~cWObjHierNode(ecx);
004fc9d3      
004fc9dd      if ((arg2 & 1) != 0)
004fc9e0          operator delete(this);
004fc9e0      
004fc9eb      return this;
004fc9c0  }

004fc9ee                                            90 90                                                                ..

004fc9f0  uint32_t __fastcall cWObjHierNode::pack_size(class cWObjHierNode* this)

004fc9f0  {
004fc9f0      class cWObjHierNode* this_1 = this;
004fca00      this_1 = nullptr;
004fca12      int32_t result = (AC1Legacy::PStringBase<char>::Pack(&this->_menu_name, &this_1, 0) + 8);
004fca15      int32_t i = 0;
004fca15      
004fca19      if (this->m_num > 0)
004fca19      {
004fca39          do
004fca39          {
004fca31              result += cWObjHierNode::Pack(this->m_data[i], &this_1, 0);
004fca36              i += 1;
004fca39          } while (i < this->m_num);
004fca19      }
004fca19      
004fca3d      int32_t ecx_4 = (result & 3);
004fca3d      
004fca40      if (ecx_4 == 0)
004fca58          return result;
004fca58      
004fca4f      return ((4 - ecx_4) + result);
004fc9f0  }

004fca1d                                                                                         8d 49 00                               .I.
004fca59                                                                             90 90 90 90 90 90 90                           .......

004fca60  int32_t __thiscall cWObjHierNode::UnPack(class cWObjHierNode* this, void** arg2, uint32_t arg3)

004fca60  {
004fca60      class cWObjHierNode* this_1 = this;
004fca65      void** edi = arg2;
004fca69      void* esi = *(uint32_t*)edi;
004fca69      
004fca7c      if (arg3 >= cWObjHierNode::pack_size(this))
004fca7c      {
004fca87          AC1Legacy::PStringBase<char>::UnPack(&this->_menu_name, edi, arg3);
004fca8c          void* eax_1 = *(uint32_t*)edi;
004fca8e          class IDClass<_tagDataID,32,0> ecx_1 = *(uint32_t*)eax_1;
004fca93          *(uint32_t*)edi = ((char*)eax_1 + 4);
004fca95          this->_wcid.id = ecx_1;
004fca98          void* eax_3 = *(uint32_t*)edi;
004fca9a          void** ecx_2 = *(uint32_t*)eax_3;
004fcaa1          *(uint32_t*)edi = ((char*)eax_3 + 4);
004fcaa1          
004fcaa3          if (ecx_2 > 0)
004fcaa3          {
004fcaa9              arg2 = ecx_2;
004fcb25              void** i;
004fcb25              
004fcb25              do
004fcb25              {
004fcab7                  void* esi_1 = operator new(0x14);
004fcab7                  
004fcac0                  if (esi_1 == 0)
004fcae9                      esi_1 = nullptr;
004fcac0                  else
004fcac0                  {
004fcac2                      *(uint32_t*)esi_1 = 0;
004fcac4                      *(uint32_t*)((char*)esi_1 + 4) = 0;
004fcac7                      *(uint32_t*)((char*)esi_1 + 8) = 0;
004fcaca                      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004fcad5                      *(uint32_t*)((char*)esi_1 + 0xc) = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004fcad8                      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004fcae4                      *(uint32_t*)((char*)esi_1 + 0x10) = INVALID_DID.id;
004fcac0                  }
004fcac0                  
004fcaef                  cWObjHierNode::UnPack(esi_1, edi, arg3);
004fcaf4                  uint32_t m_size = this->m_size;
004fcafa                  int32_t eax_7;
004fcafa                  
004fcafa                  if (this->m_num >= m_size)
004fcafa                  {
004fcafe                      uint32_t eax_6;
004fcafe                      
004fcafe                      if (m_size <= 0)
004fcb04                          eax_6 = 8;
004fcafe                      else
004fcb00                          eax_6 = (m_size * 2);
004fcb00                      
004fcb0c                      eax_7 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(this, eax_6);
004fcafa                  }
004fcafa                  
004fcb13                  if ((this->m_num < m_size || eax_7 != 0))
004fcb13                  {
004fcb18                      this->m_data[this->m_num] = esi_1;
004fcb1e                      this->m_num += 1;
004fcb13                  }
004fcb13                  
004fcb21                  i = arg2;
004fcb21                  arg2 -= 1;
004fcb25              } while (i != 1);
004fcaa3          }
004fcaa3          
004fcb2b          void* eax_9 = *(uint32_t*)edi;
004fcb2b          
004fcb33          if (arg3 >= ((char*)eax_9 - esi))
004fcb33          {
004fcb41              void* eax_11 = (eax_9 & 0x80000003);
004fcb41              bool cond:1 = eax_11 == 0;
004fcb41              
004fcb46              if (eax_11 < 0)
004fcb46              {
004fcb49                  void* eax_13 = (((char*)eax_11 - 1) | 0xfffffffc);
004fcb4c                  eax_11 = ((char*)eax_13 + 1);
004fcb4c                  cond:1 = eax_13 == 0xffffffff;
004fcb46              }
004fcb46              
004fcb4d              if (!(cond:1))
004fcb4d              {
004fcb54                  void* i_2 = (4 - eax_11);
004fcb54                  
004fcb56                  if (4 != eax_11)
004fcb56                  {
004fcb63                      void* i_1;
004fcb63                      
004fcb63                      do
004fcb63                      {
004fcb5a                          **(uint8_t**)edi = 0;
004fcb60                          i_1 = i_2;
004fcb60                          i_2 -= 1;
004fcb61                          *(uint32_t*)edi += 1;
004fcb63                      } while (i_1 != 1);
004fcb56                  }
004fcb4d              }
004fcb4d              
004fcb6f              return 1;
004fcb33          }
004fcb33          
004fcb35          *(uint32_t*)edi = esi;
004fca7c      }
004fca7c      
004fcb3e      return 0;
004fca60  }

004fcb72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004fcb80  uint32_t __thiscall cWObjHierRootNode::Pack(class cWObjHierRootNode* this, void** arg2, uint32_t arg3)

004fcb80  {
004fcb87      uint32_t result = cWObjHierNode::pack_size(&this->m_bLoaded);
004fcb87      
004fcb92      if (arg3 >= result)
004fcb9c          cWObjHierNode::Pack(&this->m_bLoaded, arg2, result);
004fcb9c      
004fcba5      return result;
004fcb80  }

004fcba8                          90 90 90 90 90 90 90 90                                                          ........

004fcbb0  int32_t __thiscall cWObjHierRootNode::UnPack(class cWObjHierRootNode* this, void** arg2, uint32_t arg3)

004fcbb0  {
004fcbb7      void* ebp = *(uint32_t*)arg2;
004fcbb7      
004fcbca      if (arg3 >= cWObjHierNode::pack_size(&this->m_bLoaded))
004fcbca      {
004fcbd0          cWObjHierNode::UnPack(&this->m_bLoaded, arg2, arg3);
004fcbd0          
004fcbdb          if (arg3 >= (*(uint32_t*)arg2 - ebp))
004fcbf1              return 1;
004fcbf1          
004fcbdd          *(uint32_t*)arg2 = ebp;
004fcbca      }
004fcbca      
004fcbe5      return 0;
004fcbb0  }

004fcbf4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004fcc00  int32_t EncumbranceSystem::EncumbranceCapacity(int32_t const arg1, int32_t const arg2) __pure

004fcc00  {
004fcc06      if (arg1 <= 0)
004fcc0a          return 0;
004fcc0a      
004fcc0f      int32_t eax_2 = (arg2 * 0x1e);
004fcc14      int32_t result = (arg1 * 0x96);
004fcc14      
004fcc1c      if (eax_2 < 0)
004fcc25          return result;
004fcc25      
004fcc2b      if (eax_2 > 0x96)
004fcc2d          eax_2 = 0x96;
004fcc2d      
004fcc37      return ((eax_2 * arg1) + result);
004fcc00  }

004fcc38                                                                          90 90 90 90 90 90 90 90                          ........

004fcc40  int32_t const EncumbranceSystem::Load(int32_t const arg1, int32_t const arg2) __pure

004fcc40  {
004fcc46      if (arg1 <= 0)
004fcc4e          return arg1;
004fcc4e      
004fcc5d      return arg2;
004fcc40  }

004fcc67                       90 90 90 90 90 90 90 90 90                                                         .........

004fcc70  int32_t EncumbranceSystem::LoadMod(float const arg1)

004fcc70  {
004fcc70      long double x87_r7 = ((long double)arg1);
004fcc74      long double temp0 = ((long double)1f);
004fcc74      (x87_r7 - temp0);
004fcc7a      int32_t result;
004fcc7a      result = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
004fcc7c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
004fcc7c      
004fcc7f      if (!(p))
004fcc87          return result;
004fcc87      
004fcc88      long double x87_r7_2 = ((long double)arg1);
004fcc8c      long double temp1 = ((long double)2f);
004fcc8c      (x87_r7_2 - temp1);
004fcc92      result = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
004fcc94      /* unimplemented  {test ah, 0x5} */;
004fcca3      return result;
004fcc70  }

004fccab                                   90 90 90 90 90                                                             .....

004fccb0  void __thiscall ItemUses::ItemUses(class ItemUses* this, uint32_t const arg2)

004fccb0  {
004fccb6      this->_useable_bitfield = arg2;
004fccb0  }

004fccbb                                                                                   90 90 90 90 90                             .....

004fccc0  int32_t __fastcall ItemUses::IsUseable(class ItemUses* this)

004fccc0  {
004fccc7      return (!(this->_useable_bitfield) & 1);
004fccc0  }

004fccc8                          90 90 90 90 90 90 90 90                                                          ........

004fccd0  enum ITEM_USEABLE __fastcall ItemUses::GetLeastLimitedSourceUse(class ItemUses* this)

004fccd0  {
004fccd0      char _useable_bitfield = ((int8_t)this->_useable_bitfield);
004fccd0      
004fccd4      if ((_useable_bitfield & 0x20) != 0)
004fccdb          return 0x20;
004fccdb      
004fccde      if ((_useable_bitfield & 0x10) != 0)
004fcce5          return 0x10;
004fcce5      
004fcce8      if ((_useable_bitfield & 8) != 0)
004fccef          return 8;
004fccef      
004fccf2      if ((_useable_bitfield & 4) == 0)
004fcd00          return (((int32_t)_useable_bitfield) & 2);
004fcd00      
004fccf9      return 4;
004fccd0  }

004fcd01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

004fcd10  int32_t __fastcall ItemUses::IsUseable_Targeted(class ItemUses* this)

004fcd10  {
004fcd12      uint32_t i = 0xffff;
004fcd17      uint32_t result = (this->_useable_bitfield & 0xffff0000);
004fcd17      
004fcd26      do
004fcd26      {
004fcd20          i u>>= 1;
004fcd22          result u>>= 1;
004fcd26      } while (i > 0);
004fcd26      
004fcd28      return result;
004fcd10  }

004fcd29                             90 90 90 90 90 90 90                                                           .......

004fcd30  int32_t __fastcall ItemUses::IsUseable_SelfTarget(class ItemUses* this)

004fcd30  {
004fcd32      uint32_t i = 0xffff;
004fcd37      uint32_t eax = (this->_useable_bitfield & 0xffff0000);
004fcd37      
004fcd46      do
004fcd46      {
004fcd40          i u>>= 1;
004fcd42          eax u>>= 1;
004fcd46      } while (i > 0);
004fcd46      
004fcd4b      return (eax & 2);
004fcd30  }

004fcd4c                                      90 90 90 90                                                              ....

004fcd50  enum ITEM_USEABLE __fastcall ItemUses::GetLeastLimitedTargetUse(class ItemUses* this)

004fcd50  {
004fcd52      uint32_t i = 0xffff;
004fcd57      uint32_t eax = (this->_useable_bitfield & 0xffff0000);
004fcd57      
004fcd66      do
004fcd66      {
004fcd60          i u>>= 1;
004fcd62          eax u>>= 1;
004fcd66      } while (i > 0);
004fcd66      
004fcd6a      if ((eax & 0x20) != 0)
004fcd71          return 0x20;
004fcd71      
004fcd74      if ((eax & 0x10) != 0)
004fcd7b          return 0x10;
004fcd7b      
004fcd7e      if ((eax & 8) != 0)
004fcd85          return 8;
004fcd85      
004fcd88      if ((eax & 4) != 0)
004fcd8f          return 4;
004fcd8f      
004fcd92      if ((eax & 2) == 0)
004fcda2          return (((uint32_t)eax) & 0x80);
004fcda2      
004fcd99      return 2;
004fcd50  }

004fcda3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004fcdb0  int32_t __thiscall ChatPoseTable::UnPack(class ChatPoseTable* this, void** arg2, uint32_t arg3)

004fcdb0  {
004fcdb0      class ChatPoseTable* this_1 = this;
004fcdb5      void** edi = arg2;
004fcdb9      void* ebp = *(uint32_t*)edi;
004fcdbd      int32_t eax = this->m_bLoaded*(int32_t*)((char*)this + 8);
004fcdca      arg2 = nullptr;
004fcdca      
004fcdf6      if (arg3 >= (*(uint32_t*)(eax + 0xc)(&arg2, 0) + *(int32_t*)((char*)this->m_pLast + 0xc)(&arg2, 0)))
004fcdf6      {
004fce00          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0x10)(edi, arg3);
004fce03          this->m_pLast->m_timeStamp(edi, arg3);
004fce03          
004fce14          if (arg3 >= (*(uint32_t*)edi - ebp))
004fce2c              return 1;
004fce2c          
004fce16          *(uint32_t*)edi = ebp;
004fcdf6      }
004fcdf6      
004fce1f      return 0;
004fcdb0  }

004fce2f                                               90                                                                 .

004fce30  void __fastcall ChatEmoteData::~ChatEmoteData(class ChatEmoteData* this)

004fce30  {
004fce3b      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->otherEmote.m_buffer;
004fce3b      
004fce4a      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004fce4c          m_buffer->vtable->__vecDelDtor(1);
004fce4c      
004fce54      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->myEmote.m_buffer;
004fce54      
004fce63      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004fce65          m_buffer_1->vtable->__vecDelDtor(1);
004fce65      
004fce6d      this->vtable = 0x79285c;
004fce30  }

004fce77                                                                       90 90 90 90 90 90 90 90 90                         .........

004fce80  uint32_t __thiscall ChatEmoteData::Pack(class ChatEmoteData* this, void** arg2, uint32_t arg3)

004fce80  {
004fce93      uint32_t eax = AC1Legacy::PStringBase<char>::Pack(&this->myEmote, arg2, arg3);
004fceaa      return (AC1Legacy::PStringBase<char>::Pack(&this->otherEmote, arg2, arg3) + eax);
004fce80  }

004fcead                                         90 90 90                                                               ...

004fceb0  void __fastcall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::EmptyContents(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this)

004fceb0  {
004fceb8      class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this_1 = this;
004fceb8      
004fcebc      if (this->_buckets != 0)
004fcebc      {
004fcec5          int32_t i = 0;
004fcec9          int32_t i_1 = 0;
004fcec9          
004fcecd          if (this->_table_size > 0)
004fcecd          {
004fced3              int32_t* j;
004fced3              int32_t* j_1 = j;
004fced3              
004fcf4f              do
004fcf4f              {
004fcee3                  int32_t* j_2 = this->_buckets[i];
004fcee3                  
004fcee8                  if (j_2 != 0)
004fcee8                  {
004fcf31                      do
004fcf31                      {
004fcef0                          int32_t* edi_1 = j_2[1];
004fcef3                          j = j_2[2];
004fcef3                          
004fcf02                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
004fcf0a                              **(uint32_t**)edi_1(1);
004fcf0a                          
004fcf0c                          int32_t* edi_2 = *(uint32_t*)j_2;
004fcf0c                          
004fcf1a                          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004fcf22                              **(uint32_t**)edi_2(1);
004fcf22                          
004fcf25                          operator delete(j_2);
004fcf2f                          j_2 = j;
004fcf31                      } while (j != 0);
004fcf31                      
004fcf33                      i = i_1;
004fcf37                      this = this_1;
004fcee8                  }
004fcee8                  
004fcf3b                  this->_buckets[i] = 0;
004fcf48                  i += 1;
004fcf4b                  i_1 = i;
004fcf4f              } while (i < this->_table_size);
004fcecd          }
004fcebc      }
004fcebc      
004fcf55      this->_currNum = 0;
004fceb0  }


004fcf60  void __fastcall PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::EmptyContents(class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this)

004fcf60  {
004fcf68      class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this_1 = this;
004fcf68      
004fcf6c      if (this->_buckets != 0)
004fcf6c      {
004fcf75          int32_t i = 0;
004fcf79          int32_t i_1 = 0;
004fcf79          
004fcf7d          if (this->_table_size > 0)
004fcf7d          {
004fd01f              do
004fd01f              {
004fcf93                  int32_t* j_1 = this->_buckets[i];
004fcf93                  
004fcf98                  if (j_1 != 0)
004fcf98                  {
004fd001                      int32_t* j;
004fd001                      
004fd001                      do
004fd001                      {
004fcfa0                          int32_t* edi_1 = j_1[3];
004fcfa3                          j = j_1[4];
004fcfa3                          
004fcfb2                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
004fcfba                              **(uint32_t**)edi_1(1);
004fcfba                          
004fcfbc                          int32_t* edi_2 = j_1[2];
004fcfbc                          
004fcfcb                          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
004fcfd3                              **(uint32_t**)edi_2(1);
004fcfd3                          
004fcfd5                          j_1[1] = 0x79285c;
004fcfdc                          int32_t* edi_3 = *(uint32_t*)j_1;
004fcfdc                          
004fcfea                          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
004fcff2                              **(uint32_t**)edi_3(1);
004fcff2                          
004fcff5                          operator delete(j_1);
004fcfff                          j_1 = j;
004fd001                      } while (j != 0);
004fd003                      i = i_1;
004fd007                      this = this_1;
004fcf98                  }
004fcf98                  
004fd00b                  this->_buckets[i] = 0;
004fd018                  i += 1;
004fd01b                  i_1 = i;
004fd01f              } while (i < this->_table_size);
004fcf7d          }
004fcf6c      }
004fcf6c      
004fd029      this->_currNum = 0;
004fcf60  }

004fd034                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004fd040  int32_t __thiscall ChatEmoteData::UnPack(class ChatEmoteData* this, void** arg2, uint32_t arg3)

004fd040  {
004fd059      if ((AC1Legacy::PStringBase<char>::UnPack(&this->myEmote, arg2, arg3) != 0 && AC1Legacy::PStringBase<char>::UnPack(&this->otherEmote, arg2, arg3) != 0))
004fd071          return 1;
004fd071      
004fd079      return 0;
004fd040  }

004fd07c                                                                                      90 90 90 90                              ....

004fd080  uint32_t __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::Pack(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this, void** arg2, uint32_t arg3)

004fd080  {
004fd080      class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this_1 = this;
004fd085      uint32_t result = PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::pack_size(this);
004fd08a      uint32_t ebx = arg3;
004fd090      uint32_t result_1 = result;
004fd090      
004fd094      if (ebx >= result)
004fd094      {
004fd0a9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
004fd0ab          *(uint32_t*)arg2 += 4;
004fd0b1          uint32_t i = 0;
004fd0b5          arg3 = 0;
004fd0b5          
004fd0b9          if (this->_table_size > 0)
004fd0b9          {
004fd0fc              do
004fd0fc              {
004fd0c3                  class AC1Legacy::PStringBase<char>* j = this->_buckets[i];
004fd0c3                  
004fd0c8                  if (j != 0)
004fd0c8                  {
004fd0e8                      do
004fd0e8                      {
004fd0d4                          AC1Legacy::PStringBase<char>::Pack(j, arg2, ebx);
004fd0de                          AC1Legacy::PStringBase<char>::Pack(&j[1], arg2, ebx);
004fd0e3                          j = *(int32_t*)((char*)j + 8);
004fd0e8                      } while (j != 0);
004fd0e8                      
004fd0ea                      result = result_1;
004fd0ee                      i = arg3;
004fd0c8                  }
004fd0c8                  
004fd0f5                  i += 1;
004fd0f8                  arg3 = i;
004fd0fc              } while (i < this->_table_size);
004fd0b9          }
004fd094      }
004fd094      
004fd103      return result;
004fd080  }

004fd0bd                                                                                         8d 49 00                               .I.
004fd106                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004fd110  uint32_t __fastcall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::pack_size(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this)

004fd110  {
004fd110      class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this_1 = this;
004fd118      int32_t i = 0;
004fd11a      bool cond:0 = this->_table_size <= 0;
004fd11d      int32_t result = 4;
004fd122      this_1 = nullptr;
004fd122      
004fd126      if (!(cond:0))
004fd126      {
004fd16e          do
004fd16e          {
004fd133              class AC1Legacy::PStringBase<char>* j = this->_buckets[i];
004fd133              
004fd138              while (j != 0)
004fd138              {
004fd158                  int32_t edi = (result + AC1Legacy::PStringBase<char>::Pack(j, &this_1, 0));
004fd15a                  uint32_t eax_3 = AC1Legacy::PStringBase<char>::Pack(&j[1], &this_1, 0);
004fd15f                  j = *(int32_t*)((char*)j + 8);
004fd162                  result = (edi + eax_3);
004fd138              }
004fd138              
004fd16b              i += 1;
004fd16e          } while (i < this->_table_size);
004fd126      }
004fd126      
004fd177      return result;
004fd110  }

004fd178                                                                          90 90 90 90 90 90 90 90                          ........

004fd180  uint32_t __thiscall PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::Pack(class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this, void** arg2, uint32_t arg3)

004fd180  {
004fd180      class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this_1 = this;
004fd185      uint32_t result = PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::pack_size(this);
004fd18a      uint32_t ebx = arg3;
004fd190      uint32_t result_1 = result;
004fd190      
004fd194      if (ebx >= result)
004fd194      {
004fd1a9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
004fd1ab          *(uint32_t*)arg2 += 4;
004fd1b1          uint32_t i = 0;
004fd1b5          arg3 = 0;
004fd1b5          
004fd1b9          if (this->_table_size > 0)
004fd1b9          {
004fd1fd              do
004fd1fd              {
004fd1c3                  class AC1Legacy::PStringBase<char>* j = this->_buckets[i];
004fd1c3                  
004fd1c8                  if (j != 0)
004fd1c8                  {
004fd1e9                      do
004fd1e9                      {
004fd1d4                          AC1Legacy::PStringBase<char>::Pack(j, arg2, ebx);
004fd1e1                          *(uint32_t*)(*(int32_t*)((char*)j + 4) + 0xc)(arg2, ebx);
004fd1e4                          j = *(int32_t*)((char*)j + 0x10);
004fd1e9                      } while (j != 0);
004fd1e9                      
004fd1eb                      result = result_1;
004fd1ef                      i = arg3;
004fd1c8                  }
004fd1c8                  
004fd1f6                  i += 1;
004fd1f9                  arg3 = i;
004fd1fd              } while (i < this->_table_size);
004fd1b9          }
004fd194      }
004fd194      
004fd204      return result;
004fd180  }

004fd1bd                                                                                         8d 49 00                               .I.
004fd207                       90 90 90 90 90 90 90 90 90                                                         .........

004fd210  uint32_t __fastcall PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::pack_size(class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this)

004fd210  {
004fd210      class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this_1 = this;
004fd218      int32_t i = 0;
004fd21a      bool cond:0 = this->_table_size <= 0;
004fd21d      int32_t result = 4;
004fd222      this_1 = nullptr;
004fd222      
004fd226      if (!(cond:0))
004fd226      {
004fd26f          do
004fd26f          {
004fd233              class AC1Legacy::PStringBase<char>* j = this->_buckets[i];
004fd233              
004fd238              while (j != 0)
004fd238              {
004fd249                  uint32_t eax_2 = AC1Legacy::PStringBase<char>::Pack(j, &this_1, 0);
004fd25d                  int32_t eax_3 = *(uint32_t*)(*(int32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
004fd260                  j = *(int32_t*)((char*)j + 0x10);
004fd263                  result = ((result + eax_2) + eax_3);
004fd238              }
004fd238              
004fd26c              i += 1;
004fd26f          } while (i < this->_table_size);
004fd226      }
004fd226      
004fd278      return result;
004fd210  }

004fd279                                                                             90 90 90 90 90 90 90                           .......

004fd280  void __fastcall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::~PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this)

004fd280  {
004fd283      this->vtable = 0x7c5e28;
004fd289      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::EmptyContents(this);
004fd28e      class PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >** _buckets = this->_buckets;
004fd28e      
004fd293      if (_buckets != 0)
004fd293      {
004fd296          operator delete[](_buckets);
004fd29e          this->_buckets = nullptr;
004fd293      }
004fd293      
004fd2a5      this->_table_size = 0;
004fd2ac      this->vtable = 0x79285c;
004fd280  }

004fd2b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004fd2c0  int32_t __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::UnPack(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this, void** arg2, uint32_t arg3)

004fd2c0  {
004fd2c4      uint32_t ebx = arg3;
004fd2c4      
004fd2ce      if (ebx < 4)
004fd2d7          return 0;
004fd2d7      
004fd2dc      void** edi = arg2;
004fd2e0      void* eax_1 = *(uint32_t*)edi;
004fd2ec      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::EmptyContents(this);
004fd2f1      class PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >** _buckets = this->_buckets;
004fd2f1      
004fd2f8      if (_buckets != 0)
004fd2f8      {
004fd2fb          operator delete[](_buckets);
004fd303          this->_buckets = nullptr;
004fd2f8      }
004fd2f8      
004fd306      this->_table_size = 0;
004fd309      void* ecx_1 = *(uint32_t*)edi;
004fd30b      int32_t eax_2 = *(uint32_t*)ecx_1;
004fd310      *(uint32_t*)edi = ((char*)ecx_1 + 4);
004fd314      uint32_t ecx_4 = (eax_2 >> 0x10);
004fd317      int32_t eax_3 = (eax_2 & 0xffff);
004fd321      this->_table_size = ecx_4;
004fd321      
004fd326      if (ecx_4 == 0)
004fd326      {
004fd32f          int32_t result;
004fd32f          result = eax_3 == 0;
004fd336          return result;
004fd326      }
004fd326      
004fd34b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
004fd34b      {
004fd364          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2);
004fd369          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004fd36e          arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004fd376          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004fd37e          int32_t var_c_1 = 0;
004fd386          class AC1Legacy::PStringBase<char>* ecx_8;
004fd386          
004fd386          if (eax_3 <= 0)
004fd386          {
004fd3dd          label_4fd3dd:
004fd3dd              ecx_8 = &arg3;
004fd3dd              
004fd3e1              if (ebx >= (*(uint32_t*)edi - eax_1))
004fd3e1              {
004fd3e3                  AC1Legacy::PStringBase<char>::~PStringBase<char>(ecx_8);
004fd3ec                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
004fd3fd                  return 1;
004fd3e1              }
004fd386          }
004fd386          else
004fd386          {
004fd393              while (true)
004fd393              {
004fd395                  ecx_8 = &arg3;
004fd395                  
004fd399                  if (AC1Legacy::PStringBase<char>::UnPack(&arg2, edi, (ebx - 4)) == 0)
004fd399                      break;
004fd399                  
004fd3a2                  bool cond:6_1 = AC1Legacy::PStringBase<char>::UnPack(ecx_8, edi, (ebx - 4)) == 0;
004fd3a4                  ecx_8 = &arg3;
004fd3a4                  
004fd3a8                  if (cond:6_1)
004fd3a8                      break;
004fd3a8                  
004fd3c0                  if ((PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::add(this, &arg2, &arg3) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
004fd3c0                  {
004fd400                      ecx_8 = &arg3;
004fd400                      break;
004fd3c0                  }
004fd3c0                  
004fd3c7                  bool cond:7_1 = (var_c_1 + 1) < eax_3;
004fd3c9                  var_c_1 += 1;
004fd3c9                  
004fd3cd                  if (!(cond:7_1))
004fd3cd                      goto label_4fd3dd;
004fd393              }
004fd386          }
004fd386          
004fd404          AC1Legacy::PStringBase<char>::~PStringBase<char>(ecx_8);
004fd40d          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
004fd34b      }
004fd34b      
004fd41b      return 0;
004fd2c0  }

004fd41e                                                                                            90 90                                ..

004fd420  int32_t __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::add(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this, class AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> > const* arg2, class AC1Legacy::PStringBase<char> const* arg3)

004fd420  {
004fd430      if (PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::lookup(this, arg2) != 0)
004fd436          return 0;
004fd436      
004fd43c      void* eax_2 = operator new(0x10);
004fd43c      
004fd448      if (eax_2 == 0)
004fd4a1          return 0;
004fd4a1      
004fd44b      uint32_t _table_size = this->_table_size;
004fd451      AC1Legacy::PStringBase<char>::PStringBase<char>(eax_2, arg2);
004fd45e      AC1Legacy::PStringBase<char>::PStringBase<char>(((char*)eax_2 + 4), arg3);
004fd465      *(uint32_t*)((char*)eax_2 + 8) = 0;
004fd473      uint32_t temp1 = (COMBINE(0, AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >::case_insensitive_hash(arg2)) % _table_size);
004fd476      *(uint32_t*)((char*)eax_2 + 0xc) = temp1;
004fd481      *(uint32_t*)((char*)eax_2 + 8) = this->_buckets[temp1];
004fd484      this->_buckets[temp1] = eax_2;
004fd48f      this->_currNum += 1;
004fd499      return 1;
004fd420  }

004fd4a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004fd4b0  uint32_t __fastcall AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >::case_insensitive_hash(class AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> > const* this)

004fd4b0  {
004fd4b2      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004fd4b4      int32_t eax;
004fd4b4      eax = m_buffer->m_data;
004fd4b7      char (* edi)[0x1] = &m_buffer->m_data;
004fd4ba      int32_t result = 0;
004fd4ba      
004fd4be      while (eax != 0)
004fd4be      {
004fd4d3          result = ((result << 4) + ((int32_t)tolower(((int32_t)eax))));
004fd4da          eax = (result & 0xf0000000);
004fd4da          
004fd4df          if (eax != 0)
004fd4eb              result = (((eax >> 0x18) ^ result) & 0xfffffff);
004fd4eb          
004fd4ed          eax = *(int8_t*)((char*)ADJ(edi) + 0x15);
004fd4f0          edi = &edi[1];
004fd4be      }
004fd4be      
004fd4fa      return result;
004fd4b0  }

004fd4fb                                                                                   90 90 90 90 90                             .....

004fd500  class AC1Legacy::PStringBase<char>* __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::lookup(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> > const* this, class AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> > const* arg2)

004fd500  {
004fd505      uint32_t _table_size = this->_table_size;
004fd505      
004fd511      if ((_table_size != 0 && this->_buckets != 0))
004fd511      {
004fd52a          for (class AC1Legacy::PStringBase<char>* i = this->_buckets[(COMBINE(0, AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >::case_insensitive_hash(arg2)) % _table_size)]; i != 0; i = *(int32_t*)((char*)i + 8))
004fd52a          {
004fd53c              if (AC1Legacy::PStringBase<char>::eq(arg2, i, 0) != 0)
004fd553                  return &i[1];
004fd52a          }
004fd511      }
004fd511      
004fd54a      return 0;
004fd500  }

004fd556                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004fd560  void __fastcall PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::~PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>(class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this)

004fd560  {
004fd563      this->vtable = 0x7c5e3c;
004fd569      PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::EmptyContents(this);
004fd56e      class PackableHashData<AC1Legacy::PStringBase<char>,ChatEmoteData>** _buckets = this->_buckets;
004fd56e      
004fd573      if (_buckets != 0)
004fd573      {
004fd576          operator delete[](_buckets);
004fd57e          this->_buckets = nullptr;
004fd573      }
004fd573      
004fd585      this->_table_size = 0;
004fd58c      this->vtable = 0x79285c;
004fd560  }

004fd594                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004fd5a0  int32_t __thiscall PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::UnPack(class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this, void** arg2, uint32_t arg3)

004fd5a0  {
004fd5a4      uint32_t ebx = arg3;
004fd5a4      
004fd5ae      if (ebx < 4)
004fd5b7          return 0;
004fd5b7      
004fd5bc      void** edi = arg2;
004fd5c0      void* eax_1 = *(uint32_t*)edi;
004fd5cc      PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::EmptyContents(this);
004fd5d1      class PackableHashData<AC1Legacy::PStringBase<char>,ChatEmoteData>** _buckets = this->_buckets;
004fd5d1      
004fd5d8      if (_buckets != 0)
004fd5d8      {
004fd5db          operator delete[](_buckets);
004fd5e3          this->_buckets = nullptr;
004fd5d8      }
004fd5d8      
004fd5e6      this->_table_size = 0;
004fd5e9      void* ecx_1 = *(uint32_t*)edi;
004fd5eb      int32_t eax_2 = *(uint32_t*)ecx_1;
004fd5f0      *(uint32_t*)edi = ((char*)ecx_1 + 4);
004fd5f4      uint32_t ecx_4 = (eax_2 >> 0x10);
004fd5f7      int32_t eax_3 = (eax_2 & 0xffff);
004fd601      this->_table_size = ecx_4;
004fd601      
004fd606      if (ecx_4 == 0)
004fd606      {
004fd60f          int32_t result;
004fd60f          result = eax_3 == 0;
004fd616          return result;
004fd606      }
004fd606      
004fd62b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
004fd62b      {
004fd640          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004fd645          arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004fd64d          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004fd657          int32_t var_c;
004fd657          ChatEmoteData::ChatEmoteData(&var_c);
004fd65e          arg2 = nullptr;
004fd666          int32_t* ecx_10;
004fd666          
004fd666          if (eax_3 <= 0)
004fd666          {
004fd6bf          label_4fd6bf:
004fd6bf              ecx_10 = &var_c;
004fd6bf              
004fd6c3              if (ebx >= (*(uint32_t*)edi - eax_1))
004fd6c3              {
004fd6c5                  ChatEmoteData::~ChatEmoteData(ecx_10);
004fd6ce                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
004fd6df                  return 1;
004fd6c3              }
004fd666          }
004fd666          else
004fd666          {
004fd66e              while (true)
004fd66e              {
004fd675                  if (((AC1Legacy::PStringBase<char>::UnPack(&arg3, edi, (ebx - 4)) != 0 && *(uint32_t*)(var_c + 0x10)(edi, (ebx - 4)) != 0) && (PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::add(this, &arg3, &var_c) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
004fd675                  {
004fd6a9                      bool cond:5_1 = ((char*)arg2 + 1) < eax_3;
004fd6ab                      arg2 += 1;
004fd6ab                      
004fd6af                      if (!(cond:5_1))
004fd6af                          goto label_4fd6bf;
004fd6af                      
004fd6af                      continue;
004fd675                  }
004fd675                  
004fd6e2                  ecx_10 = &var_c;
004fd6e2                  break;
004fd66e              }
004fd666          }
004fd666          
004fd6e6          ChatEmoteData::~ChatEmoteData(ecx_10);
004fd6ef          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
004fd62b      }
004fd62b      
004fd6fd      return 0;
004fd5a0  }


004fd700  void __fastcall ChatEmoteData::ChatEmoteData(class ChatEmoteData* this)

004fd700  {
004fd703      this->vtable = 0x7c5e50;
004fd709      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004fd71b      this->myEmote.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004fd71e      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004fd720      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004fd72c      this->otherEmote.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
004fd72f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
004fd700  }

004fd736                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004fd740  void* __thiscall ChatEmoteData::`scalar deleting destructor'(class ChatEmoteData* this, uint32_t arg2)

004fd740  {
004fd74b      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->otherEmote.m_buffer;
004fd74b      
004fd75a      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004fd75c          m_buffer->vtable->__vecDelDtor(1);
004fd75c      
004fd764      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->myEmote.m_buffer;
004fd764      
004fd773      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004fd775          m_buffer_1->vtable->__vecDelDtor(1);
004fd775      
004fd782      this->vtable = 0x79285c;
004fd782      
004fd788      if ((arg2 & 1) != 0)
004fd78b          operator delete(this);
004fd78b      
004fd798      return this;
004fd740  }

004fd79b                                                                                   90 90 90 90 90                             .....

004fd7a0  int32_t __thiscall PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::add(class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this, class AC1Legacy::PStringBase<char> const* arg2, class ChatEmoteData const* arg3)

004fd7a0  {
004fd7b0      if (PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::lookup(this, arg2) == 0)
004fd7b0      {
004fd7b4          void* eax_1 = operator new(0x18);
004fd7b4          
004fd7be          if (eax_1 != 0)
004fd7be          {
004fd7cc              void* eax_2 = PackableHashData<AC1Legacy::PStringBase<char>,ChatEmoteData>::PackableHashData<AC1Legacy::PStringBase<char>,ChatEmoteData>(eax_1, arg2, arg3, this->_table_size);
004fd7cc              
004fd7d3              if (eax_2 != 0)
004fd7d3              {
004fd7dc                  int32_t ecx_2 = *(uint32_t*)((char*)eax_2 + 0x14);
004fd7e5                  *(uint32_t*)((char*)eax_2 + 0x10) = this->_buckets[ecx_2];
004fd7e8                  this->_buckets[ecx_2] = eax_2;
004fd7ee                  this->_currNum += 1;
004fd7f8                  return 1;
004fd7d3              }
004fd7be          }
004fd7b0      }
004fd7b0      
004fd7d9      return 0;
004fd7a0  }

004fd7fb                                                                                   90 90 90 90 90                             .....

004fd800  class ChatEmoteData* __thiscall PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::lookup(class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData> const* this, class AC1Legacy::PStringBase<char> const* arg2)

004fd800  {
004fd805      uint32_t _table_size = this->_table_size;
004fd805      
004fd812      if ((_table_size != 0 && this->_buckets != 0))
004fd812      {
004fd81a          uint32_t m_hash = arg2->m_buffer->m_hash;
004fd81a          
004fd820          if (m_hash == 0xffffffff)
004fd820          {
004fd824              m_hash = AC1Legacy::PStringBase<char>::compute_hash(arg2);
004fd829              arg2->m_buffer->_currNum = m_hash;
004fd820          }
004fd820          
004fd835          int32_t* ebp_1 = this->_buckets[(COMBINE(0, m_hash) % _table_size)];
004fd835          
004fd83a          if (ebp_1 != 0)
004fd83a          {
004fd844              while (true)
004fd844              {
004fd844                  void* eax_5 = (*(uint32_t*)ebp_1 + 0x14);
004fd847                  void* esi_1 = &arg2->m_buffer->m_data;
004fd850                  int32_t eax_7;
004fd850                  
004fd850                  while (true)
004fd850                  {
004fd850                      uint32_t edx_2;
004fd850                      edx_2 = *(uint8_t*)esi_1;
004fd852                      _table_size = *(uint8_t*)eax_5;
004fd854                      this = edx_2;
004fd856                      bool c_1 = edx_2 < _table_size;
004fd856                      
004fd858                      if (edx_2 == _table_size)
004fd858                      {
004fd85c                          if (this == 0)
004fd85c                          {
004fd874                              eax_7 = 0;
004fd876                              break;
004fd85c                          }
004fd85c                          
004fd85e                          edx_2 = *(uint8_t*)((char*)esi_1 + 1);
004fd861                          _table_size = *(uint8_t*)((char*)eax_5 + 1);
004fd864                          this = edx_2;
004fd866                          c_1 = edx_2 < _table_size;
004fd866                          
004fd868                          if (edx_2 == _table_size)
004fd868                          {
004fd86a                              esi_1 += 2;
004fd86d                              eax_5 += 2;
004fd86d                              
004fd872                              if (this != 0)
004fd872                                  continue;
004fd872                              
004fd874                              eax_7 = 0;
004fd876                              break;
004fd868                          }
004fd858                      }
004fd858                      
004fd878                      bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
004fd87a                      eax_7 = (((char*)eax_5 - eax_5) + 1);
004fd87a                      break;
004fd850                  }
004fd850                  
004fd87f                  if (eax_7 == 0)
004fd898                      return &ebp_1[1];
004fd898                  
004fd881                  ebp_1 = ebp_1[4];
004fd881                  
004fd886                  if (ebp_1 == 0)
004fd886                      break;
004fd844              }
004fd83a          }
004fd812      }
004fd812      
004fd88e      return 0;
004fd800  }

004fd89b                                                                                   90 90 90 90 90                             .....

004fd8a0  uint32_t __fastcall AC1Legacy::PStringBase<char>::compute_hash(class AC1Legacy::PStringBase<char> const* this)

004fd8a0  {
004fd8a0      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
004fd8a2      this = m_buffer->m_data;
004fd8a5      char (* edx)[0x1] = &m_buffer->m_data;
004fd8a8      int32_t result = 0;
004fd8a8      
004fd8ac      if (this != 0)
004fd8ac      {
004fd8d5          do
004fd8d5          {
004fd8b6              result = ((result << 4) + ((int32_t)this));
004fd8ba              this = (result & 0xf0000000);
004fd8ba              
004fd8c0              if (this != 0)
004fd8cd                  result = (((this >> 0x18) ^ result) & 0xfffffff);
004fd8cd              
004fd8cf              this = *(int8_t*)((char*)ADJ(edx) + 0x15);
004fd8d2              edx = &edx[1];
004fd8d5          } while (this != 0);
004fd8d5          
004fd8da          if (result == 0xffffffff)
004fd8dc              return 0xfffffffe;
004fd8ac      }
004fd8ac      
004fd8e1      return result;
004fd8a0  }

004fd8e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004fd8f0  void __thiscall PackableHashData<AC1Legacy::PStringBase<char>,ChatEmoteData>::PackableHashData<AC1Legacy::PStringBase<char>,ChatEmoteData>(class PackableHashData<AC1Legacy::PStringBase<char>,ChatEmoteData>* this, class AC1Legacy::PStringBase<char> const* arg2, class ChatEmoteData const* arg3, int32_t arg4)

004fd8f0  {
004fd8f7      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
004fd8fb      this->_key.m_buffer = m_buffer;
004fd901      InterlockedIncrement(&m_buffer->m_cRef);
004fd912      this->_data.vtable = 0x7c5e50;
004fd919      AC1Legacy::PStringBase<char>::PStringBase<char>(&this->_data.myEmote, &arg3->myEmote);
004fd925      AC1Legacy::PStringBase<char>::PStringBase<char>(&this->_data.otherEmote, &arg3->otherEmote);
004fd92a      this->_next = nullptr;
004fd931      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->m_buffer;
004fd933      uint32_t m_hash = m_buffer_1->m_hash;
004fd933      
004fd939      if (m_hash == 0xffffffff)
004fd939      {
004fd93d          m_hash = AC1Legacy::PStringBase<char>::compute_hash(arg2);
004fd942          m_buffer_1->m_hash = m_hash;
004fd939      }
004fd939      
004fd94e      this->_hashVal = (COMBINE(0, m_hash) % arg4);
004fd8f0  }

004fd956                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004fd960  void* __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::`scalar deleting destructor'(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >* this, uint32_t arg2)

004fd960  {
004fd963      this->vtable = 0x7c5e28;
004fd969      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::EmptyContents(this);
004fd96e      class PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >** _buckets = this->_buckets;
004fd96e      
004fd973      if (_buckets != 0)
004fd973      {
004fd976          operator delete[](_buckets);
004fd97e          this->_buckets = nullptr;
004fd973      }
004fd973      
004fd98a      this->_table_size = 0;
004fd991      this->vtable = 0x79285c;
004fd991      
004fd997      if ((arg2 & 1) != 0)
004fd99a          operator delete(this);
004fd99a      
004fd9a5      return this;
004fd960  }

004fd9a8                          90 90 90 90 90 90 90 90                                                          ........

004fd9b0  void* __thiscall PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::`scalar deleting destructor'(class PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>* this, uint32_t arg2)

004fd9b0  {
004fd9b3      this->vtable = 0x7c5e3c;
004fd9b9      PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::EmptyContents(this);
004fd9be      class PackableHashData<AC1Legacy::PStringBase<char>,ChatEmoteData>** _buckets = this->_buckets;
004fd9be      
004fd9c3      if (_buckets != 0)
004fd9c3      {
004fd9c6          operator delete[](_buckets);
004fd9ce          this->_buckets = nullptr;
004fd9c3      }
004fd9c3      
004fd9da      this->_table_size = 0;
004fd9e1      this->vtable = 0x79285c;
004fd9e1      
004fd9e7      if ((arg2 & 1) != 0)
004fd9ea          operator delete(this);
004fd9ea      
004fd9f5      return this;
004fd9b0  }

004fd9f8                                                                          90 90 90 90 90 90 90 90                          ........

004fda00  void __thiscall ChatPoseTable::ChatPoseTable(class ChatPoseTable* this, class IDClass<_tagDataID,32,0> arg2)

004fda00  {
004fda09      DBObj::DBObj(this, arg2);
004fda0e      this->vtable = &PackObj::`vftable';
004fda18      this->vtable = 0x7c5e78;
004fda1e      this->vtable = &ChatPoseTable::`vftable';
004fda15      this->_chatPoseHash.vtable = 0x7c5e28;
004fda15      this->_chatPoseHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
004fda15      this->_chatPoseHash._buckets = nullptr;
004fda15      this->_chatPoseHash._table_size = 0x20;
004fda15      this->_chatPoseHash._currNum = 0;
004fda3d      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_chatPoseHash);
004fda42      this->_chatEmoteHash.vtable = 0x7c5e3c;
004fda42      this->_chatEmoteHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
004fda42      this->_chatEmoteHash._buckets = nullptr;
004fda42      this->_chatEmoteHash._table_size = 0x20;
004fda42      this->_chatEmoteHash._currNum = 0;
004fda5b      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_chatEmoteHash);
004fda00  }

004fda67                       90 90 90 90 90 90 90 90 90                                                         .........

004fda70  uint32_t UIElement_GroupBox::GetUIElementType(class UIElement_GroupBox const* this @ ecx) __pure

004fda70  {
004fda75      return 0x11;
004fda70  }

004fda76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004fda80  void* __thiscall ChatPoseTable::`vector deleting destructor'(class ChatPoseTable* this, uint32_t arg2)

004fda80  {
004fda83      /* tailcall */
004fda83      return ChatPoseTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
004fda80  }

004fda88                          cc cc cc cc cc cc cc cc                                                          ........

004fda90  class DBObj* ChatPoseTable::Allocate(class ChatPoseTable const* this @ ecx)

004fda90  {
004fda90      /* tailcall */
004fda90      return ChatPoseTable::Allocator();
004fda90  }

004fda95                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004fdaa0  void* __thiscall ChatPoseTable::`scalar deleting destructor'(class ChatPoseTable* this, uint32_t arg2)

004fdaa0  {
004fdaa6      PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::~PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>(&this->_chatEmoteHash);
004fdaae      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::~PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >(&this->_chatPoseHash);
004fdab5      SerializeUsingPackDBObj::~SerializeUsingPackDBObj(this);
004fdab5      
004fdabf      if ((arg2 & 1) != 0)
004fdac2          operator delete(this);
004fdac2      
004fdacd      return this;
004fdaa0  }


004fdad0  uint32_t __thiscall BadData::Pack(class BadData* this, void** arg2, uint32_t arg3)

004fdad0  {
004fdad0      class BadData* this_1 = this;
004fdad5      int32_t eax = this->m_bLoaded*(int32_t*)((char*)this + 8);
004fdae2      this_1 = nullptr;
004fdaea      int32_t result = *(uint32_t*)(eax + 0xc)(&this_1, 0);
004fdaea      
004fdaf5      if (arg3 >= result)
004fdb03          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(arg2, arg3);
004fdb03      
004fdb0b      return result;
004fdad0  }

004fdb0e                                            90 90                                                                ..

004fdb10  int32_t __thiscall BadData::UnPack(class BadData* this, void** arg2, uint32_t arg3)

004fdb10  {
004fdb13      void** esi = arg2;
004fdb17      void* ebp = *(uint32_t*)esi;
004fdb1c      int32_t eax = this->m_bLoaded*(int32_t*)((char*)this + 8);
004fdb29      arg2 = nullptr;
004fdb29      
004fdb3a      if (arg3 >= *(uint32_t*)(eax + 0xc)(&arg2, 0))
004fdb3a      {
004fdb44          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0x10)(esi, arg3);
004fdb44          
004fdb4d          if (arg3 >= (*(uint32_t*)esi - ebp))
004fdb63              return 1;
004fdb63          
004fdb4f          *(uint32_t*)esi = ebp;
004fdb3a      }
004fdb3a      
004fdb57      return 0;
004fdb10  }

004fdb66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004fdb70  uint32_t __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,int>::Pack(class PackableHashTable<IDClass<_tagDataID,32,0>,int>* this, void** arg2, uint32_t arg3)

004fdb70  {
004fdb73      uint32_t result = PackableHashTable<IDClass<_tagDataID,32,0>,int>::pack_size(this);
004fdb73      
004fdb7c      if (arg3 >= result)
004fdb7c      {
004fdb92          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
004fdb96          void* esi_3 = (*(uint32_t*)arg2 + 4);
004fdb99          *(uint32_t*)arg2 = esi_3;
004fdb9e          int32_t i = 0;
004fdba2          void* edi_2 = esi_3;
004fdba2          
004fdba4          if (this->_table_size > 0)
004fdba4          {
004fdbdf              do
004fdbdf              {
004fdbae                  for (int32_t* j = this->_buckets[i]; j != 0; j = j[2])
004fdbae                  {
004fdbb7                      if (arg3 >= 4)
004fdbb7                      {
004fdbb9                          *(uint32_t*)edi_2 = *(uint32_t*)j;
004fdbbd                          void* edi_4 = (*(uint32_t*)arg2 + 4);
004fdbc0                          *(uint32_t*)arg2 = edi_4;
004fdbc7                          *(uint32_t*)edi_4 = j[1];
004fdbcb                          void* esi_7 = (*(uint32_t*)arg2 + 4);
004fdbce                          *(uint32_t*)arg2 = esi_7;
004fdbd0                          edi_2 = esi_7;
004fdbb7                      }
004fdbae                  }
004fdbae                  
004fdbdc                  i += 1;
004fdbdf              } while (i < this->_table_size);
004fdba4          }
004fdb7c      }
004fdb7c      
004fdbe5      return result;
004fdb70  }

004fdbe8                          90 90 90 90 90 90 90 90                                                          ........

004fdbf0  void __fastcall PackableHashTable<IDClass<_tagDataID,32,0>,int>::~PackableHashTable<IDClass<_tagDataID,32,0>,int>(class PackableHashTable<IDClass<_tagDataID,32,0>,int>* this)

004fdbf0  {
004fdbf3      this->vtable = 0x7c5ed0;
004fdbf9      PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(this);
004fdbfe      class PackableHashData<IDClass<_tagDataID,32,0>,int>** _buckets = this->_buckets;
004fdbfe      
004fdc03      if (_buckets != 0)
004fdc03      {
004fdc06          operator delete[](_buckets);
004fdc0e          this->_buckets = nullptr;
004fdc03      }
004fdc03      
004fdc15      this->_table_size = 0;
004fdc1c      this->vtable = 0x79285c;
004fdbf0  }

004fdc24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

004fdc30  int32_t __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,int>::UnPack(class PackableHashTable<IDClass<_tagDataID,32,0>,int>* this, void** arg2, uint32_t arg3)

004fdc30  {
004fdc3e      if (arg3 < 4)
004fdc47          return 0;
004fdc47      
004fdc4c      void** edi = arg2;
004fdc50      void* eax_1 = *(uint32_t*)edi;
004fdc58      uint32_t var_4 = arg3;
004fdc5c      PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(this);
004fdc61      class PackableHashData<IDClass<_tagDataID,32,0>,int>** _buckets = this->_buckets;
004fdc61      
004fdc68      if (_buckets != 0)
004fdc68      {
004fdc6b          operator delete[](_buckets);
004fdc73          this->_buckets = nullptr;
004fdc68      }
004fdc68      
004fdc76      this->_table_size = 0;
004fdc79      void* ecx_1 = *(uint32_t*)edi;
004fdc7b      int32_t eax_2 = *(uint32_t*)ecx_1;
004fdc80      *(uint32_t*)edi = ((char*)ecx_1 + 4);
004fdc84      uint32_t ecx_4 = (eax_2 >> 0x10);
004fdc87      int32_t eax_3 = (eax_2 & 0xffff);
004fdc8c      void** ebx_1 = (arg3 - 4);
004fdc91      this->_table_size = ecx_4;
004fdc91      
004fdc96      if (ecx_4 == 0)
004fdc96      {
004fdc9f          int32_t result;
004fdc9f          result = eax_3 == 0;
004fdca6          return result;
004fdc96      }
004fdc96      
004fdcc3      if ((ecx_4 <= 0x10000 && eax_3 <= 0x10000))
004fdcc3      {
004fdcc7          int32_t eax_5 = PackableHashTable<unsigned long,CContractTracker>::Init(this);
004fdcc7          
004fdcce          if (eax_5 != 0)
004fdcce          {
004fdcd2              arg3 = 0;
004fdcd2              
004fdcda              if (eax_3 <= 0)
004fdd56                  return ((eax_5 - eax_5) + 1);
004fdd56              
004fdceb              while (true)
004fdceb              {
004fdceb                  arg2 = ebx_1;
004fdcf9                  uint32_t var_14;
004fdcf9                  
004fdcf9                  if (PackObj::UNPACK_TYPE(&var_14, edi, &arg2) == 0)
004fdcba                      return 0;
004fdcba                  
004fdd02                  uint32_t var_c = var_14;
004fdd02                  
004fdd06                  if (ebx_1 < 4)
004fdcba                      return 0;
004fdcba                  
004fdd08                  int32_t* eax_8 = *(uint32_t*)edi;
004fdd0a                  int32_t ecx_6 = *(uint32_t*)eax_8;
004fdd13                  *(uint32_t*)edi = &eax_8[1];
004fdd1a                  int32_t var_10 = ecx_6;
004fdd1a                  
004fdd2f                  if ((PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(this, &var_c, &var_10) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
004fdcba                      return 0;
004fdcba                  
004fdd35                  eax_5 = (arg3 + 1);
004fdd38                  arg3 = eax_5;
004fdd38                  
004fdd3c                  if (eax_5 >= eax_3)
004fdd56                      return ((eax_5 - eax_5) + 1);
004fdceb              }
004fdcce          }
004fdcc3      }
004fdcc3      
004fdcba      return 0;
004fdc30  }

004fdd59                                                                             90 90 90 90 90 90 90                           .......

004fdd60  void* __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,int>::`scalar deleting destructor'(class PackableHashTable<IDClass<_tagDataID,32,0>,int>* this, uint32_t arg2)

004fdd60  {
004fdd63      this->vtable = 0x7c5ed0;
004fdd69      PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(this);
004fdd6e      class PackableHashData<IDClass<_tagDataID,32,0>,int>** _buckets = this->_buckets;
004fdd6e      
004fdd73      if (_buckets != 0)
004fdd73      {
004fdd76          operator delete[](_buckets);
004fdd7e          this->_buckets = nullptr;
004fdd73      }
004fdd73      
004fdd8a      this->_table_size = 0;
004fdd91      this->vtable = 0x79285c;
004fdd91      
004fdd97      if ((arg2 & 1) != 0)
004fdd9a          operator delete(this);
004fdd9a      
004fdda5      return this;
004fdd60  }

004fdda8                          90 90 90 90 90 90 90 90                                                          ........

004fddb0  void __thiscall BadData::BadData(class BadData* this, class IDClass<_tagDataID,32,0> arg2)

004fddb0  {
004fddb8      DBObj::DBObj(this, arg2);
004fddbd      this->vtable = &PackObj::`vftable';
004fddc7      this->vtable = 0x7c5ef8;
004fddcd      this->vtable = &BadData::`vftable';
004fddc4      this->_bad.vtable = 0x7c5ed0;
004fddc4      this->_bad.m_fThrowawayDuplicateKeysOnUnPack = 0;
004fddc4      this->_bad._buckets = nullptr;
004fddc4      this->_bad._table_size = 0x20;
004fddc4      this->_bad._currNum = 0;
004fddec      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_bad);
004fddb0  }

004fddf7                                                                       90 90 90 90 90 90 90 90 90                         .........

004fde00  void* __thiscall BadData::`vector deleting destructor'(class BadData* this, uint32_t arg2)

004fde00  {
004fde03      /* tailcall */
004fde03      return BadData::`scalar deleting destructor'(((char*)this - 0x30), arg2);
004fde00  }

004fde08                          cc cc cc cc cc cc cc cc                                                          ........

004fde10  class DBObj* BadData::Allocate(class BadData const* this @ ecx)

004fde10  {
004fde10      /* tailcall */
004fde10      return BadData::Allocator();
004fde10  }

004fde15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004fde20  void* __thiscall BadData::`scalar deleting destructor'(class BadData* this, uint32_t arg2)

004fde20  {
004fde26      PackableHashTable<IDClass<_tagDataID,32,0>,int>::~PackableHashTable<IDClass<_tagDataID,32,0>,int>(&this->_bad);
004fde2d      SerializeUsingPackDBObj::~SerializeUsingPackDBObj(this);
004fde2d      
004fde37      if ((arg2 & 1) != 0)
004fde3a          operator delete(this);
004fde3a      
004fde45      return this;
004fde20  }

004fde48                          90 90 90 90 90 90 90 90                                                          ........

004fde50  void __fastcall AC1Legacy::SmartArray<CharacterIdentity>::Reset(class AC1Legacy::SmartArray<CharacterIdentity>* this)

004fde50  {
004fde53      class CharacterIdentity* m_data = this->m_data;
004fde57      this->m_num = 0;
004fde5e      this->m_size = 0;
004fde5e      
004fde65      if (m_data != 0)
004fde65      {
004fde6f          if (m_data->vtable != 0)
004fde6f          {
004fde71              m_data->vtable->__vecDelDtor(3);
004fde77              this->m_data = 0;
004fde7e              return;
004fde6f          }
004fde6f          
004fde80          operator delete[](((char*)m_data - 4));
004fde65      }
004fde65      
004fde88      this->m_data = 0;
004fde50  }


004fde90  int32_t __thiscall AC1Legacy::SmartArray<CharacterIdentity>::RemoveOrderedByIndex(class AC1Legacy::SmartArray<CharacterIdentity>* this, uint32_t arg2)

004fde90  {
004fde92      uint32_t m_num = this->m_num;
004fde92      
004fde9b      if (arg2 >= m_num)
004fded0          return 0;
004fded0      
004fde9e      this->m_num = (m_num - 1);
004fdea1      class CharacterIdentity* m_data = this->m_data;
004fdea1      
004fdeb2      for (void* i = &m_data[arg2]; i < &m_data[(m_num - 1)]; i += 0x10)
004fdeb9          CharacterIdentity::operator=(i, ((char*)i + 0x10));
004fdeb9      
004fdecb      return 1;
004fde90  }

004fded3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004fdee0  void __thiscall CharacterSet::ClearIdentity(class CharacterSet* this, int32_t arg2)

004fdee0  {
004fdeeb      if ((arg2 >= 0 && arg2 < this->set_.m_num))
004fdef4          /* tailcall */
004fdef4          return AC1Legacy::SmartArray<CharacterIdentity>::RemoveOrderedByIndex(&this->set_, arg2);
004fdee0  }

004fdefc                                                                                      90 90 90 90                              ....

004fdf00  char const* __thiscall CharacterSet::GetName(class CharacterSet* this, int32_t arg2)

004fdf00  {
004fdf07      if (arg2 < this->set_.m_num)
004fdf07      {
004fdf0f          void* eax_1 = &this->set_.m_data[arg2];
004fdf0f          
004fdf1a          if ((*(uint32_t*)((char*)eax_1 + 4) != 0 && eax_1 != 0))
004fdf27              return (*(uint32_t*)((char*)eax_1 + 8) + 0x14);
004fdf07      }
004fdf07      
004fdf1e      return 0;
004fdf00  }

004fdf2a                                90 90 90 90 90 90                                                            ......

004fdf30  uint32_t __thiscall CharacterSet::GetGID(class CharacterSet* this, int32_t arg2)

004fdf30  {
004fdf37      if (arg2 < this->set_.m_num)
004fdf37      {
004fdf3f          void* eax_1 = &this->set_.m_data[arg2];
004fdf3f          
004fdf4a          if ((*(uint32_t*)((char*)eax_1 + 4) != 0 && eax_1 != 0))
004fdf54              return *(uint32_t*)((char*)eax_1 + 4);
004fdf37      }
004fdf37      
004fdf4e      return 0;
004fdf30  }

004fdf57                                                                       90 90 90 90 90 90 90 90 90                         .........

004fdf60  int32_t __thiscall CharacterSet::GetSlot(class CharacterSet* this, uint32_t arg2)

004fdf60  {
004fdf60      uint32_t m_num = this->set_.m_num;
004fdf64      int32_t result = 0;
004fdf64      
004fdf69      if (m_num > 0)
004fdf69      {
004fdf6b          class CharacterIdentity* m_data = this->set_.m_data;
004fdf72          int32_t* ecx = &m_data->gid_;
004fdf72          
004fdf77          while (*(uint32_t*)ecx != arg2)
004fdf77          {
004fdf79              result += 1;
004fdf7a              ecx = &ecx[4];
004fdf7a              
004fdf7f              if (result >= m_num)
004fdf86                  return 0xffffffff;
004fdf77          }
004fdf77          
004fdf94          if (m_data[result].gid_ != 0)
004fdf9b              return result;
004fdf69      }
004fdf69      
004fdf96      return 0xffffffff;
004fdf60  }

004fdf9e                                                                                            90 90                                ..

004fdfa0  uint32_t __thiscall CharacterSet::GetGreyedOutFor(class CharacterSet* this, int32_t arg2)

004fdfa0  {
004fdfa6      if (arg2 >= 0)
004fdfa6      {
004fdfa8          int32_t numAllowedCharacters_ = this->numAllowedCharacters_;
004fdfa8          
004fdfb6          if (((arg2 < numAllowedCharacters_ || numAllowedCharacters_ <= 0) && arg2 < this->set_.m_num))
004fdfb6          {
004fdfbe              void* eax_1 = &this->set_.m_data[arg2];
004fdfbe              
004fdfc5              if (*(uint32_t*)((char*)eax_1 + 4) != 0)
004fdfca                  return *(uint32_t*)((char*)eax_1 + 0xc);
004fdfb6          }
004fdfa6      }
004fdfa6      
004fdfcf      return 0;
004fdfa0  }

004fdfd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

004fdfe0  int32_t __thiscall AC1Legacy::SmartArray<CharacterIdentity>::grow(class AC1Legacy::SmartArray<CharacterIdentity>* this, uint32_t arg2)

004fdfe0  {
004fdfe8      uint32_t edi = arg2;
004fdfe8      
004fdfee      if (edi >= this->m_num)
004fdfee      {
004fdff7          if (edi <= this->m_size)
004fe0ab              return 1;
004fe0ab          
004fdfff          if (edi == 0)
004fdfff          {
004fe001              AC1Legacy::SmartArray<CharacterIdentity>::Reset(this);
004fe00e              return 1;
004fdfff          }
004fdfff          
004fe01a          uint32_t* eax_5 = operator new[](((edi << 4) + 4));
004fe01a          
004fe024          if (eax_5 != 0)
004fe024          {
004fe036              *(uint32_t*)eax_5 = edi;
004fe038              `vector constructor iterator'(&eax_5[1], 0x10, edi, CharacterIdentity::CharacterIdentity);
004fe038              
004fe03f              if (eax_5 != 0xfffffffc)
004fe03f              {
004fe044                  if (this->m_data != 0)
004fe044                  {
004fe04a                      int32_t i = 0;
004fe04a                      
004fe04e                      if (this->m_num > 0)
004fe04e                      {
004fe050                          void* edi_1 = nullptr;
004fe050                          
004fe068                          do
004fe068                          {
004fe05a                              CharacterIdentity::operator=(((char*)edi_1 + &eax_5[1]), (this->m_data + edi_1));
004fe062                              i += 1;
004fe063                              edi_1 += 0x10;
004fe068                          } while (i < this->m_num);
004fe068                          
004fe06a                          edi = arg2;
004fe04e                      }
004fe04e                      
004fe06e                      class CharacterIdentity* m_data = this->m_data;
004fe06e                      
004fe073                      if (m_data != 0)
004fe073                      {
004fe07d                          if (m_data->vtable != 0)
004fe07d                          {
004fe07f                              m_data->vtable->__vecDelDtor(3);
004fe085                              this->m_size = edi;
004fe089                              this->m_data = &eax_5[1];
004fe092                              return 1;
004fe07d                          }
004fe07d                          
004fe096                          operator delete[](((char*)m_data - 4));
004fe073                      }
004fe044                  }
004fe044                  
004fe09e                  this->m_data = &eax_5[1];
004fe0a0                  this->m_size = edi;
004fe0ab                  return 1;
004fe03f              }
004fe024          }
004fdfee      }
004fdfee      
004fe0b3      return 0;
004fdfe0  }

004fe0b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004fe0c0  void __fastcall CharacterIdentity::~CharacterIdentity(class CharacterIdentity* this)

004fe0c0  {
004fe0c4      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->name_.m_buffer;
004fe0cb      this->vtable = 0x7c5f50;
004fe0cb      
004fe0dd      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004fe0df          m_buffer->vtable->__vecDelDtor(1);
004fe0df      
004fe0e8      this->vtable = 0x79285c;
004fe0c0  }


004fe0f0  void* __thiscall CharacterIdentity::`vector deleting destructor'(class CharacterIdentity* this, uint32_t arg2)

004fe0f0  {
004fe0f0      class CharacterIdentity* this_1 = this;
004fe0f2      int32_t ebx;
004fe0f2      ebx = arg2;
004fe0f2      
004fe0fd      if ((ebx & 2) == 0)
004fe0fd      {
004fe16b          class AC1Legacy::PSRefBuffer<char>* m_buffer = this->name_.m_buffer;
004fe172          this->vtable = 0x7c5f50;
004fe172          
004fe184          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004fe186              m_buffer->vtable->__vecDelDtor(1);
004fe186          
004fe191          this->vtable = 0x79285c;
004fe191          
004fe197          if ((ebx & 1) != 0)
004fe19a              operator delete(this);
004fe19a          
004fe1a8          return this;
004fe0fd      }
004fe0fd      
004fe0ff      int32_t vtable = this->vtable;
004fe103      void* __offset(CharacterIdentity, -0x4) ebp = ((char*)this - 4);
004fe10b      void* esi_2 = &this[vtable];
004fe10b      
004fe112      if ((vtable - 1) >= 0)
004fe112      {
004fe11a          ebx = vtable;
004fe149          int32_t i;
004fe149          
004fe149          do
004fe149          {
004fe120              int32_t* edi_1 = *(uint32_t*)((char*)esi_2 - 8);
004fe123              esi_2 -= 0x10;
004fe12a              *(uint32_t*)esi_2 = 0x7c5f50;
004fe12a              
004fe138              if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
004fe140                  **(uint32_t**)edi_1(1);
004fe140              
004fe142              i = ebx;
004fe142              ebx -= 1;
004fe143              *(uint32_t*)esi_2 = 0x79285c;
004fe149          } while (i != 1);
004fe14f          ebx = arg2;
004fe112      }
004fe112      
004fe156      if ((ebx & 1) != 0)
004fe159          operator delete[](ebp);
004fe159      
004fe168      return ebp;
004fe0f0  }

004fe1ab                                   90 90 90 90 90                                                             .....

004fe1b0  uint32_t __fastcall CharacterSet::pack_size(class CharacterSet* this)

004fe1b0  {
004fe1b8      int32_t i = 0;
004fe1bd      int32_t ebp = 8;
004fe1bd      
004fe1c2      if (this->set_.m_num > 0)
004fe1c2      {
004fe1c4          void* edi_1 = nullptr;
004fe1c4          
004fe1e3          do
004fe1e3          {
004fe1c9              void* ecx = ((char*)edi_1 + this->set_.m_data);
004fe1c9              
004fe1d1              if (*(uint32_t*)((char*)ecx + 4) != 0)
004fe1d8                  ebp += CharacterIdentity::pack_size(ecx);
004fe1d8              
004fe1dd              i += 1;
004fe1de              edi_1 += 0x10;
004fe1e3          } while (i < this->set_.m_num);
004fe1c2      }
004fe1c2      
004fe1e8      int32_t ebp_1 = (ebp + 4);
004fe1eb      int32_t i_1 = 0;
004fe1eb      
004fe1ef      if (this->delSet_.m_num > 0)
004fe1ef      {
004fe1f1          int32_t edi_2 = 0;
004fe1f1          
004fe210          do
004fe210          {
004fe1f3              class CharacterIdentity* m_data = this->delSet_.m_data;
004fe1f3              
004fe1fe              if (*(uint32_t*)(&m_data->gid_ + edi_2) != 0)
004fe205                  ebp_1 += CharacterIdentity::pack_size(((char*)m_data + edi_2));
004fe205              
004fe20a              i_1 += 1;
004fe20b              edi_2 += 0x10;
004fe210          } while (i_1 < this->delSet_.m_num);
004fe1ef      }
004fe1ef      
004fe21b      int32_t eax_10 = (this->account_.m_buffer->m_len - 1);
004fe21c      int32_t ecx_2 = 0;
004fe21c      
004fe223      if (eax_10 >= 0xffff)
004fe225          ecx_2 = 4;
004fe225      
004fe230      int32_t eax_12 = (((ecx_2 + eax_10) + 2) & 3);
004fe230      
004fe233      if (eax_12 == 0)
004fe253          return ((((ecx_2 + eax_10) + 2) + (ebp_1 + 4)) + 8);
004fe253      
004fe246      return ((((4 - eax_12) + ((ecx_2 + eax_10) + 2)) + (ebp_1 + 4)) + 8);
004fe1b0  }

004fe254                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004fe260  uint32_t __thiscall CharacterSet::Pack(class CharacterSet* this, void** arg2, uint32_t arg3)

004fe260  {
004fe260      class CharacterSet* this_1 = this;
004fe264      uint32_t result = CharacterSet::pack_size(this);
004fe269      uint32_t edx = arg3;
004fe269      
004fe273      if (edx < result)
004fe33c          return result;
004fe33c      
004fe279      uint32_t m_num = this->set_.m_num;
004fe282      uint32_t** esi_1 = arg2;
004fe288      **(uint32_t**)esi_1 = this->status_;
004fe28c      void* ebx_3 = &*(uint32_t*)esi_1[1];
004fe28f      *(uint32_t*)esi_1 = ebx_3;
004fe293      *(uint32_t*)ebx_3 = m_num;
004fe295      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
004fe29b      int32_t i = 0;
004fe29b      
004fe29f      if (this->set_.m_num > 0)
004fe29f      {
004fe2a1          int32_t ebp_1 = 0;
004fe2a1          
004fe2c4          do
004fe2c4          {
004fe2a6              void* ecx_2 = (this->set_.m_data + ebp_1);
004fe2a6              
004fe2ae              if (*(uint32_t*)((char*)ecx_2 + 4) != 0)
004fe2ae              {
004fe2b4                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0xc)(esi_1, edx);
004fe2b7                  edx = arg3;
004fe2ae              }
004fe2ae              
004fe2be              i += 1;
004fe2bf              ebp_1 += 0x10;
004fe2c4          } while (i < this->set_.m_num);
004fe29f      }
004fe29f      
004fe2cb      **(uint32_t**)esi_1 = this->delSet_.m_num;
004fe2cd      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
004fe2d3      int32_t i_1 = 0;
004fe2d3      
004fe2d7      if (this->delSet_.m_num > 0)
004fe2d7      {
004fe2d9          int32_t ebx_4 = 0;
004fe2d9          
004fe301          do
004fe301          {
004fe2e0              class CharacterIdentity* m_data = this->delSet_.m_data;
004fe2e0              
004fe2eb              if (*(uint32_t*)(&m_data->gid_ + ebx_4) != 0)
004fe2eb              {
004fe2f1                  *(uint32_t*)(*(uint32_t*)((char*)m_data + ebx_4) + 0xc)(esi_1, edx);
004fe2f4                  edx = arg3;
004fe2eb              }
004fe2eb              
004fe2fb              i_1 += 1;
004fe2fc              ebx_4 += 0x10;
004fe301          } while (i_1 < this->delSet_.m_num);
004fe2d7      }
004fe2d7      
004fe308      **(uint32_t**)esi_1 = this->numAllowedCharacters_;
004fe314      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
004fe316      AC1Legacy::PStringBase<char>::Pack(&this->account_.m_buffer, esi_1, edx);
004fe320      **(uint32_t**)esi_1 = this->m_fUseTurbineChat;
004fe324      uint32_t* ecx_9 = &*(uint32_t*)esi_1[1];
004fe327      *(uint32_t*)esi_1 = ecx_9;
004fe32e      *(uint32_t*)ecx_9 = this->m_fHasThroneofDestiny;
004fe330      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
004fe333      return result;
004fe260  }

004fe2dd                                                                                         8d 49 00                               .I.
004fe33f                                                                                               90                                 .

004fe340  int32_t __thiscall CharacterSet::UnPack(class CharacterSet* this, void** arg2, uint32_t arg3)

004fe340  {
004fe350      this->status_ = **(uint32_t**)arg2;
004fe355      void* ecx_2 = (*(uint32_t*)arg2 + 4);
004fe35a      *(uint32_t*)arg2 = ecx_2;
004fe35c      int32_t i_2 = *(uint32_t*)ecx_2;
004fe366      *(uint32_t*)arg2 = ((char*)ecx_2 + 4);
004fe368      int32_t var_10;
004fe368      CharacterIdentity::CharacterIdentity(&var_10);
004fe36d      class CharacterIdentity* m_data = this->set_.m_data;
004fe370      this->set_.m_num = 0;
004fe370      this->set_.m_size = 0;
004fe370      
004fe37d      if (m_data != 0)
004fe37d      {
004fe385          if (m_data->vtable == 0)
004fe390              operator delete[](((char*)m_data - 4));
004fe385          else
004fe387              m_data->vtable->__vecDelDtor(3);
004fe37d      }
004fe37d      
004fe370      this->set_.m_data = 0;
004fe370      
004fe3a0      if (i_2 > 0)
004fe3a0      {
004fe3ea          int32_t i;
004fe3ea          
004fe3ea          do
004fe3ea          {
004fe3ac              CharacterIdentity::UnPack(&var_10, arg2, arg3);
004fe3b1              uint32_t m_size = this->set_.m_size;
004fe3b7              int32_t eax_6;
004fe3b7              
004fe3b7              if (this->set_.m_num >= m_size)
004fe3b7              {
004fe3bb                  uint32_t eax_5;
004fe3bb                  
004fe3bb                  if (m_size <= 0)
004fe3c1                      eax_5 = 8;
004fe3bb                  else
004fe3bd                      eax_5 = (m_size * 2);
004fe3bd                  
004fe3c9                  eax_6 = AC1Legacy::SmartArray<CharacterIdentity>::grow(&this->set_, eax_5);
004fe3b7              }
004fe3b7              
004fe3d0              if ((this->set_.m_num < m_size || eax_6 != 0))
004fe3d0              {
004fe3e1                  CharacterIdentity::operator=(&this->set_.m_data[this->set_.m_num], &var_10);
004fe370                  this->set_.m_num += 1;
004fe3d0              }
004fe3d0              
004fe3e9              i = i_2;
004fe3e9              i_2 -= 1;
004fe3ea          } while (i != 1);
004fe3a0      }
004fe3a0      
004fe3ec      void* eax_7 = *(uint32_t*)arg2;
004fe3ee      int32_t i_3 = *(uint32_t*)eax_7;
004fe3f6      *(uint32_t*)arg2 = ((char*)eax_7 + 4);
004fe3f8      class CharacterIdentity* m_data_1 = this->delSet_.m_data;
004fe3f3      this->delSet_.m_num = 0;
004fe3f3      this->delSet_.m_size = 0;
004fe3f3      
004fe404      if (m_data_1 != 0)
004fe404      {
004fe40c          if (m_data_1->vtable == 0)
004fe417              operator delete[](((char*)m_data_1 - 4));
004fe40c          else
004fe40e              m_data_1->vtable->__vecDelDtor(3);
004fe404      }
004fe404      
004fe3f3      this->delSet_.m_data = 0;
004fe3f3      
004fe427      if (i_3 > 0)
004fe427      {
004fe478          int32_t i_1;
004fe478          
004fe478          do
004fe478          {
004fe43a              CharacterIdentity::UnPack(&var_10, arg2, arg3);
004fe43f              uint32_t m_size_1 = this->delSet_.m_size;
004fe445              int32_t eax_12;
004fe445              
004fe445              if (this->delSet_.m_num >= m_size_1)
004fe445              {
004fe449                  uint32_t eax_11;
004fe449                  
004fe449                  if (m_size_1 <= 0)
004fe44f                      eax_11 = 8;
004fe449                  else
004fe44b                      eax_11 = (m_size_1 * 2);
004fe44b                  
004fe457                  eax_12 = AC1Legacy::SmartArray<CharacterIdentity>::grow(&this->delSet_, eax_11);
004fe445              }
004fe445              
004fe45e              if ((this->delSet_.m_num < m_size_1 || eax_12 != 0))
004fe45e              {
004fe46f                  CharacterIdentity::operator=(&this->delSet_.m_data[this->delSet_.m_num], &var_10);
004fe3f3                  this->delSet_.m_num += 1;
004fe45e              }
004fe45e              
004fe477              i_1 = i_3;
004fe477              i_3 -= 1;
004fe478          } while (i_1 != 1);
004fe427      }
004fe427      
004fe482      this->numAllowedCharacters_ = **(uint32_t**)arg2;
004fe48f      *(uint32_t*)arg2 += 4;
004fe491      AC1Legacy::PStringBase<char>::UnPack(&this->account_.m_buffer, arg2, arg3);
004fe49a      this->m_fUseTurbineChat = **(uint32_t**)arg2;
004fe49f      void* ebp_1 = (*(uint32_t*)arg2 + 4);
004fe4a2      *(uint32_t*)arg2 = ebp_1;
004fe4ac      this->m_fHasThroneofDestiny = *(uint32_t*)ebp_1;
004fe4af      *(uint32_t*)arg2 += 4;
004fe4b8      var_10 = 0x7c5f50;
004fe4cc      int32_t* var_8;
004fe4cc      
004fe4cc      if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
004fe4d4          **(uint32_t**)var_8(1);
004fe4d4      
004fe4e2      return 1;
004fe340  }

004fe4e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004fe4f0  int32_t __thiscall CharacterSet::AddIdentity(class CharacterSet* this, class CharacterIdentity* arg2)

004fe4f0  {
004fe4f6      uint32_t m_num = this->set_.m_num;
004fe4f9      int32_t edx = 0;
004fe4f9      
004fe4fe      if (m_num > 0)
004fe4fe      {
004fe506          uint32_t* eax_2 = &this->set_.m_data->gid_;
004fe506          
004fe51a          do
004fe51a          {
004fe512              if (ADJ(eax_2)->gid_ == arg2->gid_)
004fe534                  return 0;
004fe534              
004fe514              edx += 1;
004fe515              eax_2 = &eax_2[4];
004fe51a          } while (edx < m_num);
004fe4fe      }
004fe4fe      
004fe51c      uint32_t m_size = this->set_.m_size;
004fe525      int32_t eax_5;
004fe525      
004fe525      if (this->set_.m_num >= m_size)
004fe525      {
004fe529          uint32_t eax_3;
004fe529          
004fe529          if (m_size <= 0)
004fe537              eax_3 = 8;
004fe529          else
004fe52b              eax_3 = (m_size * 2);
004fe52b          
004fe53f          eax_5 = AC1Legacy::SmartArray<CharacterIdentity>::grow(&this->set_, eax_3);
004fe525      }
004fe525      
004fe546      if ((this->set_.m_num < m_size || eax_5 != 0))
004fe546      {
004fe553          CharacterIdentity::operator=(&this->set_.m_data[this->set_.m_num], arg2);
004fe51f          this->set_.m_num += 1;
004fe546      }
004fe546      
004fe563      return 1;
004fe4f0  }

004fe566                    90 90 90 90 90 90 90 90 90 90                                                        ..........

004fe570  class CharacterSet& __thiscall CharacterSet::operator=(class CharacterSet* this, class CharacterSet const& arg2)

004fe570  {
004fe575      class CharacterSet& edi = arg2;
004fe579      class CharacterSet* result = this;
004fe57d      class CharacterSet* result_1 = result;
004fe57d      
004fe581      if (result != edi)
004fe581      {
004fe587          class CharacterIdentity* m_data = result->set_.m_data;
004fe58c          result->set_.m_num = 0;
004fe58c          result->set_.m_size = 0;
004fe58c          
004fe599          if (m_data != 0)
004fe599          {
004fe5a3              if (m_data->vtable == 0)
004fe5ae                  operator delete[](((char*)m_data - 4));
004fe5a3              else
004fe5a5                  m_data->vtable->__vecDelDtor(3);
004fe599          }
004fe599          
004fe5b8          class AC1Legacy::SmartArray<CharacterIdentity>* ebx_2 = &result->delSet_;
004fe58c          result->set_.m_data = 0;
004fe5bd          class CharacterIdentity* m_data_1 = ebx_2->m_data;
004fe5c1          ebx_2->m_num = 0;
004fe5c4          ebx_2->m_size = 0;
004fe5c4          
004fe5c7          if (m_data_1 != 0)
004fe5c7          {
004fe5cf              if (m_data_1->vtable == 0)
004fe5da                  operator delete[](((char*)m_data_1 - 4));
004fe5cf              else
004fe5d1                  m_data_1->vtable->__vecDelDtor(3);
004fe5c7          }
004fe5c7          
004fe5e4          ebx_2->m_data = 0;
004fe5e9          arg2 = nullptr;
004fe5e9          
004fe5ed          if (edi->set_.m_num > 0)
004fe5ed          {
004fe5ef              int32_t var_8_1 = 0;
004fe5ef              
004fe64b              do
004fe64b              {
004fe5fa                  uint32_t m_size = result->set_.m_size;
004fe600                  void* ebp_1 = (edi->set_.m_data + var_8_1);
004fe604                  int32_t eax_5;
004fe604                  
004fe604                  if (result->set_.m_num >= m_size)
004fe604                  {
004fe608                      uint32_t eax_4;
004fe608                      
004fe608                      if (m_size <= 0)
004fe60e                          eax_4 = 8;
004fe608                      else
004fe60a                          eax_4 = (m_size * 2);
004fe60a                      
004fe616                      eax_5 = AC1Legacy::SmartArray<CharacterIdentity>::grow(&result->set_, eax_4);
004fe604                  }
004fe604                  
004fe61d                  if ((result->set_.m_num < m_size || eax_5 != 0))
004fe61d                  {
004fe62a                      CharacterIdentity::operator=(&result->set_.m_data[result->set_.m_num], ebp_1);
004fe58c                      result->set_.m_num += 1;
004fe61d                  }
004fe61d                  
004fe643                  arg2 = (&arg2->vtable + 1);
004fe647                  var_8_1 += 0x10;
004fe64b              } while ((&arg2->vtable + 1) < edi->set_.m_num);
004fe64b              
004fe64d              result = result_1;
004fe5ed          }
004fe5ed          
004fe656          arg2 = nullptr;
004fe656          
004fe65a          if (edi->delSet_.m_num > 0)
004fe65a          {
004fe65c              int32_t ebp_2 = 0;
004fe65c              
004fe6ac              do
004fe6ac              {
004fe663                  uint32_t m_size_1 = ebx_2->m_size;
004fe669                  class CharacterIdentity* esi_3 = (edi->delSet_.m_data + ebp_2);
004fe66d                  int32_t eax_9;
004fe66d                  
004fe66d                  if (ebx_2->m_num >= m_size_1)
004fe66d                  {
004fe671                      uint32_t eax_8;
004fe671                      
004fe671                      if (m_size_1 <= 0)
004fe677                          eax_8 = 8;
004fe671                      else
004fe673                          eax_8 = (m_size_1 * 2);
004fe673                      
004fe67f                      eax_9 = AC1Legacy::SmartArray<CharacterIdentity>::grow(ebx_2, eax_8);
004fe66d                  }
004fe66d                  
004fe686                  if ((ebx_2->m_num < m_size_1 || eax_9 != 0))
004fe686                  {
004fe693                      CharacterIdentity::operator=(&ebx_2->m_data[ebx_2->m_num], esi_3);
004fe698                      ebx_2->m_num += 1;
004fe686                  }
004fe686                  
004fe6a3                  ebp_2 += 0x10;
004fe6a8                  arg2 = (&arg2->vtable + 1);
004fe6ac              } while ((&arg2->vtable + 1) < edi->delSet_.m_num);
004fe6ac              
004fe6ae              result = result_1;
004fe65a          }
004fe65a          
004fe6b5          result->status_ = edi->status_;
004fe6bb          result->numAllowedCharacters_ = edi->numAllowedCharacters_;
004fe6ca          AC1Legacy::PStringBase<char>::set(&result->account_, &edi->account_.m_buffer->m_data);
004fe6c4          result->account_.fIsDarkMajestyExpansion_ = edi->account_.fIsDarkMajestyExpansion_;
004fe6c4          result->account_.m_fIsThroneOfDestinyExpansion = edi->account_.m_fIsThroneOfDestinyExpansion;
004fe6c4          result->account_.m_fPreOrderedThroneOfDestinyExpansion = edi->account_.m_fPreOrderedThroneOfDestinyExpansion;
004fe6e4          result->m_fUseTurbineChat = edi->m_fUseTurbineChat;
004fe6eb          result->m_fHasThroneofDestiny = edi->m_fHasThroneofDestiny;
004fe581      }
004fe581      
004fe6f6      return result;
004fe570  }

004fe6f9                                                                             90 90 90 90 90 90 90                           .......

004fe700  void __fastcall CharacterIdentity::CharacterIdentity(class CharacterIdentity* this)

004fe700  {
004fe703      this->vtable = 0x7c5f50;
004fe709      this->gid_ = 0;
004fe710      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004fe71b      this->name_.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004fe71e      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004fe724      this->secondsGreyedOut_ = 0;
004fe700  }

004fe72f                                               90                                                                 .

004fe730  uint32_t __fastcall CharacterIdentity::pack_size(class CharacterIdentity* this)

004fe730  {
004fe736      int32_t eax_1 = (this->name_.m_buffer->m_len - 1);
004fe737      int32_t ecx = 0;
004fe737      
004fe73e      if (eax_1 >= 0xffff)
004fe740          ecx = 4;
004fe740      
004fe74b      int32_t eax_3 = (((ecx + eax_1) + 2) & 3);
004fe74e      int32_t ecx_1;
004fe74e      
004fe74e      if (eax_3 == 0)
004fe759          ecx_1 = 0;
004fe74e      else
004fe755          ecx_1 = (4 - eax_3);
004fe755      
004fe761      int32_t eax_5 = (((ecx_1 + ((ecx + eax_1) + 2)) + 8) & 3);
004fe761      
004fe764      if (eax_5 == 0)
004fe775          return ((ecx_1 + ((ecx + eax_1) + 2)) + 8);
004fe775      
004fe770      return ((4 - eax_5) + ((ecx_1 + ((ecx + eax_1) + 2)) + 8));
004fe730  }

004fe776                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004fe780  uint32_t __thiscall CharacterIdentity::Pack(class CharacterIdentity* this, void** arg2, uint32_t arg3)

004fe780  {
004fe787      void* ebp = *(uint32_t*)arg2;
004fe795      int32_t eax_2 = (this->name_.m_buffer->m_len - 1);
004fe796      int32_t edx = 0;
004fe796      
004fe79d      if (eax_2 >= 0xffff)
004fe79f          edx = 4;
004fe79f      
004fe7aa      int32_t eax_4 = (((edx + eax_2) + 2) & 3);
004fe7ad      int32_t edx_1;
004fe7ad      
004fe7ad      if (eax_4 == 0)
004fe7b8          edx_1 = 0;
004fe7ad      else
004fe7b4          edx_1 = (4 - eax_4);
004fe7b4      
004fe7c0      int32_t eax_6 = (((edx_1 + ((edx + eax_2) + 2)) + 8) & 3);
004fe7c3      int32_t edx_2;
004fe7c3      
004fe7c3      if (eax_6 == 0)
004fe7ce          edx_2 = 0;
004fe7c3      else
004fe7ca          edx_2 = (4 - eax_6);
004fe7ca      
004fe7d0      int32_t result = (edx_2 + ((edx_1 + ((edx + eax_2) + 2)) + 8));
004fe7d0      
004fe7d9      if (arg3 < result)
004fe811          return result;
004fe811      
004fe7de      *(uint32_t*)ebp = this->gid_;
004fe7eb      *(uint32_t*)arg2 += 4;
004fe7ed      AC1Legacy::PStringBase<char>::Pack(&this->name_, arg2, (arg3 - 4));
004fe7f7      **(uint32_t**)arg2 = this->secondsGreyedOut_;
004fe7ff      *(uint32_t*)arg2 += 4;
004fe801      PackObj::ALIGN_PTR(arg2);
004fe80b      return (*(uint32_t*)arg2 - ebp);
004fe780  }

004fe814                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004fe820  class CharacterIdentity& __thiscall CharacterIdentity::operator=(class CharacterIdentity* this, class CharacterIdentity const& arg2)

004fe820  {
004fe82b      this->gid_ = arg2->gid_;
004fe832      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->name_.m_buffer;
004fe832      
004fe837      if (m_buffer_1 != arg2->name_.m_buffer)
004fe837      {
004fe849          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
004fe84b              m_buffer_1->vtable->__vecDelDtor(1);
004fe84b          
004fe853          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->name_.m_buffer;
004fe856          this->name_.m_buffer = m_buffer;
004fe85d          InterlockedIncrement(&m_buffer->m_cRef);
004fe837      }
004fe837      
004fe866      this->secondsGreyedOut_ = arg2->secondsGreyedOut_;
004fe86e      return this;
004fe820  }

004fe871                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004fe880  int32_t __thiscall CharacterIdentity::UnPack(class CharacterIdentity* this, void** arg2, uint32_t arg3)

004fe880  {
004fe886      void* ebx = *(uint32_t*)arg2;
004fe88d      this->gid_ = *(uint32_t*)ebx;
004fe890      *(uint32_t*)arg2 += 4;
004fe890      
004fe8a6      if (AC1Legacy::PStringBase<char>::UnPack(&this->name_, arg2, (arg3 - 4)) == 0)
004fe8a6      {
004fe8ad          printf("CharacterIdentity: Unpack failed…");
004fe8b7          *(uint32_t*)arg2 = ebx;
004fe8bd          return 0;
004fe8a6      }
004fe8a6      
004fe8c4      this->secondsGreyedOut_ = **(uint32_t**)arg2;
004fe8cd      *(uint32_t*)arg2 += 4;
004fe8cf      PackObj::ALIGN_PTR(arg2);
004fe8df      return 1;
004fe880  }

004fe8e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

004fe8f0  uint8_t CRegionDesc::SetRegion(uint32_t arg1)

004fe8f0  {
004fe8f5      int32_t var_8 = 0x1c;
004fe8f7      int32_t var_c = 0xb;
004fe8f9      uint32_t var_10 = arg1;
004fe8ff      uint32_t ecx;
004fe8ff      int32_t edx;
004fe8ff      class DBObj* esi = DBObj::GetByEnum(arg1, edx, ecx);
004fe906      class DBObj* eax;
004fe906      
004fe906      if (esi == 0)
004fe906      {
004fe908          eax = 0;
004fe90b          return 0;
004fe906      }
004fe906      
004fe90c      class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
004fe90c      
004fe914      if (CRegionDesc::current_region_1 != 0)
004fe916          CRegionDesc::current_region_1->vtable->Release();
004fe916      
004fe91b      CRegionDesc::current_region = esi;
004fe921      eax = 1;
004fe924      return 1;
004fe8f0  }

004fe925                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004fe930  void CRegionDesc::RemoveCurrentRegion()

004fe930  {
004fe937      if (CRegionDesc::current_region != 0)
004fe937      {
004fe941          DBCache::FlushFreeObjects(DBCache::s_pCache, 1);
004fe946          CRegionDesc::current_region->vtable->Release();
004fe937      }
004fe937      
004fe951      CRegionDesc::current_region = nullptr;
004fe930  }

004fe95c                                                                                      90 90 90 90                              ....

004fe960  uint32_t __thiscall CRegionDesc::NumSceneType(class CRegionDesc* this, uint32_t arg2)

004fe960  {
004fe963      /* tailcall */
004fe963      return CTerrainDesc::NumSceneType(this->terrain_info, arg2);
004fe960  }

004fe968                          90 90 90 90 90 90 90 90                                                          ........

004fe970  uint32_t __thiscall CRegionDesc::SceneCount(class CRegionDesc* this, uint32_t arg2, uint32_t arg3)

004fe970  {
004fe973      /* tailcall */
004fe973      return CTerrainDesc::SceneCount(this->terrain_info, arg2, arg3);
004fe970  }

004fe978                                                                          90 90 90 90 90 90 90 90                          ........

004fe980  int32_t __fastcall CRegionDesc::IsPalShifted(class CRegionDesc* this)

004fe980  {
004fe98e      int32_t result;
004fe98e      result = CommandList::GetHead(this->terrain_info)->next != 0;
004fe993      return result;
004fe980  }

004fe994                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

004fe9a0  void CRegionDesc::CalcDayGroup()

004fe9a0  {
004fe9a0      class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
004fe9a0      
004fe9a7      if (CRegionDesc::current_region_1 != 0)
004fe9a7      {
004fe9a9          class SkyDesc* sky_info = CRegionDesc::current_region_1->sky_info;
004fe9a9          
004fe9ae          if (sky_info != 0)
004fe9b0              /* tailcall */
004fe9b0              return SkyDesc::CalcPresentDayGroup(sky_info);
004fe9a7      }
004fe9a0  }

004fe9b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

004fe9c0  int32_t CRegionDesc::GetLighting(float arg1, float* arg2, class RGBAUnion* arg3, class AC1Legacy::Vector3* arg4, class RGBAUnion* arg5)

004fe9c0  {
004fe9c0      class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
004fe9c0      
004fe9c7      if (CRegionDesc::current_region_1 != 0)
004fe9c7      {
004fe9c9          class SkyDesc* sky_info = CRegionDesc::current_region_1->sky_info;
004fe9c9          
004fe9ce          if (sky_info != 0)
004fe9ce          {
004fe9e9              SkyDesc::GetLighting(sky_info, arg1, arg2, arg3, arg4, arg5);
004fe9f3              return 1;
004fe9ce          }
004fe9c7      }
004fe9c7      
004fe9f6      return 0;
004fe9c0  }

004fe9f7                                                                       90 90 90 90 90 90 90 90 90                         .........

004fea00  int32_t CRegionDesc::GetWorldFog(float arg1, float* arg2, float* arg3, class RGBAUnion* arg4)

004fea00  {
004fea00      class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
004fea00      
004fea07      if (CRegionDesc::current_region_1 != 0)
004fea07      {
004fea09          class SkyDesc* sky_info = CRegionDesc::current_region_1->sky_info;
004fea09          
004fea0e          if (sky_info != 0)
004fea29              return SkyDesc::GetWorldFog(sky_info, arg1, arg2, arg3, arg4);
004fea07      }
004fea07      
004fea2c      return 0;
004fea00  }

004fea2d                                         90 90 90                                                               ...

004fea30  int32_t CRegionDesc::GetSky(float arg1, class AC1Legacy::SmartArray<CelestialPosition>* arg2)

004fea30  {
004fea30      class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
004fea30      
004fea37      if (CRegionDesc::current_region_1 != 0)
004fea37      {
004fea39          class SkyDesc* sky_info = CRegionDesc::current_region_1->sky_info;
004fea39          
004fea3e          if (sky_info != 0)
004fea3e          {
004fea4a              SkyDesc::GetSky(sky_info, arg1, arg2);
004fea4f              return 1;
004fea3e          }
004fea37      }
004fea37      
004fea52      return 0;
004fea30  }

004fea53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004fea60  int32_t __fastcall AmbientSTBDesc::InitSoundTable(class AmbientSTBDesc* this)

004fea60  {
004fea6b      if (this->stb_not_found == 0)
004fea6b      {
004fea6d          uint32_t id = this->stb_id.id;
004fea6d          
004fea75          if (id != INVALID_DID.id)
004fea75          {
004fea84              void var_8;
004fea84              class DBObj* eax_2 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0x22));
004fea8e              this->sound_table = eax_2;
004fea8e              
004fea91              if (eax_2 != 0)
004feaaa                  return 1;
004feaaa              
004fea93              this->stb_not_found = 1;
004fea75          }
004fea6b      }
004fea6b      
004feaa0      return 0;
004fea60  }

004feaab                                   90 90 90 90 90                                                             .....

004feab0  class AmbientSTBDesc* __thiscall CRegionDesc::GetSTBDesc(class CRegionDesc* this, uint32_t arg2, uint32_t arg3)

004feab0  {
004feabe      class AmbientSTBDesc* result = CTerrainDesc::GetSTBDesc(this->terrain_info, arg2, arg3);
004feabe      
004feac7      if (result != 0)
004feac7      {
004feace          int32_t eax_1;
004feace          
004feace          if (result->sound_table == 0)
004fead2              eax_1 = AmbientSTBDesc::InitSoundTable(result);
004fead2          
004fead9          if ((result->sound_table != 0 || eax_1 != 0))
004feae4              return result;
004feac7      }
004feac7      
004feade      return 0;
004feab0  }

004feae7                       90 90 90 90 90 90 90 90 90                                                         .........

004feaf0  class IDClass<_tagDataID,32,0>* __thiscall CRegionDesc::GetScene(class CRegionDesc* this, class IDClass<_tagDataID,32,0>* __return, uint32_t arg3, uint32_t arg4, uint32_t arg5)

004feaf0  {
004feb08      CTerrainDesc::GetScene(this->terrain_info, __return, arg3, arg4, arg5);
004feb10      return __return;
004feaf0  }

004feb13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

004feb20  uint32_t __thiscall RegionMisc::Pack(class RegionMisc* this, void** arg2, uint32_t* arg3)

004feb20  {
004feb27      if (*(uint32_t*)arg3 >= 4)
004feb27      {
004feb37          **(uint32_t**)arg2 = this->version;
004feb39          *(uint32_t*)arg2 += 4;
004feb3e          uint32_t edi_3 = (*(uint32_t*)arg3 - 4);
004feb46          *(uint32_t*)arg3 = edi_3;
004feb46          
004feb48          if (edi_3 >= 4)
004feb48          {
004feb4f              **(uint32_t**)arg2 = this->game_map.id;
004feb51              *(uint32_t*)arg2 += 4;
004feb56              uint32_t edi_6 = (*(uint32_t*)arg3 - 4);
004feb5e              *(uint32_t*)arg3 = edi_6;
004feb5e              
004feb60              if (edi_6 >= 4)
004feb60              {
004feb67                  **(uint32_t**)arg2 = this->autotest_map.id;
004feb69                  *(uint32_t*)arg2 += 4;
004feb6e                  uint32_t edi_9 = (*(uint32_t*)arg3 - 4);
004feb76                  *(uint32_t*)arg3 = edi_9;
004feb76                  
004feb78                  if (edi_9 >= 4)
004feb78                  {
004feb7f                      **(uint32_t**)arg2 = this->autotest_map_size;
004feb81                      *(uint32_t*)arg2 += 4;
004feb86                      uint32_t edi_12 = (*(uint32_t*)arg3 - 4);
004feb8e                      *(uint32_t*)arg3 = edi_12;
004feb8e                      
004feb90                      if (edi_12 >= 4)
004feb90                      {
004feb97                          **(uint32_t**)arg2 = this->clear_cell.id;
004feb99                          *(uint32_t*)arg2 += 4;
004feb9e                          uint32_t edi_15 = (*(uint32_t*)arg3 - 4);
004feba6                          *(uint32_t*)arg3 = edi_15;
004feba6                          
004feba8                          if (edi_15 >= 4)
004feba8                          {
004febaf                              **(uint32_t**)arg2 = this->clear_monster.id;
004febb1                              *(uint32_t*)arg2 += 4;
004febb4                              *(uint32_t*)arg3 -= 4;
004feba8                          }
004feb90                      }
004feb78                  }
004feb60              }
004feb48          }
004feb27      }
004feb27      
004febbb      return *(uint32_t*)arg3;
004feb20  }

004febbe                                                                                            90 90                                ..

004febc0  int32_t __thiscall RegionMisc::UnPack(class RegionMisc* this, void** arg2, uint32_t* arg3)

004febc0  {
004febc7      if (*(uint32_t*)arg3 >= 4)
004febc7      {
004febd6          this->version = **(uint32_t**)arg2;
004febd8          *(uint32_t*)arg2 += 4;
004febde          uint32_t edi_2 = (*(uint32_t*)arg3 - 4);
004febe6          *(uint32_t*)arg3 = edi_2;
004febe6          
004febe8          if (edi_2 >= 4)
004febe8          {
004febea              void* esi_4 = *(uint32_t*)arg2;
004febec              class IDClass<_tagDataID,32,0> edi_3 = *(uint32_t*)esi_4;
004febf1              *(uint32_t*)arg2 = ((char*)esi_4 + 4);
004febf3              *(uint32_t*)arg3 -= 4;
004febf6              this->game_map.id = edi_3;
004febf6              
004febfc              if (*(uint32_t*)arg3 >= 4)
004febfc              {
004febfe                  void* esi_6 = *(uint32_t*)arg2;
004fec00                  class IDClass<_tagDataID,32,0> edi_4 = *(uint32_t*)esi_6;
004fec05                  *(uint32_t*)arg2 = ((char*)esi_6 + 4);
004fec07                  *(uint32_t*)arg3 -= 4;
004fec0a                  this->autotest_map.id = edi_4;
004fec0a                  
004fec10                  if (*(uint32_t*)arg3 >= 4)
004fec10                  {
004fec16                      this->autotest_map_size = **(uint32_t**)arg2;
004fec19                      *(uint32_t*)arg2 += 4;
004fec1e                      uint32_t edi_6 = (*(uint32_t*)arg3 - 4);
004fec26                      *(uint32_t*)arg3 = edi_6;
004fec26                      
004fec28                      if (edi_6 >= 4)
004fec28                      {
004fec2a                          void* esi_11 = *(uint32_t*)arg2;
004fec2c                          class IDClass<_tagDataID,32,0> edi_7 = *(uint32_t*)esi_11;
004fec31                          *(uint32_t*)arg2 = ((char*)esi_11 + 4);
004fec33                          *(uint32_t*)arg3 -= 4;
004fec36                          this->clear_cell.id = edi_7;
004fec36                          
004fec3c                          if (*(uint32_t*)arg3 >= 4)
004fec3c                          {
004fec3e                              int32_t* esi_13 = *(uint32_t*)arg2;
004fec40                              class IDClass<_tagDataID,32,0> edi_8 = *(uint32_t*)esi_13;
004fec45                              *(uint32_t*)arg2 = &esi_13[1];
004fec47                              *(uint32_t*)arg3 -= 4;
004fec4a                              this->clear_monster.id = edi_8;
004fec3c                          }
004fec28                      }
004fec10                  }
004febfc              }
004febe8          }
004febc7      }
004febc7      
004fec54      return 1;
004febc0  }

004fec57                                                                       90 90 90 90 90 90 90 90 90                         .........

004fec60  void __thiscall CRegionDesc::CRegionDesc(class CRegionDesc* this, class IDClass<_tagDataID,32,0> arg2)

004fec60  {
004fec69      DBObj::DBObj(this, arg2);
004fec6e      this->vtable = &PackObj::`vftable';
004fec75      this->vtable = 0x7c6000;
004fec7b      this->vtable = &CRegionDesc::`vftable';
004fec84      this->region_number = 0;
004fec87      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
004fec93      this->region_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
004fec96      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
004fec9c      __builtin_memset(&this->parts_mask, 0, 0x30);
004fecc1      this->version = 0xffffffff;
004fecc8      this->minimize_pal = 1;
004fec60  }

004fecd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004fece0  void* __thiscall CRegionDesc::`vector deleting destructor'(class CRegionDesc* this, uint32_t arg2)

004fece0  {
004fece3      /* tailcall */
004fece3      return CRegionDesc::`scalar deleting destructor'(((char*)this - 0x30), arg2);
004fece0  }

004fece8                          cc cc cc cc cc cc cc cc                                                          ........

004fecf0  void __fastcall CRegionDesc::Destroy(class CRegionDesc* this)

004fecf0  {
004fecf5      class FileNameDesc* file_info = this->file_info;
004fecfc      this->version = 0xffffffff;
004fecfc      
004fed03      if (file_info != 0)
004fed03      {
004fed07          FileNameDesc::~FileNameDesc(file_info);
004fed0d          operator delete(file_info);
004fed15          this->file_info = nullptr;
004fed03      }
004fed03      
004fed18      class SkyDesc* sky_info = this->sky_info;
004fed18      
004fed1d      if (sky_info != 0)
004fed1d      {
004fed21          SkyDesc::~SkyDesc(sky_info);
004fed27          operator delete(sky_info);
004fed2f          this->sky_info = nullptr;
004fed1d      }
004fed1d      
004fed32      class CSceneDesc* scene_info = this->scene_info;
004fed32      
004fed37      if (scene_info != 0)
004fed37      {
004fed3b          CSceneDesc::~CSceneDesc(scene_info);
004fed41          operator delete(scene_info);
004fed49          this->scene_info = nullptr;
004fed37      }
004fed37      
004fed4c      class CTerrainDesc* terrain_info = this->terrain_info;
004fed4c      
004fed51      if (terrain_info != 0)
004fed51      {
004fed55          CTerrainDesc::~CTerrainDesc(terrain_info);
004fed5b          operator delete(terrain_info);
004fed63          this->terrain_info = nullptr;
004fed51      }
004fed51      
004fed66      class RegionMisc* region_misc = this->region_misc;
004fed66      
004fed6b      if (region_misc != 0)
004fed6b      {
004fed6e          operator delete(region_misc);
004fed76          this->region_misc = nullptr;
004fed6b      }
004fed6b      
004fed79      class CSoundDesc* sound_info = this->sound_info;
004fed79      
004fed7e      if (sound_info != 0)
004fed7e      {
004fed82          CSoundDesc::~CSoundDesc(sound_info);
004fed88          operator delete(sound_info);
004fed90          this->sound_info = nullptr;
004fed7e      }
004fed7e      
004fed93      class CEncounterDesc* encounter_info = this->encounter_info;
004fed93      
004fed98      if (encounter_info != 0)
004fed98      {
004fed9c          CEncounterDesc::~CEncounterDesc(encounter_info);
004feda2          operator delete(encounter_info);
004fedaa          this->encounter_info = nullptr;
004fed98      }
004fecf0  }

004fedb1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004fedc0  void __thiscall CRegionDesc::GetSubDataIDs(class CRegionDesc const* this, class QualifiedDataIDArray* arg2)

004fedc0  {
004fedc6      class SkyDesc* sky_info = this->sky_info;
004fedc6      
004fedd0      if (sky_info != 0)
004fedd3          SkyDesc::GetSubDataIDs(sky_info, arg2);
004fedd3      
004fedd8      class CSoundDesc* sound_info = this->sound_info;
004fedd8      
004feddd      if (sound_info != 0)
004fede0          CSoundDesc::GetSubDataIDs(sound_info, arg2);
004fede0      
004fede5      class CSceneDesc* scene_info = this->scene_info;
004fede5      
004fedea      if (scene_info != 0)
004feded          CSceneDesc::GetSubDataIDs(scene_info, arg2);
004feded      
004fedf2      class CTerrainDesc* terrain_info = this->terrain_info;
004fedf2      
004fedf7      if (terrain_info != 0)
004fedfa          CTerrainDesc::GetSubDataIDs(terrain_info, arg2);
004fedfa      
004fedff      class RegionMisc* region_misc = this->region_misc;
004fedff      
004fee04      if (region_misc != 0)
004fee04      {
004fee1a          void var_8;
004fee1a          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, region_misc->game_map.id, 0), 8);
004fee33          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, region_misc->autotest_map.id, 0), 8);
004fee04      }
004fedc0  }


004fee40  class DBObj* CRegionDesc::Allocate(class CRegionDesc const* this @ ecx)

004fee40  {
004fee40      /* tailcall */
004fee40      return CRegionDesc::Allocator();
004fee40  }

004fee45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

004fee50  uint32_t __fastcall CRegionDesc::pack_size(class CRegionDesc* this)

004fee50  {
004fee5a      int32_t eax_2 = (this->region_name.m_buffer->m_len - 1);
004fee5b      int32_t ecx = 0;
004fee5b      
004fee62      if (eax_2 >= 0xffff)
004fee64          ecx = 4;
004fee64      
004fee6f      int32_t ecx_2 = (((ecx + eax_2) + 2) & 3);
004fee72      int32_t eax_3;
004fee72      
004fee72      if (ecx_2 == 0)
004fee7d          eax_3 = 0;
004fee72      else
004fee79          eax_3 = (4 - ecx_2);
004fee79      
004fee7f      class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
004fee87      int32_t result = ((eax_3 + ((ecx + eax_2) + 2)) + 0x42c);
004fee87      
004fee8e      if (GameTime::current_game_time_1 != 0)
004fee95          result += GameTime::pack_size(GameTime::current_game_time_1);
004fee95      
004fee9b      if ((this->parts_mask & 0x10) != 0)
004feea5          result += SkyDesc::pack_size(this->sky_info);
004feea5      
004feeab      if ((this->parts_mask & 1) != 0)
004feeb5          result += CSoundDesc::pack_size(this->sound_info);
004feeb5      
004feebb      if ((this->parts_mask & 2) != 0)
004feec5          result += CSceneDesc::pack_size(this->scene_info);
004feec5      
004feecb      if ((this->parts_mask & 4) != 0)
004feed5          result += CTerrainDesc::pack_size(this->terrain_info);
004feed5      
004feedd      if ((*(uint8_t*)((char*)((int16_t)this->parts_mask))[1] & 2) == 0)
004feee6          return result;
004feee6      
004feedf      return (result + 0x18);
004fee50  }

004feee7                       90 90 90 90 90 90 90 90 90                                                         .........

004feef0  uint32_t __thiscall CRegionDesc::Pack(class CRegionDesc* this, void** arg2, uint32_t arg3)

004feef0  {
004feef4      class CRegionDesc* this_1 = this;
004feef9      class CRegionDesc* this_2 = this_1;
004feefd      uint32_t eax = CRegionDesc::pack_size(((char*)this_1 - 0x30));
004fef04      uint32_t eax_1 = arg3;
004fef04      
004fef0e      if (eax_1 < eax)
004fef16          return eax;
004fef16      
004fef1a      void** esi = arg2;
004fef1a      
004fef26      if (eax_1 >= 4)
004fef26      {
004fef2d          **(uint32_t**)esi = this_1->m_bLoaded*(int32_t*)((char*)this_1 + 8);
004fef31          void* eax_5 = (*(uint32_t*)esi + 4);
004fef33          *(uint32_t*)esi = eax_5;
004fef3b          eax_1 = (arg3 - 4);
004fef3f          arg3 = eax_1;
004fef3f          
004fef43          if (eax_1 >= 4)
004fef43          {
004fef48              *(uint32_t*)eax_5 = this_1->m_timeStamp;
004fef52              eax_1 = (arg3 - 4);
004fef54              *(uint32_t*)esi += 4;
004fef56              arg3 = eax_1;
004fef43          }
004fef26      }
004fef26      
004fef5f      uint32_t eax_8 = AC1Legacy::PStringBase<char>::Pack(&*(int32_t*)((char*)this_1 + 0xc), esi, eax_1);
004fef64      arg3 -= eax_8;
004fef90      int32_t var_2c;
004fef90      int32_t var_28;
004fef90      float var_24;
004fef90      int32_t var_20;
004fef90      int32_t var_1c;
004fef90      int32_t var_18;
004fef90      int32_t var_14;
004fef90      int32_t var_10;
004fef90      LandDefs::get_vars(&var_2c, &var_28, &var_24, &var_20, &var_1c, &var_18, &var_14, &var_10);
004fef90      
004fef9e      if (arg3 >= 4)
004fef9e      {
004fefaa          **(uint32_t**)esi = var_2c;
004fefb2          uint32_t ecx_6 = (arg3 - 4);
004fefb4          void* eax_12 = (*(uint32_t*)esi + 4);
004fefb8          *(uint32_t*)esi = eax_12;
004fefba          arg3 = ecx_6;
004fefba          
004fefbe          if (ecx_6 >= 4)
004fefbe          {
004fefc8              *(uint32_t*)eax_12 = var_28;
004fefd0              uint32_t ecx_9 = (arg3 - 4);
004fefd2              void* eax_14 = (*(uint32_t*)esi + 4);
004fefd6              *(uint32_t*)esi = eax_14;
004fefd8              arg3 = ecx_9;
004fefd8              
004fefdc              if (ecx_9 >= 4)
004fefdc              {
004fefe6                  *(uint32_t*)eax_14 = var_24;
004fefee                  uint32_t ecx_11 = (arg3 - 4);
004feff0                  void* eax_16 = (*(uint32_t*)esi + 4);
004feff4                  *(uint32_t*)esi = eax_16;
004feff6                  arg3 = ecx_11;
004feff6                  
004feffa                  if (ecx_11 >= 4)
004feffa                  {
004ff000                      *(uint32_t*)eax_16 = var_20;
004ff008                      uint32_t ecx_14 = (arg3 - 4);
004ff00a                      void* eax_18 = (*(uint32_t*)esi + 4);
004ff00e                      *(uint32_t*)esi = eax_18;
004ff010                      arg3 = ecx_14;
004ff010                      
004ff014                      if (ecx_14 >= 4)
004ff014                      {
004ff01a                          *(uint32_t*)eax_18 = var_1c;
004ff022                          uint32_t ecx_16 = (arg3 - 4);
004ff024                          void* eax_20 = (*(uint32_t*)esi + 4);
004ff028                          *(uint32_t*)esi = eax_20;
004ff02a                          arg3 = ecx_16;
004ff02a                          
004ff02e                          if (ecx_16 >= 4)
004ff02e                          {
004ff034                              *(uint32_t*)eax_20 = var_18;
004ff03c                              uint32_t ecx_19 = (arg3 - 4);
004ff03e                              void* eax_22 = (*(uint32_t*)esi + 4);
004ff042                              *(uint32_t*)esi = eax_22;
004ff044                              arg3 = ecx_19;
004ff044                              
004ff048                              if (ecx_19 >= 4)
004ff048                              {
004ff04e                                  *(uint32_t*)eax_22 = var_14;
004ff056                                  uint32_t ecx_21 = (arg3 - 4);
004ff058                                  void* eax_24 = (*(uint32_t*)esi + 4);
004ff05c                                  *(uint32_t*)esi = eax_24;
004ff05e                                  arg3 = ecx_21;
004ff05e                                  
004ff062                                  if (ecx_21 >= 4)
004ff062                                  {
004ff068                                      *(uint32_t*)eax_24 = var_10;
004ff072                                      uint32_t eax_26 = (arg3 - 4);
004ff074                                      *(uint32_t*)esi += 4;
004ff076                                      arg3 = eax_26;
004ff062                                  }
004ff048                              }
004ff02e                          }
004ff014                      }
004feffa                  }
004fefdc              }
004fefbe          }
004fef9e      }
004fef9e      
004ff17c      for (void* i = nullptr; i < 0x400; i += 0x20)
004ff17c      {
004ff084          if (arg3 >= 4)
004ff084          {
004ff092              **(uint32_t**)esi = ((float)((long double)*(uint32_t*)((char*)i + 0x8eda28)));
004ff09a              uint32_t edx_10 = (arg3 - 4);
004ff09c              void* ecx_26 = (*(uint32_t*)esi + 4);
004ff0a0              *(uint32_t*)esi = ecx_26;
004ff0a2              arg3 = edx_10;
004ff0a2              
004ff0a6              if (edx_10 >= 4)
004ff0a6              {
004ff0b2                  *(uint32_t*)ecx_26 = ((float)((long double)*(uint32_t*)((char*)i + 0x8eda2c)));
004ff0ba                  uint32_t edx_12 = (arg3 - 4);
004ff0bc                  void* ecx_28 = (*(uint32_t*)esi + 4);
004ff0c0                  *(uint32_t*)esi = ecx_28;
004ff0c2                  arg3 = edx_12;
004ff0c2                  
004ff0c6                  if (edx_12 >= 4)
004ff0c6                  {
004ff0d2                      *(uint32_t*)ecx_28 = ((float)((long double)*(uint32_t*)((char*)i + 0x8eda30)));
004ff0da                      uint32_t edx_14 = (arg3 - 4);
004ff0dc                      void* ecx_30 = (*(uint32_t*)esi + 4);
004ff0e0                      *(uint32_t*)esi = ecx_30;
004ff0e2                      arg3 = edx_14;
004ff0e2                      
004ff0e6                      if (edx_14 >= 4)
004ff0e6                      {
004ff0f2                          *(uint32_t*)ecx_30 = ((float)((long double)*(uint32_t*)((char*)i + 0x8eda34)));
004ff0fa                          uint32_t edx_16 = (arg3 - 4);
004ff0fc                          void* ecx_32 = (*(uint32_t*)esi + 4);
004ff100                          *(uint32_t*)esi = ecx_32;
004ff102                          arg3 = edx_16;
004ff102                          
004ff106                          if (edx_16 >= 4)
004ff106                          {
004ff10e                              *(uint32_t*)ecx_32 = ((float)((long double)*(uint32_t*)((char*)i + 0x8eda38)));
004ff116                              uint32_t edx_18 = (arg3 - 4);
004ff118                              void* ecx_34 = (*(uint32_t*)esi + 4);
004ff11c                              *(uint32_t*)esi = ecx_34;
004ff11e                              arg3 = edx_18;
004ff11e                              
004ff122                              if (edx_18 >= 4)
004ff122                              {
004ff12a                                  *(uint32_t*)ecx_34 = ((float)((long double)*(uint32_t*)((char*)i + 0x8eda3c)));
004ff132                                  uint32_t edx_20 = (arg3 - 4);
004ff134                                  void* ecx_36 = (*(uint32_t*)esi + 4);
004ff138                                  *(uint32_t*)esi = ecx_36;
004ff13a                                  arg3 = edx_20;
004ff13a                                  
004ff13e                                  if (edx_20 >= 4)
004ff13e                                  {
004ff146                                      *(uint32_t*)ecx_36 = ((float)((long double)*(uint32_t*)((char*)i + 0x8eda40)));
004ff14e                                      uint32_t edx_22 = (arg3 - 4);
004ff150                                      float* ecx_38 = (*(uint32_t*)esi + 4);
004ff154                                      *(uint32_t*)esi = ecx_38;
004ff156                                      arg3 = edx_22;
004ff156                                      
004ff15a                                      if (edx_22 >= 4)
004ff15a                                      {
004ff162                                          *(uint32_t*)ecx_38 = ((float)((long double)*(uint32_t*)((char*)i + 0x8eda44)));
004ff16c                                          uint32_t ecx_40 = (arg3 - 4);
004ff16e                                          *(uint32_t*)esi += 4;
004ff170                                          arg3 = ecx_40;
004ff15a                                      }
004ff13e                                  }
004ff122                              }
004ff106                          }
004ff0e6                      }
004ff0c6                  }
004ff0a6              }
004ff084          }
004ff17c      }
004ff17c      
004ff182      class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
004ff182      
004ff18a      if (GameTime::current_game_time_1 != 0)
004ff192          GameTime::Pack(GameTime::current_game_time_1, esi, &arg3);
004ff192      
004ff19b      if (arg3 >= 4)
004ff19b      {
004ff1a2          **(uint32_t**)esi = this_1->m_pNext;
004ff1ac          uint32_t eax_28 = (arg3 - 4);
004ff1ae          *(uint32_t*)esi += 4;
004ff1b0          arg3 = eax_28;
004ff19b      }
004ff19b      
004ff1b8      if ((this_1->m_pNext & 0x10) != 0)
004ff1c3          SkyDesc::Pack(this_1->m_pMaintainer, esi, &arg3);
004ff1c3      
004ff1cc      if ((this_1->m_pNext & 1) != 0)
004ff1d7          CSoundDesc::Pack(this_1->m_numLinks, esi, &arg3);
004ff1d7      
004ff1e1      if ((this_1->m_pNext & 2) != 0)
004ff1e1      {
004ff1ee          int32_t ebp_1 = *(uint32_t*)(this_1->m_DID.id + 8);
004ff1ee          
004ff1f1          if (arg3 >= 4)
004ff1f1          {
004ff1f5              **(uint32_t**)esi = ebp_1;
004ff1ff              uint32_t eax_31 = (arg3 - 4);
004ff201              *(uint32_t*)esi += 4;
004ff203              arg3 = eax_31;
004ff1f1          }
004ff1f1          
004ff207          int32_t ebx = 0;
004ff207          
004ff20b          if (ebp_1 > 0)
004ff20b          {
004ff2a5              do
004ff2a5              {
004ff21d                  int32_t edi_1 = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)this_2->m_DID.id + (ebx << 2)) + 0x10);
004ff21d                  
004ff222                  if (edi_1 != 0)
004ff222                  {
004ff24f                      int32_t m_numLinks = this_2->m_numLinks;
004ff252                      int32_t ecx_54 = *(uint32_t*)(m_numLinks + 8);
004ff255                      int32_t eax_33 = 0;
004ff255                      
004ff259                      if (ecx_54 > 0)
004ff259                      {
004ff25b                          int32_t* edx_31 = *(uint32_t*)m_numLinks;
004ff25b                          
004ff26a                          do
004ff26a                          {
004ff262                              if (edi_1 == *(uint32_t*)edx_31)
004ff262                              {
004ff273                                  if (arg3 >= 4)
004ff273                                  {
004ff277                                      **(uint32_t**)esi = eax_33;
004ff282                                      uint32_t eax_35 = (arg3 - 4);
004ff285                                      *(uint32_t*)esi += 4;
004ff287                                      arg3 = eax_35;
004ff273                                  }
004ff273                                  
004ff273                                  break;
004ff262                              }
004ff262                              
004ff264                              eax_33 += 1;
004ff265                              edx_31 = &edx_31[1];
004ff26a                          } while (eax_33 < ecx_54);
004ff259                      }
004ff222                  }
004ff222                  else if (arg3 >= 4)
004ff22f                  {
004ff233                      **(uint32_t**)esi = 0xffffffff;
004ff241                      uint32_t ecx_52 = (arg3 - 4);
004ff243                      *(uint32_t*)esi += 4;
004ff245                      arg3 = ecx_52;
004ff22f                  }
004ff22f                  
004ff29d                  CSceneType::pack(*(uint32_t*)(*(uint32_t*)this_2->m_DID.id + (ebx << 2)), esi, &arg3);
004ff2a2                  ebx += 1;
004ff2a5              } while (ebx < ebp_1);
004ff20b          }
004ff20b          
004ff2ab          this_1 = this_2;
004ff1e1      }
004ff1e1      
004ff2b7      CSceneDesc::pack_size(this_1->m_DID.id);
004ff2bf      int32_t eax_37 = *(uint32_t*)(this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c) + 0xc);
004ff2bf      
004ff2ca      if (arg3 >= 4)
004ff2ca      {
004ff2ce          **(uint32_t**)esi = eax_37;
004ff2d8          uint32_t ecx_63 = (arg3 - 4);
004ff2da          *(uint32_t*)esi += 4;
004ff2dc          arg3 = ecx_63;
004ff2ca      }
004ff2ca      
004ff2e4      arg2 = nullptr;
004ff2e4      
004ff2e8      if (eax_37 > 0)
004ff2e8      {
004ff2ee          void** edi_2 = nullptr;
004ff2ee          
004ff3ea          do
004ff3ea          {
004ff2fa              class AC1Legacy::PStringBase<char>* ebx_1 = *(uint32_t*)(*(uint32_t*)(this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c) + 4) + (edi_2 << 2));
004ff301              uint32_t eax_39 = AC1Legacy::PStringBase<char>::Pack(ebx_1, esi, arg3);
004ff30a              uint32_t ecx_67 = (arg3 - eax_39);
004ff313              arg3 = ecx_67;
004ff313              
004ff317              if (ecx_67 >= 4)
004ff317              {
004ff31e                  **(uint32_t**)esi = *(int32_t*)((char*)ebx_1 + 4);
004ff328                  uint32_t eax_42 = (arg3 - 4);
004ff32a                  *(uint32_t*)esi += 4;
004ff32c                  arg3 = eax_42;
004ff317              }
004ff317              
004ff334              int32_t eax_43 = *(int32_t*)((char*)ebx_1 + 0x10);
004ff334              
004ff33b              if (arg3 >= 4)
004ff33b              {
004ff33f                  **(uint32_t**)esi = eax_43;
004ff349                  uint32_t ecx_73 = (arg3 - 4);
004ff34b                  *(uint32_t*)esi += 4;
004ff34d                  arg3 = ecx_73;
004ff33b              }
004ff33b              
004ff351              int32_t ebp_4 = 0;
004ff351              
004ff355              if (eax_43 > 0)
004ff355              {
004ff3d5                  do
004ff3d5                  {
004ff363                      int32_t edi_3 = *(uint32_t*)(*(int32_t*)((char*)ebx_1 + 8) + (ebp_4 << 2));
004ff363                      
004ff368                      if (edi_3 != 0)
004ff368                      {
004ff395                          uint32_t id = this_2->m_DID.id;
004ff398                          int32_t ecx_78 = *(uint32_t*)(id + 8);
004ff39b                          int32_t eax_44 = 0;
004ff39b                          
004ff39f                          if (ecx_78 > 0)
004ff39f                          {
004ff3a1                              int32_t* edx_42 = *(uint32_t*)id;
004ff3a1                              
004ff3ad                              do
004ff3ad                              {
004ff3a5                                  if (edi_3 == *(uint32_t*)edx_42)
004ff3a5                                  {
004ff3b6                                      if (arg3 >= 4)
004ff3b6                                      {
004ff3ba                                          **(uint32_t**)esi = eax_44;
004ff3c5                                          uint32_t eax_46 = (arg3 - 4);
004ff3c8                                          *(uint32_t*)esi += 4;
004ff3ca                                          arg3 = eax_46;
004ff3b6                                      }
004ff3b6                                      
004ff3b6                                      break;
004ff3a5                                  }
004ff3a5                                  
004ff3a7                                  eax_44 += 1;
004ff3a8                                  edx_42 = &edx_42[1];
004ff3ad                              } while (eax_44 < ecx_78);
004ff39f                          }
004ff368                      }
004ff368                      else if (arg3 >= 4)
004ff375                      {
004ff379                          **(uint32_t**)esi = 0xffffffff;
004ff387                          uint32_t ecx_77 = (arg3 - 4);
004ff389                          *(uint32_t*)esi += 4;
004ff38b                          arg3 = ecx_77;
004ff375                      }
004ff375                      
004ff3d2                      ebp_4 += 1;
004ff3d5                  } while (ebp_4 < eax_43);
004ff3d5                  
004ff3d7                  edi_2 = arg2;
004ff355              }
004ff355              
004ff3df              this_1 = this_2;
004ff3e3              edi_2 += 1;
004ff3e6              arg2 = edi_2;
004ff3ea          } while (edi_2 < eax_37);
004ff2e8      }
004ff2e8      
004ff3fb      uint32_t eax_50 = LandSurf::Pack(*(uint32_t*)this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c), esi, &arg3);
004ff3fb      
004ff403      if (eax_50 == 0)
004ff40b          return eax_50;
004ff40b      
004ff411      CTerrainDesc::pack_size(this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c));
004ff411      
004ff41c      if ((*(uint8_t*)((char*)((int16_t)this_1->m_pNext))[1] & 2) != 0)
004ff427          RegionMisc::Pack(this_1->minimize_pal, esi, &arg3);
004ff427      
004ff436      return eax;
004feef0  }

004ff35d                                                                                         8d 49 00                               .I.
004ff439                                                                             90 90 90 90 90 90 90                           .......

004ff440  int32_t __thiscall CRegionDesc::UnPack(class CRegionDesc* this, void** arg2, uint32_t arg3)

004ff440  {
004ff447      class CRegionDesc* this_1 = this;
004ff44c      void* __offset(CRegionDesc, -0x30) ecx = ((char*)this_1 - 0x30);
004ff451      class CRegionDesc* this_2 = this_1;
004ff457      *(uint32_t*)(*(int32_t*)((char*)this_1 + -0x30) + 0x3c)();
004ff45a      uint32_t eax_1 = arg3;
004ff460      void** esi = arg2;
004ff460      
004ff463      if (eax_1 >= 4)
004ff463      {
004ff469          this_1->m_bLoaded*(int32_t*)((char*)this_1 + 8) = **(uint32_t**)esi;
004ff46e          eax_1 -= 4;
004ff471          void* ecx_3 = (*(uint32_t*)esi + 4);
004ff477          *(uint32_t*)esi = ecx_3;
004ff479          arg3 = eax_1;
004ff479          
004ff47c          if (eax_1 >= 4)
004ff47c          {
004ff480              this_1->m_timeStamp = *(uint32_t*)ecx_3;
004ff488              eax_1 -= 4;
004ff48b              *(uint32_t*)esi += 4;
004ff48d              arg3 = eax_1;
004ff47c          }
004ff463      }
004ff463      
004ff490      int32_t ecx_5 = this_1->m_timeStamp;
004ff490      
004ff496      if (ecx_5 == 3)
004ff496      {
004ff4de          if (AC1Legacy::PStringBase<char>::UnPack(&*(int32_t*)((char*)this_1 + 0xc), esi, eax_1) != 0)
004ff4de          {
004ff4e5              int32_t eax_6 = (*(uint32_t*)(*(int32_t*)((char*)this_1 + 0xc) + 8) - 1);
004ff4e6              int32_t ecx_7 = 0;
004ff4e6              
004ff4ed              if (eax_6 >= 0xffff)
004ff4ef                  ecx_7 = 4;
004ff4ef              
004ff4fa              int32_t eax_8 = (((ecx_7 + eax_6) + 2) & 3);
004ff4fd              int32_t ecx_8;
004ff4fd              
004ff4fd              if (eax_8 == 0)
004ff508                  ecx_8 = 0;
004ff4fd              else
004ff504                  ecx_8 = (4 - eax_8);
004ff504              
004ff50f              uint32_t edi_3 = (arg3 - (ecx_8 + ((ecx_7 + eax_6) + 2)));
004ff514              arg3 = edi_3;
004ff514              
004ff517              if (edi_3 >= 4)
004ff517              {
004ff51b                  edi_3 -= 4;
004ff51e                  void* eax_10 = (*(uint32_t*)esi + 4);
004ff524                  *(uint32_t*)esi = eax_10;
004ff526                  arg3 = edi_3;
004ff526                  
004ff529                  if (edi_3 >= 4)
004ff529                  {
004ff52b                      edi_3 -= 4;
004ff534                      *(uint32_t*)esi = ((char*)eax_10 + 4);
004ff536                      arg3 = edi_3;
004ff536                      
004ff539                      if (edi_3 >= 4)
004ff539                      {
004ff53b                          edi_3 -= 4;
004ff544                          *(uint32_t*)esi = ((char*)eax_10 + 8);
004ff546                          arg3 = edi_3;
004ff546                          
004ff549                          if (edi_3 >= 4)
004ff549                          {
004ff54b                              edi_3 -= 4;
004ff554                              *(uint32_t*)esi = ((char*)eax_10 + 0xc);
004ff556                              arg3 = edi_3;
004ff556                              
004ff559                              if (edi_3 >= 4)
004ff559                              {
004ff55b                                  edi_3 -= 4;
004ff564                                  *(uint32_t*)esi = ((char*)eax_10 + 0x10);
004ff566                                  arg3 = edi_3;
004ff566                                  
004ff569                                  if (edi_3 >= 4)
004ff569                                  {
004ff56b                                      edi_3 -= 4;
004ff574                                      *(uint32_t*)esi = ((char*)eax_10 + 0x14);
004ff576                                      arg3 = edi_3;
004ff576                                      
004ff579                                      if (edi_3 >= 4)
004ff579                                      {
004ff57b                                          edi_3 -= 4;
004ff584                                          *(uint32_t*)esi = ((char*)eax_10 + 0x18);
004ff586                                          arg3 = edi_3;
004ff586                                          
004ff589                                          if (edi_3 >= 4)
004ff589                                          {
004ff58e                                              edi_3 -= 4;
004ff591                                              *(uint32_t*)esi = ((char*)eax_10 + 0x1c);
004ff593                                              arg3 = edi_3;
004ff589                                          }
004ff579                                      }
004ff569                                  }
004ff559                              }
004ff549                          }
004ff539                      }
004ff529                  }
004ff517              }
004ff517              
004ff59b              _chkstk();
004ff5c2              int32_t __saved_edi;
004ff5c2              
004ff5c2              for (int32_t i = 0; i < 0x100; i += 1)
004ff5c2              {
004ff5a7                  if (edi_3 >= 4)
004ff5a7                  {
004ff5ad                      &__saved_edi[i] = **(uint32_t**)esi;
004ff5b0                      *(uint32_t*)esi += 4;
004ff5b6                      edi_3 = (arg3 - 4);
004ff5b9                      arg3 = edi_3;
004ff5a7                  }
004ff5c2              }
004ff5c2              
004ff5c5              LandDefs::set_height_table(&__saved_edi);
004ff5cf              void* eax_19 = operator new(0x88);
004ff5cf              
004ff5d9              if (eax_19 != 0)
004ff5d9              {
004ff5dd                  class GameTime* eax_20 = GameTime::GameTime(eax_19);
004ff5dd                  
004ff5e6                  if ((eax_20 != 0 && GameTime::UnPack(eax_20, esi, &arg3) != 0))
004ff5e6                  {
004ff5f8                      class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
004ff5f8                      
004ff600                      if (GameTime::current_game_time_1 != 0)
004ff600                      {
004ff604                          GameTime::~GameTime(GameTime::current_game_time_1);
004ff60a                          operator delete(GameTime::current_game_time_1);
004ff60f                          this_1 = this_2;
004ff600                      }
004ff600                      
004ff615                      GameTime::current_game_time = eax_20;
004ff5e6                  }
004ff5d9              }
004ff5d9              
004ff625              if (arg3 >= 4)
004ff625              {
004ff62b                  uint32_t ecx_14 = arg3;
004ff62e                  this_1->m_pNext = **(uint32_t**)esi;
004ff637                  *(uint32_t*)esi += 4;
004ff639                  arg3 = (ecx_14 - 4);
004ff625              }
004ff625              
004ff640              if ((this_1->m_pNext & 0x10) != 0)
004ff640              {
004ff644                  void* eax_22 = operator new(0x28);
004ff64e                  class SkyDesc* eax_23;
004ff64e                  
004ff64e                  if (eax_22 == 0)
004ff659                      eax_23 = nullptr;
004ff64e                  else
004ff652                      eax_23 = SkyDesc::SkyDesc(eax_22);
004ff652                  
004ff662                  this_1->m_pMaintainer = eax_23;
004ff66a                  arg2 = SkyDesc::UnPack(eax_23, esi, &arg3);
004ff640              }
004ff640              
004ff678              if (((this_1->m_pNext & 1) != 0 && arg2 != 0))
004ff678              {
004ff67c                  void* eax_26 = operator new(0xc);
004ff686                  class CSoundDesc* eax_27;
004ff686                  
004ff686                  if (eax_26 == 0)
004ff691                      eax_27 = nullptr;
004ff686                  else
004ff68a                      eax_27 = CSoundDesc::CSoundDesc(eax_26);
004ff68a                  
004ff69a                  this_1->m_numLinks = eax_27;
004ff6a2                  arg2 = CSoundDesc::UnPack(eax_27, esi, &arg3);
004ff678              }
004ff678              
004ff6a9              uint32_t i_3;
004ff6a9              
004ff6a9              if ((this_1->m_pNext & 2) != 0)
004ff6a9              {
004ff6b4                  if (arg2 == 0)
004ff6b4                  {
004ff967                  label_4ff967:
004ff967                      void* eax_86 = operator new(0x18);
004ff967                      
004ff973                      if (eax_86 == 0)
004ff994                          eax_86 = nullptr;
004ff973                      else
004ff973                      {
004ff975                          *(uint32_t*)eax_86 = 0;
004ff977                          *(uint32_t*)((char*)eax_86 + 4) = 0x600127d;
004ff97e                          *(uint32_t*)((char*)eax_86 + 8) = 0x6000261;
004ff985                          *(uint32_t*)((char*)eax_86 + 0xc) = 4;
004ff98c                          *(uint32_t*)((char*)eax_86 + 0x10) = 0;
004ff98f                          *(uint32_t*)((char*)eax_86 + 0x14) = 0;
004ff973                      }
004ff973                      
004ff99e                      bool cond:11 = (0x200 & this_1->m_pNext) == 0;
004ff9a0                      this_1->minimize_pal = eax_86;
004ff9a0                      
004ff9aa                      if ((cond:11 || arg2 == 0))
004ff9aa                      {
004ff8f0                          ADJ(ecx)->m_pNext |= 0x200;
004ff9d8                          return arg2;
004ff9aa                      }
004ff9aa                      
004ff9b3                      RegionMisc::UnPack(eax_86, esi, &arg3);
004ff9c3                      return arg2;
004ff6b4                  }
004ff6b4                  
004ff6bc                  void* eax_30 = operator new(0xc);
004ff6c6                  class IDClass<_tagDataID,32,0> eax_31;
004ff6c6                  
004ff6c6                  if (eax_30 == 0)
004ff6d1                      eax_31 = 0;
004ff6c6                  else
004ff6ca                      eax_31 = CSoundDesc::CSoundDesc(eax_30);
004ff6ca                  
004ff6d3                  this_1->m_DID.id = eax_31;
004ff6da                  uint32_t i_5;
004ff6da                  
004ff6da                  if (arg3 < 4)
004ff6f3                      i_5 = i_3;
004ff6da                  else
004ff6da                  {
004ff6dc                      void* eax_32 = *(uint32_t*)esi;
004ff6de                      i_5 = *(uint32_t*)eax_32;
004ff6e3                      *(uint32_t*)esi = ((char*)eax_32 + 4);
004ff6eb                      i_3 = i_5;
004ff6ee                      arg3 -= 4;
004ff6da                  }
004ff6da                  
004ff6fa                  AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(this_1->m_DID.id, i_5);
004ff701                  int32_t var_c_1 = 0;
004ff701                  
004ff708                  if (i_5 > 0)
004ff708                  {
004ff70e                      uint32_t ebx_1 = arg3;
004ff78b                      bool cond:14_1;
004ff78b                      
004ff78b                      do
004ff78b                      {
004ff713                          void* eax_36 = operator new(0x14);
004ff71d                          class CSceneType* edi_6;
004ff71d                          
004ff71d                          if (eax_36 == 0)
004ff72a                              edi_6 = nullptr;
004ff71d                          else
004ff726                              edi_6 = CSceneType::CSceneType(eax_36);
004ff726                          
004ff736                          if (arg3 >= 4)
004ff736                          {
004ff738                              uint32_t* eax_39 = *(uint32_t*)esi;
004ff73a                              ebx_1 = *(uint32_t*)eax_39;
004ff73e                              *(uint32_t*)esi = &eax_39[1];
004ff740                              arg3 -= 4;
004ff736                          }
004ff736                          
004ff746                          if (ebx_1 != 0xffffffff)
004ff75c                              edi_6->sound_table_desc = *(uint32_t*)(*(uint32_t*)this_2->m_numLinks + (ebx_1 << 2));
004ff746                          else
004ff748                              edi_6->sound_table_desc = nullptr;
004ff748                          
004ff766                          CSceneType::unpack(edi_6, esi, &arg3);
004ff77a                          CSceneDesc::Add(this_2->m_DID.id, edi_6);
004ff786                          cond:14_1 = (var_c_1 + 1) < i_3;
004ff788                          var_c_1 += 1;
004ff78b                      } while (cond:14_1);
004ff78d                      this_1 = this_2;
004ff708                  }
004ff708                  
004ff6da                  goto label_4ff793;
004ff6a9              }
004ff6a9              
004ff793          label_4ff793:
004ff793              
004ff795              if (arg2 == 0)
004ff795                  goto label_4ff967;
004ff795              
004ff79d              void* eax_46 = operator new(0x10);
004ff7a7              int32_t eax_47;
004ff7a7              
004ff7a7              if (eax_46 == 0)
004ff7b2                  eax_47 = 0;
004ff7a7              else
004ff7ab                  eax_47 = Box2D::Box2D(eax_46);
004ff7ab              
004ff7b4              this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c) = eax_47;
004ff7bb              uint32_t var_20;
004ff7bb              uint32_t edi_7;
004ff7bb              
004ff7bb              if (arg3 < 4)
004ff7d4                  edi_7 = var_20;
004ff7bb              else
004ff7bb              {
004ff7bd                  void* eax_48 = *(uint32_t*)esi;
004ff7bf                  edi_7 = *(uint32_t*)eax_48;
004ff7c4                  *(uint32_t*)esi = ((char*)eax_48 + 4);
004ff7cc                  var_20 = edi_7;
004ff7cf                  arg3 -= 4;
004ff7bb              }
004ff7bb              
004ff7de              AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow((this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c) + 4), edi_7);
004ff7e5              int32_t var_c_2 = 0;
004ff7e5              
004ff7ec              if (edi_7 > 0)
004ff7ec              {
004ff927                  bool cond:17_1;
004ff927                  
004ff927                  do
004ff927                  {
004ff7f4                      void* eax_52 = operator new(0x14);
004ff7fe                      class AC1Legacy::PStringBase<char>* ebx_2;
004ff7fe                      
004ff7fe                      if (eax_52 == 0)
004ff80b                          ebx_2 = nullptr;
004ff7fe                      else
004ff807                          ebx_2 = CTerrainType::CTerrainType(eax_52);
004ff807                      
004ff81e                      if (AC1Legacy::PStringBase<char>::UnPack(ebx_2, esi, arg3) == 0)
004ff4cd                          return 0;
004ff4cd                      
004ff829                      int32_t eax_57 = (ebx_2->m_buffer->m_len - 1);
004ff82a                      int32_t ecx_33 = 0;
004ff82a                      
004ff831                      if (eax_57 >= 0xffff)
004ff833                          ecx_33 = 4;
004ff833                      
004ff83e                      int32_t eax_59 = (((ecx_33 + eax_57) + 2) & 3);
004ff841                      int32_t ecx_34;
004ff841                      
004ff841                      if (eax_59 == 0)
004ff84c                          ecx_34 = 0;
004ff841                      else
004ff848                          ecx_34 = (4 - eax_59);
004ff848                      
004ff853                      uint32_t eax_61 = (arg3 - (ecx_34 + ((ecx_33 + eax_57) + 2)));
004ff858                      arg3 = eax_61;
004ff858                      
004ff85b                      if (eax_61 >= 4)
004ff85b                      {
004ff861                          *(int32_t*)((char*)ebx_2 + 4) = **(uint32_t**)esi;
004ff869                          uint32_t ecx_37 = (arg3 - 4);
004ff86c                          int32_t* eax_64 = (*(uint32_t*)esi + 4);
004ff872                          *(uint32_t*)esi = eax_64;
004ff874                          arg3 = ecx_37;
004ff874                          
004ff877                          if (ecx_37 >= 4)
004ff877                          {
004ff879                              uint32_t i_4 = *(uint32_t*)eax_64;
004ff87e                              *(uint32_t*)esi = &eax_64[1];
004ff886                              i_3 = i_4;
004ff889                              arg3 -= 4;
004ff877                          }
004ff85b                      }
004ff85b                      
004ff895                      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&ebx_2[2], i_3);
004ff895                      
004ff89f                      if (i_3 > 0)
004ff89f                      {
004ff8a1                          uint32_t i_2 = i_3;
004ff90a                          uint32_t i_1;
004ff90a                          
004ff90a                          do
004ff90a                          {
004ff8ae                              int32_t var_14;
004ff8ae                              
004ff8ae                              if (arg3 >= 4)
004ff8ae                              {
004ff8b0                                  int32_t* eax_70 = *(uint32_t*)esi;
004ff8b2                                  int32_t edx_16 = *(uint32_t*)eax_70;
004ff8b6                                  *(uint32_t*)esi = &eax_70[1];
004ff8bd                                  var_14 = edx_16;
004ff8c0                                  arg3 -= 4;
004ff8ae                              }
004ff8ae                              
004ff8c7                              int32_t ebx_3;
004ff8c7                              
004ff8c7                              if (var_14 != 0xffffffff)
004ff8d8                                  ebx_3 = *(uint32_t*)(*(uint32_t*)this_2->m_DID.id + (var_14 << 2));
004ff8c7                              else
004ff8c9                                  ebx_3 = 0;
004ff8c9                              
004ff8db                              class AC1Legacy::PStringBase<char> eax_76 = *(int32_t*)((char*)ebx_2 + 0xc);
004ff8e1                              int32_t eax_78;
004ff8e1                              
004ff8e1                              if (*(int32_t*)((char*)ebx_2 + 0x10) >= eax_76)
004ff8e1                              {
004ff8e5                                  uint32_t eax_77;
004ff8e5                                  
004ff8e5                                  if (eax_76 <= 0)
004ff8eb                                      eax_77 = 8;
004ff8e5                                  else
004ff8e7                                      eax_77 = (eax_76 * 2);
004ff8e7                                  
004ff8f3                                  eax_78 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&ebx_2[2], eax_77);
004ff8e1                              }
004ff8e1                              
004ff8fa                              if ((*(int32_t*)((char*)ebx_2 + 0x10) < eax_76 || eax_78 != 0))
004ff8fa                              {
004ff901                                  *(uint32_t*)(*(int32_t*)((char*)ebx_2 + 8) + (*(int32_t*)((char*)ebx_2 + 0x10) << 2)) = ebx_3;
004ff904                                  *(int32_t*)((char*)ebx_2 + 0x10) += 1;
004ff8fa                              }
004ff8fa                              
004ff907                              i_1 = i_2;
004ff907                              i_2 -= 1;
004ff90a                          } while (i_1 != 1);
004ff89f                      }
004ff89f                      
004ff916                      CTerrainDesc::Add(this_2->m_AllowedInFreeList*(int32_t*)((char*)this_2 + 0x2c), ebx_2);
004ff922                      cond:17_1 = (var_c_2 + 1) < var_20;
004ff924                      var_c_2 += 1;
004ff927                  } while (cond:17_1);
004ff92d                  this_1 = this_2;
004ff7ec              }
004ff7ec              
004ff932              void* eax_82 = operator new(0x2c);
004ff93c              int32_t eax_83;
004ff93c              
004ff93c              if (eax_82 == 0)
004ff947                  eax_83 = 0;
004ff93c              else
004ff940                  eax_83 = LandSurf::LandSurf(eax_82);
004ff940              
004ff94c              *(uint32_t*)this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c) = eax_83;
004ff94c              
004ff95f              if (LandSurf::UnPack(*(uint32_t*)this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c), esi, &arg3) != 0)
004ff95f                  goto label_4ff967;
004ff4de          }
004ff496      }
004ff496      else
004ff496      {
004ff498          if (ecx_5 > 3)
004ff498          {
004ff49f              PopupError("Error: The data files have a mor…");
004ff4b2              return 0;
004ff498          }
004ff498          
004ff4ba          PopupError("Error: The executable has a more…");
004ff496      }
004ff496      
004ff4cd      return 0;
004ff440  }

004ff9db                                                                                   90 90 90 90 90                             .....

004ff9e0  void* __thiscall CRegionDesc::`scalar deleting destructor'(class CRegionDesc* this, uint32_t arg2)

004ff9e0  {
004ff9e4      this->vtable = 0x7c6000;
004ff9ea      this->vtable = &CRegionDesc::`vftable';
004ff9f1      CRegionDesc::Destroy(this);
004ff9f6      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->region_name.m_buffer;
004ff9f6      
004ffa09      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
004ffa0b          m_buffer->vtable->__vecDelDtor(1);
004ffa0b      
004ffa15      this->vtable = &PackObj::`vftable';
004ffa1c      DBObj::~DBObj(this);
004ffa1c      
004ffa26      if ((arg2 & 1) != 0)
004ffa29          operator delete(this);
004ffa29      
004ffa35      return this;
004ff9e0  }

004ffa38                                                                          90 90 90 90 90 90 90 90                          ........

004ffa40  void __stdcall PalShift::CleanupSurface(class PalShift* this @ ecx, class CSurface* arg2)

004ffa40  {
004ffa47      if (arg2 != 0)
004ffa47      {
004ffa4d          Palette::releasePalette(arg2->base1pal);
004ffa53          CSurface::releaseCustomSurface(arg2);
004ffa47      }
004ffa40  }

004ffa5f                                                                                               90                                 .

004ffa60  uint32_t __stdcall PalShift::GetBeginRotIx(class PalShift* this @ ecx, int32_t arg2, int32_t arg3, uint32_t* arg4, int32_t arg5)

004ffa60  {
004ffa64      uint32_t ecx = 0xffffffff;
004ffa67      int32_t result = 0;
004ffa67      
004ffa6b      if (arg5 == 0)
004ffae7          return _ftol2();
004ffae7      
004ffa72      uint32_t edx = *(uint32_t*)arg4;
004ffa72      
004ffa77      if (edx < 0xffffffff)
004ffa79          ecx = edx;
004ffa79      
004ffa7b      uint32_t edx_1 = arg4[1];
004ffa7b      
004ffa80      if (edx_1 < ecx)
004ffa80      {
004ffa82          ecx = edx_1;
004ffa84          result = 1;
004ffa80      }
004ffa80      
004ffa89      uint32_t edx_2 = arg4[2];
004ffa89      
004ffa8e      if (edx_2 < ecx)
004ffa8e      {
004ffa90          ecx = edx_2;
004ffa92          result = 2;
004ffa8e      }
004ffa8e      
004ffa9b      if (arg4[3] >= ecx)
004ffaec          return result;
004ffaec      
004ffaa2      return 3;
004ffa60  }

004ffaef                                               90                                                                 .

004ffaf0  int32_t PackObj::ALIGN_PTR(void** arg1, uint32_t* arg2)

004ffaf0  {
004ffaf6      void* ecx_1 = (*(uint32_t*)arg1 & 0x80000003);
004ffaf6      bool cond:1 = ecx_1 == 0;
004ffaf6      
004ffafd      if (ecx_1 < 0)
004ffafd      {
004ffb00          void* ecx_3 = (((char*)ecx_1 - 1) | 0xfffffffc);
004ffb03          ecx_1 = ((char*)ecx_3 + 1);
004ffb03          cond:1 = ecx_3 == 0xffffffff;
004ffafd      }
004ffafd      
004ffb04      if (!(cond:1))
004ffb04      {
004ffb0f          void* i_1 = (4 - ecx_1);
004ffb11          uint32_t ecx_4 = *(uint32_t*)arg2;
004ffb11          
004ffb15          if (ecx_4 < i_1)
004ffb1a              return 0;
004ffb1a          
004ffb1f          *(uint32_t*)arg2 = (ecx_4 - i_1);
004ffb1f          
004ffb21          if (i_1 > 0)
004ffb21          {
004ffb2e              void* i;
004ffb2e              
004ffb2e              do
004ffb2e              {
004ffb25                  **(uint8_t**)arg1 = 0;
004ffb2b                  i = i_1;
004ffb2b                  i_1 -= 1;
004ffb2c                  *(uint32_t*)arg1 += 1;
004ffb2e              } while (i != 1);
004ffb21          }
004ffb04      }
004ffb04      
004ffb36      return 1;
004ffaf0  }

004ffb37                                                                       90 90 90 90 90 90 90 90 90                         .........

004ffb40  void __fastcall Subpalette::Subpalette(class Subpalette* this)

004ffb40  {
004ffb42      this->vtable = 0x7c3674;
004ffb4e      this->subID.id = INVALID_DID.id;
004ffb53      this->offset = 0;
004ffb56      this->numcolors = 0;
004ffb59      this->prev = nullptr;
004ffb5c      this->next = nullptr;
004ffb40  }


004ffb60  void __fastcall PalShift::PalShift(class PalShift* this)

004ffb60  {
004ffb64      this->land_tex.m_data = 0;
004ffb67      this->land_tex.m_size = 0;
004ffb6a      this->land_tex.m_num = 0;
004ffb6d      this->sub_pals = nullptr;
004ffb60  }

004ffb71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

004ffb80  void __thiscall PalShift::MakeSubPal(class PalShift* this, uint32_t* arg2, class Subpalette** arg3, uint32_t arg4, class IDClass<_tagDataID,32,0>* arg5, uint32_t arg6)

004ffb80  {
004ffb89      class Subpalette** ebp = arg3;
004ffb98      uint32_t m_num = this->land_tex.m_data[this->cur_tex]->sub_pal.m_num;
004ffb9b      *(uint32_t*)arg2 = m_num;
004ffb9d      class Subpalette* ecx_1 = *(uint32_t*)ebp;
004ffb9d      
004ffba3      if (ecx_1 == 0)
004ffba3      {
004ffba5          this->maxsubs = m_num;
004ffba8          uint32_t edi_1 = *(uint32_t*)arg2;
004ffbb5          void* eax_2 = operator new[](((edi_1 * 0x18) + 4));
004ffbb5          
004ffbbf          if (eax_2 == 0)
004ffc36              *(uint32_t*)ebp = nullptr;
004ffbbf          else
004ffbbf          {
004ffbc7              *(uint32_t*)eax_2 = edi_1;
004ffbd3              `vector constructor iterator'(((char*)eax_2 + 4), 0x18, edi_1, Subpalette::Subpalette);
004ffc36              *(uint32_t*)ebp = ((char*)eax_2 + 4);
004ffbbf          }
004ffba3      }
004ffba3      else if (m_num > this->maxsubs)
004ffbe1      {
004ffbeb          if (ecx_1->vtable == 0)
004ffbf6              operator delete[](((char*)ecx_1 - 4));
004ffbeb          else
004ffbed              ecx_1->vtable->__vecDelDtor(3);
004ffbed          
004ffbfe          uint32_t edi_2 = *(uint32_t*)arg2;
004ffc0b          uint32_t* eax_7 = operator new[](((edi_2 * 0x18) + 4));
004ffc0b          
004ffc15          if (eax_7 == 0)
004ffc36              *(uint32_t*)ebp = nullptr;
004ffc15          else
004ffc15          {
004ffc1d              *(uint32_t*)eax_7 = edi_2;
004ffc29              `vector constructor iterator'(&eax_7[1], 0x18, edi_2, Subpalette::Subpalette);
004ffc36              *(uint32_t*)ebp = &eax_7[1];
004ffc15          }
004ffbe1      }
004ffbe1      
004ffc49      int32_t id = arg5[(arg4 & 3)].id;
004ffc56      int32_t id_1 = arg5[((arg4 + 1) & 3)].id;
004ffc6a      int32_t id_2 = arg5[((arg4 - 2) & 3)].id;
004ffc71      int32_t id_3 = arg5[((arg4 - 1) & 3)].id;
004ffc77      int32_t eax_10 = 0;
004ffc7b      int32_t var_4 = *(int32_t*)((char*)arg5 + 0x10);
004ffc7b      
004ffc7f      if (*(uint32_t*)arg2 > 0)
004ffc7f      {
004ffc81          int32_t ecx_9 = 0;
004ffc81          
004ffcaf          while (true)
004ffcaf          {
004ffcaf              *(uint32_t*)(&*(uint32_t*)ebp->subID + ecx_9) = &id[this->land_tex.m_data[this->cur_tex]->road_code.m_data[arg6]->sub_pal_type[eax_10]];
004ffcc7              void* edx_21 = (*(uint32_t*)ebp + ecx_9);
004ffcc9              *(uint32_t*)((char*)edx_21 + 8) = this->land_tex.m_data[this->cur_tex]->sub_pal.m_data[eax_10]->sub_pal_index;
004ffcde              *(uint32_t*)((char*)edx_21 + 0xc) = this->land_tex.m_data[this->cur_tex]->sub_pal.m_data[eax_10]->sub_pal_length;
004ffce3              eax_10 += 1;
004ffce4              ecx_9 += 0x18;
004ffce4              
004ffce9              if (eax_10 >= *(uint32_t*)arg2)
004ffce9                  break;
004ffce9              
004ffc85              ebp = arg3;
004ffcaf          }
004ffc7f      }
004ffb80  }

004ffcf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

004ffd00  int32_t __thiscall PalShift::CheckTerrain(class PalShift* this, uint32_t arg2, class IDClass<_tagDataID,32,0>* arg3)

004ffd00  {
004ffd04      class IDClass<_tagDataID,32,0>* ebx = arg3;
004ffd14      int32_t m_num = this->land_tex.m_data[this->cur_tex]->terrain_pal.m_num;
004ffd1d      void* edi = (0x7c614c - ebx);
004ffd1f      int32_t var_8 = 0;
004ffd27      void* var_4 = edi;
004ffd27      
004ffd39      while (true)
004ffd39      {
004ffd39          int32_t esi_1 = 0;
004ffd3b          int32_t eax_4 = ((arg2 >> ((int8_t)*(uint32_t*)((char*)edi + ebx))) & 0x1f);
004ffd3b          
004ffd40          if (m_num > 0)
004ffd40          {
004ffd5e              do
004ffd5e              {
004ffd4d                  int32_t* ecx_5 = this->land_tex.m_data[this->cur_tex]->terrain_pal.m_data[esi_1];
004ffd52                  bool cond:0_1 = eax_4 == *(uint32_t*)ecx_5;
004ffd57                  ebx->id = ecx_5[1];
004ffd57                  
004ffd59                  if (cond:0_1)
004ffd59                      break;
004ffd59                  
004ffd5b                  esi_1 += 1;
004ffd5e              } while (esi_1 < m_num);
004ffd5e              
004ffd60              edi = var_4;
004ffd40          }
004ffd40          
004ffd66          if (esi_1 == m_num)
004ffd66              break;
004ffd66          
004ffd6d          ebx = &ebx[1];
004ffd70          bool cond:1_1 = (var_8 + 1) < 4;
004ffd73          var_8 += 1;
004ffd73          
004ffd77          if (!(cond:1_1))
004ffd77          {
004ffd7d              int32_t eax_7 = 0;
004ffd7d              
004ffd85              if ((arg2 & 0xc000000) != 0)
004ffd87                  eax_7 = 1;
004ffd87              
004ffd8c              int32_t eax_8 = (eax_7 << 1);
004ffd8c              
004ffd94              if ((arg2 & 0x3000000) != 0)
004ffd96                  eax_8 += 1;
004ffd96              
004ffd97              int32_t eax_9 = (eax_8 << 1);
004ffd97              
004ffd9f              if ((arg2 & 0xc00000) != 0)
004ffda1                  eax_9 += 1;
004ffda1              
004ffda2              int32_t eax_10 = (eax_9 << 1);
004ffda2              
004ffdaa              if ((arg2 & 0x300000) != 0)
004ffdac                  eax_10 += 1;
004ffdac              
004ffdaf              int32_t ecx_8;
004ffdaf              
004ffdaf              if (eax_10 != 0)
004ffdaf              {
004ffdb1                  ecx_8 = 0;
004ffdb1                  
004ffdb5                  if (m_num > 0)
004ffdb5                  {
004ffdd9                      do
004ffdd9                      {
004ffdc2                          int32_t* eax_14 = this->land_tex.m_data[this->cur_tex]->terrain_pal.m_data[ecx_8];
004ffdc7                          bool cond:2_1 = *(uint32_t*)eax_14 == 0x20;
004ffdd1                          *(int32_t*)((char*)arg3 + 0x10) = eax_14[1];
004ffdd1                          
004ffdd4                          if (cond:2_1)
004ffdd4                              break;
004ffdd4                          
004ffdd6                          ecx_8 += 1;
004ffdd9                      } while (ecx_8 < m_num);
004ffdb5                  }
004ffdaf              }
004ffdaf              
004ffddd              if ((eax_10 == 0 || ecx_8 != m_num))
004ffdf7                  return 1;
004ffdf7              
004ffd94              break;
004ffd77          }
004ffd39      }
004ffd39      
004ffde8      return 0;
004ffd00  }

004ffd2d                                         8d 49 00                                                               .I.
004ffdfa                                                                                90 90 90 90 90 90                            ......

004ffe00  int32_t __thiscall PalShift::CheckRot(class PalShift* this, uint32_t arg2, uint32_t* arg3)

004ffe00  {
004ffe05      int32_t esi = 0;
004ffe05      
004ffe0d      if ((arg2 & 0xc000000) != 0)
004ffe0f          esi = 1;
004ffe0f      
004ffe14      int32_t esi_1 = (esi << 1);
004ffe14      
004ffe1b      if ((arg2 & 0x3000000) != 0)
004ffe1d          esi_1 += 1;
004ffe1d      
004ffe1e      int32_t esi_2 = (esi_1 << 1);
004ffe1e      
004ffe25      if ((arg2 & 0xc00000) != 0)
004ffe27          esi_2 += 1;
004ffe27      
004ffe28      int32_t esi_3 = (esi_2 << 1);
004ffe28      
004ffe2f      if ((arg2 & 0x300000) != 0)
004ffe31          esi_3 += 1;
004ffe31      
004ffe37      void* edx_1 = this->land_tex.m_data[this->cur_tex];
004ffe3a      int32_t ecx_1 = *(uint32_t*)((char*)edx_1 + 0x18);
004ffe3d      uint32_t eax = 0;
004ffe3d      
004ffe41      if (ecx_1 > 0)
004ffe41      {
004ffe43          int32_t** edx_2 = *(uint32_t*)((char*)edx_1 + 0x10);
004ffe43          
004ffe52          do
004ffe52          {
004ffe4a              if (**(uint32_t**)edx_2 == esi_3)
004ffe4a              {
004ffe61                  *(uint32_t*)arg3 = eax;
004ffe68                  return 1;
004ffe4a              }
004ffe4a              
004ffe4c              eax += 1;
004ffe4d              edx_2 = &edx_2[1];
004ffe52          } while (eax < ecx_1);
004ffe41      }
004ffe41      
004ffe58      return 0;
004ffe00  }

004ffe6b                                   90 90 90 90 90                                                             .....

004ffe70  uint32_t __fastcall PalShift::pack_size(class PalShift* this)

004ffe70  {
004ffe70      uint32_t m_num_2 = this->land_tex.m_num;
004ffe75      void* result = 4;
004ffe75      
004ffe7a      if (m_num_2 > 0)
004ffe7a      {
004ffe7f          class PalShiftTex** m_data = this->land_tex.m_data;
004ffe82          uint32_t ebx_1 = m_num_2;
004ffeb2          uint32_t i;
004ffeb2          
004ffeb2          do
004ffeb2          {
004ffe84              class PalShiftTex* ecx = *(uint32_t*)m_data;
004ffe86              uint32_t m_num_1 = ecx->sub_pal.m_num;
004ffe8b              void* esi_1 = 8;
004ffe8b              
004ffe90              if (m_num_1 > 0)
004ffe92                  esi_1 = ((m_num_1 << 3) + 8);
004ffe92              
004ffe9e              uint32_t m_num = ecx->terrain_pal.m_num;
004ffea3              void* edx_2 = (((char*)esi_1 + (((m_num_1 + 1) * ecx->road_code.m_num) << 2)) + 8);
004ffea3              
004ffea7              if (m_num > 0)
004ffea9                  edx_2 += (m_num << 3);
004ffea9              
004ffeac              result += edx_2;
004ffeae              m_data = &m_data[1];
004ffeb1              i = ebx_1;
004ffeb1              ebx_1 -= 1;
004ffeb2          } while (i != 1);
004ffe7a      }
004ffe7a      
004ffeb7      return result;
004ffe70  }

004ffeb8                                                                          90 90 90 90 90 90 90 90                          ........

004ffec0  void __fastcall PalShiftTex::Destroy(class PalShiftTex* this)

004ffec0  {
004ffeca      int32_t i = 0;
004ffeca      
004ffece      if (this->sub_pal.m_num > 0)
004ffece      {
004ffeee          do
004ffeee          {
004ffed3              int32_t* eax_2 = this->sub_pal.m_data[i];
004ffed3              
004ffed8              if (eax_2 != 0)
004ffed8              {
004ffedb                  *(uint32_t*)eax_2 = 0;
004ffedd                  eax_2[1] = 0;
004ffee0                  operator delete(eax_2);
004ffed8              }
004ffed8              
004ffeeb              i += 1;
004ffeee          } while (i < this->sub_pal.m_num);
004ffece      }
004ffece      
004ffef5      this->sub_pal.m_num = 0;
004ffef8      this->sub_pal.m_size = 0;
004ffefb      operator delete[](this->sub_pal.m_data);
004fff00      this->sub_pal.m_data = 0;
004fff09      int32_t i_1 = 0;
004fff09      
004fff0d      if (this->road_code.m_num > 0)
004fff0d      {
004fff3e          do
004fff3e          {
004fff13              int32_t* edi = this->road_code.m_data[i_1];
004fff13              
004fff18              if (edi != 0)
004fff18              {
004fff1a                  void* eax_5 = edi[1];
004fff1a                  
004fff1f                  if (eax_5 != 0)
004fff22                      operator delete[](eax_5);
004fff22                  
004fff2b                  edi[1] = 0;
004fff2e                  *(uint32_t*)edi = 0;
004fff30                  operator delete(edi);
004fff18              }
004fff18              
004fff3b              i_1 += 1;
004fff3e          } while (i_1 < this->road_code.m_num);
004fff0d      }
004fff0d      
004fff44      this->road_code.m_num = 0;
004fff47      this->road_code.m_size = 0;
004fff4a      operator delete[](this->road_code.m_data);
004fff4f      this->road_code.m_data = 0;
004fff58      int32_t i_2 = 0;
004fff58      
004fff5d      if (this->terrain_pal.m_num > 0)
004fff5d      {
004fff88          do
004fff88          {
004fff63              int32_t* eax_9 = this->terrain_pal.m_data[i_2];
004fff63              
004fff68              if (eax_9 != 0)
004fff68              {
004fff6a                  *(uint32_t*)eax_9 = 0x1f;
004fff77                  eax_9[1] = INVALID_DID.id;
004fff7a                  operator delete(eax_9);
004fff68              }
004fff68              
004fff85              i_2 += 1;
004fff88          } while (i_2 < this->terrain_pal.m_num);
004fff5d      }
004fff5d      
004fff8e      this->terrain_pal.m_num = 0;
004fff91      this->terrain_pal.m_size = 0;
004fff94      operator delete[](this->terrain_pal.m_data);
004fff9d      this->terrain_pal.m_data = 0;
004ffec0  }

004fffa3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

004fffb0  uint32_t __thiscall PalShiftTex::Pack(class PalShiftTex* this, void** arg2, uint32_t* arg3)

004fffb0  {
004fffb0      uint32_t* edx = arg3;
004fffb0      
004fffc1      if (*(uint32_t*)edx >= 4)
004fffc1      {
004fffc7          **(uint32_t**)arg2 = this->tex_gid.id;
004fffc9          *(uint32_t*)arg2 += 4;
004fffcc          *(uint32_t*)edx -= 4;
004fffc1      }
004fffc1      
004fffd2      uint32_t m_num_1 = this->sub_pal.m_num;
004fffd2      
004fffd9      if (*(uint32_t*)edx >= 4)
004fffd9      {
004fffdd          **(uint32_t**)arg2 = m_num_1;
004fffdf          *(uint32_t*)arg2 += 4;
004fffe2          *(uint32_t*)edx -= 4;
004fffd9      }
004fffd9      
004fffe5      int32_t ebx = 0;
004fffe5      
004fffe9      if (m_num_1 > 0)
004fffe9      {
00500059          do
00500059          {
004ffff6              int32_t* esi_3 = this->sub_pal.m_data[ebx];
004ffff6              
004ffff9              if (*(uint32_t*)edx >= 4)
004ffff9              {
004fffff                  **(uint32_t**)arg2 = *(uint32_t*)esi_3;
00500001                  *(uint32_t*)arg2 += 4;
00500006                  uint32_t ebp_3 = (*(uint32_t*)edx - 4);
0050000e                  *(uint32_t*)edx = ebp_3;
0050000e                  
00500010                  if (ebp_3 >= 4)
00500010                  {
00500017                      **(uint32_t**)arg2 = esi_3[1];
00500019                      *(uint32_t*)arg2 += 4;
0050001c                      *(uint32_t*)edx -= 4;
00500010                  }
004ffff9              }
004ffff9              
00500021              void* edi_7 = (*(uint32_t*)arg2 & 0x80000003);
00500021              bool cond:6_1 = edi_7 == 0;
00500021              
00500027              if (edi_7 < 0)
00500027              {
0050002a                  void* edi_9 = (((char*)edi_7 - 1) | 0xfffffffc);
0050002d                  edi_7 = ((char*)edi_9 + 1);
0050002d                  cond:6_1 = edi_9 == 0xffffffff;
00500027              }
00500027              
0050002e              if (!(cond:6_1))
0050002e              {
00500035                  void* i_3 = (4 - edi_7);
00500037                  uint32_t edi_10 = *(uint32_t*)edx;
00500037                  
0050003b                  if (edi_10 >= i_3)
0050003b                  {
00500041                      *(uint32_t*)edx = (edi_10 - i_3);
00500041                      
00500043                      if (i_3 > 0)
00500043                      {
00500050                          void* i;
00500050                          
00500050                          do
00500050                          {
00500047                              **(uint8_t**)arg2 = 0;
0050004d                              i = i_3;
0050004d                              i_3 -= 1;
0050004e                              *(uint32_t*)arg2 += 1;
00500050                          } while (i != 1);
00500043                      }
0050003b                  }
0050002e              }
0050002e              
00500056              ebx += 1;
00500059          } while (ebx < m_num_1);
004fffe9      }
004fffe9      
0050005e      uint32_t m_num = this->road_code.m_num;
00500061      arg3 = m_num;
00500061      
00500065      if (*(uint32_t*)edx >= 4)
00500065      {
00500069          **(uint32_t**)arg2 = m_num;
0050006b          *(uint32_t*)arg2 += 4;
0050006e          *(uint32_t*)edx -= 4;
00500065      }
00500065      
00500071      int32_t edi_13 = 0;
00500071      
00500075      if (m_num > 0)
00500075      {
005000c3          do
005000c3          {
0050007a              if (*(uint32_t*)edx >= 4)
0050007a              {
00500086                  **(uint32_t**)arg2 = this->road_code.m_data[edi_13]->road_code;
00500089                  *(uint32_t*)arg2 += 4;
0050008c                  *(uint32_t*)edx -= 4;
0050007a              }
0050007a              
00500092              int32_t i_1 = 0;
00500092              
00500096              if (this->sub_pal.m_num > 0)
00500096              {
005000ba                  do
005000ba                  {
0050009b                      if (*(uint32_t*)edx >= 4)
0050009b                      {
005000ab                          **(uint32_t**)arg2 = this->road_code.m_data[edi_13]->sub_pal_type[i_1];
005000ae                          *(uint32_t*)arg2 += 4;
005000b1                          *(uint32_t*)edx -= 4;
0050009b                      }
0050009b                      
005000b7                      i_1 += 1;
005000ba                  } while (i_1 < this->sub_pal.m_num);
005000ba                  
005000bc                  m_num = arg3;
00500096              }
00500096              
005000c0              edi_13 += 1;
005000c3          } while (edi_13 < m_num);
00500075      }
00500075      
005000c8      uint32_t m_num_2 = this->terrain_pal.m_num;
005000c8      
005000cf      if (*(uint32_t*)edx >= 4)
005000cf      {
005000d3          **(uint32_t**)arg2 = m_num_2;
005000d5          *(uint32_t*)arg2 += 4;
005000d8          *(uint32_t*)edx -= 4;
005000cf      }
005000cf      
005000db      int32_t ebx_6 = 0;
005000db      
005000df      if (m_num_2 > 0)
005000df      {
0050014a          do
0050014a          {
005000e7              int32_t* esi_11 = this->terrain_pal.m_data[ebx_6];
005000e7              
005000ea              if (*(uint32_t*)edx >= 4)
005000ea              {
005000f0                  **(uint32_t**)arg2 = *(uint32_t*)esi_11;
005000f2                  *(uint32_t*)arg2 += 4;
005000f7                  uint32_t ebp_11 = (*(uint32_t*)edx - 4);
005000ff                  *(uint32_t*)edx = ebp_11;
005000ff                  
00500101                  if (ebp_11 >= 4)
00500101                  {
00500108                      **(uint32_t**)arg2 = esi_11[1];
0050010a                      *(uint32_t*)arg2 += 4;
0050010d                      *(uint32_t*)edx -= 4;
00500101                  }
005000ea              }
005000ea              
00500112              void* edi_19 = (*(uint32_t*)arg2 & 0x80000003);
00500112              bool cond:10_1 = edi_19 == 0;
00500112              
00500118              if (edi_19 < 0)
00500118              {
0050011b                  void* edi_21 = (((char*)edi_19 - 1) | 0xfffffffc);
0050011e                  edi_19 = ((char*)edi_21 + 1);
0050011e                  cond:10_1 = edi_21 == 0xffffffff;
00500118              }
00500118              
0050011f              if (!(cond:10_1))
0050011f              {
00500126                  void* i_4 = (4 - edi_19);
00500128                  uint32_t edi_22 = *(uint32_t*)edx;
00500128                  
0050012c                  if (edi_22 >= i_4)
0050012c                  {
00500132                      *(uint32_t*)edx = (edi_22 - i_4);
00500132                      
00500134                      if (i_4 > 0)
00500134                      {
00500141                          void* i_2;
00500141                          
00500141                          do
00500141                          {
00500138                              **(uint8_t**)arg2 = 0;
0050013e                              i_2 = i_4;
0050013e                              i_4 -= 1;
0050013f                              *(uint32_t*)arg2 += 1;
00500141                          } while (i_2 != 1);
00500134                      }
0050012c                  }
0050011f              }
0050011f              
00500147              ebx_6 += 1;
0050014a          } while (ebx_6 < m_num_2);
005000df      }
005000df      
00500152      return *(uint32_t*)edx;
004fffb0  }

004fffed                                         8d 49 00                                                               .I.
00500155                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00500160  void __thiscall PalShift::GetSubDataIDs(class PalShift const* this, class QualifiedDataIDArray* arg2)

00500160  {
00500171      class PalShift* this_1 = this;
00500175      int32_t var_20 = 0;
00500175      
0050017d      if (this->land_tex.m_num > 0)
0050017d      {
00500197          while (true)
00500197          {
00500197              int32_t* esi_1 = this->land_tex.m_data[var_20];
0050019a              class IDClass<_tagDataID,32,0> eax_2 = *(uint32_t*)esi_1;
005001a2              void var_18;
005001a2              
005001a2              if (eax_2 != INVALID_DID.id)
005001b5                  QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, eax_2, 0), 8);
005001bd              int32_t i = 0;
005001bd              
005001c1              if (esi_1[9] > 0)
005001c1              {
005001f0                  do
005001f0                  {
005001c9                      class IDClass<_tagDataID,32,0> eax_6 = *(uint32_t*)(*(uint32_t*)(esi_1[7] + (i << 2)) + 4);
005001d2                      void var_10;
005001d2                      
005001d2                      if (eax_6 != INVALID_DID.id)
005001e5                          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, eax_6, 0), 8);
005001ed                      i += 1;
005001f0                  } while (i < esi_1[9]);
005001c1              }
005001c1              
005001fe              bool cond:1_1 = (var_20 + 1) < this_1->land_tex.m_num;
00500200              var_20 += 1;
00500200              
00500204              if (!(cond:1_1))
00500204                  break;
00500204              
00500188              this = this_1;
00500197          }
0050017d      }
00500160  }

0050020f                                               90                                                                 .

00500210  uint32_t __thiscall PalShift::SelectRot(class PalShift* this, int32_t arg2, int32_t arg3, enum LandDefs::Rotation* arg4, uint32_t* arg5, uint32_t arg6, class IDClass<_tagDataID,32,0>* arg7, uint32_t* arg8, int32_t arg9)

00500210  {
00500216      int32_t esi = arg3;
0050025c      this->land_tex;
00500257      this->land_tex;
00500269      uint32_t eax_4 = _ftol2();
00500272      uint32_t ebp = eax_4;
00500278      uint32_t var_8 = ebp;
00500278      
005002e4      do
005002e4      {
00500284          this->cur_tex = ebp;
00500284          
00500293          if (PalShift::CheckTerrain(this, *(uint32_t*)arg5, arg7) != 0)
00500293          {
005002a3              uint32_t eax_8 = PalShift::GetBeginRotIx(this, arg2, esi, arg5, arg9);
005002aa              uint32_t esi_1 = eax_8;
005002aa              
005002ca              do
005002ca              {
005002c2                  if (PalShift::CheckRot(this, arg5[esi_1], arg8) != 0)
005002c2                  {
00500307                      *(uint32_t*)arg4 = esi_1;
00500312                      return arg5[esi_1];
005002c2                  }
005002c2                  
005002c5                  esi_1 = ((esi_1 + 1) & 3);
005002ca              } while (esi_1 != eax_8);
005002ca              
005002d3              uint32_t temp1_1 = (COMBINE(0, (var_8 + 1)) % this->land_tex.m_num);
005002d6              esi = arg3;
005002da              var_8 = temp1_1;
005002de              ebp = temp1_1;
00500293          }
005002e4      } while (ebp != eax_4);
005002e4      
005002ea      this->cur_tex = 0;
005002f2      *(uint32_t*)arg4 = ROT_0;
005002ff      return *(uint32_t*)arg5;
00500210  }

00500315                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00500320  class CSurface* __thiscall PalShift::MakeNewSurface(class PalShift* this, uint32_t arg2, uint32_t arg3, class IDClass<_tagDataID,32,0>* arg4, uint32_t arg5)

00500320  {
0050032d      class IDClass<_tagDataID,32,0> id = this->land_tex.m_data[this->cur_tex]->tex_gid.id;
00500345      PalShift::MakeSubPal(this, &arg5, &this->sub_pals, arg3, arg4, arg5);
0050034a      class Palette* eax_3 = Palette::makeModifiedPalette();
0050034a      
00500353      if (eax_3 != 0)
0050035f          Palette::Modify(eax_3, arg5, this->sub_pals);
0050035f      
00500366      class CSurface* result = CSurface::makeCustomSurface(SH_PALSHIFT);
00500375      CSurface::UseTextureMap(result, id, 1);
0050037d      CSurface::UsePalette(result, eax_3);
00500386      CSurface::InitEnd(result, SurfaceInitObjDescChange);
00500390      return result;
00500320  }

00500393                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005003a0  uint32_t __thiscall PalShift::Pack(class PalShift* this, void** arg2, uint32_t* arg3)

005003a0  {
005003a0      class PalShift* this_2 = this;
005003a2      uint32_t m_num = this->land_tex.m_num;
005003b3      class PalShift* this_1 = this;
005003b3      
005003b7      if (*(uint32_t*)arg3 >= 4)
005003b7      {
005003bc          **(uint32_t**)arg2 = m_num;
005003be          *(uint32_t*)arg2 += 4;
005003c2          *(uint32_t*)arg3 -= 4;
005003b7      }
005003b7      
005003c5      int32_t esi = 0;
005003c5      
005003c9      if (m_num > 0)
005003c9      {
005003d9          while (true)
005003d9          {
005003d9              PalShiftTex::Pack(this->land_tex.m_data[esi], arg2, arg3);
005003de              esi += 1;
005003de              
005003e1              if (esi >= m_num)
005003e1                  break;
005003e1              
005003cd              this = this_1;
005003d9          }
005003c9      }
005003c9      
005003ea      return *(uint32_t*)arg3;
005003a0  }

005003ed                                         90 90 90                                                               ...

005003f0  int32_t __thiscall PalShiftTex::UnPack(class PalShiftTex* this, void** arg2, uint32_t* arg3)

005003f0  {
005003f0      class PalShiftTex* this_1 = this;
005003f4      void** esi = arg2;
005003f9      uint32_t* edi = arg3;
00500400      class PalShiftTex* this_2 = this;
00500402      class PalShiftTex* this_3 = this_2;
00500402      
00500406      if (*(uint32_t*)edi >= 4)
00500406      {
00500408          void* eax_1 = *(uint32_t*)esi;
0050040a          int32_t ecx = *(uint32_t*)eax_1;
0050040f          *(uint32_t*)esi = ((char*)eax_1 + 4);
00500411          *(uint32_t*)edi -= 4;
00500414          this_2->tex_gid.id = ecx;
00500406      }
00500406      
00500419      uint32_t* ebp;
00500419      
00500419      if ((*(uint32_t*)edi < 4 || *(uint32_t*)edi < 4))
00500431          ebp = arg3;
00500419      else
00500419      {
0050041b          void* eax_3 = *(uint32_t*)esi;
0050041d          ebp = *(uint32_t*)eax_3;
00500422          *(uint32_t*)esi = ((char*)eax_3 + 4);
00500429          arg3 = ebp;
0050042d          *(uint32_t*)edi -= 4;
00500419      }
00500419      
00500437      if (ebp > 0)
00500437      {
00500441          AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this_2->sub_pal, ebp);
00500441          
00500448          if (ebp > 0)
00500448          {
00500451              arg2 = ebp;
005004fd              void** i;
005004fd              
005004fd              do
005004fd              {
00500457                  void* eax_7 = operator new(8);
0050045c                  void* ebp_1 = nullptr;
0050045c                  
00500463                  if (eax_7 != 0)
00500463                  {
00500465                      *(uint32_t*)eax_7 = 0;
00500467                      *(uint32_t*)((char*)eax_7 + 4) = 0;
0050046a                      ebp_1 = eax_7;
00500463                  }
00500463                  
0050046f                  if (*(uint32_t*)edi >= 4)
0050046f                  {
00500475                      *(uint32_t*)ebp_1 = **(uint32_t**)esi;
00500478                      *(uint32_t*)esi += 4;
0050047d                      uint32_t ecx_4 = (*(uint32_t*)edi - 4);
00500485                      *(uint32_t*)edi = ecx_4;
00500485                      
00500487                      if (ecx_4 >= 4)
00500487                      {
0050048d                          *(uint32_t*)((char*)ebp_1 + 4) = **(uint32_t**)esi;
00500490                          *(uint32_t*)esi += 4;
00500493                          *(uint32_t*)edi -= 4;
00500487                      }
0050046f                  }
0050046f                  
00500498                  void* ecx_6 = (*(uint32_t*)esi & 0x80000003);
00500498                  bool cond:2_1 = ecx_6 == 0;
00500498                  
0050049e                  if (ecx_6 < 0)
0050049e                  {
005004a1                      void* ecx_8 = (((char*)ecx_6 - 1) | 0xfffffffc);
005004a4                      ecx_6 = ((char*)ecx_8 + 1);
005004a4                      cond:2_1 = ecx_8 == 0xffffffff;
0050049e                  }
0050049e                  
005004a5                  if (!(cond:2_1))
005004a5                  {
005004ac                      void* j_3 = (4 - ecx_6);
005004ae                      uint32_t ecx_9 = *(uint32_t*)edi;
005004ae                      
005004b2                      if (ecx_9 >= j_3)
005004b2                      {
005004b8                          *(uint32_t*)edi = (ecx_9 - j_3);
005004b8                          
005004ba                          if (j_3 > 0)
005004ba                          {
005004cb                              void* j;
005004cb                              
005004cb                              do
005004cb                              {
005004c2                                  **(uint8_t**)esi = 0;
005004c8                                  j = j_3;
005004c8                                  j_3 -= 1;
005004c9                                  *(uint32_t*)esi += 1;
005004cb                              } while (j != 1);
005004ba                          }
005004b2                      }
005004a5                  }
005004a5                  
005004cd                  uint32_t m_size = this_2->sub_pal.m_size;
005004d3                  int32_t eax_12;
005004d3                  
005004d3                  if (this_2->sub_pal.m_num >= m_size)
005004d3                  {
005004d7                      uint32_t eax_11;
005004d7                      
005004d7                      if (m_size <= 0)
005004dd                          eax_11 = 8;
005004d7                      else
005004d9                          eax_11 = (m_size * 2);
005004d9                      
005004e5                      eax_12 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this_2->sub_pal, eax_11);
005004d3                  }
005004d3                  
005004ec                  if ((this_2->sub_pal.m_num < m_size || eax_12 != 0))
005004ec                  {
0050044e                      this_2->sub_pal.m_data[this_2->sub_pal.m_num] = ebp_1;
0050044e                      this_2->sub_pal.m_num += 1;
005004ec                  }
005004ec                  
005004f9                  i = arg2;
005004f9                  arg2 -= 1;
005004fd              } while (i != 1);
00500503              this_2 = this_3;
00500507              ebp = arg3;
00500448          }
00500437      }
00500437      
0050050e      if (*(uint32_t*)edi >= 4)
0050050e      {
00500510          void* eax_14 = *(uint32_t*)esi;
00500512          uint32_t* ecx_13 = *(uint32_t*)eax_14;
00500517          *(uint32_t*)esi = ((char*)eax_14 + 4);
0050051e          arg3 = ecx_13;
00500522          *(uint32_t*)edi -= 4;
00500524          ebp = ecx_13;
0050050e      }
0050050e      
0050052a      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this_2->road_code, ebp);
0050052a      
00500531      if (ebp > 0)
00500531      {
00500537          uint32_t* ebx_1 = arg3;
0050053b          arg2 = ebp;
005005e7          void** i_1;
005005e7          
005005e7          do
005005e7          {
00500542              void* eax_18 = operator new(8);
00500547              void* ebp_2 = nullptr;
00500547              
0050054e              if (eax_18 != 0)
0050054e              {
00500550                  *(uint32_t*)eax_18 = 0;
00500552                  *(uint32_t*)((char*)eax_18 + 4) = 0;
00500555                  ebp_2 = eax_18;
0050054e              }
0050054e              
0050055a              if (*(uint32_t*)edi >= 4)
0050055a              {
00500560                  *(uint32_t*)ebp_2 = **(uint32_t**)esi;
00500563                  *(uint32_t*)esi += 4;
00500566                  *(uint32_t*)edi -= 4;
0050055a              }
0050055a              
00500581              *(uint32_t*)((char*)ebp_2 + 4) = operator new[]((this_3->sub_pal.m_num << 2));
0050058a              int32_t j_1 = 0;
0050058a              
0050058e              if (this_3->sub_pal.m_num > 0)
0050058e              {
005005ad                  do
005005ad                  {
00500593                      if (*(uint32_t*)edi >= 4)
00500593                      {
00500595                          uint32_t** eax_23 = *(uint32_t*)esi;
00500597                          ebx_1 = *(uint32_t*)eax_23;
0050059c                          *(uint32_t*)esi = &eax_23[1];
0050059e                          *(uint32_t*)edi -= 4;
00500593                      }
00500593                      
005005a4                      *(uint32_t*)(*(uint32_t*)((char*)ebp_2 + 4) + (j_1 << 2)) = ebx_1;
005005aa                      j_1 += 1;
005005ad                  } while (j_1 < this_3->sub_pal.m_num);
0050058e              }
0050058e              
005005af              uint32_t m_size_1 = this_3->road_code.m_size;
005005af              
005005b8              if (this_3->road_code.m_num < m_size_1)
005005b8              {
005005d8                  this_3->road_code.m_data[this_3->road_code.m_num] = ebp_2;
005005d8                  this_3->road_code.m_num += 1;
005005b8              }
005005b8              else
005005b8              {
005005bc                  uint32_t eax_27;
005005bc                  
005005bc                  if (m_size_1 <= 0)
005005c2                      eax_27 = 8;
005005bc                  else
005005be                      eax_27 = (m_size_1 * 2);
005005be                  
005005cf                  if (AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this_3->road_code, eax_27) != 0)
005005cf                  {
005005d8                      this_3->road_code.m_data[this_3->road_code.m_num] = ebp_2;
005005d8                      this_3->road_code.m_num += 1;
005005cf                  }
005005b8              }
005005b8              
005005e3              i_1 = arg2;
005005e3              arg2 -= 1;
005005e7          } while (i_1 != 1);
005005ed          this_2 = this_3;
005005f1          ebp = arg3;
00500531      }
00500531      
005005f8      if (*(uint32_t*)edi >= 4)
005005f8      {
005005fa          void* eax_30 = *(uint32_t*)esi;
005005fc          uint32_t* ecx_18 = *(uint32_t*)eax_30;
00500601          *(uint32_t*)esi = ((char*)eax_30 + 4);
00500608          arg3 = ecx_18;
0050060c          *(uint32_t*)edi -= 4;
0050060e          ebp = ecx_18;
005005f8      }
005005f8      
00500612      if (ebp > 0)
00500612      {
0050061c          AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this_2->terrain_pal, ebp);
0050061c          
00500623          if (ebp > 0)
00500623          {
0050062c              arg3 = ebp;
005006e2              uint32_t* i_2;
005006e2              
005006e2              do
005006e2              {
00500632                  void* eax_34 = operator new(8);
00500637                  void* ebp_3 = nullptr;
00500637                  
0050063e                  if (eax_34 != 0)
0050063e                  {
00500640                      *(uint32_t*)eax_34 = 0x1f;
00500646                      *(uint32_t*)((char*)eax_34 + 4) = 0;
00500649                      ebp_3 = eax_34;
0050063e                  }
0050063e                  
0050064e                  if (*(uint32_t*)edi >= 4)
0050064e                  {
00500650                      void* eax_35 = *(uint32_t*)esi;
00500652                      void** edx_9 = *(uint32_t*)eax_35;
00500657                      *(uint32_t*)esi = ((char*)eax_35 + 4);
0050065e                      arg2 = edx_9;
00500662                      *(uint32_t*)edi -= 4;
0050064e                  }
0050064e                  
00500668                  *(uint32_t*)ebp_3 = arg2;
00500668                  
0050066e                  if (*(uint32_t*)edi >= 4)
0050066e                  {
00500670                      void* eax_40 = *(uint32_t*)esi;
00500672                      int32_t ecx_20 = *(uint32_t*)eax_40;
00500677                      *(uint32_t*)esi = ((char*)eax_40 + 4);
00500679                      *(uint32_t*)edi -= 4;
0050067c                      *(uint32_t*)((char*)ebp_3 + 4) = ecx_20;
0050066e                  }
0050066e                  
00500681                  void* ecx_22 = (*(uint32_t*)esi & 0x80000003);
00500681                  bool cond:6_1 = ecx_22 == 0;
00500681                  
00500687                  if (ecx_22 < 0)
00500687                  {
0050068a                      void* ecx_24 = (((char*)ecx_22 - 1) | 0xfffffffc);
0050068d                      ecx_22 = ((char*)ecx_24 + 1);
0050068d                      cond:6_1 = ecx_24 == 0xffffffff;
00500687                  }
00500687                  
0050068e                  if (!(cond:6_1))
0050068e                  {
00500695                      void* j_4 = (4 - ecx_22);
00500697                      uint32_t ecx_25 = *(uint32_t*)edi;
00500697                      
0050069b                      if (ecx_25 >= j_4)
0050069b                      {
005006a1                          *(uint32_t*)edi = (ecx_25 - j_4);
005006a1                          
005006a3                          if (j_4 > 0)
005006a3                          {
005006b0                              void* j_2;
005006b0                              
005006b0                              do
005006b0                              {
005006a7                                  **(uint8_t**)esi = 0;
005006ad                                  j_2 = j_4;
005006ad                                  j_4 -= 1;
005006ae                                  *(uint32_t*)esi += 1;
005006b0                              } while (j_2 != 1);
005006a3                          }
0050069b                      }
0050068e                  }
0050068e                  
005006b2                  uint32_t m_size_2 = this_2->terrain_pal.m_size;
005006b8                  int32_t eax_43;
005006b8                  
005006b8                  if (this_2->terrain_pal.m_num >= m_size_2)
005006b8                  {
005006bc                      uint32_t eax_42;
005006bc                      
005006bc                      if (m_size_2 <= 0)
005006c2                          eax_42 = 8;
005006bc                      else
005006be                          eax_42 = (m_size_2 * 2);
005006be                      
005006ca                      eax_43 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this_2->terrain_pal.m_data, eax_42);
005006b8                  }
005006b8                  
005006d1                  if ((this_2->terrain_pal.m_num < m_size_2 || eax_43 != 0))
005006d1                  {
00500629                      this_2->terrain_pal.m_data[this_2->terrain_pal.m_num] = ebp_3;
00500629                      this_2->terrain_pal.m_num += 1;
005006d1                  }
005006d1                  
005006de                  i_2 = arg3;
005006de                  arg3 -= 1;
005006e2              } while (i_2 != 1);
00500623          }
00500612      }
00500612      
005006f2      return 1;
005003f0  }

005006f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00500700  void __fastcall PalShift::Destroy(class PalShift* this)

00500700  {
0050070a      int32_t i = 0;
0050070a      
0050070e      if (this->land_tex.m_num > 0)
0050070e      {
0050074c          do
0050074c          {
00500714              void* edi_1 = this->land_tex.m_data[i];
00500714              
00500719              if (edi_1 != 0)
00500719              {
0050071d                  PalShiftTex::Destroy(edi_1);
00500726                  operator delete[](*(uint32_t*)((char*)edi_1 + 0x1c));
0050072f                  operator delete[](*(uint32_t*)((char*)edi_1 + 0x10));
00500738                  operator delete[](*(uint32_t*)((char*)edi_1 + 4));
0050073e                  operator delete(edi_1);
00500719              }
00500719              
00500749              i += 1;
0050074c          } while (i < this->land_tex.m_num);
0050070e      }
0050070e      
00500753      this->land_tex.m_num = 0;
00500756      this->land_tex.m_size = 0;
00500759      operator delete[](this->land_tex.m_data);
0050075e      this->land_tex.m_data = 0;
00500761      class Subpalette* sub_pals = this->sub_pals;
00500761      
00500769      if (sub_pals != 0)
00500769      {
00500773          if (sub_pals->vtable != 0)
00500773          {
00500775              sub_pals->vtable->__vecDelDtor(3);
0050077b              this->sub_pals = nullptr;
00500781              return;
00500773          }
00500773          
00500783          operator delete[](((char*)sub_pals - 4));
00500769      }
00500769      
0050078b      this->sub_pals = nullptr;
00500700  }

00500792                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005007a0  int32_t __thiscall PalShift::UnPack(class PalShift* this, void** arg2, uint32_t* arg3)

005007a0  {
005007a6      uint32_t* esi = arg3;
005007b4      uint32_t ebp;
005007b4      
005007b4      if (*(uint32_t*)esi < 4)
005007c8          ebp = arg3;
005007b4      else
005007b4      {
005007ba          void* eax_1 = *(uint32_t*)arg2;
005007bc          ebp = *(uint32_t*)eax_1;
005007c1          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
005007c3          *(uint32_t*)esi -= 4;
005007b4      }
005007b4      
005007ce      PalShift::Destroy(this);
005007ce      
005007d7      if (ebp > 0)
005007dd          AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->land_tex, ebp);
005007dd      
005007e4      int32_t var_8 = 0;
005007e4      
005007e8      if (ebp <= 0)
005007f6          return 1;
005007f6      
00500802      while (true)
00500802      {
00500802          void* s = operator new(0x28);
0050080c          void* s_1;
0050080c          
0050080c          if (s == 0)
0050082f              s_1 = nullptr;
0050080c          else
0050080c          {
0050080e              __builtin_memset(s, 0, 0x28);
0050082b              s_1 = s;
0050080c          }
0050080c          
00500839          PalShiftTex::UnPack(s_1, arg2, esi);
00500846          uint32_t m_size = this->land_tex.m_size;
00500851          int32_t eax_6;
00500851          
00500851          if (this->land_tex.m_num >= m_size)
00500851          {
00500855              uint32_t eax_5;
00500855              
00500855              if (m_size <= 0)
0050085b                  eax_5 = 8;
00500855              else
00500857                  eax_5 = (m_size * 2);
00500857              
00500863              uint32_t ecx_7;
00500863              eax_6 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->land_tex, eax_5);
00500851          }
00500851          
0050086a          if ((this->land_tex.m_num < m_size || eax_6 != 0))
0050086a          {
0050084c              this->land_tex.m_data[this->land_tex.m_num] = s_1;
0050084c              this->land_tex.m_num += 1;
0050086a          }
0050086a          
0050087c          bool cond:2_1 = (var_8 + 1) < ebp;
0050087e          var_8 += 1;
0050087e          
00500882          if (!(cond:2_1))
00500882              break;
00500882          
005007f9          esi = arg3;
00500802      }
00500802      
00500894      return 1;
005007a0  }

005008a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005008b0  void __fastcall PalShift::~PalShift(class PalShift* this)

005008b0  {
005008b3      PalShift::Destroy(this);
005008bc      operator delete[](this->land_tex.m_data);
005008b0  }

005008c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005008d0  void __fastcall FileNameDesc::~FileNameDesc(class FileNameDesc* this)

005008d0  {
005008db      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->encounter_type_map.m_buffer;
005008db      
005008ea      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005008ec          m_buffer->vtable->__vecDelDtor(1);
005008ec      
005008f4      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->scene_map.m_buffer;
005008f4      
00500903      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00500905          m_buffer_1->vtable->__vecDelDtor(1);
00500905      
0050090d      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->terrain_map.m_buffer;
0050090d      
0050091c      if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
0050091e          m_buffer_2->vtable->__vecDelDtor(1);
0050091e      
00500926      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->height_map.m_buffer;
00500926      
00500934      if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
00500936          m_buffer_3->vtable->__vecDelDtor(1);
005008d0  }

00500942        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00500950  void __fastcall SkyObject::Destroy(class SkyObject* this)

00500950  {
00500959      operator delete[](this->object_name);
00500965      this->tex_velocity.x = 0;
00500965      this->tex_velocity.y = 0f;
0050096d      __builtin_memset(this, 0, 0x14);
00500965      this->tex_velocity.z = 0f;
00500984      this->default_gfx_object.id = INVALID_DID.id;
0050098d      this->default_pes_object.id = INVALID_DID.id;
00500990      this->properties = 0;
00500993      int32_t var_c = 0;
00500997      int32_t var_8 = 0;
0050099b      int32_t var_4 = 0;
00500950  }

005009a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005009b0  int32_t __thiscall DayGroup::GetTimeOfDay(class DayGroup* this, float arg2, class SkyTimeOfDay** arg3, class SkyTimeOfDay** arg4, float* arg5)

005009b0  {
005009b0      uint32_t m_num = this->sky_time.m_num;
005009b0      
005009b5      if (m_num == 0)
005009b7          return m_num;
005009b7      
005009bf      int32_t i = 0;
005009bf      
005009c3      if ((m_num - 1) > 0)
005009c3      {
005009c8          void* esi_2 = &this->sky_time.m_data[1];
005009c8          
005009e5          do
005009e5          {
005009d2              long double x87_r7_1 = ((long double)**(uint32_t**)esi_2);
005009d4              long double temp1_1 = ((long double)arg2);
005009d4              (x87_r7_1 - temp1_1);
005009d8              float* eax;
005009d8              eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005009d8              
005009dd              if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005009dd                  break;
005009dd              
005009df              i += 1;
005009e0              esi_2 += 4;
005009e5          } while (i < (m_num - 1));
005009c3      }
005009c3      
005009ea      long double x87_r7_2 = ((long double)arg2);
005009f5      *(uint32_t*)arg3 = this->sky_time.m_data[i];
005009fa      class SkyTimeOfDay** m_data = this->sky_time.m_data;
005009fa      
00500a02      if (i == (this->sky_time.m_num - 1))
00500a02      {
00500a0a          *(uint32_t*)arg4 = *(uint32_t*)m_data;
00500a0c          float* eax_3 = *(uint32_t*)arg3;
00500a23          *(uint32_t*)arg5 = ((float)((x87_r7_2 - ((long double)*(uint32_t*)eax_3)) / (((long double)1f) - ((long double)*(uint32_t*)eax_3))));
00500a25          return 1;
00500a02      }
00500a02      
00500a28      float* edx_2 = m_data[(i + 1)];
00500a30      *(uint32_t*)arg4 = edx_2;
00500a32      class SkyTimeOfDay* eax_5 = *(uint32_t*)arg3;
00500a45      *(uint32_t*)arg5 = ((float)((x87_r7_2 - ((long double)eax_5->begin)) / (((long double)*(uint32_t*)edx_2) - ((long double)eax_5->begin))));
00500a47      return 1;
005009b0  }

005009cd                                         8d 49 00                                                               .I.
00500a4a                                90 90 90 90 90 90                                                            ......

00500a50  void __fastcall SkyDesc::SkyDesc(class SkyDesc* this)

00500a50  {
00500a54      this->present_day_group = 0;
00500a56      this->tick_size = 0f;
00500a59      *(uint32_t*)((char*)this->tick_size)[4] = 0x40080000;
00500a60      this->light_tick_size = 0f;
00500a63      *(uint32_t*)((char*)this->light_tick_size)[4] = 0x40340000;
00500a6a      this->day_groups.m_data = 0;
00500a6d      this->day_groups.m_size = 0;
00500a70      this->day_groups.m_num = 0;
00500a50  }

00500a74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00500a80  void __thiscall SkyDesc::GetLighting(class SkyDesc* this, float arg2, float* arg3, class RGBAUnion* arg4, class AC1Legacy::Vector3* arg5, class RGBAUnion* arg6)

00500a80  {
00500aa6      class SkyTimeOfDay* var_14;
00500aa6      class SkyTimeOfDay* var_10;
00500aa6      
00500aa6      if (DayGroup::GetTimeOfDay(this->day_groups.m_data[this->present_day_group], arg2, &var_14, &var_10, &arg2) == 0)
00500aa6      {
00500c86          *(uint32_t*)arg3 = 0.300000012f;
00500c8c          *(uint8_t*)((char*)arg4->__inner0 + 2) = 0xff;
00500c90          *(uint8_t*)((char*)arg4->__inner0 + 1) = 0xff;
00500c94          *(uint8_t*)((char*)arg4->__inner0 + 0) = 0xff;
00500c97          *(uint8_t*)((char*)arg4->__inner0 + 3) = 0xff;
00500c9f          *(uint8_t*)((char*)arg6->__inner0 + 2) = 0xff;
00500ca3          *(uint8_t*)((char*)arg6->__inner0 + 1) = 0xff;
00500ca7          *(uint8_t*)((char*)arg6->__inner0 + 0) = 0xff;
00500caa          *(uint8_t*)((char*)arg6->__inner0 + 3) = 0xff;
00500cba          arg5->x = 0x3f000000;
00500cd4          arg5->y = 0f;
00500cd7          arg5->z = 0.800000012f;
00500cdd          return;
00500aa6      }
00500aa6      
00500ab2      class SkyTimeOfDay* esi = var_14;
00500ab6      long double x87_r7 = ((long double)esi->amb_bright);
00500aba      class SkyTimeOfDay* edi = var_10;
00500ac9      *(uint32_t*)arg3 = ((float)(((((long double)edi->amb_bright) - x87_r7) * ((long double)arg2)) + x87_r7));
00500ad9      arg3 = ((uint32_t)*(uint8_t*)((char*)esi->amb_color.__inner0 + 2));
00500af1      (((long double)((uint32_t)*(uint8_t*)((char*)edi->amb_color.__inner0 + 1))) - ((long double)((uint32_t)*(uint8_t*)((char*)esi->amb_color.__inner0 + 1))));
00500b04      int32_t ebx;
00500b04      ebx = _ftol2();
00500b06      esi->amb_color;
00500b00      edi->amb_color;
00500b22      char eax_5 = _ftol2();
00500b2d      var_10 = ((uint32_t)*(uint8_t*)((char*)edi->amb_color.__inner0 + 2));
00500b31      arg3 = eax_5;
00500b4c      *(uint8_t*)((char*)arg4->__inner0 + 2) = _ftol2();
00500b53      *(uint8_t*)((char*)arg4->__inner0 + 1) = ebx;
00500b56      *(uint8_t*)((char*)arg4->__inner0 + 0) = arg3;
00500b58      *(uint8_t*)((char*)arg4->__inner0 + 3) = 0xff;
00500b5c      long double x87_r7_4 = ((long double)esi->dir_bright);
00500b68      long double x87_r7_5 = (x87_r7_4 + ((((long double)edi->dir_bright) - x87_r7_4) * ((long double)arg2)));
00500b6a      esi->dir_heading;
00500b6d      long double x87_r5_8 = ((long double)esi->dir_pitch);
00500b81      arg3 = ((float)((((((long double)edi->dir_pitch) - x87_r5_8) * ((long double)arg2)) + x87_r5_8) * ((long double)0.017453292519943295)));
00500b92      long double x87_r6_16 = ((x87_r5_8 + ((((long double)edi->dir_heading) - x87_r5_8) * ((long double)arg2))) * ((long double)0.017453292519943295));
00500ba0      long double st0;
00500ba0      bool c2;
00500ba0      st0 = __fcos(((long double)arg3));
00500ba4      long double st0_1;
00500ba4      bool c2_1;
00500ba4      st0_1 = __fsin(x87_r6_16);
00500bac      float var_c = ((float)((st0_1 * x87_r7_5) * st0));
00500bb6      long double st0_2;
00500bb6      bool c2_2;
00500bb6      st0_2 = __fcos(x87_r6_16);
00500bb8      arg5->x = var_c;
00500bc4      float var_8 = ((float)st0);
00500bd0      long double st0_3;
00500bd0      bool c2_3;
00500bd0      st0_3 = __fsin(((long double)arg3));
00500bd2      arg5->y = var_8;
00500bdf      arg5->z = ((float)(x87_r7_5 * st0_3));
00500bee      arg3 = ((uint32_t)*(uint8_t*)((char*)esi->dir_color.__inner0 + 2));
00500c06      (((long double)((uint32_t)*(uint8_t*)((char*)edi->dir_color.__inner0 + 1))) - ((long double)((uint32_t)*(uint8_t*)((char*)esi->dir_color.__inner0 + 1))));
00500c19      ebx = _ftol2();
00500c1b      esi->dir_color;
00500c15      edi->dir_color;
00500c46      arg3 = _ftol2();
00500c3e      edi->dir_color;
00500c61      *(uint8_t*)((char*)arg6->__inner0 + 2) = _ftol2();
00500c68      *(uint8_t*)((char*)arg6->__inner0 + 1) = ebx;
00500c6b      *(uint8_t*)((char*)arg6->__inner0 + 0) = arg3;
00500c6d      *(uint8_t*)((char*)arg6->__inner0 + 3) = 0xff;
00500a80  }


00500ce0  int32_t __thiscall SkyDesc::GetWorldFog(class SkyDesc* this, float arg2, float* arg3, float* arg4, class RGBAUnion* arg5)

00500ce0  {
00500d08      float var_8;
00500d08      class SkyTimeOfDay* var_4;
00500d08      
00500d08      if (DayGroup::GetTimeOfDay(this->day_groups.m_data[this->present_day_group], arg2, &arg2, &var_4, &var_8) != 0)
00500d08      {
00500d0e          float edi_1 = arg2;
00500d0e          
00500d1f          if ((edi_1 != 0 && *(uint32_t*)(edi_1 + 0x1c) != 0))
00500d1f          {
00500d25              class SkyTimeOfDay* esi_1 = var_4;
00500d25              
00500d36              if ((esi_1 != 0 && esi_1->world_fog != 0))
00500d36              {
00500d3c                  long double x87_r7 = ((long double)*(uint32_t*)(edi_1 + 0x20));
00500d53                  *(uint32_t*)arg3 = ((float)(((((long double)esi_1->min_world_fog) - x87_r7) * ((long double)var_8)) + x87_r7));
00500d57                  long double x87_r7_1 = ((long double)*(uint32_t*)(edi_1 + 0x24));
00500d65                  *(uint32_t*)arg4 = ((float)(((((long double)esi_1->max_world_fog) - x87_r7_1) * ((long double)var_8)) + x87_r7_1));
00500d6b                  uint32_t edx_2 = ((uint32_t)*(uint8_t*)(edi_1 + 0x29));
00500d71                  uint32_t eax_5 = ((uint32_t)*(uint8_t*)((char*)esi_1->world_fog_color.__inner0 + 1));
00500d75                  arg2 = ((uint32_t)*(uint8_t*)(edi_1 + 0x2a));
00500d7d                  arg2 = edx_2;
00500d85                  arg2 = eax_5;
00500d95                  char eax_6 = _ftol2();
00500da0                  uint32_t edx_3 = ((uint32_t)*(uint8_t*)((char*)esi_1->world_fog_color.__inner0 + 0));
00500da4                  arg2 = ((uint32_t)*(uint8_t*)(edi_1 + 0x28));
00500da8                  int32_t ebx;
00500da8                  ebx = eax_6;
00500dae                  arg2 = edx_3;
00500dc5                  arg2 = _ftol2();
00500dc9                  esi_1->world_fog_color;
00500ddd                  char eax_9 = _ftol2();
00500dec                  *(uint8_t*)((char*)arg5->__inner0 + 1) = ebx;
00500df1                  *(uint8_t*)((char*)arg5->__inner0 + 2) = eax_9;
00500df4                  *(uint8_t*)((char*)arg5->__inner0 + 0) = arg2;
00500df6                  *(uint8_t*)((char*)arg5->__inner0 + 3) = 0xff;
00500e03                  return 1;
00500d36              }
00500d1f          }
00500d08      }
00500d08      
00500e0d      return 0;
00500ce0  }


00500e10  void __fastcall SkyDesc::CalcPresentDayGroup(class SkyDesc* this)

00500e10  {
00500e10      class SkyDesc* this_1 = this;
00500e11      class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
00500e1c      int32_t current_year;
00500e1c      int32_t days_per_year;
00500e1c      int32_t current_day;
00500e1c      
00500e1c      if (GameTime::current_game_time_1 == 0)
00500e1c      {
00500e29          current_day = 0;
00500e2b          days_per_year = 0;
00500e2d          current_year = 0;
00500e1c      }
00500e1c      else
00500e1c      {
00500e1e          current_day = GameTime::current_game_time_1->current_day;
00500e21          days_per_year = GameTime::current_game_time_1->days_per_year;
00500e24          current_year = GameTime::current_game_time_1->current_year;
00500e1c      }
00500e1c      
00500e2f      uint32_t m_num = this->day_groups.m_num;
00500e48      long double x87_r7 = ((long double)((((current_year * days_per_year) + current_day) * 0x6a42fdb2) - 0x7541e9ae));
00500e48      
00500e4c      if (((((current_year * days_per_year) + current_day) * 0x6a42fdb2) - 0x7541e9ae) < 0)
00500e4e          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
00500e4e      
00500e60      long double x87_r6 = ((long double)m_num);
00500e60      
00500e64      if (m_num < 0)
00500e66          x87_r6 = (x87_r6 + ((long double)4.2949673e+09f));
00500e66      
00500e74      floor(((double)((x87_r7 * ((long double)2.32830644e-10f)) * x87_r6)));
00500e7d      int32_t eax_4 = _ftol2();
00500e82      bool cond:3 = eax_4 < this->day_groups.m_num;
00500e85      this->present_day_group = eax_4;
00500e85      
00500e87      if (!(cond:3))
00500e89          this->present_day_group = 0;
00500e10  }

00500e93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00500ea0  void __fastcall AC1Legacy::SmartArray<CelestialPosition>::Reset(class AC1Legacy::SmartArray<CelestialPosition>* this)

00500ea0  {
00500ea3      class CelestialPosition* m_data = this->m_data;
00500ea7      this->m_num = 0;
00500eae      this->m_size = 0;
00500eae      
00500eb5      if (m_data != 0)
00500ebb          operator delete[](((char*)m_data - 4));
00500ebb      
00500ec3      this->m_data = 0;
00500ea0  }

00500ecb                                   90 90 90 90 90                                                             .....

00500ed0  uint32_t __thiscall SkyObject::Pack(class SkyObject* this, void** arg2, uint32_t* arg3)

00500ed0  {
00500edc      if (*(uint32_t*)arg3 >= 4)
00500edc      {
00500ee7          **(uint32_t**)arg2 = ((float)((long double)this->begin_time));
00500ee9          *(uint32_t*)arg2 += 4;
00500eef          uint32_t edi_2 = (*(uint32_t*)arg3 - 4);
00500ef7          *(uint32_t*)arg3 = edi_2;
00500ef7          
00500ef9          if (edi_2 >= 4)
00500ef9          {
00500f04              **(uint32_t**)arg2 = ((float)((long double)this->end_time));
00500f06              *(uint32_t*)arg2 += 4;
00500f0b              uint32_t edi_4 = (*(uint32_t*)arg3 - 4);
00500f13              *(uint32_t*)arg3 = edi_4;
00500f13              
00500f15              if (edi_4 >= 4)
00500f15              {
00500f20                  **(uint32_t**)arg2 = ((float)((long double)this->begin_angle));
00500f22                  *(uint32_t*)arg2 += 4;
00500f27                  uint32_t edi_6 = (*(uint32_t*)arg3 - 4);
00500f2f                  *(uint32_t*)arg3 = edi_6;
00500f2f                  
00500f31                  if (edi_6 >= 4)
00500f31                  {
00500f3c                      **(uint32_t**)arg2 = ((float)((long double)this->end_angle));
00500f3e                      *(uint32_t*)arg2 += 4;
00500f43                      uint32_t edi_8 = (*(uint32_t*)arg3 - 4);
00500f4b                      *(uint32_t*)arg3 = edi_8;
00500f4b                      
00500f4d                      if (edi_8 >= 4)
00500f4d                      {
00500f54                          **(uint32_t**)arg2 = ((float)((long double)this->tex_velocity.x));
00500f56                          *(uint32_t*)arg2 += 4;
00500f5b                          uint32_t edi_10 = (*(uint32_t*)arg3 - 4);
00500f63                          *(uint32_t*)arg3 = edi_10;
00500f63                          
00500f65                          if (edi_10 >= 4)
00500f65                          {
00500f6c                              **(uint32_t**)arg2 = ((float)((long double)this->tex_velocity.y));
00500f6e                              *(uint32_t*)arg2 += 4;
00500f73                              uint32_t edi_12 = (*(uint32_t*)arg3 - 4);
00500f7b                              *(uint32_t*)arg3 = edi_12;
00500f7b                              
00500f7d                              if (edi_12 >= 4)
00500f7d                              {
00500f84                                  **(uint32_t**)arg2 = this->default_gfx_object.id;
00500f86                                  *(uint32_t*)arg2 += 4;
00500f8b                                  uint32_t edi_15 = (*(uint32_t*)arg3 - 4);
00500f93                                  *(uint32_t*)arg3 = edi_15;
00500f93                                  
00500f95                                  if (edi_15 >= 4)
00500f95                                  {
00500f9c                                      **(uint32_t**)arg2 = this->default_pes_object.id;
00500f9e                                      *(uint32_t*)arg2 += 4;
00500fa3                                      uint32_t edi_18 = (*(uint32_t*)arg3 - 4);
00500fab                                      *(uint32_t*)arg3 = edi_18;
00500fab                                      
00500fad                                      if (edi_18 >= 4)
00500fad                                      {
00500fb4                                          **(uint32_t**)arg2 = this->properties;
00500fb6                                          *(uint32_t*)arg2 += 4;
00500fb9                                          *(uint32_t*)arg3 -= 4;
00500fad                                      }
00500f95                                  }
00500f7d                              }
00500f65                          }
00500f4d                      }
00500f31                  }
00500f15              }
00500ef9          }
00500edc      }
00500edc      
00500fbf      PackObj::ALIGN_PTR(arg2, arg3);
00500fca      return *(uint32_t*)arg3;
00500ed0  }

00500fcd                                         90 90 90                                                               ...

00500fd0  int32_t __thiscall SkyObject::UnPack(class SkyObject* this, void** arg2, uint32_t* arg3)

00500fd0  {
00500fd4      SkyObject::Destroy(this);
00500fd4      
00500fe4      if (*(uint32_t*)arg3 >= 4)
00500fe4      {
00500fee          this->begin_time = **(uint32_t**)arg2;
00500ff1          *(uint32_t*)arg2 += 4;
00500ff6          uint32_t edi_2 = (*(uint32_t*)arg3 - 4);
00500ffe          *(uint32_t*)arg3 = edi_2;
00500ffe          
00501000          if (edi_2 >= 4)
00501000          {
00501006              this->end_time = **(uint32_t**)arg2;
00501009              *(uint32_t*)arg2 += 4;
0050100e              uint32_t edi_4 = (*(uint32_t*)arg3 - 4);
00501016              *(uint32_t*)arg3 = edi_4;
00501016              
00501018              if (edi_4 >= 4)
00501018              {
0050101e                  this->begin_angle = **(uint32_t**)arg2;
00501021                  *(uint32_t*)arg2 += 4;
00501026                  uint32_t edi_6 = (*(uint32_t*)arg3 - 4);
0050102e                  *(uint32_t*)arg3 = edi_6;
0050102e                  
00501030                  if (edi_6 >= 4)
00501030                  {
00501036                      this->end_angle = **(uint32_t**)arg2;
00501039                      *(uint32_t*)arg2 += 4;
0050103e                      uint32_t edi_8 = (*(uint32_t*)arg3 - 4);
00501046                      *(uint32_t*)arg3 = edi_8;
00501046                      
00501048                      if (edi_8 >= 4)
00501048                      {
0050104e                          this->tex_velocity.x = **(uint32_t**)arg2;
00501051                          *(uint32_t*)arg2 += 4;
00501056                          uint32_t edi_10 = (*(uint32_t*)arg3 - 4);
0050105e                          *(uint32_t*)arg3 = edi_10;
0050105e                          
00501060                          if (edi_10 >= 4)
00501060                          {
00501066                              this->tex_velocity.y = **(uint32_t**)arg2;
00501069                              *(uint32_t*)arg2 += 4;
0050106c                              *(uint32_t*)arg3 -= 4;
00501060                          }
00501048                      }
00501030                  }
00501018              }
00501000          }
00500fe4      }
00500fe4      
0050106f      this->tex_velocity.z = 0f;
0050106f      
00501079      if (*(uint32_t*)arg3 >= 4)
00501079      {
0050107b          void* edx_18 = *(uint32_t*)arg2;
0050107d          class IDClass<_tagDataID,32,0> edi_11 = *(uint32_t*)edx_18;
00501082          *(uint32_t*)arg2 = ((char*)edx_18 + 4);
00501084          *(uint32_t*)arg3 -= 4;
00501087          this->default_gfx_object.id = edi_11;
00501087          
0050108d          if (*(uint32_t*)arg3 >= 4)
0050108d          {
0050108f              void* edx_20 = *(uint32_t*)arg2;
00501091              class IDClass<_tagDataID,32,0> edi_12 = *(uint32_t*)edx_20;
00501096              *(uint32_t*)arg2 = ((char*)edx_20 + 4);
00501098              *(uint32_t*)arg3 -= 4;
0050109b              this->default_pes_object.id = edi_12;
0050109b              
005010a1              if (*(uint32_t*)arg3 >= 4)
005010a1              {
005010a7                  this->properties = **(uint32_t**)arg2;
005010aa                  *(uint32_t*)arg2 += 4;
005010ad                  *(uint32_t*)arg3 -= 4;
005010a1              }
0050108d          }
00501079      }
00501079      
005010b2      PackObj::ALIGN_PTR(arg2, arg3);
005010c1      return 1;
00500fd0  }

005010c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005010d0  uint32_t __thiscall SkyObjectReplace::Pack(class SkyObjectReplace* this, void** arg2, uint32_t* arg3)

005010d0  {
005010dc      if (*(uint32_t*)arg3 >= 4)
005010dc      {
005010e7          **(uint32_t**)arg2 = this->object_index;
005010e9          *(uint32_t*)arg2 += 4;
005010ee          uint32_t edi_3 = (*(uint32_t*)arg3 - 4);
005010f6          *(uint32_t*)arg3 = edi_3;
005010f6          
005010f8          if (edi_3 >= 4)
005010f8          {
005010ff              **(uint32_t**)arg2 = this->gfx_obj_id.id;
00501101              *(uint32_t*)arg2 += 4;
00501106              uint32_t edi_6 = (*(uint32_t*)arg3 - 4);
0050110e              *(uint32_t*)arg3 = edi_6;
0050110e              
00501110              if (edi_6 >= 4)
00501110              {
00501117                  **(uint32_t**)arg2 = ((float)((long double)this->rotate));
00501119                  *(uint32_t*)arg2 += 4;
0050111e                  uint32_t edi_8 = (*(uint32_t*)arg3 - 4);
00501126                  *(uint32_t*)arg3 = edi_8;
00501126                  
00501128                  if (edi_8 >= 4)
00501128                  {
0050112f                      **(uint32_t**)arg2 = ((float)((long double)this->transparent));
00501131                      *(uint32_t*)arg2 += 4;
00501136                      uint32_t edi_10 = (*(uint32_t*)arg3 - 4);
0050113e                      *(uint32_t*)arg3 = edi_10;
0050113e                      
00501140                      if (edi_10 >= 4)
00501140                      {
00501147                          **(uint32_t**)arg2 = ((float)((long double)this->luminosity));
00501149                          *(uint32_t*)arg2 += 4;
0050114e                          uint32_t edi_12 = (*(uint32_t*)arg3 - 4);
00501156                          *(uint32_t*)arg3 = edi_12;
00501156                          
00501158                          if (edi_12 >= 4)
00501158                          {
0050115f                              **(uint32_t**)arg2 = ((float)((long double)this->max_bright));
00501161                              *(uint32_t*)arg2 += 4;
00501164                              *(uint32_t*)arg3 -= 4;
00501158                          }
00501140                      }
00501128                  }
00501110              }
005010f8          }
005010dc      }
005010dc      
0050116a      PackObj::ALIGN_PTR(arg2, arg3);
00501175      return *(uint32_t*)arg3;
005010d0  }

00501178                                                                          90 90 90 90 90 90 90 90                          ........

00501180  int32_t __thiscall SkyObjectReplace::UnPack(class SkyObjectReplace* this, void** arg2, uint32_t* arg3)

00501180  {
0050118b      if (*(uint32_t*)arg3 >= 4)
0050118b      {
00501196          this->object_index = **(uint32_t**)arg2;
00501198          *(uint32_t*)arg2 += 4;
0050119e          uint32_t edi_2 = (*(uint32_t*)arg3 - 4);
005011a6          *(uint32_t*)arg3 = edi_2;
005011a6          
005011a8          if (edi_2 >= 4)
005011a8          {
005011aa              void* esi_4 = *(uint32_t*)arg2;
005011ac              class IDClass<_tagDataID,32,0> edi_3 = *(uint32_t*)esi_4;
005011b1              *(uint32_t*)arg2 = ((char*)esi_4 + 4);
005011b3              *(uint32_t*)arg3 -= 4;
005011b6              this->gfx_obj_id.id = edi_3;
005011b6              
005011bc              if (*(uint32_t*)arg3 >= 4)
005011bc              {
005011c2                  this->rotate = **(uint32_t**)arg2;
005011c5                  *(uint32_t*)arg2 += 4;
005011ca                  uint32_t edi_5 = (*(uint32_t*)arg3 - 4);
005011d2                  *(uint32_t*)arg3 = edi_5;
005011d2                  
005011d4                  if (edi_5 >= 4)
005011d4                  {
005011da                      this->transparent = **(uint32_t**)arg2;
005011dd                      *(uint32_t*)arg2 += 4;
005011e2                      uint32_t edi_7 = (*(uint32_t*)arg3 - 4);
005011ea                      *(uint32_t*)arg3 = edi_7;
005011ea                      
005011ec                      if (edi_7 >= 4)
005011ec                      {
005011f2                          this->luminosity = **(uint32_t**)arg2;
005011f5                          *(uint32_t*)arg2 += 4;
005011fa                          uint32_t edi_9 = (*(uint32_t*)arg3 - 4);
00501202                          *(uint32_t*)arg3 = edi_9;
00501202                          
00501204                          if (edi_9 >= 4)
00501204                          {
0050120a                              this->max_bright = **(uint32_t**)arg2;
0050120d                              *(uint32_t*)arg2 += 4;
00501210                              *(uint32_t*)arg3 -= 4;
00501204                          }
005011ec                      }
005011d4                  }
005011bc              }
005011a8          }
0050118b      }
0050118b      
00501217      PackObj::ALIGN_PTR(arg2, arg3);
00501224      return 1;
00501180  }

00501227                       90 90 90 90 90 90 90 90 90                                                         .........

00501230  void __fastcall SkyTimeOfDay::~SkyTimeOfDay(class SkyTimeOfDay* this)

00501230  {
00501237      int32_t i = 0;
00501237      
0050123b      if (this->sky_obj_replace.m_num > 0)
0050123b      {
00501259          do
00501259          {
00501243              void* eax_2 = this->sky_obj_replace.m_data[i];
00501243              
00501248              if (eax_2 != 0)
0050124b                  operator delete(eax_2);
0050124b              
00501256              i += 1;
00501259          } while (i < this->sky_obj_replace.m_num);
0050123b      }
0050123b      
0050125f      this->sky_obj_replace.m_num = 0;
00501266      this->sky_obj_replace.m_size = 0;
0050126d      operator delete[](this->sky_obj_replace.m_data);
00501272      this->sky_obj_replace.m_data = 0;
0050127d      operator delete[](this->sky_obj_replace.m_data);
00501230  }

00501288                          90 90 90 90 90 90 90 90                                                          ........

00501290  uint32_t __thiscall SkyTimeOfDay::Pack(class SkyTimeOfDay* this, void** arg2, uint32_t* arg3)

00501290  {
005012a1      if (*(uint32_t*)arg3 >= 4)
005012a1      {
005012ab          **(uint32_t**)arg2 = this->begin;
005012ad          *(uint32_t*)arg2 += 4;
005012b2          uint32_t ecx_2 = (*(uint32_t*)arg3 - 4);
005012ba          *(uint32_t*)arg3 = ecx_2;
005012ba          
005012bc          if (ecx_2 >= 4)
005012bc          {
005012c7              **(uint32_t**)arg2 = ((float)((long double)this->dir_bright));
005012c9              *(uint32_t*)arg2 += 4;
005012ce              uint32_t ecx_4 = (*(uint32_t*)arg3 - 4);
005012d6              *(uint32_t*)arg3 = ecx_4;
005012d6              
005012d8              if (ecx_4 >= 4)
005012d8              {
005012e3                  **(uint32_t**)arg2 = ((float)((long double)this->dir_heading));
005012e5                  *(uint32_t*)arg2 += 4;
005012ea                  uint32_t ecx_6 = (*(uint32_t*)arg3 - 4);
005012f2                  *(uint32_t*)arg3 = ecx_6;
005012f2                  
005012f4                  if (ecx_6 >= 4)
005012f4                  {
005012ff                      **(uint32_t**)arg2 = ((float)((long double)this->dir_pitch));
00501301                      *(uint32_t*)arg2 += 4;
00501306                      uint32_t ecx_9 = (*(uint32_t*)arg3 - 4);
0050130e                      *(uint32_t*)arg3 = ecx_9;
0050130e                      
00501310                      if (ecx_9 >= 4)
00501310                      {
0050131b                          **(uint32_t**)arg2 = this->dir_color.__inner0;
0050131d                          *(uint32_t*)arg2 += 4;
00501322                          uint32_t ecx_11 = (*(uint32_t*)arg3 - 4);
0050132a                          *(uint32_t*)arg3 = ecx_11;
0050132a                          
0050132c                          if (ecx_11 >= 4)
0050132c                          {
00501337                              **(uint32_t**)arg2 = ((float)((long double)this->amb_bright));
00501339                              *(uint32_t*)arg2 += 4;
0050133e                              uint32_t ecx_14 = (*(uint32_t*)arg3 - 4);
00501346                              *(uint32_t*)arg3 = ecx_14;
00501346                              
00501348                              if (ecx_14 >= 4)
00501348                              {
0050134f                                  **(uint32_t**)arg2 = this->amb_color.__inner0;
00501351                                  *(uint32_t*)arg2 += 4;
00501356                                  uint32_t ecx_16 = (*(uint32_t*)arg3 - 4);
0050135e                                  *(uint32_t*)arg3 = ecx_16;
0050135e                                  
00501360                                  if (ecx_16 >= 4)
00501360                                  {
00501367                                      **(uint32_t**)arg2 = ((float)((long double)this->min_world_fog));
00501369                                      *(uint32_t*)arg2 += 4;
0050136e                                      uint32_t ecx_19 = (*(uint32_t*)arg3 - 4);
00501376                                      *(uint32_t*)arg3 = ecx_19;
00501376                                      
00501378                                      if (ecx_19 >= 4)
00501378                                      {
0050137f                                          **(uint32_t**)arg2 = ((float)((long double)this->max_world_fog));
00501381                                          *(uint32_t*)arg2 += 4;
00501386                                          uint32_t ecx_21 = (*(uint32_t*)arg3 - 4);
0050138e                                          *(uint32_t*)arg3 = ecx_21;
0050138e                                          
00501390                                          if (ecx_21 >= 4)
00501390                                          {
00501397                                              **(uint32_t**)arg2 = this->world_fog_color.__inner0;
00501399                                              *(uint32_t*)arg2 += 4;
0050139e                                              uint32_t ecx_24 = (*(uint32_t*)arg3 - 4);
005013a6                                              *(uint32_t*)arg3 = ecx_24;
005013a6                                              
005013a8                                              if (ecx_24 >= 4)
005013a8                                              {
005013af                                                  **(uint32_t**)arg2 = this->world_fog;
005013b1                                                  *(uint32_t*)arg2 += 4;
005013b4                                                  *(uint32_t*)arg3 -= 4;
005013a8                                              }
00501390                                          }
00501378                                      }
00501360                                  }
00501348                              }
0050132c                          }
00501310                      }
005012f4                  }
005012d8              }
005012bc          }
005012a1      }
005012a1      
005013b9      PackObj::ALIGN_PTR(arg2, arg3);
005013c0      uint32_t m_num = this->sky_obj_replace.m_num;
005013c0      
005013cd      if (*(uint32_t*)arg3 >= 4)
005013cd      {
005013d1          **(uint32_t**)arg2 = m_num;
005013d3          *(uint32_t*)arg2 += 4;
005013d6          *(uint32_t*)arg3 -= 4;
005013cd      }
005013cd      
005013d9      int32_t ebp = 0;
005013d9      
005013dd      if (m_num > 0)
005013dd      {
005013f4          do
005013f4          {
005013e8              SkyObjectReplace::Pack(this->sky_obj_replace.m_data[ebp], arg2, arg3);
005013f1              ebp += 1;
005013f4          } while (ebp < m_num);
005013dd      }
005013dd      
005013fc      return *(uint32_t*)arg3;
00501290  }

005013ff                                                                                               90                                 .

00501400  void __thiscall SkyDesc::GetSubDataIDs(class SkyDesc const* this, class QualifiedDataIDArray* arg2)

00501400  {
0050140d      int32_t i = 0;
00501413      class SkyDesc* this_1 = this;
00501417      int32_t i_1 = 0;
00501417      
0050141b      if (this->day_groups.m_num > 0)
0050141b      {
005014d2          do
005014d2          {
00501424              void* ebx_1 = this->day_groups.m_data[i];
0050142a              int32_t j = 0;
0050142a              
0050142e              if (*(uint32_t*)((char*)ebx_1 + 0x1c) > 0)
0050142e              {
0050145e                  do
0050145e                  {
00501436                      class IDClass<_tagDataID,32,0> eax_2 = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)ebx_1 + 0x14) + (j << 2)) + 0x24);
0050143f                      void var_18;
0050143f                      
0050143f                      if (eax_2 != INVALID_DID.id)
00501453                          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, eax_2, 0), 8);
0050145b                      j += 1;
0050145e                  } while (j < *(uint32_t*)((char*)ebx_1 + 0x1c));
0050142e              }
0050142e              
00501463              int32_t j_1 = 0;
00501467              int32_t j_2 = 0;
00501467              
0050146b              if (*(uint32_t*)((char*)ebx_1 + 0x10) > 0)
0050146b              {
005014be                  do
005014be                  {
00501473                      void* esi_1 = *(uint32_t*)(*(uint32_t*)((char*)ebx_1 + 8) + (j_1 << 2));
00501479                      int32_t k = 0;
00501479                      
0050147d                      if (*(uint32_t*)((char*)esi_1 + 0x34) > 0)
0050147d                      {
005014ae                          do
005014ae                          {
00501486                              class IDClass<_tagDataID,32,0> eax_6 = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)esi_1 + 0x2c) + (k << 2)) + 8);
0050148f                              void var_10;
0050148f                              
0050148f                              if (eax_6 != INVALID_DID.id)
005014a3                                  QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, eax_6, 0), 8);
005014ab                              k += 1;
005014ae                          } while (k < *(uint32_t*)((char*)esi_1 + 0x34));
005014ae                          
005014b0                          j_1 = j_2;
0050147d                      }
0050147d                      
005014b7                      j_1 += 1;
005014ba                      j_2 = j_1;
005014be                  } while (j_1 < *(uint32_t*)((char*)ebx_1 + 0x10));
0050146b              }
0050146b              
005014c4              this = this_1;
005014cb              i = (i_1 + 1);
005014ce              i_1 = i;
005014d2          } while (i < this->day_groups.m_num);
0050141b      }
00501400  }

005014e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005014f0  int32_t __thiscall AC1Legacy::SmartArray<CelestialPosition>::grow(class AC1Legacy::SmartArray<CelestialPosition>* this, uint32_t arg2)

005014f0  {
005014f8      uint32_t esi = arg2;
005014f8      
005014fe      if (esi >= this->m_num)
005014fe      {
00501507          if (esi <= this->m_size)
0050159d              return 1;
0050159d          
0050150f          if (esi == 0)
0050150f          {
00501511              AC1Legacy::SmartArray<CelestialPosition>::Reset(this);
0050151e              return 1;
0050150f          }
0050150f          
0050152a          uint32_t* eax_5 = operator new[](((esi * 0x2c) + 4));
0050152a          
00501534          if (eax_5 != 0)
00501534          {
00501542              *(uint32_t*)eax_5 = esi;
00501544              `vector constructor iterator'(&eax_5[1], 0x2c, esi, Vector3::Vector3);
00501544              
0050154b              if (eax_5 != 0xfffffffc)
0050154b              {
00501550                  if (this->m_data != 0)
00501550                  {
00501555                      int32_t i = 0;
00501555                      
00501559                      if (this->m_num > 0)
00501559                      {
0050155b                          void* eax_7 = nullptr;
0050155d                          int32_t edi;
0050155d                          int32_t var_10_2 = edi;
0050155d                          
00501577                          do
00501577                          {
0050156c                              __builtin_memcpy(((char*)eax_7 + &eax_5[1]), (this->m_data + eax_7), 0x2c);
00501571                              i += 1;
00501572                              eax_7 += 0x2c;
00501577                          } while (i < this->m_num);
00501577                          
00501579                          esi = arg2;
00501559                      }
00501559                      
0050157e                      class CelestialPosition* m_data = this->m_data;
0050157e                      
00501582                      if (m_data != 0)
00501588                          operator delete[](((char*)m_data - 4));
00501550                  }
00501550                  
00501590                  this->m_data = &eax_5[1];
00501592                  this->m_size = esi;
0050159d                  return 1;
0050154b              }
00501534          }
005014fe      }
005014fe      
005015a5      return 0;
005014f0  }

005015a8                          90 90 90 90 90 90 90 90                                                          ........

005015b0  int32_t __thiscall SkyTimeOfDay::UnPack(class SkyTimeOfDay* this, void** arg2, uint32_t* arg3)

005015b0  {
005015b3      uint32_t* esi = arg3;
005015b3      
005015c1      if (*(uint32_t*)esi >= 4)
005015c1      {
005015cb          this->begin = **(uint32_t**)arg2;
005015cd          *(uint32_t*)arg2 += 4;
005015d2          uint32_t ecx_2 = (*(uint32_t*)esi - 4);
005015da          *(uint32_t*)esi = ecx_2;
005015da          
005015dc          if (ecx_2 >= 4)
005015dc          {
005015e6              this->dir_bright = **(uint32_t**)arg2;
005015e9              *(uint32_t*)arg2 += 4;
005015ee              uint32_t ecx_4 = (*(uint32_t*)esi - 4);
005015f6              *(uint32_t*)esi = ecx_4;
005015f6              
005015f8              if (ecx_4 >= 4)
005015f8              {
00501602                  this->dir_heading = **(uint32_t**)arg2;
00501605                  *(uint32_t*)arg2 += 4;
0050160a                  uint32_t ecx_7 = (*(uint32_t*)esi - 4);
00501612                  *(uint32_t*)esi = ecx_7;
00501612                  
00501614                  if (ecx_7 >= 4)
00501614                  {
0050161e                      this->dir_pitch = **(uint32_t**)arg2;
00501621                      *(uint32_t*)arg2 += 4;
00501626                      uint32_t ecx_10 = (*(uint32_t*)esi - 4);
0050162e                      *(uint32_t*)esi = ecx_10;
0050162e                      
00501630                      if (ecx_10 >= 4)
00501630                      {
0050163a                          this->dir_color.__inner0 = **(uint32_t**)arg2;
0050163d                          *(uint32_t*)arg2 += 4;
00501642                          uint32_t ecx_12 = (*(uint32_t*)esi - 4);
0050164a                          *(uint32_t*)esi = ecx_12;
0050164a                          
0050164c                          if (ecx_12 >= 4)
0050164c                          {
00501656                              this->amb_bright = **(uint32_t**)arg2;
00501659                              *(uint32_t*)arg2 += 4;
0050165e                              uint32_t ecx_15 = (*(uint32_t*)esi - 4);
00501666                              *(uint32_t*)esi = ecx_15;
00501666                              
00501668                              if (ecx_15 >= 4)
00501668                              {
0050166e                                  this->amb_color.__inner0 = **(uint32_t**)arg2;
00501671                                  *(uint32_t*)arg2 += 4;
00501676                                  uint32_t ecx_18 = (*(uint32_t*)esi - 4);
0050167e                                  *(uint32_t*)esi = ecx_18;
0050167e                                  
00501680                                  if (ecx_18 >= 4)
00501680                                  {
00501686                                      this->min_world_fog = **(uint32_t**)arg2;
00501689                                      *(uint32_t*)arg2 += 4;
0050168e                                      uint32_t ecx_20 = (*(uint32_t*)esi - 4);
00501696                                      *(uint32_t*)esi = ecx_20;
00501696                                      
00501698                                      if (ecx_20 >= 4)
00501698                                      {
0050169e                                          this->max_world_fog = **(uint32_t**)arg2;
005016a1                                          *(uint32_t*)arg2 += 4;
005016a6                                          uint32_t ecx_23 = (*(uint32_t*)esi - 4);
005016ae                                          *(uint32_t*)esi = ecx_23;
005016ae                                          
005016b0                                          if (ecx_23 >= 4)
005016b0                                          {
005016b6                                              this->world_fog_color.__inner0 = **(uint32_t**)arg2;
005016b9                                              *(uint32_t*)arg2 += 4;
005016be                                              uint32_t ecx_26 = (*(uint32_t*)esi - 4);
005016c6                                              *(uint32_t*)esi = ecx_26;
005016c6                                              
005016c8                                              if (ecx_26 >= 4)
005016c8                                              {
005016ce                                                  this->world_fog = **(uint32_t**)arg2;
005016d1                                                  *(uint32_t*)arg2 += 4;
005016d4                                                  *(uint32_t*)esi -= 4;
005016c8                                              }
005016b0                                          }
00501698                                      }
00501680                                  }
00501668                              }
0050164c                          }
00501630                      }
00501614                  }
005015f8              }
005015dc          }
005015c1      }
005015c1      
005016d9      PackObj::ALIGN_PTR(arg2, esi);
005016e6      uint32_t* ebp;
005016e6      
005016e6      if (*(uint32_t*)esi < 4)
005016f6          ebp = arg3;
005016e6      else
005016e6      {
005016e8          void* eax_20 = *(uint32_t*)arg2;
005016ea          ebp = *(uint32_t*)eax_20;
005016ef          *(uint32_t*)arg2 = ((char*)eax_20 + 4);
005016f1          *(uint32_t*)esi -= 4;
005016e6      }
005016e6      
00501700      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->sky_obj_replace, ebp);
00501700      
00501707      if (ebp > 0)
00501707      {
00501709          arg3 = ebp;
00501773          uint32_t* i;
00501773          
00501773          do
00501773          {
00501712              void* eax_22 = operator new(0x1c);
00501717              void* ebp_1 = nullptr;
00501717              
0050171e              if (eax_22 != 0)
0050171e              {
00501720                  *(uint32_t*)eax_22 = 0;
00501722                  *(uint32_t*)((char*)eax_22 + 4) = 0;
00501725                  *(uint32_t*)((char*)eax_22 + 8) = 0;
00501728                  *(uint32_t*)((char*)eax_22 + 0xc) = 0;
0050172b                  *(uint32_t*)((char*)eax_22 + 0x14) = 0;
0050172e                  *(uint32_t*)((char*)eax_22 + 0x18) = 0;
00501731                  *(uint32_t*)((char*)eax_22 + 0x10) = 0xbf800000;
00501738                  ebp_1 = eax_22;
0050171e              }
0050171e              
0050173e              SkyObjectReplace::UnPack(ebp_1, arg2, esi);
00501743              uint32_t m_size = this->sky_obj_replace.m_size;
00501749              int32_t eax_24;
00501749              
00501749              if (this->sky_obj_replace.m_num >= m_size)
00501749              {
0050174d                  uint32_t eax_23;
0050174d                  
0050174d                  if (m_size <= 0)
00501753                      eax_23 = 8;
0050174d                  else
0050174f                      eax_23 = (m_size * 2);
0050174f                  
0050175b                  eax_24 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->sky_obj_replace, eax_23);
00501749              }
00501749              
00501762              if ((this->sky_obj_replace.m_num < m_size || eax_24 != 0))
00501762              {
005016fa                  this->sky_obj_replace.m_data[this->sky_obj_replace.m_num] = ebp_1;
005016fa                  this->sky_obj_replace.m_num += 1;
00501762              }
00501762              
0050176f              i = arg3;
0050176f              arg3 -= 1;
00501773          } while (i != 1);
00501707      }
00501707      
0050177b      return *(uint32_t*)esi;
005015b0  }

0050177e                                                                                            90 90                                ..

00501780  void __fastcall DayGroup::Destroy(class DayGroup* this)

00501780  {
0050178e      int32_t i = 0;
00501790      bool cond:0 = this->sky_time.m_num <= 0;
00501792      this->chance_of_occur = 0f;
00501792      
00501795      if (!(cond:0))
00501795      {
005017b7          do
005017b7          {
0050179a              class SkyTimeOfDay* esi_1 = this->sky_time.m_data[i];
0050179a              
0050179f              if (esi_1 != 0)
0050179f              {
005017a3                  SkyTimeOfDay::~SkyTimeOfDay(esi_1);
005017a9                  operator delete(esi_1);
0050179f              }
0050179f              
005017b4              i += 1;
005017b7          } while (i < this->sky_time.m_num);
00501795      }
00501795      
005017bd      this->sky_time.m_num = 0;
005017c0      this->sky_time.m_size = 0;
005017c3      operator delete[](this->sky_time.m_data);
005017c8      this->sky_time.m_data = 0;
005017d1      int32_t i_1 = 0;
005017d1      
005017d5      if (this->sky_objects.m_num > 0)
005017d5      {
00501849          do
00501849          {
005017da              int32_t* s = this->sky_objects.m_data[i_1];
005017da              
005017df              if (s != 0)
005017df              {
005017e4                  operator delete[](*(uint32_t*)s);
005017f5                  s[5] = 0;
005017f5                  s[6] = 0;
00501815                  __builtin_memset(s, 0, 0x14);
005017f5                  s[7] = 0;
0050182b                  s[9] = INVALID_DID.id;
00501835                  s[0xa] = INVALID_DID.id;
00501838                  s[8] = 0;
0050183b                  operator delete(s);
005017df              }
005017df              
00501846              i_1 += 1;
00501849          } while (i_1 < this->sky_objects.m_num);
005017d5      }
005017d5      
0050184f      this->sky_objects.m_num = 0;
00501852      this->sky_objects.m_size = 0;
00501855      operator delete[](this->sky_objects.m_data);
0050185d      this->sky_objects.m_data = 0;
00501780  }

00501868                          90 90 90 90 90 90 90 90                                                          ........

00501870  uint32_t __fastcall DayGroup::pack_size(class DayGroup* this)

00501870  {
00501875      int32_t eax_1 = (this->day_name.m_buffer->m_len - 1);
00501876      int32_t edx = 0;
00501876      
0050187d      if (eax_1 >= 0xffff)
0050187f          edx = 4;
0050187f      
0050188b      int32_t eax_3 = (((edx + eax_1) + 2) & 3);
0050188e      int32_t edx_1;
0050188e      
0050188e      if (eax_3 == 0)
00501899          edx_1 = 0;
0050188e      else
00501895          edx_1 = (4 - eax_3);
00501895      
005018a1      int32_t eax_5 = (((edx_1 + ((edx + eax_1) + 2)) + 4) & 3);
005018a4      int32_t edx_2;
005018a4      
005018a4      if (eax_5 == 0)
005018af          edx_2 = 0;
005018a4      else
005018ab          edx_2 = (4 - eax_5);
005018ab      
005018b1      int32_t eax_6 = ((((edx_1 + ((edx + eax_1) + 2)) + 4) + edx_2) + 4);
005018b5      uint32_t m_num_1 = this->sky_time.m_num;
005018b5      
005018ba      if (m_num_1 > 0)
005018ba      {
005018be          class SkyTimeOfDay** m_data = this->sky_time.m_data;
005018c1          uint32_t ebx_1 = m_num_1;
005018de          uint32_t i;
005018de          
005018de          do
005018de          {
005018c5              uint32_t m_num_2 = *(uint32_t*)m_data->sky_obj_replace.m_num;
005018ca              int32_t edx_3 = 0x30;
005018ca              
005018cf              if (m_num_2 > 0)
005018d5                  edx_3 = (((m_num_2 * 3) + 6) << 3);
005018d5              
005018d8              eax_6 += edx_3;
005018da              m_data = &m_data[1];
005018dd              i = ebx_1;
005018dd              ebx_1 -= 1;
005018de          } while (i != 1);
005018ba      }
005018ba      
005018e2      uint32_t m_num = this->sky_objects.m_num;
005018e5      int32_t result = (eax_6 + 4);
005018e5      
005018eb      if (m_num <= 0)
005018f3          return result;
005018f3      
005018f0      return (result + (m_num * 0x24));
00501870  }

005018f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00501900  uint32_t __thiscall DayGroup::Pack(class DayGroup* this, void** arg2, uint32_t* arg3)

00501900  {
00501911      if (*(uint32_t*)arg3 >= 4)
00501911      {
00501918          **(uint32_t**)arg2 = ((float)((long double)this->chance_of_occur));
0050191a          *(uint32_t*)arg2 += 4;
0050191d          *(uint32_t*)arg3 -= 4;
00501911      }
00501911      
00501926      uint32_t eax_2 = AC1Legacy::PStringBase<char>::Pack(this, arg2, *(uint32_t*)arg3);
00501931      *(uint32_t*)arg3 -= eax_2;
00501933      PackObj::ALIGN_PTR(arg2, arg3);
00501933      
00501940      if (*(uint32_t*)arg3 >= 4)
00501940      {
00501947          **(uint32_t**)arg2 = this->sky_objects.m_num;
00501949          *(uint32_t*)arg2 += 4;
0050194c          *(uint32_t*)arg3 -= 4;
00501940      }
00501940      
00501952      int32_t i = 0;
00501952      
00501956      if (this->sky_objects.m_num > 0)
00501956      {
0050196b          do
0050196b          {
00501960              SkyObject::Pack(this->sky_objects.m_data[i], arg2, arg3);
00501968              i += 1;
0050196b          } while (i < this->sky_objects.m_num);
00501956      }
00501956      
00501970      if (*(uint32_t*)arg3 >= 4)
00501970      {
00501977          **(uint32_t**)arg2 = this->sky_time.m_num;
00501979          *(uint32_t*)arg2 += 4;
0050197c          *(uint32_t*)arg3 -= 4;
00501970      }
00501970      
00501982      int32_t i_1 = 0;
00501982      
00501986      if (this->sky_time.m_num > 0)
00501986      {
0050199b          do
0050199b          {
00501990              SkyTimeOfDay::Pack(this->sky_time.m_data[i_1], arg2, arg3);
00501998              i_1 += 1;
0050199b          } while (i_1 < this->sky_time.m_num);
00501986      }
00501986      
005019a3      return *(uint32_t*)arg3;
00501900  }

005019a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005019b0  uint32_t __fastcall SkyDesc::pack_size(class SkyDesc* this)

005019b0  {
005019b0      uint32_t m_num = this->day_groups.m_num;
005019b6      int32_t result = 0x14;
005019b6      
005019bb      if (m_num > 0)
005019bb      {
005019bf          class DayGroup** m_data = this->day_groups.m_data;
005019c2          uint32_t ebx_1 = m_num;
005019d1          uint32_t i;
005019d1          
005019d1          do
005019d1          {
005019cb              result += DayGroup::pack_size(*(uint32_t*)m_data);
005019cd              m_data = &m_data[1];
005019d0              i = ebx_1;
005019d0              ebx_1 -= 1;
005019d1          } while (i != 1);
005019bb      }
005019bb      
005019d7      int32_t ecx_2 = (result & 3);
005019d7      
005019da      if (ecx_2 == 0)
005019ec          return result;
005019ec      
005019e6      return ((4 - ecx_2) + result);
005019b0  }

005019ed                                         90 90 90                                                               ...

005019f0  uint32_t __thiscall SkyDesc::Pack(class SkyDesc* this, void** arg2, uint32_t* arg3)

005019f0  {
00501a01      if (*(uint32_t*)arg3 >= 8)
00501a01      {
00501a08          **(uint64_t**)arg2 = ((double)((long double)this->tick_size));
00501a0a          *(uint32_t*)arg2 += 8;
00501a0f          uint32_t ecx_1 = (*(uint32_t*)arg3 - 8);
00501a17          *(uint32_t*)arg3 = ecx_1;
00501a17          
00501a19          if (ecx_1 >= 8)
00501a19          {
00501a20              **(uint64_t**)arg2 = ((double)((long double)this->light_tick_size));
00501a22              *(uint32_t*)arg2 += 8;
00501a25              *(uint32_t*)arg3 -= 8;
00501a19          }
00501a01      }
00501a01      
00501a2a      PackObj::ALIGN_PTR(arg2, arg3);
00501a31      uint32_t m_num = this->day_groups.m_num;
00501a31      
00501a3e      if (*(uint32_t*)arg3 >= 4)
00501a3e      {
00501a42          **(uint32_t**)arg2 = m_num;
00501a44          *(uint32_t*)arg2 += 4;
00501a47          *(uint32_t*)arg3 -= 4;
00501a3e      }
00501a3e      
00501a4a      int32_t ebx = 0;
00501a4a      
00501a4e      if (m_num > 0)
00501a4e      {
00501a64          do
00501a64          {
00501a58              DayGroup::Pack(this->day_groups.m_data[ebx], arg2, arg3);
00501a61              ebx += 1;
00501a64          } while (ebx < m_num);
00501a4e      }
00501a4e      
00501a6c      return *(uint32_t*)arg3;
005019f0  }

00501a6f                                               90                                                                 .

00501a70  int32_t __thiscall DayGroup::UnPack(class DayGroup* this, void** arg2, uint32_t* arg3)

00501a70  {
00501a79      uint32_t* ebp = arg3;
00501a79      
00501a88      if (*(uint32_t*)ebp >= 4)
00501a88      {
00501a8e          this->chance_of_occur = **(uint32_t**)arg2;
00501a91          *(uint32_t*)arg2 += 4;
00501a94          *(uint32_t*)ebp -= 4;
00501a88      }
00501a88      
00501a9f      int32_t result = AC1Legacy::PStringBase<char>::UnPack(this, arg2, *(uint32_t*)ebp);
00501a9f      
00501aa6      if (result == 0)
00501aae          return result;
00501aae      
00501ab7      int32_t eax_4 = (this->day_name.m_buffer->m_len - 1);
00501aba      int32_t ecx_2 = 0;
00501aba      
00501ac1      if (eax_4 >= 0xffff)
00501ac3          ecx_2 = 4;
00501ac3      
00501ace      int32_t edx_2 = (((ecx_2 + eax_4) + 2) & 3);
00501ad1      int32_t ecx_3;
00501ad1      
00501ad1      if (edx_2 == 0)
00501adc          ecx_3 = 0;
00501ad1      else
00501ad8          ecx_3 = (4 - edx_2);
00501ad8      
00501ae7      *(uint32_t*)ebp -= (ecx_3 + ((ecx_2 + eax_4) + 2));
00501aea      PackObj::ALIGN_PTR(arg2, ebp);
00501af8      uint32_t i_4;
00501af8      
00501af8      if (*(uint32_t*)ebp >= 4)
00501af8      {
00501afa          void* eax_7 = *(uint32_t*)arg2;
00501afc          uint32_t i_5 = *(uint32_t*)eax_7;
00501b01          *(uint32_t*)arg2 = ((char*)eax_7 + 4);
00501b09          i_4 = i_5;
00501b0d          *(uint32_t*)ebp -= 4;
00501af8      }
00501af8      
00501b1e      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->sky_objects, i_4);
00501b1e      
00501b29      if (i_4 > 0)
00501b29      {
00501b2b          uint32_t i_3 = i_4;
00501ba7          uint32_t i;
00501ba7          
00501ba7          do
00501ba7          {
00501b32              void* s = operator new(0x2c);
00501b3c              void* s_1;
00501b3c              
00501b3c              if (s == 0)
00501b64                  s_1 = nullptr;
00501b3c              else
00501b3c              {
00501b3e                  __builtin_memset(s, 0, 0x2c);
00501b5e                  s_1 = s;
00501b3c              }
00501b3c              
00501b6e              SkyObject::UnPack(s_1, arg2, ebp);
00501b73              uint32_t m_size = this->sky_objects.m_size;
00501b79              int32_t eax_13;
00501b79              
00501b79              if (this->sky_objects.m_num >= m_size)
00501b79              {
00501b7d                  uint32_t eax_12;
00501b7d                  
00501b7d                  if (m_size <= 0)
00501b83                      eax_12 = 8;
00501b7d                  else
00501b7f                      eax_12 = (m_size * 2);
00501b7f                  
00501b8b                  eax_13 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->sky_objects.m_data, eax_12);
00501b79              }
00501b79              
00501b92              if ((this->sky_objects.m_num < m_size || eax_13 != 0))
00501b92              {
00501b14                  this->sky_objects.m_data[this->sky_objects.m_num] = s_1;
00501b14                  this->sky_objects.m_num += 1;
00501b92              }
00501b92              
00501ba3              i = i_3;
00501ba3              i_3 -= 1;
00501ba7          } while (i != 1);
00501b29      }
00501b29      
00501bad      if (*(uint32_t*)ebp >= 4)
00501bad      {
00501baf          void* eax_15 = *(uint32_t*)arg2;
00501bb1          uint32_t i_6 = *(uint32_t*)eax_15;
00501bb6          *(uint32_t*)arg2 = ((char*)eax_15 + 4);
00501bbe          i_4 = i_6;
00501bc2          *(uint32_t*)ebp -= 4;
00501bad      }
00501bad      
00501bd5      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->sky_time, i_4);
00501bd5      
00501be0      if (i_4 > 0)
00501be0      {
00501be6          uint32_t i_2 = i_4;
00501cb8          uint32_t i_1;
00501cb8          
00501cb8          do
00501cb8          {
00501bf2              void* eax_20 = operator new(0x38);
00501bfc              void* esi_2;
00501bfc              
00501bfc              if (eax_20 == 0)
00501c46                  esi_2 = nullptr;
00501bfc              else
00501bfc              {
00501bfe                  *(uint32_t*)eax_20 = 0;
00501c00                  *(uint32_t*)((char*)eax_20 + 4) = 0;
00501c03                  *(uint32_t*)((char*)eax_20 + 8) = 0;
00501c06                  *(uint32_t*)((char*)eax_20 + 0xc) = 0;
00501c09                  *(uint32_t*)((char*)eax_20 + 0x14) = 0;
00501c0c                  *(uint32_t*)((char*)eax_20 + 0x1c) = 0;
00501c0f                  *(uint32_t*)((char*)eax_20 + 0x20) = 0;
00501c12                  *(uint32_t*)((char*)eax_20 + 0x24) = 0;
00501c15                  *(uint32_t*)((char*)eax_20 + 0x2c) = 0;
00501c18                  *(uint32_t*)((char*)eax_20 + 0x30) = 0;
00501c1b                  *(uint32_t*)((char*)eax_20 + 0x34) = 0;
00501c1e                  *(uint8_t*)((char*)eax_20 + 0x12) = 0xff;
00501c21                  *(uint8_t*)((char*)eax_20 + 0x11) = 0xff;
00501c24                  *(uint8_t*)((char*)eax_20 + 0x10) = 0xff;
00501c27                  *(uint8_t*)((char*)eax_20 + 0x13) = 0xff;
00501c2a                  *(uint8_t*)((char*)eax_20 + 0x1a) = 0xff;
00501c2d                  *(uint8_t*)((char*)eax_20 + 0x19) = 0xff;
00501c30                  *(uint8_t*)((char*)eax_20 + 0x18) = 0xff;
00501c33                  *(uint8_t*)((char*)eax_20 + 0x1b) = 0xff;
00501c36                  *(uint8_t*)((char*)eax_20 + 0x2a) = 0xff;
00501c39                  *(uint8_t*)((char*)eax_20 + 0x29) = 0xff;
00501c3c                  *(uint8_t*)((char*)eax_20 + 0x28) = 0xff;
00501c3f                  *(uint8_t*)((char*)eax_20 + 0x2b) = 0xff;
00501c42                  esi_2 = eax_20;
00501bfc              }
00501bfc              
00501c50              SkyTimeOfDay::UnPack(esi_2, arg2, ebp);
00501c58              int32_t j = 0;
00501c58              
00501c5c              if (*(uint32_t*)((char*)esi_2 + 0x34) > 0)
00501c5c              {
00501c7c                  do
00501c7c                  {
00501c63                      int32_t* ecx_14 = *(uint32_t*)(*(uint32_t*)((char*)esi_2 + 0x2c) + (j << 2));
00501c73                      ecx_14[1] = this->sky_objects.m_data[*(uint32_t*)ecx_14];
00501c79                      j += 1;
00501c7c                  } while (j < *(uint32_t*)((char*)esi_2 + 0x34));
00501c7c                  
00501c7e                  ebp = arg3;
00501c5c              }
00501c5c              
00501c82              class AC1Legacy::SmartArray<SkyTimeOfDay *>* ecx_16 = &this->sky_time;
00501c86              uint32_t m_size_1 = ecx_16->m_size;
00501c86              
00501c8c              if (ecx_16->m_num < m_size_1)
00501c8c              {
00501cac                  ecx_16->m_data[ecx_16->m_num] = esi_2;
00501cb1                  ecx_16->m_num += 1;
00501c8c              }
00501c8c              else
00501c8c              {
00501c90                  uint32_t eax_22;
00501c90                  
00501c90                  if (m_size_1 <= 0)
00501c96                      eax_22 = 8;
00501c90                  else
00501c92                      eax_22 = (m_size_1 * 2);
00501c92                  
00501ca3                  if (AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(ecx_16, eax_22) != 0)
00501ca3                  {
00501ca5                      ecx_16 = &this->sky_time;
00501cac                      ecx_16->m_data[ecx_16->m_num] = esi_2;
00501cb1                      ecx_16->m_num += 1;
00501ca3                  }
00501c8c              }
00501c8c              
00501cb4              i_1 = i_2;
00501cb4              i_2 -= 1;
00501cb8          } while (i_1 != 1);
00501be0      }
00501be0      
00501cca      return 1;
00501a70  }

00501ccd                                         90 90 90                                                               ...

00501cd0  int32_t __thiscall SkyDesc::UnPack(class SkyDesc* this, void** arg2, uint32_t* arg3)

00501cd0  {
00501cd4      void** ebx = arg2;
00501cdb      uint32_t* edi = arg3;
00501cdb      
00501ce4      if (*(uint32_t*)edi >= 8)
00501ce4      {
00501ce6          void* eax_1 = *(uint32_t*)ebx;
00501cea          this->tick_size = *(uint32_t*)eax_1;
00501cf0          *(uint32_t*)((char*)this->tick_size)[4] = *(uint32_t*)((char*)eax_1 + 4);
00501cf3          *(uint32_t*)ebx += 8;
00501cf8          uint32_t ecx_2 = (*(uint32_t*)edi - 8);
00501d00          *(uint32_t*)edi = ecx_2;
00501d00          
00501d02          if (ecx_2 >= 8)
00501d02          {
00501d04              void* eax_3 = *(uint32_t*)ebx;
00501d08              this->light_tick_size = *(uint32_t*)eax_3;
00501d0e              *(uint32_t*)((char*)this->light_tick_size)[4] = *(uint32_t*)((char*)eax_3 + 4);
00501d11              *(uint32_t*)ebx += 8;
00501d14              *(uint32_t*)edi -= 8;
00501d02          }
00501ce4      }
00501ce4      
00501d19      PackObj::ALIGN_PTR(ebx, edi);
00501d19      
00501d26      if (*(uint32_t*)edi >= 4)
00501d26      {
00501d28          void* eax_5 = *(uint32_t*)ebx;
00501d2a          void** ecx_4 = *(uint32_t*)eax_5;
00501d2f          *(uint32_t*)ebx = ((char*)eax_5 + 4);
00501d36          arg2 = ecx_4;
00501d3a          *(uint32_t*)edi -= 4;
00501d26      }
00501d26      
00501d48      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->day_groups, arg2);
00501d55      int32_t var_8 = 0;
00501d55      
00501d59      if (arg2 > 0)
00501d59      {
00501df4          bool cond:3_1;
00501df4          
00501df4          do
00501df4          {
00501d62              void* eax_10 = operator new(0x20);
00501d62              
00501d6e              if (eax_10 == 0)
00501d9e                  arg3 = nullptr;
00501d6e              else
00501d6e              {
00501d70                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00501d7b                  *(uint32_t*)eax_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00501d7d                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00501d83                  __builtin_memset(((char*)eax_10 + 4), 0, 0x1c);
00501d98                  arg3 = eax_10;
00501d6e              }
00501d6e              
00501daf              if (DayGroup::UnPack(arg3, ebx, edi) == 0)
00501e12                  return 0;
00501e12              
00501db5              uint32_t m_size = this->day_groups.m_size;
00501dbb              int32_t eax_13;
00501dbb              
00501dbb              if (this->day_groups.m_num >= m_size)
00501dbb              {
00501dbf                  uint32_t eax_12;
00501dbf                  
00501dbf                  if (m_size <= 0)
00501dc5                      eax_12 = 8;
00501dbf                  else
00501dc1                      eax_12 = (m_size * 2);
00501dc1                  
00501dcd                  eax_13 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->day_groups, eax_12);
00501dbb              }
00501dbb              
00501dd4              if ((this->day_groups.m_num < m_size || eax_13 != 0))
00501dd4              {
00501d40                  this->day_groups.m_data[this->day_groups.m_num] = arg3;
00501d40                  this->day_groups.m_num += 1;
00501dd4              }
00501dd4              
00501dee              cond:3_1 = (var_8 + 1) < arg2;
00501df0              var_8 += 1;
00501df4          } while (cond:3_1);
00501d59      }
00501d59      
00501e06      return 1;
00501cd0  }

00501e15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00501e20  void __fastcall SkyDesc::Destroy(class SkyDesc* this)

00501e20  {
00501e2a      int32_t i = 0;
00501e2c      bool cond:0 = this->day_groups.m_num <= 0;
00501e2e      this->present_day_group = 0;
00501e30      this->tick_size = 0f;
00501e33      *(uint32_t*)((char*)this->tick_size)[4] = 0x40080000;
00501e3a      this->light_tick_size = 0f;
00501e3d      *(uint32_t*)((char*)this->light_tick_size)[4] = 0x40340000;
00501e3d      
00501e44      if (!(cond:0))
00501e44      {
00501e9a          do
00501e9a          {
00501e4a              int32_t* esi_1 = this->day_groups.m_data[i];
00501e4a              
00501e4f              if (esi_1 != 0)
00501e4f              {
00501e53                  DayGroup::Destroy(esi_1);
00501e5c                  operator delete[](esi_1[5]);
00501e65                  operator delete[](esi_1[2]);
00501e6a                  int32_t* ebx_1 = *(uint32_t*)esi_1;
00501e6a                  
00501e7f                  if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
00501e87                      **(uint32_t**)ebx_1(1);
00501e87                  
00501e8a                  operator delete(esi_1);
00501e4f              }
00501e4f              
00501e97              i += 1;
00501e9a          } while (i < this->day_groups.m_num);
00501e44      }
00501e44      
00501ea1      this->day_groups.m_num = 0;
00501ea4      this->day_groups.m_size = 0;
00501ea7      operator delete[](this->day_groups.m_data);
00501eaf      this->day_groups.m_data = 0;
00501e20  }

00501eb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00501ec0  void __thiscall SkyDesc::GetSky(class SkyDesc* this, float arg2, class AC1Legacy::SmartArray<CelestialPosition>* arg3)

00501ec0  {
00501ec9      class AC1Legacy::SmartArray<CelestialPosition>* ebx = arg3;
00501ecd      uint32_t m_num_2 = ebx->m_num;
00501ed2      class DayGroup* esi = this->day_groups.m_data[this->present_day_group];
00501ed5      uint32_t m_num_4 = esi->sky_objects.m_num;
00501edb      class DayGroup* var_3c = esi;
00501edb      
00501edf      if (m_num_2 < m_num_4)
00501edf      {
00501eec          void s;
00501eec          __builtin_memset(&s, 0, 0x2c);
00501ef2          arg3 = (m_num_4 - m_num_2);
00501f3b          class AC1Legacy::SmartArray<CelestialPosition>* i;
00501f3b          
00501f3b          do
00501f3b          {
00501ef6              uint32_t m_size = ebx->m_size;
00501efc              int32_t eax_4;
00501efc              
00501efc              if (ebx->m_num >= m_size)
00501efc              {
00501f00                  uint32_t eax_3;
00501f00                  
00501f00                  if (m_size <= 0)
00501f06                      eax_3 = 8;
00501f00                  else
00501f02                      eax_3 = (m_size * 2);
00501f02                  
00501f0e                  eax_4 = AC1Legacy::SmartArray<CelestialPosition>::grow(ebx, eax_3);
00501efc              }
00501efc              
00501f15              if ((ebx->m_num < m_size || eax_4 != 0))
00501f15              {
00501f2a                  __builtin_memcpy(((ebx->m_num * 0x2c) + ebx->m_data), &s, 0x2c);
00501f2f                  esi = var_3c;
00501f34                  ebx->m_num += 1;
00501f15              }
00501f15              
00501f37              i = arg3;
00501f37              arg3 -= 1;
00501f3b          } while (i != 1);
00501edf      }
00501edf      
00501f40      while (ebx->m_num > m_num_4)
00501f40      {
00501f42          uint32_t m_num = ebx->m_num;
00501f42          
00501f47          if (m_num_4 < m_num)
00501f47          {
00501f4c              ebx->m_num = (m_num - 1);
00501f4c              
00501f4f              if (m_num_4 != (m_num - 1))
00501f4f              {
00501f51                  class CelestialPosition* m_data = ebx->m_data;
00501f66                  __builtin_memcpy(((m_num_4 * 0x2c) + m_data), (((m_num - 1) * 0x2c) + m_data), 0x2c);
00501f68                  esi = var_3c;
00501f4f              }
00501f47          }
00501f40      }
00501f40      
00501f74      int32_t i_1 = 0;
00501f74      
00501f78      if (esi->sky_objects.m_num > 0)
00501f78      {
00501f7e          uint32_t* ecx_3 = nullptr;
00501f7e          
0050204a          do
0050204a          {
00501f88              void* edx_1 = esi->sky_objects.m_data[i_1];
00501f8b              long double x87_r7_1 = ((long double)*(uint32_t*)((char*)edx_1 + 4));
00501f8e              long double temp1_1 = ((long double)*(uint32_t*)((char*)edx_1 + 8));
00501f8e              (x87_r7_1 - temp1_1);
00501f91              uint32_t eax_8;
00501f91              eax_8 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00501f93              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00501f96              uint32_t id;
00501f96              
00501f96              if (!(p_1))
00501fbc                  id = *(uint32_t*)((char*)edx_1 + 0x24);
00501f96              else
00501f96              {
00501f98                  long double x87_r7_2 = ((long double)arg2);
00501f9c                  long double temp2_1 = ((long double)*(uint32_t*)((char*)edx_1 + 4));
00501f9c                  (x87_r7_2 - temp2_1);
00501f9f                  eax_8 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00501f9f                  
00501fa4                  if ((*(uint8_t*)((char*)eax_8)[1] & 0x41) != 0)
00501fb4                      id = INVALID_DID.id;
00501fa4                  else
00501fa4                  {
00501fa6                      long double x87_r7_3 = ((long double)arg2);
00501faa                      long double temp4_1 = ((long double)*(uint32_t*)((char*)edx_1 + 8));
00501faa                      (x87_r7_3 - temp4_1);
00501fad                      eax_8 = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00501faf                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00501faf                      
00501fb2                      if (!(p_2))
00501fbc                          id = *(uint32_t*)((char*)edx_1 + 0x24);
00501fb2                      else
00501fb4                          id = INVALID_DID.id;
00501fa4                  }
00501f96              }
00501f96              
00501fc1              *(uint32_t*)((char*)ecx_3 + ebx->m_data) = id;
00501fc9              *(uint32_t*)(&ebx->m_data->pes_id + ecx_3) = *(uint32_t*)((char*)edx_1 + 0x28);
00501fd2              *(uint32_t*)(&ebx->m_data->properties + ecx_3) = *(uint32_t*)((char*)edx_1 + 0x20);
00501fd8              *(uint32_t*)(&ebx->m_data->heading + ecx_3) = 0;
00501fe0              long double x87_r7_4 = ((long double)*(uint32_t*)((char*)edx_1 + 4));
00501fe3              long double temp3_1 = ((long double)*(uint32_t*)((char*)edx_1 + 8));
00501fe3              (x87_r7_4 - temp3_1);
00501fe6              class CelestialPosition* eax_12;
00501fe6              eax_12 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
00501fe8              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
00501feb              long double x87_r7_5;
00501feb              
00501feb              if (p_3)
00502009                  x87_r7_5 = ((((((long double)*(uint32_t*)((char*)edx_1 + 0x10)) - ((long double)*(uint32_t*)((char*)edx_1 + 0xc))) * (((long double)arg2) - ((long double)*(uint32_t*)((char*)edx_1 + 4)))) / (((long double)*(uint32_t*)((char*)edx_1 + 8)) - ((long double)*(uint32_t*)((char*)edx_1 + 4)))) + ((long double)*(uint32_t*)((char*)edx_1 + 0xc)));
00501feb              else
00501fed                  x87_r7_5 = ((long double)*(uint32_t*)((char*)edx_1 + 0xc));
00501fed              
0050200e              *(uint32_t*)(&ebx->m_data->rotation + ecx_3) = ((float)x87_r7_5);
00502019              void* eax_15 = (&ebx->m_data->tex_velocity + ecx_3);
0050201d              *(uint32_t*)eax_15 = *(uint32_t*)((char*)edx_1 + 0x14);
00502022              *(uint32_t*)((char*)eax_15 + 4) = *(uint32_t*)((char*)edx_1 + 0x18);
00502028              esi = var_3c;
0050202c              *(uint32_t*)((char*)eax_15 + 8) = *(uint32_t*)((char*)edx_1 + 0x1c);
00502031              *(uint32_t*)(&ebx->m_data->luminosity + ecx_3) = 0xbf800000;
00502037              *(uint32_t*)(&ebx->m_data->max_bright + ecx_3) = 0xbf800000;
0050203d              *(uint32_t*)(&ebx->m_data->transparent + ecx_3) = 0xbf800000;
00502044              i_1 += 1;
00502045              ecx_3 = &ecx_3[0xb];
0050204a          } while (i_1 < esi->sky_objects.m_num);
00501f78      }
00501f78      
00502054      float* var_50_2 = &arg3;
0050205d      class SkyTimeOfDay* var_30;
0050205d      class SkyTimeOfDay** var_54 = &var_30;
00502062      class SkyTimeOfDay* var_34;
00502062      class SkyTimeOfDay** var_58 = &var_34;
00502062      
0050206d      if (DayGroup::GetTimeOfDay(esi, arg2, var_58, var_54, var_50_2) != 0)
0050206d      {
00502073          class SkyTimeOfDay* ecx_6 = var_34;
0050207a          int32_t i_2 = 0;
0050207e          int32_t i_3 = 0;
0050207e          
00502082          if (ecx_6->sky_obj_replace.m_num > 0)
00502082          {
00502231              do
00502231              {
00502093                  void* esi_8 = ecx_6->sky_obj_replace.m_data[i_2];
0050209a                  uint32_t m_num_1 = var_3c->sky_objects.m_num;
0050209d                  int32_t j = *(uint32_t*)((char*)esi_8 + 4);
005020a0                  int32_t ecx_7 = 0;
005020a0                  
005020a4                  if (m_num_1 > 0)
005020a4                  {
005020a6                      class SkyObject** m_data_1 = var_3c->sky_objects.m_data;
005020a6                      
005020b2                      while (j != *(uint32_t*)m_data_1)
005020b2                      {
005020b4                          ecx_7 += 1;
005020b5                          m_data_1 = &m_data_1[1];
005020b5                          
005020ba                          if (ecx_7 >= m_num_1)
005020ba                              break;
005020b2                      }
005020a4                  }
005020a4                  
005020bc                  int32_t eax_19 = *(uint32_t*)((char*)esi_8 + 8);
005020bc                  
005020c1                  if (eax_19 != 0)
005020ca                      *(uint32_t*)((ecx_7 * 0x2c) + ebx->m_data) = eax_19;
005020ca                  
005020db                  long double x87_r7_10 = ((long double)var_34->sky_obj_replace.m_data[i_3]->rotate);
005020de                  long double temp5_1 = ((long double)0f);
005020de                  (x87_r7_10 - temp5_1);
005020e4                  int32_t eax_21;
005020e4                  eax_21 = ((((x87_r7_10 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005020e6                  bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
005020e6                  
005020e9                  if (p_4)
005020eb                      ebx->m_data[ecx_7].heading = ((float)x87_r7_10);
005020eb                  
005020fa                  long double x87_r7_11 = ((long double)*(uint32_t*)((char*)esi_8 + 0x14));
005020fd                  long double temp7_1 = ((long double)0f);
005020fd                  (x87_r7_11 - temp7_1);
00502103                  eax_21 = ((((x87_r7_11 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp7_1) ? 1 : 0) << 0xe) | 0))));
00502103                  
00502108                  if ((*(uint8_t*)((char*)eax_21)[1] & 0x41) == 0)
00502108                  {
0050212e                  label_50212e:
0050212e                      class SkyTimeOfDay* ebp_1 = var_30;
00502132                      uint32_t m_num_3 = ebp_1->sky_obj_replace.m_num;
00502135                      int32_t eax_23 = 0;
00502135                      
00502139                      if (m_num_3 > 0)
00502139                      {
0050213e                          arg2 = ebp_1->sky_obj_replace.m_data;
0050213e                          
0050214c                          while (j != *(uint32_t*)(*(uint32_t*)arg2 + 4))
0050214c                          {
00502152                              eax_23 += 1;
00502158                              arg2 += 4;
00502158                              
0050215c                              if (eax_23 >= m_num_3)
0050215c                                  break;
0050214c                          }
00502139                      }
00502139                      
00502160                      if (eax_23 < m_num_3)
00502160                      {
00502166                          long double x87_r7_14 = ((long double)*(uint32_t*)((char*)esi_8 + 0x14));
0050216d                          long double temp10_1 = ((long double)0f);
0050216d                          (x87_r7_14 - temp10_1);
00502176                          void* edx_15 = var_30->sky_obj_replace.m_data[eax_23];
00502179                          eax_23 = ((((x87_r7_14 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_14, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_14 == temp10_1) ? 1 : 0) << 0xe) | 0))));
00502179                          
0050217e                          if ((*(uint8_t*)((char*)eax_23)[1] & 0x41) == 0)
0050217e                          {
00502180                              long double x87_r7_15 = ((long double)*(uint32_t*)((char*)edx_15 + 0x14));
00502183                              long double temp12_1 = ((long double)0f);
00502183                              (x87_r7_15 - temp12_1);
00502189                              eax_23 = ((((x87_r7_15 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_15, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7_15 == temp12_1) ? 1 : 0) << 0xe) | 0))));
00502189                              
0050218e                              if ((*(uint8_t*)((char*)eax_23)[1] & 0x41) == 0)
0050218e                              {
00502190                                  long double x87_r7_16 = ((long double)*(uint32_t*)((char*)esi_8 + 0x14));
00502193                                  ebx->m_data[ecx_7].luminosity = ((float)(((((long double)*(uint32_t*)((char*)edx_15 + 0x14)) - x87_r7_16) * ((long double)arg3)) + x87_r7_16));
0050218e                              }
0050217e                          }
0050217e                          
005021ab                          long double x87_r7_17 = ((long double)*(uint32_t*)((char*)esi_8 + 0x18));
005021ae                          long double temp11_1 = ((long double)0f);
005021ae                          (x87_r7_17 - temp11_1);
005021b4                          eax_23 = ((((x87_r7_17 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp11_1) ? 1 : 0) << 0xe) | 0))));
005021b4                          
005021b9                          if ((*(uint8_t*)((char*)eax_23)[1] & 0x41) == 0)
005021b9                          {
005021bb                              long double x87_r7_18 = ((long double)*(uint32_t*)((char*)edx_15 + 0x18));
005021be                              long double temp14_1 = ((long double)0f);
005021be                              (x87_r7_18 - temp14_1);
005021c4                              eax_23 = ((((x87_r7_18 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_18, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r7_18 == temp14_1) ? 1 : 0) << 0xe) | 0))));
005021c4                              
005021c9                              if ((*(uint8_t*)((char*)eax_23)[1] & 0x41) == 0)
005021c9                              {
005021cb                                  long double x87_r7_19 = ((long double)*(uint32_t*)((char*)esi_8 + 0x18));
005021ce                                  ebx->m_data[ecx_7].max_bright = ((float)(((((long double)*(uint32_t*)((char*)edx_15 + 0x18)) - x87_r7_19) * ((long double)arg3)) + x87_r7_19));
005021c9                              }
005021b9                          }
005021b9                          
005021e6                          long double x87_r7_20 = ((long double)*(uint32_t*)((char*)esi_8 + 0x10));
005021e9                          long double temp13_1 = ((long double)0f);
005021e9                          (x87_r7_20 - temp13_1);
005021ef                          eax_23 = ((((x87_r7_20 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_20, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r7_20 == temp13_1) ? 1 : 0) << 0xe) | 0))));
005021ef                          
005021f4                          if ((*(uint8_t*)((char*)eax_23)[1] & 1) == 0)
005021f4                          {
005021f6                              long double x87_r7_21 = ((long double)*(uint32_t*)((char*)edx_15 + 0x10));
005021f9                              long double temp15_1 = ((long double)0f);
005021f9                              (x87_r7_21 - temp15_1);
005021ff                              eax_23 = ((((x87_r7_21 < temp15_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, temp15_1))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == temp15_1) ? 1 : 0) << 0xe) | 0))));
005021ff                              
00502204                              if ((*(uint8_t*)((char*)eax_23)[1] & 1) == 0)
00502204                              {
00502206                                  long double x87_r7_22 = ((long double)*(uint32_t*)((char*)esi_8 + 0x10));
00502211                                  ebx->m_data[ecx_7].transparent = ((float)(((((long double)*(uint32_t*)((char*)edx_15 + 0x10)) - x87_r7_22) * ((long double)arg3)) + x87_r7_22));
00502204                              }
005021f4                          }
00502160                      }
00502108                  }
00502108                  else
00502108                  {
0050210a                      long double x87_r7_12 = ((long double)*(uint32_t*)((char*)esi_8 + 0x18));
0050210d                      long double temp8_1 = ((long double)0f);
0050210d                      (x87_r7_12 - temp8_1);
00502113                      eax_21 = ((((x87_r7_12 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp8_1) ? 1 : 0) << 0xe) | 0))));
00502113                      
00502118                      if ((*(uint8_t*)((char*)eax_21)[1] & 0x41) == 0)
00502118                          goto label_50212e;
00502118                      
0050211a                      long double x87_r7_13 = ((long double)*(uint32_t*)((char*)esi_8 + 0x10));
0050211d                      long double temp9_1 = ((long double)0f);
0050211d                      (x87_r7_13 - temp9_1);
00502123                      eax_21 = ((((x87_r7_13 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp9_1) ? 1 : 0) << 0xe) | 0))));
00502123                      
00502128                      if ((*(uint8_t*)((char*)eax_21)[1] & 1) == 0)
00502128                          goto label_50212e;
00502108                  }
00502108                  
00502223                  ecx_6 = var_34;
0050222a                  i_2 = (i_3 + 1);
0050222d                  i_3 = i_2;
00502231              } while (i_2 < ecx_6->sky_obj_replace.m_num);
00502082          }
0050206d      }
00501ec0  }

0050208a                                8d 9b 00 00 00 00                                                            ......
00502246                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00502250  void __fastcall SkyDesc::~SkyDesc(class SkyDesc* this)

00502250  {
00502253      SkyDesc::Destroy(this);
0050225c      operator delete[](this->day_groups.m_data);
00502250  }

00502266                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00502270  void __fastcall CSceneDesc::Destroy(class CSceneDesc* this)

00502270  {
00502277      int32_t i = 0;
00502277      
0050227b      if (this->scene_types.m_num > 0)
0050227b      {
0050227d          int32_t edi;
0050227d          int32_t var_c_1 = edi;
0050227d          
0050229f          do
0050229f          {
00502282              class CSceneType* edi_2 = this->scene_types.m_data[i];
00502282              
00502287              if (edi_2 != 0)
00502287              {
0050228b                  CSceneType::~CSceneType(edi_2);
00502291                  operator delete(edi_2);
00502287              }
00502287              
0050229c              i += 1;
0050229f          } while (i < this->scene_types.m_num);
0050227b      }
0050227b      
005022a5      this->scene_types.m_num = 0;
005022ac      this->scene_types.m_size = 0;
005022b3      operator delete[](this->scene_types.m_data);
005022bb      this->scene_types.m_data = 0;
00502270  }

005022c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005022d0  uint32_t __fastcall CSceneDesc::pack_size(class CSceneDesc* this)

005022d0  {
005022d8      int32_t i = 0;
005022dc      int32_t result = 4;
005022dc      
005022e1      if (this->scene_types.m_num > 0)
005022e1      {
005022f5          do
005022f5          {
005022ed              result += CSceneType::pack_size(this->scene_types.m_data[i]);
005022f2              i += 1;
005022f5          } while (i < this->scene_types.m_num);
005022e1      }
005022e1      
005022fc      return result;
005022d0  }

005022fd                                                                                         90 90 90                               ...

00502300  void __fastcall CSceneDesc::~CSceneDesc(class CSceneDesc* this)

00502300  {
00502303      CSceneDesc::Destroy(this);
0050230b      operator delete[](this->scene_types.m_data);
00502300  }

00502315                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00502320  void __thiscall CSceneDesc::GetSubDataIDs(class CSceneDesc const* this, class QualifiedDataIDArray* arg2)

00502320  {
0050232d      int32_t i = 0;
00502333      class CSceneDesc* this_1 = this;
00502337      int32_t i_1 = 0;
00502337      
0050233b      if (this->scene_types.m_num > 0)
0050233b      {
0050238e          do
0050238e          {
00502342              void* esi_1 = this->scene_types.m_data[i];
00502342              
0050234c              if (*(uint32_t*)((char*)esi_1 + 0xc) > 0)
0050234c              {
0050234e                  int32_t j = 0;
0050234e                  
0050237e                  do
0050237e                  {
00502353                      class IDClass<_tagDataID,32,0> eax_1 = *(uint32_t*)(*(uint32_t*)((char*)esi_1 + 4) + (j << 2));
00502353                      
0050235c                      if (eax_1 != INVALID_DID.id)
0050235c                      {
0050236f                          void var_10;
0050236f                          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, eax_1, 0), 8);
00502374                          this = this_1;
0050235c                      }
0050235c                      
0050237b                      j += 1;
0050237e                  } while (j < *(uint32_t*)((char*)esi_1 + 0xc));
0050237e                  
00502380                  i = i_1;
0050234c              }
0050234c              
00502387              i += 1;
0050238a              i_1 = i;
0050238e          } while (i < this->scene_types.m_num);
0050233b      }
00502320  }

00502399                                                                             90 90 90 90 90 90 90                           .......

005023a0  int32_t __thiscall CSceneDesc::Add(class CSceneDesc* this, class CSceneType* arg2)

005023a0  {
005023a3      uint32_t m_size = this->scene_types.m_size;
005023a3      
005023a9      if (this->scene_types.m_num >= m_size)
005023a9      {
005023ad          uint32_t eax;
005023ad          
005023ad          if (m_size <= 0)
005023b3              eax = 8;
005023ad          else
005023af              eax = (m_size * 2);
005023af          
005023bb          int32_t result = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(this, eax);
005023bb          
005023c2          if (result == 0)
005023c5              return result;
005023a9      }
005023a9      
005023cb      this->scene_types.m_data[this->scene_types.m_num] = arg2;
005023d4      this->scene_types.m_num += 1;
005023dd      return 1;
005023a0  }


005023e0  void __thiscall CTerrainDesc::GetSubDataIDs(class CTerrainDesc const* this, class QualifiedDataIDArray* arg2)

005023e0  {
005023e2      /* tailcall */
005023e2      return LandSurf::GetSubDataIDs(this->land_surfaces, arg2);
005023e0  }

005023e7                       90 90 90 90 90 90 90 90 90                                                         .........

005023f0  void __fastcall Box2D::Box2D(class Box2D* this)

005023f0  {
005023f4      this->m_x0 = 0;
005023f6      this->m_y0 = 0;
005023f9      this->m_x1 = 0;
005023fc      this->m_y1 = 0;
005023f0  }


00502400  class AmbientSTBDesc* __thiscall CTerrainDesc::GetSTBDesc(class CTerrainDesc* this, uint32_t arg2, uint32_t arg3)

00502400  {
00502407      if (arg2 < this->terrain_types.m_num)
00502407      {
0050240c          void* eax = this->terrain_types.m_data[arg2];
0050240c          
00502416          if (arg3 < *(uint32_t*)((char*)eax + 0x10))
00502416          {
0050241b              void* eax_1 = *(uint32_t*)(*(uint32_t*)((char*)eax + 8) + (arg3 << 2));
0050241b              
00502420              if (eax_1 != 0)
00502425                  return *(uint32_t*)((char*)eax_1 + 0x10);
00502416          }
00502407      }
00502407      
0050242a      return 0;
00502400  }

0050242d                                         90 90 90                                                               ...

00502430  uint32_t __thiscall CTerrainDesc::NumSceneType(class CTerrainDesc* this, uint32_t arg2)

00502430  {
00502437      if (arg2 >= this->terrain_types.m_num)
00502447          return 0;
00502447      
00502442      return this->terrain_types.m_data[arg2]->scene_types.m_num;
00502430  }

0050244a                                90 90 90 90 90 90                                                            ......

00502450  uint32_t __thiscall CTerrainDesc::SceneCount(class CTerrainDesc* this, uint32_t arg2, uint32_t arg3)

00502450  {
00502457      if (arg2 < this->terrain_types.m_num)
00502457      {
0050245c          void* eax = this->terrain_types.m_data[arg2];
0050245c          
00502466          if (arg3 < *(uint32_t*)((char*)eax + 0x10))
00502466          {
0050246b              void* eax_1 = *(uint32_t*)(*(uint32_t*)((char*)eax + 8) + (arg3 << 2));
0050246b              
00502470              if (eax_1 != 0)
00502475                  return *(uint32_t*)((char*)eax_1 + 0xc);
00502466          }
00502457      }
00502457      
0050247a      return 0;
00502450  }

0050247d                                                                                         90 90 90                               ...

00502480  class IDClass<_tagDataID,32,0>* __thiscall CTerrainDesc::GetScene(class CTerrainDesc* this, class IDClass<_tagDataID,32,0>* __return, uint32_t arg3, uint32_t arg4, uint32_t arg5)

00502480  {
00502491      void* eax_1 = this->terrain_types.m_data[arg3]->scene_types.m_data[arg4];
00502491      
0050249b      if (arg5 < *(uint32_t*)((char*)eax_1 + 0xc))
0050249b      {
005024a7          __return->id = *(uint32_t*)(*(uint32_t*)((char*)eax_1 + 4) + (arg5 << 2));
005024a9          return __return;
0050249b      }
0050249b      
005024b6      __return->id = INVALID_DID.id;
005024b8      return __return;
00502480  }

005024bb                                                                                   90 90 90 90 90                             .....

005024c0  void __fastcall CTerrainType::CTerrainType(class CTerrainType* this)

005024c0  {
005024c0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005024c6      class AC1Legacy::PSRefBuffer<char>** this_1 = this;
005024ce      *(uint32_t*)this_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005024d0      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005024d8      this_1[2] = 0;
005024db      this_1[3] = 0;
005024de      this_1[4] = 0;
005024e3      *(uint8_t*)((char*)this_1 + 6) = 0xff;
005024e6      *(uint8_t*)((char*)this_1 + 5) = 0xff;
005024e9      this_1[1] = 0xff;
005024ec      *(uint8_t*)((char*)this_1 + 7) = 0xff;
005024c0  }

005024f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00502500  void __fastcall CTerrainDesc::Destroy(class CTerrainDesc* this)

00502500  {
00502500      class CTerrainDesc* this_1 = this;
0050250a      int32_t i = 0;
0050250f      int32_t i_1 = 0;
0050250f      
00502513      if (this->terrain_types.m_num > 0)
00502513      {
00502570          do
00502570          {
00502519              int32_t* esi_1 = this->terrain_types.m_data[i];
00502519              
0050251e              if (esi_1 != 0)
0050251e              {
00502520                  void* edx_1 = esi_1[2];
00502524                  esi_1[4] = 0;
00502527                  esi_1[3] = 0;
0050252a                  operator delete[](edx_1);
00502532                  esi_1[2] = 0;
00502535                  operator delete[](nullptr);
0050253a                  int32_t* edi_1 = *(uint32_t*)esi_1;
0050253a                  
0050254f                  if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00502557                      **(uint32_t**)edi_1(1);
00502557                  
0050255a                  operator delete(esi_1);
0050255f                  i = i_1;
0050251e              }
0050251e              
00502569              i += 1;
0050256c              i_1 = i;
00502570          } while (i < this->terrain_types.m_num);
00502513      }
00502513      
00502577      this->terrain_types.m_num = 0;
0050257a      this->terrain_types.m_size = 0;
0050257d      operator delete[](this->terrain_types.m_data);
00502582      this->terrain_types.m_data = 0;
00502585      class LandSurf* land_surfaces = this->land_surfaces;
00502585      
0050258c      if (land_surfaces != 0)
0050258c      {
00502590          LandSurf::~LandSurf(land_surfaces);
00502596          operator delete(land_surfaces);
0050258c      }
0050258c      
0050259f      this->land_surfaces = 0;
00502500  }

005025a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005025b0  int32_t __thiscall CTerrainDesc::Add(class CTerrainDesc* this, class CTerrainType* arg2)

005025b0  {
005025b0      uint32_t m_size = this->terrain_types.m_size;
005025b0      
005025ba      if (this->terrain_types.m_num >= m_size)
005025ba      {
005025be          uint32_t eax;
005025be          
005025be          if (m_size <= 0)
005025c4              eax = 8;
005025be          else
005025c0              eax = (m_size * 2);
005025c0          
005025cc          int32_t result = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->terrain_types, eax);
005025cc          
005025d3          if (result == 0)
005025d6              return result;
005025ba      }
005025ba      
005025b4      this->terrain_types.m_data[this->terrain_types.m_num] = arg2;
005025b4      this->terrain_types.m_num += 1;
005025ee      return 1;
005025b0  }

005025f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00502600  uint32_t __fastcall CTerrainDesc::pack_size(class CTerrainDesc* this)

00502600  {
00502600      class CTerrainDesc* this_1 = this;
00502601      uint32_t m_num = this->terrain_types.m_num;
0050260b      int32_t ebp = 4;
0050260b      
00502610      if (m_num > 0)
00502610      {
00502618          uint32_t ecx = m_num;
0050261a          class CTerrainType** m_data = this->terrain_types.m_data;
0050265b          uint32_t i;
0050265b          
0050265b          do
0050265b          {
00502620              class CTerrainType* edi_1 = *(uint32_t*)m_data;
00502627              int32_t eax_2 = (edi_1->terrain_name.m_buffer->m_len - 1);
00502628              int32_t edx_1 = 0;
00502628              
0050262f              if (eax_2 >= 0xffff)
00502631                  edx_1 = 4;
00502631              
0050263c              int32_t edx_3 = (((edx_1 + eax_2) + 2) & 3);
0050263f              int32_t eax_3;
0050263f              
0050263f              if (edx_3 == 0)
0050264a                  eax_3 = 0;
0050263f              else
00502646                  eax_3 = (4 - edx_3);
00502646              
00502655              ebp += (((eax_3 + (edi_1->scene_types.m_num << 2)) + 8) + ((edx_1 + eax_2) + 2));
00502657              m_data = &m_data[1];
0050265a              i = ecx;
0050265a              ecx -= 1;
0050265b          } while (i != 1);
00502610      }
00502610      
0050266f      return (LandSurf::pack_size(this->land_surfaces) + ebp);
00502600  }


00502670  void __fastcall CTerrainDesc::~CTerrainDesc(class CTerrainDesc* this)

00502670  {
00502673      CTerrainDesc::Destroy(this);
0050267c      operator delete[](this->terrain_types.m_data);
00502670  }

00502686                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00502690  int32_t __thiscall AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(class AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>* this, uint32_t arg2)

00502690  {
0050269c      if (arg2 >= this->m_num)
0050269c      {
005026a1          if (arg2 <= this->m_size)
00502718              return 1;
00502718          
005026a5          if (arg2 == 0)
005026a5          {
005026a7              class TChessPiece<CBasePiece>** m_data = this->m_data;
005026aa              this->m_num = arg2;
005026ad              this->m_size = arg2;
005026b0              operator delete[](m_data);
005026b9              this->m_data = arg2;
005026c2              return 1;
005026a5          }
005026a5          
005026cd          void* eax_2 = operator new[]((arg2 << 2));
005026cd          
005026d9          if (eax_2 != 0)
005026d9          {
005026de              if (this->m_data != 0)
005026de              {
005026e3                  int32_t i = 0;
005026e3                  
005026e7                  if (this->m_num > 0)
005026e7                  {
005026fe                      do
005026fe                      {
005026f5                          *(uint32_t*)((char*)eax_2 + (i << 2)) = this->m_data[i];
005026fb                          i += 1;
005026fe                      } while (i < this->m_num);
005026e7                  }
005026e7                  
00502703                  operator delete[](this->m_data);
005026de              }
005026de              
0050270b              this->m_data = eax_2;
0050270d              this->m_size = arg2;
00502718              return 1;
005026d9          }
0050269c      }
0050269c      
00502720      return 0;
00502690  }

00502723           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00502730  void __fastcall CSoundDesc::CSoundDesc(class CSoundDesc* this)

00502730  {
00502734      this->stb_desc.m_data = 0;
00502736      this->stb_desc.m_size = 0;
00502739      this->stb_desc.m_num = 0;
00502730  }

0050273d                                                                                         90 90 90                               ...

00502740  void __fastcall CSoundDesc::Destroy(class CSoundDesc* this)

00502740  {
00502747      int32_t i = 0;
00502747      
0050274b      if (this->stb_desc.m_num > 0)
0050274b      {
0050274d          int32_t edi;
0050274d          int32_t var_c_1 = edi;
0050274d          
0050276f          do
0050276f          {
00502752              class AmbientSTBDesc* edi_2 = this->stb_desc.m_data[i];
00502752              
00502757              if (edi_2 != 0)
00502757              {
0050275b                  AmbientSTBDesc::~AmbientSTBDesc(edi_2);
00502761                  operator delete(edi_2);
00502757              }
00502757              
0050276c              i += 1;
0050276f          } while (i < this->stb_desc.m_num);
0050274b      }
0050274b      
00502775      this->stb_desc.m_num = 0;
0050277c      this->stb_desc.m_size = 0;
00502783      operator delete[](this->stb_desc.m_data);
0050278b      this->stb_desc.m_data = 0;
00502740  }

00502794                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005027a0  uint32_t __fastcall CSoundDesc::pack_size(class CSoundDesc* this)

005027a0  {
005027a8      int32_t i = 0;
005027ac      int32_t result = 4;
005027ac      
005027b1      if (this->stb_desc.m_num > 0)
005027b1      {
005027c5          do
005027c5          {
005027bd              result += AmbientSTBDesc::pack_size(this->stb_desc.m_data[i]);
005027c2              i += 1;
005027c5          } while (i < this->stb_desc.m_num);
005027b1      }
005027b1      
005027c9      int32_t ecx_2 = (result & 3);
005027c9      
005027cc      if (ecx_2 == 0)
005027e2          return result;
005027e2      
005027da      return ((4 - ecx_2) + result);
005027a0  }

005027e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005027f0  uint32_t __thiscall CSoundDesc::Pack(class CSoundDesc* this, void** arg2, uint32_t* arg3)

005027f0  {
005027f0      uint32_t* eax = arg3;
00502801      uint32_t m_num = this->stb_desc.m_num;
00502801      
00502804      if (*(uint32_t*)eax >= 4)
00502804      {
00502809          **(uint32_t**)arg2 = m_num;
0050280b          *(uint32_t*)arg2 += 4;
0050280f          *(uint32_t*)eax -= 4;
00502804      }
00502804      
00502812      int32_t esi = 0;
00502812      
00502816      if (m_num > 0)
00502816      {
0050282b          do
0050282b          {
0050281f              AmbientSTBDesc::Pack(this->stb_desc.m_data[esi], arg2, eax);
00502824              eax = arg3;
00502828              esi += 1;
0050282b          } while (esi < m_num);
00502816      }
00502816      
00502830      int32_t i = 0;
00502830      
00502834      if (this->stb_desc.m_num <= 0)
0050285b          return *(uint32_t*)eax;
0050285b      
00502846      do
00502846      {
0050283b          AmbientSTBDesc::pack_size(this->stb_desc.m_data[i]);
00502843          i += 1;
00502846      } while (i < this->stb_desc.m_num);
00502846      
00502852      return *(uint32_t*)arg3;
005027f0  }

0050285e                                                                                            90 90                                ..

00502860  void __fastcall CSoundDesc::~CSoundDesc(class CSoundDesc* this)

00502860  {
00502863      CSoundDesc::Destroy(this);
0050286b      operator delete[](this->stb_desc.m_data);
00502860  }

00502875                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00502880  void __thiscall CSoundDesc::GetSubDataIDs(class CSoundDesc const* this, class QualifiedDataIDArray* arg2)

00502880  {
0050288a      int32_t i = 0;
0050288a      
0050288e      if (this->stb_desc.m_num > 0)
0050288e      {
005028c0          do
005028c0          {
0050289a              class IDClass<_tagDataID,32,0> id = this->stb_desc.m_data[i]->stb_id.id;
005028a2              void var_8;
005028a2              
005028a2              if (id != INVALID_DID.id)
005028b5                  QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, id, 0), 0);
005028bd              i += 1;
005028c0          } while (i < this->stb_desc.m_num);
0050288e      }
00502880  }

005028cb                                   90 90 90 90 90                                                             .....

005028d0  int32_t __thiscall CSoundDesc::UnPack(class CSoundDesc* this, void** arg2, uint32_t* arg3)

005028d0  {
005028d2      uint32_t* ebp = arg3;
005028de      uint32_t ebx;
005028de      
005028de      if (*(uint32_t*)ebp < 4)
005028f3          ebx = arg2;
005028de      else
005028de      {
005028e4          void* eax_1 = *(uint32_t*)arg2;
005028e6          ebx = *(uint32_t*)eax_1;
005028eb          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
005028ed          *(uint32_t*)ebp -= 4;
005028de      }
005028de      
005028f9      CSoundDesc::Destroy(this);
005028f9      
00502900      if (ebx > 0)
00502905          AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(this, ebx);
00502905      
0050290c      arg3 = nullptr;
0050290c      
00502914      if (ebx > 0)
00502914      {
00502979          bool cond:2_1;
00502979          
00502979          do
00502979          {
00502918              void* eax_3 = operator new(0x1c);
00502922              class AmbientSTBDesc* edi_1;
00502922              
00502922              if (eax_3 == 0)
0050292f                  edi_1 = nullptr;
00502922              else
0050292b                  edi_1 = AmbientSTBDesc::AmbientSTBDesc(eax_3);
0050292b              
00502940              if (AmbientSTBDesc::UnPack(edi_1, arg2, ebp) == 0)
0050298d                  return 0;
0050298d              
00502942              uint32_t m_size = this->stb_desc.m_size;
00502948              int32_t eax_8;
00502948              
00502948              if (this->stb_desc.m_num >= m_size)
00502948              {
0050294c                  uint32_t eax_7;
0050294c                  
0050294c                  if (m_size <= 0)
00502952                      eax_7 = 8;
0050294c                  else
0050294e                      eax_7 = (m_size * 2);
0050294e                  
0050295a                  eax_8 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(this, eax_7);
00502948              }
00502948              
00502961              if ((this->stb_desc.m_num < m_size || eax_8 != 0))
00502961              {
00502966                  this->stb_desc.m_data[this->stb_desc.m_num] = edi_1;
0050296b                  this->stb_desc.m_num += 1;
00502961              }
00502961              
00502973              cond:2_1 = ((char*)arg3 + 1) < ebx;
00502975              arg3 += 1;
00502979          } while (cond:2_1);
00502914      }
00502914      
00502984      return 1;
005028d0  }


00502990  void __fastcall CEncounterDesc::Destroy(class CEncounterDesc* this)

00502990  {
00502998      if (this->encounter_table != 0)
00502998      {
0050299d          int32_t i = 0;
0050299d          
005029a1          if (this->num_encounter_type > 0)
005029a1          {
005029d4              do
005029d4              {
005029a7                  int32_t* esi_1 = this->encounter_table[i];
005029a7                  
005029ac                  if (esi_1 != 0)
005029ac                  {
005029ae                      void* eax_3 = *(uint32_t*)esi_1;
005029ae                      
005029b2                      if (eax_3 != 0)
005029b8                          operator delete[](((char*)eax_3 - 4));
005029b8                      
005029c1                      *(uint32_t*)esi_1 = 0;
005029c7                      operator delete(esi_1);
005029ac                  }
005029ac                  
005029d1                  i += 1;
005029d4              } while (i < this->num_encounter_type);
005029a1          }
005029a1          
005029db          operator delete[](this->encounter_table);
005029e3          this->encounter_table = nullptr;
00502998      }
00502998      
005029eb      uint8_t* encounter_map = this->encounter_map;
005029eb      
005029f0      if (encounter_map != 0)
005029f0      {
005029f3          operator delete[](encounter_map);
005029fb          this->encounter_map = nullptr;
005029f0      }
005029f0      
00502a02      this->num_encounter_type = 0;
00502990  }

00502a0a                                90 90 90 90 90 90                                                            ......

00502a10  void __fastcall CEncounterDesc::~CEncounterDesc(class CEncounterDesc* this)

00502a10  {
00502a10      /* tailcall */
00502a10      return CEncounterDesc::Destroy(this);
00502a10  }

00502a15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00502a20  void __thiscall LandSurf::GetSubDataIDs(class LandSurf const* this, class QualifiedDataIDArray* arg2)

00502a20  {
00502a22      class PalShift* pal_shift = this->pal_shift;
00502a22      
00502a26      if (pal_shift == 0)
00502a30          /* tailcall */
00502a30          return TexMerge::GetSubDataIDs(this->tex_merge, arg2);
00502a30      
00502a28      /* tailcall */
00502a28      return PalShift::GetSubDataIDs(pal_shift, arg2);
00502a20  }

00502a35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00502a40  uint32_t __fastcall LandSurf::pack_size(class LandSurf* this)

00502a40  {
00502a42      class PalShift* pal_shift = this->pal_shift;
00502a42      
00502a46      if (pal_shift == 0)
00502a5c          return (TexMerge::pack_size(this->tex_merge) + 4);
00502a5c      
00502a50      return (PalShift::pack_size(pal_shift) + 4);
00502a40  }

00502a5d                                                                                         90 90 90                               ...

00502a60  uint32_t __fastcall LandSurf::NextFree(class LandSurf* this)

00502a60  {
00502a64      class CSurface** lsurf = this->lsurf;
00502a64      
00502a69      if (lsurf == 0)
00502a69      {
00502a70          this->num_lsurf = 0x28;
00502a77          void* eax = operator new[](0xa0);
00502a7c          uint32_t num_lsurf_1 = this->num_lsurf;
00502a7f          this->lsurf = eax;
00502a85          int32_t i = 0;
00502a85          
00502a89          if (num_lsurf_1 > 0)
00502a89          {
00502aa0              do
00502aa0              {
00502a90                  this->lsurf[i] = 0;
00502a9d                  i += 1;
00502aa0              } while (i < this->num_lsurf);
00502a89          }
00502a89          
00502aa6          return 0;
00502a69      }
00502a69      
00502aa8      uint32_t num_lsurf_3 = this->num_lsurf;
00502aab      uint32_t i_1 = 0;
00502aab      
00502aaf      if (num_lsurf_3 > 0)
00502aaf      {
00502ab1          class CSurface** lsurf_1 = lsurf;
00502ab1          
00502ac1          do
00502ac1          {
00502ab6              if (*(uint32_t*)lsurf_1 == 0)
00502b21                  return i_1;
00502b21              
00502abb              i_1 += 1;
00502abc              lsurf_1 = &lsurf_1[1];
00502ac1          } while (i_1 < this->num_lsurf);
00502aaf      }
00502aaf      
00502acf      void* eax_2 = operator new[](((num_lsurf_3 + 0x28) << 2));
00502ad4      uint32_t num_lsurf_2 = this->num_lsurf;
00502ad7      this->lsurf = eax_2;
00502add      int32_t i_2 = 0;
00502add      
00502ae1      if (num_lsurf_2 > 0)
00502ae1      {
00502af2          do
00502af2          {
00502ae3              this->lsurf[i_2] = lsurf[i_2];
00502aef              i_2 += 1;
00502af2          } while (i_2 < this->num_lsurf);
00502ae1      }
00502ae1      
00502af9      for (uint32_t num_lsurf = this->num_lsurf; num_lsurf < (num_lsurf_3 + 0x28); num_lsurf += 1)
00502b00          this->lsurf[num_lsurf] = 0;
00502b00      
00502b10      this->num_lsurf = (num_lsurf_3 + 0x28);
00502b13      operator delete[](lsurf);
00502b1b      return num_lsurf_3;
00502a60  }

00502a8d                                         8d 49 00                                                               .I.
00502afd                                                                                         8d 49 00                               .I.
00502b22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00502b30  uint32_t __thiscall LandSurf::GetDetailTiling(class LandSurf const* this, uint32_t arg2)

00502b30  {
00502b30      class TexMerge* tex_merge = this->tex_merge;
00502b30      
00502b35      if (tex_merge != 0)
00502b3c          /* tailcall */
00502b3c          return TexMerge::GetDetailTiling(tex_merge, arg2);
00502b3c      
00502b39      return 0;
00502b30  }

00502b41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00502b50  void __fastcall LandSurf::Destroy(class LandSurf* this)

00502b50  {
00502b55      class PalShift* pal_shift = this->pal_shift;
00502b55      
00502b5b      if (pal_shift != 0)
00502b5b      {
00502b5f          PalShift::~PalShift(pal_shift);
00502b65          operator delete(pal_shift);
00502b6d          this->pal_shift = 0;
00502b5b      }
00502b5b      
00502b72      if (this->tex_merge != 0)
00502b72      {
00502b7a          operator delete(TexMerge::tex_data);
00502b7f          TexMerge::tex_data = nullptr;
00502b85          class TexMerge* tex_merge = this->tex_merge;
00502b85          
00502b8d          if (tex_merge != 0)
00502b8d          {
00502b91              TexMerge::~TexMerge(tex_merge);
00502b97              operator delete(tex_merge);
00502b8d          }
00502b8d          
00502b9f          this->tex_merge = nullptr;
00502b72      }
00502b72      
00502ba2      class CSurface** lsurf = this->lsurf;
00502ba2      
00502ba7      if (lsurf != 0)
00502ba7      {
00502baa          operator delete[](lsurf);
00502bb2          this->lsurf = nullptr;
00502ba7      }
00502ba7      
00502bb6      this->num_unique_surfaces = 0;
00502bb9      this->num_lsurf = 0;
00502b50  }

00502bbf                                                                                               90                                 .

00502bc0  uint32_t __thiscall LandSurf::Pack(class LandSurf* this, void** arg2, uint32_t* arg3)

00502bc0  {
00502bd0      int32_t ecx;
00502bd0      ecx = this->pal_shift != 0;
00502bd0      
00502bda      if (*(uint32_t*)arg3 >= 4)
00502bda      {
00502bde          **(uint32_t**)arg2 = ecx;
00502be0          *(uint32_t*)arg2 += 4;
00502be3          *(uint32_t*)arg3 -= 4;
00502bda      }
00502bda      
00502bea      if (ecx == 0)
00502bf8          TexMerge::Pack(this->tex_merge, arg2, arg3);
00502bea      else
00502bee          PalShift::Pack(this->pal_shift, arg2, arg3);
00502bee      
00502bfd      class PalShift* pal_shift = this->pal_shift;
00502bfd      
00502c01      if (pal_shift != 0)
00502c01      {
00502c03          PalShift::pack_size(pal_shift);
00502c0c          return *(uint32_t*)arg3;
00502c01      }
00502c01      
00502c12      TexMerge::pack_size(this->tex_merge);
00502c1b      return *(uint32_t*)arg3;
00502bc0  }

00502c1e                                                                                            90 90                                ..

00502c20  int32_t __thiscall LandSurf::UnPack(class LandSurf* this, void** arg2, uint32_t* arg3)

00502c20  {
00502c30      uint32_t* ecx;
00502c30      
00502c30      if (*(uint32_t*)arg3 < 4)
00502c40          ecx = arg3;
00502c30      else
00502c30      {
00502c32          void* eax_1 = *(uint32_t*)arg2;
00502c34          ecx = *(uint32_t*)eax_1;
00502c39          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
00502c3b          *(uint32_t*)arg3 -= 4;
00502c30      }
00502c30      
00502c46      if (ecx != 0)
00502c46      {
00502c4a          void* eax_3 = operator new(0x18);
00502c4a          
00502c54          if (eax_3 == 0)
00502c54          {
00502c74              this->pal_shift = 0;
00502c7e              return PalShift::UnPack(nullptr, arg2, arg3);
00502c54          }
00502c54          
00502c58          class PalShift* eax_4 = PalShift::PalShift(eax_3);
00502c61          this->pal_shift = eax_4;
00502c6b          return PalShift::UnPack(eax_4, arg2, arg3);
00502c46      }
00502c46      
00502c83      void* eax_7 = operator new(0x34);
00502c83      
00502c8d      if (eax_7 == 0)
00502c8d      {
00502cae          this->tex_merge = nullptr;
00502cb9          return TexMerge::UnPack(nullptr, arg2, arg3);
00502c8d      }
00502c8d      
00502c91      class TexMerge* eax_8 = TexMerge::TexMerge(eax_7);
00502c9a      this->tex_merge = eax_8;
00502ca5      return TexMerge::UnPack(eax_8, arg2, arg3);
00502c20  }

00502cbc                                                                                      90 90 90 90                              ....

00502cc0  class IDClass<_tagDataID,32,0>* __thiscall LandSurf::GetDetailTex(class LandSurf const* this, class IDClass<_tagDataID,32,0>* __return, uint32_t arg3)

00502cc0  {
00502cc0      class TexMerge* tex_merge = this->tex_merge;
00502cc0      
00502cc5      if (tex_merge == 0)
00502cc5      {
00502cd1          __return->id = INVALID_DID.id;
00502cd3          return __return;
00502cc5      }
00502cc5      
00502ce1      TexMerge::GetDetailTex(tex_merge, __return, arg3);
00502ce9      return __return;
00502cc0  }

00502cec                                      90 90 90 90                                                              ....

00502cf0  void __fastcall LandSurf::~LandSurf(class LandSurf* this)

00502cf0  {
00502cf3      LandSurf::Destroy(this);
00502cf8      class LongNIValHash<SurfInfo *>* surf_info = this->surf_info;
00502cf8      
00502cfd      if (surf_info != 0)
00502cff          surf_info->vtable->__vecDelDtor(1);
00502cff      
00502d09      operator delete[](this->block_surf_array.m_data);
00502cf0  }

00502d13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00502d20  void __thiscall LongNIValHash<SurfInfo *>::add(class LongNIValHash<SurfInfo *>* this, class SurfInfo* arg2, uint32_t arg3)

00502d20  {
00502d26      void* eax = operator new(0x10);
00502d2b      void* edx = nullptr;
00502d2b      
00502d32      if (eax != 0)
00502d32      {
00502d38          *(uint32_t*)((char*)eax + 4) = 0;
00502d3f          *(uint32_t*)((char*)eax + 0xc) = arg2;
00502d42          *(uint32_t*)((char*)eax + 8) = arg3;
00502d45          *(uint32_t*)eax = 0x7c62f8;
00502d4b          edx = eax;
00502d32      }
00502d32      
00502d4d      int32_t edi = *(uint32_t*)((char*)edx + 8);
00502d5c      int32_t eax_4 = (((edi >> ((int8_t)this->key_shift)) ^ edi) & this->table_mask);
00502d64      *(uint32_t*)((char*)edx + 4) = this->buckets[eax_4];
00502d67      this->buckets[eax_4] = edx;
00502d20  }

00502d72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00502d80  int32_t __thiscall LongNIValHash<SurfInfo *>::lookup(class LongNIValHash<SurfInfo *> const* this, uint32_t arg2, class SurfInfo** arg3)

00502d80  {
00502d9e      for (void* i = this->buckets[(((arg2 >> ((int8_t)this->key_shift)) ^ arg2) & this->table_mask)]; i != 0; i = *(uint32_t*)((char*)i + 4))
00502d9e      {
00502da3          if (arg2 == *(uint32_t*)((char*)i + 8))
00502da3          {
00502db8              *(uint32_t*)arg3 = *(uint32_t*)((char*)i + 0xc);
00502dbf              return 1;
00502da3          }
00502d9e      }
00502d9e      
00502dae      return 0;
00502d80  }

00502dc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00502dd0  void __fastcall LandSurf::LandSurf(class LandSurf* this)

00502dd0  {
00502dd7      this->pal_shift = 0;
00502dd9      this->tex_merge = nullptr;
00502ddc      this->num_lsurf = 0;
00502ddf      this->lsurf = nullptr;
00502de2      this->num_unique_surfaces = 0;
00502de7      this->block_surf_array.m_data = 0;
00502dea      this->block_surf_array.m_size = 0;
00502ded      this->block_surf_array.m_num = 0;
00502df5      class LongNIValHash<SurfInfo *>* esi = operator new(0x18);
00502df5      
00502dfc      if (esi == 0)
00502dfc      {
00502e6c          this->surf_info = nullptr;
00502e6f          this->curr_tex = nullptr;
00502e72          this->num_block_surfs = 0;
00502e7a          return;
00502dfc      }
00502dfc      
00502e00      esi->vtable = 0x7c66b0;
00502e06      esi->fPlacementNew_ = 0;
00502e0e      esi->buckets = operator new[](0x40);
00502e14      esi->table_size = 0x10;
00502e1b      esi->key_shift = 8;
00502e22      esi->table_mask = 0;
00502e25      int32_t eax_2 = 1;
00502e43      uint32_t edx_2;
00502e43      
00502e43      do
00502e43      {
00502e33          edx_2 = (esi->table_mask | eax_2);
00502e35          eax_2 <<= 1;
00502e39          esi->table_mask = edx_2;
00502e43      } while ((edx_2 | eax_2) < esi->table_size);
00502e45      int32_t i = 0;
00502e45      
00502e53      do
00502e53      {
00502e47          esi->buckets[i] = 0;
00502e50          i += 1;
00502e53      } while (i < esi->table_size);
00502e53      
00502e55      esi->vtable = 0x7c62fc;
00502e5b      this->surf_info = esi;
00502e5e      this->curr_tex = nullptr;
00502e61      this->num_block_surfs = 0;
00502dd0  }

00502e7b                                                                                   90 90 90 90 90                             .....

00502e80  int32_t __thiscall LandSurf::AddNewSurface(class LandSurf* this, class CSurface* arg2, uint32_t arg3, uint32_t* arg4)

00502e80  {
00502e88      void* eax = operator new(0x10);
00502e8d      void* esi = nullptr;
00502e8d      
00502e94      if (eax != 0)
00502e94      {
00502e96          *(uint32_t*)eax = 0;
00502e98          *(uint32_t*)((char*)eax + 4) = 0;
00502e9b          *(uint32_t*)((char*)eax + 8) = 0;
00502e9e          *(uint32_t*)((char*)eax + 0xc) = 0;
00502ea1          esi = eax;
00502e94      }
00502e94      
00502ead      *(uint32_t*)((char*)esi + 8) = arg2;
00502eb0      *(uint32_t*)esi = arg3;
00502ebb      *(uint32_t*)arg4 = LandSurf::NextFree(this);
00502ebd      *(uint32_t*)((char*)esi + 4) += 1;
00502ec2      *(uint32_t*)((char*)esi + 0xc) = *(uint32_t*)arg4;
00502ec7      this->lsurf[*(uint32_t*)arg4] = arg2;
00502ed2      LongNIValHash<SurfInfo *>::add(this->surf_info, esi, arg3);
00502ed7      this->num_unique_surfaces += 1;
00502ee3      return 1;
00502e80  }

00502ee6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00502ef0  void __thiscall LandSurf::RemoveSurface(class LandSurf* this, uint32_t arg2)

00502ef0  {
00502ef6      class LongNIValHash<SurfInfo *>* surf_info = this->surf_info;
00502efc      int32_t ecx = 0;
00502f00      class LongNIValHash<SurfInfo *>* surf_info_1 = surf_info;
00502f04      int32_t var_8 = 0;
00502f08      int32_t var_10 = 0;
00502f08      
00502f0c      if (surf_info != 0)
00502f0c      {
00502f15          class HashBaseData<unsigned long>* hash_next = *(uint32_t*)surf_info->buckets;
00502f19          int32_t var_4_1 = 0;
00502f19          
00502f21          if (hash_next != 0)
00502f21              goto label_502f4e;
00502f21          
00502f27          HashBaseIter<unsigned long>::Next(&surf_info_1);
00502f27          
00502f30          if (var_4_1 == 0)
00502f30          {
00502f3a              ecx = var_10;
00502f3e              surf_info = surf_info_1;
00502f4e          label_502f4e:
00502f4e              uint32_t ebp_2 = arg2;
00502f4e              
00502f58              while (true)
00502f58              {
00502f58                  if (hash_next != 0)
00502f5a                      ebp_2 = *(int32_t*)((char*)hash_next + 0xc);
00502f5a                  
00502f64                  if (*(uint32_t*)(ebp_2 + 8) == this->lsurf[arg2])
00502f64                      break;
00502f64                  
00502f68                  if (hash_next == 0)
00502f68                  {
00502f99                  label_502f99:
00502f99                      
00502f99                      do
00502f99                      {
00502f80                          ecx += 1;
00502f83                          int32_t var_8_1 = 0;
00502f87                          int32_t var_10_1 = ecx;
00502f87                          
00502f8b                          if (ecx >= surf_info->table_size)
00502ff8                              return;
00502ff8                          
00502f90                          hash_next = surf_info->buckets[ecx];
00502f95                          class HashBaseData<unsigned long>* hash_next_2 = hash_next;
00502f99                      } while (hash_next == 0);
00502f68                  }
00502f68                  else
00502f68                  {
00502f6a                      class HashBaseData<unsigned long>* hash_next_3 = hash_next;
00502f6e                      hash_next = hash_next->hash_next;
00502f73                      class HashBaseData<unsigned long>* hash_next_1 = hash_next;
00502f73                      
00502f77                      if (hash_next == 0)
00502f77                          goto label_502f99;
00502f68                  }
00502f68                  
00502f9f                  if (var_4_1 != 0)
00502fa8                      return;
00502f58              }
00502f58              
00502fab              int32_t temp1_1 = *(uint32_t*)(ebp_2 + 4);
00502fab              *(uint32_t*)(ebp_2 + 4) -= 1;
00502fab              
00502fae              if (temp1_1 == 1)
00502fae              {
00502fb0                  this->lsurf[arg2] = 0;
00502fbe                  HashBaseIter<unsigned long>::DeleteCurrent(&surf_info_1);
00502fc3                  class PalShift* pal_shift = this->pal_shift;
00502fc7                  class CSurface* eax_3 = *(uint32_t*)(ebp_2 + 8);
00502fc7                  
00502fca                  if (pal_shift == 0)
00502fca                  {
00502fd4                      class TexMerge* tex_merge = this->tex_merge;
00502fd4                      
00502fd9                      if (tex_merge != 0)
00502fdc                          TexMerge::CleanupSurface(tex_merge, eax_3);
00502fca                  }
00502fca                  else
00502fcd                      PalShift::CleanupSurface(pal_shift, eax_3);
00502fcd                  
00502fe6                  this->num_unique_surfaces -= 1;
00502fe9                  operator delete(ebp_2);
00502fae              }
00502f30          }
00502f0c      }
00502ef0  }

00502ffb                                                                                   90 90 90 90 90                             .....

00503000  void* __thiscall LongNIValHash<SurfInfo *>::`scalar deleting destructor'(class LongNIValHash<SurfInfo *>* this, uint32_t arg2)

00503000  {
00503003      LongNIValHash<SurfInfo *>::~LongNIValHash<SurfInfo *>(this);
00503003      
0050300d      if ((arg2 & 1) != 0)
00503010          operator delete(this);
00503010      
0050301b      return this;
00503000  }

0050301e                                                                                            90 90                                ..

00503020  void __fastcall LongNIValHash<SurfInfo *>::~LongNIValHash<SurfInfo *>(class LongNIValHash<SurfInfo *>* this)

00503020  {
0050302b      this->vtable = 0x7c62fc;
00503031      void var_14;
00503031      LongNIValHashIter<SurfInfo *>::LongNIValHashIter<SurfInfo *>(&var_14, this);
0050303c      int32_t i;
0050303c      
0050303c      while (i == 0)
00503044          HashBaseIter<unsigned long>::DeleteCurrent(&var_14);
00503044      
00503054      bool cond:0 = this->fPlacementNew_ != 0;
00503056      this->vtable = 0x7c66b0;
00503056      
0050305c      if (!(cond:0))
00503062          operator delete[](this->buckets);
00503020  }

0050306f                                               90                                                                 .

00503070  int32_t __thiscall LandSurf::SelectTerrain(class LandSurf* this, int32_t arg2, int32_t arg3, uint32_t* arg4, enum LandDefs::Rotation* arg5, uint32_t* arg6, uint32_t arg7, int32_t arg8)

00503070  {
00503077      class PalShift* pal_shift = this->pal_shift;
0050307c      void var_14;
0050307c      
0050307c      if (pal_shift != 0)
0050307c      {
00503086          enum LandDefs::Rotation* ebx = arg5;
005030aa          uint32_t eax_3 = PalShift::SelectRot(pal_shift, arg2, arg3, ebx, arg6, arg7, &var_14, &arg5, arg8);
005030aa          
005030c1          if (LongNIValHash<SurfInfo *>::lookup(this->surf_info, eax_3, &arg6) == 0)
005030c1          {
005030ff              LandSurf::AddNewSurface(this, PalShift::MakeNewSurface(this->pal_shift, eax_3, *(uint32_t*)ebx, &var_14, arg5), eax_3, arg4);
0050310a              return 1;
005030c1          }
005030c1          
005030c3          uint32_t* eax_5 = arg6;
005030c7          eax_5[1] += 1;
005030d3          *(uint32_t*)arg4 = eax_5[3];
005030de          return 1;
0050307c      }
0050307c      
00503112      if (this->tex_merge == 0)
005031b3          return 0;
005031b3      
0050311c      uint32_t edi_1 = *(uint32_t*)arg6;
00503127      *(uint32_t*)arg5 = ROT_0;
00503127      
00503138      if (LongNIValHash<SurfInfo *>::lookup(this->surf_info, edi_1, &arg6) == 0)
00503138      {
00503186          LandSurf::AddNewSurface(this, TexMerge::MakeNewSurface(this->tex_merge, edi_1, arg7), edi_1, arg4);
0050319b          `vector destructor iterator'(&var_14, 4, 5, IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>);
005031a8          return 1;
00503138      }
00503138      
0050313a      uint32_t* eax_13 = arg6;
00503147      eax_13[1] += 1;
0050315a      *(uint32_t*)arg4 = eax_13[3];
0050315c      `vector destructor iterator'(&var_14, 4, 5, IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>);
0050316c      return 1;
00503070  }

005031b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005031c0  uint32_t __fastcall CSceneType::pack_size(class CSceneType* this)

005031c0  {
005031ca      return ((this->scenes.m_num << 2) + 8);
005031c0  }

005031cb                                   90 90 90 90 90                                                             .....

005031d0  uint32_t __thiscall CSceneType::pack(class CSceneType* this, void** arg2, uint32_t* arg3)

005031d0  {
005031de      void* edi = *(uint32_t*)arg2;
005031de      
005031e0      if (*(uint32_t*)arg3 >= 4)
005031e0      {
005031e5          *(uint32_t*)edi = this->scenes.m_num;
005031e7          *(uint32_t*)arg2 += 4;
005031ea          *(uint32_t*)arg3 -= 4;
005031e0      }
005031e0      
005031f0      int32_t i = 0;
005031f0      
005031f4      if (this->scenes.m_num > 0)
005031f4      {
00503213          do
00503213          {
005031fa              if (*(uint32_t*)arg3 >= 4)
005031fa              {
00503204                  **(uint32_t**)arg2 = this->scenes.m_data[i].id;
00503207                  *(uint32_t*)arg2 += 4;
0050320a                  *(uint32_t*)arg3 -= 4;
005031fa              }
005031fa              
00503210              i += 1;
00503213          } while (i < this->scenes.m_num);
005031f4      }
005031f4      
0050321d      void* result = (*(uint32_t*)arg3 + (*(uint32_t*)arg2 - edi));
00503220      *(uint32_t*)arg3 = result;
00503225      return result;
005031d0  }

00503228                          90 90 90 90 90 90 90 90                                                          ........

00503230  void __fastcall CSceneType::CSceneType(class CSceneType* this)

00503230  {
00503230      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00503236      class PSRefBufferCharData<char>** this_1 = this;
0050323e      *(uint32_t*)this_1 = PStringBase<char>::s_NullBuffer_1;
00503240      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00503248      this_1[1] = 0;
0050324b      this_1[2] = 0;
0050324e      this_1[3] = 0;
00503251      this_1[4] = 0;
00503230  }

00503258                                                                          90 90 90 90 90 90 90 90                          ........

00503260  void __fastcall CSceneType::~CSceneType(class CSceneType* this)

00503260  {
00503269      SmartArray<IDClass<_tagDataID,32,0>,1>::Reset(&this->scenes);
00503269      
0050327b      if ((this->scenes.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0050327b      {
0050327d          class IDClass<_tagDataID,32,0>* m_data = this->scenes.m_data;
0050327d          
00503281          if (m_data != 0)
00503287              operator delete[](&m_data[-1]);
0050327b      }
0050327b      
00503291      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->scene_name.m_charbuffer - 0x14);
00503291      
005032a4      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
005032ac          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00503260  }

005032b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005032c0  int32_t __thiscall CSceneType::unpack(class CSceneType* this, void** arg2, uint32_t* arg3)

005032c0  {
005032cf      uint32_t i_2;
005032cf      
005032cf      if (*(uint32_t*)arg3 < 4)
005032e7          i_2 = arg3;
005032cf      else
005032cf      {
005032d5          void* eax_1 = *(uint32_t*)arg2;
005032d7          i_2 = *(uint32_t*)eax_1;
005032dc          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
005032e2          *(uint32_t*)arg3 -= 4;
005032cf      }
005032cf      
005032f2      SmartArray<IDClass<_tagDataID,32,0>,1>::Reset(&this->scenes);
005032f2      
005032f9      if (i_2 > 0)
005032f9      {
00503307          SmartArray<IDClass<_tagDataID,32,0>,1>::grow(&this->scenes, i_2);
00503307          
0050330e          if (i_2 > 0)
0050330e          {
00503315              uint32_t* ebx_1 = arg3;
0050331b              uint32_t i_1 = i_2;
005033b6              uint32_t i;
005033b6              
005033b6              do
005033b6              {
00503327                  if (*(uint32_t*)arg3 >= 4)
00503327                  {
0050332d                      void* eax_4 = *(uint32_t*)arg2;
0050332f                      uint32_t* edx_1 = *(uint32_t*)eax_4;
00503334                      *(uint32_t*)arg2 = ((char*)eax_4 + 4);
0050333a                      *(uint32_t*)arg3 -= 4;
0050333d                      ebx_1 = edx_1;
00503327                  }
00503327                  
0050334c                  int32_t eax_8 = (this->scenes.m_sizeAndDeallocate & 0x7fffffff);
00503353                  uint8_t eax_13;
00503353                  
00503353                  if (this->scenes.m_num >= eax_8)
00503353                  {
00503355                      uint32_t edx_2 = (eax_8 + 1);
00503355                      
0050335b                      if (edx_2 <= 8)
0050335d                          edx_2 = 8;
0050335b                      else if (edx_2 <= 0x4000)
0050336a                      {
00503389                          int32_t eflags_1;
00503389                          char eax_12;
00503389                          eax_12 = __bsr_gprv_memv(edx_2);
00503395                          int32_t esi = (1 << eax_12);
00503395                          
00503399                          if (edx_2 > esi)
0050339b                              edx_2 = (esi * 2);
0050336a                      }
0050336a                      else
0050336a                      {
0050336e                          int32_t eax_10 = (edx_2 & 0x3fff);
0050336e                          
00503373                          if (eax_10 != 0)
0050337c                              edx_2 += (0x4000 - eax_10);
0050336a                      }
0050336a                      
005033a1                      eax_13 = SmartArray<IDClass<_tagDataID,32,0>,1>::grow(&this->scenes, edx_2);
00503353                  }
00503353                  
005033a8                  if ((this->scenes.m_num < eax_8 || eax_13 != 0))
005033a8                  {
00503349                      this->scenes.m_data[this->scenes.m_num].id = ebx_1;
00503349                      this->scenes.m_num += 1;
005033a8                  }
005033a8                  
005033b5                  i = i_1;
005033b5                  i_1 -= 1;
005033b6              } while (i != 1);
0050330e          }
005032f9      }
005032f9      
005033c8      return 1;
005032c0  }

005033cb                                   90 90 90 90 90                                                             .....

005033d0  void __stdcall TexMerge::CleanupSurface(class TexMerge* this @ ecx, class CSurface* arg2)

005033d0  {
005033d6      if (arg2 != 0)
005033d9          CSurface::releaseCustomSurface(arg2);
005033d0  }

005033e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005033f0  int32_t __stdcall TexMerge::GetRoadCode(class TexMerge* this @ ecx, uint32_t arg2, int32_t* arg3, uint32_t* arg4)

005033f0  {
005033f4      uint32_t ecx = 0;
005033f4      
005033fb      if ((arg2 & 0xc000000) != 0)
005033fd          ecx = 1;
005033fd      
00503407      if ((arg2 & 0x3000000) != 0)
00503409          ecx |= 2;
00503409      
00503411      if ((arg2 & 0xc00000) != 0)
00503413          ecx |= 4;
00503413      
0050341b      if ((arg2 & 0x300000) != 0)
0050341d          ecx |= 8;
0050341d      
0050342b      *(uint32_t*)arg3 = 0;
00503432      *(uint32_t*)arg4 = 0;
00503438      arg4[1] = 0;
00503438      
00503448      switch (ecx)
00503448      {
005034be          case 0:
005034be          {
005034be              return 1;
005034be              break;
005034be          }
005034a0          case 7:
005034a0          {
005034a0              *(uint32_t*)arg4 = 3;
005034a6              arg4[1] = 6;
005034b3              return 1;
005034a0              break;
005034a0          }
0050348a          case 0xb:
0050348a          {
0050348a              *(uint32_t*)arg4 = 9;
00503490              arg4[1] = 3;
0050349d              return 1;
0050348a              break;
0050348a          }
00503474          case 0xd:
00503474          {
00503474              *(uint32_t*)arg4 = 9;
0050347a              arg4[1] = 0xc;
00503487              return 1;
00503474              break;
00503474          }
0050345e          case 0xe:
0050345e          {
0050345e              *(uint32_t*)arg4 = 6;
00503464              arg4[1] = 0xc;
00503471              return 1;
0050345e              break;
0050345e          }
0050344f          case 0xf:
0050344f          {
0050344f              *(uint32_t*)arg3 = 1;
0050345b              return 1;
0050344f              break;
0050344f          }
00503448          default:
00503448          {
005034b6              *(uint32_t*)arg4 = ecx;
005034be              return 1;
00503448          }
00503448      }
005033f0  }

005034c1     8d 49 00                                                                                       .I.
005034c4  uint32_t jump_table_5034c4[0x7] = 
005034c4  {
005034c4      [0x0] =  0x005034b8
005034c8      [0x1] =  0x005034a0
005034cc      [0x2] =  0x0050348a
005034d0      [0x3] =  0x00503474
005034d4      [0x4] =  0x0050345e
005034d8      [0x5] =  0x0050344f
005034dc      [0x6] =  0x005034b6
005034e0  }
005034e0  uint8_t lookup_table_5034e0[0x10] = 
005034e0  {
005034e0      [0x0] =  0x00
005034e1      [0x1] =  0x06
005034e2      [0x2] =  0x06
005034e3      [0x3] =  0x06
005034e4      [0x4] =  0x06
005034e5      [0x5] =  0x06
005034e6      [0x6] =  0x06
005034e7      [0x7] =  0x01
005034e8      [0x8] =  0x06
005034e9      [0x9] =  0x06
005034ea      [0xa] =  0x06
005034eb      [0xb] =  0x02
005034ec      [0xc] =  0x06
005034ed      [0xd] =  0x03
005034ee      [0xe] =  0x04
005034ef      [0xf] =  0x05
005034f0  }

005034f0  class ImgTex* ImgTex::Get(class IDClass<_tagDataID,32,0> arg1)

005034f0  {
0050350c      void var_8;
0050350c      return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0xb));
005034f0  }

0050350d                                         90 90 90                                                               ...

00503510  int32_t __fastcall TerrainTex::InitEnd(class TerrainTex* this)

00503510  {
00503516      uint32_t id = this->tex_gid.id;
0050351e      void var_8;
0050351e      
0050351e      if (id != INVALID_DID.id)
00503535          this->base_texture = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0xb));
0050353f      int32_t result;
0050353f      result = this->base_texture != 0;
00503546      return result;
00503510  }

00503547                       90 90 90 90 90 90 90 90 90                                                         .........

00503550  void __fastcall TexMerge::TexMerge(class TexMerge* this)

00503550  {
00503554      this->base_tex_size = 0x10;
0050355a      __builtin_memset(&this->corner_terrain_maps, 0, 0x30);
00503550  }

0050357f                                                                                               90                                 .

00503580  int32_t __stdcall TexMerge::CopyAndTile(class TexMerge* this @ ecx, uint8_t* arg2, uint32_t arg3, class TerrainTex* arg4)

00503580  {
00503588      class ImgTex* base_texture = arg4->base_texture;
00503588      
0050358d      if (base_texture == 0)
0050358d      {
0050358f          uint32_t id = arg4->tex_gid.id;
00503597          void var_8;
00503597          
00503597          if (id != INVALID_DID.id)
005035ae              arg4->base_texture = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0xb));
005035b1          base_texture = arg4->base_texture;
005035b1          
005035b6          if (base_texture == 0)
005035b6          {
005035eb              ImgTex::CopyCSI(arg2, arg3, arg3, nullptr, 1);
005035f9              return 0;
005035b6          }
0050358d      }
0050358d      
005035c8      ImgTex::CopyCSI(arg2, arg3, arg3, base_texture, arg4->tex_tiling);
005035d9      return 1;
00503580  }

005035fc                                                                                      90 90 90 90                              ....

00503600  int32_t __thiscall TexMerge::FindRoadAlpha(class TexMerge* this, uint32_t arg2, class RoadAlphaMap** arg3, enum LandDefs::Rotation* arg4, uint32_t arg5)

00503600  {
0050360d      int32_t __saved_ebx_1;
0050360d      int32_t __saved_ebx = __saved_ebx_1;
0050360e      int32_t __saved_ebp_1;
0050360e      int32_t __saved_ebp = __saved_ebp_1;
0050360f      int32_t __saved_esi_1;
0050360f      int32_t __saved_esi = __saved_esi_1;
00503617      int32_t __saved_edi_1;
00503617      int32_t __saved_edi = __saved_edi_1;
0050361a      uint32_t m_num = this->road_maps.m_num;
00503621      long double x87_r7 = ((long double)((arg5 * 0x523aa99e) - 0x51c9e74a));
00503621      
00503625      if (((arg5 * 0x523aa99e) - 0x51c9e74a) < 0)
00503627          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
00503627      
00503639      long double x87_r6 = ((long double)m_num);
00503639      
0050363d      if (m_num < 0)
0050363f          x87_r6 = (x87_r6 + ((long double)4.2949673e+09f));
0050363f      
0050364d      floor(((double)((x87_r7 * ((long double)2.32830644e-10f)) * x87_r6)));
00503656      uint32_t eax_3 = _ftol2();
00503666      int32_t i = 0;
00503666      
0050366a      if (this->road_maps.m_num > 0)
0050366a      {
005036af          do
005036af          {
00503685              *(uint32_t*)arg3 = this->road_maps.m_data[(COMBINE(0, (i + eax_3)) % m_num)];
00503687              *(uint32_t*)arg4 = ROT_0;
0050368f              uint32_t rcode = *(uint32_t*)arg3->rcode;
0050368f              
005036a7              for (enum LandDefs::Rotation j = ROT_0; j < 0x4; j += 1)
005036a7              {
00503697                  if (rcode == arg2)
00503697                  {
005036c3                      *(uint32_t*)arg4 = j;
005036c5                      class RoadAlphaMap* esi_1 = *(uint32_t*)arg3;
005036c5                      
005036cc                      if (esi_1->texture == 0)
005036cc                      {
005036ce                          uint32_t id = esi_1->road_tex_gid.id;
005036ce                          
005036d7                          if (id != INVALID_DID.id)
005036d7                          {
005036d9                              double var_20_1;
005036d9                              *(uint32_t*)((char*)var_20_1)[4] = 0xb;
005036db                              var_20_1 = id;
005036e5                              void var_8;
005036e5                              *(uint32_t*)((char*)var_20_1)[4] = QualifiedDataID::QualifiedDataID(&var_8, var_20_1);
005036ee                              esi_1->texture = DBObj::Get();
005036d7                          }
005036cc                      }
005036cc                      
005036fd                      return 1;
00503697                  }
00503697                  
00503699                  rcode *= 2;
00503699                  
0050369e                  if (rcode >= 0x10)
005036a0                      rcode -= 0xf;
005036a7              }
005036a7              
005036ac              i += 1;
005036af          } while (i < this->road_maps.m_num);
0050366a      }
0050366a      
005036b2      *(uint32_t*)arg3 = nullptr;
005036c0      return 0;
00503600  }


00503700  int32_t __thiscall TexMerge::FindTerrainAlpha(class TexMerge* this, uint32_t arg2, class TerrainAlphaMap** arg3, enum LandDefs::Rotation* arg4, uint32_t arg5)

00503700  {
00503703      int32_t __saved_esi_1;
00503703      int32_t __saved_esi = __saved_esi_1;
00503704      int32_t __saved_edi_1;
00503704      int32_t __saved_edi = __saved_edi_1;
00503705      uint32_t edi = arg2;
0050371d      enum LandDefs::Rotation ecx_5;
0050371d      class TerrainAlphaMap** edx_1;
0050371d      enum LandDefs::Rotation* esi_1;
0050371d      
0050371d      if ((((edi == 1 || edi == 2) || edi == 4) || edi == 8))
0050371d      {
00503726          long double x87_r7 = ((long double)this->corner_terrain_maps.m_num);
00503726          
0050372b          if (this->corner_terrain_maps.m_num < 0)
0050372d              x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
0050372d          
00503737          arg2 = ((float)x87_r7);
0050374d          long double x87_r7_1 = ((long double)((arg5 * 0x523aa99e) - 0x51c9e74a));
0050374d          
00503751          if (((arg5 * 0x523aa99e) - 0x51c9e74a) < 0)
00503753              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
00503753          
00503769          floor(((double)((x87_r7_1 * ((long double)2.32830644e-10f)) * ((long double)arg2))));
00503777          uint32_t ecx_3 = _ftol2();
0050377f          long double x87_r0 = ((long double)ecx_3);
0050377f          
00503783          if (ecx_3 < 0)
00503785              x87_r0 = (x87_r0 + ((long double)4.2949673e+09f));
00503785          
0050378b          long double temp1_1 = ((long double)arg2);
0050378b          (x87_r0 - temp1_1);
0050378f          uint32_t eax_1;
0050378f          eax_1 = ((((x87_r0 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r0 == temp1_1) ? 1 : 0) << 0xe) | 0x800))));
0050378f          
00503794          if ((*(uint8_t*)((char*)eax_1)[1] & 1) == 0)
00503796              ecx_3 = 0;
00503796          
0050379e          edx_1 = arg3;
005037a2          esi_1 = arg4;
005037a6          *(uint32_t*)edx_1 = this->corner_terrain_maps.m_data[ecx_3];
005037a8          *(uint32_t*)esi_1 = ROT_0;
005037b0          uint32_t tcode = *(uint32_t*)edx_1->tcode;
005037b2          ecx_5 = ROT_0;
005037b2          
005037b6          while (tcode != edi)
005037b6          {
005037bc              tcode *= 2;
005037bc              
005037c1              if (tcode >= 0x10)
005037c3                  tcode -= 0xf;
005037c3              
005037c6              ecx_5 += 1;
005037c6              
005037ca              if (ecx_5 >= 0x4)
005037d3                  return 0;
005037b6          }
0050371d      }
0050371d      else
0050371d      {
005037d9          long double x87_r7_4 = ((long double)this->side_terrain_maps.m_num);
005037d9          
005037de          if (this->side_terrain_maps.m_num < 0)
005037e0              x87_r7_4 = (x87_r7_4 + ((long double)4.2949673e+09f));
005037e0          
005037ea          arg2 = ((float)x87_r7_4);
005037ff          long double x87_r7_5 = ((long double)((arg5 * 0x523aa99e) - 0x51c9e74a));
005037ff          
00503803          if (((arg5 * 0x523aa99e) - 0x51c9e74a) < 0)
00503805              x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
00503805          
0050381b          floor(((double)((x87_r7_5 * ((long double)2.32830644e-10f)) * ((long double)arg2))));
00503829          uint32_t ecx_6 = _ftol2();
00503831          long double x87_r0_1 = ((long double)ecx_6);
00503831          
00503835          if (ecx_6 < 0)
00503837              x87_r0_1 = (x87_r0_1 + ((long double)4.2949673e+09f));
00503837          
0050383d          long double temp2_1 = ((long double)arg2);
0050383d          (x87_r0_1 - temp2_1);
00503841          uint32_t eax_7;
00503841          eax_7 = ((((x87_r0_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r0_1 == temp2_1) ? 1 : 0) << 0xe) | 0x800))));
00503841          
00503846          if ((*(uint8_t*)((char*)eax_7)[1] & 1) == 0)
00503848              ecx_6 = 0;
00503848          
00503850          edx_1 = arg3;
00503854          esi_1 = arg4;
00503858          *(uint32_t*)edx_1 = this->side_terrain_maps.m_data[ecx_6];
0050385a          *(uint32_t*)esi_1 = ROT_0;
00503862          uint32_t tcode_1 = *(uint32_t*)edx_1->tcode;
00503864          ecx_5 = ROT_0;
00503864          
00503868          while (tcode_1 != edi)
00503868          {
0050386a              tcode_1 *= 2;
0050386a              
0050386f              if (tcode_1 >= 0x10)
00503871                  tcode_1 -= 0xf;
00503871              
00503874              ecx_5 += 1;
00503874              
00503878              if (ecx_5 >= 0x4)
00503881                  return 0;
00503868          }
0050371d      }
0050371d      
00503884      *(uint32_t*)esi_1 = ecx_5;
00503886      class TerrainAlphaMap* esi_2 = *(uint32_t*)edx_1;
00503886      
0050388d      if (esi_2->texture == 0)
0050388d      {
0050388f          uint32_t id = esi_2->tex_gid.id;
0050388f          
00503898          if (id != INVALID_DID.id)
00503898          {
0050389a              double var_18_1;
0050389a              *(uint32_t*)((char*)var_18_1)[4] = 0xb;
0050389c              var_18_1 = id;
005038a6              void var_8;
005038a6              *(uint32_t*)((char*)var_18_1)[4] = QualifiedDataID::QualifiedDataID(&var_8, var_18_1);
005038af              esi_2->texture = DBObj::Get();
00503898          }
0050388d      }
0050388d      
005038bc      return 1;
00503700  }

005038bf                                                                                               90                                 .

005038c0  int32_t __stdcall TexMerge::Merge(class TexMerge* this @ ecx, uint8_t* arg2, uint32_t arg3, class ImgTex* arg4, enum LandDefs::Rotation arg5, class TerrainTex* arg6)

005038c0  {
005038c7      if (arg4 == 0)
005038cc          return 0;
005038cc      
005038d4      class ImgTex* base_texture = arg6->base_texture;
005038d4      
005038d9      if (base_texture != 0)
005038d9      {
005038f1          ImgTex::MergeTexture(arg2, arg3, arg3, base_texture, arg6->tex_tiling, arg4, arg5);
00503900          return 1;
005038d9      }
005038d9      
0050390c      if (TerrainTex::InitEnd(arg6) == 0)
0050393d          return 0;
0050393d      
00503927      ImgTex::MergeTexture(arg2, arg3, arg3, arg6->base_texture, arg6->tex_tiling, arg4, arg5);
00503936      return 1;
005038c0  }


00503940  class TerrainTex* __thiscall TexMerge::GetTerrainTex(class TexMerge* this, uint32_t arg2)

00503940  {
00503943      uint32_t m_num = this->terrain_desc.m_num;
00503946      int32_t eax = 0;
00503948      bool cond:1 = m_num != 0;
00503948      
0050394b      if (m_num > 0)
0050394b      {
0050394d          class TMTerrainDesc** m_data = this->terrain_desc.m_data;
00503954          class TMTerrainDesc** m_data_1 = m_data;
00503954          
00503963          do
00503963          {
0050395b              if (arg2 == *(uint32_t*)m_data_1->terrain_type)
0050397e                  return *(uint32_t*)m_data[eax]->terrain_tex.m_data;
0050397e              
0050395d              eax += 1;
0050395e              m_data_1 = &m_data_1[1];
00503963          } while (eax < m_num);
00503963          
00503965          cond:1 = m_num != 0;
0050394b      }
0050394b      
00503967      if (cond:1)
0050398f          return *(uint32_t*)*(uint32_t*)this->terrain_desc.m_data->terrain_tex.m_data;
0050398f      
0050396f      return 0;
00503940  }

00503992                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005039a0  uint32_t __fastcall TexMerge::pack_size(class TexMerge* this)

005039a0  {
005039a0      uint32_t m_num_3 = this->corner_terrain_maps.m_num;
005039a5      void* eax = 8;
005039a5      
005039aa      if (m_num_3 > 0)
005039ac          eax = ((m_num_3 << 3) + 8);
005039ac      
005039b3      uint32_t m_num_1 = this->side_terrain_maps.m_num;
005039b6      void* eax_1 = ((char*)eax + 4);
005039b6      
005039bb      if (m_num_1 > 0)
005039bd          eax_1 += (m_num_1 << 3);
005039bd      
005039c0      uint32_t m_num_2 = this->road_maps.m_num;
005039c3      void* eax_2 = ((char*)eax_1 + 4);
005039c3      
005039c8      if (m_num_2 > 0)
005039ca          eax_2 += (m_num_2 << 3);
005039ca      
005039cd      uint32_t m_num = this->terrain_desc.m_num;
005039d0      void* result = ((char*)eax_2 + 4);
005039d0      
005039d5      if (m_num <= 0)
005039dc          return result;
005039dc      
005039da      return ((char*)result + (m_num * 0x2c));
005039a0  }

005039dd                                                                                         90 90 90                               ...

005039e0  class IDClass<_tagDataID,32,0>* __thiscall TexMerge::GetDetailTex(class TexMerge const* this, class IDClass<_tagDataID,32,0>* __return, uint32_t arg3)

005039e0  {
005039e7      if (arg3 < this->terrain_desc.m_num)
005039e7      {
005039fb          __return->id = *(uint32_t*)this->terrain_desc.m_data[arg3]->terrain_tex.m_data->detail_tex_gid.id;
005039fd          return __return;
005039e7      }
005039e7      
00503a0a      __return->id = INVALID_DID.id;
00503a0c      return __return;
005039e0  }

00503a0f                                               90                                                                 .

00503a10  uint32_t __thiscall TexMerge::GetDetailTiling(class TexMerge const* this, uint32_t arg2)

00503a10  {
00503a17      if (arg2 >= this->terrain_desc.m_num)
00503a2c          return 0;
00503a2c      
00503a27      return *(uint32_t*)this->terrain_desc.m_data[arg2]->terrain_tex.m_data->detail_tex_tiling;
00503a10  }

00503a2f                                               90                                                                 .

00503a30  uint32_t __thiscall TerrainTex::Pack(class TerrainTex* this, void** arg2, uint32_t* arg3)

00503a30  {
00503a37      if (*(uint32_t*)arg3 >= 4)
00503a37      {
00503a47          **(uint32_t**)arg2 = this->tex_gid.id;
00503a49          *(uint32_t*)arg2 += 4;
00503a4e          uint32_t edi_3 = (*(uint32_t*)arg3 - 4);
00503a56          *(uint32_t*)arg3 = edi_3;
00503a56          
00503a58          if (edi_3 >= 4)
00503a58          {
00503a63              **(uint32_t**)arg2 = this->tex_tiling;
00503a65              *(uint32_t*)arg2 += 4;
00503a6a              uint32_t edi_6 = (*(uint32_t*)arg3 - 4);
00503a72              *(uint32_t*)arg3 = edi_6;
00503a72              
00503a74              if (edi_6 >= 4)
00503a74              {
00503a7f                  **(uint32_t**)arg2 = this->max_vert_bright;
00503a81                  *(uint32_t*)arg2 += 4;
00503a86                  uint32_t edi_9 = (*(uint32_t*)arg3 - 4);
00503a8e                  *(uint32_t*)arg3 = edi_9;
00503a8e                  
00503a90                  if (edi_9 >= 4)
00503a90                  {
00503a9b                      **(uint32_t**)arg2 = this->min_vert_bright;
00503a9d                      *(uint32_t*)arg2 += 4;
00503aa2                      uint32_t edi_12 = (*(uint32_t*)arg3 - 4);
00503aaa                      *(uint32_t*)arg3 = edi_12;
00503aaa                      
00503aac                      if (edi_12 >= 4)
00503aac                      {
00503ab7                          **(uint32_t**)arg2 = this->max_vert_saturate;
00503ab9                          *(uint32_t*)arg2 += 4;
00503abe                          uint32_t edi_15 = (*(uint32_t*)arg3 - 4);
00503ac6                          *(uint32_t*)arg3 = edi_15;
00503ac6                          
00503ac8                          if (edi_15 >= 4)
00503ac8                          {
00503acf                              **(uint32_t**)arg2 = this->min_vert_saturate;
00503ad1                              *(uint32_t*)arg2 += 4;
00503ad6                              uint32_t edi_18 = (*(uint32_t*)arg3 - 4);
00503ade                              *(uint32_t*)arg3 = edi_18;
00503ade                              
00503ae0                              if (edi_18 >= 4)
00503ae0                              {
00503ae7                                  **(uint32_t**)arg2 = this->max_vert_hue;
00503ae9                                  *(uint32_t*)arg2 += 4;
00503aee                                  uint32_t edi_21 = (*(uint32_t*)arg3 - 4);
00503af6                                  *(uint32_t*)arg3 = edi_21;
00503af6                                  
00503af8                                  if (edi_21 >= 4)
00503af8                                  {
00503aff                                      **(uint32_t**)arg2 = this->min_vert_hue;
00503b01                                      *(uint32_t*)arg2 += 4;
00503b06                                      uint32_t edi_24 = (*(uint32_t*)arg3 - 4);
00503b0e                                      *(uint32_t*)arg3 = edi_24;
00503b0e                                      
00503b10                                      if (edi_24 >= 4)
00503b10                                      {
00503b17                                          **(uint32_t**)arg2 = this->detail_tex_tiling;
00503b19                                          *(uint32_t*)arg2 += 4;
00503b1e                                          uint32_t edi_27 = (*(uint32_t*)arg3 - 4);
00503b26                                          *(uint32_t*)arg3 = edi_27;
00503b26                                          
00503b28                                          if (edi_27 >= 4)
00503b28                                          {
00503b2f                                              **(uint32_t**)arg2 = this->detail_tex_gid.id;
00503b31                                              *(uint32_t*)arg2 += 4;
00503b34                                              *(uint32_t*)arg3 -= 4;
00503b28                                          }
00503b10                                      }
00503af8                                  }
00503ae0                              }
00503ac8                          }
00503aac                      }
00503a90                  }
00503a74              }
00503a58          }
00503a37      }
00503a37      
00503b3b      return *(uint32_t*)arg3;
00503a30  }

00503b3e                                                                                            90 90                                ..

00503b40  int32_t __thiscall TerrainTex::UnPack(class TerrainTex* this, void** arg2, uint32_t* arg3)

00503b40  {
00503b47      if (*(uint32_t*)arg3 >= 4)
00503b47      {
00503b54          void* esi_2 = (*(uint32_t*)arg2 + 4);
00503b58          int32_t edi_1 = *(uint32_t*)((char*)esi_2 - 4);
00503b5b          *(uint32_t*)arg2 = esi_2;
00503b5d          *(uint32_t*)arg3 -= 4;
00503b60          this->tex_gid.id = edi_1;
00503b60          
00503b65          if (*(uint32_t*)arg3 >= 4)
00503b65          {
00503b6f              this->tex_tiling = **(uint32_t**)arg2;
00503b72              *(uint32_t*)arg2 += 4;
00503b77              uint32_t edi_3 = (*(uint32_t*)arg3 - 4);
00503b7f              *(uint32_t*)arg3 = edi_3;
00503b7f              
00503b81              if (edi_3 >= 4)
00503b81              {
00503b8b                  this->max_vert_bright = **(uint32_t**)arg2;
00503b8e                  *(uint32_t*)arg2 += 4;
00503b93                  uint32_t edi_5 = (*(uint32_t*)arg3 - 4);
00503b9b                  *(uint32_t*)arg3 = edi_5;
00503b9b                  
00503b9d                  if (edi_5 >= 4)
00503b9d                  {
00503ba7                      this->min_vert_bright = **(uint32_t**)arg2;
00503baa                      *(uint32_t*)arg2 += 4;
00503baf                      uint32_t edi_7 = (*(uint32_t*)arg3 - 4);
00503bb7                      *(uint32_t*)arg3 = edi_7;
00503bb7                      
00503bb9                      if (edi_7 >= 4)
00503bb9                      {
00503bc3                          this->max_vert_saturate = **(uint32_t**)arg2;
00503bc6                          *(uint32_t*)arg2 += 4;
00503bcb                          uint32_t edi_9 = (*(uint32_t*)arg3 - 4);
00503bd3                          *(uint32_t*)arg3 = edi_9;
00503bd3                          
00503bd5                          if (edi_9 >= 4)
00503bd5                          {
00503bdb                              this->min_vert_saturate = **(uint32_t**)arg2;
00503bde                              *(uint32_t*)arg2 += 4;
00503be3                              uint32_t edi_11 = (*(uint32_t*)arg3 - 4);
00503beb                              *(uint32_t*)arg3 = edi_11;
00503beb                              
00503bed                              if (edi_11 >= 4)
00503bed                              {
00503bf3                                  this->max_vert_hue = **(uint32_t**)arg2;
00503bf6                                  *(uint32_t*)arg2 += 4;
00503bfb                                  uint32_t edi_13 = (*(uint32_t*)arg3 - 4);
00503c03                                  *(uint32_t*)arg3 = edi_13;
00503c03                                  
00503c05                                  if (edi_13 >= 4)
00503c05                                  {
00503c0b                                      this->min_vert_hue = **(uint32_t**)arg2;
00503c0e                                      *(uint32_t*)arg2 += 4;
00503c13                                      uint32_t edi_15 = (*(uint32_t*)arg3 - 4);
00503c1b                                      *(uint32_t*)arg3 = edi_15;
00503c1b                                      
00503c1d                                      if (edi_15 >= 4)
00503c1d                                      {
00503c23                                          this->detail_tex_tiling = **(uint32_t**)arg2;
00503c26                                          *(uint32_t*)arg2 += 4;
00503c2b                                          uint32_t edi_17 = (*(uint32_t*)arg3 - 4);
00503c33                                          *(uint32_t*)arg3 = edi_17;
00503c33                                          
00503c35                                          if (edi_17 >= 4)
00503c35                                          {
00503c37                                              void* esi_27 = *(uint32_t*)arg2;
00503c39                                              class IDClass<_tagDataID,32,0> edi_18 = *(uint32_t*)esi_27;
00503c3e                                              *(uint32_t*)arg2 = ((char*)esi_27 + 4);
00503c40                                              *(uint32_t*)arg3 -= 4;
00503c43                                              this->detail_tex_gid.id = edi_18;
00503c35                                          }
00503c1d                                      }
00503c05                                  }
00503bed                              }
00503bd5                          }
00503bb9                      }
00503b9d                  }
00503b81              }
00503b65          }
00503b47      }
00503b47      
00503c4d      return 1;
00503b40  }


00503c50  void __fastcall TMTerrainDesc::~TMTerrainDesc(class TMTerrainDesc* this)

00503c50  {
00503c5a      int32_t i = 0;
00503c5a      
00503c5e      if (this->terrain_tex.m_num > 0)
00503c5e      {
00503c89          do
00503c89          {
00503c64              void* esi_1 = this->terrain_tex.m_data[i];
00503c64              
00503c69              if (esi_1 != 0)
00503c69              {
00503c6b                  int32_t* ecx = *(uint32_t*)((char*)esi_1 + 4);
00503c6b                  
00503c70                  if (ecx != 0)
00503c70                  {
00503c74                      *(uint32_t*)(*(uint32_t*)ecx + 0x14)();
00503c77                      *(uint32_t*)((char*)esi_1 + 4) = 0;
00503c70                  }
00503c70                  
00503c7b                  operator delete(esi_1);
00503c69              }
00503c69              
00503c86              i += 1;
00503c89          } while (i < this->terrain_tex.m_num);
00503c5e      }
00503c5e      
00503c90      this->terrain_tex.m_num = 0;
00503c93      this->terrain_tex.m_size = 0;
00503c96      operator delete[](this->terrain_tex.m_data);
00503c9e      this->terrain_tex.m_data = 0;
00503ca1      operator delete[](nullptr);
00503c50  }

00503cad                                         90 90 90                                                               ...

00503cb0  void __thiscall TexMerge::GetSubDataIDs(class TexMerge const* this, class QualifiedDataIDArray* arg2)

00503cb0  {
00503cc8      int32_t* var_20;
00503cc8      
00503cc8      if (this->corner_terrain_maps.m_num > 0)
00503cc8      {
00503cca          int32_t i = 0;
00503cca          
00503cf5          do
00503cf5          {
00503cea              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->corner_terrain_maps.m_data[i]->tex_gid.id, 0), 8);
00503cf2              i += 1;
00503cf5          } while (i < this->corner_terrain_maps.m_num);
00503cc8      }
00503cc8      
00503cfa      int32_t i_1 = 0;
00503cfa      
00503cfe      if (this->side_terrain_maps.m_num > 0)
00503cfe      {
00503d25          do
00503d25          {
00503d1a              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->side_terrain_maps.m_data[i_1]->tex_gid.id, 0), 8);
00503d22              i_1 += 1;
00503d25          } while (i_1 < this->side_terrain_maps.m_num);
00503cfe      }
00503cfe      
00503d2a      int32_t i_2 = 0;
00503d2a      
00503d2e      if (this->road_maps.m_num > 0)
00503d2e      {
00503d55          do
00503d55          {
00503d4a              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->road_maps.m_data[i_2]->road_tex_gid.id, 0), 8);
00503d52              i_2 += 1;
00503d55          } while (i_2 < this->road_maps.m_num);
00503d2e      }
00503d2e      
00503d5a      int32_t i_3 = 0;
00503d5a      
00503d5e      if (this->terrain_desc.m_num > 0)
00503d5e      {
00503daa          do
00503daa          {
00503d69              int32_t* eax_16 = *(uint32_t*)this->terrain_desc.m_data[i_3]->terrain_tex.m_data;
00503d6d              var_20 = eax_16;
00503d82              void var_18;
00503d82              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, *(uint32_t*)eax_16, 0), 8);
00503d9f              void var_10;
00503d9f              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, var_20[0xb], 0), 8);
00503da7              i_3 += 1;
00503daa          } while (i_3 < this->terrain_desc.m_num);
00503d5e      }
00503cb0  }

00503db5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00503dc0  int32_t __thiscall TexMerge::GetTerrain(class TexMerge* this, uint32_t arg2, class TerrainTex** arg3, uint32_t* arg4)

00503dc0  {
00503dca      class TexMerge* this_1 = this;
00503dde      int32_t esi_2 = ((arg2 >> 0xf) & 0x1f);
00503deb      int32_t edi;
00503deb      int32_t var_24 = edi;
00503dec      class TexMerge* this_2 = this_1;
00503df0      int32_t var_10 = esi_2;
00503df0      
00503e21      for (int32_t i = 0; i < 4; i += 1)
00503e21      {
00503e06          int32_t j = (i + 1);
00503e06          
00503e08          if (i < 3)
00503e08          {
00503e1a              do
00503e1a              {
00503e14                  if (&var_10[i] == &var_10[j])
00503e14                  {
00503e57                      uint32_t edi_4 = &var_10[i];
00503e5b                      uint32_t m_num = this_1->terrain_desc.m_num;
00503e5e                      int32_t eax_4 = 0;
00503e60                      bool cond:3 = m_num != 0;
00503e66                      void* eax_6;
00503e66                      
00503e66                      if (m_num > 0)
00503e66                      {
00503e68                          class TMTerrainDesc** m_data_1 = this_1->terrain_desc.m_data;
00503e6b                          class TMTerrainDesc** m_data_8 = m_data_1;
00503e6b                          
00503e7d                          do
00503e7d                          {
00503e75                              if (edi_4 == *(uint32_t*)m_data_8->terrain_type)
00503e75                              {
00503e87                                  eax_6 = m_data_1[eax_4];
00503e8a                                  goto label_503e94;
00503e75                              }
00503e75                              
00503e77                              eax_4 += 1;
00503e78                              m_data_8 = &m_data_8[1];
00503e7d                          } while (eax_4 < m_num);
00503e7d                          
00503e7f                          cond:3 = m_num != 0;
00503e66                      }
00503e66                      
00503e81                      class TerrainTex* eax_5;
00503e81                      
00503e81                      if (cond:3)
00503e81                      {
00503e8f                          eax_6 = *(uint32_t*)this_1->terrain_desc.m_data;
00503e94                      label_503e94:
00503e94                          eax_5 = **(uint32_t**)((char*)eax_6 + 4);
00503e81                      }
00503e81                      else
00503e83                          eax_5 = nullptr;
00503e83                      
00503e9e                      class TerrainTex** ebp_5 = arg3;
00503ea2                      int32_t k = 0;
00503ea4                      *(uint32_t*)arg3 = eax_5;
00503ea6                      *(uint32_t*)arg4 = 0;
00503ea8                      arg4[1] = 0;
00503eab                      arg4[2] = 0;
00503eae                      uint32_t* edi_6 = arg4;
00503eae                      
00503f1d                      do
00503f1d                      {
00503eb0                          class TerrainTex** eax_7 = &var_10[k];
00503eb0                          
00503eb8                          if (eax_7 != edi_4)
00503eb8                          {
00503ebd                              if (*(uint32_t*)edi_6 != 0)
00503ebd                              {
00503f32                                  if (&var_10[k] == ebp_5)
00503f32                                  {
00503f37                                      uint32_t eax_14;
00503f37                                      bool cond:9_1;
00503f37                                      
00503f37                                      if (k != 1)
00503f37                                      {
00503f72                                          if (k == 2)
00503f72                                          {
00503f74                                              eax_14 = *(uint32_t*)edi_6;
00503f76                                              cond:9_1 = eax_14 == k;
00503f78                                              goto label_503f3d;
00503f72                                          }
00503f72                                          
00503f7d                                          if (k == 3)
00503f7d                                          {
00503f7f                                              eax_14 = *(uint32_t*)edi_6;
00503f7f                                              
00503f84                                              if (eax_14 == 4)
00503f84                                              {
00503f8f                                                  *(uint32_t*)edi_6 = ((1 << k) + eax_14);
00503f9d                                                  return 1;
00503f84                                              }
00503f7d                                          }
00503f37                                      }
00503f37                                      else
00503f37                                      {
00503f39                                          eax_14 = *(uint32_t*)edi_6;
00503f3b                                          cond:9_1 = eax_14 == k;
00503f3d                                      label_503f3d:
00503f3d                                          
00503f3d                                          if (cond:9_1)
00503f3d                                          {
00503f8f                                              *(uint32_t*)edi_6 = ((1 << k) + eax_14);
00503f9d                                              return 1;
00503f3d                                          }
00503f37                                      }
00503f32                                  }
00503f32                                  
00503f3f                                  uint32_t m_num_6 = this_1->terrain_desc.m_num;
00503f42                                  int32_t eax_15 = 0;
00503f44                                  bool cond:7 = m_num_6 != 0;
00503f46                                  class TerrainTex* eax_16;
00503f46                                  
00503f46                                  if (m_num_6 > 0)
00503f46                                  {
00503f48                                      class TMTerrainDesc** m_data = this_1->terrain_desc.m_data;
00503f4b                                      arg4 = m_data;
00503f4b                                      
00503f61                                      do
00503f61                                      {
00503f59                                          if (&var_10[k] == *(uint32_t*)m_data->terrain_type)
00503f59                                          {
00503faa                                              eax_16 = **(uint32_t**)(arg4[eax_15] + 4);
00503fac                                              goto label_503fbc;
00503f59                                          }
00503f59                                          
00503f5b                                          eax_15 += 1;
00503f5c                                          m_data = &m_data[1];
00503f61                                      } while (eax_15 < m_num_6);
00503f61                                      
00503f63                                      this_1 = this_2;
00503f67                                      cond:7 = m_num_6 != 0;
00503f46                                  }
00503f46                                  
00503f69                                  if (cond:7)
00503fb6                                      eax_16 = *(uint32_t*)*(uint32_t*)this_1->terrain_desc.m_data->terrain_tex.m_data;
00503f69                                  else
00503f6b                                      eax_16 = nullptr;
00503f6b                                  
00503fbc                              label_503fbc:
00503fbc                                  arg3[2] = eax_16;
00503fc6                                  edi_6[1] = (1 << k);
00503fd5                                  return 1;
00503ebd                              }
00503ebd                              
00503ec6                              ebp_5 = eax_7;
00503ec8                              int32_t eax_8 = 0;
00503eca                              *(uint32_t*)edi_6 = (1 << k);
00503ecc                              uint32_t m_num_5 = this_1->terrain_desc.m_num;
00503ecf                              bool cond:6_1 = m_num_5 != 0;
00503ed1                              class TerrainTex* eax_9;
00503ed1                              
00503ed1                              if (m_num_5 > 0)
00503ed1                              {
00503ed3                                  class TMTerrainDesc** m_data_6 = this_1->terrain_desc.m_data;
00503ed6                                  class TMTerrainDesc** m_data_12 = m_data_6;
00503ed6                                  
00503ee4                                  do
00503ee4                                  {
00503edc                                      if (ebp_5 == *(uint32_t*)m_data_12->terrain_type)
00503edc                                      {
00503efc                                          eax_9 = *(uint32_t*)m_data_6[eax_8]->terrain_tex.m_data;
00503efe                                          this_1 = this_2;
00503f02                                          edi_6 = arg4;
00503f06                                          goto label_503f16;
00503edc                                      }
00503edc                                      
00503ede                                      eax_8 += 1;
00503edf                                      m_data_12 = &m_data_12[1];
00503ee4                                  } while (eax_8 < m_num_5);
00503ee4                                  
00503ee6                                  this_1 = this_2;
00503eea                                  edi_6 = arg4;
00503eee                                  cond:6_1 = m_num_5 != 0;
00503ed1                              }
00503ed1                              
00503ef0                              if (cond:6_1)
00503f10                                  eax_9 = *(uint32_t*)*(uint32_t*)this_1->terrain_desc.m_data->terrain_tex.m_data;
00503ef0                              else
00503ef2                                  eax_9 = nullptr;
00503ef2                              
00503f16                          label_503f16:
00503f16                              arg3[1] = eax_9;
00503eb8                          }
00503eb8                          
00503f19                          k += 1;
00503f1d                      } while (k < 4);
00503f1d                      
00503f2b                      return 1;
00503e14                  }
00503e14                  
00503e16                  j += 1;
00503e1a              } while (j < 4);
00503e08          }
00503e21      }
00503e21      
00503e23      uint32_t m_num_4 = this_1->terrain_desc.m_num;
00503e26      int32_t eax_2 = 0;
00503e28      bool cond:2 = m_num_4 != 0;
00503e2a      void* ecx_5;
00503e2a      
00503e2a      if (m_num_4 > 0)
00503e2a      {
00503e2c          class TMTerrainDesc** m_data_5 = this_1->terrain_desc.m_data;
00503e2f          class TMTerrainDesc** m_data_7 = m_data_5;
00503e2f          
00503e42          do
00503e42          {
00503e36              if (esi_2 == *(uint32_t*)m_data_7->terrain_type)
00503e36              {
00503fd8                  ecx_5 = m_data_5[eax_2];
00503fdf                  goto label_503fe9;
00503e36              }
00503e36              
00503e3c              eax_2 += 1;
00503e3d              m_data_7 = &m_data_7[1];
00503e42          } while (eax_2 < m_num_4);
00503e42          
00503e48          cond:2 = m_num_4 != 0;
00503e2a      }
00503e2a      
00503e4a      class TerrainTex* eax_3;
00503e4a      
00503e4a      if (cond:2)
00503e4a      {
00503fe4          ecx_5 = *(uint32_t*)this_1->terrain_desc.m_data;
00503fe9      label_503fe9:
00503fe9          eax_3 = **(uint32_t**)((char*)ecx_5 + 4);
00503e4a      }
00503e4a      else
00503e50          eax_3 = nullptr;
00503e50      
00503fef      *(uint32_t*)arg3 = eax_3;
00503ff1      uint32_t m_num_1 = this_1->terrain_desc.m_num;
00503ff4      int32_t eax_24 = 0;
00503ff6      bool cond:4 = m_num_1 != 0;
00503ff8      class TMTerrainDesc* edx_15;
00503ff8      
00503ff8      if (m_num_1 > 0)
00503ff8      {
00503ffa          class TMTerrainDesc** m_data_2 = this_1->terrain_desc.m_data;
00503ffd          class TMTerrainDesc** m_data_9 = m_data_2;
00503ffd          
0050400c          do
0050400c          {
00504004              if (((arg2 >> 0xa) & 0x1f) == *(uint32_t*)m_data_9->terrain_type)
00504004              {
00504016                  edx_15 = m_data_2[eax_24];
00504019                  goto label_504023;
00504004              }
00504004              
00504006              eax_24 += 1;
00504007              m_data_9 = &m_data_9[1];
0050400c          } while (eax_24 < m_num_1);
0050400c          
0050400e          cond:4 = m_num_1 != 0;
00503ff8      }
00503ff8      
00504010      class TerrainTex* eax_25;
00504010      
00504010      if (cond:4)
00504010      {
0050401e          edx_15 = *(uint32_t*)this_1->terrain_desc.m_data;
00504023      label_504023:
00504023          eax_25 = *(uint32_t*)edx_15->terrain_tex.m_data;
00504010      }
00504010      else
00504012          eax_25 = nullptr;
00504012      
00504029      arg3[1] = eax_25;
0050402c      uint32_t m_num_2 = this_1->terrain_desc.m_num;
0050402f      int32_t eax_27 = 0;
00504031      bool cond:5 = m_num_2 != 0;
00504033      class TMTerrainDesc* edx_16;
00504033      
00504033      if (m_num_2 > 0)
00504033      {
00504035          class TMTerrainDesc** m_data_3 = this_1->terrain_desc.m_data;
00504038          class TMTerrainDesc** m_data_10 = m_data_3;
00504038          
00504050          do
00504050          {
00504048              if (((arg2 >> 5) & 0x1f) == *(uint32_t*)m_data_10->terrain_type)
00504048              {
0050405a                  edx_16 = m_data_3[eax_27];
0050405d                  goto label_504067;
00504048              }
00504048              
0050404a              eax_27 += 1;
0050404b              m_data_10 = &m_data_10[1];
00504050          } while (eax_27 < m_num_2);
00504050          
00504052          cond:5 = m_num_2 != 0;
00504033      }
00504033      
00504054      class TerrainTex* eax_28;
00504054      
00504054      if (cond:5)
00504054      {
00504062          edx_16 = *(uint32_t*)this_1->terrain_desc.m_data;
00504067      label_504067:
00504067          eax_28 = *(uint32_t*)edx_16->terrain_tex.m_data;
00504054      }
00504054      else
00504056          eax_28 = nullptr;
00504056      
0050406d      arg3[2] = eax_28;
00504070      uint32_t m_num_3 = this_1->terrain_desc.m_num;
00504073      int32_t eax_30 = 0;
00504075      bool cond:8 = m_num_3 != 0;
00504077      class TMTerrainDesc* edx_17;
00504077      
00504077      if (m_num_3 > 0)
00504077      {
00504079          class TMTerrainDesc** m_data_4 = this_1->terrain_desc.m_data;
00504080          class TMTerrainDesc** m_data_11 = m_data_4;
00504080          
0050408f          do
0050408f          {
00504087              if ((arg2 & 0x1f) == *(uint32_t*)m_data_11->terrain_type)
00504087              {
00504099                  edx_17 = m_data_4[eax_30];
0050409c                  goto label_5040a6;
00504087              }
00504087              
00504089              eax_30 += 1;
0050408a              m_data_11 = &m_data_11[1];
0050408f          } while (eax_30 < m_num_3);
0050408f          
00504091          cond:8 = m_num_3 != 0;
00504077      }
00504077      
00504093      class TerrainTex* eax_31;
00504093      
00504093      if (cond:8)
00504093      {
005040a1          edx_17 = *(uint32_t*)this_1->terrain_desc.m_data;
005040a6      label_5040a6:
005040a6          eax_31 = *(uint32_t*)edx_17->terrain_tex.m_data;
00504093      }
00504093      else
00504095          eax_31 = nullptr;
00504095      
005040ac      arg3[3] = eax_31;
005040b6      *(uint32_t*)arg4 = 2;
005040bc      arg4[1] = 4;
005040c3      arg4[2] = 8;
005040d3      return 1;
00503dc0  }

005040d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005040e0  uint32_t __thiscall TexMerge::Pack(class TexMerge* this, void** arg2, uint32_t* arg3)

005040e0  {
005040e0      class TexMerge* this_2 = this;
005040f0      class TexMerge* this_1 = this;
005040f0      
005040f4      if (*(uint32_t*)arg3 >= 4)
005040f4      {
005040fa          **(uint32_t**)arg2 = this->base_tex_size;
005040fc          *(uint32_t*)arg2 += 4;
005040ff          *(uint32_t*)arg3 -= 4;
005040f4      }
005040f4      
00504105      uint32_t m_num = this->corner_terrain_maps.m_num;
00504105      
0050410c      if (*(uint32_t*)arg3 >= 4)
0050410c      {
00504110          **(uint32_t**)arg2 = m_num;
00504112          *(uint32_t*)arg2 += 4;
00504115          *(uint32_t*)arg3 -= 4;
0050410c      }
0050410c      
00504118      int32_t edx_3 = 0;
00504118      
0050411c      if (m_num > 0)
0050411c      {
00504156          do
00504156          {
00504126              int32_t* eax_3 = this->corner_terrain_maps.m_data[edx_3];
00504126              
00504129              if (*(uint32_t*)arg3 >= 4)
00504129              {
0050412f                  **(uint32_t**)arg2 = *(uint32_t*)eax_3;
00504131                  *(uint32_t*)arg2 += 4;
00504136                  uint32_t ebp_3 = (*(uint32_t*)arg3 - 4);
0050413e                  *(uint32_t*)arg3 = ebp_3;
0050413e                  
00504140                  if (ebp_3 >= 4)
00504140                  {
00504147                      **(uint32_t**)arg2 = eax_3[1];
00504149                      *(uint32_t*)arg2 += 4;
0050414c                      *(uint32_t*)arg3 -= 4;
00504140                  }
00504129              }
00504129              
00504153              edx_3 += 1;
00504156          } while (edx_3 < m_num);
0050411c      }
0050411c      
0050415b      uint32_t m_num_1 = this->side_terrain_maps.m_num;
0050415b      
00504162      if (*(uint32_t*)arg3 >= 4)
00504162      {
00504166          **(uint32_t**)arg2 = m_num_1;
00504168          *(uint32_t*)arg2 += 4;
0050416b          *(uint32_t*)arg3 -= 4;
00504162      }
00504162      
0050416e      int32_t edx_5 = 0;
0050416e      
00504172      if (m_num_1 > 0)
00504172      {
005041aa          do
005041aa          {
0050417a              int32_t* eax_7 = this->side_terrain_maps.m_data[edx_5];
0050417a              
0050417d              if (*(uint32_t*)arg3 >= 4)
0050417d              {
00504183                  **(uint32_t**)arg2 = *(uint32_t*)eax_7;
00504185                  *(uint32_t*)arg2 += 4;
0050418a                  uint32_t ebp_6 = (*(uint32_t*)arg3 - 4);
00504192                  *(uint32_t*)arg3 = ebp_6;
00504192                  
00504194                  if (ebp_6 >= 4)
00504194                  {
0050419b                      **(uint32_t**)arg2 = eax_7[1];
0050419d                      *(uint32_t*)arg2 += 4;
005041a0                      *(uint32_t*)arg3 -= 4;
00504194                  }
0050417d              }
0050417d              
005041a7              edx_5 += 1;
005041aa          } while (edx_5 < m_num_1);
00504172      }
00504172      
005041af      uint32_t m_num_2 = this->road_maps.m_num;
005041af      
005041b6      if (*(uint32_t*)arg3 >= 4)
005041b6      {
005041ba          **(uint32_t**)arg2 = m_num_2;
005041bc          *(uint32_t*)arg2 += 4;
005041bf          *(uint32_t*)arg3 -= 4;
005041b6      }
005041b6      
005041c2      int32_t edx_7 = 0;
005041c2      
005041c6      if (m_num_2 > 0)
005041c6      {
00504206          do
00504206          {
005041d6              int32_t* eax_11 = this->road_maps.m_data[edx_7];
005041d6              
005041d9              if (*(uint32_t*)arg3 >= 4)
005041d9              {
005041df                  **(uint32_t**)arg2 = *(uint32_t*)eax_11;
005041e1                  *(uint32_t*)arg2 += 4;
005041e6                  uint32_t ebp_9 = (*(uint32_t*)arg3 - 4);
005041ee                  *(uint32_t*)arg3 = ebp_9;
005041ee                  
005041f0                  if (ebp_9 >= 4)
005041f0                  {
005041f7                      **(uint32_t**)arg2 = eax_11[1];
005041f9                      *(uint32_t*)arg2 += 4;
005041fc                      *(uint32_t*)arg3 -= 4;
005041f0                  }
005041d9              }
005041d9              
00504203              edx_7 += 1;
00504206          } while (edx_7 < m_num_2);
005041c6      }
005041c6      
0050420b      uint32_t m_num_3 = this->terrain_desc.m_num;
0050420b      
0050420e      if (*(uint32_t*)arg3 >= 4)
0050420e      {
00504212          **(uint32_t**)arg2 = m_num_3;
00504214          *(uint32_t*)arg2 += 4;
00504217          *(uint32_t*)arg3 -= 4;
0050420e      }
0050420e      
0050421a      int32_t ebx_10 = 0;
0050421a      
0050421e      if (m_num_3 > 0)
0050421e      {
0050422c          while (true)
0050422c          {
0050422c              int32_t* eax_15 = this->terrain_desc.m_data[ebx_10];
0050422c              
0050422f              if (*(uint32_t*)arg3 >= 4)
0050422f              {
00504235                  **(uint32_t**)arg2 = *(uint32_t*)eax_15;
00504237                  *(uint32_t*)arg2 += 4;
0050423a                  *(uint32_t*)arg3 -= 4;
0050422f              }
0050422f              
00504244              TerrainTex::Pack(*(uint32_t*)eax_15[1], arg2, arg3);
00504249              ebx_10 += 1;
00504249              
0050424c              if (ebx_10 >= m_num_3)
0050424c                  break;
0050424c              
00504222              this = this_1;
0050422c          }
0050421e      }
0050421e      
00504255      return *(uint32_t*)arg3;
005040e0  }

005041ca                                8d 9b 00 00 00 00                                                            ......
00504258                                                                          90 90 90 90 90 90 90 90                          ........

00504260  int32_t __thiscall TMTerrainDesc::UnPack(class TMTerrainDesc* this, void** arg2, uint32_t* arg3)

00504260  {
00504260      class TMTerrainDesc* this_1 = this;
00504274      uint32_t* edx;
00504274      
00504274      if (*(uint32_t*)arg3 < 4)
00504286          edx = arg3;
00504274      else
00504274      {
00504276          void* eax_1 = *(uint32_t*)arg2;
00504279          edx = *(uint32_t*)eax_1;
0050427e          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
00504281          *(uint32_t*)arg3 -= 4;
00504274      }
00504274      
0050428c      this->terrain_type = edx;
0050428e      void* eax_3 = operator new(0x30);
0050429a      void* ebx;
0050429a      
0050429a      if (eax_3 == 0)
005042cf          ebx = nullptr;
0050429a      else
0050429a      {
005042a2          *(uint32_t*)eax_3 = INVALID_DID.id;
005042a4          __builtin_memset(((char*)eax_3 + 4), 0, 0x28);
005042c8          *(uint32_t*)((char*)eax_3 + 0x2c) = INVALID_DID.id;
005042cb          ebx = eax_3;
0050429a      }
0050429a      
005042d5      TerrainTex::UnPack(ebx, arg2, arg3);
005042de      uint32_t m_size = this->terrain_tex.m_size;
005042e9      int32_t eax_5;
005042e9      
005042e9      if (this->terrain_tex.m_num >= m_size)
005042e9      {
005042ed          uint32_t eax_4;
005042ed          
005042ed          if (m_size <= 0)
005042f3              eax_4 = 8;
005042ed          else
005042ef              eax_4 = (m_size * 2);
005042ef          
005042fb          eax_5 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->terrain_tex, eax_4);
005042e9      }
005042e9      
00504302      if ((this->terrain_tex.m_num < m_size || eax_5 != 0))
00504302      {
005042e4          this->terrain_tex.m_data[this->terrain_tex.m_num] = ebx;
005042e4          this->terrain_tex.m_num += 1;
00504302      }
00504302      
00504319      return 1;
00504260  }

0050431c                                                                                      90 90 90 90                              ....

00504320  void __fastcall TexMerge::Destroy(class TexMerge* this)

00504320  {
0050432a      int32_t i = 0;
0050432a      
0050432f      if (this->corner_terrain_maps.m_num > 0)
0050432f      {
00504359          do
00504359          {
00504334              void* edi_1 = this->corner_terrain_maps.m_data[i];
00504334              
00504339              if (edi_1 != 0)
00504339              {
0050433b                  int32_t* ecx = *(uint32_t*)((char*)edi_1 + 8);
0050433b                  
00504340                  if (ecx != 0)
00504340                  {
00504344                      *(uint32_t*)(*(uint32_t*)ecx + 0x14)();
00504347                      *(uint32_t*)((char*)edi_1 + 8) = 0;
00504340                  }
00504340                  
0050434b                  operator delete(edi_1);
00504339              }
00504339              
00504356              i += 1;
00504359          } while (i < this->corner_terrain_maps.m_num);
0050432f      }
0050432f      
0050435f      this->corner_terrain_maps.m_num = 0;
00504362      this->corner_terrain_maps.m_size = 0;
00504365      operator delete[](this->corner_terrain_maps.m_data);
0050436a      this->corner_terrain_maps.m_data = 0;
00504373      int32_t i_1 = 0;
00504373      
00504377      if (this->side_terrain_maps.m_num > 0)
00504377      {
005043a8          do
005043a8          {
00504383              void* edi_2 = this->side_terrain_maps.m_data[i_1];
00504383              
00504388              if (edi_2 != 0)
00504388              {
0050438a                  int32_t* ecx_2 = *(uint32_t*)((char*)edi_2 + 8);
0050438a                  
0050438f                  if (ecx_2 != 0)
0050438f                  {
00504393                      *(uint32_t*)(*(uint32_t*)ecx_2 + 0x14)();
00504396                      *(uint32_t*)((char*)edi_2 + 8) = 0;
0050438f                  }
0050438f                  
0050439a                  operator delete(edi_2);
00504388              }
00504388              
005043a5              i_1 += 1;
005043a8          } while (i_1 < this->side_terrain_maps.m_num);
00504377      }
00504377      
005043ae      this->side_terrain_maps.m_num = 0;
005043b1      this->side_terrain_maps.m_size = 0;
005043b4      operator delete[](this->side_terrain_maps.m_data);
005043b9      this->side_terrain_maps.m_data = 0;
005043c2      int32_t i_2 = 0;
005043c2      
005043c6      if (this->road_maps.m_num > 0)
005043c6      {
005043f0          do
005043f0          {
005043cb              void* edi_3 = this->road_maps.m_data[i_2];
005043cb              
005043d0              if (edi_3 != 0)
005043d0              {
005043d2                  int32_t* ecx_4 = *(uint32_t*)((char*)edi_3 + 8);
005043d2                  
005043d7                  if (ecx_4 != 0)
005043d7                  {
005043db                      *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
005043de                      *(uint32_t*)((char*)edi_3 + 8) = 0;
005043d7                  }
005043d7                  
005043e2                  operator delete(edi_3);
005043d0              }
005043d0              
005043ed              i_2 += 1;
005043f0          } while (i_2 < this->road_maps.m_num);
005043c6      }
005043c6      
005043f6      this->road_maps.m_num = 0;
005043f9      this->road_maps.m_size = 0;
005043fc      operator delete[](this->road_maps.m_data);
00504401      this->road_maps.m_data = 0;
0050440a      int32_t i_3 = 0;
0050440a      
0050440e      if (this->terrain_desc.m_num > 0)
0050440e      {
00504430          do
00504430          {
00504413              class TMTerrainDesc* edi_4 = this->terrain_desc.m_data[i_3];
00504413              
00504418              if (edi_4 != 0)
00504418              {
0050441c                  TMTerrainDesc::~TMTerrainDesc(edi_4);
00504422                  operator delete(edi_4);
00504418              }
00504418              
0050442d              i_3 += 1;
00504430          } while (i_3 < this->terrain_desc.m_num);
0050440e      }
0050440e      
00504436      this->terrain_desc.m_num = 0;
00504439      this->terrain_desc.m_size = 0;
0050443c      operator delete[](this->terrain_desc.m_data);
00504445      this->terrain_desc.m_data = 0;
00504320  }

0050444c                                      90 90 90 90                                                              ....

00504450  int32_t __thiscall TexMerge::FillTempTexBuffer(class TexMerge* this, uint32_t arg2, uint32_t arg3)

00504450  {
00504468      void var_1c;
00504468      class TerrainTex* var_10;
00504468      TexMerge::GetTerrain(this, arg2, &var_10, &var_1c);
0050447b      uint8_t* TexMerge::tex_data_1 = TexMerge::tex_data;
0050447b      
00504483      if (TexMerge::tex_data_1 != 0)
00504483      {
005044b4      label_5044b4:
005044b4          class TerrainTex* eax_3 = TexMerge::GetTerrainTex(this, 0x20);
005044c8          class TerrainTex* var_28 = eax_3;
005044cc          int32_t var_2c;
005044cc          void var_24;
005044cc          TexMerge::GetRoadCode(this, arg2, &var_2c, &var_24);
005044d1          int32_t ebp_1 = var_2c;
005044db          class TerrainTex* var_40_3;
005044db          
005044db          if ((ebp_1 == 0 || eax_3 == 0))
005044e4              var_40_3 = var_10;
005044db          else
005044dd              var_40_3 = eax_3;
005044dd          
005044e5          uint32_t ebx_2 = arg3;
005044e5          
005044f4          if (TexMerge::CopyAndTile(this, TexMerge::tex_data_1, ebx_2, var_40_3) != 0)
005044f4          {
005044f8              if (ebp_1 == 0)
005044f8              {
00504549                  for (int32_t i = 0; i < 0xc; i += 4)
00504549                  {
00504500                      uint32_t eax_5 = *(uint32_t*)(&var_1c + i);
00504500                      
00504506                      if (eax_5 == 0)
00504506                          break;
00504506                      
00504521                      if (TexMerge::FindTerrainAlpha(this, eax_5, &var_2c, &arg3, arg2) == 0)
005044ad                          return 0;
005044ad                      
0050453e                      void var_c;
0050453e                      TexMerge::Merge(this, TexMerge::tex_data, ebx_2, *(uint32_t*)(var_2c + 8), arg3, *(uint32_t*)(&var_c + i));
00504549                  }
00504549                  
0050454b                  class TerrainTex* ebp_2 = var_28;
0050454b                  
00504551                  if (ebp_2 != 0)
00504551                  {
00504599                      for (int32_t i_1 = 0; i_1 < 2; i_1 += 1)
00504599                      {
00504555                          uint32_t eax_9 = *(uint32_t*)(&var_24 + (i_1 << 2));
00504555                          
0050455b                          if (eax_9 == 0)
0050455b                              break;
0050455b                          
00504576                          if (TexMerge::FindRoadAlpha(this, eax_9, &var_28, &arg3, arg2) != 0)
00504590                              TexMerge::Merge(this, TexMerge::tex_data, ebx_2, var_28->min_slope, arg3, ebp_2);
00504599                      }
00504551                  }
005044f8              }
005044f8              
005045a7              return 1;
005044f4          }
00504483      }
00504483      else
00504483      {
00504485          uint32_t base_tex_size = this->base_tex_size;
00504495          TexMerge::tex_data_1 = operator new[](((base_tex_size * base_tex_size) << 2));
0050449c          TexMerge::tex_data = TexMerge::tex_data_1;
0050449c          
005044a2          if (TexMerge::tex_data_1 != 0)
005044a2              goto label_5044b4;
00504483      }
00504483      
005044ad      return 0;
00504450  }

005045aa                                90 90 90 90 90 90                                                            ......

005045b0  int32_t __thiscall TexMerge::UnPack(class TexMerge* this, void** arg2, uint32_t* arg3)

005045b0  {
005045b0      class TexMerge* this_1 = this;
005045b4      uint32_t* esi = arg3;
005045bc      void** edi = arg2;
005045c4      uint32_t edx_3;
005045c4      
005045c4      if (*(uint32_t*)esi >= 4)
005045c4      {
005045ca          this->base_tex_size = **(uint32_t**)edi;
005045cc          *(uint32_t*)edi += 4;
005045d1          edx_3 = (*(uint32_t*)esi - 4);
005045d9          *(uint32_t*)esi = edx_3;
005045c4      }
005045c4      
005045db      uint32_t* ebx;
005045db      
005045db      if ((*(uint32_t*)esi < 4 || edx_3 < 4))
005045f3          ebx = arg3;
005045db      else
005045db      {
005045dd          void* eax_3 = *(uint32_t*)edi;
005045df          ebx = *(uint32_t*)eax_3;
005045e4          *(uint32_t*)edi = ((char*)eax_3 + 4);
005045eb          arg3 = ebx;
005045ef          *(uint32_t*)esi -= 4;
005045db      }
005045db      
005045fd      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->corner_terrain_maps, ebx);
005045fd      
00504604      if (ebx > 0)
00504604      {
0050460a          arg2 = ebx;
0050468c          void** i;
0050468c          
0050468c          do
0050468c          {
00504612              void* eax_7 = operator new(0xc);
00504617              void* ebx_1 = nullptr;
00504617              
0050461e              if (eax_7 != 0)
0050461e              {
00504620                  *(uint32_t*)eax_7 = 0;
00504628                  *(uint32_t*)((char*)eax_7 + 8) = 0;
0050462b                  *(uint32_t*)((char*)eax_7 + 4) = INVALID_DID.id;
0050462e                  ebx_1 = eax_7;
0050461e              }
0050461e              
00504633              if (*(uint32_t*)esi >= 4)
00504633              {
00504639                  *(uint32_t*)ebx_1 = **(uint32_t**)edi;
0050463b                  *(uint32_t*)edi += 4;
00504640                  uint32_t ecx_3 = (*(uint32_t*)esi - 4);
00504648                  *(uint32_t*)esi = ecx_3;
00504648                  
0050464a                  if (ecx_3 >= 4)
0050464a                  {
0050464c                      void* eax_10 = *(uint32_t*)edi;
0050464e                      int32_t ecx_4 = *(uint32_t*)eax_10;
00504653                      *(uint32_t*)edi = ((char*)eax_10 + 4);
00504655                      *(uint32_t*)esi -= 4;
00504658                      *(uint32_t*)((char*)ebx_1 + 4) = ecx_4;
0050464a                  }
00504633              }
00504633              
0050465b              uint32_t m_size = this->corner_terrain_maps.m_size;
00504661              int32_t eax_13;
00504661              
00504661              if (this->corner_terrain_maps.m_num >= m_size)
00504661              {
00504665                  uint32_t eax_12;
00504665                  
00504665                  if (m_size <= 0)
0050466b                      eax_12 = 8;
00504665                  else
00504667                      eax_12 = (m_size * 2);
00504667                  
00504673                  eax_13 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->corner_terrain_maps, eax_12);
00504661              }
00504661              
0050467a              if ((this->corner_terrain_maps.m_num < m_size || eax_13 != 0))
0050467a              {
005045f7                  this->corner_terrain_maps.m_data[this->corner_terrain_maps.m_num] = ebx_1;
005045f7                  this->corner_terrain_maps.m_num += 1;
0050467a              }
0050467a              
00504688              i = arg2;
00504688              arg2 -= 1;
0050468c          } while (i != 1);
0050468e          ebx = arg3;
00504604      }
00504604      
00504695      if (*(uint32_t*)esi >= 4)
00504695      {
00504697          void* eax_14 = *(uint32_t*)edi;
00504699          uint32_t* ecx_7 = *(uint32_t*)eax_14;
0050469e          *(uint32_t*)edi = ((char*)eax_14 + 4);
005046a5          arg3 = ecx_7;
005046a9          *(uint32_t*)esi -= 4;
005046ab          ebx = ecx_7;
00504695      }
00504695      
005046b7      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->side_terrain_maps, ebx);
005046b7      
005046be      if (ebx > 0)
005046be      {
005046c4          arg2 = ebx;
00504744          void** i_1;
00504744          
00504744          do
00504744          {
005046ca              void* eax_18 = operator new(0xc);
005046cf              void* ebx_2 = nullptr;
005046cf              
005046d6              if (eax_18 != 0)
005046d6              {
005046d8                  *(uint32_t*)eax_18 = 0;
005046e0                  *(uint32_t*)((char*)eax_18 + 8) = 0;
005046e3                  *(uint32_t*)((char*)eax_18 + 4) = INVALID_DID.id;
005046e6                  ebx_2 = eax_18;
005046d6              }
005046d6              
005046eb              if (*(uint32_t*)esi >= 4)
005046eb              {
005046f1                  *(uint32_t*)ebx_2 = **(uint32_t**)edi;
005046f3                  *(uint32_t*)edi += 4;
005046f8                  uint32_t ecx_11 = (*(uint32_t*)esi - 4);
00504700                  *(uint32_t*)esi = ecx_11;
00504700                  
00504702                  if (ecx_11 >= 4)
00504702                  {
00504704                      void* eax_21 = *(uint32_t*)edi;
00504706                      int32_t ecx_12 = *(uint32_t*)eax_21;
0050470b                      *(uint32_t*)edi = ((char*)eax_21 + 4);
0050470d                      *(uint32_t*)esi -= 4;
00504710                      *(uint32_t*)((char*)ebx_2 + 4) = ecx_12;
00504702                  }
005046eb              }
005046eb              
00504713              uint32_t m_size_1 = this->side_terrain_maps.m_size;
00504719              int32_t eax_24;
00504719              
00504719              if (this->side_terrain_maps.m_num >= m_size_1)
00504719              {
0050471d                  uint32_t eax_23;
0050471d                  
0050471d                  if (m_size_1 <= 0)
00504723                      eax_23 = 8;
0050471d                  else
0050471f                      eax_23 = (m_size_1 * 2);
0050471f                  
0050472b                  eax_24 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->side_terrain_maps, eax_23);
00504719              }
00504719              
00504732              if ((this->side_terrain_maps.m_num < m_size_1 || eax_24 != 0))
00504732              {
005046b1                  this->side_terrain_maps.m_data[this->side_terrain_maps.m_num] = ebx_2;
005046b1                  this->side_terrain_maps.m_num += 1;
00504732              }
00504732              
00504740              i_1 = arg2;
00504740              arg2 -= 1;
00504744          } while (i_1 != 1);
00504746          ebx = arg3;
005046be      }
005046be      
0050474d      if (*(uint32_t*)esi >= 4)
0050474d      {
0050474f          void* eax_26 = *(uint32_t*)edi;
00504751          uint32_t* ecx_14 = *(uint32_t*)eax_26;
00504756          *(uint32_t*)edi = ((char*)eax_26 + 4);
0050475d          arg3 = ecx_14;
00504761          *(uint32_t*)esi -= 4;
00504763          ebx = ecx_14;
0050474d      }
0050474d      
0050476f      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->road_maps, ebx);
0050476f      
00504776      if (ebx > 0)
00504776      {
0050477c          arg2 = ebx;
005047fc          void** i_2;
005047fc          
005047fc          do
005047fc          {
00504782              void* eax_30 = operator new(0xc);
00504787              void* ebx_3 = nullptr;
00504787              
0050478e              if (eax_30 != 0)
0050478e              {
00504790                  *(uint32_t*)eax_30 = 0;
00504798                  *(uint32_t*)((char*)eax_30 + 8) = 0;
0050479b                  *(uint32_t*)((char*)eax_30 + 4) = INVALID_DID.id;
0050479e                  ebx_3 = eax_30;
0050478e              }
0050478e              
005047a3              if (*(uint32_t*)esi >= 4)
005047a3              {
005047a9                  *(uint32_t*)ebx_3 = **(uint32_t**)edi;
005047ab                  *(uint32_t*)edi += 4;
005047b0                  uint32_t ecx_18 = (*(uint32_t*)esi - 4);
005047b8                  *(uint32_t*)esi = ecx_18;
005047b8                  
005047ba                  if (ecx_18 >= 4)
005047ba                  {
005047bc                      void* eax_33 = *(uint32_t*)edi;
005047be                      int32_t ecx_19 = *(uint32_t*)eax_33;
005047c3                      *(uint32_t*)edi = ((char*)eax_33 + 4);
005047c5                      *(uint32_t*)esi -= 4;
005047c8                      *(uint32_t*)((char*)ebx_3 + 4) = ecx_19;
005047ba                  }
005047a3              }
005047a3              
005047cb              uint32_t m_size_2 = this->road_maps.m_size;
005047d1              int32_t eax_36;
005047d1              
005047d1              if (this->road_maps.m_num >= m_size_2)
005047d1              {
005047d5                  uint32_t eax_35;
005047d5                  
005047d5                  if (m_size_2 <= 0)
005047db                      eax_35 = 8;
005047d5                  else
005047d7                      eax_35 = (m_size_2 * 2);
005047d7                  
005047e3                  eax_36 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->road_maps, eax_35);
005047d1              }
005047d1              
005047ea              if ((this->road_maps.m_num < m_size_2 || eax_36 != 0))
005047ea              {
00504769                  this->road_maps.m_data[this->road_maps.m_num] = ebx_3;
00504769                  this->road_maps.m_num += 1;
005047ea              }
005047ea              
005047f8              i_2 = arg2;
005047f8              arg2 -= 1;
005047fc          } while (i_2 != 1);
00504776      }
00504776      
00504801      if (*(uint32_t*)esi >= 4)
00504801      {
00504803          void* eax_38 = *(uint32_t*)edi;
00504805          uint32_t* ecx_21 = *(uint32_t*)eax_38;
0050480a          *(uint32_t*)edi = ((char*)eax_38 + 4);
00504811          arg3 = ecx_21;
00504815          *(uint32_t*)esi -= 4;
00504801      }
00504801      
00504825      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->terrain_desc.m_data, arg3);
0050482e      void* ebp_5 = nullptr;
00504832      arg2 = nullptr;
00504832      
00504836      if (arg3 <= 0)
00504842          return 1;
00504842      
00504849      while (true)
00504849      {
00504849          void* eax_44 = operator new(0x10);
00504849          
00504853          if (eax_44 != 0)
00504853          {
00504855              *(uint32_t*)eax_44 = 0x1f;
0050485b              *(uint32_t*)((char*)eax_44 + 4) = 0;
0050485e              *(uint32_t*)((char*)eax_44 + 8) = 0;
00504861              *(uint32_t*)((char*)eax_44 + 0xc) = 0;
00504864              ebp_5 = eax_44;
00504853          }
00504853          
0050486a          TMTerrainDesc::UnPack(ebp_5, edi, esi);
00504873          uint32_t m_size_3 = this->terrain_desc.m_size;
00504879          int32_t eax_46;
00504879          
00504879          if (this->terrain_desc.m_num >= m_size_3)
00504879          {
0050487d              uint32_t eax_45;
0050487d              
0050487d              if (m_size_3 <= 0)
00504883                  eax_45 = 8;
0050487d              else
0050487f                  eax_45 = (m_size_3 * 2);
0050487f              
0050488b              eax_46 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->terrain_desc, eax_45);
00504879          }
00504879          
00504892          if ((this->terrain_desc.m_num < m_size_3 || eax_46 != 0))
00504892          {
0050481f              this->terrain_desc.m_data[this->terrain_desc.m_num] = ebp_5;
0050481f              this->terrain_desc.m_num += 1;
00504892          }
00504892          
005048a8          bool cond:6_1 = ((char*)arg2 + 1) < arg3;
005048aa          arg2 += 1;
005048aa          
005048ae          if (!(cond:6_1))
005048ae              break;
005048ae          
00504845          ebp_5 = nullptr;
00504849      }
00504849      
005048ba      return 1;
005045b0  }

005048c7                       90 90 90 90 90 90 90 90 90                                                         .........

005048d0  void __fastcall TexMerge::~TexMerge(class TexMerge* this)

005048d0  {
005048d3      TexMerge::Destroy(this);
005048dc      operator delete[](this->terrain_desc.m_data);
005048e5      operator delete[](this->road_maps.m_data);
005048ee      operator delete[](this->side_terrain_maps.m_data);
005048f7      operator delete[](this->corner_terrain_maps.m_data);
005048d0  }

00504901     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00504910  uint8_t TexMerge::RestoreSurface(class CSurface* arg1)

00504910  {
00504921      class CommandListElement* prev = CommandList::GetHead(CRegionDesc::current_region->terrain_info)->prev;
00504937      uint32_t id = arg1->m_DID.id;
00504945      uint32_t ImgTex::min_tex_size_2 = (COMBINE(0, (prev->next >> ((int8_t)ImageShift[ImgTex::fLandTextureScale]))) / (id >> 0x1c));
00504947      uint32_t ImgTex::min_tex_size_1 = ImgTex::min_tex_size;
00504947      
0050494e      if (ImgTex::min_tex_size_2 < ImgTex::min_tex_size_1)
00504950          ImgTex::min_tex_size_2 = ImgTex::min_tex_size_1;
00504950      
00504954      CSurface::ClearSurface(arg1);
00504964      int32_t eax_4;
00504964      
00504964      if (TexMerge::FillTempTexBuffer(prev, id, ImgTex::min_tex_size_2) != 0)
00504964      {
0050496f          eax_4 = ImgTex::CreateLScapeTexture(TexMerge::tex_data, ImgTex::min_tex_size_2, ImgTex::min_tex_size_2);
0050496f          
0050497b          if (eax_4 != 0)
0050497b          {
0050498b              if (CSurface::UseTextureMap(arg1, eax_4, SH_TEXMERGE) != 0)
0050498b              {
0050498f                  *(uint32_t*)(*(uint32_t*)eax_4 + 0x14)();
00504995                  int32_t eax_7;
00504995                  eax_7 = 1;
00504998                  return 1;
0050498b              }
0050498b              
0050499b              *(uint32_t*)(*(uint32_t*)eax_4 + 0x14)();
0050497b          }
00504964      }
00504964      
005049a1      eax_4 = 0;
005049a4      return 0;
00504910  }

005049a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005049b0  class CSurface* __thiscall TexMerge::MakeNewSurface(class TexMerge* this, uint32_t arg2, uint32_t arg3)

005049b0  {
005049cd      uint32_t ImgTex::min_tex_size_2 = (COMBINE(0, (this->base_tex_size >> ((int8_t)ImageShift[ImgTex::fLandTextureScale]))) / arg3);
005049cf      uint32_t ImgTex::min_tex_size_1 = ImgTex::min_tex_size;
005049cf      
005049d6      if (ImgTex::min_tex_size_2 < ImgTex::min_tex_size_1)
005049d8          ImgTex::min_tex_size_2 = ImgTex::min_tex_size_1;
005049d8      
005049dc      class CSurface* result = CSurface::makeCustomSurface(SH_TEXMERGE);
005049dc      
005049e8      if (result != 0)
005049e8      {
005049ea          result->vtable->SetDID(arg2);
005049ea          
00504a03          if (TexMerge::FillTempTexBuffer(this, arg2, ImgTex::min_tex_size_2) != 0)
00504a03          {
00504a0d              class ImgTex* eax_5 = ImgTex::CreateLScapeTexture(TexMerge::tex_data, ImgTex::min_tex_size_2, ImgTex::min_tex_size_2);
00504a0d              
00504a19              if (eax_5 != 0)
00504a19              {
00504a20                  CSurface::UseTextureMap(result, eax_5, SH_TEXMERGE);
00504a25                  eax_5->vtable->Release();
00504a19              }
00504a03          }
005049e8      }
005049e8      
00504a31      return result;
005049b0  }

00504a34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00504a40  void __fastcall Position::adjust_to_outside(class Position* this)

00504a40  {
00504a43      class AC1Legacy::Vector3* var_4 = &this->frame.m_fOrigin;
00504a47      uint32_t* var_8 = &this->objcell_id;
00504a48      class AC1Legacy::Vector3* edx;
00504a48      LandDefs::adjust_to_outside(&this->frame.m_fOrigin, edx);
00504a40  }

00504a51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00504a60  int32_t __stdcall LScape::get_block_shift(class LScape* this @ ecx, uint32_t arg2, uint32_t arg3, int32_t* arg4, int32_t* arg5)

00504a60  {
00504a66      if (arg2 == 0)
00504a6a          return 0;
00504a6a      
00504a74      uint32_t eax_3;
00504a74      uint32_t esi_1;
00504a74      
00504a74      if (arg3 == 0)
00504a74      {
00504a88          esi_1 = arg3;
00504a8c          eax_3 = arg3;
00504a74      }
00504a74      else
00504a74      {
00504a7e          eax_3 = ((arg3 >> 0x15) & 0x7f8);
00504a83          esi_1 = (((uint32_t)*(uint8_t*)((char*)arg3)[2]) << 3);
00504a74      }
00504a74      
00504aa1      int32_t eax_5;
00504aa1      int32_t edx_1;
00504aa1      edx_1 = HIGHD(((int64_t)(eax_3 - ((arg2 >> 0x15) & 0x7f8))));
00504aa1      eax_5 = LOWD(((int64_t)(eax_3 - ((arg2 >> 0x15) & 0x7f8))));
00504ab1      *(uint32_t*)arg4 = ((eax_5 + (edx_1 & 7)) >> 3);
00504ac1      int32_t eax_10;
00504ac1      int32_t edx_4;
00504ac1      edx_4 = HIGHD(((int64_t)(esi_1 - (((uint32_t)((int8_t)(arg2 >> 0x10))) << 3))));
00504ac1      eax_10 = LOWD(((int64_t)(esi_1 - (((uint32_t)((int8_t)(arg2 >> 0x10))) << 3))));
00504aca      *(uint32_t*)arg5 = ((eax_10 + (edx_4 & 7)) >> 3);
00504ad2      return 1;
00504a60  }

00504ad5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00504ae0  void __fastcall LScape::CleanupDetailSurfaces(class LScape* this)

00504ae0  {
00504ae7      Render::SetLandscapeDetailSurface(nullptr);
00504aec      class CSurface* landscape_detail_surface = this->landscape_detail_surface;
00504aec      
00504af4      if (landscape_detail_surface != 0)
00504af4      {
00504af7          CSurface::releaseCustomSurface(landscape_detail_surface);
00504aff          this->landscape_detail_surface = nullptr;
00504af4      }
00504af4      
00504b03      Render::SetEnvironmentDetailSurface(nullptr);
00504b08      class CSurface* environment_detail_surface = this->environment_detail_surface;
00504b08      
00504b10      if (environment_detail_surface != 0)
00504b10      {
00504b13          CSurface::releaseCustomSurface(environment_detail_surface);
00504b1b          this->environment_detail_surface = nullptr;
00504b10      }
00504b10      
00504b1f      Render::SetBuildingDetailSurface(nullptr);
00504b24      class CSurface* building_detail_surface = this->building_detail_surface;
00504b24      
00504b2c      if (building_detail_surface != 0)
00504b2c      {
00504b2f          CSurface::releaseCustomSurface(building_detail_surface);
00504b37          this->building_detail_surface = nullptr;
00504b2c      }
00504b2c      
00504b3b      Render::SetObjectDetailSurface(nullptr);
00504b40      class CSurface* object_detail_surface = this->object_detail_surface;
00504b40      
00504b48      if (object_detail_surface != 0)
00504b48      {
00504b4b          CSurface::releaseCustomSurface(object_detail_surface);
00504b53          this->object_detail_surface = nullptr;
00504b48      }
00504ae0  }

00504b59                                                                             90 90 90 90 90 90 90                           .......

00504b60  void __fastcall LScape::release_all(class LScape* this)

00504b60  {
00504b6b      if (this->land_blocks != 0)
00504b6b      {
00504b71          int32_t i = 0;
00504b71          
00504b75          if (this->mid_width > 0)
00504b75          {
00504bb4              do
00504bb4              {
00504b7b                  int32_t j = 0;
00504b7b                  
00504b7f                  if (this->mid_width > 0)
00504b7f                  {
00504bac                      do
00504bac                      {
00504b8c                          class CLandBlock* ecx_1 = this->land_blocks[((this->mid_width * i) + j)];
00504b8c                          
00504b91                          if (ecx_1 != 0)
00504b91                          {
00504b93                              CLandBlock::release_all(ecx_1);
00504b9b                              this->land_blocks[((this->mid_width * i) + j)] = 0;
00504b91                          }
00504b91                          
00504ba9                          j += 1;
00504bac                      } while (j < this->mid_width);
00504b7f                  }
00504b7f                  
00504bb1                  i += 1;
00504bb4              } while (i < this->mid_width);
00504b75          }
00504b6b      }
00504b6b      
00504bb8      class CLandBlock** land_blocks = this->land_blocks;
00504bb8      
00504bbd      if (land_blocks != 0)
00504bbd      {
00504bc0          operator delete[](land_blocks);
00504bc8          this->land_blocks = nullptr;
00504bbd      }
00504bbd      
00504bcb      class CLandBlock** block_draw_list = this->block_draw_list;
00504bcb      
00504bd0      if (block_draw_list != 0)
00504bd0      {
00504bd3          operator delete[](block_draw_list);
00504bdb          this->block_draw_list = nullptr;
00504bd0      }
00504bd0      
00504bde      class GameSky* sky = this->sky;
00504bde      
00504be3      if (sky != 0)
00504be5          GameSky::SetInactive(sky);
00504be5      
00504bea      this->loaded_cell_id = 0;
00504bed      this->viewer_cell_id = 0;
00504b60  }

00504bf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00504c00  int32_t __thiscall LScape::SetMidRadius(class LScape* this, int32_t arg2)

00504c00  {
00504c0e      if ((arg2 < 1 || this->land_blocks != 0))
00504c12          return 0;
00504c12      
00504c15      this->mid_radius = arg2;
00504c1b      this->mid_width = ((arg2 * 2) + 1);
00504c23      return 1;
00504c00  }

00504c26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00504c30  void __thiscall LScape::set_sky_position(class LScape* this, class Position const* arg2)

00504c30  {
00504c35      if (this->loaded_cell_id != 0)
00504c35      {
00504c37          class GameSky* sky = this->sky;
00504c37          
00504c3c          if (sky != 0)
00504c3e              /* tailcall */
00504c3e              return GameSky::UpdatePosition(sky, arg2);
00504c35      }
00504c30  }

00504c46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00504c50  void __fastcall LScape::get_block_order(class LScape* this)

00504c50  {
00504c5c      if (this->block_draw_list == 0)
00504c5c      {
00504c5e          int32_t mid_width = this->mid_width;
00504c72          this->block_draw_list = operator new[](((mid_width * mid_width) << 2));
00504c5c      }
00504c5c      
00504c8a      *(uint32_t*)this->block_draw_list = this->land_blocks[((this->viewer_b_xoff * this->mid_width) + this->viewer_b_yoff)];
00504c8c      int32_t viewer_b_yoff = this->viewer_b_yoff;
00504c8f      int32_t viewer_b_xoff = this->viewer_b_xoff;
00504c94      int32_t mid_width_1 = this->mid_width;
00504c97      int32_t edi_1 = 1;
00504c9c      int32_t var_8 = 1;
00504c9c      
00504ca0      if (viewer_b_xoff <= viewer_b_yoff)
00504ca0      {
00504caf          viewer_b_xoff = ((mid_width_1 - viewer_b_xoff) - 1);
00504caf          
00504cb4          if (viewer_b_yoff <= viewer_b_xoff)
00504cb6              viewer_b_yoff = viewer_b_xoff;
00504ca0      }
00504ca0      else
00504ca0      {
00504ca4          viewer_b_yoff = ((mid_width_1 - viewer_b_yoff) - 1);
00504ca4          
00504ca9          if (viewer_b_xoff > viewer_b_yoff)
00504cb6              viewer_b_yoff = viewer_b_xoff;
00504ca0      }
00504ca0      
00504cba      int32_t viewer_b_yoff_1 = viewer_b_yoff;
00504cba      
00504cbe      if (viewer_b_yoff >= 1)
00504cbe      {
00504ea8          do
00504ea8          {
00504cc6              int32_t ebx_1 = 0;
00504cc6              
00504cca              if (edi_1 > 0)
00504cca              {
00504e9b                  do
00504e9b                  {
00504e92                      for (void* i = nullptr; i < 0x20; i += 0x10)
00504e92                      {
00504d05                          int32_t ecx_8 = ((((*(uint32_t*)((char*)i + 0x81cd0c) * ebx_1) + (*(uint32_t*)((char*)i + 0x81ccec) * edi_1)) + *(uint32_t*)((char*)i + 0x81cccc)) + this->viewer_b_xoff);
00504d1b                          int32_t edx_13 = ((((*(uint32_t*)((char*)i + 0x81cc8c) * ebx_1) + (*(uint32_t*)((char*)i + 0x81ccac) * edi_1)) + *(uint32_t*)((char*)i + 0x81cc6c)) + this->viewer_b_yoff);
00504d1e                          int32_t mid_width_2 = this->mid_width;
00504d1e                          
00504d2f                          if ((ecx_8 < mid_width_2 && (edx_13 < mid_width_2 && (ecx_8 >= 0 && edx_13 >= 0))))
00504d2f                          {
00504d40                              this->block_draw_list[var_8] = this->land_blocks[((mid_width_2 * ecx_8) + edx_13)];
00504d47                              var_8 += 1;
00504d2f                          }
00504d2f                          
00504d70                          int32_t ecx_16 = ((((*(uint32_t*)((char*)i + 0x81cd10) * ebx_1) + (*(uint32_t*)((char*)i + 0x81ccf0) * edi_1)) + *(uint32_t*)((char*)i + 0x81ccd0)) + this->viewer_b_xoff);
00504d86                          int32_t edx_22 = ((((*(uint32_t*)((char*)i + 0x81cc90) * ebx_1) + (*(uint32_t*)((char*)i + 0x81ccb0) * edi_1)) + *(uint32_t*)((char*)i + 0x81cc70)) + this->viewer_b_yoff);
00504d89                          int32_t mid_width_3 = this->mid_width;
00504d89                          
00504d9a                          if ((ecx_16 < mid_width_3 && (edx_22 < mid_width_3 && (ecx_16 >= 0 && edx_22 >= 0))))
00504d9a                          {
00504dab                              this->block_draw_list[var_8] = this->land_blocks[((mid_width_3 * ecx_16) + edx_22)];
00504db2                              var_8 += 1;
00504d9a                          }
00504d9a                          
00504ddb                          int32_t ecx_24 = ((((*(uint32_t*)((char*)i + 0x81cd14) * ebx_1) + (*(uint32_t*)((char*)i + 0x81ccf4) * edi_1)) + *(uint32_t*)((char*)i + 0x81ccd4)) + this->viewer_b_xoff);
00504df1                          int32_t edx_31 = ((((*(uint32_t*)((char*)i + 0x81cc94) * ebx_1) + (*(uint32_t*)((char*)i + 0x81ccb4) * edi_1)) + *(uint32_t*)((char*)i + 0x81cc74)) + this->viewer_b_yoff);
00504df4                          int32_t mid_width_4 = this->mid_width;
00504df4                          
00504e05                          if ((ecx_24 < mid_width_4 && (edx_31 < mid_width_4 && (ecx_24 >= 0 && edx_31 >= 0))))
00504e05                          {
00504e16                              this->block_draw_list[var_8] = this->land_blocks[((mid_width_4 * ecx_24) + edx_31)];
00504e1d                              var_8 += 1;
00504e05                          }
00504e05                          
00504e46                          int32_t ecx_32 = ((((*(uint32_t*)((char*)i + 0x81cd18) * ebx_1) + (*(uint32_t*)((char*)i + 0x81ccf8) * edi_1)) + *(uint32_t*)((char*)i + 0x81ccd8)) + this->viewer_b_xoff);
00504e5c                          int32_t edx_40 = ((((*(uint32_t*)((char*)i + 0x81cc98) * ebx_1) + (*(uint32_t*)((char*)i + 0x81ccb8) * edi_1)) + *(uint32_t*)((char*)i + 0x81cc78)) + this->viewer_b_yoff);
00504e5f                          int32_t mid_width_5 = this->mid_width;
00504e5f                          
00504e70                          if ((ecx_32 < mid_width_5 && (edx_40 < mid_width_5 && (ecx_32 >= 0 && edx_40 >= 0))))
00504e70                          {
00504e81                              this->block_draw_list[var_8] = this->land_blocks[((mid_width_5 * ecx_32) + edx_40)];
00504e88                              var_8 += 1;
00504e70                          }
00504e92                      }
00504e92                      
00504e98                      ebx_1 += 1;
00504e9b                  } while (ebx_1 < edi_1);
00504e9b                  
00504ea1                  viewer_b_yoff = viewer_b_yoff_1;
00504cca              }
00504cca              
00504ea5              edi_1 += 1;
00504ea8          } while (edi_1 <= viewer_b_yoff);
00504cbe      }
00504c50  }

00504cd4                                                              8d a4 24 00 00 00 00 eb 03 8d 49 00                      ..$.......I.
00504eb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00504ec0  void __fastcall LScape::grab_visible_cells(class LScape* this)

00504ec0  {
00504ec5      int32_t mid_width = this->mid_width;
00504ec8      int32_t ebp = 0;
00504ec8      
00504ecd      if (mid_width > 0)
00504ecd      {
00504f01          do
00504f01          {
00504ed0              int32_t ebx_1 = 0;
00504ed0              
00504ed4              if (mid_width > 0)
00504ed4              {
00504ef9                  do
00504ef9                  {
00504ede                      class CLandBlock* edi_1 = this->land_blocks[((mid_width * ebp) + ebx_1)];
00504ede                      
00504ee3                      if (edi_1 != 0)
00504ee3                      {
00504ee7                          CLandBlock::init_buildings(edi_1);
00504eee                          CLandBlock::grab_visible_cells(edi_1);
00504ee3                      }
00504ee3                      
00504ef3                      mid_width = this->mid_width;
00504ef6                      ebx_1 += 1;
00504ef9                  } while (ebx_1 < mid_width);
00504ed4              }
00504ed4              
00504efb              mid_width = this->mid_width;
00504efe              ebp += 1;
00504f01          } while (ebp < mid_width);
00504ecd      }
00504ecd      
00504f03      int32_t mid_width_1 = this->mid_width;
00504f06      int32_t ebp_1 = 0;
00504f06      
00504f0a      if (mid_width_1 > 0)
00504f0a      {
00504f43          do
00504f43          {
00504f10              int32_t ebx_2 = 0;
00504f10              
00504f14              if (mid_width_1 > 0)
00504f14              {
00504f3b                  do
00504f3b                  {
00504f16                      class CLandBlock** land_blocks = this->land_blocks;
00504f1e                      class CLandBlock* edi_2 = land_blocks[((mid_width_1 * ebp_1) + ebx_2)];
00504f1e                      
00504f23                      if (edi_2 != 0)
00504f23                      {
00504f25                          int32_t var_14_1 = 0;
00504f29                          CLandBlock::init_static_objs(edi_2, land_blocks);
00504f30                          CLandBlock::init_dyn_objs(edi_2);
00504f23                      }
00504f23                      
00504f35                      mid_width_1 = this->mid_width;
00504f38                      ebx_2 += 1;
00504f3b                  } while (ebx_2 < mid_width_1);
00504f14              }
00504f14              
00504f3d              mid_width_1 = this->mid_width;
00504f40              ebp_1 += 1;
00504f43          } while (ebp_1 < mid_width_1);
00504f0a      }
00504ec0  }

00504f4a                                90 90 90 90 90 90                                                            ......

00504f50  void __fastcall LScape::release_visible_cells(class LScape* this)

00504f50  {
00504f54      int32_t mid_width = this->mid_width;
00504f57      int32_t ebx = 0;
00504f57      
00504f5b      if (mid_width > 0)
00504f5b      {
00504f8a          do
00504f8a          {
00504f60              int32_t esi_1 = 0;
00504f60              
00504f64              if (mid_width > 0)
00504f64              {
00504f82                  do
00504f82                  {
00504f6e                      class CLandBlock* eax_2 = this->land_blocks[((mid_width * ebx) + esi_1)];
00504f6e                      
00504f73                      if (eax_2 != 0)
00504f77                          CLandBlock::release_visible_cells(eax_2);
00504f77                      
00504f7c                      mid_width = this->mid_width;
00504f7f                      esi_1 += 1;
00504f82                  } while (esi_1 < mid_width);
00504f64              }
00504f64              
00504f84              mid_width = this->mid_width;
00504f87              ebx += 1;
00504f8a          } while (ebx < mid_width);
00504f5b      }
00504f50  }


00504f90  void __thiscall LScape::get_block_orient(class LScape* this, int32_t arg2, int32_t arg3, int32_t* arg4, enum LandDefs::Direction* arg5)

00504f90  {
00504f90      int32_t mid_radius = this->mid_radius;
00504f97      int32_t esi_1 = (arg3 - mid_radius);
00504f9e      int32_t edi_1 = (arg2 - mid_radius);
00504fa2      int32_t eax_1;
00504fa2      int32_t edx;
00504fa2      edx = HIGHD(((int64_t)esi_1));
00504fa2      eax_1 = LOWD(((int64_t)esi_1));
00504fa7      int32_t ecx_2 = ((eax_1 ^ edx) - edx);
00504fab      int32_t eax_3;
00504fab      int32_t edx_1;
00504fab      edx_1 = HIGHD(((int64_t)edi_1));
00504fab      eax_3 = LOWD(((int64_t)edi_1));
00504fae      int32_t eax_5 = ((eax_3 ^ edx_1) - edx_1);
00504fae      
00504fb2      if (eax_5 <= ecx_2)
00504fb4          eax_5 = ecx_2;
00504fb4      
00504fb9      int32_t eax_7;
00504fb9      
00504fb9      if (eax_5 <= 1)
00504fb9      {
00504fbf          *(uint32_t*)arg4 = 1;
00504fc5          eax_7 = 1;
00504fb9      }
00504fb9      else if (eax_5 > 2)
00504fe4      {
00504ffa          if (eax_5 > 4)
00504ffa          {
00505016              *(uint32_t*)arg4 = 8;
0050501c              *(uint32_t*)arg5 = IN_VIEWER_BLOCK;
00505023              return;
00504ffa          }
00504ffa          
00505000          *(uint32_t*)arg4 = 4;
00505006          eax_7 = 4;
00504fe4      }
00504fe4      else
00504fe4      {
00504fea          *(uint32_t*)arg4 = 2;
00504ff0          eax_7 = 2;
00504fe4      }
00504fe4      
00504fcc      if (edi_1 == eax_7)
00504fcc      {
00504fd0          if (esi_1 != eax_7)
00504fd0          {
00505030              int32_t edx_3;
00505030              edx_3 = esi_1 != -(eax_7);
0050503c              *(uint32_t*)arg5 = (((edx_3 - 1) & 5) + 3);
0050503e              return;
00504fd0          }
00504fd0          
00504fd7          *(uint32_t*)arg5 = NORTHEAST_OF_VIEWER;
00504fde          return;
00504fcc      }
00504fcc      
00505043      int32_t ecx_7 = -(eax_7);
00505043      
00505047      if (edi_1 != ecx_7)
00505047      {
00505074          if (esi_1 == eax_7)
00505074          {
0050507b              *(uint32_t*)arg5 = NORTH_OF_VIEWER;
00505082              return;
00505074          }
00505074          
0050508d          int32_t edx_9;
0050508d          edx_9 = esi_1 != ecx_7;
00505096          *(uint32_t*)arg5 = ((edx_9 - 1) & 2);
00505098          return;
00505047      }
00505047      
0050504b      if (esi_1 == eax_7)
0050504b      {
00505052          *(uint32_t*)arg5 = NORTHWEST_OF_VIEWER;
00505059          return;
0050504b      }
0050504b      
00505064      int32_t edx_7;
00505064      edx_7 = esi_1 == ecx_7;
0050506d      *(uint32_t*)arg5 = ((edx_7 * 2) + 4);
00504f90  }

0050509b                                                                                   90 90 90 90 90                             .....

005050a0  void __stdcall LScape::landcell_check(class LScape* this @ ecx, class CLandBlock* arg2)

005050a0  {
005050a8      class CLandBlock* esi = arg2;
005050ab      int32_t side_cell_count = esi->side_cell_count;
005050ab      
005050b2      if (side_cell_count != 8)
005050b2      {
005050b9          int32_t i = 0;
005050b9          
005050bd          if ((side_cell_count * side_cell_count) > 0)
005050bd          {
005050c3              int32_t edx_2 = 0;
005050e7              int32_t side_cell_count_1;
005050e7              
005050e7              do
005050e7              {
005050cb                  *(uint32_t*)(&esi->lcell->in_view + edx_2) = 1;
005050d6                  side_cell_count_1 = esi->side_cell_count;
005050de                  i += 1;
005050df                  edx_2 += 0x108;
005050e7              } while (i < (side_cell_count_1 * side_cell_count_1));
005050bd          }
005050b2      }
005050b2      else if (esi->in_view != ENTIRELY_INSIDE)
00505102      {
00505151          _chkstk();
00505156          float x = esi->block_frame.m_fOrigin.x;
0050515c          float y = esi->block_frame.m_fOrigin.y;
00505162          int32_t __saved_edi;
00505162          int32_t* ebx_3 = &__saved_edi;
00505164          class CLandBlock* edi_3 = nullptr;
00505166          int32_t* var_8_1 = &__saved_edi;
00505169          float x_2 = x;
0050516f          arg2 = nullptr;
0050516f          
0050519f          do
0050519f          {
00505179              float x_1 = x;
00505187              Render::get_clip_height(x_2, ((float)((((long double)arg2) * ((long double)24f)) + ((long double)y))), ebx_3);
00505192              edi_3 = (&edi_3->vtable + 1);
00505193              ebx_3 = &ebx_3[0x20];
00505199              x = (esi->side_cell_count + 1);
0050519c              arg2 = edi_3;
0050519f          } while (edi_3 < x);
0050519f          
005051a1          int32_t side_cell_count_4 = esi->side_cell_count;
005051a4          int32_t ebx_4 = 0;
005051a4          
005051a8          if (side_cell_count_4 > 0)
005051a8          {
005052c9              do
005052c9              {
005051b0                  class CLandBlock* edi_5 = nullptr;
005051b2                  int32_t eax_5 = (side_cell_count_4 + 1);
005051b5                  arg2 = nullptr;
005051b5                  
005051b8                  if (eax_5 > 0)
005051b8                  {
005051bf                      int32_t ecx_2 = ((ebx_4 - 1) & 1);
005051cb                      int32_t var_18_1 = ecx_2;
005051cb                      
00505206                      while (true)
00505206                      {
00505206                          Render::get_clip_height(((float)((((long double)((float)((long double)(ebx_4 + 1)))) * ((long double)24f)) + ((long double)x_2))), ((float)((((long double)arg2) * ((long double)24f)) + ((long double)y))), &var_8_1[(((ecx_2 * eax_5) + edi_5) * 0x20)]);
00505211                          edi_5 = (&edi_5->vtable + 1);
00505212                          eax_5 = (esi->side_cell_count + 1);
00505215                          arg2 = edi_5;
00505215                          
00505218                          if (edi_5 >= eax_5)
00505218                              break;
00505218                          
005051d3                          ecx_2 = var_18_1;
00505206                      }
005051b8                  }
005051b8                  
0050521a                  int32_t side_cell_count_5 = esi->side_cell_count;
0050521d                  int32_t edi_6 = 0;
0050521d                  
00505221                  if (side_cell_count_5 > 0)
00505221                  {
005052bd                      do
005052bd                      {
00505230                          class CLandCell* lcell = esi->lcell;
0050523b                          void* eax_9 = (((side_cell_count_5 * ebx_4) + edi_6) * 0x108);
00505241                          void* eax_10 = ((char*)eax_9 + lcell);
00505241                          
00505246                          if ((eax_9 != -(lcell) && *(uint32_t*)(*(uint32_t*)eax_10 + 0x68)() == 0))
00505246                          {
00505265                              int32_t eax_14 = (esi->side_cell_count + 1);
0050527a                              void* ecx_10 = &var_8_1[(((((ebx_4 - 1) & 1) * eax_14) + edi_6) * 0x20)];
0050528c                              void* eax_16 = &var_8_1[((((ebx_4 & 1) * eax_14) + edi_6) * 0x20)];
00505243                              eax_10->num_static_objects = Render::block_check(eax_16, ((char*)eax_16 + 0x80), ecx_10, ((char*)ecx_10 + 0x80), esi->max_zval, esi->min_zval);
00505246                          }
00505246                          
005052b7                          side_cell_count_5 = esi->side_cell_count;
005052ba                          edi_6 += 1;
005052bd                      } while (edi_6 < side_cell_count_5);
00505221                  }
00505221                  
005052c3                  side_cell_count_4 = esi->side_cell_count;
005052c6                  ebx_4 += 1;
005052c9              } while (ebx_4 < side_cell_count_4);
005051a8          }
00505102      }
00505102      else
00505102      {
00505104          int32_t side_cell_count_2 = esi->side_cell_count;
0050510c          int32_t i_1 = 0;
0050510c          
00505110          if ((side_cell_count_2 * side_cell_count_2) > 0)
00505110          {
00505116              int32_t edx_5 = 0;
0050513e              int32_t side_cell_count_3;
0050513e              
0050513e              do
0050513e              {
00505126                  *(uint32_t*)(&esi->lcell->in_view + edx_5) = 2;
0050512d                  side_cell_count_3 = esi->side_cell_count;
00505135                  i_1 += 1;
00505136                  edx_5 += 0x108;
0050513e              } while (i_1 < (side_cell_count_3 * side_cell_count_3));
00505110          }
00505102      }
005050a0  }

0050511a                                                                                8d 9b 00 00 00 00                            ......
00505229                             8d a4 24 00 00 00 00                                                           ..$....
005052db                                                                                   90 90 90 90 90                             .....

005052e0  void LScape::SetDay(int32_t arg1)

005052e0  {
005052e6      int32_t eax;
005052e6      eax = arg1 != 0;
005052e9      LScape::m_fAlwaysDaylight = eax;
005052ee      (*(uint32_t*)LScape::next_tick) = 0f;
005052f8      *(int32_t*)((char*)LScape::next_tick + 4) = 0f;
00505302      (*(uint32_t*)LScape::next_light_tick) = 0f;
0050530c      *(int32_t*)((char*)LScape::next_light_tick + 4) = 0f;
005052e0  }

00505317                                                                       90 90 90 90 90 90 90 90 90                         .........

00505320  class IDClass<_tagDataID,32,0>* LandDefs::get_block_did(class IDClass<_tagDataID,32,0>* __return, int32_t arg2, int32_t arg3)

00505320  {
0050533d      if ((arg2 < 0 || (arg3 < 0 || (arg2 >= 0x7f8 || arg3 >= 0x7f8))))
0050533d      {
00505361          __return->id = 0;
00505363          return __return;
0050533d      }
0050533d      
00505356      __return->id = (((((arg2 & 0xfffffff8) << 5) | (arg3 >> 3)) << 0x10) | 0xffff);
0050535a      return __return;
00505320  }

00505364              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00505370  void __fastcall LScape::LScape(class LScape* this)

00505370  {
00505379      __builtin_memset(&this->land_blocks, 0, 0x18);
0050538b      this->landscape_detail_surface = nullptr;
0050538e      this->environment_detail_surface = nullptr;
00505391      this->building_detail_surface = nullptr;
00505394      this->object_detail_surface = nullptr;
00505397      this->mid_radius = 5;
0050539d      this->mid_width = 0xb;
005053be      LScape::ambient_level = 0.400000006f;
005053c8      int32_t var_8 = 0;
005053cc      LScape::sunlight.x = 0x3f99999a;
005053d1      LScape::sunlight.y = 0f;
005053d7      LScape::sunlight.z = 0.5f;
005053dd      CLandBlock::init();
005053e4      class GameSky* eax = operator new(0x2c);
005053e4      
005053ee      if (eax != 0)
005053ee      {
005053f7          this->sky = GameSky::GameSky(eax);
00505401          return;
005053ee      }
005053ee      
00505402      this->sky = nullptr;
00505370  }

0050540d                                         90 90 90                                                               ...

00505410  void __fastcall LScape::~LScape(class LScape* this)

00505410  {
00505414      LScape::release_all(this);
00505419      struct ViewIntervalType* block_interval_1 = block_interval;
00505419      
00505420      if (block_interval_1 != 0)
00505420      {
00505423          operator delete[](block_interval_1);
0050542b          block_interval = nullptr;
00505420      }
00505420      
00505435      class GameSky* sky = this->sky;
00505435      
0050543a      if (sky != 0)
0050543a      {
0050543e          GameSky::~GameSky(sky);
00505444          operator delete(sky);
0050544c          this->sky = nullptr;
0050543a      }
0050543a      
00505457      /* tailcall */
00505457      return LScape::CleanupDetailSurfaces(this);
00505410  }

0050545c                                                                                      90 90 90 90                              ....

00505460  void __thiscall LScape::calc_frame(class LScape* this, class CLandBlock* arg2, int32_t arg3, int32_t arg4)

00505460  {
0050548b      arg2->block_frame.m_fOrigin.x = ((float)(((long double)(arg3 - this->viewer_b_xoff)) * ((long double)0f)));
0050548b      arg2->block_frame.m_fOrigin.y = ((float)(((long double)(arg4 - this->viewer_b_yoff)) * ((long double)0f)));
0050548b      arg2->block_frame.m_fOrigin.z = 0f;
00505460  }

005054c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005054d0  void __thiscall LScape::set_landscape_lighting(class LScape* this, float arg2, class RGBAUnion arg3, class AC1Legacy::Vector3 const* arg4, class RGBAUnion arg5)

005054d0  {
005054d8      LScape::ambient_level = arg2;
005054dd      float eax;
005054dd      eax = LScape::m_fAlwaysDaylight;
005054ea      LScape::ambient_color.__inner0 = arg3;
005054ea      
005054f0      if (eax == 0)
005054f0      {
0050553e          LScape::sunlight.x = arg4->x;
0050554b          LScape::sunlight.y = arg4->y;
00505554          LScape::sunlight.z = arg4->z;
00505559          LScape::sunlight_color.__inner0 = arg5;
005054f0      }
005054f0      else if (CRegionDesc::GetLighting(0.5f, &LScape::ambient_level, &LScape::ambient_color, &LScape::sunlight, &LScape::sunlight_color) != 0)
00505515      {
00505517          long double x87_r7_1 = ((long double)LScape::ambient_level);
0050551d          long double temp1_1 = ((long double)LScape::min_ambient);
0050551d          (x87_r7_1 - temp1_1);
00505523          int32_t eax_1;
00505523          eax_1 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00505525          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00505525          
00505528          if (!(p_1))
00505530              LScape::ambient_level = LScape::min_ambient;
00505515      }
00505515      
0050555f      float x = LScape::sunlight.x;
00505565      float z = LScape::sunlight.z;
0050556b      float y = LScape::sunlight.y;
00505570      float x_1 = x;
00505574      Render::world_lights.sunlight.x = x;
00505584      Render::world_lights.sunlight.z = z;
00505593      Render::world_lights.sunlight.y = y;
00505598      RGBColor::SetColor32(&x_1, LScape::sunlight_color.__inner0);
005055a9      Render::world_lights.sunlight_color.g = y;
005055af      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005055b7      Render::world_lights.sunlight_color.r = x_1;
005055bc      Render::world_lights.sunlight_color.b = z;
005055c2      Render::world_lights.m_bSunlightValid = 0;
005055c2      
005055c9      if (SmartBox::smartbox_1 != 0)
005055c9      {
005055e3          class SmartBox* __saved_esi_1 = SmartBox::smartbox_1;
0050560b          SmartBox::SetWorldAmbientLight(SmartBox::smartbox_1, ((float)((sqrtl((((((long double)LScape::sunlight.z) * ((long double)LScape::sunlight.z)) + (((long double)LScape::sunlight.y) * ((long double)LScape::sunlight.y))) + (((long double)LScape::sunlight.x) * ((long double)LScape::sunlight.x)))) * ((long double)0.200000003f)) + ((long double)LScape::ambient_level))), LScape::ambient_color.__inner0);
005055c9      }
005055c9      
00505615      if (this->land_blocks != 0)
00505615      {
00505617          int32_t mid_width = this->mid_width;
0050561b          int32_t ebx_1 = 0;
0050561b          
0050561f          if (mid_width > 0)
0050561f          {
0050564d              do
0050564d              {
00505622                  int32_t esi_1 = 0;
00505622                  
00505626                  if (mid_width > 0)
00505626                  {
00505645                      do
00505645                      {
00505630                          void* eax_9 = this->land_blocks[((mid_width * ebx_1) + esi_1)];
00505630                          
00505635                          if (eax_9 != 0)
0050563a                              CLandBlockStruct::calc_lighting(((char*)eax_9 + 0x38));
0050563a                          
0050563f                          mid_width = this->mid_width;
00505642                          esi_1 += 1;
00505645                      } while (esi_1 < mid_width);
00505626                  }
00505626                  
00505647                  mid_width = this->mid_width;
0050564a                  ebx_1 += 1;
0050564d              } while (ebx_1 < mid_width);
0050561f          }
00505615      }
005054d0  }

00505658                                                                          90 90 90 90 90 90 90 90                          ........

00505660  int32_t __thiscall LScape::PreFetchCells(class LScape* this, class IDClass<_tagDataID,32,0> arg2, uint32_t* arg3)

00505660  {
00505671      class LScape* this_1 = this;
00505678      class LScape* this_2 = this_1;
0050567c      int32_t result = 1;
00505680      uint32_t var_28;
00505680      class LScape* this_3;
00505680      
00505680      if (arg2 == 0)
0050569e          this_3 = this_2;
00505680      else
00505680      {
0050568a          this_3 = ((arg2 >> 0x15) & 0x7f8);
00505698          var_28 = (((uint32_t)((int8_t)(arg2 >> 0x10))) << 3);
00505680      }
00505680      
005056a5      *(uint32_t*)arg3 = 0;
005056ab      int32_t mid_radius = this_1->mid_radius;
005056af      int32_t edx_1 = -(mid_radius);
005056b3      int32_t var_2c = edx_1;
005056b3      
005056b7      if (edx_1 > mid_radius)
00505803          return 1;
00505803      
005056bd      void* ecx = ((char*)this_3 + (edx_1 << 3));
005056c0      void* var_34 = ecx;
005056c0      
005057e8      do
005057e8      {
005056c6          int32_t edi_2 = -(mid_radius);
005056ca          int32_t var_30_1 = edi_2;
005056ca          
005056ce          if (edi_2 <= mid_radius)
005056ce          {
005056d8              int32_t edi_3 = (var_28 + (edi_2 << 3));
005056db              int32_t var_38_1 = edi_3;
005057ce              bool cond:4_1;
005057ce              
005057ce              do
005057ce              {
005056f6                  class IDClass<_tagDataID,32,0> esi;
005056f6                  
005056f6                  if ((((ecx < 0 || edi_3 < 0) || ecx >= 0x7f8) || edi_3 >= 0x7f8))
00505713                      esi = 0;
005056f6                  else
0050570f                      esi = (((((ecx & 0xfffffff8) << 5) | (edi_3 >> 3)) << 0x10) | 0xffff);
0050570f                  
0050571b                  if (esi != INVALID_DID.id)
0050571b                  {
0050572e                      void var_20;
0050572e                      enum CACHE_OBJECT_CODES eax_15 = DBObj::PreFetch(QualifiedDataID::QualifiedDataID(&var_20, esi, 1));
0050572e                      
0050573e                      if ((eax_15 == CACHE_OBJECT_IN_MEMORY || eax_15 == CACHE_OBJECT_IN_FILE))
0050573e                      {
0050575c                          void var_18;
0050575c                          class DBObj* eax_17 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_18, esi, 1));
0050575c                          
00505768                          if (eax_17 == 0)
00505768                          {
0050579c                              void var_10;
0050579c                              DBObj::PreFetch(QualifiedDataID::QualifiedDataID(&var_10, ((esi & 0xfffffffe) | 0xfffe), 2));
005057a1                              edi_3 = var_38_1;
005057a8                              result = 0;
005057b0                              *(uint32_t*)arg3 += 1;
00505768                          }
00505768                          else
00505768                          {
0050576c                              int32_t result_1 = CLandBlock::PreFetchCells(eax_17);
0050576c                              
00505773                              if (result_1 == 0)
00505775                                  result = result_1;
00505775                              
00505779                              eax_17->vtable->Release();
00505780                              edi_3 = var_38_1;
00505768                          }
0050573e                      }
0050573e                      else
0050573e                      {
00505743                          result = 0;
00505743                          
0050574b                          if (eax_15 == ~CACHE_OBJECT_LOOKING)
005057b0                              *(uint32_t*)arg3 += 1;
0050573e                      }
0050571b                  }
0050571b                  
005057b6                  this_1 = this_2;
005057bd                  edi_3 += 8;
005057c0                  cond:4_1 = (var_30_1 + 1) <= this_1->mid_radius;
005057c2                  ecx = var_34;
005057c6                  var_30_1 += 1;
005057ca                  var_38_1 = edi_3;
005057ce              } while (cond:4_1);
005057d4              edx_1 = var_2c;
005056ce          }
005056ce          
005057d8          mid_radius = this_1->mid_radius;
005057da          edx_1 += 1;
005057db          ecx += 8;
005057e0          var_2c = edx_1;
005057e4          var_34 = ecx;
005057e8      } while (edx_1 <= mid_radius);
005057e8      
005057f8      return result;
00505660  }

00505806                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00505810  void __thiscall LScape::add_ambient_sounds(class LScape* this, class Ambient* arg2)

00505810  {
00505818      int32_t mid_width = this->mid_width;
0050581b      int32_t ebp = 0;
0050581b      
0050581f      if (mid_width > 0)
0050581f      {
00505871          do
00505871          {
00505822              int32_t edi_1 = 0;
00505822              
00505826              if (mid_width > 0)
00505826              {
00505869                  do
00505869                  {
0050583e                      int32_t var_8;
0050583e                      void var_4;
0050583e                      LScape::get_block_orient(this, ebp, edi_1, &var_8, &var_4);
0050583e                      
00505848                      if (var_8 == 1)
00505848                      {
00505852                          class CLandBlock* ecx_1 = this->land_blocks[((mid_width * ebp) + edi_1)];
00505852                          
00505857                          if (ecx_1 != 0)
0050585e                              CLandBlock::add_ambient_sounds(ecx_1, arg2);
00505848                      }
00505848                      
00505863                      mid_width = this->mid_width;
00505866                      edi_1 += 1;
00505869                  } while (edi_1 < mid_width);
00505826              }
00505826              
0050586b              mid_width = this->mid_width;
0050586e              ebp += 1;
00505871          } while (ebp < mid_width);
0050581f      }
00505810  }

0050582a                                8d 9b 00 00 00 00                                                            ......
0050587d                                                                                         90 90 90                               ...

00505880  void __fastcall LScape::UseTime(class LScape* this)

00505880  {
00505883      int32_t ebx;
00505883      int32_t var_2c = ebx;
00505883      
0050588d      if (this->loaded_cell_id != 0)
0050588d      {
00505893          class GameSky* sky = this->sky;
00505893          
00505898          if (sky != 0)
0050589a              GameSky::UseTime(sky);
0050589a          
0050589f          long double x87_r7_1 = ((long double)Timer::cur_time);
005058a5          long double temp0_1 = ((long double)LScape::next_tick);
005058a5          (x87_r7_1 - temp0_1);
005058ab          double var_14_1 = ((double)x87_r7_1);
005058ab          bool c1_1 = /* bool c1_1 = unimplemented  {fst qword [esp+0x20], st0} */;
005058af          uint32_t eax;
005058af          eax = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((c1_1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0x3800))));
005058b1          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005058b1          
005058b4          if (p_1)
005058b4          {
005058ba              class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
005058ba              
005058c1              if (CRegionDesc::current_region_1 != 0)
005058c1              {
005058cd                  class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
005058d6                  LScape::next_tick = ((double)(((long double)CRegionDesc::current_region_1->sky_info->tick_size) + x87_r7_1));
005058dc                  long double x87_r6_3;
005058dc                  
005058dc                  if (GameTime::current_game_time_1 == 0)
005058e3                      x87_r6_3 = ((long double)0.0);
005058dc                  else
005058de                      x87_r6_3 = ((long double)GameTime::current_game_time_1->present_time_of_day);
005058de                  
005058e9                  float LScape::m_override_fog_min_1 = ((float)x87_r6_3);
005058ed                  float LScape::m_override_fog_min_6 = LScape::m_override_fog_min_1;
005058f1                  long double temp1_1 = ((long double)LScape::next_light_tick);
005058f1                  (x87_r7_1 - temp1_1);
005058f7                  GameTime::current_game_time_1 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005058fc                  float LScape::m_override_fog_max_2;
005058fc                  union __inner0;
005058fc                  uint32_t var_18;
005058fc                  
005058fc                  if ((*(uint8_t*)((char*)GameTime::current_game_time_1)[1] & 0x41) == 0)
005058fc                  {
00505921                      void var_c;
00505921                      
00505921                      if (CRegionDesc::GetLighting(LScape::m_override_fog_min_6, &LScape::m_override_fog_max_2, &__inner0, &var_c, &var_18) != 0)
00505921                      {
00505927                          long double x87_r7_2 = ((long double)LScape::m_override_fog_max_2);
0050592b                          long double temp2_1 = ((long double)LScape::min_ambient);
0050592b                          (x87_r7_2 - temp2_1);
00505931                          int32_t eax_2;
00505931                          eax_2 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00505933                          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00505933                          
00505936                          if (!(p_2))
0050593e                              LScape::m_override_fog_max_2 = LScape::min_ambient;
0050593e                          
00505942                          eax_2 = LScape::m_override_enabled;
00505942                          
00505949                          if (eax_2 != 0)
00505949                          {
0050594f                              long double x87_r7_3 = ((long double)LScape::m_override_transition);
00505955                              long double temp4_1 = ((long double)1f);
00505955                              (x87_r7_3 - temp4_1);
0050595b                              eax_2 = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0050595d                              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0050595d                              
00505960                              if (p_3)
00505960                              {
00505a69                                  LScape::m_override_fog_max_2 = LScape::m_override_ambient_level;
00505a6d                                  __inner0 = LScape::m_override_ambient_color.__inner0;
00505960                              }
00505960                              else
00505960                              {
00505966                                  union __inner0_1 = LScape::m_override_ambient_color.__inner0;
0050596b                                  ebx = *(uint16_t*)((char*)__inner0 + 2);
0050597b                                  uint32_t LScape::m_override_fog_min_2 = ((uint32_t)ebx);
00505981                                  LScape::m_override_fog_min_1 = LScape::m_override_fog_min_2;
0050598b                                  LScape::m_override_fog_min_1 = (LScape::m_override_fog_min_2 - ((uint32_t)((int8_t)(__inner0_1 >> 0x10))));
00505993                                  LScape::m_override_transition;
005059a5                                  union __inner0_3;
005059a5                                  *(uint8_t*)((char*)__inner0_3 + 2) = _ftol2();
005059a9                                  uint32_t LScape::m_override_fog_min_3 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 1));
005059ae                                  LScape::m_override_fog_min_1 = LScape::m_override_fog_min_3;
005059b8                                  LScape::m_override_fog_min_1 = (LScape::m_override_fog_min_3 - ((uint32_t)*(uint8_t*)((char*)__inner0_1 + 1)));
005059c0                                  LScape::m_override_transition;
005059cd                                  uint32_t ecx_3 = ((uint32_t)*(uint8_t*)((char*)__inner0_3 + 0));
005059d2                                  *(uint8_t*)((char*)__inner0_3 + 1) = _ftol2();
005059d6                                  uint32_t LScape::m_override_fog_min_4 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 0));
005059db                                  LScape::m_override_fog_min_1 = LScape::m_override_fog_min_4;
005059e5                                  LScape::m_override_fog_min_1 = (LScape::m_override_fog_min_4 - ecx_3);
005059ed                                  LScape::m_override_transition;
005059fa                                  uint32_t edx_3 = ((uint32_t)*(uint8_t*)((char*)__inner0_3 + 3));
005059ff                                  *(uint8_t*)((char*)__inner0_3 + 0) = _ftol2();
00505a03                                  uint32_t LScape::m_override_fog_min_5 = ((uint32_t)*(uint8_t*)((char*)ebx)[1]);
00505a06                                  LScape::m_override_fog_min_1 = LScape::m_override_fog_min_5;
00505a10                                  LScape::m_override_fog_min_1 = (LScape::m_override_fog_min_5 - edx_3);
00505a18                                  LScape::m_override_transition;
00505a20                                  char eax_10 = _ftol2();
00505a29                                  long double x87_r7_13 = (((long double)LScape::m_override_fog_max_2) - ((long double)LScape::m_override_ambient_level));
00505a2f                                  *(uint8_t*)((char*)__inner0_3 + 3) = eax_10;
00505a37                                  __inner0 = __inner0_3;
00505a45                                  LScape::m_override_fog_max_2 = ((float)(((long double)LScape::m_override_fog_max_2) - (x87_r7_13 * ((long double)LScape::m_override_transition))));
00505a55                                  LScape::m_override_transition = ((float)(((long double)LScape::m_override_transition) + ((long double)0.0399999991f)));
00505960                              }
00505949                          }
00505949                          
00505a87                          LScape::set_landscape_lighting(this, LScape::m_override_fog_max_2, __inner0, &var_c, var_18);
00505921                      }
00505921                      
00505a8c                      class CRegionDesc* CRegionDesc::current_region_2 = CRegionDesc::current_region;
00505a93                      long double x87_r7_18;
00505a93                      
00505a93                      if (CRegionDesc::current_region_2 == 0)
00505a9d                          x87_r7_18 = ((long double)3.0);
00505a93                      else
00505a98                          x87_r7_18 = ((long double)CRegionDesc::current_region_2->sky_info->light_tick_size);
00505a98                      
00505aa7                      LScape::next_light_tick = ((double)(x87_r7_18 + ((long double)var_14_1)));
005058fc                  }
005058fc                  
00505aad                  ebx = LScape::m_fFogEnabled;
00505abf                  RenderDeviceD3D::SetFFFogUserDisabled(RenderDevice::render_device, ebx == 0);
00505ac6                  uint8_t LScape::m_fFogEnabled_1 = LScape::m_fFogEnabled;
00505ac6                  
00505acd                  if (LScape::m_fFogEnabled_1 != 0)
00505acd                  {
00505ada                      RenderDeviceD3D::SetFFFogEnable(RenderDevice::render_device, LScape::m_fFogEnabled_1);
00505ada                      
00505af9                      if (CRegionDesc::GetWorldFog(LScape::m_override_fog_min_6, &LScape::m_override_fog_min_1, &LScape::m_override_fog_max_2, &__inner0) != 0)
00505af9                      {
00505aff                          int32_t eax_14;
00505aff                          eax_14 = LScape::m_override_enabled;
00505aff                          
00505b06                          if (eax_14 != 0)
00505b06                          {
00505b12                              (((long double)LScape::m_override_transition) - ((long double)1f));
00505b1a                              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
00505b1d                              union __inner0_2 = LScape::m_override_fog_color.__inner0;
00505b1d                              
00505b22                              if (p_4)
00505b22                              {
00505c34                                  float LScape::m_override_fog_max_1 = LScape::m_override_fog_max;
00505c3a                                  LScape::m_override_fog_min_1 = LScape::m_override_fog_min;
00505c3e                                  LScape::m_override_fog_max_2 = LScape::m_override_fog_max_1;
00505b22                              }
00505b22                              else
00505b22                              {
00505b28                                  ebx = *(uint16_t*)((char*)__inner0 + 2);
00505b38                                  uint32_t eax_15 = ((uint32_t)ebx);
00505b3e                                  var_18 = eax_15;
00505b48                                  var_18 = (eax_15 - ((uint32_t)((int8_t)(__inner0_2 >> 0x10))));
00505b50                                  LScape::m_override_transition;
00505b62                                  union __inner0_4;
00505b62                                  *(uint8_t*)((char*)__inner0_4 + 2) = _ftol2();
00505b66                                  uint32_t eax_18 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 1));
00505b6b                                  var_18 = eax_18;
00505b75                                  var_18 = (eax_18 - ((uint32_t)*(uint8_t*)((char*)__inner0_2 + 1)));
00505b7d                                  LScape::m_override_transition;
00505b8a                                  uint32_t ecx_12 = ((uint32_t)*(uint8_t*)((char*)__inner0_4 + 0));
00505b8f                                  *(uint8_t*)((char*)__inner0_4 + 1) = _ftol2();
00505b93                                  uint32_t eax_21 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 0));
00505b98                                  var_18 = eax_21;
00505ba2                                  var_18 = (eax_21 - ecx_12);
00505baa                                  LScape::m_override_transition;
00505bb7                                  uint32_t edx_7 = ((uint32_t)*(uint8_t*)((char*)__inner0_4 + 3));
00505bbc                                  *(uint8_t*)((char*)__inner0_4 + 0) = _ftol2();
00505bc0                                  uint32_t eax_24 = ((uint32_t)*(uint8_t*)((char*)ebx)[1]);
00505bc3                                  var_18 = eax_24;
00505bcd                                  var_18 = (eax_24 - edx_7);
00505bd5                                  LScape::m_override_transition;
00505bec                                  *(uint8_t*)((char*)__inner0_4 + 3) = _ftol2();
00505bf0                                  __inner0_2 = __inner0_4;
00505bfe                                  LScape::m_override_fog_min_1 = ((float)(((long double)LScape::m_override_fog_min_1) - ((((long double)LScape::m_override_fog_min_1) - ((long double)LScape::m_override_fog_min)) * ((long double)LScape::m_override_transition))));
00505c16                                  LScape::m_override_fog_max_2 = ((float)(((long double)LScape::m_override_fog_max_2) - ((((long double)LScape::m_override_fog_max_2) - ((long double)LScape::m_override_fog_max)) * ((long double)LScape::m_override_transition))));
00505c26                                  LScape::m_override_transition = ((float)(((long double)LScape::m_override_transition) + ((long double)0.0399999991f)));
00505b22                              }
00505b22                              
00505c42                              __inner0 = __inner0_2;
00505b06                          }
00505b06                          
00505c5b                          RenderDeviceD3D::SetFFFogProperties(RenderDevice::render_device, &__inner0, LScape::m_override_fog_min_1, LScape::m_override_fog_max_2);
00505af9                      }
00505acd                  }
005058c1              }
005058b4          }
0050588d      }
00505880  }


00505c70  void __thiscall LScape::calc_draw_order(class LScape* this, uint32_t arg2, int32_t arg3)

00505c70  {
00505c83      if (arg2 != 0)
00505c83      {
00505c89          uint32_t loaded_cell_id = this->loaded_cell_id;
00505c8e          uint32_t loaded_cell_id_1 = loaded_cell_id;
00505c92          uint32_t var_14;
00505c92          uint32_t ebx_4;
00505c92          uint32_t edi_1;
00505c92          
00505c92          if (loaded_cell_id == 0)
00505c92          {
00505cad              ebx_4 = var_14;
00505cb1              edi_1 = var_14;
00505c92          }
00505c92          else
00505c92          {
00505ca6              edi_1 = ((loaded_cell_id >> 0x15) & 0x7f8);
00505ca8              ebx_4 = (((uint32_t)((int8_t)(loaded_cell_id_1 >> 0x10))) << 3);
00505c92          }
00505c92          
00505cc0          LandDefs::gid_to_lcoord(arg2, &loaded_cell_id_1, &var_14);
00505cc7          int32_t mid_width = this->mid_width;
00505cca          int32_t eax_4 = (this->mid_radius << 3);
00505cd1          uint32_t loaded_cell_id_4 = loaded_cell_id_1;
00505cd7          uint32_t ebx_5 = var_14;
00505cdf          int32_t ecx_4 = (((eax_4 - edi_1) + loaded_cell_id_4) >> 3);
00505ce2          int32_t eax_7 = (((eax_4 - ebx_4) + ebx_5) >> 3);
00505cea          this->viewer_b_xoff = ecx_4;
00505ced          this->viewer_b_yoff = eax_7;
00505ced          
00505d08          if ((((ecx_4 >= mid_width || eax_7 >= mid_width) || ecx_4 < 0) || eax_7 < 0))
00505dc0              LScape::update_viewpoint(this, 0);
00505d08          else
00505d08          {
00505d13              if (arg3 != 0)
00505d17                  LScape::get_block_order(this);
00505d17              
00505d25              uint32_t loaded_cell_id_2 = 0;
00505d27              bool cond:3_1 = this->mid_width <= 0;
00505d29              int32_t var_10 = (loaded_cell_id_4 & 7);
00505d2d              int32_t var_c_1 = (ebx_5 & 7);
00505d31              loaded_cell_id_1 = 0;
00505d31              
00505d35              if (!(cond:3_1))
00505d35              {
00505db1                  bool cond:4_1;
00505db1                  
00505db1                  do
00505db1                  {
00505d43                      int32_t i = 0;
00505d43                      
00505d47                      if (this->mid_width > 0)
00505d47                      {
00505da5                          do
00505da5                          {
00505d5b                              class CLandBlock* ebx_7 = this->land_blocks[((this->mid_width * loaded_cell_id_2) + i)];
00505d5b                              
00505d60                              if (ebx_7 != 0)
00505d60                              {
00505d70                                  enum LandDefs::Direction eax_10 = LandDefs::get_dir((loaded_cell_id_2 - this->viewer_b_xoff), (i - this->viewer_b_yoff));
00505d75                                  uint32_t loaded_cell_id_3 = loaded_cell_id_1;
00505d81                                  var_14 = eax_10;
00505d85                                  LScape::calc_frame(this, ebx_7, loaded_cell_id_3, i);
00505d96                                  CLandBlock::calc_draw_order(ebx_7, var_14, &var_10);
00505d9b                                  loaded_cell_id_2 = loaded_cell_id_1;
00505d60                              }
00505d60                              
00505da2                              i += 1;
00505da5                          } while (i < this->mid_width);
00505d47                      }
00505d47                      
00505daa                      loaded_cell_id_2 += 1;
00505dab                      cond:4_1 = loaded_cell_id_2 < this->mid_width;
00505dad                      loaded_cell_id_1 = loaded_cell_id_2;
00505db1                  } while (cond:4_1);
00505d35              }
00505d08          }
00505c83      }
00505c70  }

00505d3d                                                                                         8d 49 00                               .I.
00505dce                                            90 90                                                                ..

00505dd0  class CLandBlock* __stdcall LScape::get_all(class LScape* this @ ecx, class IDClass<_tagDataID,32,0> arg2)

00505dd0  {
00505de5      void var_8;
00505de5      class DBObj* result = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 1));
00505de5      
00505def      if (result != 0)
00505def      {
00505df3          if (arg2 != 0)
00505df3          {
00505e06              *(int32_t*)((char*)result + 0x98) = ((arg2 >> 0x15) & 0x7f8);
00505e0c              *(int32_t*)((char*)result + 0x9c) = (((uint32_t)*(uint8_t*)((char*)arg2.id)[2]) << 3);
00505e16              return result;
00505df3          }
00505df3          
00505e21          *(int32_t*)((char*)result + 0x98) = arg2;
00505e27          *(int32_t*)((char*)result + 0x9c) = arg2;
00505def      }
00505def      
00505e31      return result;
00505dd0  }

00505e34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00505e40  class CLandBlock* __thiscall LScape::get_landblock(class LScape* this, uint32_t arg2)

00505e40  {
00505e47      class CLandBlock** land_blocks = this->land_blocks;
00505e47      
00505e4c      if (land_blocks == 0)
00505e55          return 0;
00505e55      
00505e59      uint32_t edi = arg2;
00505e59      
00505e7a      if ((LandDefs::inbound_valid_cellid(edi) != 0 && ((uint32_t)edi) < 0x100))
00505e7a      {
00505e8a          int32_t var_8;
00505e8a          LandDefs::blockid_to_lcoord(this->loaded_cell_id, &arg2, &var_8);
00505e9a          int32_t var_c;
00505e9a          int32_t var_4;
00505e9a          LandDefs::gid_to_lcoord(edi, &var_c, &var_4);
00505ea9          int32_t eax_6 = (this->mid_radius << 3);
00505ebc          int32_t ecx_3 = (((eax_6 - arg2) + var_c) >> 3);
00505ec2          int32_t eax_9 = (((eax_6 - var_8) + var_4) >> 3);
00505ec2          
00505ecb          if ((ecx_3 >= 0 && eax_9 >= 0))
00505ecb          {
00505ecd              int32_t mid_width = this->mid_width;
00505ecd              
00505ed6              if ((ecx_3 < mid_width && eax_9 < mid_width))
00505ed6              {
00505edd                  void* edx_5 = land_blocks[((mid_width * ecx_3) + eax_9)];
00505edd                  
00505ee4                  if (edx_5 != 0)
00505ee4                  {
00505eea                      int32_t eax_10;
00505eea                      eax_10 = *(uint32_t*)((char*)edx_5 + 0x48) != 8;
00505ef6                      return ((eax_10 - 1) & edx_5);
00505ee4                  }
00505ed6              }
00505ecb          }
00505e7a      }
00505e7a      
00505f01      return 0;
00505e40  }

00505f04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00505f10  class CLandCell* __fastcall LScape::get_landcell(class LScape* this, uint32_t arg2)

00505f10  {
00505f10      class LScape* this_1 = this;
00505f13      uint32_t edi = arg2;
00505f18      class CLandBlock* result = LScape::get_landblock(this, edi);
00505f18      
00505f21      if (result == 0)
00505f26          return result;
00505f26      
00505f34      LandDefs::gid_to_lcoord(edi, &arg2, &this_1);
00505f40      int32_t edx_1 = (arg2 & 0x80000007);
00505f40      
00505f46      if (edx_1 < 0)
00505f4c          edx_1 = (((edx_1 - 1) | 0xfffffff8) + 1);
00505f4c      
00505f57      void* ecx_2 = (this_1 & 0x80000007);
00505f57      
00505f5d      if (ecx_2 < 0)
00505f63          ecx_2 = ((((char*)ecx_2 - 1) | 0xfffffff8) + 1);
00505f63      
00505f77      return ((((result->side_cell_count * edx_1) + ecx_2) * 0x108) + result->lcell);
00505f10  }

00505f7a                                                                                90 90 90 90 90 90                            ......

00505f80  void __fastcall LScape::draw_check_blocks(class LScape* this)

00505f80  {
00505f87      class LScape* this_1 = this;
00505f89      int32_t mid_width = this_1->mid_width;
00505f8c      int32_t esi = 0;
00505f90      int32_t var_14 = 0;
00505f90      
00505f94      if (mid_width > 0)
00505f94      {
00505fff          do
00505fff          {
00505f96              int32_t ebx_1 = 0;
00505f96              
00505f9a              if (mid_width > 0)
00505f9a              {
00505ff3                  do
00505ff3                  {
00505fa8                      void* eax_2 = *(uint32_t*)(this_1->land_blocks + (((mid_width * esi) + ebx_1) << 2));
00505fab                      int32_t i = 0;
00505fab                      
00505faf                      if (eax_2 != 0)
00505faf                      {
00505fb1                          *(uint32_t*)((char*)eax_2 + 0xfc) = 0;
00505fb7                          this = *(uint32_t*)((char*)eax_2 + 0x48);
00505fb7                          
00505fc1                          if ((this * this) > 0)
00505fc1                          {
00505fc3                              int32_t esi_1 = 0;
00505fc3                              
00505fe7                              do
00505fe7                              {
00505fcb                                  *(uint32_t*)((*(uint32_t*)((char*)eax_2 + 0x90) + esi_1) + 0x104) = 0;
00505fd6                                  this = *(uint32_t*)((char*)eax_2 + 0x48);
00505fde                                  i += 1;
00505fdf                                  esi_1 += 0x108;
00505fe7                              } while (i < (this * this));
00505fe7                              
00505fe9                              esi = var_14;
00505fc1                          }
00505faf                      }
00505faf                      
00505fed                      mid_width = this_1->mid_width;
00505ff0                      ebx_1 += 1;
00505ff3                  } while (ebx_1 < mid_width);
00505f9a              }
00505f9a              
00505ff5              mid_width = this_1->mid_width;
00505ff8              esi += 1;
00505ffb              var_14 = esi;
00505fff          } while (esi < mid_width);
00505f94      }
00505f94      
00506001      struct ViewIntervalType* block_interval_1 = block_interval;
00506006      int32_t ebp_5 = 0;
00506006      
0050600a      if (block_interval_1 == 0)
0050600a          goto label_506028;
0050600a      
00506015      if (block_int_size != this_1->mid_width)
00506015      {
00506018          operator delete[](block_interval_1);
00506028      label_506028:
00506028          void* eax_6 = operator new[](((this_1->mid_width + 1) << 8));
0050602d          this = this_1->mid_width;
00506033          block_interval = eax_6;
00506038          block_int_size = this;
00506015      }
00506015      
0050603e      struct portal_view_type* Render::PortalList_1 = Render::PortalList;
00506045      int32_t var_14_1 = 0;
00506049      int32_t var_10 = 0;
0050604d      uint32_t view_count;
0050604d      
0050604d      if (Render::PortalList_1 != 0)
0050604d      {
0050605a          view_count = Render::PortalList_1->view_count;
0050605e          goto label_506065;
0050604d      }
0050604d      
0050604f      uint32_t view_count_1 = 0;
00506051      view_count = 0;
00506051      
00506072      while (true)
00506072      {
00506072          if (view_count_1 != 0)
00506072          {
00506079              Render::set_view(&Render::PortalList_1->view, ebp_5);
00506081              ebp_5 += 1;
00506084              var_10 = ebp_5;
00506072          }
00506072          
00506088          if ((view_count_1 == 0 || ebp_5 == view_count_1))
0050608a              var_14_1 = 1;
0050608a          
00506095          int32_t i_1 = 0;
00506095          
0050609a          if ((this_1->mid_width + 1) > 0)
0050609a          {
0050609c              void* ebx_2 = nullptr;
0050609c              
005060f1              do
005060f1              {
005060dc                  Render::get_clip_height(((float)(((long double)-(this_1->viewer_b_xoff)) * ((long double)0f))), ((float)(((long double)(i_1 - this_1->viewer_b_yoff)) * ((long double)0f))), ((char*)ebx_2 + block_interval));
005060e7                  i_1 += 1;
005060e8                  ebx_2 += 0x80;
005060f1              } while (i_1 < (this_1->mid_width + 1));
0050609a          }
0050609a          
005060f3          int32_t mid_width_1 = this_1->mid_width;
005060f6          int32_t ebx_3 = 0;
005060f6          
005060fa          if (mid_width_1 > 0)
005060fa          {
0050620b              do
0050620b              {
00506100                  int32_t esi_2 = 0;
00506102                  int32_t eax_12 = (mid_width_1 + 1);
00506102                  
00506105                  if (eax_12 > 0)
00506105                  {
00506166                      do
00506166                      {
00506157                          Render::get_clip_height(((float)(((long double)((ebx_3 - this_1->viewer_b_xoff) + 1)) * ((long double)0f))), ((float)(((long double)(esi_2 - this_1->viewer_b_yoff)) * ((long double)0f))), &block_interval[((((ebx_3 - 1) & 1) * eax_12) + esi_2)]);
00506162                          esi_2 += 1;
00506163                          eax_12 = (this_1->mid_width + 1);
00506166                      } while (esi_2 < eax_12);
00506105                  }
00506105                  
00506168                  int32_t mid_width_2 = this_1->mid_width;
0050616b                  int32_t ebp_8 = 0;
0050616b                  
0050616f                  if (mid_width_2 > 0)
0050616f                  {
005061ff                      do
005061ff                      {
0050617f                          class CLandBlock* esi_3 = this_1->land_blocks[((mid_width_2 * ebx_3) + ebp_8)];
0050617f                          
00506184                          if (esi_3 != 0)
00506184                          {
005061af                              void* ecx_19 = &block_interval[((((ebx_3 - 1) & 1) * (mid_width_2 + 1)) + ebp_8)];
005061c3                              void* eax_21 = &block_interval[(((ebx_3 & 1) * (mid_width_2 + 1)) + ebp_8)];
005061df                              enum BoundingType eax_22;
005061df                              eax_22 = Render::block_check(eax_21, ((char*)eax_21 + 0x80), ecx_19, ((char*)ecx_19 + 0x80), esi_3->max_zval, esi_3->min_zval);
005061df                              
005061e9                              if (eax_22 != OUTSIDE)
005061e9                              {
005061ee                                  esi_3->in_view = eax_22;
005061f4                                  LScape::landcell_check(this_1, esi_3);
005061e9                              }
00506184                          }
00506184                          
005061f9                          mid_width_2 = this_1->mid_width;
005061fc                          ebp_8 += 1;
005061ff                      } while (ebp_8 < mid_width_2);
0050616f                  }
0050616f                  
00506205                  mid_width_1 = this_1->mid_width;
00506208                  ebx_3 += 1;
0050620b              } while (ebx_3 < mid_width_1);
0050620b              
00506211              ebp_5 = var_10;
005060fa          }
005060fa          
0050621b          if (var_14_1 != 0)
00506228              return;
00506228          
00506060          Render::PortalList_1 = Render::PortalList;
00506065      label_506065:
00506065          view_count_1 = view_count;
00506072      }
00505f80  }

00506229                             90 90 90 90 90 90 90                                                           .......

00506230  class CSurface* __stdcall LScape::GenerateDetailSurface(class LScape const* this @ ecx, uint32_t arg2)

00506230  {
0050624d      LandSurf::GetDetailTex(CommandList::GetHead(CRegionDesc::current_region->terrain_info), &arg2, arg2);
0050624d      
0050625c      if (arg2 == INVALID_DID.id)
00506263          return 0;
00506263      
0050626e      class CSurface* result = CSurface::makeCustomSurface(SH_CUSTOMDB);
0050626e      
00506275      if (result == 0)
005062bf          return result;
005062bf      
00506288      void var_8;
00506288      class DBObj* eax_5 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0xb));
00506288      
00506292      if (eax_5 == 0)
00506292      {
005062af          CSurface::releaseCustomSurface(result);
005062b7          return nullptr;
00506292      }
00506292      
00506299      CSurface::UseTextureMap(result, eax_5, SH_CUSTOMDB);
0050629e      result->type |= 0x20000;
005062ab      return result;
00506230  }

005062c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005062d0  void __thiscall LScape::update_viewpoint(class LScape* this, uint32_t arg2)

005062d0  {
005062e0      if ((arg2 == 0 || this->loaded_cell_id == 0))
005062e0      {
00506306          class CLandBlock** block_draw_list = this->block_draw_list;
0050630b          this->viewer_cell_id = 0;
0050630b          
00506312          if (block_draw_list != 0)
00506312          {
00506315              operator delete[](block_draw_list);
0050631d              this->block_draw_list = nullptr;
00506312          }
005062e0      }
005062e0      else
005062e0      {
005062e2          uint32_t viewer_cell_id = this->viewer_cell_id;
005062e2          
005062e7          if (arg2 != viewer_cell_id)
005062e7          {
005062eb              int32_t eax_3 = ((viewer_cell_id ^ arg2) & 0xffff0000);
005062f0              int32_t eax_4 = -(eax_3);
005062f7              this->viewer_cell_id = arg2;
005062fd              LScape::calc_draw_order(this, arg2, -((eax_4 - eax_4)));
005062e7          }
005062e0      }
005062d0  }

00506328                          90 90 90 90 90 90 90 90                                                          ........

00506330  void __fastcall LScape::draw(class LScape* this)

00506330  {
00506333      class GameSky* sky = this->sky;
00506333      
00506338      if (sky != 0)
0050633c          GameSky::Draw(sky, 0);
0050633c      
00506346      if (this->block_draw_list != 0)
00506346      {
0050634b          LScape::draw_check_blocks(this);
00506350          int32_t mid_width = this->mid_width;
00506353          int32_t esi_1 = (mid_width * mid_width);
00506356          int32_t esi_2 = (esi_1 - 1);
00506357          void* eax_1;
00506357          
00506357          if ((esi_1 - 1) >= 0)
00506357          {
00506381              int32_t temp1_1;
00506381              
00506381              do
00506381              {
00506363                  eax_1 = this->block_draw_list[esi_2];
00506363                  
00506372                  if ((eax_1 != 0 && *(uint32_t*)((char*)eax_1 + 0xfc) != 0))
00506374                      RenderDevice::render_device->vtable->DrawBlock(eax_1);
00506374                  
00506380                  temp1_1 = esi_2;
00506380                  esi_2 -= 1;
00506381              } while ((temp1_1 - 1) >= 0);
00506357          }
00506357          
00506383          class GameSky* sky_1 = this->sky;
00506383          
00506389          if (sky_1 != 0)
00506389          {
0050638b              eax_1 = LScape::weather_enabled;
0050638b              
00506392              if (eax_1 != 0)
00506396                  GameSky::Draw(sky_1, 1);
00506389          }
00506346      }
00506330  }

0050639d                                                                                         90 90 90                               ...

005063a0  void __thiscall LScape::update_block(class LScape* this, uint32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

005063a0  {
005063b8      class IDClass<_tagDataID,32,0> __return;
005063b8      LandDefs::gid_to_lcoord(arg2, &__return, &arg2);
005063c7      int32_t eax_1 = (this->mid_radius << 3);
005063cc      int32_t __return_4 = (__return - eax_1);
005063d1      int32_t i_3 = 0;
005063d6      bool cond:0 = this->land_blocks == 0;
005063d8      arg2 -= eax_1;
005063e6      void __return_1;
005063e6      
005063e6      if ((cond:0 || arg5 != 0))
005063e6      {
0050693b      label_50693b:
0050693b          LScape::release_all(this);
0050693b          
00506943          if (this->land_blocks == 0)
00506943          {
00506945              int32_t mid_width_5 = this->mid_width;
00506951              void* eax_69;
00506951              int32_t ecx_63;
00506951              eax_69 = operator new[](((mid_width_5 * mid_width_5) << 2));
00506959              this->land_blocks = eax_69;
00506943          }
00506943          
0050695f          arg4 = 0;
0050695f          
00506963          if (this->mid_width > 0)
00506963          {
00506969              arg3 = __return_4;
00506a61              bool cond:3_1;
00506a61              
00506a61              do
00506a61              {
00506973                  int32_t i = 0;
00506973                  
00506977                  if (this->mid_width > 0)
00506977                  {
0050697d                      uint32_t ebx_2 = arg2;
0050697d                      
00506a42                      do
00506a42                      {
00506981                          int32_t eax_71 = arg3;
00506981                          
005069a6                          if ((((eax_71 < 0 || ebx_2 < 0) || eax_71 >= 0x7f8) || ebx_2 >= 0x7f8))
00506a2d                              this->land_blocks[((this->mid_width * arg4) + i)] = 0;
005069a6                          else
005069a6                          {
005069bc                              class IDClass<_tagDataID,32,0> eax_76 = (((((eax_71 & 0xfffffff8) << 5) | (ebx_2 >> 3)) << 0x10) | 0xffff);
005069ca                              arg5 = eax_76;
005069d4                              class DBObj* eax_78 = DBObj::Get(QualifiedDataID::QualifiedDataID(&__return_1, eax_76, 1));
005069d4                              
005069de                              if (eax_78 != 0)
005069de                              {
005069e2                                  int32_t var_10;
005069e2                                  class IDClass<_tagDataID,32,0> __return_3;
005069e2                                  
005069e2                                  if (eax_76 == 0)
005069ff                                      __return_3 = __return;
005069e2                                  else
005069e2                                  {
005069f2                                      __return_3 = (((uint32_t)*(uint8_t*)((char*)arg5)[2]) << 3);
005069f5                                      var_10 = ((eax_76 >> 0x15) & 0x7f8);
005069f9                                      __return = __return_3;
005069e2                                  }
005069e2                                  
00506a07                                  *(int32_t*)((char*)eax_78 + 0x98) = var_10;
00506a0d                                  *(int32_t*)((char*)eax_78 + 0x9c) = __return_3;
005069de                              }
005069de                              
00506a1b                              this->land_blocks[((this->mid_width * arg4) + i)] = eax_78;
005069a6                          }
005069a6                          
00506a3c                          i += 1;
00506a3d                          ebx_2 += 8;
00506a42                      } while (i < this->mid_width);
00506977                  }
00506977                  
00506a57                  cond:3_1 = (arg4 + 1) < this->mid_width;
00506a59                  arg4 += 1;
00506a5d                  arg3 += 8;
00506a61              } while (cond:3_1);
00506963          }
005063e6      }
005063e6      else
005063e6      {
005063ec          int32_t mid_width = this->mid_width;
005063ef          int32_t edx_1 = arg3;
005063ef          
00506401          if ((edx_1 >= mid_width || arg4 >= mid_width))
005063f5              goto label_50693b;
005063f5          
00506409          int32_t ecx_3 = -(mid_width);
00506409          
00506415          if ((edx_1 <= ecx_3 || arg4 <= ecx_3))
0050640d              goto label_50693b;
0050640d          
0050641d          bool cond:7_1;
0050641d          
0050641d          if (edx_1 == 0)
0050641d          {
00506423              cond:7_1 = arg4 < 0;
00506423              
00506425              if (arg4 != 0)
00506425                  goto label_5064ed;
00506425              
0050642d              arg4 = 0;
0050642d              
00506431              if (mid_width > 0)
00506431              {
00506437                  arg5 = __return_4;
005064da                  bool cond:12_1;
005064da                  
005064da                  do
005064da                  {
00506443                      int32_t ebp = 0;
00506443                      
00506447                      if (this->mid_width > 0)
00506447                      {
0050644d                          arg3 = arg2;
005064bf                          bool cond:14_1;
005064bf                          
005064bf                          do
005064bf                          {
00506459                              class CLandBlock** land_blocks_4 = this->land_blocks;
0050645c                              int32_t edi_2 = ((this->mid_width * arg4) + ebp);
0050645c                              
00506467                              if (land_blocks_4[edi_2] == 0)
00506467                              {
0050647d                                  if (LandDefs::in_bounds(arg5, arg3) == 0)
00506464                                      land_blocks_4[edi_2] = 0;
0050647d                                  else
005064a0                                      this->land_blocks[edi_2] = LScape::get_all(this, LandDefs::get_block_did(&__return, arg5, arg3)->id);
00506467                              }
00506467                              
005064b5                              ebp += 1;
005064b9                              cond:14_1 = ebp < this->mid_width;
005064bb                              arg3 += 8;
005064bf                          } while (cond:14_1);
00506447                      }
00506447                      
005064d0                      cond:12_1 = (arg4 + 1) < this->mid_width;
005064d2                      arg4 += 1;
005064d6                      arg5 += 8;
005064da                  } while (cond:12_1);
00506431              }
0050641d          }
0050641d          else if (edx_1 < 0)
005064e5          {
00506704              int32_t i_1 = (mid_width - 1);
00506704              
00506707              if (arg4 < 0)
00506707              {
0050681b                  if (i_1 >= 0)
0050681b                  {
00506824                      int32_t var_10_2 = (__return_4 + (i_1 << 3));
00506824                      
0050692e                      do
0050692e                      {
00506830                          int32_t mid_width_7 = this->mid_width;
00506833                          int32_t j = (mid_width_7 - 1);
00506833                          
00506834                          if ((mid_width_7 - 1) >= 0)
00506834                          {
00506848                              arg5 = (j + arg4);
0050684c                              __return = (arg2 + (j << 3));
0050684c                              
0050691a                              do
0050691a                              {
00506850                                  int32_t mid_width_3 = this->mid_width;
00506853                                  int32_t edi_22 = arg3;
00506853                                  
00506867                                  if ((i_1 >= (mid_width_3 + edi_22) || j >= (mid_width_3 + arg4)))
00506867                                  {
00506871                                      class CLandBlock* eax_56 = this->land_blocks[((mid_width_3 * i_1) + j)];
00506871                                      
00506876                                      if (eax_56 != 0)
0050687a                                          CLandBlock::release_all(eax_56);
00506867                                  }
00506867                                  
0050687f                                  int32_t edx_36 = (edi_22 + i_1);
0050687f                                  
0050688c                                  if ((edx_36 < 0 || arg5 < 0))
0050688c                                  {
005068be                                      if (LandDefs::in_bounds(var_10_2, __return) == 0)
005068f4                                          this->land_blocks[((this->mid_width * i_1) + j)] = 0;
005068be                                      else
005068e9                                          this->land_blocks[((this->mid_width * i_1) + j)] = LScape::get_all(this, LandDefs::get_block_did(&__return_1, var_10_2, __return)->id);
0050688c                                  }
0050688c                                  else
0050688c                                  {
0050688e                                      int32_t mid_width_4 = this->mid_width;
00506891                                      class CLandBlock** land_blocks_3 = this->land_blocks;
005068a5                                      land_blocks_3[((mid_width_4 * i_1) + j)] = land_blocks_3[((mid_width_4 * edx_36) + arg5)];
0050688c                                  }
0050688c                                  
0050690b                                  j -= 1;
00506912                                  arg5 -= 1;
00506916                                  __return -= 8;
0050691a                              } while (j >= 0);
00506834                          }
00506834                          
00506924                          i_1 -= 1;
0050692a                          var_10_2 -= 8;
0050692e                      } while (i_1 >= 0);
0050681b                  }
00506707              }
00506707              else if (i_1 >= 0)
0050670f              {
00506718                  __return = (__return_4 + (i_1 << 3));
00506718                  
0050680e                  do
0050680e                  {
00506723                      int32_t j_1 = 0;
00506723                      
00506727                      if (this->mid_width > 0)
00506727                      {
00506731                          arg5 = arg2;
00506731                          
005067fa                          do
005067fa                          {
00506735                              int32_t mid_width_1 = this->mid_width;
00506738                              int32_t edi_15 = arg3;
00506738                              
00506747                              if ((i_1 >= (mid_width_1 + edi_15) || j_1 < arg4))
00506747                              {
00506751                                  class CLandBlock* eax_39 = this->land_blocks[((mid_width_1 * i_1) + j_1)];
00506751                                  
00506756                                  if (eax_39 != 0)
0050675a                                      CLandBlock::release_all(eax_39);
00506747                              }
00506747                              
0050675f                              int32_t edx_26 = (edi_15 + i_1);
00506764                              int32_t mid_width_2;
00506764                              
00506764                              if (edx_26 >= 0)
0050676a                                  mid_width_2 = this->mid_width;
0050676a                              
00506771                              if ((edx_26 < 0 || (arg4 + j_1) >= mid_width_2))
00506771                              {
005067a4                                  if (LandDefs::in_bounds(__return, arg5) == 0)
005067da                                      this->land_blocks[((this->mid_width * i_1) + j_1)] = 0;
005067a4                                  else
005067cf                                      this->land_blocks[((this->mid_width * i_1) + j_1)] = LScape::get_all(this, LandDefs::get_block_did(&__return_1, __return, arg5)->id);
00506771                              }
00506771                              else
00506771                              {
00506773                                  class CLandBlock** land_blocks_2 = this->land_blocks;
0050678b                                  land_blocks_2[((mid_width_2 * i_1) + j_1)] = land_blocks_2[((mid_width_2 * edx_26) + (arg4 + j_1))];
00506771                              }
00506771                              
005067f0                              j_1 += 1;
005067f6                              arg5 += 8;
005067fa                          } while (j_1 < this->mid_width);
00506727                      }
00506727                      
00506804                      i_1 -= 1;
0050680a                      __return -= 8;
0050680e                  } while (i_1 >= 0);
0050670f              }
005064e5          }
005064e5          else
005064e5          {
005064eb              cond:7_1 = arg4 < 0;
005064ed          label_5064ed:
005064ed              
005064ed              if (cond:7_1)
005064ed              {
005065f2                  int32_t ebp_1 = 0;
005065f2                  
005065f6                  if (mid_width > 0)
005065f6                  {
005065fc                      __return = __return_4;
005066f7                      bool cond:10_1;
005066f7                      
005066f7                      do
005066f7                      {
00506600                          int32_t mid_width_6 = this->mid_width;
00506603                          int32_t i_2 = (mid_width_6 - 1);
00506603                          
00506604                          if ((mid_width_6 - 1) >= 0)
00506604                          {
00506618                              arg5 = (i_2 + arg4);
0050661c                              int32_t var_10_1 = (arg2 + (i_2 << 3));
0050661c                              
005066e0                              do
005066e0                              {
0050662f                                  if ((ebp_1 < arg3 || i_2 >= (this->mid_width + arg4)))
0050662f                                  {
0050663c                                      class CLandBlock* ecx_28 = this->land_blocks[((this->mid_width * ebp_1) + i_2)];
0050663c                                      
00506641                                      if (ecx_28 != 0)
00506643                                          CLandBlock::release_all(ecx_28);
0050662f                                  }
0050662f                                  
0050664c                                  int32_t mid_width_9 = this->mid_width;
0050664f                                  int32_t ecx_30 = (arg3 + ebp_1);
0050664f                                  
0050665b                                  if ((ecx_30 >= mid_width_9 || arg5 < 0))
0050665b                                  {
0050668a                                      if (LandDefs::in_bounds(__return, var_10_1) == 0)
005066ba                                          this->land_blocks[((mid_width_9 * ebp_1) + i_2)] = 0;
0050668a                                      else
005066b2                                          this->land_blocks[((mid_width_9 * ebp_1) + i_2)] = LScape::get_all(this, LandDefs::get_block_did(&__return_1, __return, var_10_1)->id);
0050665b                                  }
0050665b                                  else
0050665b                                  {
0050665d                                      class CLandBlock** land_blocks_1 = this->land_blocks;
00506671                                      land_blocks_1[((mid_width_9 * ebp_1) + i_2)] = land_blocks_1[((mid_width_9 * ecx_30) + arg5)];
0050665b                                  }
0050665b                                  
005066d1                                  i_2 -= 1;
005066d8                                  arg5 -= 1;
005066dc                                  var_10_1 -= 8;
005066e0                              } while (i_2 >= 0);
00506604                          }
00506604                          
005066ed                          ebp_1 += 1;
005066f1                          cond:10_1 = ebp_1 < this->mid_width;
005066f3                          __return += 8;
005066f7                      } while (cond:10_1);
005065f6                  }
005064ed              }
005064ed              else if (mid_width > 0)
005064f5              {
005064fb                  int32_t __return_5 = __return_4;
005064fb                  
005065e7                  do
005065e7                  {
00506503                      int32_t j_2 = 0;
00506503                      
00506507                      if (this->mid_width > 0)
00506507                      {
00506511                          arg5 = arg2;
00506511                          
005065d0                          do
005065d0                          {
0050651f                              if ((i_3 < arg3 || j_2 < arg4))
0050651f                              {
0050652c                                  class CLandBlock* ecx_14 = this->land_blocks[((this->mid_width * i_3) + j_2)];
0050652c                                  
00506531                                  if (ecx_14 != 0)
00506533                                      CLandBlock::release_all(ecx_14);
0050651f                              }
0050651f                              
0050653c                              int32_t mid_width_8 = this->mid_width;
0050653f                              class IDClass<_tagDataID,32,0> __return_2 = (arg3 + i_3);
00506543                              __return = __return_2;
00506547                              int32_t ecx_16;
00506547                              
00506547                              if (__return_2 < mid_width_8)
0050654d                                  ecx_16 = (arg4 + j_2);
0050654d                              
00506551                              if ((__return_2 >= mid_width_8 || ecx_16 >= mid_width_8))
00506551                              {
00506580                                  if (LandDefs::in_bounds(__return_5, arg5) == 0)
005065b0                                      this->land_blocks[((mid_width_8 * i_3) + j_2)] = 0;
00506580                                  else
005065a8                                      this->land_blocks[((mid_width_8 * i_3) + j_2)] = LScape::get_all(this, LandDefs::get_block_did(&__return_1, __return_5, arg5)->id);
00506551                              }
00506551                              else
00506551                              {
00506553                                  class CLandBlock** land_blocks = this->land_blocks;
00506567                                  land_blocks[((mid_width_8 * i_3) + j_2)] = land_blocks[((mid_width_8 * __return) + ecx_16)];
00506551                              }
00506551                              
005065c6                              j_2 += 1;
005065cc                              arg5 += 8;
005065d0                          } while (j_2 < this->mid_width);
00506507                      }
00506507                      
005065dd                      i_3 += 1;
005065e3                      __return_5 += 8;
005065e7                  } while (i_3 < this->mid_width);
005064f5              }
005064e5          }
005063e6      }
00506a6a      int32_t i_4 = 0;
00506a6e      arg4 = 0;
00506a6e      
00506a72      if (this->mid_width > 0)
00506a72      {
00506b24          do
00506b24          {
00506a7b              int32_t j_3 = 0;
00506a7b              
00506a7f              if (this->mid_width > 0)
00506a7f              {
00506b14                  do
00506b14                  {
00506a90                      class CLandBlock* edi_32 = this->land_blocks[((this->mid_width * i_4) + j_3)];
00506a90                      
00506a95                      if (edi_32 != 0)
00506a95                      {
00506aa9                          LScape::get_block_orient(this, i_4, j_3, &arg3, &arg2);
00506aa9                          
00506ab2                          if ((edi_32->side_cell_count == 8 && (8 / arg3) != 8))
00506ac5                              CLandBlock::notify_change_size(edi_32);
00506ac5                          
00506add                          int32_t eax_88 = CLandBlockStruct::generate(&edi_32->vertex_lighting, edi_32->m_DID.id, arg3, arg2);
00506add                          int16_t top = (top - 1);
00506add                          /* unimplemented  {call CLandBlockStruct::generate} */;
00506add                          
00506ae4                          if (eax_88 != 0)
00506ae4                          {
00506aeb                              edi_32->closest.x = 0xffffffff;
00506af1                              edi_32->closest.y = 0xffffffff;
00506af7                              CLandBlock::init_lcell_ptrs(edi_32);
00506afe                              CLandBlockStruct::calc_lighting(&edi_32->vertex_lighting);
00506afe                              /* unimplemented  {call CLandBlockStruct::calc_lighting} */;
00506b05                              CLandBlock::get_land_limits(edi_32);
00506ae4                          }
00506ae4                          
00506b0a                          i_4 = arg4;
00506a95                      }
00506a95                      
00506b11                      j_3 += 1;
00506b14                  } while (j_3 < this->mid_width);
00506a7f              }
00506a7f              
00506b1d              i_4 += 1;
00506b20              arg4 = i_4;
00506b24          } while (i_4 < this->mid_width);
00506a72      }
005063a0  }

0050643d                                                                                         8d 49 00                               .I.
0050682a                                8d 9b 00 00 00 00                                                            ......
00506b34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00506b40  uint8_t __thiscall LScape::SetDetailTexturing(class LScape* this, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00506b40  {
00506b40      class LScape* this_1 = this;
00506b40      
00506b4b      if (CRegionDesc::current_region == 0)
00506b4b      {
00506b4d          class CRegionDesc* eax;
00506b4d          eax = 0;
00506b51          return 0;
00506b4b      }
00506b4b      
00506b56      LScape::CleanupDetailSurfaces(this);
00506b6c      uint32_t eax_3;
00506b6c      int32_t ecx_4;
00506b6c      eax_3 = LandSurf::GetDetailTiling(CommandList::GetHead(CRegionDesc::current_region->terrain_info), 0);
00506b77      long double x87_r7 = ((long double)eax_3);
00506b77      
00506b7b      if (eax_3 < 0)
00506b7d          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
00506b7d      
00506b83      int32_t var_c = ecx_4;
00506b87      Render::SetLandscapeDetailTiling(((float)x87_r7));
00506ba1      uint32_t eax_5;
00506ba1      int32_t ecx_8;
00506ba1      eax_5 = LandSurf::GetDetailTiling(CommandList::GetHead(CRegionDesc::current_region->terrain_info), 2);
00506bac      long double x87_r7_1 = ((long double)eax_5);
00506bac      
00506bb0      if (eax_5 < 0)
00506bb2          x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
00506bb2      
00506bb8      int32_t var_c_2 = ecx_8;
00506bbc      Render::SetEnvironmentDetailTiling(((float)x87_r7_1));
00506bd6      uint32_t eax_7;
00506bd6      int32_t ecx_11;
00506bd6      eax_7 = LandSurf::GetDetailTiling(CommandList::GetHead(CRegionDesc::current_region->terrain_info), 1);
00506be1      long double x87_r7_2 = ((long double)eax_7);
00506be1      
00506be5      if (eax_7 < 0)
00506be7          x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
00506be7      
00506bed      int32_t var_c_4 = ecx_11;
00506bf1      Render::SetBuildingDetailTiling(((float)x87_r7_2));
00506c0a      uint32_t eax_10;
00506c0a      int32_t ecx_14;
00506c0a      eax_10 = LandSurf::GetDetailTiling(CommandList::GetHead(CRegionDesc::current_region->terrain_info), 3);
00506c15      long double x87_r7_3 = ((long double)eax_10);
00506c15      
00506c19      if (eax_10 < 0)
00506c1b          x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
00506c1b      
00506c21      int32_t var_c_6 = ecx_14;
00506c25      Render::SetObjectDetailTiling(((float)x87_r7_3));
00506c25      
00506c33      if (arg2 != 0)
00506c33      {
00506c39          class CSurface* eax_12 = LScape::GenerateDetailSurface(this, 0);
00506c3f          this->landscape_detail_surface = eax_12;
00506c42          Render::SetLandscapeDetailSurface(eax_12);
00506c33      }
00506c33      
00506c50      if (arg4 != 0)
00506c50      {
00506c56          class CSurface* eax_14 = LScape::GenerateDetailSurface(this, 2);
00506c5c          this->environment_detail_surface = eax_14;
00506c5f          Render::SetEnvironmentDetailSurface(eax_14);
00506c50      }
00506c50      
00506c6d      if (arg3 != 0)
00506c6d      {
00506c73          class CSurface* eax_16 = LScape::GenerateDetailSurface(this, 1);
00506c79          this->building_detail_surface = eax_16;
00506c7c          Render::SetBuildingDetailSurface(eax_16);
00506c6d      }
00506c6d      
00506c8a      if (arg5 != 0)
00506c8a      {
00506c90          class CSurface* eax_17 = LScape::GenerateDetailSurface(this, 3);
00506c96          this->object_detail_surface = eax_17;
00506c99          Render::SetObjectDetailSurface(eax_17);
00506c8a      }
00506c8a      
00506ca1      int32_t eax_18;
00506ca1      eax_18 = 1;
00506ca5      return 1;
00506b40  }

00506ca8                          90 90 90 90 90 90 90 90                                                          ........

00506cb0  void __fastcall LScape::ChangeRegion(class LScape* this)

00506cb0  {
00506cb0      uint32_t EnvironmentDetailTextures = ((uint32_t)Render::m_RenderPrefs.EnvironmentDetailTextures);
00506cbd      LScape::SetDetailTexturing(this, 0, EnvironmentDetailTextures, EnvironmentDetailTextures, 0);
00506cb0  }

00506cc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00506cd0  void __thiscall LScape::update_loadpoint(class LScape* this, uint32_t arg2)

00506cd0  {
00506cd5      uint32_t ebp = arg2;
00506cd9      int32_t i = 0;
00506cd9      
00506ce0      if (ebp == 0)
00506ce0      {
00506ce2          LScape::release_all(this);
00506ced          return;
00506ce0      }
00506ce0      
00506d02      int32_t var_8;
00506d02      int32_t var_4;
00506d02      int32_t eax = LScape::get_block_shift(this, this->loaded_cell_id, ebp, &var_8, &var_4);
00506d07      class CLandBlock** land_blocks = this->land_blocks;
00506d0c      int32_t edi_1 = -(eax);
00506d10      int32_t edi_3 = ((edi_1 - edi_1) + 1);
00506d13      int32_t var_c = 0;
00506d13      
00506d17      if (land_blocks != 0)
00506d17      {
00506d19          int32_t mid_width = this->mid_width;
00506d19          
00506d1e          if (mid_width > 0)
00506d1e          {
00506d46              do
00506d46              {
00506d27                  int32_t j = 0;
00506d29                  class CLandBlock** land_blocks_1 = land_blocks;
00506d29                  
00506d3c                  do
00506d3c                  {
00506d33                      if (*(uint32_t*)land_blocks_1 == 0)
00506d33                      {
00506d4a                          var_c = 1;
00506d4a                          goto label_506d52;
00506d33                      }
00506d33                      
00506d35                      j += 1;
00506d36                      land_blocks_1 = &land_blocks_1[1];
00506d3c                  } while (j < this->mid_width);
00506d3c                  
00506d41                  i += 1;
00506d42                  land_blocks = &land_blocks[mid_width];
00506d46              } while (i < this->mid_width);
00506d46              
00506d52          label_506d52:
00506d52              ebp = arg2;
00506d1e          }
00506d17      }
00506d17      
00506d56      int32_t eax_2 = var_8;
00506d5c      int32_t ecx_1 = var_4;
00506d5c      
00506d77      if ((eax_2 == 0 && (ecx_1 == 0 && (this->land_blocks != 0 && (edi_3 == 0 && var_c == 0)))))
00506d77      {
00506d7a          this->loaded_cell_id = ebp;
00506d83          return;
00506d77      }
00506d77      
00506d8c      LScape::update_block(this, ebp, eax_2, ecx_1, edi_3);
00506d8c      
00506d9b      if (((this->loaded_cell_id ^ ebp) & 0xffff0000) != 0)
00506d9d          edi_3 = 1;
00506d9d      
00506da2      uint32_t viewer_cell_id = this->viewer_cell_id;
00506da9      this->loaded_cell_id = ebp;
00506dac      LScape::calc_draw_order(this, viewer_cell_id, edi_3);
00506cd0  }

00506d2d                                         8d 49 00                                                               .I.
00506dbb                                                                                   90 90 90 90 90                             .....

00506dc0  class AC1Legacy::Vector3* __fastcall Position::origin(class Position* this) __pure

00506dc0  {
00506dc3      return &this->frame.m_fOrigin;
00506dc0  }

00506dc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00506dd0  void __thiscall GameSky::UpdatePosition(class GameSky* this, class Position const* arg2)

00506dd0  {
00506dde      this->after_sky_cell->vtable->SetDID(arg2->objcell_id);
00506dee      class Position* eax_2 = &this->after_sky_cell->pos;
00506df1      eax_2->objcell_id = arg2->objcell_id;
00506dfb      Frame::operator=(&eax_2->frame, &arg2->frame);
00506e03      this->before_sky_cell->vtable->SetDID(arg2->objcell_id);
00506e12      class Position* eax_5 = &this->before_sky_cell->pos;
00506e15      eax_5->objcell_id = arg2->objcell_id;
00506e1c      Frame::operator=(&eax_5->frame, &arg2->frame);
00506e24      int32_t i = 0;
00506e24      
00506e28      if (this->sky_obj.m_num > 0)
00506e28      {
00506ec5          do
00506ec5          {
00506e30              class CPhysicsObj** m_data = this->sky_obj.m_data;
00506e33              void* eax_7 = m_data[i];
00506e33              
00506e3b              if (eax_7 != 0)
00506e3b              {
00506e49                  void var_40;
00506e49                  Frame::operator=(&var_40, ((char*)eax_7 + 0x50));
00506e49                  
00506e55                  if ((this->property_array.m_data[i] & 4) == 0)
00506e85                      Frame::interpolate_origin(&var_40, &m_data[i]->m_position.frame, &arg2->frame, 0f);
00506e55                  else
00506e55                  {
00506e59                      class AC1Legacy::Vector3* eax_9 = Position::origin(arg2);
00506e60                      float x = eax_9->x;
00506e67                      float y = eax_9->y;
00506e6e                      float z = eax_9->z;
00506e55                  }
00506e55                  
00506e8d                  char eax_13 = ((int8_t)this->property_array.m_data[i]);
00506e8d                  
00506e96                  if (((eax_13 & 4) != 0 && (eax_13 & 8) == 0))
00506e98                      int32_t var_4_1 = 0xc2f00000;
00506e98                  
00506eab                  CPhysicsObj::set_frame(this->sky_obj.m_data[i], &var_40);
00506eba                  CPhysicsObj::set_cell_id_recursive(this->sky_obj.m_data[i], arg2->objcell_id);
00506e3b              }
00506e3b              
00506ec2              i += 1;
00506ec5          } while (i < this->sky_obj.m_num);
00506e28      }
00506dd0  }

00506ed5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00506ee0  class CPhysicsObj* __thiscall GameSky::MakeObject(class GameSky* this, class IDClass<_tagDataID,32,0> arg2, class AC1Legacy::Vector3 const* arg3, int32_t arg4, int32_t arg5)

00506ee0  {
00506ee9      if (arg2 != 0)
00506ee9      {
00506ef5          int32_t ecx;
00506ef5          
00506ef5          if (arg5 != 0)
00506ef7              ecx = LScape::weather_enabled;
00506ef7          
00506eff          if ((arg5 == 0 || ecx != 0))
00506eff          {
00506f0c              class CPhysicsObj* result = CPhysicsObj::makeObject(arg2, 0, 0);
00506f0c              
00506f13              if (result != 0)
00506f13              {
00506f19                  long double x87_r7_1 = ((long double)arg3->x);
00506f1b                  long double temp1_1 = ((long double)0f);
00506f1b                  (x87_r7_1 - temp1_1);
00506f21                  class CPhysicsObj* eax;
00506f21                  eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00506f23                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00506f26                  bool p_2;
00506f26                  
00506f26                  if (!(p_1))
00506f26                  {
00506f28                      long double x87_r7_2 = ((long double)arg3->y);
00506f2b                      long double temp2_1 = ((long double)0f);
00506f2b                      (x87_r7_2 - temp2_1);
00506f31                      eax = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00506f33                      p_2 = /* p_2 = unimplemented  {test ah, 0x44} */;
00506f26                  }
00506f26                  
00506f36                  if ((p_1 || p_2))
00506f41                      CPhysicsObj::SetTextureVelocity(result, arg3->x, arg3->y);
00506f41                  
00506f4e                  if (arg4 != 0)
00506f4e                  {
00506f54                      CPhysicsObj::AddObjectToSingleCell(result, this->after_sky_cell);
00506f5d                      return result;
00506f4e                  }
00506f4e                  
00506f64                  CPhysicsObj::AddObjectToSingleCell(result, this->before_sky_cell);
00506f13              }
00506f13              
00506f6d              return result;
00506eff          }
00506ee9      }
00506ee9      
00506f73      return 0;
00506ee0  }

00506f76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00506f80  void __stdcall GameSky::CalcFrame(class GameSky* this @ ecx, class Frame* arg2, float arg3, float arg4)

00506f80  {
00506f80      long double x87_r7 = ((long double)arg3);
00506f87      long double temp1 = ((long double)0f);
00506f87      (x87_r7 - temp1);
00506f92      int32_t eax;
00506f92      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00506f94      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00506f94      
00506f97      if (p)
00506fa0          Frame::set_heading(arg2, arg3);
00506fa0      
00506fa5      long double x87_r7_1 = ((long double)arg4);
00506fa9      long double temp2 = ((long double)0f);
00506fa9      (x87_r7_1 - temp2);
00506faf      eax = ((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0))));
00506fb1      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00506fb1      
00506fb4      if (p_1)
00506fb4      {
00506fc9          float var_8_1 = ((float)(-(((long double)arg4)) * ((long double)0.017453292519943295)));
00506fcd          int32_t var_c = 0;
00506fd5          int32_t var_4_1 = 0;
00506fdd          Frame::grotate(arg2, &var_c);
00506fb4      }
00506f80  }

00506fe9                             90 90 90 90 90 90 90                                                           .......

00506ff0  void __thiscall GameSky::Draw(class GameSky* this, int32_t arg2)

00506ff0  {
00507001      int32_t i = arg2;
00507001      
00507009      if ((SmartBox::is_player_outside(SmartBox::smartbox) != 0 || i == 0))
00507009      {
00507010          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00507019          *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e0) = 1;
00507025          uint32_t ebp_1 = ((uint32_t)RenderDeviceD3D::GetFFFogEnable(RenderDevice::render_device_1));
00507031          uint8_t var_14_1;
00507031          
00507031          if (LScape::m_override_enabled == 0)
00507037              var_14_1 = 0;
00507031          else
00507033              var_14_1 = 1;
00507033          
00507039          int32_t ecx_3 = RenderDeviceD3D::SetFFFogEnable(RenderDevice::render_device_1, var_14_1);
00507043          arg2 = Render::zfar;
0050704b          int32_t var_14_2 = ecx_3;
00507055          Render::set_zfar(((float)(((long double)arg2) * ((long double)4f))));
00507063          RenderDeviceD3D::SetDepthBufferMode(RenderDevice::render_device_1, DEPTHTEST_ALWAYS, 0);
00507063          
0050706a          if (i != 0)
0050706a          {
005070d8              if (LScape::weather_enabled != 0)
005070da                  RenderDevice::render_device->vtable->DrawObjCellForDummies(this->after_sky_cell);
0050706a          }
0050706a          else if (this->sky_obj.m_num > 0)
00507071          {
005070cd              do
005070cd              {
0050707a                  if (this->sky_obj.m_data[i] != 0)
0050707a                  {
0050707f                      char eax_5 = ((int8_t)this->property_array.m_data[i]);
0050707f                      
00507084                      if ((eax_5 & 1) == 0)
00507084                      {
00507086                          class CPhysicsObj** ecx_5;
00507086                          ecx_5 = LScape::weather_enabled;
00507086                          
00507092                          if ((ecx_5 != 0 || (eax_5 & 4) == 0))
00507092                          {
0050709b                              uint8_t eax_6;
0050709b                              
0050709b                              if (LScape::m_override_enabled != 0)
0050709f                                  eax_6 = RenderDeviceD3D::GetFFFogEnable(RenderDevice::render_device_1);
0050709f                              
005070af                              if (((LScape::m_override_enabled == 0 || eax_6 == 0) || (this->property_array.m_data[i] & 2) == 0))
005070af                              {
005070b7                                  CPhysicsObj::UpdateViewerDistanceRecursive(this->sky_obj.m_data[i]);
005070c2                                  CPhysicsObj::DrawRecursive(this->sky_obj.m_data[i]);
005070af                              }
00507092                          }
00507084                      }
0050707a                  }
0050707a                  
005070ca                  i += 1;
005070cd              } while (i < this->sky_obj.m_num);
00507071          }
00507071          
005070ee          Render::set_zfar(arg2);
005070fc          RenderDeviceD3D::SetDepthBufferMode(RenderDevice::render_device_1, DEPTHTEST_LESSEQUAL, 1);
00507109          RenderDeviceD3D::SetFFFogEnable(RenderDevice::render_device_1, ((int8_t)ebp_1 != 0));
0050710f          *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e0) = 0;
00507009      }
00506ff0  }

0050711c                                                                                      90 90 90 90                              ....

00507120  void GameSky::OnTimeAdjustment(class PStringBase<char> const* arg1)

00507120  {
00507120      class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
0050712d      class GameTime* GameTime::current_game_time_2;
0050712d      
0050712d      if (GameTime::current_game_time_1 != 0)
0050712d      {
0050713b          GameTime::current_game_time_1->time_zero_start_delta = (*(uint32_t*)GameSky::s_timeAdjustment);
00507141          *(uint32_t*)((char*)GameTime::current_game_time_1->time_zero_start_delta)[4] = *(int32_t*)((char*)GameSky::s_timeAdjustment + 4);
00507147          GameTime::current_game_time->time_of_next_event = 0f;
00507159          *(uint32_t*)((char*)GameTime::current_game_time->time_of_next_event)[4] = 0;
00507166          GameTime::UseTime(GameTime::current_game_time);
0050716b          GameTime::current_game_time_2 = GameTime::current_game_time;
0050712d      }
0050712d      
00507173      int16_t var_100;
00507173      int16_t var_80;
00507173      
00507173      if ((GameTime::current_game_time_1 == 0 || GameTime::current_game_time_2 == 0))
00507173      {
0050718e          var_80 = 0x20;
00507196          var_100 = 0x20;
00507173      }
00507173      else
00507182          GameTime::GetDateTimeString(GameTime::current_game_time_2, &var_80, &var_100);
00507182      
005071a0      int16_t* var_10c_2 = &var_100;
005071a8      int16_t* var_110 = &var_80;
005071b5      void* var_104;
005071b5      PStringBase<char>::PStringBase<char>(&var_104, Formatted, "  Date: %s\n  Time: %s\n");
005071bf      GlobalRegistry::OutputText(&var_104);
005071c8      int32_t* esi_1 = ((char*)var_104 - 0x14);
005071c8      
005071de      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
005071e6          **(uint32_t**)esi_1(1);
00507120  }


005071f0  void __fastcall GameSky::GameSky(class GameSky* this)

005071f0  {
005071f9      __builtin_memset(this, 0, 0x24);
00507219      void* eax = operator new(0x148);
00507223      class CEnvCell* eax_1;
00507223      
00507223      if (eax == 0)
0050722e          eax_1 = nullptr;
00507223      else
00507227          eax_1 = CEnvCell::CEnvCell(eax);
00507227      
00507235      this->before_sky_cell = eax_1;
00507238      class CEnvCell* eax_2 = operator new(0x148);
00507242      class CEnvCell* eax_3;
00507242      
00507242      if (eax_2 == 0)
0050724d          eax_3 = nullptr;
00507242      else
00507246          eax_3 = CEnvCell::CEnvCell(eax_2);
00507246      
00507259      this->after_sky_cell = eax_3;
0050725c      void* var_4;
0050725c      PStringBase<char>::PStringBase<char>(&var_4, "Number of seconds to adjust Time…");
0050726a      class PStringBase<char> var_8;
0050726a      PStringBase<char>::PStringBase<char>(&var_8, "GameTime.TimeZeroDelta");
00507288      GlobalRegistry::RegisterVariableInternal(&GameSky::s_timeAdjustment, GRVDataType_Float64, &var_8, &var_4, GameSky::OnTimeAdjustment, 0, nullptr, nullptr);
00507297      int32_t* edi_1 = (var_8 - 0x14);
00507297      
005072a9      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
005072b1          **(uint32_t**)edi_1(1);
005072b1      
005072b7      int32_t* edi_3 = ((char*)var_4 - 0x14);
005072b7      
005072c7      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
005072cf          **(uint32_t**)edi_3(1);
005071f0  }

005072da                                                                                90 90 90 90 90 90                            ......

005072e0  void __fastcall GameSky::~GameSky(class GameSky* this)

005072e0  {
005072e0      class GameSky* this_1 = this;
005072ee      PStringBase<char>::PStringBase<char>(&this_1, "GameTime.TimeZeroDelta");
005072f8      GlobalRegistry::UnregisterVariable(&this_1);
00507301      void* __offset(GameSky, -0x14) edi_1 = ((char*)this_1 - 0x14);
00507301      
00507317      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0050731f          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0050731f      
00507324      int32_t i = 0;
00507324      
00507328      if (this->sky_obj.m_num > 0)
00507328      {
00507368          do
00507368          {
00507333              class CPhysicsObj* ecx_3 = this->sky_obj.m_data[i];
00507333              
00507338              if (ecx_3 != 0)
00507338              {
00507341                  class CEnvCell* var_10_2;
00507341                  
00507341                  if ((this->property_array.m_data[i] & 1) == 0)
0050734c                      var_10_2 = this->before_sky_cell;
00507341                  else
00507346                      var_10_2 = this->after_sky_cell;
00507346                  
0050734d                  CPhysicsObj::RemoveObjectFromSingleCell(ecx_3, var_10_2);
00507355                  int32_t* ecx_4 = this->sky_obj.m_data[i];
00507355                  
0050735a                  if (ecx_4 != 0)
00507360                      **(uint32_t**)ecx_4(1);
00507338              }
00507338              
00507365              i += 1;
00507368          } while (i < this->sky_obj.m_num);
00507328      }
00507328      
0050736a      class CEnvCell* before_sky_cell = this->before_sky_cell;
0050736a      
0050736f      if (before_sky_cell != 0)
00507371          before_sky_cell->vtable->__vecDelDtor(1);
00507371      
00507378      class CEnvCell* after_sky_cell = this->after_sky_cell;
00507378      
0050737d      if (after_sky_cell != 0)
0050737f          after_sky_cell->vtable->__vecDelDtor(1);
0050737f      
0050738a      operator delete[](this->property_array.m_data);
00507393      operator delete[](this->sky_obj.m_data);
00507398      class CelestialPosition* m_data = this->sky_obj_pos.m_data;
00507398      
0050739f      if (m_data != 0)
005073a5          operator delete[](((char*)m_data - 4));
005072e0  }

005073b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005073c0  void __fastcall GameSky::CreateDeletePhysicsObjects(class GameSky* this)

005073c0  {
005073c3      uint8_t LScape::weather_enabled_1 = LScape::weather_enabled;
005073d3      bool cond:0 = GameSky::s_weatherEnabled != LScape::weather_enabled_1;
005073d5      GameSky::s_weatherEnabled = LScape::weather_enabled_1;
005073da      uint32_t m_num = this->sky_obj_pos.m_num;
005073dd      uint32_t m_num_1 = this->sky_obj.m_num;
005073e5      bool cond:2 = m_num <= m_num_1;
005073e8      uint32_t m_num_2 = m_num;
005073e8      
005073ec      if (m_num < m_num_1)
005073ec      {
005073ee          uint32_t m_num_3 = m_num;
005073ee          
00507433          do
00507433          {
005073f3              class CPhysicsObj* ecx_1 = this->sky_obj.m_data[m_num_3];
005073f3              
005073f8              if (ecx_1 != 0)
005073f8              {
00507401                  class CEnvCell* var_24_1;
00507401                  
00507401                  if ((this->property_array.m_data[m_num_3] & 1) == 0)
0050740c                      var_24_1 = this->before_sky_cell;
00507401                  else
00507406                      var_24_1 = this->after_sky_cell;
00507406                  
0050740d                  CPhysicsObj::RemoveObjectFromSingleCell(ecx_1, var_24_1);
00507415                  int32_t* ecx_2 = this->sky_obj.m_data[m_num_3];
00507415                  
0050741a                  if (ecx_2 != 0)
00507420                      **(uint32_t**)ecx_2(1);
00507420                  
00507422                  this->sky_obj.m_data[m_num_3] = 0;
0050742c                  m_num = m_num_2;
005073f8              }
005073f8              
00507430              m_num_3 += 1;
00507433          } while (m_num_3 < m_num_1);
00507433          
00507435          cond:2 = m_num <= m_num_1;
005073ec      }
005073ec      
00507437      if (!(cond:2))
00507437      {
00507443          AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->sky_obj.m_data, m_num);
00507452          AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->property_array, m_num_2);
00507457          m_num = m_num_2;
00507457          
0050745d          if (m_num_1 < m_num)
0050745d          {
00507461              uint32_t i_1 = (m_num - m_num_1);
005074c9              uint32_t i;
005074c9              
005074c9              do
005074c9              {
00507465                  uint32_t m_size = this->sky_obj.m_size;
0050746b                  int32_t eax_5;
0050746b                  
0050746b                  if (this->sky_obj.m_num >= m_size)
0050746b                  {
0050746f                      uint32_t eax_4;
0050746f                      
0050746f                      if (m_size <= 0)
00507475                          eax_4 = 8;
0050746f                      else
00507471                          eax_4 = (m_size * 2);
00507471                      
0050747d                      eax_5 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->sky_obj, eax_4);
0050746b                  }
0050746b                  
00507484                  if ((this->sky_obj.m_num < m_size || eax_5 != 0))
00507484                  {
0050743d                      this->sky_obj.m_data[this->sky_obj.m_num] = 0;
0050743d                      this->sky_obj.m_num += 1;
00507484                  }
00507484                  
00507495                  uint32_t m_size_1 = this->property_array.m_size;
0050749b                  int32_t eax_8;
0050749b                  
0050749b                  if (this->property_array.m_num >= m_size_1)
0050749b                  {
0050749f                      uint32_t eax_7;
0050749f                      
0050749f                      if (m_size_1 <= 0)
005074a5                          eax_7 = 8;
0050749f                      else
005074a1                          eax_7 = (m_size_1 * 2);
005074a1                      
005074ad                      eax_8 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->property_array, eax_7);
0050749b                  }
0050749b                  
005074b4                  if ((this->property_array.m_num < m_size_1 || eax_8 != 0))
005074b4                  {
0050744c                      this->property_array.m_data[this->property_array.m_num] = 0;
0050744c                      this->property_array.m_num += 1;
005074b4                  }
005074b4                  
005074c5                  i = i_1;
005074c5                  i_1 -= 1;
005074c9              } while (i != 1);
005074cb              m_num = m_num_2;
0050745d          }
00507437      }
00507437      
005074cf      int32_t ecx_9 = 0;
005074d3      int32_t var_8_1 = 0;
005074d3      
005074d7      if (m_num > 0)
005074d7      {
005074dd          void* ebx_2 = nullptr;
005074dd          
005075a0          do
005075a0          {
005074e0              class CPhysicsObj** m_data = this->sky_obj.m_data;
005074e3              int32_t* edi_2 = (ecx_9 << 2);
005074e3              
005074f1              if (*(uint32_t*)((char*)m_data + edi_2) == 0)
005074f1              {
0050755f              label_50755f:
0050755f                  *(uint32_t*)((char*)edi_2 + this->property_array.m_data) = *(uint32_t*)(&this->sky_obj_pos.m_data->properties + ebx_2);
00507568                  class CelestialPosition* m_data_1 = this->sky_obj_pos.m_data;
0050756c                  int32_t edi_3 = *(uint32_t*)((char*)edi_2 + this->property_array.m_data);
0050758b                  *(uint32_t*)(this->sky_obj.m_data + edi_2) = GameSky::MakeObject(this, *(uint32_t*)((char*)ebx_2 + m_data_1), (&m_data_1->tex_velocity + ebx_2), (edi_3 & 1), (edi_3 & 4));
005074f1              }
005074f1              else
005074f1              {
005074fa                  void __return;
005074fa                  class IDClass<_tagDataID,32,0>* eax_10 = CPhysicsObj::GetDataID(*(uint32_t*)((char*)m_data + edi_2), &__return);
00507503                  void* eax_11 = ((char*)ebx_2 + this->sky_obj_pos.m_data);
00507503                  
00507508                  if (*(uint32_t*)eax_11 != eax_10->id)
00507508                  {
00507529                  label_507529:
00507529                      class CEnvCell* var_24_7;
00507529                      class CPhysicsObj* ecx_16;
00507529                      
00507529                      if ((*(uint8_t*)((char*)edi_2 + this->property_array.m_data) & 1) == 0)
00507529                      {
0050753d                          ecx_16 = *(uint32_t*)((char*)edi_2 + this->sky_obj.m_data);
00507540                          var_24_7 = this->before_sky_cell;
00507529                      }
00507529                      else
00507529                      {
00507531                          ecx_16 = *(uint32_t*)((char*)edi_2 + this->sky_obj.m_data);
00507534                          var_24_7 = this->after_sky_cell;
00507529                      }
00507529                      
00507541                      CPhysicsObj::RemoveObjectFromSingleCell(ecx_16, var_24_7);
00507549                      int32_t* ecx_18 = *(uint32_t*)((char*)edi_2 + this->sky_obj.m_data);
00507549                      
0050754e                      if (ecx_18 != 0)
00507554                          **(uint32_t**)ecx_18(1);
00507554                      
0050754e                      goto label_50755f;
00507508                  }
00507508                  
0050750d                  int32_t ecx_14 = *(uint32_t*)((char*)edi_2 + this->property_array.m_data);
0050750d                  
00507513                  if (ecx_14 != *(uint32_t*)((char*)eax_11 + 0x28))
00507513                      goto label_507529;
00507513                  
00507515                  eax_11 = cond:0;
00507515                  
00507520                  if ((eax_11 != 0 && (ecx_14 & 4) != 0))
00507520                      goto label_507529;
005074f1              }
005074f1              
00507596              ecx_9 = (var_8_1 + 1);
00507597              ebx_2 += 0x2c;
0050759c              var_8_1 = ecx_9;
005075a0          } while (ecx_9 < m_num_2);
005074d7      }
005073c0  }

005075ae                                            90 90                                                                ..

005075b0  void __fastcall GameSky::UseTime(class GameSky* this)

005075b0  {
005075b0      int32_t ebp;
005075b0      int32_t var_4 = ebp;
005075bf      int32_t ecx = CRegionDesc::CalcDayGroup();
005075c4      class GameTime* GameTime::current_game_time_1 = GameTime::current_game_time;
005075cb      long double x87_r7;
005075cb      
005075cb      if (GameTime::current_game_time_1 == 0)
005075d2          x87_r7 = ((long double)0.0);
005075cb      else
005075cd          x87_r7 = ((long double)GameTime::current_game_time_1->present_time_of_day);
005075cd      
005075d9      int32_t var_68 = ecx;
005075d9      
005075e7      if (CRegionDesc::GetSky(((float)x87_r7), this) != 0)
005075e7      {
005075ef          GameSky::CreateDeletePhysicsObjects(this);
005075f4          uint32_t m_num = this->sky_obj_pos.m_num;
005075f7          int32_t edi_1 = 0;
005075f7          
005075fb          if (m_num > 0)
005075fb          {
00507601              void* ebx_1 = nullptr;
00507601              
00507752              do
00507752              {
0050760a                  if (this->sky_obj.m_data[edi_1] != 0)
0050760a                  {
00507610                      class CelestialPosition* m_data_1 = this->sky_obj_pos.m_data;
00507612                      float edx_1 = *(uint32_t*)(&m_data_1->heading + ebx_1);
00507619                      float eax_3 = *(uint32_t*)(&m_data_1->rotation + ebx_1);
00507628                      int32_t var_48 = 0x3f800000;
00507630                      int32_t var_44_1 = 0;
00507638                      int32_t var_40_1 = 0;
00507640                      int32_t var_3c_1 = 0;
00507648                      int32_t var_14_1 = 0;
00507650                      int32_t var_10_1 = 0;
00507658                      int32_t var_c_1 = 0;
00507660                      Frame::cache(&var_48);
00507660                      
0050766c                      if ((this->property_array.m_data[edi_1] & 4) != 0)
0050766c                      {
00507673                          class AC1Legacy::Vector3* eax_5 = &*(uint32_t*)this->sky_obj.m_data->m_position.frame.m_fOrigin;
0050767a                          float x = eax_5->x;
00507681                          float y = eax_5->y;
00507688                          float z = eax_5->z;
0050766c                      }
0050766c                      
0050769d                      GameSky::CalcFrame(this, &var_48, edx_1, eax_3);
005076ad                      CPhysicsObj::set_frame(this->sky_obj.m_data[edi_1], &var_48);
005076b2                      class CelestialPosition* m_data = this->sky_obj_pos.m_data;
005076b4                      long double x87_r7_1 = ((long double)*(uint32_t*)(&m_data->luminosity + ebx_1));
005076b8                      void* ecx_8 = (&m_data->luminosity + ebx_1);
005076bc                      long double temp0_1 = ((long double)0f);
005076bc                      (x87_r7_1 - temp0_1);
005076c2                      m_data = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
005076c2                      
005076c7                      if ((*(uint8_t*)((char*)m_data)[1] & 0x41) == 0)
005076c7                      {
005076cb                          int32_t var_64_3 = 0;
005076d5                          void* var_6c_2 = ecx_8;
005076e1                          CPhysicsObj::SetLuminosity(this->sky_obj.m_data[edi_1], 0f, ((float)(((long double)*(uint32_t*)ecx_8) * ((long double)0.00999999978f))), 0f);
005076c7                      }
005076c7                      
005076e6                      class CelestialPosition* m_data_3 = this->sky_obj_pos.m_data;
005076e8                      long double x87_r7_4 = ((long double)*(uint32_t*)(&m_data_3->max_bright + ebx_1));
005076f0                      long double temp1_1 = ((long double)0f);
005076f0                      (x87_r7_4 - temp1_1);
005076f6                      m_data = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005076f6                      
005076fb                      if ((*(uint8_t*)((char*)m_data)[1] & 0x41) == 0)
005076fb                      {
00507708                          int32_t var_64_4 = 0;
0050770c                          void* var_6c_4 = (&m_data_3->max_bright + ebx_1);
00507715                          CPhysicsObj::SetDiffusion(this->sky_obj.m_data[edi_1], 0f, ((float)(((long double)*(uint32_t*)(&m_data_3->max_bright + ebx_1)) * ((long double)0.00999999978f))), 0f);
005076fb                      }
005076fb                      
0050771a                      class CelestialPosition* m_data_2 = this->sky_obj_pos.m_data;
0050771c                      long double x87_r7_7 = ((long double)*(uint32_t*)(&m_data_2->transparent + ebx_1));
00507724                      long double temp2_1 = ((long double)0f);
00507724                      (x87_r7_7 - temp2_1);
0050772a                      m_data = ((((x87_r7_7 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050772a                      
0050772f                      if ((*(uint8_t*)((char*)m_data)[1] & 1) == 0)
0050772f                      {
0050773c                          int32_t var_64_5 = 0;
00507740                          void* var_6c_6 = (&m_data_2->transparent + ebx_1);
00507747                          CPhysicsObj::SetTranslucency(this->sky_obj.m_data[edi_1], ((float)(((long double)*(uint32_t*)(&m_data_2->transparent + ebx_1)) * ((long double)0.00999999978f))), 0f);
0050772f                      }
0050760a                  }
0050760a                  
0050774c                  edi_1 += 1;
0050774d                  ebx_1 += 0x2c;
00507752              } while (edi_1 < m_num);
005075fb          }
005075e7      }
005075e7      
005075ba      var_4;
005075b0  }


00507760  void __fastcall GameSky::SetInactive(class GameSky* this)

00507760  {
00507763      class CelestialPosition* m_data = this->sky_obj_pos.m_data;
00507767      this->sky_obj_pos.m_num = 0;
0050776e      this->sky_obj_pos.m_size = 0;
0050776e      
00507775      if (m_data != 0)
0050777b          operator delete[](((char*)m_data - 4));
0050777b      
00507783      this->sky_obj_pos.m_data = 0;
0050778c      /* tailcall */
0050778c      return GameSky::CreateDeletePhysicsObjects(this);
00507760  }

00507791                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005077a0  void __thiscall DArray<CPhysicsObj *>::grow(class DArray<CPhysicsObj *>* this, uint32_t arg2)

005077a0  {
005077ab      if (arg2 <= this->sizeOf)
005077ab      {
005077ae          DArray<CPhysicsObj *>::shrink(this, arg2);
005077b5          return;
005077ab      }
005077ab      
005077c1      void* eax_1 = operator new[]((arg2 << 2));
005077ce      int32_t i = 0;
005077ce      
005077d2      if (this->sizeOf > 0)
005077d2      {
005077e2          do
005077e2          {
005077d9              *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
005077df              i += 1;
005077e2          } while (i < this->sizeOf);
005077d2      }
005077d2      
005077e7      operator delete[](this->data);
005077ef      this->data = eax_1;
005077f2      this->sizeOf = arg2;
005077a0  }

005077fa                                                                                90 90 90 90 90 90                            ......

00507800  void* __thiscall AC1Legacy::PQueueArray<double>::`scalar deleting destructor'(class AC1Legacy::PQueueArray<double>* this, uint32_t arg2)

00507800  {
00507803      class AC1Legacy::PQueueArray<double>::PQueueNode* A = this->A;
00507807      this->vtable = 0x7c66a4;
0050780d      operator delete[](A);
0050780d      
0050781b      if ((arg2 & 1) != 0)
0050781e          operator delete(this);
0050781e      
00507829      return this;
00507800  }

0050782c                                      90 90 90 90                                                              ....

00507830  void __thiscall DArray<CPhysicsObj *>::shrink(class DArray<CPhysicsObj *>* this, uint32_t arg2)

00507830  {
0050783d      if (arg2 > this->sizeOf)
0050783d      {
00507840          DArray<CPhysicsObj *>::grow(this, arg2);
00507847          return;
0050783d      }
0050783d      
0050784c      if (arg2 != 0)
0050784c      {
00507869          void* eax_1 = operator new[]((arg2 << 2));
00507873          int32_t i = 0;
00507877          this->sizeOf = arg2;
00507877          
0050787a          if (arg2 > 0)
0050787a          {
0050788e              do
0050788e              {
00507885                  *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
0050788b                  i += 1;
0050788e              } while (i < this->sizeOf);
0050787a          }
0050787a          
00507893          operator delete[](this->data);
0050789b          this->data = eax_1;
0050784c      }
0050784c      else
0050784c      {
0050784e          class CPhysicsObj** data = this->data;
00507851          this->sizeOf = arg2;
00507854          operator delete[](data);
0050785c          this->data = arg2;
0050784c      }
0050784c      
005078a1      if (this->next_available > arg2)
005078a3          this->next_available = arg2;
00507830  }

005078ab                                   90 90 90 90 90                                                             .....

005078b0  class TResult* __thiscall CObjectMaint::QueryInterface(class CObjectMaint* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

005078b0  {
005078c3      int32_t* key;
005078c3      
005078c3      if ((1 & (*(uint8_t*)$S111)) != 0)
00507901          key = Offsets[0].key;
005078c3      else
005078c3      {
005078cd          key = &CObjectMaint_InterfaceType;
005078d2          $S111 |= 1;
005078d8          Offsets[0].key = 0x7c65c8;
005078dd          Offsets[0].ofs = 0;
005078e3          Offsets[1].key = 0x7c6690;
005078ed          Offsets[1].ofs = 0;
005078f3          Offsets[2].key = 0;
005078f9          Offsets[2].ofs = 0;
005078c3      }
005078c3      
00507908      void* edx_3 = &Offsets;
00507908      
0050790d      while (key != 0)
0050790d      {
0050792f          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0050792f          {
00507952              if (arg4 != 0)
00507952              {
00507954                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0050795e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
00507961                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
00507952              }
00507952              
0050796a              __return->m_val = 0;
0050796d              return __return;
0050792f          }
0050792f          
00507931          key = *(uint32_t*)((char*)edx_3 + 8);
00507934          edx_3 += 8;
0050790d      }
0050790d      
00507942      __return->m_val = 0x80004002;
00507949      return __return;
005078b0  }


00507970  class CPhysicsObj* __thiscall CLostCell::remove_object(class CLostCell* this, class CPhysicsObj* arg2)

00507970  {
00507971      uint32_t num_objects = this->num_objects;
00507976      int32_t i = 0;
00507976      
0050797b      if (num_objects > 0)
0050797b      {
0050797d          class CPhysicsObj** data = this->objects.data;
00507984          class CPhysicsObj** data_1 = data;
00507984          
00507993          do
00507993          {
00507988              if (*(uint32_t*)data_1 == arg2)
00507988              {
005079a1                  this->num_objects = (num_objects - 1);
005079a7                  data[i] = data[(num_objects - 1)];
005079ae                  return arg2;
00507988              }
00507988              
0050798d              i += 1;
0050798e              data_1 = &data_1[1];
00507993          } while (i < this->num_objects);
0050797b      }
0050797b      
0050799b      return 0;
00507970  }

005079b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005079c0  int32_t __thiscall AC1Legacy::PQueueArray<double>::RemoveMin(class AC1Legacy::PQueueArray<double>* this, double* arg2, void** arg3)

005079c0  {
005079c5      if (this->curNumNodes > 0)
005079c5      {
005079c7          class AC1Legacy::PQueueArray<double>::PQueueNode* A = this->A;
005079c7          
005079cc          if (A != 0)
005079cc          {
005079d5              *(uint32_t*)arg2 = A->key;
005079da              *(uint32_t*)((char*)arg2 + 4) = *(uint32_t*)((char*)A->key)[4];
005079e7              *(uint32_t*)arg3 = this->A->data;
005079e9              int32_t curNumNodes = this->curNumNodes;
005079e9              
005079ef              if (curNumNodes <= 1)
005079ef              {
00507a25                  this->curNumNodes = 0;
00507a2c                  AC1Legacy::PQueueArray<double>::_Heapify(this, 1);
00507a37                  return 1;
005079ef              }
005079ef              
005079f1              class AC1Legacy::PQueueArray<double>::PQueueNode* A_1 = this->A;
005079f5              this->curNumNodes = (curNumNodes - 1);
005079fb              void* eax_4 = &A_1[(curNumNodes - 1)];
005079ff              A_1->key = *(uint32_t*)eax_4;
00507a04              *(uint32_t*)((char*)A_1->key)[4] = *(uint32_t*)((char*)eax_4 + 4);
00507a0a              A_1->data = *(uint32_t*)((char*)eax_4 + 8);
00507a12              *(int32_t*)((char*)A_1 + 0xc) = *(uint32_t*)((char*)eax_4 + 0xc);
00507a15              AC1Legacy::PQueueArray<double>::_Heapify(this, 1);
00507a20              return 1;
005079cc          }
005079c5      }
005079c5      
00507a3c      return 0;
005079c0  }

00507a3f                                                                                               90                                 .

00507a40  void* __thiscall IntrusiveHashTable<unsigned long,CLostCell *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,CLostCell *,0>* this, uint32_t arg2)

00507a40  {
00507a43      class CLostCell** m_buckets = this->m_buckets;
00507a4b      this->vtable = &IntrusiveHashTable<unsigned long,class CLostCell*,0>::`vftable';
00507a4b      
00507a51      if (m_buckets != &this->m_aInplaceBuckets)
00507a54          operator delete[](m_buckets);
00507a54      
00507a5e      this->m_buckets = nullptr;
00507a61      this->m_firstInterestingBucket = nullptr;
00507a64      this->m_numBuckets = 0;
00507a67      this->m_numElements = 0;
00507a67      
00507a6f      if ((arg2 & 1) != 0)
00507a72          operator delete(this);
00507a72      
00507a7d      return this;
00507a40  }


00507a80  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,double> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,double> *,0>* this, uint32_t arg2)

00507a80  {
00507a83      class HashTableData<unsigned long,double>** m_buckets = this->m_buckets;
00507a8b      this->vtable = 0x7c66ac;
00507a8b      
00507a91      if (m_buckets != &this->m_aInplaceBuckets)
00507a94          operator delete[](m_buckets);
00507a94      
00507a9e      this->m_buckets = nullptr;
00507aa1      this->m_firstInterestingBucket = nullptr;
00507aa4      this->m_numBuckets = 0;
00507aa7      this->m_numElements = 0;
00507aa7      
00507aaf      if ((arg2 & 1) != 0)
00507ab2          operator delete(this);
00507ab2      
00507abd      return this;
00507a80  }


00507ac0  class HashBaseData<unsigned long>* __thiscall HashBase<unsigned long>::remove(class HashBase<unsigned long>* this, uint32_t arg2)

00507ac0  {
00507ad8      void* ecx_3 = &this->buckets[(((arg2 >> ((int8_t)this->key_shift)) ^ arg2) & this->table_mask)];
00507adb      void* eax_4 = *(uint32_t*)ecx_3;
00507adb      
00507adf      if (eax_4 != 0)
00507adf      {
00507ae4          if (*(uint32_t*)((char*)eax_4 + 8) == arg2)
00507ae4          {
00507ae9              *(uint32_t*)ecx_3 = *(uint32_t*)((char*)eax_4 + 4);
00507aec              return eax_4;
00507ae4          }
00507ae4          
00507af4          while (*(uint32_t*)((char*)eax_4 + 4) != 0)
00507af4          {
00507af6              void* ecx_5 = *(uint32_t*)((char*)eax_4 + 4);
00507af6              
00507afc              if (*(uint32_t*)((char*)ecx_5 + 8) == arg2)
00507afc              {
00507b0d                  void* ecx_7 = *(uint32_t*)((char*)eax_4 + 4);
00507b13                  *(uint32_t*)((char*)eax_4 + 4) = *(uint32_t*)((char*)ecx_7 + 4);
00507b19                  return ecx_7;
00507afc              }
00507afc              
00507afe              eax_4 = ecx_5;
00507af4          }
00507adf      }
00507adf      
00507b0a      return 0;
00507ac0  }

00507b1c                                                                                      90 90 90 90                              ....

00507b20  class TResult __thiscall InterfacePtr<class Interface>::_QueryInterface(InterfacePtr<class Interface>* this, class CObjectMaint* arg2)

00507b20  {
00507b20      InterfacePtr<class Interface>* this_1 = this;
00507b25      int32_t* ecx = arg_8;
00507b25      
00507b2e      if (ecx == 0)
00507b2e      {
00507b8c          int32_t* ecx_4 = *(uint32_t*)this;
00507b8c          
00507b90          if (ecx_4 != 0)
00507b90          {
00507b92              *(uint32_t*)this = 0;
00507b96              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
00507b99              *(uint32_t*)((char*)this + 4) = 0;
00507b90          }
00507b90          
00507ba5          arg2->vtable = 0x80004002;
00507bab          return arg2;
00507b2e      }
00507b2e      
00507b30      int32_t eax_1 = *(uint32_t*)ecx;
00507b41      arg_8 = nullptr;
00507b48      int32_t edi = *(uint32_t*)*(uint32_t*)(eax_1 + 0xc)(&this_1, 0x7c6690, &arg_8);
00507b4c      int32_t* ecx_1 = *(uint32_t*)this;
00507b4c      
00507b4e      if (edi < 0)
00507b4e      {
00507b52          if (ecx_1 != 0)
00507b56              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
00507b56          
00507b5d          *(uint32_t*)this = 0;
00507b5f          *(uint32_t*)((char*)this + 4) = 0;
00507b62          arg2->vtable = edi;
00507b68          return arg2;
00507b4e      }
00507b4e      
00507b6e      int32_t* ebx = arg_8;
00507b6e      
00507b72      if (ecx_1 != 0)
00507b76          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
00507b76      
00507b7d      *(uint32_t*)this = ebx;
00507b7f      *(uint32_t*)((char*)this + 4) = 0;
00507b83      arg2->vtable = edi;
00507b89      return arg2;
00507b20  }

00507bae                                            90 90                                                                ..

00507bb0  void __stdcall CObjectMaint::ReleaseObjCell(class CObjectMaint* this @ ecx, class CObjCell* arg2)

00507bb0  {
00507bb7      int32_t esi = 0;
00507bb9      int32_t edi = 0;
00507bb9      
00507bbd      if (((*(uint8_t*)$S112) & 1) == 0)
00507bbd      {
00507bcd          $S112 |= 1;
00507bd3          object_list.data = 0;
00507bd9          object_list.sizeOf = 0;
00507bdf          object_list.next_available = 0;
00507be5          object_list.blocksize = 0x80;
00507bef          atexit($E113);
00507bbd      }
00507bbd      
00507c03      int32_t i = 0;
00507c03      
00507c07      if (arg2->num_objects > 0)
00507c07      {
00507c67          do
00507c67          {
00507c16              void* esi_1 = arg2->object_list.data[i];
00507c16              
00507c27              if (((*(uint8_t*)((char*)esi_1 + 0xa8) & 1) == 0 && *(uint32_t*)((char*)esi_1 + 0x40) == 0))
00507c27              {
00507c2f                  if (edi >= object_list.sizeOf)
00507c3f                      DArray<CPhysicsObj *>::grow(&object_list, (object_list.blocksize + edi));
00507c3f                  
00507c44                  object_list.data[edi] = esi_1;
00507c44                  
00507c53                  if (edi >= object_list.next_available)
00507c58                      object_list.next_available = (edi + 1);
00507c58                  
00507c5d                  edi += 1;
00507c27              }
00507c27              
00507c64              i += 1;
00507c67          } while (i < arg2->num_objects);
00507c67          
00507c69          esi = 0;
00507c07      }
00507c07      
00507c6f      if (edi > 0)
00507c6f      {
00507c82          do
00507c82          {
00507c7a              CPhysicsObj::leave_visibility(object_list.data[esi]);
00507c7f              esi += 1;
00507c82          } while (esi < edi);
00507c6f      }
00507bb0  }

00507c89                             90 90 90 90 90 90 90                                                           .......

00507c90  void __fastcall CObjectMaint::OnShutdown(class CObjectMaint* this)

00507c90  {
00507c93      class CObjectMaint* __return_1;
00507c93      class CObjectMaint* __return = __return_1;
00507c94      class CObjectMaint* this_1 = this;
00507c9e      int32_t var_8 = 0;
00507ca6      int32_t var_4 = 0;
00507cae      int32_t* var_c;
00507cae      InterfacePtr<class Interface>::_QueryInterface(&var_8, &var_c);
00507cb3      int32_t* esi = var_c;
00507ccb      InterfaceSystem::UnregisterClassA(InterfaceSystem::GetInstance(), &__return, &CObjectMaint_ClassType, esi, nullptr);
00507ccb      class CObjectMaint** esp = &this_1;
00507ccb      
00507cd2      if (esi != 0)
00507cd2      {
00507cd8          *(uint32_t*)(*(uint32_t*)esi + 0x14)();
00507cd8          esp = &__return;
00507cd2      }
00507cd2      
00507cdb      *(uint32_t*)esp;
00507c90  }


00507ce0  void __thiscall CObjectMaint::AddObject(class CObjectMaint* this, class CPhysicsObj* arg2)

00507ce0  {
00507cee      uint32_t id = arg2->id;
00507cfd      uint32_t eax_3 = (((id >> ((int8_t)this->object_table.key_shift)) ^ id) & this->object_table.table_mask);
00507d08      arg2->hash_next = this->object_table.buckets[eax_3];
00507d0b      this->object_table.buckets[eax_3] = arg2;
00507ce0  }

00507d19                                                                             90 90 90 90 90 90 90                           .......

00507d20  void __thiscall CObjectMaint::AddWeenieObject(class CObjectMaint* this, class CWeenieObject* arg2)

00507d20  {
00507d2e      uint32_t id = arg2->id;
00507d3d      uint32_t eax_3 = (((id >> ((int8_t)this->weenie_object_table.key_shift)) ^ id) & this->weenie_object_table.table_mask);
00507d48      arg2->hash_next = this->weenie_object_table.buckets[eax_3];
00507d4b      this->weenie_object_table.buckets[eax_3] = arg2;
00507d20  }

00507d59                                                                             90 90 90 90 90 90 90                           .......

00507d60  class CPhysicsObj* __thiscall CObjectMaint::GetObjectA(class CObjectMaint* this, uint32_t arg2)

00507d60  {
00507d87      for (void* const i = this->object_table.buckets[(((arg2 >> ((int8_t)this->object_table.key_shift)) ^ arg2) & this->object_table.table_mask)]; i != 0; i = *(uint32_t*)((char*)i + 4))
00507d87      {
00507d93          if (arg2 == *(uint32_t*)((char*)i + 8))
00507d9e              return i;
00507d87      }
00507d87      
00507d9c      return nullptr;
00507d60  }

00507da1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00507db0  class CWeenieObject* __thiscall CObjectMaint::GetWeenieObject(class CObjectMaint* this, uint32_t arg2)

00507db0  {
00507dd7      for (void* const i = this->weenie_object_table.buckets[(((arg2 >> ((int8_t)this->weenie_object_table.key_shift)) ^ arg2) & this->weenie_object_table.table_mask)]; i != 0; i = *(uint32_t*)((char*)i + 4))
00507dd7      {
00507de3          if (arg2 == *(uint32_t*)((char*)i + 8))
00507dee              return i;
00507dd7      }
00507dd7      
00507dec      return nullptr;
00507db0  }

00507df1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00507e00  class CObjectInventory* __thiscall CObjectMaint::GetObjectInventory(class CObjectMaint* this, uint32_t arg2)

00507e00  {
00507e27      for (void* const i = this->object_inventory_table.buckets[(((arg2 >> ((int8_t)this->object_inventory_table.key_shift)) ^ arg2) & this->object_inventory_table.table_mask)]; i != 0; i = *(uint32_t*)((char*)i + 4))
00507e27      {
00507e33          if (arg2 == *(uint32_t*)((char*)i + 8))
00507e3e              return i;
00507e27      }
00507e27      
00507e3c      return nullptr;
00507e00  }

00507e41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00507e50  void __thiscall CObjectMaint::UnRegisterAllNoticeHandlers(class CObjectMaint* this, class NoticeHandler* arg2)

00507e50  {
00507e55      int32_t edi = 0;
00507e57      class LongHash<CWeenieObject>* ebx = &this->weenie_object_table;
00507e5f      class LongHash<CWeenieObject>* var_14 = ebx;
00507e63      int32_t var_8 = 0;
00507e67      int32_t var_10 = 0;
00507e67      
00507e6b      if (ebx != 0)
00507e6b      {
00507e72          class HashBaseData<unsigned long>* hash_next = *(uint32_t*)ebx->buckets;
00507e76          int32_t i = 0;
00507e76          
00507e7e          if (hash_next != 0)
00507e7e              goto label_507ec9;
00507e7e          
00507e84          HashBaseIter<unsigned long>::Next(&var_14);
00507e84          
00507e8d          if (i == 0)
00507e8d          {
00507e93              edi = var_10;
00507e97              ebx = var_14;
00507ec9          label_507ec9:
00507ec9              
00507ec9              do
00507ec9              {
00507ea7                  *(uint32_t*)(*(int32_t*)((char*)hash_next + 0xc) + 0xc)(arg2);
00507ea7                  
00507eaf                  for (hash_next = hash_next->hash_next; hash_next == 0; hash_next = ebx->buckets[edi])
00507eaf                  {
00507eb4                      edi += 1;
00507eb4                      
00507eb7                      if (edi >= ebx->table_size)
00507ed2                          return;
00507eaf                  }
00507ec9              } while (i == 0);
00507e8d          }
00507e6b      }
00507e50  }

00507ed5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00507ee0  class CLostCell* __thiscall IntrusiveHashTable<unsigned long,CLostCell *,0>::find(class IntrusiveHashTable<unsigned long,CLostCell *,0> const* this, uint32_t const* arg2)

00507ee0  {
00507ee5      uint32_t const i = *(uint32_t*)arg2;
00507ef4      int32_t* result = this->m_buckets[(COMBINE(0, i) % this->m_numBuckets)];
00507ef4      
00507ef8      if (result != 0)
00507ef8      {
00507f02          while (*(uint32_t*)result != i)
00507f02          {
00507f04              result = result[1];
00507f04              
00507f09              if (result == 0)
00507f09                  break;
00507f02          }
00507ef8      }
00507ef8      
00507f0c      return result;
00507ee0  }

00507f0f                                               90                                                                 .

00507f10  void __fastcall LongNIValHash<LongHash<MotionData> *>::destroy_contents(class LongNIValHash<LongHash<MotionData> *>* this)

00507f10  {
00507f15      class LongNIValHash<LongHash<MotionData> *>* this_1 = this;
00507f19      int32_t var_8 = 0;
00507f21      int32_t var_10 = 0;
00507f21      
00507f29      if (this != 0)
00507f29      {
00507f2e          class HashBaseData<unsigned long>* eax_2 = *(uint32_t*)this->buckets;
00507f32          int32_t i = 0;
00507f3a          class HashBaseData<unsigned long>* var_c_1 = eax_2;
00507f3a          
00507f3e          if (eax_2 == 0)
00507f44              HashBaseIter<unsigned long>::Next(&this_1);
00507f44          
00507f4f          if ((eax_2 != 0 || i == 0))
00507f4f          {
00507f60              do
00507f55                  HashBaseIter<unsigned long>::DeleteCurrent(&this_1);
00507f60               while (i == 0);
00507f4f          }
00507f29      }
00507f10  }

00507f66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00507f70  int32_t __thiscall CObjectMaint::GetObjectA(class CObjectMaint* this, uint32_t arg2, class CPhysicsObj** arg3, class CWeenieObject** arg4)

00507f70  {
00507f86      *(uint32_t*)arg3 = CObjectMaint::GetObjectA(this, arg2);
00507f88      class CWeenieObject* result = CObjectMaint::GetWeenieObject(this, arg2);
00507f92      *(uint32_t*)arg4 = result;
00507f92      
00507f9d      if ((*(uint32_t*)arg3 == 0 && result == 0))
00507f9f          return result;
00507f9f      
00507fa7      return 1;
00507f70  }

00507faa                                90 90 90 90 90 90                                                            ......

00507fb0  void __thiscall CObjectMaint::RemoveFromLostCell(class CObjectMaint* this, class CPhysicsObj* arg2)

00507fb0  {
00507fb1      class CPhysicsObj* esi = arg2;
00507fb1      
00507fc4      if ((esi->cell == 0 && esi->parent == 0))
00507fc4      {
00507fd1          arg2 = esi->m_position.objcell_id;
00507fd5          class CLostCell* eax_3 = IntrusiveHashTable<unsigned long,CLostCell *,0>::find(&this->lost_cell_table, &arg2);
00507fd5          
00507fdc          if (eax_3 != 0)
00507fe1              CLostCell::remove_object(eax_3, esi);
00507fc4      }
00507fb0  }

00507fea                                90 90 90 90 90 90                                                            ......

00507ff0  void __thiscall IntrusiveHashTable<unsigned long,CLostCell *,0>::IntrusiveHashTable<unsigned long,CLostCell *,0>(class IntrusiveHashTable<unsigned long,CLostCell *,0>* this, uint32_t arg2)

00507ff0  {
00507ffb      arg2 = arg2;
00507fff      uint8_t edx = ((int8_t)arg2);
00508003      this->m_buckets = nullptr;
00508006      this->m_firstInterestingBucket = nullptr;
00508009      this->m_numBuckets = 0;
0050800c      this->m_numElements = 0;
00508010      this->vtable = &IntrusiveHashTable<unsigned long,class CLostCell*,0>::`vftable';
00508016      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00508029      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00508029      
00508033      if (eax == bucketSizesEnd_1)
00508035          eax -= 4;
00508035      
00508038      uint32_t eax_1 = *(uint32_t*)eax;
0050803d      this->m_numBuckets = eax_1;
0050803d      
00508040      if (eax_1 > 0x17)
00508056          this->m_buckets = operator new[]((eax_1 << 2));
00508040      else
00508045          this->m_buckets = &this->m_aInplaceBuckets;
00508045      
0050805c      class CLostCell** m_buckets = this->m_buckets;
0050805f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00508065      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00508076      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00507ff0  }

0050807f                                                                                               90                                 .

00508080  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,double> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,double> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,double> *,0>* this, uint32_t arg2)

00508080  {
0050808b      arg2 = arg2;
0050808f      uint8_t edx = ((int8_t)arg2);
00508093      this->m_buckets = nullptr;
00508096      this->m_firstInterestingBucket = nullptr;
00508099      this->m_numBuckets = 0;
0050809c      this->m_numElements = 0;
005080a0      this->vtable = 0x7c66ac;
005080a6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005080b9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
005080b9      
005080c3      if (eax == bucketSizesEnd_1)
005080c5          eax -= 4;
005080c5      
005080c8      uint32_t eax_1 = *(uint32_t*)eax;
005080cd      this->m_numBuckets = eax_1;
005080cd      
005080d0      if (eax_1 > 0x17)
005080e6          this->m_buckets = operator new[]((eax_1 << 2));
005080d0      else
005080d5          this->m_buckets = &this->m_aInplaceBuckets;
005080d5      
005080ec      class HashTableData<unsigned long,double>** m_buckets = this->m_buckets;
005080ef      uint32_t ecx_3 = (this->m_numBuckets << 2);
005080f5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00508106      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00508080  }

0050810f                                               90                                                                 .

00508110  void __fastcall IntrusiveHashTable<unsigned long,CLostCell *,0>::delete_contents(class IntrusiveHashTable<unsigned long,CLostCell *,0>* this)

00508110  {
00508118      if (this->m_numElements != 0)
00508118      {
0050811e          void* edi;
0050811e          void* var_8_1 = edi;
0050811e          
00508198          do
00508198          {
00508126              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0050812c              int32_t* m_firstInterestingBucket_2;
0050812c              
0050812c              if (this->m_firstInterestingBucket == ecx_1)
0050812c              {
00508142              label_508142:
00508142                  m_firstInterestingBucket_2 = nullptr;
00508144                  edi = nullptr;
0050812c              }
0050812c              else
0050812c              {
00508130                  while (true)
00508130                  {
00508130                      class CLostCell** m_firstInterestingBucket = this->m_firstInterestingBucket;
00508130                      
00508136                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00508136                      {
00508148                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0050814b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
0050814d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0050814d                          break;
00508136                      }
00508136                      
0050813d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0050813d                      
00508140                      if (&m_firstInterestingBucket[1] == ecx_1)
00508140                          goto label_508142;
00508130                  }
0050812c              }
0050812c              
0050814f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0050814f              
00508153              if (eax_3 == edi)
00508165                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00508153              else
00508153              {
0050815c                  void* ecx_2;
0050815c                  
0050815c                  do
0050815c                  {
00508155                      ecx_2 = eax_3;
00508157                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0050815c                  } while (eax_3 != edi);
0050815c                  
00508160                  if (ecx_2 != 0)
0050816c                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00508160                  else
00508165                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00508153              }
00508153              
00508175              this->m_numElements -= 1;
00508175              
00508178              if (edi != 0)
00508178              {
0050817e                  operator delete[](*(uint32_t*)((char*)edi + 0xc));
00508184                  *(uint32_t*)((char*)edi + 0xc) = 0;
0050818b                  operator delete(edi);
00508178              }
00508198          } while (this->m_numElements != 0);
00508118      }
00508110  }

0050819d                                                                                         90 90 90                               ...

005081a0  class CLostCell* __thiscall CObjectMaint::GetLostCell(class CObjectMaint* this, uint32_t arg2)

005081a0  {
005081b4      class HashTableData<unsigned long,ArchiveVersionRow>* edi = nullptr;
005081b4      
005081bd      for (int32_t* i = this->lost_cell_table.m_buckets[(COMBINE(0, arg2) % this->lost_cell_table.m_numBuckets)]; i != 0; i = i[1])
005081bd      {
005081c2          if (*(uint32_t*)i == arg2)
005081c2          {
005081cf              if (i != 0)
00508206                  return i;
00508206              
005081cf              break;
005081c2          }
005081bd      }
005081bd      
005081d3      void* eax_3 = operator new(0x1c);
005081d3      
005081dd      if (eax_3 != 0)
005081dd      {
005081df          *(uint32_t*)((char*)eax_3 + 4) = 0;
005081e2          *(uint32_t*)((char*)eax_3 + 8) = 0;
005081e5          *(uint32_t*)eax_3 = arg2;
005081e7          *(uint32_t*)((char*)eax_3 + 0xc) = 0;
005081ea          *(uint32_t*)((char*)eax_3 + 0x18) = 0;
005081ed          *(uint32_t*)((char*)eax_3 + 0x14) = 0;
005081f0          *(uint32_t*)((char*)eax_3 + 0x10) = 0x80;
005081f7          edi = eax_3;
005081dd      }
005081dd      
005081fc      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->lost_cell_table, edi);
00508201      return edi;
005081a0  }

00508209                             90 90 90 90 90 90 90                                                           .......

00508210  void __thiscall CObjectMaint::GotoLostCell(class CObjectMaint* this, class CPhysicsObj* arg2, uint32_t arg3)

00508210  {
0050821d      if (arg2->parent == 0)
0050821d      {
00508226          CPhysicsObj::set_cell_id(arg2, arg3);
00508231          class CLostCell* eax_3 = CObjectMaint::GetLostCell(this, arg2->m_position.objcell_id);
00508238          uint32_t num_objects = eax_3->num_objects;
00508238          
0050823e          if (num_objects >= eax_3->objects.sizeOf)
00508247              DArray<CPhysicsObj *>::grow(&eax_3->objects, (num_objects + 5));
00508247          
0050824c          uint32_t num_objects_1 = eax_3->num_objects;
0050824f          class CPhysicsObj** data = eax_3->objects.data;
00508255          eax_3->num_objects = (num_objects_1 + 1);
00508258          data[num_objects_1] = arg2;
0050821d      }
00508210  }


00508260  void __thiscall CObjectMaint::InitObjCell(class CObjectMaint* this, class CObjCell* arg2)

00508260  {
00508270      arg2 = arg2->m_DID.id;
00508274      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->lost_cell_table, &arg2);
00508274      
0050827d      if (eax != 0)
0050827d      {
00508283          int32_t i = 0;
00508283          
00508287          if (eax->dllist_next > 0)
00508287          {
005082a1              do
005082a1              {
00508296                  CPhysicsObj::reenter_visibility(*(uint32_t*)(eax->dllist_prev + (i << 2)));
0050829e                  i += 1;
005082a1              } while (i < eax->dllist_next);
00508287          }
00508287          
005082a3          eax->dllist_next = nullptr;
005082ae          operator delete[](eax->dllist_prev);
005082b4          eax->dllist_prev = nullptr;
005082bb          operator delete(eax);
0050827d      }
00508260  }

005082c8                          90 90 90 90 90 90 90 90                                                          ........

005082d0  uint8_t __thiscall HashTable<unsigned long,double,0>::add(class HashTable<unsigned long,double,0>* this, uint32_t const* arg2, double const* arg3)

005082d0  {
005082d6      void* eax = operator new(0x10);
005082e0      void* esi;
005082e0      
005082e0      if (eax == 0)
00508304          esi = nullptr;
005082e0      else
005082e0      {
005082ec          *(uint32_t*)eax = *(uint32_t*)arg2;
005082ee          *(uint32_t*)((char*)eax + 4) = 0;
005082f7          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
005082fd          *(uint32_t*)((char*)eax + 0xc) = *(uint32_t*)((char*)arg3 + 4);
00508300          esi = eax;
005082e0      }
005082e0      
00508311      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
0050832b          return 1;
0050832b      
00508315      if (esi != 0)
00508318          operator delete(esi);
00508318      
00508324      return 0;
005082d0  }

0050832e                                            90 90                                                                ..

00508330  void* __thiscall HashTable<unsigned long,double,0>::`scalar deleting destructor'(class HashTable<unsigned long,double,0>* this, uint32_t arg2)

00508330  {
00508339      this->vtable = 0x7c66b4;
0050833f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00508344      class HashTableData<unsigned long,double>** m_buckets = this->m_intrusiveTable.m_buckets;
00508334      this->m_intrusiveTable.vtable = 0x7c66ac;
00508334      
00508352      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00508355          operator delete[](m_buckets);
00508355      
00508334      this->m_intrusiveTable.m_buckets = nullptr;
00508334      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00508334      this->m_intrusiveTable.m_numBuckets = 0;
00508334      this->m_intrusiveTable.m_numElements = 0;
00508334      
00508370      if ((arg2 & 1) != 0)
00508373          operator delete(this);
00508373      
0050837f      return this;
00508330  }

00508382        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00508390  void __fastcall CObjectMaint::UpdateVisibleObjectList(class CObjectMaint* this)

00508390  {
0050839e      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->visible_object_table.m_intrusiveTable);
005083a3      int32_t edi = 0;
005083a5      class LongHash<CPhysicsObj>* ebp = &this->object_table;
005083ad      class LongHash<CPhysicsObj>* var_14 = ebp;
005083b1      int32_t var_8 = 0;
005083b5      int32_t var_10 = 0;
005083b5      
005083b9      if (ebp != 0)
005083b9      {
005083bf          class HashBaseData<unsigned long>* hash_next = *(uint32_t*)ebp->buckets;
005083c3          int32_t i = 0;
005083c3          
005083cb          if (hash_next != 0)
005083cb              goto label_508435;
005083cb          
005083d1          HashBaseIter<unsigned long>::Next(&var_14);
005083d1          
005083dc          if (i == 0)
005083dc          {
005083e2              edi = var_10;
005083e6              ebp = var_14;
00508435          label_508435:
00508435              
00508435              do
00508435              {
00508401                  if ((*(int32_t*)((char*)hash_next + 0x90) != 0 && (*(int32_t*)((char*)hash_next + 0xa8) & 1) == 0))
0050840d                      HashSet<unsigned long>::add(&this->visible_object_table, &hash_next->id);
0050840d                  
00508417                  for (hash_next = hash_next->hash_next; hash_next == 0; hash_next = ebp->buckets[edi])
00508417                  {
00508420                      edi += 1;
00508420                      
00508423                      if (edi >= ebp->table_size)
0050843e                          return;
00508417                  }
00508435              } while (i == 0);
005083dc          }
005083b9      }
00508390  }

0050843f                                                                                               90                                 .

00508440  void __fastcall CObjectMaint::RemoveObjectToBeDestroyed(class CObjectMaint* this, uint32_t arg2)

00508440  {
0050844b      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->destruction_object_table.m_intrusiveTable, &arg2);
0050844b      
00508452      if (eax != 0)
00508455          operator delete(eax);
00508440  }

0050845e                                                                                            90 90                                ..

00508460  void __thiscall CObjectMaint::DeleteObject(class CObjectMaint* this, class CPhysicsObj* arg2)

00508460  {
0050846b      CPhysicsObj::exit_world(arg2);
00508472      CPhysicsObj::leave_world(arg2);
00508484      HashBase<unsigned long>::remove(&this->object_table, arg2->id);
00508492      HashBase<unsigned long>::remove(&this->null_object_table.vtable, arg2->id);
0050849e      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_1 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->destruction_object_table.m_intrusiveTable, &arg2->id);
0050849e      
005084a5      if (eax_1 != 0)
005084a8          operator delete(eax_1);
005084a8      
005084b2      CPhysicsObj::unset_parent(arg2);
005084b9      CPhysicsObj::unparent_children(arg2);
005084be      arg2->vtable->__vecDelDtor(1);
00508460  }

005084cc                                      90 90 90 90                                                              ....

005084d0  int32_t __thiscall CObjectMaint::DeleteObject(class CObjectMaint* this, uint32_t arg2)

005084d0  {
005084d0      class CObjectMaint* this_1 = this;
005084f1      int32_t result = 1;
005084fd      class CPhysicsObj* hash_next = this->object_table.buckets[(((arg2 >> ((int8_t)this->object_table.key_shift)) ^ arg2) & this->object_table.table_mask)];
005084fd      
00508502      if (hash_next == 0)
00508502      {
00508510      label_508510:
00508510          hash_next = nullptr;
00508502      }
00508502      else
00508502      {
00508507          while (arg2 != hash_next->id)
00508507          {
00508509              hash_next = hash_next->hash_next;
00508509              
0050850e              if (hash_next == 0)
0050850e                  goto label_508510;
00508507          }
00508502      }
00508502      
00508514      if (hash_next != 0)
0050854c          CObjectMaint::DeleteObject(this, hash_next);
00508514      else
00508514      {
00508530          hash_next = this->null_object_table.buckets[(((arg2 >> ((int8_t)this->null_object_table.key_shift)) ^ arg2) & this->null_object_table.table_mask)];
00508530          
00508535          if (hash_next == 0)
00508535          {
00508543          label_508543:
00508543              hash_next = nullptr;
00508535          }
00508535          else
00508535          {
0050853a              while (arg2 != hash_next->id)
0050853a              {
0050853c                  hash_next = hash_next->hash_next;
0050853c                  
00508541                  if (hash_next == 0)
00508541                      goto label_508543;
0050853a              }
00508535          }
00508535          
00508547          if (hash_next == 0)
00508553              result = 0;
00508547          else
0050854c              CObjectMaint::DeleteObject(this, hash_next);
00508514      }
00508514      
0050857d      for (int32_t* i = this->weenie_object_table.buckets[(((arg2 >> ((int8_t)this->weenie_object_table.key_shift)) ^ arg2) & this->weenie_object_table.table_mask)]; i != 0; i = i[1])
0050857d      {
00508583          if (arg2 == i[2])
00508583          {
00508598              if (i == 0)
00508598                  break;
00508598              
0050859e              *(uint32_t*)(*(uint32_t*)i + 4)();
005085a7              HashBase<unsigned long>::remove(&this->weenie_object_table, i[2]);
005085b6              HashBase<unsigned long>::remove(&this->null_weenie_object_table, i[2]);
005085c1              **(uint32_t**)i(1);
005085cc              return result;
00508583          }
0050857d      }
0050857d      
00508593      return 0;
005084d0  }

005085cf                                               90                                                                 .

005085d0  void __fastcall CObjectMaint::CObjectMaint(class CObjectMaint* this)

005085d0  {
005085d3      int32_t ebx;
005085d3      int32_t var_14 = ebx;
005085d4      int32_t ebp;
005085d4      int32_t var_18 = ebp;
005085d5      int32_t esi;
005085d5      int32_t var_1c = esi;
005085d8      this->vtable = &CObjectMaint::`vftable';
005085df      class CObjectMaint* edi;
005085df      class CObjectMaint* var_20 = edi;
005085e0      this->vtable = 0x7c66b8;
005085e6      this->vtable = &CObjectMaint::`vftable';
005085f2      this->m_cTurbineRefCount.m_cRef = 1;
005085f5      this->m_cTurbineRefCount.vtable = 0x792b6c;
005085fc      class CObjectMaint* this_1 = 0x80;
00508604      this->is_active = 1;
00508607      IntrusiveHashTable<unsigned long,CLostCell *,0>::IntrusiveHashTable<unsigned long,CLostCell *,0>(&this->lost_cell_table, this_1);
0050860e      this_1 = 0x200;
00508613      this->object_table.vtable = 0x7c66b0;
0050861d      this->object_table.fPlacementNew_ = 0;
0050862d      this->object_table.buckets = operator new[](this_1);
00508636      this->object_table.table_size = 0x80;
00508640      this->object_table.key_shift = 8;
00508646      this->object_table.table_mask = 0;
0050864c      int32_t eax_1 = 1;
0050866c      uint32_t edx_2;
0050866c      
0050866c      do
0050866c      {
00508656          edx_2 = (this->object_table.table_mask | eax_1);
00508658          eax_1 <<= 1;
0050865c          this->object_table.table_mask = edx_2;
0050866c      } while ((edx_2 | eax_1) < this->object_table.table_size);
0050866e      int32_t i = 0;
0050866e      
00508682      do
00508682      {
00508670          this->object_table.buckets[i] = 0;
0050867f          i += 1;
00508682      } while (i < this->object_table.table_size);
00508682      
00508689      this->object_table.vtable = 0x7c66b0;
0050868f      this_1 = 0x40;
00508691      this->null_object_table.vtable = 0x7c66b0;
0050869b      this->null_object_table.fPlacementNew_ = 0;
005086a6      this->null_object_table.buckets = operator new[](this_1);
005086af      this->null_object_table.table_size = 0x10;
005086b9      this->null_object_table.key_shift = 8;
005086bf      this->null_object_table.table_mask = 0;
005086c5      int32_t eax_3 = 1;
005086ec      uint32_t edx_6;
005086ec      
005086ec      do
005086ec      {
005086d6          edx_6 = (this->null_object_table.table_mask | eax_3);
005086d8          eax_3 <<= 1;
005086dc          this->null_object_table.table_mask = edx_6;
005086ec      } while ((edx_6 | eax_3) < this->null_object_table.table_size);
005086ee      int32_t i_1 = 0;
005086ee      
00508702      do
00508702      {
005086f0          this->null_object_table.buckets[i_1] = 0;
005086ff          i_1 += 1;
00508702      } while (i_1 < this->null_object_table.table_size);
00508702      
00508704      this->null_object_table.vtable = 0x7c66b0;
0050870a      this_1 = 0x200;
0050870f      this->weenie_object_table.vtable = 0x7c66b0;
00508719      this->weenie_object_table.fPlacementNew_ = 0;
00508724      this->weenie_object_table.buckets = operator new[](this_1);
0050872d      this->weenie_object_table.table_size = 0x80;
00508737      this->weenie_object_table.key_shift = 8;
0050873d      this->weenie_object_table.table_mask = 0;
00508743      int32_t eax_5 = 1;
0050876c      uint32_t edx_10;
0050876c      
0050876c      do
0050876c      {
00508756          edx_10 = (this->weenie_object_table.table_mask | eax_5);
00508758          eax_5 <<= 1;
0050875c          this->weenie_object_table.table_mask = edx_10;
0050876c      } while ((edx_10 | eax_5) < this->weenie_object_table.table_size);
0050876e      int32_t i_2 = 0;
0050876e      
00508782      do
00508782      {
00508770          this->weenie_object_table.buckets[i_2] = 0;
0050877f          i_2 += 1;
00508782      } while (i_2 < this->weenie_object_table.table_size);
00508782      
00508789      this->weenie_object_table.vtable = 0x7c66b0;
0050878f      this_1 = 0x40;
00508791      this->null_weenie_object_table.vtable = 0x7c66b0;
0050879b      this->null_weenie_object_table.fPlacementNew_ = 0;
005087a6      this->null_weenie_object_table.buckets = operator new[](this_1);
005087af      this->null_weenie_object_table.table_size = 0x10;
005087b9      this->null_weenie_object_table.key_shift = 8;
005087bf      this->null_weenie_object_table.table_mask = 0;
005087c5      int32_t eax_7 = 1;
005087ec      uint32_t edx_14;
005087ec      
005087ec      do
005087ec      {
005087d6          edx_14 = (this->null_weenie_object_table.table_mask | eax_7);
005087d8          eax_7 <<= 1;
005087dc          this->null_weenie_object_table.table_mask = edx_14;
005087ec      } while ((edx_14 | eax_7) < this->null_weenie_object_table.table_size);
005087ee      int32_t i_3 = 0;
005087ee      
00508802      do
00508802      {
005087f0          this->null_weenie_object_table.buckets[i_3] = 0;
005087ff          i_3 += 1;
00508802      } while (i_3 < this->null_weenie_object_table.table_size);
00508802      
00508804      this->null_weenie_object_table.vtable = 0x7c66b0;
0050880a      this_1 = 0x80;
00508815      this->visible_object_table.vtable = 0x79bd74;
0050881f      IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>(&this->visible_object_table.m_intrusiveTable, this_1);
00508829      this_1 = 0x40;
00508830      this->destruction_object_table.vtable = 0x7c66b4;
0050883a      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,double> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,double> *,0>(&this->destruction_object_table.m_intrusiveTable, this_1);
0050883f      this_1 = 0x80;
00508844      this->object_inventory_table.vtable = 0x7c66b0;
0050884e      this->object_inventory_table.fPlacementNew_ = 0;
00508854      void* eax_8;
00508854      int32_t ecx_15;
00508854      eax_8 = operator new[](this_1);
00508859      this->object_inventory_table.buckets = eax_8;
00508862      this->object_inventory_table.table_size = 0x20;
0050886c      this->object_inventory_table.key_shift = 8;
00508872      this->object_inventory_table.table_mask = 0;
00508878      int32_t eax_9 = 1;
0050889c      uint32_t edx_18;
0050889c      
0050889c      do
0050889c      {
00508886          edx_18 = (this->object_inventory_table.table_mask | eax_9);
00508888          eax_9 <<= 1;
0050888c          this->object_inventory_table.table_mask = edx_18;
0050889c      } while ((edx_18 | eax_9) < this->object_inventory_table.table_size);
0050889e      int32_t i_4 = 0;
0050889e      
005088b2      do
005088b2      {
005088a0          this->object_inventory_table.buckets[i_4] = 0;
005088af          i_4 += 1;
005088b2      } while (i_4 < this->object_inventory_table.table_size);
005088b2      
005088b4      this->object_inventory_table.vtable = 0x7c66b0;
005088be      this_1 = 0x400;
005088c3      this->object_destruction_queue.vtable = 0x7c66a4;
005088cd      this->object_destruction_queue.curNumNodes = 0;
005088db      this->object_destruction_queue.A = operator new[](this_1);
005088e1      this_1 = this;
005088e6      this->object_destruction_queue.minAllocatedNodes = 0x40;
005088ec      this->object_destruction_queue.allocatedNodes = 0x40;
005088f7      CObjectMaint::s_pcInstance = this;
005088fd      int32_t var_8 = 0;
00508901      int32_t var_4 = 0;
00508905      void __return;
00508905      InterfacePtr<class Interface>::_QueryInterface(&var_8, &__return);
00508921      int32_t* var_c;
00508921      InterfaceSystem::RegisterClassA(InterfaceSystem::GetInstance(), &__return, &CObjectMaint_ClassType, var_c, nullptr);
00508921      class CObjectMaint** esp = &this_1;
00508921      
00508928      if (var_c != 0)
00508928      {
0050892e          *(uint32_t*)(*(uint32_t*)var_c + 0x14)();
0050892e          esp = &var_20;
00508928      }
00508928      
00508931      *(uint32_t*)esp;
00508931      esp[1];
00508931      esp[2];
00508931      esp[3];
005085d0  }

0050874a                                8d 9b 00 00 00 00                                                            ......
0050893b                                                                                   90 90 90 90 90                             .....

00508940  enum UIElementMessageListenResult UIListener::ListenToElementMessage(class UIListener* this @ ecx, uint32_t arg2, class UIElement* arg3, uint32_t arg4, int32_t arg5) __pure

00508940  {
00508942      return 0;
00508940  }

00508945                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00508950  void NoticeHandler::RecvNotice_WorldName(class NoticeHandler* this @ ecx, class AC1Legacy::PStringBase<char> const* arg2) __pure

00508950  {
00508950      return;
00508950  }

00508953                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00508960  enum Client::Enum4 Client::You_Must_Not_Have_Multiple_Implementations_Of_AddRef_In_A_Hierarchy(class Client* this @ ecx) __pure

00508960  {
00508962      return 0;
00508960  }

00508963           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00508970  uint32_t __fastcall CObjectMaint::AddRef(class CObjectMaint const* this)

00508970  {
0050897a      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00508970  }

0050897b                                                                                   90 90 90 90 90                             .....

00508980  uint32_t __fastcall CObjectMaint::Release(class CObjectMaint const* this)

00508980  {
00508987      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00508987      
00508994      if ((result == 0 && this != 0))
00508996          this->vtable->__vecDelDtor(1);
00508996      
005089a3      return result;
00508980  }

005089a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005089b0  void __fastcall CObjectMaint::UseTime(class CObjectMaint* this)

005089b0  {
005089b0      int32_t ebp;
005089b0      int32_t var_4 = ebp;
005089b0      
005089c8      if (this->is_active != 0)
005089c8      {
005089d4          long double x87_r7_2 = (((long double)Timer::cur_time) - ((long double)last_radar_update));
005089da          long double temp3_1 = ((long double)1.0);
005089da          (x87_r7_2 - temp3_1);
005089e0          int32_t eax;
005089e0          eax = ((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005089e0          
005089e5          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005089e5          {
005089e7              CObjectMaint::UpdateVisibleObjectList(this);
005089f1              int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
005089f7              (*(uint32_t*)last_radar_update) = (*(uint32_t*)Timer::cur_time);
005089fc              *(int32_t*)((char*)last_radar_update + 4) = ecx;
005089e5          }
005089e5          
00508a02          void* var_34 = nullptr;
00508a15          int32_t A;
00508a15          
00508a15          while (this->object_destruction_queue.curNumNodes > 0)
00508a15          {
00508a1b              A = this->object_destruction_queue.A;
00508a1b              
00508a20              if (A == 0)
00508a20                  break;
00508a20              
00508a26              long double x87_r7_3 = ((long double)*(uint64_t*)A);
00508a28              double var_28 = ((double)x87_r7_3);
00508a2c              long double temp4_1 = ((long double)Timer::cur_time);
00508a2c              (x87_r7_3 - temp4_1);
00508a32              A = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00508a32              
00508a37              if ((*(uint8_t*)((char*)A)[1] & 1) == 0)
00508a37                  break;
00508a37              
00508a49              AC1Legacy::PQueueArray<double>::RemoveMin(&this->object_destruction_queue, &var_28, &var_34);
00508a4e              void* esi_1 = var_34;
00508a62              void* var_2c = esi_1;
00508a66              int32_t* i = this->destruction_object_table.m_intrusiveTable.m_buckets[(COMBINE(0, esi_1) % this->destruction_object_table.m_intrusiveTable.m_numBuckets)];
00508a66              
00508a6b              if (i != 0)
00508a6b              {
00508a79                  do
00508a79                  {
00508a72                      if (*(uint32_t*)i == esi_1)
00508a72                      {
00508a7f                          if (i == 0)
00508a7f                              break;
00508a7f                          
00508a8a                          long double x87_r6_3 = fabsl((((long double)*(uint64_t*)((char*)i + 8)) - ((long double)var_28)));
00508a8c                          long double x87_r5_1 = ((long double)0.000199999995f);
00508a92                          (x87_r5_1 - x87_r6_3);
00508a94                          class HashTableData<unsigned long,double>** eax_3;
00508a94                          eax_3 = ((((x87_r5_1 < x87_r6_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, x87_r6_3))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == x87_r6_3) ? 1 : 0) << 0xe) | 0x3800))));
00508a94                          
00508a9b                          if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
00508a9b                              break;
00508a9b                          
00508aa6                          struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_4 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->destruction_object_table.m_intrusiveTable, &var_2c);
00508aa6                          
00508aad                          if (eax_4 != 0)
00508ab0                              operator delete(eax_4);
00508ab0                          
00508ab8                          this->vtable->RecvNotice_SetSelectedItem(esi_1);
00508ac1                          break;
00508a72                      }
00508a72                      
00508a74                      i = i[1];
00508a79                  } while (i != 0);
00508a6b              }
00508a15          }
00508a15          
00508ac6          class LongHash<CPhysicsObj>* ebx_1 = &this->null_object_table;
00508acc          int32_t edi_2 = 0;
00508ad0          class LongHash<CPhysicsObj>* var_1c = ebx_1;
00508ad4          int32_t var_10_1 = 0;
00508adc          int32_t var_18_1 = 0;
00508adc          
00508ae0          if (ebx_1 != 0)
00508ae0          {
00508ae9              class HashBaseData<unsigned long>* hash_next = *(uint32_t*)ebx_1->buckets;
00508aeb              int32_t i_1 = 0;
00508aef              int32_t i_3 = 0;
00508aef              
00508af7              if (hash_next != 0)
00508af7                  goto label_508b77;
00508af7              
00508afd              HashBaseIter<unsigned long>::Next(&var_1c);
00508b02              i_1 = i_3;
00508b02              
00508b08              if (i_1 == 0)
00508b08              {
00508b0e                  edi_2 = var_18_1;
00508b12                  ebx_1 = var_1c;
00508b77              label_508b77:
00508b77                  
00508b77                  do
00508b77                  {
00508b26                      long double x87_r7_6 = (((long double)Timer::cur_time) - ((long double)*(int32_t*)((char*)hash_next + 0xd8)));
00508b2c                      long double temp5_1 = ((long double)20.0);
00508b2c                      (x87_r7_6 - temp5_1);
00508b32                      A = ((((x87_r7_6 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp5_1) ? 1 : 0) << 0xe) | 0))));
00508b32                      
00508b37                      if ((*(uint8_t*)((char*)A)[1] & 0x41) == 0)
00508b37                      {
00508b3f                          int32_t eax_6 = *(int32_t*)((char*)Timer::cur_time + 4);
00508b44                          uint32_t id = hash_next->id;
00508b48                          *(int32_t*)((char*)hash_next + 0xd8) = (*(uint32_t*)Timer::cur_time);
00508b4e                          *(int32_t*)((char*)hash_next + 0xdc) = eax_6;
00508b54                          Proto_UI::SendForceObjdesc(id);
00508b37                      }
00508b37                      
00508b61                      for (hash_next = hash_next->hash_next; hash_next == 0; hash_next = ebx_1->buckets[edi_2])
00508b61                      {
00508b66                          edi_2 += 1;
00508b66                          
00508b69                          if (edi_2 >= ebx_1->table_size)
00508b69                              goto label_508b7d;
00508b61                      }
00508b77                  } while (i_1 == 0);
00508b08              }
00508ae0          }
00508ae0          
00508b7d      label_508b7d:
00508b7d          class LongHash<CPhysicsObj>* ebx_2 = &this->null_weenie_object_table;
00508b83          int32_t i_2 = 0;
00508b85          int32_t edi_3 = 0;
00508b89          var_1c = ebx_2;
00508b8d          int32_t var_10_2 = 0;
00508b91          int32_t var_18_2 = 0;
00508b91          
00508b95          if (ebx_2 != 0)
00508b95          {
00508b9e              void* j = *(uint32_t*)ebx_2->buckets;
00508ba2              int32_t i_4 = 0;
00508ba2              
00508baa              if (j != 0)
00508baa                  goto label_508c21;
00508baa              
00508bb0              HashBaseIter<unsigned long>::Next(&var_1c);
00508bb5              i_2 = i_4;
00508bb5              
00508bbb              if (i_2 == 0)
00508bbb              {
00508bc1                  edi_3 = var_18_2;
00508bc5                  ebx_2 = var_1c;
00508c21              label_508c21:
00508c21                  
00508c21                  do
00508c21                  {
00508bd6                      long double x87_r7_8 = (((long double)Timer::cur_time) - ((long double)*(uint64_t*)((char*)j + 0x18)));
00508bd9                      long double temp6_1 = ((long double)20.0);
00508bd9                      (x87_r7_8 - temp6_1);
00508bdf                      uint32_t eax_7;
00508bdf                      eax_7 = ((((x87_r7_8 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp6_1) ? 1 : 0) << 0xe) | 0))));
00508bdf                      
00508be4                      if ((*(uint8_t*)((char*)eax_7)[1] & 0x41) == 0)
00508be4                      {
00508bec                          int32_t edx_5 = *(int32_t*)((char*)Timer::cur_time + 4);
00508bf2                          uint32_t eax_8 = *(uint32_t*)((char*)j + 8);
00508bf6                          *(uint32_t*)((char*)j + 0x18) = (*(uint32_t*)Timer::cur_time);
00508bf9                          *(uint32_t*)((char*)j + 0x1c) = edx_5;
00508bfc                          Proto_UI::SendForceObjdesc(eax_8);
00508be4                      }
00508be4                      
00508c09                      for (j = *(uint32_t*)((char*)j + 4); j == 0; j = ebx_2->buckets[edi_3])
00508c09                      {
00508c10                          edi_3 += 1;
00508c10                          
00508c13                          if (edi_3 >= ebx_2->table_size)
00508c13                              goto label_5089ba;
00508c09                      }
00508c21                  } while (i_2 == 0);
00508bbb              }
00508b95          }
005089c8      }
005089c8      
005089ba  label_5089ba:
005089ba      var_4;
005089b0  }

00508b18                                                                          8d a4 24 00 00 00 00 90                          ..$.....
00508c2b                                   90 90 90 90 90                                                             .....

00508c30  void __fastcall CObjectMaint::DestroyObjects(class CObjectMaint* this)

00508c30  {
00508c38      class LongHash<CPhysicsObj>* esi = &this->object_table;
00508c40      int32_t edx = 0;
00508c45      class LongHash<CPhysicsObj>* var_14 = esi;
00508c49      int32_t var_8 = 0;
00508c4d      int32_t var_10 = 0;
00508c4d      
00508c51      if (esi != 0)
00508c51      {
00508c5a          class HashBaseData<unsigned long>* hash_next_3 = *(uint32_t*)esi->buckets;
00508c5e          int32_t var_4_1 = 0;
00508c62          class HashBaseData<unsigned long>* hash_next_1 = hash_next_3;
00508c62          
00508c66          if (hash_next_3 != 0)
00508c66          {
00508c8b              while (true)
00508c8b              {
00508c8b                  class HashBaseData<unsigned long>* hash_next = hash_next_3->hash_next;
00508c90                  hash_next_1 = hash_next;
00508c90                  
00508c94                  if (hash_next != 0)
00508c94                      break;
00508c94                  
00508ca0                  while (true)
00508ca0                  {
00508ca0                      edx += 1;
00508ca0                      
00508ca3                      if (edx >= esi->table_size)
00508cb5                          var_4_1 = 1;
00508ca3                      else
00508ca3                      {
00508ca8                          class HashBaseData<unsigned long>* hash_next_2 = esi->buckets[edx];
00508cad                          hash_next_1 = hash_next_2;
00508cad                          
00508cb1                          if (hash_next_2 == 0)
00508cb1                              continue;
00508ca3                      }
00508ca3                      
00508cbd                      var_10 = edx;
00508cc3                  label_508cc3:
00508cc3                      CPhysicsObj::exit_world(hash_next_3);
00508cca                      CPhysicsObj::leave_world(hash_next_3);
00508ccf                      uint32_t id = hash_next_3->id;
00508cec                      void* ecx_7 = &this->object_table.buckets[(((id >> ((int8_t)this->object_table.key_shift)) ^ id) & this->object_table.table_mask)];
00508cef                      void* eax_7 = *(uint32_t*)ecx_7;
00508cef                      
00508cf3                      if (eax_7 != 0)
00508cf3                      {
00508cf8                          if (*(uint32_t*)((char*)eax_7 + 8) == id)
00508cfd                              *(uint32_t*)ecx_7 = *(uint32_t*)((char*)eax_7 + 4);
00508cf8                          else
00508cf8                          {
00508d04                              while (*(uint32_t*)((char*)eax_7 + 4) != 0)
00508d04                              {
00508d06                                  void* ecx_8 = *(uint32_t*)((char*)eax_7 + 4);
00508d06                                  
00508d0c                                  if (*(uint32_t*)((char*)ecx_8 + 8) == id)
00508d0c                                  {
00508d1d                                      *(uint32_t*)((char*)eax_7 + 4) = *(uint32_t*)(*(uint32_t*)((char*)eax_7 + 4) + 4);
00508d1d                                      break;
00508d0c                                  }
00508d0c                                  
00508d0e                                  eax_7 = ecx_8;
00508d04                              }
00508cf8                          }
00508cf3                      }
00508cf3                      
00508d20                      uint32_t id_1 = hash_next_3->id;
00508d3d                      void* ecx_13 = &this->null_object_table.buckets[(((id_1 >> ((int8_t)this->null_object_table.key_shift)) ^ id_1) & this->null_object_table.table_mask)];
00508d40                      void* eax_12 = *(uint32_t*)ecx_13;
00508d40                      
00508d44                      if (eax_12 != 0)
00508d44                      {
00508d49                          if (*(uint32_t*)((char*)eax_12 + 8) == id_1)
00508d4e                              *(uint32_t*)ecx_13 = *(uint32_t*)((char*)eax_12 + 4);
00508d49                          else
00508d49                          {
00508d55                              while (*(uint32_t*)((char*)eax_12 + 4) != 0)
00508d55                              {
00508d57                                  void* ecx_14 = *(uint32_t*)((char*)eax_12 + 4);
00508d57                                  
00508d5d                                  if (*(uint32_t*)((char*)ecx_14 + 8) == id_1)
00508d5d                                  {
00508d6e                                      *(uint32_t*)((char*)eax_12 + 4) = *(uint32_t*)(*(uint32_t*)((char*)eax_12 + 4) + 4);
00508d6e                                      break;
00508d5d                                  }
00508d5d                                  
00508d5f                                  eax_12 = ecx_14;
00508d55                              }
00508d49                          }
00508d44                      }
00508d44                      
00508d71                      uint32_t id_4 = hash_next_3->id;
00508d78                      uint32_t temp1_1 = (COMBINE(0, id_4) % this->destruction_object_table.m_intrusiveTable.m_numBuckets);
00508d7e                      class HashTableData<unsigned long,double>** m_buckets = this->destruction_object_table.m_intrusiveTable.m_buckets;
00508d84                      int32_t* i_1 = m_buckets[temp1_1];
00508d84                      
00508d8e                      for (int32_t* i = i_1; i != 0; i = i[1])
00508d8e                      {
00508d92                          if (*(uint32_t*)i == id_4)
00508d92                          {
00508d9f                              if (i != 0)
00508d9f                              {
00508da3                                  if (i_1 == i)
00508d87                                      m_buckets[temp1_1] = i_1[1];
00508da3                                  else
00508da3                                  {
00508dac                                      int32_t* i_2;
00508dac                                      
00508dac                                      do
00508dac                                      {
00508da5                                          i_2 = i_1;
00508da7                                          i_1 = i_1[1];
00508dac                                      } while (i_1 != i);
00508dac                                      
00508db0                                      if (i_2 != 0)
00508dbc                                          i_2[1] = i_1[1];
00508db0                                      else
00508d87                                          m_buckets[temp1_1] = i_1[1];
00508da3                                  }
00508da3                                  
00508dc7                                  this->destruction_object_table.m_intrusiveTable.m_numElements -= 1;
00508dcd                                  operator delete(i);
00508d9f                              }
00508d9f                              
00508d9f                              break;
00508d92                          }
00508d8e                      }
00508d8e                      
00508dd7                      CPhysicsObj::unset_parent(hash_next_3);
00508dde                      CPhysicsObj::unparent_children(hash_next_3);
00508de3                      hash_next_3->vtable->__vecDelDtor(1);
00508de3                      
00508df3                      if (var_4_1 != 0)
00508df3                          goto label_508e03;
00508df3                      
00508c7b                  label_508c7b:
00508c7b                      hash_next_3 = hash_next_1;
00508c81                      edx = var_10;
00508c85                      esi = var_14;
00508c85                      
00508c89                      if (hash_next_3 != 0)
00508c89                          break;
00508ca0                  }
00508c8b              }
00508c8b              
00508c94              goto label_508cc3;
00508c66          }
00508c66          
00508c6c          HashBaseIter<unsigned long>::Next(&var_14);
00508c6c          
00508c75          if (var_4_1 == 0)
00508c75              goto label_508c7b;
00508c51      }
00508c51      
00508e03  label_508e03:
00508e03      var_14 = &this->weenie_object_table;
00508e07      int32_t var_8_1 = 0;
00508e0b      int32_t var_10_1 = 0;
00508e0f      class HashBaseData<unsigned long>* esi_1;
00508e0f      
00508e0f      if (this == 0xffffff4c)
00508e0f      {
00508e31          int32_t var_4_3 = 1;
00508e39          esi_1 = nullptr;
00508e3b      label_508e3b:
00508e3b          
00508e3d          if (esi_1 != 0)
00508e3d              goto label_508e43;
00508e0f      }
00508e0f      else
00508e0f      {
00508e14          esi_1 = *(uint32_t*)this->weenie_object_table.buckets;
00508e18          int32_t var_4_2 = 0;
00508e18          
00508e20          if (esi_1 == 0)
00508e20          {
00508e26              HashBaseIter<unsigned long>::Next(&var_14);
00508e2f              goto label_508e3b;
00508e20          }
00508e20          
00508e43      label_508e43:
00508e43          
00508e43          while (true)
00508e43          {
00508e43              uint32_t id_2 = esi_1->id;
00508e57              void* ecx_25 = &this->weenie_object_table.buckets[(((id_2 >> ((int8_t)this->weenie_object_table.key_shift)) ^ id_2) & this->weenie_object_table.table_mask)];
00508e5a              void* eax_21 = *(uint32_t*)ecx_25;
00508e5a              
00508e5e              if (eax_21 != 0)
00508e5e              {
00508e63                  if (*(uint32_t*)((char*)eax_21 + 8) == id_2)
00508e68                      *(uint32_t*)ecx_25 = *(uint32_t*)((char*)eax_21 + 4);
00508e63                  else
00508e63                  {
00508e6f                      while (*(uint32_t*)((char*)eax_21 + 4) != 0)
00508e6f                      {
00508e71                          void* ecx_26 = *(uint32_t*)((char*)eax_21 + 4);
00508e71                          
00508e77                          if (*(uint32_t*)((char*)ecx_26 + 8) == id_2)
00508e77                          {
00508e88                              *(uint32_t*)((char*)eax_21 + 4) = *(uint32_t*)(*(uint32_t*)((char*)eax_21 + 4) + 4);
00508e88                              break;
00508e77                          }
00508e77                          
00508e79                          eax_21 = ecx_26;
00508e6f                      }
00508e63                  }
00508e5e              }
00508e5e              
00508e8b              uint32_t id_3 = esi_1->id;
00508ea8              void* ecx_31 = &this->null_weenie_object_table.buckets[(((id_3 >> ((int8_t)this->null_weenie_object_table.key_shift)) ^ id_3) & this->null_weenie_object_table.table_mask)];
00508eab              void* eax_26 = *(uint32_t*)ecx_31;
00508eab              
00508eaf              if (eax_26 != 0)
00508eaf              {
00508eb4                  if (*(uint32_t*)((char*)eax_26 + 8) == id_3)
00508eb9                      *(uint32_t*)ecx_31 = *(uint32_t*)((char*)eax_26 + 4);
00508eb4                  else
00508eb4                  {
00508ec0                      while (*(uint32_t*)((char*)eax_26 + 4) != 0)
00508ec0                      {
00508ec2                          void* ecx_32 = *(uint32_t*)((char*)eax_26 + 4);
00508ec2                          
00508ec8                          if (*(uint32_t*)((char*)ecx_32 + 8) == id_3)
00508ec8                          {
00508ed9                              *(uint32_t*)((char*)eax_26 + 4) = *(uint32_t*)(*(uint32_t*)((char*)eax_26 + 4) + 4);
00508ed9                              break;
00508ec8                          }
00508ec8                          
00508eca                          eax_26 = ecx_32;
00508ec0                      }
00508eb4                  }
00508eaf              }
00508eaf              
00508edc              esi_1->vtable->__vecDelDtor(1);
00508ee4              class LongHash<CPhysicsObj>* eax_28 = var_14;
00508eea              int32_t var_8_2 = 0;
00508eee              int32_t var_10_2 = 0;
00508eee              
00508ef2              if (eax_28 == 0)
00508ef2              {
00508f18                  int32_t var_4_5 = 1;
00508f20                  esi_1 = nullptr;
00508ef2              }
00508ef2              else
00508ef2              {
00508ef7                  esi_1 = *(uint32_t*)eax_28->buckets;
00508efb                  int32_t var_4_4 = 0;
00508efb                  
00508f03                  if (esi_1 != 0)
00508f03                      continue;
00508f03                  else
00508f0d                      HashBaseIter<unsigned long>::Next(&var_14);
00508ef2              }
00508ef2              
00508f24              if (esi_1 == 0)
00508f24                  break;
00508e43          }
00508e0f      }
00508f30      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->object_table);
00508f3b      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->null_object_table);
00508f42      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->weenie_object_table);
00508f4d      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->null_weenie_object_table);
00508f55      IntrusiveHashTable<unsigned long,CLostCell *,0>::delete_contents(&this->lost_cell_table);
00508f60      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->object_inventory_table);
00508c30  }

00508f6d                                         90 90 90                                                               ...

00508f70  void __thiscall CObjectMaint::AddObjectToBeDestroyed(class CObjectMaint* this, uint32_t arg2)

00508f70  {
00508f75      uint32_t edi = arg2;
00508f86      uint32_t var_8 = edi;
00508f8a      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->destruction_object_table.m_intrusiveTable, &var_8);
00508f8a      
00508f91      if (eax != 0)
00508f94          operator delete(eax);
00508f94      
00508fb8      var_8 = ((double)(((long double)Timer::cur_time) + ((long double)25.0)));
00508fbc      HashTable<unsigned long,double,0>::add(&this->destruction_object_table, &arg2, &var_8);
00508fca      int32_t var_4;
00508fca      int32_t var_18_1 = var_4;
00508fd2      AC1Legacy::PQueueArray<double>::Insert(&this->object_destruction_queue, var_8, edi);
00508f70  }

00508fdf                                                                                               90                                 .

00508fe0  class CPhysicsObj* __thiscall CObjectMaint::GetNullObject(class CObjectMaint* this, uint32_t arg2, int32_t arg3)

00508fe0  {
00509002      class CPhysicsObj* hash_next = this->null_object_table.buckets[(((arg2 >> ((int8_t)this->null_object_table.key_shift)) ^ arg2) & this->null_object_table.table_mask)];
00509002      
00509007      if (hash_next == 0)
00509007      {
0050901c      label_50901c:
0050901c          hash_next = nullptr;
00509007      }
00509007      else
00509007      {
00509013          while (arg2 != hash_next->id)
00509013          {
00509015              hash_next = hash_next->hash_next;
00509015              
0050901a              if (hash_next == 0)
0050901a                  goto label_50901c;
00509013          }
00509007      }
00509007      
00509028      if ((hash_next != 0 || arg3 == 0))
00509088          return hash_next;
00509088      
0050902e      class CPhysicsObj* eax_4 = CPhysicsObj::makeNullObject(arg2, 1);
00509040      *(uint32_t*)((char*)eax_4->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00509046      eax_4->update_time = (*(uint32_t*)Timer::cur_time);
0050904c      uint32_t id = eax_4->id;
00509065      uint32_t eax_9 = (((id >> ((int8_t)this->null_object_table.key_shift)) ^ id) & this->null_object_table.table_mask);
00509070      eax_4->hash_next = this->null_object_table.buckets[eax_9];
00509073      this->null_object_table.buckets[eax_9] = eax_4;
0050907e      CObjectMaint::AddObjectToBeDestroyed(this, arg2);
00509083      return eax_4;
00508fe0  }

0050908b                                   90 90 90 90 90                                                             .....

00509090  class CWeenieObject* __thiscall CObjectMaint::GetNullWeenieObject(class CObjectMaint* this, uint32_t arg2, int32_t arg3)

00509090  {
005090b2      class CWeenieObject* hash_next = this->null_weenie_object_table.buckets[(((arg2 >> ((int8_t)this->null_weenie_object_table.key_shift)) ^ arg2) & this->null_weenie_object_table.table_mask)];
005090b2      
005090b7      if (hash_next == 0)
005090b7      {
005090cc      label_5090cc:
005090cc          hash_next = nullptr;
005090b7      }
005090b7      else
005090b7      {
005090c3          while (arg2 != hash_next->id)
005090c3          {
005090c5              hash_next = hash_next->hash_next;
005090c5              
005090ca              if (hash_next == 0)
005090ca                  goto label_5090cc;
005090c3          }
005090b7      }
005090b7      
005090d8      if ((hash_next != 0 || arg3 == 0))
00509130          return hash_next;
00509130      
005090dc      class CWeenieObject* eax_4 = CFactory::MakeCWeenieObject(arg2);
005090ee      *(uint32_t*)((char*)eax_4->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005090f1      eax_4->update_time = (*(uint32_t*)Timer::cur_time);
005090f4      uint32_t id = eax_4->id;
0050910d      uint32_t eax_9 = (((id >> ((int8_t)this->null_weenie_object_table.key_shift)) ^ id) & this->null_weenie_object_table.table_mask);
00509118      eax_4->hash_next = this->null_weenie_object_table.buckets[eax_9];
0050911b      this->null_weenie_object_table.buckets[eax_9] = eax_4;
00509126      CObjectMaint::AddObjectToBeDestroyed(this, arg2);
0050912b      return eax_4;
00509090  }

00509133                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00509140  void __fastcall CObjectMaint::~CObjectMaint(class CObjectMaint* this)

00509140  {
00509140      class CObjectMaint* this_1 = this;
00509149      this->vtable = 0x7c66b8;
00509146      this->vtable = &CObjectMaint::`vftable';
0050915b      CObjectMaint::s_pcInstance = nullptr;
00509161      CObjectMaint::DestroyObjects(this);
0050916d      this->object_destruction_queue.vtable = 0x7c66a4;
00509177      operator delete[](this->object_destruction_queue.A);
0050918c      this->object_inventory_table.vtable = 0x7c66b0;
0050918c      
00509192      if (this->object_inventory_table.fPlacementNew_ == 0)
0050919b          operator delete[](this->object_inventory_table.buckets);
0050919b      
005091ac      this->destruction_object_table.vtable = 0x7c66b4;
005091b6      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->destruction_object_table.m_intrusiveTable);
005091bb      class HashTableData<unsigned long,double>** m_buckets = this->destruction_object_table.m_intrusiveTable.m_buckets;
005091a4      this->destruction_object_table.m_intrusiveTable.vtable = 0x7c66ac;
005091a4      
005091c9      if (m_buckets != &this->destruction_object_table.m_intrusiveTable.m_aInplaceBuckets)
005091cc          operator delete[](m_buckets);
005091cc      
005091a4      this->destruction_object_table.m_intrusiveTable.m_buckets = nullptr;
005091a4      this->destruction_object_table.m_intrusiveTable.m_firstInterestingBucket = nullptr;
005091a4      this->destruction_object_table.m_intrusiveTable.m_numBuckets = 0;
005091a4      this->destruction_object_table.m_intrusiveTable.m_numElements = 0;
005091e8      this->visible_object_table.vtable = 0x79bd74;
005091f2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->visible_object_table.m_intrusiveTable);
005091f7      class HashSetData<unsigned long>** m_buckets_1 = this->visible_object_table.m_intrusiveTable.m_buckets;
005091e0      this->visible_object_table.m_intrusiveTable.vtable = 0x79bd6c;
005091e0      
00509205      if (m_buckets_1 != &this->visible_object_table.m_intrusiveTable.m_aInplaceBuckets)
00509208          operator delete[](m_buckets_1);
00509208      
005091e0      this->visible_object_table.m_intrusiveTable.m_buckets = nullptr;
005091e0      this->visible_object_table.m_intrusiveTable.m_firstInterestingBucket = nullptr;
005091e0      this->visible_object_table.m_intrusiveTable.m_numBuckets = 0;
005091e0      this->visible_object_table.m_intrusiveTable.m_numElements = 0;
00509222      this->null_weenie_object_table.vtable = 0x7c66b0;
00509222      
00509229      if (this->null_weenie_object_table.fPlacementNew_ == 0)
00509232          operator delete[](this->null_weenie_object_table.buckets);
00509232      
00509240      this->weenie_object_table.vtable = 0x7c66b0;
00509240      
00509246      if (this->weenie_object_table.fPlacementNew_ == 0)
0050924f          operator delete[](this->weenie_object_table.buckets);
0050924f      
0050925d      this->null_object_table.vtable = 0x7c66b0;
0050925d      
00509263      if (this->null_object_table.fPlacementNew_ == 0)
0050926c          operator delete[](this->null_object_table.buckets);
0050926c      
0050927a      this->object_table.vtable = 0x7c66b0;
0050927a      
00509280      if (this->object_table.fPlacementNew_ == 0)
00509289          operator delete[](this->object_table.buckets);
00509289      
00509291      class CLostCell** m_buckets_2 = this->lost_cell_table.m_buckets;
00509299      this->lost_cell_table.vtable = &IntrusiveHashTable<unsigned long,class CLostCell*,0>::`vftable';
00509299      
005092a0      if (m_buckets_2 != &this->lost_cell_table.m_aInplaceBuckets)
005092a3          operator delete[](m_buckets_2);
005092a3      
005092af      this->lost_cell_table.m_buckets = nullptr;
005092b2      this->lost_cell_table.m_firstInterestingBucket = nullptr;
005092b5      this->lost_cell_table.m_numBuckets = 0;
005092b8      this->lost_cell_table.m_numElements = 0;
005092be      this->m_cTurbineRefCount.vtable = 0x792b6c;
005092cb      /* tailcall */
005092cb      return NoticeHandler::~NoticeHandler(&this->vtable);
00509140  }


005092d0  void __thiscall CObjectMaint::QueueBlobForObject(class CObjectMaint* this, uint32_t arg2, class NetBlob* arg3)

005092d0  {
005092df      class CPhysicsObj* edi = CObjectMaint::GetObjectA(this, arg2);
005092df      
005092e3      if (edi == 0)
005092e3      {
005092f2          edi = CObjectMaint::GetNullObject(this, arg2, 1);
005092f4          CObjectMaint::AddObjectToBeDestroyed(this, arg2);
005092e3      }
005092e3      
00509300      CPhysicsObj::queue_netblob(edi, arg3);
005092d0  }

0050930b                                   90 90 90 90 90                                                             .....

00509310  void __thiscall CObjectMaint::QueueBlobForWeenieObject(class CObjectMaint* this, uint32_t arg2, uint32_t arg3, class NetBlob* arg4)

00509310  {
0050932c      CWeenieObject::queue_netblob(CObjectMaint::GetNullWeenieObject(this, arg2, 1), arg3, arg4);
00509334      CObjectMaint::AddObjectToBeDestroyed(this, arg2);
00509310  }

0050933e                                                                                            90 90                                ..

00509340  void __thiscall CObjectMaint::QueueBlobForWeenieObject(class CObjectMaint* this, uint32_t arg2, class NetBlob* arg3)

00509340  {
00509357      CWeenieObject::queue_netblob(CObjectMaint::GetNullWeenieObject(this, arg2, 1), arg3);
0050935f      CObjectMaint::AddObjectToBeDestroyed(this, arg2);
00509340  }

00509369                             90 90 90 90 90 90 90                                                           .......

00509370  void __thiscall CObjectMaint::SetChildren(class CObjectMaint* this, class CPhysicsObj* arg2, class PhysicsDesc* arg3)

00509370  {
00509379      CPhysicsObj::unparent_children(arg2);
00509384      uint32_t esi = 0;
00509384      
0050938d      if (UIFlow::GetPersistantData(arg3) > 0)
0050938d      {
00509407          class UIPersistantData* eax_4;
00509407          
00509407          do
00509407          {
00509393              uint32_t i = PhysicsDesc::get_child_id(arg3, esi);
005093b2              class CPhysicsObj* hash_next = this->object_table.buckets[(((i >> ((int8_t)this->object_table.key_shift)) ^ i) & this->object_table.table_mask)];
005093b2              
005093b7              if (hash_next == 0)
005093b7              {
005093cc              label_5093cc:
005093cc                  hash_next = nullptr;
005093b7              }
005093b7              else
005093b7              {
005093c3                  while (i != hash_next->id)
005093c3                  {
005093c5                      hash_next = hash_next->hash_next;
005093c5                      
005093ca                      if (hash_next == 0)
005093ca                          goto label_5093cc;
005093c3                  }
005093b7              }
005093b7              
005093d0              class CPhysicsObj* hash_next_1 = hash_next;
005093d0              
005093d2              if (hash_next == 0)
005093e6                  hash_next_1 = CObjectMaint::GetNullObject(this, PhysicsDesc::get_child_id(arg3, esi), 1);
005093e6              
005093f8              CPhysicsObj::set_parent(hash_next_1, arg2, PhysicsDesc::get_child_location_id(arg3, esi));
005093ff              esi += 1;
00509400              eax_4 = UIFlow::GetPersistantData(arg3);
00509407          } while (esi < eax_4);
0050938d      }
00509370  }


00509410  void* __thiscall CObjectMaint::`scalar deleting destructor'(class CObjectMaint* this, uint32_t arg2)

00509410  {
00509413      CObjectMaint::~CObjectMaint(this);
00509413      
0050941d      if ((arg2 & 1) != 0)
00509420          operator delete(this);
00509420      
0050942b      return this;
00509410  }

0050942e                                            90 90                                                                ..

00509430  void __thiscall CWeenieObject::queue_netblob(class CWeenieObject* this, uint32_t arg2, class NetBlob* arg3)

00509430  {
00509430      class CWeenieObject* this_1 = this;
00509443      this_1 = nullptr;
0050944b      TSRecv::AddEntry(&this->blobOrdering, arg2, arg3, &this_1);
00509430  }

00509454                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00509460  int32_t __thiscall CWeenieObject::fIsNextBlob(class CWeenieObject* this, uint32_t arg2, class NetBlob* arg3, class NetBlob** arg4)

00509460  {
0050947c      return TSRecv::AddAndCheck(&this->blobOrdering, arg2, arg3, &arg4, arg4);
00509460  }

0050947f                                                                                               90                                 .

00509480  void __thiscall CWeenieObject::queue_netblob(class CWeenieObject* this, class NetBlob* arg2)

00509480  {
00509488      if (this->netblob_list == 0)
00509488      {
0050948c          class NIList<NetBlob *>* eax_1 = operator new(8);
0050948c          
00509496          if (eax_1 == 0)
005094a7              eax_1 = nullptr;
00509496          else
00509496          {
00509498              eax_1->head_ = 0;
0050949e              eax_1->tail_ = nullptr;
00509496          }
00509496          
005094a9          this->netblob_list = eax_1;
00509488      }
00509488      
005094b5      InterlockedIncrement(&arg2->m_cRef);
005094bb      class NIList<NetBlob *>* netblob_list = this->netblob_list;
005094c0      class NIListElement<NetBlob *>* eax_3 = operator new(8);
005094c0      
005094ca      if (eax_3 == 0)
005094d7          eax_3 = nullptr;
005094ca      else
005094ca      {
005094cc          eax_3->data_ = arg2;
005094ce          eax_3->next_ = nullptr;
005094ca      }
005094ca      
005094d9      class NIListElement<NetBlob *>* tail_ = netblob_list->tail_;
005094d9      
005094df      if (tail_ == 0)
005094df      {
005094e1          netblob_list->head_ = eax_3;
005094e3          netblob_list->tail_ = eax_3;
005094e7          return;
005094df      }
005094df      
005094ea      tail_->next_ = eax_3;
005094f3      netblob_list->tail_ = netblob_list->tail_->next_;
00509480  }

005094fa                                                                                90 90 90 90 90 90                            ......

00509500  void __fastcall CWeenieObject::process_netblobs(class CWeenieObject* this)

00509500  {
00509504      class IQueuedUIEventDeliverer* IQueuedUIEventDeliverer::s_pInstance_1 = IQueuedUIEventDeliverer::s_pInstance;
00509504      
0050950f      if (IQueuedUIEventDeliverer::s_pInstance_1 != 0)
0050950f      {
0050952c          while (true)
0050952c          {
0050952c              class ReferenceCountTemplate<1048576,0>* var_8;
0050952c              void var_4;
0050952c              TSRecv::GetNextReadyEntry(&this->blobOrdering, &var_4, &var_8);
00509531              class ReferenceCountTemplate<1048576,0>* esi_1 = var_8;
00509531              
00509537              if (esi_1 == 0)
00509537                  break;
00509537              
00509539              IQueuedUIEventDeliverer::s_pInstance_1->vtable->ProcessOrderedNetBlob(esi_1);
00509539              
0050954d              if (InterlockedDecrement(&esi_1->m_cRef) == 0)
0050954f                  esi_1->vtable->__vecDelDtor(1);
0050952c          }
0050952c          
00509559          class NIList<NetBlob *>* netblob_list = this->netblob_list;
00509559          
0050955e          if (netblob_list != 0)
0050955e          {
00509563              if (netblob_list->head_ != 0)
00509563              {
005095b1                  do
005095b1                  {
00509565                      class NIList<NetBlob *>* netblob_list_1 = this->netblob_list;
00509568                      class NIListElement<NetBlob *>* head_ = netblob_list_1->head_;
0050956c                      class NetBlob* data_;
0050956c                      
0050956c                      if (head_ != 0)
0050956c                      {
00509572                          class NIListElement<NetBlob *>* next_ = head_->next_;
00509577                          netblob_list_1->head_ = next_;
00509577                          
00509579                          if (next_ == 0)
0050957b                              netblob_list_1->tail_ = next_;
0050957b                          
0050957e                          data_ = head_->data_;
00509581                          operator delete(head_);
0050956c                      }
0050956c                      else
0050956e                          data_ = nullptr;
0050956e                      
00509589                      IQueuedUIEventDeliverer::s_pInstance_1->vtable->ProcessEphemeralNetBlob(data_);
00509589                      
005095a1                      if ((InterlockedDecrement(&data_->m_cRef) == 0 && data_ != 0))
005095a3                          data_->vtable->__vecDelDtor(1);
005095b1                  } while (this->netblob_list->head_ != 0);
00509563              }
00509563              
005095b3              class NIList<NetBlob *>* netblob_list_2 = this->netblob_list;
005095b3              
005095b8              if (netblob_list_2 != 0)
005095b8              {
005095bc                  NIList<NetBlob *>::DeleteContents(netblob_list_2);
005095c2                  operator delete(netblob_list_2);
005095b8              }
005095b8              
005095ca              this->netblob_list = nullptr;
0050955e          }
0050950f      }
00509500  }

005095d9                                                                             90 90 90 90 90 90 90                           .......

005095e0  void __fastcall CWeenieObject::ObjectBeingDeleted(class CWeenieObject* this)

005095e0  {
005095e3      class NIList<NetBlob *>* netblob_list = this->netblob_list;
005095e3      
005095e8      if (netblob_list != 0)
005095e8      {
005095ee          if (netblob_list->head_ != 0)
005095ee          {
00509637              do
00509637              {
005095f7                  class NIList<NetBlob *>* netblob_list_1 = this->netblob_list;
005095fa                  class NIListElement<NetBlob *>* head_ = netblob_list_1->head_;
005095fe                  class NetBlob* data_;
005095fe                  
005095fe                  if (head_ != 0)
005095fe                  {
00509604                      class NIListElement<NetBlob *>* next_ = head_->next_;
00509609                      netblob_list_1->head_ = next_;
00509609                      
0050960b                      if (next_ == 0)
0050960d                          netblob_list_1->tail_ = next_;
0050960d                      
00509610                      data_ = head_->data_;
00509613                      operator delete(head_);
005095fe                  }
005095fe                  else
00509600                      data_ = nullptr;
00509600                  
00509627                  if ((InterlockedDecrement(&data_->m_cRef) == 0 && data_ != 0))
00509629                      data_->vtable->__vecDelDtor(1);
00509637              } while (this->netblob_list->head_ != 0);
005095ee          }
005095ee          
0050963a          class NIList<NetBlob *>* netblob_list_2 = this->netblob_list;
0050963a          
0050963f          if (netblob_list_2 != 0)
0050963f          {
00509643              NIList<NetBlob *>::DeleteContents(netblob_list_2);
00509649              operator delete(netblob_list_2);
0050963f          }
0050963f          
00509651          this->netblob_list = nullptr;
005095e8      }
005095e8      
0050965a      ECM_Physics::SendNotice_BeingDeleted(this);
005095e0  }

00509664              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00509670  void Vector3::Vector3(class Vector3* this @ ecx) __pure

00509670  {
00509672      return;
00509670  }

00509673                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00509680  void __thiscall QuickWindow::SetWindowID(class QuickWindow* this, uint32_t const arg2)

00509680  {
00509684      this->m_WindowID = arg2;
00509680  }

0050968a                                90 90 90 90 90 90                                                            ......

00509690  int32_t __stdcall CPhysics::SetObjectMovement(class CPhysics* this @ ecx, class CPhysicsObj* arg2, void* arg3, uint32_t arg4, uint16_t arg5, uint16_t arg6, int32_t arg7)

00509690  {
00509697      class CWeenieObject* weenie_obj = arg2->weenie_obj;
0050969f      int32_t ebx = 0;
0050969f      
005096a4      if (weenie_obj != 0)
005096a4      {
005096a8          int32_t eax_2;
005096a8          eax_2 = weenie_obj->vtable->IsThePlayer();
005096ab          ebx = eax_2;
005096a4      }
005096a4      
005096ad      weenie_obj = arg2->update_times[1];
005096b4      int32_t edi;
005096b4      edi = arg5;
005096c1      int32_t eax_5;
005096c1      int32_t edx_1;
005096c1      edx_1 = HIGHD(((int64_t)(((uint32_t)edi) - ((uint32_t)weenie_obj))));
005096c1      eax_5 = LOWD(((int64_t)(((uint32_t)edi) - ((uint32_t)weenie_obj))));
005096c4      int32_t eax_7 = ((eax_5 ^ edx_1) - edx_1);
005096cb      bool c;
005096cb      
005096cb      if (eax_7 > 0x7fff)
005096d2          c = edi < weenie_obj;
005096cb      else
005096cd          c = weenie_obj < edi;
005096cd      
005096db      if (-((eax_7 - eax_7)) != 0)
005096db      {
005096dd          arg2->update_times[1] = edi;
005096e4          weenie_obj = arg2->update_times[5];
005096eb          edi = arg6;
005096f8          int32_t eax_12;
005096f8          int32_t edx_3;
005096f8          edx_3 = HIGHD(((int64_t)(((uint32_t)weenie_obj) - ((uint32_t)edi))));
005096f8          eax_12 = LOWD(((int64_t)(((uint32_t)weenie_obj) - ((uint32_t)edi))));
005096fb          int32_t eax_14 = ((eax_12 ^ edx_3) - edx_3);
00509702          bool c_1;
00509702          
00509702          if (eax_14 > 0x7fff)
00509709              c_1 = weenie_obj < edi;
00509702          else
00509704              c_1 = edi < weenie_obj;
00509704          
00509712          if (-((eax_14 - eax_14)) != 0)
0050971a              return 0;
0050971a          
00509723          arg2->update_times[5] = edi;
00509723          
0050972e          if ((arg7 == 0 || ebx == 0))
0050972e          {
00509730              arg2->last_move_was_autonomous = arg7;
00509742              CPhysicsObj::unpack_movement(arg2, &arg3, arg4);
00509742              
00509749              if (ebx != 0)
0050974b                  return 1;
0050972e          }
005096db      }
005096db      
00509756      return 0;
00509690  }

00509759                                                                             90 90 90 90 90 90 90                           .......

00509760  void CPhysics::RemoveStaticAnimatingObject(class CPhysicsObj* arg1)

00509760  {
00509760      class CPhysicsObj** m_data = CPhysics::static_animating_objects.m_data;
0050976b      void* ecx_1 = &m_data[CPhysics::static_animating_objects.m_num];
0050976b      
00509770      if (m_data < ecx_1)
00509770      {
00509778          while (*(uint32_t*)m_data != arg1)
00509778          {
0050977a              m_data = &m_data[1];
0050977a              
0050977f              if (m_data >= ecx_1)
00509781                  return;
00509778          }
00509778          
00509785          *(uint32_t*)m_data = *(uint32_t*)((char*)ecx_1 - 4);
00509787          CPhysics::static_animating_objects.m_num -= 1;
00509770      }
00509760  }

0050978e                                            90 90                                                                ..

00509790  int32_t __thiscall CPhysics::SetObjectMovement(class CPhysics* this, class CPhysicsObj* arg2, void* arg3, uint32_t arg4)

00509790  {
0050979e      class CPhysics* this_1 = this;
005097a0      this = *(uint16_t*)((char*)arg3 + 2);
005097a6      int16_t var_4 = *(uint16_t*)arg3;
005097ab      int16_t eax;
005097ab      eax = *(uint8_t*)((char*)arg3 + 4);
005097ad      void* s = ((char*)arg3 + 5);
005097ae      arg3 = eax;
005097b4      void* eax_2 = (s & 0x80000003);
005097b4      bool cond:1 = eax_2 == 0;
005097b4      
005097be      if (eax_2 < 0)
005097be      {
005097c1          void* eax_4 = (((char*)eax_2 - 1) | 0xfffffffc);
005097c4          eax_2 = ((char*)eax_4 + 1);
005097c4          cond:1 = eax_4 == 0xffffffff;
005097be      }
005097be      
005097cf      if ((!(cond:1) && 4 != eax_2))
005097cf      {
005097e5          __builtin_memset(__builtin_memset(s, 0, (((4 - eax_2) >> 2) << 2)), 0, ((4 - eax_2) & 3));
005097e8          s += (4 - eax_2);
005097cf      }
005097cf      
00509812      return CPhysics::SetObjectMovement(this_1, arg2, s, arg4, var_4, this, ((uint32_t)arg3));
00509790  }

00509815                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00509820  void CPhysics::UpdateTexVelocity(float arg1)

00509820  {
00509820      uint32_t m_num = CPhysics::texture_velocity_gids.m_num;
00509826      int32_t ebx = 0;
00509826      
0050982a      if (m_num > 0)
0050982a      {
005098f7          do
005098f7          {
00509838              int32_t* esi_1 = CPhysics::texture_velocity_gids.m_data[ebx];
00509838              
0050983d              if (esi_1 != 0)
0050983d              {
00509857                  class DBObj* edi_1 = DBOCache::GetIfUsing(DBCache::GetDBOCache(6), *(uint32_t*)esi_1);
00509857                  
0050985b                  if (edi_1 != 0)
0050985b                  {
00509891                      long double x87_r7_2 = (((long double)arg1) * ((long double)esi_1[1]));
00509898                      long double x87_r6_2 = (((long double)arg1) * ((long double)esi_1[2]));
0050989b                      long double x87_r5_1 = ((long double)esi_1[3]);
0050989e                      long double temp1_1 = ((long double)1f);
0050989e                      (x87_r5_1 - temp1_1);
005098a4                      class DBObj* eax_1;
005098a4                      eax_1 = ((((x87_r5_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3000))));
005098a4                      
005098a9                      if ((*(uint8_t*)((char*)eax_1)[1] & 1) == 0)
005098b3                          x87_r7_2 = (x87_r7_2 - ((long double)1f));
005098b3                      
005098b5                      long double x87_r5_2 = ((long double)esi_1[4]);
005098b8                      long double temp2_1 = ((long double)1f);
005098b8                      (x87_r5_2 - temp2_1);
005098be                      eax_1 = ((((x87_r5_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r5_2 == temp2_1) ? 1 : 0) << 0xe) | 0x3000))));
005098be                      
005098c3                      if ((*(uint8_t*)((char*)eax_1)[1] & 1) == 0)
005098c5                          x87_r6_2 = (x87_r6_2 - ((long double)1f));
005098c5                      
005098d0                      esi_1[3] = ((float)(x87_r7_2 + ((long double)esi_1[3])));
005098d3                      int32_t edx_2 = esi_1[3];
005098d9                      esi_1[4] = ((float)(x87_r6_2 + ((long double)esi_1[4])));
005098df                      int32_t var_10_3 = esi_1[4];
005098e3                      CGfxObj::TexVelocity(edi_1, edx_2);
005098e8                      edi_1->vtable->Release();
005098ef                      m_num = CPhysics::texture_velocity_gids.m_num;
0050985b                  }
0050985b                  else
0050985b                  {
0050985e                      operator delete(esi_1);
00509863                      m_num = CPhysics::texture_velocity_gids.m_num;
00509863                      
0050986d                      if (ebx < m_num)
0050986d                      {
0050986f                          m_num -= 1;
00509872                          CPhysics::texture_velocity_gids.m_num = m_num;
00509872                          
00509877                          if (ebx != m_num)
00509877                          {
00509879                              struct GfxVelocityDesc** m_data = CPhysics::texture_velocity_gids.m_data;
00509882                              m_data[ebx] = m_data[m_num];
00509885                              m_num = CPhysics::texture_velocity_gids.m_num;
00509877                          }
0050986d                      }
0050986d                      
0050988a                      ebx -= 1;
0050985b                  }
0050983d              }
0050983d              
005098f4              ebx += 1;
005098f7          } while (ebx < m_num);
0050982a      }
00509820  }

00509901     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00509910  void __fastcall CPhysics::~CPhysics(class CPhysics* this)

00509910  {
00509916      int32_t i = 0;
00509916      
0050991d      if (CPhysics::texture_velocity_gids.m_num > 0)
0050991d      {
0050993d          do
0050993d          {
00509925              void* eax_1 = CPhysics::texture_velocity_gids.m_data[i];
00509925              
0050992a              if (eax_1 != 0)
0050992d                  operator delete(eax_1);
0050992d              
0050993a              i += 1;
0050993d          } while (i < CPhysics::texture_velocity_gids.m_num);
0050991d      }
0050991d      
00509943      operator delete(this->iter);
00509910  }

0050994e                                            90 90                                                                ..

00509950  void __fastcall CPhysics::UseTime(class CPhysics* this)

00509950  {
0050995a      long double x87_r7_1 = (((long double)Timer::cur_time) - ((long double)last_update));
00509962      double var_8 = ((double)x87_r7_1);
00509966      long double temp0 = ((long double)0.0);
00509966      (x87_r7_1 - temp0);
0050996c      int32_t eax;
0050996c      eax = ((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0))));
0050996e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0050996e      
00509971      if (!(p))
00509971      {
00509978          int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
0050997e          (*(uint32_t*)last_update) = (*(uint32_t*)Timer::cur_time);
00509983          *(int32_t*)((char*)last_update + 4) = ecx;
0050998d          return;
00509971      }
00509971      
0050998e      long double x87_r7_2 = ((long double)var_8);
00509992      long double temp1 = ((long double)0.0);
00509992      (x87_r7_2 - temp1);
00509998      eax = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
0050999a      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050999a      
0050999d      if (p_1)
0050999d      {
005099a3          class LongHashIter<CPhysicsObj>* iter_1 = this->iter;
005099a6          class HashBase<unsigned long>* myHash_ = iter_1->myHash_;
005099ad          iter_1->lastThisChain_ = nullptr;
005099b0          iter_1->curBucket_ = 0;
005099b0          
005099b3          if (myHash_ == 0)
005099b3          {
005099cb              iter_1->fEnd_ = 1;
005099d2              iter_1->curPtr_ = nullptr;
005099b3          }
005099b3          else
005099b3          {
005099b5              iter_1->fEnd_ = 0;
005099bb              class HashBaseData<unsigned long>* eax_2 = *(uint32_t*)myHash_->buckets;
005099bf              iter_1->curPtr_ = eax_2;
005099bf              
005099c2              if (eax_2 == 0)
005099c4                  HashBaseIter<unsigned long>::Next(iter_1);
005099b3          }
005099b3          
005099d5          class LongHashIter<CPhysicsObj>* iter = this->iter;
005099d5          
005099db          if (iter->fEnd_ == 0)
005099db          {
005099dd              int32_t edi;
005099dd              int32_t var_14_1 = edi;
005099dd              
00509a05              do
00509a05              {
005099e0                  class HashBaseData<unsigned long>* curPtr_ = iter->curPtr_;
005099e5                  CPhysicsObj::update_object(curPtr_);
005099e5                  
005099ed                  if (curPtr_ == this->player)
005099f2                      SmartBox::PlayerPhysicsUpdatedCallback(this->smartbox);
005099f2                  
005099fa                  HashBaseIter<unsigned long>::Next(this->iter);
005099ff                  iter = this->iter;
00509a05              } while (iter->fEnd_ == 0);
005099db          }
005099db          
00509a0d          int32_t ecx_4 = *(int32_t*)((char*)Timer::cur_time + 4);
00509a13          (*(uint32_t*)last_update) = (*(uint32_t*)Timer::cur_time);
00509a1d          int32_t i = 0;
00509a1f          bool cond:2_1 = CPhysics::static_animating_objects.m_num <= 0;
00509a21          *(int32_t*)((char*)last_update + 4) = ecx_4;
00509a21          
00509a28          if (!(cond:2_1))
00509a28          {
00509a46              do
00509a46              {
00509a39                  int80_t st0_3;
00509a39                  ecx_4 = CPhysicsObj::animate_static_object(CPhysics::static_animating_objects.m_data[i]);
00509a43                  i += 1;
00509a46              } while (i < CPhysics::static_animating_objects.m_num);
00509a28          }
00509a28          
00509a4c          int32_t var_10_2 = ecx_4;
00509a50          CPhysics::UpdateTexVelocity(((float)((long double)var_8)));
0050999d      }
00509950  }

00509a5d                                                                                         90 90 90                               ...

00509a60  void __thiscall CPhysics::CPhysics(class CPhysics* this, class CObjectMaint* arg2, class SmartBox* arg3)

00509a60  {
00509a67      class CObjectMaint** this_1 = this;
00509a71      this_1[2] = 0;
00509a74      *(uint32_t*)this_1 = arg2;
00509a76      this_1[1] = arg3;
00509a7e      class LongHash<CPhysicsObj>** esi = operator new(0x14);
00509a7e      
00509a85      if (esi == 0)
00509ac1          esi = nullptr;
00509a85      else
00509a85      {
00509a89          class LongHash<CPhysicsObj>* edx_2 = &*(uint32_t*)this_1->object_table;
00509a93          *(uint32_t*)esi = edx_2;
00509a95          esi[3] = 0;
00509a98          esi[1] = 0;
00509a98          
00509a9b          if (edx_2 == 0)
00509a9b          {
00509ab5              esi[4] = 1;
00509abc              esi[2] = 0;
00509a9b          }
00509a9b          else
00509a9b          {
00509a9d              esi[4] = 0;
00509aa3              class HashBaseData<unsigned long>* eax_3 = *(uint32_t*)edx_2->buckets;
00509aa7              esi[2] = eax_3;
00509aa7              
00509aaa              if (eax_3 == 0)
00509aae                  HashBaseIter<unsigned long>::Next(esi);
00509a9b          }
00509a85      }
00509a85      
00509ac3      this_1[3] = esi;
00509acc      int32_t edx_3 = *(int32_t*)((char*)Timer::cur_time + 4);
00509ad6      (*(uint32_t*)PhysicsTimer::curr_time) = (*(uint32_t*)Timer::cur_time);
00509adc      *(int32_t*)((char*)PhysicsTimer::curr_time + 4) = edx_3;
00509a60  }

00509ae6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00509af0  void CPhysics::AddStaticAnimatingObject(class CPhysicsObj* arg1)

00509af0  {
00509af0      class CPhysicsObj** m_data = CPhysics::static_animating_objects.m_data;
00509af0      
00509b05      for (void* ecx_1 = &m_data[CPhysics::static_animating_objects.m_num]; m_data < ecx_1; m_data = &m_data[1])
00509b05      {
00509b09          if (*(uint32_t*)m_data == arg1)
00509b09          {
00509b17              *(uint32_t*)m_data = *(uint32_t*)((char*)ecx_1 - 4);
00509b19              CPhysics::static_animating_objects.m_num -= 1;
00509b19              break;
00509b09          }
00509b05      }
00509b05      
00509b1f      uint32_t m_size = CPhysics::static_animating_objects.m_size;
00509b2a      int32_t eax_1;
00509b2a      
00509b2a      if (CPhysics::static_animating_objects.m_num >= m_size)
00509b2a      {
00509b2e          uint32_t eax;
00509b2e          
00509b2e          if (m_size <= 0)
00509b34              eax = 8;
00509b2e          else
00509b30              eax = (m_size * 2);
00509b30          
00509b3f          eax_1 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&CPhysics::static_animating_objects, eax);
00509b2a      }
00509b2a      
00509b46      if ((CPhysics::static_animating_objects.m_num < m_size || eax_1 != 0))
00509b46      {
00509b48          CPhysics::static_animating_objects.m_data[CPhysics::static_animating_objects.m_num] = arg1;
00509b56          CPhysics::static_animating_objects.m_num += 1;
00509b46      }
00509af0  }

00509b5e                                                                                            90 90                                ..

00509b60  void CPhysics::AddGfxVelocity(class IDClass<_tagDataID,32,0> arg1, float arg2, float arg3)

00509b60  {
00509b61      uint32_t m_num = CPhysics::texture_velocity_gids.m_num;
00509b67      int32_t ecx = 0;
00509b67      
00509b70      if (m_num <= 0)
00509b70      {
00509b8a      label_509b8a:
00509b8a          void* eax_1 = operator new(0x14);
00509b99          *(uint32_t*)eax_1 = arg1;
00509b9b          *(uint32_t*)((char*)eax_1 + 4) = arg2;
00509b9e          *(uint32_t*)((char*)eax_1 + 8) = arg3;
00509ba1          *(uint32_t*)((char*)eax_1 + 0xc) = 0;
00509ba8          *(uint32_t*)((char*)eax_1 + 0x10) = 0;
00509baf          uint32_t m_size = CPhysics::texture_velocity_gids.m_size;
00509bbf          int32_t eax_6;
00509bbf          
00509bbf          if (CPhysics::texture_velocity_gids.m_num >= m_size)
00509bbf          {
00509bc3              uint32_t eax_3;
00509bc3              
00509bc3              if (m_size <= 0)
00509c24                  eax_3 = 8;
00509bc3              else
00509bc5                  eax_3 = (m_size * 2);
00509bc5              
00509c2f              eax_6 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&CPhysics::texture_velocity_gids, eax_3);
00509bbf          }
00509bbf          
00509c36          if ((CPhysics::texture_velocity_gids.m_num < m_size || eax_6 != 0))
00509c36          {
00509c3d              CPhysics::texture_velocity_gids.m_data[CPhysics::texture_velocity_gids.m_num] = eax_1;
00509c46              CPhysics::texture_velocity_gids.m_num += 1;
00509c36          }
00509c36          
00509c36          return;
00509b70      }
00509b70      
00509b72      struct GfxVelocityDesc** m_data = CPhysics::texture_velocity_gids.m_data;
00509b72      
00509b78      while (true)
00509b78      {
00509b78          int32_t* eax_4 = m_data[ecx];
00509b78          
00509b81          if ((eax_4 != 0 && arg1 == *(uint32_t*)eax_4))
00509b81          {
00509bc9              long double x87_r7_1 = ((long double)arg2);
00509bcd              void* edi_1 = m_data[ecx];
00509bd0              long double temp0_1 = ((long double)0f);
00509bd0              (x87_r7_1 - temp0_1);
00509bd6              eax_4 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00509bd8              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00509bdb              bool p_2;
00509bdb              
00509bdb              if (!(p_1))
00509bdb              {
00509bdd                  long double x87_r7_2 = ((long double)arg3);
00509be1                  long double temp1_1 = ((long double)0f);
00509be1                  (x87_r7_2 - temp1_1);
00509be7                  eax_4 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00509be9                  p_2 = /* p_2 = unimplemented  {test ah, 0x44} */;
00509bdb              }
00509bdb              
00509bec              if ((p_1 || p_2))
00509bec              {
00509c1b                  *(uint32_t*)((char*)edi_1 + 4) = arg2;
00509c1e                  *(uint32_t*)((char*)edi_1 + 8) = arg3;
00509c23                  return;
00509bec              }
00509bec              
00509bf0              if (ecx < m_num)
00509bf0              {
00509bf5                  CPhysics::texture_velocity_gids.m_num = (m_num - 1);
00509bf5                  
00509bfb                  if (ecx != (m_num - 1))
00509c00                      m_data[ecx] = m_data[(m_num - 1)];
00509bf0              }
00509bf0              
00509c05              if (edi_1 == 0)
00509c05                  break;
00509c05              
00509c08              operator delete(edi_1);
00509c12              return;
00509b81          }
00509b81          
00509b83          ecx += 1;
00509b83          
00509b86          if (ecx >= m_num)
00509b86              goto label_509b8a;
00509b78      }
00509b60  }

00509c4f                                               90                                                                 .

00509c50  void __thiscall Plane::snap_to_plane(class Plane const* this, class AC1Legacy::Vector3* arg2)

00509c50  {
00509c53      long double x87_r7 = fabsl(((long double)this->N.z));
00509c55      long double x87_r6 = ((long double)0.000199999995f);
00509c5b      (x87_r6 - x87_r7);
00509c5d      int32_t eax;
00509c5d      eax = ((((x87_r6 < x87_r7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7) ? 1 : 0) << 0xe) | 0))));
00509c5f      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00509c5f      
00509c62      if (!(p))
00509c62      {
00509c68          arg2->z = 0f;
00509c72          long double x87_r7_2 = (((long double)1.0) / ((long double)this->N.z));
00509c9f          long double x87_r7_5 = ((-(((((((long double)arg2->y) * ((long double)this->N.y)) + (((long double)arg2->x) * ((long double)this->N.x))) + (((long double)this->N.z) * ((long double)0f))) + ((long double)this->d))) * x87_r7_2) - (x87_r7_2 * -(((long double)this->d))));
00509ca1          arg2->z = ((float)x87_r7_5);
00509c62      }
00509c50  }

00509ca7                       90 90 90 90 90 90 90 90 90                                                         .........

00509cb0  class Plane& __thiscall Plane::operator=(class Plane* this, class Plane const& arg2)

00509cb0  {
00509cbc      float* this_1 = this;
00509cbe      *(uint32_t*)this_1 = arg2->N.x;
00509cc3      this_1[1] = arg2->N.y;
00509cc9      this_1[2] = arg2->N.z;
00509cd0      this->d = arg2->d;
00509cd4      return this;
00509cb0  }

00509cd7                                                                       90 90 90 90 90 90 90 90 90                         .........

00509ce0  void __thiscall SPHEREPATH::set_walkable_check_pos(class SPHEREPATH* this, class CSphere const* arg2)

00509ce0  {
00509ce6      this->walkable_check_pos.center.x = arg2->center.x;
00509ce6      this->walkable_check_pos.center.y = arg2->center.y;
00509ce6      this->walkable_check_pos.center.z = arg2->center.z;
00509ce6      this->walkable_check_pos.radius = arg2->radius;
00509ce0  }

00509d03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00509d10  void __thiscall SPHEREPATH::add_offset_to_check_pos(class SPHEREPATH* this, class AC1Legacy::Vector3 const* arg2)

00509d10  {
00509d14      this->cell_array_valid = 0;
00509d2a      this->check_pos.frame.m_fOrigin.x = ((float)(((long double)this->check_pos.frame.m_fOrigin.x) + ((long double)arg2->x)));
00509d39      this->check_pos.frame.m_fOrigin.y = ((float)(((long double)arg2->y) + ((long double)this->check_pos.frame.m_fOrigin.y)));
00509d48      this->check_pos.frame.m_fOrigin.z = ((float)(((long double)arg2->z) + ((long double)this->check_pos.frame.m_fOrigin.z)));
00509d4e      /* tailcall */
00509d4e      return SPHEREPATH::cache_global_sphere(this, arg2);
00509d10  }

00509d53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00509d60  void __fastcall COLLISIONINFO::init(class COLLISIONINFO* this)

00509d60  {
00509d62      this->last_known_contact_plane_valid = 0;
00509d64      this->contact_plane_valid = 0;
00509d67      this->sliding_normal_valid = 0;
00509d6a      this->collision_normal_valid = 0;
00509d6d      this->num_collide_object = 0;
00509d70      this->last_collided_object = nullptr;
00509d73      this->collided_with_environment = 0;
00509d76      this->contact_plane_cell_id = 0;
00509d79      this->frames_stationary_fall = 0;
00509d60  }


00509d80  void __thiscall COLLISIONINFO::set_contact_plane(class COLLISIONINFO* this, class Plane const* arg2, int32_t arg3)

00509d80  {
00509d86      this->contact_plane_valid = 1;
00509d8e      this->contact_plane.N.x = arg2->N.x;
00509d8e      this->contact_plane.N.y = arg2->N.y;
00509d8e      this->contact_plane.N.z = arg2->N.z;
00509d8e      this->contact_plane.d = arg2->d;
00509db1      this->contact_plane_is_water = arg3;
00509d80  }

00509db8                                                                          90 90 90 90 90 90 90 90                          ........

00509dc0  void CTransition::cleanupTransition(class CTransition* arg1)

00509dc0  {
00509dc0      CTransition::transition_level -= 1;
00509dc0  }

00509dc7                       90 90 90 90 90 90 90 90 90                                                         .........

00509dd0  void __fastcall CTransition::init(class CTransition* this)

00509dd0  {
00509dd9      this->object_info.object = 0;
00509ddb      this->object_info.state = 0;
00509dde      this->object_info.targetID = 0;
00509de1      SPHEREPATH::init(&this->sphere_path);
00509de6      this->collision_info.last_known_contact_plane_valid = 0;
00509dec      this->collision_info.contact_plane_valid = 0;
00509df2      this->collision_info.sliding_normal_valid = 0;
00509df8      this->collision_info.collision_normal_valid = 0;
00509dfe      this->collision_info.num_collide_object = 0;
00509e04      __builtin_memset(&this->collision_info.last_collided_object, 0, 0x18);
00509e10      this->collision_info.contact_plane_cell_id = 0;
00509dd0  }

00509e31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00509e40  void __thiscall CTransition::init_object(class CTransition* this, class CPhysicsObj* arg2, int32_t arg3)

00509e40  {
00509e40      /* tailcall */
00509e40      return OBJECTINFO::init(this, arg2, arg3);
00509e40  }

00509e45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00509e50  void __thiscall CTransition::init_sphere(class CTransition* this, uint32_t const arg2, class CSphere const* arg3, float const arg4)

00509e50  {
00509e53      /* tailcall */
00509e53      return SPHEREPATH::init_sphere(&this->sphere_path, arg2, arg3, arg4);
00509e50  }

00509e58                                                                          90 90 90 90 90 90 90 90                          ........

00509e60  void __thiscall CTransition::init_path(class CTransition* this, class CObjCell* arg2, class Position* arg3, class Position* arg4)

00509e60  {
00509e63      /* tailcall */
00509e63      return SPHEREPATH::init_path(&this->sphere_path, arg2, arg3, arg4);
00509e60  }

00509e68                          90 90 90 90 90 90 90 90                                                          ........

00509e70  enum TransitionState __thiscall CTransition::insert_into_cell(class CTransition* this, class CObjCell* arg2, int32_t arg3)

00509e70  {
00509e7c      if (arg2 == 0)
00509ec4          return 2;
00509ec4      
00509e82      int32_t ebx_1 = 0;
00509e86      int32_t result = 1;
00509e86      
00509e8b      if (arg3 > 0)
00509e8b      {
00509e95          while (true)
00509e95          {
00509e95              result = arg2->vtable->find_collisions(this);
00509e95              
00509ea1              if ((result - 1) <= 3)
00509ea1                  switch (result)
00509ea1                  {
00509ea3                      case 1:
00509ea3                      case 2:
00509ea3                      {
00509ea3                          break;
00509ea3                          break;
00509ea3                      }
00509eac                      case 4:
00509eac                      {
00509eac                          this->collision_info.contact_plane_valid = 0;
00509eb2                          this->collision_info.contact_plane_is_water = 0;
00509eac                          break;
00509eac                      }
00509ea1                  }
00509ea1              
00509eb8              ebx_1 += 1;
00509eb8              
00509ebb              if (ebx_1 >= arg3)
00509ec1                  return result;
00509e95          }
00509e8b      }
00509e8b      
00509ecd      return result;
00509e70  }

00509ed0  uint32_t jump_table_509ed0[0x4] = 
00509ed0  {
00509ed0      [0x0] =  0x00509ec9
00509ed4      [0x1] =  0x00509ec9
00509ed8      [0x2] =  0x00509eb8
00509edc      [0x3] =  0x00509eaa
00509ee0  }

00509ee0  void __thiscall CTransition::build_cell_array(class CTransition* this, class CObjCell** arg2)

00509ee0  {
00509ee8      this->sphere_path.cell_array_valid = 1;
00509ef2      this->sphere_path.hits_interior_cell = 0;
00509f04      CObjCell::find_cell_list(&this->cell_array, arg2, &this->sphere_path);
00509ee0  }

00509f0f                                               90                                                                 .

00509f10  uint8_t __thiscall AC1Legacy::Vector3::operator==(class AC1Legacy::Vector3 const* this, class AC1Legacy::Vector3 const* arg2)

00509f10  {
00509f12      float* edx = arg2;
00509f18      long double x87_r7_1 = fabsl((((long double)this->x) - ((long double)*(uint32_t*)edx)));
00509f1a      long double temp1 = ((long double)0.000199999995f);
00509f1a      (x87_r7_1 - temp1);
00509f20      int32_t eax;
00509f20      eax = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
00509f22      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00509f22      
00509f25      if (!(p))
00509f25      {
00509f2d          long double x87_r7_4 = fabsl((((long double)this->y) - ((long double)edx[1])));
00509f2f          long double temp2_1 = ((long double)0.000199999995f);
00509f2f          (x87_r7_4 - temp2_1);
00509f35          eax = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00509f37          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00509f37          
00509f3a          if (!(p_1))
00509f3a          {
00509f42              long double x87_r7_7 = fabsl((((long double)this->z) - ((long double)edx[2])));
00509f44              long double temp3_1 = ((long double)0.000199999995f);
00509f44              (x87_r7_7 - temp3_1);
00509f4a              eax = ((((x87_r7_7 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp3_1) ? 1 : 0) << 0xe) | 0))));
00509f4c              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
00509f4c              
00509f4f              if (!(p_2))
00509f56                  return 1;
00509f3a          }
00509f25      }
00509f25      
00509f5b      return 0;
00509f10  }

00509f5e                                                                                            90 90                                ..

00509f60  class AC1Legacy::Vector3* __thiscall Position::get_offset(class Position const* this, class AC1Legacy::Vector3* __return, class Position const* arg3)

00509f60  {
00509f78      float __return_1;
00509f78      LandDefs::get_block_offset(&__return_1, this->objcell_id, arg3->objcell_id);
00509fa9      float var_14;
00509fa9      long double x87_r6_5 = (((long double)((float)(((long double)var_14) + ((long double)arg3->frame.m_fOrigin.y)))) - ((long double)this->frame.m_fOrigin.y));
00509fb0      float var_10;
00509fb0      long double x87_r5_1 = (((long double)((float)(((long double)var_10) + ((long double)arg3->frame.m_fOrigin.z)))) - ((long double)this->frame.m_fOrigin.z));
00509fb6      __return->x = ((float)((((long double)__return_1) + ((long double)arg3->frame.m_fOrigin.x)) - ((long double)this->frame.m_fOrigin.x)));
00509fb8      __return->y = ((float)x87_r6_5);
00509fbb      __return->z = ((float)x87_r5_1);
00509fc1      return __return;
00509f60  }

00509fc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00509fd0  class AC1Legacy::Vector3* __thiscall SPHEREPATH::get_curr_pos_check_pos_block_offset(class SPHEREPATH const* this, class AC1Legacy::Vector3* __return)

00509fd0  {
00509fe4      LandDefs::get_block_offset(__return, this->curr_pos.objcell_id, this->check_pos.objcell_id);
00509fef      return __return;
00509fd0  }

00509ff2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050a000  void __thiscall COLLISIONINFO::set_collision_normal(class COLLISIONINFO* this, class AC1Legacy::Vector3 const* arg2)

0050a000  {
0050a004      this->collision_normal_valid = 1;
0050a011      this->collision_normal.x = arg2->x;
0050a011      this->collision_normal.y = arg2->y;
0050a011      this->collision_normal.z = arg2->z;
0050a011      
0050a02b      if (AC1Legacy::Vector3::normalize_check_small(&this->collision_normal.x) != 0)
0050a02b      {
0050a011          this->collision_normal.x = 0;
0050a011          this->collision_normal.y = 0f;
0050a011          this->collision_normal.z = 0f;
0050a02b      }
0050a000  }


0050a060  void __thiscall COLLISIONINFO::set_sliding_normal(class COLLISIONINFO* this, class AC1Legacy::Vector3 const* arg2)

0050a060  {
0050a067      this->sliding_normal_valid = 1;
0050a071      this->sliding_normal.x = arg2->x;
0050a07b      this->sliding_normal.y = arg2->y;
0050a07e      this->sliding_normal.z = 0f;
0050a07e      
0050a08c      if (AC1Legacy::Vector3::normalize_check_small(&this->sliding_normal.x) != 0)
0050a08c      {
0050a071          this->sliding_normal.x = 0f;
0050a094          this->sliding_normal.y = 0f;
0050a09b          this->sliding_normal.z = 0f;
0050a08c      }
0050a060  }

0050a0a7                       90 90 90 90 90 90 90 90 90                                                         .........

0050a0b0  void __thiscall CTransition::calc_num_steps(class CTransition* this, class AC1Legacy::Vector3* arg2, class AC1Legacy::Vector3* arg3, uint32_t* arg4)

0050a0b0  {
0050a0b7      class Position* begin_pos = this->sphere_path.begin_pos;
0050a0b7      
0050a0bf      if (begin_pos == 0)
0050a0bf      {
0050a303          arg2->x = 0;
0050a311          arg2->y = 0f;
0050a324          arg2->z = 0f;
0050a333          arg3->x = 0;
0050a341          arg3->y = 0f;
0050a355          arg3->z = 0f;
0050a358          *(uint32_t*)arg4 = 1;
0050a362          return;
0050a0bf      }
0050a0bf      
0050a0d1      void __return;
0050a0d1      class AC1Legacy::Vector3* eax_1 = Position::get_offset(begin_pos, &__return, this->sphere_path.end_pos);
0050a0dc      float* ecx = arg2;
0050a0de      *(uint32_t*)ecx = eax_1->x;
0050a0e3      ecx[1] = eax_1->y;
0050a0e9      ecx[2] = eax_1->z;
0050a0ec      this->sphere_path.local_sphere->radius;
0050a0f2      float eax_2;
0050a0f2      eax_2 = this->object_info.state;
0050a0f7      long double x87_r6 = ((long double)arg2->z);
0050a0fa      long double x87_r5 = ((long double)arg2->y);
0050a0fd      long double x87_r4 = ((long double)arg2->x);
0050a10f      long double x87_r3_4 = sqrtl((((x87_r4 * x87_r4) + (x87_r5 * x87_r5)) + (x87_r6 * x87_r6)));
0050a111      class AC1Legacy::Vector3* var_28;
0050a111      
0050a111      if ((eax_2 & 4) != 0)
0050a111      {
0050a11d          long double temp2 = ((long double)0.000199999995f);
0050a11d          (x87_r4 - temp2);
0050a123          eax_2 = ((((x87_r4 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4, temp2))) ? 1 : 0) << 0xa) | ((((x87_r4 == temp2) ? 1 : 0) << 0xe) | 0x3000))));
0050a123          
0050a12c          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
0050a12c          {
0050a1a1              arg3->x = 0;
0050a1af              arg3->y = 0f;
0050a1c3              arg3->z = 0f;
0050a1c6              *(uint32_t*)arg4 = 0;
0050a1d0              return;
0050a12c          }
0050a12c          
0050a12e          long double x87_r7_2 = (x87_r4 / x87_r4);
0050a139          long double x87_r6_3 = (((long double)1f) / x87_r7_2);
0050a144          long double x87_r6_4 = (x87_r6_3 * ((long double)arg2->y));
0050a149          float var_4 = ((float)(x87_r6_3 * ((long double)arg2->z)));
0050a15d          arg3->x = ((float)(x87_r6_3 * ((long double)arg2->x)));
0050a16b          arg3->y = ((float)x87_r6_4);
0050a16e          var_28 = ((double)x87_r7_2);
0050a171          arg3->z = var_4;
0050a174          floor(var_28);
0050a188          *(uint32_t*)arg4 = (_ftol2() + 1);
0050a18e          return;
0050a111      }
0050a111      
0050a1e5      long double temp1 = ((long double)1f);
0050a1e5      (x87_r3_4 - temp1);
0050a1eb      eax_2 = ((((x87_r3_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r3_4 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0050a1ed      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0050a1ed      
0050a1f0      if (p)
0050a1f0      {
0050a292          var_28 = ((double)x87_r3_4);
0050a295          ceil(var_28);
0050a2a1          long double x87_r7_9 = (((long double)1f) / (x87_r4 / (((long double)1f) * x87_r3_4)));
0050a2a3          int32_t* ecx_6 = arg3;
0050a2b3          long double x87_r7_10 = (x87_r7_9 * ((long double)arg2->y));
0050a2b8          float var_4_1 = ((float)(x87_r7_9 * ((long double)arg2->z)));
0050a2cc          *(uint32_t*)ecx_6 = ((float)(x87_r7_9 * ((long double)arg2->x)));
0050a2da          ecx_6[1] = ((float)x87_r7_10);
0050a2dd          ecx_6[2] = var_4_1;
0050a2ea          *(uint32_t*)arg4 = _ftol2();
0050a2f0          return;
0050a1f0      }
0050a1f0      
0050a1f8      long double x87_r7_5 = ((long double)arg2->x);
0050a1fa      long double temp3 = ((long double)0f);
0050a1fa      (x87_r7_5 - temp3);
0050a200      eax_2 = ((((x87_r7_5 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp3) ? 1 : 0) << 0xe) | 0))));
0050a202      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0050a202      
0050a205      if (!(p_1))
0050a205      {
0050a207          long double x87_r7_6 = ((long double)arg2->y);
0050a20a          long double temp4_1 = ((long double)0f);
0050a20a          (x87_r7_6 - temp4_1);
0050a210          eax_2 = ((((x87_r7_6 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0050a212          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0050a212          
0050a215          if (!(p_2))
0050a215          {
0050a217              long double x87_r7_7 = ((long double)arg2->z);
0050a21a              long double temp5_1 = ((long double)0f);
0050a21a              (x87_r7_7 - temp5_1);
0050a220              eax_2 = ((((x87_r7_7 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp5_1) ? 1 : 0) << 0xe) | 0))));
0050a222              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
0050a222              
0050a225              if (!(p_3))
0050a225              {
0050a237                  arg3->x = 0;
0050a245                  arg3->y = 0f;
0050a259                  arg3->z = 0f;
0050a25c                  *(uint32_t*)arg4 = 0;
0050a266                  return;
0050a225              }
0050a215          }
0050a205      }
0050a205      
0050a26b      float* eax_7 = arg3;
0050a26f      *(uint32_t*)eax_7 = arg2->x;
0050a274      eax_7[1] = arg2->y;
0050a27f      eax_7[2] = arg2->z;
0050a282      *(uint32_t*)arg4 = 1;
0050a0b0  }

0050a365                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0050a370  void __thiscall CTransition::adjust_offset(class CTransition* this, class AC1Legacy::Vector3* __return, class AC1Legacy::Vector3 const* arg3)

0050a370  {
0050a377      float y = arg3->y;
0050a382      float z = arg3->z;
0050a386      int32_t sliding_normal_valid = this->collision_info.sliding_normal_valid;
0050a38c      float x = arg3->x;
0050a390      int32_t ecx_1 = 0;
0050a394      float s = y;
0050a394      
0050a398      if (sliding_normal_valid != 0)
0050a398      {
0050a3ba          long double x87_r7_4 = (((((long double)z) * ((long double)this->collision_info.sliding_normal.z)) + (((long double)s) * ((long double)this->collision_info.sliding_normal.y))) + (((long double)x) * ((long double)this->collision_info.sliding_normal.x)));
0050a3bc          long double temp1_1 = ((long double)0f);
0050a3bc          (x87_r7_4 - temp1_1);
0050a3c2          sliding_normal_valid = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0050a3c2          
0050a3c7          if ((*(uint8_t*)((char*)sliding_normal_valid)[1] & 1) != 0)
0050a3d1              ecx_1 = 1;
0050a3c7          else
0050a3c9              this->collision_info.sliding_normal_valid = 0;
0050a398      }
0050a398      
0050a3de      float __return_1;
0050a3de      
0050a3de      if (this->collision_info.contact_plane_valid != 0)
0050a3de      {
0050a408          arg3 = ((float)(((((long double)z) * ((long double)this->collision_info.contact_plane.N.z)) + (((long double)s) * ((long double)this->collision_info.contact_plane.N.y))) + (((long double)x) * ((long double)this->collision_info.contact_plane.N.x))));
0050a40c          float s_1;
0050a40c          float z_1;
0050a40c          
0050a40c          if (ecx_1 == 0)
0050a40c          {
0050a4f6              long double x87_r7_22 = ((long double)arg3);
0050a4fa              long double temp2_1 = ((long double)0f);
0050a4fa              (x87_r7_22 - temp2_1);
0050a500              int32_t eax_4;
0050a500              eax_4 = ((((x87_r7_22 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_22, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_22 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050a500              
0050a505              if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) != 0)
0050a505              {
0050a529                  float var_4_1 = ((float)(((long double)arg3) * ((long double)this->collision_info.contact_plane.N.z)));
0050a533                  __return_1 = ((float)(((long double)x) - (((long double)arg3) * ((long double)this->collision_info.contact_plane.N.x))));
0050a53b                  long double x87_r5_8 = ((long double)s);
0050a53f                  x = __return_1;
0050a545                  s_1 = ((float)(x87_r5_8 - (((long double)arg3) * ((long double)this->collision_info.contact_plane.N.y))));
0050a54f                  s = s_1;
0050a55d                  z_1 = ((float)(((long double)z) - ((long double)var_4_1)));
0050a565                  z = z_1;
0050a505              }
0050a505              else
0050a50e                  Plane::snap_to_plane(&this->collision_info.contact_plane, &x);
0050a40c          }
0050a40c          else
0050a40c          {
0050a42a              __return_1 = ((float)((((long double)this->collision_info.sliding_normal.z) * ((long double)this->collision_info.contact_plane.N.y)) - (((long double)this->collision_info.sliding_normal.y) * ((long double)this->collision_info.contact_plane.N.z))));
0050a441              float var_14 = ((float)((((long double)this->collision_info.sliding_normal.x) * ((long double)this->collision_info.contact_plane.N.z)) - (((long double)this->collision_info.sliding_normal.z) * ((long double)this->collision_info.contact_plane.N.x))));
0050a458              float var_10 = ((float)((((long double)this->collision_info.sliding_normal.y) * ((long double)this->collision_info.contact_plane.N.x)) - (((long double)this->collision_info.sliding_normal.x) * ((long double)this->collision_info.contact_plane.N.y))));
0050a458              
0050a463              if (AC1Legacy::Vector3::normalize_check_small(&__return_1) == 0)
0050a463              {
0050a4b4                  long double x87_r7_21 = (((((long double)var_10) * ((long double)z)) + (((long double)var_14) * ((long double)s))) + (((long double)__return_1) * ((long double)x)));
0050a4c8                  float z_2 = ((float)(((long double)var_10) * x87_r7_21));
0050a4d2                  z_1 = z_2;
0050a4d6                  __return_1 = ((float)(((long double)__return_1) * x87_r7_21));
0050a4de                  x = __return_1;
0050a4e2                  s_1 = ((float)(((long double)var_14) * x87_r7_21));
0050a4ea                  s = s_1;
0050a4f0                  z = z_2;
0050a463              }
0050a463              else
0050a463              {
0050a489                  x = __return_1;
0050a48d                  __builtin_memset(&s, 0, 0x14);
0050a463              }
0050a40c          }
0050a40c          
0050a571          if (this->collision_info.contact_plane_is_water == 0)
0050a571          {
0050a577              uint32_t contact_plane_cell_id = this->collision_info.contact_plane_cell_id;
0050a577              
0050a57f              if (contact_plane_cell_id != 0)
0050a57f              {
0050a592                  LandDefs::get_block_offset(&__return_1, this->sphere_path.check_pos.objcell_id, contact_plane_cell_id);
0050a597                  class CSphere* global_sphere = this->sphere_path.global_sphere;
0050a5bf                  long double x87_r7_31 = ((((((long double)global_sphere->center.z) - ((long double)z_1)) * ((long double)this->collision_info.contact_plane.N.z)) + ((((long double)global_sphere->center.y) - ((long double)s_1)) * ((long double)this->collision_info.contact_plane.N.y))) + ((((long double)global_sphere->center.x) - ((long double)__return_1)) * ((long double)this->collision_info.contact_plane.N.x)));
0050a5c1                  long double x87_r7_32 = (x87_r7_31 + ((long double)this->collision_info.contact_plane.d));
0050a5cf                  (x87_r7_32 - (((long double)global_sphere->radius) - ((long double)0.000199999995f)));
0050a5d3                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050a5d3                  
0050a5d6                  if (!(p_1))
0050a5d6                  {
0050a5df                      long double x87_r7_34 = ((((long double)global_sphere->radius) - x87_r7_32) / ((long double)this->collision_info.contact_plane.N.z));
0050a5e4                      long double x87_r6_33 = fabsl(x87_r7_34);
0050a5e6                      long double x87_r5_16 = ((long double)global_sphere->radius);
0050a5e9                      (x87_r5_16 - x87_r6_33);
0050a5e9                      
0050a5f0                      if ((*(uint8_t*)((char*)((((x87_r5_16 < x87_r6_33) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_16, x87_r6_33))) ? 1 : 0) << 0xa) | ((((x87_r5_16 == x87_r6_33) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0050a5f0                      {
0050a5fa                          float var_10_1 = ((float)x87_r7_34);
0050a602                          __return_1 = 0f;
0050a60a                          int32_t var_14_1 = 0;
0050a612                          SPHEREPATH::add_offset_to_check_pos(&this->sphere_path, &__return_1);
0050a5f0                      }
0050a5d6                  }
0050a57f              }
0050a571          }
0050a3de      }
0050a3de      else if (ecx_1 != 0)
0050a61e      {
0050a644          long double x87_r7_38 = (((((long double)x) * ((long double)this->collision_info.sliding_normal.x)) + (((long double)z) * ((long double)this->collision_info.sliding_normal.z))) + (((long double)s) * ((long double)this->collision_info.sliding_normal.y)));
0050a656          float var_8_1 = ((float)(x87_r7_38 * ((long double)this->collision_info.sliding_normal.y)));
0050a662          float var_4_2 = ((float)(x87_r7_38 * ((long double)this->collision_info.sliding_normal.z)));
0050a66c          __return_1 = ((float)(((long double)x) - (x87_r7_38 * ((long double)this->collision_info.sliding_normal.x))));
0050a674          x = __return_1;
0050a692          s = ((float)(((long double)s) - ((long double)var_8_1)));
0050a69e          z = ((float)(((long double)z) - ((long double)var_4_2)));
0050a61e      }
0050a6b3      float s_2 = s;
0050a6b7      __return->x = ((float)((long double)x));
0050a6bd      __return->y = s_2;
0050a6c0      __return->z = z;
0050a370  }

0050a6ca                                90 90 90 90 90 90                                                            ......

0050a6d0  enum TransitionState __thiscall CTransition::cliff_slide(class CTransition* this, class Plane const* arg2)

0050a6d0  {
0050a6f0      long double x87_r7_2 = ((((long double)arg2->N.y) * ((long double)this->collision_info.last_known_contact_plane.N.z)) - (((long double)arg2->N.z) * ((long double)this->collision_info.last_known_contact_plane.N.y)));
0050a718      long double x87_r5_5 = (((((long double)arg2->N.x) * ((long double)this->collision_info.last_known_contact_plane.N.y)) - (((long double)arg2->N.y) * ((long double)this->collision_info.last_known_contact_plane.N.x))) * ((long double)0f));
0050a722      float var_30 = ((float)(x87_r5_5 - ((((long double)this->collision_info.last_known_contact_plane.N.x) * ((long double)arg2->N.z)) - (((long double)this->collision_info.last_known_contact_plane.N.z) * ((long double)arg2->N.x)))));
0050a72a      float var_2c = ((float)(x87_r7_2 - x87_r5_5));
0050a740      float var_28 = ((float)((x87_r5_5 * ((long double)0f)) - (x87_r7_2 * ((long double)0f))));
0050a740      
0050a74b      if (AC1Legacy::Vector3::normalize_check_small(&var_30) != 0)
0050a756          return 1;
0050a756      
0050a770      float __return;
0050a770      LandDefs::get_block_offset(&__return, this->sphere_path.curr_pos.objcell_id, this->sphere_path.check_pos.objcell_id);
0050a775      class CSphere* global_sphere = this->sphere_path.global_sphere;
0050a778      class AC1Legacy::Vector3* global_curr_center = this->sphere_path.global_curr_center;
0050a792      class AC1Legacy::Vector3* var_3c_1 = &__return;
0050a7c9      float var_1c;
0050a7c9      long double x87_r7_10 = ((((((long double)var_1c) + ((long double)((float)(((long double)global_sphere->center.z) - ((long double)global_curr_center->z))))) * ((long double)var_28)) + ((((long double)global_sphere->center.y) - ((long double)global_curr_center->y)) * ((long double)var_2c))) + (((long double)((float)(((long double)__return) + (((long double)global_sphere->center.x) - ((long double)global_curr_center->x))))) * ((long double)var_30)));
0050a7cb      long double temp1 = ((long double)0.0);
0050a7cb      (x87_r7_10 - temp1);
0050a7d1      global_curr_center = ((((x87_r7_10 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0050a7d6      class AC1Legacy::Vector3* edx;
0050a7d6      
0050a7d6      if ((*(uint8_t*)((char*)global_curr_center)[1] & 0x41) != 0)
0050a7d6      {
0050a849          float var_1c_3 = ((float)(((long double)var_28) * x87_r7_10));
0050a84d          __return = ((float)(((long double)var_30) * x87_r7_10));
0050a851          float var_20_3 = ((float)(((long double)var_2c) * x87_r7_10));
0050a857          SPHEREPATH::add_offset_to_check_pos(&this->sphere_path, var_3c_1);
0050a85c          edx = &var_30;
0050a7d6      }
0050a7d6      else
0050a7d6      {
0050a7d8          long double x87_r7_11 = -(x87_r7_10);
0050a7f6          float var_1c_1 = ((float)(((long double)var_28) * x87_r7_11));
0050a7fa          __return = ((float)(((long double)var_30) * x87_r7_11));
0050a7fe          float var_20_1 = ((float)(((long double)var_2c) * x87_r7_11));
0050a804          SPHEREPATH::add_offset_to_check_pos(&this->sphere_path, var_3c_1);
0050a80d          edx = &__return;
0050a813          __return = ((float)-(((long double)var_30)));
0050a81d          float var_20_2 = ((float)-(((long double)var_2c)));
0050a827          float var_1c_2 = ((float)-(((long double)var_28)));
0050a7d6      }
0050a7d6      
0050a867      COLLISIONINFO::set_collision_normal(&this->collision_info, edx);
0050a876      return 3;
0050a6d0  }

0050a879                                                                             90 90 90 90 90 90 90                           .......

0050a880  void __fastcall SPHEREPATH::save_check_pos(class SPHEREPATH* this)

0050a880  {
0050a886      this->backup_cell = this->check_cell;
0050a898      this->backup_check_pos.objcell_id = this->check_pos.objcell_id;
0050a8a5      Frame::operator=(&this->backup_check_pos.frame, &this->check_pos.frame);
0050a880  }

0050a8ab                                   90 90 90 90 90                                                             .....

0050a8b0  void __thiscall SPHEREPATH::set_check_pos(class SPHEREPATH* this, class Position const* arg2, class CObjCell* arg3)

0050a8b0  {
0050a8bd      this->check_pos.objcell_id = arg2->objcell_id;
0050a8ca      Frame::operator=(&this->check_pos.frame, &arg2->frame);
0050a8d7      this->check_cell = arg3;
0050a8dd      this->cell_array_valid = 0;
0050a8e7      SPHEREPATH::cache_global_sphere(this, nullptr);
0050a8b0  }


0050a8f0  class Position* __thiscall SPHEREPATH::get_walkable_pos(class SPHEREPATH const* this, class Position* __return)

0050a8f0  {
0050a8f5      __return->vtable = 0x796910;
0050a90b      __return->objcell_id = this->walkable_pos.objcell_id;
0050a90e      Frame::operator=(&__return->frame, &this->walkable_pos.frame);
0050a916      return __return;
0050a8f0  }

0050a919                                                                             90 90 90 90 90 90 90                           .......

0050a920  void __fastcall CELLARRAY::CELLARRAY(class CELLARRAY* this)

0050a920  {
0050a929      this->num_cells = 0;
0050a92c      void* eax = operator new[](0x44);
0050a936      void* edi;
0050a936      
0050a936      if (eax == 0)
0050a952          edi = nullptr;
0050a936      else
0050a936      {
0050a93f          edi = ((char*)eax + 4);
0050a945          *(uint32_t*)eax = 8;
0050a94b          `vector constructor iterator'(edi, 8, 8, Vector3::Vector3);
0050a936      }
0050a936      
0050a954      this->cells.data = edi;
0050a957      this->cells.next_available = 0;
0050a95a      this->cells.sizeOf = 8;
0050a961      this->cells.blocksize = 8;
0050a969      this->num_cells = 0;
0050a96c      this->added_outside = 0;
0050a96e      this->do_not_load_cells = 0;
0050a971      this->cells.blocksize = 8;
0050a920  }

0050a97d                                                                                         90 90 90                               ...

0050a980  void __fastcall CTransition::CTransition(class CTransition* this)

0050a980  {
0050a989      this->object_info.object = 0;
0050a98b      this->object_info.state = 0;
0050a98e      this->object_info.targetID = 0;
0050a991      SPHEREPATH::SPHEREPATH(&this->sphere_path);
0050a996      this->collision_info.collide_object.data = 0;
0050a9a2      __builtin_memset(&this->collision_info.collide_object.next_available, 0, 0x14);
0050a9a8      this->collision_info.collide_object.blocksize = 0x80;
0050a9b8      this->collision_info.last_known_contact_plane_valid = 0;
0050a9be      this->collision_info.contact_plane_valid = 0;
0050a9c4      this->collision_info.sliding_normal_valid = 0;
0050a9ca      this->collision_info.collision_normal_valid = 0;
0050a9d0      this->collision_info.num_collide_object = 0;
0050a9e2      this->collision_info.contact_plane_cell_id = 0;
0050a9ee      CELLARRAY::CELLARRAY(&this->cell_array);
0050a9f5      CTransition::init(this);
0050a980  }

0050a9ff                                                                                               90                                 .

0050aa00  int32_t __thiscall CTransition::check_collisions(class CTransition* this, class CPhysicsObj const* arg2)

0050aa00  {
0050aa04      class CObjCell* curr_cell = this->sphere_path.curr_cell;
0050aa0b      this->sphere_path.insert_type = PLACEMENT_INSERT;
0050aa21      this->sphere_path.check_pos.objcell_id = this->sphere_path.curr_pos.objcell_id;
0050aa31      Frame::operator=(&this->sphere_path.check_pos.frame, &this->sphere_path.curr_pos.frame);
0050aa21      this->sphere_path.check_cell = curr_cell;
0050aa21      this->sphere_path.cell_array_valid = 0;
0050aa4a      SPHEREPATH::cache_global_sphere(&this->sphere_path, nullptr);
0050aa59      int32_t eax_2 = (CPhysicsObj::FindObjCollisions(arg2, this) - 1);
0050aa5a      int32_t eax_3 = -(eax_2);
0050aa63      return -((eax_3 - eax_3));
0050aa00  }

0050aa66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0050aa70  enum TransitionState __thiscall CTransition::validate_transition(class CTransition* this, enum TransitionState arg2, int32_t* arg3)

0050aa70  {
0050aa78      enum TransitionState result = arg2;
0050aa88      *(uint32_t*)arg3 = 0;
0050aa8e      arg3 = 1;
0050aa92      int32_t var_10;
0050aa92      
0050aa92      if (result != OK_TS)
0050aa92      {
0050aac2      label_50aac2:
0050aac2          arg3 = nullptr;
0050aac2          
0050aaca          if (result == OK_TS)
0050aaca              goto label_50aba9;
0050aaca          
0050aad9          if ((result > OK_TS && result <= SLID_TS))
0050aad9          {
0050aaed              if (this->collision_info.last_known_contact_plane_valid != 0)
0050aaed              {
0050aaf1                  OBJECTINFO::kill_velocity(this);
0050aaf6                  class AC1Legacy::Vector3* global_curr_center = this->sphere_path.global_curr_center;
0050ab19                  long double x87_r7_6 = fabsl(((((((long double)global_curr_center->z) * ((long double)this->collision_info.last_known_contact_plane.N.z)) + (((long double)global_curr_center->y) * ((long double)this->collision_info.last_known_contact_plane.N.y))) + (((long double)global_curr_center->x) * ((long double)this->collision_info.last_known_contact_plane.N.x))) + ((long double)this->collision_info.last_known_contact_plane.d)));
0050ab21                  long double x87_r6_6 = (((long double)0.000199999995f) + ((long double)this->sphere_path.global_sphere->radius));
0050ab24                  (x87_r6_6 - x87_r7_6);
0050ab26                  class CSphere* eax_3;
0050ab26                  eax_3 = ((((x87_r6_6 < x87_r7_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_6, x87_r7_6))) ? 1 : 0) << 0xa) | ((((x87_r6_6 == x87_r7_6) ? 1 : 0) << 0xe) | 0))));
0050ab26                  
0050ab2b                  if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
0050ab2b                  {
0050ab37                      COLLISIONINFO::set_contact_plane(&this->collision_info, &this->collision_info.last_known_contact_plane, this->collision_info.last_known_contact_plane_is_water);
0050ab42                      this->collision_info.contact_plane_cell_id = this->collision_info.last_known_contact_plane_cell_id;
0050ab42                      
0050ab4c                      if ((this->object_info.state & 2) != 0)
0050ab4e                          arg3 = 1;
0050ab2b                  }
0050aaed              }
0050aaed              
0050ab5a              if (this->collision_info.collision_normal_valid == 0)
0050ab5a              {
0050ab63                  var_10 = 0;
0050ab6b                  int32_t var_c_1 = 0;
0050ab73                  int32_t var_8_1 = 0x3f800000;
0050ab7b                  COLLISIONINFO::set_collision_normal(&this->collision_info, &var_10);
0050ab5a              }
0050ab5a              
0050ab91              SPHEREPATH::set_check_pos(&this->sphere_path, &this->sphere_path.curr_pos, this->sphere_path.curr_cell);
0050ab9a              CTransition::build_cell_array(this, nullptr);
0050ab9f              result = OK_TS;
0050aad9          }
0050aa92      }
0050aa92      else
0050aa92      {
0050aaa0          if (this->sphere_path.check_pos.objcell_id == this->sphere_path.curr_pos.objcell_id)
0050aaa0          {
0050aaba              if (Frame::is_equal(&this->sphere_path.check_pos.frame, &this->sphere_path.curr_pos.frame) == 0)
0050aaba                  goto label_50aba9;
0050aaba              
0050aaba              goto label_50aac2;
0050aaa0          }
0050aaa0          
0050aba9      label_50aba9:
0050aba9          class CObjCell* check_cell = this->sphere_path.check_cell;
0050abaf          this->sphere_path.curr_pos.objcell_id = this->sphere_path.check_pos.objcell_id;
0050abc5          Frame::operator=(&this->sphere_path.curr_pos.frame, &this->sphere_path.check_pos.frame);
0050abaf          this->sphere_path.curr_cell = check_cell;
0050abd2          SPHEREPATH::cache_global_curr_center(&this->sphere_path);
0050abdd          class CObjCell* curr_cell = this->sphere_path.curr_cell;
0050abaf          this->sphere_path.check_pos.objcell_id = this->sphere_path.curr_pos.objcell_id;
0050abf6          Frame::operator=(&this->sphere_path.check_pos.frame, &this->sphere_path.curr_pos.frame);
0050abaf          this->sphere_path.check_cell = curr_cell;
0050abaf          this->sphere_path.cell_array_valid = 0;
0050ac0f          SPHEREPATH::cache_global_sphere(&this->sphere_path, nullptr);
0050aa92      }
0050aa92      
0050ac21      if (this->collision_info.collision_normal_valid != 0)
0050ac30          COLLISIONINFO::set_sliding_normal(&this->collision_info, &this->collision_info.collision_normal);
0050ac30      
0050ac4a      if (((this->object_info.state & 4) == 0 && (*(uint8_t*)((char*)((int16_t)this->object_info.object->state))[1] & 4) != 0))
0050ac4a      {
0050ac56          if (arg3 != 0)
0050acf5              this->collision_info.frames_stationary_fall = 0;
0050ac56          else
0050ac56          {
0050ac5c              int32_t frames_stationary_fall = this->collision_info.frames_stationary_fall;
0050ac5c              
0050ac64              if (frames_stationary_fall == 0)
0050ac66                  this->collision_info.frames_stationary_fall = 1;
0050ac64              else if (frames_stationary_fall != 1)
0050ac73              {
0050ac81                  class CSphere* global_sphere = this->sphere_path.global_sphere;
0050ac84                  this->collision_info.frames_stationary_fall = 3;
0050ac9f                  long double x87_r7_9 = ((((long double)global_sphere->center.y) + ((long double)global_sphere->center.x)) * ((long double)0f));
0050aca8                  var_10 = 0;
0050acb3                  int32_t var_c_2 = 0;
0050acbb                  int32_t var_8_2 = 0x3f800000;
0050acc6                  float var_4_1 = ((float)(((long double)global_sphere->radius) - (x87_r7_9 + ((long double)global_sphere->center.z))));
0050acca                  COLLISIONINFO::set_contact_plane(&this->collision_info, &var_10, 0);
0050acd9                  this->collision_info.contact_plane_cell_id = this->sphere_path.check_pos.objcell_id;
0050acd9                  
0050acdf                  if ((this->object_info.state & 1) == 0)
0050acdf                  {
0050ace8                      COLLISIONINFO::set_collision_normal(&this->collision_info, &var_10);
0050aced                      this->collision_info.collided_with_environment = 1;
0050acdf                  }
0050ac73              }
0050ac73              else
0050ac75                  this->collision_info.frames_stationary_fall = 2;
0050ac56          }
0050ac4a      }
0050ac4a      
0050acff      int32_t contact_plane_valid = this->collision_info.contact_plane_valid;
0050ad07      this->collision_info.last_known_contact_plane_valid = contact_plane_valid;
0050ad07      
0050ad0d      if (contact_plane_valid != 0)
0050ad0d      {
0050ad15          this->collision_info.last_known_contact_plane.N.x = this->collision_info.contact_plane.N.x;
0050ad15          this->collision_info.last_known_contact_plane.N.y = this->collision_info.contact_plane.N.y;
0050ad15          this->collision_info.last_known_contact_plane.N.z = this->collision_info.contact_plane.N.z;
0050ad15          this->collision_info.last_known_contact_plane.d = this->collision_info.contact_plane.d;
0050ad41          this->collision_info.last_known_contact_plane_cell_id = this->collision_info.contact_plane_cell_id;
0050ad47          this->collision_info.last_known_contact_plane_is_water = this->collision_info.contact_plane_is_water;
0050ad0d      }
0050ad0d      
0050ad5a      if (this->collision_info.contact_plane_valid == 0)
0050ad5a      {
0050ada4          this->object_info.state &= 0xfffffffc;
0050adaf          return result;
0050ad5a      }
0050ad5a      
0050ad6a      this->object_info.state |= 1;
0050ad72      bool cond:5 = OBJECTINFO::is_valid_walkable(this, &this->collision_info.contact_plane) == 0;
0050ad74      int32_t state = this->object_info.state;
0050ad74      
0050ad77      if (!(cond:5))
0050ad77      {
0050ad7d          this->object_info.state = (state | 2);
0050ad88          return result;
0050ad77      }
0050ad77      
0050ad8f      this->object_info.state = (state & 0xfffffffd);
0050ad9a      return result;
0050aa70  }

0050adb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050adc0  enum TransitionState __thiscall CTransition::validate_placement_transition(class CTransition* this, enum TransitionState arg2, int32_t* arg3)

0050adc0  {
0050adc5      *(uint32_t*)arg3 = 0;
0050adcb      class CObjCell* check_cell = this->sphere_path.check_cell;
0050adcb      
0050add3      if (check_cell == 0)
0050addb          return 2;
0050addb      
0050ade6      if (arg2 == OK_TS)
0050ade6      {
0050ae12          this->sphere_path.curr_pos.objcell_id = this->sphere_path.check_pos.objcell_id;
0050ae28          Frame::operator=(&this->sphere_path.curr_pos.frame, &this->sphere_path.check_pos.frame);
0050ae12          this->sphere_path.curr_cell = check_cell;
0050ae35          SPHEREPATH::cache_global_curr_center(&this->sphere_path);
0050ade6      }
0050ade6      else if ((arg2 > OK_TS && (arg2 <= SLID_TS && this->sphere_path.placement_allows_sliding != 0)))
0050adff          COLLISIONINFO::init(&this->collision_info);
0050adff      
0050ae3f      return arg2;
0050adc0  }

0050ae42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050ae50  enum TransitionState __thiscall CTransition::check_other_cells(class CTransition* this, class CObjCell* arg2)

0050ae50  {
0050ae68      int32_t i = 0;
0050ae6a      int32_t result = 1;
0050ae70      class CObjCell* var_4c = nullptr;
0050ae74      this->sphere_path.cell_array_valid = 1;
0050ae7a      this->sphere_path.hits_interior_cell = 0;
0050ae80      CObjCell::find_cell_list(&this->cell_array, &var_4c, &this->sphere_path);
0050ae80      
0050ae90      if (this->cell_array.num_cells > 0)
0050ae90      {
0050aec9          do
0050aec9          {
0050ae98              int32_t* cell = this->cell_array.cells.data[i].cell;
0050ae98              
0050aea4              if ((cell != 0 && cell != arg2))
0050aea4              {
0050aeaf                  result = *(uint32_t*)(*(uint32_t*)cell + 0x88)(this);
0050aeaf                  
0050aeb7                  if ((result - 1) <= 3)
0050aeb7                      switch (result)
0050aeb7                      {
0050afcf                          case 2:
0050afcf                          case 3:
0050afcf                          {
0050afcf                              return result;
0050afcf                              break;
0050afcf                          }
0050aef3                          case 4:
0050aef3                          {
0050aef3                              this->collision_info.contact_plane_valid = 0;
0050aef9                              this->collision_info.contact_plane_is_water = 0;
0050af07                              return result;
0050aef3                              break;
0050aef3                          }
0050aeb7                      }
0050aea4              }
0050aea4              
0050aec6              i += 1;
0050aec9          } while (i < this->cell_array.num_cells);
0050ae90      }
0050ae90      
0050aecb      class CObjCell* eax_5 = var_4c;
0050aed1      this->sphere_path.check_cell = eax_5;
0050aed1      
0050aed7      if (eax_5 != 0)
0050aed7      {
0050aedf          SPHEREPATH::adjust_check_pos(&this->sphere_path, eax_5->m_DID.id);
0050aeed          return result;
0050aed7      }
0050aed7      
0050af12      if (this->sphere_path.step_down != 0)
0050af20          return 2;
0050af20      
0050af34      int32_t var_48_1 = 0x796910;
0050af3c      uint32_t objcell_id = this->sphere_path.check_pos.objcell_id;
0050af40      void var_40;
0050af40      class AC1Legacy::Vector3* edx_3 = Frame::operator=(&var_40, &this->sphere_path.check_pos.frame);
0050af45      uint32_t objcell_id_1 = objcell_id;
0050af45      
0050af57      if (((uint32_t)objcell_id_1) < 0x100)
0050af57      {
0050af5d          void var_c;
0050af5d          void* var_60_4 = &var_c;
0050af62          uint32_t* var_64_1 = &objcell_id;
0050af63          LandDefs::adjust_to_outside(objcell_id_1, edx_3);
0050af68          objcell_id_1 = objcell_id;
0050af57      }
0050af57      
0050af73      if (objcell_id_1 == 0)
0050afc1          return 2;
0050afc1      
0050af78      SPHEREPATH::adjust_check_pos(&this->sphere_path, objcell_id_1);
0050ae59      this->sphere_path.check_pos.objcell_id = objcell_id;
0050af92      Frame::operator=(&this->sphere_path.check_pos.frame, &var_40);
0050ae59      this->sphere_path.check_cell = nullptr;
0050ae59      this->sphere_path.cell_array_valid = 0;
0050afa6      SPHEREPATH::cache_global_sphere(&this->sphere_path, nullptr);
0050afac      this->sphere_path.cell_array_valid = 1;
0050afbe      return result;
0050ae50  }

0050afd2                                                        8b ff                                                        ..
0050afd4  uint32_t jump_table_50afd4[0x4] = 
0050afd4  {
0050afd4      [0x0] =  0x0050aec0
0050afd8      [0x1] =  0x0050afc6
0050afdc      [0x2] =  0x0050afc6
0050afe0      [0x3] =  0x0050aef0
0050afe4  }

0050afe4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0050aff0  void __thiscall CTransition::check_walkable(class CTransition* this, float arg2)

0050aff0  {
0050affb      if (((this->object_info.state & 2) != 0 && SPHEREPATH::check_walkables(&this->sphere_path) == 0))
0050affb      {
0050b013          uint32_t objcell_id = this->sphere_path.check_pos.objcell_id;
0050b01b          class CObjCell* check_cell = this->sphere_path.check_cell;
0050b02c          int32_t var_48 = 0x796910;
0050b034          uint32_t objcell_id_1 = objcell_id;
0050b038          void var_40;
0050b038          Frame::operator=(&var_40, &this->sphere_path.check_pos.frame);
0050b03d          long double x87_r7 = ((long double)this->object_info.step_down_height);
0050b047          this->sphere_path.walkable_allowance = arg2;
0050b04d          this->sphere_path.check_walkable = 1;
0050b04d          
0050b057          if (this->sphere_path.num_sphere < 2)
0050b057          {
0050b059              class CSphere* global_sphere = this->sphere_path.global_sphere;
0050b05c              long double x87_r6_1 = ((long double)global_sphere->radius);
0050b05f              long double x87_r6_2 = (x87_r6_1 + x87_r6_1);
0050b063              (x87_r7 - x87_r6_2);
0050b063              
0050b06a              if ((*(uint8_t*)((char*)((((x87_r7 < x87_r6_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, x87_r6_2))) ? 1 : 0) << 0xa) | ((((x87_r7 == x87_r6_2) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0050b071                  x87_r7 = (((long double)global_sphere->radius) * ((long double)0.5f));
0050b057          }
0050b057          
0050b07a          long double x87_r6_3 = ((long double)this->sphere_path.global_sphere->radius);
0050b07d          long double x87_r6_4 = (x87_r6_3 + x87_r6_3);
0050b081          (x87_r7 - x87_r6_4);
0050b083          class CSphere* eax_3;
0050b083          eax_3 = ((((x87_r7 < x87_r6_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, x87_r6_4))) ? 1 : 0) << 0xa) | ((((x87_r7 == x87_r6_4) ? 1 : 0) << 0xe) | 0x3800))));
0050b083          
0050b088          if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
0050b08a              x87_r7 = (x87_r7 * ((long double)0.5f));
0050b08a          
0050b097          float var_4c = ((float)-(x87_r7));
0050b09d          int32_t var_54 = 0;
0050b0a5          int32_t var_50 = 0;
0050b0ad          SPHEREPATH::add_offset_to_check_pos(&this->sphere_path, &var_54);
0050b0b6          enum TransitionState eax_4 = CTransition::transitional_insert(this, 1);
0050b0c5          this->sphere_path.check_walkable = 0;
0050b0cf          SPHEREPATH::set_check_pos(&this->sphere_path, &var_48, check_cell);
0050b0dc          int32_t eax_5;
0050b0dc          eax_5 = eax_4 != OK_TS;
0050affb      }
0050aff0  }

0050b0f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0050b100  void __fastcall SPHEREPATH::restore_check_pos(class SPHEREPATH* this)

0050b100  {
0050b10a      class CObjCell* backup_cell = this->backup_cell;
0050b11d      this->check_pos.objcell_id = this->backup_check_pos.objcell_id;
0050b123      Frame::operator=(&this->check_pos.frame, &this->backup_check_pos.frame);
0050b12c      this->check_cell = backup_cell;
0050b132      this->cell_array_valid = 0;
0050b13c      SPHEREPATH::cache_global_sphere(this, nullptr);
0050b100  }

0050b144              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0050b150  class CTransition* CTransition::makeTransition()

0050b150  {
0050b15e      if ((1 & (*(uint8_t*)$S109)) == 0)
0050b15e      {
0050b169          $S109 |= 1;
0050b16f          class CTransition* esi_1 = &transit;
0050b174          int32_t i_1 = 0xa;
0050b18e          int32_t i;
0050b18e          
0050b18e          do
0050b18e          {
0050b182              CTransition::CTransition(esi_1);
0050b187              esi_1 = &esi_1[1];
0050b18d              i = i_1;
0050b18d              i_1 -= 1;
0050b18e          } while (i != 1);
0050b195          atexit($E110);
0050b15e      }
0050b15e      
0050b19e      int32_t CTransition::transition_level_1 = CTransition::transition_level;
0050b19e      
0050b1a6      if (CTransition::transition_level_1 >= 0xa)
0050b1c9          return 0;
0050b1c9      
0050b1b7      CTransition::init(((CTransition::transition_level_1 * 0x314) + 0x841ca8));
0050b1bc      CTransition::transition_level += 1;
0050b1c5      return ((CTransition::transition_level_1 * 0x314) + 0x841ca8);
0050b150  }

0050b1ca                                90 90 90 90 90 90                                                            ......

0050b1d0  enum TransitionState __fastcall CTransition::placement_insert(class CTransition* this)

0050b1d0  {
0050b1d3      class CObjCell* check_cell = this->sphere_path.check_cell;
0050b1d3      
0050b1db      if (check_cell == 0)
0050b1e3          return 2;
0050b1e3      
0050b1e9      enum TransitionState result = CTransition::insert_into_cell(this, check_cell, 3);
0050b1e9      
0050b1f1      if (result != OK_TS)
0050b202          return result;
0050b202      
0050b1fc      return CTransition::check_other_cells(this, this->sphere_path.check_cell);
0050b1d0  }

0050b203           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0050b210  enum TransitionState __thiscall CTransition::validate_placement(class CTransition* this, enum TransitionState arg2, int32_t arg3)

0050b210  {
0050b214      class CObjCell* check_cell = this->sphere_path.check_cell;
0050b214      
0050b21c      if (check_cell == 0)
0050b225          return 2;
0050b225      
0050b230      if (arg2 == OK_TS)
0050b230      {
0050b264          this->sphere_path.curr_pos.objcell_id = this->sphere_path.check_pos.objcell_id;
0050b27a          Frame::operator=(&this->sphere_path.curr_pos.frame, &this->sphere_path.check_pos.frame);
0050b264          this->sphere_path.curr_cell = check_cell;
0050b287          SPHEREPATH::cache_global_curr_center(&this->sphere_path);
0050b230      }
0050b230      else if ((arg2 > COLLIDED_TS && (arg2 <= SLID_TS && arg3 != 0)))
0050b25a          return CTransition::validate_placement(this, CTransition::placement_insert(this), 0);
0050b25a      
0050b292      return arg2;
0050b210  }

0050b295                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0050b2a0  int32_t __thiscall CTransition::step_down(class CTransition* this, float arg2, float arg3)

0050b2a0  {
0050b2ae      this->sphere_path.neg_poly_hit = 0;
0050b2b8      this->sphere_path.step_down = 1;
0050b2ab      this->sphere_path.step_down_amt = arg2;
0050b2ab      this->sphere_path.walk_interp = 1f;
0050b2ab      
0050b2da      if (this->sphere_path.step_up == 0)
0050b2da      {
0050b2ab          this->sphere_path.cell_array_valid = 0;
0050b2ab          this->sphere_path.check_pos.frame.m_fOrigin.x = this->sphere_path.check_pos.frame.m_fOrigin.x;
0050b2ab          this->sphere_path.check_pos.frame.m_fOrigin.z = ((float)(((long double)((float)-(((long double)arg2)))) + ((long double)this->sphere_path.check_pos.frame.m_fOrigin.z)));
0050b319          int32_t var_c = 0;
0050b321          int32_t var_8_1 = 0;
0050b2ab          this->sphere_path.check_pos.frame.m_fOrigin.y = this->sphere_path.check_pos.frame.m_fOrigin.y;
0050b32f          SPHEREPATH::cache_global_sphere(&this->sphere_path, &var_c);
0050b2da      }
0050b2da      
0050b33d      bool cond:0 = CTransition::transitional_insert(this, 5) != OK_TS;
0050b340      this->sphere_path.step_down = 0;
0050b340      
0050b354      if ((!(cond:0) && this->collision_info.contact_plane_valid != 0))
0050b354      {
0050b356          long double x87_r7_5 = ((long double)this->collision_info.contact_plane.N.z);
0050b35c          long double temp1_1 = ((long double)arg3);
0050b35c          (x87_r7_5 - temp1_1);
0050b360          int32_t eax_2;
0050b360          eax_2 = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0050b362          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050b362          
0050b365          if (p_1)
0050b365          {
0050b377              int32_t eax_5;
0050b377              int80_t st0_1;
0050b377              
0050b377              if (((*(uint8_t*)((char*)((int16_t)this->object_info.state))[1] & 2) != 0 && this->sphere_path.step_up == 0))
0050b380                  st0_1 = CTransition::check_walkable(this, arg3);
0050b380              
0050b387              if ((((*(uint8_t*)((char*)((int16_t)this->object_info.state))[1] & 2) == 0 || this->sphere_path.step_up != 0) || eax_5 != 0))
0050b387              {
0050b2ab                  this->sphere_path.backup = this->sphere_path.insert_type;
0050b2ab                  this->sphere_path.insert_type = PLACEMENT_INSERT;
0050b3b3                  int32_t result;
0050b3b3                  result = CTransition::transitional_insert(this, 1) == OK_TS;
0050b2ab                  this->sphere_path.insert_type = this->sphere_path.backup;
0050b3c3                  return result;
0050b387              }
0050b365          }
0050b354      }
0050b354      
0050b3cd      return 0;
0050b2a0  }


0050b3d0  int32_t __thiscall CTransition::edge_slide(class CTransition* this, enum TransitionState* arg2, float arg3, float arg4)

0050b3d0  {
0050b3d8      int16_t state = ((int16_t)this->object_info.state);
0050b3d8      
0050b3e7      if (((state & 2) == 0 || (*(uint8_t*)((char*)state)[1] & 2) == 0))
0050b3e7      {
0050b5a0          this->sphere_path.walkable = nullptr;
0050b59b          this->sphere_path.check_pos.objcell_id = this->sphere_path.backup_check_pos.objcell_id;
0050b5c5          Frame::operator=(&this->sphere_path.check_pos.frame, &this->sphere_path.backup_check_pos.frame);
0050b59b          this->sphere_path.check_cell = this->sphere_path.backup_cell;
0050b59b          this->sphere_path.cell_array_valid = 0;
0050b5d9          int32_t eax_14 = SPHEREPATH::cache_global_sphere(&this->sphere_path, nullptr);
0050b5e2          this->collision_info.contact_plane_valid = 0;
0050b5e8          this->collision_info.contact_plane_is_water = 0;
0050b5f4          this->sphere_path.cell_array_valid = 1;
0050b5fc          *(uint32_t*)arg2 = OK_TS;
0050b602          return eax_14;
0050b3e7      }
0050b3e7      
0050b3ed      int32_t contact_plane_valid = this->collision_info.contact_plane_valid;
0050b3ed      
0050b3f7      if (contact_plane_valid != 0)
0050b3f7      {
0050b3ff          (((long double)this->collision_info.contact_plane.N.z) - ((long double)arg4));
0050b405          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050b405          
0050b408          if (!(p_1))
0050b408          {
0050b40d              this->sphere_path.walkable = nullptr;
0050b413              SPHEREPATH::restore_check_pos(&this->sphere_path);
0050b42a              *(uint32_t*)arg2 = CTransition::cliff_slide(this, &this->collision_info.contact_plane);
0050b42d              this->collision_info.contact_plane_valid = 0;
0050b433              this->collision_info.contact_plane_is_water = 0;
0050b441              return 0;
0050b408          }
0050b3f7      }
0050b3f7      
0050b44a      if (this->sphere_path.walkable != 0)
0050b44a      {
0050b568          SPHEREPATH::restore_check_pos(&this->sphere_path);
0050b56d          this->collision_info.contact_plane_valid = 0;
0050b56d          this->collision_info.contact_plane_is_water = 0;
0050b57c          enum TransitionState eax_11 = SPHEREPATH::precipice_slide(&this->sphere_path, &this->collision_info);
0050b58a          int32_t ecx_17;
0050b58a          ecx_17 = eax_11 == COLLIDED_TS;
0050b590          *(uint32_t*)arg2 = eax_11;
0050b598          return ecx_17;
0050b44a      }
0050b44a      
0050b452      if (contact_plane_valid != 0)
0050b452      {
0050b531          this->sphere_path.walkable = nullptr;
0050b537          int32_t eax_9 = SPHEREPATH::restore_check_pos(&this->sphere_path);
0050b545          this->sphere_path.cell_array_valid = 1;
0050b54c          this->collision_info.contact_plane_valid = 0;
0050b552          this->collision_info.contact_plane_is_water = 0;
0050b55a          *(uint32_t*)arg2 = OK_TS;
0050b560          return eax_9;
0050b452      }
0050b452      
0050b458      class AC1Legacy::Vector3* global_curr_center = this->sphere_path.global_curr_center;
0050b45e      float* global_sphere = this->sphere_path.global_sphere;
0050b461      long double x87_r7_3 = (((long double)global_curr_center->z) - ((long double)global_sphere[2]));
0050b46e      long double x87_r6_1 = (((long double)global_curr_center->y) - ((long double)global_sphere[1]));
0050b478      float var_54 = ((float)(((long double)global_curr_center->x) - ((long double)*(uint32_t*)global_sphere)));
0050b47c      float var_50 = ((float)x87_r6_1);
0050b480      float var_4c = ((float)x87_r7_3);
0050b484      SPHEREPATH::add_offset_to_check_pos(&this->sphere_path, &var_54);
0050b495      CTransition::step_down(this, arg3, arg4);
0050b49a      this->collision_info.contact_plane_valid = 0;
0050b49a      this->collision_info.contact_plane_is_water = 0;
0050b4a8      int32_t eax_4 = SPHEREPATH::restore_check_pos(&this->sphere_path);
0050b4a8      
0050b4b3      if (this->sphere_path.walkable == 0)
0050b4b3      {
0050b4b9          this->sphere_path.walkable = nullptr;
0050b4c5          *(uint32_t*)arg2 = COLLIDED_TS;
0050b4cb          this->sphere_path.cell_array_valid = 1;
0050b4d7          return eax_4;
0050b4b3      }
0050b4b3      
0050b49a      this->collision_info.contact_plane_valid = 0;
0050b49a      this->collision_info.contact_plane_is_water = 0;
0050b4e0      float walkable_scale = this->sphere_path.walkable_scale;
0050b4f0      arg4 = walkable_scale;
0050b4fc      void __return;
0050b4fc      SPHEREPATH::cache_localspace_sphere(&this->sphere_path, SPHEREPATH::get_walkable_pos(&this->sphere_path, &__return), walkable_scale);
0050b507      SPHEREPATH::set_walkable_check_pos(&this->sphere_path, this->sphere_path.localspace_sphere);
0050b50f      enum TransitionState eax_7 = SPHEREPATH::precipice_slide(&this->sphere_path, &this->collision_info);
0050b51d      int32_t edx_1;
0050b51d      edx_1 = eax_7 == COLLIDED_TS;
0050b523      *(uint32_t*)arg2 = eax_7;
0050b52b      return edx_1;
0050b3d0  }

0050b605                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0050b610  int32_t __thiscall CTransition::step_up(class CTransition* this, class AC1Legacy::Vector3* arg2)

0050b610  {
0050b610      class CTransition* this_1 = this;
0050b61b      this->collision_info.contact_plane_valid = 0;
0050b621      this->collision_info.contact_plane_is_water = 0;
0050b628      this->sphere_path.step_up = 1;
0050b628      this->sphere_path.step_up_normal.x = arg2->x;
0050b628      this->sphere_path.step_up_normal.y = arg2->y;
0050b628      this->sphere_path.step_up_normal.z = arg2->z;
0050b655      float step_up_height = 0.0399999991f;
0050b65d      arg2 = 0x3db27eb0;
0050b65d      
0050b661      if ((this->object_info.state & 2) != 0)
0050b661      {
0050b665          OBJECTINFO::get_walkable_z(this);
0050b66a          long double x87_r0;
0050b66a          arg2 = ((float)x87_r0);
0050b671          step_up_height = this->object_info.step_up_height;
0050b661      }
0050b661      
0050b679      this->sphere_path.walkable_allowance = arg2;
0050b628      this->sphere_path.backup_cell = this->sphere_path.check_cell;
0050b628      this->sphere_path.backup_check_pos.objcell_id = this->sphere_path.check_pos.objcell_id;
0050b6a4      Frame::operator=(&this->sphere_path.backup_check_pos.frame, &this->sphere_path.check_pos.frame);
0050b6ba      bool cond:1 = CTransition::step_down(this, step_up_height, arg2) != 0;
0050b6bc      this->sphere_path.step_up = 0;
0050b6c2      this->sphere_path.walkable = nullptr;
0050b6c2      
0050b6c8      if (cond:1)
0050b6e3          return 1;
0050b6e3      
0050b6cc      SPHEREPATH::restore_check_pos(&this->sphere_path);
0050b6d7      return 0;
0050b610  }

0050b6e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0050b6f0  enum TransitionState __thiscall CTransition::transitional_insert(class CTransition* this, int32_t arg2)

0050b6f0  {
0050b701      if (this->sphere_path.check_cell == 0)
0050b70d          return 1;
0050b70d      
0050b710      int32_t eax_2 = arg2;
0050b716      enum TransitionState edi = INVALID_TS;
0050b71a      int32_t var_8 = 0;
0050b71a      
0050b71e      if (eax_2 > 0)
0050b71e      {
0050b93a          bool cond:2_1;
0050b93a          
0050b93a          do
0050b93a          {
0050b733              edi = CTransition::insert_into_cell(this, this->sphere_path.check_cell, eax_2);
0050b73b              enum TransitionState var_14 = edi;
0050b73b              
0050b73f              if ((edi - 1) <= 3)
0050b741                  switch (edi)
0050b741                  {
0050b756                      case OK_TS:
0050b756                      {
0050b756                          edi = CTransition::check_other_cells(this, this->sphere_path.check_cell);
0050b75b                          var_14 = edi;
0050b75b                          
0050b75f                          if (edi != OK_TS)
0050b761                              this->sphere_path.neg_poly_hit = 0;
0050b761                          
0050b76a                          if (edi == COLLIDED_TS)
0050ba19                              return 2;
0050b756                          break;
0050b756                      }
0050b950                      case COLLIDED_TS:
0050b950                      {
0050b950                          this->sphere_path.neg_poly_hit = 0;
0050b95b                          return edi;
0050b950                          break;
0050b950                      }
0050b77e                      case ADJUSTED_TS:
0050b77e                      {
0050b77e                          this->sphere_path.neg_poly_hit = 0;
0050b77e                          break;
0050b77e                      }
0050b772                      case SLID_TS:
0050b772                      {
0050b772                          this->collision_info.contact_plane_valid = 0;
0050b778                          this->collision_info.contact_plane_is_water = 0;
0050b77e                          this->sphere_path.neg_poly_hit = 0;
0050b772                          break;
0050b772                      }
0050b741                  }
0050b741              
0050b787              if (edi == OK_TS)
0050b787              {
0050b793                  if (this->sphere_path.collide != 0)
0050b793                  {
0050b964                      int32_t ebx_3 = 0;
0050b968                      this->sphere_path.collide = 0;
0050b968                      
0050b96e                      if (this->collision_info.contact_plane_valid == 0)
0050b9bc                          ebx_3 = 1;
0050b96e                      else
0050b96e                      {
0050b979                          int32_t eax_22 = CTransition::check_walkable(this, 0.0871556997f);
0050b979                          /* unimplemented  {call CTransition::check_walkable} */;
0050b979                          
0050b980                          if (eax_22 == 0)
0050b9bc                              ebx_3 = 1;
0050b980                          else
0050b980                          {
0050b98f                              this->sphere_path.backup = this->sphere_path.insert_type;
0050b995                              this->sphere_path.insert_type = PLACEMENT_INSERT;
0050b9aa                              edi = CTransition::transitional_insert(this, arg2);
0050b9af                              this->sphere_path.insert_type = this->sphere_path.backup;
0050b9af                              
0050b9b5                              if (edi != OK_TS)
0050b9b5                              {
0050b9b7                                  edi = OK_TS;
0050b9bc                                  ebx_3 = 1;
0050b9b5                              }
0050b980                          }
0050b96e                      }
0050b96e                      
0050b9c3                      this->sphere_path.walkable = nullptr;
0050b9c3                      
0050b9c9                      if (ebx_3 == 0)
0050b9c9                          break;
0050b9c9                      
0050b9d2                      SPHEREPATH::restore_check_pos(&this->sphere_path);
0050b9d7                      this->collision_info.contact_plane_valid = 0;
0050b9d7                      this->collision_info.contact_plane_is_water = 0;
0050b9d7                      
0050b9e5                      if (this->collision_info.last_known_contact_plane_valid == 0)
0050b9e5                      {
0050b9f0                          COLLISIONINFO::set_collision_normal(&this->collision_info, &this->sphere_path.step_up_normal);
0050ba01                          return 2;
0050b9e5                      }
0050b9e5                      
0050ba06                      OBJECTINFO::kill_velocity(this);
0050b9d7                      this->collision_info.last_known_contact_plane_valid = 0;
0050ba19                      return 2;
0050b793                  }
0050b793                  
0050b7af                  if (((this->sphere_path.neg_poly_hit == 0 || this->sphere_path.step_down != 0) || this->sphere_path.step_up != 0))
0050b7af                  {
0050b818                      if (this->collision_info.contact_plane_valid != 0)
0050ba3c                          return 1;
0050ba3c                      
0050b81e                      char state = ((int8_t)this->object_info.state);
0050b81e                      
0050b844                      if (((((state & 1) == 0 || this->sphere_path.step_down != 0) || this->sphere_path.check_cell == 0) || this->object_info.step_down == 0))
0050ba3c                          return 1;
0050ba3c                      
0050b852                      float step_down_height = 0.0399999991f;
0050b85a                      float var_c_1 = 0.0871556997f;
0050b85e                      int16_t top;
0050b85e                      
0050b85e                      if ((state & 2) != 0)
0050b85e                      {
0050b862                          OBJECTINFO::get_walkable_z(this);
0050b867                          var_c_1 = ((float)/* var_c_1 = fconvert.s(unimplemented  {fstp dword [esp+0x18], st0}) */);
0050b867                          /* unimplemented  {fstp dword [esp+0x18], st0} */;
0050b867                          top += 1;
0050b86e                          step_down_height = this->object_info.step_down_height;
0050b85e                      }
0050b85e                      
0050b87b                      this->sphere_path.walkable_allowance = var_c_1;
0050b881                      SPHEREPATH::save_check_pos(&this->sphere_path);
0050b889                      int32_t eax_14;
0050b889                      
0050b889                      if (this->sphere_path.num_sphere < 2)
0050b889                      {
0050b88e                          /* unimplemented  {fld st0, dword [ecx+0xc]} */;
0050b891                          /* unimplemented  {fadd st0, st0} */;
0050b893                          long double temp2_1 = ((long double)step_down_height);
0050b893                          (/* unimplemented  {fcomp st0, dword [esp+0x14]} f- temp2_1 */ - temp2_1);
0050b893                          bool c0_1 = /* bool c0_1 = unimplemented  {fcomp st0, dword [esp+0x14]} f< temp2_1 */ < temp2_1;
0050b893                          bool c2_1 = (FCMP_UO(/* bool c2_1 = is_unordered.t(unimplemented  {fcomp st0, dword [esp+0x14]}, temp2_1) */, temp2_1));
0050b893                          bool c3_1 = /* bool c3_1 = unimplemented  {fcomp st0, dword [esp+0x14]} f== temp2_1 */ == temp2_1;
0050b893                          /* unimplemented  {fcomp st0, dword [esp+0x14]} */;
0050b897                          eax_14 = ((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
0050b899                          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050b899                          
0050b89c                          if (!(p_1))
0050b89c                          {
0050b89e                              /* unimplemented  {fld st0, dword [ecx+0xc]} */;
0050b8a1                              /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
0050b8a7                              step_down_height = ((float)/* step_down_height = fconvert.s(unimplemented  {fstp dword [esp+0x14], st0}) */);
0050b8a7                              /* unimplemented  {fstp dword [esp+0x14], st0} */;
0050b89c                          }
0050b889                      }
0050b889                      
0050b8ae                      /* unimplemented  {fld st0, dword [ecx+0xc]} */;
0050b8b5                      /* unimplemented  {fadd st0, st0} */;
0050b8ba                      long double temp1_1 = ((long double)step_down_height);
0050b8ba                      (/* unimplemented  {fcomp st0, dword [esp+0x18]} f- temp1_1 */ - temp1_1);
0050b8ba                      bool c0_2 = /* bool c0_2 = unimplemented  {fcomp st0, dword [esp+0x18]} f< temp1_1 */ < temp1_1;
0050b8ba                      bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcomp st0, dword [esp+0x18]}, temp1_1) */, temp1_1));
0050b8ba                      bool c3_2 = /* bool c3_2 = unimplemented  {fcomp st0, dword [esp+0x18]} f== temp1_1 */ == temp1_1;
0050b8ba                      /* unimplemented  {fcomp st0, dword [esp+0x18]} */;
0050b8be                      eax_14 = ((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
0050b8c0                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0050b8c3                      enum TransitionState* var_30_2;
0050b8c3                      float step_down_height_1;
0050b8c3                      float var_28_8;
0050b8c3                      
0050b8c3                      if (p_2)
0050b8c3                      {
0050b90b                          if (CTransition::step_down(this, step_down_height, var_c_1) != 0)
0050b90b                          {
0050ba2a                              this->sphere_path.walkable = nullptr;
0050ba3c                              return 1;
0050b90b                          }
0050b90b                          
0050b911                          var_28_8 = var_c_1;
0050b912                          step_down_height_1 = step_down_height;
0050b917                          var_30_2 = &var_14;
0050b8c3                      }
0050b8c3                      else
0050b8c3                      {
0050b8c5                          /* unimplemented  {fld st0, dword [esp+0x18]} */;
0050b8c9                          /* unimplemented  {fmul st0, dword [&data_7928b8]} */;
0050b8cf                          float step_down_height_2 = ((float)/* float step_down_height_2 = fconvert.s(unimplemented  {fstp dword [esp+0x24], st0}) */);
0050b8cf                          /* unimplemented  {fstp dword [esp+0x24], st0} */;
0050b8cf                          
0050b8df                          if (CTransition::step_down(this, step_down_height_2, var_c_1) != 0)
0050b8df                          {
0050ba2a                              this->sphere_path.walkable = nullptr;
0050ba3c                              return 1;
0050b8df                          }
0050b8df                          
0050b8f0                          if (CTransition::step_down(this, step_down_height_2, var_c_1) != 0)
0050b8f0                          {
0050ba2a                              this->sphere_path.walkable = nullptr;
0050ba3c                              return 1;
0050b8f0                          }
0050b8f0                          
0050b8f6                          var_28_8 = var_c_1;
0050b8f7                          step_down_height_1 = step_down_height_2;
0050b8fc                          var_30_2 = &var_14;
0050b8c3                      }
0050b8c3                      
0050b921                      if (CTransition::edge_slide(this, var_30_2, step_down_height_1, var_28_8) != 0)
0050ba27                          return var_14;
0050ba27                      
0050b927                      edi = var_14;
0050b7af                  }
0050b7af                  else
0050b7af                  {
0050b7b7                      this->sphere_path.neg_poly_hit = 0;
0050b7b7                      
0050b7bd                      if (this->sphere_path.neg_step_up == 0)
0050b80b                          edi = CSphere::slide_sphere(this->sphere_path.global_sphere, &this->sphere_path, &this->collision_info, &this->sphere_path.neg_collision_normal, this->sphere_path.global_curr_center);
0050b7bd                      else if (CTransition::step_up(this, &this->sphere_path.neg_collision_normal) == 0)
0050b7e6                          edi = SPHEREPATH::step_up_slide(&this->sphere_path, this, &this->collision_info);
0050b7af                  }
0050b787              }
0050b787              
0050b92f              eax_2 = arg2;
0050b934              cond:2_1 = (var_8 + 1) < eax_2;
0050b936              var_8 += 1;
0050b93a          } while (cond:2_1);
0050b71e      }
0050b71e      
0050b949      return edi;
0050b6f0  }

0050ba3f                                                                                               90                                 .
0050ba40  uint32_t jump_table_50ba40[0x4] = 
0050ba40  {
0050ba40      [0x0] =  0x0050b748
0050ba44      [0x1] =  0x0050b94c
0050ba48      [0x2] =  0x0050b77e
0050ba4c      [0x3] =  0x0050b772
0050ba50  }

0050ba50  int32_t __fastcall CTransition::find_placement_pos(class CTransition* this)

0050ba50  {
0050ba50      int32_t ebp;
0050ba50      int32_t var_4 = ebp;
0050ba5d      int32_t* var_a8 = &var_4;
0050ba68      class CObjCell* curr_cell_1 = this->sphere_path.curr_cell;
0050ba74      this->sphere_path.check_pos.objcell_id = this->sphere_path.curr_pos.objcell_id;
0050ba84      Frame::operator=(&this->sphere_path.check_pos.frame, &this->sphere_path.curr_pos.frame);
0050ba74      this->sphere_path.check_cell = curr_cell_1;
0050ba74      this->sphere_path.cell_array_valid = 0;
0050ba9a      SPHEREPATH::cache_global_sphere(&this->sphere_path, nullptr);
0050ba9f      this->collision_info.sliding_normal_valid = 0;
0050baa9      this->collision_info.contact_plane_valid = 0;
0050baaf      this->collision_info.contact_plane_is_water = 0;
0050babe      int32_t curr_cell;
0050babe      int32_t* var_b4_1 = &curr_cell;
0050babe      
0050baca      if (CTransition::validate_placement_transition(this, CTransition::transitional_insert(this, 3), var_b4_1) == OK_TS)
0050baca      {
0050bded      label_50bded:
0050bded          *(uint32_t*)var_a8;
0050bdee          return 1;
0050baca      }
0050baca      
0050bad6      if (this->sphere_path.placement_allows_sliding != 0)
0050bad6      {
0050bade          float radius = this->sphere_path.local_sphere->radius;
0050bae2          long double x87_r7_1 = ((long double)radius);
0050bae6          int32_t ecx_6 = 0;
0050bae8          long double temp1_1 = ((long double)0.125f);
0050bae8          (x87_r7_1 - temp1_1);
0050baee          float var_9c_1 = 4f;
0050baf6          class CSphere* eax_3;
0050baf6          eax_3 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0050baf8          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050baf8          
0050bafb          if (p_1)
0050bafb          {
0050bb0c              long double x87_r7_2 = ((long double)radius);
0050bb10              long double temp2_1 = ((long double)0.479999989f);
0050bb10              (x87_r7_2 - temp2_1);
0050bb16              eax_3 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050bb18              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0050bb18              
0050bb1b              if (!(p_2))
0050bb1d                  radius = 0.479999989f;
0050bafb          }
0050bafb          else
0050bafb          {
0050bafd              ecx_6 = 1;
0050bb02              var_9c_1 = 2f;
0050bafb          }
0050bafb          
0050bb31          long double x87_r7_5 = (((long double)4f) / (((long double)1f) * ((long double)radius)));
0050bb31          
0050bb37          if (ecx_6 != 0)
0050bb39              x87_r7_5 = (x87_r7_5 * ((long double)0.5f));
0050bb39          
0050bb3f          long double temp3_1 = ((long double)1f);
0050bb3f          (x87_r7_5 - temp3_1);
0050bb45          eax_3 = ((((x87_r7_5 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
0050bb47          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
0050bb47          
0050bb4a          if (p_3)
0050bb4a          {
0050bb5b              enum TransitionState var_b8;
0050bb5b              var_b8 = ((double)x87_r7_5);
0050bb5e              ceil(var_b8);
0050bb6d              long double x87_r0;
0050bb6d              float var_88_1 = ((float)(((long double)var_9c_1) / x87_r0));
0050bb71              int32_t eax_5 = _ftol2();
0050bb84              int32_t var_98_1 = 0;
0050bb8c              int32_t var_9c_2 = 0;
0050bb94              int32_t var_8c_1 = 0;
0050bb9e              float var_80_1 = ((float)((((long double)var_88_1) / ((long double)radius)) * ((long double)3.14159989f)));
0050bb9e              int16_t top_1 = 1;
0050bb9e              
0050bba2              if (eax_5 > 0)
0050bba2              {
0050bdd2                  bool cond:4_1;
0050bdd2                  
0050bdd2                  do
0050bdd2                  {
0050bba4                      /* unimplemented  {fld st0, dword [esp+0x18]} */;
0050bbab                      /* unimplemented  {fadd dword [esp+0x30]} */;
0050bbaf                      float var_98_2 = ((float)/* float var_98_2 = fconvert.s(unimplemented  {fstp dword [esp+0x20], st0}) */);
0050bbaf                      /* unimplemented  {fstp dword [esp+0x20], st0} */;
0050bbb3                      /* unimplemented  {fld st0, dword [esp+0x38]} */;
0050bbb7                      /* unimplemented  {fadd dword [esp+0x1c]} */;
0050bbbb                      float var_9c_3 = ((float)/* float var_9c_3 = fconvert.s(unimplemented  {fst dword [esp+0x1c], st0}) */);
0050bbbf                      var_b8 = ((double)/* var_b8.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
0050bbbf                      /* unimplemented  {fstp qword [esp], st0} */;
0050bbc2                      ceil(var_b8, var_b4_1);
0050bbd2                      int32_t ebx_1 = (_ftol2() << 1);
0050bbd6                      int32_t var_90_1 = ebx_1;
0050bbda                      /* unimplemented  {fild st0, dword [esp+0x20]} */;
0050bbda                      
0050bbe2                      if (ebx_1 < 0)
0050bbe4                          /* unimplemented  {fadd dword [&data_79820c]} */;
0050bbe4                      
0050bbea                      /* unimplemented  {fdivr st0, dword [&data_79bc60]} */;
0050bbf4                      int32_t var_60 = 0x3f800000;
0050bbfc                      int32_t var_5c_1 = 0;
0050bc04                      int32_t var_58_1 = 0;
0050bc0c                      int32_t var_54_1 = 0;
0050bc14                      int32_t var_2c_1 = 0;
0050bc1f                      int32_t var_28_1 = 0;
0050bc2a                      int32_t var_24_1 = 0;
0050bc35                      float var_90_2 = ((float)/* float var_90_2 = fconvert.s(unimplemented  {fstp dword [esp+0x20], st0}) */);
0050bc35                      /* unimplemented  {fstp dword [esp+0x20], st0} */;
0050bc35                      top_1 += 1;
0050bc39                      Frame::cache(&var_60);
0050bc40                      int32_t var_a0_1 = 0;
0050bc40                      
0050bc44                      if (ebx_1 > 0)
0050bc44                      {
0050bdbd                          bool cond:5_1;
0050bdbd                          
0050bdbd                          do
0050bdbd                          {
0050ba74                              this->sphere_path.check_pos.objcell_id = this->sphere_path.curr_pos.objcell_id;
0050bc6f                              curr_cell = this->sphere_path.curr_cell;
0050bc73                              Frame::operator=(&this->sphere_path.check_pos.frame, &this->sphere_path.curr_pos.frame);
0050ba74                              this->sphere_path.check_cell = curr_cell;
0050ba74                              this->sphere_path.cell_array_valid = 0;
0050bc8b                              int32_t ecx_11 = SPHEREPATH::cache_global_sphere(&this->sphere_path, nullptr);
0050bc90                              /* unimplemented  {fild st0, dword [esp+0x10]} */;
0050bc90                              
0050bc9a                              if (var_a0_1 < 0)
0050bc9c                                  /* unimplemented  {fadd dword [&data_79820c]} */;
0050bc9c                              
0050bca2                              /* unimplemented  {fmul st0, dword [esp+0x20]} */;
0050bca6                              int32_t var_b4_3 = ecx_11;
0050bcab                              float var_b4_4 = ((float)/* float var_b4_4 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
0050bcab                              /* unimplemented  {fstp dword [esp], st0} */;
0050bcae                              Frame::set_heading(&var_60, var_b4_4);
0050bcbf                              void __return_1;
0050bcbf                              Frame::get_vector_heading(&var_60, &__return_1);
0050bcc4                              /* unimplemented  {fld st0, dword [esp+0x18]} */;
0050bcc8                              /* unimplemented  {fmul st0, dword [eax]} */;
0050bcce                              /* unimplemented  {fld st0, dword [esp+0x18]} */;
0050bcd2                              int32_t var_78;
0050bcd2                              var_b4_1 = &var_78;
0050bcd3                              /* unimplemented  {fmul st0, dword [eax+0x4]} */;
0050bcd6                              /* unimplemented  {fld st0, dword [esp+0x1c]} */;
0050bcda                              /* unimplemented  {fmul st0, dword [eax+0x8]} */;
0050bce5                              float var_64_1 = ((float)/* float var_64_1 = fconvert.s(unimplemented  {fstp dword [esp+0x54], st0}) */);
0050bce5                              /* unimplemented  {fstp dword [esp+0x54], st0} */;
0050bced                              /* unimplemented  {fxch st0, st1} */;
0050bced                              /* unimplemented  {fxch st0, st1} */;
0050bcef                              float var_70_1 = var_64_1;
0050bcf3                              var_78 = ((float)/* var_78 = fconvert.s(unimplemented  {fstp dword [esp+0x40], st0}) */);
0050bcf3                              /* unimplemented  {fstp dword [esp+0x40], st0} */;
0050bcf9                              float var_74_1 = ((float)/* float var_74_1 = fconvert.s(unimplemented  {fstp dword [esp+0x44], st0}) */);
0050bcf9                              /* unimplemented  {fstp dword [esp+0x44], st0} */;
0050bcfd                              void __return;
0050bcfd                              int32_t* eax_9 = CTransition::adjust_offset(this, &__return, var_b4_1);
0050bcfd                              /* unimplemented  {call CTransition::adjust_offset} */;
0050bc4a                              this->sphere_path.global_offset.x = *(uint32_t*)eax_9;
0050bc4a                              this->sphere_path.global_offset.y = eax_9[1];
0050bc4a                              this->sphere_path.global_offset.z = eax_9[2];
0050bd14                              /* unimplemented  {fld st0, dword [ebx+0x8]} */;
0050bd17                              /* unimplemented  {fld st0, dword [ebx+0x4]} */;
0050bd1a                              /* unimplemented  {fld st0, dword [ebx]} */;
0050bd1c                              /* unimplemented  {fld st0, st0} */;
0050bd1e                              /* unimplemented  {fmul st0, st1} */;
0050bd20                              /* unimplemented  {fld st0, st2} */;
0050bd22                              /* unimplemented  {fmul st0, st3} */;
0050bd24                              /* unimplemented  {faddp st1, st0} */;
0050bd24                              /* unimplemented  {faddp st1, st0} */;
0050bd26                              /* unimplemented  {fld st0, st3} */;
0050bd28                              /* unimplemented  {fmul st0, st4} */;
0050bd2a                              /* unimplemented  {faddp st1, st0} */;
0050bd2a                              /* unimplemented  {faddp st1, st0} */;
0050bd2c                              /* unimplemented  {fld st0, dword [&F_EPSILON]} */;
0050bd32                              /* unimplemented  {fmul st0, dword [&F_EPSILON]} */;
0050bd38                              (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
0050bd38                              bool c0_4 = /* bool c0_4 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_4 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
0050bd38                              bool c2_4 = (FCMP_UO(/* bool c2_4 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_4 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
0050bd38                              bool c3_4 = /* bool c3_4 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_4 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
0050bd38                              /* unimplemented  {fcompp } */;
0050bd38                              /* unimplemented  {fcompp } */;
0050bd3a                              /* unimplemented  {fstp st0, st0} */;
0050bd3a                              /* unimplemented  {fstp st0, st0} */;
0050bd3c                              float eax_10;
0050bd3c                              eax_10 = ((((c0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_4) ? 1 : 0) << 0xa) | ((((c3_4) ? 1 : 0) << 0xe) | (((top_1 - 2) & 7) << 0xb)))));
0050bd3e                              /* unimplemented  {fstp st0, st0} */;
0050bd3e                              /* unimplemented  {fstp st0, st0} */;
0050bd40                              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
0050bd43                              /* unimplemented  {fstp st0, st0} */;
0050bd43                              /* unimplemented  {fstp st0, st0} */;
0050bd43                              
0050bd45                              if (!(p_4))
0050bd45                              {
0050ba74                                  this->sphere_path.cell_array_valid = 0;
0050bd4d                                  /* unimplemented  {fld st0, dword [esi+0x148]} */;
0050bd53                                  /* unimplemented  {fadd dword [ebx]} */;
0050ba74                                  this->sphere_path.check_pos.frame.m_fOrigin.x = ((float)/* this->sphere_path.check_pos.frame.m_fOrigin.x = fconvert.s(unimplemented  {fstp dword [esi+0x148], st0}) */);
0050bd58                                  /* unimplemented  {fstp dword [esi+0x148], st0} */;
0050bd5e                                  /* unimplemented  {fld st0, dword [ebx+0x4]} */;
0050bd61                                  /* unimplemented  {fadd dword [esi+0x14c]} */;
0050ba74                                  this->sphere_path.check_pos.frame.m_fOrigin.y = ((float)/* this->sphere_path.check_pos.frame.m_fOrigin.y = fconvert.s(unimplemented  {fstp dword [esi+0x14c], st0}) */);
0050bd67                                  /* unimplemented  {fstp dword [esi+0x14c], st0} */;
0050bd6d                                  /* unimplemented  {fld st0, dword [ebx+0x8]} */;
0050bd70                                  /* unimplemented  {fadd dword [esi+0x150]} */;
0050ba74                                  this->sphere_path.check_pos.frame.m_fOrigin.z = ((float)/* this->sphere_path.check_pos.frame.m_fOrigin.z = fconvert.s(unimplemented  {fstp dword [esi+0x150], st0}) */);
0050bd76                                  /* unimplemented  {fstp dword [esi+0x150], st0} */;
0050bd7c                                  SPHEREPATH::cache_global_sphere(&this->sphere_path, &this->sphere_path.global_offset);
0050bd81                                  this->collision_info.sliding_normal_valid = 0;
0050bd8b                                  this->collision_info.contact_plane_valid = 0;
0050bd91                                  this->collision_info.contact_plane_is_water = 0;
0050bda0                                  var_b4_1 = &curr_cell;
0050bda0                                  
0050bdac                                  if (CTransition::validate_placement_transition(this, CTransition::transitional_insert(this, 3), var_b4_1) == OK_TS)
0050bdac                                      goto label_50bded;
0050bd45                              }
0050bd45                              
0050bdb7                              cond:5_1 = (var_a0_1 + 1) < ebx_1;
0050bdb9                              var_a0_1 += 1;
0050bdbd                          } while (cond:5_1);
0050bc44                      }
0050bc44                      
0050bdcc                      cond:4_1 = (var_8c_1 + 1) < eax_5;
0050bdce                      var_8c_1 += 1;
0050bdd2                  } while (cond:4_1);
0050bde0                  *(uint32_t*)var_a8;
0050bde1                  return 0;
0050bba2              }
0050bb4a          }
0050bad6      }
0050bad6      
0050bb56      *(uint32_t*)var_a8;
0050bb57      return 0;
0050ba50  }

0050bdef                                               90                                                                 .

0050bdf0  void __fastcall CTransition::find_transitional_position(class CTransition* this)

0050bdf0  {
0050bdfe      if (this->sphere_path.begin_cell == 0)
0050be06          return;
0050be06      
0050be18      enum TransitionState var_44 = OK_TS;
0050be20      int32_t var_48 = 0;
0050be28      float var_3c;
0050be28      float var_24;
0050be28      CTransition::calc_num_steps(this, &var_3c, &var_24, &var_48);
0050be28      
0050be31      if ((this->object_info.state & 0x10) != 0)
0050be31      {
0050be33          class Position* end_pos = this->sphere_path.end_pos;
0050be51          Frame::set_rotate(&this->sphere_path.curr_pos.frame, end_pos->frame.qw, end_pos->frame.qx, end_pos->frame.qy, end_pos->frame.qz);
0050be31      }
0050be31      
0050be5d      class CObjCell* curr_cell = this->sphere_path.curr_cell;
0050be6e      this->sphere_path.check_pos.objcell_id = this->sphere_path.curr_pos.objcell_id;
0050be7e      Frame::operator=(&this->sphere_path.check_pos.frame, &this->sphere_path.curr_pos.frame);
0050be6e      this->sphere_path.check_cell = curr_cell;
0050be89      int32_t ebx = 0;
0050be6e      this->sphere_path.cell_array_valid = 0;
0050be94      SPHEREPATH::cache_global_sphere(&this->sphere_path, nullptr);
0050be99      int32_t ecx_7 = var_48;
0050be99      
0050be9f      if (ecx_7 <= 0)
0050be9f      {
0050c0ff          if ((this->object_info.state & 0x10) == 0)
0050c0ff          {
0050c101              class Position* end_pos_1 = this->sphere_path.end_pos;
0050c11f              Frame::set_rotate(&this->sphere_path.curr_pos.frame, end_pos_1->frame.qw, end_pos_1->frame.qx, end_pos_1->frame.qy, end_pos_1->frame.qz);
0050c0ff          }
0050c0ff          
0050c12e          SPHEREPATH::set_check_pos(&this->sphere_path, &this->sphere_path.curr_pos, this->sphere_path.curr_cell);
0050c134          this->sphere_path.cell_array_valid = 1;
0050c13e          this->sphere_path.hits_interior_cell = 0;
0050c14c          CObjCell::find_cell_list(&this->cell_array, nullptr, &this->sphere_path);
0050c160          return;
0050be9f      }
0050be9f      
0050bea7      if (ecx_7 > 0)
0050bea7      {
0050becd          while (true)
0050becd          {
0050becd              int32_t var_40;
0050becd              bool c1;
0050becd              
0050becd              if (((this->object_info.state & 4) != 0 && ebx == (ecx_7 - 1)))
0050becd              {
0050beef                  float var_38;
0050beef                  float var_34;
0050beef                  long double x87_r7_5 = sqrtl((((((long double)var_34) * ((long double)var_34)) + (((long double)var_38) * ((long double)var_38))) + (((long double)var_3c) * ((long double)var_3c))));
0050bef1                  long double temp1_1 = ((long double)0.000199999995f);
0050bef1                  (x87_r7_5 - temp1_1);
0050bef1                  c1 = false;
0050bef7                  int32_t eax_4;
0050bef7                  eax_4 = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0050bef7                  
0050befc                  if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) == 0)
0050befc                  {
0050bf03                      long double x87_r6_5 = ((long double)this->sphere_path.local_sphere->radius);
0050bf06                      var_40 = (ecx_7 - 1);
0050bf0a                      long double x87_r5_1 = ((long double)var_40);
0050bf0a                      
0050bf0e                      if ((ecx_7 - 1) < 0)
0050bf10                          x87_r5_1 = (x87_r5_1 + ((long double)4.2949673e+09f));
0050bf10                      
0050bf18                      long double x87_r6_7 = (x87_r7_5 - (x87_r6_5 * x87_r5_1));
0050bf1a                      x87_r7_5 = (x87_r6_7 / x87_r6_7);
0050bf2e                      float var_10_1 = ((float)(((long double)var_34) * x87_r7_5));
0050bf38                      float var_28_1 = var_10_1;
0050bf44                      var_24 = ((float)(((long double)var_3c) * x87_r7_5));
0050bf50                      float var_20_1 = ((float)(((long double)var_38) * x87_r7_5));
0050bf54                      float var_1c_1 = var_10_1;
0050befc                  }
0050becd              }
0050becd              
0050bf66              void __return;
0050bf66              int32_t* eax_6;
0050bf66              long double st0_1;
0050bf66              st0_1 = CTransition::adjust_offset(this, &__return, &var_24);
0050bead              this->sphere_path.global_offset.x = *(uint32_t*)eax_6;
0050bead              this->sphere_path.global_offset.y = eax_6[1];
0050bead              this->sphere_path.global_offset.z = eax_6[2];
0050bf7d              char state = ((int8_t)this->object_info.state);
0050bf83              float eax_7;
0050bf83              
0050bf83              if ((state & 4) == 0)
0050bf83              {
0050bf85                  long double x87_r7_6 = ((long double)this->sphere_path.global_offset.z);
0050bf88                  long double x87_r6_11 = ((long double)this->sphere_path.global_offset.y);
0050bf8b                  long double x87_r5_5 = ((long double)this->sphere_path.global_offset.x);
0050bf9c                  long double x87_r4_6 = (((x87_r5_5 * x87_r5_5) + (x87_r6_11 * x87_r6_11)) + (x87_r7_6 * x87_r7_6));
0050bfa4                  long double x87_r3_6 = (((long double)0.000199999995f) * ((long double)0.000199999995f));
0050bfaa                  (x87_r3_6 - x87_r4_6);
0050bfae                  eax_7 = ((((x87_r3_6 < x87_r4_6) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_6, x87_r4_6))) ? 1 : 0) << 0xa) | ((((x87_r3_6 == x87_r4_6) ? 1 : 0) << 0xe) | 0x3000))));
0050bf83              }
0050bf83              
0050bfb7              if (((state & 4) != 0 || (*(uint8_t*)((char*)eax_7)[1] & 0x41) != 0))
0050bfb7              {
0050bfc0                  if ((state & 0x10) == 0)
0050bfc0                  {
0050bfc7                      var_40 = (ebx + 1);
0050bfcb                      long double x87_r7_8 = ((long double)var_40);
0050bfcb                      
0050bfcf                      if ((ebx + 1) < 0)
0050bfd1                          x87_r7_8 = (x87_r7_8 + ((long double)4.2949673e+09f));
0050bfd1                      
0050bfdb                      long double x87_r6_13 = ((long double)var_48);
0050bfdb                      
0050bfe1                      if (var_48 < 0)
0050bfe3                          x87_r6_13 = (x87_r6_13 + ((long double)4.2949673e+09f));
0050bfe3                      
0050bff1                      int32_t var_5c_4 = (ebx + 1);
0050c009                      Frame::interpolate_rotation(&this->sphere_path.check_pos.frame, &this->sphere_path.begin_pos->frame, &this->sphere_path.end_pos->frame, ((float)(x87_r7_8 / x87_r6_13)));
0050bfc0                  }
0050bfc0                  
0050c010                  this->collision_info.sliding_normal_valid = 0;
0050c016                  this->collision_info.contact_plane_valid = 0;
0050c01c                  this->collision_info.contact_plane_is_water = 0;
0050c01c                  
0050c028                  if (this->sphere_path.insert_type == TRANSITION_INSERT)
0050c028                  {
0050be6e                      this->sphere_path.cell_array_valid = 0;
0050be6e                      this->sphere_path.check_pos.frame.m_fOrigin.x = ((float)(((long double)this->sphere_path.global_offset.x) + ((long double)this->sphere_path.check_pos.frame.m_fOrigin.x)));
0050be6e                      this->sphere_path.check_pos.frame.m_fOrigin.y = ((float)(((long double)this->sphere_path.global_offset.y) + ((long double)this->sphere_path.check_pos.frame.m_fOrigin.y)));
0050be6e                      this->sphere_path.check_pos.frame.m_fOrigin.z = ((float)(((long double)this->sphere_path.global_offset.z) + ((long double)this->sphere_path.check_pos.frame.m_fOrigin.z)));
0050c060                      SPHEREPATH::cache_global_sphere(&this->sphere_path, &this->sphere_path.global_offset);
0050c07b                      var_44 = CTransition::validate_transition(this, CTransition::transitional_insert(this, 3), &var_40);
0050c07b                      
0050c0dc                      if ((this->collision_info.frames_stationary_fall != 0 || (this->collision_info.collision_normal_valid != 0 && (this->object_info.state & 8) != 0)))
0050c087                          goto label_50c089;
0050c087                      
0050c0e2                  label_50c0e2:
0050c0e2                      ebx += 1;
0050c0e2                      
0050c0e5                      if (ebx >= var_48)
0050c0e5                          goto label_50c089;
0050c0e5                      
0050beb5                      ecx_7 = var_48;
0050beb9                      continue;
0050c028                  }
0050c028                  
0050c0ae                  enum TransitionState eax_15 = CTransition::validate_placement_transition(this, CTransition::transitional_insert(this, 3), &var_40);
0050c0b6                  var_44 = eax_15;
0050c0b6                  
0050c0ba                  if (eax_15 == OK_TS)
0050c0ba                      break;
0050c0ba                  
0050c0c4                  if (this->sphere_path.placement_allows_sliding != 0)
0050c0c4                  {
0050c0c9                      SPHEREPATH::add_offset_to_check_pos(&this->sphere_path, &this->sphere_path.global_offset);
0050c0c9                      
0050c0dc                      if ((this->collision_info.collision_normal_valid == 0 || (this->object_info.state & 8) == 0))
0050c0d6                          goto label_50c0e2;
0050c0d6                      
0050c0d6                      goto label_50c089;
0050c0c4                  }
0050bfb7              }
0050bfb7              else if (ebx != 0)
0050c0ef              {
0050c089              label_50c089:
0050c089                  
0050c08e                  if (var_44 == OK_TS)
0050c08e                      break;
0050c0ef              }
0050c0ef              
0050c0fa              return;
0050becd          }
0050bea7      }
0050bdf0  }

0050c161     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0050c170  int32_t __fastcall CTransition::find_placement_position(class CTransition* this)

0050c170  {
0050c17e      class CObjCell* curr_cell = this->sphere_path.curr_cell;
0050c18b      this->sphere_path.check_pos.objcell_id = this->sphere_path.curr_pos.objcell_id;
0050c19b      Frame::operator=(&this->sphere_path.check_pos.frame, &this->sphere_path.curr_pos.frame);
0050c18b      this->sphere_path.check_cell = curr_cell;
0050c18b      this->sphere_path.cell_array_valid = 0;
0050c1b1      SPHEREPATH::cache_global_sphere(&this->sphere_path, nullptr);
0050c1b6      class CObjCell* check_cell = this->sphere_path.check_cell;
0050c1be      this->sphere_path.insert_type = INITIAL_PLACEMENT_INSERT;
0050c1c8      enum TransitionState eax_1;
0050c1c8      
0050c1c8      if (check_cell != 0)
0050c1c8      {
0050c1d6          eax_1 = CTransition::insert_into_cell(this, check_cell, 3);
0050c1d6          
0050c1de          if (eax_1 == OK_TS)
0050c1e9              eax_1 = CTransition::check_other_cells(this, this->sphere_path.check_cell);
0050c1c8      }
0050c1c8      else
0050c1ca          eax_1 = COLLIDED_TS;
0050c1ca      
0050c1f3      enum TransitionState eax_2 = CTransition::validate_placement(this, eax_1, 1);
0050c1f3      
0050c1fb      if (eax_2 == OK_TS)
0050c1fb      {
0050c1ff          this->sphere_path.insert_type = eax_2;
0050c1ff          
0050c20c          if (CTransition::find_placement_pos(this) != 0)
0050c20c          {
0050c21b              if (this->object_info.step_down != 0)
0050c21b              {
0050c232                  float step_down_height = this->object_info.step_down_height;
0050c236                  this->sphere_path.walkable_allowance = 0.0871556997f;
0050c23c                  SPHEREPATH::save_check_pos(&this->sphere_path);
0050c18b                  this->sphere_path.backup = this->sphere_path.insert_type;
0050c18b                  this->sphere_path.insert_type = TRANSITION_INSERT;
0050c256                  enum SPHEREPATH::InsertType eax_6;
0050c256                  
0050c256                  if (this->sphere_path.num_sphere < 2)
0050c256                  {
0050c258                      class CSphere* global_sphere = this->sphere_path.global_sphere;
0050c25b                      long double x87_r7_1 = ((long double)global_sphere->radius);
0050c25e                      long double x87_r7_2 = (x87_r7_1 + x87_r7_1);
0050c260                      long double temp3_1 = ((long double)step_down_height);
0050c260                      (x87_r7_2 - temp3_1);
0050c264                      eax_6 = ((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0050c266                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050c266                      
0050c269                      if (!(p_1))
0050c274                          step_down_height = ((float)(((long double)global_sphere->radius) * ((long double)0.5f)));
0050c256                  }
0050c256                  
0050c27b                  long double x87_r7_5 = ((long double)this->sphere_path.global_sphere->radius);
0050c27e                  long double x87_r7_6 = (x87_r7_5 + x87_r7_5);
0050c280                  long double temp2_1 = ((long double)step_down_height);
0050c280                  (x87_r7_6 - temp2_1);
0050c284                  eax_6 = ((((x87_r7_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050c286                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0050c289                  float step_down_height_1;
0050c289                  
0050c289                  if (p_2)
0050c289                  {
0050c2c2                      int32_t var_1c_3 = 0x3db27eb0;
0050c2c3                      step_down_height_1 = step_down_height;
0050c2c6                  label_50c2c6:
0050c2c6                      
0050c2cd                      if (CTransition::step_down(this, step_down_height_1, 0.0871556997f) == 0)
0050c2cd                      {
0050c2d1                          SPHEREPATH::restore_check_pos(&this->sphere_path);
0050c2d6                          this->collision_info.contact_plane_valid = 0;
0050c2dc                          this->collision_info.contact_plane_is_water = 0;
0050c2cd                      }
0050c289                  }
0050c289                  else
0050c289                  {
0050c29e                      float step_down_height_2 = ((float)(((long double)step_down_height) * ((long double)0.5f)));
0050c29e                      
0050c2ae                      if (CTransition::step_down(this, step_down_height_2, 0.0871556997f) == 0)
0050c2ae                      {
0050c2b4                          int32_t var_1c_2 = 0x3db27eb0;
0050c2b5                          step_down_height_1 = step_down_height_2;
0050c2b6                          goto label_50c2c6;
0050c2ae                      }
0050c289                  }
0050c18b                  this->sphere_path.insert_type = this->sphere_path.backup;
0050c2ee                  this->sphere_path.walkable = nullptr;
0050c21b              }
0050c21b              
0050c2ff              int32_t eax_11 = (CTransition::validate_placement(this, OK_TS, 1) - 1);
0050c301              int32_t eax_12 = -(eax_11);
0050c30c              return ((eax_12 - eax_12) + 1);
0050c20c          }
0050c1fb      }
0050c1fb      
0050c217      return 0;
0050c170  }

0050c30d                                         90 90 90                                                               ...

0050c310  int32_t __fastcall CTransition::find_valid_position(class CTransition* this)

0050c310  {
0050c318      if (this->sphere_path.insert_type != TRANSITION_INSERT)
0050c31f          /* tailcall */
0050c31f          return CTransition::find_placement_position(this);
0050c31f      
0050c31a      /* tailcall */
0050c31a      return CTransition::find_transitional_position(this);
0050c310  }

0050c324              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0050c330  void __fastcall SPHEREPATH::init(class SPHEREPATH* this)

0050c330  {
0050c332      this->num_sphere = 0;
0050c334      this->begin_cell = nullptr;
0050c33a      this->begin_pos = nullptr;
0050c340      this->curr_cell = nullptr;
0050c346      this->check_cell = nullptr;
0050c34c      this->insert_type = TRANSITION_INSERT;
0050c352      this->step_down = 0;
0050c358      this->step_up = 0;
0050c35e      this->collide = 0;
0050c364      this->hits_interior_cell = 0;
0050c36a      this->bldg_check = 0;
0050c370      this->obstruction_ethereal = 0;
0050c376      this->backup_cell = nullptr;
0050c37c      this->walkable_allowance = 0f;
0050c382      this->walkable = nullptr;
0050c388      this->check_walkable = 0;
0050c38e      this->cell_array_valid = 0;
0050c394      this->neg_step_up = 0;
0050c39a      this->neg_poly_hit = 0;
0050c3a0      this->placement_allows_sliding = 1;
0050c330  }

0050c3ab                                   90 90 90 90 90                                                             .....

0050c3b0  enum TransitionState __thiscall SPHEREPATH::step_up_slide(class SPHEREPATH* this, class OBJECTINFO* arg2, class COLLISIONINFO* arg3)

0050c3b0  {
0050c3b9      arg3->contact_plane_valid = 0;
0050c3bc      arg3->contact_plane_is_water = 0;
0050c3bf      class AC1Legacy::Vector3* global_curr_center = this->global_curr_center;
0050c3cb      this->step_up = 0;
0050c3db      return CSphere::slide_sphere(this->global_sphere, this, arg3, &this->step_up_normal, global_curr_center);
0050c3b0  }

0050c3de                                                                                            90 90                                ..

0050c3e0  int32_t __fastcall SPHEREPATH::check_walkables(class SPHEREPATH* this)

0050c3e0  {
0050c3e2      class CPolygon* walkable = this->walkable;
0050c3e2      
0050c3ea      if (walkable == 0)
0050c3f1          return 1;
0050c3f1      
0050c405      this->walkable_check_pos.radius = ((float)(((long double)this->walkable_check_pos.radius) * ((long double)0.5f)));
0050c413      return CPolygon::check_walkable(walkable, &this->walkable_check_pos, &this->walkable_up);
0050c3e0  }

0050c414                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050c420  class AC1Legacy::Vector3* __thiscall Position::globaltolocalvec(class Position const* this, class AC1Legacy::Vector3* __return, class AC1Legacy::Vector3 const* arg3)

0050c420  {
0050c437      long double x87_r7_3 = (((((long double)this->frame.m_fl2gv[7]) * ((long double)arg3->y)) + (((long double)this->frame.m_fl2gv[6]) * ((long double)arg3->x))) + (((long double)this->frame.m_fl2gv[8]) * ((long double)arg3->z)));
0050c44c      long double x87_r6_7 = (((((long double)this->frame.m_fl2gv[4]) * ((long double)arg3->y)) + (((long double)this->frame.m_fl2gv[3]) * ((long double)arg3->x))) + (((long double)this->frame.m_fl2gv[5]) * ((long double)arg3->z)));
0050c461      float* result = __return;
0050c467      *(uint32_t*)result = ((float)(((((long double)this->frame.m_fl2gv[1]) * ((long double)arg3->y)) + (((long double)this->frame.m_fl2gv[0]) * ((long double)arg3->x))) + (((long double)this->frame.m_fl2gv[2]) * ((long double)arg3->z))));
0050c469      result[1] = ((float)x87_r6_7);
0050c46c      result[2] = ((float)x87_r7_3);
0050c46f      return result;
0050c420  }

0050c472                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050c480  void __fastcall SPHEREPATH::SPHEREPATH(class SPHEREPATH* this)

0050c480  {
0050c488      class CSphere* edi = nullptr;
0050c48a      this->localspace_pos.objcell_id = 0;
0050c492      this->localspace_pos.vtable = 0x796910;
0050c484      this->localspace_pos.frame.qw = 0x3f800000;
0050c484      this->localspace_pos.frame.qx = 0f;
0050c484      this->localspace_pos.frame.qy = 0f;
0050c484      this->localspace_pos.frame.qz = 0f;
0050c484      this->localspace_pos.frame.m_fOrigin.x = 0;
0050c484      this->localspace_pos.frame.m_fOrigin.y = 0f;
0050c484      this->localspace_pos.frame.m_fOrigin.z = 0f;
0050c4ad      Frame::cache(&this->localspace_pos.frame);
0050c4b8      this->curr_pos.vtable = 0x796910;
0050c4be      this->curr_pos.objcell_id = 0;
0050c4b2      this->curr_pos.frame.qw = 0x3f800000;
0050c4b2      this->curr_pos.frame.qx = 0f;
0050c4b2      this->curr_pos.frame.qy = 0f;
0050c4b2      this->curr_pos.frame.qz = 0f;
0050c4b2      this->curr_pos.frame.m_fOrigin.x = 0;
0050c4b2      this->curr_pos.frame.m_fOrigin.y = 0f;
0050c4b2      this->curr_pos.frame.m_fOrigin.z = 0f;
0050c4dc      Frame::cache(&this->curr_pos.frame);
0050c4e7      this->check_pos.vtable = 0x796910;
0050c4ed      this->check_pos.objcell_id = 0;
0050c4e1      this->check_pos.frame.qw = 0x3f800000;
0050c4e1      this->check_pos.frame.qx = 0f;
0050c4e1      this->check_pos.frame.qy = 0f;
0050c4e1      this->check_pos.frame.qz = 0f;
0050c4e1      this->check_pos.frame.m_fOrigin.x = 0;
0050c4e1      this->check_pos.frame.m_fOrigin.y = 0f;
0050c4e1      this->check_pos.frame.m_fOrigin.z = 0f;
0050c50b      Frame::cache(&this->check_pos.frame);
0050c516      this->backup_check_pos.vtable = 0x796910;
0050c51c      this->backup_check_pos.objcell_id = 0;
0050c510      this->backup_check_pos.frame.qw = 0x3f800000;
0050c510      this->backup_check_pos.frame.qx = 0f;
0050c510      this->backup_check_pos.frame.qy = 0f;
0050c510      this->backup_check_pos.frame.qz = 0f;
0050c510      this->backup_check_pos.frame.m_fOrigin.x = 0;
0050c510      this->backup_check_pos.frame.m_fOrigin.y = 0f;
0050c510      this->backup_check_pos.frame.m_fOrigin.z = 0f;
0050c53a      Frame::cache(&this->backup_check_pos.frame);
0050c545      this->walkable_pos.vtable = 0x796910;
0050c54b      this->walkable_pos.objcell_id = 0;
0050c53f      this->walkable_pos.frame.qw = 0x3f800000;
0050c53f      this->walkable_pos.frame.qx = 0f;
0050c53f      this->walkable_pos.frame.qy = 0f;
0050c53f      this->walkable_pos.frame.qz = 0f;
0050c53f      this->walkable_pos.frame.m_fOrigin.x = 0;
0050c53f      this->walkable_pos.frame.m_fOrigin.y = 0f;
0050c53f      this->walkable_pos.frame.m_fOrigin.z = 0f;
0050c569      Frame::cache(&this->walkable_pos.frame);
0050c570      void* eax = operator new[](0x24);
0050c57a      void* eax_1;
0050c57a      
0050c57a      if (eax == 0)
0050c587          eax_1 = nullptr;
0050c57a      else
0050c57a      {
0050c57c          *(uint32_t*)eax = 2;
0050c582          eax_1 = ((char*)eax + 4);
0050c57a      }
0050c57a      
0050c58b      this->local_sphere = eax_1;
0050c58e      void* eax_2 = operator new[](0x24);
0050c598      void* eax_3;
0050c598      
0050c598      if (eax_2 == 0)
0050c5a5          eax_3 = nullptr;
0050c598      else
0050c598      {
0050c59a          *(uint32_t*)eax_2 = 2;
0050c5a0          eax_3 = ((char*)eax_2 + 4);
0050c598      }
0050c598      
0050c5a9      this->global_sphere = eax_3;
0050c5ac      void* eax_4 = operator new[](0x24);
0050c5ac      
0050c5b6      if (eax_4 != 0)
0050c5b6      {
0050c5b8          *(uint32_t*)eax_4 = 2;
0050c5be          edi = ((char*)eax_4 + 4);
0050c5b6      }
0050c5b6      
0050c5c3      this->localspace_sphere = edi;
0050c5cd      this->localspace_curr_center = operator new[](0x18);
0050c5da      this->global_curr_center = operator new[](0x18);
0050c5dd      SPHEREPATH::init(this);
0050c480  }

0050c5e8                          90 90 90 90 90 90 90 90                                                          ........

0050c5f0  void __fastcall SPHEREPATH::~SPHEREPATH(class SPHEREPATH* this)

0050c5f0  {
0050c5f3      class CSphere* local_sphere = this->local_sphere;
0050c5f3      
0050c5f8      if (local_sphere != 0)
0050c5fe          operator delete[](((char*)local_sphere - 4));
0050c5fe      
0050c606      class CSphere* global_sphere = this->global_sphere;
0050c606      
0050c60b      if (global_sphere != 0)
0050c611          operator delete[](((char*)global_sphere - 4));
0050c611      
0050c619      class CSphere* localspace_sphere = this->localspace_sphere;
0050c619      
0050c61e      if (localspace_sphere != 0)
0050c624          operator delete[](((char*)localspace_sphere - 4));
0050c624      
0050c630      operator delete[](this->localspace_curr_center);
0050c639      operator delete[](this->global_curr_center);
0050c646      this->walkable_pos.vtable = 0x79285c;
0050c64c      this->backup_check_pos.vtable = 0x79285c;
0050c652      this->check_pos.vtable = 0x79285c;
0050c658      this->curr_pos.vtable = 0x79285c;
0050c65e      this->localspace_pos.vtable = 0x79285c;
0050c5f0  }

0050c663           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0050c670  void __thiscall SPHEREPATH::init_sphere(class SPHEREPATH* this, uint32_t const arg2, class CSphere const* arg3, float const arg4)

0050c670  {
0050c67a      if (arg2 <= 2)
0050c684          this->num_sphere = arg2;
0050c67a      else
0050c67c          this->num_sphere = 2;
0050c67c      
0050c689      int32_t i = 0;
0050c689      
0050c68d      if (this->num_sphere > 0)
0050c68d      {
0050c69b          float* eax_1 = &arg3->center.z;
0050c69b          
0050c6fc          do
0050c6fc          {
0050c6b7              float var_4_1 = ((float)(((long double)arg4) * ((long double)ADJ(eax_1)->center.z)));
0050c6cd              void* edx_3 = ((0xfffffff8 - arg3) + eax_1);
0050c6d0              int32_t* ebx_2 = (this->local_sphere + edx_3);
0050c6d2              float var_14_1 = ((float)(((long double)arg4) * ((long double)ADJ(eax_1)->center.y)));
0050c6da              *(uint32_t*)ebx_2 = ((float)(((long double)arg4) * ((long double)ADJ(eax_1)->center.x)));
0050c6e0              ebx_2[1] = var_14_1;
0050c6e7              ebx_2[2] = var_4_1;
0050c6f0              i += 1;
0050c6f1              *(uint32_t*)(&this->local_sphere->radius + edx_3) = ((float)(((long double)arg4) * ((long double)ADJ(eax_1)->radius)));
0050c6f7              eax_1 = &eax_1[4];
0050c6fc          } while (i < this->num_sphere);
0050c68d      }
0050c68d      
0050c701      class CSphere* local_sphere = this->local_sphere;
0050c707      float x = local_sphere->center.x;
0050c70c      this->local_low_point.x = x;
0050c71c      float x_1 = x;
0050c70c      this->local_low_point.y = ((float)((long double)local_sphere->center.y));
0050c70c      this->local_low_point.z = ((float)(((long double)local_sphere->center.z) - ((long double)local_sphere->radius)));
0050c670  }

0050c73b                                                                                   90 90 90 90 90                             .....

0050c740  void __fastcall SPHEREPATH::cache_global_curr_center(class SPHEREPATH* this)

0050c740  {
0050c746      int32_t i = 0;
0050c746      
0050c74a      if (this->num_sphere > 0)
0050c74a      {
0050c752          int32_t esi_1 = 0;
0050c754          int32_t edx_1 = 0;
0050c754          
0050c7f6          do
0050c7f6          {
0050c756              class CSphere* local_sphere = this->local_sphere;
0050c75c              void* eax = ((char*)local_sphere + edx_1);
0050c75e              long double x87_r7_2 = (((long double)*(uint32_t*)((char*)local_sphere + edx_1)) * ((long double)this->curr_pos.frame.m_fl2gv[0]));
0050c764              edx_1 += 0x10;
0050c77d              long double x87_r7_5 = (((x87_r7_2 + (((long double)*(uint32_t*)((char*)eax + 4)) * ((long double)this->curr_pos.frame.m_fl2gv[3]))) + (((long double)*(uint32_t*)((char*)eax + 8)) * ((long double)this->curr_pos.frame.m_fl2gv[6]))) + ((long double)this->curr_pos.frame.m_fOrigin.x));
0050c7a7              long double x87_r7_9 = (((((long double)this->curr_pos.frame.m_fl2gv[7]) * ((long double)*(uint32_t*)((char*)eax + 8))) + (((long double)*(uint32_t*)eax) * ((long double)this->curr_pos.frame.m_fl2gv[1]))) + (((long double)this->curr_pos.frame.m_fl2gv[4]) * ((long double)*(uint32_t*)((char*)eax + 4))));
0050c7af              float var_8_1 = ((float)(x87_r7_9 + ((long double)this->curr_pos.frame.m_fOrigin.y)));
0050c7d2              float* eax_2 = (this->global_curr_center + esi_1);
0050c7d4              i += 1;
0050c7d5              long double x87_r7_14 = (((((long double)this->curr_pos.frame.m_fl2gv[8]) * ((long double)*(uint32_t*)((char*)eax + 8))) + (((long double)this->curr_pos.frame.m_fl2gv[5]) * ((long double)*(uint32_t*)((char*)eax + 4)))) + (((long double)this->curr_pos.frame.m_fl2gv[2]) * ((long double)*(uint32_t*)eax)));
0050c7d7              esi_1 += 0xc;
0050c7da              long double x87_r7_15 = (x87_r7_14 + ((long double)this->curr_pos.frame.m_fOrigin.z));
0050c7e0              *(uint32_t*)eax_2 = ((float)x87_r7_5);
0050c7e6              eax_2[1] = var_8_1;
0050c7f1              eax_2[2] = ((float)x87_r7_15);
0050c7f6          } while (i < this->num_sphere);
0050c74a      }
0050c740  }

0050c803           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0050c810  void __thiscall SPHEREPATH::cache_global_sphere(class SPHEREPATH* this, class AC1Legacy::Vector3* arg2)

0050c810  {
0050c814      uint32_t num_sphere = this->num_sphere;
0050c81a      int32_t i = 0;
0050c81a      
0050c81f      if (arg2 != 0)
0050c81f      {
0050c823          if (num_sphere > 0)
0050c823          {
0050c825              int32_t edi_1 = 0;
0050c825              
0050c84d              do
0050c84d              {
0050c827                  class CSphere* global_sphere = this->global_sphere;
0050c82d                  void* eax = ((char*)global_sphere + edi_1);
0050c82f                  long double x87_r7_2 = (((long double)*(uint32_t*)((char*)global_sphere + edi_1)) + ((long double)arg2->x));
0050c831                  i += 1;
0050c832                  edi_1 += 0x10;
0050c835                  *(uint32_t*)eax = ((float)x87_r7_2);
0050c83d                  *(uint32_t*)((char*)eax + 4) = ((float)(((long double)arg2->y) + ((long double)*(uint32_t*)((char*)eax + 4))));
0050c846                  *(uint32_t*)((char*)eax + 8) = ((float)(((long double)arg2->z) + ((long double)*(uint32_t*)((char*)eax + 8))));
0050c84d              } while (i < this->num_sphere);
0050c823          }
0050c823          
0050c856          this->global_low_point.x = ((float)(((long double)arg2->x) + ((long double)this->global_low_point.x)));
0050c85f          this->global_low_point.y = ((float)(((long double)arg2->y) + ((long double)this->global_low_point.y)));
0050c868          this->global_low_point.z = ((float)(((long double)arg2->z) + ((long double)this->global_low_point.z)));
0050c86e          return;
0050c81f      }
0050c81f      
0050c873      if (num_sphere > 0)
0050c873      {
0050c879          int32_t edx = 0;
0050c879          
0050c92b          do
0050c92b          {
0050c88a              *(uint32_t*)(&this->global_sphere->radius + edx) = *(uint32_t*)(&this->local_sphere->radius + edx);
0050c88e              class CSphere* local_sphere = this->local_sphere;
0050c894              void* eax_4 = ((char*)local_sphere + edx);
0050c8b0              long double x87_r7_16 = (((((long double)*(uint32_t*)((char*)local_sphere + edx)) * ((long double)this->check_pos.frame.m_fl2gv[0])) + (((long double)*(uint32_t*)((char*)eax_4 + 4)) * ((long double)this->check_pos.frame.m_fl2gv[3]))) + (((long double)*(uint32_t*)((char*)eax_4 + 8)) * ((long double)this->check_pos.frame.m_fl2gv[6])));
0050c8dc              long double x87_r7_21 = (((((long double)this->check_pos.frame.m_fl2gv[7]) * ((long double)*(uint32_t*)((char*)eax_4 + 8))) + (((long double)*(uint32_t*)eax_4) * ((long double)this->check_pos.frame.m_fl2gv[1]))) + (((long double)this->check_pos.frame.m_fl2gv[4]) * ((long double)*(uint32_t*)((char*)eax_4 + 4))));
0050c8e4              float var_8_1 = ((float)(x87_r7_21 + ((long double)this->check_pos.frame.m_fOrigin.y)));
0050c907              float* eax_6 = (this->global_sphere + edx);
0050c909              i += 1;
0050c90a              long double x87_r7_26 = (((((long double)this->check_pos.frame.m_fl2gv[8]) * ((long double)*(uint32_t*)((char*)eax_4 + 8))) + (((long double)this->check_pos.frame.m_fl2gv[2]) * ((long double)*(uint32_t*)eax_4))) + (((long double)this->check_pos.frame.m_fl2gv[5]) * ((long double)*(uint32_t*)((char*)eax_4 + 4))));
0050c90c              edx += 0x10;
0050c90f              long double x87_r7_27 = (x87_r7_26 + ((long double)this->check_pos.frame.m_fOrigin.z));
0050c915              *(uint32_t*)eax_6 = ((float)(x87_r7_16 + ((long double)this->check_pos.frame.m_fOrigin.x)));
0050c91b              eax_6[1] = var_8_1;
0050c926              eax_6[2] = ((float)x87_r7_27);
0050c92b          } while (i < this->num_sphere);
0050c873      }
0050c873      
0050c988      float var_8_2 = ((float)((((((long double)*(uint32_t*)((char*)this->global_low_point + 0x128)) * ((long double)this->local_low_point.z)) + (((long double)*(uint32_t*)((char*)this->global_low_point + 0x110)) * ((long double)this->local_low_point.x))) + (((long double)*(uint32_t*)((char*)this->global_low_point + 0x11c)) * ((long double)this->local_low_point.y))) + ((long double)*(uint32_t*)((char*)this->global_low_point + 0x134))));
0050c9af      long double x87_r7_42 = ((((((long double)*(uint32_t*)((char*)this->global_low_point + 0x12c)) * ((long double)this->local_low_point.z)) + (((long double)*(uint32_t*)((char*)this->global_low_point + 0x114)) * ((long double)this->local_low_point.x))) + (((long double)*(uint32_t*)((char*)this->global_low_point + 0x120)) * ((long double)this->local_low_point.y))) + ((long double)*(uint32_t*)((char*)this->global_low_point + 0x138)));
0050c937      this->global_low_point.x = ((float)((((((long double)this->check_pos.frame.m_fl2gv[6]) * ((long double)this->local_low_point.z)) + (((long double)*(uint32_t*)((char*)this->global_low_point + 0x10c)) * ((long double)this->local_low_point.x))) + (((long double)*(uint32_t*)((char*)this->global_low_point + 0x118)) * ((long double)this->local_low_point.y))) + ((long double)*(uint32_t*)((char*)this->global_low_point + 0x130))));
0050c937      this->global_low_point.y = var_8_2;
0050c937      this->global_low_point.z = ((float)x87_r7_42);
0050c810  }

0050c87d                                                                                         8d 49 00                               .I.
0050c9cb                                   90 90 90 90 90                                                             .....

0050c9d0  void __thiscall SPHEREPATH::cache_localspace_sphere(class SPHEREPATH* this, class Position const* arg2, float const arg3)

0050c9d0  {
0050c9e8      int32_t ebp = 0;
0050c9ec      int32_t var_4c = 0;
0050c9f0      arg3 = ((float)(((long double)1f) / ((long double)arg3)));
0050c9f0      
0050c9f4      if (this->num_sphere > 0)
0050c9f4      {
0050c9fb          int32_t edi_1 = 0;
0050cadd          bool cond:1_1;
0050cadd          
0050cadd          do
0050cadd          {
0050ca14              *(uint32_t*)(&this->localspace_sphere->radius + edi_1) = ((float)(((long double)arg3) * ((long double)*(uint32_t*)(&this->local_sphere->radius + edi_1))));
0050ca26              void __return;
0050ca26              class AC1Legacy::Vector3* eax_3 = Position::localtolocal(arg2, &__return, &this->check_pos, (this->local_sphere + edi_1));
0050ca38              void* edx_4 = (this->localspace_sphere + edi_1);
0050ca3a              long double x87_r6_2 = (((long double)arg3) * ((long double)eax_3->y));
0050ca44              float var_28_1 = ((float)(((long double)arg3) * ((long double)eax_3->z)));
0050ca5a              *(uint32_t*)edx_4 = ((float)(((long double)arg3) * ((long double)eax_3->x)));
0050ca68              *(uint32_t*)((char*)edx_4 + 4) = ((float)x87_r6_2);
0050ca6b              *(uint32_t*)((char*)edx_4 + 8) = var_28_1;
0050ca82              void __return_1;
0050ca82              class AC1Legacy::Vector3* eax_7 = Position::localtolocal(arg2, &__return_1, &this->curr_pos, (this->local_sphere + edi_1));
0050ca94              void* ecx_9 = (this->localspace_curr_center + ebp);
0050ca96              long double x87_r6_5 = (((long double)arg3) * ((long double)eax_7->y));
0050ca99              edi_1 += 0x10;
0050caa0              ebp += 0xc;
0050caa6              float var_1c_1 = ((float)(((long double)arg3) * ((long double)eax_7->z)));
0050cabc              *(uint32_t*)ecx_9 = ((float)(((long double)arg3) * ((long double)eax_7->x)));
0050caca              *(uint32_t*)((char*)ecx_9 + 4) = ((float)x87_r6_5);
0050cad1              *(uint32_t*)((char*)ecx_9 + 8) = var_1c_1;
0050cad7              cond:1_1 = (var_4c + 1) < this->num_sphere;
0050cad9              var_4c += 1;
0050cadd          } while (cond:1_1);
0050c9f4      }
0050c9f4      
0050cae7      this->localspace_pos.objcell_id = arg2->objcell_id;
0050caef      this->localspace_pos.frame.m_fOrigin.x = arg2->frame.m_fOrigin.x;
0050caef      this->localspace_pos.frame.m_fOrigin.y = arg2->frame.m_fOrigin.y;
0050caef      this->localspace_pos.frame.m_fOrigin.z = arg2->frame.m_fOrigin.z;
0050cb03      this->localspace_pos.frame.qw = arg2->frame.qw;
0050cb09      this->localspace_pos.frame.qx = arg2->frame.qx;
0050cb0f      this->localspace_pos.frame.qy = arg2->frame.qy;
0050cb15      this->localspace_pos.frame.qz = arg2->frame.qz;
0050cb1b      this->localspace_pos.frame.m_fl2gv[0] = arg2->frame.m_fl2gv[0];
0050cb21      this->localspace_pos.frame.m_fl2gv[1] = arg2->frame.m_fl2gv[1];
0050cb27      this->localspace_pos.frame.m_fl2gv[2] = arg2->frame.m_fl2gv[2];
0050cb2d      this->localspace_pos.frame.m_fl2gv[3] = arg2->frame.m_fl2gv[3];
0050cb33      this->localspace_pos.frame.m_fl2gv[4] = arg2->frame.m_fl2gv[4];
0050cb39      this->localspace_pos.frame.m_fl2gv[5] = arg2->frame.m_fl2gv[5];
0050cb3f      this->localspace_pos.frame.m_fl2gv[6] = arg2->frame.m_fl2gv[6];
0050cb45      this->localspace_pos.frame.m_fl2gv[7] = arg2->frame.m_fl2gv[7];
0050cb4b      this->localspace_pos.frame.m_fl2gv[8] = arg2->frame.m_fl2gv[8];
0050cb54      this->localspace_z.x = ((float)(((((long double)arg2->frame.m_fl2gv[1]) + ((long double)arg2->frame.m_fl2gv[0])) * ((long double)0f)) + ((long double)arg2->frame.m_fl2gv[2])));
0050cb54      this->localspace_z.y = ((float)(((((long double)arg2->frame.m_fl2gv[4]) + ((long double)arg2->frame.m_fl2gv[3])) * ((long double)0f)) + ((long double)arg2->frame.m_fl2gv[5])));
0050cb54      this->localspace_z.z = ((float)(((((long double)arg2->frame.m_fl2gv[7]) + ((long double)arg2->frame.m_fl2gv[6])) * ((long double)0f)) + ((long double)arg2->frame.m_fl2gv[8])));
0050cba3      class CSphere* localspace_sphere = this->localspace_sphere;
0050cba6      long double x87_r7_22 = ((long double)localspace_sphere->radius);
0050cbe3      this->localspace_low_point.x = ((float)(((long double)localspace_sphere->center.x) - (x87_r7_22 * ((long double)this->localspace_z.x))));
0050cbe3      this->localspace_low_point.y = ((float)(((long double)localspace_sphere->center.y) - ((long double)((float)(x87_r7_22 * ((long double)this->localspace_z.y))))));
0050cbe3      this->localspace_low_point.z = ((float)(((long double)localspace_sphere->center.z) - ((long double)((float)(x87_r7_22 * ((long double)this->localspace_z.z))))));
0050c9d0  }

0050cbff                                                                                               90                                 .

0050cc00  void __thiscall SPHEREPATH::adjust_check_pos(class SPHEREPATH* this, uint32_t arg2)

0050cc00  {
0050cc17      if (((uint32_t)arg2) < 0x100)
0050cc17      {
0050cc26          float __return;
0050cc26          LandDefs::get_block_offset(&__return, arg2, this->check_pos.objcell_id);
0050cc35          SPHEREPATH::cache_global_sphere(this, &__return);
0050cc44          this->check_pos.frame.m_fOrigin.x = ((float)(((long double)__return) + ((long double)this->check_pos.frame.m_fOrigin.x)));
0050cc54          float var_8;
0050cc54          this->check_pos.frame.m_fOrigin.y = ((float)(((long double)var_8) + ((long double)this->check_pos.frame.m_fOrigin.y)));
0050cc64          float var_4;
0050cc64          this->check_pos.frame.m_fOrigin.z = ((float)(((long double)var_4) + ((long double)this->check_pos.frame.m_fOrigin.z)));
0050cc17      }
0050cc17      
0050cc6a      this->check_pos.objcell_id = arg2;
0050cc00  }

0050cc78                                                                          90 90 90 90 90 90 90 90                          ........

0050cc80  enum TransitionState __thiscall SPHEREPATH::precipice_slide(class SPHEREPATH* this, class COLLISIONINFO* arg2)

0050cc80  {
0050cc9f      float var_3c;
0050cc9f      int32_t eax = CPolygon::find_crossed_edge(this->walkable, &this->walkable_check_pos, &this->walkable_up, &var_3c);
0050cc9f      
0050cca6      if (eax == 0)
0050cca6      {
0050cca8          this->walkable = eax;
0050ccb7          return 2;
0050cca6      }
0050cca6      
0050ccc0      this->walkable = nullptr;
0050ccc6      this->step_up = 0;
0050ccdd      class AC1Legacy::Vector3* global_curr_center = this->global_curr_center;
0050cce1      class CSphere* global_sphere = this->global_sphere;
0050ccf2      float var_38;
0050ccf2      float var_34;
0050ccf2      float var_30 = ((float)(((((long double)var_34) * ((long double)this->walkable_pos.frame.m_fl2gv[6])) + (((long double)var_3c) * ((long double)this->walkable_pos.frame.m_fl2gv[0]))) + (((long double)var_38) * ((long double)this->walkable_pos.frame.m_fl2gv[3]))));
0050cd1c      float var_2c = ((float)(((((long double)var_34) * ((long double)this->walkable_pos.frame.m_fl2gv[7])) + (((long double)var_3c) * ((long double)this->walkable_pos.frame.m_fl2gv[1]))) + (((long double)var_38) * ((long double)this->walkable_pos.frame.m_fl2gv[4]))));
0050cd28      long double x87_r7_9 = (((long double)var_34) * ((long double)this->walkable_pos.frame.m_fl2gv[8]));
0050cd2e      long double x87_r6_8 = ((long double)var_3c);
0050cd32      var_3c = var_30;
0050cd5c      float var_28 = ((float)((x87_r7_9 + (x87_r6_8 * ((long double)this->walkable_pos.frame.m_fl2gv[2]))) + (((long double)var_38) * ((long double)this->walkable_pos.frame.m_fl2gv[5]))));
0050cd6d      float __return;
0050cd6d      LandDefs::get_block_offset(&__return, this->curr_pos.objcell_id, this->check_pos.objcell_id);
0050cdbb      float var_1c;
0050cdbb      long double x87_r7_17 = (((((long double)var_28) * (((long double)var_1c) + ((long double)((float)(((long double)global_sphere->center.z) - ((long double)global_curr_center->z)))))) + ((((long double)global_sphere->center.y) - ((long double)global_curr_center->y)) * ((long double)var_2c))) + (((long double)((float)(((long double)__return) + (((long double)global_sphere->center.x) - ((long double)global_curr_center->x))))) * ((long double)var_30)));
0050cdbf      long double temp1 = ((long double)0f);
0050cdbf      (x87_r7_17 - temp1);
0050cdbf      
0050cdcc      if ((*(uint8_t*)((char*)((((x87_r7_17 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0050cdcc      {
0050cdd8          var_3c = ((float)(((long double)var_30) * ((long double)-1f)));
0050cde6          float var_38_2 = ((float)(((long double)var_2c) * ((long double)-1f)));
0050cdf4          float var_34_2 = ((float)(((long double)var_28) * ((long double)-1f)));
0050cdcc      }
0050cdcc      
0050ce11      return CSphere::slide_sphere(global_sphere, this, arg2, &var_3c, global_curr_center);
0050cc80  }

0050ce14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050ce20  void __thiscall SPHEREPATH::init_path(class SPHEREPATH* this, class CObjCell* arg2, class Position* arg3, class Position* arg4)

0050ce20  {
0050ce32      this->begin_cell = arg2;
0050ce38      this->begin_pos = arg3;
0050ce3e      this->end_pos = arg4;
0050ce3e      
0050ce44      if (arg3 != 0)
0050ce44      {
0050ce4c          this->curr_pos.objcell_id = arg3->objcell_id;
0050ce59          Frame::operator=(&this->curr_pos.frame, &arg3->frame);
0050ce60          this->curr_cell = arg2;
0050ce66          SPHEREPATH::cache_global_curr_center(this);
0050ce6c          this->insert_type = TRANSITION_INSERT;
0050ce77          return;
0050ce44      }
0050ce44      
0050ce87      this->curr_pos.objcell_id = arg4->objcell_id;
0050ce8d      Frame::operator=(&this->curr_pos.frame, &arg4->frame);
0050ce94      this->curr_cell = arg2;
0050ce9a      SPHEREPATH::cache_global_curr_center(this);
0050cea0      this->insert_type = PLACEMENT_INSERT;
0050ce20  }

0050ceae                                            90 90                                                                ..

0050ceb0  int32_t __thiscall OBJECTINFO::missile_ignore(class OBJECTINFO const* this, class CPhysicsObj const* arg2)

0050ceb0  {
0050ceb4      uint8_t state = ((int8_t)arg2->state);
0050ceb4      
0050cebd      if ((state & 0x40) != 0)
0050cec4          return 1;
0050cec4      
0050ced1      if ((this->object->state & 0x40) != 0)
0050ced1      {
0050ced3          uint32_t targetID = this->targetID;
0050ced3          
0050ced9          if (arg2->id != targetID)
0050ced9          {
0050cede              class CWeenieObject* weenie_obj = arg2->weenie_obj;
0050cede              
0050cee8              if (((state & 4) != 0 && weenie_obj != 0))
0050cef0                  return 1;
0050cef0              
0050cef9              if (((targetID != 0 && weenie_obj != 0) && weenie_obj->vtable->IsCreature() != 0))
0050cef0                  return 1;
0050ced9          }
0050ced1      }
0050ced1      
0050cf09      return 0;
0050ceb0  }

0050cf0c                                      90 90 90 90                                                              ....

0050cf10  int32_t __thiscall OBJECTINFO::is_valid_walkable(class OBJECTINFO const* this, class AC1Legacy::Vector3 const* arg2)

0050cf10  {
0050cf12      /* tailcall */
0050cf12      return CPhysicsObj::is_valid_walkable(this->object, arg2);
0050cf10  }

0050cf17                                                                       90 90 90 90 90 90 90 90 90                         .........

0050cf20  float __fastcall OBJECTINFO::get_walkable_z(class OBJECTINFO const* this)

0050cf20  {
0050cf22      /* tailcall */
0050cf22      return CPhysicsObj::get_walkable_z(this->object);
0050cf20  }

0050cf27                       90 90 90 90 90 90 90 90 90                                                         .........

0050cf30  void __thiscall OBJECTINFO::init(class OBJECTINFO* this, class CPhysicsObj* arg2, int32_t arg3)

0050cf30  {
0050cf3b      this->object = arg2;
0050cf3d      this->state = arg3;
0050cf46      this->scale = ((float)((long double)arg2->m_scale));
0050cf4a      CPhysicsObj::GetStepUpHeight(arg2);
0050cf4f      long double x87_r0;
0050cf4f      this->step_up_height = ((float)x87_r0);
0050cf54      CPhysicsObj::GetStepDownHeight(this->object);
0050cf59      long double x87_r1;
0050cf59      this->step_down_height = ((float)x87_r1);
0050cf5c      class CPhysicsObj* object = this->object;
0050cf67      this->ethereal = (object->state & 4);
0050cf78      this->step_down = (!((object->state >> 6)) & 1);
0050cf7b      class CWeenieObject* weenie_obj = object->weenie_obj;
0050cf7b      
0050cf83      if (weenie_obj != 0)
0050cf83      {
0050cf8e          if (weenie_obj->vtable->IsImpenetrable() != 0)
0050cf90              this->state |= 0x80;
0050cf90          
0050cfa0          if (weenie_obj->vtable->IsPlayer() != 0)
0050cfa2              this->state |= 0x100;
0050cfa2          
0050cfb2          if (weenie_obj->vtable->IsPK() != 0)
0050cfb4              this->state |= 0x800;
0050cfb4          
0050cfc4          if (weenie_obj->vtable->IsPKLite() != 0)
0050cfc6              this->state |= 0x1000;
0050cf83      }
0050cf30  }

0050cfd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050cfe0  void __fastcall OBJECTINFO::kill_velocity(class OBJECTINFO* this)

0050cfe0  {
0050cfe3      class CPhysicsObj* object = this->object;
0050cfec      int32_t var_c = 0;
0050cff4      int32_t var_8 = 0;
0050cffc      int32_t var_4 = 0;
0050d004      CPhysicsObj::set_velocity(object, &var_c, 0);
0050cfe0  }

0050d00d                                         90 90 90                                                               ...

0050d010  void __thiscall OBJECTINFO::validate_walkable(class OBJECTINFO* this, class CSphere const* arg2, class Plane const* arg3, int32_t const arg4, float const arg5, class SPHEREPATH* arg6, class COLLISIONINFO* arg7, uint32_t arg8)

0050d010  {
0050d025      int32_t var_1c = 1;
0050d029      float var_18;
0050d029      
0050d029      if ((this->state & 4) != 0)
0050d029      {
0050d047          long double x87_r7_4 = ((((((long double)arg3->N.x) * ((long double)arg2->center.x)) + (((long double)arg3->N.y) * ((long double)arg2->center.y))) + (((long double)arg2->center.z) * ((long double)arg3->N.z))) + ((long double)arg3->d));
0050d04a          long double x87_r7_5 = (x87_r7_4 - ((long double)arg2->radius));
0050d057          long double x87_r6_5 = -(((long double)0.000199999995f));
0050d05b          (x87_r7_5 - x87_r6_5);
0050d05b          
0050d062          if ((*(uint8_t*)((char*)((((x87_r7_5 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == x87_r6_5) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0050d062          {
0050d06a              float* global_curr_center = arg6->global_curr_center;
0050d06f              var_18 = ((float)(((long double)arg2->center.x) - ((long double)*(uint32_t*)global_curr_center)));
0050d079              float var_14_1 = ((float)(((long double)arg2->center.y) - ((long double)global_curr_center[1])));
0050d080              long double x87_r7_12 = (((long double)arg2->center.z) - ((long double)global_curr_center[2]));
0050d099              long double x87_r6_11 = (((long double)((float)x87_r7_5)) / (((x87_r7_12 * ((long double)arg3->N.z)) + (((long double)var_18) * ((long double)arg3->N.x))) + (((long double)var_14_1) * ((long double)arg3->N.y))));
0050d09d              long double temp2_1 = ((long double)0f);
0050d09d              (x87_r6_11 - temp2_1);
0050d0a3              global_curr_center = ((((x87_r6_11 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp2_1) ? 1 : 0) << 0xe) | 0x3000))));
0050d0a5              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0050d0a5              
0050d0a8              if (p_1)
0050d0a8              {
0050d0aa                  long double temp3_1 = ((long double)1.0);
0050d0aa                  (x87_r6_11 - temp3_1);
0050d0b0                  global_curr_center = ((((x87_r6_11 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp3_1) ? 1 : 0) << 0xe) | 0x3000))));
0050d0a8              }
0050d0a8              
0050d0b5              class Position* begin_pos;
0050d0b5              
0050d0b5              if ((!(p_1) || (*(uint8_t*)((char*)global_curr_center)[1] & 0x41) == 0))
0050d0b7                  begin_pos = arg6->begin_pos;
0050d0b7              
0050d0ce              if ((((p_1 && (*(uint8_t*)((char*)global_curr_center)[1] & 0x41) != 0) || begin_pos == 0) || ((uint32_t)((int16_t)begin_pos->objcell_id)) < 0x100))
0050d0ce              {
0050d0df                  long double x87_r6_12 = -(x87_r6_11);
0050d0fe                  float var_10_1 = ((float)(x87_r7_12 * x87_r6_12));
0050d102                  var_18 = ((float)(((long double)var_18) * x87_r6_12));
0050d108                  float var_14_2 = ((float)(((long double)var_14_1) * x87_r6_12));
0050d10e                  SPHEREPATH::add_offset_to_check_pos(arg6, &var_18);
0050d11a                  COLLISIONINFO::set_collision_normal(arg7, arg3);
0050d11f                  arg7->collided_with_environment = 1;
0050d0ce              }
0050d062          }
0050d062          
0050d0dc          return;
0050d029      }
0050d029      
0050d134      long double x87_r7_16 = ((long double)arg2->radius);
0050d154      ((((((long double)arg2->center.y) * ((long double)arg3->N.y)) + ((((long double)arg2->center.z) - x87_r7_16) * ((long double)arg3->N.z))) + (((long double)arg2->center.x) * ((long double)arg3->N.x))) + ((long double)arg3->d));
0050d163      long double x87_r6_20 = -(((long double)0.000199999995f));
0050d167      (x87_r7_16 - x87_r6_20);
0050d169      class CSphere* eax_5;
0050d169      eax_5 = ((((x87_r7_16 < x87_r6_20) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_16, x87_r6_20))) ? 1 : 0) << 0xa) | ((((x87_r7_16 == x87_r6_20) ? 1 : 0) << 0xe) | 0x3800))));
0050d16b      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0050d16b      
0050d16e      if (p_2)
0050d16e      {
0050d297          long double temp1_1 = ((long double)0.000199999995f);
0050d297          (x87_r7_16 - temp1_1);
0050d29d          eax_5 = ((((x87_r7_16 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_16, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_16 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0050d29d          
0050d2a2          if ((*(uint8_t*)((char*)eax_5)[1] & 0x41) == 0)
0050d2a2          {
0050d2a5              int32_t var_1c_1 = 1;
0050d2b1              return;
0050d2a2          }
0050d2a2          
0050d2b8          int32_t eax_14 = CPhysicsObj::is_valid_walkable(this->object, arg3);
0050d2b8          
0050d2d7          if (((arg6->step_down != 0 || (this->state & 2) == 0) || eax_14 != 0))
0050d2d7          {
0050d2e1              COLLISIONINFO::set_contact_plane(arg7, arg3, arg4);
0050d2ea              arg7->contact_plane_cell_id = arg8;
0050d2d7          }
0050d2d7          
0050d2fb          if (((this->state & 1) == 0 && arg6->step_down == 0))
0050d2fb          {
0050d300              COLLISIONINFO::set_collision_normal(arg7, arg3);
0050d305              arg7->collided_with_environment = 1;
0050d2fb          }
0050d2fb          
0050d30c          var_1c = 1;
0050d16e      }
0050d16e      else
0050d16e      {
0050d174          class SPHEREPATH* edi = arg6;
0050d174          
0050d180          if (edi->check_walkable != 0)
0050d190              return;
0050d190          
0050d19a          arg6 = ((float)(x87_r7_16 / ((long double)arg3->N.z)));
0050d19e          int32_t eax_8 = CPhysicsObj::is_valid_walkable(this->object, arg3);
0050d19e          
0050d1b9          if (((edi->step_down != 0 || (this->state & 2) == 0) || eax_8 != 0))
0050d1b9          {
0050d1c7              COLLISIONINFO::set_contact_plane(arg7, arg3, arg4);
0050d1d0              arg7->contact_plane_cell_id = arg8;
0050d1d0              
0050d1db              if (edi->step_down != 0)
0050d1db              {
0050d1f9                  long double x87_r7_23 = ((((long double)1.0) - ((((long double)-1f) / (((long double)edi->step_down_amt) * ((long double)edi->walk_interp))) * ((long double)arg6))) * ((long double)edi->walk_interp));
0050d1ff                  long double x87_r6_21 = ((long double)edi->walk_interp);
0050d207                  (x87_r7_23 - x87_r6_21);
0050d209                  int32_t eax_9;
0050d209                  eax_9 = ((((x87_r7_23 < x87_r6_21) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_23, x87_r6_21))) ? 1 : 0) << 0xa) | ((((x87_r7_23 == x87_r6_21) ? 1 : 0) << 0xe) | 0x3800))));
0050d209                  
0050d20e                  if ((*(uint8_t*)((char*)eax_9)[1] & 1) == 0)
0050d294                      return;
0050d294                  
0050d210                  long double temp4_1 = ((long double)-0.10000000000000001);
0050d210                  (x87_r7_23 - temp4_1);
0050d216                  eax_9 = ((((x87_r7_23 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_23, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_23 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
0050d218                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0050d218                  
0050d21b                  if (!(p_3))
0050d294                      return;
0050d294                  
0050d21d                  edi->walk_interp = ((float)x87_r7_23);
0050d1db              }
0050d1db              
0050d230              float var_10_2 = ((float)-(((long double)arg6)));
0050d234              var_18 = 0f;
0050d23c              int32_t var_14_3 = 0;
0050d244              SPHEREPATH::add_offset_to_check_pos(edi, &var_18);
0050d249              var_1c = 3;
0050d1b9          }
0050d1b9          
0050d263          if (((this->state & 1) == 0 && edi->step_down == 0))
0050d263          {
0050d26c              COLLISIONINFO::set_collision_normal(arg7, arg3);
0050d275              arg7->collided_with_environment = 1;
0050d263          }
0050d16e      }
0050d010  }

0050d322        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050d330  void __thiscall Ray::InitFromOffset(class Ray* this, class Vector3 const* arg2, class Vector3 const* arg3)

0050d330  {
0050d33a      float* this_1 = this;
0050d33c      *(uint32_t*)this_1 = arg2->x;
0050d341      this_1[1] = arg2->y;
0050d347      this_1[2] = arg2->z;
0050d356      long double x87_r7_2 = fabsl((((long double)arg3->x) - ((long double)Vector3_ZeroVector__.x)));
0050d358      long double temp1 = ((long double)0.000199999995f);
0050d358      (x87_r7_2 - temp1);
0050d35e      float eax;
0050d35e      eax = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
0050d360      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0050d360      
0050d363      if (!(p))
0050d363      {
0050d36e          long double x87_r7_5 = fabsl((((long double)arg3->y) - ((long double)Vector3_ZeroVector__.y)));
0050d370          long double temp2_1 = ((long double)0.000199999995f);
0050d370          (x87_r7_5 - temp2_1);
0050d376          eax = ((((x87_r7_5 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050d378          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0050d378          
0050d37b          if (!(p_1))
0050d37b          {
0050d386              long double x87_r7_8 = fabsl((((long double)arg3->z) - ((long double)Vector3_ZeroVector__.z)));
0050d388              long double temp3_1 = ((long double)0.000199999995f);
0050d388              (x87_r7_8 - temp3_1);
0050d38e              eax = ((((x87_r7_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0050d390              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0050d390              
0050d393              if (!(p_2))
0050d393              {
0050d395                  this->length = 0f;
0050d3a8                  this->dir.x = 0;
0050d3a8                  this->dir.y = 1f;
0050d3a8                  this->dir.z = 0f;
0050d3cf                  return;
0050d393              }
0050d37b          }
0050d363      }
0050d363      
0050d3d2      arg3->z;
0050d3dc      arg3->x;
0050d3f8      this->length = ((float)((long double)arg3->y));
0050d403      long double x87_r7_16 = (((long double)1f) / ((long double)this->length));
0050d3d5      this->dir.x = arg3->x;
0050d3d5      this->dir.y = arg3->y;
0050d3d5      this->dir.z = arg3->z;
0050d3d5      this->dir.x = ((float)(x87_r7_16 * ((long double)this->dir.x)));
0050d3d5      this->dir.y = ((float)(x87_r7_16 * ((long double)this->dir.y)));
0050d3d5      this->dir.z = ((float)(x87_r7_16 * ((long double)this->dir.z)));
0050d330  }


0050d430  void Render::SetObjectScale(class Vector3 const* arg1)

0050d430  {
0050d434      float x = arg1->x;
0050d436      Render::object_scale_vec.x = x;
0050d43c      float y = arg1->y;
0050d43f      Render::object_scale_vec.y = y;
0050d445      long double x87_r7 = ((long double)Render::object_scale_vec.y);
0050d44e      long double temp0 = ((long double)Render::object_scale_vec.x);
0050d44e      (x87_r7 - temp0);
0050d454      Render::object_scale_vec.z = arg1->z;
0050d459      Render::object_scale = x;
0050d45f      float eax;
0050d45f      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0050d45f      
0050d464      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0050d466          Render::object_scale = y;
0050d466      
0050d46c      long double x87_r7_1 = ((long double)Render::object_scale_vec.z);
0050d472      long double temp1 = ((long double)Render::object_scale);
0050d472      (x87_r7_1 - temp1);
0050d478      eax = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
0050d478      
0050d47d      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0050d484          Render::object_scale = Render::object_scale_vec.z;
0050d430  }

0050d48a                                90 90 90 90 90 90                                                            ......

0050d490  uint32_t __fastcall CPhysicsPart::get_physobj_id(class CPhysicsPart const* this)

0050d490  {
0050d490      class CPhysicsObj* physobj = this->physobj;
0050d490      
0050d498      if (physobj == 0)
0050d4a0          return 0;
0050d4a0      
0050d49d      return physobj->id;
0050d490  }

0050d4a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0050d4b0  uint8_t __fastcall CPhysicsPart::IsPartOfPlayerObj(class CPhysicsPart const* this)

0050d4b0  {
0050d4b0      class CPhysicsObj* physobj = this->physobj;
0050d4b0      
0050d4c0      if ((physobj != 0 && physobj == CPhysicsObj::player_object))
0050d4c7          return 1;
0050d4c7      
0050d4ca      return 0;
0050d4b0  }

0050d4cb                                   90 90 90 90 90                                                             .....

0050d4d0  uint8_t __fastcall CPhysicsPart::GetDrawnThisFrame(class CPhysicsPart* this)

0050d4d0  {
0050d4e2      uint32_t eax;
0050d4e2      eax = this->m_current_render_frame_num == RenderDevice::render_device->m_nFrameStamp;
0050d4e5      return eax;
0050d4d0  }

0050d4e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0050d4f0  void __fastcall CPhysicsPart::SetDrawnThisFrame(class CPhysicsPart* this)

0050d4f0  {
0050d4fb      this->m_current_render_frame_num = RenderDevice::render_device->m_nFrameStamp;
0050d4f0  }

0050d502        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050d510  void __fastcall CPhysicsPart::GetMaxDegradeDistance(class CPhysicsPart const* this)

0050d510  {
0050d510      class GfxObjDegradeInfo* degrades = this->degrades;
0050d510      
0050d51b      if (degrades == 0)
0050d524          return;
0050d524      
0050d51f      /* tailcall */
0050d51f      return GfxObjDegradeInfo::get_max_degrade_distance(degrades);
0050d510  }

0050d525                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0050d530  void CPhysicsPart::ReleaseGfxObjArray(class GfxObjDegradeInfo** arg1, class CGfxObj*** arg2)

0050d530  {
0050d536      class GfxObjDegradeInfo* ecx = *(uint32_t*)arg1;
0050d53b      uint32_t num_degrades = 1;
0050d53b      
0050d540      if (ecx != 0)
0050d540      {
0050d544          num_degrades = ecx->num_degrades;
0050d542          ecx->vtable->Release();
0050d54a          *(uint32_t*)arg1 = nullptr;
0050d540      }
0050d540      
0050d557      if (*(uint32_t*)arg2 != 0)
0050d557      {
0050d559          int32_t esi_1 = 0;
0050d559          
0050d55d          if (num_degrades > 0)
0050d55d          {
0050d57a              do
0050d57a              {
0050d562                  int32_t* ecx_2 = *(uint32_t*)arg2[esi_1];
0050d562                  
0050d567                  if (ecx_2 != 0)
0050d567                  {
0050d56b                      *(uint32_t*)(*(uint32_t*)ecx_2 + 0x14)();
0050d56e                      *(uint32_t*)arg2[esi_1] = 0;
0050d567                  }
0050d567                  
0050d577                  esi_1 += 1;
0050d57a              } while (esi_1 < num_degrades);
0050d55d          }
0050d55d          
0050d57f          operator delete[](*(uint32_t*)arg2);
0050d587          *(uint32_t*)arg2 = nullptr;
0050d557      }
0050d530  }

0050d591                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0050d5a0  class IDClass<_tagDataID,32,0>* __thiscall CPhysicsPart::GetOriginalPaletteID(class CPhysicsPart const* this, class IDClass<_tagDataID,32,0>* __return)

0050d5a0  {
0050d5a6      uint32_t* result = __return;
0050d5aa      *(uint32_t*)result = this->original_palette_id.id;
0050d5ac      return result;
0050d5a0  }

0050d5af                                               90                                                                 .

0050d5b0  void __fastcall CPhysicsPart::RestorePalette(class CPhysicsPart* this)

0050d5b0  {
0050d5bc      int32_t i = 0;
0050d5bc      
0050d5c0      if (*(uint32_t*)this->gfxobj->num_surfaces > 0)
0050d5c0      {
0050d5db          do
0050d5db          {
0050d5cb              CSurface::RestorePalette(this->surfaces[i]);
0050d5d8              i += 1;
0050d5db          } while (i < *(uint32_t*)this->gfxobj->num_surfaces);
0050d5c0      }
0050d5c0      
0050d5dd      class Palette* shiftPal = this->shiftPal;
0050d5dd      
0050d5e5      if (shiftPal != 0)
0050d5e5      {
0050d5e8          Palette::releasePalette(shiftPal);
0050d5f0          this->shiftPal = nullptr;
0050d5e5      }
0050d5b0  }

0050d5fd                                                                                         90 90 90                               ...

0050d600  class BBox const* __fastcall CPhysicsPart::GetBoundingBox(class CPhysicsPart const* this)

0050d600  {
0050d60a      return &*(uint32_t*)this->gfxobj->gfx_bound_box;
0050d600  }

0050d60b                                   90 90 90 90 90                                                             .....

0050d610  void __thiscall CPhysicsPart::SetNoDraw(class CPhysicsPart* this, int32_t arg2)

0050d610  {
0050d616      int32_t draw_state = this->draw_state;
0050d616      
0050d619      if (arg2 != 0)
0050d619      {
0050d61e          this->draw_state = (draw_state | 1);
0050d621          return;
0050d619      }
0050d619      
0050d627      this->draw_state = (draw_state & 0xfffffffe);
0050d610  }

0050d62d                                         90 90 90                                                               ...

0050d630  int32_t __fastcall CPhysicsPart::CopyMaterial(class CPhysicsPart* this)

0050d630  {
0050d638      class CMaterial* material = *(uint32_t*)this->gfxobj->material;
0050d638      
0050d641      if (this->material != material)
0050d649          return 1;
0050d649      
0050d64e      class CMaterial* eax_3;
0050d64e      
0050d64e      if (material == 0)
0050d64e      {
0050d66e          class CMaterial* eax_4 = operator new(0x50);
0050d66e          
0050d678          if (eax_4 == 0)
0050d683              eax_3 = nullptr;
0050d678          else
0050d67c              eax_3 = CMaterial::CMaterial(eax_4);
0050d64e      }
0050d64e      else
0050d64e      {
0050d650          void* eax_2 = operator new(0x50);
0050d650          
0050d65a          if (eax_2 == 0)
0050d683              eax_3 = nullptr;
0050d65a          else
0050d667              eax_3 = CMaterial::CMaterial(eax_2, *(uint32_t*)this->gfxobj->material);
0050d64e      }
0050d64e      
0050d685      this->material = eax_3;
0050d695      int32_t result;
0050d695      result = this->material != 0;
0050d699      return result;
0050d630  }

0050d69a                                                                                90 90 90 90 90 90                            ......

0050d6a0  int32_t __fastcall CPhysicsPart::CopySurfaces(class CPhysicsPart* this)

0050d6a0  {
0050d6a6      class CGfxObj* eax_1 = *(uint32_t*)this->gfxobj;
0050d6a6      
0050d6b1      if (this->surfaces != eax_1->m_rgSurfaces)
0050d6b9          return 1;
0050d6b9      
0050d6c5      void* result = operator new[]((eax_1->num_surfaces << 2));
0050d6cf      this->surfaces = result;
0050d6cf      
0050d6d5      if (result == 0)
0050d6d8          return result;
0050d6d8      
0050d6dc      class CGfxObj* eax_5 = *(uint32_t*)this->gfxobj;
0050d6e2      class CSurface** m_rgSurfaces = eax_5->m_rgSurfaces;
0050d6e6      int32_t i = 0;
0050d6e6      
0050d6ea      if (eax_5->num_surfaces > 0)
0050d6ea      {
0050d71d          do
0050d71d          {
0050d6f9              this->surfaces[i] = CSurface::makeCustomSurface(m_rgSurfaces[i]);
0050d6f9              
0050d710              if (this->surfaces[i] == 0)
0050d72d                  return 0;
0050d72d              
0050d71a              i += 1;
0050d71d          } while (i < *(uint32_t*)this->gfxobj->num_surfaces);
0050d6ea      }
0050d6ea      
0050d727      return 1;
0050d6a0  }

0050d72e                                            90 90                                                                ..

0050d730  void __fastcall CPhysicsPart::RestoreSurfaces(class CPhysicsPart* this)

0050d730  {
0050d733      class CGfxObj** gfxobj = this->gfxobj;
0050d733      
0050d738      if (gfxobj != 0)
0050d738      {
0050d73a          class CGfxObj* eax = *(uint32_t*)gfxobj;
0050d73a          
0050d749          if ((eax != 0 && this->surfaces != eax->m_rgSurfaces))
0050d749          {
0050d74f              int32_t i = 0;
0050d74f              
0050d753              if (eax->num_surfaces > 0)
0050d753              {
0050d772                  do
0050d772                  {
0050d75f                      CSurface::releaseCustomSurface(this->surfaces[i]);
0050d76f                      i += 1;
0050d772                  } while (i < *(uint32_t*)this->gfxobj->num_surfaces);
0050d753              }
0050d753              
0050d77b              operator delete[](this->surfaces);
0050d78b              this->surfaces = *(uint32_t*)this->gfxobj->m_rgSurfaces;
0050d749          }
0050d738      }
0050d730  }

0050d794                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050d7a0  void __thiscall CPhysicsPart::Draw(class CPhysicsPart* this, int32_t arg2)

0050d7a0  {
0050d7a7      if ((this->draw_state & 1) == 0)
0050d7a7      {
0050d7ad          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0050d7ad          
0050d7c9          if ((arg2 != 0 || this->m_current_render_frame_num != RenderDevice::render_device_1->m_nFrameStamp))
0050d7c9          {
0050d7cf              class GfxObjDegradeInfo* degrades = this->degrades;
0050d7d4              uint32_t deg_level = this->deg_level;
0050d7d4              
0050d7dc              if ((degrades == 0 || deg_level >= degrades->num_degrades))
0050d7de                  deg_level = 0;
0050d7de              
0050d7e3              int32_t edi_1 = this->gfxobj[deg_level];
0050d7e3              
0050d7e8              if (edi_1 != 0)
0050d7e8              {
0050d7f7                  RenderDeviceD3D::SetCurrentMaterial(RenderDevice::render_device_1, this->material, 0);
0050d803                  Render::SetSurfaceArray(this->surfaces);
0050d80c                  Render::SetObjectScale(&this->gfxobj_scale);
0050d811                  class CPhysicsObj* physobj = this->physobj;
0050d823                  bool cond:2_1;
0050d823                  
0050d823                  if ((physobj == 0 || physobj->id == 0))
0050d823                  {
0050d82a                      cond:2_1 = CPhysicsPart::creature_mode == 0;
0050d82c                      Render::check_curr_object = 0;
0050d823                  }
0050d823                  
0050d833                  if (((physobj != 0 && physobj->id != 0) || !(cond:2_1)))
0050d835                      Render::check_curr_object = 1;
0050d835                  
0050d83c                  class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0050d844                  int32_t edx_3;
0050d844                  edx_3 = arg2 != 0;
0050d847                  RenderDeviceD3D::s_current_physics_part = this;
0050d858                  bool cond:3_1 = RenderDevice::render_device_2->vtable->DrawMesh(edi_1, &this->draw_pos, edx_3) != 2;
0050d85b                  RenderDeviceD3D::s_current_physics_part = nullptr;
0050d85b                  
0050d865                  if (!(cond:3_1))
0050d865                  {
0050d867                      uint32_t CPhysicsPart::viewcone_check_object_id_1 = CPhysicsPart::viewcone_check_object_id;
0050d867                      
0050d86e                      if (CPhysicsPart::viewcone_check_object_id_1 != 0)
0050d86e                      {
0050d870                          class CPhysicsObj* physobj_1 = this->physobj;
0050d878                          uint32_t id;
0050d878                          
0050d878                          if (physobj_1 == 0)
0050d87f                              id = 0;
0050d878                          else
0050d87a                              id = physobj_1->id;
0050d87a                          
0050d883                          if (CPhysicsPart::viewcone_check_object_id_1 == id)
0050d885                              CPhysicsPart::selected_object_in_view = 1;
0050d86e                      }
0050d865                  }
0050d7e8              }
0050d7c9          }
0050d7a7      }
0050d7a0  }

0050d895                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0050d8a0  int32_t __fastcall CPhysicsPart::Always2D(class CPhysicsPart const* this)

0050d8a0  {
0050d8a0      class GfxObjDegradeInfo* degrades = this->degrades;
0050d8a0      
0050d8ac      if ((degrades == 0 || degrades->num_degrades <= 0))
0050d8c1          return 0;
0050d8c1      
0050d8b9      int32_t result;
0050d8b9      result = degrades->degrades->degrade_mode != 1;
0050d8be      return result;
0050d8a0  }

0050d8c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050d8d0  enum TransitionState __thiscall CPhysicsPart::find_obj_collisions(class CPhysicsPart const* this, class CTransition* arg2)

0050d8d0  {
0050d8d6      class CGfxObj* ecx_1 = *(uint32_t*)this->gfxobj;
0050d8da      int32_t result = 1;
0050d8da      
0050d8e6      if ((ecx_1 != 0 && ecx_1->physics_bsp != 0))
0050d8e6      {
0050d8f8          SPHEREPATH::cache_localspace_sphere(&arg2->sphere_path, &this->pos, this->gfxobj_scale.z);
0050d907          int80_t st0_1;
0050d907          st0_1 = CGfxObj::find_obj_collisions(*(uint32_t*)this->gfxobj, arg2, this->gfxobj_scale.z);
0050d8e6      }
0050d8e6      
0050d90e      return result;
0050d8d0  }

0050d911                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0050d920  class AC1Legacy::Vector3* __thiscall Position::get_offset(class Position const* this, class AC1Legacy::Vector3* __return, class Position const* arg3, class AC1Legacy::Vector3 const* arg4)

0050d920  {
0050d938      float __return_1;
0050d938      LandDefs::get_block_offset(&__return_1, this->objcell_id, arg3->objcell_id);
0050d959      long double x87_r7_4 = ((((((long double)arg3->frame.m_fl2gv[3]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[0]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[6]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.x));
0050d971      long double x87_r6_8 = ((((((long double)arg3->frame.m_fl2gv[4]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[1]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[7]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.y));
0050d98d      long double x87_r5_8 = ((((((long double)arg3->frame.m_fl2gv[5]) * ((long double)arg4->y)) + (((long double)arg3->frame.m_fl2gv[2]) * ((long double)arg4->x))) + (((long double)arg3->frame.m_fl2gv[8]) * ((long double)arg4->z))) + ((long double)arg3->frame.m_fOrigin.z));
0050d9bf      long double x87_r7_6 = (x87_r6_8 - ((long double)this->frame.m_fOrigin.y));
0050d9c6      float var_1c;
0050d9c6      long double x87_r6_14 = (((long double)((float)(((long double)var_1c) + ((long double)((float)x87_r5_8))))) - ((long double)this->frame.m_fOrigin.z));
0050d9cf      __return->x = ((float)((long double)((float)(((long double)((float)(((long double)__return_1) + x87_r7_4))) - ((long double)this->frame.m_fOrigin.x)))));
0050d9d3      __return->y = ((float)x87_r7_6);
0050d9d6      __return->z = ((float)x87_r6_14);
0050d9dc      return __return;
0050d920  }

0050d9df                                                                                               90                                 .

0050d9e0  uint8_t __fastcall CPhysicsPart::CurSettingsAreDefault(class CPhysicsPart* this)

0050d9e0  {
0050d9e3      class CGfxObj** gfxobj = this->gfxobj;
0050d9e8      long double x87_r7;
0050d9e8      
0050d9e8      if (gfxobj == 0)
0050da00          x87_r7 = ((long double)0f);
0050d9e8      else
0050d9e8      {
0050d9ea          gfxobj = *(uint32_t*)gfxobj;
0050d9ea          
0050d9ee          if (gfxobj == 0)
0050da00              x87_r7 = ((long double)0f);
0050d9ee          else
0050d9ee          {
0050d9f0              gfxobj = gfxobj[0xc];
0050d9f0              
0050d9f5              if (gfxobj == 0)
0050da00                  x87_r7 = ((long double)0f);
0050d9f5              else
0050d9f9                  x87_r7 = CMaterial::GetTranslucencySimple(gfxobj);
0050d9ee          }
0050d9e8      }
0050d9e8      
0050da06      long double temp0 = ((long double)this->curTranslucency);
0050da06      (x87_r7 - temp0);
0050da0c      gfxobj = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0050da0e      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0050da0e      
0050da11      if (!(p))
0050da11      {
0050da13          class CGfxObj** gfxobj_1 = this->gfxobj;
0050da18          long double x87_r7_1;
0050da18          
0050da18          if (gfxobj_1 == 0)
0050da30              x87_r7_1 = ((long double)1f);
0050da18          else
0050da18          {
0050da1a              gfxobj_1 = *(uint32_t*)gfxobj_1;
0050da1a              
0050da1e              if (gfxobj_1 == 0)
0050da30                  x87_r7_1 = ((long double)1f);
0050da1e              else
0050da1e              {
0050da20                  gfxobj_1 = gfxobj_1[0xc];
0050da20                  
0050da25                  if (gfxobj_1 == 0)
0050da30                      x87_r7_1 = ((long double)1f);
0050da25                  else
0050da29                      x87_r7_1 = MD_Data_Pause::GetDuration(gfxobj_1);
0050da1e              }
0050da18          }
0050da18          
0050da36          long double temp1_1 = ((long double)this->curDiffuse);
0050da36          (x87_r7_1 - temp1_1);
0050da3c          gfxobj_1 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0050da3e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0050da3e          
0050da41          if (!(p_1))
0050da41          {
0050da43              class CGfxObj** gfxobj_2 = this->gfxobj;
0050da48              long double x87_r7_2;
0050da48              
0050da48              if (gfxobj_2 == 0)
0050da60                  x87_r7_2 = ((long double)0f);
0050da48              else
0050da48              {
0050da4a                  gfxobj_2 = *(uint32_t*)gfxobj_2;
0050da4a                  
0050da4e                  if (gfxobj_2 == 0)
0050da60                      x87_r7_2 = ((long double)0f);
0050da4e                  else
0050da4e                  {
0050da50                      gfxobj_2 = gfxobj_2[0xc];
0050da50                      
0050da55                      if (gfxobj_2 == 0)
0050da60                          x87_r7_2 = ((long double)0f);
0050da55                      else
0050da59                          x87_r7_2 = CMaterial::GetLuminositySimple(gfxobj_2);
0050da4e                  }
0050da48              }
0050da48              
0050da66              long double temp2_1 = ((long double)this->curLuminosity);
0050da66              (x87_r7_2 - temp2_1);
0050da6c              gfxobj_2 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050da6e              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0050da6e              
0050da71              if (!(p_2))
0050da79                  return 1;
0050da41          }
0050da11      }
0050da11      
0050da7d      return 0;
0050d9e0  }

0050da7e                                                                                            90 90                                ..

0050da80  void __fastcall CPhysicsPart::CPhysicsPart(class CPhysicsPart* this)

0050da80  {
0050da8c      this->gfxobj = nullptr;
0050da8f      this->gfxobj_scale.x = 0x3f800000;
0050da96      this->gfxobj_scale.y = 1f;
0050da9d      this->gfxobj_scale.z = 1f;
0050daa4      this->pos.vtable = 0x796910;
0050daab      this->pos.objcell_id = 0;
0050da86      this->pos.frame.qw = 0x3f800000;
0050da86      this->pos.frame.qx = 0f;
0050da86      this->pos.frame.qy = 0f;
0050da86      this->pos.frame.qz = 0f;
0050da86      this->pos.frame.m_fOrigin.x = 0;
0050da86      this->pos.frame.m_fOrigin.y = 0f;
0050da86      this->pos.frame.m_fOrigin.z = 0f;
0050dac6      Frame::cache(&this->pos.frame);
0050dad1      this->draw_pos.vtable = 0x796910;
0050dad8      this->draw_pos.objcell_id = 0;
0050dacb      this->draw_pos.frame.qw = 0x3f800000;
0050dacb      this->draw_pos.frame.qx = 0f;
0050dacb      this->draw_pos.frame.qy = 0f;
0050dacb      this->draw_pos.frame.qz = 0f;
0050dacb      this->draw_pos.frame.m_fOrigin.x = 0;
0050dacb      this->draw_pos.frame.m_fOrigin.y = 0f;
0050dacb      this->draw_pos.frame.m_fOrigin.z = 0f;
0050daf3      Frame::cache(&this->draw_pos.frame);
0050daf8      this->viewer_heading.x = 0;
0050daf8      this->viewer_heading.y = 0f;
0050db10      this->physobj = nullptr;
0050db16      this->deg_level = 0;
0050db19      this->degrades = nullptr;
0050db1c      this->draw_state = 0;
0050db1f      this->material = nullptr;
0050db25      this->surfaces = nullptr;
0050db2b      this->shiftPal = nullptr;
0050db31      this->physobj_index = 0xffffffff;
0050db3b      this->deg_mode = 1;
0050daf8      this->viewer_heading.z = 1f;
0050db45      this->CYpt = 0x7f7fffff;
0050db51      this->m_current_render_frame_num = 0;
0050db57      int32_t var_c = 0;
0050db5b      int32_t var_8 = 0;
0050db60      this->original_palette_id.id = INVALID_DID.id;
0050da80  }

0050db6d                                         90 90 90                                                               ...

0050db70  uint8_t __thiscall CPhysicsPart::MorphToExistingObject(class CPhysicsPart* this, class CPhysicsPart const* arg2)

0050db70  {
0050db78      void* eax = operator new[](4);
0050db81      this->gfxobj = eax;
0050db89      *(uint32_t*)eax = *(uint32_t*)arg2->gfxobj;
0050db8e      *(uint32_t*)this->gfxobj->vtable->AddRef();
0050db9d      this->gfxobj_scale.x = arg2->gfxobj_scale.x;
0050db9d      this->gfxobj_scale.y = arg2->gfxobj_scale.y;
0050db9d      this->gfxobj_scale.z = arg2->gfxobj_scale.z;
0050dbb4      this->pos.objcell_id = arg2->pos.objcell_id;
0050dbbb      Frame::operator=(&this->pos.frame, &arg2->pos.frame);
0050dbd0      this->draw_pos.objcell_id = arg2->draw_pos.objcell_id;
0050dbd3      Frame::operator=(&this->draw_pos.frame, &arg2->draw_pos.frame);
0050dbde      this->original_palette_id.id = arg2->original_palette_id.id;
0050dbea      class CGfxObj** gfxobj = this->gfxobj;
0050dbed      this->curDiffuse = arg2->curDiffuse;
0050dbf9      this->curLuminosity = arg2->curLuminosity;
0050dc02      class CGfxObj* eax_6 = *(uint32_t*)gfxobj;
0050dc0f      uint32_t num_surfaces = eax_6->num_surfaces;
0050dc0f      
0050dc12      if (arg2->surfaces == *(uint32_t*)arg2->gfxobj->m_rgSurfaces)
0050dc12      {
0050dc18          this->surfaces = eax_6->m_rgSurfaces;
0050dc20          eax_6 = 1;
0050dc23          return 1;
0050dc12      }
0050dc12      
0050dc36      int32_t ebx = 0;
0050dc3a      this->surfaces = operator new[]((num_surfaces << 2));
0050dc3a      
0050dc40      if (num_surfaces > 0)
0050dc40      {
0050dc73          do
0050dc73          {
0050dc59              this->surfaces[ebx] = arg2->surfaces[ebx];
0050dc62              this->surfaces[ebx]->vtable->AddRef();
0050dc70              ebx += 1;
0050dc73          } while (ebx < num_surfaces);
0050dc40      }
0050dc40      
0050dc78      void* eax_8;
0050dc78      eax_8 = 1;
0050dc7b      return 1;
0050db70  }

0050dc44              8d a4 24 00 00 00 00 eb 03 8d 49 00                                                      ..$.......I.
0050dc7e                                                                                            90 90                                ..

0050dc80  void __fastcall CPhysicsPart::DetermineBasePal(class CPhysicsPart* this)

0050dc80  {
0050dc80      class CPhysicsPart* __return = this;
0050dc8d      int32_t i = 0;
0050dc8d      
0050dc91      if (*(uint32_t*)this->gfxobj->num_surfaces > 0)
0050dc91      {
0050dcb6          do
0050dcb6          {
0050dca9              if (CSurface::GetOriginalPaletteID(this->surfaces[i], &__return)->id != 0)
0050dca9              {
0050dcdd                  this->original_palette_id.id = CSurface::GetOriginalPaletteID(this->surfaces[i], &__return)->id;
0050dce5                  return;
0050dca9              }
0050dca9              
0050dcb3              i += 1;
0050dcb6          } while (i < *(uint32_t*)this->gfxobj->num_surfaces);
0050dc91      }
0050dc91      
0050dcbe      this->original_palette_id.id = INVALID_DID.id;
0050dc80  }

0050dce6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0050dcf0  int32_t CPhysicsPart::LoadGfxObjArray(class IDClass<_tagDataID,32,0> arg1, class GfxObjDegradeInfo** arg2, class CGfxObj*** arg3)

0050dcf0  {
0050dcff      int32_t result = 1;
0050dd0d      void var_8;
0050dd0d      class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 6));
0050dd0d      
0050dd17      if (eax_1 == 0)
0050de2f          return 0;
0050de2f      
0050dd21      class IDClass<_tagDataID,32,0> esi = *(int32_t*)((char*)eax_1 + 0xb0);
0050dd1d      eax_1->vtable->Release();
0050dd39      class DBObj* eax_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, esi, 0x1a));
0050dd47      *(uint32_t*)arg2 = eax_3;
0050dd49      void** esi_1;
0050dd49      
0050dd49      if (eax_3 == 0)
0050dd49      {
0050ddd8          void* eax_13 = operator new[](4);
0050dddd          esi_1 = arg3;
0050dde6          *(uint32_t*)esi_1 = eax_13;
0050dded          *(uint32_t*)eax_13 = 0;
0050de03          **(uint32_t**)esi_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 6));
0050dd49      }
0050dd49      else
0050dd49      {
0050dd5b          esi_1 = arg3;
0050dd5f          *(uint32_t*)esi_1 = operator new[]((*(int32_t*)((char*)eax_3 + 0x38) << 2));
0050dd69          int32_t i = 0;
0050dd69          
0050dd6d          if (*(uint32_t*)arg2->num_degrades > 0)
0050dd6d          {
0050dd81              do
0050dd81              {
0050dd72                  *(uint32_t*)(*(uint32_t*)esi_1 + (i << 2)) = 0;
0050dd7e                  i += 1;
0050dd81              } while (i < *(uint32_t*)arg2->num_degrades);
0050dd6d          }
0050dd6d          
0050dd88          int32_t i_1 = 0;
0050dd88          
0050dd8c          if (*(uint32_t*)arg2->num_degrades > 0)
0050dd8c          {
0050dd8f              int32_t ebp_1 = 0;
0050dd8f              
0050ddd1              do
0050ddd1              {
0050dd96                  class IDClass<_tagDataID,32,0> eax_9 = *(uint32_t*)(*(uint32_t*)arg2->degrades + ebp_1);
0050dd96                  
0050dd9f                  if (eax_9 != INVALID_DID.id)
0050ddc3                      *(uint32_t*)(*(uint32_t*)esi_1 + (i_1 << 2)) = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, eax_9, 6));
0050dd9f                  else
0050dda3                      *(uint32_t*)(*(uint32_t*)esi_1 + (i_1 << 2)) = 0;
0050dda3                  
0050ddcb                  i_1 += 1;
0050ddcc                  ebp_1 += 0x14;
0050ddd1              } while (i_1 < *(uint32_t*)arg2->num_degrades);
0050dd8c          }
0050dd49      }
0050dd49      
0050de0a      if (**(uint32_t**)esi_1 == 0)
0050de0a      {
0050de0e          result = 0;
0050de16          CPhysicsPart::ReleaseGfxObjArray(arg2, esi_1);
0050de0a      }
0050de0a      
0050de28      return result;
0050dcf0  }


0050de30  int32_t __thiscall CPhysicsPart::SetTextureMap(class CPhysicsPart* this, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3)

0050de30  {
0050de36      class IDClass<_tagDataID,32,0> ebp = arg3;
0050de36      
0050de3f      if (ebp != INVALID_DID.id)
0050de3f      {
0050de4f          int32_t eax_1;
0050de4f          
0050de4f          if (this->surfaces == *(uint32_t*)this->gfxobj->m_rgSurfaces)
0050de53              eax_1 = CPhysicsPart::CopySurfaces(this);
0050de53          
0050de5a          if ((this->surfaces != *(uint32_t*)this->gfxobj->m_rgSurfaces || eax_1 != 0))
0050de5a          {
0050de6d              int32_t i = 0;
0050de6d              
0050de71              if (*(uint32_t*)this->gfxobj->num_surfaces > 0)
0050de71              {
0050deb7                  do
0050deb7                  {
0050de95                      if ((*(uint32_t*)CSurface::GetOriginalTextureMapID(this->surfaces[i], &arg3) == arg2 && CSurface::UseTextureMap(this->surfaces[i], ebp, 0) == 0))
0050decb                          return 0;
0050decb                      
0050deb4                      i += 1;
0050deb7                  } while (i < *(uint32_t*)this->gfxobj->num_surfaces);
0050de71              }
0050de71              
0050dec2              return 1;
0050de5a          }
0050de3f      }
0050de3f      
0050de60      return 0;
0050de30  }

0050de79                                                                             8d a4 24 00 00 00 00                           ..$....
0050dece                                            90 90                                                                ..

0050ded0  int32_t __thiscall CPhysicsPart::UsePalette(class CPhysicsPart* this, class Palette* arg2)

0050ded0  {
0050deda      if (arg2 != 0)
0050deda      {
0050deea          int32_t eax_2;
0050deea          
0050deea          if (this->surfaces == *(uint32_t*)this->gfxobj->m_rgSurfaces)
0050deee              eax_2 = CPhysicsPart::CopySurfaces(this);
0050deee          
0050def5          if ((this->surfaces != *(uint32_t*)this->gfxobj->m_rgSurfaces || eax_2 != 0))
0050def5          {
0050df07              int32_t i = 0;
0050df07              
0050df0b              if (*(uint32_t*)this->gfxobj->num_surfaces > 0)
0050df0b              {
0050df2a                  do
0050df2a                  {
0050df1a                      CSurface::UsePalette(this->surfaces[i], arg2);
0050df27                      i += 1;
0050df2a                  } while (i < *(uint32_t*)this->gfxobj->num_surfaces);
0050df0b              }
0050df0b              
0050df2c              class Palette* shiftPal = this->shiftPal;
0050df2c              
0050df35              if (shiftPal != 0)
0050df35              {
0050df38                  Palette::releasePalette(shiftPal);
0050df40                  this->shiftPal = nullptr;
0050df35              }
0050df35              
0050df53              this->shiftPal = Palette::copyRef(arg2);
0050df60              return 1;
0050def5          }
0050deda      }
0050deda      
0050defb      return 0;
0050ded0  }

0050df63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0050df70  void __fastcall CPhysicsPart::RestoreMaterial(class CPhysicsPart* this)

0050df70  {
0050df73      class CGfxObj** gfxobj = this->gfxobj;
0050df73      
0050df78      if (gfxobj != 0)
0050df78      {
0050df7a          class CGfxObj* eax = *(uint32_t*)gfxobj;
0050df7a          
0050df7e          if (eax != 0)
0050df7e          {
0050df80              class CMaterial* material = this->material;
0050df80              
0050df89              if (material != eax->material)
0050df8b                  ReferenceCountTemplate<1048576,0>::Release(material);
0050df8b              
0050df90              this->material = nullptr;
0050df7e          }
0050df78      }
0050df70  }

0050df9c                                                                                      90 90 90 90                              ....

0050dfa0  void __fastcall CPhysicsPart::calc_draw_frame(class CPhysicsPart* this)

0050dfa0  {
0050dfb0      this->draw_pos.objcell_id = this->pos.objcell_id;
0050dfb3      Frame::operator=(&this->draw_pos.frame, &this->pos.frame);
0050dfb8      int32_t deg_mode = this->deg_mode;
0050dfb8      
0050dfc6      if ((deg_mode != 1 && (deg_mode - 2) <= 3))
0050dfc6          switch (deg_mode)
0050dfc6          {
0050dfd9              case 2:
0050dfd9              {
0050dfd9                  Frame::set_vector_heading(&this->draw_pos.frame, &this->viewer_heading);
0050dfd9                  break;
0050dfd9              }
0050dfec              case 3:
0050dfec              {
0050dfec                  Frame::rotate_around_axis_to_vector(&this->draw_pos.frame, 0, &this->viewer_heading);
0050dfec                  break;
0050dfec              }
0050dfff              case 4:
0050dfff              {
0050dfff                  Frame::rotate_around_axis_to_vector(&this->draw_pos.frame, 1, &this->viewer_heading);
0050dfff                  break;
0050dfff              }
0050e012              case 5:
0050e012              {
0050e012                  Frame::rotate_around_axis_to_vector(&this->draw_pos.frame, 2, &this->viewer_heading);
0050e012                  break;
0050e012              }
0050dfc6          }
0050dfa0  }

0050e019                                                                             8d 49 00                                       .I.
0050e01c  uint32_t jump_table_50e01c[0x4] = 
0050e01c  {
0050e01c      [0x0] =  0x0050dfcf
0050e020      [0x1] =  0x0050dfe0
0050e024      [0x2] =  0x0050dff3
0050e028      [0x3] =  0x0050e006
0050e02c  }

0050e02c                                      90 90 90 90                                                              ....

0050e030  void __fastcall CPhysicsPart::UpdateViewerDistance(class CPhysicsPart* this)

0050e030  {
0050e03c      class CGfxObj* eax_1 = *(uint32_t*)this->gfxobj;
0050e04b      long double x87_r6_1 = (((long double)this->gfxobj_scale.y) * ((long double)eax_1->sort_center.y));
0050e059      float var_10 = ((float)(((long double)this->gfxobj_scale.z) * ((long double)eax_1->sort_center.z)));
0050e061      float var_4 = var_10;
0050e06b      float var_c = ((float)(((long double)this->gfxobj_scale.x) * ((long double)eax_1->sort_center.x)));
0050e075      float var_8 = ((float)x87_r6_1);
0050e079      float __return;
0050e079      Position::get_offset(&Render::viewer_pos, &__return, &this->pos, &var_c);
0050e09c      float var_14;
0050e09c      float var_1c = ((float)sqrtl((((((long double)var_10) * ((long double)var_10)) + (((long double)var_14) * ((long double)var_14))) + (((long double)__return) * ((long double)__return)))));
0050e0a0      long double x87_r7_8 = ((long double)var_1c);
0050e0a4      long double temp1 = ((long double)0.000199999995f);
0050e0a4      (x87_r7_8 - temp1);
0050e0ae      this->CYpt = var_1c;
0050e0ae      
0050e0b5      if ((*(uint8_t*)((char*)((((x87_r7_8 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0050e0b5      {
0050e104          __return = 0f;
0050e110          this->viewer_heading.x = __return;
0050e110          this->viewer_heading.y = 0;
0050e110          this->viewer_heading.z = 0x3f800000;
0050e0b5      }
0050e0b5      else
0050e0b5      {
0050e0c0          long double x87_r7_10 = (((long double)1f) / ((long double)var_1c));
0050e0d6          float var_4_1 = ((float)(((long double)var_10) * x87_r7_10));
0050e0e4          __return = ((float)(((long double)__return) * x87_r7_10));
0050e0bd          this->viewer_heading.x = __return;
0050e0bd          this->viewer_heading.y = ((float)(((long double)var_14) * x87_r7_10));
0050e0bd          this->viewer_heading.z = var_4_1;
0050e0b5      }
0050e0b5      
0050e133      class GfxObjDegradeInfo* degrades = this->degrades;
0050e139      uint32_t id;
0050e139      
0050e139      if (degrades != 0)
0050e139      {
0050e13b          class CPhysicsObj* physobj = this->physobj;
0050e13b          
0050e143          if (physobj == 0)
0050e14a              id = 0;
0050e143          else
0050e145              id = physobj->id;
0050e139      }
0050e139      
0050e152      uint32_t* edi;
0050e152      
0050e152      if ((degrades == 0 || id == CPhysicsPart::player_iid))
0050e152      {
0050e16e          edi = &this->deg_level;
0050e154          ADJ(edi)->deg_level = 0;
0050e177          this->deg_mode = 1;
0050e152      }
0050e152      else
0050e152      {
0050e15f          edi = &this->deg_level;
0050e163          class GfxObjDegradeInfo* degrades_1 = degrades;
0050e167          GfxObjDegradeInfo::get_degrade(degrades, ((float)(((long double)var_1c) / ((long double)this->gfxobj_scale.z))), edi, &this->deg_mode);
0050e152      }
0050e152      
0050e188      if (this->gfxobj[ADJ(edi)->deg_level] != 0)
0050e18c          CPhysicsPart::calc_draw_frame(this);
0050e030  }

0050e196                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0050e1a0  void __thiscall CPhysicsPart::UpdateViewerDistance(class CPhysicsPart* this, float arg2, class AC1Legacy::Vector3 const* arg3)

0050e1a0  {
0050e1a9      float* this_1 = this;
0050e1ab      *(uint32_t*)this_1 = arg2;
0050e1af      this_1[1] = arg3->x;
0050e1af      this_1[2] = arg3->y;
0050e1af      this_1[3] = arg3->z;
0050e1c0      class GfxObjDegradeInfo* ecx_1 = this_1[4];
0050e1c6      int32_t eax_3;
0050e1c6      
0050e1c6      if (ecx_1 != 0)
0050e1c6      {
0050e1c8          void* eax_2 = this_1[0x38];
0050e1c8          
0050e1d0          if (eax_2 == 0)
0050e1d7              eax_3 = 0;
0050e1d0          else
0050e1d2              eax_3 = *(uint32_t*)((char*)eax_2 + 8);
0050e1c6      }
0050e1c6      
0050e1df      void* edi;
0050e1df      
0050e1df      if ((ecx_1 == 0 || eax_3 == CPhysicsPart::player_iid))
0050e1df      {
0050e1fb          edi = &this_1[5];
0050e1fe          *(uint32_t*)edi = 0;
0050e204          this_1[6] = 1;
0050e1df      }
0050e1df      else
0050e1df      {
0050e1ec          edi = &this_1[5];
0050e1f0          class GfxObjDegradeInfo* var_14_1 = ecx_1;
0050e1f4          GfxObjDegradeInfo::get_degrade(ecx_1, ((float)(((long double)arg2) / ((long double)this_1[0xb]))), edi, &this_1[6]);
0050e1df      }
0050e1df      
0050e214      if (*(uint32_t*)(this_1[8] + (*(uint32_t*)edi << 2)) != 0)
0050e218          CPhysicsPart::calc_draw_frame(this_1);
0050e1a0  }

0050e222        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050e230  class CPhysicsPart* CPhysicsPart::makePhysicsPart(class CPhysicsPart const* arg1)

0050e230  {
0050e235      void* eax = operator new(0xe8);
0050e235      
0050e23f      if (eax == 0)
0050e261          return 0;
0050e261      
0050e244      class CPhysicsPart* result = CPhysicsPart::CPhysicsPart(eax);
0050e244      
0050e24d      if (result != 0)
0050e256          CPhysicsPart::MorphToExistingObject(result, arg1);
0050e256      
0050e25e      return result;
0050e230  }

0050e262        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050e270  void __fastcall CPhysicsPart::~CPhysicsPart(class CPhysicsPart* this)

0050e270  {
0050e273      class Palette* shiftPal = this->shiftPal;
0050e273      
0050e27c      if (shiftPal != 0)
0050e27c      {
0050e27e          shiftPal->vtable->Release();
0050e283          this->shiftPal = nullptr;
0050e27c      }
0050e27c      
0050e28d      class CGfxObj** gfxobj = this->gfxobj;
0050e28d      
0050e295      if (gfxobj != 0)
0050e295      {
0050e297          class CGfxObj* eax_2 = *(uint32_t*)gfxobj;
0050e297          
0050e29b          if (eax_2 != 0)
0050e29b          {
0050e29d              class CMaterial* material = this->material;
0050e29d              
0050e2a6              if (material != eax_2->material)
0050e2a8                  ReferenceCountTemplate<1048576,0>::Release(material);
0050e2a8              
0050e2ad              this->material = nullptr;
0050e29b          }
0050e295      }
0050e295      
0050e2b9      CPhysicsPart::RestoreSurfaces(this);
0050e2c3      CPhysicsPart::ReleaseGfxObjArray(&this->degrades, &this->gfxobj);
0050e2d1      this->draw_pos.vtable = 0x79285c;
0050e2d4      this->pos.vtable = 0x79285c;
0050e270  }

0050e2d9                                                                             90 90 90 90 90 90 90                           .......

0050e2e0  void __thiscall CPhysicsPart::SetGfxObjArray(class CPhysicsPart* this, class GfxObjDegradeInfo* arg2, class CGfxObj** arg3)

0050e2e0  {
0050e2e5      CPhysicsPart::RestoreSurfaces(this);
0050e2f2      CPhysicsPart::ReleaseGfxObjArray(&this->degrades, &this->gfxobj);
0050e2ed      this->degrades = arg2;
0050e2ea      this->gfxobj = arg3;
0050e30d      this->surfaces = *(uint32_t*)arg3->m_rgSurfaces;
0050e313      CPhysicsPart::DetermineBasePal(this);
0050e318      class CGfxObj** gfxobj = this->gfxobj;
0050e31c      long double x87_r7;
0050e31c      
0050e31c      if (gfxobj == 0)
0050e334          x87_r7 = ((long double)0f);
0050e31c      else
0050e31c      {
0050e31e          class CGfxObj* eax_2 = *(uint32_t*)gfxobj;
0050e31e          
0050e322          if (eax_2 == 0)
0050e334              x87_r7 = ((long double)0f);
0050e322          else
0050e322          {
0050e324              class CMaterial* material = eax_2->material;
0050e324              
0050e329              if (material == 0)
0050e334                  x87_r7 = ((long double)0f);
0050e329              else
0050e32d                  x87_r7 = CMaterial::GetTranslucencySimple(material);
0050e322          }
0050e31c      }
0050e31c      
0050e33a      class CGfxObj** gfxobj_1 = this->gfxobj;
0050e33c      this->curTranslucency = ((float)x87_r7);
0050e344      long double x87_r7_1;
0050e344      
0050e344      if (gfxobj_1 == 0)
0050e35c          x87_r7_1 = ((long double)1f);
0050e344      else
0050e344      {
0050e346          class CGfxObj* eax_3 = *(uint32_t*)gfxobj_1;
0050e346          
0050e34a          if (eax_3 == 0)
0050e35c              x87_r7_1 = ((long double)1f);
0050e34a          else
0050e34a          {
0050e34c              class CMaterial* material_1 = eax_3->material;
0050e34c              
0050e351              if (material_1 == 0)
0050e35c                  x87_r7_1 = ((long double)1f);
0050e351              else
0050e355                  x87_r7_1 = MD_Data_Pause::GetDuration(material_1);
0050e34a          }
0050e344      }
0050e344      
0050e362      class CGfxObj** gfxobj_2 = this->gfxobj;
0050e364      this->curDiffuse = ((float)x87_r7_1);
0050e36c      long double x87_r7_2;
0050e36c      
0050e36c      if (gfxobj_2 == 0)
0050e382          x87_r7_2 = ((long double)0f);
0050e36c      else
0050e36c      {
0050e36e          class CGfxObj* edi_1 = *(uint32_t*)gfxobj_2;
0050e36e          
0050e372          if (edi_1 == 0)
0050e382              x87_r7_2 = ((long double)0f);
0050e372          else
0050e372          {
0050e374              class CMaterial* material_2 = edi_1->material;
0050e374              
0050e379              if (material_2 == 0)
0050e382                  x87_r7_2 = ((long double)0f);
0050e379              else
0050e37b                  x87_r7_2 = CMaterial::GetLuminositySimple(material_2);
0050e372          }
0050e36c      }
0050e36c      
0050e388      class Palette* shiftPal = this->shiftPal;
0050e38e      this->curLuminosity = ((float)x87_r7_2);
0050e38e      
0050e396      if (shiftPal != 0)
0050e39b          CPhysicsPart::UsePalette(this, shiftPal);
0050e2e0  }

0050e3a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0050e3b0  int32_t __fastcall CPhysicsPart::InitObjDescChanges(class CPhysicsPart* this)

0050e3b0  {
0050e3b3      class Palette* shiftPal = this->shiftPal;
0050e3b3      
0050e3bc      if (shiftPal != 0)
0050e3bf          CPhysicsPart::UsePalette(this, shiftPal);
0050e3bf      
0050e3cc      int32_t i = 0;
0050e3cc      
0050e3d0      if (*(uint32_t*)this->gfxobj->num_surfaces > 0)
0050e3d0      {
0050e3ed          do
0050e3ed          {
0050e3dd              CSurface::InitEnd(this->surfaces[i], SurfaceInitObjDescChange);
0050e3ea              i += 1;
0050e3ed          } while (i < *(uint32_t*)this->gfxobj->num_surfaces);
0050e3d0      }
0050e3d0      
0050e3f6      return 1;
0050e3b0  }

0050e3f7                                                                       90 90 90 90 90 90 90 90 90                         .........

0050e400  void __thiscall CPhysicsPart::SetLighting(class CPhysicsPart* this, float arg2, float arg3)

0050e400  {
0050e400      long double x87_r7 = ((long double)arg2);
0050e407      long double temp1 = ((long double)this->curLuminosity);
0050e407      (x87_r7 - temp1);
0050e40d      int32_t eax;
0050e40d      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0050e40f      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0050e412      bool p_1;
0050e412      
0050e412      if (!(p))
0050e412      {
0050e414          long double x87_r7_1 = ((long double)arg3);
0050e418          long double temp2_1 = ((long double)this->curDiffuse);
0050e418          (x87_r7_1 - temp2_1);
0050e41e          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050e420          p_1 = /* p_1 = unimplemented  {test ah, 0x44} */;
0050e412      }
0050e412      
0050e423      if ((p || p_1))
0050e423      {
0050e42d          this->curDiffuse = arg3;
0050e435          this->curLuminosity = arg2;
0050e435          
0050e442          if (CPhysicsPart::CurSettingsAreDefault(this) == 0)
0050e442          {
0050e478              if (CPhysicsPart::CopyMaterial(this) != 0)
0050e478              {
0050e485                  CMaterial::SetLuminositySimple(this->material, arg2);
0050e495                  CMaterial::SetDiffuseSimple(this->material, arg3);
0050e478              }
0050e442          }
0050e442          else
0050e442          {
0050e444              void** gfxobj = this->gfxobj;
0050e444              
0050e449              if (gfxobj != 0)
0050e449              {
0050e44b                  void* eax_3 = *(uint32_t*)gfxobj;
0050e44b                  
0050e44f                  if (eax_3 != 0)
0050e44f                  {
0050e451                      class CMaterial* material = this->material;
0050e451                      
0050e45a                      if (material != *(uint32_t*)((char*)eax_3 + 0x30))
0050e45c                          ReferenceCountTemplate<1048576,0>::Release(material);
0050e45c                      
0050e461                      this->material = nullptr;
0050e44f                  }
0050e449              }
0050e442          }
0050e423      }
0050e400  }

0050e49e                                                                                            90 90                                ..

0050e4a0  void __fastcall CPhysicsPart::RestoreLighting(class CPhysicsPart* this)

0050e4a0  {
0050e4a6      class CGfxObj** gfxobj = this->gfxobj;
0050e4ab      long double x87_r7;
0050e4ab      
0050e4ab      if (gfxobj == 0)
0050e4c3          x87_r7 = ((long double)0f);
0050e4ab      else
0050e4ab      {
0050e4ad          class CGfxObj* eax = *(uint32_t*)gfxobj;
0050e4ad          
0050e4b1          if (eax == 0)
0050e4c3              x87_r7 = ((long double)0f);
0050e4b1          else
0050e4b1          {
0050e4b3              class CMaterial* material = eax->material;
0050e4b3              
0050e4b8              if (material == 0)
0050e4c3                  x87_r7 = ((long double)0f);
0050e4b8              else
0050e4bc                  x87_r7 = CMaterial::GetTranslucencySimple(material);
0050e4b1          }
0050e4ab      }
0050e4ab      
0050e4c9      (x87_r7 - ((long double)this->curTranslucency));
0050e4d1      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0050e4d4      class CGfxObj** gfxobj_1 = this->gfxobj;
0050e4d4      
0050e4d7      if (!(p))
0050e4d7      {
0050e540          if (gfxobj_1 != 0)
0050e540          {
0050e542              class CGfxObj* eax_4 = *(uint32_t*)gfxobj_1;
0050e542              
0050e546              if (eax_4 != 0)
0050e546              {
0050e548                  class CMaterial* material_3 = this->material;
0050e548                  
0050e551                  if (material_3 != eax_4->material)
0050e553                      ReferenceCountTemplate<1048576,0>::Release(material_3);
0050e553                  
0050e558                  this->material = nullptr;
0050e546              }
0050e540          }
0050e540          
0050e566          return;
0050e4d7      }
0050e4d7      
0050e4db      float var_4;
0050e4db      
0050e4db      if (gfxobj_1 == 0)
0050e4f7          var_4 = 0f;
0050e4db      else
0050e4db      {
0050e4dd          class CGfxObj* eax_1 = *(uint32_t*)gfxobj_1;
0050e4dd          
0050e4e1          if (eax_1 == 0)
0050e4f7              var_4 = 0f;
0050e4e1          else
0050e4e1          {
0050e4e3              class CMaterial* material_1 = eax_1->material;
0050e4e3              
0050e4e8              if (material_1 == 0)
0050e4f7                  var_4 = 0f;
0050e4e8              else
0050e4f1                  var_4 = ((float)CMaterial::GetLuminositySimple(material_1));
0050e4e1          }
0050e4db      }
0050e4db      
0050e4ff      class CGfxObj** gfxobj_2 = this->gfxobj;
0050e504      float var_8;
0050e504      
0050e504      if (gfxobj_2 == 0)
0050e520          var_8 = 1f;
0050e504      else
0050e504      {
0050e506          class CGfxObj* eax_2 = *(uint32_t*)gfxobj_2;
0050e506          
0050e50a          if (eax_2 == 0)
0050e520              var_8 = 1f;
0050e50a          else
0050e50a          {
0050e50c              class CMaterial* material_2 = eax_2->material;
0050e50c              
0050e511              if (material_2 == 0)
0050e520                  var_8 = 1f;
0050e511              else
0050e51a                  var_8 = ((float)MD_Data_Pause::GetDuration(material_2));
0050e50a          }
0050e504      }
0050e504      
0050e534      CPhysicsPart::SetLighting(this, var_4, var_8);
0050e4a0  }

0050e567                       90 90 90 90 90 90 90 90 90                                                         .........

0050e570  void __thiscall CPhysicsPart::SetDiffusion(class CPhysicsPart* this, float arg2)

0050e570  {
0050e570      long double x87_r7 = ((long double)arg2);
0050e577      long double temp1 = ((long double)this->curDiffuse);
0050e577      (x87_r7 - temp1);
0050e57d      int32_t eax;
0050e57d      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0050e57f      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0050e57f      
0050e582      if (p)
0050e582      {
0050e588          this->curDiffuse = arg2;
0050e588          
0050e595          if (CPhysicsPart::CurSettingsAreDefault(this) == 0)
0050e595          {
0050e5cb              if (CPhysicsPart::CopyMaterial(this) != 0)
0050e5d8                  CMaterial::SetDiffuseSimple(this->material, arg2);
0050e595          }
0050e595          else
0050e595          {
0050e597              class CGfxObj** gfxobj = this->gfxobj;
0050e597              
0050e59c              if (gfxobj != 0)
0050e59c              {
0050e59e                  class CGfxObj* eax_3 = *(uint32_t*)gfxobj;
0050e59e                  
0050e5a2                  if (eax_3 != 0)
0050e5a2                  {
0050e5a4                      class CMaterial* material = this->material;
0050e5a4                      
0050e5ad                      if (material != eax_3->material)
0050e5af                          ReferenceCountTemplate<1048576,0>::Release(material);
0050e5af                      
0050e5b4                      this->material = nullptr;
0050e5a2                  }
0050e59c              }
0050e595          }
0050e582      }
0050e570  }

0050e5e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0050e5f0  void __thiscall CPhysicsPart::SetLuminosity(class CPhysicsPart* this, float arg2)

0050e5f0  {
0050e5f0      long double x87_r7 = ((long double)arg2);
0050e5f7      long double temp1 = ((long double)this->curLuminosity);
0050e5f7      (x87_r7 - temp1);
0050e5fd      int32_t eax;
0050e5fd      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0050e5ff      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0050e5ff      
0050e602      if (p)
0050e602      {
0050e608          this->curLuminosity = arg2;
0050e608          
0050e615          if (CPhysicsPart::CurSettingsAreDefault(this) == 0)
0050e615          {
0050e64b              if (CPhysicsPart::CopyMaterial(this) != 0)
0050e658                  CMaterial::SetLuminositySimple(this->material, arg2);
0050e615          }
0050e615          else
0050e615          {
0050e617              class CGfxObj** gfxobj = this->gfxobj;
0050e617              
0050e61c              if (gfxobj != 0)
0050e61c              {
0050e61e                  class CGfxObj* eax_3 = *(uint32_t*)gfxobj;
0050e61e                  
0050e622                  if (eax_3 != 0)
0050e622                  {
0050e624                      class CMaterial* material = this->material;
0050e624                      
0050e62d                      if (material != eax_3->material)
0050e62f                          ReferenceCountTemplate<1048576,0>::Release(material);
0050e62f                      
0050e634                      this->material = nullptr;
0050e622                  }
0050e61c              }
0050e615          }
0050e602      }
0050e5f0  }

0050e661     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0050e670  void __thiscall CPhysicsPart::SetTranslucency(class CPhysicsPart* this, float arg2)

0050e670  {
0050e673      class CPhysicsObj* physobj = this->physobj;
0050e673      
0050e687      if ((physobj == 0 || (physobj->state & 0x100000) == 0))
0050e687      {
0050e68d          (((long double)arg2) - ((long double)1f));
0050e695          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0050e698          int32_t draw_state = this->draw_state;
0050e698          
0050e69b          if (!(p_1))
0050e69b          {
0050e6a0              this->draw_state = (draw_state | 1);
0050e6a4              return;
0050e69b          }
0050e69b          
0050e6a7          long double x87_r7_2 = ((long double)this->curTranslucency);
0050e6b0          long double temp2_1 = ((long double)arg2);
0050e6b0          (x87_r7_2 - temp2_1);
0050e6b4          this->draw_state = (draw_state & 0xfffffffe);
0050e6b7          int32_t eax_1;
0050e6b7          eax_1 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050e6b9          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0050e6b9          
0050e6bc          if (p_2)
0050e6bc          {
0050e6c4              this->curTranslucency = arg2;
0050e6c4              
0050e6d3              if (CPhysicsPart::CurSettingsAreDefault(this) != 0)
0050e6d3              {
0050e6d5                  CPhysicsPart::RestoreMaterial(this);
0050e6db                  return;
0050e6d3              }
0050e6d3              
0050e6e5              if (CPhysicsPart::CopyMaterial(this) != 0)
0050e6f2                  CMaterial::SetTranslucencySimple(this->material, arg2);
0050e6bc          }
0050e687      }
0050e670  }

0050e6fb                                                                                   90 90 90 90 90                             .....

0050e700  int32_t __fastcall CPhysicsPart::SetPart(class CPhysicsPart* this, class IDClass<_tagDataID,32,0> arg2)

0050e700  {
0050e700      class CPhysicsPart* this_1 = this;
0050e701      class IDClass<_tagDataID,32,0> eax = arg2;
0050e701      
0050e70e      if (eax != INVALID_DID.id)
0050e70e      {
0050e712          arg2 = 0;
0050e716          this_1 = nullptr;
0050e716          
0050e72f          if (CPhysicsPart::LoadGfxObjArray(eax, &this_1, &arg2) != 0)
0050e72f          {
0050e73d              CPhysicsPart::SetGfxObjArray(this, this_1, arg2);
0050e749              return 1;
0050e72f          }
0050e70e      }
0050e70e      
0050e750      return 0;
0050e700  }

0050e753                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0050e760  class CPhysicsPart* CPhysicsPart::makePhysicsPart(class IDClass<_tagDataID,32,0> arg1)

0050e760  {
0050e766      void* eax = operator new(0xe8);
0050e766      
0050e770      if (eax != 0)
0050e770      {
0050e774          class CPhysicsPart* result;
0050e774          class IDClass<_tagDataID,32,0> edx_1;
0050e774          result = CPhysicsPart::CPhysicsPart(eax);
0050e774          
0050e77d          if (result != 0)
0050e77d          {
0050e787              class IDClass<_tagDataID,32,0> var_8 = arg1;
0050e787              
0050e791              if (CPhysicsPart::SetPart(result, edx_1) != 0)
0050e7a8                  return result;
0050e7a8              
0050e795              CPhysicsPart::~CPhysicsPart(result);
0050e79b              operator delete(result);
0050e7a3              return nullptr;
0050e77d          }
0050e770      }
0050e770      
0050e782      return 0;
0050e760  }

0050e7a9                             90 90 90 90 90 90 90                                                           .......

0050e7b0  int32_t __fastcall AC1Legacy::Vector3::is_zero(class AC1Legacy::Vector3 const* this)

0050e7b0  {
0050e7b2      long double x87_r7 = fabsl(((long double)this->x));
0050e7b4      long double x87_r6 = ((long double)0.000199999995f);
0050e7ba      (x87_r6 - x87_r7);
0050e7ba      
0050e7c1      if ((*(uint8_t*)((char*)((((x87_r6 < x87_r7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0050e7c1      {
0050e7c6          long double x87_r7_2 = fabsl(((long double)this->y));
0050e7c8          long double x87_r6_1 = ((long double)0.000199999995f);
0050e7ce          (x87_r6_1 - x87_r7_2);
0050e7ce          
0050e7d5          if ((*(uint8_t*)((char*)((((x87_r6_1 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_2) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0050e7d5          {
0050e7da              long double x87_r7_4 = fabsl(((long double)this->z));
0050e7dc              long double x87_r6_2 = ((long double)0.000199999995f);
0050e7e2              (x87_r6_2 - x87_r7_4);
0050e7e2              
0050e7e9              if ((*(uint8_t*)((char*)((((x87_r6_2 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_4) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0050e7f0                  return 1;
0050e7d5          }
0050e7c1      }
0050e7c1      
0050e7f3      return 0;
0050e7b0  }

0050e7f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050e800  void LandDefs::within_block(class AC1Legacy::Vector3 const* arg1, float arg2)

0050e800  {
0050e804      long double x87_r7 = ((long double)arg1->x);
0050e806      long double temp0 = ((long double)arg2);
0050e806      (x87_r7 - temp0);
0050e806      
0050e80f      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0050e80f      {
0050e811          long double x87_r7_1 = ((long double)arg1->y);
0050e814          long double temp1_1 = ((long double)arg2);
0050e814          (x87_r7_1 - temp1_1);
0050e814          
0050e81d          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0050e81d          {
0050e825              long double x87_r7_3 = (((long double)0f) - ((long double)arg2));
0050e829              long double temp2_1 = ((long double)arg1->x);
0050e829              (x87_r7_3 - temp2_1);
0050e829              
0050e830              if ((*(uint8_t*)((char*)((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0050e832                  (x87_r7_3 - ((long double)arg1->y));
0050e81d          }
0050e80f      }
0050e800  }

0050e847                       90 90 90 90 90 90 90 90 90                                                         .........

0050e850  void __thiscall CTransition::init_contact_plane(class CTransition* this, uint32_t arg2, class Plane const* arg3, int32_t arg4)

0050e850  {
0050e85d      this->collision_info.last_known_contact_plane_valid = 1;
0050e863      this->collision_info.last_known_contact_plane.N.x = arg3->N.x;
0050e863      this->collision_info.last_known_contact_plane.N.y = arg3->N.y;
0050e863      this->collision_info.last_known_contact_plane.N.z = arg3->N.z;
0050e863      this->collision_info.last_known_contact_plane.d = arg3->d;
0050e88b      this->collision_info.last_known_contact_plane_is_water = arg4;
0050e891      this->collision_info.last_known_contact_plane_cell_id = arg2;
0050e897      this->collision_info.contact_plane_valid = 1;
0050e89d      this->collision_info.contact_plane.N.x = arg3->N.x;
0050e89d      this->collision_info.contact_plane.N.y = arg3->N.y;
0050e89d      this->collision_info.contact_plane.N.z = arg3->N.z;
0050e89d      this->collision_info.contact_plane.d = arg3->d;
0050e8c2      this->collision_info.contact_plane_is_water = arg4;
0050e8ca      this->collision_info.contact_plane_cell_id = arg2;
0050e850  }

0050e8d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050e8e0  void __thiscall CTransition::init_last_known_contact_plane(class CTransition* this, uint32_t arg2, class Plane const* arg3, int32_t arg4)

0050e8e0  {
0050e8e6      this->collision_info.last_known_contact_plane_valid = 1;
0050e8f1      this->collision_info.last_known_contact_plane.N.x = arg3->N.x;
0050e8f1      this->collision_info.last_known_contact_plane.N.y = arg3->N.y;
0050e8f1      this->collision_info.last_known_contact_plane.N.z = arg3->N.z;
0050e8f1      this->collision_info.last_known_contact_plane.d = arg3->d;
0050e91b      this->collision_info.last_known_contact_plane_is_water = arg4;
0050e921      this->collision_info.contact_plane_cell_id = arg2;
0050e8e0  }

0050e92b                                   90 90 90 90 90                                                             .....

0050e930  int32_t __thiscall CPhysicsObj::makeAnimObject(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

0050e930  {
0050e93e      class CPartArray* eax = CPartArray::CreateSetup(this, arg2, arg3);
0050e94a      int32_t result;
0050e94a      result = eax != 0;
0050e94d      this->part_array = eax;
0050e953      return result;
0050e930  }

0050e956                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0050e960  class IDClass<_tagDataID,32,0>* __thiscall CPhysicsObj::GetSetupID(class CPhysicsObj const* this, class IDClass<_tagDataID,32,0>* __return)

0050e960  {
0050e960      class CPartArray* part_array = this->part_array;
0050e960      
0050e965      if (part_array != 0)
0050e965      {
0050e96d          CPartArray::GetSetupID(part_array, __return);
0050e975          return __return;
0050e965      }
0050e965      
0050e982      __return->id = INVALID_DID.id;
0050e984      return __return;
0050e960  }

0050e987                       90 90 90 90 90 90 90 90 90                                                         .........

0050e990  class IDClass<_tagDataID,32,0>* __thiscall CPhysicsObj::GetDataID(class CPhysicsObj const* this, class IDClass<_tagDataID,32,0>* __return)

0050e990  {
0050e990      class CPartArray* part_array = this->part_array;
0050e990      
0050e995      if (part_array != 0)
0050e995      {
0050e99d          CPartArray::GetDataID(part_array, __return);
0050e9a5          return __return;
0050e995      }
0050e995      
0050e9b2      __return->id = INVALID_DID.id;
0050e9b4      return __return;
0050e990  }

0050e9b7                                                                       90 90 90 90 90 90 90 90 90                         .........

0050e9c0  void __fastcall CPhysicsObj::GetRadius(class CPhysicsObj const* this)

0050e9c0  {
0050e9c0      class CPartArray* part_array = this->part_array;
0050e9c0      
0050e9c5      if (part_array == 0)
0050e9d2          return;
0050e9d2      
0050e9c7      /* tailcall */
0050e9c7      return CPartArray::GetRadius(part_array);
0050e9c0  }

0050e9d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0050e9e0  void __fastcall CPhysicsObj::GetHeight(class CPhysicsObj const* this)

0050e9e0  {
0050e9e0      class CPartArray* part_array = this->part_array;
0050e9e0      
0050e9e5      if (part_array == 0)
0050e9f2          return;
0050e9f2      
0050e9e7      /* tailcall */
0050e9e7      return CPartArray::GetHeight(part_array);
0050e9e0  }

0050e9f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0050ea00  void __fastcall CPhysicsObj::GetStepUpHeight(class CPhysicsObj const* this)

0050ea00  {
0050ea00      class CPartArray* part_array = this->part_array;
0050ea00      
0050ea05      if (part_array == 0)
0050ea12          return;
0050ea12      
0050ea07      /* tailcall */
0050ea07      return CPartArray::GetStepUpHeight(part_array);
0050ea00  }

0050ea13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0050ea20  void __fastcall CPhysicsObj::GetStepDownHeight(class CPhysicsObj const* this)

0050ea20  {
0050ea20      class CPartArray* part_array = this->part_array;
0050ea20      
0050ea25      if (part_array == 0)
0050ea32          return;
0050ea32      
0050ea27      /* tailcall */
0050ea27      return CPartArray::GetStepDownHeight(part_array);
0050ea20  }

0050ea33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0050ea40  int32_t __thiscall CPhysicsObj::GetSelectionSphere(class CPhysicsObj const* this, class CSphere* arg2)

0050ea40  {
0050ea40      class CPartArray* part_array = this->part_array;
0050ea40      
0050ea45      if (part_array == 0)
0050ea4e          return 0;
0050ea4e      
0050ea47      /* tailcall */
0050ea47      return CPartArray::GetSelectionSphere(part_array, arg2);
0050ea40  }

0050ea51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0050ea60  void __fastcall CPhysicsObj::InitializeMotionTables(class CPhysicsObj* this)

0050ea60  {
0050ea60      class CPartArray* part_array = this->part_array;
0050ea60      
0050ea65      if (part_array == 0)
0050ea6c          return;
0050ea6c      
0050ea67      /* tailcall */
0050ea67      return CPartArray::InitializeMotionTables(part_array);
0050ea60  }

0050ea6d                                         90 90 90                                                               ...

0050ea70  uint32_t __thiscall CPhysicsObj::DoInterpretedMotion(class CPhysicsObj* this, uint32_t arg2, class MovementParameters const* arg3)

0050ea70  {
0050ea70      class CPartArray* part_array = this->part_array;
0050ea70      
0050ea7a      if (part_array == 0)
0050ea81          return 0x47;
0050ea81      
0050ea7c      /* tailcall */
0050ea7c      return CPartArray::DoInterpretedMotion(part_array, arg2, arg3);
0050ea70  }

0050ea84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0050ea90  uint32_t __thiscall CPhysicsObj::StopInterpretedMotion(class CPhysicsObj* this, uint32_t arg2, class MovementParameters const* arg3)

0050ea90  {
0050ea90      class CPartArray* part_array = this->part_array;
0050ea90      
0050ea9a      if (part_array == 0)
0050eaa1          return 0x47;
0050eaa1      
0050ea9c      /* tailcall */
0050ea9c      return CPartArray::StopInterpretedMotion(part_array, arg2, arg3);
0050ea90  }

0050eaa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0050eab0  int32_t __fastcall CPhysicsObj::motions_pending(class CPhysicsObj const* this)

0050eab0  {
0050eab0      class MovementManager* movement_manager = this->movement_manager;
0050eab0      
0050eab8      if ((movement_manager != 0 && MovementManager::motions_pending(movement_manager) != 0))
0050eac8          return 1;
0050eac8      
0050eacb      return 0;
0050eab0  }

0050eacc                                      90 90 90 90                                                              ....

0050ead0  void __fastcall CPhysicsObj::StopCompletely_Internal(class CPhysicsObj* this)

0050ead0  {
0050ead0      class CPartArray* part_array = this->part_array;
0050ead0      
0050ead5      if (part_array == 0)
0050eadc          return;
0050eadc      
0050ead7      /* tailcall */
0050ead7      return CPartArray::StopCompletelyInternal(part_array);
0050ead0  }

0050eadd                                                                                         90 90 90                               ...

0050eae0  void __fastcall CPhysicsObj::unstick_from_object(class CPhysicsObj* this)

0050eae0  {
0050eae0      class PositionManager* position_manager = this->position_manager;
0050eae0      
0050eae8      if (position_manager == 0)
0050eaef          return;
0050eaef      
0050eaea      /* tailcall */
0050eaea      return PositionManager::UnStick(position_manager);
0050eae0  }


0050eaf0  uint32_t __fastcall CPhysicsObj::get_sticky_object_id(class CPhysicsObj const* this)

0050eaf0  {
0050eaf0      class PositionManager* position_manager = this->position_manager;
0050eaf0      
0050eaf8      if (position_manager == 0)
0050eb01          return 0;
0050eb01      
0050eafa      /* tailcall */
0050eafa      return PositionManager::GetStickyObjectID(position_manager);
0050eaf0  }

0050eb02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050eb10  int32_t __fastcall CPhysicsObj::IsMovingTo(class CPhysicsObj const* this)

0050eb10  {
0050eb10      class MovementManager* movement_manager = this->movement_manager;
0050eb10      
0050eb18      if ((movement_manager != 0 && MovementManager::IsMovingTo(movement_manager) != 0))
0050eb28          return 1;
0050eb28      
0050eb2b      return 0;
0050eb10  }

0050eb2c                                      90 90 90 90                                                              ....

0050eb30  int32_t __fastcall CPhysicsObj::movement_is_autonomous(class CPhysicsObj const* this)

0050eb30  {
0050eb36      return this->last_move_was_autonomous;
0050eb30  }

0050eb37                                                                       90 90 90 90 90 90 90 90 90                         .........

0050eb40  void __fastcall CPhysicsObj::StopInterpolating(class CPhysicsObj* this)

0050eb40  {
0050eb40      class PositionManager* position_manager = this->position_manager;
0050eb40      
0050eb48      if (position_manager == 0)
0050eb4f          return;
0050eb4f      
0050eb4a      /* tailcall */
0050eb4a      return PositionManager::StopInterpolating(position_manager);
0050eb40  }


0050eb50  int32_t __fastcall CPhysicsObj::IsInterpolating(class CPhysicsObj const* this)

0050eb50  {
0050eb50      class PositionManager* position_manager = this->position_manager;
0050eb50      
0050eb58      if (position_manager == 0)
0050eb61          return 0;
0050eb61      
0050eb5a      /* tailcall */
0050eb5a      return PositionManager::IsInterpolating(position_manager);
0050eb50  }

0050eb62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050eb70  void __fastcall CPhysicsObj::GetAutonomyBlipDistance(class CPhysicsObj const* this)

0050eb70  {
0050eb76      if (this == CPhysicsObj::player_object)
0050eb76      {
0050eb78          this->m_position;
0050eb8d          return;
0050eb76      }
0050eb76      
0050eb95      this->m_position;
0050eb70  }

0050ebb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050ebc0  void __fastcall CPhysicsObj::GetStartConstraintDistance(class CPhysicsObj const* this)

0050ebc0  {
0050ebc6      if (this == CPhysicsObj::player_object)
0050ebc6      {
0050ebc8          this->m_position;
0050ebdd          return;
0050ebc6      }
0050ebc6      
0050ebe5      this->m_position;
0050ebc0  }

0050ec04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0050ec10  void __fastcall CPhysicsObj::GetMaxConstraintDistance(class CPhysicsObj const* this)

0050ec10  {
0050ec16      if (this == CPhysicsObj::player_object)
0050ec16      {
0050ec18          this->m_position;
0050ec2d          return;
0050ec16      }
0050ec16      
0050ec35      this->m_position;
0050ec10  }

0050ec54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050ec60  int32_t __fastcall CPhysicsObj::IsFullyConstrained(class CPhysicsObj const* this)

0050ec60  {
0050ec60      class PositionManager* position_manager = this->position_manager;
0050ec60      
0050ec68      if (position_manager == 0)
0050ec71          return 0;
0050ec71      
0050ec6a      /* tailcall */
0050ec6a      return PositionManager::IsFullyConstrained(position_manager);
0050ec60  }

0050ec72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050ec80  uint32_t __thiscall CPhysicsObj::check_attack(class CPhysicsObj const* this, class Position const* arg2, float const arg3, class AttackCone const* arg4, float arg5)

0050ec80  {
0050ec8b      if (this->parent == 0)
0050ec8b      {
0050ec91          uint32_t state = this->state;
0050ec91          
0050eca4          if (((state & 0x10) == 0 && (state & 0x200000) == 0))
0050eca4          {
0050eca6              class CPartArray* part_array = this->part_array;
0050ecab              float var_8;
0050ecab              
0050ecab              if (part_array == 0)
0050ecb8                  var_8 = 0f;
0050ecab              else
0050ecb2                  var_8 = ((float)CPartArray::GetHeight(part_array));
0050ecb2              
0050ecc0              class CPartArray* part_array_1 = this->part_array;
0050ecc5              float var_4;
0050ecc5              
0050ecc5              if (part_array_1 == 0)
0050ecd2                  var_4 = 0f;
0050ecc5              else
0050eccc                  var_4 = ((float)CPartArray::GetRadius(part_array_1));
0050eccc              
0050ed15              int32_t result;
0050ed15              int80_t st0_3;
0050ed15              st0_3 = CSphere::attack(&this->m_position, var_4, var_8, arg2, &arg4->left, &arg4->right, ((float)((((long double)arg3) * ((long double)*(uint32_t*)((char*)arg4->left + 0x10))) + ((long double)arg5))), ((float)(((long double)arg3) * ((long double)arg4->height))));
0050ed21              return result;
0050eca4          }
0050ec8b      }
0050ec8b      
0050ed2a      return 0;
0050ec80  }

0050ed2d                                         90 90 90                                                               ...

0050ed30  void __thiscall CPhysicsObj::set_target(class CPhysicsObj* this, uint32_t arg2, uint32_t arg3, float arg4, double arg5)

0050ed30  {
0050ed3b      if (this->target_manager == 0)
0050ed3b      {
0050ed3f          void* eax_1 = operator new(0x18);
0050ed49          class TargetManager* eax_2;
0050ed49          
0050ed49          if (eax_1 == 0)
0050ed55              eax_2 = nullptr;
0050ed49          else
0050ed4e              eax_2 = TargetManager::TargetManager(eax_1, this);
0050ed4e          
0050ed57          this->target_manager = eax_2;
0050ed3b      }
0050ed3b      
0050ed69      int32_t var_8_2 = *(uint32_t*)((char*)arg5)[4];
0050ed7c      TargetManager::SetTarget(this->target_manager, arg2, arg3, arg4, arg5);
0050ed30  }

0050ed85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0050ed90  void __fastcall CPhysicsObj::clear_target(class CPhysicsObj* this)

0050ed90  {
0050ed90      class TargetManager* target_manager = this->target_manager;
0050ed90      
0050ed98      if (target_manager == 0)
0050ed9f          return;
0050ed9f      
0050ed9a      /* tailcall */
0050ed9a      return TargetManager::ClearTarget(target_manager);
0050ed90  }


0050eda0  void __thiscall CPhysicsObj::set_target_quantum(class CPhysicsObj* this, double arg2)

0050eda0  {
0050eda0      class TargetManager* target_manager = this->target_manager;
0050eda0      
0050eda8      if (target_manager != 0)
0050eda8      {
0050edb2          int32_t var_4_1 = *(uint32_t*)((char*)arg2)[4];
0050edb4          TargetManager::SetTargetQuantum(target_manager, arg2);
0050eda8      }
0050eda0  }

0050edbc                                                                                      90 90 90 90                              ....

0050edc0  class TargetManager* __fastcall CPhysicsObj::get_target_quantum(class CPhysicsObj const* this)

0050edc0  {
0050edc0      class TargetManager* result = this->target_manager;
0050edc0      
0050edc8      if (result != 0)
0050edc8      {
0050edca          result = result->target_info;
0050edca          
0050edcf          if (result != 0)
0050edd1              result->last_update_time;
0050edc8      }
0050edc8      
0050eddb      return result;
0050edc0  }

0050eddc                                                                                      90 90 90 90                              ....

0050ede0  void __thiscall CPhysicsObj::receive_target_update(class CPhysicsObj* this, class TargetInfo const* arg2)

0050ede0  {
0050ede0      class TargetManager* target_manager = this->target_manager;
0050ede0      
0050ede8      if (target_manager == 0)
0050edef          return;
0050edef      
0050edea      /* tailcall */
0050edea      return TargetManager::ReceiveUpdate(target_manager, arg2);
0050ede0  }

0050edf2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050ee00  void __thiscall CPhysicsObj::add_voyeur(class CPhysicsObj* this, uint32_t arg2, float arg3, float arg4)

0050ee00  {
0050ee00      int32_t __saved_esi_1;
0050ee00      int32_t __saved_esi = __saved_esi_1;
0050ee00      
0050ee0b      if (this->target_manager == 0)
0050ee0b      {
0050ee0d          int64_t var_c;
0050ee0d          *(uint32_t*)((char*)var_c)[4] = 0x18;
0050ee0f          int32_t eax_1 = operator new();
0050ee19          class TargetManager* eax_2;
0050ee19          
0050ee19          if (eax_1 == 0)
0050ee25              eax_2 = nullptr;
0050ee19          else
0050ee19          {
0050ee1b              *(uint32_t*)((char*)var_c)[4] = this;
0050ee1e              eax_2 = TargetManager::TargetManager(eax_1);
0050ee19          }
0050ee19          
0050ee27          this->target_manager = eax_2;
0050ee0b      }
0050ee0b      
0050ee47      TargetManager::AddVoyeur(this->target_manager, arg2, arg3, ((double)((long double)arg4)));
0050ee00  }


0050ee50  int32_t __thiscall CPhysicsObj::remove_voyeur(class CPhysicsObj* this, uint32_t arg2)

0050ee50  {
0050ee50      class TargetManager* target_manager = this->target_manager;
0050ee50      
0050ee58      if (target_manager == 0)
0050ee61          return 0;
0050ee61      
0050ee5a      /* tailcall */
0050ee5a      return TargetManager::RemoveVoyeur(target_manager, arg2);
0050ee50  }

0050ee64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0050ee70  void __thiscall CPhysicsObj::calc_friction(class CPhysicsObj* this, float arg2, float arg3)

0050ee70  {
0050ee7d      if ((this->transient_state & 2) != 0)
0050ee7d      {
0050ee8d          int32_t eax;
0050ee8d          long double x87_r7_4;
0050ee8d          
0050ee8d          if ((this->state & "activation type (%s) with '%s' b…") == 0)
0050ee8d          {
0050efa3              x87_r7_4 = (((((long double)this->contact_plane.N.z) * ((long double)this->m_velocityVector.z)) + (((long double)this->contact_plane.N.y) * ((long double)this->m_velocityVector.y))) + (((long double)this->contact_plane.N.x) * ((long double)this->m_velocityVector.x)));
0050efa5              long double temp1_1 = ((long double)0.25f);
0050efa5              (x87_r7_4 - temp1_1);
0050efab              eax = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0050efad              bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
0050efad              
0050efb0              if (!(p_5))
0050efb0              {
0050efda                  this->m_velocityVector.x = ((float)(((long double)this->m_velocityVector.x) - (x87_r7_4 * ((long double)this->contact_plane.N.x))));
0050efe8                  this->m_velocityVector.y = ((float)(((long double)this->m_velocityVector.y) - (x87_r7_4 * ((long double)this->contact_plane.N.y))));
0050effc                  this->m_velocityVector.z = ((float)(((long double)this->m_velocityVector.z) - ((long double)((float)(x87_r7_4 * ((long double)this->contact_plane.N.z))))));
0050f002                  this->friction;
0050f00e              label_50f00e:
0050f00e                  long double x87_r6_15 = ((long double)arg2);
0050f012                  j__CIpow();
0050f01f                  this->m_velocityVector.x = ((float)(x87_r6_15 * ((long double)this->m_velocityVector.x)));
0050f02d                  this->m_velocityVector.y = ((float)(x87_r6_15 * ((long double)this->m_velocityVector.y)));
0050f039                  this->m_velocityVector.z = ((float)(x87_r6_15 * ((long double)this->m_velocityVector.z)));
0050efb0              }
0050ee8d          }
0050ee8d          else
0050ee8d          {
0050eeb9              x87_r7_4 = (((((long double)this->m_velocityVector.z) * ((long double)this->contact_plane.N.z)) + (((long double)this->m_velocityVector.y) * ((long double)this->contact_plane.N.y))) + (((long double)this->m_velocityVector.x) * ((long double)this->contact_plane.N.x)));
0050eebb              long double temp2_1 = ((long double)0.25f);
0050eebb              (x87_r7_4 - temp2_1);
0050eec1              eax = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
0050eec3              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050eec3              
0050eec6              if (!(p_1))
0050eec6              {
0050eece                  float friction = 0.200000003f;
0050eef8                  this->m_velocityVector.x = ((float)(((long double)this->m_velocityVector.x) - (x87_r7_4 * ((long double)this->contact_plane.N.x))));
0050ef06                  this->m_velocityVector.y = ((float)(((long double)this->m_velocityVector.y) - (x87_r7_4 * ((long double)this->contact_plane.N.y))));
0050ef1a                  this->m_velocityVector.z = ((float)(((long double)this->m_velocityVector.z) - ((long double)((float)(x87_r7_4 * ((long double)this->contact_plane.N.z))))));
0050ef20                  long double x87_r7_8 = ((long double)arg3);
0050ef24                  long double temp3_1 = ((long double)1.5625);
0050ef24                  (x87_r7_8 - temp3_1);
0050ef2a                  eax = ((((x87_r7_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0050ef2c                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0050ef2c                  
0050ef2f                  if (p_2)
0050ef2f                  {
0050ef42                      long double x87_r7_10 = ((long double)arg3);
0050ef46                      long double temp4_1 = ((long double)6.25);
0050ef46                      (x87_r7_10 - temp4_1);
0050ef4c                      eax = ((((x87_r7_10 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0050ef4e                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0050ef51                      bool p_4;
0050ef51                      
0050ef51                      if (p_3)
0050ef51                      {
0050ef53                          long double x87_r7_11 = ((long double)this->contact_plane.N.z);
0050ef5f                          long double st0_1;
0050ef5f                          bool c2_4;
0050ef5f                          st0_1 = __fcos(((long double)0.17453292519943295));
0050ef61                          (st0_1 - x87_r7_11);
0050ef63                          eax = ((((st0_1 < x87_r7_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, x87_r7_11))) ? 1 : 0) << 0xa) | ((((st0_1 == x87_r7_11) ? 1 : 0) << 0xe) | 0))));
0050ef65                          p_4 = /* p_4 = unimplemented  {test ah, 0x41} */;
0050ef51                      }
0050ef51                      
0050ef68                      if ((!(p_3) || !(p_4)))
0050ef70                          friction = this->friction;
0050ef2f                  }
0050ef2f                  
0050ef2f                  goto label_50f00e;
0050eec6              }
0050ee8d          }
0050ee7d      }
0050ee70  }

0050f04f                                               90                                                                 .

0050f050  enum TransitionState __thiscall CPhysicsObj::FindObjCollisions(class CPhysicsObj const* this, class CTransition* arg2)

0050f050  {
0050f054      class CTransition* ebx = arg2;
0050f05b      uint8_t state = ((int8_t)this->state);
0050f05b      
0050f067      if (((state & 4) == 0 || (state & 0x10) == 0))
0050f067      {
0050f069          class CWeenieObject* weenie_obj = this->weenie_obj;
0050f077          int32_t eax_1;
0050f077          
0050f077          if ((weenie_obj != 0 && (ebx->object_info.state & 4) != 0))
0050f07b              eax_1 = weenie_obj->vtable->IsCreature();
0050f07b          
0050f080          if (((weenie_obj == 0 || (ebx->object_info.state & 4) == 0) || eax_1 == 0))
0050f080          {
0050f08f              uint32_t state_2 = this->state;
0050f0a2              int32_t var_c;
0050f0a2              
0050f0a2              if (((state_2 & 4) != 0 || (ebx->object_info.ethereal != 0 && (state_2 & 1) == 0)))
0050f0a2              {
0050f0bb                  var_c = 1;
0050f0bb                  
0050f0bf                  if (ebx->sphere_path.step_down == 0)
0050f0bf                      goto label_50f0c9;
0050f0a2              }
0050f0a2              else
0050f0a2              {
0050f0a4                  var_c = 0;
0050f0c9              label_50f0c9:
0050f0c9                  ebx->sphere_path.obstruction_ethereal = var_c;
0050f0cf                  class CWeenieObject* weenie_obj_1 = this->weenie_obj;
0050f0d9                  class CTransition* ebp_1;
0050f0d9                  
0050f0d9                  if (weenie_obj_1 == 0)
0050f132                      ebp_1 = nullptr;
0050f0d9                  else if (weenie_obj_1->vtable->IsPlayer() == 0)
0050f132                      ebp_1 = nullptr;
0050f0e2                  else
0050f0e2                  {
0050f0e4                      int16_t state_1 = ((int16_t)ebx->object_info.state);
0050f0e4                      
0050f0ea                      if ((*(uint8_t*)((char*)state_1)[1] & 1) == 0)
0050f132                          ebp_1 = nullptr;
0050f0ea                      else
0050f0ea                      {
0050f0ee                          ebp_1 = 1;
0050f0ee                          
0050f0f3                          if (state_1 < 0)
0050f132                              ebp_1 = nullptr;
0050f0f3                          else if (this->weenie_obj->vtable->IsImpenetrable() != 0)
0050f132                              ebp_1 = nullptr;
0050f102                          else
0050f102                          {
0050f10a                              int32_t eax_7;
0050f10a                              
0050f10a                              if ((*(uint8_t*)((char*)((int16_t)ebx->object_info.state))[1] & 8) != 0)
0050f114                                  eax_7 = this->weenie_obj->vtable->IsPK();
0050f114                              
0050f119                              if (((*(uint8_t*)((char*)((int16_t)ebx->object_info.state))[1] & 8) != 0 && eax_7 != 0))
0050f132                                  ebp_1 = nullptr;
0050f119                              else if (((*(uint8_t*)((char*)((int16_t)ebx->object_info.state))[1] & 0x10) != 0 && this->weenie_obj->vtable->IsPKLite() != 0))
0050f132                                  ebp_1 = nullptr;
0050f102                          }
0050f0ea                      }
0050f0e2                  }
0050f0e2                  
0050f13b                  enum TransitionState state_3 = OK_TS;
0050f140                  int32_t var_8_1 = 0;
0050f140                  
0050f148                  if ((this->state & 0x40) != 0)
0050f15d                      var_8_1 = 1;
0050f148                  else
0050f148                  {
0050f14a                      class CWeenieObject* weenie_obj_2 = this->weenie_obj;
0050f14a                      
0050f152                      if ((weenie_obj_2 != 0 && weenie_obj_2->vtable->IsCreature() != 0))
0050f15d                          var_8_1 = 1;
0050f148                  }
0050f148                  
0050f173                  int32_t eax_12;
0050f173                  
0050f173                  if (((this->state & 0x10000) != 0 && ebp_1 == 0))
0050f178                      eax_12 = OBJECTINFO::missile_ignore(ebx, this);
0050f178                  
0050f17f                  if ((((this->state & 0x10000) == 0 || ebp_1 != 0) || eax_12 != 0))
0050f17f                  {
0050f1a2                      class CPartArray* part_array_1 = this->part_array;
0050f1a7                      int16_t top;
0050f1a7                      
0050f1a7                      if (part_array_1 != 0)
0050f1a7                      {
0050f1b4                          if ((CPartArray::GetNumCylsphere(part_array_1) == 0 || ebp_1 != 0))
0050f1b0                              goto label_50f21d;
0050f1b0                          
0050f1c0                          if (OBJECTINFO::missile_ignore(ebx, this) != 0)
0050f1c0                              goto label_50f21d;
0050f1c0                          
0050f1c2                          int32_t ebx_1 = 0;
0050f1c2                          
0050f1c4                          while (true)
0050f1c4                          {
0050f1c4                              class CPartArray* part_array_2 = this->part_array;
0050f1c4                              
0050f1c9                              if ((part_array_2 != 0 && ebx_1 < CPartArray::GetNumCylsphere(part_array_2)))
0050f1c9                              {
0050f1dc                                  class CPartArray* part_array_3 = this->part_array;
0050f1e1                                  float m_scale = this->m_scale;
0050f1eb                                  class CCylSphere* eax_17;
0050f1eb                                  
0050f1eb                                  if (part_array_3 == 0)
0050f1f4                                      eax_17 = nullptr;
0050f1eb                                  else
0050f1ed                                      eax_17 = CPartArray::GetCylsphere(part_array_3);
0050f1ed                                  
0050f207                                  enum TransitionState state_4 = CCylSphere::intersects_sphere(((char*)eax_17 + ebp_1), &this->m_position, m_scale, arg2);
0050f207                                  top -= 1;
0050f207                                  /* unimplemented  {call CCylSphere::intersects_sphere} */;
0050f20c                                  state_3 = state_4;
0050f20c                                  
0050f211                                  if (state_3 != OK_TS)
0050f211                                  {
0050f2ac                                      ebx = arg2;
0050f2ac                                      break;
0050f211                                  }
0050f211                                  
0050f217                                  ebx_1 += 1;
0050f218                                  ebp_1 = &ebp_1->object_info.ethereal;
0050f21b                                  continue;
0050f1c9                              }
0050f1c9                              
0050f317                              ebx = arg2;
0050f317                              goto label_50f31b;
0050f1c4                          }
0050f1c4                          
0050f317                          goto label_50f2b6;
0050f1a7                      }
0050f1a7                      
0050f21d                  label_50f21d:
0050f21d                      class CPartArray* part_array_4 = this->part_array;
0050f21d                      
0050f222                      if (((part_array_4 != 0 && (CPartArray::GetNumSphere(part_array_4) != 0 && ebp_1 == 0)) && OBJECTINFO::missile_ignore(ebx, this) == 0))
0050f222                      {
0050f24d                          arg2 = ebp_1;
0050f24d                          
0050f251                          while (true)
0050f251                          {
0050f251                              class CPartArray* part_array_5 = this->part_array;
0050f251                              
0050f256                              if (part_array_5 == 0)
0050f256                                  goto label_50f31b;
0050f256                              
0050f265                              if (arg2 >= CPartArray::GetNumSphere(part_array_5))
0050f265                                  goto label_50f31b;
0050f265                              
0050f26b                              class CPartArray* part_array_6 = this->part_array;
0050f270                              float m_scale_1 = this->m_scale;
0050f27a                              class CSphere* eax_21;
0050f27a                              
0050f27a                              if (part_array_6 == 0)
0050f283                                  eax_21 = nullptr;
0050f27a                              else
0050f27c                                  eax_21 = CPartArray::GetSphere(part_array_6);
0050f27c                              
0050f297                              enum TransitionState state_5 = CSphere::intersects_sphere(((char*)eax_21 + ebp_1), &this->m_position, m_scale_1, ebx, var_8_1);
0050f297                              top -= 1;
0050f297                              /* unimplemented  {call CSphere::intersects_sphere} */;
0050f29c                              state_3 = state_5;
0050f29c                              
0050f2a1                              if (state_3 != OK_TS)
0050f2a1                                  break;
0050f2a1                              
0050f2a3                              arg2 = (&arg2->object_info.object + 1);
0050f2a7                              ebp_1 = &ebp_1->object_info.step_down_height;
0050f251                          }
0050f251                          
0050f256                          goto label_50f2b6;
0050f222                      }
0050f17f                  }
0050f17f                  else
0050f17f                  {
0050f181                      class CPartArray* part_array = this->part_array;
0050f181                      
0050f186                      if (part_array != 0)
0050f186                      {
0050f192                          state_3 = CPartArray::FindObjCollisions(part_array, ebx);
0050f192                          
0050f197                          if (state_3 != OK_TS)
0050f197                          {
0050f2b6                          label_50f2b6:
0050f2b6                              
0050f2b8                              if (ebx->sphere_path.step_down == 0)
0050f2b8                              {
0050f2c1                                  if ((this->state & 1) == 0)
0050f2c1                                  {
0050f2eb                                      if ((var_c != 0 || (var_8_1 != 0 && (*(uint8_t*)((char*)((int16_t)ebx->object_info.state))[1] & 4) != 0)))
0050f2eb                                      {
0050f2fc                                          state_3 = OK_TS;
0050f302                                          ebx->collision_info.collision_normal_valid = 0;
0050f310                                          COLLISIONINFO::add_object(&ebx->collision_info, this, OK_TS);
0050f2eb                                      }
0050f2eb                                      else
0050f2f5                                          COLLISIONINFO::add_object(&ebx->collision_info, this, state_3);
0050f2c1                                  }
0050f2c1                                  else if ((ebx->object_info.state & 1) == 0)
0050f2c9                                      ebx->collision_info.collided_with_environment = 1;
0050f2b8                              }
0050f197                          }
0050f186                      }
0050f17f                  }
0050f17f                  
0050f31b              label_50f31b:
0050f31b                  state_2 = state_3;
0050f31e                  ebx->sphere_path.obstruction_ethereal = 0;
0050f0a2              }
0050f32e              return state_2;
0050f080          }
0050f067      }
0050f067      
0050f08c      return 1;
0050f050  }

0050f331                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0050f340  void __thiscall CPhysicsObj::UpdateViewerDistance(class CPhysicsObj* this, float arg2, class AC1Legacy::Vector3 const* arg3)

0050f340  {
0050f344      this->CYpt = arg2;
0050f347      class CPartArray* part_array = this->part_array;
0050f347      
0050f34c      if (part_array == 0)
0050f353          return;
0050f353      
0050f34e      /* tailcall */
0050f34e      return CPartArray::UpdateViewerDistance(part_array, arg2, arg3);
0050f340  }

0050f356                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0050f360  uint32_t __thiscall CPhysicsObj::create_particle_emitter(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, class Frame const* arg4, uint32_t arg5)

0050f360  {
0050f36b      if (this->particle_manager == 0)
0050f36b      {
0050f36f          void* eax_1 = operator new(0xc);
0050f379          class ParticleManager* eax_2;
0050f379          
0050f379          if (eax_1 == 0)
0050f384              eax_2 = nullptr;
0050f379          else
0050f37d              eax_2 = ParticleManager::ParticleManager(eax_1);
0050f37d          
0050f386          this->particle_manager = eax_2;
0050f36b      }
0050f36b      
0050f3ad      return ParticleManager::CreateParticleEmitter(this->particle_manager, this, arg2, arg3, arg4, arg5);
0050f360  }


0050f3b0  uint32_t __thiscall CPhysicsObj::create_blocking_particle_emitter(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, class Frame const* arg4, uint32_t arg5)

0050f3b0  {
0050f3bb      if (this->particle_manager == 0)
0050f3bb      {
0050f3bf          void* eax_1 = operator new(0xc);
0050f3c9          class ParticleManager* eax_2;
0050f3c9          
0050f3c9          if (eax_1 == 0)
0050f3d4              eax_2 = nullptr;
0050f3c9          else
0050f3cd              eax_2 = ParticleManager::ParticleManager(eax_1);
0050f3cd          
0050f3d6          this->particle_manager = eax_2;
0050f3bb      }
0050f3bb      
0050f3fd      return ParticleManager::CreateBlockingParticleEmitter(this->particle_manager, this, arg2, arg3, arg4, arg5);
0050f3b0  }


0050f400  int32_t __thiscall CPhysicsObj::destroy_particle_emitter(class CPhysicsObj* this, uint32_t arg2)

0050f400  {
0050f400      class ParticleManager* particle_manager = this->particle_manager;
0050f400      
0050f408      if (particle_manager == 0)
0050f411          return 0;
0050f411      
0050f40a      /* tailcall */
0050f40a      return ParticleManager::DestroyParticleEmitter(particle_manager, arg2);
0050f400  }

0050f414                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050f420  int32_t __thiscall CPhysicsObj::stop_particle_emitter(class CPhysicsObj* this, uint32_t arg2)

0050f420  {
0050f420      class ParticleManager* particle_manager = this->particle_manager;
0050f420      
0050f428      if (particle_manager == 0)
0050f431          return 0;
0050f431      
0050f42a      /* tailcall */
0050f42a      return ParticleManager::StopParticleEmitter(particle_manager, arg2);
0050f420  }

0050f434                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050f440  uint32_t __fastcall CPhysicsObj::get_num_emitters(class CPhysicsObj* this)

0050f440  {
0050f440      class ParticleManager* particle_manager = this->particle_manager;
0050f440      
0050f448      if (particle_manager == 0)
0050f451          return 0;
0050f451      
0050f44a      /* tailcall */
0050f44a      return ParticleManager::GetNumEmitters(particle_manager);
0050f440  }

0050f452                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050f460  void __thiscall CPhysicsObj::play_sound(class CPhysicsObj const* this, enum SoundType arg2, float arg3)

0050f460  {
0050f467      if (this->sound_table != 0)
0050f474          SoundManager::PlaySoundA(arg2, this, arg3);
0050f460  }

0050f484              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0050f490  class CPhysicsObj* CPhysicsObj::GetObjectA(uint32_t arg1)

0050f490  {
0050f490      class CObjectMaint* CPhysicsObj::obj_maint_1 = CPhysicsObj::obj_maint;
0050f490      
0050f498      if (CPhysicsObj::obj_maint_1 == 0)
0050f4a7          return 0;
0050f4a7      
0050f4a4      return CObjectMaint::GetObjectA(CPhysicsObj::obj_maint_1, arg1);
0050f490  }

0050f4a8                          90 90 90 90 90 90 90 90                                                          ........

0050f4b0  void CPhysicsObj::SetObjectMaintainer(class CObjectMaint* arg1)

0050f4b0  {
0050f4b4      CPhysicsObj::obj_maint = arg1;
0050f4b0  }

0050f4ba                                                                                90 90 90 90 90 90                            ......

0050f4c0  void CPhysicsObj::SetPlayer(class CPhysicsObj* arg1)

0050f4c0  {
0050f4c4      CPhysicsObj::player_object = arg1;
0050f4c0  }

0050f4ca                                90 90 90 90 90 90                                                            ......

0050f4d0  void __thiscall CPhysicsObj::set_weenie_obj_ptr(class CPhysicsObj* this, class CWeenieObject* arg2)

0050f4d0  {
0050f4d4      this->weenie_obj = arg2;
0050f4da      class MovementManager* movement_manager = this->movement_manager;
0050f4da      
0050f4e2      if (movement_manager == 0)
0050f4ed          return;
0050f4ed      
0050f4e8      /* tailcall */
0050f4e8      return MovementManager::SetWeenieObject(movement_manager, arg2);
0050f4d0  }


0050f4f0  void __thiscall CPhysicsObj::set_cell_id(class CPhysicsObj* this, uint32_t arg2)

0050f4f0  {
0050f4fd      this->m_position.objcell_id = arg2;
0050f4fd      
0050f500      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
0050f500      {
0050f502          class CPartArray* part_array = this->part_array;
0050f502          
0050f507          if (part_array != 0)
0050f50d              /* tailcall */
0050f50d              return CPartArray::SetCellID(part_array, arg2);
0050f500      }
0050f4f0  }

0050f515                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0050f520  void __thiscall CPhysicsObj::remove_parts(class CPhysicsObj* this, class CObjCell* arg2)

0050f520  {
0050f520      class CPartArray* part_array = this->part_array;
0050f520      
0050f525      if (part_array == 0)
0050f52c          return;
0050f52c      
0050f527      /* tailcall */
0050f527      return CPartArray::RemoveParts(part_array, arg2);
0050f520  }

0050f52f                                               90                                                                 .

0050f530  int32_t __stdcall CPhysicsObj::is_valid_walkable(class CPhysicsObj const* this @ ecx, class AC1Legacy::Vector3 const* arg2)

0050f530  {
0050f534      long double x87_r7 = ((long double)arg2->z);
0050f537      long double temp1 = ((long double)PhysicsGlobals::floor_z);
0050f537      (x87_r7 - temp1);
0050f53d      class AC1Legacy::Vector3* eax;
0050f53d      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0050f53d      
0050f542      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
0050f54e          return 0;
0050f54e      
0050f549      return 1;
0050f530  }

0050f551                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0050f560  float CPhysicsObj::get_walkable_z(class CPhysicsObj* this @ ecx)

0050f560  {
0050f566      return ((int32_t)((long double)PhysicsGlobals::floor_z));
0050f560  }

0050f567                       90 90 90 90 90 90 90 90 90                                                         .........

0050f570  int32_t __fastcall CPhysicsObj::CacheHasPhysicsBSP(class CPhysicsObj* this)

0050f570  {
0050f573      class CPartArray* part_array = this->part_array;
0050f573      
0050f57b      if ((part_array != 0 && CPartArray::CacheHasPhysicsBSP(part_array) != 0))
0050f57b      {
0050f593          this->state |= 0x10000;
0050f59f          return 1;
0050f57b      }
0050f57b      
0050f5a0      this->state &= 0xfffeffff;
0050f5ae      return 0;
0050f570  }

0050f5af                                               90                                                                 .

0050f5b0  int32_t __thiscall CPhysicsObj::check_contact(class CPhysicsObj const* this, int32_t arg2)

0050f5b0  {
0050f5b7      if ((this->transient_state & 1) != 0)
0050f5b7      {
0050f5df          long double x87_r7_4 = (((((long double)this->m_velocityVector.z) * ((long double)this->contact_plane.N.z)) + (((long double)this->m_velocityVector.y) * ((long double)this->contact_plane.N.y))) + (((long double)this->m_velocityVector.x) * ((long double)this->contact_plane.N.x)));
0050f5e1          long double temp1_1 = ((long double)0.000199999995f);
0050f5e1          (x87_r7_4 - temp1_1);
0050f5e1          
0050f5ec          if ((*(uint8_t*)((char*)((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0050f5f0              return 0;
0050f5b7      }
0050f5b7      
0050f5f7      return arg2;
0050f5b0  }

0050f5fa                                                                                90 90 90 90 90 90                            ......

0050f600  int32_t __stdcall CPhysicsObj::build_collision_profile(class CPhysicsObj const* this @ ecx, class ObjCollisionProfile* arg2, class CPhysicsObj const* arg3, class AC1Legacy::Vector3 const* arg4, int32_t const arg5, int32_t const arg6, int32_t const arg7)

0050f600  {
0050f606      class CWeenieObject* weenie_obj = arg3->weenie_obj;
0050f606      
0050f60e      if ((weenie_obj != 0 && weenie_obj->vtable->InqCollisionProfile(arg2) != 0))
0050f60e      {
0050f625          arg2->id = arg3->id;
0050f629          arg2->velocity.x = arg4->x;
0050f629          arg2->velocity.y = arg4->y;
0050f629          arg2->velocity.z = arg4->z;
0050f641          ObjCollisionProfile::SetMissile(arg2, arg6);
0050f64d          ObjCollisionProfile::SetInContact(arg2, arg7);
0050f659          ObjCollisionProfile::SetMeInContact(arg2, arg5);
0050f665          return 1;
0050f60e      }
0050f60e      
0050f66c      return 0;
0050f600  }

0050f66f                                               90                                                                 .

0050f670  void __fastcall CPhysicsObj::UpdatePartsInternal(class CPhysicsObj* this)

0050f670  {
0050f679      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
0050f679      {
0050f67b          class CPartArray* part_array = this->part_array;
0050f67b          
0050f680          if (part_array != 0)
0050f688              CPartArray::SetFrame(part_array, &this->m_position.frame);
0050f679      }
0050f670  }

0050f68e                                            90 90                                                                ..

0050f690  int32_t __thiscall CPhysicsObj::SetPlacementFrameInternal(class CPhysicsObj* this, uint32_t arg2)

0050f690  {
0050f693      class CPartArray* part_array = this->part_array;
0050f697      int32_t result = 0;
0050f697      
0050f69b      if (part_array != 0)
0050f6a7          result = CPartArray::SetPlacementFrame(part_array, arg2);
0050f6a7      
0050f6b2      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
0050f6b2      {
0050f6b4          class CPartArray* part_array_1 = this->part_array;
0050f6b4          
0050f6b9          if (part_array_1 != 0)
0050f6bf              CPartArray::SetFrame(part_array_1, &this->m_position.frame);
0050f6b2      }
0050f6b2      
0050f6c8      return result;
0050f690  }

0050f6cb                                   90 90 90 90 90                                                             .....

0050f6d0  void __thiscall CPhysicsObj::set_omega(class CPhysicsObj* this, class AC1Legacy::Vector3 const* arg2, int32_t arg3)

0050f6d0  {
0050f6d6      this->m_omegaVector.x = arg2->x;
0050f6d6      this->m_omegaVector.y = arg2->y;
0050f6d6      this->m_omegaVector.z = arg2->z;
0050f6d0  }

0050f6ed                                         90 90 90                                                               ...

0050f6f0  void __thiscall CPhysicsObj::set_sequence_animation(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3, uint32_t arg4, float arg5)

0050f6f0  {
0050f6fb      if (this->part_array != 0)
0050f6fb      {
0050f701          void var_14;
0050f701          AnimData::AnimData(&var_14);
0050f712          class IDClass<_tagDataID,32,0> var_10_1 = arg2;
0050f71c          float var_4_1 = arg5;
0050f720          uint32_t var_c_1 = arg4;
0050f720          
0050f724          if (arg3 != 0)
0050f72c              CSequence::clear(&this->part_array->sequence);
0050f72c          
0050f73c          CSequence::append_animation(&this->part_array->sequence, &var_14);
0050f745          SetPositionStruct::~SetPositionStruct(&var_14);
0050f6fb      }
0050f6f0  }

0050f751                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0050f760  void __fastcall CPhysicsObj::clear_sequence_anims(class CPhysicsObj* this)

0050f760  {
0050f760      class CPartArray* part_array = this->part_array;
0050f760      
0050f765      if (part_array == 0)
0050f76f          return;
0050f76f      
0050f76a      /* tailcall */
0050f76a      return CSequence::clear_animations(&part_array->sequence);
0050f760  }


0050f770  int32_t __fastcall CPhysicsObj::HasAnims(class CPhysicsObj const* this)

0050f770  {
0050f770      class CPartArray* part_array = this->part_array;
0050f770      
0050f775      if (part_array == 0)
0050f77e          return 0;
0050f77e      
0050f777      /* tailcall */
0050f777      return CPartArray::HasAnims(part_array);
0050f770  }

0050f77f                                                                                               90                                 .

0050f780  uint32_t __fastcall CPhysicsObj::get_curr_frame_number(class CPhysicsObj const* this)

0050f780  {
0050f780      class CPartArray* part_array = this->part_array;
0050f780      
0050f785      if (part_array == 0)
0050f791          return 0;
0050f791      
0050f78a      /* tailcall */
0050f78a      return CSequence::get_curr_frame_number(&part_array->sequence);
0050f780  }

0050f792                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050f7a0  class AC1Legacy::Vector3* __thiscall CPhysicsObj::get_distance_to_object(class CPhysicsObj* this, class CPhysicsObj* arg2, int32_t arg3)

0050f7a0  {
0050f7ac      if (arg3 == 0)
0050f7ac      {
0050f856          class AC1Legacy::Vector3* eax_3;
0050f856          int80_t st0_6;
0050f856          eax_3 = Position::distance(&this->m_position, &arg2->m_position);
0050f85f          return eax_3;
0050f7ac      }
0050f7ac      
0050f7b3      class CPhysicsObj* edi = arg2;
0050f7b7      class CPartArray* part_array = edi->part_array;
0050f7b7      
0050f7bc      if (part_array == 0)
0050f7c9          arg2 = nullptr;
0050f7bc      else
0050f7c3          arg2 = ((float)CPartArray::GetHeight(part_array));
0050f7c3      
0050f7d1      class CPartArray* part_array_1 = edi->part_array;
0050f7d1      
0050f7d6      if (part_array_1 == 0)
0050f7e3          arg3 = 0;
0050f7d6      else
0050f7dd          arg3 = ((float)CPartArray::GetRadius(part_array_1));
0050f7dd      
0050f7eb      class CPartArray* part_array_2 = this->part_array;
0050f7f0      float var_8;
0050f7f0      
0050f7f0      if (part_array_2 == 0)
0050f7fd          var_8 = 0f;
0050f7f0      else
0050f7f7          var_8 = ((float)CPartArray::GetHeight(part_array_2));
0050f7f7      
0050f805      class CPartArray* part_array_3 = this->part_array;
0050f80a      float var_4;
0050f80a      
0050f80a      if (part_array_3 == 0)
0050f817          var_4 = 0f;
0050f80a      else
0050f811          var_4 = ((float)CPartArray::GetRadius(part_array_3));
0050f811      
0050f83b      class AC1Legacy::Vector3* eax_2;
0050f83b      int80_t st0_5;
0050f83b      eax_2 = Position::cylinder_distance(var_4, var_8, &this->m_position, arg3, arg2, &edi->m_position);
0050f848      return eax_2;
0050f7a0  }

0050f862        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050f870  int32_t __thiscall CPhysicsObj::add_child(class CPhysicsObj* this, class CPhysicsObj* arg2, uint32_t arg3)

0050f870  {
0050f87a      if (arg2 == this)
0050f880          return 0;
0050f880      
0050f883      class CPartArray* part_array = this->part_array;
0050f883      
0050f88a      if (part_array != 0)
0050f88a      {
0050f896          class LocationType* eax_2 = CSetup::GetHoldingLocation(part_array->setup, arg3);
0050f896          
0050f89f          if (eax_2 != 0)
0050f89f          {
0050f8a6              if (this->children == 0)
0050f8a6              {
0050f8aa                  void* eax_4 = operator new(0x24);
0050f8b4                  class CHILDLIST* eax_5;
0050f8b4                  
0050f8b4                  if (eax_4 == 0)
0050f8bf                      eax_5 = nullptr;
0050f8b4                  else
0050f8b8                      eax_5 = CHILDLIST::CHILDLIST(eax_4);
0050f8b8                  
0050f8c1                  this->children = eax_5;
0050f8a6              }
0050f8a6              
0050f8d1              CHILDLIST::add_child(this->children, arg2, &eax_2->frame, eax_2->part_id, arg3);
0050f8df              return 1;
0050f89f          }
0050f88a      }
0050f88a      
0050f8e8      return 0;
0050f870  }

0050f8eb                                   90 90 90 90 90                                                             .....

0050f8f0  int32_t __thiscall CPhysicsObj::add_child(class CPhysicsObj* this, class CPhysicsObj* arg2, uint32_t arg3, class Frame const* arg4)

0050f8f0  {
0050f8fa      if (arg2 == this)
0050f900          return 0;
0050f900      
0050f913      if ((arg3 != 0xffffffff && arg3 >= this->part_array->num_parts))
0050f91a          return 0;
0050f91a      
0050f922      if (this->children == 0)
0050f922      {
0050f926          void* eax_5 = operator new(0x24);
0050f930          class CHILDLIST* eax_6;
0050f930          
0050f930          if (eax_5 == 0)
0050f93b              eax_6 = nullptr;
0050f930          else
0050f934              eax_6 = CHILDLIST::CHILDLIST(eax_5);
0050f934          
0050f93d          this->children = eax_6;
0050f922      }
0050f922      
0050f94c      CHILDLIST::add_child(this->children, arg2, arg4, arg3, 0);
0050f959      return 1;
0050f8f0  }

0050f95c                                                                                      90 90 90 90                              ....

0050f960  void __thiscall CPhysicsObj::SetTranslucencyInternal(class CPhysicsObj* this, float arg2)

0050f960  {
0050f960      long double x87_r7 = ((long double)arg2);
0050f964      long double temp1 = ((long double)this->translucencyOriginal);
0050f964      (x87_r7 - temp1);
0050f96a      int32_t eax;
0050f96a      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0050f96c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0050f96c      
0050f96f      if (!(p))
0050f977          arg2 = this->translucencyOriginal;
0050f977      
0050f97f      this->translucency = arg2;
0050f985      class CPartArray* part_array = this->part_array;
0050f985      
0050f98a      if (part_array == 0)
0050f991          return;
0050f991      
0050f98c      /* tailcall */
0050f98c      return CPartArray::SetTranslucencyInternal(part_array, arg2);
0050f960  }

0050f994                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050f9a0  void __thiscall CPhysicsObj::SetNoDraw(class CPhysicsObj* this, int32_t arg2)

0050f9a0  {
0050f9a0      class CPartArray* part_array = this->part_array;
0050f9a0      
0050f9a5      if (part_array == 0)
0050f9ac          return;
0050f9ac      
0050f9a7      /* tailcall */
0050f9a7      return CPartArray::SetNoDrawInternal(part_array, arg2);
0050f9a0  }

0050f9af                                               90                                                                 .

0050f9b0  int32_t __thiscall CPhysicsObj::DoObjDescChangesFromDefault(class CPhysicsObj* this, class ObjDesc* arg2)

0050f9b0  {
0050f9b3      class CPartArray* part_array = this->part_array;
0050f9b7      int32_t result = 0;
0050f9b7      
0050f9bb      if (part_array != 0)
0050f9c7          result = CPartArray::DoObjDescChangesFromDefault(part_array, arg2);
0050f9c7      
0050f9c9      long double x87_r7 = ((long double)this->translucency);
0050f9cf      long double temp1 = ((long double)0f);
0050f9cf      (x87_r7 - temp1);
0050f9d5      int32_t eax;
0050f9d5      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0050f9d7      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0050f9d7      
0050f9da      if (p)
0050f9da      {
0050f9e2          arg2 = this->translucency;
0050f9e6          long double x87_r7_1 = ((long double)arg2);
0050f9ea          long double temp2_1 = ((long double)this->translucencyOriginal);
0050f9ea          (x87_r7_1 - temp2_1);
0050f9f0          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050f9f2          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050f9f2          
0050f9f5          if (!(p_1))
0050f9fd              arg2 = this->translucencyOriginal;
0050f9fd          
0050fa01          class CPartArray* part_array_1 = this->part_array;
0050fa0a          this->translucency = arg2;
0050fa0a          
0050fa10          if (part_array_1 != 0)
0050fa15              CPartArray::SetTranslucencyInternal(part_array_1, arg2);
0050f9da      }
0050f9da      
0050fa1e      return result;
0050f9b0  }

0050fa21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0050fa30  int32_t __thiscall CPhysicsObj::DoObjDescChanges(class CPhysicsObj* this, class ObjDesc* arg2)

0050fa30  {
0050fa33      class CPartArray* part_array = this->part_array;
0050fa37      int32_t result = 0;
0050fa37      
0050fa3b      if (part_array != 0)
0050fa47          result = CPartArray::DoObjDescChanges(part_array, arg2);
0050fa47      
0050fa49      long double x87_r7 = ((long double)this->translucency);
0050fa4f      long double temp1 = ((long double)0f);
0050fa4f      (x87_r7 - temp1);
0050fa55      int32_t eax;
0050fa55      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0050fa57      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0050fa57      
0050fa5a      if (p)
0050fa5a      {
0050fa62          arg2 = this->translucency;
0050fa66          long double x87_r7_1 = ((long double)arg2);
0050fa6a          long double temp2_1 = ((long double)this->translucencyOriginal);
0050fa6a          (x87_r7_1 - temp2_1);
0050fa70          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050fa72          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050fa72          
0050fa75          if (!(p_1))
0050fa7d              arg2 = this->translucencyOriginal;
0050fa7d          
0050fa81          class CPartArray* part_array_1 = this->part_array;
0050fa8a          this->translucency = arg2;
0050fa8a          
0050fa90          if (part_array_1 != 0)
0050fa95              CPartArray::SetTranslucencyInternal(part_array_1, arg2);
0050fa5a      }
0050fa5a      
0050fa9e      return result;
0050fa30  }

0050faa1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0050fab0  void __thiscall CPhysicsObj::MorphToExistingObject(class CPhysicsObj* this, class CPhysicsObj const* arg2)

0050fab0  {
0050fab8      class CPartArray* part_array_1 = this->part_array;
0050fab8      
0050fac0      if (part_array_1 != 0)
0050fac0      {
0050fac2          class CPartArray* part_array = arg2->part_array;
0050fac2          
0050fac7          if (part_array != 0)
0050faca              CPartArray::MorphToExistingObject(part_array_1, part_array);
0050fac0      }
0050fac0      
0050fad7      this->translucency = arg2->translucencyOriginal;
0050fadd      long double x87_r7 = ((long double)arg2->translucencyOriginal);
0050fae3      this->translucencyOriginal = ((float)x87_r7);
0050fae9      long double x87_r6 = ((long double)this->translucency);
0050faef      long double temp1 = ((long double)0f);
0050faef      (x87_r6 - temp1);
0050faf5      float eax_1;
0050faf5      eax_1 = ((((x87_r6 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0050faf7      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0050faf7      
0050fafa      if (p)
0050fafa      {
0050fb02          arg2 = this->translucency;
0050fb06          long double x87_r6_1 = ((long double)arg2);
0050fb0a          (x87_r6_1 - x87_r7);
0050fb0c          eax_1 = ((((x87_r6_1 < x87_r7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7) ? 1 : 0) << 0xe) | 0x3800))));
0050fb0e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050fb0e          
0050fb11          if (!(p_1))
0050fb13              arg2 = ((float)x87_r7);
0050fb13          
0050fb1b          class CPartArray* part_array_2 = this->part_array;
0050fb20          float edx_1 = arg2;
0050fb24          this->translucency = edx_1;
0050fb24          
0050fb2a          if (part_array_2 != 0)
0050fb2a          {
0050fb2f              CPartArray::SetTranslucencyInternal(part_array_2, edx_1);
0050fb37              this->m_bExaminationObject = 1;
0050fb3d              return;
0050fb2a          }
0050fafa      }
0050fafa      
0050fb45      this->m_bExaminationObject = 1;
0050fab0  }

0050fb4e                                            90 90                                                                ..

0050fb50  void __thiscall CPhysicsObj::SetTranslucency2(class CPhysicsObj* this, float arg2, float arg3, double arg4)

0050fb50  {
0050fb50      long double x87_r7 = ((long double)0.000199999995f);
0050fb57      long double temp1 = ((long double)arg4);
0050fb57      (x87_r7 - temp1);
0050fb57      
0050fb62      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0050fb62      {
0050fba6          void* eax_3 = operator new(0x38);
0050fbb0          class PhysicsObjHook* eax_4;
0050fbb0          
0050fbb0          if (eax_3 == 0)
0050fbe1              eax_4 = nullptr;
0050fbb0          else
0050fbb0          {
0050fbc6              int32_t var_14_1 = *(uint32_t*)((char*)arg4)[4];
0050fbd4              int32_t var_1c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0050fbda              eax_4 = FPHook::FPHook(eax_3, TRANSLUCENCY, (*(uint32_t*)PhysicsTimer::curr_time), arg4, arg2, arg3, nullptr);
0050fbb0          }
0050fbb0          
0050fbe3          class PhysicsObjHook* hooks = this->hooks;
0050fbe3          
0050fbed          for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
0050fbed          {
0050fbed          }
0050fbed          
0050fbf9          if (hooks != 0)
0050fbfb              hooks->prev = eax_4;
0050fbfb          
0050fc04          eax_4->next = this->hooks;
0050fc07          this->hooks = eax_4;
0050fb62      }
0050fb62      else
0050fb62      {
0050fb64          long double x87_r7_1 = ((long double)arg3);
0050fb6c          long double temp2_1 = ((long double)this->translucencyOriginal);
0050fb6c          (x87_r7_1 - temp2_1);
0050fb72          arg2 = arg3;
0050fb76          float eax_1;
0050fb76          eax_1 = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0050fb78          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0050fb78          
0050fb7b          if (!(p_1))
0050fb83              arg2 = this->translucencyOriginal;
0050fb83          
0050fb87          class CPartArray* part_array = this->part_array;
0050fb90          this->translucency = arg2;
0050fb90          
0050fb96          if (part_array != 0)
0050fb9b              CPartArray::SetTranslucencyInternal(part_array, arg2);
0050fb62      }
0050fb50  }

0050fc11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0050fc20  void __thiscall CPhysicsObj::SetTextureVelocity(class CPhysicsObj* this, float arg2, float arg3)

0050fc20  {
0050fc20      class CPartArray* part_array = this->part_array;
0050fc20      
0050fc25      if (part_array == 0)
0050fc2c          return;
0050fc2c      
0050fc27      /* tailcall */
0050fc27      return CPartArray::SetTextureVelocityInternal(part_array, arg2, arg3);
0050fc20  }

0050fc2f                                               90                                                                 .

0050fc30  void __thiscall CPhysicsObj::SetPartTextureVelocity(class CPhysicsObj* this, uint32_t arg2, float arg3, float arg4)

0050fc30  {
0050fc30      class CPartArray* part_array = this->part_array;
0050fc30      
0050fc35      if (part_array == 0)
0050fc3c          return;
0050fc3c      
0050fc37      /* tailcall */
0050fc37      return CPartArray::SetPartTextureVelocityInternal(part_array, arg2, arg3, arg4);
0050fc30  }

0050fc3f                                                                                               90                                 .

0050fc40  int32_t __thiscall CPhysicsObj::set_active(class CPhysicsObj* this, int32_t arg2)

0050fc40  {
0050fc46      if (arg2 == 0)
0050fc46      {
0050fc8d          this->transient_state &= 0xffffff7f;
0050fc9c          return 1;
0050fc46      }
0050fc46      
0050fc4f      if ((this->state & 1) != 0)
0050fc53          return 0;
0050fc53      
0050fc56      uint32_t transient_state = this->transient_state;
0050fc56      
0050fc5e      if (transient_state >= 0)
0050fc5e      {
0050fc6d          *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0050fc73          this->update_time = (*(uint32_t*)Timer::cur_time);
0050fc5e      }
0050fc5e      
0050fc7f      this->transient_state = (transient_state | 0x80);
0050fc8a      return 1;
0050fc40  }

0050fc9f                                                                                               90                                 .

0050fca0  int32_t __thiscall CPhysicsObj::set_nodraw(class CPhysicsObj* this, int32_t arg2, int32_t arg3)

0050fca0  {
0050fca6      uint32_t state = this->state;
0050fca6      
0050fcac      if (arg2 == 0)
0050fcac      {
0050fcd0          this->state = (state & 0xffffffdf);
0050fcd6          class CPartArray* part_array_1 = this->part_array;
0050fcd6          
0050fcdb          if (part_array_1 != 0)
0050fcdf              CPartArray::SetNoDrawInternal(part_array_1, 0);
0050fcac      }
0050fcac      else
0050fcac      {
0050fcb1          this->state = (state | 0x20);
0050fcb7          class CPartArray* part_array = this->part_array;
0050fcb7          
0050fcbc          if (part_array != 0)
0050fcc0              CPartArray::SetNoDrawInternal(part_array, 1);
0050fcac      }
0050fcac      
0050fce9      return 1;
0050fca0  }

0050fcec                                      90 90 90 90                                                              ....

0050fcf0  void __thiscall CPhysicsObj::set_lights(class CPhysicsObj* this, int32_t arg2, int32_t arg3)

0050fcf0  {
0050fcf6      uint32_t state = this->state;
0050fcf6      
0050fcfc      if (arg2 == 0)
0050fcfc      {
0050fd1f          this->state = (state & 0xfffff7ff);
0050fd25          class CPartArray* part_array_1 = this->part_array;
0050fd25          
0050fd2a          if (part_array_1 != 0)
0050fd2c              CPartArray::DestroyLights(part_array_1);
0050fcfc      }
0050fcfc      else
0050fcfc      {
0050fd04          this->state = (state | 0x800);
0050fd0a          class CPartArray* part_array = this->part_array;
0050fd0a          
0050fd0f          if (part_array != 0)
0050fd11              CPartArray::InitLights(part_array);
0050fcfc      }
0050fcf0  }

0050fd34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0050fd40  int32_t __thiscall CPhysicsObj::set_elasticity(class CPhysicsObj* this, float arg2)

0050fd40  {
0050fd44      (((long double)arg2) - ((long double)0.0));
0050fd4c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0050fd4c      
0050fd4f      if (!(p))
0050fd4f      {
0050fd51          this->elasticity = 0f;
0050fd60          return 1;
0050fd4f      }
0050fd4f      
0050fd63      long double x87_r7_1 = ((long double)arg2);
0050fd67      long double temp2 = ((long double)0.100000001f);
0050fd67      (x87_r7_1 - temp2);
0050fd67      
0050fd72      if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0050fd72      {
0050fd8a          this->elasticity = arg2;
0050fd95          return 1;
0050fd72      }
0050fd72      
0050fd74      this->elasticity = 0.100000001f;
0050fd83      return 1;
0050fd40  }

0050fd98                                                                          90 90 90 90 90 90 90 90                          ........

0050fda0  void __fastcall CPhysicsObj::Hook_AnimDone(class CPhysicsObj* this)

0050fda0  {
0050fda0      class CPartArray* part_array = this->part_array;
0050fda0      
0050fda5      if (part_array != 0)
0050fda9          CPartArray::AnimationDone(part_array, 1);
0050fda0  }

0050fdaf                                               90                                                                 .

0050fdb0  void __thiscall CPhysicsObj::MotionDone(class CPhysicsObj* this, uint32_t arg2, int32_t arg3)

0050fdb0  {
0050fdb0      class MovementManager* movement_manager = this->movement_manager;
0050fdb0      
0050fdb8      if (movement_manager == 0)
0050fdbf          return;
0050fdbf      
0050fdba      /* tailcall */
0050fdba      return MovementManager::MotionDone(movement_manager, arg2, arg3);
0050fdb0  }

0050fdc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0050fdd0  void __fastcall CPhysicsObj::report_exhaustion(class CPhysicsObj* this)

0050fdd0  {
0050fdd0      class MovementManager* movement_manager = this->movement_manager;
0050fdd0      
0050fdd8      if (movement_manager == 0)
0050fddf          return;
0050fddf      
0050fdda      /* tailcall */
0050fdda      return MovementManager::ReportExhaustion(movement_manager);
0050fdd0  }


0050fde0  class RawMotionState* __fastcall CPhysicsObj::InqRawMotionState(class CPhysicsObj const* this)

0050fde0  {
0050fde0      class MovementManager* movement_manager = this->movement_manager;
0050fde0      
0050fde8      if (movement_manager != 0)
0050fded          /* tailcall */
0050fded          return MovementManager::InqRawMotionState(movement_manager);
0050fded      
0050fdec      return 0;
0050fde0  }

0050fdf2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050fe00  class InterpretedMotionState* __fastcall CPhysicsObj::InqInterpretedMotionState(class CPhysicsObj const* this)

0050fe00  {
0050fe00      class MovementManager* movement_manager = this->movement_manager;
0050fe00      
0050fe08      if (movement_manager != 0)
0050fe0d          /* tailcall */
0050fe0d          return MovementManager::InqInterpretedMotionState(movement_manager);
0050fe0d      
0050fe0c      return 0;
0050fe00  }

0050fe12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050fe20  void __fastcall CPhysicsObj::RemoveLinkAnimations(class CPhysicsObj* this)

0050fe20  {
0050fe20      class CPartArray* part_array = this->part_array;
0050fe20      
0050fe25      if (part_array == 0)
0050fe2c          return;
0050fe2c      
0050fe27      /* tailcall */
0050fe27      return CPartArray::HandleEnterWorld(part_array);
0050fe20  }

0050fe2d                                         90 90 90                                                               ...

0050fe30  void __fastcall CPhysicsObj::CheckForCompletedMotions(class CPhysicsObj* this)

0050fe30  {
0050fe30      class CPartArray* part_array = this->part_array;
0050fe30      
0050fe35      if (part_array == 0)
0050fe3c          return;
0050fe3c      
0050fe37      /* tailcall */
0050fe37      return CPartArray::CheckForCompletedMotions(part_array);
0050fe30  }

0050fe3d                                                                                         90 90 90                               ...

0050fe40  uint8_t __thiscall CPhysicsObj::GetBoundingBox(class CPhysicsObj const* this, class BBox* arg2)

0050fe40  {
0050fe40      class CPartArray* part_array = this->part_array;
0050fe40      
0050fe45      if (part_array == 0)
0050fe45      {
0050fe56          int32_t eax;
0050fe56          eax = 0;
0050fe58          return 0;
0050fe45      }
0050fe45      
0050fe4c      CPartArray::GetBoundingBox(part_array, arg2);
0050fe51      int32_t eax_2;
0050fe51      eax_2 = 1;
0050fe53      return 1;
0050fe40  }

0050fe5b                                                                                   90 90 90 90 90                             .....

0050fe60  uint8_t __thiscall CPhysicsObj::ShouldDrawParticles(class CPhysicsObj const* this, float arg2)

0050fe60  {
0050fe60      int32_t eax;
0050fe60      eax = this->m_bExaminationObject;
0050fe60      
0050fe65      if (eax == 0)
0050fe65      {
0050fe67          long double x87_r7_1 = ((long double)this->CYpt);
0050fe6a          long double temp1_1 = ((long double)arg2);
0050fe6a          (x87_r7_1 - temp1_1);
0050fe6e          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0050fe6e          
0050fe73          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0050fe73          {
0050fe8d              eax = 0;
0050fe8f              return 0;
0050fe73          }
0050fe73          
0050fe75          class CObjCell* cell = this->cell;
0050fe75          
0050fe7d          if (cell == 0)
0050fe7d          {
0050fe8d              eax = 0;
0050fe8f              return 0;
0050fe7d          }
0050fe7d          
0050fe86          if (cell->vtable->IsInView() == 0)
0050fe86          {
0050fe8d              eax = 0;
0050fe8f              return 0;
0050fe86          }
0050fe65      }
0050fe65      
0050fe88      eax = 1;
0050fe8a      return 1;
0050fe60  }

0050fe92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0050fea0  int32_t __fastcall AC1Legacy::SmartArray<CAnimHook *>::shrink(class AC1Legacy::SmartArray<CAnimHook *>* this)

0050fea0  {
0050fea3      uint32_t m_num = this->m_num;
0050fea3      
0050fea9      if (m_num == this->m_size)
0050feae          return 0;
0050feae      
0050feb2      void* edi;
0050feb2      
0050feb2      if (m_num <= 0)
0050fee2          edi = nullptr;
0050feb2      else
0050feb2      {
0050febd          edi = operator new[]((m_num << 2));
0050fec2          int32_t i = 0;
0050fec2          
0050fec6          if (edi == 0)
0050fefe              return i;
0050fefe          
0050fecd          if (this->m_num > 0)
0050fecd          {
0050fede              do
0050fede              {
0050fed5                  *(uint32_t*)((char*)edi + (i << 2)) = this->m_data[i];
0050fedb                  i += 1;
0050fede              } while (i < this->m_num);
0050fecd          }
0050feb2      }
0050feb2      
0050fee7      operator delete[](this->m_data);
0050feec      uint32_t m_num_1 = this->m_num;
0050fef2      this->m_data = edi;
0050fef4      this->m_size = m_num_1;
0050fef7      return 1;
0050fea0  }

0050feff                                                                                               90                                 .

0050ff00  void __fastcall CShadowObj::CShadowObj(class CShadowObj* this)

0050ff00  {
0050ff04      __builtin_memset(&this->hash_next, 0, 0x14);
0050ff0a      this->vtable = 0x7c6b40;
0050ff00  }

0050ff1a                                                                                90 90 90 90 90 90                            ......

0050ff20  void __thiscall CTransition::init_sliding_normal(class CTransition* this, class AC1Legacy::Vector3 const* arg2)

0050ff20  {
0050ff27      this->collision_info.sliding_normal_valid = 1;
0050ff34      this->collision_info.sliding_normal.x = arg2->x;
0050ff41      this->collision_info.sliding_normal.y = arg2->y;
0050ff47      this->collision_info.sliding_normal.z = 0f;
0050ff47      
0050ff58      if (AC1Legacy::Vector3::normalize_check_small(&this->collision_info.sliding_normal.x) != 0)
0050ff58      {
0050ff34          this->collision_info.sliding_normal.x = 0f;
0050ff60          this->collision_info.sliding_normal.y = 0f;
0050ff6a          this->collision_info.sliding_normal.z = 0f;
0050ff58      }
0050ff20  }

0050ff79                                                                             90 90 90 90 90 90 90                           .......

0050ff80  int32_t __thiscall CPhysicsObj::InitObjectBegin(class CPhysicsObj* this, uint32_t arg2, int32_t arg3)

0050ff80  {
0050ff88      this->id = arg2;
0050ff8d      uint32_t state = this->state;
0050ff98      uint32_t edx_1;
0050ff98      
0050ff98      if (arg3 == 0)
0050ff9f          edx_1 = (state | 1);
0050ff98      else
0050ff9a          edx_1 = (state & 0xfffffffe);
0050ff9a      
0050ffa1      this->state = edx_1;
0050ffb4      this->transient_state &= 0xffffff7f;
0050ffc6      *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0050ffcc      this->update_time = (*(uint32_t*)Timer::cur_time);
0050ffd3      return arg2;
0050ff80  }

0050ffd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0050ffe0  int32_t __fastcall CPhysicsObj::InitObjectEnd(class CPhysicsObj* this)

0050ffe0  {
0050ffe3      class CPartArray* part_array = this->part_array;
0050ffe3      
0050ffe8      if (part_array != 0)
0050ffec          CPartArray::SetPlacementFrame(part_array, 0x65);
0050ffec      
0050fffa      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
0050fffa      {
0050fffc          class CPartArray* part_array_1 = this->part_array;
0050fffc          
00510001          if (part_array_1 != 0)
00510007              CPartArray::SetFrame(part_array_1, &this->m_position.frame);
0050fffa      }
0050fffa      
00510012      return 1;
0050ffe0  }

00510013                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00510020  uint32_t __thiscall CPhysicsObj::DoMotion(class CPhysicsObj* this, uint32_t arg2, class MovementParameters const* arg3, int32_t arg4)

00510020  {
0051002e      bool cond:0 = this->movement_manager != 0;
00510030      this->last_move_was_autonomous = 1;
00510030      
0051003a      if (!(cond:0))
00510045          return 7;
00510045      
0051004c      int32_t var_64 = 0;
00510050      int32_t var_54 = 0x796910;
00510058      int32_t var_50 = 0;
0051005c      int32_t var_4c = 0x3f800000;
00510064      int32_t var_48 = 0;
0051006c      int32_t var_44 = 0;
00510074      int32_t var_40 = 0;
0051007c      int32_t var_18 = 0;
00510084      int32_t var_14 = 0;
0051008c      int32_t var_10 = 0;
00510094      Frame::cache(&var_4c);
005100a5      class MovementParameters* var_4 = arg3;
005100a9      class MovementManager* movement_manager = this->movement_manager;
005100b0      var_64 = 1;
005100b8      uint32_t var_60 = arg2;
005100c5      return MovementManager::PerformMovement(movement_manager, &var_64);
00510020  }

005100c8                          90 90 90 90 90 90 90 90                                                          ........

005100d0  uint32_t __thiscall CPhysicsObj::StopMotion(class CPhysicsObj* this, uint32_t arg2, class MovementParameters const* arg3, int32_t arg4)

005100d0  {
005100de      bool cond:0 = this->movement_manager != 0;
005100e0      this->last_move_was_autonomous = 1;
005100e0      
005100ea      if (!(cond:0))
005100f5          return 7;
005100f5      
005100fc      int32_t var_64 = 0;
00510100      int32_t var_54 = 0x796910;
00510108      int32_t var_50 = 0;
0051010c      int32_t var_4c = 0x3f800000;
00510114      int32_t var_48 = 0;
0051011c      int32_t var_44 = 0;
00510124      int32_t var_40 = 0;
0051012c      int32_t var_18 = 0;
00510134      int32_t var_14 = 0;
0051013c      int32_t var_10 = 0;
00510144      Frame::cache(&var_4c);
00510155      class MovementParameters* var_4 = arg3;
00510159      class MovementManager* movement_manager = this->movement_manager;
00510160      var_64 = 3;
00510168      uint32_t var_60 = arg2;
00510175      return MovementManager::PerformMovement(movement_manager, &var_64);
005100d0  }

00510178                                                                          90 90 90 90 90 90 90 90                          ........

00510180  void __fastcall CPhysicsObj::StopCompletely(class CPhysicsObj* this, int32_t arg2)

00510180  {
00510190      if (this->movement_manager != 0)
00510190      {
00510196          int32_t var_64 = 0;
0051019a          int32_t var_54_1 = 0x796910;
005101a2          int32_t var_50_1 = 0;
005101a6          int32_t var_4c = 0x3f800000;
005101ae          int32_t var_48_1 = 0;
005101b2          int32_t var_44_1 = 0;
005101b6          int32_t var_40_1 = 0;
005101ba          int32_t var_18_1 = 0;
005101be          int32_t var_14_1 = 0;
005101c2          int32_t var_10_1 = 0;
005101c6          Frame::cache(&var_4c);
005101cb          class MovementManager* movement_manager = this->movement_manager;
005101d6          var_64 = 5;
005101de          MovementManager::PerformMovement(movement_manager, &var_64);
00510190      }
00510180  }

005101ea                                90 90 90 90 90 90                                                            ......

005101f0  void __fastcall CPhysicsObj::interrupt_current_movement(class CPhysicsObj* this)

005101f0  {
005101f0      class MovementManager* movement_manager = this->movement_manager;
005101f0      
005101f8      if (movement_manager != 0)
005101f8      {
005101fa          int32_t var_4_1 = 0x36;
005101fc          uint32_t edx;
005101fc          MovementManager::CancelMoveTo(movement_manager, edx);
005101f8      }
005101f0  }

00510202        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00510210  void __fastcall CPhysicsObj::MakePositionManager(class CPhysicsObj* this)

00510210  {
0051021b      if (this->position_manager == 0)
00510226          this->position_manager = PositionManager::Create(this);
00510226      
00510233      if ((this->state & 1) == 0)
00510233      {
00510235          uint32_t transient_state = this->transient_state;
00510235          
0051023d          if (transient_state >= 0)
0051023d          {
0051024b              this->update_time = (*(uint32_t*)Timer::cur_time);
00510251              *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051023d          }
0051023d          
0051025c          this->transient_state = (transient_state | 0x80);
00510233      }
00510210  }

00510264              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00510270  void __thiscall CPhysicsObj::MakeMovementManager(class CPhysicsObj* this, int32_t arg2)

00510270  {
0051027b      if (this->movement_manager == 0)
0051027b      {
00510285          class MovementManager* eax_2 = MovementManager::Create(this, this->weenie_obj);
00510293          this->movement_manager = eax_2;
00510293          
00510299          if (arg2 != 0)
0051029d              MovementManager::EnterDefaultState(eax_2);
0051029d          
005102a9          if ((this->state & 1) == 0)
005102a9          {
005102ab              uint32_t transient_state = this->transient_state;
005102ab              
005102b3              if (transient_state >= 0)
005102b3              {
005102c1                  this->update_time = (*(uint32_t*)Timer::cur_time);
005102c7                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005102b3              }
005102b3              
005102d2              this->transient_state = (transient_state | 0x80);
005102a9          }
0051027b      }
00510270  }

005102dc                                                                                      90 90 90 90                              ....

005102e0  void __thiscall CPhysicsObj::MoveToObject_Internal(class CPhysicsObj* this, uint32_t arg2, uint32_t arg3, float arg4, float arg5, class MovementParameters const* arg6)

005102e0  {
005102ee      if (this->movement_manager == 0)
005102ee      {
005102f8          class MovementManager* eax_2 = MovementManager::Create(this, this->weenie_obj);
00510302          this->movement_manager = eax_2;
00510308          MovementManager::EnterDefaultState(eax_2);
00510308          
00510314          if ((this->state & 1) == 0)
00510314          {
00510316              uint32_t transient_state = this->transient_state;
00510316              
0051031e              if (transient_state >= 0)
0051031e              {
0051032c                  this->update_time = (*(uint32_t*)Timer::cur_time);
00510332                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051031e              }
0051031e              
0051033d              this->transient_state = (transient_state | 0x80);
00510314          }
005102ee      }
005102ee      
00510347      int32_t var_64 = 0;
0051034f      int32_t var_54 = 0x796910;
00510357      int32_t var_50 = 0;
0051035f      int32_t var_4c = 0x3f800000;
00510367      int32_t var_48 = 0;
0051036f      int32_t var_44 = 0;
00510377      int32_t var_40 = 0;
0051037f      int32_t var_18 = 0;
00510387      int32_t var_14 = 0;
0051038f      int32_t var_10 = 0;
00510397      Frame::cache(&var_4c);
005103a8      uint32_t var_58 = arg3;
005103b0      float var_c = arg4;
005103b4      uint32_t var_5c = arg2;
005103c0      class MovementParameters* var_4 = arg6;
005103c4      class MovementManager* movement_manager = this->movement_manager;
005103cb      var_64 = 6;
005103d3      float var_8 = arg5;
005103d7      MovementManager::PerformMovement(movement_manager, &var_64);
005102e0  }

005103e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005103f0  void __thiscall CPhysicsObj::TurnToObject_Internal(class CPhysicsObj* this, uint32_t arg2, uint32_t arg3, class MovementParameters const* arg4)

005103f0  {
005103fe      if (this->movement_manager == 0)
005103fe      {
00510408          class MovementManager* eax_2 = MovementManager::Create(this, this->weenie_obj);
00510412          this->movement_manager = eax_2;
00510418          MovementManager::EnterDefaultState(eax_2);
00510418          
00510424          if ((this->state & 1) == 0)
00510424          {
00510426              uint32_t transient_state = this->transient_state;
00510426              
0051042e              if (transient_state >= 0)
0051042e              {
0051043c                  this->update_time = (*(uint32_t*)Timer::cur_time);
00510442                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051042e              }
0051042e              
0051044d              this->transient_state = (transient_state | 0x80);
00510424          }
005103fe      }
005103fe      
00510457      int32_t var_64 = 0;
0051045f      int32_t var_54 = 0x796910;
00510467      int32_t var_50 = 0;
0051046f      int32_t var_4c = 0x3f800000;
00510477      int32_t var_48 = 0;
0051047f      int32_t var_44 = 0;
00510487      int32_t var_40 = 0;
0051048f      int32_t var_18 = 0;
00510497      int32_t var_14 = 0;
0051049f      int32_t var_10 = 0;
005104a7      Frame::cache(&var_4c);
005104b8      uint32_t var_5c = arg2;
005104c0      uint32_t var_58 = arg3;
005104c4      class MovementManager* movement_manager = this->movement_manager;
005104cb      var_64 = 8;
005104d3      class MovementParameters* var_4 = arg4;
005104d7      MovementManager::PerformMovement(movement_manager, &var_64);
005103f0  }

005104e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005104f0  void __thiscall CPhysicsObj::InterpolateTo(class CPhysicsObj* this, class Position const* arg2, int32_t arg3)

005104f0  {
005104f3      CPhysicsObj::MakePositionManager(this);
00510508      PositionManager::InterpolateTo(this->position_manager, arg2, arg3);
005104f0  }

00510511                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00510520  void __thiscall CPhysicsObj::ConstrainTo(class CPhysicsObj* this, class Position const* arg2, float arg3, float arg4)

00510520  {
00510523      CPhysicsObj::MakePositionManager(this);
00510528      class PositionManager* position_manager = this->position_manager;
00510528      
00510531      if (position_manager == 0)
00510538          return;
00510538      
00510533      /* tailcall */
00510533      return PositionManager::ConstrainTo(position_manager, arg2, arg3, arg4);
00510520  }

0051053b                                                                                   90 90 90 90 90                             .....

00510540  void __thiscall CPhysicsObj::report_attacks(class CPhysicsObj* this, class AttackInfo* arg2)

00510540  {
00510546      class CWeenieObject* weenie_obj = this->weenie_obj;
00510546      
0051054f      if (weenie_obj != 0)
00510551          weenie_obj->vtable->ResetCollisions();
00510551      
0051055e      int32_t i = 0;
0051055e      
00510562      if (arg2->num_objects > 0)
00510562      {
005105a8          do
005105a8          {
00510570              void* esi_1 = &arg2->object_list.data[i];
00510570              
00510573              if (this->weenie_obj != 0)
00510573              {
00510579                  int32_t part_index;
00510579                  AtkCollisionProfile::AtkCollisionProfile(&part_index);
00510586                  int32_t var_8_1 = *(uint32_t*)esi_1;
0051058a                  int32_t var_4_1 = *(uint32_t*)((char*)esi_1 + 4);
0051058e                  class CWeenieObject* weenie_obj_1 = this->weenie_obj;
00510598                  part_index = arg2->part_index;
0051059c                  weenie_obj_1->vtable->DoCollision(&part_index);
00510573              }
00510573              
005105a5              i += 1;
005105a8          } while (i < arg2->num_objects);
00510562      }
00510562      
005105ab      class AttackManager* attack_manager = this->attack_manager;
005105ab      
005105b4      if (attack_manager != 0)
005105b9          AttackManager::AttackDone(attack_manager, arg2);
00510540  }

005105c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005105d0  void __thiscall CPhysicsObj::receive_detection_update(class CPhysicsObj* this, class DetectionInfo const* arg2)

005105d0  {
005105d3      class DetectionManager* detection_manager = this->detection_manager;
005105d3      
005105db      if (detection_manager != 0)
005105db      {
005105e2          DetectionManager::ReceiveDetectionUpdate(detection_manager, arg2);
005105e2          
005105ee          if ((this->state & 1) == 0)
005105ee          {
005105f0              uint32_t transient_state = this->transient_state;
005105f0              
005105f8              if (transient_state >= 0)
005105f8              {
00510606                  this->update_time = (*(uint32_t*)Timer::cur_time);
0051060c                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005105f8              }
005105f8              
00510617              this->transient_state = (transient_state | 0x80);
005105ee          }
005105db      }
005105d0  }

00510621     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00510630  void __thiscall TargetInfo::TargetInfo(class TargetInfo* this, class TargetInfo const* arg2)

00510630  {
0051063a      this->context_id = arg2->context_id;
0051063f      this->object_id = arg2->object_id;
00510645      this->radius = arg2->radius;
0051064b      this->quantum = arg2->quantum;
00510651      *(uint32_t*)((char*)this->quantum)[4] = *(uint32_t*)((char*)arg2->quantum)[4];
00510654      this->target_position.vtable = 0x796910;
00510665      this->target_position.objcell_id = arg2->target_position.objcell_id;
00510668      Frame::operator=(&this->target_position.frame, &arg2->target_position.frame);
0051066d      this->interpolated_position.vtable = 0x796910;
0051067a      this->interpolated_position.objcell_id = arg2->interpolated_position.objcell_id;
00510681      Frame::operator=(&this->interpolated_position.frame, &arg2->interpolated_position.frame);
0051068c      this->interpolated_heading.x = arg2->interpolated_heading.x;
00510698      this->interpolated_heading.y = arg2->interpolated_heading.y;
005106a4      this->interpolated_heading.z = arg2->interpolated_heading.z;
005106b0      this->velocity.x = arg2->velocity.x;
005106bc      this->velocity.y = arg2->velocity.y;
005106c8      this->velocity.z = arg2->velocity.z;
005106d4      this->status = arg2->status;
005106e0      this->last_update_time = arg2->last_update_time;
005106ed      *(uint32_t*)((char*)this->last_update_time)[4] = *(uint32_t*)((char*)arg2->last_update_time)[4];
00510630  }

005106f9                                                                             90 90 90 90 90 90 90                           .......

00510700  void __thiscall CPhysicsObj::UpdatePhysicsInternal(class CPhysicsObj* this, float arg2, class Frame* arg3)

00510700  {
00510708      long double x87_r7 = ((long double)this->m_velocityVector.z);
00510714      long double x87_r6 = ((long double)this->m_velocityVector.y);
00510717      class Frame* ebx = arg3;
0051071b      long double x87_r5 = ((long double)this->m_velocityVector.x);
0051072d      float var_28 = ((float)(((x87_r5 * x87_r5) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7)));
00510737      long double x87_r7_2 = ((long double)var_28);
0051073b      long double temp1 = ((long double)0f);
0051073b      (x87_r7_2 - temp1);
00510746      float var_18;
00510746      
00510746      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00510746      {
00510758          arg3 = ((float)(((long double)50f) * ((long double)50f)));
0051075c          long double x87_r7_5 = ((long double)var_28);
00510760          long double temp2_1 = ((long double)arg3);
00510760          (x87_r7_5 - temp2_1);
00510760          
00510769          if ((*(uint8_t*)((char*)((((x87_r7_5 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00510769          {
00510772              void __return;
00510772              AC1Legacy::Vector3::normalize(&this->m_velocityVector, &__return);
00510783              var_28 = arg3;
0051070e              this->m_velocityVector.x = ((float)(((long double)50f) * ((long double)this->m_velocityVector.x)));
0051070e              this->m_velocityVector.y = ((float)(((long double)50f) * ((long double)this->m_velocityVector.y)));
0051070e              this->m_velocityVector.z = ((float)(((long double)50f) * ((long double)this->m_velocityVector.z)));
00510769          }
00510769          
005107ad          CPhysicsObj::calc_friction(this, arg2, var_28);
005107be          long double x87_r7_14 = (((long double)var_28) - (((long double)0.25f) * ((long double)0.25f)));
005107c2          long double temp3_1 = ((long double)0.000199999995f);
005107c2          (x87_r7_14 - temp3_1);
005107c8          int32_t eax_2;
005107c8          eax_2 = ((((x87_r7_14 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_14, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_14 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005107ca          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005107ca          
005107cd          if (!(p_1))
005107cd          {
0051070e              this->m_velocityVector.x = 0;
0051070e              this->m_velocityVector.y = 0f;
0051070e              this->m_velocityVector.z = 0f;
005107cd          }
005107cd          
0051084d          float var_20_1 = ((float)(((((long double)this->m_accelerationVector.y) * ((long double)0.5f)) * ((long double)arg2)) * ((long double)arg2)));
00510851          long double x87_r7_20 = ((((long double)((float)(((long double)this->m_accelerationVector.z) * ((long double)0.5f)))) * ((long double)arg2)) * ((long double)arg2));
00510869          float var_4_1 = ((float)(((long double)arg2) * ((long double)this->m_velocityVector.z)));
00510873          var_18 = ((float)((((long double)arg2) * ((long double)this->m_velocityVector.x)) + ((long double)((float)(((long double)((float)((((long double)this->m_accelerationVector.x) * ((long double)0.5f)) * ((long double)arg2)))) * ((long double)arg2))))));
0051088c          ebx->m_fOrigin.x = ((float)(((long double)var_18) + ((long double)ebx->m_fOrigin.x)));
00510892          ebx->m_fOrigin.y = ((float)(((((long double)arg2) * ((long double)this->m_velocityVector.y)) + ((long double)var_20_1)) + ((long double)ebx->m_fOrigin.y)));
0051089e          ebx->m_fOrigin.z = ((float)(((long double)((float)(((long double)var_4_1) + x87_r7_20))) + ((long double)ebx->m_fOrigin.z)));
00510746      }
00510746      else if (this->movement_manager == 0)
005108ab      {
005108ad          uint32_t transient_state = this->transient_state;
005108ad          
005108b5          if ((transient_state & 2) != 0)
005108bc              this->transient_state = (transient_state & 0xffffff7f);
005108ab      }
005108ab      
0051070e      this->m_velocityVector.x = ((float)((((long double)arg2) * ((long double)this->m_accelerationVector.x)) + ((long double)this->m_velocityVector.x)));
0051070e      this->m_velocityVector.y = ((float)((((long double)arg2) * ((long double)this->m_accelerationVector.y)) + ((long double)this->m_velocityVector.y)));
0051070e      this->m_velocityVector.z = ((float)(((long double)((float)(((long double)arg2) * ((long double)this->m_accelerationVector.z)))) + ((long double)this->m_velocityVector.z)));
0051090f      long double x87_r6_20 = (((long double)arg2) * ((long double)this->m_omegaVector.y));
00510929      float var_10_3 = ((float)(((long double)arg2) * ((long double)this->m_omegaVector.z)));
0051092d      var_18 = ((float)(((long double)arg2) * ((long double)this->m_omegaVector.x)));
00510931      float var_14 = ((float)x87_r6_20);
00510935      Frame::grotate(ebx, &var_18);
00510700  }

00510943           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00510950  void __fastcall CPhysicsObj::calc_acceleration(class CPhysicsObj* this)

00510950  {
00510950      uint8_t transient_state = ((int8_t)this->transient_state);
00510950      
0051096b      if (((transient_state & 1) != 0 && ((transient_state & 2) != 0 && (this->state & "activation type (%s) with '%s' b…") == 0)))
0051096b      {
0051096d          this->m_accelerationVector.x = 0;
0051096d          this->m_accelerationVector.y = 0f;
0051096d          this->m_accelerationVector.z = 0f;
005109ab          this->m_omegaVector.x = 0;
005109ab          this->m_omegaVector.y = 0f;
005109ab          this->m_omegaVector.z = 0f;
005109d4          return;
0051096b      }
0051096b      
005109f4      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 4) == 0)
005109f4      {
005109db          this->m_accelerationVector.x = 0;
005109db          this->m_accelerationVector.y = 0f;
005109db          this->m_accelerationVector.z = 0f;
00510a37          return;
005109f4      }
005109f4      
005109db      this->m_accelerationVector.x = 0;
005109db      this->m_accelerationVector.y = 0f;
005109db      this->m_accelerationVector.z = PhysicsGlobals::gravity;
00510950  }

00510a38                                                                          90 90 90 90 90 90 90 90                          ........

00510a40  int32_t __fastcall CPhysicsObj::ethereal_check_for_collisions(class CPhysicsObj* this)

00510a40  {
00510a4a      int32_t i = 0;
00510a4a      
00510a4f      if (this->num_shadow_objects > 0)
00510a4f      {
00510a51          int32_t edi_1 = 0;
00510a51          
00510a77          do
00510a77          {
00510a59              class CObjCell* ecx = *(uint32_t*)(&this->shadow_objects.data->cell + edi_1);
00510a59              
00510a5f              if ((ecx != 0 && CObjCell::check_collisions(ecx, this) != 0))
00510a87                  return 1;
00510a87              
00510a71              i += 1;
00510a72              edi_1 += 0x18;
00510a77          } while (i < this->num_shadow_objects);
00510a4f      }
00510a4f      
00510a7e      return 0;
00510a40  }

00510a88                          90 90 90 90 90 90 90 90                                                          ........

00510a90  int32_t __thiscall CPhysicsObj::report_object_collision_end(class CPhysicsObj* this, uint32_t const arg2)

00510a90  {
00510a9a      class CObjectMaint* CPhysicsObj::obj_maint_1 = CPhysicsObj::obj_maint;
00510a9a      
00510aa4      if (CPhysicsObj::obj_maint_1 != 0)
00510aa4      {
00510aac          class CPhysicsObj* esi_1 = CObjectMaint::GetObjectA(CPhysicsObj::obj_maint_1, arg2);
00510aac          
00510ab0          if (esi_1 != 0)
00510ab0          {
00510abc              if ((esi_1->state & 0x200000) == 0)
00510abc              {
00510abe                  class CPhysicsObj* eax_1;
00510abe                  eax_1 = this->state;
00510abe                  
00510ac8                  if ((8 & eax_1) != 0)
00510ac8                  {
00510aca                      class CWeenieObject* weenie_obj = this->weenie_obj;
00510aca                      
00510ad2                      if (weenie_obj != 0)
00510ad4                          weenie_obj->vtable->DoCollisionEnd(arg2);
00510ac8                  }
00510ac8                  
00510ae0                  if ((esi_1->state & 8) != 0)
00510ae0                  {
00510ae2                      class CWeenieObject* weenie_obj_1 = esi_1->weenie_obj;
00510ae2                      
00510aea                      if (weenie_obj_1 != 0)
00510aef                          weenie_obj_1->vtable->DoCollisionEnd(this->id);
00510ae0                  }
00510abc              }
00510abc              
00510afe              return 1;
00510ab0          }
00510aa4      }
00510aa4      
00510b08      if ((this->state & 8) != 0)
00510b08      {
00510b0a          class CWeenieObject* weenie_obj_2 = this->weenie_obj;
00510b0a          
00510b12          if (weenie_obj_2 != 0)
00510b14              weenie_obj_2->vtable->DoCollisionEnd(arg2);
00510b08      }
00510b08      
00510b20      return 0;
00510a90  }

00510b23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00510b30  void __fastcall CPhysicsObj::UpdateViewerDistance(class CPhysicsObj* this)

00510b30  {
00510b3f      float var_1c;
00510b3f      
00510b3f      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00510b52          var_1c = Render::object_distance_2dsq;
00510b3f      else
00510b46          var_1c = Render::particle_distance_2dsq;
00510b46      
00510b64      float __return;
00510b64      Position::get_offset(&Render::viewer_pos, &__return, &this->m_position);
00510b6d      float var_14;
00510b6d      long double x87_r7_1 = (((long double)var_14) * ((long double)var_14));
00510b75      long double x87_r6_1 = (((long double)__return) * ((long double)__return));
00510b87      float var_10;
00510b87      float var_20 = ((float)sqrtl((((((long double)var_10) * ((long double)var_10)) + x87_r6_1) + x87_r7_1)));
00510b91      this->CYpt = var_20;
00510b94      ((x87_r6_1 + x87_r7_1) - ((long double)var_1c));
00510b9c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00510b9c      
00510b9f      if (!(p))
00510b9f      {
00510ba1          class CPartArray* part_array = this->part_array;
00510ba1          
00510ba6          if (part_array != 0)
00510bac              CPartArray::UpdateViewerDistance(part_array);
00510bac          
00510ba6          return;
00510b9f      }
00510b9f      
00510bb6      long double x87_r7_2 = ((long double)var_20);
00510bba      long double temp2_1 = ((long double)0.000199999995f);
00510bba      (x87_r7_2 - temp2_1);
00510bc5      float __return_1;
00510bc5      float var_8_1;
00510bc5      float var_4_1;
00510bc5      
00510bc5      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00510bc5      {
00510bf9          __return_1 = 0f;
00510c01          var_8_1 = 0f;
00510c09          var_4_1 = 1f;
00510bc5      }
00510bc5      else
00510bc5      {
00510bcd          long double x87_r7_4 = (((long double)1f) / ((long double)var_20));
00510beb          var_4_1 = ((float)(x87_r7_4 * ((long double)var_10)));
00510bef          __return_1 = ((float)(((long double)__return) * x87_r7_4));
00510bf3          var_8_1 = ((float)(x87_r7_4 * ((long double)var_14)));
00510bc5      }
00510bc5      
00510c1d      float var_14_1 = var_8_1;
00510c21      class CPartArray* part_array_1 = this->part_array;
00510c26      __return = __return_1;
00510c2a      float var_10_2 = var_4_1;
00510c2a      
00510c2e      if (part_array_1 != 0)
00510c3a          CPartArray::UpdateViewerDistance(part_array_1, var_20, &__return);
00510b30  }

00510c44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00510c50  void __fastcall CPhysicsObj::UpdateViewerDistanceRecursive(class CPhysicsObj* this)

00510c50  {
00510c53      CPhysicsObj::UpdateViewerDistance(this);
00510c58      class CHILDLIST* children = this->children;
00510c58      
00510c5d      if (children != 0)
00510c5d      {
00510c60          int32_t esi_1 = 0;
00510c60          
00510c65          if (children->num_objects > 0)
00510c65          {
00510c80              do
00510c80              {
00510c6d                  class CPhysicsObj* ecx_1 = children->objects.data[((uint32_t)esi_1)];
00510c6d                  
00510c72                  if (ecx_1 != 0)
00510c74                      CPhysicsObj::UpdateViewerDistanceRecursive(ecx_1);
00510c74                  
00510c79                  children = this->children;
00510c7c                  esi_1 += 1;
00510c80              } while (esi_1 < children->num_objects);
00510c65          }
00510c5d      }
00510c50  }

00510c85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00510c90  void __fastcall CPhysicsObj::DrawRecursive(class CPhysicsObj* this)

00510c90  {
00510c93      class CPartArray* part_array = this->part_array;
00510c93      
00510c98      if (part_array != 0)
00510c98      {
00510c9d          class Position* __saved_esi_1 = &this->m_position;
00510c9e          class Position* edx;
00510c9e          CPartArray::Draw(part_array, edx);
00510c98      }
00510c98      
00510ca3      class CHILDLIST* children = this->children;
00510ca3      
00510ca8      if (children != 0)
00510ca8      {
00510cab          int32_t esi_1 = 0;
00510cab          
00510cb0          if (children->num_objects > 0)
00510cb0          {
00510ccb              do
00510ccb              {
00510cb8                  class CPhysicsObj* ecx_1 = children->objects.data[((uint32_t)esi_1)];
00510cb8                  
00510cbd                  if (ecx_1 != 0)
00510cbf                      CPhysicsObj::DrawRecursive(ecx_1);
00510cbf                  
00510cc4                  children = this->children;
00510cc7                  esi_1 += 1;
00510ccb              } while (esi_1 < children->num_objects);
00510cb0          }
00510ca8      }
00510c90  }


00510cd0  int32_t __thiscall CPhysicsObj::play_script_internal(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2)

00510cd0  {
00510cda      if (arg2 == 0)
00510ce0          return 0;
00510ce0      
00510ceb      if (this->script_manager == 0)
00510ceb      {
00510cef          void* eax_2 = operator new(0x18);
00510cf9          class ScriptManager* eax_3;
00510cf9          
00510cf9          if (eax_2 == 0)
00510d05              eax_3 = nullptr;
00510cf9          else
00510cfe              eax_3 = ScriptManager::ScriptManager(eax_2, this);
00510cfe          
00510d07          this->script_manager = eax_3;
00510ceb      }
00510ceb      
00510d0a      class ScriptManager* script_manager = this->script_manager;
00510d0a      
00510d0f      if (script_manager == 0)
00510d1e          return 0;
00510d1e      
00510d17      return ScriptManager::AddScript(script_manager, arg2);
00510cd0  }

00510d21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00510d30  int32_t __thiscall CPhysicsObj::play_script(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2)

00510d30  {
00510d38      if (this->cell != 0)
00510d42          /* tailcall */
00510d42          return CPhysicsObj::play_script_internal(this, arg2);
00510d42      
00510d3f      return 1;
00510d30  }

00510d47                       90 90 90 90 90 90 90 90 90                                                         .........

00510d50  void __fastcall CPhysicsObj::destroy_particle_manager(class CPhysicsObj* this)

00510d50  {
00510d54      class ParticleManager* particle_manager = this->particle_manager;
00510d54      
00510d5c      if (particle_manager != 0)
00510d5c      {
00510d60          ParticleManager::~ParticleManager(particle_manager);
00510d66          operator delete(particle_manager);
00510d6e          this->particle_manager = nullptr;
00510d5c      }
00510d50  }

00510d7b                                                                                   90 90 90 90 90                             .....

00510d80  int32_t __thiscall CPhysicsObj::get_landscape_coord(class CPhysicsObj const* this, int32_t* arg2, int32_t* arg3)

00510d80  {
00510d96      return LandDefs::gid_to_lcoord(this->m_position.objcell_id, arg2, arg3);
00510d80  }

00510d99                                                                             90 90 90 90 90 90 90                           .......

00510da0  void __thiscall CPhysicsObj::set_cell_id_recursive(class CPhysicsObj* this, uint32_t arg2)

00510da0  {
00510db1      this->m_position.objcell_id = arg2;
00510db1      
00510db4      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00510db4      {
00510db6          class CPartArray* part_array = this->part_array;
00510db6          
00510dbb          if (part_array != 0)
00510dbe              CPartArray::SetCellID(part_array, arg2);
00510db4      }
00510db4      
00510dc3      class CHILDLIST* children = this->children;
00510dc3      
00510dc8      if (children != 0)
00510dc8      {
00510dcb          int32_t edi_1 = 0;
00510dcb          
00510dd0          if (children->num_objects > 0)
00510dd0          {
00510def              do
00510def              {
00510ddb                  class CPhysicsObj* ecx_1 = this->children->objects.data[((uint32_t)edi_1)];
00510ddb                  
00510de0                  if (ecx_1 != 0)
00510de3                      CPhysicsObj::set_cell_id_recursive(ecx_1, arg2);
00510de3                  
00510deb                  edi_1 += 1;
00510def              } while (edi_1 < this->children->num_objects);
00510dd0          }
00510dc8      }
00510da0  }

00510df7                                                                       90 90 90 90 90 90 90 90 90                         .........

00510e00  void __thiscall CPhysicsObj::AddPartToShadowCells(class CPhysicsObj* this, class CPhysicsPart* arg2)

00510e00  {
00510e04      class CObjCell* cell = this->cell;
00510e04      
00510e0c      if (cell != 0)
00510e15          arg2->pos.objcell_id = cell->m_DID.id;
00510e15      
00510e18      uint32_t num_shadow_objects = this->num_shadow_objects;
00510e1e      int32_t ebx = 0;
00510e1e      
00510e22      if (num_shadow_objects > 0)
00510e22      {
00510e26          int32_t edi_1 = 0;
00510e26          
00510e5f          do
00510e5f          {
00510e36              void* eax_2 = *(uint32_t*)(&this->shadow_objects.data->cell + edi_1);
00510e36              
00510e3c              if (eax_2 != 0)
00510e50                  **(uint32_t**)((char*)eax_2 + 0x38)(arg2, 0, ((char*)eax_2 + 0x5c), num_shadow_objects);
00510e50              
00510e53              num_shadow_objects = this->num_shadow_objects;
00510e59              ebx += 1;
00510e5a              edi_1 += 0x18;
00510e5f          } while (ebx < num_shadow_objects);
00510e22      }
00510e00  }

00510e2a                                8d 9b 00 00 00 00                                                            ......
00510e68                          90 90 90 90 90 90 90 90                                                          ........

00510e70  void __thiscall CPhysicsObj::RemovePartFromShadowCells(class CPhysicsObj* this, class CPhysicsPart* arg2)

00510e70  {
00510e79      class CObjCell* cell = this->cell;
00510e79      
00510e81      if (cell != 0)
00510e86          arg2->pos.objcell_id = cell->m_DID.id;
00510e86      
00510e8f      int32_t i = 0;
00510e8f      
00510e93      if (this->num_shadow_objects > 0)
00510e93      {
00510e96          int32_t edi_1 = 0;
00510e96          
00510ec4          do
00510ec4          {
00510ea6              void* eax_2 = *(uint32_t*)(&this->shadow_objects.data->cell + edi_1);
00510ea6              
00510eac              if (eax_2 != 0)
00510eb5                  *(uint32_t*)(*(uint32_t*)((char*)eax_2 + 0x38) + 4)(arg2);
00510eb5              
00510ebe              i += 1;
00510ebf              edi_1 += 0x18;
00510ec4          } while (i < this->num_shadow_objects);
00510e93      }
00510e70  }

00510e9a                                                                                8d 9b 00 00 00 00                            ......
00510ecd                                         90 90 90                                                               ...

00510ed0  void __thiscall CPhysicsObj::enter_cell(class CPhysicsObj* this, class CObjCell* arg2)

00510ed0  {
00510ed8      if (this->part_array != 0)
00510ed8      {
00510ee2          CObjCell::add_object(arg2, this);
00510ee7          class CHILDLIST* children = this->children;
00510ee7          
00510eec          if (children != 0)
00510eec          {
00510eef              int32_t edi_1 = 0;
00510eef              
00510ef4              if (children->num_objects > 0)
00510ef4              {
00510f0f                  do
00510f0f                  {
00510f03                      CPhysicsObj::enter_cell(this->children->objects.data[((uint32_t)edi_1)], arg2);
00510f0b                      edi_1 += 1;
00510f0f                  } while (edi_1 < this->children->num_objects);
00510ef4              }
00510eec          }
00510eec          
00510f1b          uint32_t id = arg2->m_DID.id;
00510f1e          this->m_position.objcell_id = id;
00510f1e          
00510f21          if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00510f21          {
00510f23              class CPartArray* part_array = this->part_array;
00510f23              
00510f28              if (part_array != 0)
00510f2b                  CPartArray::SetCellID(part_array, id);
00510f21          }
00510f21          
00510f30          class CPartArray* part_array_1 = this->part_array;
00510f35          this->cell = arg2;
00510f35          
00510f3b          if (part_array_1 != 0)
00510f3e              CPartArray::AddLightsToCell(part_array_1, arg2);
00510ed8      }
00510ed0  }

00510f48                          90 90 90 90 90 90 90 90                                                          ........

00510f50  void __thiscall CPhysicsObj::leave_cell(class CPhysicsObj* this, int32_t arg2)

00510f50  {
00510f53      class CObjCell* cell = this->cell;
00510f53      
00510f5b      if (cell != 0)
00510f5b      {
00510f5e          CObjCell::remove_object(cell, this);
00510f63          class CHILDLIST* children = this->children;
00510f63          
00510f68          if (children != 0)
00510f68          {
00510f6b              int32_t edi_1 = 0;
00510f6b              
00510f70              if (children->num_objects > 0)
00510f70              {
00510f90                  do
00510f90                  {
00510f84                      CPhysicsObj::leave_cell(this->children->objects.data[((uint32_t)edi_1)], arg2);
00510f8c                      edi_1 += 1;
00510f90                  } while (edi_1 < this->children->num_objects);
00510f70              }
00510f68          }
00510f68          
00510f94          class CPartArray* part_array = this->part_array;
00510f94          
00510f99          if (part_array != 0)
00510fa2              CPartArray::RemoveLightsFromCell(part_array, this->cell);
00510fa2          
00510fa7          this->cell = nullptr;
00510f5b      }
00510f50  }

00510fb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00510fc0  void __thiscall CPhysicsObj::find_bbox_cell_list(class CPhysicsObj* this, class CELLARRAY* arg2)

00510fc0  {
00510fc8      arg2->num_cells = 0;
00510fcf      arg2->added_outside = 0;
00510fd5      class CObjCell* cell = this->cell;
00510fe2      CELLARRAY::add_cell(arg2, cell->m_DID.id, cell);
00510fe2      
00510ff6      if ((this->cell != 0 && this->part_array != 0))
00510ff6      {
00510ffc          int32_t i = 0;
00510ffc          
00511000          if (arg2->num_cells > 0)
00511000          {
0051101d              do
0051101d              {
00511005                  class CObjCell* cell_1 = arg2->cells.data[i].cell;
00511005                  
0051100b                  if (cell_1 != 0)
00511012                      CPartArray::calc_cross_cells_static(this->part_array, cell_1, arg2);
00511012                  
0051101a                  i += 1;
0051101d              } while (i < arg2->num_cells);
00511000          }
00510ff6      }
00510fc0  }

00511025                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00511030  void __fastcall CPhysicsObj::obj_within_block(class CPhysicsObj* this)

00511030  {
00511040      class CPartArray* part_array = this->part_array;
00511046      float __return;
00511046      
00511046      if ((this->state & 0x10000) != 0)
00511046      {
0051104e          class CSphere* esi_1;
0051104e          
0051104e          if (part_array == 0)
00511059              esi_1 = &dummy_sphere;
0051104e          else
00511055              esi_1 = CPartArray::GetSortingSphere(part_array);
00511055          
00511067          Frame::localtoglobal(&this->m_position.frame, &__return, esi_1);
0051106c          long double x87_r7_1 = ((long double)__return);
00511070          float radius = esi_1->radius;
00511077          long double temp0_1 = ((long double)radius);
00511077          (x87_r7_1 - temp0_1);
00511077          
00511080          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
00511080          {
00511086              float var_8;
00511086              long double x87_r7_2 = ((long double)var_8);
0051108a              long double temp1_1 = ((long double)radius);
0051108a              (x87_r7_2 - temp1_1);
0051108a              
00511093              if ((*(uint8_t*)((char*)((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
00511093              {
0051109f                  long double x87_r7_4 = (((long double)0f) - ((long double)radius));
005110a7                  (((long double)__return) - x87_r7_4);
005110ab                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005110ab                  
005110ae                  if (!(p_1))
005110ae                  {
005110b8                      (((long double)var_8) - x87_r7_4);
005110be                      /* unimplemented  {test ah, 0x5} */;
005110ae                  }
00511093              }
00511080          }
00511080          
00511080          return;
00511046      }
00511046      
005110d1      float* edi_1 = nullptr;
005110d5      uint32_t eax_4;
005110d5      
005110d5      if (part_array != 0)
005110db          eax_4 = CPartArray::GetNumCylsphere(part_array);
005110db      
005110e2      if ((part_array == 0 || eax_4 == 0))
005110e2      {
005111ce          class CPartArray* part_array_3 = this->part_array;
005111d3          uint32_t eax_12;
005111d3          
005111d3          if (part_array_3 != 0)
005111d5              eax_12 = CPartArray::GetNumSphere(part_array_3);
005111d5          
005111dc          float* var_2c_3;
005111dc          float var_28_3;
005111dc          
005111dc          if ((part_array_3 == 0 || eax_12 == 0))
005111dc          {
0051120c              var_28_3 = 0f;
00511213              var_2c_3 = &this->m_position.frame.m_fOrigin.x;
005111dc          }
005111dc          else
005111dc          {
005111de              class CPartArray* part_array_4 = this->part_array;
005111e3              class AC1Legacy::Vector3* esi_3;
005111e3              
005111e3              if (part_array_4 == 0)
005111ee                  esi_3 = &dummy_sphere;
005111e3              else
005111ea                  esi_3 = CPartArray::GetSortingSphere(part_array_4);
005111ea              
005111fc              Frame::localtoglobal(&this->m_position.frame, &__return, esi_3);
00511204              var_28_3 = *(int32_t*)((char*)esi_3 + 0xc);
00511209              var_2c_3 = &__return;
005111dc          }
005111dc          
00511214          int32_t eax_15;
00511214          long double st0_1;
00511214          st0_1 = LandDefs::within_block(var_2c_3, var_28_3);
0051121e          return;
005110e2      }
005110e2      
005110e8      class CPartArray* part_array_1 = this->part_array;
005110ed      uint32_t var_14_2;
005110ed      
005110ed      if (part_array_1 == 0)
005110fa          var_14_2 = 0;
005110ed      else
005110f4          var_14_2 = CPartArray::GetNumCylsphere(part_array_1);
005110f4      
00511102      int32_t ebp_1 = 0;
00511102      
00511106      if (var_14_2 <= 0)
0051122c          return;
0051122c      
0051110e      class Frame* eax_7 = CPhysicsObj::get_frame(this);
0051110e      
00511115      while (true)
00511115      {
00511115          class CPartArray* part_array_2 = this->part_array;
0051111a          class CCylSphere* eax_8;
0051111a          
0051111a          if (part_array_2 == 0)
00511123              eax_8 = nullptr;
0051111a          else
0051111c              eax_8 = CPartArray::GetCylsphere(part_array_2);
0051111c          
0051113b          long double x87_r7_8 = (((((long double)eax_7->m_fl2gv[3]) * ((long double)*(uint32_t*)(&*(uint32_t*)((char*)eax_8->low_pt)[4] + edi_1))) + (((long double)*(uint32_t*)(&*(uint32_t*)((char*)eax_8->low_pt)[8] + edi_1)) * ((long double)eax_7->m_fl2gv[6]))) + (((long double)eax_7->m_fl2gv[0]) * ((long double)*(uint32_t*)((char*)edi_1 + eax_8))));
0051113d          long double x87_r7_9 = (x87_r7_8 + ((long double)eax_7->m_fOrigin.x));
00511156          long double x87_r6_10 = (((((long double)eax_7->m_fl2gv[4]) * ((long double)*(uint32_t*)(&*(uint32_t*)((char*)eax_8->low_pt)[4] + edi_1))) + (((long double)eax_7->m_fl2gv[1]) * ((long double)*(uint32_t*)((char*)edi_1 + eax_8)))) + (((long double)eax_7->m_fl2gv[7]) * ((long double)*(uint32_t*)(&*(uint32_t*)((char*)eax_8->low_pt)[8] + edi_1))));
0051115b          float var_8_1 = ((float)(x87_r6_10 + ((long double)eax_7->m_fOrigin.y)));
0051115f          long double x87_r6_12 = ((long double)*(uint32_t*)(&eax_8->radius + edi_1));
00511165          (x87_r7_9 - x87_r6_12);
00511167          eax_8 = ((((x87_r7_9 < x87_r6_12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, x87_r6_12))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == x87_r6_12) ? 1 : 0) << 0xe) | 0x3000))));
00511167          
0051116c          if ((*(uint8_t*)((char*)eax_8)[1] & 1) != 0)
0051116c              break;
0051116c          
0051116e          long double x87_r5_6 = ((long double)var_8_1);
00511172          (x87_r5_6 - x87_r6_12);
00511174          eax_8 = ((((x87_r5_6 < x87_r6_12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_6, x87_r6_12))) ? 1 : 0) << 0xa) | ((((x87_r5_6 == x87_r6_12) ? 1 : 0) << 0xe) | 0x3000))));
00511174          
00511179          if ((*(uint8_t*)((char*)eax_8)[1] & 1) != 0)
00511179              break;
00511179          
00511183          float var_10_1 = ((float)(((long double)0f) - x87_r6_12));
00511189          long double temp2_1 = ((long double)var_10_1);
00511189          (x87_r6_12 - temp2_1);
0051118d          eax_8 = ((((x87_r6_12 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_12, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r6_12 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0051118f          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0051118f          
00511192          if (p_3)
00511192              break;
00511192          
00511194          long double x87_r7_11 = ((long double)var_8_1);
00511198          long double temp3_1 = ((long double)var_10_1);
00511198          (x87_r7_11 - temp3_1);
0051119c          eax_8 = ((((x87_r7_11 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0051119e          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
0051119e          
005111a1          if (p_4)
005111a1              break;
005111a1          
005111a7          ebp_1 += 1;
005111a8          edi_1 = &edi_1[5];
005111a8          
005111ad          if (ebp_1 >= var_14_2)
005111bf              return;
00511115      }
00511030  }

0051122d                                         90 90 90                                                               ...

00511230  void __fastcall CPhysicsObj::remove_shadows_from_cells(class CPhysicsObj* this)

00511230  {
00511233      class CPhysicsObj* this_1 = this;
0051123b      int32_t i = 0;
0051123b      
0051123f      if (this_1->num_shadow_objects > 0)
0051123f      {
00511242          int32_t ebx_1 = 0;
00511242          
00511275          do
00511275          {
00511244              class CShadowObj* data = this_1->shadow_objects.data;
0051124a              class CObjCell* esi_1 = *(uint32_t*)(&data->cell + ebx_1);
0051124a              
00511252              if (esi_1 != 0)
00511252              {
00511257                  CObjCell::remove_shadow_object(esi_1, ((char*)data + ebx_1));
0051125c                  this = this_1->part_array;
0051125c                  
00511261                  if (this != 0)
00511264                      CPartArray::RemoveParts(this, esi_1);
00511252              }
00511252              
0051126f              i += 1;
00511270              ebx_1 += 0x18;
00511275          } while (i < this_1->num_shadow_objects);
0051123f      }
0051123f      
00511278      int32_t esi_2 = 0;
0051127a      this_1->num_shadow_objects = 0;
0051127a      
00511280      while (true)
00511280      {
00511280          class CHILDLIST* children = this_1->children;
00511280          
00511285          if (children == 0)
0051128c              this = nullptr;
00511285          else
00511287              this = children->num_objects;
00511287          
00511293          if (esi_2 >= ((uint32_t)this))
00511293              break;
00511293          
00511297          if (children == 0)
00511297          {
005112ac              CPhysicsObj::remove_shadows_from_cells(nullptr);
005112b1              esi_2 += 1;
00511297          }
00511297          else
00511297          {
005112a2              CPhysicsObj::remove_shadows_from_cells(children->objects.data[((uint32_t)esi_2)]);
005112a7              esi_2 += 1;
00511297          }
00511280      }
00511230  }

005112b8                                                                          90 90 90 90 90 90 90 90                          ........

005112c0  int32_t __fastcall CPhysicsObj::is_completely_visible(class CPhysicsObj* this)

005112c0  {
005112c8      if (this->cell == 0)
005112cc          return 0;
005112cc      
005112ce      uint32_t num_shadow_objects = this->num_shadow_objects;
005112ce      
005112d6      if (num_shadow_objects == 0)
005112db          return 0;
005112db      
005112dc      int32_t edx_1 = 0;
005112dc      
005112e0      if (num_shadow_objects <= 0)
00511303          return 1;
00511303      
005112e8      class CObjCell** eax_3 = &this->shadow_objects.data->cell;
005112e8      
005112f3      while (true)
005112f3      {
005112f3          if (ADJ(eax_3)->cell == 0)
005112db              return 0;
005112db          
005112f5          edx_1 += 1;
005112f6          eax_3 = &eax_3[6];
005112f6          
005112fb          if (edx_1 >= num_shadow_objects)
00511303              return 1;
005112f3      }
005112c0  }

005112ed                                         8d 49 00                                                               .I.
00511304              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00511310  void __thiscall CPhysicsObj::set_on_walkable(class CPhysicsObj* this, int32_t arg2)

00511310  {
00511317      uint32_t transient_state = this->transient_state;
00511324      uint32_t eax;
00511324      
00511324      if (arg2 == 0)
0051132b          eax = (transient_state & 0xfffffffd);
00511324      else
00511326          eax = (transient_state | 2);
00511326      
00511330      this->transient_state = eax;
00511330      
00511336      if ((transient_state & 2) == 0)
00511336      {
00511358          if (arg2 != 0)
00511358          {
0051135a              class MovementManager* movement_manager_1 = this->movement_manager;
0051135a              
00511362              if (movement_manager_1 != 0)
00511364                  MovementManager::HitGround(movement_manager_1);
00511358          }
00511336      }
00511336      else if (arg2 == 0)
0051133a      {
0051133c          class MovementManager* movement_manager = this->movement_manager;
0051133c          
00511344          if (movement_manager != 0)
00511344          {
00511346              MovementManager::LeaveGround(movement_manager);
0051134d              CPhysicsObj::calc_acceleration(this);
00511353              return;
00511344          }
0051133a      }
0051133a      
0051136b      CPhysicsObj::calc_acceleration(this);
00511310  }

00511374                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00511380  int32_t __thiscall CPhysicsObj::SetPlacementFrame(class CPhysicsObj* this, uint32_t arg2, int32_t arg3)

00511380  {
00511383      class CPartArray* part_array = this->part_array;
00511387      int32_t result = 0;
00511387      
0051138b      if (part_array != 0)
00511397          result = CPartArray::SetPlacementFrame(part_array, arg2);
00511397      
005113a2      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
005113a2      {
005113a4          class CPartArray* part_array_1 = this->part_array;
005113a4          
005113a9          if (part_array_1 != 0)
005113af              CPartArray::SetFrame(part_array_1, &this->m_position.frame);
005113a2      }
005113a2      
005113b8      return result;
00511380  }

005113bb                                                                                   90 90 90 90 90                             .....

005113c0  class AC1Legacy::Vector3* __thiscall CPhysicsObj::get_velocity(class CPhysicsObj const* this, class AC1Legacy::Vector3* __return)

005113c0  {
005113c6      float* result = __return;
005113ca      *(uint32_t*)result = this->cached_velocity.x;
005113d2      result[1] = this->cached_velocity.y;
005113db      result[2] = this->cached_velocity.z;
005113de      return result;
005113c0  }

005113e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005113f0  void __thiscall CPhysicsObj::set_velocity(class CPhysicsObj* this, class AC1Legacy::Vector3 const* arg2, int32_t arg3)

005113f0  {
0051140c      if (Vector3::operator!=(arg2, &this->m_velocityVector) != 0)
0051140c      {
005113fc          this->m_velocityVector.x = arg2->x;
005113fc          this->m_velocityVector.y = arg2->y;
005113fc          this->m_velocityVector.z = arg2->z;
00511421          long double x87_r7_1 = ((long double)this->m_velocityVector.z);
00511424          long double x87_r6_1 = ((long double)this->m_velocityVector.y);
00511427          long double x87_r5_1 = ((long double)this->m_velocityVector.x);
00511437          long double x87_r4_4 = (((x87_r5_1 * x87_r5_1) + (x87_r6_1 * x87_r6_1)) + (x87_r7_1 * x87_r7_1));
0051143f          long double x87_r3_6 = (((long double)50f) * ((long double)50f));
00511445          (x87_r3_6 - x87_r4_4);
00511449          float* eax_1;
00511449          bool c1;
00511449          eax_1 = ((((x87_r3_6 < x87_r4_4) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_6, x87_r4_4))) ? 1 : 0) << 0xa) | ((((x87_r3_6 == x87_r4_4) ? 1 : 0) << 0xe) | 0x3000))));
0051144d          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0051144d          
00511452          if (!(p_1))
00511452          {
0051145b              void __return;
0051145b              AC1Legacy::Vector3::normalize(&this->m_velocityVector, &__return);
005113fc              this->m_velocityVector.x = ((float)(((long double)50f) * ((long double)this->m_velocityVector.x)));
005113fc              this->m_velocityVector.y = ((float)(((long double)50f) * ((long double)this->m_velocityVector.y)));
005113fc              this->m_velocityVector.z = ((float)(((long double)50f) * ((long double)this->m_velocityVector.z)));
00511452          }
00511452          
00511482          this->jumped_this_frame = 1;
0051140c      }
0051140c      
00511493      if ((this->state & 1) == 0)
00511493      {
00511495          uint32_t transient_state = this->transient_state;
00511495          
0051149d          if (transient_state >= 0)
0051149d          {
005114ab              this->update_time = (*(uint32_t*)Timer::cur_time);
005114b1              *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051149d          }
0051149d          
005114bc          this->transient_state = (transient_state | 0x80);
00511493      }
005113f0  }

005114cb                                   90 90 90 90 90                                                             .....

005114d0  void __thiscall CPhysicsObj::set_local_velocity(class CPhysicsObj* this, class AC1Legacy::Vector3 const* arg2, int32_t arg3)

005114d0  {
005114ee      long double x87_r7_3 = (((((long double)this->m_position.frame.m_fl2gv[0]) * ((long double)arg2->x)) + (((long double)this->m_position.frame.m_fl2gv[3]) * ((long double)arg2->y))) + (((long double)this->m_position.frame.m_fl2gv[6]) * ((long double)arg2->z)));
005114f0      float var_c = ((float)x87_r7_3);
00511507      long double x87_r7_7 = (((((long double)this->m_position.frame.m_fl2gv[1]) * ((long double)arg2->x)) + (((long double)this->m_position.frame.m_fl2gv[4]) * ((long double)arg2->y))) + (((long double)this->m_position.frame.m_fl2gv[7]) * ((long double)arg2->z)));
00511509      float var_8 = ((float)x87_r7_7);
00511529      long double x87_r7_11 = (((((long double)this->m_position.frame.m_fl2gv[2]) * ((long double)arg2->x)) + (((long double)this->m_position.frame.m_fl2gv[5]) * ((long double)arg2->y))) + (((long double)this->m_position.frame.m_fl2gv[8]) * ((long double)arg2->z)));
0051152b      float var_4 = ((float)x87_r7_11);
0051152f      CPhysicsObj::set_velocity(this, &var_c, arg3);
005114d0  }

0051153a                                                                                90 90 90 90 90 90                            ......

00511540  int32_t __fastcall CPhysicsObj::get_heading(class CPhysicsObj const* this)

00511540  {
00511543      /* tailcall */
00511543      return Frame::get_heading(&this->m_position.frame);
00511540  }

00511548                          90 90 90 90 90 90 90 90                                                          ........

00511550  void __fastcall CPhysicsObj::process_hooks(class CPhysicsObj* this)

00511550  {
00511555      class PhysicsObjHook* hooks = this->hooks;
00511555      
0051155f      if (hooks != 0)
0051155f      {
005115ae          class PhysicsObjHook* next_1;
005115ae          
005115ae          do
005115ae          {
00511564              next_1 = hooks->next;
00511564              
0051156e              if (hooks->vtable->Execute(this) != 0)
0051156e              {
00511570                  class PhysicsObjHook* next = hooks->next;
00511570                  
00511575                  if (next != 0)
0051157a                      next->prev = hooks->prev;
0051157a                  
0051157d                  class PhysicsObjHook* prev = hooks->prev;
0051157d                  
00511582                  if (prev == 0)
0051158f                      this->hooks = hooks->next;
00511582                  else
00511587                      prev->next = hooks->next;
00511587                  
00511595                  hooks->prev = nullptr;
00511598                  hooks->next = nullptr;
0051159c                  hooks->vtable = 0x7c6b20;
005115a2                  operator delete(hooks);
0051156e              }
0051156e              
005115ac              hooks = next_1;
005115ae          } while (next_1 != 0);
0051155f      }
0051155f      
005115b1      uint32_t m_num = this->anim_hooks.m_num;
005115b1      
005115b9      if (m_num > 0)
005115b9      {
005115bb          int32_t i = 0;
005115bb          
005115bf          if (m_num > 0)
005115bf          {
005115d9              do
005115d9              {
005115c1                  this->anim_hooks.m_data[i]->vtable->Execute(this);
005115d6                  i += 1;
005115d9              } while (i < this->anim_hooks.m_num);
005115bf          }
005115bf          
005115e1          AC1Legacy::SmartArray<CAnimHook *>::shrink(&this->anim_hooks);
005115e6          this->anim_hooks.m_num = 0;
005115b9      }
00511550  }


005115f0  void __thiscall CPhysicsObj::SetTranslucency(class CPhysicsObj* this, float arg2, double arg3)

005115f0  {
005115f0      long double x87_r7 = ((long double)0.000199999995f);
005115f7      long double temp1 = ((long double)arg3);
005115f7      (x87_r7 - temp1);
005115f7      
00511602      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00511602      {
00511646          void* eax_3 = operator new(0x38);
00511650          class PhysicsObjHook* eax_4;
00511650          
00511650          if (eax_3 == 0)
0051167e              eax_4 = nullptr;
00511650          else
00511650          {
00511663              int32_t var_14_1 = *(uint32_t*)((char*)arg3)[4];
00511671              int32_t var_1c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
00511677              eax_4 = FPHook::FPHook(eax_3, TRANSLUCENCY, (*(uint32_t*)PhysicsTimer::curr_time), arg3, 0f, arg2, nullptr);
00511650          }
00511650          
00511680          class PhysicsObjHook* hooks = this->hooks;
00511680          
0051168a          for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
0051168a          {
0051168a          }
0051168a          
00511699          if (hooks != 0)
0051169b              hooks->prev = eax_4;
0051169b          
005116a4          eax_4->next = this->hooks;
005116a7          this->hooks = eax_4;
00511602      }
00511602      else
00511602      {
00511604          long double x87_r7_1 = ((long double)arg2);
0051160c          long double temp2_1 = ((long double)this->translucencyOriginal);
0051160c          (x87_r7_1 - temp2_1);
00511612          arg3 = arg2;
00511616          float eax_1;
00511616          eax_1 = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00511618          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00511618          
0051161b          if (!(p_1))
00511623              arg3 = this->translucencyOriginal;
00511623          
00511627          class CPartArray* part_array = this->part_array;
0051162c          float edx_1 = arg3;
00511630          this->translucency = edx_1;
00511630          
00511636          if (part_array != 0)
0051163b              CPartArray::SetTranslucencyInternal(part_array, edx_1);
00511602      }
005115f0  }

005116b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005116c0  void __thiscall CPhysicsObj::SetTranslucencyHierarchical(class CPhysicsObj* this, float arg2)

005116c0  {
005116c0      class CPhysicsObj* this_1 = this;
005116c1      long double x87_r7 = ((long double)arg2);
005116ce      long double temp1 = ((long double)this->translucencyOriginal);
005116ce      (x87_r7 - temp1);
005116d4      float translucencyOriginal = arg2;
005116d8      float eax;
005116d8      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
005116da      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005116da      
005116dd      if (!(p))
005116e5          translucencyOriginal = this->translucencyOriginal;
005116e5      
005116e9      class CPartArray* part_array = this->part_array;
005116f2      this->translucency = translucencyOriginal;
005116f2      
005116f8      if (part_array != 0)
005116fd          CPartArray::SetTranslucencyInternal(part_array, translucencyOriginal);
005116fd      
00511706      int32_t esi = 0;
00511706      
00511708      while (true)
00511708      {
00511708          class CHILDLIST* children = this->children;
00511708          
00511712          if ((children == 0 || esi >= children->num_objects))
0051172a              return;
0051172a          
0051171e          CPhysicsObj::SetTranslucencyHierarchical(children->objects.data[((uint32_t)esi)], arg2);
00511723          esi += 1;
00511708      }
005116c0  }

0051172d                                         90 90 90                                                               ...

00511730  void __thiscall CPhysicsObj::SetPartTranslucency(class CPhysicsObj* this, uint32_t arg2, float arg3, float arg4, double arg5)

00511730  {
00511730      long double x87_r7 = ((long double)0.000199999995f);
00511737      long double temp1 = ((long double)arg5);
00511737      (x87_r7 - temp1);
00511737      
00511742      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00511742      {
00511744          class CPartArray* part_array = this->part_array;
00511744          
00511749          if (part_array != 0)
00511759              CPartArray::SetPartTranslucencyInternal(part_array, arg2, arg4);
00511759          
00511749          return;
00511742      }
00511742      
00511764      void* eax_2 = operator new(0x38);
0051176e      class PhysicsObjHook* eax_3;
0051176e      
0051176e      if (eax_2 == 0)
005117a2          eax_3 = nullptr;
0051176e      else
0051176e      {
00511787          int32_t var_14_1 = *(uint32_t*)((char*)arg5)[4];
00511795          int32_t var_1c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051179b          eax_3 = FPHook::FPHook(eax_2, PART_TRANSLUCENCY, (*(uint32_t*)PhysicsTimer::curr_time), arg5, arg3, arg4, arg2);
0051176e      }
0051176e      
005117a4      class PhysicsObjHook* hooks = this->hooks;
005117a4      
005117ae      for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
005117ae      {
005117ae      }
005117ae      
005117b9      if (hooks != 0)
005117bb          hooks->prev = eax_3;
005117bb      
005117c4      eax_3->next = this->hooks;
005117c7      this->hooks = eax_3;
00511730  }

005117d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005117e0  void __thiscall CPhysicsObj::SetPartLuminosity(class CPhysicsObj* this, uint32_t arg2, float arg3, float arg4, double arg5)

005117e0  {
005117e0      long double x87_r7 = ((long double)0.000199999995f);
005117e7      long double temp1 = ((long double)arg5);
005117e7      (x87_r7 - temp1);
005117e7      
005117f2      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005117f2      {
005117f4          class CPartArray* part_array = this->part_array;
005117f4          
005117f9          if (part_array != 0)
00511809              CPartArray::SetPartLuminosityInternal(part_array, arg2, arg4);
00511809          
005117f9          return;
005117f2      }
005117f2      
00511814      void* eax_2 = operator new(0x38);
0051181e      class PhysicsObjHook* eax_3;
0051181e      
0051181e      if (eax_2 == 0)
00511852          eax_3 = nullptr;
0051181e      else
0051181e      {
00511837          int32_t var_14_1 = *(uint32_t*)((char*)arg5)[4];
00511845          int32_t var_1c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051184b          eax_3 = FPHook::FPHook(eax_2, PART_LUMINOSITY, (*(uint32_t*)PhysicsTimer::curr_time), arg5, arg3, arg4, arg2);
0051181e      }
0051181e      
00511854      class PhysicsObjHook* hooks = this->hooks;
00511854      
0051185e      for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
0051185e      {
0051185e      }
0051185e      
00511869      if (hooks != 0)
0051186b          hooks->prev = eax_3;
0051186b      
00511874      eax_3->next = this->hooks;
00511877      this->hooks = eax_3;
005117e0  }

00511881     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00511890  void __thiscall CPhysicsObj::SetLuminosity(class CPhysicsObj* this, float arg2, float arg3, double arg4)

00511890  {
00511890      long double x87_r7 = ((long double)0.000199999995f);
00511897      long double temp1 = ((long double)arg4);
00511897      (x87_r7 - temp1);
00511897      
005118a2      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005118a2      {
005118a4          class CPartArray* part_array = this->part_array;
005118a4          
005118a9          if (part_array != 0)
005118b0              CPartArray::SetLuminosityInternal(part_array, arg3);
005118b0          
005118a9          return;
005118a2      }
005118a2      
005118bb      void* eax_2 = operator new(0x38);
005118c5      class PhysicsObjHook* eax_3;
005118c5      
005118c5      if (eax_2 == 0)
005118f6          eax_3 = nullptr;
005118c5      else
005118c5      {
005118db          int32_t var_14_1 = *(uint32_t*)((char*)arg4)[4];
005118e9          int32_t var_1c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
005118ef          eax_3 = FPHook::FPHook(eax_2, LUMINOSITY, (*(uint32_t*)PhysicsTimer::curr_time), arg4, arg2, arg3, nullptr);
005118c5      }
005118c5      
005118f8      class PhysicsObjHook* hooks = this->hooks;
005118f8      
00511902      for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
00511902      {
00511902      }
00511902      
0051190d      if (hooks != 0)
0051190f          hooks->prev = eax_3;
0051190f      
00511918      eax_3->next = this->hooks;
0051191b      this->hooks = eax_3;
00511890  }

00511925                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00511930  void __thiscall CPhysicsObj::SetPartDiffusion(class CPhysicsObj* this, uint32_t arg2, float arg3, float arg4, double arg5)

00511930  {
00511930      long double x87_r7 = ((long double)0.000199999995f);
00511937      long double temp1 = ((long double)arg5);
00511937      (x87_r7 - temp1);
00511937      
00511942      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00511942      {
00511944          class CPartArray* part_array = this->part_array;
00511944          
00511949          if (part_array != 0)
00511959              CPartArray::SetPartDiffusionInternal(part_array, arg2, arg4);
00511959          
00511949          return;
00511942      }
00511942      
00511964      void* eax_2 = operator new(0x38);
0051196e      class PhysicsObjHook* eax_3;
0051196e      
0051196e      if (eax_2 == 0)
005119a2          eax_3 = nullptr;
0051196e      else
0051196e      {
00511987          int32_t var_14_1 = *(uint32_t*)((char*)arg5)[4];
00511995          int32_t var_1c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051199b          eax_3 = FPHook::FPHook(eax_2, PART_DIFFUSION, (*(uint32_t*)PhysicsTimer::curr_time), arg5, arg3, arg4, arg2);
0051196e      }
0051196e      
005119a4      class PhysicsObjHook* hooks = this->hooks;
005119a4      
005119ae      for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
005119ae      {
005119ae      }
005119ae      
005119b9      if (hooks != 0)
005119bb          hooks->prev = eax_3;
005119bb      
005119c4      eax_3->next = this->hooks;
005119c7      this->hooks = eax_3;
00511930  }

005119d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005119e0  void __thiscall CPhysicsObj::SetDiffusion(class CPhysicsObj* this, float arg2, float arg3, double arg4)

005119e0  {
005119e0      long double x87_r7 = ((long double)0.000199999995f);
005119e7      long double temp1 = ((long double)arg4);
005119e7      (x87_r7 - temp1);
005119e7      
005119f2      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005119f2      {
005119f4          class CPartArray* part_array = this->part_array;
005119f4          
005119f9          if (part_array != 0)
00511a00              CPartArray::SetDiffusionInternal(part_array, arg3);
00511a00          
005119f9          return;
005119f2      }
005119f2      
00511a0b      void* eax_2 = operator new(0x38);
00511a15      class PhysicsObjHook* eax_3;
00511a15      
00511a15      if (eax_2 == 0)
00511a46          eax_3 = nullptr;
00511a15      else
00511a15      {
00511a2b          int32_t var_14_1 = *(uint32_t*)((char*)arg4)[4];
00511a39          int32_t var_1c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
00511a3f          eax_3 = FPHook::FPHook(eax_2, DIFFUSION, (*(uint32_t*)PhysicsTimer::curr_time), arg4, arg2, arg3, nullptr);
00511a15      }
00511a15      
00511a48      class PhysicsObjHook* hooks = this->hooks;
00511a48      
00511a52      for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
00511a52      {
00511a52      }
00511a52      
00511a5d      if (hooks != 0)
00511a5f          hooks->prev = eax_3;
00511a5f      
00511a68      eax_3->next = this->hooks;
00511a6b      this->hooks = eax_3;
005119e0  }

00511a75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00511a80  void __thiscall CPhysicsObj::SetLighting(class CPhysicsObj* this, float arg2, float arg3)

00511a80  {
00511a80      class CPartArray* part_array = this->part_array;
00511a80      
00511a85      if (part_array == 0)
00511a8c          return;
00511a8c      
00511a87      /* tailcall */
00511a87      return CPartArray::SetLightingInternal(part_array, arg2, arg3);
00511a80  }

00511a8f                                               90                                                                 .

00511a90  int32_t __thiscall CPhysicsObj::SetPartLighting(class CPhysicsObj* this, uint32_t arg2, float arg3, float arg4)

00511a90  {
00511a90      class CPartArray* part_array = this->part_array;
00511a90      
00511a95      if (part_array == 0)
00511a9e          return 0;
00511a9e      
00511a97      /* tailcall */
00511a97      return CPartArray::SetPartLightingInternal(part_array, arg2, arg3, arg4);
00511a90  }

00511aa1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00511ab0  void __fastcall CPhysicsObj::RestoreLighting(class CPhysicsObj* this)

00511ab0  {
00511ab0      class CPartArray* part_array = this->part_array;
00511ab0      
00511ab5      if (part_array == 0)
00511abc          return;
00511abc      
00511ab7      /* tailcall */
00511ab7      return CPartArray::RestoreLightingInternal(part_array);
00511ab0  }

00511abd                                                                                         90 90 90                               ...

00511ac0  void __thiscall CPhysicsObj::CallPESInternal(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2, float arg3)

00511ac0  {
00511ac0      long double x87_r7 = ((long double)arg3);
00511ac4      long double temp1 = ((long double)1.0);
00511ac4      (x87_r7 - temp1);
00511ac4      
00511ad9      if (((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0 && this->cell != 0))
00511ae0          CPhysicsObj::play_script_internal(this, arg2);
00511ac0  }

00511ae8                          90 90 90 90 90 90 90 90                                                          ........

00511af0  void __thiscall CPhysicsObj::CallPES(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2, double arg3)

00511af0  {
00511af0      long double x87_r7 = ((long double)0.000199999995f);
00511af7      long double temp1 = ((long double)arg3);
00511af7      (x87_r7 - temp1);
00511af7      
00511b02      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00511b02      {
00511b24          class CPhysicsObj* this_1 = this;
00511b2f          arg3 = ((float)Random::RollDice(0f, ((float)((long double)arg3))));
00511b35          void* eax_3 = operator new(0x38);
00511b3f          class PhysicsObjHook* eax_4;
00511b3f          
00511b3f          if (eax_3 == 0)
00511b70              eax_4 = nullptr;
00511b3f          else
00511b3f          {
00511b63              int32_t var_1c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
00511b69              eax_4 = FPHook::FPHook(eax_3, CALL_PES, (*(uint32_t*)PhysicsTimer::curr_time), ((double)((long double)arg3)), 0f, 1f, arg2);
00511b3f          }
00511b3f          
00511b72          class PhysicsObjHook* hooks = this->hooks;
00511b72          
00511b7c          for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
00511b7c          {
00511b7c          }
00511b7c          
00511b89          if (hooks != 0)
00511b8b              hooks->prev = eax_4;
00511b8b          
00511b94          eax_4->next = this->hooks;
00511b97          this->hooks = eax_4;
00511b02      }
00511b02      else if (this->cell != 0)
00511b17          CPhysicsObj::play_script_internal(this, arg2);
00511af0  }

00511ba1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00511bb0  void __thiscall CPhysicsObj::SetScaleStatic(class CPhysicsObj* this, float arg2)

00511bb0  {
00511bb4      this->m_scale = arg2;
00511bba      class CPartArray* part_array = this->part_array;
00511bba      
00511bc2      if (part_array != 0)
00511bc2      {
00511bc6          float var_8_1 = arg2;
00511bcf          float var_c = arg2;
00511bd3          float var_4_1 = arg2;
00511bd7          CPartArray::SetScaleInternal(part_array, &var_c);
00511bc2      }
00511bb0  }

00511be2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00511bf0  void __fastcall CPhysicsObj::clear_transient_states(class CPhysicsObj* this)

00511bf0  {
00511bf3      this->transient_state &= 0xfffffffe;
00511bfa      CPhysicsObj::calc_acceleration(this);
00511c05      int32_t eax_1 = (this->transient_state & 0xfffffff7);
00511c12      this->transient_state = (eax_1 & 0xfffffffd);
00511c12      
00511c18      if ((eax_1 & 2) != 0)
00511c18      {
00511c1a          class MovementManager* movement_manager = this->movement_manager;
00511c1a          
00511c22          if (movement_manager != 0)
00511c24              MovementManager::LeaveGround(movement_manager);
00511c18      }
00511c18      
00511c2b      CPhysicsObj::calc_acceleration(this);
00511c30      this->transient_state &= 0xfffffe0b;
00511bf0  }

00511c3c                                                                                      90 90 90 90                              ....

00511c40  int32_t __thiscall CPhysicsObj::set_ethereal(class CPhysicsObj* this, int32_t arg2, int32_t arg3)

00511c40  {
00511c49      uint32_t state = this->state;
00511c49      
00511c55      if (arg2 == 0)
00511c55      {
00511c77          bool cond:1_1 = this->parent != 0;
00511c79          this->state = (state & 0xfffffffb);
00511c79          
00511c89          if (((!(cond:1_1) && this->cell != 0) && CPhysicsObj::ethereal_check_for_collisions(this) != 0))
00511c89          {
00511ca5              uint32_t ecx_4 = (this->transient_state | 0x100);
00511cac              this->state |= 4;
00511cb2              this->transient_state = ecx_4;
00511cbb              return 0;
00511c89          }
00511c55      }
00511c55      else
00511c5a          this->state = (state | 4);
00511c5a      
00511c60      this->transient_state &= 0xfffffeff;
00511c6e      return 1;
00511c40  }

00511cbe                                                                                            90 90                                ..

00511cc0  uint32_t __thiscall CPhysicsObj::get_object_info(class CPhysicsObj const* this, class CTransition* arg2, int32_t arg3)

00511cc0  {
00511cca      int32_t result = 0;
00511cca      
00511cd1      if ((this->state & 0x400000) != 0)
00511cd3          result = 0x200;
00511cd3      
00511cde      if (arg3 == 0)
00511cde      {
00511ce0          uint32_t transient_state = this->transient_state;
00511ce0          
00511cee          if ((transient_state & 1) != 0)
00511cee          {
00511cf9              int32_t edx_1 = (transient_state & 8);
00511cf9              
00511cff              if (CPhysicsObj::check_contact(this, 1) == 0)
00511d38                  CTransition::init_last_known_contact_plane(arg2, this->contact_plane_cell_id, &this->contact_plane, edx_1);
00511cff              else
00511cff              {
00511d11                  CTransition::init_contact_plane(arg2, this->contact_plane_cell_id, &this->contact_plane, edx_1);
00511d1c                  result |= 1;
00511d1c                  
00511d21                  if ((this->transient_state & 2) != 0)
00511d23                      result |= 2;
00511cff              }
00511cee          }
00511cee          
00511d44          if ((this->transient_state & 4) != 0)
00511d4f              CTransition::init_sliding_normal(arg2, &this->sliding_normal);
00511cde      }
00511cde      
00511d55      class CPartArray* part_array = this->part_array;
00511d55      
00511d5a      if ((part_array != 0 && CPartArray::AllowsFreeHeading(part_array) != 0))
00511d65          result |= 0x10;
00511d65      
00511d6f      if ((this->state & 0x40) == 0)
00511d78          return result;
00511d78      
00511d71      return (result | 8);
00511cc0  }

00511d7b                                                                                   90 90 90 90 90                             .....

00511d80  int32_t CPhysicsObj::AdjustPosition(class Position* arg1, class AC1Legacy::Vector3 const* arg2, class CObjCell** arg3, int32_t arg4, int32_t arg5)

00511d80  {
00511d8f      uint32_t eax_1 = ((uint32_t)((int16_t)arg1->objcell_id));
00511d8f      
00511db1      if (((eax_1 < 1 || eax_1 > 0x40) && ((eax_1 < 0x100 || eax_1 > 0xfffd) && eax_1 != 0xffff)))
00511dba          return 0;
00511dba      
00511dc3      *(uint32_t*)arg3 = nullptr;
00511dc6      uint32_t objcell_id = arg1->objcell_id;
00511dc6      
00511dd6      if (((uint32_t)objcell_id) >= 0x100)
00511dd6      {
00511e0b          class CObjCell* eax_5 = CObjCell::GetVisible(objcell_id);
00511e0b          
00511e17          if (eax_5 != 0)
00511e17          {
00511e26              void __return;
00511e26              Position::localtoglobal(arg1, &__return, arg1, arg2);
00511e37              class CEnvCell* eax_6 = CEnvCell::find_visible_child_cell(eax_5, &__return, arg5);
00511e37              
00511e3e              if (eax_6 != 0)
00511e3e              {
00511d8c                  arg1->objcell_id = eax_6->m_DID.id;
00511e4f                  *(uint32_t*)arg3 = eax_6;
00511e59                  return 1;
00511e3e              }
00511e3e              
00511e62              if (eax_5->seen_outside != 0)
00511e62              {
00511e66                  Position::adjust_to_outside(arg1);
00511e6b                  uint32_t objcell_id_2 = arg1->objcell_id;
00511e6b                  
00511e6f                  if (objcell_id_2 != 0)
00511e6f                  {
00511e7b                      *(uint32_t*)arg3 = CObjCell::GetVisible(objcell_id_2);
00511e80                      return 1;
00511e6f                  }
00511e62              }
00511e17          }
00511dd6      }
00511dd6      else
00511dd6      {
00511ddb          class AC1Legacy::Vector3* var_20 = &arg1->frame.m_fOrigin;
00511ddc          uint32_t* var_24_1 = &arg1->objcell_id;
00511ddd          class AC1Legacy::Vector3* edx;
00511ddd          LandDefs::adjust_to_outside(objcell_id, edx);
00511de2          uint32_t objcell_id_1 = arg1->objcell_id;
00511de2          
00511de9          if (objcell_id_1 != 0)
00511de9          {
00511df8              *(uint32_t*)arg3 = CObjCell::GetVisible(objcell_id_1);
00511e09              return 1;
00511de9          }
00511dd6      }
00511dd6      
00511e8e      return 0;
00511d80  }

00511e8f                                               90                                                                 .

00511e90  int32_t __stdcall CPhysicsObj::CheckPositionInternal(class CPhysicsObj* this @ ecx, class CObjCell* arg2, class Position* arg3, class CTransition* arg4, class SetPositionStruct const* arg5)

00511e90  {
00511ea7      CTransition::init_path(arg4, arg2, nullptr, arg3);
00511ea7      
00511eb4      if ((arg5->flags & 0x10) == 0)
00511eb6          arg4->sphere_path.placement_allows_sliding = 0;
00511eb6      
00511ec5      if (CTransition::find_valid_position(arg4) != 0)
00511ec5      {
00511ecb          if ((arg5->flags & 0x10) != 0)
00511f27              return 1;
00511f27          
00511ed9          long double x87_r7_2 = (((long double)arg4->sphere_path.curr_pos.frame.m_fOrigin.x) - ((long double)arg3->frame.m_fOrigin.x));
00511edf          long double temp1_1 = ((long double)0.0500000007f);
00511edf          (x87_r7_2 - temp1_1);
00511ee5          int32_t eax;
00511ee5          eax = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00511ee7          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00511ee7          
00511eea          if (!(p_1))
00511eea          {
00511eef              long double x87_r7_4 = (((long double)arg4->sphere_path.curr_pos.frame.m_fOrigin.y) - ((long double)arg3->frame.m_fOrigin.y));
00511ef2              long double temp2_1 = ((long double)0.0500000007f);
00511ef2              (x87_r7_4 - temp2_1);
00511ef8              eax = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00511efa              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00511efa              
00511f0c              if ((!(p_2) && arg4->sphere_path.curr_pos.objcell_id == arg2->m_DID.id))
00511f0c              {
00511edc                  arg3->frame.m_fOrigin.x = arg4->sphere_path.curr_pos.frame.m_fOrigin.x;
00511edc                  arg3->frame.m_fOrigin.y = arg4->sphere_path.curr_pos.frame.m_fOrigin.y;
00511edc                  arg3->frame.m_fOrigin.z = arg4->sphere_path.curr_pos.frame.m_fOrigin.z;
00511f27                  return 1;
00511f0c              }
00511eea          }
00511ec5      }
00511ec5      
00511f30      return 0;
00511e90  }

00511f33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00511f40  int32_t __fastcall CPhysicsObj::prepare_to_leave_visibility(class CPhysicsObj* this)

00511f40  {
00511f44      CPhysicsObj::remove_shadows_from_cells(this);
00511f50      CObjectMaint::RemoveFromLostCell(CPhysicsObj::obj_maint, this);
00511f59      CPhysicsObj::leave_cell(this, 0);
00511f68      CObjectMaint::AddObjectToBeDestroyed(CPhysicsObj::obj_maint, this->id);
00511f6d      int32_t esi = 0;
00511f6d      
00511f70      while (true)
00511f70      {
00511f70          class CHILDLIST* children = this->children;
00511f70          
00511f7a          if ((children == 0 || esi >= children->num_objects))
00511f9e              return 1;
00511f9e          
00511f8f          CObjectMaint::AddObjectToBeDestroyed(CPhysicsObj::obj_maint, children->objects.data[((uint32_t)esi)]->id);
00511f94          esi += 1;
00511f70      }
00511f40  }

00511f9f                                                                                               90                                 .

00511fa0  void __fastcall CPhysicsObj::prepare_to_enter_world(class CPhysicsObj* this)

00511fa0  {
00511faf      this->update_time = (*(uint32_t*)Timer::cur_time);
00511fb5      *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00511fc2      CObjectMaint::RemoveFromLostCell(CPhysicsObj::obj_maint, this);
00511fc7      uint32_t id_1 = this->id;
00511fd0      uint32_t id_2 = id_1;
00511fd1      CObjectMaint::RemoveObjectToBeDestroyed(CPhysicsObj::obj_maint, id_1);
00511fd6      int32_t edi = 0;
00511fd6      
00511fd8      while (true)
00511fd8      {
00511fd8          class CHILDLIST* children = this->children;
00511fd8          
00511fdd          if (children == 0)
00511fdd              break;
00511fdd          
00511fe2          if (edi >= children->num_objects)
00511fe2              break;
00511fe2          
00511fe4          class CPhysicsObj** data = children->objects.data;
00511ff6          int32_t id = data[((uint32_t)edi)]->id;
00511ff7          CObjectMaint::RemoveObjectToBeDestroyed(CPhysicsObj::obj_maint, data);
00511ffc          edi += 1;
00511fd8      }
00511fd8      
00512006      if ((this->state & 1) == 0)
00512006      {
00512008          uint32_t transient_state = this->transient_state;
00512008          
00512010          if (transient_state >= 0)
00512010          {
0051201e              this->update_time = (*(uint32_t*)Timer::cur_time);
00512024              *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00512010          }
00512010          
0051202f          this->transient_state = (transient_state | 0x80);
00512006      }
00511fa0  }

00512038                                                                          90 90 90 90 90 90 90 90                          ........

00512040  void __thiscall CPhysicsObj::unpack_movement(class CPhysicsObj* this, void** arg2, uint32_t arg3)

00512040  {
0051204b      if (this->movement_manager == 0)
0051204b      {
0051205a          this->movement_manager = MovementManager::Create(this, this->weenie_obj);
00512060          class MovementManager* eax_2;
00512060          eax_2 = this->state;
00512060          
0051206b          if ((eax_2 & 1) == 0)
0051206b          {
0051206d              uint32_t transient_state = this->transient_state;
0051206d              
00512075              if (transient_state >= 0)
00512075              {
00512083                  this->update_time = (*(uint32_t*)Timer::cur_time);
00512089                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00512075              }
00512075              
00512094              this->transient_state = (transient_state | 0x80);
0051206b          }
0051204b      }
0051204b      
005120aa      MovementManager::unpack_movement(this->movement_manager, arg2, arg3);
00512040  }

005120b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005120c0  class CMotionInterp* __fastcall CPhysicsObj::get_minterp(class CPhysicsObj* this)

005120c0  {
005120cb      if (this->movement_manager == 0)
005120cb      {
005120d5          class MovementManager* eax_2 = MovementManager::Create(this, this->weenie_obj);
005120df          this->movement_manager = eax_2;
005120e5          MovementManager::EnterDefaultState(eax_2);
005120e5          
005120f1          if ((this->state & 1) == 0)
005120f1          {
005120f3              uint32_t transient_state = this->transient_state;
005120f3              
005120fb              if (transient_state >= 0)
005120fb              {
00512109                  this->update_time = (*(uint32_t*)Timer::cur_time);
0051210f                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005120fb              }
005120fb              
0051211a              this->transient_state = (transient_state | 0x80);
005120f1          }
005120cb      }
005120cb      
00512127      /* tailcall */
00512127      return MovementManager::get_minterp(this->movement_manager);
005120c0  }

0051212c                                      90 90 90 90                                                              ....

00512130  class PositionManager* __fastcall CPhysicsObj::get_position_manager(class CPhysicsObj* this)

00512130  {
00512133      CPhysicsObj::MakePositionManager(this);
0051213f      return this->position_manager;
00512130  }


00512140  void __thiscall CPhysicsObj::get_local_physics_velocity(class CPhysicsObj const* this, class AC1Legacy::Vector3* arg2)

00512140  {
00512164      long double x87_r7_3 = (((((long double)this->m_position.frame.m_fl2gv[1]) * ((long double)this->m_velocityVector.y)) + (((long double)this->m_position.frame.m_fl2gv[0]) * ((long double)this->m_velocityVector.x))) + (((long double)this->m_position.frame.m_fl2gv[2]) * ((long double)this->m_velocityVector.z)));
00512187      long double x87_r7_7 = (((((long double)this->m_position.frame.m_fl2gv[4]) * ((long double)this->m_velocityVector.y)) + (((long double)this->m_position.frame.m_fl2gv[3]) * ((long double)this->m_velocityVector.x))) + (((long double)this->m_position.frame.m_fl2gv[5]) * ((long double)this->m_velocityVector.z)));
005121a3      long double x87_r7_10 = ((((long double)this->m_position.frame.m_fl2gv[7]) * ((long double)this->m_velocityVector.y)) + (((long double)this->m_position.frame.m_fl2gv[6]) * ((long double)this->m_velocityVector.x)));
005121ab      long double x87_r6_11 = (((long double)this->m_position.frame.m_fl2gv[8]) * ((long double)this->m_velocityVector.z));
005121b5      arg2->x = ((float)x87_r7_3);
005121b7      arg2->y = ((float)x87_r7_7);
005121c4      arg2->z = ((float)(x87_r7_10 + x87_r6_11));
00512140  }

005121cd                                         90 90 90                                                               ...

005121d0  void* __thiscall CShadowObj::`vector deleting destructor'(class CShadowObj* this, uint32_t arg2)

005121d0  {
005121d1      int32_t ebx;
005121d1      ebx = arg2;
005121d1      
005121db      if ((ebx & 2) == 0)
005121db      {
0051221f          this->vtable = 0x7c62f8;
00512225          this->hash_next = nullptr;
00512228          this->id = 0;
00512228          
0051222b          if ((ebx & 1) != 0)
0051222e              operator delete(this);
0051222e          
0051223a          return this;
005121db      }
005121db      
005121dd      int32_t vtable = this->vtable;
005121e8      void* eax_1 = &this[vtable];
005121e8      
005121eb      if ((vtable - 1) >= 0)
005121eb      {
005121ed          int32_t edx_1 = vtable;
00512202          int32_t i;
00512202          
00512202          do
00512202          {
005121f2              eax_1 -= 0x18;
005121f5              i = edx_1;
005121f5              edx_1 -= 1;
005121f6              *(uint32_t*)eax_1 = 0x7c62f8;
005121fc              *(uint32_t*)((char*)eax_1 + 4) = 0;
005121ff              *(uint32_t*)((char*)eax_1 + 8) = 0;
00512202          } while (i != 1);
005121eb      }
005121eb      
00512207      if ((ebx & 1) != 0)
0051220a          operator delete[](((char*)this - 4));
0051220a      
00512217      return ((char*)this - 4);
005121d0  }

0051223d                                                                                         90 90 90                               ...

00512240  class HashBaseData<unsigned long>* __thiscall HashBase<unsigned long>::clobber(class HashBase<unsigned long>* this, class HashBaseData<unsigned long>* arg2)

00512240  {
00512244      class HashBaseData<unsigned long>* edi = arg2;
00512248      uint32_t id = edi->id;
00512257      class HashBaseData<unsigned long>* hash_next_1 = nullptr;
0051225b      uint32_t edx_3 = (((id >> ((int8_t)this->key_shift)) ^ id) & this->table_mask);
00512260      void* ecx_1 = &this->buckets[edx_3];
00512263      class HashBaseData<unsigned long>* hash_next = *(uint32_t*)ecx_1;
00512267      arg2 = hash_next;
00512267      
0051226b      if (hash_next == 0)
0051226b      {
0051226d          *(uint32_t*)ecx_1 = edi;
00512273          return hash_next;
0051226b      }
0051226b      
00512279      if (hash_next->id != id)
00512279      {
0051228f          do
0051228f          {
00512280              hash_next_1 = hash_next;
00512282              hash_next = hash_next->hash_next;
00512282              
00512287              if (hash_next == 0)
00512287              {
005122b0                  edi->hash_next = arg2;
005122b3                  this->buckets[edx_3] = edi;
005122bf                  return 0;
00512287              }
0051228f          } while (hash_next->id != edi->id);
00512279      }
00512279      
00512293      if (hash_next != edi)
00512293      {
00512297          if (hash_next_1 == 0)
00512297          {
0051229c              edi->hash_next = hash_next->hash_next;
0051229f              this->buckets[edx_3] = edi;
005122a9              return hash_next;
00512297          }
00512297          
005122c2          hash_next_1->hash_next = edi;
005122c8          edi->hash_next = hash_next->hash_next;
00512293      }
00512293      
005122cf      return hash_next;
00512240  }

0051227d                                                                                         8d 49 00                               .I.
005122d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005122e0  void __thiscall Frame::combine(class Frame* this, class Frame const* arg2, class Frame const* arg3)

005122e0  {
00512309      long double x87_r7_4 = ((((((long double)arg2->m_fl2gv[6]) * ((long double)arg3->m_fOrigin.z)) + (((long double)arg2->m_fl2gv[0]) * ((long double)arg3->m_fOrigin.x))) + (((long double)arg2->m_fl2gv[3]) * ((long double)arg3->m_fOrigin.y))) + ((long double)arg2->m_fOrigin.x));
0051232a      long double x87_r7_9 = ((((((long double)arg2->m_fl2gv[7]) * ((long double)arg3->m_fOrigin.z)) + (((long double)arg2->m_fl2gv[1]) * ((long double)arg3->m_fOrigin.x))) + (((long double)arg2->m_fl2gv[4]) * ((long double)arg3->m_fOrigin.y))) + ((long double)arg2->m_fOrigin.y));
00512347      long double x87_r7_14 = ((((((long double)arg2->m_fl2gv[8]) * ((long double)arg3->m_fOrigin.z)) + (((long double)arg2->m_fl2gv[2]) * ((long double)arg3->m_fOrigin.x))) + (((long double)arg2->m_fl2gv[5]) * ((long double)arg3->m_fOrigin.y))) + ((long double)arg2->m_fOrigin.z));
005122f9      this->m_fOrigin.x = ((float)x87_r7_4);
005122f9      this->m_fOrigin.y = ((float)x87_r7_9);
005122f9      this->m_fOrigin.z = ((float)x87_r7_14);
005123dd      Frame::set_rotate(this, ((float)((((((long double)arg2->qw) * ((long double)arg3->qw)) - (((long double)arg3->qx) * ((long double)arg2->qx))) - (((long double)arg3->qy) * ((long double)arg2->qy))) - (((long double)arg3->qz) * ((long double)arg2->qz)))), ((float)((((((long double)arg2->qw) * ((long double)arg3->qx)) + (((long double)arg3->qz) * ((long double)arg2->qy))) + (((long double)arg3->qw) * ((long double)arg2->qx))) - (((long double)arg3->qy) * ((long double)arg2->qz)))), ((float)((((((long double)arg3->qy) * ((long double)arg2->qw)) - (((long double)arg3->qz) * ((long double)arg2->qx))) + (((long double)arg2->qz) * ((long double)arg3->qx))) + (((long double)arg2->qy) * ((long double)arg3->qw)))), ((float)((((((long double)arg3->qy) * ((long double)arg2->qx)) + (((long double)arg3->qz) * ((long double)arg2->qw))) - (((long double)arg2->qy) * ((long double)arg3->qx))) + (((long double)arg2->qz) * ((long double)arg3->qw)))));
005122e0  }

005123ea                                90 90 90 90 90 90                                                            ......

005123f0  void __fastcall CPhysicsObj::CPhysicsObj(class CPhysicsObj* this)

005123f0  {
005123f6      __builtin_memset(&this->hash_next, 0, 0x18);
005123fc      this->vtable = 0x7c6b48;
0051240e      this->player_vector.z = 1f;
00512415      this->sound_table = nullptr;
00512418      this->m_bExaminationObject = 0;
0051241b      __builtin_memset(&this->script_manager, 0, 0x18);
00512435      this->player_distance = 3.40282347e+38f;
00512438      this->CYpt = 3.40282347e+38f;
0051243b      this->m_position.vtable = 0x796910;
00512442      this->m_position.objcell_id = 0;
0051242d      this->m_position.frame.qw = 0x3f800000;
0051242d      this->m_position.frame.qx = 0f;
0051242d      this->m_position.frame.qy = 0f;
0051242d      this->m_position.frame.qz = 0f;
0051242d      this->m_position.frame.m_fOrigin.x = 0;
0051242d      this->m_position.frame.m_fOrigin.y = 0f;
0051242d      this->m_position.frame.m_fOrigin.z = 0f;
0051245d      Frame::cache(&this->m_position.frame);
00512464      this->cell = nullptr;
0051246a      this->num_shadow_objects = 0;
00512470      void* eax = operator new[](0x64);
0051247a      void* eax_1;
0051247a      
0051247a      if (eax == 0)
0051249a          eax_1 = nullptr;
0051247a      else
0051247a      {
0051248a          *(uint32_t*)eax = 4;
00512490          `vector constructor iterator'(((char*)eax + 4), 0x18, 4, CShadowObj::CShadowObj);
00512495          eax_1 = ((char*)eax + 4);
0051247a      }
0051247a      
005124a2      this->shadow_objects.data = eax_1;
005124ae      this->shadow_objects.next_available = 0;
005124b4      this->shadow_objects.sizeOf = 4;
005124be      this->shadow_objects.blocksize = 4;
005124d3      this->elasticity = 0.0500000007f;
005124de      this->transient_state = 0;
005124e4      this->translucency = 0f;
005124ea      __builtin_strncpy(&this->friction, "33s?", 4);
005124f0      this->movement_manager = nullptr;
005124f6      this->position_manager = nullptr;
005124fc      this->last_move_was_autonomous = 0;
00512502      this->jumped_this_frame = 0;
00512508      this->state = 0x400c08;
00512514      this->translucencyOriginal = 0f;
0051251e      this->massinv = ((float)(((long double)1f) / ((long double)1f)));
00512524      __builtin_memset(&this->m_velocityVector, 0, 0x34);
00512572      __builtin_memset(&this->attack_radius, 0, 0x18);
00512596      __builtin_memset(&this->contact_plane_cell_id, 0, 0x36);
0051259c      this->m_scale = 1f;
005123f0  }

005125f8                                                                          90 90 90 90 90 90 90 90                          ........

00512600  class CPhysicsObj* CPhysicsObj::makeNullObject(uint32_t arg1, int32_t arg2)

00512600  {
00512605      void* eax = operator new(0x178);
00512605      
0051260f      if (eax != 0)
0051260f      {
00512613          class CPhysicsObj* result = CPhysicsObj::CPhysicsObj(eax);
00512613          
0051261c          if (result != 0)
0051261c          {
00512628              CPhysicsObj::InitObjectBegin(result, arg1, arg2);
00512633              return result;
0051261c          }
0051260f      }
0051260f      
0051263c      return 0;
00512600  }

0051263d                                                                                         90 90 90                               ...

00512640  class CPhysicsObj* CPhysicsObj::makeParticleObject(uint32_t arg1, class CSphere const* arg2)

00512640  {
00512646      void* eax = operator new(0x178);
00512646      
00512650      if (eax != 0)
00512650      {
00512654          class CPhysicsObj* result = CPhysicsObj::CPhysicsObj(eax);
00512654          
0051265d          if (result != 0)
0051265d          {
0051266f              uint32_t edx_2 = (result->state | 0x1001);
00512676              result->id = 0;
0051267d              result->state = edx_2;
00512683              class CPartArray* eax_2 = CPartArray::CreateParticle(result, arg1, arg2);
0051268d              result->part_array = eax_2;
0051268d              
00512690              if (eax_2 != 0)
00512695                  return result;
00512695              
00512696              result->vtable->__vecDelDtor(1);
0051265d          }
00512650      }
00512650      
005126a1      return 0;
00512640  }

005126a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005126b0  int32_t __thiscall CPhysicsObj::InitPartArrayObject(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

005126b0  {
005126bf      if (arg2 == INVALID_DID.id)
005126c5          return 0;
005126c5      
005126ca      int32_t ebx = 0;
005126cc      uint32_t eax_1 = MasterDBMap::DivineType(arg2);
005126d7      class CPartArray* eax_2;
005126d7      
005126d7      if (eax_1 != 6)
005126d7      {
005126f5          if (eax_1 == 7)
005126f5          {
005126fe              eax_2 = CPartArray::CreateSetup(this, arg2, arg3);
00512706              goto label_5126e5;
005126f5          }
005126f5          
0051270e          if ((arg2 & 0xff000000) != 0)
005126ef              return 0;
005126ef          
0051271e          ebx = 1;
0051271e          
0051272a          if (CPhysicsObj::makeAnimObject(this, (arg2 | 0x2000000), arg3) == 0)
005126ef              return 0;
005126d7      }
005126d7      else
005126d7      {
005126db          eax_2 = CPartArray::CreateMesh(this, arg2);
005126e5      label_5126e5:
005126e5          this->part_array = eax_2;
005126e5          
005126e8          if (eax_2 == 0)
005126ef              return 0;
005126d7      }
0051272e      CPhysicsObj::CacheHasPhysicsBSP(this);
0051272e      
00512735      if (ebx != 0)
00512735      {
00512743          uint32_t edx_2 = (this->transient_state & 0xfffffeff);
00512753          this->state |= 4;
00512759          this->transient_state = edx_2;
0051275f          CPhysicsObj::SetTranslucencyInternal(this, 0.25f);
00512764          this->state |= 0x10;
00512735      }
00512735      
00512773      return 1;
005126b0  }

00512776                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00512780  int32_t __thiscall CPhysicsObj::SetMotionTableID(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2)

00512780  {
00512784      class CPartArray* part_array = this->part_array;
00512784      
0051278c      if (part_array == 0)
005127da          return 0;
005127da      
00512793      int32_t result = CPartArray::SetMotionTableID(part_array, arg2);
00512793      
0051279c      if (result != 0)
0051279c      {
0051279f          class MovementManager* movement_manager = this->movement_manager;
0051279f          
005127a7          if (movement_manager != 0)
005127a7          {
005127ab              MovementManager::Destroy(movement_manager);
005127b1              operator delete(movement_manager);
005127a7          }
005127a7          
005127b9          this->movement_manager = nullptr;
005127b9          
005127ca          if (arg2 != INVALID_DID.id)
005127d0              CPhysicsObj::MakeMovementManager(this, 1);
0051279c      }
0051279c      
005127d5      return result;
00512780  }

005127dd                                                                                         90 90 90                               ...

005127e0  void __thiscall CPhysicsObj::stick_to_object(class CPhysicsObj* this, uint32_t arg2)

005127e0  {
005127e0      class CPhysicsObj* this_1 = this;
005127e4      CPhysicsObj::MakePositionManager(this);
005127e9      class CObjectMaint* CPhysicsObj::obj_maint_1 = CPhysicsObj::obj_maint;
005127e9      
005127f1      if (CPhysicsObj::obj_maint_1 != 0)
005127f1      {
005127f8          class CPhysicsObj* parent_2 = CObjectMaint::GetObjectA(CPhysicsObj::obj_maint_1, arg2);
005127f8          
005127ff          if (parent_2 != 0)
005127ff          {
00512802              class CPhysicsObj* parent_1 = parent_2;
00512804              class CPhysicsObj* parent = parent_2->parent;
00512804              
00512809              if (parent != 0)
0051280b                  parent_1 = parent;
0051280b              
0051280d              class CPartArray* part_array = parent_1->part_array;
0051280d              
00512812              if (part_array == 0)
0051281f                  arg2 = 0;
00512812              else
00512819                  arg2 = ((float)CPartArray::GetHeight(part_array));
00512819              
00512827              class CPartArray* part_array_1 = parent_1->part_array;
00512827              
0051282c              if (part_array_1 == 0)
00512839                  this_1 = nullptr;
0051282c              else
00512833                  this_1 = ((float)CPartArray::GetRadius(part_array_1));
00512833              
00512855              PositionManager::StickTo(this->position_manager, parent_1->id, this_1, arg2);
005127ff          }
005127f1      }
005127e0  }


00512860  void __thiscall CPhysicsObj::MoveToObject(class CPhysicsObj* this, uint32_t arg2, class MovementParameters const* arg3)

00512860  {
00512860      class CPhysicsObj* this_1 = this;
00512860      
0051286c      if (this->movement_manager == 0)
0051286c      {
00512876          class MovementManager* eax_2 = MovementManager::Create(this, this->weenie_obj);
00512880          this->movement_manager = eax_2;
00512886          MovementManager::EnterDefaultState(eax_2);
00512886          
00512892          if ((this->state & 1) == 0)
00512892          {
00512894              uint32_t transient_state = this->transient_state;
00512894              
0051289c              if (transient_state >= 0)
0051289c              {
005128aa                  this->update_time = (*(uint32_t*)Timer::cur_time);
005128b0                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051289c              }
0051289c              
005128bb              this->transient_state = (transient_state | 0x80);
00512892          }
0051286c      }
0051286c      
005128c1      class CObjectMaint* CPhysicsObj::obj_maint_1 = CPhysicsObj::obj_maint;
005128c1      
005128c9      if (CPhysicsObj::obj_maint_1 != 0)
005128c9      {
005128cc          uint32_t ebx_1 = arg2;
005128d2          class CPhysicsObj* parent_2 = CObjectMaint::GetObjectA(CPhysicsObj::obj_maint_1, ebx_1);
005128d2          
005128db          if (parent_2 != 0)
005128db          {
005128dd              class CPartArray* part_array = parent_2->part_array;
005128dd              
005128e2              if (part_array == 0)
005128ef                  arg2 = 0;
005128e2              else
005128e9                  arg2 = ((float)CPartArray::GetHeight(part_array));
005128e9              
005128f7              class CPartArray* part_array_1 = parent_2->part_array;
005128f7              
005128fc              if (part_array_1 == 0)
00512909                  this_1 = nullptr;
005128fc              else
00512903                  this_1 = ((float)CPartArray::GetRadius(part_array_1));
00512903              
00512911              class CPhysicsObj* parent_1 = parent_2;
00512913              class CPhysicsObj* parent = parent_2->parent;
00512913              
00512918              if (parent != 0)
0051291a                  parent_1 = parent;
0051291a              
00512932              CPhysicsObj::MoveToObject_Internal(this, ebx_1, parent_1->id, this_1, arg2, arg3);
005128db          }
005128c9      }
00512860  }

0051293e                                                                                            90 90                                ..

00512940  void __thiscall CPhysicsObj::TurnToObject(class CPhysicsObj* this, uint32_t arg2, class MovementParameters const* arg3)

00512940  {
00512943      class CObjectMaint* CPhysicsObj::obj_maint_1 = CPhysicsObj::obj_maint;
00512943      
0051294b      if (CPhysicsObj::obj_maint_1 != 0)
0051294b      {
00512953          class CPhysicsObj* parent_2 = CObjectMaint::GetObjectA(CPhysicsObj::obj_maint_1, arg2);
00512953          
0051295a          if (parent_2 != 0)
0051295a          {
0051295c              class CPhysicsObj* parent_1 = parent_2;
0051295e              class CPhysicsObj* parent = parent_2->parent;
0051295e              
00512963              if (parent != 0)
00512965                  parent_1 = parent;
00512965              
00512973              CPhysicsObj::TurnToObject_Internal(this, arg2, parent_1->id, arg3);
0051295a          }
0051294b      }
00512940  }

0051297d                                                                                         90 90 90                               ...

00512980  void __thiscall CPhysicsObj::TurnToHeading(class CPhysicsObj* this, class MovementParameters const* arg2)

00512980  {
0051298e      if (this->movement_manager == 0)
0051298e      {
00512998          class MovementManager* eax_2 = MovementManager::Create(this, this->weenie_obj);
005129a2          this->movement_manager = eax_2;
005129a8          MovementManager::EnterDefaultState(eax_2);
005129a8          
005129b4          if ((this->state & 1) == 0)
005129b4          {
005129b6              uint32_t transient_state = this->transient_state;
005129b6              
005129be              if (transient_state >= 0)
005129be              {
005129cc                  this->update_time = (*(uint32_t*)Timer::cur_time);
005129d2                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005129be              }
005129be              
005129dd              this->transient_state = (transient_state | 0x80);
005129b4          }
0051298e      }
0051298e      
005129e7      int32_t var_64 = 0;
005129ef      int32_t var_54 = 0x796910;
005129f7      int32_t var_50 = 0;
005129ff      int32_t var_4c = 0x3f800000;
00512a07      int32_t var_48 = 0;
00512a0f      int32_t var_44 = 0;
00512a17      int32_t var_40 = 0;
00512a1f      int32_t var_18 = 0;
00512a27      int32_t var_14 = 0;
00512a2f      int32_t var_10 = 0;
00512a37      Frame::cache(&var_4c);
00512a45      class MovementManager* movement_manager = this->movement_manager;
00512a4b      var_64 = 9;
00512a53      class MovementParameters* var_4 = arg2;
00512a57      MovementManager::PerformMovement(movement_manager, &var_64);
00512980  }

00512a63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00512a70  void __thiscall CPhysicsObj::attack(class CPhysicsObj* this, class AttackCone const* arg2)

00512a70  {
00512a85      if (this->cell->m_DID.id != INVALID_DID.id)
00512a85      {
00512a93          if (this->attack_manager == 0)
00512a93          {
00512a97              void* eax_3 = operator new(0x10);
00512aa1              class AttackManager* eax_4;
00512aa1              
00512aa1              if (eax_3 == 0)
00512aac                  eax_4 = nullptr;
00512aa1              else
00512aa5                  eax_4 = AttackManager::AttackManager(eax_3);
00512aa5              
00512aae              this->attack_manager = eax_4;
00512a93          }
00512a93          
00512ab7          class AttackCone* edi_1 = arg2;
00512ae4          long double x87_r7_3 = ((long double)this->m_scale);
00512aea          float var_24_1 = ((float)(((long double)edi_1->height) * ((long double)this->m_scale)));
00512aee          class AttackManager* attack_manager = this->attack_manager;
00512af6          int32_t var_2c = 0;
00512afa          int32_t var_28_1 = 0;
00512afe          long double x87_r6_1;
00512afe          
00512afe          if (attack_manager == 0)
00512b04              x87_r6_1 = ((long double)0f);
00512afe          else
00512b00              x87_r6_1 = ((long double)attack_manager->attack_radius);
00512b00          
00512b15          float var_20_1 = ((float)((x87_r7_3 * ((long double)edi_1->radius)) + x87_r6_1));
00512b1b          void var_1c;
00512b1b          CELLARRAY::CELLARRAY(&var_1c);
00512b30          int32_t var_18_1 = 1;
00512b38          CObjCell::find_cell_list(&this->m_position, &var_2c, &var_1c, nullptr);
00512b49          class AttackInfo* eax_7 = AttackManager::NewAttack(this->attack_manager, edi_1->part_index);
00512b54          class AttackCone* eax_8 = nullptr;
00512b58          arg2 = nullptr;
00512b5c          int32_t var_14;
00512b5c          void* var_10;
00512b5c          
00512b5c          if (var_14 > 0)
00512b5c          {
00512b8e              do
00512b8e              {
00512b64                  class CObjCell* ecx_5 = *(uint32_t*)(((char*)var_10 + (eax_8 << 3)) + 4);
00512b64                  
00512b6a                  if (ecx_5 != 0)
00512b6a                  {
00512b7a                      CObjCell::check_attack(ecx_5, this->id, &this->m_position, this->m_scale, edi_1, eax_7);
00512b7f                      eax_8 = arg2;
00512b6a                  }
00512b6a                  
00512b87                  eax_8 = (&eax_8->part_index + 1);
00512b8a                  arg2 = eax_8;
00512b8e              } while (eax_8 < var_14);
00512b5c          }
00512b5c          
00512b95          if (eax_7->waiting_for_cells == 0)
00512b9a              CPhysicsObj::report_attacks(this, eax_7);
00512b9a          
00512ba8          if (var_10 != 0)
00512bae              operator delete[](((char*)var_10 - 4));
00512a85      }
00512a70  }

00512bbd                                                                                         90 90 90                               ...

00512bc0  void __thiscall CPhysicsObj::HandleUpdateTarget(class CPhysicsObj* this, class TargetInfo arg2)

00512bc0  {
00512bc9      if (arg2.context_id == 0)
00512bc9      {
00512bd3          void var_d4;
00512bd3          
00512bd3          if (this->movement_manager != 0)
00512bd3          {
00512be5              TargetInfo::TargetInfo(&var_d4, &arg2);
00512bf0              MovementManager::HandleUpdateTarget(this->movement_manager, var_d4);
00512bd3          }
00512bd3          
00512bfd          if (this->position_manager != 0)
00512bfd          {
00512c0f              TargetInfo::TargetInfo(&var_d4, &arg2);
00512c1a              PositionManager::HandleUpdateTarget(this->position_manager, var_d4);
00512bfd          }
00512bc9      }
00512bc0  }

00512c23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00512c30  void __thiscall CPhysicsObj::UpdatePositionInternal(class CPhysicsObj* this, float arg2, class Frame* arg3)

00512c30  {
00512c3c      int32_t var_40 = 0x3f800000;
00512c44      int32_t var_3c = 0;
00512c4c      int32_t var_38 = 0;
00512c54      int32_t var_34 = 0;
00512c5c      float var_c = 0f;
00512c64      float var_8 = 0f;
00512c6c      float var_4 = 0f;
00512c74      Frame::cache(&var_40);
00512c74      
00512c86      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x40) == 0)
00512c86      {
00512c88          class CPartArray* part_array = this->part_array;
00512c88          
00512c8d          if (part_array != 0)
00512c95              CPartArray::Update(part_array, arg2, &var_40);
00512c95          
00512ca1          if ((this->transient_state & 2) == 0)
00512ca1          {
00512cd5              float var_c_2 = ((float)(((long double)var_c) * ((long double)0f)));
00512ce3              float var_8_2 = ((float)(((long double)var_8) * ((long double)0f)));
00512cf1              float var_4_2 = ((float)(((long double)var_4) * ((long double)0f)));
00512ca1          }
00512ca1          else
00512ca1          {
00512ca3              long double x87_r7_1 = ((long double)this->m_scale);
00512caf              float var_c_1 = ((float)(((long double)var_c) * x87_r7_1));
00512cb9              float var_8_1 = ((float)(((long double)var_8) * x87_r7_1));
00512cc3              float var_4_1 = ((float)(((long double)var_4) * x87_r7_1));
00512ca1          }
00512c86      }
00512c86      
00512cf5      class PositionManager* position_manager = this->position_manager;
00512cf5      
00512cfd      if (position_manager != 0)
00512cfd      {
00512d0a          float var_54;
00512d0a          var_54 = ((double)((long double)arg2));
00512d0e          PositionManager::adjust_offset(position_manager, &var_40, var_54);
00512cfd      }
00512cfd      
00512d22      Frame::combine(arg3, &this->m_position.frame, &var_40);
00512d22      
00512d30      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x40) == 0)
00512d36          CPhysicsObj::UpdatePhysicsInternal(this, arg2, arg3);
00512d36      
00512d3d      CPhysicsObj::process_hooks(this);
00512c30  }

00512d4b                                   90 90 90 90 90                                                             .....

00512d50  void __thiscall CPhysicsObj::UpdateChild(class CPhysicsObj* this, class CPhysicsObj* arg2, uint32_t arg3, class Frame const* arg4)

00512d50  {
00512d50      class CPartArray* part_array = this->part_array;
00512d5e      class Frame* var_48;
00512d5e      class Frame* ecx_2;
00512d5e      
00512d5e      if (arg3 >= part_array->num_parts)
00512d5e      {
00512d74          var_48 = arg4;
00512d75          ecx_2 = &this->m_position.frame;
00512d5e      }
00512d5e      else
00512d5e      {
00512d67          var_48 = arg4;
00512d6b          ecx_2 = &part_array->parts[arg3]->pos.frame.qw;
00512d5e      }
00512d5e      
00512d7d      void var_40;
00512d7d      Frame::combine(&var_40, ecx_2, var_48);
00512d8d      CPhysicsObj::set_frame(arg2, &var_40);
00512d92      class ParticleManager* particle_manager = arg2->particle_manager;
00512d92      
00512d9a      if (particle_manager != 0)
00512d9c          ParticleManager::UpdateParticles(particle_manager);
00512d9c      
00512da1      class ScriptManager* script_manager = arg2->script_manager;
00512da1      
00512da7      if (script_manager != 0)
00512da9          ScriptManager::UpdateScripts(script_manager);
00512d50  }

00512db4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00512dc0  class CTransition const* __thiscall CPhysicsObj::transition(class CPhysicsObj* this, class Position const* arg2, class Position const* arg3, int32_t arg4)

00512dc0  {
00512dc4      class CTransition* result = CTransition::makeTransition();
00512dc4      
00512dcd      if (result != 0)
00512dcd      {
00512de4          CTransition::init_object(result, this, CPhysicsObj::get_object_info(this, result, arg4));
00512de9          class CPartArray* part_array = this->part_array;
00512dee          uint32_t eax_2;
00512dee          
00512dee          if (part_array != 0)
00512df0              eax_2 = CPartArray::GetNumSphere(part_array);
00512df0          
00512df7          if ((part_array == 0 || eax_2 == 0))
00512e54              CTransition::init_sphere(result, 1, &dummy_sphere, 1f);
00512df7          else
00512df7          {
00512dff              arg4 = this->m_scale;
00512e03              class CPartArray* part_array_1 = this->part_array;
00512e09              class CSphere* ebx_1;
00512e09              
00512e09              if (part_array_1 == 0)
00512e14                  ebx_1 = nullptr;
00512e09              else
00512e10                  ebx_1 = CPartArray::GetSphere(part_array_1);
00512e10              
00512e16              class CPartArray* part_array_2 = this->part_array;
00512e16              
00512e1b              if (part_array_2 == 0)
00512e3e                  CTransition::init_sphere(result, 0, ebx_1, arg4);
00512e1b              else
00512e2b                  CTransition::init_sphere(result, CPartArray::GetNumSphere(part_array_2), ebx_1, arg4);
00512df7          }
00512df7          
00512e6c          CTransition::init_path(result, this->cell, arg2, arg3);
00512e71          uint8_t transient_state = ((int8_t)this->transient_state);
00512e71          
00512e79          if ((transient_state & 0x40) != 0)
00512e7b              result->collision_info.frames_stationary_fall = 3;
00512e79          else if ((transient_state & 0x20) != 0)
00512e8b              result->collision_info.frames_stationary_fall = 2;
00512e89          else if ((transient_state & 0x10) != 0)
00512e9b              result->collision_info.frames_stationary_fall = 1;
00512e9b          
00512ea7          int32_t eax_6 = CTransition::find_valid_position(result);
00512eaf          CTransition::cleanupTransition(result);
00512eaf          
00512eb9          if (eax_6 != 0)
00512ebf              return result;
00512dcd      }
00512dcd      
00512ec6      return 0;
00512dc0  }

00512ec9                             90 90 90 90 90 90 90                                                           .......

00512ed0  int32_t __thiscall CPhysicsObj::check_collision(class CPhysicsObj const* this, class CPhysicsObj const* arg2)

00512ed0  {
00512ed0      class CPhysicsObj* m_scale = this;
00512ed0      
00512edb      if ((this->state & 1) != 0)
00512ee1          return 0;
00512ee1      
00512ee5      class CTransition* eax_1 = CTransition::makeTransition();
00512ee5      
00512eee      if (eax_1 == 0)
00512fae          return 0;
00512fae      
00512f02      CTransition::init_object(eax_1, this, CPhysicsObj::get_object_info(this, eax_1, 0));
00512f07      class CPartArray* part_array = this->part_array;
00512f0c      uint32_t eax_3;
00512f0c      
00512f0c      if (part_array != 0)
00512f0e          eax_3 = CPartArray::GetNumSphere(part_array);
00512f0e      
00512f15      if ((part_array == 0 || eax_3 == 0))
00512f72          CTransition::init_sphere(eax_1, 1, &dummy_sphere, 1f);
00512f15      else
00512f15      {
00512f17          class CPartArray* part_array_1 = this->part_array;
00512f23          m_scale = this->m_scale;
00512f27          class CSphere* ebx_1;
00512f27          
00512f27          if (part_array_1 == 0)
00512f32              ebx_1 = nullptr;
00512f27          else
00512f2e              ebx_1 = CPartArray::GetSphere(part_array_1);
00512f2e          
00512f34          class CPartArray* part_array_2 = this->part_array;
00512f34          
00512f39          if (part_array_2 == 0)
00512f5c              CTransition::init_sphere(eax_1, 0, ebx_1, m_scale);
00512f39          else
00512f49              CTransition::init_sphere(eax_1, CPartArray::GetNumSphere(part_array_2), ebx_1, m_scale);
00512f15      }
00512f15      
00512f85      CTransition::init_path(eax_1, this->cell, &this->m_position, &this->m_position);
00512f91      int32_t result = CTransition::check_collisions(eax_1, arg2);
00512f99      CTransition::cleanupTransition(eax_1);
00512fa6      return result;
00512ed0  }

00512fb1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00512fc0  int32_t __thiscall CPhysicsObj::report_environment_collision(class CPhysicsObj* this, int32_t arg2)

00512fc0  {
00512fcc      int32_t result = 0;
00512fcc      
00512fd0      if (this->colliding_with_environment == 0)
00512fd0      {
00512fe3          if (((this->state & 8) != 0 && this->weenie_obj != 0))
00512fe3          {
00512fe9              float x;
00512fe9              EnvCollisionProfile::EnvCollisionProfile(&x);
00512ffc              x = this->m_velocityVector.x;
00513009              float y = this->m_velocityVector.y;
0051300d              float z = this->m_velocityVector.z;
00513011              EnvCollisionProfile::SetMeInContact(&x, arg2);
00513023              *(int32_t*)((char*)this->weenie_obj->vtable + 0x4c)(&x);
00513026              result = 1;
00512fe3          }
00512fe3          
0051302b          uint32_t state = this->state;
00513034          this->colliding_with_environment = 1;
00513034          
0051303e          if ((state & 0x40) != 0)
00513046              this->state = (state & 0xfffffcbf);
00512fd0      }
00512fd0      
00513050      return result;
00512fc0  }

00513053                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00513060  int32_t __thiscall CPhysicsObj::report_object_collision(class CPhysicsObj* this, class CPhysicsObj const* arg2, int32_t arg3)

00513060  {
00513068      uint32_t state_2 = arg2->state;
0051306e      int32_t result = 0;
0051306e      
00513079      if ((state_2 & 0x200000) != 0)
0051308a          return CPhysicsObj::report_environment_collision(this, arg3);
0051308a      
00513093      uint32_t state = this->state;
005130a2      int32_t ebx_1 = (state & 0x40);
005130a8      float var_28 = ((float)(((long double)this->m_velocityVector.x) - ((long double)arg2->m_velocityVector.x)));
005130b8      float var_24 = ((float)(((long double)this->m_velocityVector.y) - ((long double)arg2->m_velocityVector.y)));
005130c8      float var_20 = ((float)(((long double)this->m_velocityVector.z) - ((long double)arg2->m_velocityVector.z)));
005130cc      int32_t var_34;
005130cc      void var_1c;
005130cc      
005130cc      if ((state_2 & 0x10) == 0)
005130cc      {
005130e3          if (((state & 8) != 0 && this->weenie_obj != 0))
005130e3          {
005130eb              if (ebx_1 == 0)
005130eb              {
0051313a                  ObjCollisionProfile::ObjCollisionProfile(&var_1c);
00513165                  CPhysicsObj::build_collision_profile(this, &var_1c, arg2, &var_28, arg3, (arg2->state & 0x40), (arg2->transient_state & 1));
00513177                  *(int32_t*)((char*)this->weenie_obj->vtable + 0x50)(&var_1c);
005130eb              }
005130eb              else
005130eb              {
005130f9                  int32_t var_4c_1 = CPhysicsObj::GetHeight(arg2);
00513100                  long double x87_r0;
00513100                  uint32_t eax_2 = Position::determine_quadrant(&arg2->m_position, ((float)x87_r0), &this->m_position);
0051310b                  AtkCollisionProfile::AtkCollisionProfile(&var_34);
00513113                  class CWeenieObject* weenie_obj = this->weenie_obj;
00513119                  uint32_t id = arg2->id;
00513121                  var_34 = 0xffffffff;
00513129                  uint32_t var_2c_1 = eax_2;
0051312d                  weenie_obj->vtable->DoCollision(&var_34);
005130eb              }
005130eb              
0051317a              result = 1;
005130e3          }
005130e3          
00513181          if (ebx_1 != 0)
00513183              this->state &= 0xfffffcbf;
005130cc      }
005130cc      
0051318d      uint8_t state_1 = ((int8_t)arg2->state);
0051318d      
005131b1      if (((state_1 & 8) == 0 || ((this->state & 0x10) != 0 || arg2->weenie_obj == 0)))
00513255          return result;
00513255      
005131ba      if ((state_1 & 0x40) == 0)
005131ba      {
00513213          ObjCollisionProfile::ObjCollisionProfile(&var_1c);
00513235          CPhysicsObj::build_collision_profile(arg2, &var_1c, this, &var_28, (arg2->transient_state & 1), arg3, ebx_1);
00513247          *(int32_t*)((char*)arg2->weenie_obj->vtable + 0x50)(&var_1c);
0051324a          return 1;
005131ba      }
005131ba      
005131c7      int32_t var_48_4 = CPhysicsObj::GetHeight(this);
005131cb      float var_48_5 = ((float)/* float var_48_5 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
005131cb      /* unimplemented  {fstp dword [esp], st0} */;
005131ce      uint32_t eax_6 = Position::determine_quadrant(&this->m_position, var_48_5, &arg2->m_position);
005131d9      AtkCollisionProfile::AtkCollisionProfile(&var_34);
005131e1      class CWeenieObject* weenie_obj_1 = arg2->weenie_obj;
005131e7      uint32_t id_1 = this->id;
005131ef      var_34 = 0xffffffff;
005131f7      uint32_t var_2c_2 = eax_6;
005131fb      weenie_obj_1->vtable->DoCollision(&var_34);
0051320c      return 1;
00513060  }

00513258                                                                          90 90 90 90 90 90 90 90                          ........

00513260  int32_t __thiscall CPhysicsObj::play_script(class CPhysicsObj* this, enum PScriptType arg2, float arg3)

00513260  {
0051326b      if (this->cell == 0)
00513273          return 1;
00513273      
00513276      class PhysicsScriptTable* physics_script_table = this->physics_script_table;
00513276      
0051327d      if (physics_script_table == 0)
005132a0          return 0;
005132a0      
0051328e      PhysicsScriptTable::GetScript(physics_script_table, &arg3, arg2, arg3);
0051329a      return CPhysicsObj::play_script_internal(this, arg3);
00513260  }

005132a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005132b0  int32_t __fastcall CPhysicsObj::play_default_script(class CPhysicsObj* this)

005132b0  {
005132b0      class CPhysicsObj* __return = this;
005132b0      
005132bc      if (this->cell == 0)
005132c5          return 1;
005132c5      
005132c6      class PhysicsScriptTable* physics_script_table = this->physics_script_table;
005132c6      
005132cd      if (physics_script_table == 0)
005132f2          return 0;
005132f2      
005132d5      class PhysicsScriptTable* physics_script_table_1 = physics_script_table;
005132df      PhysicsScriptTable::GetScript(physics_script_table, &__return, this->default_script, ((float)((long double)this->default_script_intensity)));
005132eb      return CPhysicsObj::play_script_internal(this, __return);
005132b0  }

005132f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00513300  int32_t __thiscall CPhysicsObj::play_default_script(class CPhysicsObj* this, uint32_t arg2)

00513300  {
00513300      class CHILDLIST* children = this->children;
00513300      
00513307      if (children != 0)
00513307      {
0051330d          int32_t edx_1 = 0;
0051330d          
00513313          while (edx_1 < children->num_objects)
00513313          {
0051331b              int32_t* eax_2 = (((uint32_t)edx_1) << 2);
0051331b              
0051332a              if ((*(uint32_t*)((char*)eax_2 + children->part_numbers.data) == arg2 && *(uint32_t*)((char*)eax_2 + children->objects.data) != 0))
0051332a              {
00513335                  class CPhysicsObj* esi_2 = children->objects.data[((uint32_t)edx_1)];
00513335                  
00513340                  if (esi_2->cell == 0)
00513349                      return 1;
00513349                  
0051334c                  class PhysicsScriptTable* physics_script_table = esi_2->physics_script_table;
0051334c                  
00513353                  if (physics_script_table == 0)
00513340                      break;
00513340                  
0051335b                  class PhysicsScriptTable* physics_script_table_1 = physics_script_table;
00513365                  PhysicsScriptTable::GetScript(physics_script_table, &arg2, esi_2->default_script, ((float)((long double)esi_2->default_script_intensity)));
00513378                  return CPhysicsObj::play_script_internal(esi_2, arg2);
0051332a              }
0051332a              
0051332c              edx_1 += 1;
00513313          }
00513307      }
00513307      
0051337f      return 0;
00513300  }

00513382        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00513390  void __thiscall CPhysicsObj::change_cell(class CPhysicsObj* this, class CObjCell* arg2)

00513390  {
0051339b      if (this->cell != 0)
0051339f          CPhysicsObj::leave_cell(this, 1);
0051339f      
005133aa      if (arg2 != 0)
005133aa      {
005133af          CPhysicsObj::enter_cell(this, arg2);
005133b5          return;
005133aa      }
005133aa      
005133c1      this->m_position.objcell_id = 0;
005133c1      
005133c8      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
005133c8      {
005133ca          class CPartArray* part_array = this->part_array;
005133ca          
005133cf          if (part_array != 0)
005133d3              CPartArray::SetCellID(part_array, 0);
005133c8      }
005133c8      
005133d8      this->cell = nullptr;
00513390  }

005133e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005133f0  void __thiscall CPhysicsObj::RemoveObjectFromSingleCell(class CPhysicsObj* this, class CObjCell* arg2)

005133f0  {
005133fc      if (this->cell != 0)
00513400          CPhysicsObj::leave_cell(this, 1);
00513400      
0051340e      this->m_position.objcell_id = 0;
0051340e      
00513415      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00513415      {
00513417          class CPartArray* part_array = this->part_array;
00513417          
0051341c          if (part_array != 0)
00513420              CPartArray::SetCellID(part_array, 0);
00513415      }
00513415      
0051342b      this->cell = nullptr;
0051342b      
00513435      if (arg2 != 0)
00513435      {
00513440          CObjCell::remove_shadow_object(arg2, this->shadow_objects.data);
00513445          class CPartArray* part_array_1 = this->part_array;
0051344a          this->num_shadow_objects = 0;
0051344a          
00513454          if (part_array_1 != 0)
00513457              CPartArray::RemoveParts(part_array_1, arg2);
00513435      }
005133f0  }

00513461     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00513470  void __fastcall CPhysicsObj::unset_parent(class CPhysicsObj* this)

00513470  {
00513473      class CPhysicsObj* parent = this->parent;
00513473      
00513478      if (parent == 0)
005134d4          return;
005134d4      
0051347a      class CHILDLIST* children = parent->children;
0051347a      
0051347f      if (children != 0)
00513484          CHILDLIST::remove_child(children, this);
00513484      
00513495      if ((*(uint8_t*)((char*)((int16_t)this->parent->state))[1] & 0x40) != 0)
00513495      {
00513497          this->state &= 0xffffffdf;
0051349e          class CPartArray* part_array = this->part_array;
0051349e          
005134a3          if (part_array != 0)
005134a7              CPartArray::SetNoDrawInternal(part_array, 0);
00513495      }
00513495      
005134ac      this->parent = nullptr;
005134bf      this->update_time = (*(uint32_t*)Timer::cur_time);
005134c5      *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005134ce      /* tailcall */
005134ce      return CPhysicsObj::clear_transient_states(this);
00513470  }

005134d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005134e0  void __fastcall CPhysicsObj::unparent_children(class CPhysicsObj* this)

005134e0  {
005134e0      class CPhysicsObj* this_1 = this;
005134e0      
005134ea      while (true)
005134ea      {
005134ea          class CHILDLIST* children = this->children;
005134ea          
005134f9          if ((children == 0 || children->num_objects == 0))
005135b3              return;
005135b3          
00513502          class CPhysicsObj* esi_1 = *(uint32_t*)children->objects.data;
00513504          class CPhysicsObj* parent = esi_1->parent;
00513504          
00513509          if (parent != 0)
00513509          {
0051350b              class CHILDLIST* children_1 = parent->children;
0051350b              
00513510              if (children_1 != 0)
00513515                  CHILDLIST::remove_child(children_1, esi_1);
00513515              
00513526              if ((*(uint8_t*)((char*)((int16_t)esi_1->parent->state))[1] & 0x40) != 0)
00513526              {
00513528                  esi_1->state &= 0xffffffdf;
0051352f                  class CPartArray* part_array = esi_1->part_array;
0051352f                  
00513534                  if (part_array != 0)
00513538                      CPartArray::SetNoDrawInternal(part_array, 0);
00513526              }
00513526              
0051353d              uint32_t transient_state = esi_1->transient_state;
00513543              esi_1->parent = nullptr;
00513555              *(uint32_t*)((char*)esi_1->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00513560              esi_1->update_time = (*(uint32_t*)Timer::cur_time);
00513566              esi_1->transient_state = (transient_state & 0xfffffffe);
0051356c              CPhysicsObj::calc_acceleration(esi_1);
00513577              int32_t eax_5 = (esi_1->transient_state & 0xfffffff7);
00513584              esi_1->transient_state = (eax_5 & 0xfffffffd);
00513584              
0051358a              if ((eax_5 & 2) != 0)
0051358a              {
0051358c                  class MovementManager* movement_manager = esi_1->movement_manager;
0051358c                  
00513594                  if (movement_manager != 0)
00513596                      MovementManager::LeaveGround(movement_manager);
0051358a              }
0051358a              
0051359d              CPhysicsObj::calc_acceleration(esi_1);
005135a2              esi_1->transient_state &= 0xfffffe0b;
00513509          }
005134ea      }
005134e0  }

005135b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005135c0  void __thiscall CPhysicsObj::process_fp_hook(class CPhysicsObj* this, int32_t arg2, float arg3, void* arg4)

005135c0  {
005135c7      switch (arg2)
005135c7      {
005135d9          case 0:
005135d9          {
005135d9              CPhysicsObj::SetScaleStatic(this, arg3);
005135d9              break;
005135d9          }
005135e6          case 1:
005135e6          {
005135e6              CPhysicsObj::SetTranslucencyInternal(this, arg3);
005135e6              break;
005135e6          }
005135ee          case 2:
005135ee          {
005135ee              class CPartArray* part_array = this->part_array;
005135ee              
005135f3              if (part_array != 0)
005135ff                  CPartArray::SetPartTranslucencyInternal(part_array, arg4, arg3);
005135ee              break;
005135ee          }
00513607          case 3:
00513607          {
00513607              class CPartArray* part_array_1 = this->part_array;
00513607              
0051360c              if (part_array_1 != 0)
00513613                  CPartArray::SetLuminosityInternal(part_array_1, arg3);
00513607              break;
00513607          }
00513634          case 4:
00513634          {
00513634              class CPartArray* part_array_3 = this->part_array;
00513634              
00513639              if (part_array_3 != 0)
00513640                  CPartArray::SetDiffusionInternal(part_array_3, arg3);
00513634              break;
00513634          }
0051361b          case 5:
0051361b          {
0051361b              class CPartArray* part_array_2 = this->part_array;
0051361b              
00513620              if (part_array_2 != 0)
0051362c                  CPartArray::SetPartLuminosityInternal(part_array_2, arg4, arg3);
0051361b              break;
0051361b          }
00513648          case 6:
00513648          {
00513648              class CPartArray* part_array_4 = this->part_array;
00513648              
0051364d              if (part_array_4 != 0)
00513659                  CPartArray::SetPartDiffusionInternal(part_array_4, arg4, arg3);
00513648              break;
00513648          }
0051366b          case 7:
0051366b          {
0051366b              CPhysicsObj::CallPESInternal(this, arg4, arg3);
0051366b              break;
0051366b          }
005135c7      }
005135c0  }

00513673                                                           90                                                         .
00513674  uint32_t jump_table_513674[0x8] = 
00513674  {
00513674      [0x0] =  0x005135d4
00513678      [0x1] =  0x005135e1
0051367c      [0x2] =  0x005135ee
00513680      [0x3] =  0x00513607
00513684      [0x4] =  0x00513634
00513688      [0x5] =  0x0051361b
0051368c      [0x6] =  0x00513648
00513690      [0x7] =  0x00513661
00513694  }

00513694                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005136a0  void __thiscall CPhysicsObj::SetScale(class CPhysicsObj* this, float arg2, double arg3)

005136a0  {
005136a0      long double x87_r7 = ((long double)0.000199999995f);
005136a9      long double temp1 = ((long double)arg3);
005136a9      (x87_r7 - temp1);
005136a9      
005136b5      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005136b5      {
005136b7          class CPartArray* part_array = this->part_array;
005136c0          this->m_scale = arg2;
005136c0          
005136c6          if (part_array != 0)
005136c6          {
005136ce              float var_8 = arg2;
005136d7              float var_c = arg2;
005136db              float var_4 = arg2;
005136df              CPartArray::SetScaleInternal(part_array, &var_c);
005136c6          }
005136c6          
005136c6          return;
005136b5      }
005136b5      
005136ed      void* eax_2 = operator new(0x38);
005136f7      class PhysicsObjHook* eax_3;
005136f7      
005136f7      if (eax_2 == 0)
0051372e          eax_3 = nullptr;
005136f7      else
005136f7      {
005136f9          float m_scale = this->m_scale;
0051370b          int32_t var_24_1 = *(uint32_t*)((char*)arg3)[4];
00513712          float m_scale_1 = m_scale;
00513721          int32_t var_2c_1 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
00513727          eax_3 = FPHook::FPHook(eax_2, SCALING, (*(uint32_t*)PhysicsTimer::curr_time), arg3, m_scale, arg2, nullptr);
005136f7      }
005136f7      
00513730      class PhysicsObjHook* hooks = this->hooks;
00513730      
0051373a      for (class PhysicsObjHook* next = hooks; next != 0; next = next->next)
0051373a      {
0051373a      }
0051373a      
00513749      if (hooks != 0)
0051374b          hooks->prev = eax_3;
0051374b      
00513754      eax_3->next = this->hooks;
00513757      this->hooks = eax_3;
005136a0  }

00513764              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00513770  void __thiscall CPhysicsObj::queue_netblob(class CPhysicsObj* this, class NetBlob* arg2)

00513770  {
00513778      if (this->netblob_list == 0)
00513778      {
0051377c          class NIList<NetBlob *>* eax_1 = operator new(8);
0051377c          
00513786          if (eax_1 == 0)
00513797              eax_1 = nullptr;
00513786          else
00513786          {
00513788              eax_1->head_ = 0;
0051378e              eax_1->tail_ = nullptr;
00513786          }
00513786          
00513799          this->netblob_list = eax_1;
00513778      }
00513778      
005137a5      InterlockedIncrement(&arg2->m_cRef);
005137ab      class NIList<NetBlob *>* netblob_list = this->netblob_list;
005137b0      class NIListElement<NetBlob *>* eax_3 = operator new(8);
005137b0      
005137ba      if (eax_3 == 0)
005137c7          eax_3 = nullptr;
005137ba      else
005137ba      {
005137bc          eax_3->data_ = arg2;
005137be          eax_3->next_ = nullptr;
005137ba      }
005137ba      
005137c9      class NIListElement<NetBlob *>* tail_ = netblob_list->tail_;
005137c9      
005137cf      if (tail_ == 0)
005137cf      {
005137d1          netblob_list->head_ = eax_3;
005137d3          netblob_list->tail_ = eax_3;
005137d7          return;
005137cf      }
005137cf      
005137da      tail_->next_ = eax_3;
005137e3      netblob_list->tail_ = netblob_list->tail_->next_;
00513770  }

005137ea                                90 90 90 90 90 90                                                            ......

005137f0  void __thiscall LongNIValHash<CPhysicsObj::CollisionRecord>::LongNIValHash<CPhysicsObj::CollisionRecord>(class LongNIValHash<CPhysicsObj::CollisionRecord>* this, uint32_t arg2)

005137f0  {
00513800      this->vtable = 0x7c66b0;
00513806      this->fPlacementNew_ = 0;
00513818      this->buckets = operator new[]((arg2 << 2));
0051381b      HashBase<unsigned long>::InternalInit(this, arg2);
00513821      this->vtable = &LongNIValHash<class CPhysicsObj::CollisionRecord>::`vftable';
005137f0  }

0051382d                                         90 90 90                                                               ...

00513830  int32_t __thiscall LongNIValHash<CPhysicsObj::CollisionRecord>::clobber(class LongNIValHash<CPhysicsObj::CollisionRecord>* this, class CPhysicsObj::CollisionRecord* arg2, uint32_t arg3)

00513830  {
00513830      class LongNIValHash<CPhysicsObj::CollisionRecord>* this_1 = this;
00513838      void* eax = operator new(0x20);
00513838      
00513846      if (eax == 0)
00513880          eax = nullptr;
00513846      else
00513846      {
00513850          int32_t ecx = arg2->touched_time;
00513852          int32_t edx_1 = *(uint32_t*)((char*)arg2->touched_time)[4];
00513856          int32_t ethereal = arg2->ethereal;
00513859          int32_t ebx_2 = *(int32_t*)((char*)arg2 + 0xc);
0051385c          *(uint32_t*)((char*)eax + 8) = arg3;
00513862          *(uint32_t*)((char*)eax + 0x10) = ecx;
00513865          *(uint32_t*)((char*)eax + 0x14) = edx_1;
00513868          *(uint32_t*)((char*)eax + 0x18) = ethereal;
0051386c          *(uint32_t*)((char*)eax + 0x1c) = ebx_2;
00513870          *(uint32_t*)((char*)eax + 4) = 0;
00513877          *(uint32_t*)eax = 0x7c62f8;
00513846      }
00513846      
00513887      class HashBaseData<unsigned long>* result = HashBase<unsigned long>::clobber(this, eax);
00513887      
0051388e      if (result == 0)
00513892          return result;
00513892      
0051389a      arg2->touched_time = *(int32_t*)((char*)result + 0x10);
0051389f      *(uint32_t*)((char*)arg2->touched_time)[4] = *(int32_t*)((char*)result + 0x14);
005138a5      arg2->ethereal = *(int32_t*)((char*)result + 0x18);
005138ab      *(int32_t*)((char*)arg2 + 0xc) = *(int32_t*)((char*)result + 0x1c);
005138ae      result->vtable->__vecDelDtor(1);
005138bd      return 1;
00513830  }


005138c0  void __thiscall LongNIValHashIter<SurfInfo *>::LongNIValHashIter<SurfInfo *>(class LongNIValHashIter<SurfInfo *>* this, class LongNIValHash<SurfInfo *>* arg2)

005138c0  {
005138cb      this->myHash_ = arg2;
005138cd      this->lastThisChain_ = nullptr;
005138d0      this->curBucket_ = 0;
005138d0      
005138d3      if (arg2 == 0)
005138d3      {
005138f1          this->fEnd_ = 1;
005138f8          this->curPtr_ = nullptr;
005138f8          return;
005138d3      }
005138d3      
005138d5      this->fEnd_ = 0;
005138db      class HashBaseData<unsigned long>* eax_1 = *(uint32_t*)arg2->buckets;
005138df      this->curPtr_ = eax_1;
005138df      
005138e2      if (eax_1 == 0)
005138e6          HashBaseIter<unsigned long>::Next(this);
005138c0  }

00513901     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00513910  int32_t __thiscall CPhysicsObj::InitNullObject(class CPhysicsObj* this, class IDClass<_tagDataID,32,0> arg2)

00513910  {
00513913      class CPartArray* part_array = this->part_array;
0051391a      int32_t result;
0051391a      
0051391a      if (part_array == 0)
0051392f          result = CPhysicsObj::InitPartArrayObject(this, arg2, 1);
0051391a      else
00513921          result = CPartArray::SetSetupID(part_array, arg2, 1);
00513921      
00513936      if (result == 0)
00513939          return result;
00513939      
0051393c      class CPartArray* part_array_1 = this->part_array;
0051393c      
00513941      if (part_array_1 != 0)
00513945          CPartArray::SetPlacementFrame(part_array_1, 0x65);
00513945      
00513953      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00513953      {
00513955          class CPartArray* part_array_2 = this->part_array;
00513955          
0051395a          if (part_array_2 != 0)
00513960              CPartArray::SetFrame(part_array_2, &this->m_position.frame);
00513953      }
00513953      
0051396b      return 1;
00513910  }

0051396e                                            90 90                                                                ..

00513970  class CPhysicsObj* CPhysicsObj::makeObject(class IDClass<_tagDataID,32,0> arg1, uint32_t arg2, int32_t arg3)

00513970  {
00513976      void* eax = operator new(0x178);
00513976      
00513980      if (eax != 0)
00513980      {
00513984          class CPhysicsObj* result = CPhysicsObj::CPhysicsObj(eax);
00513984          
0051398d          if (result != 0)
0051398d          {
0051399b              CPhysicsObj::InitObjectBegin(result, arg2, arg3);
0051399b              
005139b2              if (CPhysicsObj::InitPartArrayObject(result, arg1, 1) != 0)
005139b2              {
005139b6                  CPhysicsObj::InitObjectEnd(result);
005139c2                  return result;
005139b2              }
005139b2              
005139c3              result->vtable->__vecDelDtor(1);
0051398d          }
00513980      }
00513980      
005139ce      return 0;
00513970  }

005139cf                                               90                                                                 .

005139d0  void __thiscall CPhysicsObj::InitDefaults(class CPhysicsObj* this, class CSetup const* arg2)

005139d0  {
005139d8      uint32_t id = arg2->default_script_id.id;
005139d8      
005139e3      if (id != 0)
005139e6          CPhysicsObj::play_script_internal(this, id);
005139e6      
005139eb      uint32_t id_1 = arg2->default_mtable_id.id;
005139eb      
005139f3      if (id_1 != 0)
005139fa          CPhysicsObj::SetMotionTableID(this, id_1);
005139fa      
00513a00      uint32_t id_2 = arg2->default_stable_id.id;
00513a08      void var_8;
00513a08      
00513a08      if (id_2 != 0)
00513a08      {
00513a0a          class CSoundTable* sound_table = this->sound_table;
00513a0a          
00513a0f          if (sound_table != 0)
00513a0f          {
00513a11              sound_table->vtable->Release();
00513a16              this->sound_table = nullptr;
00513a0f          }
00513a0f          
00513a1f          if (id_2 != 0)
00513a36              this->sound_table = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id_2, 0x22));
00513a08      }
00513a08      
00513a39      uint32_t id_3 = arg2->default_phstable_id.id;
00513a39      
00513a41      if (id_3 != 0)
00513a41      {
00513a43          class PhysicsScriptTable* physics_script_table = this->physics_script_table;
00513a43          
00513a48          if (physics_script_table != 0)
00513a48          {
00513a4a              physics_script_table->vtable->Release();
00513a4f              this->physics_script_table = nullptr;
00513a48          }
00513a48          
00513a58          if (id_3 != 0)
00513a6f              this->physics_script_table = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id_3, 0x2c));
00513a41      }
00513a41      
00513a72      uint32_t state = this->state;
00513a72      
00513a7b      if ((state & 1) != 0)
00513a7b      {
00513a85          if (arg2->default_anim_id.id != 0)
00513a8c              this->state = (state | 0x40000);
00513a8c          
00513a9a          if (arg2->default_script_id.id != 0)
00513a9c              this->state |= 0x80000;
00513a9c          
00513ab0          if ((this->state & 0xc0000) != 0)
00513ab3              CPhysics::AddStaticAnimatingObject(this);
00513a7b      }
005139d0  }

00513ac3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00513ad0  void __fastcall CPhysicsObj::Destroy(class CPhysicsObj* this)

00513ad0  {
00513ad5      class MovementManager* movement_manager = this->movement_manager;
00513ad5      
00513adf      if (movement_manager != 0)
00513adf      {
00513ae3          MovementManager::Destroy(movement_manager);
00513ae9          operator delete(movement_manager);
00513adf      }
00513adf      
00513af1      class PositionManager* position_manager = this->position_manager;
00513af9      this->movement_manager = nullptr;
00513af9      
00513aff      if (position_manager != 0)
00513aff      {
00513b03          PositionManager::~PositionManager(position_manager);
00513b09          operator delete(position_manager);
00513aff      }
00513aff      
00513b11      class ParticleManager* particle_manager = this->particle_manager;
00513b19      this->position_manager = nullptr;
00513b19      
00513b1f      if (particle_manager != 0)
00513b1f      {
00513b23          ParticleManager::~ParticleManager(particle_manager);
00513b29          operator delete(particle_manager);
00513b31          this->particle_manager = nullptr;
00513b1f      }
00513b1f      
00513b37      class ScriptManager* script_manager = this->script_manager;
00513b37      
00513b3c      if (script_manager != 0)
00513b3c      {
00513b40          ScriptManager::~ScriptManager(script_manager);
00513b46          operator delete(script_manager);
00513b4e          this->script_manager = nullptr;
00513b3c      }
00513b3c      
00513b51      class PhysicsObjHook* hooks = this->hooks;
00513b51      
00513b59      if (hooks != 0)
00513b59      {
00513b76          class PhysicsObjHook* next;
00513b76          
00513b76          do
00513b76          {
00513b60              next = hooks->next;
00513b64              hooks->vtable = 0x7c6b20;
00513b6a              operator delete(hooks);
00513b74              hooks = next;
00513b76          } while (next != 0);
00513b59      }
00513b59      
00513b78      uint32_t state = this->state;
00513b80      this->hooks = nullptr;
00513b80      
00513b8d      if (((state & 1) != 0 && (state & 0xc0000) != 0))
00513b90          CPhysics::RemoveStaticAnimatingObject(this);
00513b90      
00513b98      class PhysicsScriptTable* physics_script_table = this->physics_script_table;
00513b98      
00513b9d      if (physics_script_table != 0)
00513b9d      {
00513b9f          physics_script_table->vtable->Release();
00513ba4          this->physics_script_table = nullptr;
00513b9d      }
00513b9d      
00513ba7      class NIList<NetBlob *>* netblob_list = this->netblob_list;
00513ba7      
00513bac      if (netblob_list != 0)
00513bac      {
00513bb0          if (netblob_list->head_ != 0)
00513bb0          {
00513bff              do
00513bff              {
00513bc0                  class NIList<NetBlob *>* netblob_list_1 = this->netblob_list;
00513bc3                  class NIListElement<NetBlob *>* head_ = netblob_list_1->head_;
00513bc7                  class NetBlob* data_;
00513bc7                  
00513bc7                  if (head_ != 0)
00513bc7                  {
00513bcd                      class NIListElement<NetBlob *>* next_ = head_->next_;
00513bd2                      netblob_list_1->head_ = next_;
00513bd2                      
00513bd4                      if (next_ == 0)
00513bd6                          netblob_list_1->tail_ = nullptr;
00513bd6                      
00513bd9                      data_ = head_->data_;
00513bdc                      operator delete(head_);
00513bc7                  }
00513bc7                  else
00513bc9                      data_ = nullptr;
00513bc9                  
00513bf0                  if ((InterlockedDecrement(&data_->m_cRef) == 0 && data_ != 0))
00513bf2                      data_->vtable->__vecDelDtor(1);
00513bff              } while (this->netblob_list->head_ != 0);
00513bb0          }
00513bb0          
00513c02          class NIList<NetBlob *>* netblob_list_2 = this->netblob_list;
00513c02          
00513c07          if (netblob_list_2 != 0)
00513c07          {
00513c0b              NIList<NetBlob *>::DeleteContents(netblob_list_2);
00513c11              operator delete(netblob_list_2);
00513c07          }
00513c07          
00513c19          this->netblob_list = nullptr;
00513bac      }
00513bac      
00513c1c      class CSoundTable* sound_table = this->sound_table;
00513c1c      
00513c21      if (sound_table != 0)
00513c21      {
00513c23          sound_table->vtable->Release();
00513c28          this->sound_table = nullptr;
00513c21      }
00513c21      
00513c34      this->m_position.objcell_id = 0;
00513c34      
00513c37      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00513c37      {
00513c39          class CPartArray* part_array = this->part_array;
00513c39          
00513c3e          if (part_array != 0)
00513c41              CPartArray::SetCellID(part_array, 0);
00513c37      }
00513c37      
00513c46      class CPartArray* part_array_1 = this->part_array;
00513c46      
00513c4b      if (part_array_1 != 0)
00513c4b      {
00513c4f          CPartArray::~CPartArray(part_array_1);
00513c55          operator delete(part_array_1);
00513c5d          this->part_array = nullptr;
00513c4b      }
00513c4b      
00513c62      __builtin_memset(&this->update_times, 0, 0x12);
00513c81      class LongNIValHash<CPhysicsObj::CollisionRecord>* collision_table = this->collision_table;
00513c89      this->weenie_obj = nullptr;
00513c89      
00513c8f      if (collision_table != 0)
00513c8f      {
00513c91          collision_table->vtable->__vecDelDtor(1);
00513c97          this->collision_table = nullptr;
00513c8f      }
00513c8f      
00513c9d      class DetectionManager* detection_manager = this->detection_manager;
00513c9d      
00513ca5      if (detection_manager != 0)
00513ca5      {
00513ca9          DetectionManager::~DetectionManager(detection_manager);
00513caf          operator delete(detection_manager);
00513cb7          this->detection_manager = nullptr;
00513ca5      }
00513ca5      
00513cbd      class AttackManager* attack_manager = this->attack_manager;
00513cbd      
00513cc5      if (attack_manager != 0)
00513cc5      {
00513cc9          AttackManager::~AttackManager(attack_manager);
00513ccf          operator delete(attack_manager);
00513cd7          this->attack_manager = nullptr;
00513cc5      }
00513cc5      
00513cdd      class TargetManager* target_manager = this->target_manager;
00513cdd      
00513ce5      if (target_manager != 0)
00513ce5      {
00513ce9          TargetManager::~TargetManager(target_manager);
00513cef          operator delete(target_manager);
00513cf7          this->target_manager = nullptr;
00513ce5      }
00513ce5      
00513cfd      class CHILDLIST* children = this->children;
00513cfd      
00513d02      if (children != 0)
00513d02      {
00513d06          CHILDLIST::~CHILDLIST(children);
00513d0c          operator delete(children);
00513d14          this->children = nullptr;
00513d02      }
00513d02      
00513d18      this->transient_state = 0;
00513d1e      this->state = 0x400c08;
00513ad0  }

00513b5d                                                                                         8d 49 00                               .I.
00513d2b                                   90 90 90 90 90                                                             .....

00513d30  void __fastcall CPhysicsObj::~CPhysicsObj(class CPhysicsObj* this)

00513d30  {
00513d33      this->vtable = 0x7c6b48;
00513d39      CPhysicsObj::Destroy(this);
00513d45      operator delete[](this->anim_hooks.m_data);
00513d4a      class CShadowObj* data = this->shadow_objects.data;
00513d4a      
00513d55      if (data != 0)
00513d55      {
00513d5f          if (data->vtable == 0)
00513d6a              operator delete[](((char*)data - 4));
00513d5f          else
00513d61              data->vtable->__vecDelDtor(3);
00513d55      }
00513d55      
00513d72      this->shadow_objects.data = 0;
00513d7c      this->m_position.vtable = 0x79285c;
00513d83      this->vtable = 0x7c62f8;
00513d89      this->hash_next = nullptr;
00513d90      this->id = 0;
00513d30  }

00513d99                                                                             90 90 90 90 90 90 90                           .......

00513da0  void __fastcall CPhysicsObj::UpdateChildrenInternal(class CPhysicsObj* this)

00513da0  {
00513da8      if (this->part_array != 0)
00513da8      {
00513daa          class CHILDLIST* children = this->children;
00513daa          
00513daf          if (children != 0)
00513daf          {
00513db2              int32_t esi_1 = 0;
00513db2              
00513db7              if (children->num_objects > 0)
00513db7              {
00513db9                  int32_t ebx;
00513db9                  int32_t var_c_1 = ebx;
00513db9                  
00513dea                  do
00513dea                  {
00513dc3                      uint32_t ecx = ((uint32_t)esi_1);
00513dde                      CPhysicsObj::UpdateChild(this, children->objects.data[ecx], children->part_numbers.data[ecx], &children->frames.data[ecx]);
00513de3                      children = this->children;
00513de6                      esi_1 += 1;
00513dea                  } while (esi_1 < children->num_objects);
00513db7              }
00513daf          }
00513da8      }
00513da0  }


00513df0  void __fastcall CPhysicsObj::animate_static_object(class CPhysicsObj* this)

00513df0  {
00513dfb      if (this->cell != 0)
00513dfb      {
00513e02          long double x87_r7_1 = ((long double)Timer::cur_time);
00513e08          int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
00513e0e          (*(uint32_t*)PhysicsTimer::curr_time) = (*(uint32_t*)Timer::cur_time);
00513e13          *(int32_t*)((char*)PhysicsTimer::curr_time + 4) = ecx;
00513e19          long double x87_r7_2 = (x87_r7_1 - ((long double)this->update_time));
00513e1f          long double x87_r6_1 = ((long double)0.000199999995f);
00513e27          (x87_r7_2 - x87_r6_1);
00513e29          int32_t eax_1;
00513e29          eax_1 = ((((x87_r7_2 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == x87_r6_1) ? 1 : 0) << 0xe) | 0x3800))));
00513e2b          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00513e2b          
00513e2e          if (p_1)
00513e2e          {
00513e48              long double temp0_1 = ((long double)0.0);
00513e48              (x87_r7_2 - temp0_1);
00513e4e              eax_1 = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0x3800))));
00513e50              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00513e50              
00513e53              if (p_2)
00513e53              {
00513e55                  long double temp1 = ((long double)2.0);
00513e55                  (x87_r7_2 - temp1);
00513e5b                  eax_1 = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
00513e5b                  
00513e60                  if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
00513e60                  {
00513e70                      this->update_time = (*(uint32_t*)Timer::cur_time);
00513e76                      *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00513e7d                      return;
00513e60                  }
00513e60                  
00513e7e                  class CPartArray* part_array = this->part_array;
00513e7e                  
00513e83                  if (part_array != 0)
00513e83                  {
00513e8f                      if ((this->state & 0x40000) != 0)
00513e8f                      {
00513e93                          class CPartArray* part_array_1 = part_array;
00513e97                          CPartArray::Update(part_array, ((float)x87_r7_2), nullptr);
00513ea6                          Frame::grotate(&this->m_position.frame, &this->m_omegaVector);
00513ead                          CPhysicsObj::UpdatePartsInternal(this);
00513eb4                          CPhysicsObj::UpdateChildrenInternal(this);
00513e8f                      }
00513e8f                      
00513ec7                      if ((this->state & 0x80000) != 0)
00513ec7                      {
00513ec9                          class ScriptManager* script_manager = this->script_manager;
00513ec9                          
00513ece                          if (script_manager != 0)
00513ed0                              ScriptManager::UpdateScripts(script_manager);
00513ec7                      }
00513ec7                      
00513ed5                      class ParticleManager* particle_manager = this->particle_manager;
00513ed5                      
00513edd                      if (particle_manager != 0)
00513edf                          ParticleManager::UpdateParticles(particle_manager);
00513edf                      
00513ee6                      CPhysicsObj::process_hooks(this);
00513e83                  }
00513e83                  
00513efb                  this->update_time = (*(uint32_t*)Timer::cur_time);
00513f01                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00513e53              }
00513e2e          }
00513e2e          else
00513e2e          {
00513e38              this->update_time = (*(uint32_t*)Timer::cur_time);
00513e3e              *(uint32_t*)((char*)this->update_time)[4] = ecx;
00513e2e          }
00513dfb      }
00513df0  }

00513f09                             90 90 90 90 90 90 90                                                           .......

00513f10  int32_t __thiscall CPhysicsObj::track_object_collision(class CPhysicsObj* this, class CPhysicsObj const* arg2, int32_t arg3)

00513f10  {
00513f26      if ((arg2->state & 1) != 0)
00513f38          return CPhysicsObj::report_environment_collision(this, arg3);
00513f38      
00513f43      if (this->collision_table == 0)
00513f43      {
00513f47          void* eax_4 = operator new(0x18);
00513f51          class LongNIValHash<CPhysicsObj::CollisionRecord>* eax_5;
00513f51          
00513f51          if (eax_4 == 0)
00513f5e              eax_5 = nullptr;
00513f51          else
00513f57              eax_5 = LongNIValHash<CPhysicsObj::CollisionRecord>::LongNIValHash<CPhysicsObj::CollisionRecord>(eax_4, 4);
00513f57          
00513f60          this->collision_table = eax_5;
00513f43      }
00513f43      
00513f66      class LongNIValHash<CPhysicsObj::CollisionRecord>* collision_table = this->collision_table;
00513f66      
00513f6e      if (collision_table == 0)
00513fcb          return 0;
00513fcb      
00513f76      int32_t eax_6 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
00513f7b      int32_t PhysicsTimer::curr_time_1 = (*(uint32_t*)PhysicsTimer::curr_time);
00513f88      int32_t var_c = eax_6;
00513f8f      int32_t var_8 = (arg2->state & 4);
00513f8f      
00513fa0      if (LongNIValHash<CPhysicsObj::CollisionRecord>::clobber(collision_table, &PhysicsTimer::curr_time_1, arg2->id) == 0)
00513fc0          return CPhysicsObj::report_object_collision(this, arg2, arg3);
00513fc0      
00513faa      return 0;
00513f10  }

00513fce                                            90 90                                                                ..

00513fd0  void __fastcall CPhysicsObj::report_collision_start(class CPhysicsObj* this)

00513fd0  {
00513fd6      class LongNIValHash<CPhysicsObj::CollisionRecord>* collision_table = this->collision_table;
00513fdd      int32_t edi = 0;
00513fdd      
00513fe1      if (collision_table != 0)
00513fe1      {
00513fe8          class LongNIValHash<CPhysicsObj::CollisionRecord>* collision_table_1 = collision_table;
00513fee          class HashBaseData<unsigned long>* hash_next = *(uint32_t*)collision_table_1->buckets;
00513ff2          class LongNIValHash<CPhysicsObj::CollisionRecord>* collision_table_2 = collision_table_1;
00513ff6          int32_t var_8_1 = 0;
00513ffa          int32_t var_10_1 = 0;
00513ffe          int32_t i = 0;
00513ffe          
00514006          if (hash_next != 0)
00514006              goto label_51407d;
00514006          
0051400c          HashBaseIter<unsigned long>::Next(&collision_table_2);
0051400c          
00514017          if (i == 0)
00514017          {
0051401d              edi = var_10_1;
00514021              collision_table_1 = collision_table_2;
0051407d          label_51407d:
0051407d              
0051407d              do
0051407d              {
00514027                  uint32_t id;
00514027                  
00514027                  if (hash_next != 0)
0051402c                      id = hash_next->id;
0051402c                  
00514030                  class CObjectMaint* CPhysicsObj::obj_maint_1 = CPhysicsObj::obj_maint;
00514030                  
00514038                  if (CPhysicsObj::obj_maint_1 != 0)
00514038                  {
0051403f                      class CPhysicsObj* eax_2 = CObjectMaint::GetObjectA(CPhysicsObj::obj_maint_1, id);
0051403f                      
00514046                      if (eax_2 != 0)
00514055                          CPhysicsObj::report_object_collision(this, eax_2, (this->transient_state & 1));
00514038                  }
00514038                  
0051405c                  if (hash_next == 0)
0051405c                  {
00514075                  label_514075:
00514075                      
00514075                      do
00514075                      {
00514068                          edi += 1;
00514068                          
0051406b                          if (edi >= collision_table_1->table_size)
00514086                              return;
00514086                          
00514070                          hash_next = collision_table_1->buckets[edi];
00514075                      } while (hash_next == 0);
0051405c                  }
0051405c                  else
0051405c                  {
0051405e                      hash_next = hash_next->hash_next;
0051405e                      
00514063                      if (hash_next == 0)
00514063                          goto label_514075;
0051405c                  }
0051407d              } while (i == 0);
00514017          }
00513fe1      }
00513fd0  }

00514087                       90 90 90 90 90 90 90 90 90                                                         .........

00514090  void __thiscall CPhysicsObj::set_frame(class CPhysicsObj* this, class Frame const* arg2)

00514090  {
005140a0      int32_t var_40;
005140a0      Frame::operator=(&var_40, arg2);
005140a0      
005140b0      if ((Frame::IsValid(&var_40) == 0 && Frame::IsValidExceptForHeading(&var_40) != 0))
005140b0      {
005140bf          var_40 = 0;
005140c7          int32_t var_3c_1 = 0;
005140cf          int32_t var_38_1 = 0;
005140d7          int32_t var_34_1 = 0;
005140b0      }
005140b0      
005140e9      Frame::operator=(&this->m_position.frame, &var_40);
005140e9      
005140f7      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
005140f7      {
005140f9          class CPartArray* part_array = this->part_array;
005140f9          
005140fe          if (part_array != 0)
00514101              CPartArray::SetFrame(part_array, &this->m_position.frame);
005140f7      }
005140f7      
00514108      CPhysicsObj::UpdateChildrenInternal(this);
00514090  }

00514115                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00514120  void __thiscall CPhysicsObj::set_initial_frame(class CPhysicsObj* this, class Frame const* arg2)

00514120  {
0051412e      Frame::operator=(&this->m_position.frame, arg2);
0051412e      
0051413c      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
0051413c      {
0051413e          class CPartArray* part_array = this->part_array;
0051413e          
00514143          if (part_array != 0)
00514146              CPartArray::SetFrame(part_array, &this->m_position.frame);
0051413c      }
0051413c      
0051414d      CPhysicsObj::UpdateChildrenInternal(this);
00514120  }

00514157                                                                       90 90 90 90 90 90 90 90 90                         .........

00514160  void __thiscall CPhysicsObj::set_heading(class CPhysicsObj* this, float arg2, int32_t arg3)

00514160  {
0051416e      void var_40;
0051416e      Frame::operator=(&var_40, &this->m_position.frame);
0051417c      Frame::set_heading(&var_40, arg2);
00514188      CPhysicsObj::set_frame(this, &var_40);
00514160  }

00514194                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005141a0  void __thiscall CPhysicsObj::store_position(class CPhysicsObj* this, class Position const* arg2)

005141a0  {
005141b0      uint32_t objcell_id = arg2->objcell_id;
005141b9      int32_t var_48 = 0x796910;
005141c1      void var_40;
005141c1      Frame::operator=(&var_40, &arg2->frame);
005141c6      uint32_t objcell_id_1 = objcell_id;
005141cc      uint32_t edx_1 = ((uint32_t)objcell_id_1);
005141cc      
005141d8      if (edx_1 < 0x100)
005141d8      {
005141de          void var_c;
005141de          void* var_50_1 = &var_c;
005141e3          uint32_t* var_54_1 = &objcell_id;
005141e4          LandDefs::adjust_to_outside(objcell_id_1, edx_1);
005141e9          objcell_id_1 = objcell_id;
005141d8      }
005141d8      
005141f9      this->m_position.objcell_id = objcell_id_1;
005141f9      
005141fc      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
005141fc      {
005141fe          class CPartArray* part_array = this->part_array;
005141fe          
00514203          if (part_array != 0)
00514206              CPartArray::SetCellID(part_array, objcell_id_1);
005141fc      }
005141fc      
00514212      CPhysicsObj::set_frame(this, &var_40);
005141a0  }

0051421e                                                                                            90 90                                ..

00514220  void __fastcall CPhysicsObj::leave_visibility(class CPhysicsObj* this)

00514220  {
00514223      CPhysicsObj::prepare_to_leave_visibility(this);
0051422e      CPhysicsObj::store_position(this, &this->m_position);
0051423e      CObjectMaint::GotoLostCell(CPhysicsObj::obj_maint, this, this->m_position.objcell_id);
00514243      this->transient_state &= 0xffffff7f;
00514220  }

0051424f                                               90                                                                 .

00514250  void __thiscall DArray<CShadowObj>::grow(class DArray<CShadowObj>* this, uint32_t arg2)

00514250  {
0051425b      if (arg2 <= this->sizeOf)
0051425b      {
0051425e          DArray<CShadowObj>::shrink(this, arg2);
00514265          return;
0051425b      }
0051425b      
00514275      void* eax_1 = operator new[](((arg2 * 0x18) + 4));
0051427f      void* ebp;
0051427f      
0051427f      if (eax_1 == 0)
00514298          ebp = nullptr;
0051427f      else
0051427f      {
0051428d          *(uint32_t*)eax_1 = arg2;
0051428f          `vector constructor iterator'(((char*)eax_1 + 4), 0x18, arg2, CShadowObj::CShadowObj);
00514294          ebp = ((char*)eax_1 + 4);
0051427f      }
0051427f      
0051429d      int32_t i = 0;
0051429d      
005142a5      if (this->sizeOf > 0)
005142a5      {
005142ac          void* ecx_1 = ((char*)ebp + 8);
005142ac          
005142de          do
005142de          {
005142b6              void* eax_4 = (((0xfffffff8 - ebp) + ecx_1) + this->data);
005142bb              *(uint32_t*)((char*)ecx_1 - 4) = *(uint32_t*)((char*)eax_4 + 4);
005142c1              *(uint32_t*)ecx_1 = *(uint32_t*)((char*)eax_4 + 8);
005142c6              *(uint32_t*)((char*)ecx_1 + 4) = *(uint32_t*)((char*)eax_4 + 0xc);
005142cc              *(uint32_t*)((char*)ecx_1 + 8) = *(uint32_t*)((char*)eax_4 + 0x10);
005142d2              *(uint32_t*)((char*)ecx_1 + 0xc) = *(uint32_t*)((char*)eax_4 + 0x14);
005142d8              i += 1;
005142d9              ecx_1 += 0x18;
005142de          } while (i < this->sizeOf);
005142a5      }
005142a5      
005142e4      class CShadowObj* data = this->data;
005142e4      
005142e8      if (data != 0)
005142e8      {
005142f2          if (data->vtable != 0)
005142f2          {
005142f4              data->vtable->__vecDelDtor(3);
005142fb              this->data = ebp;
005142fe              this->sizeOf = arg2;
00514303              return;
005142f2          }
005142f2          
00514307          operator delete[](((char*)data - 4));
005142e8      }
005142e8      
00514310      this->data = ebp;
00514313      this->sizeOf = arg2;
00514250  }

0051431b                                                                                   90 90 90 90 90                             .....

00514320  void* __thiscall LongNIValHash<CPhysicsObj::CollisionRecord>::`scalar deleting destructor'(class LongNIValHash<CPhysicsObj::CollisionRecord>* this, uint32_t arg2)

00514320  {
00514323      LongNIValHash<CPhysicsObj::CollisionRecord>::~LongNIValHash<CPhysicsObj::CollisionRecord>(this);
00514323      
0051432d      if ((arg2 & 1) != 0)
00514330          operator delete(this);
00514330      
0051433b      return this;
00514320  }

0051433e                                                                                            90 90                                ..

00514340  void __fastcall LongNIValHash<CPhysicsObj::CollisionRecord>::~LongNIValHash<CPhysicsObj::CollisionRecord>(class LongNIValHash<CPhysicsObj::CollisionRecord>* this)

00514340  {
0051434b      this->vtable = &LongNIValHash<class CPhysicsObj::CollisionRecord>::`vftable';
00514351      void var_14;
00514351      LongNIValHashIter<SurfInfo *>::LongNIValHashIter<SurfInfo *>(&var_14, this);
0051435c      int32_t i;
0051435c      
0051435c      while (i == 0)
00514364          HashBaseIter<unsigned long>::DeleteCurrent(&var_14);
00514364      
00514374      bool cond:0 = this->fPlacementNew_ != 0;
00514376      this->vtable = 0x7c66b0;
00514376      
0051437c      if (!(cond:0))
00514382          operator delete[](this->buckets);
00514340  }

0051438f                                               90                                                                 .

00514390  void __thiscall DArray<CShadowObj>::shrink(class DArray<CShadowObj>* this, uint32_t arg2)

00514390  {
0051439b      if (arg2 > this->sizeOf)
0051439b      {
0051439e          DArray<CShadowObj>::grow(this, arg2);
005143a5          return;
0051439b      }
0051439b      
005143a9      void* ebp = nullptr;
005143a9      
005143ad      if (arg2 != 0)
005143ad      {
005143e1          void* eax_3 = operator new[](((arg2 * 0x18) + 4));
005143e1          
005143eb          if (eax_3 != 0)
005143eb          {
005143f9              *(uint32_t*)eax_3 = arg2;
005143fb              `vector constructor iterator'(((char*)eax_3 + 4), 0x18, arg2, CShadowObj::CShadowObj);
00514400              ebp = ((char*)eax_3 + 4);
005143eb          }
005143eb          
00514402          int32_t i = 0;
0051440a          this->sizeOf = arg2;
0051440a          
0051440d          if (arg2 > 0)
0051440d          {
00514414              void* ecx_1 = ((char*)ebp + 8);
00514414              
0051444d              do
0051444d              {
00514425                  void* eax_5 = (((0xfffffff8 - ebp) + ecx_1) + this->data);
0051442a                  *(uint32_t*)((char*)ecx_1 - 4) = *(uint32_t*)((char*)eax_5 + 4);
00514430                  *(uint32_t*)ecx_1 = *(uint32_t*)((char*)eax_5 + 8);
00514435                  *(uint32_t*)((char*)ecx_1 + 4) = *(uint32_t*)((char*)eax_5 + 0xc);
0051443b                  *(uint32_t*)((char*)ecx_1 + 8) = *(uint32_t*)((char*)eax_5 + 0x10);
00514441                  *(uint32_t*)((char*)ecx_1 + 0xc) = *(uint32_t*)((char*)eax_5 + 0x14);
00514447                  i += 1;
00514448                  ecx_1 += 0x18;
0051444d              } while (i < this->sizeOf);
0051440d          }
0051440d          
00514453          int32_t* data_1 = this->data;
00514453          
00514458          if (data_1 != 0)
00514458          {
00514462              if (data_1[-1] == 0)
0051446d                  operator delete[](&data_1[-1]);
00514462              else
00514468                  **(uint32_t**)data_1(3);
00514458          }
005143ad      }
005143ad      else
005143ad      {
005143af          class CShadowObj* data = this->data;
005143b3          this->sizeOf = 0;
005143b3          
005143b6          if (data != 0)
005143b6          {
005143c4              if (data->vtable == 0)
0051446d                  operator delete[](((char*)data - 4));
005143c4              else
005143ca                  data->vtable->__vecDelDtor(3);
005143b6          }
005143ad      }
005143ad      
00514475      bool cond:2 = this->next_available <= arg2;
00514478      this->data = ebp;
00514478      
0051447b      if (!(cond:2))
0051447d          this->next_available = arg2;
00514390  }

00514485                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00514490  void* __thiscall CPhysicsObj::`scalar deleting destructor'(class CPhysicsObj* this, uint32_t arg2)

00514490  {
00514493      CPhysicsObj::~CPhysicsObj(this);
00514493      
0051449d      if ((arg2 & 1) != 0)
005144a0          operator delete(this);
005144a0      
005144ab      return this;
00514490  }

005144ae                                            90 90                                                                ..

005144b0  class CPhysicsObj* CPhysicsObj::makeObject(class CPhysicsObj const* arg1)

005144b0  {
005144b2      class CPhysicsObj* edi = arg1;
005144b6      class CPartArray* part_array_1 = edi->part_array;
005144b6      
005144bb      if (part_array_1 == 0)
005144cf          arg1 = INVALID_DID.id;
005144bb      else
005144c2          CPartArray::GetDataID(part_array_1, &arg1);
005144c2      
005144dc      class CPhysicsObj* result = CPhysicsObj::makeObject(arg1, 0, 1);
005144dc      
005144e8      if (result != 0)
005144e8      {
005144ed          CPhysicsObj::MorphToExistingObject(result, edi);
005144f2          class CPartArray* part_array = result->part_array;
005144f2          
005144f7          if (part_array != 0)
005144f7          {
005144f9              class CSetup* setup = part_array->setup;
005144f9              
005144fe              if (setup != 0)
005144fe              {
00514500                  uint32_t id = setup->default_script_id.id;
00514500                  
00514508                  if (id != 0)
0051450f                      CPhysicsObj::play_script_internal(result, id);
005144fe              }
005144f7          }
005144e8      }
005144e8      
00514518      return result;
005144b0  }

00514519                                                                             90 90 90 90 90 90 90                           .......

00514520  void __fastcall CPhysicsObj::update_position(class CPhysicsObj* this)

00514520  {
00514531      if (this->parent == 0)
00514531      {
00514538          long double x87_r7_1 = ((long double)Timer::cur_time);
0051453e          int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
00514544          (*(uint32_t*)PhysicsTimer::curr_time) = (*(uint32_t*)Timer::cur_time);
00514549          *(int32_t*)((char*)PhysicsTimer::curr_time + 4) = ecx;
0051454f          long double x87_r7_2 = (x87_r7_1 - ((long double)this->update_time));
00514559          long double x87_r6_1 = ((long double)0.000199999995f);
00514561          (x87_r7_2 - x87_r6_1);
00514563          int32_t eax_1;
00514563          eax_1 = ((((x87_r7_2 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == x87_r6_1) ? 1 : 0) << 0xe) | 0x3800))));
00514565          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00514565          
00514568          if (p_1)
00514568          {
00514585              long double temp0_1 = ((long double)0.0);
00514585              (x87_r7_2 - temp0_1);
0051458b              eax_1 = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0x3800))));
0051458d              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0051458d              
00514590              if (p_2)
00514590              {
00514592                  long double temp1 = ((long double)2.0);
00514592                  (x87_r7_2 - temp1);
00514598                  eax_1 = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
00514598                  
0051459d                  if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0051459d                  {
005145ab                      this->update_time = (*(uint32_t*)Timer::cur_time);
005145b1                      *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005145bb                      return;
0051459d                  }
0051459d                  
005145c0                  void var_48;
005145c0                  Frame::Frame(&var_48);
005145ce                  void* var_60 = &var_48;
005145d4                  CPhysicsObj::UpdatePositionInternal(this, ((float)((long double)((double)x87_r7_2))), &var_48);
005145e0                  CPhysicsObj::set_frame(this, &var_48);
005145e5                  class ParticleManager* particle_manager = this->particle_manager;
005145e5                  
005145ed                  if (particle_manager != 0)
005145ef                      ParticleManager::UpdateParticles(particle_manager);
005145ef                  
005145f4                  class ScriptManager* script_manager = this->script_manager;
005145f4                  
005145f9                  if (script_manager != 0)
005145fb                      ScriptManager::UpdateScripts(script_manager);
005145fb                  
0051460b                  this->update_time = (*(uint32_t*)Timer::cur_time);
00514611                  *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00514590              }
00514568          }
00514568          else
00514568          {
00514572              this->update_time = (*(uint32_t*)Timer::cur_time);
00514578              *(uint32_t*)((char*)this->update_time)[4] = ecx;
00514568          }
00514531      }
00514520  }

0051461c                                                                                      90 90 90 90                              ....

00514620  void __thiscall CPhysicsObj::report_collision_end(class CPhysicsObj* this, int32_t const arg2)

00514620  {
00514623      class LongNIValHash<CPhysicsObj::CollisionRecord>* collision_table = this->collision_table;
00514623      
00514632      if (collision_table != 0)
00514632      {
00514638          class LongNIValHash<CPhysicsObj::CollisionRecord>* collision_table_1 = collision_table;
00514640          class HashBaseData<unsigned long>* edi_1 = *(uint32_t*)collision_table->buckets;
00514644          int32_t var_8_1 = 0;
00514648          int32_t var_10_1 = 0;
0051464c          int32_t var_4_1 = 0;
00514650          class HashBaseData<unsigned long>* var_c_1 = edi_1;
00514650          
00514654          if (edi_1 != 0)
00514654              goto label_514675;
00514654          
0051465a          HashBaseIter<unsigned long>::Next(&collision_table_1);
0051465a          
00514663          if (var_4_1 == 0)
00514663          {
00514669              edi_1 = var_c_1;
00514675          label_514675:
00514675              void* var_30 = nullptr;
00514679              int32_t var_2c_1 = 0;
0051467d              int32_t var_28_1 = 0;
00514681              AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&var_30, 0xa);
00514686              int32_t ebx_1 = var_28_1;
0051468a              int32_t esi_1 = var_2c_1;
0051468e              int32_t const id = arg2;
0051468e              
0051469a              while (true)
0051469a              {
0051469a                  double var_24;
0051469a                  int32_t var_1c;
0051469a                  
0051469a                  if (edi_1 != 0)
0051469a                  {
0051469c                      id = edi_1->id;
005146a7                      var_24 = *(int32_t*)((char*)edi_1 + 0x10);
005146ae                      *(uint32_t*)((char*)var_24)[4] = *(int32_t*)((char*)edi_1 + 0x14);
005146b5                      var_1c = *(int32_t*)((char*)edi_1 + 0x18);
005146b9                      int32_t var_18_1 = *(int32_t*)((char*)edi_1 + 0x1c);
0051469a                  }
0051469a                  
005146c3                  long double x87_r7_2 = (((long double)PhysicsTimer::curr_time) - ((long double)var_24));
005146c7                  long double temp1_1 = ((long double)1f);
005146c7                  (x87_r7_2 - temp1_1);
005146cd                  int32_t eax_1;
005146cd                  eax_1 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
005146cd                  
005146d2                  if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
005146d2                  {
00514706                  label_514706:
00514706                      HashBaseIter<unsigned long>::DeleteCurrent(&collision_table_1);
00514706                      
0051470d                      if (ebx_1 < esi_1)
0051470d                      {
00514735                      label_514735:
00514735                          *(uint32_t*)((char*)var_30 + (ebx_1 << 2)) = id;
00514738                          ebx_1 += 1;
00514739                          var_28_1 = ebx_1;
0051470d                      }
0051470d                      else
0051470d                      {
00514711                          uint32_t eax_5 = (esi_1 * 2);
00514711                          
00514714                          if (esi_1 <= 0)
00514716                              eax_5 = 8;
00514716                          
00514727                          esi_1 = var_2c_1;
0051472b                          ebx_1 = var_28_1;
0051472b                          
0051472f                          if (AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&var_30, eax_5) != 0)
0051472f                              goto label_514735;
0051470d                      }
005146d2                  }
005146d2                  else if (var_1c == 0)
005146da                  {
005146f3                      if (arg2 != 0)
005146f3                          goto label_514706;
005146f3                      
005146f9                      HashBaseIter<unsigned long>::Next(&collision_table_1);
005146da                  }
005146da                  else
005146da                  {
005146dc                      long double temp2_1 = ((long double)0.0);
005146dc                      (x87_r7_2 - temp2_1);
005146e2                      int32_t eax_3;
005146e2                      eax_3 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005146e2                      
005146f3                      if (((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0 || arg2 != 0))
005146e7                          goto label_514706;
005146e7                      
005146f9                      HashBaseIter<unsigned long>::Next(&collision_table_1);
005146da                  }
005146da                  
00514743                  if (var_4_1 != 0)
00514743                      break;
00514743                  
00514694                  edi_1 = var_c_1;
0051469a              }
0051469a              
00514749              int32_t esi_2 = 0;
00514749              
0051474d              if (ebx_1 > 0)
0051474d              {
00514764                  do
00514764                  {
0051475c                      CPhysicsObj::report_object_collision_end(this, *(uint32_t*)((char*)var_30 + (esi_2 << 2)));
00514761                      esi_2 += 1;
00514764                  } while (esi_2 < ebx_1);
0051474d              }
0051474d              
0051476b              operator delete[](var_30);
00514663          }
00514632      }
00514620  }

0051477d                                                                                         90 90 90                               ...

00514780  int32_t __thiscall CPhysicsObj::handle_all_collisions(class CPhysicsObj* this, class COLLISIONINFO const* arg2, int32_t arg3, int32_t arg4)

00514780  {
0051478a      int32_t i = 0;
0051479a      int32_t var_10_1;
0051479a      
0051479a      if ((arg4 != 0 && (this->transient_state & 2) != 0))
005147a6          var_10_1 = 0;
005147a6      
005147aa      if (((arg4 == 0 || (this->transient_state & 2) == 0) || (this->state & "activation type (%s) with '%s' b…") != 0))
005147ac          var_10_1 = 1;
005147ac      
005147bf      int32_t result_1 = 0;
005147bf      
005147c3      if (arg2->num_collide_object > 0)
005147c3      {
005147ea          do
005147ea          {
005147c8              class CPhysicsObj* eax_1 = arg2->collide_object.data[i];
005147c8              
005147cd              if ((eax_1 != 0 && CPhysicsObj::track_object_collision(this, eax_1, arg3) != 0))
005147dc                  result_1 = 1;
005147dc              
005147e7              i += 1;
005147ea          } while (i < arg2->num_collide_object);
005147c3      }
005147c3      
005147f0      CPhysicsObj::report_collision_end(this, 0);
005147fd      int32_t collided_with_environment = arg2->collided_with_environment;
00514800      int32_t result;
00514800      
00514800      if (this->colliding_with_environment != 0)
00514800      {
00514806          int32_t ecx_2;
00514806          ecx_2 = collided_with_environment != 0;
00514809          this->colliding_with_environment = ecx_2;
00514837          result = result_1;
00514800      }
00514800      else if ((collided_with_environment != 0 || (arg4 == 0 && (this->transient_state & 2) != 0)))
00514824      {
00514830          result = 1;
00514830          
00514835          if (CPhysicsObj::report_environment_collision(this, arg3) == 0)
00514837              result = result_1;
00514824      }
00514824      else
00514837          result = result_1;
00514837      
0051483b      int32_t frames_stationary_fall = arg2->frames_stationary_fall;
0051483b      
00514844      if (frames_stationary_fall <= 1)
00514844      {
00514897          if ((var_10_1 != 0 && arg2->collision_normal_valid != 0))
00514897          {
005148a7              if ((this->state & 0x20000) == 0)
005148a7              {
005148fd                  long double x87_r7_4 = (((((long double)this->m_velocityVector.z) * ((long double)arg2->collision_normal.z)) + (((long double)this->m_velocityVector.y) * ((long double)arg2->collision_normal.y))) + (((long double)arg2->collision_normal.x) * ((long double)this->m_velocityVector.x)));
005148ff                  long double temp1_1 = ((long double)0.0);
005148ff                  (x87_r7_4 - temp1_1);
00514905                  int32_t eax_9;
00514905                  eax_9 = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
00514907                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00514907                  
0051490a                  if (!(p_1))
0051490a                  {
0051491a                      long double x87_r7_6 = -((x87_r7_4 * (((long double)this->elasticity) + ((long double)1f))));
00514939                      this->m_velocityVector.x = ((float)((x87_r7_6 * ((long double)arg2->collision_normal.x)) + ((long double)this->m_velocityVector.x)));
00514949                      this->m_velocityVector.y = ((float)(((long double)((float)(x87_r7_6 * ((long double)arg2->collision_normal.y)))) + ((long double)this->m_velocityVector.y)));
00514959                      this->m_velocityVector.z = ((float)(((long double)((float)(x87_r7_6 * ((long double)arg2->collision_normal.z)))) + ((long double)this->m_velocityVector.z)));
0051490a                  }
005148a7              }
005148a7              else
005148a7              {
005148b5                  this->m_velocityVector.x = 0;
005148b5                  this->m_velocityVector.y = 0f;
005148b5                  this->m_velocityVector.z = 0f;
005148a7              }
00514897          }
00514897          
00514897          goto label_514963;
00514844      }
00514844      
00514855      this->m_velocityVector.x = 0;
00514855      this->m_velocityVector.y = 0f;
00514855      this->m_velocityVector.z = 0f;
00514855      
0051487b      if (frames_stationary_fall != 3)
0051487b      {
00514963      label_514963:
00514963          
00514965          if (frames_stationary_fall != 0)
00514965          {
00514985              uint32_t transient_state = this->transient_state;
00514985              
0051498b              if (frames_stationary_fall == 1)
0051498b              {
00514991                  this->transient_state = (transient_state | 0x10);
0051499f                  return result;
0051498b              }
0051498b              
005149a5              if (frames_stationary_fall != 2)
005149a5              {
005149c0                  this->transient_state = (transient_state | 0x40);
005149ce                  return result;
005149a5              }
005149a5              
005149ab              this->transient_state = (transient_state | 0x20);
005149b9              return result;
00514965          }
0051487b      }
0051487b      
00514971      this->transient_state &= 0xffffff8f;
0051497f      return result;
00514780  }

005149d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005149e0  void __thiscall CPhysicsObj::AddObjectToSingleCell(class CPhysicsObj* this, class CObjCell* arg2)

005149e0  {
005149e3      class CObjCell* cell = this->cell;
005149e3      
005149f0      if (cell == 0)
005149f0          goto label_5149ff;
005149f0      
005149f4      if (arg2 != cell)
005149f4      {
005149f7          CPhysicsObj::RemoveObjectFromSingleCell(this, cell);
005149ff      label_5149ff:
005149ff          CPhysicsObj::change_cell(this, arg2);
005149ff          
00514a06          if (arg2 != 0)
00514a06          {
00514a08              bool cond:1_1 = this->shadow_objects.sizeOf >= 1;
00514a0f              this->num_shadow_objects = 1;
00514a0f              
00514a19              if (!(cond:1_1))
00514a23                  DArray<CShadowObj>::grow(&this->shadow_objects, 1);
00514a23              
00514a2f              CShadowObj::set_physobj(this->shadow_objects.data, this);
00514a37              this->shadow_objects.data->cell_id = arg2->m_DID.id;
00514a4b              CObjCell::add_shadow_object(arg2, this->shadow_objects.data, 1);
00514a50              class CPartArray* part_array = this->part_array;
00514a50              
00514a55              if (part_array != 0)
00514a5a                  CPartArray::AddPartsShadow(part_array, arg2, 1);
00514a06          }
005149f4      }
005149e0  }

00514a64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00514a70  void __fastcall CPhysicsObj::add_particle_shadow_to_cell(class CPhysicsObj* this)

00514a70  {
00514a73      bool cond:0 = this->shadow_objects.sizeOf >= 1;
00514a7a      this->num_shadow_objects = 1;
00514a7a      
00514a84      if (!(cond:0))
00514a8e          DArray<CShadowObj>::grow(&this->shadow_objects, 1);
00514a8e      
00514a9a      CShadowObj::set_physobj(this->shadow_objects.data, this);
00514aa5      this->shadow_objects.data->cell_id = this->cell->m_DID.id;
00514ac0      CObjCell::add_shadow_object(this->cell, this->shadow_objects.data, 1);
00514ac5      class CPartArray* part_array = this->part_array;
00514ac5      
00514aca      if (part_array != 0)
00514ad5          CPartArray::AddPartsShadow(part_array, this->cell, 1);
00514a70  }

00514adc                                                                                      90 90 90 90                              ....

00514ae0  void __thiscall CPhysicsObj::add_shadows_to_cells(class CPhysicsObj* this, class CELLARRAY const* arg2)

00514ae0  {
00514aed      class CPartArray* part_array;
00514aed      
00514aed      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00514aed      {
00514b05          uint32_t num_cells = arg2->num_cells;
00514b08          bool cond:1_1 = num_cells <= this->shadow_objects.sizeOf;
00514b0a          this->num_shadow_objects = num_cells;
00514b0a          
00514b10          if (!(cond:1_1))
00514b19              DArray<CShadowObj>::grow(&this->shadow_objects, num_cells);
00514b19          
00514b24          int32_t i = 0;
00514b24          
00514b28          if (this->num_shadow_objects > 0)
00514b28          {
00514b2a              int32_t ebx_1 = 0;
00514b2a              
00514b5a              do
00514b5a              {
00514b39                  CShadowObj::set_physobj((this->shadow_objects.data + ebx_1), this);
00514b4a                  *(uint32_t*)(&*(uint32_t*)((char*)*(uint64_t*)((char*)this->shadow_objects.data->sequence)[4])[4] + ebx_1) = arg2->cells.data[i].cell_id;
00514b54                  i += 1;
00514b55                  ebx_1 += 0x18;
00514b5a              } while (i < this->num_shadow_objects);
00514b28          }
00514b28          
00514b62          int32_t i_1 = 0;
00514b62          
00514b66          if (this->num_shadow_objects > 0)
00514b66          {
00514b6a              int32_t ebx_2 = 0;
00514b6a              
00514bc3              do
00514bc3              {
00514b77                  class CObjCell* edi_1 = &arg2->cells.data->owner[(i_1 * 2)];
00514b77                  
00514b7d                  if (edi_1 == 0)
00514baf                      *(uint32_t*)(&this->shadow_objects.data->cell + ebx_2) = 0;
00514b7d                  else
00514b7d                  {
00514b8e                      CObjCell::add_shadow_object(edi_1, (this->shadow_objects.data + ebx_2), arg2->num_cells);
00514b93                      part_array = this->part_array;
00514b93                      
00514b98                      if (part_array != 0)
00514ba2                          CPartArray::AddPartsShadow(part_array, edi_1, this->num_shadow_objects);
00514b7d                  }
00514b7d                  
00514bbd                  i_1 += 1;
00514bbe                  ebx_2 += 0x18;
00514bc3              } while (i_1 < this->num_shadow_objects);
00514b66          }
00514aed      }
00514aed      else
00514aef          CPhysicsObj::add_particle_shadow_to_cell(this);
00514aef      
00514bc7      int32_t edi_2 = 0;
00514bc7      
00514bd0      while (true)
00514bd0      {
00514bd0          class CHILDLIST* children = this->children;
00514bd0          
00514bd5          if (children == 0)
00514bdc              part_array = nullptr;
00514bd5          else
00514bd7              part_array = children->num_objects;
00514bd7          
00514be3          if (edi_2 >= ((uint32_t)part_array))
00514be3              break;
00514be3          
00514be7          if (children == 0)
00514be7          {
00514c06              CPhysicsObj::add_shadows_to_cells(nullptr, arg2);
00514c0b              edi_2 += 1;
00514be7          }
00514be7          else
00514be7          {
00514bf7              CPhysicsObj::add_shadows_to_cells(children->objects.data[((uint32_t)edi_2)], arg2);
00514bfc              edi_2 += 1;
00514be7          }
00514bd0      }
00514ae0  }

00514c13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00514c20  void __thiscall CPhysicsObj::add_anim_hook(class CPhysicsObj* this, class CAnimHook* arg2)

00514c20  {
00514c20      uint32_t m_size = this->anim_hooks.m_size;
00514c30      int32_t eax_1;
00514c30      
00514c30      if (this->anim_hooks.m_num >= m_size)
00514c30      {
00514c34          uint32_t eax;
00514c34          
00514c34          if (m_size <= 0)
00514c3a              eax = 8;
00514c34          else
00514c36              eax = (m_size * 2);
00514c36          
00514c42          eax_1 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->anim_hooks, eax);
00514c30      }
00514c30      
00514c49      if ((this->anim_hooks.m_num < m_size || eax_1 != 0))
00514c49      {
00514c27          this->anim_hooks.m_data[this->anim_hooks.m_num] = arg2;
00514c27          this->anim_hooks.m_num += 1;
00514c49      }
00514c20  }

00514c5e                                                                                            90 90                                ..

00514c60  void __thiscall CPhysicsObj::set_hidden(class CPhysicsObj* this, int32_t arg2, int32_t arg3)

00514c60  {
00514c69      uint32_t state = this->state;
00514c69      
00514c70      if (arg2 == 0)
00514c70      {
00514d22          this->state = (state & 0xffffbfff);
00514d28          class PhysicsScriptTable* physics_script_table_1 = this->physics_script_table;
00514d28          
00514d2d          if (physics_script_table_1 != 0)
00514d2d          {
00514d3b              PhysicsScriptTable::GetScript(physics_script_table_1, &arg2, PS_UnHide, 1f);
00514d47              CPhysicsObj::play_script_internal(this, arg2);
00514d2d          }
00514d2d          
00514d4e          int32_t edi_1 = 0;
00514d4e          
00514d50          while (true)
00514d50          {
00514d50              class CHILDLIST* children_1 = this->children;
00514d50              
00514d55              if (children_1 == 0)
00514d55                  break;
00514d55              
00514d5a              if (edi_1 >= children_1->num_objects)
00514d5a                  break;
00514d5a              
00514d62              void* eax_4 = children_1->objects.data[((uint32_t)edi_1)];
00514d65              *(uint32_t*)((char*)eax_4 + 0xa8) &= 0xffffffdf;
00514d6c              class CPartArray* eax_5 = *(uint32_t*)((char*)eax_4 + 0x10);
00514d6c              
00514d71              if (eax_5 != 0)
00514d77                  CPartArray::SetNoDrawInternal(eax_5, 0);
00514d77              
00514d7c              edi_1 += 1;
00514d50          }
00514d50          
00514d85          uint32_t edx_4 = (this->state & 0xffffffef);
00514d8c          this->state = edx_4;
00514d8c          
00514d92          if ((edx_4 & 8) == 0)
00514d92          {
00514d99              this->state = (edx_4 | 8);
00514d9f              CPhysicsObj::report_collision_start(this);
00514d92          }
00514d92          
00514da4          class CPartArray* part_array_1 = this->part_array;
00514da4          
00514da9          if (part_array_1 != 0)
00514dab              CPartArray::HandleEnterWorld(part_array_1);
00514dab          
00514db0          class CObjCell* cell_1 = this->cell;
00514db0          
00514db8          if (cell_1 != 0)
00514dbb              CObjCell::unhide_object(cell_1, this);
00514c70      }
00514c70      else
00514c70      {
00514c7c          this->state = (state | 0x4000);
00514c82          class PhysicsScriptTable* physics_script_table = this->physics_script_table;
00514c82          
00514c87          if (physics_script_table != 0)
00514c87          {
00514c95              PhysicsScriptTable::GetScript(physics_script_table, &arg2, PS_Hidden, 1f);
00514ca1              CPhysicsObj::play_script_internal(this, arg2);
00514c87          }
00514c87          
00514ca6          int32_t edi = 0;
00514ca6          
00514ca8          while (true)
00514ca8          {
00514ca8              class CHILDLIST* children = this->children;
00514ca8              
00514cad              if (children == 0)
00514cad                  break;
00514cad              
00514cb2              if (edi >= children->num_objects)
00514cb2                  break;
00514cb2              
00514cba              void* eax_1 = children->objects.data[((uint32_t)edi)];
00514cbd              *(uint32_t*)((char*)eax_1 + 0xa8) |= 0x20;
00514cc4              class CPartArray* eax_2 = *(uint32_t*)((char*)eax_1 + 0x10);
00514cc4              
00514cc9              if (eax_2 != 0)
00514ccf                  CPartArray::SetNoDrawInternal(eax_2, 1);
00514ccf              
00514cd4              edi += 1;
00514ca8          }
00514ca8          
00514cde          if ((this->state & 8) != 0)
00514cde          {
00514ce4              CPhysicsObj::report_collision_end(this, 1);
00514ce9              this->state &= 0xfffffff7;
00514cde          }
00514cde          
00514cf0          this->state |= 0x10;
00514cf7          class CObjCell* cell = this->cell;
00514cf7          
00514cff          if (cell != 0)
00514d02              CObjCell::hide_object(cell, this);
00514d02          
00514d07          class CPartArray* part_array = this->part_array;
00514d07          
00514d0c          if (part_array != 0)
00514d12              CPartArray::HandleEnterWorld(part_array);
00514c70      }
00514c60  }

00514dc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00514dd0  void __thiscall CPhysicsObj::set_state(class CPhysicsObj* this, uint32_t arg2, int32_t arg3)

00514dd0  {
00514dde      int16_t ebx_1 = (((int16_t)this->state) ^ arg2);
00514de3      this->state = arg2;
00514de3      
00514de9      if ((*(uint8_t*)((char*)ebx_1)[1] & 8) != 0)
00514de9      {
00514dee          class CPartArray* part_array = this->part_array;
00514dee          
00514df1          if ((*(uint8_t*)((char*)arg2)[1] & 8) == 0)
00514df1          {
00514e10              this->state = (arg2 & 0xfffff7ff);
00514e10              
00514e16              if (part_array != 0)
00514e18                  CPartArray::DestroyLights(part_array);
00514df1          }
00514df1          else
00514df1          {
00514dfa              this->state = (arg2 | 0x800);
00514dfa              
00514e00              if (part_array != 0)
00514e02                  CPartArray::InitLights(part_array);
00514df1          }
00514de9      }
00514de9      
00514e20      if ((ebx_1 & 0x20) != 0)
00514e30          CPhysicsObj::set_nodraw(this, (this->state & 0x20), 0);
00514e30      
00514e38      if ((*(uint8_t*)((char*)ebx_1)[1] & 0x40) != 0)
00514e4b          CPhysicsObj::set_hidden(this, (this->state & 0x4000), 0);
00514dd0  }

00514e5a                                                                                90 90 90 90 90 90                            ......

00514e60  void __fastcall CPhysicsObj::exit_world(class CPhysicsObj* this)

00514e60  {
00514e63      class CPartArray* part_array = this->part_array;
00514e63      
00514e68      if (part_array != 0)
00514e6a          CPartArray::HandleExitWorld(part_array);
00514e6a      
00514e6f      class MovementManager* movement_manager = this->movement_manager;
00514e6f      
00514e77      if (movement_manager != 0)
00514e79          MovementManager::HandleExitWorld(movement_manager);
00514e79      
00514e7e      class PositionManager* position_manager = this->position_manager;
00514e7e      
00514e86      if (position_manager != 0)
00514e88          PositionManager::UnStick(position_manager);
00514e88      
00514e8d      class TargetManager* target_manager = this->target_manager;
00514e8d      
00514e95      if (target_manager != 0)
00514e95      {
00514e97          TargetManager::ClearTarget(target_manager);
00514ea4          TargetManager::NotifyVoyeurOfEvent(this->target_manager, ExitWorld_TargetStatus);
00514e95      }
00514e95      
00514ea9      class DetectionManager* detection_manager = this->detection_manager;
00514ea9      
00514eb1      if (detection_manager != 0)
00514eb5          DetectionManager::DestroyDetectionCylsphere(detection_manager, 0);
00514eb5      
00514ebe      CPhysicsObj::report_collision_end(this, 1);
00514e60  }

00514ec5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00514ed0  void __fastcall CPhysicsObj::teleport_hook(class CPhysicsObj* this, int32_t arg2)

00514ed0  {
00514ed3      class MovementManager* movement_manager = this->movement_manager;
00514ed3      
00514edb      if (movement_manager != 0)
00514edb      {
00514edd          int32_t var_8_1 = 0x3c;
00514edf          uint32_t edx;
00514edf          MovementManager::CancelMoveTo(movement_manager, edx);
00514edb      }
00514edb      
00514ee4      class PositionManager* position_manager = this->position_manager;
00514ee4      
00514eec      if (position_manager != 0)
00514eee          PositionManager::UnStick(position_manager);
00514eee      
00514ef3      class PositionManager* position_manager_1 = this->position_manager;
00514ef3      
00514efb      if (position_manager_1 != 0)
00514efd          PositionManager::StopInterpolating(position_manager_1);
00514efd      
00514f02      class PositionManager* position_manager_2 = this->position_manager;
00514f02      
00514f0a      if (position_manager_2 != 0)
00514f0c          PositionManager::UnConstrain(position_manager_2);
00514f0c      
00514f11      class TargetManager* target_manager = this->target_manager;
00514f11      
00514f19      if (target_manager != 0)
00514f19      {
00514f1b          TargetManager::ClearTarget(target_manager);
00514f28          TargetManager::NotifyVoyeurOfEvent(this->target_manager, Teleported_TargetStatus);
00514f19      }
00514f19      
00514f31      CPhysicsObj::report_collision_end(this, 1);
00514ed0  }

00514f3a                                                                                90 90 90 90 90 90                            ......

00514f40  int32_t __thiscall CPhysicsObj::set_description(class CPhysicsObj* this, class PhysicsDesc const* arg2, int32_t arg3)

00514f40  {
00514f44      class PhysicsDesc* esi = arg2;
00514f5c      int32_t result = CPhysicsObj::SetMotionTableID(this, PhysicsDesc::get_mtable_id(esi, &arg2)->id);
00514f5c      
00514f63      if (result == 0)
00514f6a          return result;
00514f6a      
00514f6d      class CSoundTable* sound_table = this->sound_table;
00514f71      enum PhysicsTimeStamp i = POSITION_TS;
00514f76      uint32_t id = esi->stable_id.id;
00514f76      
00514f7c      if (sound_table != 0)
00514f7c      {
00514f7e          sound_table->vtable->Release();
00514f83          this->sound_table = nullptr;
00514f7c      }
00514f7c      
00514f88      float x;
00514f88      
00514f88      if (id != 0)
00514f9f          this->sound_table = DBObj::Get(QualifiedDataID::QualifiedDataID(&x, id, 0x22));
00514f9f      
00514fa2      class PhysicsScriptTable* physics_script_table = this->physics_script_table;
00514fa7      uint32_t id_1 = esi->phstable_id.id;
00514fa7      
00514fad      if (physics_script_table != 0)
00514fad      {
00514faf          physics_script_table->vtable->Release();
00514fb4          this->physics_script_table = nullptr;
00514fad      }
00514fad      
00514fb9      if (id_1 != 0)
00514fd0          this->physics_script_table = DBObj::Get(QualifiedDataID::QualifiedDataID(&x, id_1, 0x2c));
00514fd0      
00514fd5      int32_t eax_6 = CInputManager::GetMouseY(esi);
00514fdc      int32_t var_10 = eax_6;
00514fdc      
00514fe2      if (eax_6 == 0)
00515013          CPhysicsObj::SetPlacementFrameInternal(this, EffectInfoRegion::GetStat(esi));
00514fe2      else
00514fe2      {
00514fe9          this->last_move_was_autonomous = PhysicsDesc::get_autonomous_movement(esi);
00514fe9          
00514ff3          if (arg3 != 0)
00515004              CPhysicsObj::unpack_movement(this, &var_10, DiskConBase::GetSubset(esi));
00514fe2      }
00514fe2      
00515020      CPhysicsObj::set_state(this, esi->state, 1);
00515025      long double x87_r6 = ((long double)esi->object_scale);
00515028      class CPartArray* part_array = this->part_array;
0051502b      this->m_scale = ((float)x87_r6);
0051502b      
00515033      if (part_array != 0)
00515033      {
00515039          x = ((float)x87_r6);
0051503d          float var_8_1 = ((float)x87_r6);
00515042          float var_4_1 = ((float)x87_r6);
00515046          CPartArray::SetScaleInternal(part_array, &x);
00515033      }
00515033      
0051504f      long double x87_r6_1 = ((long double)esi->friction);
00515052      (x87_r6_1 - ((long double)0.0));
0051505a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0051505a      
0051505d      if (p)
0051505d      {
0051505f          long double temp2_1 = ((long double)1.0);
0051505f          (x87_r6_1 - temp2_1);
0051505f          
0051506a          if ((*(uint8_t*)((char*)((((x87_r6_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp2_1) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) != 0)
0051506c              this->friction = ((float)x87_r6_1);
0051505d      }
0051505d      
00515079      class CPartArray* part_array_2 = part_array;
0051507f      CPhysicsObj::set_elasticity(this, ((float)((long double)esi->elasticity)));
00515084      float translucency = esi->translucency;
00515087      arg2 = translucency;
0051508b      long double x87_r6_3 = ((long double)arg2);
0051508f      long double temp3 = ((long double)0f);
0051508f      (x87_r6_3 - temp3);
00515097      this->translucencyOriginal = translucency;
0051509d      int32_t eax_11;
0051509d      eax_11 = ((((x87_r6_3 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, temp3))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == temp3) ? 1 : 0) << 0xe) | 0x3800))));
0051509f      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0051509f      
005150a2      if (p_1)
005150a2      {
005150a6          class CPartArray* part_array_1 = this->part_array;
005150ab          this->translucency = translucency;
005150ab          
005150b1          if (part_array_1 != 0)
005150b4              CPartArray::SetTranslucencyInternal(part_array_1, translucency);
005150a2      }
005150a2      
005150bc      float y = esi->velocity.y;
005150bf      float z_1 = esi->velocity.z;
005150c2      x = esi->velocity.x;
005150cc      float y_2 = y;
005150d3      float z_2 = z_1;
005150d7      CPhysicsObj::set_velocity(this, &x, 1);
005150e2      float y_1 = esi->omega.y;
005150e8      float z = esi->omega.z;
005150ee      x = esi->omega.x;
005150fa      this->m_omegaVector.x = x;
005150fa      this->m_omegaVector.y = y_1;
005150fa      this->m_omegaVector.z = z;
0051511a      enum PScriptType default_script = esi->default_script;
00515120      this->default_script_intensity = ((float)((long double)esi->default_script_intensity));
00515123      this->default_script = default_script;
00515126      uint16_t (* edi_1)[0x9] = &this->update_times;
00515126      
00515142      do
00515142      {
00515145          ADJ(edi_1)->update_times[0] = PhysicsDesc::get_timestamp(esi, i);
0051513b          i += 1;
0051513c          edi_1 = &*(uint18_t*)edi_1[1];
00515142      } while (i < NUM_PHYSICS_TS);
00515142      
00515150      return 1;
00514f40  }

00515153                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00515160  void __fastcall CPhysicsObj::calc_cross_cells_static(class CPhysicsObj* this)

00515160  {
0051516a      if (((*(uint8_t*)$S247) & 1) == 0)
0051516a      {
0051517a          $S247 |= 1;
00515180          CELLARRAY::CELLARRAY(&cell_array);
0051518a          atexit($E248);
0051516a      }
0051516a      
00515192      cell_array.num_cells = 0;
0051519c      cell_array.added_outside = 0;
005151a6      cell_array.do_not_load_cells = 1;
005151a6      
005151ba      if ((this->state & 0x10000) != 0)
0051520e          CPhysicsObj::find_bbox_cell_list(this, &cell_array);
005151ba      else
005151ba      {
005151bc          class CPartArray* part_array = this->part_array;
005151bc          
005151c1          if (part_array == 0)
0051520e              CPhysicsObj::find_bbox_cell_list(this, &cell_array);
005151c1          else if (CPartArray::GetNumCylsphere(part_array) == 0)
0051520e              CPhysicsObj::find_bbox_cell_list(this, &cell_array);
005151ca          else
005151ca          {
005151cc              class CPartArray* part_array_1 = this->part_array;
005151d2              class CCylSphere* edi_1;
005151d2              
005151d2              if (part_array_1 == 0)
005151dd                  edi_1 = nullptr;
005151d2              else
005151d9                  edi_1 = CPartArray::GetCylsphere(part_array_1);
005151d9              
005151df              class CPartArray* part_array_2 = this->part_array;
005151e4              uint32_t eax_3;
005151e4              
005151e4              if (part_array_2 == 0)
005151ed                  eax_3 = 0;
005151e4              else
005151e6                  eax_3 = CPartArray::GetNumCylsphere(part_array_2);
005151e6              
005151fc              CObjCell::find_cell_list(&this->m_position, eax_3, edi_1, &cell_array, nullptr);
005151ca          }
005151ba      }
005151ba      
00515215      CPhysicsObj::remove_shadows_from_cells(this);
00515221      CPhysicsObj::add_shadows_to_cells(this, &cell_array);
00515160  }

00515228                          90 90 90 90 90 90 90 90                                                          ........

00515230  void __fastcall CPhysicsObj::calc_cross_cells(class CPhysicsObj* this)

00515230  {
00515231      class CPhysicsObj* this_1 = this;
00515233      this = (*(uint8_t*)$S249);
00515233      
00515240      if ((1 & this) == 0)
00515240      {
0051524f          $S249 |= 1;
00515255          CELLARRAY::CELLARRAY(&cell_array);
0051525f          atexit($E250);
00515240      }
00515240      
00515267      cell_array.num_cells = 0;
00515271      cell_array.added_outside = 0;
0051527b      cell_array.do_not_load_cells = 0;
0051527b      
0051528f      if ((this_1->state & 0x10000) != 0)
0051530c          CPhysicsObj::find_bbox_cell_list(this_1, &cell_array);
0051528f      else
0051528f      {
00515291          class CPartArray* part_array = this_1->part_array;
00515296          uint32_t eax_1;
00515296          
00515296          if (part_array != 0)
00515298              eax_1 = CPartArray::GetNumCylsphere(part_array);
00515298          
0051529f          if ((part_array == 0 || eax_1 == 0))
0051529f          {
005152dc              class CPartArray* part_array_3 = this_1->part_array;
005152e1              class CSphere* eax_5;
005152e1              
005152e1              if (part_array_3 == 0)
005152ea                  eax_5 = &dummy_sphere;
005152e1              else
005152e3                  eax_5 = CPartArray::GetSortingSphere(part_array_3);
005152e3              
005152fb              CObjCell::find_cell_list(&this_1->m_position, eax_5, &cell_array, nullptr);
0051529f          }
0051529f          else
0051529f          {
005152a1              class CPartArray* part_array_1 = this_1->part_array;
005152a7              class CCylSphere* edi_1;
005152a7              
005152a7              if (part_array_1 == 0)
005152b2                  edi_1 = nullptr;
005152a7              else
005152ae                  edi_1 = CPartArray::GetCylsphere(part_array_1);
005152ae              
005152b4              class CPartArray* part_array_2 = this_1->part_array;
005152b9              uint32_t eax_3;
005152b9              
005152b9              if (part_array_2 == 0)
005152c2                  eax_3 = 0;
005152b9              else
005152bb                  eax_3 = CPartArray::GetNumCylsphere(part_array_2);
005152bb              
005152d1              CObjCell::find_cell_list(&this_1->m_position, eax_3, edi_1, &cell_array, nullptr);
0051529f          }
0051528f      }
0051528f      
00515313      CPhysicsObj::remove_shadows_from_cells(this_1);
0051531f      CPhysicsObj::add_shadows_to_cells(this_1, &cell_array);
00515230  }

00515326                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00515330  int32_t __thiscall CPhysicsObj::SetPositionInternal(class CPhysicsObj* this, class CTransition const* arg2)

00515330  {
0051533b      uint32_t transient_state = this->transient_state;
0051534a      class CObjCell* curr_cell = arg2->sphere_path.curr_cell;
0051534a      
00515360      if (curr_cell == 0)
00515360      {
00515561          CPhysicsObj::prepare_to_leave_visibility(this);
00515569          CPhysicsObj::store_position(this, &arg2->sphere_path.curr_pos);
00515579          CObjectMaint::GotoLostCell(CPhysicsObj::obj_maint, this, this->m_position.objcell_id);
0051557e          this->transient_state &= 0xffffff7f;
00515360      }
00515360      else
00515360      {
0051536d          if (this->cell == curr_cell)
0051536d          {
00515382              uint32_t objcell_id = arg2->sphere_path.curr_pos.objcell_id;
00515385              this->m_position.objcell_id = objcell_id;
00515385              
00515388              if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00515388              {
0051538a                  class CPartArray* part_array = this->part_array;
0051538a                  
0051538f                  if (part_array != 0)
00515392                      CPartArray::SetCellID(part_array, objcell_id);
00515388              }
00515388              
00515397              class CHILDLIST* children = this->children;
00515397              
0051539c              if (children != 0)
0051539c              {
0051539e                  int32_t ebx_1 = 0;
0051539e                  
005153a3                  if (children->num_objects > 0)
005153a3                  {
005153d8                      do
005153d8                      {
005153ae                          void* eax_2 = this->children->objects.data[((uint32_t)ebx_1)];
005153b7                          bool cond:4_1 = (*(uint8_t*)((char*)((int16_t)*(uint32_t*)((char*)eax_2 + 0xa8)))[1] & 0x10) != 0;
005153ba                          uint32_t objcell_id_1 = arg2->sphere_path.curr_pos.objcell_id;
005153bd                          *(uint32_t*)((char*)eax_2 + 0x4c) = objcell_id_1;
005153bd                          
005153c0                          if (!(cond:4_1))
005153c0                          {
005153c2                              class CPartArray* eax_3 = *(uint32_t*)((char*)eax_2 + 0x10);
005153c2                              
005153c7                              if (eax_3 != 0)
005153cc                                  CPartArray::SetCellID(eax_3, objcell_id_1);
005153c0                          }
005153c0                          
005153d4                          ebx_1 += 1;
005153d8                      } while (ebx_1 < this->children->num_objects);
005153a3                  }
0051539c              }
0051536d          }
0051536d          else
00515372              CPhysicsObj::change_cell(this, curr_cell);
00515372          
005153e0          CPhysicsObj::set_frame(this, &arg2->sphere_path.curr_pos.frame);
005153e5          int32_t contact_plane_is_water = arg2->collision_info.contact_plane_is_water;
005153f1          this->contact_plane_cell_id = arg2->collision_info.contact_plane_cell_id;
00515404          this->contact_plane.N.x = arg2->collision_info.contact_plane.N.x;
00515404          this->contact_plane.N.y = arg2->collision_info.contact_plane.N.y;
00515404          this->contact_plane.N.z = arg2->collision_info.contact_plane.N.z;
00515404          this->contact_plane.d = arg2->collision_info.contact_plane.d;
00515429          uint32_t transient_state_1 = this->transient_state;
00515430          uint32_t eax_7;
00515430          
00515430          if (arg2->collision_info.contact_plane_valid == 0)
00515437              eax_7 = (transient_state_1 & 0xfffffffe);
00515430          else
00515432              eax_7 = (transient_state_1 | 1);
00515432          
0051543c          this->transient_state = eax_7;
00515442          CPhysicsObj::calc_acceleration(this);
0051544d          uint32_t transient_state_2 = this->transient_state;
00515453          uint32_t eax_9;
00515453          
00515453          if (contact_plane_is_water == 0)
0051545a              eax_9 = (transient_state_2 & 0xfffffff7);
00515453          else
00515455              eax_9 = (transient_state_2 | 8);
00515455          
0051545f          this->transient_state = eax_9;
0051545f          
00515465          if ((eax_9 & 1) == 0)
00515465          {
0051549f              this->transient_state = (eax_9 & 0xfffffffd);
0051549f              
005154a5              if ((eax_9 & 2) != 0)
005154a5              {
005154a7                  class MovementManager* movement_manager = this->movement_manager;
005154a7                  
005154af                  if (movement_manager != 0)
005154b1                      MovementManager::LeaveGround(movement_manager);
005154a5              }
005154a5              
005154b8              CPhysicsObj::calc_acceleration(this);
00515465          }
00515465          else
00515465          {
00515467              long double x87_r7_1 = ((long double)this->contact_plane.N.z);
0051546d              long double temp1_1 = ((long double)PhysicsGlobals::floor_z);
0051546d              (x87_r7_1 - temp1_1);
00515473              eax_9 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00515473              
00515478              if ((*(uint8_t*)((char*)eax_9)[1] & 1) != 0)
0051548e                  CPhysicsObj::set_on_walkable(this, 0);
00515478              else
00515482                  CPhysicsObj::set_on_walkable(this, 1);
00515465          }
00515465          
005154c2          this->sliding_normal.x = arg2->collision_info.sliding_normal.x;
005154c2          this->sliding_normal.y = arg2->collision_info.sliding_normal.y;
005154c2          this->sliding_normal.z = arg2->collision_info.sliding_normal.z;
005154db          uint32_t transient_state_3 = this->transient_state;
005154e1          uint32_t eax_13;
005154e1          
005154e1          if (arg2->collision_info.sliding_normal_valid == 0)
005154e8              eax_13 = (transient_state_3 & 0xfffffffb);
005154e1          else
005154e3              eax_13 = (transient_state_3 | 4);
005154e3          
005154ef          this->transient_state = eax_13;
005154fe          CPhysicsObj::handle_all_collisions(this, &arg2->collision_info, (transient_state & 1), (transient_state & 2));
005154fe          
0051550b          if (this->cell != 0)
0051550b          {
00515517              if ((this->state & 0x10000) != 0)
00515517              {
0051551b                  CPhysicsObj::calc_cross_cells(this);
0051552b                  return 1;
00515517              }
00515517              
0051553a              if (arg2->cell_array.num_cells > 0)
0051553a              {
0051553e                  CPhysicsObj::remove_shadows_from_cells(this);
0051554c                  CPhysicsObj::add_shadows_to_cells(this, &arg2->cell_array);
0051553a              }
0051550b          }
00515360      }
00515360      
00515593      return 1;
00515330  }

00515596                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005155a0  void __fastcall CPhysicsObj::leave_world(class CPhysicsObj* this)

005155a0  {
005155a5      CPhysicsObj::report_collision_end(this, 1);
005155aa      class CObjectMaint* CPhysicsObj::obj_maint_1 = CPhysicsObj::obj_maint;
005155aa      
005155b2      if (CPhysicsObj::obj_maint_1 != 0)
005155b2      {
005155b5          uint32_t edx_1 = CObjectMaint::RemoveFromLostCell(CPhysicsObj::obj_maint_1, this);
005155c3          uint32_t id = this->id;
005155c4          CObjectMaint::RemoveObjectToBeDestroyed(CPhysicsObj::obj_maint, edx_1);
005155b2      }
005155b2      
005155d7      this->transient_state &= 0xffffff7f;
005155dd      CPhysicsObj::remove_shadows_from_cells(this);
005155e6      CPhysicsObj::leave_cell(this, 0);
005155f4      this->m_position.objcell_id = 0;
005155f4      
005155fb      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
005155fb      {
005155fd          class CPartArray* part_array = this->part_array;
005155fd          
00515602          if (part_array != 0)
00515606              CPartArray::SetCellID(part_array, 0);
005155fb      }
005155fb      
00515616      this->transient_state &= 0xfffffffe;
0051561c      CPhysicsObj::calc_acceleration(this);
00515627      int32_t eax_4 = (this->transient_state & 0xfffffff7);
00515634      this->transient_state = (eax_4 & 0xfffffffd);
00515634      
0051563a      if ((eax_4 & 2) != 0)
0051563a      {
0051563c          class MovementManager* movement_manager = this->movement_manager;
0051563c          
00515644          if (movement_manager != 0)
00515646              MovementManager::LeaveGround(movement_manager);
0051563a      }
0051563a      
0051564d      CPhysicsObj::calc_acceleration(this);
00515652      this->transient_state &= 0xfffffe0b;
005155a0  }

0051565e                                                                                            90 90                                ..

00515660  enum SetPositionError __thiscall CPhysicsObj::ForceIntoCell(class CPhysicsObj* this, class CObjCell* arg2, class Position const* arg3)

00515660  {
0051566a      if (arg2 == 0)
0051569e          return 3;
0051569e      
00515674      CPhysicsObj::set_frame(this, &arg3->frame);
00515674      
0051567f      if (this->cell != arg2)
0051567f      {
00515684          CPhysicsObj::change_cell(this, arg2);
0051568b          CPhysicsObj::calc_cross_cells(this);
0051567f      }
0051567f      
00515694      return 0;
00515660  }

005156a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005156b0  void __thiscall CPhysicsObj::UpdateObjectInternal(class CPhysicsObj* this, float arg2)

005156b0  {
005156b6      uint16_t transient_state = ((int16_t)this->transient_state);
005156b6      
005156bf      if (transient_state >= 0)
005156bf      {
005159b8      label_5159b8:
005159b8          class ParticleManager* particle_manager = this->particle_manager;
005159b8          
005159c0          if (particle_manager != 0)
005159c2              ParticleManager::UpdateParticles(particle_manager);
005159c2          
005159c7          class ScriptManager* script_manager = this->script_manager;
005159c7          
005159cc          if (script_manager != 0)
005159d0              ScriptManager::UpdateScripts(script_manager);
005156bf      }
005156bf      else if (this->cell != 0)
005156cf      {
005156d8          if ((*(uint8_t*)((char*)transient_state)[1] & 1) != 0)
005156de              CPhysicsObj::set_ethereal(this, 0, 0);
005156de          
005156e7          this->jumped_this_frame = 0;
005156ed          int32_t var_48 = 0x796910;
005156f5          int32_t var_44_1 = 0;
005156f9          int32_t var_40 = 0x3f800000;
00515701          int32_t var_3c_1 = 0;
00515709          int32_t var_38_1 = 0;
00515711          int32_t var_34_1 = 0;
00515719          float x = 0f;
00515721          int32_t var_8_1 = 0;
00515729          int32_t var_4_1 = 0;
00515731          Frame::cache(&var_40);
00515745          uint32_t objcell_id = this->m_position.objcell_id;
00515749          long double st0_1 = CPhysicsObj::UpdatePositionInternal(this, arg2, &var_40);
0051574e          class CPartArray* part_array = this->part_array;
00515753          uint32_t eax_1;
00515753          
00515753          if (part_array != 0)
00515755              eax_1 = CPartArray::GetNumSphere(part_array);
00515755          
0051575c          int32_t __return;
0051575c          
0051575c          if ((part_array != 0 && eax_1 != 0))
0051575c          {
005157ec              if (AC1Legacy::Vector3::operator==(&x, &this->m_position.frame.m_fOrigin) == 0)
005157ec              {
00515846                  uint32_t state = this->state;
00515846                  
0051584f                  if ((*(uint8_t*)((char*)state)[1] & 1) != 0)
0051584f                  {
0051585b                      AC1Legacy::Vector3::operator-(&x, &__return, &this->m_position.frame.m_fOrigin);
00515864                      Vector3::Normalize(&__return);
00515872                      Frame::set_vector_heading(&var_40, &__return);
0051584f                  }
0051584f                  else if (((state & "activation type (%s) with '%s' b…") != 0 && AC1Legacy::Vector3::is_zero(&this->m_velocityVector) == 0))
0051587e                  {
00515898                      int32_t var_74_5 = AC1Legacy::Vector3::get_heading(&this->m_velocityVector);
005158a0                      Frame::set_heading(&var_40, ((float)st0_1));
0051587e                  }
0051587e                  
005158b2                  class CTransition* eax_10 = CPhysicsObj::transition(this, &this->m_position, &var_48, 0);
005158b2                  
005158bb                  if (eax_10 == 0)
005158bb                  {
00515924                      x = this->m_position.frame.m_fOrigin.x;
0051592c                      float z_2 = this->m_position.frame.m_fOrigin.z;
00515933                      float y_2 = this->m_position.frame.m_fOrigin.y;
00515937                      CPhysicsObj::set_frame(this, &var_40);
0051593c                      __return = 0;
00515948                      this->cached_velocity.x = __return;
00515948                      this->cached_velocity.y = 0f;
00515948                      this->cached_velocity.z = 0f;
005158bb                  }
005158bb                  else
005158bb                  {
005158cb                      Position::get_offset(&this->m_position, &__return, &eax_10->sphere_path.curr_pos);
005158de                      void __return_1;
005158de                      int32_t* eax_12 = Vector3::operator/(&__return, &__return_1, arg2);
005158e5                      float ecx_20 = eax_12[1];
005158e8                      __return = *(uint32_t*)eax_12;
005158ff                      this->cached_velocity.x = __return;
005158ff                      this->cached_velocity.y = ecx_20;
005158ff                      this->cached_velocity.z = eax_12[2];
00515914                      CPhysicsObj::SetPositionInternal(this, eax_10);
005158bb                  }
005157ec              }
005157ec              else
005157ec              {
005157f7                  x = this->m_position.frame.m_fOrigin.x;
00515802                  float y_1 = this->m_position.frame.m_fOrigin.y;
00515806                  float z_1 = this->m_position.frame.m_fOrigin.z;
0051580a                  CPhysicsObj::set_frame(this, &var_40);
0051580f                  __return = 0;
0051581b                  this->cached_velocity.x = __return;
0051581b                  this->cached_velocity.y = 0f;
0051581b                  this->cached_velocity.z = 0f;
005157ec              }
0051575c          }
0051575c          else
0051575c          {
00515764              if (this->movement_manager == 0)
00515764              {
00515766                  uint32_t transient_state_1 = this->transient_state;
00515766                  
0051576e                  if ((transient_state_1 & 2) != 0)
00515775                      this->transient_state = (transient_state_1 & 0xffffff7f);
00515764              }
00515764              
00515789              x = this->m_position.frame.m_fOrigin.x;
00515794              float y = this->m_position.frame.m_fOrigin.y;
00515798              float z = this->m_position.frame.m_fOrigin.z;
0051579c              CPhysicsObj::set_frame(this, &var_40);
005157a1              __return = 0;
005157ad              this->cached_velocity.x = __return;
005157ad              this->cached_velocity.y = 0f;
005157ad              this->cached_velocity.z = 0f;
0051575c          }
00515970          class DetectionManager* detection_manager = this->detection_manager;
00515970          
00515978          if (detection_manager != 0)
0051597a              DetectionManager::CheckDetection(detection_manager);
0051597a          
0051597f          class TargetManager* target_manager = this->target_manager;
0051597f          
00515987          if (target_manager != 0)
00515989              TargetManager::HandleTargetting(target_manager);
00515989          
0051598e          class MovementManager* movement_manager = this->movement_manager;
0051598e          
00515996          if (movement_manager != 0)
00515998              MovementManager::UseTime(movement_manager);
00515998          
0051599d          class CPartArray* part_array_1 = this->part_array;
0051599d          
005159a2          if (part_array_1 != 0)
005159a4              CPartArray::HandleMovement(part_array_1);
005159a4          
005159a9          class PositionManager* position_manager = this->position_manager;
005159a9          
005159b1          if (position_manager != 0)
005159b3              PositionManager::UseTime(position_manager);
005159b3          
00515753          goto label_5159b8;
005156cf      }
005156b0  }

005159dd                                                                                         90 90 90                               ...

005159e0  void __thiscall CPhysicsObj::add_obj_to_cell(class CPhysicsObj* this, class CObjCell* arg2, class Frame const* arg3)

005159e0  {
005159e9      CPhysicsObj::enter_cell(this, arg2);
005159f8      Frame::operator=(&this->m_position.frame, arg3);
005159f8      
00515a06      if ((*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) == 0)
00515a06      {
00515a08          class CPartArray* part_array = this->part_array;
00515a08          
00515a0d          if (part_array != 0)
00515a10              CPartArray::SetFrame(part_array, &this->m_position.frame);
00515a06      }
00515a06      
00515a17      CPhysicsObj::UpdateChildrenInternal(this);
00515a1e      CPhysicsObj::calc_cross_cells_static(this);
005159e0  }

00515a28                          90 90 90 90 90 90 90 90                                                          ........

00515a30  void __fastcall CPhysicsObj::recalc_cross_cells(class CPhysicsObj* this)

00515a30  {
00515a38      if (this->part_array != 0)
00515a38      {
00515a3f          if (this->m_position.objcell_id != 0)
00515a3f          {
00515a5c              CPhysicsObj::calc_cross_cells(this);
00515a62          label_515a62:
00515a62              int32_t esi_1 = 0;
00515a62              
00515a64              while (true)
00515a64              {
00515a64                  class CHILDLIST* children = this->children;
00515a64                  
00515a69                  if (children == 0)
00515a69                      break;
00515a69                  
00515a6e                  if (esi_1 >= children->num_objects)
00515a6e                      break;
00515a6e                  
00515a79                  CPhysicsObj::recalc_cross_cells(children->objects.data[((uint32_t)esi_1)]);
00515a7e                  esi_1 += 1;
00515a64              }
00515a3f          }
00515a3f          else
00515a3f          {
00515a41              uint32_t eax_1;
00515a41              eax_1 = this->m_bExaminationObject;
00515a41              
00515a51              if ((eax_1 != 0 && (*(uint8_t*)((char*)((int16_t)this->state))[1] & 0x10) != 0))
00515a51              {
00515a53                  CPhysicsObj::add_particle_shadow_to_cell(this);
00515a58                  goto label_515a62;
00515a51              }
00515a3f          }
00515a38      }
00515a30  }

00515a84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00515a90  int32_t __thiscall CPhysicsObj::set_parent(class CPhysicsObj* this, class CPhysicsObj* arg2, uint32_t arg3)

00515a90  {
00515a93      class CPhysicsObj* edi = arg2;
00515a93      
00515a9d      if ((edi != 0 && CPhysicsObj::add_child(edi, this, arg3) != 0))
00515a9d      {
00515aba          CPhysicsObj::unset_parent(this);
00515ac1          CPhysicsObj::leave_world(this);
00515ac6          this->parent = edi;
00515ac9          class CObjCell* cell = edi->cell;
00515ac9          
00515ad1          if (cell != 0)
00515ad1          {
00515ad6              CPhysicsObj::change_cell(this, cell);
00515adb              class CHILDLIST* children_1 = edi->children;
00515adb              
00515ae0              if ((children_1 != 0 && CHILDLIST::FindChildIndex(children_1, this, &arg2) != 0))
00515ae0              {
00515af1                  uint32_t ecx_4 = ((uint32_t)arg2);
00515af6                  class CHILDLIST* children = edi->children;
00515b0e                  CPhysicsObj::UpdateChild(edi, this, children->part_numbers.data[ecx_4], &children->frames.data[ecx_4]);
00515b15                  CPhysicsObj::recalc_cross_cells(this);
00515ae0              }
00515ad1          }
00515ad1          
00515b26          if ((*(uint8_t*)((char*)((int16_t)this->parent->state))[1] & 0x40) != 0)
00515b26          {
00515b28              this->state |= 0x20;
00515b2f              class CPartArray* part_array = this->part_array;
00515b2f              
00515b34              if (part_array != 0)
00515b38                  CPartArray::SetNoDrawInternal(part_array, 1);
00515b26          }
00515b26          
00515b45          return 1;
00515a9d      }
00515a9d      
00515b4d      return 0;
00515a90  }


00515b50  int32_t __thiscall CPhysicsObj::set_parent(class CPhysicsObj* this, class CPhysicsObj* arg2, uint32_t arg3, class Frame const* arg4)

00515b50  {
00515b5e      if ((arg2 != 0 && CPhysicsObj::add_child(arg2, this, arg3, arg4) != 0))
00515b5e      {
00515b76          int32_t eax_1;
00515b76          eax_1 = arg2->m_bExaminationObject;
00515b7b          this->m_bExaminationObject = eax_1;
00515b7e          CPhysicsObj::unset_parent(this);
00515b85          CPhysicsObj::leave_world(this);
00515b8a          this->parent = arg2;
00515b8d          class CObjCell* cell = arg2->cell;
00515b8d          
00515b95          if (cell != 0)
00515b95          {
00515b9a              CPhysicsObj::change_cell(this, cell);
00515ba4              CPhysicsObj::UpdateChild(arg2, this, arg3, arg4);
00515bab              CPhysicsObj::recalc_cross_cells(this);
00515b95          }
00515b95          
00515bb9          return 1;
00515b5e      }
00515b5e      
00515bc2      return 0;
00515b50  }

00515bc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00515bd0  enum SetPositionError __thiscall CPhysicsObj::SetPositionInternal(class CPhysicsObj* this, class Position* arg2, class SetPositionStruct const* arg3, class CTransition* arg4)

00515bd0  {
00515bde      class CTransition* edi = arg4;
00515be2      class CSphere* local_sphere = edi->sphere_path.local_sphere;
00515be2      
00515be5      if (this->cell == 0)
00515be7          CPhysicsObj::prepare_to_enter_world(this);
00515be7      
00515bf8      int32_t ecx_2 = ((arg3->flags >> 5) & 1);
00515c07      arg4 = nullptr;
00515c0f      CPhysicsObj::AdjustPosition(arg2, local_sphere, &arg4, ecx_2, 1);
00515c14      class CTransition* ebp = arg4;
00515c14      
00515c1d      if (ebp == 0)
00515c1d      {
00515cda          CPhysicsObj::prepare_to_leave_visibility(this);
00515ce2          CPhysicsObj::store_position(this, arg2);
00515cf2          CObjectMaint::GotoLostCell(CPhysicsObj::obj_maint, this, this->m_position.objcell_id);
00515cf7          this->transient_state &= 0xffffff7f;
00515c1d      }
00515c1d      else
00515c1d      {
00515c23          class CWeenieObject* weenie_obj = this->weenie_obj;
00515c23          
00515c2b          if (weenie_obj != 0)
00515c2b          {
00515c34              if (weenie_obj->vtable->IsHook() != 0)
00515c61                  return CPhysicsObj::ForceIntoCell(this, ebp, arg2);
00515c61              
00515c43              if (this->weenie_obj->vtable->IsStorage() != 0)
00515c61                  return CPhysicsObj::ForceIntoCell(this, ebp, arg2);
00515c61              
00515c52              if (this->weenie_obj->vtable->IsCorpse() != 0)
00515c61                  return CPhysicsObj::ForceIntoCell(this, ebp, arg2);
00515c2b          }
00515c2b          
00515c6c          if ((arg3->flags & 0x20) != 0)
00515c6e              edi->cell_array.do_not_load_cells = 1;
00515c6e          
00515c85          if (CPhysicsObj::CheckPositionInternal(this, ebp, arg2, edi, arg3) == 0)
00515c85          {
00515cc2              int32_t eax_13 = CPhysicsObj::handle_all_collisions(this, &edi->collision_info, 0, 0);
00515cc7              int32_t eax_14 = -(eax_13);
00515cd5              return (((eax_14 - eax_14) & 2) + 2);
00515c85          }
00515c85          
00515c8f          if (edi->sphere_path.curr_cell == 0)
00515cb2              return 3;
00515cb2          
00515c94          CPhysicsObj::SetPositionInternal(this, edi);
00515c1d      }
00515c1d      
00515d07      return 0;
00515bd0  }

00515d0a                                90 90 90 90 90 90                                                            ......

00515d10  void __fastcall CPhysicsObj::update_object(class CPhysicsObj* this)

00515d10  {
00515d1a      class CPhysicsObj* this_3 = this;
00515d1a      
00515d40      if ((this_3->parent != 0 || (this_3->cell == 0 || (this_3->state & 0x1000000) != 0)))
00515d40      {
00515eeb          this_3->transient_state &= 0xffffff7f;
00515ef5          return;
00515d40      }
00515d40      
00515d46      class CPhysicsObj* CPhysicsObj::player_object_1 = CPhysicsObj::player_object;
00515d4d      double __return;
00515d4d      
00515d4d      if (CPhysicsObj::player_object_1 != 0)
00515d4d      {
00515d5b          class AC1Legacy::Vector3* eax_2 = Position::get_offset(&CPhysicsObj::player_object_1->m_position, &__return, &this_3->m_position);
00515d62          this_3->player_vector.x = eax_2->x;
00515d62          this_3->player_vector.y = eax_2->y;
00515d62          this_3->player_vector.z = eax_2->z;
00515d62          this_3->player_vector;
00515d62          this_3->player_vector;
00515d7b          long double x87_r5_1 = ((long double)this_3->player_vector.x);
00515d95          this_3->player_distance = ((float)x87_r5_1);
00515d98          long double temp0_1 = ((long double)96f);
00515d98          (x87_r5_1 - temp0_1);
00515d9e          float eax_3;
00515d9e          eax_3 = ((((x87_r5_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00515d9e          
00515da3          if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
00515da5              this = CPhysicsObj::obj_maint;
00515da5          
00515db0          if (((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0 || this->part_array == 0))
00515db0          {
00515dc0              this = this_3;
00515dc2              CPhysicsObj::set_active(this, 1);
00515db0          }
00515db0          else
00515db2              this_3->transient_state &= 0xffffff7f;
00515d4d      }
00515d4d      
00515dd3      long double x87_r7_4 = (((long double)Timer::cur_time) - ((long double)this_3->update_time));
00515dd9      int32_t edx_2 = this_3->update_time;
00515ddf      *(int32_t*)((char*)PhysicsTimer::curr_time + 4) = *(uint32_t*)((char*)this_3->update_time)[4];
00515de4      (*(uint32_t*)PhysicsTimer::curr_time) = edx_2;
00515dea      __return = ((double)x87_r7_4);
00515dee      long double x87_r6_3 = ((long double)0.000199999995f);
00515df6      (x87_r7_4 - x87_r6_3);
00515df8      int32_t eax_5;
00515df8      eax_5 = ((((x87_r7_4 < x87_r6_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_3))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_3) ? 1 : 0) << 0xe) | 0x3800))));
00515dfa      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00515dfa      
00515dfd      if (!(p))
00515dfd      {
00515e0d          this_3->update_time = (*(uint32_t*)Timer::cur_time);
00515e13          *(uint32_t*)((char*)this_3->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00515e1e          return;
00515dfd      }
00515dfd      
00515e1f      long double temp1 = ((long double)2.0);
00515e1f      (x87_r7_4 - temp1);
00515e25      eax_5 = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
00515e25      
00515e2a      if ((*(uint8_t*)((char*)eax_5)[1] & 0x41) == 0)
00515e2a      {
00515e39          this_3->update_time = (*(uint32_t*)Timer::cur_time);
00515e3f          *(uint32_t*)((char*)this_3->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00515e4a          return;
00515e2a      }
00515e2a      
00515e4b      long double temp2 = ((long double)0.0);
00515e4b      (x87_r7_4 - temp2);
00515e51      eax_5 = ((((x87_r7_4 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2) ? 1 : 0) << 0xe) | 0x3800))));
00515e53      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00515e56      long double temp4_1;
00515e56      
00515e56      if (p_1)
00515e56      {
00515e96          long double temp3_1;
00515e96          bool c1_1;
00515e96          
00515e96          do
00515e96          {
00515e5a              class CPhysicsObj* this_1 = this;
00515e69              PhysicsTimer::curr_time = ((double)(((long double)PhysicsTimer::curr_time) + ((long double)0.0)));
00515e78              this = CPhysicsObj::UpdateObjectInternal(this_3, ((float)((long double)0.0)));
00515e81              x87_r7_4 = (((long double)__return) - ((long double)0.0));
00515e87              temp3_1 = ((long double)0.0);
00515e87              (x87_r7_4 - temp3_1);
00515e8d              __return = ((double)x87_r7_4);
00515e8d              c1_1 = /* c1_1 = unimplemented  {fst qword [esp+0x8], st0} */;
00515e96          } while ((*(uint8_t*)((char*)((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((c1_1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0);
00515e98          temp4_1 = ((long double)0.0);
00515e98          (x87_r7_4 - temp4_1);
00515e56      }
00515e56      
00515ea3      if ((!(p_1) || (*(uint8_t*)((char*)((((x87_r7_4 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp4_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0))
00515ea3      {
00515eab          class CPhysicsObj* this_2 = this;
00515eb0          PhysicsTimer::curr_time = ((double)(((long double)PhysicsTimer::curr_time) + x87_r7_4));
00515eb9          CPhysicsObj::UpdateObjectInternal(this_3, ((float)x87_r7_4));
00515ea3      }
00515ea3      
00515ecd      this_3->update_time = (*(uint32_t*)PhysicsTimer::curr_time);
00515ed3      *(uint32_t*)((char*)this_3->update_time)[4] = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
00515d10  }

00515ef6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00515f00  enum SetPositionError __thiscall CPhysicsObj::SetScatterPositionInternal(class CPhysicsObj* this, class SetPositionStruct const* arg2, class CTransition* arg3)

00515f00  {
00515f12      enum SetPositionError result = GENERAL_FAILURE_SPE;
00515f17      int32_t var_58 = 0;
00515f17      
00515f1f      if (arg2->num_tries > 0)
00515f1f      {
00515f2c          int32_t var_48;
00515f2c          class AC1Legacy::Vector3* eax = Position::origin(&var_48);
00516021          bool cond:1_1;
00516021          
00516021          do
00516021          {
00515f36              uint32_t objcell_id = arg2->pos.objcell_id;
00515f44              float x = arg2->pos.frame.m_fOrigin.x;
00515f4b              float y = arg2->pos.frame.m_fOrigin.y;
00515f52              float z = arg2->pos.frame.m_fOrigin.z;
00515f59              float qw = arg2->pos.frame.qw;
00515f60              float qx = arg2->pos.frame.qx;
00515f67              float qy = arg2->pos.frame.qy;
00515f6e              float qz = arg2->pos.frame.qz;
00515f75              float var_30_1 = arg2->pos.frame.m_fl2gv[0];
00515f7c              float var_2c_1 = arg2->pos.frame.m_fl2gv[1];
00515f83              float var_28_1 = arg2->pos.frame.m_fl2gv[2];
00515f8a              float var_24_1 = arg2->pos.frame.m_fl2gv[3];
00515f8e              float eax_6 = arg2->pos.frame.m_fl2gv[6];
00515f91              float var_20_1 = arg2->pos.frame.m_fl2gv[4];
00515f95              float ecx_7 = arg2->pos.frame.m_fl2gv[7];
00515f98              float var_1c_1 = arg2->pos.frame.m_fl2gv[5];
00515f9c              float edx_6 = arg2->pos.frame.m_fl2gv[8];
00515fa9              var_48 = 0x796910;
00515fb1              float var_18_1 = eax_6;
00515fb5              float var_14_1 = ecx_7;
00515fb9              float var_10_1 = edx_6;
00515fcf              float var_54_1 = ((float)(Random::RollDice(-1f, 1f) * ((long double)arg2->xrad)));
00515fd8              long double x87_r7_4 = (Random::RollDice(-1f, 1f) * ((long double)arg2->yrad));
00515fe6              float z_1 = eax->z;
00515ff0              eax->x = ((float)(((long double)var_54_1) + ((long double)eax->x)));
00515ff7              long double x87_r7_5 = (x87_r7_4 + ((long double)eax->y));
00515ffc              eax->z = z_1;
00515fff              eax->y = ((float)x87_r7_5);
00516002              result = CPhysicsObj::SetPositionInternal(this, &var_48, arg2, arg3);
00516002              
00516009              if (result == OK_SPE)
00516009                  break;
00516009              
00516013              cond:1_1 = (var_58 + 1) < arg2->num_tries;
00516015              var_48 = 0x79285c;
0051601d              var_58 += 1;
00516021          } while (cond:1_1);
00515f1f      }
00515f1f      
0051602e      return result;
00515f00  }

00516031                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00516040  enum SetPositionError __thiscall CPhysicsObj::SetPositionInternal(class CPhysicsObj* this, class SetPositionStruct const* arg2, class CTransition* arg3)

00516040  {
00516051      if ((*(uint8_t*)((char*)((int16_t)arg2->flags))[1] & 2) != 0)
00516063          return CPhysicsObj::SetScatterPositionInternal(this, arg2, arg3);
00516063      
0051606d      uint32_t objcell_id = arg2->pos.objcell_id;
00516076      int32_t var_48 = 0x796910;
0051607e      void var_40;
0051607e      Frame::operator=(&var_40, &arg2->pos.frame);
00516090      enum SetPositionError result = CPhysicsObj::SetPositionInternal(this, &var_48, arg2, arg3);
00516090      
0051609f      if ((result != OK_SPE && (*(uint8_t*)((char*)((int16_t)arg2->flags))[1] & 1) != 0))
005160a5          return CPhysicsObj::SetScatterPositionInternal(this, arg2, arg3);
005160a5      
005160b0      return result;
00516040  }

005160b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005160c0  enum SetPositionError __thiscall CPhysicsObj::SetPosition(class CPhysicsObj* this, class SetPositionStruct* arg2)

005160c0  {
005160c0      class CPhysicsObj* m_scale = this;
005160cb      class CTransition* eax = CTransition::makeTransition();
005160cb      
005160d4      if (eax == 0)
0051616a          return 1;
0051616a      
005160df      CTransition::init_object(eax, this, 0);
005160e4      class CPartArray* part_array = this->part_array;
005160e9      uint32_t eax_1;
005160e9      
005160e9      if (part_array != 0)
005160eb          eax_1 = CPartArray::GetNumSphere(part_array);
005160eb      
005160f2      uint32_t var_1c;
005160f2      class CSphere* var_18_1;
005160f2      class CPhysicsObj* m_scale_1;
005160f2      
005160f2      if ((part_array == 0 || eax_1 == 0))
005160f2      {
00516130          m_scale_1 = 0x3f800000;
00516135          var_18_1 = &dummy_sphere;
0051613a          var_1c = 1;
005160f2      }
005160f2      else
005160f2      {
005160f4          class CPartArray* part_array_1 = this->part_array;
005160ff          m_scale = this->m_scale;
00516103          class CSphere* ebx_1;
00516103          
00516103          if (part_array_1 == 0)
0051610e              ebx_1 = nullptr;
00516103          else
0051610a              ebx_1 = CPartArray::GetSphere(part_array_1);
0051610a          
00516110          class CPartArray* part_array_2 = this->part_array;
00516110          
00516115          if (part_array_2 == 0)
00516115          {
00516129              m_scale_1 = m_scale;
0051612c              var_18_1 = ebx_1;
0051612d              var_1c = 0;
00516115          }
00516115          else
00516115          {
00516120              m_scale_1 = m_scale;
00516121              var_18_1 = ebx_1;
00516122              var_1c = CPartArray::GetNumSphere(part_array_2);
00516115          }
005160f2      }
005160f2      
0051613e      CTransition::init_sphere(eax, var_1c, var_18_1, m_scale_1);
0051614b      enum SetPositionError result = CPhysicsObj::SetPositionInternal(this, arg2, eax);
00516153      CTransition::cleanupTransition(eax);
00516161      return result;
005160c0  }

0051616d                                         90 90 90                                                               ...

00516170  int32_t __thiscall CPhysicsObj::enter_world(class CPhysicsObj* this, int32_t const arg2)

00516170  {
0051617b      if (this->parent == 0)
0051617b      {
00516188          this->update_time = (*(uint32_t*)Timer::cur_time);
00516195          *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051619b          uint32_t edi_1 = 1;
0051619b          
005161a0          if (arg2 != 0)
005161a2              edi_1 = 0x11;
005161a2          
005161ab          void var_64;
005161ab          SetPositionStruct::SetPositionStruct(&var_64);
005161b8          SetPositionStruct::SetPosition(&var_64, &this->m_position);
005161c2          SetPositionStruct::SetFlags(&var_64, edi_1);
005161d6          void* ecx_5 = &var_64;
005161d6          
005161da          if (CPhysicsObj::SetPosition(this, &var_64) == OK_SPE)
005161da          {
005161ea              SetPositionStruct::~SetPositionStruct(ecx_5);
005161ea              
005161f6              if ((this->state & 1) == 0)
005161f6              {
005161f8                  uint32_t transient_state = this->transient_state;
005161f8                  
00516200                  if (transient_state >= 0)
00516200                  {
0051620e                      this->update_time = (*(uint32_t*)Timer::cur_time);
00516214                      *(uint32_t*)((char*)this->update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00516200                  }
00516200                  
0051621f                  this->transient_state = (transient_state | 0x80);
005161f6              }
005161f6              
00516225              class CPartArray* part_array = this->part_array;
00516225              
0051622a              if (part_array != 0)
0051622c                  CPartArray::HandleEnterWorld(part_array);
0051622c              
00516231              class MovementManager* movement_manager = this->movement_manager;
00516231              
00516239              if (movement_manager != 0)
0051623b                  MovementManager::HandleEnterWorld(movement_manager);
0051623b              
00516249              return 1;
005161da          }
005161da          
005161dc          SetPositionStruct::~SetPositionStruct(ecx_5);
0051617b      }
0051617b      
005161e7      return 0;
00516170  }

0051624c                                      90 90 90 90                                                              ....

00516250  int32_t __fastcall CPhysicsObj::reenter_visibility(class CPhysicsObj* this)

00516250  {
00516256      CPhysicsObj::prepare_to_enter_world(this);
0051625f      void var_64;
0051625f      SetPositionStruct::SetPositionStruct(&var_64);
0051626c      SetPositionStruct::SetPosition(&var_64, &this->m_position);
00516277      SetPositionStruct::SetFlags(&var_64, 0x11);
0051628b      void* ecx_4 = &var_64;
0051628b      
0051628f      if (CPhysicsObj::SetPosition(this, &var_64) != OK_SPE)
0051628f      {
00516291          SetPositionStruct::~SetPositionStruct(ecx_4);
0051629b          return 0;
0051628f      }
0051628f      
0051629c      SetPositionStruct::~SetPositionStruct(ecx_4);
005162a9      return 1;
00516250  }

005162aa                                90 90 90 90 90 90                                                            ......

005162b0  enum SetPositionError __thiscall CPhysicsObj::SetPositionSimple(class CPhysicsObj* this, class Position const* arg2, int32_t arg3)

005162b0  {
005162bd      uint32_t esi = 0x1002;
005162bd      
005162c2      if (arg3 != 0)
005162c4          esi = 0x1012;
005162c4      
005162cd      void var_64;
005162cd      SetPositionStruct::SetPositionStruct(&var_64);
005162db      SetPositionStruct::SetPosition(&var_64, arg2);
005162e5      SetPositionStruct::SetFlags(&var_64, esi);
005162f1      enum SetPositionError result = CPhysicsObj::SetPosition(this, &var_64);
005162fc      SetPositionStruct::~SetPositionStruct(&var_64);
00516308      return result;
005162b0  }

0051630b                                   90 90 90 90 90                                                             .....

00516310  int32_t __thiscall CPhysicsObj::enter_world(class CPhysicsObj* this, class Position const* arg2)

00516310  {
00516318      CPhysicsObj::store_position(this, arg2);
00516327      return CPhysicsObj::enter_world(this, 1);
00516310  }

0051632a                                90 90 90 90 90 90                                                            ......

00516330  int32_t __thiscall CPhysicsObj::MoveOrTeleport(class CPhysicsObj* this, class Position* arg2, uint16_t arg3, int32_t arg4, class AC1Legacy::Vector3 const* arg5)

00516330  {
00516334      class CPhysicsObj* this_1 = this;
00516336      this = this_1->update_times[4];
0051634a      int32_t eax_2;
0051634a      int32_t edx_1;
0051634a      edx_1 = HIGHD(((int64_t)(((uint32_t)this) - ((uint32_t)arg3))));
0051634a      eax_2 = LOWD(((int64_t)(((uint32_t)this) - ((uint32_t)arg3))));
0051634d      int32_t eax_4 = ((eax_2 ^ edx_1) - edx_1);
00516354      bool c;
00516354      
00516354      if (eax_4 > 0x7fff)
0051635b          c = this < arg3;
00516354      else
00516356          c = arg3 < this;
00516356      
00516364      if (-((eax_4 - eax_4)) == 0)
00516364      {
00516375          int32_t eax_8;
00516375          int32_t edx_2;
00516375          eax_8 = CPhysicsObj::newer_event(this_1, TELEPORT_TS, arg3);
00516375          
00516386          if ((eax_8 != 0 || this_1->cell == 0))
00516386          {
005163eb              int32_t var_70_3 = 1;
005163ef              CPhysicsObj::teleport_hook(this_1, edx_2);
005163f8              void var_64;
005163f8              SetPositionStruct::SetPositionStruct(&var_64);
00516406              SetPositionStruct::SetPosition(&var_64, arg2);
00516414              SetPositionStruct::SetFlags(&var_64, 0x1012);
00516420              CPhysicsObj::SetPosition(this_1, &var_64);
00516429              SetPositionStruct::~SetPositionStruct(&var_64);
00516438              return 1;
00516386          }
00516386          
0051638e          if (arg4 != 0)
0051638e          {
00516390              long double x87_r7 = ((long double)this_1->player_distance);
00516393              long double temp1 = ((long double)96f);
00516393              (x87_r7 - temp1);
00516399              int32_t eax_10;
00516399              eax_10 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0051639b              bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0051639b              
0051639e              if (!(p))
0051639e              {
005163af                  CPhysicsObj::InterpolateTo(this_1, arg2, CPhysicsObj::IsMovingTo(this_1));
005163be                  return 1;
0051639e              }
0051639e              
005163c1              class PositionManager* position_manager = this_1->position_manager;
005163c1              
005163c9              if (position_manager != 0)
005163cb                  PositionManager::StopInterpolating(position_manager);
005163cb              
005163d9              CPhysicsObj::SetPositionSimple(this_1, arg2, 1);
005163e8              return 1;
0051638e          }
00516364      }
00516364      
0051636d      return 0;
00516330  }

0051643b                                                                                   90 90 90 90 90                             .....

00516440  uint32_t PositionPack::GetPackSize(uint32_t* arg1, class Position const* arg2, class AC1Legacy::Vector3 const* arg3, uint32_t arg4, int32_t arg5, uint16_t arg6, uint16_t arg7, uint16_t arg8, uint16_t arg9)

00516440  {
00516449      *(uint32_t*)arg1 = 0;
00516451      long double x87_r7_1 = fabsl(((long double)arg3->x));
00516453      long double x87_r6 = ((long double)0.000199999995f);
00516459      (x87_r6 - x87_r7_1);
00516459      
00516460      if ((*(uint8_t*)((char*)((((x87_r6 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0051648a          *(uint32_t*)arg1 = 1;
00516460      else
00516460      {
00516465          long double x87_r7_3 = fabsl(((long double)arg3->y));
00516467          long double x87_r6_1 = ((long double)0.000199999995f);
0051646d          (x87_r6_1 - x87_r7_3);
0051646d          
00516474          if ((*(uint8_t*)((char*)((((x87_r6_1 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_3) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0051648a              *(uint32_t*)arg1 = 1;
00516474          else
00516474          {
00516479              long double x87_r7_5 = fabsl(((long double)arg3->z));
0051647b              long double x87_r6_2 = ((long double)0.000199999995f);
00516481              (x87_r6_2 - x87_r7_5);
00516481              
00516488              if ((*(uint8_t*)((char*)((((x87_r6_2 < x87_r7_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_5))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_5) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0051648a                  *(uint32_t*)arg1 = 1;
00516474          }
00516460      }
00516460      
00516496      if (arg4 != 0)
00516498          *(uint32_t*)arg1 |= 2;
00516498      
005164a1      if (arg5 != 0)
005164a3          *(uint32_t*)arg1 |= 4;
005164a3      
005164ad      UIElement_ColorPicker::GetUIElementType(arg2);
005164b5      long double x87_r7_7 = fabsl(((long double)arg2->frame.qw));
005164b7      long double x87_r6_3 = ((long double)0.000199999995f);
005164bf      (x87_r6_3 - x87_r7_7);
005164c1      int32_t ecx_1 = 0x14;
005164c1      
005164c9      if ((*(uint8_t*)((char*)((((x87_r6_3 < x87_r7_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_7))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_7) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
005164d0          ecx_1 = 0x18;
005164c9      else
005164cb          *(uint32_t*)arg1 |= 8;
005164cb      
005164d6      long double x87_r7_9 = fabsl(((long double)arg2->frame.qx));
005164d8      long double x87_r6_4 = ((long double)0.000199999995f);
005164de      (x87_r6_4 - x87_r7_9);
005164de      
005164e5      if ((*(uint8_t*)((char*)((((x87_r6_4 < x87_r7_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_9))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_9) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
005164ec          ecx_1 += 4;
005164e5      else
005164e7          *(uint32_t*)arg1 |= 0x10;
005164e7      
005164f2      long double x87_r7_11 = fabsl(((long double)arg2->frame.qy));
005164f4      long double x87_r6_5 = ((long double)0.000199999995f);
005164fa      (x87_r6_5 - x87_r7_11);
005164fa      
00516501      if ((*(uint8_t*)((char*)((((x87_r6_5 < x87_r7_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, x87_r7_11))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == x87_r7_11) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00516508          ecx_1 += 4;
00516501      else
00516503          *(uint32_t*)arg1 |= 0x20;
00516503      
0051650f      long double x87_r7_13 = fabsl(((long double)arg2->frame.qz));
00516511      long double x87_r6_6 = ((long double)0.000199999995f);
00516517      (x87_r6_6 - x87_r7_13);
00516517      
0051651e      if ((*(uint8_t*)((char*)((((x87_r6_6 < x87_r7_13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_6, x87_r7_13))) ? 1 : 0) << 0xa) | ((((x87_r6_6 == x87_r7_13) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00516525          ecx_1 += 4;
0051651e      else
00516520          *(uint32_t*)arg1 |= 0x40;
00516520      
00516528      uint8_t eax_4 = ((int8_t)*(uint32_t*)arg1);
00516528      
0051652d      if ((eax_4 & 1) != 0)
0051652f          ecx_1 += 0xc;
0051652f      
00516534      if ((eax_4 & 2) != 0)
00516536          ecx_1 += 4;
00516536      
0051653c      return (ecx_1 + 8);
00516440  }

0051653d                                                                                         90 90 90                               ...

00516540  int32_t __thiscall AC1Legacy::Vector3::UnPack(class AC1Legacy::Vector3* this, void** arg2, uint32_t arg3)

00516540  {
00516545      if (arg3 < 0xc)
00516549          return 0;
00516549      
00516554      this->x = **(uint32_t**)arg2;
00516558      void* edx_3 = (*(uint32_t*)arg2 + 4);
0051655b      *(uint32_t*)arg2 = edx_3;
0051655f      this->y = *(uint32_t*)edx_3;
00516564      void* edx_6 = (*(uint32_t*)arg2 + 4);
00516567      *(uint32_t*)arg2 = edx_6;
0051656b      this->z = *(uint32_t*)edx_6;
0051656e      *(uint32_t*)arg2 += 4;
00516576      return 1;
00516540  }

00516579                                                                             90 90 90 90 90 90 90                           .......

00516580  void __fastcall PositionPack::PositionPack(class PositionPack* this)

00516580  {
00516585      this->vtable = 0x7c6ba4;
0051658e      this->position.vtable = 0x796910;
00516595      this->position.objcell_id = 0;
0051658b      this->position.frame.qw = 0x3f800000;
0051658b      this->position.frame.qx = 0f;
0051658b      this->position.frame.qy = 0f;
0051658b      this->position.frame.qz = 0f;
0051658b      this->position.frame.m_fOrigin.x = 0;
0051658b      this->position.frame.m_fOrigin.y = 0f;
0051658b      this->position.frame.m_fOrigin.z = 0f;
005165b0      Frame::cache(&this->position.frame);
00516580  }

005165b9                                                                             90 90 90 90 90 90 90                           .......

005165c0  void PositionPack::PackPosition(void** arg1, uint32_t arg2, uint32_t arg3, class Position const* arg4, class AC1Legacy::Vector3 const* arg5, uint32_t arg6, int32_t arg7, uint16_t arg8, uint16_t arg9, uint16_t arg10, uint16_t arg11)

005165c0  {
005165d2      **(uint32_t**)arg1 = arg3;
005165d4      *(uint32_t*)arg1 += 4;
005165df      Position::PackOrigin(arg4, arg1, arg2);
005165df      
005165e7      if ((arg3 & 8) == 0)
005165e7      {
005165ee          **(uint32_t**)arg1 = ((float)((long double)arg4->frame.qw));
005165f0          *(uint32_t*)arg1 += 4;
005165e7      }
005165e7      
005165f6      if ((arg3 & 0x10) == 0)
005165f6      {
005165fd          **(uint32_t**)arg1 = ((float)((long double)arg4->frame.qx));
005165ff          *(uint32_t*)arg1 += 4;
005165f6      }
005165f6      
00516605      if ((arg3 & 0x20) == 0)
00516605      {
0051660c          **(uint32_t**)arg1 = ((float)((long double)arg4->frame.qy));
0051660e          *(uint32_t*)arg1 += 4;
00516605      }
00516605      
00516614      if ((arg3 & 0x40) == 0)
00516614      {
0051661b          **(uint32_t**)arg1 = ((float)((long double)arg4->frame.qz));
0051661d          *(uint32_t*)arg1 += 4;
00516614      }
00516614      
00516628      void* edx;
00516628      
00516628      if (((arg3 & 1) != 0 && arg2 >= 0xc))
00516628      {
0051662c          int32_t* eax_2 = arg5;
00516632          **(uint32_t**)arg1 = *(uint32_t*)eax_2;
00516636          edx = (*(uint32_t*)arg1 + 4);
00516639          *(uint32_t*)arg1 = edx;
00516640          *(uint32_t*)edx = ((float)((long double)eax_2[1]));
00516644          void* ecx_6 = (*(uint32_t*)arg1 + 4);
00516647          *(uint32_t*)arg1 = ecx_6;
0051664c          *(uint32_t*)ecx_6 = ((float)((long double)eax_2[2]));
0051664e          *(uint32_t*)arg1 += 4;
00516628      }
00516628      
00516654      if ((arg3 & 2) != 0)
00516654      {
0051665c          **(uint32_t**)arg1 = arg6;
0051665e          *(uint32_t*)arg1 += 4;
00516654      }
00516654      
00516663      edx = arg8;
00516668      **(uint16_t**)arg1 = edx;
0051666d      int16_t* ecx_7;
0051666d      ecx_7 = arg9;
00516672      int16_t* edi_2 = (*(uint32_t*)arg1 + 2);
00516675      *(uint32_t*)arg1 = edi_2;
00516679      *(uint16_t*)edi_2 = ecx_7;
0051667e      void* edx_4 = (*(uint32_t*)arg1 + 2);
00516681      *(uint32_t*)arg1 = edx_4;
00516683      int16_t* eax_5 = edx_4;
00516685      edx_4 = arg10;
0051668a      *(uint16_t*)eax_5 = edx_4;
0051668f      void* ecx_9 = (*(uint32_t*)arg1 + 2);
00516692      *(uint32_t*)arg1 = ecx_9;
00516694      int16_t* eax_6 = ecx_9;
00516696      ecx_9 = arg11;
0051669b      *(uint16_t*)eax_6 = ecx_9;
005166a4      *(uint32_t*)arg1 += 2;
005165c0  }

005166aa                                90 90 90 90 90 90                                                            ......

005166b0  uint32_t __thiscall PositionPack::Pack(class PositionPack* this, void** arg2, uint32_t arg3)

005166b0  {
005166b0      class PositionPack* this_1 = this;
005166b8      uint16_t force_position_timestamp = this->force_position_timestamp;
005166bf      uint16_t teleport_timestamp = this->teleport_timestamp;
005166c5      uint16_t position_timestamp = this->position_timestamp;
005166cf      uint16_t instance_timestamp = this->instance_timestamp;
005166d4      int32_t has_contact = this->has_contact;
005166d8      uint32_t placement_id = this->placement_id;
005166de      this_1 = nullptr;
005166f0      uint32_t result = PositionPack::GetPackSize(&this_1, &this->position, &this->velocity, placement_id, has_contact, instance_timestamp, position_timestamp, teleport_timestamp, force_position_timestamp);
0051672c      PositionPack::PackPosition(arg2, arg3, this_1, &this->position, &this->velocity, this->placement_id, this->has_contact, this->instance_timestamp, this->position_timestamp, this->teleport_timestamp, this->force_position_timestamp);
0051673b      return result;
005166b0  }

0051673e                                                                                            90 90                                ..

00516740  int32_t __thiscall PositionPack::UnPack(class PositionPack* this, void** arg2, uint32_t arg3)

00516740  {
0051674e      void* eax = *(uint32_t*)arg2;
00516750      char ebx = ((int8_t)*(uint32_t*)eax);
0051675d      *(uint32_t*)arg2 = ((char*)eax + 4);
0051675f      Position::UnPackOrigin(&this->position, arg2, arg3);
0051675f      
0051676a      if ((ebx & 8) == 0)
0051676a      {
00516767          this->position.frame.qw = **(uint32_t**)arg2;
00516778          *(uint32_t*)arg2 += 4;
0051676a      }
0051676a      else
00516767          this->position.frame.qw = 0;
00516767      
00516780      if ((ebx & 0x10) == 0)
00516780      {
0051678b          this->position.frame.qx = **(uint32_t**)arg2;
0051678e          *(uint32_t*)arg2 += 4;
00516780      }
00516780      else
00516782          this->position.frame.qx = 0f;
00516782      
00516794      if ((ebx & 0x20) == 0)
00516794      {
0051679f          this->position.frame.qy = **(uint32_t**)arg2;
005167a2          *(uint32_t*)arg2 += 4;
00516794      }
00516794      else
00516796          this->position.frame.qy = 0f;
00516796      
005167a8      if ((ebx & 0x40) == 0)
005167a8      {
005167b3          this->position.frame.qz = **(uint32_t**)arg2;
005167b6          *(uint32_t*)arg2 += 4;
005167a8      }
005167a8      else
005167aa          this->position.frame.qz = 0f;
005167aa      
005167b9      Frame::cache(&this->position.frame);
005167c1      uint32_t edx;
005167c1      
005167c1      if ((ebx & 1) == 0)
005167c1      {
005167fc          this->velocity.x = 0;
005167fc          this->velocity.y = 0;
005167fc          this->velocity.z = 0;
005167c1      }
005167c1      else if (arg3 >= 0xc)
005167c6      {
005167cd          **(uint32_t**)arg2 = this->velocity.x;
005167d1          edx = (*(uint32_t*)arg2 + 4);
005167d4          *(uint32_t*)arg2 = edx;
005167db          *(uint32_t*)edx = ((float)((long double)this->velocity.y));
005167df          void* ecx_4 = (*(uint32_t*)arg2 + 4);
005167e2          *(uint32_t*)arg2 = ecx_4;
005167e9          *(uint32_t*)ecx_4 = ((float)((long double)this->velocity.z));
005167eb          *(uint32_t*)arg2 += 4;
005167c6      }
005167c6      
00516822      if ((ebx & 2) == 0)
00516830          this->placement_id = 0;
00516822      else
00516822      {
00516828          this->placement_id = **(uint32_t**)arg2;
0051682b          *(uint32_t*)arg2 += 4;
00516822      }
00516822      
00516840      this->has_contact = ((((uint32_t)ebx) >> 2) & 1);
00516845      edx = **(uint16_t**)arg2;
00516848      this->instance_timestamp = edx;
0051684e      void* ebx_2 = (*(uint32_t*)arg2 + 2);
00516851      *(uint32_t*)arg2 = ebx_2;
00516855      void* eax_10;
00516855      eax_10 = *(uint16_t*)ebx_2;
00516858      this->position_timestamp = eax_10;
0051685e      int16_t* edx_5 = (*(uint32_t*)arg2 + 2);
00516861      *(uint32_t*)arg2 = edx_5;
00516865      int16_t* ecx_6;
00516865      ecx_6 = *(uint16_t*)edx_5;
00516868      this->teleport_timestamp = ecx_6;
0051686e      int16_t* ecx_8 = (*(uint32_t*)arg2 + 2);
00516871      *(uint32_t*)arg2 = ecx_8;
00516875      edx_5 = *(uint16_t*)ecx_8;
00516878      this->force_position_timestamp = edx_5;
00516882      *(uint32_t*)arg2 += 2;
0051688f      return 1;
00516740  }

00516892                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005168a0  uint32_t __fastcall MoveToStatePack::pack_size(class MoveToStatePack* this)

005168a0  {
005168a0      class MoveToStatePack* this_1 = this;
005168a5      struct RawMotionState::VTable* vtable = this->raw_motion_state.vtable;
005168b2      this_1 = nullptr;
005168ce      int32_t result = ((vtable->Pack(&this_1, 0) + this->position.vtable->Pack(&this_1, 0)) + 9);
005168d4      int32_t eax_4 = (result & 3);
005168d4      
005168d9      if (eax_4 == 0)
005168ec          return result;
005168ec      
005168e6      return ((4 - eax_4) + result);
005168a0  }

005168ed                                         90 90 90                                                               ...

005168f0  uint32_t __thiscall MoveToStatePack::Pack(class MoveToStatePack* this, void** arg2, uint32_t arg3)

005168f0  {
005168f5      uint32_t result = MoveToStatePack::pack_size(this);
005168f5      
00516902      if (arg3 >= result)
00516902      {
00516908          this->raw_motion_state.vtable->Pack(arg2, arg3);
00516918          this->position.vtable->Pack(arg2, arg3);
0051692c          **(uint16_t**)arg2 = this->instance_timestamp;
00516931          void* ecx_4 = (*(uint32_t*)arg2 + 2);
00516934          *(uint32_t*)arg2 = ecx_4;
0051693f          *(uint16_t*)ecx_4 = this->server_control_timestamp;
00516944          int16_t* eax_4 = (*(uint32_t*)arg2 + 2);
00516947          *(uint32_t*)arg2 = eax_4;
00516949          ecx_4 = this->teleport_timestamp;
00516950          *(uint16_t*)eax_4 = ecx_4;
00516955          uint16_t* ebx_2 = (*(uint32_t*)arg2 + 2);
00516958          *(uint32_t*)arg2 = ebx_2;
00516963          *(uint16_t*)ebx_2 = this->force_position_ts;
00516968          void* edx_4 = (*(uint32_t*)arg2 + 2);
0051696b          *(uint32_t*)arg2 = edx_4;
0051697b          int32_t ecx_5;
0051697b          ecx_5 = this->longjump_mode == 0;
0051697e          ecx_5 -= 1;
00516980          void* eax_6 = edx_4;
00516988          edx_4 = this->contact != 0;
0051698d          *(uint8_t*)eax_6 = ((ecx_5 & 2) | edx_4);
0051698f          *(uint32_t*)arg2 += 1;
00516991          PackObj::ALIGN_PTR(arg2);
00516902      }
00516902      
0051699f      return result;
005168f0  }

005169a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005169b0  int32_t __thiscall MoveToStatePack::UnPack(class MoveToStatePack* this, void** arg2, uint32_t arg3)

005169b0  {
005169bf      if (arg3 < MoveToStatePack::pack_size(this))
005169c5          return 0;
005169c5      
005169da      if ((this->raw_motion_state.vtable->UnPack(arg2, arg3) != 0 && this->position.vtable->UnPack(arg2, arg3) != 0))
005169da      {
005169f8          this->instance_timestamp = **(uint16_t**)arg2;
00516a01          void* ebx_2 = (*(uint32_t*)arg2 + 2);
00516a04          *(uint32_t*)arg2 = ebx_2;
00516a0b          this->server_control_timestamp = *(uint16_t*)ebx_2;
00516a14          void* edx_4 = (*(uint32_t*)arg2 + 2);
00516a17          *(uint32_t*)arg2 = edx_4;
00516a1b          void* eax_8;
00516a1b          eax_8 = *(uint16_t*)edx_4;
00516a1e          this->teleport_timestamp = eax_8;
00516a27          void* ecx_4 = (*(uint32_t*)arg2 + 2);
00516a2a          *(uint32_t*)arg2 = ecx_4;
00516a2e          ecx_4 = *(uint16_t*)ecx_4;
00516a31          this->force_position_ts = ecx_4;
00516a3a          void* eax_11 = (*(uint32_t*)arg2 + 2);
00516a3d          *(uint32_t*)arg2 = eax_11;
00516a3f          ecx_4 = *(uint8_t*)eax_11;
00516a42          *(uint32_t*)arg2 = ((char*)eax_11 + 1);
00516a44          uint32_t eax_13 = ((uint32_t)ecx_4);
00516a50          this->contact = (eax_13 & 1);
00516a56          this->longjump_mode = (eax_13 & 2);
00516a5c          PackObj::ALIGN_PTR(arg2);
00516a6c          return 1;
005169da      }
005169da      
005169e1      return 0;
005169b0  }

00516a6f                                               90                                                                 .

00516a70  void __thiscall AutonomousPositionPack::AutonomousPositionPack(class AutonomousPositionPack* this, class Position const* arg2, int32_t arg3, uint16_t arg4, uint16_t arg5, uint16_t arg6, uint16_t arg7)

00516a70  {
00516a75      this->vtable = 0x7c6bcc;
00516a7e      this->position.vtable = 0x796910;
00516a85      this->position.objcell_id = 0;
00516a7b      this->position.frame.qw = 0x3f800000;
00516a7b      this->position.frame.qx = 0f;
00516a7b      this->position.frame.qy = 0f;
00516a7b      this->position.frame.qz = 0f;
00516a7b      this->position.frame.m_fOrigin.x = 0;
00516a7b      this->position.frame.m_fOrigin.y = 0f;
00516a7b      this->position.frame.m_fOrigin.z = 0f;
00516aa0      Frame::cache(&this->position.frame);
00516aaf      this->position.objcell_id = arg2->objcell_id;
00516ab6      Frame::operator=(&this->position.frame, &arg2->frame);
00516ac9      this->instance_timestamp = arg4;
00516ad2      this->contact = arg3;
00516ad5      int32_t edx;
00516ad5      edx = arg6;
00516ada      this->force_position_ts = arg7;
00516ade      this->server_control_timestamp = arg5;
00516ae2      this->teleport_timestamp = edx;
00516a70  }

00516aec                                      90 90 90 90                                                              ....

00516af0  uint32_t __thiscall AutonomousPositionPack::Pack(class AutonomousPositionPack* this, void** arg2, uint32_t arg3)

00516af0  {
00516af0      class AutonomousPositionPack* this_1 = this;
00516af6      struct Position::VTable* vtable = this->position.vtable;
00516b05      this_1 = nullptr;
00516b10      int32_t eax_1 = (vtable->Pack(&this_1, 0) + 9);
00516b15      int32_t ecx_2 = (eax_1 & 3);
00516b18      int32_t edx;
00516b18      
00516b18      if (ecx_2 == 0)
00516b23          edx = 0;
00516b18      else
00516b1f          edx = (4 - ecx_2);
00516b1f      
00516b25      int32_t result = (edx + eax_1);
00516b25      
00516b2e      if (arg3 >= result)
00516b2e      {
00516aff          this->position.vtable->Pack(arg2, arg3);
00516b44          **(uint16_t**)arg2 = this->instance_timestamp;
00516b49          void* ebx_2 = (*(uint32_t*)arg2 + 2);
00516b4c          *(uint32_t*)arg2 = ebx_2;
00516b54          *(uint16_t*)ebx_2 = this->server_control_timestamp;
00516b59          void* edx_4 = (*(uint32_t*)arg2 + 2);
00516b5c          *(uint32_t*)arg2 = edx_4;
00516b64          *(uint16_t*)edx_4 = this->teleport_timestamp;
00516b69          int16_t* ecx_6 = (*(uint32_t*)arg2 + 2);
00516b6c          *(uint32_t*)arg2 = ecx_6;
00516b6e          edx_4 = this->force_position_ts;
00516b74          *(uint16_t*)ecx_6 = edx_4;
00516b79          char* eax_8 = (*(uint32_t*)arg2 + 2);
00516b7c          *(uint32_t*)arg2 = eax_8;
00516b83          ecx_6 = this->contact != 0;
00516b86          *(uint8_t*)eax_8 = ecx_6;
00516b8c          *(uint32_t*)arg2 += 1;
00516b8e          PackObj::ALIGN_PTR(arg2);
00516b2e      }
00516b2e      
00516b9d      return result;
00516af0  }


00516ba0  int32_t __thiscall AutonomousPositionPack::UnPack(class AutonomousPositionPack* this, void** arg2, uint32_t arg3)

00516ba0  {
00516ba0      class AutonomousPositionPack* this_1 = this;
00516ba5      struct Position::VTable* vtable = this->position.vtable;
00516bb4      this_1 = nullptr;
00516bbf      int32_t eax_1 = (vtable->Pack(&this_1, 0) + 9);
00516bc4      int32_t ecx_2 = (eax_1 & 3);
00516bc7      int32_t edx;
00516bc7      
00516bc7      if (ecx_2 == 0)
00516bd2          edx = 0;
00516bc7      else
00516bce          edx = (4 - ecx_2);
00516bce      
00516bdc      if (arg3 < (edx + eax_1))
00516be3          return 0;
00516be3      
00516bf1      int32_t result = this->position.vtable->UnPack(arg2, arg3);
00516bf1      
00516bf6      if (result == 0)
00516bfc          return result;
00516bfc      
00516c04      this->instance_timestamp = **(uint16_t**)arg2;
00516c0a      void* ebx_2 = (*(uint32_t*)arg2 + 2);
00516c0d      *(uint32_t*)arg2 = ebx_2;
00516c14      this->server_control_timestamp = *(uint16_t*)ebx_2;
00516c1a      void* edx_5 = (*(uint32_t*)arg2 + 2);
00516c1d      *(uint32_t*)arg2 = edx_5;
00516c21      void* eax_6;
00516c21      eax_6 = *(uint16_t*)edx_5;
00516c24      this->teleport_timestamp = eax_6;
00516c2a      void* ecx_8 = (*(uint32_t*)arg2 + 2);
00516c2d      *(uint32_t*)arg2 = ecx_8;
00516c31      ecx_8 = *(uint16_t*)ecx_8;
00516c34      this->force_position_ts = ecx_8;
00516c3a      char* eax_9 = (*(uint32_t*)arg2 + 2);
00516c3d      *(uint32_t*)arg2 = eax_9;
00516c3f      ecx_8 = *(uint8_t*)eax_9;
00516c46      int32_t edx_6;
00516c46      edx_6 = ecx_8 != 0;
00516c49      *(uint32_t*)arg2 = &eax_9[1];
00516c4c      this->contact = edx_6;
00516c4f      PackObj::ALIGN_PTR(arg2);
00516c60      return 1;
00516ba0  }

00516c63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00516c70  void __thiscall JumpPack::JumpPack(class JumpPack* this, float arg2, class AC1Legacy::Vector3 const* arg3, class Position const* arg4, uint16_t arg5, uint16_t arg6, uint16_t arg7, uint16_t arg8)

00516c70  {
00516c75      this->vtable = 0x7c6be0;
00516c7e      this->position.vtable = 0x796910;
00516c85      this->position.objcell_id = 0;
00516c7b      this->position.frame.qw = 0x3f800000;
00516c7b      this->position.frame.qx = 0f;
00516c7b      this->position.frame.qy = 0f;
00516c7b      this->position.frame.qz = 0f;
00516c7b      this->position.frame.m_fOrigin.x = 0;
00516c7b      this->position.frame.m_fOrigin.y = 0f;
00516c7b      this->position.frame.m_fOrigin.z = 0f;
00516ca0      Frame::cache(&this->position.frame);
00516cad      this->extent = arg2;
00516cb2      this->velocity.x = arg3->x;
00516cb2      this->velocity.y = arg3->y;
00516cb2      this->velocity.z = arg3->z;
00516ccd      this->position.objcell_id = arg4->objcell_id;
00516cd4      Frame::operator=(&this->position.frame, &arg4->frame);
00516ce8      this->instance_timestamp = arg5;
00516cf1      this->server_control_timestamp = arg6;
00516cf5      this->teleport_timestamp = arg7;
00516cf9      this->force_position_ts = arg8;
00516c70  }

00516d03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00516d10  uint32_t __thiscall JumpPack::Pack(class JumpPack* this, void** arg2, uint32_t arg3)

00516d10  {
00516d10      class JumpPack* this_1 = this;
00516d16      struct Position::VTable* vtable = this->position.vtable;
00516d25      this_1 = nullptr;
00516d30      int32_t eax_1 = (vtable->Pack(&this_1, 0) + 0x18);
00516d35      int32_t ecx_2 = (eax_1 & 3);
00516d38      int32_t edx;
00516d38      
00516d38      if (ecx_2 == 0)
00516d43          edx = 0;
00516d38      else
00516d3f          edx = (4 - ecx_2);
00516d3f      
00516d45      int32_t result = (edx + eax_1);
00516d45      
00516d4e      if (arg3 >= result)
00516d4e      {
00516d5e          **(uint32_t**)arg2 = ((float)((long double)this->extent));
00516d62          void* ecx_4 = (*(uint32_t*)arg2 + 4);
00516d68          *(uint32_t*)arg2 = ecx_4;
00516d68          
00516d6a          if (arg3 >= 0xc)
00516d6a          {
00516d6f              *(uint32_t*)ecx_4 = this->velocity.x;
00516d73              void* ecx_6 = (*(uint32_t*)arg2 + 4);
00516d76              *(uint32_t*)arg2 = ecx_6;
00516d7b              *(uint32_t*)ecx_6 = ((float)((long double)this->velocity.y));
00516d7f              float* edx_4 = (*(uint32_t*)arg2 + 4);
00516d82              *(uint32_t*)arg2 = edx_4;
00516d89              *(uint32_t*)edx_4 = ((float)((long double)this->velocity.z));
00516d8b              *(uint32_t*)arg2 += 4;
00516d6a          }
00516d6a          
00516d1f          this->position.vtable->Pack(arg2, arg3);
00516d9d          **(uint16_t**)arg2 = this->instance_timestamp;
00516da2          void* ecx_11 = (*(uint32_t*)arg2 + 2);
00516da5          *(uint32_t*)arg2 = ecx_11;
00516dad          *(uint16_t*)ecx_11 = this->server_control_timestamp;
00516db2          int16_t* eax_6 = (*(uint32_t*)arg2 + 2);
00516db5          *(uint32_t*)arg2 = eax_6;
00516db7          ecx_11 = this->teleport_timestamp;
00516dbb          *(uint16_t*)eax_6 = ecx_11;
00516dc0          uint16_t* ebx_2 = (*(uint32_t*)arg2 + 2);
00516dc3          *(uint32_t*)arg2 = ebx_2;
00516dcb          *(uint16_t*)ebx_2 = this->force_position_ts;
00516dd4          *(uint32_t*)arg2 += 2;
00516dd6          PackObj::ALIGN_PTR(arg2);
00516d4e      }
00516d4e      
00516de5      return result;
00516d10  }

00516de8                          90 90 90 90 90 90 90 90                                                          ........

00516df0  int32_t __thiscall JumpPack::UnPack(class JumpPack* this, void** arg2, uint32_t arg3)

00516df0  {
00516df0      class JumpPack* this_1 = this;
00516df5      struct Position::VTable* vtable = this->position.vtable;
00516e04      this_1 = nullptr;
00516e0f      int32_t eax_1 = (vtable->Pack(&this_1, 0) + 0x18);
00516e14      int32_t ecx_2 = (eax_1 & 3);
00516e17      int32_t edx;
00516e17      
00516e17      if (ecx_2 == 0)
00516e22          edx = 0;
00516e17      else
00516e1e          edx = (4 - ecx_2);
00516e1e      
00516e2c      if (arg3 < (edx + eax_1))
00516e33          return 0;
00516e33      
00516e3f      this->extent = **(uint32_t**)arg2;
00516e44      void* eax_5 = (*(uint32_t*)arg2 + 4);
00516e4a      *(uint32_t*)arg2 = eax_5;
00516e4a      
00516e4c      if (arg3 >= 0xc)
00516e4c      {
00516e54          this->velocity.x = *(uint32_t*)eax_5;
00516e59          void* eax_7 = (*(uint32_t*)arg2 + 4);
00516e5c          *(uint32_t*)arg2 = eax_7;
00516e60          this->velocity.y = *(uint32_t*)eax_7;
00516e65          void* edx_5 = (*(uint32_t*)arg2 + 4);
00516e68          *(uint32_t*)arg2 = edx_5;
00516e6e          this->velocity.z = *(uint32_t*)edx_5;
00516e77          *(uint32_t*)arg2 += 4;
00516e77          
00516e83          if (this->position.vtable->UnPack(arg2, arg3) != 0)
00516e83          {
00516e8a              this->instance_timestamp = **(uint16_t**)arg2;
00516e90              void* ecx_8 = (*(uint32_t*)arg2 + 2);
00516e93              *(uint32_t*)arg2 = ecx_8;
00516e97              void* eax_14;
00516e97              eax_14 = *(uint16_t*)ecx_8;
00516e9a              this->server_control_timestamp = eax_14;
00516ea0              int16_t* eax_16 = (*(uint32_t*)arg2 + 2);
00516ea3              *(uint32_t*)arg2 = eax_16;
00516ea5              ecx_8 = *(uint16_t*)eax_16;
00516ea8              this->teleport_timestamp = ecx_8;
00516eae              void* ebx_2 = (*(uint32_t*)arg2 + 2);
00516eb1              *(uint32_t*)arg2 = ebx_2;
00516eb8              this->force_position_ts = *(uint16_t*)ebx_2;
00516ec2              *(uint32_t*)arg2 += 2;
00516ec4              PackObj::ALIGN_PTR(arg2);
00516ed5              return 1;
00516e83          }
00516e4c      }
00516e4c      
00516ede      return 0;
00516df0  }

00516ee1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00516ef0  void __fastcall PhysicsTimestampPack::PhysicsTimestampPack(class PhysicsTimestampPack* this)

00516ef0  {
00516ef4      this->vtable = 0x7c6bf4;
00516efa      this->ts1 = 0;
00516efe      this->ts2 = 0;
00516ef0  }

00516f03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00516f10  uint32_t __thiscall PhysicsTimestampPack::Pack(class PhysicsTimestampPack* this, void** arg2, uint32_t arg3)

00516f10  {
00516f15      if (arg3 >= 4)
00516f15      {
00516f1e          int32_t esi;
00516f1e          esi = this->ts1;
00516f22          **(uint16_t**)arg2 = esi;
00516f27          void* esi_2 = (*(uint32_t*)arg2 + 2);
00516f2a          *(uint32_t*)arg2 = esi_2;
00516f2c          this = this->ts2;
00516f32          *(uint16_t*)esi_2 = this;
00516f3b          *(uint32_t*)arg2 += 2;
00516f3d          PackObj::ALIGN_PTR(arg2);
00516f15      }
00516f15      
00516f4b      return 4;
00516f10  }

00516f4e                                            90 90                                                                ..

00516f50  int32_t __thiscall PhysicsTimestampPack::UnPack(class PhysicsTimestampPack* this, void** arg2, uint32_t arg3)

00516f50  {
00516f55      if (arg3 < 4)
00516f59          return 0;
00516f59      
00516f62      void* edx;
00516f62      edx = **(uint16_t**)arg2;
00516f65      this->ts1 = edx;
00516f6b      void* edx_2 = (*(uint32_t*)arg2 + 2);
00516f6e      *(uint32_t*)arg2 = edx_2;
00516f70      edx_2 = *(uint16_t*)edx_2;
00516f73      this->ts2 = edx_2;
00516f7d      *(uint32_t*)arg2 += 2;
00516f7f      PackObj::ALIGN_PTR(arg2);
00516f8c      return 1;
00516f50  }

00516f8f                                               90                                                                 .

00516f90  void* __thiscall PositionPack::`scalar deleting destructor'(class PositionPack* this, uint32_t arg2)

00516f90  {
00516f98      this->position.vtable = 0x79285c;
00516f9f      this->vtable = 0x79285c;
00516f9f      
00516fa5      if ((arg2 & 1) != 0)
00516fa8          operator delete(this);
00516fa8      
00516fb3      return this;
00516f90  }

00516fb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00516fc0  void* __thiscall MoveToStatePack::`scalar deleting destructor'(class MoveToStatePack* this, uint32_t arg2)

00516fc0  {
00516fc6      this->position.vtable = 0x79285c;
00516fcd      RawMotionState::~RawMotionState(&this->raw_motion_state);
00516fd7      this->vtable = 0x79285c;
00516fd7      
00516fdd      if ((arg2 & 1) != 0)
00516fe0          operator delete(this);
00516fe0      
00516feb      return this;
00516fc0  }

00516fee                                            90 90                                                                ..

00516ff0  void __thiscall MoveToStatePack::MoveToStatePack(class MoveToStatePack* this, class RawMotionState const* arg2, class Position const* arg3, int32_t arg4, int32_t arg5, uint16_t arg6, uint16_t arg7, uint16_t arg8, uint16_t arg9)

00516ff0  {
00516ff9      this->vtable = 0x7c6bb8;
00516fff      RawMotionState::RawMotionState(&this->raw_motion_state);
00517009      this->position.vtable = 0x796910;
00517010      this->position.objcell_id = 0;
00517006      this->position.frame.qw = 0x3f800000;
00517006      this->position.frame.qx = 0f;
00517006      this->position.frame.qy = 0f;
00517006      this->position.frame.qz = 0f;
00517006      this->position.frame.m_fOrigin.x = 0;
00517006      this->position.frame.m_fOrigin.y = 0f;
00517006      this->position.frame.m_fOrigin.z = 0f;
0051702b      Frame::cache(&this->position.frame);
00517037      RawMotionState::operator=(&this->raw_motion_state, arg2);
00517046      this->position.objcell_id = arg3->objcell_id;
0051704d      Frame::operator=(&this->position.frame, &arg3->frame);
0051705f      this->longjump_mode = arg5;
00517065      int32_t eax_3;
00517065      eax_3 = arg8;
0051706a      this->contact = arg4;
00517070      int32_t edx;
00517070      edx = arg7;
00517075      this->instance_timestamp = arg6;
00517081      this->teleport_timestamp = eax_3;
00517089      this->server_control_timestamp = edx;
00517090      this->force_position_ts = arg9;
00516ff0  }

0051709d                                                                                         90 90 90                               ...

005170a0  void* __thiscall JumpPack::`scalar deleting destructor'(class JumpPack* this, uint32_t arg2)

005170a0  {
005170a8      this->position.vtable = 0x79285c;
005170af      this->vtable = 0x79285c;
005170af      
005170b5      if ((arg2 & 1) != 0)
005170b8          operator delete(this);
005170b8      
005170c3      return this;
005170a0  }

005170c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005170d0  int32_t __fastcall ParticleEmitterInfo::GetRandomStartScale(class ParticleEmitterInfo const* this)

005170d0  {
005170eb      long double x87_r7_2 = ((Random::RollDice(-1f, 1f) * ((long double)this->scale_rand)) + ((long double)this->start_scale));
005170f2      long double temp0 = ((long double)0.100000001f);
005170f2      (x87_r7_2 - temp0);
005170fa      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005170fa      
005170fd      if (!(p))
00517107          return ((((x87_r7_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
00517107      
00517108      long double temp1 = ((long double)10f);
00517108      (x87_r7_2 - temp1);
0051711d      return ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
005170d0  }

0051711e                                                                                            90 90                                ..

00517120  int32_t __fastcall ParticleEmitterInfo::GetRandomFinalScale(class ParticleEmitterInfo const* this)

00517120  {
0051713b      long double x87_r7_2 = ((Random::RollDice(-1f, 1f) * ((long double)this->scale_rand)) + ((long double)this->final_scale));
00517142      long double temp0 = ((long double)0.100000001f);
00517142      (x87_r7_2 - temp0);
0051714a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0051714a      
0051714d      if (!(p))
00517157          return ((((x87_r7_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
00517157      
00517158      long double temp1 = ((long double)10f);
00517158      (x87_r7_2 - temp1);
0051716d      return ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
00517120  }

0051716e                                            90 90                                                                ..

00517170  int32_t __fastcall ParticleEmitterInfo::GetRandomStartTrans(class ParticleEmitterInfo const* this)

00517170  {
0051718b      long double x87_r7_2 = ((Random::RollDice(-1f, 1f) * ((long double)this->trans_rand)) + ((long double)this->start_trans));
00517192      long double temp0 = ((long double)0f);
00517192      (x87_r7_2 - temp0);
0051719a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0051719a      
0051719d      if (!(p))
005171a7          return ((((x87_r7_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
005171a7      
005171a8      long double temp1 = ((long double)1f);
005171a8      (x87_r7_2 - temp1);
005171bd      return ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
00517170  }

005171be                                                                                            90 90                                ..

005171c0  int32_t __fastcall ParticleEmitterInfo::GetRandomFinalTrans(class ParticleEmitterInfo const* this)

005171c0  {
005171db      long double x87_r7_2 = ((Random::RollDice(-1f, 1f) * ((long double)this->trans_rand)) + ((long double)this->final_trans));
005171e2      long double temp0 = ((long double)0f);
005171e2      (x87_r7_2 - temp0);
005171ea      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005171ea      
005171ed      if (!(p))
005171f7          return ((((x87_r7_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
005171f7      
005171f8      long double temp1 = ((long double)1f);
005171f8      (x87_r7_2 - temp1);
0051720d      return ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
005171c0  }

0051720e                                            90 90                                                                ..

00517210  int32_t __fastcall ParticleEmitterInfo::GetRandomLifespan(class ParticleEmitterInfo const* this)

00517210  {
0051721d      int32_t result;
0051721d      long double st0;
0051721d      result = Random::RollDice(-1f, 1f);
00517228      long double x87_r7_2 = ((st0 * ((long double)this->lifespan_rand)) + ((long double)this->lifespan));
0051722c      long double temp0 = ((long double)0.0);
0051722c      (x87_r7_2 - temp0);
00517232      result = ((((x87_r7_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
00517234      /* unimplemented  {test ah, 0x5} */;
00517241      return result;
00517210  }

00517242        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00517250  void __fastcall ParticleEmitterInfo::ParticleEmitterInfo(class ParticleEmitterInfo* this)

00517250  {
0051725d      DBObj::DBObj(this, INVALID_DID.id);
00517262      this->vtable = &PackObj::`vftable';
0051726b      this->emitter_type = 0;
0051726e      this->particle_type = 0;
00517271      this->is_parent_local = 0;
00517274      this->vtable = 0x7c6c90;
0051727a      this->vtable = &ParticleEmitterInfo::`vftable';
00517287      this->gfxobj_id.id = INVALID_DID.id;
00517290      this->hw_gfxobj_id.id = INVALID_DID.id;
00517293      __builtin_memset(&this->birthrate, 0, 0x14);
005172a2      __builtin_memset(&this->total_seconds, 0, 0x18);
005172b4      this->sorting_sphere.radius = 0f;
005172ba      this->sorting_sphere.center.x = 0;
005172ba      this->sorting_sphere.center.y = 0f;
005172ba      this->sorting_sphere.center.z = 0f;
005172cc      __builtin_memset(&this->offset_dir, 0, 0x38);
00517325      this->scale_rand = 0f;
0051732b      this->trans_rand = 0f;
00517331      this->start_trans = 0f;
00517337      this->final_trans = 0f;
0051733d      int32_t var_c = 0;
00517341      int32_t var_8 = 0;
00517345      int32_t var_4 = 0;
0051734a      __builtin_memcpy(&this->min_a, "\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f", 0x18);
0051736e      this->start_scale = 1f;
00517374      this->final_scale = 1f;
00517250  }

00517381     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00517390  uint32_t ParticleEmitterInfo::GetDBOType(class ParticleEmitterInfo const* this @ ecx) __pure

00517390  {
00517395      return 0x2a;
00517390  }

00517396                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005173a0  void* __thiscall ParticleEmitterInfo::`vector deleting destructor'(class ParticleEmitterInfo* this, uint32_t arg2)

005173a0  {
005173a3      /* tailcall */
005173a3      return ParticleEmitterInfo::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005173a0  }

005173a8                          cc cc cc cc cc cc cc cc                                                          ........

005173b0  void __fastcall ParticleEmitterInfo::InitEnd(class ParticleEmitterInfo* this)

005173b0  {
005173b3      long double x87_r7 = ((long double)this->max_offset);
005173c2      float var_10 = ((float)(((long double)this->max_a) * ((long double)this->lifespan)));
005173c6      long double temp0 = ((long double)var_10);
005173c6      (x87_r7 - temp0);
005173c6      
005173cf      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
005173d3          x87_r7 = ((long double)var_10);
005173d3      
005173df      this->sorting_sphere.radius = ((float)x87_r7);
005173e9      this->sorting_sphere.center.x = 0;
005173e9      this->sorting_sphere.center.y = 0f;
005173e9      this->sorting_sphere.center.z = 0f;
005173b0  }

00517413                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00517420  void __thiscall ParticleEmitterInfo::ShouldEmitParticle(class ParticleEmitterInfo const* this, int32_t arg2, int32_t arg3, class AC1Legacy::Vector3 const* arg4, double arg5)

00517420  {
00517420      int32_t total_particles = this->total_particles;
00517420      
00517434      if (((total_particles <= 0 || arg3 < total_particles) && arg2 < this->max_particles))
00517434      {
00517436          int16_t emitter_type = ((int16_t)this->emitter_type);
00517436          
0051743b          if ((emitter_type & 1) != 0)
00517447              ((((long double)Timer::cur_time) - ((long double)arg5)) - ((long double)this->birthrate));
0051743b          else if ((emitter_type & 2) != 0)
0051745b          {
00517461              long double x87_r7_3 = ((long double)arg4->z);
00517464              long double x87_r6_1 = ((long double)arg4->y);
00517467              long double x87_r5_1 = ((long double)arg4->x);
00517469              long double x87_r4_1 = ((long double)this->birthrate);
0051747a              long double x87_r3_4 = (((x87_r5_1 * x87_r5_1) + (x87_r6_1 * x87_r6_1)) + (x87_r7_3 * x87_r7_3));
0051747e              long double x87_r2_6 = (x87_r4_1 * x87_r4_1);
00517480              (x87_r2_6 - x87_r3_4);
00517486              class AC1Legacy::Vector3* eax_2;
00517486              bool c1;
00517486              eax_2 = ((((x87_r2_6 < x87_r3_4) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_6, x87_r3_4))) ? 1 : 0) << 0xa) | ((((x87_r2_6 == x87_r3_4) ? 1 : 0) << 0xe) | 0x3000))));
0051748a              /* unimplemented  {test ah, 0x5} */;
0051745b          }
00517434      }
00517420  }

00517496                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005174a0  class AC1Legacy::Vector3* __thiscall ParticleEmitterInfo::GetRandomOffset(class ParticleEmitterInfo const* this, class AC1Legacy::Vector3* __return)

005174a0  {
005174b5      float var_28 = ((float)Random::RollDice(-1f, 1f));
005174c8      float var_2c = ((float)Random::RollDice(-1f, 1f));
005174db      float var_18 = ((float)Random::RollDice(-1f, 1f));
005174e7      long double x87_r7_4 = (((long double)var_2c) * ((long double)this->offset_dir.y));
005174f9      long double x87_r6_1 = (((long double)var_28) * ((long double)this->offset_dir.z));
005174ff      float var_24 = var_18;
0051750d      float var_10 = var_28;
00517522      float var_14 = var_2c;
00517526      long double x87_r7_6 = ((x87_r7_4 + x87_r6_1) + (((long double)var_18) * ((long double)this->offset_dir.x)));
00517538      float var_8 = ((float)(x87_r7_6 * ((long double)this->offset_dir.y)));
00517544      float var_4 = ((float)(x87_r7_6 * ((long double)this->offset_dir.z)));
0051754e      var_24 = ((float)(((long double)var_18) - (x87_r7_6 * ((long double)this->offset_dir.x))));
0051755c      float var_20_1 = ((float)(((long double)var_2c) - ((long double)var_8)));
00517568      float var_1c_1 = ((float)(((long double)var_28) - ((long double)var_4)));
00517573      float var_20_2;
00517573      long double x87_r7_12;
00517573      
00517573      if (AC1Legacy::Vector3::normalize_check_small(&var_24) == 0)
00517573      {
005175c8          long double x87_r7_15 = ((Random::RollDice(0f, 1f) * (((long double)this->max_offset) - ((long double)this->min_offset))) + ((long double)this->min_offset));
005175d4          var_24 = ((float)(((long double)var_24) * x87_r7_15));
005175de          var_20_2 = ((float)(((long double)var_20_1) * x87_r7_15));
005175e2          x87_r7_12 = (x87_r7_15 * ((long double)var_1c_1));
00517573      }
00517573      else
00517573      {
0051759d          x87_r7_12 = ((long double)0f);
005175a1          var_24 = 0f;
005175a5          var_20_2 = 0f;
00517573      }
00517573      
005175e6      float* result = __return;
005175f2      *(uint32_t*)result = ((float)((long double)var_24));
005175f4      result[1] = var_20_2;
005175f7      result[2] = ((float)x87_r7_12);
005175fe      return result;
005174a0  }

00517601     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00517610  class AC1Legacy::Vector3* __thiscall ParticleEmitterInfo::GetRandomA(class ParticleEmitterInfo const* this, class AC1Legacy::Vector3* __return)

00517610  {
00517610      class ParticleEmitterInfo* this_1 = this;
0051761b      long double st0 = Random::RollDice(0f, 1f);
0051763b      float var_4 = ((float)(((((long double)this->max_a) - ((long double)this->min_a)) * st0) + ((long double)this->min_a)));
0051764f      long double x87_r6_5 = (((long double)var_4) * ((long double)this->a.y));
00517659      long double x87_r5_1 = (((long double)var_4) * ((long double)this->a.z));
00517662      __return->x = ((float)(((long double)var_4) * ((long double)this->a.x)));
00517664      __return->y = ((float)x87_r6_5);
00517667      __return->z = ((float)x87_r5_1);
0051766b      return __return;
00517610  }

0051766e                                            90 90                                                                ..

00517670  class AC1Legacy::Vector3* __thiscall ParticleEmitterInfo::GetRandomB(class ParticleEmitterInfo const* this, class AC1Legacy::Vector3* __return)

00517670  {
00517670      class ParticleEmitterInfo* this_1 = this;
0051767b      long double st0 = Random::RollDice(0f, 1f);
0051769b      float var_4 = ((float)(((((long double)this->max_b) - ((long double)this->min_b)) * st0) + ((long double)this->min_b)));
005176af      long double x87_r6_5 = (((long double)var_4) * ((long double)this->b.y));
005176b9      long double x87_r5_1 = (((long double)var_4) * ((long double)this->b.z));
005176c2      __return->x = ((float)(((long double)var_4) * ((long double)this->b.x)));
005176c4      __return->y = ((float)x87_r6_5);
005176c7      __return->z = ((float)x87_r5_1);
005176cb      return __return;
00517670  }

005176ce                                            90 90                                                                ..

005176d0  class AC1Legacy::Vector3* __thiscall ParticleEmitterInfo::GetRandomC(class ParticleEmitterInfo const* this, class AC1Legacy::Vector3* __return)

005176d0  {
005176d0      class ParticleEmitterInfo* this_1 = this;
005176db      long double st0 = Random::RollDice(0f, 1f);
005176fb      float var_4 = ((float)(((((long double)this->max_c) - ((long double)this->min_c)) * st0) + ((long double)this->min_c)));
0051770f      long double x87_r6_5 = (((long double)var_4) * ((long double)this->c.y));
00517719      long double x87_r5_1 = (((long double)var_4) * ((long double)this->c.z));
00517722      __return->x = ((float)(((long double)var_4) * ((long double)this->c.x)));
00517724      __return->y = ((float)x87_r6_5);
00517727      __return->z = ((float)x87_r5_1);
0051772b      return __return;
005176d0  }

0051772e                                            90 90                                                                ..

00517730  class DBObj* ParticleEmitterInfo::Allocate(class ParticleEmitterInfo const* this @ ecx)

00517730  {
00517730      /* tailcall */
00517730      return ParticleEmitterInfo::Allocator();
00517730  }

00517735                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00517740  void* __thiscall ParticleEmitterInfo::`scalar deleting destructor'(class ParticleEmitterInfo* this, uint32_t arg2)

00517740  {
00517743      this->vtable = 0x7c6c90;
00517749      this->vtable = &ParticleEmitterInfo::`vftable';
00517750      this->vtable = &PackObj::`vftable';
00517757      DBObj::~DBObj(this);
00517757      
00517761      if ((arg2 & 1) != 0)
00517764          operator delete(this);
00517764      
0051776f      return this;
00517740  }

00517772                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00517780  uint32_t __thiscall ParticleEmitterInfo::Pack(class ParticleEmitterInfo* this, void** arg2, uint32_t arg3)

00517780  {
0051778b      if (arg3 >= 0xac)
0051778b      {
00517797          **(uint32_t**)arg2 = 0;
005177a0          void* edi_2 = (*(uint32_t*)arg2 + 4);
005177a3          *(uint32_t*)arg2 = edi_2;
005177aa          *(uint32_t*)edi_2 = this->m_bLoaded*(int32_t*)((char*)this + 8);
005177ae          void* edx_4 = (*(uint32_t*)arg2 + 4);
005177b1          *(uint32_t*)arg2 = edx_4;
005177b6          *(uint32_t*)edx_4 = *(int32_t*)((char*)this + 0xc);
005177ba          void* edi_6 = (*(uint32_t*)arg2 + 4);
005177bd          *(uint32_t*)arg2 = edi_6;
005177c4          *(uint32_t*)edi_6 = *(uint32_t*)((char*)this->m_timeStamp)[4];
005177c8          void* edx_7 = (*(uint32_t*)arg2 + 4);
005177cb          *(uint32_t*)arg2 = edx_7;
005177d0          *(uint32_t*)edx_7 = this->m_pNext;
005177d4          void* edi_10 = (*(uint32_t*)arg2 + 4);
005177d7          *(uint32_t*)arg2 = edi_10;
005177de          *(uint64_t*)edi_10 = ((double)((long double)this->m_pMaintainer*(int32_t*)((char*)this + 0x20)));
005177e2          void* edx_10 = (*(uint32_t*)arg2 + 8);
005177e5          *(uint32_t*)arg2 = edx_10;
005177ea          *(uint32_t*)edx_10 = this->m_DID.id;
005177ee          void* edi_13 = (*(uint32_t*)arg2 + 4);
005177f1          *(uint32_t*)arg2 = edi_13;
005177f8          *(uint32_t*)edi_13 = this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c);
005177fc          void* edx_13 = (*(uint32_t*)arg2 + 4);
005177ff          *(uint32_t*)arg2 = edx_13;
00517804          *(uint32_t*)edx_13 = this->vtable;
00517808          void* edi_17 = (*(uint32_t*)arg2 + 4);
0051780b          *(uint32_t*)arg2 = edi_17;
00517812          *(uint64_t*)edi_17 = ((double)((long double)this->emitter_type*(int32_t*)((char*)this + 0x38)));
00517816          void* edx_16 = (*(uint32_t*)arg2 + 8);
00517819          *(uint32_t*)arg2 = edx_16;
0051781e          *(uint64_t*)edx_16 = ((double)((long double)this->hw_gfxobj_id*(int32_t*)((char*)this + 0x48)));
00517822          void* edi_19 = (*(uint32_t*)arg2 + 8);
00517825          *(uint32_t*)arg2 = edi_19;
0051782c          *(uint64_t*)edi_19 = ((double)((long double)this->is_parent_local*(int32_t*)((char*)this + 0x40)));
00517830          void* edx_19 = (*(uint32_t*)arg2 + 8);
00517836          *(uint32_t*)arg2 = edx_19;
00517836          
00517838          if (arg3 >= 0xc)
00517838          {
0051783d              *(uint32_t*)edx_19 = this->total_particles;
00517841              void* edx_21 = (*(uint32_t*)arg2 + 4);
00517844              *(uint32_t*)arg2 = edx_21;
00517849              *(uint32_t*)edx_21 = ((float)((long double)*(int32_t*)((char*)this + 0x64)));
0051784d              void* edi_22 = (*(uint32_t*)arg2 + 4);
00517850              *(uint32_t*)arg2 = edi_22;
00517857              *(uint32_t*)edi_22 = ((float)((long double)this->total_seconds));
00517859              *(uint32_t*)arg2 += 4;
00517838          }
00517838          
00517861          **(uint32_t**)arg2 = ((float)((long double)*(uint32_t*)((char*)this->total_seconds)[4]));
00517865          void* edi_24 = (*(uint32_t*)arg2 + 4);
00517868          *(uint32_t*)arg2 = edi_24;
0051786f          *(uint32_t*)edi_24 = ((float)((long double)this->lifespan_rand));
00517873          void* edx_26 = (*(uint32_t*)arg2 + 4);
00517879          *(uint32_t*)arg2 = edx_26;
00517879          
0051787b          if (arg3 >= 0xc)
0051787b          {
00517880              *(uint32_t*)edx_26 = *(uint32_t*)((char*)this->lifespan_rand)[4];
00517884              void* edx_28 = (*(uint32_t*)arg2 + 4);
00517887              *(uint32_t*)arg2 = edx_28;
0051788c              *(uint32_t*)edx_28 = ((float)((long double)this->lifespan));
00517890              void* edi_27 = (*(uint32_t*)arg2 + 4);
00517893              *(uint32_t*)arg2 = edi_27;
0051789a              *(uint32_t*)edi_27 = ((float)((long double)*(uint32_t*)((char*)this->lifespan)[4]));
0051789e              edx_26 = (*(uint32_t*)arg2 + 4);
005178a1              *(uint32_t*)arg2 = edx_26;
0051787b          }
0051787b          
005178a9          *(uint32_t*)edx_26 = ((float)((long double)this->offset_dir.z));
005178ad          void* edi_29 = (*(uint32_t*)arg2 + 4);
005178b0          *(uint32_t*)arg2 = edi_29;
005178ba          *(uint32_t*)edi_29 = ((float)((long double)this->min_offset));
005178be          void* edx_33 = (*(uint32_t*)arg2 + 4);
005178c4          *(uint32_t*)arg2 = edx_33;
005178c4          
005178c6          if (arg3 >= 0xc)
005178c6          {
005178ce              *(uint32_t*)edx_33 = this->sorting_sphere.center.x;
005178d2              void* edx_35 = (*(uint32_t*)arg2 + 4);
005178d5              *(uint32_t*)arg2 = edx_35;
005178dd              *(uint32_t*)edx_35 = ((float)((long double)this->sorting_sphere.center.y));
005178e1              void* edi_32 = (*(uint32_t*)arg2 + 4);
005178e4              *(uint32_t*)arg2 = edi_32;
005178ee              *(uint32_t*)edi_32 = ((float)((long double)this->sorting_sphere.center.z));
005178f2              edx_33 = (*(uint32_t*)arg2 + 4);
005178f5              *(uint32_t*)arg2 = edx_33;
005178c6          }
005178c6          
005178fd          *(uint32_t*)edx_33 = ((float)((long double)this->max_offset));
00517901          void* edi_34 = (*(uint32_t*)arg2 + 4);
00517904          *(uint32_t*)arg2 = edi_34;
0051790e          *(uint32_t*)edi_34 = ((float)((long double)this->a.x));
00517912          void* edx_40 = (*(uint32_t*)arg2 + 4);
00517918          *(uint32_t*)arg2 = edx_40;
00517918          
0051791a          if (arg3 >= 0xc)
0051791a          {
00517922              *(uint32_t*)edx_40 = this->sorting_sphere.radius;
00517926              void* edi_36 = (*(uint32_t*)arg2 + 4);
00517929              *(uint32_t*)arg2 = edi_36;
00517933              *(uint32_t*)edi_36 = ((float)((long double)this->offset_dir.x));
00517937              void* esi_3 = (*(uint32_t*)arg2 + 4);
0051793a              *(uint32_t*)arg2 = esi_3;
00517944              *(uint32_t*)esi_3 = ((float)((long double)this->offset_dir.y));
00517948              edx_40 = (*(uint32_t*)arg2 + 4);
0051794b              *(uint32_t*)arg2 = edx_40;
0051791a          }
0051791a          
00517953          *(uint32_t*)edx_40 = ((float)((long double)this->a.y));
00517957          void* esi_5 = (*(uint32_t*)arg2 + 4);
0051795a          *(uint32_t*)arg2 = esi_5;
00517964          *(uint32_t*)esi_5 = ((float)((long double)this->a.z));
00517968          void* edx_46 = (*(uint32_t*)arg2 + 4);
0051796b          *(uint32_t*)arg2 = edx_46;
00517973          *(uint32_t*)edx_46 = ((float)((long double)this->b.y));
00517977          void* edi_38 = (*(uint32_t*)arg2 + 4);
0051797a          *(uint32_t*)arg2 = edi_38;
00517984          *(uint32_t*)edi_38 = ((float)((long double)this->b.z));
00517988          void* esi_7 = (*(uint32_t*)arg2 + 4);
0051798b          *(uint32_t*)arg2 = esi_7;
00517995          *(uint32_t*)esi_7 = ((float)((long double)this->b.x));
00517999          void* edx_50 = (*(uint32_t*)arg2 + 4);
0051799c          *(uint32_t*)arg2 = edx_50;
005179a4          *(uint32_t*)edx_50 = ((float)((long double)this->c.y));
005179a8          void* edi_40 = (*(uint32_t*)arg2 + 4);
005179ab          *(uint32_t*)arg2 = edi_40;
005179b5          *(uint32_t*)edi_40 = ((float)((long double)this->c.z));
005179b9          void* esi_9 = (*(uint32_t*)arg2 + 4);
005179bc          *(uint32_t*)arg2 = esi_9;
005179c6          *(uint32_t*)esi_9 = ((float)((long double)this->c.x));
005179ca          void* edx_54 = (*(uint32_t*)arg2 + 4);
005179cd          *(uint32_t*)arg2 = edx_54;
005179d2          *(uint32_t*)edx_54 = this->m_timeStamp;
005179d4          *(uint32_t*)arg2 += 4;
0051778b      }
0051778b      
005179de      return 0xac;
00517780  }

005179e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005179f0  int32_t __thiscall ParticleEmitterInfo::UnPack(class ParticleEmitterInfo* this, void** arg2, uint32_t arg3)

005179f0  {
005179f7      void* esi_1 = (*(uint32_t*)arg2 + 4);
005179fa      *(uint32_t*)arg2 = esi_1;
00517a00      this->m_bLoaded*(int32_t*)((char*)this + 8) = *(uint32_t*)esi_1;
00517a05      void* edx_3 = (*(uint32_t*)arg2 + 4);
00517a08      *(uint32_t*)arg2 = edx_3;
00517a0c      *(int32_t*)((char*)this + 0xc) = *(uint32_t*)edx_3;
00517a11      void* esi_3 = (*(uint32_t*)arg2 + 4);
00517a14      *(uint32_t*)arg2 = esi_3;
00517a18      int32_t esi_4 = *(uint32_t*)esi_3;
00517a1d      *(uint32_t*)arg2 = ((char*)esi_3 + 4);
00517a1f      *(uint32_t*)((char*)this->m_timeStamp)[4] = esi_4;
00517a22      void* edx_7 = *(uint32_t*)arg2;
00517a24      class DBObj* esi_5 = *(uint32_t*)edx_7;
00517a29      *(uint32_t*)arg2 = ((char*)edx_7 + 4);
00517a2b      this->m_pNext = esi_5;
00517a2e      void* edx_9 = *(uint32_t*)arg2;
00517a32      this->m_pMaintainer = *(uint32_t*)edx_9;
00517a38      this->m_numLinks = *(uint32_t*)((char*)edx_9 + 4);
00517a3d      void* edx_12 = (*(uint32_t*)arg2 + 8);
00517a40      *(uint32_t*)arg2 = edx_12;
00517a44      this->m_DID.id = *(uint32_t*)edx_12;
00517a49      void* esi_8 = (*(uint32_t*)arg2 + 4);
00517a4c      *(uint32_t*)arg2 = esi_8;
00517a52      this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c) = *(uint32_t*)esi_8;
00517a57      void* edx_17 = (*(uint32_t*)arg2 + 4);
00517a5a      *(uint32_t*)arg2 = edx_17;
00517a5e      this->vtable = *(uint32_t*)edx_17;
00517a63      void* esi_10 = (*(uint32_t*)arg2 + 4);
00517a66      *(uint32_t*)arg2 = esi_10;
00517a6c      this->emitter_type = *(uint32_t*)esi_10;
00517a72      this->particle_type = *(uint32_t*)((char*)esi_10 + 4);
00517a77      void* edx_22 = (*(uint32_t*)arg2 + 8);
00517a7a      *(uint32_t*)arg2 = edx_22;
00517a7e      this->hw_gfxobj_id.id = *(uint32_t*)edx_22;
00517a84      *(int32_t*)((char*)this + 0x4c) = *(uint32_t*)((char*)edx_22 + 4);
00517a89      void* esi_14 = (*(uint32_t*)arg2 + 8);
00517a8c      *(uint32_t*)arg2 = esi_14;
00517a92      this->is_parent_local = *(uint32_t*)esi_14;
00517a98      this->gfxobj_id.id = *(uint32_t*)((char*)esi_14 + 4);
00517a9d      void* edx_27 = (*(uint32_t*)arg2 + 8);
00517aa0      *(uint32_t*)arg2 = edx_27;
00517aa0      
00517aab      if (arg3 >= 0xc)
00517aab      {
00517aaf          this->total_particles = *(uint32_t*)edx_27;
00517ab4          void* esi_19 = (*(uint32_t*)arg2 + 4);
00517ab7          *(uint32_t*)arg2 = esi_19;
00517abb          *(int32_t*)((char*)this + 0x64) = *(uint32_t*)esi_19;
00517ac0          void* esi_22 = (*(uint32_t*)arg2 + 4);
00517ac3          *(uint32_t*)arg2 = esi_22;
00517ac7          this->total_seconds = *(uint32_t*)esi_22;
00517aca          *(uint32_t*)arg2 += 4;
00517aab      }
00517aab      
00517ad1      *(uint32_t*)((char*)this->total_seconds)[4] = **(uint32_t**)arg2;
00517ad6      void* esi_27 = (*(uint32_t*)arg2 + 4);
00517ad9      *(uint32_t*)arg2 = esi_27;
00517add      this->lifespan_rand = *(uint32_t*)esi_27;
00517ae2      void* esi_30 = (*(uint32_t*)arg2 + 4);
00517ae8      *(uint32_t*)arg2 = esi_30;
00517ae8      
00517aea      if (arg3 >= 0xc)
00517aea      {
00517aee          *(uint32_t*)((char*)this->lifespan_rand)[4] = *(uint32_t*)esi_30;
00517af3          void* esi_33 = (*(uint32_t*)arg2 + 4);
00517af6          *(uint32_t*)arg2 = esi_33;
00517afa          this->lifespan = *(uint32_t*)esi_33;
00517aff          void* esi_36 = (*(uint32_t*)arg2 + 4);
00517b02          *(uint32_t*)arg2 = esi_36;
00517b06          *(uint32_t*)((char*)this->lifespan)[4] = *(uint32_t*)esi_36;
00517b0b          esi_30 = (*(uint32_t*)arg2 + 4);
00517b0e          *(uint32_t*)arg2 = esi_30;
00517aea      }
00517aea      
00517b12      this->offset_dir.z = *(uint32_t*)esi_30;
00517b1a      void* esi_41 = (*(uint32_t*)arg2 + 4);
00517b1d      *(uint32_t*)arg2 = esi_41;
00517b21      this->min_offset = *(uint32_t*)esi_41;
00517b29      void* esi_44 = (*(uint32_t*)arg2 + 4);
00517b2f      *(uint32_t*)arg2 = esi_44;
00517b2f      
00517b31      if (arg3 >= 0xc)
00517b31      {
00517b35          this->sorting_sphere.center.x = *(uint32_t*)esi_44;
00517b3d          void* esi_47 = (*(uint32_t*)arg2 + 4);
00517b40          *(uint32_t*)arg2 = esi_47;
00517b44          this->sorting_sphere.center.y = *(uint32_t*)esi_47;
00517b4c          void* esi_50 = (*(uint32_t*)arg2 + 4);
00517b4f          *(uint32_t*)arg2 = esi_50;
00517b53          this->sorting_sphere.center.z = *(uint32_t*)esi_50;
00517b5b          esi_44 = (*(uint32_t*)arg2 + 4);
00517b5e          *(uint32_t*)arg2 = esi_44;
00517b31      }
00517b31      
00517b62      this->max_offset = *(uint32_t*)esi_44;
00517b6a      void* esi_55 = (*(uint32_t*)arg2 + 4);
00517b6d      *(uint32_t*)arg2 = esi_55;
00517b71      this->a.x = *(uint32_t*)esi_55;
00517b79      void* esi_58 = (*(uint32_t*)arg2 + 4);
00517b7f      *(uint32_t*)arg2 = esi_58;
00517b7f      
00517b81      if (arg3 >= 0xc)
00517b81      {
00517b85          this->sorting_sphere.radius = *(uint32_t*)esi_58;
00517b8d          void* edx_31 = (*(uint32_t*)arg2 + 4);
00517b90          *(uint32_t*)arg2 = edx_31;
00517b94          this->offset_dir.x = *(uint32_t*)edx_31;
00517b9c          void* esi_60 = (*(uint32_t*)arg2 + 4);
00517b9f          *(uint32_t*)arg2 = esi_60;
00517ba5          this->offset_dir.y = *(uint32_t*)esi_60;
00517bad          void* edx_36 = (*(uint32_t*)arg2 + 4);
00517bb0          *(uint32_t*)arg2 = edx_36;
00517bb2          esi_58 = edx_36;
00517b81      }
00517b81      
00517bb6      this->a.y = *(uint32_t*)esi_58;
00517bbe      void* edx_39 = (*(uint32_t*)arg2 + 4);
00517bc1      *(uint32_t*)arg2 = edx_39;
00517bc5      this->a.z = *(uint32_t*)edx_39;
00517bcd      void* esi_62 = (*(uint32_t*)arg2 + 4);
00517bd0      *(uint32_t*)arg2 = esi_62;
00517bd6      this->b.y = *(uint32_t*)esi_62;
00517bde      void* edx_44 = (*(uint32_t*)arg2 + 4);
00517be1      *(uint32_t*)arg2 = edx_44;
00517be5      this->b.z = *(uint32_t*)edx_44;
00517bed      void* esi_64 = (*(uint32_t*)arg2 + 4);
00517bf0      *(uint32_t*)arg2 = esi_64;
00517bf6      this->b.x = *(uint32_t*)esi_64;
00517bfe      void* edx_49 = (*(uint32_t*)arg2 + 4);
00517c01      *(uint32_t*)arg2 = edx_49;
00517c05      this->c.y = *(uint32_t*)edx_49;
00517c0d      void* esi_66 = (*(uint32_t*)arg2 + 4);
00517c10      *(uint32_t*)arg2 = esi_66;
00517c16      this->c.z = *(uint32_t*)esi_66;
00517c1e      void* edx_54 = (*(uint32_t*)arg2 + 4);
00517c21      *(uint32_t*)arg2 = edx_54;
00517c25      this->c.x = *(uint32_t*)edx_54;
00517c2d      void* esi_68 = (*(uint32_t*)arg2 + 4);
00517c30      *(uint32_t*)arg2 = esi_68;
00517c36      this->m_timeStamp = *(uint32_t*)esi_68;
00517c41      *(uint32_t*)arg2 += 4;
00517c43      ParticleEmitterInfo::InitEnd(((char*)this - 0x30));
00517c4e      return 1;
005179f0  }

00517c51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00517c60  void __thiscall LIGHTLIST::set_frame(class LIGHTLIST* this, class Frame const* arg2)

00517c60  {
00517c60      class LIGHTLIST* this_1 = this;
00517c64      int32_t esi = 0;
00517c68      int32_t var_4 = 0;
00517c68      
00517c6c      if (this->num_lights > 0)
00517c6c      {
00517cf9          bool cond:1_1;
00517cf9          
00517cf9          do
00517cf9          {
00517c83              void* eax_2 = (&this->lightobj->global_offset + esi);
00517c8f              *(uint32_t*)((char*)eax_2 + 0x34) = arg2->m_fOrigin.x;
00517c94              *(uint32_t*)((char*)eax_2 + 0x38) = arg2->m_fOrigin.y;
00517c9a              *(uint32_t*)((char*)eax_2 + 0x3c) = arg2->m_fOrigin.z;
00517c9f              *(uint32_t*)eax_2 = arg2->qw;
00517ca4              *(uint32_t*)((char*)eax_2 + 4) = arg2->qx;
00517caa              *(uint32_t*)((char*)eax_2 + 8) = arg2->qy;
00517cb0              *(uint32_t*)((char*)eax_2 + 0xc) = arg2->qz;
00517cb6              *(uint32_t*)((char*)eax_2 + 0x10) = arg2->m_fl2gv[0];
00517cbc              *(uint32_t*)((char*)eax_2 + 0x14) = arg2->m_fl2gv[1];
00517cc2              *(uint32_t*)((char*)eax_2 + 0x18) = arg2->m_fl2gv[2];
00517cc8              *(uint32_t*)((char*)eax_2 + 0x1c) = arg2->m_fl2gv[3];
00517cce              *(uint32_t*)((char*)eax_2 + 0x20) = arg2->m_fl2gv[4];
00517cd4              *(uint32_t*)((char*)eax_2 + 0x24) = arg2->m_fl2gv[5];
00517cda              *(uint32_t*)((char*)eax_2 + 0x28) = arg2->m_fl2gv[6];
00517ce0              *(uint32_t*)((char*)eax_2 + 0x2c) = arg2->m_fl2gv[7];
00517ce6              *(uint32_t*)((char*)eax_2 + 0x30) = arg2->m_fl2gv[8];
00517cf0              esi += 0x48;
00517cf3              cond:1_1 = (var_4 + 1) < this->num_lights;
00517cf5              var_4 += 1;
00517cf9          } while (cond:1_1);
00517c6c      }
00517c60  }

00517d03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00517d10  void __fastcall CPartArray::InitializeMotionTables(class CPartArray* this)

00517d10  {
00517d12      class MotionTableManager* motion_table_manager = this->motion_table_manager;
00517d12      
00517d17      if (motion_table_manager != 0)
00517d1d          MotionTableManager::initialize_state(motion_table_manager, &this->sequence);
00517d10  }

00517d23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00517d30  void __thiscall CPartArray::AnimationDone(class CPartArray* this, int32_t arg2)

00517d30  {
00517d30      class MotionTableManager* motion_table_manager = this->motion_table_manager;
00517d30      
00517d35      if (motion_table_manager == 0)
00517d3c          return;
00517d3c      
00517d37      /* tailcall */
00517d37      return MotionTableManager::AnimationDone(motion_table_manager, arg2);
00517d30  }

00517d3f                                                                                               90                                 .

00517d40  int32_t __fastcall CPartArray::HasAnims(class CPartArray const* this)

00517d40  {
00517d43      /* tailcall */
00517d43      return CSequence::has_anims(&this->sequence);
00517d40  }

00517d48                          90 90 90 90 90 90 90 90                                                          ........

00517d50  void __fastcall CPartArray::CheckForCompletedMotions(class CPartArray* this)

00517d50  {
00517d50      class MotionTableManager* motion_table_manager = this->motion_table_manager;
00517d50      
00517d55      if (motion_table_manager == 0)
00517d5c          return;
00517d5c      
00517d57      /* tailcall */
00517d57      return MotionTableManager::CheckForCompletedMotions(motion_table_manager);
00517d50  }

00517d5d                                                                                         90 90 90                               ...

00517d60  void __fastcall CPartArray::HandleMovement(class CPartArray* this)

00517d60  {
00517d60      class MotionTableManager* motion_table_manager = this->motion_table_manager;
00517d60      
00517d65      if (motion_table_manager == 0)
00517d6c          return;
00517d6c      
00517d67      /* tailcall */
00517d67      return MotionTableManager::UseTime(motion_table_manager);
00517d60  }

00517d6d                                         90 90 90                                                               ...

00517d70  void __fastcall CPartArray::HandleEnterWorld(class CPartArray* this)

00517d70  {
00517d72      class MotionTableManager* motion_table_manager = this->motion_table_manager;
00517d72      
00517d77      if (motion_table_manager != 0)
00517d7d          MotionTableManager::HandleEnterWorld(motion_table_manager, &this->sequence);
00517d70  }

00517d83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00517d90  void __fastcall CPartArray::HandleExitWorld(class CPartArray* this)

00517d90  {
00517d92      class MotionTableManager* motion_table_manager = this->motion_table_manager;
00517d92      
00517d97      if (motion_table_manager != 0)
00517d97      {
00517d9c          class CSequence* var_4_1 = &this->sequence;
00517d9d          class CSequence* edx;
00517d9d          MotionTableManager::HandleExitWorld(motion_table_manager, edx);
00517d97      }
00517d90  }

00517da3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00517db0  void __thiscall CPartArray::Update(class CPartArray* this, float arg2, class Frame* arg3)

00517db0  {
00517dc2      CSequence::update(&this->sequence, ((double)((long double)arg2)), arg3);
00517db0  }

00517dca                                90 90 90 90 90 90                                                            ......

00517dd0  void __thiscall CPartArray::SetCellID(class CPartArray* this, uint32_t const arg2)

00517dd0  {
00517dd3      int32_t i = 0;
00517dd3      
00517dd7      if (this->num_parts > 0)
00517dd7      {
00517df3          do
00517df3          {
00517de3              void* eax_1 = this->parts[i];
00517de3              
00517de8              if (eax_1 != 0)
00517dea                  *(uint32_t*)((char*)eax_1 + 0x34) = arg2;
00517dea              
00517df0              i += 1;
00517df3          } while (i < this->num_parts);
00517dd7      }
00517dd0  }

00517df9                                                                             90 90 90 90 90 90 90                           .......

00517e00  void __thiscall CPartArray::RemoveParts(class CPartArray* this, class CObjCell* arg2)

00517e00  {
00517e07      int32_t i = 0;
00517e07      
00517e0b      if (this->num_parts > 0)
00517e0b      {
00517e2c          do
00517e2c          {
00517e15              int32_t eax_2 = this->parts[i];
00517e15              
00517e1a              if (eax_2 != 0)
00517e1c                  arg2->vtable->remove_part(eax_2);
00517e1c              
00517e29              i += 1;
00517e2c          } while (i < this->num_parts);
00517e0b      }
00517e00  }

00517e34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00517e40  void __thiscall CPartArray::AddPartsShadow(class CPartArray* this, class CObjCell* arg2, uint32_t arg3)

00517e40  {
00517e46      class ClipPlaneList** clip_planes = nullptr;
00517e46      
00517e4e      if (arg3 > 1)
00517e54          clip_planes = arg2->clip_planes;
00517e54      
00517e5d      int32_t i = 0;
00517e5d      
00517e61      if (this->num_parts > 0)
00517e61      {
00517e90          do
00517e90          {
00517e67              int32_t eax_2 = this->parts[i];
00517e67              
00517e6c              if (eax_2 != 0)
00517e76                  arg2->vtable->add_part(eax_2, clip_planes, &arg2->pos.frame, arg3);
00517e76              
00517e8d              i += 1;
00517e90          } while (i < this->num_parts);
00517e61      }
00517e40  }

00517e99                                                                             90 90 90 90 90 90 90                           .......

00517ea0  void __thiscall CPartArray::AddLightsToCell(class CPartArray* this, class CObjCell* arg2)

00517ea0  {
00517eaa      if (arg2 != 0)
00517eaa      {
00517eac          class LIGHTLIST* lights = this->lights;
00517eac          
00517eb1          if (lights != 0)
00517eb1          {
00517eb6              int32_t i = 0;
00517eb6              
00517eba              if (lights->num_lights > 0)
00517eba              {
00517ebd                  int32_t edi_1 = 0;
00517ebd                  
00517ed8                  do
00517ed8                  {
00517ec8                      CObjCell::add_light(arg2, (lights->lightobj + edi_1));
00517ecd                      lights = this->lights;
00517ed2                      i += 1;
00517ed3                      edi_1 += 0x48;
00517ed8                  } while (i < lights->num_lights);
00517eba              }
00517eb1          }
00517eaa      }
00517ea0  }

00517ee1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00517ef0  void __thiscall CPartArray::RemoveLightsFromCell(class CPartArray* this, class CObjCell* arg2)

00517ef0  {
00517efa      if (arg2 != 0)
00517efa      {
00517efc          class LIGHTLIST* lights = this->lights;
00517efc          
00517f01          if (lights != 0)
00517f01          {
00517f06              int32_t i = 0;
00517f06              
00517f0a              if (lights->num_lights > 0)
00517f0a              {
00517f0d                  int32_t edi_1 = 0;
00517f0d                  
00517f28                  do
00517f28                  {
00517f18                      CObjCell::remove_light(arg2, (lights->lightobj + edi_1));
00517f1d                      lights = this->lights;
00517f22                      i += 1;
00517f23                      edi_1 += 0x48;
00517f28                  } while (i < lights->num_lights);
00517f0a              }
00517f01          }
00517efa      }
00517ef0  }

00517f31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00517f40  int32_t __fastcall CPartArray::InitParts(class CPartArray* this)

00517f40  {
00517f46      uint32_t num_parts = this->setup->num_parts;
00517f4e      this->num_parts = num_parts;
00517f4e      
00517f51      if (num_parts != 0)
00517f51      {
00517f5f          void* eax_1 = operator new[]((num_parts << 2));
00517f69          this->parts = eax_1;
00517f69          
00517f6c          if (eax_1 != 0)
00517f6c          {
00517f75              int32_t i = 0;
00517f75              
00517f79              if (this->num_parts > 0)
00517f79              {
00517f90                  do
00517f90                  {
00517f80                      this->parts[i] = 0;
00517f8d                      i += 1;
00517f90                  } while (i < this->num_parts);
00517f79              }
00517f79              
00517f9a              if (this->setup->parts == 0)
00518054                  return 1;
00518054              
00517fa3              int32_t i_1 = 0;
00517fa3              
00517fa7              if (this->num_parts > 0)
00517fa7              {
00517fd8                  do
00517fd8                  {
00517fbf                      this->parts[i_1] = CPhysicsPart::makePhysicsPart(this->setup->parts[i_1].id);
00517fbf                      
00517fd0                      if (this->parts[i_1] == 0)
00517fd0                          break;
00517fd0                      
00517fd5                      i_1 += 1;
00517fd8                  } while (i_1 < this->num_parts);
00517fa7              }
00517fa7              
00517fda              uint32_t num_parts_1 = this->num_parts;
00517fdd              int32_t i_2 = 0;
00517fdd              
00517fe1              if (i_1 == num_parts_1)
00517fe1              {
00517fe5                  if (num_parts_1 > 0)
00517fe5                  {
00518008                      do
00518008                      {
00517fe7                          this->parts[i_2]->physobj = this->owner;
00517ff6                          this->parts[i_2]->physobj_index = i_2;
00518005                          i_2 += 1;
00518008                      } while (i_2 < this->num_parts);
00517fe5                  }
00517fe5                  
00518012                  if (this->setup->default_scale != 0)
00518012                  {
00518017                      int32_t i_3 = 0;
00518017                      
0051801b                      if (this->num_parts > 0)
0051801b                      {
0051801d                          int32_t ecx_11 = 0;
0051801d                          
0051804a                          do
0051804a                          {
0051802c                              void* edx_9 = (this->setup->default_scale + ecx_11);
00518030                              int32_t* edi_3 = &this->parts[i_3]->gfxobj_scale.x;
00518033                              *(uint32_t*)edi_3 = *(uint32_t*)edx_9;
00518038                              edi_3[1] = *(uint32_t*)((char*)edx_9 + 4);
0051803e                              edi_3[2] = *(uint32_t*)((char*)edx_9 + 8);
00518044                              i_3 += 1;
00518045                              ecx_11 += 0xc;
0051804a                          } while (i_3 < this->num_parts);
0051801b                      }
00518012                  }
00518012                  
00518054                  return 1;
00517fe1              }
00517f6c          }
00517f51      }
00517f51      
00518059      return 0;
00517f40  }

00517f7d                                                                                         8d 49 00                               .I.
0051805a                                                                                90 90 90 90 90 90                            ......

00518060  uint32_t __fastcall CPartArray::GetNumSphere(class CPartArray const* this)

00518060  {
00518066      return this->setup->num_sphere;
00518060  }

00518067                       90 90 90 90 90 90 90 90 90                                                         .........

00518070  class CSphere const* __fastcall CPartArray::GetSphere(class CPartArray const* this)

00518070  {
00518076      return this->setup->sphere;
00518070  }

00518077                                                                       90 90 90 90 90 90 90 90 90                         .........

00518080  uint32_t __fastcall CPartArray::GetNumCylsphere(class CPartArray const* this)

00518080  {
00518086      return this->setup->num_cylsphere;
00518080  }

00518087                       90 90 90 90 90 90 90 90 90                                                         .........

00518090  class CCylSphere const* __fastcall CPartArray::GetCylsphere(class CPartArray const* this)

00518090  {
00518096      return this->setup->cylsphere;
00518090  }

00518097                                                                       90 90 90 90 90 90 90 90 90                         .........

005180a0  class CSetup* __fastcall CPartArray::GetRadius(class CPartArray const* this)

005180a0  {
005180a0      class CSetup* setup = this->setup;
005180a3      setup->radius;
005180a6      this->scale;
005180a9      return setup;
005180a0  }

005180aa                                90 90 90 90 90 90                                                            ......

005180b0  class CSetup* __fastcall CPartArray::GetHeight(class CPartArray const* this)

005180b0  {
005180b0      class CSetup* setup = this->setup;
005180b3      setup->height;
005180b6      this->scale;
005180b9      return setup;
005180b0  }

005180ba                                                                                90 90 90 90 90 90                            ......

005180c0  int32_t __fastcall CPartArray::AllowsFreeHeading(class CPartArray const* this)

005180c0  {
005180c6      return this->setup->allow_free_heading;
005180c0  }

005180c7                       90 90 90 90 90 90 90 90 90                                                         .........

005180d0  class CSetup* __fastcall CPartArray::GetStepUpHeight(class CPartArray const* this)

005180d0  {
005180d0      class CSetup* setup = this->setup;
005180d0      
005180d5      if (setup == 0)
005180e4          return setup;
005180e4      
005180d7      setup->step_up_height;
005180da      this->scale;
005180dd      return setup;
005180d0  }

005180e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005180f0  class CSetup* __fastcall CPartArray::GetStepDownHeight(class CPartArray const* this)

005180f0  {
005180f0      class CSetup* setup = this->setup;
005180f0      
005180f5      if (setup == 0)
00518104          return setup;
00518104      
005180f7      setup->step_down_height;
005180fa      this->scale;
005180fd      return setup;
005180f0  }

00518105                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00518110  int32_t __fastcall CPartArray::CacheHasPhysicsBSP(class CPartArray* this)

00518110  {
00518114      int32_t i = 0;
00518118      int32_t edi;
00518118      int32_t var_8 = edi;
00518118      
00518119      if (this->num_parts > 0)
00518119      {
0051811b          class CPhysicsPart** parts = this->parts;
0051811b          
00518137          do
00518137          {
0051812c              if (*(uint32_t*)*(uint32_t*)parts->gfxobj->physics_bsp != 0)
0051812c              {
0051814f                  this->pa_state |= 0x10000;
00518157                  return 1;
0051812c              }
0051812c              
00518131              i += 1;
00518132              parts = &parts[1];
00518137          } while (i < this->num_parts);
00518119      }
00518119      
00518141      this->pa_state &= 0xfffeffff;
00518146      return 0;
00518110  }

00518158                                                                          90 90 90 90 90 90 90 90                          ........

00518160  void __thiscall CPartArray::calc_cross_cells_static(class CPartArray* this, class CObjCell* arg2, class CELLARRAY* arg3)

00518160  {
00518176      *(int32_t*)((char*)arg2->vtable + 0x7c)(this->num_parts, this->parts, arg3);
00518160  }

0051817d                                                                                         90 90 90                               ...

00518180  enum TransitionState __thiscall CPartArray::FindObjCollisions(class CPartArray* this, class CTransition* arg2)

00518180  {
00518188      int32_t i = 0;
0051818c      enum TransitionState result = OK_TS;
0051818c      
00518191      if (this->num_parts > 0)
00518191      {
005181b2          do
005181b2          {
0051819a              class CPhysicsPart* ecx_2 = this->parts[i];
0051819a              
0051819f              if (ecx_2 != 0)
0051819f              {
005181a2                  result = CPhysicsPart::find_obj_collisions(ecx_2, arg2);
005181a2                  
005181aa                  if (result != OK_TS)
005181aa                      break;
0051819f              }
0051819f              
005181af              i += 1;
005181b2          } while (i < this->num_parts);
00518191      }
00518191      
005181b7      return result;
00518180  }

005181ba                                                                                90 90 90 90 90 90                            ......

005181c0  int32_t __fastcall CPartArray::InitPals(class CPartArray* this)

005181c0  {
005181c8      if (this->pals == 0)
005181c8      {
005181d1          void* eax_3 = operator new[]((this->num_parts << 2));
005181db          this->pals = eax_3;
005181db          
005181de          if (eax_3 == 0)
0051820c              return 0;
0051820c          
005181e3          int32_t i = 0;
005181e3          
005181e7          if (this->num_parts > 0)
005181e7          {
00518200              do
00518200              {
005181f0                  this->pals[i] = 0;
005181fd                  i += 1;
00518200              } while (i < this->num_parts);
005181e7          }
005181c8      }
005181c8      
00518208      return 1;
005181c0  }

0051820d                                         90 90 90                                                               ...

00518210  void __fastcall CPartArray::DestroyPals(class CPartArray* this)

00518210  {
00518218      if (this->pals != 0)
00518218      {
0051821e          int32_t i = 0;
0051821e          
00518222          if (this->num_parts > 0)
00518222          {
00518247              do
00518247              {
00518227                  class Palette* eax_3 = this->pals[i];
00518227                  
0051822c                  if (eax_3 != 0)
0051822c                  {
0051822f                      Palette::releasePalette(eax_3);
00518234                      this->pals[i] = 0;
0051822c                  }
0051822c                  
00518244                  i += 1;
00518247              } while (i < this->num_parts);
00518222          }
00518222          
0051824d          operator delete[](this->pals);
00518255          this->pals = nullptr;
00518218      }
00518210  }

0051825f                                                                                               90                                 .

00518260  void __fastcall CPartArray::UpdateViewerDistance(class CPartArray* this)

00518260  {
00518267      int32_t i = 0;
00518267      
0051826b      if (this->num_parts > 0)
0051826b      {
00518285          do
00518285          {
00518273              class CPhysicsPart* ecx_1 = this->parts[i];
00518273              
00518278              if (ecx_1 != 0)
0051827a                  CPhysicsPart::UpdateViewerDistance(ecx_1);
0051827a              
00518282              i += 1;
00518285          } while (i < this->num_parts);
0051826b      }
00518260  }

0051828a                                90 90 90 90 90 90                                                            ......

00518290  void __thiscall CPartArray::UpdateViewerDistance(class CPartArray* this, float arg2, class AC1Legacy::Vector3 const* arg3)

00518290  {
00518297      int32_t i = 0;
00518297      
0051829b      if (this->num_parts > 0)
0051829b      {
005182be          do
005182be          {
005182aa              class CPhysicsPart* ecx = this->parts[i];
005182aa              
005182af              if (ecx != 0)
005182b3                  CPhysicsPart::UpdateViewerDistance(ecx, arg2, arg3);
005182b3              
005182bb              i += 1;
005182be          } while (i < this->num_parts);
0051829b      }
00518290  }

005182c7                       90 90 90 90 90 90 90 90 90                                                         .........

005182d0  void __fastcall CPartArray::Draw(class CPartArray* this, class Position const* arg2)

005182d0  {
005182d7      int32_t i = 0;
005182d7      
005182db      if (this->num_parts > 0)
005182db      {
005182f7          do
005182f7          {
005182e3              class CPhysicsPart* ecx_1 = this->parts[i];
005182e3              
005182e8              if (ecx_1 != 0)
005182ec                  CPhysicsPart::Draw(ecx_1, 0);
005182ec              
005182f4              i += 1;
005182f7          } while (i < this->num_parts);
005182db      }
005182d0  }

005182fe                                                                                            90 90                                ..

00518300  void __thiscall CPartArray::SetNoDrawInternal(class CPartArray* this, int32_t arg2)

00518300  {
00518308      if (this->setup != 0)
00518308      {
0051830e          int32_t i = 0;
0051830e          
00518312          if (this->num_parts > 0)
00518312          {
00518336              do
00518336              {
00518323                  class CPhysicsPart* ecx = this->parts[i];
00518323                  
00518328                  if (ecx != 0)
0051832b                      CPhysicsPart::SetNoDraw(ecx, arg2);
0051832b                  
00518333                  i += 1;
00518336              } while (i < this->num_parts);
00518312          }
00518308      }
00518300  }

0051833e                                                                                            90 90                                ..

00518340  void __thiscall CPartArray::SetTranslucencyInternal(class CPartArray* this, float arg2)

00518340  {
00518348      if (this->setup != 0)
00518348      {
0051834e          int32_t i = 0;
0051834e          
00518352          if (this->num_parts > 0)
00518352          {
00518376              do
00518376              {
00518363                  class CPhysicsPart* ecx = this->parts[i];
00518363                  
00518368                  if (ecx != 0)
0051836b                      CPhysicsPart::SetTranslucency(ecx, arg2);
0051836b                  
00518373                  i += 1;
00518376              } while (i < this->num_parts);
00518352          }
00518348      }
00518340  }

0051837e                                                                                            90 90                                ..

00518380  void __thiscall CPartArray::SetPartTranslucencyInternal(class CPartArray* this, uint32_t arg2, float arg3)

00518380  {
0051838e      if ((this->setup != 0 && arg2 < this->num_parts))
0051838e      {
00518393          class CPhysicsPart* ecx_1 = this->parts[arg2];
00518393          
00518398          if (ecx_1 != 0)
0051839f              CPhysicsPart::SetTranslucency(ecx_1, arg3);
0051838e      }
00518380  }

005183a7                       90 90 90 90 90 90 90 90 90                                                         .........

005183b0  void __thiscall CPartArray::SetLuminosityInternal(class CPartArray* this, float arg2)

005183b0  {
005183b8      if (this->setup != 0)
005183b8      {
005183be          int32_t i = 0;
005183be          
005183c2          if (this->num_parts > 0)
005183c2          {
005183e6              do
005183e6              {
005183d3                  class CPhysicsPart* ecx = this->parts[i];
005183d3                  
005183d8                  if (ecx != 0)
005183db                      CPhysicsPart::SetLuminosity(ecx, arg2);
005183db                  
005183e3                  i += 1;
005183e6              } while (i < this->num_parts);
005183c2          }
005183b8      }
005183b0  }

005183ee                                            90 90                                                                ..

005183f0  void __thiscall CPartArray::SetPartLuminosityInternal(class CPartArray* this, uint32_t arg2, float arg3)

005183f0  {
005183fe      if ((this->setup != 0 && arg2 < this->num_parts))
005183fe      {
00518403          class CPhysicsPart* ecx_1 = this->parts[arg2];
00518403          
00518408          if (ecx_1 != 0)
0051840f              CPhysicsPart::SetLuminosity(ecx_1, arg3);
005183fe      }
005183f0  }

00518417                                                                       90 90 90 90 90 90 90 90 90                         .........

00518420  void __thiscall CPartArray::SetDiffusionInternal(class CPartArray* this, float arg2)

00518420  {
00518428      if (this->setup != 0)
00518428      {
0051842e          int32_t i = 0;
0051842e          
00518432          if (this->num_parts > 0)
00518432          {
00518456              do
00518456              {
00518443                  class CPhysicsPart* ecx = this->parts[i];
00518443                  
00518448                  if (ecx != 0)
0051844b                      CPhysicsPart::SetDiffusion(ecx, arg2);
0051844b                  
00518453                  i += 1;
00518456              } while (i < this->num_parts);
00518432          }
00518428      }
00518420  }

0051845e                                                                                            90 90                                ..

00518460  void __thiscall CPartArray::SetPartDiffusionInternal(class CPartArray* this, uint32_t arg2, float arg3)

00518460  {
0051846e      if ((this->setup != 0 && arg2 < this->num_parts))
0051846e      {
00518473          class CPhysicsPart* ecx_1 = this->parts[arg2];
00518473          
00518478          if (ecx_1 != 0)
0051847f              CPhysicsPart::SetDiffusion(ecx_1, arg3);
0051846e      }
00518460  }

00518487                       90 90 90 90 90 90 90 90 90                                                         .........

00518490  void __thiscall CPartArray::SetLightingInternal(class CPartArray* this, float arg2, float arg3)

00518490  {
00518498      if (this->setup != 0)
00518498      {
0051849e          int32_t i = 0;
0051849e          
005184a2          if (this->num_parts > 0)
005184a2          {
005184c7              do
005184c7              {
005184b3                  class CPhysicsPart* ecx = this->parts[i];
005184b3                  
005184b8                  if (ecx != 0)
005184bc                      CPhysicsPart::SetLighting(ecx, arg2, arg3);
005184bc                  
005184c4                  i += 1;
005184c7              } while (i < this->num_parts);
005184a2          }
00518498      }
00518490  }


005184d0  int32_t __thiscall CPartArray::SetPartLightingInternal(class CPartArray* this, uint32_t arg2, float arg3, float arg4)

005184d0  {
005184de      if ((this->setup == 0 || arg2 >= this->num_parts))
005184e2          return 0;
005184e2      
005184e8      class CPhysicsPart* ecx_1 = this->parts[arg2];
005184e8      
005184ed      if (ecx_1 != 0)
005184f9          CPhysicsPart::SetLighting(ecx_1, arg3, arg4);
005184f9      
00518503      return 1;
005184d0  }

00518506                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00518510  void __fastcall CPartArray::RestoreLightingInternal(class CPartArray* this)

00518510  {
00518518      if (this->setup != 0)
00518518      {
0051851e          int32_t i = 0;
0051851e          
00518522          if (this->num_parts > 0)
00518522          {
00518539              do
00518539              {
00518527                  class CPhysicsPart* ecx = this->parts[i];
00518527                  
0051852c                  if (ecx != 0)
0051852e                      CPhysicsPart::RestoreLighting(ecx);
0051852e                  
00518536                  i += 1;
00518539              } while (i < this->num_parts);
00518522          }
00518518      }
00518510  }

0051853e                                                                                            90 90                                ..

00518540  int32_t __fastcall CPartArray::InitObjDescChanges(class CPartArray* this)

00518540  {
00518547      int32_t result = 0;
00518547      
0051854c      if (this->setup != 0)
0051854c      {
00518551          int32_t i = 0;
00518551          
00518555          if (this->num_parts > 0)
00518555          {
00518575              do
00518575              {
0051855a                  class CPhysicsPart* ecx = this->parts[i];
0051855a                  
0051855f                  if (ecx != 0)
0051855f                  {
00518561                      CPhysicsPart::InitObjDescChanges(ecx);
0051856a                      result = 1;
0051855f                  }
0051855f                  
00518572                  i += 1;
00518575              } while (i < this->num_parts);
00518555          }
0051854c      }
0051854c      
0051857c      return result;
00518540  }

0051857d                                                                                         90 90 90                               ...

00518580  int32_t __thiscall CPartArray::SetPart(class CPartArray* this, class AnimPartChange const* arg2)

00518580  {
00518589      int32_t result = 1;
00518589      
0051858e      if (this->setup == 0)
005185d6          return 0;
005185d6      
00518597      for (class AnimPartChange* next = arg2; next != 0; next = next->next)
00518597      {
005185a0          uint32_t part_index = next->part_index;
005185a0          
005185a9          if (part_index >= this->num_parts)
005185c1              result = 0;
005185a9          else
005185a9          {
005185ab              class CPhysicsPart** parts = this->parts;
005185ae              class CPhysicsPart* eax_1 = parts[part_index];
005185ae              
005185b3              if (eax_1 == 0)
005185c1                  result = 0;
005185b3              else
005185b3              {
005185b5                  uint32_t id = next->part_id.id;
005185b5                  
005185bf                  if (CPhysicsPart::SetPart(eax_1, parts) == 0)
005185c1                      result = 0;
005185b3              }
005185a9          }
00518597      }
00518597      
005185cf      return result;
00518580  }

005185d9                                                                             90 90 90 90 90 90 90                           .......

005185e0  int32_t __thiscall CPartArray::SetTextureMap(class CPartArray* this, class TextureMapChange const* arg2)

005185e0  {
005185e9      int32_t result = 1;
005185e9      
005185ee      if (this->setup == 0)
00518638          return 0;
00518638      
005185f7      for (class TextureMapChange* next = arg2; next != 0; next = next->next)
005185f7      {
00518600          uint32_t part_index = next->part_index;
00518600          
00518606          if (part_index >= this->num_parts)
00518623              result = 0;
00518606          else
00518606          {
0051860b              class CPhysicsPart* ecx_1 = this->parts[part_index];
0051860b              
00518610              if (ecx_1 == 0)
00518623                  result = 0;
00518610              else if (CPhysicsPart::SetTextureMap(ecx_1, next->old_tex_id.id, next->new_tex_id.id) == 0)
00518623                  result = 0;
00518606          }
005185f7      }
005185f7      
00518631      return result;
005185e0  }

0051863b                                                                                   90 90 90 90 90                             .....

00518640  void __thiscall LIGHTLIST::LIGHTLIST(class LIGHTLIST* this, uint32_t arg2)

00518640  {
00518640      class LIGHTLIST* this_1 = this;
00518659      this->num_lights = arg2;
0051865c      void* eax_1 = operator new[](((arg2 * 0x48) + 4));
0051865c      
00518668      if (eax_1 == 0)
00518668      {
005186c6          this->lightobj = nullptr;
005186cf          return;
00518668      }
00518668      
0051866a      void* eax_2 = ((char*)eax_1 + 4);
0051866d      *(uint32_t*)((char*)eax_2 - 4) = arg2;
00518670      int32_t ecx_1 = (arg2 - 1);
0051867a      void* ebx = eax_2;
0051867a      
0051867c      if (ecx_1 >= 0)
0051867c      {
0051867e          void* esi_1 = ((char*)ebx + 0x40);
00518681          int32_t i_1 = (ecx_1 + 1);
005186af          int32_t i;
005186af          
005186af          do
005186af          {
00518684              *(uint32_t*)ebx = 0;
00518689              *(uint32_t*)((char*)esi_1 - 0x3c) = 0x3f800000;
0051868f              *(uint32_t*)((char*)esi_1 - 0x38) = 0;
00518692              *(uint32_t*)((char*)esi_1 - 0x34) = 0;
00518695              *(uint32_t*)((char*)esi_1 - 0x30) = 0;
00518698              *(uint32_t*)((char*)esi_1 - 8) = 0;
0051869b              *(uint32_t*)((char*)esi_1 - 4) = 0;
0051869e              *(uint32_t*)esi_1 = 0;
005186a0              Frame::cache(((char*)esi_1 - 0x3c));
005186a5              *(uint32_t*)((char*)esi_1 + 4) = 0;
005186a8              ebx += 0x48;
005186ab              esi_1 += 0x48;
005186ae              i = i_1;
005186ae              i_1 -= 1;
005186af          } while (i != 1);
0051867c      }
0051867c      
005186bb      this->lightobj = eax_2;
00518640  }

005186d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005186e0  int32_t __thiscall CPartArray::SetMotionTableID(class CPartArray* this, class IDClass<_tagDataID,32,0> arg2)

005186e0  {
005186e1      class IDClass<_tagDataID,32,0> ebx = arg2;
005186e8      class MotionTableManager* motion_table_manager = this->motion_table_manager;
005186e8      
005186ed      if (motion_table_manager == 0)
005186ed      {
0051871d      label_51871d:
0051871d          
0051871f          if (ebx != 0)
0051871f          {
00518722              class MotionTableManager* eax_2 = MotionTableManager::Create(ebx);
0051872c              this->motion_table_manager = eax_2;
0051872c              
0051872f              if (eax_2 == 0)
0051874a                  return 0;
0051874a              
00518737              MotionTableManager::SetPhysicsObject(eax_2, this->owner);
0051871f          }
005186ed      }
005186ed      else if (MotionTableManager::GetMotionTableID(motion_table_manager, &arg2)->id != ebx)
005186fb      {
005186fe          class MotionTableManager* motion_table_manager_1 = this->motion_table_manager;
005186fe          
00518703          if (motion_table_manager_1 != 0)
00518703          {
00518707              MotionTableManager::~MotionTableManager(motion_table_manager_1);
0051870d              operator delete(motion_table_manager_1);
00518703          }
00518703          
00518715          this->motion_table_manager = nullptr;
0051871c          goto label_51871d;
005186fb      }
005186fb      
00518743      return 1;
005186e0  }

0051874d                                         90 90 90                                                               ...

00518750  uint32_t __thiscall CPartArray::DoInterpretedMotion(class CPartArray* this, uint32_t arg2, class MovementParameters const* arg3)

00518750  {
0051875d      if (this->motion_table_manager == 0)
00518768          return 7;
00518768      
0051876f      int32_t var_64 = 0;
00518773      int32_t var_54 = 0x796910;
0051877b      int32_t var_50 = 0;
0051877f      int32_t var_4c = 0x3f800000;
00518787      int32_t var_48 = 0;
0051878f      int32_t var_44 = 0;
00518797      int32_t var_40 = 0;
0051879f      int32_t var_18 = 0;
005187a7      int32_t var_14 = 0;
005187af      int32_t var_10 = 0;
005187b7      Frame::cache(&var_4c);
005187c7      uint32_t var_60 = arg2;
005187d0      class MovementParameters* var_4 = arg3;
005187d4      class MotionTableManager* motion_table_manager = this->motion_table_manager;
005187d8      var_64 = 2;
005187e9      return MotionTableManager::PerformMovement(motion_table_manager, &var_64, &this->sequence);
00518750  }

005187ec                                      90 90 90 90                                                              ....

005187f0  uint32_t __thiscall CPartArray::StopInterpretedMotion(class CPartArray* this, uint32_t arg2, class MovementParameters const* arg3)

005187f0  {
005187fd      if (this->motion_table_manager == 0)
00518808          return 7;
00518808      
0051880f      int32_t var_64 = 0;
00518813      int32_t var_54 = 0x796910;
0051881b      int32_t var_50 = 0;
0051881f      int32_t var_4c = 0x3f800000;
00518827      int32_t var_48 = 0;
0051882f      int32_t var_44 = 0;
00518837      int32_t var_40 = 0;
0051883f      int32_t var_18 = 0;
00518847      int32_t var_14 = 0;
0051884f      int32_t var_10 = 0;
00518857      Frame::cache(&var_4c);
00518867      uint32_t var_60 = arg2;
00518870      class MovementParameters* var_4 = arg3;
00518874      class MotionTableManager* motion_table_manager = this->motion_table_manager;
00518878      var_64 = 4;
00518889      return MotionTableManager::PerformMovement(motion_table_manager, &var_64, &this->sequence);
005187f0  }

0051888c                                      90 90 90 90                                                              ....

00518890  uint32_t __fastcall CPartArray::StopCompletelyInternal(class CPartArray* this)

00518890  {
0051889d      if (this->motion_table_manager == 0)
005188a8          return 7;
005188a8      
005188ad      int32_t var_64 = 0;
005188b1      int32_t var_54 = 0x796910;
005188b9      int32_t var_50 = 0;
005188bd      int32_t var_4c = 0x3f800000;
005188c5      int32_t var_48 = 0;
005188cd      int32_t var_44 = 0;
005188d5      int32_t var_40 = 0;
005188dd      int32_t var_18 = 0;
005188e5      int32_t var_14 = 0;
005188ed      int32_t var_10 = 0;
005188f5      Frame::cache(&var_4c);
00518903      class MotionTableManager* motion_table_manager = this->motion_table_manager;
00518906      var_64 = 5;
00518917      return MotionTableManager::PerformMovement(motion_table_manager, &var_64, &this->sequence);
00518890  }

00518918                                                                          90 90 90 90 90 90 90 90                          ........

00518920  void __fastcall CPartArray::DestroyParts(class CPartArray* this)

00518920  {
00518928      if (this->parts != 0)
00518928      {
0051892e          int32_t i = 0;
0051892e          
00518932          if (this->num_parts > 0)
00518932          {
0051895f              do
0051895f              {
00518938                  class CPhysicsPart* edi_1 = this->parts[i];
00518938                  
0051893d                  if (edi_1 != 0)
0051893d                  {
00518941                      CPhysicsPart::~CPhysicsPart(edi_1);
00518947                      operator delete(edi_1);
0051894c                      this->parts[i] = 0;
0051893d                  }
0051893d                  
0051895c                  i += 1;
0051895f              } while (i < this->num_parts);
00518932          }
00518932          
00518966          operator delete[](this->parts);
0051896e          this->parts = nullptr;
00518928      }
00518928      
00518976      this->num_parts = 0;
00518920  }

0051897f                                                                                               90                                 .

00518980  void __fastcall CPartArray::InitDefaults(class CPartArray* this)

00518980  {
00518991      if (this->setup->default_anim_id.id != 0)
00518991      {
00518999          CSequence::clear_animations(&this->sequence);
005189a2          void var_14;
005189a2          AnimData::AnimData(&var_14);
005189b7          uint32_t id = this->setup->default_anim_id.id;
005189bb          int32_t var_c_1 = 0;
005189c3          int32_t var_8_1 = 0xffffffff;
005189cb          int32_t var_4_1 = 0x41f00000;
005189d3          CSequence::append_animation(&this->sequence, &var_14);
005189dc          SetPositionStruct::~SetPositionStruct(&var_14);
00518991      }
00518991      
005189e2      class CPhysicsObj* owner = this->owner;
005189e2      
005189e7      if (owner != 0)
005189ed          CPhysicsObj::InitDefaults(owner, this->setup);
00518980  }

005189f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00518a00  int32_t __thiscall CPartArray::SetScaleInternal(class CPartArray* this, class AC1Legacy::Vector3 const* arg2)

00518a00  {
00518a0c      this->scale.x = arg2->x;
00518a0c      this->scale.y = arg2->y;
00518a0c      this->scale.z = arg2->z;
00518a22      int32_t i = 0;
00518a22      
00518a26      if (this->num_parts > 0)
00518a26      {
00518a28          float* esi_2 = nullptr;
00518a28          
00518a9e          do
00518a9e          {
00518a33              void* edx_2 = this->parts[i];
00518a33              
00518a38              if (edx_2 != 0)
00518a38              {
00518a3d                  class AC1Legacy::Vector3* default_scale = this->setup->default_scale;
00518a45                  float z;
00518a45                  
00518a45                  if (default_scale == 0)
00518a45                  {
00518a87                      *(uint32_t*)((char*)edx_2 + 0x24) = this->scale.x;
00518a8c                      *(uint32_t*)((char*)edx_2 + 0x28) = this->scale.y;
00518a8f                      z = this->scale.z;
00518a45                  }
00518a45                  else
00518a45                  {
00518a5a                      float z_1 = ((float)(((long double)*(uint32_t*)(&default_scale->z + esi_2)) * ((long double)this->scale.z)));
00518a62                      long double x87_r7_3 = (((long double)*(uint32_t*)(&default_scale->y + esi_2)) * ((long double)this->scale.y));
00518a70                      *(uint32_t*)((char*)edx_2 + 0x24) = ((float)(((long double)*(uint32_t*)((char*)esi_2 + default_scale)) * ((long double)this->scale.x)));
00518a7a                      *(uint32_t*)((char*)edx_2 + 0x28) = ((float)x87_r7_3);
00518a7d                      z = z_1;
00518a45                  }
00518a45                  
00518a92                  *(uint32_t*)((char*)edx_2 + 0x2c) = z;
00518a38              }
00518a38              
00518a98              i += 1;
00518a99              esi_2 = &esi_2[3];
00518a9e          } while (i < this->num_parts);
00518a26      }
00518a26      
00518aac      return 1;
00518a00  }

00518a2d                                         8d 49 00                                                               .I.
00518aaf                                               90                                                                 .

00518ab0  class IDClass<_tagDataID,32,0>* __thiscall CPartArray::GetSetupID(class CPartArray const* this, class IDClass<_tagDataID,32,0>* __return)

00518ab0  {
00518ab6      uint32_t* result = __return;
00518aba      *(uint32_t*)result = this->setup->m_DID.id;
00518abc      return result;
00518ab0  }

00518abf                                                                                               90                                 .

00518ac0  class IDClass<_tagDataID,32,0>* __thiscall CPartArray::GetDataID(class CPartArray const* this, class IDClass<_tagDataID,32,0>* __return)

00518ac0  {
00518ac3      uint32_t id = this->setup->m_DID.id;
00518ac7      uint32_t id_1 = INVALID_DID.id;
00518ac7      
00518acf      if (id == id_1)
00518acf      {
00518ad5          if (this->num_parts != 1)
00518ad5          {
00518aee              uint32_t* __return_2 = __return;
00518af2              *(uint32_t*)__return_2 = id_1;
00518af5              return __return_2;
00518ad5          }
00518ad5          
00518ae1          id = *(uint32_t*)*(uint32_t*)this->parts->gfxobj->m_DID.id;
00518acf      }
00518acf      
00518ae4      uint32_t* __return_1 = __return;
00518ae8      *(uint32_t*)__return_1 = id;
00518aeb      return __return_1;
00518ac0  }

00518af8                                                                          90 90 90 90 90 90 90 90                          ........

00518b00  class CSphere const* __fastcall CPartArray::GetSortingSphere(class CPartArray const* this)

00518b00  {
00518b04      class CPartArray* this_1 = this;
00518b06      this = (*(uint8_t*)$S118);
00518b06      
00518b13      if ((1 & this) == 0)
00518b13      {
00518b15          $S118 |= 1;
00518b44          default_sorting_sphere.center.x = 0;
00518b49          default_sorting_sphere.center.y = 0f;
00518b4f          default_sorting_sphere.center.z = 0f;
00518b55          default_sorting_sphere.radius = 0f;
00518b5f          atexit($E119);
00518b13      }
00518b13      
00518b67      class CSetup* setup = this_1->setup;
00518b67      
00518b6d      if (setup == 0)
00518b7e          return 0x843f90;
00518b7e      
00518b75      return &setup->sorting_sphere;
00518b00  }

00518b7f                                                                                               90                                 .

00518b80  int32_t __thiscall CPartArray::GetSelectionSphere(class CPartArray const* this, class CSphere* arg2)

00518b80  {
00518b80      class CSetup* setup = this->setup;
00518b80      
00518b88      if (setup == 0)
00518bf6          return 0;
00518bf6      
00518ba6      float var_4 = ((float)(((long double)this->scale.z) * ((long double)setup->selection_sphere.center.z)));
00518bc0      float var_14 = ((float)(((long double)this->scale.y) * ((long double)setup->selection_sphere.center.y)));
00518bc4      float* edx = arg2;
00518bc6      *(uint32_t*)edx = ((float)(((long double)this->scale.x) * ((long double)setup->selection_sphere.center.x)));
00518bcc      edx[1] = var_14;
00518bd3      edx[2] = var_4;
00518be3      arg2->radius = ((float)(((long double)this->setup->selection_sphere.radius) * ((long double)this->scale.z)));
00518bee      return 1;
00518b80  }

00518bf9                                                                             90 90 90 90 90 90 90                           .......

00518c00  int32_t __fastcall CPartArray::InitLights(class CPartArray* this)

00518c00  {
00518c19      if ((this->owner != 0 && this->setup->num_lights > 0))
00518c19      {
00518c21          void* eax_2 = operator new(8);
00518c2b          class LIGHTLIST* eax_3;
00518c2b          
00518c2b          if (eax_2 == 0)
00518c40              eax_3 = nullptr;
00518c2b          else
00518c39              eax_3 = LIGHTLIST::LIGHTLIST(eax_2, this->setup->num_lights);
00518c39          
00518c42          this->lights = eax_3;
00518c48          int32_t i = 0;
00518c48          
00518c4c          if (eax_3->num_lights > 0)
00518c4c          {
00518c50              int32_t edi_1 = 0;
00518c52              int32_t edx_2 = 0;
00518c52              
00518c8b              do
00518c8b              {
00518c6f                  void** eax_7 = (this->lights->lightobj + edx_2);
00518c73                  bool cond:0_1 = (this->owner->state & 1) == 0;
00518c75                  *(uint32_t*)eax_7 = (this->setup->lights + edi_1);
00518c75                  
00518c77                  if (!(cond:0_1))
00518c79                      eax_7[0x11] |= 1;
00518c79                  
00518c82                  i += 1;
00518c83                  edx_2 += 0x48;
00518c86                  edi_1 += 0x68;
00518c8b              } while (i < this->lights->num_lights);
00518c4c          }
00518c4c          
00518c9b          CPartArray::AddLightsToCell(this, this->owner->cell);
00518c19      }
00518c19      
00518ca7      return 1;
00518c00  }

00518ca8                          90 90 90 90 90 90 90 90                                                          ........

00518cb0  void __thiscall CPartArray::SetTextureVelocityInternal(class CPartArray* this, float arg2, float arg3)

00518cb0  {
00518cb7      int32_t i = 0;
00518cb7      
00518cbb      if (this->num_parts > 0)
00518cbb      {
00518cea          do
00518cea          {
00518cca              void* eax_2 = this->parts[i];
00518cca              
00518ccf              if (eax_2 != 0)
00518cdc                  CPhysics::AddGfxVelocity(*(uint32_t*)(**(uint32_t**)((char*)eax_2 + 0x20) + 0x28), arg2, arg3);
00518cdc              
00518ce7              i += 1;
00518cea          } while (i < this->num_parts);
00518cbb      }
00518cb0  }

00518cf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00518d00  void __thiscall CPartArray::SetPartTextureVelocityInternal(class CPartArray* this, uint32_t arg2, float arg3, float arg4)

00518d00  {
00518d07      if (arg2 < this->num_parts)
00518d07      {
00518d0c          void* eax = this->parts[arg2];
00518d0c          
00518d11          if (eax != 0)
00518d26              CPhysics::AddGfxVelocity(*(uint32_t*)(**(uint32_t**)((char*)eax + 0x20) + 0x28), arg3, arg4);
00518d07      }
00518d00  }

00518d31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00518d40  int32_t __thiscall CPartArray::MorphToExistingObject(class CPartArray* this, class CPartArray const* arg2)

00518d40  {
00518d45      CPartArray::DestroyParts(this);
00518d4e      class CSetup* setup = arg2->setup;
00518d53      this->setup = setup;
00518d53      
00518d56      if (setup != 0)
00518d58          setup->vtable->AddRef();
00518d58      
00518d62      this->scale.x = arg2->scale.x;
00518d62      this->scale.y = arg2->scale.y;
00518d62      this->scale.z = arg2->scale.z;
00518d73      uint32_t num_parts = arg2->num_parts;
00518d7e      this->num_parts = num_parts;
00518d8b      this->parts = operator new[]((num_parts << 2));
00518d8e      CPartArray::InitPals(this);
00518d96      int32_t i = 0;
00518d96      
00518d9a      if (this->num_parts > 0)
00518d9a      {
00518df5          do
00518df5          {
00518dac              this->parts[i] = CPhysicsPart::makePhysicsPart(arg2->parts[i]);
00518db2              this->parts[i]->physobj = this->owner;
00518dc1              this->parts[i]->physobj_index = i;
00518dcd              class Palette** pals = arg2->pals;
00518dcd              
00518dd5              if (pals != 0)
00518dd5              {
00518dd7                  this->pals[i] = pals[i];
00518de3                  int32_t* ecx_6 = this->pals[i];
00518de3                  
00518de8                  if (ecx_6 != 0)
00518dec                      *(uint32_t*)(*(uint32_t*)ecx_6 + 0x10)();
00518dd5              }
00518dd5              
00518df2              i += 1;
00518df5          } while (i < this->num_parts);
00518d9a      }
00518d9a      
00518dff      return 1;
00518d40  }

00518e02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00518e10  int32_t __thiscall CPartArray::SetPalette(class CPartArray* this, class IDClass<_tagDataID,32,0> arg2, class Subpalette* arg3)

00518e10  {
00518e18      if (this->setup == 0)
00518e1d          return 0;
00518e1d      
00518e25      CPartArray::InitPals(this);
00518e2a      class IDClass<_tagDataID,32,0> ebp = arg2;
00518e2a      
00518e34      if (ebp != INVALID_DID.id)
00518e34      {
00518e42          int32_t i = 0;
00518e42          
00518e46          if (this->num_parts > 0)
00518e46          {
00518e87              do
00518e87              {
00518e53                  class Palette* ecx_1 = this->pals[i];
00518e58                  int32_t eax_6;
00518e58                  
00518e58                  if (ecx_1 == 0)
00518e58                  {
00518e61                      this->pals[i] = Palette::makeModifiedPalette(ebp, arg3);
00518e6a                      eax_6 = this->pals[i];
00518e7d                  label_518e7d:
00518e7d                      
00518e7f                      if (eax_6 != 0)
00518e7f                          break;
00518e58                  }
00518e58                  else if (ecx_1->m_DID.id == ebp)
00518e75                  {
00518e78                      eax_6 = Palette::Modify(ecx_1, arg3);
00518e78                      goto label_518e7d;
00518e75                  }
00518e84                  i += 1;
00518e87              } while (i < this->num_parts);
00518e46          }
00518e46          
00518e89          uint32_t num_parts = this->num_parts;
00518e89          
00518e8e          if (i != num_parts)
00518e8e          {
00518e90              int32_t i_1 = 0;
00518e90              
00518e94              if (num_parts > 0)
00518e94              {
00518ed4                  do
00518ed4                  {
00518e96                      class CPhysicsPart** parts = this->parts;
00518e96                      
00518eaa                      if (((parts[i_1] != 0 && this->pals[i] != 0) && *(uint32_t*)CPhysicsPart::GetOriginalPaletteID(parts[i_1], &arg2) == ebp))
00518ec9                          CPhysicsPart::UsePalette(this->parts[i_1], this->pals[i]);
00518ec9                      
00518ed1                      i_1 += 1;
00518ed4                  } while (i_1 < this->num_parts);
00518e94              }
00518e94              
00518edf              return 1;
00518e8e          }
00518e34      }
00518e34      
00518e3c      return 0;
00518e10  }

00518ee2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00518ef0  void __thiscall CPartArray::GetBoundingBox(class CPartArray const* this, class BBox* arg2)

00518ef0  {
00518efa      int32_t i = 0;
00518efa      
00518efe      if (this->num_parts > 0)
00518efe      {
00518fba          do
00518fba          {
00518f13              class CPhysicsPart* ecx = this->parts[i];
00518f13              
00518f1b              if (ecx != 0)
00518f1b              {
00518f21                  class BBox* eax_3 = CPhysicsPart::GetBoundingBox(ecx);
00518f28                  float x = eax_3->m_vMin.x;
00518f30                  float y_1 = eax_3->m_vMin.y;
00518f37                  float z = eax_3->m_vMin.z;
00518f3e                  float x_1 = eax_3->m_vMax.x;
00518f45                  float y = eax_3->m_vMax.y;
00518f4c                  float z_1 = eax_3->m_vMax.z;
00518f56                  void* ecx_2 = &this->parts[i];
00518f59                  void* eax_5 = *(uint32_t*)ecx_2;
00518f61                  x = ((float)(((long double)x) * ((long double)*(uint32_t*)((char*)eax_5 + 0x24))));
00518f6c                  float var_14_2 = ((float)(((long double)y_1) * ((long double)*(uint32_t*)((char*)eax_5 + 0x28))));
00518f77                  float var_10_2 = ((float)(((long double)z) * ((long double)*(uint32_t*)((char*)eax_5 + 0x2c))));
00518f81                  float var_c_2 = ((float)(((long double)x_1) * ((long double)*(uint32_t*)((char*)eax_5 + 0x24))));
00518f8c                  float var_8_2 = ((float)(((long double)y) * ((long double)*(uint32_t*)((char*)eax_5 + 0x28))));
00518f97                  float var_4_2 = ((float)(((long double)z_1) * ((long double)*(uint32_t*)((char*)eax_5 + 0x2c))));
00518fa5                  BBox::ConvertToGlobal(&x, (*(uint32_t*)ecx_2 + 0x30));
00518faf                  BBox::BuildBoundingBox(&x, arg2);
00518f1b              }
00518f1b              
00518fb7              i += 1;
00518fba          } while (i < this->num_parts);
00518efe      }
00518ef0  }

00518fc9                             90 90 90 90 90 90 90                                                           .......

00518fd0  void __thiscall Frame::combine(class Frame* this, class Frame const* arg2, class AFrame const* arg3, class AC1Legacy::Vector3 const* arg4)

00518fd0  {
00518fd9      float* eax = arg4;
00518fdd      long double x87_r7_1 = (((long double)arg3->m_fOrigin.x) * ((long double)*(uint32_t*)eax));
00518fe4      long double x87_r6_1 = (((long double)arg3->m_fOrigin.y) * ((long double)eax[1]));
00518ff0      long double x87_r5_1 = (((long double)arg3->m_fOrigin.z) * ((long double)eax[2]));
00518fe7      this->m_fOrigin.x = ((float)((((x87_r7_1 * ((long double)arg2->m_fl2gv[0])) + (x87_r5_1 * ((long double)arg2->m_fl2gv[6]))) + (x87_r6_1 * ((long double)arg2->m_fl2gv[3]))) + ((long double)arg2->m_fOrigin.x)));
00518fe7      this->m_fOrigin.y = ((float)((((x87_r7_1 * ((long double)arg2->m_fl2gv[1])) + (x87_r5_1 * ((long double)arg2->m_fl2gv[7]))) + (x87_r6_1 * ((long double)arg2->m_fl2gv[4]))) + ((long double)arg2->m_fOrigin.y)));
00518fe7      this->m_fOrigin.z = ((float)((((x87_r7_1 * ((long double)arg2->m_fl2gv[2])) + (x87_r5_1 * ((long double)arg2->m_fl2gv[8]))) + (x87_r6_1 * ((long double)arg2->m_fl2gv[5]))) + ((long double)arg2->m_fOrigin.z)));
005190da      Frame::set_rotate(this, ((float)((((((long double)arg3->qw) * ((long double)arg2->qw)) - (((long double)arg3->qx) * ((long double)arg2->qx))) - (((long double)arg3->qy) * ((long double)arg2->qy))) - (((long double)arg3->qz) * ((long double)arg2->qz)))), ((float)((((((long double)arg3->qx) * ((long double)arg2->qw)) + (((long double)arg3->qw) * ((long double)arg2->qx))) + (((long double)arg3->qz) * ((long double)arg2->qy))) - (((long double)arg3->qy) * ((long double)arg2->qz)))), ((float)((((((long double)arg2->qw) * ((long double)arg3->qy)) - (((long double)arg2->qx) * ((long double)arg3->qz))) + (((long double)arg3->qx) * ((long double)arg2->qz))) + (((long double)arg3->qw) * ((long double)arg2->qy)))), ((float)((((((long double)arg2->qw) * ((long double)arg3->qz)) + (((long double)arg2->qx) * ((long double)arg3->qy))) - (((long double)arg3->qx) * ((long double)arg2->qy))) + (((long double)arg3->qw) * ((long double)arg2->qz)))));
00518fd0  }

005190e7                       90 90 90 90 90 90 90 90 90                                                         .........

005190f0  void __thiscall CPartArray::UpdateParts(class CPartArray* this, class Frame const* arg2)

005190f0  {
005190f0      class CPartArray* this_1 = this;
005190f7      class AnimFrame* eax = CSequence::get_curr_animframe(&this->sequence);
005190fe      class AnimFrame* var_4 = eax;
005190fe      
00519102      if (eax != 0)
00519102      {
00519104          uint32_t num_parts = eax->num_parts;
00519108          uint32_t num_parts_1 = this->num_parts;
00519108          
0051910e          if (num_parts_1 > num_parts)
00519110              num_parts_1 = num_parts;
00519110          
00519112          int32_t esi_1 = 0;
00519112          
00519116          if (num_parts_1 > 0)
00519116          {
00519119              int32_t edi_1 = 0;
00519119              
00519138              while (true)
00519138              {
00519138                  Frame::combine(&this->parts[esi_1]->pos.frame, arg2, (eax->frame + edi_1), &this->scale);
0051913d                  esi_1 += 1;
0051913e                  edi_1 += 0x1c;
0051913e                  
00519143                  if (esi_1 >= num_parts_1)
00519143                      break;
00519143                  
0051911d                  eax = var_4;
00519138              }
00519116          }
00519102      }
005190f0  }

0051914d                                         90 90 90                                                               ...

00519150  int32_t __thiscall CPartArray::SetMeshID(class CPartArray* this, class IDClass<_tagDataID,32,0> arg2)

00519150  {
0051915d      if (arg2 == INVALID_DID.id)
00519162          return 0;
00519162      
00519167      class CSetup* eax_1 = CSetup::makeSimpleSetup(arg2);
00519167      
00519173      if (eax_1 != 0)
00519173      {
00519177          CPartArray::DestroyParts(this);
0051917c          class CSetup* setup = this->setup;
0051917c          
00519181          if (setup != 0)
00519181          {
00519183              setup->vtable->Release();
00519188              this->setup = nullptr;
00519181          }
00519181          
00519191          this->setup = eax_1;
00519191          
0051919b          if (CPartArray::InitParts(this) != 0)
005191a4              return 1;
00519173      }
00519173      
005191ab      return 0;
00519150  }

005191ae                                            90 90                                                                ..

005191b0  void __fastcall CPartArray::DestroyLights(class CPartArray* this)

005191b0  {
005191b3      class CPhysicsObj* owner = this->owner;
005191b3      
005191bf      if ((owner != 0 && this->lights != 0))
005191bf      {
005191cb          CPartArray::RemoveLightsFromCell(this, owner->cell);
005191d0          class LIGHTLIST* lights = this->lights;
005191d0          
005191d5          if (lights != 0)
005191d5          {
005191d7              class LIGHTOBJ* lightobj = lights->lightobj;
005191d7              
005191dc              if (lightobj != 0)
005191dc              {
005191e2                  operator delete[](((char*)lightobj - 4));
005191ea                  lights->lightobj = nullptr;
005191dc              }
005191dc              
005191f2              lights->num_lights = 0;
005191f8              operator delete(lights);
005191d5          }
005191d5          
00519200          this->lights = nullptr;
005191bf      }
005191b0  }

0051920a                                90 90 90 90 90 90                                                            ......

00519210  int32_t __thiscall CPartArray::DoObjDescChanges(class CPartArray* this, class ObjDesc* arg2)

00519210  {
0051921c      int32_t eax = 0;
00519220      int32_t ebx = 1;
00519220      
00519225      if (arg2->num_anim_part_changes > 0)
00519225      {
00519234          if (CPartArray::SetPart(this, arg2->firstAPChange) == 0)
00519236              ebx = 0;
00519236          
00519238          eax = 1;
00519225      }
00519225      
00519242      if (arg2->num_texture_map_changes > 0)
00519242      {
00519251          if (CPartArray::SetTextureMap(this, arg2->firstTMChange) == 0)
00519253              ebx = 0;
00519253          
00519255          eax = 1;
00519242      }
00519242      
0051925f      if (arg2->num_subpalettes > 0)
0051925f      {
00519272          if (CPartArray::SetPalette(this, arg2->paletteID.id, arg2->firstSubpal) == 0)
00519274              ebx = 0;
00519274          
00519272          goto label_51927e;
0051925f      }
0051925f      
0051927a      if (eax != 0)
0051927a      {
0051927e      label_51927e:
0051927e          int32_t eax_8 = CPartArray::InitObjDescChanges(this);
0051927e          
00519285          if (eax_8 == 0)
0051928a              return eax_8;
0051927a      }
0051927a      
00519292      return ebx;
00519210  }

00519295                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005192a0  void __fastcall CPartArray::Destroy(class CPartArray* this)

005192a0  {
005192a4      class MotionTableManager* motion_table_manager = this->motion_table_manager;
005192a4      
005192a9      if (motion_table_manager != 0)
005192a9      {
005192ad          MotionTableManager::~MotionTableManager(motion_table_manager);
005192b3          operator delete(motion_table_manager);
005192a9      }
005192a9      
005192bd      this->motion_table_manager = nullptr;
005192c4      CPartArray::DestroyPals(this);
005192cb      CPartArray::DestroyLights(this);
005192d2      CPartArray::DestroyParts(this);
005192d7      class CSetup* setup = this->setup;
005192d7      
005192dc      if (setup != 0)
005192dc      {
005192de          setup->vtable->Release();
005192e3          this->setup = nullptr;
005192dc      }
005192dc      
005192ef      this->pa_state = 0;
005192f5      this->owner = nullptr;
005192fc      DBObj::SetDID(&this->sequence, 0);
005192a0  }

00519304              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00519310  void __thiscall CPartArray::SetFrame(class CPartArray* this, class Frame const* arg2)

00519310  {
00519319      CPartArray::UpdateParts(this, arg2);
0051931e      class LIGHTLIST* lights = this->lights;
0051931e      
00519323      if (lights != 0)
00519326          LIGHTLIST::set_frame(lights, arg2);
00519310  }


00519330  int32_t __thiscall CPartArray::SetSetupID(class CPartArray* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

00519330  {
00519336      class CSetup* setup = this->setup;
00519336      
00519345      if ((setup == 0 || setup->m_DID.id != arg2))
00519345      {
00519354          void var_8;
00519354          class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 7));
00519354          
00519360          if (eax_1 == 0)
005193a7              return 0;
005193a7          
00519364          CPartArray::DestroyPals(this);
0051936b          CPartArray::DestroyLights(this);
00519372          CPartArray::DestroyParts(this);
00519377          class CSetup* setup_1 = this->setup;
00519377          
0051937c          if (setup_1 != 0)
0051937c          {
0051937e              setup_1->vtable->Release();
00519383              this->setup = nullptr;
0051937c          }
0051937c          
00519390          this->setup = eax_1;
00519390          
00519393          if ((arg3 != 0 && CPartArray::InitParts(this) == 0))
005193a7              return 0;
005193a7          
005193ac          CPartArray::InitLights(this);
005193b3          CPartArray::InitDefaults(this);
00519345      }
00519345      
005193c2      return 1;
00519330  }

005193c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005193d0  int32_t __thiscall CPartArray::SetPlacementFrame(class CPartArray* this, uint32_t arg2)

005193d0  {
005193d8      class CSetup* setup = this->setup;
005193f5      class HashBaseData<unsigned long>* hash_next = setup->placement_frames.buckets[(((arg2 >> ((int8_t)setup->placement_frames.key_shift)) ^ arg2) & setup->placement_frames.table_mask)];
005193fa      uint32_t var_c;
005193fa      
005193fa      if (hash_next == 0)
005193fa      {
00519424      label_519424:
00519424          hash_next = *(uint32_t*)setup->placement_frames.buckets;
00519424          
00519429          if (hash_next == 0)
00519429          {
00519445          label_519445:
00519445              CSequence::set_placement_frame(&this->sequence, nullptr, 0);
0051944e              return 0;
00519429          }
00519429          
00519435          while (hash_next->id != 0)
00519435          {
00519437              hash_next = hash_next->hash_next;
00519437              
0051943c              if (hash_next == 0)
0051943c                  goto label_519445;
00519435          }
00519435          
0051945a          if (hash_next == 0)
0051945a              goto label_519445;
0051945a          
0051945c          var_c = 0;
005193fa      }
005193fa      else
005193fa      {
00519403          while (arg2 != hash_next->id)
00519403          {
00519405              hash_next = hash_next->hash_next;
00519405              
0051940a              if (hash_next == 0)
0051940a                  goto label_519424;
00519403          }
00519403          
00519453          if (hash_next == 0)
00519453              goto label_519424;
00519453          
00519455          var_c = arg2;
005193fa      }
005193fa      
00519465      CSequence::set_placement_frame(&this->sequence, &hash_next[1], var_c);
00519471      return 1;
005193d0  }

0051942d                                         8d 49 00                                                               .I.
00519474                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00519480  int32_t __thiscall CPartArray::DoObjDescChangesFromDefault(class CPartArray* this, class ObjDesc* arg2)

00519480  {
00519488      if (this->setup != 0)
00519488      {
0051948e          int32_t i = 0;
0051948e          
00519492          if (this->num_parts > 0)
00519492          {
005194a9              do
005194a9              {
00519497                  class CPhysicsPart* ecx = this->parts[i];
00519497                  
0051949c                  if (ecx != 0)
0051949e                      CPhysicsPart::RestorePalette(ecx);
0051949e                  
005194a6                  i += 1;
005194a9              } while (i < this->num_parts);
00519492          }
00519488      }
00519488      
005194ae      CPartArray::DestroyPals(this);
005194ae      
005194b9      if (arg2 == 0)
005194cd          return 1;
005194cd      
005194c4      return CPartArray::DoObjDescChanges(this, arg2);
00519480  }


005194d0  void __fastcall CPartArray::~CPartArray(class CPartArray* this)

005194d0  {
005194d3      CPartArray::Destroy(this);
005194dc      /* tailcall */
005194dc      return CSequence::~CSequence(&this->sequence);
005194d0  }

005194e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005194f0  class CPartArray* CPartArray::CreateParticle(class CPhysicsObj* arg1, uint32_t arg2, class CSphere const* arg3)

005194f0  {
005194f5      void* result = operator new(0x78);
005194f5      
00519503      if (result != 0)
00519503      {
0051950e          *(uint32_t*)result = 0;
00519510          *(uint32_t*)((char*)result + 4) = 0;
00519513          CSequence::CSequence(((char*)result + 8));
00519518          *(uint32_t*)((char*)result + 0x50) = 0;
0051951b          *(uint32_t*)((char*)result + 0x54) = 0;
0051951e          *(uint32_t*)((char*)result + 0x58) = 0;
00519521          *(uint32_t*)((char*)result + 0x5c) = 0;
00519529          *(uint32_t*)((char*)result + 0x60) = 0x3f800000;
0051952c          *(uint32_t*)((char*)result + 0x64) = 0x3f800000;
0051952f          *(uint32_t*)((char*)result + 0x68) = 0x3f800000;
00519532          class IDClass<_tagDataID,32,0> eax = arg1;
00519536          *(uint32_t*)((char*)result + 0x6c) = 0;
00519539          *(uint32_t*)((char*)result + 0x70) = 0;
0051953c          *(uint32_t*)((char*)result + 0x74) = 0;
00519542          *(uint32_t*)((char*)result + 4) = eax;
00519545          DBObj::SetDID(((char*)result + 8), eax);
00519554          class CSetup* eax_2 = CSetup::makeParticleSetup(arg2, arg3);
0051955e          *(uint32_t*)((char*)result + 0x54) = eax_2;
0051955e          
00519561          if ((eax_2 != 0 && CPartArray::InitParts(result) != 0))
00519573              return result;
00519573          
00519576          CPartArray::Destroy(result);
0051957d          CSequence::~CSequence(((char*)result + 8));
00519583          operator delete(result);
00519503      }
00519503      
00519590      return 0;
005194f0  }

00519591                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005195a0  class CPartArray* CPartArray::CreateSetup(class CPhysicsObj* arg1, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

005195a0  {
005195a5      void* result = operator new(0x78);
005195a5      
005195b3      if (result != 0)
005195b3      {
005195ba          *(uint32_t*)result = 0;
005195bc          *(uint32_t*)((char*)result + 4) = 0;
005195bf          CSequence::CSequence(((char*)result + 8));
005195c4          *(uint32_t*)((char*)result + 0x50) = 0;
005195c7          *(uint32_t*)((char*)result + 0x54) = 0;
005195ca          *(uint32_t*)((char*)result + 0x58) = 0;
005195cd          *(uint32_t*)((char*)result + 0x5c) = 0;
005195d5          *(uint32_t*)((char*)result + 0x60) = 0x3f800000;
005195d8          *(uint32_t*)((char*)result + 0x64) = 0x3f800000;
005195db          *(uint32_t*)((char*)result + 0x68) = 0x3f800000;
005195de          class IDClass<_tagDataID,32,0> eax = arg1;
005195e2          *(uint32_t*)((char*)result + 0x6c) = 0;
005195e5          *(uint32_t*)((char*)result + 0x70) = 0;
005195e8          *(uint32_t*)((char*)result + 0x74) = 0;
005195ee          *(uint32_t*)((char*)result + 4) = eax;
005195f1          DBObj::SetDID(((char*)result + 8), eax);
005195f1          
0051960b          if (CPartArray::SetSetupID(result, arg2, arg3) != 0)
0051960b          {
0051960f              CPartArray::SetPlacementFrame(result, 0x65);
00519619              return result;
0051960b          }
0051960b          
0051961a          CPartArray::Destroy(result);
00519621          CSequence::~CSequence(((char*)result + 8));
00519627          operator delete(result);
005195b3      }
005195b3      
00519634      return 0;
005195a0  }

00519635                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00519640  class CPartArray* CPartArray::CreateMesh(class CPhysicsObj* arg1, class IDClass<_tagDataID,32,0> arg2)

00519640  {
00519645      void* result = operator new(0x78);
00519645      
00519653      if (result != 0)
00519653      {
0051965a          *(uint32_t*)result = 0;
0051965c          *(uint32_t*)((char*)result + 4) = 0;
0051965f          CSequence::CSequence(((char*)result + 8));
00519664          *(uint32_t*)((char*)result + 0x50) = 0;
00519667          *(uint32_t*)((char*)result + 0x54) = 0;
0051966a          *(uint32_t*)((char*)result + 0x58) = 0;
0051966d          *(uint32_t*)((char*)result + 0x5c) = 0;
00519675          *(uint32_t*)((char*)result + 0x60) = 0x3f800000;
00519678          *(uint32_t*)((char*)result + 0x64) = 0x3f800000;
0051967b          *(uint32_t*)((char*)result + 0x68) = 0x3f800000;
0051967e          class IDClass<_tagDataID,32,0> eax = arg1;
00519682          *(uint32_t*)((char*)result + 0x6c) = 0;
00519685          *(uint32_t*)((char*)result + 0x70) = 0;
00519688          *(uint32_t*)((char*)result + 0x74) = 0;
0051968e          *(uint32_t*)((char*)result + 4) = eax;
00519691          DBObj::SetDID(((char*)result + 8), eax);
00519691          
005196a6          if (CPartArray::SetMeshID(result, arg2) != 0)
005196a6          {
005196aa              CPartArray::SetPlacementFrame(result, 0x65);
005196b4              return result;
005196a6          }
005196a6          
005196b5          CPartArray::Destroy(result);
005196bc          CSequence::~CSequence(((char*)result + 8));
005196c2          operator delete(result);
00519653      }
00519653      
005196cf      return 0;
00519640  }


005196d0  enum DetectionType __thiscall DetectionManager::CheckDetection(class DetectionManager* this, class DetectionCylsphere* arg2, class CPhysicsObj* arg3)

005196d0  {
005196d3      class DetectionCylsphere* esi = arg2;
005196db      class CPhysicsObj* edi = arg3;
005196e6      arg2 = esi->radius;
005196ef      arg3 = ((float)Position::distance(&this->physobj->m_position, &edi->m_position));
005196f5      CPhysicsObj::GetRadius(edi);
005196fa      long double x87_r0;
005196fa      long double x87_r0_1 = (x87_r0 + ((long double)arg2));
005196fe      long double temp1 = ((long double)arg3);
005196fe      (x87_r0_1 - temp1);
00519707      int32_t object_detected = esi->object_detected;
00519707      
0051970a      if ((*(uint8_t*)((char*)((((x87_r0_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r0_1 == temp1) ? 1 : 0) << 0xe) | 0x800)))))[1] & 0x41) != 0)
0051970a      {
0051971f          if (object_detected != 0)
0051971f          {
00519722              esi->object_detected = 0;
0051972f              return 2;
0051971f          }
0051970a      }
0051970a      else if (object_detected == 0)
0051970e      {
00519716          esi->object_detected = 1;
0051971a          return object_detected;
0051970e      }
0051970e      
00519736      return 0;
005196d0  }

00519739                                                                             90 90 90 90 90 90 90                           .......

00519740  void __thiscall LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(class LongNIHashIter<DetectionCylsphere>* this, class LongNIHash<DetectionCylsphere>* arg2)

00519740  {
00519748      this->hash = arg2;
0051974a      this->bucketNo = 0xffffffff;
00519751      this->curDat = nullptr;
00519758      this->fDone = 0;
00519758      
0051975f      if (arg2 == 0)
0051975f      {
00519761          this->fDone = 1;
00519768          return;
0051975f      }
0051975f      
00519786      struct LongNIHashData* i;
00519786      
00519786      do
00519786      {
00519773          int32_t ecx_1 = (this->bucketNo + 1);
00519774          this->bucketNo = ecx_1;
00519774          
0051977a          if (ecx_1 >= arg2->table_size)
0051977a          {
0051978c              this->fDone = 1;
00519794              return;
0051977a          }
0051977a          
0051977e          i = arg2->buckets[ecx_1];
00519783          this->curDat = i;
00519786      } while (i == 0);
00519740  }

00519797                                                                       90 90 90 90 90 90 90 90 90                         .........

005197a0  void __fastcall LongNIHash<DetectionInfo>::destroy_contents(class LongNIHash<DetectionInfo>* this)

005197a0  {
005197a4      struct LongNIHashData** buckets = this->buckets;
005197a4      
005197af      if (buckets < &buckets[this->table_size])
005197af      {
005197f5          do
005197f5          {
005197b3              struct LongNIHashData* next_1 = *(uint32_t*)buckets;
005197b3              
005197b7              if (next_1 != 0)
005197b7              {
005197df                  struct LongNIHashData* next;
005197df                  
005197df                  do
005197df                  {
005197c0                      void* data = next_1->data;
005197c5                      next = next_1->next;
005197c5                      
005197c7                      if (data != 0)
005197ca                          operator delete(data);
005197ca                      
005197d3                      operator delete(next_1);
005197dd                      next_1 = next;
005197df                  } while (next != 0);
005197b7              }
005197b7              
005197e1              *(uint32_t*)buckets = nullptr;
005197ed              buckets = &buckets[1];
005197f5          } while (buckets < &this->buckets[this->table_size]);
005197af      }
005197a0  }

005197fc                                                                                      90 90 90 90                              ....

00519800  void __fastcall LongNIHash<DetectionCylsphere>::flush(class LongNIHash<DetectionCylsphere>* this)

00519800  {
00519807      struct LongNIHashData** buckets = this->buckets;
00519807      
0051980e      if (buckets < &buckets[this->table_size])
0051980e      {
0051983b          do
0051983b          {
00519811              struct LongNIHashData* next_1 = *(uint32_t*)buckets;
00519811              
00519815              if (next_1 != 0)
00519815              {
00519826                  struct LongNIHashData* next;
00519826                  
00519826                  do
00519826                  {
00519817                      next = next_1->next;
0051981a                      operator delete(next_1);
00519824                      next_1 = next;
00519826                  } while (next != 0);
00519815              }
00519815              
00519828              *(uint32_t*)buckets = nullptr;
00519833              buckets = &buckets[1];
0051983b          } while (buckets < &this->buckets[this->table_size]);
0051980e      }
00519800  }

00519841     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00519850  void __thiscall DetectionManager::FindCellList(class DetectionManager* this, class DetectionCylsphere* arg2, class CELLARRAY* arg3)

00519850  {
0051985f      int32_t var_10 = 0;
0051986f      int32_t var_c = 0;
00519883      int32_t var_8 = 0;
0051988a      float radius = arg2->radius;
00519895      arg3->do_not_load_cells = 1;
005198a7      CObjCell::find_cell_list(&this->physobj->m_position, &var_10, arg3, nullptr);
00519850  }

005198b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005198c0  int32_t __thiscall LongNIHash<DetectionInfo>::add(class LongNIHash<DetectionInfo>* this, class DetectionInfo* arg2, uint32_t arg3)

005198c0  {
005198d6      void* edi = &this->buckets[(COMBINE(0, ((arg3 >> 0x10) ^ arg3)) % this->table_size)];
005198d9      void* eax_4 = operator new(0xc);
005198d9      
005198e5      if (eax_4 == 0)
0051990d          return 0;
0051990d      
005198e7      *(uint32_t*)eax_4 = 0;
005198e9      *(uint32_t*)((char*)eax_4 + 4) = 0;
005198ec      *(uint32_t*)((char*)eax_4 + 8) = 0;
005198f3      *(uint32_t*)((char*)eax_4 + 8) = arg3;
005198f6      *(uint32_t*)((char*)eax_4 + 4) = arg2;
005198fb      *(uint32_t*)eax_4 = *(uint32_t*)edi;
005198fd      *(uint32_t*)edi = eax_4;
00519906      return 1;
005198c0  }


00519910  int32_t __thiscall DetectionManager::InitializeGlobalDetection(class DetectionManager* this, class DetectionCylsphere* arg2)

00519910  {
00519923      if ((this->detection_objects != 0 || this->cell_array != 0))
005199b3          return 0;
005199b3      
0051992b      void* eax_2 = operator new(8);
00519935      class LongNIHash<DetectionInfo>* eax_3;
00519935      
00519935      if (eax_2 == 0)
00519942          eax_3 = nullptr;
00519935      else
0051993b          eax_3 = LongNIHash<DetectionInfo>::LongNIHash<DetectionInfo>(eax_2, 0x20);
0051993b      
00519946      this->detection_objects = eax_3;
00519949      void* eax_4 = operator new(0x1c);
00519953      class CELLARRAY* eax_5;
00519953      
00519953      if (eax_4 == 0)
0051995e          eax_5 = nullptr;
00519953      else
00519957          eax_5 = CELLARRAY::CELLARRAY(eax_4);
00519957      
0051996a      this->cell_array = eax_5;
0051996d      DetectionManager::FindCellList(this, arg2, eax_5);
0051996d      
0051997c      if (this->cell_array->num_cells > 0)
0051997c      {
0051997e          int32_t i = 0;
0051997e          
005199a3          do
005199a3          {
00519986              class CObjCell* cell = this->cell_array->cells.data[i].cell;
00519986              
0051998c              if (cell != 0)
00519995                  CObjCell::add_voyeur(cell, this->physobj->id, arg2);
00519995              
005199a0              i += 1;
005199a3          } while (i < this->cell_array->num_cells);
0051997c      }
0051997c      
005199ad      return 1;
00519910  }

005199b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005199c0  void __thiscall DetectionManager::ReceiveDetectionUpdate(class DetectionManager* this, class DetectionInfo const* arg2)

005199c0  {
005199c3      class LongNIHash<DetectionInfo>* detection_objects = this->detection_objects;
005199c3      
005199c8      if (detection_objects != 0)
005199c8      {
005199d4          uint32_t object_id_1 = arg2->object_id;
005199e4          void** edx_3 = detection_objects->buckets[(COMBINE(0, ((object_id_1 >> 0x10) ^ object_id_1)) % detection_objects->table_size)];
005199e4          
005199e9          if (edx_3 == 0)
005199e9          {
00519a74          label_519a74:
00519a74              void* eax_11 = operator new(8);
00519a74              
00519a7e              if (eax_11 == 0)
00519a8f                  eax_11 = nullptr;
00519a7e              else
00519a7e              {
00519a80                  *(uint32_t*)eax_11 = 0;
00519a86                  *(uint32_t*)((char*)eax_11 + 4) = 0;
00519a7e              }
00519a7e              
00519a91              uint32_t object_id = arg2->object_id;
00519a93              *(uint32_t*)eax_11 = object_id;
00519a99              *(uint32_t*)((char*)eax_11 + 4) = arg2->object_status;
00519aa0              LongNIHash<DetectionInfo>::add(this->detection_objects, eax_11, object_id);
00519aa5              this->num_pending_global_detect_updates += 1;
005199e9          }
005199e9          else
005199e9          {
005199f2              while (edx_3[2] != object_id_1)
005199f2              {
005199f4                  edx_3 = *(uint32_t*)edx_3;
005199f4                  
005199f8                  if (edx_3 == 0)
005199f8                      goto label_519a74;
005199f2              }
005199f2              
005199ff              void* edx_4 = edx_3[1];
005199ff              
00519a04              if (edx_4 == 0)
00519a04                  goto label_519a74;
00519a04              
00519a0e              if (arg2->object_status != EnteredDetection)
00519a0e              {
00519a45                  if (*(uint32_t*)((char*)edx_4 + 4) != 1)
00519a45                  {
00519a5e                      *(uint32_t*)((char*)edx_4 + 4) = 2;
00519a6b                      this->num_pending_global_detect_updates += 1;
00519a6f                      return;
00519a45                  }
00519a45                  
00519a48                  LongNIHash<DetectionCylsphere>::remove(detection_objects, object_id_1);
00519a4d                  uint32_t num_pending_global_detect_updates_1 = this->num_pending_global_detect_updates;
00519a4d                  
00519a52                  if (num_pending_global_detect_updates_1 > 0)
00519a57                      this->num_pending_global_detect_updates = (num_pending_global_detect_updates_1 - 1);
00519a0e              }
00519a0e              else
00519a0e              {
00519a14                  if (*(uint32_t*)((char*)edx_4 + 4) != 2)
00519a14                  {
00519a32                      *(uint32_t*)((char*)edx_4 + 4) = 1;
00519a3b                      this->num_pending_global_detect_updates += 1;
00519a3f                      return;
00519a14                  }
00519a14                  
00519a16                  *(uint32_t*)((char*)edx_4 + 4) = 0;
00519a1d                  uint32_t num_pending_global_detect_updates = this->num_pending_global_detect_updates;
00519a1d                  
00519a22                  if (num_pending_global_detect_updates > 0)
00519a2b                      this->num_pending_global_detect_updates = (num_pending_global_detect_updates - 1);
00519a0e              }
005199e9          }
005199c8      }
005199c0  }

00519aae                                            90 90                                                                ..

00519ab0  void __thiscall DetectionManager::UpdateCellList(class DetectionManager* this, class DetectionCylsphere* arg2)

00519ab0  {
00519ac0      if (this->cell_array == 0)
00519ac3          DetectionManager::InitializeGlobalDetection(this, arg2);
00519ac3      
00519acd      if ((this->cell_array != 0 || this->cell_array != 0))
00519acd      {
00519adf          class AC1Legacy::Vector3* eax_4;
00519adf          long double st0_1;
00519adf          eax_4 = Position::distance(&this->last_global_update, &this->physobj->m_position);
00519ae4          long double temp1_1 = ((long double)5f);
00519ae4          (st0_1 - temp1_1);
00519aea          eax_4 = ((((st0_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00519aec          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00519aec          
00519aef          if (p_1)
00519aef          {
00519af5              class CPhysicsObj* physobj = this->physobj;
00519ad9              this->last_global_update.objcell_id = physobj->m_position.objcell_id;
00519b07              Frame::operator=(&this->last_global_update.frame, &physobj->m_position.frame);
00519b10              void var_1c;
00519b10              CELLARRAY::CELLARRAY(&var_1c);
00519b1d              DetectionManager::FindCellList(this, arg2, &var_1c);
00519b26              int32_t edi_2 = 0;
00519b2a              int32_t var_14;
00519b2a              void* var_10;
00519b2a              
00519b2a              if (var_14 > 0)
00519b2a              {
00519b4f                  do
00519b4f                  {
00519b34                      class CObjCell* ecx_5 = *(uint32_t*)(((char*)var_10 + (edi_2 << 3)) + 4);
00519b34                      
00519b3a                      if (ecx_5 != 0)
00519b43                          CObjCell::add_voyeur(ecx_5, this->physobj->id, arg2);
00519b43                      
00519b4c                      edi_2 += 1;
00519b4f                  } while (edi_2 < var_14);
00519b2a              }
00519b2a              
00519b51              class CELLARRAY* cell_array = this->cell_array;
00519b57              int32_t i = 0;
00519b57              
00519b5b              if (cell_array->num_cells > 0)
00519b5b              {
00519b8a                  do
00519b8a                  {
00519b67                      class CObjCell* eax_12 = CObjCell::GetVisible(cell_array->cells.data[i].cell_id);
00519b67                      
00519b71                      if (eax_12 != 0)
00519b7c                          CObjCell::remove_voyeur(eax_12, this->physobj->id, arg2);
00519b7c                      
00519b81                      cell_array = this->cell_array;
00519b87                      i += 1;
00519b8a                  } while (i < cell_array->num_cells);
00519b5b              }
00519b5b              
00519b8c              class CELLARRAY* cell_array_1 = this->cell_array;
00519b8f              cell_array_1->num_cells = 0;
00519b96              cell_array_1->added_outside = 0;
00519b9c              cell_array_1->do_not_load_cells = 0;
00519ba7              int32_t edi_3 = 0;
00519ba7              
00519bab              if (var_14 > 0)
00519bab              {
00519bc9                  do
00519bc9                  {
00519bbd                      CELLARRAY::add_cell(this->cell_array, *(uint32_t*)((char*)var_10 + (edi_3 << 3)), nullptr);
00519bc6                      edi_3 += 1;
00519bc9                  } while (edi_3 < var_14);
00519bab              }
00519bab              
00519bd1              if (var_10 != 0)
00519bd7                  operator delete[](((char*)var_10 - 4));
00519aef          }
00519acd      }
00519ab0  }

00519be8                          90 90 90 90 90 90 90 90                                                          ........

00519bf0  void __thiscall DetectionManager::ReportGlobalDetection(class DetectionManager* this, uint32_t arg2)

00519bf0  {
00519bff      int32_t* var_10;
00519bff      LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, this->detection_objects);
00519c04      int32_t i_1;
00519c04      int32_t i = i_1;
00519c04      
00519c0a      if (i == 0)
00519c0a      {
00519c11          int32_t var_c;
00519c11          int32_t ebx_1 = var_c;
00519c16          int32_t* ebp_1 = var_10;
00519c1c          void** j_1;
00519c1c          void** j = j_1;
00519c1c          
00519ca7          do
00519ca7          {
00519c22              uint32_t* esi_1;
00519c22              
00519c22              if (j == 0)
00519c29                  esi_1 = nullptr;
00519c22              else
00519c24                  esi_1 = j[1];
00519c24              
00519c2d              if (i == 0)
00519c2d              {
00519c33                  for (j = *(uint32_t*)j; j == 0; j = *(uint32_t*)(*(uint32_t*)ebp_1 + (ebx_1 << 2)))
00519c33                  {
00519c38                      ebx_1 += 1;
00519c38                      
00519c3b                      if (ebx_1 >= ebp_1[1])
00519c3b                      {
00519c45                          i_1 = 1;
00519c45                          break;
00519c3b                      }
00519c33                  }
00519c2d              }
00519c2d              
00519c4d              int32_t eax_2 = esi_1[1];
00519c4d              
00519c51              if (eax_2 == 1)
00519c75                  NoticeHandler::RecvNotice_DisplayWeenieError(*(uint32_t*)this, arg2, esi_1);
00519c51              else if (eax_2 == 2)
00519c62                  NoticeHandler::RecvNotice_DisplayWeenieError(this->physobj, arg2, esi_1);
00519c62              
00519c7e              if (esi_1[1] != 2)
00519c9a                  esi_1[1] = 0;
00519c7e              else
00519c7e              {
00519c8a                  LongNIHash<DetectionCylsphere>::remove(this->detection_objects, *(uint32_t*)esi_1);
00519c90                  operator delete(esi_1);
00519c7e              }
00519c7e              
00519ca1              i = i_1;
00519ca7          } while (i == 0);
00519c0a      }
00519bf0  }

00519cb7                                                                       90 90 90 90 90 90 90 90 90                         .........

00519cc0  void __thiscall DetectionManager::CleanupGlobalDetection(class DetectionManager* this, class DetectionCylsphere const* arg2)

00519cc0  {
00519cc4      class LongNIHash<DetectionInfo>* detection_objects = this->detection_objects;
00519cc4      
00519ccc      if (detection_objects != 0)
00519ccc      {
00519cce          LongNIHash<DetectionInfo>::destroy_contents(detection_objects);
00519cd3          class LongNIHash<DetectionInfo>* detection_objects_1 = this->detection_objects;
00519cd3          
00519cd8          if (detection_objects_1 != 0)
00519cd8          {
00519cdc              LongNIHash<DetectionCylsphere>::flush(detection_objects_1);
00519ce4              operator delete[](detection_objects_1->buckets);
00519cea              detection_objects_1->buckets = 0;
00519cec              operator delete(detection_objects_1);
00519cd8          }
00519cd8          
00519cf4          this->detection_objects = nullptr;
00519cf7          this->num_pending_global_detect_updates = 0;
00519ccc      }
00519ccc      
00519cfa      class CELLARRAY* cell_array = this->cell_array;
00519cfa      
00519cff      if (cell_array != 0)
00519cff      {
00519d04          int32_t i = 0;
00519d04          
00519d08          if (cell_array->num_cells > 0)
00519d08          {
00519d3d              do
00519d3d              {
00519d1a                  class CObjCell* eax_3 = CObjCell::GetVisible(this->cell_array->cells.data[i].cell_id);
00519d1a                  
00519d24                  if (eax_3 != 0)
00519d2f                      CObjCell::remove_voyeur(eax_3, this->physobj->id, arg2);
00519d2f                  
00519d3a                  i += 1;
00519d3d              } while (i < this->cell_array->num_cells);
00519d08          }
00519d08          
00519d40          class CELLARRAY* cell_array_1 = this->cell_array;
00519d40          
00519d45          if (cell_array_1 != 0)
00519d45          {
00519d47              class CELLINFO* data = cell_array_1->cells.data;
00519d47              
00519d4c              if (data != 0)
00519d52                  operator delete[](((char*)data - 4));
00519d52              
00519d5b              cell_array_1->cells.data = 0;
00519d5e              operator delete(cell_array_1);
00519d45          }
00519d45          
00519d66          this->cell_array = nullptr;
00519cff      }
00519cc0  }

00519d6f                                               90                                                                 .

00519d70  void __fastcall DetectionManager::ClearPendingDeletions(class DetectionManager* this)

00519d70  {
00519d74      uint32_t m_num_1 = this->pending_deletions.m_num;
00519d77      int32_t edi = (m_num_1 - 1);
00519d77      
00519d78      if ((m_num_1 - 1) >= 0)
00519d78      {
00519dc5          int32_t temp1_1;
00519dc5          
00519dc5          do
00519dc5          {
00519d89              class DetectionCylsphere* eax_2 = LongNIHash<DetectionCylsphere>::remove(&this->detection_table, this->pending_deletions.m_data[edi]);
00519d89              
00519d92              if (eax_2 != 0)
00519d92              {
00519d99                  if (eax_2->info.object_id == 0)
00519d9e                      DetectionManager::CleanupGlobalDetection(this, eax_2);
00519d9e                  
00519da4                  operator delete(eax_2);
00519d92              }
00519d92              
00519dac              uint32_t m_num = this->pending_deletions.m_num;
00519dac              
00519db1              if (edi < m_num)
00519db1              {
00519db6                  this->pending_deletions.m_num = (m_num - 1);
00519db6                  
00519db9                  if (edi != (m_num - 1))
00519db9                  {
00519dbb                      uint32_t* m_data = this->pending_deletions.m_data;
00519dc1                      m_data[edi] = m_data[(m_num - 1)];
00519db9                  }
00519db1              }
00519db1              
00519dc4              temp1_1 = edi;
00519dc4              edi -= 1;
00519dc5          } while ((temp1_1 - 1) >= 0);
00519d78      }
00519d70  }

00519dcc                                      90 90 90 90                                                              ....

00519dd0  void __thiscall DetectionManager::CheckDetection(class DetectionManager* this, class DetectionCylsphere* arg2)

00519dd0  {
00519dd6      uint32_t object_id = arg2->info.object_id;
00519dd6      
00519de1      if (object_id == 0)
00519de1      {
00519e37          DetectionManager::UpdateCellList(this, arg2);
00519e41          DetectionManager::ReportGlobalDetection(this, arg2->context_id);
00519e46          this->num_pending_global_detect_updates = 0;
00519e46          return;
00519de1      }
00519de1      
00519de4      class CPhysicsObj* eax = CPhysicsObj::GetObjectA(object_id);
00519dee      int32_t eax_2;
00519dee      uint32_t context_id;
00519dee      
00519dee      if (eax == 0)
00519dee      {
00519e13          arg2->info.object_status = LeftDetection;
00519e1a          enum DetectionType object_status_1 = arg2->info.object_status;
00519e1d          eax_2 = (object_status_1 - 1);
00519e1e          context_id = arg2->context_id;
00519e1e          
00519e20          if (object_status_1 == EnteredDetection)
00519e20          {
00519e08              NoticeHandler::RecvNotice_DisplayWeenieError(this->physobj, context_id, &arg2->info.object_id);
00519e10              return;
00519e20          }
00519dee      }
00519dee      else
00519dee      {
00519df9          arg2->info.object_status = DetectionManager::CheckDetection(this, arg2, eax);
00519dfc          enum DetectionType object_status = arg2->info.object_status;
00519dff          eax_2 = (object_status - 1);
00519e00          context_id = arg2->context_id;
00519e00          
00519e02          if (object_status == EnteredDetection)
00519e02          {
00519e08              NoticeHandler::RecvNotice_DisplayWeenieError(this->physobj, context_id, &arg2->info.object_id);
00519e10              return;
00519e02          }
00519dee      }
00519dee      
00519e23      if (eax_2 == 1)
00519e29          NoticeHandler::RecvNotice_DisplayWeenieError(this->physobj, context_id, &arg2->info);
00519dd0  }

00519e53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00519e60  void __fastcall DetectionManager::~DetectionManager(class DetectionManager* this)

00519e60  {
00519e65      class DetectionManager* this_1 = this;
00519e67      class DetectionManager* this_2 = this_1;
00519e6b      DetectionManager::ClearPendingDeletions(this);
00519e78      int32_t* var_10;
00519e78      LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, &this_1->detection_table);
00519e83      int32_t var_4;
00519e83      
00519e83      if (var_4 == 0)
00519e83      {
00519e85          void** i_1;
00519e85          void** i = i_1;
00519e8c          int32_t var_c;
00519e8c          int32_t ebx_1 = var_c;
00519e91          int32_t* ebp_1 = var_10;
00519e91          
00519e95          if (i == 0)
00519e95              goto label_519ebc;
00519e95          
00519ec2          do
00519ec2          {
00519e97              class DetectionCylsphere* edi = i[1];
00519e97              
00519e9c              if (edi != 0)
00519e9c              {
00519ea3                  if (edi->info.object_id == 0)
00519eaa                      DetectionManager::CleanupGlobalDetection(this_2, edi);
00519eaa                  
00519eb0                  operator delete(edi);
00519e9c              }
00519e9c              
00519eb8              this_1 = this_2;
00519ebc          label_519ebc:
00519ebc              i = *(uint32_t*)i;
00519ec0          label_519ec0:
00519ec2          } while (i != 0);
00519ec2          
00519ec7          ebx_1 += 1;
00519ec7          
00519eca          if (ebx_1 < ebp_1[1])
00519eca          {
00519ecf              i = *(uint32_t*)(*(uint32_t*)ebp_1 + (ebx_1 << 2));
00519ed2              goto label_519ec0;
00519eca          }
00519e83      }
00519e83      
00519eda      operator delete[](this_1->pending_deletions.m_data);
00519ee7      LongNIHash<DetectionCylsphere>::flush(&this_1->detection_table);
00519eef      operator delete[](this_1->detection_table.buckets);
00519edf      this_1->detection_table.buckets = 0;
00519efd      this_1->last_global_update.vtable = 0x79285c;
00519e60  }

00519f0a                                90 90 90 90 90 90                                                            ......

00519f10  int32_t __thiscall DetectionManager::DestroyDetectionCylsphere(class DetectionManager* this, uint32_t arg2)

00519f10  {
00519f24      void** edx_2 = this->detection_table.buckets[(COMBINE(0, ((arg2 >> 0x10) ^ arg2)) % this->detection_table.table_size)];
00519f24      
00519f29      if (edx_2 != 0)
00519f29      {
00519f2e          while (edx_2[2] != arg2)
00519f2e          {
00519f30              edx_2 = *(uint32_t*)edx_2;
00519f30              
00519f34              if (edx_2 == 0)
00519f7f                  return 0;
00519f2e          }
00519f2e          
00519f40          if (edx_2[1] != 0)
00519f40          {
00519f42              uint32_t m_size = this->pending_deletions.m_size;
00519f4c              int32_t eax_6;
00519f4c              
00519f4c              if (this->pending_deletions.m_num >= m_size)
00519f4c              {
00519f50                  uint32_t eax_5;
00519f50                  
00519f50                  if (m_size <= 0)
00519f56                      eax_5 = 8;
00519f50                  else
00519f52                      eax_5 = (m_size * 2);
00519f52                  
00519f5e                  eax_6 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->pending_deletions, eax_5);
00519f4c              }
00519f4c              
00519f65              if ((this->pending_deletions.m_num < m_size || eax_6 != 0))
00519f65              {
00519f46                  this->pending_deletions.m_data[this->pending_deletions.m_num] = arg2;
00519f46                  this->pending_deletions.m_num += 1;
00519f65              }
00519f65              
00519f79              return 1;
00519f40          }
00519f29      }
00519f29      
00519f7f      return 0;
00519f10  }

00519f82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00519f90  void __fastcall DetectionManager::CheckDetection(class DetectionManager* this)

00519f90  {
00519f9a      DetectionManager::ClearPendingDeletions(this);
00519fa5      long double x87_r7_1 = (((long double)PhysicsTimer::curr_time) - ((long double)this->last_update_time));
00519fa8      long double temp0 = ((long double)1.0);
00519fa8      (x87_r7_1 - temp0);
00519fae      int32_t eax;
00519fae      eax = ((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0))));
00519fb0      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00519fb0      
00519fb3      if (p)
00519fb3      {
00519fbe          int32_t* var_10;
00519fbe          LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, &this->detection_table);
00519fc3          int32_t i_1;
00519fc3          int32_t i = i_1;
00519fc3          
00519fc9          if (i == 0)
00519fc9          {
00519fcb              void** j_1;
00519fcb              void** j = j_1;
00519fd0              int32_t* ebx_1 = var_10;
00519fd5              int32_t var_c;
00519fd5              int32_t edi_1 = var_c;
00519fd5              
0051a015              do
0051a015              {
00519fe2                  class DetectionCylsphere* eax_2;
00519fe2                  
00519fe2                  if (j == 0)
00519fe9                      eax_2 = nullptr;
00519fe2                  else
00519fe4                      eax_2 = j[1];
00519fe4                  
00519fed                  if (i == 0)
00519fed                  {
00519ff3                      for (j = *(uint32_t*)j; j == 0; j = *(uint32_t*)(*(uint32_t*)ebx_1 + (edi_1 << 2)))
00519ff3                      {
00519ff8                          edi_1 += 1;
00519ff8                          
00519ffb                          if (edi_1 >= ebx_1[1])
00519ffb                          {
0051a004                              i = 1;
0051a004                              break;
00519ffb                          }
00519ff3                      }
00519fed                  }
00519fed                  
0051a00e                  DetectionManager::CheckDetection(this, eax_2);
0051a015              } while (i == 0);
00519fc9          }
00519fc9          
0051a028          this->last_update_time = (*(uint32_t*)PhysicsTimer::curr_time);
0051a02b          *(uint32_t*)((char*)this->last_update_time)[4] = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
00519fb3      }
00519f90  }

0051a034                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0051a040  void __thiscall DArray<ObjectInfo>::grow(class DArray<ObjectInfo>* this, uint32_t arg2)

0051a040  {
0051a04b      if (arg2 <= this->sizeOf)
0051a04b      {
0051a04e          DArray<ObjectInfo>::shrink(this, arg2);
0051a055          return;
0051a04b      }
0051a04b      
0051a061      void* eax_1 = operator new[]((arg2 << 3));
0051a06e      int32_t i = 0;
0051a06e      
0051a072      if (this->sizeOf > 0)
0051a072      {
0051a08a          do
0051a08a          {
0051a074              class ObjectInfo* data = this->data;
0051a079              *(uint32_t*)((char*)eax_1 + (i << 3)) = data[i].object_id;
0051a080              *(uint32_t*)(((char*)eax_1 + (i << 3)) + 4) = data[i].hit_location;
0051a087              i += 1;
0051a08a          } while (i < this->sizeOf);
0051a072      }
0051a072      
0051a08f      operator delete[](this->data);
0051a097      this->data = eax_1;
0051a09a      this->sizeOf = arg2;
0051a040  }

0051a0a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0051a0b0  void __thiscall DArray<ObjectInfo>::shrink(class DArray<ObjectInfo>* this, uint32_t arg2)

0051a0b0  {
0051a0bd      if (arg2 > this->sizeOf)
0051a0bd      {
0051a0c0          DArray<ObjectInfo>::grow(this, arg2);
0051a0c7          return;
0051a0bd      }
0051a0bd      
0051a0cc      if (arg2 != 0)
0051a0cc      {
0051a0e9          void* eax_1 = operator new[]((arg2 << 3));
0051a0f3          int32_t i = 0;
0051a0f7          this->sizeOf = arg2;
0051a0f7          
0051a0fa          if (arg2 > 0)
0051a0fa          {
0051a116              do
0051a116              {
0051a100                  class ObjectInfo* data_1 = this->data;
0051a105                  *(uint32_t*)((char*)eax_1 + (i << 3)) = data_1[i].object_id;
0051a10c                  *(uint32_t*)(((char*)eax_1 + (i << 3)) + 4) = data_1[i].hit_location;
0051a113                  i += 1;
0051a116              } while (i < this->sizeOf);
0051a0fa          }
0051a0fa          
0051a11b          operator delete[](this->data);
0051a123          this->data = eax_1;
0051a0cc      }
0051a0cc      else
0051a0cc      {
0051a0ce          class ObjectInfo* data = this->data;
0051a0d1          this->sizeOf = arg2;
0051a0d4          operator delete[](data);
0051a0dc          this->data = arg2;
0051a0cc      }
0051a0cc      
0051a129      if (this->next_available > arg2)
0051a12b          this->next_available = arg2;
0051a0b0  }

0051a133                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0051a140  void __thiscall AttackInfo::AttackInfo(class AttackInfo* this, uint32_t arg2, int32_t arg3, float arg4)

0051a140  {
0051a149      uint32_t* this_1 = this;
0051a151      *(uint32_t*)this_1 = arg2;
0051a153      this_1[1] = arg3;
0051a156      this_1[2] = arg4;
0051a159      this_1[3] = 0;
0051a160      this_1[4] = 0;
0051a16c      this_1[5] = operator new[](0x20);
0051a174      this_1[8] = 4;
0051a177      this_1[6] = 4;
0051a17d      this_1[7] = 0;
0051a140  }

0051a18a                                90 90 90 90 90 90                                                            ......

0051a190  void __thiscall AttackInfo::AddObject(class AttackInfo* this, uint32_t arg2, uint32_t arg3)

0051a190  {
0051a194      uint32_t num_objects = this->num_objects;
0051a197      int32_t i = 0;
0051a197      
0051a1a0      if (num_objects > 0)
0051a1a0      {
0051a1a2          int32_t* data = this->object_list.data;
0051a1a2          
0051a1b2          do
0051a1b2          {
0051a1a7              if (arg2 == *(uint32_t*)data)
0051a1e4                  return;
0051a1e4              
0051a1ac              i += 1;
0051a1ad              data = &data[2];
0051a1b2          } while (i < this->num_objects);
0051a1a0      }
0051a1a0      
0051a1b4      uint32_t sizeOf = this->object_list.sizeOf;
0051a1b4      
0051a1b9      if (num_objects >= sizeOf)
0051a1c2          DArray<ObjectInfo>::grow(&this->object_list, (sizeOf + 4));
0051a1c2      
0051a1ca      this->object_list.data[this->num_objects].object_id = arg2;
0051a1d3      this->object_list.data[this->num_objects].hit_location = arg3;
0051a1de      this->num_objects += 1;
0051a190  }

0051a1e7                       90 90 90 90 90 90 90 90 90                                                         .........

0051a1f0  void __fastcall AttackManager::AttackManager(class AttackManager* this)

0051a1f0  {
0051a1f6      this->attack_radius = 0;
0051a1f8      this->current_attack = 0;
0051a1fd      this->pending_attacks.buckets = 0;
0051a200      this->pending_attacks.table_size = 2;
0051a207      void* s = operator new[](8);
0051a20f      int32_t ecx_1 = (this->pending_attacks.table_size << 2);
0051a219      this->pending_attacks.buckets = s;
0051a228      __builtin_memset(__builtin_memset(s, 0, ((ecx_1 >> 2) << 2)), 0, (ecx_1 & 3));
0051a1f0  }

0051a22f                                               90                                                                 .

0051a230  void __fastcall AttackManager::~AttackManager(class AttackManager* this)

0051a230  {
0051a234      class LongNIHash<AttackInfo>* esi = &this->pending_attacks;
0051a240      int32_t* var_10;
0051a240      LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, esi);
0051a24b      int32_t var_4;
0051a24b      
0051a24b      if (var_4 == 0)
0051a24b      {
0051a24d          void** i_1;
0051a24d          void** i = i_1;
0051a254          int32_t var_c;
0051a254          int32_t ebx_1 = var_c;
0051a259          int32_t* ebp_1 = var_10;
0051a259          
0051a25e          if (i == 0)
0051a25e              goto label_51a280;
0051a25e          
0051a284          do
0051a284          {
0051a260              void* edi_1 = i[1];
0051a260              
0051a265              if (edi_1 != 0)
0051a265              {
0051a26b                  operator delete[](*(uint32_t*)((char*)edi_1 + 0x14));
0051a271                  *(uint32_t*)((char*)edi_1 + 0x14) = 0;
0051a278                  operator delete(edi_1);
0051a265              }
0051a265              
0051a280          label_51a280:
0051a280              i = *(uint32_t*)i;
0051a282          label_51a282:
0051a284          } while (i != 0);
0051a284          
0051a289          ebx_1 += 1;
0051a289          
0051a28c          if (ebx_1 < ebp_1[1])
0051a28c          {
0051a291              i = *(uint32_t*)(*(uint32_t*)ebp_1 + (ebx_1 << 2));
0051a294              goto label_51a282;
0051a28c          }
0051a24b      }
0051a24b      
0051a29f      LongNIHash<DetectionCylsphere>::flush(esi);
0051a2a7      operator delete[](esi->buckets);
0051a2af      esi->buckets = 0;
0051a230  }

0051a2ba                                                                                90 90 90 90 90 90                            ......

0051a2c0  class AttackInfo* __thiscall AttackManager::NewAttack(class AttackManager* this, int32_t arg2)

0051a2c0  {
0051a2c8      void* eax = operator new(0x24);
0051a2d2      int32_t result;
0051a2d2      
0051a2d2      if (eax == 0)
0051a2eb          result = 0;
0051a2d2      else
0051a2e7          result = AttackInfo::AttackInfo(eax, this->current_attack, arg2, this->attack_radius);
0051a2e7      
0051a2ed      uint32_t current_attack = this->current_attack;
0051a301      void* ebx = &this->pending_attacks.buckets[(COMBINE(0, ((current_attack >> 0x10) ^ current_attack)) % this->pending_attacks.table_size)];
0051a304      void* eax_6 = operator new(0xc);
0051a304      
0051a310      if (eax_6 != 0)
0051a310      {
0051a312          *(uint32_t*)eax_6 = 0;
0051a314          *(uint32_t*)((char*)eax_6 + 4) = 0;
0051a317          *(uint32_t*)((char*)eax_6 + 8) = 0;
0051a31a          *(uint32_t*)((char*)eax_6 + 4) = result;
0051a31d          *(uint32_t*)((char*)eax_6 + 8) = current_attack;
0051a322          *(uint32_t*)eax_6 = *(uint32_t*)ebx;
0051a324          *(uint32_t*)ebx = eax_6;
0051a310      }
0051a310      
0051a32b      this->current_attack += 1;
0051a333      return result;
0051a2c0  }

0051a336                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0051a340  void __thiscall AttackManager::AttackDone(class AttackManager* this, class AttackInfo* arg2)

0051a340  {
0051a34b      LongNIHash<DetectionCylsphere>::remove(&this->pending_attacks, arg2->attack_id);
0051a354      operator delete[](arg2->object_list.data);
0051a35a      arg2->object_list.data = 0;
0051a361      operator delete(arg2);
0051a340  }

0051a36d                                         90 90 90                                                               ...

0051a370  void __thiscall TargetManager::TargetManager(class TargetManager* this, class CPhysicsObj* arg2)

0051a370  {
0051a376      this->physobj = arg2;
0051a37a      this->target_info = nullptr;
0051a37d      this->voyeur_table = nullptr;
0051a380      this->last_update_time = 0f;
0051a383      *(uint32_t*)((char*)this->last_update_time)[4] = 0;
0051a370  }

0051a389                             90 90 90 90 90 90 90                                                           .......

0051a390  void __thiscall LongNIHash<DetectionInfo>::LongNIHash<DetectionInfo>(class LongNIHash<DetectionInfo>* this, int32_t arg2)

0051a390  {
0051a397      this->table_size = arg2;
0051a39f      this->buckets = 0;
0051a3a5      void* s = operator new[]((arg2 << 2));
0051a3ad      int32_t ecx_1 = (this->table_size << 2);
0051a3b7      this->buckets = s;
0051a3c5      __builtin_memset(__builtin_memset(s, 0, ((ecx_1 >> 2) << 2)), 0, (ecx_1 & 3));
0051a390  }

0051a3ce                                            90 90                                                                ..

0051a3d0  class LongNIHashIter<TargettedVoyeurInfo>* __fastcall LongNIHashIter<TargettedVoyeurInfo>::operator++(class LongNIHashIter<TargettedVoyeurInfo>* this, int32_t arg2)

0051a3d0  {
0051a3d7      if (this->fDone == 0)
0051a3d7      {
0051a3de          this->curDat = this->curDat->next;
0051a3de          
0051a3e6          while (this->curDat == 0)
0051a3e6          {
0051a3eb              class LongNIHash<TargettedVoyeurInfo>* hash = this->hash;
0051a3ed              int32_t ecx_4 = (this->bucketNo + 1);
0051a3ee              this->bucketNo = ecx_4;
0051a3ee              
0051a3f4              if (ecx_4 < hash->table_size)
0051a404                  this->curDat = hash->buckets[ecx_4];
0051a3f4              else
0051a3f6                  this->fDone = 1;
0051a3f6              
0051a40c              if (this->fDone != 0)
0051a40c                  break;
0051a3e6          }
0051a3d7      }
0051a3d7      
0051a40e      return this;
0051a3d0  }

0051a411                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0051a420  void __fastcall TargetInfo::TargetInfo(class TargetInfo* this)

0051a420  {
0051a429      this->context_id = 0;
0051a42b      this->object_id = 0;
0051a42e      this->radius = 0f;
0051a431      this->quantum = 0f;
0051a434      *(uint32_t*)((char*)this->quantum)[4] = 0;
0051a437      this->target_position.vtable = 0x796910;
0051a43e      this->target_position.objcell_id = 0;
0051a423      this->target_position.frame.qw = 0x3f800000;
0051a423      this->target_position.frame.qx = 0f;
0051a423      this->target_position.frame.qy = 0f;
0051a423      this->target_position.frame.qz = 0f;
0051a423      this->target_position.frame.m_fOrigin.x = 0;
0051a423      this->target_position.frame.m_fOrigin.y = 0f;
0051a423      this->target_position.frame.m_fOrigin.z = 0f;
0051a459      Frame::cache(&this->target_position.frame);
0051a461      this->interpolated_position.vtable = 0x796910;
0051a468      this->interpolated_position.objcell_id = 0;
0051a45e      this->interpolated_position.frame.qw = 0x3f800000;
0051a45e      this->interpolated_position.frame.qx = 0f;
0051a45e      this->interpolated_position.frame.qy = 0f;
0051a45e      this->interpolated_position.frame.qz = 0f;
0051a45e      this->interpolated_position.frame.m_fOrigin.x = 0;
0051a45e      this->interpolated_position.frame.m_fOrigin.y = 0f;
0051a45e      this->interpolated_position.frame.m_fOrigin.z = 0f;
0051a483      Frame::cache(&this->interpolated_position.frame);
0051a488      this->status = Undef_TargetStatus;
0051a48e      this->last_update_time = 0f;
0051a494      *(uint32_t*)((char*)this->last_update_time)[4] = 0;
0051a420  }

0051a49f                                                                                               90                                 .

0051a4a0  void __thiscall TargetManager::SetTargetQuantum(class TargetManager* this, double arg2)

0051a4a0  {
0051a4a3      class TargetInfo* target_info = this->target_info;
0051a4a3      
0051a4a8      if (target_info != 0)
0051a4a8      {
0051a4b2          target_info->quantum = arg2;
0051a4b5          *(uint32_t*)((char*)target_info->quantum)[4] = *(uint32_t*)((char*)arg2)[4];
0051a4bf          class CPhysicsObj* eax_1 = CPhysicsObj::GetObjectA(this->target_info->object_id);
0051a4bf          
0051a4c9          if (eax_1 != 0)
0051a4c9          {
0051a4cb              class TargetInfo* target_info_1 = this->target_info;
0051a4e6              CPhysicsObj::add_voyeur(eax_1, this->physobj->id, ((float)((long double)target_info_1->radius)), ((float)((long double)target_info_1->quantum)));
0051a4c9          }
0051a4a8      }
0051a4a0  }

0051a4ef                                               90                                                                 .

0051a4f0  void __thiscall TargetManager::SendVoyeurUpdate(class TargetManager* this, class TargettedVoyeurInfo* arg2, class Position const* arg3, enum TargetStatus arg4)

0051a4f0  {
0051a503      int32_t* esi = arg2;
0051a514      esi[6] = arg3->objcell_id;
0051a517      Frame::operator=(&esi[7], &arg3->frame);
0051a520      int32_t var_d0;
0051a520      TargetInfo::TargetInfo(&var_d0);
0051a525      class CPhysicsObj* physobj = this->physobj;
0051a527      int32_t eax_1 = esi[2];
0051a52a      int32_t edx = esi[4];
0051a52d      var_d0 = 0;
0051a538      uint32_t id = physobj->id;
0051a53f      int32_t var_c0 = eax_1;
0051a543      int32_t var_bc = esi[3];
0051a547      int32_t var_c8 = edx;
0051a556      uint32_t objcell_id = physobj->m_position.objcell_id;
0051a55a      void var_b0;
0051a55a      Frame::operator=(&var_b0, &physobj->m_position.frame);
0051a562      uint32_t objcell_id_1 = arg3->objcell_id;
0051a571      void var_68;
0051a571      Frame::operator=(&var_68, &arg3->frame);
0051a57d      void __return;
0051a57d      class AC1Legacy::Vector3* eax_3 = CPhysicsObj::get_velocity(physobj, &__return);
0051a586      float x = eax_3->x;
0051a597      float y = eax_3->y;
0051a5a2      float z = eax_3->z;
0051a5a9      enum TargetStatus var_10 = arg4;
0051a5b0      class CPhysicsObj* eax_5 = CPhysicsObj::GetObjectA(*(uint32_t*)esi);
0051a5b0      
0051a5be      if (eax_5 != 0)
0051a5c7          CPhysicsObj::receive_target_update(eax_5, &var_d0);
0051a4f0  }

0051a5d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051a5e0  void __thiscall TargetManager::GetInterpolatedPosition(class TargetManager* this, double arg2, class Position* arg3)

0051a5e0  {
0051a5e4      class Position* esi = arg3;
0051a5eb      class CPhysicsObj* physobj = this->physobj;
0051a5f6      esi->objcell_id = physobj->m_position.objcell_id;
0051a5fd      Frame::operator=(&esi->frame, &physobj->m_position.frame);
0051a608      arg3 = ((float)((long double)arg2));
0051a611      void __return;
0051a611      class AC1Legacy::Vector3* eax_2 = CPhysicsObj::get_velocity(this->physobj, &__return);
0051a634      esi->frame.m_fOrigin.x = ((float)((((long double)arg3) * ((long double)eax_2->x)) + ((long double)esi->frame.m_fOrigin.x)));
0051a63a      esi->frame.m_fOrigin.y = ((float)((((long double)arg3) * ((long double)eax_2->y)) + ((long double)esi->frame.m_fOrigin.y)));
0051a644      esi->frame.m_fOrigin.z = ((float)(((long double)((float)(((long double)arg3) * ((long double)eax_2->z)))) + ((long double)esi->frame.m_fOrigin.z)));
0051a5e0  }

0051a64e                                            90 90                                                                ..

0051a650  void __thiscall TargetManager::CheckAndUpdateVoyeur(class TargetManager* this, class TargettedVoyeurInfo* arg2)

0051a650  {
0051a65b      int32_t var_48 = 0x796910;
0051a663      int32_t var_44 = 0;
0051a66b      int32_t var_40 = 0x3f800000;
0051a673      int32_t var_3c = 0;
0051a67b      int32_t var_38 = 0;
0051a683      int32_t var_34 = 0;
0051a68b      int32_t var_c = 0;
0051a693      int32_t var_8 = 0;
0051a69b      int32_t var_4 = 0;
0051a6a3      Frame::cache(&var_40);
0051a6b7      int32_t var_58 = *(uint32_t*)((char*)arg2->quantum)[4];
0051a6bb      TargetManager::GetInterpolatedPosition(this, arg2->quantum, &var_48);
0051a6c8      long double st0 = Position::distance(&var_48, &arg2->last_sent_position);
0051a6cd      long double temp1 = ((long double)arg2->radius);
0051a6cd      (st0 - temp1);
0051a6cd      
0051a6d5      if ((*(uint8_t*)((char*)((((st0 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp1))) ? 1 : 0) << 0xa) | ((((st0 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0051a6e1          TargetManager::SendVoyeurUpdate(this, arg2, &var_48, Ok_TargetStatus);
0051a650  }

0051a6ee                                            90 90                                                                ..

0051a6f0  void __thiscall TargetManager::NotifyVoyeurOfEvent(class TargetManager* this, enum TargetStatus arg2)

0051a6f0  {
0051a6f6      class LongNIHash<TargettedVoyeurInfo>* voyeur_table = this->voyeur_table;
0051a6f6      
0051a6fb      if (voyeur_table != 0)
0051a6fb      {
0051a703          int32_t* var_10;
0051a703          LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, voyeur_table);
0051a708          int32_t i_1;
0051a708          int32_t i = i_1;
0051a708          
0051a70e          if (i == 0)
0051a70e          {
0051a711              void** j_1;
0051a711              void** j = j_1;
0051a716              int32_t var_c;
0051a716              int32_t edi_1 = var_c;
0051a716              
0051a762              do
0051a762              {
0051a722                  class TargettedVoyeurInfo* eax;
0051a722                  
0051a722                  if (j == 0)
0051a729                      eax = nullptr;
0051a722                  else
0051a724                      eax = j[1];
0051a724                  
0051a72d                  if (i == 0)
0051a72d                  {
0051a733                      int32_t* ecx_1;
0051a733                      
0051a733                      for (j = *(uint32_t*)j; j == 0; j = *(uint32_t*)(*(uint32_t*)ecx_1 + (edi_1 << 2)))
0051a733                      {
0051a735                          ecx_1 = var_10;
0051a73c                          edi_1 += 1;
0051a73c                          
0051a73f                          if (edi_1 >= ecx_1[1])
0051a73f                          {
0051a748                              i = 1;
0051a748                              break;
0051a73f                          }
0051a733                      }
0051a72d                  }
0051a72d                  
0051a75b                  TargetManager::SendVoyeurUpdate(this, eax, &this->physobj->m_position, arg2);
0051a762              } while (i == 0);
0051a70e          }
0051a6fb      }
0051a6f0  }

0051a76e                                            90 90                                                                ..

0051a770  class DetectionCylsphere* __thiscall LongNIHash<DetectionCylsphere>::remove(class LongNIHash<DetectionCylsphere>* this, uint32_t arg2)

0051a770  {
0051a783      void* edx_2 = &this->buckets[(COMBINE(0, ((arg2 >> 0x10) ^ arg2)) % this->table_size)];
0051a786      void** eax_4 = *(uint32_t*)edx_2;
0051a786      
0051a78a      if (eax_4 == 0)
0051a78d          return eax_4;
0051a78d      
0051a793      if (eax_4[2] != arg2)
0051a793      {
0051a7a0          int32_t* ecx;
0051a7a0          
0051a7a0          do
0051a7a0          {
0051a795              ecx = eax_4;
0051a797              eax_4 = *(uint32_t*)eax_4;
0051a797              
0051a79b              if (eax_4 == 0)
0051a7bf                  return 0;
0051a7a0          } while (eax_4[2] != arg2);
0051a7a0          
0051a7a4          if (ecx != 0)
0051a7a4          {
0051a7a8              *(uint32_t*)ecx = *(uint32_t*)eax_4;
0051a7aa              int32_t esi_1 = eax_4[1];
0051a7ae              operator delete(eax_4);
0051a7b9              return esi_1;
0051a7a4          }
0051a793      }
0051a793      
0051a7c4      *(uint32_t*)edx_2 = *(uint32_t*)eax_4;
0051a7c6      int32_t esi_2 = eax_4[1];
0051a7ca      operator delete(eax_4);
0051a7d5      return esi_2;
0051a770  }

0051a7d8                                                                          90 90 90 90 90 90 90 90                          ........

0051a7e0  void __fastcall TargetManager::ClearTarget(class TargetManager* this)

0051a7e0  {
0051a7e3      class TargetInfo* target_info = this->target_info;
0051a7e3      
0051a7e8      if (target_info != 0)
0051a7e8      {
0051a7ee          class CPhysicsObj* eax_1 = CPhysicsObj::GetObjectA(target_info->object_id);
0051a7ee          
0051a7f8          if (eax_1 != 0)
0051a802              CPhysicsObj::remove_voyeur(eax_1, this->physobj->id);
0051a802          
0051a807          class TargetInfo* target_info_1 = this->target_info;
0051a807          
0051a80c          if (target_info_1 != 0)
0051a80c          {
0051a814              target_info_1->interpolated_position.vtable = 0x79285c;
0051a817              target_info_1->target_position.vtable = 0x79285c;
0051a81a              operator delete(target_info_1);
0051a80c          }
0051a80c          
0051a822          this->target_info = nullptr;
0051a7e8      }
0051a7e0  }

0051a82b                                   90 90 90 90 90                                                             .....

0051a830  void __thiscall TargetManager::AddVoyeur(class TargetManager* this, uint32_t arg2, float arg3, double arg4)

0051a830  {
0051a838      class LongNIHash<TargettedVoyeurInfo>* voyeur_table = this->voyeur_table;
0051a838      
0051a840      if (voyeur_table == 0)
0051a840      {
0051a88f          void* eax_5 = operator new(8);
0051a899          class LongNIHash<TargettedVoyeurInfo>* eax_6;
0051a899          
0051a899          if (eax_5 == 0)
0051a8a6              eax_6 = nullptr;
0051a899          else
0051a89f              eax_6 = LongNIHash<DetectionInfo>::LongNIHash<DetectionInfo>(eax_5, 4);
0051a89f          
0051a8a8          this->voyeur_table = eax_6;
0051a840      }
0051a840      else
0051a840      {
0051a850          void** edx_3 = voyeur_table->buckets[(COMBINE(0, ((arg2 >> 0x10) ^ arg2)) % voyeur_table->table_size)];
0051a850          
0051a855          if (edx_3 != 0)
0051a855          {
0051a85a              while (edx_3[2] != arg2)
0051a85a              {
0051a860                  edx_3 = *(uint32_t*)edx_3;
0051a860                  
0051a864                  if (edx_3 == 0)
0051a864                      goto label_51a8b3;
0051a85a              }
0051a85a              
0051a86b              void* edx_4 = edx_3[1];
0051a86b              
0051a870              if (edx_4 != 0)
0051a870              {
0051a87b                  *(uint32_t*)((char*)edx_4 + 0x10) = arg3;
0051a883                  *(uint32_t*)((char*)edx_4 + 8) = arg4;
0051a886                  *(uint32_t*)((char*)edx_4 + 0xc) = *(uint32_t*)((char*)arg4)[4];
0051a88a                  return;
0051a870              }
0051a855          }
0051a840      }
0051a840      
0051a8b3  label_51a8b3:
0051a8b3      void* esi = operator new(0x60);
0051a8b3      
0051a8ba      if (esi == 0)
0051a8f3          esi = nullptr;
0051a8ba      else
0051a8ba      {
0051a8bc          *(uint32_t*)esi = 0;
0051a8be          *(uint32_t*)((char*)esi + 8) = 0;
0051a8c1          *(uint32_t*)((char*)esi + 0xc) = 0;
0051a8c4          *(uint32_t*)((char*)esi + 0x10) = 0;
0051a8ca          *(uint32_t*)((char*)esi + 0x14) = 0x796910;
0051a8d1          *(uint32_t*)((char*)esi + 0x18) = 0;
0051a8d4          *(uint32_t*)((char*)esi + 0x1c) = 0x3f800000;
0051a8da          *(uint32_t*)((char*)esi + 0x20) = 0;
0051a8dd          *(uint32_t*)((char*)esi + 0x24) = 0;
0051a8e0          *(uint32_t*)((char*)esi + 0x28) = 0;
0051a8e3          *(uint32_t*)((char*)esi + 0x50) = 0;
0051a8e6          *(uint32_t*)((char*)esi + 0x54) = 0;
0051a8e9          *(uint32_t*)((char*)esi + 0x58) = 0;
0051a8ec          Frame::cache(((char*)esi + 0x1c));
0051a8ba      }
0051a8ba      
0051a902      *(uint32_t*)esi = arg2;
0051a904      *(uint32_t*)((char*)esi + 0x10) = arg3;
0051a907      *(uint32_t*)((char*)esi + 8) = arg4;
0051a90a      *(uint32_t*)((char*)esi + 0xc) = *(uint32_t*)((char*)arg4)[4];
0051a911      LongNIHash<DetectionInfo>::add(this->voyeur_table, esi, arg2);
0051a922      TargetManager::SendVoyeurUpdate(this, esi, &this->physobj->m_position, Ok_TargetStatus);
0051a830  }

0051a92e                                            90 90                                                                ..

0051a930  void __thiscall TargetManager::ReceiveUpdate(class TargetManager* this, class TargetInfo const* arg2)

0051a930  {
0051a936      class TargetInfo* target_info = this->target_info;
0051a936      
0051a93c      if (target_info != 0)
0051a93c      {
0051a946          uint32_t object_id = arg2->object_id;
0051a946          
0051a94c          if (object_id == target_info->object_id)
0051a94c          {
0051a952              target_info->object_id = object_id;
0051a955              this->target_info->radius = arg2->radius;
0051a961              class TargetInfo* target_info_2 = this->target_info;
0051a964              target_info_2->quantum = arg2->quantum;
0051a96a              *(uint32_t*)((char*)target_info_2->quantum)[4] = *(uint32_t*)((char*)arg2->quantum)[4];
0051a973              class Position* eax_3 = &this->target_info->target_position;
0051a97d              eax_3->objcell_id = arg2->target_position.objcell_id;
0051a980              Frame::operator=(&eax_3->frame, &arg2->target_position.frame);
0051a98b              class Position* eax_5 = &this->target_info->interpolated_position;
0051a995              eax_5->objcell_id = arg2->interpolated_position.objcell_id;
0051a998              Frame::operator=(&eax_5->frame, &arg2->interpolated_position.frame);
0051a9a0              class AC1Legacy::Vector3* eax_7 = &this->target_info->velocity;
0051a9ad              eax_7->x = arg2->velocity.x;
0051a9b2              eax_7->y = arg2->velocity.y;
0051a9b8              eax_7->z = arg2->velocity.z;
0051a9bb              this->target_info->status = arg2->status;
0051a9cf              class TargetInfo* target_info_3 = this->target_info;
0051a9d8              target_info_3->last_update_time = (*(uint32_t*)Timer::cur_time);
0051a9de              *(uint32_t*)((char*)target_info_3->last_update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051a9f5              int32_t __return;
0051a9f5              class AC1Legacy::Vector3* eax_10 = Position::get_offset(&this->physobj->m_position, &__return, &this->target_info->interpolated_position);
0051a9ff              class AC1Legacy::Vector3* ecx_13 = &this->target_info->interpolated_heading;
0051aa05              ecx_13->x = eax_10->x;
0051aa0a              ecx_13->y = eax_10->y;
0051aa10              ecx_13->z = eax_10->z;
0051aa10              
0051aa23              if (AC1Legacy::Vector3::normalize_check_small(&this->target_info->interpolated_heading) != 0)
0051aa23              {
0051aa25                  class TargetInfo* target_info_1 = this->target_info;
0051aa28                  __return = 0;
0051aa34                  target_info_1->interpolated_heading.x = __return;
0051aa34                  target_info_1->interpolated_heading.y = 0f;
0051aa34                  target_info_1->interpolated_heading.z = 1f;
0051aa23              }
0051aa23              
0051aa66              void var_e4;
0051aa66              TargetInfo::TargetInfo(&var_e4, this->target_info);
0051aa6d              CPhysicsObj::HandleUpdateTarget(this->physobj, var_e4);
0051aa6d              
0051aa79              if (arg2->status == ExitWorld_TargetStatus)
0051aa7d                  TargetManager::ClearTarget(this);
0051a94c          }
0051a93c      }
0051a930  }

0051aa8a                                90 90 90 90 90 90                                                            ......

0051aa90  void __fastcall TargetManager::HandleTargetting(class TargetManager* this)

0051aa90  {
0051aa9d      long double x87_r7 = (((long double)PhysicsTimer::curr_time) - ((long double)this->last_update_time));
0051aaa0      long double temp0 = ((long double)0.5);
0051aaa0      (x87_r7 - temp0);
0051aaa6      int32_t eax;
0051aaa6      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0051aaa8      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0051aaa8      
0051aaab      if (p)
0051aaab      {
0051aab1          class TargetInfo* target_info = this->target_info;
0051aab1          
0051aac0          if ((target_info != 0 && target_info->status == Undef_TargetStatus))
0051aac0          {
0051aac8              long double x87_r7_2 = (((long double)10.0) + ((long double)target_info->last_update_time));
0051aace              long double temp1_1 = ((long double)Timer::cur_time);
0051aace              (x87_r7_2 - temp1_1);
0051aad4              enum TargetStatus eax_1;
0051aad4              eax_1 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0051aad6              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0051aad6              
0051aad9              if (!(p_1))
0051aad9              {
0051aadb                  target_info->status = TimedOut_TargetStatus;
0051aaf1                  void var_e8;
0051aaf1                  TargetInfo::TargetInfo(&var_e8, this->target_info);
0051aaf8                  CPhysicsObj::HandleUpdateTarget(this->physobj, var_e8);
0051aad9              }
0051aac0          }
0051aac0          
0051aafd          class LongNIHash<TargettedVoyeurInfo>* voyeur_table = this->voyeur_table;
0051aafd          
0051ab02          if (voyeur_table != 0)
0051ab02          {
0051ab09              void var_10;
0051ab09              int32_t edx_1 = LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, voyeur_table);
0051ab14              int32_t i;
0051ab14              
0051ab14              while (i == 0)
0051ab14              {
0051ab1c                  void* var_8;
0051ab1c                  class TargettedVoyeurInfo* esi_1;
0051ab1c                  
0051ab1c                  if (var_8 == 0)
0051ab23                      esi_1 = nullptr;
0051ab1c                  else
0051ab1e                      esi_1 = *(uint32_t*)((char*)var_8 + 4);
0051ab1e                  
0051ab25                  int32_t var_1c_2 = 0;
0051ab2b                  LongNIHashIter<TargettedVoyeurInfo>::operator++(&var_10, edx_1);
0051ab33                  edx_1 = TargetManager::CheckAndUpdateVoyeur(this, esi_1);
0051ab14              }
0051ab02          }
0051ab02          
0051ab4c          this->last_update_time = (*(uint32_t*)PhysicsTimer::curr_time);
0051ab4f          *(uint32_t*)((char*)this->last_update_time)[4] = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051aaab      }
0051aa90  }

0051ab58                                                                          90 90 90 90 90 90 90 90                          ........

0051ab60  void __fastcall LongNIHash<TargettedVoyeurInfo>::destroy_contents(class LongNIHash<TargettedVoyeurInfo>* this)

0051ab60  {
0051ab64      struct LongNIHashData** buckets = this->buckets;
0051ab64      
0051ab6f      if (buckets < &buckets[this->table_size])
0051ab6f      {
0051abbc          do
0051abbc          {
0051ab73              struct LongNIHashData* next_1 = *(uint32_t*)buckets;
0051ab73              
0051ab77              if (next_1 != 0)
0051ab77              {
0051aba6                  struct LongNIHashData* next;
0051aba6                  
0051aba6                  do
0051aba6                  {
0051ab80                      void* data = next_1->data;
0051ab85                      next = next_1->next;
0051ab85                      
0051ab87                      if (data != 0)
0051ab87                      {
0051ab8a                          *(uint32_t*)((char*)data + 0x14) = 0x79285c;
0051ab91                          operator delete(data);
0051ab87                      }
0051ab87                      
0051ab9a                      operator delete(next_1);
0051aba4                      next_1 = next;
0051aba6                  } while (next != 0);
0051ab77              }
0051ab77              
0051aba8              *(uint32_t*)buckets = nullptr;
0051abb4              buckets = &buckets[1];
0051abbc          } while (buckets < &this->buckets[this->table_size]);
0051ab6f      }
0051ab60  }

0051abc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0051abd0  void __fastcall TargetManager::~TargetManager(class TargetManager* this)

0051abd0  {
0051abd3      class TargetInfo* target_info = this->target_info;
0051abd3      
0051abd8      if (target_info != 0)
0051abd8      {
0051abe0          target_info->interpolated_position.vtable = 0x79285c;
0051abe3          target_info->target_position.vtable = 0x79285c;
0051abe6          operator delete(target_info);
0051abee          this->target_info = nullptr;
0051abd8      }
0051abd8      
0051abf5      class LongNIHash<TargettedVoyeurInfo>* voyeur_table = this->voyeur_table;
0051abf5      
0051abfa      if (voyeur_table != 0)
0051abfa      {
0051abfc          LongNIHash<TargettedVoyeurInfo>::destroy_contents(voyeur_table);
0051ac01          class LongNIHash<TargettedVoyeurInfo>* voyeur_table_1 = this->voyeur_table;
0051ac01          
0051ac06          if (voyeur_table_1 != 0)
0051ac06          {
0051ac0a              LongNIHash<DetectionCylsphere>::flush(voyeur_table_1);
0051ac12              operator delete[](voyeur_table_1->buckets);
0051ac18              voyeur_table_1->buckets = 0;
0051ac1e              operator delete(voyeur_table_1);
0051ac06          }
0051abfa      }
0051abd0  }

0051ac28                          90 90 90 90 90 90 90 90                                                          ........

0051ac30  void __thiscall TargetManager::SetTarget(class TargetManager* this, uint32_t arg2, uint32_t arg3, float arg4, double arg5)

0051ac30  {
0051ac39      class TargetInfo* target_info = this->target_info;
0051ac39      
0051ac3f      if (target_info != 0)
0051ac3f      {
0051ac45          class CPhysicsObj* eax_1 = CPhysicsObj::GetObjectA(target_info->object_id);
0051ac45          
0051ac4f          if (eax_1 != 0)
0051ac59              CPhysicsObj::remove_voyeur(eax_1, this->physobj->id);
0051ac59          
0051ac5e          class TargetInfo* target_info_1 = this->target_info;
0051ac5e          
0051ac63          if (target_info_1 != 0)
0051ac63          {
0051ac6b              target_info_1->interpolated_position.vtable = 0x79285c;
0051ac6e              target_info_1->target_position.vtable = 0x79285c;
0051ac71              operator delete(target_info_1);
0051ac63          }
0051ac63          
0051ac79          this->target_info = nullptr;
0051ac3f      }
0051ac3f      
0051ac89      if (arg3 == 0)
0051ac89      {
0051ad3d          uint32_t var_d0;
0051ad3d          TargetInfo::TargetInfo(&var_d0);
0051ad59          var_d0 = arg2;
0051ad60          int32_t var_cc_1 = 0;
0051ad6b          int32_t var_10_1 = 6;
0051ad76          void var_1a8;
0051ad76          TargetInfo::TargetInfo(&var_1a8, &var_d0);
0051ad7d          CPhysicsObj::HandleUpdateTarget(this->physobj, var_1a8);
0051ad7d          return;
0051ac89      }
0051ac89      
0051ac94      void* eax_2 = operator new(0xd0);
0051ac9e      uint32_t* eax_3;
0051ac9e      
0051ac9e      if (eax_2 == 0)
0051aca9          eax_3 = nullptr;
0051ac9e      else
0051aca2          eax_3 = TargetInfo::TargetInfo(eax_2);
0051aca2      
0051acb2      this->target_info = eax_3;
0051acb5      *(uint32_t*)eax_3 = arg2;
0051acb7      this->target_info->object_id = arg3;
0051acc4      this->target_info->radius = arg4;
0051acca      class TargetInfo* target_info_3 = this->target_info;
0051acdb      target_info_3->quantum = arg5;
0051acde      *(uint32_t*)((char*)target_info_3->quantum)[4] = *(uint32_t*)((char*)arg5)[4];
0051ace6      class TargetInfo* target_info_4 = this->target_info;
0051acef      target_info_4->last_update_time = (*(uint32_t*)Timer::cur_time);
0051acf5      *(uint32_t*)((char*)target_info_4->last_update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051ad02      class CPhysicsObj* eax_8 = CPhysicsObj::GetObjectA(this->target_info->object_id);
0051ad02      
0051ad0c      if (eax_8 != 0)
0051ad0c      {
0051ad0e          class TargetInfo* target_info_2 = this->target_info;
0051ad29          CPhysicsObj::add_voyeur(eax_8, this->physobj->id, ((float)((long double)target_info_2->radius)), ((float)((long double)target_info_2->quantum)));
0051ad0c      }
0051ac30  }

0051ad8d                                         90 90 90                                                               ...

0051ad90  int32_t __thiscall TargetManager::RemoveVoyeur(class TargetManager* this, uint32_t arg2)

0051ad90  {
0051ad90      class LongNIHash<TargettedVoyeurInfo>* voyeur_table = this->voyeur_table;
0051ad90      
0051ad95      if (voyeur_table != 0)
0051ad95      {
0051ad9c          class DetectionCylsphere* eax_2 = LongNIHash<DetectionCylsphere>::remove(voyeur_table, arg2);
0051ad9c          
0051ada3          if (eax_2 != 0)
0051ada3          {
0051ada6              eax_2->detection_type = 0x79285c;
0051adad              operator delete(eax_2);
0051adba              return 1;
0051ada3          }
0051ad95      }
0051ad95      
0051adbf      return 0;
0051ad90  }

0051adc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0051add0  void __thiscall SArray<CPhysicsObj *>::grow(class SArray<CPhysicsObj *>* this, uint16_t arg2)

0051add0  {
0051addc      if (arg2 <= this->sizeOf)
0051addc      {
0051addf          SArray<CPhysicsObj *>::shrink(this, arg2);
0051ade6          return;
0051addc      }
0051addc      
0051adf1      void* eax_2 = operator new[]((((uint32_t)arg2) << 2));
0051adf6      int32_t ecx = 0;
0051adf6      
0051ae01      if (this->sizeOf > 0)
0051ae01      {
0051ae16          do
0051ae16          {
0051ae08              int32_t* eax_4 = (((uint32_t)ecx) << 2);
0051ae0e              ecx += 1;
0051ae0f              *(uint32_t*)((char*)eax_4 + eax_2) = *(uint32_t*)((char*)eax_4 + this->data);
0051ae16          } while (ecx < this->sizeOf);
0051ae01      }
0051ae01      
0051ae1b      operator delete[](this->data);
0051ae23      this->data = eax_2;
0051ae26      this->sizeOf = arg2;
0051add0  }

0051ae2f                                               90                                                                 .

0051ae30  void __thiscall SArray<unsigned long>::grow(class SArray<unsigned long>* this, uint16_t arg2)

0051ae30  {
0051ae3c      if (arg2 <= this->sizeOf)
0051ae3c      {
0051ae3f          SArray<unsigned long>::shrink(this, arg2);
0051ae46          return;
0051ae3c      }
0051ae3c      
0051ae51      void* eax_2 = operator new[]((((uint32_t)arg2) << 2));
0051ae56      int32_t ecx = 0;
0051ae56      
0051ae61      if (this->sizeOf > 0)
0051ae61      {
0051ae76          do
0051ae76          {
0051ae68              int32_t* eax_4 = (((uint32_t)ecx) << 2);
0051ae6e              ecx += 1;
0051ae6f              *(uint32_t*)((char*)eax_4 + eax_2) = *(uint32_t*)((char*)eax_4 + this->data);
0051ae76          } while (ecx < this->sizeOf);
0051ae61      }
0051ae61      
0051ae7b      operator delete[](this->data);
0051ae83      this->data = eax_2;
0051ae86      this->sizeOf = arg2;
0051ae30  }

0051ae8f                                               90                                                                 .

0051ae90  void __thiscall SArray<CPhysicsObj *>::shrink(class SArray<CPhysicsObj *>* this, uint16_t const arg2)

0051ae90  {
0051ae9c      if (arg2 > this->sizeOf)
0051ae9c      {
0051ae9f          SArray<CPhysicsObj *>::grow(this, arg2);
0051aea6          return;
0051ae9c      }
0051ae9c      
0051aeac      if (arg2 == 0)
0051aeac      {
0051aeb1          operator delete[](this->data);
0051aeb9          this->sizeOf = arg2;
0051aebe          this->data = 0;
0051aec5          return;
0051aeac      }
0051aeac      
0051aed0      void* eax_1 = operator new[]((((uint32_t)arg2) << 2));
0051aed8      int32_t ecx_2 = 0;
0051aedf      this->sizeOf = arg2;
0051aedf      
0051aee3      if (arg2 > 0)
0051aee3      {
0051aef8          do
0051aef8          {
0051aeea              int32_t* eax_3 = (((uint32_t)ecx_2) << 2);
0051aef0              ecx_2 += 1;
0051aef1              *(uint32_t*)((char*)eax_3 + eax_1) = *(uint32_t*)((char*)eax_3 + this->data);
0051aef8          } while (ecx_2 < this->sizeOf);
0051aee3      }
0051aee3      
0051aefd      operator delete[](this->data);
0051af05      this->data = eax_1;
0051ae90  }

0051af0d                                         90 90 90                                                               ...

0051af10  void __thiscall SArray<unsigned long>::shrink(class SArray<unsigned long>* this, uint16_t const arg2)

0051af10  {
0051af1c      if (arg2 > this->sizeOf)
0051af1c      {
0051af1f          SArray<unsigned long>::grow(this, arg2);
0051af26          return;
0051af1c      }
0051af1c      
0051af2c      if (arg2 == 0)
0051af2c      {
0051af31          operator delete[](this->data);
0051af39          this->sizeOf = arg2;
0051af3e          this->data = 0;
0051af45          return;
0051af2c      }
0051af2c      
0051af50      void* eax_1 = operator new[]((((uint32_t)arg2) << 2));
0051af58      int32_t ecx_2 = 0;
0051af5f      this->sizeOf = arg2;
0051af5f      
0051af63      if (arg2 > 0)
0051af63      {
0051af78          do
0051af78          {
0051af6a              int32_t* eax_3 = (((uint32_t)ecx_2) << 2);
0051af70              ecx_2 += 1;
0051af71              *(uint32_t*)((char*)eax_3 + eax_1) = *(uint32_t*)((char*)eax_3 + this->data);
0051af78          } while (ecx_2 < this->sizeOf);
0051af63      }
0051af63      
0051af7d      operator delete[](this->data);
0051af85      this->data = eax_1;
0051af10  }

0051af8d                                         90 90 90                                                               ...

0051af90  void __thiscall CHILDLIST::remove_child(class CHILDLIST* this, class CPhysicsObj* arg2)

0051af90  {
0051af90      class CHILDLIST* this_1 = this;
0051af91      uint16_t num_objects = this->num_objects;
0051af97      class CHILDLIST* eax = nullptr;
0051af97      
0051af9d      if (num_objects > 0)
0051af9d      {
0051afac          while (this->objects.data[((uint32_t)eax)] != arg2)
0051afac          {
0051afae              eax = (&eax->num_objects + 1);
0051afae              
0051afb2              if (eax >= this->num_objects)
0051afb2                  break;
0051afac          }
0051af9d      }
0051af9d      
0051afb8      this->num_objects = (num_objects - 1);
0051afb8      
0051afbb      if (eax < (num_objects - 1))
0051afbb      {
0051b069          do
0051b069          {
0051afc1              class CPhysicsObj** data_2 = this->objects.data;
0051afc7              uint32_t esi_2 = ((uint32_t)(&eax->num_objects + 1));
0051afce              uint32_t edx_2 = ((uint32_t)eax);
0051afd4              data_2[edx_2] = data_2[esi_2];
0051afd7              class Frame* data_3 = this->frames.data;
0051afdf              void* eax_4 = &data_3[esi_2];
0051afe1              arg2 = edx_2;
0051afe8              void* edx_4 = &data_3[edx_2];
0051aff2              *(uint32_t*)((char*)edx_4 + 0x34) = *(uint32_t*)((char*)eax_4 + 0x34);
0051aff7              *(uint32_t*)((char*)edx_4 + 0x38) = *(uint32_t*)((char*)eax_4 + 0x38);
0051affd              *(uint32_t*)((char*)edx_4 + 0x3c) = *(uint32_t*)((char*)eax_4 + 0x3c);
0051b002              *(uint32_t*)edx_4 = *(uint32_t*)eax_4;
0051b007              *(uint32_t*)((char*)edx_4 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0051b00d              *(uint32_t*)((char*)edx_4 + 8) = *(uint32_t*)((char*)eax_4 + 8);
0051b013              *(uint32_t*)((char*)edx_4 + 0xc) = *(uint32_t*)((char*)eax_4 + 0xc);
0051b019              *(uint32_t*)((char*)edx_4 + 0x10) = *(uint32_t*)((char*)eax_4 + 0x10);
0051b01f              *(uint32_t*)((char*)edx_4 + 0x14) = *(uint32_t*)((char*)eax_4 + 0x14);
0051b025              *(uint32_t*)((char*)edx_4 + 0x18) = *(uint32_t*)((char*)eax_4 + 0x18);
0051b02b              *(uint32_t*)((char*)edx_4 + 0x1c) = *(uint32_t*)((char*)eax_4 + 0x1c);
0051b031              *(uint32_t*)((char*)edx_4 + 0x20) = *(uint32_t*)((char*)eax_4 + 0x20);
0051b037              *(uint32_t*)((char*)edx_4 + 0x24) = *(uint32_t*)((char*)eax_4 + 0x24);
0051b03d              *(uint32_t*)((char*)edx_4 + 0x28) = *(uint32_t*)((char*)eax_4 + 0x28);
0051b043              *(uint32_t*)((char*)edx_4 + 0x2c) = *(uint32_t*)((char*)eax_4 + 0x2c);
0051b049              *(uint32_t*)((char*)edx_4 + 0x30) = *(uint32_t*)((char*)eax_4 + 0x30);
0051b04c              uint32_t* data = this->part_numbers.data;
0051b056              data[arg2] = data[esi_2];
0051b059              uint32_t* data_1 = this->location_ids.data;
0051b05f              data_1[arg2] = data_1[esi_2];
0051b062              eax = (&eax->num_objects + 1);
0051b069          } while (eax < this->num_objects);
0051afbb      }
0051af90  }

0051b077                                                                       90 90 90 90 90 90 90 90 90                         .........

0051b080  int32_t __thiscall CHILDLIST::FindChildIndex(class CHILDLIST const* this, class CPhysicsObj const* arg2, uint16_t* arg3)

0051b080  {
0051b080      uint16_t num_objects = this->num_objects;
0051b084      int32_t eax = 0;
0051b084      
0051b08a      if (num_objects > 0)
0051b08a      {
0051b09f          do
0051b09f          {
0051b099              if (this->objects.data[((uint32_t)eax)] == arg2)
0051b099              {
0051b0ae                  *(uint16_t*)arg3 = eax;
0051b0b6                  return 1;
0051b099              }
0051b099              
0051b09b              eax += 1;
0051b09f          } while (eax < num_objects);
0051b08a      }
0051b08a      
0051b0a5      return 0;
0051b080  }

0051b0b9                                                                             90 90 90 90 90 90 90                           .......

0051b0c0  void __thiscall SArray<Frame>::grow(class SArray<Frame>* this, uint16_t arg2)

0051b0c0  {
0051b0cc      if (arg2 <= this->sizeOf)
0051b0cc      {
0051b0cf          SArray<Frame>::shrink(this, arg2);
0051b0d6          return;
0051b0cc      }
0051b0cc      
0051b0db      uint32_t edi = ((uint32_t)arg2);
0051b0e7      uint32_t* eax_3 = operator new[](((edi << 6) + 4));
0051b0f1      void* ebx;
0051b0f1      
0051b0f1      if (eax_3 == 0)
0051b108          ebx = nullptr;
0051b0f1      else
0051b0f1      {
0051b0f9          ebx = &eax_3[1];
0051b0ff          *(uint32_t*)eax_3 = edi;
0051b101          `vector constructor iterator'(ebx, 0x40, edi, Frame::Frame);
0051b0f1      }
0051b0f1      
0051b10a      int32_t edi_1 = 0;
0051b10a      
0051b110      if (this->sizeOf > 0)
0051b110      {
0051b12a          do
0051b12a          {
0051b117              int32_t eax_5 = (((uint32_t)edi_1) << 6);
0051b120              Frame::operator=((eax_5 + ebx), (this->data + eax_5));
0051b125              edi_1 += 1;
0051b12a          } while (edi_1 < this->sizeOf);
0051b110      }
0051b110      
0051b12c      class Frame* data = this->data;
0051b12c      
0051b130      if (data != 0)
0051b136          operator delete[](((char*)data - 4));
0051b136      
0051b13f      this->data = ebx;
0051b142      this->sizeOf = arg2;
0051b0c0  }

0051b14b                                   90 90 90 90 90                                                             .....

0051b150  void __thiscall SArray<Frame>::shrink(class SArray<Frame>* this, uint16_t const arg2)

0051b150  {
0051b156      int32_t* this_1 = this;
0051b156      
0051b15c      if (arg2 > this_1[1])
0051b15c      {
0051b15f          SArray<Frame>::grow(this, arg2);
0051b166          return;
0051b15c      }
0051b15c      
0051b16a      void* ebp = nullptr;
0051b16a      
0051b16f      if (arg2 == 0)
0051b16f      {
0051b171          void* eax = *(uint32_t*)this_1;
0051b171          
0051b175          if (eax != 0)
0051b17b              operator delete[](((char*)eax - 4));
0051b17b          
0051b183          this_1[1] = 0;
0051b187          *(uint32_t*)this_1 = 0;
0051b18c          return;
0051b16f      }
0051b16f      
0051b190      uint32_t edi = ((uint32_t)arg2);
0051b19c      uint32_t* eax_5 = operator new[](((edi << 6) + 4));
0051b19c      
0051b1a6      if (eax_5 != 0)
0051b1a6      {
0051b1ae          ebp = &eax_5[1];
0051b1b4          *(uint32_t*)eax_5 = edi;
0051b1b6          `vector constructor iterator'(ebp, 0x40, edi, Frame::Frame);
0051b1a6      }
0051b1a6      
0051b1bb      int32_t edi_1 = 0;
0051b1c0      this_1[1] = arg2;
0051b1c0      
0051b1c4      if (arg2 > 0)
0051b1c4      {
0051b1de          do
0051b1de          {
0051b1cb              int32_t eax_7 = (((uint32_t)edi_1) << 6);
0051b1d4              Frame::operator=((eax_7 + ebp), (*(uint32_t*)this_1 + eax_7));
0051b1d9              edi_1 += 1;
0051b1de          } while (edi_1 < this_1[1]);
0051b1c4      }
0051b1c4      
0051b1e0      void* eax_8 = *(uint32_t*)this_1;
0051b1e0      
0051b1e5      if (eax_8 != 0)
0051b1eb          operator delete[](((char*)eax_8 - 4));
0051b1eb      
0051b1f3      *(uint32_t*)this_1 = ebp;
0051b150  }

0051b1fb                                                                                   90 90 90 90 90                             .....

0051b200  void __fastcall CHILDLIST::CHILDLIST(class CHILDLIST* this)

0051b200  {
0051b204      this->num_objects = 0;
0051b207      this->objects.data = 0;
0051b20a      this->objects.sizeOf = 0;
0051b20e      this->frames.data = 0;
0051b211      this->frames.sizeOf = 0;
0051b215      this->part_numbers.data = 0;
0051b218      this->part_numbers.sizeOf = 0;
0051b21c      this->location_ids.data = 0;
0051b21f      this->location_ids.sizeOf = 0;
0051b200  }

0051b224              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0051b230  void __fastcall CHILDLIST::~CHILDLIST(class CHILDLIST* this)

0051b230  {
0051b237      operator delete[](this->location_ids.data);
0051b240      operator delete[](this->part_numbers.data);
0051b245      class Frame* data = this->frames.data;
0051b245      
0051b24d      if (data != 0)
0051b253          operator delete[](((char*)data - 4));
0051b253      
0051b25f      operator delete[](this->objects.data);
0051b230  }

0051b269                             90 90 90 90 90 90 90                                                           .......

0051b270  void __thiscall CHILDLIST::add_child(class CHILDLIST* this, class CPhysicsObj* arg2, class Frame const* arg3, uint32_t arg4, uint32_t arg5)

0051b270  {
0051b275      uint16_t sizeOf = this->objects.sizeOf;
0051b275      
0051b27c      if (sizeOf <= this->num_objects)
0051b27c      {
0051b286          SArray<CPhysicsObj *>::grow(&this->objects, (sizeOf + 4));
0051b28f          SArray<Frame>::grow(&this->frames, (sizeOf + 4));
0051b298          SArray<unsigned long>::grow(&this->part_numbers, (sizeOf + 4));
0051b2a1          SArray<unsigned long>::grow(&this->location_ids, (sizeOf + 4));
0051b27c      }
0051b27c      
0051b2aa      this->objects.data[((uint32_t)this->num_objects)] = arg2;
0051b2c4      Frame::operator=(&this->frames.data[((uint32_t)this->num_objects)], arg3);
0051b2cc      this->part_numbers.data[((uint32_t)this->num_objects)] = arg4;
0051b2d9      this->location_ids.data[((uint32_t)this->num_objects)] = arg5;
0051b2e3      this->num_objects += 1;
0051b270  }

0051b2ea                                90 90 90 90 90 90                                                            ......

0051b2f0  void __thiscall ScriptManager::ScriptManager(class ScriptManager* this, class CPhysicsObj* arg2)

0051b2f0  {
0051b2f6      this->physobj = arg2;
0051b2fa      this->curr_data = nullptr;
0051b2fd      this->last_data = nullptr;
0051b300      this->hook_index = 0xffffffff;
0051b307      this->next_hook_time = 0f;
0051b30a      *(uint32_t*)((char*)this->next_hook_time)[4] = 0;
0051b2f0  }


0051b310  int32_t __thiscall ScriptManager::AddScriptInternal(class ScriptManager* this, class PhysicsScript const* arg2)

0051b310  {
0051b315      class ScriptData* eax = operator new(0x10);
0051b315      
0051b321      if (eax == 0)
0051b330          eax = nullptr;
0051b321      else
0051b321      {
0051b323          eax->start_time = 0;
0051b325          *(uint32_t*)((char*)eax->start_time)[4] = 0;
0051b328          eax->script = nullptr;
0051b32b          eax->next_data = nullptr;
0051b321      }
0051b321      
0051b332      class ScriptData* last_data = this->last_data;
0051b332      
0051b338      if (last_data == 0)
0051b338      {
0051b352          eax->start_time = (*(uint32_t*)Timer::cur_time);
0051b354          *(uint32_t*)((char*)eax->start_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051b338      }
0051b338      else
0051b342          eax->start_time = ((double)(((long double)last_data->script->length) + ((long double)last_data->start_time)));
0051b342      
0051b35b      eax->script = arg2;
0051b35e      class ScriptData* last_data_1 = this->last_data;
0051b35e      
0051b364      if (last_data_1 != 0)
0051b364      {
0051b366          last_data_1->next_data = eax;
0051b369          this->last_data = eax;
0051b372          return 1;
0051b364      }
0051b364      
0051b375      this->curr_data = eax;
0051b378      this->last_data = eax;
0051b37b      this->hook_index = 0xffffffff;
0051b393      this->next_hook_time = ((double)(((long double)**(uint64_t**)eax->script->script_data.data) + ((long double)eax->start_time)));
0051b397      return 1;
0051b310  }

0051b39a                                                                                90 90 90 90 90 90                            ......

0051b3a0  int32_t __thiscall ScriptManager::AddScript(class ScriptManager* this, class IDClass<_tagDataID,32,0> arg2)

0051b3a0  {
0051b3ba      void var_8;
0051b3ba      class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x2b));
0051b3ba      
0051b3c4      if (eax_1 == 0)
0051b3d7          return 0;
0051b3d7      
0051b3c9      ScriptManager::AddScriptInternal(this, eax_1);
0051b3d0      return 1;
0051b3a0  }

0051b3e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0051b3f0  class CAnimHook const* __fastcall ScriptManager::NextHook(class ScriptManager* this)

0051b3f0  {
0051b3f3      int32_t eax = (this->hook_index + 1);
0051b3f4      this->hook_index = eax;
0051b3f9      class ScriptData* curr_data = this->curr_data;
0051b3fd      class PhysicsScript* script = curr_data->script;
0051b401      int32_t num_in_array = script->script_data.num_in_array;
0051b401      
0051b406      if (eax >= num_in_array)
0051b40c          return 0;
0051b40c      
0051b414      if ((eax + 1) < num_in_array)
0051b414      {
0051b423          this->next_hook_time = ((double)(((long double)script->script_data.data[(eax + 1)]->start_time) + ((long double)curr_data->start_time)));
0051b432          return curr_data->script->script_data.data[eax]->hook;
0051b414      }
0051b414      
0051b433      class ScriptData* next_data = curr_data->next_data;
0051b433      
0051b438      if (next_data != 0)
0051b438      {
0051b448          this->next_hook_time = ((double)(((long double)*(uint32_t*)next_data->script->script_data.data->start_time) + ((long double)next_data->start_time)));
0051b457          return curr_data->script->script_data.data[eax]->hook;
0051b438      }
0051b438      
0051b458      this->next_hook_time = 0f;
0051b45f      *(uint32_t*)((char*)this->next_hook_time)[4] = 0xbff00000;
0051b474      return curr_data->script->script_data.data[eax]->hook;
0051b3f0  }

0051b475                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051b480  void __fastcall ScriptManager::UpdateScripts(class ScriptManager* this)

0051b480  {
0051b48b      if (this->curr_data != 0)
0051b48b      {
0051b48d          int32_t edi;
0051b48d          int32_t var_c_1 = edi;
0051b48d          
0051b507          do
0051b507          {
0051b490              long double x87_r7_1 = ((long double)Timer::cur_time);
0051b496              long double temp0_1 = ((long double)this->next_hook_time);
0051b496              (x87_r7_1 - temp0_1);
0051b499              class ScriptData* next_data;
0051b499              next_data = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0051b499              
0051b49e              if ((*(uint8_t*)((char*)next_data)[1] & 1) != 0)
0051b49e                  break;
0051b49e              
0051b4a2              class CAnimHook* eax = ScriptManager::NextHook(this);
0051b4a2              
0051b4a9              if (eax == 0)
0051b4a9              {
0051b4b7                  class ScriptData* curr_data = this->curr_data;
0051b4bc                  next_data = curr_data->next_data;
0051b4c1                  this->curr_data = next_data;
0051b4c4                  this->hook_index = 0xffffffff;
0051b4c4                  
0051b4cb                  if (next_data == 0)
0051b4cb                  {
0051b4de                      this->next_hook_time = 0f;
0051b4e1                      *(uint32_t*)((char*)this->next_hook_time)[4] = 0xbff00000;
0051b4e8                      this->last_data = nullptr;
0051b4cb                  }
0051b4cb                  else
0051b4d9                      this->next_hook_time = ((double)(((long double)**(uint64_t**)next_data->script->script_data.data) + ((long double)next_data->start_time)));
0051b4d9                  
0051b4ed                  if (curr_data != 0)
0051b4ed                  {
0051b4ef                      class PhysicsScript* script = curr_data->script;
0051b4ef                      
0051b4f4                      if (script != 0)
0051b4f6                          script->vtable->Release();
0051b4f6                      
0051b4fc                      operator delete(curr_data);
0051b4ed                  }
0051b4a9              }
0051b4a9              else
0051b4ad                  eax->vtable->Execute(this->physobj);
0051b507          } while (this->curr_data != 0);
0051b48b      }
0051b480  }

0051b50d                                         90 90 90                                                               ...

0051b510  void __fastcall ScriptManager::~ScriptManager(class ScriptManager* this)

0051b510  {
0051b51b      if (this->curr_data != 0)
0051b51b      {
0051b51d          int32_t edi;
0051b51d          int32_t var_c_1 = edi;
0051b51d          
0051b570          do
0051b570          {
0051b520              class ScriptData* curr_data = this->curr_data;
0051b525              double* next_data = curr_data->next_data;
0051b52a              this->curr_data = next_data;
0051b52d              this->hook_index = 0xffffffff;
0051b52d              
0051b534              if (next_data == 0)
0051b534              {
0051b547                  this->next_hook_time = 0f;
0051b54a                  *(uint32_t*)((char*)this->next_hook_time)[4] = 0xbff00000;
0051b551                  this->last_data = nullptr;
0051b534              }
0051b534              else
0051b542                  this->next_hook_time = ((double)(((long double)***(uint64_t***)(next_data[1] + 0x38)) + ((long double)*(uint64_t*)next_data)));
0051b542              
0051b556              if (curr_data != 0)
0051b556              {
0051b558                  class PhysicsScript* script = curr_data->script;
0051b558                  
0051b55d                  if (script != 0)
0051b55f                      script->vtable->Release();
0051b55f                  
0051b565                  operator delete(curr_data);
0051b556              }
0051b570          } while (this->curr_data != 0);
0051b51b      }
0051b510  }

0051b576                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0051b580  uint32_t __fastcall ParticleManager::GetNumEmitters(class ParticleManager* this)

0051b580  {
0051b58c      int32_t result = 0;
0051b58e      int32_t* var_10;
0051b58e      LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, &this->particle_table);
0051b599      int32_t var_4;
0051b599      
0051b599      if (var_4 != 0)
0051b5c9          return result;
0051b5c9      
0051b59b      int32_t* edx_1 = var_10;
0051b59f      int32_t var_c;
0051b59f      int32_t ecx_2 = var_c;
0051b5a3      int32_t* i_1;
0051b5a3      int32_t* i = i_1;
0051b5a3      
0051b5a7      while (true)
0051b5a7      {
0051b5a7          i = *(uint32_t*)i;
0051b5a9          result += 1;
0051b5a9          
0051b5b2          for (; i == 0; i = *(uint32_t*)(*(uint32_t*)edx_1 + (ecx_2 << 2)))
0051b5b2          {
0051b5b7              ecx_2 += 1;
0051b5b7              
0051b5ba              if (ecx_2 >= edx_1[1])
0051b5c9                  return result;
0051b5b2          }
0051b5a7      }
0051b580  }

0051b5ca                                90 90 90 90 90 90                                                            ......

0051b5d0  void __fastcall ParticleManager::ParticleManager(class ParticleManager* this)

0051b5d0  {
0051b5d4      this->next_emitter_id = 0xffff0000;
0051b5dc      this->particle_table.buckets = 0;
0051b5e3      this->particle_table.table_size = 2;
0051b5ea      void* s = operator new[](8);
0051b5f2      int32_t ecx_1 = (this->particle_table.table_size << 2);
0051b5fc      this->particle_table.buckets = s;
0051b60b      __builtin_memset(__builtin_memset(s, 0, ((ecx_1 >> 2) << 2)), 0, (ecx_1 & 3));
0051b5d0  }

0051b612                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0051b620  void __fastcall ParticleManager::~ParticleManager(class ParticleManager* this)

0051b620  {
0051b624      class LongNIHash<ParticleEmitter>* esi = &this->particle_table;
0051b630      int32_t* var_10;
0051b630      LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, esi);
0051b635      int32_t i_1;
0051b635      int32_t i = i_1;
0051b635      
0051b63b      if (i == 0)
0051b63b      {
0051b63d          void** j_1;
0051b63d          void** j = j_1;
0051b642          int32_t* ebx_1 = var_10;
0051b648          int32_t var_c;
0051b648          int32_t edi_1 = var_c;
0051b648          
0051b696          do
0051b696          {
0051b652              class ParticleEmitter* ebp_1;
0051b652              
0051b652              if (j == 0)
0051b659                  ebp_1 = nullptr;
0051b652              else
0051b654                  ebp_1 = j[1];
0051b654              
0051b65d              if (i == 0)
0051b65d              {
0051b663                  for (j = *(uint32_t*)j; j == 0; j = *(uint32_t*)(*(uint32_t*)ebx_1 + (edi_1 << 2)))
0051b663                  {
0051b668                      edi_1 += 1;
0051b668                      
0051b66b                      if (edi_1 >= ebx_1[1])
0051b66b                      {
0051b674                          i_1 = 1;
0051b674                          break;
0051b66b                      }
0051b663                  }
0051b65d              }
0051b65d              
0051b67e              if (ebp_1 != 0)
0051b67e              {
0051b682                  ParticleEmitter::~ParticleEmitter(ebp_1);
0051b688                  operator delete(ebp_1);
0051b67e              }
0051b67e              
0051b690              i = i_1;
0051b696          } while (i == 0);
0051b63b      }
0051b63b      
0051b6a1      LongNIHash<DetectionCylsphere>::flush(esi);
0051b6a9      operator delete[](esi->buckets);
0051b6b1      esi->buckets = 0;
0051b620  }

0051b6bc                                                                                      90 90 90 90                              ....

0051b6c0  uint32_t __thiscall ParticleManager::CreateParticleEmitter(class ParticleManager* this, class CPhysicsObj* arg2, class IDClass<_tagDataID,32,0> arg3, uint32_t arg4, class Frame const* arg5, uint32_t arg6)

0051b6c0  {
0051b6c2      uint32_t next_emitter_id = arg6;
0051b6c2      
0051b6cb      if (next_emitter_id != 0)
0051b6cb      {
0051b6d1          class DetectionCylsphere* eax_1 = LongNIHash<DetectionCylsphere>::remove(&this->particle_table, next_emitter_id);
0051b6d1          
0051b6da          if (eax_1 != 0)
0051b6da          {
0051b6de              ParticleEmitter::~ParticleEmitter(eax_1);
0051b6e4              operator delete(eax_1);
0051b6da          }
0051b6cb      }
0051b6cb      
0051b6f1      class ParticleEmitter* eax_3 = ParticleEmitter::makeParticleEmitter(arg2);
0051b6f1      
0051b6fd      if (eax_3 != 0)
0051b6fd      {
0051b70d          if ((ParticleEmitter::SetInfo(eax_3, arg3) != 0 && ParticleEmitter::SetParenting(eax_3, arg4, arg5) != 0))
0051b70d          {
0051b726              ParticleEmitter::InitEnd(eax_3);
0051b726              
0051b731              if (next_emitter_id == 0)
0051b731              {
0051b733                  next_emitter_id = this->next_emitter_id;
0051b738                  this->next_emitter_id = (next_emitter_id + 1);
0051b731              }
0051b731              
0051b73f              eax_3->id = next_emitter_id;
0051b741              LongNIHash<DetectionInfo>::add(&this->particle_table, eax_3, next_emitter_id);
0051b74b              return next_emitter_id;
0051b70d          }
0051b70d          
0051b750          ParticleEmitter::~ParticleEmitter(eax_3);
0051b756          operator delete(eax_3);
0051b6fd      }
0051b6fd      
0051b763      return 0;
0051b6c0  }

0051b766                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0051b770  int32_t __thiscall ParticleManager::DestroyParticleEmitter(class ParticleManager* this, uint32_t arg2)

0051b770  {
0051b776      if (arg2 == 0)
0051b778          return arg2;
0051b778      
0051b780      class DetectionCylsphere* eax = LongNIHash<DetectionCylsphere>::remove(&this->particle_table, arg2);
0051b780      
0051b789      if (eax == 0)
0051b7a7          return 0;
0051b7a7      
0051b78d      ParticleEmitter::~ParticleEmitter(eax);
0051b793      operator delete(eax);
0051b7a1      return 1;
0051b770  }

0051b7aa                                90 90 90 90 90 90                                                            ......

0051b7b0  int32_t __thiscall ParticleManager::StopParticleEmitter(class ParticleManager* this, uint32_t arg2)

0051b7b0  {
0051b7b7      if (arg2 != 0)
0051b7b7      {
0051b7c5          struct LongNIHashData** buckets = this->particle_table.buckets;
0051b7c8          void** edx_3 = buckets[(COMBINE(0, ((arg2 >> 0x10) ^ arg2)) % this->particle_table.table_size)];
0051b7c8          
0051b7cd          if (edx_3 != 0)
0051b7cd          {
0051b7d2              while (edx_3[2] != arg2)
0051b7d2              {
0051b7d4                  edx_3 = *(uint32_t*)edx_3;
0051b7d4                  
0051b7d8                  if (edx_3 == 0)
0051b7f8                      return 0;
0051b7d2              }
0051b7d2              
0051b7df              void* edx_4 = edx_3[1];
0051b7df              
0051b7e4              if (edx_4 != 0)
0051b7e4              {
0051b7eb                  *(uint32_t*)((char*)edx_4 + 0x8c) = 1;
0051b7f2                  return buckets;
0051b7e4              }
0051b7cd          }
0051b7b7      }
0051b7b7      
0051b7f8      return 0;
0051b7b0  }

0051b7fb                                                                                   90 90 90 90 90                             .....

0051b800  void __fastcall ParticleManager::UpdateParticles(class ParticleManager* this)

0051b800  {
0051b80f      int32_t* var_10;
0051b80f      LongNIHashIter<DetectionCylsphere>::LongNIHashIter<DetectionCylsphere>(&var_10, &this->particle_table);
0051b81a      int32_t i;
0051b81a      
0051b81a      if (i == 0)
0051b81a      {
0051b81e          int32_t* ebp_1 = var_10;
0051b823          void** j_1;
0051b823          void** j = j_1;
0051b828          int32_t var_c;
0051b828          int32_t edi_1 = var_c;
0051b828          
0051b88e          do
0051b88e          {
0051b832              uint32_t* ebx_1;
0051b832              
0051b832              if (j == 0)
0051b839                  ebx_1 = nullptr;
0051b832              else
0051b834                  ebx_1 = j[1];
0051b834              
0051b841              if (i == 0)
0051b841              {
0051b847                  for (j = *(uint32_t*)j; j == 0; j = *(uint32_t*)(*(uint32_t*)ebp_1 + (edi_1 << 2)))
0051b847                  {
0051b84c                      edi_1 += 1;
0051b84c                      
0051b84f                      if (edi_1 >= ebp_1[1])
0051b84f                      {
0051b859                          i = 1;
0051b859                          break;
0051b84f                      }
0051b847                  }
0051b841              }
0051b841              
0051b863              int32_t eax_4 = ParticleEmitter::UpdateParticles(ebx_1);
0051b863              int16_t top = (top - 1);
0051b863              /* unimplemented  {call ParticleEmitter::UpdateParticles} */;
0051b863              
0051b86a              if (eax_4 == 0)
0051b86a              {
0051b873                  LongNIHash<DetectionCylsphere>::remove(&this->particle_table, *(uint32_t*)ebx_1);
0051b87a                  ParticleEmitter::~ParticleEmitter(ebx_1);
0051b880                  operator delete(ebx_1);
0051b86a              }
0051b88e          } while (i == 0);
0051b81a      }
0051b800  }

0051b898                                                                          90 90 90 90 90 90 90 90                          ........

0051b8a0  uint32_t __thiscall ParticleManager::CreateBlockingParticleEmitter(class ParticleManager* this, class CPhysicsObj* arg2, class IDClass<_tagDataID,32,0> arg3, uint32_t arg4, class Frame const* arg5, uint32_t arg6)

0051b8a0  {
0051b8a7      if (arg6 != 0)
0051b8a7      {
0051b8b8          void** edx_3 = this->particle_table.buckets[(COMBINE(0, ((arg6 >> 0x10) ^ arg6)) % this->particle_table.table_size)];
0051b8b8          
0051b8bd          if (edx_3 != 0)
0051b8bd          {
0051b8c2              while (edx_3[2] != arg6)
0051b8c2              {
0051b8c4                  edx_3 = *(uint32_t*)edx_3;
0051b8c4                  
0051b8c8                  if (edx_3 == 0)
0051b8f7                      return ParticleManager::CreateParticleEmitter(this, arg2, arg3, arg4, arg5, arg6);
0051b8c2              }
0051b8c2              
0051b8d4              if (edx_3[1] != 0)
0051b8d9                  return 0;
0051b8bd          }
0051b8a7      }
0051b8a7      
0051b8f7      return ParticleManager::CreateParticleEmitter(this, arg2, arg3, arg4, arg5, arg6);
0051b8a0  }

0051b8fa                                                                                90 90 90 90 90 90                            ......

0051b900  void __fastcall AtkCollisionProfile::AtkCollisionProfile(class AtkCollisionProfile* this)

0051b900  {
0051b904      this->part = 0xffffffff;
0051b90a      this->id = 0;
0051b90d      this->location = 0;
0051b900  }

0051b911                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0051b920  void __thiscall EnvCollisionProfile::SetMeInContact(class EnvCollisionProfile* this, int32_t const arg2)

0051b920  {
0051b926      uint32_t _bitfield = this->_bitfield;
0051b926      
0051b929      if (arg2 != 0)
0051b929      {
0051b92e          this->_bitfield = (_bitfield | 1);
0051b931          return;
0051b929      }
0051b929      
0051b937      this->_bitfield = (_bitfield & 0xfffffffe);
0051b920  }

0051b93d                                                                                         90 90 90                               ...

0051b940  void __thiscall ObjCollisionProfile::SetCreature(class ObjCollisionProfile* this, int32_t const arg2)

0051b940  {
0051b946      uint32_t _bitfield = this->_bitfield;
0051b946      
0051b949      if (arg2 != 0)
0051b949      {
0051b94e          this->_bitfield = (_bitfield | 1);
0051b951          return;
0051b949      }
0051b949      
0051b957      this->_bitfield = (_bitfield & 0xfffffffe);
0051b940  }

0051b95d                                                                                         90 90 90                               ...

0051b960  void __thiscall ObjCollisionProfile::SetPlayer(class ObjCollisionProfile* this, int32_t const arg2)

0051b960  {
0051b966      uint32_t _bitfield = this->_bitfield;
0051b966      
0051b969      if (arg2 != 0)
0051b969      {
0051b96e          this->_bitfield = (_bitfield | 2);
0051b971          return;
0051b969      }
0051b969      
0051b977      this->_bitfield = (_bitfield & 0xfffffffd);
0051b960  }

0051b97d                                                                                         90 90 90                               ...

0051b980  void __thiscall ObjCollisionProfile::SetDoor(class ObjCollisionProfile* this, int32_t const arg2)

0051b980  {
0051b986      uint32_t _bitfield = this->_bitfield;
0051b986      
0051b989      if (arg2 != 0)
0051b989      {
0051b98e          this->_bitfield = (_bitfield | 0x40);
0051b991          return;
0051b989      }
0051b989      
0051b997      this->_bitfield = (_bitfield & 0xffffffbf);
0051b980  }

0051b99d                                                                                         90 90 90                               ...

0051b9a0  void __thiscall ObjCollisionProfile::SetAttackable(class ObjCollisionProfile* this, int32_t const arg2)

0051b9a0  {
0051b9a6      uint32_t _bitfield = this->_bitfield;
0051b9a6      
0051b9a9      if (arg2 != 0)
0051b9a9      {
0051b9ae          this->_bitfield = (_bitfield | 4);
0051b9b1          return;
0051b9a9      }
0051b9a9      
0051b9b7      this->_bitfield = (_bitfield & 0xfffffffb);
0051b9a0  }

0051b9bd                                                                                         90 90 90                               ...

0051b9c0  void __thiscall ObjCollisionProfile::SetMissile(class ObjCollisionProfile* this, int32_t const arg2)

0051b9c0  {
0051b9c6      uint32_t _bitfield = this->_bitfield;
0051b9c6      
0051b9c9      if (arg2 != 0)
0051b9c9      {
0051b9ce          this->_bitfield = (_bitfield | 8);
0051b9d1          return;
0051b9c9      }
0051b9c9      
0051b9d7      this->_bitfield = (_bitfield & 0xfffffff7);
0051b9c0  }

0051b9dd                                                                                         90 90 90                               ...

0051b9e0  void __thiscall ObjCollisionProfile::SetInContact(class ObjCollisionProfile* this, int32_t const arg2)

0051b9e0  {
0051b9e6      uint32_t _bitfield = this->_bitfield;
0051b9e6      
0051b9e9      if (arg2 != 0)
0051b9e9      {
0051b9ee          this->_bitfield = (_bitfield | 0x10);
0051b9f1          return;
0051b9e9      }
0051b9e9      
0051b9f7      this->_bitfield = (_bitfield & 0xffffffef);
0051b9e0  }

0051b9fd                                                                                         90 90 90                               ...

0051ba00  void __thiscall ObjCollisionProfile::SetMeInContact(class ObjCollisionProfile* this, int32_t const arg2)

0051ba00  {
0051ba06      uint32_t _bitfield = this->_bitfield;
0051ba06      
0051ba09      if (arg2 != 0)
0051ba09      {
0051ba0e          this->_bitfield = (_bitfield | 0x20);
0051ba11          return;
0051ba09      }
0051ba09      
0051ba17      this->_bitfield = (_bitfield & 0xffffffdf);
0051ba00  }

0051ba1d                                                                                         90 90 90                               ...

0051ba20  void __fastcall EnvCollisionProfile::EnvCollisionProfile(class EnvCollisionProfile* this)

0051ba20  {
0051ba22      this->_bitfield = 0;
0051ba20  }

0051ba2a                                90 90 90 90 90 90                                                            ......

0051ba30  void __fastcall ObjCollisionProfile::ObjCollisionProfile(class ObjCollisionProfile* this)

0051ba30  {
0051ba34      this->id = 0;
0051ba3c      this->wcid.id = INVALID_DID.id;
0051ba3f      this->itemType = TYPE_UNDEF;
0051ba42      this->_bitfield = 0;
0051ba30  }

0051ba46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0051ba50  void __thiscall FPHook::FPHook(class FPHook* this, enum PhysicsObjHook::HookType arg2, double arg3, double arg4, float arg5, float arg6, void* arg7)

0051ba50  {
0051ba5a      this->hook_type = arg2;
0051ba61      this->time_created = arg3;
0051ba68      *(uint32_t*)((char*)this->time_created)[4] = *(uint32_t*)((char*)arg3)[4];
0051ba6f      this->interpolation_time = arg4;
0051ba76      *(uint32_t*)((char*)this->interpolation_time)[4] = *(uint32_t*)((char*)arg4)[4];
0051ba7b      this->prev = nullptr;
0051ba7e      this->next = nullptr;
0051ba85      this->user_data = arg7;
0051ba8c      this->vtable = 0x7c7028;
0051ba92      this->start_value = arg5;
0051ba95      this->end_value = arg6;
0051ba50  }

0051ba9b                                                                                   90 90 90 90 90                             .....

0051baa0  void __thiscall FPHook::Execute(class FPHook* this, class CPhysicsObj* arg2)

0051baa0  {
0051baa0      class FPHook* this_2 = this;
0051baa7      long double x87_r7_1 = (((long double)PhysicsTimer::curr_time) - ((long double)this->time_created));
0051baaa      (x87_r7_1 - ((long double)0.0));
0051bab2      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0051bab5      float var_4;
0051bab5      
0051bab5      if (p)
0051bab5      {
0051bac3          long double temp2_1 = ((long double)this->interpolation_time);
0051bac3          (x87_r7_1 - temp2_1);
0051bac3          
0051bacb          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 1) != 0)
0051badc              var_4 = ((float)(x87_r7_1 / ((long double)this->interpolation_time)));
0051bacb          else
0051bacf              var_4 = 1f;
0051bab5      }
0051bab5      else
0051bab9          var_4 = 0f;
0051bab9      
0051baea      class FPHook* this_1 = this;
0051bafd      CPhysicsObj::process_fp_hook(arg2, this->hook_type, ((float)(((((long double)this->end_value) - ((long double)this->start_value)) * ((long double)var_4)) + ((long double)this->start_value))), this->user_data);
0051bb02      long double x87_r7_7 = ((long double)var_4);
0051bb06      long double temp3 = ((long double)1f);
0051bb06      (x87_r7_7 - temp3);
0051bb0c      int32_t eax_2;
0051bb0c      eax_2 = ((((x87_r7_7 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp3) ? 1 : 0) << 0xe) | 0))));
0051bb0e      /* unimplemented  {test ah, 0x44} */;
0051baa0  }

0051bb22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0051bb30  void __thiscall CShadowObj::set_physobj(class CShadowObj* this, class CPhysicsObj* arg2)

0051bb30  {
0051bb34      this->physobj = arg2;
0051bb3a      this->id = arg2->id;
0051bb30  }


0051bb40  void __thiscall SetPositionStruct::SetFlags(class SetPositionStruct* this, uint32_t const arg2)

0051bb40  {
0051bb44      this->flags = arg2;
0051bb40  }

0051bb4a                                90 90 90 90 90 90                                                            ......

0051bb50  void __fastcall SetPositionStruct::SetPositionStruct(class SetPositionStruct* this)

0051bb50  {
0051bb56      this->pos.vtable = 0x796910;
0051bb5f      this->pos.objcell_id = 0;
0051bb53      this->pos.frame.qw = 0x3f800000;
0051bb53      this->pos.frame.qx = 0f;
0051bb53      this->pos.frame.qy = 0f;
0051bb53      this->pos.frame.qz = 0f;
0051bb53      this->pos.frame.m_fOrigin.x = 0;
0051bb53      this->pos.frame.m_fOrigin.y = 0f;
0051bb53      this->pos.frame.m_fOrigin.z = 0f;
0051bb7a      Frame::cache(&this->pos.frame);
0051bb7f      __builtin_memset(&this->flags, 0, 0x1c);
0051bb50  }

0051bb99                                                                             90 90 90 90 90 90 90                           .......

0051bba0  void __thiscall SetPositionStruct::SetPosition(class SetPositionStruct* this, class Position const* arg2)

0051bba0  {
0051bbaa      this->pos.objcell_id = arg2->objcell_id;
0051bbb4      /* tailcall */
0051bbb4      return Frame::operator=(&this->pos.frame, &arg2->frame.qw);
0051bba0  }

0051bbb9                                                                             90 90 90 90 90 90 90                           .......

0051bbc0  void __thiscall MotionTableManager::SetPhysicsObject(class MotionTableManager* this, class CPhysicsObj* arg2)

0051bbc0  {
0051bbc4      this->physics_obj = arg2;
0051bbc0  }

0051bbc9                             90 90 90 90 90 90 90                                                           .......

0051bbd0  int32_t __thiscall MotionTableManager::SetMotionTableID(class MotionTableManager* this, class IDClass<_tagDataID,32,0> arg2)

0051bbd0  {
0051bbd6      class CMotionTable* table = this->table;
0051bbd6      
0051bbdb      if (table != 0)
0051bbdd          table->vtable->Release();
0051bbdd      
0051bbf3      void var_8;
0051bbf3      class CMotionTable* eax_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0xe));
0051bbff      int32_t result;
0051bbff      result = eax_3 != 0;
0051bc02      this->table = eax_3;
0051bc0b      return result;
0051bbd0  }

0051bc0e                                            90 90                                                                ..

0051bc10  class IDClass<_tagDataID,32,0>* __thiscall MotionTableManager::GetMotionTableID(class MotionTableManager const* this, class IDClass<_tagDataID,32,0>* __return)

0051bc10  {
0051bc10      class MotionTableManager* this_1 = this;
0051bc19      class CMotionTable* table = this->table;
0051bc19      
0051bc1e      if (table != 0)
0051bc1e      {
0051bc2d          uint32_t* __return_1 = __return;
0051bc31          *(uint32_t*)__return_1 = table->m_DID.id;
0051bc34          return __return_1;
0051bc1e      }
0051bc1e      
0051bc3e      uint32_t* __return_2 = __return;
0051bc42      *(uint32_t*)__return_2 = INVALID_DID.id;
0051bc45      return __return_2;
0051bc10  }

0051bc48                          90 90 90 90 90 90 90 90                                                          ........

0051bc50  class MotionTableManager* MotionTableManager::Create(class IDClass<_tagDataID,32,0> arg1)

0051bc50  {
0051bc54      void* result = operator new(0x2c);
0051bc54      
0051bc62      if (result == 0)
0051bc97          return 0;
0051bc97      
0051bc67      *(uint32_t*)result = 0;
0051bc69      *(uint32_t*)((char*)result + 4) = 0;
0051bc6c      MotionState::MotionState(((char*)result + 8));
0051bc75      *(uint32_t*)((char*)result + 0x20) = 0;
0051bc78      *(uint32_t*)((char*)result + 0x24) = 0;
0051bc7b      *(uint32_t*)((char*)result + 0x28) = 0;
0051bc7b      
0051bc84      if (arg1 != INVALID_DID.id)
0051bc89          MotionTableManager::SetMotionTableID(result, arg1);
0051bc89      
0051bc92      return result;
0051bc50  }

0051bc98                                                                          90 90 90 90 90 90 90 90                          ........

0051bca0  void __thiscall MotionTableManager::truncate_animation_list(class MotionTableManager* this, class MotionTableManager::AnimNode const* arg2, class CSequence* arg3)

0051bca0  {
0051bca7      if (arg2 != 0)
0051bca7      {
0051bca9          class DLListData* eax_1 = this->pending_animations.tail_;
0051bcac          uint32_t edx_1 = 0;
0051bcac          
0051bcb0          while (eax_1 != arg2)
0051bcb0          {
0051bcb4              if (eax_1 == 0)
0051bcd4                  return;
0051bcd4              
0051bcb6              int32_t ecx = *(int32_t*)((char*)eax_1 + 0xc);
0051bcb9              *(int32_t*)((char*)eax_1 + 0xc) = 0;
0051bcc0              eax_1 = eax_1->dllist_prev;
0051bcc3              edx_1 += ecx;
0051bcb0          }
0051bcb0          
0051bcce          CSequence::remove_link_animations(arg3, edx_1);
0051bca7      }
0051bca0  }

0051bcd7                                                                       90 90 90 90 90 90 90 90 90                         .........

0051bce0  void __thiscall MotionTableManager::AnimationDone(class MotionTableManager* this, int32_t arg2)

0051bce0  {
0051bce5      class DLListData* head__1 = this->pending_animations.head_;
0051bce5      
0051bcec      if (head__1 != 0)
0051bcec      {
0051bcfb          this->animation_counter += 1;
0051bcfe          class DLListData* head__2 = head__1;
0051bcfe          
0051bd06          while (*(int32_t*)((char*)head__2 + 0xc) <= this->animation_counter)
0051bd06          {
0051bd0f              if ((*(int32_t*)((char*)head__2 + 8) & 0x10000000) != 0)
0051bd14                  MotionState::remove_action_head(&this->state);
0051bd14              
0051bd20              CPhysicsObj::MotionDone(this->physics_obj, *(int32_t*)((char*)head__2 + 8), arg2);
0051bd28              this->animation_counter -= *(int32_t*)((char*)head__2 + 0xc);
0051bd2b              class DLListData* head_ = this->pending_animations.head_;
0051bd2b              
0051bd30              if (head_ != 0)
0051bd30              {
0051bd32                  class DLListData* dllist_prev = head_->dllist_prev;
0051bd32                  
0051bd37                  if (dllist_prev == 0)
0051bd37                  {
0051bd3f                      class DLListData* dllist_next = head_->dllist_next;
0051bd43                      this->pending_animations.head_ = dllist_next;
0051bd43                      
0051bd46                      if (dllist_next != 0)
0051bd48                          dllist_next->dllist_prev = nullptr;
0051bd37                  }
0051bd37                  else
0051bd3b                      dllist_prev->dllist_next = head_->dllist_next;
0051bd3b                  
0051bd4b                  class DLListData* dllist_next_1 = head_->dllist_next;
0051bd4b                  
0051bd4f                  if (dllist_next_1 == 0)
0051bd4f                  {
0051bd5c                      class DLListData* dllist_prev_1 = this->pending_animations.tail_->dllist_prev;
0051bd61                      this->pending_animations.tail_ = dllist_prev_1;
0051bd61                      
0051bd64                      if (dllist_prev_1 != 0)
0051bd66                          dllist_prev_1->dllist_next = 0;
0051bd4f                  }
0051bd4f                  else
0051bd54                      dllist_next_1->dllist_prev = head_->dllist_prev;
0051bd54                  
0051bd6a                  head_->dllist_next = 0;
0051bd6c                  head_->dllist_prev = nullptr;
0051bd6c                  
0051bd6f                  if (head_ != 0)
0051bd72                      operator delete(head_);
0051bd30              }
0051bd30              
0051bd7a              head__2 = this->pending_animations.head_;
0051bd7a              
0051bd7f              if (head__2 == 0)
0051bd7f                  break;
0051bd06          }
0051bd06          
0051bd8d          if ((this->animation_counter != 0 && head__2 == 0))
0051bd8f              this->animation_counter = 0;
0051bcec      }
0051bce0  }

0051bd98                                                                          90 90 90 90 90 90 90 90                          ........

0051bda0  void __fastcall MotionTableManager::HandleExitWorld(class MotionTableManager* this, class CSequence* arg2)

0051bda0  {
0051bda8      while (this->pending_animations.head_ != 0)
0051bdb4          MotionTableManager::AnimationDone(this, 0);
0051bda0  }

0051bdc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0051bdd0  void __thiscall MotionTableManager::HandleEnterWorld(class MotionTableManager* this, class CSequence* arg2)

0051bdd0  {
0051bdd7      CSequence::remove_all_link_animations(arg2);
0051bdd7      
0051bde1      while (this->pending_animations.head_ != 0)
0051bde7          MotionTableManager::AnimationDone(this, 0);
0051bdd0  }

0051bdf7                                                                       90 90 90 90 90 90 90 90 90                         .........

0051be00  void __fastcall MotionTableManager::CheckForCompletedMotions(class MotionTableManager* this)

0051be00  {
0051be05      class DLListData* head__1 = this->pending_animations.head_;
0051be05      
0051be0c      if (head__1 != 0)
0051be0c      {
0051be13          while (*(int32_t*)((char*)head__1 + 0xc) == 0)
0051be13          {
0051be1c              if ((*(int32_t*)((char*)head__1 + 8) & 0x10000000) != 0)
0051be21                  MotionState::remove_action_head(&this->state);
0051be21              
0051be2e              CPhysicsObj::MotionDone(this->physics_obj, *(int32_t*)((char*)head__1 + 8), 1);
0051be33              class DLListData* head_ = this->pending_animations.head_;
0051be33              
0051be38              if (head_ != 0)
0051be38              {
0051be3a                  class DLListData* dllist_prev = head_->dllist_prev;
0051be3a                  
0051be3f                  if (dllist_prev == 0)
0051be3f                  {
0051be47                      class DLListData* dllist_next = head_->dllist_next;
0051be4b                      this->pending_animations.head_ = dllist_next;
0051be4b                      
0051be4e                      if (dllist_next != 0)
0051be50                          dllist_next->dllist_prev = nullptr;
0051be3f                  }
0051be3f                  else
0051be43                      dllist_prev->dllist_next = head_->dllist_next;
0051be43                  
0051be53                  class DLListData* dllist_next_1 = head_->dllist_next;
0051be53                  
0051be57                  if (dllist_next_1 == 0)
0051be57                  {
0051be64                      class DLListData* dllist_prev_1 = this->pending_animations.tail_->dllist_prev;
0051be69                      this->pending_animations.tail_ = dllist_prev_1;
0051be69                      
0051be6c                      if (dllist_prev_1 != 0)
0051be6e                          dllist_prev_1->dllist_next = 0;
0051be57                  }
0051be57                  else
0051be5c                      dllist_next_1->dllist_prev = head_->dllist_prev;
0051be5c                  
0051be72                  head_->dllist_next = 0;
0051be74                  head_->dllist_prev = nullptr;
0051be74                  
0051be77                  if (head_ != 0)
0051be7a                      operator delete(head_);
0051be38              }
0051be38              
0051be82              head__1 = this->pending_animations.head_;
0051be82              
0051be87              if (head__1 == 0)
0051be87                  break;
0051be13          }
0051be0c      }
0051be00  }

0051be8d                                         90 90 90                                                               ...

0051be90  void __fastcall MotionTableManager::Destroy(class MotionTableManager* this)

0051be90  {
0051be96      while (true)
0051be96      {
0051be96          class DLListData* head_ = this->pending_animations.head_;
0051be96          
0051be9b          if (head_ == 0)
0051be9b              break;
0051be9b          
0051be9d          class DLListData* dllist_prev = head_->dllist_prev;
0051be9d          
0051bea2          if (dllist_prev == 0)
0051bea2          {
0051beaa              class DLListData* dllist_next = head_->dllist_next;
0051beae              this->pending_animations.head_ = dllist_next;
0051beae              
0051beb1              if (dllist_next != 0)
0051beb3                  dllist_next->dllist_prev = nullptr;
0051bea2          }
0051bea2          else
0051bea6              dllist_prev->dllist_next = head_->dllist_next;
0051bea6          
0051beb6          class DLListData* dllist_next_1 = head_->dllist_next;
0051beb6          
0051beba          if (dllist_next_1 == 0)
0051beba          {
0051bec7              class DLListData* dllist_prev_1 = this->pending_animations.tail_->dllist_prev;
0051becc              this->pending_animations.tail_ = dllist_prev_1;
0051becc              
0051becf              if (dllist_prev_1 != 0)
0051bed1                  dllist_prev_1->dllist_next = 0;
0051beba          }
0051beba          else
0051bebf              dllist_next_1->dllist_prev = head_->dllist_prev;
0051bebf          
0051bed5          head_->dllist_next = 0;
0051bed7          head_->dllist_prev = nullptr;
0051bed7          
0051beda          if (head_ == 0)
0051beda              break;
0051beda          
0051bedd          operator delete(head_);
0051be96      }
0051be96      
0051bee7      class CMotionTable* table = this->table;
0051bee7      
0051beec      if (table != 0)
0051beec      {
0051beee          table->vtable->Release();
0051bef3          this->table = nullptr;
0051beec      }
0051be90  }

0051bef9                                                                             90 90 90 90 90 90 90                           .......

0051bf00  void __fastcall MotionTableManager::~MotionTableManager(class MotionTableManager* this)

0051bf00  {
0051bf03      MotionTableManager::Destroy(this);
0051bf0c      /* tailcall */
0051bf0c      return MotionState::~MotionState(&this->state);
0051bf00  }

0051bf11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0051bf20  void __thiscall MotionTableManager::remove_redundant_links(class MotionTableManager* this, class CSequence* arg2)

0051bf20  {
0051bf20      class DLListData* eax = this->pending_animations.tail_;
0051bf20      
0051bf25      if (eax != 0)
0051bf25      {
0051bf35          while (*(int32_t*)((char*)eax + 0xc) == 0)
0051bf35          {
0051bf37              eax = eax->dllist_prev;
0051bf37              
0051bf3c              if (eax == 0)
0051bf3e                  return;
0051bf35          }
0051bf35          
0051bf41          int32_t edx_2 = *(int32_t*)((char*)eax + 8);
0051bf56          class DLListData* dllist_prev;
0051bf56          
0051bf56          if (((edx_2 & 0x40000000) != 0 && (edx_2 & 0x20000000) == 0))
0051bf56          {
0051bf58              dllist_prev = eax->dllist_prev;
0051bf58              
0051bf5d              if (dllist_prev != 0)
0051bf5d              {
0051bf60                  while (true)
0051bf60                  {
0051bf60                      int32_t edx_3 = *(int32_t*)((char*)dllist_prev + 8);
0051bf60                      
0051bf6c                      if ((edx_3 == edx_2 && *(int32_t*)((char*)dllist_prev + 0xc) != 0))
0051bf6c                          break;
0051bf6c                      
0051bf7b                      if ((*(int32_t*)((char*)dllist_prev + 0xc) != 0 && (edx_3 & 0xb0000000) != 0))
0051bfc3                          return;
0051bfc3                      
0051bf7d                      dllist_prev = dllist_prev->dllist_prev;
0051bf7d                      
0051bf82                      if (dllist_prev == 0)
0051bf86                          return;
0051bf60                  }
0051bf60                  
0051bfbc                  MotionTableManager::truncate_animation_list(this, dllist_prev, arg2);
0051bf5d              }
0051bf56          }
0051bf56          else if (edx_2 < 0)
0051bf8b          {
0051bf8d              dllist_prev = eax->dllist_prev;
0051bf8d              
0051bf92              if (dllist_prev != 0)
0051bf92              {
0051bf94                  while (true)
0051bf94                  {
0051bf94                      int32_t edx_4 = *(int32_t*)((char*)dllist_prev + 8);
0051bf94                      
0051bf99                      if (edx_4 == edx_2)
0051bf99                          break;
0051bf99                      
0051bfa8                      if ((*(int32_t*)((char*)dllist_prev + 0xc) != 0 && (edx_4 & 0x70000000) != 0))
0051bfc3                          return;
0051bfc3                      
0051bfaa                      dllist_prev = dllist_prev->dllist_prev;
0051bfaa                      
0051bfaf                      if (dllist_prev == 0)
0051bfb3                          return;
0051bf94                  }
0051bf94                  
0051bfbc                  MotionTableManager::truncate_animation_list(this, dllist_prev, arg2);
0051bf92              }
0051bf8b          }
0051bf25      }
0051bf20  }

0051bf2d                                         8d 49 00                                                               .I.
0051bfc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0051bfd0  void __fastcall MotionTableManager::UseTime(class MotionTableManager* this)

0051bfd0  {
0051bfd0      /* tailcall */
0051bfd0      return MotionTableManager::CheckForCompletedMotions(this);
0051bfd0  }

0051bfd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051bfe0  void __thiscall MotionTableManager::add_to_queue(class MotionTableManager* this, uint32_t arg2, uint32_t arg3, class CSequence* arg4)

0051bfe0  {
0051bfe5      void* eax = operator new(0x10);
0051bfe5      
0051bfef      if (eax == 0)
0051c00e          eax = nullptr;
0051bfef      else
0051bfef      {
0051bff9          *(uint32_t*)eax = 0;
0051bfff          *(uint32_t*)((char*)eax + 4) = 0;
0051c006          *(uint32_t*)((char*)eax + 8) = arg2;
0051c009          *(uint32_t*)((char*)eax + 0xc) = arg3;
0051bfef      }
0051bfef      
0051c018      DLListBase::InsertAfter(&this->pending_animations, eax, this->pending_animations.tail_);
0051c024      MotionTableManager::remove_redundant_links(this, arg4);
0051bfe0  }

0051c02d                                         90 90 90                                                               ...

0051c030  void __thiscall MotionTableManager::initialize_state(class MotionTableManager* this, class CSequence* arg2)

0051c030  {
0051c030      class MotionTableManager* this_1 = this;
0051c039      class CMotionTable* table = this->table;
0051c03f      this_1 = nullptr;
0051c03f      
0051c047      if (table != 0)
0051c05d          CMotionTable::SetDefaultState(table, &this->state, arg2, &this_1);
0051c047      else
0051c049          this_1 = nullptr;
0051c049      
0051c062      class MotionTableManager* this_2 = this_1;
0051c068      void* eax = operator new(0x10);
0051c068      
0051c072      if (eax == 0)
0051c08d          eax = nullptr;
0051c072      else
0051c072      {
0051c074          *(uint32_t*)eax = 0;
0051c07a          *(uint32_t*)((char*)eax + 4) = 0;
0051c081          *(uint32_t*)((char*)eax + 8) = 0x41000003;
0051c088          *(uint32_t*)((char*)eax + 0xc) = this_2;
0051c072      }
0051c072      
0051c097      DLListBase::InsertAfter(&this->pending_animations, eax, this->pending_animations.tail_);
0051c09f      MotionTableManager::remove_redundant_links(this, arg2);
0051c030  }

0051c0ab                                   90 90 90 90 90                                                             .....

0051c0b0  uint32_t __thiscall MotionTableManager::PerformMovement(class MotionTableManager* this, class MovementStruct const* arg2, class CSequence* arg3)

0051c0b0  {
0051c0b0      class MotionTableManager* this_1 = this;
0051c0b4      class CMotionTable* table = this->table;
0051c0b4      
0051c0b9      if (table == 0)
0051c0c2          return 7;
0051c0c2      
0051c0cb      enum MovementTypes::Type type = arg2->type;
0051c0d0      this_1 = nullptr;
0051c0d0      
0051c0d8      if (type == InterpretedCommand)
0051c0d8      {
0051c159          if (CMotionTable::DoObjectMotion(table, arg2->motion, &this->state, arg3, arg2->params->speed, &this_1) != 0)
0051c159          {
0051c167              MotionTableManager::add_to_queue(this, arg2->motion, this_1, arg3);
0051c172              return 0;
0051c159          }
0051c0d8      }
0051c0d8      else
0051c0d8      {
0051c0dd          if (type != 4)
0051c0dd          {
0051c0e0              if (type != 5)
0051c189                  return arg3;
0051c189              
0051c0f4              CMotionTable::StopObjectCompletely(table, &this->state, arg3, &this_1);
0051c12b              MotionTableManager::add_to_queue(this, 0x41000003, this_1, arg3);
0051c136              return 0;
0051c0dd          }
0051c0dd          
0051c11c          if (CMotionTable::StopObjectMotion(table, arg2->motion, arg2->params->speed, &this->state, arg3, &this_1) != 0)
0051c11c          {
0051c12b              MotionTableManager::add_to_queue(this, 0x41000003, this_1, arg3);
0051c136              return 0;
0051c11c          }
0051c0d8      }
0051c0d8      
0051c17e      return 0x43;
0051c0b0  }

0051c18c                                      90 90 90 90                                                              ....

0051c190  int32_t __thiscall ParticleEmitter::SetParenting(class ParticleEmitter* this, uint32_t arg2, class Frame const* arg3)

0051c190  {
0051c195      class CPhysicsObj* physobj = this->physobj;
0051c195      
0051c19d      if ((physobj != 0 && CPhysicsObj::set_parent(physobj, this->parent, arg2, arg3) != 0))
0051c19d      {
0051c1ba          this->part_index = arg2;
0051c1bd          Frame::operator=(&this->parent_offset, arg3);
0051c1cb          return 1;
0051c19d      }
0051c19d      
0051c1d4      return 0;
0051c190  }

0051c1d7                                                                       90 90 90 90 90 90 90 90 90                         .........

0051c1e0  int32_t __thiscall ParticleEmitter::KillParticle(class ParticleEmitter* this, uint32_t arg2)

0051c1e0  {
0051c1f0      void* eax_2 = &this->particles[arg2];
0051c1f3      long double x87_r7 = ((long double)*(uint64_t*)((char*)eax_2 + 0x10));
0051c1f6      long double temp1 = ((long double)*(uint64_t*)((char*)eax_2 + 8));
0051c1f6      (x87_r7 - temp1);
0051c1f9      eax_2 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0051c1fb      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0051c1fb      
0051c1fe      if (!(p))
0051c22a          return 0;
0051c22a      
0051c20a      CPhysicsObj::RemovePartFromShadowCells(this->physobj, this->parts[arg2]);
0051c20f      this->parts[arg2] = 0;
0051c219      this->num_particles -= 1;
0051c223      return 1;
0051c1e0  }

0051c22d                                         90 90 90                                                               ...

0051c230  int32_t __fastcall ParticleEmitter::StopEmitter(class ParticleEmitter* this)

0051c230  {
0051c238      if (this->stopped == 0)
0051c238      {
0051c23a          class ParticleEmitterInfo* info = this->info;
0051c23d          long double x87_r7_1 = ((long double)info->total_seconds);
0051c240          long double temp0_1 = ((long double)0.0);
0051c240          (x87_r7_1 - temp0_1);
0051c246          int32_t eax;
0051c246          eax = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0051c246          
0051c24b          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0051c24b          {
0051c250              long double x87_r7_3 = (((long double)this->creation_time) + ((long double)info->total_seconds));
0051c253              long double temp1_1 = ((long double)PhysicsTimer::curr_time);
0051c253              (x87_r7_3 - temp1_1);
0051c259              eax = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0051c25b              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0051c25b              
0051c25e              if (!(p_1))
0051c260                  this->stopped = 1;
0051c24b          }
0051c24b          
0051c26a          int32_t total_particles = info->total_particles;
0051c26a          
0051c274          if ((total_particles != 0 && this->total_emitted >= total_particles))
0051c276              this->stopped = 1;
0051c238      }
0051c238      
0051c286      return this->stopped;
0051c230  }

0051c287                       90 90 90 90 90 90 90 90 90                                                         .........

0051c290  void __thiscall Particle::Update(class Particle* this, enum ParticleType arg2, int32_t arg3, class CPhysicsPart* arg4, class Frame* arg5)

0051c290  {
0051c2a5      double* this_1 = this;
0051c2a7      long double x87_r7_1 = (((long double)PhysicsTimer::curr_time) - ((long double)*(uint64_t*)this_1));
0051c2a7      
0051c2aa      if (arg3 == 0)
0051c2c4          this_1[2] = ((double)x87_r7_1);
0051c2aa      else
0051c2aa      {
0051c2af          this_1[2] = ((double)(x87_r7_1 + ((long double)this_1[2])));
0051c2b7          int32_t ecx = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051c2bd          *(uint32_t*)this_1 = (*(uint32_t*)PhysicsTimer::curr_time);
0051c2bf          *(uint32_t*)((char*)this_1 + 4) = ecx;
0051c2aa      }
0051c2aa      
0051c2d1      if ((arg2 - 1) <= 0xb)
0051c2d7          switch (arg2)
0051c2d7          {
0051c2ed              case Still_PT:
0051c2ed              {
0051c2ed                  void __return;
0051c2ed                  class Vector3* eax_4 = Vector3::operator+(&arg5->m_fOrigin, &__return, &this_1[0xb]);
0051c306                  arg4->pos.frame.m_fOrigin.x = eax_4->x;
0051c306                  arg4->pos.frame.m_fOrigin.y = eax_4->y;
0051c306                  arg4->pos.frame.m_fOrigin.z = eax_4->z;
0051c2ed                  break;
0051c2ed              }
0051c322              case LocalVelocity_PT:
0051c322              case GlobalVelocity_PT:
0051c322              {
0051c322                  long double x87_r7_3 = ((long double)*(uint64_t*)&this_1[2]);
0051c32a                  arg4->pos.frame.m_fOrigin.x = ((float)((((long double)arg5->m_fOrigin.x) + ((long double)*(uint32_t*)&this_1[0xb])) + ((long double)((float)(x87_r7_3 * ((long double)*(uint32_t*)((char*)this_1 + 0x64)))))));
0051c32a                  arg4->pos.frame.m_fOrigin.y = ((float)(((long double)((float)(((long double)*(uint32_t*)((char*)this_1 + 0x5c)) + ((long double)arg5->m_fOrigin.y)))) + ((long double)((float)(x87_r7_3 * ((long double)*(uint32_t*)&this_1[0xd]))))));
0051c32a                  arg4->pos.frame.m_fOrigin.z = ((float)(((long double)((float)(((long double)*(uint32_t*)&this_1[0xc]) + ((long double)arg5->m_fOrigin.z)))) + (x87_r7_3 * ((long double)*(uint32_t*)((char*)this_1 + 0x6c)))));
0051c322                  break;
0051c322              }
0051c3c8              case ParabolicLVGA_PT:
0051c3c8              case ParabolicLVLA_PT:
0051c3c8              case ParabolicGVGA_PT:
0051c3c8              {
0051c3c8                  long double x87_r7_11 = ((long double)*(uint64_t*)&this_1[2]);
0051c3e9                  float var_7c_1 = ((float)x87_r7_11);
0051c45a                  long double x87_r7_15 = (((x87_r7_11 * ((long double)*(uint32_t*)((char*)this_1 + 0x64))) + (((long double)*(uint32_t*)&this_1[0xb]) + ((long double)arg5->m_fOrigin.x))) + ((long double)((float)((((long double)((float)(((long double)*(uint32_t*)&this_1[0xe]) * ((long double)0.5f)))) * x87_r7_11) * ((long double)var_7c_1)))));
0051c462                  long double x87_r6_25 = (((long double)((float)(((long double)((float)(((long double)*(uint32_t*)((char*)this_1 + 0x5c)) + ((long double)arg5->m_fOrigin.y)))) + ((long double)((float)(x87_r7_11 * ((long double)*(uint32_t*)&this_1[0xd]))))))) + ((long double)((float)(((long double)((float)(((long double)((float)(((long double)*(uint32_t*)((char*)this_1 + 0x74)) * ((long double)0.5f)))) * x87_r7_11))) * ((long double)var_7c_1)))));
0051c46a                  long double x87_r5_18 = (((long double)((float)(((long double)((float)(((long double)*(uint32_t*)&this_1[0xc]) + ((long double)arg5->m_fOrigin.z)))) + ((long double)((float)(x87_r7_11 * ((long double)*(uint32_t*)((char*)this_1 + 0x6c)))))))) + ((long double)((float)(((long double)((float)(((long double)((float)(((long double)*(uint32_t*)&this_1[0xf]) * ((long double)0.5f)))) * x87_r7_11))) * ((long double)var_7c_1)))));
0051c3a7                  arg4->pos.frame.m_fOrigin.x = ((float)x87_r7_15);
0051c3a7                  arg4->pos.frame.m_fOrigin.y = ((float)x87_r6_25);
0051c3a7                  arg4->pos.frame.m_fOrigin.z = ((float)x87_r5_18);
0051c3c8                  break;
0051c3c8              }
0051c4a5              case ParabolicLVGAGR_PT:
0051c4a5              case ParabolicLVLALR_PT:
0051c4a5              case ParabolicGVGAGR_PT:
0051c4a5              {
0051c4a5                  void var_48;
0051c4a5                  Frame::operator=(&var_48, arg5);
0051c4d6                  long double x87_r7_23 = ((long double)*(uint64_t*)&this_1[2]);
0051c4f7                  float var_7c_2 = ((float)x87_r7_23);
0051c4fb                  long double x87_r5_21 = ((((long double)((float)(((long double)*(uint32_t*)&this_1[0xe]) * ((long double)0.5f)))) * x87_r7_23) * ((long double)var_7c_2));
0051c505                  long double x87_r5_23 = (((long double)((float)(((long double)((float)(((long double)*(uint32_t*)((char*)this_1 + 0x74)) * ((long double)0.5f)))) * x87_r7_23))) * ((long double)var_7c_2));
0051c511                  float var_64_4 = ((float)(((long double)((float)(((long double)((float)(((long double)*(uint32_t*)&this_1[0xf]) * ((long double)0.5f)))) * x87_r7_23))) * ((long double)var_7c_2)));
0051c538                  float var_5c_2 = ((float)(((long double)((float)(x87_r5_21 * ((long double)*(uint32_t*)&this_1[0xd])))) + ((long double)*(uint32_t*)((char*)this_1 + 0x5c))));
0051c543                  float var_58_2 = ((float)(((long double)((float)(x87_r5_21 * ((long double)*(uint32_t*)((char*)this_1 + 0x6c))))) + ((long double)*(uint32_t*)&this_1[0xc])));
0051c549                  float var_54 = ((float)(((x87_r5_21 * ((long double)*(uint32_t*)((char*)this_1 + 0x64))) + ((long double)*(uint32_t*)&this_1[0xb])) + x87_r7_23));
0051c55b                  long double x87_r5_25 = (((long double)var_58_2) + ((long double)var_64_4));
0051c567                  float var_14;
0051c567                  float var_14_1 = ((float)(((long double)var_14) + ((long double)var_54)));
0051c571                  float var_10;
0051c571                  float var_10_1 = ((float)(((long double)var_10) + x87_r5_23));
0051c57e                  float var_c;
0051c57e                  float var_c_1 = ((float)(((long double)var_c) + x87_r5_25));
0051c590                  long double x87_r5_27 = (x87_r5_25 * ((long double)*(uint32_t*)&this_1[0x10]));
0051c5a6                  float var_4c_6 = ((float)(x87_r5_25 * ((long double)*(uint32_t*)((char*)this_1 + 0x84))));
0051c5aa                  var_54 = ((float)(x87_r5_25 * ((long double)*(uint32_t*)((char*)this_1 + 0x7c))));
0051c5b2                  float var_50_4 = ((float)x87_r5_27);
0051c5b6                  Frame::rotate(&var_48, &var_54);
0051c5c3                  Frame::operator=(&arg4->pos.frame, &var_48);
0051c4a5                  break;
0051c4a5              }
0051c5cd              case Swarm_PT:
0051c5cd              {
0051c5cd                  long double x87_r7_28 = ((long double)*(uint64_t*)&this_1[2]);
0051c5dc                  long double st0_1;
0051c5dc                  bool c2_1;
0051c5dc                  st0_1 = __fcos((((long double)*(uint32_t*)&this_1[0xe]) * ((long double)*(uint64_t*)&this_1[2])));
0051c5ee                  float var_78_8 = ((float)((((st0_1 * ((long double)*(uint32_t*)((char*)this_1 + 0x7c))) + (x87_r7_28 * ((long double)*(uint32_t*)((char*)this_1 + 0x64)))) + ((long double)*(uint32_t*)&this_1[0xb])) + ((long double)arg5->m_fOrigin.x)));
0051c5fc                  long double st0_2;
0051c5fc                  bool c2_2;
0051c5fc                  st0_2 = __fsin((((long double)*(uint32_t*)((char*)this_1 + 0x74)) * ((long double)*(uint64_t*)&this_1[2])));
0051c611                  float var_74_8 = ((float)((((st0_2 * ((long double)*(uint32_t*)&this_1[0x10])) + (x87_r7_28 * ((long double)*(uint32_t*)&this_1[0xd]))) + ((long double)*(uint32_t*)((char*)this_1 + 0x5c))) + ((long double)arg5->m_fOrigin.y)));
0051c61b                  long double st0_3;
0051c61b                  bool c2_3;
0051c61b                  st0_3 = __fcos((((long double)*(uint32_t*)&this_1[0xf]) * ((long double)*(uint64_t*)&this_1[2])));
0051c5d6                  arg4->pos.frame.m_fOrigin.x = var_78_8;
0051c5d6                  arg4->pos.frame.m_fOrigin.y = var_74_8;
0051c5d6                  arg4->pos.frame.m_fOrigin.z = ((float)((((st0_3 * ((long double)*(uint32_t*)((char*)this_1 + 0x84))) + (x87_r7_28 * ((long double)*(uint32_t*)((char*)this_1 + 0x6c)))) + ((long double)*(uint32_t*)&this_1[0xc])) + ((long double)arg5->m_fOrigin.z)));
0051c5cd                  break;
0051c5cd              }
0051c6bc              case Explode_PT:
0051c6bc              {
0051c6bc                  long double x87_r7_4 = ((long double)*(uint64_t*)&this_1[2]);
0051c6da                  float var_78_10 = ((float)(((((x87_r7_4 * ((long double)*(uint32_t*)&this_1[0xe])) + (((long double)*(uint32_t*)((char*)this_1 + 0x7c)) * ((long double)*(uint32_t*)((char*)this_1 + 0x64)))) * x87_r7_4) + ((long double)*(uint32_t*)&this_1[0xb])) + ((long double)arg5->m_fOrigin.x)));
0051c6f6                  float var_74_10 = ((float)(((((x87_r7_4 * ((long double)*(uint32_t*)((char*)this_1 + 0x74))) + (((long double)*(uint32_t*)&this_1[0x10]) * ((long double)*(uint32_t*)((char*)this_1 + 0x64)))) * x87_r7_4) + ((long double)*(uint32_t*)((char*)this_1 + 0x5c))) + ((long double)arg5->m_fOrigin.y)));
0051c713                  long double x87_r6_75 = (((((x87_r7_4 * ((long double)*(uint32_t*)&this_1[0xf])) + (((long double)*(uint32_t*)((char*)this_1 + 0x84)) * ((long double)*(uint32_t*)((char*)this_1 + 0x64)))) + ((long double)*(uint32_t*)((char*)this_1 + 0x6c))) * x87_r7_4) + ((long double)*(uint32_t*)&this_1[0xc]));
0051c6c4                  arg4->pos.frame.m_fOrigin.x = var_78_10;
0051c6c4                  arg4->pos.frame.m_fOrigin.y = var_74_10;
0051c6c4                  arg4->pos.frame.m_fOrigin.z = ((float)(x87_r6_75 + ((long double)arg5->m_fOrigin.z)));
0051c6bc                  break;
0051c6bc              }
0051c652              case Implode_PT:
0051c652              {
0051c652                  long double st0_4;
0051c652                  bool c2_4;
0051c652                  st0_4 = __fcos((((long double)*(uint32_t*)((char*)this_1 + 0x64)) * ((long double)*(uint64_t*)&this_1[2])));
0051c654                  long double x87_r6_52 = ((long double)*(uint64_t*)&this_1[2]);
0051c659                  long double x87_r6_53 = (x87_r6_52 * x87_r6_52);
0051c6a7                  arg4->pos.frame.m_fOrigin.x = ((float)((((st0_4 * ((long double)*(uint32_t*)((char*)this_1 + 0x7c))) + (x87_r6_53 * ((long double)*(uint32_t*)&this_1[0xe]))) + ((long double)*(uint32_t*)&this_1[0xb])) + ((long double)arg5->m_fOrigin.x)));
0051c6a7                  arg4->pos.frame.m_fOrigin.y = ((float)((((st0_4 * ((long double)*(uint32_t*)&this_1[0x10])) + (x87_r6_53 * ((long double)*(uint32_t*)((char*)this_1 + 0x74)))) + ((long double)*(uint32_t*)((char*)this_1 + 0x5c))) + ((long double)arg5->m_fOrigin.y)));
0051c6a7                  arg4->pos.frame.m_fOrigin.z = ((float)((((st0_4 * ((long double)*(uint32_t*)((char*)this_1 + 0x84))) + (x87_r6_53 * ((long double)*(uint32_t*)&this_1[0xf]))) + ((long double)*(uint32_t*)&this_1[0xc])) + ((long double)arg5->m_fOrigin.z)));
0051c652                  break;
0051c652              }
0051c2d7          }
0051c2d7      
0051c72f      long double x87_r7_41 = ((long double)this_1[2]);
0051c732      long double temp1 = ((long double)this_1[1]);
0051c732      (x87_r7_41 - temp1);
0051c735      float eax_3;
0051c735      eax_3 = ((((x87_r7_41 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_41, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_41 == temp1) ? 1 : 0) << 0xe) | 0))));
0051c73a      long double x87_r7_42;
0051c73a      
0051c73a      if ((*(uint8_t*)((char*)eax_3)[1] & 1) != 0)
0051c747          x87_r7_42 = (((long double)this_1[2]) / ((long double)this_1[1]));
0051c73a      else
0051c73c          x87_r7_42 = ((long double)1f);
0051c73c      
0051c75b      long double x87_r6_80 = (((((long double)*(uint32_t*)((char*)this_1 + 0x8c)) - ((long double)this_1[0x11])) * x87_r7_42) + ((long double)this_1[0x11]));
0051c750      arg4->gfxobj_scale.x = ((float)x87_r6_80);
0051c750      arg4->gfxobj_scale.y = ((float)x87_r6_80);
0051c750      arg4->gfxobj_scale.z = ((float)x87_r6_80);
0051c78d      class AC1Legacy::Vector3* var_8c_5 = &arg4->gfxobj_scale;
0051c79d      CPhysicsPart::SetTranslucency(arg4, ((float)(((((long double)*(uint32_t*)((char*)this_1 + 0x94)) - ((long double)this_1[0x12])) * x87_r7_42) + ((long double)this_1[0x12]))));
0051c290  }

0051c7aa                                8b ff                                                                        ..
0051c7ac  uint32_t jump_table_51c7ac[0xc] = 
0051c7ac  {
0051c7ac      [0x0] =  0x0051c2de
0051c7b0      [0x1] =  0x0051c322
0051c7b4      [0x2] =  0x0051c39b
0051c7b8      [0x3] =  0x0051c49d
0051c7bc      [0x4] =  0x0051c5cd
0051c7c0      [0x5] =  0x0051c6bc
0051c7c4      [0x6] =  0x0051c649
0051c7c8      [0x7] =  0x0051c39b
0051c7cc      [0x8] =  0x0051c49d
0051c7d0      [0x9] =  0x0051c39b
0051c7d4      [0xa] =  0x0051c49d
0051c7d8      [0xb] =  0x0051c322
0051c7dc  }

0051c7dc                                                                                      90 90 90 90                              ....

0051c7e0  void __thiscall ParticleEmitter::ParticleEmitter(class ParticleEmitter* this, class CPhysicsObj* arg2)

0051c7e0  {
0051c7ea      this->parent = arg2;
0051c7ed      this->part_index = 0xffffffff;
0051c7f7      this->id = 0;
0051c7e7      this->parent_offset.qw = 0x3f800000;
0051c7e7      this->parent_offset.qx = 0f;
0051c7e7      this->parent_offset.qy = 0f;
0051c7e7      this->parent_offset.qz = 0f;
0051c7e7      this->parent_offset.m_fOrigin.x = 0;
0051c7e7      this->parent_offset.m_fOrigin.y = 0f;
0051c7e7      this->parent_offset.m_fOrigin.z = 0f;
0051c811      Frame::cache(&this->parent_offset);
0051c816      __builtin_memset(&this->physobj, 0, 0x1c);
0051c82b      this->num_particles = 0;
0051c82e      this->total_emitted = 0;
0051c831      this->stopped = 0;
0051c843      this->last_update_time = (*(uint32_t*)Timer::cur_time);
0051c849      *(uint32_t*)((char*)this->last_update_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051c85a      this->last_emit_time = (*(uint32_t*)Timer::cur_time);
0051c85e      *(uint32_t*)((char*)this->last_emit_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051c7e0  }

0051c867                       90 90 90 90 90 90 90 90 90                                                         .........

0051c870  void __fastcall ParticleEmitter::RecordParticleEmission(class ParticleEmitter* this)

0051c870  {
0051c870      this->num_particles += 1;
0051c873      class CPhysicsObj* physobj = this->physobj;
0051c877      this->total_emitted += 1;
0051c881      this->last_emit_offset.x = physobj->m_position.frame.m_fOrigin.x;
0051c881      this->last_emit_offset.y = physobj->m_position.frame.m_fOrigin.y;
0051c881      this->last_emit_offset.z = physobj->m_position.frame.m_fOrigin.z;
0051c8a0      this->last_emit_time = (*(uint32_t*)PhysicsTimer::curr_time);
0051c8a3      *(uint32_t*)((char*)this->last_emit_time)[4] = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051c870  }

0051c8a8                          90 90 90 90 90 90 90 90                                                          ........

0051c8b0  int32_t __fastcall ParticleEmitter::ShouldEmitParticle(class ParticleEmitter* this)

0051c8b0  {
0051c8b2      class ParticleEmitterInfo* info = this->info;
0051c8be      float var_c;
0051c8be      
0051c8be      if ((info->emitter_type & 2) != 0)
0051c8be      {
0051c8c0          class CPhysicsObj* physobj = this->physobj;
0051c8e2          float var_14_1 = ((float)(((long double)physobj->m_position.frame.m_fOrigin.y) - ((long double)this->last_emit_offset.y)));
0051c8ed          long double x87_r7_6 = (((long double)physobj->m_position.frame.m_fOrigin.z) - ((long double)this->last_emit_offset.z));
0051c8f3          var_c = ((float)(((long double)physobj->m_position.frame.m_fOrigin.x) - ((long double)this->last_emit_offset.x)));
0051c8fb          float var_8_1 = var_14_1;
0051c907          float var_4_1 = ((float)x87_r7_6);
0051c8be      }
0051c8be      
0051c90e      int32_t var_1c = *(uint32_t*)((char*)this->last_emit_time)[4];
0051c920      int32_t result;
0051c920      int80_t st0;
0051c920      st0 = ParticleEmitterInfo::ShouldEmitParticle(info, this->num_particles, this->total_emitted, &var_c, this->last_emit_time);
0051c928      return result;
0051c8b0  }

0051c929                             90 90 90 90 90 90 90                                                           .......

0051c930  void __thiscall Particle::Init(class Particle* this, class CPhysicsObj const* arg2, uint32_t const arg3, class Frame const* arg4, class CPhysicsPart* arg5, class AC1Legacy::Vector3 const* arg6, enum ParticleType const arg7, int32_t const arg8, class AC1Legacy::Vector3 const* arg9, class AC1Legacy::Vector3 const* arg10, class AC1Legacy::Vector3 const* arg11, float const arg12, float const arg13, float const arg14, float const arg15, double const arg16)

0051c930  {
0051c94a      this->lifetime = 0f;
0051c94d      *(uint32_t*)((char*)this->lifetime)[4] = 0;
0051c957      *(uint32_t*)((char*)this->__inner0 + 4) = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051c961      *(uint32_t*)((char*)this->__inner0 + 0) = (*(uint32_t*)PhysicsTimer::curr_time);
0051c96b      this->lifespan = arg16;
0051c96e      *(uint32_t*)((char*)this->lifespan)[4] = *(uint32_t*)((char*)arg16)[4];
0051c974      class Frame* var_50;
0051c974      
0051c974      if (arg3 != 0xffffffff)
0051c990          var_50 = &arg2->part_array->parts[arg3]->pos.frame;
0051c974      else
0051c97d          var_50 = &arg2->m_position.frame;
0051c97d      
0051c993      Frame::operator=(&this->start_frame, var_50);
0051c9a2      long double x87_r7_1 = (((long double)arg6->x) + ((long double)arg4->m_fOrigin.x));
0051c9ac      long double x87_r6_1 = (((long double)arg4->m_fOrigin.y) + ((long double)arg6->y));
0051c9b2      class AC1Legacy::Vector3* eax_4 = &this->offset;
0051c9b5      long double x87_r5_1 = (((long double)arg4->m_fOrigin.z) + ((long double)arg6->z));
0051c9cd      float var_3c = ((float)(((x87_r5_1 * ((long double)this->start_frame.m_fl2gv[6])) + (x87_r6_1 * ((long double)this->start_frame.m_fl2gv[3]))) + (x87_r7_1 * ((long double)this->start_frame.m_fl2gv[0]))));
0051c9e8      float var_38 = ((float)(((x87_r5_1 * ((long double)this->start_frame.m_fl2gv[7])) + (x87_r6_1 * ((long double)this->start_frame.m_fl2gv[4]))) + (x87_r7_1 * ((long double)this->start_frame.m_fl2gv[1]))));
0051c9f4      long double x87_r6_3 = ((x87_r5_1 * ((long double)this->start_frame.m_fl2gv[8])) + (x87_r6_1 * ((long double)this->start_frame.m_fl2gv[5])));
0051c9f8      long double x87_r6_5 = (x87_r7_1 * ((long double)this->start_frame.m_fl2gv[2]));
0051c9fb      eax_4->x = var_3c;
0051ca01      eax_4->y = var_38;
0051ca0e      eax_4->z = ((float)(x87_r6_3 + x87_r6_5));
0051ca17      void* __return_3;
0051ca17      class AC1Legacy::Vector3* edx_20;
0051ca17      
0051ca17      if ((arg7 - 1) > 0xb)
0051ca17      {
0051cc91          this->a.x = arg9->x;
0051cc91          this->a.y = arg9->y;
0051cc91          this->a.z = arg9->z;
0051cca8          this->b.x = arg10->x;
0051cca8          this->b.y = arg10->y;
0051cca8          this->b.z = arg10->z;
0051ccb9          eax_4 = arg11;
0051ccbd          edx_20 = &this->c;
0051ccc2      label_51ccc2:
0051ccc2          edx_20->x = eax_4->x;
0051ccc7          edx_20->y = eax_4->y;
0051cccd          edx_20->z = eax_4->z;
0051ca17      }
0051ca17      else
0051ca1d          switch (arg7)
0051ca1d          {
0051ca1d              case LocalVelocity_PT:
0051ca1d              {
0051ca1d                  goto label_51ca52;
0051ca1d              }
0051ca1d              case ParabolicLVGA_PT:
0051ca1d              {
0051ca1d                  goto label_51ca44;
0051ca1d              }
0051ca2d              case ParabolicLVGAGR_PT:
0051ca2d              {
0051ca2a                  this->c.x = arg11->x;
0051ca2a                  this->c.y = arg11->y;
0051ca2a                  this->c.z = arg11->z;
0051ca44              label_51ca44:
0051ca41                  this->b.x = arg10->x;
0051ca41                  this->b.y = arg10->y;
0051ca41                  this->b.z = arg10->z;
0051ca52              label_51ca52:
0051ca52                  __return_3 = &var_3c;
0051caac              label_51caac:
0051caac                  int32_t* eax_12 = Frame::localtoglobalvec(&this->start_frame, __return_3, arg9);
0051cab3                  this->a.x = *(uint32_t*)eax_12;
0051cab3                  this->a.y = *(uint32_t*)&eax_12[1];
0051cab3                  this->a.z = *(uint32_t*)&eax_12[2];
0051ca2d                  break;
0051ca2d              }
0051cb0f              case Swarm_PT:
0051cb0f              {
0051cb0f                  void __return_2;
0051cb0f                  class AC1Legacy::Vector3* eax_17 = Frame::localtoglobalvec(&this->start_frame, &__return_2, arg9);
0051cb16                  this->a.x = eax_17->x;
0051cb16                  this->a.y = eax_17->y;
0051cb16                  this->a.z = eax_17->z;
0051cb2d                  this->b.x = arg10->x;
0051cb2d                  this->b.y = arg10->y;
0051cb2d                  this->b.z = arg10->z;
0051cb44                  this->c.x = arg11->x;
0051cb44                  this->c.y = arg11->y;
0051cb44                  this->c.z = arg11->z;
0051cb0f                  break;
0051cb0f              }
0051cbbc              case Explode_PT:
0051cbbc              {
0051cbb9                  this->a.x = arg9->x;
0051cbb9                  this->a.y = arg9->y;
0051cbb9                  this->a.z = arg9->z;
0051cbd0                  this->b.x = arg10->x;
0051cbd0                  this->b.y = arg10->y;
0051cbd0                  this->b.z = arg10->z;
0051cbf0                  arg9 = ((float)Random::RollDice(-3.14159274f, 3.14159274f));
0051cc05                  long double st0_3;
0051cc05                  bool c2_1;
0051cc05                  st0_3 = __fcos(Random::RollDice(-3.14159274f, 3.14159274f));
0051cc1a                  long double st0_4;
0051cc1a                  bool c2_2;
0051cc1a                  st0_4 = __fcos(((long double)arg9));
0051cc20                  var_3c = ((float)((st0_4 * ((long double)arg11->x)) * st0_3));
0051cc28                  long double st0_5;
0051cc28                  bool c2_3;
0051cc28                  st0_5 = __fsin(((long double)arg9));
0051cc2f                  float var_38_1 = ((float)((st0_5 * ((long double)arg11->y)) * st0_3));
0051cc39                  long double st0_6;
0051cc39                  bool c2_4;
0051cc39                  st0_6 = __fsin(st0_3);
0051cc0e                  this->c.x = var_3c;
0051cc0e                  this->c.y = var_38_1;
0051cc0e                  this->c.z = ((float)(st0_6 * ((long double)arg11->z)));
0051cc0e                  
0051cc5b                  if (AC1Legacy::Vector3::normalize_check_small(&this->c.x) != 0)
0051cc5b                  {
0051cc5d                      var_3c = 0f;
0051cc0e                      this->c.x = var_3c;
0051cc0e                      this->c.y = 0;
0051cc0e                      this->c.z = 0;
0051cc5b                  }
0051cbbc                  break;
0051cbbc              }
0051cb63              case Implode_PT:
0051cb63              {
0051cb60                  this->a.x = arg9->x;
0051cb60                  this->a.y = arg9->y;
0051cb60                  this->a.z = arg9->z;
0051cb77                  this->b.x = arg10->x;
0051cb77                  this->b.y = arg10->y;
0051cb77                  this->b.z = arg10->z;
0051cb8e                  edx_20 = &this->c;
0051cb93                  eax_4->x = ((float)(((long double)arg11->x) * ((long double)eax_4->x)));
0051cb9b                  this->offset.y = ((float)(((long double)arg11->y) * ((long double)this->offset.y)));
0051cba4                  this->offset.z = ((float)(((long double)arg11->z) * ((long double)this->offset.z)));
0051cba9                  edx_20->x = eax_4->x;
0051ccc7                  edx_20->y = eax_4->y;
0051cccd                  edx_20->z = eax_4->z;
0051cb63                  break;
0051cb63              }
0051ca1d              case ParabolicLVLA_PT:
0051ca1d              {
0051ca1d                  goto label_51ca88;
0051ca1d              }
0051ca64              case ParabolicLVLALR_PT:
0051ca64              {
0051ca64                  void __return;
0051ca64                  class AC1Legacy::Vector3* eax_8 = Frame::localtoglobalvec(&this->start_frame, &__return, arg11);
0051ca6b                  this->c.x = eax_8->x;
0051ca6b                  this->c.y = eax_8->y;
0051ca6b                  this->c.z = eax_8->z;
0051ca88              label_51ca88:
0051ca88                  void __return_1;
0051ca88                  class AC1Legacy::Vector3* eax_10 = Frame::localtoglobalvec(&this->start_frame, &__return_1, arg10);
0051ca8f                  this->b.x = eax_10->x;
0051ca8f                  this->b.y = eax_10->y;
0051ca8f                  this->b.z = eax_10->z;
0051caa0                  void var_18;
0051caa0                  __return_3 = &var_18;
0051caa0                  goto label_51caac;
0051ca64              }
0051ca1d              case ParabolicGVGA_PT:
0051ca1d              {
0051ca1d                  goto label_51cae9;
0051ca1d              }
0051cad2              case ParabolicGVGAGR_PT:
0051cad2              {
0051cacf                  this->c.x = arg11->x;
0051cacf                  this->c.y = arg11->y;
0051cacf                  this->c.z = arg11->z;
0051cae9              label_51cae9:
0051cae6                  this->b.x = arg10->x;
0051cae6                  this->b.y = arg10->y;
0051cae6                  this->b.z = arg10->z;
0051caf7              label_51caf7:
0051caf7                  eax_4 = arg9;
0051cafb                  edx_20 = &this->a;
0051cafe                  goto label_51ccc2;
0051cad2              }
0051ca1d              case GlobalVelocity_PT:
0051ca1d              {
0051ca1d                  goto label_51caf7;
0051ca1d              }
0051ca1d          }
0051cce3      this->start_scale = arg12;
0051ccf0      this->final_scale = arg13;
0051ccfa      this->final_trans = arg15;
0051cd00      this->start_trans = arg14;
0051cd0a      var_3c = arg12;
0051cd0e      arg5->gfxobj_scale.x = arg12;
0051cd0e      arg5->gfxobj_scale.y = arg12;
0051cd16      float const var_34_2 = arg12;
0051cd0e      arg5->gfxobj_scale.z = arg12;
0051cd26      float const var_38_2 = arg12;
0051cd2a      CPhysicsPart::SetTranslucency(arg5, this->start_trans);
0051cd39      Particle::Update(this, arg7, arg8, arg5, &this->start_frame);
0051c930  }

0051cd48  uint32_t jump_table_51cd48[0xc] = 
0051cd48  {
0051cd48      [0x0] =  0x0051ccd0
0051cd4c      [0x1] =  0x0051ca52
0051cd50      [0x2] =  0x0051ca3b
0051cd54      [0x3] =  0x0051ca24
0051cd58      [0x4] =  0x0051cb03
0051cd5c      [0x5] =  0x0051cbb3
0051cd60      [0x6] =  0x0051cb5a
0051cd64      [0x7] =  0x0051ca7c
0051cd68      [0x8] =  0x0051ca58
0051cd6c      [0x9] =  0x0051cae0
0051cd70      [0xa] =  0x0051cac9
0051cd74      [0xb] =  0x0051caf7
0051cd78  }

0051cd78                                                                          90 90 90 90 90 90 90 90                          ........

0051cd80  class ParticleEmitter* ParticleEmitter::makeParticleEmitter(class CPhysicsObj* arg1)

0051cd80  {
0051cd87      if (arg1 != 0)
0051cd87      {
0051cd8e          void* eax_1 = operator new(0x98);
0051cd8e          
0051cd98          if (eax_1 != 0)
0051cd98          {
0051cd9d              int32_t result = ParticleEmitter::ParticleEmitter(eax_1, arg1);
0051cd9d              
0051cda4              if (result != 0)
0051cda9                  return result;
0051cd98          }
0051cd87      }
0051cd87      
0051cda6      return 0;
0051cd80  }

0051cdaa                                90 90 90 90 90 90                                                            ......

0051cdb0  void __fastcall ParticleEmitter::Destroy(class ParticleEmitter* this)

0051cdb0  {
0051cdb4      class CPhysicsObj* physobj = this->physobj;
0051cdb4      
0051cdbb      if (physobj != 0)
0051cdbb      {
0051cdbd          CPhysicsObj::unset_parent(physobj);
0051cdc5          CPhysicsObj::leave_world(this->physobj);
0051cdbb      }
0051cdbb      
0051cdcd      if (this->part_storage != 0)
0051cdcd      {
0051cdd6          int32_t i = 0;
0051cdd6          
0051cdda          if (this->info->max_particles > 0)
0051cdda          {
0051ce0f              do
0051ce0f              {
0051cde3                  class CPhysicsPart* ebx_1 = this->part_storage[i];
0051cde3                  
0051cde8                  if (ebx_1 != 0)
0051cde8                  {
0051cdec                      CPhysicsPart::~CPhysicsPart(ebx_1);
0051cdf2                      operator delete(ebx_1);
0051cde8                  }
0051cde8                  
0051cdfa                  this->part_storage[i] = 0;
0051ce00                  this->parts[i] = 0;
0051ce0c                  i += 1;
0051ce0f              } while (i < this->info->max_particles);
0051cdda          }
0051cdda          
0051ce16          operator delete[](this->part_storage);
0051ce1e          this->part_storage = nullptr;
0051cdcd      }
0051cdcd      
0051ce22      class Particle* particles = this->particles;
0051ce22      
0051ce27      if (particles != 0)
0051ce27      {
0051ce2d          operator delete[](((char*)particles - 4));
0051ce35          this->particles = nullptr;
0051ce27      }
0051ce27      
0051ce38      class ParticleEmitterInfo* info = this->info;
0051ce38      
0051ce3d      if (info != 0)
0051ce3d      {
0051ce48          if (info->m_DID.id != INVALID_DID.id)
0051ce4a              info->vtable->Release();
0051ce4a          
0051ce4f          this->info = nullptr;
0051ce3d      }
0051ce3d      
0051ce52      class CPhysicsObj* physobj_1 = this->physobj;
0051ce52      
0051ce57      if (physobj_1 != 0)
0051ce57      {
0051ce59          physobj_1->vtable->__vecDelDtor(1);
0051ce5f          this->physobj = nullptr;
0051ce57      }
0051ce57      
0051ce62      this->parts = nullptr;
0051ce65      int32_t PhysicsTimer::curr_time_1 = (*(uint32_t*)PhysicsTimer::curr_time);
0051ce6a      int32_t ecx_6 = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051ce70      this->num_particles = 0;
0051ce73      this->last_update_time = PhysicsTimer::curr_time_1;
0051ce79      *(uint32_t*)((char*)this->last_update_time)[4] = ecx_6;
0051cdb0  }

0051ce82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0051ce90  int32_t __thiscall ParticleEmitter::SetInfo(class ParticleEmitter* this, class ParticleEmitterInfo const* arg2)

0051ce90  {
0051ce94      ParticleEmitter::Destroy(this);
0051ce9d      this->info = arg2;
0051cea0      uint32_t id = arg2->hw_gfxobj_id.id;
0051cea0      
0051cea9      if (id == INVALID_DID.id)
0051cea9      {
0051cead          ParticleEmitter::Destroy(this);
0051ceb6          return 0;
0051cea9      }
0051cea9      
0051cec5      class CPhysicsObj* eax_3 = CPhysicsObj::makeParticleObject(arg2->max_particles, &arg2->sorting_sphere);
0051ced1      this->physobj = eax_3;
0051ced1      
0051ced4      if (eax_3 != 0)
0051ced4      {
0051ceee          this->last_emit_offset.x = eax_3->m_position.frame.m_fOrigin.x;
0051ceee          this->last_emit_offset.y = eax_3->m_position.frame.m_fOrigin.y;
0051ceee          this->last_emit_offset.z = eax_3->m_position.frame.m_fOrigin.z;
0051cf08          class ParticleEmitterInfo* info = this->info;
0051cf0b          this->parts = eax_3->part_array->parts;
0051cf19          void* eax_7 = operator new[]((info->max_particles << 2));
0051cf23          this->part_storage = eax_7;
0051cf23          
0051cf26          if (eax_7 != 0)
0051cf26          {
0051cf2e              int32_t i = 0;
0051cf2e              
0051cf32              if (this->info->max_particles > 0)
0051cf32              {
0051cf43                  do
0051cf43                  {
0051cf34                      this->part_storage[i] = 0;
0051cf40                      i += 1;
0051cf43                  } while (i < this->info->max_particles);
0051cf32              }
0051cf32              
0051cf4b              int32_t i_1 = 0;
0051cf4b              
0051cf4f              if (this->info->max_particles > 0)
0051cf4f              {
0051cf77                  do
0051cf77                  {
0051cf57                      this->part_storage[i_1] = CPhysicsPart::makePhysicsPart(id);
0051cf57                      
0051cf68                      if (this->part_storage[i_1] == 0)
0051cf68                          goto label_51ced8;
0051cf68                      
0051cf74                      i_1 += 1;
0051cf77                  } while (i_1 < this->info->max_particles);
0051cf4f              }
0051cf4f              
0051cf7e              CPhysicsPart::GetMaxDegradeDistance(*(uint32_t*)this->part_storage);
0051cf83              long double x87_r0;
0051cf83              this->degrade_distance = ((float)x87_r0);
0051cf89              int32_t max_particles = this->info->max_particles;
0051cf98              int32_t* eax_15 = operator new[](((max_particles * 0x98) + 4));
0051cfa2              class Particle* eax_16;
0051cfa2              
0051cfa2              if (eax_15 == 0)
0051cfee                  eax_16 = nullptr;
0051cfa2              else
0051cfa2              {
0051cfa4                  *(uint32_t*)eax_15 = max_particles;
0051cfa6                  eax_16 = &eax_15[1];
0051cfa6                  
0051cfb2                  if ((max_particles - 1) >= 0)
0051cfb2                  {
0051cfb4                      float* esi_3 = &eax_16->start_frame.m_fOrigin.z;
0051cfb7                      int32_t ebp_1 = max_particles;
0051cfe6                      int32_t i_2;
0051cfe6                      
0051cfe6                      do
0051cfe6                      {
0051cfc0                          esi_3[-0xf] = 0x3f800000;
0051cfe8                          ADJ(esi_3)->start_frame.qx = 0f;
0051cfe8                          ADJ(esi_3)->start_frame.qy = 0f;
0051cfe8                          ADJ(esi_3)->start_frame.qz = 0f;
0051cfe8                          ADJ(esi_3)->start_frame.m_fOrigin.x = 0;
0051cfe8                          ADJ(esi_3)->start_frame.m_fOrigin.y = 0f;
0051cfe8                          ADJ(esi_3)->start_frame.m_fOrigin.z = 0f;
0051cfda                          Frame::cache(&esi_3[-0xf]);
0051cfdf                          esi_3 = &esi_3[0x26];
0051cfe5                          i_2 = ebp_1;
0051cfe5                          ebp_1 -= 1;
0051cfe6                      } while (i_2 != 1);
0051cfb2                  }
0051cfa2              }
0051cfa2              
0051cff2              this->particles = eax_16;
0051cff2              
0051cff5              if (eax_16 != 0)
0051d004                  return 1;
0051cf26          }
0051ced4      }
0051ced4      
0051ced8  label_51ced8:
0051ced8      ParticleEmitter::Destroy(this);
0051cee3      return 0;
0051ce90  }

0051cfba                                                                                8d 9b 00 00 00 00                            ......
0051d007                       90 90 90 90 90 90 90 90 90                                                         .........

0051d010  void __fastcall ParticleEmitter::EmitParticle(class ParticleEmitter* this)

0051d010  {
0051d013      int32_t __saved_ebx_1;
0051d013      int32_t __saved_ebx = __saved_ebx_1;
0051d014      int32_t __saved_esi_1;
0051d014      int32_t __saved_esi = __saved_esi_1;
0051d01a      int32_t max_particles = this->info->max_particles;
0051d01d      int32_t __saved_edi_1;
0051d01d      int32_t __saved_edi = __saved_edi_1;
0051d01e      int32_t edi = 0;
0051d01e      
0051d022      if (max_particles > 0)
0051d022      {
0051d024          class CPhysicsPart** parts = this->parts;
0051d024          
0051d02a          while (*(uint32_t*)parts != 0)
0051d02a          {
0051d032              edi += 1;
0051d033              parts = &parts[1];
0051d033              
0051d038              if (edi >= this->info->max_particles)
0051d038                  break;
0051d02a          }
0051d022      }
0051d022      
0051d03c      if (edi != max_particles)
0051d03c      {
0051d045          this->parts[edi] = this->part_storage[edi];
0051d045          
0051d055          if (this->parts[edi] != 0)
0051d055          {
0051d05b              class ParticleEmitterInfo* info = this->info;
0051d063              int32_t __saved_ebp_2;
0051d063              int32_t __saved_ebp_1 = __saved_ebp_2;
0051d064              bool p_1;
0051d064              
0051d064              if (info->total_particles == 0)
0051d064              {
0051d066                  long double x87_r7_1 = ((long double)info->total_seconds);
0051d069                  long double temp0_1 = ((long double)0.0);
0051d069                  (x87_r7_1 - temp0_1);
0051d06f                  int32_t eax_3;
0051d06f                  eax_3 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0051d071                  p_1 = /* p_1 = unimplemented  {test ah, 0x44} */;
0051d064              }
0051d064              
0051d074              int32_t ebp;
0051d074              
0051d074              if ((info->total_particles != 0 || p_1))
0051d07d                  ebp = 0;
0051d074              else
0051d076                  ebp = 1;
0051d076              
0051d07f              int32_t particle_type = info->particle_type;
0051d082              long double st0_1 = ParticleEmitterInfo::GetRandomLifespan(info);
0051d090              int32_t ecx_2;
0051d090              long double st0_2;
0051d090              ecx_2 = ParticleEmitterInfo::GetRandomFinalTrans(this->info);
0051d095              int32_t var_4c_1 = ecx_2;
0051d09c              int32_t ecx_4;
0051d09c              long double st0_3;
0051d09c              ecx_4 = ParticleEmitterInfo::GetRandomStartTrans(this->info);
0051d0a1              int32_t var_50_1 = ecx_4;
0051d0a8              int32_t ecx_6;
0051d0a8              long double st0_4;
0051d0a8              ecx_6 = ParticleEmitterInfo::GetRandomFinalScale(this->info);
0051d0ad              int32_t var_54_1 = ecx_6;
0051d0b4              int32_t ecx_8;
0051d0b4              long double st0_5;
0051d0b4              ecx_8 = ParticleEmitterInfo::GetRandomStartScale(this->info);
0051d0b9              int32_t var_58_1 = ecx_8;
0051d0c5              void __return;
0051d0c5              class AC1Legacy::Vector3* eax_4 = ParticleEmitterInfo::GetRandomC(this->info, &__return);
0051d0d3              void __return_1;
0051d0d3              class AC1Legacy::Vector3* eax_5 = ParticleEmitterInfo::GetRandomB(this->info, &__return_1);
0051d0e1              void __return_2;
0051d0e1              class AC1Legacy::Vector3* eax_6 = ParticleEmitterInfo::GetRandomA(this->info, &__return_2);
0051d0f1              void __return_3;
0051d0f1              class AC1Legacy::Vector3* eax_7 = ParticleEmitterInfo::GetRandomOffset(this->info, &__return_3);
0051d117              Particle::Init(((edi * 0x98) + this->particles), this->parent, this->part_index, &this->parent_offset, this->parts[edi], eax_7, particle_type, ebp, eax_6, eax_5, eax_4, ((float)st0_5), ((float)st0_4), ((float)st0_3), ((float)st0_2), ((double)st0_1));
0051d125              double var_48_1;
0051d125              *(uint32_t*)((char*)var_48_1)[4] = this->parts[edi];
0051d126              CPhysicsObj::AddPartToShadowCells(this->physobj);
0051d131              class CPhysicsObj* physobj = this->physobj;
0051d135              int32_t edx_7 = (this->total_emitted + 1);
0051d136              this->num_particles += 1;
0051d139              this->total_emitted = edx_7;
0051d143              this->last_emit_offset.x = physobj->m_position.frame.m_fOrigin.x;
0051d143              this->last_emit_offset.y = physobj->m_position.frame.m_fOrigin.y;
0051d143              this->last_emit_offset.z = physobj->m_position.frame.m_fOrigin.z;
0051d163              this->last_emit_time = (*(uint32_t*)PhysicsTimer::curr_time);
0051d166              *(uint32_t*)((char*)this->last_emit_time)[4] = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051d055          }
0051d03c      }
0051d010  }

0051d171                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0051d180  void __fastcall ParticleEmitter::UpdateParticles(class ParticleEmitter* this)

0051d180  {
0051d188      uint32_t i = 0;
0051d188      
0051d18c      if (this->info != 0)
0051d18c      {
0051d192          class CPhysicsObj* physobj = this->physobj;
0051d192          
0051d197          if (physobj != 0)
0051d197          {
0051d1a6              bool cond:0 = CPhysicsObj::ShouldDrawParticles(physobj, this->degrade_distance) != 0;
0051d1a8              int32_t degraded_out = this->degraded_out;
0051d1a8              
0051d1ab              if (cond:0)
0051d1ab              {
0051d2a5                  if (degraded_out != 0)
0051d2a5                  {
0051d2a7                      class CPhysicsObj* physobj_1 = this->physobj;
0051d2ab                      this->degraded_out = 0;
0051d2ae                      CPhysicsObj::SetNoDraw(physobj_1, 0);
0051d2a5                  }
0051d2a5                  
0051d2b9                  if (this->info->max_particles > 0)
0051d2b9                  {
0051d2c0                      int32_t ebp_1 = 0;
0051d2c0                      
0051d343                      do
0051d343                      {
0051d2c5                          class CPhysicsPart* ebx_2 = this->parts[i];
0051d2c5                          
0051d2ca                          if (ebx_2 != 0)
0051d2ca                          {
0051d2cc                              class ParticleEmitterInfo* info_1 = this->info;
0051d2d4                              class Frame* ecx_9;
0051d2d4                              
0051d2d4                              if (info_1->is_parent_local == 0)
0051d2f7                                  ecx_9 = (&this->particles->start_frame + ebp_1);
0051d2d4                              else
0051d2d4                              {
0051d2d6                                  uint32_t part_index = this->part_index;
0051d2dc                                  class CPhysicsObj* parent = this->parent;
0051d2dc                                  
0051d2df                                  if (part_index != 0xffffffff)
0051d2ef                                      ecx_9 = &parent->part_array->parts[part_index]->pos.frame.qw;
0051d2df                                  else
0051d2e1                                      ecx_9 = &parent->m_position.frame;
0051d2d4                              }
0051d2d4                              
0051d300                              bool p_2;
0051d300                              
0051d300                              if (info_1->total_particles == 0)
0051d300                              {
0051d302                                  long double x87_r7_5 = ((long double)info_1->total_seconds);
0051d305                                  long double temp1_1 = ((long double)0.0);
0051d305                                  (x87_r7_5 - temp1_1);
0051d30b                                  int32_t eax_15;
0051d30b                                  eax_15 = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0051d30d                                  p_2 = /* p_2 = unimplemented  {test ah, 0x44} */;
0051d300                              }
0051d300                              
0051d310                              int32_t eax_16;
0051d310                              
0051d310                              if ((info_1->total_particles != 0 || p_2))
0051d319                                  eax_16 = 0;
0051d310                              else
0051d312                                  eax_16 = 1;
0051d312                              
0051d327                              Particle::Update((this->particles + ebp_1), info_1->particle_type, eax_16, ebx_2, ecx_9);
0051d32f                              ParticleEmitter::KillParticle(this, i);
0051d2ca                          }
0051d2ca                          
0051d33a                          i += 1;
0051d33b                          ebp_1 += 0x98;
0051d343                      } while (i < this->info->max_particles);
0051d2b9                  }
0051d2b9                  
0051d357                  int32_t eax_20;
0051d357                  
0051d357                  if (this->stopped != 0)
0051d37b                      eax_20 = this->num_particles != 0;
0051d357                  else
0051d357                  {
0051d362                      if (ParticleEmitter::ShouldEmitParticle(this) != 0)
0051d366                          ParticleEmitter::EmitParticle(this);
0051d366                      
0051d36d                      ParticleEmitter::StopEmitter(this);
0051d357                  }
0051d38f                  this->last_update_time = (*(uint32_t*)PhysicsTimer::curr_time);
0051d395                  *(uint32_t*)((char*)this->last_update_time)[4] = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051d39d                  return;
0051d1ab              }
0051d1ab              
0051d1b3              if (degraded_out == 0)
0051d1b3              {
0051d1ba                  CPhysicsObj::SetNoDraw(this->physobj, 1);
0051d1bf                  this->degraded_out = 1;
0051d1b3              }
0051d1b3              
0051d1d2              this->last_update_time = (*(uint32_t*)PhysicsTimer::curr_time);
0051d1d8              class ParticleEmitterInfo* info = this->info;
0051d1db              *(uint32_t*)((char*)this->last_update_time)[4] = *(int32_t*)((char*)PhysicsTimer::curr_time + 4);
0051d1db              
0051d1e4              if (info->total_particles == 0)
0051d1e4              {
0051d1e6                  long double x87_r7_1 = ((long double)info->total_seconds);
0051d1e9                  long double temp0_1 = ((long double)0.0);
0051d1e9                  (x87_r7_1 - temp0_1);
0051d1ef                  degraded_out = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0051d1f1                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0051d1f1                  
0051d1f4                  if (!(p_1))
0051d1f4                  {
0051d1f9                      int32_t i_1 = 0;
0051d1f9                      
0051d1fd                      if (info->max_particles > 0)
0051d1fd                      {
0051d1ff                          double* ecx_2 = nullptr;
0051d1ff                          
0051d21c                          do
0051d21c                          {
0051d20a                              *(uint64_t*)((char*)ecx_2 + this->particles) = ((double)((long double)PhysicsTimer::curr_time));
0051d213                              i_1 += 1;
0051d214                              ecx_2 = &ecx_2[0x13];
0051d21c                          } while (i_1 < this->info->max_particles);
0051d1fd                      }
0051d1fd                      
0051d226                      return;
0051d1f4                  }
0051d1e4              }
0051d1e4              
0051d22a              if (info->max_particles > 0)
0051d22a              {
0051d22c                  int32_t ebx_1 = 0;
0051d22e                  uint32_t i_2 = 0;
0051d22e                  
0051d261                  do
0051d261                  {
0051d237                      if (this->parts[i_2] != 0)
0051d237                      {
0051d239                          class Particle* particles = this->particles;
0051d24a                          *(uint64_t*)(&particles->lifetime + ebx_1) = ((double)(((long double)PhysicsTimer::curr_time) - ((long double)*(uint64_t*)((char*)particles + ebx_1))));
0051d24d                          ParticleEmitter::KillParticle(this, i_2);
0051d237                      }
0051d237                      
0051d258                      i_2 += 1;
0051d259                      ebx_1 += 0x98;
0051d261                  } while (i_2 < this->info->max_particles);
0051d22a              }
0051d22a              
0051d270              if (this->stopped != 0)
0051d270              {
0051d298                  int32_t edx_5;
0051d298                  edx_5 = this->num_particles != 0;
0051d2a2                  return;
0051d270              }
0051d270              
0051d27b              if (ParticleEmitter::ShouldEmitParticle(this) != 0)
0051d27f                  ParticleEmitter::RecordParticleEmission(this);
0051d27f              
0051d286              ParticleEmitter::StopEmitter(this);
0051d197          }
0051d18c      }
0051d180  }

0051d3a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0051d3b0  void __fastcall ParticleEmitter::~ParticleEmitter(class ParticleEmitter* this)

0051d3b0  {
0051d3b0      /* tailcall */
0051d3b0      return ParticleEmitter::Destroy(this);
0051d3b0  }

0051d3b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051d3c0  int32_t __thiscall ParticleEmitter::SetInfo(class ParticleEmitter* this, class IDClass<_tagDataID,32,0> arg2)

0051d3c0  {
0051d3cc      if (arg2 != 0)
0051d3cc      {
0051d3db          void var_8;
0051d3db          class ParticleEmitterInfo* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x2a));
0051d3db          
0051d3e5          if (eax_1 != 0)
0051d3f3              return ParticleEmitter::SetInfo(this, eax_1);
0051d3cc      }
0051d3cc      
0051d3fc      return 0;
0051d3c0  }

0051d3ff                                                                                               90                                 .

0051d400  int32_t __fastcall ParticleEmitter::InitEnd(class ParticleEmitter* this)

0051d400  {
0051d411      this->creation_time = (*(uint32_t*)Timer::cur_time);
0051d414      *(uint32_t*)((char*)this->creation_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0051d41b      int32_t i = 0;
0051d41b      
0051d41f      if (this->info->initial_particles > 0)
0051d41f      {
0051d431          do
0051d431          {
0051d423              ParticleEmitter::EmitParticle(this);
0051d42e              i += 1;
0051d431          } while (i < this->info->initial_particles);
0051d41f      }
0051d41f      
0051d43a      return 1;
0051d400  }

0051d43b                                                                                   90 90 90 90 90                             .....

0051d440  int32_t __fastcall PhysicsDesc::get_autonomous_movement(class PhysicsDesc const* this)

0051d440  {
0051d443      return this->autonomous_movement;
0051d440  }

0051d444              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0051d450  uint16_t __thiscall PhysicsDesc::get_timestamp(class PhysicsDesc const* this, enum PhysicsTimeStamp arg2)

0051d450  {
0051d454      enum PhysicsTimeStamp eax;
0051d454      eax = this->timestamps[arg2];
0051d45c      return eax;
0051d450  }

0051d45f                                                                                               90                                 .

0051d460  uint32_t __fastcall PhysicsDesc::get_parent_id(class PhysicsDesc const* this)

0051d460  {
0051d466      return this->parent_id;
0051d460  }

0051d467                       90 90 90 90 90 90 90 90 90                                                         .........

0051d470  uint32_t __fastcall PhysicsDesc::get_parent_location_id(class PhysicsDesc const* this)

0051d470  {
0051d476      return this->location_id;
0051d470  }

0051d477                                                                       90 90 90 90 90 90 90 90 90                         .........

0051d480  class UIPersistantData* __fastcall UIFlow::GetPersistantData(class UIFlow* this)

0051d480  {
0051d486      return this->_data;
0051d480  }

0051d487                       90 90 90 90 90 90 90 90 90                                                         .........

0051d490  uint32_t __thiscall PhysicsDesc::get_child_id(class PhysicsDesc const* this, uint32_t arg2)

0051d490  {
0051d49d      return this->child_ids[arg2];
0051d490  }


0051d4a0  uint32_t __thiscall PhysicsDesc::get_child_location_id(class PhysicsDesc const* this, uint32_t arg2)

0051d4a0  {
0051d4ad      return this->child_location_ids[arg2];
0051d4a0  }


0051d4b0  int32_t __fastcall CInputManager::GetMouseY(class CInputManager* this)

0051d4b0  {
0051d4b3      return this->m_ptMousePos.y;
0051d4b0  }

0051d4b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0051d4c0  uint32_t __fastcall DiskConBase::GetSubset(class DiskConBase* this)

0051d4c0  {
0051d4c3      return this->data_subset_lm;
0051d4c0  }

0051d4c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0051d4d0  void __fastcall PhysicsDesc::PhysicsDesc(class PhysicsDesc* this)

0051d4d0  {
0051d4d3      this->vtable = 0x7c729c;
0051d4df      __builtin_memset(&this->bitfield, 0, 0x14);
0051d4ee      this->pos.vtable = 0x796910;
0051d4f5      this->pos.objcell_id = 0;
0051d4d9      this->pos.frame.qw = 0x3f800000;
0051d4d9      this->pos.frame.qx = 0f;
0051d4d9      this->pos.frame.qy = 0f;
0051d4d9      this->pos.frame.qz = 0f;
0051d4d9      this->pos.frame.m_fOrigin.x = 0;
0051d4d9      this->pos.frame.m_fOrigin.y = 0f;
0051d4d9      this->pos.frame.m_fOrigin.z = 0f;
0051d510      Frame::cache(&this->pos.frame);
0051d526      __builtin_strncpy(&this->friction, "33s?", 4);
0051d529      this->state = 0x400c08;
0051d530      this->object_scale = 1f;
0051d537      this->elasticity = 0.0500000007f;
0051d53a      __builtin_memset(&this->translucency, 0, 0x38);
0051d582      __builtin_memset(&this->mtable_id, 0, 0x2a);
0051d4d0  }

0051d5cc                                      90 90 90 90                                                              ....

0051d5d0  void __fastcall PhysicsDesc::Destroy(class PhysicsDesc* this)

0051d5d0  {
0051d5d6      uint32_t* child_ids = this->child_ids;
0051d5d6      
0051d5e1      if (child_ids != 0)
0051d5e1      {
0051d5e4          operator delete[](child_ids);
0051d5ec          this->child_ids = nullptr;
0051d5e1      }
0051d5e1      
0051d5f2      uint32_t* child_location_ids = this->child_location_ids;
0051d5f2      
0051d5fa      if (child_location_ids != 0)
0051d5fa      {
0051d5fd          operator delete[](child_location_ids);
0051d605          this->child_location_ids = nullptr;
0051d5fa      }
0051d5fa      
0051d60b      void* movement_buffer = this->movement_buffer;
0051d60f      this->num_children = 0;
0051d615      operator delete[](movement_buffer);
0051d61a      this->movement_buffer = nullptr;
0051d61d      this->buff_length = 0;
0051d620      this->animframe_id = 0;
0051d623      this->pos.objcell_id = 0;
0051d626      this->num_children = 0;
0051d62c      this->child_ids = nullptr;
0051d632      this->child_location_ids = nullptr;
0051d638      this->parent_id = 0;
0051d63e      this->state = 0x400c08;
0051d64b      this->mtable_id.id = INVALID_DID.id;
0051d657      this->stable_id.id = INVALID_DID.id;
0051d662      this->phstable_id.id = INVALID_DID.id;
0051d66e      this->setup_id.id = INVALID_DID.id;
0051d680      this->velocity.x = 0;
0051d680      this->velocity.y = 0f;
0051d680      this->velocity.z = 0f;
0051d6af      this->acceleration.x = 0;
0051d6af      this->acceleration.y = 0f;
0051d6af      this->acceleration.z = 0f;
0051d6d5      this->omega.x = 0;
0051d6d5      this->omega.y = 0f;
0051d6f8      this->default_script = PS_Invalid;
0051d6fe      this->default_script_intensity = 0f;
0051d704      this->object_scale = 1f;
0051d6d5      this->omega.z = 0f;
0051d725      __builtin_memset(&this->timestamps, 0, 0x12);
0051d5d0  }

0051d73a                                                                                90 90 90 90 90 90                            ......

0051d740  void __fastcall PhysicsDesc::~PhysicsDesc(class PhysicsDesc* this)

0051d740  {
0051d743      this->vtable = 0x7c729c;
0051d749      PhysicsDesc::Destroy(this);
0051d74e      this->pos.vtable = 0x79285c;
0051d755      this->vtable = 0x79285c;
0051d740  }

0051d75d                                                                                         90 90 90                               ...

0051d760  class IDClass<_tagDataID,32,0>* __thiscall PhysicsDesc::get_mtable_id(class PhysicsDesc const* this, class IDClass<_tagDataID,32,0>* __return)

0051d760  {
0051d766      uint32_t* result = __return;
0051d76a      *(uint32_t*)result = this->mtable_id.id;
0051d76c      return result;
0051d760  }

0051d76f                                               90                                                                 .

0051d770  class IDClass<_tagDataID,32,0>* __thiscall PhysicsDesc::get_setup_id(class PhysicsDesc const* this, class IDClass<_tagDataID,32,0>* __return)

0051d770  {
0051d776      uint32_t* result = __return;
0051d77a      *(uint32_t*)result = this->setup_id.id;
0051d77c      return result;
0051d770  }

0051d77f                                                                                               90                                 .

0051d780  void* __thiscall PhysicsDesc::`scalar deleting destructor'(class PhysicsDesc* this, uint32_t arg2)

0051d780  {
0051d783      this->vtable = 0x7c729c;
0051d789      PhysicsDesc::Destroy(this);
0051d793      this->pos.vtable = 0x79285c;
0051d79a      this->vtable = 0x79285c;
0051d79a      
0051d7a0      if ((arg2 & 1) != 0)
0051d7a3          operator delete(this);
0051d7a3      
0051d7ae      return this;
0051d780  }

0051d7b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0051d7c0  uint32_t __thiscall PhysicsDesc::Pack(class PhysicsDesc* this, void** arg2, uint32_t arg3)

0051d7c0  {
0051d7cc      bool cond:0 = this->pos.objcell_id == 0;
0051d7d0      this->bitfield = 0;
0051d7d0      
0051d7d3      if (!(cond:0))
0051d7d5          this->bitfield = 0x8000;
0051d7d5      
0051d7dc      uint32_t buff_length = this->buff_length;
0051d7dc      
0051d7e1      if (buff_length > 0)
0051d7e3          this->bitfield |= 0x10000;
0051d7e3      
0051d7ed      if (this->animframe_id != 0)
0051d7ef          this->bitfield |= 0x20000;
0051d7ef      
0051d7fc      if (this->mtable_id.id != 0)
0051d7fe          this->bitfield |= 2;
0051d7fe      
0051d808      if (this->stable_id.id != 0)
0051d80a          this->bitfield |= 0x800;
0051d80a      
0051d817      if (this->phstable_id.id != 0)
0051d819          this->bitfield |= 0x1000;
0051d819      
0051d826      if (this->setup_id.id != 0)
0051d828          this->bitfield |= 1;
0051d828      
0051d832      if (this->parent_id != 0)
0051d834          this->bitfield |= 0x20;
0051d834      
0051d83e      if (this->num_children != 0)
0051d840          this->bitfield |= 0x40;
0051d840      
0051d84b      if (this->object_scale != 0x3f800000)
0051d84d          this->bitfield |= 0x80;
0051d84d      
0051d854      long double x87_r7 = ((long double)this->friction);
0051d857      long double temp1 = ((long double)0.949999988f);
0051d857      (x87_r7 - temp1);
0051d85d      uint32_t eax;
0051d85d      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0051d85f      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0051d85f      
0051d862      if (p)
0051d864          this->bitfield |= 0x100;
0051d864      
0051d86b      long double x87_r7_1 = ((long double)this->elasticity);
0051d86e      long double temp2 = ((long double)0.0500000007f);
0051d86e      (x87_r7_1 - temp2);
0051d874      eax = ((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0))));
0051d876      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0051d876      
0051d879      if (p_1)
0051d87b          this->bitfield |= 0x200;
0051d87b      
0051d882      long double x87_r7_2 = ((long double)this->translucency);
0051d885      long double temp3 = ((long double)0f);
0051d885      (x87_r7_2 - temp3);
0051d88b      eax = ((((x87_r7_2 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3) ? 1 : 0) << 0xe) | 0))));
0051d88d      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0051d88d      
0051d890      if (p_2)
0051d892          this->bitfield |= 0x40000;
0051d892      
0051d8a1      int32_t var_c = 0;
0051d8a9      int32_t var_8 = 0;
0051d8b1      int32_t var_4 = 0;
0051d8b1      
0051d8c0      if (Vector3::operator!=(&this->velocity, &var_c) != 0)
0051d8c2          this->bitfield |= 4;
0051d8c2      
0051d8d1      var_c = 0;
0051d8d9      int32_t var_8_1 = 0;
0051d8e1      int32_t var_4_1 = 0;
0051d8e1      
0051d8f0      if (Vector3::operator!=(&this->acceleration, &var_c) != 0)
0051d8f2          this->bitfield |= 8;
0051d8f2      
0051d901      var_c = 0;
0051d909      int32_t var_8_2 = 0;
0051d911      int32_t var_4_2 = 0;
0051d911      
0051d920      if (Vector3::operator!=(&this->omega, &var_c) != 0)
0051d922          this->bitfield |= 0x10;
0051d922      
0051d92c      if (this->default_script != PS_Invalid)
0051d92e          this->bitfield |= 0x2000;
0051d92e      
0051d93b      (((long double)this->default_script_intensity) - ((long double)0f));
0051d943      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
0051d943      
0051d946      if (p_3)
0051d948          this->bitfield |= 0x4000;
0051d948      
0051d94f      uint32_t bitfield = this->bitfield;
0051d957      int32_t var_14 = 0;
0051d95b      int32_t esi = 8;
0051d95b      
0051d960      if ((bitfield & 0x10000) != 0)
0051d960      {
0051d964          esi = 0xc;
0051d964          
0051d969          if (buff_length != 0)
0051d96b              esi = (buff_length + 0x10);
0051d960      }
0051d960      else if ((bitfield & 0x20000) != 0)
0051d977          esi = 0xc;
0051d977      
0051d97e      if (*(uint8_t*)((char*)bitfield)[1] < 0)
0051d98f          esi += this->pos.vtable->Pack(&var_14, 0);
0051d98f      
0051d991      uint32_t bitfield_1 = this->bitfield;
0051d991      
0051d996      if ((bitfield_1 & 2) != 0)
0051d998          esi += 4;
0051d998      
0051d99e      if ((*(uint8_t*)((char*)bitfield_1)[1] & 8) != 0)
0051d9a0          esi += 4;
0051d9a0      
0051d9a6      if ((*(uint8_t*)((char*)bitfield_1)[1] & 0x10) != 0)
0051d9a8          esi += 4;
0051d9a8      
0051d9ad      if ((bitfield_1 & 1) != 0)
0051d9af          esi += 4;
0051d9af      
0051d9b4      if ((bitfield_1 & 0x20) != 0)
0051d9b6          esi += 8;
0051d9b6      
0051d9bb      if ((bitfield_1 & 0x40) != 0)
0051d9c3          esi = ((esi + (this->num_children << 3)) + 4);
0051d9c3      
0051d9c9      if (bitfield_1 < 0)
0051d9cb          esi += 4;
0051d9cb      
0051d9d1      if ((*(uint8_t*)((char*)bitfield_1)[1] & 1) != 0)
0051d9d3          esi += 4;
0051d9d3      
0051d9d9      if ((*(uint8_t*)((char*)bitfield_1)[1] & 2) != 0)
0051d9db          esi += 4;
0051d9db      
0051d9e3      if ((bitfield_1 & 0x40000) != 0)
0051d9e5          esi += 4;
0051d9e5      
0051d9ea      if ((bitfield_1 & 4) != 0)
0051d9ec          esi += 0xc;
0051d9ec      
0051d9f1      if ((bitfield_1 & 8) != 0)
0051d9f3          esi += 0xc;
0051d9f3      
0051d9f8      if ((bitfield_1 & 0x10) != 0)
0051d9fa          esi += 0xc;
0051d9fa      
0051da00      if ((*(uint8_t*)((char*)bitfield_1)[1] & 0x20) != 0)
0051da02          esi += 4;
0051da02      
0051da08      if ((*(uint8_t*)((char*)bitfield_1)[1] & 0x40) != 0)
0051da0a          esi += 4;
0051da0a      
0051da12      int32_t edx_3 = ((esi + 0x12) & 3);
0051da15      int32_t ecx_5;
0051da15      
0051da15      if (edx_3 == 0)
0051da20          ecx_5 = 0;
0051da15      else
0051da1c          ecx_5 = (4 - edx_3);
0051da1c      
0051da22      int32_t result = ((esi + 0x12) + ecx_5);
0051da22      
0051da2c      if (arg3 >= result)
0051da2c      {
0051da32          int16_t** ebp_1 = arg2;
0051da39          **(uint32_t**)ebp_1 = bitfield_1;
0051da3e          void* eax_6 = &*(uint32_t*)ebp_1[2];
0051da41          *(uint32_t*)ebp_1 = eax_6;
0051da47          *(uint32_t*)eax_6 = this->state;
0051da4c          void* edi_1 = &*(uint32_t*)ebp_1[2];
0051da4f          *(uint32_t*)ebp_1 = edi_1;
0051da52          float* ecx_7 = this->bitfield;
0051da52          
0051da5d          if ((ecx_7 & 0x10000) != 0)
0051da5d          {
0051da62              *(uint32_t*)edi_1 = this->buff_length;
0051da67              void* ecx_9 = &*(uint32_t*)ebp_1[2];
0051da6a              *(uint32_t*)ebp_1 = ecx_9;
0051da6f              ecx_7 = this->buff_length;
0051da6f              
0051da74              if (ecx_7 != 0)
0051da74              {
0051da7e                  int32_t esi_3;
0051da7e                  int32_t edi_3;
0051da7e                  edi_3 = __builtin_memcpy(ecx_9, this->movement_buffer, ((ecx_7 >> 2) << 2));
0051da85                  __builtin_memcpy(edi_3, esi_3, (ecx_7 & 3));
0051da91                  int16_t* edx_6 = (*(uint32_t*)ebp_1 + this->buff_length);
0051da93                  *(uint32_t*)ebp_1 = edx_6;
0051da9b                  *(uint32_t*)edx_6 = this->autonomous_movement;
0051daac                  *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051da74              }
0051da5d          }
0051da5d          else if ((ecx_7 & 0x20000) != 0)
0051daa5          {
0051daaa              *(uint32_t*)edi_1 = this->animframe_id;
0051daac              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051daa5          }
0051daa5          
0051dab9          float edx_4;
0051dab9          
0051dab9          if (*(uint8_t*)((char*)((int16_t)this->bitfield))[1] < 0)
0051dac3              edx_4 = this->pos.vtable->Pack(ebp_1, arg3);
0051dac3          
0051daca          if ((this->bitfield & 2) != 0)
0051daca          {
0051dad5              **(uint32_t**)ebp_1 = this->mtable_id.id;
0051dad7              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051daca          }
0051daca          
0051dae1          if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 8) != 0)
0051dae1          {
0051daec              **(uint32_t**)ebp_1 = this->stable_id.id;
0051daee              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dae1          }
0051dae1          
0051daf8          if ((*(uint8_t*)((char*)this->bitfield)[1] & 0x10) != 0)
0051daf8          {
0051db03              **(uint32_t**)ebp_1 = this->phstable_id.id;
0051db05              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051daf8          }
0051daf8          
0051db0d          if ((this->bitfield & 1) != 0)
0051db0d          {
0051db18              **(uint32_t**)ebp_1 = this->setup_id.id;
0051db1a              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051db0d          }
0051db0d          
0051db22          if ((this->bitfield & 0x20) != 0)
0051db22          {
0051db2d              **(uint32_t**)ebp_1 = this->parent_id;
0051db32              uint32_t ecx_15 = &*(uint32_t*)ebp_1[2];
0051db35              *(uint32_t*)ebp_1 = ecx_15;
0051db40              *(uint32_t*)ecx_15 = this->location_id;
0051db42              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051db22          }
0051db22          
0051db4a          uint32_t i;
0051db4a          
0051db4a          if ((this->bitfield & 0x40) != 0)
0051db4a          {
0051db55              **(uint32_t**)ebp_1 = this->num_children;
0051db5a              void* eax_17 = &*(uint32_t*)ebp_1[2];
0051db5d              *(uint32_t*)ebp_1 = eax_17;
0051db66              ecx_7 = eax_17;
0051db68              i = 0;
0051db68              
0051db6c              if (this->num_children > 0)
0051db6c              {
0051dba3                  do
0051dba3                  {
0051db79                      *(uint32_t*)ecx_7 = this->child_ids[i];
0051db7e                      void* edx_12 = &*(uint32_t*)ebp_1[2];
0051db81                      *(uint32_t*)ebp_1 = edx_12;
0051db8f                      *(uint32_t*)edx_12 = this->child_location_ids[i];
0051db94                      ecx_7 = &*(uint32_t*)ebp_1[2];
0051db97                      *(uint32_t*)ebp_1 = ecx_7;
0051dba0                      i += 1;
0051dba3                  } while (i < this->num_children);
0051db6c              }
0051db4a          }
0051db4a          
0051dba5          i = this->bitfield;
0051dba5          
0051dbaa          if (i < 0)
0051dbaa          {
0051dbb2              **(uint32_t**)ebp_1 = this->object_scale;
0051dbb4              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dbaa          }
0051dbaa          
0051dbbe          if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 1) != 0)
0051dbbe          {
0051dbc6              **(uint32_t**)ebp_1 = this->friction;
0051dbc8              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dbbe          }
0051dbbe          
0051dbd2          if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 2) != 0)
0051dbd2          {
0051dbda              **(uint32_t**)ebp_1 = this->elasticity;
0051dbdc              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dbd2          }
0051dbd2          
0051dbe7          if ((this->bitfield & 0x40000) != 0)
0051dbe7          {
0051dbef              **(uint32_t**)ebp_1 = this->translucency;
0051dbf1              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dbe7          }
0051dbe7          
0051dbfe          if (((this->bitfield & 4) != 0 && arg3 >= 0xc))
0051dbfe          {
0051dc06              **(uint32_t**)ebp_1 = this->velocity.x;
0051dc0b              edx_4 = &*(uint32_t*)ebp_1[2];
0051dc0e              *(uint32_t*)ebp_1 = edx_4;
0051dc16              *(uint32_t*)edx_4 = ((float)((long double)this->velocity.y));
0051dc1b              ecx_7 = &*(uint32_t*)ebp_1[2];
0051dc1e              *(uint32_t*)ebp_1 = ecx_7;
0051dc26              *(uint32_t*)ecx_7 = ((float)((long double)this->velocity.z));
0051dc28              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dbfe          }
0051dbfe          
0051dc35          if (((this->bitfield & 8) != 0 && arg3 >= 0xc))
0051dc35          {
0051dc40              **(uint32_t**)ebp_1 = this->acceleration.x;
0051dc45              edx_4 = &*(uint32_t*)ebp_1[2];
0051dc48              *(uint32_t*)ebp_1 = edx_4;
0051dc53              *(uint32_t*)edx_4 = ((float)((long double)this->acceleration.y));
0051dc58              ecx_7 = &*(uint32_t*)ebp_1[2];
0051dc5b              *(uint32_t*)ebp_1 = ecx_7;
0051dc66              *(uint32_t*)ecx_7 = ((float)((long double)this->acceleration.z));
0051dc68              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dc35          }
0051dc35          
0051dc75          if (((this->bitfield & 0x10) != 0 && arg3 >= 0xc))
0051dc75          {
0051dc80              **(uint32_t**)ebp_1 = this->omega.x;
0051dc85              edx_4 = &*(uint32_t*)ebp_1[2];
0051dc88              *(uint32_t*)ebp_1 = edx_4;
0051dc93              *(uint32_t*)edx_4 = ((float)((long double)this->omega.y));
0051dc98              ecx_7 = &*(uint32_t*)ebp_1[2];
0051dc9b              *(uint32_t*)ebp_1 = ecx_7;
0051dca6              *(uint32_t*)ecx_7 = ((float)((long double)this->omega.z));
0051dca8              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dc75          }
0051dc75          
0051dcb2          if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 0x20) != 0)
0051dcb2          {
0051dcbd              **(uint32_t**)ebp_1 = this->default_script;
0051dcbf              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dcb2          }
0051dcb2          
0051dcc9          if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 0x40) != 0)
0051dcc9          {
0051dcd4              **(uint32_t**)ebp_1 = this->default_script_intensity;
0051dcd6              *(uint32_t*)ebp_1 = &*(uint32_t*)ebp_1[2];
0051dcc9          }
0051dcc9          
0051dcda          ecx_7 = this->timestamps[0];
0051dce4          **(uint16_t**)ebp_1 = ecx_7;
0051dcea          int16_t* eax_36 = &*(uint32_t*)ebp_1[1];
0051dced          *(uint32_t*)ebp_1 = eax_36;
0051dcf0          edx_4 = this->timestamps[1];
0051dcf7          *(uint16_t*)eax_36 = edx_4;
0051dcfd          int16_t* edi_6 = &*(uint32_t*)ebp_1[1];
0051dd00          *(uint32_t*)ebp_1 = edi_6;
0051dd03          ecx_7 = this->timestamps[2];
0051dd0c          *(uint16_t*)edi_6 = ecx_7;
0051dd12          int16_t* edx_21 = &*(uint32_t*)ebp_1[1];
0051dd15          *(uint32_t*)ebp_1 = edx_21;
0051dd18          int16_t* eax_38 = edx_21;
0051dd1a          edx_21 = this->timestamps[3];
0051dd21          *(uint16_t*)eax_38 = edx_21;
0051dd27          int16_t* ecx_24 = &*(uint32_t*)ebp_1[1];
0051dd2a          *(uint32_t*)ebp_1 = ecx_24;
0051dd2d          int16_t* eax_39 = ecx_24;
0051dd2f          ecx_24 = this->timestamps[4];
0051dd36          *(uint16_t*)eax_39 = ecx_24;
0051dd3c          int16_t* eax_41 = &*(uint32_t*)ebp_1[1];
0051dd3f          *(uint32_t*)ebp_1 = eax_41;
0051dd42          edx_21 = this->timestamps[5];
0051dd49          *(uint16_t*)eax_41 = edx_21;
0051dd4f          int16_t* edi_8 = &*(uint32_t*)ebp_1[1];
0051dd52          *(uint32_t*)ebp_1 = edi_8;
0051dd55          ecx_24 = this->timestamps[6];
0051dd5e          *(uint16_t*)edi_8 = ecx_24;
0051dd64          int16_t* edx_23 = &*(uint32_t*)ebp_1[1];
0051dd67          *(uint32_t*)ebp_1 = edx_23;
0051dd6a          int16_t* eax_43 = edx_23;
0051dd6c          edx_23 = this->timestamps[7];
0051dd73          *(uint16_t*)eax_43 = edx_23;
0051dd79          int16_t* ecx_26 = &*(uint32_t*)ebp_1[1];
0051dd7c          *(uint32_t*)ebp_1 = ecx_26;
0051dd7f          int16_t* eax_44 = ecx_26;
0051dd81          ecx_26 = this->timestamps[8];
0051dd88          *(uint16_t*)eax_44 = ecx_26;
0051dd8e          int16_t* eax_46 = &*(uint32_t*)ebp_1[1];
0051dd91          *(uint32_t*)ebp_1 = eax_46;
0051dd94          void* eax_47 = (eax_46 & 0x80000003);
0051dd94          bool cond:6_1 = eax_47 == 0;
0051dd94          
0051dd99          if (eax_47 < 0)
0051dd99          {
0051dd9c              void* eax_49 = (((char*)eax_47 - 1) | 0xfffffffc);
0051dd9f              eax_47 = ((char*)eax_49 + 1);
0051dd9f              cond:6_1 = eax_49 == 0xffffffff;
0051dd99          }
0051dd99          
0051dda0          if (!(cond:6_1))
0051dda0          {
0051dda7              void* i_2 = (4 - eax_47);
0051dda7              
0051dda9              if (4 != eax_47)
0051dda9              {
0051ddbe                  void* i_1;
0051ddbe                  
0051ddbe                  do
0051ddbe                  {
0051ddb3                      **(uint8_t**)ebp_1 = 0;
0051ddba                      i_1 = i_2;
0051ddba                      i_2 -= 1;
0051ddbb                      *(uint32_t*)ebp_1 += 1;
0051ddbe                  } while (i_1 != 1);
0051dda9              }
0051dda0          }
0051da2c      }
0051da2c      
0051ddc9      return result;
0051d7c0  }

0051ddad                                         8d 49 00                                                               .I.
0051ddcc                                      90 90 90 90                                                              ....

0051ddd0  int32_t __thiscall PhysicsDesc::UnPack(class PhysicsDesc* this, void** arg2, uint32_t arg3)

0051ddd0  {
0051ddd9      PhysicsDesc::Destroy(this);
0051dde7      this->bitfield = **(uint32_t**)arg2;
0051dded      void* edi_1 = (*(uint32_t*)arg2 + 4);
0051ddf0      *(uint32_t*)arg2 = edi_1;
0051ddf7      this->state = *(uint32_t*)edi_1;
0051ddfd      void* esi_1 = (*(uint32_t*)arg2 + 4);
0051de00      *(uint32_t*)arg2 = esi_1;
0051de03      uint32_t bitfield = this->bitfield;
0051de03      
0051de0d      if ((bitfield & 0x10000) == 0)
0051de0d      {
0051de67          this->movement_buffer = nullptr;
0051de67          
0051de6a          if ((bitfield & 0x20000) == 0)
0051de7a              this->animframe_id = 0;
0051de6a          else
0051de6a          {
0051de71              this->animframe_id = **(uint32_t**)arg2;
0051de74              *(uint32_t*)arg2 += 4;
0051de6a          }
0051de0d      }
0051de0d      else
0051de0d      {
0051de11          this->buff_length = *(uint32_t*)esi_1;
0051de14          *(uint32_t*)arg2 += 4;
0051de18          uint32_t buff_length = this->buff_length;
0051de18          
0051de1f          if (buff_length != 0)
0051de1f          {
0051de22              void* eax_3 = operator new[](buff_length);
0051de27              uint32_t buff_length_1 = this->buff_length;
0051de2a              this->movement_buffer = eax_3;
0051de37              int32_t esi_3;
0051de37              int32_t edi_3;
0051de37              edi_3 = __builtin_memcpy(eax_3, *(uint32_t*)arg2, ((buff_length_1 >> 2) << 2));
0051de3e              __builtin_memcpy(edi_3, esi_3, (buff_length_1 & 3));
0051de46              void* ecx_6 = (*(uint32_t*)arg2 + this->buff_length);
0051de48              *(uint32_t*)arg2 = ecx_6;
0051de4f              this->autonomous_movement = *(uint32_t*)ecx_6;
0051de5b              *(uint32_t*)arg2 += 4;
0051de1f          }
0051de0d      }
0051de0d      
0051de88      if (*(uint8_t*)((char*)((int16_t)this->bitfield))[1] >= 0)
0051de88      {
0051de9b          int32_t var_48_1 = 0x796910;
0051dea7          int32_t var_40 = 0x3f800000;
0051deaf          int32_t var_3c_1 = 0;
0051deb7          int32_t var_38_1 = 0;
0051debf          int32_t var_34_1 = 0;
0051dec7          int32_t var_c_1 = 0;
0051decf          int32_t var_8_1 = 0;
0051ded7          int32_t var_4_1 = 0;
0051dedf          Frame::cache(&var_40);
0051def0          this->pos.objcell_id = 0;
0051def3          Frame::operator=(&this->pos.frame, &var_40);
0051de88      }
0051de88      else
0051de8a          this->pos.vtable->UnPack(arg2, arg3);
0051de8a      
0051defc      if ((this->bitfield & 2) == 0)
0051df17          this->mtable_id.id = INVALID_DID.id;
0051defc      else
0051defc      {
0051defe          void* eax_10 = *(uint32_t*)arg2;
0051df01          class IDClass<_tagDataID,32,0> ecx_11 = *(uint32_t*)eax_10;
0051df06          *(uint32_t*)arg2 = ((char*)eax_10 + 4);
0051df09          this->mtable_id.id = ecx_11;
0051defc      }
0051defc      
0051df23      if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 8) == 0)
0051df3d          this->stable_id.id = INVALID_DID.id;
0051df23      else
0051df23      {
0051df25          void* eax_13 = *(uint32_t*)arg2;
0051df28          class IDClass<_tagDataID,32,0> ecx_12 = *(uint32_t*)eax_13;
0051df2d          *(uint32_t*)arg2 = ((char*)eax_13 + 4);
0051df30          this->stable_id.id = ecx_12;
0051df23      }
0051df23      
0051df49      class IDClass<_tagDataID,32,0> ecx_13;
0051df49      
0051df49      if ((*(uint8_t*)((char*)this->bitfield)[1] & 0x10) == 0)
0051df58          ecx_13 = INVALID_DID.id;
0051df49      else
0051df49      {
0051df4b          void* eax_16 = *(uint32_t*)arg2;
0051df4e          ecx_13 = *(uint32_t*)eax_16;
0051df53          *(uint32_t*)arg2 = ((char*)eax_16 + 4);
0051df49      }
0051df49      
0051df62      this->phstable_id.id = ecx_13;
0051df62      
0051df68      if ((this->bitfield & 1) == 0)
0051df83          this->setup_id.id = INVALID_DID.id;
0051df68      else
0051df68      {
0051df6a          void* eax_17 = *(uint32_t*)arg2;
0051df6d          ecx_13 = *(uint32_t*)eax_17;
0051df72          *(uint32_t*)arg2 = ((char*)eax_17 + 4);
0051df75          this->setup_id.id = ecx_13;
0051df68      }
0051df68      
0051df8d      if ((this->bitfield & 0x20) == 0)
0051dfb3          this->parent_id = 0;
0051df8d      else
0051df8d      {
0051df94          this->parent_id = **(uint32_t**)arg2;
0051df9d          ecx_13 = (*(uint32_t*)arg2 + 4);
0051dfa0          *(uint32_t*)arg2 = ecx_13;
0051dfa7          this->location_id = *(uint32_t*)ecx_13;
0051dfad          *(uint32_t*)arg2 += 4;
0051df8d      }
0051df8d      
0051dfbd      uint32_t i;
0051dfbd      
0051dfbd      if ((this->bitfield & 0x40) == 0)
0051dfbd      {
0051e045          this->child_ids = nullptr;
0051e04b          this->child_location_ids = nullptr;
0051dfbd      }
0051dfbd      else
0051dfbd      {
0051dfc8          this->num_children = **(uint32_t**)arg2;
0051dfce          *(uint32_t*)arg2 += 4;
0051dfe1          this->child_ids = operator new[]((this->num_children << 2));
0051dff1          void* eax_23 = operator new[]((this->num_children << 2));
0051dff6          ecx_13 = this->num_children;
0051dffc          this->child_location_ids = eax_23;
0051e005          i = 0;
0051e005          
0051e009          if (ecx_13 > 0)
0051e009          {
0051e041              do
0051e041              {
0051e015                  this->child_ids[i] = **(uint32_t**)arg2;
0051e021                  void* edx_11 = (*(uint32_t*)arg2 + 4);
0051e024                  *(uint32_t*)arg2 = edx_11;
0051e02b                  this->child_location_ids[i] = *(uint32_t*)edx_11;
0051e034                  *(uint32_t*)arg2 += 4;
0051e03e                  i += 1;
0051e041              } while (i < this->num_children);
0051e009          }
0051dfbd      }
0051dfbd      
0051e051      i = this->bitfield;
0051e051      
0051e056      if (i < 0)
0051e056      {
0051e05d          this->object_scale = **(uint32_t**)arg2;
0051e060          *(uint32_t*)arg2 += 4;
0051e056      }
0051e056      
0051e06a      if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 1) != 0)
0051e06a      {
0051e071          this->friction = **(uint32_t**)arg2;
0051e074          *(uint32_t*)arg2 += 4;
0051e06a      }
0051e06a      
0051e07e      if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 2) != 0)
0051e07e      {
0051e085          this->elasticity = **(uint32_t**)arg2;
0051e088          *(uint32_t*)arg2 += 4;
0051e07e      }
0051e07e      
0051e093      if ((this->bitfield & 0x40000) != 0)
0051e093      {
0051e09a          this->translucency = **(uint32_t**)arg2;
0051e09d          *(uint32_t*)arg2 += 4;
0051e093      }
0051e093      
0051e0aa      if (((this->bitfield & 4) != 0 && arg3 >= 0xc))
0051e0aa      {
0051e0b1          this->velocity.x = **(uint32_t**)arg2;
0051e0b7          void* edx_18 = (*(uint32_t*)arg2 + 4);
0051e0ba          *(uint32_t*)arg2 = edx_18;
0051e0c1          this->velocity.y = *(uint32_t*)edx_18;
0051e0c7          void* ecx_23 = (*(uint32_t*)arg2 + 4);
0051e0ca          *(uint32_t*)arg2 = ecx_23;
0051e0d1          this->velocity.z = *(uint32_t*)ecx_23;
0051e0d4          *(uint32_t*)arg2 += 4;
0051e0aa      }
0051e0aa      
0051e0e1      if (((this->bitfield & 8) != 0 && arg3 >= 0xc))
0051e0e1      {
0051e0e8          this->acceleration.x = **(uint32_t**)arg2;
0051e0f1          void* edx_21 = (*(uint32_t*)arg2 + 4);
0051e0f4          *(uint32_t*)arg2 = edx_21;
0051e0fb          this->acceleration.y = *(uint32_t*)edx_21;
0051e104          ecx_13 = (*(uint32_t*)arg2 + 4);
0051e107          *(uint32_t*)arg2 = ecx_13;
0051e10e          this->acceleration.z = *(uint32_t*)ecx_13;
0051e114          *(uint32_t*)arg2 += 4;
0051e0e1      }
0051e0e1      
0051e121      if (((this->bitfield & 0x10) != 0 && arg3 >= 0xc))
0051e121      {
0051e128          this->omega.x = **(uint32_t**)arg2;
0051e131          void* edx_24 = (*(uint32_t*)arg2 + 4);
0051e134          *(uint32_t*)arg2 = edx_24;
0051e13b          this->omega.y = *(uint32_t*)edx_24;
0051e144          ecx_13 = (*(uint32_t*)arg2 + 4);
0051e147          *(uint32_t*)arg2 = ecx_13;
0051e14e          this->omega.z = *(uint32_t*)ecx_13;
0051e154          *(uint32_t*)arg2 += 4;
0051e121      }
0051e121      
0051e15e      if ((*(uint8_t*)((char*)((int16_t)this->bitfield))[1] & 0x20) == 0)
0051e171          this->default_script = PS_Invalid;
0051e15e      else
0051e15e      {
0051e165          this->default_script = **(uint32_t**)arg2;
0051e16b          *(uint32_t*)arg2 += 4;
0051e15e      }
0051e15e      
0051e17d      if ((*(uint8_t*)((char*)this->bitfield)[1] & 0x40) == 0)
0051e190          this->default_script_intensity = 0f;
0051e17d      else
0051e17d      {
0051e184          this->default_script_intensity = **(uint32_t**)arg2;
0051e18a          *(uint32_t*)arg2 += 4;
0051e17d      }
0051e17d      
0051e199      uint32_t eax_40;
0051e199      eax_40 = **(uint16_t**)arg2;
0051e19c      this->timestamps[0] = eax_40;
0051e1a6      int16_t* esi_6 = (*(uint32_t*)arg2 + 2);
0051e1a9      *(uint32_t*)arg2 = esi_6;
0051e1ae      ecx_13.id = *(uint16_t*)esi_6;
0051e1b1      this->timestamps[1] = ecx_13.id;
0051e1bb      void* edx_29 = (*(uint32_t*)arg2 + 2);
0051e1be      *(uint32_t*)arg2 = edx_29;
0051e1c3      edx_29 = *(uint16_t*)edx_29;
0051e1c6      this->timestamps[2] = edx_29;
0051e1d0      void* ecx_29 = (*(uint32_t*)arg2 + 2);
0051e1d3      *(uint32_t*)arg2 = ecx_29;
0051e1d8      void* eax_43;
0051e1d8      eax_43 = *(uint16_t*)ecx_29;
0051e1db      this->timestamps[3] = eax_43;
0051e1e5      void* eax_45 = (*(uint32_t*)arg2 + 2);
0051e1e8      *(uint32_t*)arg2 = eax_45;
0051e1eb      ecx_29 = *(uint16_t*)eax_45;
0051e1ee      this->timestamps[4] = ecx_29;
0051e1f8      void* edi_5 = (*(uint32_t*)arg2 + 2);
0051e1fb      *(uint32_t*)arg2 = edi_5;
0051e200      edx_29 = *(uint16_t*)edi_5;
0051e203      this->timestamps[5] = edx_29;
0051e20d      void* esi_8 = (*(uint32_t*)arg2 + 2);
0051e210      *(uint32_t*)arg2 = esi_8;
0051e215      void* eax_47;
0051e215      eax_47 = *(uint16_t*)esi_8;
0051e218      this->timestamps[6] = eax_47;
0051e222      void* edx_31 = (*(uint32_t*)arg2 + 2);
0051e225      *(uint32_t*)arg2 = edx_31;
0051e22a      ecx_29 = *(uint16_t*)edx_31;
0051e22d      this->timestamps[7] = ecx_29;
0051e237      void* ecx_31 = (*(uint32_t*)arg2 + 2);
0051e23a      *(uint32_t*)arg2 = ecx_31;
0051e23f      edx_31 = *(uint16_t*)ecx_31;
0051e242      this->timestamps[8] = edx_31;
0051e24c      void* eax_51 = (*(uint32_t*)arg2 + 2);
0051e24f      *(uint32_t*)arg2 = eax_51;
0051e252      void* eax_52 = (eax_51 & 0x80000003);
0051e252      bool cond:4 = eax_52 == 0;
0051e252      
0051e257      if (eax_52 < 0)
0051e257      {
0051e25a          void* eax_54 = (((char*)eax_52 - 1) | 0xfffffffc);
0051e25d          eax_52 = ((char*)eax_54 + 1);
0051e25d          cond:4 = eax_54 == 0xffffffff;
0051e257      }
0051e257      
0051e25e      if (!(cond:4))
0051e25e      {
0051e265          void* i_2 = (4 - eax_52);
0051e265          
0051e267          if (4 != eax_52)
0051e267          {
0051e27e              void* i_1;
0051e27e              
0051e27e              do
0051e27e              {
0051e273                  **(uint8_t**)arg2 = 0;
0051e27a                  i_1 = i_2;
0051e27a                  i_2 -= 1;
0051e27b                  *(uint32_t*)arg2 += 1;
0051e27e              } while (i_1 != 1);
0051e267          }
0051e25e      }
0051e25e      
0051e28c      return 1;
0051ddd0  }

0051e00d                                         8d 49 00                                                               .I.
0051e28f                                               90                                                                 .

0051e290  void __fastcall GfxObjDegradeInfo::GfxObjDegradeInfo(class GfxObjDegradeInfo* this)

0051e290  {
0051e299      DBObj::DBObj(this, INVALID_DID.id);
0051e29e      this->vtable = &PackObj::`vftable';
0051e2a7      this->num_degrades = 0;
0051e2aa      this->degrades = nullptr;
0051e2ad      this->vtable = 0x7c7300;
0051e2b3      this->vtable = &GfxObjDegradeInfo::`vftable';
0051e290  }

0051e2be                                                                                            90 90                                ..

0051e2c0  int32_t CreateBlockingParticleHook::GetType(class CreateBlockingParticleHook* this @ ecx) __pure

0051e2c0  {
0051e2c5      return 0x1a;
0051e2c0  }

0051e2c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0051e2d0  uint32_t __fastcall GfxObjDegradeInfo::get_max_degrade_distance(class GfxObjDegradeInfo const* this)

0051e2d0  {
0051e2d0      uint32_t num_degrades = this->num_degrades;
0051e2d0      
0051e2d6      if (num_degrades <= 2)
0051e2d6      {
0051e2e3          this->degrades->max_dist;
0051e2e9          return num_degrades;
0051e2d6      }
0051e2d6      
0051e2db      uint32_t eax = (num_degrades * 5);
0051e2de      *(uint32_t*)((this->degrades + (eax << 2)) - 0x18);
0051e2e2      return eax;
0051e2d0  }

0051e2ea                                90 90 90 90 90 90                                                            ......

0051e2f0  void* __thiscall GfxObjDegradeInfo::`vector deleting destructor'(class GfxObjDegradeInfo* this, uint32_t arg2)

0051e2f0  {
0051e2f3      /* tailcall */
0051e2f3      return GfxObjDegradeInfo::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0051e2f0  }

0051e2f8                                                                          cc cc cc cc cc cc cc cc                          ........

0051e300  class DBObj* GfxObjDegradeInfo::Allocate(class GfxObjDegradeInfo const* this @ ecx)

0051e300  {
0051e300      /* tailcall */
0051e300      return GfxObjDegradeInfo::Allocator();
0051e300  }

0051e305                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0051e310  void __fastcall GfxObjDegradeInfo::Destroy(class GfxObjDegradeInfo* this)

0051e310  {
0051e313      class GfxObjInfo* degrades = this->degrades;
0051e313      
0051e318      if (degrades != 0)
0051e318      {
0051e31e          operator delete[](((char*)degrades - 4));
0051e326          this->degrades = nullptr;
0051e318      }
0051e318      
0051e32d      this->num_degrades = 0;
0051e310  }

0051e336                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0051e340  uint32_t __thiscall GfxObjDegradeInfo::Pack(class GfxObjDegradeInfo* this, void** arg2, uint32_t arg3)

0051e340  {
0051e340      class GfxObjDegradeInfo* this_1 = this;
0051e341      int32_t edx = this->m_bLoaded*(int32_t*)((char*)this + 8);
0051e346      void* eax = 4;
0051e34b      void* var_4 = 4;
0051e34b      
0051e34f      if (edx > 0)
0051e34f      {
0051e354          eax = ((edx * 0x14) + 4);
0051e35b          var_4 = eax;
0051e34f      }
0051e34f      
0051e363      if (arg3 >= eax)
0051e363      {
0051e375          **(uint32_t**)arg2 = this->m_bLoaded*(int32_t*)((char*)this + 8);
0051e379          void* edi_3 = (*(uint32_t*)arg2 + 4);
0051e37c          *(uint32_t*)arg2 = edi_3;
0051e381          int32_t i = 0;
0051e381          
0051e385          if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
0051e385          {
0051e38a              int32_t ebx_1 = 0;
0051e38a              
0051e3e8              do
0051e3e8              {
0051e397                  int32_t* esi_4 = (*(int32_t*)((char*)this + 0xc) + ebx_1);
0051e397                  
0051e39c                  if (arg3 >= 0x14)
0051e39c                  {
0051e3a0                      *(uint32_t*)edi_3 = *(uint32_t*)esi_4;
0051e3a4                      void* eax_5 = (*(uint32_t*)arg2 + 4);
0051e3a7                      *(uint32_t*)arg2 = eax_5;
0051e3ae                      *(uint32_t*)eax_5 = esi_4[1];
0051e3b2                      void* edi_6 = (*(uint32_t*)arg2 + 4);
0051e3b5                      *(uint32_t*)arg2 = edi_6;
0051e3ba                      *(uint32_t*)edi_6 = ((float)((long double)esi_4[2]));
0051e3be                      void* eax_8 = (*(uint32_t*)arg2 + 4);
0051e3c1                      *(uint32_t*)arg2 = eax_8;
0051e3c8                      *(uint32_t*)eax_8 = ((float)((long double)esi_4[3]));
0051e3cc                      float* edi_9 = (*(uint32_t*)arg2 + 4);
0051e3cf                      *(uint32_t*)arg2 = edi_9;
0051e3d4                      *(uint32_t*)edi_9 = ((float)((long double)esi_4[4]));
0051e3d8                      void* eax_10 = (*(uint32_t*)arg2 + 4);
0051e3db                      *(uint32_t*)arg2 = eax_10;
0051e3dd                      edi_3 = eax_10;
0051e39c                  }
0051e39c                  
0051e3e2                  i += 1;
0051e3e3                  ebx_1 += 0x14;
0051e3e8              } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
0051e3e8              
0051e3ea              return var_4;
0051e385          }
0051e363      }
0051e363      
0051e3f3      return eax;
0051e340  }

0051e3f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0051e400  int32_t __thiscall GfxObjDegradeInfo::UnPack(class GfxObjDegradeInfo* this, void** arg2, uint32_t arg3)

0051e400  {
0051e40b      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
0051e416      this->m_bLoaded*(int32_t*)((char*)this + 8) = **(uint32_t**)arg2;
0051e419      *(uint32_t*)arg2 += 4;
0051e41c      int32_t ebx = this->m_bLoaded*(int32_t*)((char*)this + 8);
0051e42a      void* eax_2 = operator new[](((ebx * 0x14) + 4));
0051e434      void* eax_3;
0051e434      
0051e434      if (eax_2 == 0)
0051e43d          eax_3 = nullptr;
0051e434      else
0051e434      {
0051e436          *(uint32_t*)eax_2 = ebx;
0051e438          eax_3 = ((char*)eax_2 + 4);
0051e434      }
0051e434      
0051e43f      *(int32_t*)((char*)this + 0xc) = eax_3;
0051e445      int32_t i = 0;
0051e445      
0051e449      if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
0051e449      {
0051e44b          int32_t ebx_1 = 0;
0051e44b          
0051e49a          do
0051e49a          {
0051e450              void* ecx_3 = *(uint32_t*)arg2;
0051e452              int32_t ebp_1 = *(uint32_t*)ecx_3;
0051e454              int32_t* eax_5 = *(int32_t*)((char*)this + 0xc);
0051e45a              *(uint32_t*)arg2 = ((char*)ecx_3 + 4);
0051e45c              *(uint32_t*)((char*)eax_5 + ebx_1) = ebp_1;
0051e463              void* eax_6 = ((char*)eax_5 + ebx_1);
0051e465              *(uint32_t*)((char*)eax_6 + 4) = **(uint32_t**)arg2;
0051e46a              void* ecx_8 = (*(uint32_t*)arg2 + 4);
0051e46d              *(uint32_t*)arg2 = ecx_8;
0051e471              *(uint32_t*)((char*)eax_6 + 8) = *(uint32_t*)ecx_8;
0051e476              void* ebp_3 = (*(uint32_t*)arg2 + 4);
0051e479              *(uint32_t*)arg2 = ebp_3;
0051e47f              *(uint32_t*)((char*)eax_6 + 0xc) = *(uint32_t*)ebp_3;
0051e484              void* ecx_13 = (*(uint32_t*)arg2 + 4);
0051e487              *(uint32_t*)arg2 = ecx_13;
0051e48b              *(uint32_t*)((char*)eax_6 + 0x10) = *(uint32_t*)ecx_13;
0051e48e              *(uint32_t*)arg2 += 4;
0051e494              i += 1;
0051e495              ebx_1 += 0x14;
0051e49a          } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
0051e449      }
0051e449      
0051e4a5      return 1;
0051e400  }

0051e4a8                          90 90 90 90 90 90 90 90                                                          ........

0051e4b0  void __thiscall GfxObjDegradeInfo::get_degrade(class GfxObjDegradeInfo const* this, float arg2, uint32_t* arg3, int32_t* arg4)

0051e4b0  {
0051e4b0      class GfxObjDegradeInfo* this_1 = this;
0051e4b0      
0051e4b8      if (degrades_disabled != 0)
0051e4b8      {
0051e4be          *(uint32_t*)arg3 = 0;
0051e4ce          *(uint32_t*)arg4 = this->degrades->degrade_mode;
0051e4d1          return;
0051e4b8      }
0051e4b8      
0051e4d4      int32_t Render::force_level_1 = Render::force_level;
0051e4d4      
0051e4dd      if (Render::force_level_1 != 0xffffffff)
0051e4dd      {
0051e4df          uint32_t num_degrades = this->num_degrades;
0051e4df          
0051e4e4          if (Render::force_level_1 < num_degrades)
0051e4e4          {
0051e508              *(uint32_t*)arg3 = Render::force_level_1;
0051e51d              *(uint32_t*)arg4 = this->degrades[Render::force_level].degrade_mode;
0051e520              return;
0051e4e4          }
0051e4e4          
0051e4eb          *(uint32_t*)arg3 = (num_degrades - 1);
0051e4fe          *(uint32_t*)arg4 = this->degrades[this->num_degrades].gfxobj_id.id;
0051e501          return;
0051e4dd      }
0051e4dd      
0051e523      long double x87_r7 = ((long double)arg2);
0051e527      this_1 = nullptr;
0051e531      long double x87_r7_2 = (fabsl(x87_r7) - ((long double)Render::s_rDegradeDistance));
0051e537      arg2 = ((float)x87_r7_2);
0051e53b      (x87_r7_2 - ((long double)0f));
0051e543      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0051e546      class GfxObjDegradeInfo** eax_10 = &this_1;
0051e546      
0051e54a      if (p)
0051e54c          eax_10 = &arg2;
0051e54c      
0051e552      arg2 = *(uint32_t*)eax_10;
0051e556      class GfxObjDegradeInfo* eax_11;
0051e556      eax_11 = Render::auto_update_deg_mul;
0051e556      
0051e55d      if (eax_11 == 0)
0051e570          this_1 = Render::s_rUserSuppliedDegradeBias;
0051e55d      else
0051e565          this_1 = Render::deg_mul;
0051e565      
0051e574      long double x87_r7_3 = ((long double)this_1);
0051e578      uint32_t num_degrades_1 = this->num_degrades;
0051e57b      long double temp2 = ((long double)0f);
0051e57b      (x87_r7_3 - temp2);
0051e582      uint32_t esi = 0;
0051e585      eax_11 = ((((x87_r7_3 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2) ? 1 : 0) << 0xe) | 0))));
0051e587      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0051e587      
0051e58a      if (p_1)
0051e58a      {
0051e5d4          if (num_degrades_1 > 0)
0051e5d4          {
0051e5d9              float* edi_4 = &this->degrades->max_dist;
0051e5d9              
0051e5e0              while (true)
0051e5e0              {
0051e5e0                  long double x87_r7_8 = ((long double)ADJ(edi_4)->ideal_dist);
0051e5eb                  long double x87_r6_4 = (x87_r7_8 - ((x87_r7_8 - ((long double)ADJ(edi_4)->max_dist)) * ((long double)this_1)));
0051e5ed                  long double x87_r5_1 = ((long double)arg2);
0051e5f1                  (x87_r5_1 - x87_r6_4);
0051e5f3                  eax_11 = ((((x87_r5_1 < x87_r6_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, x87_r6_4))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == x87_r6_4) ? 1 : 0) << 0xe) | 0x3800))));
0051e5f7                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0051e5f7                  
0051e5fa                  if (!(p_2))
0051e5fa                      break;
0051e5fa                  
0051e5fc                  esi += 1;
0051e5fd                  edi_4 = &edi_4[5];
0051e5fd                  
0051e602                  if (esi >= num_degrades_1)
0051e602                      goto label_51e609;
0051e5e0              }
0051e5e0              
0051e5ba          label_51e5ba:
0051e5ba              *(uint32_t*)arg3 = esi;
0051e5cb              *(uint32_t*)arg4 = this->degrades[esi].degrade_mode;
0051e5cf              return;
0051e5d4          }
0051e58a      }
0051e58a      else if (num_degrades_1 > 0)
0051e58e      {
0051e593          float* edi_2 = &this->degrades->ideal_dist;
0051e593          
0051e59f          while (true)
0051e59f          {
0051e59f              long double x87_r7_7 = (((((long double)ADJ(edi_2)->ideal_dist) - ((long double)ADJ(edi_2)->min_dist)) * ((long double)this_1)) + ((long double)ADJ(edi_2)->ideal_dist));
0051e5a1              long double temp3_1 = ((long double)arg2);
0051e5a1              (x87_r7_7 - temp3_1);
0051e5a5              eax_11 = ((((x87_r7_7 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0051e5a5              
0051e5aa              if ((*(uint8_t*)((char*)eax_11)[1] & 0x41) == 0)
0051e5aa                  break;
0051e5aa              
0051e5ac              esi += 1;
0051e5ad              edi_2 = &edi_2[5];
0051e5ad              
0051e5b2              if (esi >= num_degrades_1)
0051e5b2                  goto label_51e609;
0051e59f          }
0051e59f          
0051e5aa          goto label_51e5ba;
0051e58e      }
0051e58e      
0051e609  label_51e609:
0051e609      *(uint32_t*)arg3 = (num_degrades_1 - 1);
0051e61d      *(uint32_t*)arg4 = this->degrades[this->num_degrades].gfxobj_id.id;
0051e4b0  }

0051e624              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0051e630  void __thiscall GfxObjDegradeInfo::GetSubDataIDs(class GfxObjDegradeInfo const* this, class QualifiedDataIDArray* arg2)

0051e630  {
0051e63a      int32_t i = 0;
0051e63a      
0051e63e      if (this->num_degrades > 0)
0051e63e      {
0051e646          class IDClass<_tagDataID,32,0>* ebx_1 = nullptr;
0051e646          
0051e66d          do
0051e66d          {
0051e65f              void var_8;
0051e65f              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, *(uint32_t*)((char*)ebx_1 + this->degrades), 0), 0);
0051e667              i += 1;
0051e668              ebx_1 = &ebx_1[5];
0051e66d          } while (i < this->num_degrades);
0051e63e      }
0051e630  }

0051e679                                                                             90 90 90 90 90 90 90                           .......

0051e680  void* __thiscall GfxObjDegradeInfo::`scalar deleting destructor'(class GfxObjDegradeInfo* this, uint32_t arg2)

0051e680  {
0051e683      class GfxObjInfo* degrades = this->degrades;
0051e688      this->vtable = 0x7c7300;
0051e68e      this->vtable = &GfxObjDegradeInfo::`vftable';
0051e68e      
0051e695      if (degrades != 0)
0051e695      {
0051e69b          operator delete[](((char*)degrades - 4));
0051e6a3          this->degrades = nullptr;
0051e695      }
0051e695      
0051e6aa      this->num_degrades = 0;
0051e6b3      this->vtable = &PackObj::`vftable';
0051e6ba      DBObj::~DBObj(this);
0051e6ba      
0051e6c4      if ((arg2 & 1) != 0)
0051e6c7          operator delete(this);
0051e6c7      
0051e6d2      return this;
0051e680  }

0051e6d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051e6e0  void __thiscall RawMotionState::RemoveMotion(class RawMotionState* this, uint32_t arg2)

0051e6e0  {
0051e6ed      if ((arg2 - 0x6500000d) > 3)
0051e6ed      {
0051e70f          if ((arg2 & 0x40000000) == 0)
0051e70f          {
0051e72e              if ((arg2 < 0 && arg2 == this->current_style))
0051e730                  this->current_style = 0x8000003d;
0051e70f          }
0051e70f          else if (arg2 == this->forward_command)
0051e714          {
0051e716              this->forward_command = 0x41000003;
0051e71d              this->forward_speed = 1f;
0051e714          }
0051e714          
0051e737          return;
0051e6ed      }
0051e6ed      
0051e72e      switch (arg2)
0051e72e      {
0051e700          case 0x6500000d:
0051e700          case 0x6500000e:
0051e700          {
0051e700              this->turn_command = 0;
0051e707              return;
0051e700              break;
0051e700          }
0051e6f6          case 0x6500000f:
0051e6f6          case 0x65000010:
0051e6f6          {
0051e6f6              this->sidestep_command = 0;
0051e6fd              return;
0051e6f6              break;
0051e6f6          }
0051e72e      }
0051e6e0  }

0051e73a                                                                                8b ff                                        ..
0051e73c  uint32_t jump_table_51e73c[0x4] = 
0051e73c  {
0051e73c      [0x0] =  0x0051e700
0051e740      [0x1] =  0x0051e700
0051e744      [0x2] =  0x0051e6f6
0051e748      [0x3] =  0x0051e6f6
0051e74c  }

0051e74c                                      90 90 90 90                                                              ....

0051e750  void __thiscall InterpretedMotionState::copy_movement_from(class InterpretedMotionState* this, class InterpretedMotionState const* arg2)

0051e750  {
0051e757      this->current_style = arg2->current_style;
0051e75d      this->forward_command = arg2->forward_command;
0051e763      this->forward_speed = arg2->forward_speed;
0051e769      this->sidestep_command = arg2->sidestep_command;
0051e76f      this->sidestep_speed = arg2->sidestep_speed;
0051e775      this->turn_command = arg2->turn_command;
0051e77b      this->turn_speed = arg2->turn_speed;
0051e750  }

0051e781     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0051e790  void __thiscall InterpretedMotionState::RemoveMotion(class InterpretedMotionState* this, uint32_t arg2)

0051e790  {
0051e79c      if (arg2 == 0x6500000d)
0051e79c      {
0051e7dd          this->turn_command = 0;
0051e7dd          return;
0051e79c      }
0051e79c      
0051e7a1      if (arg2 == 0x6500000f)
0051e7a1      {
0051e7d3          this->sidestep_command = 0;
0051e7da          return;
0051e7a1      }
0051e7a1      
0051e7a8      if ((arg2 & 0x40000000) == 0)
0051e7a8      {
0051e7c7          if ((arg2 < 0 && arg2 == this->current_style))
0051e7c9              this->current_style = 0x8000003d;
0051e7a8      }
0051e7a8      else if (arg2 == this->forward_command)
0051e7ad      {
0051e7af          this->forward_command = 0x41000003;
0051e7b6          this->forward_speed = 1f;
0051e7ad      }
0051e790  }

0051e7e7                       90 90 90 90 90 90 90 90 90                                                         .........

0051e7f0  void __fastcall RawMotionState::RawMotionState(class RawMotionState* this)

0051e7f0  {
0051e7f9      this->vtable = 0x7c7a4c;
0051e7ff      this->actions.head_ = 0;
0051e802      this->actions.tail_ = nullptr;
0051e805      this->current_holdkey = HoldKey_None;
0051e80c      this->current_style = 0x8000003d;
0051e813      this->forward_command = 0x41000003;
0051e81a      this->forward_holdkey = HoldKey_Invalid;
0051e81d      this->forward_speed = 1f;
0051e820      this->sidestep_command = 0;
0051e823      this->sidestep_holdkey = HoldKey_Invalid;
0051e826      this->sidestep_speed = 1f;
0051e829      this->turn_command = 0;
0051e82c      this->turn_holdkey = HoldKey_Invalid;
0051e82f      this->turn_speed = 1f;
0051e7f0  }

0051e833                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0051e840  void __thiscall RawMotionState::AddAction(class RawMotionState* this, uint32_t arg2, float arg3, uint32_t arg4, int32_t arg5)

0051e840  {
0051e845      class LListData* eax = operator new(0x14);
0051e845      
0051e84f      if (eax == 0)
0051e875          eax = nullptr;
0051e84f      else
0051e84f      {
0051e859          *(int32_t*)((char*)eax + 4) = arg2;
0051e860          *(int32_t*)((char*)eax + 8) = arg3;
0051e867          eax->llist_next = 0;
0051e86d          *(int32_t*)((char*)eax + 0xc) = arg4;
0051e870          *(int32_t*)((char*)eax + 0x10) = arg5;
0051e84f      }
0051e84f      
0051e877      class LListData** tail_ = this->actions.tail_;
0051e877      
0051e87c      if (tail_ != 0)
0051e87c      {
0051e87e          *(uint32_t*)tail_ = eax;
0051e880          this->actions.tail_ = eax;
0051e884          return;
0051e87c      }
0051e87c      
0051e887      this->actions.head_ = eax;
0051e88a      this->actions.tail_ = eax;
0051e840  }

0051e891                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0051e8a0  uint32_t __fastcall RawMotionState::RemoveAction(class RawMotionState* this)

0051e8a0  {
0051e8a0      class LListData* head_ = this->actions.head_;
0051e8a0      
0051e8a7      if (head_ == 0)
0051e8cb          return 0;
0051e8cb      
0051e8a9      class LListData* llist_next = head_->llist_next;
0051e8ad      this->actions.head_ = llist_next;
0051e8ad      
0051e8b0      if (llist_next == 0)
0051e8b2          this->actions.tail_ = llist_next;
0051e8b2      
0051e8b6      head_->llist_next = 0;
0051e8bc      int32_t result = *(int32_t*)((char*)head_ + 4);
0051e8c0      operator delete(head_);
0051e8c8      return result;
0051e8a0  }

0051e8cc                                      90 90 90 90                                                              ....

0051e8d0  void __fastcall InterpretedMotionState::InterpretedMotionState(class InterpretedMotionState* this)

0051e8d0  {
0051e8d9      this->vtable = 0x7c7a60;
0051e8df      this->current_style = 0x8000003d;
0051e8e6      this->forward_command = 0x41000003;
0051e8ed      this->forward_speed = 1f;
0051e8f0      this->sidestep_command = 0;
0051e8f3      this->sidestep_speed = 1f;
0051e8f6      this->turn_command = 0;
0051e8f9      this->turn_speed = 1f;
0051e8fc      this->actions.head_ = 0;
0051e8ff      this->actions.tail_ = nullptr;
0051e8d0  }

0051e903           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0051e910  void __fastcall InterpretedMotionState::Destroy(class InterpretedMotionState* this)

0051e910  {
0051e918      while (this->actions.head_ != 0)
0051e918      {
0051e920          class LListData** head_ = this->actions.head_;
0051e920          
0051e925          if (head_ != 0)
0051e925          {
0051e927              class LListData* ecx = *(uint32_t*)head_;
0051e92b              this->actions.head_ = ecx;
0051e92b              
0051e92e              if (ecx == 0)
0051e930                  this->actions.tail_ = ecx;
0051e930              
0051e934              *(uint32_t*)head_ = nullptr;
0051e93a              operator delete(head_);
0051e925          }
0051e918      }
0051e910  }

0051e94b                                   90 90 90 90 90                                                             .....

0051e950  class InterpretedMotionState& __thiscall InterpretedMotionState::operator=(class InterpretedMotionState* this, class InterpretedMotionState const& arg2)

0051e950  {
0051e954      InterpretedMotionState::Destroy(this);
0051e960      this->current_style = arg2->current_style;
0051e966      this->forward_command = arg2->forward_command;
0051e96c      this->forward_speed = arg2->forward_speed;
0051e972      this->sidestep_command = arg2->sidestep_command;
0051e978      this->sidestep_speed = arg2->sidestep_speed;
0051e97e      this->turn_command = arg2->turn_command;
0051e984      this->turn_speed = arg2->turn_speed;
0051e984      
0051e98c      for (class LListData* i = arg2->actions.head_; i != 0; i = i->llist_next)
0051e98c      {
0051e992          class LListData* eax_1 = operator new(0x14);
0051e992          
0051e99c          if (eax_1 == 0)
0051e9be              eax_1 = nullptr;
0051e99c          else
0051e99c          {
0051e99e              eax_1->llist_next = 0;
0051e9a7              *(int32_t*)((char*)eax_1 + 4) = *(int32_t*)((char*)i + 4);
0051e9ad              *(int32_t*)((char*)eax_1 + 8) = *(int32_t*)((char*)i + 8);
0051e9b3              *(int32_t*)((char*)eax_1 + 0xc) = *(int32_t*)((char*)i + 0xc);
0051e9b9              *(int32_t*)((char*)eax_1 + 0x10) = *(int32_t*)((char*)i + 0x10);
0051e99c          }
0051e99c          
0051e9c0          class LListData* tail_ = this->actions.tail_;
0051e9c0          
0051e9c5          if (tail_ == 0)
0051e9cb              this->actions.head_ = eax_1;
0051e9c5          else
0051e9c7              tail_->llist_next = eax_1;
0051e9c7          
0051e9ce          this->actions.tail_ = eax_1;
0051e98c      }
0051e98c      
0051e9db      return this;
0051e950  }

0051e9de                                                                                            90 90                                ..

0051e9e0  void __thiscall InterpretedMotionState::AddAction(class InterpretedMotionState* this, uint32_t arg2, float arg3, uint32_t arg4, int32_t arg5)

0051e9e0  {
0051e9e5      class LListData* eax = operator new(0x14);
0051e9e5      
0051e9ef      if (eax == 0)
0051ea15          eax = nullptr;
0051e9ef      else
0051e9ef      {
0051e9f9          *(int32_t*)((char*)eax + 4) = arg2;
0051ea00          *(int32_t*)((char*)eax + 8) = arg3;
0051ea07          eax->llist_next = 0;
0051ea0d          *(int32_t*)((char*)eax + 0xc) = arg4;
0051ea10          *(int32_t*)((char*)eax + 0x10) = arg5;
0051e9ef      }
0051e9ef      
0051ea17      class LListData** tail_ = this->actions.tail_;
0051ea17      
0051ea1c      if (tail_ != 0)
0051ea1c      {
0051ea1e          *(uint32_t*)tail_ = eax;
0051ea20          this->actions.tail_ = eax;
0051ea24          return;
0051ea1c      }
0051ea1c      
0051ea27      this->actions.head_ = eax;
0051ea2a      this->actions.tail_ = eax;
0051e9e0  }

0051ea31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0051ea40  void __thiscall InterpretedMotionState::ApplyMotion(class InterpretedMotionState* this, uint32_t arg2, class MovementParameters const* arg3)

0051ea40  {
0051ea4c      if (arg2 == 0x6500000d)
0051ea4c      {
0051eabb          this->turn_command = 0x6500000d;
0051eac5          this->turn_speed = arg3->speed;
0051eac5          return;
0051ea4c      }
0051ea4c      
0051ea51      if (arg2 == 0x6500000f)
0051ea51      {
0051eaa7          this->sidestep_command = 0x6500000f;
0051eab1          this->sidestep_speed = arg3->speed;
0051eab4          return;
0051ea51      }
0051ea51      
0051ea58      if ((arg2 & 0x40000000) != 0)
0051ea58      {
0051ea5a          this->forward_command = arg2;
0051ea64          this->forward_speed = arg3->speed;
0051ea67          return;
0051ea58      }
0051ea58      
0051ea6c      if (arg2 < 0)
0051ea6c      {
0051ea6e          this->forward_command = 0x41000003;
0051ea75          this->current_style = arg2;
0051ea78          return;
0051ea6c      }
0051ea6c      
0051ea80      if ((arg2 & 0x10000000) != 0)
0051ea9a          InterpretedMotionState::AddAction(this, arg2, arg3->speed, arg3->action_stamp, ((arg3->__inner0 >> 0xc) & 1));
0051ea40  }

0051eacb                                   90 90 90 90 90                                                             .....

0051ead0  uint32_t __fastcall InterpretedMotionState::RemoveAction(class InterpretedMotionState* this)

0051ead0  {
0051ead0      class LListData* head_ = this->actions.head_;
0051ead0      
0051ead7      if (head_ == 0)
0051eafb          return 0;
0051eafb      
0051ead9      class LListData* llist_next = head_->llist_next;
0051eadd      this->actions.head_ = llist_next;
0051eadd      
0051eae0      if (llist_next == 0)
0051eae2          this->actions.tail_ = llist_next;
0051eae2      
0051eae6      head_->llist_next = 0;
0051eaec      int32_t result = *(int32_t*)((char*)head_ + 4);
0051eaf0      operator delete(head_);
0051eaf8      return result;
0051ead0  }

0051eafc                                                                                      90 90 90 90                              ....

0051eb00  uint32_t __fastcall InterpretedMotionState::GetNumActions(class InterpretedMotionState const* this)

0051eb00  {
0051eb00      class LListData* i = this->actions.head_;
0051eb03      int32_t result = 0;
0051eb03      
0051eb07      while (i != 0)
0051eb07      {
0051eb10          i = i->llist_next;
0051eb12          result += 1;
0051eb07      }
0051eb07      
0051eb17      return result;
0051eb00  }

0051eb18                                                                          90 90 90 90 90 90 90 90                          ........

0051eb20  void __fastcall RawMotionState::Destroy(class RawMotionState* this)

0051eb20  {
0051eb28      while (this->actions.head_ != 0)
0051eb28      {
0051eb30          class LListData** head_ = this->actions.head_;
0051eb30          
0051eb35          if (head_ != 0)
0051eb35          {
0051eb37              class LListData* ecx = *(uint32_t*)head_;
0051eb3b              this->actions.head_ = ecx;
0051eb3b              
0051eb3e              if (ecx == 0)
0051eb40                  this->actions.tail_ = ecx;
0051eb40              
0051eb44              *(uint32_t*)head_ = nullptr;
0051eb4a              operator delete(head_);
0051eb35          }
0051eb28      }
0051eb20  }

0051eb5b                                                                                   90 90 90 90 90                             .....

0051eb60  void __thiscall RawMotionState::ApplyMotion(class RawMotionState* this, uint32_t arg2, class MovementParameters const* arg3)

0051eb60  {
0051eb6d      if ((arg2 - 0x6500000d) > 3)
0051eb6d      {
0051ebd7          if ((arg2 & 0x40000000) == 0)
0051ebd7          {
0051ec10              if (arg2 >= 0)
0051ec10              {
0051ec29                  if ((arg2 & 0x10000000) != 0)
0051ec43                      RawMotionState::AddAction(this, arg2, arg3->speed, arg3->action_stamp, ((arg3->__inner0 >> 0xc) & 1));
0051ec10              }
0051ec10              else if (this->current_style != arg2)
0051ec15              {
0051ec17                  this->forward_command = 0x41000003;
0051ec1e                  this->current_style = arg2;
0051ec15              }
0051ebd7          }
0051ebd7          else if (arg2 != 0x44000007)
0051ebde          {
0051ebe0              this->forward_command = arg2;
0051ebe0              
0051ebed              if ((*(uint8_t*)((char*)((int16_t)arg3->__inner0))[1] & 8) != 0)
0051ebed              {
0051ebef                  this->forward_holdkey = HoldKey_Invalid;
0051ebf9                  this->forward_speed = arg3->speed;
0051ebfc                  return;
0051ebed              }
0051ebed              
0051ec02              this->forward_holdkey = arg3->hold_key_to_apply;
0051ec08              this->forward_speed = arg3->speed;
0051ebde          }
0051ebde          
0051ec49          return;
0051eb6d      }
0051eb6d      
0051ec15      switch (arg2)
0051ec15      {
0051eba4          case 0x6500000d:
0051eba4          case 0x6500000e:
0051eba4          {
0051eba4              this->turn_command = arg2;
0051eba4              
0051ebb1              if ((*(uint8_t*)((char*)((int16_t)arg3->__inner0))[1] & 8) != 0)
0051ebb1              {
0051ebb3                  this->turn_holdkey = HoldKey_Invalid;
0051ebbd                  this->turn_speed = arg3->speed;
0051ebc0                  return;
0051ebb1              }
0051ebb1              
0051ebc6              this->turn_holdkey = arg3->hold_key_to_apply;
0051ebcc              this->turn_speed = arg3->speed;
0051ebcf              return;
0051eba4              break;
0051eba4          }
0051eb76          case 0x6500000f:
0051eb76          case 0x65000010:
0051eb76          {
0051eb76              this->sidestep_command = arg2;
0051eb76              
0051eb83              if ((*(uint8_t*)((char*)((int16_t)arg3->__inner0))[1] & 8) != 0)
0051eb83              {
0051eb85                  this->sidestep_holdkey = HoldKey_Invalid;
0051eb8f                  this->sidestep_speed = arg3->speed;
0051eb92                  return;
0051eb83              }
0051eb83              
0051eb98              this->sidestep_holdkey = arg3->hold_key_to_apply;
0051eb9e              this->sidestep_speed = arg3->speed;
0051eba1              return;
0051eb76              break;
0051eb76          }
0051ec15      }
0051eb60  }

0051ec4c  uint32_t jump_table_51ec4c[0x4] = 
0051ec4c  {
0051ec4c      [0x0] =  0x0051eba4
0051ec50      [0x1] =  0x0051eba4
0051ec54      [0x2] =  0x0051eb76
0051ec58      [0x3] =  0x0051eb76
0051ec5c  }

0051ec5c                                                                                      90 90 90 90                              ....

0051ec60  class RawMotionState& __thiscall RawMotionState::operator=(class RawMotionState* this, class RawMotionState const& arg2)

0051ec60  {
0051ec64      RawMotionState::Destroy(this);
0051ec70      this->current_holdkey = arg2->current_holdkey;
0051ec76      this->current_style = arg2->current_style;
0051ec7c      this->forward_command = arg2->forward_command;
0051ec82      this->forward_holdkey = arg2->forward_holdkey;
0051ec88      this->forward_speed = arg2->forward_speed;
0051ec8e      this->sidestep_command = arg2->sidestep_command;
0051ec94      this->sidestep_holdkey = arg2->sidestep_holdkey;
0051ec9a      this->sidestep_speed = arg2->sidestep_speed;
0051eca0      this->turn_command = arg2->turn_command;
0051eca6      this->turn_holdkey = arg2->turn_holdkey;
0051ecac      this->turn_speed = arg2->turn_speed;
0051ecac      
0051ecb4      for (class LListData* i = arg2->actions.head_; i != 0; i = i->llist_next)
0051ecb4      {
0051ecb8          class LListData* eax_1 = operator new(0x14);
0051ecb8          
0051ecc2          if (eax_1 == 0)
0051ece4              eax_1 = nullptr;
0051ecc2          else
0051ecc2          {
0051ecc4              eax_1->llist_next = 0;
0051eccd              *(int32_t*)((char*)eax_1 + 4) = *(int32_t*)((char*)i + 4);
0051ecd3              *(int32_t*)((char*)eax_1 + 8) = *(int32_t*)((char*)i + 8);
0051ecd9              *(int32_t*)((char*)eax_1 + 0xc) = *(int32_t*)((char*)i + 0xc);
0051ecdf              *(int32_t*)((char*)eax_1 + 0x10) = *(int32_t*)((char*)i + 0x10);
0051ecc2          }
0051ecc2          
0051ece6          class LListData* tail_ = this->actions.tail_;
0051ece6          
0051eceb          if (tail_ == 0)
0051ecf1              this->actions.head_ = eax_1;
0051eceb          else
0051eced              tail_->llist_next = eax_1;
0051eced          
0051ecf4          this->actions.tail_ = eax_1;
0051ecb4      }
0051ecb4      
0051ed01      return this;
0051ec60  }

0051ed04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0051ed10  uint32_t __thiscall RawMotionState::Pack(class RawMotionState* this, void** arg2, uint32_t arg3)

0051ed10  {
0051ed1d      int32_t eax;
0051ed1d      eax = this->current_holdkey != HoldKey_None;
0051ed23      int32_t result = 4;
0051ed2d      int32_t ebx_2 = (arg3 ^ ((eax ^ arg3) & 1));
0051ed2d      
0051ed32      if ((ebx_2 & 1) != 0)
0051ed34          result = 8;
0051ed34      
0051ed44      int32_t edx;
0051ed44      edx = this->current_style != 0x8000003d;
0051ed4e      int32_t ebx_3 = (ebx_2 ^ (((edx << 1) ^ ebx_2) & 2));
0051ed4e      
0051ed53      if ((ebx_3 & 2) != 0)
0051ed55          result += 4;
0051ed55      
0051ed63      int32_t eax_3;
0051ed63      eax_3 = this->forward_command != 0x41000003;
0051ed6e      int32_t ebx_4 = (ebx_3 ^ (((eax_3 << 2) ^ ebx_3) & 4));
0051ed6e      
0051ed73      if ((ebx_4 & 4) != 0)
0051ed75          result += 4;
0051ed75      
0051ed7f      int32_t edx_4;
0051ed7f      edx_4 = this->forward_holdkey != HoldKey_Invalid;
0051ed8a      int32_t ebx_5 = (ebx_4 ^ (((edx_4 << 3) ^ ebx_4) & 8));
0051ed8a      
0051ed8f      if ((ebx_5 & 8) != 0)
0051ed91          result += 4;
0051ed91      
0051ed9e      int32_t edx_8;
0051ed9e      
0051ed9e      if (this->forward_speed == 0x3f800000)
0051eda7          edx_8 = 0;
0051ed9e      else
0051eda0          edx_8 = 1;
0051eda0      
0051edb1      int32_t ebx_6 = (ebx_5 ^ (((edx_8 << 4) ^ ebx_5) & 0x10));
0051edb1      
0051edb6      if ((ebx_6 & 0x10) != 0)
0051edb8          result += 4;
0051edb8      
0051edc2      int32_t eax_8;
0051edc2      eax_8 = this->sidestep_command != 0;
0051edcd      int32_t ebx_7 = (ebx_6 ^ (((eax_8 << 5) ^ ebx_6) & 0x20));
0051edcd      
0051edd2      if ((ebx_7 & 0x20) != 0)
0051edd4          result += 4;
0051edd4      
0051edde      int32_t edx_13;
0051edde      edx_13 = this->sidestep_holdkey != HoldKey_Invalid;
0051ede9      int32_t ebx_8 = (ebx_7 ^ (((edx_13 << 6) ^ ebx_7) & 0x40));
0051ede9      
0051edee      if ((ebx_8 & 0x40) != 0)
0051edf0          result += 4;
0051edf0      
0051edf6      int32_t edx_17;
0051edf6      
0051edf6      if (this->sidestep_speed == 0x3f800000)
0051edff          edx_17 = 0;
0051edf6      else
0051edf8          edx_17 = 1;
0051edf8      
0051ee0c      int32_t ebx_9 = (ebx_8 ^ (((edx_17 << 7) ^ ebx_8) & 0x80));
0051ee0c      
0051ee10      if (ebx_9 < 0)
0051ee12          result += 4;
0051ee12      
0051ee1c      int32_t eax_12;
0051ee1c      eax_12 = this->turn_command != 0;
0051ee29      int32_t ebx_10 = (ebx_9 ^ (((eax_12 << 8) ^ ebx_9) & 0x100));
0051ee29      
0051ee2e      if ((*(uint8_t*)((char*)ebx_10)[1] & 1) != 0)
0051ee30          result += 4;
0051ee30      
0051ee3a      int32_t edx_22;
0051ee3a      edx_22 = this->turn_holdkey != HoldKey_Invalid;
0051ee48      int32_t ebx_11 = (ebx_10 ^ (((edx_22 << 9) ^ ebx_10) & 0x200));
0051ee48      
0051ee4d      if ((*(uint8_t*)((char*)ebx_11)[1] & 2) != 0)
0051ee4f          result += 4;
0051ee4f      
0051ee55      int32_t edx_26;
0051ee55      
0051ee55      if (this->turn_speed == 0x3f800000)
0051ee5e          edx_26 = 0;
0051ee55      else
0051ee57          edx_26 = 1;
0051ee57      
0051ee6b      int32_t ebx_12 = (ebx_11 ^ (((edx_26 << 0xa) ^ ebx_11) & 0x400));
0051ee6b      
0051ee70      if ((*(uint8_t*)((char*)ebx_12)[1] & 4) != 0)
0051ee72          result += 4;
0051ee72      
0051ee75      class LListData* i = this->actions.head_;
0051ee78      int32_t esi_1 = 0;
0051ee78      
0051ee7c      while (i != 0)
0051ee7c      {
0051ee80          i = i->llist_next;
0051ee82          result += 8;
0051ee85          esi_1 += 1;
0051ee7c      }
0051ee7c      
0051ee99      enum HoldKey ebx_13 = (ebx_12 ^ (((esi_1 << 0xb) ^ ebx_12) & 0xf800));
0051ee99      
0051ee9d      if (arg3 >= result)
0051ee9d      {
0051eea6          enum HoldKey** edx_30 = arg2;
0051eea6          
0051eeaa          if (arg3 >= 4)
0051eeaa          {
0051eeae              **(uint32_t**)edx_30 = ebx_13;
0051eeb0              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051eeaa          }
0051eeaa          
0051eeb6          if ((ebx_13 & 1) != 0)
0051eeb6          {
0051eebd              **(uint32_t**)edx_30 = this->current_holdkey;
0051eebf              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051eeb6          }
0051eeb6          
0051eec5          if ((ebx_13 & 2) != 0)
0051eec5          {
0051eecc              **(uint32_t**)edx_30 = this->current_style;
0051eece              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051eec5          }
0051eec5          
0051eed4          if ((ebx_13 & 4) != 0)
0051eed4          {
0051eedb              **(uint32_t**)edx_30 = this->forward_command;
0051eedd              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051eed4          }
0051eed4          
0051eee3          if ((ebx_13 & 8) != 0)
0051eee3          {
0051eeea              **(uint32_t**)edx_30 = this->forward_holdkey;
0051eeec              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051eee3          }
0051eee3          
0051eef2          if ((ebx_13 & 0x10) != 0)
0051eef2          {
0051eef9              **(uint32_t**)edx_30 = this->forward_speed;
0051eefb              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051eef2          }
0051eef2          
0051ef01          if ((ebx_13 & 0x20) != 0)
0051ef01          {
0051ef08              **(uint32_t**)edx_30 = this->sidestep_command;
0051ef0a              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051ef01          }
0051ef01          
0051ef10          if ((ebx_13 & 0x40) != 0)
0051ef10          {
0051ef17              **(uint32_t**)edx_30 = this->sidestep_holdkey;
0051ef19              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051ef10          }
0051ef10          
0051ef1e          if (ebx_13 < 0)
0051ef1e          {
0051ef25              **(uint32_t**)edx_30 = this->sidestep_speed;
0051ef27              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051ef1e          }
0051ef1e          
0051ef2d          if ((*(uint8_t*)((char*)ebx_13)[1] & 1) != 0)
0051ef2d          {
0051ef34              **(uint32_t**)edx_30 = this->turn_command;
0051ef36              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051ef2d          }
0051ef2d          
0051ef3c          if ((*(uint8_t*)((char*)ebx_13)[1] & 2) != 0)
0051ef3c          {
0051ef43              **(uint32_t**)edx_30 = this->turn_holdkey;
0051ef45              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051ef3c          }
0051ef3c          
0051ef4b          if ((*(uint8_t*)((char*)ebx_13)[1] & 4) != 0)
0051ef4b          {
0051ef52              **(uint32_t**)edx_30 = this->turn_speed;
0051ef54              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051ef4b          }
0051ef4b          
0051ef5c          for (void** head_ = this->actions.head_; head_ != 0; head_ = *(uint32_t*)head_)
0051ef5c          {
0051ef63              if (arg3 >= 8)
0051ef63              {
0051ef6a                  int32_t esi_17;
0051ef6a                  esi_17 = head_[3];
0051ef6e                  int32_t esi_18 = (esi_17 & 0x7fff);
0051ef6e                  
0051ef76                  if (head_[4] != 0)
0051ef78                      esi_18 |= 0x8000;
0051ef78                  
0051ef80                  ebx_13 = head_[1];
0051ef84                  **(uint16_t**)edx_30 = ebx_13;
0051ef89                  ebx_13 = (*(uint32_t*)edx_30 + 2);
0051ef8c                  *(uint32_t*)edx_30 = ebx_13;
0051ef90                  *(uint16_t*)ebx_13 = esi_18;
0051ef95                  enum HoldKey* edi_9 = (*(uint32_t*)edx_30 + 2);
0051ef98                  *(uint32_t*)edx_30 = edi_9;
0051ef9f                  *(uint32_t*)edi_9 = ((float)((long double)head_[2]));
0051efa1                  *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051ef63              }
0051ef5c          }
0051ee9d      }
0051ee9d      
0051efb0      return result;
0051ed10  }

0051efb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0051efc0  int32_t __thiscall RawMotionState::UnPack(class RawMotionState* this, void** arg2, uint32_t arg3)

0051efc0  {
0051efc5      RawMotionState::Destroy(this);
0051efd3      uint32_t ecx;
0051efd3      
0051efd3      if (arg3 < 4)
0051efe0          ecx = arg3;
0051efd3      else
0051efd3      {
0051efd5          void* eax_1 = *(uint32_t*)arg2;
0051efd7          ecx = *(uint32_t*)eax_1;
0051efdc          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
0051efd3      }
0051efd3      
0051efe7      if ((ecx & 1) == 0)
0051eff5          this->current_holdkey = HoldKey_None;
0051efe7      else
0051efe7      {
0051efed          this->current_holdkey = **(uint32_t**)arg2;
0051eff0          *(uint32_t*)arg2 += 4;
0051efe7      }
0051efe7      
0051efff      if ((ecx & 2) == 0)
0051f00d          this->current_style = 0x8000003d;
0051efff      else
0051efff      {
0051f005          this->current_style = **(uint32_t**)arg2;
0051f008          *(uint32_t*)arg2 += 4;
0051efff      }
0051efff      
0051f017      if ((ecx & 4) == 0)
0051f025          this->forward_command = 0x41000003;
0051f017      else
0051f017      {
0051f01d          this->forward_command = **(uint32_t**)arg2;
0051f020          *(uint32_t*)arg2 += 4;
0051f017      }
0051f017      
0051f031      if ((ecx & 8) == 0)
0051f03f          this->forward_holdkey = HoldKey_Invalid;
0051f031      else
0051f031      {
0051f037          this->forward_holdkey = **(uint32_t**)arg2;
0051f03a          *(uint32_t*)arg2 += 4;
0051f031      }
0051f031      
0051f045      if ((ecx & 0x10) == 0)
0051f05d          this->forward_speed = 1f;
0051f045      else
0051f045      {
0051f04b          this->forward_speed = **(uint32_t**)arg2;
0051f04e          *(uint32_t*)arg2 += 4;
0051f045      }
0051f045      
0051f063      if ((ecx & 0x20) == 0)
0051f071          this->sidestep_command = 0;
0051f063      else
0051f063      {
0051f069          this->sidestep_command = **(uint32_t**)arg2;
0051f06c          *(uint32_t*)arg2 += 4;
0051f063      }
0051f063      
0051f077      if ((ecx & 0x40) == 0)
0051f085          this->sidestep_holdkey = HoldKey_Invalid;
0051f077      else
0051f077      {
0051f07d          this->sidestep_holdkey = **(uint32_t**)arg2;
0051f080          *(uint32_t*)arg2 += 4;
0051f077      }
0051f077      
0051f08a      if (ecx >= 0)
0051f098          this->sidestep_speed = 1f;
0051f08a      else
0051f08a      {
0051f090          this->sidestep_speed = **(uint32_t**)arg2;
0051f093          *(uint32_t*)arg2 += 4;
0051f08a      }
0051f08a      
0051f09e      if ((*(uint8_t*)((char*)ecx)[1] & 1) == 0)
0051f0ac          this->turn_command = 0;
0051f09e      else
0051f09e      {
0051f0a4          this->turn_command = **(uint32_t**)arg2;
0051f0a7          *(uint32_t*)arg2 += 4;
0051f09e      }
0051f09e      
0051f0b2      if ((*(uint8_t*)((char*)ecx)[1] & 2) == 0)
0051f0c0          this->turn_holdkey = HoldKey_Invalid;
0051f0b2      else
0051f0b2      {
0051f0b8          this->turn_holdkey = **(uint32_t**)arg2;
0051f0bb          *(uint32_t*)arg2 += 4;
0051f0b2      }
0051f0b2      
0051f0c6      if ((*(uint8_t*)((char*)ecx)[1] & 4) == 0)
0051f0d4          this->turn_speed = 1f;
0051f0c6      else
0051f0c6      {
0051f0cc          this->turn_speed = **(uint32_t**)arg2;
0051f0cf          *(uint32_t*)arg2 += 4;
0051f0c6      }
0051f0c6      
0051f0da      int32_t i_2 = ((ecx >> 0xb) & 0x1f);
0051f0da      
0051f0df      if (i_2 > 0)
0051f0df      {
0051f0e6          int32_t i_1 = i_2;
0051f167          int32_t i;
0051f167          
0051f167          do
0051f167          {
0051f0ea              void* eax_10 = operator new(0x14);
0051f0f4              class LListData* ecx_2;
0051f0f4              
0051f0f4              if (eax_10 == 0)
0051f10c                  ecx_2 = nullptr;
0051f0f4              else
0051f0f4              {
0051f0f6                  *(uint32_t*)eax_10 = 0;
0051f0f8                  *(uint32_t*)((char*)eax_10 + 4) = 0;
0051f0fb                  *(uint32_t*)((char*)eax_10 + 8) = 0x3f800000;
0051f102                  *(uint32_t*)((char*)eax_10 + 0xc) = 0;
0051f105                  *(uint32_t*)((char*)eax_10 + 0x10) = 0;
0051f108                  ecx_2 = eax_10;
0051f0f4              }
0051f0f4              
0051f113              if (arg3 >= 8)
0051f113              {
0051f115                  int16_t* eax_11 = *(uint32_t*)arg2;
0051f117                  int16_t edx_17 = *(uint16_t*)eax_11;
0051f11d                  *(uint32_t*)arg2 = &eax_11[1];
0051f129                  *(int32_t*)((char*)ecx_2 + 4) = command_ids[((uint32_t)edx_17)];
0051f12e                  void* edx_20 = (*(uint32_t*)arg2 + 2);
0051f133                  int32_t eax_14;
0051f133                  eax_14 = *(uint16_t*)((char*)edx_20 - 2);
0051f137                  *(uint32_t*)arg2 = edx_20;
0051f13b                  *(int32_t*)((char*)ecx_2 + 8) = *(uint32_t*)edx_20;
0051f13e                  *(uint32_t*)arg2 += 4;
0051f14f                  *(int32_t*)((char*)ecx_2 + 0xc) = (eax_14 & 0x7fff);
0051f152                  *(int32_t*)((char*)ecx_2 + 0x10) = ((eax_14 >> 0xf) & 1);
0051f113              }
0051f113              
0051f155              class LListData** tail_ = this->actions.tail_;
0051f155              
0051f15a              if (tail_ == 0)
0051f160                  this->actions.head_ = ecx_2;
0051f15a              else
0051f15c                  *(uint32_t*)tail_ = ecx_2;
0051f15c              
0051f163              i = i_1;
0051f163              i_1 -= 1;
0051f164              this->actions.tail_ = ecx_2;
0051f167          } while (i != 1);
0051f0df      }
0051f0df      
0051f176      return 1;
0051efc0  }

0051f179                                                                             90 90 90 90 90 90 90                           .......

0051f180  void __thiscall InterpretedMotionState::InterpretedMotionState(class InterpretedMotionState* this, class InterpretedMotionState const* arg2)

0051f180  {
0051f185      this->vtable = 0x7c7a60;
0051f18b      this->actions.head_ = 0;
0051f18e      this->actions.tail_ = nullptr;
0051f196      InterpretedMotionState::operator=(this, arg2);
0051f180  }

0051f1a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0051f1b0  void __fastcall InterpretedMotionState::~InterpretedMotionState(class InterpretedMotionState* this)

0051f1b0  {
0051f1b3      this->vtable = 0x7c7a60;
0051f1b9      InterpretedMotionState::Destroy(this);
0051f1be      this->vtable = 0x79285c;
0051f1b0  }

0051f1c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0051f1d0  uint32_t __thiscall InterpretedMotionState::Pack(class InterpretedMotionState* this, void** arg2, uint32_t arg3)

0051f1d0  {
0051f1e0      int32_t edx;
0051f1e0      edx = this->current_style != 0x8000003d;
0051f1e4      int32_t eax = 4;
0051f1ee      int32_t ebx_1 = (arg3 ^ ((edx ^ arg3) & 1));
0051f1ee      
0051f1f3      if ((ebx_1 & 1) != 0)
0051f1f5          eax = 6;
0051f1f5      
0051f205      int32_t edx_3;
0051f205      edx_3 = this->forward_command != 0x41000003;
0051f20f      int32_t ebx_2 = (ebx_1 ^ (((edx_3 << 1) ^ ebx_1) & 2));
0051f20f      
0051f214      if ((ebx_2 & 2) != 0)
0051f216          eax += 2;
0051f216      
0051f220      int32_t edx_7;
0051f220      edx_7 = this->sidestep_command != 0;
0051f22b      int32_t ebx_3 = (ebx_2 ^ (((edx_7 << 3) ^ ebx_2) & 8));
0051f22b      
0051f230      if ((ebx_3 & 8) != 0)
0051f232          eax += 2;
0051f232      
0051f23c      int32_t edx_11;
0051f23c      edx_11 = this->turn_command != 0;
0051f247      int32_t ebx_4 = (ebx_3 ^ (((edx_11 << 5) ^ ebx_3) & 0x20));
0051f247      
0051f24c      if ((ebx_4 & 0x20) != 0)
0051f24e          eax += 2;
0051f24e      
0051f25b      int32_t edx_16;
0051f25b      
0051f25b      if (this->forward_speed == 0x3f800000)
0051f264          edx_16 = 0;
0051f25b      else
0051f25d          edx_16 = 1;
0051f25d      
0051f26e      int32_t ebx_5 = (ebx_4 ^ (((edx_16 << 2) ^ ebx_4) & 4));
0051f26e      
0051f273      if ((ebx_5 & 4) != 0)
0051f275          eax += 4;
0051f275      
0051f27b      int32_t edx_20;
0051f27b      
0051f27b      if (this->sidestep_speed == 0x3f800000)
0051f284          edx_20 = 0;
0051f27b      else
0051f27d          edx_20 = 1;
0051f27d      
0051f28e      int32_t ebx_6 = (ebx_5 ^ (((edx_20 << 4) ^ ebx_5) & 0x10));
0051f28e      
0051f293      if ((ebx_6 & 0x10) != 0)
0051f295          eax += 4;
0051f295      
0051f29b      int32_t edx_24;
0051f29b      
0051f29b      if (this->turn_speed == 0x3f800000)
0051f2a4          edx_24 = 0;
0051f29b      else
0051f29d          edx_24 = 1;
0051f29d      
0051f2ae      int32_t ebx_7 = (ebx_6 ^ (((edx_24 << 6) ^ ebx_6) & 0x40));
0051f2ae      
0051f2b3      if ((ebx_7 & 0x40) != 0)
0051f2b5          eax += 4;
0051f2b5      
0051f2b8      class LListData* i = this->actions.head_;
0051f2bb      int32_t esi = 0;
0051f2bb      
0051f2bf      while (i != 0)
0051f2bf      {
0051f2c1          i = i->llist_next;
0051f2c3          eax += 8;
0051f2c6          esi += 1;
0051f2bf      }
0051f2bf      
0051f2d8      void* ebx_8 = (ebx_7 ^ (((esi << 7) ^ ebx_7) & 0xf80));
0051f2da      int32_t edx_29 = (eax & 3);
0051f2dd      int32_t esi_4;
0051f2dd      
0051f2dd      if (edx_29 == 0)
0051f2e8          esi_4 = 0;
0051f2dd      else
0051f2e4          esi_4 = (4 - edx_29);
0051f2e4      
0051f2ee      int32_t result = (eax + esi_4);
0051f2ee      
0051f2f2      if (arg3 >= result)
0051f2f2      {
0051f2fb          int16_t** edx_30 = arg2;
0051f2fb          
0051f2ff          if (arg3 >= 4)
0051f2ff          {
0051f303              **(uint32_t**)edx_30 = ebx_8;
0051f305              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[2];
0051f2ff          }
0051f2ff          
0051f30b          uint32_t edi_2;
0051f30b          
0051f30b          if ((ebx_8 & 1) != 0)
0051f30b          {
0051f30f              edi_2 = this->current_style;
0051f313              **(uint16_t**)edx_30 = edi_2;
0051f316              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051f30b          }
0051f30b          
0051f31c          if ((ebx_8 & 2) != 0)
0051f31c          {
0051f320              edi_2 = this->forward_command;
0051f324              **(uint16_t**)edx_30 = edi_2;
0051f327              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051f31c          }
0051f31c          
0051f32d          if ((ebx_8 & 8) != 0)
0051f32d          {
0051f331              edi_2 = this->sidestep_command;
0051f335              **(uint16_t**)edx_30 = edi_2;
0051f338              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051f32d          }
0051f32d          
0051f33e          if ((ebx_8 & 0x20) != 0)
0051f33e          {
0051f342              edi_2 = this->turn_command;
0051f346              **(uint16_t**)edx_30 = edi_2;
0051f349              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[1];
0051f33e          }
0051f33e          
0051f34f          if ((ebx_8 & 4) != 0)
0051f34f          {
0051f356              **(uint32_t**)edx_30 = this->forward_speed;
0051f358              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[2];
0051f34f          }
0051f34f          
0051f35e          if ((ebx_8 & 0x10) != 0)
0051f35e          {
0051f365              **(uint32_t**)edx_30 = this->sidestep_speed;
0051f367              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[2];
0051f35e          }
0051f35e          
0051f36d          if ((ebx_8 & 0x40) != 0)
0051f36d          {
0051f374              **(uint32_t**)edx_30 = this->turn_speed;
0051f376              *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[2];
0051f36d          }
0051f36d          
0051f37e          for (void** head_ = this->actions.head_; head_ != 0; head_ = *(uint32_t*)head_)
0051f37e          {
0051f383              if (arg3 >= 8)
0051f383              {
0051f38a                  int32_t esi_13;
0051f38a                  esi_13 = head_[3];
0051f38e                  int32_t esi_14 = (esi_13 & 0x7fff);
0051f38e                  
0051f396                  if (head_[4] != 0)
0051f398                      esi_14 |= 0x8000;
0051f398                  
0051f3a0                  ebx_8 = head_[1];
0051f3a4                  **(uint16_t**)edx_30 = ebx_8;
0051f3a9                  ebx_8 = &*(uint32_t*)edx_30[1];
0051f3ac                  *(uint32_t*)edx_30 = ebx_8;
0051f3b0                  *(uint16_t*)ebx_8 = esi_14;
0051f3b5                  int16_t* edi_10 = &*(uint32_t*)edx_30[1];
0051f3b8                  *(uint32_t*)edx_30 = edi_10;
0051f3bf                  *(uint32_t*)edi_10 = ((float)((long double)head_[2]));
0051f3c1                  *(uint32_t*)edx_30 = &*(uint32_t*)edx_30[2];
0051f383              }
0051f37e          }
0051f37e          
0051f3cc          void* esi_17 = (*(uint32_t*)edx_30 & 0x80000003);
0051f3cc          bool cond:1_1 = esi_17 == 0;
0051f3cc          
0051f3d2          if (esi_17 < 0)
0051f3d2          {
0051f3d5              void* esi_19 = (((char*)esi_17 - 1) | 0xfffffffc);
0051f3d8              esi_17 = ((char*)esi_19 + 1);
0051f3d8              cond:1_1 = esi_19 == 0xffffffff;
0051f3d2          }
0051f3d2          
0051f3d9          if (!(cond:1_1))
0051f3d9          {
0051f3e0              void* i_2 = (4 - esi_17);
0051f3e0              
0051f3e2              if (4 != esi_17)
0051f3e2              {
0051f3ef                  void* i_1;
0051f3ef                  
0051f3ef                  do
0051f3ef                  {
0051f3e6                      **(uint8_t**)edx_30 = 0;
0051f3ec                      i_1 = i_2;
0051f3ec                      i_2 -= 1;
0051f3ed                      *(uint32_t*)edx_30 += 1;
0051f3ef                  } while (i_1 != 1);
0051f3e2              }
0051f3d9          }
0051f2f2      }
0051f2f2      
0051f3f5      return result;
0051f1d0  }

0051f3f8                                                                          90 90 90 90 90 90 90 90                          ........

0051f400  int32_t __thiscall InterpretedMotionState::UnPack(class InterpretedMotionState* this, void** arg2, uint32_t arg3)

0051f400  {
0051f405      InterpretedMotionState::Destroy(this);
0051f413      uint32_t edx;
0051f413      
0051f413      if (arg3 < 4)
0051f420          edx = arg3;
0051f413      else
0051f413      {
0051f415          void* eax_1 = *(uint32_t*)arg2;
0051f417          edx = *(uint32_t*)eax_1;
0051f41c          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
0051f413      }
0051f413      
0051f427      uint32_t ecx;
0051f427      
0051f427      if ((edx & 1) == 0)
0051f442          this->current_style = 0x8000003d;
0051f427      else
0051f427      {
0051f429          void* eax_3 = *(uint32_t*)arg2;
0051f42b          ecx = *(uint16_t*)eax_3;
0051f431          *(uint32_t*)arg2 = ((char*)eax_3 + 2);
0051f43d          this->current_style = command_ids[((uint32_t)ecx)];
0051f427      }
0051f427      
0051f44c      if ((edx & 2) == 0)
0051f467          this->forward_command = 0x41000003;
0051f44c      else
0051f44c      {
0051f44e          void* eax_6 = *(uint32_t*)arg2;
0051f450          ecx = *(uint16_t*)eax_6;
0051f456          *(uint32_t*)arg2 = ((char*)eax_6 + 2);
0051f462          this->forward_command = command_ids[((uint32_t)ecx)];
0051f44c      }
0051f44c      
0051f473      if ((edx & 8) == 0)
0051f48e          this->sidestep_command = 0;
0051f473      else
0051f473      {
0051f475          void* eax_9 = *(uint32_t*)arg2;
0051f477          ecx = *(uint16_t*)eax_9;
0051f47d          *(uint32_t*)arg2 = ((char*)eax_9 + 2);
0051f489          this->sidestep_command = command_ids[((uint32_t)ecx)];
0051f473      }
0051f473      
0051f494      if ((edx & 0x20) == 0)
0051f4af          this->turn_command = 0;
0051f494      else
0051f494      {
0051f496          int16_t* eax_12 = *(uint32_t*)arg2;
0051f498          ecx = *(uint16_t*)eax_12;
0051f49e          *(uint32_t*)arg2 = &eax_12[1];
0051f4aa          this->turn_command = command_ids[((uint32_t)ecx)];
0051f494      }
0051f494      
0051f4b5      if ((edx & 4) == 0)
0051f4cd          this->forward_speed = 1f;
0051f4b5      else
0051f4b5      {
0051f4bb          this->forward_speed = **(uint32_t**)arg2;
0051f4be          *(uint32_t*)arg2 += 4;
0051f4b5      }
0051f4b5      
0051f4d3      if ((edx & 0x10) == 0)
0051f4e1          this->sidestep_speed = 1f;
0051f4d3      else
0051f4d3      {
0051f4d9          this->sidestep_speed = **(uint32_t**)arg2;
0051f4dc          *(uint32_t*)arg2 += 4;
0051f4d3      }
0051f4d3      
0051f4e7      if ((edx & 0x40) == 0)
0051f4f5          this->turn_speed = 1f;
0051f4e7      else
0051f4e7      {
0051f4ed          this->turn_speed = **(uint32_t**)arg2;
0051f4f0          *(uint32_t*)arg2 += 4;
0051f4e7      }
0051f4e7      
0051f4fb      int32_t i_4 = ((edx >> 7) & 0x1f);
0051f4fb      
0051f4fe      if (i_4 > 0)
0051f4fe      {
0051f505          int32_t i_3 = i_4;
0051f586          int32_t i;
0051f586          
0051f586          do
0051f586          {
0051f509              void* eax_17 = operator new(0x14);
0051f513              class LListData* ecx_6;
0051f513              
0051f513              if (eax_17 == 0)
0051f52b                  ecx_6 = nullptr;
0051f513              else
0051f513              {
0051f515                  *(uint32_t*)eax_17 = 0;
0051f517                  *(uint32_t*)((char*)eax_17 + 4) = 0;
0051f51a                  *(uint32_t*)((char*)eax_17 + 8) = 0x3f800000;
0051f521                  *(uint32_t*)((char*)eax_17 + 0xc) = 0;
0051f524                  *(uint32_t*)((char*)eax_17 + 0x10) = 0;
0051f527                  ecx_6 = eax_17;
0051f513              }
0051f513              
0051f532              if (arg3 >= 8)
0051f532              {
0051f534                  void* eax_18 = *(uint32_t*)arg2;
0051f539                  uint32_t edx_3 = ((uint32_t)*(uint16_t*)eax_18);
0051f53f                  *(uint32_t*)arg2 = ((char*)eax_18 + 2);
0051f548                  *(int32_t*)((char*)ecx_6 + 4) = command_ids[edx_3];
0051f54d                  void* edx_5 = (*(uint32_t*)arg2 + 2);
0051f552                  int32_t eax_21;
0051f552                  eax_21 = *(uint16_t*)((char*)edx_5 - 2);
0051f556                  *(uint32_t*)arg2 = edx_5;
0051f55a                  *(int32_t*)((char*)ecx_6 + 8) = *(uint32_t*)edx_5;
0051f55d                  *(uint32_t*)arg2 += 4;
0051f56e                  *(int32_t*)((char*)ecx_6 + 0xc) = (eax_21 & 0x7fff);
0051f571                  *(int32_t*)((char*)ecx_6 + 0x10) = ((eax_21 >> 0xf) & 1);
0051f532              }
0051f532              
0051f574              class LListData** tail_ = this->actions.tail_;
0051f574              
0051f579              if (tail_ == 0)
0051f57f                  this->actions.head_ = ecx_6;
0051f579              else
0051f57b                  *(uint32_t*)tail_ = ecx_6;
0051f57b              
0051f582              i = i_3;
0051f582              i_3 -= 1;
0051f583              this->actions.tail_ = ecx_6;
0051f586          } while (i != 1);
0051f4fe      }
0051f4fe      
0051f58f      void* ecx_8 = (*(uint32_t*)arg2 & 0x80000003);
0051f58f      bool cond:1 = ecx_8 == 0;
0051f58f      
0051f595      if (ecx_8 < 0)
0051f595      {
0051f598          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
0051f59b          ecx_8 = ((char*)ecx_10 + 1);
0051f59b          cond:1 = ecx_10 == 0xffffffff;
0051f595      }
0051f595      
0051f59c      if (!(cond:1))
0051f59c      {
0051f5a3          void* i_2 = (4 - ecx_8);
0051f5a3          
0051f5a5          if (4 != ecx_8)
0051f5a5          {
0051f5b1              void* i_1;
0051f5b1              
0051f5b1              do
0051f5b1              {
0051f5a9                  **(uint8_t**)arg2 = 0;
0051f5ae                  i_1 = i_2;
0051f5ae                  i_2 -= 1;
0051f5af                  *(uint32_t*)arg2 += 1;
0051f5b1              } while (i_1 != 1);
0051f5a5          }
0051f59c      }
0051f59c      
0051f5bb      return 1;
0051f400  }

0051f5be                                                                                            90 90                                ..

0051f5c0  void __fastcall RawMotionState::~RawMotionState(class RawMotionState* this)

0051f5c0  {
0051f5c3      this->vtable = 0x7c7a4c;
0051f5c9      RawMotionState::Destroy(this);
0051f5ce      this->vtable = 0x79285c;
0051f5c0  }

0051f5d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0051f5e0  void* __thiscall InterpretedMotionState::`scalar deleting destructor'(class InterpretedMotionState* this, uint32_t arg2)

0051f5e0  {
0051f5e3      this->vtable = 0x7c7a60;
0051f5e9      InterpretedMotionState::Destroy(this);
0051f5f3      this->vtable = 0x79285c;
0051f5f3      
0051f5f9      if ((arg2 & 1) != 0)
0051f5fc          operator delete(this);
0051f5fc      
0051f607      return this;
0051f5e0  }

0051f60a                                90 90 90 90 90 90                                                            ......

0051f610  void* __thiscall RawMotionState::`scalar deleting destructor'(class RawMotionState* this, uint32_t arg2)

0051f610  {
0051f613      this->vtable = 0x7c7a4c;
0051f619      RawMotionState::Destroy(this);
0051f623      this->vtable = 0x79285c;
0051f623      
0051f629      if ((arg2 & 1) != 0)
0051f62c          operator delete(this);
0051f62c      
0051f637      return this;
0051f610  }

0051f63a                                                                                90 90 90 90 90 90                            ......

0051f640  uint32_t __thiscall AnimFrame::pack_size(class AnimFrame* this, uint32_t arg2)

0051f640  {
0051f641      class CAnimHook* i = this->hooks;
0051f64c      int32_t result = ((arg2 * 0x1c) + 4);
0051f64c      
0051f651      while (i != 0)
0051f651      {
0051f654          uint32_t eax_1 = CAnimHook::PackSize(i);
0051f659          i = i->next_hook;
0051f65f          result += eax_1;
0051f651      }
0051f651      
0051f669      return result;
0051f640  }

0051f66c                                      90 90 90 90                                                              ....

0051f670  void __fastcall AFrame::AFrame(class AFrame* this)

0051f670  {
0051f674      this->m_fOrigin.x = 0;
0051f676      this->m_fOrigin.y = 0f;
0051f679      this->m_fOrigin.z = 0f;
0051f67c      this->qw = 1f;
0051f683      this->qx = 0f;
0051f686      this->qy = 0f;
0051f689      this->qz = 0f;
0051f670  }

0051f68d                                         90 90 90                                                               ...

0051f690  void __fastcall CAnimation::CAnimation(class CAnimation* this)

0051f690  {
0051f699      DBObj::DBObj(this, INVALID_DID.id);
0051f69e      this->vtable = &PackObj::`vftable';
0051f6a7      __builtin_memset(&this->pos_frames, 0, 0x14);
0051f6b6      this->vtable = 0x7c7aa0;
0051f6bc      this->vtable = &CAnimation::`vftable';
0051f690  }

0051f6c7                       90 90 90 90 90 90 90 90 90                                                         .........

0051f6d0  uint32_t NetError::GetPackSize(class NetError* this @ ecx) __pure

0051f6d0  {
0051f6d5      return 8;
0051f6d0  }

0051f6d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0051f6e0  void* __thiscall CAnimation::`vector deleting destructor'(class CAnimation* this, uint32_t arg2)

0051f6e0  {
0051f6e3      /* tailcall */
0051f6e3      return CAnimation::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0051f6e0  }

0051f6e8                          cc cc cc cc cc cc cc cc                                                          ........

0051f6f0  void __thiscall CAnimation::GetSubDataIDs(class CAnimation const* this, class QualifiedDataIDArray* arg2)

0051f6f0  {
0051f6f7      int32_t i = 0;
0051f6f7      
0051f6fb      if (this->num_frames > 0)
0051f6fb      {
0051f6ff          int32_t ebx_1 = 0;
0051f6ff          
0051f72c          do
0051f72c          {
0051f70c              for (int32_t* j = *(uint32_t*)(&this->part_frames->hooks + ebx_1); j != 0; j = j[1])
0051f719                  *(uint32_t*)(*(uint32_t*)j + 0xc)(arg2);
0051f719              
0051f726              i += 1;
0051f727              ebx_1 += 0x10;
0051f72c          } while (i < this->num_frames);
0051f6fb      }
0051f6f0  }

0051f735                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051f740  uint32_t __fastcall CAnimation::pack_size(class CAnimation const* this)

0051f740  {
0051f74a      int32_t ebp = 0;
0051f74f      int32_t result = 0xc;
0051f74f      
0051f757      if (this->pos_frames != 0)
0051f757      {
0051f759          uint32_t num_frames = this->num_frames;
0051f759          
0051f75e          if (num_frames > 0)
0051f75e          {
0051f760              TChessPiece<CBasePiece>::GetPackSize(this);
0051f76b              result = ((0x1c * num_frames) + 0xc);
0051f75e          }
0051f757      }
0051f757      
0051f772      int32_t var_4 = 0;
0051f772      
0051f776      if (this->num_frames > 0)
0051f776      {
0051f7c3          bool cond:2_1;
0051f7c3          
0051f7c3          do
0051f7c3          {
0051f789              class CAnimHook* next_hook = *(uint32_t*)(&this->part_frames->hooks + ebp);
0051f78f              int32_t esi_3 = ((this->num_parts * 0x1c) + 4);
0051f78f              
0051f794              while (next_hook != 0)
0051f794              {
0051f797                  uint32_t eax_5 = CAnimHook::PackSize(next_hook);
0051f79c                  next_hook = next_hook->next_hook;
0051f7a2                  esi_3 += eax_5;
0051f794              }
0051f794              
0051f7b6              ebp += 0x10;
0051f7b9              cond:2_1 = (var_4 + 1) < this->num_frames;
0051f7bb              result += esi_3;
0051f7bf              var_4 += 1;
0051f7c3          } while (cond:2_1);
0051f776      }
0051f776      
0051f7d0      return result;
0051f740  }

0051f7d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0051f7e0  void __fastcall AnimFrame::Destroy(class AnimFrame* this)

0051f7e0  {
0051f7e3      class AFrame* frame = this->frame;
0051f7e3      
0051f7e7      if (frame != 0)
0051f7e7      {
0051f7ed          operator delete[](((char*)frame - 4));
0051f7f5          this->frame = 0;
0051f7e7      }
0051f7e7      
0051f800      if (this->hooks != 0)
0051f800      {
0051f81a          class CAnimHook* next_hook;
0051f81a          
0051f81a          do
0051f81a          {
0051f803              class CAnimHook* hooks = this->hooks;
0051f808              next_hook = hooks->next_hook;
0051f808              
0051f80b              if (hooks != 0)
0051f80d                  hooks->vtable->__vecDelDtor(1);
0051f80d              
0051f817              this->hooks = next_hook;
0051f81a          } while (next_hook != 0);
0051f800      }
0051f800      
0051f81d      this->hooks = nullptr;
0051f7e0  }

0051f826                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0051f830  uint32_t __thiscall AnimFrame::Pack(class AnimFrame* this, uint32_t arg2, void** arg3, uint32_t arg4)

0051f830  {
0051f832      uint32_t i_3 = arg2;
0051f83f      class CAnimHook* i = this->hooks;
0051f842      uint32_t ebx_2 = ((i_3 * 0x1c) + 4);
0051f847      arg2 = ebx_2;
0051f847      
0051f84b      if (i != 0)
0051f84b      {
0051f860          do
0051f860          {
0051f851              uint32_t eax_1 = CAnimHook::PackSize(i);
0051f856              i = i->next_hook;
0051f85c              ebx_2 += eax_1;
0051f860          } while (i != 0);
0051f860          
0051f862          arg2 = ebx_2;
0051f84b      }
0051f84b      
0051f86a      if (arg4 < ebx_2)
0051f872          return ebx_2;
0051f872      
0051f87b      if (i_3 > 0)
0051f87b      {
0051f87d          int32_t ebx_3 = 0;
0051f893          uint32_t i_1;
0051f893          
0051f893          do
0051f893          {
0051f88a              AFrame::Pack((this->frame + ebx_3), arg3, arg4);
0051f88f              ebx_3 += 0x1c;
0051f892              i_1 = i_3;
0051f892              i_3 -= 1;
0051f893          } while (i_1 != 1);
0051f87b      }
0051f87b      
0051f89a      **(uint32_t**)arg3 = this->num_frame_hooks;
0051f89c      *(uint32_t*)arg3 += 4;
0051f8a2      class CAnimHook* ebx_4 = this->hooks;
0051f8a5      int32_t i_2 = 0;
0051f8a5      
0051f8a9      if (this->num_frame_hooks > 0)
0051f8a9      {
0051f8c8          do
0051f8c8          {
0051f8b7              CAnimHook::PackHook(ebx_4, arg3, arg4);
0051f8bf              ebx_4 = ebx_4->next_hook;
0051f8c5              i_2 += 1;
0051f8c8          } while (i_2 < this->num_frame_hooks);
0051f8a9      }
0051f8a9      
0051f8d2      return arg2;
0051f830  }

0051f8ad                                         8d 49 00                                                               .I.
0051f8d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051f8e0  int32_t __thiscall AnimFrame::UnPack(class AnimFrame* this, uint32_t arg2, void** arg3, uint32_t arg4)

0051f8e0  {
0051f8e6      AnimFrame::Destroy(this);
0051f8f8      this->num_parts = arg2;
0051f8fb      uint32_t* eax_3;
0051f8fb      int32_t i_2;
0051f8fb      eax_3 = operator new[](((arg2 * 0x1c) + 4));
0051f900      int32_t i_1 = 0;
0051f907      void* eax_5;
0051f907      
0051f907      if (eax_3 == 0)
0051f93e          eax_5 = nullptr;
0051f907      else
0051f907      {
0051f911          *(uint32_t*)eax_3 = arg2;
0051f913          void* eax_4 = &eax_3[1];
0051f913          
0051f915          if ((arg2 - 1) >= 0)
0051f915          {
0051f91d              i_2 = arg2;
0051f938              int32_t i;
0051f938              
0051f938              do
0051f938              {
0051f920                  *(uint32_t*)eax_4 = 0;
0051f922                  *(uint32_t*)((char*)eax_4 + 4) = 0;
0051f925                  *(uint32_t*)((char*)eax_4 + 8) = 0;
0051f928                  *(uint32_t*)((char*)eax_4 + 0xc) = 0x3f800000;
0051f92b                  *(uint32_t*)((char*)eax_4 + 0x10) = 0;
0051f92e                  *(uint32_t*)((char*)eax_4 + 0x14) = 0;
0051f931                  *(uint32_t*)((char*)eax_4 + 0x18) = 0;
0051f934                  eax_4 += 0x1c;
0051f937                  i = i_2;
0051f937                  i_2 -= 1;
0051f938              } while (i != 1);
0051f915          }
0051f915          
0051f93a          eax_5 = &eax_3[1];
0051f907      }
0051f907      
0051f944      this->frame = eax_5;
0051f944      
0051f949      if (this->num_parts > 0)
0051f949      {
0051f94b          int32_t ebp_1 = 0;
0051f94b          
0051f968          do
0051f968          {
0051f95a              AFrame::UnPack((this->frame + ebp_1), arg3, arg4);
0051f962              i_1 += 1;
0051f963              ebp_1 += 0x1c;
0051f968          } while (i_1 < this->num_parts);
0051f968          
0051f96a          i_1 = 0;
0051f949      }
0051f949      
0051f970      this->num_frame_hooks = **(uint32_t**)arg3;
0051f973      *(uint32_t*)arg3 += 4;
0051f973      
0051f979      if (this->num_frame_hooks > 0)
0051f979      {
0051f99c          do
0051f99c          {
0051f991              CAnimHook::add_to_list(CAnimHook::UnPackHook(arg3, arg4), &this->hooks);
0051f999              i_1 += 1;
0051f99c          } while (i_1 < this->num_frame_hooks);
0051f979      }
0051f979      
0051f9a7      return 1;
0051f8e0  }

0051f9aa                                90 90 90 90 90 90                                                            ......

0051f9b0  class DBObj* CAnimation::Allocate(class CAnimation const* this @ ecx)

0051f9b0  {
0051f9b0      /* tailcall */
0051f9b0      return CAnimation::Allocator();
0051f9b0  }

0051f9b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051f9c0  void* __thiscall AnimFrame::`vector deleting destructor'(class AnimFrame* this, uint32_t arg2)

0051f9c0  {
0051f9c0      class AnimFrame* this_1 = this;
0051f9c2      int32_t ebx;
0051f9c2      ebx = arg2;
0051f9c2      
0051f9cc      if ((ebx & 2) == 0)
0051f9cc      {
0051fa61          AnimFrame::Destroy(this);
0051fa61          
0051fa69          if ((ebx & 1) != 0)
0051fa6c              operator delete(this);
0051fa6c          
0051fa79          return this;
0051f9cc      }
0051f9cc      
0051f9d2      class AnimFrame* j;
0051f9d2      int32_t frame = j->frame;
0051f9d6      void* __offset(AnimFrame, -0x4) ebp = ((char*)this - 4);
0051f9df      void* esi_2 = &this[frame];
0051f9df      
0051f9e6      if ((frame - 1) >= 0)
0051f9e6      {
0051f9e8          ebx = frame;
0051fa3d          int32_t i;
0051fa3d          
0051fa3d          do
0051fa3d          {
0051f9f0              void* eax_1 = *(uint32_t*)((char*)esi_2 - 0x10);
0051f9f3              esi_2 -= 0x10;
0051f9f3              
0051f9f8              if (eax_1 != 0)
0051f9f8              {
0051fa09                  `vector destructor iterator'(eax_1, 0x1c, *(uint32_t*)((char*)eax_1 - 4), IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>);
0051fa0f                  operator delete[](((char*)eax_1 - 4));
0051fa17                  *(uint32_t*)esi_2 = 0;
0051f9f8              }
0051f9f8              
0051fa1c              if (*(uint32_t*)((char*)esi_2 + 8) != 0)
0051fa1c              {
0051fa37                  do
0051fa37                  {
0051fa20                      int32_t* ecx_2 = *(uint32_t*)((char*)esi_2 + 8);
0051fa25                      j = ecx_2[1];
0051fa25                      
0051fa28                      if (ecx_2 != 0)
0051fa2e                          **(uint32_t**)ecx_2(1);
0051fa2e                      
0051fa34                      *(uint32_t*)((char*)esi_2 + 8) = j;
0051fa37                  } while (j != 0);
0051fa1c              }
0051fa1c              
0051fa39              i = ebx;
0051fa39              ebx -= 1;
0051fa3a              *(uint32_t*)((char*)esi_2 + 8) = 0;
0051fa3d          } while (i != 1);
0051fa43          ebx = arg2;
0051f9e6      }
0051f9e6      
0051fa4a      if ((ebx & 1) != 0)
0051fa4d          operator delete[](ebp);
0051fa4d      
0051fa5c      return ebp;
0051f9c0  }

0051fa7c                                                                                      90 90 90 90                              ....

0051fa80  uint32_t __thiscall CAnimation::Pack(class CAnimation* this, void** arg2, uint32_t arg3)

0051fa80  {
0051fa80      class CAnimation* this_1 = this;
0051fa8a      uint32_t eax = CAnimation::pack_size(((char*)this - 0x30));
0051fa93      uint32_t var_4 = eax;
0051fa93      
0051fa97      if (arg3 >= eax)
0051fa97      {
0051faa0          int32_t ecx_1 = 0;
0051faa0          
0051faa4          if (this->m_bLoaded*(int32_t*)((char*)this + 8) != 0)
0051faa6              ecx_1 = 1;
0051faa6          
0051fab0          if (this->m_timeStamp != 0)
0051fab2              ecx_1 |= 2;
0051fab2          
0051fabb          **(uint32_t**)arg2 = ecx_1;
0051fabf          void* ebp_2 = (*(uint32_t*)arg2 + 4);
0051fac2          *(uint32_t*)arg2 = ebp_2;
0051fac9          *(uint32_t*)ebp_2 = *(uint32_t*)((char*)this->m_timeStamp)[4];
0051facd          void* ebx_2 = (*(uint32_t*)arg2 + 4);
0051fad0          *(uint32_t*)arg2 = ebx_2;
0051fad7          *(uint32_t*)ebx_2 = this->m_pNext;
0051fad9          *(uint32_t*)arg2 += 4;
0051fad9          
0051fae1          if (this->m_bLoaded*(int32_t*)((char*)this + 8) != 0)
0051fae1          {
0051fae6              int32_t i = 0;
0051fae6              
0051faea              if (this->m_pNext > 0)
0051faea              {
0051faec                  int32_t ebp_3 = 0;
0051faec                  
0051fb09                  do
0051fb09                  {
0051fafb                      AFrame::Pack((this->m_bLoaded*(int32_t*)((char*)this + 8) + ebp_3), arg2, arg3);
0051fb03                      i += 1;
0051fb04                      ebp_3 += 0x1c;
0051fb09                  } while (i < this->m_pNext);
0051fb09                  
0051fb0b                  eax = var_4;
0051faea              }
0051fae1          }
0051fae1          
0051fb16          if (this->m_pNext > 0)
0051fb16          {
0051fb18              int32_t ebp_4 = 0;
0051fb1a              int32_t i_1 = 0;
0051fb1a              
0051fb3d              do
0051fb3d              {
0051fb2f                  AnimFrame::Pack((*(int32_t*)((char*)this + 0xc) + ebp_4), *(uint32_t*)((char*)this->m_timeStamp)[4], arg2, arg3);
0051fb37                  i_1 += 1;
0051fb38                  ebp_4 += 0x10;
0051fb3d              } while (i_1 < this->m_pNext);
0051fb3d              
0051fb3f              return var_4;
0051fb16          }
0051fa97      }
0051fa97      
0051fb48      return eax;
0051fa80  }

0051fb4b                                   90 90 90 90 90                                                             .....

0051fb50  int32_t __thiscall CAnimation::UnPack(class CAnimation* this, void** arg2, uint32_t arg3)

0051fb50  {
0051fb5c      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
0051fb63      void* eax_1 = *(uint32_t*)arg2;
0051fb65      void** ecx_1 = *(uint32_t*)eax_1;
0051fb6a      *(uint32_t*)arg2 = ((char*)eax_1 + 4);
0051fb6e      *(uint32_t*)((char*)this->m_timeStamp)[4] = *(uint32_t*)((char*)eax_1 + 4);
0051fb73      void* ebx_1 = (*(uint32_t*)arg2 + 4);
0051fb76      *(uint32_t*)arg2 = ebx_1;
0051fb7c      this->m_pNext = *(uint32_t*)ebx_1;
0051fb8b      *(uint32_t*)arg2 += 4;
0051fb8b      
0051fb8d      if ((ecx_1 & 1) != 0)
0051fb8d      {
0051fb8f          class DBObj* m_pNext = this->m_pNext;
0051fb9b          class DBObj** eax_5 = operator new[](((m_pNext * 0x1c) + 4));
0051fba5          void* ebp_1;
0051fba5          
0051fba5          if (eax_5 == 0)
0051fbbc              ebp_1 = nullptr;
0051fba5          else
0051fba5          {
0051fbad              ebp_1 = &eax_5[1];
0051fbb3              *(uint32_t*)eax_5 = m_pNext;
0051fbb5              `vector constructor iterator'(ebp_1, 0x1c, m_pNext, AFrame::AFrame);
0051fba5          }
0051fba5          
0051fbc1          int32_t i = 0;
0051fbc3          bool cond:3_1 = this->m_pNext <= 0;
0051fbc5          this->m_bLoaded*(int32_t*)((char*)this + 8) = ebp_1;
0051fbc5          
0051fbc8          if (!(cond:3_1))
0051fbc8          {
0051fbca              int32_t ebp_2 = 0;
0051fbca              
0051fbe9              do
0051fbe9              {
0051fbdb                  AFrame::UnPack((this->m_bLoaded*(int32_t*)((char*)this + 8) + ebp_2), arg2, arg3);
0051fbe3                  i += 1;
0051fbe4                  ebp_2 += 0x1c;
0051fbe9              } while (i < this->m_pNext);
0051fbc8          }
0051fb8d      }
0051fb8d      
0051fbeb      class DBObj* m_pNext_1 = this->m_pNext;
0051fc01      this->m_timeStamp = ((((uint32_t)ecx_1) >> 1) & 1);
0051fc04      void* eax_11 = operator new[](((m_pNext_1 << 4) + 4));
0051fc09      int32_t ebp_3 = 0;
0051fc10      void* edx_4;
0051fc10      
0051fc10      if (eax_11 == 0)
0051fc34          edx_4 = nullptr;
0051fc10      else
0051fc10      {
0051fc12          *(uint32_t*)eax_11 = m_pNext_1;
0051fc17          edx_4 = ((char*)eax_11 + 4);
0051fc1a          void* eax_12 = edx_4;
0051fc1a          
0051fc1c          if (((char*)m_pNext_1 - 1) >= 0)
0051fc1c          {
0051fc1e              class DBObj* ecx_10 = m_pNext_1;
0051fc30              class DBObj* i_1;
0051fc30              
0051fc30              do
0051fc30              {
0051fc21                  *(uint32_t*)eax_12 = 0;
0051fc23                  *(uint32_t*)((char*)eax_12 + 4) = 0;
0051fc26                  *(uint32_t*)((char*)eax_12 + 8) = 0;
0051fc29                  *(uint32_t*)((char*)eax_12 + 0xc) = 0;
0051fc2c                  eax_12 += 0x10;
0051fc2f                  i_1 = ecx_10;
0051fc2f                  ecx_10 -= 1;
0051fc30              } while (i_1 != 1);
0051fc1c          }
0051fc10      }
0051fc10      
0051fc39      int32_t i_2 = 0;
0051fc3b      bool cond:2 = this->m_pNext <= 0;
0051fc3d      *(int32_t*)((char*)this + 0xc) = edx_4;
0051fc3d      
0051fc40      if (!(cond:2))
0051fc40      {
0051fc5f          do
0051fc5f          {
0051fc51              AnimFrame::UnPack((*(int32_t*)((char*)this + 0xc) + ebp_3), *(uint32_t*)((char*)this->m_timeStamp)[4], arg2, arg3);
0051fc59              i_2 += 1;
0051fc5a              ebp_3 += 0x10;
0051fc5f          } while (i_2 < this->m_pNext);
0051fc40      }
0051fc40      
0051fc6a      return 1;
0051fb50  }

0051fc6d                                         90 90 90                                                               ...

0051fc70  void __fastcall CAnimation::Destroy(class CAnimation* this)

0051fc70  {
0051fc73      class AFrame* pos_frames = this->pos_frames;
0051fc73      
0051fc7b      if (pos_frames != 0)
0051fc7b      {
0051fc81          operator delete[](((char*)pos_frames - 4));
0051fc89          this->pos_frames = nullptr;
0051fc7b      }
0051fc7b      
0051fc8c      class AnimFrame* part_frames = this->part_frames;
0051fc8c      
0051fc91      if (part_frames != 0)
0051fc91      {
0051fc95          AnimFrame::`vector deleting destructor'(part_frames, 3);
0051fc9a          this->part_frames = nullptr;
0051fc91      }
0051fc91      
0051fc9d      this->num_frames = 0;
0051fca0      this->num_parts = 0;
0051fc70  }

0051fca6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0051fcb0  void __fastcall CAnimation::~CAnimation(class CAnimation* this)

0051fcb0  {
0051fcb3      class AFrame* pos_frames = this->pos_frames;
0051fcbb      this->vtable = 0x7c7aa0;
0051fcc1      this->vtable = &CAnimation::`vftable';
0051fcc1      
0051fcc8      if (pos_frames != 0)
0051fcc8      {
0051fcce          operator delete[](((char*)pos_frames - 4));
0051fcd6          this->pos_frames = nullptr;
0051fcc8      }
0051fcc8      
0051fcd9      class AnimFrame* part_frames = this->part_frames;
0051fcd9      
0051fcde      if (part_frames != 0)
0051fcde      {
0051fce2          AnimFrame::`vector deleting destructor'(part_frames, 3);
0051fce7          this->part_frames = nullptr;
0051fcde      }
0051fcde      
0051fcea      this->num_frames = 0;
0051fced      this->num_parts = 0;
0051fcf1      this->vtable = &PackObj::`vftable';
0051fcfb      /* tailcall */
0051fcfb      return DBObj::~DBObj(this);
0051fcb0  }


0051fd00  void* __thiscall CAnimation::`scalar deleting destructor'(class CAnimation* this, uint32_t arg2)

0051fd00  {
0051fd03      CAnimation::~CAnimation(this);
0051fd03      
0051fd0d      if ((arg2 & 1) != 0)
0051fd10          operator delete(this);
0051fd10      
0051fd1b      return this;
0051fd00  }

0051fd1e                                                                                            90 90                                ..

0051fd20  int32_t __thiscall CSphere::UnPack(class CSphere* this, void** arg2, uint32_t arg3)

0051fd20  {
0051fd29      if (arg3 >= 0xc)
0051fd29      {
0051fd2f          this->center.x = **(uint32_t**)arg2;
0051fd33          void* edx_4 = (*(uint32_t*)arg2 + 4);
0051fd36          *(uint32_t*)arg2 = edx_4;
0051fd3a          this->center.y = *(uint32_t*)edx_4;
0051fd3f          void* edx_7 = (*(uint32_t*)arg2 + 4);
0051fd42          *(uint32_t*)arg2 = edx_7;
0051fd46          this->center.z = *(uint32_t*)edx_7;
0051fd49          *(uint32_t*)arg2 += 4;
0051fd29      }
0051fd29      
0051fd50      this->radius = **(uint32_t**)arg2;
0051fd53      *(uint32_t*)arg2 += 4;
0051fd5b      return 1;
0051fd20  }

0051fd5e                                                                                            90 90                                ..

0051fd60  void* __thiscall PlacementType::`scalar deleting destructor'(class PlacementType* this, uint32_t arg2)

0051fd60  {
0051fd66      this->vtable = 0x7c7b74;
0051fd6c      AnimFrame::Destroy(&this->anim_frame);
0051fd73      this->hash_next = nullptr;
0051fd76      this->id = 0;
0051fd7e      this->vtable = 0x7c62f8;
0051fd7e      
0051fd84      if ((arg2 & 1) != 0)
0051fd87          operator delete(this);
0051fd87      
0051fd92      return this;
0051fd60  }

0051fd95                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0051fda0  void __thiscall CSetup::GetSubDataIDs(class CSetup const* this, class QualifiedDataIDArray* arg2)

0051fda0  {
0051fdb8      void var_10;
0051fdb8      
0051fdb8      if (this->num_parts > 0)
0051fdb8      {
0051fdba          int32_t i = 0;
0051fdba          
0051fde2          do
0051fde2          {
0051fdd7              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, this->parts[i].id, 0), 0);
0051fddf              i += 1;
0051fde2          } while (i < this->num_parts);
0051fdb8      }
0051fdb8      
0051fdfb      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, this->default_anim_id.id, 0), 0);
0051fe17      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, this->default_script_id.id, 0), 0);
0051fe33      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, this->default_mtable_id.id, 0), 0);
0051fe4f      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, this->default_stable_id.id, 0), 0);
0051fe6b      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, this->default_phstable_id.id, 0), 0);
0051fda0  }

0051fe79                                                                             90 90 90 90 90 90 90                           .......

0051fe80  void* __thiscall LongNIValHashData<SurfInfo *>::`scalar deleting destructor'(class LongNIValHashData<SurfInfo *>* this, uint32_t arg2)

0051fe80  {
0051fe85      this->hash_next = nullptr;
0051fe88      this->id = 0;
0051fe90      this->vtable = 0x7c62f8;
0051fe90      
0051fe96      if ((arg2 & 1) != 0)
0051fe99          operator delete(this);
0051fe99      
0051fea4      return this;
0051fe80  }

0051fea7                       90 90 90 90 90 90 90 90 90                                                         .........

0051feb0  void* __thiscall LongHash<LocationType>::`scalar deleting destructor'(class LongHash<LocationType>* this, uint32_t arg2)

0051feb0  {
0051feb3      this->vtable = 0x7c7b78;
0051feb9      HashBase<unsigned long>::~HashBase<unsigned long>(this);
0051feb9      
0051fec3      if ((arg2 & 1) != 0)
0051fec6          operator delete(this);
0051fec6      
0051fed1      return this;
0051feb0  }

0051fed4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0051fee0  void __fastcall CSetup::CSetup(class CSetup* this)

0051fee0  {
0051feed      DBObj::DBObj(this, INVALID_DID.id);
0051fef2      this->vtable = &PackObj::`vftable';
0051fefb      this->vtable = 0x7c7b90;
0051ff01      this->vtable = &CSetup::`vftable';
0051ff08      __builtin_memset(&this->num_parts, 0, 0x24);
0051ff23      this->allow_free_heading = 1;
0051ff2a      this->height = 0f;
0051ff2d      this->radius = 0f;
0051ff30      this->step_down_height = 0f;
0051ff33      this->step_up_height = 0f;
0051ff36      this->sorting_sphere.radius = 0f;
0051ff3b      this->sorting_sphere.center.x = 0;
0051ff3b      this->sorting_sphere.center.y = 0f;
0051ff3b      this->sorting_sphere.center.z = 0f;
0051ff48      this->selection_sphere.radius = 0f;
0051ff4e      this->selection_sphere.center.x = 0;
0051ff4e      this->selection_sphere.center.y = 0f;
0051ff4e      this->selection_sphere.center.z = 0f;
0051ff5e      this->num_lights = 0;
0051ff64      this->lights = nullptr;
0051ff6f      this->anim_scale.x = 0x3f800000;
0051ff75      this->anim_scale.y = 1f;
0051ff7b      this->anim_scale.z = 1f;
0051ff81      this->holding_locations = nullptr;
0051ff87      this->connection_points = nullptr;
0051ff8d      int32_t var_c = 0;
0051ff91      int32_t var_8 = 0;
0051ff95      int32_t var_4 = 0;
0051ff9b      int32_t var_c_1 = 0;
0051ff9f      int32_t var_8_1 = 0;
0051ffa3      int32_t var_4_1 = 0;
0051ffa7      this->placement_frames.vtable = 0x7c66b0;
0051ffb1      this->placement_frames.fPlacementNew_ = 0;
0051ffbc      this->placement_frames.buckets = operator new[](8);
0051ffc5      this->placement_frames.table_size = 2;
0051ffcf      this->placement_frames.key_shift = 8;
0051ffd9      this->placement_frames.table_mask = 0;
0051ffdf      int32_t eax_4 = 1;
00520000      uint32_t edx_2;
00520000      
00520000      do
00520000      {
0051ffea          edx_2 = (this->placement_frames.table_mask | eax_4);
0051ffec          eax_4 <<= 1;
0051fff0          this->placement_frames.table_mask = edx_2;
00520000      } while ((edx_2 | eax_4) < this->placement_frames.table_size);
00520002      int32_t i = 0;
00520002      
00520022      do
00520022      {
00520010          this->placement_frames.buckets[i] = 0;
0052001f          i += 1;
00520022      } while (i < this->placement_frames.table_size);
00520022      
00520024      this->placement_frames.vtable = 0x7c66b0;
00520033      this->default_anim_id.id = INVALID_DID.id;
0052003f      this->default_script_id.id = INVALID_DID.id;
0052004b      this->default_mtable_id.id = INVALID_DID.id;
00520056      this->default_stable_id.id = INVALID_DID.id;
00520063      this->default_phstable_id.id = INVALID_DID.id;
0051fee0  }

00520006                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.

00520070  enum NodeNameType FileNodeName_Bool::GetType(class FileNodeName_Bool const* this @ ecx) __pure

00520070  {
00520075      return 7;
00520070  }

00520076                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00520080  void* __thiscall CSetup::`vector deleting destructor'(class CSetup* this, uint32_t arg2)

00520080  {
00520083      /* tailcall */
00520083      return CSetup::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00520080  }

00520088                          cc cc cc cc cc cc cc cc                                                          ........

00520090  class CSetup* CSetup::makeSimpleSetup(class IDClass<_tagDataID,32,0> arg1)

00520090  {
0052009a      void* eax = operator new(0xd8);
0052009a      
005200a6      if (eax != 0)
005200a6      {
005200aa          int32_t* result = CSetup::CSetup(eax);
005200aa          
005200b3          if (result != 0)
005200b3          {
005200c0              void* eax_2 = operator new[](8);
005200ca              void* eax_3;
005200ca              
005200ca              if (eax_2 == 0)
005200e8                  eax_3 = nullptr;
005200ca              else
005200ca              {
005200d9                  *(uint32_t*)eax_2 = 1;
005200df                  `vector constructor iterator'(((char*)eax_2 + 4), 4, 1, Vector3::Vector3);
005200e4                  eax_3 = ((char*)eax_2 + 4);
005200ca              }
005200ca              
005200ec              result[0xf] = eax_3;
005200ec              
005200ef              if (eax_3 != 0)
005200ef              {
00520109                  result[0xe] = 1;
00520110                  *(uint32_t*)eax_3 = arg1;
0052011d                  void var_8;
0052011d                  class DBObj* eax_7 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 6));
0052011d                  
00520127                  if (eax_7 != 0)
00520127                  {
00520129                      int32_t* edx_1 = *(int32_t*)((char*)eax_7 + 0x74);
00520129                      
0052012e                      if (edx_1 != 0)
0052012e                      {
0052013f                      label_52013f:
0052013c                          result[0x1c] = *(uint32_t*)edx_1;
0052013c                          result[0x1d] = edx_1[1];
0052013c                          result[0x1e] = edx_1[2];
0052013c                          result[0x1f] = edx_1[3];
0052012e                      }
0052012e                      else
0052012e                      {
00520130                          edx_1 = *(int32_t*)((char*)eax_7 + 0x90);
00520130                          
00520138                          if (edx_1 != 0)
00520138                              goto label_52013f;
0052012e                      }
0052012e                      
00520153                      eax_7->vtable->Release();
00520127                  }
00520127                  
0052015c                  void* eax_8 = operator new(0x1c);
0052015c                  
00520168                  if (eax_8 != 0)
00520168                  {
0052016a                      __builtin_memset(((char*)eax_8 + 4), 0, 0x18);
00520170                      *(uint32_t*)eax_8 = 0x7c7b74;
00520185                      void* eax_9 = operator new[](0x20);
0052018f                      void* ebx;
0052018f                      
0052018f                      if (eax_9 == 0)
005201ab                          ebx = nullptr;
0052018f                      else
0052018f                      {
00520198                          ebx = ((char*)eax_9 + 4);
0052019e                          *(uint32_t*)eax_9 = 1;
005201a4                          `vector constructor iterator'(ebx, 0x1c, 1, AFrame::AFrame);
0052018f                      }
0052018f                      
005201ad                      *(uint32_t*)((char*)eax_8 + 0xc) = ebx;
005201b0                      *(uint32_t*)((char*)eax_8 + 8) = 0;
005201cf                      *(uint32_t*)((char*)eax_8 + 4) = *(uint32_t*)result[0x2e];
005201d8                      *(uint32_t*)result[0x2e] = eax_8;
005201db                      *(uint32_t*)((char*)eax_8 + 0x18) = 1;
005201ea                      return result;
00520168                  }
005200ef              }
005200ef              
005200f7              *(uint32_t*)(*(uint32_t*)result + 0x18)(1);
005200b3          }
005200a6      }
005200a6      
005200bc      return 0;
00520090  }

005201eb                                   90 90 90 90 90                                                             .....

005201f0  class CSetup* CSetup::makeParticleSetup(uint32_t arg1, class CSphere const* arg2)

005201f0  {
005201f5      void* eax = operator new(0xd8);
005201f5      
005201ff      if (eax != 0)
005201ff      {
00520203          void* result = CSetup::CSetup(eax);
00520203          
0052020a          if (result != 0)
0052020a          {
00520213              *(uint32_t*)((char*)result + 0x38) = arg1;
00520216              *(uint32_t*)((char*)result + 0x3c) = 0;
0052021d              return result;
0052020a          }
005201ff      }
005201ff      
0052020e      return 0;
005201f0  }

0052021e                                                                                            90 90                                ..

00520220  uint32_t __fastcall CSetup::pack_size(class CSetup* this)

00520220  {
0052022a      uint32_t num_parts = this->num_parts;
0052022e      int32_t i_1 = 0;
00520230      bool cond:0 = this->parent_index == 0;
00520233      void* var_20 = nullptr;
00520237      void* edi = ((num_parts << 2) + 8);
00520237      
0052023e      if (!(cond:0))
00520240          edi += (num_parts << 2);
00520240      
00520246      if (this->default_scale != 0)
0052024b          edi += (num_parts * 0xc);
0052024b      
0052024e      class LongHash<LocationType>* holding_locations = this->holding_locations;
00520254      class LongHash<LocationType>* holding_locations_1 = holding_locations;
00520256      void* edi_1 = ((char*)edi + 4);
0052025b      int32_t var_1c = 0;
0052025f      class LongHash<LocationType>* var_14 = holding_locations_1;
00520263      int32_t var_8 = 0;
00520267      int32_t var_10 = 0;
00520267      
0052026b      if (holding_locations_1 == 0)
0052026b      {
0052028d          int32_t var_4_1 = 1;
00520295          int32_t var_c_1 = 0;
0052026b      }
0052026b      else
0052026b      {
00520270          class HashBaseData<unsigned long>* ecx_2 = *(uint32_t*)holding_locations_1->buckets;
00520274          int32_t var_4 = 0;
00520278          class HashBaseData<unsigned long>* var_c = ecx_2;
00520278          
0052027c          if (ecx_2 == 0)
0052027c          {
00520282              HashBaseIter<unsigned long>::Next(&var_14);
00520287              holding_locations_1 = var_14;
0052027c          }
0052026b      }
0052026b      
0052029b      if (holding_locations != 0)
0052029b      {
0052029f          int32_t var_8_1 = 0;
005202a3          int32_t var_10_1 = 0;
005202a3          
005202a7          if (holding_locations_1 != 0)
005202a7          {
005202ac              class HashBaseData<unsigned long>* i = *(uint32_t*)holding_locations_1->buckets;
005202b0              int32_t var_4_2 = 0;
005202b0              
005202b8              if (i == 0)
005202be                  HashBaseIter<unsigned long>::Next(&var_14);
005202be              
005202c7              if ((i != 0 || i != 0))
005202c7              {
005202e1                  do
005202e1                  {
005202d0                      var_1c += 1;
005202d8                      HashBaseIter<unsigned long>::Next(&var_14);
005202e1                  } while (i != 0);
005202c7              }
005202a7          }
005202a7          
005202ea          edi_1 += (var_1c * 0x24);
0052029b      }
0052029b      
005202ed      class LongHash<LocationType>* connection_points = this->connection_points;
005202f3      class LongHash<LocationType>* connection_points_1 = connection_points;
005202f5      void* edi_2 = ((char*)edi_1 + 4);
005202fa      int32_t var_1c_1 = 0;
005202fe      var_14 = connection_points_1;
00520302      int32_t var_8_2 = 0;
00520306      int32_t var_10_2 = 0;
00520306      
0052030a      if (connection_points_1 == 0)
0052030a      {
0052032c          int32_t var_4_4 = 1;
00520334          int32_t var_c_4 = 0;
0052030a      }
0052030a      else
0052030a      {
0052030f          class HashBaseData<unsigned long>* eax_3 = *(uint32_t*)connection_points_1->buckets;
00520313          int32_t var_4_3 = 0;
00520317          class HashBaseData<unsigned long>* var_c_3 = eax_3;
00520317          
0052031b          if (eax_3 == 0)
0052031b          {
00520321              HashBaseIter<unsigned long>::Next(&var_14);
00520326              connection_points_1 = var_14;
0052031b          }
0052030a      }
0052030a      
0052033a      if (connection_points != 0)
0052033a      {
0052033e          int32_t var_8_3 = 0;
00520342          int32_t var_10_3 = 0;
00520342          
00520346          if (connection_points_1 != 0)
00520346          {
0052034b              class HashBaseData<unsigned long>* hash_next = *(uint32_t*)connection_points_1->buckets;
0052034f              int32_t var_4_5 = 0;
0052034f              
00520357              if (hash_next != 0)
00520357                  goto label_520377_1;
00520357              
0052035d              HashBaseIter<unsigned long>::Next(&var_14);
0052035d              
00520368              if (hash_next != 0)
00520368              {
0052036a                  connection_points_1 = var_14;
00520377              label_520377_1:
00520377                  
00520377                  while (true)
00520377                  {
00520377                  label_520377:
00520377                      var_1c_1 += 1;
00520377                      
0052037b                      if (hash_next != 0)
0052037b                      {
0052037d                          hash_next = hash_next->hash_next;
0052037d                          
00520382                          if (hash_next != 0)
00520382                              continue;
0052037b                      }
0052037b                      
0052038c                      while (true)
0052038c                      {
0052038c                          bool cond:16_1 = (var_10_3 + 1) >= connection_points_1->table_size;
0052038e                          var_10_3 += 1;
0052038e                          
00520392                          if (cond:16_1)
00520392                              break;
00520392                          
0052039b                          hash_next = connection_points_1->buckets[var_10_3];
0052039b                          
005203a0                          if (hash_next != 0)
005203a0                              goto label_520377;
0052038c                      }
0052038c                      
005203a6                      if (hash_next == 0)
005203a6                          break;
00520377                  }
00520368              }
00520346          }
00520346          
005203af          edi_2 += (var_1c_1 * 0x24);
0052033a      }
0052033a      
005203b2      class LongHash<LocationType>* ebx_3 = &this->placement_frames;
005203b8      void* edi_3 = ((char*)edi_2 + 4);
005203bd      var_14 = ebx_3;
005203c1      int32_t var_8_4 = 0;
005203c5      int32_t var_10_4 = 0;
005203c5      
005203c9      if (ebx_3 == 0)
005203eb          int32_t var_4_7 = 1;
005203c9      else
005203c9      {
005203ce          class HashBaseData<unsigned long>* eax_7 = *(uint32_t*)ebx_3->buckets;
005203d2          int32_t var_4_6 = 0;
005203d6          class HashBaseData<unsigned long>* var_c_6 = eax_7;
005203d6          
005203da          if (eax_7 == 0)
005203da          {
005203e0              HashBaseIter<unsigned long>::Next(&var_14);
005203e5              ebx_3 = var_14;
005203da          }
005203c9      }
005203c9      
005203f5      int32_t var_8_5 = 0;
005203f9      int32_t var_10_5 = 0;
005203f9      
005203fd      if (ebx_3 != 0)
005203fd      {
00520402          int32_t var_4_8 = 0;
00520406          class HashBaseData<unsigned long>* hash_next_1 = *(uint32_t*)ebx_3->buckets;
00520406          
0052040e          if (hash_next_1 != 0)
0052040e              goto label_520433_1;
0052040e          
00520414          HashBaseIter<unsigned long>::Next(&var_14);
00520414          
0052041f          if (hash_next_1 != 0)
0052041f          {
00520421              ebx_3 = var_14;
00520433          label_520433_1:
00520433              
00520433              while (true)
00520433              {
00520433              label_520433:
00520433                  edi_3 = (((char*)edi_3 + AnimFrame::pack_size(&hash_next_1[1], this->num_parts)) + 4);
00520433                  
00520437                  if (hash_next_1 != 0)
00520437                  {
00520439                      hash_next_1 = hash_next_1->hash_next;
00520439                      
0052043e                      if (hash_next_1 != 0)
0052043e                          continue;
00520437                  }
00520437                  
00520447                  while (true)
00520447                  {
00520447                      int32_t eax_11 = (var_10_5 + 1);
0052044a                      var_10_5 = eax_11;
0052044a                      
0052044e                      if (eax_11 >= ebx_3->table_size)
0052044e                          break;
0052044e                      
00520453                      hash_next_1 = ebx_3->buckets[eax_11];
00520453                      
00520458                      if (hash_next_1 != 0)
00520458                          goto label_520433;
00520447                  }
00520447                  
0052045e                  if (hash_next_1 == 0)
0052045e                      break;
00520433              }
0052041f          }
0052041f          
00520460          i_1 = 0;
005203fd      }
005203fd      
00520465      void* edi_4 = ((char*)edi_3 + 4);
00520465      
0052046a      if (this->num_cylsphere > 0)
0052046a      {
0052046c          int32_t ebx_4 = 0;
0052046c          
0052048c          do
0052048c          {
0052047c              CCylSphere::Pack((this->cylsphere + ebx_4), &var_20, 0);
00520481              edi_4 += 0x14;
00520486              i_1 += 1;
00520487              ebx_4 += 0x14;
0052048c          } while (i_1 < this->num_cylsphere);
0052046a      }
0052046a      
0052048e      uint32_t num_sphere = this->num_sphere;
00520491      uint32_t num_lights = 0;
00520493      void* edi_5 = ((char*)edi_4 + 4);
00520493      
00520498      if (num_sphere > 0)
0052049d          edi_5 += (num_sphere << 4);
0052049d      
005204a5      void* edi_6 = ((char*)edi_5 + 0x34);
005204aa      int32_t var_18 = 0;
005204aa      
005204ae      if (this->num_lights > 0)
005204ae      {
005204b4          int32_t var_1c_2 = 0;
00520553          bool cond:18_1;
00520553          
00520553          do
00520553          {
005204c0              this->lights;
005204ca              FileNodeName_Float::GetType(num_lights);
0052053d              num_lights = this->num_lights;
00520543              edi_6 += 0x30;
00520549              cond:18_1 = (var_18 + 1) < num_lights;
0052054b              var_18 += 1;
0052054f              var_1c_2 += 0x68;
00520553          } while (cond:18_1);
005204ae      }
005204ae      
0052055e      void* ecx_23 = (((char*)edi_6 + 0x14) & 3);
0052055e      
00520561      if (ecx_23 == 0)
0052057f          return ((char*)edi_6 + 0x14);
0052057f      
00520573      return ((4 - ecx_23) + ((char*)edi_6 + 0x14));
00520220  }

005204ba                                                                                8d 9b 00 00 00 00                            ......

00520580  uint32_t __thiscall CSetup::Pack(class CSetup* this, void** arg2, uint32_t arg3)

00520580  {
00520589      uint32_t result = CSetup::pack_size(((char*)this - 0x30));
00520589      
00520596      if (arg3 < result)
00520c4b          return result;
00520c4b      
0052059f      float eax = 0f;
0052059f      
005205a3      if (this->m_timeStamp != 0)
005205a5          eax = 1.40129846e-45f;
005205a5      
005205af      if (*(uint32_t*)((char*)this->m_timeStamp)[4] != 0)
005205b1          eax |= 2;
005205b1      
005205b9      if (this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c) != 0)
005205bb          eax |= 4;
005205bb      
005205c3      if (this->m_DID.id != 0)
005205c5          eax |= 8;
005205c5      
005205c9      float** esi_1 = arg2;
005205cf      **(uint32_t**)esi_1 = eax;
005205d4      void* edi_2 = &*(uint32_t*)esi_1[1];
005205d7      *(uint32_t*)esi_1 = edi_2;
005205de      *(uint32_t*)edi_2 = this->m_bLoaded*(int32_t*)((char*)this + 8);
005205e2      void* edx_3 = &*(uint32_t*)esi_1[1];
005205e5      *(uint32_t*)esi_1 = edx_3;
005205ea      int32_t i = 0;
005205ee      void* edi_3 = edx_3;
005205ee      
005205f0      if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
005205f0      {
00520607          do
00520607          {
005205f8              *(uint32_t*)edi_3 = *(uint32_t*)(*(int32_t*)((char*)this + 0xc) + (i << 2));
005205fc              edi_3 = &*(uint32_t*)esi_1[1];
005205ff              *(uint32_t*)esi_1 = edi_3;
00520604              i += 1;
00520607          } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
005205f0      }
005205f0      
0052060e      if (this->m_timeStamp != 0)
0052060e      {
00520613          int32_t i_1 = 0;
00520613          
00520617          if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
00520617          {
00520635              do
00520635              {
00520626                  *(uint32_t*)edi_3 = *(uint32_t*)(this->m_timeStamp + (i_1 << 2));
0052062a                  edi_3 = &*(uint32_t*)esi_1[1];
0052062d                  *(uint32_t*)esi_1 = edi_3;
00520632                  i_1 += 1;
00520635              } while (i_1 < this->m_bLoaded*(int32_t*)((char*)this + 8));
00520617          }
0052060e      }
0052060e      
00520646      if ((*(uint32_t*)((char*)this->m_timeStamp)[4] != 0 && this->m_bLoaded*(int32_t*)((char*)this + 8) > 0))
00520646      {
00520648          int32_t edx_6 = 0;
0052064a          int32_t i_2 = 0;
0052064a          
0052068e          do
0052068e          {
00520657              int32_t* eax_6 = (*(uint32_t*)((char*)this->m_timeStamp)[4] + edx_6);
00520657              
0052065c              if (arg3 >= 0xc)
0052065c              {
00520660                  *(uint32_t*)edi_3 = *(uint32_t*)eax_6;
00520664                  void* edi_7 = &*(uint32_t*)esi_1[1];
00520667                  *(uint32_t*)esi_1 = edi_7;
0052066e                  *(uint32_t*)edi_7 = ((float)((long double)eax_6[1]));
00520672                  void* ecx_16 = &*(uint32_t*)esi_1[1];
00520675                  *(uint32_t*)esi_1 = ecx_16;
0052067a                  *(uint32_t*)ecx_16 = ((float)((long double)eax_6[2]));
0052067e                  void* eax_8 = &*(uint32_t*)esi_1[1];
00520681                  *(uint32_t*)esi_1 = eax_8;
00520683                  edi_3 = eax_8;
0052065c              }
0052065c              
00520688              i_2 += 1;
00520689              edx_6 += 0xc;
0052068e          } while (i_2 < this->m_bLoaded*(int32_t*)((char*)this + 8));
00520646      }
00520646      
00520690      float y = this->sorting_sphere.center.y;
00520693      int32_t eax_10 = 0;
00520697      arg2 = nullptr;
0052069b      float y_1 = y;
0052069f      int32_t var_8_1 = 0;
0052069f      
005206a3      if (y == 0)
005206a3      {
005206c9          int32_t var_c_1 = 0;
005206cd      label_5206cd:
005206cd          int32_t var_4_2 = 1;
005206a3      }
005206a3      else
005206a3      {
005206a5          int32_t ecx_17 = *(uint32_t*)(y + 0xc);
005206ab          int32_t var_4_1 = 0;
005206ab          
005206af          if (*(uint32_t*)ecx_17 == 0)
005206af          {
005206c5              do
005206c5              {
005206b4                  eax_10 += 1;
005206b7                  int32_t var_8_2 = 0;
005206b7                  
005206bf                  if (eax_10 >= *(uint32_t*)(y + 0x10))
005206bf                      goto label_5206cd;
005206c5              } while (*(uint32_t*)(ecx_17 + (eax_10 << 2)) == 0);
005206af          }
005206a3      }
005206a3      
005206dc      if (this->sorting_sphere.center.y != 0)
005206dc      {
005206e1          void* eax_13 = **(uint32_t**)(y + 0xc);
005206e3          int32_t ecx_18 = 0;
005206e7          int32_t var_8_3 = 0;
005206eb          int32_t var_10_1 = 0;
005206ef          int32_t var_4_3 = 0;
005206ef          
005206f7          if (eax_13 != 0)
005206f7              goto label_520719_1;
005206f7          
005206fd          HashBaseIter<unsigned long>::Next(&y_1);
005206fd          
00520708          if (eax_13 != 0)
00520708          {
0052070a              ecx_18 = var_10_1;
0052070e              y = y_1;
00520719          label_520719_1:
00520719              
00520719              while (true)
00520719              {
00520719              label_520719:
00520719                  arg2 += 1;
00520719                  
0052071d                  if (eax_13 != 0)
0052071d                  {
0052071f                      eax_13 = *(uint32_t*)((char*)eax_13 + 4);
0052071f                      
00520724                      if (eax_13 != 0)
00520724                          continue;
0052071d                  }
0052071d                  
00520730                  while (true)
00520730                  {
00520730                      ecx_18 += 1;
00520730                      
00520733                      if (ecx_18 >= *(uint32_t*)(y + 0x10))
00520733                          break;
00520733                      
00520738                      eax_13 = *(uint32_t*)(*(uint32_t*)(y + 0xc) + (ecx_18 << 2));
00520738                      
0052073d                      if (eax_13 != 0)
0052073d                          goto label_520719;
00520730                  }
00520730                  
00520743                  if (eax_13 == 0)
00520743                      break;
00520719              }
00520708          }
005206dc      }
005206dc      
00520749      *(uint32_t*)edi_3 = arg2;
0052074b      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
0052074b      
00520753      if (this->sorting_sphere.center.y != 0)
00520753      {
00520759          float y_2 = y_1;
0052075d          int32_t ebx_5 = 0;
0052075d          
00520761          if (y_2 != 0)
00520761          {
00520765              int32_t* eax_16 = *(uint32_t*)(y_2 + 0xc);
00520768              void* edi_8 = *(uint32_t*)eax_16;
00520768              
0052076c              if (edi_8 != 0)
0052076c              {
00520788              label_520788_1:
00520788                  
00520788                  while (true)
00520788                  {
00520788                  label_520788:
00520788                      **(uint32_t**)esi_1 = *(uint32_t*)((char*)edi_8 + 8);
0052078c                      void* edx_9 = &*(uint32_t*)esi_1[1];
0052078f                      *(uint32_t*)esi_1 = edx_9;
0052079a                      *(uint32_t*)edx_9 = *(uint32_t*)((char*)edi_8 + 0xc);
005207a2                      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005207a8                      Frame::Pack(((char*)edi_8 + 0x10), esi_1, arg3);
005207ad                      edi_8 = *(uint32_t*)((char*)edi_8 + 4);
005207ad                      
005207b2                      if (edi_8 == 0)
005207b2                      {
005207b4                          float y_3 = y_1;
005207b4                          
005207c0                          while (true)
005207c0                          {
005207c0                              ebx_5 += 1;
005207c0                              
005207c3                              if (ebx_5 >= *(uint32_t*)(y_3 + 0x10))
005207c3                                  break;
005207c3                              
005207c8                              edi_8 = *(uint32_t*)(*(uint32_t*)(y_3 + 0xc) + (ebx_5 << 2));
005207c8                              
005207cd                              if (edi_8 != 0)
005207cd                                  goto label_520788;
005207c0                          }
005207c0                          
005207d3                          if (edi_8 == 0)
005207d3                              break;
005207b2                      }
00520788                  }
0052076c              }
0052076c              else
0052076c              {
00520771                  while (true)
00520771                  {
00520771                      ebx_5 += 1;
00520771                      
00520774                      if (ebx_5 >= *(uint32_t*)(y_2 + 0x10))
00520774                          break;
00520774                      
00520776                      edi_8 = eax_16[ebx_5];
00520776                      
0052077b                      if (edi_8 != 0)
0052077b                          goto label_520788_1;
00520771                  }
00520771                  
00520781                  if (edi_8 != 0)
00520781                      goto label_520788_1;
0052076c              }
00520761          }
00520753      }
00520753      
005207d5      float z_3 = this->sorting_sphere.center.z;
005207d8      int32_t eax_19 = 0;
005207dc      arg2 = nullptr;
005207dc      
005207e8      if (z_3 != 0)
005207e8      {
005207ea          int32_t* ecx_28 = *(uint32_t*)(z_3 + 0xc);
005207ea          
005207f0          if (*(uint32_t*)ecx_28 == 0)
005207f0          {
005207fe              do
005207fe              {
005207f5                  eax_19 += 1;
005207f5                  
005207f8                  if (eax_19 >= *(uint32_t*)(z_3 + 0x10))
005207f8                      break;
005207fe              } while (ecx_28[eax_19] == 0);
005207f0          }
005207f0          
00520802          if (z_3 != 0)
00520802          {
00520804              int32_t* edx_13 = *(uint32_t*)(z_3 + 0xc);
00520807              void* eax_20 = *(uint32_t*)edx_13;
00520809              int32_t ecx_29 = 0;
00520809              
0052080d              if (eax_20 != 0)
0052080d              {
0052082b              label_52082b_1:
0052082b                  
0052082b                  while (true)
0052082b                  {
0052082b                  label_52082b:
0052082b                      arg2 += 1;
0052082b                      
0052082f                      if (eax_20 != 0)
0052082f                      {
00520831                          eax_20 = *(uint32_t*)((char*)eax_20 + 4);
00520831                          
00520836                          if (eax_20 != 0)
00520836                              continue;
0052082f                      }
0052082f                      
00520840                      while (true)
00520840                      {
00520840                          ecx_29 += 1;
00520840                          
00520843                          if (ecx_29 >= *(uint32_t*)(z_3 + 0x10))
00520843                              break;
00520843                          
00520845                          eax_20 = edx_13[ecx_29];
00520845                          
0052084a                          if (eax_20 != 0)
0052084a                              goto label_52082b;
00520840                      }
00520840                      
00520850                      if (eax_20 == 0)
00520850                          break;
0052082b                  }
0052080d              }
0052080d              else
0052080d              {
00520812                  while (true)
00520812                  {
00520812                      ecx_29 += 1;
00520812                      
00520815                      if (ecx_29 >= *(uint32_t*)(z_3 + 0x10))
00520815                          break;
00520815                      
00520817                      eax_20 = edx_13[ecx_29];
00520817                      
0052081c                      if (eax_20 != 0)
0052081c                          goto label_52082b_1;
00520812                  }
00520812                  
00520822                  if (eax_20 != 0)
00520822                      goto label_52082b_1;
0052080d              }
00520802          }
005207e8      }
005207e8      
00520858      **(uint32_t**)esi_1 = arg2;
0052085a      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
0052085a      
00520862      if (this->sorting_sphere.center.z != 0)
00520862      {
0052086c          int32_t ebx_6 = 0;
0052086c          
00520870          if (z_3 != 0)
00520870          {
00520874              int32_t* eax_24 = *(uint32_t*)(z_3 + 0xc);
00520877              void* edi_13 = *(uint32_t*)eax_24;
00520877              
0052087b              if (edi_13 != 0)
0052087b              {
00520897              label_520897_1:
00520897                  
00520897                  while (true)
00520897                  {
00520897                  label_520897:
00520897                      **(uint32_t**)esi_1 = *(uint32_t*)((char*)edi_13 + 8);
0052089b                      void* edx_16 = &*(uint32_t*)esi_1[1];
0052089e                      *(uint32_t*)esi_1 = edx_16;
005208a9                      *(uint32_t*)edx_16 = *(uint32_t*)((char*)edi_13 + 0xc);
005208b1                      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005208b7                      Frame::Pack(((char*)edi_13 + 0x10), esi_1, arg3);
005208bc                      edi_13 = *(uint32_t*)((char*)edi_13 + 4);
005208bc                      
005208c1                      if (edi_13 == 0)
005208c1                      {
005208d0                          while (true)
005208d0                          {
005208d0                              ebx_6 += 1;
005208d0                              
005208d3                              if (ebx_6 >= *(uint32_t*)(z_3 + 0x10))
005208d3                                  break;
005208d3                              
005208d8                              edi_13 = *(uint32_t*)(*(uint32_t*)(z_3 + 0xc) + (ebx_6 << 2));
005208d8                              
005208dd                              if (edi_13 != 0)
005208dd                                  goto label_520897;
005208d0                          }
005208d0                          
005208e3                          if (edi_13 == 0)
005208e3                              break;
005208c1                      }
00520897                  }
0052087b              }
0052087b              else
0052087b              {
00520880                  while (true)
00520880                  {
00520880                      ebx_6 += 1;
00520880                      
00520883                      if (ebx_6 >= *(uint32_t*)(z_3 + 0x10))
00520883                          break;
00520883                      
00520885                      edi_13 = eax_24[ebx_6];
00520885                      
0052088a                      if (edi_13 != 0)
0052088a                          goto label_520897_1;
00520880                  }
00520880                  
00520890                  if (edi_13 != 0)
00520890                      goto label_520897_1;
0052087b              }
00520870          }
00520862      }
00520862      
005208e8      float ebx_7 = 0f;
005208ea      int32_t eax_28 = 0;
005208ea      
005208ee      if (this != 0xffffff84)
005208ee      {
005208f0          float z_1 = this->selection_sphere.center.z;
005208f0          
005208f6          if (*(uint32_t*)z_1 == 0)
005208f6          {
00520909              do
00520909              {
00520900                  eax_28 += 1;
00520900                  
00520903                  if (eax_28 >= this->selection_sphere.radius)
00520903                      break;
00520909              } while (*(uint32_t*)(z_1 + (eax_28 << 2)) == 0);
005208f6          }
005208ee      }
005208ee      
0052090e      int32_t ecx_40 = 0;
0052090e      
00520912      if (this != 0xffffff84)
00520912      {
00520914          float z_2 = this->selection_sphere.center.z;
00520917          void* eax_29 = *(uint32_t*)z_2;
00520917          
0052091b          if (eax_29 != 0)
0052091b          {
00520932          label_520932_1:
00520932              
00520932              while (true)
00520932              {
00520932              label_520932:
00520932                  ebx_7 += 1;
00520932                  
00520935                  if (eax_29 != 0)
00520935                  {
00520937                      eax_29 = *(uint32_t*)((char*)eax_29 + 4);
00520937                      
0052093c                      if (eax_29 != 0)
0052093c                          continue;
00520935                  }
00520935                  
00520944                  while (true)
00520944                  {
00520944                      ecx_40 += 1;
00520944                      
00520947                      if (ecx_40 >= this->selection_sphere.radius)
00520947                          break;
00520947                      
00520949                      eax_29 = *(uint32_t*)(z_2 + (ecx_40 << 2));
00520949                      
0052094e                      if (eax_29 != 0)
0052094e                          goto label_520932;
00520944                  }
00520944                  
00520954                  if (eax_29 == 0)
00520954                      break;
00520932              }
0052091b          }
0052091b          else
0052091b          {
00520920              while (true)
00520920              {
00520920                  ecx_40 += 1;
00520920                  
00520923                  if (ecx_40 >= this->selection_sphere.radius)
00520923                      break;
00520923                  
00520925                  eax_29 = *(uint32_t*)(z_2 + (ecx_40 << 2));
00520925                  
0052092a                  if (eax_29 != 0)
0052092a                      goto label_520932_1;
00520920              }
00520920              
00520930              if (eax_29 != 0)
00520930                  goto label_520932_1;
0052091b          }
00520912      }
00520912      
00520958      **(uint32_t**)esi_1 = ebx_7;
00520962      int32_t ebx_8 = 0;
00520966      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
00520966      
00520968      if (this != 0xffffff84)
00520968      {
0052096a          float z = this->selection_sphere.center.z;
00520970          void* edi_17 = *(uint32_t*)z;
00520970          
00520974          if (edi_17 != 0)
00520974          {
0052099b          label_52099b_1:
0052099b              
0052099b              while (true)
0052099b              {
0052099b              label_52099b:
0052099b                  **(uint32_t**)esi_1 = *(uint32_t*)((char*)edi_17 + 8);
005209a3                  *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005209ad                  AnimFrame::Pack(((char*)edi_17 + 0xc), this->m_bLoaded*(int32_t*)((char*)this + 8), esi_1, arg3);
005209b2                  edi_17 = *(uint32_t*)((char*)edi_17 + 4);
005209b2                  
005209b7                  if (edi_17 == 0)
005209b7                  {
005209c0                      while (true)
005209c0                      {
005209c0                          ebx_8 += 1;
005209c0                          
005209c3                          if (ebx_8 >= this->selection_sphere.radius)
005209c3                              break;
005209c3                          
005209cb                          edi_17 = *(uint32_t*)(this->selection_sphere.center.z + (ebx_8 << 2));
005209cb                          
005209d0                          if (edi_17 != 0)
005209d0                              goto label_52099b;
005209c0                      }
005209c0                      
005209d6                      if (edi_17 == 0)
005209d6                          break;
005209b7                  }
0052099b              }
00520974          }
00520974          else
00520974          {
00520980              while (true)
00520980              {
00520980                  ebx_8 += 1;
00520980                  
00520983                  if (ebx_8 >= this->selection_sphere.radius)
00520983                      break;
00520983                  
00520985                  edi_17 = *(uint32_t*)(z + (ebx_8 << 2));
00520985                  
0052098a                  if (edi_17 != 0)
0052098a                      goto label_52099b_1;
00520980              }
00520980              
00520990              if (edi_17 != 0)
00520990                  goto label_52099b_1;
00520974          }
00520968      }
00520968      
005209dd      **(uint32_t**)esi_1 = this->m_pNext;
005209df      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005209e5      int32_t i_3 = 0;
005209e5      
005209e9      if (this->m_pNext > 0)
005209e9      {
005209eb          int32_t ebx_9 = 0;
005209eb          
00520a09          do
00520a09          {
005209fb              CCylSphere::Pack((this->m_pLast + ebx_9), esi_1, arg3);
00520a03              i_3 += 1;
00520a04              ebx_9 += 0x14;
00520a09          } while (i_3 < this->m_pNext);
005209e9      }
005209e9      
00520a10      uint32_t ebx_10 = arg3;
00520a14      **(uint32_t**)esi_1 = this->m_pMaintainer;
00520a18      void* ecx_51 = &*(uint32_t*)esi_1[1];
00520a1b      *(uint32_t*)esi_1 = ecx_51;
00520a20      int32_t edx_26 = 0;
00520a24      arg2 = nullptr;
00520a24      
00520a28      if (this->m_pMaintainer > 0)
00520a28      {
00520a83          bool cond:14_1;
00520a83          
00520a83          do
00520a83          {
00520a33              int32_t* eax_40 = (this->m_numLinks + edx_26);
00520a33              
00520a38              if (ebx_10 >= 0x10)
00520a38              {
00520a3d                  if (ebx_10 >= 0xc)
00520a3d                  {
00520a41                      *(uint32_t*)ecx_51 = *(uint32_t*)eax_40;
00520a45                      void* ecx_53 = &*(uint32_t*)esi_1[1];
00520a48                      *(uint32_t*)esi_1 = ecx_53;
00520a4d                      *(uint32_t*)ecx_53 = ((float)((long double)eax_40[1]));
00520a51                      float* edi_20 = &*(uint32_t*)esi_1[1];
00520a54                      *(uint32_t*)esi_1 = edi_20;
00520a5b                      *(uint32_t*)edi_20 = ((float)((long double)eax_40[2]));
00520a5f                      ecx_51 = &*(uint32_t*)esi_1[1];
00520a62                      *(uint32_t*)esi_1 = ecx_51;
00520a3d                  }
00520a3d                  
00520a67                  *(uint32_t*)ecx_51 = ((float)((long double)eax_40[3]));
00520a6b                  void* eax_42 = &*(uint32_t*)esi_1[1];
00520a6e                  *(uint32_t*)esi_1 = eax_42;
00520a70                  ecx_51 = eax_42;
00520a38              }
00520a38              
00520a7a              edx_26 += 0x10;
00520a7d              cond:14_1 = ((char*)arg2 + 1) < this->m_pMaintainer;
00520a7f              arg2 += 1;
00520a83          } while (cond:14_1);
00520a28      }
00520a28      
00520a8a      *(uint32_t*)ecx_51 = ((float)((long double)this->vtable));
00520a8e      void* edi_23 = &*(uint32_t*)esi_1[1];
00520a91      *(uint32_t*)esi_1 = edi_23;
00520a98      *(uint32_t*)edi_23 = ((float)((long double)*(int32_t*)((char*)this + 0x34)));
00520a9c      void* ecx_57 = &*(uint32_t*)esi_1[1];
00520a9f      *(uint32_t*)esi_1 = ecx_57;
00520aa6      *(uint32_t*)ecx_57 = ((float)((long double)this->parts));
00520aaa      void* eax_48 = &*(uint32_t*)esi_1[1];
00520aad      *(uint32_t*)esi_1 = eax_48;
00520ab2      *(uint32_t*)eax_48 = ((float)((long double)this->num_parts));
00520ab6      void* edi_25 = &*(uint32_t*)esi_1[1];
00520abc      *(uint32_t*)esi_1 = edi_25;
00520abe      float* eax_49 = edi_25;
00520abe      
00520ac0      if (ebx_10 >= 0x10)
00520ac0      {
00520ac5          if (ebx_10 >= 0xc)
00520ac5          {
00520aca              *(uint32_t*)eax_49 = this->parent_index;
00520ace              void* edi_27 = &*(uint32_t*)esi_1[1];
00520ad1              *(uint32_t*)esi_1 = edi_27;
00520ad8              *(uint32_t*)edi_27 = ((float)((long double)this->default_scale));
00520adc              void* ecx_60 = &*(uint32_t*)esi_1[1];
00520adf              *(uint32_t*)esi_1 = ecx_60;
00520ae6              *(uint32_t*)ecx_60 = ((float)((long double)this->num_cylsphere));
00520aea              eax_49 = &*(uint32_t*)esi_1[1];
00520aed              *(uint32_t*)esi_1 = eax_49;
00520ac5          }
00520ac5          
00520af2          *(uint32_t*)eax_49 = ((float)((long double)this->cylsphere));
00520af6          eax_49 = &*(uint32_t*)esi_1[1];
00520afc          *(uint32_t*)esi_1 = eax_49;
00520afc          
00520afe          if (ebx_10 >= 0x10)
00520afe          {
00520b03              if (ebx_10 >= 0xc)
00520b03              {
00520b08                  *(uint32_t*)eax_49 = this->num_sphere;
00520b0c                  void* edi_29 = &*(uint32_t*)esi_1[1];
00520b0f                  *(uint32_t*)esi_1 = edi_29;
00520b16                  *(uint32_t*)edi_29 = ((float)((long double)this->sphere));
00520b1a                  float* ecx_63 = &*(uint32_t*)esi_1[1];
00520b1d                  *(uint32_t*)esi_1 = ecx_63;
00520b24                  *(uint32_t*)ecx_63 = ((float)((long double)this->has_physics_bsp));
00520b28                  eax_49 = &*(uint32_t*)esi_1[1];
00520b2b                  *(uint32_t*)esi_1 = eax_49;
00520b03              }
00520b03              
00520b30              *(uint32_t*)eax_49 = ((float)((long double)this->allow_free_heading));
00520b34              eax_49 = &*(uint32_t*)esi_1[1];
00520b37              *(uint32_t*)esi_1 = eax_49;
00520afe          }
00520ac0      }
00520ac0      
00520b39      float height = this->height;
00520b3c      *(uint32_t*)eax_49 = height;
00520b3e      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
00520b44      arg2 = nullptr;
00520b44      
00520b48      if (this->height > 0)
00520b48      {
00520b4e          arg3 = 0;
00520bc5          bool cond:18_1;
00520bc5          
00520bc5          do
00520bc5          {
00520b55              float* edi_31 = (this->radius + arg3);
00520b59              FileNodeName_Float::GetType(height);
00520b59              
00520b63              if (ebx_10 >= 0x30)
00520b63              {
00520b69                  **(uint32_t**)esi_1 = *(uint32_t*)edi_31;
00520b71                  *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
00520b77                  Frame::Pack(&edi_31[1], esi_1, ebx_10);
00520b81                  RGBColor::Pack(&edi_31[0x14], esi_1, ebx_10);
00520b8b                  **(uint32_t**)esi_1 = ((float)((long double)edi_31[0x17]));
00520b8f                  float* edx_29 = &*(uint32_t*)esi_1[1];
00520b92                  *(uint32_t*)esi_1 = edx_29;
00520b99                  *(uint32_t*)edx_29 = ((float)((long double)edi_31[0x18]));
00520b9d                  float* ecx_70 = &*(uint32_t*)esi_1[1];
00520ba0                  *(uint32_t*)esi_1 = ecx_70;
00520ba7                  *(uint32_t*)ecx_70 = ((float)((long double)edi_31[0x19]));
00520ba9                  *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
00520b63              }
00520b63              
00520bb4              height = this->height;
00520bbb              cond:18_1 = ((char*)arg2 + 1) < height;
00520bbd              arg2 += 1;
00520bc1              arg3 += 0x68;
00520bc5          } while (cond:18_1);
00520b48      }
00520b48      
00520bcf      **(uint32_t**)esi_1 = this->lights;
00520bd3      void* ebx_12 = &*(uint32_t*)esi_1[1];
00520bd6      *(uint32_t*)esi_1 = ebx_12;
00520be0      *(uint32_t*)ebx_12 = this->anim_scale.x;
00520be4      void* edi_33 = &*(uint32_t*)esi_1[1];
00520be7      *(uint32_t*)esi_1 = edi_33;
00520bf1      *(uint32_t*)edi_33 = this->anim_scale.y;
00520bf5      void* edx_35 = &*(uint32_t*)esi_1[1];
00520bf8      *(uint32_t*)esi_1 = edx_35;
00520c02      *(uint32_t*)edx_35 = this->anim_scale.z;
00520c06      void* ecx_74 = &*(uint32_t*)esi_1[1];
00520c09      *(uint32_t*)esi_1 = ecx_74;
00520c13      *(uint32_t*)ecx_74 = this->holding_locations;
00520c17      void* eax_69 = &*(uint32_t*)esi_1[1];
00520c1a      *(uint32_t*)esi_1 = eax_69;
00520c1c      void* eax_70 = (eax_69 & 0x80000003);
00520c1c      bool cond:17_1 = eax_70 == 0;
00520c1c      
00520c22      if (eax_70 < 0)
00520c22      {
00520c25          void* eax_72 = (((char*)eax_70 - 1) | 0xfffffffc);
00520c28          eax_70 = ((char*)eax_72 + 1);
00520c28          cond:17_1 = eax_72 == 0xffffffff;
00520c22      }
00520c22      
00520c29      if (!(cond:17_1))
00520c29      {
00520c30          void* i_5 = (4 - eax_70);
00520c30          
00520c32          if (4 != eax_70)
00520c32          {
00520c3f              void* i_4;
00520c3f              
00520c3f              do
00520c3f              {
00520c36                  **(uint8_t**)esi_1 = 0;
00520c3c                  i_4 = i_5;
00520c3c                  i_5 -= 1;
00520c3d                  *(uint32_t*)esi_1 += 1;
00520c3f              } while (i_4 != 1);
00520c32          }
00520c29      }
00520c29      
00520c41      return result;
00520580  }

005207bd                                                                                         8d 49 00                               .I.
0052083d                                                                                         8d 49 00                               .I.
005208fd                                                                                         8d 49 00                               .I.
00520c4e                                            90 90                                                                ..

00520c50  int32_t __thiscall CSetup::UnPack(class CSetup* this, void** arg2, uint32_t arg3)

00520c50  {
00520c5c      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
00520c5f      void** esi = arg2;
00520c63      void* eax_1 = *(uint32_t*)esi;
00520c65      char ebx = ((int8_t)*(uint32_t*)eax_1);
00520c76      *(uint32_t*)esi = ((char*)eax_1 + 4);
00520c7b      this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c) = ((((uint32_t)ebx) >> 2) & 1);
00520c81      this->m_DID.id = ((((uint32_t)ebx) >> 3) & 1);
00520c88      this->m_bLoaded*(int32_t*)((char*)this + 8) = **(uint32_t**)esi;
00520c8b      *(uint32_t*)esi += 4;
00520c8e      int32_t ebp = this->m_bLoaded*(int32_t*)((char*)this + 8);
00520c8e      
00520c93      if (ebp > 0)
00520c93      {
00520ca1          void* eax_4 = operator new[](((ebp << 2) + 4));
00520cab          void** eax_6;
00520cab          
00520cab          if (eax_4 == 0)
00520cca              eax_6 = nullptr;
00520cab          else
00520cab          {
00520cb3              *(uint32_t*)eax_4 = ebp;
00520cbf              `vector constructor iterator'(((char*)eax_4 + 4), 4, ebp, Vector3::Vector3);
00520cc4              eax_6 = ((char*)eax_4 + 4);
00520cab          }
00520cab          
00520ccc          int32_t ecx_5 = this->m_bLoaded*(int32_t*)((char*)this + 8);
00520ccf          *(int32_t*)((char*)this + 0xc) = eax_6;
00520cd2          int32_t i = 0;
00520cd2          
00520cd6          if (ecx_5 > 0)
00520cd6          {
00520cef              do
00520cef              {
00520cdb                  int32_t* edx_4 = (*(int32_t*)((char*)this + 0xc) + (i << 2));
00520cde                  void* ecx_7 = *(uint32_t*)esi;
00520ce0                  int32_t ebp_1 = *(uint32_t*)ecx_7;
00520ce5                  *(uint32_t*)esi = ((char*)ecx_7 + 4);
00520ce7                  *(uint32_t*)edx_4 = ebp_1;
00520cec                  i += 1;
00520cef              } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
00520cd6          }
00520cd6          
00520cf4          if ((ebx & 1) != 0)
00520cf4          {
00520d05              this->m_timeStamp = operator new[]((this->m_bLoaded*(int32_t*)((char*)this + 8) << 2));
00520d0b              int32_t i_1 = 0;
00520d0b              
00520d0f              if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
00520d0f              {
00520d24                  do
00520d24                  {
00520d18                      *(uint32_t*)(this->m_timeStamp + (i_1 << 2)) = **(uint32_t**)esi;
00520d1b                      *(uint32_t*)esi += 4;
00520d21                      i_1 += 1;
00520d24                  } while (i_1 < this->m_bLoaded*(int32_t*)((char*)this + 8));
00520d0f              }
00520cf4          }
00520cf4          
00520d29          if ((ebx & 2) != 0)
00520d29          {
00520d3a              *(uint32_t*)((char*)this->m_timeStamp)[4] = operator new[]((this->m_bLoaded*(int32_t*)((char*)this + 8) * 0xc));
00520d43              int32_t i_2 = 0;
00520d43              
00520d47              if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
00520d47              {
00520d4d                  int32_t edx_10 = 0;
00520d4d                  
00520d84                  do
00520d84                  {
00520d53                      int32_t* eax_12 = (*(uint32_t*)((char*)this->m_timeStamp)[4] + edx_10);
00520d53                      
00520d58                      if (arg3 >= 0xc)
00520d58                      {
00520d5e                          *(uint32_t*)eax_12 = **(uint32_t**)esi;
00520d62                          void* ecx_17 = (*(uint32_t*)esi + 4);
00520d65                          *(uint32_t*)esi = ecx_17;
00520d69                          eax_12[1] = *(uint32_t*)ecx_17;
00520d6e                          void* ecx_20 = (*(uint32_t*)esi + 4);
00520d71                          *(uint32_t*)esi = ecx_20;
00520d75                          eax_12[2] = *(uint32_t*)ecx_20;
00520d78                          *(uint32_t*)esi += 4;
00520d58                      }
00520d58                      
00520d7e                      i_2 += 1;
00520d7f                      edx_10 += 0xc;
00520d84                  } while (i_2 < this->m_bLoaded*(int32_t*)((char*)this + 8));
00520d47              }
00520d29          }
00520c93      }
00520c93      
00520d86      void* eax_14 = *(uint32_t*)esi;
00520d88      void** ebx_1 = *(uint32_t*)eax_14;
00520d8f      *(uint32_t*)esi = ((char*)eax_14 + 4);
00520d8f      
00520d91      if (ebx_1 > 0)
00520d91      {
00520d9e          void* ebp_3 = operator new(0x18);
00520d9e          
00520da5          if (ebp_3 == 0)
00520e1b              ebp_3 = nullptr;
00520da5          else
00520da5          {
00520da9              *(uint32_t*)ebp_3 = 0x7c66b0;
00520db0              *(uint32_t*)((char*)ebp_3 + 0x14) = 0;
00520dbc              *(uint32_t*)((char*)ebp_3 + 0xc) = operator new[](0x10);
00520dc2              *(uint32_t*)((char*)ebp_3 + 0x10) = 4;
00520dc9              *(uint32_t*)((char*)ebp_3 + 8) = 8;
00520dd0              *(uint32_t*)((char*)ebp_3 + 4) = 0;
00520dd7              int32_t eax_18 = 1;
00520df3              int32_t ecx_23;
00520df3              
00520df3              do
00520df3              {
00520de3                  ecx_23 = (*(uint32_t*)((char*)ebp_3 + 4) | eax_18);
00520de5                  eax_18 <<= 1;
00520de9                  *(uint32_t*)((char*)ebp_3 + 4) = ecx_23;
00520df3              } while ((ecx_23 | eax_18) < *(uint32_t*)((char*)ebp_3 + 0x10));
00520df5              int32_t i_3 = 0;
00520df5              
00520e10              do
00520e10              {
00520e03                  *(uint32_t*)(*(uint32_t*)((char*)ebp_3 + 0xc) + (i_3 << 2)) = 0;
00520e0d                  i_3 += 1;
00520e10              } while (i_3 < *(uint32_t*)((char*)ebp_3 + 0x10));
00520e10              
00520e12              *(uint32_t*)ebp_3 = 0x7c7b78;
00520da5          }
00520da5          
00520e1f          this->sorting_sphere.center.y = ebp_3;
00520e1f          
00520e22          if (ebx_1 > 0)
00520e22          {
00520e28              arg2 = ebx_1;
00520ec4              void** i_4;
00520ec4              
00520ec4              do
00520ec4              {
00520e37                  void* ebp_4 = operator new(0x50);
00520e37                  
00520e40                  if (ebp_4 == 0)
00520e71                      ebp_4 = nullptr;
00520e40                  else
00520e40                  {
00520e45                      *(uint32_t*)((char*)ebp_4 + 4) = 0;
00520e48                      *(uint32_t*)((char*)ebp_4 + 8) = 0;
00520e4b                      *(uint32_t*)ebp_4 = 0x7c62f8;
00520e52                      *(uint32_t*)((char*)ebp_4 + 0x10) = 0x3f800000;
00520e58                      *(uint32_t*)((char*)ebp_4 + 0x14) = 0;
00520e5b                      *(uint32_t*)((char*)ebp_4 + 0x18) = 0;
00520e5e                      *(uint32_t*)((char*)ebp_4 + 0x1c) = 0;
00520e61                      *(uint32_t*)((char*)ebp_4 + 0x44) = 0;
00520e64                      *(uint32_t*)((char*)ebp_4 + 0x48) = 0;
00520e67                      *(uint32_t*)((char*)ebp_4 + 0x4c) = 0;
00520e6a                      Frame::cache(((char*)ebp_4 + 0x10));
00520e40                  }
00520e40                  
00520e7b                  *(uint32_t*)((char*)ebp_4 + 8) = **(uint32_t**)esi;
00520e80                  void* ecx_29 = (*(uint32_t*)esi + 4);
00520e83                  *(uint32_t*)esi = ecx_29;
00520e89                  *(uint32_t*)((char*)ebp_4 + 0xc) = *(uint32_t*)ecx_29;
00520e96                  *(uint32_t*)esi += 4;
00520e98                  Frame::UnPack(((char*)ebp_4 + 0x10), esi, arg3);
00520e9d                  float y = this->sorting_sphere.center.y;
00520ea0                  int32_t ebx_2 = *(uint32_t*)((char*)ebp_4 + 8);
00520eaf                  int32_t eax_27 = (((ebx_2 >> ((int8_t)*(uint32_t*)(y + 8))) ^ ebx_2) & *(uint32_t*)(y + 4));
00520eb7                  *(uint32_t*)((char*)ebp_4 + 4) = *(uint32_t*)(*(uint32_t*)(y + 0xc) + (eax_27 << 2));
00520ebd                  *(uint32_t*)(*(uint32_t*)(y + 0xc) + (eax_27 << 2)) = ebp_4;
00520ec0                  i_4 = arg2;
00520ec0                  arg2 -= 1;
00520ec4              } while (i_4 != 1);
00520e22          }
00520d91      }
00520d91      
00520eca      void* eax_28 = *(uint32_t*)esi;
00520ecc      void** ecx_36 = *(uint32_t*)eax_28;
00520ed7      *(uint32_t*)esi = ((char*)eax_28 + 4);
00520ed7      
00520ed9      if (ecx_36 > 0)
00520ed9      {
00520ee6          void* ebp_5 = operator new(0x18);
00520ee6          
00520eef          if (ebp_5 == 0)
00520f4e              ebp_5 = nullptr;
00520eef          else
00520eef          {
00520ef3              *(uint32_t*)ebp_5 = 0x7c66b0;
00520efa              *(uint32_t*)((char*)ebp_5 + 0x14) = 0;
00520f02              *(uint32_t*)((char*)ebp_5 + 0xc) = operator new[](0x10);
00520f08              *(uint32_t*)((char*)ebp_5 + 0x10) = 4;
00520f0f              *(uint32_t*)((char*)ebp_5 + 8) = 8;
00520f16              *(uint32_t*)((char*)ebp_5 + 4) = 0;
00520f19              int32_t eax_32 = 1;
00520f33              int32_t edx_17;
00520f33              
00520f33              do
00520f33              {
00520f23                  edx_17 = (*(uint32_t*)((char*)ebp_5 + 4) | eax_32);
00520f25                  eax_32 <<= 1;
00520f29                  *(uint32_t*)((char*)ebp_5 + 4) = edx_17;
00520f33              } while ((edx_17 | eax_32) < *(uint32_t*)((char*)ebp_5 + 0x10));
00520f35              int32_t i_5 = 0;
00520f35              
00520f43              do
00520f43              {
00520f3a                  *(uint32_t*)(*(uint32_t*)((char*)ebp_5 + 0xc) + (i_5 << 2)) = 0;
00520f40                  i_5 += 1;
00520f43              } while (i_5 < *(uint32_t*)((char*)ebp_5 + 0x10));
00520f43              
00520f45              *(uint32_t*)ebp_5 = 0x7c7b78;
00520eef          }
00520eef          
00520f56          this->sorting_sphere.center.z = ebp_5;
00520f56          
00520f59          if (ecx_36 > 0)
00520f59          {
00520f5f              arg2 = ecx_36;
00520ff3              void** i_6;
00520ff3              
00520ff3              do
00520ff3              {
00520f6a                  void* ebp_6 = operator new(0x50);
00520f6a                  
00520f73                  if (ebp_6 == 0)
00520fa4                      ebp_6 = nullptr;
00520f73                  else
00520f73                  {
00520f78                      *(uint32_t*)((char*)ebp_6 + 4) = 0;
00520f7b                      *(uint32_t*)((char*)ebp_6 + 8) = 0;
00520f7e                      *(uint32_t*)ebp_6 = 0x7c62f8;
00520f85                      *(uint32_t*)((char*)ebp_6 + 0x10) = 0x3f800000;
00520f8b                      *(uint32_t*)((char*)ebp_6 + 0x14) = 0;
00520f8e                      *(uint32_t*)((char*)ebp_6 + 0x18) = 0;
00520f91                      *(uint32_t*)((char*)ebp_6 + 0x1c) = 0;
00520f94                      *(uint32_t*)((char*)ebp_6 + 0x44) = 0;
00520f97                      *(uint32_t*)((char*)ebp_6 + 0x48) = 0;
00520f9a                      *(uint32_t*)((char*)ebp_6 + 0x4c) = 0;
00520f9d                      Frame::cache(((char*)ebp_6 + 0x10));
00520f73                  }
00520f73                  
00520faa                  *(uint32_t*)((char*)ebp_6 + 8) = **(uint32_t**)esi;
00520faf                  void* ecx_43 = (*(uint32_t*)esi + 4);
00520fb2                  *(uint32_t*)esi = ecx_43;
00520fb8                  *(uint32_t*)((char*)ebp_6 + 0xc) = *(uint32_t*)ecx_43;
00520fbb                  *(uint32_t*)esi += 4;
00520fc7                  Frame::UnPack(((char*)ebp_6 + 0x10), esi, arg3);
00520fcc                  float z = this->sorting_sphere.center.z;
00520fcf                  int32_t ebx_3 = *(uint32_t*)((char*)ebp_6 + 8);
00520fde                  int32_t eax_41 = (((ebx_3 >> ((int8_t)*(uint32_t*)(z + 8))) ^ ebx_3) & *(uint32_t*)(z + 4));
00520fe6                  *(uint32_t*)((char*)ebp_6 + 4) = *(uint32_t*)(*(uint32_t*)(z + 0xc) + (eax_41 << 2));
00520fec                  *(uint32_t*)(*(uint32_t*)(z + 0xc) + (eax_41 << 2)) = ebp_6;
00520fef                  i_6 = arg2;
00520fef                  arg2 -= 1;
00520ff3              } while (i_6 != 1);
00520f59          }
00520ed9      }
00520ed9      
00520ff9      void* eax_42 = *(uint32_t*)esi;
00520ffb      void** ecx_49 = *(uint32_t*)eax_42;
00521002      *(uint32_t*)esi = ((char*)eax_42 + 4);
00521002      
00521004      if (ecx_49 > 0)
00521004      {
0052100e          arg2 = ecx_49;
0052108c          void** i_7;
0052108c          
0052108c          do
0052108c          {
00521014              void* eax_44 = operator new(0x1c);
0052101e              void* ebp_7;
0052101e              
0052101e              if (eax_44 == 0)
0052103e                  ebp_7 = nullptr;
0052101e              else
0052101e              {
00521022                  __builtin_memset(((char*)eax_44 + 4), 0, 0x18);
00521028                  *(uint32_t*)eax_44 = 0x7c7b74;
0052103a                  ebp_7 = eax_44;
0052101e              }
0052101e              
00521044              *(uint32_t*)((char*)ebp_7 + 8) = **(uint32_t**)esi;
0052104d              *(uint32_t*)esi += 4;
00521057              AnimFrame::UnPack(((char*)ebp_7 + 0xc), this->m_bLoaded*(int32_t*)((char*)this + 8), esi, arg3);
0052105c              int32_t edx_23 = *(uint32_t*)((char*)ebp_7 + 8);
00521071              int32_t eax_51 = (((edx_23 >> ((int8_t)this->selection_sphere.center.y)) ^ edx_23) & this->selection_sphere.center.x);
0052107c              *(uint32_t*)((char*)ebp_7 + 4) = *(uint32_t*)(this->selection_sphere.center.z + (eax_51 << 2));
00521085              *(uint32_t*)(this->selection_sphere.center.z + (eax_51 << 2)) = ebp_7;
00521088              i_7 = arg2;
00521088              arg2 -= 1;
0052108c          } while (i_7 != 1);
00521004      }
00521004      
00521092      this->m_pNext = **(uint32_t**)esi;
00521095      *(uint32_t*)esi += 4;
00521098      class DBObj* m_pNext = this->m_pNext;
00521098      
0052109d      if (m_pNext > 0)
0052109d      {
005210ab          void* eax_53 = operator new[](((m_pNext * 0x14) + 4));
005210b5          void* eax_54;
005210b5          
005210b5          if (eax_53 == 0)
005210e3              eax_54 = nullptr;
005210b5          else
005210b5          {
005210b7              eax_54 = ((char*)eax_53 + 4);
005210ba              *(uint32_t*)((char*)eax_54 - 4) = m_pNext;
005210c4              void* ebx_5 = eax_54;
005210c4              
005210c6              if (((char*)m_pNext - 1) >= 0)
005210c6              {
005210c8                  class DBObj* ebp_9 = m_pNext;
005210db                  class DBObj* i_8;
005210db                  
005210db                  do
005210db                  {
005210d2                      CCylSphere::CCylSphere(ebx_5);
005210d7                      ebx_5 += 0x14;
005210da                      i_8 = ebp_9;
005210da                      ebp_9 -= 1;
005210db                  } while (i_8 != 1);
005210c6              }
005210b5          }
005210b5          
005210e5          this->m_pLast = eax_54;
005210eb          int32_t i_9 = 0;
005210eb          
005210ef          if (this->m_pNext > 0)
005210ef          {
005210f1              int32_t ebx_6 = 0;
005210f1              
0052110c              do
0052110c              {
005210fe                  CCylSphere::UnPack((this->m_pLast + ebx_6), esi, arg3);
00521106                  i_9 += 1;
00521107                  ebx_6 += 0x14;
0052110c              } while (i_9 < this->m_pNext);
005210ef          }
0052109d      }
0052109d      
00521112      this->m_pMaintainer = **(uint32_t**)esi;
00521115      *(uint32_t*)esi += 4;
00521118      class DBOCache* m_pMaintainer = this->m_pMaintainer;
0052111d      int32_t i_10;
0052111d      
0052111d      if (m_pMaintainer > 0)
0052111d      {
00521128          class DBOCache** eax_61 = operator new[](((m_pMaintainer << 4) + 4));
00521132          void* eax_62;
00521132          
00521132          if (eax_61 == 0)
0052113b              eax_62 = nullptr;
00521132          else
00521132          {
00521134              *(uint32_t*)eax_61 = m_pMaintainer;
00521136              eax_62 = &eax_61[1];
00521132          }
00521132          
0052113d          this->m_numLinks = eax_62;
00521143          i_10 = 0;
0052111d      }
0052111d      
00521147      uint32_t ebx_7;
00521147      
00521147      if ((m_pMaintainer <= 0 || this->m_pMaintainer <= 0))
00521196          ebx_7 = arg3;
00521147      else
00521147      {
00521149          ebx_7 = arg3;
0052114d          int32_t edx_28 = 0;
0052114d          
00521192          do
00521192          {
00521153              int32_t* eax_65 = (this->m_numLinks + edx_28);
00521153              
00521158              if (ebx_7 >= 0xc)
00521158              {
0052115f                  *(uint32_t*)eax_65 = **(uint32_t**)esi;
00521163                  void* ebp_13 = (*(uint32_t*)esi + 4);
00521166                  *(uint32_t*)esi = ebp_13;
0052116b                  eax_65[1] = *(uint32_t*)ebp_13;
00521170                  void* ebp_16 = (*(uint32_t*)esi + 4);
00521173                  *(uint32_t*)esi = ebp_16;
00521178                  eax_65[2] = *(uint32_t*)ebp_16;
0052117b                  *(uint32_t*)esi += 4;
00521158              }
00521158              
00521183              eax_65[3] = **(uint32_t**)esi;
00521186              *(uint32_t*)esi += 4;
0052118c              i_10 += 1;
0052118d              edx_28 += 0x10;
00521192          } while (i_10 < this->m_pMaintainer);
00521147      }
00521147      
0052119e      this->vtable = **(uint32_t**)esi;
005211a3      void* ecx_63 = (*(uint32_t*)esi + 4);
005211a6      *(uint32_t*)esi = ecx_63;
005211ac      *(int32_t*)((char*)this + 0x34) = *(uint32_t*)ecx_63;
005211b1      void* eax_70 = (*(uint32_t*)esi + 4);
005211b4      *(uint32_t*)esi = eax_70;
005211b8      this->parts = *(uint32_t*)eax_70;
005211bd      void* ebp_21 = (*(uint32_t*)esi + 4);
005211c0      *(uint32_t*)esi = ebp_21;
005211c6      this->num_parts = *(uint32_t*)ebp_21;
005211cb      void* edx_32 = (*(uint32_t*)esi + 4);
005211d1      *(uint32_t*)esi = edx_32;
005211d3      void* eax_72 = edx_32;
005211d3      
005211d5      if (ebx_7 >= 0xc)
005211d5      {
005211d9          this->parent_index = *(uint32_t*)eax_72;
005211de          void* edx_34 = (*(uint32_t*)esi + 4);
005211e1          *(uint32_t*)esi = edx_34;
005211e7          this->default_scale = *(uint32_t*)edx_34;
005211ec          void* ecx_67 = (*(uint32_t*)esi + 4);
005211ef          *(uint32_t*)esi = ecx_67;
005211f5          this->num_cylsphere = *(uint32_t*)ecx_67;
005211fa          eax_72 = (*(uint32_t*)esi + 4);
005211fd          *(uint32_t*)esi = eax_72;
005211d5      }
005211d5      
00521201      this->cylsphere = *(uint32_t*)eax_72;
00521206      void* edx_37 = (*(uint32_t*)esi + 4);
0052120c      *(uint32_t*)esi = edx_37;
0052120e      void* eax_78 = edx_37;
0052120e      
00521210      if (ebx_7 >= 0xc)
00521210      {
00521214          this->num_sphere = *(uint32_t*)eax_78;
00521219          void* edx_39 = (*(uint32_t*)esi + 4);
0052121c          *(uint32_t*)esi = edx_39;
00521222          this->sphere = *(uint32_t*)edx_39;
00521227          void* ecx_70 = (*(uint32_t*)esi + 4);
0052122a          *(uint32_t*)esi = ecx_70;
00521230          this->has_physics_bsp = *(uint32_t*)ecx_70;
00521235          eax_78 = (*(uint32_t*)esi + 4);
00521238          *(uint32_t*)esi = eax_78;
00521210      }
00521210      
0052123c      this->allow_free_heading = *(uint32_t*)eax_78;
00521241      void* edx_42 = (*(uint32_t*)esi + 4);
00521244      *(uint32_t*)esi = edx_42;
0052124a      this->height = *(uint32_t*)edx_42;
0052124d      *(uint32_t*)esi += 4;
00521250      float height_1 = this->height;
00521250      
00521255      if (height_1 > 0)
00521255      {
00521264          void* eax_87;
00521264          float height;
00521264          eax_87 = operator new[](((height_1 * 0x68) + 4));
0052126e          void** eax_93;
0052126e          
0052126e          if (eax_87 == 0)
005212c6              eax_93 = nullptr;
0052126e          else
0052126e          {
00521270              *(uint32_t*)eax_87 = height_1;
00521270              
0052127e              if ((height_1 - 1) >= 0)
0052127e              {
00521284                  void* ebp_23 = ((char*)eax_87 + 0x44);
00521288                  arg3 = height_1;
005212be                  bool cond:10_1;
005212be                  
005212be                  do
005212be                  {
00521292                      height = ((char*)ebp_23 - 0x3c);
00521295                      *(uint32_t*)height = 0x3f800000;
0052129b                      *(uint32_t*)((char*)ebp_23 - 0x38) = 0;
0052129e                      *(uint32_t*)((char*)ebp_23 - 0x34) = 0;
005212a1                      *(uint32_t*)((char*)ebp_23 - 0x30) = 0;
005212a4                      *(uint32_t*)((char*)ebp_23 - 8) = 0;
005212a7                      *(uint32_t*)((char*)ebp_23 - 4) = 0;
005212aa                      *(uint32_t*)ebp_23 = 0;
005212ad                      Frame::cache(height);
005212b6                      ebp_23 += 0x68;
005212b9                      cond:10_1 = arg3 != 1;
005212ba                      arg3 -= 1;
005212be                  } while (cond:10_1);
0052127e              }
0052127e              
005212c0              eax_93 = ((char*)eax_87 + 4);
0052126e          }
0052126e          
005212c8          this->radius = eax_93;
005212d0          arg2 = nullptr;
005212d0          
005212d8          if (this->height > 0)
005212d8          {
005212de              arg3 = 0;
00521364              bool cond:12_1;
00521364              
00521364              do
00521364              {
005212f3                  int32_t* ebp_25 = (this->radius + arg3);
005212f7                  FileNodeName_Float::GetType(height);
005212f7                  
00521301                  if (ebx_7 >= 0x30)
00521301                  {
00521307                      *(uint32_t*)ebp_25 = **(uint32_t**)esi;
00521310                      *(uint32_t*)esi += 4;
00521316                      Frame::UnPack(&ebp_25[1], esi, ebx_7);
00521320                      RGBColor::UnPack(&ebp_25[0x14], esi, ebx_7);
00521329                      ebp_25[0x17] = **(uint32_t**)esi;
0052132e                      void* edx_46 = (*(uint32_t*)esi + 4);
00521331                      *(uint32_t*)esi = edx_46;
00521337                      ebp_25[0x18] = *(uint32_t*)edx_46;
0052133c                      void* ecx_79 = (*(uint32_t*)esi + 4);
0052133f                      *(uint32_t*)esi = ecx_79;
00521345                      ebp_25[0x19] = *(uint32_t*)ecx_79;
00521348                      *(uint32_t*)esi += 4;
00521301                  }
00521301                  
00521353                  height = this->height;
0052135a                  cond:12_1 = ((char*)arg2 + 1) < height;
0052135c                  arg2 += 1;
00521360                  arg3 += 0x68;
00521364              } while (cond:12_1);
005212d8          }
00521255      }
00521255      
00521366      void* eax_101 = *(uint32_t*)esi;
00521368      class LIGHTINFO* ecx_80 = *(uint32_t*)eax_101;
0052136d      *(uint32_t*)esi = ((char*)eax_101 + 4);
0052136f      this->lights = ecx_80;
00521375      void* eax_103 = *(uint32_t*)esi;
00521377      int32_t ecx_81 = *(uint32_t*)eax_103;
0052137c      *(uint32_t*)esi = ((char*)eax_103 + 4);
0052137e      this->anim_scale.x = ecx_81;
00521384      void* eax_105 = *(uint32_t*)esi;
00521386      float ecx_82 = *(uint32_t*)eax_105;
0052138b      *(uint32_t*)esi = ((char*)eax_105 + 4);
0052138d      this->anim_scale.y = ecx_82;
00521393      void* eax_107 = *(uint32_t*)esi;
00521395      float ecx_83 = *(uint32_t*)eax_107;
0052139a      *(uint32_t*)esi = ((char*)eax_107 + 4);
0052139c      this->anim_scale.z = ecx_83;
005213a2      void* eax_109 = *(uint32_t*)esi;
005213a4      class LongHash<LocationType>* ecx_84 = *(uint32_t*)eax_109;
005213a9      *(uint32_t*)esi = ((char*)eax_109 + 4);
005213ab      this->holding_locations = ecx_84;
005213b3      void* eax_112 = (*(uint32_t*)esi & 0x80000003);
005213b3      bool cond:7 = eax_112 == 0;
005213b3      
005213b8      if (eax_112 < 0)
005213b8      {
005213bb          void* eax_114 = (((char*)eax_112 - 1) | 0xfffffffc);
005213be          eax_112 = ((char*)eax_114 + 1);
005213be          cond:7 = eax_114 == 0xffffffff;
005213b8      }
005213b8      
005213bf      if (!(cond:7))
005213bf      {
005213c6          void* i_12 = (4 - eax_112);
005213c6          
005213c8          if (4 != eax_112)
005213c8          {
005213db              void* i_11;
005213db              
005213db              do
005213db              {
005213d2                  **(uint8_t**)esi = 0;
005213d8                  i_11 = i_12;
005213d8                  i_12 -= 1;
005213d9                  *(uint32_t*)esi += 1;
005213db              } while (i_11 != 1);
005213c8          }
005213bf      }
005213bf      
005213e6      return 1;
00520c50  }

00520df9                                                                             8d a4 24 00 00 00 00                           ..$....
005212e8                          8d a4 24 00 00 00 00 90                                                          ..$.....
005213e9                             90 90 90 90 90 90 90                                                           .......

005213f0  class LocationType const* __thiscall CSetup::GetHoldingLocation(class CSetup const* this, uint32_t arg2)

005213f0  {
005213f0      class LongHash<LocationType>* holding_locations = this->holding_locations;
005213f0      
005213f8      if (holding_locations != 0)
005213f8      {
00521416          for (void* const i = holding_locations->buckets[(((arg2 >> ((int8_t)holding_locations->key_shift)) ^ arg2) & holding_locations->table_mask)]; i != 0; i = *(uint32_t*)((char*)i + 4))
00521416          {
0052141b              if (arg2 == *(uint32_t*)((char*)i + 8))
00521426                  return i;
00521416          }
005213f8      }
005213f8      
00521424      return nullptr;
005213f0  }

00521429                             90 90 90 90 90 90 90                                                           .......

00521430  class DBObj* CSetup::Allocate(class CSetup const* this @ ecx)

00521430  {
00521430      /* tailcall */
00521430      return CSetup::Allocator();
00521430  }

00521435                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00521440  void __fastcall CSetup::Destroy(class CSetup* this)

00521440  {
00521440      class CSetup* this_1 = this;
00521445      class AC1Legacy::Vector3* default_scale = this->default_scale;
00521445      
0052144c      if (default_scale != 0)
0052144c      {
0052144f          operator delete[](default_scale);
00521457          this->default_scale = nullptr;
0052144c      }
0052144c      
0052145a      uint32_t* parent_index = this->parent_index;
0052145a      
0052145f      if (parent_index != 0)
0052145f      {
00521462          operator delete[](parent_index);
0052146a          this->parent_index = nullptr;
0052145f      }
0052145f      
0052146d      class IDClass<_tagDataID,32,0>* parts = this->parts;
0052146d      
00521472      if (parts != 0)
00521472      {
00521478          operator delete[](&parts[-1]);
00521480          this->parts = nullptr;
00521472      }
00521472      
00521483      class CCylSphere* cylsphere = this->cylsphere;
00521488      this->num_parts = 0;
00521488      
0052148b      if (cylsphere != 0)
0052148b      {
0052148d          int32_t i_2 = *(uint32_t*)((char*)cylsphere->low_pt + -4);
0052149c          void* edi_2 = &cylsphere[i_2];
0052149c          
0052149f          if ((i_2 - 1) >= 0)
0052149f          {
005214a2              int32_t i_1 = i_2;
005214b0              int32_t i;
005214b0              
005214b0              do
005214b0              {
005214a5                  edi_2 -= 0x14;
005214aa                  IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(edi_2);
005214af                  i = i_1;
005214af                  i_1 -= 1;
005214b0              } while (i != 1);
0052149f          }
0052149f          
005214b8          operator delete[](((char*)cylsphere - 4));
005214c0          this->cylsphere = nullptr;
0052148b      }
0052148b      
005214c4      class CSphere* sphere = this->sphere;
005214c9      this->num_cylsphere = 0;
005214c9      
005214cc      if (sphere != 0)
005214cc      {
005214d2          operator delete[](((char*)sphere - 4));
005214da          this->sphere = nullptr;
005214cc      }
005214cc      
005214dd      class LIGHTINFO* lights = this->lights;
005214e5      this->num_sphere = 0;
005214e5      
005214e8      if (lights != 0)
005214e8      {
005214ee          operator delete[](((char*)lights - 4));
005214f6          this->lights = nullptr;
005214e8      }
005214e8      
005214fc      class LongHash<LocationType>* holding_locations = this->holding_locations;
00521504      this->num_lights = 0;
00521504      
0052150a      if (holding_locations != 0)
0052150a      {
0052150c          LongNIValHash<LongHash<MotionData> *>::destroy_contents(holding_locations);
00521511          class LongHash<LocationType>* holding_locations_1 = this->holding_locations;
00521511          
00521519          if (holding_locations_1 != 0)
0052151b              holding_locations_1->vtable->__vecDelDtor(1);
0052151b          
00521521          this->holding_locations = nullptr;
0052150a      }
0052150a      
00521527      class LongHash<LocationType>* connection_points = this->connection_points;
00521527      
0052152f      if (connection_points != 0)
0052152f      {
00521531          LongNIValHash<LongHash<MotionData> *>::destroy_contents(connection_points);
00521536          class LongHash<LocationType>* connection_points_1 = this->connection_points;
00521536          
0052153e          if (connection_points_1 != 0)
00521540              connection_points_1->vtable->__vecDelDtor(1);
00521540          
00521546          this->connection_points = nullptr;
0052152f      }
0052152f      
00521552      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->placement_frames);
0052155c      this->default_anim_id.id = INVALID_DID.id;
00521568      this->default_script_id.id = INVALID_DID.id;
00521574      this->default_mtable_id.id = INVALID_DID.id;
0052157f      this->default_stable_id.id = INVALID_DID.id;
0052158b      this->default_phstable_id.id = INVALID_DID.id;
00521440  }

00521595                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005215a0  void* __thiscall CSetup::`scalar deleting destructor'(class CSetup* this, uint32_t arg2)

005215a0  {
005215a3      this->vtable = 0x7c7b90;
005215a9      this->vtable = &CSetup::`vftable';
005215b0      CSetup::Destroy(this);
005215bd      this->placement_frames.vtable = 0x7c66b0;
005215bd      
005215c7      if (this->placement_frames.fPlacementNew_ == 0)
005215d0          operator delete[](this->placement_frames.buckets);
005215d0      
005215da      this->vtable = &PackObj::`vftable';
005215e1      DBObj::~DBObj(this);
005215e1      
005215eb      if ((arg2 & 1) != 0)
005215ee          operator delete(this);
005215ee      
005215f9      return this;
005215a0  }

005215fc                                                                                      90 90 90 90                              ....

00521600  int32_t PhysicsScriptData::Sort(void const* arg1, void const* arg2)

00521600  {
0052160e      (((long double)**(uint64_t**)arg1) - ((long double)**(uint64_t**)arg2));
00521612      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00521612      
0052161a      if (!(p))
00521621          return 0xffffffff;
00521621      
0052161c      return 1;
00521600  }

00521622        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00521630  int32_t __thiscall OldSmartArray<PhysicsScriptData *>::Grow(class OldSmartArray<PhysicsScriptData *>* this, int32_t arg2)

00521630  {
00521641      void* result = operator new[]((arg2 << 2));
00521641      
0052164d      if (result == 0)
00521652          return result;
00521652      
00521658      if (this->data != 0)
00521658      {
0052165d          int32_t i = 0;
0052165d          
00521661          if (this->num_in_array > 0)
00521661          {
00521671              do
00521671              {
00521668                  *(uint32_t*)((char*)result + (i << 2)) = this->data[i];
0052166e                  i += 1;
00521671              } while (i < this->num_in_array);
00521661          }
00521661          
00521676          operator delete[](this->data);
00521658      }
00521658      
0052167e      this->data = result;
00521681      this->mem_size = arg2;
0052168b      return 1;
00521630  }

0052168e                                            90 90                                                                ..

00521690  void __fastcall PhysicsScript::PhysicsScript(class PhysicsScript* this)

00521690  {
00521699      DBObj::DBObj(this, INVALID_DID.id);
0052169e      this->vtable = &PackObj::`vftable';
005216a7      this->vtable = 0x7c7c00;
005216ad      this->vtable = &PhysicsScript::`vftable';
005216b4      this->script_data.data = 0;
005216b7      this->script_data.mem_size = 0;
005216ba      this->script_data.num_in_array = 0;
005216bd      this->script_data.grow_size = 2;
005216c4      this->length = 0f;
005216c7      *(uint32_t*)((char*)this->length)[4] = 0;
00521690  }

005216ce                                            90 90                                                                ..

005216d0  uint32_t PhysicsScript::GetDBOType(class PhysicsScript const* this @ ecx) __pure

005216d0  {
005216d5      return 0x2b;
005216d0  }

005216d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005216e0  void* __thiscall PhysicsScript::`vector deleting destructor'(class PhysicsScript* this, uint32_t arg2)

005216e0  {
005216e3      /* tailcall */
005216e3      return PhysicsScript::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005216e0  }

005216e8                          cc cc cc cc cc cc cc cc                                                          ........

005216f0  void __fastcall PhysicsScript::Destroy(class PhysicsScript* this)

005216f0  {
005216fb      if (this->script_data.num_in_array > 0)
005216fb      {
005216fe          int32_t i = 0;
005216fe          
00521730          do
00521730          {
00521703              void* ebx_1 = this->script_data.data[i];
00521703              
00521708              if (ebx_1 != 0)
00521708              {
0052170a                  int32_t* ecx = *(uint32_t*)((char*)ebx_1 + 8);
0052170a                  
0052170f                  if (ecx != 0)
00521715                      **(uint32_t**)ecx(1);
00521715                  
00521718                  operator delete(ebx_1);
00521708              }
00521708              
00521720              this->script_data.data[i] = 0;
0052172d              i += 1;
00521730          } while (i < this->script_data.num_in_array);
005216fb      }
005216fb      
00521737      this->script_data.mem_size = 0;
0052173e      this->script_data.num_in_array = 0;
00521745      operator delete[](this->script_data.data);
0052174e      this->script_data.data = 0;
005216f0  }

00521757                                                                       90 90 90 90 90 90 90 90 90                         .........

00521760  void __thiscall PhysicsScript::GetSubDataIDs(class PhysicsScript const* this, class QualifiedDataIDArray* arg2)

00521760  {
00521767      int32_t i = 0;
00521767      
0052176b      if (this->script_data.num_in_array > 0)
0052176b      {
00521787          do
00521787          {
00521772              this->script_data.data[i]->hook->vtable->GetSubDataIDs(arg2);
00521784              i += 1;
00521787          } while (i < this->script_data.num_in_array);
0052176b      }
00521760  }

0052178f                                               90                                                                 .

00521790  uint32_t __fastcall PhysicsScript::pack_size(class PhysicsScript* this)

00521790  {
00521798      int32_t i = 0;
0052179c      int32_t result = 4;
0052179c      
005217a1      if (this->script_data.num_in_array > 0)
005217a1      {
005217bf          do
005217bf          {
005217b5              result = ((result + CAnimHook::PackSize(this->script_data.data[i]->hook)) + 8);
005217bc              i += 1;
005217bf          } while (i < this->script_data.num_in_array);
005217a1      }
005217a1      
005217c3      int32_t ecx_2 = (result & 3);
005217c3      
005217c6      if (ecx_2 == 0)
005217dc          return result;
005217dc      
005217d4      return ((4 - ecx_2) + result);
00521790  }

005217dd                                                                                         90 90 90                               ...

005217e0  uint32_t __thiscall PhysicsScript::Pack(class PhysicsScript* this, void** arg2, uint32_t arg3)

005217e0  {
005217e0      class PhysicsScript* this_1 = this;
005217e7      uint32_t result = PhysicsScript::pack_size(((char*)this - 0x30));
005217e7      
005217f4      if (arg3 >= result)
005217f4      {
00521805          **(uint32_t**)arg2 = *(uint32_t*)((char*)this->m_timeStamp)[4];
00521807          *(uint32_t*)arg2 += 4;
0052180d          int32_t i = 0;
0052180d          
00521812          if (*(uint32_t*)((char*)this->m_timeStamp)[4] > 0)
00521812          {
0052185a              do
0052185a              {
00521817                  int32_t* edi_1 = *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + (i << 2));
00521817                  
00521831                  if (arg3 >= (CAnimHook::PackSize(edi_1[2]) + 8))
00521831                  {
00521835                      void* ecx_4 = *(uint32_t*)arg2;
00521837                      *(uint32_t*)ecx_4 = *(uint32_t*)edi_1;
0052183c                      *(uint32_t*)((char*)ecx_4 + 4) = edi_1[1];
00521845                      *(uint32_t*)arg2 += 8;
0052184c                      CAnimHook::PackHook(edi_1[2], arg2, arg3);
00521831                  }
00521831                  
00521857                  i += 1;
0052185a              } while (i < *(uint32_t*)((char*)this->m_timeStamp)[4]);
00521812          }
00521812          
00521862          void* edx_9 = (*(uint32_t*)arg2 & 0x80000003);
00521862          bool cond:2_1 = edx_9 == 0;
00521862          
00521868          if (edx_9 < 0)
00521868          {
0052186b              void* edx_11 = (((char*)edx_9 - 1) | 0xfffffffc);
0052186e              edx_9 = ((char*)edx_11 + 1);
0052186e              cond:2_1 = edx_11 == 0xffffffff;
00521868          }
00521868          
0052186f          if (!(cond:2_1))
0052186f          {
00521876              void* i_2 = (4 - edx_9);
00521876              
00521878              if (4 != edx_9)
00521878              {
0052188b                  void* i_1;
0052188b                  
0052188b                  do
0052188b                  {
00521882                      **(uint8_t**)arg2 = 0;
00521888                      i_1 = i_2;
00521888                      i_2 -= 1;
00521889                      *(uint32_t*)arg2 += 1;
0052188b                  } while (i_1 != 1);
00521878              }
0052186f          }
005217f4      }
005217f4      
00521892      return result;
005217e0  }

00521895                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005218a0  class DBObj* PhysicsScript::Allocate(class PhysicsScript const* this @ ecx)

005218a0  {
005218a0      /* tailcall */
005218a0      return PhysicsScript::Allocator();
005218a0  }

005218a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005218b0  int32_t __thiscall PhysicsScript::UnPack(class PhysicsScript* this, void** arg2, uint32_t arg3)

005218b0  {
005218c1      void* __offset(PhysicsScript, -0x30) ebx = ((char*)this - 0x30);
005218ca      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
005218d0      void* eax_1 = *(uint32_t*)arg2;
005218d2      int32_t i_4 = *(uint32_t*)eax_1;
005218e1      *(uint32_t*)arg2 = ((char*)eax_1 + 4);
005218e3      OldSmartArray<PhysicsScriptData *>::Grow(&this->m_bLoaded, i_4);
005218e3      
005218ee      if (i_4 > 0)
005218ee      {
005218f0          int32_t i_2 = i_4;
0052195b          int32_t i;
0052195b          
0052195b          do
0052195b          {
005218f6              void* eax_4 = operator new(0x10);
005218fb              void* ebx_1 = nullptr;
005218fb              
00521902              if (eax_4 != 0)
00521902              {
00521904                  *(uint32_t*)eax_4 = 0;
00521906                  *(uint32_t*)((char*)eax_4 + 4) = 0;
00521909                  *(uint32_t*)((char*)eax_4 + 8) = 0;
0052190c                  ebx_1 = eax_4;
00521902              }
00521902              
0052190e              void* ecx_2 = *(uint32_t*)arg2;
00521912              *(uint32_t*)ebx_1 = *(uint32_t*)ecx_2;
0052191a              *(uint32_t*)((char*)ebx_1 + 4) = *(uint32_t*)((char*)ecx_2 + 4);
00521924              *(uint32_t*)arg2 += 8;
0052192b              *(uint32_t*)((char*)ebx_1 + 8) = CAnimHook::UnPackHook(arg2, arg3);
0052192e              int32_t eax_9 = *(uint32_t*)((char*)this->m_timeStamp)[4];
00521939              int32_t eax_10;
00521939              
00521939              if (eax_9 >= this->m_timeStamp)
00521943                  eax_10 = OldSmartArray<PhysicsScriptData *>::Grow(&this->m_bLoaded, (*(int32_t*)((char*)this + 0xc) + eax_9));
00521943              
0052194a              if ((eax_9 < this->m_timeStamp || eax_10 != 0))
0052194a              {
00521951                  *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + (*(uint32_t*)((char*)this->m_timeStamp)[4] << 2)) = ebx_1;
00521954                  *(uint32_t*)((char*)this->m_timeStamp)[4] += 1;
0052194a              }
0052194a              
00521957              i = i_2;
00521957              i_2 -= 1;
0052195b          } while (i != 1);
005218ee      }
005218ee      
00521963      void* eax_13 = (*(uint32_t*)arg2 & 0x80000003);
00521963      bool cond:0 = eax_13 == 0;
00521963      
00521968      if (eax_13 < 0)
00521968      {
0052196b          void* eax_15 = (((char*)eax_13 - 1) | 0xfffffffc);
0052196e          eax_13 = ((char*)eax_15 + 1);
0052196e          cond:0 = eax_15 == 0xffffffff;
00521968      }
00521968      
0052196f      if (!(cond:0))
0052196f      {
00521976          void* i_3 = (4 - eax_13);
00521976          
00521978          if (4 != eax_13)
00521978          {
0052198b              void* i_1;
0052198b              
0052198b              do
0052198b              {
00521982                  **(uint8_t**)arg2 = 0;
00521988                  i_1 = i_3;
00521988                  i_3 -= 1;
00521989                  *(uint32_t*)arg2 += 1;
0052198b              } while (i_1 != 1);
00521978          }
0052196f      }
0052196f      
0052198d      int32_t eax_16 = *(uint32_t*)((char*)ADJ(ebx)->m_timeStamp)[4];
0052198d      
00521992      if (eax_16 > 0)
00521992      {
005219a0          qsort(ADJ(ebx)->m_bLoaded*(int32_t*)((char*)ADJ(ebx) + 8), eax_16, 4, PhysicsScriptData::Sort);
005219ac          int32_t* ecx_8 = *(uint32_t*)((ADJ(ebx)->m_bLoaded*(int32_t*)((char*)ADJ(ebx) + 8) + (*(uint32_t*)((char*)ADJ(ebx)->m_timeStamp)[4] << 2)) - 4);
0052195d          ADJ(ebx)->m_pNext = *(uint32_t*)ecx_8;
0052195d          ADJ(ebx)->m_pLast = ecx_8[1];
00521992      }
00521992      
005219c9      return 1;
005218b0  }

005219cc                                      90 90 90 90                                                              ....

005219d0  void* __thiscall PhysicsScript::`scalar deleting destructor'(class PhysicsScript* this, uint32_t arg2)

005219d0  {
005219d3      this->vtable = 0x7c7c00;
005219d9      this->vtable = &PhysicsScript::`vftable';
005219e0      PhysicsScript::Destroy(this);
005219e9      operator delete[](this->script_data.data);
005219f3      this->vtable = &PackObj::`vftable';
005219fa      DBObj::~DBObj(this);
005219fa      
00521a04      if ((arg2 & 1) != 0)
00521a07          operator delete(this);
00521a07      
00521a12      return this;
005219d0  }

00521a15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00521a20  class IDClass<_tagDataID,32,0>* __thiscall PhysicsScriptTableData::GetScript(class PhysicsScriptTableData const* this, class IDClass<_tagDataID,32,0>* __return, float arg3)

00521a20  {
00521a21      uint32_t m_num = this->script_array.m_num;
00521a24      int32_t edx = 0;
00521a24      
00521a2f      if (m_num > 0)
00521a2f      {
00521a31          class ScriptAndModData* m_data = this->script_array.m_data;
00521a31          
00521a46          do
00521a46          {
00521a33              long double x87_r7_1 = ((long double)arg3);
00521a37              long double temp1_1 = ((long double)m_data->mod);
00521a37              (x87_r7_1 - temp1_1);
00521a39              int32_t eax;
00521a39              eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00521a3b              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00521a3b              
00521a3e              if (!(p_1))
00521a3e              {
00521a56                  uint32_t* __return_2 = __return;
00521a5b                  *(uint32_t*)__return_2 = m_data->script_id.id;
00521a5e                  return __return_2;
00521a3e              }
00521a3e              
00521a40              edx += 1;
00521a41              m_data = &m_data[1];
00521a46          } while (edx < m_num);
00521a2f      }
00521a2f      
00521a48      uint32_t* __return_1 = __return;
00521a4c      *(uint32_t*)__return_1 = INVALID_DID.id;
00521a50      return __return_1;
00521a20  }

00521a61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00521a70  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PhysicsScriptTableData *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PhysicsScriptTableData *> *,0>* this, uint32_t arg2)

00521a70  {
00521a73      class HashTableData<unsigned long,PhysicsScriptTableData *>** m_buckets = this->m_buckets;
00521a7b      this->vtable = 0x7c7c58;
00521a7b      
00521a81      if (m_buckets != &this->m_aInplaceBuckets)
00521a84          operator delete[](m_buckets);
00521a84      
00521a8e      this->m_buckets = nullptr;
00521a91      this->m_firstInterestingBucket = nullptr;
00521a94      this->m_numBuckets = 0;
00521a97      this->m_numElements = 0;
00521a97      
00521a9f      if ((arg2 & 1) != 0)
00521aa2          operator delete(this);
00521aa2      
00521aad      return this;
00521a70  }


00521ab0  uint32_t __thiscall PhysicsScriptTableData::Pack(class PhysicsScriptTableData* this, void** arg2, uint32_t arg3)

00521ab0  {
00521ab0      class PhysicsScriptTableData* this_1 = this;
00521ab3      uint32_t m_num = this->script_array.m_num;
00521ab8      void* result = 4;
00521abd      void* result_1 = 4;
00521abd      
00521ac1      if (m_num > 0)
00521ac1      {
00521ac3          result = ((m_num << 3) + 4);
00521aca          result_1 = result;
00521ac1      }
00521ac1      
00521ad4      if (arg3 >= result)
00521ad4      {
00521ad6          uint32_t** edx_1 = arg2;
00521ade          **(uint32_t**)edx_1 = m_num;
00521ae2          uint32_t* edi_3 = &*(uint32_t*)edx_1[1];
00521ae5          *(uint32_t*)edx_1 = edi_3;
00521aea          int32_t i = 0;
00521aea          
00521aee          if (this->script_array.m_num > 0)
00521aee          {
00521b1d              do
00521b1d              {
00521af5                  void* esi_2 = &this->script_array.m_data[i];
00521af5                  
00521af8                  if (arg3 >= 8)
00521af8                  {
00521afc                      *(uint32_t*)edi_3 = *(uint32_t*)esi_2;
00521b00                      void* edi_5 = &*(uint32_t*)edx_1[1];
00521b03                      *(uint32_t*)edx_1 = edi_5;
00521b08                      *(uint32_t*)edi_5 = *(uint32_t*)((char*)esi_2 + 4);
00521b0c                      uint32_t* eax_3 = &*(uint32_t*)edx_1[1];
00521b0f                      *(uint32_t*)edx_1 = eax_3;
00521b11                      edi_3 = eax_3;
00521b13                      result = result_1;
00521af8                  }
00521af8                  
00521b1a                  i += 1;
00521b1d              } while (i < this->script_array.m_num);
00521aee          }
00521ad4      }
00521ad4      
00521b24      return result;
00521ab0  }

00521b27                       90 90 90 90 90 90 90 90 90                                                         .........

00521b30  void __thiscall PhysicsScriptTableData::GetSubDataIDs(class PhysicsScriptTableData const* this, class QualifiedDataIDArray* arg2)

00521b30  {
00521b3a      int32_t i = 0;
00521b3a      
00521b3e      if (this->script_array.m_num > 0)
00521b3e      {
00521b67          do
00521b67          {
00521b5c              void var_8;
00521b5c              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->script_array.m_data[i].script_id.id, 0), 8);
00521b64              i += 1;
00521b67          } while (i < this->script_array.m_num);
00521b3e      }
00521b30  }

00521b72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00521b80  int32_t __thiscall AC1Legacy::SmartArray<ScriptAndModData>::grow(class AC1Legacy::SmartArray<ScriptAndModData>* this, uint32_t arg2)

00521b80  {
00521b8c      if (arg2 >= this->m_num)
00521b8c      {
00521b95          if (arg2 <= this->m_size)
00521c1b              return 1;
00521c1b          
00521b99          if (arg2 == 0)
00521b99          {
00521b9b              AC1Legacy::SmartArray<CelestialPosition>::Reset(this);
00521ba8              return 1;
00521b99          }
00521b99          
00521bb3          void* eax_3 = operator new[](((arg2 << 3) + 4));
00521bb3          
00521bbd          if (eax_3 != 0)
00521bbd          {
00521bcb              *(uint32_t*)eax_3 = arg2;
00521bcd              `vector constructor iterator'(((char*)eax_3 + 4), 8, arg2, Vector3::Vector3);
00521bcd              
00521bd4              if (eax_3 != 0xfffffffc)
00521bd4              {
00521bd9                  if (this->m_data != 0)
00521bd9                  {
00521bde                      int32_t i = 0;
00521bde                      
00521be2                      if (this->m_num > 0)
00521be2                      {
00521bfa                          do
00521bfa                          {
00521be4                              class ScriptAndModData* m_data_1 = this->m_data;
00521be9                              *(uint32_t*)(((char*)eax_3 + 4) + (i << 3)) = m_data_1[i].mod;
00521bf0                              *(uint32_t*)((((char*)eax_3 + 4) + (i << 3)) + 4) = m_data_1[i].script_id.id;
00521bf7                              i += 1;
00521bfa                          } while (i < this->m_num);
00521be2                      }
00521be2                      
00521bfc                      class ScriptAndModData* m_data = this->m_data;
00521bfc                      
00521c00                      if (m_data != 0)
00521c06                          operator delete[](((char*)m_data - 4));
00521bd9                  }
00521bd9                  
00521c0e                  this->m_data = ((char*)eax_3 + 4);
00521c10                  this->m_size = arg2;
00521c1b                  return 1;
00521bd4              }
00521bbd          }
00521b8c      }
00521b8c      
00521c23      return 0;
00521b80  }

00521c26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00521c30  uint32_t __thiscall PhysicsScriptTable::pack_size(class PhysicsScriptTable* this, int32_t* arg2)

00521c30  {
00521c43      void* result = 4;
00521c48      *(uint32_t*)arg2 = 0;
00521c4e      void __return;
00521c4e      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->script_table.m_intrusiveTable.vtable, &__return);
00521c53      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00521c55      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00521c58      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
00521c58      
00521c5d      if (i_1 != 0)
00521c5d      {
00521c60          while (true)
00521c60          {
00521c60              *(uint32_t*)arg2 += 1;
00521c65              struct IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::VTable* vtable = i_1->m_data->m_ObjTable.m_intrusiveTable.vtable;
00521c6a              void* esi_1 = 4;
00521c6a              
00521c6f              if (vtable > 0)
00521c71                  esi_1 = ((vtable << 3) + 4);
00521c71              
00521c78              i_1 = i_1->m_hashNext;
00521c7d              result = (((char*)result + esi_1) + 4);
00521c7d              
00521c81              if (i_1 == 0)
00521c81              {
00521c9b                  class HashTableData<unsigned long,DBOCache *>* i;
00521c9b                  
00521c9b                  do
00521c9b                  {
00521c90                      m_currBucket = &m_currBucket[1];
00521c90                      
00521c95                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00521cac                          return result;
00521cac                      
00521c97                      i = *(uint32_t*)m_currBucket;
00521c9b                  } while (i == 0);
00521c9b                  
00521c9d                  i_1 = i;
00521c9d                  
00521ca1                  if (i_1 == 0)
00521ca1                      break;
00521c81              }
00521c60          }
00521c5d      }
00521c5d      
00521cac      return result;
00521c30  }

00521caf                                               90                                                                 .

00521cb0  uint32_t __thiscall PhysicsScriptTable::Pack(class PhysicsScriptTable* this, void** arg2, uint32_t arg3)

00521cb0  {
00521cbe      int32_t var_14 = 0;
00521cc6      uint32_t result = PhysicsScriptTable::pack_size(((char*)this - 0x30), &var_14);
00521cc6      
00521cd3      if (arg3 < result)
00521d4e          return result;
00521d4e      
00521ce2      **(uint32_t**)arg2 = var_14;
00521cf1      *(uint32_t*)arg2 += 4;
00521cf3      void __return;
00521cf3      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&*(int32_t*)((char*)this + 0xc), &__return);
00521cf8      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
00521cfd      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00521cff      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00521cff      
00521d02      if (i_1 != 0)
00521d02      {
00521d08          while (true)
00521d08          {
00521d08              class DBOCache* m_data = i_1->m_data;
00521d0b              **(uint32_t**)arg2 = i_1->m_hashKey;
00521d0d              *(uint32_t*)arg2 += 4;
00521d16              PhysicsScriptTableData::Pack(m_data, arg2, arg3);
00521d1b              i_1 = i_1->m_hashNext;
00521d1b              
00521d20              if (i_1 == 0)
00521d20              {
00521d3b                  class HashTableData<unsigned long,DBOCache *>* i;
00521d3b                  
00521d3b                  do
00521d3b                  {
00521d30                      m_currBucket = &m_currBucket[1];
00521d30                      
00521d35                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00521d43                          return result;
00521d43                      
00521d37                      i = *(uint32_t*)m_currBucket;
00521d3b                  } while (i == 0);
00521d3b                  
00521d3d                  i_1 = i;
00521d3d                  
00521d41                  if (i_1 == 0)
00521d41                      break;
00521d20              }
00521d08          }
00521d02      }
00521d02      
00521d43      return result;
00521cb0  }

00521d2d                                         8d 49 00                                                               .I.
00521d51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00521d60  void __thiscall PhysicsScriptTable::GetSubDataIDs(class PhysicsScriptTable const* this, class QualifiedDataIDArray* arg2)

00521d60  {
00521d6e      void __return;
00521d6e      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->script_table.m_intrusiveTable, &__return);
00521d73      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
00521d78      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00521d7a      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00521d7a      
00521d7d      if (i_1 != 0)
00521d7d      {
00521d88          while (true)
00521d88          {
00521d88              PhysicsScriptTableData::GetSubDataIDs(i_1->m_data, arg2);
00521d8d              i_1 = i_1->m_hashNext;
00521d8d              
00521d92              if (i_1 == 0)
00521d92              {
00521dab                  class HashTableData<unsigned long,DBOCache *>* i;
00521dab                  
00521dab                  do
00521dab                  {
00521da0                      m_currBucket = &m_currBucket[1];
00521da0                      
00521da5                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00521dba                          return;
00521dba                      
00521da7                      i = *(uint32_t*)m_currBucket;
00521dab                  } while (i == 0);
00521dab                  
00521dad                  i_1 = i;
00521dad                  
00521db1                  if (i_1 == 0)
00521db1                      break;
00521d92              }
00521d88          }
00521d7d      }
00521d60  }

00521dbd                                                                                         90 90 90                               ...

00521dc0  int32_t __thiscall PhysicsScriptTableData::UnPack(class PhysicsScriptTableData* this, void** arg2, uint32_t arg3)

00521dc0  {
00521dca      void* eax = *(uint32_t*)arg2;
00521dcc      uint32_t i_1 = *(uint32_t*)eax;
00521dd4      *(uint32_t*)arg2 = ((char*)eax + 4);
00521dd6      AC1Legacy::SmartArray<ScriptAndModData>::grow(this, i_1);
00521dd6      
00521ddd      if (i_1 > 0)
00521ddd      {
00521e29          uint32_t i;
00521e29          
00521e29          do
00521e29          {
00521de0              void* eax_2 = *(uint32_t*)arg2;
00521de2              int32_t ecx = *(uint32_t*)eax_2;
00521de7              *(uint32_t*)arg2 = ((char*)eax_2 + 4);
00521de9              int32_t ebp_1 = *(uint32_t*)((char*)eax_2 + 4);
00521dee              *(uint32_t*)arg2 = ((char*)eax_2 + 8);
00521df0              uint32_t m_size = this->script_array.m_size;
00521dfa              int32_t eax_6;
00521dfa              
00521dfa              if (this->script_array.m_num >= m_size)
00521dfa              {
00521dfe                  uint32_t eax_5;
00521dfe                  
00521dfe                  if (m_size <= 0)
00521e04                      eax_5 = 8;
00521dfe                  else
00521e00                      eax_5 = (m_size * 2);
00521e00                  
00521e0c                  eax_6 = AC1Legacy::SmartArray<ScriptAndModData>::grow(this, eax_5);
00521dfa              }
00521dfa              
00521e13              if ((this->script_array.m_num < m_size || eax_6 != 0))
00521e13              {
00521e15                  uint32_t m_num = this->script_array.m_num;
00521e18                  class ScriptAndModData* m_data = this->script_array.m_data;
00521e1e                  m_data[m_num].mod = ecx;
00521e21                  m_data[m_num].script_id.id = ebp_1;
00521e25                  this->script_array.m_num += 1;
00521e13              }
00521e13              
00521e28              i = i_1;
00521e28              i_1 -= 1;
00521e29          } while (i != 1);
00521ddd      }
00521ddd      
00521e37      return 1;
00521dc0  }

00521e3a                                                                                90 90 90 90 90 90                            ......

00521e40  class IDClass<_tagDataID,32,0>* __thiscall PhysicsScriptTable::GetScript(class PhysicsScriptTable const* this, class IDClass<_tagDataID,32,0>* __return, enum PScriptType arg3, float arg4)

00521e40  {
00521e41      enum PScriptType esi = arg3;
00521e41      
00521e63      for (int32_t* i = this->script_table.m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->script_table.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00521e63      {
00521e67          if (*(uint32_t*)i == esi)
00521e67          {
00521e7d              if (i == 0)
00521e7d                  break;
00521e7d              
00521e95              uint32_t* __return_2 = __return;
00521e9a              *(uint32_t*)__return_2 = PhysicsScriptTableData::GetScript(i[2], &arg3, arg4)->id;
00521e9f              return __return_2;
00521e67          }
00521e63      }
00521e63      
00521e70      uint32_t* __return_1 = __return;
00521e74      *(uint32_t*)__return_1 = INVALID_DID.id;
00521e78      return __return_1;
00521e40  }

00521ea2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00521eb0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PhysicsScriptTableData *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PhysicsScriptTableData *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PhysicsScriptTableData *> *,0>* this, uint32_t arg2)

00521eb0  {
00521ebb      arg2 = arg2;
00521ebf      uint8_t edx = ((int8_t)arg2);
00521ec3      this->m_buckets = nullptr;
00521ec6      this->m_firstInterestingBucket = nullptr;
00521ec9      this->m_numBuckets = 0;
00521ecc      this->m_numElements = 0;
00521ed0      this->vtable = 0x7c7c58;
00521ed6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00521ee9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00521ee9      
00521ef3      if (eax == bucketSizesEnd_1)
00521ef5          eax -= 4;
00521ef5      
00521ef8      uint32_t eax_1 = *(uint32_t*)eax;
00521efd      this->m_numBuckets = eax_1;
00521efd      
00521f00      if (eax_1 > 0x17)
00521f16          this->m_buckets = operator new[]((eax_1 << 2));
00521f00      else
00521f05          this->m_buckets = &this->m_aInplaceBuckets;
00521f05      
00521f1c      class HashTableData<unsigned long,PhysicsScriptTableData *>** m_buckets = this->m_buckets;
00521f1f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00521f25      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00521f36      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00521eb0  }

00521f3f                                                                                               90                                 .

00521f40  void* __thiscall HashTable<unsigned long,PhysicsScriptTableData *,0>::`scalar deleting destructor'(class HashTable<unsigned long,PhysicsScriptTableData *,0>* this, uint32_t arg2)

00521f40  {
00521f49      this->vtable = 0x7c7c5c;
00521f4f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00521f54      class HashTableData<unsigned long,PhysicsScriptTableData *>** m_buckets = this->m_intrusiveTable.m_buckets;
00521f44      this->m_intrusiveTable.vtable = 0x7c7c58;
00521f44      
00521f62      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00521f65          operator delete[](m_buckets);
00521f65      
00521f44      this->m_intrusiveTable.m_buckets = nullptr;
00521f44      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00521f44      this->m_intrusiveTable.m_numBuckets = 0;
00521f44      this->m_intrusiveTable.m_numElements = 0;
00521f44      
00521f80      if ((arg2 & 1) != 0)
00521f83          operator delete(this);
00521f83      
00521f8f      return this;
00521f40  }

00521f92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00521fa0  void __fastcall PhysicsScriptTable::PhysicsScriptTable(class PhysicsScriptTable* this)

00521fa0  {
00521fa9      DBObj::DBObj(this, INVALID_DID.id);
00521fae      this->vtable = &PackObj::`vftable';
00521fb5      this->vtable = 0x7c7c78;
00521fbb      this->vtable = &PhysicsScriptTable::`vftable';
00521fc7      this->script_table.vtable = 0x7c7c5c;
00521fce      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PhysicsScriptTableData *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PhysicsScriptTableData *> *,0>(&this->script_table.m_intrusiveTable, 4);
00521fa0  }

00521fd7                                                                       90 90 90 90 90 90 90 90 90                         .........

00521fe0  uint32_t PhysicsScriptTable::GetDBOType(class PhysicsScriptTable const* this @ ecx) __pure

00521fe0  {
00521fe5      return 0x2c;
00521fe0  }

00521fe6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00521ff0  void* __thiscall PhysicsScriptTable::`vector deleting destructor'(class PhysicsScriptTable* this, uint32_t arg2)

00521ff0  {
00521ff3      /* tailcall */
00521ff3      return PhysicsScriptTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00521ff0  }

00521ff8                                                                          cc cc cc cc cc cc cc cc                          ........

00522000  void __fastcall PhysicsScriptTable::Destroy(class PhysicsScriptTable* this)

00522000  {
0052200d      void __return;
0052200d      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->script_table.m_intrusiveTable, &__return);
00522012      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax->m_currElement;
00522017      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00522019      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0052201c      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
0052201c      
00522020      if (m_currElement != 0)
00522020      {
00522030          while (true)
00522030          {
00522030              class DBOCache* m_data = m_currElement->m_data;
00522033              class HashTableData<unsigned long,DBOCache *>* m_hashNext_1 = m_currElement->m_hashNext;
0052203c              class HashTableData<unsigned long,DBOCache *>* m_currElement_1 = m_currElement;
0052203e              class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
0052203e              
00522040              if (m_hashNext_1 == 0)
00522040              {
00522050                  while (true)
00522050                  {
00522050                      m_currBucket_1 = &m_currBucket_1[1];
00522050                      
00522055                      if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00522055                          break;
00522055                      
00522057                      class HashTableData<unsigned long,DBOCache *>* m_hashNext_2 = *(uint32_t*)m_currBucket_1;
00522057                      
0052205b                      if (m_hashNext_2 != 0)
0052205b                      {
0052205d                          m_hashNext_1 = m_hashNext_2;
0052205d                          break;
0052205b                      }
00522050                  }
00522040              }
00522040              
0052205f              class HashTableData<unsigned long,DBOCache *>* m_hashNext = *(uint32_t*)m_currBucket;
0052205f              
00522063              if (m_hashNext == m_currElement)
00522075                  *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00522063              else
00522063              {
0052206c                  class HashTableData<unsigned long,DBOCache *>* m_hashNext_3;
0052206c                  
0052206c                  do
0052206c                  {
00522065                      m_hashNext_3 = m_hashNext;
00522067                      m_hashNext = m_hashNext->m_hashNext;
0052206c                  } while (m_hashNext != m_currElement);
0052206c                  
00522070                  if (m_hashNext_3 != 0)
0052207c                      m_hashNext_3->m_hashNext = m_hashNext->m_hashNext;
00522070                  else
00522075                      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00522063              }
00522063              
00522089              m_currHashTable_1->m_numElements -= 1;
0052208c              m_currElement = m_hashNext_1;
0052208e              m_currBucket = m_currBucket_1;
0052208e              
00522090              if (m_currElement_1 != 0)
00522093                  operator delete(m_currElement_1);
00522093              
005220a1              if (m_data != 0)
005220a1              {
005220a3                  struct DBOCache::VTable* vtable = m_data->vtable;
005220a3                  
005220a7                  if (vtable != 0)
005220ad                      operator delete[](((char*)vtable - 4));
005220ad                  
005220ba                  operator delete(m_data);
005220a1              }
005220a1              
005220c4              if (m_hashNext_1 == 0)
005220c4                  break;
005220c4              
0052202a              m_currHashTable = m_currHashTable_1;
00522030          }
00522020      }
00522000  }

0052204d                                         8d 49 00                                                               .I.
005220d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005220e0  int32_t __thiscall PhysicsScriptTable::UnPack(class PhysicsScriptTable* this, void** arg2, uint32_t arg3)

005220e0  {
005220ea      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
005220ed      void** ebp = arg2;
005220f1      void* eax_1 = *(uint32_t*)ebp;
005220f4      void** ecx_1 = *(uint32_t*)eax_1;
005220fb      *(uint32_t*)ebp = ((char*)eax_1 + 4);
005220fb      
005220fe      if (ecx_1 > 0)
005220fe      {
00522105          arg2 = ecx_1;
005221b6          void** i;
005221b6          
005221b6          do
005221b6          {
00522110              void* eax_3 = *(uint32_t*)ebp;
00522113              int32_t edi_1 = *(uint32_t*)eax_3;
0052211a              *(uint32_t*)ebp = ((char*)eax_3 + 4);
00522122              void* esi_1 = operator new(0xc);
00522122              
0052212b              if (esi_1 == 0)
00522140                  esi_1 = nullptr;
0052212b              else
0052212b              {
00522131                  *(uint32_t*)esi_1 = 0;
00522133                  *(uint32_t*)((char*)esi_1 + 4) = 0;
00522136                  *(uint32_t*)((char*)esi_1 + 8) = 0;
00522139                  AC1Legacy::SmartArray<ScriptAndModData>::grow(esi_1, 4);
0052212b              }
0052212b              
0052214a              PhysicsScriptTableData::UnPack(esi_1, ebp, arg3);
00522151              void* eax_6 = operator new(0xc);
0052215b              void* esi_2;
0052215b              
0052215b              if (eax_6 == 0)
0052216d                  esi_2 = nullptr;
0052215b              else
0052215b              {
0052215d                  *(uint32_t*)((char*)eax_6 + 8) = esi_1;
00522160                  *(uint32_t*)eax_6 = edi_1;
00522162                  *(uint32_t*)((char*)eax_6 + 4) = 0;
00522169                  esi_2 = eax_6;
0052215b              }
0052215b              
0052216f              int32_t j = *(uint32_t*)esi_2;
0052217b              class HashTableData<unsigned long,PhysicsScriptTableData *>* ecx_5 = (this->script_table.m_intrusiveTable.m_aInplaceBuckets[0xb] + ((COMBINE(0, j) % this->script_table.m_intrusiveTable.m_aInplaceBuckets[0xd]) << 2));
0052217e              uint32_t m_hashKey = ecx_5->m_hashKey;
0052217e              
00522182              if (m_hashKey == 0)
00522182              {
00522197              label_522197:
00522197                  *(uint32_t*)((char*)esi_2 + 4) = ecx_5->m_hashKey;
0052219a                  ecx_5->m_hashKey = esi_2;
0052219a                  
0052219f                  if (ecx_5 < this->script_table.m_intrusiveTable.m_aInplaceBuckets[0xc])
005221a1                      this->script_table.m_intrusiveTable.m_aInplaceBuckets[0xc] = ecx_5;
005221a1                  
005221a4                  this->script_table.m_intrusiveTable.m_aInplaceBuckets[0xe] = (&this->script_table.m_intrusiveTable.m_aInplaceBuckets[0xe]->m_hashKey + 1);
00522182              }
00522182              else
00522182              {
00522186                  while (*(uint32_t*)m_hashKey != j)
00522186                  {
00522188                      m_hashKey = *(uint32_t*)(m_hashKey + 4);
00522188                      
0052218d                      if (m_hashKey == 0)
0052218d                          goto label_522197;
00522186                  }
00522186                  
00522193                  if (m_hashKey == 0)
00522193                      goto label_522197;
00522193                  
005221aa                  operator delete(esi_2);
00522182              }
00522182              
005221b2              i = arg2;
005221b2              arg2 -= 1;
005221b6          } while (i != 1);
005220fe      }
005220fe      
005221c5      return 1;
005220e0  }

005221c8                          90 90 90 90 90 90 90 90                                                          ........

005221d0  class DBObj* PhysicsScriptTable::Allocate(class PhysicsScriptTable const* this @ ecx)

005221d0  {
005221d0      /* tailcall */
005221d0      return PhysicsScriptTable::Allocator();
005221d0  }

005221d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005221e0  void __fastcall PhysicsScriptTable::~PhysicsScriptTable(class PhysicsScriptTable* this)

005221e0  {
005221e4      this->vtable = 0x7c7c78;
005221ea      this->vtable = &PhysicsScriptTable::`vftable';
005221f1      PhysicsScriptTable::Destroy(this);
005221fb      this->script_table.vtable = 0x7c7c5c;
00522202      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->script_table.m_intrusiveTable);
00522207      class HashTableData<unsigned long,PhysicsScriptTableData *>** m_buckets = this->script_table.m_intrusiveTable.m_buckets;
005221f6      this->script_table.m_intrusiveTable.vtable = 0x7c7c58;
005221f6      
00522215      if (m_buckets != &this->script_table.m_intrusiveTable.m_aInplaceBuckets)
00522218          operator delete[](m_buckets);
00522218      
005221f6      this->script_table.m_intrusiveTable.m_buckets = nullptr;
005221f6      this->script_table.m_intrusiveTable.m_firstInterestingBucket = nullptr;
005221f6      this->script_table.m_intrusiveTable.m_numBuckets = 0;
005221f6      this->script_table.m_intrusiveTable.m_numElements = 0;
0052222e      this->vtable = &PackObj::`vftable';
00522239      /* tailcall */
00522239      return DBObj::~DBObj(this);
005221e0  }

0052223e                                                                                            90 90                                ..

00522240  void* __thiscall PhysicsScriptTable::`scalar deleting destructor'(class PhysicsScriptTable* this, uint32_t arg2)

00522240  {
00522243      PhysicsScriptTable::~PhysicsScriptTable(this);
00522243      
0052224d      if ((arg2 & 1) != 0)
00522250          operator delete(this);
00522250      
0052225b      return this;
00522240  }

0052225e                                                                                            90 90                                ..

00522260  int32_t same_sign(float arg1, float arg2)

00522260  {
00522264      (((long double)arg1) - ((long double)0f));
0052226a      long double x87_r7_1 = ((long double)arg2);
00522270      long double temp1 = ((long double)0f);
00522270      (x87_r7_1 - temp1);
00522276      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00522276      
0052227b      if (!(p))
0052227b      {
0052227d          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0052227d          
00522280          if (!(p_1))
0052228f              return 1;
0052227b      }
0052227b      else if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0052228f          return 1;
0052228f      
00522284      return 0;
00522260  }


00522290  void change_cycle_speed(class CSequence* arg1, class MotionData* arg2, float arg3, float arg4)

00522290  {
0052229c      (((long double)0.000199999995f) - fabsl(((long double)arg3)));
005222a0      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005222a0      
005222a3      if (!(p))
005222a3      {
005222a9          int32_t ecx;
005222a9          int32_t var_4 = ecx;
005222b5          CSequence::multiply_cyclic_animation_fr(arg1, ((float)(((long double)arg4) / ((long double)arg3))));
005222ba          return;
005222a3      }
005222a3      
005222bf      long double x87_r7_4 = fabsl(((long double)arg4));
005222c1      long double x87_r6_1 = ((long double)0.000199999995f);
005222c7      (x87_r6_1 - x87_r7_4);
005222c7      
005222ce      if ((*(uint8_t*)((char*)((((x87_r6_1 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_4) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005222d6          CSequence::multiply_cyclic_animation_fr(arg1, 0f);
00522290  }

005222dc                                                                                      90 90 90 90                              ....

005222e0  void __thiscall CMotionTable::re_modify(class CMotionTable const* this, class CSequence* arg2, class MotionState* arg3)

005222e0  {
005222e5      class MotionState* esi = arg3;
005222e5      
005222f0      if (esi->modifier_head != 0)
005222f0      {
005222f7          void var_18;
005222f7          MotionState::MotionState(&var_18, esi);
00522302          class MotionList* i;
00522302          
00522302          if (i != 0)
00522302          {
00522305              class CSequence* ebp_1 = arg2;
00522305              
00522352              do
00522352              {
00522310                  class MotionList* modifier_head = esi->modifier_head;
00522316                  uint32_t motion = modifier_head->motion;
0052231a                  arg3 = modifier_head->speed_mod;
00522321                  MotionState::remove_modifier(esi, modifier_head, nullptr);
00522331                  MotionState::remove_modifier(&var_18, i, nullptr);
00522347                  CMotionTable::GetObjectSequence(this, motion, esi, ebp_1, arg3, &arg2, 0);
00522352              } while (i != 0);
00522302          }
00522302          
0052235a          MotionState::~MotionState(&var_18);
005222f0      }
005222e0  }

00522367                       90 90 90 90 90 90 90 90 90                                                         .........

00522370  void __thiscall DArray<unsigned long>::grow(class DArray<unsigned long>* this, uint32_t arg2)

00522370  {
0052237b      if (arg2 <= this->sizeOf)
0052237b      {
0052237e          DArray<unsigned long>::shrink(this, arg2);
00522385          return;
0052237b      }
0052237b      
00522391      void* eax_1 = operator new[]((arg2 << 2));
0052239e      int32_t i = 0;
0052239e      
005223a2      if (this->sizeOf > 0)
005223a2      {
005223b2          do
005223b2          {
005223a9              *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
005223af              i += 1;
005223b2          } while (i < this->sizeOf);
005223a2      }
005223a2      
005223b7      operator delete[](this->data);
005223bf      this->data = eax_1;
005223c2      this->sizeOf = arg2;
00522370  }

005223ca                                90 90 90 90 90 90                                                            ......

005223d0  void __thiscall DArray<unsigned long>::shrink(class DArray<unsigned long>* this, uint32_t arg2)

005223d0  {
005223dd      if (arg2 > this->sizeOf)
005223dd      {
005223e0          DArray<unsigned long>::grow(this, arg2);
005223e7          return;
005223dd      }
005223dd      
005223ec      if (arg2 != 0)
005223ec      {
00522409          void* eax_1 = operator new[]((arg2 << 2));
00522413          int32_t i = 0;
00522417          this->sizeOf = arg2;
00522417          
0052241a          if (arg2 > 0)
0052241a          {
0052242e              do
0052242e              {
00522425                  *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
0052242b                  i += 1;
0052242e              } while (i < this->sizeOf);
0052241a          }
0052241a          
00522433          operator delete[](this->data);
0052243b          this->data = eax_1;
005223ec      }
005223ec      else
005223ec      {
005223ee          uint32_t* data = this->data;
005223f1          this->sizeOf = arg2;
005223f4          operator delete[](data);
005223fc          this->data = arg2;
005223ec      }
005223ec      
00522441      if (this->next_available > arg2)
00522443          this->next_available = arg2;
005223d0  }

0052244b                                   90 90 90 90 90                                                             .....

00522450  void* __thiscall MotionData::`vector deleting destructor'(class MotionData* this, uint32_t arg2)

00522450  {
00522453      /* tailcall */
00522453      return MotionData::`scalar deleting destructor'(((char*)this - 4), arg2);
00522450  }

00522458                                                                          cc cc cc cc cc cc cc cc                          ........

00522460  void* __thiscall MotionData::`scalar deleting destructor'(class MotionData* this, uint32_t arg2)

00522460  {
00522463      MotionData::~MotionData(this);
00522463      
0052246d      if ((arg2 & 1) != 0)
00522470          operator delete(this);
00522470      
0052247b      return this;
00522460  }

0052247e                                                                                            90 90                                ..

00522480  void __fastcall MotionData::~MotionData(class MotionData* this)

00522480  {
00522483      this->vtable = &*(int32_t*)((char*)MotionData::`vftable' + 4);
00522489      this->vtable = &MotionData::`vftable';
00522490      MotionData::Destroy(this);
00522497      this->vtable = &LongHashData::`vftable';
0052249e      this->hash_next = nullptr;
005224a1      this->id = 0;
005224a4      this->vtable = 0x79285c;
00522480  }

005224ac                                      90 90 90 90                                                              ....

005224b0  void add_motion(class CSequence* arg1, class MotionData* arg2, float arg3)

005224b0  {
005224ba      if (arg2 != 0)
005224ba      {
005224d1          long double x87_r6_2 = (((long double)arg3) * ((long double)arg2->velocity.y));
005224ec          float var_18_1 = ((float)(((long double)arg3) * ((long double)arg2->velocity.z)));
005224f0          float var_20 = ((float)(((long double)arg3) * ((long double)arg2->velocity.x)));
005224f4          float var_1c_1 = ((float)x87_r6_2);
005224f8          CSequence::set_velocity(arg1, &var_20);
0052250f          long double x87_r6_5 = (((long double)arg3) * ((long double)arg2->omega.y));
00522523          float var_18_2 = ((float)(((long double)arg3) * ((long double)arg2->omega.z)));
00522527          var_20 = ((float)(((long double)arg3) * ((long double)arg2->omega.x)));
0052252b          float var_1c_2 = ((float)x87_r6_5);
0052252f          CSequence::set_omega(arg1, &var_20);
00522537          int32_t i = 0;
00522537          
0052253b          if (arg2->num_anims > 0)
0052253b          {
0052253e              int32_t ebx_1 = 0;
0052253e              
00522573              do
00522573              {
0052255b                  void __return;
0052255b                  CSequence::append_animation(arg1, operator*(&__return, arg3, (arg2->anims + ebx_1)));
00522564                  SetPositionStruct::~SetPositionStruct(&__return);
0052256d                  i += 1;
0052256e                  ebx_1 += 0x14;
00522573              } while (i < ((uint32_t)arg2->num_anims));
0052253b          }
005224ba      }
005224b0  }

0052257d                                                                                         90 90 90                               ...

00522580  void combine_motion(class CSequence* arg1, class MotionData* arg2, float arg3)

00522580  {
00522589      if (arg2 != 0)
00522589      {
00522596          long double x87_r6_2 = (((long double)arg3) * ((long double)arg2->omega.y));
005225aa          float var_1c_1 = ((float)(((long double)arg3) * ((long double)arg2->omega.z)));
005225ae          float var_24 = ((float)(((long double)arg3) * ((long double)arg2->omega.x)));
005225b6          float var_20_1 = ((float)x87_r6_2);
005225c5          long double x87_r6_5 = (((long double)arg3) * ((long double)arg2->velocity.y));
005225d9          float var_4_1 = ((float)(((long double)arg3) * ((long double)arg2->velocity.z)));
005225e3          float var_18 = ((float)(((long double)arg3) * ((long double)arg2->velocity.x)));
005225e7          float var_10_2 = var_4_1;
005225eb          float var_14_1 = ((float)x87_r6_5);
005225ef          CSequence::combine_physics(arg1, &var_18, &var_24);
00522589      }
00522580  }

005225f8                                                                          90 90 90 90 90 90 90 90                          ........

00522600  void subtract_motion(class CSequence* arg1, class MotionData* arg2, float arg3)

00522600  {
00522609      if (arg2 != 0)
00522609      {
00522616          long double x87_r6_2 = (((long double)arg3) * ((long double)arg2->omega.y));
0052262a          float var_1c_1 = ((float)(((long double)arg3) * ((long double)arg2->omega.z)));
0052262e          float var_24 = ((float)(((long double)arg3) * ((long double)arg2->omega.x)));
00522636          float var_20_1 = ((float)x87_r6_2);
00522645          long double x87_r6_5 = (((long double)arg3) * ((long double)arg2->velocity.y));
00522659          float var_4_1 = ((float)(((long double)arg3) * ((long double)arg2->velocity.z)));
00522663          float var_18 = ((float)(((long double)arg3) * ((long double)arg2->velocity.x)));
00522667          float var_10_2 = var_4_1;
0052266b          float var_14_1 = ((float)x87_r6_5);
0052266f          CSequence::subtract_physics(arg1, &var_18, &var_24);
00522609      }
00522600  }

00522678                                                                          90 90 90 90 90 90 90 90                          ........

00522680  class MotionData* __thiscall LongHash<MotionData>::lookup(class LongHash<MotionData> const* this, uint32_t arg2)

00522680  {
0052269e      for (void* i = this->buckets[(((arg2 >> ((int8_t)this->key_shift)) ^ arg2) & this->table_mask)]; i != 0; i = *(uint32_t*)((char*)i + 4))
0052269e      {
005226a3          if (arg2 == *(uint32_t*)((char*)i + 8))
005226b4              return ((char*)i - 4);
0052269e      }
0052269e      
005226ae      return 0;
00522680  }

005226b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005226c0  int32_t __thiscall CMotionTable::is_allowed(class CMotionTable const* this, uint32_t arg2, class MotionData* arg3, class MotionState const* arg4)

005226c0  {
005226c0      class MotionData* eax_4 = arg3;
005226c0      
005226c7      if (eax_4 == 0)
005226ca          return eax_4;
005226ca      
005226d1      if ((eax_4->bitfield & 2) != 0)
005226d1      {
005226d7          uint32_t substate = arg4->substate;
005226d7          
005226de          if (arg2 != substate)
005226de          {
005226eb              LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, arg4->style, &arg3);
005226f8              int32_t eax_2;
005226f8              eax_2 = arg3 == substate;
005226fc              return eax_2;
005226de          }
005226d1      }
005226d1      
00522705      return 1;
005226c0  }

00522708                          90 90 90 90 90 90 90 90                                                          ........

00522710  class MotionData* __thiscall CMotionTable::get_link(class CMotionTable const* this, uint32_t arg2, uint32_t arg3, float arg4, uint32_t arg5, float arg6)

00522710  {
00522710      class CMotionTable* this_1 = this;
00522711      long double x87_r7 = ((long double)arg6);
00522716      long double temp1 = ((long double)0f);
00522716      (x87_r7 - temp1);
0052271c      uint32_t ebx = arg3;
00522723      int32_t eax;
00522723      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00522727      int32_t var_4 = 0;
0052272f      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00522732      bool p_1;
00522732      
00522732      if (p)
00522732      {
00522734          long double x87_r7_1 = ((long double)arg4);
00522738          long double temp2_1 = ((long double)0f);
00522738          (x87_r7_1 - temp2_1);
0052273e          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00522740          p_1 = /* p_1 = unimplemented  {test ah, 0x5} */;
00522732      }
00522732      
00522743      int32_t eax_1;
00522743      uint32_t esi_1;
00522743      class LongNIValHash<LongHash<MotionData> *>* edi;
00522743      
00522743      if ((!(p) || !(p_1)))
00522743      {
00522793          esi_1 = (arg2 << 0x10);
00522799          edi = &this->links;
00522799          
005227a9          if (LongNIValHash<SurfInfo *>::lookup(edi, ((arg5 & 0xffffff) | esi_1), &arg3) != 0)
005227a9          {
005227b0              eax_1 = LongHash<MotionData>::lookup(arg3, ebx);
005227b5              var_4 = eax_1;
005227b9          label_5227b9:
005227b9              
005227bb              if (eax_1 != 0)
00522858                  return eax_1;
005227a9          }
00522743      }
00522743      else
00522743      {
00522755          esi_1 = (arg2 << 0x10);
0052275b          edi = &this->links;
0052275b          
0052276b          if (LongNIValHash<SurfInfo *>::lookup(edi, ((ebx & 0xffffff) | esi_1), &arg3) != 0)
0052276b          {
00522776              eax_1 = LongHash<MotionData>::lookup(arg3, arg5);
0052277b              var_4 = eax_1;
0052277f              goto label_5227b9;
0052276b          }
00522743      }
00522743      
005227c1      long double x87_r7_2 = ((long double)arg6);
005227c5      long double temp3_1 = ((long double)0f);
005227c5      (x87_r7_2 - temp3_1);
005227cb      eax_1 = ((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005227cd      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005227d0      bool p_3;
005227d0      
005227d0      if (p_2)
005227d0      {
005227d2          long double x87_r7_3 = ((long double)arg4);
005227d6          long double temp4_1 = ((long double)0f);
005227d6          (x87_r7_3 - temp4_1);
005227dc          eax_1 = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005227de          p_3 = /* p_3 = unimplemented  {test ah, 0x5} */;
005227d0      }
005227d0      
005227e1      if ((!(p_2) || !(p_3)))
005227e1      {
0052281e          if ((LongNIValHash<SurfInfo *>::lookup(&this->style_defaults, arg2, &arg5) != 0 && LongNIValHash<SurfInfo *>::lookup(edi, ((ebx & 0xffffff) | esi_1), &arg3) != 0))
0052284c              return LongHash<MotionData>::lookup(arg3, arg5);
005227e1      }
005227e1      else if (LongNIValHash<SurfInfo *>::lookup(edi, esi_1, &arg3) != 0)
00522807          return LongHash<MotionData>::lookup(arg3, arg5);
00522807      
0052284f      return var_4;
00522710  }

0052285b                                                                                   90 90 90 90 90                             .....

00522860  int32_t __thiscall CMotionTable::GetObjectSequence(class CMotionTable const* this, uint32_t arg2, class MotionState* arg3, class CSequence* arg4, float arg5, uint32_t* arg6, int32_t arg7)

00522860  {
0052286a      class MotionState* esi = arg3;
00522873      *(uint32_t*)arg6 = 0;
00522875      uint32_t style = esi->style;
00522875      
00522879      if (style != 0)
00522879      {
0052287f          uint32_t substate = esi->substate;
00522884          uint32_t substate_2 = substate;
00522884          
00522888          if (substate != 0)
00522888          {
00522893              class MotionData* var_10_1 = nullptr;
00522897              class MotionData* var_4_1 = nullptr;
0052289f              uint32_t var_c;
0052289f              LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, style, &var_c);
005228a4              uint32_t ebx_1 = arg2;
005228a4              
005228bc              if (((ebx_1 == var_c && arg7 == 0) && (substate & 0x20000000) != 0))
00522fa7                  return 1;
00522fa7              
005228c4              float ebp_1 = arg5;
005228c4              
005228c8              if (ebx_1 < 0)
005228c8              {
005228ce                  uint32_t style_1 = esi->style;
005228ce                  
005228d2                  if (style_1 == ebx_1)
00522fa7                      return 1;
00522fa7                  
005228e1                  LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, style_1, &var_c);
005228e6                  uint32_t substate_3 = substate_2;
005228ea                  uint32_t eax_1 = var_c;
005228ea                  
005228f0                  if (substate_3 != eax_1)
00522903                      var_4_1 = CMotionTable::get_link(this, esi->style, substate_3, esi->substate_mod, eax_1, ebp_1);
00522903                  
00522917                  if (LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, ebx_1, &arg7) != 0)
00522917                  {
00522932                      class MotionData* eax_5 = LongHash<MotionData>::lookup(&this->cycles, ((arg7 & 0xffffff) | (ebx_1 << 0x10)));
00522939                      arg3 = eax_5;
00522939                      
0052293d                      if (eax_5 != 0)
0052293d                      {
00522947                          if ((eax_5->bitfield & 1) != 0)
0052294b                              MotionState::clear_modifiers(esi);
0052294b                          
00522960                          class MotionData* eax_7 = CMotionTable::get_link(this, esi->style, var_c, esi->substate_mod, ebx_1, ebp_1);
00522967                          arg2 = eax_7;
00522967                          
0052296b                          if (eax_7 == 0)
0052296b                          {
0052296d                              uint32_t style_2 = esi->style;
0052296d                              
00522971                              if (ebx_1 != style_2)
00522971                              {
00522995                                  arg2 = CMotionTable::get_link(this, style_2, var_c, 1f, this->default_style, 1f);
005229a4                                  LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, this->default_style, &substate_2);
005229c7                                  var_10_1 = CMotionTable::get_link(this, this->default_style, substate_2, 1f, ebx_1, 1f);
00522971                              }
0052296b                          }
0052296b                          
005229cf                          CSequence::clear_physics(arg4);
005229d8                          CSequence::remove_cyclic_anims(arg4);
005229e8                          add_motion(arg4, var_4_1, ebp_1);
005229f8                          add_motion(arg4, arg2, ebp_1);
00522a08                          add_motion(arg4, var_10_1, ebp_1);
00522a18                          add_motion(arg4, arg3, ebp_1);
00522a29                          esi->substate = arg7;
00522a2f                          esi->style = ebx_1;
00522a31                          esi->substate_mod = arg5;
00522a34                          CMotionTable::re_modify(this, arg4, esi);
00522a3f                          uint32_t num_anims_2;
00522a3f                          
00522a3f                          if (var_4_1 == 0)
00522a47                              num_anims_2 = 0;
00522a3f                          else
00522a41                              num_anims_2 = ((uint32_t)var_4_1->num_anims);
00522a41                          
00522a4f                          uint32_t ecx_20;
00522a4f                          
00522a4f                          if (arg2 == 0)
00522a57                              ecx_20 = 0;
00522a4f                          else
00522a51                              ecx_20 = ((uint32_t)*(uint8_t*)(arg2 + 0x10));
00522a51                          
00522a5f                          uint32_t num_anims;
00522a5f                          
00522a5f                          if (var_10_1 == 0)
00522a67                              num_anims = 0;
00522a5f                          else
00522a61                              num_anims = ((uint32_t)var_10_1->num_anims);
00522a61                          
00522a80                          *(uint32_t*)arg6 = ((((((uint32_t)arg3->action_head) + num_anims) + ecx_20) + num_anims_2) - 1);
00522a8b                          return 1;
0052293d                      }
00522917                  }
005228c8              }
005228c8              
00522a94              if ((ebx_1 & 0x40000000) != 0)
00522a94              {
00522a9e                  uint32_t eax_23 = (ebx_1 & 0xffffff);
00522ab0                  class MotionData* eax_24 = LongHash<MotionData>::lookup(&this->cycles, ((esi->style << 0x10) | eax_23));
00522ab7                  arg3 = eax_24;
00522ab7                  
00522abb                  if (eax_24 != 0)
00522abb                  {
00522ae6                  label_522ae6:
00522ae6                      
00522aed                      if (CMotionTable::is_allowed(this, ebx_1, eax_24, esi) != 0)
00522aed                      {
00522af7                          if (((ebx_1 == substate_2 && same_sign(ebp_1, esi->substate_mod) != 0) && CSequence::has_anims(arg4) != 0))
00522af7                          {
00522b26                              change_cycle_speed(arg4, arg3, esi->substate_mod, ebp_1);
00522b31                              subtract_motion(arg4, arg3, esi->substate_mod);
00522b39                              combine_motion(arg4, arg3, ebp_1);
00522b46                              esi->substate_mod = arg5;
00522b54                              return 1;
00522af7                          }
00522af7                          
00522b5f                          if ((*(int32_t*)((char*)arg3 + 0x30) & 1) != 0)
00522b63                              MotionState::clear_modifiers(esi);
00522b63                          
00522b77                          class MotionData* eax_34 = CMotionTable::get_link(this, esi->style, esi->substate, esi->substate_mod, ebx_1, ebp_1);
00522b7e                          arg2 = eax_34;
00522b82                          int32_t eax_36;
00522b82                          
00522b82                          if (eax_34 != 0)
00522b89                              eax_36 = same_sign(ebp_1, esi->substate_mod);
00522b89                          
00522b93                          if ((eax_34 == 0 || eax_36 == 0))
00522b93                          {
00522ba0                              LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, esi->style, &arg7);
00522bcc                              arg2 = CMotionTable::get_link(this, esi->style, esi->substate, esi->substate_mod, arg7, 1f);
00522bdb                              var_10_1 = CMotionTable::get_link(this, esi->style, arg7, 1f, ebx_1, ebp_1);
00522b93                          }
00522b93                          
00522be3                          CSequence::clear_physics(arg4);
00522bec                          CSequence::remove_cyclic_anims(arg4);
00522bec                          
00522bf7                          if (var_10_1 == 0)
00522bf7                          {
00522c21                              long double x87_r7_1 = ((long double)esi->substate_mod);
00522c24                              long double temp1_1 = ((long double)0f);
00522c24                              (x87_r7_1 - temp1_1);
00522c2a                              class MotionData* eax_44;
00522c2a                              eax_44 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00522c2c                              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00522c2c                              
00522c2f                              if (!(p_1))
00522c2f                              {
00522c31                                  long double x87_r7_2 = ((long double)arg5);
00522c35                                  long double temp2_1 = ((long double)0f);
00522c35                                  (x87_r7_2 - temp2_1);
00522c3b                                  eax_44 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00522c2f                              }
00522c2f                              
00522c40                              if ((p_1 || (*(uint8_t*)((char*)eax_44)[1] & 0x41) != 0))
00522c52                                  arg7 = arg5;
00522c40                              else
00522c48                                  arg7 = ((float)-(((long double)arg5)));
00522c48                              
00522c65                              add_motion(arg4, arg2, arg7);
00522bf7                          }
00522bf7                          else
00522bf7                          {
00522c07                              add_motion(arg4, arg2, esi->substate_mod);
00522c17                              add_motion(arg4, var_10_1, ebp_1);
00522bf7                          }
00522bf7                          
00522c78                          add_motion(arg4, arg3, ebp_1);
00522c7d                          uint32_t substate_1 = esi->substate;
00522c7d                          
00522c8d                          if ((substate_1 != ebx_1 && (substate_1 & 0x20000000) != 0))
00522c8d                          {
00522c9a                              LongNIValHash<SurfInfo *>::lookup(&this->style_defaults, esi->style, &arg7);
00522c9a                              
00522ca3                              if (arg7 != ebx_1)
00522cac                                  MotionState::add_modifier_no_check(esi, substate_1, esi->substate_mod);
00522c8d                          }
00522c8d                          
00522cba                          esi->substate_mod = arg5;
00522cc0                          esi->substate = ebx_1;
00522cc3                          CMotionTable::re_modify(this, arg4, esi);
00522cce                          uint32_t ecx_45;
00522cce                          
00522cce                          if (arg2 == 0)
00522cd6                              ecx_45 = 0;
00522cce                          else
00522cd0                              ecx_45 = ((uint32_t)*(uint8_t*)(arg2 + 0x10));
00522cd0                          
00522cde                          uint32_t num_anims_1;
00522cde                          
00522cde                          if (var_10_1 == 0)
00522ce6                              num_anims_1 = 0;
00522cde                          else
00522ce0                              num_anims_1 = ((uint32_t)var_10_1->num_anims);
00522ce0                          
00522cfd                          *(uint32_t*)arg6 = (((((uint32_t)arg3->action_head) + num_anims_1) + ecx_45) - 1);
00522d08                          return 1;
00522aed                      }
00522abb                  }
00522abb                  else
00522abb                  {
00522ad0                      eax_24 = LongHash<MotionData>::lookup(&this->cycles, ((this->default_style << 0x10) | eax_23));
00522ad7                      arg3 = eax_24;
00522ad7                      
00522adb                      if (eax_24 != 0)
00522adb                          goto label_522ae6;
00522abb                  }
00522a94              }
00522a94              
00522d11              if ((ebx_1 & 0x10000000) != 0)
00522d11              {
00522d26                  uint32_t eax_56 = ((esi->style << 0x10) | (substate_2 & 0xffffff));
00522d30                  class MotionData* eax_57 = LongHash<MotionData>::lookup(&this->cycles, eax_56);
00522d30                  
00522d3b                  if (eax_57 != 0)
00522d3b                  {
00522d51                      class MotionData* eax_60 = CMotionTable::get_link(this, esi->style, substate_2, esi->substate_mod, ebx_1, ebp_1);
00522d58                      arg2 = eax_60;
00522d58                      
00522d5c                      if (eax_60 != 0)
00522d5c                      {
00522d62                          MotionState::add_action(esi, ebx_1, ebp_1);
00522d6d                          CSequence::clear_physics(arg4);
00522d74                          CSequence::remove_cyclic_anims(arg4);
00522d80                          add_motion(arg4, arg2, ebp_1);
00522d8f                          add_motion(arg4, eax_57, esi->substate_mod);
00522d9b                          CMotionTable::re_modify(this, arg4, esi);
00522dab                          *(uint32_t*)arg6 = ((uint32_t)*(uint8_t*)(arg2 + 0x10));
00522db6                          return 1;
00522d5c                      }
00522d5c                      
00522dc4                      LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, esi->style, &var_c);
00522de1                      class MotionData* eax_66 = CMotionTable::get_link(this, esi->style, substate_2, esi->substate_mod, var_c, 1f);
00522de8                      arg2 = eax_66;
00522de8                      
00522dec                      if (eax_66 != 0)
00522dec                      {
00522e03                          class MotionData* eax_68 = CMotionTable::get_link(this, esi->style, var_c, 1f, ebx_1, ebp_1);
00522e03                          
00522e0e                          if (eax_68 != 0)
00522e0e                          {
00522e1c                              class MotionData* eax_69 = LongHash<MotionData>::lookup(&this->cycles, eax_56);
00522e1c                              
00522e27                              if (eax_69 != 0)
00522e27                              {
00522e4e                                  arg5 = CMotionTable::get_link(this, esi->style, var_c, 1f, substate_2, esi->substate_mod);
00522e52                                  MotionState::add_action(esi, ebx_1, ebp_1);
00522e5d                                  CSequence::clear_physics(arg4);
00522e64                                  CSequence::remove_cyclic_anims(arg4);
00522e74                                  add_motion(arg4, arg2, 1f);
00522e80                                  add_motion(arg4, eax_68, ebp_1);
00522e90                                  add_motion(arg4, arg5, 1f);
00522e9f                                  add_motion(arg4, eax_69, esi->substate_mod);
00522eab                                  CMotionTable::re_modify(this, arg4, esi);
00522ec2                                  uint32_t eax_76 = (((uint32_t)*(uint8_t*)(arg2 + 0x10)) + ((uint32_t)eax_68->num_anims));
00522ec5                                  uint32_t* ecx_70 = arg6;
00522ec9                                  *(uint32_t*)ecx_70 = eax_76;
00522ec9                                  
00522ecb                                  if (arg5 != 0)
00522ed3                                      *(uint32_t*)ecx_70 = (((uint32_t)*(uint8_t*)(arg5 + 0x10)) + eax_76);
00522ed3                                  
00522ee1                                  return 1;
00522e27                              }
00522e0e                          }
00522dec                      }
00522d3b                  }
00522d11              }
00522d11              
00522eea              if ((ebx_1 & 0x20000000) != 0)
00522eea              {
00522ef6                  uint32_t ecx_72 = (esi->style << 0x10);
00522f08                  class MotionData* eax_81 = LongHash<MotionData>::lookup(&this->cycles, ((substate_2 & 0xffffff) | ecx_72));
00522f08                  
00522f19                  if ((eax_81 != 0 && (eax_81->bitfield & 1) == 0))
00522f19                  {
00522f25                      uint32_t eax_83 = (ebx_1 & 0xffffff);
00522f34                      class MotionData* eax_85 = LongHash<MotionData>::lookup(&this->modifiers, (eax_83 | ecx_72));
00522f3b                      arg5 = eax_85;
00522f3f                      class MotionData* eax_87;
00522f3f                      
00522f3f                      if (eax_85 == 0)
00522f3f                      {
00522f49                          eax_87 = LongHash<MotionData>::lookup(&this->modifiers, eax_83);
00522f50                          arg5 = eax_87;
00522f3f                      }
00522f3f                      
00522f54                      if ((eax_85 != 0 || eax_87 != 0))
00522f54                      {
00522f5a                          int32_t eax_88 = MotionState::add_modifier(esi, ebx_1, ebp_1);
00522f61                          int32_t eax_89;
00522f61                          
00522f61                          if (eax_88 == 0)
00522f61                          {
00522f76                              CMotionTable::StopSequenceMotion(this, ebx_1, 1f, esi, arg4, &arg6);
00522f7f                              eax_89 = MotionState::add_modifier(esi, ebx_1, ebp_1);
00522f61                          }
00522f61                          
00522f86                          if ((eax_88 != 0 || eax_89 != 0))
00522f86                          {
00522f93                              combine_motion(arg4, arg5, ebp_1);
00522fa7                              return 1;
00522f86                          }
00522f54                      }
00522f19                  }
00522eea              }
00522888          }
00522879      }
00522879      
00522fb3      return 0;
00522860  }

00522fb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00522fc0  int32_t __thiscall CMotionTable::StopSequenceMotion(class CMotionTable const* this, uint32_t arg2, float arg3, class MotionState* arg4, class CSequence* arg5, uint32_t* arg6)

00522fc0  {
00522fc7      uint32_t* esi = arg6;
00522fd8      *(uint32_t*)esi = 0;
00522fd8      
00522fe3      if (((arg2 & 0x40000000) != 0 && arg2 == arg4->substate))
00522fe3      {
00522ff1          LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, arg4->style, &arg6);
0052300b          CMotionTable::GetObjectSequence(this, arg6, arg4, arg5, 1f, esi, 1);
00523019          return 1;
00522fe3      }
00522fe3      
00523022      if ((arg2 & 0x20000000) != 0)
00523022      {
00523024          int32_t* modifier_head = arg4->modifier_head;
00523029          arg6 = nullptr;
00523029          
00523031          for (; modifier_head != 0; modifier_head = modifier_head[2])
00523031          {
00523035              if (*(uint32_t*)modifier_head == arg2)
00523035              {
00523051                  uint32_t edi_1 = (arg2 & 0xffffff);
0052305f                  class MotionData* eax_4 = LongHash<MotionData>::lookup(&this->modifiers, ((arg4->style << 0x10) | edi_1));
0052305f                  
00523066                  if (eax_4 != 0)
00523066                  {
0052307e                  label_52307e:
0052307e                      subtract_motion(arg5, eax_4, modifier_head[1]);
0052308e                      MotionState::remove_modifier(arg4, modifier_head, arg6);
0052309c                      return 1;
00523066                  }
00523066                  
0052306b                  eax_4 = LongHash<MotionData>::lookup(&this->modifiers, edi_1);
0052306b                  
00523072                  if (eax_4 != 0)
00523072                      goto label_52307e;
00523072                  
00523066                  break;
00523035              }
00523035              
00523037              arg6 = modifier_head;
00523031          }
00523022      }
00523022      
00523048      return 0;
00522fc0  }

0052309f                                                                                               90                                 .

005230a0  int32_t __thiscall CMotionTable::SetDefaultState(class CMotionTable const* this, class MotionState* arg2, class CSequence* arg3, uint32_t* arg4)

005230a0  {
005230a0      class CMotionTable* this_1 = this;
005230b3      int32_t result = LongNIValHash<SurfInfo *>::lookup(&this->style_defaults.vtable, this->default_style, &this_1);
005230b3      
005230ba      if (result == 0)
005230be          return result;
005230be      
005230ca      MotionState::clear_modifiers(arg2);
005230d1      MotionState::clear_actions(arg2);
005230d6      uint32_t default_style = this->default_style;
005230dc      class CMotionTable* this_2 = this_1;
005230ec      int32_t i = ((this_2 & 0xffffff) | (default_style << 0x10));
005230ff      void* ecx_10 = this->cycles.buckets[(((i >> ((int8_t)this->cycles.key_shift)) ^ i) & this->cycles.table_mask)];
005230ff      
00523104      if (ecx_10 != 0)
00523104      {
00523109          while (i != *(uint32_t*)((char*)ecx_10 + 8))
00523109          {
0052310b              ecx_10 = *(uint32_t*)((char*)ecx_10 + 4);
0052310b              
00523110              if (ecx_10 == 0)
00523119                  return 0;
00523109          }
00523109          
00523121          if (ecx_10 != 4)
00523121          {
00523131              arg2->style = default_style;
00523133              arg2->substate = this_2;
0052313a              arg2->substate_mod = 1f;
00523148              *(uint32_t*)arg4 = (((uint32_t)*(uint8_t*)((char*)ecx_10 + 0xc)) - 1);
0052314a              CSequence::clear_physics(arg3);
00523151              CSequence::clear_animations(arg3);
0052315c              add_motion(arg3, ((char*)ecx_10 - 4), arg2->substate_mod);
0052316e              return 1;
00523121          }
00523104      }
00523104      
0052312a      return 0;
005230a0  }

00523171                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00523180  uint32_t __thiscall CMotionTable::Pack(class CMotionTable* this, void** arg2, uint32_t arg3)

00523180  {
0052318c      uint8_t* edx = &this->m_bLoaded;
00523190      int32_t ecx = 0;
0052319c      int32_t var_18 = 0;
005231a3      int32_t var_14 = 0;
005231aa      struct LongHash<MotionData>::VTable* var_88 = nullptr;
005231ae      struct LongHash<MotionData>::VTable* var_70 = nullptr;
005231b2      int32_t edi = 8;
005231b7      uint8_t* var_58 = edx;
005231bb      int32_t var_4c = 0;
005231bf      int32_t var_54 = 0;
005231bf      
005231c3      if (edx == 0)
005231c3      {
0052321b          int32_t var_48 = 1;
00523223          int32_t var_50_1 = 0;
005231c3      }
005231c3      else
005231c3      {
005231c8          void* j = *(uint32_t*)*(uint32_t*)((char*)ADJ(edx)->m_timeStamp)[4];
005231cc          int32_t i = 0;
005231cc          
005231d4          if (j != 0)
005231d4              goto label_52323c;
005231d4          
005231da          HashBaseIter<unsigned long>::Next(&var_58);
005231da          
005231e3          if (i == 0)
005231e3          {
005231e9              ecx = var_54;
005231ed              edx = var_58;
0052323c          label_52323c:
0052323c              
0052323c              do
0052323c              {
005231f1                  edi += 8;
005231f1                  
005231f6                  if (j == 0)
005231f6                  {
00523217                  label_523217:
00523217                      
00523217                      do
00523217                      {
00523206                          ecx += 1;
00523209                          int32_t var_4c_1 = 0;
00523209                          
0052320d                          if (ecx >= ADJ(edx)->m_pNext)
0052320d                          {
00523229                              i = 1;
00523229                              break;
0052320d                          }
0052320d                          
00523212                          j = *(uint32_t*)(*(uint32_t*)((char*)ADJ(edx)->m_timeStamp)[4] + (ecx << 2));
00523217                      } while (j == 0);
005231f6                  }
005231f6                  else
005231f6                  {
005231f8                      void* j_4 = j;
005231fc                      j = *(uint32_t*)((char*)j + 4);
005231fc                      
00523201                      if (j == 0)
00523201                          goto label_523217;
005231f6                  }
005231f6                  
00523231                  var_18 += 1;
0052323c              } while (i == 0);
005231e3          }
005231c3      }
005231c3      
00523244      int32_t ebx_1 = 0;
00523248      int32_t var_8c = (edi + 4);
0052324c      class DBOCache** var_30 = &this->m_pMaintainer;
00523250      int32_t var_24 = 0;
00523254      int32_t var_2c = 0;
00523258      void* const i_1;
00523258      
00523258      if (this == 0xffffffe0)
00523258      {
0052327e          int32_t var_20_1 = 1;
00523286          i_1 = nullptr;
00523258      }
00523258      else
00523258      {
0052325d          i_1 = *(uint32_t*)this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c);
00523261          int32_t var_20 = 0;
00523261          
00523269          if (i_1 == 0)
00523269          {
0052326f              HashBaseIter<unsigned long>::Next(&var_30);
00523278              ebx_1 = var_2c;
00523269          }
00523258      }
00523258      
00523288      struct LongHash<MotionData>::VTable*** edi_2 = arg2;
00523288      
00523292      while (i_1 != 0)
00523292      {
00523299          if (i_1 == 4)
00523299              break;
00523299          
0052329f          int32_t eax_4 = *(uint32_t*)(*(uint32_t*)((char*)i_1 - 4) + 0xc)(edi_2, 0);
005232a6          void* const i_9 = i_1;
005232aa          i_1 = *(uint32_t*)((char*)i_1 + 4);
005232b1          var_8c += eax_4;
005232b1          
005232b5          if (i_1 != 0)
005232b5          {
005232e4          label_5232e4:
005232e4              var_14 += 1;
005232b5          }
005232b5          else
005232b5          {
005232b7              class DBOCache** eax_5 = var_30;
005232b7              
005232d1              do
005232d1              {
005232c0                  ebx_1 += 1;
005232c3                  int32_t var_24_1 = 0;
005232c3                  
005232c7                  if (ebx_1 >= ADJ(eax_5)->vtable)
005232c7                  {
005232dc                      int32_t var_20_2 = 1;
005232dc                      goto label_5232e4;
005232c7                  }
005232c7                  
005232cc                  i_1 = *(uint32_t*)(ADJ(eax_5)->m_AllowedInFreeList*(int32_t*)((char*)ADJ(eax_5) + 0x2c) + (ebx_1 << 2));
005232d1              } while (i_1 == 0);
005232d1              
005232d3              var_14 += 1;
005232b5          }
00523292      }
00523292      
005232fe      int32_t ebx_2 = 0;
00523302      int32_t var_8c_1 = (var_8c + 4);
00523306      class LongNIValHash<unsigned long>* var_44 = &this->style_defaults;
0052330a      int32_t var_38 = 0;
0052330e      int32_t var_40 = 0;
00523312      class HashBaseData<unsigned long>* hash_next_1;
00523312      
00523312      if (this == 0xffffffc8)
00523312      {
00523338          int32_t var_34_1 = 1;
00523340          hash_next_1 = nullptr;
00523340          goto label_523342;
00523312      }
00523312      
00523317      hash_next_1 = *(uint32_t*)this->style_defaults.buckets;
0052331b      int32_t var_34 = 0;
0052331b      
00523323      if (hash_next_1 == 0)
00523323      {
00523329          HashBaseIter<unsigned long>::Next(&var_44);
00523332          ebx_2 = var_40;
00523336          goto label_523342;
00523323      }
00523323      
0052334b      while (hash_next_1 != 4)
0052334b      {
00523351          int32_t eax_9 = *(uint32_t*)(hash_next_1->vtable + 0xc)(edi_2, 0);
00523358          class HashBaseData<unsigned long>* hash_next_3 = hash_next_1;
0052335c          hash_next_1 = hash_next_1->hash_next;
00523363          var_8c_1 += eax_9;
00523363          
00523367          if (hash_next_1 != 0)
00523367          {
00523391          label_523391:
00523391              var_88 = (&var_88->__vecDelDtor + 1);
00523367          }
00523367          else
00523367          {
00523369              class LongNIValHash<unsigned long>* eax_10 = var_44;
00523369              
00523381              do
00523381              {
00523370                  ebx_2 += 1;
00523373                  int32_t var_38_1 = 0;
00523373                  
00523377                  if (ebx_2 >= eax_10->table_size)
00523377                  {
00523389                      int32_t var_34_2 = 1;
00523389                      goto label_523391;
00523377                  }
00523377                  
0052337c                  hash_next_1 = eax_10->buckets[ebx_2];
00523381              } while (hash_next_1 == 0);
00523381              
00523383              var_88 = (&var_88->__vecDelDtor + 1);
00523367          }
00523367          
00523342      label_523342:
00523342          
00523344          if (hash_next_1 == 0)
00523344              break;
0052334b      }
0052334b      
005233aa      int32_t result = (var_8c_1 + 4);
005233ae      class LongHash<MotionData>* var_84 = &this->cycles;
005233b2      int32_t var_78 = 0;
005233b6      int32_t var_80 = 0;
005233ba      class HashBaseData<unsigned long>* var_7c;
005233ba      class HashBaseData<unsigned long>* i_2;
005233ba      
005233ba      if (this == 0xffffffb0)
005233ba      {
005233dc          i_2 = nullptr;
005233de          int32_t var_74_1 = 1;
005233e6          var_7c = nullptr;
005233ba      }
005233ba      else
005233ba      {
005233bf          i_2 = *(uint32_t*)this->cycles.buckets;
005233c3          int32_t var_74 = 0;
005233c7          var_7c = i_2;
005233c7          
005233cb          if (i_2 == 0)
005233cb          {
005233d1              HashBaseIter<unsigned long>::Next(&var_84);
005233d6              i_2 = var_7c;
005233cb          }
005233ba      }
005233ba      
005233ec      void* var_6c = nullptr;
005233f0      int32_t var_60 = 0;
005233f4      int32_t var_68 = 0;
005233f8      int32_t var_5c = 1;
00523400      int32_t var_64 = 0;
00523404      void* eax_14;
00523404      int32_t ecx_14;
00523404      eax_14 = operator new[](0x40);
00523409      void* var_10 = eax_14;
00523410      int32_t eax_15 = 0x10;
00523418      int32_t var_4 = 0x10;
0052341f      int32_t var_8 = 0;
00523426      int32_t var_c = 0x10;
00523426      
00523432      while (i_2 != 0)
00523432      {
0052343c          void* esi_2 = *(int32_t*)((char*)i_2 + 0xc);
0052343c          
0052343f          if (eax_15 <= var_70)
0052344c              DArray<unsigned long>::grow(&var_10, (eax_15 + 0x10));
0052344c          
0052345c          *(uint32_t*)((char*)var_10 + (var_70 << 2)) = 0;
00523466          int32_t ebx_3 = 0;
0052346a          result += 8;
0052346e          var_6c = esi_2;
00523472          int32_t var_60_1 = 0;
00523476          int32_t var_68_1 = 0;
0052347a          void* const j_1;
0052347a          
0052347a          if (esi_2 == 0)
0052347a          {
005234a0              j_1 = nullptr;
005234a2          label_5234a2:
005234a2              int32_t var_5c_2 = 1;
005234aa              goto label_5234b0;
0052347a          }
0052347a          
0052347f          j_1 = **(uint32_t**)((char*)esi_2 + 0xc);
00523483          int32_t var_5c_1 = 0;
00523483          
0052348b          if (j_1 == 0)
0052348b          {
00523491              HashBaseIter<unsigned long>::Next(&var_6c);
0052349a              ebx_3 = var_68_1;
0052349e              goto label_5234b0;
0052348b          }
0052348b          
005234b9          while (j_1 != 4)
005234b9          {
005234c6              int32_t result_1 = (result + *(uint32_t*)(*(uint32_t*)((char*)j_1 - 4) + 0xc)(edi_2, 0));
005234c8              void* eax_19 = var_10;
005234cf              result = result_1;
005234d7              *(uint32_t*)((char*)eax_19 + (var_70 << 2)) += 1;
005234da              void* const j_3 = j_1;
005234de              j_1 = *(uint32_t*)((char*)j_1 + 4);
005234de              
005234e3              if (j_1 == 0)
005234e3              {
005234e5                  void* eax_20 = var_6c;
005234e5                  
00523501                  do
00523501                  {
005234f0                      ebx_3 += 1;
005234f3                      int32_t var_60_2 = 0;
005234f3                      
005234f7                      if (ebx_3 >= *(uint32_t*)((char*)eax_20 + 0x10))
005234f7                          goto label_5234a2;
005234f7                      
005234fc                      j_1 = *(uint32_t*)(*(uint32_t*)((char*)eax_20 + 0xc) + (ebx_3 << 2));
00523501                  } while (j_1 == 0);
00523501                  
005234b0              label_5234b0:
005234b0                  
005234b2                  if (j_1 == 0)
005234b2                      break;
005234e3              }
005234b9          }
005234b9          
00523509          class HashBaseData<unsigned long>* var_78_1 = var_7c;
0052350d          class HashBaseData<unsigned long>* hash_next = var_7c->hash_next;
00523512          var_7c = hash_next;
00523512          
00523516          if (hash_next == 0)
00523516          {
00523518              class LongHash<MotionData>* edx_12 = var_84;
0052351f              int32_t eax_22 = var_80;
00523538              class HashBaseData<unsigned long>* j_2;
00523538              
00523538              do
00523538              {
00523523                  eax_22 += 1;
00523526                  int32_t var_78_2 = 0;
00523526                  
0052352a                  if (eax_22 >= edx_12->table_size)
0052352a                  {
0052353c                      int32_t var_74_2 = 1;
0052353c                      break;
0052352a                  }
0052352a                  
0052352f                  j_2 = edx_12->buckets[eax_22];
00523534                  var_7c = j_2;
00523538              } while (j_2 == 0);
00523544              var_80 = eax_22;
00523516          }
00523516          
0052354c          i_2 = var_7c;
00523551          var_70 = (&var_70->__vecDelDtor + 1);
00523555          eax_15 = var_4;
00523432      }
00523432      
0052356c      if (arg3 < result)
0052356c      {
00523576          operator delete[](var_10);
0052358a          return result;
0052356c      }
0052356c      
005235a0      **(uint32_t**)edi_2 = this->modifiers.vtable;
005235a4      void* esi_6 = &*(uint32_t*)edi_2[1];
005235a7      *(uint32_t*)edi_2 = esi_6;
005235ab      *(uint32_t*)esi_6 = var_18;
005235af      uint8_t* eax_28 = var_58;
005235b3      void* edx_16 = &*(uint32_t*)edi_2[1];
005235b6      int32_t ebx_4 = 0;
005235ba      *(uint32_t*)edi_2 = edx_16;
005235bc      void* esi_7 = edx_16;
005235be      int32_t var_4c_2 = 0;
005235c2      int32_t var_54_1 = 0;
005235c6      void* const i_3;
005235c6      
005235c6      if (eax_28 == 0)
005235c6      {
005235ec          i_3 = nullptr;
005235ee          goto label_5235f0;
005235c6      }
005235c6      
005235cb      i_3 = *(uint32_t*)*(uint32_t*)((char*)ADJ(eax_28)->m_timeStamp)[4];
005235cf      int32_t var_48_1 = 0;
005235cf      
005235d7      if (i_3 == 0)
005235d7      {
005235dd          HashBaseIter<unsigned long>::Next(&var_58);
005235e6          ebx_4 = var_54_1;
005235ea          goto label_5235f0;
005235d7      }
005235d7      
005235f7      while (true)
005235f7      {
005235f7          int32_t ecx_29 = *(uint32_t*)((char*)i_3 + 0xc);
005235fa          *(uint32_t*)esi_7 = *(uint32_t*)((char*)i_3 + 8);
005235fe          void* esi_9 = &*(uint32_t*)edi_2[1];
00523601          *(uint32_t*)edi_2 = esi_9;
00523605          *(uint32_t*)esi_9 = ecx_29;
00523609          void* edx_21 = &*(uint32_t*)edi_2[1];
0052360c          *(uint32_t*)edi_2 = edx_21;
0052360e          i_3 = *(uint32_t*)((char*)i_3 + 4);
00523613          esi_7 = edx_21;
00523613          
00523615          if (i_3 == 0)
00523615          {
00523631              do
00523631              {
00523620                  ebx_4 += 1;
00523620                  
00523623                  if (ebx_4 >= ADJ(var_58)->m_pNext)
00523623                      break;
00523623                  
0052362c                  i_3 = *(uint32_t*)(*(uint32_t*)((char*)ADJ(var_58)->m_timeStamp)[4] + (ebx_4 << 2));
00523631              } while (i_3 == 0);
00523631              
005235f0          label_5235f0:
005235f0              
005235f2              if (i_3 == 0)
005235f2                  break;
00523615          }
005235f7      }
005235f7      
0052363c      class DBOCache** eax_30 = var_30;
00523640      *(uint32_t*)esi_7 = var_14;
00523647      int32_t ebx_5 = 0;
0052364b      *(uint32_t*)edi_2 = &*(uint32_t*)edi_2[1];
0052364d      int32_t var_24_2 = 0;
00523651      int32_t var_2c_1 = 0;
00523655      void* const i_4;
00523655      
00523655      if (eax_30 == 0)
00523655      {
0052367b          i_4 = nullptr;
0052367d          goto label_523680;
00523655      }
00523655      
0052365a      i_4 = *(uint32_t*)ADJ(eax_30)->m_AllowedInFreeList*(int32_t*)((char*)ADJ(eax_30) + 0x2c);
0052365e      int32_t var_20_3 = 0;
0052365e      
00523666      if (i_4 == 0)
00523666      {
0052366c          HashBaseIter<unsigned long>::Next(&var_30);
00523675          ebx_5 = var_2c_1;
00523679          goto label_523680;
00523666      }
00523666      
00523689      while (i_4 != 4)
00523689      {
00523696          *(uint32_t*)(*(uint32_t*)((char*)i_4 - 4) + 0xc)(edi_2, arg3);
00523699          i_4 = *(uint32_t*)((char*)i_4 + 4);
00523699          
0052369e          if (i_4 == 0)
0052369e          {
005236b8              do
005236b8              {
005236a7                  ebx_5 += 1;
005236a7                  
005236aa                  if (ebx_5 >= ADJ(var_30)->vtable)
005236aa                      break;
005236aa                  
005236b3                  i_4 = *(uint32_t*)(ADJ(var_30)->m_AllowedInFreeList*(int32_t*)((char*)ADJ(var_30) + 0x2c) + (ebx_5 << 2));
005236b8              } while (i_4 == 0);
005236b8              
00523680          label_523680:
00523680              
00523682              if (i_4 == 0)
00523682                  break;
0052369e          }
00523689      }
00523689      
005236c2      **(uint32_t**)edi_2 = var_88;
005236c6      class LongNIValHash<unsigned long>* eax_35 = var_44;
005236cd      int32_t ebx_6 = 0;
005236d1      *(uint32_t*)edi_2 = &*(uint32_t*)edi_2[1];
005236d3      int32_t var_38_2 = 0;
005236d7      int32_t var_40_1 = 0;
005236db      class HashBaseData<unsigned long>* hash_next_2;
005236db      
005236db      if (eax_35 == 0)
005236db      {
00523701          hash_next_2 = nullptr;
00523701          goto label_523703;
005236db      }
005236db      
005236e0      hash_next_2 = *(uint32_t*)eax_35->buckets;
005236e4      int32_t var_34_3 = 0;
005236e4      
005236ec      if (hash_next_2 == 0)
005236ec      {
005236f2          HashBaseIter<unsigned long>::Next(&var_44);
005236fb          ebx_6 = var_40_1;
005236ff          goto label_523703;
005236ec      }
005236ec      
0052370c      while (hash_next_2 != 4)
0052370c      {
00523719          *(uint32_t*)(hash_next_2->vtable + 0xc)(edi_2, arg3);
0052371c          hash_next_2 = hash_next_2->hash_next;
0052371c          
00523721          if (hash_next_2 == 0)
00523721          {
00523741              do
00523741              {
00523730                  ebx_6 += 1;
00523730                  
00523733                  if (ebx_6 >= var_44->table_size)
00523733                      break;
00523733                  
0052373c                  hash_next_2 = var_44->buckets[ebx_6];
00523741              } while (hash_next_2 == 0);
00523741              
00523703          label_523703:
00523703              
00523705              if (hash_next_2 == 0)
00523705                  break;
00523721          }
0052370c      }
0052370c      
0052374b      **(uint32_t**)edi_2 = var_70;
0052374f      class LongHash<MotionData>* eax_40 = var_84;
00523758      *(uint32_t*)edi_2 = &*(uint32_t*)edi_2[1];
0052375a      int32_t var_78_3 = 0;
0052375e      int32_t var_80_1 = 0;
00523762      void* const i_7;
00523762      
00523762      if (eax_40 == 0)
00523780          i_7 = nullptr;
00523762      else
00523762      {
00523767          void* i_10 = *(uint32_t*)eax_40->buckets;
0052376b          int32_t var_74_3 = 0;
0052376f          i_7 = i_10;
0052376f          
00523773          if (i_10 == 0)
00523779              HashBaseIter<unsigned long>::Next(&var_84);
00523762      }
00523762      
00523784      int32_t* var_88_1 = nullptr;
00523796      int32_t var_68_2;
00523796      int32_t ebx_7;
00523796      
00523796      while (true)
00523796      {
00523796          if (i_7 == 0)
00523796          {
005238a1              operator delete[](var_10);
005238b7              return result;
00523796          }
00523796          
005237a0          void* eax_42 = *(uint32_t*)((char*)i_7 + 0xc);
005237a6          **(uint32_t**)edi_2 = *(uint32_t*)((char*)i_7 + 8);
005237aa          void* edx_37 = var_10;
005237b1          void* esi_11 = &*(uint32_t*)edi_2[1];
005237b4          *(uint32_t*)edi_2 = esi_11;
005237bf          *(uint32_t*)esi_11 = *(uint32_t*)((char*)var_88_1 + edx_37);
005237c6          ebx_7 = 0;
005237ca          *(uint32_t*)edi_2 = &*(uint32_t*)edi_2[1];
005237cc          var_6c = eax_42;
005237d0          int32_t var_60_3 = 0;
005237d4          var_68_2 = 0;
005237d8          void* const i_5;
005237d8          
005237d8          if (eax_42 == 0)
005237d8          {
005237fe              i_5 = nullptr;
00523800          label_523800:
00523800              int32_t var_5c_4 = 1;
00523800              goto label_523808;
005237d8          }
005237d8          
005237dd          i_5 = **(uint32_t**)((char*)eax_42 + 0xc);
005237e1          int32_t var_5c_3 = 0;
005237e1          
005237e9          if (i_5 == 0)
005237e9              break;
005237e9          
00523811          while (i_5 != 4)
00523811          {
0052381e              *(uint32_t*)(*(uint32_t*)((char*)i_5 - 4) + 0xc)(edi_2, arg3);
00523821              void* const i_8 = i_5;
00523825              i_5 = *(uint32_t*)((char*)i_5 + 4);
00523825              
0052382a              if (i_5 == 0)
0052382a              {
0052382c                  void* eax_45 = var_6c;
0052382c                  
00523844                  do
00523844                  {
00523833                      ebx_7 += 1;
00523836                      int32_t var_60_4 = 0;
00523836                      
0052383a                      if (ebx_7 >= *(uint32_t*)((char*)eax_45 + 0x10))
0052383a                          goto label_523800;
0052383a                      
0052383f                      i_5 = *(uint32_t*)(*(uint32_t*)((char*)eax_45 + 0xc) + (ebx_7 << 2));
00523844                  } while (i_5 == 0);
00523844                  
00523808              label_523808:
00523808                  
0052380a                  if (i_5 == 0)
0052380a                      break;
0052382a              }
00523811          }
00523811          
00523850          void* i_11 = *(uint32_t*)((char*)i_7 + 4);
00523858          var_88_1 = &var_88_1[1];
0052385c          i_7 = i_11;
0052385c          
00523860          if (i_11 == 0)
00523860          {
0052386d              int32_t eax_47 = var_80_1;
00523892              void* i_6;
00523892              
00523892              do
00523892              {
00523874                  var_80_1 = (eax_47 + 1);
00523874                  
00523878                  if ((eax_47 + 1) >= var_84->table_size)
00523878                      break;
00523878                  
00523885                  eax_47 = var_80_1;
00523889                  i_6 = var_84->buckets[eax_47];
0052388e                  i_7 = i_6;
00523892              } while (i_6 == 0);
00523860          }
00523796      }
00523796      
005237ef      HashBaseIter<unsigned long>::Next(&var_6c);
005237f8      ebx_7 = var_68_2;
005237fc      goto label_523808;
00523180  }

0052378a                                8d 9b 00 00 00 00                                                            ......
005238ba                                                                                90 90 90 90 90 90                            ......

005238c0  int32_t __thiscall CMotionTable::UnPack(class CMotionTable* this, void** arg2, uint32_t arg3)

005238c0  {
005238c6      void** esi = arg2;
005238ca      void* ebx = *(uint32_t*)esi;
005238cc      class CMotionTable* this_1 = this;
005238d5      class CMotionTable* this_2 = this_1;
005238dd      *(uint32_t*)(*(int32_t*)((char*)this_1 + -0x30) + 0x3c)();
005238dd      
005238e7      if (arg3 < 0xc)
005238e7      {
005238ea          *(uint32_t*)esi = ebx;
005238f4          return 0;
005238e7      }
005238e7      
005238fb      this_1->modifiers.vtable = **(uint32_t**)esi;
00523900      void* ecx_3 = (*(uint32_t*)esi + 4);
00523905      *(uint32_t*)esi = ecx_3;
00523907      int32_t ecx_4 = *(uint32_t*)ecx_3;
0052390e      int32_t edi_1 = (arg3 - 8);
00523917      *(uint32_t*)esi = ((char*)ecx_3 + 4);
00523919      arg3 = 0;
00523919      
0052391d      if (ecx_4 > 0)
0052391d      {
00523999          bool cond:3_1;
00523999          
00523999          do
00523999          {
00523923              if (edi_1 < 8)
00523923              {
00523d3f              label_523d3f:
00523d3f                  *(uint32_t*)esi = ebx;
00523d49                  return 0;
00523923              }
00523923              
00523929              void* eax_4 = *(uint32_t*)esi;
0052392b              int32_t ecx_5 = *(uint32_t*)eax_4;
00523930              *(uint32_t*)esi = ((char*)eax_4 + 4);
00523932              void** edx_1 = *(uint32_t*)((char*)eax_4 + 4);
00523941              *(uint32_t*)esi = ((char*)eax_4 + 8);
00523943              edi_1 -= 8;
00523946              void* eax_7 = operator new(0x10);
00523946              
00523950              if (eax_7 == 0)
0052396b                  eax_7 = nullptr;
00523950              else
00523950              {
0052395a                  *(uint32_t*)((char*)eax_7 + 4) = 0;
0052395d                  *(uint32_t*)((char*)eax_7 + 8) = ecx_5;
00523960                  *(uint32_t*)eax_7 = 0x7c62f8;
00523966                  *(uint32_t*)((char*)eax_7 + 0xc) = edx_1;
00523950              }
00523950              
00523978              int32_t edx_6 = (((*(uint32_t*)((char*)eax_7 + 8) >> ((int8_t)this_1->m_timeStamp)) ^ *(uint32_t*)((char*)eax_7 + 8)) & *(int32_t*)((char*)this_1 + 0xc));
00523981              *(uint32_t*)((char*)eax_7 + 4) = *(uint32_t*)(*(uint32_t*)((char*)this_1->m_timeStamp)[4] + (edx_6 << 2));
00523987              *(uint32_t*)(*(uint32_t*)((char*)this_1->m_timeStamp)[4] + (edx_6 << 2)) = eax_7;
00523993              cond:3_1 = (arg3 + 1) < ecx_4;
00523995              arg3 += 1;
00523999          } while (cond:3_1);
0052391d      }
0052391d      
0052399e      if (edi_1 >= 4)
0052399e      {
005239a4          void* eax_10 = *(uint32_t*)esi;
005239a6          int32_t ecx_12 = *(uint32_t*)eax_10;
005239ab          void* edi_2 = (edi_1 - 4);
005239b4          *(uint32_t*)esi = ((char*)eax_10 + 4);
005239b6          arg3 = 0;
005239b6          
005239ba          if (ecx_12 > 0)
005239ba          {
00523a65              bool cond:4_1;
00523a65              
00523a65              do
00523a65              {
005239c2                  void* eax_12 = operator new(0x34);
005239c2                  
005239cc                  if (eax_12 == 0)
005239cc                  {
00523a09                      arg2 = nullptr;
00523a0d                      eax_12 = nullptr;
005239cc                  }
005239cc                  else
005239cc                  {
005239ce                      *(uint32_t*)((char*)eax_12 + 8) = 0;
005239d1                      *(uint32_t*)((char*)eax_12 + 0xc) = 0;
005239d4                      *(uint32_t*)((char*)eax_12 + 4) = 0x7c62f8;
005239db                      *(uint32_t*)eax_12 = &*(int32_t*)((char*)MotionData::`vftable' + 4);
005239e1                      *(uint32_t*)((char*)eax_12 + 4) = &MotionData::`vftable';
005239e8                      *(uint8_t*)((char*)eax_12 + 0x10) = 0;
005239eb                      __builtin_memset(((char*)eax_12 + 0x14), 0, 0x1d);
00523a03                      arg2 = eax_12;
005239cc                  }
005239cc                  
00523a0f                  void* ecx_13 = *(uint32_t*)esi;
00523a0f                  
00523a20                  if (*(uint32_t*)(*(uint32_t*)eax_12 + 0x10)(esi, edi_2) == 0)
00523a20                      goto label_523d3f;
00523a20                  
00523a35                  edi_2 += ((char*)ecx_13 - *(uint32_t*)esi);
00523a44                  int32_t eax_19 = (((arg2[3] >> ((int8_t)this_1->m_DID.id)) ^ arg2[3]) & this_1->m_numLinks);
00523a3f                  arg2[2] = *(uint32_t*)(this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c) + (eax_19 << 2));
00523a53                  *(uint32_t*)(this_1->m_AllowedInFreeList*(int32_t*)((char*)this_1 + 0x2c) + (eax_19 << 2)) = &arg2[1];
00523a5f                  cond:4_1 = (arg3 + 1) < ecx_12;
00523a61                  arg3 += 1;
00523a65              } while (cond:4_1);
005239ba          }
005239ba          
00523a6e          if (edi_2 >= 4)
00523a6e          {
00523a74              void* eax_22 = *(uint32_t*)esi;
00523a76              int32_t ecx_22 = *(uint32_t*)eax_22;
00523a7b              void* edi_3 = ((char*)edi_2 - 4);
00523a84              *(uint32_t*)esi = ((char*)eax_22 + 4);
00523a86              arg3 = 0;
00523a86              
00523a8a              if (ecx_22 > 0)
00523a8a              {
00523b35                  bool cond:6_1;
00523b35                  
00523b35                  do
00523b35                  {
00523a92                      void* eax_24 = operator new(0x34);
00523a92                      
00523a9c                      if (eax_24 == 0)
00523a9c                      {
00523ad9                          arg2 = nullptr;
00523add                          eax_24 = nullptr;
00523a9c                      }
00523a9c                      else
00523a9c                      {
00523a9e                          *(uint32_t*)((char*)eax_24 + 8) = 0;
00523aa1                          *(uint32_t*)((char*)eax_24 + 0xc) = 0;
00523aa4                          *(uint32_t*)((char*)eax_24 + 4) = 0x7c62f8;
00523aab                          *(uint32_t*)eax_24 = &*(int32_t*)((char*)MotionData::`vftable' + 4);
00523ab1                          *(uint32_t*)((char*)eax_24 + 4) = &MotionData::`vftable';
00523ab8                          *(uint8_t*)((char*)eax_24 + 0x10) = 0;
00523abb                          __builtin_memset(((char*)eax_24 + 0x14), 0, 0x1d);
00523ad3                          arg2 = eax_24;
00523a9c                      }
00523a9c                      
00523adf                      void* ecx_23 = *(uint32_t*)esi;
00523adf                      
00523af0                      if (*(uint32_t*)(*(uint32_t*)eax_24 + 0x10)(esi, edi_3) == 0)
00523af0                          goto label_523d3f;
00523af0                      
00523b05                      edi_3 += ((char*)ecx_23 - *(uint32_t*)esi);
00523b14                      int32_t eax_31 = (((arg2[3] >> ((int8_t)this_1->style_defaults.key_shift)) ^ arg2[3]) & this_1->style_defaults.table_mask);
00523b0f                      arg2[2] = this_1->style_defaults.buckets[eax_31];
00523b20                      this_1->style_defaults.buckets[eax_31] = &arg2[1];
00523b2f                      cond:6_1 = (arg3 + 1) < ecx_22;
00523b31                      arg3 += 1;
00523b35                  } while (cond:6_1);
00523a8a              }
00523a8a              
00523b3e              if (edi_3 >= 4)
00523b3e              {
00523b44                  void* eax_34 = *(uint32_t*)esi;
00523b46                  int32_t ecx_32 = *(uint32_t*)eax_34;
00523b4b                  void* edi_4 = ((char*)edi_3 - 4);
00523b54                  *(uint32_t*)esi = ((char*)eax_34 + 4);
00523b56                  arg3 = 0;
00523b56                  
00523b5a                  if (ecx_32 > 0)
00523b5a                  {
00523d10                      bool cond:7_1;
00523d10                      
00523d10                      do
00523d10                      {
00523b63                          if (edi_4 < 8)
00523b63                              goto label_523d3f;
00523b63                          
00523b69                          void* eax_36 = *(uint32_t*)esi;
00523b6b                          int32_t ecx_33 = *(uint32_t*)eax_36;
00523b70                          *(uint32_t*)esi = ((char*)eax_36 + 4);
00523b72                          int32_t edx_13 = *(uint32_t*)((char*)eax_36 + 4);
00523b84                          *(uint32_t*)esi = ((char*)eax_36 + 8);
00523b86                          void* var_14_3 = ((char*)edi_4 - 8);
00523b8a                          void* eax_39 = operator new(0x18);
00523b96                          void* edi_7;
00523b96                          
00523b96                          if (eax_39 == 0)
00523bf6                              edi_7 = nullptr;
00523b96                          else
00523b96                          {
00523b9d                              *(uint32_t*)eax_39 = 0x7c66b0;
00523ba3                              *(uint32_t*)((char*)eax_39 + 0x14) = 0;
00523bab                              *(uint32_t*)((char*)eax_39 + 0xc) = operator new[](0x100);
00523bb1                              *(uint32_t*)((char*)eax_39 + 0x10) = 0x40;
00523bb8                              *(uint32_t*)((char*)eax_39 + 8) = 8;
00523bbf                              *(uint32_t*)((char*)eax_39 + 4) = 0;
00523bc2                              int32_t eax_41 = 1;
00523bda                              int32_t edx_15;
00523bda                              
00523bda                              do
00523bda                              {
00523bca                                  edx_15 = (*(uint32_t*)((char*)eax_39 + 4) | eax_41);
00523bcc                                  eax_41 <<= 1;
00523bd0                                  *(uint32_t*)((char*)eax_39 + 4) = edx_15;
00523bda                              } while ((edx_15 | eax_41) < *(uint32_t*)((char*)eax_39 + 0x10));
00523bdc                              int32_t i = 0;
00523bde                              edi_7 = eax_39;
00523bde                              
00523bec                              do
00523bec                              {
00523be3                                  *(uint32_t*)(*(uint32_t*)((char*)edi_7 + 0xc) + (i << 2)) = 0;
00523be9                                  i += 1;
00523bec                              } while (i < *(uint32_t*)((char*)edi_7 + 0x10));
00523bec                              
00523bee                              *(uint32_t*)edi_7 = 0x7c66b0;
00523b96                          }
00523b96                          
00523bfc                          int32_t var_c_1 = 0;
00523bfc                          
00523c00                          if (edx_13 > 0)
00523c00                          {
00523cae                              bool cond:8_1;
00523cae                              
00523cae                              do
00523cae                              {
00523c08                                  void* eax_42 = operator new(0x34);
00523c08                                  
00523c12                                  if (eax_42 == 0)
00523c12                                  {
00523c4f                                      arg2 = nullptr;
00523c53                                      eax_42 = nullptr;
00523c12                                  }
00523c12                                  else
00523c12                                  {
00523c14                                      *(uint32_t*)((char*)eax_42 + 8) = 0;
00523c17                                      *(uint32_t*)((char*)eax_42 + 0xc) = 0;
00523c1a                                      *(uint32_t*)((char*)eax_42 + 4) = 0x7c62f8;
00523c21                                      *(uint32_t*)eax_42 = &*(int32_t*)((char*)MotionData::`vftable' + 4);
00523c27                                      *(uint32_t*)((char*)eax_42 + 4) = &MotionData::`vftable';
00523c2e                                      *(uint8_t*)((char*)eax_42 + 0x10) = 0;
00523c31                                      __builtin_memset(((char*)eax_42 + 0x14), 0, 0x1d);
00523c49                                      arg2 = eax_42;
00523c12                                  }
00523c12                                  
00523c5b                                  void* ebp = *(uint32_t*)esi;
00523c5b                                  
00523c66                                  if (*(uint32_t*)(*(uint32_t*)eax_42 + 0x10)(esi, var_14_3) == 0)
00523c66                                      goto label_523d51;
00523c66                                  
00523c79                                  var_14_3 += ((char*)ebp - *(uint32_t*)esi);
00523c81                                  int32_t ebp_2 = arg2[3];
00523c90                                  int32_t eax_48 = (((ebp_2 >> ((int8_t)*(uint32_t*)((char*)edi_7 + 8))) ^ ebp_2) & *(uint32_t*)((char*)edi_7 + 4));
00523c84                                  arg2[2] = *(uint32_t*)(*(uint32_t*)((char*)edi_7 + 0xc) + (eax_48 << 2));
00523c9c                                  *(uint32_t*)(*(uint32_t*)((char*)edi_7 + 0xc) + (eax_48 << 2)) = &arg2[1];
00523ca8                                  cond:8_1 = (var_c_1 + 1) < edx_13;
00523caa                                  var_c_1 += 1;
00523cae                              } while (cond:8_1);
00523cb4                              this_1 = this_2;
00523c00                          }
00523c00                          
00523cba                          int32_t* eax_51 = operator new(0x10);
00523cc4                          int32_t* edx_24;
00523cc4                          
00523cc4                          if (eax_51 == 0)
00523cdd                              edx_24 = nullptr;
00523cc4                          else
00523cc4                          {
00523cca                              eax_51[2] = ecx_33;
00523ccd                              eax_51[1] = 0;
00523cd0                              *(uint32_t*)eax_51 = 0x7c62f8;
00523cd6                              eax_51[3] = edi_7;
00523cd9                              edx_24 = eax_51;
00523cc4                          }
00523cc4                          
00523cdf                          int32_t edi_8 = edx_24[2];
00523cee                          int32_t eax_55 = (((edi_8 >> ((int8_t)this_1->cycles.key_shift)) ^ edi_8) & this_1->cycles.table_mask);
00523cf4                          edi_4 = var_14_3;
00523cf8                          edx_24[1] = this_1->cycles.buckets[eax_55];
00523cfb                          this_1->cycles.buckets[eax_55] = edx_24;
00523d0a                          cond:7_1 = (arg3 + 1) < ecx_32;
00523d0c                          arg3 += 1;
00523d10                      } while (cond:7_1);
00523b5a                  }
00523b5a                  
00523d18                  void* ecx_50 = (*(uint32_t*)esi & 3);
00523d18                  
00523d26                  if ((ecx_50 == 0 || edi_4 >= (4 - ecx_50)))
00523d6a                      return 1;
00523d6a                  
00523d2d                  *(uint32_t*)esi = ebx;
00523d37                  return 0;
00523b3e              }
00523a6e          }
0052399e      }
0052399e      
00523d51  label_523d51:
00523d51      *(uint32_t*)esi = ebx;
00523d5b      return 0;
005238c0  }

00523d6d                                         90 90 90                                                               ...

00523d70  void __fastcall CMotionTable::Destroy(class CMotionTable* this)

00523d70  {
00523d7c      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->cycles);
00523d84      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->modifiers);
00523d93      class LongNIValHash<LongHash<MotionData> *>* var_14 = &this->links;
00523d97      int32_t var_8 = 0;
00523d9b      int32_t var_10 = 0;
00523da4      class HashBaseData<unsigned long>* i;
00523da4      
00523da4      if (this == 0xffffff80)
00523da4      {
00523dc2          int32_t var_4_1 = 1;
00523dc6          i = nullptr;
00523da4      }
00523da4      else
00523da4      {
00523da9          class HashBaseData<unsigned long>* i_2 = *(uint32_t*)this->links.buckets;
00523dad          int32_t var_4 = 0;
00523db1          i = i_2;
00523db1          
00523db5          if (i_2 == 0)
00523dbb              HashBaseIter<unsigned long>::Next(&var_14);
00523da4      }
00523da4      
00523dd6      while (i != 0)
00523dd6      {
00523dd8          int32_t* esi_1 = *(int32_t*)((char*)i + 0xc);
00523ddd          int32_t* var_28 = esi_1;
00523de1          int32_t var_1c_1 = 0;
00523de5          int32_t var_24_1 = 0;
00523de5          
00523de9          if (esi_1 == 0)
00523de9          {
00523e35              int32_t var_18_1 = 1;
00523e39              int32_t var_20_2 = 0;
00523de9          }
00523de9          else
00523de9          {
00523dee              int32_t eax_3 = *(uint32_t*)esi_1[3];
00523df2              int32_t j = 0;
00523df6              int32_t var_20_1 = eax_3;
00523df6              
00523dfa              if (eax_3 == 0)
00523e00                  HashBaseIter<unsigned long>::Next(&var_28);
00523e00              
00523e09              if ((eax_3 != 0 || j == 0))
00523e09              {
00523e1d                  do
00523e14                      HashBaseIter<unsigned long>::DeleteCurrent(&var_28);
00523e1d                   while (j == 0);
00523e09              }
00523de9          }
00523de9          
00523e23          HashBaseIter<unsigned long>::DeleteCurrent(&var_14);
00523e23          
00523e2a          if (esi_1 != 0)
00523e31              **(uint32_t**)esi_1(1);
00523dd6      }
00523dd6      
00523e44      var_14 = &this->style_defaults;
00523e48      int32_t var_8_1 = 0;
00523e4c      int32_t var_10_1 = 0;
00523e50      class HashBaseData<unsigned long>* i_1;
00523e50      
00523e50      if (this == 0xffffffc8)
00523e50      {
00523e6e          int32_t var_4_3 = 1;
00523e72          i_1 = nullptr;
00523e50      }
00523e50      else
00523e50      {
00523e55          class HashBaseData<unsigned long>* i_3 = *(uint32_t*)this->style_defaults.buckets;
00523e59          int32_t var_4_2 = 0;
00523e5d          i_1 = i_3;
00523e5d          
00523e61          if (i_3 == 0)
00523e67              HashBaseIter<unsigned long>::Next(&var_14);
00523e50      }
00523e50      
00523e7a      while (i_1 != 0)
00523e80          HashBaseIter<unsigned long>::DeleteCurrent(&var_14);
00523d70  }

00523e0d                                         8d 49 00                                                               .I.
00523e8f                                               90                                                                 .

00523e90  int32_t __thiscall CMotionTable::DoObjectMotion(class CMotionTable const* this, uint32_t arg2, class MotionState* arg3, class CSequence* arg4, float arg5, uint32_t* arg6)

00523e90  {
00523eb0      return CMotionTable::GetObjectSequence(this, arg2, arg3, arg4, arg5, arg6, 0);
00523e90  }

00523eb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00523ec0  int32_t __thiscall CMotionTable::StopObjectMotion(class CMotionTable const* this, uint32_t arg2, float arg3, class MotionState* arg4, class CSequence* arg5, uint32_t* arg6)

00523ec0  {
00523ec0      /* tailcall */
00523ec0      return CMotionTable::StopSequenceMotion(this, arg2, arg3, arg4, arg5, arg6);
00523ec0  }

00523ec5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00523ed0  int32_t __thiscall CMotionTable::StopObjectCompletely(class CMotionTable const* this, class MotionState* arg2, class CSequence* arg3, uint32_t* arg4)

00523ed0  {
00523ed0      class CMotionTable* this_1 = this;
00523edc      class MotionState* esi = arg2;
00523ee0      class MotionList* modifier_head = esi->modifier_head;
00523ee8      int32_t result = 0;
00523ee8      
00523ef0      for (; modifier_head != 0; modifier_head = esi->modifier_head)
00523ef0      {
00523ef2          float speed_mod = modifier_head->speed_mod;
00523efd          arg2 = speed_mod;
00523efd          
00523f0b          if (CMotionTable::StopSequenceMotion(this, modifier_head->motion, speed_mod, esi, arg3, arg4) != 0)
00523f0d              result = 1;
00523ef0      }
00523ef0      
00523f41      if (CMotionTable::StopSequenceMotion(this, esi->substate, esi->substate_mod, esi, arg3, arg4) != 0)
00523f48          return 1;
00523f48      
00523f43      return result;
00523ed0  }

00523f4b                                   90 90 90 90 90                                                             .....

00523f50  void __fastcall CMotionTable::~CMotionTable(class CMotionTable* this)

00523f50  {
00523f54      this->vtable = 0x7c5af0;
00523f5a      this->vtable = &CMotionTable::`vftable';
00523f61      CMotionTable::Destroy(this);
00523f66      this->links.vtable = 0x7c5a18;
00523f74      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->links);
00523f66      this->links.vtable = 0x7c66b0;
00523f66      
00523f84      if (this->links.fPlacementNew_ == 0)
00523f8a          operator delete[](this->links.buckets);
00523f8a      
00523f97      this->modifiers.vtable = 0x7c66b0;
00523f97      
00523f9e      if (this->modifiers.fPlacementNew_ == 0)
00523fa4          operator delete[](this->modifiers.buckets);
00523fa4      
00523fb1      this->cycles.vtable = 0x7c66b0;
00523fb1      
00523fb8      if (this->cycles.fPlacementNew_ == 0)
00523fbe          operator delete[](this->cycles.buckets);
00523fbe      
00523fc6      this->style_defaults.vtable = 0x7c5a14;
00523fd1      LongNIValHash<LongHash<MotionData> *>::destroy_contents(&this->style_defaults);
00523fc6      this->style_defaults.vtable = 0x7c66b0;
00523fc6      
00523fe1      if (this->style_defaults.fPlacementNew_ == 0)
00523fe7          operator delete[](this->style_defaults.buckets);
00523fe7      
00523ff0      this->vtable = &PackObj::`vftable';
00523ffa      /* tailcall */
00523ffa      return DBObj::~DBObj(this);
00523f50  }

00523fff                                                                                               90                                 .

00524000  void __fastcall MovementManager::MakeMoveToManager(class MovementManager* this)

00524000  {
00524008      if (this->moveto_manager == 0)
0052401a          this->moveto_manager = MoveToManager::Create(this->physics_obj, this->weenie_obj);
00524000  }

0052401f                                                                                               90                                 .

00524020  void __thiscall MovementManager::SetWeenieObject(class MovementManager* this, class CWeenieObject* arg2)

00524020  {
00524023      class CMotionInterp* motion_interpreter = this->motion_interpreter;
0052402c      this->weenie_obj = arg2;
0052402c      
0052402f      if (motion_interpreter != 0)
00524032          CMotionInterp::SetWeenieObject(motion_interpreter, arg2);
00524032      
00524037      class MoveToManager* moveto_manager = this->moveto_manager;
00524037      
0052403c      if (moveto_manager != 0)
0052403f          MoveToManager::SetWeenieObject(moveto_manager, arg2);
00524020  }

00524049                             90 90 90 90 90 90 90                                                           .......

00524050  class MovementManager* MovementManager::Create(class CPhysicsObj* arg1, class CWeenieObject* arg2)

00524050  {
00524054      void* result_1 = operator new(0x10);
0052405e      void* result;
0052405e      
0052405e      if (result_1 == 0)
0052407f          result = nullptr;
0052405e      else
0052405e      {
00524060          *(uint32_t*)result_1 = 0;
00524066          *(uint32_t*)((char*)result_1 + 4) = 0;
0052406d          *(uint32_t*)((char*)result_1 + 8) = 0;
00524074          *(uint32_t*)((char*)result_1 + 0xc) = 0;
0052407b          result = result_1;
0052405e      }
0052405e      
00524081      class CMotionInterp* ecx = *(uint32_t*)result;
00524089      *(uint32_t*)((char*)result + 8) = arg1;
00524089      
0052408c      if (ecx != 0)
0052408f          CMotionInterp::SetPhysicsObject(ecx, arg1);
0052408f      
00524094      class MoveToManager* ecx_1 = *(uint32_t*)((char*)result + 4);
00524094      
00524099      if (ecx_1 != 0)
0052409c          MoveToManager::SetPhysicsObject(ecx_1, arg1);
0052409c      
005240a1      class CMotionInterp* ecx_2 = *(uint32_t*)result;
005240a9      *(uint32_t*)((char*)result + 0xc) = arg2;
005240a9      
005240ac      if (ecx_2 != 0)
005240af          CMotionInterp::SetWeenieObject(ecx_2, arg2);
005240af      
005240b4      class MoveToManager* ecx_3 = *(uint32_t*)((char*)result + 4);
005240b4      
005240b9      if (ecx_3 != 0)
005240bc          MoveToManager::SetWeenieObject(ecx_3, arg2);
005240bc      
005240c5      return result;
00524050  }

005240c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005240d0  uint32_t __thiscall MovementManager::PerformMovement(class MovementManager* this, class MovementStruct const* arg2)

005240d0  {
005240d9      CPhysicsObj::set_active(this->physics_obj, 1);
005240e4      void* eax_1 = (arg2->type - 1);
005240e4      
005240e8      if (eax_1 > 8)
00524159          return 0x47;
00524159      
005240f1      switch (eax_1)
005240f1      {
005240fb          case nullptr:
005240fb          case 1:
005240fb          case 2:
005240fb          case 3:
005240fb          case 4:
005240fb          {
005240fb              if (this->motion_interpreter == 0)
005240fb              {
00524105                  class CMotionInterp* eax_3 = CMotionInterp::Create(this->physics_obj, this->weenie_obj);
00524110                  bool cond:0_1 = this->physics_obj == 0;
00524112                  this->motion_interpreter = eax_3;
00524112                  
00524114                  if (!(cond:0_1))
00524118                      CMotionInterp::enter_default_state(eax_3);
005240fb              }
005240fb              
00524127              return CMotionInterp::PerformMovement(this->motion_interpreter, arg2);
005240fb              break;
005240fb          }
0052412f          case 5:
0052412f          case 6:
0052412f          case 7:
0052412f          case 8:
0052412f          {
0052412f              if (this->moveto_manager == 0)
00524141                  this->moveto_manager = MoveToManager::Create(this->physics_obj, this->weenie_obj);
00524141              
00524148              MoveToManager::PerformMovement(this->moveto_manager, arg2);
0052414f              return 0;
0052412f              break;
0052412f          }
005240f1      }
005240d0  }

0052415c  uint32_t jump_table_52415c[0x2] = 
0052415c  {
0052415c      [0x0] =  0x005240f8
00524160      [0x1] =  0x0052412a
00524164  }
00524164  uint8_t lookup_table_524164[0x9] = 
00524164  {
00524164      [0x0] =  0x00
00524165      [0x1] =  0x00
00524166      [0x2] =  0x00
00524167      [0x3] =  0x00
00524168      [0x4] =  0x00
00524169      [0x5] =  0x01
0052416a      [0x6] =  0x01
0052416b      [0x7] =  0x01
0052416c      [0x8] =  0x01
0052416d  }

0052416d                                         90 90 90                                                               ...

00524170  void __thiscall MovementManager::move_to_interpreted_state(class MovementManager* this, class InterpretedMotionState const* arg2)

00524170  {
00524176      if (this->motion_interpreter == 0)
00524176      {
00524180          class CMotionInterp* eax_2 = CMotionInterp::Create(this->physics_obj, this->weenie_obj);
0052418b          bool cond:0_1 = this->physics_obj == 0;
0052418d          this->motion_interpreter = eax_2;
0052418d          
0052418f          if (!(cond:0_1))
00524193              CMotionInterp::enter_default_state(eax_2);
00524176      }
00524176      
0052419f      CMotionInterp::move_to_interpreted_state(this->motion_interpreter, arg2);
00524170  }

005241a8                          90 90 90 90 90 90 90 90                                                          ........

005241b0  void __fastcall MovementManager::CancelMoveTo(class MovementManager* this, uint32_t arg2)

005241b0  {
005241b0      class MoveToManager* moveto_manager = this->moveto_manager;
005241b0      
005241b5      if (moveto_manager == 0)
005241bc          return;
005241bc      
005241b7      uint32_t edx;
005241b7      /* tailcall */
005241b7      return MoveToManager::CancelMoveTo(moveto_manager, edx);
005241b0  }

005241bf                                                                                               90                                 .

005241c0  void __fastcall MovementManager::EnterDefaultState(class MovementManager* this)

005241c0  {
005241c3      class CPhysicsObj* physics_obj = this->physics_obj;
005241c3      
005241c8      if (physics_obj == 0)
005241f5          return;
005241f5      
005241cd      if (this->motion_interpreter == 0)
005241cd      {
005241d4          class CMotionInterp* eax = CMotionInterp::Create(physics_obj, this->weenie_obj);
005241df          bool cond:0_1 = this->physics_obj == 0;
005241e1          this->motion_interpreter = eax;
005241e1          
005241e3          if (!(cond:0_1))
005241e7              CMotionInterp::enter_default_state(eax);
005241cd      }
005241cd      
005241ef      /* tailcall */
005241ef      return CMotionInterp::enter_default_state(this->motion_interpreter);
005241c0  }

005241f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00524200  class RawMotionState const* __fastcall MovementManager::InqRawMotionState(class MovementManager* this)

00524200  {
00524206      if (this->motion_interpreter == 0)
00524206      {
00524210          class CMotionInterp* eax_2 = CMotionInterp::Create(this->physics_obj, this->weenie_obj);
0052421b          bool cond:0_1 = this->physics_obj == 0;
0052421d          this->motion_interpreter = eax_2;
0052421d          
0052421f          if (!(cond:0_1))
00524223              CMotionInterp::enter_default_state(eax_2);
00524206      }
00524206      
0052422e      return &this->motion_interpreter->raw_state;
00524200  }

0052422f                                               90                                                                 .

00524230  class InterpretedMotionState const* __fastcall MovementManager::InqInterpretedMotionState(class MovementManager* this)

00524230  {
00524236      if (this->motion_interpreter == 0)
00524236      {
00524240          class CMotionInterp* eax_2 = CMotionInterp::Create(this->physics_obj, this->weenie_obj);
0052424b          bool cond:0_1 = this->physics_obj == 0;
0052424d          this->motion_interpreter = eax_2;
0052424d          
0052424f          if (!(cond:0_1))
00524253              CMotionInterp::enter_default_state(eax_2);
00524236      }
00524236      
0052425e      return &this->motion_interpreter->interpreted_state;
00524230  }

0052425f                                                                                               90                                 .

00524260  int32_t __fastcall MovementManager::IsMovingTo(class MovementManager const* this)

00524260  {
00524260      class MoveToManager* moveto_manager = this->moveto_manager;
00524260      
00524265      if ((moveto_manager != 0 && MoveToManager::is_moving_to(moveto_manager) != 0))
00524275          return 1;
00524275      
00524278      return 0;
00524260  }

00524279                                                                             90 90 90 90 90 90 90                           .......

00524280  int32_t __fastcall MovementManager::motions_pending(class MovementManager const* this)

00524280  {
00524280      class CMotionInterp* motion_interpreter = this->motion_interpreter;
00524280      
00524284      if ((motion_interpreter != 0 && CMotionInterp::motions_pending(motion_interpreter) != 0))
00524294          return 1;
00524294      
00524297      return 0;
00524280  }

00524298                                                                          90 90 90 90 90 90 90 90                          ........

005242a0  class CMotionInterp* __fastcall MovementManager::get_minterp(class MovementManager* this)

005242a0  {
005242a6      if (this->motion_interpreter == 0)
005242a6      {
005242b0          class CMotionInterp* eax_2 = CMotionInterp::Create(this->physics_obj, this->weenie_obj);
005242bb          bool cond:0_1 = this->physics_obj == 0;
005242bd          this->motion_interpreter = eax_2;
005242bd          
005242bf          if (!(cond:0_1))
005242c3              CMotionInterp::enter_default_state(eax_2);
005242a6      }
005242a6      
005242cb      return this->motion_interpreter;
005242a0  }

005242cc                                      90 90 90 90                                                              ....

005242d0  void __thiscall MovementManager::MotionDone(class MovementManager* this, uint32_t arg2, int32_t arg3)

005242d0  {
005242d0      class CMotionInterp* motion_interpreter = this->motion_interpreter;
005242d0      
005242d4      if (motion_interpreter != 0)
005242d4      {
005242da          int32_t var_4_1 = arg3;
005242db          int32_t edx;
005242db          CMotionInterp::MotionDone(motion_interpreter, edx);
005242d4      }
005242d0  }

005242e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005242f0  void __fastcall MovementManager::UseTime(class MovementManager* this)

005242f0  {
005242f0      class MoveToManager* moveto_manager = this->moveto_manager;
005242f0      
005242f5      if (moveto_manager == 0)
005242fc          return;
005242fc      
005242f7      /* tailcall */
005242f7      return MoveToManager::UseTime(moveto_manager);
005242f0  }

005242fd                                                                                         90 90 90                               ...

00524300  void __fastcall MovementManager::HitGround(class MovementManager* this)

00524300  {
00524303      class CMotionInterp* motion_interpreter = this->motion_interpreter;
00524303      
00524307      if (motion_interpreter != 0)
00524309          CMotionInterp::HitGround(motion_interpreter);
00524309      
0052430e      class MoveToManager* moveto_manager = this->moveto_manager;
0052430e      
00524314      if (moveto_manager == 0)
0052431b          return;
0052431b      
00524316      /* tailcall */
00524316      return MoveToManager::HitGround(moveto_manager);
00524300  }

0052431c                                                                                      90 90 90 90                              ....

00524320  void __fastcall MovementManager::LeaveGround(class MovementManager* this)

00524320  {
00524323      class CMotionInterp* motion_interpreter = this->motion_interpreter;
00524323      
00524327      if (motion_interpreter != 0)
00524329          CMotionInterp::LeaveGround(motion_interpreter);
00524329      
0052432e      class MoveToManager* moveto_manager = this->moveto_manager;
0052432e      
00524334      if (moveto_manager == 0)
0052433b          return;
0052433b      
00524336      /* tailcall */
00524336      return IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(moveto_manager);
00524320  }

0052433c                                                                                      90 90 90 90                              ....

00524340  void __fastcall MovementManager::HandleEnterWorld(class MovementManager* this)

00524340  {
00524340      class CMotionInterp* motion_interpreter = this->motion_interpreter;
00524340      
00524344      if (motion_interpreter == 0)
0052434b          return;
0052434b      
00524346      /* tailcall */
00524346      return IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(motion_interpreter);
00524340  }

0052434c                                      90 90 90 90                                                              ....

00524350  void __fastcall MovementManager::HandleExitWorld(class MovementManager* this)

00524350  {
00524350      class CMotionInterp* motion_interpreter = this->motion_interpreter;
00524350      
00524354      if (motion_interpreter == 0)
0052435b          return;
0052435b      
00524356      /* tailcall */
00524356      return CMotionInterp::HandleExitWorld(motion_interpreter);
00524350  }

0052435c                                                                                      90 90 90 90                              ....

00524360  void __fastcall MovementManager::ReportExhaustion(class MovementManager* this)

00524360  {
00524363      class CMotionInterp* motion_interpreter = this->motion_interpreter;
00524363      
00524367      if (motion_interpreter != 0)
00524369          CMotionInterp::ReportExhaustion(motion_interpreter);
00524369      
0052436e      class MoveToManager* moveto_manager = this->moveto_manager;
0052436e      
00524374      if (moveto_manager == 0)
0052437b          return;
0052437b      
00524376      /* tailcall */
00524376      return IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(moveto_manager);
00524360  }

0052437c                                                                                      90 90 90 90                              ....

00524380  void __fastcall MovementParameters::MovementParameters(class MovementParameters* this)

00524380  {
0052438e      this->min_distance = 0f;
00524397      this->distance_to_object = 0.600000024f;
0052439c      this->fail_distance = 3.40282347e+38f;
005243a5      this->vtable = 0x7c83f8;
005243ab      this->desired_heading = 0f;
005243ae      this->speed = 1f;
005243b5      this->walk_run_threshhold = 15f;
005243b8      this->context_id = 0;
005243bb      this->hold_key_to_apply = HoldKey_Invalid;
005243be      this->action_stamp = 0;
005243c1      union MovementParameters::set_moveto_flags::normal_bitfield::~normal_bitfield_1 = (*(uint32_t*)MovementParameters::set_moveto_flags::normal_bitfield::~normal_bitfield);
005243c1      
005243c9      if (MovementParameters::set_moveto_flags::normal_bitfield::~normal_bitfield_1 != 0)
005243c9      {
005243cb          this->__inner0 = MovementParameters::set_moveto_flags::normal_bitfield::~normal_bitfield_1;
005243ce          return;
005243c9      }
005243c9      
005243d8      union ecx_2 = ((this->__inner0 & 0xfffdee0f) | 0x1ee0f);
005243de      this->__inner0 = ecx_2;
005243e1      (*(uint32_t*)MovementParameters::set_moveto_flags::normal_bitfield::~normal_bitfield) = ecx_2;
00524380  }

005243e8                          90 90 90 90 90 90 90 90                                                          ........

005243f0  void __fastcall MovementManager::Destroy(class MovementManager* this)

005243f0  {
005243f4      class CMotionInterp* motion_interpreter = this->motion_interpreter;
005243f4      
005243f8      if (motion_interpreter != 0)
005243f8      {
005243fc          CMotionInterp::~CMotionInterp(motion_interpreter);
00524402          operator delete(motion_interpreter);
005243f8      }
005243f8      
0052440a      class MoveToManager* moveto_manager = this->moveto_manager;
0052440f      this->motion_interpreter = 0;
0052440f      
00524415      if (moveto_manager != 0)
00524415      {
00524419          MoveToManager::~MoveToManager(moveto_manager);
0052441f          operator delete(moveto_manager);
00524415      }
00524415      
00524428      this->moveto_manager = nullptr;
005243f0  }

00524431                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00524440  int32_t __thiscall MovementManager::unpack_movement(class MovementManager* this, void** arg2, uint32_t arg3)

00524440  {
0052444f      if (this->motion_interpreter != 0)
0052444f      {
00524455          class CPhysicsObj* physics_obj = this->physics_obj;
00524455          
0052445a          if (physics_obj != 0)
0052445a          {
00524460              CPhysicsObj::interrupt_current_movement(physics_obj);
00524468              CPhysicsObj::unstick_from_object(this->physics_obj);
00524471              int32_t var_70 = 0x796910;
00524479              int32_t var_6c_1 = 0;
00524481              int32_t var_68 = 0x3f800000;
00524489              int32_t var_64_1 = 0;
00524491              int32_t var_60_1 = 0;
00524499              int32_t var_5c_1 = 0;
005244a1              int32_t var_34_1 = 0;
005244ac              int32_t var_30_1 = 0;
005244b7              int32_t var_2c_1 = 0;
005244c2              Frame::cache(&var_68);
005244cb              void var_9c;
005244cb              MovementParameters::MovementParameters(&var_9c);
005244d7              void var_28;
005244d7              InterpretedMotionState::InterpretedMotionState(&var_28);
005244e3              void* eax_1 = *(uint32_t*)arg2;
005244e7              int16_t ecx_4 = *(uint16_t*)eax_1;
005244ed              *(uint32_t*)arg2 = ((char*)eax_1 + 2);
005244ef              uint32_t ebp_1 = ((uint32_t)ecx_4);
005244f5              int16_t var_a4_1 = ecx_4;
005244f9              ecx_4 = *(uint16_t*)((char*)eax_1 + 2);
005244fd              *(uint32_t*)arg2 = ((char*)eax_1 + 4);
00524502              uint32_t ecx_5 = command_ids[((uint32_t)ecx_4)];
00524502              
00524522              if (CBaseFilter::GetPinVersion(this->motion_interpreter) != ecx_5)
0052452c                  CMotionInterp::DoMotion(this->motion_interpreter, ecx_5, &var_9c);
0052452c              
0052453a              void* var_b8_15;
0052453a              
0052453a              switch (((uint32_t)ebp_1))
0052453a              {
00524551                  case 0:
00524551                  {
00524551                      InterpretedMotionState::UnPack(&var_28, arg2, arg3);
0052455d                      uint32_t ebx_3;
0052455d                      
0052455d                      if ((*(uint8_t*)((char*)var_a4_1)[1] & 1) == 0)
0052456a                          ebx_3 = 0;
0052455d                      else
0052455d                      {
0052455f                          uint32_t* eax_8 = *(uint32_t*)arg2;
00524561                          ebx_3 = *(uint32_t*)eax_8;
00524566                          *(uint32_t*)arg2 = &eax_8[1];
0052455d                      }
0052455d                      
0052457c                      MovementManager::move_to_interpreted_state(this, &var_28);
0052457c                      
00524583                      if (ebx_3 != 0)
00524589                          CPhysicsObj::stick_to_object(this->physics_obj, ebx_3);
00524589                      
0052458e                      this->motion_interpreter->standing_longjump = (ebp_1 & 0x200);
0052459a                      InterpretedMotionState::~InterpretedMotionState(&var_28);
005245ae                      return 1;
00524551                      break;
00524551                  }
005245b3                  case 6:
005245b3                  {
005245b3                      MovementManager::MakeMoveToManager(this);
005245b8                      void* eax_11 = *(uint32_t*)arg2;
005245ba                      uint32_t ebx_4 = *(uint32_t*)eax_11;
005245cc                      *(uint32_t*)arg2 = ((char*)eax_11 + 4);
005245ce                      Position::UnPackOrigin(&var_70, arg2, arg3);
005245db                      MovementParameters::UnPackNet(&var_9c, MoveToObject, arg2, arg3);
005245e0                      void* eax_13 = *(uint32_t*)arg2;
005245e2                      long double x87_r7 = ((long double)*(uint32_t*)eax_13);
005245e7                      *(uint32_t*)arg2 = ((char*)eax_13 + 4);
005245e9                      this->motion_interpreter->my_run_rate = ((float)x87_r7);
005245e9                      
005245f9                      if (CPhysicsObj::GetObjectA(ebx_4) == 0)
005245f9                          goto label_524668;
005245f9                      
00524604                      CPhysicsObj::MoveToObject(this->physics_obj, ebx_4, &var_9c);
00524610                      InterpretedMotionState::~InterpretedMotionState(&var_28);
00524624                      return 1;
005245b3                      break;
005245b3                  }
00524629                  case 7:
00524629                  {
00524629                      MovementManager::MakeMoveToManager(this);
0052463b                      Position::UnPackOrigin(&var_70, arg2, arg3);
00524648                      MovementParameters::UnPackNet(&var_9c, MoveToPosition, arg2, arg3);
0052464d                      void* eax_18 = *(uint32_t*)arg2;
0052464f                      long double x87_r7_1 = ((long double)*(uint32_t*)eax_18);
00524654                      *(uint32_t*)arg2 = ((char*)eax_18 + 4);
00524656                      this->motion_interpreter->my_run_rate = ((float)x87_r7_1);
00524668                  label_524668:
00524668                      MoveToManager::MoveToPosition(this->moveto_manager, &var_70, &var_9c);
00524674                      InterpretedMotionState::~InterpretedMotionState(&var_28);
00524688                      return 1;
00524629                      break;
00524629                  }
0052468d                  case 8:
0052468d                  {
0052468d                      MovementManager::MakeMoveToManager(this);
00524692                      void* eax_21 = *(uint32_t*)arg2;
00524694                      uint32_t ebx_6 = *(uint32_t*)eax_21;
005246a0                      *(uint32_t*)arg2 = ((char*)eax_21 + 4);
005246a2                      int32_t ecx_25 = *(uint32_t*)((char*)eax_21 + 4);
005246b3                      *(uint32_t*)arg2 = ((char*)eax_21 + 8);
005246b5                      MovementParameters::UnPackNet(&var_9c, TurnToObject, arg2, arg3);
005246b5                      
005246c5                      if (CPhysicsObj::GetObjectA(ebx_6) == 0)
005246c5                      {
005246fb                          int32_t var_8c_1 = ecx_25;
005246ff                          var_b8_15 = &var_9c;
005246c5                          goto label_524725;
005246c5                      }
005246c5                      
005246d0                      CPhysicsObj::TurnToObject(this->physics_obj, ebx_6, &var_9c);
005246dc                      InterpretedMotionState::~InterpretedMotionState(&var_28);
005246f0                      return 1;
0052468d                      break;
0052468d                  }
00524704                  case 9:
00524704                  {
00524704                      MovementManager::MakeMoveToManager(this);
00524718                      MovementParameters::UnPackNet(&var_9c, TurnToHeading, arg2, arg3);
00524721                      var_b8_15 = &var_9c;
00524725                  label_524725:
00524725                      MoveToManager::TurnToHeading(this->moveto_manager, var_b8_15);
00524731                      InterpretedMotionState::~InterpretedMotionState(&var_28);
00524745                      return 1;
00524704                      break;
00524704                  }
0052453a              }
0052453a              
0052474f              InterpretedMotionState::~InterpretedMotionState(&var_28);
0052445a          }
0052444f      }
0052444f      
00524760      return 0;
00524440  }

00524763           90                                                                                         .
00524764  uint32_t jump_table_524764[0xa] = 
00524764  {
00524764      [0x0] =  0x00524541
00524768      [0x1] =  0x00524748
0052476c      [0x2] =  0x00524748
00524770      [0x3] =  0x00524748
00524774      [0x4] =  0x00524748
00524778      [0x5] =  0x00524748
0052477c      [0x6] =  0x005245b1
00524780      [0x7] =  0x00524627
00524784      [0x8] =  0x0052468b
00524788      [0x9] =  0x00524702
0052478c  }

0052478c                                      90 90 90 90                                                              ....

00524790  void __fastcall MovementManager::HandleUpdateTarget(class MovementManager* this, class TargetInfo arg2)

00524790  {
00524790      class MoveToManager* moveto_manager = this->moveto_manager;
00524790      
00524795      if (moveto_manager != 0)
0052479c          MoveToManager::HandleUpdateTarget(moveto_manager, &arg2);
00524790  }

005247a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005247b0  class AFrame* __thiscall AnimSequenceNode::get_pos_frame(class AnimSequenceNode const* this, double arg2)

005247b0  {
005247bd      floor(arg2, *(uint32_t*)((char*)arg2)[4]);
005247d4      return AnimSequenceNode::get_pos_frame(this, _ftol2());
005247b0  }

005247d7                                                                       90 90 90 90 90 90 90 90 90                         .........

005247e0  void* __thiscall CAnimHook::`scalar deleting destructor'(class CAnimHook* this, uint32_t arg2)

005247e0  {
005247e8      this->vtable = 0x7c84a0;
005247e8      
005247ee      if ((arg2 & 1) != 0)
005247f1          operator delete(this);
005247f1      
005247fc      return this;
005247e0  }

005247ff                                                                                               90                                 .

00524800  int32_t TChessPiece<CBasePiece>::bCanGoTo(class TChessPiece<CBasePiece>* this @ ecx, int32_t arg2, int32_t arg3) __pure

00524800  {
00524805      return 1;
00524800  }

00524808                          90 90 90 90 90 90 90 90                                                          ........

00524810  enum NodeNameType FileNodeName_Float::GetType(class FileNodeName_Float const* this @ ecx) __pure

00524810  {
00524815      return 4;
00524810  }

00524816                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00524820  void __thiscall DBObj::SetDID(class DBObj* this, class IDClass<_tagDataID,32,0> arg2)

00524820  {
00524824      this->m_DID.id = arg2;
00524820  }

0052482a                                90 90 90 90 90 90                                                            ......

00524830  void __thiscall CSequence::execute_hooks(class CSequence const* this, class AnimFrame const* arg2, int32_t arg3)

00524830  {
00524838      if (this->hook_obj != 0)
00524838      {
00524844          for (class CAnimHook* i = arg2->hooks; i != 0; i = i->next_hook)
00524844          {
00524850              int32_t direction_ = i->direction_;
00524850              
00524859              if ((direction_ == 0 || arg3 == direction_))
0052485f                  CPhysicsObj::add_anim_hook(this->hook_obj, i);
00524844          }
00524838      }
00524830  }

0052484d                                         8d 49 00                                                               .I.
00524871                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00524880  void __thiscall CSequence::set_velocity(class CSequence* this, class AC1Legacy::Vector3 const* arg2)

00524880  {
00524886      this->velocity.x = arg2->x;
00524886      this->velocity.y = arg2->y;
00524886      this->velocity.z = arg2->z;
00524880  }

0052489a                                                                                90 90 90 90 90 90                            ......

005248a0  void __thiscall CSequence::set_omega(class CSequence* this, class AC1Legacy::Vector3 const* arg2)

005248a0  {
005248a6      this->omega.x = arg2->x;
005248a6      this->omega.y = arg2->y;
005248a6      this->omega.z = arg2->z;
005248a0  }

005248ba                                                                                90 90 90 90 90 90                            ......

005248c0  void __thiscall CSequence::combine_physics(class CSequence* this, class AC1Legacy::Vector3 const* arg2, class AC1Legacy::Vector3 const* arg3)

005248c0  {
005248c3      float* eax = arg2;
005248c9      this->velocity.x = ((float)(((long double)this->velocity.x) + ((long double)*(uint32_t*)eax)));
005248d2      this->velocity.y = ((float)(((long double)eax[1]) + ((long double)this->velocity.y)));
005248df      this->velocity.z = ((float)(((long double)eax[2]) + ((long double)this->velocity.z)));
005248e7      this->omega.x = ((float)(((long double)this->omega.x) + ((long double)arg3->x)));
005248f0      this->omega.y = ((float)(((long double)arg3->y) + ((long double)this->omega.y)));
005248f9      this->omega.z = ((float)(((long double)arg3->z) + ((long double)this->omega.z)));
005248c0  }

005248ff                                                                                               90                                 .

00524900  void __thiscall CSequence::subtract_physics(class CSequence* this, class AC1Legacy::Vector3 const* arg2, class AC1Legacy::Vector3 const* arg3)

00524900  {
00524903      float* eax = arg2;
00524909      this->velocity.x = ((float)(((long double)this->velocity.x) - ((long double)*(uint32_t*)eax)));
00524912      this->velocity.y = ((float)(((long double)this->velocity.y) - ((long double)eax[1])));
0052491f      this->velocity.z = ((float)(((long double)this->velocity.z) - ((long double)eax[2])));
00524927      this->omega.x = ((float)(((long double)this->omega.x) - ((long double)arg3->x)));
00524930      this->omega.y = ((float)(((long double)this->omega.y) - ((long double)arg3->y)));
00524939      this->omega.z = ((float)(((long double)this->omega.z) - ((long double)arg3->z)));
00524900  }

0052493f                                                                                               90                                 .

00524940  void __thiscall CSequence::multiply_cyclic_animation_fr(class CSequence* this, float arg2)

00524940  {
00524946      for (class AnimSequenceNode* first_cyclic = this->first_cyclic; first_cyclic != 0; first_cyclic = AnimSequenceNode::GetNext(first_cyclic))
00524953          AnimSequenceNode::multiply_framerate(first_cyclic, arg2);
00524940  }

0052496a                                90 90 90 90 90 90                                                            ......

00524970  class AnimFrame const* __fastcall CSequence::get_curr_animframe(class CSequence const* this)

00524970  {
00524974      class AnimSequenceNode* curr_anim = this->curr_anim;
00524974      
00524979      if (curr_anim == 0)
005249af          return this->placement_frame;
005249af      
0052497b      int32_t eax = this->frame_number;
0052497e      int32_t ecx = *(uint32_t*)((char*)this->frame_number)[4];
00524985      int32_t var_8 = eax;
00524989      int32_t var_4 = ecx;
0052498d      floor(eax, ecx);
005249a7      return AnimSequenceNode::get_part_frame(curr_anim, _ftol2());
00524970  }


005249b0  void __thiscall CSequence::set_placement_frame(class CSequence* this, class AnimFrame const* arg2, uint32_t arg3)

005249b0  {
005249b8      this->placement_frame = arg2;
005249bb      this->placement_frame_id = arg3;
005249b0  }

005249c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005249d0  uint32_t __fastcall CSequence::get_curr_frame_number(class CSequence const* this)

005249d0  {
005249d8      floor(this->frame_number, *(uint32_t*)((char*)this->frame_number)[4]);
005249e1      /* tailcall */
005249e1      return _ftol2();
005249d0  }

005249e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005249f0  void __fastcall CSequence::CSequence(class CSequence* this)

005249f0  {
005249f4      this->vtable = 0x7c84d8;
005249fa      __builtin_memset(&this->anim_list, 0, 0x28);
00524a18      __builtin_memset(&this->frame_number, 0, 0x18);
005249f0  }

00524a2b                                   90 90 90 90 90                                                             .....

00524a30  void __fastcall CSequence::~CSequence(class CSequence* this)

00524a30  {
00524a39      bool cond:0 = this->anim_list.head_ == 0;
00524a3b      this->vtable = 0x7c84d8;
00524a3b      
00524a41      if (!(cond:0))
00524a41      {
00524a99          do
00524a99          {
00524a43              class DLListData* head_ = this->anim_list.head_;
00524a43              
00524a48              if (head_ != 0)
00524a48              {
00524a4a                  class DLListData* dllist_prev = head_->dllist_prev;
00524a4a                  
00524a4f                  if (dllist_prev == 0)
00524a4f                  {
00524a57                      class DLListData* dllist_next = head_->dllist_next;
00524a5b                      this->anim_list.head_ = dllist_next;
00524a5b                      
00524a5e                      if (dllist_next != 0)
00524a60                          dllist_next->dllist_prev = nullptr;
00524a4f                  }
00524a4f                  else
00524a53                      dllist_prev->dllist_next = head_->dllist_next;
00524a53                  
00524a63                  class DLListData* dllist_next_1 = head_->dllist_next;
00524a63                  
00524a67                  if (dllist_next_1 == 0)
00524a67                  {
00524a74                      class DLListData* dllist_prev_1 = this->anim_list.tail_->dllist_prev;
00524a79                      this->anim_list.tail_ = dllist_prev_1;
00524a79                      
00524a7c                      if (dllist_prev_1 != 0)
00524a7e                          dllist_prev_1->dllist_next = 0;
00524a67                  }
00524a67                  else
00524a6c                      dllist_next_1->dllist_prev = head_->dllist_prev;
00524a6c                  
00524a82                  head_->dllist_next = 0;
00524a84                  head_->dllist_prev = nullptr;
00524a84                  
00524a8e                  if ((head_ != 0 && head_ != 4))
00524a94                      *(uint32_t*)head_->dllist_next(1);
00524a48              }
00524a99          } while (this->anim_list.head_ != 0);
00524a41      }
00524a41      
00524a9c      this->vtable = 0x79285c;
00524a30  }

00524aa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00524ab0  void __thiscall CSequence::apply_physics(class CSequence const* this, class Frame* arg2, double arg3, double arg4)

00524ab0  {
00524ab0      long double x87_r7 = ((long double)arg4);
00524ab7      long double temp1 = ((long double)0.0);
00524ab7      (x87_r7 - temp1);
00524ac1      long double x87_r7_2 = fabsl(((long double)arg3));
00524ac1      
00524ac8      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 1) != 0)
00524aca          x87_r7_2 = -(x87_r7_2);
00524aca      
00524af1      arg2->m_fOrigin.x = ((float)((x87_r7_2 * ((long double)this->velocity.x)) + ((long double)arg2->m_fOrigin.x)));
00524afb      arg2->m_fOrigin.y = ((float)(((long double)((float)(x87_r7_2 * ((long double)this->velocity.y)))) + ((long double)arg2->m_fOrigin.y)));
00524b05      arg2->m_fOrigin.z = ((float)(((long double)((float)(x87_r7_2 * ((long double)this->velocity.z)))) + ((long double)arg2->m_fOrigin.z)));
00524b0f      long double x87_r5_5 = (x87_r7_2 * ((long double)this->omega.y));
00524b1f      float var_10_1 = ((float)(x87_r7_2 * ((long double)this->omega.z)));
00524b23      float var_18 = ((float)(x87_r7_2 * ((long double)this->omega.x)));
00524b29      float var_14_1 = ((float)x87_r5_5);
00524b2d      Frame::rotate(arg2, &var_18);
00524ab0  }

00524b38                                                                          90 90 90 90 90 90 90 90                          ........

00524b40  void __fastcall CSequence::apricot(class CSequence* this)

00524b40  {
00524b43      class DLListData* head_ = this->anim_list.head_;
00524b4b      void* __offset(DLListData, -0x4) i;
00524b4b      
00524b4b      if (head_ == 0)
00524b52          i = nullptr;
00524b4b      else
00524b4d          i = ((char*)head_ - 4);
00524b4d      
00524b57      if (i != this->curr_anim)
00524b57      {
00524b59          int32_t ebx;
00524b59          int32_t var_c_1 = ebx;
00524b59          
00524b63          while (i != this->first_cyclic)
00524b63          {
00524b67              class DLListData* eax;
00524b67              
00524b67              if (i == 0)
00524b6e                  eax = nullptr;
00524b67              else
00524b69                  eax = ((char*)i + 4);
00524b69              
00524b70              class DLListData* dllist_prev = eax->dllist_prev;
00524b70              
00524b75              if (dllist_prev == 0)
00524b75              {
00524b80                  class DLListData* dllist_next = this->anim_list.head_->dllist_next;
00524b84                  this->anim_list.head_ = dllist_next;
00524b84                  
00524b87                  if (dllist_next != 0)
00524b89                      dllist_next->dllist_prev = nullptr;
00524b75              }
00524b75              else
00524b79                  dllist_prev->dllist_next = eax->dllist_next;
00524b79              
00524b8c              class DLListData* dllist_next_1 = eax->dllist_next;
00524b8c              
00524b90              if (dllist_next_1 == 0)
00524b90              {
00524b9d                  class DLListData* dllist_prev_1 = this->anim_list.tail_->dllist_prev;
00524ba2                  this->anim_list.tail_ = dllist_prev_1;
00524ba2                  
00524ba5                  if (dllist_prev_1 != 0)
00524ba7                      dllist_prev_1->dllist_next = 0;
00524b90              }
00524b90              else
00524b95                  dllist_next_1->dllist_prev = eax->dllist_prev;
00524b95              
00524bab              eax->dllist_next = 0;
00524bad              eax->dllist_prev = nullptr;
00524bad              
00524bb0              if (i != 0)
00524bb6                  *(uint32_t*)ADJ(i)->dllist_next(1);
00524bb6              
00524bb8              class DLListData* head__1 = this->anim_list.head_;
00524bb8              
00524bbd              if (head__1 == 0)
00524bc4                  i = nullptr;
00524bbd              else
00524bbf                  i = ((char*)head__1 - 4);
00524bbf              
00524bc9              if (i == this->curr_anim)
00524bc9                  break;
00524b63          }
00524b57      }
00524b40  }

00524bcf                                               90                                                                 .

00524bd0  int32_t __fastcall CSequence::has_anims(class CSequence const* this)

00524bd0  {
00524bd7      int32_t result;
00524bd7      result = this->anim_list.head_ != 0;
00524bda      return result;
00524bd0  }

00524bdb                                                                                   90 90 90 90 90                             .....

00524be0  void __thiscall CSequence::remove_link_animations(class CSequence* this, uint32_t arg2)

00524be0  {
00524be8      int32_t ebp = 0;
00524be8      
00524bef      if (arg2 > 0)
00524bef      {
00524c89          do
00524c89          {
00524c00              if (AnimSequenceNode::GetPrev(this->first_cyclic) == 0)
00524c00                  break;
00524c00              
00524c11              if (AnimSequenceNode::GetPrev(this->first_cyclic) == this->curr_anim)
00524c11              {
00524c13                  class AnimSequenceNode* first_cyclic = this->first_cyclic;
00524c18                  this->curr_anim = first_cyclic;
00524c18                  
00524c1b                  if (first_cyclic != 0)
00524c22                      this->frame_number = ((double)AnimSequenceNode::get_starting_frame(first_cyclic));
00524c11              }
00524c11              
00524c28              class AnimSequenceNode* eax_2 = AnimSequenceNode::GetPrev(this->first_cyclic);
00524c2f              class DLListData** edx_1;
00524c2f              
00524c2f              if (eax_2 == 0)
00524c36                  edx_1 = nullptr;
00524c2f              else
00524c31                  edx_1 = &eax_2->dllist_next;
00524c31              
00524c38              class DLListData* dllist_prev = ADJ(edx_1)->dllist_prev;
00524c38              
00524c3d              if (dllist_prev == 0)
00524c3d              {
00524c48                  class DLListData* dllist_next = this->anim_list.head_->dllist_next;
00524c4c                  this->anim_list.head_ = dllist_next;
00524c4c                  
00524c4f                  if (dllist_next != 0)
00524c51                      dllist_next->dllist_prev = nullptr;
00524c3d              }
00524c3d              else
00524c41                  dllist_prev->dllist_next = ADJ(edx_1)->dllist_next;
00524c41              
00524c54              class DLListData* dllist_next_1 = ADJ(edx_1)->dllist_next;
00524c54              
00524c58              if (dllist_next_1 == 0)
00524c58              {
00524c65                  class DLListData* dllist_prev_1 = this->anim_list.tail_->dllist_prev;
00524c6a                  this->anim_list.tail_ = dllist_prev_1;
00524c6a                  
00524c6d                  if (dllist_prev_1 != 0)
00524c6f                      dllist_prev_1->dllist_next = 0;
00524c58              }
00524c58              else
00524c5d                  dllist_next_1->dllist_prev = ADJ(edx_1)->dllist_prev;
00524c5d              
00524c7a              ADJ(edx_1)->dllist_next = nullptr;
00524c7a              ADJ(edx_1)->dllist_prev = nullptr;
00524c7a              
00524c78              if (eax_2 != 0)
00524c7a                  eax_2->vtable->__vecDelDtor(1);
00524c7a              
00524c86              ebp += 1;
00524c89          } while (ebp < arg2);
00524bef      }
00524be0  }

00524c96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00524ca0  void __fastcall CSequence::remove_all_link_animations(class CSequence* this)

00524ca0  {
00524ca4      class AnimSequenceNode* first_cyclic = this->first_cyclic;
00524ca4      
00524cab      if ((first_cyclic != 0 && AnimSequenceNode::GetPrev(first_cyclic) != 0))
00524cab      {
00524d46          class AnimSequenceNode* i;
00524d46          
00524d46          do
00524d46          {
00524ccb              if (AnimSequenceNode::GetPrev(this->first_cyclic) == this->curr_anim)
00524ccb              {
00524ccd                  class AnimSequenceNode* first_cyclic_1 = this->first_cyclic;
00524cd2                  this->curr_anim = first_cyclic_1;
00524cd2                  
00524cd5                  if (first_cyclic_1 != 0)
00524cdc                      this->frame_number = ((double)AnimSequenceNode::get_starting_frame(first_cyclic_1));
00524ccb              }
00524ccb              
00524ce2              class AnimSequenceNode* eax_3 = AnimSequenceNode::GetPrev(this->first_cyclic);
00524ce9              class DLListData** edx_1;
00524ce9              
00524ce9              if (eax_3 == 0)
00524cf0                  edx_1 = nullptr;
00524ce9              else
00524ceb                  edx_1 = &eax_3->dllist_next;
00524ceb              
00524cf2              class DLListData* dllist_prev = ADJ(edx_1)->dllist_prev;
00524cf2              
00524cf7              if (dllist_prev == 0)
00524cf7              {
00524d02                  class DLListData* dllist_next = this->anim_list.head_->dllist_next;
00524d06                  this->anim_list.head_ = dllist_next;
00524d06                  
00524d09                  if (dllist_next != 0)
00524d0b                      dllist_next->dllist_prev = nullptr;
00524cf7              }
00524cf7              else
00524cfb                  dllist_prev->dllist_next = ADJ(edx_1)->dllist_next;
00524cfb              
00524d0e              class DLListData* dllist_next_1 = ADJ(edx_1)->dllist_next;
00524d0e              
00524d12              if (dllist_next_1 == 0)
00524d12              {
00524d1f                  class DLListData* dllist_prev_1 = this->anim_list.tail_->dllist_prev;
00524d24                  this->anim_list.tail_ = dllist_prev_1;
00524d24                  
00524d27                  if (dllist_prev_1 != 0)
00524d29                      dllist_prev_1->dllist_next = 0;
00524d12              }
00524d12              else
00524d17                  dllist_next_1->dllist_prev = ADJ(edx_1)->dllist_prev;
00524d17              
00524d4c              ADJ(edx_1)->dllist_next = nullptr;
00524d4c              ADJ(edx_1)->dllist_prev = nullptr;
00524d4c              
00524d32              if (eax_3 != 0)
00524d34                  eax_3->vtable->__vecDelDtor(1);
00524d34              
00524d3f              i = AnimSequenceNode::GetPrev(this->first_cyclic);
00524d46          } while (i != 0);
00524cab      }
00524ca0  }


00524d50  void __fastcall CSequence::clear_physics(class CSequence* this)

00524d50  {
00524d53      this->velocity.x = 0;
00524d53      this->velocity.y = 0f;
00524d53      this->velocity.z = 0f;
00524d8e      this->omega.x = 0;
00524d8e      this->omega.y = 0f;
00524d8e      this->omega.z = 0f;
00524d50  }

00524db5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00524dc0  void __fastcall CSequence::clear_animations(class CSequence* this)

00524dc0  {
00524dcb      while (this->anim_list.head_ != 0)
00524dcb      {
00524dd0          class DLListData* head_ = this->anim_list.head_;
00524dd0          
00524dd5          if (head_ != 0)
00524dd5          {
00524dd7              class DLListData* dllist_prev = head_->dllist_prev;
00524dd7              
00524ddc              if (dllist_prev == 0)
00524ddc              {
00524de4                  class DLListData* dllist_next = head_->dllist_next;
00524de8                  this->anim_list.head_ = dllist_next;
00524de8                  
00524deb                  if (dllist_next != 0)
00524ded                      dllist_next->dllist_prev = nullptr;
00524ddc              }
00524ddc              else
00524de0                  dllist_prev->dllist_next = head_->dllist_next;
00524de0              
00524df0              class DLListData* dllist_next_1 = head_->dllist_next;
00524df0              
00524df4              if (dllist_next_1 == 0)
00524df4              {
00524e01                  class DLListData* dllist_prev_1 = this->anim_list.tail_->dllist_prev;
00524e06                  this->anim_list.tail_ = dllist_prev_1;
00524e06                  
00524e09                  if (dllist_prev_1 != 0)
00524e0b                      dllist_prev_1->dllist_next = 0;
00524df4              }
00524df4              else
00524df9                  dllist_next_1->dllist_prev = head_->dllist_prev;
00524df9              
00524e0f              head_->dllist_next = 0;
00524e11              head_->dllist_prev = nullptr;
00524e11              
00524e1b              if ((head_ != 0 && head_ != 4))
00524e21                  *(uint32_t*)head_->dllist_next(1);
00524dd5          }
00524dcb      }
00524dcb      
00524e28      this->first_cyclic = nullptr;
00524e2b      this->frame_number = 0f;
00524e2e      *(uint32_t*)((char*)this->frame_number)[4] = 0;
00524e31      this->curr_anim = nullptr;
00524dc0  }

00524e37                                                                       90 90 90 90 90 90 90 90 90                         .........

00524e40  void __fastcall CSequence::remove_cyclic_anims(class CSequence* this)

00524e40  {
00524e46      class CSequence* this_1 = this;
00524e53      class AnimSequenceNode* first_cyclic_1;
00524e53      
00524e53      for (class AnimSequenceNode* first_cyclic = this->first_cyclic; first_cyclic != 0; first_cyclic = first_cyclic_1)
00524e53      {
00524e63          if (this->curr_anim == first_cyclic)
00524e63          {
00524e67              class AnimSequenceNode* eax_1 = AnimSequenceNode::GetPrev(first_cyclic);
00524e6e              this->curr_anim = eax_1;
00524e6e              
00524e71              if (eax_1 == 0)
00524e71              {
00524e7f                  this->frame_number = 0f;
00524e82                  *(uint32_t*)((char*)this->frame_number)[4] = 0;
00524e71              }
00524e71              else
00524e7a                  this->frame_number = ((double)AnimSequenceNode::get_ending_frame(eax_1));
00524e63          }
00524e63          
00524e87          first_cyclic_1 = AnimSequenceNode::GetNext(first_cyclic);
00524e92          class DLListData** eax_2;
00524e92          
00524e92          if (first_cyclic == 0)
00524e99              eax_2 = nullptr;
00524e92          else
00524e94              eax_2 = &first_cyclic->dllist_next;
00524e94          
00524e9b          class DLListData* dllist_prev = ADJ(eax_2)->dllist_prev;
00524e9b          
00524ea0          if (dllist_prev == 0)
00524ea0          {
00524eab              class DLListData* dllist_next = this->anim_list.head_->dllist_next;
00524eaf              this->anim_list.head_ = dllist_next;
00524eaf              
00524eb2              if (dllist_next != 0)
00524eb4                  dllist_next->dllist_prev = nullptr;
00524ea0          }
00524ea0          else
00524ea4              dllist_prev->dllist_next = ADJ(eax_2)->dllist_next;
00524ea4          
00524eb7          class DLListData* dllist_next_1 = ADJ(eax_2)->dllist_next;
00524eb7          
00524ebb          if (dllist_next_1 == 0)
00524ebb          {
00524ec8              class DLListData* dllist_prev_1 = this->anim_list.tail_->dllist_prev;
00524ecd              this->anim_list.tail_ = dllist_prev_1;
00524ecd              
00524ed0              if (dllist_prev_1 != 0)
00524ed2                  dllist_prev_1->dllist_next = 0;
00524ebb          }
00524ebb          else
00524ec0              dllist_next_1->dllist_prev = ADJ(eax_2)->dllist_prev;
00524ec0          
00524edd          ADJ(eax_2)->dllist_next = nullptr;
00524edd          ADJ(eax_2)->dllist_prev = nullptr;
00524edd          
00524edb          if (first_cyclic != 0)
00524edd              first_cyclic->vtable->__vecDelDtor(1);
00524e53      }
00524e53      
00524ef1      class DLListData* tail_ = this->anim_list.tail_;
00524ef1      
00524ef6      if (tail_ != 0)
00524ef6      {
00524efb          this->first_cyclic = ((char*)tail_ - 4);
00524f04          return;
00524ef6      }
00524ef6      
00524f08      this->first_cyclic = nullptr;
00524e40  }

00524f11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00524f20  uint32_t __thiscall CSequence::pack_size(class CSequence* this, uint32_t* arg2, uint32_t* arg3)

00524f20  {
00524f21      uint32_t* ebx = arg3;
00524f28      uint32_t* ecx = arg2;
00524f2c      *(uint32_t*)ecx = 0;
00524f32      *(uint32_t*)ebx = 0;
00524f38      class DLListData* head_ = this->anim_list.head_;
00524f3f      arg3 = nullptr;
00524f47      int32_t edi = 4;
00524f4c      int32_t edi_1;
00524f4c      
00524f4c      if (head_ == 0)
00524f85          edi_1 = (edi + 4);
00524f4c      else
00524f4c      {
00524f4e          void* __offset(DLListData, -0x4) i = ((char*)head_ - 4);
00524f4e          
00524f53          if (i == 0)
00524f85              edi_1 = (edi + 4);
00524f53          else
00524f53          {
00524f75              do
00524f75              {
00524f65                  edi += *(uint32_t*)(ADJ(i)->dllist_next + 0xc)(&arg3, 0);
00524f68                  *(uint32_t*)ebx += 1;
00524f71                  i = AnimSequenceNode::GetNext(i);
00524f75              } while (i != 0);
00524f75              
00524f7a              ecx = arg2;
00524f7a              
00524f7e              if (*(uint32_t*)ebx == 0)
00524f85                  edi_1 = (edi + 4);
00524f7e              else
00524f80                  edi_1 = (edi + 0x10);
00524f53          }
00524f4c      }
00524f4c      
00524f8b      int32_t result = (edi_1 + 4);
00524f8e      long double x87_r7_1 = fabsl(((long double)this->velocity.x));
00524f90      long double temp1 = ((long double)0.000199999995f);
00524f90      (x87_r7_1 - temp1);
00524f96      head_ = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
00524f98      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00524f98      
00524f9b      if (p)
00524f9b      {
00524fc3          result += 0xc;
00524fc9          *(uint32_t*)ecx |= 1;
00524f9b      }
00524f9b      else
00524f9b      {
00524fa0          long double x87_r7_3 = fabsl(((long double)this->velocity.y));
00524fa2          long double temp2_1 = ((long double)0.000199999995f);
00524fa2          (x87_r7_3 - temp2_1);
00524fa8          head_ = ((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00524faa          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00524faa          
00524fad          if (p_1)
00524fad          {
00524fc3              result += 0xc;
00524fc9              *(uint32_t*)ecx |= 1;
00524fad          }
00524fad          else
00524fad          {
00524fb2              long double x87_r7_5 = fabsl(((long double)this->velocity.z));
00524fb4              long double temp4_1 = ((long double)0.000199999995f);
00524fb4              (x87_r7_5 - temp4_1);
00524fba              head_ = ((((x87_r7_5 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00524fbc              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
00524fbc              
00524fbf              if (p_2)
00524fbf              {
00524fc3                  result += 0xc;
00524fc9                  *(uint32_t*)ecx |= 1;
00524fbf              }
00524fad          }
00524f9b      }
00524f9b      
00524fce      long double x87_r7_7 = fabsl(((long double)this->omega.x));
00524fd0      long double temp3 = ((long double)0.000199999995f);
00524fd0      (x87_r7_7 - temp3);
00524fd6      head_ = ((((x87_r7_7 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp3) ? 1 : 0) << 0xe) | 0))));
00524fd8      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
00524fd8      
00524fdb      if (p_3)
00524fdb      {
00525003          result += 0xc;
00525009          *(uint32_t*)ecx |= 2;
00524fdb      }
00524fdb      else
00524fdb      {
00524fe0          long double x87_r7_9 = fabsl(((long double)this->omega.y));
00524fe2          long double temp5_1 = ((long double)0.000199999995f);
00524fe2          (x87_r7_9 - temp5_1);
00524fe8          head_ = ((((x87_r7_9 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp5_1) ? 1 : 0) << 0xe) | 0))));
00524fea          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
00524fea          
00524fed          if (p_4)
00524fed          {
00525003              result += 0xc;
00525009              *(uint32_t*)ecx |= 2;
00524fed          }
00524fed          else
00524fed          {
00524ff2              long double x87_r7_11 = fabsl(((long double)this->omega.z));
00524ff4              long double temp6_1 = ((long double)0.000199999995f);
00524ff4              (x87_r7_11 - temp6_1);
00524ffa              head_ = ((((x87_r7_11 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp6_1) ? 1 : 0) << 0xe) | 0))));
00524ffc              bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
00524ffc              
00524fff              if (p_5)
00524fff              {
00525003                  result += 0xc;
00525009                  *(uint32_t*)ecx |= 2;
00524fff              }
00524fed          }
00524fdb      }
00524fdb      
00525011      return result;
00524f20  }

00525014                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00525020  uint32_t __thiscall CSequence::Pack(class CSequence* this, void** arg2, uint32_t arg3)

00525020  {
00525037      int32_t var_8;
00525037      int32_t var_4;
00525037      uint32_t result = CSequence::pack_size(this, &var_4, &var_8);
0052503d      uint32_t result_1 = result;
0052503d      
00525041      if (arg3 >= result)
00525041      {
00525049          int32_t ebp_1 = var_8;
00525054          **(uint32_t**)arg2 = ebp_1;
00525056          *(uint32_t*)arg2 += 4;
00525059          class DLListData* head_ = this->anim_list.head_;
00525059          
0052505e          if (head_ != 0)
0052505e          {
00525060              void* __offset(DLListData, -0x4) i = ((char*)head_ - 4);
00525060              
00525065              if (i != 0)
00525065              {
0052507f                  do
0052507f                  {
00525071                      *(uint32_t*)(ADJ(i)->dllist_next + 0xc)(arg2, arg3);
0052507b                      i = AnimSequenceNode::GetNext(i);
0052507f                  } while (i != 0);
0052507f                  
00525081                  result = result_1;
00525065              }
0052505e          }
0052505e          
00525087          void* ecx_3 = *(uint32_t*)arg2;
00525087          
00525089          if (ebp_1 == 0)
005250f5              *(uint32_t*)ecx_3 = this->placement_frame_id;
00525089          else
00525089          {
0052508e              int32_t ebx_1 = 0;
00525090              *(uint64_t*)ecx_3 = ((double)((long double)this->frame_number));
00525092              *(uint32_t*)arg2 += 8;
00525095              class DLListData* head__1 = this->anim_list.head_;
0052509a              class AnimSequenceNode* first_cyclic = this->first_cyclic;
0052509d              void* __offset(DLListData, -0x4) eax_4;
0052509d              
0052509d              if (head__1 != 0)
0052509f                  eax_4 = ((char*)head__1 - 4);
0052509f              
005250a4              int32_t eax_5;
005250a4              
005250a4              if ((head__1 == 0 || eax_4 == 0))
005250a4              {
005250b6              label_5250b6:
005250b6                  eax_5 = 0;
005250a4              }
005250a4              else
005250a4              {
005250a8                  while (eax_4 != first_cyclic)
005250a8                  {
005250ac                      ebx_1 += 1;
005250ad                      eax_4 = AnimSequenceNode::GetNext(eax_4);
005250ad                      
005250b4                      if (eax_4 == 0)
005250b4                          goto label_5250b6;
005250a8                  }
005250a8                  
005250ee                  eax_5 = ebx_1;
005250a4              }
005250a4              
005250ba              **(uint32_t**)arg2 = eax_5;
005250bc              *(uint32_t*)arg2 += 4;
005250bf              class DLListData* head__2 = this->anim_list.head_;
005250c2              class AnimSequenceNode* curr_anim = this->curr_anim;
005250c5              int32_t ebx_2 = 0;
005250c9              void* __offset(DLListData, -0x4) eax_6;
005250c9              
005250c9              if (head__2 != 0)
005250cb                  eax_6 = ((char*)head__2 - 4);
005250cb              
005250d0              if ((head__2 == 0 || eax_6 == 0))
005250d0              {
005250e2              label_5250e2:
005250e2                  ebx_2 = 0;
005250d0              }
005250d0              else
005250d0              {
005250d4                  while (eax_6 != curr_anim)
005250d4                  {
005250d8                      ebx_2 += 1;
005250d9                      eax_6 = AnimSequenceNode::GetNext(eax_6);
005250d9                      
005250e0                      if (eax_6 == 0)
005250e0                          goto label_5250e2;
005250d4                  }
005250d0              }
005250d0              
005250e6              result = result_1;
005250ea              **(uint32_t**)arg2 = ebx_2;
00525089          }
00525089          
005250f9          int32_t ecx_6 = var_4;
005250fd          void* eax_10 = (*(uint32_t*)arg2 + 4);
00525100          *(uint32_t*)arg2 = eax_10;
00525102          *(uint32_t*)eax_10 = ecx_6;
00525106          void* eax_12 = (*(uint32_t*)arg2 + 4);
0052510c          *(uint32_t*)arg2 = eax_12;
0052510c          
00525119          if (((ecx_6 & 1) != 0 && arg3 >= 0xc))
00525119          {
0052511e              *(uint32_t*)eax_12 = this->velocity.x;
00525122              void* eax_14 = (*(uint32_t*)arg2 + 4);
00525125              *(uint32_t*)arg2 = eax_14;
0052512a              *(uint32_t*)eax_14 = ((float)((long double)this->velocity.y));
0052512e              void* ebp_4 = (*(uint32_t*)arg2 + 4);
00525131              *(uint32_t*)arg2 = ebp_4;
00525138              *(uint32_t*)ebp_4 = ((float)((long double)this->velocity.z));
0052513c              eax_12 = (*(uint32_t*)arg2 + 4);
0052513f              *(uint32_t*)arg2 = eax_12;
00525119          }
00525119          
0052514a          if (((ecx_6 & 2) != 0 && arg3 >= 0xc))
0052514a          {
0052514f              *(uint32_t*)eax_12 = this->omega.x;
00525153              void* ebx_4 = (*(uint32_t*)arg2 + 4);
00525156              *(uint32_t*)arg2 = ebx_4;
0052515d              *(uint32_t*)ebx_4 = ((float)((long double)this->omega.y));
00525161              void* ecx_9 = (*(uint32_t*)arg2 + 4);
00525164              *(uint32_t*)arg2 = ecx_9;
0052516b              *(uint32_t*)ecx_9 = ((float)((long double)this->omega.z));
0052516d              *(uint32_t*)arg2 += 4;
0052514a          }
00525041      }
00525041      
00525179      return result;
00525020  }

0052517c                                                                                      90 90 90 90                              ....

00525180  void __thiscall Frame::combine(class Frame* this, class Frame const* arg2, class AFrame const* arg3)

00525180  {
005251a8      long double x87_r7_4 = ((((((long double)arg2->m_fl2gv[6]) * ((long double)arg3->m_fOrigin.z)) + (((long double)arg2->m_fl2gv[0]) * ((long double)arg3->m_fOrigin.x))) + (((long double)arg2->m_fl2gv[3]) * ((long double)arg3->m_fOrigin.y))) + ((long double)arg2->m_fOrigin.x));
005251c8      long double x87_r7_9 = ((((((long double)arg2->m_fl2gv[7]) * ((long double)arg3->m_fOrigin.z)) + (((long double)arg2->m_fl2gv[1]) * ((long double)arg3->m_fOrigin.x))) + (((long double)arg2->m_fl2gv[4]) * ((long double)arg3->m_fOrigin.y))) + ((long double)arg2->m_fOrigin.y));
005251e4      long double x87_r7_14 = ((((((long double)arg2->m_fl2gv[8]) * ((long double)arg3->m_fOrigin.z)) + (((long double)arg2->m_fl2gv[2]) * ((long double)arg3->m_fOrigin.x))) + (((long double)arg2->m_fl2gv[5]) * ((long double)arg3->m_fOrigin.y))) + ((long double)arg2->m_fOrigin.z));
00525198      this->m_fOrigin.x = ((float)x87_r7_4);
00525198      this->m_fOrigin.y = ((float)x87_r7_9);
00525198      this->m_fOrigin.z = ((float)x87_r7_14);
0052527e      Frame::set_rotate(this, ((float)((((((long double)arg2->qw) * ((long double)arg3->qw)) - (((long double)arg2->qx) * ((long double)arg3->qx))) - (((long double)arg3->qy) * ((long double)arg2->qy))) - (((long double)arg3->qz) * ((long double)arg2->qz)))), ((float)((((((long double)arg2->qx) * ((long double)arg3->qw)) + (((long double)arg2->qw) * ((long double)arg3->qx))) + (((long double)arg3->qz) * ((long double)arg2->qy))) - (((long double)arg3->qy) * ((long double)arg2->qz)))), ((float)((((((long double)arg3->qy) * ((long double)arg2->qw)) - (((long double)arg2->qx) * ((long double)arg3->qz))) + (((long double)arg2->qz) * ((long double)arg3->qx))) + (((long double)arg2->qy) * ((long double)arg3->qw)))), ((float)((((((long double)arg2->qx) * ((long double)arg3->qy)) + (((long double)arg3->qz) * ((long double)arg2->qw))) - (((long double)arg2->qy) * ((long double)arg3->qx))) + (((long double)arg2->qz) * ((long double)arg3->qw)))));
00525180  }

0052528b                                   90 90 90 90 90                                                             .....

00525290  void* __thiscall CSequence::`scalar deleting destructor'(class CSequence* this, uint32_t arg2)

00525290  {
00525293      CSequence::~CSequence(this);
00525293      
0052529d      if ((arg2 & 1) != 0)
005252a0          operator delete(this);
005252a0      
005252ab      return this;
00525290  }

005252ae                                            90 90                                                                ..

005252b0  void __thiscall CSequence::advance_to_next_animation(class CSequence const* this, double arg2, class AnimSequenceNode const** arg3, double* arg4, class Frame* arg5)

005252b0  {
005252b6      class CSequence* this_1 = this;
005252b7      long double x87_r7 = ((long double)arg2);
005252bb      long double temp1 = ((long double)0.0);
005252bb      (x87_r7 - temp1);
005252c9      class AnimSequenceNode* ecx = *(uint32_t*)arg3;
005252c9      
005252d1      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
005252d1      {
005253e3          long double st0_6 = MD_Data_Fade::GetDuration(ecx);
005253e8          long double temp2_1 = ((long double)0f);
005253e8          (st0_6 - temp2_1);
005253e8          
005253fd          if (((*(uint8_t*)((char*)((((st0_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_6, temp2_1))) ? 1 : 0) << 0xa) | ((((st0_6 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0 && arg5 != 0))
005253fd          {
005253ff              class AnimSequenceNode* ecx_16 = *(uint32_t*)arg3;
005253ff              
00525409              if (ecx_16->anim->pos_frames != 0)
00525409              {
00525410                  int32_t var_1c_7 = *(uint32_t*)((char*)arg4 + 4);
0052541b                  Frame::subtract1(arg5, arg5, AnimSequenceNode::get_pos_frame(ecx_16, *(uint32_t*)arg4));
00525409              }
00525409              
00525427              long double x87_r7_12 = fabs0f(MD_Data_Fade::GetDuration(*(uint32_t*)arg3));
00525429              long double x87_r6_3 = ((long double)0.000199999995f);
0052542f              (x87_r6_3 - x87_r7_12);
00525431              class AFrame* eax_12;
00525431              eax_12 = ((((x87_r6_3 < x87_r7_12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_12))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_12) ? 1 : 0) << 0xe) | 0))));
00525433              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
00525433              
00525436              if (!(p_4))
00525436              {
0052543e                  int32_t var_1c_9 = *(uint32_t*)((char*)arg2)[4];
00525458                  CSequence::apply_physics(this, arg5, ((double)(((long double)1.0) / MD_Data_Fade::GetDuration(*(uint32_t*)arg3))), arg2);
00525436              }
005253fd          }
005253fd          
00525466          class AnimSequenceNode* eax_17;
00525466          
00525466          if (AnimSequenceNode::GetPrev(*(uint32_t*)arg3) == 0)
00525466          {
00525475              class DLListData* tail_ = this->anim_list.tail_;
00525475              
0052547a              if (tail_ == 0)
00525481                  eax_17 = nullptr;
0052547a              else
0052547c                  eax_17 = ((char*)tail_ - 4);
00525466          }
00525466          else
0052546a              eax_17 = AnimSequenceNode::GetPrev(*(uint32_t*)arg3);
0052546a          
00525485          *(uint32_t*)arg3 = eax_17;
00525487          int32_t eax_18;
00525487          long double st0_9;
00525487          eax_18 = AnimSequenceNode::get_ending_frame(eax_17);
0052548c          *(uint64_t*)arg4 = ((double)st0_9);
00525490          long double st0_10 = MD_Data_Fade::GetDuration(*(uint32_t*)arg3);
00525495          long double temp4_1 = ((long double)0f);
00525495          (st0_10 - temp4_1);
0052549b          eax_18 = ((((st0_10 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_10, temp4_1))) ? 1 : 0) << 0xa) | ((((st0_10 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0052549d          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
0052549d          
005254a4          if ((!(p_5) && arg5 != 0))
005254a4          {
005254a6              class AnimSequenceNode* ecx_26 = *(uint32_t*)arg3;
005254a6              
005254b0              if (ecx_26->anim->pos_frames != 0)
005254b0              {
005254b7                  int32_t var_1c_10 = *(uint32_t*)((char*)arg4 + 4);
005254c2                  Frame::combine(arg5, arg5, AnimSequenceNode::get_pos_frame(ecx_26, *(uint32_t*)arg4));
005254b0              }
005254b0              
005254ce              long double x87_r7_18 = fabs0f(MD_Data_Fade::GetDuration(*(uint32_t*)arg3));
005254d0              long double x87_r6_4 = ((long double)0.000199999995f);
005254d6              (x87_r6_4 - x87_r7_18);
005254d8              class CAnimation* eax_19;
005254d8              eax_19 = ((((x87_r6_4 < x87_r7_18) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_18))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_18) ? 1 : 0) << 0xe) | 0))));
005254da              bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
005254da              
005254dd              if (!(p_6))
005254dd              {
005254e5                  int32_t var_1c_12 = *(uint32_t*)((char*)arg2)[4];
005254ff                  CSequence::apply_physics(this, arg5, ((double)(((long double)1.0) / MD_Data_Fade::GetDuration(*(uint32_t*)arg3))), arg2);
005254dd              }
005254a4          }
005252d1      }
005252d1      else
005252d1      {
005252dc          (MD_Data_Fade::GetDuration(ecx) - ((long double)0f));
005252ea          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005252ea          
005252f1          if ((!(p_1) && arg5 != 0))
005252f1          {
005252f3              class AnimSequenceNode* ecx_1 = *(uint32_t*)arg3;
005252f3              
005252fd              if (ecx_1->anim->pos_frames != 0)
005252fd              {
00525304                  int32_t var_1c_1 = *(uint32_t*)((char*)arg4 + 4);
0052530f                  Frame::subtract1(arg5, arg5, AnimSequenceNode::get_pos_frame(ecx_1, *(uint32_t*)arg4));
005252fd              }
005252fd              
0052531b              long double x87_r7_3 = fabs0f(MD_Data_Fade::GetDuration(*(uint32_t*)arg3));
0052531d              long double x87_r6_1 = ((long double)0.000199999995f);
00525323              (x87_r6_1 - x87_r7_3);
00525325              class CAnimation* eax_1;
00525325              eax_1 = ((((x87_r6_1 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_3) ? 1 : 0) << 0xe) | 0))));
00525327              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00525327              
0052532a              if (!(p_2))
0052532a              {
00525332                  int32_t var_1c_3 = *(uint32_t*)((char*)arg2)[4];
0052534c                  CSequence::apply_physics(this, arg5, ((double)(((long double)1.0) / MD_Data_Fade::GetDuration(*(uint32_t*)arg3))), arg2);
0052532a              }
005252f1          }
005252f1          
0052535a          if (AnimSequenceNode::GetNext(*(uint32_t*)arg3) == 0)
0052536e              *(uint32_t*)arg3 = this->first_cyclic;
0052535a          else
00525363              *(uint32_t*)arg3 = AnimSequenceNode::GetNext(*(uint32_t*)arg3);
00525363          
00525377          *(uint64_t*)arg4 = ((double)AnimSequenceNode::get_starting_frame(*(uint32_t*)arg3));
0052537b          long double st0_4 = MD_Data_Fade::GetDuration(*(uint32_t*)arg3);
00525380          long double temp5_1 = ((long double)0f);
00525380          (st0_4 - temp5_1);
00525380          
00525393          if (((*(uint8_t*)((char*)((((st0_4 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_4, temp5_1))) ? 1 : 0) << 0xa) | ((((st0_4 == temp5_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0 && arg5 != 0))
00525393          {
00525399              class AnimSequenceNode* ecx_12 = *(uint32_t*)arg3;
00525399              
005253a3              if (ecx_12->anim->pos_frames != 0)
005253a3              {
005253aa                  int32_t var_1c_4 = *(uint32_t*)((char*)arg4 + 4);
005253b5                  Frame::combine(arg5, arg5, AnimSequenceNode::get_pos_frame(ecx_12, *(uint32_t*)arg4));
005253a3              }
005253a3              
005253c1              long double x87_r7_9 = fabs0f(MD_Data_Fade::GetDuration(*(uint32_t*)arg3));
005253c3              long double x87_r6_2 = ((long double)0.000199999995f);
005253c9              (x87_r6_2 - x87_r7_9);
005253cb              class AFrame* eax_8;
005253cb              eax_8 = ((((x87_r6_2 < x87_r7_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_9))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_9) ? 1 : 0) << 0xe) | 0))));
005253cd              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005253cd              
005253d0              if (!(p_3))
005253d0              {
005253dc                  int32_t var_1c_6 = *(uint32_t*)((char*)arg2)[4];
005254ff                  CSequence::apply_physics(this, arg5, ((double)(((long double)1.0) / MD_Data_Fade::GetDuration(*(uint32_t*)arg3))), arg2);
005253d0              }
00525393          }
005252d1      }
005252b0  }

0052550d                                         90 90 90                                                               ...

00525510  void __thiscall CSequence::append_animation(class CSequence* this, class AnimData const* arg2)

00525510  {
00525516      void* eax = operator new(0x1c);
00525520      int32_t* esi;
00525520      
00525520      if (eax == 0)
00525532          esi = nullptr;
00525520      else
0052552e          esi = AnimSequenceNode::AnimSequenceNode(eax, arg2);
0052552e      
0052553d      if (AnimSequenceNode::has_anim(esi) != 0)
0052553d      {
00525556          void* eax_3;
00525556          
00525556          if (esi == 0)
0052555d              eax_3 = nullptr;
00525556          else
00525558              eax_3 = &esi[1];
00525558          
00525566          DLListBase::InsertAfter(&this->anim_list, eax_3, this->anim_list.tail_);
0052556b          class DLListData* tail_ = this->anim_list.tail_;
00525570          void* __offset(DLListData, -0x4) eax_4;
00525570          
00525570          if (tail_ == 0)
00525577              eax_4 = nullptr;
00525570          else
00525572              eax_4 = ((char*)tail_ - 4);
00525572          
00525579          this->first_cyclic = eax_4;
00525579          
00525581          if (this->curr_anim == 0)
00525581          {
00525583              void* head_ = this->anim_list.head_;
00525583              
00525587              if (head_ != 0)
00525587              {
0052558c                  this->curr_anim = ((char*)head_ - 4);
00525594                  this->frame_number = ((double)AnimSequenceNode::get_starting_frame(((char*)head_ - 4)));
0052559a                  return;
00525587              }
00525587              
0052559f              this->curr_anim = nullptr;
005255a7              this->frame_number = ((double)AnimSequenceNode::get_starting_frame(nullptr));
00525581          }
0052553d      }
0052553d      else if (esi != 0)
00525549          **(uint32_t**)esi(1);
00525510  }


005255b0  void __fastcall CSequence::clear(class CSequence* this)

005255b0  {
005255b3      CSequence::clear_animations(this);
005255ba      CSequence::clear_physics(this);
005255c1      this->placement_frame = nullptr;
005255c4      this->placement_frame_id = 0;
005255b0  }

005255c9                             90 90 90 90 90 90 90                                                           .......

005255d0  void __thiscall CSequence::update_internal(class CSequence const* this, double arg2, class AnimSequenceNode** arg3, double* arg4, class Frame* arg5)

005255d0  {
005255e8      while (true)
005255e8      {
005255e8          MD_Data_Fade::GetDuration(*(uint32_t*)arg3);
005255e8          /* unimplemented  {call MD_Data_Fade::GetDuration} */;
005255ed          double var_20_1 = ((double)/* double var_20_1 = fconvert.d(unimplemented  {fst qword [esp+0x20], st0}) */);
005255f1          /* unimplemented  {fmul st0, qword [ebp+0x8]} */;
005255fa          double var_10_1 = ((double)/* double var_10_1 = fconvert.d(unimplemented  {fstp qword [esp+0x34], st0}) */);
005255fa          /* unimplemented  {fstp qword [esp+0x34], st0} */;
005255ff          int32_t var_30_1 = 0;
00525607          floor(*(uint32_t*)arg4, *(uint32_t*)((char*)arg4 + 4));
00525610          int32_t eax_2 = _ftol2();
00525615          /* unimplemented  {fld st0, qword [esp+0x30]} */;
00525619          /* unimplemented  {fadd qword [esi]} */;
0052561b          int32_t ebx_1 = eax_2;
0052561d          int32_t var_2c_1 = ebx_1;
00525621          int32_t var_18_1 = 0;
00525629          double var_28_1 = ((double)/* double var_28_1 = fconvert.d(unimplemented  {fst qword [esp+0x18], st0}) */);
0052562d          int32_t var_14_1 = 0;
00525635          *(uint64_t*)arg4 = ((double)/* *arg4 = fconvert.d(unimplemented  {fstp qword [esi], st0}) */);
00525635          /* unimplemented  {fstp qword [esi], st0} */;
00525637          /* unimplemented  {fld st0, qword [esp+0x30]} */;
0052563b          long double temp1_1 = ((long double)0.0);
0052563b          (/* unimplemented  {fcomp st0, qword [&data_794610]} f- temp1_1 */ - temp1_1);
0052563b          bool c0_1 = /* bool c0_1 = unimplemented  {fcomp st0, qword [&data_794610]} f< temp1_1 */ < temp1_1;
0052563b          bool c2_1 = (FCMP_UO(/* bool c2_1 = is_unordered.t(unimplemented  {fcomp st0, qword [&data_794610]}, temp1_1) */, temp1_1));
0052563b          bool c3_1 = /* bool c3_1 = unimplemented  {fcomp st0, qword [&data_794610]} f== temp1_1 */ == temp1_1;
0052563b          /* unimplemented  {fcomp st0, qword [&data_794610]} */;
00525641          int16_t top;
00525641          eax_2 = ((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | (((top + 1) & 7) << 0xb)))));
00525646          int32_t var_50;
00525646          
00525646          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
00525646          {
005257c2              /* unimplemented  {fld st0, qword [esp+0x30]} */;
005257c6              long double temp2_1 = ((long double)0.0);
005257c6              (/* unimplemented  {fcomp st0, qword [&data_794610]} f- temp2_1 */ - temp2_1);
005257c6              bool c0_8 = /* bool c0_8 = unimplemented  {fcomp st0, qword [&data_794610]} f< temp2_1 */ < temp2_1;
005257c6              bool c2_8 = (FCMP_UO(/* bool c2_8 = is_unordered.t(unimplemented  {fcomp st0, qword [&data_794610]}, temp2_1) */, temp2_1));
005257c6              bool c3_8 = /* bool c3_8 = unimplemented  {fcomp st0, qword [&data_794610]} f== temp2_1 */ == temp2_1;
005257c6              /* unimplemented  {fcomp st0, qword [&data_794610]} */;
005257cc              eax_2 = ((((c0_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_8) ? 1 : 0) << 0xa) | ((((c3_8) ? 1 : 0) << 0xe) | (((top + 1) & 7) << 0xb)))));
005257ce              bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005257ce              
005257d1              if (p_5)
005257d1              {
0052599a                  if (arg5 != 0)
0052599a                  {
0052599c                      /* unimplemented  {fld st0, qword [ebp+0x8]} */;
0052599f                      /* unimplemented  {fabs } */;
005259a1                      /* unimplemented  {fld st0, dword [&F_EPSILON]} */;
005259a7                      (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
005259a7                      bool c0_15 = /* bool c0_15 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_15 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
005259a7                      bool c2_15 = (FCMP_UO(/* bool c2_15 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_15 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
005259a7                      bool c3_15 = /* bool c3_15 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_15 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
005259a7                      /* unimplemented  {fcompp } */;
005259a7                      /* unimplemented  {fcompp } */;
005259a9                      eax_2 = ((((c0_15) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_15) ? 1 : 0) << 0xa) | ((((c3_15) ? 1 : 0) << 0xe) | (((top + 1) & 7) << 0xb)))));
005259ab                      bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x5} */;
005259ab                      
005259ae                      if (!(p_10))
005259ae                      {
005259b0                          int32_t eax_30 = *(uint32_t*)((char*)arg2)[4];
005259b3                          int32_t ecx_26 = arg2;
005259b6                          int32_t var_44_15 = eax_30;
005259b8                          int32_t var_4c_2 = eax_30;
005259bf                          CSequence::apply_physics(this, arg5, ecx_26, ecx_26);
005259ae                      }
0052599a                  }
0052599a                  
005259ca                  return;
005257d1              }
005257d1              
005257e1              floor(var_28_1, *(uint32_t*)((char*)var_28_1)[4]);
005257e7              double var_10_5 = ((double)/* double var_10_5 = fconvert.d(unimplemented  {fstp qword [esp+0x38], st0}) */);
005257e7              /* unimplemented  {fstp qword [esp+0x38], st0} */;
005257f5              var_28_1 = EffectInfoRegion::GetStat(*(uint32_t*)arg3);
005257f9              /* unimplemented  {fild st0, dword [esp+0x18]} */;
005257fd              long double temp4_1 = ((long double)var_10_5);
005257fd              (/* unimplemented  {fcomp st0, qword [esp+0x30]} f- temp4_1 */ - temp4_1);
005257fd              bool c0_9 = /* bool c0_9 = unimplemented  {fcomp st0, qword [esp+0x30]} f< temp4_1 */ < temp4_1;
005257fd              bool c2_9 = (FCMP_UO(/* bool c2_9 = is_unordered.t(unimplemented  {fcomp st0, qword [esp+0x30]}, temp4_1) */, temp4_1));
005257fd              bool c3_9 = /* bool c3_9 = unimplemented  {fcomp st0, qword [esp+0x30]} f== temp4_1 */ == temp4_1;
005257fd              /* unimplemented  {fcomp st0, qword [esp+0x30]} */;
005257fd              int16_t top_29 = (top + 2);
00525801              uint32_t eax_15;
00525801              eax_15 = ((((c0_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_9) ? 1 : 0) << 0xa) | ((((c3_9) ? 1 : 0) << 0xe) | ((top_29 & 7) << 0xb)))));
00525801              
00525806              if ((*(uint8_t*)((char*)eax_15)[1] & 0x41) == 0)
00525806              {
0052580f                  var_28_1 = EffectInfoRegion::GetStat(*(uint32_t*)arg3);
00525813                  int16_t top_30 = (top_29 - 1);
00525813                  /* unimplemented  {fild st0, dword [esp+0x18]} */;
00525817                  /* unimplemented  {fsubr st0, qword [esi]} */;
00525819                  long double temp8_1 = ((long double)0.0);
00525819                  (/* unimplemented  {fcom st0, qword [&data_794610]} f- temp8_1 */ - temp8_1);
00525819                  bool c0_10 = /* bool c0_10 = unimplemented  {fcom st0, qword [&data_794610]} f< temp8_1 */ < temp8_1;
00525819                  bool c2_10 = (FCMP_UO(/* bool c2_10 = is_unordered.t(unimplemented  {fcom st0, qword [&data_794610]}, temp8_1) */, temp8_1));
00525819                  bool c3_10 = /* bool c3_10 = unimplemented  {fcom st0, qword [&data_794610]} f== temp8_1 */ == temp8_1;
0052581f                  uint32_t eax_16;
0052581f                  eax_16 = ((((c0_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_10) ? 1 : 0) << 0xa) | ((((c3_10) ? 1 : 0) << 0xe) | ((top_30 & 7) << 0xb)))));
0052581f                  
00525824                  if ((*(uint8_t*)((char*)eax_16)[1] & 0x41) == 0)
00525824                  {
00525826                      /* unimplemented  {fstp st0, st0} */;
00525826                      /* unimplemented  {fstp st0, st0} */;
00525828                      /* unimplemented  {fld st0, qword [&data_794610]} */;
00525824                  }
00525824                  
0052582e                  /* unimplemented  {fld st0, qword [esp+0x20]} */;
00525832                  /* unimplemented  {fabs } */;
00525834                  /* unimplemented  {fld st0, dword [&F_EPSILON]} */;
0052583a                  (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
0052583a                  bool c0_11 = /* bool c0_11 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_11 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
0052583a                  bool c2_11 = (FCMP_UO(/* bool c2_11 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_11 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
0052583a                  bool c3_11 = /* bool c3_11 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_11 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
0052583a                  /* unimplemented  {fcompp } */;
0052583a                  /* unimplemented  {fcompp } */;
0052583c                  eax_16 = ((((c0_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_11) ? 1 : 0) << 0xa) | ((((c3_11) ? 1 : 0) << 0xe) | ((top_30 & 7) << 0xb)))));
0052583e                  bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
00525841                  int16_t top_35;
00525841                  
00525841                  if (p_6)
00525841                  {
0052584d                      /* unimplemented  {fstp st0, st0} */;
0052584d                      /* unimplemented  {fstp st0, st0} */;
0052584d                      top_35 = (top_30 + 1);
0052584f                      int32_t var_18_3 = 0;
00525857                      int32_t var_14_3 = 0;
00525841                  }
00525841                  else
00525841                  {
00525843                      /* unimplemented  {fdiv st0, qword [esp+0x20]} */;
00525847                      var_18_1 = ((double)/* var_18_1.q = fconvert.d(unimplemented  {fstp qword [esp+0x28], st0}) */);
00525847                      /* unimplemented  {fstp qword [esp+0x28], st0} */;
00525847                      top_35 = (top_30 + 1);
00525841                  }
00525841                  
00525866                  var_28_1 = EffectInfoRegion::GetStat(*(uint32_t*)arg3);
0052586a                  /* unimplemented  {fild st0, dword [esp+0x18]} */;
0052586e                  var_30_1 = 1;
00525876                  *(uint64_t*)arg4 = ((double)/* *arg4 = fconvert.d(unimplemented  {fstp qword [esi], st0}) */);
00525876                  /* unimplemented  {fstp qword [esi], st0} */;
00525876                  top_29 = top_35;
00525806              }
00525806              
0052587b              /* unimplemented  {fild st0, dword [esp+0x14]} */;
00525883              double var_10_6 = ((double)/* double var_10_6 = fconvert.d(unimplemented  {fstp qword [esp+0x38], st0}) */);
00525883              /* unimplemented  {fstp qword [esp+0x38], st0} */;
00525887              floor(*(uint32_t*)arg4, *(uint32_t*)((char*)arg4 + 4));
0052588d              long double temp7_1 = ((long double)var_10_6);
0052588d              (/* unimplemented  {fcomp st0, qword [esp+0x38]} f- temp7_1 */ - temp7_1);
0052588d              bool c0_12 = /* bool c0_12 = unimplemented  {fcomp st0, qword [esp+0x38]} f< temp7_1 */ < temp7_1;
0052588d              bool c2_12 = (FCMP_UO(/* bool c2_12 = is_unordered.t(unimplemented  {fcomp st0, qword [esp+0x38]}, temp7_1) */, temp7_1));
0052588d              bool c3_12 = /* bool c3_12 = unimplemented  {fcomp st0, qword [esp+0x38]} f== temp7_1 */ == temp7_1;
0052588d              /* unimplemented  {fcomp st0, qword [esp+0x38]} */;
0052588d              top = (top_29 + 1);
00525894              int32_t eax_19;
00525894              eax_19 = ((((c0_12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_12) ? 1 : 0) << 0xa) | ((((c3_12) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
00525896              bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
00525896              
00525899              if (!(p_7))
00525899              {
00525937                  bool p_9;
00525937                  
00525937                  do
00525937                  {
005258a5                      if (arg5 != 0)
005258a5                      {
005258a7                          class AnimSequenceNode* ecx_17 = *(uint32_t*)arg3;
005258a7                          
005258b1                          if (ecx_17->anim->pos_frames != 0)
005258be                              Frame::subtract1(arg5, arg5, AnimSequenceNode::get_pos_frame(ecx_17, ebx_1));
005258be                          
005258c3                          /* unimplemented  {fld st0, qword [esp+0x20]} */;
005258c7                          /* unimplemented  {fabs } */;
005258c9                          /* unimplemented  {fld st0, dword [&F_EPSILON]} */;
005258cf                          (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
005258cf                          bool c0_13 = /* bool c0_13 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_13 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
005258cf                          bool c2_13 = (FCMP_UO(/* bool c2_13 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_13 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
005258cf                          bool c3_13 = /* bool c3_13 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_13 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
005258cf                          /* unimplemented  {fcompp } */;
005258cf                          /* unimplemented  {fcompp } */;
005258d1                          class AFrame* eax_21;
005258d1                          eax_21 = ((((c0_13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_13) ? 1 : 0) << 0xa) | ((((c3_13) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
005258d3                          bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
005258d3                          
005258d6                          if (!(p_8))
005258d6                          {
005258d8                              /* unimplemented  {fld st0, qword [&data_7928c0]} */;
005258e1                              /* unimplemented  {fdiv st0, qword [esp+0x20]} */;
005258eb                              int32_t var_44_12 = *(uint32_t*)((char*)arg2)[4];
005258f4                              var_50 = ((double)/* var_50.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
005258f4                              /* unimplemented  {fstp qword [esp], st0} */;
005258f8                              CSequence::apply_physics(this, arg5, var_50, arg2);
005258d6                          }
005258a5                      }
005258a5                      
0052590c                      CSequence::execute_hooks(this, AnimSequenceNode::get_part_frame(*(uint32_t*)arg3, ebx_1), 0xffffffff);
00525916                      ebx_1 -= 1;
00525917                      var_28_1 = ebx_1;
0052591b                      /* unimplemented  {fild st0, dword [esp+0x18]} */;
00525921                      double var_10_7 = ((double)/* double var_10_7 = fconvert.d(unimplemented  {fstp qword [esp+0x38], st0}) */);
00525921                      /* unimplemented  {fstp qword [esp+0x38], st0} */;
00525925                      floor(*(uint32_t*)arg4, *(uint32_t*)((char*)arg4 + 4));
0052592b                      long double temp10_1 = ((long double)var_10_7);
0052592b                      (/* unimplemented  {fcomp st0, qword [esp+0x38]} f- temp10_1 */ - temp10_1);
0052592b                      bool c0_14 = /* bool c0_14 = unimplemented  {fcomp st0, qword [esp+0x38]} f< temp10_1 */ < temp10_1;
0052592b                      bool c2_14 = (FCMP_UO(/* bool c2_14 = is_unordered.t(unimplemented  {fcomp st0, qword [esp+0x38]}, temp10_1) */, temp10_1));
0052592b                      bool c3_14 = /* bool c3_14 = unimplemented  {fcomp st0, qword [esp+0x38]} f== temp10_1 */ == temp10_1;
0052592b                      /* unimplemented  {fcomp st0, qword [esp+0x38]} */;
0052592b                      top += 1;
00525932                      int32_t eax_26;
00525932                      eax_26 = ((((c0_14) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_14) ? 1 : 0) << 0xa) | ((((c3_14) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
00525934                      p_9 = /* p_9 = unimplemented  {test ah, 0x5} */;
00525937                  } while (!(p_9));
00525899              }
00525646          }
00525646          else
00525646          {
00525656              floor(var_28_1, *(uint32_t*)((char*)var_28_1)[4]);
0052565c              double var_10_2 = ((double)/* double var_10_2 = fconvert.d(unimplemented  {fstp qword [esp+0x38], st0}) */);
0052565c              /* unimplemented  {fstp qword [esp+0x38], st0} */;
0052566a              var_28_1 = Attribute2ndInfoRegion::GetStat(*(uint32_t*)arg3);
0052566e              /* unimplemented  {fild st0, dword [esp+0x18]} */;
00525672              long double temp3_1 = ((long double)var_10_2);
00525672              (/* unimplemented  {fcomp st0, qword [esp+0x30]} f- temp3_1 */ - temp3_1);
00525672              bool c0_2 = /* bool c0_2 = unimplemented  {fcomp st0, qword [esp+0x30]} f< temp3_1 */ < temp3_1;
00525672              bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcomp st0, qword [esp+0x30]}, temp3_1) */, temp3_1));
00525672              bool c3_2 = /* bool c3_2 = unimplemented  {fcomp st0, qword [esp+0x30]} f== temp3_1 */ == temp3_1;
00525672              /* unimplemented  {fcomp st0, qword [esp+0x30]} */;
00525672              int16_t top_10 = (top + 2);
00525676              uint32_t eax_4;
00525676              eax_4 = ((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top_10 & 7) << 0xb)))));
00525678              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00525678              
0052567b              if (!(p_1))
0052567b              {
00525684                  var_28_1 = Attribute2ndInfoRegion::GetStat(*(uint32_t*)arg3);
00525688                  int16_t top_11 = (top_10 - 1);
00525688                  /* unimplemented  {fild st0, dword [esp+0x18]} */;
0052568c                  /* unimplemented  {fsubr st0, qword [esi]} */;
0052568e                  /* unimplemented  {fsub st0, qword [&data_7928c0]} */;
00525694                  long double temp6_1 = ((long double)0.0);
00525694                  (/* unimplemented  {fcom st0, qword [&data_794610]} f- temp6_1 */ - temp6_1);
00525694                  bool c0_3 = /* bool c0_3 = unimplemented  {fcom st0, qword [&data_794610]} f< temp6_1 */ < temp6_1;
00525694                  bool c2_3 = (FCMP_UO(/* bool c2_3 = is_unordered.t(unimplemented  {fcom st0, qword [&data_794610]}, temp6_1) */, temp6_1));
00525694                  bool c3_3 = /* bool c3_3 = unimplemented  {fcom st0, qword [&data_794610]} f== temp6_1 */ == temp6_1;
0052569a                  uint32_t eax_5;
0052569a                  eax_5 = ((((c0_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_3) ? 1 : 0) << 0xa) | ((((c3_3) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
0052569c                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0052569c                  
0052569f                  if (!(p_2))
0052569f                  {
005256a1                      /* unimplemented  {fstp st0, st0} */;
005256a1                      /* unimplemented  {fstp st0, st0} */;
005256a3                      /* unimplemented  {fld st0, qword [&data_794610]} */;
0052569f                  }
0052569f                  
005256a9                  /* unimplemented  {fld st0, qword [esp+0x20]} */;
005256ad                  /* unimplemented  {fabs } */;
005256af                  /* unimplemented  {fld st0, dword [&F_EPSILON]} */;
005256b5                  (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
005256b5                  bool c0_4 = /* bool c0_4 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_4 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
005256b5                  bool c2_4 = (FCMP_UO(/* bool c2_4 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_4 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
005256b5                  bool c3_4 = /* bool c3_4 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_4 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
005256b5                  /* unimplemented  {fcompp } */;
005256b5                  /* unimplemented  {fcompp } */;
005256b7                  eax_5 = ((((c0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_4) ? 1 : 0) << 0xa) | ((((c3_4) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
005256b9                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005256bc                  int16_t top_16;
005256bc                  
005256bc                  if (p_3)
005256bc                  {
005256c8                      /* unimplemented  {fstp st0, st0} */;
005256c8                      /* unimplemented  {fstp st0, st0} */;
005256c8                      top_16 = (top_11 + 1);
005256ca                      int32_t var_18_2 = 0;
005256d2                      int32_t var_14_2 = 0;
005256bc                  }
005256bc                  else
005256bc                  {
005256be                      /* unimplemented  {fdiv st0, qword [esp+0x20]} */;
005256c2                      var_18_1 = ((double)/* var_18_1.q = fconvert.d(unimplemented  {fstp qword [esp+0x28], st0}) */);
005256c2                      /* unimplemented  {fstp qword [esp+0x28], st0} */;
005256c2                      top_16 = (top_11 + 1);
005256bc                  }
005256bc                  
005256e1                  var_28_1 = Attribute2ndInfoRegion::GetStat(*(uint32_t*)arg3);
005256e5                  /* unimplemented  {fild st0, dword [esp+0x18]} */;
005256e9                  var_30_1 = 1;
005256f1                  *(uint64_t*)arg4 = ((double)/* *arg4 = fconvert.d(unimplemented  {fstp qword [esi], st0}) */);
005256f1                  /* unimplemented  {fstp qword [esi], st0} */;
005256f1                  top_10 = top_16;
0052567b              }
0052567b              
005256f6              /* unimplemented  {fild st0, dword [esp+0x14]} */;
005256fe              double var_10_3 = ((double)/* double var_10_3 = fconvert.d(unimplemented  {fstp qword [esp+0x38], st0}) */);
005256fe              /* unimplemented  {fstp qword [esp+0x38], st0} */;
00525702              floor(*(uint32_t*)arg4, *(uint32_t*)((char*)arg4 + 4));
00525708              long double temp5_1 = ((long double)var_10_3);
00525708              (/* unimplemented  {fcomp st0, qword [esp+0x38]} f- temp5_1 */ - temp5_1);
00525708              bool c0_5 = /* bool c0_5 = unimplemented  {fcomp st0, qword [esp+0x38]} f< temp5_1 */ < temp5_1;
00525708              bool c2_5 = (FCMP_UO(/* bool c2_5 = is_unordered.t(unimplemented  {fcomp st0, qword [esp+0x38]}, temp5_1) */, temp5_1));
00525708              bool c3_5 = /* bool c3_5 = unimplemented  {fcomp st0, qword [esp+0x38]} f== temp5_1 */ == temp5_1;
00525708              /* unimplemented  {fcomp st0, qword [esp+0x38]} */;
00525708              top = (top_10 + 1);
00525708              
00525714              if ((*(uint8_t*)((char*)((((c0_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_5) ? 1 : 0) << 0xa) | ((((c3_5) ? 1 : 0) << 0xe) | ((top & 7) << 0xb))))))[1] & 0x41) == 0)
00525714              {
0052571a                  int32_t ebx_2 = ebx_1;
005257b7                  bool c0_7;
005257b7                  bool c2_7;
005257b7                  bool c3_7;
005257b7                  
005257b7                  do
005257b7                  {
00525725                      if (arg5 != 0)
00525725                      {
00525727                          class AnimSequenceNode* ecx_6 = *(uint32_t*)arg3;
00525727                          
00525731                          if (ecx_6->anim->pos_frames != 0)
0052573e                              Frame::combine(arg5, arg5, AnimSequenceNode::get_pos_frame(ecx_6, ebx_2));
0052573e                          
00525743                          /* unimplemented  {fld st0, qword [esp+0x20]} */;
00525747                          /* unimplemented  {fabs } */;
00525749                          /* unimplemented  {fld st0, dword [&F_EPSILON]} */;
0052574f                          (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
0052574f                          bool c0_6 = /* bool c0_6 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_6 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
0052574f                          bool c2_6 = (FCMP_UO(/* bool c2_6 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_6 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
0052574f                          bool c3_6 = /* bool c3_6 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_6 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
0052574f                          /* unimplemented  {fcompp } */;
0052574f                          /* unimplemented  {fcompp } */;
00525751                          class CAnimation* eax_9;
00525751                          eax_9 = ((((c0_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_6) ? 1 : 0) << 0xa) | ((((c3_6) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
00525753                          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
00525753                          
00525756                          if (!(p_4))
00525756                          {
00525758                              /* unimplemented  {fld st0, qword [&data_7928c0]} */;
00525761                              /* unimplemented  {fdiv st0, qword [esp+0x20]} */;
0052576b                              int32_t var_44_6 = *(uint32_t*)((char*)arg2)[4];
00525774                              var_50 = ((double)/* var_50.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
00525774                              /* unimplemented  {fstp qword [esp], st0} */;
00525778                              CSequence::apply_physics(this, arg5, var_50, arg2);
00525756                          }
00525725                      }
00525725                      
0052578c                      CSequence::execute_hooks(this, AnimSequenceNode::get_part_frame(*(uint32_t*)arg3, ebx_2), 1);
00525796                      ebx_2 += 1;
00525797                      var_28_1 = ebx_2;
0052579b                      /* unimplemented  {fild st0, dword [esp+0x18]} */;
005257a1                      double var_10_4 = ((double)/* double var_10_4 = fconvert.d(unimplemented  {fstp qword [esp+0x38], st0}) */);
005257a1                      /* unimplemented  {fstp qword [esp+0x38], st0} */;
005257a5                      floor(*(uint32_t*)arg4, *(uint32_t*)((char*)arg4 + 4));
005257ab                      long double temp9_1 = ((long double)var_10_4);
005257ab                      (/* unimplemented  {fcomp st0, qword [esp+0x38]} f- temp9_1 */ - temp9_1);
005257ab                      c0_7 = /* c0_7 = unimplemented  {fcomp st0, qword [esp+0x38]} f< temp9_1 */ < temp9_1;
005257ab                      c2_7 = (FCMP_UO(/* c2_7 = is_unordered.t(unimplemented  {fcomp st0, qword [esp+0x38]}, temp9_1) */, temp9_1));
005257ab                      c3_7 = /* c3_7 = unimplemented  {fcomp st0, qword [esp+0x38]} f== temp9_1 */ == temp9_1;
005257ab                      /* unimplemented  {fcomp st0, qword [esp+0x38]} */;
005257ab                      top += 1;
005257b7                  } while ((*(uint8_t*)((char*)((((c0_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_7) ? 1 : 0) << 0xa) | ((((c3_7) ? 1 : 0) << 0xe) | ((top & 7) << 0xb))))))[1] & 0x41) == 0);
00525714              }
00525646          }
00525646          
00525943          if (var_30_1 == 0)
005259ca              return;
005259ca          
00525949          class CPhysicsObj* hook_obj = this->hook_obj;
00525949          
0052594e          if (hook_obj != 0)
0052594e          {
00525950              class DLListData* head_ = this->anim_list.head_;
00525955              void* __offset(DLListData, -0x4) eax_28;
00525955              
00525955              if (head_ == 0)
0052595c                  eax_28 = nullptr;
00525955              else
00525957                  eax_28 = ((char*)head_ - 4);
00525957              
00525961              if (eax_28 != this->first_cyclic)
00525968                  CPhysicsObj::add_anim_hook(hook_obj, &anim_done_hook);
0052594e          }
0052594e          
00525979          var_50 = *(uint32_t*)((char*)arg2)[4];
0052597d          CSequence::advance_to_next_animation(this, arg2, arg3, arg4, arg5);
0052598a          arg2 = 0;
0052598d          *(uint32_t*)((char*)arg2)[4] = 0;
005255e8      }
005255d0  }

005259cd                                         90 90 90                                                               ...

005259d0  int32_t __thiscall CSequence::UnPack(class CSequence* this, void** arg2, uint32_t arg3)

005259d0  {
005259d0      class CSequence* this_1 = this;
005259d6      CSequence::clear_animations(this);
005259dd      CSequence::clear_physics(this);
005259e2      void** esi = arg2;
005259e6      this->placement_frame = nullptr;
005259ed      this->placement_frame_id = 0;
005259f4      void* eax = *(uint32_t*)esi;
005259f6      void** ecx_1 = *(uint32_t*)eax;
005259fb      bool cond:1 = ecx_1 == 0;
00525a01      *(uint32_t*)esi = ((char*)eax + 4);
00525a01      
00525a03      if (ecx_1 > 0)
00525a03      {
00525a05          arg2 = ecx_1;
00525a78          void** i;
00525a78          
00525a78          do
00525a78          {
00525a12              void* eax_2 = operator new(0x1c);
00525a1c              int32_t* ebx_1;
00525a1c              
00525a1c              if (eax_2 == 0)
00525a29                  ebx_1 = nullptr;
00525a1c              else
00525a25                  ebx_1 = AnimSequenceNode::AnimSequenceNode(eax_2);
00525a25              
00525a35              *(uint32_t*)(*(uint32_t*)ebx_1 + 0x10)(esi, arg3);
00525a38              class DLListData* tail_ = this->anim_list.tail_;
00525a38              
00525a40              if (tail_ == 0)
00525a40              {
00525a3d                  ebx_1[1] = this->anim_list.head_;
00525a5f                  class DLListData* head__2 = this->anim_list.head_;
00525a5f                  
00525a64                  if (head__2 == 0)
00525a6b                      this->anim_list.tail_ = &ebx_1[1];
00525a64                  else
00525a66                      head__2->dllist_prev = &ebx_1[1];
00525a66                  
00525a6e                  this->anim_list.head_ = &ebx_1[1];
00525a40              }
00525a40              else
00525a40              {
00525a3d                  ebx_1[1] = tail_->dllist_next;
00525a46                  class DLListData* dllist_next = tail_->dllist_next;
00525a46                  
00525a4a                  if (dllist_next == 0)
00525a4a                  {
00525a53                      this->anim_list.tail_ = &ebx_1[1];
00525a56                      tail_->dllist_next = &ebx_1[1];
00525a4a                  }
00525a4a                  else
00525a4a                  {
00525a4c                      dllist_next->dllist_prev = &ebx_1[1];
00525a4f                      tail_->dllist_next = &ebx_1[1];
00525a4a                  }
00525a40              }
00525a40              
00525a3d              ebx_1[2] = tail_;
00525a74              i = arg2;
00525a74              arg2 -= 1;
00525a78          } while (i != 1);
00525a7e          cond:1 = ecx_1 == 0;
00525a03      }
00525a03      
00525a80      void* eax_6 = *(uint32_t*)esi;
00525a80      
00525a82      if (cond:1)
00525a82      {
00525af1          this->placement_frame_id = *(uint32_t*)eax_6;
00525af4          *(uint32_t*)esi += 4;
00525a82      }
00525a82      else
00525a82      {
00525a86          this->frame_number = *(uint32_t*)eax_6;
00525a8c          *(uint32_t*)((char*)this->frame_number)[4] = *(uint32_t*)((char*)eax_6 + 4);
00525a91          void* ebx_3 = (*(uint32_t*)esi + 8);
00525a94          *(uint32_t*)esi = ebx_3;
00525a98          int32_t i_5 = *(uint32_t*)ebx_3;
00525a9d          *(uint32_t*)esi = ((char*)ebx_3 + 4);
00525a9f          class DLListData* head_ = this->anim_list.head_;
00525aa4          void* __offset(DLListData, -0x4) eax_9;
00525aa4          
00525aa4          if (head_ == 0)
00525aab              eax_9 = nullptr;
00525aa4          else
00525aa6              eax_9 = ((char*)head_ - 4);
00525aa6          
00525aaf          if (i_5 > 0)
00525aaf          {
00525ab1              int32_t i_3 = i_5;
00525abb              int32_t i_1;
00525abb              
00525abb              do
00525abb              {
00525ab5                  eax_9 = AnimSequenceNode::GetNext(eax_9);
00525aba                  i_1 = i_3;
00525aba                  i_3 -= 1;
00525abb              } while (i_1 != 1);
00525aaf          }
00525aaf          
00525abd          this->first_cyclic = eax_9;
00525ac0          void* eax_10 = *(uint32_t*)esi;
00525ac2          int32_t i_6 = *(uint32_t*)eax_10;
00525ac7          *(uint32_t*)esi = ((char*)eax_10 + 4);
00525ac9          class DLListData* head__1 = this->anim_list.head_;
00525ace          class AnimSequenceNode* eax_12;
00525ace          
00525ace          if (head__1 == 0)
00525ad5              eax_12 = nullptr;
00525ace          else
00525ad0              eax_12 = ((char*)head__1 - 4);
00525ad0          
00525ad9          if (i_6 > 0)
00525ad9          {
00525adb              int32_t i_4 = i_6;
00525ae8              int32_t i_2;
00525ae8              
00525ae8              do
00525ae8              {
00525ae2                  eax_12 = AnimSequenceNode::GetNext(eax_12);
00525ae7                  i_2 = i_4;
00525ae7                  i_4 -= 1;
00525ae8              } while (i_2 != 1);
00525ad9          }
00525ad9          
00525aea          this->curr_anim = eax_12;
00525a82      }
00525a82      
00525af7      void* eax_13 = *(uint32_t*)esi;
00525af9      char ecx_11 = ((int8_t)*(uint32_t*)eax_13);
00525afb      void* eax_14 = ((char*)eax_13 + 4);
00525b01      *(uint32_t*)esi = eax_14;
00525b01      
00525b0e      if (((ecx_11 & 1) != 0 && arg3 >= 0xc))
00525b0e      {
00525b12          this->velocity.x = *(uint32_t*)eax_14;
00525b17          void* eax_17 = (*(uint32_t*)esi + 4);
00525b1a          *(uint32_t*)esi = eax_17;
00525b1e          this->velocity.y = *(uint32_t*)eax_17;
00525b23          void* ebx_5 = (*(uint32_t*)esi + 4);
00525b26          *(uint32_t*)esi = ebx_5;
00525b2c          this->velocity.z = *(uint32_t*)ebx_5;
00525b31          eax_14 = (*(uint32_t*)esi + 4);
00525b34          *(uint32_t*)esi = eax_14;
00525b0e      }
00525b0e      
00525b3f      if (((ecx_11 & 2) != 0 && arg3 >= 0xc))
00525b3f      {
00525b43          this->omega.x = *(uint32_t*)eax_14;
00525b48          void* edx_5 = (*(uint32_t*)esi + 4);
00525b4b          *(uint32_t*)esi = edx_5;
00525b51          this->omega.y = *(uint32_t*)edx_5;
00525b56          void* ecx_14 = (*(uint32_t*)esi + 4);
00525b59          *(uint32_t*)esi = ecx_14;
00525b5f          this->omega.z = *(uint32_t*)ecx_14;
00525b62          *(uint32_t*)esi += 4;
00525b3f      }
00525b3f      
00525b6e      return 1;
005259d0  }

00525b71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00525b80  void __thiscall CSequence::update(class CSequence* this, double arg2, class Frame* arg3)

00525b80  {
00525b88      if (this->anim_list.head_ != 0)
00525b88      {
00525b9f          int32_t var_14_1 = *(uint32_t*)((char*)arg2)[4];
00525ba3          CSequence::update_internal(this, arg2, &this->curr_anim, &this->frame_number, arg3);
00525baa          CSequence::apricot(this);
00525bb0          return;
00525b88      }
00525b88      
00525bb9      if (arg3 != 0)
00525bb9      {
00525bbb          int32_t eax_3 = *(uint32_t*)((char*)arg2)[4];
00525bbf          int32_t ecx_4 = arg2;
00525bc3          int32_t var_8_2 = eax_3;
00525bc5          int32_t var_10_2 = eax_3;
00525bca          CSequence::apply_physics(this, arg3, ecx_4, ecx_4);
00525bb9      }
00525b80  }

00525bd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00525be0  void __thiscall AnimSequenceNode::multiply_framerate(class AnimSequenceNode* this, float arg2)

00525be0  {
00525be0      long double x87_r7 = ((long double)arg2);
00525be4      long double temp1 = ((long double)0f);
00525be4      (x87_r7 - temp1);
00525bea      int32_t eax;
00525bea      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00525bec      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00525bec      
00525bef      if (!(p))
00525bef      {
00525bf1          int32_t low_frame = this->low_frame;
00525bf7          this->low_frame = this->high_frame;
00525bfa          this->high_frame = low_frame;
00525bef      }
00525bef      
00525c04      this->framerate = ((float)(((long double)arg2) * ((long double)this->framerate)));
00525be0  }

00525c0a                                90 90 90 90 90 90                                                            ......

00525c10  class AFrame* __thiscall AnimSequenceNode::get_pos_frame(class AnimSequenceNode const* this, int32_t arg2)

00525c10  {
00525c10      class CAnimation* anim = this->anim;
00525c10      
00525c22      if ((anim != 0 && (arg2 >= 0 && arg2 < anim->num_frames)))
00525c2c          return ((arg2 * 0x1c) + anim->pos_frames);
00525c2c      
00525c31      return 0;
00525c10  }

00525c34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00525c40  class AnimFrame const* __thiscall AnimSequenceNode::get_part_frame(class AnimSequenceNode const* this, int32_t arg2)

00525c40  {
00525c40      class CAnimation* anim = this->anim;
00525c40      
00525c52      if ((anim != 0 && (arg2 >= 0 && arg2 < anim->num_frames)))
00525c5c          return &anim->part_frames[arg2];
00525c5c      
00525c61      return 0;
00525c40  }

00525c64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00525c70  int32_t __fastcall AnimSequenceNode::has_anim(class AnimSequenceNode const* this)

00525c70  {
00525c77      int32_t result;
00525c77      result = this->anim != 0;
00525c7a      return result;
00525c70  }

00525c7b                                                                                   90 90 90 90 90                             .....

00525c80  int32_t __fastcall AnimSequenceNode::get_starting_frame(class AnimSequenceNode const* this)

00525c80  {
00525c80      class AnimSequenceNode* this_1 = this;
00525c81      long double x87_r7 = ((long double)this->framerate);
00525c84      long double temp0 = ((long double)0f);
00525c84      (x87_r7 - temp0);
00525c8a      int16_t result = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
00525c8a      
00525c8f      if ((*(uint8_t*)((char*)result)[1] & 1) != 0)
00525ca9          return (this->high_frame + 1);
00525ca9      
00525c91      this->low_frame;
00525c95      return result;
00525c80  }

00525caa                                90 90 90 90 90 90                                                            ......

00525cb0  int32_t __fastcall AnimSequenceNode::get_ending_frame(class AnimSequenceNode const* this)

00525cb0  {
00525cb0      class AnimSequenceNode* this_1 = this;
00525cb1      long double x87_r7 = ((long double)this->framerate);
00525cb4      long double temp0 = ((long double)0f);
00525cb4      (x87_r7 - temp0);
00525cba      int16_t result = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
00525cba      
00525cbf      if ((*(uint8_t*)((char*)result)[1] & 1) == 0)
00525cd4          return (this->high_frame + 1);
00525cd4      
00525cd5      this->low_frame;
00525cd9      return result;
00525cb0  }

00525cda                                                                                90 90 90 90 90 90                            ......

00525ce0  void __fastcall AnimData::AnimData(class AnimData* this)

00525ce0  {
00525ce4      this->vtable = &AnimData::`vftable';
00525cea      this->anim_id.id = 0;
00525ced      this->low_frame = 0;
00525cf0      this->high_frame = 0xffffffff;
00525cf7      this->framerate = 30f;
00525ce0  }

00525cff                                                                                               90                                 .

00525d00  class AnimData* operator*(class AnimData* __return, float arg2, class AnimData const* arg3)

00525d00  {
00525d07      uint32_t id = arg3->anim_id.id;
00525d0a      int32_t low_frame = arg3->low_frame;
00525d15      long double x87_r7_1 = (((long double)arg3->framerate) * ((long double)arg2));
00525d19      __return->high_frame = arg3->high_frame;
00525d1c      __return->vtable = &AnimData::`vftable';
00525d22      __return->framerate = ((float)x87_r7_1);
00525d25      __return->anim_id.id = id;
00525d28      __return->low_frame = low_frame;
00525d2c      return __return;
00525d00  }

00525d2d                                         90 90 90                                                               ...

00525d30  void __fastcall AnimSequenceNode::AnimSequenceNode(class AnimSequenceNode* this)

00525d30  {
00525d34      this->dllist_next = nullptr;
00525d37      this->dllist_prev = nullptr;
00525d3a      this->anim = nullptr;
00525d40      this->vtable = 0x7c8504;
00525d46      this->framerate = 30f;
00525d4d      this->low_frame = 0xffffffff;
00525d50      this->high_frame = 0xffffffff;
00525d30  }

00525d54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00525d60  void __thiscall AnimSequenceNode::set_animation_id(class AnimSequenceNode* this, class IDClass<_tagDataID,32,0> arg2)

00525d60  {
00525d66      class CAnimation* anim_1 = this->anim;
00525d66      
00525d6b      if (anim_1 != 0)
00525d6d          anim_1->vtable->Release();
00525d6d      
00525d78      void var_8;
00525d78      
00525d78      if (arg2 == 0)
00525d94          this->anim = nullptr;
00525d78      else
00525d8f          this->anim = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 8));
00525d9b      class CAnimation* anim = this->anim;
00525d9b      
00525da0      if (anim != 0)
00525da0      {
00525da7          if (this->high_frame < 0)
00525dad              this->high_frame = (anim->num_frames - 1);
00525dad          
00525db0          uint32_t num_frames_1 = anim->num_frames;
00525db0          
00525db6          if (this->low_frame >= num_frames_1)
00525db9              this->low_frame = (num_frames_1 - 1);
00525db9          
00525dbc          uint32_t num_frames = anim->num_frames;
00525dbc          
00525dc2          if (this->high_frame >= num_frames)
00525dc5              this->high_frame = (num_frames - 1);
00525dc5          
00525dc8          int32_t low_frame = this->low_frame;
00525dc8          
00525dce          if (low_frame > this->high_frame)
00525dd0              this->high_frame = low_frame;
00525da0      }
00525d60  }

00525dda                                                                                90 90 90 90 90 90                            ......

00525de0  class AnimSequenceNode const* __fastcall AnimSequenceNode::GetNext(class AnimSequenceNode const* this)

00525de0  {
00525de0      class DLListData* dllist_next = this->dllist_next;
00525de0      
00525de5      if (dllist_next == 0)
00525ded          return 0;
00525ded      
00525dea      return ((char*)dllist_next - 4);
00525de0  }

00525dee                                            90 90                                                                ..

00525df0  class AnimSequenceNode* __fastcall AnimSequenceNode::GetPrev(class AnimSequenceNode* this)

00525df0  {
00525df0      class DLListData* dllist_prev = this->dllist_prev;
00525df0      
00525df5      if (dllist_prev == 0)
00525dfd          return 0;
00525dfd      
00525dfa      return ((char*)dllist_prev - 4);
00525df0  }

00525dfe                                                                                            90 90                                ..

00525e00  uint32_t __thiscall AnimData::Pack(class AnimData* this, void** arg2, uint32_t arg3)

00525e00  {
00525e05      if (arg3 >= 0x10)
00525e05      {
00525e11          **(uint32_t**)arg2 = this->anim_id.id;
00525e15          void* edx_3 = (*(uint32_t*)arg2 + 4);
00525e18          *(uint32_t*)arg2 = edx_3;
00525e1d          *(uint32_t*)edx_3 = this->low_frame;
00525e21          void* esi_4 = (*(uint32_t*)arg2 + 4);
00525e24          *(uint32_t*)arg2 = esi_4;
00525e2b          *(uint32_t*)esi_4 = this->high_frame;
00525e2f          void* edx_6 = (*(uint32_t*)arg2 + 4);
00525e32          *(uint32_t*)arg2 = edx_6;
00525e37          *(uint32_t*)edx_6 = ((float)((long double)this->framerate));
00525e39          *(uint32_t*)arg2 += 4;
00525e05      }
00525e05      
00525e42      return 0x10;
00525e00  }

00525e45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00525e50  int32_t __thiscall AnimData::UnPack(class AnimData* this, void** arg2, uint32_t arg3)

00525e50  {
00525e55      if (arg3 < 0x10)
00525e59          return 0;
00525e59      
00525e62      void* edx_1 = (*(uint32_t*)arg2 + 4);
00525e66      class IDClass<_tagDataID,32,0> esi = *(uint32_t*)((char*)edx_1 - 4);
00525e69      *(uint32_t*)arg2 = edx_1;
00525e6b      this->anim_id.id = esi;
00525e72      this->low_frame = **(uint32_t**)arg2;
00525e77      void* esi_2 = (*(uint32_t*)arg2 + 4);
00525e7a      *(uint32_t*)arg2 = esi_2;
00525e80      this->high_frame = *(uint32_t*)esi_2;
00525e85      void* edx_7 = (*(uint32_t*)arg2 + 4);
00525e88      *(uint32_t*)arg2 = edx_7;
00525e8c      this->framerate = *(uint32_t*)edx_7;
00525e8f      *(uint32_t*)arg2 += 4;
00525e98      return 1;
00525e50  }

00525e9b                                                                                   90 90 90 90 90                             .....

00525ea0  void* __thiscall AnimSequenceNode::`scalar deleting destructor'(class AnimSequenceNode* this, uint32_t arg2)

00525ea0  {
00525ea3      class CAnimation* anim = this->anim;
00525ea8      this->vtable = 0x7c8504;
00525ea8      
00525eae      if (anim != 0)
00525eb0          anim->vtable->Release();
00525eb0      
00525eba      this->vtable = 0x79285c;
00525eba      
00525ec0      if ((arg2 & 1) != 0)
00525ec3          operator delete(this);
00525ec3      
00525ece      return this;
00525ea0  }

00525ed1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00525ee0  uint32_t __thiscall AnimSequenceNode::Pack(class AnimSequenceNode* this, void** arg2, uint32_t arg3)

00525ee0  {
00525ee5      if (arg3 >= 0x10)
00525ee5      {
00525ee7          class CAnimation* anim = this->anim;
00525ee7          
00525ef1          if (anim == 0)
00525f04              **(uint32_t**)arg2 = INVALID_DID.id;
00525ef1          else
00525ef8              **(uint32_t**)arg2 = anim->m_DID.id;
00525ef8          
00525f08          void* edx_4 = (*(uint32_t*)arg2 + 4);
00525f0b          *(uint32_t*)arg2 = edx_4;
00525f10          *(uint32_t*)edx_4 = this->low_frame;
00525f14          void* esi_5 = (*(uint32_t*)arg2 + 4);
00525f17          *(uint32_t*)arg2 = esi_5;
00525f1e          *(uint32_t*)esi_5 = this->high_frame;
00525f22          void* edx_7 = (*(uint32_t*)arg2 + 4);
00525f25          *(uint32_t*)arg2 = edx_7;
00525f2a          *(uint32_t*)edx_7 = ((float)((long double)this->framerate));
00525f2c          *(uint32_t*)arg2 += 4;
00525ee5      }
00525ee5      
00525f35      return 0x10;
00525ee0  }

00525f38                                                                          90 90 90 90 90 90 90 90                          ........

00525f40  int32_t __thiscall AnimSequenceNode::UnPack(class AnimSequenceNode* this, void** arg2, uint32_t arg3)

00525f40  {
00525f45      if (arg3 < 0x10)
00525f49          return 0;
00525f49      
00525f52      void* edx_1 = (*(uint32_t*)arg2 + 4);
00525f56      class IDClass<_tagDataID,32,0> esi = *(uint32_t*)((char*)edx_1 - 4);
00525f59      *(uint32_t*)arg2 = edx_1;
00525f5d      this->low_frame = *(uint32_t*)edx_1;
00525f62      void* edx_4 = (*(uint32_t*)arg2 + 4);
00525f65      *(uint32_t*)arg2 = edx_4;
00525f69      this->high_frame = *(uint32_t*)edx_4;
00525f6e      void* edx_7 = (*(uint32_t*)arg2 + 4);
00525f71      *(uint32_t*)arg2 = edx_7;
00525f75      this->framerate = *(uint32_t*)edx_7;
00525f7e      *(uint32_t*)arg2 += 4;
00525f80      AnimSequenceNode::set_animation_id(this, esi);
00525f8b      return 1;
00525f40  }

00525f8e                                            90 90                                                                ..

00525f90  void __thiscall AnimSequenceNode::AnimSequenceNode(class AnimSequenceNode* this, class AnimData const* arg2)

00525f90  {
00525f95      this->dllist_next = nullptr;
00525f98      this->dllist_prev = nullptr;
00525f9b      this->anim = nullptr;
00525fa2      this->vtable = 0x7c8504;
00525fab      this->framerate = arg2->framerate;
00525fb1      this->low_frame = arg2->low_frame;
00525fb7      this->high_frame = arg2->high_frame;
00525fc0      AnimSequenceNode::set_animation_id(this, arg2->anim_id.id);
00525f90  }

00525fcb                                   90 90 90 90 90                                                             .....

00525fd0  void __fastcall MotionState::MotionState(class MotionState* this)

00525fd0  {
00525fd4      this->style = 0;
00525fd6      this->substate = 0;
00525fd9      this->substate_mod = 1f;
00525fe0      this->modifier_head = nullptr;
00525fe3      this->action_head = nullptr;
00525fe6      this->action_tail = nullptr;
00525fd0  }

00525fea                                90 90 90 90 90 90                                                            ......

00525ff0  void __thiscall MotionState::add_modifier_no_check(class MotionState* this, uint32_t arg2, float arg3)

00525ff0  {
00525ff5      class MotionList* eax = operator new(0xc);
00525ff5      
00525fff      if (eax == 0)
00526017          eax = nullptr;
00525fff      else
00525fff      {
00526001          eax->motion = 0;
00526007          eax->speed_mod = 1f;
0052600e          eax->next = nullptr;
00525fff      }
00525fff      
00526021      eax->motion = arg2;
00526023      eax->speed_mod = arg3;
00526029      eax->next = this->modifier_head;
0052602c      this->modifier_head = eax;
00525ff0  }

00526033                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00526040  void __thiscall MotionState::remove_modifier(class MotionState* this, class MotionList* arg2, class MotionList* arg3)

00526040  {
0052604b      if (arg3 != 0)
0052604b      {
00526050          arg3->next = arg2->next;
00526053          operator delete(arg2);
0052605b          return;
0052604b      }
0052604b      
00526061      this->modifier_head = arg2->next;
00526064      operator delete(arg2);
00526040  }

0052606d                                         90 90 90                                                               ...

00526070  void __fastcall MotionState::clear_modifiers(class MotionState* this)

00526070  {
00526074      class MotionList* i = this->modifier_head;
00526074      
00526079      while (i != 0)
00526079      {
00526080          class MotionList* i_1 = i;
00526082          i = i->next;
00526086          operator delete(i_1);
00526079      }
00526079      
00526092      this->modifier_head = nullptr;
00526070  }

0052607d                                                                                         8d 49 00                               .I.
0052609c                                                                                      90 90 90 90                              ....

005260a0  void __thiscall MotionState::add_action(class MotionState* this, uint32_t arg2, float arg3)

005260a0  {
005260a5      class MotionList* eax = operator new(0xc);
005260a5      
005260b1      if (eax == 0)
005260c1          eax = nullptr;
005260b1      else
005260b1      {
005260b3          eax->motion = 0;
005260b5          eax->speed_mod = 1f;
005260bc          eax->next = nullptr;
005260b1      }
005260b1      
005260c7      eax->motion = arg2;
005260cd      eax->speed_mod = arg3;
005260d0      eax->next = nullptr;
005260d0      
005260d6      if (this->action_head == 0)
005260d8          this->action_head = eax;
005260d8      
005260db      class MotionList* action_tail = this->action_tail;
005260db      
005260e0      if (action_tail != 0)
005260e2          action_tail->next = eax;
005260e2      
005260e5      this->action_tail = eax;
005260a0  }

005260ec                                      90 90 90 90                                                              ....

005260f0  void __fastcall MotionState::clear_actions(class MotionState* this)

005260f0  {
005260f5      class MotionList* i = this->action_head;
005260f5      
005260fc      while (i != 0)
005260fc      {
00526100          class MotionList* i_1 = i;
00526102          i = i->next;
00526106          operator delete(i_1);
005260fc      }
005260fc      
00526112      this->action_head = nullptr;
00526115      this->action_tail = nullptr;
005260f0  }

0052611c                                                                                      90 90 90 90                              ....

00526120  uint32_t __fastcall MotionState::remove_action_head(class MotionState* this)

00526120  {
00526120      class MotionList* action_head = this->action_head;
00526120      
00526127      if (action_head == 0)
00526145          return 0;
00526145      
00526129      class MotionList* next = action_head->next;
0052612f      uint32_t motion = action_head->motion;
00526131      this->action_head = next;
00526131      
00526134      if (next == 0)
00526136          this->action_tail = next;
00526136      
0052613a      operator delete(action_head);
00526142      return motion;
00526120  }

00526146                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526150  void __fastcall MotionData::Destroy(class MotionData* this)

00526150  {
00526154      class AnimData* anims = this->anims;
00526154      
0052615b      if (anims != 0)
0052615b      {
00526165          if (anims->vtable != 0)
00526165          {
00526167              anims->vtable->__vecDelDtor(3);
0052616d              this->anims = nullptr;
00526170              this->num_anims = 0;
00526175              return;
00526165          }
00526165          
00526177          operator delete[](((char*)anims - 4));
0052615b      }
0052615b      
0052617f      this->anims = nullptr;
00526182      this->num_anims = 0;
00526150  }

00526188                          90 90 90 90 90 90 90 90                                                          ........

00526190  uint32_t PackObj::GET_SIZE_LEFT(void* arg1, void* arg2, uint32_t arg3) __pure

00526190  {
00526198      void* eax_1 = ((char*)arg1 - arg2);
00526198      
005261a0      if (arg3 <= eax_1)
005261a9          return 0;
005261a9      
005261a6      return (arg3 - eax_1);
00526190  }

005261aa                                90 90 90 90 90 90                                                            ......

005261b0  int32_t PackObj::VERIFY_ADDR(void* arg1, void* arg2, uint32_t arg3) __pure

005261b0  {
005261ba      if (arg2 > arg1)
005261c8          return 0;
005261c8      
005261bc      void* eax_1 = ((char*)arg1 - arg2);
005261c5      return (((char*)eax_1 - eax_1) + 1);
005261b0  }

005261c9                             90 90 90 90 90 90 90                                                           .......

005261d0  void __thiscall MotionState::copy(class MotionState* this, class MotionState const* arg2)

005261d0  {
005261d1      class MotionState* ebx = arg2;
005261da      uint32_t* this_1 = this;
005261dc      *(uint32_t*)this_1 = ebx->style;
005261e1      this_1[1] = ebx->substate;
005261e7      this_1[2] = ebx->substate_mod;
005261e7      
005261f1      if (ebx->modifier_head == 0)
00526259          this_1[3] = 0;
005261f1      else
005261f1      {
005261f5          void* eax_2 = operator new(0xc);
005261f5          
005261ff          if (eax_2 == 0)
00526213              eax_2 = nullptr;
005261ff          else
005261ff          {
00526201              class MotionList* modifier_head = ebx->modifier_head;
00526204              *(uint32_t*)((char*)eax_2 + 8) = 0;
00526209              *(uint32_t*)eax_2 = modifier_head->motion;
0052620e              *(uint32_t*)((char*)eax_2 + 4) = modifier_head->speed_mod;
005261ff          }
005261ff          
00526215          this_1[3] = eax_2;
0052621b          class MotionList* next = ebx->modifier_head->next;
00526220          arg2 = eax_2;
00526220          
00526224          while (next != 0)
00526224          {
00526228              class MotionState* eax_3 = operator new(0xc);
00526228              
00526232              if (eax_3 == 0)
00526243                  eax_3 = nullptr;
00526232              else
00526232              {
00526234                  eax_3->substate_mod = 0f;
00526239                  eax_3->style = next->motion;
0052623e                  eax_3->substate = next->speed_mod;
00526232              }
00526232              
00526249              arg2->substate_mod = eax_3;
0052624c              next = next->next;
00526251              arg2 = eax_3;
00526224          }
005261f1      }
005261f1      
0052625f      if (ebx->action_head == 0)
0052625f      {
005262cb          this_1[4] = 0;
005262ce          this_1[5] = 0;
005262ce          return;
0052625f      }
0052625f      
00526263      void* eax_4 = operator new(0xc);
00526263      
0052626d      if (eax_4 == 0)
00526281          eax_4 = nullptr;
0052626d      else
0052626d      {
0052626f          class MotionList* action_head = ebx->action_head;
00526272          *(uint32_t*)((char*)eax_4 + 8) = 0;
00526277          *(uint32_t*)eax_4 = action_head->motion;
0052627c          *(uint32_t*)((char*)eax_4 + 4) = action_head->speed_mod;
0052626d      }
0052626d      
00526283      this_1[4] = eax_4;
00526289      class MotionList* next_1 = ebx->action_head->next;
0052628e      void* ebx_1 = eax_4;
00526290      this_1[5] = ebx_1;
00526290      
00526293      if (next_1 != 0)
00526293      {
005262c2          do
005262c2          {
00526297              int32_t* eax_5 = operator new(0xc);
00526297              
005262a1              if (eax_5 == 0)
005262b2                  eax_5 = nullptr;
005262a1              else
005262a1              {
005262a3                  eax_5[2] = 0;
005262a8                  *(uint32_t*)eax_5 = next_1->motion;
005262ad                  eax_5[1] = next_1->speed_mod;
005262a1              }
005262a1              
005262b4              this_1[5] = eax_5;
005262b7              *(uint32_t*)((char*)ebx_1 + 8) = eax_5;
005262ba              next_1 = next_1->next;
005262bf              ebx_1 = this_1[5];
005262c2          } while (next_1 != 0);
00526293      }
005261d0  }

005262d8                                                                          90 90 90 90 90 90 90 90                          ........

005262e0  void __fastcall MotionState::Destroy(class MotionState* this)

005262e0  {
005262e5      class MotionList* i = this->modifier_head;
005262e5      
005262ec      while (i != 0)
005262ec      {
005262f0          class MotionList* i_2 = i;
005262f2          i = i->next;
005262f6          operator delete(i_2);
005262ec      }
005262ec      
00526302      class MotionList* i_1 = this->action_head;
00526307      this->modifier_head = nullptr;
00526307      
0052630a      while (i_1 != 0)
0052630a      {
00526310          class MotionList* i_3 = i_1;
00526312          i_1 = i_1->next;
00526316          operator delete(i_3);
0052630a      }
0052630a      
00526322      this->action_head = nullptr;
00526325      this->action_tail = nullptr;
005262e0  }

0052632c                                      90 90 90 90                                                              ....

00526330  void __fastcall MotionState::~MotionState(class MotionState* this)

00526330  {
00526330      /* tailcall */
00526330      return MotionState::Destroy(this);
00526330  }

00526335                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00526340  int32_t __thiscall MotionState::add_modifier(class MotionState* this, uint32_t arg2, float arg3)

00526340  {
00526349      for (class MotionList* i = this->modifier_head; i != 0; i = i->next)
00526349      {
00526352          if (i->motion == arg2)
00526362              return 0;
00526349      }
00526349      
0052635e      if (this->substate == arg2)
00526362          return 0;
00526362      
0052636b      MotionState::add_modifier_no_check(this, arg2, arg3);
00526375      return 1;
00526340  }

0052634d                                         8d 49 00                                                               .I.
00526378                                                                          90 90 90 90 90 90 90 90                          ........

00526380  uint32_t __thiscall MotionData::Pack(class MotionData* this, void** arg2, uint32_t arg3)

00526380  {
00526390      int32_t* ebx;
00526390      ebx = 0;
00526393      char var_19 = 0;
00526397      int32_t var_c = 0;
0052639f      int32_t var_8 = 0;
005263a7      int32_t var_4 = 0;
005263a7      
005263ba      if (Vector3::operator!=(&this->velocity, &var_c) != 0)
005263ba      {
005263bc          var_19 = 1;
005263c1          ebx = 1;
005263ba      }
005263ba      
005263cd      var_c = 0;
005263d5      int32_t var_8_1 = 0;
005263dd      int32_t var_4_1 = 0;
005263dd      
005263f0      if (Vector3::operator!=(&this->omega, &var_c) != 0)
005263f0      {
005263f2          ebx |= 2;
005263f5          var_19 = ebx;
005263f0      }
005263f0      
005263f9      uint32_t eax_1;
005263f9      eax_1 = this->num_anims;
005263fc      float** esi = arg2;
00526400      int32_t ecx_2 = 8;
00526405      int32_t i = 0;
00526409      int32_t var_18 = 8;
00526409      
0052640d      if (eax_1 > 0)
0052640d      {
0052640f          ebx = nullptr;
0052640f          
00526434          do
00526434          {
00526424              ecx_2 = (var_18 + *(uint32_t*)(*(uint32_t*)((char*)ebx + this->anims) + 0xc)(esi, 0));
0052642a              i += 1;
0052642b              ebx = &ebx[5];
00526430              var_18 = ecx_2;
00526434          } while (i < ((uint32_t)this->num_anims));
00526434          
00526436          ebx = var_19;
0052640d      }
0052640d      
0052643a      eax_1 = ebx;
0052643c      eax_1 &= 1;
0052643e      arg2 = eax_1;
0052643e      
00526442      if (eax_1 != 0)
00526442      {
00526444          ecx_2 += 0xc;
00526447          var_18 = ecx_2;
00526442      }
00526442      
0052644b      eax_1 = ebx;
0052644d      eax_1 &= 2;
0052644d      
00526453      if (eax_1 != 0)
00526453      {
00526455          ecx_2 += 0xc;
00526458          var_18 = ecx_2;
00526453      }
00526453      
0052645c      uint32_t eax_4 = arg3;
0052645c      
00526462      if (eax_4 < ecx_2)
0052646d          return ecx_2;
0052646d      
00526475      **(uint32_t**)esi = this->id;
00526479      void* ecx_7 = &*(uint32_t*)esi[1];
0052647c      *(uint32_t*)esi = ecx_7;
0052647e      uint32_t edx_2;
0052647e      edx_2 = this->num_anims;
00526481      *(uint8_t*)ecx_7 = edx_2;
00526485      void* ebp_1 = (*(uint32_t*)esi + 1);
00526486      *(uint32_t*)esi = ebp_1;
00526488      edx_2 = this->bitfield;
0052648d      *(uint8_t*)ebp_1 = edx_2;
00526491      char* edx_4 = (*(uint32_t*)esi + 1);
00526492      *(uint32_t*)esi = edx_4;
00526496      *(uint8_t*)edx_4 = ebx;
0052649a      class AC1Legacy::Vector3* ecx_11 = (*(uint32_t*)esi + 1);
0052649d      void* edx_6 = (ecx_11 & 0x80000003);
0052649d      bool cond:5 = edx_6 == 0;
005264a3      *(uint32_t*)esi = ecx_11;
005264a3      
005264a5      if (edx_6 < 0)
005264a5      {
005264a8          void* edx_8 = (((char*)edx_6 - 1) | 0xfffffffc);
005264ab          edx_6 = ((char*)edx_8 + 1);
005264ab          cond:5 = edx_8 == 0xffffffff;
005264a5      }
005264a5      
005264ac      if (!(cond:5))
005264ac      {
005264b3          void* i_3 = (4 - edx_6);
005264b3          
005264b5          if (4 != edx_6)
005264b5          {
005264c2              void* i_1;
005264c2              
005264c2              do
005264c2              {
005264b7                  ecx_11->x = 0;
005264bc                  void* ebp_3 = (*(uint32_t*)esi + 1);
005264bd                  i_1 = i_3;
005264bd                  i_3 -= 1;
005264be                  *(uint32_t*)esi = ebp_3;
005264c0                  ecx_11 = ebp_3;
005264c2              } while (i_1 != 1);
005264b5          }
005264ac      }
005264ac      
005264c4      ecx_11 = this->num_anims;
005264c7      int32_t i_2 = 0;
005264c7      
005264cb      if (ecx_11 > 0)
005264cb      {
005264cd          int32_t ebx_1 = 0;
005264cd          
005264eb          do
005264eb          {
005264da              *(uint32_t*)(*(uint32_t*)(this->anims + ebx_1) + 0xc)(esi, eax_4);
005264e1              i_2 += 1;
005264e2              ebx_1 += 0x14;
005264e7              eax_4 = arg3;
005264eb          } while (i_2 < ((uint32_t)this->num_anims));
005264cb      }
005264cb      
005264ed      ecx_11 = arg2;
005264ed      
005264f8      if ((ecx_11 != 0 && eax_4 >= 0xc))
005264f8      {
00526502          **(uint32_t**)esi = this->velocity.x;
00526506          void* edi_3 = &*(uint32_t*)esi[1];
00526509          *(uint32_t*)esi = edi_3;
00526510          *(uint32_t*)edi_3 = ((float)((long double)this->velocity.y));
00526514          float* edx_13 = &*(uint32_t*)esi[1];
00526517          *(uint32_t*)esi = edx_13;
0052651c          *(uint32_t*)edx_13 = ((float)((long double)this->velocity.z));
0052651e          *(uint32_t*)esi = &*(uint32_t*)esi[1];
005264f8      }
005264f8      
00526521      ecx_11 = eax_1;
00526521      
0052652c      if ((ecx_11 != 0 && eax_4 >= 0xc))
0052652c      {
00526536          **(uint32_t**)esi = this->omega.x;
0052653a          float* edi_5 = &*(uint32_t*)esi[1];
0052653d          *(uint32_t*)esi = edi_5;
00526544          *(uint32_t*)edi_5 = ((float)((long double)this->omega.y));
00526548          float* edx_17 = &*(uint32_t*)esi[1];
0052654b          *(uint32_t*)esi = edx_17;
00526550          *(uint32_t*)edx_17 = ((float)((long double)this->omega.z));
00526552          *(uint32_t*)esi = &*(uint32_t*)esi[1];
0052652c      }
0052652c      
00526560      return var_18;
00526380  }

00526563           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00526570  int32_t __thiscall MotionData::UnPack(class MotionData* this, void** arg2, uint32_t arg3)

00526570  {
00526574      void** esi = arg2;
0052657f      this->id = **(uint32_t**)esi;
00526584      void* edx_1 = (*(uint32_t*)esi + 4);
00526587      *(uint32_t*)esi = edx_1;
0052658b      edx_1 = *(uint8_t*)edx_1;
0052658d      this->num_anims = edx_1;
00526592      void* i_2 = (*(uint32_t*)esi + 1);
00526593      *(uint32_t*)esi = i_2;
00526597      void* eax_2;
00526597      eax_2 = *(uint8_t*)i_2;
00526599      this->bitfield = eax_2;
0052659e      void* eax_4 = (*(uint32_t*)esi + 1);
0052659f      *(uint32_t*)esi = eax_4;
005265a1      i_2 = *(uint8_t*)eax_4;
005265a4      *(uint32_t*)esi = ((char*)eax_4 + 1);
005265a6      void* eax_6 = (((char*)eax_4 + 1) & 0x80000003);
005265a6      bool cond:1 = eax_6 == 0;
005265ab      arg2 = i_2;
005265ab      
005265af      if (eax_6 < 0)
005265af      {
005265b2          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
005265b5          eax_6 = ((char*)eax_8 + 1);
005265b5          cond:1 = eax_8 == 0xffffffff;
005265af      }
005265af      
005265b6      if (!(cond:1))
005265b6      {
005265bd          i_2 = (4 - eax_6);
005265bd          
005265bf          if (4 != eax_6)
005265bf          {
005265cc              void* i;
005265cc              
005265cc              do
005265cc              {
005265c3                  **(uint8_t**)esi = 0;
005265c9                  i = i_2;
005265c9                  i_2 -= 1;
005265ca                  *(uint32_t*)esi += 1;
005265cc              } while (i != 1);
005265bf          }
005265b6      }
005265b6      
005265ce      eax_6 = this->num_anims;
005265ce      
005265d5      if (eax_6 != 0)
005265d5      {
005265d7          int32_t ebp_1 = ((uint32_t)eax_6);
005265e6          eax_6 = operator new[](((ebp_1 * 0x14) + 4));
005265f0          void* ebx_1;
005265f0          
005265f0          if (eax_6 == 0)
00526607              ebx_1 = nullptr;
005265f0          else
005265f0          {
005265f8              ebx_1 = ((char*)eax_6 + 4);
005265fe              *(uint32_t*)eax_6 = ebp_1;
00526600              eax_6 = `vector constructor iterator'(ebx_1, 0x14, ebp_1, AnimData::AnimData);
005265f0          }
005265f0          
00526609          this->anims = ebx_1;
005265d5      }
005265d5      
0052660c      eax_6 = this->num_anims;
0052660f      int32_t i_1 = 0;
0052660f      
00526613      if (eax_6 > 0)
00526613      {
00526615          int32_t* ebx_2 = nullptr;
00526615          
00526633          do
00526633          {
00526626              *(uint32_t*)(*(uint32_t*)((char*)ebx_2 + this->anims) + 0x10)(esi, arg3);
0052662d              i_1 += 1;
0052662e              ebx_2 = &ebx_2[5];
00526633          } while (i_1 < ((uint32_t)this->num_anims));
00526613      }
00526613      
00526635      i_2 = arg2;
00526635      
00526641      if ((i_2 & 1) == 0)
00526641      {
0052667d          this->velocity.x = 0;
0052667d          this->velocity.y = 0f;
0052667d          this->velocity.z = 0f;
00526641      }
00526641      else if (arg3 >= 0xc)
00526647      {
0052664d          this->velocity.x = **(uint32_t**)esi;
00526652          void* ebp_3 = (*(uint32_t*)esi + 4);
00526655          *(uint32_t*)esi = ebp_3;
0052665b          this->velocity.y = *(uint32_t*)ebp_3;
00526660          void* ebx_4 = (*(uint32_t*)esi + 4);
00526663          *(uint32_t*)esi = ebx_4;
00526669          this->velocity.z = *(uint32_t*)ebx_4;
0052666c          *(uint32_t*)esi += 4;
00526647      }
00526647      
005266a5      if ((i_2 & 2) == 0)
005266a5      {
005266ec          this->omega.x = 0;
005266ec          this->omega.y = 0f;
005266ec          this->omega.z = 0f;
005266a5      }
005266a5      else if (arg3 >= 0xc)
005266ab      {
005266b1          this->omega.x = **(uint32_t**)esi;
005266b6          void* edx_9 = (*(uint32_t*)esi + 4);
005266b9          *(uint32_t*)esi = edx_9;
005266bf          this->omega.y = *(uint32_t*)edx_9;
005266c4          void* ecx_6 = (*(uint32_t*)esi + 4);
005266c7          *(uint32_t*)esi = ecx_6;
005266cd          this->omega.z = *(uint32_t*)ecx_6;
005266d0          *(uint32_t*)esi += 4;
005266ab      }
005266ab      
00526719      return 1;
00526570  }

0052671c                                                                                      90 90 90 90                              ....

00526720  void* __thiscall AnimData::`vector deleting destructor'(class AnimData* this, uint32_t arg2)

00526720  {
00526721      int32_t ebx;
00526721      ebx = arg2;
00526721      
0052672b      if ((ebx & 2) == 0)
0052672b      {
00526767          SetPositionStruct::~SetPositionStruct(this);
00526767          
0052676f          if ((ebx & 1) != 0)
00526772              operator delete(this);
00526772          
0052677e          return this;
0052672b      }
0052672b      
0052672d      int32_t vtable = this->vtable;
00526738      void* esi_1 = &this[vtable];
00526738      
0052673b      if ((vtable - 1) >= 0)
0052673b      {
0052673e          int32_t edi_1 = vtable;
0052674c          int32_t i;
0052674c          
0052674c          do
0052674c          {
00526741              esi_1 -= 0x14;
00526746              SetPositionStruct::~SetPositionStruct(esi_1);
0052674b              i = edi_1;
0052674b              edi_1 -= 1;
0052674c          } while (i != 1);
0052673b      }
0052673b      
00526752      if ((ebx & 1) != 0)
00526755          operator delete[](((char*)this - 4));
00526755      
00526762      return ((char*)this - 4);
00526720  }

00526781     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00526790  void __thiscall MotionState::MotionState(class MotionState* this, class MotionState const* arg2)

00526790  {
00526798      MotionState::copy(this, arg2);
00526790  }

005267a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005267b0  void __fastcall AttackCone::~AttackCone(class AttackCone* this)

005267b0  {
005267b6      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&this->right);
005267bf      /* tailcall */
005267bf      return IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&this->left);
005267b0  }

005267c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005267d0  void __fastcall AttackHook::AttackHook(class AttackHook* this)

005267d0  {
005267d6      this->next_hook = nullptr;
005267dd      this->direction_ = 0xfffffffe;
005267e4      this->vtable = 0x7c85ec;
005267ea      Vector3::Vector3(&this->attack_cone.left);
005267f2      Vector3::Vector3(&this->attack_cone.right);
005267d0  }

005267fb                                                                                   90 90 90 90 90                             .....

00526800  enum NodeNameType FileNodeName_Double::GetType(class FileNodeName_Double const* this @ ecx) __pure

00526800  {
00526805      return 3;
00526800  }

00526806                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526810  void* __thiscall AttackHook::`scalar deleting destructor'(class AttackHook* this, uint32_t arg2)

00526810  {
00526816      this->vtable = 0x7c85ec;
0052681c      AttackCone::~AttackCone(&this->attack_cone);
00526826      this->vtable = 0x7c84a0;
00526826      
0052682c      if ((arg2 & 1) != 0)
0052682f          operator delete(this);
0052682f      
0052683a      return this;
00526810  }

0052683d                                                                                         90 90 90                               ...

00526840  uint32_t UIElement_Menu::GetUIElementType(class UIElement_Menu const* this @ ecx) __pure

00526840  {
00526845      return 6;
00526840  }

00526846                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526850  uint32_t UIElement_ColorPicker::GetUIElementType(class UIElement_ColorPicker const* this @ ecx) __pure

00526850  {
00526855      return 0x10;
00526850  }

00526856                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00526860  uint32_t cWObjHierRootNode::GetDBOType(class cWObjHierRootNode const* this @ ecx) __pure

00526860  {
00526865      return 0x12;
00526860  }

00526866                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526870  enum NodeNameType FileNodeName_Binary::GetType(class FileNodeName_Binary const* this @ ecx) __pure

00526870  {
00526875      return 9;
00526870  }

00526876                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00526880  uint32_t UIElement_Scrollbar::GetUIElementType(class UIElement_Scrollbar const* this @ ecx) __pure

00526880  {
00526885      return 0xb;
00526880  }

00526886                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526890  uint32_t UIElement_Scrollable::GetUIElementType(class UIElement_Scrollable const* this @ ecx) __pure

00526890  {
00526895      return 0xa;
00526890  }

00526896                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005268a0  uint32_t UIElement_Browser::GetUIElementType(class UIElement_Browser const* this @ ecx) __pure

005268a0  {
005268a5      return 0xe;
005268a0  }

005268a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005268b0  int32_t StopParticleHook::GetType(class StopParticleHook* this @ ecx) __pure

005268b0  {
005268b5      return 0xf;
005268b0  }

005268b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005268c0  void __fastcall TextureVelocityPartHook::TextureVelocityPartHook(class TextureVelocityPartHook* this)

005268c0  {
005268c4      this->next_hook = nullptr;
005268c7      this->direction_ = 0xfffffffe;
005268ce      this->vtable = 0x7c8774;
005268d4      this->part_index = 0xffffffff;
005268db      this->u_speed = 0f;
005268de      this->v_speed = 0f;
005268c0  }

005268e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005268f0  uint32_t TextInputDialog::GetUIElementType(class TextInputDialog const* this @ ecx) __pure

005268f0  {
005268f5      return 0x18;
005268f0  }

005268f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00526900  void __fastcall TextureVelocityHook::TextureVelocityHook(class TextureVelocityHook* this)

00526900  {
00526904      this->next_hook = nullptr;
00526907      this->direction_ = 0xfffffffe;
0052690e      this->vtable = 0x7c8790;
00526914      this->u_speed = 0f;
00526917      this->v_speed = 0f;
00526900  }

0052691b                                                                                   90 90 90 90 90                             .....

00526920  uint32_t MessageDialog::GetUIElementType(class MessageDialog const* this @ ecx) __pure

00526920  {
00526925      return 0x17;
00526920  }

00526926                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526930  uint32_t WaitDialog::GetUIElementType(class WaitDialog const* this @ ecx) __pure

00526930  {
00526935      return 0x19;
00526930  }

00526936                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00526940  void __thiscall CAnimHook::add_to_list(class CAnimHook* this, class CAnimHook** arg2)

00526940  {
00526944      class CAnimHook* next_hook = *(uint32_t*)arg2;
00526944      
00526948      if (next_hook == 0)
00526948      {
0052694a          *(uint32_t*)arg2 = this;
0052694c          return;
00526948      }
00526948      
00526954      while (next_hook->next_hook != 0)
00526956          next_hook = next_hook->next_hook;
00526956      
00526960      next_hook->next_hook = this;
00526940  }

00526966                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526970  uint32_t CAnimHook::PackSize(class CAnimHook* arg1)

00526970  {
00526979      int32_t result = (arg1->vtable->pack_size() + 8);
0052697e      int32_t edx_1 = (result & 3);
0052697e      
00526981      if (edx_1 == 0)
00526991          return result;
00526991      
0052698c      return (result + (4 - edx_1));
00526970  }

00526992                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005269a0  void CAnimHook::PackHook(class CAnimHook* arg1, void** arg2, uint32_t arg3)

005269a0  {
005269b3      **(uint32_t**)arg2 = arg1->vtable->GetType();
005269b7      void* ecx_3 = (*(uint32_t*)arg2 + 4);
005269ba      *(uint32_t*)arg2 = ecx_3;
005269c1      uint32_t ecx_4 = arg3;
005269c5      *(uint32_t*)ecx_3 = arg1->direction_;
005269cd      *(uint32_t*)arg2 += 4;
005269cf      arg1->vtable->Pack(arg2, ecx_4);
005269dd      PackObj::ALIGN_PTR(arg2, &arg3);
005269a0  }

005269e8                          90 90 90 90 90 90 90 90                                                          ........

005269f0  enum NodeNameType FileNodeName_UInt32::GetType(class FileNodeName_UInt32 const* this @ ecx) __pure

005269f0  {
005269f5      return 1;
005269f0  }

005269f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00526a00  void __fastcall SoundHook::SoundHook(class SoundHook* this)

00526a00  {
00526a02      this->next_hook = nullptr;
00526a09      this->direction_ = 0xfffffffe;
00526a10      this->vtable = 0x7c87c8;
00526a1c      this->gid_.id = INVALID_DID.id;
00526a00  }


00526a20  void __thiscall SoundHook::Execute(class SoundHook const* this, class CPhysicsObj* arg2)

00526a20  {
00526a29      SoundManager::PlaySoundA(this->gid_.id, arg2);
00526a20  }

00526a34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00526a40  void __fastcall SoundTweakedHook::SoundTweakedHook(class SoundTweakedHook* this)

00526a40  {
00526a42      this->next_hook = nullptr;
00526a49      this->direction_ = 0xfffffffe;
00526a50      this->vtable = 0x7c87e4;
00526a5c      this->gid_.id = INVALID_DID.id;
00526a64      __builtin_strncpy(&this->prio, "fff?", 4);
00526a6b      this->prob = 1f;
00526a6e      this->vol = 1f;
00526a40  }

00526a72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00526a80  void __thiscall SoundTweakedHook::Execute(class SoundTweakedHook const* this, class CPhysicsObj* arg2)

00526a80  {
00526a95      SoundManager::PlaySoundA(this->gid_.id, arg2, this->prio, this->prob, this->vol);
00526a80  }


00526aa0  enum NodeNameType FileNodeName_Int32::GetType(class FileNodeName_Int32 const* this @ ecx) __pure

00526aa0  {
00526aa5      return 2;
00526aa0  }

00526aa6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526ab0  void __thiscall SoundTableHook::Execute(class SoundTableHook const* this, class CPhysicsObj* arg2)

00526ab0  {
00526ab9      SoundManager::PlaySoundA(this->sound_type_, arg2);
00526ab0  }

00526ac4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00526ad0  uint32_t __thiscall SoundTableHook::Pack(class SoundTableHook* this, void** arg2, uint32_t arg3)

00526ad0  {
00526ad5      int32_t result = this->vtable->pack_size();
00526ae1      **(uint32_t**)arg2 = this->sound_type_;
00526ae3      *(uint32_t*)arg2 += 4;
00526ae7      return result;
00526ad0  }

00526aea                                90 90 90 90 90 90                                                            ......

00526af0  int32_t __thiscall SoundTableHook::UnPack(class SoundTableHook* this, void** arg2, uint32_t arg3)

00526af0  {
00526af4      void* eax = *(uint32_t*)arg2;
00526af7      enum SoundType esi = *(uint32_t*)eax;
00526afc      *(uint32_t*)arg2 = ((char*)eax + 4);
00526afe      this->sound_type_ = esi;
00526b07      return 1;
00526af0  }

00526b0a                                90 90 90 90 90 90                                                            ......

00526b10  uint32_t __fastcall ReplaceObjectHook::pack_size(class ReplaceObjectHook* this)

00526b10  {
00526b10      class ReplaceObjectHook* this_1 = this;
00526b11      struct AnimPartChange::VTable* vtable = this->ap_change.vtable;
00526b1e      this_1 = nullptr;
00526b2a      return vtable->Pack(&this_1, 0);
00526b10  }

00526b2b                                   90 90 90 90 90                                                             .....

00526b30  uint32_t __thiscall ReplaceObjectHook::Pack(class ReplaceObjectHook* this, void** arg2, uint32_t arg3)

00526b30  {
00526b35      /* jump -> this->ap_change.vtable->Pack */
00526b30  }

00526b38                                                                          90 90 90 90 90 90 90 90                          ........

00526b40  int32_t __thiscall ReplaceObjectHook::UnPack(class ReplaceObjectHook* this, void** arg2, uint32_t arg3)

00526b40  {
00526b45      /* jump -> this->ap_change.vtable->UnPack */
00526b40  }

00526b48                          90 90 90 90 90 90 90 90                                                          ........

00526b50  uint32_t __fastcall AttackHook::pack_size(class AttackHook* this)

00526b50  {
00526b57      NetError::GetPackSize(&this->attack_cone.right);
00526b61      NetError::GetPackSize(&this->attack_cone.left);
00526b6c      return 0x1c;
00526b50  }

00526b6d                                         90 90 90                                                               ...

00526b70  void __thiscall AttackHook::Execute(class AttackHook const* this, class CPhysicsObj* arg2)

00526b70  {
00526b78      CPhysicsObj::attack(arg2, &this->attack_cone);
00526b70  }


00526b80  uint32_t __thiscall DefaultScriptPartHook::Pack(class DefaultScriptPartHook* this, void** arg2, uint32_t arg3)

00526b80  {
00526b85      int32_t result = this->vtable->pack_size();
00526b85      
00526b8c      if (arg3 >= result)
00526b8c      {
00526b97          **(uint32_t**)arg2 = this->_part_index;
00526b99          *(uint32_t*)arg2 += 4;
00526b8c      }
00526b8c      
00526b9d      return result;
00526b80  }


00526ba0  int32_t __thiscall SetLightHook::UnPack(class SetLightHook* this, void** arg2, uint32_t arg3)

00526ba0  {
00526ba8      this->_lights_on = **(uint32_t**)arg2;
00526bab      *(uint32_t*)arg2 += 4;
00526bb3      return 1;
00526ba0  }

00526bb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00526bc0  void __thiscall EtherealHook::Execute(class EtherealHook const* this, class CPhysicsObj* arg2)

00526bc0  {
00526bca      CPhysicsObj::set_ethereal(arg2, this->ethereal, 0);
00526bc0  }

00526bd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00526be0  void __thiscall NoDrawHook::Execute(class NoDrawHook const* this, class CPhysicsObj* arg2)

00526be0  {
00526bea      CPhysicsObj::set_nodraw(arg2, this->_no_draw, 0);
00526be0  }

00526bf2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00526c00  void __thiscall DefaultScriptPartHook::Execute(class DefaultScriptPartHook const* this, class CPhysicsObj* arg2)

00526c00  {
00526c08      CPhysicsObj::play_default_script(arg2, this->_part_index);
00526c00  }


00526c10  void __stdcall DefaultScriptHook::Execute(class DefaultScriptHook const* this @ ecx, class CPhysicsObj* arg2)

00526c10  {
00526c14      CPhysicsObj::play_default_script(arg2);
00526c10  }

00526c1c                                                                                      90 90 90 90                              ....

00526c20  void __stdcall AnimDoneHook::Execute(class AnimDoneHook const* this @ ecx, class CPhysicsObj* arg2)

00526c20  {
00526c24      CPhysicsObj::Hook_AnimDone(arg2);
00526c20  }

00526c2c                                      90 90 90 90                                                              ....

00526c30  void __thiscall TransparentHook::Execute(class TransparentHook const* this, class CPhysicsObj* arg2)

00526c30  {
00526c45      CPhysicsObj::SetTranslucency2(arg2, this->start, this->end, ((double)((long double)this->time)));
00526c30  }

00526c4d                                         90 90 90                                                               ...

00526c50  uint32_t __thiscall TransparentHook::Pack(class TransparentHook* this, void** arg2, uint32_t arg3)

00526c50  {
00526c55      int32_t result = this->vtable->pack_size();
00526c55      
00526c5c      if (arg3 >= result)
00526c5c      {
00526c67          **(uint32_t**)arg2 = ((float)((long double)this->start));
00526c6b          void* edx_3 = (*(uint32_t*)arg2 + 4);
00526c6e          *(uint32_t*)arg2 = edx_3;
00526c73          *(uint32_t*)edx_3 = ((float)((long double)this->end));
00526c77          float* edx_5 = (*(uint32_t*)arg2 + 4);
00526c7a          *(uint32_t*)arg2 = edx_5;
00526c7f          *(uint32_t*)edx_5 = ((float)((long double)this->time));
00526c81          *(uint32_t*)arg2 += 4;
00526c5c      }
00526c5c      
00526c85      return result;
00526c50  }

00526c88                          90 90 90 90 90 90 90 90                                                          ........

00526c90  int32_t __thiscall TransparentHook::UnPack(class TransparentHook* this, void** arg2, uint32_t arg3)

00526c90  {
00526c98      this->start = **(uint32_t**)arg2;
00526c9d      void* edx_3 = (*(uint32_t*)arg2 + 4);
00526ca0      *(uint32_t*)arg2 = edx_3;
00526ca4      this->end = *(uint32_t*)edx_3;
00526ca9      void* edx_6 = (*(uint32_t*)arg2 + 4);
00526cac      *(uint32_t*)arg2 = edx_6;
00526cb0      this->time = *(uint32_t*)edx_6;
00526cb3      *(uint32_t*)arg2 += 4;
00526cbb      return 1;
00526c90  }

00526cbe                                                                                            90 90                                ..

00526cc0  void __thiscall TransparentPartHook::Execute(class TransparentPartHook const* this, class CPhysicsObj* arg2)

00526cc0  {
00526cd9      CPhysicsObj::SetPartTranslucency(arg2, this->part, this->start, this->end, ((double)((long double)this->time)));
00526cc0  }

00526ce1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00526cf0  int32_t __thiscall DiffusePartHook::UnPack(class DiffusePartHook* this, void** arg2, uint32_t arg3)

00526cf0  {
00526cf8      this->part = **(uint32_t**)arg2;
00526cfd      void* edx_3 = (*(uint32_t*)arg2 + 4);
00526d00      *(uint32_t*)arg2 = edx_3;
00526d04      this->start = *(uint32_t*)edx_3;
00526d09      void* edx_6 = (*(uint32_t*)arg2 + 4);
00526d0c      *(uint32_t*)arg2 = edx_6;
00526d10      this->end = *(uint32_t*)edx_6;
00526d15      void* edx_9 = (*(uint32_t*)arg2 + 4);
00526d18      *(uint32_t*)arg2 = edx_9;
00526d1c      this->time = *(uint32_t*)edx_9;
00526d1f      *(uint32_t*)arg2 += 4;
00526d27      return 1;
00526cf0  }

00526d2a                                90 90 90 90 90 90                                                            ......

00526d30  void __thiscall LuminousPartHook::Execute(class LuminousPartHook const* this, class CPhysicsObj* arg2)

00526d30  {
00526d49      CPhysicsObj::SetPartLuminosity(arg2, this->part, this->start, this->end, ((double)((long double)this->time)));
00526d30  }

00526d51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00526d60  void __thiscall LuminousHook::Execute(class LuminousHook const* this, class CPhysicsObj* arg2)

00526d60  {
00526d75      CPhysicsObj::SetLuminosity(arg2, this->start, this->end, ((double)((long double)this->time)));
00526d60  }

00526d7d                                                                                         90 90 90                               ...

00526d80  void __thiscall DiffusePartHook::Execute(class DiffusePartHook const* this, class CPhysicsObj* arg2)

00526d80  {
00526d99      CPhysicsObj::SetPartDiffusion(arg2, this->part, this->start, this->end, ((double)((long double)this->time)));
00526d80  }

00526da1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00526db0  uint32_t __thiscall TransparentPartHook::Pack(class TransparentPartHook* this, void** arg2, uint32_t arg3)

00526db0  {
00526db5      int32_t result = this->vtable->pack_size();
00526db5      
00526dbc      if (arg3 >= result)
00526dbc      {
00526dc8          **(uint32_t**)arg2 = this->part;
00526dcc          void* edi_3 = (*(uint32_t*)arg2 + 4);
00526dcf          *(uint32_t*)arg2 = edi_3;
00526dd6          *(uint32_t*)edi_3 = ((float)((long double)this->start));
00526dda          void* edx_4 = (*(uint32_t*)arg2 + 4);
00526ddd          *(uint32_t*)arg2 = edx_4;
00526de2          *(uint32_t*)edx_4 = ((float)((long double)this->end));
00526de6          void* edi_5 = (*(uint32_t*)arg2 + 4);
00526de9          *(uint32_t*)arg2 = edi_5;
00526df0          *(uint32_t*)edi_5 = ((float)((long double)this->time));
00526df2          *(uint32_t*)arg2 += 4;
00526dbc      }
00526dbc      
00526df7      return result;
00526db0  }

00526dfa                                                                                90 90 90 90 90 90                            ......

00526e00  void __thiscall DiffuseHook::Execute(class DiffuseHook const* this, class CPhysicsObj* arg2)

00526e00  {
00526e15      CPhysicsObj::SetDiffusion(arg2, this->start, this->end, ((double)((long double)this->time)));
00526e00  }

00526e1d                                                                                         90 90 90                               ...

00526e20  void __thiscall CallPESHook::Execute(class CallPESHook const* this, class CPhysicsObj* arg2)

00526e20  {
00526e31      CPhysicsObj::CallPES(arg2, this->pes.id, ((double)((long double)this->pause)));
00526e20  }

00526e39                                                                             90 90 90 90 90 90 90                           .......

00526e40  void __thiscall ScaleHook::Execute(class ScaleHook const* this, class CPhysicsObj* arg2)

00526e40  {
00526e51      CPhysicsObj::SetScale(arg2, this->end, ((double)((long double)this->time)));
00526e40  }

00526e59                                                                             90 90 90 90 90 90 90                           .......

00526e60  uint32_t __thiscall ScaleHook::Pack(class ScaleHook* this, void** arg2, uint32_t arg3)

00526e60  {
00526e65      int32_t result = this->vtable->pack_size();
00526e65      
00526e6c      if (arg3 >= result)
00526e6c      {
00526e77          **(uint32_t**)arg2 = ((float)((long double)this->end));
00526e7b          float* edx_3 = (*(uint32_t*)arg2 + 4);
00526e7e          *(uint32_t*)arg2 = edx_3;
00526e83          *(uint32_t*)edx_3 = ((float)((long double)this->time));
00526e85          *(uint32_t*)arg2 += 4;
00526e6c      }
00526e6c      
00526e89      return result;
00526e60  }

00526e8c                                      90 90 90 90                                                              ....

00526e90  int32_t __thiscall ScaleHook::UnPack(class ScaleHook* this, void** arg2, uint32_t arg3)

00526e90  {
00526e98      this->end = **(uint32_t**)arg2;
00526e9d      void* edx_3 = (*(uint32_t*)arg2 + 4);
00526ea0      *(uint32_t*)arg2 = edx_3;
00526ea4      this->time = *(uint32_t*)edx_3;
00526ea7      *(uint32_t*)arg2 += 4;
00526eaf      return 1;
00526e90  }

00526eb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00526ec0  void __thiscall CreateParticleHook::Execute(class CreateParticleHook const* this, class CPhysicsObj* arg2)

00526ec0  {
00526ed4      CPhysicsObj::create_particle_emitter(arg2, this->emitter_info_id.id, this->part_index, &this->offset, this->emitter_id);
00526ec0  }

00526edc                                                                                      90 90 90 90                              ....

00526ee0  uint32_t DualEnumIDMap::GetDBOType(class DualEnumIDMap const* this @ ecx) __pure

00526ee0  {
00526ee5      return 0x28;
00526ee0  }

00526ee6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00526ef0  void __thiscall CreateBlockingParticleHook::Execute(class CreateBlockingParticleHook const* this, class CPhysicsObj* arg2)

00526ef0  {
00526f04      CPhysicsObj::create_blocking_particle_emitter(arg2, this->emitter_info_id.id, this->part_index, &this->offset, this->emitter_id);
00526ef0  }

00526f0c                                      90 90 90 90                                                              ....

00526f10  void __thiscall DestroyParticleHook::Execute(class DestroyParticleHook const* this, class CPhysicsObj* arg2)

00526f10  {
00526f18      CPhysicsObj::destroy_particle_emitter(arg2, this->emitter_id);
00526f10  }


00526f20  void __thiscall StopParticleHook::Execute(class StopParticleHook const* this, class CPhysicsObj* arg2)

00526f20  {
00526f28      CPhysicsObj::stop_particle_emitter(arg2, this->emitter_id);
00526f20  }


00526f30  void __thiscall SetOmegaHook::Execute(class SetOmegaHook const* this, class CPhysicsObj* arg2)

00526f30  {
00526f3a      CPhysicsObj::set_omega(arg2, &this->axis, 1);
00526f30  }

00526f42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00526f50  void __thiscall TextureVelocityPartHook::Execute(class TextureVelocityPartHook const* this, class CPhysicsObj* arg2)

00526f50  {
00526f60      CPhysicsObj::SetPartTextureVelocity(arg2, this->part_index, this->u_speed, this->v_speed);
00526f50  }

00526f68                          90 90 90 90 90 90 90 90                                                          ........

00526f70  uint32_t __thiscall TextureVelocityPartHook::Pack(class TextureVelocityPartHook* this, void** arg2, uint32_t arg3)

00526f70  {
00526f75      int32_t result = this->vtable->pack_size();
00526f75      
00526f7c      if (arg3 >= result)
00526f7c      {
00526f88          **(uint32_t**)arg2 = this->part_index;
00526f8c          void* edx_3 = (*(uint32_t*)arg2 + 4);
00526f8f          *(uint32_t*)arg2 = edx_3;
00526f94          *(uint32_t*)edx_3 = ((float)((long double)this->u_speed));
00526f98          void* edi_3 = (*(uint32_t*)arg2 + 4);
00526f9b          *(uint32_t*)arg2 = edi_3;
00526fa2          *(uint32_t*)edi_3 = ((float)((long double)this->v_speed));
00526fa4          *(uint32_t*)arg2 += 4;
00526f7c      }
00526f7c      
00526fa9      return result;
00526f70  }

00526fac                                      90 90 90 90                                                              ....

00526fb0  void __thiscall TextureVelocityHook::Execute(class TextureVelocityHook const* this, class CPhysicsObj* arg2)

00526fb0  {
00526fbc      CPhysicsObj::SetTextureVelocity(arg2, this->u_speed, this->v_speed);
00526fb0  }

00526fc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00526fd0  void __thiscall SetLightHook::Execute(class SetLightHook const* this, class CPhysicsObj* arg2)

00526fd0  {
00526fda      CPhysicsObj::set_lights(arg2, this->_lights_on, 0);
00526fd0  }

00526fe2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00526ff0  uint32_t __thiscall AttackCone::Pack(class AttackCone* this, void** arg2, uint32_t arg3)

00526ff0  {
00526ffc      NetError::GetPackSize(&this->left);
00527005      NetError::GetPackSize(&this->right);
00527005      
00527014      if (arg3 >= 0x1c)
00527014      {
0052701e          **(uint32_t**)arg2 = this->part_index;
0052702a          *(uint32_t*)arg2 += 4;
0052702c          Vec2D::Pack(&this->left, arg2, arg3);
00527036          Vec2D::Pack(&this->right, arg2, arg3);
00527040          **(uint32_t**)arg2 = ((float)((long double)this->radius));
00527044          void* ecx_6 = (*(uint32_t*)arg2 + 4);
00527047          *(uint32_t*)arg2 = ecx_6;
0052704e          *(uint32_t*)ecx_6 = ((float)((long double)this->height));
00527050          *(uint32_t*)arg2 += 4;
00527014      }
00527014      
00527059      return 0x1c;
00526ff0  }

0052705c                                                                                      90 90 90 90                              ....

00527060  int32_t __thiscall AttackCone::UnPack(class AttackCone* this, void** arg2, uint32_t arg3)

00527060  {
0052706d      this->part_index = **(uint32_t**)arg2;
0052706f      *(uint32_t*)arg2 += 4;
0052707b      Vec2D::UnPack(&this->left, arg2, arg3);
00527085      Vec2D::UnPack(&this->right, arg2, arg3);
0052708e      this->radius = **(uint32_t**)arg2;
00527093      void* ecx_4 = (*(uint32_t*)arg2 + 4);
00527096      *(uint32_t*)arg2 = ecx_4;
0052709c      this->height = *(uint32_t*)ecx_4;
005270a5      *(uint32_t*)arg2 += 4;
005270ae      return 1;
00527060  }

005270b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005270c0  void __fastcall ReplaceObjectHook::ReplaceObjectHook(class ReplaceObjectHook* this)

005270c0  {
005270c4      this->next_hook = nullptr;
005270c7      this->direction_ = 0xfffffffe;
005270ce      this->vtable = 0x7c8830;
005270d4      this->ap_change.vtable = 0x7c881c;
005270db      this->ap_change.part_index = 0;
005270e4      this->ap_change.part_id.id = INVALID_DID.id;
005270e7      this->ap_change.prev = nullptr;
005270ea      this->ap_change.next = nullptr;
005270c0  }

005270ee                                            90 90                                                                ..

005270f0  uint32_t UIElement_ListBox::GetUIElementType(class UIElement_ListBox const* this @ ecx) __pure

005270f0  {
005270f5      return 5;
005270f0  }

005270f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00527100  void* __thiscall ReplaceObjectHook::`scalar deleting destructor'(class ReplaceObjectHook* this, uint32_t arg2)

00527100  {
00527108      this->ap_change.vtable = 0x79285c;
0052710f      this->vtable = 0x7c84a0;
0052710f      
00527115      if ((arg2 & 1) != 0)
00527118          operator delete(this);
00527118      
00527123      return this;
00527100  }

00527126                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00527130  void __fastcall CreateParticleHook::CreateParticleHook(class CreateParticleHook* this)

00527130  {
00527138      this->next_hook = nullptr;
0052713b      this->direction_ = 0xfffffffe;
00527142      this->vtable = 0x7c884c;
00527135      this->offset.qw = 0x3f800000;
00527135      this->offset.qx = 0f;
00527135      this->offset.qy = 0f;
00527135      this->offset.qz = 0f;
00527135      this->offset.m_fOrigin.x = 0;
00527135      this->offset.m_fOrigin.y = 0f;
00527135      this->offset.m_fOrigin.z = 0f;
00527160      Frame::cache(&this->offset);
00527130  }

00527169                             90 90 90 90 90 90 90                                                           .......

00527170  uint32_t UIElement_Viewport::GetUIElementType(class UIElement_Viewport const* this @ ecx) __pure

00527170  {
00527175      return 0xd;
00527170  }

00527176                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00527180  void __fastcall CreateBlockingParticleHook::CreateBlockingParticleHook(class CreateBlockingParticleHook* this)

00527180  {
00527188      this->next_hook = nullptr;
0052718b      this->direction_ = 0xfffffffe;
00527192      this->vtable = 0x7c884c;
00527185      this->offset.qw = 0x3f800000;
00527185      this->offset.qx = 0f;
00527185      this->offset.qy = 0f;
00527185      this->offset.qz = 0f;
00527185      this->offset.m_fOrigin.x = 0;
00527185      this->offset.m_fOrigin.y = 0f;
00527185      this->offset.m_fOrigin.z = 0f;
005271b0      Frame::cache(&this->offset);
005271b5      this->vtable = 0x7c8868;
00527180  }

005271bf                                                                                               90                                 .

005271c0  uint32_t ConfirmationDialog::GetUIElementType(class ConfirmationDialog const* this @ ecx) __pure

005271c0  {
005271c5      return 0x13;
005271c0  }

005271c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005271d0  class CAnimHook* CAnimHook::UnPackHook(void** arg1, uint32_t arg2)

005271d0  {
005271d5      void* eax = *(uint32_t*)arg1;
005271d7      int32_t ecx = *(uint32_t*)eax;
005271de      *(uint32_t*)arg1 = ((char*)eax + 4);
005271e0      int32_t ebp = *(uint32_t*)((char*)eax + 4);
005271e8      void* result = nullptr;
005271ed      *(uint32_t*)arg1 = ((char*)eax + 8);
005271ed      
005271f5      switch (ecx)
005271f5      {
005271fe          case 0:
005271fe          {
005271fe              void* result_1 = operator new(0xc);
005271fe              
00527208              if (result_1 == 0)
00527208              {
00527232                  result = nullptr;
0052723a                  *(uint32_t*)(*nullptr + 0x18)(arg1, arg2);
00527208              }
00527208              else
00527208              {
0052720a                  uint32_t ecx_1 = arg2;
0052720e                  result = result_1;
00527211                  *(uint32_t*)((char*)result_1 + 4) = 0;
00527214                  *(uint32_t*)((char*)result_1 + 8) = 0xfffffffe;
0052721b                  *(uint32_t*)result_1 = 0x7c85d0;
00527226                  *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, ecx_1);
00527208              }
00527208              
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005271fe              break;
005271fe          }
005272bf          case 1:
005272bf          {
005272bf              class SoundHook* eax_5 = operator new(0x10);
005272bf              
005272c9              if (eax_5 == 0)
005272c9                  goto label_5275df;
005272c9              
005272d6              result = SoundHook::SoundHook(eax_5);
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005272bf              break;
005272bf          }
005272df          case 2:
005272df          {
005272df              void* result_5 = operator new(0x10);
005272df              
005272e9              if (result_5 == 0)
005272e9                  goto label_5275df;
005272e9              
005272ef              *(uint32_t*)((char*)result_5 + 4) = 0;
005272f2              *(uint32_t*)((char*)result_5 + 8) = 0xfffffffe;
005272f9              *(uint32_t*)result_5 = 0x7c8800;
005272ff              *(uint32_t*)((char*)result_5 + 0xc) = 0;
00527302              result = result_5;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005272df              break;
005272df          }
005275a6          case 3:
005275a6          {
005275a6              class AttackHook* eax_19 = operator new(0x28);
005275a6              
005275b0              if (eax_19 == 0)
005275b0                  goto label_5275df;
005275b0              
005275b9              result = AttackHook::AttackHook(eax_19);
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005275a6              break;
005275a6          }
0052730b          case 5:
0052730b          {
0052730b              class ReplaceObjectHook* eax_7 = operator new(0x20);
0052730b              
00527315              if (eax_7 == 0)
00527315                  goto label_5275df;
00527315              
00527322              result = ReplaceObjectHook::ReplaceObjectHook(eax_7);
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052730b              break;
0052730b          }
005275bf          case 6:
005275bf          {
005275bf              void* result_18 = operator new(0x10);
005275bf              
005275c9              if (result_18 == 0)
005275c9                  goto label_5275df;
005275c9              
005275cb              *(uint32_t*)((char*)result_18 + 4) = 0;
005275ce              *(uint32_t*)((char*)result_18 + 8) = 0xfffffffe;
005275d5              *(uint32_t*)result_18 = 0x7c8608;
005275db              result = result_18;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005275bf              break;
005275bf          }
00527354          case 7:
00527354          {
00527354              void* result_7 = operator new(0x1c);
00527354              
0052735e              if (result_7 == 0)
0052735e                  goto label_5275df;
0052735e              
00527364              *(uint32_t*)((char*)result_7 + 4) = 0;
00527367              *(uint32_t*)((char*)result_7 + 8) = 0xfffffffe;
0052736e              *(uint32_t*)result_7 = 0x7c8694;
00527374              result = result_7;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
00527354              break;
00527354          }
005273a6          case 8:
005273a6          {
005273a6              void* result_9 = operator new(0x18);
005273a6              
005273b0              if (result_9 == 0)
005273b0                  goto label_5275df;
005273b0              
005273b6              *(uint32_t*)((char*)result_9 + 4) = 0;
005273b9              *(uint32_t*)((char*)result_9 + 8) = 0xfffffffe;
005273c0              *(uint32_t*)result_9 = 0x7c86cc;
005273c6              result = result_9;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005273a6              break;
005273a6          }
0052737d          case 9:
0052737d          {
0052737d              void* result_8 = operator new(0x1c);
0052737d              
00527387              if (result_8 == 0)
00527387                  goto label_5275df;
00527387              
0052738d              *(uint32_t*)((char*)result_8 + 4) = 0;
00527390              *(uint32_t*)((char*)result_8 + 8) = 0xfffffffe;
00527397              *(uint32_t*)result_8 = 0x7c86b0;
0052739d              result = result_8;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052737d              break;
0052737d          }
005273f8          case 0xa:
005273f8          {
005273f8              void* result_11 = operator new(0x18);
005273f8              
00527402              if (result_11 == 0)
00527402                  goto label_5275df;
00527402              
00527408              *(uint32_t*)((char*)result_11 + 4) = 0;
0052740b              *(uint32_t*)((char*)result_11 + 8) = 0xfffffffe;
00527412              *(uint32_t*)result_11 = 0x7c8704;
00527418              result = result_11;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005273f8              break;
005273f8          }
005273cf          case 0xb:
005273cf          {
005273cf              void* result_10 = operator new(0x1c);
005273cf              
005273d9              if (result_10 == 0)
005273d9                  goto label_5275df;
005273d9              
005273df              *(uint32_t*)((char*)result_10 + 4) = 0;
005273e2              *(uint32_t*)((char*)result_10 + 8) = 0xfffffffe;
005273e9              *(uint32_t*)result_10 = 0x7c86e8;
005273ef              result = result_10;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005273cf              break;
005273cf          }
00527421          case 0xc:
00527421          {
00527421              void* result_12 = operator new(0x14);
00527421              
0052742b              if (result_12 == 0)
0052742b                  goto label_5275df;
0052742b              
00527431              *(uint32_t*)((char*)result_12 + 4) = 0;
00527434              *(uint32_t*)((char*)result_12 + 8) = 0xfffffffe;
0052743b              *(uint32_t*)result_12 = 0x7c8720;
00527441              result = result_12;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
00527421              break;
00527421          }
0052744a          case 0xd:
0052744a          {
0052744a              class CreateParticleHook* eax_9 = operator new(0x58);
0052744a              
00527454              if (eax_9 == 0)
00527454                  goto label_5275df;
00527454              
00527461              result = CreateParticleHook::CreateParticleHook(eax_9);
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052744a              break;
0052744a          }
0052748a          case 0xe:
0052748a          {
0052748a              void* result_13 = operator new(0x10);
0052748a              
00527494              if (result_13 == 0)
00527494                  goto label_5275df;
00527494              
0052749a              *(uint32_t*)((char*)result_13 + 4) = 0;
0052749d              *(uint32_t*)((char*)result_13 + 8) = 0xfffffffe;
005274a4              *(uint32_t*)result_13 = 0x7c873c;
005274aa              result = result_13;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052748a              break;
0052748a          }
005274b3          case 0xf:
005274b3          {
005274b3              void* result_14 = operator new(0x10);
005274b3              
005274bd              if (result_14 == 0)
005274bd                  goto label_5275df;
005274bd              
005274c3              *(uint32_t*)((char*)result_14 + 4) = 0;
005274c6              *(uint32_t*)((char*)result_14 + 8) = 0xfffffffe;
005274cd              *(uint32_t*)result_14 = 0x7c8758;
005274d3              result = result_14;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005274b3              break;
005274b3          }
00527244          case 0x10:
00527244          {
00527244              void* result_2 = operator new(0x10);
00527244              
0052724e              if (result_2 == 0)
0052724e              {
005275df              label_5275df:
005275df                  result = nullptr;
005275eb                  *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee                  *(uint32_t*)((char*)result + 8) = ebp;
0052724e              }
0052724e              else
0052724e              {
00527254                  *(uint32_t*)((char*)result_2 + 4) = 0;
00527257                  *(uint32_t*)((char*)result_2 + 8) = 0xfffffffe;
0052725e                  *(uint32_t*)result_2 = 0x7c8624;
00527264                  result = result_2;
005275eb                  *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee                  *(uint32_t*)((char*)result + 8) = ebp;
0052724e              }
00527244              break;
00527244          }
0052726d          case 0x11:
0052726d          {
0052726d              void* result_3 = operator new(0xc);
0052726d              
00527277              if (result_3 == 0)
00527277                  goto label_5275df;
00527277              
0052727d              *(uint32_t*)((char*)result_3 + 4) = 0;
00527280              *(uint32_t*)((char*)result_3 + 8) = 0xfffffffe;
00527287              *(uint32_t*)result_3 = 0x7c865c;
0052728d              result = result_3;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052726d              break;
0052726d          }
00527296          case 0x12:
00527296          {
00527296              void* result_4 = operator new(0x10);
00527296              
005272a0              if (result_4 == 0)
005272a0                  goto label_5275df;
005272a0              
005272a6              *(uint32_t*)((char*)result_4 + 4) = 0;
005272a9              *(uint32_t*)((char*)result_4 + 8) = 0xfffffffe;
005272b0              *(uint32_t*)result_4 = 0x7c8640;
005272b6              result = result_4;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
00527296              break;
00527296          }
005274dc          case 0x13:
005274dc          {
005274dc              void* result_15 = operator new(0x14);
005274dc              
005274e6              if (result_15 == 0)
005274e6                  goto label_5275df;
005274e6              
005274ec              *(uint32_t*)((char*)result_15 + 4) = 0;
005274ef              *(uint32_t*)((char*)result_15 + 8) = 0xfffffffe;
005274f6              *(uint32_t*)result_15 = 0x7c8884;
005274fc              result = result_15;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
005274dc              break;
005274dc          }
0052732b          case 0x14:
0052732b          {
0052732b              void* result_6 = operator new(0x18);
0052732b              
00527335              if (result_6 == 0)
00527335                  goto label_5275df;
00527335              
0052733b              *(uint32_t*)((char*)result_6 + 4) = 0;
0052733e              *(uint32_t*)((char*)result_6 + 8) = 0xfffffffe;
00527345              *(uint32_t*)result_6 = 0x7c8678;
0052734b              result = result_6;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052732b              break;
0052732b          }
00527505          case 0x15:
00527505          {
00527505              class SoundTweakedHook* eax_13 = operator new(0x1c);
00527505              
0052750f              if (eax_13 == 0)
0052750f                  goto label_5275df;
0052750f              
0052751c              result = SoundTweakedHook::SoundTweakedHook(eax_13);
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
00527505              break;
00527505          }
00527525          case 0x16:
00527525          {
00527525              void* result_16 = operator new(0x18);
00527525              
0052752f              if (result_16 == 0)
0052752f                  goto label_5275df;
0052752f              
00527535              *(uint32_t*)((char*)result_16 + 4) = 0;
00527538              *(uint32_t*)((char*)result_16 + 8) = 0xfffffffe;
0052753f              *(uint32_t*)result_16 = 0x7c88a0;
00527545              result = result_16;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
00527525              break;
00527525          }
0052754e          case 0x17:
0052754e          {
0052754e              class TextureVelocityHook* eax_15 = operator new(0x14);
0052754e              
00527558              if (eax_15 == 0)
00527558                  goto label_5275df;
00527558              
00527565              result = TextureVelocityHook::TextureVelocityHook(eax_15);
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052754e              break;
0052754e          }
0052756b          case 0x18:
0052756b          {
0052756b              class TextureVelocityPartHook* eax_17 = operator new(0x18);
0052756b              
00527575              if (eax_17 == 0)
00527575                  goto label_5275df;
00527575              
0052757e              result = TextureVelocityPartHook::TextureVelocityPartHook(eax_17);
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052756b              break;
0052756b          }
00527584          case 0x19:
00527584          {
00527584              void* result_17 = operator new(0x10);
00527584              
0052758e              if (result_17 == 0)
0052758e                  goto label_5275df;
0052758e              
00527590              *(uint32_t*)((char*)result_17 + 4) = 0;
00527593              *(uint32_t*)((char*)result_17 + 8) = 0xfffffffe;
0052759a              *(uint32_t*)result_17 = 0x7c87ac;
005275a0              result = result_17;
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
00527584              break;
00527584          }
0052746a          case 0x1a:
0052746a          {
0052746a              class CreateBlockingParticleHook* eax_11 = operator new(0x58);
0052746a              
00527474              if (eax_11 == 0)
00527474                  goto label_5275df;
00527474              
00527481              result = CreateBlockingParticleHook::CreateBlockingParticleHook(eax_11);
005275eb              *(uint32_t*)(*(uint32_t*)result + 0x18)(arg1, arg2);
005275ee              *(uint32_t*)((char*)result + 8) = ebp;
0052746a              break;
0052746a          }
005271f5      }
005271f5      
005275f7      PackObj::ALIGN_PTR(arg1, &arg2);
00527605      return result;
005271d0  }

00527606                    8b ff                                                                                ..
00527608  uint32_t jump_table_527608[0x1b] = 
00527608  {
00527608      [0x00] =  0x005271fc
0052760c      [0x01] =  0x005272bd
00527610      [0x02] =  0x005272dd
00527614      [0x03] =  0x005275a4
00527618      [0x04] =  0x005275f1
0052761c      [0x05] =  0x00527309
00527620      [0x06] =  0x005275bd
00527624      [0x07] =  0x00527352
00527628      [0x08] =  0x005273a4
0052762c      [0x09] =  0x0052737b
00527630      [0x0a] =  0x005273f6
00527634      [0x0b] =  0x005273cd
00527638      [0x0c] =  0x0052741f
0052763c      [0x0d] =  0x00527448
00527640      [0x0e] =  0x00527488
00527644      [0x0f] =  0x005274b1
00527648      [0x10] =  0x00527242
0052764c      [0x11] =  0x0052726b
00527650      [0x12] =  0x00527294
00527654      [0x13] =  0x005274da
00527658      [0x14] =  0x00527329
0052765c      [0x15] =  0x00527503
00527660      [0x16] =  0x00527523
00527664      [0x17] =  0x0052754c
00527668      [0x18] =  0x00527569
0052766c      [0x19] =  0x00527582
00527670      [0x1a] =  0x00527468
00527674  }

00527674                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00527680  void* __thiscall SoundHook::`scalar deleting destructor'(class SoundHook* this, uint32_t arg2)

00527680  {
00527683      uint32_t id = this->gid_.id;
00527687      this->vtable = 0x7c87c8;
0052768d      SoundManager::DestroySound(id);
0052769b      this->vtable = 0x7c84a0;
0052769b      
005276a1      if ((arg2 & 1) != 0)
005276a4          operator delete(this);
005276a4      
005276af      return this;
00527680  }

005276b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005276c0  int32_t __thiscall SoundHook::UnPack(class SoundHook* this, void** arg2, uint32_t arg3)

005276c0  {
005276c5      void* eax = *(uint32_t*)arg2;
005276c7      class IDClass<_tagDataID,32,0> edx = *(uint32_t*)eax;
005276cc      *(uint32_t*)arg2 = ((char*)eax + 4);
005276cf      this->gid_.id = edx;
005276d2      SoundManager::CreateSound(edx);
005276e0      return 1;
005276c0  }

005276e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005276f0  void* __thiscall SoundTweakedHook::`scalar deleting destructor'(class SoundTweakedHook* this, uint32_t arg2)

005276f0  {
005276f3      uint32_t id = this->gid_.id;
005276f7      this->vtable = 0x7c87e4;
005276fd      SoundManager::DestroySound(id);
0052770b      this->vtable = 0x7c84a0;
0052770b      
00527711      if ((arg2 & 1) != 0)
00527714          operator delete(this);
00527714      
0052771f      return this;
005276f0  }

00527722        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00527730  uint32_t __thiscall SoundTweakedHook::Pack(class SoundTweakedHook* this, void** arg2, uint32_t arg3)

00527730  {
00527736      int32_t result = this->vtable->pack_size();
00527742      **(uint32_t**)arg2 = this->gid_.id;
00527746      void* edi_2 = (*(uint32_t*)arg2 + 4);
00527749      *(uint32_t*)arg2 = edi_2;
00527750      *(uint32_t*)edi_2 = ((float)((long double)this->prob));
00527754      void* edx_3 = (*(uint32_t*)arg2 + 4);
00527757      *(uint32_t*)arg2 = edx_3;
0052775c      *(uint32_t*)edx_3 = ((float)((long double)this->prio));
00527760      void* edi_4 = (*(uint32_t*)arg2 + 4);
00527763      *(uint32_t*)arg2 = edi_4;
0052776a      *(uint32_t*)edi_4 = ((float)((long double)this->vol));
00527772      *(uint32_t*)arg2 += 4;
00527775      return result;
00527730  }

00527778                                                                          90 90 90 90 90 90 90 90                          ........

00527780  int32_t __thiscall SoundTweakedHook::UnPack(class SoundTweakedHook* this, void** arg2, uint32_t arg3)

00527780  {
00527786      void* edx_1 = (*(uint32_t*)arg2 + 4);
0052778a      class IDClass<_tagDataID,32,0> esi = *(uint32_t*)((char*)edx_1 - 4);
0052778d      *(uint32_t*)arg2 = edx_1;
0052778f      this->gid_.id = esi;
00527796      this->prob = **(uint32_t**)arg2;
0052779b      void* edx_5 = (*(uint32_t*)arg2 + 4);
0052779e      *(uint32_t*)arg2 = edx_5;
005277a2      this->prio = *(uint32_t*)edx_5;
005277a7      void* esi_2 = (*(uint32_t*)arg2 + 4);
005277aa      *(uint32_t*)arg2 = esi_2;
005277b0      this->vol = *(uint32_t*)esi_2;
005277b3      *(uint32_t*)arg2 += 4;
005277ba      SoundManager::CreateSound(this->gid_.id);
005277c8      return 1;
00527780  }

005277cb                                   90 90 90 90 90                                                             .....

005277d0  uint32_t __thiscall AttackHook::Pack(class AttackHook* this, void** arg2, uint32_t arg3)

005277d0  {
005277d3      /* tailcall */
005277d3      return AttackCone::Pack(&this->attack_cone, arg2, arg3);
005277d0  }

005277d8                                                                          90 90 90 90 90 90 90 90                          ........

005277e0  int32_t __thiscall AttackHook::UnPack(class AttackHook* this, void** arg2, uint32_t arg3)

005277e0  {
005277e3      /* tailcall */
005277e3      return AttackCone::UnPack(&this->attack_cone, arg2, arg3);
005277e0  }

005277e8                          90 90 90 90 90 90 90 90                                                          ........

005277f0  uint32_t __thiscall CallPESHook::Pack(class CallPESHook* this, void** arg2, uint32_t arg3)

005277f0  {
005277f5      int32_t result = this->vtable->pack_size();
005277f5      
005277fc      if (arg3 >= result)
005277fc      {
00527808          **(uint32_t**)arg2 = this->pes.id;
0052780c          void* edi_3 = (*(uint32_t*)arg2 + 4);
0052780f          *(uint32_t*)arg2 = edi_3;
00527816          *(uint32_t*)edi_3 = ((float)((long double)this->pause));
00527818          *(uint32_t*)arg2 += 4;
005277fc      }
005277fc      
0052781d      return result;
005277f0  }


00527820  int32_t __thiscall CallPESHook::UnPack(class CallPESHook* this, void** arg2, uint32_t arg3)

00527820  {
00527824      void* edx = *(uint32_t*)arg2;
00527827      class IDClass<_tagDataID,32,0> esi = *(uint32_t*)edx;
0052782c      *(uint32_t*)arg2 = ((char*)edx + 4);
0052782e      this->pes.id = esi;
00527835      this->pause = **(uint32_t**)arg2;
00527838      *(uint32_t*)arg2 += 4;
00527841      return 1;
00527820  }

00527844              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00527850  uint32_t __thiscall CreateParticleHook::Pack(class CreateParticleHook* this, void** arg2, uint32_t arg3)

00527850  {
00527856      int32_t result = this->vtable->pack_size();
00527856      
00527861      if (arg3 >= result)
00527861      {
0052786d          **(uint32_t**)arg2 = this->emitter_info_id.id;
00527871          void* edx_3 = (*(uint32_t*)arg2 + 4);
00527874          *(uint32_t*)arg2 = edx_3;
0052787b          *(uint32_t*)edx_3 = this->part_index;
00527887          *(uint32_t*)arg2 += 4;
00527889          Frame::Pack(&this->offset, arg2, arg3);
00527893          **(uint32_t**)arg2 = this->emitter_id;
00527895          *(uint32_t*)arg2 += 4;
00527861      }
00527861      
0052789d      return result;
00527850  }


005278a0  int32_t __thiscall CreateParticleHook::UnPack(class CreateParticleHook* this, void** arg2, uint32_t arg3)

005278a0  {
005278a9      void* eax = *(uint32_t*)arg2;
005278ae      class IDClass<_tagDataID,32,0> ecx = *(uint32_t*)eax;
005278b3      *(uint32_t*)arg2 = ((char*)eax + 4);
005278b5      this->emitter_info_id.id = ecx;
005278bc      this->part_index = **(uint32_t**)arg2;
005278c5      *(uint32_t*)arg2 += 4;
005278cb      Frame::UnPack(&this->offset, arg2, arg3);
005278d4      this->emitter_id = **(uint32_t**)arg2;
005278d7      *(uint32_t*)arg2 += 4;
005278e1      return 1;
005278a0  }

005278e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005278f0  uint32_t __thiscall SetOmegaHook::Pack(class SetOmegaHook* this, void** arg2, uint32_t arg3)

005278f0  {
005278f5      int32_t result = this->vtable->pack_size();
005278f5      
00527903      if ((arg3 >= result && arg3 >= 0xc))
00527903      {
0052790f          **(uint32_t**)arg2 = this->axis.x;
00527913          void* edx_3 = (*(uint32_t*)arg2 + 4);
00527916          *(uint32_t*)arg2 = edx_3;
0052791b          *(uint32_t*)edx_3 = ((float)((long double)this->axis.y));
0052791f          void* edi_3 = (*(uint32_t*)arg2 + 4);
00527922          *(uint32_t*)arg2 = edi_3;
00527929          *(uint32_t*)edi_3 = ((float)((long double)this->axis.z));
0052792b          *(uint32_t*)arg2 += 4;
00527903      }
00527903      
00527930      return result;
005278f0  }

00527933                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00527940  int32_t __thiscall SetOmegaHook::UnPack(class SetOmegaHook* this, void** arg2, uint32_t arg3)

00527940  {
00527945      if (arg3 >= 0xc)
00527945      {
0052794f          this->axis.x = **(uint32_t**)arg2;
00527954          void* edx_4 = (*(uint32_t*)arg2 + 4);
00527957          *(uint32_t*)arg2 = edx_4;
0052795b          this->axis.y = *(uint32_t*)edx_4;
00527960          void* edx_7 = (*(uint32_t*)arg2 + 4);
00527963          *(uint32_t*)arg2 = edx_7;
00527967          this->axis.z = *(uint32_t*)edx_7;
0052796a          *(uint32_t*)arg2 += 4;
00527945      }
00527945      
00527972      return 1;
00527940  }

00527975                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00527980  void __thiscall ReplaceObjectHook::GetSubDataIDs(class ReplaceObjectHook const* this, class QualifiedDataIDArray* arg2)

00527980  {
00527999      void var_8;
00527999      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->ap_change.part_id.id, 0), 0);
00527980  }

005279a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005279b0  void __thiscall CreateParticleHook::GetSubDataIDs(class CreateParticleHook const* this, class QualifiedDataIDArray* arg2)

005279b0  {
005279c9      void var_8;
005279c9      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->emitter_info_id.id, 0), 0);
005279b0  }

005279d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005279e0  uint32_t __stdcall CMotionInterp::motion_allows_jump(class CMotionInterp* this @ ecx, uint32_t arg2) __pure

005279e0  {
005279e9      if (arg2 > 0x40000018)
005279e9      {
00527a24          if (arg2 > 0x41000014)
00527a10              return 0;
00527a10          
00527a39          if ((arg2 < 0x41000012 && (arg2 < 0x4000001e || arg2 > 0x40000039)))
00527a10              return 0;
005279e9      }
005279e9      else if (arg2 < 0x40000016)
005279f0      {
005279f7          if (arg2 > 0x10000131)
005279f7          {
00527a18              if (arg2 != 0x40000008)
00527a1c                  return 0;
005279f7          }
005279f7          else if ((arg2 < 0x10000128 && (arg2 < 0x1000006f || arg2 > 0x10000078)))
00527a10              return 0;
005279f0      }
005279f0      
00527a40      return 0x48;
005279e0  }

00527a43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00527a50  uint32_t __fastcall CMotionInterp::jump_charge_is_allowed(class CMotionInterp* this)

00527a50  {
00527a53      class CWeenieObject* weenie_obj = this->weenie_obj;
00527a53      
00527a58      if ((weenie_obj != 0 && weenie_obj->vtable->CanJump(this->jump_extent) == 0))
00527a6d          return 0x49;
00527a6d      
00527a6e      uint32_t forward_command = this->interpreted_state.forward_command;
00527a6e      
00527a87      if ((forward_command != 0x40000008 && (forward_command <= 0x41000011 || forward_command > 0x41000014)))
00527a8c          return 0;
00527a8c      
00527a93      return 0x48;
00527a50  }

00527a94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00527aa0  float __fastcall CMotionInterp::get_jump_v_z(class CMotionInterp const* this)

00527aa0  {
00527aa0      class CMotionInterp* jump_extent = this;
00527aa4      jump_extent = this->jump_extent;
00527aa8      long double x87_r7 = ((long double)jump_extent);
00527aac      long double temp0 = ((long double)0.000199999995f);
00527aac      (x87_r7 - temp0);
00527ab2      float result;
00527ab2      result = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
00527ab4      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00527ab4      
00527ab7      if (p)
00527ab7      {
00527ab9          long double x87_r7_1 = ((long double)jump_extent);
00527abd          long double temp1_1 = ((long double)1f);
00527abd          (x87_r7_1 - temp1_1);
00527ac3          result = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00527ac3          
00527ac8          if ((*(uint8_t*)((char*)result)[1] & 0x41) == 0)
00527aca              jump_extent = 0x3f800000;
00527aca          
00527ad2          class CWeenieObject* weenie_obj = this->weenie_obj;
00527ad2          
00527ad7          if (weenie_obj == 0)
00527ae0              return result;
00527ae0          
00527aed          result = weenie_obj->vtable->InqJumpVelocity(jump_extent, &jump_extent);
00527ab7      }
00527ab7      
00527b01      return result;
00527aa0  }

00527b02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00527b10  int32_t __fastcall CBaseFilter::GetPinVersion(class CBaseFilter* this)

00527b10  {
00527b13      return this->m_PinVersion;
00527b10  }

00527b14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00527b20  int32_t __fastcall CPhysicsObj::on_ground(class CPhysicsObj const* this)

00527b20  {
00527b20      uint8_t transient_state = ((int8_t)this->transient_state);
00527b20      
00527b2c      if (((transient_state & 1) != 0 && (transient_state & 2) != 0))
00527b33          return 1;
00527b33      
00527b36      return 0;
00527b20  }

00527b37                                                                       90 90 90 90 90 90 90 90 90                         .........

00527b40  void __fastcall CMotionInterp::Destroy(class CMotionInterp* this)

00527b40  {
00527b43      while (true)
00527b43      {
00527b43          class LListData** head_ = this->pending_motions.head_;
00527b43          
00527b4b          if (head_ == 0)
00527b4b              break;
00527b4b          
00527b4d          class LListData* ecx = *(uint32_t*)head_;
00527b51          this->pending_motions.head_ = ecx;
00527b51          
00527b57          if (ecx == 0)
00527b59              this->pending_motions.tail_ = ecx;
00527b59          
00527b60          *(uint32_t*)head_ = nullptr;
00527b66          operator delete(head_);
00527b43      }
00527b40  }

00527b72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00527b80  void __thiscall CMotionInterp::add_to_queue(class CMotionInterp* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00527b80  {
00527b85      class LListData* eax = operator new(0x10);
00527b85      
00527b8f      if (eax == 0)
00527bae          eax = nullptr;
00527b8f      else
00527b8f      {
00527b99          *(int32_t*)((char*)eax + 4) = arg2;
00527ba0          eax->llist_next = 0;
00527ba6          *(int32_t*)((char*)eax + 8) = arg3;
00527ba9          *(int32_t*)((char*)eax + 0xc) = arg4;
00527b8f      }
00527b8f      
00527bb0      class LListData** tail_ = this->pending_motions.tail_;
00527bb0      
00527bb8      if (tail_ != 0)
00527bb8      {
00527bba          *(uint32_t*)tail_ = eax;
00527bbc          this->pending_motions.tail_ = eax;
00527bc3          return;
00527bb8      }
00527bb8      
00527bc6      this->pending_motions.head_ = eax;
00527bcc      this->pending_motions.tail_ = eax;
00527b80  }

00527bd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00527be0  void __thiscall CMotionInterp::apply_run_to_command(class CMotionInterp const* this, uint32_t* arg2, float* arg3)

00527be0  {
00527be0      class CMotionInterp* this_1 = this;
00527be4      class CWeenieObject* weenie_obj = this->weenie_obj;
00527be9      long double x87_r7;
00527be9      
00527be9      if (weenie_obj != 0)
00527be9      {
00527bff          if (weenie_obj->vtable->InqRunRate(&this_1) != 0)
00527c06              x87_r7 = ((long double)this_1);
00527bff          else
00527c01              x87_r7 = ((long double)this->my_run_rate);
00527be9      }
00527be9      else
00527beb          x87_r7 = ((long double)1f);
00527beb      
00527c0e      uint32_t eax_3 = *(uint32_t*)arg2;
00527c0e      
00527c16      if (eax_3 == 0x45000005)
00527c16      {
00527c8c          long double x87_r6_3 = ((long double)*(uint32_t*)arg3);
00527c8e          long double temp2 = ((long double)0f);
00527c8e          (x87_r6_3 - temp2);
00527c94          int32_t eax_4;
00527c94          eax_4 = ((((x87_r6_3 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, temp2))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == temp2) ? 1 : 0) << 0xe) | 0x3800))));
00527c94          
00527c99          if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) == 0)
00527c9b              *(uint32_t*)arg2 = 0x44000007;
00527c9b          
00527ca3          *(uint32_t*)arg3 = ((float)(x87_r7 * ((long double)*(uint32_t*)arg3)));
00527ca6          return;
00527c16      }
00527c16      
00527c1d      if (eax_3 == 0x6500000d)
00527c1d      {
00527c82          *(uint32_t*)arg3 = ((float)(((long double)1.5f) * ((long double)*(uint32_t*)arg3)));
00527c85          return;
00527c1d      }
00527c1d      
00527c22      if (eax_3 == 0x6500000f)
00527c22      {
00527c2c          x87_r7 = (x87_r7 * ((long double)*(uint32_t*)arg3));
00527c2e          *(uint32_t*)arg3 = ((float)x87_r7);
00527c3a          (((long double)3f) - fabsl(x87_r7));
00527c3e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00527c3e          
00527c41          if (!(p_1))
00527c41          {
00527c43              long double temp5 = ((long double)0f);
00527c43              (x87_r7 - temp5);
00527c43              
00527c4e              if ((*(uint8_t*)((char*)((((x87_r7 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp5) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00527c4e              {
00527c5c                  *(uint32_t*)arg3 = ((float)(((long double)1f) * ((long double)3f)));
00527c5f                  return;
00527c4e              }
00527c4e              
00527c6e              *(uint32_t*)arg3 = ((float)(((long double)-1f) * ((long double)3f)));
00527c41          }
00527c22      }
00527be0  }

00527caf                                               90                                                                 .

00527cb0  void __fastcall CMotionInterp::get_max_speed(class CMotionInterp const* this)

00527cb0  {
00527cb0      class CMotionInterp* this_1 = this;
00527cb4      class CWeenieObject* weenie_obj = this->weenie_obj;
00527cb9      this_1 = nullptr;
00527cb9      
00527cc1      if (weenie_obj == 0)
00527cd1          return;
00527cd1      
00527cde      if (weenie_obj->vtable->InqRunRate(&this_1) != 0)
00527cf8          return;
00527cf8      
00527ce0      this->my_run_rate;
00527cb0  }

00527cf9                                                                             90 90 90 90 90 90 90                           .......

00527d00  void __fastcall CMotionInterp::get_adjusted_max_speed(class CMotionInterp const* this)

00527d00  {
00527d00      class CMotionInterp* this_1 = this;
00527d04      class CWeenieObject* weenie_obj = this->weenie_obj;
00527d04      
00527d09      if ((weenie_obj != 0 && weenie_obj->vtable->InqRunRate(&this_1) == 0))
00527d21          this->my_run_rate;
00527d21      
00527d31      if (this->interpreted_state.forward_command == 0x44000007)
00527d38          (((long double)this->interpreted_state.forward_speed) / ((long double)this->current_speed_factor));
00527d00  }

00527d44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00527d50  void __thiscall CMotionInterp::get_state_velocity(class CMotionInterp const* this, class AC1Legacy::Vector3* arg2)

00527d50  {
00527d5b      long double x87_r7_1;
00527d5b      
00527d5b      if (this->interpreted_state.sidestep_command != 0x6500000f)
00527d68          x87_r7_1 = ((long double)0f);
00527d5b      else
00527d63          x87_r7_1 = (((long double)1.25f) * ((long double)this->interpreted_state.sidestep_speed));
00527d63      
00527d6e      float* esi = arg2;
00527d72      *(uint32_t*)esi = ((float)x87_r7_1);
00527d74      uint32_t forward_command = this->interpreted_state.forward_command;
00527d7c      long double x87_r7_3;
00527d7c      
00527d7c      if (forward_command == 0x45000005)
00527d84          x87_r7_3 = (((long double)3.11999989f) * ((long double)this->interpreted_state.forward_speed));
00527d7c      else if (forward_command != 0x44000007)
00527d9b          x87_r7_3 = ((long double)0f);
00527d8e      else
00527d96          x87_r7_3 = (((long double)4f) * ((long double)this->interpreted_state.forward_speed));
00527d96      
00527da1      esi[1] = ((float)x87_r7_3);
00527da4      esi[2] = 0;
00527dab      class CWeenieObject* weenie_obj = this->weenie_obj;
00527db0      arg2 = nullptr;
00527db0      
00527db8      if ((weenie_obj != 0 && weenie_obj->vtable->InqRunRate(&arg2) == 0))
00527dd0          this->my_run_rate;
00527dd0      
00527ddf      long double x87_r6 = ((long double)esi[2]);
00527de2      long double x87_r5 = ((long double)esi[1]);
00527de5      long double x87_r4 = ((long double)*(uint32_t*)esi);
00527df7      long double x87_r3_4 = sqrtl((((x87_r4 * x87_r4) + (x87_r5 * x87_r5)) + (x87_r6 * x87_r6)));
00527dff      (x87_r4 - x87_r3_4);
00527e01      forward_command = ((((x87_r4 < x87_r3_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4, x87_r3_4))) ? 1 : 0) << 0xa) | ((((x87_r4 == x87_r3_4) ? 1 : 0) << 0xe) | 0x3000))));
00527e01      
00527e06      if ((*(uint8_t*)((char*)forward_command)[1] & 0x41) != 0)
00527e35          return;
00527e35      
00527e08      long double x87_r6_2 = (((long double)1f) / x87_r4);
00527e15      *(uint32_t*)esi = ((float)((x87_r6_2 * ((long double)*(uint32_t*)esi)) * x87_r3_4));
00527e1e      esi[1] = ((float)((x87_r6_2 * ((long double)esi[1])) * x87_r3_4));
00527e26      esi[2] = ((float)((x87_r6_2 * ((long double)esi[2])) * x87_r3_4));
00527d50  }

00527e38                                                                          90 90 90 90 90 90 90 90                          ........

00527e40  uint32_t __fastcall CMotionInterp::StopCompletely(class CMotionInterp* this)

00527e40  {
00527e44      class CPhysicsObj* physics_obj = this->physics_obj;
00527e44      
00527e4b      if (physics_obj == 0)
00527e54          return 8;
00527e54      
00527e56      CPhysicsObj::interrupt_current_movement(physics_obj);
00527e61      uint32_t eax_2 = CMotionInterp::motion_allows_jump(this, this->interpreted_state.forward_command);
00527e70      this->raw_state.forward_command = 0x41000003;
00527e77      this->raw_state.forward_speed = 1f;
00527e7a      this->raw_state.sidestep_command = 0;
00527e7d      this->raw_state.turn_command = 0;
00527e80      this->interpreted_state.forward_command = 0x41000003;
00527e87      this->interpreted_state.forward_speed = 1f;
00527e8a      this->interpreted_state.sidestep_command = 0;
00527e8d      this->interpreted_state.turn_command = 0;
00527e90      CPhysicsObj::StopCompletely_Internal(this->physics_obj);
00527e9e      CMotionInterp::add_to_queue(this, 0, 0x41000003, eax_2);
00527ea3      class CPhysicsObj* physics_obj_1 = this->physics_obj;
00527ea3      
00527eb1      if ((physics_obj_1 != 0 && physics_obj_1->cell == 0))
00527eb3          CPhysicsObj::RemoveLinkAnimations(physics_obj_1);
00527eb3      
00527ebc      return 0;
00527e40  }

00527ebd                                                                                         90 90 90                               ...

00527ec0  void __fastcall CMotionInterp::MotionDone(class CMotionInterp* this, int32_t arg2)

00527ec0  {
00527ec3      class CPhysicsObj* physics_obj = this->physics_obj;
00527ec3      
00527ec8      if (physics_obj != 0)
00527ec8      {
00527eca          class LListData* head_ = this->pending_motions.head_;
00527eca          
00527ed2          if (head_ != 0)
00527ed2          {
00527edb              if ((*(int32_t*)((char*)head_ + 8) & 0x10000000) != 0)
00527edb              {
00527edd                  CPhysicsObj::unstick_from_object(physics_obj);
00527ee5                  InterpretedMotionState::RemoveAction(&this->interpreted_state);
00527eed                  RawMotionState::RemoveAction(&this->raw_state);
00527edb              }
00527edb              
00527ef2              class LListData* head__1 = this->pending_motions.head_;
00527ef2              
00527efa              if (head__1 != 0)
00527efa              {
00527efc                  class LListData* llist_next = head__1->llist_next;
00527f00                  this->pending_motions.head_ = llist_next;
00527f00                  
00527f06                  if (llist_next == 0)
00527f08                      this->pending_motions.tail_ = llist_next;
00527f08                  
00527f0f                  head__1->llist_next = 0;
00527f15                  operator delete(head__1);
00527efa              }
00527ed2          }
00527ec8      }
00527ec0  }

00527f21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00527f30  void __fastcall CMotionInterp::HandleExitWorld(class CMotionInterp* this)

00527f30  {
00527f3b      for (class LListData* head_ = this->pending_motions.head_; head_ != 0; head_ = this->pending_motions.head_)
00527f3b      {
00527f40          class CPhysicsObj* physics_obj = this->physics_obj;
00527f40          
00527f49          if ((physics_obj != 0 && head_ != 0))
00527f49          {
00527f52              if ((*(int32_t*)((char*)head_ + 8) & 0x10000000) != 0)
00527f52              {
00527f54                  CPhysicsObj::unstick_from_object(physics_obj);
00527f5c                  InterpretedMotionState::RemoveAction(&this->interpreted_state);
00527f64                  RawMotionState::RemoveAction(&this->raw_state);
00527f52              }
00527f52              
00527f69              class LListData* head__1 = this->pending_motions.head_;
00527f69              
00527f71              if (head__1 != 0)
00527f71              {
00527f73                  class LListData* llist_next = head__1->llist_next;
00527f77                  this->pending_motions.head_ = llist_next;
00527f77                  
00527f7d                  if (llist_next == 0)
00527f7f                      this->pending_motions.tail_ = llist_next;
00527f7f                  
00527f86                  head__1->llist_next = 0;
00527f8c                  operator delete(head__1);
00527f71              }
00527f49          }
00527f3b      }
00527f30  }


00527fa0  int32_t __fastcall CMotionInterp::is_standing_still(class CMotionInterp const* this)

00527fa0  {
00527fa3      uint8_t transient_state = ((int8_t)this->physics_obj->transient_state);
00527fa3      
00527fc6      if (((transient_state & 1) != 0 && ((transient_state & 2) != 0 && (this->interpreted_state.forward_command == 0x41000003 && (this->interpreted_state.sidestep_command == 0 && this->interpreted_state.turn_command == 0)))))
00527fcd          return 1;
00527fcd      
00527fd0      return 0;
00527fa0  }

00527fd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00527fe0  int32_t __fastcall CMotionInterp::motions_pending(class CMotionInterp const* this)

00527fe0  {
00527fea      int32_t result;
00527fea      result = this->pending_motions.head_ != 0;
00527fed      return result;
00527fe0  }

00527fee                                            90 90                                                                ..

00527ff0  void __fastcall CMotionInterp::~CMotionInterp(class CMotionInterp* this)

00527ff0  {
00527ff3      CMotionInterp::Destroy(this);
00527ffb      InterpretedMotionState::~InterpretedMotionState(&this->interpreted_state);
00528004      /* tailcall */
00528004      return RawMotionState::~RawMotionState(&this->raw_state);
00527ff0  }

00528009                             90 90 90 90 90 90 90                                                           .......

00528010  void __thiscall CMotionInterp::adjust_motion(class CMotionInterp const* this, uint32_t* arg2, float* arg3, enum HoldKey arg4)

00528010  {
00528013      class CWeenieObject* weenie_obj = this->weenie_obj;
00528018      int32_t eax_2;
00528018      
00528018      if (weenie_obj != 0)
0052801c          eax_2 = weenie_obj->vtable->IsCreature();
0052801c      
00528021      if ((weenie_obj == 0 || eax_2 != 0))
00528021      {
0052802b          uint32_t eax_3 = *(uint32_t*)arg2;
00528036          long double x87_r7_4;
00528036          
00528036          if (eax_3 > 0x6500000e)
00528036          {
0052806d              if (eax_3 == 0x6500000f)
0052806d                  goto label_52808e;
0052806d              
00528070              if (eax_3 != 0x65000010)
00528070                  goto label_528099;
00528070              
00528072              *(uint32_t*)arg2 = 0x6500000f;
00528080              *(uint32_t*)arg3 = ((float)(((long double)*(uint32_t*)arg3) * ((long double)-1f)));
0052808e          label_52808e:
00528094              x87_r7_4 = (((((long double)3.11999989f) / ((long double)1.25f)) * ((long double)0.5f)) * ((long double)*(uint32_t*)arg3));
00528094              goto label_528096;
00528036          }
00528036          
00528038          if (eax_3 == 0x6500000e)
00528038          {
00528058              *(uint32_t*)arg2 = 0x6500000d;
00528060              x87_r7_4 = (((long double)*(uint32_t*)arg3) * ((long double)-1f));
00528096          label_528096:
00528096              *(uint32_t*)arg3 = ((float)x87_r7_4);
00528099          label_528099:
00528099              enum HoldKey current_holdkey = arg4;
00528099              
005280a1              if (current_holdkey == HoldKey_Invalid)
005280a3                  current_holdkey = this->raw_state.current_holdkey;
005280a3              
005280a9              int32_t eax_6;
005280a9              eax_6 = current_holdkey == HoldKey_Run;
005280a9              
005280af              if (eax_6 != 0)
005280b5                  CMotionInterp::apply_run_to_command(this, arg2, arg3);
00528038          }
00528038          else if (eax_3 != 0x44000007)
0052803f          {
00528046              if (eax_3 != 0x45000006)
00528046                  goto label_528099;
00528046              
0052804e              *(uint32_t*)arg2 = 0x45000005;
00528094              x87_r7_4 = (-(((long double)0.649999976f)) * ((long double)*(uint32_t*)arg3));
00528094              goto label_528096;
0052803f          }
00528021      }
00528010  }

005280be                                                                                            90 90                                ..

005280c0  void __thiscall CMotionInterp::get_leave_ground_velocity(class CMotionInterp* this, class AC1Legacy::Vector3* arg2)

005280c0  {
005280c4      class AC1Legacy::Vector3* esi = arg2;
005280cc      CMotionInterp::get_state_velocity(this, esi);
005280d8      arg2 = ((float)CMotionInterp::get_jump_v_z(this));
005280e2      long double x87_r0_2 = fabsl(((long double)esi->x));
005280e4      esi->z = arg2;
005280e7      long double x87_r7 = ((long double)0.000199999995f);
005280ed      (x87_r7 - x87_r0_2);
005280ef      class AC1Legacy::Vector3* eax;
005280ef      eax = ((((x87_r7 < x87_r0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, x87_r0_2))) ? 1 : 0) << 0xa) | ((((x87_r7 == x87_r0_2) ? 1 : 0) << 0xe) | 0x800))));
005280ef      
005280f4      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005280f4      {
005280fd          long double x87_r0_4 = fabsl(((long double)esi->y));
005280ff          long double x87_r7_1 = ((long double)0.000199999995f);
00528105          (x87_r7_1 - x87_r0_4);
00528107          eax = ((((x87_r7_1 < x87_r0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, x87_r0_4))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == x87_r0_4) ? 1 : 0) << 0xe) | 0x800))));
00528107          
0052810c          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0052810c          {
00528116              long double x87_r0_6 = fabsl(((long double)arg2));
00528118              long double x87_r7_2 = ((long double)0.000199999995f);
0052811e              (x87_r7_2 - x87_r0_6);
00528120              eax = ((((x87_r7_2 < x87_r0_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, x87_r0_6))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == x87_r0_6) ? 1 : 0) << 0xe) | 0x800))));
00528120              
00528125              if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00528125              {
0052812b                  class CPhysicsObj* physics_obj = this->physics_obj;
0052814b                  long double x87_r0_10 = (((((long double)physics_obj->m_position.frame.m_fl2gv[1]) * ((long double)physics_obj->m_velocityVector.y)) + (((long double)physics_obj->m_position.frame.m_fl2gv[0]) * ((long double)physics_obj->m_velocityVector.x))) + (((long double)physics_obj->m_position.frame.m_fl2gv[2]) * ((long double)physics_obj->m_velocityVector.z)));
00528172                  long double x87_r0_14 = (((((long double)physics_obj->m_position.frame.m_fl2gv[4]) * ((long double)physics_obj->m_velocityVector.y)) + (((long double)physics_obj->m_position.frame.m_fl2gv[3]) * ((long double)physics_obj->m_velocityVector.x))) + (((long double)physics_obj->m_position.frame.m_fl2gv[5]) * ((long double)physics_obj->m_velocityVector.z)));
0052818e                  long double x87_r0_17 = ((((long double)physics_obj->m_position.frame.m_fl2gv[7]) * ((long double)physics_obj->m_velocityVector.y)) + (((long double)physics_obj->m_position.frame.m_fl2gv[6]) * ((long double)physics_obj->m_velocityVector.x)));
00528196                  long double x87_r7_14 = (((long double)physics_obj->m_position.frame.m_fl2gv[8]) * ((long double)physics_obj->m_velocityVector.z));
0052819c                  esi->x = ((float)x87_r0_10);
0052819e                  esi->y = ((float)x87_r0_14);
005281ab                  esi->z = ((float)(x87_r0_17 + x87_r7_14));
00528125              }
0052810c          }
005280f4      }
005280c0  }

005281b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005281c0  uint32_t __fastcall CMotionInterp::charge_jump(class CMotionInterp* this)

005281c0  {
005281c3      class CWeenieObject* weenie_obj = this->weenie_obj;
005281c3      
005281c8      if ((weenie_obj != 0 && weenie_obj->vtable->CanJump(this->jump_extent) == 0))
005281dd          return 0x49;
005281dd      
005281de      uint32_t forward_command = this->interpreted_state.forward_command;
005281de      
005281f7      if ((forward_command == 0x40000008 || (forward_command > 0x41000011 && forward_command <= 0x41000014)))
00528233          return 0x48;
00528233      
005281fc      uint8_t transient_state = ((int8_t)this->physics_obj->transient_state);
005281fc      
00528222      if (((transient_state & 1) != 0 && ((transient_state & 2) != 0 && (forward_command == 0x41000003 && (this->interpreted_state.sidestep_command == 0 && this->interpreted_state.turn_command == 0)))))
00528224          this->standing_longjump = 1;
00528224      
0052822c      return 0;
005281c0  }

00528234                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00528240  int32_t __thiscall CMotionInterp::contact_allows_move(class CMotionInterp const* this, uint32_t arg2)

00528240  {
00528248      if (this->physics_obj != 0)
00528248      {
00528253          if (arg2 > 0x40000015)
00528253          {
0052825c              if ((arg2 >= 0x6500000d && arg2 <= 0x6500000e))
00528264                  return 1;
00528253          }
00528253          else if ((arg2 == 0x40000015 || arg2 == 0x40000011))
00528264              return 1;
00528264          
00528275          class CWeenieObject* weenie_obj = this->weenie_obj;
0052827a          int32_t eax_4;
0052827a          
0052827a          if (weenie_obj != 0)
0052827e              eax_4 = weenie_obj->vtable->IsCreature();
0052827e          
00528283          if ((weenie_obj != 0 && eax_4 == 0))
00528264              return 1;
00528264          
00528285          class CPhysicsObj* physics_obj = this->physics_obj;
00528285          
00528295          if ((physics_obj == 0 || (*(uint8_t*)((char*)((int16_t)physics_obj->state))[1] & 4) == 0))
00528264              return 1;
00528264          
00528297          uint8_t transient_state = ((int8_t)physics_obj->transient_state);
00528297          
005282a3          if (((transient_state & 1) != 0 && (transient_state & 2) != 0))
00528264              return 1;
00528248      }
00528248      
005282a8      return 0;
00528240  }

005282ab                                   90 90 90 90 90                                                             .....

005282b0  uint32_t __thiscall CMotionInterp::jump_is_allowed(class CMotionInterp* this, float arg2, int32_t* arg3)

005282b0  {
005282b8      if (this->physics_obj != 0)
005282b8      {
005282ba          class CWeenieObject* weenie_obj = this->weenie_obj;
005282bf          int32_t eax_2;
005282bf          
005282bf          if (weenie_obj != 0)
005282c3              eax_2 = weenie_obj->vtable->IsCreature();
005282c3          
005282c8          if ((weenie_obj != 0 && eax_2 == 0))
005282c8          {
005282f6          label_5282f6:
005282f6              
005282fd              if (CPhysicsObj::IsFullyConstrained(this->physics_obj) != 0)
00528305                  return 0x47;
00528305              
00528308              class LListData* head_ = this->pending_motions.head_;
00528310              uint32_t eax_6;
00528310              
00528310              if (head_ != 0)
00528312                  eax_6 = *(int32_t*)((char*)head_ + 0xc);
00528312              
00528317              if ((head_ == 0 || eax_6 == 0))
00528317              {
0052831b                  eax_6 = CMotionInterp::jump_charge_is_allowed(this);
0052831b                  
00528322                  if (eax_6 == 0)
00528322                  {
0052832b                      uint32_t eax_7 = CMotionInterp::motion_allows_jump(this, this->interpreted_state.forward_command);
0052832b                      
00528334                      if (eax_7 != 0)
00528355                          return eax_7;
00528355                      
00528336                      class CWeenieObject* weenie_obj_1 = this->weenie_obj;
00528336                      
0052833b                      if (weenie_obj_1 == 0)
00528355                          return eax_7;
00528355                      
0052834e                      eax_6 = 0x47;
0052834e                      
00528353                      if (weenie_obj_1->vtable->JumpStaminaCost(arg2, arg3) != 0)
00528355                          return eax_7;
00528322                  }
00528317              }
00528317              
00528359              return eax_6;
005282c8          }
005282c8          
005282ca          class CPhysicsObj* physics_obj = this->physics_obj;
005282ca          
005282da          if ((physics_obj == 0 || (*(uint8_t*)((char*)((int16_t)physics_obj->state))[1] & 4) == 0))
005282cf              goto label_5282f6;
005282cf          
005282dc          uint8_t transient_state = ((int8_t)physics_obj->transient_state);
005282dc          
005282e8          if (((transient_state & 1) != 0 && (transient_state & 2) != 0))
005282e8              goto label_5282f6;
005282b8      }
005282b8      
005282f0      return 0x24;
005282b0  }

0052835c                                                                                      90 90 90 90                              ....

00528360  uint32_t __thiscall CMotionInterp::DoInterpretedMotion(class CMotionInterp* this, uint32_t arg2, class MovementParameters const* arg3)

00528360  {
00528368      if (this->physics_obj == 0)
00528370          return 8;
00528370      
00528384      uint32_t result;
00528384      
00528384      if (CMotionInterp::contact_allows_move(this, arg2) != 0)
00528384      {
005283af          if ((this->standing_longjump != 0 && ((arg2 == 0x45000005 || arg2 == 0x44000007) || arg2 == 0x6500000f)))
0052838f              goto label_528440;
0052838f          
005283bb          if (arg2 == 0x40000011)
005283c0              CPhysicsObj::RemoveLinkAnimations(this->physics_obj);
005283c0          
005283d3          result = CPhysicsObj::DoInterpretedMotion(this->physics_obj, arg2, arg3);
005283d3          
005283d7          if (result == 0)
005283d7          {
005283e0              uint32_t eax_5;
005283e0              
005283e0              if ((arg3->__inner0 & 0x20000) == 0)
005283e0              {
005283ec                  eax_5 = CMotionInterp::motion_allows_jump(this, arg2);
005283ec                  
005283fb                  if ((eax_5 == 0 && (arg2 & 0x10000000) == 0))
00528401                      eax_5 = CMotionInterp::motion_allows_jump(this, this->interpreted_state.forward_command);
005283e0              }
005283e0              else
005283e2                  eax_5 = 0x48;
005283e2              
0052840e              CMotionInterp::add_to_queue(this, arg3->context_id, arg2, eax_5);
0052840e              
00528419              if ((*(uint8_t*)((char*)((int16_t)arg3->__inner0))[1] & 0x40) != 0)
00528420                  InterpretedMotionState::ApplyMotion(&this->interpreted_state, arg2, arg3);
005283d7          }
00528384      }
00528384      else if ((arg2 & 0x10000000) == 0)
0052842d      {
00528440      label_528440:
00528440          
00528440          if ((*(uint8_t*)((char*)((int16_t)arg3->__inner0))[1] & 0x40) != 0)
00528447              InterpretedMotionState::ApplyMotion(&this->interpreted_state, arg2, arg3);
00528447          
0052844c          result = 0;
0052842d      }
0052842d      else
0052842f          result = 0x24;
0052842f      
0052844e      class CPhysicsObj* physics_obj = this->physics_obj;
0052844e      
0052845d      if ((physics_obj != 0 && physics_obj->cell == 0))
0052845f          CPhysicsObj::RemoveLinkAnimations(physics_obj);
0052845f      
0052846a      return result;
00528360  }

0052846d                                         90 90 90                                                               ...

00528470  uint32_t __thiscall CMotionInterp::StopInterpretedMotion(class CMotionInterp* this, uint32_t arg2, class MovementParameters const* arg3)

00528470  {
00528478      if (this->physics_obj == 0)
00528480          return 8;
00528480      
005284b3      uint32_t result;
005284b3      
005284b3      if ((CMotionInterp::contact_allows_move(this, arg2) == 0 || (this->standing_longjump != 0 && ((arg2 == 0x45000005 || arg2 == 0x44000007) || arg2 == 0x6500000f))))
005284b3      {
005284f7          if ((*(uint8_t*)((char*)((int16_t)arg3->__inner0))[1] & 0x40) != 0)
005284fd              InterpretedMotionState::RemoveMotion(&this->interpreted_state, arg2);
005284fd          
00528502          result = 0;
005284b3      }
005284b3      else
005284b3      {
005284be          uint32_t result_1 = CPhysicsObj::StopInterpretedMotion(this->physics_obj, arg2, arg3);
005284c3          result = result_1;
005284c3          
005284c7          if (result == 0)
005284c7          {
005284d5              CMotionInterp::add_to_queue(this, arg3->context_id, 0x41000003, result_1);
005284d5              
005284e0              if ((*(uint8_t*)((char*)((int16_t)arg3->__inner0))[1] & 0x40) != 0)
005284e6                  InterpretedMotionState::RemoveMotion(&this->interpreted_state, arg2);
005284c7          }
005284b3      }
005284b3      
00528504      class CPhysicsObj* physics_obj = this->physics_obj;
00528504      
00528513      if ((physics_obj != 0 && physics_obj->cell == 0))
00528515          CPhysicsObj::RemoveLinkAnimations(physics_obj);
00528515      
00528520      return result;
00528470  }

00528523           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00528530  uint32_t __thiscall CMotionInterp::StopMotion(class CMotionInterp* this, uint32_t arg2, class MovementParameters const* arg3)

00528530  {
00528536      class CPhysicsObj* physics_obj = this->physics_obj;
00528536      
0052853b      if (physics_obj == 0)
00528546          return 8;
00528546      
0052854c      class MovementParameters* esi = arg3;
0052854c      
00528555      if (*(uint8_t*)((char*)((int16_t)esi->__inner0))[1] < 0)
00528557          CPhysicsObj::interrupt_current_movement(physics_obj);
00528557      
00528562      float min_distance = esi->min_distance;
00528569      union __inner0 = esi->__inner0;
00528570      float desired_heading = esi->desired_heading;
00528577      float distance_to_object = esi->distance_to_object;
0052857e      float walk_run_threshhold = esi->walk_run_threshhold;
00528582      enum HoldKey hold_key_to_apply = esi->hold_key_to_apply;
00528585      float speed = esi->speed;
0052858d      float min_distance_1 = min_distance;
00528594      enum HoldKey hold_key_to_apply_1 = hold_key_to_apply;
00528598      uint32_t context_id = esi->context_id;
005285a5      float fail_distance = esi->fail_distance;
005285a9      uint32_t action_stamp = esi->action_stamp;
005285af      arg3 = arg2;
005285b3      int32_t var_2c = 0x7c83f8;
005285bb      uint32_t action_stamp_1 = action_stamp;
005285bf      CMotionInterp::adjust_motion(this, &arg3, &speed, hold_key_to_apply);
005285d0      uint32_t result = CMotionInterp::StopInterpretedMotion(this, arg3, &var_2c);
005285d0      
005285e1      if ((result == 0 && (*(uint8_t*)((char*)((int16_t)esi->__inner0))[1] & 0x20) != 0))
005285e7          RawMotionState::RemoveMotion(&this->raw_state, arg2);
005285e7      
005285f5      return result;
00528530  }

005285f8                                                                          90 90 90 90 90 90 90 90                          ........

00528600  void __thiscall CMotionInterp::apply_interpreted_movement(class CMotionInterp* this, int32_t arg2, int32_t arg3)

00528600  {
0052860b      if (this->physics_obj != 0)
0052860b      {
00528615          void var_2c;
00528615          MovementParameters::MovementParameters(&var_2c);
00528615          
00528647          if (this->interpreted_state.forward_command == 0x44000007)
0052864c              this->my_run_rate = ((float)((long double)this->interpreted_state.forward_speed));
0052864c          
0052865a          CMotionInterp::DoInterpretedMotion(this, this->interpreted_state.current_style, &var_2c);
0052865a          
0052866c          if (CMotionInterp::contact_allows_move(this, this->interpreted_state.forward_command) == 0)
0052866c          {
005286df              int32_t var_18_2 = 0x3f800000;
005286ee              CMotionInterp::DoInterpretedMotion(this, 0x40000015, &var_2c);
0052866c          }
0052866c          else
0052866c          {
00528677              void* var_34_3 = &var_2c;
00528677              
0052867a              if (this->standing_longjump != 0)
0052867a              {
005286ba                  int32_t var_18_1 = 0x3f800000;
005286c2                  CMotionInterp::DoInterpretedMotion(this, 0x41000003, var_34_3);
005286d3                  CMotionInterp::StopInterpretedMotion(this, 0x6500000f, &var_2c);
0052867a              }
0052867a              else
0052867a              {
00528683                  float forward_speed = this->interpreted_state.forward_speed;
00528687                  CMotionInterp::DoInterpretedMotion(this, this->interpreted_state.forward_command, var_34_3);
0052868c                  uint32_t sidestep_command = this->interpreted_state.sidestep_command;
0052868c                  
00528691                  if (sidestep_command == 0)
005286ae                      CMotionInterp::StopInterpretedMotion(this, 0x6500000f, &var_2c);
00528691                  else
00528691                  {
0052869b                      float sidestep_speed = this->interpreted_state.sidestep_speed;
005286ee                      CMotionInterp::DoInterpretedMotion(this, sidestep_command, &var_2c);
00528691                  }
0052867a              }
0052866c          }
0052866c          
005286f3          uint32_t turn_command = this->interpreted_state.turn_command;
005286f3          
005286f8          if (turn_command != 0)
005286f8          {
00528702              float turn_speed = this->interpreted_state.turn_speed;
00528709              CMotionInterp::DoInterpretedMotion(this, turn_command, &var_2c);
00528712              return;
005286f8          }
005286f8          
00528715          class CPhysicsObj* physics_obj = this->physics_obj;
00528715          
0052871a          if (physics_obj != 0)
0052871a          {
00528726              uint32_t eax_10 = CPhysicsObj::StopInterpretedMotion(physics_obj, 0x6500000d, &var_2c);
00528726              
0052872d              if (eax_10 == 0)
0052872d              {
0052873c                  uint32_t var_c;
0052873c                  CMotionInterp::add_to_queue(this, var_c, 0x41000003, eax_10);
00528748                  int16_t var_28;
00528748                  
00528748                  if ((*(uint8_t*)((char*)(((int16_t)((((arg3 & 1) << 2) | (arg2 & 1)) << 0xf)) | (var_28 & 0x37ff)))[1] & 0x40) != 0)
00528752                      InterpretedMotionState::RemoveMotion(&this->interpreted_state, 0x6500000d);
0052872d              }
0052872d              
00528757              class CPhysicsObj* physics_obj_1 = this->physics_obj;
00528757              
00528766              if ((physics_obj_1 != 0 && physics_obj_1->cell == 0))
00528768                  CPhysicsObj::RemoveLinkAnimations(physics_obj_1);
0052871a          }
0052860b      }
00528600  }

00528774                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00528780  uint32_t __thiscall CMotionInterp::jump(class CMotionInterp* this, float arg2, int32_t* arg3)

00528780  {
00528783      class CPhysicsObj* physics_obj = this->physics_obj;
00528783      
00528788      if (physics_obj == 0)
00528790          return 8;
00528790      
00528794      CPhysicsObj::interrupt_current_movement(physics_obj);
005287a5      uint32_t result = CMotionInterp::jump_is_allowed(this, arg2, arg3);
005287a5      
005287ae      if (result != 0)
005287ae      {
005287ca          this->standing_longjump = 0;
005287d2          return result;
005287ae      }
005287ae      
005287b4      class CPhysicsObj* physics_obj_1 = this->physics_obj;
005287b8      this->jump_extent = arg2;
005287bb      CPhysicsObj::set_on_walkable(physics_obj_1, result);
005287c4      return result;
00528780  }

005287d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005287e0  void __thiscall CMotionInterp::apply_raw_movement(class CMotionInterp* this, int32_t arg2, int32_t arg3)

005287e0  {
005287e8      if (this->physics_obj != 0)
005287e8      {
005287f5          this->interpreted_state.current_style = this->raw_state.current_style;
005287fb          this->interpreted_state.forward_speed = this->raw_state.forward_speed;
005287f8          this->interpreted_state.forward_command = this->raw_state.forward_command;
00528807          this->interpreted_state.sidestep_command = this->raw_state.sidestep_command;
00528810          this->interpreted_state.sidestep_speed = this->raw_state.sidestep_speed;
00528819          this->interpreted_state.turn_command = this->raw_state.turn_command;
0052881f          this->interpreted_state.turn_speed = this->raw_state.turn_speed;
0052882d          CMotionInterp::adjust_motion(this, &this->interpreted_state.forward_command, &this->interpreted_state.forward_speed, this->raw_state.forward_holdkey);
0052883a          CMotionInterp::adjust_motion(this, &this->interpreted_state.sidestep_command, &this->interpreted_state.sidestep_speed, this->raw_state.sidestep_holdkey);
0052884a          CMotionInterp::adjust_motion(this, &this->interpreted_state.turn_command, &this->interpreted_state.turn_speed, this->raw_state.turn_holdkey);
0052885b          CMotionInterp::apply_interpreted_movement(this, arg2, arg3);
005287e8      }
005287e0  }

00528867                       90 90 90 90 90 90 90 90 90                                                         .........

00528870  void __thiscall CMotionInterp::apply_current_movement(class CMotionInterp* this, int32_t arg2, int32_t arg3)

00528870  {
0052887d      if ((this->physics_obj != 0 && this->initted != 0))
0052887d      {
0052887f          class CWeenieObject* weenie_obj = this->weenie_obj;
00528884          int32_t eax_2;
00528884          
00528884          if (weenie_obj != 0)
00528888              eax_2 = weenie_obj->vtable->IsThePlayer();
00528888          
0052888d          if (((weenie_obj == 0 || eax_2 != 0) && CPhysicsObj::movement_is_autonomous(this->physics_obj) != 0))
0052888d          {
005288a7              CMotionInterp::apply_raw_movement(this, arg2, arg3);
005288ad              return;
0052888d          }
0052888d          
005288bc          CMotionInterp::apply_interpreted_movement(this, arg2, arg3);
0052887d      }
00528870  }

005288c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005288d0  void __fastcall CMotionInterp::ReportExhaustion(class CMotionInterp* this)

005288d0  {
005288dd      if ((this->physics_obj != 0 && this->initted != 0))
005288dd      {
005288df          class CWeenieObject* weenie_obj = this->weenie_obj;
005288e4          int32_t eax_2;
005288e4          
005288e4          if (weenie_obj != 0)
005288e8              eax_2 = weenie_obj->vtable->IsThePlayer();
005288e8          
005288ed          if (((weenie_obj == 0 || eax_2 != 0) && CPhysicsObj::movement_is_autonomous(this->physics_obj) != 0))
005288ed          {
00528901              CMotionInterp::apply_raw_movement(this, 0, 0);
00528907              return;
005288ed          }
005288ed          
0052890e          CMotionInterp::apply_interpreted_movement(this, 0, 0);
005288dd      }
005288d0  }

00528915                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00528920  void __thiscall CMotionInterp::SetWeenieObject(class CMotionInterp* this, class CWeenieObject* arg2)

00528920  {
00528926      bool cond:0 = this->physics_obj == 0;
0052892c      this->weenie_obj = arg2;
0052892c      
00528934      if ((!(cond:0) && this->initted != 0))
00528934      {
00528938          if (arg2 == 0)
00528938          {
00528946          label_528946:
00528946              
0052894d              if (CPhysicsObj::movement_is_autonomous(this->physics_obj) != 0)
0052894d              {
00528955                  CMotionInterp::apply_raw_movement(this, 1, 0);
0052895b                  return;
0052894d              }
00528938          }
00528938          else if (arg2->vtable->IsThePlayer() != 0)
00528941              goto label_528946;
00528941          
00528964          CMotionInterp::apply_interpreted_movement(this, 1, 0);
00528934      }
00528920  }

0052896d                                         90 90 90                                                               ...

00528970  void __thiscall CMotionInterp::SetPhysicsObject(class CMotionInterp* this, class CPhysicsObj* arg2)

00528970  {
00528979      this->physics_obj = arg2;
00528979      
00528981      if ((arg2 != 0 && this->initted != 0))
00528981      {
00528983          class CWeenieObject* weenie_obj = this->weenie_obj;
00528988          int32_t eax_1;
00528988          
00528988          if (weenie_obj != 0)
0052898c              eax_1 = weenie_obj->vtable->IsThePlayer();
0052898c          
00528991          if (((weenie_obj == 0 || eax_1 != 0) && CPhysicsObj::movement_is_autonomous(this->physics_obj) != 0))
00528991          {
005289a5              CMotionInterp::apply_raw_movement(this, 1, 0);
005289ab              return;
00528991          }
00528991          
005289b4          CMotionInterp::apply_interpreted_movement(this, 1, 0);
00528981      }
00528970  }

005289bd                                                                                         90 90 90                               ...

005289c0  int32_t __thiscall CMotionInterp::move_to_interpreted_state(class CMotionInterp* this, class InterpretedMotionState const* arg2)

005289c0  {
005289c6      class CPhysicsObj* physics_obj = this->physics_obj;
005289c6      
005289cb      if (physics_obj == 0)
005289d3          return 0;
005289d3      
005289df      this->raw_state.current_style = arg2->current_style;
005289e2      CPhysicsObj::interrupt_current_movement(physics_obj);
005289ed      uint32_t eax_2 = CMotionInterp::motion_allows_jump(this, this->interpreted_state.forward_command);
005289f4      int32_t esi_1 = -(eax_2);
005289fe      InterpretedMotionState::copy_movement_from(&this->interpreted_state, arg2);
00528a08      CMotionInterp::apply_current_movement(this, 1, -((esi_1 - esi_1)));
00528a11      void var_2c;
00528a11      MovementParameters::MovementParameters(&var_2c);
00528a11      
00528a1b      for (class LListData* i = arg2->actions.head_; i != 0; i = i->llist_next)
00528a1b      {
00528a27          int32_t eax_4 = (*(int32_t*)((char*)i + 0xc) & 0x7fff);
00528a2c          int32_t ecx_6 = (this->server_action_stamp & 0x7fff);
00528a34          int32_t edx_2;
00528a34          
00528a34          if (eax_4 <= ecx_6)
00528a3e              edx_2 = (ecx_6 - eax_4);
00528a34          else
00528a38              edx_2 = (eax_4 - ecx_6);
00528a38          
00528a46          bool c_1;
00528a46          
00528a46          if (edx_2 <= 0x3fff)
00528a4c              c_1 = ecx_6 < eax_4;
00528a46          else
00528a48              c_1 = eax_4 < ecx_6;
00528a48          
00528a54          if (-((eax_4 - eax_4)) != 0)
00528a54          {
00528a56              class CWeenieObject* weenie_obj = this->weenie_obj;
00528a56              
00528a5b              if (weenie_obj != 0)
00528a5b              {
00528a6b                  if ((weenie_obj->vtable->IsThePlayer() == 0 || *(int32_t*)((char*)i + 0x10) == 0))
00528a6b                  {
00528a70                  label_528a70:
00528a70                      this->server_action_stamp = *(int32_t*)((char*)i + 0xc);
00528a7a                      int32_t var_18_1 = *(int32_t*)((char*)i + 8);
00528a8e                      int32_t var_28 = (var_28 ^ (((*(int32_t*)((char*)i + 0x10) << 0xc) ^ var_28) & 0x1000));
00528a9d                      CMotionInterp::DoInterpretedMotion(this, *(int32_t*)((char*)i + 4), &var_2c);
00528a6b                  }
00528a5b              }
00528a5b              else if (*(int32_t*)((char*)i + 0x10) == 0)
00528a6b                  goto label_528a70;
00528a54          }
00528a1b      }
00528a1b      
00528ab7      return 1;
005289c0  }

00528aba                                                                                90 90 90 90 90 90                            ......

00528ac0  void __fastcall CMotionInterp::HitGround(class CMotionInterp* this)

00528ac0  {
00528ac8      if (this->physics_obj != 0)
00528ac8      {
00528aca          class CWeenieObject* weenie_obj = this->weenie_obj;
00528acf          int32_t eax_2;
00528acf          
00528acf          if (weenie_obj != 0)
00528ad3              eax_2 = weenie_obj->vtable->IsCreature();
00528ad3          
00528ad8          if ((weenie_obj == 0 || eax_2 != 0))
00528ad8          {
00528ada              class CPhysicsObj* physics_obj = this->physics_obj;
00528ada              
00528aea              if ((physics_obj != 0 && (*(uint8_t*)((char*)((int16_t)physics_obj->state))[1] & 4) != 0))
00528aea              {
00528aec                  CPhysicsObj::RemoveLinkAnimations(physics_obj);
00528af7                  CMotionInterp::apply_current_movement(this, 0, 0);
00528aea              }
00528ad8          }
00528ac8      }
00528ac0  }

00528afe                                                                                            90 90                                ..

00528b00  void __fastcall CMotionInterp::LeaveGround(class CMotionInterp* this)

00528b00  {
00528b0b      if (this->physics_obj != 0)
00528b0b      {
00528b0d          class CWeenieObject* weenie_obj = this->weenie_obj;
00528b12          int32_t eax_2;
00528b12          
00528b12          if (weenie_obj != 0)
00528b16              eax_2 = weenie_obj->vtable->IsCreature();
00528b16          
00528b1b          if ((weenie_obj == 0 || eax_2 != 0))
00528b1b          {
00528b1d              class CPhysicsObj* physics_obj = this->physics_obj;
00528b1d              
00528b2d              if ((physics_obj != 0 && (*(uint8_t*)((char*)((int16_t)physics_obj->state))[1] & 4) != 0))
00528b2d              {
00528b36                  void var_c;
00528b36                  CMotionInterp::get_leave_ground_velocity(this, &var_c);
00528b45                  CPhysicsObj::set_local_velocity(this->physics_obj, &var_c, 1);
00528b4a                  class CPhysicsObj* physics_obj_1 = this->physics_obj;
00528b4d                  this->standing_longjump = 0;
00528b54                  this->jump_extent = 0f;
00528b5b                  CPhysicsObj::RemoveLinkAnimations(physics_obj_1);
00528b66                  CMotionInterp::apply_current_movement(this, 0, 0);
00528b2d              }
00528b1b          }
00528b0b      }
00528b00  }


00528b70  void __thiscall CMotionInterp::set_hold_run(class CMotionInterp* this, int32_t arg2, int32_t arg3)

00528b70  {
00528b79      int32_t eax;
00528b79      eax = arg2 == 0;
00528b85      int32_t edx;
00528b85      edx = this->raw_state.current_holdkey != HoldKey_Run;
00528b85      
00528b8a      if (eax != edx)
00528b8a      {
00528b94          int32_t eax_1;
00528b94          eax_1 = arg2 != 0;
00528b9b          this->raw_state.current_holdkey = (eax_1 + 1);
00528b9e          CMotionInterp::apply_current_movement(this, arg3, 0);
00528b8a      }
00528b70  }

00528ba8                          90 90 90 90 90 90 90 90                                                          ........

00528bb0  void __thiscall CMotionInterp::SetHoldKey(class CMotionInterp* this, enum HoldKey arg2, int32_t arg3)

00528bb0  {
00528bb0      enum HoldKey current_holdkey = this->raw_state.current_holdkey;
00528bb0      
00528bb9      if (arg2 != current_holdkey)
00528bb9      {
00528bbc          if (arg2 == HoldKey_None)
00528bbc          {
00528bdf              if (current_holdkey == HoldKey_Run)
00528bdf              {
00528be8                  this->raw_state.current_holdkey = HoldKey_None;
00528bef                  CMotionInterp::apply_current_movement(this, arg3, 0);
00528bdf              }
00528bbc          }
00528bbc          else if ((arg2 == 2 && current_holdkey != HoldKey_Run))
00528bc4          {
00528bcd              this->raw_state.current_holdkey = HoldKey_Run;
00528bd4              CMotionInterp::apply_current_movement(this, arg3, 0);
00528bc4          }
00528bb9      }
00528bb0  }

00528bf7                                                                       90 90 90 90 90 90 90 90 90                         .........

00528c00  class CMotionInterp* CMotionInterp::Create(class CPhysicsObj* arg1, class CWeenieObject* arg2)

00528c00  {
00528c07      void* result = operator new(0x88);
00528c07      
00528c15      if (result == 0)
00528c70          return 0;
00528c70      
00528c1a      *(uint32_t*)result = 0;
00528c1c      *(uint32_t*)((char*)result + 4) = 0;
00528c1f      *(uint32_t*)((char*)result + 8) = 0;
00528c22      RawMotionState::RawMotionState(((char*)result + 0xc));
00528c2a      InterpretedMotionState::InterpretedMotionState(((char*)result + 0x44));
00528c34      *(uint32_t*)((char*)result + 0x6c) = 0x3f800000;
00528c37      *(uint32_t*)((char*)result + 0x7c) = 0x3f800000;
00528c3e      *(uint32_t*)((char*)result + 0x70) = 0;
00528c41      *(uint32_t*)((char*)result + 0x74) = 0;
00528c44      *(uint32_t*)((char*)result + 0x78) = 0;
00528c4a      *(uint32_t*)((char*)result + 0x80) = 0;
00528c50      *(uint32_t*)((char*)result + 0x84) = 0;
00528c56      CMotionInterp::SetWeenieObject(result, arg2);
00528c62      CMotionInterp::SetPhysicsObject(result, arg1);
00528c6b      return result;
00528c00  }

00528c71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00528c80  void __fastcall CMotionInterp::enter_default_state(class CMotionInterp* this)

00528c80  {
00528c93      void var_38;
00528c93      RawMotionState::operator=(&this->raw_state, RawMotionState::RawMotionState(&var_38));
00528c9c      RawMotionState::~RawMotionState(&var_38);
00528cae      InterpretedMotionState::operator=(&this->interpreted_state, InterpretedMotionState::InterpretedMotionState(&var_38));
00528cb7      InterpretedMotionState::~InterpretedMotionState(&var_38);
00528cbf      CPhysicsObj::InitializeMotionTables(this->physics_obj);
00528cc6      void* eax_2 = operator new(0x10);
00528cc6      
00528cd2      if (eax_2 == 0)
00528ce5          eax_2 = nullptr;
00528cd2      else
00528cd2      {
00528cd4          *(uint32_t*)eax_2 = 0;
00528cd6          *(uint32_t*)((char*)eax_2 + 4) = 0;
00528cd9          *(uint32_t*)((char*)eax_2 + 8) = 0x41000003;
00528ce0          *(uint32_t*)((char*)eax_2 + 0xc) = 0;
00528cd2      }
00528cd2      
00528ce7      void** tail_ = this->pending_motions.tail_;
00528ce7      
00528cef      if (tail_ == 0)
00528cf5          this->pending_motions.head_ = eax_2;
00528cef      else
00528cf1          *(uint32_t*)tail_ = eax_2;
00528cf1      
00528cfb      this->pending_motions.tail_ = eax_2;
00528d03      this->initted = 1;
00528d09      CMotionInterp::LeaveGround(this);
00528c80  }

00528d13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00528d20  uint32_t __thiscall CMotionInterp::DoMotion(class CMotionInterp* this, uint32_t arg2, class MovementParameters const* arg3)

00528d20  {
00528d26      class CPhysicsObj* physics_obj = this->physics_obj;
00528d26      
00528d2b      if (physics_obj == 0)
00528d36          return 8;
00528d36      
00528d3a      uint32_t ebp = arg2;
00528d46      union __inner0 = arg3->__inner0;
00528d4b      float distance_to_object = arg3->distance_to_object;
00528d52      float min_distance = arg3->min_distance;
00528d59      float desired_heading = arg3->desired_heading;
00528d60      float speed = arg3->speed;
00528d67      float fail_distance = arg3->fail_distance;
00528d6e      float walk_run_threshhold = arg3->walk_run_threshhold;
00528d75      uint32_t context_id = arg3->context_id;
00528d7c      enum HoldKey hold_key_to_apply = arg3->hold_key_to_apply;
00528d80      uint32_t action_stamp = arg3->action_stamp;
00528d83      arg2 = ebp;
00528d87      int32_t var_2c = 0x7c83f8;
00528d8f      union __inner0_2 = __inner0;
00528d93      uint32_t action_stamp_1 = action_stamp;
00528d93      
00528d97      if (*(uint8_t*)((char*)__inner0 + 1) < 0)
00528d99          CPhysicsObj::interrupt_current_movement(physics_obj);
00528d99      
00528d9e      union __inner0_1 = arg3->__inner0;
00528d9e      
00528da4      if ((*(uint8_t*)((char*)__inner0_1 + 1) & 8) != 0)
00528db3          CMotionInterp::SetHoldKey(this, arg3->hold_key_to_apply, ((__inner0_1 >> 0xf) & 1));
00528db3      
00528dc8      CMotionInterp::adjust_motion(this, &arg2, &speed, arg3->hold_key_to_apply);
00528dc8      
00528dd4      if (this->interpreted_state.current_style != 0x8000003d)
00528dd4      {
00528ddd          if (ebp == 0x41000012)
00528e22              return 0x3f;
00528e22          
00528de0          if (ebp == 0x41000013)
00528e14              return 0x40;
00528e14          
00528de3          if (ebp == 0x41000014)
00528e06              return 0x41;
00528e06          
00528deb          if ((ebp & 0x2000000) != 0)
00528df8              return 0x42;
00528dd4      }
00528dd4      
00528e2b      if (((ebp & 0x10000000) != 0 && InterpretedMotionState::GetNumActions(&this->interpreted_state) >= 6))
00528e45          return 0x45;
00528e45      
00528e55      uint32_t result = CMotionInterp::DoInterpretedMotion(this, arg2, &var_2c);
00528e55      
00528e66      if ((result == 0 && (*(uint8_t*)((char*)((int16_t)arg3->__inner0))[1] & 0x20) != 0))
00528e6d          RawMotionState::ApplyMotion(&this->raw_state, ebp, arg3);
00528e6d      
00528e7b      return result;
00528d20  }

00528e7e                                                                                            90 90                                ..

00528e80  uint32_t __thiscall CMotionInterp::PerformMovement(class CMotionInterp* this, class MovementStruct const* arg2)

00528e80  {
00528e89      int32_t ecx_1 = (arg2->type - 1);
00528e89      
00528e8e      if (ecx_1 > 4)
00528f3a          return 0x47;
00528f3a      
00528e94      switch (ecx_1)
00528e94      {
00528ea5          case 0:
00528ea5          {
00528ea5              uint32_t eax = CMotionInterp::DoMotion(this, arg2->motion, arg2->params);
00528eaf              CPhysicsObj::CheckForCompletedMotions(this->physics_obj);
00528eb8              return eax;
00528ea5              break;
00528ea5          }
00528ec5          case 1:
00528ec5          {
00528ec5              uint32_t eax_2 = CMotionInterp::DoInterpretedMotion(this, arg2->motion, arg2->params);
00528ecf              CPhysicsObj::CheckForCompletedMotions(this->physics_obj);
00528ed8              return eax_2;
00528ec5              break;
00528ec5          }
00528ee5          case 2:
00528ee5          {
00528ee5              uint32_t eax_4 = CMotionInterp::StopMotion(this, arg2->motion, arg2->params);
00528eef              CPhysicsObj::CheckForCompletedMotions(this->physics_obj);
00528ef8              return eax_4;
00528ee5              break;
00528ee5          }
00528f05          case 3:
00528f05          {
00528f05              uint32_t eax_6 = CMotionInterp::StopInterpretedMotion(this, arg2->motion, arg2->params);
00528f0f              CPhysicsObj::CheckForCompletedMotions(this->physics_obj);
00528f18              return eax_6;
00528f05              break;
00528f05          }
00528f1d          case 4:
00528f1d          {
00528f1d              CMotionInterp::StopCompletely(this);
00528f27              CPhysicsObj::CheckForCompletedMotions(this->physics_obj);
00528f30              return 0;
00528f1d              break;
00528f1d          }
00528e94      }
00528e80  }

00528f3d                                                                                         8d 49 00                               .I.
00528f40  uint32_t jump_table_528f40[0x5] = 
00528f40  {
00528f40      [0x0] =  0x00528e9b
00528f44      [0x1] =  0x00528ebb
00528f48      [0x2] =  0x00528edb
00528f4c      [0x3] =  0x00528efb
00528f50      [0x4] =  0x00528f1b
00528f54  }

00528f54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00528f60  int32_t heading_greater(float arg1, float arg2, uint32_t arg3) __pure

00528f60  {
00528f68      long double x87_r7_1 = fabsl((((long double)arg1) - ((long double)arg2)));
00528f6a      long double temp0 = ((long double)180.0);
00528f6a      (x87_r7_1 - temp0);
00528f75      bool c0_1;
00528f75      bool c2_1;
00528f75      bool c3_1;
00528f75      
00528f75      if ((*(uint8_t*)((char*)((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00528f75      {
00528f81          long double x87_r7_3 = ((long double)arg1);
00528f85          long double temp1_1 = ((long double)arg2);
00528f85          (x87_r7_3 - temp1_1);
00528f85          c0_1 = x87_r7_3 < temp1_1;
00528f85          c2_1 = (FCMP_UO(x87_r7_3, temp1_1));
00528f85          c3_1 = x87_r7_3 == temp1_1;
00528f75      }
00528f75      else
00528f75      {
00528f77          long double x87_r7_2 = ((long double)arg2);
00528f7b          long double temp2_1 = ((long double)arg1);
00528f7b          (x87_r7_2 - temp2_1);
00528f7b          c0_1 = x87_r7_2 < temp2_1;
00528f7b          c2_1 = (FCMP_UO(x87_r7_2, temp2_1));
00528f7b          c3_1 = x87_r7_2 == temp2_1;
00528f75      }
00528f75      
00528f8e      int32_t eax_1;
00528f8e      
00528f8e      if ((*(uint8_t*)((char*)((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00528f97          eax_1 = 0;
00528f8e      else
00528f90          eax_1 = 1;
00528f90      
00528fa1      if (arg3 == 0x6500000d)
00528fac          return eax_1;
00528fac      
00528fa7      int32_t ecx_1;
00528fa7      ecx_1 = eax_1 == 0;
00528faa      return ecx_1;
00528f60  }

00528fad                                         90 90 90                                                               ...

00528fb0  int32_t heading_diff(float arg1, float arg2, uint32_t arg3)

00528fb0  {
00528fb4      long double x87_r7 = (((long double)arg1) - ((long double)arg2));
00528fba      long double x87_r6_1 = fabsl(x87_r7);
00528fbc      long double x87_r5 = ((long double)0.000199999995f);
00528fc2      (x87_r5 - x87_r6_1);
00528fc2      
00528fc9      if ((*(uint8_t*)((char*)((((x87_r5 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r6_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00528fcd          x87_r7 = ((long double)0f);
00528fcd      
00528fdd      (x87_r7 - -(((long double)0.000199999995f)));
00528fe1      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00528fe1      
00528fe4      if (!(p))
00528fe6          x87_r7 = (x87_r7 + ((long double)360f));
00528fe6      
00528fec      long double temp0 = ((long double)0.000199999995f);
00528fec      (x87_r7 - temp0);
00529009      return ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
00528fb0  }

0052900a                                90 90 90 90 90 90                                                            ......

00529010  uint32_t __thiscall MoveToManager::_DoMotion(class MoveToManager* this, uint32_t arg2, class MovementParameters* arg3)

00529010  {
00529013      class CPhysicsObj* physics_obj = this->physics_obj;
00529013      
0052901b      if (physics_obj == 0)
00529023          return 8;
00529023      
0052902d      if (CPhysicsObj::get_minterp(physics_obj) == 0)
00529035          return 0xb;
00529035      
00529057      CMotionInterp::adjust_motion(CPhysicsObj::get_minterp(this->physics_obj), &arg2, &arg3->speed, arg3->hold_key_to_apply);
00529076      return CMotionInterp::DoInterpretedMotion(CPhysicsObj::get_minterp(this->physics_obj), arg2, arg3);
00529010  }

00529079                                                                             90 90 90 90 90 90 90                           .......

00529080  uint32_t __thiscall MoveToManager::_StopMotion(class MoveToManager* this, uint32_t arg2, class MovementParameters* arg3)

00529080  {
00529083      class CPhysicsObj* physics_obj = this->physics_obj;
00529083      
0052908b      if (physics_obj == 0)
00529093          return 8;
00529093      
0052909d      if (CPhysicsObj::get_minterp(physics_obj) == 0)
005290a5          return 0xb;
005290a5      
005290c7      CMotionInterp::adjust_motion(CPhysicsObj::get_minterp(this->physics_obj), &arg2, &arg3->speed, arg3->hold_key_to_apply);
005290e6      return CMotionInterp::StopInterpretedMotion(CPhysicsObj::get_minterp(this->physics_obj), arg2, arg3);
00529080  }

005290e9                             90 90 90 90 90 90 90                                                           .......

005290f0  int32_t __thiscall MoveToManager::CheckProgressMade(class MoveToManager* this, float arg2)

005290f0  {
005290f7      long double x87_r7 = (((long double)Timer::cur_time) - ((long double)this->previous_distance_time));
00529102      long double temp1 = ((long double)1f);
00529102      (x87_r7 - temp1);
00529102      
0052910d      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0052910d      {
00529113          int32_t moving_away = this->moving_away;
0052911b          long double x87_r6_2;
0052911b          
0052911b          if (moving_away == 0)
0052912f              x87_r6_2 = (((long double)this->previous_distance) - ((long double)arg2));
0052911b          else
00529121              x87_r6_2 = (((long double)arg2) - ((long double)this->previous_distance));
00529121          
00529135          ((x87_r6_2 / x87_r7) - ((long double)0.25f));
0052913f          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00529142          bool p_2;
00529142          
00529142          if (p_1)
00529142          {
0052914a              this->previous_distance = arg2;
0052915c              *(uint32_t*)((char*)this->previous_distance_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00529162              this->previous_distance_time = (*(uint32_t*)Timer::cur_time);
00529175              long double x87_r6_6;
00529175              
00529175              if (moving_away == 0)
00529189                  x87_r6_6 = (((long double)this->original_distance) - ((long double)arg2));
00529175              else
0052917b                  x87_r6_6 = (((long double)arg2) - ((long double)this->original_distance));
0052917b              
0052918d              long double x87_r6_8 = (x87_r6_6 / (((long double)Timer::cur_time) - ((long double)this->original_distance_time)));
0052918f              long double temp3_1 = ((long double)0.25f);
0052918f              (x87_r6_8 - temp3_1);
00529195              int32_t eax_2;
00529195              eax_2 = ((((x87_r6_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r6_8 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00529199              p_2 = /* p_2 = unimplemented  {test ah, 0x5} */;
00529142          }
00529142          
0052919c          if ((!(p_1) || !(p_2)))
005291a1              return 0;
0052910d      }
0052910d      
005291a9      return 1;
005290f0  }

005291ac                                      90 90 90 90                                                              ....

005291b0  void __fastcall MoveToManager::GetCurrentDistance(class MoveToManager const* this)

005291b0  {
005291b3      class CPhysicsObj* physics_obj = this->physics_obj;
005291b3      
005291bb      if (physics_obj == 0)
005291c4          return;
005291c4      
005291ce      if ((*(uint8_t*)((char*)((int16_t)this->movement_params.__inner0))[1] & 4) == 0)
005291ce      {
0052920f          class AC1Legacy::Vector3* eax_3;
0052920f          int80_t st0_1;
0052920f          eax_3 = Position::distance(&physics_obj->m_position, &this->current_target_position);
00529215          return;
005291ce      }
005291ce      
005291d0      float sought_object_height = this->sought_object_height;
005291da      float sought_object_radius = this->sought_object_radius;
005291eb      int32_t var_18 = CPhysicsObj::GetHeight(physics_obj);
005291fa      int32_t var_1c = CPhysicsObj::GetRadius(this->physics_obj);
005291fe      class AC1Legacy::Vector3* eax_2;
005291fe      int80_t st0;
005291fe      long double x87_r0;
005291fe      long double x87_r1;
005291fe      eax_2 = Position::cylinder_distance(((float)x87_r1), ((float)x87_r0), &physics_obj->m_position, sought_object_radius, sought_object_height, &this->current_target_position);
005291b0  }

00529216                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00529220  int32_t __fastcall MoveToManager::is_moving_to(class MoveToManager const* this)

00529220  {
00529226      int32_t result;
00529226      result = this->movement_type != Invalid;
00529229      return result;
00529220  }

0052922a                                90 90 90 90 90 90                                                            ......

00529230  void __thiscall MoveToManager::SetWeenieObject(class MoveToManager* this, class CWeenieObject* arg2)

00529230  {
00529234      this->weenie_obj = arg2;
00529230  }

0052923d                                                                                         90 90 90                               ...

00529240  void __thiscall MoveToManager::SetPhysicsObject(class MoveToManager* this, class CPhysicsObj* arg2)

00529240  {
00529244      this->physics_obj = arg2;
00529240  }

0052924d                                         90 90 90                                                               ...

00529250  void __fastcall MoveToManager::InitializeLocalVariables(class MoveToManager* this)

00529250  {
00529259      this->movement_type = 0;
0052925b      this->movement_params.__inner0 = 0;
00529261      this->movement_params.context_id = 0;
0052926c      this->previous_distance = 3.40282347e+38f;
0052927e      this->previous_distance_time = (*(uint32_t*)Timer::cur_time);
00529284      *(uint32_t*)((char*)this->previous_distance_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0052928a      this->original_distance = 3.40282347e+38f;
0052929b      *(uint32_t*)((char*)this->original_distance_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005292a5      this->original_distance_time = (*(uint32_t*)Timer::cur_time);
005292ab      this->previous_heading = 0f;
005292b1      this->fail_progress_count = 0;
005292b7      this->current_command = 0;
005292bd      this->aux_command = 0;
005292c3      this->moving_away = 0;
005292c9      this->initialized = 0;
005292cf      int32_t var_48 = 0x796910;
005292db      int32_t var_40 = 0x3f800000;
005292e3      int32_t var_3c = 0;
005292e7      int32_t var_38 = 0;
005292eb      int32_t var_34 = 0;
005292ef      int32_t var_c = 0;
005292f3      int32_t var_8 = 0;
005292f7      int32_t var_4 = 0;
005292fb      Frame::cache(&var_40);
0052930c      this->sought_position.objcell_id = 0;
0052930f      Frame::operator=(&this->sought_position.frame, &var_40);
00529318      int32_t var_48_1 = 0x796910;
00529324      var_40 = 0x3f800000;
0052932c      int32_t var_3c_1 = 0;
00529330      int32_t var_38_1 = 0;
00529334      int32_t var_34_1 = 0;
00529338      int32_t var_c_1 = 0;
0052933c      int32_t var_8_1 = 0;
00529340      int32_t var_4_1 = 0;
00529344      Frame::cache(&var_40);
00529351      this->current_target_position.objcell_id = 0;
00529358      Frame::operator=(&this->current_target_position.frame, &var_40);
0052935d      this->sought_object_id = 0;
00529363      this->top_level_object_id = 0;
00529369      this->sought_object_radius = 0f;
0052936f      this->sought_object_height = 0f;
00529250  }

0052937b                                                                                   90 90 90 90 90                             .....

00529380  void __fastcall MoveToManager::RemovePendingActionsHead(class MoveToManager* this)

00529380  {
00529387      class DLListData* head_ = this->pending_actions.head_;
00529387      
0052938b      if (head_ != 0)
0052938b      {
0052938e          DLListBase::Remove(&this->pending_actions, head_);
0052938e          
00529395          if (head_ != 0)
00529398              operator delete(head_);
0052938b      }
00529380  }

005293a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005293b0  void __fastcall MoveToManager::MoveToManager(class MoveToManager* this)

005293b0  {
005293b6      this->sought_position.vtable = 0x796910;
005293c0      this->sought_position.objcell_id = 0;
005293b3      this->sought_position.frame.qw = 0x3f800000;
005293b3      this->sought_position.frame.qx = 0f;
005293b3      this->sought_position.frame.qy = 0f;
005293b3      this->sought_position.frame.qz = 0f;
005293b3      this->sought_position.frame.m_fOrigin.x = 0;
005293b3      this->sought_position.frame.m_fOrigin.y = 0f;
005293b3      this->sought_position.frame.m_fOrigin.z = 0f;
005293db      Frame::cache(&this->sought_position.frame);
005293e3      this->current_target_position.vtable = 0x796910;
005293ea      this->current_target_position.objcell_id = 0;
005293e0      this->current_target_position.frame.qw = 0x3f800000;
005293e0      this->current_target_position.frame.qx = 0f;
005293e0      this->current_target_position.frame.qy = 0f;
005293e0      this->current_target_position.frame.qz = 0f;
005293e0      this->current_target_position.frame.m_fOrigin.x = 0;
005293e0      this->current_target_position.frame.m_fOrigin.y = 0f;
005293e0      this->current_target_position.frame.m_fOrigin.z = 0f;
00529405      Frame::cache(&this->current_target_position.frame);
00529410      this->starting_position.vtable = 0x796910;
0052941a      this->starting_position.objcell_id = 0;
0052940a      this->starting_position.frame.qw = 0x3f800000;
0052940a      this->starting_position.frame.qx = 0f;
0052940a      this->starting_position.frame.qy = 0f;
0052940a      this->starting_position.frame.qz = 0f;
0052940a      this->starting_position.frame.m_fOrigin.x = 0;
0052940a      this->starting_position.frame.m_fOrigin.y = 0f;
0052940a      this->starting_position.frame.m_fOrigin.z = 0f;
00529438      Frame::cache(&this->starting_position.frame);
00529443      MovementParameters::MovementParameters(&this->movement_params);
00529448      this->pending_actions.head_ = 0;
0052944e      this->pending_actions.tail_ = nullptr;
00529456      this->physics_obj = nullptr;
0052945c      this->weenie_obj = nullptr;
00529462      MoveToManager::InitializeLocalVariables(this);
005293b0  }

0052946c                                      90 90 90 90                                                              ....

00529470  class MoveToManager* MoveToManager::Create(class CPhysicsObj* arg1, class CWeenieObject* arg2)

00529470  {
00529475      void* eax = operator new(0x160);
00529475      
0052947f      if (eax == 0)
005294a3          return 0;
005294a3      
00529483      void* result = MoveToManager::MoveToManager(eax);
00529483      
0052948a      if (result != 0)
0052948a      {
00529494          *(uint32_t*)((char*)result + 0x154) = arg1;
0052949a          *(uint32_t*)((char*)result + 0x158) = arg2;
0052948a      }
0052948a      
005294a0      return result;
00529470  }

005294a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005294b0  void __fastcall MoveToManager::Destroy(class MoveToManager* this)

005294b0  {
005294be      while (this->pending_actions.head_ != 0)
005294be      {
005294c0          class DLListData* head_ = this->pending_actions.head_;
005294c0          
005294c8          if (head_ != 0)
005294c8          {
005294ca              class DLListData* dllist_prev = head_->dllist_prev;
005294ca              
005294cf              if (dllist_prev == 0)
005294cf              {
005294d7                  class DLListData* dllist_next = head_->dllist_next;
005294db                  this->pending_actions.head_ = dllist_next;
005294db                  
005294e1                  if (dllist_next != 0)
005294e3                      dllist_next->dllist_prev = nullptr;
005294cf              }
005294cf              else
005294d3                  dllist_prev->dllist_next = head_->dllist_next;
005294d3              
005294e6              class DLListData* dllist_next_1 = head_->dllist_next;
005294e6              
005294ea              if (dllist_next_1 == 0)
005294ea              {
005294fa                  class DLListData* dllist_prev_1 = this->pending_actions.tail_->dllist_prev;
005294ff                  this->pending_actions.tail_ = dllist_prev_1;
005294ff                  
00529505                  if (dllist_prev_1 != 0)
00529507                      dllist_prev_1->dllist_next = 0;
005294ea              }
005294ea              else
005294ef                  dllist_next_1->dllist_prev = head_->dllist_prev;
005294ef              
0052950b              head_->dllist_next = 0;
0052950d              head_->dllist_prev = nullptr;
0052950d              
00529510              if (head_ != 0)
00529513                  operator delete(head_);
005294c8          }
005294be      }
005294be      
00529527      /* tailcall */
00529527      return MoveToManager::InitializeLocalVariables(this);
005294b0  }

0052952c                                      90 90 90 90                                                              ....

00529530  void __thiscall MoveToManager::AddTurnToHeadingNode(class MoveToManager* this, float arg2)

00529530  {
00529535      void* eax = operator new(0x10);
00529535      
00529541      if (eax == 0)
00529550          eax = nullptr;
00529541      else
00529541      {
00529543          *(uint32_t*)eax = 0;
00529545          *(uint32_t*)((char*)eax + 4) = 0;
00529548          *(uint32_t*)((char*)eax + 8) = 0;
0052954b          *(uint32_t*)((char*)eax + 0xc) = 0;
00529541      }
00529541      
00529556      *(uint32_t*)((char*)eax + 0xc) = arg2;
0052955f      *(uint32_t*)((char*)eax + 8) = 9;
0052956b      DLListBase::InsertAfter(&this->pending_actions, eax, this->pending_actions.tail_);
00529530  }

00529574                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00529580  void __fastcall MoveToManager::AddMoveToPositionNode(class MoveToManager* this)

00529580  {
00529585      void* eax = operator new(0x10);
00529585      
00529591      if (eax == 0)
005295a0          eax = nullptr;
00529591      else
00529591      {
00529593          *(uint32_t*)eax = 0;
00529595          *(uint32_t*)((char*)eax + 4) = 0;
00529598          *(uint32_t*)((char*)eax + 8) = 0;
0052959b          *(uint32_t*)((char*)eax + 0xc) = 0;
00529591      }
00529591      
005295a8      *(uint32_t*)((char*)eax + 8) = 7;
005295b4      DLListBase::InsertAfter(&this->pending_actions, eax, this->pending_actions.tail_);
00529580  }

005295bb                                                                                   90 90 90 90 90                             .....

005295c0  void __fastcall MoveToManager::CleanUp(class MoveToManager* this)

005295c0  {
005295ca      void var_2c;
005295ca      MovementParameters::MovementParameters(&var_2c);
005295d9      enum HoldKey hold_key_to_apply = this->movement_params.hold_key_to_apply;
005295eb      int32_t var_28;
005295eb      int32_t var_28_1 = (var_28 & 0xffff7fff);
005295eb      
005295ef      if (this->physics_obj != 0)
005295ef      {
005295f1          uint32_t current_command = this->current_command;
005295f1          
005295f9          if (current_command != 0)
00529603              MoveToManager::_StopMotion(this, current_command, &var_2c);
00529603          
00529608          uint32_t aux_command = this->aux_command;
00529608          
00529610          if (aux_command != 0)
0052961a              MoveToManager::_StopMotion(this, aux_command, &var_2c);
0052961a          
0052962c          if ((this->top_level_object_id != 0 && this->movement_type != Invalid))
00529634              CPhysicsObj::clear_target(this->physics_obj);
005295ef      }
005295ef      
0052963b      MoveToManager::InitializeLocalVariables(this);
005295c0  }

00529645                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00529650  void __fastcall MoveToManager::CleanUpAndCallWeenie(class MoveToManager* this, uint32_t arg2)

00529650  {
00529653      int32_t edx = MoveToManager::CleanUp(this);
00529658      class CPhysicsObj* physics_obj = this->physics_obj;
00529658      
00529661      if (physics_obj == 0)
00529670          return;
00529670      
00529663      arg2 = 0;
0052966b      /* tailcall */
0052966b      return CPhysicsObj::StopCompletely(physics_obj, edx);
00529650  }

00529673                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00529680  void __thiscall MoveToManager::MoveToObject(class MoveToManager* this, uint32_t arg2, uint32_t arg3, float arg4, float arg5, class MovementParameters const* arg6)

00529680  {
00529686      class CPhysicsObj* physics_obj_1 = this->physics_obj;
0052968e      int32_t edx;
0052968e      
0052968e      if (physics_obj_1 != 0)
0052968e      {
005296ca          int32_t var_50_1 = 0;
005296cc          CPhysicsObj::StopCompletely(physics_obj_1, edx);
005296d1          class CPhysicsObj* physics_obj = this->physics_obj;
005296e0          this->starting_position.objcell_id = physics_obj->m_position.objcell_id;
005296ed          Frame::operator=(&this->starting_position.frame, &physics_obj->m_position.frame);
005296fe          this->sought_object_id = arg2;
00529708          this->sought_object_radius = arg4;
00529712          this->sought_object_height = arg5;
00529718          this->movement_type = 6;
0052971e          this->top_level_object_id = arg3;
00529727          this->movement_params.__inner0 = arg6->__inner0;
00529730          this->movement_params.distance_to_object = arg6->distance_to_object;
00529739          this->movement_params.min_distance = arg6->min_distance;
00529742          this->movement_params.desired_heading = arg6->desired_heading;
0052974b          this->movement_params.speed = arg6->speed;
00529754          this->movement_params.fail_distance = arg6->fail_distance;
0052975d          this->movement_params.walk_run_threshhold = arg6->walk_run_threshhold;
00529766          this->movement_params.context_id = arg6->context_id;
0052976f          this->movement_params.hold_key_to_apply = arg6->hold_key_to_apply;
00529778          this->movement_params.action_stamp = arg6->action_stamp;
0052977e          class CPhysicsObj* physics_obj_2 = this->physics_obj;
00529784          this->initialized = 0;
00529784          
00529791          if (arg3 == physics_obj_2->id)
00529791          {
00529795              edx = MoveToManager::CleanUp(this);
00529795              goto label_52979a;
00529791          }
00529791          
005297b8          int32_t var_50_4 = 0;
005297c4          CPhysicsObj::set_target(physics_obj_2, 0, this->top_level_object_id, 0.5f, 0f);
0052968e      }
0052968e      else
0052968e      {
00529690          class CPhysicsObj* physics_obj_4 = physics_obj_1;
00529694          class CPhysicsObj* physics_obj_5 = physics_obj_1;
00529698          class CPhysicsObj* physics_obj_6 = physics_obj_1;
0052969c          class CPhysicsObj* physics_obj_7 = physics_obj_1;
005296a0          class CPhysicsObj* physics_obj_8 = physics_obj_1;
005296a4          class CPhysicsObj* physics_obj_9 = physics_obj_1;
005296a8          class CPhysicsObj* physics_obj_10 = physics_obj_1;
005296b0          int32_t var_48_1 = 0x796910;
005296b8          int32_t var_40 = 0x3f800000;
005296c0          Frame::cache(&var_40);
0052979a      label_52979a:
0052979a          class CPhysicsObj* physics_obj_3 = this->physics_obj;
0052979a          
005297a2          if (physics_obj_3 != 0)
005297a2          {
005297a4              int32_t var_50_3 = 0;
005297a6              CPhysicsObj::StopCompletely(physics_obj_3, edx);
005297a2          }
0052968e      }
00529680  }


005297d0  void __thiscall MoveToManager::TurnToObject(class MoveToManager* this, uint32_t arg2, uint32_t arg3, class MovementParameters const* arg4)

005297d0  {
005297d6      class CPhysicsObj* physics_obj = this->physics_obj;
005297de      int32_t edx;
005297de      
005297de      if (physics_obj != 0)
005297de      {
0052984c          if ((*(uint8_t*)((char*)arg4->__inner0 + 2) & 1) != 0)
0052984c          {
0052984e              int32_t var_54_1 = 0;
00529850              CPhysicsObj::StopCompletely(physics_obj, edx);
0052984c          }
0052984c          
00529859          this->movement_type = 8;
0052985f          this->sought_object_id = arg2;
0052986c          Frame::set_heading(&this->current_target_position.frame, arg4->desired_heading);
00529875          this->top_level_object_id = arg3;
0052987e          this->movement_params.__inner0 = arg4->__inner0;
00529887          this->movement_params.distance_to_object = arg4->distance_to_object;
00529890          this->movement_params.min_distance = arg4->min_distance;
00529899          this->movement_params.desired_heading = arg4->desired_heading;
005298a2          this->movement_params.speed = arg4->speed;
005298ab          this->movement_params.fail_distance = arg4->fail_distance;
005298b4          this->movement_params.walk_run_threshhold = arg4->walk_run_threshhold;
005298bd          this->movement_params.context_id = arg4->context_id;
005298c6          this->movement_params.hold_key_to_apply = arg4->hold_key_to_apply;
005298cf          this->movement_params.action_stamp = arg4->action_stamp;
005298d5          class CPhysicsObj* physics_obj_1 = this->physics_obj;
005298d5          
005298df          if (arg3 == physics_obj_1->id)
005298df          {
005298e3              edx = MoveToManager::CleanUp(this);
005298e3              goto label_5298e8;
005298df          }
005298df          
00529900          int32_t __saved_edi_2 = 0;
0052990c          this->initialized = 0;
00529916          CPhysicsObj::set_target(physics_obj_1, 0, arg3, 0.5f, 0f);
005297de      }
005297de      else
005297de      {
005297e7          this->movement_params.context_id = arg4->context_id;
005297f1          int32_t var_48_1 = 0x796910;
005297f9          int32_t var_44_1 = 0;
00529801          int32_t var_40 = 0x3f800000;
00529809          int32_t var_3c_1 = 0;
00529811          int32_t var_38_1 = 0;
00529819          int32_t var_34_1 = 0;
00529821          int32_t var_c_1 = 0;
00529829          int32_t var_8_1 = 0;
00529831          int32_t var_4_1 = 0;
00529839          Frame::cache(&var_40);
005298e8      label_5298e8:
005298e8          class CPhysicsObj* physics_obj_2 = this->physics_obj;
005298e8          
005298f0          if (physics_obj_2 != 0)
005298f0          {
005298f2              int32_t __saved_edi_1 = 0;
005298f4              CPhysicsObj::StopCompletely(physics_obj_2, edx);
005298f0          }
005297de      }
005297d0  }

00529922        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00529930  void __fastcall MoveToManager::CancelMoveTo(class MoveToManager* this, uint32_t arg2)

00529930  {
0052993a      if (this->movement_type != Invalid)
0052993a      {
00529946          while (this->pending_actions.head_ != 0)
00529946          {
00529950              class DLListData* head_ = this->pending_actions.head_;
00529950              
00529958              if (head_ != 0)
00529958              {
0052995a                  class DLListData* dllist_prev = head_->dllist_prev;
0052995a                  
0052995f                  if (dllist_prev == 0)
0052995f                  {
00529967                      class DLListData* dllist_next = head_->dllist_next;
0052996b                      this->pending_actions.head_ = dllist_next;
0052996b                      
00529971                      if (dllist_next != 0)
00529973                          dllist_next->dllist_prev = nullptr;
0052995f                  }
0052995f                  else
00529963                      dllist_prev->dllist_next = head_->dllist_next;
00529963                  
00529976                  class DLListData* dllist_next_1 = head_->dllist_next;
00529976                  
0052997a                  if (dllist_next_1 == 0)
0052997a                  {
0052998a                      class DLListData* dllist_prev_1 = this->pending_actions.tail_->dllist_prev;
0052998f                      this->pending_actions.tail_ = dllist_prev_1;
0052998f                      
00529995                      if (dllist_prev_1 != 0)
00529997                          dllist_prev_1->dllist_next = 0;
0052997a                  }
0052997a                  else
0052997f                      dllist_next_1->dllist_prev = head_->dllist_prev;
0052997f                  
0052999b                  head_->dllist_next = 0;
0052999d                  head_->dllist_prev = nullptr;
0052999d                  
005299a0                  if (head_ != 0)
005299a3                      operator delete(head_);
00529958              }
00529946          }
00529946          
005299b5          int32_t edx_3 = MoveToManager::CleanUp(this);
005299ba          class CPhysicsObj* physics_obj = this->physics_obj;
005299ba          
005299c2          if (physics_obj != 0)
005299c2          {
005299c4              int32_t var_c_2 = 0;
005299c5              CPhysicsObj::StopCompletely(physics_obj, edx_3);
005299c2          }
0052993a      }
00529930  }

0052994a                                8d 9b 00 00 00 00                                                            ......
005299cf                                               90                                                                 .

005299d0  void __fastcall MoveToManager::~MoveToManager(class MoveToManager* this)

005299d0  {
005299d3      MoveToManager::Destroy(this);
005299dd      this->movement_params.vtable = 0x79285c;
005299e3      this->starting_position.vtable = 0x79285c;
005299e9      this->current_target_position.vtable = 0x79285c;
005299ec      this->sought_position.vtable = 0x79285c;
005299d0  }

005299f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00529a00  void __fastcall MoveToManager::BeginMoveForward(class MoveToManager* this)

00529a00  {
00529a0e      if (this->physics_obj == 0)
00529a0e      {
00529a10          int32_t __saved_edi = 8;
00529a12          uint32_t edx;
00529a12          MoveToManager::CancelMoveTo(this, edx);
00529a1b          return;
00529a0e      }
00529a0e      
00529a1d      MoveToManager::GetCurrentDistance(this);
00529a22      long double x87_r0;
00529a22      float var_3c = ((float)x87_r0);
00529a26      class CPhysicsObj* physics_obj = this->physics_obj;
00529a2f      CPhysicsObj::get_heading(physics_obj);
00529a3e      Position::heading(&physics_obj->m_position, &this->current_target_position);
00529a43      long double x87_r1;
00529a43      long double x87_r2;
00529a43      long double x87_r2_1 = (x87_r2 - ((long double)((float)x87_r1)));
00529a47      float var_40_1 = ((float)x87_r2_1);
00529a4b      long double x87_r2_2 = fabsl(x87_r2_1);
00529a4d      long double x87_r1_1 = ((long double)0.000199999995f);
00529a53      (x87_r1_1 - x87_r2_2);
00529a53      
00529a5a      if ((*(uint8_t*)((char*)((((x87_r1_1 < x87_r2_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_1, x87_r2_2))) ? 1 : 0) << 0xa) | ((((x87_r1_1 == x87_r2_2) ? 1 : 0) << 0xe) | 0x1800)))))[1] & 0x41) == 0)
00529a5c          var_40_1 = 0f;
00529a5c      
00529a6a      long double x87_r2_4 = -(((long double)0.000199999995f));
00529a6c      long double temp0 = ((long double)var_40_1);
00529a6c      (x87_r2_4 - temp0);
00529a6c      
00529a75      if ((*(uint8_t*)((char*)((((x87_r2_4 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_4, temp0))) ? 1 : 0) << 0xa) | ((((x87_r2_4 == temp0) ? 1 : 0) << 0xe) | 0x1800)))))[1] & 0x41) == 0)
00529a81          var_40_1 = ((float)(((long double)var_40_1) + ((long double)360f)));
00529a81      
00529aa4      uint32_t var_38;
00529aa4      enum HoldKey var_34;
00529aa4      int32_t var_30;
00529aa4      MovementParameters::get_command(&this->movement_params, var_3c, var_40_1, &var_38, &var_34, &var_30);
00529aa9      uint32_t edi_1 = var_38;
00529aa9      
00529aaf      if (edi_1 == 0)
00529aaf      {
00529ab1          class DLListData* head_ = this->pending_actions.head_;
00529ab1          
00529abf          if (head_ != 0)
00529abf          {
00529ac2              DLListBase::Remove(&this->pending_actions, head_);
00529ac2              
00529ac9              if (head_ != 0)
00529acc                  operator delete(head_);
00529abf          }
00529abf          
00529ad6          MoveToManager::BeginNextNode(this);
00529ae0          return;
00529aaf      }
00529aaf      
00529ae5      void var_2c;
00529ae5      MovementParameters::MovementParameters(&var_2c);
00529af4      enum HoldKey var_8 = var_34;
00529b07      int32_t var_28;
00529b07      int32_t var_28_1 = (var_28 & 0xffff7fff);
00529b0e      float speed = this->movement_params.speed;
00529b12      uint32_t eax_4;
00529b12      uint32_t edx_2;
00529b12      eax_4 = MoveToManager::_DoMotion(this, edi_1, &var_2c);
00529b12      
00529b19      if (eax_4 != 0)
00529b19      {
00529b1b          uint32_t var_4c_5 = eax_4;
00529b1e          MoveToManager::CancelMoveTo(this, edx_2);
00529b28          return;
00529b19      }
00529b19      
00529b2d      int32_t ecx_11 = var_30;
00529b31      enum HoldKey edx_3 = var_34;
00529b35      this->current_command = var_38;
00529b3f      this->moving_away = ecx_11;
00529b45      this->movement_params.hold_key_to_apply = edx_3;
00529b4b      this->previous_distance = var_3c;
00529b5d      this->previous_distance_time = (*(uint32_t*)Timer::cur_time);
00529b63      *(uint32_t*)((char*)this->previous_distance_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00529b69      this->original_distance = var_3c;
00529b7c      this->original_distance_time = (*(uint32_t*)Timer::cur_time);
00529b82      *(uint32_t*)((char*)this->original_distance_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00529a00  }

00529b8d                                         90 90 90                                                               ...

00529b90  void __fastcall MoveToManager::BeginTurnToHeading(class MoveToManager* this)

00529b90  {
00529b97      class DLListData* head_ = this->pending_actions.head_;
00529b9f      class CPhysicsObj* physics_obj;
00529b9f      
00529b9f      if (head_ != 0)
00529ba5          physics_obj = this->physics_obj;
00529ba5      
00529bad      if ((head_ == 0 || physics_obj == 0))
00529bad      {
00529ca1          int32_t var_3c_3 = 8;
00529ca5          uint32_t edx;
00529ca5          MoveToManager::CancelMoveTo(this, edx);
00529ca5          return;
00529bad      }
00529bad      
00529bba      if (CPhysicsObj::motions_pending(physics_obj) == 0)
00529bba      {
00529bc0          float eax_2 = *(int32_t*)((char*)head_ + 0xc);
00529bd7          int32_t var_40 = CPhysicsObj::get_heading(this->physics_obj);
00529be0          long double x87_r0;
00529be0          long double st0 = heading_diff(eax_2, ((float)x87_r0), 0x6500000d);
00529be5          (st0 - ((long double)180f));
00529bee          /* unimplemented  {fst dword [esp+0x8], st0} */;
00529bf4          bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00529bf7          uint32_t edi;
00529bf7          
00529bf7          if (p)
00529bf7          {
00529c19              ((((long double)0.000199999995f) + st0) - ((long double)360f));
00529c23              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00529c23              
00529c26              if (p_1)
00529c26              {
00529c8f              label_529c8f:
00529c8f                  MoveToManager::RemovePendingActionsHead(this);
00529c96                  MoveToManager::BeginNextNode(this);
00529ca0                  return;
00529c26              }
00529c26              
00529c28              edi = 0x6500000e;
00529bf7          }
00529bf7          else
00529bf7          {
00529bf9              long double temp2_1 = ((long double)0.000199999995f);
00529bf9              (st0 - temp2_1);
00529bf9              
00529c04              if ((*(uint8_t*)((char*)((((st0 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp2_1))) ? 1 : 0) << 0xa) | ((((st0 == temp2_1) ? 1 : 0) << 0xe) | 0x800)))))[1] & 0x41) != 0)
00529c04                  goto label_529c8f;
00529c04              
00529c0a              edi = 0x6500000d;
00529bf7          }
00529bf7          
00529c31          void var_2c;
00529c31          MovementParameters::MovementParameters(&var_2c);
00529c4c          int32_t var_28;
00529c4c          int32_t var_28_1 = (var_28 & 0xffff7fff);
00529c58          float speed = this->movement_params.speed;
00529c5c          enum HoldKey hold_key_to_apply = this->movement_params.hold_key_to_apply;
00529c60          uint32_t eax_5;
00529c60          uint32_t edx_2;
00529c60          eax_5 = MoveToManager::_DoMotion(this, edi, &var_2c);
00529c60          
00529c67          if (eax_5 != 0)
00529c67          {
00529c69              uint32_t var_3c_2 = eax_5;
00529c6c              MoveToManager::CancelMoveTo(this, edx_2);
00529c76              return;
00529c67          }
00529c67          
00529c7b          this->current_command = edi;
00529c82          this->previous_heading = ((float)st0);
00529bba      }
00529b90  }


00529cb0  void __fastcall MoveToManager::BeginNextNode(class MoveToManager* this)

00529cb0  {
00529cb6      class DLListData* head_ = this->pending_actions.head_;
00529cb6      
00529cbe      if (head_ != 0)
00529cbe      {
00529cc0          int32_t eax = *(int32_t*)((char*)head_ + 8);
00529cc0          
00529cc6          if (eax == 7)
00529ce0              /* tailcall */
00529ce0              return MoveToManager::BeginMoveForward(this);
00529ce0          
00529ccb          if (eax == 9)
00529cd5              /* tailcall */
00529cd5              return MoveToManager::BeginTurnToHeading(this);
00529cd5          
00529ccb          return;
00529cbe      }
00529cbe      
00529ce5      head_ = *(uint8_t*)((char*)this->movement_params.__inner0 + 0);
00529ce5      
00529ced      if (head_ < 0)
00529ced      {
00529cef          float sought_object_height = this->sought_object_height;
00529cf5          float sought_object_radius = this->sought_object_radius;
00529d00          uint32_t top_level_object_id = this->top_level_object_id;
00529d0c          int32_t edx_3 = MoveToManager::CleanUp(this);
00529d11          class CPhysicsObj* physics_obj = this->physics_obj;
00529d11          
00529d19          if (physics_obj != 0)
00529d19          {
00529d1b              int32_t var_14_1 = 0;
00529d1d              CPhysicsObj::StopCompletely(physics_obj, edx_3);
00529d19          }
00529d19          
00529d3a          PositionManager::StickTo(CPhysicsObj::get_position_manager(this->physics_obj), top_level_object_id, sought_object_radius, sought_object_height);
00529d44          return;
00529ced      }
00529ced      
00529d47      int32_t edx_5 = MoveToManager::CleanUp(this);
00529d4c      class CPhysicsObj* physics_obj_1 = this->physics_obj;
00529d4c      
00529d54      if (physics_obj_1 != 0)
00529d54      {
00529d56          int32_t __saved_edi_1 = 0;
00529d58          CPhysicsObj::StopCompletely(physics_obj_1, edx_5);
00529d54      }
00529cb0  }

00529d62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00529d70  void __fastcall MoveToManager::HitGround(class MoveToManager* this)

00529d70  {
00529d73      if (this->movement_type == Invalid)
00529d7a          return;
00529d7a      
00529d75      /* tailcall */
00529d75      return MoveToManager::BeginNextNode(this);
00529d70  }

00529d7b                                                                                   90 90 90 90 90                             .....

00529d80  void __fastcall MoveToManager::HandleMoveToPosition(class MoveToManager* this)

00529d80  {
00529d8a      class CPhysicsObj* physics_obj = this->physics_obj;
00529d8a      
00529d94      if (physics_obj == 0)
00529d94      {
00529d96          int32_t __saved_edi_1 = 8;
00529d98          uint32_t edx;
00529d98          MoveToManager::CancelMoveTo(this, edx);
00529da5          return;
00529d94      }
00529d94      
00529da6      int32_t var_48 = 0x796910;
00529db5      uint32_t objcell_id = physics_obj->m_position.objcell_id;
00529dbe      void var_40;
00529dbe      Frame::operator=(&var_40, &physics_obj->m_position.frame);
00529dc7      void var_80;
00529dc7      MovementParameters::MovementParameters(&var_80);
00529dde      float speed = this->movement_params.speed;
00529de2      int32_t var_7c;
00529de2      int32_t var_7c_1 = (var_7c & 0xffff7fff);
00529dea      enum HoldKey hold_key_to_apply = this->movement_params.hold_key_to_apply;
00529df5      int16_t top;
00529df5      uint32_t aux_command;
00529df5      
00529df5      if (CPhysicsObj::motions_pending(this->physics_obj) != 0)
00529df5      {
00529ef6          aux_command = this->aux_command;
00529ef6          
00529efe          if (aux_command != 0)
00529efe          {
00529f08              MoveToManager::_StopMotion(this, aux_command, &var_80);
00529f0d              this->aux_command = 0;
00529efe          }
00529df5      }
00529df5      else
00529df5      {
00529e03          Position::heading(&var_48, &this->current_target_position);
00529e25          long double x87_r0;
00529e25          long double x87_r0_2 = (MovementParameters::get_desired_heading(&this->movement_params, this->current_command, this->moving_away) + ((long double)((float)x87_r0)));
00529e29          float var_88_2 = ((float)x87_r0_2);
00529e2d          long double temp0_1 = ((long double)360f);
00529e2d          (x87_r0_2 - temp0_1);
00529e2d          
00529e38          if ((*(uint8_t*)((char*)((((x87_r0_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r0_2 == temp0_1) ? 1 : 0) << 0xe) | 0x800)))))[1] & 1) == 0)
00529e44              var_88_2 = ((float)(((long double)var_88_2) - ((long double)360f)));
00529e44          
00529e4e          CPhysicsObj::get_heading(this->physics_obj);
00529e53          long double x87_r1;
00529e53          long double x87_r1_1 = (((long double)var_88_2) - x87_r1);
00529e59          long double x87_r0_6 = fabsl(x87_r1_1);
00529e5b          long double x87_r7_1 = ((long double)0.000199999995f);
00529e61          (x87_r7_1 - x87_r0_6);
00529e61          
00529e68          if ((*(uint8_t*)((char*)((((x87_r7_1 < x87_r0_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, x87_r0_6))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == x87_r0_6) ? 1 : 0) << 0xe) | 0x800)))))[1] & 0x41) == 0)
00529e6c              x87_r1_1 = ((long double)0f);
00529e6c          
00529e7c          (x87_r1_1 - -(((long double)0.000199999995f)));
00529e80          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00529e80          
00529e83          if (!(p_1))
00529e85              x87_r1_1 = (x87_r1_1 + ((long double)360f));
00529e85          
00529e8b          long double temp3_1 = ((long double)20f);
00529e8b          (x87_r1_1 - temp3_1);
00529e96          bool p_2;
00529e96          
00529e96          if ((*(uint8_t*)((char*)((((x87_r1_1 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_1, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r1_1 == temp3_1) ? 1 : 0) << 0xe) | 0x800)))))[1] & 0x41) == 0)
00529e96          {
00529ea6              (x87_r1_1 - (((long double)360f) - ((long double)20f)));
00529eaa              p_2 = /* p_2 = unimplemented  {test ah, 0x5} */;
00529e96          }
00529e96          
00529ead          if (((*(uint8_t*)((char*)((((x87_r1_1 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_1, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r1_1 == temp3_1) ? 1 : 0) << 0xe) | 0x800)))))[1] & 0x41) != 0 || p_2))
00529ead          {
00529ee3              aux_command = this->aux_command;
00529ee9              top = 2;
00529ee9              
00529eed              if (aux_command != 0)
00529eed              {
00529f08                  MoveToManager::_StopMotion(this, aux_command, &var_80);
00529f0d                  this->aux_command = 0;
00529eed              }
00529ead          }
00529ead          else
00529ead          {
00529eaf              (x87_r1_1 - ((long double)180f));
00529eaf              top = 2;
00529eb5              uint32_t edi_1 = 0x6500000d;
00529ebc              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00529ebc              
00529ebf              if (p_3)
00529ec1                  edi_1 = 0x6500000e;
00529ec1              
00529ecc              if (edi_1 != this->aux_command)
00529ecc              {
00529ed6                  MoveToManager::_DoMotion(this, edi_1, &var_80);
00529edb                  this->aux_command = edi_1;
00529ecc              }
00529ead          }
00529df5      }
00529f15      MoveToManager::GetCurrentDistance(this);
00529f1a      float var_88_3 = ((float)/* float var_88_3 = fconvert.s(unimplemented  {fstp dword [esp+0xc], st0}) */);
00529f1a      /* unimplemented  {fstp dword [esp+0xc], st0} */;
00529f1a      int16_t top_1 = (top + 1);
00529f1a      
00529f2c      if (MoveToManager::CheckProgressMade(this, var_88_3) == 0)
00529f2c      {
0052a003          if ((CPhysicsObj::IsInterpolating(this->physics_obj) == 0 && CPhysicsObj::motions_pending(this->physics_obj) == 0))
0052a014              this->fail_progress_count += 1;
00529f2c      }
00529f2c      else
00529f2c      {
00529f38          /* unimplemented  {fld st0, dword [esp+0xc]} */;
00529f3c          bool cond:0_1 = this->moving_away == 0;
00529f3e          this->fail_progress_count = 0;
00529f44          int32_t eax_7;
00529f44          
00529f44          if (!(cond:0_1))
00529f44          {
00529f46              long double temp2_1 = ((long double)this->movement_params.min_distance);
00529f46              (/* unimplemented  {fcomp st0, dword [esi+0xe8]} f- temp2_1 */ - temp2_1);
00529f46              bool c0_7 = /* bool c0_7 = unimplemented  {fcomp st0, dword [esi+0xe8]} f< temp2_1 */ < temp2_1;
00529f46              bool c2_7 = (FCMP_UO(/* bool c2_7 = is_unordered.t(unimplemented  {fcomp st0, dword [esi+0xe8]}, temp2_1) */, temp2_1));
00529f46              bool c3_7 = /* bool c3_7 = unimplemented  {fcomp st0, dword [esi+0xe8]} f== temp2_1 */ == temp2_1;
00529f46              /* unimplemented  {fcomp st0, dword [esi+0xe8]} */;
00529f4c              eax_7 = ((((c0_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_7) ? 1 : 0) << 0xa) | ((((c3_7) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
00529f4c              
00529f51              if ((*(uint8_t*)((char*)eax_7)[1] & 1) == 0)
00529f51                  goto label_529f94;
00529f51              
00529f51              goto label_529f63;
00529f44          }
00529f44          
00529f87          long double temp1_1 = ((long double)this->movement_params.distance_to_object);
00529f87          (/* unimplemented  {fcomp st0, dword [esi+0xe4]} f- temp1_1 */ - temp1_1);
00529f87          bool c0_9 = /* bool c0_9 = unimplemented  {fcomp st0, dword [esi+0xe4]} f< temp1_1 */ < temp1_1;
00529f87          bool c2_9 = (FCMP_UO(/* bool c2_9 = is_unordered.t(unimplemented  {fcomp st0, dword [esi+0xe4]}, temp1_1) */, temp1_1));
00529f87          bool c3_9 = /* bool c3_9 = unimplemented  {fcomp st0, dword [esi+0xe4]} f== temp1_1 */ == temp1_1;
00529f87          /* unimplemented  {fcomp st0, dword [esi+0xe4]} */;
00529f8d          eax_7 = ((((c0_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_9) ? 1 : 0) << 0xa) | ((((c3_9) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
00529f8f          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
00529f8f          
00529f92          if (p_4)
00529f92          {
00529f63          label_529f63:
00529f63              uint32_t edx_4 = Position::distance(&this->starting_position, &this->physics_obj->m_position);
00529f63              /* unimplemented  {call Position::distance} */;
00529f68              long double temp4_1 = ((long double)this->movement_params.fail_distance);
00529f68              (/* unimplemented  {fcomp st0, dword [esi+0xf4]} f- temp4_1 */ - temp4_1);
00529f68              bool c0_8 = /* bool c0_8 = unimplemented  {fcomp st0, dword [esi+0xf4]} f< temp4_1 */ < temp4_1;
00529f68              bool c2_8 = (FCMP_UO(/* bool c2_8 = is_unordered.t(unimplemented  {fcomp st0, dword [esi+0xf4]}, temp4_1) */, temp4_1));
00529f68              bool c3_8 = /* bool c3_8 = unimplemented  {fcomp st0, dword [esi+0xf4]} f== temp4_1 */ == temp4_1;
00529f68              /* unimplemented  {fcomp st0, dword [esi+0xf4]} */;
00529f68              
00529f73              if ((*(uint8_t*)((char*)((((c0_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_8) ? 1 : 0) << 0xa) | ((((c3_8) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb))))))[1] & 0x41) == 0)
00529f73              {
00529f79                  int32_t var_98_7 = 0x3d;
00529f7d                  MoveToManager::CancelMoveTo(this, edx_4);
00529f73              }
00529f92          }
00529f92          else
00529f92          {
00529f94          label_529f94:
00529f94              class DLListData* head_ = this->pending_actions.head_;
00529f94              
00529fa2              if (head_ != 0)
00529fa2              {
00529fa5                  DLListBase::Remove(&this->pending_actions, head_);
00529fa5                  
00529fac                  if (head_ != 0)
00529faf                      operator delete(head_);
00529fa2              }
00529fa2              
00529fc5              MoveToManager::_StopMotion(this, this->current_command, &var_80);
00529fca              uint32_t aux_command_1 = this->aux_command;
00529fd2              this->current_command = 0;
00529fd2              
00529fd8              if (aux_command_1 != 0)
00529fd8              {
00529fe2                  MoveToManager::_StopMotion(this, aux_command_1, &var_80);
00529fe7                  this->aux_command = 0;
00529fd8              }
00529fd8              
00529fef              MoveToManager::BeginNextNode(this);
00529f92          }
00529f2c      }
00529f2c      
0052a029      if ((this->top_level_object_id != 0 && this->movement_type != Invalid))
0052a029      {
0052a03a          void __return;
0052a03a          CPhysicsObj::get_velocity(this->physics_obj, &__return);
0052a03f          /* unimplemented  {fld st0, dword [eax+0x8]} */;
0052a042          /* unimplemented  {fld st0, dword [eax+0x4]} */;
0052a045          /* unimplemented  {fld st0, dword [eax]} */;
0052a047          /* unimplemented  {fld st0, st0} */;
0052a049          /* unimplemented  {fmul st0, st1} */;
0052a04b          /* unimplemented  {fld st0, st2} */;
0052a04d          /* unimplemented  {fmul st0, st3} */;
0052a04f          /* unimplemented  {faddp st1, st0} */;
0052a04f          /* unimplemented  {faddp st1, st0} */;
0052a051          /* unimplemented  {fld st0, st3} */;
0052a053          /* unimplemented  {fmul st0, st4} */;
0052a055          /* unimplemented  {faddp st1, st0} */;
0052a055          /* unimplemented  {faddp st1, st0} */;
0052a057          /* unimplemented  {fsqrt } */;
0052a059          /* unimplemented  {fstp st3, st0} */;
0052a059          /* unimplemented  {fstp st3, st0} */;
0052a05b          /* unimplemented  {fstp st0, st0} */;
0052a05b          /* unimplemented  {fstp st0, st0} */;
0052a05d          /* unimplemented  {fstp st0, st0} */;
0052a05d          /* unimplemented  {fstp st0, st0} */;
0052a05f          long double temp5_1 = ((long double)0.10000000000000001);
0052a05f          (/* unimplemented  {fcom st0, qword [&data_7a6db0]} f- temp5_1 */ - temp5_1);
0052a05f          bool c0_10 = /* bool c0_10 = unimplemented  {fcom st0, qword [&data_7a6db0]} f< temp5_1 */ < temp5_1;
0052a05f          bool c2_10 = (FCMP_UO(/* bool c2_10 = is_unordered.t(unimplemented  {fcom st0, qword [&data_7a6db0]}, temp5_1) */, temp5_1));
0052a05f          bool c3_10 = /* bool c3_10 = unimplemented  {fcom st0, qword [&data_7a6db0]} f== temp5_1 */ == temp5_1;
0052a05f          
0052a06a          if ((*(uint8_t*)((char*)((((c0_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_10) ? 1 : 0) << 0xa) | ((((c3_10) ? 1 : 0) << 0xe) | (((top_1 - 1) & 7) << 0xb))))))[1] & 0x41) != 0)
0052a06a          {
0052a0b4              /* unimplemented  {fstp st0, st0} */;
0052a0b4              /* unimplemented  {fstp st0, st0} */;
0052a06a          }
0052a06a          else
0052a06a          {
0052a06c              /* unimplemented  {fld st0, dword [esp+0x8]} */;
0052a076              /* unimplemented  {fdiv st0, st1} */;
0052a078              var_88_3 = ((double)/* var_88_3.q = fconvert.d(unimplemented  {fstp qword [esp+0x8], st0}) */);
0052a078              /* unimplemented  {fstp qword [esp+0x8], st0} */;
0052a07c              /* unimplemented  {fstp st0, st0} */;
0052a07c              /* unimplemented  {fstp st0, st0} */;
0052a07e              CPhysicsObj::get_target_quantum(this->physics_obj);
0052a07e              /* unimplemented  {call CPhysicsObj::get_target_quantum} */;
0052a083              /* unimplemented  {fsubr st0, qword [esp+0x8]} */;
0052a087              /* unimplemented  {fabs } */;
0052a089              long double temp7_1 = ((long double)1.0);
0052a089              (/* unimplemented  {fcomp st0, qword [&data_7928c0]} f- temp7_1 */ - temp7_1);
0052a089              bool c0_11 = /* bool c0_11 = unimplemented  {fcomp st0, qword [&data_7928c0]} f< temp7_1 */ < temp7_1;
0052a089              bool c2_11 = (FCMP_UO(/* bool c2_11 = is_unordered.t(unimplemented  {fcomp st0, qword [&data_7928c0]}, temp7_1) */, temp7_1));
0052a089              bool c3_11 = /* bool c3_11 = unimplemented  {fcomp st0, qword [&data_7928c0]} f== temp7_1 */ == temp7_1;
0052a089              /* unimplemented  {fcomp st0, qword [&data_7928c0]} */;
0052a089              
0052a094              if ((*(uint8_t*)((char*)((((c0_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_11) ? 1 : 0) << 0xa) | ((((c3_11) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb))))))[1] & 0x41) == 0)
0052a094              {
0052a0a4                  int32_t __saved_edi_4;
0052a0a4                  int32_t __saved_edi_3 = __saved_edi_4;
0052a0a6                  CPhysicsObj::set_target_quantum(this->physics_obj, var_88_3);
0052a094              }
0052a06a          }
0052a029      }
00529d80  }

0052a0bf                                                                                               90                                 .

0052a0c0  void __fastcall MoveToManager::HandleTurnToHeading(class MoveToManager* this)

0052a0c0  {
0052a0c6      class CPhysicsObj* physics_obj = this->physics_obj;
0052a0c6      
0052a0ce      if (physics_obj == 0)
0052a0ce      {
0052a0d0          int32_t __saved_ebx = 8;
0052a0d4          uint32_t edx;
0052a0d4          MoveToManager::CancelMoveTo(this, edx);
0052a0dd          return;
0052a0ce      }
0052a0ce      
0052a0de      uint32_t current_command = this->current_command;
0052a0de      
0052a0f0      if ((current_command != 0x6500000e && current_command != 0x6500000d))
0052a0f0      {
0052a0f4          MoveToManager::BeginTurnToHeading(this);
0052a0fd          return;
0052a0f0      }
0052a0f0      
0052a0ff      class DLListData* head_ = this->pending_actions.head_;
0052a10d      CPhysicsObj::get_heading(physics_obj);
0052a112      long double x87_r0;
0052a112      float var_30 = ((float)x87_r0);
0052a116      uint32_t current_command_1 = this->current_command;
0052a116      
0052a130      if (heading_greater(var_30, *(int32_t*)((char*)head_ + 0xc), current_command_1) != 0)
0052a130      {
0052a132          class CPhysicsObj* physics_obj_1 = this->physics_obj;
0052a13a          this->fail_progress_count = 0;
0052a146          CPhysicsObj::set_heading(physics_obj_1, *(int32_t*)((char*)head_ + 0xc), 1);
0052a14b          class DLListData* head__1 = this->pending_actions.head_;
0052a14b          
0052a14f          if (head__1 != 0)
0052a14f          {
0052a154              DLListBase::Remove(&this->pending_actions, head__1);
0052a154              
0052a15b              if (head__1 != 0)
0052a15e                  operator delete(head__1);
0052a14f          }
0052a14f          
0052a16a          void var_2c;
0052a16a          MovementParameters::MovementParameters(&var_2c);
0052a18d          int32_t var_28;
0052a18d          int32_t var_28_1 = (var_28 & 0xffff7fff);
0052a191          enum HoldKey hold_key_to_apply = this->movement_params.hold_key_to_apply;
0052a195          MoveToManager::_StopMotion(this, this->current_command, &var_2c);
0052a19c          this->current_command = 0;
0052a1a2          MoveToManager::BeginNextNode(this);
0052a1ae          return;
0052a130      }
0052a130      
0052a1bc      long double st0 = heading_diff(var_30, this->previous_heading, current_command_1);
0052a1c1      (st0 - ((long double)180f));
0052a1cc      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0052a1cc      
0052a1cf      if (!(p))
0052a1cf      {
0052a1d1          long double temp1_1 = ((long double)0.000199999995f);
0052a1d1          (st0 - temp1_1);
0052a1d1          
0052a1dc          if ((*(uint8_t*)((char*)((((st0 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp1_1))) ? 1 : 0) << 0xa) | ((((st0 == temp1_1) ? 1 : 0) << 0xe) | 0x800)))))[1] & 0x41) == 0)
0052a1dc          {
0052a1e5              this->fail_progress_count = 0;
0052a1ef              this->previous_heading = var_30;
0052a1f9              return;
0052a1dc          }
0052a1cf      }
0052a1cf      
0052a200      class CPhysicsObj* physics_obj_2 = this->physics_obj;
0052a206      this->previous_heading = var_30;
0052a206      
0052a213      if ((CPhysicsObj::IsInterpolating(physics_obj_2) == 0 && CPhysicsObj::motions_pending(this->physics_obj) == 0))
0052a224          this->fail_progress_count += 1;
0052a0c0  }

0052a232                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0052a240  void __thiscall MoveToManager::MoveToPosition(class MoveToManager* this, class Position const* arg2, class MovementParameters const* arg3)

0052a240  {
0052a246      class CPhysicsObj* physics_obj_1 = this->physics_obj;
0052a246      
0052a24e      if (physics_obj_1 != 0)
0052a24e      {
0052a257          int32_t var_24_1 = 0;
0052a259          int32_t edx;
0052a259          CPhysicsObj::StopCompletely(physics_obj_1, edx);
0052a25e          class Position* ebx_1 = arg2;
0052a26c          this->current_target_position.objcell_id = ebx_1->objcell_id;
0052a26f          Frame::operator=(&this->current_target_position.frame, &ebx_1->frame);
0052a276          this->sought_object_radius = 0f;
0052a280          MoveToManager::GetCurrentDistance(this);
0052a289          class CPhysicsObj* physics_obj_2 = this->physics_obj;
0052a292          CPhysicsObj::get_heading(physics_obj_2);
0052a29e          Position::heading(&physics_obj_2->m_position, ebx_1);
0052a2a3          long double x87_r1;
0052a2a3          long double x87_r2;
0052a2a3          long double x87_r2_1 = (x87_r2 - ((long double)((float)x87_r1)));
0052a2a7          arg2 = ((float)x87_r2_1);
0052a2ab          long double x87_r2_2 = fabsl(x87_r2_1);
0052a2ad          long double x87_r1_1 = ((long double)0.000199999995f);
0052a2b3          (x87_r1_1 - x87_r2_2);
0052a2b3          
0052a2ba          if ((*(uint8_t*)((char*)((((x87_r1_1 < x87_r2_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_1, x87_r2_2))) ? 1 : 0) << 0xa) | ((((x87_r1_1 == x87_r2_2) ? 1 : 0) << 0xe) | 0x1800)))))[1] & 0x41) == 0)
0052a2bc              arg2 = nullptr;
0052a2bc          
0052a2ca          long double x87_r2_4 = -(((long double)0.000199999995f));
0052a2cc          long double temp1_1 = ((long double)arg2);
0052a2cc          (x87_r2_4 - temp1_1);
0052a2cc          
0052a2d5          if ((*(uint8_t*)((char*)((((x87_r2_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r2_4 == temp1_1) ? 1 : 0) << 0xe) | 0x1800)))))[1] & 0x41) == 0)
0052a2e1              arg2 = ((float)(((long double)arg2) + ((long double)360f)));
0052a2e1          
0052a304          uint32_t var_c;
0052a304          void var_8;
0052a304          void var_4;
0052a304          long double x87_r0;
0052a304          MovementParameters::get_command(arg3, ((float)x87_r0), arg2, &var_c, &var_4, &var_8);
0052a304          
0052a30f          if (var_c != 0)
0052a30f          {
0052a31b              Position::heading(&this->physics_obj->m_position, ebx_1);
0052a32b              long double x87_r3;
0052a32b              MoveToManager::AddTurnToHeadingNode(this, ((float)x87_r3));
0052a332              MoveToManager::AddMoveToPositionNode(this);
0052a30f          }
0052a30f          
0052a33b          if ((*(uint8_t*)((char*)arg3->__inner0 + 0) & 0x40) != 0)
0052a343              MoveToManager::AddTurnToHeadingNode(this, arg3->desired_heading);
0052a343          
0052a34f          this->sought_position.objcell_id = ebx_1->objcell_id;
0052a352          Frame::operator=(&this->sought_position.frame, &ebx_1->frame);
0052a357          class CPhysicsObj* physics_obj = this->physics_obj;
0052a366          this->starting_position.objcell_id = physics_obj->m_position.objcell_id;
0052a373          Frame::operator=(&this->starting_position.frame, &physics_obj->m_position.frame);
0052a378          this->movement_type = 7;
0052a381          this->movement_params.__inner0 = arg3->__inner0;
0052a38a          this->movement_params.distance_to_object = arg3->distance_to_object;
0052a393          this->movement_params.min_distance = arg3->min_distance;
0052a39c          this->movement_params.desired_heading = arg3->desired_heading;
0052a3a5          this->movement_params.speed = arg3->speed;
0052a3ae          this->movement_params.fail_distance = arg3->fail_distance;
0052a3b7          this->movement_params.walk_run_threshhold = arg3->walk_run_threshhold;
0052a3c0          this->movement_params.context_id = arg3->context_id;
0052a3c9          this->movement_params.hold_key_to_apply = arg3->hold_key_to_apply;
0052a3d2          this->movement_params.action_stamp = arg3->action_stamp;
0052a3e5          this->movement_params.__inner0 &= 0xffffff7f;
0052a3eb          MoveToManager::BeginNextNode(this);
0052a24e      }
0052a240  }

0052a3fa                                                                                90 90 90 90 90 90                            ......

0052a400  void __thiscall MoveToManager::MoveToObject_Internal(class MoveToManager* this, class Position const* arg2, class Position const* arg3)

0052a400  {
0052a40e      if (this->physics_obj == 0)
0052a40e      {
0052a410          int32_t __saved_edi = 8;
0052a412          uint32_t edx;
0052a412          MoveToManager::CancelMoveTo(this, edx);
0052a41b          return;
0052a40e      }
0052a40e      
0052a42d      this->sought_position.objcell_id = arg3->objcell_id;
0052a430      Frame::operator=(&this->sought_position.frame, &arg3->frame);
0052a443      this->current_target_position.objcell_id = arg2->objcell_id;
0052a446      Frame::operator=(&this->current_target_position.frame, &arg2->frame);
0052a455      Position::heading(&this->physics_obj->m_position, arg3);
0052a45a      long double x87_r0;
0052a45a      arg2 = ((float)x87_r0);
0052a460      MoveToManager::GetCurrentDistance(this);
0052a46f      CPhysicsObj::get_heading(this->physics_obj);
0052a474      long double x87_r2;
0052a474      long double x87_r2_1 = (((long double)arg2) - x87_r2);
0052a479      arg3 = ((float)x87_r2_1);
0052a47d      long double x87_r2_2 = fabsl(x87_r2_1);
0052a47f      long double x87_r1_1 = ((long double)0.000199999995f);
0052a485      (x87_r1_1 - x87_r2_2);
0052a485      
0052a48c      if ((*(uint8_t*)((char*)((((x87_r1_1 < x87_r2_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_1, x87_r2_2))) ? 1 : 0) << 0xa) | ((((x87_r1_1 == x87_r2_2) ? 1 : 0) << 0xe) | 0x1800)))))[1] & 0x41) == 0)
0052a48e          arg3 = nullptr;
0052a48e      
0052a49c      long double x87_r2_4 = -(((long double)0.000199999995f));
0052a49e      long double temp1 = ((long double)arg3);
0052a49e      (x87_r2_4 - temp1);
0052a49e      
0052a4a7      if ((*(uint8_t*)((char*)((((x87_r2_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r2_4 == temp1) ? 1 : 0) << 0xe) | 0x1800)))))[1] & 0x41) == 0)
0052a4b3          arg3 = ((float)(((long double)arg3) + ((long double)360f)));
0052a4b3      
0052a4d6      uint32_t var_c;
0052a4d6      void var_8;
0052a4d6      void var_4;
0052a4d6      long double x87_r1;
0052a4d6      MovementParameters::get_command(&this->movement_params, ((float)x87_r1), arg3, &var_c, &var_4, &var_8);
0052a4d6      
0052a4e1      if (var_c != 0)
0052a4e1      {
0052a4ea          MoveToManager::AddTurnToHeadingNode(this, arg2);
0052a4f1          MoveToManager::AddMoveToPositionNode(this);
0052a4e1      }
0052a4e1      
0052a4fd      if ((*(uint8_t*)((char*)this->movement_params.__inner0 + 0) & 0x40) != 0)
0052a4fd      {
0052a503          long double x87_r2_8 = (((long double)arg2) + ((long double)this->movement_params.desired_heading));
0052a509          arg3 = ((float)x87_r2_8);
0052a50d          long double temp2_1 = ((long double)360f);
0052a50d          (x87_r2_8 - temp2_1);
0052a513          uint32_t eax_6;
0052a513          eax_6 = ((((x87_r2_8 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_8, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r2_8 == temp2_1) ? 1 : 0) << 0xe) | 0x1800))));
0052a513          
0052a518          if ((*(uint8_t*)((char*)eax_6)[1] & 1) == 0)
0052a524              arg3 = ((float)(((long double)arg3) - ((long double)360f)));
0052a524          
0052a52f          MoveToManager::AddTurnToHeadingNode(this, arg3);
0052a4fd      }
0052a4fd      
0052a536      this->initialized = 1;
0052a540      MoveToManager::BeginNextNode(this);
0052a400  }

0052a54c                                      90 90 90 90                                                              ....

0052a550  void __thiscall MoveToManager::TurnToObject_Internal(class MoveToManager* this, class Position const* arg2)

0052a550  {
0052a55b      if (this->physics_obj == 0)
0052a55b      {
0052a55d          int32_t __saved_ebx = 8;
0052a55f          uint32_t edx;
0052a55f          MoveToManager::CancelMoveTo(this, edx);
0052a565          return;
0052a55b      }
0052a55b      
0052a571      this->current_target_position.objcell_id = arg2->objcell_id;
0052a57e      Frame::operator=(&this->current_target_position.frame, &arg2->frame);
0052a58d      arg2 = ((float)Frame::get_heading(&this->sought_position.frame));
0052a59b      Position::heading(&this->physics_obj->m_position, &this->current_target_position);
0052a5aa      j__CIfmod();
0052a5af      arg2 = ((float)((long double)360.0));
0052a5ba      Frame::set_heading(&this->sought_position.frame, arg2);
0052a5c1      void* eax_3 = operator new(0x10);
0052a5c1      
0052a5cd      if (eax_3 == 0)
0052a5ec          eax_3 = nullptr;
0052a5cd      else
0052a5cd      {
0052a5cf          *(uint32_t*)eax_3 = 0;
0052a5d5          *(uint32_t*)((char*)eax_3 + 4) = 0;
0052a5dc          *(uint32_t*)((char*)eax_3 + 8) = 0;
0052a5e3          *(uint32_t*)((char*)eax_3 + 0xc) = 0;
0052a5cd      }
0052a5cd      
0052a5f2      *(uint32_t*)((char*)eax_3 + 0xc) = arg2;
0052a5fb      *(uint32_t*)((char*)eax_3 + 8) = 9;
0052a607      DLListBase::InsertAfter(&this->pending_actions, eax_3, this->pending_actions.tail_);
0052a60e      this->initialized = 1;
0052a618      MoveToManager::BeginNextNode(this);
0052a550  }

0052a621     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0052a630  void __thiscall MoveToManager::TurnToHeading(class MoveToManager* this, class MovementParameters const* arg2)

0052a630  {
0052a637      class CPhysicsObj* physics_obj = this->physics_obj;
0052a641      int32_t edx;
0052a641      
0052a641      if (physics_obj != 0)
0052a641      {
0052a6aa          if ((*(uint8_t*)((char*)arg2->__inner0 + 2) & 1) != 0)
0052a6aa          {
0052a6ac              int32_t var_58_1 = 0;
0052a6ad              CPhysicsObj::StopCompletely(physics_obj, edx);
0052a6aa          }
0052a6aa          
0052a6b5          this->movement_params.__inner0 = arg2->__inner0;
0052a6be          this->movement_params.distance_to_object = arg2->distance_to_object;
0052a6c7          this->movement_params.min_distance = arg2->min_distance;
0052a6d0          this->movement_params.desired_heading = arg2->desired_heading;
0052a6d9          this->movement_params.speed = arg2->speed;
0052a6e2          this->movement_params.fail_distance = arg2->fail_distance;
0052a6eb          this->movement_params.walk_run_threshhold = arg2->walk_run_threshhold;
0052a6f4          this->movement_params.context_id = arg2->context_id;
0052a6fd          this->movement_params.hold_key_to_apply = arg2->hold_key_to_apply;
0052a706          this->movement_params.action_stamp = arg2->action_stamp;
0052a70c          this->movement_params.__inner0 &= 0xffffff7f;
0052a71d          Frame::set_heading(&this->sought_position.frame, arg2->desired_heading);
0052a722          this->movement_type = 9;
0052a72d          arg2 = arg2->desired_heading;
0052a731          class DLListData* eax_5 = operator new(0x10);
0052a731          
0052a73c          if (eax_5 == 0)
0052a74b              eax_5 = nullptr;
0052a73c          else
0052a73c          {
0052a73e              eax_5->dllist_next = 0;
0052a740              eax_5->dllist_prev = nullptr;
0052a743              *(int32_t*)((char*)eax_5 + 8) = 0;
0052a746              *(int32_t*)((char*)eax_5 + 0xc) = 0;
0052a73c          }
0052a73c          
0052a757          *(int32_t*)((char*)eax_5 + 8) = 9;
0052a75e          *(int32_t*)((char*)eax_5 + 0xc) = arg2;
0052a766          DLListBase::InsertAfter(&this->pending_actions, eax_5, this->pending_actions.tail_);
0052a76d          MoveToManager::BeginNextNode(this);
0052a641      }
0052a641      else
0052a641      {
0052a64a          this->movement_params.context_id = arg2->context_id;
0052a654          int32_t var_48_1 = 0x796910;
0052a65c          int32_t var_44_1 = 0;
0052a660          int32_t var_40 = 0x3f800000;
0052a668          int32_t var_3c_1 = 0;
0052a66c          int32_t var_38_1 = 0;
0052a670          int32_t var_34_1 = 0;
0052a674          int32_t var_c_1 = 0;
0052a678          int32_t var_8_1 = 0;
0052a67c          int32_t var_4_1 = 0;
0052a680          Frame::cache(&var_40);
0052a685          class CPhysicsObj* physics_obj_1 = this->physics_obj;
0052a685          
0052a68d          if (physics_obj_1 != 0)
0052a68d          {
0052a693              int32_t __saved_edi_1 = 0;
0052a694              CPhysicsObj::StopCompletely(physics_obj_1, edx);
0052a68d          }
0052a641      }
0052a630  }

0052a77a                                                                                90 90 90 90 90 90                            ......

0052a780  void __fastcall MoveToManager::UseTime(class MoveToManager* this)

0052a780  {
0052a780      class CPhysicsObj* physics_obj = this->physics_obj;
0052a780      
0052a791      if ((physics_obj != 0 && (physics_obj->transient_state & 1) != 0))
0052a791      {
0052a793          class DLListData* head_ = this->pending_actions.head_;
0052a793          
0052a7b4          if ((head_ != 0 && ((this->top_level_object_id == 0 || this->movement_type == Invalid) || this->initialized != 0)))
0052a7b4          {
0052a7b6              int32_t eax = *(int32_t*)((char*)head_ + 8);
0052a7b6              
0052a7bc              if (eax == 7)
0052a7c8                  /* tailcall */
0052a7c8                  return MoveToManager::HandleMoveToPosition(this);
0052a7c8              
0052a7c1              if (eax == 9)
0052a7c3                  /* tailcall */
0052a7c3                  return MoveToManager::HandleTurnToHeading(this);
0052a7b4          }
0052a791      }
0052a780  }

0052a7ce                                            90 90                                                                ..

0052a7d0  void __thiscall MoveToManager::HandleUpdateTarget(class MoveToManager* this, class TargetInfo const* arg2)

0052a7d0  {
0052a7d3      class CPhysicsObj* physics_obj = this->physics_obj;
0052a7d3      
0052a7db      if (physics_obj == 0)
0052a7db      {
0052a7dd          int32_t __saved_edi = 8;
0052a7df          uint32_t edx;
0052a7df          MoveToManager::CancelMoveTo(this, edx);
0052a7e5          return;
0052a7db      }
0052a7db      
0052a7e8      uint32_t top_level_object_id = this->top_level_object_id;
0052a7e8      
0052a7f6      if (top_level_object_id == arg2->object_id)
0052a7f6      {
0052a7fc          int32_t initialized = this->initialized;
0052a7fc          
0052a804          if (initialized == 0)
0052a804          {
0052a886              if (top_level_object_id == physics_obj->id)
0052a886              {
0052a88f                  Position::operator=(&this->sought_position, &physics_obj->m_position);
0052a8a6                  int32_t var_c_6 = 0;
0052a8aa                  MoveToManager::CleanUpAndCallWeenie(this, Position::operator=(&this->current_target_position, &this->physics_obj->m_position));
0052a8b1                  return;
0052a886              }
0052a886              
0052a8bb              if (arg2->status != Ok_TargetStatus)
0052a8bb              {
0052a8bd                  int32_t var_c_7 = 0x38;
0052a8c1                  MoveToManager::CancelMoveTo(this, initialized);
0052a8c8                  return;
0052a8bb              }
0052a8bb              
0052a8cb              enum MovementTypes::Type movement_type = this->movement_type;
0052a8cb              
0052a8d0              if (movement_type == MoveToObject)
0052a8f1                  MoveToManager::MoveToObject_Internal(this, &arg2->target_position, &arg2->interpolated_position);
0052a8d0              else if (movement_type == 8)
0052a8dd                  MoveToManager::TurnToObject_Internal(this, &arg2->target_position);
0052a804          }
0052a804          else
0052a804          {
0052a80d              if (arg2->status != Ok_TargetStatus)
0052a80d              {
0052a80f                  int32_t var_c_1 = 0x37;
0052a813                  MoveToManager::CancelMoveTo(this, initialized);
0052a81a                  return;
0052a80d              }
0052a80d              
0052a820              if (this->movement_type == MoveToObject)
0052a820              {
0052a82d                  Position::operator=(&this->sought_position, &arg2->interpolated_position);
0052a839                  Position::operator=(&this->current_target_position, &arg2->target_position);
0052a843                  this->previous_distance = 3.40282347e+38f;
0052a855                  this->previous_distance_time = (*(uint32_t*)Timer::cur_time);
0052a85b                  *(uint32_t*)((char*)this->previous_distance_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0052a861                  this->original_distance = 3.40282347e+38f;
0052a873                  this->original_distance_time = (*(uint32_t*)Timer::cur_time);
0052a879                  *(uint32_t*)((char*)this->original_distance_time)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0052a820              }
0052a804          }
0052a7f6      }
0052a7d0  }

0052a8fb                                                                                   90 90 90 90 90                             .....

0052a900  uint32_t __thiscall MoveToManager::PerformMovement(class MoveToManager* this, class MovementStruct const* arg2)

0052a900  {
0052a901      int32_t var_8 = 0x36;
0052a905      uint32_t edx;
0052a905      MoveToManager::CancelMoveTo(this, edx);
0052a910      CPhysicsObj::unstick_from_object(this->physics_obj);
0052a910      
0052a923      switch ((arg2->type - 6))
0052a923      {
0052a940          case 0:
0052a940          {
0052a940              MoveToManager::MoveToObject(this, arg2->object_id, arg2->top_level_id, arg2->radius, arg2->height, arg2->params);
0052a940              break;
0052a940          }
0052a955          case 1:
0052a955          {
0052a955              MoveToManager::MoveToPosition(this, &arg2->pos, arg2->params);
0052a955              break;
0052a955          }
0052a96e          case 2:
0052a96e          {
0052a96e              MoveToManager::TurnToObject(this, arg2->object_id, arg2->top_level_id, arg2->params);
0052a96e              break;
0052a96e          }
0052a97f          case 3:
0052a97f          {
0052a97f              MoveToManager::TurnToHeading(this, arg2->params);
0052a97f              break;
0052a97f          }
0052a923      }
0052a923      
0052a987      return 0;
0052a900  }

0052a98a                                8b ff                                                                        ..
0052a98c  uint32_t jump_table_52a98c[0x4] = 
0052a98c  {
0052a98c      [0x0] =  0x0052a92a
0052a990      [0x1] =  0x0052a94b
0052a994      [0x2] =  0x0052a960
0052a998      [0x3] =  0x0052a979
0052a99c  }

0052a99c                                                                                      90 90 90 90                              ....

0052a9a0  void __thiscall MovementParameters::towards_and_away(class MovementParameters const* this, float arg2, float arg3, uint32_t* arg4, int32_t* arg5)

0052a9a0  {
0052a9a0      long double x87_r7 = ((long double)arg2);
0052a9a4      long double temp1 = ((long double)this->distance_to_object);
0052a9a4      (x87_r7 - temp1);
0052a9a4      
0052a9ac      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0052a9ac      {
0052a9b6          *(uint32_t*)arg4 = 0x45000005;
0052a9bc          *(uint32_t*)arg5 = 0;
0052a9c2          return;
0052a9ac      }
0052a9ac      
0052a9cc      ((((long double)arg2) - ((long double)this->min_distance)) - ((long double)0.000199999995f));
0052a9d4      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0052a9d4      
0052a9d7      if (p)
0052a9d7      {
0052a9f4          *(uint32_t*)arg4 = 0;
0052a9fa          return;
0052a9d7      }
0052a9d7      
0052a9e1      *(uint32_t*)arg4 = 0x45000006;
0052a9e7      *(uint32_t*)arg5 = 1;
0052a9a0  }

0052a9fd                                                                                         90 90 90                               ...

0052aa00  void __thiscall MovementParameters::get_command(class MovementParameters const* this, float arg2, float arg3, uint32_t* arg4, enum HoldKey* arg5, int32_t* arg6)

0052aa00  {
0052aa03      int16_t __inner0 = ((int16_t)this->__inner0);
0052aa03      
0052aa09      if ((*(uint8_t*)((char*)__inner0)[1] & 2) != 0)
0052aa09      {
0052aa0e          if ((*(uint8_t*)((char*)__inner0)[1] & 1) == 0)
0052aa0e              goto label_52aa66;
0052aa0e          
0052aa26          MovementParameters::towards_and_away(this, arg2, arg3, arg4, arg6);
0052aa09      }
0052aa09      else if ((*(uint8_t*)((char*)__inner0)[1] & 1) == 0)
0052aa30      {
0052aa66      label_52aa66:
0052aa66          (((long double)arg2) - ((long double)this->distance_to_object));
0052aa6b          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0052aa6b          
0052aa6e          if (p_1)
0052aa6e          {
0052aa84              *(uint32_t*)arg4 = 0x45000005;
0052aa8a              *(uint32_t*)arg6 = 0;
0052aa6e          }
0052aa6e          else
0052aa74              *(uint32_t*)arg4 = 0;
0052aa30      }
0052aa30      else
0052aa30      {
0052aa32          long double x87_r7_1 = ((long double)arg2);
0052aa36          long double temp2_1 = ((long double)this->min_distance);
0052aa36          (x87_r7_1 - temp2_1);
0052aa36          
0052aa3e          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
0052aa3e          {
0052aa54              *(uint32_t*)arg4 = 0x45000005;
0052aa5a              *(uint32_t*)arg6 = 1;
0052aa3e          }
0052aa3e          else
0052aa44              *(uint32_t*)arg4 = 0;
0052aa30      }
0052aa30      
0052aa90      int16_t __inner0_1 = ((int16_t)this->__inner0);
0052aa90      
0052aa95      if ((__inner0_1 & 0x10) == 0)
0052aa95      {
0052aa99          if ((__inner0_1 & 2) == 0)
0052aa99          {
0052aac2              *(uint32_t*)arg5 = HoldKey_None;
0052aac9              return;
0052aa99          }
0052aa99          
0052aa9d          if ((__inner0_1 & 1) != 0)
0052aa9d          {
0052aaa3              long double x87_r7_4 = (((long double)arg2) - ((long double)this->distance_to_object));
0052aaa6              long double temp3_1 = ((long double)this->walk_run_threshhold);
0052aaa6              (x87_r7_4 - temp3_1);
0052aaa6              
0052aaae              if ((*(uint8_t*)((char*)((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0052aaae              {
0052aac2                  *(uint32_t*)arg5 = HoldKey_None;
0052aac9                  return;
0052aaae              }
0052aa9d          }
0052aa95      }
0052aa95      
0052aab4      *(uint32_t*)arg5 = HoldKey_Run;
0052aa00  }

0052aacc                                      90 90 90 90                                                              ....

0052aad0  int32_t __stdcall MovementParameters::get_desired_heading(class MovementParameters const* this @ ecx, uint32_t arg2, int32_t arg3) __pure

0052aad0  {
0052aad0      class MovementParameters* this_1 = this;
0052aae9      int32_t result;
0052aae9      
0052aae9      if ((arg2 == 0x44000007 || arg2 == 0x45000005))
0052ab00          result = arg3;
0052aae9      else
0052aae9      {
0052aaec          if (arg2 != 0x45000006)
0052ab17              return (arg2 - 0x45000006);
0052ab17          
0052aaee          result = arg3;
0052aae9      }
0052aae9      
0052aafd      return result;
0052aad0  }

0052ab1a                                                                                90 90 90 90 90 90                            ......

0052ab20  uint32_t __thiscall MovementParameters::Pack(class MovementParameters* this, void** arg2, uint32_t arg3)

0052ab20  {
0052ab25      if (arg3 >= 0x28)
0052ab25      {
0052ab35          **(uint32_t**)arg2 = this->__inner0;
0052ab39          void* edx_3 = (*(uint32_t*)arg2 + 4);
0052ab3c          *(uint32_t*)arg2 = edx_3;
0052ab41          *(uint32_t*)edx_3 = ((float)((long double)this->distance_to_object));
0052ab45          void* esi_3 = (*(uint32_t*)arg2 + 4);
0052ab48          *(uint32_t*)arg2 = esi_3;
0052ab4f          *(uint32_t*)esi_3 = ((float)((long double)this->min_distance));
0052ab53          void* edx_6 = (*(uint32_t*)arg2 + 4);
0052ab56          *(uint32_t*)arg2 = edx_6;
0052ab5b          *(uint32_t*)edx_6 = ((float)((long double)this->fail_distance));
0052ab5f          void* esi_5 = (*(uint32_t*)arg2 + 4);
0052ab62          *(uint32_t*)arg2 = esi_5;
0052ab69          *(uint32_t*)esi_5 = ((float)((long double)this->desired_heading));
0052ab6d          void* edx_9 = (*(uint32_t*)arg2 + 4);
0052ab70          *(uint32_t*)arg2 = edx_9;
0052ab75          *(uint32_t*)edx_9 = ((float)((long double)this->speed));
0052ab79          void* esi_7 = (*(uint32_t*)arg2 + 4);
0052ab7c          *(uint32_t*)arg2 = esi_7;
0052ab83          *(uint32_t*)esi_7 = ((float)((long double)this->walk_run_threshhold));
0052ab87          void* edx_12 = (*(uint32_t*)arg2 + 4);
0052ab8a          *(uint32_t*)arg2 = edx_12;
0052ab8f          *(uint32_t*)edx_12 = this->context_id;
0052ab93          void* esi_10 = (*(uint32_t*)arg2 + 4);
0052ab96          *(uint32_t*)arg2 = esi_10;
0052ab9d          *(uint32_t*)esi_10 = this->hold_key_to_apply;
0052aba1          void* edx_15 = (*(uint32_t*)arg2 + 4);
0052aba4          *(uint32_t*)arg2 = edx_15;
0052aba9          *(uint32_t*)edx_15 = this->action_stamp;
0052abab          *(uint32_t*)arg2 += 4;
0052ab25      }
0052ab25      
0052abb4      return 0x28;
0052ab20  }

0052abb7                                                                       90 90 90 90 90 90 90 90 90                         .........

0052abc0  int32_t __thiscall MovementParameters::UnPack(class MovementParameters* this, void** arg2, uint32_t arg3)

0052abc0  {
0052abc5      if (arg3 < 0x28)
0052abc9          return 0;
0052abc9      
0052abd4      this->__inner0 = **(uint32_t**)arg2;
0052abd9      void* edx_3 = (*(uint32_t*)arg2 + 4);
0052abdc      *(uint32_t*)arg2 = edx_3;
0052abe0      this->distance_to_object = *(uint32_t*)edx_3;
0052abe5      void* edx_6 = (*(uint32_t*)arg2 + 4);
0052abe8      *(uint32_t*)arg2 = edx_6;
0052abec      this->min_distance = *(uint32_t*)edx_6;
0052abf1      void* edx_9 = (*(uint32_t*)arg2 + 4);
0052abf4      *(uint32_t*)arg2 = edx_9;
0052abf8      this->fail_distance = *(uint32_t*)edx_9;
0052abfd      void* edx_12 = (*(uint32_t*)arg2 + 4);
0052ac00      *(uint32_t*)arg2 = edx_12;
0052ac04      this->desired_heading = *(uint32_t*)edx_12;
0052ac09      void* edx_15 = (*(uint32_t*)arg2 + 4);
0052ac0c      *(uint32_t*)arg2 = edx_15;
0052ac10      this->speed = *(uint32_t*)edx_15;
0052ac15      void* edx_18 = (*(uint32_t*)arg2 + 4);
0052ac18      *(uint32_t*)arg2 = edx_18;
0052ac1c      this->walk_run_threshhold = *(uint32_t*)edx_18;
0052ac21      void* edx_21 = (*(uint32_t*)arg2 + 4);
0052ac24      *(uint32_t*)arg2 = edx_21;
0052ac28      this->context_id = *(uint32_t*)edx_21;
0052ac2d      void* edx_24 = (*(uint32_t*)arg2 + 4);
0052ac30      *(uint32_t*)arg2 = edx_24;
0052ac34      this->hold_key_to_apply = *(uint32_t*)edx_24;
0052ac39      void* edx_27 = (*(uint32_t*)arg2 + 4);
0052ac3c      *(uint32_t*)arg2 = edx_27;
0052ac40      this->action_stamp = *(uint32_t*)edx_27;
0052ac43      *(uint32_t*)arg2 += 4;
0052ac4b      return 1;
0052abc0  }

0052ac4e                                            90 90                                                                ..

0052ac50  int32_t __thiscall MovementParameters::UnPackNet(class MovementParameters* this, enum MovementTypes::Type arg2, void** arg3, uint32_t arg4)

0052ac50  {
0052ac5b      if ((arg2 - 6) <= 3)
0052ac5b      {
0052ac61          int32_t edx_1;
0052ac61          
0052ac61          switch (arg2)
0052ac61          {
0052ac68              case MoveToObject:
0052ac68              case MoveToPosition:
0052ac68              {
0052ac68                  edx_1 = 0x1c;
0052ac68                  break;
0052ac68              }
0052ac6f              case TurnToObject:
0052ac6f              case TurnToHeading:
0052ac6f              {
0052ac6f                  edx_1 = 0xc;
0052ac6f                  break;
0052ac6f              }
0052ac61          }
0052ac61          
0052ac81          if ((arg4 >= edx_1 && (arg2 - 6) <= 3))
0052ac81          {
0052ac87              void** eax_1;
0052ac87              
0052ac87              switch (arg2)
0052ac87              {
0052ac8e                  case MoveToObject:
0052ac8e                  case MoveToPosition:
0052ac8e                  {
0052ac8e                      eax_1 = arg3;
0052ac96                      this->__inner0 = **(uint32_t**)eax_1;
0052ac9b                      void* esi_1 = (*(uint32_t*)eax_1 + 4);
0052ac9e                      *(uint32_t*)eax_1 = esi_1;
0052aca4                      this->distance_to_object = *(uint32_t*)esi_1;
0052aca9                      void* edx_7 = (*(uint32_t*)eax_1 + 4);
0052acac                      *(uint32_t*)eax_1 = edx_7;
0052acb0                      this->min_distance = *(uint32_t*)edx_7;
0052acb5                      void* esi_3 = (*(uint32_t*)eax_1 + 4);
0052acb8                      *(uint32_t*)eax_1 = esi_3;
0052acbe                      this->fail_distance = *(uint32_t*)esi_3;
0052acc3                      void* edx_12 = (*(uint32_t*)eax_1 + 4);
0052acc6                      *(uint32_t*)eax_1 = edx_12;
0052acca                      this->speed = *(uint32_t*)edx_12;
0052accf                      void* esi_5 = (*(uint32_t*)eax_1 + 4);
0052acd2                      *(uint32_t*)eax_1 = esi_5;
0052acd8                      this->walk_run_threshhold = *(uint32_t*)esi_5;
0052ac8e                      break;
0052ac8e                  }
0052acdd                  case TurnToObject:
0052acdd                  case TurnToHeading:
0052acdd                  {
0052acdd                      eax_1 = arg3;
0052ace5                      this->__inner0 = **(uint32_t**)eax_1;
0052acea                      void* esi_7 = (*(uint32_t*)eax_1 + 4);
0052aced                      *(uint32_t*)eax_1 = esi_7;
0052acf3                      this->speed = *(uint32_t*)esi_7;
0052acdd                      break;
0052acdd                  }
0052ac87              }
0052ac87              
0052acf8              void* edx_21 = (*(uint32_t*)eax_1 + 4);
0052acfb              *(uint32_t*)eax_1 = edx_21;
0052acff              this->desired_heading = *(uint32_t*)edx_21;
0052ad02              *(uint32_t*)eax_1 += 4;
0052ad0b              return 1;
0052ac81          }
0052ac5b      }
0052ac5b      
0052ad11      return 0;
0052ac50  }

0052ad14  uint32_t jump_table_52ad14[0x4] = 
0052ad14  {
0052ad14      [0x0] =  0x0052ac68
0052ad18      [0x1] =  0x0052ac68
0052ad1c      [0x2] =  0x0052ac6f
0052ad20      [0x3] =  0x0052ac6f
0052ad24  }
0052ad24  uint32_t jump_table_52ad24[0x4] = 
0052ad24  {
0052ad24      [0x0] =  0x0052ac8e
0052ad28      [0x1] =  0x0052ac8e
0052ad2c      [0x2] =  0x0052acdd
0052ad30      [0x3] =  0x0052acdd
0052ad34  }

0052ad34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0052ad40  class CObjCell* CObjCell::GetVisible(uint32_t arg1)

0052ad40  {
0052ad46      if (arg1 == 0)
0052ad48          return arg1;
0052ad48      
0052ad57      if (((uint32_t)arg1) >= 0x100)
0052ad66          /* tailcall */
0052ad66          return CEnvCell::GetVisible(arg1);
0052ad66      
0052ad5d      /* tailcall */
0052ad5d      return CLandCell::GetVisible(arg1);
0052ad40  }

0052ad6b                                   90 90 90 90 90                                                             .....

0052ad70  void CObjCell::SetObjectMaintainer(class CObjectMaint* arg1)

0052ad70  {
0052ad74      CObjCell::obj_maint = arg1;
0052ad70  }

0052ad7a                                                                                90 90 90 90 90 90                            ......

0052ad80  void CObjCell::add_dynamic_lights()

0052ad80  {
0052ad80      /* tailcall */
0052ad80      return CEnvCell::add_dynamic_lights();
0052ad80  }

0052ad85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0052ad90  enum LandDefs::WaterType __fastcall CObjCell::get_block_water_type(class CObjCell const* this)

0052ad90  {
0052ad90      class CLandBlock* myLandBlock_ = this->myLandBlock_;
0052ad90      
0052ad98      if (myLandBlock_ == 0)
0052ada0          return 0;
0052ada0      
0052ad9d      return myLandBlock_->water_type;
0052ad90  }

0052ada1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0052adb0  void __thiscall DArray<LIGHTOBJ const *>::shrink(class DArray<LIGHTOBJ const *>* this, uint32_t arg2)

0052adb0  {
0052adbd      if (arg2 > this->sizeOf)
0052adbd      {
0052adc0          DArray<LIGHTOBJ const *>::grow(this, arg2);
0052adc7          return;
0052adbd      }
0052adbd      
0052adcc      if (arg2 != 0)
0052adcc      {
0052ade9          void* eax_1 = operator new[]((arg2 << 2));
0052adf3          int32_t i = 0;
0052adf7          this->sizeOf = arg2;
0052adf7          
0052adfa          if (arg2 > 0)
0052adfa          {
0052ae0e              do
0052ae0e              {
0052ae05                  *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
0052ae0b                  i += 1;
0052ae0e              } while (i < this->sizeOf);
0052adfa          }
0052adfa          
0052ae13          operator delete[](this->data);
0052ae1b          this->data = eax_1;
0052adcc      }
0052adcc      else
0052adcc      {
0052adce          class LIGHTOBJ const** data = this->data;
0052add1          this->sizeOf = arg2;
0052add4          operator delete[](data);
0052addc          this->data = arg2;
0052adcc      }
0052adcc      
0052ae21      if (this->next_available > arg2)
0052ae23          this->next_available = arg2;
0052adb0  }

0052ae2b                                   90 90 90 90 90                                                             .....

0052ae30  void __thiscall DArray<LIGHTOBJ const *>::grow(class DArray<LIGHTOBJ const *>* this, uint32_t arg2)

0052ae30  {
0052ae3b      if (arg2 <= this->sizeOf)
0052ae3b      {
0052ae3e          DArray<LIGHTOBJ const *>::shrink(this, arg2);
0052ae45          return;
0052ae3b      }
0052ae3b      
0052ae51      void* eax_1 = operator new[]((arg2 << 2));
0052ae5e      int32_t i = 0;
0052ae5e      
0052ae62      if (this->sizeOf > 0)
0052ae62      {
0052ae72          do
0052ae72          {
0052ae69              *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
0052ae6f              i += 1;
0052ae72          } while (i < this->sizeOf);
0052ae62      }
0052ae62      
0052ae77      operator delete[](this->data);
0052ae7f      this->data = eax_1;
0052ae82      this->sizeOf = arg2;
0052ae30  }

0052ae8a                                90 90 90 90 90 90                                                            ......

0052ae90  void __thiscall DArray<CShadowObj *>::shrink(class DArray<CShadowObj *>* this, uint32_t arg2)

0052ae90  {
0052ae9d      if (arg2 > this->sizeOf)
0052ae9d      {
0052aea0          DArray<CShadowObj *>::grow(this, arg2);
0052aea7          return;
0052ae9d      }
0052ae9d      
0052aeac      if (arg2 != 0)
0052aeac      {
0052aec9          void* eax_1 = operator new[]((arg2 << 2));
0052aed3          int32_t i = 0;
0052aed7          this->sizeOf = arg2;
0052aed7          
0052aeda          if (arg2 > 0)
0052aeda          {
0052aeee              do
0052aeee              {
0052aee5                  *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
0052aeeb                  i += 1;
0052aeee              } while (i < this->sizeOf);
0052aeda          }
0052aeda          
0052aef3          operator delete[](this->data);
0052aefb          this->data = eax_1;
0052aeac      }
0052aeac      else
0052aeac      {
0052aeae          class CShadowObj** data = this->data;
0052aeb1          this->sizeOf = arg2;
0052aeb4          operator delete[](data);
0052aebc          this->data = arg2;
0052aeac      }
0052aeac      
0052af01      if (this->next_available > arg2)
0052af03          this->next_available = arg2;
0052ae90  }

0052af0b                                   90 90 90 90 90                                                             .....

0052af10  void __thiscall DArray<CShadowObj *>::grow(class DArray<CShadowObj *>* this, uint32_t arg2)

0052af10  {
0052af1b      if (arg2 <= this->sizeOf)
0052af1b      {
0052af1e          DArray<CShadowObj *>::shrink(this, arg2);
0052af25          return;
0052af1b      }
0052af1b      
0052af31      void* eax_1 = operator new[]((arg2 << 2));
0052af3e      int32_t i = 0;
0052af3e      
0052af42      if (this->sizeOf > 0)
0052af42      {
0052af52          do
0052af52          {
0052af49              *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
0052af4f              i += 1;
0052af52          } while (i < this->sizeOf);
0052af42      }
0052af42      
0052af57      operator delete[](this->data);
0052af5f      this->data = eax_1;
0052af62      this->sizeOf = arg2;
0052af10  }

0052af6a                                90 90 90 90 90 90                                                            ......

0052af70  void __fastcall CObjCell::CObjCell(class CObjCell* this)

0052af70  {
0052af7a      DBObj::DBObj(this, INVALID_DID.id);
0052af7f      this->vtable = &PackObj::`vftable';
0052af8b      this->vtable = 0x7c58e0;
0052af91      this->vtable = &SerializeUsingPackDBObj::`vftable';
0052af98      CPartCell::CPartCell(&this->vtable);
0052af86      this->vtable = &CObjCell::`vftable';
0052afa3      this->vtable = 0x7c8b20;
0052afa9      this->vtable = &CObjCell::`vftable';
0052afb2      this->water_type = NOT_WATER;
0052afb8      this->pos.vtable = 0x796910;
0052afbf      this->pos.objcell_id = 0;
0052afb5      this->pos.frame.qw = 0x3f800000;
0052afb5      this->pos.frame.qx = 0f;
0052afb5      this->pos.frame.qy = 0f;
0052afb5      this->pos.frame.qz = 0f;
0052afb5      this->pos.frame.m_fOrigin.x = 0;
0052afb5      this->pos.frame.m_fOrigin.y = 0f;
0052afb5      this->pos.frame.m_fOrigin.z = 0f;
0052afda      Frame::cache(&this->pos.frame);
0052afdf      this->num_objects = 0;
0052afe5      this->object_list.data = 0;
0052afeb      this->object_list.sizeOf = 0;
0052aff1      this->object_list.next_available = 0;
0052affc      this->object_list.blocksize = 0x80;
0052b002      this->num_lights = 0;
0052b008      this->light_list.data = 0;
0052b00e      this->light_list.sizeOf = 0;
0052b014      this->light_list.next_available = 0;
0052b01a      this->light_list.blocksize = 0x80;
0052b020      this->num_shadow_objects = 0;
0052b026      this->shadow_object_list.data = 0;
0052b032      __builtin_memset(&this->shadow_object_list.next_available, 0, 0x24);
0052b038      this->shadow_object_list.blocksize = 0x80;
0052af70  }

0052b06d                                         90 90 90                                                               ...

0052b070  void CObjCell::find_transit_cells(class CObjCell const* this @ ecx, class Position const* arg2, uint32_t const arg3, class CSphere const* arg4, class CELLARRAY* arg5, class SPHEREPATH* arg6)

0052b070  {
0052b070      Turbine::Debug::Abort();
0052b070  }

0052b078                                                                          90 90 90 90 90 90 90 90                          ........

0052b080  void CObjCell::find_transit_cells(class CObjCell const* this @ ecx, uint32_t const arg2, class CPhysicsPart** arg3, class CELLARRAY* arg4)

0052b080  {
0052b080      Turbine::Debug::Abort();
0052b080  }

0052b088                          90 90 90 90 90 90 90 90                                                          ........

0052b090  void CObjCell::init_static_objects(class CObjCell* this @ ecx)

0052b090  {
0052b090      /* tailcall */
0052b090      return Turbine::Debug::Abort();
0052b090  }

0052b095                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0052b0a0  void* __thiscall CObjCell::`vector deleting destructor'(class CObjCell* this, uint32_t arg2)

0052b0a0  {
0052b0a3      /* tailcall */
0052b0a3      return CObjCell::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0052b0a0  }

0052b0a8                          cc cc cc cc cc cc cc cc                                                          ........

0052b0b0  void* __thiscall CObjCell::`vector deleting destructor'(class CObjCell* this, uint32_t arg2)

0052b0b0  {
0052b0b3      /* tailcall */
0052b0b3      return CObjCell::`scalar deleting destructor'(((char*)this - 0x38), arg2);
0052b0b0  }

0052b0b8                                                                          cc cc cc cc cc cc cc cc                          ........

0052b0c0  void __fastcall CObjCell::~CObjCell(class CObjCell* this)

0052b0c0  {
0052b0c5      class LongNIValHash<GlobalVoyeurInfo>* voyeur_table = this->voyeur_table;
0052b0d3      this->vtable = 0x7c8b20;
0052b0d9      this->vtable = &CObjCell::`vftable';
0052b0cf      this->vtable = &CObjCell::`vftable';
0052b0cf      
0052b0e6      if (voyeur_table != 0)
0052b0e6      {
0052b0e8          voyeur_table->vtable->__vecDelDtor(1);
0052b0ee          this->voyeur_table = nullptr;
0052b0e6      }
0052b0e6      
0052b0f4      class ClipPlaneList** clip_planes = this->clip_planes;
0052b0f4      
0052b0fc      if (clip_planes != 0)
0052b0fc      {
0052b0fe          class ClipPlaneList* edi_1 = *(uint32_t*)clip_planes;
0052b0fe          
0052b102          if (edi_1 != 0)
0052b102          {
0052b106              ClipPlaneList::~ClipPlaneList(edi_1);
0052b10c              operator delete(edi_1);
0052b102          }
0052b102          
0052b11b          operator delete[](this->clip_planes);
0052b0fc      }
0052b0fc      
0052b12a      operator delete[](this->shadow_object_list.data);
0052b12f      this->shadow_object_list.data = 0;
0052b13c      operator delete[](this->light_list.data);
0052b141      this->light_list.data = 0;
0052b14e      operator delete[](this->object_list.data);
0052b153      this->object_list.data = 0;
0052b163      this->pos.vtable = 0x79285c;
0052b166      CPartCell::~CPartCell(&this->vtable);
0052b16b      this->vtable = &PackObj::`vftable';
0052b174      /* tailcall */
0052b174      return DBObj::~DBObj(this);
0052b0c0  }

0052b179                                                                             90 90 90 90 90 90 90                           .......

0052b180  class CObjCell* CObjCell::Get(uint32_t arg1)

0052b180  {
0052b189      if (arg1 == 0)
0052b18e          return arg1;
0052b18e      
0052b19d      void var_8;
0052b19d      
0052b19d      if (((uint32_t)arg1) >= 0x100)
0052b1c4          return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 3));
0052b1ab      return CLandCell::GetVisible(arg1);
0052b180  }

0052b1c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0052b1d0  void __thiscall CObjCell::add_light(class CObjCell* this, class LIGHTOBJ const* arg2)

0052b1d0  {
0052b1d3      uint32_t sizeOf = this->light_list.sizeOf;
0052b1d3      
0052b1df      if (this->num_lights >= sizeOf)
0052b1eb          DArray<LIGHTOBJ const *>::grow(&this->light_list, (sizeOf + 5));
0052b1eb      
0052b1f0      uint32_t num_lights = this->num_lights;
0052b1f6      class LIGHTOBJ const** data = this->light_list.data;
0052b1ff      this->num_lights = (num_lights + 1);
0052b209      data[num_lights] = arg2;
0052b1d0  }


0052b210  void __thiscall CObjCell::remove_light(class CObjCell* this, class LIGHTOBJ const* arg2)

0052b210  {
0052b213      uint32_t num_lights_1 = this->num_lights;
0052b219      int32_t i = 0;
0052b219      
0052b21d      if (num_lights_1 > 0)
0052b21d      {
0052b22c          class LIGHTOBJ const** data = this->light_list.data;
0052b22e          int32_t* data_1 = data;
0052b22e          
0052b23e          do
0052b23e          {
0052b232              if (*(uint32_t*)data_1 == arg2)
0052b232              {
0052b24a                  this->num_lights = (num_lights_1 - 1);
0052b253                  data[i] = data[(num_lights_1 - 1)];
0052b256                  uint32_t num_lights = this->num_lights;
0052b256                  
0052b267                  if ((num_lights + 0xa) < this->light_list.sizeOf)
0052b274                      /* tailcall */
0052b274                      return DArray<LIGHTOBJ const *>::shrink(&this->light_list, (num_lights + 5));
0052b274                  
0052b267                  break;
0052b232              }
0052b232              
0052b234              i += 1;
0052b235              data_1 = &data_1[1];
0052b23e          } while (i < this->num_lights);
0052b21d      }
0052b210  }

0052b279                                                                             90 90 90 90 90 90 90                           .......

0052b280  void __thiscall CObjCell::add_shadow_object(class CObjCell* this, class CShadowObj* arg2, uint32_t arg3)

0052b280  {
0052b283      uint32_t sizeOf = this->shadow_object_list.sizeOf;
0052b283      
0052b28f      if (this->num_shadow_objects >= sizeOf)
0052b29b          DArray<CShadowObj *>::grow(&this->shadow_object_list, (sizeOf + 5));
0052b29b      
0052b2a0      uint32_t num_shadow_objects = this->num_shadow_objects;
0052b2a6      class CShadowObj** data = this->shadow_object_list.data;
0052b2af      this->num_shadow_objects = (num_shadow_objects + 1);
0052b2b9      data[num_shadow_objects] = arg2;
0052b2bc      arg2->cell = this;
0052b280  }

0052b2c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0052b2d0  void __thiscall CObjCell::remove_shadow_object(class CObjCell* this, class CShadowObj* arg2)

0052b2d0  {
0052b2d9      int32_t i = 0;
0052b2d9      
0052b2dd      if (this->num_shadow_objects > 0)
0052b2dd      {
0052b2df          class CShadowObj** data = this->shadow_object_list.data;
0052b2df          
0052b301          do
0052b301          {
0052b2f3              if (*(uint32_t*)data == arg2)
0052b2f3              {
0052b309                  arg2->cell = nullptr;
0052b316                  class CShadowObj** data_1 = this->shadow_object_list.data;
0052b318                  uint32_t ebx_3 = (this->num_shadow_objects - 1);
0052b319                  this->num_shadow_objects = ebx_3;
0052b324                  data_1[i] = data_1[ebx_3];
0052b327                  uint32_t num_shadow_objects = this->num_shadow_objects;
0052b327                  
0052b338                  if ((num_shadow_objects + 0xa) < this->shadow_object_list.sizeOf)
0052b344                      /* tailcall */
0052b344                      return DArray<CShadowObj *>::shrink(&this->shadow_object_list, (num_shadow_objects + 5));
0052b344                  
0052b338                  break;
0052b2f3              }
0052b2f3              
0052b2fb              i += 1;
0052b2fc              data = &data[1];
0052b301          } while (i < this->num_shadow_objects);
0052b2dd      }
0052b2d0  }

0052b349                             90 90 90 90 90 90 90                                                           .......

0052b350  void __fastcall CObjCell::add_static_to_global_lights(class CObjCell* this)

0052b350  {
0052b35a      int32_t i = 0;
0052b35a      
0052b35e      if (this->num_lights > 0)
0052b35e      {
0052b38b          do
0052b38b          {
0052b366              int32_t* eax_2 = this->light_list.data[i];
0052b366              
0052b36d              if ((eax_2[0x11] & 1) != 0)
0052b37a                  Render::add_static_light(*(uint32_t*)eax_2, this->m_DID.id, &eax_2[1]);
0052b37a              
0052b388              i += 1;
0052b38b          } while (i < this->num_lights);
0052b35e      }
0052b350  }


0052b390  void __fastcall CObjCell::add_dynamic_to_global_lights(class CObjCell* this)

0052b390  {
0052b39a      int32_t i = 0;
0052b39a      
0052b39e      if (this->num_lights > 0)
0052b39e      {
0052b3cf          do
0052b3cf          {
0052b3a6              int32_t* eax_2 = this->light_list.data[i];
0052b3a6              
0052b3b1              if ((((int8_t)!(eax_2[0x11])) & 1) != 0)
0052b3be                  Render::add_dynamic_light(*(uint32_t*)eax_2, this->m_DID.id, &eax_2[1]);
0052b3be              
0052b3cc              i += 1;
0052b3cf          } while (i < this->num_lights);
0052b39e      }
0052b390  }

0052b3d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0052b3e0  class AC1Legacy::Vector3* __stdcall CObjCell::GetViewerDistance(class CObjCell const* this @ ecx, class AC1Legacy::Vector3* arg2)

0052b3e0  {
0052b3f9      arg2->x = 0;
0052b413      arg2->y = 0f;
0052b416      arg2->z = 0f;
0052b41c      return arg2;
0052b3e0  }

0052b41f                                                                                               90                                 .

0052b420  void __fastcall CObjCell::init_objects(class CObjCell* this)

0052b420  {
0052b423      class CObjectMaint* CObjCell::obj_maint_1 = CObjCell::obj_maint;
0052b423      
0052b42b      if (CObjCell::obj_maint_1 != 0)
0052b42b      {
0052b42f          CObjectMaint::InitObjCell(CObjCell::obj_maint_1, this);
0052b43a          int32_t i = 0;
0052b43a          
0052b43e          if (this->num_objects > 0)
0052b43e          {
0052b47d              do
0052b47d              {
0052b456                  class CPhysicsObj* edi_1 = this->object_list.data[i];
0052b456                  
0052b460                  if (((edi_1->state & 1) == 0 && CPhysicsObj::is_completely_visible(edi_1) == 0))
0052b46f                      CPhysicsObj::recalc_cross_cells(edi_1);
0052b46f                  
0052b47a                  i += 1;
0052b47d              } while (i < this->num_objects);
0052b43e          }
0052b42b      }
0052b420  }

0052b443           8d a4 24 00 00 00 00 8d 9b 00 00 00 00                                                     ..$..........
0052b483           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0052b490  void __fastcall CObjCell::release_objects(class CObjCell* this)

0052b490  {
0052b49b      if (this->num_shadow_objects != 0)
0052b49b      {
0052b49d          int32_t edi;
0052b49d          int32_t var_8_1 = edi;
0052b49d          
0052b4c1          do
0052b4c1          {
0052b4a6              class CShadowObj* edi_2 = *(uint32_t*)this->shadow_object_list.data;
0052b4ab              CObjCell::remove_shadow_object(this, edi_2);
0052b4b4              CPhysicsObj::remove_parts(edi_2->physobj, this);
0052b4c1          } while (this->num_shadow_objects != 0);
0052b49b      }
0052b49b      
0052b4cc      if (this->num_objects != 0)
0052b4cc      {
0052b4ce          class CObjectMaint* CObjCell::obj_maint_1 = CObjCell::obj_maint;
0052b4ce          
0052b4d6          if (CObjCell::obj_maint_1 != 0)
0052b4d9              CObjectMaint::ReleaseObjCell(CObjCell::obj_maint_1, this);
0052b4cc      }
0052b490  }


0052b4e0  void CObjCell::find_cell_list(class Position const* arg1, uint32_t const arg2, class CSphere const* arg3, class CELLARRAY* arg4, class CObjCell** arg5, class SPHEREPATH* arg6)

0052b4e0  {
0052b4ea      class CLandCell* eax = nullptr;
0052b4ed      class CELLARRAY* edi = arg4;
0052b4f1      edi->num_cells = 0;
0052b4f4      edi->added_outside = 0;
0052b4f6      uint32_t objcell_id = arg1->objcell_id;
0052b4f6      
0052b4fb      if (objcell_id != 0)
0052b4fb      {
0052b50c          if (((uint32_t)objcell_id) >= 0x100)
0052b515              eax = CEnvCell::GetVisible(objcell_id);
0052b50c          else
0052b50e              eax = CLandCell::GetVisible(objcell_id);
0052b4fb      }
0052b4fb      
0052b525      arg4 = eax;
0052b525      
0052b535      if (((uint32_t)objcell_id) >= 0x100)
0052b535      {
0052b54f          if (arg6 != 0)
0052b551              arg6->hits_interior_cell = 1;
0052b551          
0052b563          CELLARRAY::add_cell(edi, objcell_id, arg4);
0052b535      }
0052b535      else
0052b53f          CLandCell::add_all_outside_cells(arg1, arg2, arg3, edi);
0052b53f      
0052b576      if ((arg4 != 0 && arg2 != 0))
0052b576      {
0052b57f          int32_t i = 0;
0052b57f          
0052b583          if (edi->num_cells > 0)
0052b583          {
0052b5ab              do
0052b5ab              {
0052b588                  int32_t* cell = edi->cells.data[i].cell;
0052b588                  
0052b58e                  if (cell != 0)
0052b59f                      *(uint32_t*)(*(uint32_t*)cell + 0x80)(arg1, arg2, arg3, edi, arg6);
0052b59f                  
0052b5a8                  i += 1;
0052b5ab              } while (i < edi->num_cells);
0052b583          }
0052b583          
0052b5b3          if (arg5 != 0)
0052b5b3          {
0052b5b9              *(uint32_t*)arg5 = nullptr;
0052b5c2              int32_t i_1 = 0;
0052b5c2              
0052b5c6              if (edi->num_cells > 0)
0052b5c6              {
0052b63e                  do
0052b63e                  {
0052b5d3                      int32_t* cell_1 = edi->cells.data[i_1].cell;
0052b5d3                      
0052b5d9                      if (cell_1 != 0)
0052b5d9                      {
0052b5ec                          void __return;
0052b5ec                          class AC1Legacy::Vector3* eax_13 = LandDefs::get_block_offset(&__return, arg1->objcell_id, cell_1[0xa]);
0052b5f4                          long double x87_r7_2 = (((long double)arg3->center.z) - ((long double)eax_13->z));
0052b601                          long double x87_r6_2 = (((long double)arg3->center.y) - ((long double)eax_13->y));
0052b60b                          int32_t eax_14 = *(uint32_t*)cell_1;
0052b60d                          float var_18 = ((float)(((long double)arg3->center.x) - ((long double)eax_13->x)));
0052b611                          float var_14_1 = ((float)x87_r6_2);
0052b615                          float var_10_1 = ((float)x87_r7_2);
0052b615                          
0052b621                          if (*(uint32_t*)(eax_14 + 0x84)(&var_18) != 0)
0052b621                          {
0052b627                              *(uint32_t*)arg5 = cell_1;
0052b627                              
0052b636                              if (((uint32_t)((int16_t)cell_1[0xa])) >= 0x100)
0052b636                              {
0052b648                                  if (arg6 != 0)
0052b64a                                      arg6->hits_interior_cell = 1;
0052b64a                                  
0052b648                                  break;
0052b636                              }
0052b621                          }
0052b5d9                      }
0052b5d9                      
0052b63b                      i_1 += 1;
0052b63e                  } while (i_1 < edi->num_cells);
0052b5c6              }
0052b5b3          }
0052b5b3          
0052b66e          if ((edi->do_not_load_cells != 0 && ((uint32_t)((int16_t)arg1->objcell_id)) >= 0x100))
0052b66e          {
0052b673              uint32_t i_2 = 0;
0052b673              
0052b677              if (edi->num_cells > 0)
0052b677              {
0052b6bb                  do
0052b6bb                  {
0052b683                      int32_t cell_id = edi->cells.data[i_2].cell_id;
0052b683                      
0052b68d                      if (cell_id == *(int32_t*)((char*)arg4 + 0x28))
0052b68d                      {
0052b6b7                      label_52b6b7:
0052b6b7                          i_2 += 1;
0052b68d                      }
0052b68d                      else
0052b68d                      {
0052b68f                          int32_t edx_9 = *(int32_t*)((char*)arg4 + 0xe0);
0052b695                          int32_t eax_23 = 0;
0052b695                          
0052b699                          if (edx_9 > 0)
0052b699                          {
0052b69b                              int32_t* ecx_7 = *(int32_t*)((char*)arg4 + 0xe4);
0052b69b                              
0052b6ab                              do
0052b6ab                              {
0052b6a3                                  if (cell_id == *(uint32_t*)ecx_7)
0052b6a3                                      goto label_52b6b7;
0052b6a3                                  
0052b6a5                                  eax_23 += 1;
0052b6a6                                  ecx_7 = &ecx_7[1];
0052b6ab                              } while (eax_23 < edx_9);
0052b699                          }
0052b699                          
0052b6b0                          CELLARRAY::remove_cell(edi, i_2);
0052b68d                      }
0052b6bb                  } while (i_2 < edi->num_cells);
0052b677              }
0052b66e          }
0052b576      }
0052b4e0  }

0052b6c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0052b6d0  enum TransitionState __thiscall CObjCell::check_entry_restrictions(class CObjCell const* this, class CTransition* arg2)

0052b6d0  {
0052b6d5      class CPhysicsObj* object = arg2->object_info.object;
0052b6d5      
0052b6dd      if (object != 0)
0052b6dd      {
0052b6df          class CWeenieObject* weenie_obj_1 = object->weenie_obj;
0052b6df          
0052b6e7          if (weenie_obj_1 == 0)
0052b745              return 1;
0052b745          
0052b6ed          int32_t eax_1 = weenie_obj_1->vtable->CanBypassMoveRestrictions();
0052b6ed          
0052b6f6          if ((*(uint8_t*)((char*)((int16_t)arg2->object_info.state))[1] & 1) == 0)
0052b745              return 1;
0052b745          
0052b6f8          uint32_t restriction_obj = this->restriction_obj;
0052b6f8          
0052b704          if ((restriction_obj == 0 || eax_1 != 0))
0052b745              return 1;
0052b745          
0052b707          class CPhysicsObj* eax_2 = CPhysicsObj::GetObjectA(restriction_obj);
0052b707          
0052b711          if (eax_2 != 0)
0052b711          {
0052b713              class CWeenieObject* weenie_obj = eax_2->weenie_obj;
0052b713              
0052b71b              if (weenie_obj != 0)
0052b71b              {
0052b725                  if (weenie_obj->vtable->CanMoveInto(weenie_obj_1) != 0)
0052b745                      return 1;
0052b745                  
0052b727                  this->vtable->handle_move_restriction(arg2);
0052b71b              }
0052b711          }
0052b6dd      }
0052b6dd      
0052b73a      return 2;
0052b6d0  }

0052b748                          90 90 90 90 90 90 90 90                                                          ........

0052b750  enum TransitionState __thiscall CObjCell::find_obj_collisions(class CObjCell const* this, class CTransition* arg2)

0052b750  {
0052b760      enum TransitionState result = OK_TS;
0052b760      
0052b765      if (arg2->sphere_path.insert_type != INITIAL_PLACEMENT_INSERT)
0052b765      {
0052b76d          int32_t i = 0;
0052b76d          
0052b771          if (this->num_shadow_objects > 0)
0052b771          {
0052b79e              do
0052b79e              {
0052b77c                  class CPhysicsObj* physobj = this->shadow_object_list.data[i]->physobj;
0052b77c                  
0052b788                  if ((physobj->parent == 0 && physobj != arg2->object_info.object))
0052b788                  {
0052b78b                      result = CPhysicsObj::FindObjCollisions(physobj, arg2);
0052b78b                      
0052b793                      if (result != OK_TS)
0052b793                          break;
0052b788                  }
0052b788                  
0052b79b                  i += 1;
0052b79e              } while (i < this->num_shadow_objects);
0052b771          }
0052b765      }
0052b765      
0052b7a3      return result;
0052b750  }

0052b7a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0052b7b0  int32_t __thiscall CObjCell::check_collisions(class CObjCell const* this, class CPhysicsObj const* arg2)

0052b7b0  {
0052b7bb      int32_t i = 0;
0052b7bb      
0052b7bf      if (this->num_shadow_objects > 0)
0052b7bf      {
0052b7fa          do
0052b7fa          {
0052b7d9              class CPhysicsObj* physobj = this->shadow_object_list.data[i]->physobj;
0052b7d9              
0052b7e5              if (((physobj->parent == 0 && physobj != arg2) && CPhysicsObj::check_collision(physobj, arg2) != 0))
0052b80c                  return 1;
0052b80c              
0052b7f7              i += 1;
0052b7fa          } while (i < this->num_shadow_objects);
0052b7bf      }
0052b7bf      
0052b801      return 0;
0052b7b0  }

0052b7c7                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
0052b80f                                               90                                                                 .

0052b810  void __thiscall CObjCell::check_attack(class CObjCell const* this, uint32_t const arg2, class Position const* arg3, float const arg4, class AttackCone const* arg5, class AttackInfo* arg6)

0052b810  {
0052b810      class CObjCell* this_1 = this;
0052b818      int32_t i = 0;
0052b818      
0052b820      if (this->num_shadow_objects > 0)
0052b820      {
0052b829          class AttackInfo* edi_1 = arg6;
0052b82d          class CObjCell* this_2 = this;
0052b82d          
0052b887          do
0052b887          {
0052b839              class CPhysicsObj* physobj = this_2->shadow_object_list.data[i]->physobj;
0052b839              
0052b84c              if ((physobj->id != arg2 && (physobj->state & 1) == 0))
0052b84c              {
0052b84e                  float attack_radius = edi_1->attack_radius;
0052b859                  arg6 = attack_radius;
0052b865                  uint32_t eax_4 = CPhysicsObj::check_attack(physobj, arg3, arg4, arg5, attack_radius);
0052b865                  
0052b86c                  if (eax_4 != 0)
0052b875                      AttackInfo::AddObject(edi_1, physobj->id, eax_4);
0052b875                  
0052b87a                  this_2 = this;
0052b84c              }
0052b84c              
0052b884              i += 1;
0052b887          } while (i < this_2->num_shadow_objects);
0052b820      }
0052b810  }

0052b891                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0052b8a0  class CLandBlock* __thiscall CObjCell::get_water_depth(class CObjCell const* this, class AC1Legacy::Vector3 const* arg2)

0052b8a0  {
0052b8a0      enum LandDefs::WaterType water_type = this->water_type;
0052b8a3      int32_t water_type_1 = water_type;
0052b8a3      
0052b8a6      if (water_type != NOT_WATER)
0052b8a6      {
0052b8a9          if (water_type_1 == 1)
0052b8a9          {
0052b8b7              class CLandBlock* myLandBlock_ = this->myLandBlock_;
0052b8b7              
0052b8bf              if (myLandBlock_ == 0)
0052b8db                  return myLandBlock_;
0052b8db              
0052b8cd              int32_t eax_1;
0052b8cd              int80_t st0;
0052b8cd              eax_1 = CLandBlockStruct::calc_water_depth(&myLandBlock_->vertex_lighting, this->m_DID.id, arg2);
0052b8d2              return eax_1;
0052b8a9          }
0052b8a9          
0052b8ab          water_type_1 -= 2;
0052b8a6      }
0052b8a6      
0052b8e4      return water_type_1;
0052b8a0  }

0052b8e7                       90 90 90 90 90 90 90 90 90                                                         .........

0052b8f0  class CPhysicsObj* __thiscall CObjCell::get_object(class CObjCell const* this, uint32_t const arg2)

0052b8f0  {
0052b8f1      uint32_t num_objects = this->num_objects;
0052b8f7      int32_t edx = 0;
0052b8f7      
0052b8fc      if (num_objects > 0)
0052b8fc      {
0052b8fe          class CPhysicsObj** data = this->object_list.data;
0052b8fe          
0052b919          do
0052b919          {
0052b908              class CPhysicsObj* result = *(uint32_t*)data;
0052b908              
0052b911              if ((result != 0 && result->id == arg2))
0052b91f                  return result;
0052b91f              
0052b913              edx += 1;
0052b914              data = &data[1];
0052b919          } while (edx < num_objects);
0052b8fc      }
0052b8fc      
0052b91b      return nullptr;
0052b8f0  }

0052b922        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0052b930  void* __thiscall CObjCell::`scalar deleting destructor'(class CObjCell* this, uint32_t arg2)

0052b930  {
0052b933      CObjCell::~CObjCell(this);
0052b933      
0052b93d      if ((arg2 & 1) != 0)
0052b940          operator delete(this);
0052b940      
0052b94b      return this;
0052b930  }

0052b94e                                            90 90                                                                ..

0052b950  void __fastcall CObjCell::add_lights(class CObjCell* this)

0052b950  {
0052b953      CObjCell::add_static_to_global_lights(this);
0052b95b      /* tailcall */
0052b95b      return CObjCell::add_dynamic_to_global_lights(this);
0052b950  }


0052b960  void CObjCell::find_cell_list(class CELLARRAY* arg1, class CObjCell** arg2, class SPHEREPATH* arg3)

0052b960  {
0052b97c      CObjCell::find_cell_list(&arg3->check_pos, arg3->num_sphere, arg3->global_sphere, arg1, arg2, arg3);
0052b960  }

0052b985                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0052b990  void CObjCell::find_cell_list(class Position const* arg1, class CSphere const* arg2, class CELLARRAY* arg3, class SPHEREPATH* arg4)

0052b990  {
0052b9a5      float radius = arg2->radius;
0052b9ac      void __return;
0052b9ac      class AC1Legacy::Vector3* eax_1 = Position::localtoglobal(arg1, &__return, arg1, arg2);
0052b9b3      float x = eax_1->x;
0052b9bf      float y = eax_1->y;
0052b9cd      float z = eax_1->z;
0052b9d9      CObjCell::find_cell_list(arg1, 1, &x, arg3, nullptr, arg4);
0052b990  }

0052b9e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0052b9f0  void CObjCell::find_cell_list(class Position const* arg1, uint32_t const arg2, class CCylSphere const* arg3, class CELLARRAY* arg4, class SPHEREPATH* arg5)

0052b9f0  {
0052ba00      if ((1 & (*(uint8_t*)$S213)) == 0)
0052ba00      {
0052ba0f          $S213 |= 1;
0052ba15          atexit($E214);
0052ba00      }
0052ba00      
0052ba1d      uint32_t const i_2 = arg2;
0052ba26      uint32_t const i_1;
0052ba26      
0052ba26      if (i_2 <= 0xa)
0052ba26      {
0052ba33          arg2 = i_2;
0052ba37          i_1 = i_2;
0052ba26      }
0052ba26      else
0052ba26      {
0052ba28          i_1 = 0xa;
0052ba2d          arg2 = 0xa;
0052ba26      }
0052ba26      
0052ba3f      if (i_1 > 0)
0052ba3f      {
0052ba42          class CCylSphere* esi_1 = arg3;
0052ba47          float* edi_1 = &sphere[0].radius;
0052ba7d          uint32_t const i;
0052ba7d          
0052ba7d          do
0052ba7d          {
0052ba59              void __return;
0052ba59              class AC1Legacy::Vector3* eax = Position::localtoglobal(arg1, &__return, arg1, esi_1);
0052ba60              edi_1[-3] = eax->x;
0052ba60              edi_1[-2] = eax->y;
0052ba60              edi_1[-1] = eax->z;
0052ba74              *(uint32_t*)edi_1 = esi_1->radius;
0052ba76              esi_1 = &esi_1[1];
0052ba79              edi_1 = &edi_1[4];
0052ba7c              i = i_1;
0052ba7c              i_1 -= 1;
0052ba7d          } while (i != 1);
0052ba7f          i_1 = arg2;
0052ba3f      }
0052ba3f      
0052ba98      CObjCell::find_cell_list(arg1, i_1, &sphere, arg4, nullptr, arg5);
0052b9f0  }

0052baa6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0052bab0  void __thiscall LongNIValHash<GlobalVoyeurInfo>::LongNIValHash<GlobalVoyeurInfo>(class LongNIValHash<GlobalVoyeurInfo>* this, uint32_t arg2)

0052bab0  {
0052bac0      this->vtable = 0x7c66b0;
0052bac6      this->fPlacementNew_ = 0;
0052bad8      this->buckets = operator new[]((arg2 << 2));
0052badb      HashBase<unsigned long>::InternalInit(this, arg2);
0052bae1      this->vtable = 0x7c8bcc;
0052bab0  }

0052baed                                         90 90 90                                                               ...

0052baf0  void __thiscall LongNIValHash<GlobalVoyeurInfo>::add(class LongNIValHash<GlobalVoyeurInfo>* this, class GlobalVoyeurInfo arg2, uint32_t arg3)

0052baf0  {
0052baf6      void* eax = operator new(0x18);
0052bafb      void* edx = nullptr;
0052bafb      
0052bb02      if (eax != 0)
0052bb02      {
0052bb08          *(uint32_t*)((char*)eax + 4) = 0;
0052bb0b          *(uint32_t*)((char*)eax + 8) = arg3;
0052bb15          *(uint32_t*)((char*)eax + 0xc) = arg2.object_iid;
0052bb1b          *(uint32_t*)((char*)eax + 0x10) = arg2.type;
0052bb22          *(uint32_t*)((char*)eax + 0x14) = arg2.ref_count;
0052bb25          *(uint32_t*)eax = 0x7c62f8;
0052bb2b          edx = eax;
0052bb02      }
0052bb02      
0052bb2d      int32_t edi = *(uint32_t*)((char*)edx + 8);
0052bb3c      int32_t eax_4 = (((edi >> ((int8_t)this->key_shift)) ^ edi) & this->table_mask);
0052bb44      *(uint32_t*)((char*)edx + 4) = this->buckets[eax_4];
0052bb47      this->buckets[eax_4] = edx;
0052baf0  }

0052bb52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0052bb60  int32_t __thiscall CObjCell::add_voyeur(class CObjCell* this, uint32_t arg2, class DetectionCylsphere const* arg3)

0052bb60  {
0052bb77      if ((arg2 == 0 || arg3 == 0))
0052bb82          return 0;
0052bb82      
0052bb8d      if (this->voyeur_table == 0)
0052bb8d      {
0052bb91          void* eax_2 = operator new(0x18);
0052bb9b          class LongNIValHash<GlobalVoyeurInfo>* eax_3;
0052bb9b          
0052bb9b          if (eax_2 == 0)
0052bba8              eax_3 = nullptr;
0052bb9b          else
0052bba1              eax_3 = LongNIValHash<GlobalVoyeurInfo>::LongNIValHash<GlobalVoyeurInfo>(eax_2, 0x20);
0052bba1          
0052bbaa          this->voyeur_table = eax_3;
0052bb8d      }
0052bb8d      
0052bbb7      class HashBaseData<unsigned long>* eax_4 = HashBase<unsigned long>::remove(this->voyeur_table, arg2);
0052bbb7      
0052bbbe      if (eax_4 != 0)
0052bbbe      {
0052bbc3          int32_t ebp = *(int32_t*)((char*)eax_4 + 0xc);
0052bbc5          int32_t edx = *(int32_t*)((char*)eax_4 + 0x10);
0052bbc8          int32_t ebx_2 = *(int32_t*)((char*)eax_4 + 0x14);
0052bbcf          eax_4->vtable->__vecDelDtor(1);
0052bbe3          int32_t var_28 = edx;
0052bbed          int32_t var_24 = (ebx_2 + 1);
0052bbf0          LongNIValHash<GlobalVoyeurInfo>::add(this->voyeur_table, ebp, arg2);
0052bc01          return 1;
0052bbbe      }
0052bbbe      
0052bc14      uint32_t detection_type = arg3->detection_type;
0052bc17      int32_t var_24_1 = 1;
0052bc20      LongNIValHash<GlobalVoyeurInfo>::add(this->voyeur_table, arg2, arg2);
0052bc2b      int32_t i = 0;
0052bc2b      
0052bc2f      if (this->num_objects > 0)
0052bc2f      {
0052bc7d          do
0052bc7d          {
0052bc37              void* ebx_4 = this->object_list.data[i];
0052bc3a              int32_t eax_9 = *(uint32_t*)((char*)ebx_4 + 8);
0052bc3a              
0052bc4a              if ((eax_9 != arg2 && (eax_9 != 0 && *(uint32_t*)((char*)ebx_4 + 0x40) == 0)))
0052bc4a              {
0052bc4d                  class CPhysicsObj* eax_11 = CPhysicsObj::GetObjectA(arg2);
0052bc4d                  
0052bc57                  if (eax_11 != 0)
0052bc57                  {
0052bc60                      int32_t var_c = *(uint32_t*)((char*)ebx_4 + 8);
0052bc67                      int32_t var_8_2 = 1;
0052bc6f                      CPhysicsObj::receive_detection_update(eax_11, &var_c);
0052bc57                  }
0052bc4a              }
0052bc4a              
0052bc7a              i += 1;
0052bc7d          } while (i < this->num_objects);
0052bc2f      }
0052bc2f      
0052bc8b      return 1;
0052bb60  }

0052bc8e                                            90 90                                                                ..

0052bc90  int32_t __thiscall CObjCell::remove_voyeur(class CObjCell* this, uint32_t arg2, class DetectionCylsphere const* arg3)

0052bc90  {
0052bc99      class LongNIValHash<GlobalVoyeurInfo>* voyeur_table = this->voyeur_table;
0052bc99      
0052bca1      if (voyeur_table != 0)
0052bca1      {
0052bcac          class HashBaseData<unsigned long>* eax_2 = HashBase<unsigned long>::remove(voyeur_table, arg2);
0052bcac          
0052bcb3          if (eax_2 != 0)
0052bcb3          {
0052bcbe              int32_t ebx = *(int32_t*)((char*)eax_2 + 0xc);
0052bcc0              int32_t ebp = *(int32_t*)((char*)eax_2 + 0x10);
0052bcc3              int32_t esi = *(int32_t*)((char*)eax_2 + 0x14);
0052bcb9              eax_2->vtable->__vecDelDtor(1);
0052bcb9              
0052bccf              if ((esi - 1) > 0)
0052bccf              {
0052bcdd                  int32_t var_24 = ebp;
0052bce0                  int32_t var_20 = (esi - 1);
0052bce9                  LongNIValHash<GlobalVoyeurInfo>::add(this->voyeur_table, ebx, arg2);
0052bcfa                  return 1;
0052bccf              }
0052bccf              
0052bd03              int32_t i = 0;
0052bd03              
0052bd07              if (this->num_objects > 0)
0052bd07              {
0052bd5c                  do
0052bd5c                  {
0052bd16                      void* esi_2 = this->object_list.data[i];
0052bd19                      int32_t eax_6 = *(uint32_t*)((char*)esi_2 + 8);
0052bd19                      
0052bd2d                      if ((eax_6 != arg2 && (eax_6 != 0 && *(uint32_t*)((char*)esi_2 + 0x40) == 0)))
0052bd2d                      {
0052bd30                          class CPhysicsObj* eax_8 = CPhysicsObj::GetObjectA(arg2);
0052bd30                          
0052bd3a                          if (eax_8 != 0)
0052bd3a                          {
0052bd43                              int32_t var_8 = *(uint32_t*)((char*)esi_2 + 8);
0052bd4a                              int32_t var_4_1 = 2;
0052bd4e                              CPhysicsObj::receive_detection_update(eax_8, &var_8);
0052bd3a                          }
0052bd2d                      }
0052bd2d                      
0052bd59                      i += 1;
0052bd5c                  } while (i < this->num_objects);
0052bd07              }
0052bd07              
0052bd6a              return 1;
0052bcb3          }
0052bca1      }
0052bca1      
0052bd76      return 0;
0052bc90  }

0052bd79                                                                             90 90 90 90 90 90 90                           .......

0052bd80  void __thiscall CObjCell::update_all_voyeur(class CObjCell* this, class CPhysicsObj* arg2, enum DetectionType arg3)

0052bd80  {
0052bdb1      if ((arg2->id != 0 && (arg2->parent == 0 && ((*(uint8_t*)((char*)((int16_t)arg2->state))[1] & 0x40) == 0 || arg3 != EnteredDetection))))
0052bdb1      {
0052bdb3          class LongNIValHash<GlobalVoyeurInfo>* voyeur_table = this->voyeur_table;
0052bdb3          
0052bdbb          if (voyeur_table != 0)
0052bdbb          {
0052bdc2              void var_14;
0052bdc2              LongNIValHashIter<SurfInfo *>::LongNIValHashIter<SurfInfo *>(&var_14, voyeur_table);
0052bdcd              int32_t i;
0052bdcd              
0052bdcd              if (i == 0)
0052bdcd              {
0052bdd0                  class CPhysicsObj* edi_1 = arg2;
0052bdd0                  
0052be24                  do
0052be24                  {
0052bdda                      void* var_c;
0052bdda                      
0052bdda                      if (var_c != 0)
0052bddc                          edi_1 = *(uint32_t*)((char*)var_c + 8);
0052bddc                      
0052bddf                      uint32_t id_1 = arg2->id;
0052bddf                      
0052bdef                      if ((id_1 != edi_1 && (id_1 != 0 && arg2->parent == 0)))
0052bdef                      {
0052bdf2                          class CPhysicsObj* eax_6 = CPhysicsObj::GetObjectA(edi_1);
0052bdf2                          
0052bdfc                          if (eax_6 != 0)
0052bdfc                          {
0052be05                              uint32_t id = arg2->id;
0052be0c                              enum DetectionType var_18_1 = arg3;
0052be10                              CPhysicsObj::receive_detection_update(eax_6, &id);
0052bdfc                          }
0052bdef                      }
0052bdef                      
0052be19                      HashBaseIter<unsigned long>::Next(&var_14);
0052be24                  } while (i == 0);
0052bdcd              }
0052bdbb          }
0052bdb1      }
0052bd80  }

0052be2f                                               90                                                                 .

0052be30  void __thiscall CObjCell::hide_object(class CObjCell* this, class CPhysicsObj* arg2)

0052be30  {
0052be37      CObjCell::update_all_voyeur(this, arg2, LeftDetection);
0052be30  }

0052be3f                                                                                               90                                 .

0052be40  void __thiscall CObjCell::unhide_object(class CObjCell* this, class CPhysicsObj* arg2)

0052be40  {
0052be67      if ((arg2->id != 0 && (arg2->parent == 0 && (*(uint8_t*)((char*)((int16_t)arg2->state))[1] & 0x40) == 0)))
0052be67      {
0052be69          class LongNIValHash<GlobalVoyeurInfo>* voyeur_table = this->voyeur_table;
0052be69          
0052be71          if (voyeur_table != 0)
0052be71          {
0052be78              void var_14;
0052be78              LongNIValHashIter<SurfInfo *>::LongNIValHashIter<SurfInfo *>(&var_14, voyeur_table);
0052be83              int32_t i;
0052be83              
0052be83              if (i == 0)
0052be83              {
0052be86                  class CPhysicsObj* edi_1 = arg2;
0052be86                  
0052bee4                  do
0052bee4                  {
0052be96                      void* var_c;
0052be96                      
0052be96                      if (var_c != 0)
0052be98                          edi_1 = *(uint32_t*)((char*)var_c + 8);
0052be98                      
0052be9b                      uint32_t id_1 = arg2->id;
0052be9b                      
0052beab                      if ((id_1 != edi_1 && (id_1 != 0 && arg2->parent == 0)))
0052beab                      {
0052beae                          class CPhysicsObj* eax_6 = CPhysicsObj::GetObjectA(edi_1);
0052beae                          
0052beb8                          if (eax_6 != 0)
0052beb8                          {
0052bec1                              uint32_t id = arg2->id;
0052bec8                              int32_t var_18_1 = 1;
0052bed0                              CPhysicsObj::receive_detection_update(eax_6, &id);
0052beb8                          }
0052beab                      }
0052beab                      
0052bed9                      HashBaseIter<unsigned long>::Next(&var_14);
0052bee4                  } while (i == 0);
0052be83              }
0052be71          }
0052be67      }
0052be40  }

0052beee                                            90 90                                                                ..

0052bef0  void* __thiscall LongNIValHash<GlobalVoyeurInfo>::`scalar deleting destructor'(class LongNIValHash<GlobalVoyeurInfo>* this, uint32_t arg2)

0052bef0  {
0052bef3      LongNIValHash<GlobalVoyeurInfo>::~LongNIValHash<GlobalVoyeurInfo>(this);
0052bef3      
0052befd      if ((arg2 & 1) != 0)
0052bf00          operator delete(this);
0052bf00      
0052bf0b      return this;
0052bef0  }

0052bf0e                                            90 90                                                                ..

0052bf10  void __fastcall LongNIValHash<GlobalVoyeurInfo>::~LongNIValHash<GlobalVoyeurInfo>(class LongNIValHash<GlobalVoyeurInfo>* this)

0052bf10  {
0052bf1b      this->vtable = 0x7c8bcc;
0052bf21      void var_14;
0052bf21      LongNIValHashIter<SurfInfo *>::LongNIValHashIter<SurfInfo *>(&var_14, this);
0052bf2c      int32_t i;
0052bf2c      
0052bf2c      while (i == 0)
0052bf34          HashBaseIter<unsigned long>::DeleteCurrent(&var_14);
0052bf34      
0052bf44      bool cond:0 = this->fPlacementNew_ != 0;
0052bf46      this->vtable = 0x7c66b0;
0052bf46      
0052bf4c      if (!(cond:0))
0052bf52          operator delete[](this->buckets);
0052bf10  }

0052bf5f                                                                                               90                                 .

0052bf60  void __thiscall CObjCell::add_object(class CObjCell* this, class CPhysicsObj* arg2)

0052bf60  {
0052bf66      uint32_t sizeOf = this->object_list.sizeOf;
0052bf66      
0052bf73      if (this->num_objects >= sizeOf)
0052bf7f          DArray<CPhysicsObj *>::grow(&this->object_list, (sizeOf + 5));
0052bf7f      
0052bf84      uint32_t num_objects = this->num_objects;
0052bf8e      class CPhysicsObj** data = this->object_list.data;
0052bf97      this->num_objects = (num_objects + 1);
0052bf9d      data[num_objects] = arg2;
0052bf9d      
0052bfbf      if ((arg2->id != 0 && (arg2->parent == 0 && (*(uint8_t*)((char*)((int16_t)arg2->state))[1] & 0x40) == 0)))
0052bfbf      {
0052bfc1          class LongNIValHash<GlobalVoyeurInfo>* voyeur_table = this->voyeur_table;
0052bfc1          
0052bfc9          if (voyeur_table != 0)
0052bfc9          {
0052bfd0              void var_14;
0052bfd0              LongNIValHashIter<SurfInfo *>::LongNIValHashIter<SurfInfo *>(&var_14, voyeur_table);
0052bfdb              int32_t i;
0052bfdb              
0052bfdb              if (i == 0)
0052bfdb              {
0052bfdd                  class CPhysicsObj* esi_1 = arg2;
0052bfdd                  
0052c035                  do
0052c035                  {
0052bfe7                      void* var_c;
0052bfe7                      
0052bfe7                      if (var_c != 0)
0052bfe9                          esi_1 = *(uint32_t*)((char*)var_c + 8);
0052bfe9                      
0052bfec                      uint32_t id_1 = arg2->id;
0052bfec                      
0052bffc                      if ((id_1 != esi_1 && (id_1 != 0 && arg2->parent == 0)))
0052bffc                      {
0052bfff                          class CPhysicsObj* eax_7 = CPhysicsObj::GetObjectA(esi_1);
0052bfff                          
0052c009                          if (eax_7 != 0)
0052c009                          {
0052c012                              uint32_t id = arg2->id;
0052c019                              int32_t var_18_1 = 1;
0052c021                              CPhysicsObj::receive_detection_update(eax_7, &id);
0052c009                          }
0052bffc                      }
0052bffc                      
0052c02a                      HashBaseIter<unsigned long>::Next(&var_14);
0052c035                  } while (i == 0);
0052bfdb              }
0052bfc9          }
0052bfbf      }
0052bf60  }

0052c03f                                                                                               90                                 .

0052c040  void __thiscall CObjCell::remove_object(class CObjCell* this, class CPhysicsObj* arg2)

0052c040  {
0052c044      uint32_t num_objects_1 = this->num_objects;
0052c04a      int32_t eax = 0;
0052c04a      
0052c04e      if (num_objects_1 > 0)
0052c04e      {
0052c050          class CPhysicsObj** data = this->object_list.data;
0052c062          class CPhysicsObj** data_1 = data;
0052c062          
0052c066          while (*(uint32_t*)data_1 != arg2)
0052c066          {
0052c068              eax += 1;
0052c069              data_1 = &data_1[1];
0052c069              
0052c072              if (eax >= this->num_objects)
0052c078                  return;
0052c066          }
0052c066          
0052c07e          this->num_objects = (num_objects_1 - 1);
0052c089          data[eax] = data[(num_objects_1 - 1)];
0052c08f          CObjCell::update_all_voyeur(this, arg2, LeftDetection);
0052c094          uint32_t num_objects = this->num_objects;
0052c094          
0052c0a5          if ((num_objects + 0xa) < this->object_list.sizeOf)
0052c0ad              DArray<CPhysicsObj *>::shrink(&this->object_list, (num_objects + 5));
0052c04e      }
0052c040  }

0052c0b9                                                                             90 90 90 90 90 90 90                           .......

0052c0c0  uint8_t __fastcall CEnvCell::GetDrawnThisFrame(class CEnvCell* this)

0052c0c0  {
0052c0d2      uint32_t eax;
0052c0d2      eax = this->m_current_render_frame_num == RenderDevice::render_device->m_nFrameStamp;
0052c0d5      return eax;
0052c0c0  }

0052c0d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0052c0e0  void __fastcall CEnvCell::SetDrawnThisFrame(class CEnvCell* this)

0052c0e0  {
0052c0eb      this->m_current_render_frame_num = RenderDevice::render_device->m_nFrameStamp;
0052c0e0  }

0052c0f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0052c100  enum TransitionState __thiscall CEnvCell::find_collisions(class CEnvCell const* this, class CTransition* arg2)

0052c100  {
0052c10b      enum TransitionState result = this->vtable->find_env_collisions(arg2);
0052c10b      
0052c114      if (result != OK_TS)
0052c120          return result;
0052c120      
0052c119      return CObjCell::find_obj_collisions(this, arg2);
0052c100  }

0052c123           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0052c130  enum TransitionState __thiscall CEnvCell::find_env_collisions(class CEnvCell const* this, class CTransition* arg2)

0052c130  {
0052c139      enum TransitionState result = CObjCell::check_entry_restrictions(this, arg2);
0052c139      
0052c141      if (result == OK_TS)
0052c141      {
0052c144          arg2->sphere_path.obstruction_ethereal = 0;
0052c144          
0052c15c          if (this->structure->physics_bsp != 0)
0052c15c          {
0052c169              SPHEREPATH::cache_localspace_sphere(&arg2->sphere_path, &this->pos, 1f);
0052c169              
0052c175              if (arg2->sphere_path.insert_type != INITIAL_PLACEMENT_INSERT)
0052c197                  result = BSPTREE::find_collisions(this->structure->physics_bsp, arg2, 1f);
0052c175              else
0052c181                  result = BSPTREE::placement_insert(this->structure->physics_bsp, arg2);
0052c181              
0052c1a5              if ((result != OK_TS && (arg2->object_info.state & 1) == 0))
0052c1a7                  arg2->collision_info.collided_with_environment = 1;
0052c15c          }
0052c141      }
0052c141      
0052c1b4      return result;
0052c130  }

0052c1b7                                                                       90 90 90 90 90 90 90 90 90                         .........

0052c1c0  int32_t CEnvCell::handle_move_restriction(class CEnvCell const* this @ ecx, class CTransition* arg2) __pure

0052c1c0  {
0052c1c5      return 1;
0052c1c0  }

0052c1c8                          90 90 90 90 90 90 90 90                                                          ........

0052c1d0  uint32_t __fastcall CEnvCell::pack_size(class CEnvCell* this)

0052c1d0  {
0052c1e5      int32_t ebp_1 = ((this->num_surfaces * 2) + 0x2c);
0052c1e5      
0052c1e9      if (this->num_portals > 0)
0052c1e9      {
0052c1ec          int32_t ebx_1 = 0;
0052c1ee          int32_t i = 0;
0052c1ee          
0052c20b          do
0052c20b          {
0052c1f8              NetError::GetPackSize((this->portals + ebx_1));
0052c1fd              ebp_1 += 8;
0052c205              i += 1;
0052c206              ebx_1 += 0x18;
0052c20b          } while (i < this->num_portals);
0052c1e9      }
0052c1e9      
0052c20e      uint32_t num_static_objects = this->num_static_objects;
0052c21c      int32_t result = (ebp_1 + (this->num_stabs << 1));
0052c21c      
0052c220      if (num_static_objects != 0)
0052c225          result = ((result + (num_static_objects << 5)) + 4);
0052c225      
0052c234      if (this->restriction_obj == 0)
0052c239          return result;
0052c239      
0052c236      return (result + 4);
0052c1d0  }

0052c23a                                                                                90 90 90 90 90 90                            ......

0052c240  void __fastcall CEnvCell::CEnvCell(class CEnvCell* this)

0052c240  {
0052c243      CObjCell::CObjCell(this);
0052c24a      __builtin_memset(&this->num_surfaces, 0, 0x38);
0052c286      this->vtable = 0x7c8c98;
0052c28c      this->vtable = &CEnvCell::`vftable';
0052c293      this->vtable = &CEnvCell::`vftable';
0052c29a      this->portal_view.data = 0;
0052c2a0      this->portal_view.sizeOf = 0;
0052c2a6      this->portal_view.next_available = 0;
0052c2ac      this->portal_view.blocksize = 0x80;
0052c2bc      this->num_view = 0;
0052c240  }

0052c2d8                                                                          90 90 90 90 90 90 90 90                          ........

0052c2e0  void* __thiscall CEnvCell::`vector deleting destructor'(class CEnvCell* this, uint32_t arg2)

0052c2e0  {
0052c2e3      /* tailcall */
0052c2e3      return CEnvCell::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0052c2e0  }

0052c2e8                          cc cc cc cc cc cc cc cc                                                          ........

0052c2f0  void* __thiscall CEnvCell::`vector deleting destructor'(class CEnvCell* this, uint32_t arg2)

0052c2f0  {
0052c2f3      /* tailcall */
0052c2f3      return CEnvCell::`scalar deleting destructor'(((char*)this - 0x38), arg2);
0052c2f0  }

0052c2f8                                                                          cc cc cc cc cc cc cc cc                          ........

0052c300  int32_t __thiscall CEnvCell::point_in_cell(class CEnvCell const* this, class AC1Legacy::Vector3 const* arg2)

0052c300  {
0052c30e      if (this->portals == 0)
0052c316          return 0;
0052c316      
0052c326      void __return;
0052c326      Frame::globaltolocal(&this->pos.frame, &__return, arg2);
0052c33f      return CCellStruct::point_in_cell(this->structure, &__return);
0052c300  }

0052c342        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0052c350  void __fastcall CEnvCell::init_static_objects(class CEnvCell* this)

0052c350  {
0052c35d      if (this->static_objects == 0)
0052c35d      {
0052c39e          uint32_t num_static_objects = this->num_static_objects;
0052c39e          
0052c3a6          if (num_static_objects > 0)
0052c3a6          {
0052c3b9              this->static_objects = operator new[]((num_static_objects << 2));
0052c3c8              int32_t i = 0;
0052c3c8              
0052c3cc              if (this->num_static_objects > 0)
0052c3cc              {
0052c3ce                  int32_t ebx_1 = 0;
0052c3ce                  
0052c42a                  do
0052c42a                  {
0052c3d6                      class IDClass<_tagDataID,32,0> id = this->static_object_ids[i].id;
0052c3d6                      
0052c3db                      if (id == 0)
0052c3f5                          this->static_objects[i] = 0;
0052c3db                      else
0052c3e7                          this->static_objects[i] = CPhysicsObj::makeObject(id, 0, 0);
0052c3e7                      
0052c408                      class CPhysicsObj* ecx_4 = this->static_objects[i];
0052c408                      
0052c40d                      if (ecx_4 != 0)
0052c419                          CPhysicsObj::add_obj_to_cell(ecx_4, this, (this->static_object_frames + ebx_1));
0052c419                      
0052c424                      i += 1;
0052c425                      ebx_1 += 0x40;
0052c42a                  } while (i < this->num_static_objects);
0052c3cc              }
0052c3a6          }
0052c35d      }
0052c35d      else
0052c35d      {
0052c365          int32_t i_1 = 0;
0052c365          
0052c369          if (this->num_static_objects > 0)
0052c369          {
0052c398              do
0052c398              {
0052c376                  class CPhysicsObj* edi_1 = this->static_objects[i_1];
0052c376                  
0052c37b                  if ((edi_1 != 0 && CPhysicsObj::is_completely_visible(edi_1) == 0))
0052c38a                      CPhysicsObj::calc_cross_cells_static(edi_1);
0052c38a                  
0052c395                  i_1 += 1;
0052c398              } while (i_1 < this->num_static_objects);
0052c369          }
0052c35d      }
0052c350  }


0052c430  void __thiscall CEnvCell::setup_view(class CEnvCell* this, uint32_t arg2)

0052c430  {
0052c449      Render::set_view(&this->portal_view.data[(this->num_view - 1)]->view, arg2);
0052c430  }

0052c454                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0052c460  int32_t __thiscall CEnvCell::PreFetchCells(class CEnvCell* this, uint32_t* arg2)

0052c460  {
0052c470      int32_t result = 1;
0052c470      
0052c475      if ((this->seen_outside != 0 && LScape::PreFetchCells(CObjCell::landscape, (this->m_DID.id | 0xffff), arg2) == 0))
0052c494          result = 0;
0052c494      
0052c49b      class IDClass<_tagDataID,32,0> esi_1 = (this->m_DID.id | 0xffff);
0052c4ac      class DBObj* var_20;
0052c4ac      enum CACHE_OBJECT_CODES eax_5 = DBObj::PreFetch(QualifiedDataID::QualifiedDataID(&var_20, esi_1, 1));
0052c4ac      
0052c4bc      if ((eax_5 != CACHE_OBJECT_IN_MEMORY && eax_5 != CACHE_OBJECT_IN_FILE))
0052c4c6          return 0;
0052c4c6      
0052c4dc      void var_18;
0052c4dc      class DBObj* ebx = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_18, esi_1, 1));
0052c4e3      var_20 = ebx;
0052c4e3      
0052c4e7      if (ebx != 0)
0052c4e7      {
0052c4f5          if (*(int32_t*)((char*)ebx + 0xec) != 0)
0052c4f5          {
0052c503              class IDClass<_tagDataID,32,0> esi_4 = ((this->m_DID.id & 0xfffffffe) | 0xfffe);
0052c514              void var_10;
0052c514              enum CACHE_OBJECT_CODES eax_11 = DBObj::PreFetch(QualifiedDataID::QualifiedDataID(&var_10, esi_4, 2));
0052c514              
0052c524              if ((eax_11 != CACHE_OBJECT_IN_MEMORY && eax_11 != CACHE_OBJECT_IN_FILE))
0052c524              {
0052c526                  ebx->vtable->Release();
0052c538                  return 0;
0052c524              }
0052c524              
0052c548              class DBObj* eax_15 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_10, esi_4, 2));
0052c548              
0052c554              if (eax_15 != 0)
0052c554              {
0052c55e                  int32_t eax_18 = ((this->m_DID.id & 0xffff0100) | 0x100);
0052c568                  int32_t i = 0;
0052c568                  
0052c56c                  if (*(int32_t*)((char*)eax_15 + 0x54) > 0)
0052c56c                  {
0052c5a5                      do
0052c5a5                      {
0052c580                          void var_8;
0052c580                          enum CACHE_OBJECT_CODES eax_22 = DBObj::PreFetch(QualifiedDataID::QualifiedDataID(&var_8, (i + eax_18), 3));
0052c580                          
0052c590                          if ((eax_22 != CACHE_OBJECT_IN_MEMORY && eax_22 != CACHE_OBJECT_IN_FILE))
0052c590                          {
0052c592                              result = 0;
0052c592                              
0052c597                              if (eax_22 == ~CACHE_OBJECT_LOOKING)
0052c59d                                  *(uint32_t*)arg2 += 1;
0052c590                          }
0052c590                          
0052c5a2                          i += 1;
0052c5a5                      } while (i < *(int32_t*)((char*)eax_15 + 0x54));
0052c56c                  }
0052c56c                  
0052c5a7                  eax_15->vtable->Release();
0052c554              }
0052c554              
0052c5ae              ebx = var_20;
0052c4f5          }
0052c4f5          
0052c5b2          ebx->vtable->Release();
0052c4e7      }
0052c4e7      
0052c5c2      return result;
0052c460  }

0052c5c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0052c5d0  void __thiscall CEnvCell::check_building_transit(class CEnvCell const* this, int32_t arg2, class Position const* arg3, uint32_t const arg4, class CSphere const* arg5, class CELLARRAY* arg6, class SPHEREPATH* arg7)

0052c5d0  {
0052c5dc      if (arg2 >= 0)
0052c5dc      {
0052c5e9          int32_t edi_1 = 0;
0052c5e9          
0052c5ed          if (arg4 > 0)
0052c5ed          {
0052c5ef              class CSphere* esi_1 = arg5;
0052c5ef              
0052c5fe              while (true)
0052c5fe              {
0052c5fe                  void __return;
0052c5fe                  class AC1Legacy::Vector3* eax_1 = Frame::globaltolocal(&this->pos.frame, &__return, esi_1);
0052c605                  float x = eax_1->x;
0052c60f                  float y = eax_1->y;
0052c61a                  float radius = esi_1->radius;
0052c625                  float z = eax_1->z;
0052c625                  
0052c630                  if (CCellStruct::sphere_intersects_cell(this->structure, &x) != OUTSIDE)
0052c630                      break;
0052c630                  
0052c636                  edi_1 += 1;
0052c637                  esi_1 = &esi_1[1];
0052c637                  
0052c63c                  if (edi_1 >= arg4)
0052c645                      return;
0052c5fe              }
0052c5fe              
0052c64e              if (arg7 != 0)
0052c650                  arg7->hits_interior_cell = 1;
0052c650              
0052c663              CELLARRAY::add_cell(arg6, this->m_DID.id, this);
0052c5ed          }
0052c5dc      }
0052c5d0  }

0052c672                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0052c680  void __thiscall CEnvCell::check_building_transit(class CEnvCell const* this, int32_t arg2, uint32_t const arg3, class CPhysicsPart** arg4, class CELLARRAY* arg5)

0052c680  {
0052c685      int32_t ebp = arg2;
0052c68b      class CEnvCell* this_1 = this;
0052c68d      class CEnvCell* this_2 = this_1;
0052c68d      
0052c691      if (ebp >= 0)
0052c691      {
0052c69b          int32_t eax_1 = 0;
0052c69f          int32_t var_4c_1 = 0;
0052c69f          
0052c6a3          if (arg3 > 0)
0052c6a3          {
0052c6b5              while (true)
0052c6b5              {
0052c6b5                  void* eax_2 = arg4[eax_1];
0052c6b5                  
0052c6ba                  if (eax_2 != 0)
0052c6ba                  {
0052c6c3                      void* ecx_2 = **(uint32_t**)((char*)eax_2 + 0x20);
0052c6c5                      class AC1Legacy::Vector3* esi_1 = *(uint32_t*)((char*)ecx_2 + 0x74);
0052c6c5                      
0052c6ca                      if (esi_1 != 0)
0052c6ca                      {
0052c6e9                      label_52c6e9:
0052c6e9                          float __return;
0052c6e9                          Position::localtolocal(&this_1->pos, &__return, ((char*)eax_2 + 0x30), esi_1);
0052c6f4                          long double x87_r7_2 = (((long double)0.000199999995f) + ((long double)*(int32_t*)((char*)esi_1 + 0xc)));
0052c6f7                          class CCellPortal* portals = this_1->portals;
0052c6fd                          int32_t ecx_4 = (ebp * 3);
0052c705                          int32_t ebp_1 = &portals->portal_side[(ecx_4 * 2)];
0052c716                          float* esi_3 = &&portals->portal[(ecx_4 * 2)]->plane.N.x;
0052c734                          float var_38;
0052c734                          float var_34;
0052c734                          long double x87_r7_8 = ((((((long double)var_38) * ((long double)esi_3[1])) + (((long double)var_34) * ((long double)esi_3[2]))) + (((long double)__return) * ((long double)*(uint32_t*)esi_3))) + ((long double)esi_3[3]));
0052c734                          
0052c737                          if (ebp_1 == 1)
0052c737                          {
0052c739                              long double temp1_1 = ((long double)((float)x87_r7_2));
0052c739                              (x87_r7_8 - temp1_1);
0052c739                              
0052c742                              if ((*(uint8_t*)((char*)((((x87_r7_8 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0052c742                                  goto label_52c76c;
0052c737                          }
0052c737                          else if (ebp_1 != 0)
0052c74c                          {
0052c76c                          label_52c76c:
0052c76c                              class BBox* eax_6 = CPhysicsPart::GetBoundingBox(arg4[var_4c_1]);
0052c788                              void var_30;
0052c788                              BBox::LocalToLocal(&var_30, eax_6, &arg4[var_4c_1]->pos, &this_1->pos);
0052c794                              int32_t eax_8;
0052c794                              int80_t st0_1;
0052c794                              st0_1 = Plane::intersect_box(esi_3, &var_30);
0052c794                              
0052c7a0                              if ((eax_8 == 3 || eax_8 == ebp_1))
0052c7a0                              {
0052c7b7                                  void var_18;
0052c7b7                                  BBox::LocalToLocal(&var_18, eax_6, &arg4[var_4c_1]->pos, &this_1->pos);
0052c7b7                                  
0052c7d2                                  if (CCellStruct::box_intersects_cell(this_2->structure, &var_18) != 0)
0052c7d2                                      break;
0052c7a0                              }
0052c7a0                              
0052c7d4                              this_1 = this_2;
0052c74c                          }
0052c74c                          else
0052c74c                          {
0052c74e                              (x87_r7_8 - ((long double)((float)-(x87_r7_2))));
0052c754                              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0052c754                              
0052c757                              if (p_1)
0052c757                                  goto label_52c76c;
0052c74c                          }
0052c6ca                      }
0052c6ca                      else
0052c6ca                      {
0052c6cc                          esi_1 = *(uint32_t*)((char*)ecx_2 + 0x90);
0052c6cc                          
0052c6d4                          if (esi_1 != 0)
0052c6d4                              goto label_52c6e9;
0052c6ca                      }
0052c6ba                  }
0052c6ba                  
0052c7e0                  eax_1 = (var_4c_1 + 1);
0052c7e3                  var_4c_1 = eax_1;
0052c7e3                  
0052c7e7                  if (eax_1 >= arg3)
0052c7f4                      return;
0052c7f4                  
0052c6ad                  ebp = arg2;
0052c6b5              }
0052c6b5              
0052c802              CELLARRAY::add_cell(arg5, this_2->m_DID.id, this_2);
0052c812              *(int32_t*)((char*)this_2->vtable + 0x7c)(arg3, arg4, arg5);
0052c6a3          }
0052c691      }
0052c680  }

0052c81f                                                                                               90                                 .

0052c820  void __thiscall CEnvCell::find_transit_cells(class CEnvCell const* this, class Position const* arg2, uint32_t const arg3, class CSphere const* arg4, class CELLARRAY* arg5, class SPHEREPATH* arg6)

0052c820  {
0052c82d      int32_t ebp = 0;
0052c831      int32_t var_44 = 0;
0052c835      int32_t var_48 = 0;
0052c835      
0052c839      if (this->num_portals > 0)
0052c839      {
0052c840          int32_t var_4c_1 = 0;
0052c840          
0052c856          while (true)
0052c856          {
0052c856              void* ecx = (this->portals + ebp);
0052c856              
0052c85c              if (*(uint32_t*)ecx != 0xffffffff)
0052c85c              {
0052c942                  int32_t edx_3 = arg5;
0052c949                  int32_t var_60_1 = *(uint32_t*)(edx_3 + 4);
0052c94a                  class CEnvCell* eax_3 = CCellPortal::GetOtherCell(ecx, edx_3);
0052c94a                  
0052c957                  if (eax_3 == 0)
0052c957                  {
0052ca12                      int32_t var_4c_3 = 0;
0052ca12                      
0052ca1a                      if (arg3 > 0)
0052ca1a                      {
0052ca1c                          class CSphere* edi_3 = arg4;
0052ca1c                          
0052ca2b                          while (true)
0052ca2b                          {
0052ca2b                              void __return_1;
0052ca2b                              class AC1Legacy::Vector3* eax_15 = Frame::globaltolocal(&this->pos.frame, &__return_1, edi_3);
0052ca38                              long double x87_r7_10 = (((long double)0.000199999995f) + ((long double)edi_3->radius));
0052ca53                              void* ecx_13 = (this->portals + ebp);
0052ca56                              void* eax_17 = *(uint32_t*)((char*)ecx_13 + 8);
0052ca6a                              int32_t ecx_14 = *(uint32_t*)((char*)ecx_13 + 0xc);
0052ca77                              long double x87_r6_19 = ((((((long double)eax_15->y) * ((long double)*(uint32_t*)((char*)eax_17 + 0x24))) + (((long double)eax_15->z) * ((long double)*(uint32_t*)((char*)eax_17 + 0x28)))) + (((long double)eax_15->x) * ((long double)*(uint32_t*)((char*)eax_17 + 0x20)))) + ((long double)*(uint32_t*)((char*)eax_17 + 0x2c)));
0052ca7c                              long double x87_r5_12 = -(x87_r7_10);
0052ca80                              (x87_r6_19 - x87_r5_12);
0052ca82                              float* eax_18;
0052ca82                              eax_18 = ((((x87_r6_19 < x87_r5_12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_19, x87_r5_12))) ? 1 : 0) << 0xa) | ((((x87_r6_19 == x87_r5_12) ? 1 : 0) << 0xe) | 0x3000))));
0052ca82                              
0052ca8c                              if (((*(uint8_t*)((char*)eax_18)[1] & 0x41) != 0 || ecx_14 != 1))
0052ca8c                              {
0052ca8e                                  (x87_r6_19 - x87_r7_10);
0052ca90                                  eax_18 = ((((x87_r6_19 < x87_r7_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_19, x87_r7_10))) ? 1 : 0) << 0xa) | ((((x87_r6_19 == x87_r7_10) ? 1 : 0) << 0xe) | 0x3800))));
0052ca94                                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0052ca94                                  
0052ca9b                                  if ((p_2 || ecx_14 != 0))
0052ca9b                                  {
0052caa6                                      edi_3 = &edi_3[1];
0052caa9                                      bool cond:5_1 = (var_4c_3 + 1) < arg3;
0052caab                                      var_4c_3 += 1;
0052caab                                      
0052caaf                                      if (!(cond:5_1))
0052caaf                                          break;
0052caaf                                      
0052caaf                                      continue;
0052ca9b                                  }
0052ca8c                              }
0052ca8c                              
0052cace                              CELLARRAY::add_cell(arg5, *(uint32_t*)(this->portals + ebp), nullptr);
0052cad3                              break;
0052ca2b                          }
0052ca1a                      }
0052c957                  }
0052c957                  else
0052c957                  {
0052c95d                      int32_t ebp_1 = 0;
0052c95d                      
0052c961                      if (arg3 > 0)
0052c961                      {
0052c963                          class CSphere* edi_2 = arg4;
0052c963                          
0052c9ae                          do
0052c9ae                          {
0052c970                              void __return;
0052c970                              class AC1Legacy::Vector3* eax_5 = Frame::globaltolocal(&eax_3->pos.frame, &__return, edi_2);
0052c977                              float x = eax_5->x;
0052c981                              float y = eax_5->y;
0052c98c                              float radius = edi_2->radius;
0052c997                              float z = eax_5->z;
0052c997                              
0052c9a2                              if (CCellStruct::sphere_intersects_cell(eax_3->structure, &x) != OUTSIDE)
0052c9a2                              {
0052ca09                                  CELLARRAY::add_cell(arg5, eax_3->m_DID.id, eax_3);
0052ca0e                                  break;
0052c9a2                              }
0052c9a2                              
0052c9a8                              ebp_1 += 1;
0052c9a9                              edi_2 = &edi_2[1];
0052c9ae                          } while (ebp_1 < arg3);
0052c961                      }
0052c961                      
0052c9b0                      ebp = var_4c_1;
0052c957                  }
0052c85c              }
0052c85c              else
0052c85c              {
0052c866                  int32_t edi_1 = 0;
0052c866                  
0052c86a                  if (arg3 > 0)
0052c86a                  {
0052c877                      float* edx_2 = (*(uint32_t*)((char*)ecx + 8) + 0x20);
0052c87d                      float* ecx_3 = &arg4->center.z;
0052c87d                      
0052c93a                      do
0052c93a                      {
0052c883                          long double x87_r7_2 = (((long double)ADJ(ecx_3)->center.x) - ((long double)this->pos.frame.m_fOrigin.x));
0052c88c                          long double x87_r6_2 = (((long double)ADJ(ecx_3)->center.y) - ((long double)this->pos.frame.m_fOrigin.y));
0052c894                          long double x87_r5_2 = (((long double)ADJ(ecx_3)->center.z) - ((long double)this->pos.frame.m_fOrigin.z));
0052c8ee                          float var_4c_2 = ((float)(((long double)0.000199999995f) + ((long double)ADJ(ecx_3)->radius)));
0052c8f2                          long double x87_r7_5 = ((((x87_r5_2 * ((long double)this->pos.frame.m_fl2gv[8])) + (x87_r6_2 * ((long double)this->pos.frame.m_fl2gv[7]))) + (x87_r7_2 * ((long double)this->pos.frame.m_fl2gv[6]))) * ((long double)edx_2[2]));
0052c8f9                          long double x87_r6_10 = (((long double)((float)(((x87_r7_2 * ((long double)this->pos.frame.m_fl2gv[3])) + (x87_r5_2 * ((long double)this->pos.frame.m_fl2gv[5]))) + (x87_r6_2 * ((long double)this->pos.frame.m_fl2gv[4]))))) * ((long double)edx_2[1]));
0052c902                          long double x87_r6_12 = (((long double)((float)(((x87_r7_2 * ((long double)this->pos.frame.m_fl2gv[0])) + (x87_r5_2 * ((long double)this->pos.frame.m_fl2gv[2]))) + (x87_r6_2 * ((long double)this->pos.frame.m_fl2gv[1]))))) * ((long double)*(uint32_t*)edx_2));
0052c906                          long double x87_r7_8 = (((x87_r7_5 + x87_r6_10) + x87_r6_12) + ((long double)edx_2[3]));
0052c90d                          long double x87_r6_14 = -(((long double)var_4c_2));
0052c911                          (x87_r7_8 - x87_r6_14);
0052c913                          class CCellPortal* eax_1;
0052c913                          eax_1 = ((((x87_r7_8 < x87_r6_14) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, x87_r6_14))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == x87_r6_14) ? 1 : 0) << 0xe) | 0x3800))));
0052c913                          
0052c918                          if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0052c918                          {
0052c91a                              long double temp1_1 = ((long double)var_4c_2);
0052c91a                              (x87_r7_8 - temp1_1);
0052c91e                              eax_1 = ((((x87_r7_8 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0052c920                              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0052c920                              
0052c923                              if (!(p_1))
0052c923                              {
0052c925                                  var_44 = 1;
0052c92d                                  break;
0052c923                              }
0052c918                          }
0052c918                          
0052c934                          edi_1 += 1;
0052c935                          ecx_3 = &ecx_3[4];
0052c93a                      } while (edi_1 < arg3);
0052c86a                  }
0052c85c              }
0052c85c              
0052c9bf              ebp += 0x18;
0052c9c2              bool cond:3_1 = (var_48 + 1) < this->num_portals;
0052c9c4              var_48 += 1;
0052c9c8              var_4c_1 = ebp;
0052c9c8              
0052c9cc              if (!(cond:3_1))
0052c9cc                  break;
0052c856          }
0052c856          
0052c9da          if (var_44 != 0)
0052c9f0              CLandCell::add_all_outside_cells(arg2, arg3, arg4, arg5);
0052c839      }
0052c820  }

0052c847                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
0052cad8                                                                          90 90 90 90 90 90 90 90                          ........

0052cae0  void __thiscall CEnvCell::find_transit_cells(class CEnvCell const* this, uint32_t const arg2, class CPhysicsPart** arg3, class CELLARRAY* arg4)

0052cae0  {
0052cae4      class CEnvCell* this_1 = this;
0052caf0      class CEnvCell* this_2 = this_1;
0052caf4      int32_t var_44 = 0;
0052caf8      int32_t var_48 = 0;
0052caf8      
0052cafc      if (this_1->num_portals > 0)
0052cafc      {
0052cb04          void* var_54_1 = nullptr;
0052ccca          bool cond:1_1;
0052ccca          
0052ccca          do
0052ccca          {
0052cb14              int32_t eax_1 = 0;
0052cb18              int32_t var_50_1 = 0;
0052cb18              
0052cb1c              if (arg2 > 0)
0052cb1c              {
0052cc76                  do
0052cc76                  {
0052cb26                      void* eax_2 = arg3[eax_1];
0052cb26                      
0052cb2b                      if (eax_2 != 0)
0052cb2b                      {
0052cb34                          void* ecx_3 = **(uint32_t**)((char*)eax_2 + 0x20);
0052cb36                          class AC1Legacy::Vector3* esi_1 = *(uint32_t*)((char*)ecx_3 + 0x74);
0052cb36                          
0052cb3b                          if (esi_1 != 0)
0052cb3b                          {
0052cb5a                          label_52cb5a:
0052cb5a                              float __return;
0052cb5a                              Position::localtolocal(&this_1->pos, &__return, ((char*)eax_2 + 0x30), esi_1);
0052cb65                              long double x87_r7_2 = (((long double)0.000199999995f) + ((long double)*(int32_t*)((char*)esi_1 + 0xc)));
0052cb68                              class CCellPortal* portals = this_1->portals;
0052cb76                              int32_t edi_1 = *(uint32_t*)(&portals->portal_side + var_54_1);
0052cb87                              float* esi_3 = (*(uint32_t*)(&portals->portal + var_54_1) + 0x20);
0052cba4                              float var_38;
0052cba4                              float var_34;
0052cba4                              long double x87_r7_8 = ((((((long double)var_38) * ((long double)esi_3[1])) + (((long double)var_34) * ((long double)esi_3[2]))) + (((long double)__return) * ((long double)*(uint32_t*)esi_3))) + ((long double)esi_3[3]));
0052cba4                              
0052cba7                              if (edi_1 == 0)
0052cba7                              {
0052cba9                                  long double temp1_1 = ((long double)((float)x87_r7_2));
0052cba9                                  (x87_r7_8 - temp1_1);
0052cba9                                  
0052cbb2                                  if ((*(uint8_t*)((char*)((((x87_r7_8 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0052cbb2                                      goto label_52cbdd;
0052cba7                              }
0052cba7                              else if (edi_1 != 1)
0052cbbd                              {
0052cbdd                              label_52cbdd:
0052cbdd                                  class BBox* eax_6 = CPhysicsPart::GetBoundingBox(arg3[var_50_1]);
0052cbf9                                  void var_30;
0052cbf9                                  BBox::LocalToLocal(&var_30, eax_6, &arg3[var_50_1]->pos, &this_1->pos);
0052cc05                                  int32_t eax_9;
0052cc05                                  int80_t st0_1;
0052cc05                                  st0_1 = Plane::intersect_box(esi_3, &var_30);
0052cc05                                  
0052cc0c                                  if (eax_9 != edi_1)
0052cc0c                                  {
0052cc1c                                      class CCellPortal* ecx_10 = ((char*)var_54_1 + this_2->portals);
0052cc1c                                      
0052cc21                                      if (ecx_10->other_cell_id == 0xffffffff)
0052cc21                                      {
0052cc7e                                          var_44 = 1;
0052ccaa                                          this_1 = this_2;
0052ccaa                                          break;
0052cc21                                      }
0052cc21                                      
0052cc2a                                      int32_t do_not_load_cells = arg4->do_not_load_cells;
0052cc2b                                      class CEnvCell* eax_12 = CCellPortal::GetOtherCell(ecx_10, this_2);
0052cc34                                      uint32_t id;
0052cc34                                      class CEnvCell* var_6c_6;
0052cc34                                      
0052cc34                                      if (eax_12 == 0)
0052cc34                                      {
0052cca0                                          var_6c_6 = nullptr;
0052cca2                                          id = *(uint32_t*)(this_2->portals + var_54_1);
0052cca5                                      label_52cca5:
0052cca5                                          CELLARRAY::add_cell(arg4, id, var_6c_6);
0052ccaa                                          this_1 = this_2;
0052ccaa                                          break;
0052cc34                                      }
0052cc34                                      
0052cc4a                                      void var_18;
0052cc4a                                      BBox::LocalToLocal(&var_18, eax_6, &arg3[var_50_1]->pos, &eax_12->pos);
0052cc4a                                      
0052cc61                                      if (CCellStruct::box_intersects_cell(eax_12->structure, &var_18) != 0)
0052cc61                                      {
0052cc8b                                          var_6c_6 = eax_12;
0052cc8c                                          id = eax_12->m_DID.id;
0052cc8d                                          goto label_52cca5;
0052cc61                                      }
0052cc0c                                  }
0052cc0c                                  
0052cc63                                  this_1 = this_2;
0052cbbd                              }
0052cbbd                              else
0052cbbd                              {
0052cbbf                                  (x87_r7_8 - ((long double)((float)-(x87_r7_2))));
0052cbc5                                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0052cbc5                                  
0052cbc8                                  if (p_1)
0052cbc8                                      goto label_52cbdd;
0052cbbd                              }
0052cb3b                          }
0052cb3b                          else
0052cb3b                          {
0052cb3d                              esi_1 = *(uint32_t*)((char*)ecx_3 + 0x90);
0052cb3d                              
0052cb45                              if (esi_1 != 0)
0052cb45                                  goto label_52cb5a;
0052cb3b                          }
0052cb2b                      }
0052cb2b                      
0052cc6f                      eax_1 = (var_50_1 + 1);
0052cc72                      var_50_1 = eax_1;
0052cc76                  } while (eax_1 < arg2);
0052cb1c              }
0052cb1c              
0052ccc0              cond:1_1 = (var_48 + 1) < this_1->num_portals;
0052ccc2              var_48 += 1;
0052ccc6              var_54_1 += 0x18;
0052ccca          } while (cond:1_1);
0052ccca          
0052ccd9          if (var_44 != 0)
0052ccea              CLandCell::add_all_outside_cells(arg2, arg3, arg4);
0052cafc      }
0052cae0  }

0052ccf9                                                                             90 90 90 90 90 90 90                           .......

0052cd00  uint32_t __thiscall CEnvCell::Pack(class CEnvCell* this, void** arg2, uint32_t arg3)

0052cd00  {
0052cd00      class CEnvCell* this_1 = this;
0052cd12      uint32_t result = CEnvCell::pack_size(((char*)this - 0x30));
0052cd16      uint32_t result_1 = result;
0052cd16      
0052cd1a      if (arg3 >= result)
0052cd1a      {
0052cd26          int32_t eax_1 = 0;
0052cd26          
0052cd2a          if (this->light_list.blocksize != 0)
0052cd2c              eax_1 = 1;
0052cd2c          
0052cd39          if (this->num_stabs != 0)
0052cd3b              eax_1 |= 2;
0052cd3b          
0052cd46          if (this->object_list.next_available != 0)
0052cd48              eax_1 |= 8;
0052cd48          
0052cd52          **(uint32_t**)arg2 = eax_1;
0052cd56          void* eax_3 = (*(uint32_t*)arg2 + 4);
0052cd59          *(uint32_t*)arg2 = eax_3;
0052cd5e          *(uint32_t*)eax_3 = *(int32_t*)((char*)this + -8);
0052cd62          void* edx_3 = (*(uint32_t*)arg2 + 4);
0052cd65          *(uint32_t*)arg2 = edx_3;
0052cd67          void* ecx_4;
0052cd67          ecx_4 = this->shadow_object_list.data;
0052cd6f          *(uint8_t*)edx_3 = ecx_4;
0052cd73          char* ecx_6 = (*(uint32_t*)arg2 + 1);
0052cd74          *(uint32_t*)arg2 = ecx_6;
0052cd76          edx_3 = this->restriction_obj;
0052cd7e          *(uint8_t*)ecx_6 = edx_3;
0052cd82          int16_t* eax_7 = (*(uint32_t*)arg2 + 1);
0052cd83          *(uint32_t*)arg2 = eax_7;
0052cd85          ecx_6 = this->num_lights;
0052cd8c          *(uint16_t*)eax_7 = ecx_6;
0052cd91          void* edx_5 = (*(uint32_t*)arg2 + 2);
0052cd94          *(uint32_t*)arg2 = edx_5;
0052cd9c          void* eax_8 = edx_5;
0052cd9e          int32_t i = 0;
0052cd9e          
0052cda2          if (this->shadow_object_list.data > 0)
0052cda2          {
0052cdce              do
0052cdce              {
0052cdaa                  void* ecx_9 = *(uint32_t*)(this->shadow_object_list.blocksize + (i << 2));
0052cdaa                  
0052cdaf                  if (ecx_9 == 0)
0052cdb9                      *(uint16_t*)eax_8 = 0;
0052cdaf                  else
0052cdb4                      *(uint16_t*)eax_8 = ((int16_t)*(uint32_t*)((char*)ecx_9 + 0x28));
0052cdb4                  
0052cdc0                  eax_8 = (*(uint32_t*)arg2 + 2);
0052cdc3                  *(uint32_t*)arg2 = eax_8;
0052cdcb                  i += 1;
0052cdce              } while (i < this->shadow_object_list.data);
0052cda2          }
0052cda2          
0052cdd9          *(uint16_t*)eax_8 = ((int16_t)*(uint32_t*)(this->shadow_object_list.sizeOf + 0x28));
0052cdde          void* ecx_14 = (*(uint32_t*)arg2 + 2);
0052cde1          *(uint32_t*)arg2 = ecx_14;
0052cdeb          uint32_t edx_6;
0052cdeb          edx_6 = *(uint16_t*)this->shadow_object_list.next_available;
0052cdee          *(uint16_t*)ecx_14 = edx_6;
0052cdfb          *(uint32_t*)arg2 += 2;
0052cdfd          Frame::Pack(&this->m_AllowedInFreeList, arg2, arg3);
0052ce08          int32_t i_1 = 0;
0052ce08          
0052ce0c          if (this->restriction_obj > 0)
0052ce0c          {
0052ce0e              int32_t ebp = 0;
0052ce0e              
0052ce2f              do
0052ce2f              {
0052ce1e                  CCellPortal::Pack((this->clip_planes + ebp), arg2, arg3);
0052ce29                  i_1 += 1;
0052ce2a                  ebp += 0x18;
0052ce2f              } while (i_1 < this->restriction_obj);
0052ce2f              
0052ce31              result = result_1;
0052ce0c          }
0052ce0c          
0052ce3b          int32_t i_2 = 0;
0052ce3b          
0052ce3f          if (this->num_lights > 0)
0052ce3f          {
0052ce5c              do
0052ce5c              {
0052ce47                  class LIGHTOBJ const** ecx_19;
0052ce47                  ecx_19 = this->light_list.data[i_2];
0052ce4d                  **(uint16_t**)arg2 = ecx_19;
0052ce50                  *(uint32_t*)arg2 += 2;
0052ce59                  i_2 += 1;
0052ce5c              } while (i_2 < this->num_lights);
0052ce3f          }
0052ce3f          
0052ce5e          uint32_t num_stabs = this->num_stabs;
0052ce5e          
0052ce66          if (num_stabs != 0)
0052ce66          {
0052ce6a              **(uint32_t**)arg2 = num_stabs;
0052ce6c              *(uint32_t*)arg2 += 4;
0052ce75              int32_t i_3 = 0;
0052ce75              
0052ce79              if (this->num_stabs > 0)
0052ce79              {
0052ce7b                  int32_t ebp_1 = 0;
0052ce7b                  
0052ceaf                  do
0052ceaf                  {
0052ce8b                      **(uint32_t**)arg2 = this->stab_list[i_3];
0052ce8d                      *(uint32_t*)arg2 += 4;
0052ce9e                      Frame::Pack((this->seen_outside + ebp_1), arg2, arg3);
0052cea9                      i_3 += 1;
0052ceaa                      ebp_1 += 0x40;
0052ceaf                  } while (i_3 < this->num_stabs);
0052ceaf                  
0052ceb1                  result = result_1;
0052ce79              }
0052ce66          }
0052ce66          
0052ceb5          uint32_t next_available = this->object_list.next_available;
0052ceb5          
0052cebd          if (next_available != 0)
0052cebd          {
0052cec1              **(uint32_t**)arg2 = next_available;
0052cec3              *(uint32_t*)arg2 += 4;
0052cebd          }
0052cd1a      }
0052cd1a      
0052cecd      return result;
0052cd00  }


0052ced0  void __thiscall DArray<ClipPlane>::grow(class DArray<ClipPlane>* this, uint32_t arg2)

0052ced0  {
0052ced0      class DArray<ClipPlane>* this_1 = this;
0052ced2      uint32_t ebp = arg2;
0052ced2      
0052cedc      if (ebp <= this->sizeOf)
0052cedc      {
0052cedf          DArray<ClipPlane>::shrink(this, ebp);
0052cee7          return;
0052cedc      }
0052cedc      
0052cef4      void* eax_1 = operator new[](((ebp << 3) + 4));
0052cefe      void* edi;
0052cefe      
0052cefe      if (eax_1 == 0)
0052cf15          edi = nullptr;
0052cefe      else
0052cefe      {
0052cf06          edi = ((char*)eax_1 + 4);
0052cf0c          *(uint32_t*)eax_1 = ebp;
0052cf0e          `vector constructor iterator'(edi, 8, ebp, AvailableProperty::AvailableProperty);
0052cefe      }
0052cefe      
0052cf1a      int32_t i = 0;
0052cf1a      
0052cf1e      if (this->sizeOf > 0)
0052cf1e      {
0052cf3e          do
0052cf3e          {
0052cf20              int32_t* data = this->data;
0052cf22              int32_t* ecx_1 = (i << 3);
0052cf2e              *(uint32_t*)((char*)ecx_1 + edi) = *(uint32_t*)((char*)data + ecx_1);
0052cf34              *(uint32_t*)(((char*)ecx_1 + edi) + 4) = *(uint32_t*)(((char*)data + ecx_1) + 4);
0052cf3b              i += 1;
0052cf3e          } while (i < this->sizeOf);
0052cf1e      }
0052cf1e      
0052cf40      class ClipPlane* data_1 = this->data;
0052cf40      
0052cf44      if (data_1 != 0)
0052cf44      {
0052cf46          int32_t plane = data_1->plane;
0052cf4c          void* ebx_2 = &data_1[plane];
0052cf4c          
0052cf54          if ((plane - 1) >= 0)
0052cf54          {
0052cf56              int32_t ebp_1 = plane;
0052cf6b              int32_t i_1;
0052cf6b              
0052cf6b              do
0052cf6b              {
0052cf60                  ebx_2 -= 8;
0052cf65                  IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ebx_2);
0052cf6a                  i_1 = ebp_1;
0052cf6a                  ebp_1 -= 1;
0052cf6b              } while (i_1 != 1);
0052cf6d              ebp = arg2;
0052cf54          }
0052cf54          
0052cf76          operator delete[](((char*)data_1 - 4));
0052cf44      }
0052cf44      
0052cf7e      this->data = edi;
0052cf82      this->sizeOf = ebp;
0052ced0  }

0052cf8b                                   90 90 90 90 90                                                             .....

0052cf90  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CEnvCell *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CEnvCell *> *,0>* this, uint32_t arg2)

0052cf90  {
0052cf93      class HashTableData<unsigned long,CEnvCell *>** m_buckets = this->m_buckets;
0052cf9b      this->vtable = 0x7c8d38;
0052cf9b      
0052cfa1      if (m_buckets != &this->m_aInplaceBuckets)
0052cfa4          operator delete[](m_buckets);
0052cfa4      
0052cfae      this->m_buckets = nullptr;
0052cfb1      this->m_firstInterestingBucket = nullptr;
0052cfb4      this->m_numBuckets = 0;
0052cfb7      this->m_numElements = 0;
0052cfb7      
0052cfbf      if ((arg2 & 1) != 0)
0052cfc2          operator delete(this);
0052cfc2      
0052cfcd      return this;
0052cf90  }


0052cfd0  void __thiscall DArray<ClipPlane>::shrink(class DArray<ClipPlane>* this, uint32_t arg2)

0052cfd0  {
0052cfd0      class DArray<ClipPlane>* this_1 = this;
0052cfd2      uint32_t ebp = arg2;
0052cfd2      
0052cfdc      if (ebp > this->sizeOf)
0052cfdc      {
0052cfdf          DArray<ClipPlane>::grow(this, ebp);
0052cfe7          return;
0052cfdc      }
0052cfdc      
0052cfee      if (ebp != 0)
0052cfee      {
0052d03d          uint32_t* eax_3 = operator new[](((ebp << 3) + 4));
0052d047          void* edi_2;
0052d047          
0052d047          if (eax_3 == 0)
0052d05e              edi_2 = nullptr;
0052d047          else
0052d047          {
0052d04f              edi_2 = &eax_3[1];
0052d055              *(uint32_t*)eax_3 = ebp;
0052d057              `vector constructor iterator'(edi_2, 8, ebp, AvailableProperty::AvailableProperty);
0052d047          }
0052d047          
0052d060          int32_t i = 0;
0052d064          this->sizeOf = ebp;
0052d064          
0052d067          if (ebp > 0)
0052d067          {
0052d08e              do
0052d08e              {
0052d070                  class ClipPlane* data = this->data;
0052d072                  int32_t* ecx_2 = (i << 3);
0052d07e                  *(uint32_t*)((char*)ecx_2 + edi_2) = *(uint32_t*)((char*)data + ecx_2);
0052d084                  *(uint32_t*)(((char*)ecx_2 + edi_2) + 4) = *(uint32_t*)(&data->side + ecx_2);
0052d08b                  i += 1;
0052d08e              } while (i < this->sizeOf);
0052d067          }
0052d067          
0052d090          class ClipPlane* data_2 = this->data;
0052d090          
0052d094          if (data_2 != 0)
0052d094          {
0052d096              int32_t plane_1 = data_2->plane;
0052d09c              void* ebx_3 = &data_2[plane_1];
0052d09c              
0052d0a4              if ((plane_1 - 1) >= 0)
0052d0a4              {
0052d0a6                  int32_t ebp_1 = plane_1;
0052d0bb                  int32_t i_1;
0052d0bb                  
0052d0bb                  do
0052d0bb                  {
0052d0b0                      ebx_3 -= 8;
0052d0b5                      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ebx_3);
0052d0ba                      i_1 = ebp_1;
0052d0ba                      ebp_1 -= 1;
0052d0bb                  } while (i_1 != 1);
0052d0c1                  ebp = arg2;
0052d0a4              }
0052d0a4              
0052d0c6              operator delete[](((char*)data_2 - 4));
0052d094          }
0052d094          
0052d0ce          this->data = edi_2;
0052cfee      }
0052cfee      else
0052cfee      {
0052cff0          class ClipPlane* data_1 = this->data;
0052cff4          this->sizeOf = ebp;
0052cff4          
0052cff7          if (data_1 != 0)
0052cff7          {
0052cff9              int32_t plane = data_1->plane;
0052cfff              void* edi_1 = &data_1[plane];
0052cfff              
0052d007              if ((plane - 1) >= 0)
0052d007              {
0052d009                  int32_t ebx_1 = plane;
0052d01b                  int32_t i_2;
0052d01b                  
0052d01b                  do
0052d01b                  {
0052d010                      edi_1 -= 8;
0052d015                      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(edi_1);
0052d01a                      i_2 = ebx_1;
0052d01a                      ebx_1 -= 1;
0052d01b                  } while (i_2 != 1);
0052d007              }
0052d007              
0052d022              operator delete[](((char*)data_1 - 4));
0052cff7          }
0052cff7          
0052d02a          this->data = 0;
0052cfee      }
0052cfee      
0052d0d5      if (this->next_available > ebp)
0052d0d7          this->next_available = ebp;
0052cfd0  }


0052d0e0  class DBObj* CEnvCell::Allocate(class CEnvCell const* this @ ecx)

0052d0e0  {
0052d0e0      /* tailcall */
0052d0e0      return CEnvCell::Allocator();
0052d0e0  }

0052d0e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0052d0f0  void __fastcall CEnvCell::calc_clip_planes(class CEnvCell* this)

0052d0f0  {
0052d0f0      int32_t ebp;
0052d0f0      int32_t var_4 = ebp;
0052d0f0      
0052d107      if (this->clip_planes == 0)
0052d107      {
0052d10b          void* eax_1 = operator new[](4);
0052d110          this->clip_planes = eax_1;
0052d119          *(uint32_t*)eax_1 = 0;
0052d107      }
0052d107      
0052d128      if (*(uint32_t*)this->clip_planes == 0)
0052d128      {
0052d12c          void* eax_3 = operator new(0x18);
0052d136          class ClipPlaneList* eax_4;
0052d136          
0052d136          if (eax_3 == 0)
0052d141              eax_4 = nullptr;
0052d136          else
0052d13a              eax_4 = ClipPlaneList::ClipPlaneList(eax_3);
0052d13a          
0052d149          *(uint32_t*)this->clip_planes = eax_4;
0052d128      }
0052d128      
0052d151      int32_t i = 0;
0052d151      
0052d155      if (this->num_portals > 0)
0052d155      {
0052d157          void* ebx_1 = nullptr;
0052d157          
0052d1c8          do
0052d1c8          {
0052d160              class CCellPortal* portals = this->portals;
0052d179              int32_t var_10;
0052d179              ClipPlane::ClipPlane(&var_10, (*(uint32_t*)(&portals->portal + ebx_1) + 0x20), *(uint32_t*)(&portals->portal_side + ebx_1));
0052d184              class ClipPlaneList* esi_1 = *(uint32_t*)this->clip_planes;
0052d186              uint32_t sizeOf = esi_1->cplane_list.sizeOf;
0052d186              
0052d18b              if (esi_1->cplane_num >= sizeOf)
0052d194                  DArray<ClipPlane>::grow(&esi_1->cplane_list, (sizeOf + 5));
0052d194              
0052d199              uint32_t cplane_num = esi_1->cplane_num;
0052d19b              class ClipPlane* data = esi_1->cplane_list.data;
0052d1a1              esi_1->cplane_num = (cplane_num + 1);
0052d1a7              void* eax_9 = &data[cplane_num];
0052d1aa              *(uint32_t*)eax_9 = var_10;
0052d1b4              int32_t var_c;
0052d1b4              *(uint32_t*)((char*)eax_9 + 4) = var_c;
0052d1b7              IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&var_10);
0052d1c2              i += 1;
0052d1c3              ebx_1 += 0x18;
0052d1c8          } while (i < this->num_portals);
0052d155      }
0052d155      
0052d0fa      var_4;
0052d0f0  }

0052d1d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0052d1e0  int32_t CEnvCell::PreFetchCells(class IDClass<_tagDataID,32,0> arg1, uint32_t* arg2)

0052d1e0  {
0052d1f5      int32_t result = 1;
0052d1fa      *(uint32_t*)arg2 = 0;
0052d206      void var_8;
0052d206      enum CACHE_OBJECT_CODES eax_1 = DBObj::PreFetch(QualifiedDataID::QualifiedDataID(&var_8, arg1, 3));
0052d206      
0052d215      if ((eax_1 != CACHE_OBJECT_IN_MEMORY && eax_1 != CACHE_OBJECT_IN_FILE))
0052d21f          return 0;
0052d21f      
0052d22d      class DBObj* eax_4 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 3));
0052d22d      
0052d239      if (eax_4 != 0)
0052d239      {
0052d245          if (CEnvCell::PreFetchCells(eax_4, arg2) == 0)
0052d247              result = 0;
0052d247          
0052d249          eax_4->vtable->Release();
0052d239      }
0052d239      
0052d258      return result;
0052d1e0  }

0052d259                                                                             90 90 90 90 90 90 90                           .......

0052d260  void __thiscall CEnvCell::GetSubDataIDs(class CEnvCell const* this, class QualifiedDataIDArray* arg2)

0052d260  {
0052d277      int32_t i = 0;
0052d27b      void var_10;
0052d27b      
0052d27b      if (this->num_surfaces > 0)
0052d27b      {
0052d2af          do
0052d2af          {
0052d286              void* eax_2 = this->surfaces[i];
0052d286              
0052d28b              if (eax_2 != 0)
0052d2a1                  QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)((char*)eax_2 + 0x28), 0), 0);
0052d2a1              
0052d2ac              i += 1;
0052d2af          } while (i < this->num_surfaces);
0052d27b      }
0052d27b      
0052d2b1      class CEnvironment* env = this->env;
0052d2b1      
0052d2b9      if (env != 0)
0052d2cf          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, env->m_DID.id, 0), 0);
0052d2cf      
0052d2da      int32_t i_1 = 0;
0052d2da      
0052d2de      if (this->num_static_objects > 0)
0052d2de      {
0052d308          do
0052d308          {
0052d2fa              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, this->static_object_ids[i_1].id, 0), 0);
0052d305              i_1 += 1;
0052d308          } while (i_1 < this->num_static_objects);
0052d2de      }
0052d260  }

0052d313                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0052d320  void __fastcall DArray<view_vertex>::~DArray<view_vertex>(class DArray<view_vertex>* this)

0052d320  {
0052d323      struct view_vertex* data = this->data;
0052d323      
0052d328      if (data != 0)
0052d328      {
0052d32a          int32_t i_2 = *(uint32_t*)((char*)data->pt + -4);
0052d336          void* esi_1 = &data[i_2];
0052d336          
0052d339          if ((i_2 - 1) >= 0)
0052d339          {
0052d33c              int32_t i_1 = i_2;
0052d34b              int32_t i;
0052d34b              
0052d34b              do
0052d34b              {
0052d340                  esi_1 -= 0x18;
0052d345                  IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(esi_1);
0052d34a                  i = i_1;
0052d34a                  i_1 -= 1;
0052d34b              } while (i != 1);
0052d339          }
0052d339          
0052d34f          operator delete[](((char*)data - 4));
0052d328      }
0052d328      
0052d359      this->data = 0;
0052d320  }

0052d362        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0052d370  int32_t __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(class PackableHashTable<IDClass<_tagDataID,32,0>,int>* this, class IDClass<_tagDataID,32,0>* arg2, int32_t const* arg3)

0052d370  {
0052d37a      uint32_t _table_size = this->_table_size;
0052d37a      
0052d37f      if (_table_size == 0)
0052d37f      {
0052d3ae      label_52d3ae:
0052d3ae          void* eax_4 = operator new(0x10);
0052d3ae          
0052d3ba          if (eax_4 != 0)
0052d3ba          {
0052d3bf              uint32_t _table_size_1 = this->_table_size;
0052d3c6              *(uint32_t*)eax_4 = arg2->id;
0052d3ca              *(uint32_t*)((char*)eax_4 + 4) = *(uint32_t*)arg3;
0052d3cd              *(uint32_t*)((char*)eax_4 + 8) = 0;
0052d3d9              uint32_t temp1_2 = (COMBINE(0, arg2->id) % _table_size_1);
0052d3dc              *(uint32_t*)((char*)eax_4 + 0xc) = temp1_2;
0052d3e7              *(uint32_t*)((char*)eax_4 + 8) = this->_buckets[temp1_2];
0052d3ea              this->_buckets[temp1_2] = eax_4;
0052d3f0              this->_currNum += 1;
0052d3fb              return 1;
0052d3ba          }
0052d37f      }
0052d37f      else
0052d37f      {
0052d381          class PackableHashData<IDClass<_tagDataID,32,0>,int>** _buckets = this->_buckets;
0052d381          
0052d386          if (_buckets == 0)
0052d386              goto label_52d3ae;
0052d386          
0052d388          uint32_t id = arg2->id;
0052d391          int32_t* edx_3 = _buckets[(COMBINE(0, id) % _table_size)];
0052d391          
0052d396          if (edx_3 == 0)
0052d396              goto label_52d3ae;
0052d396          
0052d39a          while (id != *(uint32_t*)edx_3)
0052d39a          {
0052d39c              edx_3 = edx_3[2];
0052d39c              
0052d3a1              if (edx_3 == 0)
0052d3a1                  goto label_52d3ae;
0052d39a          }
0052d39a          
0052d3aa          if (edx_3 == 0xfffffffc)
0052d3aa              goto label_52d3ae;
0052d37f      }
0052d37f      
0052d404      return 0;
0052d370  }

0052d407                       90 90 90 90 90 90 90 90 90                                                         .........

0052d410  void CEnvCell::add_dynamic_lights()

0052d410  {
0052d420      void __return;
0052d420      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&CEnvCell::visible_cell_table.m_intrusiveTable, &__return);
0052d425      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
0052d42a      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0052d42c      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0052d42c      
0052d42f      if (i_1 != 0)
0052d42f      {
0052d434          while (true)
0052d434          {
0052d434              CObjCell::add_dynamic_to_global_lights(i_1->m_data);
0052d439              i_1 = i_1->m_hashNext;
0052d439              
0052d43e              if (i_1 == 0)
0052d43e              {
0052d45b                  class HashTableData<unsigned long,DBOCache *>* i;
0052d45b                  
0052d45b                  do
0052d45b                  {
0052d450                      m_currBucket = &m_currBucket[1];
0052d450                      
0052d455                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0052d469                          return;
0052d469                      
0052d457                      i = *(uint32_t*)m_currBucket;
0052d45b                  } while (i == 0);
0052d45b                  
0052d45d                  i_1 = i;
0052d45d                  
0052d461                  if (i_1 == 0)
0052d461                      break;
0052d43e              }
0052d434          }
0052d42f      }
0052d410  }

0052d46a                                90 90 90 90 90 90                                                            ......

0052d470  int32_t __thiscall CEnvCell::UnPack(class CEnvCell* this, void** arg2, uint32_t arg3)

0052d470  {
0052d47b      void* __offset(CEnvCell, -0x30) ebx = ((char*)this - 0x30);
0052d485      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
0052d488      void** edi = arg2;
0052d48c      void* eax_1 = *(uint32_t*)edi;
0052d48e      char ecx_1 = ((int8_t)*(uint32_t*)eax_1);
0052d49a      *(uint32_t*)edi = ((char*)eax_1 + 4);
0052d49f      this->light_list.blocksize = (((uint32_t)ecx_1) & 1);
0052d4a5      void* eax_3 = *(uint32_t*)edi;
0052d4a7      int32_t ebp = *(uint32_t*)eax_3;
0052d4ac      *(uint32_t*)edi = ((char*)eax_3 + 4);
0052d4b3      *(uint32_t*)(*(int32_t*)((char*)ADJ(ebx) + -0x30) + 0x44)(ebp);
0052d4b6      void* eax_5 = *(uint32_t*)edi;
0052d4ba      uint32_t ebp_1 = (ebp & 0xffff0000);
0052d4c1      *(uint32_t*)edi = ((char*)eax_5 + 1);
0052d4c6      this->shadow_object_list.data = ((uint32_t)*(uint8_t*)eax_5);
0052d4cc      void* eax_8 = *(uint32_t*)edi;
0052d4ce      char ecx_5 = *(uint8_t*)eax_8;
0052d4d1      *(uint32_t*)edi = ((char*)eax_8 + 1);
0052d4d6      this->restriction_obj = ((uint32_t)ecx_5);
0052d4dc      void* eax_10 = *(uint32_t*)edi;
0052d4de      uint32_t ecx_6;
0052d4de      ecx_6 = *(uint16_t*)eax_10;
0052d4e4      *(uint32_t*)edi = ((char*)eax_10 + 2);
0052d4ef      int32_t eax_13 = (this->shadow_object_list.data << 2);
0052d4f7      this->num_lights = ((uint32_t)ecx_6);
0052d4fd      void* eax_14;
0052d4fd      uint32_t ecx_7;
0052d4fd      eax_14 = operator new[](eax_13);
0052d502      this->shadow_object_list.blocksize = eax_14;
0052d511      int32_t i = 0;
0052d515      void* var_c;
0052d515      
0052d515      if (this->shadow_object_list.data > 0)
0052d515      {
0052d550          do
0052d550          {
0052d517              void* eax_16 = *(uint32_t*)edi;
0052d519              ecx_7 = *(uint16_t*)eax_16;
0052d51f              *(uint32_t*)edi = ((char*)eax_16 + 2);
0052d544              *(uint32_t*)(this->shadow_object_list.blocksize + (i << 2)) = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_c, (((uint32_t)ecx_7) | 0x8000000), 0xd));
0052d54d              i += 1;
0052d550          } while (i < this->shadow_object_list.data);
0052d515      }
0052d515      
0052d552      void* eax_23 = *(uint32_t*)edi;
0052d554      ecx_7 = *(uint16_t*)eax_23;
0052d55a      *(uint32_t*)edi = ((char*)eax_23 + 2);
0052d55c      i = *(uint16_t*)((char*)eax_23 + 2);
0052d562      *(uint32_t*)edi = ((char*)eax_23 + 4);
0052d579      class DBObj* eax_29 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_c, (((uint32_t)ecx_7) | 0xd000000), 0x10));
0052d583      this->shadow_object_list.sizeOf = eax_29;
0052d583      
0052d589      if (eax_29 != 0)
0052d596          this->shadow_object_list.next_available = CEnvironment::get_cellstruct(eax_29, ((uint32_t)i));
0052d596      
0052d5a8      this->m_DID.id = *(int32_t*)((char*)this + -8);
0052d5ab      Frame::UnPack(&this->m_AllowedInFreeList, edi, arg3);
0052d5b0      uint32_t restriction_obj = this->restriction_obj;
0052d5b0      
0052d5b8      if (restriction_obj > 0)
0052d5b8      {
0052d5ca          void* eax_33 = operator new[](((restriction_obj * 0x18) + 4));
0052d5d4          void* eax_34;
0052d5d4          
0052d5d4          if (eax_33 == 0)
0052d60d              eax_34 = nullptr;
0052d5d4          else
0052d5d4          {
0052d5d6              eax_34 = ((char*)eax_33 + 4);
0052d5d9              *(uint32_t*)((char*)eax_34 - 4) = restriction_obj;
0052d5df              var_c = eax_34;
0052d5e3              arg2 = eax_34;
0052d5e3              
0052d5e7              if ((restriction_obj - 1) >= 0)
0052d5e7              {
0052d5e9                  int32_t ebp_3 = restriction_obj;
0052d605                  int32_t i_1;
0052d605                  
0052d605                  do
0052d605                  {
0052d5f4                      CCellPortal::CCellPortal(arg2);
0052d600                      i_1 = ebp_3;
0052d600                      ebp_3 -= 1;
0052d601                      arg2 = &arg2[6];
0052d605                  } while (i_1 != 1);
0052d607                  eax_34 = var_c;
0052d5e7              }
0052d5d4          }
0052d5d4          
0052d60f          this->clip_planes = eax_34;
0052d61d          arg2 = nullptr;
0052d61d          
0052d625          if (this->restriction_obj > 0)
0052d625          {
0052d627              int32_t ebp_4 = 0;
0052d67b              bool cond:3_1;
0052d67b              
0052d67b              do
0052d67b              {
0052d648                  CCellPortal::UnPack((this->clip_planes + ebp_4), ebp_1, &var_c, edi, arg3);
0052d663                  *(uint32_t*)((this->clip_planes + ebp_4) + 8) = CCellStruct::get_portal(this->shadow_object_list.next_available, ((int16_t)var_c));
0052d672                  ebp_4 += 0x18;
0052d675                  cond:3_1 = ((char*)arg2 + 1) < this->restriction_obj;
0052d677                  arg2 += 1;
0052d67b              } while (cond:3_1);
0052d625          }
0052d5b8      }
0052d5b8      
0052d67d      uint32_t num_lights = this->num_lights;
0052d67d      
0052d685      if (num_lights > 0)
0052d685      {
0052d68b          void* eax_41;
0052d68b          class LIGHTOBJ const** edx_5;
0052d68b          eax_41 = operator new[]((num_lights << 2));
0052d696          this->light_list.data = eax_41;
0052d69f          int32_t i_2 = 0;
0052d69f          
0052d6a3          if (this->num_lights > 0)
0052d6a3          {
0052d6ca              do
0052d6ca              {
0052d6a5                  void* ecx_23 = *(uint32_t*)edi;
0052d6a7                  edx_5 = *(uint16_t*)ecx_23;
0052d6b1                  *(uint32_t*)edi = ((char*)ecx_23 + 2);
0052d6b6                  this->light_list.data[i_2] = (((uint32_t)edx_5) | ebp_1);
0052d6c7                  i_2 += 1;
0052d6ca              } while (i_2 < this->num_lights);
0052d6a3          }
0052d685      }
0052d685      
0052d6d1      if ((ecx_1 & 2) != 0)
0052d6d1      {
0052d6db          this->num_stabs = **(uint32_t**)edi;
0052d6e1          *(uint32_t*)edi += 4;
0052d6e4          uint32_t num_stabs = this->num_stabs;
0052d6e4          
0052d6ec          if (num_stabs > 0)
0052d6ec          {
0052d6fa              uint32_t* eax_43 = operator new[](((num_stabs << 2) + 4));
0052d704              void* eax_44;
0052d704              
0052d704              if (eax_43 == 0)
0052d70d                  eax_44 = nullptr;
0052d704              else
0052d704              {
0052d706                  *(uint32_t*)eax_43 = num_stabs;
0052d708                  eax_44 = &eax_43[1];
0052d704              }
0052d704              
0052d70f              uint32_t num_stabs_1 = this->num_stabs;
0052d715              this->stab_list = eax_44;
0052d724              void* eax_48 = operator new[](((num_stabs_1 << 6) + 4));
0052d72e              void* eax_51;
0052d72e              
0052d72e              if (eax_48 == 0)
0052d78c                  eax_51 = nullptr;
0052d72e              else
0052d72e              {
0052d730                  void* ebx_1 = ((char*)eax_48 + 4);
0052d733                  *(uint32_t*)eax_48 = num_stabs_1;
0052d73c                  var_c = ebx_1;
0052d73c                  
0052d740                  if ((num_stabs_1 - 1) >= 0)
0052d740                  {
0052d743                      void* ebp_6 = ((char*)ebx_1 + 0x3c);
0052d746                      arg2 = num_stabs_1;
0052d77e                      bool cond:8_1;
0052d77e                      
0052d77e                      do
0052d77e                      {
0052d750                          *(uint32_t*)ebx_1 = 0x3f800000;
0052d756                          *(uint32_t*)((char*)ebp_6 - 0x38) = 0;
0052d759                          *(uint32_t*)((char*)ebp_6 - 0x34) = 0;
0052d75c                          *(uint32_t*)((char*)ebp_6 - 0x30) = 0;
0052d761                          *(uint32_t*)((char*)ebp_6 - 8) = 0;
0052d764                          *(uint32_t*)((char*)ebp_6 - 4) = 0;
0052d767                          *(uint32_t*)ebp_6 = 0;
0052d76a                          Frame::cache(ebx_1);
0052d773                          ebx_1 += 0x40;
0052d776                          ebp_6 += 0x40;
0052d779                          cond:8_1 = arg2 != 1;
0052d77a                          arg2 -= 1;
0052d77e                      } while (cond:8_1);
0052d780                      ebx_1 = var_c;
0052d740                  }
0052d740                  
0052d784                  eax_51 = ebx_1;
0052d786                  ebx = ebx;
0052d72e              }
0052d72e              
0052d78e              this->seen_outside = eax_51;
0052d79a              int32_t i_3 = 0;
0052d79a              
0052d79e              if (this->num_stabs > 0)
0052d79e              {
0052d7a0                  arg2 = nullptr;
0052d7a0                  
0052d7e3                  do
0052d7e3                  {
0052d7a4                      void* eax_53 = *(uint32_t*)edi;
0052d7a6                      int32_t edx_7 = *(uint32_t*)eax_53;
0052d7b4                      *(uint32_t*)edi = ((char*)eax_53 + 4);
0052d7a8                      this->stab_list[i_3] = edx_7;
0052d7ca                      Frame::UnPack((this->seen_outside + arg2), edi, arg3);
0052d7d9                      i_3 += 1;
0052d7df                      arg2 = &arg2[0x10];
0052d7e3                  } while (i_3 < this->num_stabs);
0052d79e              }
0052d6ec          }
0052d6d1      }
0052d6d1      
0052d7ea      if ((ecx_1 & 8) == 0)
0052d7fb          this->object_list.next_available = 0;
0052d7ea      else
0052d7ea      {
0052d7f0          this->object_list.next_available = **(uint32_t**)edi;
0052d7f6          *(uint32_t*)edi += 4;
0052d7ea      }
0052d7ea      
0052d780      ADJ(ebx)->myLandBlock_ = operator new[]((*(uint32_t*)(ADJ(ebx)->shadow_object_list.next_available + 0x24) * 0xc));
0052d825      CEnvCell::calc_clip_planes(ebx);
0052d825      
0052d831      if (DBCache::IsRunTime() != 0)
0052d831      {
0052d839          bool cond:5_1 = ADJ(ebx)->num_surfaces != 0;
0052d780          ADJ(ebx)->surfaces = 1;
0052d84b          uint32_t eax_67;
0052d84b          
0052d84b          if (!(cond:5_1))
0052d84b          {
0052d84d              uint32_t next_available = ADJ(ebx)->shadow_object_list.next_available;
0052d87a              eax_67 = ((uint32_t)D3DPolyRender::ConstructMesh(ADJ(ebx)->shadow_object_list.data, ADJ(ebx)->shadow_object_list.blocksize, (next_available + 4), *(uint32_t*)(next_available + 0x3c), *(uint32_t*)(next_available + 0x40), 3f, 1, ((char*)ebx + 0x128)));
0052d84b          }
0052d84b          
0052d882          if ((cond:5_1 || eax_67 == 0))
0052d780              ADJ(ebx)->surfaces = nullptr;
0052d831      }
0052d831      
0052d89a      return 1;
0052d470  }

0052d89d                                                                                         90 90 90                               ...

0052d8a0  class CPhysicsObj* __thiscall CEnvCell::recursively_get_object(class CEnvCell const* this, uint32_t const arg2, class PackableHashTable<unsigned long,int>* arg3)

0052d8a0  {
0052d8a4      class CEnvCell* this_1 = this;
0052d8af      class CEnvCell* this_2 = this_1;
0052d8b3      class CPhysicsObj* result = this_1->vtable->get_object(arg2);
0052d8b3      
0052d8ba      if (result != 0)
0052d98d          return result;
0052d98d      
0052d8c9      int32_t var_8_1 = 0;
0052d8c9      
0052d8cd      if (this_1->num_portals <= 0)
0052d984          return nullptr;
0052d984      
0052d8d3      class PackableHashTable<unsigned long,int>* ebp_1 = arg3;
0052d8d7      arg3 = nullptr;
0052d8d7      
0052d8e0      while (true)
0052d8e0      {
0052d8e0          class CCellPortal* edx_3 = this_1->portals;
0052d8ea          uint32_t _table_size = ebp_1->_table_size;
0052d8ef          int32_t i = *(uint32_t*)((char*)edx_3 + arg3);
0052d8f2          class CCellPortal* ecx_2 = ((char*)edx_3 + arg3);
0052d8f5          int32_t i_1 = i;
0052d8f5          
0052d8f9          if (_table_size == 0)
0052d8f9              goto label_52d928;
0052d8f9          
0052d8fb          class PackableHashData<unsigned long,int>** _buckets = ebp_1->_buckets;
0052d8fb          
0052d900          if (_buckets == 0)
0052d900          {
0052d924          label_52d924:
0052d924              this_1 = this_2;
0052d928          label_52d928:
0052d928              
0052d92b              if (i != 0xffffffff)
0052d92b              {
0052d92d                  int32_t var_20_1 = 0;
0052d92f                  class CEnvCell* eax_4 = CCellPortal::GetOtherCell(ecx_2, edx_3);
0052d92f                  
0052d938                  if (eax_4 != 0)
0052d938                  {
0052d946                      PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(ebp_1, &i_1, &ptrue);
0052d953                      result = CEnvCell::recursively_get_object(eax_4, arg2, ebp_1);
0052d953                      
0052d95a                      if (result != 0)
0052d98d                          return result;
0052d938                  }
0052d92b              }
0052d900          }
0052d900          else
0052d900          {
0052d908              edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
0052d908              
0052d90d              if (edx_3 == 0)
0052d90d                  goto label_52d924;
0052d90d              
0052d912              while (i != edx_3->other_cell_id)
0052d912              {
0052d914                  edx_3 = edx_3->portal;
0052d914                  
0052d919                  if (edx_3 == 0)
0052d919                      goto label_52d924;
0052d912              }
0052d912              
0052d91d              edx_3 = &edx_3->other_cell_ptr;
0052d91d              
0052d922              if (edx_3 == 0)
0052d922                  goto label_52d924;
0052d922              
0052d95e              this_1 = this_2;
0052d900          }
0052d900          
0052d974          bool cond:2_1 = (var_8_1 + 1) < this_1->num_portals;
0052d976          var_8_1 += 1;
0052d97a          arg3 += 0x18;
0052d97a          
0052d97e          if (!(cond:2_1))
0052d984              return nullptr;
0052d8e0      }
0052d8a0  }

0052d8dd                                                                                         8d 49 00                               .I.

0052d990  void __fastcall CEnvCell::Destroy(class CEnvCell* this)

0052d990  {
0052d9a2      if (this->surfaces != 0)
0052d9a2      {
0052d9aa          int32_t i = 0;
0052d9aa          
0052d9ae          if (this->num_surfaces > 0)
0052d9ae          {
0052d9cb              do
0052d9cb              {
0052d9b6                  int32_t* ecx = this->surfaces[i];
0052d9b6                  
0052d9bb                  if (ecx != 0)
0052d9bf                      *(uint32_t*)(*(uint32_t*)ecx + 0x14)();
0052d9bf                  
0052d9c8                  i += 1;
0052d9cb              } while (i < this->num_surfaces);
0052d9ae          }
0052d9ae          
0052d9d4          operator delete[](this->surfaces);
0052d9dc          this->surfaces = nullptr;
0052d9a2      }
0052d9a2      
0052d9e2      class RGBColor* light_array = this->light_array;
0052d9ea      this->num_surfaces = 0;
0052d9ea      
0052d9f0      if (light_array != 0)
0052d9f0      {
0052d9f3          operator delete[](light_array);
0052d9fb          this->light_array = nullptr;
0052d9f0      }
0052d9f0      
0052da01      class ClipPlaneList** clip_planes = this->clip_planes;
0052da01      
0052da09      if (clip_planes != 0)
0052da09      {
0052da0b          class ClipPlaneList* eax_5 = *(uint32_t*)clip_planes;
0052da0b          
0052da0f          if (eax_5 != 0)
0052da11              eax_5->cplane_num = 0;
0052da09      }
0052da09      
0052da21      if (this->constructed_mesh != 0)
0052da21      {
0052da24          D3DPolyRender::DestroyMesh(&this->constructed_mesh);
0052da1b          this->constructed_mesh = nullptr;
0052da21      }
0052da21      
0052da2e      class CEnvironment* env = this->env;
0052da2e      
0052da36      if (env != 0)
0052da36      {
0052da38          env->vtable->Release();
0052da3d          this->env = nullptr;
0052da36      }
0052da36      
0052da4a      int32_t i_1 = 0;
0052da4e      int32_t i_4 = 0;
0052da4e      
0052da52      if (this->portal_view.sizeOf > 0)
0052da52      {
0052dae8          do
0052dae8          {
0052da66              int32_t* edi_2 = this->portal_view.data[i_1];
0052da66              
0052da6b              if (edi_2 != 0)
0052da6b              {
0052da6d                  void* ecx_1 = edi_2[9];
0052da6d                  
0052da72                  if (ecx_1 != 0)
0052da72                  {
0052da74                      int32_t j_2 = *(uint32_t*)((char*)ecx_1 - 4);
0052da74                      
0052da85                      if ((j_2 - 1) >= 0)
0052da85                      {
0052da87                          int32_t j_1 = j_2;
0052da8a                          void* ebx_3 = ((char*)ecx_1 + (j_2 * 0x18));
0052da9b                          int32_t j;
0052da9b                          
0052da9b                          do
0052da9b                          {
0052da90                              ebx_3 -= 0x18;
0052da95                              IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ebx_3);
0052da9a                              j = j_1;
0052da9a                              j_1 -= 1;
0052da9b                          } while (j != 1);
0052daa1                          i_1 = i_4;
0052da85                      }
0052da85                      
0052daa6                      operator delete[](((char*)ecx_1 - 4));
0052da72                  }
0052da72                  
0052dab0                  edi_2[9] = 0;
0052dab7                  operator delete[](edi_2[5]);
0052dabc                  edi_2[5] = 0;
0052dac2                  operator delete[](*(uint32_t*)edi_2);
0052dac8                  *(uint32_t*)edi_2 = 0;
0052daca                  operator delete(edi_2);
0052dacf                  this->portal_view.data[i_1] = 0;
0052da6b              }
0052da6b              
0052dae1              i_1 += 1;
0052dae4              i_4 = i_1;
0052dae8          } while (i_1 < this->portal_view.sizeOf);
0052da52      }
0052da52      
0052daee      class CCellPortal* portals = this->portals;
0052daee      
0052daf6      if (portals != 0)
0052daf6      {
0052daf8          int32_t other_cell_id = portals->other_cell_id;
0052daf8          
0052db09          if ((other_cell_id - 1) >= 0)
0052db09          {
0052db0b              int32_t ebp = other_cell_id;
0052db0e              void* edi_5 = &portals[other_cell_id];
0052db1b              int32_t i_2;
0052db1b              
0052db1b              do
0052db1b              {
0052db10                  edi_5 -= 0x18;
0052db15                  IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(edi_5);
0052db1a                  i_2 = ebp;
0052db1a                  ebp -= 1;
0052db1b              } while (i_2 != 1);
0052db09          }
0052db09          
0052db22          operator delete[](((char*)portals - 4));
0052db2a          this->portals = nullptr;
0052daf6      }
0052daf6      
0052db30      uint32_t* stab_list = this->stab_list;
0052db38      this->num_portals = 0;
0052db38      
0052db3f      if (stab_list != 0)
0052db3f      {
0052db42          operator delete[](stab_list);
0052db4a          this->stab_list = nullptr;
0052db3f      }
0052db3f      
0052db50      class IDClass<_tagDataID,32,0>* static_object_ids = this->static_object_ids;
0052db58      this->num_stabs = 0;
0052db58      
0052db5e      if (static_object_ids != 0)
0052db5e      {
0052db64          operator delete[](&static_object_ids[-1]);
0052db6c          this->static_object_ids = nullptr;
0052db5e      }
0052db5e      
0052db72      class Frame* static_object_frames = this->static_object_frames;
0052db72      
0052db7a      if (static_object_frames != 0)
0052db7a      {
0052db80          operator delete[](((char*)static_object_frames - 4));
0052db88          this->static_object_frames = nullptr;
0052db7a      }
0052db7a      
0052db94      if (this->static_objects != 0)
0052db94      {
0052db9c          int32_t i_3 = 0;
0052db9c          
0052dba0          if (this->num_static_objects > 0)
0052dba0          {
0052dbd0              do
0052dbd0              {
0052dba8                  class CPhysicsObj* ecx_6 = this->static_objects[i_3];
0052dba8                  
0052dbad                  if (ecx_6 != 0)
0052dbad                  {
0052dbaf                      CPhysicsObj::leave_world(ecx_6);
0052dbba                      int32_t* ecx_7 = this->static_objects[i_3];
0052dbba                      
0052dbbf                      if (ecx_7 != 0)
0052dbc5                          **(uint32_t**)ecx_7(1);
0052dbad                  }
0052dbad                  
0052dbcd                  i_3 += 1;
0052dbd0              } while (i_3 < this->num_static_objects);
0052dba0          }
0052dba0          
0052dbd9          operator delete[](this->static_objects);
0052dbe1          this->static_objects = nullptr;
0052db94      }
0052db94      
0052dbe8      this->num_static_objects = 0;
0052dbee      this->structure = nullptr;
0052dbf4      this->seen_outside = 0;
0052dc01      /* tailcall */
0052dc01      return CObjCell::release_objects(this);
0052d990  }

0052da5a                                                                                8d 9b 00 00 00 00                            ......
0052dc06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0052dc10  class CEnvCell* CEnvCell::GetVisible(uint32_t arg1)

0052dc10  {
0052dc2d      for (int32_t* i = CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[(COMBINE(0, arg1) % CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0052dc2d      {
0052dc32          if (*(uint32_t*)i == arg1)
0052dc32          {
0052dc41              if (i != 0)
0052dc47                  return i[2];
0052dc47              
0052dc41              break;
0052dc32          }
0052dc2d      }
0052dc2d      
0052dc3e      return 0;
0052dc10  }

0052dc48                          90 90 90 90 90 90 90 90                                                          ........

0052dc50  class CEnvCell* __thiscall CEnvCell::find_visible_child_cell(class CEnvCell const* this, class AC1Legacy::Vector3 const* arg2, int32_t const arg3)

0052dc50  {
0052dc5c      int32_t eax_1;
0052dc5c      int32_t edx;
0052dc5c      eax_1 = this->vtable->point_in_cell(arg2);
0052dc5c      
0052dc64      if (eax_1 != 0)
0052dc69          return this;
0052dc69      
0052dc75      if (arg3 == 0)
0052dc75      {
0052dcff          int32_t ebp_1 = 0;
0052dcff          
0052dd03          if (this->num_portals > 0)
0052dd03          {
0052dd05              int32_t ebx_1 = 0;
0052dd05              
0052dd16              while (true)
0052dd16              {
0052dd16                  int32_t var_14_2 = 1;
0052dd1a                  int32_t* eax_14;
0052dd1a                  eax_14 = CCellPortal::GetOtherCell((this->portals + ebx_1), edx);
0052dd1a                  
0052dd23                  if (eax_14 != 0)
0052dd23                  {
0052dd2e                      int32_t eax_16;
0052dd2e                      eax_16 = *(uint32_t*)(*(uint32_t*)eax_14 + 0x84)(arg2);
0052dd2e                      
0052dd36                      if (eax_16 != 0)
0052dcf6                          return eax_14;
0052dd23                  }
0052dd23                  
0052dd3e                  ebp_1 += 1;
0052dd3f                  ebx_1 += 0x18;
0052dd3f                  
0052dd44                  if (ebp_1 >= this->num_portals)
0052dd4c                      return 0;
0052dd16              }
0052dd03          }
0052dc75      }
0052dc75      else
0052dc75      {
0052dc81          int32_t i = 0;
0052dc81          
0052dc85          if (this->num_stabs > 0)
0052dc85          {
0052dce5              do
0052dce5              {
0052dc96                  int32_t ecx_2 = this->stab_list[i];
0052dc96                  
0052dcaf                  for (int32_t* j = CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[(COMBINE(0, ecx_2) % CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets)]; j != 0; j = j[1])
0052dcaf                  {
0052dcb3                      if (*(uint32_t*)j == ecx_2)
0052dcb3                      {
0052dcc0                          if (j != 0)
0052dcc0                          {
0052dcc2                              int32_t* esi_1 = j[2];
0052dcc2                              
0052dcc7                              if ((esi_1 != 0 && *(uint32_t*)(*(uint32_t*)esi_1 + 0x84)(arg2) != 0))
0052dcf6                                  return esi_1;
0052dcc0                          }
0052dcc0                          
0052dcc0                          break;
0052dcb3                      }
0052dcaf                  }
0052dcaf                  
0052dce2                  i += 1;
0052dce5              } while (i < this->num_stabs);
0052dc85          }
0052dc75      }
0052dc75      
0052dd4c      return 0;
0052dc50  }

0052dc8d                                         8d 49 00                                                               .I.
0052dd09                             8d a4 24 00 00 00 00                                                           ..$....
0052dd4f                                               90                                                                 .

0052dd50  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CEnvCell *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CEnvCell *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,CEnvCell *> *,0>* this, uint32_t arg2)

0052dd50  {
0052dd5b      arg2 = arg2;
0052dd5f      uint8_t edx = ((int8_t)arg2);
0052dd63      this->m_buckets = nullptr;
0052dd66      this->m_firstInterestingBucket = nullptr;
0052dd69      this->m_numBuckets = 0;
0052dd6c      this->m_numElements = 0;
0052dd70      this->vtable = 0x7c8d38;
0052dd76      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0052dd89      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0052dd89      
0052dd93      if (eax == bucketSizesEnd_1)
0052dd95          eax -= 4;
0052dd95      
0052dd98      uint32_t eax_1 = *(uint32_t*)eax;
0052dd9d      this->m_numBuckets = eax_1;
0052dd9d      
0052dda0      if (eax_1 > 0x17)
0052ddb6          this->m_buckets = operator new[]((eax_1 << 2));
0052dda0      else
0052dda5          this->m_buckets = &this->m_aInplaceBuckets;
0052dda5      
0052ddbc      class HashTableData<unsigned long,CEnvCell *>** m_buckets = this->m_buckets;
0052ddbf      uint32_t ecx_3 = (this->m_numBuckets << 2);
0052ddc5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0052ddd6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0052dd50  }

0052dddf                                                                                               90                                 .

0052dde0  void* __thiscall CEnvCell::`scalar deleting destructor'(class CEnvCell* this, uint32_t arg2)

0052dde0  {
0052dde3      this->vtable = 0x7c8c98;
0052dde9      this->vtable = &CEnvCell::`vftable';
0052ddf0      this->vtable = &CEnvCell::`vftable';
0052ddf7      CEnvCell::Destroy(this);
0052de03      operator delete[](this->portal_view.data);
0052de0d      this->portal_view.data = 0;
0052de17      CObjCell::~CObjCell(this);
0052de17      
0052de21      if ((arg2 & 1) != 0)
0052de24          operator delete(this);
0052de24      
0052de2f      return this;
0052dde0  }

0052de32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0052de40  class CEnvCell* CEnvCell::add_visible_cell(uint32_t arg1)

0052de40  {
0052de44      uint32_t esi = arg1;
0052de57      int32_t ecx = 0;
0052de57      
0052de5e      for (int32_t* i = CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[(COMBINE(0, esi) % CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0052de5e      {
0052de62          if (*(uint32_t*)i == esi)
0052de62          {
0052de6f              if (i != 0)
0052de71                  ecx = i[2];
0052de71              
0052de6f              break;
0052de62          }
0052de5e      }
0052de5e      
0052de76      if (ecx != 0)
0052dee4          return ecx;
0052dee4      
0052de82      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_2 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&CEnvCell::cell_flush_table.m_intrusiveTable, &arg1);
0052de89      class DLListData* dllist_next;
0052de89      class ControlSpecification var_8;
0052de89      
0052de89      if (eax_2 == 0)
0052de89      {
0052deaf          dllist_next = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, esi, 3));
0052deb6          arg1 = dllist_next;
0052deb6          
0052deba          if (dllist_next != 0)
0052deba          {
0052dece              var_8 = *(int32_t*)((char*)dllist_next + 0x28);
0052ded2              HashTable<ControlSpecification,enum ControlType,0>::add(&CEnvCell::visible_cell_table, &var_8, &arg1);
0052deba          }
0052de89      }
0052de89      else
0052de89      {
0052de8b          dllist_next = eax_2->dllist_next;
0052de8f          arg1 = dllist_next;
0052de93          operator delete(eax_2);
0052dece          var_8 = *(int32_t*)((char*)dllist_next + 0x28);
0052ded2          HashTable<ControlSpecification,enum ControlType,0>::add(&CEnvCell::visible_cell_table, &var_8, &arg1);
0052de89      }
0052dedd      return dllist_next;
0052de40  }

0052dee5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0052def0  void CEnvCell::flush_cells()

0052def0  {
0052df01      void __return;
0052df01      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&CEnvCell::cell_flush_table.m_intrusiveTable, &__return);
0052df06      class HashTableData<unsigned long,DBOCache *>* i_2 = eax->m_currElement;
0052df0b      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0052df0d      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0052df0d      
0052df10      if (i_2 != 0)
0052df10      {
0052df12          while (true)
0052df12          {
0052df12              class DBOCache* m_data = i_2->m_data;
0052df17              CObjCell::release_objects(m_data);
0052df1c              m_data->vtable->Release();
0052df23              i_2 = i_2->m_hashNext;
0052df23              
0052df28              if (i_2 == 0)
0052df28              {
0052df3e                  class HashTableData<unsigned long,DBOCache *>* i;
0052df3e                  
0052df3e                  do
0052df3e                  {
0052df33                      m_currBucket = &m_currBucket[1];
0052df33                      
0052df38                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0052df38                          goto label_52df4b;
0052df38                      
0052df3a                      i = *(uint32_t*)m_currBucket;
0052df3e                  } while (i == 0);
0052df3e                  
0052df40                  i_2 = i;
0052df40                  
0052df44                  if (i_2 == 0)
0052df44                      break;
0052df28              }
0052df12          }
0052df10      }
0052df10      
0052df4b  label_52df4b:
0052df4b      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&CEnvCell::cell_flush_table.m_intrusiveTable);
0052df5b      void* ecx_4 = &CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets];
0052df5e      class HashTableData<unsigned long,CEnvCell *>** m_firstInterestingBucket = CEnvCell::visible_cell_table.m_intrusiveTable.m_firstInterestingBucket;
0052df65      class HashTableData<unsigned long,CEnvCell *>* m_hashNext;
0052df65      
0052df65      if (m_firstInterestingBucket == ecx_4)
0052df65      {
0052df78      label_52df78:
0052df78          m_firstInterestingBucket = nullptr;
0052df7a          m_hashNext = nullptr;
0052df65      }
0052df65      else
0052df65      {
0052df6a          while (*(uint32_t*)m_firstInterestingBucket == 0)
0052df6a          {
0052df6c              m_firstInterestingBucket = &m_firstInterestingBucket[1];
0052df71              CEnvCell::visible_cell_table.m_intrusiveTable.m_firstInterestingBucket = m_firstInterestingBucket;
0052df71              
0052df76              if (m_firstInterestingBucket == ecx_4)
0052df76                  goto label_52df78;
0052df6a          }
0052df6a          
0052df7e          m_hashNext = *(uint32_t*)m_firstInterestingBucket;
0052df65      }
0052df65      
0052df82      class HashTableData<unsigned long,CEnvCell *>** m_firstInterestingBucket_1 = m_firstInterestingBucket;
0052df82      
0052df84      if (m_hashNext != 0)
0052df84      {
0052df86          while (true)
0052df86          {
0052df86              class CEnvCell* m_data_1 = m_hashNext->m_data;
0052df89              m_data_1->vtable->init_static_objects();
0052df95              CObjCell::init_objects(m_data_1);
0052df9c              CObjCell::add_static_to_global_lights(m_data_1);
0052dfa1              m_hashNext = m_hashNext->m_hashNext;
0052dfa1              
0052dfa6              if (m_hashNext == 0)
0052dfa6              {
0052dfc1                  class HashTableData<unsigned long,CEnvCell *>* i_1;
0052dfc1                  
0052dfc1                  do
0052dfc1                  {
0052dfb6                      m_firstInterestingBucket_1 = &m_firstInterestingBucket_1[1];
0052dfb6                      
0052dfbb                      if (m_firstInterestingBucket_1 == &CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets])
0052dfd0                          return;
0052dfd0                      
0052dfbd                      i_1 = *(uint32_t*)m_firstInterestingBucket_1;
0052dfc1                  } while (i_1 == 0);
0052dfc1                  
0052dfc3                  m_hashNext = i_1;
0052dfc3                  
0052dfc7                  if (m_hashNext == 0)
0052dfc7                      break;
0052dfa6              }
0052df86          }
0052df84      }
0052def0  }

0052dfd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0052dfe0  void* __thiscall HashTable<unsigned long,CEnvCell *,0>::`scalar deleting destructor'(class HashTable<unsigned long,CEnvCell *,0>* this, uint32_t arg2)

0052dfe0  {
0052dfe9      this->vtable = 0x7c8d3c;
0052dfef      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0052dff4      class HashTableData<unsigned long,CEnvCell *>** m_buckets = this->m_intrusiveTable.m_buckets;
0052dfe4      this->m_intrusiveTable.vtable = 0x7c8d38;
0052dfe4      
0052e002      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0052e005          operator delete[](m_buckets);
0052e005      
0052dfe4      this->m_intrusiveTable.m_buckets = nullptr;
0052dfe4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0052dfe4      this->m_intrusiveTable.m_numBuckets = 0;
0052dfe4      this->m_intrusiveTable.m_numElements = 0;
0052dfe4      
0052e020      if ((arg2 & 1) != 0)
0052e023          operator delete(this);
0052e023      
0052e02f      return this;
0052dfe0  }

0052e032                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0052e040  void CEnvCell::grab_visible(uint32_t arg1, uint32_t* arg2, class CLandBlock* arg3)

0052e040  {
0052e046      int32_t esi = 0;
0052e046      
0052e04a      if (arg1 > 0)
0052e04a      {
0052e06f          do
0052e06f          {
0052e05a              class CEnvCell* eax_2 = CEnvCell::add_visible_cell(arg2[esi]);
0052e05a              
0052e064              if (eax_2 != 0)
0052e066                  eax_2->myLandBlock_ = arg3;
0052e066              
0052e06c              esi += 1;
0052e06f          } while (esi < arg1);
0052e04a      }
0052e040  }

0052e076                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0052e080  void CEnvCell::release_visible(uint32_t arg1, uint32_t* arg2)

0052e080  {
0052e080      int32_t ecx;
0052e080      int32_t var_4_1 = ecx;
0052e082      uint32_t ebx = arg1;
0052e08a      int32_t esi = 0;
0052e08e      int32_t edi;
0052e08e      int32_t var_14 = edi;
0052e08e      
0052e08f      if (ebx > 0)
0052e08f      {
0052e101          do
0052e101          {
0052e095              int32_t ecx_1 = arg2[esi];
0052e095              
0052e0ac              for (int32_t* i = CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[(COMBINE(0, ecx_1) % CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0052e0ac              {
0052e0b2                  if (*(uint32_t*)i == ecx_1)
0052e0b2                  {
0052e0bf                      if (i != 0)
0052e0bf                      {
0052e0c1                          void* edx_3 = i[2];
0052e0c1                          
0052e0c6                          if (edx_3 != 0)
0052e0c6                          {
0052e0ce                              int32_t j = 0;
0052e0ce                              
0052e0d2                              if (*(uint32_t*)((char*)edx_3 + 0x108) > 0)
0052e0d2                              {
0052e0d4                                  int32_t ecx_3 = 0;
0052e0d4                                  
0052e0f6                                  do
0052e0f6                                  {
0052e0e6                                      *(uint32_t*)((ecx_3 + *(uint32_t*)((char*)edx_3 + 0x10c)) + 4) = 0;
0052e0f0                                      j += 1;
0052e0f1                                      ecx_3 += 0x18;
0052e0f6                                  } while (j < *(uint32_t*)((char*)edx_3 + 0x108));
0052e0d2                              }
0052e0d2                              
0052e0f8                              *(uint32_t*)((char*)edx_3 + 0xf0) = 0;
0052e0c6                          }
0052e0bf                      }
0052e0bf                      
0052e0bf                      break;
0052e0b2                  }
0052e0ac              }
0052e0ac              
0052e0fe              esi += 1;
0052e101          } while (esi < ebx);
0052e08f      }
0052e08f      
0052e105      int32_t var_4 = 0;
0052e105      
0052e109      if (ebx > 0)
0052e109      {
0052e211          bool cond:2_1;
0052e211          
0052e211          do
0052e211          {
0052e118              int32_t esi_1 = arg2[var_4];
0052e11f              uint32_t temp1_2 = (COMBINE(0, esi_1) % CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets);
0052e125              class HashTableData<unsigned long,CEnvCell *>** m_buckets = CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets;
0052e12a              int32_t* i_2 = m_buckets[temp1_2];
0052e12a              
0052e134              for (int32_t* i_1 = i_2; i_1 != 0; i_1 = i_1[1])
0052e134              {
0052e142                  if (*(uint32_t*)i_1 == esi_1)
0052e142                  {
0052e152                      if (i_1 != 0)
0052e152                      {
0052e15a                          if (i_2 == i_1)
0052e12d                              m_buckets[temp1_2] = i_2[1];
0052e15a                          else
0052e15a                          {
0052e167                              int32_t* i_3;
0052e167                              
0052e167                              do
0052e167                              {
0052e160                                  i_3 = i_2;
0052e162                                  i_2 = i_2[1];
0052e167                              } while (i_2 != i_1);
0052e167                              
0052e16b                              if (i_3 != 0)
0052e177                                  i_3[1] = i_2[1];
0052e16b                              else
0052e12d                                  m_buckets[temp1_2] = i_2[1];
0052e15a                          }
0052e15a                          
0052e17a                          CEnvCell::visible_cell_table.m_intrusiveTable.m_numElements -= 1;
0052e180                          void* esi_2 = i_1[2];
0052e184                          operator delete(i_1);
0052e189                          int32_t edi_3 = *(uint32_t*)((char*)esi_2 + 0x28);
0052e18e                          void* eax_5 = operator new(0xc);
0052e198                          void* ecx_7;
0052e198                          
0052e198                          if (eax_5 == 0)
0052e1a6                              ecx_7 = nullptr;
0052e198                          else
0052e198                          {
0052e19a                              *(uint32_t*)eax_5 = edi_3;
0052e19c                              *(uint32_t*)((char*)eax_5 + 4) = 0;
0052e19f                              *(uint32_t*)((char*)eax_5 + 8) = esi_2;
0052e1a2                              ecx_7 = eax_5;
0052e198                          }
0052e198                          
0052e1a8                          int32_t j_1 = *(uint32_t*)ecx_7;
0052e1aa                          uint32_t m_numBuckets = CEnvCell::cell_flush_table.m_intrusiveTable.m_numBuckets;
0052e1b6                          class HashTableData<unsigned long,CEnvCell *>** m_buckets_1 = CEnvCell::cell_flush_table.m_intrusiveTable.m_buckets;
0052e1bc                          int32_t* edx_9 = m_buckets_1[(COMBINE(0, j_1) % m_numBuckets)];
0052e1bc                          
0052e1c1                          if (edx_9 == 0)
0052e1c1                          {
0052e1da                          label_52e1da:
0052e1da                              void* eax_9 = &m_buckets_1[(COMBINE(0, j_1) % m_numBuckets)];
0052e1df                              *(uint32_t*)((char*)ecx_7 + 4) = *(uint32_t*)eax_9;
0052e1e2                              *(uint32_t*)eax_9 = ecx_7;
0052e1e2                              
0052e1ea                              if (eax_9 < CEnvCell::cell_flush_table.m_intrusiveTable.m_firstInterestingBucket)
0052e1ec                                  CEnvCell::cell_flush_table.m_intrusiveTable.m_firstInterestingBucket = eax_9;
0052e1ec                              
0052e1f1                              CEnvCell::cell_flush_table.m_intrusiveTable.m_numElements += 1;
0052e1c1                          }
0052e1c1                          else
0052e1c1                          {
0052e1c5                              while (*(uint32_t*)edx_9 != j_1)
0052e1c5                              {
0052e1c7                                  edx_9 = edx_9[1];
0052e1c7                                  
0052e1cc                                  if (edx_9 == 0)
0052e1cc                                      goto label_52e1da;
0052e1c5                              }
0052e1c5                              
0052e1d2                              if (edx_9 == 0)
0052e1d2                                  goto label_52e1da;
0052e1d2                              
0052e1fa                              operator delete(ecx_7);
0052e1c1                          }
0052e1c1                          
0052e202                          ebx = arg1;
0052e152                      }
0052e152                      
0052e152                      break;
0052e142                  }
0052e134              }
0052e134              
0052e20b              cond:2_1 = (var_4 + 1) < ebx;
0052e20d              var_4 += 1;
0052e211          } while (cond:2_1);
0052e109      }
0052e080  }

0052e0d8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0052e21d                                                                                         90 90 90                               ...

0052e220  void __fastcall CEnvCell::grab_visible_cells(class CEnvCell* this)

0052e220  {
0052e228      CEnvCell::add_visible_cell(this->m_DID.id);
0052e236      int32_t i = 0;
0052e236      
0052e23a      if (this->num_stabs > 0)
0052e23a      {
0052e25b          do
0052e25b          {
0052e24a              CEnvCell::add_visible_cell(this->stab_list[i]);
0052e258              i += 1;
0052e25b          } while (i < this->num_stabs);
0052e23a      }
0052e23a      
0052e267      if (this->seen_outside == 0)
0052e274          return;
0052e274      
0052e26f      /* tailcall */
0052e26f      return LScape::grab_visible_cells(CObjCell::landscape);
0052e220  }

0052e275                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0052e280  void __fastcall CEnvCell::release_cells(class CEnvCell* this)

0052e280  {
0052e285      class CEnvCell* this_1 = this;
0052e290      int32_t i = 0;
0052e295      class CEnvCell* this_2 = this_1;
0052e295      
0052e299      if (this_1->num_portals > 0)
0052e299      {
0052e29d          int32_t ecx_1 = 0;
0052e29d          
0052e2b6          do
0052e2b6          {
0052e2a6              *(uint32_t*)(&this_1->portals->other_cell_ptr + ecx_1) = 0;
0052e2b0              i += 1;
0052e2b1              ecx_1 += 0x18;
0052e2b6          } while (i < this_1->num_portals);
0052e299      }
0052e299      
0052e2be      int32_t i_1 = 0;
0052e2be      
0052e2c2      if (this_1->num_stabs > 0)
0052e2c2      {
0052e331          do
0052e331          {
0052e2ca              int32_t ecx_2 = this_1->stab_list[i_1];
0052e2ca              
0052e2e1              for (int32_t* j = CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[(COMBINE(0, ecx_2) % CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets)]; j != 0; j = j[1])
0052e2e1              {
0052e2e5                  if (*(uint32_t*)j == ecx_2)
0052e2e5                  {
0052e2f2                      if (j != 0)
0052e2f2                      {
0052e2f4                          void* edx_5 = j[2];
0052e2f4                          
0052e2f9                          if (edx_5 != 0)
0052e2f9                          {
0052e301                              int32_t k = 0;
0052e301                              
0052e305                              if (*(uint32_t*)((char*)edx_5 + 0x108) > 0)
0052e305                              {
0052e307                                  int32_t ecx_4 = 0;
0052e307                                  
0052e326                                  do
0052e326                                  {
0052e316                                      *(uint32_t*)((*(uint32_t*)((char*)edx_5 + 0x10c) + ecx_4) + 4) = 0;
0052e320                                      k += 1;
0052e321                                      ecx_4 += 0x18;
0052e326                                  } while (k < *(uint32_t*)((char*)edx_5 + 0x108));
0052e305                              }
0052e2f9                          }
0052e2f2                      }
0052e2f2                      
0052e2f2                      break;
0052e2e5                  }
0052e2e1              }
0052e2e1              
0052e32e              i_1 += 1;
0052e331          } while (i_1 < this_1->num_stabs);
0052e2c2      }
0052e2c2      
0052e333      uint32_t id = this_1->m_DID.id;
0052e346      void* edi_3 = &CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[(COMBINE(0, id) % CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets)];
0052e349      int32_t* i_4 = *(uint32_t*)edi_3;
0052e349      
0052e34f      for (int32_t* i_2 = i_4; i_2 != 0; i_2 = i_2[1])
0052e34f      {
0052e353          if (*(uint32_t*)i_2 == id)
0052e353          {
0052e360              if (i_2 != 0)
0052e360              {
0052e364                  if (i_4 == i_2)
0052e376                      *(uint32_t*)edi_3 = i_4[1];
0052e364                  else
0052e364                  {
0052e36d                      int32_t* i_6;
0052e36d                      
0052e36d                      do
0052e36d                      {
0052e366                          i_6 = i_4;
0052e368                          i_4 = i_4[1];
0052e36d                      } while (i_4 != i_2);
0052e36d                      
0052e371                      if (i_6 != 0)
0052e37d                          i_6[1] = i_4[1];
0052e371                      else
0052e376                          *(uint32_t*)edi_3 = i_4[1];
0052e364                  }
0052e364                  
0052e380                  CEnvCell::visible_cell_table.m_intrusiveTable.m_numElements -= 1;
0052e386                  void* esi = i_2[2];
0052e38a                  operator delete(i_2);
0052e38f                  int32_t edi_4 = *(uint32_t*)((char*)esi + 0x28);
0052e394                  void* eax_6 = operator new(0xc);
0052e39e                  void* esi_1;
0052e39e                  
0052e39e                  if (eax_6 == 0)
0052e3ac                      esi_1 = nullptr;
0052e39e                  else
0052e39e                  {
0052e3a0                      *(uint32_t*)((char*)eax_6 + 8) = esi;
0052e3a3                      *(uint32_t*)eax_6 = edi_4;
0052e3a5                      *(uint32_t*)((char*)eax_6 + 4) = 0;
0052e3a8                      esi_1 = eax_6;
0052e39e                  }
0052e39e                  
0052e3bf                  if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&CEnvCell::cell_flush_table.m_intrusiveTable, esi_1) == 0 && esi_1 != 0))
0052e3c2                      operator delete(esi_1);
0052e360              }
0052e360              
0052e360              break;
0052e353          }
0052e34f      }
0052e34f      
0052e3d0      int32_t var_8 = 0;
0052e3d0      
0052e3d4      if (this_1->num_stabs > 0)
0052e3d4      {
0052e4e7          bool cond:3_1;
0052e4e7          
0052e4e7          do
0052e4e7          {
0052e3ea              int32_t esi_2 = this_1->stab_list[var_8];
0052e3fd              void* edi_5 = &CEnvCell::visible_cell_table.m_intrusiveTable.m_buckets[(COMBINE(0, esi_2) % CEnvCell::visible_cell_table.m_intrusiveTable.m_numBuckets)];
0052e400              int32_t* i_5 = *(uint32_t*)edi_5;
0052e400              
0052e406              for (int32_t* i_3 = i_5; i_3 != 0; i_3 = i_3[1])
0052e406              {
0052e412                  if (*(uint32_t*)i_3 == esi_2)
0052e412                  {
0052e422                      if (i_3 != 0)
0052e422                      {
0052e42a                          if (i_5 == i_3)
0052e440                              *(uint32_t*)edi_5 = i_5[1];
0052e42a                          else
0052e42a                          {
0052e437                              int32_t* i_7;
0052e437                              
0052e437                              do
0052e437                              {
0052e430                                  i_7 = i_5;
0052e432                                  i_5 = i_5[1];
0052e437                              } while (i_5 != i_3);
0052e437                              
0052e43b                              if (i_7 != 0)
0052e447                                  i_7[1] = i_5[1];
0052e43b                              else
0052e440                                  *(uint32_t*)edi_5 = i_5[1];
0052e42a                          }
0052e42a                          
0052e44a                          CEnvCell::visible_cell_table.m_intrusiveTable.m_numElements -= 1;
0052e450                          void* esi_3 = i_3[2];
0052e454                          operator delete(i_3);
0052e459                          int32_t edi_6 = *(uint32_t*)((char*)esi_3 + 0x28);
0052e45e                          void* eax_10 = operator new(0xc);
0052e468                          void* ecx_9;
0052e468                          
0052e468                          if (eax_10 == 0)
0052e476                              ecx_9 = nullptr;
0052e468                          else
0052e468                          {
0052e46a                              *(uint32_t*)eax_10 = edi_6;
0052e46c                              *(uint32_t*)((char*)eax_10 + 4) = 0;
0052e46f                              *(uint32_t*)((char*)eax_10 + 8) = esi_3;
0052e472                              ecx_9 = eax_10;
0052e468                          }
0052e468                          
0052e478                          int32_t j_1 = *(uint32_t*)ecx_9;
0052e47a                          uint32_t m_numBuckets = CEnvCell::cell_flush_table.m_intrusiveTable.m_numBuckets;
0052e486                          class HashTableData<unsigned long,CEnvCell *>** m_buckets = CEnvCell::cell_flush_table.m_intrusiveTable.m_buckets;
0052e48c                          int32_t* edx_15 = m_buckets[(COMBINE(0, j_1) % m_numBuckets)];
0052e48c                          
0052e491                          if (edx_15 == 0)
0052e491                          {
0052e4aa                          label_52e4aa:
0052e4aa                              void** eax_14 = &m_buckets[(COMBINE(0, j_1) % m_numBuckets)];
0052e4af                              *(uint32_t*)((char*)ecx_9 + 4) = *(uint32_t*)eax_14;
0052e4b2                              *(uint32_t*)eax_14 = ecx_9;
0052e4b2                              
0052e4ba                              if (eax_14 < CEnvCell::cell_flush_table.m_intrusiveTable.m_firstInterestingBucket)
0052e4bc                                  CEnvCell::cell_flush_table.m_intrusiveTable.m_firstInterestingBucket = eax_14;
0052e4bc                              
0052e4c1                              CEnvCell::cell_flush_table.m_intrusiveTable.m_numElements += 1;
0052e491                          }
0052e491                          else
0052e491                          {
0052e495                              while (*(uint32_t*)edx_15 != j_1)
0052e495                              {
0052e497                                  edx_15 = edx_15[1];
0052e497                                  
0052e49c                                  if (edx_15 == 0)
0052e49c                                      goto label_52e4aa;
0052e495                              }
0052e495                              
0052e4a2                              if (edx_15 == 0)
0052e4a2                                  goto label_52e4aa;
0052e4a2                              
0052e4ca                              operator delete(ecx_9);
0052e491                          }
0052e491                          
0052e4d2                          this_1 = this_2;
0052e422                      }
0052e422                      
0052e422                      break;
0052e412                  }
0052e406              }
0052e406              
0052e4e1              cond:3_1 = (var_8 + 1) < this_1->num_stabs;
0052e4e3              var_8 += 1;
0052e4e7          } while (cond:3_1);
0052e3d4      }
0052e3d4      
0052e4f9      if (this_1->seen_outside == 0)
0052e50c          return;
0052e50c      
0052e504      /* tailcall */
0052e504      return LScape::release_visible_cells(CObjCell::landscape);
0052e280  }

0052e50d                                         90 90 90                                                               ...

0052e510  void __thiscall DArray<CShadowPart *>::shrink(class DArray<CShadowPart *>* this, uint32_t arg2)

0052e510  {
0052e51d      if (arg2 > this->sizeOf)
0052e51d      {
0052e520          DArray<CShadowPart *>::grow(this, arg2);
0052e527          return;
0052e51d      }
0052e51d      
0052e52c      if (arg2 != 0)
0052e52c      {
0052e549          void* eax_1 = operator new[]((arg2 << 2));
0052e553          int32_t i = 0;
0052e557          this->sizeOf = arg2;
0052e557          
0052e55a          if (arg2 > 0)
0052e55a          {
0052e56e              do
0052e56e              {
0052e565                  *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
0052e56b                  i += 1;
0052e56e              } while (i < this->sizeOf);
0052e55a          }
0052e55a          
0052e573          operator delete[](this->data);
0052e57b          this->data = eax_1;
0052e52c      }
0052e52c      else
0052e52c      {
0052e52e          class CShadowPart** data = this->data;
0052e531          this->sizeOf = arg2;
0052e534          operator delete[](data);
0052e53c          this->data = arg2;
0052e52c      }
0052e52c      
0052e581      if (this->next_available > arg2)
0052e583          this->next_available = arg2;
0052e510  }

0052e58b                                   90 90 90 90 90                                                             .....

0052e590  void __thiscall DArray<CShadowPart *>::grow(class DArray<CShadowPart *>* this, uint32_t arg2)

0052e590  {
0052e59b      if (arg2 <= this->sizeOf)
0052e59b      {
0052e59e          DArray<CShadowPart *>::shrink(this, arg2);
0052e5a5          return;
0052e59b      }
0052e59b      
0052e5b1      void* eax_1 = operator new[]((arg2 << 2));
0052e5be      int32_t i = 0;
0052e5be      
0052e5c2      if (this->sizeOf > 0)
0052e5c2      {
0052e5d2          do
0052e5d2          {
0052e5c9              *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
0052e5cf              i += 1;
0052e5d2          } while (i < this->sizeOf);
0052e5c2      }
0052e5c2      
0052e5d7      operator delete[](this->data);
0052e5df      this->data = eax_1;
0052e5e2      this->sizeOf = arg2;
0052e590  }

0052e5ea                                90 90 90 90 90 90                                                            ......

0052e5f0  void __fastcall CPartCell::CPartCell(class CPartCell* this)

0052e5f0  {
0052e5f4      this->vtable = 0x7c8de8;
0052e5fa      this->num_shadow_parts = 0;
0052e5fd      this->shadow_part_list.data = 0;
0052e600      this->shadow_part_list.sizeOf = 0;
0052e603      this->shadow_part_list.next_available = 0;
0052e606      this->shadow_part_list.blocksize = 0x80;
0052e5f0  }

0052e60e                                            90 90                                                                ..

0052e610  void __fastcall CPartCell::~CPartCell(class CPartCell* this)

0052e610  {
0052e613      this->vtable = 0x7c8de8;
0052e61d      operator delete[](this->shadow_part_list.data);
0052e625      this->shadow_part_list.data = 0;
0052e610  }

0052e62e                                            90 90                                                                ..

0052e630  void __thiscall CPartCell::remove_part(class CPartCell* this, class CPhysicsPart* arg2)

0052e630  {
0052e637      int32_t i = 0;
0052e637      
0052e63b      if (this->num_shadow_parts > 0)
0052e63b      {
0052e63d          class CShadowPart** data = this->shadow_part_list.data;
0052e63d          
0052e655          do
0052e655          {
0052e645              class CShadowPart* edi_1 = *(uint32_t*)data;
0052e645              
0052e64a              if (edi_1->part == arg2)
0052e64a              {
0052e65b                  edi_1->planes = nullptr;
0052e662                  edi_1->num_planes = 0;
0052e668                  CShadowPart::~CShadowPart(edi_1);
0052e66e                  operator delete(edi_1);
0052e679                  uint32_t eax_2 = (this->num_shadow_parts - 1);
0052e67a                  this->num_shadow_parts = eax_2;
0052e67f                  class CShadowPart** data_1 = this->shadow_part_list.data;
0052e685                  data_1[i] = data_1[eax_2];
0052e685                  break;
0052e64a              }
0052e64a              
0052e64f              i += 1;
0052e650              data = &data[1];
0052e655          } while (i < this->num_shadow_parts);
0052e63b      }
0052e63b      
0052e689      uint32_t num_shadow_parts = this->num_shadow_parts;
0052e689      
0052e697      if ((num_shadow_parts + 0xc8) < this->shadow_part_list.sizeOf)
0052e6a0          DArray<CShadowPart *>::shrink(&this->shadow_part_list, (num_shadow_parts + 0x64));
0052e630  }

0052e6aa                                90 90 90 90 90 90                                                            ......

0052e6b0  void __thiscall CPartCell::remove_shadows(class CPartCell* this, int32_t arg2)

0052e6b0  {
0052e6ba      if (arg2 != 0)
0052e6ba      {
0052e6bf          int32_t i = 0;
0052e6bf          
0052e6c3          if (this->num_shadow_parts > 0)
0052e6c3          {
0052e6e6              do
0052e6e6              {
0052e6c9                  class CShadowPart* edi_1 = this->shadow_part_list.data[i];
0052e6c9                  
0052e6ce                  if (edi_1 != 0)
0052e6ce                  {
0052e6d2                      CShadowPart::~CShadowPart(edi_1);
0052e6d8                      operator delete(edi_1);
0052e6ce                  }
0052e6ce                  
0052e6e3                  i += 1;
0052e6e6              } while (i < this->num_shadow_parts);
0052e6c3          }
0052e6ba      }
0052e6ba      
0052e6e9      this->num_shadow_parts = 0;
0052e6b0  }

0052e6f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0052e700  void* __thiscall CPartCell::`scalar deleting destructor'(class CPartCell* this, uint32_t arg2)

0052e700  {
0052e703      this->vtable = 0x7c8de8;
0052e70d      operator delete[](this->shadow_part_list.data);
0052e71b      this->shadow_part_list.data = 0;
0052e71b      
0052e722      if ((arg2 & 1) != 0)
0052e725          operator delete(this);
0052e725      
0052e730      return this;
0052e700  }

0052e733                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0052e740  void __thiscall CPartCell::add_part(class CPartCell* this, class CPhysicsPart* arg2, class ClipPlaneList** arg3, class Frame* arg4, uint32_t arg5)

0052e740  {
0052e74a      void* eax = operator new(0x10);
0052e754      int32_t esi_1;
0052e754      
0052e754      if (arg3 != 0)
0052e754      {
0052e76e          if (eax == 0)
0052e788              esi_1 = 0;
0052e76e          else
0052e784              esi_1 = CShadowPart::CShadowPart(eax, 1, arg3, arg4, arg2);
0052e754      }
0052e754      else if (eax == 0)
0052e788          esi_1 = 0;
0052e758      else
0052e768          esi_1 = CShadowPart::CShadowPart(eax, arg3, arg3, arg2);
0052e768      
0052e78a      uint32_t sizeOf = this->shadow_part_list.sizeOf;
0052e78a      
0052e790      if (this->num_shadow_parts >= sizeOf)
0052e799          DArray<CShadowPart *>::grow(&this->shadow_part_list, (sizeOf + 0x64));
0052e799      
0052e79e      uint32_t num_shadow_parts = this->num_shadow_parts;
0052e7a1      class CShadowPart** data = this->shadow_part_list.data;
0052e7a7      this->num_shadow_parts = (num_shadow_parts + 1);
0052e7ab      data[num_shadow_parts] = esi_1;
0052e740  }

0052e7b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0052e7c0  int32_t __convention("regparm") CLandBlockInfo::PreFetchCells(class CLandBlockInfo* this @ ecx)

0052e7c0  {
0052e7c0      class CLandBlockInfo* this_1 = this;
0052e7cd      int32_t i = 0;
0052e7d1      int32_t var_4 = 1;
0052e7d5      int32_t eax;
0052e7d5      
0052e7d5      if (this->num_buildings <= 0)
0052e81c          return eax;
0052e81c      
0052e811      do
0052e811      {
0052e7e3          void* esi_1 = this->buildings[i];
0052e7e9          int32_t j = 0;
0052e7e9          
0052e7ed          if (*(uint32_t*)((char*)esi_1 + 0x48) > 0)
0052e7ed          {
0052e809              do
0052e809              {
0052e7f6                  int32_t eax_3 = CBldPortal::PreFetchCells(*(uint32_t*)(*(uint32_t*)((char*)esi_1 + 0x4c) + (j << 2)));
0052e7f6                  
0052e7fd                  if (eax_3 == 0)
0052e7ff                      var_4 = eax_3;
0052e7ff                  
0052e806                  j += 1;
0052e809              } while (j < *(uint32_t*)((char*)esi_1 + 0x48));
0052e7ed          }
0052e7ed          
0052e80e          i += 1;
0052e811      } while (i < this->num_buildings);
0052e811      
0052e813      return var_4;
0052e7c0  }

0052e81d                                                                                         90 90 90                               ...

0052e820  void __fastcall BuildInfo::~BuildInfo(class BuildInfo* this)

0052e820  {
0052e827      int32_t i = 0;
0052e827      
0052e82b      if (this->num_portals > 0)
0052e82b      {
0052e82d          int32_t edi;
0052e82d          int32_t var_c_1 = edi;
0052e82d          
0052e850          do
0052e850          {
0052e833              class CBldPortal* edi_2 = this->portals[i];
0052e833              
0052e838              if (edi_2 != 0)
0052e838              {
0052e83c                  CBldPortal::~CBldPortal(edi_2);
0052e842                  operator delete(edi_2);
0052e838              }
0052e838              
0052e84d              i += 1;
0052e850          } while (i < this->num_portals);
0052e82b      }
0052e82b      
0052e857      operator delete[](this->portals);
0052e85c      this->portals = nullptr;
0052e86c      this->building_id.id = INVALID_DID.id;
0052e86e      this->num_portals = 0;
0052e875      this->num_leaves = 0;
0052e820  }

0052e87f                                                                                               90                                 .

0052e880  void __fastcall CLandBlockInfo::CLandBlockInfo(class CLandBlockInfo* this)

0052e880  {
0052e889      DBObj::DBObj(this, INVALID_DID.id);
0052e88e      this->vtable = &PackObj::`vftable';
0052e897      __builtin_memset(&this->num_objects, 0, 0x28);
0052e8b5      this->vtable = 0x7c8e88;
0052e8bb      this->vtable = &CLandBlockInfo::`vftable';
0052e880  }

0052e8c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0052e8d0  void* __thiscall CLandBlockInfo::`vector deleting destructor'(class CLandBlockInfo* this, uint32_t arg2)

0052e8d0  {
0052e8d3      /* tailcall */
0052e8d3      return CLandBlockInfo::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0052e8d0  }

0052e8d8                                                                          cc cc cc cc cc cc cc cc                          ........

0052e8e0  void __thiscall PackableHashTable<unsigned long,unsigned long>::PackableHashTable<unsigned long,unsigned long>(class PackableHashTable<unsigned long,unsigned long>* this, uint32_t const arg2)

0052e8e0  {
0052e8e9      this->_table_size = arg2;
0052e8ee      this->vtable = 0x7c8ee0;
0052e8f4      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
0052e8f7      this->_buckets = nullptr;
0052e8fa      this->_currNum = 0;
0052e8fd      PackableHashTable<unsigned long,CContractTracker>::Init(this);
0052e8e0  }

0052e908                          90 90 90 90 90 90 90 90                                                          ........

0052e910  uint32_t __thiscall PackableHashTable<unsigned long,unsigned long>::Pack(class PackableHashTable<unsigned long,unsigned long>* this, void** arg2, uint32_t arg3)

0052e910  {
0052e912      uint32_t _table_size = this->_table_size;
0052e918      int32_t result = 4;
0052e918      
0052e91d      if (_table_size > 0)
0052e91d      {
0052e91f          class PackableHashData<unsigned long,unsigned long>** _buckets = this->_buckets;
0052e922          uint32_t ebx_1 = _table_size;
0052e93e          uint32_t i;
0052e93e          
0052e93e          do
0052e93e          {
0052e924              class PackableHashData<unsigned long,unsigned long>* _next = *(uint32_t*)_buckets;
0052e924              
0052e928              while (_next != 0)
0052e928              {
0052e930                  _next = _next->_next;
0052e933                  result += 8;
0052e928              }
0052e928              
0052e93a              _buckets = &_buckets[1];
0052e93d              i = ebx_1;
0052e93d              ebx_1 -= 1;
0052e93e          } while (i != 1);
0052e91d      }
0052e91d      
0052e944      if (arg3 >= result)
0052e944      {
0052e954          **(uint32_t**)arg2 = ((_table_size << 0x10) | this->_currNum);
0052e958          void* edi_3 = (*(uint32_t*)arg2 + 4);
0052e95b          *(uint32_t*)arg2 = edi_3;
0052e960          int32_t i_1 = 0;
0052e960          
0052e964          if (this->_table_size > 0)
0052e964          {
0052e99e              do
0052e99e              {
0052e96f                  for (int32_t* j = this->_buckets[i_1]; j != 0; j = j[2])
0052e96f                  {
0052e976                      if (arg3 >= 4)
0052e976                      {
0052e97a                          *(uint32_t*)edi_3 = *(uint32_t*)j;
0052e97e                          void* ebp_3 = (*(uint32_t*)arg2 + 4);
0052e981                          *(uint32_t*)arg2 = ebp_3;
0052e988                          *(uint32_t*)ebp_3 = j[1];
0052e98c                          edi_3 = (*(uint32_t*)arg2 + 4);
0052e98f                          *(uint32_t*)arg2 = edi_3;
0052e976                      }
0052e96f                  }
0052e96f                  
0052e99b                  i_1 += 1;
0052e99e              } while (i_1 < this->_table_size);
0052e964          }
0052e944      }
0052e944      
0052e9a4      return result;
0052e910  }

0052e9a7                       90 90 90 90 90 90 90 90 90                                                         .........

0052e9b0  class DBObj* CLandBlockInfo::Allocate(class CLandBlockInfo const* this @ ecx)

0052e9b0  {
0052e9b0      /* tailcall */
0052e9b0      return CLandBlockInfo::Allocator();
0052e9b0  }

0052e9b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0052e9c0  void __fastcall CLandBlockInfo::Destroy(class CLandBlockInfo* this)

0052e9c0  {
0052e9c4      class IDClass<_tagDataID,32,0>* object_ids = this->object_ids;
0052e9c4      
0052e9cb      if (object_ids != 0)
0052e9cb      {
0052e9d1          operator delete[](&object_ids[-1]);
0052e9d9          this->object_ids = nullptr;
0052e9cb      }
0052e9cb      
0052e9dc      class Frame* object_frames = this->object_frames;
0052e9dc      
0052e9e1      if (object_frames != 0)
0052e9e1      {
0052e9e7          operator delete[](((char*)object_frames - 4));
0052e9ef          this->object_frames = nullptr;
0052e9e1      }
0052e9e1      
0052e9f5      int32_t i;
0052e9f5      int32_t i_2 = i;
0052e9f5      
0052e9f6      if (this->cells != 0)
0052e9f6      {
0052e9fb          i = 0;
0052e9fb          
0052e9ff          if (this->num_cells > 0)
0052e9ff          {
0052ea2b              do
0052ea2b              {
0052ea08                  DBObj::Remove(this->cells[i]);
0052ea10                  int32_t* ecx_1 = this->cells[i];
0052ea10                  
0052ea18                  if (ecx_1 != 0)
0052ea18                  {
0052ea1c                      *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0052ea1f                      this->cells[i] = 0;
0052ea18                  }
0052ea18                  
0052ea28                  i += 1;
0052ea2b              } while (i < this->num_cells);
0052e9ff          }
0052e9ff          
0052ea31          operator delete[](this->cells);
0052ea39          this->cells = nullptr;
0052e9f6      }
0052e9f6      
0052ea3c      uint32_t* cell_ids = this->cell_ids;
0052ea3c      
0052ea41      if (cell_ids != 0)
0052ea41      {
0052ea44          operator delete[](cell_ids);
0052ea4c          this->cell_ids = nullptr;
0052ea41      }
0052ea41      
0052ea52      if (this->buildings != 0)
0052ea52      {
0052ea58          int32_t i_1 = 0;
0052ea58          
0052ea5c          if (this->num_buildings > 0)
0052ea5c          {
0052ea80              do
0052ea80              {
0052ea63                  class BuildInfo* edi_1 = this->buildings[i_1];
0052ea63                  
0052ea68                  if (edi_1 != 0)
0052ea68                  {
0052ea6c                      BuildInfo::~BuildInfo(edi_1);
0052ea72                      operator delete(edi_1);
0052ea68                  }
0052ea68                  
0052ea7d                  i_1 += 1;
0052ea80              } while (i_1 < this->num_buildings);
0052ea5c          }
0052ea5c          
0052ea86          operator delete[](this->buildings);
0052ea8e          this->buildings = nullptr;
0052ea52      }
0052ea52      
0052ea92      class PackableHashTable<unsigned long,unsigned long>* restriction_table = this->restriction_table;
0052ea97      this->num_objects = 0;
0052ea97      
0052ea9b      if (restriction_table != 0)
0052ea9b      {
0052ea9d          restriction_table->vtable->__vecDelDtor(1);
0052eaa3          this->restriction_table = nullptr;
0052ea9b      }
0052ea9b      
0052eaa6      class PackableHashTable<unsigned long,PackableList<unsigned long> >* cell_ownership = this->cell_ownership;
0052eaa6      
0052eaab      if (cell_ownership != 0)
0052eaab      {
0052eaad          cell_ownership->vtable->__vecDelDtor(1);
0052eab3          this->cell_ownership = nullptr;
0052eaab      }
0052eaab      
0052eab6      this->num_cells = 0;
0052eab9      this->num_buildings = 0;
0052e9c0  }

0052eabf                                                                                               90                                 .

0052eac0  uint32_t __fastcall CLandBlockInfo::pack_size(class CLandBlockInfo* this)

0052eac0  {
0052eac0      class CLandBlockInfo* this_1 = this;
0052eacf      int32_t result = ((this->num_objects << 5) + 0xc);
0052ead2      int32_t i = 0;
0052ead2      
0052ead6      if (this->num_buildings > 0)
0052ead6      {
0052ead8          TChessPiece<CBasePiece>::GetPackSize(this);
0052eadd          class BuildInfo** buildings = this->buildings;
0052eae3          this_1 = 0x28;
0052eae3          
0052eb23          do
0052eb23          {
0052eaf4              void* eax_1 = buildings[i];
0052eafa              result += 0x28;
0052eafc              int32_t j = 0;
0052eafc              
0052eb00              if (*(uint32_t*)((char*)eax_1 + 0x48) > 0)
0052eb00              {
0052eb1b                  do
0052eb1b                  {
0052eb08                      uint32_t eax_3 = CBldPortal::pack_size(*(uint32_t*)(*(uint32_t*)((char*)eax_1 + 0x4c) + (j << 2)));
0052eb0d                      buildings = this->buildings;
0052eb10                      result += eax_3;
0052eb12                      eax_1 = buildings[i];
0052eb18                      j += 1;
0052eb1b                  } while (j < *(uint32_t*)((char*)eax_1 + 0x48));
0052eb00              }
0052eb00              
0052eb20              i += 1;
0052eb23          } while (i < this->num_buildings);
0052ead6      }
0052ead6      
0052eb26      class PackableHashTable<unsigned long,unsigned long>* restriction_table = this->restriction_table;
0052eb26      
0052eb2b      if (restriction_table == 0)
0052eb5e          return result;
0052eb5e      
0052eb2d      uint32_t _table_size = restriction_table->_table_size;
0052eb32      int32_t ecx_1 = 4;
0052eb32      
0052eb37      if (_table_size > 0)
0052eb37      {
0052eb39          class PackableHashData<unsigned long,unsigned long>** _buckets = restriction_table->_buckets;
0052eb3c          uint32_t edx_3 = _table_size;
0052eb54          uint32_t i_1;
0052eb54          
0052eb54          do
0052eb54          {
0052eb40              class PackableHashData<unsigned long,unsigned long>* _next = *(uint32_t*)_buckets;
0052eb40              
0052eb44              while (_next != 0)
0052eb44              {
0052eb46                  _next = _next->_next;
0052eb49                  ecx_1 += 8;
0052eb44              }
0052eb44              
0052eb50              _buckets = &_buckets[1];
0052eb53              i_1 = edx_3;
0052eb53              edx_3 -= 1;
0052eb54          } while (i_1 != 1);
0052eb37      }
0052eb37      
0052eb56      return (result + ecx_1);
0052eac0  }

0052eaea                                8d 9b 00 00 00 00                                                            ......
0052eb5f                                                                                               90                                 .

0052eb60  uint32_t __thiscall CLandBlockInfo::Pack(class CLandBlockInfo* this, void** arg2, uint32_t arg3)

0052eb60  {
0052eb60      class CLandBlockInfo* this_1 = this;
0052eb67      uint32_t result = CLandBlockInfo::pack_size(((char*)this - 0x30));
0052eb67      
0052eb74      if (arg3 < result)
0052ec95          return result;
0052ec95      
0052eb86      **(uint32_t**)arg2 = this->m_numLinks;
0052eb8a      void* edx_2 = (*(uint32_t*)arg2 + 4);
0052eb8d      *(uint32_t*)arg2 = edx_2;
0052eb94      *(uint32_t*)edx_2 = this->m_bLoaded*(int32_t*)((char*)this + 8);
0052eb96      *(uint32_t*)arg2 += 4;
0052eb9c      int32_t i = 0;
0052eb9c      
0052eba0      if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
0052eba0      {
0052eba2          int32_t ebp_1 = 0;
0052eba2          
0052ebca          do
0052ebca          {
0052ebac              **(uint32_t**)arg2 = *(uint32_t*)(*(int32_t*)((char*)this + 0xc) + (i << 2));
0052ebae              *(uint32_t*)arg2 += 4;
0052ebbc              Frame::Pack((this->m_timeStamp + ebp_1), arg2, arg3);
0052ebc4              i += 1;
0052ebc5              ebp_1 += 0x40;
0052ebca          } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
0052eba0      }
0052eba0      
0052ebcf      int16_t eax_6 = 0;
0052ebcf      
0052ebd3      if (this->m_pLast != 0)
0052ebd5          eax_6 = 1;
0052ebd5      
0052ebe7      **(uint32_t**)arg2 = ((((uint32_t)eax_6) << 0x10) | *(uint32_t*)((char*)this->m_timeStamp)[4]);
0052ebe9      *(uint32_t*)arg2 += 4;
0052ebef      int32_t i_1 = 0;
0052ebef      
0052ebf3      if (*(uint32_t*)((char*)this->m_timeStamp)[4] > 0)
0052ebf3      {
0052ebf9          class DBObj* m_pNext = this->m_pNext;
0052ebf9          
0052ec76          do
0052ec76          {
0052ec0b              **(uint32_t**)arg2 = **(uint32_t**)((char*)m_pNext + (i_1 << 2));
0052ec0d              *(uint32_t*)arg2 += 4;
0052ec1b              Frame::Pack((*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 4), arg2, arg3);
0052ec2b              **(uint32_t**)arg2 = *(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x44);
0052ec2f              void* eax_12 = (*(uint32_t*)arg2 + 4);
0052ec32              *(uint32_t*)arg2 = eax_12;
0052ec3d              *(uint32_t*)eax_12 = *(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x48);
0052ec3f              *(uint32_t*)arg2 += 4;
0052ec42              m_pNext = this->m_pNext;
0052ec45              void* ecx_16 = *(uint32_t*)((char*)m_pNext + (i_1 << 2));
0052ec4b              int32_t j = 0;
0052ec4b              
0052ec4f              if (*(uint32_t*)((char*)ecx_16 + 0x48) > 0)
0052ec4f              {
0052ec6e                  do
0052ec6e                  {
0052ec5d                      CBldPortal::Pack(*(uint32_t*)(*(uint32_t*)((char*)ecx_16 + 0x4c) + (j << 2)), arg2, arg3);
0052ec62                      m_pNext = this->m_pNext;
0052ec65                      ecx_16 = *(uint32_t*)((char*)m_pNext + (i_1 << 2));
0052ec6b                      j += 1;
0052ec6e                  } while (j < *(uint32_t*)((char*)ecx_16 + 0x48));
0052ec4f              }
0052ec4f              
0052ec73              i_1 += 1;
0052ec76          } while (i_1 < *(uint32_t*)((char*)this->m_timeStamp)[4]);
0052ebf3      }
0052ebf3      
0052ec78      class DBObj* m_pLast = this->m_pLast;
0052ec78      
0052ec7d      if (m_pLast != 0)
0052ec83          m_pLast->vtable->QueryInterface(arg2, arg3);
0052ec83      
0052ec8c      return result;
0052eb60  }

0052ec98                                                                          90 90 90 90 90 90 90 90                          ........

0052eca0  int32_t __thiscall CLandBlockInfo::UnPack(class CLandBlockInfo* this, void** arg2, uint32_t arg3)

0052eca0  {
0052eca0      class CLandBlockInfo* this_1 = this;
0052ecad      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
0052ecb8      this->m_numLinks = **(uint32_t**)arg2;
0052ecbd      void* edx_2 = (*(uint32_t*)arg2 + 4);
0052ecc0      *(uint32_t*)arg2 = edx_2;
0052ecc6      this->m_bLoaded*(int32_t*)((char*)this + 8) = *(uint32_t*)edx_2;
0052ecc9      *(uint32_t*)arg2 += 4;
0052eccc      int32_t ebx = this->m_bLoaded*(int32_t*)((char*)this + 8);
0052eccc      
0052ecd1      if (ebx > 0)
0052ecd1      {
0052ecdf          void* eax_3 = operator new[](((ebx << 2) + 4));
0052ece9          void* ebp_1;
0052ece9          
0052ece9          if (eax_3 == 0)
0052ed00              ebp_1 = nullptr;
0052ece9          else
0052ece9          {
0052ecf1              ebp_1 = ((char*)eax_3 + 4);
0052ecf7              *(uint32_t*)eax_3 = ebx;
0052ecf9              `vector constructor iterator'(ebp_1, 4, ebx, Vector3::Vector3);
0052ece9          }
0052ece9          
0052ed02          int32_t ebx_1 = this->m_bLoaded*(int32_t*)((char*)this + 8);
0052ed0e          *(int32_t*)((char*)this + 0xc) = ebp_1;
0052ed11          void* eax_4 = operator new[](((ebx_1 << 6) + 4));
0052ed1b          void* ebp_2;
0052ed1b          
0052ed1b          if (eax_4 == 0)
0052ed32              ebp_2 = nullptr;
0052ed1b          else
0052ed1b          {
0052ed23              ebp_2 = ((char*)eax_4 + 4);
0052ed29              *(uint32_t*)eax_4 = ebx_1;
0052ed2b              `vector constructor iterator'(ebp_2, 0x40, ebx_1, Frame::Frame);
0052ed1b          }
0052ed1b          
0052ed37          int32_t i = 0;
0052ed3b          this->m_timeStamp = ebp_2;
0052ed3b          
0052ed3e          if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
0052ed3e          {
0052ed40              int32_t ebp_3 = 0;
0052ed40              
0052ed6c              do
0052ed6c              {
0052ed45                  int32_t* ecx_3 = (*(int32_t*)((char*)this + 0xc) + (i << 2));
0052ed48                  void* eax_7 = *(uint32_t*)arg2;
0052ed4a                  int32_t edx_6 = *(uint32_t*)eax_7;
0052ed4f                  *(uint32_t*)arg2 = ((char*)eax_7 + 4);
0052ed51                  *(uint32_t*)ecx_3 = edx_6;
0052ed5e                  Frame::UnPack((this->m_timeStamp + ebp_3), arg2, arg3);
0052ed66                  i += 1;
0052ed67                  ebp_3 += 0x40;
0052ed6c              } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
0052ed3e          }
0052ecd1      }
0052ecd1      
0052ed71      void* ecx_7 = *(uint32_t*)arg2;
0052ed73      void** eax_11 = (*(int32_t*)((char*)this + -8) & 0xffff0000);
0052ed7c      int32_t eax_12 = *(uint32_t*)ecx_7;
0052ed81      *(uint32_t*)arg2 = ((char*)ecx_7 + 4);
0052ed85      uint32_t ecx_10 = ((uint32_t)eax_12);
0052ed90      *(uint32_t*)((char*)this->m_timeStamp)[4] = ecx_10;
0052ed90      
0052ed97      if (ecx_10 > 0)
0052ed97      {
0052eda5          void* eax_14;
0052eda5          int32_t ecx_11;
0052eda5          eax_14 = operator new[]((ecx_10 << 2));
0052edaa          this->m_pNext = eax_14;
0052edb3          int32_t i_1 = 0;
0052edb3          
0052edb7          if (*(uint32_t*)((char*)this->m_timeStamp)[4] > 0)
0052edb7          {
0052eeda              do
0052eeda              {
0052edc7                  void* ebx_2 = operator new(0x50);
0052edc7                  
0052edd0                  if (ebx_2 == 0)
0052ee07                      ebx_2 = nullptr;
0052edd0                  else
0052edd0                  {
0052edd8                      *(uint32_t*)ebx_2 = INVALID_DID.id;
0052eddd                      *(uint32_t*)((char*)ebx_2 + 4) = 0x3f800000;
0052ede3                      *(uint32_t*)((char*)ebx_2 + 8) = 0;
0052ede6                      *(uint32_t*)((char*)ebx_2 + 0xc) = 0;
0052ede9                      *(uint32_t*)((char*)ebx_2 + 0x10) = 0;
0052edec                      *(uint32_t*)((char*)ebx_2 + 0x38) = 0;
0052edef                      *(uint32_t*)((char*)ebx_2 + 0x3c) = 0;
0052edf2                      *(uint32_t*)((char*)ebx_2 + 0x40) = 0;
0052edf5                      Frame::cache(((char*)ebx_2 + 4));
0052edfc                      *(uint32_t*)((char*)ebx_2 + 0x44) = 0;
0052edff                      *(uint32_t*)((char*)ebx_2 + 0x48) = 0;
0052ee02                      *(uint32_t*)((char*)ebx_2 + 0x4c) = 0;
0052edd0                  }
0052edd0                  
0052ee0c                  *(uint32_t*)(this->m_pNext + (i_1 << 2)) = ebx_2;
0052ee12                  int32_t* ecx_15 = *(uint32_t*)(this->m_pNext + (i_1 << 2));
0052ee15                  void* eax_18 = *(uint32_t*)arg2;
0052ee17                  int32_t edx_9 = *(uint32_t*)eax_18;
0052ee1c                  *(uint32_t*)arg2 = ((char*)eax_18 + 4);
0052ee1e                  *(uint32_t*)ecx_15 = edx_9;
0052ee2f                  Frame::UnPack((*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 4), arg2, arg3);
0052ee3e                  *(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x44) = **(uint32_t**)arg2;
0052ee43                  void* ecx_21 = (*(uint32_t*)arg2 + 4);
0052ee46                  *(uint32_t*)arg2 = ecx_21;
0052ee52                  *(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x48) = *(uint32_t*)ecx_21;
0052ee55                  *(uint32_t*)arg2 += 4;
0052ee70                  *(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x4c) = operator new[]((*(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x48) << 2));
0052ee7f                  int32_t j = 0;
0052ee7f                  
0052ee83                  if (*(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x48) > 0)
0052ee83                  {
0052eed2                      do
0052eed2                      {
0052ee87                          void* eax_29 = operator new(0x1c);
0052ee91                          int32_t eax_30;
0052ee91                          
0052ee91                          if (eax_29 == 0)
0052ee9c                              eax_30 = 0;
0052ee91                          else
0052ee95                              eax_30 = CBldPortal::CBldPortal(eax_29);
0052ee95                          
0052eeab                          *(uint32_t*)(*(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x4c) + (j << 2)) = eax_30;
0052eec1                          CBldPortal::UnPack(*(uint32_t*)(*(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x4c) + (j << 2)), eax_11, arg2, arg3);
0052eecf                          j += 1;
0052eed2                      } while (j < *(uint32_t*)(*(uint32_t*)(this->m_pNext + (i_1 << 2)) + 0x48));
0052ee83                  }
0052ee83                  
0052eed7                  i_1 += 1;
0052eeda              } while (i_1 < *(uint32_t*)((char*)this->m_timeStamp)[4]);
0052edb7          }
0052ed97      }
0052ed97      
0052eee5      if (((eax_12 >> 0x10) & 1) != 0)
0052eee5      {
0052eee9          void* eax_35 = operator new(0x14);
0052eef7          void* ecx_35;
0052eef7          
0052eef7          if (eax_35 == 0)
0052ef42              ecx_35 = nullptr;
0052eef7          else
0052eef7          {
0052eefb              *(uint32_t*)eax_35 = 0x7c8ee0;
0052ef01              *(uint32_t*)((char*)eax_35 + 4) = 0;
0052ef04              *(uint32_t*)((char*)eax_35 + 8) = 0;
0052ef07              *(uint32_t*)((char*)eax_35 + 0xc) = 8;
0052ef0e              *(uint32_t*)((char*)eax_35 + 0x10) = 0;
0052ef11              void* eax_36 = operator new[](0x20);
0052ef1b              *(uint32_t*)((char*)eax_35 + 8) = eax_36;
0052ef1b              
0052ef1e              if (eax_36 != 0)
0052ef1e              {
0052ef23                  int32_t i_2 = 0;
0052ef23                  
0052ef27                  if (*(uint32_t*)((char*)eax_35 + 0xc) > 0)
0052ef27                  {
0052ef3c                      do
0052ef3c                      {
0052ef33                          *(uint32_t*)(*(uint32_t*)((char*)eax_35 + 8) + (i_2 << 2)) = 0;
0052ef39                          i_2 += 1;
0052ef3c                      } while (i_2 < *(uint32_t*)((char*)eax_35 + 0xc));
0052ef27                  }
0052ef1e              }
0052ef1e              
0052ef3e              ecx_35 = eax_35;
0052eef7          }
0052eef7          
0052ef49          this->m_pLast = ecx_35;
0052ef4f          int32_t result = *(uint32_t*)(*(uint32_t*)ecx_35 + 0x10)(arg2, arg3);
0052ef4f          
0052ef54          if (result == 0)
0052ef5b              return result;
0052eee5      }
0052eee5      
0052ef68      return 1;
0052eca0  }

0052ef6b                                   90 90 90 90 90                                                             .....

0052ef70  uint32_t __fastcall CLandBlockInfo::GetRestrictionIID(class CLandBlockInfo const* this, uint32_t const arg2)

0052ef70  {
0052ef70      class PackableHashTable<unsigned long,unsigned long>* restriction_table = this->restriction_table;
0052ef70      
0052ef75      if (restriction_table != 0)
0052ef75      {
0052ef7c          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(restriction_table, &arg2);
0052ef7c          
0052ef83          if (eax_1 != 0)
0052ef8c              return *(uint32_t*)eax_1;
0052ef75      }
0052ef75      
0052ef87      return 0;
0052ef70  }

0052ef8f                                               90                                                                 .

0052ef90  void __fastcall PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(class PackableHashTable<IDClass<_tagDataID,32,0>,int>* this)

0052ef90  {
0052ef99      if (this->_buckets != 0)
0052ef99      {
0052ef9e          int32_t i = 0;
0052ef9e          
0052efa2          if (this->_table_size > 0)
0052efa2          {
0052efd2              do
0052efd2              {
0052efa8                  void* j_1 = this->_buckets[i];
0052efa8                  
0052efad                  if (j_1 != 0)
0052efad                  {
0052efc0                      void* j;
0052efc0                      
0052efc0                      do
0052efc0                      {
0052efb0                          j = *(uint32_t*)((char*)j_1 + 8);
0052efb4                          operator delete(j_1);
0052efbe                          j_1 = j;
0052efc0                      } while (j != 0);
0052efad                  }
0052efad                  
0052efc2                  this->_buckets[i] = 0;
0052efcf                  i += 1;
0052efd2              } while (i < this->_table_size);
0052efa2          }
0052ef99      }
0052ef99      
0052efd5      this->_currNum = 0;
0052ef90  }

0052efdf                                                                                               90                                 .

0052efe0  void* __thiscall PackableHashTable<unsigned long,unsigned long>::`scalar deleting destructor'(class PackableHashTable<unsigned long,unsigned long>* this, uint32_t arg2)

0052efe0  {
0052efe3      this->vtable = 0x7c8ee0;
0052efe9      PackableHashTable<unsigned long,unsigned long>::Destroy(this);
0052eff3      this->vtable = 0x79285c;
0052eff3      
0052eff9      if ((arg2 & 1) != 0)
0052effc          operator delete(this);
0052effc      
0052f007      return this;
0052efe0  }

0052f00a                                90 90 90 90 90 90                                                            ......

0052f010  void* __thiscall CLandBlockInfo::`scalar deleting destructor'(class CLandBlockInfo* this, uint32_t arg2)

0052f010  {
0052f013      this->vtable = 0x7c8e88;
0052f019      this->vtable = &CLandBlockInfo::`vftable';
0052f020      CLandBlockInfo::Destroy(this);
0052f027      this->vtable = &PackObj::`vftable';
0052f02e      DBObj::~DBObj(this);
0052f02e      
0052f038      if ((arg2 & 1) != 0)
0052f03b          operator delete(this);
0052f03b      
0052f046      return this;
0052f010  }

0052f049                             90 90 90 90 90 90 90                                                           .......

0052f050  int32_t __thiscall Plane::set_height(class Plane const* this, class AC1Legacy::Vector3* arg2)

0052f050  {
0052f053      long double x87_r7 = fabsl(((long double)this->N.z));
0052f055      long double x87_r6 = ((long double)0.000199999995f);
0052f05b      (x87_r6 - x87_r7);
0052f05d      int32_t eax;
0052f05d      eax = ((((x87_r6 < x87_r7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7) ? 1 : 0) << 0xe) | 0))));
0052f05f      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0052f05f      
0052f062      if (p)
0052f089          return 0;
0052f089      
0052f07c      arg2->z = ((float)-(((((((long double)arg2->y) * ((long double)this->N.y)) + (((long double)arg2->x) * ((long double)this->N.x))) + ((long double)this->d)) / ((long double)this->N.z))));
0052f084      return 1;
0052f050  }

0052f08c                                      90 90 90 90                                                              ....

0052f090  int32_t __thiscall ObjectDesc::CheckSlope(class ObjectDesc* this, float arg2)

0052f090  {
0052f090      long double x87_r7 = ((long double)arg2);
0052f094      long double temp1 = ((long double)this->min_slope);
0052f094      (x87_r7 - temp1);
0052f094      
0052f09c      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0052f09c      {
0052f0a2          (((long double)arg2) - ((long double)this->max_slope));
0052f0a7          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0052f0a7          
0052f0aa          if (!(p_1))
0052f0b1              return 1;
0052f09c      }
0052f09c      
0052f0b6      return 0;
0052f090  }

0052f0b9                                                                             90 90 90 90 90 90 90                           .......

0052f0c0  int32_t __thiscall ObjectDesc::ScaleObj(class ObjectDesc* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

0052f0c0  {
0052f0c3      long double x87_r7 = ((long double)this->min_scale);
0052f0c6      long double temp1 = ((long double)this->max_scale);
0052f0c6      (x87_r7 - temp1);
0052f0c9      int32_t eax;
0052f0c9      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0052f0cb      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0052f0cb      
0052f0ce      if (!(p))
0052f0ce      {
0052f0d0          this->max_scale;
0052f0d4          return eax;
0052f0ce      }
0052f0ce      
0052f0db      this->max_scale;
0052f0e2      this->min_scale;
0052f12c      int32_t eax_5 = j__CIpow();
0052f131      this->min_scale;
0052f136      return eax_5;
0052f0c0  }

0052f139                                                                             90 90 90 90 90 90 90                           .......

0052f140  void __fastcall CLandBlock::destroy_buildings(class CLandBlock* this)

0052f140  {
0052f14e      if (this->buildings != 0)
0052f14e      {
0052f157          int32_t i = 0;
0052f157          
0052f15b          if (this->num_buildings > 0)
0052f15b          {
0052f18e              do
0052f18e              {
0052f166                  class CBuildingObj* ecx_1 = this->buildings[i];
0052f166                  
0052f16b                  if (ecx_1 != 0)
0052f16b                  {
0052f16d                      CBuildingObj::remove(ecx_1);
0052f178                      int32_t* ecx_3 = this->buildings[i];
0052f178                      
0052f17d                      if (ecx_3 != 0)
0052f183                          **(uint32_t**)ecx_3(1);
0052f16b                  }
0052f16b                  
0052f18b                  i += 1;
0052f18e              } while (i < this->num_buildings);
0052f15b          }
0052f15b          
0052f197          operator delete[](this->buildings);
0052f19f          this->buildings = nullptr;
0052f14e      }
0052f14e      
0052f1a6      uint32_t* stablist = this->stablist;
0052f1ae      this->num_buildings = 0;
0052f1ae      
0052f1b4      if (stablist != 0)
0052f1b4      {
0052f1b7          operator delete[](stablist);
0052f1bf          this->stablist = nullptr;
0052f1c5          this->stab_num = 0;
0052f1b4      }
0052f140  }

0052f1ce                                            90 90                                                                ..

0052f1d0  void __fastcall CLandBlock::get_land_limits(class CLandBlock* this)

0052f1d0  {
0052f1d0      int32_t ebx;
0052f1d0      int32_t var_4 = ebx;
0052f1d2      uint8_t* height = this->height;
0052f1d5      uint8_t eax = *(uint8_t*)height;
0052f1d8      uint8_t edx = eax;
0052f1da      void* esi = &height[3];
0052f1dd      int32_t i_1 = 8;
0052f27b      int32_t i;
0052f27b      
0052f27b      do
0052f27b      {
0052f1e2          ebx = *(uint8_t*)((char*)esi - 2);
0052f1e2          
0052f1e7          if (eax < ebx)
0052f1e9              eax = ebx;
0052f1e9          
0052f1ed          if (edx > ebx)
0052f1ef              edx = ebx;
0052f1ef          
0052f1f1          ebx = *(uint8_t*)((char*)esi - 1);
0052f1f1          
0052f1f6          if (eax < ebx)
0052f1f8              eax = ebx;
0052f1f8          
0052f1fc          if (edx > ebx)
0052f1fe              edx = ebx;
0052f1fe          
0052f200          ebx = *(uint8_t*)esi;
0052f200          
0052f204          if (eax < ebx)
0052f206              eax = ebx;
0052f206          
0052f20a          if (edx > ebx)
0052f20c              edx = ebx;
0052f20c          
0052f20e          ebx = *(uint8_t*)((char*)esi + 1);
0052f20e          
0052f213          if (eax < ebx)
0052f215              eax = ebx;
0052f215          
0052f219          if (edx > ebx)
0052f21b              edx = ebx;
0052f21b          
0052f21d          ebx = *(uint8_t*)((char*)esi + 2);
0052f21d          
0052f222          if (eax < ebx)
0052f224              eax = ebx;
0052f224          
0052f228          if (edx > ebx)
0052f22a              edx = ebx;
0052f22a          
0052f22c          ebx = *(uint8_t*)((char*)esi + 3);
0052f22c          
0052f231          if (eax < ebx)
0052f233              eax = ebx;
0052f233          
0052f237          if (edx > ebx)
0052f239              edx = ebx;
0052f239          
0052f23b          ebx = *(uint8_t*)((char*)esi + 4);
0052f23b          
0052f240          if (eax < ebx)
0052f242              eax = ebx;
0052f242          
0052f246          if (edx > ebx)
0052f248              edx = ebx;
0052f248          
0052f24a          ebx = *(uint8_t*)((char*)esi + 5);
0052f24a          
0052f24f          if (eax < ebx)
0052f251              eax = ebx;
0052f251          
0052f255          if (edx > ebx)
0052f257              edx = ebx;
0052f257          
0052f259          ebx = *(uint8_t*)((char*)esi + 6);
0052f259          
0052f25e          if (eax < ebx)
0052f260              eax = ebx;
0052f260          
0052f264          if (edx > ebx)
0052f266              edx = ebx;
0052f266          
0052f268          ebx = *(uint8_t*)((char*)esi + 7);
0052f268          
0052f26d          if (eax < ebx)
0052f26f              eax = ebx;
0052f26f          
0052f273          if (edx > ebx)
0052f275              edx = ebx;
0052f275          
0052f277          esi += 0xa;
0052f27a          i = i_1;
0052f27a          i_1 -= 1;
0052f27b      } while (i != 1);
0052f297      this->max_zval = ((float)(((long double)LandDefs::Land_Height_Table[((uint32_t)eax)]) + ((long double)200f)));
0052f2aa      this->min_zval = ((float)(((long double)LandDefs::Land_Height_Table[((uint32_t)edx)]) - ((long double)1f)));
0052f1d0  }

0052f2b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0052f2c0  uint32_t __thiscall CLandBlock::Pack(class CLandBlock* this, void** arg2, uint32_t arg3)

0052f2c0  {
0052f2ca      CLandBlockStruct::pack_size(&this->m_bLoaded);
0052f2ca      
0052f2da      if (arg3 >= 0xf8)
0052f2da      {
0052f2e8          **(uint32_t**)arg2 = this->block_frame.m_fl2gv[3];
0052f2f3          *(uint32_t*)arg2 += 4;
0052f2f5          CLandBlockStruct::Pack(&this->m_bLoaded, arg2, arg3);
0052f2da      }
0052f2da      
0052f2ff      return 0xf8;
0052f2c0  }

0052f302        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0052f310  int32_t __thiscall CLandBlock::UnPack(class CLandBlock* this, void** arg2, uint32_t arg3)

0052f310  {
0052f319      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
0052f324      this->block_frame.m_fl2gv[3] = **(uint32_t**)arg2;
0052f32a      *(uint32_t*)arg2 += 4;
0052f336      CLandBlockStruct::UnPack(&this->m_bLoaded, arg2, arg3);
0052f341      return 1;
0052f310  }

0052f344              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0052f350  void __fastcall CLandBlock::release_objs(class CLandBlock* this)

0052f350  {
0052f357      if (this->side_vertex_count == 9)
0052f357      {
0052f35d          int32_t i = 0;
0052f35d          
0052f361          if (this->side_cell_count > 0)
0052f361          {
0052f399              do
0052f399              {
0052f367                  int32_t j = 0;
0052f367                  
0052f36b                  if (this->side_cell_count > 0)
0052f36b                  {
0052f391                      do
0052f391                      {
0052f386                          CObjCell::release_objects(((((this->side_cell_count * i) + j) * 0x108) + this->lcell));
0052f38e                          j += 1;
0052f391                      } while (j < this->side_cell_count);
0052f36b                  }
0052f36b                  
0052f396                  i += 1;
0052f399              } while (i < this->side_cell_count);
0052f361          }
0052f361          
0052f39c          this->dyn_objs_init_done = 0;
0052f357      }
0052f350  }

0052f3a9                             90 90 90 90 90 90 90                                                           .......

0052f3b0  void __fastcall CLandBlock::init_dyn_objs(class CLandBlock* this)

0052f3b0  {
0052f3c1      if ((this->side_cell_count == 8 && this->dyn_objs_init_done == 0))
0052f3c1      {
0052f3c5          int32_t i = 0;
0052f3c5          
0052f3f9          do
0052f3f9          {
0052f3ca              int32_t j = 0;
0052f3ca              
0052f3ce              if (this->side_cell_count > 0)
0052f3ce              {
0052f3f1                  do
0052f3f1                  {
0052f3e6                      CObjCell::init_objects(((((this->side_cell_count * i) + j) * 0x108) + this->lcell));
0052f3ee                      j += 1;
0052f3f1                  } while (j < this->side_cell_count);
0052f3ce              }
0052f3ce              
0052f3f6              i += 1;
0052f3f9          } while (i < this->side_cell_count);
0052f3f9          
0052f3fc          this->dyn_objs_init_done = 1;
0052f3c1      }
0052f3b0  }

0052f409                             90 90 90 90 90 90 90                                                           .......

0052f410  void __fastcall CLandBlock::init_lcell_ptrs(class CLandBlock* this)

0052f410  {
0052f410      int32_t side_cell_count_1 = this->side_cell_count;
0052f419      int32_t i = 0;
0052f419      
0052f41d      if ((side_cell_count_1 * side_cell_count_1) > 0)
0052f41d      {
0052f41f          int32_t esi_2 = 0;
0052f44e          int32_t side_cell_count;
0052f44e          
0052f44e          do
0052f44e          {
0052f436              *(uint32_t*)(&this->lcell->myLandBlock_ + esi_2) = this;
0052f43d              side_cell_count = this->side_cell_count;
0052f445              i += 1;
0052f446              esi_2 += 0x108;
0052f44e          } while (i < (side_cell_count * side_cell_count));
0052f41d      }
0052f410  }

0052f424              8d a4 24 00 00 00 00 eb 03 8d 49 00                                                      ..$.......I.
0052f453                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0052f460  void __fastcall CLandBlock::grab_visible_cells(class CLandBlock* this)

0052f460  {
0052f46f      CEnvCell::grab_visible(this->stab_num, this->stablist, this);
0052f460  }

0052f478                                                                          90 90 90 90 90 90 90 90                          ........

0052f480  void __fastcall CLandBlock::release_visible_cells(class CLandBlock* this)

0052f480  {
0052f48e      CEnvCell::release_visible(this->stab_num, this->stablist);
0052f480  }

0052f497                                                                       90 90 90 90 90 90 90 90 90                         .........

0052f4a0  int32_t __thiscall CLandBlock::calc_sq_draw_order(class CLandBlock* this, enum LandDefs::Direction arg2, struct SqCoord const* arg3)

0052f4a0  {
0052f4a6      class CLandCell** draw_array = this->draw_array;
0052f4a6      
0052f4ae      if (draw_array == 0)
0052f4ae      {
0052f4e0          int32_t side_cell_count_1 = this->side_cell_count;
0052f4e3          uint32_t eax_3 = (side_cell_count_1 * side_cell_count_1);
0052f4ee          this->draw_array_size = eax_3;
0052f4fc          this->draw_array = operator new[]((eax_3 << 2));
0052f4ae      }
0052f4ae      else
0052f4ae      {
0052f4b0          int32_t side_cell_count_2 = this->side_cell_count;
0052f4b0          
0052f4be          if (this->draw_array_size < (side_cell_count_2 * side_cell_count_2))
0052f4be          {
0052f4c1              operator delete[](draw_array);
0052f4c6              int32_t side_cell_count = this->side_cell_count;
0052f4c9              uint32_t eax = (side_cell_count * side_cell_count);
0052f4cc              this->draw_array_size = eax;
0052f4fc              this->draw_array = operator new[]((eax << 2));
0052f4be          }
0052f4ae      }
0052f4ae      
0052f502      int32_t side_cell_count_3 = this->side_cell_count;
0052f502      
0052f508      if (side_cell_count_3 == 1)
0052f508      {
0052f516          *(uint32_t*)this->draw_array = this->lcell;
0052f51e          return side_cell_count_3;
0052f508      }
0052f508      
0052f527      int32_t temp0 = (8 / side_cell_count_3);
0052f52b      enum LandDefs::Direction ebp = arg2;
0052f535      uint32_t var_8;
0052f535      uint32_t var_4;
0052f535      uint32_t eax_11;
0052f535      uint32_t esi;
0052f535      
0052f535      if (ebp > SOUTHEAST_OF_VIEWER)
0052f535      {
0052f605          eax_11 = var_4;
0052f609          esi = var_8;
0052f535      }
0052f535      else
0052f53b          switch (ebp)
0052f53b          {
0052f54f              case IN_VIEWER_BLOCK:
0052f54f              {
0052f54f                  esi = (COMBINE(0, arg3->x) / temp0);
0052f554                  eax_11 = (COMBINE(0, arg3->y) / temp0);
0052f556                  ebp = arg2;
0052f55a                  var_8 = esi;
0052f55e                  var_4 = eax_11;
0052f54f                  break;
0052f54f              }
0052f571              case NORTH_OF_VIEWER:
0052f571              {
0052f571                  esi = (COMBINE(0, arg3->x) / temp0);
0052f573                  eax_11 = 0;
0052f575                  var_8 = esi;
0052f579                  var_4 = 0;
0052f571                  break;
0052f571              }
0052f58c              case SOUTH_OF_VIEWER:
0052f58c              {
0052f58c                  esi = (COMBINE(0, arg3->x) / temp0);
0052f58e                  eax_11 = (side_cell_count_3 - 1);
0052f591                  var_8 = esi;
0052f595                  var_4 = eax_11;
0052f58c                  break;
0052f58c              }
0052f5a2              case EAST_OF_VIEWER:
0052f5a2              {
0052f5a2                  esi = 0;
0052f5a6                  eax_11 = (COMBINE(0, arg3->y) / temp0);
0052f5a8                  var_8 = 0;
0052f5ac                  var_4 = eax_11;
0052f5a2                  break;
0052f5a2              }
0052f5bb              case WEST_OF_VIEWER:
0052f5bb              {
0052f5bb                  eax_11 = (COMBINE(0, arg3->y) / temp0);
0052f5bd                  esi = (side_cell_count_3 - 1);
0052f5c0                  var_8 = esi;
0052f5c4                  var_4 = eax_11;
0052f5bb                  break;
0052f5bb              }
0052f5ca              case NORTHWEST_OF_VIEWER:
0052f5ca              {
0052f5ca                  esi = (side_cell_count_3 - 1);
0052f5cd                  eax_11 = 0;
0052f5cf                  var_8 = esi;
0052f5d3                  var_4 = 0;
0052f5ca                  break;
0052f5ca              }
0052f5e7              case SOUTHWEST_OF_VIEWER:
0052f5e7              {
0052f5e7                  esi = (side_cell_count_3 - 1);
0052f5ea                  eax_11 = esi;
0052f5ec                  var_8 = esi;
0052f5f0                  var_4 = eax_11;
0052f5e7                  break;
0052f5e7              }
0052f5d9              case NORTHEAST_OF_VIEWER:
0052f5d9              {
0052f5d9                  esi = 0;
0052f5db                  eax_11 = 0;
0052f5dd                  var_8 = 0;
0052f5e1                  var_4 = 0;
0052f5d9                  break;
0052f5d9              }
0052f5f6              case SOUTHEAST_OF_VIEWER:
0052f5f6              {
0052f5f6                  esi = 0;
0052f5f8                  eax_11 = (side_cell_count_3 - 1);
0052f5fb                  var_8 = 0;
0052f5ff                  var_4 = eax_11;
0052f5f6                  break;
0052f5f6              }
0052f53b          }
0052f53b      
0052f60d      bool cond:2 = esi != this->closest.x;
0052f613      this->dir = ebp;
0052f613      
0052f621      if ((!(cond:2) && eax_11 == this->closest.y))
0052f62c          return 0;
0052f62c      
0052f631      this->closest.x = esi;
0052f637      this->closest.y = eax_11;
0052f63f      uint32_t ebp_2;
0052f63f      
0052f63f      if (esi <= eax_11)
0052f63f      {
0052f650          ebp_2 = ((side_cell_count_3 - esi) - 1);
0052f650          
0052f655          if (eax_11 > ebp_2)
0052f657              ebp_2 = eax_11;
0052f63f      }
0052f63f      else
0052f63f      {
0052f643          ebp_2 = ((side_cell_count_3 - eax_11) - 1);
0052f643          
0052f648          if (esi > ebp_2)
0052f64a              ebp_2 = esi;
0052f63f      }
0052f63f      
0052f678      int32_t ebx_2 = 1;
0052f67f      uint32_t var_c = ebp_2;
0052f683      arg3 = ((side_cell_count_3 * side_cell_count_3) - 1);
0052f669      this->draw_array[((side_cell_count_3 * side_cell_count_3) - 1)] = ((((side_cell_count_3 * esi) + eax_11) * 0x108) + this->lcell);
0052f669      
0052f68a      if (ebp_2 >= 1)
0052f68a      {
0052f8ca          do
0052f8ca          {
0052f690              int32_t eax_22 = 0;
0052f690              
0052f694              if (ebx_2 > 0)
0052f694              {
0052f8bd                  do
0052f8bd                  {
0052f8b4                      for (void* i = nullptr; i < 0x20; i += 0x10)
0052f8b4                      {
0052f6d0                          int32_t edx_29 = ((((*(uint32_t*)((char*)i + 0x81e028) * eax_22) + (*(uint32_t*)((char*)i + 0x81e008) * ebx_2)) + *(uint32_t*)((char*)i + 0x81dfe8)) + esi);
0052f6e6                          int32_t esi_5 = ((((*(uint32_t*)((char*)i + 0x81dfa8) * eax_22) + (*(uint32_t*)((char*)i + 0x81dfc8) * ebx_2)) + *(uint32_t*)((char*)i + 0x81df88)) + var_4);
0052f6ea                          int32_t side_cell_count_4 = this->side_cell_count;
0052f6ea                          
0052f700                          if ((edx_29 <= (side_cell_count_4 - 1) && (esi_5 <= (side_cell_count_4 - 1) && (edx_29 >= 0 && esi_5 >= 0))))
0052f700                          {
0052f702                              arg3 -= 1;
0052f721                              this->draw_array[arg3] = ((((side_cell_count_4 * edx_29) + esi_5) * 0x108) + this->lcell);
0052f700                          }
0052f700                          
0052f750                          int32_t edx_36 = ((((*(uint32_t*)((char*)i + 0x81e02c) * eax_22) + (*(uint32_t*)((char*)i + 0x81e00c) * ebx_2)) + *(uint32_t*)((char*)i + 0x81dfec)) + var_8);
0052f766                          int32_t esi_14 = ((((*(uint32_t*)((char*)i + 0x81dfac) * eax_22) + (*(uint32_t*)((char*)i + 0x81dfcc) * ebx_2)) + *(uint32_t*)((char*)i + 0x81df8c)) + var_4);
0052f76a                          int32_t side_cell_count_5 = this->side_cell_count;
0052f76a                          
0052f780                          if ((edx_36 <= (side_cell_count_5 - 1) && (esi_14 <= (side_cell_count_5 - 1) && (edx_36 >= 0 && esi_14 >= 0))))
0052f780                          {
0052f782                              arg3 -= 1;
0052f7a1                              this->draw_array[arg3] = ((((side_cell_count_5 * edx_36) + esi_14) * 0x108) + this->lcell);
0052f780                          }
0052f780                          
0052f7d0                          int32_t edx_43 = ((((*(uint32_t*)((char*)i + 0x81e030) * eax_22) + (*(uint32_t*)((char*)i + 0x81e010) * ebx_2)) + *(uint32_t*)((char*)i + 0x81dff0)) + var_8);
0052f7e6                          int32_t esi_23 = ((((*(uint32_t*)((char*)i + 0x81dfb0) * eax_22) + (*(uint32_t*)((char*)i + 0x81dfd0) * ebx_2)) + *(uint32_t*)((char*)i + 0x81df90)) + var_4);
0052f7ea                          int32_t side_cell_count_6 = this->side_cell_count;
0052f7ea                          
0052f800                          if ((edx_43 <= (side_cell_count_6 - 1) && (esi_23 <= (side_cell_count_6 - 1) && (edx_43 >= 0 && esi_23 >= 0))))
0052f800                          {
0052f802                              arg3 -= 1;
0052f821                              this->draw_array[arg3] = ((((side_cell_count_6 * edx_43) + esi_23) * 0x108) + this->lcell);
0052f800                          }
0052f800                          
0052f850                          int32_t edx_50 = ((((*(uint32_t*)((char*)i + 0x81e034) * eax_22) + (*(uint32_t*)((char*)i + 0x81e014) * ebx_2)) + *(uint32_t*)((char*)i + 0x81dff4)) + var_8);
0052f866                          int32_t esi_32 = ((((*(uint32_t*)((char*)i + 0x81dfb4) * eax_22) + (*(uint32_t*)((char*)i + 0x81dfd4) * ebx_2)) + *(uint32_t*)((char*)i + 0x81df94)) + var_4);
0052f86a                          int32_t side_cell_count_7 = this->side_cell_count;
0052f86a                          
0052f880                          if ((edx_50 <= (side_cell_count_7 - 1) && (esi_32 <= (side_cell_count_7 - 1) && (edx_50 >= 0 && esi_32 >= 0))))
0052f880                          {
0052f882                              arg3 -= 1;
0052f8a1                              this->draw_array[arg3] = ((((side_cell_count_7 * edx_50) + esi_32) * 0x108) + this->lcell);
0052f880                          }
0052f880                          
0052f8aa                          esi = var_8;
0052f8b4                      }
0052f8b4                      
0052f8ba                      eax_22 += 1;
0052f8bd                  } while (eax_22 < ebx_2);
0052f8bd                  
0052f8c3                  ebp_2 = var_c;
0052f694              }
0052f694              
0052f8c7              ebx_2 += 1;
0052f8ca          } while (ebx_2 <= ebp_2);
0052f68a      }
0052f68a      
0052f8dc      return 1;
0052f4a0  }

0052f6a4              8d a4 24 00 00 00 00 eb 03 8d 49 00                                                      ..$.......I.
0052f8df                                                                                               90                                 .
0052f8e0  uint32_t jump_table_52f8e0[0x9] = 
0052f8e0  {
0052f8e0      [0x0] =  0x0052f542
0052f8e4      [0x1] =  0x0052f567
0052f8e8      [0x2] =  0x0052f582
0052f8ec      [0x3] =  0x0052f59b
0052f8f0      [0x4] =  0x0052f5b2
0052f8f4      [0x5] =  0x0052f5ca
0052f8f8      [0x6] =  0x0052f5e7
0052f8fc      [0x7] =  0x0052f5d9
0052f900      [0x8] =  0x0052f5f6
0052f904  }

0052f904              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0052f910  void __thiscall CLandBlock::add_static_object(class CLandBlock* this, class CPhysicsObj* arg2)

0052f910  {
0052f913      uint32_t sizeOf = this->static_objects.sizeOf;
0052f913      
0052f91f      if (this->num_static_objects >= sizeOf)
0052f92b          DArray<CPhysicsObj *>::grow(&this->static_objects, (sizeOf + 0x28));
0052f92b      
0052f930      uint32_t num_static_objects = this->num_static_objects;
0052f936      class CPhysicsObj** data = this->static_objects.data;
0052f93f      this->num_static_objects = (num_static_objects + 1);
0052f949      data[num_static_objects] = arg2;
0052f910  }


0052f950  void __fastcall CLandBlock::CLandBlock(class CLandBlock* this)

0052f950  {
0052f95a      DBObj::DBObj(this, INVALID_DID.id);
0052f95f      this->vtable = &PackObj::`vftable';
0052f969      this->vtable = 0x7c58e0;
0052f96f      this->vtable = &SerializeUsingPackDBObj::`vftable';
0052f976      CLandBlockStruct::CLandBlockStruct(&this->vertex_lighting);
0052f981      this->vtable = 0x7c8fc0;
0052f987      this->vtable = &CLandBlock::`vftable';
0052f97b      this->block_frame.qw = 0x3f800000;
0052f97b      this->block_frame.qx = 0f;
0052f97b      this->block_frame.qy = 0f;
0052f97b      this->block_frame.qz = 0f;
0052f97b      this->block_frame.m_fOrigin.x = 0;
0052f97b      this->block_frame.m_fOrigin.y = 0f;
0052f97b      this->block_frame.m_fOrigin.z = 0f;
0052f9a8      Frame::cache(&this->block_frame);
0052f9ad      this->max_zval = 0f;
0052f9b3      this->min_zval = 0f;
0052f9b9      this->dyn_objs_init_done = 0;
0052f9bf      this->lbi_exists = 0;
0052f9c5      this->in_view = OUTSIDE;
0052f9cb      this->lbi = nullptr;
0052f9d1      this->num_static_objects = 0;
0052f9d7      this->dir = UNKNOWN;
0052f9e1      this->static_objects.data = 0;
0052f9ed      __builtin_memset(&this->static_objects.next_available, 0, 0x20);
0052f9f3      this->static_objects.blocksize = 0x80;
0052fa24      this->closest.x = 0xffffffff;
0052fa2a      this->closest.y = 0xffffffff;
0052f950  }

0052fa35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0052fa40  void* __thiscall CLandBlock::`vector deleting destructor'(class CLandBlock* this, uint32_t arg2)

0052fa40  {
0052fa43      /* tailcall */
0052fa43      return CLandBlock::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0052fa40  }

0052fa48                          cc cc cc cc cc cc cc cc                                                          ........

0052fa50  void __fastcall CLandBlock::destroy_static_objects(class CLandBlock* this)

0052fa50  {
0052fa5a      int32_t i = 0;
0052fa5a      
0052fa5e      if (this->num_static_objects > 0)
0052fa5e      {
0052fa86          do
0052fa86          {
0052fa67              int32_t* esi_1 = this->static_objects.data[i];
0052fa67              
0052fa6c              if (esi_1 != 0)
0052fa6c              {
0052fa70                  CPhysicsObj::leave_world(esi_1);
0052fa7b                  **(uint32_t**)esi_1(1);
0052fa6c              }
0052fa6c              
0052fa83              i += 1;
0052fa86          } while (i < this->num_static_objects);
0052fa5e      }
0052fa5e      
0052fa89      this->num_static_objects = 0;
0052fa50  }

0052fa96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0052faa0  void __fastcall CLandBlock::Destroy(class CLandBlock* this)

0052faa0  {
0052faa4      CLandBlock::destroy_static_objects(this);
0052faab      CLandBlock::destroy_buildings(this);
0052fab0      class CLandBlockInfo* lbi = this->lbi;
0052fab0      
0052faba      if (lbi != 0)
0052faba      {
0052fabc          lbi->vtable->Release();
0052fac1          this->lbi = nullptr;
0052faba      }
0052faba      
0052faca      this->closest.x = 0xffffffff;
0052fad0      this->closest.y = 0xffffffff;
0052fad6      class CLandCell** draw_array = this->draw_array;
0052fade      this->lbi_exists = 0;
0052fae4      this->dir = UNKNOWN;
0052fae4      
0052faee      if (draw_array != 0)
0052faee      {
0052faf1          operator delete[](draw_array);
0052faf9          this->draw_array = nullptr;
0052faee      }
0052faee      
0052faff      this->draw_array_size = 0;
0052faa0  }

0052fb08                          90 90 90 90 90 90 90 90                                                          ........

0052fb10  void CLandBlock::init()

0052fb10  {
0052fb10      CLandBlockStruct::land_uvs[0].u = 0;
0052fb1a      CLandBlockStruct::land_uvs[0].v = 1f;
0052fb24      CLandBlockStruct::land_uvs[1].u = 0x3f800000;
0052fb2e      CLandBlockStruct::land_uvs[1].v = 1f;
0052fb38      CLandBlockStruct::land_uvs[2].u = 0x3f800000;
0052fb42      CLandBlockStruct::land_uvs[2].v = 0f;
0052fb4c      CLandBlockStruct::land_uvs[3].u = 0;
0052fb56      CLandBlockStruct::land_uvs[3].v = 0f;
0052fb10  }

0052fb61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0052fb70  uint32_t __thiscall CLandBlock::get_terrain(class CLandBlock* this, uint32_t arg2, class AC1Legacy::Vector3 const* arg3)

0052fb70  {
0052fb70      class CLandBlock* this_1 = this;
0052fb83      LandDefs::gid_to_lcoord(arg2, &this_1, &arg2);
0052fb8f      void* this_2 = (this_1 & 0x80000007);
0052fb8f      
0052fb95      if (this_2 < 0)
0052fb9b          this_2 = ((((char*)this_2 - 1) | 0xfffffff8) + 1);
0052fb9b      
0052fba0      uint32_t edx_2 = (arg2 & 0x80000007);
0052fba6      this_1 = this_2;
0052fba6      
0052fbaa      if (edx_2 < 0)
0052fbb0          edx_2 = (((edx_2 - 1) | 0xfffffff8) + 1);
0052fbb0      
0052fbb5      arg2 = edx_2;
0052fbb9      long double x87_r7 = ((long double)arg2);
0052fbc5      long double x87_r7_3 = (((x87_r7 + x87_r7) + ((long double)1f)) * ((long double)0f));
0052fbcb      long double x87_r6 = ((long double)arg3->y);
0052fbce      long double x87_r5 = ((long double)this_1);
0052fbda      long double x87_r5_3 = (((x87_r5 + x87_r5) + ((long double)1f)) * ((long double)0f));
0052fbe0      long double temp1 = ((long double)arg3->x);
0052fbe0      (x87_r5_3 - temp1);
0052fbe2      class AC1Legacy::Vector3* eax;
0052fbe2      eax = ((((x87_r5_3 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_3, temp1))) ? 1 : 0) << 0xa) | ((((x87_r5_3 == temp1) ? 1 : 0) << 0xe) | 0x3000))));
0052fbe4      (x87_r6 - x87_r7_3);
0052fbe6      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0052fbeb      eax = ((((x87_r6 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_3) ? 1 : 0) << 0xe) | 0))));
0052fbeb      
0052fbed      if (!(p))
0052fbed      {
0052fbf2          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
0052fc24              return ((((uint32_t)this->terrain[((((char*)this_2 + 1) * 9) + edx_2)]) >> 2) & 0x1f);
0052fc24          
0052fbfe          int32_t eax_2;
0052fbfe          eax_2 = this->terrain[(((this_2 * 9) + edx_2) + 0xa)];
0052fc0a          return ((eax_2 >> 2) & 0x1f);
0052fbed      }
0052fbed      
0052fc2a      int32_t eax_10 = (edx_2 + (this_2 << 3));
0052fc2d      uint16_t* terrain = this->terrain;
0052fc2d      
0052fc30      if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
0052fc30      {
0052fc49          int32_t eax_14;
0052fc49          eax_14 = terrain[((char*)this_2 + eax_10)];
0052fc54          return ((eax_14 >> 2) & 0x1f);
0052fc30      }
0052fc30      
0052fc36      int32_t eax_11;
0052fc36      eax_11 = terrain[(((char*)this_2 + eax_10) + 1)];
0052fc42      return ((eax_11 >> 2) & 0x1f);
0052fb70  }

0052fc57                                                                       90 90 90 90 90 90 90 90 90                         .........

0052fc60  void __thiscall CLandBlock::GetSubDataIDs(class CLandBlock const* this, class QualifiedDataIDArray* arg2)

0052fc60  {
0052fc6b      if (this->lbi_exists != 0)
0052fc6b      {
0052fc7f          void var_8;
0052fc7f          QualifiedDataID::QualifiedDataID(&var_8, ((this->m_DID.id & 0xfffffffe) | 0xfffe), 2);
0052fc8f          QualifiedDataIDArray::AddQDID(arg2, &var_8, 0);
0052fc6b      }
0052fc60  }

0052fc9a                                                                                90 90 90 90 90 90                            ......

0052fca0  uint8_t __fastcall CLandBlock::InitLoad(class CLandBlock* this)

0052fca0  {
0052fcae      if (this->lbi_exists == 0)
0052fcae      {
0052fce0          int32_t eax;
0052fce0          eax = 1;
0052fce6          return 1;
0052fcae      }
0052fcae      
0052fcc8      void var_8;
0052fcc8      class CLandBlockInfo* eax_5 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, ((this->m_DID.id & 0xfffffffe) | 0xfffe), 2));
0052fcd0      this->lbi = eax_5;
0052fcd8      eax_5 = eax_5 != 0;
0052fcdf      return eax_5;
0052fca0  }

0052fce7                       90 90 90 90 90 90 90 90 90                                                         .........

0052fcf0  void __thiscall CLandBlock::release_all(class CLandBlock* this)

0052fcf0  {
0052fcf3      CLandBlock::release_objs(this);
0052fd06      CEnvCell::release_visible(this->stab_num, this->stablist);
0052fd13      /* jump -> this->vtable->Release */
0052fcf0  }

0052fd16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0052fd20  class CLandCell* __fastcall CLandBlock::get_landcell(class CLandBlock* this, uint32_t arg2)

0052fd20  {
0052fd20      class CLandBlock* this_1 = this;
0052fd23      uint32_t edi = arg2;
0052fd34      LandDefs::gid_to_lcoord(edi, &arg2, &this_1);
0052fd4a      class CLandCell* lcell = this->lcell;
0052fd55      void* eax_3 = (((this->side_cell_count * (arg2 & 7)) + (this_1 & 7)) * 0x108);
0052fd68      int32_t edx_2;
0052fd68      edx_2 = *(uint32_t*)(&lcell->m_DID + eax_3) != edi;
0052fd71      return (((char*)eax_3 + lcell) & (edx_2 - 1));
0052fd20  }

0052fd74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0052fd80  void __fastcall CLandBlock::init_buildings(class CLandBlock* this)

0052fd80  {
0052fd8a      if (this->side_cell_count == 8)
0052fd8a      {
0052fd90          class CLandBlockInfo* lbi = this->lbi;
0052fd90          
0052fda7          if ((lbi != 0 && this->buildings == 0))
0052fda7          {
0052fdad              this->num_buildings = 0;
0052fdb3              this->stab_num = 0;
0052fdb9              uint32_t var_58 = 0;
0052fdbd              uint32_t num_buildings = lbi->num_buildings;
0052fdbd              
0052fdc2              if (num_buildings > 0)
0052fdd0                  this->buildings = operator new[]((num_buildings << 2));
0052fdd0              
0052fddf              int32_t i = 0;
0052fde3              int32_t i_1 = 0;
0052fde3              
0052fde7              if (this->lbi->num_buildings > 0)
0052fde7              {
0052fedd                  do
0052fedd                  {
0052fdf9                      int32_t* edi_1 = this->lbi->buildings[i];
0052fe0b                      class CBuildingObj* eax_4 = CBuildingObj::makeBuilding(*(uint32_t*)edi_1, edi_1[0x12], edi_1[0x13], edi_1[0x11]);
0052fe0b                      
0052fe17                      if (eax_4 != 0)
0052fe17                      {
0052fe1d                          uint32_t id = this->m_DID.id;
0052fe2c                          void var_40;
0052fe2c                          Frame::operator=(&var_40, &edi_1[1]);
0052fe3d                          class AC1Legacy::Vector3* var_8;
0052fe3d                          class AC1Legacy::Vector3* var_50_1 = var_8;
0052fe45                          uint32_t* var_4;
0052fe45                          uint32_t* var_4c_1 = var_4;
0052fe49                          int32_t var_c;
0052fe49                          int32_t var_54 = var_c;
0052fe51                          int32_t* var_74_3 = &var_54;
0052fe56                          uint32_t id_1;
0052fe56                          uint32_t* var_78_2 = &id_1;
0052fe57                          id_1 = id;
0052fe5b                          int32_t eax_6 = LandDefs::adjust_to_outside(var_4, var_8);
0052fe60                          uint32_t id_2 = id_1;
0052fe67                          int32_t eax_7 = -(eax_6);
0052fe6d                          int32_t var_74_4 = ((eax_7 - eax_7) & id_2);
0052fe70                          class CLandCell* eax_10 = CLandBlock::get_landcell(this, id_2);
0052fe70                          
0052fe7b                          if (eax_10 == 0)
0052fec3                              eax_4->vtable->__vecDelDtor(1);
0052fe7b                          else
0052fe7b                          {
0052fe7e                              CPhysicsObj::set_initial_frame(eax_4, &edi_1[1]);
0052fe86                              CBuildingObj::add_to_cell(eax_4, eax_10);
0052fe91                              this->buildings[this->num_buildings] = eax_4;
0052feb6                              this->num_buildings += 1;
0052febc                              CBuildingObj::add_to_stablist(eax_4, &this->stablist, &var_58, &this->stab_num);
0052fe7b                          }
0052fe17                      }
0052fe17                      
0052fed6                      i = (i_1 + 1);
0052fed9                      i_1 = i;
0052fedd                  } while (i < this->lbi->num_buildings);
0052fde7              }
0052fda7          }
0052fd8a      }
0052fd80  }

0052feeb                                   90 90 90 90 90                                                             .....

0052fef0  void __fastcall CLandBlock::adjust_scene_obj_height(class CLandBlock* this)

0052fef0  {
0052fef6      class CLandBlockInfo* lbi = this->lbi;
0052feff      uint32_t num_objects;
0052feff      
0052feff      if (lbi == 0)
0052ff06          num_objects = 0;
0052feff      else
0052ff01          num_objects = lbi->num_objects;
0052ff01      
0052ff0e      for (; num_objects < this->num_static_objects; num_objects += 1)
0052ff0e      {
0052ff1b          class CPhysicsObj* esi_1 = this->static_objects.data[num_objects];
0052ff1b          
0052ff20          if (esi_1 != 0)
0052ff20          {
0052ff2e              void var_40;
0052ff2e              Frame::operator=(&var_40, &esi_1->m_position.frame);
0052ff3f              float var_c;
0052ff3f              float var_4c = var_c;
0052ff50              float var_4;
0052ff50              float var_44_1 = var_4;
0052ff62              void* var_50;
0052ff62              
0052ff62              if (CLandCell::find_terrain_poly(esi_1->cell, &var_4c, &var_50) != 0)
0052ff62              {
0052ff64                  void* ecx_4 = var_50;
0052ff6b                  long double x87_r7_2 = fabsl(((long double)*(uint32_t*)((char*)ecx_4 + 0x28)));
0052ff6d                  long double x87_r6_1 = ((long double)0.000199999995f);
0052ff73                  (x87_r6_1 - x87_r7_2);
0052ff75                  int32_t eax_2;
0052ff75                  eax_2 = ((((x87_r6_1 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_2) ? 1 : 0) << 0xe) | 0))));
0052ff77                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0052ff7a                  float var_8;
0052ff7a                  
0052ff7a                  if (!(p_1))
0052ff94                      var_44_1 = ((float)-(((((((long double)var_8) * ((long double)*(uint32_t*)((char*)ecx_4 + 0x24))) + (((long double)var_4c) * ((long double)*(uint32_t*)((char*)ecx_4 + 0x20)))) + ((long double)*(uint32_t*)((char*)ecx_4 + 0x2c))) / ((long double)*(uint32_t*)((char*)ecx_4 + 0x28)))));
0052ffa0                  long double x87_r7_11 = fabsl((((long double)var_44_1) - ((long double)var_4)));
0052ffa2                  long double x87_r6_4 = ((long double)0.000199999995f);
0052ffa8                  (x87_r6_4 - x87_r7_11);
0052ffaa                  eax_2 = ((((x87_r6_4 < x87_r7_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_11))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_11) ? 1 : 0) << 0xe) | 0))));
0052ffac                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0052ffac                  
0052ffaf                  if (!(p_2))
0052ffaf                  {
0052ffbd                      var_c = var_4c;
0052ffcc                      var_4 = var_44_1;
0052ffd0                      CPhysicsObj::set_initial_frame(esi_1, &var_40);
0052ffaf                  }
0052ff62              }
0052ff20          }
0052ff0e      }
0052fef0  }

0052ffeb                                   90 90 90 90 90                                                             .....

0052fff0  void __thiscall CLandBlock::on_road(class CLandBlock* this, class AC1Legacy::Vector3 const* arg2)

0052fff0  {
00530006      float var_c = ((float)(((long double)24f) - ((long double)5f)));
0053002d      floor(((double)(((long double)arg2->x) / ((long double)24f))));
00530033      class AC1Legacy::Vector3* eax = _ftol2();
00530048      floor(((double)(((long double)arg2->y) / ((long double)24f))));
00530051      int32_t eax_1 = _ftol2();
00530056      uint16_t* terrain = this->terrain;
00530060      void* eax_2 = ((eax * 9) + eax_1);
00530063      class AC1Legacy::Vector3* esi;
00530063      esi = terrain[eax_2];
0053006c      esi &= 3;
0053006c      
00530081      if ((((esi != 0 || (terrain[((char*)eax_2 + 1)] & 3) != 0) || (terrain[((char*)eax_2 + 9)] & 3) != 0) || (terrain[((char*)eax_2 + 0xa)] & 3) != 0))
00530081      {
0053008e          class CLandBlock* ebx;
0053008e          ebx = terrain[((char*)eax_2 + 1)];
00530096          long double x87_r1_3 = (((long double)arg2->x) - (((long double)eax) * ((long double)24f)));
005300a3          arg2 = ((float)(((long double)arg2->y) - (((long double)eax_1) * ((long double)24f))));
005300a7          long double x87_r0_6;
005300a7          long double x87_r0_8;
005300a7          bool c0_5;
005300a7          bool c1;
005300a7          bool c2_5;
005300a7          bool c3_5;
005300a7          
005300a7          if (esi <= 0)
005300a7          {
0053017a              bool cond:1_1 = (3 & ebx) <= 0;
0053017c              ebx = terrain[((char*)eax_2 + 9)];
00530180              long double x87_r0_12;
00530180              bool c0_6;
00530180              bool c2_6;
00530180              bool c3_6;
00530180              
00530180              if (!(cond:1_1))
00530180              {
00530182                  bool cond:4_1 = (3 & ebx) <= 0;
00530184                  ebx = terrain[((char*)eax_2 + 0xa)];
00530184                  
00530188                  if (cond:4_1)
00530188                  {
005301c7                      if ((3 & ebx) <= 0)
005301c7                      {
005301db                          x87_r0_12 = (((long double)24f) + x87_r1_3);
005301dd                          goto label_53020e;
005301c7                      }
005301c7                      
005301cb                      long double x87_r1_7 = ((long double)arg2);
005301cf                      long double temp3_1 = ((long double)var_c);
005301cf                      (x87_r1_7 - temp3_1);
005301cf                      c0_6 = x87_r1_7 < temp3_1;
005301cf                      c1 = false;
005301cf                      c2_6 = (FCMP_UO(x87_r1_7, temp3_1));
005301cf                      c3_6 = x87_r1_7 == temp3_1;
005301d3                      goto label_53015a;
00530188                  }
00530188                  
0053018c                  if ((3 & ebx) <= 0)
0053018c                  {
005301bd                      x87_r0_6 = ((((long double)arg2) + x87_r1_3) - ((long double)24f));
00530150                  label_530150:
00530150                      long double x87_r0_7 = fabsl(x87_r0_6);
00530152                      long double x87_r7_4 = ((long double)5f);
00530156                      (x87_r7_4 - x87_r0_7);
00530156                      c0_6 = x87_r7_4 < x87_r0_7;
00530156                      c2_6 = (FCMP_UO(x87_r7_4, x87_r0_7));
00530156                      c3_6 = x87_r7_4 == x87_r0_7;
00530158                      goto label_53015a;
0053018c                  }
0053018c                  
0053018e                  long double temp4_1 = ((long double)var_c);
0053018e                  (x87_r1_3 - temp4_1);
00530192                  eax_2 = ((((x87_r1_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r1_3 == temp4_1) ? 1 : 0) << 0xe) | 0x1000))));
00530192                  
00530197                  if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
0053022a                      return;
0053022a                  
0053019d              label_53019d:
0053019d                  long double x87_r1_6 = ((long double)arg2);
005301a1                  long double temp9_1 = ((long double)var_c);
005301a1                  (x87_r1_6 - temp9_1);
005301a5                  eax_2 = ((((x87_r1_6 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_6, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r1_6 == temp9_1) ? 1 : 0) << 0xe) | 0x1000))));
0053022a                  return;
00530180              }
00530180              
005301df              bool cond:3_1 = (3 & ebx) <= 0;
005301e1              ebx = terrain[((char*)eax_2 + 0xa)];
005301e1              
005301e5              if (!(cond:3_1))
005301e5              {
005301e9                  if ((3 & ebx) <= 0)
005301e9                  {
005301fc                      x87_r0_8 = ((((long double)24f) - x87_r1_3) + ((long double)arg2));
00530212                  label_530212:
00530212                      long double temp8_1 = ((long double)5f);
00530212                      (x87_r0_8 - temp8_1);
00530212                      c0_5 = x87_r0_8 < temp8_1;
00530212                      c2_5 = (FCMP_UO(x87_r0_8, temp8_1));
00530212                      c3_5 = x87_r0_8 == temp8_1;
00530216                      goto label_530218;
005301e9                  }
005301e9                  
005301eb                  long double temp2_1 = ((long double)var_c);
005301eb                  (x87_r1_3 - temp2_1);
005301eb                  c0_6 = x87_r1_3 < temp2_1;
005301eb                  c1 = false;
005301eb                  c2_6 = (FCMP_UO(x87_r1_3, temp2_1));
005301eb                  c3_6 = x87_r1_3 == temp2_1;
0053015a              label_53015a:
0053015a                  eax_2 = ((((c0_6) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | ((((c2_6) ? 1 : 0) << 0xa) | ((((c3_6) ? 1 : 0) << 0xe) | 0x1000))));
005301e5              }
005301e5              else if ((3 & ebx) > 0)
00530204              {
0053020c                  x87_r0_12 = (((long double)48f) - x87_r1_3);
0053020e              label_53020e:
0053020e                  x87_r0_8 = (x87_r0_12 - ((long double)arg2));
0053020e                  goto label_530212;
00530204              }
005300a7          }
005300a7          else
005300a7          {
005300ad              bool cond:2_1 = (3 & ebx) <= 0;
005300af              ebx = terrain[((char*)eax_2 + 9)];
005300af              
005300b3              if (!(cond:2_1))
005300b3              {
005300b5                  bool cond:6_1 = (3 & ebx) <= 0;
005300b7                  ebx = terrain[((char*)eax_2 + 0xa)];
005300b7                  
005300bb                  if (cond:6_1)
005300bb                  {
00530100                      long double temp1_1 = ((long double)5f);
00530100                      (x87_r1_3 - temp1_1);
00530104                      eax_2 = ((((x87_r1_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r1_3 == temp1_1) ? 1 : 0) << 0xe) | 0x1000))));
00530104                      
00530106                      if ((3 & ebx) <= 0)
00530106                          goto label_53021a;
00530106                      
0053010c                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0053010c                      
0053010f                      if (!(p_3))
0053022a                          return;
0053022a                      
0053010f                      goto label_53019d;
005300bb                  }
005300bb                  
005300bf                  if ((3 & ebx) > 0)
005300ce                      return;
005300ce                  
005300d1                  long double temp7_1 = ((long double)5f);
005300d1                  (x87_r1_3 - temp7_1);
005300d5                  eax_2 = ((((x87_r1_3 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_3, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r1_3 == temp7_1) ? 1 : 0) << 0xe) | 0x1000))));
005300d7                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005300d7                  
005300da                  if (!(p_1))
0053022a                      return;
0053022a                  
005300da                  goto label_5300e0;
005300b3              }
005300b3              
0053011a              bool cond:5_1 = (3 & ebx) <= 0;
0053011c              ebx = terrain[((char*)eax_2 + 0xa)];
0053011c              
00530120              if (cond:5_1)
00530120              {
00530148                  long double x87_r0_5 = ((long double)arg2);
00530148                  
0053014c                  if ((3 & ebx) > 0)
0053014c                  {
0053014e                      x87_r0_6 = (x87_r1_3 - x87_r0_5);
0053014e                      goto label_530150;
0053014c                  }
0053014c                  
00530173                  x87_r0_8 = (x87_r0_5 + x87_r1_3);
00530175                  goto label_530212;
00530120              }
00530120              
00530124              if ((3 & ebx) > 0)
00530124              {
00530126                  long double temp6_1 = ((long double)var_c);
00530126                  (x87_r1_3 - temp6_1);
0053012a                  eax_2 = ((((x87_r1_3 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_3, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r1_3 == temp6_1) ? 1 : 0) << 0xe) | 0x1000))));
0053012a                  
0053012f                  if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
0053022a                      return;
0053022a                  
005300e0              label_5300e0:
005300e0                  long double x87_r1_4 = ((long double)arg2);
005300e4                  long double temp10_1 = ((long double)5f);
005300e4                  (x87_r1_4 - temp10_1);
005300e8                  eax_2 = ((((x87_r1_4 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_4, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r1_4 == temp10_1) ? 1 : 0) << 0xe) | 0x1000))));
005300ea                  /* unimplemented  {test ah, 0x5} */;
0053022a                  return;
00530124              }
00530124              
00530139              long double x87_r1_5 = ((long double)arg2);
0053013d              long double temp5_1 = ((long double)5f);
0053013d              (x87_r1_5 - temp5_1);
0053013d              c0_5 = x87_r1_5 < temp5_1;
0053013d              c1 = false;
0053013d              c2_5 = (FCMP_UO(x87_r1_5, temp5_1));
0053013d              c3_5 = x87_r1_5 == temp5_1;
00530218          label_530218:
00530218              eax_2 = ((((c0_5) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | ((((c2_5) ? 1 : 0) << 0xa) | ((((c3_5) ? 1 : 0) << 0xe) | 0x1000))));
0053021a          label_53021a:
0053021a              /* unimplemented  {test ah, 0x5} */;
005300a7          }
00530081      }
0052fff0  }

0053023a                                                                                90 90 90 90 90 90                            ......

00530240  int32_t __fastcall CLandBlock::PreFetchCells(class CLandBlock* this)

00530240  {
0053024d      int32_t result = 1;
0053024d      
00530252      if (this->lbi_exists != 0)
00530252      {
0053025c          class IDClass<_tagDataID,32,0> esi_3 = ((this->m_DID.id & 0xfffffffe) | 0xfffe);
0053026d          void var_8;
0053026d          enum CACHE_OBJECT_CODES eax_1 = DBObj::PreFetch(QualifiedDataID::QualifiedDataID(&var_8, esi_3, 2));
0053026d          
0053027c          if ((eax_1 != CACHE_OBJECT_IN_MEMORY && eax_1 != CACHE_OBJECT_IN_FILE))
00530285              return 0;
00530285          
00530293          class DBObj* eax_4 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, esi_3, 2));
00530293          
0053029f          if (eax_4 != 0)
0053029f          {
005302aa              if (CLandBlockInfo::PreFetchCells(eax_4) == 0)
005302ac                  result = 0;
005302ac              
005302ae              eax_4->vtable->Release();
0053029f          }
00530252      }
00530252      
005302bc      return result;
00530240  }

005302bd                                                                                         90 90 90                               ...

005302c0  void __fastcall CLandBlock::notify_change_size(class CLandBlock* this)

005302c0  {
005302d1      CEnvCell::release_visible(this->stab_num, this->stablist);
005302db      CLandBlock::release_objs(this);
005302e2      CLandBlock::destroy_static_objects(this);
005302e9      CLandBlock::destroy_buildings(this);
005302f1      this->closest.x = 0xffffffff;
005302f7      this->closest.y = 0xffffffff;
005302c0  }

005302ff                                                                                               90                                 .

00530300  void __thiscall CLandBlock::calc_draw_order(class CLandBlock* this, enum LandDefs::Direction arg2, struct SqCoord const* arg3)

00530300  {
00530300      /* tailcall */
00530300      return CLandBlock::calc_sq_draw_order(this, arg2, arg3);
00530300  }

00530305                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00530310  void __thiscall CLandBlock::add_ambient_sounds(class CLandBlock* this, class Ambient* arg2)

00530310  {
0053031d      int32_t var_48 = 0x796910;
00530325      int32_t var_44 = 0;
00530329      int32_t var_40 = 0x3f800000;
00530331      int32_t var_3c = 0;
00530335      int32_t var_38 = 0;
00530339      int32_t var_34 = 0;
0053033d      int32_t var_c = 0;
00530341      int32_t var_8 = 0;
00530345      int32_t var_4 = 0;
00530349      Frame::cache(&var_40);
0053034e      int32_t side_cell_count = this->side_cell_count;
00530351      int32_t ecx_1 = 0;
00530355      int32_t var_54 = 0;
00530355      
00530359      if (side_cell_count > 0)
00530359      {
00530361          int32_t var_50_1 = 0;
00530361          
00530434          do
00530434          {
00530365              int32_t ebx_1 = 0;
00530365              
00530369              if (side_cell_count > 0)
00530369              {
00530373                  int32_t var_58_1 = var_50_1;
00530373                  
00530419                  do
00530419                  {
00530392                      class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
00530398                      void* edx_6 = ((((this->side_vertex_count * ecx_1) + ebx_1) * CVertexArray::vertex_size) + this->vertex_array.vertices);
005303a4                      int32_t var_c_1 = *(uint32_t*)edx_6;
005303ab                      int32_t var_8_1 = *(uint32_t*)((char*)edx_6 + 4);
005303b2                      int32_t var_4_1 = *(uint32_t*)((char*)edx_6 + 8);
005303c1                      int32_t id = this->lcell[((side_cell_count * ecx_1) + ebx_1)].m_DID.id;
005303c5                      uint32_t eax_4 = ((uint32_t)*(uint16_t*)(this->terrain + var_58_1));
005303ce                      uint32_t esi_6 = ((eax_4 >> 2) & 0x1f);
005303d1                      uint32_t eax_5 = (eax_4 >> 0xb);
005303d1                      
005303e6                      if (eax_5 < CRegionDesc::NumSceneType(CRegionDesc::current_region_1, esi_6))
005303e6                      {
005303ec                          class AmbientSTBDesc* eax_7 = CRegionDesc::GetSTBDesc(CRegionDesc::current_region_1, esi_6, eax_5);
005303ec                          
005303f3                          if (eax_7 != 0)
005303ff                              Ambient::AddSound(arg2, eax_7, &var_48);
005303e6                      }
005303e6                      
00530408                      side_cell_count = this->side_cell_count;
0053040b                      ecx_1 = var_54;
0053040f                      ebx_1 += 1;
00530415                      var_58_1 += 2;
00530419                  } while (ebx_1 < side_cell_count);
00530369              }
00530369              
00530423              side_cell_count = this->side_cell_count;
00530426              ecx_1 += 1;
0053042c              var_54 = ecx_1;
00530430              var_50_1 += 0x12;
00530434          } while (ecx_1 < side_cell_count);
00530359      }
00530310  }

00530444              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00530450  class DBObj* CLandBlock::Allocate(class CLandBlock const* this @ ecx)

00530450  {
00530450      /* tailcall */
00530450      return CLandBlock::Allocator();
00530450  }

00530455                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00530460  void __fastcall CLandBlock::get_land_scenes(class CLandBlock* this)

00530460  {
00530460      int32_t ebp;
00530460      int32_t var_4 = ebp;
00530470      class CLandBlock* this_1 = this;
00530479      class CLandBlock* this_2 = this_1;
00530479      
0053047d      if (((*(uint8_t*)$S151) & 1) == 0)
0053047d      {
0053048d          $S151 |= 1;
00530493          obj_frame.qw = 0x3f800000;
0053049d          obj_frame.qx = 0f;
005304a7          obj_frame.qy = 0f;
005304b1          obj_frame.qz = 0f;
005304bb          obj_frame.m_fOrigin.x = 0;
005304c5          obj_frame.m_fOrigin.y = 0f;
005304cf          obj_frame.m_fOrigin.z = 0f;
005304d9          Frame::cache(&obj_frame);
005304e3          atexit($E152);
0053047d      }
0053047d      
005304f4      if (((*(uint8_t*)$S151) & 2) == 0)
005304f4      {
00530504          $S151 |= 2;
0053050a          obj_pos.vtable = 0x796910;
00530514          obj_pos.objcell_id = 0;
0053051a          obj_pos.frame.qw = 0x3f800000;
00530524          obj_pos.frame.qx = 0f;
0053052a          obj_pos.frame.qy = 0f;
00530530          obj_pos.frame.qz = 0f;
00530536          obj_pos.frame.m_fOrigin.x = 0;
0053053c          obj_pos.frame.m_fOrigin.y = 0f;
00530542          obj_pos.frame.m_fOrigin.z = 0f;
00530548          Frame::cache(&obj_pos.frame);
00530552          atexit($E153);
005304f4      }
005304f4      
0053055a      class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
00530562      class CRegionDesc* CRegionDesc::current_region_2 = CRegionDesc::current_region_1;
00530562      
00530566      if (CRegionDesc::current_region_1 != 0)
00530566      {
0053056c          int32_t side_vertex_count = this_1->side_vertex_count;
00530571          int32_t var_8c_1 = 0;
00530571          
00530575          if (side_vertex_count > 0)
00530575          {
0053057b              void* var_7c_1 = nullptr;
005309cd              bool cond:3_1;
005309cd              
005309cd              do
005309cd              {
00530582                  int32_t var_94_1 = 0;
00530582                  
00530586                  if (side_vertex_count > 0)
00530586                  {
00530590                      void* var_80_1 = var_7c_1;
005309ac                      bool cond:5_1;
005309ac                      
005309ac                      do
005309ac                      {
0053059b                          uint32_t eax_2 = ((uint32_t)*(uint16_t*)((char*)var_80_1 + this_1->terrain));
005305a4                          uint32_t eax_3 = (eax_2 >> 0xb);
005305a7                          uint32_t esi_3 = ((eax_2 >> 2) & 0x1f);
005305a7                          
005305ba                          if (eax_3 < CRegionDesc::NumSceneType(CRegionDesc::current_region_1, esi_3))
005305ba                          {
005305c4                              uint32_t eax_5 = CRegionDesc::SceneCount(CRegionDesc::current_region_1, esi_3, eax_3);
005305c4                              
005305cd                              if (eax_5 != 0)
005305cd                              {
005305e7                                  uint32_t ebx_1 = (this_1->block_coord.x + var_8c_1);
005305e9                                  uint32_t ebp_2 = (this_1->block_coord.y + var_94_1);
005305ee                                  uint32_t eax_12;
005305ee                                  int16_t top;
005305ee                                  
005305ee                                  if (eax_5 != 1)
005305ee                                  {
00530611                                      int32_t var_78_1 = (((((ebx_1 * 0x2a7f2b89) + 0x6c1ac587) * ebp_2) - (ebx_1 * 0x421be3bd)) + 0x7f8cda01);
00530615                                      /* unimplemented  {fild st0, dword [esp+0x40]} */;
00530615                                      
00530619                                      if ((((((ebx_1 * 0x2a7f2b89) + 0x6c1ac587) * ebp_2) - (ebx_1 * 0x421be3bd)) + 0x7f8cda01) < 0)
0053061b                                          /* unimplemented  {fadd dword [&data_79820c]} */;
0053061b                                      
00530623                                      /* unimplemented  {fmul st0, dword [&data_7c6170]} */;
00530629                                      uint32_t var_78_2 = eax_5;
0053062d                                      /* unimplemented  {fild st0, dword [esp+0x40]} */;
0053062d                                      
00530631                                      if (eax_5 < 0)
00530633                                          /* unimplemented  {fadd dword [&data_79820c]} */;
00530633                                      
00530639                                      /* unimplemented  {fmulp st1, st0} */;
00530639                                      /* unimplemented  {fmulp st1, st0} */;
0053063e                                      uint32_t var_c0_1;
0053063e                                      var_c0_1 = ((double)/* var_c0_1.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
0053063e                                      /* unimplemented  {fstp qword [esp], st0} */;
00530641                                      floor(var_c0_1);
0053064a                                      eax_12 = _ftol2();
0053064a                                      top += 1;
005305ee                                  }
005305ee                                  
00530651                                  if ((eax_5 == 1 || eax_12 >= eax_5))
00530653                                      eax_12 = 0;
00530653                                  
00530665                                  class IDClass<_tagDataID,32,0> __return;
00530665                                  CRegionDesc::GetScene(CRegionDesc::current_region_2, &__return, esi_3, eax_3, eax_12);
0053066a                                  class IDClass<_tagDataID,32,0> __return_1 = __return;
0053066a                                  
00530674                                  if (__return_1 != INVALID_DID.id)
00530674                                  {
0053068f                                      void var_10;
0053068f                                      class DBObj* edi_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_10, __return_1, 0x1b));
00530696                                      class DBObj* var_6c_1 = edi_3;
00530696                                      
0053069a                                      if (edi_3 != 0)
0053069a                                      {
005306a7                                          uint32_t var_a4_1 = 0;
005306a7                                          
005306ab                                          if (*(int32_t*)((char*)edi_3 + 0x3c) > 0)
005306ab                                          {
005306b1                                              int32_t var_84_1 = 0;
005306d4                                              int32_t ecx_9 = (ebx_1 * 0xbde41c43);
005306de                                              int32_t eax_19 = ((((ebp_2 * ebx_1) * 0x5111bfef) + 0x70892fb7) * 0x5b67);
005306e4                                              int32_t var_64_1 = ecx_9;
005306e8                                              int32_t var_90_2 = eax_19;
005306e8                                              
005306f9                                              while (true)
005306f9                                              {
005306f9                                                  int32_t* esi_5 = (*(int32_t*)((char*)edi_3 + 0x40) + var_84_1);
00530701                                                  int32_t edx_14 = (((ebp_2 * 0x6c1ac587) - eax_19) + ecx_9);
00530705                                                  int32_t var_70_1 = edx_14;
00530709                                                  /* unimplemented  {fild st0, dword [esp+0x48]} */;
00530709                                                  
0053070d                                                  if (edx_14 < 0)
0053070f                                                      /* unimplemented  {fadd dword [&data_79820c]} */;
0053070f                                                  
00530715                                                  /* unimplemented  {fmul st0, dword [&data_7c6170]} */;
0053071b                                                  long double temp0_1 = ((long double)esi_5[0x11]);
0053071b                                                  (/* unimplemented  {fcomp st0, dword [esi+0x44]} f- temp0_1 */ - temp0_1);
0053071b                                                  bool c0_1 = /* bool c0_1 = unimplemented  {fcomp st0, dword [esi+0x44]} f< temp0_1 */ < temp0_1;
0053071b                                                  bool c2_1 = (FCMP_UO(/* bool c2_1 = is_unordered.t(unimplemented  {fcomp st0, dword [esi+0x44]}, temp0_1) */, temp0_1));
0053071b                                                  bool c3_1 = /* bool c3_1 = unimplemented  {fcomp st0, dword [esi+0x44]} f== temp0_1 */ == temp0_1;
0053071b                                                  /* unimplemented  {fcomp st0, dword [esi+0x44]} */;
0053071e                                                  eax_19 = ((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
00530720                                                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00530720                                                  
0053072e                                                  if ((!(p_1) && esi_5[0x1b] == 0))
0053072e                                                  {
00530738                                                      class IDClass<_tagDataID,32,0> eax_21 = *(uint32_t*)esi_5;
00530748                                                      float var_a0;
00530748                                                      ObjectDesc::Place(esi_5, ebx_1, ebp_2, var_a4_1, &var_a0);
0053074d                                                      /* unimplemented  {fild st0, dword [esp+0x2c]} */;
00530751                                                      /* unimplemented  {fmul st0, dword [&square_length]} */;
00530757                                                      /* unimplemented  {fadd dword [esp+0x18]} */;
0053075b                                                      var_a0 = ((float)/* var_a0 = fconvert.s(unimplemented  {fstp dword [esp+0x18], st0}) */);
0053075b                                                      /* unimplemented  {fstp dword [esp+0x18], st0} */;
0053075f                                                      /* unimplemented  {fild st0, dword [esp+0x24]} */;
00530763                                                      /* unimplemented  {fmul st0, dword [&square_length]} */;
00530769                                                      /* unimplemented  {fadd dword [esp+0x1c]} */;
0053076d                                                      float var_9c_1 = ((float)/* float var_9c_1 = fconvert.s(unimplemented  {fstp dword [esp+0x1c], st0}) */);
0053076d                                                      /* unimplemented  {fstp dword [esp+0x1c], st0} */;
00530771                                                      /* unimplemented  {fld st0, dword [esp+0x18]} */;
00530775                                                      long double temp1_1 = ((long double)0f);
00530775                                                      (/* unimplemented  {fcomp st0, dword [&data_795344]} f- temp1_1 */ - temp1_1);
00530775                                                      bool c0_2 = /* bool c0_2 = unimplemented  {fcomp st0, dword [&data_795344]} f< temp1_1 */ < temp1_1;
00530775                                                      bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcomp st0, dword [&data_795344]}, temp1_1) */, temp1_1));
00530775                                                      bool c3_2 = /* bool c3_2 = unimplemented  {fcomp st0, dword [&data_795344]} f== temp1_1 */ == temp1_1;
00530775                                                      /* unimplemented  {fcomp st0, dword [&data_795344]} */;
00530775                                                      
00530780                                                      if ((*(uint8_t*)((char*)((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top & 7) << 0xb))))))[1] & 1) == 0)
00530780                                                      {
00530786                                                          /* unimplemented  {fld st0, dword [esp+0x1c]} */;
0053078a                                                          long double temp2_1 = ((long double)0f);
0053078a                                                          (/* unimplemented  {fcomp st0, dword [&data_795344]} f- temp2_1 */ - temp2_1);
0053078a                                                          bool c0_3 = /* bool c0_3 = unimplemented  {fcomp st0, dword [&data_795344]} f< temp2_1 */ < temp2_1;
0053078a                                                          bool c2_3 = (FCMP_UO(/* bool c2_3 = is_unordered.t(unimplemented  {fcomp st0, dword [&data_795344]}, temp2_1) */, temp2_1));
0053078a                                                          bool c3_3 = /* bool c3_3 = unimplemented  {fcomp st0, dword [&data_795344]} f== temp2_1 */ == temp2_1;
0053078a                                                          /* unimplemented  {fcomp st0, dword [&data_795344]} */;
0053078a                                                          
00530795                                                          if ((*(uint8_t*)((char*)((((c0_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_3) ? 1 : 0) << 0xa) | ((((c3_3) ? 1 : 0) << 0xe) | ((top & 7) << 0xb))))))[1] & 1) == 0)
00530795                                                          {
0053079b                                                              /* unimplemented  {fld st0, dword [esp+0x18]} */;
0053079f                                                              (/* unimplemented  {fcomp st0, dword [&block_length]} f- fconvert.t(0f) */ - ((long double)0f));
0053079f                                                              /* unimplemented  {fcomp st0, dword [&block_length]} */;
0053079f                                                              /* unimplemented  {fcomp st0, dword [&block_length]} */;
0053079f                                                              /* unimplemented  {fcomp st0, dword [&block_length]} */;
0053079f                                                              /* unimplemented  {fcomp st0, dword [&block_length]} */;
005307a7                                                              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005307a7                                                              
005307aa                                                              if (!(p_2))
005307aa                                                              {
005307b0                                                                  /* unimplemented  {fld st0, dword [esp+0x1c]} */;
005307b4                                                                  (/* unimplemented  {fcomp st0, dword [&block_length]} f- fconvert.t(0f) */ - ((long double)0f));
005307b4                                                                  /* unimplemented  {fcomp st0, dword [&block_length]} */;
005307b4                                                                  /* unimplemented  {fcomp st0, dword [&block_length]} */;
005307b4                                                                  /* unimplemented  {fcomp st0, dword [&block_length]} */;
005307b4                                                                  /* unimplemented  {fcomp st0, dword [&block_length]} */;
005307bc                                                                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005307bc                                                                  
005307bf                                                                  if (!(p_3))
005307bf                                                                  {
005307ce                                                                      int32_t eax_23 = CLandBlock::on_road(this_2, &var_a0);
005307ce                                                                      top -= 1;
005307ce                                                                      /* unimplemented  {call CLandBlock::on_road} */;
005307ce                                                                      
005307d5                                                                      if (eax_23 == 0)
005307d5                                                                      {
005307df                                                                          int32_t var_58 = 0x796910;
005307e7                                                                          int32_t var_54_1 = eax_23;
005307eb                                                                          int32_t var_50 = 0x3f800000;
005307f3                                                                          int32_t var_4c_1 = eax_23;
005307f7                                                                          int32_t var_48_1 = eax_23;
005307fb                                                                          int32_t var_44_1 = eax_23;
005307ff                                                                          int32_t var_1c_1 = eax_23;
00530806                                                                          int32_t var_18_1 = eax_23;
0053080d                                                                          int32_t var_14_1 = eax_23;
00530814                                                                          Frame::cache(&var_50);
00530828                                                                          uint32_t id = this_2->m_DID.id;
00530830                                                                          float var_18_2 = var_9c_1;
0053083b                                                                          float var_1c_2 = var_a0;
00530842                                                                          int32_t var_98;
00530842                                                                          int32_t var_14_2 = var_98;
00530849                                                                          uint32_t eax_25;
00530849                                                                          uint32_t edx_18;
00530849                                                                          eax_25 = Position::get_outside_cell_id(&var_58);
00530852                                                                          uint32_t var_bc_7 = eax_25;
00530853                                                                          class CLandCell* eax_26 = CLandBlock::get_landcell(this_2, edx_18);
0053085a                                                                          class CObjCell* var_74_1 = eax_26;
0053085a                                                                          
00530865                                                                          if (CSortCell::has_building(eax_26) == 0)
00530865                                                                          {
00530879                                                                              class CPolygon* var_68;
00530879                                                                              int32_t eax_28;
00530879                                                                              int32_t ecx_19;
00530879                                                                              eax_28 = CLandCell::find_terrain_poly(var_74_1, &var_a0, &var_68);
00530879                                                                              
00530880                                                                              if (eax_28 != 0)
00530880                                                                              {
0053088a                                                                                  /* unimplemented  {fld st0, dword [edx+0x28]} */;
0053088d                                                                                  int32_t var_bc_9 = ecx_19;
0053088e                                                                                  float var_bc_10 = ((float)/* float var_bc_10 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
0053088e                                                                                  /* unimplemented  {fstp dword [esp], st0} */;
0053088e                                                                                  
0053089a                                                                                  if (ObjectDesc::CheckSlope(esi_5, var_bc_10) != 0)
0053089a                                                                                  {
005308a8                                                                                      class Plane* edi_5 = &var_68->plane;
005308ae                                                                                      Plane::set_height(edi_5, &var_a0);
005308ae                                                                                      
005308bd                                                                                      if (esi_5[0x19] == 0)
005308dc                                                                                          ObjectDesc::GetObjFrame(esi_5, ebx_1, ebp_2, var_a4_1, &var_a0, &obj_frame);
005308bd                                                                                      else
005308c7                                                                                          ObjectDesc::ObjAlign(esi_5, edi_5, &var_a0, &obj_frame);
005308c7                                                                                      
005308ea                                                                                      class CPhysicsObj* eax_32 = CPhysicsObj::makeObject(eax_21, 0, 0);
005308ea                                                                                      
005308f6                                                                                      if (eax_32 != 0)
005308f6                                                                                      {
005308ff                                                                                          CPhysicsObj::set_initial_frame(eax_32, &obj_frame);
00530906                                                                                          int32_t eax_33 = CPhysicsObj::obj_within_block(eax_32);
00530906                                                                                          top -= 1;
00530906                                                                                          /* unimplemented  {call CPhysicsObj::obj_within_block} */;
00530906                                                                                          
0053090f                                                                                          if (eax_33 != 0)
0053090f                                                                                          {
00530923                                                                                              CPhysicsObj::add_obj_to_cell(eax_32, var_74_1, &obj_frame);
00530936                                                                                              int32_t var_bc_13 = ObjectDesc::ScaleObj(esi_5, ebx_1, ebp_2, var_a4_1);
00530939                                                                                              float var_bc_14 = ((float)/* float var_bc_14 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
00530939                                                                                              /* unimplemented  {fstp dword [esp], st0} */;
00530939                                                                                              top += 1;
0053093c                                                                                              CPhysicsObj::SetScaleStatic(eax_32, var_bc_14);
00530946                                                                                              CLandBlock::add_static_object(this_2, eax_32);
0053090f                                                                                          }
0053090f                                                                                          else
00530911                                                                                              eax_32->vtable->__vecDelDtor(1);
005308f6                                                                                      }
005308f6                                                                                      
0053094b                                                                                      edi_3 = var_6c_1;
0053089a                                                                                  }
00530880                                                                              }
00530865                                                                          }
00530865                                                                          
0053094f                                                                          var_58 = 0x79285c;
005307d5                                                                      }
005307bf                                                                  }
005307aa                                                              }
00530795                                                          }
00530780                                                      }
0053072e                                                  }
0053072e                                                  
00530967                                                  eax_19 = (var_90_2 + (((ebp_2 * ebx_1) * 0x5111bfef) + 0x70892fb7));
00530970                                                  bool cond:11_1 = (var_a4_1 + 1) < *(int32_t*)((char*)edi_3 + 0x3c);
00530972                                                  var_a4_1 += 1;
00530976                                                  var_90_2 = eax_19;
0053097a                                                  var_84_1 += 0x70;
0053097a                                                  
0053097e                                                  if (!(cond:11_1))
0053097e                                                      break;
0053097e                                                  
005306ee                                                  ecx_9 = var_64_1;
005306f9                                              }
005306ab                                          }
005306ab                                          
00530984                                          edi_3->vtable->Release();
0053069a                                      }
00530674                                  }
00530674                                  
0053098b                                  this_1 = this_2;
0053098f                                  CRegionDesc::current_region_1 = CRegionDesc::current_region_2;
005305cd                              }
005305ba                          }
005305ba                          
005309a2                          cond:5_1 = (var_94_1 + 1) < this_1->side_vertex_count;
005309a4                          var_94_1 += 1;
005309a8                          var_80_1 += 2;
005309ac                      } while (cond:5_1);
00530586                  }
00530586                  
005309bc                  side_vertex_count = this_1->side_vertex_count;
005309c3                  cond:3_1 = (var_8c_1 + 1) < side_vertex_count;
005309c5                  var_8c_1 += 1;
005309c9                  var_7c_1 += 0x12;
005309cd              } while (cond:3_1);
00530575          }
00530566      }
00530566      
0053046d      var_4;
00530460  }

005309db                                                                                   90 90 90 90 90                             .....

005309e0  void* __thiscall CLandBlock::`scalar deleting destructor'(class CLandBlock* this, uint32_t arg2)

005309e0  {
005309e3      this->vtable = 0x7c8fc0;
005309e9      this->vtable = &CLandBlock::`vftable';
005309f0      CLandBlock::Destroy(this);
005309fc      operator delete[](this->static_objects.data);
00530a07      this->static_objects.data = 0;
00530a11      CLandBlockStruct::~CLandBlockStruct(&this->vertex_lighting);
00530a18      this->vtable = &PackObj::`vftable';
00530a1f      DBObj::~DBObj(this);
00530a1f      
00530a29      if ((arg2 & 1) != 0)
00530a2c          operator delete(this);
00530a2c      
00530a37      return this;
005309e0  }

00530a3a                                                                                90 90 90 90 90 90                            ......

00530a40  void __fastcall CLandBlock::init_static_objs(class CLandBlock* this, class LongNIValHash<unsigned long>* arg2)

00530a40  {
00530a4a      if (this->side_cell_count == 8)
00530a4a      {
00530a59          int32_t edi;
00530a59          int32_t var_64_1 = edi;
00530a59          
00530a5a          if (this->num_static_objects <= 0)
00530a5a          {
00530aa0              class CLandBlockInfo* lbi = this->lbi;
00530aa0              
00530aa8              if (lbi != 0)
00530aa8              {
00530ab2                  int32_t i = 0;
00530ab6                  uint32_t edx;
00530ab6                  
00530ab6                  if (lbi->num_objects > 0)
00530ab6                  {
00530abc                      int32_t ebx_1 = 0;
00530abc                      
00530b76                      do
00530b76                      {
00530acb                          class CPhysicsObj* eax_6;
00530acb                          eax_6 = CPhysicsObj::makeObject(lbi->object_ids[i].id, 0, 0);
00530acb                          
00530ad7                          if (eax_6 != 0)
00530ad7                          {
00530ae6                              uint32_t id = this->m_DID.id;
00530af4                              void var_40;
00530af4                              Frame::operator=(&var_40, (this->lbi->object_frames + ebx_1));
00530b05                              int32_t var_8;
00530b05                              int32_t var_50_1 = var_8;
00530b0d                              class AC1Legacy::Vector3* var_4;
00530b0d                              class AC1Legacy::Vector3* var_4c_1 = var_4;
00530b11                              int32_t var_c;
00530b11                              int32_t var_54 = var_c;
00530b15                              uint32_t* id_1 = id;
00530b19                              int32_t* var_6c_2 = &var_54;
00530b1e                              uint32_t* id_2;
00530b1e                              int32_t* var_70_1 = &id_2;
00530b1f                              id_2 = id_1;
00530b23                              int32_t eax_8;
00530b23                              uint32_t edx_5;
00530b23                              eax_8 = LandDefs::adjust_to_outside(id_1, var_4);
00530b2f                              int32_t eax_9 = -(eax_8);
00530b35                              void* var_6c_3 = ((eax_9 - eax_9) & id_2);
00530b38                              class CObjCell* eax_12 = CLandBlock::get_landcell(this, edx_5);
00530b38                              
00530b3f                              if (eax_12 == 0)
00530b65                                  edx = eax_6->vtable->__vecDelDtor(1);
00530b3f                              else
00530b3f                              {
00530b50                                  CPhysicsObj::add_obj_to_cell(eax_6, eax_12, (this->lbi->object_frames + ebx_1));
00530b58                                  edx = CLandBlock::add_static_object(this, eax_6);
00530b3f                              }
00530ad7                          }
00530ad7                          
00530b67                          lbi = this->lbi;
00530b70                          i += 1;
00530b71                          ebx_1 += 0x40;
00530b76                      } while (i < lbi->num_objects);
00530ab6                  }
00530ab6                  
00530b7c                  int32_t side_cell_count = this->side_cell_count;
00530b7f                  int32_t i_4 = (side_cell_count * side_cell_count);
00530b7f                  
00530b84                  if (i_4 > 0)
00530b84                  {
00530b88                      int32_t i_3 = i_4;
00530b8a                      int32_t ebx_2 = 0;
00530bb9                      int32_t i_1;
00530bb9                      
00530bb9                      do
00530bb9                      {
00530b90                          class CLandCell* lcell = this->lcell;
00530ba2                          int32_t var_6c_6 = *(uint32_t*)(&lcell->m_DID + ebx_2);
00530ba3                          uint32_t eax_15;
00530ba3                          eax_15 = CLandBlockInfo::GetRestrictionIID(this->lbi, edx);
00530ba3                          
00530baa                          if (eax_15 != 0)
00530bac                              *(uint32_t*)(&lcell->restriction_obj + ebx_2) = eax_15;
00530bac                          
00530bb2                          ebx_2 += 0x108;
00530bb8                          i_1 = i_3;
00530bb8                          i_3 -= 1;
00530bb9                      } while (i_1 != 1);
00530b84                  }
00530aa8              }
00530aa8              
00530bc3              if (use_scene_files != 0)
00530bc7                  CLandBlock::get_land_scenes(this);
00530a5a          }
00530a5a          else
00530a5a          {
00530a5c              CLandBlock::adjust_scene_obj_height(this);
00530a67              int32_t i_2 = 0;
00530a67              
00530a6b              if (this->num_static_objects > 0)
00530a6b              {
00530a99                  do
00530a99                  {
00530a77                      class CPhysicsObj* edi_1 = this->static_objects.data[i_2];
00530a77                      
00530a7c                      if ((edi_1 != 0 && CPhysicsObj::is_completely_visible(edi_1) == 0))
00530a8b                          CPhysicsObj::calc_cross_cells_static(edi_1);
00530a8b                      
00530a96                      i_2 += 1;
00530a99                  } while (i_2 < this->num_static_objects);
00530a6b              }
00530a5a          }
00530a5a          
00530bcc          uint32_t num_static_objects = this->num_static_objects;
00530bcc          
00530bda          if (num_static_objects < this->static_objects.sizeOf)
00530be3              DArray<CPhysicsObj *>::shrink(&this->static_objects, num_static_objects);
00530a4a      }
00530a40  }

00530bef                                               90                                                                 .

00530bf0  class CCellStruct* __thiscall CEnvironment::get_cellstruct(class CEnvironment const* this, uint32_t arg2)

00530bf0  {
00530bfc      return ((arg2 * 0x58) + this->cells);
00530bf0  }

00530bff                                                                                               90                                 .

00530c00  uint32_t __fastcall CEnvironment::pack_size(class CEnvironment* this)

00530c00  {
00530c00      class CEnvironment* this_1 = this;
00530c09      int32_t ebx = 0;
00530c0c      int32_t i = 0;
00530c0e      bool cond:0 = this->num_cells <= 0;
00530c10      this_1 = nullptr;
00530c14      int32_t result = 4;
00530c14      
00530c19      if (!(cond:0))
00530c19      {
00530c3c          do
00530c3c          {
00530c31              result += CCellStruct::Pack((this->cells + ebx), &this_1, 0);
00530c36              i += 1;
00530c37              ebx += 0x58;
00530c3c          } while (i < this->num_cells);
00530c19      }
00530c19      
00530c45      return result;
00530c00  }

00530c1d                                                                                         8d 49 00                               .I.
00530c46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00530c50  void __fastcall CEnvironment::CEnvironment(class CEnvironment* this)

00530c50  {
00530c59      DBObj::DBObj(this, INVALID_DID.id);
00530c5e      this->vtable = &PackObj::`vftable';
00530c67      this->num_cells = 0;
00530c6a      this->cells = nullptr;
00530c6d      this->vtable = 0x7c9050;
00530c73      this->vtable = &CEnvironment::`vftable';
00530c50  }

00530c7e                                                                                            90 90                                ..

00530c80  void* __thiscall CEnvironment::`vector deleting destructor'(class CEnvironment* this, uint32_t arg2)

00530c80  {
00530c83      /* tailcall */
00530c83      return CEnvironment::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00530c80  }

00530c88                          cc cc cc cc cc cc cc cc                                                          ........

00530c90  uint32_t __thiscall CEnvironment::Pack(class CEnvironment* this, void** arg2, uint32_t arg3)

00530c90  {
00530c90      class CEnvironment* this_1 = this;
00530c97      uint32_t result = CEnvironment::pack_size(((char*)this - 0x30));
00530c97      
00530ca4      if (arg3 >= result)
00530ca4      {
00530cb1          **(uint32_t**)arg2 = this->m_bLoaded*(int32_t*)((char*)this + 8);
00530cb3          *(uint32_t*)arg2 += 4;
00530cbb          int32_t i = 0;
00530cbb          
00530cbf          if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
00530cbf          {
00530cc2              int32_t ebx_1 = 0;
00530cc2              
00530cdd              do
00530cdd              {
00530ccf                  CCellStruct::Pack((*(int32_t*)((char*)this + 0xc) + ebx_1), arg2, arg3);
00530cd7                  i += 1;
00530cd8                  ebx_1 += 0x58;
00530cdd              } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
00530cbf          }
00530ca4      }
00530ca4      
00530ce8      return result;
00530c90  }

00530ceb                                   90 90 90 90 90                                                             .....

00530cf0  int32_t __thiscall CEnvironment::UnPack(class CEnvironment* this, void** arg2, uint32_t arg3)

00530cf0  {
00530cfc      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
00530d08      this->m_bLoaded*(int32_t*)((char*)this + 8) = **(uint32_t**)arg2;
00530d0b      *(uint32_t*)arg2 += 4;
00530d0f      int32_t i_3 = this->m_bLoaded*(int32_t*)((char*)this + 8);
00530d1b      void* eax_4 = operator new[](((i_3 * 0x58) + 4));
00530d25      void* eax_5;
00530d25      
00530d25      if (eax_4 == 0)
00530d53          eax_5 = nullptr;
00530d25      else
00530d25      {
00530d27          eax_5 = ((char*)eax_4 + 4);
00530d2a          *(uint32_t*)((char*)eax_5 - 4) = i_3;
00530d34          void* ebx_1 = eax_5;
00530d34          
00530d36          if ((i_3 - 1) >= 0)
00530d36          {
00530d38              int32_t i_2 = i_3;
00530d4b              int32_t i;
00530d4b              
00530d4b              do
00530d4b              {
00530d42                  CCellStruct::CCellStruct(ebx_1);
00530d47                  ebx_1 += 0x58;
00530d4a                  i = i_2;
00530d4a                  i_2 -= 1;
00530d4b              } while (i != 1);
00530d36          }
00530d25      }
00530d25      
00530d55      *(int32_t*)((char*)this + 0xc) = eax_5;
00530d5b      int32_t i_1 = 0;
00530d5b      
00530d5f      if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
00530d5f      {
00530d61          int32_t ebx_2 = 0;
00530d61          
00530d7c          do
00530d7c          {
00530d6e              CCellStruct::UnPack((*(int32_t*)((char*)this + 0xc) + ebx_2), arg2, arg3);
00530d76              i_1 += 1;
00530d77              ebx_2 += 0x58;
00530d7c          } while (i_1 < this->m_bLoaded*(int32_t*)((char*)this + 8));
00530d5f      }
00530d5f      
00530d87      return 1;
00530cf0  }

00530d8a                                90 90 90 90 90 90                                                            ......

00530d90  class DBObj* CEnvironment::Allocate(class CEnvironment const* this @ ecx)

00530d90  {
00530d90      /* tailcall */
00530d90      return CEnvironment::Allocator();
00530d90  }

00530d95                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00530da0  void __fastcall CEnvironment::Destroy(class CEnvironment* this)

00530da0  {
00530da3      class CCellStruct* cells = this->cells;
00530da3      
00530da8      if (cells == 0)
00530da8      {
00530de3          this->num_cells = 0;
00530deb          return;
00530da8      }
00530da8      
00530daa      int32_t cellstruct_id = cells->cellstruct_id;
00530db7      void* esi_2 = ((cellstruct_id * 0x58) + cells);
00530db7      
00530dba      if ((cellstruct_id - 1) >= 0)
00530dba      {
00530dbd          int32_t edi_1 = cellstruct_id;
00530dcb          int32_t i;
00530dcb          
00530dcb          do
00530dcb          {
00530dc0              esi_2 -= 0x58;
00530dc5              CCellStruct::~CCellStruct(esi_2);
00530dca              i = edi_1;
00530dca              edi_1 -= 1;
00530dcb          } while (i != 1);
00530dba      }
00530dba      
00530dcf      operator delete[](((char*)cells - 4));
00530ddb      this->cells = nullptr;
00530dde      this->num_cells = 0;
00530da0  }

00530dec                                      90 90 90 90                                                              ....

00530df0  void* __thiscall CEnvironment::`scalar deleting destructor'(class CEnvironment* this, uint32_t arg2)

00530df0  {
00530df3      this->vtable = 0x7c9050;
00530df9      this->vtable = &CEnvironment::`vftable';
00530e00      CEnvironment::Destroy(this);
00530e07      this->vtable = &PackObj::`vftable';
00530e0e      DBObj::~DBObj(this);
00530e0e      
00530e18      if ((arg2 & 1) != 0)
00530e1b          operator delete(this);
00530e1b      
00530e26      return this;
00530df0  }

00530e29                             90 90 90 90 90 90 90                                                           .......

00530e30  void __fastcall CLandBlockStruct::CLandBlockStruct(class CLandBlockStruct* this)

00530e30  {
00530e39      this->vertex_lighting = 0;
00530e3b      this->trans_dir = UNKNOWN;
00530e42      this->side_vertex_count = 0;
00530e45      this->side_polygon_count = 0;
00530e48      this->side_cell_count = 0;
00530e4b      this->water_type = NOT_WATER;
00530e4e      CVertexArray::CVertexArray(&this->vertex_array);
00530e55      this->polygons = nullptr;
00530e58      this->num_surface_strips = 0;
00530e5b      this->surface_strips = nullptr;
00530e5e      this->lcell = nullptr;
00530e61      this->SWtoNEcut = nullptr;
00530e6e      this->height = operator new[](0x51);
00530e79      this->terrain = operator new[](0xa2);
00530e7d      this->block_surface_index = 0xffffffff;
00530e30  }

00530e88                          90 90 90 90 90 90 90 90                                                          ........

00530e90  void __fastcall CLandBlockStruct::InitPVArrays(class CLandBlockStruct* this)

00530e90  {
00530e98      int32_t side_vertex_count = this->side_vertex_count;
00530e9b      int32_t side_polygon_count = this->side_polygon_count;
00530ea0      int32_t ebx = (side_polygon_count * side_polygon_count);
00530ea3      uint32_t ecx_1 = (side_vertex_count * side_vertex_count);
00530ea6      int32_t side_cell_count = this->side_cell_count;
00530eab      int32_t i_6 = (side_cell_count * side_cell_count);
00530eb9      int32_t var_c = ebx;
00530ec1      CVertexArray::AllocateVertex(&this->vertex_array, ecx_1, CSWVertexType);
00530ec9      int32_t i = 0;
00530ec9      
00530ecd      if (this->side_vertex_count > 0)
00530ecd      {
00530f10          do
00530f10          {
00530ed7              int32_t j = 0;
00530ed7              
00530edb              if (this->side_vertex_count > 0)
00530edb              {
00530f08                  do
00530f08                  {
00530eee                      int32_t ecx_3 = ((this->side_vertex_count * i) + j);
00530ef3                      void* eax_4 = ((CVertexArray::vertex_size * ecx_3) + this->vertex_array.vertices);
00530ef5                      *(uint16_t*)((char*)eax_4 + 0xc) = ecx_3;
00530ef9                      *(uint16_t*)((char*)eax_4 + 0xe) = 4;
00530eff                      *(uint32_t*)((char*)eax_4 + 0x10) = 0x844ca8;
00530f05                      j += 1;
00530f08                  } while (j < this->side_vertex_count);
00530edb              }
00530edb              
00530f0d              i += 1;
00530f10          } while (i < this->side_vertex_count);
00530f10          
00530f12          ebx = var_c;
00530ecd      }
00530ecd      
00530f16      int32_t i_7 = (ebx * 2);
00530f22      void* eax_10 = operator new[](((i_7 * 0x30) + 4));
00530f2c      void* ebp;
00530f2c      
00530f2c      if (eax_10 == 0)
00530f50          ebp = nullptr;
00530f2c      else
00530f2c      {
00530f2e          *(uint32_t*)eax_10 = i_7;
00530f30          ebp = ((char*)eax_10 + 4);
00530f3a          void* edi = ebp;
00530f3a          
00530f3c          if ((i_7 - 1) >= 0)
00530f3c          {
00530f3e              int32_t i_4 = i_7;
00530f4c              int32_t i_1;
00530f4c              
00530f4c              do
00530f4c              {
00530f43                  CPolygon::CPolygon(edi);
00530f48                  edi += 0x30;
00530f4b                  i_1 = i_4;
00530f4b                  i_4 -= 1;
00530f4c              } while (i_1 != 1);
00530f3c          }
00530f2c      }
00530f2c      
00530f58      this->polygons = ebp;
00530f5d      int32_t i_2 = 0;
00530f5d      
00530f61      if ((var_c * 2) > 0)
00530f61      {
00530f63          void** edi_1 = nullptr;
00530f63          
00530fd4          do
00530fd4          {
00530f68              *(uint8_t*)(&this->polygons->num_pts + edi_1) = 3;
00530f72              *(uint16_t*)(&this->polygons->poly_id + edi_1) = i_2;
00530f81              *(uint32_t*)((char*)edi_1 + this->polygons) = operator new[](0xc);
00530f8c              *(uint32_t*)(&this->polygons->vertex_ids + edi_1) = operator new[](6);
00530f93              *(uint32_t*)(&this->polygons->sides_type + edi_1) = 0;
00530f93              
00530fa0              if (this->vertex_array.vertex_type == CSWVertexType)
00530fa0              {
00530fac                  *(uint32_t*)(&this->polygons->pos_uv_indices + edi_1) = operator new[](3);
00530fb5                  *(uint32_t*)(&this->polygons->neg_uv_indices + edi_1) = 0;
00530fc4                  *(uint32_t*)(&this->polygons->screen + edi_1) = operator new[](0xc);
00530fa0              }
00530fa0              
00530fcc              i_2 += 1;
00530fcf              edi_1 = &edi_1[0xc];
00530fd4          } while (i_2 < (var_c * 2));
00530f61      }
00530f61      
00530ff7      this->SWtoNEcut = operator new[]((var_c << 2));
00530ffa      int32_t* eax_24 = operator new[](((i_6 * 0x108) + 4));
00531004      class CLandCell* ebp_1;
00531004      
00531004      if (eax_24 == 0)
00531029          ebp_1 = nullptr;
00531004      else
00531004      {
00531006          ebp_1 = &eax_24[1];
00531009          *(uint32_t*)eax_24 = i_6;
00531010          class CLandCell* edi_2 = ebp_1;
00531010          
00531012          if ((i_6 - 1) >= 0)
00531012          {
00531014              int32_t i_5 = i_6;
00531025              int32_t i_3;
00531025              
00531025              do
00531025              {
00531019                  CLandCell::CLandCell(edi_2);
0053101e                  edi_2 = &edi_2[1];
00531024                  i_3 = i_5;
00531024                  i_5 -= 1;
00531025              } while (i_3 != 1);
00531012          }
00531004      }
00531004      
00531036      this->lcell = ebp_1;
00531042      this->vertex_lighting = operator new[]((ecx_1 * 0xc));
00530e90  }

0053104b                                   90 90 90 90 90                                                             .....

00531050  void* __thiscall CLandCell::`vector deleting destructor'(class CLandCell* this, uint32_t arg2)

00531050  {
00531051      int32_t ebx;
00531051      ebx = arg2;
00531051      
0053105b      if ((ebx & 2) == 0)
0053105b      {
005310a9          CLandCell::~CLandCell(this);
005310a9          
005310b1          if ((ebx & 1) != 0)
005310b4              operator delete(this);
005310b4          
005310c0          return this;
0053105b      }
0053105b      
0053105d      int32_t vtable = this->vtable;
0053106d      void* esi_2 = ((vtable * 0x108) + this);
0053106d      
00531070      if ((vtable - 1) >= 0)
00531070      {
00531072          int32_t edi_1 = vtable;
0053108e          int32_t i;
0053108e          
0053108e          do
0053108e          {
00531080              esi_2 -= 0x108;
00531088              CLandCell::~CLandCell(esi_2);
0053108d              i = edi_1;
0053108d              edi_1 -= 1;
0053108e          } while (i != 1);
00531070      }
00531070      
00531093      if ((ebx & 1) != 0)
00531096          operator delete[](((char*)this - 4));
00531096      
005310a4      return ((char*)this - 4);
00531050  }

00531077                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
005310c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005310d0  class CPolygon* __thiscall CLandBlockStruct::AddPolygon(class CLandBlockStruct* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5)

005310d0  {
005310f6      *(uint32_t*)this->polygons[arg2].vertices = ((CVertexArray::vertex_size * arg3) + this->vertex_array.vertices);
005310ff      *(uint16_t*)this->polygons[arg2].vertex_ids = arg3;
00531114      this->polygons[arg2].vertices[1] = ((CVertexArray::vertex_size * arg4) + this->vertex_array.vertices);
0053111d      this->polygons[arg2].vertex_ids[1] = arg4;
0053113a      this->polygons[arg2].vertices[2] = ((CVertexArray::vertex_size * arg5) + this->vertex_array.vertices);
00531143      this->polygons[arg2].vertex_ids[2] = arg5;
00531153      CPolygon::make_plane(&this->polygons[arg2]);
00531158      this->polygons[arg2].pos_surface = 0;
00531162      class CPolygon* polygons = this->polygons;
00531165      int32_t* vertices = polygons[arg2].vertices;
0053116a      void* ecx_14 = &polygons[arg2];
0053116c      long double x87_r7 = ((long double)*(uint32_t*)(*(uint32_t*)vertices + 8));
0053116f      long double temp1 = ((long double)0f);
0053116f      (x87_r7 - temp1);
00531175      void* eax_4;
00531175      eax_4 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00531177      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00531177      
0053117a      if (!(p))
0053117a      {
0053117f          long double x87_r7_1 = ((long double)*(uint32_t*)(vertices[1] + 8));
00531182          long double temp2_1 = ((long double)0f);
00531182          (x87_r7_1 - temp2_1);
00531188          void* eax_5;
00531188          eax_5 = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0053118a          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0053118a          
0053118d          if (!(p_1))
0053118d          {
00531192              long double x87_r7_2 = ((long double)*(uint32_t*)(vertices[2] + 8));
00531195              long double temp3_1 = ((long double)0f);
00531195              (x87_r7_2 - temp3_1);
0053119b              eax_5 = ((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0053119d              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0053119d              
005311a0              if (!(p_2))
005311a0              {
005311a2                  *(uint16_t*)((char*)ecx_14 + 0x1c) = 0;
005311af                  return &this->polygons[arg2];
005311a0              }
0053118d          }
0053117a      }
0053117a      
005311b2      *(uint16_t*)((char*)ecx_14 + 0x1c) = 1;
005311bf      return &this->polygons[arg2];
005310d0  }

005311c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005311d0  uint32_t CLandBlockStruct::pack_size(class CLandBlockStruct* this @ ecx) __pure

005311d0  {
005311d5      return 0xf4;
005311d0  }

005311d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005311e0  uint32_t __thiscall CLandBlockStruct::Pack(class CLandBlockStruct* this, void** arg2, uint32_t arg3)

005311e0  {
005312a4      for (int16_t* i = 6; i < 0xa8; )
005312a4      {
005311f3          uint16_t* esi_1;
005311f3          esi_1 = *(uint16_t*)(((char*)i + this->terrain) - 6);
005311fa          **(uint16_t**)arg2 = esi_1;
005311ff          void* esi_3 = (*(uint32_t*)arg2 + 2);
00531202          *(uint32_t*)arg2 = esi_3;
00531207          uint16_t* edi_2;
00531207          edi_2 = *(uint16_t*)(((char*)i + this->terrain) - 4);
0053120c          *(uint16_t*)esi_3 = edi_2;
00531211          void* edi_4 = (*(uint32_t*)arg2 + 2);
00531214          *(uint32_t*)arg2 = edi_4;
0053121b          uint16_t* edi_5;
0053121b          edi_5 = *(uint16_t*)(((char*)i + this->terrain) - 2);
00531220          *(uint16_t*)edi_4 = edi_5;
00531225          void* esi_6 = (*(uint32_t*)arg2 + 2);
00531228          *(uint32_t*)arg2 = esi_6;
0053122d          uint16_t* edi_6;
0053122d          edi_6 = *(uint16_t*)((char*)i + this->terrain);
00531231          *(uint16_t*)esi_6 = edi_6;
00531236          void* edi_8 = (*(uint32_t*)arg2 + 2);
00531239          *(uint32_t*)arg2 = edi_8;
00531240          uint16_t* edi_9;
00531240          edi_9 = *(uint16_t*)(((char*)i + this->terrain) + 2);
00531245          *(uint16_t*)edi_8 = edi_9;
0053124a          void* esi_9 = (*(uint32_t*)arg2 + 2);
0053124d          *(uint32_t*)arg2 = esi_9;
00531252          uint16_t* edi_10;
00531252          edi_10 = *(uint16_t*)(((char*)i + this->terrain) + 4);
00531257          *(uint16_t*)esi_9 = edi_10;
0053125c          void* edi_12 = (*(uint32_t*)arg2 + 2);
0053125f          *(uint32_t*)arg2 = edi_12;
00531266          uint16_t* edi_13;
00531266          edi_13 = *(uint16_t*)(((char*)i + this->terrain) + 6);
0053126b          *(uint16_t*)edi_12 = edi_13;
00531270          void* esi_12 = (*(uint32_t*)arg2 + 2);
00531273          *(uint32_t*)arg2 = esi_12;
00531278          uint16_t* edi_14;
00531278          edi_14 = *(uint16_t*)(((char*)i + this->terrain) + 8);
0053127d          *(uint16_t*)esi_12 = edi_14;
00531282          void* edi_16 = (*(uint32_t*)arg2 + 2);
00531285          *(uint32_t*)arg2 = edi_16;
0053128c          uint16_t* edi_17;
0053128c          edi_17 = *(uint16_t*)(((char*)i + this->terrain) + 0xa);
00531291          *(uint16_t*)edi_16 = edi_17;
00531299          i = &i[9];
005312a2          *(uint32_t*)arg2 += 2;
005312a4      }
005312a4      
0053133d      void* edx_18;
0053133d      
0053133d      for (char* i_1 = nullptr; i_1 < 0x51; )
0053133d      {
005312b3          uint8_t* edx;
005312b3          edx = *(uint8_t*)(i_1 + this->height);
005312b8          **(uint8_t**)arg2 = edx;
005312bc          void* edx_2 = (*(uint32_t*)arg2 + 1);
005312bd          *(uint32_t*)arg2 = edx_2;
005312c4          uint8_t* edx_3;
005312c4          edx_3 = *(uint8_t*)((i_1 + this->height) + 1);
005312c8          *(uint8_t*)edx_2 = edx_3;
005312cc          void* edi_21 = (*(uint32_t*)arg2 + 1);
005312cd          *(uint32_t*)arg2 = edi_21;
005312d2          uint8_t* edx_4;
005312d2          edx_4 = *(uint8_t*)((i_1 + this->height) + 2);
005312d6          *(uint8_t*)edi_21 = edx_4;
005312da          void* edx_6 = (*(uint32_t*)arg2 + 1);
005312db          *(uint32_t*)arg2 = edx_6;
005312e2          uint8_t* edx_7;
005312e2          edx_7 = *(uint8_t*)((i_1 + this->height) + 3);
005312e6          *(uint8_t*)edx_6 = edx_7;
005312ea          void* edi_24 = (*(uint32_t*)arg2 + 1);
005312eb          *(uint32_t*)arg2 = edi_24;
005312f0          uint8_t* edx_8;
005312f0          edx_8 = *(uint8_t*)((i_1 + this->height) + 4);
005312f4          *(uint8_t*)edi_24 = edx_8;
005312f8          void* edx_10 = (*(uint32_t*)arg2 + 1);
005312f9          *(uint32_t*)arg2 = edx_10;
00531300          uint8_t* edx_11;
00531300          edx_11 = *(uint8_t*)((i_1 + this->height) + 5);
00531304          *(uint8_t*)edx_10 = edx_11;
00531308          void* edi_27 = (*(uint32_t*)arg2 + 1);
00531309          *(uint32_t*)arg2 = edi_27;
0053130e          uint8_t* edx_12;
0053130e          edx_12 = *(uint8_t*)((i_1 + this->height) + 6);
00531312          *(uint8_t*)edi_27 = edx_12;
00531316          void* edx_14 = (*(uint32_t*)arg2 + 1);
00531317          *(uint32_t*)arg2 = edx_14;
0053131e          uint8_t* edx_15;
0053131e          edx_15 = *(uint8_t*)((i_1 + this->height) + 7);
00531322          *(uint8_t*)edx_14 = edx_15;
00531326          void* edi_30 = (*(uint32_t*)arg2 + 1);
00531327          *(uint32_t*)arg2 = edi_30;
0053132c          uint8_t* edx_16;
0053132c          edx_16 = *(uint8_t*)((i_1 + this->height) + 8);
00531330          *(uint8_t*)edi_30 = edx_16;
00531334          edx_18 = (*(uint32_t*)arg2 + 1);
00531335          i_1 = &i_1[9];
0053133b          *(uint32_t*)arg2 = edx_18;
0053133d      }
0053133d      
00531345      void* esi_17 = (edx_18 & 0x80000003);
00531345      bool cond:2 = esi_17 == 0;
00531345      
0053134b      if (esi_17 < 0)
0053134b      {
0053134e          void* esi_19 = (((char*)esi_17 - 1) | 0xfffffffc);
00531351          esi_17 = ((char*)esi_19 + 1);
00531351          cond:2 = esi_19 == 0xffffffff;
0053134b      }
0053134b      
0053135b      if ((!(cond:2) && 4 != esi_17))
0053135b      {
0053135d          void* i_3 = (4 - esi_17);
0053136b          void* i_2;
0053136b          
0053136b          do
0053136b          {
00531360              *(uint8_t*)edx_18 = 0;
00531365              void* edi_32 = (*(uint32_t*)arg2 + 1);
00531366              i_2 = i_3;
00531366              i_3 -= 1;
00531367              *(uint32_t*)arg2 = edi_32;
00531369              edx_18 = edi_32;
0053136b          } while (i_2 != 1);
0053135b      }
0053135b      
00531371      return 0;
005311e0  }

005311ed                                         8d 49 00                                                               .I.
00531374                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00531380  void __fastcall CLandBlockStruct::AdjPlanes(class CLandBlockStruct* this)

00531380  {
00531384      int32_t side_polygon_count = this->side_polygon_count;
00531387      int32_t ebp = 0;
00531387      
0053138b      if (side_polygon_count > 0)
0053138b      {
005313cf          do
005313cf          {
00531390              int32_t i = 0;
00531390              
00531394              if (side_polygon_count > 0)
00531394              {
005313c7                  do
005313c7                  {
005313bf                      for (int32_t j = 0; j < 2; j += 1)
005313b6                          CPolygon::make_plane(&this->polygons[(j + (((this->side_polygon_count * ebp) + i) << 1))]);
005313b6                      
005313c4                      i += 1;
005313c7                  } while (i < this->side_polygon_count);
00531394              }
00531394              
005313c9              side_polygon_count = this->side_polygon_count;
005313cc              ebp += 1;
005313cf          } while (ebp < side_polygon_count);
0053138b      }
00531380  }

0053139a                                                                                8d 9b 00 00 00 00                            ......
005313d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005313e0  void __fastcall CLandBlockStruct::RemoveSurfaces(class CLandBlockStruct* this)

005313e0  {
005313ea      if (CRegionDesc::current_region != 0)
005313ea      {
005313ec          int32_t side_cell_count = this->side_cell_count;
005313f0          int32_t ebx_1 = 0;
005313f0          
005313f4          if (side_cell_count > 0)
005313f4          {
0053143f              do
0053143f              {
005313f7                  int32_t esi_1 = 0;
005313f7                  
005313fb                  if (side_cell_count > 0)
005313fb                  {
00531437                      do
00531437                      {
0053142c                          LandSurf::RemoveSurface(CommandList::GetHead(CRegionDesc::current_region->terrain_info), ((uint32_t)*(uint32_t*)this->lcell[((side_cell_count * ebx_1) + esi_1)].polygons->pos_surface));
00531431                          side_cell_count = this->side_cell_count;
00531434                          esi_1 += 1;
00531437                      } while (esi_1 < side_cell_count);
005313fb                  }
005313fb                  
00531439                  side_cell_count = this->side_cell_count;
0053143c                  ebx_1 += 1;
0053143f              } while (ebx_1 < side_cell_count);
005313f4          }
005313ea      }
005313e0  }

00531445                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00531450  void __fastcall CLandBlockStruct::Destroy(class CLandBlockStruct* this)

00531450  {
0053145c      if (this->vertex_array.vertex_type == CSWVertexType)
0053145c      {
00531461          int32_t i = 0;
00531461          
00531465          if (this->vertex_array.num_vertices > 0)
00531465          {
00531486              do
00531486              {
0053147c                  *(uint32_t*)(&this->vertex_array.vertices->reserve5 + (CVertexArray::vertex_size * i)) = 0;
00531483                  i += 1;
00531486              } while (i < this->vertex_array.num_vertices);
00531465          }
0053145c      }
0053145c      
0053148b      if (this->lcell != 0)
0053148b      {
0053148f          CLandBlockStruct::RemoveSurfaces(this);
00531494          class CLandCell* lcell = this->lcell;
00531494          
00531499          if (lcell != 0)
00531499          {
005314a3              if (lcell->vtable == 0)
005314af                  operator delete[](((char*)lcell - 4));
005314a3              else
005314a5                  lcell->vtable->__vecDelDtor(3);
00531499          }
00531499          
005314b7          this->lcell = nullptr;
0053148b      }
0053148b      
005314ba      class CPolygon* polygons = this->polygons;
005314ba      
005314bf      if (polygons != 0)
005314bf      {
005314c1          int32_t vertices = polygons->vertices;
005314cf          void* edi_3 = &polygons[vertices];
005314cf          
005314d2          if ((vertices - 1) >= 0)
005314d2          {
005314d4              int32_t ebx_1 = vertices;
005314eb              int32_t i_1;
005314eb              
005314eb              do
005314eb              {
005314e0                  edi_3 -= 0x30;
005314e5                  CPolygon::Destroy(edi_3);
005314ea                  i_1 = ebx_1;
005314ea                  ebx_1 -= 1;
005314eb              } while (i_1 != 1);
005314d2          }
005314d2          
005314f0          operator delete[](((char*)polygons - 4));
005314f9          this->polygons = nullptr;
005314bf      }
005314bf      
00531500      CVertexArray::DestroyVertex(&this->vertex_array);
00531505      int32_t* SWtoNEcut = this->SWtoNEcut;
00531505      
0053150a      if (SWtoNEcut != 0)
0053150a      {
0053150d          operator delete[](SWtoNEcut);
00531515          this->SWtoNEcut = nullptr;
0053150a      }
0053150a      
00531518      class CSurfaceTriStrips* surface_strips = this->surface_strips;
00531518      
0053151d      if (surface_strips != 0)
0053151d      {
00531520          CSurfaceTriStrips::Free(surface_strips);
00531528          this->surface_strips = nullptr;
0053151d      }
0053151d      
0053152b      class RGBColor* vertex_lighting = this->vertex_lighting;
0053152f      this->num_surface_strips = 0;
00531532      this->side_cell_count = 0;
00531535      this->trans_dir = UNKNOWN;
00531535      
0053153c      if (vertex_lighting != 0)
0053153c      {
0053153f          operator delete[](vertex_lighting);
00531547          this->vertex_lighting = 0;
0053153c      }
00531450  }

00531469                             8d a4 24 00 00 00 00                                                           ..$....
005314d9                                                                             8d a4 24 00 00 00 00                           ..$....
0053154c                                      90 90 90 90                                                              ....

00531550  void __thiscall CLandBlockStruct::CalcCellWater(class CLandBlockStruct* this, int32_t arg2, int32_t arg3, int32_t* arg4, int32_t* arg5)

00531550  {
00531558      *(uint32_t*)arg4 = 0;
0053156a      *(uint32_t*)arg5 = 1;
0053156a      
00531570      if (arg2 <= (arg2 + 1))
00531570      {
00531582          int32_t edi_3 = (((arg2 * 9) + arg3) << 1);
00531588          arg2 = ((arg2 * 0) + 2);
005315df          bool cond:1_1;
005315df          
005315df          do
005315df          {
00531592              if (arg3 <= (arg3 + 1))
00531592              {
00531598                  void* esi_2 = edi_3;
0053159a                  int32_t i_1 = ((arg3 * 0) + 2);
005315d1                  int32_t i;
005315d1                  
005315d1                  do
005315d1                  {
005315b5                      if (TERRAIN_SURF_CHAR[((((uint32_t)*(uint8_t*)((char*)esi_2 + this->terrain)) >> 2) & 0x1f)] != 1)
005315c7                          *(uint32_t*)arg5 = 0;
005315b5                      else
005315bb                          *(uint32_t*)arg4 = 1;
005315bb                      
005315cd                      esi_2 += 2;
005315d0                      i = i_1;
005315d0                      i_1 -= 1;
005315d1                  } while (i != 1);
00531592              }
00531592              
005315d7              edi_3 += 0x12;
005315da              cond:1_1 = arg2 != 1;
005315db              arg2 -= 1;
005315df          } while (cond:1_1);
00531570      }
00531550  }

0053159d                                                                                         8d 49 00                               .I.
005315e8                          90 90 90 90 90 90 90 90                                                          ........

005315f0  int32_t __thiscall CLandBlockStruct::calc_water_depth(class CLandBlockStruct const* this, uint32_t arg2, class AC1Legacy::Vector3 const* arg3)

005315f0  {
005315f0      class CLandBlockStruct* this_1 = this;
005315fa      int32_t eax = LandDefs::inbound_valid_cellid(arg2);
00531604      uint32_t eax_2;
00531604      
00531604      if (eax != 0)
00531608          eax_2 = ((uint32_t)arg2);
00531608      
00531612      uint32_t this_2;
00531612      uint32_t edx_1;
00531612      
00531612      if ((eax == 0 || eax_2 >= 0x100))
00531612      {
0053162a          edx_1 = arg2;
0053162e          this_2 = this_1;
00531612      }
00531612      else
00531612      {
00531617          this_2 = ((eax_2 - 1) >> 3);
0053161d          edx_1 = ((arg2 - 1) & 7);
00531620          this_1 = this_2;
00531624          arg2 = edx_1;
00531612      }
00531612      
00531636      long double x87_r7 = ((long double)arg3->y);
00531639      long double x87_r6 = ((long double)arg2);
00531645      long double x87_r6_3 = (((x87_r6 + x87_r6) + ((long double)1f)) * ((long double)0f));
0053164b      long double x87_r5 = ((long double)this_1);
00531657      long double x87_r5_3 = (((x87_r5 + x87_r5) + ((long double)1f)) * ((long double)0f));
0053165d      long double temp1 = ((long double)arg3->x);
0053165d      (x87_r5_3 - temp1);
00531661      class AC1Legacy::Vector3* eax_3;
00531661      eax_3 = ((((x87_r5_3 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_3, temp1))) ? 1 : 0) << 0xa) | ((((x87_r5_3 == temp1) ? 1 : 0) << 0xe) | 0x3000))));
00531663      (x87_r7 - x87_r6_3);
00531665      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0053166a      eax_3 = ((((x87_r7 < x87_r6_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, x87_r6_3))) ? 1 : 0) << 0xa) | ((((x87_r7 == x87_r6_3) ? 1 : 0) << 0xe) | 0))));
0053166c      int32_t result;
0053166c      
0053166c      if (p)
0053166c      {
005316b1          uint32_t ecx_3 = ((this_2 * 9) + edx_1);
005316b6          uint16_t* terrain = this->terrain;
005316b9          uint32_t ecx_4;
005316b9          
005316b9          if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
005316c2              ecx_4 = ((uint32_t)terrain[ecx_3]);
005316b9          else
005316bb              ecx_4 = ((uint32_t)terrain[(ecx_3 + 1)]);
005316bb          
005316cc          result = TERRAIN_SURF_CHAR[((ecx_4 >> 2) & 0x1f)];
0053166c      }
0053166c      else if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
005316a5          result = TERRAIN_SURF_CHAR[((((uint32_t)this->terrain[(((this_2 + 1) * 9) + edx_1)]) >> 2) & 0x1f)];
00531671      else
00531671      {
0053167d          int32_t eax_5;
0053167d          eax_5 = this->terrain[(((this_2 * 9) + edx_1) + 0xa)];
00531687          result = TERRAIN_SURF_CHAR[((eax_5 >> 2) & 0x1f)];
00531671      }
00531671      
005316d8      if (result == 0)
005316f8          return result;
005316f8      
005316e4      return (result - 1);
005315f0  }

005316fb                                                                                   90 90 90 90 90                             .....

00531700  void __fastcall CLandBlockStruct::calc_lighting(class CLandBlockStruct* this)

00531700  {
0053170a      int32_t side_vertex_count = this->side_vertex_count;
0053170d      int32_t i_5 = (side_vertex_count * side_vertex_count);
0053171d      int32_t i_7 = i_5;
00531720      _chkstk();
00531729      int32_t __saved_edi;
00531729      float y;
00531729      
00531729      if (i_5 > 0)
00531729      {
00531732          y = 0f;
00531739          int32_t var_40_1 = 0;
00531740          int32_t* eax_4 = &__saved_edi;
00531759          int32_t i;
00531759          
00531759          do
00531759          {
00531745              int32_t* ecx = eax_4;
00531747              *(uint32_t*)ecx = 0;
0053174c              ecx[1] = y;
00531752              eax_4 = &eax_4[3];
00531755              i = i_5;
00531755              i_5 -= 1;
00531756              ecx[2] = var_40_1;
00531759          } while (i != 1);
00531729      }
00531729      
0053175b      int32_t side_polygon_count = this->side_polygon_count;
00531765      int32_t i_1 = 0;
00531765      
00531769      if (((side_polygon_count * side_polygon_count) << 1) > 0)
00531769      {
0053176f          void* edx_3 = nullptr;
0053176f          
00531805          do
00531805          {
00531774              void* ecx_4 = ((char*)edx_3 + this->polygons);
00531780              void* eax_9 = &&__saved_edi[(((uint32_t)**(uint16_t**)((char*)ecx_4 + 4)) * 3)];
00531788              *(uint32_t*)eax_9 = ((float)(((long double)*(uint32_t*)eax_9) + ((long double)*(uint32_t*)((char*)ecx_4 + 0x20))));
00531790              *(uint32_t*)((char*)eax_9 + 4) = ((float)(((long double)*(uint32_t*)((char*)ecx_4 + 0x24)) + ((long double)*(uint32_t*)((char*)eax_9 + 4))));
00531799              *(uint32_t*)((char*)eax_9 + 8) = ((float)(((long double)*(uint32_t*)((char*)ecx_4 + 0x28)) + ((long double)*(uint32_t*)((char*)eax_9 + 8))));
0053179c              class CPolygon* polygons = this->polygons;
005317ab              void* ecx_5 = ((char*)polygons + edx_3);
005317b0              float* eax_13 = &&__saved_edi[(((uint32_t)*(uint16_t*)(*(uint32_t*)(&polygons->vertex_ids + edx_3) + 2)) * 3)];
005317b5              *(uint32_t*)eax_13 = ((float)(((long double)*(uint32_t*)(&polygons->plane + edx_3)) + ((long double)*(uint32_t*)eax_13)));
005317bd              eax_13[1] = ((float)(((long double)*(uint32_t*)((char*)ecx_5 + 0x24)) + ((long double)eax_13[1])));
005317c6              eax_13[2] = ((float)(((long double)*(uint32_t*)((char*)ecx_5 + 0x28)) + ((long double)eax_13[2])));
005317c9              class CPolygon* polygons_1 = this->polygons;
005317d4              void* ecx_6 = ((char*)polygons_1 + edx_3);
005317d9              void* eax_17 = &&__saved_edi[(((uint32_t)*(uint16_t*)(*(uint32_t*)(&polygons_1->vertex_ids + edx_3) + 4)) * 3)];
005317dc              i_1 += 1;
005317dd              edx_3 += 0x30;
005317e5              *(uint32_t*)eax_17 = ((float)(((long double)*(uint32_t*)eax_17) + ((long double)*(uint32_t*)((char*)ecx_6 + 0x20))));
005317ed              *(uint32_t*)((char*)eax_17 + 4) = ((float)(((long double)*(uint32_t*)((char*)ecx_6 + 0x24)) + ((long double)*(uint32_t*)((char*)eax_17 + 4))));
005317f6              *(uint32_t*)((char*)eax_17 + 8) = ((float)(((long double)*(uint32_t*)((char*)ecx_6 + 0x28)) + ((long double)*(uint32_t*)((char*)eax_17 + 8))));
005317f9              side_polygon_count = this->side_polygon_count;
00531805          } while (i_1 < ((side_polygon_count * side_polygon_count) << 1));
00531769      }
00531769      
0053180b      int32_t i_8 = i_7;
0053180b      
00531810      if (i_8 > 0)
00531810      {
00531812          int32_t __saved_ebx;
00531812          int32_t* ecx_10 = &__saved_ebx;
00531815          int32_t i_6 = i_8;
0053188c          int32_t i_2;
0053188c          
0053188c          do
0053188c          {
00531817              *(uint32_t*)ecx_10;
00531819              ecx_10[-1];
0053181c              long double x87_r5_1 = ((long double)ecx_10[-2]);
00531837              long double temp1_1 = ((long double)0.000199999995f);
00531837              (x87_r5_1 - temp1_1);
0053183d              side_polygon_count = ((((x87_r5_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0053183f              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053183f              
00531842              if (!(p_1))
00531842              {
0053186c                  ecx_10[-2] = 0;
0053186f                  y = 0f;
00531879                  ecx_10[-1] = y;
00531886                  *(uint32_t*)ecx_10 = 0x3f800000;
00531842              }
00531842              else
00531842              {
00531844                  long double x87_r7_21 = (((long double)1f) / x87_r5_1);
0053184f                  ecx_10[-2] = ((float)(x87_r7_21 * ((long double)ecx_10[-2])));
00531857                  ecx_10[-1] = ((float)(x87_r7_21 * ((long double)ecx_10[-1])));
0053185c                  *(uint32_t*)ecx_10 = ((float)(x87_r7_21 * ((long double)*(uint32_t*)ecx_10)));
00531842              }
00531842              
00531888              ecx_10 = &ecx_10[3];
0053188b              i_2 = i_6;
0053188b              i_6 -= 1;
0053188c          } while (i_2 != 1);
00531810      }
00531810      
0053188e      union __inner0 = LScape::ambient_color.__inner0;
00531893      float LScape::ambient_level_1 = LScape::ambient_level;
0053189e      union __inner0_2 = __inner0;
005318b0      long double x87_r7_24 = (((long double)((uint32_t)((int8_t)(__inner0 >> 0x10)))) * ((long double)0.00392156886f));
005318b6      float x = LScape::sunlight.x;
005318ce      y = LScape::sunlight.y;
005318d7      float z = LScape::sunlight.z;
005318e3      union __inner0_1 = LScape::sunlight_color.__inner0;
005318e9      float var_2c = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)__inner0 + 1))) * ((long double)0.00392156886f)));
005318fd      union __inner0_3 = __inner0_1;
00531900      float var_30_3 = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)__inner0 + 0))) * ((long double)0.00392156886f)));
00531918      float var_14 = ((float)(((long double)((uint32_t)((int8_t)(__inner0_1 >> 0x10)))) * ((long double)0.00392156886f)));
0053191b      void* eax_24 = nullptr;
00531926      void* var_24 = nullptr;
0053192f      float var_18 = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)__inner0_1 + 1))) * ((long double)0.00392156886f)));
0053193b      float var_1c = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)__inner0_1 + 0))) * ((long double)0.00392156886f)));
0053193b      
0053193e      if (i_8 >= 4)
0053193e      {
0053194c          long double x87_r6_18 = (((long double)LScape::ambient_level_1) * x87_r7_24);
00531956          void* ebx_4 = (8 - &__saved_edi);
00531958          long double x87_r5_3 = (((long double)var_2c) * ((long double)LScape::ambient_level_1));
00531965          long double x87_r4_7 = (((long double)var_30_3) * ((long double)LScape::ambient_level_1));
00531968          void* edx_4 = (0xfffffff0 - &__saved_edi);
0053196a          int32_t var_28_3 = 3;
00531971          void* ecx_13 = &y;
00531974          void* var_38_1 = ebx_4;
00531977          void* var_3c_1 = (0x14 - &__saved_edi);
0053197a          void* var_34_1 = edx_4;
0053197a          
00531999          while (true)
00531999          {
00531999              long double x87_r3_8 = (((((long double)z) * ((long double)*(uint32_t*)((char*)ecx_13 - 8))) + (((long double)y) * ((long double)*(uint32_t*)((char*)ecx_13 - 0xc)))) + (((long double)x) * ((long double)*(uint32_t*)((char*)ecx_13 - 0x10))));
0053199b              long double temp2_1 = ((long double)0f);
0053199b              (x87_r3_8 - temp2_1);
005319a1              eax_24 = ((((x87_r3_8 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_8, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r3_8 == temp2_1) ? 1 : 0) << 0xe) | 0x1800))));
005319a3              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005319a3              
005319a6              if (!(p_2))
005319a6              {
005319a8                  x87_r4_7 = x87_r3_8;
005319aa                  x87_r3_8 = ((long double)0f);
005319a6              }
005319a6              
005319b7              float var_8_1 = ((float)((((long double)var_14) * x87_r3_8) + x87_r6_18));
005319c1              float var_c_1 = ((float)((((long double)var_18) * x87_r3_8) + x87_r5_3));
005319c7              long double x87_r3_10 = ((x87_r3_8 * ((long double)var_1c)) + x87_r4_7);
005319c9              long double x87_r2_11 = ((long double)var_8_1);
005319cc              long double temp4_1 = ((long double)1.0);
005319cc              (x87_r2_11 - temp4_1);
005319d2              eax_24 = ((((x87_r2_11 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_11, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r2_11 == temp4_1) ? 1 : 0) << 0xe) | 0x1800))));
005319d2              
005319d7              if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) == 0)
005319d9                  var_8_1 = 1f;
005319d9              
005319e0              long double x87_r2_12 = ((long double)var_c_1);
005319e3              long double temp7_1 = ((long double)1.0);
005319e3              (x87_r2_12 - temp7_1);
005319e9              eax_24 = ((((x87_r2_12 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_12, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r2_12 == temp7_1) ? 1 : 0) << 0xe) | 0x1800))));
005319e9              
005319ee              if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) == 0)
005319f0                  var_c_1 = 1f;
005319f0              
005319f7              long double temp9_1 = ((long double)1.0);
005319f7              (x87_r3_10 - temp9_1);
005319fd              eax_24 = ((((x87_r3_10 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_10, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r3_10 == temp9_1) ? 1 : 0) << 0xe) | 0x1800))));
005319fd              
00531a02              if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) == 0)
00531a02              {
00531a04                  x87_r4_7 = x87_r3_10;
00531a06                  x87_r3_10 = ((long double)1f);
00531a02              }
00531a02              
00531a11              float* edx_5 = ((char*)edx_4 + ecx_13);
00531a13              *(uint32_t*)((char*)edx_5 + this->vertex_lighting) = ((float)((long double)var_8_1));
00531a1b              *(uint32_t*)(&this->vertex_lighting->g + edx_5) = ((float)((long double)var_c_1));
00531a21              *(uint32_t*)(&this->vertex_lighting->b + edx_5) = ((float)x87_r3_10);
00531a38              long double x87_r3_14 = (((((long double)z) * ((long double)*(uint32_t*)((char*)ecx_13 + 4))) + (((long double)x) * ((long double)*(uint32_t*)((char*)ecx_13 - 4)))) + (((long double)y) * ((long double)*(uint32_t*)ecx_13)));
00531a3a              long double temp11_1 = ((long double)0f);
00531a3a              (x87_r3_14 - temp11_1);
00531a40              class RGBColor* eax_27;
00531a40              eax_27 = ((((x87_r3_14 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_14, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r3_14 == temp11_1) ? 1 : 0) << 0xe) | 0x1800))));
00531a42              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00531a42              
00531a45              if (!(p_3))
00531a45              {
00531a47                  x87_r4_7 = x87_r3_14;
00531a49                  x87_r3_14 = ((long double)0f);
00531a45              }
00531a45              
00531a56              float var_8_2 = ((float)((((long double)var_14) * x87_r3_14) + x87_r6_18));
00531a60              float var_c_2 = ((float)((((long double)var_18) * x87_r3_14) + x87_r5_3));
00531a66              long double x87_r3_16 = ((x87_r3_14 * ((long double)var_1c)) + x87_r4_7);
00531a68              long double x87_r2_25 = ((long double)var_8_2);
00531a6b              long double temp13_1 = ((long double)1.0);
00531a6b              (x87_r2_25 - temp13_1);
00531a71              eax_27 = ((((x87_r2_25 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_25, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r2_25 == temp13_1) ? 1 : 0) << 0xe) | 0x1800))));
00531a71              
00531a76              if ((*(uint8_t*)((char*)eax_27)[1] & 0x41) == 0)
00531a78                  var_8_2 = 1f;
00531a78              
00531a7f              long double x87_r2_26 = ((long double)var_c_2);
00531a82              long double temp14_1 = ((long double)1.0);
00531a82              (x87_r2_26 - temp14_1);
00531a88              eax_27 = ((((x87_r2_26 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_26, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r2_26 == temp14_1) ? 1 : 0) << 0xe) | 0x1800))));
00531a88              
00531a8d              if ((*(uint8_t*)((char*)eax_27)[1] & 0x41) == 0)
00531a8f                  var_c_2 = 1f;
00531a8f              
00531a96              long double temp15_1 = ((long double)1.0);
00531a96              (x87_r3_16 - temp15_1);
00531a9c              eax_27 = ((((x87_r3_16 < temp15_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_16, temp15_1))) ? 1 : 0) << 0xa) | ((((x87_r3_16 == temp15_1) ? 1 : 0) << 0xe) | 0x1800))));
00531a9c              
00531aa1              if ((*(uint8_t*)((char*)eax_27)[1] & 0x41) == 0)
00531aa1              {
00531aa3                  x87_r4_7 = x87_r3_16;
00531aa5                  x87_r3_16 = ((long double)1f);
00531aa1              }
00531aa1              
00531ab0              *(uint32_t*)(((char*)edx_5 + this->vertex_lighting) + 0xc) = ((float)((long double)var_8_2));
00531ab9              *(uint32_t*)(((char*)edx_5 + this->vertex_lighting) + 0x10) = ((float)((long double)var_c_2));
00531abf              *(uint32_t*)(((char*)edx_5 + this->vertex_lighting) + 0x14) = ((float)x87_r3_16);
00531ad7              long double x87_r3_20 = (((((long double)z) * ((long double)*(uint32_t*)((char*)ecx_13 + 0x10))) + (((long double)y) * ((long double)*(uint32_t*)((char*)ecx_13 + 0xc)))) + (((long double)x) * ((long double)*(uint32_t*)((char*)ecx_13 + 8))));
00531ad9              long double temp16_1 = ((long double)0f);
00531ad9              (x87_r3_20 - temp16_1);
00531adf              class RGBColor* eax_30;
00531adf              eax_30 = ((((x87_r3_20 < temp16_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_20, temp16_1))) ? 1 : 0) << 0xa) | ((((x87_r3_20 == temp16_1) ? 1 : 0) << 0xe) | 0x1800))));
00531ae1              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
00531ae1              
00531ae4              if (!(p_4))
00531ae4              {
00531ae6                  x87_r4_7 = x87_r3_20;
00531ae8                  x87_r3_20 = ((long double)0f);
00531ae4              }
00531ae4              
00531af5              float var_8_3 = ((float)((((long double)var_14) * x87_r3_20) + x87_r6_18));
00531aff              float var_c_3 = ((float)((((long double)var_18) * x87_r3_20) + x87_r5_3));
00531b05              long double x87_r3_22 = ((x87_r3_20 * ((long double)var_1c)) + x87_r4_7);
00531b07              long double x87_r2_39 = ((long double)var_8_3);
00531b0a              long double temp17_1 = ((long double)1.0);
00531b0a              (x87_r2_39 - temp17_1);
00531b10              eax_30 = ((((x87_r2_39 < temp17_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_39, temp17_1))) ? 1 : 0) << 0xa) | ((((x87_r2_39 == temp17_1) ? 1 : 0) << 0xe) | 0x1800))));
00531b10              
00531b15              if ((*(uint8_t*)((char*)eax_30)[1] & 0x41) == 0)
00531b17                  var_8_3 = 1f;
00531b17              
00531b1e              long double x87_r2_40 = ((long double)var_c_3);
00531b21              long double temp18_1 = ((long double)1.0);
00531b21              (x87_r2_40 - temp18_1);
00531b27              eax_30 = ((((x87_r2_40 < temp18_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_40, temp18_1))) ? 1 : 0) << 0xa) | ((((x87_r2_40 == temp18_1) ? 1 : 0) << 0xe) | 0x1800))));
00531b27              
00531b2c              if ((*(uint8_t*)((char*)eax_30)[1] & 0x41) == 0)
00531b2e                  var_c_3 = 1f;
00531b2e              
00531b35              long double temp19_1 = ((long double)1.0);
00531b35              (x87_r3_22 - temp19_1);
00531b3b              eax_30 = ((((x87_r3_22 < temp19_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_22, temp19_1))) ? 1 : 0) << 0xa) | ((((x87_r3_22 == temp19_1) ? 1 : 0) << 0xe) | 0x1800))));
00531b3b              
00531b40              if ((*(uint8_t*)((char*)eax_30)[1] & 0x41) == 0)
00531b40              {
00531b42                  x87_r4_7 = x87_r3_22;
00531b44                  x87_r3_22 = ((long double)1f);
00531b40              }
00531b40              
00531b51              *(uint32_t*)(((char*)ebx_4 + ecx_13) + this->vertex_lighting) = ((float)((long double)var_8_3));
00531b59              *(uint32_t*)(((char*)edx_5 + this->vertex_lighting) + 0x1c) = ((float)((long double)var_c_3));
00531b5f              *(uint32_t*)(((char*)edx_5 + this->vertex_lighting) + 0x20) = ((float)x87_r3_22);
00531b77              long double x87_r3_26 = (((((long double)z) * ((long double)*(uint32_t*)((char*)ecx_13 + 0x1c))) + (((long double)y) * ((long double)*(uint32_t*)((char*)ecx_13 + 0x18)))) + (((long double)x) * ((long double)*(uint32_t*)((char*)ecx_13 + 0x14))));
00531b79              long double temp20_1 = ((long double)0f);
00531b79              (x87_r3_26 - temp20_1);
00531b7f              class RGBColor* eax_33;
00531b7f              eax_33 = ((((x87_r3_26 < temp20_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_26, temp20_1))) ? 1 : 0) << 0xa) | ((((x87_r3_26 == temp20_1) ? 1 : 0) << 0xe) | 0x1800))));
00531b81              bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
00531b81              
00531b84              if (!(p_5))
00531b84              {
00531b86                  x87_r4_7 = x87_r3_26;
00531b88                  x87_r3_26 = ((long double)0f);
00531b84              }
00531b84              
00531b95              float var_8_4 = ((float)((((long double)var_14) * x87_r3_26) + x87_r6_18));
00531b9f              float var_c_4 = ((float)((((long double)var_18) * x87_r3_26) + x87_r5_3));
00531ba5              long double x87_r3_28 = ((x87_r3_26 * ((long double)var_1c)) + x87_r4_7);
00531ba7              long double x87_r2_53 = ((long double)var_8_4);
00531baa              long double temp21_1 = ((long double)1.0);
00531baa              (x87_r2_53 - temp21_1);
00531bb0              eax_33 = ((((x87_r2_53 < temp21_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_53, temp21_1))) ? 1 : 0) << 0xa) | ((((x87_r2_53 == temp21_1) ? 1 : 0) << 0xe) | 0x1800))));
00531bb0              
00531bb5              if ((*(uint8_t*)((char*)eax_33)[1] & 0x41) == 0)
00531bb7                  var_8_4 = 1f;
00531bb7              
00531bbe              long double x87_r2_54 = ((long double)var_c_4);
00531bc1              long double temp22_1 = ((long double)1.0);
00531bc1              (x87_r2_54 - temp22_1);
00531bc7              eax_33 = ((((x87_r2_54 < temp22_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_54, temp22_1))) ? 1 : 0) << 0xa) | ((((x87_r2_54 == temp22_1) ? 1 : 0) << 0xe) | 0x1800))));
00531bc7              
00531bcc              if ((*(uint8_t*)((char*)eax_33)[1] & 0x41) == 0)
00531bce                  var_c_4 = 1f;
00531bce              
00531bd5              long double temp23_1 = ((long double)1.0);
00531bd5              (x87_r3_28 - temp23_1);
00531bdb              eax_33 = ((((x87_r3_28 < temp23_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_28, temp23_1))) ? 1 : 0) << 0xa) | ((((x87_r3_28 == temp23_1) ? 1 : 0) << 0xe) | 0x1800))));
00531bdb              
00531be0              if ((*(uint8_t*)((char*)eax_33)[1] & 0x41) == 0)
00531be0              {
00531be2                  x87_r4_7 = x87_r3_28;
00531be4                  x87_r3_28 = ((long double)1f);
00531be0              }
00531be0              
00531bf4              *(uint32_t*)(((char*)var_3c_1 + ecx_13) + this->vertex_lighting) = ((float)((long double)var_8_4));
00531bff              *(uint32_t*)(((char*)edx_5 + this->vertex_lighting) + 0x28) = ((float)((long double)var_c_4));
00531c05              ecx_13 += 0x30;
00531c08              *(uint32_t*)(((char*)edx_5 + this->vertex_lighting) + 0x2c) = ((float)x87_r3_28);
00531c15              eax_24 = ((char*)var_24 + 4);
00531c18              bool cond:4_1 = (var_28_3 + 4) < i_7;
00531c1a              var_24 = eax_24;
00531c1d              var_28_3 += 4;
00531c1d              
00531c20              if (!(cond:4_1))
00531c20                  break;
00531c20              
0053197f              edx_4 = var_34_1;
00531982              ebx_4 = var_38_1;
00531999          }
00531999          
00531c28          i_8 = i_7;
00531c2c          x87_r7_24 = x87_r4_7;
0053193e      }
0053193e      
00531c30      if (eax_24 < i_8)
00531c30      {
00531c3f          int32_t ecx_15 = (eax_24 * 0xc);
00531c45          void* edi_1 = ((ecx_15 + &__saved_edi) + 4);
00531c4c          void* i_4 = (i_8 - eax_24);
00531c4e          long double x87_r5_6 = (((long double)var_30_3) * ((long double)LScape::ambient_level_1));
00531cf5          void* i_3;
00531cf5          
00531cf5          do
00531cf5          {
00531c64              long double x87_r4_11 = (((((long double)z) * ((long double)*(uint32_t*)((char*)edi_1 + 4))) + (((long double)x) * ((long double)*(uint32_t*)((char*)edi_1 - 4)))) + (((long double)y) * ((long double)*(uint32_t*)edi_1)));
00531c66              long double temp3_1 = ((long double)0f);
00531c66              (x87_r4_11 - temp3_1);
00531c6c              eax_24 = ((((x87_r4_11 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_11, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r4_11 == temp3_1) ? 1 : 0) << 0xe) | 0x2000))));
00531c6e              bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
00531c6e              
00531c71              if (!(p_6))
00531c71              {
00531c73                  x87_r5_6 = x87_r4_11;
00531c75                  x87_r4_11 = ((long double)0f);
00531c71              }
00531c71              
00531c82              float var_8_5 = ((float)((((long double)var_14) * x87_r4_11) + (x87_r7_24 * ((long double)LScape::ambient_level_1))));
00531c8c              float var_c_5 = ((float)((((long double)var_18) * x87_r4_11) + (((long double)var_2c) * ((long double)LScape::ambient_level_1))));
00531c92              long double x87_r4_13 = ((x87_r4_11 * ((long double)var_1c)) + x87_r5_6);
00531c94              long double x87_r3_39 = ((long double)var_8_5);
00531c97              long double temp6_1 = ((long double)1.0);
00531c97              (x87_r3_39 - temp6_1);
00531c9d              eax_24 = ((((x87_r3_39 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_39, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r3_39 == temp6_1) ? 1 : 0) << 0xe) | 0x2000))));
00531c9d              
00531ca2              if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) == 0)
00531ca4                  var_8_5 = 1f;
00531ca4              
00531cab              long double x87_r3_40 = ((long double)var_c_5);
00531cae              long double temp8_1 = ((long double)1.0);
00531cae              (x87_r3_40 - temp8_1);
00531cb4              eax_24 = ((((x87_r3_40 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_40, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r3_40 == temp8_1) ? 1 : 0) << 0xe) | 0x2000))));
00531cb4              
00531cb9              if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) == 0)
00531cbb                  var_c_5 = 1f;
00531cbb              
00531cc2              long double temp10_1 = ((long double)1.0);
00531cc2              (x87_r4_13 - temp10_1);
00531cc8              eax_24 = ((((x87_r4_13 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_13, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r4_13 == temp10_1) ? 1 : 0) << 0xe) | 0x2000))));
00531cc8              
00531ccd              if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) == 0)
00531ccd              {
00531ccf                  x87_r5_6 = x87_r4_13;
00531cd1                  x87_r4_13 = ((long double)1f);
00531ccd              }
00531ccd              
00531cdc              *(uint32_t*)(ecx_15 + this->vertex_lighting) = ((float)((long double)var_8_5));
00531ce4              ecx_15 += 0xc;
00531ce7              *(uint32_t*)((ecx_15 + this->vertex_lighting) - 8) = ((float)((long double)var_c_5));
00531ced              edi_1 += 0xc;
00531cf0              i_3 = i_4;
00531cf0              i_4 -= 1;
00531cf1              *(uint32_t*)((ecx_15 + this->vertex_lighting) - 4) = ((float)x87_r4_13);
00531cf5          } while (i_3 != 1);
00531c30      }
00531700  }

00531d0b                                   90 90 90 90 90                                                             .....

00531d10  void __thiscall CLandBlockStruct::ConstructPolygons(class CLandBlockStruct* this, uint32_t arg2)

00531d10  {
00531d1d      int32_t var_10;
00531d1d      uint32_t var_c;
00531d1d      
00531d1d      if (arg2 != 0)
00531d1d      {
00531d27          var_10 = ((arg2 >> 0x15) & 0x7f8);
00531d38          var_c = (((uint32_t)((int8_t)(arg2 >> 0x10))) << 3);
00531d1d      }
00531d1d      
00531d3c      int32_t side_cell_count = this->side_cell_count;
00531d3f      int32_t ebx = 0;
00531d3f      
00531d43      if (side_cell_count > 0)
00531d43      {
00531fb1          do
00531fb1          {
00531d50              int32_t edi_1 = 0;
00531d50              
00531d54              if (side_cell_count > 0)
00531d54              {
00531d6a                  uint32_t eax_7 = (var_10 + ebx);
00531d6c                  int32_t var_14_1 = 1;
00531d6c                  
00531d84                  while (true)
00531d84                  {
00531d84                      int32_t ecx_1 = (edi_1 + var_c);
00531db0                      long double x87_r7_2 = ((long double)(((((eax_7 * 0xccac033) + 0x6c1ac587) * ecx_1) - (eax_7 * 0x421be3bd)) - 0x519b8f25));
00531db0                      
00531db4                      if ((((((eax_7 * 0xccac033) + 0x6c1ac587) * ecx_1) - (eax_7 * 0x421be3bd)) - 0x519b8f25) < 0)
00531db6                          x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
00531db6                      
00531dc2                      int32_t* SWtoNEcut = this->SWtoNEcut;
00531dc5                      ((x87_r7_2 * ((long double)2.32830644e-10f)) - ((long double)0.5));
00531dcd                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00531dd0                      int32_t side_polygon_count = this->side_polygon_count;
00531dd3                      uint32_t var_34_2;
00531dd3                      uint32_t var_30_2;
00531dd3                      uint32_t var_2c_2;
00531dd3                      uint32_t var_28_2;
00531dd3                      int32_t ebp_7;
00531dd3                      
00531dd3                      if (p_1)
00531dd3                      {
00531e68                          SWtoNEcut[((side_polygon_count * ebx) + edi_1)] = 1;
00531e6f                          int32_t side_vertex_count_2 = this->side_vertex_count;
00531e85                          uint32_t ecx_14 = (((ebx + 1) * side_vertex_count_2) + edi_1);
00531eb3                          *(uint32_t*)this->lcell[((this->side_cell_count * ebx) + edi_1)].polygons = CLandBlockStruct::AddPolygon(this, (((this->side_polygon_count * ebx) + edi_1) << 1), ((side_vertex_count_2 * ebx) + edi_1), ecx_14, (ecx_14 + 1));
00531eb5                          int32_t side_vertex_count_3 = this->side_vertex_count;
00531ec0                          uint32_t edx_19 = ((side_vertex_count_3 * ebx) + edi_1);
00531ec9                          var_28_2 = (edx_19 + 1);
00531ed5                          var_2c_2 = ((((ebx + 1) * side_vertex_count_3) + edi_1) + 1);
00531ed6                          var_30_2 = edx_19;
00531edd                          ebp_7 = ((this->side_cell_count * ebx) + edi_1);
00531ee5                          var_34_2 = ((((this->side_polygon_count * ebx) + edi_1) * 2) + 1);
00531dd3                      }
00531dd3                      else
00531dd3                      {
00531dde                          SWtoNEcut[((side_polygon_count * ebx) + edi_1)] = 0;
00531de5                          int32_t side_vertex_count = this->side_vertex_count;
00531df3                          uint32_t ecx_2 = ((side_vertex_count * ebx) + edi_1);
00531e34                          *(uint32_t*)this->lcell[((this->side_cell_count * ebx) + edi_1)].polygons = CLandBlockStruct::AddPolygon(this, (((this->side_polygon_count * ebx) + edi_1) << 1), ecx_2, (((ebx + 1) * side_vertex_count) + edi_1), (ecx_2 + 1));
00531e36                          int32_t side_vertex_count_1 = this->side_vertex_count;
00531e45                          uint32_t ecx_7 = (((ebx + 1) * side_vertex_count_1) + edi_1);
00531e47                          var_28_2 = ecx_7;
00531e48                          ebp_7 = ((this->side_cell_count * ebx) + edi_1);
00531e4f                          var_2c_2 = (((side_vertex_count_1 * ebx) + edi_1) + 1);
00531e50                          var_30_2 = (ecx_7 + 1);
00531e5d                          var_34_2 = ((((this->side_polygon_count * ebx) + edi_1) * 2) + 1);
00531dd3                      }
00531dd3                      
00531ef3                      this->lcell[ebp_7].polygons[1] = CLandBlockStruct::AddPolygon(this, var_34_2, var_30_2, var_2c_2, var_28_2);
00531f0a                      uint32_t ecx_20 = (ebx + var_10);
00531f2d                      int32_t edx_27;
00531f2d                      
00531f2d                      if ((((ecx_20 < 0 || ecx_1 < 0) || ecx_20 >= 0x7f8) || ecx_1 >= 0x7f8))
00531f51                          edx_27 = 0;
00531f2d                      else
00531f4d                          edx_27 = ((((ecx_1 & 7) + ((ecx_20 & 7) << 3)) + 1) | (((ecx_1 >> 3) | ((ecx_20 & 0xfffffff8) << 5)) << 0x10));
00531f4d                      
00531f56                      int32_t ebp_18 = (((this->side_cell_count * ebx) + edi_1) * 0x108);
00531f5c                      *(uint32_t*)(&*(uint32_t*)((char*)this->lcell->pos)[4] + ebp_18) = edx_27;
00531f69                      *(uint32_t*)(*(uint32_t*)(this->lcell + ebp_18) + 0x44)(edx_27);
00531f7a                      *(uint32_t*)(&*(uint12_t*)((char*)*(uint64_t*)((char*)this->lcell->pos)[8])[0x34] + ebp_18) = ((float)(((long double)((float)((long double)((ebx * 2) + 1)))) * ((long double)0f)));
00531f84                      long double x87_r7_6 = ((long double)var_14_1);
00531f8f                      var_14_1 += 2;
00531f99                      *(uint32_t*)(&*(uint32_t*)((char*)*(uint12_t*)((char*)*(uint64_t*)((char*)this->lcell->pos)[8])[0x34])[4] + ebp_18) = ((float)(x87_r7_6 * ((long double)0f)));
00531f99                      
00531fa5                      if ((edi_1 + 1) >= this->side_cell_count)
00531fa5                          break;
00531fa5                      
00531d7a                      eax_7 = ecx_20;
00531d7e                      edi_1 += 1;
00531d84                  }
00531d54              }
00531d54              
00531fab              side_cell_count = this->side_cell_count;
00531fae              ebx += 1;
00531fb1          } while (ebx < side_cell_count);
00531d43      }
00531d10  }

00531d4d                                         8d 49 00                                                               .I.
00531fc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00531fd0  int32_t __thiscall CLandBlockStruct::UnPack(class CLandBlockStruct* this, void** arg2, uint32_t arg3)

00531fd0  {
00531fd4      CLandBlockStruct::Destroy(this);
00531fd4      
00532099      for (int16_t* i = 6; i < 0xa8; )
00532099      {
00531fe5          void* edx_1;
00531fe5          edx_1 = **(uint16_t**)arg2;
00531feb          *(uint16_t*)(((char*)i + this->terrain) - 6) = edx_1;
00531ff2          void* edi_3 = (*(uint32_t*)arg2 + 2);
00531ff5          *(uint32_t*)arg2 = edi_3;
00531ff9          void* edx_2;
00531ff9          edx_2 = *(uint16_t*)edi_3;
00531fff          *(uint16_t*)(((char*)i + this->terrain) - 4) = edx_2;
00532006          void* edx_4 = (*(uint32_t*)arg2 + 2);
00532009          *(uint32_t*)arg2 = edx_4;
0053200b          edx_4 = *(uint16_t*)edx_4;
00532011          *(uint16_t*)(((char*)i + this->terrain) - 2) = edx_4;
00532018          void* ebx_2 = (*(uint32_t*)arg2 + 2);
0053201b          *(uint32_t*)arg2 = ebx_2;
00532022          void* edx_5;
00532022          edx_5 = *(uint16_t*)ebx_2;
00532025          *(uint16_t*)((char*)i + this->terrain) = edx_5;
0053202b          void* edi_8 = (*(uint32_t*)arg2 + 2);
0053202e          *(uint32_t*)arg2 = edi_8;
00532032          void* edx_6;
00532032          edx_6 = *(uint16_t*)edi_8;
00532038          *(uint16_t*)(((char*)i + this->terrain) + 2) = edx_6;
0053203f          void* edx_8 = (*(uint32_t*)arg2 + 2);
00532042          *(uint32_t*)arg2 = edx_8;
00532044          edx_8 = *(uint16_t*)edx_8;
0053204a          *(uint16_t*)(((char*)i + this->terrain) + 4) = edx_8;
00532051          void* ebx_4 = (*(uint32_t*)arg2 + 2);
00532054          *(uint32_t*)arg2 = ebx_4;
0053205b          void* edx_9;
0053205b          edx_9 = *(uint16_t*)ebx_4;
0053205e          *(uint16_t*)(((char*)i + this->terrain) + 6) = edx_9;
00532065          void* edi_13 = (*(uint32_t*)arg2 + 2);
00532068          *(uint32_t*)arg2 = edi_13;
0053206c          void* edx_10;
0053206c          edx_10 = *(uint16_t*)edi_13;
00532072          *(uint16_t*)(((char*)i + this->terrain) + 8) = edx_10;
00532079          void* edx_12 = (*(uint32_t*)arg2 + 2);
0053207c          *(uint32_t*)arg2 = edx_12;
00532081          edx_12 = *(uint16_t*)edx_12;
00532084          *(uint16_t*)(((char*)i + this->terrain) + 0xa) = edx_12;
0053208e          i = &i[9];
00532097          *(uint32_t*)arg2 += 2;
00532099      }
00532099      
00532130      void* edx_27;
00532130      
00532130      for (char* i_1 = nullptr; i_1 < 0x51; )
00532130      {
005320a3          void* edx_13;
005320a3          edx_13 = **(uint8_t**)arg2;
005320a8          *(uint8_t*)(i_1 + this->height) = edx_13;
005320ad          void* ebx_8 = (*(uint32_t*)arg2 + 1);
005320ae          *(uint32_t*)arg2 = ebx_8;
005320b5          ebx_8 = *(uint8_t*)ebx_8;
005320b7          *(uint8_t*)((this->height + i_1) + 1) = ebx_8;
005320bd          void* edi_19 = (*(uint32_t*)arg2 + 1);
005320be          *(uint32_t*)arg2 = edi_19;
005320c0          ebx_8 = *(uint8_t*)edi_19;
005320c5          *(uint8_t*)((this->height + i_1) + 2) = ebx_8;
005320cb          void* edx_17 = (*(uint32_t*)arg2 + 1);
005320cc          *(uint32_t*)arg2 = edx_17;
005320d0          ebx_8 = *(uint8_t*)edx_17;
005320d5          *(uint8_t*)((this->height + i_1) + 3) = ebx_8;
005320db          void* ebx_10 = (*(uint32_t*)arg2 + 1);
005320dc          *(uint32_t*)arg2 = ebx_10;
005320e3          ebx_10 = *(uint8_t*)ebx_10;
005320e5          *(uint8_t*)((this->height + i_1) + 4) = ebx_10;
005320eb          void* edi_23 = (*(uint32_t*)arg2 + 1);
005320ec          *(uint32_t*)arg2 = edi_23;
005320ee          ebx_10 = *(uint8_t*)edi_23;
005320f3          *(uint8_t*)((this->height + i_1) + 5) = ebx_10;
005320f9          void* edx_22 = (*(uint32_t*)arg2 + 1);
005320fa          *(uint32_t*)arg2 = edx_22;
005320fe          ebx_10 = *(uint8_t*)edx_22;
00532103          *(uint8_t*)((this->height + i_1) + 6) = ebx_10;
00532109          void* ebx_12 = (*(uint32_t*)arg2 + 1);
0053210a          *(uint32_t*)arg2 = ebx_12;
00532111          ebx_12 = *(uint8_t*)ebx_12;
00532113          *(uint8_t*)((this->height + i_1) + 7) = ebx_12;
00532119          char* edi_27 = (*(uint32_t*)arg2 + 1);
0053211a          *(uint32_t*)arg2 = edi_27;
0053211f          ebx_12 = *(uint8_t*)edi_27;
00532121          *(uint8_t*)((this->height + i_1) + 8) = ebx_12;
00532127          edx_27 = (*(uint32_t*)arg2 + 1);
00532128          i_1 = &i_1[9];
0053212e          *(uint32_t*)arg2 = edx_27;
00532130      }
00532130      
00532138      void* esi_2 = (edx_27 & 0x80000003);
00532138      bool cond:2 = esi_2 == 0;
00532138      
0053213e      if (esi_2 < 0)
0053213e      {
00532141          void* esi_4 = (((char*)esi_2 - 1) | 0xfffffffc);
00532144          esi_2 = ((char*)esi_4 + 1);
00532144          cond:2 = esi_4 == 0xffffffff;
0053213e      }
0053213e      
00532146      if (!(cond:2))
00532146      {
0053214d          void* i_3 = (4 - esi_2);
0053214d          
0053214f          if (4 != esi_2)
0053214f          {
0053215c              void* i_2;
0053215c              
0053215c              do
0053215c              {
00532151                  *(uint8_t*)edx_27 = 0;
00532156                  void* edi_29 = (*(uint32_t*)arg2 + 1);
00532157                  i_2 = i_3;
00532157                  i_3 -= 1;
00532158                  *(uint32_t*)arg2 = edi_29;
0053215a                  edx_27 = edi_29;
0053215c              } while (i_2 != 1);
0053214f          }
00532146      }
00532146      
00532165      return 1;
00531fd0  }

00532168                          90 90 90 90 90 90 90 90                                                          ........

00532170  void __thiscall CLandBlockStruct::GetCellRotation(class CLandBlockStruct const* this, uint32_t arg2, int32_t arg3, int32_t arg4, uint8_t* arg5, uint32_t* arg6, enum LandDefs::Rotation* arg7)

00532170  {
0053217f      int32_t var_18;
0053217f      uint32_t eax_5;
0053217f      uint32_t var_14;
0053217f      
0053217f      if (arg2 == 0)
0053219c          eax_5 = var_14;
0053217f      else
0053217f      {
00532189          var_18 = ((arg2 >> 0x15) & 0x7f8);
00532197          eax_5 = (((uint32_t)((int8_t)(arg2 >> 0x10))) << 3);
0053217f      }
005321be      int32_t temp0 = (8 / this->side_cell_count);
005321be      this->side_cell_count;
005321d0      uint32_t var_1c;
005321d0      
005321d0      if (CRegionDesc::IsPalShifted(CRegionDesc::current_region) == 0)
005321d0      {
005321df          int32_t eax_12 = -((temp0 - 1));
005321e7          var_1c = (((eax_12 - eax_12) & 3) + 1);
005321d0      }
005321d0      else
005321d2          var_1c = 1;
005321d2      
005321ee      uint16_t* terrain = this->terrain;
005321f1      int32_t edx_2 = ((arg3 * 9) + arg4);
005321f9      uint32_t ecx_3 = ((uint32_t)terrain[(edx_2 * temp0)]);
005321ff      uint32_t ecx_4 = (ecx_3 & 3);
00532213      uint32_t esi_1 = ((uint32_t)terrain[(((arg3 + ((arg4 + (arg3 << 3)) + 8)) + 1) * temp0)]);
00532219      int32_t esi_2 = (esi_1 & 3);
00532222      int32_t eax_19 = ((ecx_3 >> 2) & 0x1f);
00532225      int32_t ecx_10 = ((esi_1 >> 2) & 0x1f);
0053222c      uint32_t ebx_6 = ((uint32_t)terrain[(((arg3 + ((arg4 + (arg3 << 3)) + 8)) + 2) * temp0)]);
00532236      int32_t ebx_7 = (ebx_6 & 3);
00532240      int32_t esi_5 = ((ebx_6 >> 2) & 0x1f);
00532247      uint32_t ebx_8 = ((uint32_t)terrain[((edx_2 + 1) * temp0)]);
0053224d      int32_t ebx_9 = (ebx_8 & 3);
00532289      int32_t edx_6 = (var_1c << 0x1c);
00532291      int32_t edi_3 = ((ebx_8 >> 2) & 0x1f);
00532296      uint32_t var_10 = ((((((((((ebx_9 + ((ebx_7 + ((esi_2 + (ecx_4 << 2)) << 2)) << 2)) << 5) + eax_19) << 5) + ecx_10) << 5) + esi_5) << 5) + edx_6) + edi_3);
005322cb      int32_t var_c = ((((((((((ecx_4 + ((ebx_9 + ((ebx_7 + (esi_2 << 2)) << 2)) << 2)) << 5) + ecx_10) << 5) + esi_5) << 5) + edi_3) << 5) + edx_6) + eax_19);
00532300      int32_t var_8 = ((((((((((esi_2 + ((ecx_4 + ((ebx_9 + (ebx_7 << 2)) << 2)) << 2)) << 5) + esi_5) << 5) + edi_3) << 5) + eax_19) << 5) + edx_6) + ecx_10);
00532334      int32_t var_4 = ((((((((((ebx_7 + ((esi_2 + ((ecx_4 + (ebx_9 << 2)) << 2)) << 2)) << 5) + edi_3) << 5) + eax_19) << 5) + ecx_10) << 5) + edx_6) + esi_5);
00532348      int32_t edx_7;
00532348      
00532348      if (((ecx_4 != esi_2 || ecx_4 != ebx_7) || ecx_4 != ebx_9))
0053234e          edx_7 = 0;
00532348      else
0053234a          edx_7 = 1;
0053234a      
0053235a      if (((eax_19 != ecx_10 || eax_19 != esi_5) || eax_19 != edi_3))
00532360          eax_19 = 0;
0053235a      else
0053235c          eax_19 = 1;
0053235c      
00532368      uint8_t eax_20;
00532368      
00532368      if (ecx_4 != 0)
0053236a          eax_20 = edx_7;
00532368      else if ((edx_7 == 0 || eax_19 == 0))
0053237e          eax_20 = 0;
00532375      else
00532377          eax_20 = 1;
00532377      
00532384      *(uint8_t*)arg5 = eax_20;
00532386      class CRegionDesc* CRegionDesc::current_region_1 = CRegionDesc::current_region;
005323b7      LandSurf::SelectTerrain(CommandList::GetHead(CRegionDesc::current_region_1->terrain_info), (var_18 + arg3), (eax_5 + arg4), arg6, arg7, &var_10, var_1c, CRegionDesc::current_region_1->minimize_pal);
00532170  }

005323c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005323d0  void __fastcall CLandBlockStruct::TransAdjust(class CLandBlockStruct* this)

005323d0  {
005323d0      class CLandBlockStruct* vertices = this;
005323d1      enum LandDefs::Direction trans_dir = this->trans_dir;
005323db      int32_t edi = 1;
005323db      
005323e9      if (((trans_dir == NORTHWEST_OF_VIEWER || trans_dir == NORTH_OF_VIEWER) || trans_dir == NORTHEAST_OF_VIEWER))
005323e9      {
005323eb          int32_t side_polygon_count_3 = this->side_polygon_count;
005323eb          
005323f0          if (side_polygon_count_3 > 1)
005323f0          {
00532442              do
00532442              {
005323f2                  int32_t side_vertex_count = this->side_vertex_count;
00532407                  vertices = this->vertex_array.vertices;
0053240b                  uint32_t CVertexArray::vertex_size_2 = CVertexArray::vertex_size;
00532421                  int32_t eax_2 = (((side_vertex_count * edi) + side_polygon_count_3) * CVertexArray::vertex_size);
0053242c                  long double x87_r7_2 = (((long double)*(uint32_t*)(&vertices->side_vertex_count + ((((edi - 1) * side_vertex_count) + side_polygon_count_3) * CVertexArray::vertex_size_2))) + ((long double)*(uint32_t*)(&vertices->side_vertex_count + ((((edi + 1) * side_vertex_count) + side_polygon_count_3) * CVertexArray::vertex_size_2))));
00532430                  edi += 2;
00532439                  *(uint32_t*)(&vertices->side_vertex_count + eax_2) = ((float)(x87_r7_2 * ((long double)0.5f)));
0053243d                  side_polygon_count_3 = this->side_polygon_count;
00532442              } while (edi < side_polygon_count_3);
005323f0          }
005323e9      }
005323e9      
00532449      enum LandDefs::Direction trans_dir_1 = this->trans_dir;
00532449      
00532459      if (((trans_dir_1 == NORTHWEST_OF_VIEWER || trans_dir_1 == WEST_OF_VIEWER) || trans_dir_1 == SOUTHWEST_OF_VIEWER))
00532459      {
0053245e          int32_t i = 1;
0053245e          
00532460          if (this->side_polygon_count > 1)
00532460          {
00532494              do
00532494              {
00532462                  uint32_t CVertexArray::vertex_size_1 = CVertexArray::vertex_size;
00532468                  class CVertex* vertices_2 = this->vertex_array.vertices;
00532477                  int32_t edx_5 = (CVertexArray::vertex_size_1 * i);
0053247e                  long double x87_r7_5 = (((long double)*(uint32_t*)(((char*)vertices_2 + ((i - 1) * CVertexArray::vertex_size_1)) + 8)) + ((long double)*(uint32_t*)((((i + 1) * CVertexArray::vertex_size_1) + vertices_2) + 8)));
00532482                  i += 2;
0053248b                  *(uint32_t*)((edx_5 + vertices_2) + 8) = ((float)(x87_r7_5 * ((long double)0.5f)));
00532494              } while (i < this->side_polygon_count);
00532460          }
00532459      }
00532459      
00532496      enum LandDefs::Direction trans_dir_2 = this->trans_dir;
00532496      
005324a6      if (((trans_dir_2 == SOUTHWEST_OF_VIEWER || trans_dir_2 == SOUTH_OF_VIEWER) || trans_dir_2 == SOUTHEAST_OF_VIEWER))
005324a6      {
005324ab          int32_t i_1 = 1;
005324ab          
005324ad          if (this->side_polygon_count > 1)
005324ad          {
005324ee              do
005324ee              {
005324b0                  int32_t side_vertex_count_1 = this->side_vertex_count;
005324b3                  uint32_t CVertexArray::vertex_size_3 = CVertexArray::vertex_size;
005324b9                  class CVertex* vertices_3 = this->vertex_array.vertices;
005324d1                  int32_t eax_7 = ((side_vertex_count_1 * CVertexArray::vertex_size_3) * i_1);
005324d8                  long double x87_r7_8 = (((long double)*(uint32_t*)(((char*)vertices_3 + (((i_1 - 1) * side_vertex_count_1) * CVertexArray::vertex_size_3)) + 8)) + ((long double)*(uint32_t*)(((((i_1 + 1) * side_vertex_count_1) * CVertexArray::vertex_size_3) + vertices_3) + 8)));
005324dc                  i_1 += 2;
005324e5                  *(uint32_t*)((eax_7 + vertices_3) + 8) = ((float)(x87_r7_8 * ((long double)0.5f)));
005324ee              } while (i_1 < this->side_polygon_count);
005324ad          }
005324a6      }
005324a6      
005324f5      enum LandDefs::Direction trans_dir_3 = this->trans_dir;
005324f5      
00532505      if (((trans_dir_3 == SOUTHEAST_OF_VIEWER || trans_dir_3 == EAST_OF_VIEWER) || trans_dir_3 == NORTHEAST_OF_VIEWER))
00532505      {
00532507          int32_t side_polygon_count = this->side_polygon_count;
0053250c          int32_t esi_1 = 1;
0053250c          
0053250e          if (side_polygon_count > 1)
0053250e          {
0053254b              do
0053254b              {
00532513                  uint32_t CVertexArray::vertex_size_4 = CVertexArray::vertex_size;
0053251c                  int32_t eax_9 = ((this->side_vertex_count * side_polygon_count) + esi_1);
0053251f                  class CVertex* vertices_1 = this->vertex_array.vertices;
00532535                  esi_1 += 2;
00532542                  *(uint32_t*)(((eax_9 * CVertexArray::vertex_size_4) + vertices_1) + 8) = ((float)((((long double)*(uint32_t*)((((eax_9 - 1) * CVertexArray::vertex_size_4) + vertices_1) + 8)) + ((long double)*(uint32_t*)(((char*)vertices_1 + ((eax_9 + 1) * CVertexArray::vertex_size_4)) + 8))) * ((long double)0.5f)));
00532546                  side_polygon_count = this->side_polygon_count;
0053254b              } while (esi_1 < side_polygon_count);
0053250e          }
00532505      }
00532505      
00532556      if (this->side_cell_count == 4)
00532556      {
0053255f          if (this->trans_dir == NORTH_OF_VIEWER)
0053255f          {
00532568              int32_t i_2 = 1;
00532568              
0053256a              if (this->side_polygon_count > 1)
0053256a              {
00532570                  int32_t ebx_5 = 0x12;
00532570                  
005325f7                  do
005325f7                  {
00532590                      void* edx_12 = ((((this->side_vertex_count * CVertexArray::vertex_size) * i_2) + this->vertex_array.vertices) + 8);
00532594                      uint8_t* height = this->height;
0053259c                      void* eax_14 = &height[ebx_5];
0053259e                      long double x87_r7_13 = ((long double)LandDefs::Land_Height_Table[((uint32_t)height[(ebx_5 + 9)])]);
005325a9                      long double x87_r6_1 = ((long double)LandDefs::Land_Height_Table[((uint32_t)*(uint8_t*)((char*)eax_14 + 0x12))]);
005325b8                      long double x87_r5_1 = ((long double)LandDefs::Land_Height_Table[((uint32_t)*(uint8_t*)((char*)eax_14 - 9))]);
005325c1                      long double x87_r5_3 = ((x87_r5_1 + x87_r5_1) - ((long double)LandDefs::Land_Height_Table[((uint32_t)*(uint8_t*)((char*)eax_14 - 0x12))]));
005325c8                      long double temp1_1 = ((long double)*(uint32_t*)edx_12);
005325c8                      (x87_r5_3 - temp1_1);
005325ca                      uint32_t eax_15;
005325ca                      eax_15 = ((((x87_r5_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r5_3 == temp1_1) ? 1 : 0) << 0xe) | 0x2800))));
005325cc                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005325cc                      
005325cf                      if (p_1)
005325d5                          x87_r6_1 = x87_r5_3;
005325cf                      else
005325d1                          *(uint32_t*)edx_12 = ((float)x87_r5_3);
005325d1                      
005325db                      long double x87_r7_15 = ((x87_r7_13 + x87_r7_13) - x87_r6_1);
005325dd                      long double temp5_1 = ((long double)*(uint32_t*)edx_12);
005325dd                      (x87_r7_15 - temp5_1);
005325df                      eax_15 = ((((x87_r7_15 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_15, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_15 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005325e1                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005325e1                      
005325e4                      if (!(p_2))
005325e6                          *(uint32_t*)edx_12 = ((float)x87_r7_15);
005325e6                      
005325ef                      i_2 += 2;
005325f2                      ebx_5 += 0x24;
005325f7                  } while (i_2 < this->side_polygon_count);
0053256a              }
0053255f          }
0053255f          
005325fd          if (this->trans_dir == SOUTH_OF_VIEWER)
005325fd          {
00532603              int32_t side_polygon_count_1 = this->side_polygon_count;
00532608              int32_t esi_2 = 1;
00532608              
0053260a              if (side_polygon_count_1 > 1)
0053260a              {
00532610                  int32_t ebx_6 = 0x12;
00532610                  
00532690                  do
00532690                  {
00532627                      void* edx_17 = (((((this->side_vertex_count * esi_2) + side_polygon_count_1) * CVertexArray::vertex_size) + this->vertex_array.vertices) + 8);
0053262b                      uint8_t* height_1 = this->height;
00532637                      long double x87_r7_16 = ((long double)LandDefs::Land_Height_Table[((uint32_t)height_1[(ebx_6 + 0x11)])]);
00532642                      long double x87_r6_4 = ((long double)LandDefs::Land_Height_Table[((uint32_t)height_1[(ebx_6 + 0x1a)])]);
00532651                      long double x87_r5_4 = ((long double)LandDefs::Land_Height_Table[((uint32_t)height_1[(ebx_6 - 1)])]);
0053265a                      long double x87_r5_6 = ((x87_r5_4 + x87_r5_4) - ((long double)LandDefs::Land_Height_Table[((uint32_t)height_1[(ebx_6 - 0xa)])]));
00532661                      long double temp2_1 = ((long double)*(uint32_t*)edx_17);
00532661                      (x87_r5_6 - temp2_1);
00532663                      uint32_t eax_19;
00532663                      eax_19 = ((((x87_r5_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r5_6 == temp2_1) ? 1 : 0) << 0xe) | 0x2800))));
00532665                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00532665                      
00532668                      if (p_3)
0053266e                          x87_r6_4 = x87_r5_6;
00532668                      else
0053266a                          *(uint32_t*)edx_17 = ((float)x87_r5_6);
0053266a                      
00532674                      long double x87_r7_18 = ((x87_r7_16 + x87_r7_16) - x87_r6_4);
00532676                      long double temp6_1 = ((long double)*(uint32_t*)edx_17);
00532676                      (x87_r7_18 - temp6_1);
00532678                      eax_19 = ((((x87_r7_18 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_18, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_18 == temp6_1) ? 1 : 0) << 0xe) | 0x3800))));
0053267a                      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
0053267a                      
0053267d                      if (!(p_4))
0053267f                          *(uint32_t*)edx_17 = ((float)x87_r7_18);
0053267f                      
00532685                      side_polygon_count_1 = this->side_polygon_count;
00532688                      esi_2 += 2;
0053268b                      ebx_6 += 0x24;
00532690                  } while (esi_2 < side_polygon_count_1);
0053260a              }
005325fd          }
005325fd          
00532696          if (this->trans_dir == EAST_OF_VIEWER)
00532696          {
0053269b              int32_t i_3 = 1;
0053269b              
0053269d              if (this->side_polygon_count > 1)
0053269d              {
00532710                  do
00532710                  {
005326ab                      void* esi_4 = (((CVertexArray::vertex_size * i_3) + this->vertex_array.vertices) + 8);
005326af                      uint8_t* height_2 = this->height;
005326b7                      void* eax_22 = &height_2[(i_3 << 1)];
005326ba                      long double x87_r7_19 = ((long double)LandDefs::Land_Height_Table[((uint32_t)height_2[((i_3 << 1) + 1)])]);
005326c5                      long double x87_r6_7 = ((long double)LandDefs::Land_Height_Table[((uint32_t)*(uint8_t*)((char*)eax_22 + 2))]);
005326d4                      long double x87_r5_7 = ((long double)LandDefs::Land_Height_Table[((uint32_t)*(uint8_t*)((char*)eax_22 - 1))]);
005326dd                      long double x87_r5_9 = ((x87_r5_7 + x87_r5_7) - ((long double)LandDefs::Land_Height_Table[((uint32_t)*(uint8_t*)((char*)eax_22 - 2))]));
005326e4                      long double temp4_1 = ((long double)*(uint32_t*)esi_4);
005326e4                      (x87_r5_9 - temp4_1);
005326e6                      uint32_t eax_23;
005326e6                      eax_23 = ((((x87_r5_9 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_9, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r5_9 == temp4_1) ? 1 : 0) << 0xe) | 0x2800))));
005326e8                      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005326e8                      
005326eb                      if (p_5)
005326f1                          x87_r6_7 = x87_r5_9;
005326eb                      else
005326ed                          *(uint32_t*)esi_4 = ((float)x87_r5_9);
005326ed                      
005326f7                      long double x87_r7_21 = ((x87_r7_19 + x87_r7_19) - x87_r6_7);
005326f9                      long double temp8_1 = ((long double)*(uint32_t*)esi_4);
005326f9                      (x87_r7_21 - temp8_1);
005326fb                      eax_23 = ((((x87_r7_21 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == temp8_1) ? 1 : 0) << 0xe) | 0x3800))));
005326fd                      bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
005326fd                      
00532700                      if (!(p_6))
00532702                          *(uint32_t*)esi_4 = ((float)x87_r7_21);
00532702                      
0053270b                      i_3 += 2;
00532710                  } while (i_3 < this->side_polygon_count);
0053269d              }
00532696          }
00532696          
00532716          if (this->trans_dir == WEST_OF_VIEWER)
00532716          {
0053271c              int32_t side_polygon_count_2 = this->side_polygon_count;
00532721              int32_t edx_18 = 1;
00532721              
00532723              if (side_polygon_count_2 > 1)
00532723              {
0053279c                  do
0053279c                  {
00532737                      void* esi_9 = (((((this->side_vertex_count * side_polygon_count_2) + edx_18) * CVertexArray::vertex_size) + this->vertex_array.vertices) + 8);
0053273b                      uint8_t* height_3 = this->height;
00532743                      long double x87_r7_22 = ((long double)LandDefs::Land_Height_Table[((uint32_t)height_3[((edx_18 << 1) + 0x49)])]);
0053274f                      long double x87_r6_10 = ((long double)LandDefs::Land_Height_Table[((uint32_t)height_3[((edx_18 << 1) + 0x4a)])]);
00532760                      long double x87_r5_10 = ((long double)LandDefs::Land_Height_Table[((uint32_t)height_3[((edx_18 << 1) + 0x47)])]);
00532769                      long double x87_r5_12 = ((x87_r5_10 + x87_r5_10) - ((long double)LandDefs::Land_Height_Table[((uint32_t)height_3[((edx_18 << 1) + 0x46)])]));
00532770                      long double temp3_1 = ((long double)*(uint32_t*)esi_9);
00532770                      (x87_r5_12 - temp3_1);
00532772                      uint32_t eax_26;
00532772                      eax_26 = ((((x87_r5_12 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_12, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r5_12 == temp3_1) ? 1 : 0) << 0xe) | 0x2800))));
00532774                      bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
00532774                      
00532777                      if (p_7)
0053277d                          x87_r6_10 = x87_r5_12;
00532777                      else
00532779                          *(uint32_t*)esi_9 = ((float)x87_r5_12);
00532779                      
00532783                      long double x87_r7_24 = ((x87_r7_22 + x87_r7_22) - x87_r6_10);
00532785                      long double temp7_1 = ((long double)*(uint32_t*)esi_9);
00532785                      (x87_r7_24 - temp7_1);
00532787                      eax_26 = ((((x87_r7_24 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_24, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_24 == temp7_1) ? 1 : 0) << 0xe) | 0x3800))));
00532789                      bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
00532789                      
0053278c                      if (!(p_8))
0053278e                          *(uint32_t*)esi_9 = ((float)x87_r7_24);
0053278e                      
00532794                      side_polygon_count_2 = this->side_polygon_count;
00532797                      edx_18 += 2;
0053279c                  } while (edx_18 < side_polygon_count_2);
00532723              }
00532716          }
00532556      }
005323d0  }

00532577                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
005327a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005327b0  void __fastcall CLandBlockStruct::~CLandBlockStruct(class CLandBlockStruct* this)

005327b0  {
005327b3      CLandBlockStruct::Destroy(this);
005327bc      operator delete[](this->height);
005327c5      operator delete[](this->terrain);
005327d1      /* tailcall */
005327d1      return IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&this->vertex_array);
005327b0  }

005327d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005327e0  void __fastcall CLandBlockStruct::CalcWater(class CLandBlockStruct* this)

005327e0  {
005327eb      int32_t i = 0;
005327f0      int32_t var_c = 0;
005327f4      int32_t ebp = 1;
005327f4      
005327f9      if (this->side_cell_count != 8)
005327f9      {
005327fb          this->water_type = NOT_WATER;
00532804          return;
005327f9      }
005327f9      
00532898      do
00532898      {
00532809          int32_t j = 0;
00532809          
0053280d          if (this->side_cell_count > 0)
0053280d          {
00532890              do
00532890              {
00532821                  int32_t var_8;
00532821                  int32_t var_4;
00532821                  CLandBlockStruct::CalcCellWater(this, i, j, &var_8, &var_4);
00532821                  
0053282c                  if (var_8 == 0)
0053282c                  {
0053287c                      ebp = 0;
00532876                      this->lcell[((this->side_cell_count * i) + j)].water_type = 0;
0053282c                  }
0053282c                  else
0053282c                  {
00532839                      var_c = 1;
00532839                      
0053283d                      if (var_4 == 0)
0053283d                      {
00532865                          ebp = 0;
0053285d                          this->lcell[((this->side_cell_count * i) + j)].water_type = 1;
0053283d                      }
0053283d                      else
00532842                          this->lcell[((this->side_cell_count * i) + j)].water_type = 2;
0053282c                  }
0053282c                  
0053288d                  j += 1;
00532890              } while (j < this->side_cell_count);
0053280d          }
0053280d          
00532895          i += 1;
00532898      } while (i < this->side_cell_count);
00532898      
005328a5      if (var_c == 0)
005328a5      {
005328b9          this->water_type = NOT_WATER;
005328c6          return;
005328a5      }
005328a5      
005328ab      int32_t edx_6;
005328ab      edx_6 = ebp != 0;
005328af      this->water_type = (edx_6 + 1);
005327e0  }

005328c7                       90 90 90 90 90 90 90 90 90                                                         .........

005328d0  void __fastcall CLandBlockStruct::ConstructVertices(class CLandBlockStruct* this)

005328d0  {
005328dc      int32_t temp0 = (8 / this->side_cell_count);
005328e5      int32_t side_vertex_count = this->side_vertex_count;
005328e9      int32_t ebx = 0;
005328ed      int32_t var_14 = 0;
005328f1      float var_1c = ((float)(((long double)0f) / ((long double)this->side_polygon_count)));
005328f1      
005328f5      if (side_vertex_count > 0)
005328f5      {
005328fe          void* edi_1 = nullptr;
00532900          void* var_10_1 = nullptr;
00532900          
00532986          do
00532986          {
00532904              int32_t esi_1 = 0;
00532908              int32_t var_18_1 = 0;
00532908              
0053290c              if (side_vertex_count > 0)
0053290c              {
0053296d                  do
0053296d                  {
0053293f                      long double x87_r7_6 = ((long double)LandDefs::Land_Height_Table[((uint32_t)*(uint8_t*)((char*)edi_1 + this->height))]);
00532946                      int32_t* edx_4 = ((((side_vertex_count * ebx) + esi_1) * CVertexArray::vertex_size) + this->vertex_array.vertices);
0053294d                      *(uint32_t*)edx_4 = ((float)(((long double)var_14) * ((long double)var_1c)));
00532953                      edx_4[1] = ((float)(((long double)var_18_1) * ((long double)var_1c)));
0053295e                      edx_4[2] = ((float)x87_r7_6);
00532961                      side_vertex_count = this->side_vertex_count;
00532964                      esi_1 += 1;
00532965                      edi_1 += temp0;
00532969                      var_18_1 = esi_1;
0053296d                  } while (esi_1 < side_vertex_count);
0053290c              }
0053290c              
00532976              edi_1 = ((char*)var_10_1 + (temp0 * 9));
00532978              side_vertex_count = this->side_vertex_count;
0053297b              ebx += 1;
0053297e              var_14 = ebx;
00532982              var_10_1 = edi_1;
00532986          } while (ebx < side_vertex_count);
005328f5      }
005328d0  }

00532994                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005329a0  void __thiscall CLandBlockStruct::ConstructUVs(class CLandBlockStruct* this, uint32_t arg2)

005329a0  {
005329a7      int32_t side_polygon_count = this->side_polygon_count;
005329aa      int32_t ebp = 0;
005329aa      
005329ae      if (side_polygon_count > 0)
005329ae      {
005329b6          int32_t ebx;
005329b6          ebx = 3;
005329b6          
00532b93          do
00532b93          {
005329c0              int32_t i = 0;
005329c0              
005329c4              if (side_polygon_count > 0)
005329c4              {
00532b87                  do
00532b87                  {
005329e8                      uint8_t var_9;
005329e8                      int32_t var_8;
005329e8                      int16_t var_4;
005329e8                      CLandBlockStruct::GetCellRotation(this, arg2, ebp, i, &var_9, &var_4, &var_8);
005329f9                      int32_t eax_4 = (((this->side_polygon_count * ebp) + i) << 1);
005329f9                      
005329fd                      if (var_9 != 0)
005329fd                      {
005329ff                          this->polygons[eax_4].stippling = ebx;
00532a16                          &this->polygons->stippling[(((eax_4 * 3) + 3) << 4)] = ebx;
005329fd                      }
005329fd                      
00532a29                      enum VertexType vertex_type = this->vertex_array.vertex_type;
00532a2c                      int32_t edx_15;
00532a2c                      
00532a2c                      if (this->SWtoNEcut[((this->side_polygon_count * ebp) + i)] == 0)
00532a2c                      {
00532ac9                          if (vertex_type == CSWVertexType)
00532ac9                          {
00532ad3                              int32_t ebx_4;
00532ad3                              ebx_4 = SW_Corner[var_8];
00532ae0                              int32_t ecx_16 = (eax_4 * 0x30);
00532ae7                              **(uint8_t**)(&this->polygons->pos_uv_indices + ecx_16) = ebx_4;
00532aed                              int32_t ebx_5;
00532aed                              ebx_5 = SE_Corner[var_8];
00532afb                              *(uint8_t*)(*(uint32_t*)(&this->polygons->pos_uv_indices + ecx_16) + 1) = ebx_5;
00532b09                              int32_t edx_21;
00532b09                              edx_21 = NW_Corner[var_8];
00532b10                              *(uint8_t*)(*(uint32_t*)(&this->polygons->pos_uv_indices + ecx_16) + 2) = edx_21;
00532b1a                              int32_t ebx_6;
00532b1a                              ebx_6 = NE_Corner[var_8];
00532b25                              int32_t ecx_19 = (((eax_4 * 3) + 3) << 4);
00532b2c                              **(uint8_t**)(&this->polygons->pos_uv_indices + ecx_19) = ebx_6;
00532b39                              ebx = NW_Corner[var_8];
00532b40                              *(uint8_t*)(*(uint32_t*)(&this->polygons->pos_uv_indices + ecx_19) + 1) = ebx;
00532b4e                              edx_15 = SE_Corner[var_8];
00532b55                              *(uint8_t*)(*(uint32_t*)(&this->polygons->pos_uv_indices + ecx_19) + 2) = edx_15;
00532ac9                          }
00532a2c                      }
00532a2c                      else if (vertex_type == CSWVertexType)
00532a35                      {
00532a3f                          int32_t ebx_1;
00532a3f                          ebx_1 = SW_Corner[var_8];
00532a4c                          int32_t ecx_10 = (eax_4 * 0x30);
00532a53                          **(uint8_t**)(&this->polygons->pos_uv_indices + ecx_10) = ebx_1;
00532a59                          int32_t ebx_2;
00532a59                          ebx_2 = SE_Corner[var_8];
00532a67                          *(uint8_t*)(*(uint32_t*)(&this->polygons->pos_uv_indices + ecx_10) + 1) = ebx_2;
00532a75                          int32_t edx_9;
00532a75                          edx_9 = NE_Corner[var_8];
00532a7c                          *(uint8_t*)(*(uint32_t*)(&this->polygons->pos_uv_indices + ecx_10) + 2) = edx_9;
00532a86                          int32_t ebx_3;
00532a86                          ebx_3 = SW_Corner[var_8];
00532a91                          int32_t ecx_13 = (((eax_4 * 3) + 3) << 4);
00532a98                          **(uint8_t**)(&this->polygons->pos_uv_indices + ecx_13) = ebx_3;
00532aa5                          ebx = NE_Corner[var_8];
00532aac                          *(uint8_t*)(*(uint32_t*)(&this->polygons->pos_uv_indices + ecx_13) + 1) = ebx;
00532aba                          edx_15 = NW_Corner[var_8];
00532b55                          *(uint8_t*)(*(uint32_t*)(&this->polygons->pos_uv_indices + ecx_13) + 2) = edx_15;
00532a35                      }
00532b58                      ebx = var_4;
00532b5d                      this->polygons[eax_4].pos_surface = ebx;
00532b6b                      class CPolygon* edx_27;
00532b6b                      edx_27 = var_4;
00532b7a                      &this->polygons->pos_surface[(((eax_4 * 3) + 3) * 8)] = edx_27;
00532b82                      i += 1;
00532b85                      ebx = 3;
00532b87                  } while (i < this->side_polygon_count);
005329c4              }
005329c4              
00532b8d              side_polygon_count = this->side_polygon_count;
00532b90              ebp += 1;
00532b93          } while (ebp < side_polygon_count);
005329ae      }
005329a0  }

005329ba                                                                                8d 9b 00 00 00 00                            ......
00532ba3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00532bb0  void __thiscall CLandBlockStruct::generate(class CLandBlockStruct* this, uint32_t arg2, uint32_t arg3, enum LandDefs::Direction arg4)

00532bb0  {
00532bb7      uint32_t temp0 = (COMBINE(0, 8) / arg3);
00532bc6      int32_t side_cell_count = this->side_cell_count;
00532bc6      
00532bd0      if ((side_cell_count == temp0 && this->trans_dir == arg4))
00532bd7          return;
00532bd7      
00532bdb      int32_t ebx = 0;
00532bdb      
00532bdf      if (side_cell_count != temp0)
00532bdf      {
00532be3          ebx = 1;
00532be3          
00532be8          if (side_cell_count > 0)
00532bec              CLandBlockStruct::Destroy(this);
00532bec          
00532bf1          this->side_cell_count = temp0;
00532bf4          this->side_polygon_count = temp0;
00532bfa          this->side_vertex_count = (temp0 + 1);
00532bfd          CLandBlockStruct::InitPVArrays(this);
00532bdf      }
00532bdf      
00532c04      this->trans_dir = arg4;
00532c07      CLandBlockStruct::ConstructVertices(this);
00532c07      
00532c11      if (this->trans_dir != IN_VIEWER_BLOCK)
00532c11      {
00532c13          int32_t side_cell_count_1 = this->side_cell_count;
00532c13          
00532c1e          if ((side_cell_count_1 > 1 && side_cell_count_1 < 8))
00532c20              CLandBlockStruct::TransAdjust(this);
00532c11      }
00532c11      
00532c29      if (ebx == 0)
00532c29      {
00532c2b          CLandBlockStruct::AdjPlanes(this);
00532c32          CLandBlockStruct::CalcWater(this);
00532c3d          return;
00532c29      }
00532c29      
00532c45      CLandBlockStruct::ConstructPolygons(this, arg2);
00532c4d      CLandBlockStruct::ConstructUVs(this, arg2);
00532c54      CLandBlockStruct::CalcWater(this);
00532bb0  }

00532c62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00532c70  void __fastcall CLandCell::CLandCell(class CLandCell* this)

00532c70  {
00532c73      CSortCell::CSortCell(this);
00532c7a      this->vtable = 0x7c9310;
00532c80      this->vtable = &CLandCell::`vftable';
00532c87      this->vtable = &CLandCell::`vftable';
00532c93      this->polygons = operator new[](8);
00532c9c      this->in_view = OUTSIDE;
00532c70  }

00532caa                                90 90 90 90 90 90                                                            ......

00532cb0  enum BoundingType __fastcall CLandCell::IsInView(class CLandCell const* this)

00532cb0  {
00532cb6      return this->in_view;
00532cb0  }

00532cb7                                                                       90 90 90 90 90 90 90 90 90                         .........

00532cc0  void __fastcall CLandCell::~CLandCell(class CLandCell* this)

00532cc0  {
00532cc3      class CPolygon** polygons = this->polygons;
00532cca      this->vtable = 0x7c9310;
00532cd0      this->vtable = &CLandCell::`vftable';
00532cd7      this->vtable = &CLandCell::`vftable';
00532cde      operator delete[](polygons);
00532ce9      /* tailcall */
00532ce9      return CSortCell::~CSortCell(this);
00532cc0  }

00532cee                                            90 90                                                                ..

00532cf0  int32_t __thiscall CLandCell::find_terrain_poly(class CLandCell const* this, class AC1Legacy::Vector3 const* arg2, class CPolygon const** arg3)

00532cf0  {
00532d19      int32_t result;
00532d19      
00532d19      for (int32_t i = 0; i < 2; i += 1)
00532d19      {
00532d0c          result = CPolygon::point_in_poly2D(this->polygons[i], arg2, POSITIVE);
00532d0c          
00532d13          if (result != 0)
00532d13          {
00532d30              *(uint32_t*)arg3 = this->polygons[i];
00532d38              return 1;
00532d13          }
00532d19      }
00532d19      
00532d1e      return result;
00532cf0  }

00532cfd                                                                                         8d 49 00                               .I.
00532d3b                                                                                   90 90 90 90 90                             .....

00532d40  int32_t __thiscall CLandCell::point_in_cell(class CLandCell const* this, class AC1Legacy::Vector3 const* arg2)

00532d40  {
00532d4a      int32_t eax = CLandCell::find_terrain_poly(this, arg2, &arg2);
00532d4f      int32_t eax_1 = -(eax);
00532d55      return -((eax_1 - eax_1));
00532d40  }

00532d58                                                                          90 90 90 90 90 90 90 90                          ........

00532d60  enum TransitionState __thiscall CLandCell::find_collisions(class CLandCell const* this, class CTransition* arg2)

00532d60  {
00532d6b      enum TransitionState result = this->vtable->find_env_collisions(arg2);
00532d6b      
00532d74      if (result == OK_TS)
00532d74      {
00532d79          result = CSortCell::find_collisions(this, arg2);
00532d79          
00532d81          if (result == OK_TS)
00532d86              return CObjCell::find_obj_collisions(this, arg2);
00532d74      }
00532d74      
00532d8d      return result;
00532d60  }


00532d90  void CLandCell::grab_visible_cells(class CLandCell* this @ ecx)

00532d90  {
00532d96      /* tailcall */
00532d96      return LScape::grab_visible_cells(CObjCell::landscape);
00532d90  }

00532d9b                                                                                   90 90 90 90 90                             .....

00532da0  void CLandCell::release_cells(class CLandCell* this @ ecx)

00532da0  {
00532da6      /* tailcall */
00532da6      return LScape::release_visible_cells(CObjCell::landscape);
00532da0  }

00532dab                                   90 90 90 90 90                                                             .....

00532db0  class CLandCell* CLandCell::GetVisible(uint32_t arg1)

00532db0  {
00532dba      uint32_t var_4 = arg1;
00532dc0      uint32_t edx;
00532dc0      return LScape::get_landcell(CObjCell::landscape, edx);
00532db0  }

00532dc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00532dd0  uint32_t CLandCell::Pack(class CLandCell* this @ ecx, void** arg2, uint32_t arg3)

00532dd0  {
00532dd0      /* tailcall */
00532dd0      return RenderTexture::GetLevelRef(this, arg2, arg3);
00532dd0  }

00532dd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00532de0  uint32_t __stdcall CLandCell::Trace(class CLandCell const* this @ ecx, class LOSParameters* arg2)

00532de0  {
00532de9      if (arg2->m_bCheckedOutside != 0)
00532ded          return 0;
00532ded      
00532df0      arg2->m_bCheckedOutside = 1;
00532dfc      return 2;
00532de0  }

00532dff                                                                                               90                                 .

00532e00  void* __thiscall CLandCell::`vector deleting destructor'(class CLandCell* this, uint32_t arg2)

00532e00  {
00532e03      /* tailcall */
00532e03      return CLandCell::`vector deleting destructor'(((char*)this - 0x30), arg2);
00532e00  }

00532e08                          cc cc cc cc cc cc cc cc                                                          ........

00532e10  void* __thiscall CLandCell::`vector deleting destructor'(class CLandCell* this, uint32_t arg2)

00532e10  {
00532e13      /* tailcall */
00532e13      return CLandCell::`vector deleting destructor'(((char*)this - 0x38), arg2);
00532e10  }

00532e18                                                                          cc cc cc cc cc cc cc cc                          ........

00532e20  enum SURFCHAR __thiscall CLandCell::find_terrain(class CLandCell const* this, class Position const* arg2)

00532e20  {
00532e2a      int32_t var_48 = 0x796910;
00532e32      int32_t var_44 = 0;
00532e3a      int32_t var_40 = 0x3f800000;
00532e42      int32_t var_3c = 0;
00532e4a      int32_t var_38 = 0;
00532e52      int32_t var_34 = 0;
00532e5a      int32_t var_c = 0;
00532e62      int32_t var_8 = 0;
00532e6a      int32_t var_4 = 0;
00532e72      Frame::cache(&var_40);
00532e88      uint32_t id = this->m_DID.id;
00532e8c      void __return;
00532e8c      Position::get_offset(&var_48, &__return, arg2);
00532eb0      return TERRAIN_SURF_CHAR[CLandBlock::get_terrain(this->myLandBlock_, this->m_DID.id, &__return)];
00532e20  }

00532eb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00532ec0  void CLandCell::add_outside_cell(class CELLARRAY* arg1, int32_t arg2, int32_t arg3)

00532ec0  {
00532ede      if ((arg2 >= 0 && (arg3 >= 0 && (arg2 < 0x7f8 && arg3 < 0x7f8))))
00532ede      {
00532ef3          uint32_t edx = (arg2 & 7);
00532f03          uint32_t esi_4 = ((((arg3 & 7) + (edx << 3)) + 1) | ((((arg2 & 0xfffffff8) << 5) | (arg3 >> 3)) << 0x10));
00532f05          uint32_t var_8_1 = esi_4;
00532f11          CELLARRAY::add_cell(arg1, esi_4, LScape::get_landcell(CObjCell::landscape, edx));
00532ede      }
00532ec0  }

00532f18                                                                          90 90 90 90 90 90 90 90                          ........

00532f20  void __thiscall CLandCell::find_env_collisions(class CLandCell const* this, class CTransition* arg2)

00532f20  {
00532f25      class CTransition* ebp = arg2;
00532f25      
00532f37      if (CObjCell::check_entry_restrictions(this, ebp) != OK_TS)
00532f3f          return;
00532f3f      
00532f42      uint32_t id = this->m_DID.id;
00532f45      uint32_t objcell_id = ebp->sphere_path.check_pos.objcell_id;
00532f56      arg2 = nullptr;
00532f5e      void __return;
00532f5e      class AC1Legacy::Vector3* eax_1 = LandDefs::get_block_offset(&__return, objcell_id, id);
00532f66      long double x87_r7_1 = (((long double)ebp->sphere_path.global_low_point.z) - ((long double)eax_1->z));
00532f73      long double x87_r6_1 = (((long double)ebp->sphere_path.global_low_point.y) - ((long double)eax_1->y));
00532f81      float var_28 = ((float)(((long double)ebp->sphere_path.global_low_point.x) - ((long double)eax_1->x)));
00532f87      float var_24 = ((float)x87_r6_1);
00532f8b      float var_20 = ((float)x87_r7_1);
00532f8b      
00532f96      if (CLandCell::find_terrain_poly(this, &var_28, &arg2) != 0)
00532f96      {
00532fb8          if ((CObjCell::get_block_water_type(this) == ENTIRELY_WATER && ((ebp->object_info.state & 4) == 0 && (ebp->object_info.object->state & 0x40) == 0)))
00532fc6              return;
00532fc6          
00532fd5          float var_2c_1 = ((float)CObjCell::get_water_depth(this, &var_28));
00532fd9          class CSphere* global_sphere = ebp->sphere_path.global_sphere;
00532fde          uint32_t id_1 = this->m_DID.id;
00532fe1          float x = global_sphere->center.x;
00532fe5          float y = global_sphere->center.y;
00532fec          float z = global_sphere->center.z;
00533003          float radius = global_sphere->radius;
00533007          class AC1Legacy::Vector3* eax_6 = LandDefs::get_block_offset(&__return, ebp->sphere_path.check_pos.objcell_id, id_1);
00533012          enum LandDefs::WaterType water_type = this->water_type;
00533019          class CTransition* ecx_4 = arg2;
0053301d          x = ((float)(((long double)x) - ((long double)eax_6->x)));
0053302c          float var_c_2 = ((float)(((long double)y) - ((long double)eax_6->y)));
00533042          float var_8_2 = ((float)(((long double)z) - ((long double)eax_6->z)));
00533046          int32_t eax_8;
00533046          eax_8 = water_type != NOT_WATER;
00533057          enum TransitionState eax_9;
00533057          int80_t st0_2;
00533057          st0_2 = OBJECTINFO::validate_walkable(ebp, &x, &ecx_4->sphere_path.num_sphere, eax_8, var_2c_1, &ebp->sphere_path, &ebp->collision_info, id_1);
00532f96      }
00532f20  }

0053306a                                90 90 90 90 90 90                                                            ......

00533070  int32_t __thiscall CLandCell::handle_move_restriction(class CLandCell const* this, class CTransition* arg2)

00533070  {
00533074      class CTransition* esi = arg2;
00533087      float __return;
00533087      Position::get_offset(&this->pos, &__return, &esi->sphere_path.curr_pos);
00533094      arg2 = ((float)-(((long double)0f)));
0053309c      float var_8;
0053309c      (((long double)var_8) - ((long double)arg2));
005330a2      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005330a5      int32_t var_8_1;
005330a5      
005330a5      if (p)
005330a5      {
005330b9          long double x87_r7_3 = ((long double)var_8);
005330bd          long double temp2_1 = ((long double)0f);
005330bd          (x87_r7_3 - temp2_1);
005330bd          
005330c8          if ((*(uint8_t*)((char*)((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
005330c8          {
005330e0              var_8_1 = 0;
005330e8              (((long double)__return) - ((long double)arg2));
005330ec              __return = -1f;
005330f6              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005330f6              
005330f9              if (p_1)
005330fb                  __return = 1f;
005330c8          }
005330c8          else
005330c8          {
005330ca              __return = 0f;
005330d2              var_8_1 = 0x3f800000;
005330c8          }
005330a5      }
005330a5      else
005330a5      {
005330a7          __return = 0f;
005330af          var_8_1 = 0xbf800000;
005330a5      }
005330a5      
0053310b      float __return_1 = __return;
0053311f      int32_t var_14 = var_8_1;
0053312a      int32_t var_10 = 0;
0053312e      COLLISIONINFO::set_collision_normal(&esi->collision_info, &__return_1);
0053313c      return 1;
00533070  }

0053313f                                                                                               90                                 .

00533140  float __thiscall CLandCell::GetViewerDistance(class CLandCell const* this, class AC1Legacy::Vector3* arg2)

00533140  {
00533152      void __return;
00533152      class AC1Legacy::Vector3* eax = Position::get_offset(&Render::viewer_pos, &__return, &this->pos);
0053315d      float* edx = arg2;
0053315f      *(uint32_t*)edx = eax->x;
00533164      edx[1] = eax->y;
00533167      float z = eax->z;
0053316a      edx[2] = z;
0053316d      arg2->y;
00533170      arg2->x;
00533172      arg2->z = 0f;
0053318d      return z;
00533140  }


00533190  enum SURFCHAR __thiscall CLandCell::walkable_surface_type(class CLandCell const* this, class CPolygon const* arg2, class Position const* arg3)

00533190  {
00533190      class CPolygon** polygons = this->polygons;
00533190      
005331ab      for (int32_t i = 0; i < 2; )
005331ab      {
005331a2          if (arg2 == *(uint32_t*)polygons)
005331be              return CLandCell::find_terrain(this, arg3);
005331be          
005331a4          i += 1;
005331a5          polygons = &polygons[1];
005331ab      }
005331ab      
005331b0      return 0;
00533190  }

005331c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005331d0  void CLandCell::add_cell_block(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, class CELLARRAY* arg5)

005331d0  {
005331db      for (int32_t i = arg1; i <= arg3; i += 1)
005331db      {
005331ec          if (arg2 <= arg4)
005331ec          {
005331ee              int32_t edi_2 = arg2;
005331ee              
00533246              do
00533246              {
00533206                  if ((i >= 0 && (edi_2 >= 0 && (i < 0x7f8 && edi_2 < 0x7f8))))
00533206                  {
0053321e                      uint32_t edx_2 = (i & 7);
0053322e                      uint32_t esi_2 = ((((edi_2 & 7) + (edx_2 << 3)) + 1) | ((((i & 0xfffffff8) << 5) | (edi_2 >> 3)) << 0x10));
00533230                      uint32_t var_14_1 = esi_2;
0053323a                      CELLARRAY::add_cell(arg5, esi_2, LScape::get_landcell(CObjCell::landscape, edx_2));
00533206                  }
00533206                  
00533243                  edi_2 += 1;
00533246              } while (edi_2 <= arg4);
005331ec          }
005331db      }
005331d0  }

00533256                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00533260  void CLandCell::check_add_cell_boundary(class CELLARRAY* arg1, class Vec2D const* arg2, int32_t arg3, int32_t arg4, float arg5, float arg6)

00533260  {
00533266      long double x87_r7 = ((long double)arg2->x);
0053326a      long double temp0 = ((long double)arg5);
0053326a      (x87_r7 - temp0);
0053326a      
0053327c      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0053327c      {
00533286          CLandCell::add_outside_cell(arg1, (arg3 + 1), arg4);
0053328b          long double x87_r7_1 = ((long double)arg2->y);
0053328e          long double temp2_1 = ((long double)arg5);
0053328e          (x87_r7_1 - temp2_1);
0053328e          
0053329a          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005332a2              CLandCell::add_outside_cell(arg1, (arg3 + 1), (arg4 + 1));
005332a2          
005332ad          (((long double)arg2->y) - ((long double)arg6));
005332b3          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005332b3          
005332b6          if (!(p_1))
005332be              CLandCell::add_outside_cell(arg1, (arg3 + 1), (arg4 - 1));
0053327c      }
0053327c      
005332c9      (((long double)arg2->x) - ((long double)arg6));
005332cf      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005332cf      
005332d2      if (!(p_2))
005332d2      {
005332dc          CLandCell::add_outside_cell(arg1, (arg3 - 1), arg4);
005332e1          long double x87_r7_4 = ((long double)arg2->y);
005332e4          long double temp4_1 = ((long double)arg5);
005332e4          (x87_r7_4 - temp4_1);
005332e4          
005332f0          if ((*(uint8_t*)((char*)((((x87_r7_4 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005332f8              CLandCell::add_outside_cell(arg1, (arg3 - 1), (arg4 + 1));
005332f8          
00533303          (((long double)arg2->y) - ((long double)arg6));
00533309          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00533309          
0053330c          if (!(p_3))
00533314              CLandCell::add_outside_cell(arg1, (arg3 - 1), (arg4 - 1));
005332d2      }
005332d2      
0053331c      long double x87_r7_6 = ((long double)arg2->y);
0053331f      long double temp3 = ((long double)arg5);
0053331f      (x87_r7_6 - temp3);
0053331f      
00533328      if ((*(uint8_t*)((char*)((((x87_r7_6 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp3) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00533334          CLandCell::add_outside_cell(arg1, arg3, (arg4 + 1));
00533334      
0053333f      (((long double)arg2->y) - ((long double)arg6));
00533345      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
00533345      
00533348      if (!(p_4))
00533352          CLandCell::add_outside_cell(arg1, arg3, (arg4 - 1));
00533260  }

0053335f                                                                                               90                                 .

00533360  void CLandCell::add_all_outside_cells(uint32_t const arg1, class CPhysicsPart** arg2, class CELLARRAY* arg3)

00533360  {
0053336c      int32_t added_outside = arg3->added_outside;
0053336c      
00533375      if (added_outside == 0)
00533375      {
0053337b          arg3->added_outside = 1;
00533381          uint32_t const eax_1 = arg1;
00533381          
00533386          if (eax_1 != 0)
00533386          {
0053338c              int32_t edi_1 = 0;
00533390              int32_t var_48_1 = 0;
00533394              int32_t var_4c_1 = 0;
00533398              int32_t var_50_1 = 0;
0053339c              int32_t var_54_1 = 0;
005333a0              class AC1Legacy::Vector3* var_58;
005333a0              int32_t var_2c;
005333a0              class CPhysicsPart** ebx_1;
005333a0              uint32_t esi_4;
005333a0              
005333a0              if (eax_1 <= 0)
005333a0              {
005333f6                  ebx_1 = arg2;
005333f9              label_5333f9:
005333f9                  uint32_t var_44;
005333f9                  esi_4 = var_44;
005333a0              }
005333a0              else
005333a0              {
005333a2                  while (true)
005333a2                  {
005333a2                      ebx_1 = arg2;
005333a2                      
005333a8                      if (ebx_1[edi_1] != 0)
005333a8                      {
005333b1                          void* eax_2 = ebx_1[edi_1];
005333b7                          int32_t edx = *(uint32_t*)((char*)eax_2 + 0x70);
005333bd                          var_2c = *(uint32_t*)((char*)eax_2 + 0x6c);
005333c4                          int32_t var_28_1 = edx;
005333c8                          class AC1Legacy::Vector3* edx_1 = *(uint32_t*)((char*)eax_2 + 0x34);
005333cf                          int32_t var_24_1 = *(uint32_t*)((char*)eax_2 + 0x74);
005333d3                          int32_t* var_6c_1 = &var_2c;
005333d8                          class AC1Legacy::Vector3** var_70_1 = &var_58;
005333d9                          var_58 = edx_1;
005333dd                          int32_t eax_4;
005333dd                          eax_4 = LandDefs::adjust_to_outside(((char*)eax_2 + 0x30), edx_1);
005333eb                          int32_t esi_2 = -(eax_4);
005333ef                          esi_4 = ((esi_2 - esi_2) & var_58);
005333f1                          eax_1 = arg1;
005333f4                          break;
005333a8                      }
005333a8                      
005333aa                      edi_1 += 1;
005333aa                      
005333ad                      if (edi_1 >= eax_1)
005333ad                          goto label_5333f9;
005333a2                  }
005333a0              }
005333a0              
005333ff              if (edi_1 != eax_1)
005333ff              {
0053340b                  uint32_t var_6c_2 = esi_4;
0053340c                  class CLandCell* eax_6 = LScape::get_landcell(CObjCell::landscape, added_outside);
0053340c                  
00533417                  if (eax_6 != 0)
00533417                  {
00533421                      int32_t var_34;
00533421                      class Position* var_6c_3 = &var_34;
00533432                      int32_t var_30;
00533432                      
00533432                      if (LandDefs::gid_to_lcoord(esi_4, &var_30, var_6c_3) != 0)
00533432                      {
00533440                          uint32_t eax_11 = ((((uint32_t)esi_4) - 1) >> 3);
0053344b                          int32_t esi_6 = ((esi_4 - 1) & 7);
0053344e                          int32_t edi_2 = 0;
0053344e                          
00533456                          if (arg1 > 0)
00533456                          {
005335e5                              do
005335e5                              {
00533460                                  class CPhysicsPart* ecx_4 = ebx_1[edi_2];
00533460                                  
00533465                                  if (ecx_4 != 0)
00533465                                  {
00533472                                      class Position* var_70_2;
00533472                                      int32_t eax_17;
00533472                                      int32_t ebx_2;
00533472                                      int32_t esi_7;
00533472                                      int16_t top;
00533472                                      int16_t top_10;
00533472                                      
00533472                                      if (CPhysicsPart::Always2D(ecx_4) == 0)
00533472                                      {
0053350e                                          class BBox* eax_18 = CPhysicsPart::GetBoundingBox(ebx_1[edi_2]);
0053351d                                          var_6c_3 = &eax_6->pos;
00533527                                          int32_t var_20;
00533527                                          BBox::LocalToGlobal(&var_20, eax_18, &ebx_1[edi_2]->pos, var_6c_3);
0053352c                                          /* unimplemented  {fld st0, dword [esp+0x48]} */;
00533530                                          /* unimplemented  {fdiv st0, dword [&square_length]} */;
00533539                                          var_70_2 = ((double)/* var_70_2.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
00533539                                          /* unimplemented  {fstp qword [esp], st0} */;
0053353c                                          floor(var_70_2);
00533542                                          int32_t eax_19 = _ftol2();
00533547                                          /* unimplemented  {fld st0, dword [esp+0x54]} */;
0053354b                                          /* unimplemented  {fdiv st0, dword [&square_length]} */;
00533551                                          esi_7 = eax_19;
00533553                                          var_70_2 = ((double)/* var_70_2.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
00533553                                          /* unimplemented  {fstp qword [esp], st0} */;
00533556                                          floor(var_70_2);
0053355c                                          int32_t eax_20 = _ftol2();
00533561                                          /* unimplemented  {fld st0, dword [esp+0x5c]} */;
00533565                                          /* unimplemented  {fdiv st0, dword [&square_length]} */;
0053356b                                          ebx_2 = eax_20;
0053356d                                          var_70_2 = ((double)/* var_70_2.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
0053356d                                          /* unimplemented  {fstp qword [esp], st0} */;
00533570                                          floor(var_70_2);
00533576                                          eax_17 = _ftol2();
0053357b                                          top_10 = (top + 2);
0053357b                                          /* unimplemented  {fld st0, dword [esp+0x60]} */;
00533472                                      }
00533472                                      else
00533472                                      {
00533478                                          void* eax_14 = ebx_1[edi_2];
0053347e                                          void* ecx_6 = **(uint32_t**)((char*)eax_14 + 0x20);
00533480                                          void* edx_2 = *(uint32_t*)((char*)ecx_6 + 0x74);
00533485                                          void* ecx_7;
00533485                                          
00533485                                          if (edx_2 == 0)
0053348b                                              ecx_7 = *(uint32_t*)((char*)ecx_6 + 0x90);
00533485                                          else
00533487                                              ecx_7 = edx_2;
00533487                                          
00533491                                          class AC1Legacy::Vector3* edx_3 = *(uint32_t*)((char*)ecx_7 + 0xc);
00533497                                          var_2c = *(uint32_t*)((char*)eax_14 + 0x6c);
0053349b                                          /* unimplemented  {fld st0, dword [esp+0x3c]} */;
0053349f                                          var_58 = edx_3;
005334a3                                          /* unimplemented  {fsub st0, dword [esp+0x10]} */;
005334ad                                          /* unimplemented  {fdiv st0, dword [&square_length]} */;
005334b3                                          int32_t var_28_2 = *(uint32_t*)((char*)eax_14 + 0x70);
005334b7                                          var_70_2 = ((double)/* var_70_2.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
005334b7                                          /* unimplemented  {fstp qword [esp], st0} */;
005334ba                                          floor(var_70_2, var_6c_3);
005334c0                                          int32_t eax_15 = _ftol2();
005334c5                                          /* unimplemented  {fld st0, dword [esp+0x48]} */;
005334c9                                          /* unimplemented  {fsub st0, dword [esp+0x18]} */;
005334cd                                          esi_7 = eax_15;
005334cf                                          /* unimplemented  {fdiv st0, dword [&square_length]} */;
005334d5                                          var_70_2 = ((double)/* var_70_2.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
005334d5                                          /* unimplemented  {fstp qword [esp], st0} */;
005334d8                                          floor(var_70_2);
005334de                                          int32_t eax_16 = _ftol2();
005334e3                                          /* unimplemented  {fld st0, dword [esp+0x44]} */;
005334e7                                          /* unimplemented  {fadd dword [esp+0x18]} */;
005334eb                                          ebx_2 = eax_16;
005334ed                                          /* unimplemented  {fdiv st0, dword [&square_length]} */;
005334f3                                          var_70_2 = ((double)/* var_70_2.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
005334f3                                          /* unimplemented  {fstp qword [esp], st0} */;
005334f6                                          floor(var_70_2);
005334fc                                          eax_17 = _ftol2();
00533501                                          top_10 = (top + 2);
00533501                                          /* unimplemented  {fld st0, dword [esp+0x48]} */;
00533505                                          /* unimplemented  {fadd dword [esp+0x18]} */;
00533472                                      }
00533472                                      
0053357f                                      /* unimplemented  {fdiv st0, dword [&square_length]} */;
00533589                                      var_70_2 = ((double)/* var_70_2.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
00533589                                      /* unimplemented  {fstp qword [esp], st0} */;
0053358c                                      floor(var_70_2, var_6c_3);
00533595                                      int32_t eax_21 = _ftol2();
00533595                                      top = (top_10 + 2);
005335a2                                      int32_t esi_8 = (esi_7 - eax_11);
005335a2                                      
005335a6                                      if (esi_8 < var_48_1)
005335a8                                          var_48_1 = esi_8;
005335a8                                      
005335b4                                      int32_t ebx_3 = (ebx_2 - esi_6);
005335b4                                      
005335b8                                      if (ebx_3 < var_4c_1)
005335ba                                          var_4c_1 = ebx_3;
005335ba                                      
005335c2                                      int32_t ecx_16 = (eax_17 - eax_11);
005335c2                                      
005335c8                                      if (ecx_16 > var_50_1)
005335ca                                          var_50_1 = ecx_16;
005335ca                                      
005335d2                                      ebx_1 = arg2;
005335d5                                      int32_t eax_22 = (eax_21 - esi_6);
005335d5                                      
005335d9                                      if (eax_22 > var_54_1)
005335db                                          var_54_1 = eax_22;
00533465                                  }
00533465                                  
005335e2                                  edi_2 += 1;
005335e5                              } while (edi_2 < arg1);
00533456                          }
00533456                          
005335f3                          int32_t eax_25 = var_34;
005335fa                          int32_t ecx_19 = var_30;
00533614                          CLandCell::add_cell_block((ecx_19 + var_48_1), (eax_25 + var_4c_1), (var_50_1 + ecx_19), (eax_25 + var_54_1), arg3);
00533432                      }
00533417                  }
005333ff              }
00533386          }
00533375      }
00533360  }

00533623           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00533630  void CLandCell::add_all_outside_cells(class Position const* arg1, uint32_t const arg2, class CSphere const* arg3, class CELLARRAY* arg4)

00533630  {
00533642      if (arg4->added_outside == 0)
00533642      {
00533648          uint32_t const edi_1 = arg2;
0053364d          arg4->added_outside = 1;
00533653          int32_t var_38;
00533653          int32_t var_34;
00533653          uint32_t var_28;
00533653          float x;
00533653          
00533653          if (edi_1 <= 0)
00533653          {
0053378e              uint32_t* eax_11 = arg1;
00533794              int32_t edx_2 = eax_11[0x10];
00533797              x = eax_11[0xf];
0053379e              int32_t var_10_1 = edx_2;
005337a2              uint32_t edx_3 = eax_11[1];
005337a9              int32_t var_c_1 = eax_11[0x11];
005337ad              float* var_4c_3 = &x;
005337b2              uint32_t* var_50_3 = &var_28;
005337b3              var_28 = edx_3;
005337b3              
005337c1              if ((LandDefs::adjust_to_outside(eax_11, edx_3) != 0 && LandDefs::gid_to_lcoord(var_28, &var_34, &var_38) != 0))
005337e9                  CLandCell::add_outside_cell(arg4, var_34, var_38);
00533653          }
00533653          else
00533653          {
0053365c              var_28 = 0;
00533664              float* esi_2 = &arg3->center.z;
00533664              
0053366a              while (true)
0053366a              {
0053366a                  float z = ADJ(esi_2)->center.z;
0053366c                  float y = ADJ(esi_2)->center.y;
0053366f                  x = ADJ(esi_2)->center.x;
00533673                  uint32_t* eax_2 = arg1;
00533676                  float z_1 = z;
0053367a                  float y_1 = y;
0053368a                  uint32_t var_30;
0053368a                  int32_t* var_50_1 = &var_30;
0053368b                  var_30 = eax_2[1];
0053368b                  
00533699                  if (LandDefs::adjust_to_outside(eax_2, z) == 0)
00533699                      break;
00533699                  
005336a3                  float var_1c;
005336a3                  Vector3::Vector3(&var_1c);
005336a8                  /* unimplemented  {fld st0, dword [esp+0x34]} */;
005336ac                  /* unimplemented  {fdiv st0, dword [&square_length]} */;
005336b5                  var_50_1 = ((double)/* var_50_1.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
005336b5                  /* unimplemented  {fstp qword [esp], st0} */;
005336b8                  floor(var_50_1, &x);
005336be                  int32_t eax_4 = _ftol2();
005336c3                  /* unimplemented  {fld st0, dword [esp+0x40]} */;
005336c7                  /* unimplemented  {fdiv st0, dword [&square_length]} */;
005336cd                  int32_t var_24_1 = eax_4;
005336d1                  var_50_1 = ((double)/* var_50_1.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
005336d1                  /* unimplemented  {fstp qword [esp], st0} */;
005336d4                  floor(var_50_1);
005336da                  int32_t eax_5 = _ftol2();
005336df                  /* unimplemented  {fild st0, dword [esp+0x2c]} */;
005336e3                  float radius = ADJ(esi_2)->radius;
005336e6                  int32_t var_20_1 = eax_5;
005336ea                  /* unimplemented  {fmul st0, dword [&square_length]} */;
005336f4                  uint32_t ecx_3 = var_30;
005336fc                  /* unimplemented  {fsubr st0, dword [esp+0x3c]} */;
00533706                  var_1c = ((float)/* var_1c = fconvert.s(unimplemented  {fstp dword [esp+0x3c], st0}) */);
00533706                  /* unimplemented  {fstp dword [esp+0x3c], st0} */;
0053370b                  /* unimplemented  {fild st0, dword [esp+0x3c]} */;
0053370f                  /* unimplemented  {fmul st0, dword [&square_length]} */;
00533715                  /* unimplemented  {fsubr st0, dword [esp+0x4c]} */;
00533719                  float var_18_1 = ((float)/* float var_18_1 = fconvert.s(unimplemented  {fstp dword [esp+0x44], st0}) */);
00533719                  /* unimplemented  {fstp dword [esp+0x44], st0} */;
0053371d                  /* unimplemented  {fld st0, dword [&square_length]} */;
00533723                  /* unimplemented  {fsub st0, dword [esp+0x30]} */;
00533727                  float var_20_2 = ((float)/* float var_20_2 = fconvert.s(unimplemented  {fstp dword [esp+0x3c], st0}) */);
00533727                  /* unimplemented  {fstp dword [esp+0x3c], st0} */;
00533727                  int16_t top = (top + 2);
00533727                  
00533735                  if (LandDefs::gid_to_lcoord(ecx_3, &var_34, &var_38) != 0)
00533735                  {
00533737                      int32_t edi_2 = var_38;
0053373b                      int32_t ebx_1 = var_34;
00533745                      CLandCell::add_outside_cell(arg4, ebx_1, edi_2);
0053375f                      CLandCell::check_add_cell_boundary(arg4, &var_1c, ebx_1, edi_2, var_20_2, radius);
00533764                      edi_1 = arg2;
00533735                  }
00533735                  
0053376e                  IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&var_1c);
00533778                  esi_2 = &esi_2[4];
0053377b                  bool cond:2_1 = (var_28 + 1) < edi_1;
0053377d                  var_28 += 1;
0053377d                  
00533781                  if (!(cond:2_1))
0053378d                      return;
0053366a              }
00533653          }
00533642      }
00533630  }

005337f8                                                                          90 90 90 90 90 90 90 90                          ........

00533800  void __thiscall CLandCell::find_transit_cells(class CLandCell const* this, class Position const* arg2, uint32_t const arg3, class CSphere const* arg4, class CELLARRAY* arg5, class SPHEREPATH* arg6)

00533800  {
0053381a      CLandCell::add_all_outside_cells(arg2, arg3, arg4, arg5);
00533831      CSortCell::find_transit_cells(this, arg2, arg3, arg4, arg5, arg6);
00533800  }

0053383d                                                                                         90 90 90                               ...

00533840  void __thiscall CLandCell::find_transit_cells(class CLandCell const* this, uint32_t const arg2, class CPhysicsPart** arg3, class CELLARRAY* arg4)

00533840  {
00533855      CLandCell::add_all_outside_cells(arg2, arg3, arg4);
00533862      CSortCell::find_transit_cells(this, arg2, arg3, arg4);
00533840  }

0053386e                                            90 90                                                                ..

00533870  void __fastcall CCellStruct::CCellStruct(class CCellStruct* this)

00533870  {
00533879      this->cellstruct_id = 0;
0053387b      CVertexArray::CVertexArray(&this->vertex_array);
00533880      __builtin_memset(&this->num_portals, 0, 0x2c);
00533870  }

005338a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005338b0  class CPolygon* __thiscall CCellStruct::get_portal(class CCellStruct* this, uint16_t arg2)

005338b0  {
005338b0      uint32_t num_portals = this->num_portals;
005338b5      int32_t eax = 0;
005338b5      
005338ba      if (num_portals > 0)
005338ba      {
005338bc          class CPolygon** portals = this->portals;
005338c4          class CPolygon** portals_1 = portals;
005338c4          
005338d6          do
005338d6          {
005338ce              if (((int32_t)*(uint32_t*)portals_1->poly_id) == ((uint32_t)arg2))
005338e6                  return portals[eax];
005338e6              
005338d0              eax += 1;
005338d1              portals_1 = &portals_1[1];
005338d6          } while (eax < num_portals);
005338ba      }
005338ba      
005338dd      return 0;
005338b0  }

005338e9                             90 90 90 90 90 90 90                                                           .......

005338f0  int32_t __thiscall CCellStruct::point_in_cell(class CCellStruct const* this, class AC1Legacy::Vector3 const* arg2)

005338f0  {
005338f3      /* tailcall */
005338f3      return BSPTREE::point_inside_cell_bsp(this->cell_bsp, arg2);
005338f0  }

005338f8                                                                          90 90 90 90 90 90 90 90                          ........

00533900  enum BoundingType __thiscall CCellStruct::sphere_intersects_cell(class CCellStruct const* this, class CSphere const* arg2)

00533900  {
00533903      /* tailcall */
00533903      return BSPTREE::sphere_intersects_cell_bsp(this->cell_bsp, arg2);
00533900  }

00533908                          90 90 90 90 90 90 90 90                                                          ........

00533910  int32_t __thiscall CCellStruct::box_intersects_cell(class CCellStruct const* this, class BBox const* arg2)

00533910  {
00533913      /* tailcall */
00533913      return BSPTREE::box_intersects_cell_bsp(this->cell_bsp, arg2);
00533910  }

00533918                                                                          90 90 90 90 90 90 90 90                          ........

00533920  uint32_t __fastcall CCellStruct::pack_size(class CCellStruct* this)

00533920  {
00533920      class CCellStruct* this_1 = this;
00533926      int32_t ebp = 0;
0053392c      this_1 = nullptr;
0053393a      int32_t edi_1 = (CVertexArray::pack_size(&this->vertex_array) + 0x10);
0053393d      int32_t i = 0;
0053393d      
00533941      if (this->num_polygons > 0)
00533941      {
0053395f          do
0053395f          {
00533954              edi_1 += CPolygon::Pack((this->polygons + ebp), &this_1, 0);
00533959              i += 1;
0053395a              ebp += 0x30;
0053395f          } while (i < this->num_polygons);
00533941      }
00533941      
00533964      int32_t edi_2 = (edi_1 + (this->num_portals << 1));
00533969      int32_t eax_5 = (edi_2 & 3);
0053396c      int32_t ebx;
0053396c      
0053396c      if (eax_5 == 0)
00533977          ebx = 0;
0053396c      else
00533973          ebx = (4 - eax_5);
00533973      
0053397f      BSPNODE::pack_tree_type = CELL_BSP;
00533994      int32_t edi_3 = (edi_2 + (BSPTREE::Pack(this->cell_bsp, &this_1, 0) + ebx));
00533999      int32_t i_1 = 0;
00533999      
0053399d      if (this->num_physics_polygons > 0)
0053399d      {
0053399f          int32_t ebp_1 = 0;
0053399f          
005339bd          do
005339bd          {
005339b2              edi_3 += CPolygon::Pack((this->physics_polygons + ebp_1), &this_1, 0);
005339b7              i_1 += 1;
005339b8              ebp_1 += 0x30;
005339bd          } while (i_1 < this->num_physics_polygons);
0053399d      }
0053399d      
005339c5      BSPNODE::pack_tree_type = PHYSICS_BSP;
005339d8      int32_t result = ((edi_3 + BSPTREE::Pack(this->physics_bsp, &this_1, 0)) + 4);
005339d8      
005339e1      if (this->drawing_bsp != 0)
005339e1      {
005339e9          BSPNODE::pack_tree_type = DRAWING_BSP;
005339fc          result += BSPTREE::Pack(this->drawing_bsp, &this_1, 0);
005339e1      }
005339e1      
00533a00      int32_t ecx_10 = (result & 3);
00533a00      
00533a03      if (ecx_10 == 0)
00533a1d          return result;
00533a1d      
00533a13      return ((4 - ecx_10) + result);
00533920  }

00533a1e                                                                                            90 90                                ..

00533a20  uint32_t __thiscall CCellStruct::Pack(class CCellStruct* this, void** arg2, uint32_t arg3)

00533a20  {
00533a20      class CCellStruct* this_1 = this;
00533a25      uint32_t result = CCellStruct::pack_size(this);
00533a2a      uint32_t ebx = arg3;
00533a2a      
00533a34      if (ebx < result)
00533bc6          return result;
00533bc6      
00533a3e      uint32_t** esi_1 = arg2;
00533a44      **(uint32_t**)esi_1 = this->cellstruct_id;
00533a48      void* edx_2 = &*(uint32_t*)esi_1[1];
00533a4b      *(uint32_t*)esi_1 = edx_2;
00533a52      *(uint32_t*)edx_2 = this->num_polygons;
00533a56      void* ecx_2 = &*(uint32_t*)esi_1[1];
00533a59      *(uint32_t*)esi_1 = ecx_2;
00533a60      *(uint32_t*)ecx_2 = this->num_physics_polygons;
00533a64      void* eax_4 = &*(uint32_t*)esi_1[1];
00533a67      *(uint32_t*)esi_1 = eax_4;
00533a6c      *(uint32_t*)eax_4 = this->num_portals;
00533a78      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
00533a7a      CVertexArray::Pack(&this->vertex_array, esi_1, ebx);
00533a82      int32_t i = 0;
00533a82      
00533a86      if (this->num_polygons > 0)
00533a86      {
00533a88          arg3 = 0;
00533a88          
00533ab1          do
00533ab1          {
00533a9b              CPolygon::Pack((this->polygons + arg3), esi_1, ebx);
00533aa7              i += 1;
00533aad              arg3 += 0x30;
00533ab1          } while (i < this->num_polygons);
00533a86      }
00533a86      
00533ab6      int32_t i_1 = 0;
00533ab6      
00533aba      if (this->num_portals > 0)
00533aba      {
00533ad8          do
00533ad8          {
00533ac8              void* edx_5;
00533ac8              edx_5 = this->portals[i_1]->poly_id;
00533acc              **(uint16_t**)esi_1 = edx_5;
00533acf              *(uint32_t*)esi_1 += 2;
00533ad5              i_1 += 1;
00533ad8          } while (i_1 < this->num_portals);
00533aba      }
00533aba      
00533adc      void* ecx_14 = (*(uint32_t*)esi_1 & 0x80000003);
00533adc      bool cond:2_1 = ecx_14 == 0;
00533adc      
00533ae2      if (ecx_14 < 0)
00533ae2      {
00533ae5          void* ecx_16 = (((char*)ecx_14 - 1) | 0xfffffffc);
00533ae8          ecx_14 = ((char*)ecx_16 + 1);
00533ae8          cond:2_1 = ecx_16 == 0xffffffff;
00533ae2      }
00533ae2      
00533ae9      if (!(cond:2_1))
00533ae9      {
00533af0          void* i_5 = (4 - ecx_14);
00533af0          
00533af2          if (4 != ecx_14)
00533af2          {
00533aff              void* i_2;
00533aff              
00533aff              do
00533aff              {
00533af6                  **(uint8_t**)esi_1 = 0;
00533afc                  i_2 = i_5;
00533afc                  i_5 -= 1;
00533afd                  *(uint32_t*)esi_1 += 1;
00533aff              } while (i_2 != 1);
00533af2          }
00533ae9      }
00533ae9      
00533b02      BSPNODE::pack_tree_type = CELL_BSP;
00533b10      BSPTREE::Pack(this->cell_bsp, esi_1, ebx);
00533b18      int32_t i_3 = 0;
00533b18      
00533b1c      if (this->num_physics_polygons > 0)
00533b1c      {
00533b1e          arg3 = 0;
00533b1e          
00533b43          do
00533b43          {
00533b2d              CPolygon::Pack((this->physics_polygons + arg3), esi_1, ebx);
00533b39              i_3 += 1;
00533b3f              arg3 += 0x30;
00533b43          } while (i_3 < this->num_physics_polygons);
00533b1c      }
00533b1c      
00533b46      BSPNODE::pack_tree_type = PHYSICS_BSP;
00533b54      BSPTREE::Pack(this->physics_bsp, esi_1, ebx);
00533b54      
00533b5e      if (this->drawing_bsp == 0)
00533b5e      {
00533b87          **(uint32_t**)esi_1 = 0;
00533b8d          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
00533b5e      }
00533b5e      else
00533b5e      {
00533b60          BSPNODE::pack_tree_type = DRAWING_BSP;
00533b6c          **(uint32_t**)esi_1 = 1;
00533b78          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
00533b7e          BSPTREE::Pack(this->drawing_bsp, esi_1, ebx);
00533b5e      }
00533b5e      
00533b92      void* ecx_26 = (*(uint32_t*)esi_1 & 0x80000003);
00533b92      bool cond:5_1 = ecx_26 == 0;
00533b92      
00533b98      if (ecx_26 < 0)
00533b98      {
00533b9b          void* ecx_28 = (((char*)ecx_26 - 1) | 0xfffffffc);
00533b9e          ecx_26 = ((char*)ecx_28 + 1);
00533b9e          cond:5_1 = ecx_28 == 0xffffffff;
00533b98      }
00533b98      
00533b9f      if (!(cond:5_1))
00533b9f      {
00533ba6          void* i_6 = (4 - ecx_26);
00533ba6          
00533ba8          if (4 != ecx_26)
00533ba8          {
00533bbb              void* i_4;
00533bbb              
00533bbb              do
00533bbb              {
00533bb2                  **(uint8_t**)esi_1 = 0;
00533bb8                  i_4 = i_6;
00533bb8                  i_6 -= 1;
00533bb9                  *(uint32_t*)esi_1 += 1;
00533bbb              } while (i_4 != 1);
00533ba8          }
00533b9f      }
00533b9f      
00533bbd      return result;
00533a20  }

00533bc9                             90 90 90 90 90 90 90                                                           .......

00533bd0  void __fastcall CCellStruct::Destroy(class CCellStruct* this)

00533bd0  {
00533bd6      class BSPTREE* cell_bsp = this->cell_bsp;
00533bd6      
00533bdd      if (cell_bsp != 0)
00533bdd      {
00533be1          BSPTREE::~BSPTREE(cell_bsp);
00533be7          operator delete(cell_bsp);
00533bef          this->cell_bsp = nullptr;
00533bdd      }
00533bdd      
00533bf2      class CPolygon** portals = this->portals;
00533bf2      
00533bf7      if (portals != 0)
00533bf7      {
00533bfa          operator delete[](portals);
00533c02          this->portals = nullptr;
00533bf7      }
00533bf7      
00533c05      class BSPTREE* physics_bsp = this->physics_bsp;
00533c0a      this->num_portals = 0;
00533c0a      
00533c0d      if (physics_bsp != 0)
00533c0d      {
00533c11          BSPTREE::~BSPTREE(physics_bsp);
00533c17          operator delete(physics_bsp);
00533c1f          this->physics_bsp = nullptr;
00533c0d      }
00533c0d      
00533c22      class CPolygon* physics_polygons = this->physics_polygons;
00533c22      
00533c27      if (physics_polygons != 0)
00533c27      {
00533c29          int32_t vertices = physics_polygons->vertices;
00533c35          void* edi_2 = &physics_polygons[vertices];
00533c35          
00533c38          if ((vertices - 1) >= 0)
00533c38          {
00533c3a              int32_t ebx_1 = vertices;
00533c4b              int32_t i;
00533c4b              
00533c4b              do
00533c4b              {
00533c40                  edi_2 -= 0x30;
00533c45                  CPolygon::Destroy(edi_2);
00533c4a                  i = ebx_1;
00533c4a                  ebx_1 -= 1;
00533c4b              } while (i != 1);
00533c38          }
00533c38          
00533c50          operator delete[](((char*)physics_polygons - 4));
00533c58          this->physics_polygons = nullptr;
00533c27      }
00533c27      
00533c5b      class BSPTREE* drawing_bsp = this->drawing_bsp;
00533c60      this->num_physics_polygons = 0;
00533c60      
00533c63      if (drawing_bsp != 0)
00533c63      {
00533c67          BSPTREE::~BSPTREE(drawing_bsp);
00533c6d          operator delete(drawing_bsp);
00533c75          this->drawing_bsp = nullptr;
00533c63      }
00533c63      
00533c78      class CPolygon* polygons = this->polygons;
00533c78      
00533c7d      if (polygons != 0)
00533c7d      {
00533c7f          int32_t vertices_1 = polygons->vertices;
00533c8b          void* edi_5 = &polygons[vertices_1];
00533c8b          
00533c8e          if ((vertices_1 - 1) >= 0)
00533c8e          {
00533c90              int32_t ebx_2 = vertices_1;
00533c9e              int32_t i_1;
00533c9e              
00533c9e              do
00533c9e              {
00533c93                  edi_5 -= 0x30;
00533c98                  CPolygon::Destroy(edi_5);
00533c9d                  i_1 = ebx_2;
00533c9d                  ebx_2 -= 1;
00533c9e              } while (i_1 != 1);
00533c8e          }
00533c8e          
00533ca1          operator delete[](((char*)polygons - 4));
00533ca9          this->polygons = nullptr;
00533c7d      }
00533c7d      
00533cb2      class CSurfaceTriStrips* surface_strips = this->surface_strips;
00533cb7      this->num_polygons = 0;
00533cb7      
00533cba      if (surface_strips != 0)
00533cba      {
00533cbc          int32_t surface_index = surface_strips->surface_index;
00533cbc          
00533cc9          if ((surface_index - 1) >= 0)
00533cc9          {
00533ccb              int32_t ebx_3 = surface_index;
00533cce              void* edi_7 = &surface_strips[surface_index];
00533cdb              int32_t i_2;
00533cdb              
00533cdb              do
00533cdb              {
00533cd0                  edi_7 -= 0xc;
00533cd5                  CSurfaceTriStrips::~CSurfaceTriStrips(edi_7);
00533cda                  i_2 = ebx_3;
00533cda                  ebx_3 -= 1;
00533cdb              } while (i_2 != 1);
00533cc9          }
00533cc9          
00533ce0          operator delete[](&surface_strips[0]);
00533ce8          this->surface_strips = nullptr;
00533cba      }
00533cba      
00533cec      this->num_surface_strips = 0;
00533cf5      /* tailcall */
00533cf5      return CVertexArray::DestroyVertex(&this->vertex_array);
00533bd0  }

00533cfa                                                                                90 90 90 90 90 90                            ......

00533d00  int32_t __thiscall CCellStruct::UnPack(class CCellStruct* this, void** arg2, uint32_t arg3)

00533d00  {
00533d05      CCellStruct::Destroy(this);
00533d12      this->cellstruct_id = **(uint32_t**)arg2;
00533d16      void* ebx_1 = (*(uint32_t*)arg2 + 4);
00533d19      *(uint32_t*)arg2 = ebx_1;
00533d1f      this->num_polygons = *(uint32_t*)ebx_1;
00533d24      void* edx_2 = (*(uint32_t*)arg2 + 4);
00533d27      *(uint32_t*)arg2 = edx_2;
00533d31      this->num_physics_polygons = *(uint32_t*)edx_2;
00533d36      void* ecx_2 = (*(uint32_t*)arg2 + 4);
00533d39      *(uint32_t*)arg2 = ecx_2;
00533d3f      this->num_portals = *(uint32_t*)ecx_2;
00533d4e      *(uint32_t*)arg2 += 4;
00533d50      int32_t result = CVertexArray::UnPack(&this->vertex_array, arg2, arg3);
00533d50      
00533d57      if (result == 0)
00533d5c          return result;
00533d5c      
00533d5f      CPolygon::pack_verts = &this->vertex_array;
00533d65      uint32_t num_polygons = this->num_polygons;
00533d73      uint32_t* eax_10 = operator new[](((num_polygons * 0x30) + 4));
00533d7d      void* ebp;
00533d7d      
00533d7d      if (eax_10 == 0)
00533d94          ebp = nullptr;
00533d7d      else
00533d7d      {
00533d85          ebp = &eax_10[1];
00533d8b          *(uint32_t*)eax_10 = num_polygons;
00533d8d          `vector constructor iterator'(ebp, 0x30, num_polygons, CPolygon::CPolygon);
00533d7d      }
00533d7d      
00533d99      int32_t i = 0;
00533d9b      bool cond:0 = this->num_polygons <= 0;
00533d9d      this->polygons = ebp;
00533d9d      
00533da0      if (!(cond:0))
00533da0      {
00533da2          int32_t ebp_1 = 0;
00533da2          
00533dbd          do
00533dbd          {
00533daf              CPolygon::UnPack((this->polygons + ebp_1), arg2, arg3);
00533db7              i += 1;
00533db8              ebp_1 += 0x30;
00533dbd          } while (i < this->num_polygons);
00533da0      }
00533da0      
00533dc6      void* eax_13;
00533dc6      class CPolygon** edx_6;
00533dc6      eax_13 = operator new[]((this->num_portals << 2));
00533dcb      uint32_t num_portals = this->num_portals;
00533dce      this->portals = eax_13;
00533dd4      int32_t i_1 = 0;
00533dd4      
00533dd8      if (num_portals > 0)
00533dd8      {
00533e04          do
00533e04          {
00533de0              void* ecx_8 = *(uint32_t*)arg2;
00533de2              edx_6 = *(uint16_t*)ecx_8;
00533de8              *(uint32_t*)arg2 = ((char*)ecx_8 + 2);
00533df0              this->portals[i_1] = &this->polygons[((uint32_t)edx_6)];
00533e01              i_1 += 1;
00533e04          } while (i_1 < this->num_portals);
00533dd8      }
00533dd8      
00533e08      void* ecx_16 = (*(uint32_t*)arg2 & 0x80000003);
00533e08      bool cond:1 = ecx_16 == 0;
00533e08      
00533e0e      if (ecx_16 < 0)
00533e0e      {
00533e11          void* ecx_18 = (((char*)ecx_16 - 1) | 0xfffffffc);
00533e14          ecx_16 = ((char*)ecx_18 + 1);
00533e14          cond:1 = ecx_18 == 0xffffffff;
00533e0e      }
00533e0e      
00533e15      if (!(cond:1))
00533e15      {
00533e1c          void* i_6 = (4 - ecx_16);
00533e1c          
00533e1e          if (4 != ecx_16)
00533e1e          {
00533e2b              void* i_2;
00533e2b              
00533e2b              do
00533e2b              {
00533e22                  **(uint8_t**)arg2 = 0;
00533e28                  i_2 = i_6;
00533e28                  i_6 -= 1;
00533e29                  *(uint32_t*)arg2 += 1;
00533e2b              } while (i_2 != 1);
00533e1e          }
00533e15      }
00533e15      
00533e32      BSPNODE::pack_poly = this->polygons;
00533e38      BSPNODE::pack_tree_type = CELL_BSP;
00533e42      void* eax_14 = operator new(4);
00533e4c      class BSPTREE* eax_15;
00533e4c      
00533e4c      if (eax_14 == 0)
00533e57          eax_15 = nullptr;
00533e4c      else
00533e50          eax_15 = AvailableProperty::AvailableProperty(eax_14);
00533e50      
00533e61      this->cell_bsp = eax_15;
00533e64      BSPTREE::UnPack(eax_15, arg2, arg3);
00533e69      uint32_t num_physics_polygons = this->num_physics_polygons;
00533e76      void* eax_16 = operator new[](((num_physics_polygons * 0x30) + 4));
00533e80      void* eax_17;
00533e80      
00533e80      if (eax_16 == 0)
00533ea7          eax_17 = nullptr;
00533e80      else
00533e80      {
00533e82          eax_17 = ((char*)eax_16 + 4);
00533e85          *(uint32_t*)((char*)eax_17 - 4) = num_physics_polygons;
00533e8f          void* ebp_2 = eax_17;
00533e8f          
00533e91          if ((num_physics_polygons - 1) >= 0)
00533e91          {
00533e93              int32_t ebx_6 = num_physics_polygons;
00533e9f              int32_t i_3;
00533e9f              
00533e9f              do
00533e9f              {
00533e96                  CPolygon::CPolygon(ebp_2);
00533e9b                  ebp_2 += 0x30;
00533e9e                  i_3 = ebx_6;
00533e9e                  ebx_6 -= 1;
00533e9f              } while (i_3 != 1);
00533e91          }
00533e80      }
00533e80      
00533ea9      this->physics_polygons = eax_17;
00533eaf      int32_t i_4 = 0;
00533eaf      
00533eb3      if (this->num_physics_polygons > 0)
00533eb3      {
00533eb5          int32_t ebp_3 = 0;
00533eb5          
00533ed0          do
00533ed0          {
00533ec2              CPolygon::UnPack((this->physics_polygons + ebp_3), arg2, arg3);
00533eca              i_4 += 1;
00533ecb              ebp_3 += 0x30;
00533ed0          } while (i_4 < this->num_physics_polygons);
00533eb3      }
00533eb3      
00533ed7      BSPNODE::pack_poly = this->physics_polygons;
00533edd      BSPNODE::pack_tree_type = PHYSICS_BSP;
00533ee7      void* eax_21 = operator new(4);
00533ef2      class BSPTREE* eax_22;
00533ef2      
00533ef2      if (eax_21 == 0)
00533efd          eax_22 = nullptr;
00533ef2      else
00533ef6          eax_22 = AvailableProperty::AvailableProperty(eax_21);
00533ef6      
00533f07      this->physics_bsp = eax_22;
00533f0a      BSPTREE::UnPack(eax_22, arg2, arg3);
00533f12      BSPNODE::pack_poly = this->polygons;
00533f18      void* eax_23 = *(uint32_t*)arg2;
00533f1f      bool cond:5 = *(uint32_t*)eax_23 == 0;
00533f21      *(uint32_t*)arg2 = ((char*)eax_23 + 4);
00533f21      
00533f23      if (!(cond:5))
00533f23      {
00533f27          BSPNODE::pack_tree_type = DRAWING_BSP;
00533f31          void* eax_25 = operator new(4);
00533f3b          class BSPTREE* eax_26;
00533f3b          
00533f3b          if (eax_25 == 0)
00533f46              eax_26 = nullptr;
00533f3b          else
00533f3f              eax_26 = AvailableProperty::AvailableProperty(eax_25);
00533f3f          
00533f4c          this->drawing_bsp = eax_26;
00533f4f          BSPTREE::UnPack(eax_26, arg2, arg3);
00533f23      }
00533f23      
00533f56      void* ecx_33 = (*(uint32_t*)arg2 & 0x80000003);
00533f56      bool cond:6 = ecx_33 == 0;
00533f56      
00533f5c      if (ecx_33 < 0)
00533f5c      {
00533f5f          void* ecx_35 = (((char*)ecx_33 - 1) | 0xfffffffc);
00533f62          ecx_33 = ((char*)ecx_35 + 1);
00533f62          cond:6 = ecx_35 == 0xffffffff;
00533f5c      }
00533f5c      
00533f63      if (!(cond:6))
00533f63      {
00533f6a          void* i_7 = (4 - ecx_33);
00533f6a          
00533f6c          if (4 != ecx_33)
00533f6c          {
00533f7b              void* i_5;
00533f7b              
00533f7b              do
00533f7b              {
00533f72                  **(uint8_t**)arg2 = 0;
00533f78                  i_5 = i_7;
00533f78                  i_7 -= 1;
00533f79                  *(uint32_t*)arg2 += 1;
00533f7b              } while (i_5 != 1);
00533f6c          }
00533f63      }
00533f63      
00533f85      return 1;
00533d00  }

00533f88                          90 90 90 90 90 90 90 90                                                          ........

00533f90  void __fastcall CCellStruct::~CCellStruct(class CCellStruct* this)

00533f90  {
00533f93      CCellStruct::Destroy(this);
00533f9c      /* tailcall */
00533f9c      return IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&this->vertex_array);
00533f90  }

00533fa1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00533fb0  void __fastcall CSortCell::CSortCell(class CSortCell* this)

00533fb0  {
00533fb3      CObjCell::CObjCell(this);
00533fb8      this->vtable = 0x7c9508;
00533fbe      this->vtable = &CSortCell::`vftable'.QueryInterface;
00533fc5      this->vtable = &CSortCell::`vftable';
00533fcc      this->building = nullptr;
00533fb0  }

00533fda                                                                                90 90 90 90 90 90                            ......

00533fe0  void __fastcall CSortCell::~CSortCell(class CSortCell* this)

00533fe0  {
00533fe0      this->vtable = 0x7c9508;
00533fe6      this->vtable = &CSortCell::`vftable'.QueryInterface;
00533fed      this->vtable = &CSortCell::`vftable';
00533ff4      /* tailcall */
00533ff4      return CObjCell::~CObjCell(this);
00533fe0  }

00533ff9                                                                             90 90 90 90 90 90 90                           .......

00534000  int32_t __fastcall CSortCell::has_building(class CSortCell const* this)

00534000  {
0053400a      int32_t result;
0053400a      result = this->building != 0;
0053400d      return result;
00534000  }

0053400e                                            90 90                                                                ..

00534010  void __thiscall CSortCell::add_part(class CSortCell* this, class CPhysicsPart* arg2, class ClipPlaneList** arg3, class Frame* arg4, uint32_t arg5)

00534010  {
00534010      /* tailcall */
00534010      return CPartCell::add_part(this, arg2, arg3, arg4, arg5);
00534010  }

00534015                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00534020  void __thiscall CSortCell::remove_part(class CSortCell* this, class CPhysicsPart* arg2)

00534020  {
00534020      /* tailcall */
00534020      return CPartCell::remove_part(this, arg2);
00534020  }

00534025                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00534030  void __thiscall CSortCell::add_building(class CSortCell* this, class CBuildingObj* arg2)

00534030  {
00534038      if (this->building == 0)
0053403e          this->building = arg2;
00534030  }

00534047                       90 90 90 90 90 90 90 90 90                                                         .........

00534050  void __fastcall CSortCell::remove_building(class CSortCell* this, class CBuildingObj* arg2)

00534050  {
00534050      this->building = nullptr;
00534050  }

0053405d                                                                                         90 90 90                               ...

00534060  void __thiscall CSortCell::find_transit_cells(class CSortCell const* this, class Position const* arg2, uint32_t const arg3, class CSphere const* arg4, class CELLARRAY* arg5, class SPHEREPATH* arg6)

00534060  {
00534060      class CBuildingObj* building = this->building;
00534060      
00534068      if (building == 0)
0053406f          return;
0053406f      
0053406a      /* tailcall */
0053406a      return CBuildingObj::find_building_transit_cells(building, arg2, arg3, arg4, arg5, arg6);
00534060  }

00534072                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00534080  void __thiscall CSortCell::find_transit_cells(class CSortCell const* this, uint32_t const arg2, class CPhysicsPart** arg3, class CELLARRAY* arg4)

00534080  {
00534080      class CBuildingObj* building = this->building;
00534080      
00534088      if (building == 0)
0053408f          return;
0053408f      
0053408a      /* tailcall */
0053408a      return CBuildingObj::find_building_transit_cells(building, arg2, arg3, arg4);
00534080  }

00534092                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005340a0  enum TransitionState __thiscall CSortCell::find_collisions(class CSortCell const* this, class CTransition* arg2)

005340a0  {
005340a0      class CBuildingObj* building = this->building;
005340a0      
005340a8      if (building == 0)
005340b4          return 1;
005340b4      
005340aa      /* tailcall */
005340aa      return CBuildingObj::find_building_collisions(building, arg2);
005340a0  }

005340b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005340c0  class CPhysicsObj* __thiscall CSortCell::get_object(class CSortCell const* this, uint32_t const arg2)

005340c0  {
005340c9      class CPhysicsObj* result = CObjCell::get_object(this, arg2);
005340c9      
005340d0      if (result != 0)
005340e9          return result;
005340e9      
005340d2      class CBuildingObj* building = this->building;
005340d2      
005340da      if (building != 0)
005340e2          return CBuildingObj::get_object(building, arg2);
005340e2      
005340de      return result;
005340c0  }

005340ec                                      90 90 90 90                                                              ....

005340f0  void* __thiscall CSortCell::`vector deleting destructor'(class CSortCell* this, uint32_t arg2)

005340f0  {
005340f3      /* tailcall */
005340f3      return CSortCell::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005340f0  }

005340f8                                                                          cc cc cc cc cc cc cc cc                          ........

00534100  void* __thiscall CSortCell::`vector deleting destructor'(class CSortCell* this, uint32_t arg2)

00534100  {
00534103      /* tailcall */
00534103      return CSortCell::`scalar deleting destructor'(((char*)this - 0x38), arg2);
00534100  }

00534108                          cc cc cc cc cc cc cc cc                                                          ........

00534110  void* __thiscall CSortCell::`scalar deleting destructor'(class CSortCell* this, uint32_t arg2)

00534110  {
00534113      this->vtable = 0x7c9508;
00534119      this->vtable = &CSortCell::`vftable'.QueryInterface;
00534120      this->vtable = &CSortCell::`vftable';
00534127      CObjCell::~CObjCell(this);
00534127      
00534131      if ((arg2 & 1) != 0)
00534134          operator delete(this);
00534134      
0053413f      return this;
00534110  }

00534142        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00534150  void __thiscall BBox::AdjustBBox(class BBox* this, class Vector3 const* arg2)

00534150  {
00534154      long double x87_r7 = ((long double)arg2->x);
00534156      long double temp1 = ((long double)this->m_vMin.x);
00534156      (x87_r7 - temp1);
00534158      float eax;
00534158      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0053415a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0053415a      
0053415d      if (!(p))
00534161          this->m_vMin.x = arg2->x;
00534161      
00534163      long double x87_r7_1 = ((long double)arg2->y);
00534166      long double temp2 = ((long double)this->m_vMin.y);
00534166      (x87_r7_1 - temp2);
00534169      eax = ((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0))));
0053416b      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053416b      
0053416e      if (!(p_1))
00534173          this->m_vMin.y = arg2->y;
00534173      
00534176      long double x87_r7_2 = ((long double)arg2->z);
00534179      long double temp3 = ((long double)this->m_vMin.z);
00534179      (x87_r7_2 - temp3);
0053417c      eax = ((((x87_r7_2 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3) ? 1 : 0) << 0xe) | 0))));
0053417e      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0053417e      
00534181      if (!(p_2))
00534186          this->m_vMin.z = arg2->z;
00534186      
00534189      long double x87_r7_3 = ((long double)arg2->x);
0053418b      long double temp4 = ((long double)this->m_vMax.x);
0053418b      (x87_r7_3 - temp4);
0053418e      eax = ((((x87_r7_3 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4) ? 1 : 0) << 0xe) | 0))));
0053418e      
00534193      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00534197          this->m_vMax.x = arg2->x;
00534197      
0053419a      long double x87_r7_4 = ((long double)arg2->y);
0053419d      long double temp5 = ((long double)this->m_vMax.y);
0053419d      (x87_r7_4 - temp5);
005341a0      eax = ((((x87_r7_4 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp5) ? 1 : 0) << 0xe) | 0))));
005341a0      
005341a5      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005341aa          this->m_vMax.y = arg2->y;
005341aa      
005341ad      long double x87_r7_5 = ((long double)arg2->z);
005341b0      long double temp6 = ((long double)this->m_vMax.z);
005341b0      (x87_r7_5 - temp6);
005341b3      eax = ((((x87_r7_5 < temp6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp6))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp6) ? 1 : 0) << 0xe) | 0))));
005341b3      
005341b8      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005341bd          this->m_vMax.z = arg2->z;
00534150  }

005341c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005341d0  uint8_t __thiscall CGfxObj::TexVelocity(class CGfxObj* this, class CVec2Duv arg2)

005341d0  {
005341d0      class MeshBuffer* constructed_mesh = this->constructed_mesh;
005341d0      
005341d5      if (constructed_mesh != 0)
005341d5      {
005341db          constructed_mesh->m_bUseUVAnimation = 1;
005341df          constructed_mesh = this->constructed_mesh;
005341e6          constructed_mesh->m_vUVDelta.u = arg2.u;
005341e9          constructed_mesh->m_vUVDelta.v = arg2.v;
005341d5      }
005341d5      
005341ec      constructed_mesh = 1;
005341ee      return 1;
005341d0  }

005341f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00534200  void __fastcall CGfxObj::init_end(class CGfxObj* this)

00534200  {
00534208      if (this->vertex_array.num_vertices == 0)
00534208      {
00534210          this->gfx_bound_box.m_vMin.x = Legacy_Vector3_ZeroVector__.x;
00534210          this->gfx_bound_box.m_vMin.y = Legacy_Vector3_ZeroVector__.y;
00534210          this->gfx_bound_box.m_vMin.z = Legacy_Vector3_ZeroVector__.z;
00534210          this->gfx_bound_box.m_vMax.x = Legacy_Vector3_ZeroVector__.x;
00534210          this->gfx_bound_box.m_vMax.y = Legacy_Vector3_ZeroVector__.y;
00534210          this->gfx_bound_box.m_vMax.z = Legacy_Vector3_ZeroVector__.z;
0053424a          return;
00534208      }
00534208      
0053424b      class CVertex* vertices = this->vertex_array.vertices;
00534254      this->gfx_bound_box.m_vMin.x = *(uint32_t*)((char*)vertices->__inner0 + 0);
00534254      this->gfx_bound_box.m_vMin.y = *(uint32_t*)((char*)vertices->__inner0 + 4);
00534254      this->gfx_bound_box.m_vMin.z = *(uint32_t*)((char*)vertices->__inner0 + 8);
00534254      this->gfx_bound_box.m_vMax.x = *(uint32_t*)((char*)vertices->__inner0 + 0);
00534254      this->gfx_bound_box.m_vMax.y = *(uint32_t*)((char*)vertices->__inner0 + 4);
00534254      this->gfx_bound_box.m_vMax.z = *(uint32_t*)((char*)vertices->__inner0 + 8);
00534280      int32_t i = 1;
00534280      
00534287      if (this->vertex_array.num_vertices > 1)
00534287      {
005342ac          do
005342ac          {
005342a1              BBox::AdjustBBox(&this->gfx_bound_box, ((CVertexArray::vertex_size * i) + this->vertex_array.vertices));
005342a9              i += 1;
005342ac          } while (i < this->vertex_array.num_vertices);
00534287      }
00534200  }

005342b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005342c0  void __convention("regparm") SB_AsPackObj<0>::Serialize(class CGfxObj** arg1, class CVertexArray* arg2, class Archive* arg3)

005342c0  {
005342c0      uint8_t* ecx;
005342c0      uint8_t* var_4 = ecx;
005342c3      class Archive* esi = arg3;
005342c3      
005342cc      if ((esi->m_flags & 1) == 0)
005342cc      {
0053430e          uint32_t eax_2 = Archive::GetSizeLeft(esi);
00534320          uint8_t* eax_4 = Archive::PeekBytes(esi, Archive::GetCurrentPosition(esi), eax_2);
00534331          arg3 = eax_4;
00534331          
0053433e          if (CVertexArray::UnPack(arg2, &arg3, eax_2) != 0)
0053433e          {
00534347              Archive::GetBytes(esi, ((char*)arg3 - eax_4));
00534350              return;
0053433e          }
0053433e          
00534351          Archive::RaiseError(esi);
005342cc      }
005342cc      else
005342cc      {
005342db          arg3 = nullptr;
005342e3          uint32_t eax = CVertexArray::Pack(arg2, &arg3, 0);
005342ed          uint8_t* eax_1 = Archive::GetBytes(esi, eax);
005342f4          var_4 = eax_1;
005342f4          
005342f8          if (eax_1 != 0)
00534302              CVertexArray::Pack(arg2, &var_4, eax);
005342cc      }
005342c0  }

0053435b                                                                                   90 90 90 90 90                             .....

00534360  void __convention("regparm") SB_AsPackObj<0>::Serialize(class CGfxObj** arg1, class CPolygon* arg2, class Archive* arg3)

00534360  {
00534360      uint8_t* ecx;
00534360      uint8_t* var_4 = ecx;
00534363      class Archive* esi = arg3;
00534363      
0053436c      if ((esi->m_flags & 1) == 0)
0053436c      {
005343ae          uint32_t eax_2 = Archive::GetSizeLeft(esi);
005343c0          uint8_t* eax_4 = Archive::PeekBytes(esi, Archive::GetCurrentPosition(esi), eax_2);
005343d1          arg3 = eax_4;
005343d5          CPolygon::UnPack(arg2, &arg3, eax_2);
005343e7          Archive::GetBytes(esi, ((char*)arg3 - eax_4));
005343f0          return;
0053436c      }
0053436c      
0053437b      arg3 = nullptr;
00534383      uint32_t eax = CPolygon::Pack(arg2, &arg3, 0);
0053438d      uint8_t* eax_1 = Archive::GetBytes(esi, eax);
00534394      var_4 = eax_1;
00534394      
00534398      if (eax_1 == 0)
005343fa          return;
005343fa      
005343a2      CPolygon::Pack(arg2, &var_4, eax);
00534360  }

005343fb                                                                                   90 90 90 90 90                             .....

00534400  void __convention("regparm") SB_AsPackObj<0>::Serialize(class CGfxObj** arg1, class BSPTREE* arg2, class Archive* arg3)

00534400  {
00534400      uint8_t* ecx;
00534400      uint8_t* var_4 = ecx;
00534403      class Archive* esi = arg3;
00534403      
0053440c      if ((esi->m_flags & 1) == 0)
0053440c      {
0053444e          uint32_t eax_2 = Archive::GetSizeLeft(esi);
00534460          uint8_t* eax_4 = Archive::PeekBytes(esi, Archive::GetCurrentPosition(esi), eax_2);
00534471          arg3 = eax_4;
00534471          
0053447e          if (BSPTREE::UnPack(arg2, &arg3, eax_2) != 0)
0053447e          {
00534487              Archive::GetBytes(esi, ((char*)arg3 - eax_4));
00534490              return;
0053447e          }
0053447e          
00534491          Archive::RaiseError(esi);
0053440c      }
0053440c      else
0053440c      {
0053441b          arg3 = nullptr;
00534423          uint32_t eax = BSPTREE::Pack(arg2, &arg3, 0);
0053442d          uint8_t* eax_1 = Archive::GetBytes(esi, eax);
00534434          var_4 = eax_1;
00534434          
00534438          if (eax_1 != 0)
00534442              BSPTREE::Pack(arg2, &var_4, eax);
0053440c      }
00534400  }

0053449b                                                                                   90 90 90 90 90                             .....

005344a0  int32_t __thiscall CSphere::intersects(class CSphere const* this, class CSphere const* arg2)

005344a0  {
005344a6      long double x87_r7_1 = (((long double)this->center.x) - ((long double)arg2->center.x));
005344ab      long double x87_r6_1 = (((long double)this->center.y) - ((long double)arg2->center.y));
005344b1      long double x87_r5_1 = (((long double)this->center.z) - ((long double)arg2->center.z));
005344b7      long double x87_r4_1 = (((long double)arg2->radius) + ((long double)this->radius));
005344ce      long double x87_r3_4 = ((((x87_r7_1 * x87_r7_1) + (x87_r5_1 * x87_r5_1)) + (x87_r6_1 * x87_r6_1)) - (x87_r4_1 * x87_r4_1));
005344d0      long double temp1 = ((long double)0.000199999995f);
005344d0      (x87_r3_4 - temp1);
005344da      class CSphere* eax;
005344da      bool c1;
005344da      eax = ((((x87_r3_4 < temp1) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r3_4 == temp1) ? 1 : 0) << 0xe) | 0x3000))));
005344de      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005344de      
005344e3      if (p)
005344ef          return 0;
005344ef      
005344ea      return 1;
005344a0  }

005344f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00534500  void __fastcall CGfxObj::CGfxObj(class CGfxObj* this)

00534500  {
0053450a      DBObj::DBObj(this, INVALID_DID.id);
00534514      this->vtable = 0x7c9650;
0053451a      this->material = nullptr;
0053451d      this->num_surfaces = 0;
00534520      this->m_rgSurfaces = nullptr;
00534523      CVertexArray::CVertexArray(&this->vertex_array);
00534528      __builtin_memset(&this->num_physics_polygons, 0, 0x34);
00534568      this->m_didDegrade.id = INVALID_DID.id;
00534500  }

00534572                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00534580  void __fastcall CGfxObj::Destroy(class CGfxObj* this)

00534580  {
00534585      class BSPTREE* drawing_bsp = this->drawing_bsp;
00534585      
0053458f      if (drawing_bsp != 0)
0053458f      {
00534593          BSPTREE::~BSPTREE(drawing_bsp);
00534599          operator delete(drawing_bsp);
005345a1          this->drawing_bsp = nullptr;
0053458f      }
0053458f      
005345a7      class CPolygon* polygons = this->polygons;
005345b0      this->drawing_sphere = nullptr;
005345b0      
005345b6      if (polygons != 0)
005345b6      {
005345b8          int32_t vertices = polygons->vertices;
005345c4          void* edi_2 = &polygons[vertices];
005345c4          
005345c7          if ((vertices - 1) >= 0)
005345c7          {
005345c9              int32_t ebx_1 = vertices;
005345db              int32_t i;
005345db              
005345db              do
005345db              {
005345d0                  edi_2 -= 0x30;
005345d5                  CPolygon::Destroy(edi_2);
005345da                  i = ebx_1;
005345da                  ebx_1 -= 1;
005345db              } while (i != 1);
005345c7          }
005345c7          
005345e0          operator delete[](((char*)polygons - 4));
005345e8          this->polygons = nullptr;
005345b6      }
005345b6      
005345ee      class CPolygon* physics_polygons = this->physics_polygons;
005345f3      this->num_polygons = 0;
005345f3      
005345f9      if (physics_polygons != 0)
005345f9      {
005345fb          int32_t vertices_1 = physics_polygons->vertices;
00534607          void* edi_5 = &physics_polygons[vertices_1];
00534607          
0053460a          if ((vertices_1 - 1) >= 0)
0053460a          {
0053460c              int32_t ebx_2 = vertices_1;
0053461b              int32_t i_1;
0053461b              
0053461b              do
0053461b              {
00534610                  edi_5 -= 0x30;
00534615                  CPolygon::Destroy(edi_5);
0053461a                  i_1 = ebx_2;
0053461a                  ebx_2 -= 1;
0053461b              } while (i_1 != 1);
0053460a          }
0053460a          
00534620          operator delete[](((char*)physics_polygons - 4));
00534628          this->physics_polygons = nullptr;
005345f9      }
005345f9      
0053462b      class BSPTREE* physics_bsp = this->physics_bsp;
00534630      this->num_physics_polygons = 0;
00534630      
00534634      if (physics_bsp != 0)
00534634      {
00534638          BSPTREE::~BSPTREE(physics_bsp);
0053463e          operator delete(physics_bsp);
00534646          this->physics_bsp = nullptr;
00534634      }
00534634      
0053464c      if (this->physics_sphere != 0)
0053464e          this->physics_sphere = nullptr;
0053464e      
00534654      CVertexArray::DestroyVertex(&this->vertex_array);
00534654      
0053465c      if (this->m_rgSurfaces != 0)
0053465c      {
00534661          int32_t i_2 = 0;
00534661          
00534665          if (this->num_surfaces > 0)
00534665          {
0053467c              do
0053467c              {
0053466a                  int32_t* ecx_5 = this->m_rgSurfaces[i_2];
0053466a                  
0053466f                  if (ecx_5 != 0)
00534673                      *(uint32_t*)(*(uint32_t*)ecx_5 + 0x14)();
00534673                  
00534679                  i_2 += 1;
0053467c              } while (i_2 < this->num_surfaces);
00534665          }
00534665          
00534682          operator delete[](this->m_rgSurfaces);
0053468a          this->m_rgSurfaces = nullptr;
0053465c      }
0053465c      
0053468d      class MeshBuffer* constructed_mesh = this->constructed_mesh;
00534690      this->num_surfaces = 0;
00534690      
00534698      if (constructed_mesh != 0)
00534698      {
0053469b          D3DPolyRender::DestroyMesh(&this->constructed_mesh);
00534693          this->constructed_mesh = nullptr;
00534698      }
00534580  }

005346a9                             90 90 90 90 90 90 90                                                           .......

005346b0  uint8_t __fastcall CGfxObj::InitLoad(class CGfxObj* this)

005346b0  {
005346b3      uint32_t eax = DBCache::IsRunTime();
005346b3      
005346ba      if (eax != 0)
005346ba      {
005346bc          class BSPTREE* drawing_bsp = this->drawing_bsp;
005346bc          
005346c4          if (drawing_bsp != 0)
005346c6              BSPTREE::RemoveNonPortalNodes(drawing_bsp);
005346c6          
005346ce          bool cond:0_1 = this->constructed_mesh != 0;
005346d3          this->use_built_mesh = 1;
005346d3          
005346da          if (!(cond:0_1))
005346e3              eax = ((uint32_t)D3DPolyRender::ConstructMesh(this, &this->constructed_mesh));
005346e3          
005346eb          if ((cond:0_1 || eax == 0))
005346ed              this->use_built_mesh = 0;
005346ba      }
005346ba      
005346f4      eax = 1;
005346f7      return 1;
005346b0  }

005346f8                                                                          90 90 90 90 90 90 90 90                          ........

00534700  void __thiscall CGfxObj::find_obj_collisions(class CGfxObj const* this, class CTransition* arg2, float arg3)

00534700  {
00534706      uint32_t num_sphere = arg2->sphere_path.num_sphere;
0053470a      int32_t esi = 0;
0053470a      
00534713      if (num_sphere > 0)
00534713      {
00534715          class CSphere* localspace_sphere = arg2->sphere_path.localspace_sphere;
00534719          class CSphere* physics_sphere = this->physics_sphere;
00534719          
00534767          do
00534767          {
00534722              long double x87_r7_2 = (((long double)physics_sphere->center.x) - ((long double)localspace_sphere->center.x));
00534727              long double x87_r6_2 = (((long double)physics_sphere->center.y) - ((long double)localspace_sphere->center.y));
0053472d              long double x87_r5_2 = (((long double)physics_sphere->center.z) - ((long double)localspace_sphere->center.z));
00534733              long double x87_r4_2 = (((long double)localspace_sphere->radius) + ((long double)physics_sphere->radius));
0053474a              long double x87_r3_5 = ((((x87_r7_2 * x87_r7_2) + (x87_r5_2 * x87_r5_2)) + (x87_r6_2 * x87_r6_2)) - (x87_r4_2 * x87_r4_2));
0053474c              long double temp1_1 = ((long double)0.000199999995f);
0053474c              (x87_r3_5 - temp1_1);
00534756              int32_t eax;
00534756              bool c1;
00534756              eax = ((((x87_r3_5 < temp1_1) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r3_5 == temp1_1) ? 1 : 0) << 0xe) | 0x3000))));
0053475a              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053475a              
0053475f              if (!(p_1))
0053475f              {
0053477c                  class BSPTREE* physics_bsp = this->physics_bsp;
0053477c                  
0053477f                  if (arg2->sphere_path.insert_type == INITIAL_PLACEMENT_INSERT)
0053477f                  {
00534782                      BSPTREE::placement_insert(physics_bsp, arg2);
0053478b                      return;
0053477f                  }
0053477f                  
00534794                  BSPTREE::find_collisions(physics_bsp, arg2, arg3);
0053479d                  return;
0053475f              }
0053475f              
00534761              esi += 1;
00534762              localspace_sphere = &localspace_sphere[1];
00534767          } while (esi < num_sphere);
00534713      }
00534700  }


005347a0  void SB_AsPackObj<0>::Serialize(class CGfxObj** arg1, class AC1Legacy::Vector3* arg2, class Archive* arg3)

005347a0  {
005347ab      if ((arg3->m_flags & 1) == 0)
005347ab      {
005347d1          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005347e3          uint8_t* eax_4 = Archive::PeekBytes(arg3, Archive::GetCurrentPosition(arg3), eax_2);
005347e3          
005347eb          if (eax_2 < 0xc)
0053481a              /* tailcall */
0053481a              return Archive::RaiseError(arg3);
0053481a          
005347f3          arg2->x = *(uint32_t*)eax_4;
005347fe          arg2->y = *(uint32_t*)(eax_4 + 4);
0053480b          arg2->z = *(uint32_t*)(eax_4 + 8);
0053480e          Archive::GetBytes(arg3, &(eax_4 * 0)[0xc]);
005347ab      }
005347ab      else
005347ab      {
005347af          uint8_t* eax = Archive::GetBytes(arg3, 0xc);
005347af          
005347b6          if (eax != 0)
005347b6          {
005347be              *(uint32_t*)eax = arg2->x;
005347c6              *(uint32_t*)(eax + 4) = arg2->y;
005347cb              *(uint32_t*)(eax + 8) = arg2->z;
005347b6          }
005347ab      }
005347a0  }

0053481f                                                                                               90                                 .

00534820  class DBObj* CGfxObj::Allocate(class CGfxObj const* this @ ecx)

00534820  {
00534820      /* tailcall */
00534820      return CGfxObj::Allocator();
00534820  }

00534825                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00534830  void* __thiscall CGfxObj::`scalar deleting destructor'(class CGfxObj* this, uint32_t arg2)

00534830  {
00534833      this->vtable = 0x7c9650;
00534839      CGfxObj::Destroy(this);
00534841      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&this->vertex_array);
00534848      DBObj::~DBObj(this);
00534848      
00534852      if ((arg2 & 1) != 0)
00534855          operator delete(this);
00534855      
00534860      return this;
00534830  }

00534863           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00534870  void __thiscall CGfxObj::GetSubDataIDs(class CGfxObj const* this, class QualifiedDataIDArray* arg2)

00534870  {
0053487f      int32_t i = 0;
00534883      void var_8;
00534883      
00534883      if (this->num_surfaces > 0)
00534883      {
005348ae          do
005348ae          {
00534888              void* eax_2 = this->m_rgSurfaces[i];
00534888              
0053488d              if (eax_2 != 0)
005348a3                  QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, *(uint32_t*)((char*)eax_2 + 0x28), 0), 0);
005348a3              
005348ab              i += 1;
005348ae          } while (i < this->num_surfaces);
00534883      }
00534883      
005348c7      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->m_didDegrade.id, 0), 0);
00534870  }

005348d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005348e0  void SB_AsDataID<0>::Serialize(class CGfxObj** arg1, class CSurface** arg2, class Archive* arg3)

005348e0  {
005348f2      uint32_t id = INVALID_DID.id;
005348f2      
005348f8      if ((arg3->m_flags & 1) != 0)
005348f8      {
005348fa          class CSurface* eax_1 = *(uint32_t*)arg2;
005348fa          
005348ff          if (eax_1 != 0)
00534901              id = eax_1->m_DID.id;
005348f8      }
005348f8      
00534908      Archive::CheckAlignment(arg3, 4);
00534911      uint8_t* eax_2 = Archive::GetBytes(arg3, 4);
00534911      
00534918      if (eax_2 != 0)
00534918      {
0053491e          if ((arg3->m_flags & 1) == 0)
00534924              id = *(uint32_t*)eax_2;
0053491e          else
00534920              *(uint32_t*)eax_2 = id;
00534918      }
00534918      
00534926      eax_2 = arg3->m_flags;
00534929      eax_2 = !(eax_2);
00534929      
0053492d      if ((eax_2 & 1) != 0)
0053492d      {
00534935          if (id == INVALID_DID.id)
00534935          {
00534939              *(uint32_t*)arg2 = nullptr;
00534944              return;
00534935          }
00534935          
0053495a          void var_8;
0053495a          *(uint32_t*)arg2 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0xd));
0053492d      }
005348e0  }

00534964              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00534970  void __thiscall CGfxObj::Serialize(class CGfxObj* this, class Archive* arg2)

00534970  {
00534970      class CGfxObj* this_1 = this;
00534974      class Archive* esi = arg2;
0053497c      DBObj::Serialize(this, esi);
00534984      int32_t ebp = 0;
00534986      bool cond:0 = (esi->m_flags & 1) == 0;
00534988      arg2 = nullptr;
00534988      
0053498c      if (!(cond:0))
0053498c      {
00534991          if (this->physics_bsp != 0)
00534993              arg2 = 1;
00534993          
005349a1          if (this->drawing_bsp != 0)
005349a3              arg2 |= 2;
005349a3          
005349b4          if (INVALID_DID.id != this->m_didDegrade.id)
005349b6              arg2 |= 8;
0053498c      }
0053498c      
005349bf      Archive::CheckAlignment(esi, 4);
005349c8      uint8_t* eax_2 = Archive::GetBytes(esi, 4);
005349c8      
005349cf      if (eax_2 != 0)
005349cf      {
005349d5          if ((esi->m_flags & 1) == 0)
005349e1              arg2 = *(uint32_t*)eax_2;
005349d5          else
005349db              *(uint32_t*)eax_2 = arg2;
005349cf      }
005349cf      
005349ef      uint32_t num_surfaces;
005349ef      class Archive* ecx_3;
005349ef      class CVertexArray* edx_2;
005349ef      num_surfaces = SB_As32Bit_Compressed::Serialize(&arg2, &this->num_surfaces, esi);
005349f4      ecx_3 = esi->m_flags;
005349f7      ecx_3 = !(ecx_3);
005349f7      
005349ff      if ((ecx_3 & 1) != 0)
005349ff      {
00534a07          num_surfaces = operator new[]((this->num_surfaces << 2));
00534a0f          this->m_rgSurfaces = num_surfaces;
005349ff      }
005349ff      
00534a15      if (this->num_surfaces > 0)
00534a15      {
00534a31          do
00534a31          {
00534a24              ecx_3 = SB_AsDataID<0>::Serialize(&arg2, &this->m_rgSurfaces[ebp], esi);
00534a29              num_surfaces = this->num_surfaces;
00534a2e              ebp += 1;
00534a31          } while (ebp < num_surfaces);
00534a15      }
00534a15      
00534a33      class Archive* var_18_4 = esi;
00534a3b      class CVertexArray* var_1c_2 = &this->vertex_array;
00534a3c      class Archive** var_20_2 = &arg2;
00534a3d      SB_AsPackObj<0>::Serialize(num_surfaces, edx_2, ecx_3);
00534a3d      
00534a4d      if ((!(esi->m_flags) & 1) != 0)
00534a4f          CPolygon::pack_verts = &this->vertex_array;
00534a4f      
00534a5a      if ((arg2 & 1) != 0)
00534a5a      {
00534a6a          class Archive* ecx_6;
00534a6a          class BSPTREE* edx_5;
00534a6a          ecx_6 = SB_As32Bit_Compressed::Serialize(&arg2, &this->num_physics_polygons, esi);
00534a6a          
00534a79          if ((!(esi->m_flags) & 1) != 0)
00534a79          {
00534a7b              uint32_t num_physics_polygons_1 = this->num_physics_polygons;
00534a88              void* eax_5;
00534a88              eax_5 = operator new[](((num_physics_polygons_1 * 0x30) + 4));
00534a92              void* eax_6;
00534a92              
00534a92              if (eax_5 == 0)
00534ab9                  eax_6 = nullptr;
00534a92              else
00534a92              {
00534a94                  eax_6 = ((char*)eax_5 + 4);
00534a97                  *(uint32_t*)((char*)eax_6 - 4) = num_physics_polygons_1;
00534aa1                  void* ebx_3 = eax_6;
00534aa1                  
00534aa3                  if ((num_physics_polygons_1 - 1) >= 0)
00534aa3                  {
00534aa5                      int32_t ebp_2 = num_physics_polygons_1;
00534ab1                      int32_t i;
00534ab1                      
00534ab1                      do
00534ab1                      {
00534aa8                          ecx_6 = CPolygon::CPolygon(ebx_3);
00534aad                          ebx_3 += 0x30;
00534ab0                          i = ebp_2;
00534ab0                          ebp_2 -= 1;
00534ab1                      } while (i != 1);
00534aa3                  }
00534a92              }
00534a92              
00534abb              this->physics_polygons = eax_6;
00534abe              BSPNODE::pack_poly = eax_6;
00534a79          }
00534a79          
00534ac3          uint32_t num_physics_polygons = this->num_physics_polygons;
00534ac6          int32_t ebp_3 = 0;
00534ac6          
00534aca          if (num_physics_polygons > 0)
00534aca          {
00534acc              int32_t ebx_4 = 0;
00534acc              
00534aed              do
00534aed              {
00534ad3                  class Archive* var_18_7 = esi;
00534ad4                  class CPolygon* edx_7 = (this->physics_polygons + ebx_4);
00534ad6                  class CPolygon* var_1c_4 = edx_7;
00534adb                  class Archive** var_20_4 = &arg2;
00534adc                  ecx_6 = SB_AsPackObj<0>::Serialize(num_physics_polygons, edx_7, ecx_6);
00534ae1                  num_physics_polygons = this->num_physics_polygons;
00534ae7                  ebp_3 += 1;
00534ae8                  ebx_4 += 0x30;
00534aed              } while (ebp_3 < num_physics_polygons);
00534aca          }
00534aca          
00534aef          BSPNODE::pack_tree_type = PHYSICS_BSP;
00534afc          uint32_t ecx_12 = (esi->m_flags >> 2);
00534afc          
00534b02          if ((ecx_12 & 1) == 0)
00534b02          {
00534b04              edx_5 = esi->m_flags;
00534b07              edx_5 = !(edx_5);
00534b07              
00534b0c              if ((edx_5 & 1) != 0)
00534b0c              {
00534b10                  void* eax_7;
00534b10                  eax_7 = operator new(4);
00534b1a                  class BSPTREE* eax_8;
00534b1a                  
00534b1a                  if (eax_7 == 0)
00534b25                      eax_8 = nullptr;
00534b1a                  else
00534b1a                  {
00534b1c                      ecx_12 = eax_7;
00534b1e                      eax_8 = AvailableProperty::AvailableProperty(ecx_12);
00534b1a                  }
00534b1a                  
00534b27                  this->physics_bsp = eax_8;
00534b0c              }
00534b0c              
00534b2a              class CGfxObj** physics_bsp = this->physics_bsp;
00534b2a              
00534b2f              if (physics_bsp != 0)
00534b2f              {
00534b3a                  class Archive* var_18_8 = esi;
00534b3b                  class CGfxObj** physics_bsp_1 = physics_bsp;
00534b40                  class Archive** var_20_5 = &arg2;
00534b41                  SB_AsPackObj<0>::Serialize(physics_bsp, edx_5, ecx_12);
00534b2f              }
00534b2f              else
00534b33                  Archive::RaiseError(esi);
00534b02          }
00534b02          
00534b49          ecx_12 = esi->m_flags;
00534b4c          ecx_12 = !(ecx_12);
00534b4c          
00534b51          if ((ecx_12 & 1) != 0)
00534b5b              this->physics_sphere = BSPTREE::GetSphere(this->physics_bsp);
00534a5a      }
00534a5a      
00534b68      SB_AsPackObj<0>::Serialize(&arg2, &this->sort_center, esi);
00534b6d      class CGfxObj** drawing_bsp;
00534b6d      drawing_bsp = arg2;
00534b6d      
00534b76      if ((drawing_bsp & 2) != 0)
00534b76      {
00534b89          class AvailableProperty* ecx_14;
00534b89          class BSPTREE* edx_9;
00534b89          ecx_14 = SB_As32Bit_Compressed::Serialize(&arg2, &this->num_polygons, esi);
00534b8e          edx_9 = esi->m_flags;
00534b91          edx_9 = !(edx_9);
00534b91          
00534b99          if ((edx_9 & 1) != 0)
00534b99          {
00534b9b              uint32_t num_polygons_1 = this->num_polygons;
00534ba8              void* eax_13;
00534ba8              eax_13 = operator new[](((num_polygons_1 * 0x30) + 4));
00534bb2              class CGfxObj* eax_14;
00534bb2              
00534bb2              if (eax_13 == 0)
00534bd9                  eax_14 = nullptr;
00534bb2              else
00534bb2              {
00534bb4                  eax_14 = ((char*)eax_13 + 4);
00534bb7                  *(uint32_t*)((char*)eax_14 - 4) = num_polygons_1;
00534bc1                  class CGfxObj* ebx_6 = eax_14;
00534bc1                  
00534bc3                  if ((num_polygons_1 - 1) >= 0)
00534bc3                  {
00534bc5                      int32_t ebp_5 = num_polygons_1;
00534bd1                      int32_t i_1;
00534bd1                      
00534bd1                      do
00534bd1                      {
00534bc8                          ecx_14 = CPolygon::CPolygon(ebx_6);
00534bcd                          ebx_6 = &ebx_6->material;
00534bd0                          i_1 = ebp_5;
00534bd0                          ebp_5 -= 1;
00534bd1                      } while (i_1 != 1);
00534bc3                  }
00534bb2              }
00534bb2              
00534bdb              this->polygons = eax_14;
00534be1              BSPNODE::pack_poly = eax_14;
00534b99          }
00534b99          
00534be6          class CGfxObj** num_polygons = this->num_polygons;
00534bec          int32_t ebp_6 = 0;
00534bec          
00534bf0          if (num_polygons > 0)
00534bf0          {
00534bf2              int32_t ebx_7 = 0;
00534bf2              
00534c17              do
00534c17              {
00534bfa                  class Archive* var_18_12 = esi;
00534bfb                  class Archive* ecx_17 = (this->polygons + ebx_7);
00534bfd                  class Archive* var_1c_7 = ecx_17;
00534c02                  class Archive** var_20_8 = &arg2;
00534c03                  ecx_14 = SB_AsPackObj<0>::Serialize(num_polygons, edx_9, ecx_17);
00534c08                  num_polygons = this->num_polygons;
00534c11                  ebp_6 += 1;
00534c12                  ebx_7 += 0x30;
00534c17              } while (ebp_6 < num_polygons);
00534bf0          }
00534bf0          
00534c19          BSPNODE::pack_tree_type = DRAWING_BSP;
00534c19          
00534c2b          if (((esi->m_flags >> 2) & 1) == 0)
00534c2b          {
00534c2d              ecx_14 = esi->m_flags;
00534c30              ecx_14 = !(ecx_14);
00534c30              
00534c35              if ((ecx_14 & 1) != 0)
00534c35              {
00534c39                  void* eax_16;
00534c39                  eax_16 = operator new(4);
00534c43                  class BSPTREE* eax_17;
00534c43                  
00534c43                  if (eax_16 == 0)
00534c4e                      eax_17 = nullptr;
00534c43                  else
00534c43                  {
00534c45                      ecx_14 = eax_16;
00534c47                      eax_17 = AvailableProperty::AvailableProperty(ecx_14);
00534c43                  }
00534c43                  
00534c50                  this->drawing_bsp = eax_17;
00534c35              }
00534c35              
00534c56              drawing_bsp = this->drawing_bsp;
00534c56              
00534c5e              if (drawing_bsp != 0)
00534c5e              {
00534c69                  class Archive* var_18_13 = esi;
00534c6a                  class CGfxObj** drawing_bsp_1 = drawing_bsp;
00534c6f                  class Archive** var_20_9 = &arg2;
00534c70                  SB_AsPackObj<0>::Serialize(drawing_bsp, edx_9, ecx_14);
00534c5e              }
00534c5e              else
00534c62                  Archive::RaiseError(esi);
00534c2b          }
00534c2b          
00534c78          drawing_bsp = esi->m_flags;
00534c7b          drawing_bsp = !(drawing_bsp);
00534c7b          
00534c7f          if ((drawing_bsp & 1) != 0)
00534c8c              this->drawing_sphere = BSPTREE::GetSphere(this->drawing_bsp);
00534b76      }
00534b76      
00534c97      if ((arg2 & 8) != 0)
00534c97      {
00534c9d          Archive::CheckAlignment(esi, 4);
00534ca6          drawing_bsp = Archive::GetBytes(esi, 4);
00534ca6          
00534cad          if (drawing_bsp != 0)
00534cad          {
00534cb3              if ((esi->m_flags & 1) == 0)
00534cc1                  this->m_didDegrade.id = *(uint32_t*)drawing_bsp;
00534cb3              else
00534cbb                  *(uint32_t*)drawing_bsp = this->m_didDegrade.id;
00534cad          }
00534c97      }
00534c97      
00534cc7      drawing_bsp = esi->m_flags;
00534cca      drawing_bsp = !(drawing_bsp);
00534cca      
00534cce      if ((drawing_bsp & 1) != 0)
00534cd2          CGfxObj::init_end(this);
00534970  }

00534cdf                                                                                               90                                 .

00534ce0  void CSurfaceTriStrips::Free(class CSurfaceTriStrips* arg1)

00534ce0  {
00534ce0      /* tailcall */
00534ce0      return free();
00534ce0  }

00534ce6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00534cf0  void __fastcall CSurfaceTriStrips::~CSurfaceTriStrips(class CSurfaceTriStrips* this)

00534cf0  {
00534cf0      class CTriangleStrip* strips = this->strips;
00534cf0      
00534cf5      if (strips != 0)
00534cf5      {
00534cf7          int32_t num_indices = strips->num_indices;
00534cff          void* esi_1 = &strips[num_indices];
00534cff          
00534d03          if ((num_indices - 1) >= 0)
00534d03          {
00534d06              int32_t edi_1 = num_indices;
00534d1b              int32_t i;
00534d1b              
00534d1b              do
00534d1b              {
00534d10                  esi_1 -= 8;
00534d15                  CTriangleStrip::~CTriangleStrip(esi_1);
00534d1a                  i = edi_1;
00534d1a                  edi_1 -= 1;
00534d1b              } while (i != 1);
00534d03          }
00534d03          
00534d1f          operator delete[](((char*)strips - 4));
00534cf5      }
00534cf0  }

00534d2a                                90 90 90 90 90 90                                                            ......

00534d30  void __fastcall CTriangleStrip::~CTriangleStrip(class CTriangleStrip* this)

00534d30  {
00534d34      operator delete[](this->indices);
00534d30  }

00534d3b                                                                                   90 90 90 90 90                             .....

00534d40  void __fastcall AvailableProperty::AvailableProperty(class AvailableProperty* this)

00534d40  {
00534d42      this->m_name = 0;
00534d40  }

00534d49                             90 90 90 90 90 90 90                                                           .......

00534d50  void __thiscall ClipPlane::ClipPlane(class ClipPlane* this, class Plane* arg2, enum Sidedness arg3)

00534d50  {
00534d5a      this->plane = arg2;
00534d5c      this->side = arg3;
00534d50  }

00534d62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00534d70  void EulGetOrd(int32_t arg1, int32_t* arg2, int32_t* arg3, int32_t* arg4, int32_t* arg5, int32_t* arg6, int32_t* arg7, int32_t* arg8)

00534d70  {
00534d7a      uint32_t eax = (arg1 >> 1);
00534d7f      *(uint32_t*)arg8 = (arg1 & 1);
00534d83      uint32_t eax_1 = (eax >> 1);
00534d8f      *(uint32_t*)arg7 = (eax & 1);
00534d9d      *(uint32_t*)arg6 = (eax_1 & 1);
00534d9f      int32_t eax_4 = ((int32_t)*(uint8_t*)(((eax_1 >> 1) & 3) + 0x7c96c4));
00534daa      *(uint32_t*)arg2 = eax_4;
00534dbb      *(uint32_t*)arg3 = ((int32_t)*(uint8_t*)((*(uint32_t*)arg6 + eax_4) + 0x7c96bc));
00534dc7      int32_t eax_8 = ((int32_t)*(uint8_t*)((*(uint32_t*)arg2 - *(uint32_t*)arg6) + 0x7c96bd));
00534dce      *(uint32_t*)arg4 = eax_8;
00534dce      
00534dd5      if (*(uint32_t*)arg7 != 0)
00534dd5      {
00534ddb          *(uint32_t*)arg5 = eax_8;
00534ddd          return;
00534dd5      }
00534dd5      
00534de4      *(uint32_t*)arg5 = *(uint32_t*)arg2;
00534d70  }

00534de7                       90 90 90 90 90 90 90 90 90                                                         .........

00534df0  void __fastcall Frame::cache(class Frame* this)

00534df0  {
00534df9      long double x87_r7 = ((long double)this->qx);
00534dfe      double var_28 = ((double)(x87_r7 + x87_r7));
00534e02      long double x87_r7_2 = ((long double)this->qy);
00534e07      double var_30 = ((double)(x87_r7_2 + x87_r7_2));
00534e0b      long double x87_r7_4 = ((long double)this->qz);
00534e0e      long double x87_r7_5 = (x87_r7_4 + x87_r7_4);
00534e12      long double x87_r6_1 = (((long double)this->qw) * ((long double)var_28));
00534e18      long double x87_r5_1 = (((long double)this->qw) * ((long double)var_30));
00534e1e      long double x87_r4_1 = (((long double)this->qw) * x87_r7_5);
00534e23      long double x87_r3_1 = (((long double)this->qx) * ((long double)var_28));
00534e2a      long double x87_r2_1 = (((long double)this->qx) * ((long double)var_30));
00534e33      double var_20 = ((double)(((long double)this->qx) * x87_r7_5));
00534e3e      double var_10 = ((double)(((long double)this->qy) * ((long double)var_30)));
00534e47      double var_30_1 = ((double)(((long double)this->qy) * x87_r7_5));
00534e50      double var_28_1 = ((double)(((long double)this->qz) * x87_r7_5));
00534e62      this->m_fl2gv[0] = ((float)((((long double)1.0) - ((long double)var_10)) - ((long double)var_28_1)));
00534e69      this->m_fl2gv[1] = ((float)(x87_r2_1 + x87_r4_1));
00534e72      this->m_fl2gv[2] = ((float)(((long double)var_20) - x87_r5_1));
00534e77      this->m_fl2gv[3] = ((float)(x87_r2_1 - x87_r4_1));
00534e82      double var_18 = ((double)(((long double)1.0) - x87_r3_1));
00534e92      this->m_fl2gv[4] = ((float)(((long double)var_18) - ((long double)var_28_1)));
00534e9b      this->m_fl2gv[5] = ((float)(((long double)var_30_1) + x87_r6_1));
00534ea4      this->m_fl2gv[6] = ((float)(((long double)var_20) + x87_r3_1));
00534eaf      this->m_fl2gv[7] = ((float)(((long double)var_30_1) - x87_r3_1));
00534ebe      this->m_fl2gv[8] = ((float)(((long double)var_18) - ((long double)var_10)));
00534df0  }

00534ec5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00534ed0  int32_t __fastcall Frame::IsValid(class Frame const* this)

00534ed0  {
00534ed6      class Frame* this_1 = this;
00534eeb      int32_t result = 1;
00534eeb      
00534ef7      if (_isnan(((double)((long double)this->m_fOrigin.x))) != 0)
00534f64          result = 0;
00534ef7      else if (_isnan(((double)((long double)this->m_fOrigin.y))) != 0)
00534f64          result = 0;
00534f09      else if (_isnan(((double)((long double)this->m_fOrigin.z))) != 0)
00534f64          result = 0;
00534f1b      else if (_isnan(((double)((long double)this->qw))) != 0)
00534f64          result = 0;
00534f2c      else if (_isnan(((double)((long double)this->qx))) != 0)
00534f64          result = 0;
00534f3e      else if (_isnan(((double)((long double)this->qy))) != 0)
00534f64          result = 0;
00534f50      else if (_isnan(((double)((long double)this->qz))) != 0)
00534f64          result = 0;
00534f64      
00534f66      long double x87_r7_7 = ((long double)this->qz);
00534f6c      long double x87_r6 = ((long double)this->qy);
00534f6f      long double x87_r5 = ((long double)this->qx);
00534f72      long double x87_r4 = ((long double)this->qw);
00534f8a      float var_c = ((float)((((x87_r7_7 * x87_r7_7) + (x87_r6 * x87_r6)) + (x87_r5 * x87_r5)) + (x87_r4 * x87_r4)));
00534f8a      
00534fa4      if (_isnan(((double)((long double)var_c))) == 0)
00534fa4      {
00534fb0          long double x87_r7_12 = fabsl((((long double)var_c) - ((long double)1f)));
00534fb8          long double x87_r6_3 = (((long double)0.000199999995f) * ((long double)5f));
00534fbe          (x87_r6_3 - x87_r7_12);
00534fc0          int32_t eax_7;
00534fc0          eax_7 = ((((x87_r6_3 < x87_r7_12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_12))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_12) ? 1 : 0) << 0xe) | 0))));
00534fc2          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00534fc2          
00534fc5          if (p_1)
00534fd8              return result;
00534fa4      }
00534fa4      
00534fcf      return 0;
00534ed0  }

00534fd9                                                                             90 90 90 90 90 90 90                           .......

00534fe0  int32_t __fastcall Frame::IsValidExceptForHeading(class Frame const* this)

00534fe0  {
00534ffa      if (((_isnan(((double)((long double)this->m_fOrigin.x))) == 0 && _isnan(((double)((long double)this->m_fOrigin.y))) == 0) && _isnan(((double)((long double)this->m_fOrigin.z))) == 0))
00534ffa      {
0053502f          if (_isnan(((double)((long double)this->qw))) != 0)
0053506e              return 1;
0053506e          
00535041          if (_isnan(((double)((long double)this->qx))) != 0)
0053506e              return 1;
0053506e          
00535053          if (_isnan(((double)((long double)this->qy))) != 0)
0053506e              return 1;
0053506e          
00535065          if (_isnan(((double)((long double)this->qz))) != 0)
0053506e              return 1;
00534ffa      }
00534ffa      
00535073      return 0;
00534fe0  }

00535074                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00535080  void __thiscall Frame::set_rotate(class Frame* this, float arg2, float arg3, float arg4, float arg5)

00535080  {
00535092      float qw = this->qw;
00535098      float qx = this->qx;
0053509b      float qy = this->qy;
005350a4      float qz = this->qz;
005350cb      long double x87_r7_6 = (((long double)1.0) / sqrtl(((((((long double)arg2) * ((long double)arg2)) + (((long double)arg3) * ((long double)arg3))) + (((long double)arg4) * ((long double)arg4))) + (((long double)arg5) * ((long double)arg5)))));
005350d7      this->qw = ((float)(((long double)arg2) * x87_r7_6));
005350df      this->qx = ((float)(((long double)arg3) * x87_r7_6));
005350e8      this->qy = ((float)(((long double)arg4) * x87_r7_6));
005350ef      this->qz = ((float)(x87_r7_6 * ((long double)arg5)));
005350ef      
005350f9      if (Frame::IsValid(this) != 0)
005350f9      {
005350fd          Frame::cache(this);
00535106          return;
005350f9      }
005350f9      
00535115      this->qw = qw;
0053511b      this->qx = qx;
0053511e      this->qy = qy;
00535121      this->qz = qz;
00535080  }

0053512b                                   90 90 90 90 90                                                             .....

00535130  uint32_t __thiscall Frame::Pack(class Frame* this, void** arg2, uint32_t arg3)

00535130  {
00535137      if (arg3 >= 0x1c)
00535137      {
00535141          if (arg3 >= 0xc)
00535141          {
00535148              **(uint32_t**)arg2 = this->m_fOrigin.x;
0053514c              void* edx_3 = (*(uint32_t*)arg2 + 4);
0053514f              *(uint32_t*)arg2 = edx_3;
00535154              *(uint32_t*)edx_3 = ((float)((long double)this->m_fOrigin.y));
00535158              void* esi_3 = (*(uint32_t*)arg2 + 4);
0053515b              *(uint32_t*)arg2 = esi_3;
00535162              *(uint32_t*)esi_3 = ((float)((long double)this->m_fOrigin.z));
00535164              *(uint32_t*)arg2 += 4;
00535141          }
00535141          
0053516b          **(uint32_t**)arg2 = this->qw;
0053516f          void* edx_7 = (*(uint32_t*)arg2 + 4);
00535172          *(uint32_t*)arg2 = edx_7;
00535177          *(uint32_t*)edx_7 = ((float)((long double)this->qx));
0053517b          void* esi_6 = (*(uint32_t*)arg2 + 4);
0053517e          *(uint32_t*)arg2 = esi_6;
00535185          *(uint32_t*)esi_6 = ((float)((long double)this->qy));
00535189          void* edx_10 = (*(uint32_t*)arg2 + 4);
0053518c          *(uint32_t*)arg2 = edx_10;
00535191          *(uint32_t*)edx_10 = ((float)((long double)this->qz));
00535193          *(uint32_t*)arg2 += 4;
00535137      }
00535137      
0053519c      return 0x1c;
00535130  }

0053519f                                                                                               90                                 .

005351a0  int32_t __thiscall Frame::UnPack(class Frame* this, void** arg2, uint32_t arg3)

005351a0  {
005351af      if ((arg3 >= 0x1c && arg3 >= 0xc))
005351af      {
005351b9          this->m_fOrigin.x = **(uint32_t**)arg2;
005351be          void* ecx_2 = (*(uint32_t*)arg2 + 4);
005351c1          *(uint32_t*)arg2 = ecx_2;
005351c5          this->m_fOrigin.y = *(uint32_t*)ecx_2;
005351ca          void* edx_3 = (*(uint32_t*)arg2 + 4);
005351cd          *(uint32_t*)arg2 = edx_3;
005351d3          this->m_fOrigin.z = *(uint32_t*)edx_3;
005351d8          void* ecx_6 = (*(uint32_t*)arg2 + 4);
005351db          *(uint32_t*)arg2 = ecx_6;
005351df          this->qw = *(uint32_t*)ecx_6;
005351e3          void* ecx_9 = (*(uint32_t*)arg2 + 4);
005351e6          *(uint32_t*)arg2 = ecx_9;
005351ea          this->qx = *(uint32_t*)ecx_9;
005351ef          void* edx_7 = (*(uint32_t*)arg2 + 4);
005351f2          *(uint32_t*)arg2 = edx_7;
005351f8          this->qy = *(uint32_t*)edx_7;
005351fd          void* ecx_13 = (*(uint32_t*)arg2 + 4);
00535200          *(uint32_t*)arg2 = ecx_13;
00535204          this->qz = *(uint32_t*)ecx_13;
0053520e          *(uint32_t*)arg2 += 4;
0053520e          
00535217          if (Frame::IsValid(this) != 0)
00535217          {
0053521b              Frame::cache(this);
00535226              return 1;
00535217          }
005351af      }
005351af      
0053522c      return 0;
005351a0  }

0053522f                                               90                                                                 .

00535230  void __thiscall Frame::Serialize(class Frame* this, class Archive* arg2)

00535230  {
0053523d      UserBindingValue::Serialize(&this->m_fOrigin.x, arg2);
00535246      Archive::CheckAlignment(arg2, 4);
0053524f      uint8_t* eax = Archive::GetBytes(arg2, 4);
0053524f      
00535258      if (eax != 0)
00535258      {
0053525d          if ((arg2->m_flags & 1) == 0)
00535267              this->qw = *(uint32_t*)eax;
0053525d          else
00535261              *(uint32_t*)eax = this->qw;
00535258      }
00535258      
0053526d      Archive::CheckAlignment(arg2, 4);
00535276      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
00535276      
0053527d      if (eax_1 != 0)
0053527d      {
00535282          if ((arg2->m_flags & 1) == 0)
0053528d              this->qx = *(uint32_t*)eax_1;
00535282          else
00535287              *(uint32_t*)eax_1 = this->qx;
0053527d      }
0053527d      
00535294      Archive::CheckAlignment(arg2, 4);
0053529d      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
0053529d      
005352a4      if (eax_2 != 0)
005352a4      {
005352a9          if ((arg2->m_flags & 1) == 0)
005352b4              this->qy = *(uint32_t*)eax_2;
005352a9          else
005352ae              *(uint32_t*)eax_2 = this->qy;
005352a4      }
005352a4      
005352bb      Archive::CheckAlignment(arg2, 4);
005352c4      float* eax_3 = Archive::GetBytes(arg2, 4);
005352c4      
005352cb      if (eax_3 != 0)
005352cb      {
005352d0          if ((arg2->m_flags & 1) != 0)
005352d0          {
005352d7              *(uint32_t*)eax_3 = this->qz;
005352da              return;
005352d0          }
005352d0          
005352df          this->qz = *(uint32_t*)eax_3;
005352cb      }
00535230  }

005352e8                          90 90 90 90 90 90 90 90                                                          ........

005352f0  void __thiscall Frame::interpolate_origin(class Frame* this, class Frame const* arg2, class Frame const* arg3, float arg4)

005352f0  {
00535321      long double x87_r6_5 = (((long double)1f) - ((long double)arg4));
005352fe      this->m_fOrigin.x = ((float)((((long double)arg4) * ((long double)arg3->m_fOrigin.x)) + ((long double)((float)(x87_r6_5 * ((long double)arg2->m_fOrigin.x))))));
005352fe      this->m_fOrigin.y = ((float)(((long double)((float)(x87_r6_5 * ((long double)arg2->m_fOrigin.y)))) + ((long double)((float)(((long double)arg4) * ((long double)arg3->m_fOrigin.y))))));
005352fe      this->m_fOrigin.z = ((float)(((long double)((float)(x87_r6_5 * ((long double)arg2->m_fOrigin.z)))) + ((long double)((float)(((long double)arg4) * ((long double)arg3->m_fOrigin.z))))));
005352f0  }

00535382        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00535390  void __thiscall Frame::interpolate_rotation(class Frame* this, class Frame const* arg2, class Frame const* arg3, float arg4)

00535390  {
005353b9      long double x87_r7_4 = ((((((long double)arg2->qy) * ((long double)arg3->qy)) + (((long double)arg2->qw) * ((long double)arg3->qw))) + (((long double)arg2->qx) * ((long double)arg3->qx))) + (((long double)arg2->qz) * ((long double)arg3->qz)));
005353bb      long double temp1 = ((long double)0.0);
005353bb      (x87_r7_4 - temp1);
005353c1      double var_28 = ((double)x87_r7_4);
005353c1      bool c1 = /* bool c1 = unimplemented  {fst qword [esp+0x8], st0} */;
005353c5      float eax;
005353c5      eax = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
005353c7      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005353ca      float qx;
005353ca      float qy;
005353ca      float qz;
005353ca      float qw;
005353ca      
005353ca      if (p)
005353ca      {
005353fc          qw = arg3->qw;
00535406          qx = arg3->qx;
0053540a          qy = arg3->qy;
0053540e          qz = arg3->qz;
005353ca      }
005353ca      else
005353ca      {
005353cc          x87_r7_4 = -(x87_r7_4);
005353ce          var_28 = ((double)x87_r7_4);
005353d6          qw = ((float)-(((long double)arg3->qw)));
005353df          qx = ((float)-(((long double)arg3->qx)));
005353e8          qy = ((float)-(((long double)arg3->qy)));
005353f1          qz = ((float)-(((long double)arg3->qz)));
005353ca      }
00535418      long double x87_r6_15 = (((long double)1.0) - x87_r7_4);
0053541a      long double x87_r5 = ((long double)0.000199999995f);
00535420      (x87_r5 - x87_r6_15);
00535422      eax = ((((x87_r5 < x87_r6_15) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r6_15))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r6_15) ? 1 : 0) << 0xe) | 0x3800))));
00535426      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00535429      long double x87_r6_24;
00535429      long double x87_r7_8;
00535429      
00535429      if (p_1)
00535429      {
005354b8          x87_r7_8 = (((long double)1.0) - ((long double)arg4));
005354be          x87_r6_24 = ((long double)arg4);
00535429      }
00535429      else
00535429      {
0053542f          long double x87_r7_5 = ((long double)var_28);
00535433          j__CIacos();
0053543e          long double st0_1;
0053543e          bool c2_2;
0053543e          st0_1 = __fsin(x87_r7_5);
0053544a          double var_28_1 = ((double)(((long double)1.0) - ((long double)arg4)));
0053544e          long double x87_r6_18 = (((long double)1.0) / st0_1);
00535460          long double st0_2;
00535460          bool c2_3;
00535460          st0_2 = __fsin((x87_r7_5 * ((long double)var_28_1)));
00535462          x87_r7_8 = (x87_r6_18 * st0_2);
0053546c          long double st0_3;
0053546c          bool c2_4;
0053546c          st0_3 = __fsin((((long double)arg4) * ((long double)((double)x87_r7_5))));
0053546e          x87_r6_24 = (st0_3 * ((long double)((double)x87_r6_18)));
00535474          (x87_r7_8 - ((long double)0.0));
0053547c          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0053547c          
0053547f          if (!(p_2))
0053547f          {
005354ae              x87_r7_8 = ((long double)var_28_1);
005354be              x87_r6_24 = ((long double)arg4);
0053547f          }
0053547f          else
0053547f          {
00535483              long double temp3_1 = ((long double)1.0);
00535483              (x87_r7_8 - temp3_1);
00535483              
0053548e              if ((*(uint8_t*)((char*)((((x87_r7_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp3_1) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
0053548e              {
005354ae                  x87_r7_8 = ((long double)var_28_1);
005354be                  x87_r6_24 = ((long double)arg4);
0053548e              }
0053548e              else
0053548e              {
00535490                  (x87_r6_24 - ((long double)0.0));
00535498                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00535498                  
0053549b                  if (!(p_3))
0053549b                  {
005354ae                      x87_r7_8 = ((long double)var_28_1);
005354be                      x87_r6_24 = ((long double)arg4);
0053549b                  }
0053549b                  else
0053549b                  {
0053549d                      long double temp5_1 = ((long double)1.0);
0053549d                      (x87_r6_24 - temp5_1);
0053549d                      
005354a8                      if ((*(uint8_t*)((char*)((((x87_r6_24 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_24, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r6_24 == temp5_1) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
005354a8                      {
005354ae                          x87_r7_8 = ((long double)var_28_1);
005354be                          x87_r6_24 = ((long double)arg4);
005354a8                      }
0053549b                  }
0053548e              }
0053547f          }
00535429      }
00535429      
005354fa      arg2->qw;
0053550b      Frame::set_rotate(this, ((float)x87_r6_24), ((float)((((long double)arg2->qx) * x87_r7_8) + (((long double)qx) * x87_r6_24))), ((float)((((long double)arg2->qy) * x87_r7_8) + (((long double)qy) * x87_r6_24))), ((float)((((long double)qz) * x87_r6_24) + (((long double)arg2->qz) * x87_r7_8))));
00535390  }

00535518                                                                          90 90 90 90 90 90 90 90                          ........

00535520  void __thiscall Frame::subtract1(class Frame* this, class Frame const* arg2, class AFrame const* arg3)

00535520  {
005355b6      Frame::set_rotate(this, ((float)((((((long double)arg2->qy) * ((long double)arg3->qy)) + (((long double)arg3->qx) * ((long double)arg2->qx))) + (((long double)arg2->qw) * ((long double)arg3->qw))) + (((long double)arg3->qz) * ((long double)arg2->qz)))), ((float)((((((long double)arg2->qx) * ((long double)arg3->qw)) - (((long double)arg3->qx) * ((long double)arg2->qw))) - (((long double)arg2->qy) * ((long double)arg3->qz))) + (((long double)arg2->qz) * ((long double)arg3->qy)))), ((float)((((((long double)arg2->qy) * ((long double)arg3->qw)) - (((long double)arg2->qw) * ((long double)arg3->qy))) + (((long double)arg3->qz) * ((long double)arg2->qx))) - (((long double)arg3->qx) * ((long double)arg2->qz)))), ((float)(((((long double)arg2->qz) * ((long double)arg3->qw)) - ((((long double)arg2->qw) * ((long double)arg3->qz)) + (((long double)arg3->qy) * ((long double)arg2->qx)))) + (((long double)arg2->qy) * ((long double)arg3->qx)))));
005355bd      long double x87_r7_20 = -(((long double)arg3->m_fOrigin.x));
005355c2      long double x87_r6_24 = -(((long double)arg3->m_fOrigin.y));
005355c7      long double x87_r5_3 = -(((long double)arg3->m_fOrigin.z));
00535603      ((x87_r5_3 * ((long double)this->m_fl2gv[8])) + (x87_r7_20 * ((long double)this->m_fl2gv[2])));
005355ec      this->m_fl2gv[5];
00535622      float var_4 = ((float)(x87_r6_24 + ((long double)arg2->m_fOrigin.z)));
0053562a      float var_10 = var_4;
005355ec      this->m_fOrigin.x = ((float)(((long double)((float)(((x87_r5_3 * ((long double)this->m_fl2gv[6])) + (x87_r7_20 * ((long double)this->m_fl2gv[0]))) + (x87_r6_24 * ((long double)this->m_fl2gv[3]))))) + ((long double)arg2->m_fOrigin.x)));
005355ec      this->m_fOrigin.y = ((float)(((long double)((float)(((x87_r5_3 * ((long double)this->m_fl2gv[7])) + (x87_r7_20 * ((long double)this->m_fl2gv[1]))) + (x87_r6_24 * ((long double)this->m_fl2gv[4]))))) + ((long double)arg2->m_fOrigin.y)));
005355ec      this->m_fOrigin.z = var_4;
00535520  }

0053564d                                         90 90 90                                                               ...

00535650  void __thiscall Frame::subtract2(class Frame* this, class Frame const* arg2, class Frame const* arg3)

00535650  {
0053566b      void __return;
0053566b      class AC1Legacy::Vector3* eax_1 = Frame::globaltolocal(arg3, &__return, &arg2->m_fOrigin);
00535672      this->m_fOrigin.x = eax_1->x;
00535672      this->m_fOrigin.y = eax_1->y;
00535672      this->m_fOrigin.z = eax_1->z;
00535707      Frame::set_rotate(this, ((float)((((((long double)arg2->qw) * ((long double)arg3->qw)) + (((long double)arg3->qy) * ((long double)arg2->qy))) + (((long double)arg2->qx) * ((long double)arg3->qx))) + (((long double)arg2->qz) * ((long double)arg3->qz)))), ((float)((((((long double)arg2->qx) * ((long double)arg3->qw)) - (((long double)arg2->qw) * ((long double)arg3->qx))) - (((long double)arg3->qy) * ((long double)arg2->qz))) + (((long double)arg2->qy) * ((long double)arg3->qz)))), ((float)((((((long double)arg2->qz) * ((long double)arg3->qx)) + (((long double)arg3->qw) * ((long double)arg2->qy))) - (((long double)arg3->qy) * ((long double)arg2->qw))) - (((long double)arg2->qx) * ((long double)arg3->qz)))), ((float)((((((long double)arg2->qz) * ((long double)arg3->qw)) - (((long double)arg2->qy) * ((long double)arg3->qx))) + (((long double)arg2->qx) * ((long double)arg3->qy))) - (((long double)arg2->qw) * ((long double)arg3->qz)))));
00535650  }

00535715                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00535720  class AC1Legacy::Vector3* __thiscall Frame::get_vector_heading(class Frame const* this, class AC1Legacy::Vector3* __return)

00535720  {
0053573f      long double x87_r6_3 = (((((long double)this->m_fl2gv[7]) + ((long double)this->m_fl2gv[1])) * ((long double)0f)) + ((long double)this->m_fl2gv[4]));
0053574e      long double x87_r5_3 = (((((long double)this->m_fl2gv[8]) + ((long double)this->m_fl2gv[2])) * ((long double)0f)) + ((long double)this->m_fl2gv[5]));
00535753      __return->x = ((float)(((((long double)this->m_fl2gv[6]) + ((long double)this->m_fl2gv[0])) * ((long double)0f)) + ((long double)this->m_fl2gv[3])));
00535755      __return->y = ((float)x87_r6_3);
00535758      __return->z = ((float)x87_r5_3);
0053575b      return __return;
00535720  }

0053575e                                                                                            90 90                                ..

00535760  int32_t __fastcall Frame::get_heading(class Frame const* this)

00535760  {
00535760      class Frame* this_1 = this;
00535781      long double st1 = __fpatan((((((long double)this->m_fl2gv[6]) + ((long double)this->m_fl2gv[0])) * ((long double)0f)) + ((long double)this->m_fl2gv[3])), (((((long double)this->m_fl2gv[7]) + ((long double)this->m_fl2gv[1])) * ((long double)0f)) + ((long double)this->m_fl2gv[4])));
0053579f      return j__CIfmod(((float)(((long double)450.0) - (st1 * ((long double)57.295779513082323)))));
00535760  }


005357a0  void __thiscall Frame::grotate(class Frame* this, class AC1Legacy::Vector3 const* arg2)

005357a0  {
005357a0      class AC1Legacy::Vector3* edx = arg2;
005357a4      edx->z;
005357aa      edx->y;
005357ad      long double x87_r5 = ((long double)edx->x);
005357cb      long double x87_r6_3 = (((long double)0.000199999995f) * ((long double)0.000199999995f));
005357d3      (x87_r5 - x87_r6_3);
005357d5      int32_t eax;
005357d5      eax = ((((x87_r5 < x87_r6_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r6_3))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r6_3) ? 1 : 0) << 0xe) | 0x3800))));
005357d7      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005357d7      
005357da      if (!(p))
005358be          return;
005358be      
005357e0      long double x87_r7_2 = sqrtl(x87_r5);
005357ed      float var_4 = ((float)(((long double)1.0) / x87_r7_2));
005357f1      long double x87_r7_3 = (x87_r7_2 * ((long double)0.5));
005357f9      long double st0;
005357f9      bool c2_1;
005357f9      st0 = __fsin(x87_r7_3);
005357fd      long double st0_1;
005357fd      bool c2_2;
005357fd      st0_1 = __fcos(x87_r7_3);
005357ff      arg2 = ((float)st0_1);
0053580b      float var_c = ((float)((st0 * ((long double)edx->x)) * ((long double)var_4)));
00535818      float var_8 = ((float)((((long double)var_4) * st0) * ((long double)edx->y)));
00535820      long double x87_r7_6 = ((st0 * ((long double)var_4)) * ((long double)edx->z));
005358ae      Frame::set_rotate(this, ((float)((((((long double)arg2) * ((long double)this->qw)) - (((long double)var_c) * ((long double)this->qx))) - (((long double)var_8) * ((long double)this->qy))) - (x87_r7_6 * ((long double)this->qz)))), ((float)((((((long double)arg2) * ((long double)this->qx)) + (((long double)var_8) * ((long double)this->qz))) + (((long double)var_c) * ((long double)this->qw))) - (x87_r7_6 * ((long double)this->qy)))), ((float)((((((long double)arg2) * ((long double)this->qy)) - (((long double)var_c) * ((long double)this->qz))) + (x87_r7_6 * ((long double)this->qx))) + (((long double)var_8) * ((long double)this->qw)))), ((float)((((((long double)var_c) * ((long double)this->qy)) + (((long double)arg2) * ((long double)this->qz))) - (((long double)var_8) * ((long double)this->qx))) + (x87_r7_6 * ((long double)this->qw)))));
005357a0  }

005358c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005358d0  void __fastcall Frame::cache_quaternion(class Frame* this)

005358d0  {
005358dc      long double x87_r7_2 = (((((long double)this->m_fl2gv[0]) + ((long double)this->m_fl2gv[4])) + ((long double)this->m_fl2gv[8])) + ((long double)1f));
005358e2      long double x87_r6 = ((long double)0.000199999995f);
005358ea      (x87_r7_2 - x87_r6);
005358f1      double var_20;
005358f1      double var_18;
005358f1      double var_8;
005358f1      long double x87_r7_5;
005358f1      
005358f1      if ((*(uint8_t*)((char*)((((x87_r7_2 < x87_r6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, x87_r6))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == x87_r6) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
005358f1      {
0053592e          int32_t edx_1 = 0;
00535930          long double x87_r7_6 = ((long double)this->m_fl2gv[4]);
00535933          int32_t var_2c = 1;
0053593b          long double temp0_1 = ((long double)this->m_fl2gv[0]);
0053593b          (x87_r7_6 - temp0_1);
0053593e          int32_t var_28_1 = 2;
00535946          int32_t var_24_1 = 0;
00535946          
0053594f          if ((*(uint8_t*)((char*)((((x87_r7_6 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00535951              edx_1 = 1;
00535951          
00535956          long double x87_r7_7 = ((long double)this->m_fl2gv[8]);
0053595f          long double temp1_1 = ((long double)*(uint32_t*)(((edx_1 + 1) << 4) + this));
0053595f          (x87_r7_7 - temp1_1);
00535962          int32_t eax_2;
00535962          eax_2 = ((((x87_r7_7 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00535962          
00535967          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
00535969              edx_1 = 2;
00535969          
00535971          int32_t esi_1 = &var_2c[edx_1];
00535976          int32_t edi_1 = &var_2c[esi_1];
0053599b          long double x87_r7_12 = sqrtl(((((long double)*(uint32_t*)(((edx_1 + 1) << 4) + this)) - (((long double)*(uint32_t*)(((edi_1 + 1) << 4) + this)) + ((long double)*(uint32_t*)((char*)this + ((esi_1 + 1) << 4))))) + ((long double)1.0)));
005359a5          &var_20[edx_1] = ((double)(((long double)0.5) * x87_r7_12));
005359a9          long double x87_r6_13 = ((long double)0.000199999995f);
005359b1          (x87_r7_12 - x87_r6_13);
005359b3          float* eax_4;
005359b3          eax_4 = ((((x87_r7_12 < x87_r6_13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, x87_r6_13))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == x87_r6_13) ? 1 : 0) << 0xe) | 0x3800))));
005359b3          
005359b8          if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) == 0)
005359ba              x87_r7_12 = (((long double)0.5) / x87_r7_12);
005359ba          
005359c0          int32_t eax_5 = (esi_1 * 3);
005359d3          int32_t ebx_5 = (edx_1 * 3);
005359df          var_8 = ((double)((((long double)this->m_fl2gv[(eax_5 + edi_1)]) - ((long double)this->m_fl2gv[((edi_1 * 3) + esi_1)])) * x87_r7_12));
005359f2          &var_20[esi_1] = ((double)((((long double)this->m_fl2gv[(ebx_5 + esi_1)]) - ((long double)this->m_fl2gv[(eax_5 + edx_1)])) * x87_r7_12));
00535a00          &var_20[edi_1] = ((double)((((long double)this->m_fl2gv[(ebx_5 + edi_1)]) - ((long double)this->m_fl2gv[((edi_1 * 3) + edx_1)])) * x87_r7_12));
00535a09          double var_10;
00535a09          x87_r7_5 = ((long double)var_10);
005358f1      }
005358f1      else
005358f1      {
005358f5          long double x87_r7_4 = (((long double)0.5) / sqrtl(x87_r7_2));
00535903          var_8 = ((double)(((long double)0.25) / x87_r7_4));
0053590f          var_20 = ((double)((((long double)this->m_fl2gv[5]) - ((long double)this->m_fl2gv[7])) * x87_r7_4));
0053591b          var_18 = ((double)((((long double)this->m_fl2gv[6]) - ((long double)this->m_fl2gv[2])) * x87_r7_4));
00535925          x87_r7_5 = (x87_r7_4 * (((long double)this->m_fl2gv[1]) - ((long double)this->m_fl2gv[3])));
005358f1      }
005358f1      
00535a2c      Frame::set_rotate(this, ((float)((long double)var_8)), ((float)((long double)var_20)), ((float)((long double)var_18)), ((float)x87_r7_5));
005358d0  }

00535a35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00535a40  void __thiscall Frame::rotate_around_axis_to_vector(class Frame* this, int32_t arg2, class AC1Legacy::Vector3 const* arg3)

00535a40  {
00535a4b      int32_t eax = (arg2 * 3);
00535a52      float ecx = this->m_fl2gv[eax];
00535a61      float var_20 = ((float)((long double)this->m_fl2gv[(1 + eax)]));
00535a6c      float var_1c = ((float)((long double)*(uint32_t*)((char*)this + (((arg2 * 3) + 6) << 2))));
00535a78      long double x87_r7_3 = (((long double)var_1c) * ((long double)arg3->z));
00535a7b      int32_t var_c = 2;
00535a87      int32_t var_8 = 0;
00535a92      int32_t var_4 = 1;
00535aa2      long double x87_r7_5 = ((x87_r7_3 + (((long double)var_20) * ((long double)arg3->y))) + (((long double)ecx) * ((long double)arg3->x)));
00535ab0      float var_14 = ((float)(((long double)var_20) * x87_r7_5));
00535aba      float var_10 = ((float)(((long double)var_1c) * x87_r7_5));
00535ac2      float var_30 = ((float)(((long double)arg3->x) - (((long double)ecx) * x87_r7_5)));
00535ad1      float var_2c = ((float)(((long double)arg3->y) - ((long double)var_14)));
00535adc      int32_t var_28 = ((float)(((long double)arg3->z) - ((long double)var_10)));
00535ae7      int32_t eax_2;
00535ae7      
00535ae7      if (AC1Legacy::Vector3::normalize_check_small(&var_30) != 0)
00535ae7      {
00535ae9          int32_t eax_3 = &var_c[arg2];
00535aed          int32_t ecx_2 = (eax_3 * 3);
00535af4          float edx_1 = this->m_fl2gv[ecx_2];
00535aff          float var_14_1 = ((float)((long double)this->m_fl2gv[(1 + ecx_2)]));
00535b0c          eax_2 = ((float)((long double)*(uint32_t*)((char*)this + (((eax_3 * 3) + 6) << 2))));
00535b10          float var_18_1 = edx_1;
00535b18          var_30 = edx_1;
00535b1c          var_2c = var_14_1;
00535b20          var_28 = eax_2;
00535ae7      }
00535ae7      
00535b40      long double x87_r7_17 = fabsl((((((long double)var_28) * ((long double)var_1c)) + (((long double)var_2c) * ((long double)var_20))) + (((long double)var_30) * ((long double)ecx))));
00535b48      long double x87_r6_11 = (((long double)0.000199999995f) * ((long double)5f));
00535b4e      (x87_r6_11 - x87_r7_17);
00535b50      eax_2 = ((((x87_r6_11 < x87_r7_17) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, x87_r7_17))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == x87_r7_17) ? 1 : 0) << 0xe) | 0))));
00535b52      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00535b52      
00535b55      if (p)
00535b55      {
00535b5b          int32_t eax_5 = &var_c[arg2];
00535b67          int32_t ecx_4 = (eax_5 * 3);
00535b6a          this->m_fl2gv[ecx_4] = var_30;
00535b72          this->m_fl2gv[(1 + ecx_4)] = var_2c;
00535b7c          *(uint32_t*)((char*)this + (((eax_5 * 3) + 6) << 2)) = ((float)((long double)var_28));
00535b7f          int32_t eax_6 = &var_c[eax_5];
00535b8e          void* ecx_7 = ((char*)this + (eax_6 * 0xc));
00535bc3          float var_10_2 = ((float)((((long double)var_20) * ((long double)var_30)) - (((long double)var_2c) * ((long double)ecx))));
00535bc7          long double x87_r7_22 = ((((long double)var_28) * ((long double)ecx)) - (((long double)var_1c) * ((long double)var_30)));
00535bc9          *(uint32_t*)((char*)ecx_7 + 0x10) = ((float)((((long double)var_2c) * ((long double)var_1c)) - (((long double)var_28) * ((long double)var_20))));
00535bcc          *(uint32_t*)((char*)ecx_7 + 0x14) = ((float)x87_r7_22);
00535bd5          *(uint32_t*)((char*)this + (((eax_6 * 3) + 6) << 2)) = ((float)((long double)var_10_2));
00535bd8          Frame::cache_quaternion(this);
00535b55      }
00535a40  }

00535be5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00535bf0  void __thiscall Frame::euler_set_rotate(class Frame* this, float arg2, float arg3, float arg4, int32_t arg5)

00535bf0  {
00535c1e      int32_t var_24;
00535c1e      int32_t var_20;
00535c1e      int32_t var_1c;
00535c1e      int32_t var_18;
00535c1e      int32_t var_14;
00535c1e      int32_t var_10;
00535c1e      EulGetOrd(arg5, &var_1c, &var_18, &var_14, &var_24, &var_20, &var_10, &arg5);
00535c31      long double x87_r7;
00535c31      
00535c31      if (arg5 != 1)
00535c41          x87_r7 = ((long double)arg4);
00535c31      else
00535c31      {
00535c37          x87_r7 = ((long double)arg2);
00535c3b          arg2 = arg4;
00535c31      }
00535c31      
00535c45      int32_t ecx_1 = var_20;
00535c45      
00535c4b      if (ecx_1 == 1)
00535c53          arg3 = ((float)-(((long double)arg3)));
00535c53      
00535c5f      long double x87_r6_4 = (((long double)arg2) * ((long double)0.5f));
00535c6a      int32_t edi = var_14;
00535c6e      long double x87_r5_1 = (((long double)arg3) * ((long double)0.5f));
00535c74      bool cond:0 = var_10 != 1;
00535c78      int32_t eax_3 = var_1c;
00535c82      arg3 = ((float)(x87_r7 * ((long double)0.5f)));
00535c88      long double st0;
00535c88      bool c2;
00535c88      st0 = __fcos(x87_r6_4);
00535c8a      arg4 = ((float)st0);
00535c92      long double st0_1;
00535c92      bool c2_1;
00535c92      st0_1 = __fcos(x87_r5_1);
00535c94      arg2 = ((float)st0_1);
00535c9c      long double st0_2;
00535c9c      bool c2_2;
00535c9c      st0_2 = __fcos(((long double)arg3));
00535c9e      arg5 = ((float)st0_2);
00535ca4      long double st0_3;
00535ca4      bool c2_3;
00535ca4      st0_3 = __fsin(x87_r6_4);
00535ca6      var_20 = ((float)st0_3);
00535caa      long double st0_4;
00535caa      bool c2_4;
00535caa      st0_4 = __fsin(x87_r5_1);
00535cb0      long double st0_5;
00535cb0      bool c2_5;
00535cb0      st0_5 = __fsin(((long double)arg3));
00535cba      var_24 = ((float)(((long double)arg5) * ((long double)arg4)));
00535cc4      arg3 = ((float)(((long double)arg4) * st0_5));
00535cd0      arg4 = ((float)(((long double)var_20) * ((long double)arg5)));
00535cd8      arg5 = ((float)(st0_5 * ((long double)var_20)));
00535cdc      long double x87_r6_11 = ((long double)arg4);
00535ce0      float var_c;
00535ce0      float* eax_5;
00535ce0      int32_t __saved_edi;
00535ce0      
00535ce0      if (cond:0)
00535ce0      {
00535d30          &var_c[eax_3] = ((float)((x87_r6_11 * ((long double)arg2)) - (((long double)arg3) * st0_4)));
00535d3c          eax_5 = &&__saved_edi[(var_18 + 8)];
00535d4c          *(uint32_t*)eax_5 = ((float)((((long double)var_24) * st0_4) + (((long double)arg5) * ((long double)arg2))));
00535d5e          &var_c[edi] = ((float)((((long double)arg3) * ((long double)arg2)) - (((long double)arg4) * st0_4)));
00535d72          arg2 = ((float)((((long double)arg5) * st0_4) + (((long double)var_24) * ((long double)arg2))));
00535ce0      }
00535ce0      else
00535ce0      {
00535cea          &var_c[eax_3] = ((float)((x87_r6_11 + ((long double)arg3)) * ((long double)arg2)));
00535cf6          eax_5 = &&__saved_edi[(var_18 + 8)];
00535d00          *(uint32_t*)eax_5 = ((float)((((long double)arg5) + ((long double)var_24)) * st0_4));
00535d0c          &var_c[edi] = ((float)((((long double)arg3) - ((long double)arg4)) * st0_4));
00535d1e          arg2 = ((float)((((long double)var_24) - ((long double)arg5)) * ((long double)arg2)));
00535ce0      }
00535ce0      
00535d7b      if (ecx_1 == 1)
00535d81          *(uint32_t*)eax_5 = ((float)-(((long double)*(uint32_t*)eax_5)));
00535d81      
00535d99      float var_8;
00535d99      float var_4;
00535d99      Frame::set_rotate(this, arg2, var_c, var_8, var_4);
00535bf0  }

00535da5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00535db0  void __thiscall Frame::set_vector_heading(class Frame* this, class AC1Legacy::Vector3 const* arg2)

00535db0  {
00535db7      float y = arg2->y;
00535dbf      float z = arg2->z;
00535dc2      float x = arg2->x;
00535dd2      int32_t eax_1 = AC1Legacy::Vector3::normalize_check_small(&x);
00535dd2      
00535dd9      if (eax_1 == 0)
00535dd9      {
00535df2          arg2 = ((float)(((long double)450.0) - (__fpatan(((long double)x), ((long double)y)) * ((long double)57.295779513082323))));
00535e09          int32_t var_18_1 = j__CIfmod(eax_1);
00535e1e          int32_t var_20_1 = j__CIasin(0, ((float)(-(((long double)360.0)) * ((long double)0.017453292519943295))));
00535e2a          Frame::euler_set_rotate(this, ((float)((((long double)z) * ((long double)57.295779513082323)) * ((long double)0.017453292519943295))));
00535dd9      }
00535db0  }

00535e36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00535e40  void __thiscall Frame::set_heading(class Frame* this, float arg2)

00535e40  {
00535e57      float var_4 = ((float)(((((long double)this->m_fl2gv[8]) + ((long double)this->m_fl2gv[2])) * ((long double)0f)) + ((long double)this->m_fl2gv[5])));
00535e5f      long double x87_r7_5 = (((long double)arg2) * ((long double)0.017453292519943295));
00535e67      long double st0;
00535e67      bool c2;
00535e67      st0 = __fsin(x87_r7_5);
00535e69      float var_c = ((float)st0);
00535e6d      long double st0_1;
00535e6d      bool c2_1;
00535e6d      st0_1 = __fcos(x87_r7_5);
00535e6f      float var_8 = ((float)st0_1);
00535e73      Frame::set_vector_heading(this, &var_c);
00535e40  }

00535e7e                                                                                            90 90                                ..

00535e80  enum PixelFormatID __fastcall ImgTex::get_image_type(class ImgTex const* this)

00535e80  {
00535e80      class RenderSurface* m_pImageData = this->m_pImageData;
00535e80      
00535e85      if (m_pImageData == 0)
00535e90          return 0;
00535e90      
00535e8d      return m_pImageData->pfDesc.format;
00535e80  }

00535e91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00535ea0  void __thiscall CSurface::SetPalette(class CSurface* this, class Palette* arg2)

00535ea0  {
00535ea3      class Palette* base1pal = this->base1pal;
00535ea3      
00535ea8      if (base1pal != 0)
00535ea8      {
00535eab          Palette::releasePalette(base1pal);
00535eb3          this->base1pal = nullptr;
00535ea8      }
00535ea8      
00535ec7      this->base1pal = Palette::copyRef(arg2);
00535ea0  }

00535ece                                            90 90                                                                ..

00535ed0  void CSurface::releaseCustomSurface(class CSurface* arg1)

00535ed0  {
00535ed6      /* jump -> arg1->vtable->Release */
00535ed0  }

00535ed9                                                                             90 90 90 90 90 90 90                           .......

00535ee0  int32_t __fastcall CSurface::ClearSurface(class CSurface* this)

00535ee0  {
00535ee8      if (this->m_pMaintainer != 0)
00535eed          return 0;
00535eed      
00535eee      class ImgTex* base1map = this->base1map;
00535eee      
00535ef3      if (base1map != 0)
00535ef3      {
00535ef5          base1map->vtable->Release();
00535efa          this->base1map = nullptr;
00535ef3      }
00535ef3      
00535f01      class Palette* base1pal = this->base1pal;
00535f01      
00535f06      if (base1pal != 0)
00535f06      {
00535f09          Palette::releasePalette(base1pal);
00535f11          this->base1pal = nullptr;
00535f06      }
00535f06      
00535f1e      return 1;
00535ee0  }

00535f1f                                                                                               90                                 .

00535f20  int32_t __thiscall CSurface::UsePalette(class CSurface* this, class Palette* arg2)

00535f20  {
00535f25      if (this->m_pMaintainer == 0)
00535f25      {
00535f30          if (this->handler == SH_CUSTOMDB)
00535f32              this->handler = SH_PALSHIFT;
00535f32          
00535f40          if ((this->handler == SH_PALSHIFT && arg2 != 0))
00535f40          {
00535f48              CSurface::SetPalette(this, arg2);
00535f52              return 1;
00535f40          }
00535f25      }
00535f25      
00535f44      return 0;
00535f20  }

00535f55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00535f60  int32_t __fastcall CSurface::RestorePalette(class CSurface* this)

00535f60  {
00535f68      if (this->m_pMaintainer == 0)
00535f68      {
00535f6a          class ImgTex* base1map = this->base1map;
00535f6a          
00535f6f          if (base1map != 0)
00535f6f          {
00535f76              class Palette* m_pPalette = base1map->m_pPalette;
00535f79              class Palette* base1pal = this->base1pal;
00535f79              
00535f7e              if (base1pal != 0)
00535f7e              {
00535f81                  Palette::releasePalette(base1pal);
00535f89                  this->base1pal = nullptr;
00535f7e              }
00535f7e              
00535f99              this->base1pal = Palette::copyRef(m_pPalette);
00535fa3              return 1;
00535f6f          }
00535f68      }
00535f68      
00535f74      return 0;
00535f60  }

00535fa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00535fb0  int32_t __thiscall CSurface::SetTextureAndPalette(class CSurface* this, class ImgTex* arg2, class Palette const* arg3)

00535fb0  {
00535fb3      bool cond:0 = (this->type & 4) == 0;
00535fb8      this->handler = SH_PALSHIFT;
00535fb8      
00535fbf      if (cond:0)
00535fd3          ImgTex::fCurrentTextureScale = ImgTex::fIndexedTextureScale;
00535fbf      else
00535fc6          ImgTex::fCurrentTextureScale = ImgTex::fClipmapTextureScale;
00535fc6      
00535ff0      class ImgTex* eax_3 = ImgTex::CreateCombinedTexture(arg2, arg3, (((int8_t)(this->type >> 2)) & 1));
00535ff0      
00535ffc      if (eax_3 == 0)
00536022          return 0;
00536022      
00535ffe      class ImgTex* base1map = this->base1map;
00535ffe      
00536003      if (base1map != 0)
00536003      {
00536005          base1map->vtable->Release();
0053600a          this->base1map = nullptr;
00536003      }
00536003      
00536011      this->base1map = eax_3;
0053601b      return 1;
00535fb0  }

00536025                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00536030  uint8_t __fastcall CSurface::PurgeResource(class CSurface* this)

00536030  {
00536033      uint8_t result = ArgumentParser::OnCommandLineEvaluationDone(this);
00536033      
0053603a      if (result == 0)
0053603d          return result;
0053603d      
00536042      if (this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c) != 4)
00536042      {
00536044          int32_t* ecx = *(int32_t*)((char*)this + 0x3c);
00536044          
00536049          if (ecx != 0)
00536049          {
0053604d              *(uint32_t*)(*(uint32_t*)ecx + 0x14)();
00536050              *(int32_t*)((char*)this + 0x3c) = 0;
00536049          }
00536042      }
00536042      
0053605a      return 1;
00536030  }

0053605b                                                                                   90 90 90 90 90                             .....

00536060  void __fastcall CSurface::CSurface(class CSurface* this)

00536060  {
0053606a      DBObj::DBObj(this, INVALID_DID.id);
00536074      GraphicsResource::GraphicsResource(&this->vtable);
0053607e      this->color_value = 0xffffffff;
00536081      this->solid_index = 0xffffffff;
00536084      this->vtable = 0x7c9728;
0053606f      this->vtable = &CSurface::`vftable';
00536090      this->type = 0;
00536093      this->handler = SH_UNKNOWN;
0053609c      this->indexed_texture_id.id = INVALID_DID.id;
005360a4      this->diffuse = 1f;
005360a7      this->base1map = nullptr;
005360aa      this->base1pal = nullptr;
005360ad      this->translucency = 0f;
005360b0      this->luminosity = 0f;
005360b9      this->orig_texture_id.id = INVALID_DID.id;
005360c5      this->orig_diffuse = 1f;
005360cf      this->orig_palette_id.id = INVALID_DID.id;
005360d5      this->orig_luminosity = 0f;
005360db      GraphicsResource::SetAutoRestore(&this->vtable, 1);
00536060  }

005360e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005360f0  void* __thiscall CSurface::`vector deleting destructor'(class CSurface* this, uint32_t arg2)

005360f0  {
005360f3      /* tailcall */
005360f3      return CSurface::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005360f0  }

005360f8                                                                          cc cc cc cc cc cc cc cc                          ........

00536100  void __thiscall CSurface::CSurface(class CSurface* this, class CSurface const* arg2)

00536100  {
0053610a      DBObj::DBObj(this, INVALID_DID.id);
00536114      GraphicsResource::GraphicsResource(&this->vtable);
0053610f      this->vtable = &CSurface::`vftable';
00536125      this->vtable = 0x7c9728;
00536125      
0053612b      if (this != arg2)
0053612b      {
00536134          this->type = arg2->type;
00536137          enum SurfaceHandlerEnum handler = arg2->handler;
00536137          
0053613d          if (handler != SH_DATABASE)
00536148              this->handler = handler;
0053613d          else
0053613f              this->handler = SH_CUSTOMDB;
0053613f          
0053614e          this->indexed_texture_id.id = arg2->indexed_texture_id.id;
00536151          this->base1map = nullptr;
00536158          this->base1pal = nullptr;
00536162          this->color_value = arg2->color_value;
00536168          this->solid_index = arg2->solid_index;
0053616e          this->translucency = arg2->translucency;
00536174          this->luminosity = arg2->luminosity;
0053617a          this->diffuse = arg2->diffuse;
00536183          this->orig_texture_id.id = arg2->orig_texture_id.id;
0053618f          this->orig_palette_id.id = arg2->orig_palette_id.id;
0053619b          this->orig_luminosity = arg2->orig_luminosity;
005361a7          this->orig_diffuse = arg2->orig_diffuse;
005361ad          class ImgTex* base1map = arg2->base1map;
005361ad          
005361b2          if (base1map != 0)
005361b2          {
005361b4              this->base1map = base1map;
005361b7              base1map->vtable->AddRef();
005361b2          }
005361b2          
005361bc          class Palette* base1pal_1 = arg2->base1pal;
005361bc          
005361c1          if (base1pal_1 != 0)
005361c1          {
005361c3              class Palette* base1pal = this->base1pal;
005361c3              
005361c8              if (base1pal != 0)
005361c8              {
005361cb                  Palette::releasePalette(base1pal);
005361d3                  this->base1pal = nullptr;
005361c8              }
005361c8              
005361e3              this->base1pal = Palette::copyRef(base1pal_1);
005361c1          }
0053612b      }
00536100  }

005361ed                                         90 90 90                                                               ...

005361f0  void __fastcall CSurface::Destroy(class CSurface* this)

005361f0  {
005361f3      class ImgTex* base1map = this->base1map;
005361f3      
005361fb      if (base1map != 0)
005361fb      {
005361fd          base1map->vtable->Release();
00536202          this->base1map = nullptr;
005361fb      }
005361fb      
00536205      class Palette* base1pal = this->base1pal;
00536205      
0053620a      if (base1pal != 0)
0053620a      {
0053620d          Palette::releasePalette(base1pal);
00536215          this->base1pal = nullptr;
0053620a      }
0053620a      
0053621b      this->type = 0;
0053621e      this->color_value = 0xffffffff;
00536221      this->solid_index = 0xffffffff;
0053622a      this->indexed_texture_id.id = INVALID_DID.id;
00536233      this->orig_texture_id.id = INVALID_DID.id;
0053623e      this->orig_palette_id.id = INVALID_DID.id;
00536244      this->translucency = 0f;
00536247      this->luminosity = 0f;
0053624f      this->orig_luminosity = 0f;
00536255      this->handler = SH_UNKNOWN;
00536259      this->diffuse = 1f;
0053625c      this->orig_diffuse = 1f;
005361f0  }

00536264              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00536270  class CSurface* CSurface::makeCustomSurface(enum SurfaceHandlerEnum arg1)

00536270  {
0053627c      if ((arg1 != SH_DATABASE && arg1 != SH_UNKNOWN))
0053627c      {
00536283          void* eax_1 = operator new(0x90);
00536283          
0053628d          if (eax_1 != 0)
0053628d          {
00536291              void* const result = CSurface::CSurface(eax_1);
00536291              
00536298              if (result == 0)
005362a2                  return result;
005362a2              
0053629a              *(uint32_t*)((char*)result + 0x5c) = arg1;
0053629e              return result;
0053628d          }
0053627c      }
0053627c      
0053629f      return nullptr;
00536270  }

005362a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005362b0  class CSurface* CSurface::makeCustomSurface(class CSurface* arg1)

005362b0  {
005362b7      if (arg1 != 0)
005362b7      {
005362be          void* eax_1 = operator new(0x90);
005362be          
005362c8          if (eax_1 != 0)
005362d3              return CSurface::CSurface(eax_1, arg1);
005362b7      }
005362b7      
005362d7      return 0;
005362b0  }

005362d8                                                                          90 90 90 90 90 90 90 90                          ........

005362e0  int32_t __thiscall CSurface::UseTextureMap(class CSurface* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

005362e0  {
005362e8      if (this->m_pMaintainer == 0)
005362e8      {
005362f3          if (this->handler == SH_CUSTOMDB)
005362f5              this->handler = SH_PALSHIFT;
005362f5          
0053630a          if ((this->handler == SH_PALSHIFT && (this->base1map != 0 || arg3 != 0)))
0053630a          {
00536316              if ((this->type & 6) == 0)
00536318                  this->type = 2;
00536318              
0053631f              this->indexed_texture_id.id = arg2;
00536322              class Palette* base1pal = this->base1pal;
00536322              
00536327              if (base1pal != 0)
00536327              {
0053632a                  Palette::releasePalette(base1pal);
00536332                  this->base1pal = nullptr;
00536327              }
00536327              
0053633f              return 1;
0053630a          }
005362e8      }
005362e8      
0053630f      return 0;
005362e0  }

00536342        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00536350  int32_t __thiscall CSurface::UseTextureMap(class CSurface* this, class ImgTex* arg2, enum SurfaceHandlerEnum arg3)

00536350  {
00536361      if ((this->m_pMaintainer != 0 || this->handler != arg3))
00536366          return 0;
00536366      
00536370      if (arg2 == 0)
00536376          return 0;
00536376      
00536379      class ImgTex* base1map = this->base1map;
00536379      
0053637e      if (base1map != 0)
0053637e      {
00536380          base1map->vtable->Release();
00536385          this->base1map = nullptr;
0053637e      }
0053637e      
0053638c      this->type = 2;
00536393      this->base1map = arg2;
00536396      arg2->vtable->AddRef();
00536396      
005363a9      if (this->orig_texture_id.id == INVALID_DID.id)
005363b1          this->orig_texture_id.id = this->base1map->m_DID.id;
005363b1      
005363b7      class Palette* base1pal = this->base1pal;
005363b7      
005363bc      if (base1pal != 0)
005363bc      {
005363bf          Palette::releasePalette(base1pal);
005363c7          this->base1pal = nullptr;
005363bc      }
005363bc      
005363d5      return 1;
00536350  }

005363d8                                                                          90 90 90 90 90 90 90 90                          ........

005363e0  class IDClass<_tagDataID,32,0>* __thiscall CSurface::GetOriginalTextureMapID(class CSurface const* this, class IDClass<_tagDataID,32,0>* __return)

005363e0  {
005363e6      uint32_t* result = __return;
005363ea      *(uint32_t*)result = this->orig_texture_id.id;
005363ec      return result;
005363e0  }

005363ef                                               90                                                                 .

005363f0  class IDClass<_tagDataID,32,0>* __thiscall CSurface::GetOriginalPaletteID(class CSurface* this, class IDClass<_tagDataID,32,0>* __return)

005363f0  {
005363f6      uint32_t* result = __return;
005363fa      *(uint32_t*)result = this->orig_palette_id.id;
005363fc      return result;
005363f0  }

005363ff                                                                                               90                                 .

00536400  void __thiscall CSurface::InitEnd(class CSurface* this, enum SurfaceInitType arg2)

00536400  {
00536408      uint32_t id = this->indexed_texture_id.id;
00536408      
0053640f      if (id == 0)
00536411          id = this->orig_texture_id.id;
00536411      
0053641e      if (id == 0)
0053641e      {
005364a5          class ImgTex* base1map_3 = this->base1map;
005364a5          
005364aa          if (base1map_3 != 0)
005364aa          {
005364ac              base1map_3->vtable->Release();
005364b1              this->base1map = nullptr;
005364aa          }
0053641e      }
0053641e      else if ((this->type & 6) != 0)
00536428      {
0053643b          void var_8;
0053643b          class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0xb));
0053643b          
00536447          if (eax_1 != 0)
00536447          {
00536449              class ImgTex* base1map_1 = this->base1map;
00536449              
0053644e              if (base1map_1 != 0)
0053644e              {
00536450                  base1map_1->vtable->Release();
00536455                  this->base1map = nullptr;
0053644e              }
0053644e              
00536458              this->base1map = eax_1;
00536458              
0053645e              if (*(int32_t*)((char*)eax_1 + 0x68) != 0)
0053645e              {
00536466                  this->indexed_texture_id.id = eax_1->m_DID.id;
00536466                  
00536469                  if (this->base1pal == 0)
00536469                  {
0053646b                      class Palette* edi_2 = *(int32_t*)((char*)eax_1 + 0x68);
0053646b                      
00536470                      if (edi_2 != 0)
00536470                      {
00536475                          CSurface::SetPalette(this, edi_2);
00536475                          
00536482                          if ((arg2 == SurfaceInitLoading || arg2 == SurfaceInitCadding))
0053648a                              this->orig_palette_id.id = this->base1pal->m_DID.id;
00536470                      }
00536469                  }
0053645e              }
00536447          }
00536447          else if (arg2 == SurfaceInitRestoring)
00536495          {
00536497              class ImgTex* base1map_2 = this->base1map;
00536497              
0053649c              if (base1map_2 != 0)
0053649c              {
0053649e                  base1map_2->vtable->Release();
005364b1                  this->base1map = nullptr;
0053649c              }
00536495          }
00536428      }
00536428      
005364b4      class ImgTex* base1map = this->base1map;
005364b4      
005364ba      if (base1map != 0)
005364ba      {
005364bc          class RenderSurface* m_pImageData = base1map->m_pImageData;
005364bc          
005364ca          if ((m_pImageData == 0 || m_pImageData->pfDesc.format != PFID_P8))
005364ca          {
005364cc              class RenderSurface* m_pImageData_1 = base1map->m_pImageData;
005364cc              
005364da              if ((m_pImageData_1 != 0 && m_pImageData_1->pfDesc.format == PFID_INDEX16))
005364da                  goto label_5364dc;
005364ca          }
005364ca          else
005364ca          {
005364dc          label_5364dc:
005364dc              
005364df              if (arg2 != SurfaceInitCadding)
005364df              {
005364e1                  class Palette* base1pal = this->base1pal;
005364e1                  
005364e6                  if (base1pal != 0)
005364ec                      base1map = CSurface::SetTextureAndPalette(this, base1map, base1pal);
005364ec                  
005364f3                  if ((base1pal == 0 || base1map == 0))
005364f3                  {
005364f5                      class ImgTex* base1map_4 = this->base1map;
005364f5                      
005364fa                      if (base1map_4 != 0)
005364fa                      {
005364fc                          base1map_4->vtable->Release();
00536501                          this->base1map = nullptr;
005364fa                      }
005364f3                  }
005364df              }
005364ca          }
005364ba      }
005364ba      
00536504      long double x87_r7 = ((long double)this->translucency);
00536507      long double temp1 = ((long double)0.000199999995f);
00536507      (x87_r7 - temp1);
0053650d      base1map = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0053650d      
00536512      if ((*(uint8_t*)((char*)base1map)[1] & 0x41) == 0)
00536514          this->type |= 0x10;
00536400  }

00536521     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00536530  uint8_t __fastcall CSurface::RestorePalShiftSurface(class CSurface* this)

00536530  {
00536542      int32_t ebx;
00536542      ebx = 0;
0053654f      void var_8;
0053654f      class DBObj* edi = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, this->indexed_texture_id.id, 0xb));
00536556      class DBObj* eax_2;
00536556      
00536556      if (edi != 0)
00536556      {
00536558          eax_2 = *(int32_t*)((char*)edi + 0x38);
00536558          
0053655d          if (eax_2 != 0)
00536565              *(uint32_t*)(*(int32_t*)((char*)edi + 0x30) + 0xc)();
00536565          
00536569          class Palette* base1pal = this->base1pal;
00536569          
0053656e          if (base1pal != 0)
0053656e          {
00536577          label_536577:
00536577              class ImgTex* base1map = this->base1map;
00536577              
0053657c              if (base1map != 0)
0053657c              {
0053657e                  base1map->vtable->Release();
00536583                  this->base1map = nullptr;
0053657c              }
0053657c              
0053658e              if ((this->type & 4) == 0)
005365a2                  ImgTex::fCurrentTextureScale = ImgTex::fIndexedTextureScale;
0053658e              else
00536595                  ImgTex::fCurrentTextureScale = ImgTex::fClipmapTextureScale;
00536595              
005365b7              class ImgTex* eax_5 = ImgTex::CreateCombinedTexture(edi, base1pal, (((int8_t)(this->type >> 2)) & 1));
005365c1              this->base1map = eax_5;
005365c1              
005365c4              if (eax_5 != 0)
005365c6                  ebx = 1;
0053656e          }
0053656e          else
0053656e          {
00536570              base1pal = *(int32_t*)((char*)edi + 0x68);
00536570              
00536575              if (base1pal != 0)
00536575                  goto label_536577;
0053656e          }
0053656e          
005365c8          edi->vtable->Release();
00536556      }
00536556      
005365d2      eax_2 = ebx;
005365d8      return eax_2;
00536530  }

005365d9                                                                             90 90 90 90 90 90 90                           .......

005365e0  class DBObj* CSurface::Allocate(class CSurface const* this @ ecx)

005365e0  {
005365e0      /* tailcall */
005365e0      return CSurface::Allocator();
005365e0  }

005365e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005365f0  void __thiscall CSurface::Serialize(class CSurface* this, class Archive* arg2)

005365f0  {
005365fd      Archive::CheckAlignment(arg2, 4);
00536606      uint8_t* eax = Archive::GetBytes(arg2, 4);
00536606      
00536612      if (eax != 0)
00536612      {
00536617          if ((arg2->m_flags & 1) == 0)
00536622              this->type = *(uint32_t*)eax;
00536617          else
0053661c              *(uint32_t*)eax = this->type;
00536612      }
00536612      
0053662d      if ((this->type & 6) == 0)
0053662d      {
00536687          Archive::CheckAlignment(arg2, 4);
00536690          uint32_t* eax_3 = Archive::GetBytes(arg2, 4);
00536690          
00536697          if (eax_3 != 0)
00536697          {
0053669c              if ((arg2->m_flags & 1) == 0)
005366a7                  this->color_value = *(uint32_t*)eax_3;
0053669c              else
005366a1                  *(uint32_t*)eax_3 = this->color_value;
00536697          }
0053662d      }
0053662d      else
0053662d      {
0053662f          Archive::CheckAlignment(arg2, 4);
00536638          uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
00536638          
0053663f          if (eax_1 != 0)
0053663f          {
00536644              if ((arg2->m_flags & 1) == 0)
00536652                  this->orig_texture_id.id = *(uint32_t*)eax_1;
00536644              else
0053664c                  *(uint32_t*)eax_1 = this->orig_texture_id.id;
0053663f          }
0053663f          
0053665c          Archive::CheckAlignment(arg2, 4);
00536665          uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
00536665          
0053666c          if (eax_2 != 0)
0053666c          {
00536671              if ((arg2->m_flags & 1) == 0)
0053667f                  this->orig_palette_id.id = *(uint32_t*)eax_2;
00536671              else
00536679                  *(uint32_t*)eax_2 = this->orig_palette_id.id;
0053666c          }
0053662d      }
0053662d      
005366ae      Archive::CheckAlignment(arg2, 4);
005366b7      uint8_t* eax_4 = Archive::GetBytes(arg2, 4);
005366b7      
005366be      if (eax_4 != 0)
005366be      {
005366c3          if ((arg2->m_flags & 1) == 0)
005366ce              this->translucency = *(uint32_t*)eax_4;
005366c3          else
005366c8              *(uint32_t*)eax_4 = this->translucency;
005366be      }
005366be      
005366d5      Archive::CheckAlignment(arg2, 4);
005366de      uint8_t* eax_5 = Archive::GetBytes(arg2, 4);
005366de      
005366e5      if (eax_5 != 0)
005366e5      {
005366ea          if ((arg2->m_flags & 1) == 0)
005366f5              this->luminosity = *(uint32_t*)eax_5;
005366ea          else
005366ef              *(uint32_t*)eax_5 = this->luminosity;
005366e5      }
005366e5      
005366fc      Archive::CheckAlignment(arg2, 4);
00536705      float* eax_6 = Archive::GetBytes(arg2, 4);
00536705      
0053670c      if (eax_6 != 0)
0053670c      {
00536711          if ((arg2->m_flags & 1) == 0)
0053671c              this->diffuse = *(uint32_t*)eax_6;
00536711          else
00536716              *(uint32_t*)eax_6 = this->diffuse;
0053670c      }
0053670c      
0053671f      eax_6 = arg2->m_flags;
00536722      eax_6 = !(eax_6);
00536722      
00536726      if ((1 & eax_6) != 0)
00536726      {
0053672b          float diffuse = this->diffuse;
0053672e          this->orig_luminosity = this->luminosity;
00536737          this->orig_diffuse = diffuse;
0053673d          this->handler = SH_DATABASE;
00536740          CSurface::InitEnd(this, SurfaceInitLoading);
00536726      }
005365f0  }

0053674b                                   90 90 90 90 90                                                             .....

00536750  void __thiscall CSurface::GetSubDataIDs(class CSurface const* this, class QualifiedDataIDArray* arg2)

00536750  {
0053676c      void var_8;
0053676c      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->orig_texture_id.id, 0), 0);
00536750  }

00536777                                                                       90 90 90 90 90 90 90 90 90                         .........

00536780  uint8_t __fastcall CSurface::RestoreLostSurface(class CSurface* this)

00536780  {
0053678a      int32_t ebx;
0053678a      ebx = 0;
0053678c      class ImgTex* eax_1 = (this->handler - 1);
0053678c      
00536790      if (eax_1 > 3)
00536790      {
00536826      label_536826:
00536826          class ImgTex* base1map = this->base1map;
00536826          
0053682b          if (base1map != 0)
0053682b          {
0053682d              base1map->vtable->Release();
00536832              this->base1map = nullptr;
0053682b          }
00536790      }
00536790      else
00536796          switch (eax_1)
00536796          {
005367a2              case nullptr:
005367a2              case 3:
005367a2              {
005367a2                  ImgTex::fCurrentTextureScale = ImgTex::fRGBATextureScale;
005367a2                  
005367ac                  if (this->base1map == 0)
005367ac                  {
005367c1                      void var_8;
005367c1                      eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, this->orig_texture_id.id, 0xb));
005367cb                      this->base1map = eax_1;
005367ac                  }
005367ac                  
005367ce                  if ((this->base1map == 0 && eax_1 == 0))
005367ce                      goto label_536826;
005367ce                  
005367d1                  eax_1 = 1;
005367d7                  return 1;
005367a2                  break;
005367a2              }
005367dd              case 1:
005367dd              {
005367dd                  if (this->indexed_texture_id.id != 0)
005367dd                  {
005367e1                      eax_1 = CSurface::RestorePalShiftSurface(this);
005367e6                      goto label_536820;
005367dd                  }
005367dd                  
005367ed                  if (this->base1map == 0)
005367ed                  {
005367f6                      eax_1 = ImgTex::Get(this->orig_texture_id.id);
00536800                      this->base1map = eax_1;
00536800                      
00536803                      if (eax_1 != 0)
00536803                      {
00536806                          eax_1 = 1;
0053680c                          return 1;
00536803                      }
005367ed                  }
005367ed                  
005367ed                  goto label_536826;
005367dd              }
0053680e              case 2:
0053680e              {
0053680e                  ImgTex::fCurrentTextureScale = FULL_RES;
00536818                  eax_1 = TexMerge::RestoreSurface(this);
00536820              label_536820:
00536820                  ebx = eax_1;
00536820                  
00536824                  if (ebx == 0)
00536824                      goto label_536826;
0053680e                  break;
0053680e              }
00536796          }
00536796      
0053683a      eax_1 = ebx;
00536840      return eax_1;
00536780  }

00536841     8d 49 00                                                                                       .I.
00536844  uint32_t jump_table_536844[0x4] = 
00536844  {
00536844      [0x0] =  0x0053679d
00536848      [0x1] =  0x005367d8
0053684c      [0x2] =  0x0053680d
00536850      [0x3] =  0x0053679d
00536854  }

00536854                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00536860  void* __thiscall CSurface::`scalar deleting destructor'(class CSurface* this, uint32_t arg2)

00536860  {
00536867      this->vtable = 0x7c9728;
00536864      this->vtable = &CSurface::`vftable';
00536873      CSurface::Destroy(this);
0053687a      GraphicsResource::~GraphicsResource(&this->vtable);
00536881      DBObj::~DBObj(this);
00536881      
0053688b      if ((arg2 & 1) != 0)
0053688e          operator delete(this);
0053688e      
0053689a      return this;
00536860  }

0053689d                                                                                         90 90 90                               ...

005368a0  uint8_t __fastcall CSurface::RestoreResource(class CSurface* this)

005368a0  {
005368ac      int32_t ebx;
005368ac      ebx = GraphicsResource::RestoreResource(this);
005368ac      
005368b2      if ((this->m_DID*(int32_t*)((char*)this + 0x28) & 6) != 0)
005368b9          ebx &= CSurface::RestoreLostSurface(((char*)this - 0x30));
005368b9      
005368bd      if (ebx != 0)
005368c1          GraphicsResource::MarkResourceAsNotLost(this);
005368c1      
005368ca      return ebx;
005368a0  }

005368cb                                   90 90 90 90 90                                                             .....

005368d0  int32_t __thiscall SPHEREPATH::is_walkable_allowable(class SPHEREPATH* this, float arg2)

005368d0  {
005368d0      long double x87_r7 = ((long double)arg2);
005368d4      long double temp1 = ((long double)this->walkable_allowance);
005368d4      (x87_r7 - temp1);
005368d4      
005368df      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
005368eb          return 0;
005368eb      
005368e6      return 1;
005368d0  }

005368ee                                            90 90                                                                ..

005368f0  class AC1Legacy::Vector3* __stdcall CSphere::find_time_of_collision(class CSphere const* this @ ecx, class AC1Legacy::Vector3 const* arg2, class AC1Legacy::Vector3 const* arg3, float const arg4)

005368f0  {
005368f4      arg2->z;
005368fb      arg2->y;
00536901      long double x87_r5 = ((long double)arg2->x);
0053692b      (((((long double)arg3->z) * ((long double)arg2->z)) + (((long double)arg3->y) * ((long double)arg2->y))) + (((long double)arg2->x) * ((long double)arg3->x)));
0053692f      long double x87_r5_5 = ((long double)arg3->z);
00536932      long double x87_r4_4 = ((long double)arg3->y);
00536935      long double x87_r3_4 = ((long double)arg3->x);
0053694f      long double x87_r2_4 = ((((x87_r3_4 * x87_r3_4) + (x87_r4_4 * x87_r4_4)) + (x87_r5_5 * x87_r5_5)) - (((long double)arg4) * ((long double)arg4)));
00536957      long double x87_r4_6 = ((long double)0.000199999995f);
0053695f      (x87_r3_4 - x87_r4_6);
00536961      class AC1Legacy::Vector3* result;
00536961      result = ((((x87_r3_4 < x87_r4_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_4, x87_r4_6))) ? 1 : 0) << 0xa) | ((((x87_r3_4 == x87_r4_6) ? 1 : 0) << 0xe) | 0x2800))));
00536963      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00536963      
00536966      if (p)
00536966      {
00536970          long double x87_r5_6 = ((x87_r2_4 * x87_r2_4) - (x87_r3_4 * x87_r5));
00536972          long double x87_r4_11 = ((long double)0.000199999995f);
0053697a          (x87_r5 - x87_r4_11);
0053697c          result = ((((x87_r5 < x87_r4_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r4_11))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r4_11) ? 1 : 0) << 0xe) | 0x2800))));
0053697e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053697e          
00536981          if (p_1)
00536981          {
00536983              long double temp1_1 = ((long double)0.0);
00536983              (x87_r5_6 - temp1_1);
00536989              result = ((((x87_r5_6 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_6, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r5_6 == temp1_1) ? 1 : 0) << 0xe) | 0x2800))));
0053698b              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0053698b              
0053698e              if (p_2)
0053698e              {
00536994                  long double x87_r4_13 = (x87_r2_4 - sqrtl(x87_r5_6));
00536996                  double var_8 = ((double)x87_r4_13);
0053699a                  long double temp2 = ((long double)0.0);
0053699a                  (x87_r4_13 - temp2);
005369a0                  result = ((((x87_r4_13 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_13, temp2))) ? 1 : 0) << 0xa) | ((((x87_r4_13 == temp2) ? 1 : 0) << 0xe) | 0x2800))));
0053698e              }
00536981          }
00536966      }
00536966      
005369d0      return result;
005368f0  }

005369d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005369e0  int32_t __stdcall CSphere::collides_with_sphere(class CSphere const* this @ ecx, class AC1Legacy::Vector3 const* arg2, float const arg3)

005369e0  {
005369e4      long double x87_r7 = ((long double)arg2->z);
005369e7      long double x87_r6 = ((long double)arg2->y);
005369ea      long double x87_r5 = ((long double)arg2->x);
005369fa      long double x87_r4_3 = (((x87_r5 * x87_r5) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7));
00536a00      long double x87_r3_5 = (((long double)arg3) * ((long double)arg3));
00536a04      (x87_r3_5 - x87_r4_3);
00536a08      class AC1Legacy::Vector3* eax;
00536a08      bool c1;
00536a08      eax = ((((x87_r3_5 < x87_r4_3) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_5, x87_r4_3))) ? 1 : 0) << 0xa) | ((((x87_r3_5 == x87_r4_3) ? 1 : 0) << 0xe) | 0x3000))));
00536a08      
00536a11      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
00536a1d          return 0;
00536a1d      
00536a18      return 1;
005369e0  }


00536a20  void __thiscall Plane::Plane(class Plane* this, class AC1Legacy::Vector3 const* arg2, class AC1Legacy::Vector3 const* arg3)

00536a20  {
00536a29      float* this_1 = this;
00536a2b      *(uint32_t*)this_1 = arg2->x;
00536a30      this_1[1] = arg2->y;
00536a36      this_1[2] = arg2->z;
00536a54      this->d = ((float)-((((((long double)arg3->z) * ((long double)this->N.z)) + (((long double)arg3->y) * ((long double)this->N.y))) + (((long double)arg3->x) * ((long double)this->N.x)))));
00536a20  }

00536a5a                                                                                90 90 90 90 90 90                            ......

00536a60  void __thiscall SPHEREPATH::add_offset_to_check_pos(class SPHEREPATH* this, class AC1Legacy::Vector3 const* arg2, float const arg3)

00536a60  {
00536a64      this->cell_array_valid = 0;
00536a77      this->check_pos.frame.m_fOrigin.x = ((float)(((long double)this->check_pos.frame.m_fOrigin.x) + ((long double)arg2->x)));
00536a86      this->check_pos.frame.m_fOrigin.y = ((float)(((long double)arg2->y) + ((long double)this->check_pos.frame.m_fOrigin.y)));
00536a95      this->check_pos.frame.m_fOrigin.z = ((float)(((long double)arg2->z) + ((long double)this->check_pos.frame.m_fOrigin.z)));
00536a9b      SPHEREPATH::cache_global_sphere(this, arg2);
00536a60  }

00536aa3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00536ab0  void CSphere::attack(class Position const* arg1, float const arg2, float const arg3, class Position const* arg4, class Vec2D const* arg5, class Vec2D const* arg6, float const arg7, float const arg8)

00536ab0  {
00536aca      int32_t var_18 = 0;
00536ad2      int32_t var_14 = 0;
00536ada      int32_t var_10 = 0;
00536ae2      float __return;
00536ae2      Position::localtolocal(arg4, &__return, arg1, &var_18);
00536aeb      (((long double)arg8) - ((long double)0f));
00536af3      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00536af3      
00536af6      if (p)
00536af6      {
00536afc          long double x87_r7_1 = ((long double)arg8);
00536b00          long double temp2_1 = ((long double)arg3);
00536b00          (x87_r7_1 - temp2_1);
00536b00          
00536b09          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00536b09          {
00536b13              long double x87_r7_3 = (((long double)arg2) + ((long double)arg7));
00536b29              float var_20;
00536b29              long double x87_r5_3 = ((((long double)var_20) * ((long double)var_20)) + (((long double)__return) * ((long double)__return)));
00536b31              long double x87_r4_4 = (x87_r7_3 * x87_r7_3);
00536b35              (x87_r5_3 - x87_r4_4);
00536b35              
00536b3e              if ((*(uint8_t*)((char*)((((x87_r5_3 < x87_r4_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_3, x87_r4_4))) ? 1 : 0) << 0xa) | ((((x87_r5_3 == x87_r4_4) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
00536b49                  return;
00536b49              
00536b4e              float var_1c;
00536b4e              long double x87_r6_3 = fabsl(((long double)var_1c));
00536b50              (x87_r6_3 - x87_r7_3);
00536b50              
00536b59              if ((*(uint8_t*)((char*)((((x87_r6_3 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_3) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
00536b59              {
00536b6c                  var_18 = 0;
00536b74                  int32_t var_14_1 = 0;
00536b7c                  int32_t var_10_1 = 0;
00536b84                  float __return_1;
00536b84                  Position::localtolocal(arg1, &__return_1, arg4, &var_18);
00536b8d                  (((long double)__return_1) - ((long double)0f));
00536b9a                  /* unimplemented  {test ah, 0x5} */;
00536ba8                  float var_8;
00536ba8                  (((long double)var_8) - ((long double)0f));
00536bb0                  /* unimplemented  {test ah, 0x5} */;
00536bbd                  long double x87_r7_7 = ((long double)arg8);
00536bc5                  long double x87_r6_5 = (((long double)arg3) * ((long double)0.33333299999999999));
00536bcb                  (x87_r6_5 - x87_r7_7);
00536bcb                  
00536bd2                  if ((*(uint8_t*)((char*)((((x87_r6_5 < x87_r7_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, x87_r7_7))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == x87_r7_7) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00536be7                      ((((long double)arg3) * ((long double)0.66666700000000001)) - ((long double)arg8));
00536be7                  
00536c02                  float* esi_1 = arg6;
00536c0f                  arg8 = ((float)((((long double)var_20) * ((long double)arg5->x)) - (((long double)__return) * ((long double)arg5->y))));
00536c22                  float var_2c_1 = ((float)((((long double)__return) * ((long double)esi_1[1])) - (((long double)var_20) * ((long double)*(uint32_t*)esi_1))));
00536c2a                  (((long double)arg8) - ((long double)0f));
00536c32                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
00536c35                  bool p_4;
00536c35                  
00536c35                  if (!(p_3))
00536c35                  {
00536c3b                      (((long double)var_2c_1) - ((long double)0f));
00536c43                      p_4 = /* p_4 = unimplemented  {test ah, 0x41} */;
00536c35                  }
00536c35                  
00536c46                  if ((!(p_3) && !(p_4)))
00536c4f                      return;
00536c4f                  
00536c5c                  (((((long double)arg5->x) * ((long double)esi_1[1])) - (((long double)arg5->y) * ((long double)*(uint32_t*)esi_1))) - ((long double)0f));
00536c64                  bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
00536c64                  
00536c67                  if (p_5)
00536c67                  {
00536cda                      ((((long double)var_2c_1) * ((long double)arg8)) - ((long double)0f));
00536ce2                      bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x41} */;
00536ce2                      
00536ce5                      if (!(p_7))
00536c4f                          return;
00536c4f                      
00536cef                      (((long double)arg8) - ((long double)arg2));
00536cf5                      bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x41} */;
00536cf5                      
00536cf8                      if (!(p_8))
00536c4f                          return;
00536c4f                      
00536cf8                      goto label_536d02;
00536c67                  }
00536c67                  
00536c69                  long double x87_r7_20 = ((long double)arg8);
00536c6d                  long double temp9_1 = ((long double)0f);
00536c6d                  (x87_r7_20 - temp9_1);
00536c6d                  
00536c78                  if ((*(uint8_t*)((char*)((((x87_r7_20 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_20, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_20 == temp9_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
00536c78                  {
00536d02                  label_536d02:
00536d02                      (((long double)var_2c_1) - ((long double)arg2));
00536d08                      /* unimplemented  {test ah, 0x41} */;
00536c78                  }
00536c78                  else
00536c78                  {
00536c7e                      long double x87_r7_21 = ((long double)var_2c_1);
00536c82                      long double temp12_1 = ((long double)0f);
00536c82                      (x87_r7_21 - temp12_1);
00536c82                      
00536c8d                      if ((*(uint8_t*)((char*)((((x87_r7_21 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == temp12_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
00536c8d                      {
00536caa                          long double x87_r7_24 = ((long double)arg8);
00536cae                          long double temp13_1 = ((long double)0f);
00536cae                          (x87_r7_24 - temp13_1);
00536cae                          
00536cb9                          if ((*(uint8_t*)((char*)((((x87_r7_24 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_24, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r7_24 == temp13_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
00536cb9                              goto label_536d02;
00536cb9                          
00536cbf                          (((long double)arg8) - ((long double)arg2));
00536cc5                          /* unimplemented  {test ah, 0x41} */;
00536c8d                      }
00536c8d                      else
00536c97                          ((((long double)arg2) * ((long double)arg2)) - ((long double)((float)x87_r5_3)));
00536c78                  }
00536b59              }
00536b09          }
00536af6      }
00536ab0  }

00536d19                                                                             90 90 90 90 90 90 90                           .......

00536d20  enum TransitionState __thiscall CSphere::step_sphere_down(class CSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3* arg6, float arg7)

00536d20  {
00536d25      class AC1Legacy::Vector3* esi = arg6;
00536d29      esi->z;
00536d2d      long double x87_r6 = ((long double)esi->y);
00536d3a      float var_30 = ((float)(x87_r6 * x87_r6));
00536d40      long double x87_r6_1 = ((long double)esi->x);
00536d46      float var_34 = ((float)(x87_r6_1 * x87_r6_1));
00536d54      long double x87_r6_5 = (((x87_r6_1 * x87_r6_1) + ((long double)var_34)) + ((long double)var_30));
00536d5c      long double x87_r5_5 = (((long double)arg7) * ((long double)arg7));
00536d60      (x87_r5_5 - x87_r6_5);
00536d62      int32_t eax;
00536d62      eax = ((((x87_r5_5 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_5, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r5_5 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3800))));
00536d69      float x;
00536d69      
00536d69      if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
00536d69      {
00536db6      label_536db6:
00536db6          long double x87_r7_10 = (((long double)arg3->step_down_amt) * ((long double)arg3->walk_interp));
00536dbc          arg6 = ((float)x87_r7_10);
00536dc0          long double x87_r7_11 = fabsl(x87_r7_10);
00536dc2          long double x87_r6_6 = ((long double)0.000199999995f);
00536dc8          (x87_r6_6 - x87_r7_11);
00536dca          eax = ((((x87_r6_6 < x87_r7_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_6, x87_r7_11))) ? 1 : 0) << 0xa) | ((((x87_r6_6 == x87_r7_11) ? 1 : 0) << 0xe) | 0))));
00536dca          
00536dcf          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00536f30              return 2;
00536f30          
00536ddb          long double x87_r7_13 = (((long double)0.000199999995f) + ((long double)arg7));
00536ddf          arg7 = ((float)x87_r7_13);
00536df6          long double x87_r7_18 = ((sqrtl(((x87_r7_13 * ((long double)arg7)) - (((long double)var_34) + ((long double)var_30)))) - ((long double)esi->z)) / ((long double)arg6));
00536e02          long double x87_r6_11 = ((((long double)1.0) - x87_r7_18) * ((long double)arg3->walk_interp));
00536e08          var_30 = ((double)x87_r6_11);
00536e0c          long double x87_r5_6 = ((long double)arg3->walk_interp);
00536e14          (x87_r6_11 - x87_r5_6);
00536e16          eax = ((((x87_r6_11 < x87_r5_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, x87_r5_6))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == x87_r5_6) ? 1 : 0) << 0xe) | 0x3000))));
00536e16          
00536e1b          if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
00536f30              return 2;
00536f30          
00536e21          long double temp1_1 = ((long double)-0.10000000000000001);
00536e21          (x87_r6_11 - temp1_1);
00536e27          eax = ((((x87_r6_11 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
00536e29          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00536e29          
00536e2c          if (!(p_1))
00536f30              return 2;
00536f30          
00536e38          arg6 = ((float)(((long double)arg6) * x87_r7_18));
00536e42          long double x87_r7_20 = (((long double)arg6) + ((long double)esi->z));
00536e45          esi->z = ((float)x87_r7_20);
00536e4e          long double x87_r6_15 = (((long double)1f) / ((long double)arg7));
00536e56          esi->x = ((float)(x87_r6_15 * ((long double)esi->x)));
00536e5d          esi->y = ((float)(x87_r6_15 * ((long double)esi->y)));
00536e60          long double x87_r7_21 = (x87_r7_20 * x87_r6_15);
00536e62          esi->z = ((float)x87_r7_21);
00536e65          long double temp2_1 = ((long double)arg3->walkable_allowance);
00536e65          (x87_r7_21 - temp2_1);
00536e6b          eax = ((((x87_r7_21 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00536e6b          
00536e70          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00536e70          {
00536e9a              void __return;
00536e9a              void __return_1;
00536e9a              class Vector3* eax_5 = Vector3::operator+(this, &__return_1, operator*(&__return, this->radius, esi));
00536ea1              float y = eax_5->y;
00536ea4              x = eax_5->x;
00536eb0              float y_1 = y;
00536eb9              float z = eax_5->z;
00536ebd              Plane::Plane(&__return_1, esi, &x);
00536ecf              COLLISIONINFO::set_contact_plane(arg4, &__return_1, 1);
00536ee6              arg4->contact_plane_cell_id = arg3->check_pos.objcell_id;
00536ee9              arg3->walk_interp = ((float)((long double)var_30));
00536eef              float radius = arg5->radius;
00536ef2              class AC1Legacy::Vector3* var_20_2 = arg6;
00536efe              x = 0f;
00536f06              int32_t var_24_2 = 0;
00536f0e              SPHEREPATH::add_offset_to_check_pos(arg3, &x, radius);
00536f1e              return 3;
00536e70          }
00536d69      }
00536d69      else if (arg3->num_sphere > 1)
00536d6e      {
00536d74          class CSphere* global_sphere = arg3->global_sphere;
00536d83          x = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x10)) - ((long double)this->center.x)));
00536d8d          float var_24_1 = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x14)) - ((long double)this->center.y)));
00536d9f          float var_20_1 = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x18)) - ((long double)this->center.z)));
00536d9f          
00536daa          if (CSphere::collides_with_sphere(this, &x, arg7) != 0)
00536daa              goto label_536db6;
00536d6e      }
00536e7d      return 1;
00536d20  }

00536f33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00536f40  void __thiscall CSphere::slide_sphere(class CSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class AC1Legacy::Vector3 const* arg5, float arg6, int32_t arg7)

00536f40  {
00536f55      void* esi_2 = &arg3->global_sphere[arg7];
00536f57      class AC1Legacy::Vector3* global_curr_center = arg3->global_curr_center;
00536f5a      int32_t eax_1 = (arg7 * 3);
00536f63      void* edi = ((char*)global_curr_center + (eax_1 << 2));
00536f66      float var_48 = ((float)(((long double)*(uint32_t*)((char*)global_curr_center + (eax_1 << 2))) - ((long double)this->center.x)));
00536f70      float var_44 = ((float)(((long double)*(uint32_t*)((char*)edi + 4)) - ((long double)this->center.y)));
00536f7e      float var_40 = ((float)(((long double)*(uint32_t*)((char*)edi + 8)) - ((long double)this->center.z)));
00536f7e      
00536f89      if (AC1Legacy::Vector3::normalize_check_small(&var_48) == 0)
00536f89      {
00536f9b          COLLISIONINFO::set_collision_normal(arg4, &var_48);
00536fa5          class Plane* ebp_2;
00536fa5          
00536fa5          if (arg4->contact_plane_valid == 0)
00536fac              ebp_2 = &arg4->last_known_contact_plane;
00536fa5          else
00536fa7              ebp_2 = &arg4->contact_plane;
00536fa7          
00536faf          float x = ebp_2->N.x;
00536fb2          float y = ebp_2->N.y;
00536fb5          float z = ebp_2->N.z;
00536fcc          uint32_t objcell_id_1 = arg3->curr_pos.objcell_id;
00536fda          uint32_t objcell_id = arg3->check_pos.objcell_id;
00536fe9          float var_30 = ((float)((((long double)z) * ((long double)var_44)) - (((long double)y) * ((long double)var_40))));
00536fff          float var_2c_1 = ((float)((((long double)var_40) * ((long double)x)) - (((long double)z) * ((long double)var_48))));
00537015          float var_28_1 = ((float)((((long double)y) * ((long double)var_48)) - (((long double)var_44) * ((long double)x))));
00537019          float __return;
00537019          LandDefs::get_block_offset(&__return, objcell_id_1, objcell_id);
0053703c          float var_24_1 = ((float)(((long double)__return) + (((long double)*(uint32_t*)esi_2) - ((long double)*(uint32_t*)edi))));
00537046          float var_14;
00537046          float var_20_1 = ((float)(((long double)var_14) + (((long double)*(uint32_t*)((char*)esi_2 + 4)) - ((long double)*(uint32_t*)((char*)edi + 4)))));
00537056          float var_10;
00537056          float var_1c_1 = ((float)(((long double)var_10) + ((long double)((float)(((long double)*(uint32_t*)((char*)esi_2 + 8)) - ((long double)*(uint32_t*)((char*)edi + 8)))))));
00537074          long double x87_r7_23 = (((((long double)var_28_1) * ((long double)var_28_1)) + (((long double)var_2c_1) * ((long double)var_2c_1))) + (((long double)var_30) * ((long double)var_30)));
00537076          long double x87_r6_13 = ((long double)0.000199999995f);
0053707e          (x87_r7_23 - x87_r6_13);
00537080          class AC1Legacy::Vector3* eax_4;
00537080          eax_4 = ((((x87_r7_23 < x87_r6_13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_23, x87_r6_13))) ? 1 : 0) << 0xa) | ((((x87_r7_23 == x87_r6_13) ? 1 : 0) << 0xe) | 0x3800))));
00537082          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00537082          
00537085          if (p_1)
00537085          {
00537151              long double x87_r6_32 = (((((long double)var_1c_1) * ((long double)var_28_1)) + (((long double)var_20_1) * ((long double)var_2c_1))) + (((long double)var_24_1) * ((long double)var_30)));
00537163              float var_38_2 = ((float)(((long double)var_2c_1) * x87_r6_32));
0053716d              float var_34_2 = ((float)(((long double)var_28_1) * x87_r6_32));
00537173              long double x87_r7_33 = (((long double)1f) / x87_r6_32);
0053717f              var_48 = ((float)(((long double)((float)(((long double)var_30) * x87_r6_32))) * x87_r7_33));
00537183              float ecx_3 = var_48;
0053718d              long double x87_r6_36 = (((long double)var_38_2) * x87_r7_33);
0053718f              float var_3c_3 = ecx_3;
00537197              var_30 = ecx_3;
0053719b              long double x87_r5_25 = (((long double)var_34_2) * x87_r7_33);
0053719f              float var_38_3 = ((float)x87_r6_36);
005371ab              float var_34_3 = ((float)x87_r5_25);
005371c9              long double x87_r4_5 = (((x87_r5_25 * x87_r5_25) + (x87_r6_36 * x87_r6_36)) + (((long double)var_48) * ((long double)var_48)));
005371cb              long double temp1_1 = ((long double)0.000199999995f);
005371cb              (x87_r4_5 - temp1_1);
005371d3              float eax_7;
005371d3              eax_7 = ((((x87_r4_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r4_5 == temp1_1) ? 1 : 0) << 0xe) | 0x3000))));
005371d7              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005371d7              
005371dc              if (p_3)
005371dc              {
005371f4                  var_30 = ((float)(((long double)var_48) - ((long double)var_24_1)));
00537200                  float var_2c_4 = ((float)(((long double)var_38_3) - ((long double)var_20_1)));
0053720c                  float var_28_4 = ((float)(((long double)var_34_3) - ((long double)var_1c_1)));
0053721b                  SPHEREPATH::add_offset_to_check_pos(arg3, &var_30, *(uint32_t*)((char*)esi_2 + 0xc));
005371dc              }
00537085          }
00537085          else
00537085          {
005370a7              long double x87_r7_27 = (((((long double)z) * ((long double)arg5->z)) + (((long double)y) * ((long double)arg5->y))) + (((long double)x) * ((long double)arg5->x)));
005370a9              long double temp2_1 = ((long double)0f);
005370a9              (x87_r7_27 - temp2_1);
005370af              class AC1Legacy::Vector3* eax_5;
005370af              eax_5 = ((((x87_r7_27 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_27, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_27 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005370b1              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005370b1              
005370b4              if (p_2)
005370b4              {
005370f0                  arg7 = ((float)(((((long double)var_1c_1) * ((long double)var_40)) + (((long double)var_20_1) * ((long double)var_44))) + (((long double)var_24_1) * ((long double)var_48))));
00537108                  float var_4_2 = ((float)(((long double)((float)-(((long double)var_40)))) * ((long double)arg7)));
00537112                  float var_1c_2 = var_4_2;
0053711e                  var_30 = ((float)(-(((long double)var_48)) * ((long double)arg7)));
0053712a                  float var_2c_2 = ((float)(((long double)((float)-(((long double)var_44)))) * ((long double)arg7)));
0053712e                  float var_28_2 = var_4_2;
0053721b                  SPHEREPATH::add_offset_to_check_pos(arg3, &var_30, *(uint32_t*)((char*)esi_2 + 0xc));
005370b4              }
00537085          }
00536f89      }
00536f40  }

0053722e                                            90 90                                                                ..

00537230  enum TransitionState __thiscall CSphere::collide_with_point(class CSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3* arg6, float arg7, int32_t arg8)

00537230  {
0053724a      void* edi = &arg3->global_curr_center[arg8];
00537251      float __return_1;
00537251      
00537251      if ((arg2->state & 0x40) == 0)
00537251      {
0053725b          __return_1 = ((float)(((long double)*(uint32_t*)edi) - ((long double)this->center.x)));
00537265          float var_2c = ((float)(((long double)*(uint32_t*)((char*)edi + 4)) - ((long double)this->center.y)));
0053726f          float var_28 = ((float)(((long double)*(uint32_t*)((char*)edi + 8)) - ((long double)this->center.z)));
0053726f          
0053727a          if (AC1Legacy::Vector3::normalize_check_small(&__return_1) == 0)
00537285              COLLISIONINFO::set_collision_normal(arg4, &__return_1);
00537285          
00537295          return 2;
00537251      }
00537251      
0053729e      uint32_t objcell_id = arg3->check_pos.objcell_id;
005372a8      uint32_t objcell_id_1 = arg3->curr_pos.objcell_id;
005372b0      arg7 = ((float)(((long double)0.000199999995f) + ((long double)arg7)));
005372be      float var_18 = ((float)(((long double)*(uint32_t*)edi) - ((long double)this->center.x)));
005372c8      float var_14 = ((float)(((long double)*(uint32_t*)((char*)edi + 4)) - ((long double)this->center.y)));
005372d2      float var_10 = ((float)(((long double)*(uint32_t*)((char*)edi + 8)) - ((long double)this->center.z)));
005372d6      float __return;
005372d6      LandDefs::get_block_offset(&__return, objcell_id_1, objcell_id);
005372db      float* ebx = arg5;
005372ee      long double x87_r6_1 = (((long double)ebx[1]) - ((long double)*(uint32_t*)((char*)edi + 4)));
005372fc      float var_4 = ((float)(((long double)ebx[2]) - ((long double)*(uint32_t*)((char*)edi + 8))));
00537306      __return_1 = ((float)(((long double)__return) + (((long double)*(uint32_t*)ebx) - ((long double)*(uint32_t*)edi))));
00537312      __return = __return_1;
0053731f      float var_20;
0053731f      float var_2c_1 = ((float)(((long double)var_20) + x87_r6_1));
0053732b      float var_1c;
0053732b      long double x87_r6_3 = (((long double)var_1c) + ((long double)var_4));
0053732f      float var_28_1 = ((float)x87_r6_3);
00537335      float var_20_1 = ((float)x87_r6_1);
00537339      float var_1c_1 = ((float)x87_r6_3);
0053733d      long double st0 = CSphere::find_time_of_collision(this, &__return, &var_18, arg7);
0053734a      (st0 - ((long double)0.000199999995f));
0053734e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0053734e      
00537351      if (p)
00537351      {
00537357          long double temp1_1 = ((long double)1.0);
00537357          (st0 - temp1_1);
00537357          
00537362          if ((*(uint8_t*)((char*)((((st0 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp1_1))) ? 1 : 0) << 0xa) | ((((st0 == temp1_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
00537362          {
00537395              long double x87_r6_10 = (((long double)((float)(((long double)var_2c_1) * st0))) - ((long double)var_2c_1));
0053739d              long double x87_r5_12 = (((long double)((float)(((long double)var_28_1) * st0))) - ((long double)var_28_1));
005373a1              float var_4_1 = ((float)x87_r5_12);
005373a7              __return_1 = ((float)st0);
005373ad              float var_2c_2 = ((float)x87_r6_10);
005373b1              float var_28_2 = ((float)x87_r5_12);
005373b9              var_18 = ((float)(st0 + ((long double)*(uint32_t*)ebx)));
005373bd              long double x87_r7_20 = (x87_r6_10 + ((long double)ebx[1]));
005373c4              long double x87_r6_14 = (((long double)var_4_1) + ((long double)ebx[2]));
005373cd              var_18 = ((float)(((long double)var_18) - ((long double)this->center.x)));
005373d6              float var_14_2 = ((float)(x87_r7_20 - ((long double)this->center.y)));
005373da              long double x87_r7_22 = (x87_r6_14 - ((long double)this->center.z));
005373e3              long double x87_r6_18 = (((long double)1f) / ((long double)arg7));
005373ed              __return = ((float)(((long double)var_18) * x87_r6_18));
005373f7              float var_20_2 = ((float)(((long double)var_14_2) * x87_r6_18));
005373ff              float var_1c_2 = ((float)(x87_r7_22 * x87_r6_18));
00537405              COLLISIONINFO::set_collision_normal(arg4, &__return);
00537415              SPHEREPATH::add_offset_to_check_pos(arg3, &__return_1, ebx[3]);
00537426              return 3;
00537362          }
00537351      }
00537351      
00537437      return 2;
00537230  }

0053743a                                                                                90 90 90 90 90 90                            ......

00537440  enum TransitionState __thiscall CSphere::slide_sphere(class CSphere const* this, class SPHEREPATH* arg2, class COLLISIONINFO* arg3, class AC1Legacy::Vector3* arg4, class AC1Legacy::Vector3 const* arg5)

00537440  {
00537448      long double x87_r7 = ((long double)arg4->x);
0053744b      long double temp1 = ((long double)0f);
0053744b      (x87_r7 - temp1);
00537453      int32_t eax;
00537453      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00537455      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00537458      float __return_1;
00537458      
00537458      if (!(p))
00537458      {
0053745e          long double x87_r7_1 = ((long double)arg4->y);
00537461          long double temp2_1 = ((long double)0f);
00537461          (x87_r7_1 - temp2_1);
00537467          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00537469          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00537469          
0053746c          if (!(p_1))
0053746c          {
0053746e              long double x87_r7_2 = ((long double)arg4->z);
00537471              long double temp4_1 = ((long double)0f);
00537471              (x87_r7_2 - temp4_1);
00537477              eax = ((((x87_r7_2 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00537479              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
00537479              
0053747c              if (!(p_2))
0053747c              {
00537484                  float radius_1 = this->radius;
005374b1                  long double x87_r6_5 = (((long double)((float)(((long double)arg5->y) - ((long double)this->center.y)))) * ((long double)0.5f));
005374cb                  float var_10 = ((float)(((long double)((float)(((long double)arg5->z) - ((long double)this->center.z)))) * ((long double)0.5f)));
005374cf                  __return_1 = ((float)((((long double)arg5->x) - ((long double)this->center.x)) * ((long double)0.5f)));
005374d3                  float var_14 = ((float)x87_r6_5);
005374d7                  SPHEREPATH::add_offset_to_check_pos(arg2, &__return_1, radius_1);
005374e6                  return 3;
0053747c              }
0053746c          }
00537458      }
00537458      
005374f2      COLLISIONINFO::set_collision_normal(arg3, arg4);
005374f7      class SPHEREPATH* ebp = arg2;
0053750e      float __return;
0053750e      LandDefs::get_block_offset(&__return, ebp->curr_pos.objcell_id, ebp->check_pos.objcell_id);
00537515      float* eax_5 = arg5;
00537521      class Plane* ecx_3 = &arg3->contact_plane;
0053753c      float var_24 = ((float)(((long double)__return) + (((long double)this->center.x) - ((long double)*(uint32_t*)eax_5))));
00537546      float var_8;
00537546      float var_20 = ((float)(((long double)var_8) + (((long double)this->center.y) - ((long double)eax_5[1]))));
00537556      float var_4;
00537556      float var_1c = ((float)(((long double)var_4) + ((long double)((float)(((long double)this->center.z) - ((long double)eax_5[2]))))));
00537556      
0053755a      if (arg3->contact_plane_valid == 0)
0053755c          ecx_3 = &arg3->last_known_contact_plane;
0053755c      
0053756d      __return_1 = ((float)((((long double)arg4->y) * ((long double)ecx_3->N.z)) - (((long double)arg4->z) * ((long double)ecx_3->N.y))));
0053757b      long double x87_r7_17 = ((((long double)ecx_3->N.x) * ((long double)arg4->z)) - (((long double)ecx_3->N.z) * ((long double)arg4->x)));
00537587      long double x87_r6_15 = ((((long double)ecx_3->N.y) * ((long double)arg4->x)) - (((long double)ecx_3->N.x) * ((long double)arg4->y)));
00537589      float var_10_2 = ((float)x87_r6_15);
0053759f      long double x87_r6_18 = (((x87_r6_15 * ((long double)var_10_2)) + (x87_r7_17 * x87_r7_17)) + (((long double)__return_1) * ((long double)__return_1)));
005375a5      long double temp3 = ((long double)0.000199999995f);
005375a5      (x87_r6_18 - temp3);
005375ab      int32_t eax_6;
005375ab      eax_6 = ((((x87_r6_18 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_18, temp3))) ? 1 : 0) << 0xa) | ((((x87_r6_18 == temp3) ? 1 : 0) << 0xe) | 0x3800))));
005375ad      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005375b0      class AC1Legacy::Vector3* var_3c_1;
005375b0      float radius;
005375b0      
005375b0      if (p_3)
005375b0      {
005376c5          long double x87_r6_37 = (((((long double)var_10_2) * ((long double)var_1c)) + (x87_r7_17 * ((long double)var_20))) + (((long double)__return_1) * ((long double)var_24)));
005376e9          arg2 = ((float)(((long double)1f) / ((long double)((float)x87_r6_18))));
005376f9          float var_14_2 = ((float)(((long double)((float)(x87_r7_17 * x87_r6_37))) * ((long double)arg2)));
00537705          float var_8_6 = var_14_2;
0053770d          float var_10_5 = ((float)(((long double)((float)(((long double)var_10_2) * x87_r6_37))) * ((long double)arg2)));
00537715          float var_4_7 = var_10_5;
00537719          __return = ((float)x87_r6_37);
00537733          long double x87_r6_45 = (((((long double)var_10_5) * ((long double)var_10_5)) + (((long double)var_14_2) * ((long double)var_14_2))) + (x87_r6_37 * x87_r6_37));
00537735          long double temp5_1 = ((long double)0.000199999995f);
00537735          (x87_r6_45 - temp5_1);
0053773b          float eax_12;
0053773b          eax_12 = ((((x87_r6_45 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_45, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r6_45 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
0053773d          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
0053773d          
00537740          if (!(p_5))
00537750              return 2;
00537750          
0053775a          radius = this->radius;
0053775f          __return = ((float)(x87_r6_37 - ((long double)var_24)));
00537763          var_3c_1 = &__return;
0053776c          float var_8_7 = ((float)(((long double)var_14_2) - ((long double)var_20)));
00537778          float var_4_8 = ((float)(((long double)var_10_5) - ((long double)var_1c)));
005375b0      }
005375b0      else
005375b0      {
005375ca          long double x87_r7_21 = (((((long double)arg4->z) * ((long double)ecx_3->N.z)) + (((long double)arg4->y) * ((long double)ecx_3->N.y))) + (((long double)ecx_3->N.x) * ((long double)arg4->x)));
005375cc          long double temp6_1 = ((long double)0f);
005375cc          (x87_r7_21 - temp6_1);
005375d2          eax_6 = ((((x87_r7_21 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == temp6_1) ? 1 : 0) << 0xe) | 0))));
005375d4          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005375d4          
005375d7          if (!(p_4))
005375d7          {
005375dd              float* eax_7 = arg4;
005375e1              __return = ((float)-(((long double)var_24)));
005375ed              *(uint32_t*)eax_7 = __return;
005375ff              eax_7[1] = ((float)-(((long double)var_20)));
0053760a              eax_7[2] = ((float)-(((long double)var_1c)));
0053760a              
00537616              if (AC1Legacy::Vector3::normalize_check_small(arg4) == 0)
0053761b                  COLLISIONINFO::set_collision_normal(arg3, arg4);
0053761b              
0053762c              return 2;
005375d7          }
005375d7          
0053765d          arg2 = ((float)(((((long double)var_24) * ((long double)arg4->x)) + (((long double)var_1c) * ((long double)arg4->z))) + (((long double)var_20) * ((long double)arg4->y))));
00537669          long double x87_r6_32 = (((long double)((float)-(((long double)arg4->y)))) * ((long double)arg2));
00537675          float var_10_3 = ((float)(((long double)((float)-(((long double)arg4->z)))) * ((long double)arg2)));
0053767f          float var_4_5 = var_10_3;
00537683          __return = ((float)(-(((long double)arg4->x)) * ((long double)arg2)));
0053768b          __return_1 = __return;
0053769a          float var_14_1 = ((float)x87_r6_32);
0053769e          radius = this->radius;
005376a3          float var_10_4 = var_10_3;
005376a7          var_3c_1 = &__return_1;
005375b0      }
005375b0      
0053777e      SPHEREPATH::add_offset_to_check_pos(ebp, var_3c_1, radius);
0053778f      return 4;
00537440  }

00537792                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005377a0  uint8_t __thiscall CSphere::sphere_intersects_ray(class CSphere const* this, class Ray const* arg2, double* arg3)

005377a0  {
005377ab      float var_c = ((float)(((long double)arg2->pt.x) - ((long double)this->center.x)));
005377b5      float var_8 = ((float)(((long double)arg2->pt.y) - ((long double)this->center.y)));
005377bf      float var_4 = ((float)(((long double)arg2->pt.z) - ((long double)this->center.z)));
005377d7      long double x87_r7_9 = (((((long double)arg2->dir.z) * ((long double)arg2->dir.z)) + (((long double)arg2->dir.y) * ((long double)arg2->dir.y))) + (((long double)arg2->dir.x) * ((long double)arg2->dir.x)));
005377f0      (((((long double)var_4) * ((long double)arg2->dir.z)) + (((long double)var_8) * ((long double)arg2->dir.y))) + (((long double)var_c) * ((long double)arg2->dir.x)));
005377f4      long double x87_r5_4 = ((long double)this->radius);
00537817      long double x87_r4_4 = ((((((long double)var_c) * ((long double)var_c)) + (((long double)var_4) * ((long double)var_4))) + (((long double)var_8) * ((long double)var_8))) - (x87_r5_4 * x87_r5_4));
0053781b      long double temp1 = ((long double)0.0);
0053781b      (x87_r5_4 - temp1);
00537821      class Ray* eax;
00537821      eax = ((((x87_r5_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r5_4 == temp1) ? 1 : 0) << 0xe) | 0x2800))));
00537823      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00537823      
00537826      if (p)
00537826      {
00537830          x87_r5_4 = ((x87_r4_4 * x87_r4_4) - (x87_r5_4 * x87_r7_9));
00537832          long double x87_r4_9 = ((long double)0.000199999995f);
0053783a          (x87_r7_9 - x87_r4_9);
0053783c          eax = ((((x87_r7_9 < x87_r4_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, x87_r4_9))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == x87_r4_9) ? 1 : 0) << 0xe) | 0x2800))));
0053783e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053783e          
00537841          if (p_1)
00537841          {
00537843              long double temp2_1 = ((long double)0.0);
00537843              (x87_r5_4 - temp2_1);
00537849              eax = ((((x87_r5_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r5_4 == temp2_1) ? 1 : 0) << 0xe) | 0x2800))));
0053784b              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0053784b              
0053784e              if (p_2)
0053784e              {
00537850                  long double x87_r5_6 = sqrtl(x87_r5_4);
00537854                  (x87_r4_4 - x87_r5_6);
00537856                  eax = ((((x87_r4_4 < x87_r5_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_4, x87_r5_6))) ? 1 : 0) << 0xa) | ((((x87_r4_4 == x87_r5_6) ? 1 : 0) << 0xe) | 0x2800))));
00537856                  
0053785b                  if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0053785b                  {
00537867                      *(uint64_t*)arg3 = ((double)((x87_r4_4 - x87_r5_6) / x87_r7_9));
00537869                      double* eax_1;
00537869                      eax_1 = 1;
00537872                      return 1;
0053785b                  }
0053785b                  
0053787b                  eax = 1;
0053787f                  *(uint64_t*)arg3 = ((double)((x87_r5_6 + x87_r4_4) / x87_r7_9));
00537888                  return 1;
0053784e              }
00537841          }
00537826      }
00537826      
0053788d      eax = 0;
00537896      return 0;
005377a0  }

00537899                                                                             90 90 90 90 90 90 90                           .......

005378a0  void __thiscall SPHEREPATH::set_collide(class SPHEREPATH* this, class AC1Legacy::Vector3 const* arg2)

005378a0  {
005378a3      class CObjCell* check_cell = this->check_cell;
005378a9      this->collide = 1;
005378b3      this->backup_cell = check_cell;
005378c5      this->backup_check_pos.objcell_id = this->check_pos.objcell_id;
005378d2      Frame::operator=(&this->backup_check_pos.frame, &this->check_pos.frame);
005378dd      this->step_up_normal.x = arg2->x;
005378dd      this->step_up_normal.y = arg2->y;
005378eb      float z = arg2->z;
005378ee      this->walk_interp = 1f;
005378dd      this->step_up_normal.z = z;
005378a0  }

005378ff                                                                                               90                                 .

00537900  enum TransitionState __thiscall CSphere::step_sphere_up(class CSphere const* this, class CTransition* arg2, class CSphere const* arg3, class AC1Legacy::Vector3 const* arg4, float arg5)

00537900  {
0053790a      long double x87_r7 = (((long double)0.000199999995f) + ((long double)arg5));
0053791b      long double x87_r7_1 = (x87_r7 - ((long double)arg4->z));
0053791f      long double x87_r6 = ((long double)arg2->object_info.step_up_height);
00537925      (x87_r6 - x87_r7_1);
00537925      
00537932      if ((*(uint8_t*)((char*)((((x87_r6 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
00537932      {
0053798e          int32_t result;
0053798e          int80_t st0;
0053798e          st0 = CSphere::slide_sphere(this, arg2, &arg2->sphere_path, &arg2->collision_info, arg4, ((float)x87_r7), 0);
00537999          return result;
00537932      }
00537932      
00537934      class AC1Legacy::Vector3* global_curr_center = arg2->sphere_path.global_curr_center;
0053793a      long double x87_r7_3 = (((long double)global_curr_center->z) - ((long double)this->center.z));
00537940      long double x87_r6_2 = (((long double)global_curr_center->y) - ((long double)this->center.y));
0053794e      float var_c = ((float)(((long double)global_curr_center->x) - ((long double)this->center.x)));
00537952      float var_8 = ((float)x87_r6_2);
00537956      float var_4 = ((float)x87_r7_3);
00537956      
00537961      if (CTransition::step_up(arg2, &var_c) == 0)
00537980          return SPHEREPATH::step_up_slide(&arg2->sphere_path, arg2, &arg2->collision_info);
00537980      
0053796e      return 1;
00537900  }

0053799c                                                                                      90 90 90 90                              ....

005379a0  enum TransitionState __thiscall CSphere::land_on_sphere(class CSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3* arg6, float arg7)

005379a0  {
005379a8      class AC1Legacy::Vector3* global_curr_center = arg3->global_curr_center;
005379af      float var_c = ((float)(((long double)global_curr_center->x) - ((long double)this->center.x)));
005379b9      float var_8 = ((float)(((long double)global_curr_center->y) - ((long double)this->center.y)));
005379c7      float var_4 = ((float)(((long double)global_curr_center->z) - ((long double)this->center.z)));
005379c7      
005379d2      if (AC1Legacy::Vector3::normalize_check_small(&var_c) != 0)
005379dd          return 2;
005379dd      
005379e7      SPHEREPATH::set_collide(arg3, &var_c);
005379f2      arg3->walkable_allowance = 0.0871556997f;
00537a01      return 3;
005379a0  }

00537a04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00537a10  enum TransitionState __thiscall CSphere::slide_sphere(class CSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3* arg6, float* arg7, int32_t const arg8)

00537a10  {
00537a1d      class AC1Legacy::Vector3* global_curr_center = arg3->global_curr_center;
00537a20      int32_t eax_1 = (arg8 * 3);
00537a26      void* esi = ((char*)global_curr_center + (eax_1 << 2));
00537a2b      float var_c = ((float)(((long double)*(uint32_t*)((char*)global_curr_center + (eax_1 << 2))) - ((long double)this->center.x)));
00537a35      float var_8 = ((float)(((long double)*(uint32_t*)((char*)esi + 4)) - ((long double)this->center.y)));
00537a43      float var_4 = ((float)(((long double)*(uint32_t*)((char*)esi + 8)) - ((long double)this->center.z)));
00537a43      
00537a4e      if (AC1Legacy::Vector3::normalize_check_small(&var_c) == 0)
00537a77          return CSphere::slide_sphere(arg5, arg3, arg4, &var_c, esi);
00537a77      
00537a5a      return 2;
00537a10  }

00537a7a                                                                                90 90 90 90 90 90                            ......

00537a80  void __thiscall CSphere::intersects_sphere(class CSphere const* this, class CTransition* arg2, int32_t arg3)

00537a80  {
00537a85      class CTransition* ebp = arg2;
00537a8e      class CSphere* global_sphere = ebp->sphere_path.global_sphere;
00537a93      float* this_1 = this;
00537aa5      float x = ((float)(((long double)global_sphere->center.x) - ((long double)*(uint32_t*)this_1)));
00537ab3      float var_30 = ((float)(((long double)global_sphere->center.y) - ((long double)this_1[1])));
00537abd      float var_2c = ((float)(((long double)global_sphere->center.z) - ((long double)this_1[2])));
00537acd      arg2 = ((float)((((long double)this_1[3]) + ((long double)global_sphere->radius)) - ((long double)0.000199999995f)));
00537ae4      float* var_58_4;
00537ae4      class CTransition* var_54_4;
00537ae4      float __return;
00537ae4      
00537ae4      if ((ebp->sphere_path.obstruction_ethereal != 0 || ebp->sphere_path.insert_type == PLACEMENT_INSERT))
00537ae4      {
00537f4b          long double x87_r7_30 = (((((long double)var_30) * ((long double)var_30)) + (((long double)x) * ((long double)x))) + (((long double)var_2c) * ((long double)var_2c)));
00537f51          long double x87_r6_25 = (((long double)arg2) * ((long double)arg2));
00537f55          (x87_r6_25 - x87_r7_30);
00537f57          int32_t eax;
00537f57          eax = ((((x87_r6_25 < x87_r7_30) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_25, x87_r7_30))) ? 1 : 0) << 0xa) | ((((x87_r6_25 == x87_r7_30) ? 1 : 0) << 0xe) | 0))));
00537f57          
00537f5c          if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
00537c69              return;
00537c69          
00537f65          if (ebp->sphere_path.num_sphere > 1)
00537f65          {
00537f6c              __return = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x10)) - ((long double)*(uint32_t*)this_1)));
00537f74              long double x87_r7_33 = ((long double)*(int32_t*)((char*)global_sphere + 0x14));
00537f77              x = __return;
00537f82              var_54_4 = arg2;
00537f91              float var_30_2 = ((float)(x87_r7_33 - ((long double)this_1[1])));
00537f99              var_58_4 = &x;
00537fa2              float var_2c_2 = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x18)) - ((long double)this_1[2])));
00537fad          label_537fad:
00537fa8              CSphere::collides_with_sphere(this_1, var_58_4, var_54_4);
00537f65          }
00537ae4      }
00537ae4      else if (ebp->sphere_path.step_down == 0)
00537af2      {
00537b27          void __return_2;
00537b27          
00537b27          if (ebp->sphere_path.check_walkable != 0)
00537b27          {
00537b29              class CTransition* ebp_1 = arg2;
00537b29              
00537b3c              if (CSphere::collides_with_sphere(this_1, &x, ebp_1) != 0)
00537c69                  return;
00537c69              
00537b45              if (ebp->sphere_path.num_sphere > 1)
00537b45              {
00537b54                  class AC1Legacy::Vector3* eax_3 = AC1Legacy::Vector3::operator-(&global_sphere[1], &__return_2, this_1);
00537b5b                  float y = eax_3->y;
00537b5e                  float z = eax_3->z;
00537b61                  x = eax_3->x;
00537b65                  var_54_4 = ebp_1;
00537b6a                  float y_1 = y;
00537b6e                  float z_2 = z;
00537b72                  var_58_4 = &x;
00537b73                  goto label_537fad;
00537b45              }
00537b27          }
00537b27          else
00537b27          {
00537b80              float __return_1;
00537b80              
00537b80              if (ebp->sphere_path.collide == 0)
00537b80              {
00537de8                  char state = ((int8_t)ebp->object_info.state);
00537de8                  
00537ded                  if ((state & 3) != 0)
00537ded                  {
00537eac                      class CTransition* edx_6 = arg2;
00537eac                      
00537ebf                      if (CSphere::collides_with_sphere(this_1, &x, edx_6) != 0)
00537ebf                      {
00537f22                          CSphere::step_sphere_up(this_1, ebp, global_sphere, &x, edx_6);
00537f2e                          return;
00537ebf                      }
00537ebf                      
00537ec4                      if (ebp->sphere_path.num_sphere > 1)
00537ec4                      {
00537ed5                          AC1Legacy::Vector3::operator-(&global_sphere[1], &__return_1, this_1);
00537ed5                          
00537eed                          if (CSphere::collides_with_sphere(this_1, &__return_1, arg2) != 0)
00537f09                              CSphere::slide_sphere(this_1, ebp, &ebp->sphere_path, &ebp->collision_info, &global_sphere[1], &__return_1, &arg2, 1);
00537ec4                      }
00537ded                  }
00537ded                  else
00537ded                  {
00537df5                      class CTransition* eax_15 = arg2;
00537dfe                      class AC1Legacy::Vector3* var_58_13 = &x;
00537dff                      class CSphere* this_2 = this_1;
00537dff                      
00537e01                      if ((state & 8) != 0)
00537e01                      {
00537e85                          if (CSphere::collides_with_sphere(this_2, var_58_13, eax_15) != 0)
00537e9d                              CSphere::collide_with_point(this_1, ebp, &ebp->sphere_path, &ebp->collision_info, global_sphere, &x, arg2, 0);
00537e01                      }
00537e01                      else
00537e01                      {
00537e0a                          if (CSphere::collides_with_sphere(this_2, var_58_13, eax_15) != 0)
00537e0a                          {
00537e6f                              CSphere::land_on_sphere(this_1, ebp, &ebp->sphere_path, &ebp->collision_info, global_sphere, &x, arg2);
00537e7b                              return;
00537e0a                          }
00537e0a                          
00537e0f                          if (ebp->sphere_path.num_sphere > 1)
00537e0f                          {
00537e20                              AC1Legacy::Vector3::operator-(&global_sphere[1], &__return_1, this_1);
00537e25                              float edx_4 = arg2;
00537e25                              
00537e38                              if (CSphere::collides_with_sphere(this_1, &__return_1, edx_4) != 0)
00537e50                                  CSphere::collide_with_point(this_1, ebp, &ebp->sphere_path, &ebp->collision_info, &global_sphere[1], &__return_1, edx_4, 1);
00537e0f                          }
00537e01                      }
00537ded                  }
00537b80              }
00537b80              else if (arg3 == 0)
00537b8c              {
00537b92                  class CTransition* ebp_2 = arg2;
00537b92                  
00537ba5                  if (CSphere::collides_with_sphere(this_1, &x, ebp_2) != 0)
00537ba5                  {
00537bda                  label_537bda:
00537bda                      class AC1Legacy::Vector3* eax_6 = SPHEREPATH::get_curr_pos_check_pos_block_offset(&ebp->sphere_path, &__return_2);
00537bf5                      AC1Legacy::Vector3::operator-(AC1Legacy::Vector3::operator-(ebp->sphere_path.global_curr_center, &__return_1, global_sphere), &__return, eax_6);
00537c04                      arg2 = ((float)(((long double)0.000199999995f) + ((long double)arg2)));
00537c22                      float var_24;
00537c22                      float var_20;
00537c22                      long double x87_r7_14 = (((((long double)var_20) * ((long double)var_20)) + (((long double)var_24) * ((long double)var_24))) + (((long double)__return) * ((long double)__return)));
00537c40                      long double x87_r6_9 = -((((((long double)var_24) * ((long double)var_30)) + (((long double)__return) * ((long double)x))) + (((long double)var_20) * ((long double)var_2c))));
00537c48                      long double x87_r5_6 = fabsl(x87_r7_14);
00537c4a                      long double x87_r4_1 = ((long double)0.000199999995f);
00537c50                      (x87_r4_1 - x87_r5_6);
00537c50                      
00537c57                      if ((*(uint8_t*)((char*)((((x87_r4_1 < x87_r5_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_1, x87_r5_6))) ? 1 : 0) << 0xa) | ((((x87_r4_1 == x87_r5_6) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
00537c69                          return;
00537c69                      
00537c9c                      long double x87_r6_10 = (x87_r6_9 + sqrtl(((x87_r6_9 * x87_r6_9) - (((((((long double)var_30) * ((long double)var_30)) + (((long double)x) * ((long double)x))) + (((long double)var_2c) * ((long double)var_2c))) - (((long double)arg2) * ((long double)arg2))) * x87_r7_14))));
00537c9e                      long double temp1_1 = ((long double)1.0);
00537c9e                      (x87_r6_10 - temp1_1);
00537c9e                      
00537ca9                      if ((*(uint8_t*)((char*)((((x87_r6_10 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp1_1) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
00537ca9                      {
00537cab                          long double x87_r5_11 = ((long double)((double)x87_r6_9));
00537cb1                          x87_r6_10 = ((x87_r5_11 + x87_r5_11) - x87_r6_10);
00537ca9                      }
00537ca9                      
00537cb3                      long double x87_r7_15 = (x87_r6_10 / x87_r6_10);
00537cbd                      x87_r6_9 = ((((long double)1.0) - x87_r7_15) * ((long double)ebp->sphere_path.walk_interp));
00537cc7                      long double x87_r5_13 = ((long double)ebp->sphere_path.walk_interp);
00537ccf                      (x87_r6_9 - x87_r5_13);
00537ccf                      
00537cd6                      if ((*(uint8_t*)((char*)((((x87_r6_9 < x87_r5_13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_9, x87_r5_13))) ? 1 : 0) << 0xa) | ((((x87_r6_9 == x87_r5_13) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 1) == 0)
00537c69                          return;
00537c69                      
00537cd8                      (x87_r6_9 - ((long double)-0.10000000000000001));
00537ce0                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00537ce0                      
00537ce3                      if (!(p_1))
00537c69                          return;
00537c69                      
00537ced                      class CTransition* edx_1 = arg2;
00537cf8                      __return = ((float)(((long double)__return) * x87_r7_15));
00537d02                      float var_24_1 = ((float)(((long double)var_24) * x87_r7_15));
00537d0c                      float var_20_1 = ((float)(((long double)var_20) * x87_r7_15));
00537d1a                      x = ((float)(((long double)__return) + ((long double)x)));
00537d26                      float var_30_1 = ((float)(((long double)var_24_1) + ((long double)var_30)));
00537d32                      float var_2c_1 = ((float)(((long double)var_20_1) + ((long double)var_2c)));
00537d36                      Vector3::operator/=(&x, edx_1);
00537d36                      
00537d49                      if (SPHEREPATH::is_walkable_allowable(&ebp->sphere_path, var_2c_1) != 0)
00537d49                      {
00537d5d                          class Vector3* eax_12 = operator*(&__return_2, global_sphere->radius, &x);
00537d64                          long double x87_r6_19 = ((long double)eax_12->y);
00537d67                          float z_1 = eax_12->z;
00537d7a                          __return_1 = ((float)(((long double)global_sphere->center.x) - ((long double)eax_12->x)));
00537d8c                          float var_18 = ((float)(((long double)global_sphere->center.y) - x87_r6_19));
00537d9b                          float var_14 = ((float)(((long double)global_sphere->center.z) - ((long double)z_1)));
00537d9f                          Plane::Plane(&__return_2, &x, &__return_1);
00537db1                          COLLISIONINFO::set_contact_plane(&ebp->collision_info, &__return_2, 1);
00537a9f                          ebp->collision_info.contact_plane_cell_id = ebp->sphere_path.check_pos.objcell_id;
00537a8a                          ebp->sphere_path.walk_interp = ((float)((long double)((double)x87_r6_9)));
00537dd4                          SPHEREPATH::add_offset_to_check_pos(&ebp->sphere_path, &__return, global_sphere->radius);
00537d49                      }
00537ba5                  }
00537ba5                  else if (ebp->sphere_path.num_sphere > 1)
00537baa                  {
00537bb9                      AC1Legacy::Vector3::operator-(&global_sphere[1], &__return_1, this_1);
00537bb9                      
00537bcd                      if (CSphere::collides_with_sphere(this_1, &__return_1, ebp_2) != 0)
00537bcd                          goto label_537bda;
00537baa                  }
00537b8c              }
00537b27          }
00537af2      }
00537af2      else if (arg3 == 0)
00537b10          CSphere::step_sphere_down(this_1, ebp, &ebp->sphere_path, &ebp->collision_info, global_sphere, &x, arg2);
00537a80  }

00537fc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00537fd0  int80_t __thiscall CSphere::intersects_sphere(class CSphere const* this, class Position const* arg2, float arg3, class CTransition* arg4, int32_t arg5)

00537fd0  {
00537fe3      float var_4 = ((float)(((long double)arg3) * ((long double)this->radius)));
00537ff1      long double x87_r6_1 = (((long double)arg3) * ((long double)this->center.y));
0053800b      float var_20 = ((float)(((long double)arg3) * ((long double)this->center.z)));
0053800f      float var_28 = ((float)(((long double)arg3) * ((long double)this->center.x)));
0053801e      float var_24 = ((float)x87_r6_1);
00538022      void __return;
00538022      class AC1Legacy::Vector3* eax_1 = Position::localtoglobal(&arg4->sphere_path.check_pos, &__return, arg2, &var_28);
00538029      float y = eax_1->y;
0053802c      float z = eax_1->z;
0053802f      float x = eax_1->x;
0053803d      float y_1 = y;
00538041      float z_1 = z;
0053804e      return CSphere::intersects_sphere(&x, arg4, arg5);
00537fd0  }

00538051                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00538060  int32_t __thiscall CPolygon::point_in_poly2D(class CPolygon const* this, class AC1Legacy::Vector3 const* arg2, enum Sidedness arg3)

00538060  {
00538060      uint32_t num_pts = ((uint32_t)this->num_pts);
00538064      int32_t i = (num_pts - 1);
00538067      class CVertex** vertices = this->vertices;
00538069      class CVertex* eax = *(uint32_t*)vertices;
00538069      
0053806c      if ((num_pts - 1) >= 0)
0053806c      {
00538076          void* esi = &vertices[i];
00538076          
005380cc          do
005380cc          {
00538085              float* ecx = *(uint32_t*)esi;
00538087              long double x87_r7_2 = (((long double)*(uint32_t*)((char*)eax->__inner0 + 4)) - ((long double)ecx[1]));
0053808c              long double x87_r6_2 = (((long double)*(uint32_t*)ecx) - ((long double)*(uint32_t*)((char*)eax->__inner0 + 0)));
005380a6              long double x87_r7_4 = (((-((x87_r7_2 * ((long double)*(uint32_t*)ecx))) - (x87_r6_2 * ((long double)ecx[1]))) + (x87_r6_2 * ((long double)arg2->y))) + (x87_r7_2 * ((long double)arg2->x)));
005380a8              long double temp2_1 = ((long double)0f);
005380a8              (x87_r7_4 - temp2_1);
005380ae              eax = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005380ae              
005380b0              if (arg3 != POSITIVE)
005380b0              {
005380bf                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005380bf                  
005380c2                  if (!(p_1))
005380bc                      return 0;
005380b0              }
005380b0              else if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005380bc                  return 0;
005380bc              
005380c4              i -= 1;
005380c5              esi -= 4;
005380ca              eax = ecx;
005380cc          } while (i >= 0);
0053806c      }
0053806c      
005380d6      return 1;
00538060  }

005380d9                                                                             90 90 90 90 90 90 90                           .......

005380e0  void __fastcall CPolygon::Destroy(class CPolygon* this)

005380e0  {
005380e4      char* pos_uv_indices = this->pos_uv_indices;
005380e4      
005380eb      if (pos_uv_indices != 0)
005380eb      {
005380ee          operator delete[](pos_uv_indices);
005380f6          this->pos_uv_indices = nullptr;
005380eb      }
005380eb      
005380fd      if (this->sides_type == 2)
005380fd      {
005380ff          char* neg_uv_indices = this->neg_uv_indices;
005380ff          
00538104          if (neg_uv_indices != 0)
00538104          {
00538107              operator delete[](neg_uv_indices);
0053810f              this->neg_uv_indices = nullptr;
00538104          }
005380fd      }
005380fd      
00538112      class CVertex** vertices = this->vertices;
00538112      
00538116      if (vertices != 0)
00538116      {
00538119          operator delete[](vertices);
00538121          this->vertices = 0;
00538116      }
00538116      
00538123      uint16_t* vertex_ids = this->vertex_ids;
00538123      
00538128      if (vertex_ids != 0)
00538128      {
0053812b          operator delete[](vertex_ids);
00538133          this->vertex_ids = nullptr;
00538128      }
00538128      
00538136      struct Vec2Dscreen** screen = this->screen;
00538136      
0053813b      if (screen != 0)
0053813b      {
0053813e          operator delete[](screen);
00538146          this->screen = nullptr;
0053813b      }
0053813b      
0053814e      this->num_pts = 0;
00538151      this->stippling = 0;
00538154      this->pos_surface = 0xffff;
00538158      this->neg_surface = 0xffff;
0053815c      this->poly_id = 0xffff;
005380e0  }

00538165                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00538170  class AC1Legacy::Vector3* __thiscall CPolygon::adjust_sphere_to_poly(class CPolygon const* this, class CSphere* arg2, class AC1Legacy::Vector3 const* arg3, class AC1Legacy::Vector3 const* arg4)

00538170  {
0053818d      long double x87_r7_4 = ((((((long double)this->plane.N.z) * ((long double)arg3->z)) + (((long double)this->plane.N.y) * ((long double)arg3->y))) + (((long double)arg3->x) * ((long double)this->plane.N.x))) + ((long double)this->plane.d));
00538190      arg3 = ((float)x87_r7_4);
00538198      long double x87_r7_6 = fabsl(((long double)arg3));
0053819a      long double x87_r6_4 = ((long double)arg2->radius);
0053819d      (x87_r6_4 - x87_r7_6);
0053819f      class AC1Legacy::Vector3* eax;
0053819f      eax = ((((x87_r6_4 < x87_r7_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_6))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_6) ? 1 : 0) << 0xe) | 0))));
0053819f      
005381a4      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005381ac          return eax;
005381ac      
005381ca      long double x87_r6_10 = fabsl((((((long double)this->plane.N.z) * ((long double)arg4->z)) + (((long double)this->plane.N.y) * ((long double)arg4->y))) + (((long double)arg4->x) * ((long double)this->plane.N.x))));
005381cc      long double x87_r5 = ((long double)0.000199999995f);
005381d2      (x87_r5 - x87_r6_10);
005381d4      class AC1Legacy::Vector3* eax_1;
005381d4      eax_1 = ((((x87_r5 < x87_r6_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r6_10))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r6_10) ? 1 : 0) << 0xe) | 0x3800))));
005381d4      
005381d9      if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
005381e3          return eax_1;
005381e3      
005381e6      long double x87_r6_11 = ((long double)arg3);
005381ea      long double temp1 = ((long double)0f);
005381ea      (x87_r6_11 - temp1);
005381f0      arg2->radius;
005381f3      eax_1 = ((((x87_r6_11 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp1) ? 1 : 0) << 0xe) | 0x3000))));
00538202      return eax_1;
00538170  }

00538205                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00538210  int32_t __thiscall CPolygon::adjust_sphere_to_plane(class CPolygon const* this, class SPHEREPATH* arg2, class CSphere* arg3, class AC1Legacy::Vector3 const* arg4)

00538210  {
00538210      class CSphere* edx = arg3;
00538231      long double x87_r7_4 = ((((((long double)this->plane.N.y) * ((long double)edx->center.y)) + (((long double)this->plane.N.z) * ((long double)edx->center.z))) + (((long double)edx->center.x) * ((long double)this->plane.N.x))) + ((long double)this->plane.d));
00538247      long double x87_r6_7 = (((((long double)this->plane.N.z) * ((long double)arg4->z)) + (((long double)this->plane.N.y) * ((long double)arg4->y))) + (((long double)this->plane.N.x) * ((long double)arg4->x)));
00538249      long double temp1 = ((long double)0.000199999995f);
00538249      (x87_r6_7 - temp1);
00538254      long double x87_r6_8;
00538254      
00538254      if ((*(uint8_t*)((char*)((((x87_r6_7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6_7 == temp1) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) != 0)
00538254      {
0053826b          (x87_r6_7 - -(((long double)0.000199999995f)));
0053826f          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053826f          
00538272          if (p_1)
00538310              return 0;
00538310          
0053827a          x87_r6_8 = (x87_r7_4 - ((long double)edx->radius));
00538254      }
00538254      else
0053825d          x87_r6_8 = (-(((long double)edx->radius)) - x87_r7_4);
0053825d      
00538281      long double x87_r7_8 = (x87_r6_8 / x87_r6_8);
0053828b      long double x87_r6_12 = ((((long double)1.0) - x87_r7_8) * ((long double)arg2->walk_interp));
00538291      arg3 = ((float)x87_r6_12);
00538295      long double temp2 = ((long double)arg2->walk_interp);
00538295      (x87_r6_12 - temp2);
00538295      
005382a0      if ((*(uint8_t*)((char*)((((x87_r6_12 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_12, temp2))) ? 1 : 0) << 0xa) | ((((x87_r6_12 == temp2) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 1) != 0)
005382a0      {
005382a6          (((long double)arg3) - ((long double)-0.5));
005382ae          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005382ae          
005382b1          if (p_2)
005382b1          {
005382d2              edx->center.x = ((float)(((long double)edx->center.x) - (x87_r7_8 * ((long double)arg4->x))));
005382dd              edx->center.y = ((float)(((long double)edx->center.y) - ((long double)((float)(x87_r7_8 * ((long double)arg4->y))))));
005382e7              edx->center.z = ((float)(((long double)edx->center.z) - ((long double)((float)(x87_r7_8 * ((long double)arg4->z))))));
005382ea              arg2->walk_interp = arg3;
005382f8              return 1;
005382b1          }
005382a0      }
005382a0      
00538303      return 0;
00538210  }

00538313                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00538320  int32_t __thiscall Plane::compute_time_of_intersection(class Plane const* this, class Ray const* arg2, double* arg3)

00538320  {
0053833b      long double x87_r7_2 = (((((long double)arg2->dir.z) * ((long double)this->N.z)) + (((long double)arg2->dir.y) * ((long double)this->N.y))) + (((long double)arg2->dir.x) * ((long double)this->N.x)));
0053833f      long double x87_r6_6 = fabsl(x87_r7_2);
00538341      long double x87_r5_4 = ((long double)0.000199999995f);
00538347      (x87_r5_4 - x87_r6_6);
00538347      
0053834e      if ((*(uint8_t*)((char*)((((x87_r5_4 < x87_r6_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_4, x87_r6_6))) ? 1 : 0) << 0xa) | ((((x87_r5_4 == x87_r6_6) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
0053834e      {
00538373          ((((((long double)arg2->pt.z) * ((long double)this->N.z)) + (((long double)arg2->pt.y) * ((long double)this->N.y))) + (((long double)arg2->pt.x) * ((long double)this->N.x))) + ((long double)this->d));
00538384          *(uint64_t*)arg3 = ((double)x87_r7_2);
00538386          long double temp1_1 = ((long double)0.0);
00538386          (x87_r7_2 - temp1_1);
0053838c          double* eax_2;
0053838c          eax_2 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0053838e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053838e          
00538391          if (p_1)
00538398              return 1;
0053834e      }
0053834e      
00538354      return 0;
00538320  }

0053839b                                                                                   90 90 90 90 90                             .....

005383a0  void __fastcall CPolygon::CPolygon(class CPolygon* this)

005383a0  {
005383a9      this->vertices = 0;
005383ab      this->vertex_ids = nullptr;
005383ae      this->poly_id = 0xffff;
005383b4      this->num_pts = 0;
005383b7      this->stippling = 0;
005383ba      this->sides_type = 0;
005383bd      this->pos_uv_indices = nullptr;
005383c0      this->neg_uv_indices = nullptr;
005383c3      this->pos_surface = 0xffff;
005383c7      this->neg_surface = 0xffff;
005383cb      this->screen = nullptr;
005383a0  }

005383cf                                               90                                                                 .

005383d0  void __fastcall CPolygon::make_plane(class CPolygon* this)

005383d0  {
005383d3      long double x87_r7 = ((long double)0f);
005383da      uint32_t num_pts = ((uint32_t)this->num_pts);
005383de      long double x87_r6 = ((long double)0f);
005383eb      float var_1c = 0f;
005383eb      
005383f7      if ((num_pts - 1) > 1)
005383f7      {
005383fd          class CVertex** vertices = this->vertices;
005383ff          class CVertex* eax_1 = *(uint32_t*)vertices;
00538406          void* edx_1 = &vertices[1];
00538409          int32_t i_2 = (((uint32_t)this->num_pts) - 2);
00538482          int32_t i;
00538482          
00538482          do
00538482          {
00538410              float* esi_1 = *(uint32_t*)((char*)edx_1 + 4);
00538415              edx_1 += 4;
00538418              i = i_2;
00538418              i_2 -= 1;
00538419              long double x87_r5_2 = (((long double)*(uint32_t*)esi_1) - ((long double)*(uint32_t*)((char*)eax_1->__inner0 + 0)));
0053841e              long double x87_r4_2 = (((long double)esi_1[1]) - ((long double)*(uint32_t*)((char*)eax_1->__inner0 + 4)));
00538424              float* esi_2 = *(uint32_t*)((char*)edx_1 - 4);
00538427              long double x87_r3_2 = (((long double)esi_1[2]) - ((long double)*(uint32_t*)((char*)eax_1->__inner0 + 8)));
0053842e              float var_18_1 = ((float)(((long double)*(uint32_t*)esi_2) - ((long double)*(uint32_t*)((char*)eax_1->__inner0 + 0))));
00538438              float var_14_1 = ((float)(((long double)esi_2[1]) - ((long double)*(uint32_t*)((char*)eax_1->__inner0 + 4))));
0053843f              long double x87_r2_6 = (((long double)esi_2[2]) - ((long double)*(uint32_t*)((char*)eax_1->__inner0 + 8)));
00538472              x87_r7 = (x87_r7 + ((long double)((float)((((long double)var_14_1) * x87_r3_2) - (x87_r2_6 * x87_r4_2)))));
00538478              x87_r6 = (((x87_r4_2 * ((long double)var_18_1)) - (((long double)var_14_1) * x87_r5_2)) + ((long double)((float)((x87_r2_6 * x87_r5_2) - (x87_r3_2 * ((long double)var_18_1))))));
0053847e              var_1c = ((float)(x87_r5_2 + ((long double)var_1c)));
00538482          } while (i != 1);
005383f7      }
005383f7      
0053849d      long double x87_r5_9 = (((long double)1f) / sqrtl((((((long double)var_1c) * ((long double)var_1c)) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7))));
005384a3      float var_2c = ((float)x87_r5_9);
005384a9      float var_24 = ((float)(x87_r5_9 * x87_r7));
005384b3      float var_20 = ((float)(((long double)var_2c) * x87_r6));
005384c3      float var_1c_1 = ((float)(((long double)var_2c) * ((long double)var_1c)));
005384c7      long double x87_r7_4 = ((long double)0f);
005384c7      
005384cd      if (num_pts > 0)
005384cd      {
005384cf          class CVertex** vertices_1 = this->vertices;
005384d1          uint32_t num_pts_1 = ((uint32_t)this->num_pts);
005384f5          uint32_t i_1;
005384f5          
005384f5          do
005384f5          {
005384d5              float* eax_2 = *(uint32_t*)vertices_1;
005384de              vertices_1 = &vertices_1[1];
005384e1              i_1 = num_pts_1;
005384e1              num_pts_1 -= 1;
005384f3              x87_r7_4 = (x87_r7_4 + (((((long double)var_1c_1) * ((long double)eax_2[2])) + (((long double)var_20) * ((long double)eax_2[1]))) + (((long double)var_24) * ((long double)*(uint32_t*)eax_2))));
005384f5          } while (i_1 != 1);
005384cd      }
005384cd      
00538503      this->plane.d = ((float)-((x87_r7_4 / ((long double)num_pts))));
00538503      this->plane.N.x = var_24;
00538503      this->plane.N.y = var_20;
00538503      this->plane.N.z = var_1c_1;
005383d0  }

00538521     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00538530  uint32_t __thiscall CPolygon::Pack(class CPolygon* this, void** arg2, uint32_t arg3)

00538530  {
00538530      uint32_t num_pts = ((uint32_t)this->num_pts);
00538535      int32_t ebx;
00538535      ebx = this->stippling;
0053853c      uint32_t result = ((num_pts * 2) + 0xc);
0053853c      
00538540      if ((ebx & 4) == 0)
00538542          result += num_pts;
00538542      
0053854d      if ((this->sides_type == 2 && (ebx & 8) == 0))
0053854f          result += num_pts;
0053854f      
00538555      if (arg3 >= result)
00538555      {
00538562          int32_t edi;
00538562          edi = this->poly_id;
00538566          **(uint16_t**)arg2 = edi;
0053856b          void* ebx_2 = (*(uint32_t*)arg2 + 2);
0053856e          *(uint32_t*)arg2 = ebx_2;
00538570          void* esi_2 = ebx_2;
00538572          ebx_2 = this->num_pts;
00538575          *(uint8_t*)esi_2 = ebx_2;
00538579          char* edi_2 = (*(uint32_t*)arg2 + 1);
0053857a          *(uint32_t*)arg2 = edi_2;
0053857c          ebx_2 = this->stippling;
00538581          *(uint8_t*)edi_2 = ebx_2;
00538585          void* esi_5 = (*(uint32_t*)arg2 + 1);
00538586          *(uint32_t*)arg2 = esi_5;
0053858b          *(uint32_t*)esi_5 = this->sides_type;
0053858f          void* ebx_4 = (*(uint32_t*)arg2 + 4);
00538592          *(uint32_t*)arg2 = ebx_4;
00538594          int32_t edi_3;
00538594          edi_3 = this->pos_surface;
0053859a          *(uint16_t*)ebx_4 = edi_3;
0053859f          void* edi_5 = (*(uint32_t*)arg2 + 2);
005385a2          *(uint32_t*)arg2 = edi_5;
005385a4          int16_t* esi_7 = edi_5;
005385a6          edi_5 = this->neg_surface;
005385aa          *(uint16_t*)esi_7 = edi_5;
005385af          void* esi_9 = (*(uint32_t*)arg2 + 2);
005385b2          *(uint32_t*)arg2 = esi_9;
005385b4          ebx_4 = this->num_pts;
005385b7          void* edi_6 = esi_9;
005385b9          int32_t i = 0;
005385b9          
005385bd          if (ebx_4 > 0)
005385bd          {
005385d8              do
005385d8              {
005385c3                  uint16_t* ebx_5;
005385c3                  ebx_5 = this->vertex_ids[i];
005385c7                  *(uint16_t*)edi_6 = ebx_5;
005385cc                  edi_6 = (*(uint32_t*)arg2 + 2);
005385cf                  *(uint32_t*)arg2 = edi_6;
005385d5                  i += 1;
005385d8              } while (i < ((uint32_t)this->num_pts));
005385bd          }
005385bd          
005385de          if ((this->stippling & 4) == 0)
005385de          {
005385e0              ebx_4 = this->num_pts;
005385e3              char* i_1 = nullptr;
005385e3              
005385e7              if (ebx_4 > 0)
005385e7              {
0053860e                  do
0053860e                  {
005385f5                      arg3 = result;
005385f9                      result = *(uint8_t*)(i_1 + this->pos_uv_indices);
005385fc                      **(uint8_t**)arg2 = result;
00538600                      result = arg3;
00538605                      *(uint32_t*)arg2 += 1;
0053860b                      i_1 = &i_1[1];
0053860e                  } while (i_1 < ((uint32_t)this->num_pts));
005385e7              }
005385de          }
005385de          
0053861a          if ((this->sides_type == 2 && (this->stippling & 8) == 0))
0053861a          {
0053861c              ebx_4 = this->num_pts;
0053861f              char* i_2 = nullptr;
0053861f              
00538623              if (ebx_4 > 0)
00538623              {
00538643                  do
00538643                  {
0053862a                      arg3 = result;
0053862e                      result = *(uint8_t*)(i_2 + this->neg_uv_indices);
00538631                      **(uint8_t**)arg2 = result;
00538635                      result = arg3;
0053863a                      *(uint32_t*)arg2 += 1;
00538640                      i_2 = &i_2[1];
00538643                  } while (i_2 < ((uint32_t)this->num_pts));
00538623              }
0053861a          }
00538555      }
00538555      
00538648      return result;
00538530  }

0053864b                                   90 90 90 90 90                                                             .....

00538650  int32_t __thiscall CPolygon::UnPack(class CPolygon* this, void** arg2, uint32_t arg3)

00538650  {
00538650      class CVertex* ebx;
00538650      class CVertex* var_4 = ebx;
00538655      CPolygon::Destroy(this);
00538663      this->poly_id = **(uint16_t**)arg2;
00538669      void* edx_1 = (*(uint32_t*)arg2 + 2);
0053866c      *(uint32_t*)arg2 = edx_1;
00538670      edx_1 = *(uint8_t*)edx_1;
00538672      this->num_pts = edx_1;
00538677      void* ecx_2 = (*(uint32_t*)arg2 + 1);
00538678      *(uint32_t*)arg2 = ecx_2;
0053867c      void* eax_2;
0053867c      eax_2 = *(uint8_t*)ecx_2;
0053867e      this->stippling = eax_2;
00538683      void* eax_4 = (*(uint32_t*)arg2 + 1);
00538684      *(uint32_t*)arg2 = eax_4;
00538688      this->sides_type = *(uint32_t*)eax_4;
0053868d      void* edx_3 = (*(uint32_t*)arg2 + 4);
00538690      *(uint32_t*)arg2 = edx_3;
00538694      edx_3 = *(uint16_t*)edx_3;
00538697      this->pos_surface = edx_3;
0053869d      void* ecx_5 = (*(uint32_t*)arg2 + 2);
005386a0      *(uint32_t*)arg2 = ecx_5;
005386a4      void* eax_6;
005386a4      eax_6 = *(uint16_t*)ecx_5;
005386a7      this->neg_surface = eax_6;
005386ab      *(uint32_t*)arg2 += 2;
005386b6      void* eax_7 = operator new[]((((uint32_t)this->num_pts) << 2));
005386bf      uint32_t edx_5 = (((uint32_t)this->num_pts) << 1);
005386c2      this->vertices = eax_7;
005386c9      this->vertex_ids = operator new[](edx_5);
005386d4      void* eax_11 = operator new[]((((uint32_t)this->num_pts) << 2));
005386d9      uint8_t num_pts = this->num_pts;
005386dc      this->screen = eax_11;
005386e2      char* i = nullptr;
005386e2      
005386e6      if (num_pts > 0)
005386e6      {
0053871c          do
0053871c          {
005386ea              void* ecx_8;
005386ea              ecx_8 = **(uint16_t**)arg2;
005386ed              this->vertex_ids[i] = ecx_8;
005386f4              *(uint32_t*)arg2 += 2;
0053870e              this->vertices[i] = ((((uint32_t)this->vertex_ids[i]) * CVertexArray::vertex_size) + CPolygon::pack_verts->vertices);
00538719              i = &i[1];
0053871c          } while (i < ((uint32_t)this->num_pts));
005386e6      }
005386e6      
00538722      if ((this->stippling & 4) == 0)
00538722      {
00538729          void* eax_12;
00538729          int32_t ecx_13;
00538729          eax_12 = operator new[](((uint32_t)this->num_pts));
0053872e          ecx_13 = this->num_pts;
00538731          this->pos_uv_indices = eax_12;
00538737          i = nullptr;
00538737          
0053873b          if (ecx_13 > 0)
0053873b          {
00538753              do
00538753              {
00538745                  void* ecx_15;
00538745                  ecx_15 = **(uint8_t**)arg2;
00538747                  *(uint8_t*)(i + this->pos_uv_indices) = ecx_15;
0053874a                  *(uint32_t*)arg2 += 1;
00538750                  i = &i[1];
00538753              } while (i < ((uint32_t)this->num_pts));
0053873b          }
00538722      }
00538722      
0053875f      if ((this->sides_type == 2 && (this->stippling & 8) == 0))
0053875f      {
00538766          void* eax_14 = operator new[](((uint32_t)this->num_pts));
0053876b          uint8_t num_pts_1 = this->num_pts;
0053876e          this->neg_uv_indices = eax_14;
00538774          i = nullptr;
00538774          
00538778          if (num_pts_1 > 0)
00538778          {
00538793              do
00538793              {
00538785                  void* ecx_16;
00538785                  ecx_16 = **(uint8_t**)arg2;
00538787                  *(uint8_t*)(i + this->neg_uv_indices) = ecx_16;
0053878a                  *(uint32_t*)arg2 += 1;
00538790                  i = &i[1];
00538793              } while (i < ((uint32_t)this->num_pts));
00538778          }
0053875f      }
0053875f      
00538799      if (this->sides_type == 1)
00538799      {
0053879b          i = this->pos_surface;
0053879f          char* pos_uv_indices = this->pos_uv_indices;
005387a2          this->neg_surface = i;
005387a6          this->neg_uv_indices = pos_uv_indices;
00538799      }
00538799      
005387ab      CPolygon::make_plane(this);
005387b8      return 1;
00538650  }

005387bb                                                                                   90 90 90 90 90                             .....

005387c0  int32_t __thiscall CPolygon::polygon_hits_sphere(class CPolygon const* this, class CSphere const* arg2, class AC1Legacy::Vector3* arg3)

005387c0  {
005387c0      class CSphere* edx_4 = arg2;
005387dc      long double x87_r7_4 = ((((((long double)this->plane.N.y) * ((long double)edx_4->center.y)) + (((long double)this->plane.N.z) * ((long double)edx_4->center.z))) + (((long double)this->plane.N.x) * ((long double)edx_4->center.x))) + ((long double)this->plane.d));
005387e2      long double x87_r6_5 = (((long double)edx_4->radius) - ((long double)0.000199999995f));
005387ea      long double x87_r5_1 = fabsl(x87_r7_4);
005387ee      (x87_r6_5 - x87_r5_1);
005387f0      int32_t eax;
005387f0      eax = ((((x87_r6_5 < x87_r5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, x87_r5_1))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == x87_r5_1) ? 1 : 0) << 0xe) | 0x3000))));
005387f2      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005387f2      
005387f5      if (!(p))
00538800          return 0;
00538800      
0053880e      class AC1Legacy::Vector3* esi = arg3;
00538814      int32_t i = 0;
00538819      arg3 = 1;
00538821      arg2 = ((float)((x87_r6_5 * x87_r6_5) - (x87_r7_4 * x87_r7_4)));
00538847      float var_8 = ((float)(((long double)edx_4->center.y) - (x87_r6_5 * ((long double)this->plane.N.y))));
00538856      long double x87_r7_9 = (((long double)edx_4->center.z) - ((long double)((float)(x87_r6_5 * ((long double)this->plane.N.z)))));
0053885a      esi->x = ((float)(((long double)edx_4->center.x) - (x87_r6_5 * ((long double)this->plane.N.x))));
00538860      esi->y = var_8;
0053886b      esi->z = ((float)x87_r7_9);
0053886e      uint32_t num_pts = ((uint32_t)this->num_pts);
0053886e      
00538874      if (num_pts > 0)
00538874      {
0053887a          class CVertex** vertices = this->vertices;
0053887c          void* edi_1 = ((num_pts << 2) + 0xfffffffc);
0053887c          
005389e5          do
005389e5          {
00538883              float* eax_3 = *(uint32_t*)((char*)edi_1 + vertices);
00538886              edi_1 = (i << 2);
0053888d              float* edx_3 = *(uint32_t*)((char*)edi_1 + vertices);
00538894              float var_18_1 = ((float)(((long double)*(uint32_t*)edx_3) - ((long double)*(uint32_t*)eax_3)));
0053889e              float var_14_1 = ((float)(((long double)edx_3[1]) - ((long double)eax_3[1])));
005388a5              long double x87_r7_15 = (((long double)edx_3[2]) - ((long double)eax_3[2]));
005388a8              float var_10_1 = ((float)x87_r7_15);
005388b6              long double x87_r7_17 = ((x87_r7_15 * ((long double)this->plane.N.y)) - (((long double)var_14_1) * ((long double)this->plane.N.z)));
005388c6              long double x87_r6_12 = ((((long double)var_18_1) * ((long double)this->plane.N.z)) - (((long double)var_10_1) * ((long double)this->plane.N.x)));
005388d6              long double x87_r5_17 = ((((long double)var_14_1) * ((long double)this->plane.N.x)) - (((long double)var_18_1) * ((long double)this->plane.N.y)));
005388dc              float var_c_1 = ((float)(((long double)esi->x) - ((long double)*(uint32_t*)eax_3)));
005388e6              float var_8_1 = ((float)(((long double)esi->y) - ((long double)eax_3[1])));
005388ed              long double x87_r4_10 = (((long double)esi->z) - ((long double)eax_3[2]));
005388f0              float var_4_1 = ((float)x87_r4_10);
00538904              long double x87_r4_13 = (((x87_r4_10 * x87_r5_17) + (((long double)var_8_1) * x87_r6_12)) + (((long double)var_c_1) * x87_r7_17));
00538906              long double temp1_1 = ((long double)0f);
00538906              (x87_r4_13 - temp1_1);
0053890c              eax_3 = ((((x87_r4_13 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_13, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r4_13 == temp1_1) ? 1 : 0) << 0xe) | 0x2000))));
0053890e              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053890e              
00538911              if (!(p_1))
00538911              {
00538919                  long double x87_r3_6 = (x87_r4_13 * x87_r4_13);
0053892b                  long double x87_r2_5 = ((((x87_r5_17 * x87_r5_17) + (x87_r6_12 * x87_r6_12)) + (x87_r7_17 * x87_r7_17)) * ((long double)arg2));
0053892f                  (x87_r2_5 - x87_r3_6);
00538935                  eax_3 = ((((x87_r2_5 < x87_r3_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_5, x87_r3_6))) ? 1 : 0) << 0xa) | ((((x87_r2_5 == x87_r3_6) ? 1 : 0) << 0xe) | 0x3000))));
00538939                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00538939                  
0053893e                  if (!(p_2))
00538a02                      return 0;
00538a02                  
0053895e                  long double x87_r7_22 = (((((long double)var_4_1) * ((long double)var_10_1)) + (((long double)var_8_1) * ((long double)var_14_1))) + (((long double)var_c_1) * ((long double)var_18_1)));
00538960                  long double temp3_1 = ((long double)0f);
00538960                  (x87_r7_22 - temp3_1);
00538966                  eax_3 = ((((x87_r7_22 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_22, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_22 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00538966                  
0053896b                  if ((*(uint8_t*)((char*)eax_3)[1] & 1) == 0)
0053896b                  {
00538987                      long double x87_r6_21 = (((((long double)var_10_1) * ((long double)var_10_1)) + (((long double)var_14_1) * ((long double)var_14_1))) + (((long double)var_18_1) * ((long double)var_18_1)));
0053898b                      (x87_r7_22 - x87_r6_21);
0053898d                      eax_3 = ((((x87_r7_22 < x87_r6_21) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_22, x87_r6_21))) ? 1 : 0) << 0xa) | ((((x87_r7_22 == x87_r6_21) ? 1 : 0) << 0xe) | 0))));
0053898f                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
0053898f                      
00538992                      if (!(p_3))
005389a0                          return 1;
0053896b                  }
0053896b                  
005389a5                  arg3 = nullptr;
00538911              }
00538911              
005389d1              long double x87_r7_28 = (((((long double)var_4_1) * ((long double)var_4_1)) + (((long double)var_8_1) * ((long double)var_8_1))) + (((long double)var_c_1) * ((long double)var_c_1)));
005389d3              long double temp2_1 = ((long double)arg2);
005389d3              (x87_r7_28 - temp2_1);
005389d7              eax_3 = ((((x87_r7_28 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_28, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_28 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005389d9              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
005389d9              
005389dc              if (!(p_4))
005389a0                  return 1;
005389a0              
005389e2              i += 1;
005389e5          } while (i < ((uint32_t)this->num_pts));
00538874      }
00538874      
005389f6      return arg3;
005387c0  }

00538a05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00538a10  int32_t __thiscall CPolygon::polygon_hits_sphere_slow_but_sure(class CPolygon const* this, class CSphere const* arg2, class AC1Legacy::Vector3* arg3)

00538a10  {
00538a10      class CSphere* edx_1 = arg2;
00538a2c      long double x87_r7_4 = ((((((long double)this->plane.N.y) * ((long double)edx_1->center.y)) + (((long double)this->plane.N.z) * ((long double)edx_1->center.z))) + (((long double)edx_1->center.x) * ((long double)this->plane.N.x))) + ((long double)this->plane.d));
00538a32      long double x87_r6_5 = (((long double)edx_1->radius) - ((long double)0.000199999995f));
00538a3a      long double x87_r5_1 = fabsl(x87_r7_4);
00538a3e      (x87_r6_5 - x87_r5_1);
00538a40      int32_t eax;
00538a40      eax = ((((x87_r6_5 < x87_r5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, x87_r5_1))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == x87_r5_1) ? 1 : 0) << 0xe) | 0x3000))));
00538a42      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00538a42      
00538a45      if (!(p))
00538a50          return 0;
00538a50      
00538a5e      int32_t ebp = 0;
00538a63      arg2 = ((float)((x87_r6_5 * x87_r6_5) - (x87_r7_4 * x87_r7_4)));
00538a8d      float var_8 = ((float)(((long double)edx_1->center.y) - (x87_r6_5 * ((long double)this->plane.N.y))));
00538a98      float* edx = arg3;
00538a9c      long double x87_r7_9 = (((long double)edx_1->center.z) - ((long double)((float)(x87_r6_5 * ((long double)this->plane.N.z)))));
00538aa2      *(uint32_t*)edx = ((float)(((long double)edx_1->center.x) - (x87_r6_5 * ((long double)this->plane.N.x))));
00538aa8      edx[1] = var_8;
00538ab3      edx[2] = ((float)x87_r7_9);
00538ab6      uint32_t num_pts = ((uint32_t)this->num_pts);
00538ab6      
00538abc      if (num_pts > 0)
00538abc      {
00538ac2          class CVertex** vertices = this->vertices;
00538ac4          void* ebx_1 = ((num_pts << 2) + 0xfffffffc);
00538ac4          
00538ad0          while (true)
00538ad0          {
00538ad0              float* eax_3 = *(uint32_t*)((char*)ebx_1 + vertices);
00538ad3              ebx_1 = (ebp << 2);
00538ada              float* esi_3 = *(uint32_t*)((char*)ebx_1 + vertices);
00538adf              long double x87_r7_11 = (((long double)*(uint32_t*)esi_3) - ((long double)*(uint32_t*)eax_3));
00538ae4              long double x87_r6_9 = (((long double)esi_3[1]) - ((long double)eax_3[1]));
00538aea              long double x87_r5_14 = (((long double)esi_3[2]) - ((long double)eax_3[2]));
00538b2f              long double x87_r5_20 = (((((long double)edx[2]) - ((long double)eax_3[2])) * ((x87_r6_9 * ((long double)this->plane.N.x)) - (x87_r7_11 * ((long double)this->plane.N.y)))) + ((((long double)edx[1]) - ((long double)eax_3[1])) * ((long double)((float)((x87_r7_11 * ((long double)this->plane.N.z)) - (x87_r5_14 * ((long double)this->plane.N.x)))))));
00538b39              ((x87_r5_20 + ((((long double)*(uint32_t*)edx) - ((long double)*(uint32_t*)eax_3)) * ((long double)((float)((x87_r5_14 * ((long double)this->plane.N.y)) - (x87_r6_9 * ((long double)this->plane.N.z))))))) - ((long double)0f));
00538b43              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00538b46              uint32_t num_pts_1 = ((uint32_t)this->num_pts);
00538b46              
00538b4a              if (!(p_1))
00538b4a              {
00538b64                  int32_t ebp_1 = 0;
00538b66                  int32_t* ebx_2 = ((num_pts_1 << 2) + 0xfffffffc);
00538b66                  
00538b70                  while (true)
00538b70                  {
00538b70                      float* eax_5 = *(uint32_t*)((char*)ebx_2 + vertices);
00538b73                      ebx_2 = (ebp_1 << 2);
00538b7a                      float* esi_4 = *(uint32_t*)((char*)ebx_2 + vertices);
00538b81                      float var_18_1 = ((float)(((long double)*(uint32_t*)esi_4) - ((long double)*(uint32_t*)eax_5)));
00538b8b                      float var_14_1 = ((float)(((long double)esi_4[1]) - ((long double)eax_5[1])));
00538b92                      long double x87_r7_19 = (((long double)esi_4[2]) - ((long double)eax_5[2]));
00538b95                      float var_10_1 = ((float)x87_r7_19);
00538ba3                      long double x87_r7_21 = ((x87_r7_19 * ((long double)this->plane.N.y)) - (((long double)var_14_1) * ((long double)this->plane.N.z)));
00538bb3                      long double x87_r6_21 = ((((long double)var_18_1) * ((long double)this->plane.N.z)) - (((long double)var_10_1) * ((long double)this->plane.N.x)));
00538bc3                      long double x87_r5_27 = ((((long double)var_14_1) * ((long double)this->plane.N.x)) - (((long double)var_18_1) * ((long double)this->plane.N.y)));
00538bc9                      float var_c_2 = ((float)(((long double)*(uint32_t*)edx) - ((long double)*(uint32_t*)eax_5)));
00538bd3                      float var_8_2 = ((float)(((long double)edx[1]) - ((long double)eax_5[1])));
00538bda                      long double x87_r4_22 = (((long double)edx[2]) - ((long double)eax_5[2]));
00538bdd                      float var_4_1 = ((float)x87_r4_22);
00538bf1                      long double x87_r4_25 = (((x87_r4_22 * x87_r5_27) + (((long double)var_8_2) * x87_r6_21)) + (((long double)var_c_2) * x87_r7_21));
00538bf3                      long double temp2_1 = ((long double)0f);
00538bf3                      (x87_r4_25 - temp2_1);
00538bf9                      eax_5 = ((((x87_r4_25 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_25, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r4_25 == temp2_1) ? 1 : 0) << 0xe) | 0x2000))));
00538bfb                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00538bfb                      
00538bfe                      if (p_2)
00538bfe                      {
00538ca9                      label_538ca9:
00538ca9                          long double x87_r7_31 = (((((long double)var_4_1) * ((long double)var_4_1)) + (((long double)var_8_2) * ((long double)var_8_2))) + (((long double)var_c_2) * ((long double)var_c_2)));
00538cab                          long double temp4_1 = ((long double)arg2);
00538cab                          (x87_r7_31 - temp4_1);
00538caf                          eax_5 = ((((x87_r7_31 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_31, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_31 == temp4_1) ? 1 : 0) << 0xe) | 0))));
00538cb1                          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
00538cb1                          
00538cb4                          if (!(p_5))
00538cb4                              break;
00538cb4                          
00538cbe                          ebp_1 += 1;
00538cbe                          
00538cc1                          if (ebp_1 < ((uint32_t)this->num_pts))
00538cc1                              continue;
00538bfe                      }
00538bfe                      else
00538bfe                      {
00538c06                          long double x87_r3_8 = (x87_r4_25 * x87_r4_25);
00538c18                          long double x87_r2_5 = ((((x87_r5_27 * x87_r5_27) + (x87_r6_21 * x87_r6_21)) + (x87_r7_21 * x87_r7_21)) * ((long double)arg2));
00538c1c                          (x87_r2_5 - x87_r3_8);
00538c22                          eax_5 = ((((x87_r2_5 < x87_r3_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_5, x87_r3_8))) ? 1 : 0) << 0xa) | ((((x87_r2_5 == x87_r3_8) ? 1 : 0) << 0xe) | 0x3000))));
00538c26                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00538c26                          
00538c2b                          if (p_3)
00538c2b                          {
00538c4b                              long double x87_r7_26 = (((((long double)var_4_1) * ((long double)var_10_1)) + (((long double)var_8_2) * ((long double)var_14_1))) + (((long double)var_c_2) * ((long double)var_18_1)));
00538c4d                              long double temp3_1 = ((long double)0f);
00538c4d                              (x87_r7_26 - temp3_1);
00538c53                              eax_5 = ((((x87_r7_26 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_26, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_26 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00538c53                              
00538c58                              if ((*(uint8_t*)((char*)eax_5)[1] & 1) == 0)
00538c58                              {
00538c74                                  long double x87_r6_30 = (((((long double)var_10_1) * ((long double)var_10_1)) + (((long double)var_14_1) * ((long double)var_14_1))) + (((long double)var_18_1) * ((long double)var_18_1)));
00538c78                                  (x87_r7_26 - x87_r6_30);
00538c7a                                  eax_5 = ((((x87_r7_26 < x87_r6_30) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_26, x87_r6_30))) ? 1 : 0) << 0xa) | ((((x87_r7_26 == x87_r6_30) ? 1 : 0) << 0xe) | 0))));
00538c7c                                  bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
00538c7c                                  
00538c7f                                  if (!(p_4))
00538c7f                                      break;
00538c58                              }
00538c58                              
00538c58                              goto label_538ca9;
00538c2b                          }
00538bfe                      }
00538bfe                      
00538cd0                      return 0;
00538b70                  }
00538b70                  
00538cd0                  break;
00538b4a              }
00538b4a              
00538b4c              ebp += 1;
00538b4c              
00538b4f              if (ebp >= num_pts_1)
00538b4f                  break;
00538ad0          }
00538abc      }
00538abc      
00538b61      return 1;
00538a10  }

00538acd                                         8d 49 00                                                               .I.
00538cd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00538ce0  void __thiscall CPolygon::adjust_to_placement_poly(class CPolygon const* this, class CSphere* arg2, class CSphere* arg3, float arg4, int32_t arg5, int32_t arg6)

00538ce0  {
00538d02      long double x87_r7_4 = ((((((long double)this->plane.N.y) * ((long double)arg2->center.y)) + (((long double)this->plane.N.z) * ((long double)arg2->center.z))) + (((long double)arg2->center.x) * ((long double)this->plane.N.x))) + ((long double)this->plane.d));
00538d05      long double x87_r7_5;
00538d05      
00538d05      if (arg6 != 0)
00538d05      {
00538d11          long double x87_r6_4 = ((long double)arg4);
00538d11          
00538d17          if (arg5 != 0)
00538d19              x87_r6_4 = (x87_r6_4 * ((long double)-1f));
00538d19          
00538d21          long double temp1_1 = ((long double)0f);
00538d21          (x87_r7_4 - temp1_1);
00538d27          int32_t eax_1;
00538d27          eax_1 = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0x3000))));
00538d27          
00538d2c          if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) != 0)
00538d2e              x87_r6_4 = -(x87_r6_4);
00538d2e          
00538d30          x87_r7_5 = (x87_r6_4 - x87_r7_4);
00538d05      }
00538d05      else
00538d07          x87_r7_5 = (((long double)arg4) - x87_r7_4);
00538d07      
00538d38      long double x87_r6_6 = (x87_r7_5 * ((long double)this->plane.N.x));
00538d40      float var_8 = ((float)(x87_r7_5 * ((long double)this->plane.N.y)));
00538d49      float var_4 = ((float)(x87_r7_5 * ((long double)this->plane.N.z)));
00538d51      arg2->center.x = ((float)(x87_r6_6 + ((long double)arg2->center.x)));
00538d5a      arg2->center.y = ((float)(((long double)var_8) + ((long double)arg2->center.y)));
00538d64      arg2->center.z = ((float)(((long double)var_4) + ((long double)arg2->center.z)));
00538d69      arg3->center.x = ((float)(x87_r6_6 + ((long double)arg3->center.x)));
00538d72      arg3->center.y = ((float)(((long double)var_8) + ((long double)arg3->center.y)));
00538d7c      arg3->center.z = ((float)(((long double)var_4) + ((long double)arg3->center.z)));
00538ce0  }

00538d85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00538d90  void __thiscall CPolygon::point_in_polygon(class CPolygon const* this, class AC1Legacy::Vector3 const* arg2)

00538d90  {
00538d90      uint32_t num_pts = ((uint32_t)this->num_pts);
00538d9a      int32_t i = 0;
00538d9a      
00538d9f      if (num_pts > 0)
00538d9f      {
00538da5          class CVertex** vertices = this->vertices;
00538dab          void* edi_1 = ((num_pts << 2) + 0xfffffffc);
00538dab          
00538e31          do
00538e31          {
00538db2              float* eax = *(uint32_t*)((char*)edi_1 + vertices);
00538db5              edi_1 = (i << 2);
00538dbc              float* edx_1 = *(uint32_t*)((char*)edi_1 + vertices);
00538dc1              long double x87_r7_2 = (((long double)*(uint32_t*)edx_1) - ((long double)*(uint32_t*)eax));
00538dc6              long double x87_r6_2 = (((long double)edx_1[1]) - ((long double)eax[1]));
00538dcc              long double x87_r5_2 = (((long double)edx_1[2]) - ((long double)eax[2]));
00538e11              long double x87_r5_8 = (((((long double)arg2->z) - ((long double)eax[2])) * ((x87_r6_2 * ((long double)this->plane.N.x)) - (x87_r7_2 * ((long double)this->plane.N.y)))) + ((((long double)arg2->y) - ((long double)eax[1])) * ((long double)((float)((x87_r7_2 * ((long double)this->plane.N.z)) - (x87_r5_2 * ((long double)this->plane.N.x)))))));
00538e19              long double x87_r6_9 = (x87_r5_8 + ((((long double)arg2->x) - ((long double)*(uint32_t*)eax)) * ((long double)((float)((x87_r5_2 * ((long double)this->plane.N.y)) - (x87_r6_2 * ((long double)this->plane.N.z)))))));
00538e1b              long double temp1_1 = ((long double)0f);
00538e1b              (x87_r6_9 - temp1_1);
00538e21              eax = ((((x87_r6_9 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_9, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_9 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
00538e25              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00538e25              
00538e28              if (!(p_1))
00538e4f                  return;
00538e4f              
00538e2e              i += 1;
00538e31          } while (i < ((uint32_t)this->num_pts));
00538d9f      }
00538d90  }

00538e52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00538e60  int32_t __thiscall CPolygon::check_walkable(class CPolygon const* this, class CSphere* arg2, class AC1Legacy::Vector3 const* arg3)

00538e60  {
00538e7e      long double x87_r6_5 = fabsl((((((long double)this->plane.N.y) * ((long double)arg3->y)) + (((long double)this->plane.N.z) * ((long double)arg3->z))) + (((long double)arg3->x) * ((long double)this->plane.N.x))));
00538e80      long double x87_r5 = ((long double)0.000199999995f);
00538e86      (x87_r5 - x87_r6_5);
00538e86      
00538e8d      if ((*(uint8_t*)((char*)((((x87_r5 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00538e96          return 0;
00538e96      
00538e99      class CSphere* eax_2 = arg2;
00538eab      uint32_t num_pts = ((uint32_t)this->num_pts);
00538eb0      int32_t esi = 0;
00538ebc      arg2 = 1;
00538ec6      long double x87_r6_10 = ((((((long double)this->plane.N.z) * ((long double)eax_2->center.z)) + (((long double)this->plane.N.y) * ((long double)eax_2->center.y))) + (((long double)eax_2->center.x) * ((long double)this->plane.N.x))) + ((long double)this->plane.d));
00538ec9      long double x87_r7_4 = (x87_r6_10 / x87_r6_10);
00538ee5      float var_c = ((float)(((long double)eax_2->center.x) - (x87_r7_4 * ((long double)arg3->x))));
00538ef2      float var_8 = ((float)(((long double)eax_2->center.y) - ((long double)((float)(x87_r7_4 * ((long double)arg3->y))))));
00538efd      float var_4 = ((float)(((long double)eax_2->center.z) - ((long double)((float)(x87_r7_4 * ((long double)arg3->z))))));
00538f01      long double x87_r7_10 = ((long double)eax_2->radius);
00538f08      arg3 = ((float)(x87_r7_10 * x87_r7_10));
00538f08      
00538f0e      if (num_pts > 0)
00538f0e      {
00538f14          class CVertex** vertices = this->vertices;
00538f16          void* edi_1 = ((num_pts << 2) + 0xfffffffc);
00538f16          
00539082          do
00539082          {
00538f20              float* eax_3 = *(uint32_t*)((char*)edi_1 + vertices);
00538f23              edi_1 = (esi << 2);
00538f2a              float* edx = *(uint32_t*)((char*)edi_1 + vertices);
00538f31              float var_24_1 = ((float)(((long double)*(uint32_t*)edx) - ((long double)*(uint32_t*)eax_3)));
00538f3b              float var_20_1 = ((float)(((long double)edx[1]) - ((long double)eax_3[1])));
00538f42              long double x87_r7_16 = (((long double)edx[2]) - ((long double)eax_3[2]));
00538f45              float var_1c_1 = ((float)x87_r7_16);
00538f53              long double x87_r7_18 = ((x87_r7_16 * ((long double)this->plane.N.y)) - (((long double)var_20_1) * ((long double)this->plane.N.z)));
00538f63              long double x87_r6_23 = ((((long double)var_24_1) * ((long double)this->plane.N.z)) - (((long double)var_1c_1) * ((long double)this->plane.N.x)));
00538f73              long double x87_r5_11 = ((((long double)var_20_1) * ((long double)this->plane.N.x)) - (((long double)var_24_1) * ((long double)this->plane.N.y)));
00538f7b              float var_18_1 = ((float)(((long double)var_c) - ((long double)*(uint32_t*)eax_3)));
00538f86              float var_14_1 = ((float)(((long double)var_8) - ((long double)eax_3[1])));
00538f8e              long double x87_r4_8 = (((long double)var_4) - ((long double)eax_3[2]));
00538f91              float var_10_1 = ((float)x87_r4_8);
00538fa5              long double x87_r4_11 = (((x87_r4_8 * x87_r5_11) + (((long double)var_14_1) * x87_r6_23)) + (((long double)var_18_1) * x87_r7_18));
00538fa7              long double temp1_1 = ((long double)0f);
00538fa7              (x87_r4_11 - temp1_1);
00538fad              eax_3 = ((((x87_r4_11 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_11, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r4_11 == temp1_1) ? 1 : 0) << 0xe) | 0x2000))));
00538faf              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00538faf              
00538fb2              if (!(p_1))
00538fb2              {
00538fba                  long double x87_r3_6 = (x87_r4_11 * x87_r4_11);
00538fcc                  long double x87_r2_5 = ((((x87_r5_11 * x87_r5_11) + (x87_r6_23 * x87_r6_23)) + (x87_r7_18 * x87_r7_18)) * ((long double)arg3));
00538fd0                  (x87_r2_5 - x87_r3_6);
00538fd6                  eax_3 = ((((x87_r2_5 < x87_r3_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_5, x87_r3_6))) ? 1 : 0) << 0xa) | ((((x87_r2_5 == x87_r3_6) ? 1 : 0) << 0xe) | 0x3000))));
00538fda                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00538fda                  
00538fdf                  if (!(p_2))
0053909f                      return 0;
0053909f                  
00538fff                  long double x87_r7_23 = (((((long double)var_10_1) * ((long double)var_1c_1)) + (((long double)var_14_1) * ((long double)var_20_1))) + (((long double)var_18_1) * ((long double)var_24_1)));
00539001                  long double temp3_1 = ((long double)0f);
00539001                  (x87_r7_23 - temp3_1);
00539007                  eax_3 = ((((x87_r7_23 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_23, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_23 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00539007                  
0053900c                  if ((*(uint8_t*)((char*)eax_3)[1] & 1) == 0)
0053900c                  {
00539028                      long double x87_r6_32 = (((((long double)var_1c_1) * ((long double)var_1c_1)) + (((long double)var_20_1) * ((long double)var_20_1))) + (((long double)var_24_1) * ((long double)var_24_1)));
0053902c                      (x87_r7_23 - x87_r6_32);
0053902e                      eax_3 = ((((x87_r7_23 < x87_r6_32) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_23, x87_r6_32))) ? 1 : 0) << 0xa) | ((((x87_r7_23 == x87_r6_32) ? 1 : 0) << 0xe) | 0))));
00539030                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
00539030                      
00539033                      if (!(p_3))
00539041                          return 1;
0053900c                  }
0053900c                  
00539046                  arg2 = nullptr;
00538fb2              }
00538fb2              
00539072              long double x87_r7_29 = (((((long double)var_10_1) * ((long double)var_10_1)) + (((long double)var_14_1) * ((long double)var_14_1))) + (((long double)var_18_1) * ((long double)var_18_1)));
00539074              long double temp2_1 = ((long double)arg3);
00539074              (x87_r7_29 - temp2_1);
00539078              eax_3 = ((((x87_r7_29 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_29, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_29 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0053907a              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
0053907a              
0053907d              if (!(p_4))
00539041                  return 1;
00539041              
0053907f              esi += 1;
00539082          } while (esi < num_pts);
00538f0e      }
00538f0e      
00539093      return arg2;
00538e60  }

005390a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005390b0  int32_t __thiscall CPolygon::check_small_walkable(class CPolygon const* this, class CSphere* arg2, class AC1Legacy::Vector3 const* arg3)

005390b0  {
005390ce      long double x87_r6_5 = fabsl((((((long double)this->plane.N.y) * ((long double)arg3->y)) + (((long double)this->plane.N.z) * ((long double)arg3->z))) + (((long double)arg3->x) * ((long double)this->plane.N.x))));
005390d0      long double x87_r5 = ((long double)0.000199999995f);
005390d6      (x87_r5 - x87_r6_5);
005390d6      
005390dd      if ((*(uint8_t*)((char*)((((x87_r5 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
005390e6          return 0;
005390e6      
005390e9      class CSphere* eax_2 = arg2;
005390fb      uint32_t num_pts = ((uint32_t)this->num_pts);
00539100      int32_t esi = 0;
0053910c      arg2 = 1;
00539116      long double x87_r6_10 = ((((((long double)this->plane.N.z) * ((long double)eax_2->center.z)) + (((long double)this->plane.N.y) * ((long double)eax_2->center.y))) + (((long double)eax_2->center.x) * ((long double)this->plane.N.x))) + ((long double)this->plane.d));
00539119      long double x87_r7_4 = (x87_r6_10 / x87_r6_10);
00539135      float var_c = ((float)(((long double)eax_2->center.x) - (x87_r7_4 * ((long double)arg3->x))));
00539142      float var_8 = ((float)(((long double)eax_2->center.y) - ((long double)((float)(x87_r7_4 * ((long double)arg3->y))))));
0053914d      float var_4 = ((float)(((long double)eax_2->center.z) - ((long double)((float)(x87_r7_4 * ((long double)arg3->z))))));
00539151      long double x87_r7_10 = ((long double)eax_2->radius);
0053915e      arg3 = ((float)((x87_r7_10 * x87_r7_10) * ((long double)0.25f)));
0053915e      
00539164      if (num_pts > 0)
00539164      {
0053916a          class CVertex** vertices = this->vertices;
0053916c          void* edi_1 = ((num_pts << 2) + 0xfffffffc);
0053916c          
005392d5          do
005392d5          {
00539173              float* eax_3 = *(uint32_t*)((char*)edi_1 + vertices);
00539176              edi_1 = (esi << 2);
0053917d              float* edx = *(uint32_t*)((char*)edi_1 + vertices);
00539184              float var_24_1 = ((float)(((long double)*(uint32_t*)edx) - ((long double)*(uint32_t*)eax_3)));
0053918e              float var_20_1 = ((float)(((long double)edx[1]) - ((long double)eax_3[1])));
00539195              long double x87_r7_16 = (((long double)edx[2]) - ((long double)eax_3[2]));
00539198              float var_1c_1 = ((float)x87_r7_16);
005391a6              long double x87_r7_18 = ((x87_r7_16 * ((long double)this->plane.N.y)) - (((long double)var_20_1) * ((long double)this->plane.N.z)));
005391b6              long double x87_r6_24 = ((((long double)var_24_1) * ((long double)this->plane.N.z)) - (((long double)var_1c_1) * ((long double)this->plane.N.x)));
005391c6              long double x87_r5_11 = ((((long double)var_20_1) * ((long double)this->plane.N.x)) - (((long double)var_24_1) * ((long double)this->plane.N.y)));
005391ce              float var_18_1 = ((float)(((long double)var_c) - ((long double)*(uint32_t*)eax_3)));
005391d9              float var_14_1 = ((float)(((long double)var_8) - ((long double)eax_3[1])));
005391e1              long double x87_r4_8 = (((long double)var_4) - ((long double)eax_3[2]));
005391e4              float var_10_1 = ((float)x87_r4_8);
005391f8              long double x87_r4_11 = (((x87_r4_8 * x87_r5_11) + (((long double)var_14_1) * x87_r6_24)) + (((long double)var_18_1) * x87_r7_18));
005391fa              long double temp1_1 = ((long double)0f);
005391fa              (x87_r4_11 - temp1_1);
00539200              eax_3 = ((((x87_r4_11 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_11, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r4_11 == temp1_1) ? 1 : 0) << 0xe) | 0x2000))));
00539202              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00539202              
00539205              if (!(p_1))
00539205              {
0053920d                  long double x87_r3_6 = (x87_r4_11 * x87_r4_11);
0053921f                  long double x87_r2_5 = ((((x87_r5_11 * x87_r5_11) + (x87_r6_24 * x87_r6_24)) + (x87_r7_18 * x87_r7_18)) * ((long double)arg3));
00539223                  (x87_r2_5 - x87_r3_6);
00539229                  eax_3 = ((((x87_r2_5 < x87_r3_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_5, x87_r3_6))) ? 1 : 0) << 0xa) | ((((x87_r2_5 == x87_r3_6) ? 1 : 0) << 0xe) | 0x3000))));
0053922d                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0053922d                  
00539232                  if (!(p_2))
005392f2                      return 0;
005392f2                  
00539252                  long double x87_r7_23 = (((((long double)var_10_1) * ((long double)var_1c_1)) + (((long double)var_14_1) * ((long double)var_20_1))) + (((long double)var_18_1) * ((long double)var_24_1)));
00539254                  long double temp3_1 = ((long double)0f);
00539254                  (x87_r7_23 - temp3_1);
0053925a                  eax_3 = ((((x87_r7_23 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_23, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_23 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
0053925a                  
0053925f                  if ((*(uint8_t*)((char*)eax_3)[1] & 1) == 0)
0053925f                  {
0053927b                      long double x87_r6_33 = (((((long double)var_1c_1) * ((long double)var_1c_1)) + (((long double)var_20_1) * ((long double)var_20_1))) + (((long double)var_24_1) * ((long double)var_24_1)));
0053927f                      (x87_r7_23 - x87_r6_33);
00539281                      eax_3 = ((((x87_r7_23 < x87_r6_33) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_23, x87_r6_33))) ? 1 : 0) << 0xa) | ((((x87_r7_23 == x87_r6_33) ? 1 : 0) << 0xe) | 0))));
00539283                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
00539283                      
00539286                      if (!(p_3))
00539294                          return 1;
0053925f                  }
0053925f                  
00539299                  arg2 = nullptr;
00539205              }
00539205              
005392c5              long double x87_r7_29 = (((((long double)var_10_1) * ((long double)var_10_1)) + (((long double)var_14_1) * ((long double)var_14_1))) + (((long double)var_18_1) * ((long double)var_18_1)));
005392c7              long double temp2_1 = ((long double)arg3);
005392c7              (x87_r7_29 - temp2_1);
005392cb              eax_3 = ((((x87_r7_29 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_29, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_29 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005392cd              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
005392cd              
005392d0              if (!(p_4))
00539294                  return 1;
00539294              
005392d2              esi += 1;
005392d5          } while (esi < num_pts);
00539164      }
00539164      
005392e6      return arg2;
005390b0  }

005392f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00539300  int32_t __thiscall CPolygon::find_crossed_edge(class CPolygon const* this, class CSphere* arg2, class AC1Legacy::Vector3 const* arg3, class AC1Legacy::Vector3* arg4)

00539300  {
0053931e      long double x87_r6_5 = fabsl((((((long double)this->plane.N.y) * ((long double)arg3->y)) + (((long double)this->plane.N.z) * ((long double)arg3->z))) + (((long double)this->plane.N.x) * ((long double)arg3->x))));
00539320      long double x87_r5 = ((long double)0.000199999995f);
00539326      (x87_r5 - x87_r6_5);
00539326      
0053932d      if ((*(uint8_t*)((char*)((((x87_r5 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00539336          return 0;
00539336      
0053934b      uint32_t num_pts = ((uint32_t)this->num_pts);
00539353      int32_t edi = 0;
0053935e      long double x87_r6_10 = ((((((long double)this->plane.N.z) * ((long double)arg2->center.z)) + (((long double)this->plane.N.y) * ((long double)arg2->center.y))) + (((long double)this->plane.N.x) * ((long double)arg2->center.x))) + ((long double)this->plane.d));
00539361      long double x87_r7_4 = (x87_r6_10 / x87_r6_10);
00539361      
00539399      if (num_pts > 0)
00539399      {
0053939f          class CVertex** vertices = this->vertices;
005393a1          void* esi_1 = ((num_pts << 2) + 0xfffffffc);
005393a1          
0053943d          do
0053943d          {
005393b0              float* eax_3 = *(uint32_t*)((char*)esi_1 + vertices);
005393b3              esi_1 = (edi << 2);
005393ba              float* edx = *(uint32_t*)((char*)esi_1 + vertices);
005393c1              float var_18_1 = ((float)(((long double)*(uint32_t*)edx) - ((long double)*(uint32_t*)eax_3)));
005393cb              float var_14_1 = ((float)(((long double)edx[1]) - ((long double)eax_3[1])));
005393d2              long double x87_r7_15 = (((long double)edx[2]) - ((long double)eax_3[2]));
005393d5              float var_10_1 = ((float)x87_r7_15);
0053941d              long double x87_r2_5 = ((((long double)((float)(((long double)arg2->center.y) - ((long double)((float)(x87_r7_4 * ((long double)arg3->y))))))) - ((long double)eax_3[1])) * ((((long double)var_18_1) * ((long double)this->plane.N.z)) - (((long double)var_10_1) * ((long double)this->plane.N.x))));
00539423              long double x87_r3_6 = ((((long double)((float)(((long double)arg2->center.x) - (x87_r7_4 * ((long double)arg3->x))))) - ((long double)*(uint32_t*)eax_3)) * ((x87_r7_15 * ((long double)this->plane.N.y)) - (((long double)var_14_1) * ((long double)this->plane.N.z))));
00539425              long double x87_r4_6 = ((((((long double)((float)(((long double)arg2->center.z) - ((long double)((float)(x87_r7_4 * ((long double)arg3->z))))))) - ((long double)eax_3[2])) * ((((long double)var_14_1) * ((long double)this->plane.N.x)) - (((long double)var_18_1) * ((long double)this->plane.N.y)))) + x87_r2_5) + x87_r3_6);
00539427              long double temp1_1 = ((long double)0f);
00539427              (x87_r4_6 - temp1_1);
0053942f              eax_3 = ((((x87_r4_6 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_6, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r4_6 == temp1_1) ? 1 : 0) << 0xe) | 0x3000))));
00539433              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00539433              
00539438              if (!(p_1))
00539438              {
00539453                  float* eax_5 = arg4;
0053947f                  float var_8_1 = ((float)((((long double)var_18_1) * ((long double)this->plane.N.z)) - (((long double)var_10_1) * ((long double)this->plane.N.x))));
00539487                  long double x87_r7_26 = (((long double)var_14_1) * ((long double)this->plane.N.x));
0053948e                  long double x87_r6_28 = (((long double)var_18_1) * ((long double)this->plane.N.y));
00539493                  *(uint32_t*)eax_5 = ((float)((((long double)var_10_1) * ((long double)this->plane.N.y)) - (((long double)var_14_1) * ((long double)this->plane.N.z))));
0053949b                  eax_5[1] = var_8_1;
005394a6                  eax_5[2] = ((float)(x87_r7_26 - x87_r6_28));
005394a9                  eax_5[2];
005394ac                  eax_5[1];
005394c9                  long double x87_r7_30 = (((long double)1f) / ((long double)*(uint32_t*)eax_5));
005394d3                  *(uint32_t*)eax_5 = ((float)(x87_r7_30 * ((long double)*(uint32_t*)eax_5)));
005394da                  eax_5[1] = ((float)(x87_r7_30 * ((long double)eax_5[1])));
005394e0                  eax_5[2] = ((float)(x87_r7_30 * ((long double)eax_5[2])));
005394eb                  return 1;
00539438              }
00539438              
0053943a              edi += 1;
0053943d          } while (edi < num_pts);
00539399      }
00539399      
0053944c      return 0;
00539300  }

005393aa                                8d 9b 00 00 00 00                                                            ......
005394ee                                            90 90                                                                ..

005394f0  int32_t __thiscall CPolygon::pos_hits_sphere(class CPolygon const* this, class CSphere const* arg2, class AC1Legacy::Vector3 const* arg3, class AC1Legacy::Vector3* arg4, class CPolygon const** arg5)

005394f0  {
005394fa      int32_t result = CPolygon::polygon_hits_sphere_slow_but_sure(this, arg2, arg4);
005394fa      
00539503      if (result != 0)
00539509          *(uint32_t*)arg5 = this;
00539509      
00539522      long double x87_r7_3 = (((((long double)this->plane.N.z) * ((long double)arg3->z)) + (((long double)this->plane.N.y) * ((long double)arg3->y))) + (((long double)this->plane.N.x) * ((long double)arg3->x)));
00539524      long double temp1 = ((long double)0f);
00539524      (x87_r7_3 - temp1);
0053952a      class AC1Legacy::Vector3* eax_1;
0053952a      eax_1 = ((((x87_r7_3 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1) ? 1 : 0) << 0xe) | 0))));
0053952c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0053952c      
0053952f      if (p)
00539538          return 0;
00539538      
00539533      return result;
005394f0  }

0053953b                                                                                   90 90 90 90 90                             .....

00539540  int32_t __thiscall CPolygon::hits_sphere(class CPolygon const* this, class CSphere const* arg2)

00539540  {
00539555      void var_c;
00539555      return CPolygon::polygon_hits_sphere_slow_but_sure(this, arg2, &var_c);
00539540  }

00539558                                                                          90 90 90 90 90 90 90 90                          ........

00539560  int32_t __thiscall CPolygon::walkable_hits_sphere(class CPolygon const* this, class SPHEREPATH* arg2, class CSphere const* arg3, class AC1Legacy::Vector3 const* arg4)

00539560  {
0053957e      long double x87_r7_3 = (((((long double)this->plane.N.z) * ((long double)arg4->z)) + (((long double)this->plane.N.y) * ((long double)arg4->y))) + (((long double)arg4->x) * ((long double)this->plane.N.x)));
00539580      long double temp1 = ((long double)arg2->walkable_allowance);
00539580      (x87_r7_3 - temp1);
00539586      class SPHEREPATH* eax;
00539586      eax = ((((x87_r7_3 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1) ? 1 : 0) << 0xe) | 0))));
00539586      
0053958b      if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
00539592          return 0;
00539592      
005395a1      void var_c;
005395a1      int32_t result = CPolygon::polygon_hits_sphere_slow_but_sure(this, arg3, &var_c);
005395a1      
005395b5      if (result != CPolygon::polygon_hits_sphere(this, arg3, &var_c))
005395b5      {
005395bd          CPolygon::polygon_hits_sphere_slow_but_sure(this, arg3, &var_c);
005395c8          CPolygon::polygon_hits_sphere(this, arg3, &var_c);
005395b5      }
005395b5      
005395d4      return result;
00539560  }

005395d7                                                                       90 90 90 90 90 90 90 90 90                         .........

005395e0  int32_t __thiscall CPolygon::polygon_hits_ray(class CPolygon const* this, class Ray const* arg2, double* arg3)

005395e0  {
005395f0      if (this->sides_type == 0)
005395f0      {
0053960a          long double x87_r7_3 = (((((long double)arg2->dir.z) * ((long double)this->plane.N.z)) + (((long double)arg2->dir.y) * ((long double)this->plane.N.y))) + (((long double)arg2->dir.x) * ((long double)this->plane.N.x)));
0053960c          long double temp1_1 = ((long double)0f);
0053960c          (x87_r7_3 - temp1_1);
00539612          int32_t eax;
00539612          eax = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00539612          
00539617          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00539620              return 0;
005395f0      }
005395f0      
0053962d      int32_t eax_2 = Plane::compute_time_of_intersection(&this->plane, arg2, arg3);
0053962d      
00539634      if (eax_2 == 0)
0053963c          return eax_2;
0053963c      
0053963f      long double x87_r7_4 = ((long double)*(uint64_t*)arg3);
0053964d      float var_18 = ((float)(x87_r7_4 * ((long double)arg2->dir.x)));
00539667      long double x87_r5_6 = (((long double)((float)(x87_r7_4 * ((long double)arg2->dir.y)))) + ((long double)arg2->pt.y));
00539677      float var_10 = ((float)((x87_r7_4 * ((long double)arg2->dir.z)) + ((long double)arg2->pt.z)));
0053967b      var_18 = ((float)(((long double)var_18) + ((long double)arg2->pt.x)));
0053967f      float var_14_1 = ((float)x87_r5_6);
00539683      int32_t eax_4;
00539683      int80_t st0;
00539683      st0 = CPolygon::point_in_polygon(this, &var_18);
0053968e      return eax_4;
005395e0  }

00539691                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005396a0  void __fastcall CMaterial::CheckAlphaValues(class CMaterial* this)

005396a0  {
005396a0      long double x87_r7 = ((long double)this->d3d_material.Ambient.a);
005396a3      long double temp0 = ((long double)1f);
005396a3      (x87_r7 - temp0);
005396a9      int32_t eax;
005396a9      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
005396ab      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005396ab      
005396ae      if (p)
005396ae      {
005396b0          long double x87_r7_1 = ((long double)this->d3d_material.Diffuse.a);
005396b3          long double temp1_1 = ((long double)1f);
005396b3          (x87_r7_1 - temp1_1);
005396b9          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005396bb          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005396bb          
005396be          if (p_1)
005396be          {
005396c0              long double x87_r7_2 = ((long double)this->d3d_material.Specular.a);
005396c3              long double temp2_1 = ((long double)1f);
005396c3              (x87_r7_2 - temp2_1);
005396c9              eax = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005396cb              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005396cb              
005396ce              if (p_2)
005396ce              {
005396d0                  long double x87_r7_3 = ((long double)this->d3d_material.Emissive.a);
005396d3                  long double temp3_1 = ((long double)1f);
005396d3                  (x87_r7_3 - temp3_1);
005396d9                  eax = ((((x87_r7_3 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005396db                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005396db                  
005396de                  if (p_3)
005396de                  {
005396e8                      this->has_alpha = 0;
005396ef                      return;
005396de                  }
005396ce              }
005396be          }
005396ae      }
005396ae      
005396e0      this->has_alpha = 1;
005396a0  }


005396f0  void __thiscall CMaterial::SetTranslucencySimple(class CMaterial* this, float arg2)

005396f0  {
005396f6      long double x87_r7 = (((long double)1f) - ((long double)arg2));
005396fa      this->d3d_material.Ambient.a = ((float)x87_r7);
005396fd      this->d3d_material.Diffuse.a = ((float)x87_r7);
00539700      this->d3d_material.Specular.a = ((float)x87_r7);
00539703      this->d3d_material.Emissive.a = ((float)x87_r7);
00539706      CMaterial::CheckAlphaValues(this);
005396f0  }

0053970e                                            90 90                                                                ..

00539710  float __fastcall CMaterial::GetTranslucencySimple(class CMaterial* this)

00539710  {
00539719      return ((int32_t)(((long double)1f) - ((long double)this->d3d_material.Diffuse.a)));
00539710  }

0053971a                                                                                90 90 90 90 90 90                            ......

00539720  void __thiscall CMaterial::SetLuminositySimple(class CMaterial* this, float arg2)

00539720  {
00539726      this->d3d_material.Emissive.r = arg2;
00539729      this->d3d_material.Emissive.g = arg2;
0053972c      this->d3d_material.Emissive.b = arg2;
00539720  }

00539732                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00539740  float __fastcall CMaterial::GetLuminositySimple(class CMaterial* this)

00539740  {
00539743      return ((int32_t)((long double)this->d3d_material.Emissive.r));
00539740  }

00539744              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00539750  void __thiscall CMaterial::SetDiffuseSimple(class CMaterial* this, float arg2)

00539750  {
00539756      this->d3d_material.Diffuse.r = arg2;
00539759      this->d3d_material.Diffuse.g = arg2;
0053975c      this->d3d_material.Diffuse.b = arg2;
00539750  }

00539762        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00539770  void __fastcall CMaterial::CMaterial(class CMaterial* this)

00539770  {
00539780      this->m_cRef = 1;
00539787      this->vtable = 0x7c9870;
0053978d      this->has_alpha = 0;
00539794      __builtin_memset(&this->d3d_material, 0, 0x44);
00539774      this->d3d_material.Diffuse.r = 0x3f800000;
0053979e      __builtin_memcpy(&this->d3d_material.Diffuse.g, "\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f", 0x1c);
00539770  }

005397b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005397c0  void __thiscall CMaterial::CMaterial(class CMaterial* this, class CMaterial const* arg2)

005397c0  {
005397c6      this->vtable = 0x7c9870;
005397cc      this->m_cRef = 1;
005397d5      this->vtable = arg2->vtable;
005397c0  }

005397da                                                                                90 90 90 90 90 90                            ......

005397e0  class CSphere const* __fastcall BSPTREE::GetSphere(class BSPTREE const* this)

005397e0  {
005397e5      return &this->root_node->sphere;
005397e0  }

005397e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005397f0  uint32_t __thiscall BSPTREE::Pack(class BSPTREE* this, void** arg2, uint32_t arg3)

005397f0  {
005397f0      class BSPTREE* this_1 = this;
005397f4      class BSPNODE* root_node = this->root_node;
005397fe      this_1 = nullptr;
00539806      uint32_t result = BSPNODE::PackChild(root_node, &this_1, 0);
00539806      
00539814      if (arg3 < result)
00539829          return result;
00539829      
0053981f      return BSPNODE::PackChild(this->root_node, arg2, arg3);
005397f0  }

0053982c                                      90 90 90 90                                                              ....

00539830  int32_t __thiscall BSPTREE::UnPack(class BSPTREE* this, void** arg2, uint32_t arg3)

00539830  {
00539833      class BSPNODE* root_node = this->root_node;
00539833      
00539837      if (root_node != 0)
00539837      {
00539839          root_node->vtable->__vecDelDtor(1);
0053983f          this->root_node = 0;
00539837      }
00539837      
00539859      return BSPNODE::UnPackChild(this, arg2, arg3);
00539830  }

0053985c                                                                                      90 90 90 90                              ....

00539860  void __thiscall BSPTREE::build_draw_portals_only(class BSPTREE const* this, int32_t arg2)

00539860  {
00539860      class BSPNODE* root_node = this->root_node;
00539860      
00539864      if (root_node != 0)
00539864      {
00539866          union __inner2 = root_node->__inner2;
00539866          
0053986e          if (__inner2 != 0x4c454146)
0053986e          {
00539875              if (__inner2 == 0x504f5254)
00539888                  BSPPORTAL::portal_draw_portals_only(root_node, arg2);
00539875              else
0053987c                  BSPNODE::build_draw_portals_only(root_node, arg2);
0053986e          }
00539864      }
00539864      
0053988d      Render::m_pRenderer->vtable->polyListFinishInternal();
00539898      Render::PolyNext = &Render::PolyList;
00539860  }

005398a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005398b0  int32_t __thiscall BSPTREE::box_intersects_cell_bsp(class BSPTREE const* this, class BBox const* arg2)

005398b0  {
005398b2      /* tailcall */
005398b2      return BSPNODE::box_intersects_cell_bsp(this->root_node, arg2);
005398b0  }

005398b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005398c0  int32_t __thiscall BSPTREE::point_inside_cell_bsp(class BSPTREE const* this, class AC1Legacy::Vector3 const* arg2)

005398c0  {
005398c2      /* tailcall */
005398c2      return BSPNODE::point_inside_cell_bsp(this->root_node, arg2);
005398c0  }

005398c7                       90 90 90 90 90 90 90 90 90                                                         .........

005398d0  enum BoundingType __thiscall BSPTREE::sphere_intersects_cell_bsp(class BSPTREE const* this, class CSphere const* arg2)

005398d0  {
005398d2      /* tailcall */
005398d2      return BSPNODE::sphere_intersects_cell_bsp(this->root_node, arg2);
005398d0  }

005398d7                                                                       90 90 90 90 90 90 90 90 90                         .........

005398e0  void __thiscall SPHEREPATH::set_neg_poly_hit(class SPHEREPATH* this, int32_t arg2, class AC1Legacy::Vector3* arg3)

005398e0  {
005398e7      this->neg_step_up = arg2;
005398f1      this->neg_poly_hit = 1;
005398ff      this->neg_collision_normal.x = ((float)-(((long double)arg3->x)));
005398ff      this->neg_collision_normal.y = ((float)-(((long double)arg3->y)));
005398ff      this->neg_collision_normal.z = ((float)-(((long double)arg3->z)));
005398e0  }

00539935                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00539940  void __fastcall BSPTREE::~BSPTREE(class BSPTREE* this)

00539940  {
00539943      class BSPNODE* root_node = this->root_node;
00539943      
00539947      if (root_node != 0)
00539947      {
00539949          root_node->vtable->__vecDelDtor(1);
0053994f          this->root_node = 0;
00539947      }
00539940  }

00539957                                                                       90 90 90 90 90 90 90 90 90                         .........

00539960  enum TransitionState __thiscall BSPTREE::placement_insert(class BSPTREE const* this, class CTransition* arg2)

00539960  {
0053996a      class CSphere* localspace_sphere = arg2->sphere_path.localspace_sphere;
0053996d      class SPHEREPATH* esi_1 = &arg2->sphere_path;
00539976      float x_1 = localspace_sphere->center.x;
0053997a      float y_1 = localspace_sphere->center.y;
00539981      float z_1 = localspace_sphere->center.z;
00539988      long double x87_r7 = ((long double)localspace_sphere->radius);
0053998d      float var_14 = ((float)x87_r7);
00539994      arg2 = ((float)x87_r7);
00539999      float var_10;
00539999      
00539999      if (esi_1->num_sphere > 1)
00539999      {
005399a0          var_10 = *(int32_t*)((char*)localspace_sphere + 0x10);
005399a7          int32_t var_c_1 = *(int32_t*)((char*)localspace_sphere + 0x14);
005399ae          int32_t var_8_1 = *(int32_t*)((char*)localspace_sphere + 0x18);
005399b5          int32_t var_4_1 = *(int32_t*)((char*)localspace_sphere + 0x1c);
00539999      }
00539999      
005399c1      bool cond:1 = esi_1->bldg_check == 0;
005399c3      class CPolygon* var_48 = nullptr;
005399c7      int32_t edi = 1;
005399c7      
005399cc      if (!(cond:1))
005399cc      {
005399d8          int32_t ecx_3;
005399d8          ecx_3 = esi_1->hits_interior_cell == 0;
005399db          edi = ecx_3;
005399cc      }
005399cc      
005399dd      int32_t var_40 = 0;
00539a8c      bool cond:2_1;
00539a8c      
00539a8c      do
00539a8c      {
005399e5          class BSPNODE* root_node = this->root_node;
005399fb          int32_t var_44 = 0;
00539a07          int32_t var_60_2;
00539a07          int32_t var_5c_2;
00539a07          float* eax_7;
00539a07          class CPolygon* ecx_4;
00539a07          float* edx_3;
00539a07          long double x87_r7_1;
00539a07          
00539a07          if (root_node->vtable->sphere_intersects_solid_poly(&x_1, arg2, &var_44, &var_48, edi) == 0)
00539a07          {
00539a24              float x;
00539a24              float __return;
00539a24              
00539a24              if (esi_1->num_sphere <= 1)
00539a24              {
00539b0f                  if (var_40 == 0)
00539b1d                      return 1;
00539b1d                  
00539b20                  class CSphere* localspace_sphere_2 = esi_1->localspace_sphere;
00539b27                  long double x87_r7_6 = (((long double)z_1) - ((long double)localspace_sphere_2->center.z));
00539b2e                  long double x87_r6_3 = (((long double)y_1) - ((long double)localspace_sphere_2->center.y));
00539b35                  long double x87_r5_3 = (((long double)x_1) - ((long double)localspace_sphere_2->center.x));
00539b4a                  x = ((float)(((x87_r5_3 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[0])) + (x87_r6_3 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[3]))) + (x87_r7_6 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[6]))));
00539b52                  __return = x;
00539b6e                  float var_34_1 = ((float)(((x87_r5_3 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[1])) + (x87_r6_3 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[4]))) + (x87_r7_6 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[7]))));
00539b79                  float var_28 = var_34_1;
00539b82                  long double x87_r6_5 = ((x87_r5_3 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[2])) + (x87_r6_3 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[5])));
00539b86                  long double x87_r6_7 = (x87_r7_6 * ((long double)esi_1->localspace_pos.frame.m_fl2gv[8]));
00539b89                  esi_1->cell_array_valid = 0;
00539b91                  float var_30_1 = ((float)(x87_r6_5 + x87_r6_7));
00539ba3                  float var_24 = var_30_1;
00539ba9                  esi_1->check_pos.frame.m_fOrigin.x = ((float)(((long double)x) + ((long double)esi_1->check_pos.frame.m_fOrigin.x)));
00539bb9                  esi_1->check_pos.frame.m_fOrigin.y = ((float)(((long double)var_34_1) + ((long double)esi_1->check_pos.frame.m_fOrigin.y)));
00539bc9                  esi_1->check_pos.frame.m_fOrigin.z = ((float)(((long double)var_30_1) + ((long double)esi_1->check_pos.frame.m_fOrigin.z)));
00539bcf                  SPHEREPATH::cache_global_sphere(esi_1, &__return);
00539be0                  return 3;
00539a24              }
00539a24              
00539a48              if (this->root_node->vtable->sphere_intersects_solid_poly(&var_10, arg2, &var_44, &var_48, edi) == 0)
00539a48              {
00539aa5                  if (var_40 == 0)
00539b1d                      return 1;
00539b1d                  
00539aa7                  float* localspace_sphere_1 = esi_1->localspace_sphere;
00539aae                  long double x87_r7_4 = (((long double)z_1) - ((long double)localspace_sphere_1[2]));
00539aba                  long double x87_r6_1 = (((long double)y_1) - ((long double)localspace_sphere_1[1]));
00539acb                  x = ((float)(((long double)x_1) - ((long double)*(uint32_t*)localspace_sphere_1)));
00539acf                  float var_34 = ((float)x87_r6_1);
00539ad3                  float var_30 = ((float)x87_r7_4);
00539ad7                  class AC1Legacy::Vector3* eax_14 = Position::localtoglobalvec(&esi_1->localspace_pos, &__return, &x);
00539ade                  x = eax_14->x;
00539ae9                  float y = eax_14->y;
00539af3                  float z = eax_14->z;
00539af7                  SPHEREPATH::add_offset_to_check_pos(esi_1, &x);
00539b08                  return 3;
00539a48              }
00539a48              
00539a4a              ecx_4 = var_48;
00539a4a              
00539a50              if (ecx_4 != 0)
00539a50              {
00539a56                  var_5c_2 = edi;
00539a57                  var_60_2 = var_44;
00539a58                  edx_3 = &x_1;
00539a5c                  eax_7 = &var_10;
00539a5c                  goto label_539a63;
00539a50              }
00539a50              
00539a76              x87_r7_1 = ((long double)arg2);
00539a7c              arg2 = ((float)(x87_r7_1 + x87_r7_1));
00539a07          }
00539a07          else
00539a07          {
00539a09              ecx_4 = var_48;
00539a09              
00539a0f              if (ecx_4 == 0)
00539a0f              {
00539a76                  x87_r7_1 = ((long double)arg2);
00539a7c                  arg2 = ((float)(x87_r7_1 + x87_r7_1));
00539a0f              }
00539a0f              else
00539a0f              {
00539a15                  var_5c_2 = edi;
00539a16                  var_60_2 = var_44;
00539a17                  edx_3 = &var_10;
00539a1b                  eax_7 = &x_1;
00539a63              label_539a63:
00539a63                  CPolygon::adjust_to_placement_poly(ecx_4, eax_7, edx_3, arg2, var_60_2, var_5c_2);
00539a6c                  var_48 = nullptr;
00539a70                  arg2 = var_14;
00539a0f              }
00539a07          }
00539a85          cond:2_1 = (var_40 + 1) < 0x14;
00539a88          var_40 += 1;
00539a8c      } while (cond:2_1);
00539a9e      return 2;
00539960  }

00539be3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00539bf0  void __thiscall BSPTREE::adjust_to_plane(class BSPTREE const* this, class CSphere* arg2, class AC1Legacy::Vector3 arg3, class CPolygon const* arg4, class AC1Legacy::Vector3* arg5)

00539bf0  {
00539c06      int32_t var_48 = 0;
00539c0e      int32_t var_44 = 0x3ff00000;
00539c16      float var_38 = ((float)(((long double)arg2->center.x) - ((long double)arg3.x)));
00539c1a      int32_t var_50 = 0;
00539c25      int32_t var_4c = 0;
00539c30      int32_t i = 0;
00539c32      float var_34 = ((float)(((long double)arg2->center.y) - ((long double)arg3.y)));
00539c3c      float var_30 = ((float)(((long double)arg2->center.z) - ((long double)arg3.z)));
00539c3c      
00539c4d      while (true)
00539c4d      {
00539c4d          class AC1Legacy::Vector3* eax_1;
00539c4d          long double st0_1;
00539c4d          eax_1 = CPolygon::adjust_sphere_to_poly(arg4, arg2, &arg3, &var_38);
00539c52          long double temp1_1 = ((long double)1.0);
00539c52          (st0_1 - temp1_1);
00539c58          double var_40_1 = ((double)st0_1);
00539c58          bool c1_1 = /* bool c1_1 = unimplemented  {fst qword [esp+0x20], st0} */;
00539c5c          eax_1 = ((((st0_1 < temp1_1) ? 1 : 0) << 8) | ((((c1_1) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
00539c5e          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00539c5e          
00539c61          if (!(p_1))
00539c61              break;
00539c61          
00539ca8          arg2->center.x = ((float)(((long double)((float)(((long double)var_38) * st0_1))) + ((long double)arg3.x)));
00539cb6          arg2->center.y = ((float)(((long double)((float)(((long double)var_34) * st0_1))) + ((long double)arg3.y)));
00539cb9          arg2->center.z = ((float)((st0_1 * ((long double)var_30)) + ((long double)arg3.z)));
00539cb9          
00539cd3          if (this->root_node->vtable->sphere_intersects_poly(arg2, &var_38, &arg4, arg5) == 0)
00539cd3          {
00539d02              var_50 = var_40_1;
00539d06              int32_t var_4c_1 = *(uint32_t*)((char*)var_40_1)[4];
00539d0a              break;
00539cd3          }
00539cd3          
00539cdd          i += 1;
00539ce1          var_48 = var_40_1;
00539ce5          int32_t var_44_1 = *(uint32_t*)((char*)var_40_1)[4];
00539ce5          
00539ce9          if (i >= 0xf)
00539cf7              return;
00539c4d      }
00539c4d      
00539d11      if (i >= 0xf)
00539d1b          return;
00539d1b      
00539ddb      do
00539ddb      {
00539d24          int32_t* eax_8 = arg2;
00539d2a          long double x87_r7_11 = ((((long double)var_50) + ((long double)var_48)) * ((long double)0.5));
00539d30          double var_40_2 = ((double)x87_r7_11);
00539d57          long double x87_r5_6 = (((long double)((float)(((long double)var_34) * x87_r7_11))) + ((long double)arg3.y));
00539d5f          float var_c_2 = ((float)((x87_r7_11 * ((long double)var_30)) + ((long double)arg3.z)));
00539d73          *(uint32_t*)eax_8 = ((float)(((long double)((float)(((long double)var_38) * x87_r7_11))) + ((long double)arg3.x)));
00539d81          eax_8[1] = ((float)x87_r5_6);
00539d84          eax_8[2] = var_c_2;
00539d84          
00539d9e          if (this->root_node->vtable->sphere_intersects_poly(arg2, &var_38, &arg4, arg5) == 0)
00539d9e          {
00539dba              var_50 = var_40_2;
00539dbe              int32_t var_4c_2 = *(uint32_t*)((char*)var_40_2)[4];
00539d9e          }
00539d9e          else
00539d9e          {
00539da8              var_48 = var_40_2;
00539dac              int32_t var_44_2 = *(uint32_t*)((char*)var_40_2)[4];
00539d9e          }
00539d9e          
00539dc6          long double x87_r7_15 = (((long double)var_48) - ((long double)var_50));
00539dca          long double temp2_1 = ((long double)0.02);
00539dca          (x87_r7_15 - temp2_1);
00539dd0          int32_t eax_10;
00539dd0          eax_10 = ((((x87_r7_15 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_15, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_15 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00539dd2          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00539dd2          
00539dd5          if (!(p_2))
00539dd5              break;
00539dd5          
00539dd7          i += 1;
00539ddb      } while (i < 0xf);
00539ddb      
00539de1      long double x87_r7_16 = ((long double)var_50);
00539e11      float var_c_3 = ((float)((x87_r7_16 * ((long double)var_30)) + ((long double)arg3.z)));
00539e19      float var_24_3 = var_c_3;
00539e25      arg2->center.x = ((float)(((long double)((float)(((long double)var_38) * x87_r7_16))) + ((long double)arg3.x)));
00539e2f      arg2->center.y = ((float)(((long double)((float)(((long double)var_34) * x87_r7_16))) + ((long double)arg3.y)));
00539e32      arg2->center.z = var_c_3;
00539bf0  }

00539d1e                                                                                            8b ff                                ..
00539e42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00539e50  enum TransitionState __stdcall BSPTREE::slide_sphere(class BSPTREE const* this @ ecx, class SPHEREPATH* arg2, class COLLISIONINFO* arg3, class AC1Legacy::Vector3 const* arg4)

00539e50  {
00539e61      class CSphere* global_sphere = arg2->global_sphere;
00539e71      long double x87_r7_3 = (((((long double)arg2->localspace_pos.frame.m_fl2gv[6]) * ((long double)arg4->z)) + (((long double)arg2->localspace_pos.frame.m_fl2gv[0]) * ((long double)arg4->x))) + (((long double)arg2->localspace_pos.frame.m_fl2gv[3]) * ((long double)arg4->y)));
00539e73      float var_c = ((float)x87_r7_3);
00539e8a      long double x87_r7_7 = (((((long double)arg2->localspace_pos.frame.m_fl2gv[7]) * ((long double)arg4->z)) + (((long double)arg2->localspace_pos.frame.m_fl2gv[1]) * ((long double)arg4->x))) + (((long double)arg2->localspace_pos.frame.m_fl2gv[4]) * ((long double)arg4->y)));
00539e8c      float var_8 = ((float)x87_r7_7);
00539eac      long double x87_r7_11 = (((((long double)arg2->localspace_pos.frame.m_fl2gv[8]) * ((long double)arg4->z)) + (((long double)arg2->localspace_pos.frame.m_fl2gv[2]) * ((long double)arg4->x))) + (((long double)arg2->localspace_pos.frame.m_fl2gv[5]) * ((long double)arg4->y)));
00539eb3      float var_4 = ((float)x87_r7_11);
00539ec0      return CSphere::slide_sphere(global_sphere, arg2, arg3, &var_c, arg2->global_curr_center);
00539e50  }

00539ec3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00539ed0  enum TransitionState __thiscall BSPTREE::check_walkable(class BSPTREE const* this, class SPHEREPATH* arg2, class CSphere const* arg3, float arg4)

00539ed0  {
00539ed9      class BSPNODE* root_node = this->root_node;
00539edb      float x = arg3->center.x;
00539ee2      float y = arg3->center.y;
00539eed      float radius = arg3->radius;
00539f01      float z = arg3->center.z;
00539f0f      int32_t ecx;
00539f0f      ecx = root_node->vtable->hits_walkable(arg2, &x, &arg2->localspace_z) != 0;
00539f19      return (ecx + 1);
00539ed0  }

00539f1c                                                                                      90 90 90 90                              ....

00539f20  enum TransitionState __stdcall BSPTREE::step_sphere_up(class BSPTREE const* this @ ecx, class CTransition* arg2, class AC1Legacy::Vector3 const* arg3)

00539f20  {
00539f48      long double x87_r7_3 = (((((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[6]) * ((long double)arg3->z)) + (((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[0]) * ((long double)arg3->x))) + (((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[3]) * ((long double)arg3->y)));
00539f4a      float var_c = ((float)x87_r7_3);
00539f61      long double x87_r7_7 = (((((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[7]) * ((long double)arg3->z)) + (((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[1]) * ((long double)arg3->x))) + (((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[4]) * ((long double)arg3->y)));
00539f63      float var_8 = ((float)x87_r7_7);
00539f7f      long double x87_r7_11 = (((((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[8]) * ((long double)arg3->z)) + (((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[2]) * ((long double)arg3->x))) + (((long double)arg2->sphere_path.localspace_pos.frame.m_fl2gv[5]) * ((long double)arg3->y)));
00539f81      float var_4 = ((float)x87_r7_11);
00539f81      
00539f8c      if (CTransition::step_up(arg2, &var_c) == 0)
00539faf          return SPHEREPATH::step_up_slide(&arg2->sphere_path, arg2, &arg2->collision_info);
00539faf      
00539f98      return 1;
00539f20  }

00539fb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00539fc0  void __thiscall SPHEREPATH::set_walkable(class SPHEREPATH* this, class CSphere const* arg2, class CPolygon const* arg3, class AC1Legacy::Vector3 const* arg4, class Position const* arg5, float arg6)

00539fc0  {
00539fc9      this->walkable_check_pos.center.x = arg2->center.x;
00539fc9      this->walkable_check_pos.center.y = arg2->center.y;
00539fc9      this->walkable_check_pos.center.z = arg2->center.z;
00539fc9      this->walkable_check_pos.radius = arg2->radius;
00539feb      this->walkable = arg3;
00539ff3      this->walkable_up.x = arg4->x;
00539ff3      this->walkable_up.y = arg4->y;
00539ff3      this->walkable_up.z = arg4->z;
0053a018      this->walkable_pos.objcell_id = arg5->objcell_id;
0053a01e      Frame::operator=(&this->walkable_pos.frame, &arg5->frame);
0053a027      this->walkable_scale = arg6;
00539fc0  }

0053a031                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0053a040  void __fastcall BSPTREE::RemoveNonPortalNodes(class BSPTREE* this)

0053a040  {
0053a046      void* var_c = nullptr;
0053a04a      int32_t var_8 = 0;
0053a04e      int32_t var_4 = 0;
0053a05b      BSPNODE::DetachPortalsAndPurgeNodes(this->root_node, &var_c);
0053a067      BSPNODE::LinkPortalNodeChain(this->root_node, &var_c);
0053a067      
0053a07d      if ((var_8 & 0x80000000) == 0x80000000)
0053a084          operator delete[](var_c);
0053a040  }


0053a090  enum TransitionState __thiscall BSPTREE::collide_with_pt(class BSPTREE const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3 const* arg6, class CPolygon const* arg7, class AC1Legacy::Vector3* arg8, float arg9)

0053a090  {
0053a0a1      float x;
0053a0a1      
0053a0a1      if ((arg2->state & 0x40) != 0)
0053a0a1      {
0053a11c          float y_1 = arg5->center.y;
0053a123          float x_1 = arg5->center.x;
0053a127          float z_2 = arg5->center.z;
0053a140          float radius = arg5->radius;
0053a14f          float y = arg6->y;
0053a155          float z = arg6->z;
0053a15d          int32_t eax_3;
0053a15d          int80_t st0_1;
0053a15d          st0_1 = BSPTREE::adjust_to_plane(this, &x_1, arg6->x, arg7, arg8);
0053a15d          
0053a164          if (eax_3 != 0)
0053a164          {
0053a182              void __return;
0053a182              COLLISIONINFO::set_collision_normal(arg4, Position::localtoglobalvec(&arg3->localspace_pos, &__return, &arg7->plane));
0053a196              x = ((float)(((long double)x_1) - ((long double)arg5->center.x)));
0053a1a4              float var_24_2 = ((float)(((long double)y_1) - ((long double)arg5->center.y)));
0053a1af              float var_20_2 = ((float)(((long double)z_2) - ((long double)arg5->center.z)));
0053a1b3              class AC1Legacy::Vector3* eax_5 = Position::localtoglobalvec(&arg3->localspace_pos, &__return, &x);
0053a1ba              x = eax_5->x;
0053a1c2              float y_2 = eax_5->y;
0053a1cd              float z_1 = eax_5->z;
0053a1d0              x = ((float)(((long double)x) * ((long double)arg9)));
0053a1e7              float var_24_4 = ((float)(((long double)y_2) * ((long double)arg9)));
0053a1f3              float var_20_4 = ((float)(((long double)z_1) * ((long double)arg9)));
0053a1f7              SPHEREPATH::add_offset_to_check_pos(arg3, &x);
0053a208              return 3;
0053a164          }
0053a0a1      }
0053a0a1      else
0053a0a1      {
0053a0bf          long double x87_r7_3 = (((((long double)arg3->localspace_pos.frame.m_fl2gv[0]) * ((long double)arg7->plane.N.x)) + (((long double)arg3->localspace_pos.frame.m_fl2gv[3]) * ((long double)arg7->plane.N.y))) + (((long double)arg3->localspace_pos.frame.m_fl2gv[6]) * ((long double)arg7->plane.N.z)));
0053a0c1          x = ((float)x87_r7_3);
0053a0d9          long double x87_r7_7 = (((((long double)arg3->localspace_pos.frame.m_fl2gv[1]) * ((long double)arg7->plane.N.x)) + (((long double)arg3->localspace_pos.frame.m_fl2gv[4]) * ((long double)arg7->plane.N.y))) + (((long double)arg3->localspace_pos.frame.m_fl2gv[7]) * ((long double)arg7->plane.N.z)));
0053a0db          float var_24_1 = ((float)x87_r7_7);
0053a0fc          long double x87_r7_11 = (((((long double)arg3->localspace_pos.frame.m_fl2gv[2]) * ((long double)arg7->plane.N.x)) + (((long double)arg3->localspace_pos.frame.m_fl2gv[5]) * ((long double)arg7->plane.N.y))) + (((long double)arg3->localspace_pos.frame.m_fl2gv[8]) * ((long double)arg7->plane.N.z)));
0053a0fe          float var_20_1 = ((float)x87_r7_11);
0053a102          COLLISIONINFO::set_collision_normal(arg4, &x);
0053a0a1      }
0053a113      return 2;
0053a090  }

0053a20b                                   90 90 90 90 90                                                             .....

0053a210  enum TransitionState __thiscall BSPTREE::step_sphere_down(class BSPTREE const* this, class SPHEREPATH* arg2, class COLLISIONINFO* arg3, class CSphere const* arg4, float arg5)

0053a210  {
0053a216      class SPHEREPATH* esi = arg2;
0053a22c      class CSphere* ebx = arg4;
0053a232      long double x87_r7_2 = -((((long double)esi->step_down_amt) * ((long double)esi->walk_interp)));
0053a234      float y = ebx->center.y;
0053a23c      class BSPNODE* root_node = this->root_node;
0053a23e      float x = ebx->center.x;
0053a242      float z = ebx->center.z;
0053a245      float __return = ((float)(x87_r7_2 * ((long double)esi->localspace_z.x)));
0053a25c      float radius = ebx->radius;
0053a260      float var_28 = ((float)(x87_r7_2 * ((long double)esi->localspace_z.y)));
0053a264      arg2 = nullptr;
0053a271      long double x87_r6_5 = (((long double)1f) / ((long double)arg5));
0053a275      arg4 = ((float)x87_r6_5);
0053a279      long double x87_r6_6 = (x87_r6_5 * ((long double)__return));
0053a281      long double x87_r5_1 = (((long double)var_28) * ((long double)arg4));
0053a287      long double x87_r5_3 = ((x87_r7_2 * ((long double)esi->localspace_z.z)) * ((long double)arg4));
0053a28b      arg4 = nullptr;
0053a297      float var_14 = ((float)x87_r5_3);
0053a29f      float var_1c = ((float)x87_r6_6);
0053a2a5      float var_18 = ((float)x87_r5_1);
0053a2a9      root_node->vtable->find_walkable(esi, &x, &arg4, &var_1c, &esi->localspace_z, &arg2);
0053a2a9      
0053a2c2      if (arg2 == 0)
0053a437          return 1;
0053a437      
0053a2cf      long double x87_r7_6 = (((long double)x) - ((long double)ebx->center.x));
0053a2d5      long double x87_r6_8 = (((long double)y) - ((long double)ebx->center.y));
0053a2dc      long double x87_r5_5 = (((long double)z) - ((long double)ebx->center.z));
0053a2f2      __return = ((float)(((x87_r5_5 * ((long double)esi->localspace_pos.frame.m_fl2gv[6])) + (x87_r6_8 * ((long double)esi->localspace_pos.frame.m_fl2gv[3]))) + (x87_r7_6 * ((long double)esi->localspace_pos.frame.m_fl2gv[0]))));
0053a2fa      float __return_1 = __return;
0053a318      float var_28_1 = ((float)(((x87_r5_5 * ((long double)esi->localspace_pos.frame.m_fl2gv[7])) + (x87_r6_8 * ((long double)esi->localspace_pos.frame.m_fl2gv[4]))) + (x87_r7_6 * ((long double)esi->localspace_pos.frame.m_fl2gv[1]))));
0053a32c      long double x87_r6_10 = ((x87_r5_5 * ((long double)esi->localspace_pos.frame.m_fl2gv[8])) + (x87_r6_8 * ((long double)esi->localspace_pos.frame.m_fl2gv[5])));
0053a330      long double x87_r6_12 = (x87_r7_6 * ((long double)esi->localspace_pos.frame.m_fl2gv[2]));
0053a333      esi->cell_array_valid = 0;
0053a33f      float var_24_1 = ((float)(x87_r6_10 + x87_r6_12));
0053a353      __return_1 = ((float)(((long double)__return) * ((long double)arg5)));
0053a379      esi->check_pos.frame.m_fOrigin.x = ((float)(((long double)__return_1) + ((long double)esi->check_pos.frame.m_fOrigin.x)));
0053a389      esi->check_pos.frame.m_fOrigin.y = ((float)(((long double)((float)(((long double)var_28_1) * ((long double)arg5)))) + ((long double)esi->check_pos.frame.m_fOrigin.y)));
0053a399      esi->check_pos.frame.m_fOrigin.z = ((float)(((long double)((float)(((long double)var_24_1) * ((long double)arg5)))) + ((long double)esi->check_pos.frame.m_fOrigin.z)));
0053a39f      SPHEREPATH::cache_global_sphere(esi, &__return_1);
0053a3b9      Plane::localtoglobal(&__return, &esi->check_pos, &esi->localspace_pos, &arg4[2]);
0053a3c2      float var_20;
0053a3c2      long double x87_r7_22 = (((long double)var_20) * ((long double)arg5));
0053a3cd      arg3->contact_plane_valid = 1;
0053a3d4      float var_20_1 = ((float)x87_r7_22);
0053a3dc      arg3->contact_plane.d = ((float)x87_r7_22);
0053a3df      arg3->contact_plane.N.x = __return;
0053a3df      arg3->contact_plane.N.y = var_28_1;
0053a3df      arg3->contact_plane.N.z = var_24_1;
0053a3f9      arg3->contact_plane_is_water = 0;
0053a407      arg3->contact_plane_cell_id = esi->check_pos.objcell_id;
0053a417      SPHEREPATH::set_walkable(esi, &x, arg4, &esi->localspace_z, &esi->localspace_pos, arg5);
0053a428      return 3;
0053a210  }

0053a43a                                                                                90 90 90 90 90 90                            ......

0053a440  enum TransitionState __thiscall BSPTREE::find_collisions(class BSPTREE const* this, class CTransition* arg2, float arg3)

0053a440  {
0053a443      class CTransition* eax = arg2;
0053a449      class AC1Legacy::Vector3* localspace_curr_center = eax->sphere_path.localspace_curr_center;
0053a450      class CPolygon* edi;
0053a450      class CPolygon* var_6c = edi;
0053a451      class CSphere* localspace_sphere = eax->sphere_path.localspace_sphere;
0053a459      long double x87_r7_1 = (((long double)localspace_sphere->center.z) - ((long double)localspace_curr_center->z));
0053a468      long double x87_r6_1 = (((long double)localspace_sphere->center.y) - ((long double)localspace_curr_center->y));
0053a477      long double x87_r5_1 = (((long double)localspace_sphere->center.x) - ((long double)localspace_curr_center->x));
0053a47a      void* var_5c = nullptr;
0053a47e      float var_44 = ((float)x87_r5_1);
0053a482      float var_40 = ((float)x87_r6_1);
0053a486      float __return_2 = ((float)x87_r7_1);
0053a496      int32_t* esp;
0053a496      
0053a496      if ((eax->sphere_path.insert_type == PLACEMENT_INSERT || eax->sphere_path.obstruction_ethereal != 0))
0053a496      {
0053a81d          int32_t ebp_4 = 1;
0053a81d          
0053a822          if (eax->sphere_path.bldg_check != 0)
0053a822          {
0053a82e              int32_t edx_7;
0053a82e              edx_7 = eax->sphere_path.hits_interior_cell == 0;
0053a831              ebp_4 = edx_7;
0053a822          }
0053a822          
0053a839          esp = &var_6c;
0053a839          
0053a83e          if (this->root_node->vtable->sphere_intersects_solid(localspace_sphere, ebp_4) != 0)
0053a84c              return 2;
0053a84c          
0053a852          if (eax->sphere_path.num_sphere > 1)
0053a852          {
0053a862              esp = &var_6c;
0053a862              
0053a867              if (this->root_node->vtable->sphere_intersects_solid(&eax->sphere_path.localspace_sphere[1], ebp_4) != 0)
0053a84c                  return 2;
0053a852          }
0053a496      }
0053a496      else
0053a496      {
0053a4a2          if (eax->sphere_path.check_walkable != 0)
0053a4b9              return BSPTREE::check_walkable(this, &eax->sphere_path, localspace_sphere, arg3);
0053a4b9          
0053a4c2          class SPHEREPATH* __return;
0053a4c2          
0053a4c2          if (eax->sphere_path.step_down != 0)
0053a4c2          {
0053a4c4              float ecx_1 = arg3;
0053a4cb              __return = &eax->sphere_path;
0053a4da              return BSPTREE::step_sphere_down(this, __return, &eax->collision_info, localspace_sphere, ecx_1);
0053a4c2          }
0053a4c2          
0053a4e3          int32_t var_54;
0053a4e3          float z_2;
0053a4e3          void __return_3;
0053a4e3          
0053a4e3          if (eax->sphere_path.collide == 0)
0053a4e3          {
0053a623              char state = ((int8_t)eax->object_info.state);
0053a628              class BSPNODE* root_node = this->root_node;
0053a62a              void var_38;
0053a62a              
0053a62a              if ((state & 1) == 0)
0053a62a              {
0053a720                  void* var_70_16 = &var_38;
0053a725                  void** var_74_14 = &var_5c;
0053a72a                  float* var_78_9 = &var_44;
0053a72d                  struct BSPNODE::VTable* vtable = root_node->vtable;
0053a72f                  __return = localspace_sphere;
0053a72f                  esp = &__return;
0053a730                  class COLLISIONINFO* esi;
0053a730                  
0053a730                  if ((state & 8) != 0)
0053a730                  {
0053a7e2                      bool cond:4_1 = vtable->sphere_intersects_poly() != 0;
0053a7e4                      class CPolygon* eax_37 = var_6c;
0053a7ec                      class OBJECTINFO* var_c;
0053a7ec                      float var_8;
0053a7ec                      
0053a7ec                      if ((cond:4_1 || eax_37 != 0))
0053a814                          return BSPTREE::collide_with_pt(this, var_c, &eax->sphere_path, esi, localspace_sphere, localspace_curr_center, eax_37, &z_2, var_8);
0053a730                  }
0053a730                  else
0053a730                  {
0053a739                      bool cond:5_1 = vtable->sphere_intersects_poly() != 0;
0053a73b                      class CPolygon* eax_26 = var_6c;
0053a73b                      
0053a743                      if ((cond:5_1 || eax_26 != 0))
0053a743                      {
0053a7b3                          int32_t __saved_ebx;
0053a7b3                          Position::localtoglobalvec(&eax->sphere_path.localspace_pos, &__saved_ebx, &eax_26->plane.N.x);
0053a7bf                          SPHEREPATH::set_collide(&eax->sphere_path, &__saved_ebx);
0053a44d                          eax->sphere_path.walkable_allowance = 0.0871556997f;
0053a7dc                          return 3;
0053a743                      }
0053a743                      
0053a748                      if (eax->sphere_path.num_sphere > 1)
0053a748                      {
0053a76a                          esp = &__return;
0053a76d                          bool cond:7_1 = this->root_node->vtable->sphere_intersects_poly(&eax->sphere_path.localspace_sphere[1], &var_54, &var_6c, &z_2) != 0;
0053a76f                          class CPolygon* eax_30 = var_6c;
0053a76f                          
0053a777                          if ((cond:7_1 || eax_30 != 0))
0053a777                          {
0053a793                              COLLISIONINFO::set_collision_normal(esi, Position::localtoglobalvec(&eax->sphere_path.localspace_pos, &__return_2, &eax_30->plane.N));
0053a7a4                              return 2;
0053a777                          }
0053a748                      }
0053a730                  }
0053a62a              }
0053a62a              else
0053a62a              {
0053a630                  struct BSPNODE::VTable* vtable_1 = root_node->vtable;
0053a636                  void* var_70_8 = &var_38;
0053a63b                  int32_t* var_74_6 = &var_5c;
0053a640                  float* var_78_6 = &var_44;
0053a641                  __return = localspace_sphere;
0053a642                  float eax_10 = vtable_1->sphere_intersects_poly(__return, var_78_6, var_74_6, var_70_8);
0053a642                  esp = &var_6c;
0053a642                  
0053a647                  if (eax_10 != 0)
0053a719                      return BSPTREE::step_sphere_up(this, arg2, ((char*)var_5c + 0x20));
0053a719                  
0053a64d                  arg3 = eax_10;
0053a64d                  
0053a654                  if (eax->sphere_path.num_sphere > 1)
0053a654                  {
0053a65f                      struct BSPNODE::VTable* vtable_2 = this->root_node->vtable;
0053a665                      void* var_70_9 = &var_38;
0053a66a                      float* var_74_7 = &arg3;
0053a672                      float* var_78_7 = &var_44;
0053a673                      __return = &eax->sphere_path.localspace_sphere[1];
0053a674                      esp = &var_6c;
0053a677                      bool cond:6_1 = vtable_2->sphere_intersects_poly(__return, var_78_7, var_74_7, var_70_9) == 0;
0053a679                      float eax_14 = arg3;
0053a679                      
0053a67d                      if (!(cond:6_1))
0053a697                          return BSPTREE::slide_sphere(this, &eax->sphere_path, &eax->collision_info, (eax_14 + 0x20));
0053a697                      
0053a69c                      if (eax_14 != 0)
0053a69c                      {
0053a6b4                          SPHEREPATH::set_neg_poly_hit(&eax->sphere_path, 0, Position::localtoglobalvec(&eax->sphere_path.localspace_pos, &__return_3, (eax_14 + 0x20)));
0053a6c5                          return 1;
0053a69c                      }
0053a69c                      
0053a6c8                      void* eax_20 = var_5c;
0053a6c8                      
0053a6ce                      if (eax_20 != 0)
0053a6ce                      {
0053a6ea                          SPHEREPATH::set_neg_poly_hit(&eax->sphere_path, 1, Position::localtoglobalvec(&eax->sphere_path.localspace_pos, &__return_3, ((char*)eax_20 + 0x20)));
0053a6fb                          return 1;
0053a6ce                      }
0053a654                  }
0053a62a              }
0053a4e3          }
0053a4e3          else
0053a4e3          {
0053a4e9              float y = localspace_sphere->center.y;
0053a4ec              float x_1 = localspace_sphere->center.x;
0053a4ee              class BSPNODE* root_node_1 = this->root_node;
0053a4f7              float radius = localspace_sphere->radius;
0053a4fb              arg2 = nullptr;
0053a4ff              var_54 = 0;
0053a507              int32_t* var_70_2 = &var_54;
0053a513              float* var_78_3 = &var_44;
0053a518              float x_2 = x_1;
0053a51c              float z_1 = localspace_sphere->center.z;
0053a51f              __return = &arg2;
0053a529              root_node_1->vtable->find_walkable(&eax->sphere_path, &x_2, __return, var_78_3, &eax->sphere_path.localspace_z, var_70_2);
0053a52e              esp = &var_6c;
0053a52e              
0053a537              if (var_54 != 0)
0053a537              {
0053a547                  float x;
0053a547                  float* var_70_3 = &x;
0053a54f                  x = ((float)(((long double)x_2) - ((long double)localspace_sphere->center.x)));
0053a553                  class AC1Legacy::Vector3* __return_1 = &__return_3;
0053a55d                  float var_4c = ((float)(((long double)y) - ((long double)localspace_sphere->center.y)));
0053a568                  z_2 = ((float)(((long double)z_1) - ((long double)localspace_sphere->center.z)));
0053a56c                  class AC1Legacy::Vector3* eax_6 = Position::localtoglobalvec(&eax->sphere_path.localspace_pos, __return_1, var_70_3);
0053a573                  x = eax_6->x;
0053a57b                  float y_1 = eax_6->y;
0053a586                  float z = eax_6->z;
0053a589                  x = ((float)(((long double)x) * ((long double)arg3)));
0053a58d                  z_2 = z;
0053a59d                  float* var_70_4 = &x;
0053a5a0                  float var_4c_2 = ((float)(((long double)y_1) * ((long double)arg3)));
0053a5ac                  z_2 = ((float)(((long double)z_2) * ((long double)arg3)));
0053a5b0                  SPHEREPATH::add_offset_to_check_pos(&eax->sphere_path, var_70_4);
0053a5bd                  class Position* var_74_3 = &eax->sphere_path.localspace_pos;
0053a5c4                  class Position* var_78_4 = &eax->sphere_path.check_pos;
0053a5c9                  int32_t var_10;
0053a5c9                  __return = &var_10;
0053a5ca                  Plane::localtoglobal(__return, var_78_4, var_74_3, &arg2->sphere_path);
0053a5e7                  float var_4;
0053a5e7                  float var_4_1 = ((float)(((long double)var_4) * ((long double)arg3)));
0053a5ee                  COLLISIONINFO::set_contact_plane(&eax->collision_info, &var_10, 0);
0053a5f3                  float ecx_8 = arg3;
0053a46b                  eax->collision_info.contact_plane_cell_id = eax->sphere_path.check_pos.objcell_id;
0053a607                  __return = arg2;
0053a60f                  SPHEREPATH::set_walkable(&eax->sphere_path, &x_2, __return, &eax->sphere_path.localspace_z, &eax->sphere_path.localspace_pos, ecx_8);
0053a620                  return 3;
0053a537              }
0053a4e3          }
0053a496      }
0053a496      
0053a869      *(uint32_t*)esp;
0053a869      esp[1];
0053a869      esp[2];
0053a869      esp[3];
0053a875      return 1;
0053a440  }

0053a878                                                                          90 90 90 90 90 90 90 90                          ........

0053a880  int32_t __thiscall CCylSphere::collides_with_sphere(class CCylSphere const* this, class CSphere const* arg2, class AC1Legacy::Vector3 const* arg3, float const arg4)

0053a880  {
0053a884      long double x87_r7 = ((long double)arg3->y);
0053a887      long double x87_r6 = ((long double)arg3->x);
0053a891      long double x87_r5_2 = ((x87_r6 * x87_r6) + (x87_r7 * x87_r7));
0053a897      long double x87_r4_3 = (((long double)arg4) * ((long double)arg4));
0053a89b      (x87_r4_3 - x87_r5_2);
0053a89b      
0053a8a6      if ((*(uint8_t*)((char*)((((x87_r4_3 < x87_r5_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_3, x87_r5_2))) ? 1 : 0) << 0xa) | ((((x87_r4_3 == x87_r5_2) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 1) == 0)
0053a8a6      {
0053a8af          long double x87_r7_3 = (((long double)this->height) * ((long double)0.5));
0053a8ba          long double x87_r6_3 = fabsl((x87_r7_3 - ((long double)arg3->z)));
0053a8c5          long double x87_r5_5 = ((((long double)arg2->radius) - ((long double)0.000199999995f)) + x87_r7_3);
0053a8c7          (x87_r5_5 - x87_r6_3);
0053a8c9          class CSphere* eax_1;
0053a8c9          eax_1 = ((((x87_r5_5 < x87_r6_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_5, x87_r6_3))) ? 1 : 0) << 0xa) | ((((x87_r5_5 == x87_r6_3) ? 1 : 0) << 0xe) | 0x3800))));
0053a8c9          
0053a8d0          if ((*(uint8_t*)((char*)eax_1)[1] & 1) == 0)
0053a8d7              return 1;
0053a8a6      }
0053a8a6      
0053a8dc      return 0;
0053a880  }

0053a8df                                                                                               90                                 .

0053a8e0  void __fastcall CCylSphere::CCylSphere(class CCylSphere* this)

0053a8e0  {
0053a8e4      __builtin_memset(this, 0, 0x14);
0053a8e0  }

0053a8f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0053a900  uint32_t __thiscall CCylSphere::Pack(class CCylSphere* this, void** arg2, uint32_t arg3)

0053a900  {
0053a907      if (arg3 >= 0x14)
0053a907      {
0053a910          if (arg3 >= 0xc)
0053a910          {
0053a917              **(uint32_t**)arg2 = this->low_pt.x;
0053a91b              void* edx_3 = (*(uint32_t*)arg2 + 4);
0053a91e              *(uint32_t*)arg2 = edx_3;
0053a923              *(uint32_t*)edx_3 = ((float)((long double)this->low_pt.y));
0053a927              void* esi_3 = (*(uint32_t*)arg2 + 4);
0053a92a              *(uint32_t*)arg2 = esi_3;
0053a931              *(uint32_t*)esi_3 = ((float)((long double)this->low_pt.z));
0053a933              *(uint32_t*)arg2 += 4;
0053a910          }
0053a910          
0053a93c          **(uint32_t**)arg2 = ((float)((long double)this->radius));
0053a940          void* edx_7 = (*(uint32_t*)arg2 + 4);
0053a943          *(uint32_t*)arg2 = edx_7;
0053a948          *(uint32_t*)edx_7 = ((float)((long double)this->height));
0053a94a          *(uint32_t*)arg2 += 4;
0053a907      }
0053a907      
0053a952      return 0x14;
0053a900  }

0053a955                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0053a960  int32_t __thiscall CCylSphere::UnPack(class CCylSphere* this, void** arg2, uint32_t arg3)

0053a960  {
0053a969      if (arg3 >= 0xc)
0053a969      {
0053a96f          this->low_pt.x = **(uint32_t**)arg2;
0053a973          void* edx_4 = (*(uint32_t*)arg2 + 4);
0053a976          *(uint32_t*)arg2 = edx_4;
0053a97a          this->low_pt.y = *(uint32_t*)edx_4;
0053a97f          void* edx_7 = (*(uint32_t*)arg2 + 4);
0053a982          *(uint32_t*)arg2 = edx_7;
0053a986          this->low_pt.z = *(uint32_t*)edx_7;
0053a989          *(uint32_t*)arg2 += 4;
0053a969      }
0053a969      
0053a990      this->radius = **(uint32_t**)arg2;
0053a995      void* edx_12 = (*(uint32_t*)arg2 + 4);
0053a998      *(uint32_t*)arg2 = edx_12;
0053a99c      this->height = *(uint32_t*)edx_12;
0053a99f      *(uint32_t*)arg2 += 4;
0053a9a7      return 1;
0053a960  }

0053a9aa                                90 90 90 90 90 90                                                            ......

0053a9b0  void __thiscall CCylSphere::step_sphere_down(class CCylSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3 const* arg6, float arg7)

0053a9b0  {
0053a9d1      double var_34;
0053a9d1      
0053a9d1      if (CCylSphere::collides_with_sphere(this, arg5, arg6, arg7) == 0)
0053a9d1      {
0053a9d6          if (arg3->num_sphere <= 1)
0053aa17              return;
0053aa17          
0053a9d8          class CSphere* global_sphere = arg3->global_sphere;
0053a9e9          var_34 = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x10)) - ((long double)this->low_pt.x)));
0053a9f4          *(uint32_t*)((char*)var_34)[4] = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x14)) - ((long double)this->low_pt.y)));
0053a9fe          float var_2c_1 = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x18)) - ((long double)this->low_pt.z)));
0053a9fe          
0053aa09          if (CCylSphere::collides_with_sphere(this, &global_sphere[1], &var_34, arg7) == 0)
0053aa17              return;
0053a9d1      }
0053a9d1      
0053aa28      long double x87_r6_1 = fabsl((((long double)arg3->step_down_amt) * ((long double)arg3->walk_interp)));
0053aa2a      long double x87_r5 = ((long double)0.000199999995f);
0053aa30      (x87_r5 - x87_r6_1);
0053aa32      int32_t eax;
0053aa32      eax = ((((x87_r5 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r5 == x87_r6_1) ? 1 : 0) << 0xe) | 0x3800))));
0053aa32      
0053aa37      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
0053aa47          return;
0053aa47      
0053aa50      long double x87_r6_4 = ((((long double)this->height) + ((long double)arg5->radius)) - ((long double)arg6->z));
0053aa53      arg7 = ((float)x87_r6_4);
0053aa5f      long double x87_r7_11 = ((((long double)1.0) - (x87_r6_4 / x87_r6_4)) * ((long double)arg3->walk_interp));
0053aa65      var_34 = ((double)x87_r7_11);
0053aa69      long double x87_r6_5 = ((long double)arg3->walk_interp);
0053aa71      (x87_r7_11 - x87_r6_5);
0053aa73      eax = ((((x87_r7_11 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3800))));
0053aa73      
0053aa78      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
0053aa78      {
0053aa7e          long double temp1_1 = ((long double)-0.10000000000000001);
0053aa7e          (x87_r7_11 - temp1_1);
0053aa84          eax = ((((x87_r7_11 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0053aa86          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053aa86          
0053aa89          if (p_1)
0053aa89          {
0053aa95              long double x87_r7_13 = (((long double)arg7) - ((long double)arg5->radius));
0053aa98              float y = arg5->center.y;
0053aa9f              float x = arg5->center.x;
0053aaab              float y_1 = y;
0053aab0              float var_20 = ((float)(x87_r7_13 + ((long double)arg5->center.z)));
0053aab8              int32_t var_1c = 0;
0053aac0              int32_t var_18 = 0;
0053aac8              int32_t var_14 = 0x3f800000;
0053aad0              void var_10;
0053aad0              Plane::Plane(&var_10, &var_1c, &x);
0053aae2              COLLISIONINFO::set_contact_plane(arg4, &var_10, 1);
0053aae7              long double x87_r7_15 = ((long double)var_34);
0053aaf5              arg4->contact_plane_cell_id = arg3->check_pos.objcell_id;
0053aaf8              arg3->walk_interp = ((float)x87_r7_15);
0053aafe              float radius = arg5->radius;
0053ab09              var_1c = 0;
0053ab11              int32_t var_18_1 = 0;
0053ab19              float var_14_1 = arg7;
0053ab1d              SPHEREPATH::add_offset_to_check_pos(arg3, &var_1c, radius);
0053aa89          }
0053aa78      }
0053a9b0  }

0053ab42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0053ab50  int32_t __thiscall CCylSphere::normal_of_collision(class CCylSphere const* this, class SPHEREPATH* arg2, class CSphere const* arg3, class AC1Legacy::Vector3 const* arg4, float arg5, int32_t arg6, class AC1Legacy::Vector3* arg7)

0053ab50  {
0053ab5b      class AC1Legacy::Vector3* global_curr_center = arg2->global_curr_center;
0053ab5e      int32_t eax_1 = (arg6 * 3);
0053ab64      void* eax_2 = ((char*)global_curr_center + (eax_1 << 2));
0053ab67      long double x87_r7_1 = (((long double)*(uint32_t*)((char*)global_curr_center + (eax_1 << 2))) - ((long double)this->low_pt.x));
0053ab6e      long double x87_r5_1 = (((long double)*(uint32_t*)((char*)eax_2 + 4)) - ((long double)this->low_pt.y));
0053ab78      long double x87_r4_1 = (((long double)*(uint32_t*)((char*)eax_2 + 8)) - ((long double)this->low_pt.z));
0053ab7f      float var_4 = ((float)x87_r4_1);
0053ab8b      long double x87_r4_4 = ((x87_r5_1 * x87_r5_1) + (x87_r7_1 * x87_r7_1));
0053ab91      long double x87_r3_3 = (((long double)arg5) * ((long double)arg5));
0053ab95      (x87_r3_3 - x87_r4_4);
0053ab97      eax_2 = ((((x87_r3_3 < x87_r4_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_3, x87_r4_4))) ? 1 : 0) << 0xa) | ((((x87_r3_3 == x87_r4_4) ? 1 : 0) << 0xe) | 0x2800))));
0053ab97      
0053aba0      if ((*(uint8_t*)((char*)eax_2)[1] & 1) != 0)
0053aba0      {
0053ac39          float* edx_4 = arg7;
0053ac3b          *(uint32_t*)edx_4 = ((float)x87_r5_1);
0053ac41          edx_4[1] = ((float)x87_r5_1);
0053ac48          edx_4[2] = ((float)x87_r4_1);
0053ac4b          arg7->z = 0f;
0053ac55          long double x87_r7_5 = (((long double)this->height) * ((long double)0.5));
0053ac66          long double x87_r6_6 = fabsl((x87_r7_5 - ((long double)var_4)));
0053ac71          long double x87_r5_4 = ((((long double)arg3->radius) - ((long double)0.000199999995f)) + x87_r7_5);
0053ac73          (x87_r5_4 - x87_r6_6);
0053ac75          class CSphere* eax_10;
0053ac75          eax_10 = ((((x87_r5_4 < x87_r6_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_4, x87_r6_6))) ? 1 : 0) << 0xa) | ((((x87_r5_4 == x87_r6_6) ? 1 : 0) << 0xe) | 0x3800))));
0053ac75          
0053ac7c          if ((*(uint8_t*)((char*)eax_10)[1] & 1) != 0)
0053ac7c          {
0053ac8d              long double x87_r7_8 = fabsl((((long double)var_4) - ((long double)arg4->z)));
0053ac8f              long double x87_r6_7 = ((long double)0.000199999995f);
0053ac95              (x87_r6_7 - x87_r7_8);
0053ac97              eax_10 = ((((x87_r6_7 < x87_r7_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_7, x87_r7_8))) ? 1 : 0) << 0xa) | ((((x87_r6_7 == x87_r7_8) ? 1 : 0) << 0xe) | 0))));
0053ac97              
0053ac9c              if ((*(uint8_t*)((char*)eax_10)[1] & 1) != 0)
0053aca7                  return 0;
0053ac7c          }
0053aba0      }
0053aba0      else
0053aba0      {
0053aba8          long double x87_r7_3 = ((long double)0f);
0053abb1          long double x87_r6_3 = (((long double)arg4->z) - ((long double)var_4));
0053abb5          (x87_r6_3 - x87_r7_3);
0053abb7          class AC1Legacy::Vector3* eax_3;
0053abb7          eax_3 = ((((x87_r6_3 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_3) ? 1 : 0) << 0xe) | 0x3800))));
0053abb9          float var_18 = ((float)x87_r7_3);
0053abbd          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0053abc0          float var_14 = ((float)x87_r7_3);
0053abc0          
0053abc4          if (p_1)
0053abc4          {
0053abf5              float* eax_6 = arg7;
0053abfd              *(uint32_t*)eax_6 = var_18;
0053ac0b              eax_6[1] = var_14;
0053ac0e              eax_6[2] = 0xbf800000;
0053ac19              return 1;
0053abc4          }
0053abc4          
0053abca          float* ecx = arg7;
0053abd2          *(uint32_t*)ecx = var_18;
0053abe0          ecx[1] = var_14;
0053abe3          ecx[2] = 0x3f800000;
0053aba0      }
0053aba0      
0053abee      return 1;
0053ab50  }

0053acaa                                90 90 90 90 90 90                                                            ......

0053acb0  void __thiscall CCylSphere::collide_with_point(class CCylSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3* arg6, float arg7, int32_t arg8)

0053acb0  {
0053acd9      float x_7;
0053acd9      int32_t eax_1 = CCylSphere::normal_of_collision(this, arg3, arg5, arg6, arg7, arg8, &x_7);
0053acd9      
0053aced      if (AC1Legacy::Vector3::normalize_check_small(&x_7) == 0)
0053aced      {
0053acfa          if ((arg2->state & 0x40) == 0)
0053acfa          {
0053ad04              COLLISIONINFO::set_collision_normal(arg4, &x_7);
0053ad14              return;
0053acfa          }
0053acfa          
0053ad26          class AC1Legacy::Vector3* global_curr_center = arg3->global_curr_center;
0053ad30          float x_1;
0053ad30          LandDefs::get_block_offset(&x_1, arg3->curr_pos.objcell_id, arg3->check_pos.objcell_id);
0053ad3f          long double x87_r6_2 = (((long double)arg5->center.y) - ((long double)global_curr_center->y));
0053ad48          float var_18_1 = ((float)(((long double)arg5->center.z) - ((long double)global_curr_center->z)));
0053ad52          float x_6 = ((float)(((long double)x_1) + (((long double)arg5->center.x) - ((long double)global_curr_center->x))));
0053ad5e          x_1 = x_6;
0053ad64          float var_10;
0053ad64          float var_58_1 = ((float)(((long double)var_10) + x87_r6_2));
0053ad6c          float var_10_1 = var_58_1;
0053ad7c          float var_c;
0053ad7c          float var_54_1 = ((float)(((long double)var_c) + ((long double)var_18_1)));
0053ad86          float var_c_1 = var_54_1;
0053ad92          float var_50_1 = ((float)(((long double)global_curr_center->x) - ((long double)this->low_pt.x)));
0053ad9c          float var_4c_1 = ((float)(((long double)global_curr_center->y) - ((long double)this->low_pt.y)));
0053ada6          float var_48_1 = ((float)(((long double)global_curr_center->z) - ((long double)this->low_pt.z)));
0053adb3          arg7 = ((float)(((long double)0.000199999995f) + ((long double)arg7)));
0053adb6          double var_68_1;
0053adb6          float x_8;
0053adb6          float __return;
0053adb6          float x;
0053adb6          int32_t eax_6;
0053adb6          float z;
0053adb6          
0053adb6          if (eax_1 != 0)
0053adb6          {
0053aff8              float var_3c;
0053aff8              long double x87_r7_29 = ((long double)var_3c);
0053affc              long double temp1_1 = ((long double)0f);
0053affc              (x87_r7_29 - temp1_1);
0053b002              eax_6 = ((((x87_r7_29 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_29, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_29 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0053b004              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0053b004              
0053b007              if (!(p_2))
0053b007              {
0053b0d6                  long double x87_r7_44 = ((((long double)var_58_1) * ((long double)var_58_1)) + (((long double)x_6) * ((long double)x_6)));
0053b0ea                  long double x87_r6_35 = -(((((long double)var_58_1) * ((long double)var_4c_1)) + (((long double)x_6) * ((long double)var_50_1))));
0053b10c                  long double x87_r5_24 = ((x87_r6_35 * x87_r6_35) - ((((((long double)var_4c_1) * ((long double)var_4c_1)) + (((long double)var_50_1) * ((long double)var_50_1))) - (((long double)arg7) * ((long double)arg7))) * x87_r7_44));
0053b10e                  long double temp2_1 = ((long double)0.0);
0053b10e                  (x87_r5_24 - temp2_1);
0053b114                  eax_6 = ((((x87_r5_24 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_24, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r5_24 == temp2_1) ? 1 : 0) << 0xe) | 0x2800))));
0053b116                  bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
0053b116                  
0053b119                  if (p_5)
0053b119                  {
0053b11f                      long double x87_r4_16 = ((long double)0.000199999995f);
0053b127                      (x87_r7_44 - x87_r4_16);
0053b129                      eax_6 = ((((x87_r7_44 < x87_r4_16) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_44, x87_r4_16))) ? 1 : 0) << 0xa) | ((((x87_r7_44 == x87_r4_16) ? 1 : 0) << 0xe) | 0x2800))));
0053b12b                      bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
0053b12b                      
0053b12e                      if (p_6)
0053b12e                      {
0053b134                          long double x87_r5_25 = sqrtl(x87_r5_24);
0053b138                          long double x87_r4_18 = (x87_r6_35 - x87_r5_25);
0053b13e                          long double temp4_1 = ((long double)0.0);
0053b13e                          (x87_r4_18 - temp4_1);
0053b144                          eax_6 = ((((x87_r4_18 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_18, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r4_18 == temp4_1) ? 1 : 0) << 0xe) | 0x2800))));
0053b149                          double var_68_4;
0053b149                          long double x87_r7_46;
0053b149                          
0053b149                          if ((*(uint8_t*)((char*)eax_6)[1] & 1) != 0)
0053b149                          {
0053b159                              long double x87_r5_26 = (x87_r5_25 + x87_r6_35);
0053b15d                              x87_r7_46 = x87_r6_35;
0053b15f                              var_68_4 = ((double)(x87_r5_26 / x87_r5_26));
0053b149                          }
0053b149                          else
0053b149                          {
0053b14f                              x87_r7_46 = (((long double)((double)x87_r4_18)) / x87_r5_25);
0053b153                              var_68_4 = ((double)x87_r7_46);
0053b149                          }
0053b149                          
0053b16a                          float* var_80_6 = &x_1;
0053b173                          class Vector3* eax_14 = operator*(&x, ((float)x87_r7_46), &x_1);
0053b178                          long double x87_r7_48 = ((long double)var_68_4);
0053b17c                          float x_4 = eax_14->x;
0053b17e                          long double temp7_1 = ((long double)0.0);
0053b17e                          (x87_r7_48 - temp7_1);
0053b184                          float y_4 = eax_14->y;
0053b187                          float z_1 = eax_14->z;
0053b18a                          float z_14 = z_1;
0053b18e                          float z_9 = z_1;
0053b192                          z_1 = ((((x87_r7_48 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_48, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_48 == temp7_1) ? 1 : 0) << 0xe) | 0))));
0053b197                          bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
0053b19a                          x_1 = x_4;
0053b19e                          float y_15 = y_4;
0053b1a2                          x_8 = x_4;
0053b1a6                          float y_10 = y_4;
0053b1a6                          
0053b1aa                          if (p_7)
0053b1aa                          {
0053b1b0                              long double x87_r7_49 = ((long double)var_68_4);
0053b1b4                              long double temp10_1 = ((long double)1.0);
0053b1b4                              (x87_r7_49 - temp10_1);
0053b1ba                              z_1 = ((((x87_r7_49 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_49, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_49 == temp10_1) ? 1 : 0) << 0xe) | 0))));
0053b1ba                              
0053b1bf                              if ((*(uint8_t*)((char*)z_1)[1] & 0x41) != 0)
0053b1bf                              {
0053b1de                                  class Vector3* eax_16 = Vector3::operator-(Vector3::operator+(global_curr_center, &__return, &x_8), &x, this);
0053b1e3                                  float x_5 = eax_16->x;
0053b1e5                                  float y_5 = eax_16->y;
0053b1e8                                  float z_2 = eax_16->z;
0053b1eb                                  x_1 = x_5;
0053b1ef                                  x_7 = x_5;
0053b1f7                                  float z_6 = z_2;
0053b1ff                                  float y_16 = y_5;
0053b203                                  float z_15 = z_2;
0053b207                                  float y_7 = y_5;
0053b20b                                  int32_t var_3c_3 = 0;
0053b213                                  Vector3::operator/=(&x_7, arg7);
0053b231                              label_53b231:
0053b231                                  class Vector3* eax_18 = Vector3::operator-(Vector3::operator+(global_curr_center, &__return, &x_8), &x, arg5);
0053b238                                  float y_1 = eax_18->y;
0053b23b                                  x_1 = eax_18->x;
0053b23f                                  float z_4 = eax_18->z;
0053b246                                  x_8 = x_1;
0053b24e                                  float y_17 = y_1;
0053b252                                  float y_11 = y_1;
0053b25a                                  float z_16 = z_4;
0053b25e                                  float z_10 = z_4;
0053b262                                  COLLISIONINFO::set_collision_normal(arg4, &x_7);
0053b273                                  SPHEREPATH::add_offset_to_check_pos(arg3, &x_8, arg5->radius);
0053b1bf                              }
0053b1aa                          }
0053b12e                      }
0053b119                  }
0053b007              }
0053b007              else
0053b007              {
0053b011                  long double x87_r7_31 = fabsl(((long double)var_54_1));
0053b013                  long double x87_r6_29 = ((long double)0.000199999995f);
0053b019                  (x87_r6_29 - x87_r7_31);
0053b01b                  eax_6 = ((((x87_r6_29 < x87_r7_31) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_29, x87_r7_31))) ? 1 : 0) << 0xa) | ((((x87_r6_29 == x87_r7_31) ? 1 : 0) << 0xe) | 0))));
0053b01b                  
0053b020                  if ((*(uint8_t*)((char*)eax_6)[1] & 0x41) != 0)
0053b020                  {
0053b026                      long double x87_r7_32 = ((long double)var_54_1);
0053b02a                      long double temp3_1 = ((long double)0f);
0053b02a                      (x87_r7_32 - temp3_1);
0053b030                      eax_6 = ((((x87_r7_32 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_32, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_32 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0053b032                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
0053b035                      long double x87_r7_36;
0053b035                      
0053b035                      if (p_3)
0053b052                          x87_r7_36 = -(((((long double)var_48_1) + ((long double)arg5->radius)) / ((long double)var_54_1)));
0053b035                      else
0053b041                          x87_r7_36 = (((((long double)arg5->radius) + ((long double)this->height)) - ((long double)var_48_1)) / ((long double)var_54_1));
0053b041                      
0053b058                      var_68_1 = ((double)x87_r7_36);
0053b05d                      float x_9 = x_6;
0053b066                      class Vector3* eax_12 = operator*(&__return, ((float)x87_r7_36), &x_1);
0053b06b                      float x_3 = eax_12->x;
0053b06d                      float y_3 = eax_12->y;
0053b070                      z = eax_12->z;
0053b076                      x = x_3;
0053b07a                      float y_14 = y_3;
0053b07e                      float z_13 = z;
0053b082                      x_8 = x_3;
0053b086                      float y_9 = y_3;
0053b08a                      float z_8 = z;
0053b08a                      goto label_53b08e;
0053b020                  }
0053b007              }
0053adb6          }
0053adb6          else
0053adb6          {
0053adc0              long double x87_r7_15 = fabsl(((long double)var_54_1));
0053adc2              long double x87_r6_3 = ((long double)0.000199999995f);
0053adc8              (x87_r6_3 - x87_r7_15);
0053adca              eax_6 = ((((x87_r6_3 < x87_r7_15) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_15))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_15) ? 1 : 0) << 0xe) | 0))));
0053adca              
0053adcf              if ((*(uint8_t*)((char*)eax_6)[1] & 0x41) != 0)
0053adcf              {
0053add5                  long double x87_r7_16 = ((long double)0f);
0053addb                  long double x87_r6_4 = ((long double)var_54_1);
0053addf                  (x87_r6_4 - x87_r7_16);
0053ade1                  eax_6 = ((((x87_r6_4 < x87_r7_16) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_16))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_16) ? 1 : 0) << 0xe) | 0x3800))));
0053ade3                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0053ade6                  int32_t var_30_1;
0053ade6                  long double x87_r6_8;
0053ade6                  
0053ade6                  if (p_1)
0053ade6                  {
0053ae04                      var_30_1 = 0xbf800000;
0053ae13                      x87_r6_8 = -(((((long double)var_48_1) + ((long double)arg5->radius)) / ((long double)var_54_1)));
0053ade6                  }
0053ade6                  else
0053ade6                  {
0053adeb                      var_30_1 = 0x3f800000;
0053adfa                      x87_r6_8 = (((((long double)arg5->radius) + ((long double)this->height)) - ((long double)var_48_1)) / ((long double)var_54_1));
0053ade6                  }
0053ade6                  
0053ae15                  var_68_1 = ((double)x87_r6_8);
0053ae1d                  int32_t var_3c_1 = var_30_1;
0053ae21                  x_8 = ((float)x87_r7_16);
0053ae29                  float var_34_1 = ((float)x87_r7_16);
0053ae31                  long double x87_r7_17 = ((long double)var_68_1);
0053ae35                  x_7 = x_8;
0053ae3d                  float var_40_1 = var_34_1;
0053ae43                  x = ((float)(((long double)x_6) * x87_r7_17));
0053ae47                  float ecx_8 = x;
0053ae53                  x_8 = ecx_8;
0053ae57                  __return = ecx_8;
0053ae5b                  float var_1c_1 = ((float)(((long double)var_58_1) * x87_r7_17));
0053ae69                  float var_28_1 = var_1c_1;
0053ae6d                  float var_34_2 = var_1c_1;
0053ae7d                  float var_30_2 = ((float)(x87_r7_17 * ((long double)var_54_1)));
0053ae81                  long double x87_r7_20 = (((long double)x) + ((long double)var_50_1));
0053ae89                  long double x87_r6_17 = (((long double)var_1c_1) + ((long double)var_4c_1));
0053ae93                  float var_6c_1 = ((float)(((long double)arg7) * ((long double)arg7)));
0053ae9f                  long double x87_r5_11 = ((x87_r6_17 * x87_r6_17) + (x87_r7_20 * x87_r7_20));
0053aea1                  long double temp5_1 = ((long double)var_6c_1);
0053aea1                  (x87_r5_11 - temp5_1);
0053aea5                  z = ((((x87_r5_11 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_11, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r5_11 == temp5_1) ? 1 : 0) << 0xe) | 0x3000))));
0053aea5                  
0053aeae                  if ((*(uint8_t*)((char*)z)[1] & 1) != 0)
0053aeae                  {
0053b08e                  label_53b08e:
0053b08e                      long double x87_r7_40 = ((long double)var_68_1);
0053b092                      long double temp6_1 = ((long double)0.0);
0053b092                      (x87_r7_40 - temp6_1);
0053b098                      z = ((((x87_r7_40 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_40, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_40 == temp6_1) ? 1 : 0) << 0xe) | 0))));
0053b09a                      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
0053b09a                      
0053b09d                      if (p_4)
0053b09d                      {
0053b0a3                          long double x87_r7_41 = ((long double)var_68_1);
0053b0a7                          long double temp8_1 = ((long double)1.0);
0053b0a7                          (x87_r7_41 - temp8_1);
0053b0ad                          z = ((((x87_r7_41 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_41, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_41 == temp8_1) ? 1 : 0) << 0xe) | 0))));
0053b0ad                          
0053b0b2                          if ((*(uint8_t*)((char*)z)[1] & 0x41) == 0)
0053b0c3                              return;
0053b0c3                          
0053b0b2                          goto label_53b231;
0053b09d                      }
0053aeae                  }
0053aeae                  else
0053aeae                  {
0053aec4                      long double x87_r7_24 = ((((long double)var_58_1) * ((long double)var_58_1)) + (((long double)x_6) * ((long double)x_6)));
0053aec8                      long double x87_r6_21 = fabsl(x87_r7_24);
0053aeca                      long double x87_r5_12 = ((long double)0.000199999995f);
0053aed0                      (x87_r5_12 - x87_r6_21);
0053aed2                      z = ((((x87_r5_12 < x87_r6_21) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_12, x87_r6_21))) ? 1 : 0) << 0xa) | ((((x87_r5_12 == x87_r6_21) ? 1 : 0) << 0xe) | 0x3800))));
0053aed2                      
0053aed7                      if ((*(uint8_t*)((char*)z)[1] & 0x41) != 0)
0053aed7                      {
0053aeef                          long double x87_r6_25 = -(((((long double)var_58_1) * ((long double)var_4c_1)) + (((long double)x_6) * ((long double)var_50_1))));
0053af0d                          long double x87_r5_17 = ((x87_r6_25 * x87_r6_25) - ((((((long double)var_4c_1) * ((long double)var_4c_1)) + (((long double)var_50_1) * ((long double)var_50_1))) - ((long double)var_6c_1)) * x87_r7_24));
0053af0f                          long double temp9_1 = ((long double)0.0);
0053af0f                          (x87_r5_17 - temp9_1);
0053af15                          z = ((((x87_r5_17 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_17, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r5_17 == temp9_1) ? 1 : 0) << 0xe) | 0x2800))));
0053af15                          
0053af1a                          if ((*(uint8_t*)((char*)z)[1] & 1) == 0)
0053af1a                          {
0053af1c                              long double x87_r4_8 = ((long double)0.000199999995f);
0053af24                              (x87_r7_24 - x87_r4_8);
0053af26                              z = ((((x87_r7_24 < x87_r4_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_24, x87_r4_8))) ? 1 : 0) << 0xa) | ((((x87_r7_24 == x87_r4_8) ? 1 : 0) << 0xe) | 0x2800))));
0053af26                              
0053af2b                              if ((*(uint8_t*)((char*)z)[1] & 0x41) == 0)
0053af2b                              {
0053af2d                                  long double x87_r5_18 = sqrtl(x87_r5_17);
0053af31                                  long double x87_r4_10 = (x87_r6_25 - x87_r5_18);
0053af37                                  long double temp11_1 = ((long double)0.0);
0053af37                                  (x87_r4_10 - temp11_1);
0053af3d                                  z = ((((x87_r4_10 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_10, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r4_10 == temp11_1) ? 1 : 0) << 0xe) | 0x2800))));
0053af42                                  long double x87_r7_26;
0053af42                                  
0053af42                                  if ((*(uint8_t*)((char*)z)[1] & 1) != 0)
0053af42                                  {
0053af52                                      long double x87_r5_19 = (x87_r5_18 + x87_r6_25);
0053af56                                      x87_r7_26 = x87_r6_25;
0053af58                                      var_68_1 = ((double)(x87_r5_19 / x87_r5_19));
0053af42                                  }
0053af42                                  else
0053af42                                  {
0053af48                                      x87_r7_26 = (((long double)((double)x87_r4_10)) / x87_r5_18);
0053af4c                                      var_68_1 = ((double)x87_r7_26);
0053af42                                  }
0053af42                                  
0053af63                                  float var_80_2 = var_1c_1;
0053af6c                                  class Vector3* eax_8 = operator*(&__return, ((float)x87_r7_26), &x_1);
0053af73                                  float y = eax_8->y;
0053af76                                  x = eax_8->x;
0053af7a                                  float z_3 = eax_8->z;
0053af84                                  float y_12 = y;
0053af88                                  float z_11 = z_3;
0053af8c                                  x_8 = x;
0053af90                                  float y_8 = y;
0053af94                                  float z_7 = z_3;
0053af2b                              }
0053af1a                          }
0053af1a                          
0053afb9                          class Vector3* eax_11 = Vector3::operator-(Vector3::operator+(global_curr_center, &__return, &x_8), &x_1, this);
0053afbe                          float x_2 = eax_11->x;
0053afc0                          float y_2 = eax_11->y;
0053afc3                          z = eax_11->z;
0053afc6                          x = x_2;
0053afca                          x_7 = x_2;
0053afd2                          float z_5 = z;
0053afda                          float y_13 = y_2;
0053afde                          float z_12 = z;
0053afe2                          float y_6 = y_2;
0053afe6                          int32_t var_3c_2 = 0;
0053afee                          Vector3::operator/=(&x_7, arg7);
0053aff3                          goto label_53b08e;
0053aed7                      }
0053aeae                  }
0053adcf              }
0053adb6          }
0053aced      }
0053acb0  }

0053b29a                                                                                90 90 90 90 90 90                            ......

0053b2a0  enum TransitionState __thiscall CCylSphere::slide_sphere(class CCylSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3 const* arg6, float arg7, int32_t arg8)

0053b2a0  {
0053b2c4      void var_c;
0053b2c4      CCylSphere::normal_of_collision(this, arg3, arg5, arg6, arg7, arg8, &var_c);
0053b2c4      
0053b2d4      if (AC1Legacy::Vector3::normalize_check_small(&var_c) == 0)
0053b306          return CSphere::slide_sphere(arg5, arg3, arg4, &var_c, &arg3->global_curr_center[arg8]);
0053b306      
0053b2e1      return 2;
0053b2a0  }

0053b309                             90 90 90 90 90 90 90                                                           .......

0053b310  enum TransitionState __thiscall CCylSphere::step_sphere_up(class CCylSphere const* this, class CTransition* arg2, class CSphere const* arg3, class AC1Legacy::Vector3 const* arg4, float arg5)

0053b310  {
0053b323      long double x87_r7_2 = ((((long double)arg3->radius) + ((long double)this->height)) - ((long double)arg4->z));
0053b32b      long double x87_r6 = ((long double)arg2->object_info.step_up_height);
0053b32f      (x87_r6 - x87_r7_2);
0053b32f      
0053b33f      if ((*(uint8_t*)((char*)((((x87_r6 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_2) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
0053b3c9          return CCylSphere::slide_sphere(this, arg2, &arg2->sphere_path, &arg2->collision_info, arg3, arg4, arg5, 0);
0053b3c9      
0053b350      void var_18;
0053b350      CCylSphere::normal_of_collision(this, &arg2->sphere_path, arg3, arg4, arg5, 0, &var_18);
0053b350      
0053b360      if (AC1Legacy::Vector3::normalize_check_small(&var_18) != 0)
0053b36e          return 2;
0053b36e      
0053b38d      void __return;
0053b38d      
0053b38d      if (CTransition::step_up(arg2, Position::localtoglobalvec(&arg2->sphere_path.localspace_pos, &__return, &var_18)) == 0)
0053b3ae          return SPHEREPATH::step_up_slide(&arg2->sphere_path, arg2, &arg2->collision_info);
0053b3ae      
0053b39b      return 1;
0053b310  }

0053b3cc                                      90 90 90 90                                                              ....

0053b3d0  enum TransitionState __thiscall CCylSphere::land_on_cylinder(class CCylSphere const* this, class OBJECTINFO* arg2, class SPHEREPATH* arg3, class COLLISIONINFO* arg4, class CSphere const* arg5, class AC1Legacy::Vector3* arg6, float arg7)

0053b3d0  {
0053b3ef      void var_c;
0053b3ef      CCylSphere::normal_of_collision(this, arg3, arg5, arg6, arg7, 0, &var_c);
0053b3ef      
0053b3ff      if (AC1Legacy::Vector3::normalize_check_small(&var_c) != 0)
0053b40a          return 2;
0053b40a      
0053b414      SPHEREPATH::set_collide(arg3, &var_c);
0053b41f      arg3->walkable_allowance = 0.0871556997f;
0053b42e      return 3;
0053b3d0  }

0053b431                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0053b440  void __thiscall CCylSphere::intersects_sphere(class CCylSphere const* this, class CTransition* arg2)

0053b440  {
0053b445      class CTransition* ebp = arg2;
0053b450      class CSphere* global_sphere = ebp->sphere_path.global_sphere;
0053b46a      float x = ((float)(((long double)global_sphere->center.x) - ((long double)this->low_pt.x)));
0053b474      float var_30 = ((float)(((long double)global_sphere->center.y) - ((long double)this->low_pt.y)));
0053b47e      float var_2c = ((float)(((long double)global_sphere->center.z) - ((long double)this->low_pt.z)));
0053b48e      arg2 = ((float)((((long double)this->radius) - ((long double)0.000199999995f)) + ((long double)global_sphere->radius)));
0053b4a0      float x_1;
0053b4a0      float y;
0053b4a0      float z_1;
0053b4a0      class CTransition* ebp_1;
0053b4a0      void* __offset(CSphere, 0x10) edi;
0053b4a0      
0053b4a0      if ((ebp->sphere_path.insert_type == PLACEMENT_INSERT || ebp->sphere_path.obstruction_ethereal != 0))
0053b4a0      {
0053b86f          ebp_1 = arg2;
0053b86f          
0053b883          if (CCylSphere::collides_with_sphere(this, global_sphere, &x, ebp_1) != 0)
0053b6fe              return;
0053b6fe          
0053b88c          if (ebp->sphere_path.num_sphere > 1)
0053b88c          {
0053b891              edi = &global_sphere[1];
0053b896              x_1 = ((float)(((long double)*(int32_t*)((char*)global_sphere + 0x10)) - ((long double)this->low_pt.x)));
0053b89e              long double x87_r7_26 = ((long double)*(int32_t*)((char*)ADJ(edi) + 0x14));
0053b8a1              x = x_1;
0053b8af              y = ((float)(x87_r7_26 - ((long double)this->low_pt.y)));
0053b8ba              z_1 = ((float)(((long double)*(int32_t*)((char*)ADJ(edi) + 0x18)) - ((long double)this->low_pt.z)));
0053b8c4          label_53b8c4:
0053b8c4              float y_2 = y;
0053b8cb              float z_2 = z_1;
0053b8cf              CCylSphere::collides_with_sphere(this, edi, &x, ebp_1);
0053b88c          }
0053b88c          
0053b88c          return;
0053b4a0      }
0053b4a0      
0053b4ae      if (ebp->sphere_path.step_down != 0)
0053b4ae      {
0053b4c0          CCylSphere::step_sphere_down(this, ebp, &ebp->sphere_path, &ebp->collision_info, global_sphere, &x, arg2);
0053b4cc          return;
0053b4ae      }
0053b4ae      
0053b4d7      float x_2;
0053b4d7      
0053b4d7      if (ebp->sphere_path.check_walkable != 0)
0053b4d7      {
0053b4d9          ebp_1 = arg2;
0053b4d9          
0053b4ed          if (CCylSphere::collides_with_sphere(this, global_sphere, &x, ebp_1) != 0)
0053b6fe              return;
0053b6fe          
0053b4f6          if (ebp->sphere_path.num_sphere > 1)
0053b4f6          {
0053b501              edi = &global_sphere[1];
0053b507              class AC1Legacy::Vector3* eax_3 = AC1Legacy::Vector3::operator-(edi, &x_2, this);
0053b50e              y = eax_3->y;
0053b511              x = eax_3->x;
0053b515              z_1 = eax_3->z;
0053b518              goto label_53b8c4;
0053b4f6          }
0053b4d7      }
0053b4d7      else if (ebp->sphere_path.collide == 0)
0053b525      {
0053b701          char state = ((int8_t)ebp->object_info.state);
0053b701          
0053b706          if ((state & 3) != 0)
0053b706          {
0053b7f8              if (CCylSphere::collides_with_sphere(this, global_sphere, &x, arg2) != 0)
0053b7f8              {
0053b860                  CCylSphere::step_sphere_up(this, ebp, global_sphere, &x, arg2);
0053b86c                  return;
0053b7f8              }
0053b7f8              
0053b7fd              if (ebp->sphere_path.num_sphere > 1)
0053b7fd              {
0053b80e                  AC1Legacy::Vector3::operator-(&global_sphere[1], &x_2, this);
0053b80e                  
0053b827                  if (CCylSphere::collides_with_sphere(this, &global_sphere[1], &x_2, arg2) != 0)
0053b843                      CCylSphere::slide_sphere(this, ebp, &ebp->sphere_path, &ebp->collision_info, &global_sphere[1], &x_2, arg2, 1);
0053b7fd              }
0053b706          }
0053b706          else if ((state & 8) != 0)
0053b70e          {
0053b7b9              if (CCylSphere::collides_with_sphere(this, global_sphere, &x, arg2) != 0)
0053b7d5                  CCylSphere::collide_with_point(this, ebp, &ebp->sphere_path, &ebp->collision_info, global_sphere, &x, arg2, 0);
0053b70e          }
0053b70e          else
0053b70e          {
0053b728              if (CCylSphere::collides_with_sphere(this, global_sphere, &x, arg2) != 0)
0053b728              {
0053b796                  CCylSphere::land_on_cylinder(this, ebp, &ebp->sphere_path, &ebp->collision_info, global_sphere, &x, arg2);
0053b7a2                  return;
0053b728              }
0053b728              
0053b72d              if (ebp->sphere_path.num_sphere > 1)
0053b72d              {
0053b73e                  AC1Legacy::Vector3::operator-(&global_sphere[1], &x_2, this);
0053b73e                  
0053b757                  if (CCylSphere::collides_with_sphere(this, &global_sphere[1], &x_2, arg2) != 0)
0053b773                      CCylSphere::collide_with_point(this, ebp, &ebp->sphere_path, &ebp->collision_info, &global_sphere[1], &x_2, arg2, 1);
0053b72d              }
0053b70e          }
0053b525      }
0053b525      else if (CCylSphere::collides_with_sphere(this, global_sphere, &x, arg2) != 0)
0053b53f      {
0053b57b      label_53b57b:
0053b57b          double __return;
0053b57b          class AC1Legacy::Vector3* eax_7 = SPHEREPATH::get_curr_pos_check_pos_block_offset(&ebp->sphere_path, &__return);
0053b58f          void __return_1;
0053b58f          class AC1Legacy::Vector3* eax_8 = AC1Legacy::Vector3::operator-(ebp->sphere_path.global_curr_center, &__return_1, global_sphere);
0053b596          AC1Legacy::Vector3::operator-(eax_8, &x_2, eax_7);
0053b59f          float var_14;
0053b59f          long double x87_r7_10 = fabsl(((long double)var_14));
0053b5a1          long double x87_r6_1 = ((long double)0.000199999995f);
0053b5a7          (x87_r6_1 - x87_r7_10);
0053b5a7          
0053b5ae          if ((*(uint8_t*)((char*)((((x87_r6_1 < x87_r7_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_10))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_10) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0053b6fe              return;
0053b6fe          
0053b5b7          class AC1Legacy::Vector3* var_58_8 = eax_8;
0053b5c7          long double x87_r7_14 = (((((long double)this->height) + ((long double)global_sphere->radius)) - ((long double)var_2c)) / ((long double)var_14));
0053b5cb          __return = ((double)x87_r7_14);
0053b5d3          class Vector3* eax_10 = Vector3::operator*(&x_2, &__return_1, ((float)x87_r7_14));
0053b5da          x_1 = eax_10->x;
0053b5e2          long double x87_r7_16 = (((long double)x_1) + ((long double)x));
0053b5f1          long double x87_r6_3 = (((long double)eax_10->y) + ((long double)var_30));
0053b5f8          float z = eax_10->z;
0053b604          long double x87_r5_3 = ((x87_r6_3 * x87_r6_3) + (x87_r7_16 * x87_r7_16));
0053b60a          long double x87_r4_4 = (((long double)arg2) * ((long double)arg2));
0053b60e          (x87_r4_4 - x87_r5_3);
0053b610          float eax_11;
0053b610          eax_11 = ((((x87_r4_4 < x87_r5_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_4, x87_r5_3))) ? 1 : 0) << 0xa) | ((((x87_r4_4 == x87_r5_3) ? 1 : 0) << 0xe) | 0x3000))));
0053b614          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053b614          
0053b619          if (p_1)
0053b619          {
0053b629              long double x87_r7_20 = ((((long double)1.0) - ((long double)__return)) * ((long double)ebp->sphere_path.walk_interp));
0053b62f              __return = ((double)x87_r7_20);
0053b633              long double x87_r6_4 = ((long double)ebp->sphere_path.walk_interp);
0053b63b              (x87_r7_20 - x87_r6_4);
0053b63d              eax_11 = ((((x87_r7_20 < x87_r6_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_20, x87_r6_4))) ? 1 : 0) << 0xa) | ((((x87_r7_20 == x87_r6_4) ? 1 : 0) << 0xe) | 0x3800))));
0053b63d              
0053b642              if ((*(uint8_t*)((char*)eax_11)[1] & 1) != 0)
0053b642              {
0053b648                  long double temp1_1 = ((long double)-0.10000000000000001);
0053b648                  (x87_r7_20 - temp1_1);
0053b64e                  eax_11 = ((((x87_r7_20 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_20, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_20 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0053b650                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0053b650                  
0053b653                  if (p_2)
0053b653                  {
0053b665                      class Vector3* eax_12 = Vector3::operator+(global_sphere, &__return_1, &x_1);
0053b66a                      long double x87_r7_21 = ((long double)eax_12->z);
0053b66f                      float y_1 = eax_12->y;
0053b672                      x_2 = eax_12->x;
0053b683                      float var_14_1 = ((float)(x87_r7_21 - ((long double)global_sphere->radius)));
0053b68b                      float y_3 = y_1;
0053b68f                      x = 0f;
0053b697                      int32_t var_30_1 = 0;
0053b69f                      int32_t var_2c_1 = 0x3f800000;
0053b6a7                      Plane::Plane(&__return_1, &x, &x_2);
0053b6b9                      COLLISIONINFO::set_contact_plane(&ebp->collision_info, &__return_1, 1);
0053b460                      ebp->collision_info.contact_plane_cell_id = ebp->sphere_path.check_pos.objcell_id;
0053b44a                      ebp->sphere_path.walk_interp = ((float)((long double)__return));
0053b6dc                      SPHEREPATH::add_offset_to_check_pos(&ebp->sphere_path, &x_1, global_sphere->radius);
0053b653                  }
0053b642              }
0053b619          }
0053b53f      }
0053b53f      else if (ebp->sphere_path.num_sphere > 1)
0053b544      {
0053b555          AC1Legacy::Vector3::operator-(&global_sphere[1], &x_2, this);
0053b555          
0053b56e          if (CCylSphere::collides_with_sphere(this, &global_sphere[1], &x_2, arg2) != 0)
0053b56e              goto label_53b57b;
0053b544      }
0053b440  }

0053b8ec                                      90 90 90 90                                                              ....

0053b8f0  int80_t __thiscall CCylSphere::intersects_sphere(class CCylSphere const* this, class Position const* arg2, float arg3, class CTransition* arg4)

0053b8f0  {
0053b90c      SPHEREPATH::cache_localspace_sphere(&arg4->sphere_path, arg2, 1f);
0053b91e      float var_4 = ((float)(((long double)arg3) * ((long double)this->radius)));
0053b934      float var_8 = ((float)(((long double)arg3) * ((long double)this->height)));
0053b942      long double x87_r6_1 = (((long double)arg3) * ((long double)this->low_pt.y));
0053b956      float var_24 = ((float)(((long double)arg3) * ((long double)this->low_pt.z)));
0053b95a      float var_2c = ((float)(((long double)arg3) * ((long double)this->low_pt.x)));
0053b95e      float var_28 = ((float)x87_r6_1);
0053b962      void __return;
0053b962      class AC1Legacy::Vector3* eax_1 = Position::localtoglobal(&arg4->sphere_path.check_pos, &__return, arg2, &var_2c);
0053b969      float y = eax_1->y;
0053b96c      float z = eax_1->z;
0053b96f      float x = eax_1->x;
0053b978      float y_1 = y;
0053b97c      float z_1 = z;
0053b98c      return CCylSphere::intersects_sphere(&x, arg4);
0053b8f0  }

0053b98f                                               90                                                                 .

0053b990  void __fastcall DArray<ClipPlane>::~DArray<ClipPlane>(class DArray<ClipPlane>* this)

0053b990  {
0053b993      class ClipPlane* data = this->data;
0053b993      
0053b998      if (data != 0)
0053b998      {
0053b99a          int32_t plane = data->plane;
0053b9a2          void* esi_1 = &data[plane];
0053b9a2          
0053b9a6          if ((plane - 1) >= 0)
0053b9a6          {
0053b9a9              int32_t edi_1 = plane;
0053b9bb              int32_t i;
0053b9bb              
0053b9bb              do
0053b9bb              {
0053b9b0                  esi_1 -= 8;
0053b9b5                  IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(esi_1);
0053b9ba                  i = edi_1;
0053b9ba                  edi_1 -= 1;
0053b9bb              } while (i != 1);
0053b9a6          }
0053b9a6          
0053b9bf          operator delete[](((char*)data - 4));
0053b998      }
0053b998      
0053b9c9      this->data = 0;
0053b990  }

0053b9d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0053b9e0  void __fastcall ClipPlaneList::ClipPlaneList(class ClipPlaneList* this)

0053b9e0  {
0053b9e4      this->cplane_num = 0;
0053b9e6      this->cplane_list.data = 0;
0053b9e9      this->cplane_list.sizeOf = 0;
0053b9ec      this->cplane_list.next_available = 0;
0053b9ef      this->cplane_list.blocksize = 0x80;
0053b9f6      this->leaf_contains_obj = 0;
0053b9e0  }

0053b9fa                                                                                90 90 90 90 90 90                            ......

0053ba00  void __fastcall ClipPlaneList::~ClipPlaneList(class ClipPlaneList* this)

0053ba00  {
0053ba03      /* tailcall */
0053ba03      return DArray<ClipPlane>::~DArray<ClipPlane>(&this->cplane_list);
0053ba00  }

0053ba08                          90 90 90 90 90 90 90 90                                                          ........

0053ba10  void __fastcall CCellPortal::CCellPortal(class CCellPortal* this)

0053ba10  {
0053ba14      this->other_cell_id = 0;
0053ba16      this->other_cell_ptr = nullptr;
0053ba19      this->portal = nullptr;
0053ba1c      this->portal_side = 0;
0053ba22      this->other_portal_id = 0xffffffff;
0053ba25      this->exact_match = 0xffffffff;
0053ba10  }

0053ba29                             90 90 90 90 90 90 90                                                           .......

0053ba30  class CEnvCell* __fastcall CCellPortal::GetOtherCell(class CCellPortal const* this, int32_t arg2)

0053ba30  {
0053ba3b      return CEnvCell::GetVisible(this->other_cell_id);
0053ba30  }

0053ba3e                                                                                            90 90                                ..

0053ba40  uint32_t __thiscall CCellPortal::Pack(class CCellPortal* this, void** arg2, uint32_t arg3)

0053ba40  {
0053ba45      if (arg3 >= 8)
0053ba45      {
0053ba4a          int32_t edx_1 = 0;
0053ba4a          
0053ba4e          if (this->exact_match != 0)
0053ba50              edx_1 = 1;
0053ba50          
0053ba5a          if (this->portal_side == 0)
0053ba5c              edx_1 |= 2;
0053ba5c          
0053ba62          if (this->other_cell_id == 0xffffffff)
0053ba64              edx_1 |= 4;
0053ba64          
0053ba6e          **(uint16_t**)arg2 = edx_1;
0053ba73          void* edx_3 = (*(uint32_t*)arg2 + 2);
0053ba76          *(uint32_t*)arg2 = edx_3;
0053ba7b          class CPolygon* esi_2;
0053ba7b          esi_2 = this->portal->poly_id;
0053ba7f          *(uint16_t*)edx_3 = esi_2;
0053ba84          void* esi_4 = (*(uint32_t*)arg2 + 2);
0053ba87          *(uint32_t*)arg2 = esi_4;
0053ba89          int16_t* edx_4 = esi_4;
0053ba8b          esi_4 = this->other_cell_id;
0053ba8e          *(uint16_t*)edx_4 = esi_4;
0053ba93          void* edx_6 = (*(uint32_t*)arg2 + 2);
0053ba96          *(uint32_t*)arg2 = edx_6;
0053ba98          this = this->other_portal_id;
0053ba9c          *(uint16_t*)edx_6 = this;
0053ba9f          *(uint32_t*)arg2 += 2;
0053ba45      }
0053ba45      
0053baa8      return 8;
0053ba40  }

0053baab                                   90 90 90 90 90                                                             .....

0053bab0  int32_t __thiscall CCellPortal::UnPack(class CCellPortal* this, uint32_t arg2, uint16_t* arg3, void** arg4, uint32_t arg5)

0053bab0  {
0053bab7      void* ecx = *(uint32_t*)arg4;
0053bab9      uint32_t edx;
0053bab9      edx = *(uint16_t*)ecx;
0053babf      *(uint32_t*)arg4 = ((char*)ecx + 2);
0053bac7      this->exact_match = (((uint32_t)edx) & 1);
0053baca      int32_t ecx_3;
0053baca      ecx_3 = edx;
0053bacc      ecx_3 = !(ecx_3);
0053bad6      this->portal_side = ((((uint32_t)ecx_3) >> 1) & 1);
0053badb      void* ecx_8 = (*(uint32_t*)arg4 + 2);
0053badf      int32_t edi;
0053badf      edi = *(uint16_t*)((char*)ecx_8 - 2);
0053bae3      *(uint32_t*)arg4 = ecx_8;
0053bae9      *(uint16_t*)arg3 = edi;
0053baec      void* ecx_10 = *(uint32_t*)arg4;
0053baee      edi = *(uint16_t*)ecx_10;
0053baf7      *(uint32_t*)arg4 = ((char*)ecx_10 + 2);
0053baf7      
0053baf9      if ((edx & 4) == 0)
0053bb0c          this->other_cell_id = (((uint32_t)edi) | arg2);
0053baf9      else
0053bafb          this->other_cell_id = 0xffffffff;
0053bafb      
0053bb0e      void* ecx_13 = *(uint32_t*)arg4;
0053bb10      edx = *(uint16_t*)ecx_13;
0053bb16      *(uint32_t*)arg4 = ((char*)ecx_13 + 2);
0053bb1b      this->other_portal_id = ((int32_t)edx);
0053bb25      return 1;
0053bab0  }

0053bb28                          90 90 90 90 90 90 90 90                                                          ........

0053bb30  void __fastcall CBldPortal::CBldPortal(class CBldPortal* this)

0053bb30  {
0053bb34      this->portal_side = 0xffffffff;
0053bb3a      this->other_cell_id = 0;
0053bb3d      this->other_portal_id = 0xffffffff;
0053bb44      this->exact_match = 0;
0053bb47      this->num_stabs = 0;
0053bb4a      this->stab_list = nullptr;
0053bb30  }

0053bb4e                                            90 90                                                                ..

0053bb50  void __fastcall CBldPortal::~CBldPortal(class CBldPortal* this)

0053bb50  {
0053bb54      operator delete[](this->stab_list);
0053bb50  }

0053bb5b                                                                                   90 90 90 90 90                             .....

0053bb60  void __thiscall CBldPortal::add_to_stablist(class CBldPortal* this, uint32_t** arg2, uint32_t* arg3, uint32_t* arg4)

0053bb60  {
0053bb66      int32_t i = 0;
0053bb6a      class CBldPortal* this_1 = this;
0053bb6e      int32_t i_1 = 0;
0053bb6e      
0053bb72      if (this->num_stabs > 0)
0053bb72      {
0053bc20          do
0053bc20          {
0053bb88              uint32_t ebx_1 = *(uint32_t*)arg4;
0053bb8a              uint32_t eax_1 = ebx_1;
0053bb8c              bool cond:1_1 = eax_1 != 0;
0053bb8c              
0053bb8e              if (eax_1 > 0)
0053bb8e              {
0053bb98                  void* ecx_2 = &*(uint32_t*)arg2[(eax_1 - 1)];
0053bb98                  
0053bba2                  while (this->stab_list[i] != *(uint32_t*)ecx_2)
0053bba2                  {
0053bba4                      eax_1 -= 1;
0053bba5                      ecx_2 -= 4;
0053bba5                      
0053bbaa                      if (eax_1 <= 0)
0053bbaa                          break;
0053bba2                  }
0053bba2                  
0053bbac                  this = this_1;
0053bbb0                  i = i_1;
0053bbb4                  cond:1_1 = eax_1 != 0;
0053bb8e              }
0053bb8e              
0053bbb6              if (!(cond:1_1))
0053bbb6              {
0053bbb8                  uint32_t eax_2 = *(uint32_t*)arg3;
0053bbb8                  
0053bbbd                  if (ebx_1 >= eax_2)
0053bbbd                  {
0053bbbf                      uint32_t* ebx_2 = *(uint32_t*)arg2;
0053bbce                      *(uint32_t*)arg2 = operator new[](((eax_2 << 2) + 0x28));
0053bbd0                      *(uint32_t*)arg3 += 0xa;
0053bbd9                      int32_t j = 0;
0053bbd9                      
0053bbdd                      if (*(uint32_t*)arg4 > 0)
0053bbdd                      {
0053bbed                          do
0053bbed                          {
0053bbe0                              *(uint32_t*)arg2[j] = ebx_2[j];
0053bbea                              j += 1;
0053bbed                          } while (j < *(uint32_t*)arg4);
0053bbdd                      }
0053bbdd                      
0053bbf0                      operator delete(ebx_2);
0053bbf5                      this = this_1;
0053bbf9                      i = i_1;
0053bbbd                  }
0053bbbd                  
0053bc08                  *(uint32_t*)arg2[*(uint32_t*)arg4] = this->stab_list[i];
0053bc0f                  this = this_1;
0053bc14                  *(uint32_t*)arg4 += 1;
0053bbb6              }
0053bbb6              
0053bc19              i += 1;
0053bc1c              i_1 = i;
0053bc20          } while (i < this->num_stabs);
0053bb72      }
0053bb60  }


0053bc30  class CEnvCell* __fastcall CBldPortal::GetOtherCell(class CBldPortal const* this)

0053bc30  {
0053bc3c      return CEnvCell::GetVisible(this->other_cell_id);
0053bc30  }

0053bc3d                                                                                         90 90 90                               ...

0053bc40  int32_t __thiscall CBldPortal::UnPack(class CBldPortal* this, uint32_t arg2, void** arg3, uint32_t arg4)

0053bc40  {
0053bc4d      void* ecx = *(uint32_t*)arg3;
0053bc4f      char eax = ((int8_t)*(uint16_t*)ecx);
0053bc55      *(uint32_t*)arg3 = ((char*)ecx + 2);
0053bc62      this->exact_match = (((uint32_t)eax) & 1);
0053bc6a      this->portal_side = ((((uint32_t)!(eax)) >> 1) & 1);
0053bc6c      void* eax_1 = *(uint32_t*)arg3;
0053bc6e      int32_t ecx_3;
0053bc6e      ecx_3 = *(uint16_t*)eax_1;
0053bc74      *(uint32_t*)arg3 = ((char*)eax_1 + 2);
0053bc7b      this->other_cell_id = (((uint32_t)ecx_3) | arg2);
0053bc7e      void* eax_5 = *(uint32_t*)arg3;
0053bc80      ecx_3 = *(uint16_t*)eax_5;
0053bc86      *(uint32_t*)arg3 = ((char*)eax_5 + 2);
0053bc8b      this->other_portal_id = ((int32_t)ecx_3);
0053bc8e      void* eax_7 = *(uint32_t*)arg3;
0053bc90      int32_t ecx_4;
0053bc90      ecx_4 = *(uint16_t*)eax_7;
0053bc96      *(uint32_t*)arg3 = ((char*)eax_7 + 2);
0053bc98      uint32_t eax_9 = ((uint32_t)ecx_4);
0053bca3      this->num_stabs = eax_9;
0053bca6      void* eax_10;
0053bca6      uint32_t* edx_4;
0053bca6      eax_10 = operator new[]((eax_9 << 2));
0053bcab      uint32_t num_stabs = this->num_stabs;
0053bcae      this->stab_list = eax_10;
0053bcb4      int32_t i = 0;
0053bcb4      
0053bcb8      if (num_stabs > 0)
0053bcb8      {
0053bcdb          do
0053bcdb          {
0053bcc0              void* ecx_5 = *(uint32_t*)arg3;
0053bcc2              edx_4 = *(uint16_t*)ecx_5;
0053bcc8              *(uint32_t*)arg3 = ((char*)ecx_5 + 2);
0053bccd              this->stab_list[i] = (((uint32_t)edx_4) | arg2);
0053bcd8              i += 1;
0053bcdb          } while (i < this->num_stabs);
0053bcb8      }
0053bcb8      
0053bce1      if ((this->num_stabs & 1) != 0)
0053bce3          *(uint32_t*)arg3 += 2;
0053bce3      
0053bcee      return 1;
0053bc40  }

0053bcf1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0053bd00  int32_t __fastcall CBldPortal::PreFetchCells(class CBldPortal* this)

0053bd00  {
0053bd0b      int32_t i = 0;
0053bd0f      int32_t result = 1;
0053bd0f      
0053bd14      if (this->num_stabs > 0)
0053bd14      {
0053bd43          do
0053bd43          {
0053bd29              void var_8;
0053bd29              enum CACHE_OBJECT_CODES eax_4 = DBObj::PreFetch(QualifiedDataID::QualifiedDataID(&var_8, this->stab_list[i], 3));
0053bd29              
0053bd39              if ((eax_4 != CACHE_OBJECT_IN_MEMORY && eax_4 != CACHE_OBJECT_IN_FILE))
0053bd3b                  result = 0;
0053bd3b              
0053bd40              i += 1;
0053bd43          } while (i < this->num_stabs);
0053bd14      }
0053bd14      
0053bd4d      return result;
0053bd00  }

0053bd4e                                            90 90                                                                ..

0053bd50  uint32_t __fastcall CBldPortal::pack_size(class CBldPortal* this)

0053bd50  {
0053bd50      uint32_t num_stabs = this->num_stabs;
0053bd59      int32_t ecx_1 = (((num_stabs * 2) + 8) & 3);
0053bd59      
0053bd5c      if (ecx_1 == 0)
0053bd6c          return ((num_stabs * 2) + 8);
0053bd6c      
0053bd67      return ((4 - ecx_1) + ((num_stabs * 2) + 8));
0053bd50  }

0053bd6d                                         90 90 90                                                               ...

0053bd70  uint32_t __thiscall CBldPortal::Pack(class CBldPortal* this, void** arg2, uint32_t arg3)

0053bd70  {
0053bd71      uint32_t num_stabs = this->num_stabs;
0053bd7a      int32_t eax_1 = (((num_stabs * 2) + 8) & 3);
0053bd7d      int32_t edx;
0053bd7d      
0053bd7d      if (eax_1 == 0)
0053bd88          edx = 0;
0053bd7d      else
0053bd84          edx = (4 - eax_1);
0053bd84      
0053bd8a      int32_t result = (edx + ((num_stabs * 2) + 8));
0053bd8a      
0053bd91      if (arg3 >= result)
0053bd91      {
0053bd9a          int32_t esi_1 = 0;
0053bd9a          
0053bd9e          if (this->exact_match != 0)
0053bda0              esi_1 = 1;
0053bda0          
0053bda8          if (this->portal_side == 0)
0053bdaa              esi_1 |= 2;
0053bdaa          
0053bdb5          **(uint16_t**)arg2 = esi_1;
0053bdba          void* esi_3 = (*(uint32_t*)arg2 + 2);
0053bdbd          *(uint32_t*)arg2 = esi_3;
0053bdbf          void* edi_1;
0053bdbf          edi_1 = this->other_cell_id;
0053bdc3          *(uint16_t*)esi_3 = edi_1;
0053bdc8          void* ebx_2 = (*(uint32_t*)arg2 + 2);
0053bdcb          *(uint32_t*)arg2 = ebx_2;
0053bdcd          edi_1 = this->other_portal_id;
0053bdd3          *(uint16_t*)ebx_2 = edi_1;
0053bdd8          void* edi_3 = (*(uint32_t*)arg2 + 2);
0053bddb          *(uint32_t*)arg2 = edi_3;
0053bddd          int16_t* esi_5 = edi_3;
0053bddf          edi_3 = this->num_stabs;
0053bde3          *(uint16_t*)esi_5 = edi_3;
0053bde8          void* esi_7 = (*(uint32_t*)arg2 + 2);
0053bdeb          *(uint32_t*)arg2 = esi_7;
0053bdf0          void* edi_4 = esi_7;
0053bdf2          int32_t i = 0;
0053bdf2          
0053bdf6          if (this->num_stabs > 0)
0053bdf6          {
0053be17              do
0053be17              {
0053be03                  uint32_t* ebx_4;
0053be03                  ebx_4 = this->stab_list[i];
0053be07                  *(uint16_t*)edi_4 = ebx_4;
0053be0c                  edi_4 = (*(uint32_t*)arg2 + 2);
0053be0f                  *(uint32_t*)arg2 = edi_4;
0053be14                  i += 1;
0053be17              } while (i < this->num_stabs);
0053bdf6          }
0053bdf6          
0053be1d          if ((this->num_stabs & 1) != 0)
0053be1d          {
0053be1f              *(uint16_t*)edi_4 = 0;
0053be24              *(uint32_t*)arg2 += 2;
0053be1d          }
0053bd91      }
0053bd91      
0053be2a      return result;
0053bd70  }

0053bdfa                                                                                8d 9b 00 00 00 00                            ......
0053be2d                                         90 90 90                                                               ...

0053be30  int32_t __thiscall CVertexArray::AllocateVertex(class CVertexArray* this, uint32_t arg2, enum VertexType arg3)

0053be30  {
0053be43      int32_t eax_2 = malloc(((arg2 + 1) * CVertexArray::vertex_size));
0053be4e      this->vertex_memory = eax_2;
0053be4e      
0053be50      if (eax_2 == 0)
0053beaa          return 0;
0053beaa      
0053be59      if (CVertexArray::vertex_size == 0x20)
0053be59      {
0053be5d          int32_t ecx_1 = (eax_2 & 0x1f);
0053be5d          
0053be60          if (ecx_1 != 0)
0053be64              eax_2 = ((eax_2 - ecx_1) + 0x20);
0053be59      }
0053be59      
0053be67      this->vertices = eax_2;
0053be71      this->vertex_type = arg3;
0053be74      this->num_vertices = arg2;
0053be74      
0053be77      if (arg3 == CSWVertexType)
0053be77      {
0053be7a          int32_t i = 0;
0053be7a          
0053be7e          if (arg2 > 0)
0053be7e          {
0053be99              do
0053be99              {
0053be8e                  CSWVertex::Init(((CVertexArray::vertex_size * i) + this->vertices));
0053be96                  i += 1;
0053be99              } while (i < this->num_vertices);
0053be7e          }
0053be77      }
0053be77      
0053bea3      return 1;
0053be30  }

0053bead                                         90 90 90                                                               ...

0053beb0  void __fastcall CVertexArray::DestroyVertex(class CVertexArray* this)

0053beb0  {
0053beb7      if (this->vertex_type == CSWVertexType)
0053beb7      {
0053bebd          int32_t i = 0;
0053bebd          
0053bec1          if (this->num_vertices > 0)
0053bec1          {
0053bedc              do
0053bedc              {
0053bed1                  CSWVertex::Destroy(((CVertexArray::vertex_size * i) + this->vertices));
0053bed9                  i += 1;
0053bedc              } while (i < this->num_vertices);
0053bec1          }
0053beb7      }
0053beb7      
0053bee2      free(this->vertex_memory);
0053beeb      this->vertex_memory = 0;
0053bef1      this->vertex_type = UnknownVertexType;
0053bef8      this->num_vertices = 0;
0053beff      this->vertices = nullptr;
0053beb0  }

0053bf08                          90 90 90 90 90 90 90 90                                                          ........

0053bf10  void __fastcall CVertexArray::BuildBoundingBox(class CVertexArray* this)

0053bf10  {
0053bf1a      BBox::InitForAdjustment(&this->bbox);
0053bf22      int32_t i = 0;
0053bf22      
0053bf26      if (this->num_vertices > 0)
0053bf26      {
0053bf4b          do
0053bf4b          {
0053bf40              BBox::AdjustBBox(&this->bbox, ((CVertexArray::vertex_size * i) + this->vertices));
0053bf48              i += 1;
0053bf4b          } while (i < this->num_vertices);
0053bf26      }
0053bf10  }

0053bf2a                                8d 9b 00 00 00 00                                                            ......
0053bf51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0053bf60  uint32_t __fastcall CVertexArray::pack_size(class CVertexArray* this)

0053bf60  {
0053bf68      int32_t result = 8;
0053bf68      
0053bf6d      if (this->vertex_type == CSWVertexType)
0053bf6d      {
0053bf73          int32_t i = 0;
0053bf73          
0053bf77          if (this->num_vertices > 0)
0053bf77          {
0053bf9b              do
0053bf9b              {
0053bf93                  result += CSWVertex::pack_size(((CVertexArray::vertex_size * i) + this->vertices));
0053bf98                  i += 1;
0053bf9b              } while (i < this->num_vertices);
0053bf77          }
0053bf6d      }
0053bf6d      
0053bfa2      return result;
0053bf60  }

0053bfa3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0053bfb0  void __fastcall CVertexArray::CVertexArray(class CVertexArray* this)

0053bfb0  {
0053bfb4      this->vertex_memory = 0;
0053bfb6      this->vertex_type = UnknownVertexType;
0053bfb9      this->num_vertices = 0;
0053bfbc      this->vertices = nullptr;
0053bfb0  }


0053bfc0  uint32_t __thiscall CVertexArray::Pack(class CVertexArray* this, void** arg2, uint32_t arg3)

0053bfc0  {
0053bfc0      class CVertexArray* this_1 = this;
0053bfce      uint32_t result = CVertexArray::pack_size(this);
0053bfce      
0053bfd6      if (arg3 >= result)
0053bfd6      {
0053bfdd          enum VertexType** edi_1 = arg2;
0053bfe3          **(uint32_t**)edi_1 = this->vertex_type;
0053bfe7          void* eax_3 = &*(uint32_t*)edi_1[1];
0053bfea          *(uint32_t*)edi_1 = eax_3;
0053bfef          *(uint32_t*)eax_3 = this->num_vertices;
0053bff1          *(uint32_t*)edi_1 = &*(uint32_t*)edi_1[1];
0053bff1          
0053bff8          if (this->vertex_type == CSWVertexType)
0053bff8          {
0053bffd              int32_t i = 0;
0053bffd              
0053c001              if (this->num_vertices > 0)
0053c001              {
0053c01e                  do
0053c01e                  {
0053c013                      CSWVertex::Pack(((CVertexArray::vertex_size * i) + this->vertices), edi_1, arg3);
0053c01b                      i += 1;
0053c01e                  } while (i < this->num_vertices);
0053c001              }
0053bff8          }
0053bfd6      }
0053bfd6      
0053c02b      return result;
0053bfc0  }

0053c02e                                            90 90                                                                ..

0053c030  int32_t __thiscall CVertexArray::UnPack(class CVertexArray* this, void** arg2, uint32_t arg3)

0053c030  {
0053c03d      this->vertex_type = **(uint32_t**)arg2;
0053c042      void* eax_2 = (*(uint32_t*)arg2 + 4);
0053c045      *(uint32_t*)arg2 = eax_2;
0053c049      this->num_vertices = *(uint32_t*)eax_2;
0053c04c      *(uint32_t*)arg2 += 4;
0053c059      int32_t result = CVertexArray::AllocateVertex(this, this->num_vertices, this->vertex_type);
0053c059      
0053c060      if (result == 0)
0053c065          return result;
0053c065      
0053c06c      if (this->vertex_type == CSWVertexType)
0053c06c      {
0053c072          int32_t i = 0;
0053c072          
0053c076          if (this->num_vertices > 0)
0053c076          {
0053c09b              do
0053c09b              {
0053c090                  CSWVertex::UnPack(((CVertexArray::vertex_size * i) + this->vertices), arg2, arg3);
0053c098                  i += 1;
0053c09b              } while (i < this->num_vertices);
0053c076          }
0053c06c      }
0053c06c      
0053c0a0      CVertexArray::BuildBoundingBox(this);
0053c0ad      return 1;
0053c030  }


0053c0b0  void __fastcall BSPNODE::Destroy(class BSPNODE* this)

0053c0b0  {
0053c0b3      class BSPNODE* pos_node = this->pos_node;
0053c0b3      
0053c0bb      if (pos_node != 0)
0053c0bb      {
0053c0bd          pos_node->vtable->__vecDelDtor(1);
0053c0c3          this->pos_node = nullptr;
0053c0bb      }
0053c0bb      
0053c0c6      class CPolygon** in_polys = this->in_polys;
0053c0c6      
0053c0cb      if (in_polys != 0)
0053c0cb      {
0053c0ce          operator delete[](in_polys);
0053c0d6          this->in_polys = nullptr;
0053c0cb      }
0053c0cb      
0053c0d9      class BSPNODE* neg_node = this->neg_node;
0053c0de      this->num_polys = 0;
0053c0de      
0053c0e1      if (neg_node != 0)
0053c0e1      {
0053c0e3          neg_node->vtable->__vecDelDtor(1);
0053c0e9          this->neg_node = nullptr;
0053c0e1      }
0053c0e1      
0053c0ed      __builtin_strncpy(&this->__inner2, "####", 4);
0053c0b0  }

0053c0f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0053c100  void __thiscall BSPNODE::build_draw_portals_only(class BSPNODE* this, int32_t arg2)

0053c100  {
0053c100      int32_t esi;
0053c100      int32_t var_4 = esi;
0053c101      int32_t edi;
0053c101      int32_t var_8 = edi;
0053c101      int32_t* esp = &var_8;
0053c106      class BSPNODE* this_1 = this;
0053c106      
0053c110      while (true)
0053c110      {
0053c110          struct frameContext* Render::FrameCurrent_1 = Render::FrameCurrent;
0053c128          long double x87_r7_4 = (((((long double)Render::FrameCurrent_1->viewer.viewpoint.z) * ((long double)this_1->splitting_plane.N.z)) + (((long double)Render::FrameCurrent_1->viewer.viewpoint.y) * ((long double)this_1->splitting_plane.N.y))) + (((long double)this_1->splitting_plane.N.x) * ((long double)Render::FrameCurrent_1->viewer.viewpoint.x)));
0053c12a          long double x87_r7_5 = (x87_r7_4 + ((long double)this_1->splitting_plane.d));
0053c12d          long double temp1_1 = ((long double)0.000199999995f);
0053c12d          (x87_r7_5 - temp1_1);
0053c133          Render::FrameCurrent_1 = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0053c138          int32_t eax_1;
0053c138          
0053c138          if ((*(uint8_t*)((char*)Render::FrameCurrent_1)[1] & 0x41) != 0)
0053c138          {
0053c14a              (x87_r7_5 - -(((long double)0.000199999995f)));
0053c14e              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053c151              eax_1 = 1;
0053c151              
0053c156              if (p_1)
0053c158                  eax_1 = 2;
0053c138          }
0053c138          else
0053c13c              eax_1 = 0;
0053c13c          
0053c160          class BSPNODE* this_2;
0053c160          
0053c160          if (eax_1 == 0)
0053c160          {
0053c1ac              class BSPNODE* neg_node = this_1->neg_node;
0053c1ac              
0053c1b1              if (neg_node == 0)
0053c1d4                  this_2 = this_1->pos_node;
0053c1b1              else
0053c1b1              {
0053c1b3                  union __inner2_2 = neg_node->__inner2;
0053c1b3                  
0053c1bb                  if (__inner2_2 == 0x4c454146)
0053c1d4                      this_2 = this_1->pos_node;
0053c1bb                  else
0053c1bb                  {
0053c1c2                      *(uint32_t*)((char*)esp - 4) = arg2;
0053c1c2                      esp -= 4;
0053c1c2                      
0053c1c3                      if (__inner2_2 == 0x504f5254)
0053c1c3                      {
0053c1cf                          BSPPORTAL::portal_draw_portals_only();
0053c1cf                          esp = &esp[1];
0053c1d4                          this_2 = this_1->pos_node;
0053c1c3                      }
0053c1c3                      else
0053c1c3                      {
0053c1c5                          BSPNODE::build_draw_portals_only();
0053c1ca                          this_2 = this_1->pos_node;
0053c1c3                      }
0053c1bb                  }
0053c1b1              }
0053c160          }
0053c160          else
0053c160          {
0053c166              if ((eax_1 != 1 && eax_1 != 2))
0053c163                  goto label_53c1df;
0053c163              
0053c168              class BSPNODE* pos_node = this_1->pos_node;
0053c168              
0053c16d              if (pos_node != 0)
0053c16d              {
0053c16f                  union __inner2 = pos_node->__inner2;
0053c16f                  
0053c177                  if (__inner2 != 0x4c454146)
0053c177                  {
0053c17e                      *(uint32_t*)((char*)esp - 4) = arg2;
0053c17e                      esp -= 4;
0053c17e                      
0053c17f                      if (__inner2 == 0x504f5254)
0053c17f                      {
0053c188                          BSPPORTAL::portal_draw_portals_only();
0053c188                          esp = &esp[1];
0053c17f                      }
0053c17f                      else
0053c181                          BSPNODE::build_draw_portals_only();
0053c177                  }
0053c16d              }
0053c16d              
0053c18d              this_2 = this_1->neg_node;
0053c160          }
0053c160          
0053c192          if (this_2 == 0)
0053c192              goto label_53c1df;
0053c192          
0053c194          union __inner2_1 = this_2->__inner2;
0053c194          
0053c19c          if (__inner2_1 == 0x4c454146)
0053c19c              goto label_53c1df;
0053c19c          
0053c1a3          if (__inner2_1 == 0x504f5254)
0053c1a3          {
0053c1d9              *(uint32_t*)((char*)esp - 4) = arg2;
0053c1da              BSPPORTAL::portal_draw_portals_only();
0053c1df          label_53c1df:
0053c1df              *(uint32_t*)esp;
0053c1df              esp[1];
0053c1e1              return;
0053c1a3          }
0053c1a3          
0053c1a5          this_1 = this_2;
0053c110      }
0053c100  }

0053c10a                                8d 9b 00 00 00 00                                                            ......
0053c1e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0053c1f0  void __thiscall BSPNODE::point_inside_cell_bsp(class BSPNODE const* this, class AC1Legacy::Vector3 const* arg2)

0053c1f0  {
0053c209      while (true)
0053c209      {
0053c209          long double x87_r7_5 = ((((((long double)this->splitting_plane.N.y) * ((long double)arg2->y)) + (((long double)this->splitting_plane.N.z) * ((long double)arg2->z))) + (((long double)this->splitting_plane.N.x) * ((long double)arg2->x))) + ((long double)this->splitting_plane.d));
0053c20c          long double temp1_1 = ((long double)0.000199999995f);
0053c20c          (x87_r7_5 - temp1_1);
0053c212          class BSPNODE* pos_node;
0053c212          pos_node = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0053c217          int32_t eax;
0053c217          
0053c217          if ((*(uint8_t*)((char*)pos_node)[1] & 0x41) != 0)
0053c217          {
0053c229              (x87_r7_5 - -(((long double)0.000199999995f)));
0053c22d              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053c230              eax = 1;
0053c230              
0053c235              if (p_1)
0053c237                  eax = 2;
0053c217          }
0053c217          else
0053c21b              eax = 0;
0053c21b          
0053c245          if ((eax != 0 && (eax == 1 || eax != 2)))
0053c254              return;
0053c254          
0053c247          pos_node = this->pos_node;
0053c247          
0053c24c          if (pos_node == 0)
0053c24c              break;
0053c24c          
0053c24e          this = pos_node;
0053c209      }
0053c1f0  }

0053c25f                                                                                               90                                 .

0053c260  enum BoundingType __thiscall BSPNODE::sphere_intersects_cell_bsp(class BSPNODE const* this, class CSphere const* arg2)

0053c260  {
0053c260      class CSphere* edx = arg2;
0053c279      long double x87_r7_4 = ((((((long double)this->splitting_plane.N.y) * ((long double)edx->center.y)) + (((long double)this->splitting_plane.N.z) * ((long double)edx->center.z))) + (((long double)this->splitting_plane.N.x) * ((long double)edx->center.x))) + ((long double)this->splitting_plane.d));
0053c27f      long double x87_r6_5 = (((long double)edx->radius) + ((long double)0.00999999978f));
0053c285      arg2 = ((float)x87_r6_5);
0053c28f      (x87_r7_4 - -(x87_r6_5));
0053c293      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0053c293      
0053c296      if (p)
0053c296      {
0053c2d3          bool p_1;
0053c2d3          
0053c2d3          do
0053c2d3          {
0053c298              this = this->pos_node;
0053c29d              (x87_r7_4 - x87_r6_5);
0053c29d              
0053c2a4              if ((*(uint8_t*)((char*)((((x87_r7_4 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_5) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
0053c2a4              {
0053c2e8                  if (this == 0)
0053c2fe                      return 1;
0053c2fe                  
0053c2eb                  enum BoundingType eax_3 = BSPNODE::sphere_intersects_cell_bsp(this, edx);
0053c2f0                  int32_t eax_4 = -(eax_3);
0053c2f6                  return -((eax_4 - eax_4));
0053c2a4              }
0053c2a4              
0053c2a8              if (this == 0)
0053c2e3                  return 2;
0053c2e3              
0053c2bf              x87_r7_4 = ((((((long double)this->splitting_plane.N.y) * ((long double)edx->center.y)) + (((long double)this->splitting_plane.N.z) * ((long double)edx->center.z))) + (((long double)this->splitting_plane.N.x) * ((long double)edx->center.x))) + ((long double)this->splitting_plane.d));
0053c2c2              x87_r6_5 = ((long double)arg2);
0053c2cc              (x87_r7_4 - -(x87_r6_5));
0053c2d0              p_1 = /* p_1 = unimplemented  {test ah, 0x41} */;
0053c2d3          } while (p_1);
0053c296      }
0053c296      
0053c2db      return 0;
0053c260  }

0053c301     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0053c310  int32_t __thiscall BSPNODE::point_intersects_solid(class BSPNODE const* this, class AC1Legacy::Vector3 const* arg2)

0053c310  {
0053c329      long double x87_r7_4 = ((((((long double)this->splitting_plane.N.z) * ((long double)arg2->z)) + (((long double)this->splitting_plane.N.y) * ((long double)arg2->y))) + (((long double)this->splitting_plane.N.x) * ((long double)arg2->x))) + ((long double)this->splitting_plane.d));
0053c32c      long double temp0 = ((long double)0.0);
0053c32c      (x87_r7_4 - temp0);
0053c32c      
0053c337      if ((*(uint8_t*)((char*)((((x87_r7_4 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
0053c34e          /* jump -> this->neg_node->vtable->point_intersects_solid */
0053c34e      
0053c342      /* jump -> this->pos_node->vtable->point_intersects_solid */
0053c310  }

0053c351                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0053c360  uint32_t __thiscall CSphere::Pack(class CSphere* this, void** arg2, uint32_t arg3)

0053c360  {
0053c367      if (arg3 >= 0x10)
0053c367      {
0053c370          if (arg3 >= 0xc)
0053c370          {
0053c377              **(uint32_t**)arg2 = this->center.x;
0053c37b              void* edx_3 = (*(uint32_t*)arg2 + 4);
0053c37e              *(uint32_t*)arg2 = edx_3;
0053c383              *(uint32_t*)edx_3 = ((float)((long double)this->center.y));
0053c387              void* esi_3 = (*(uint32_t*)arg2 + 4);
0053c38a              *(uint32_t*)arg2 = esi_3;
0053c391              *(uint32_t*)esi_3 = ((float)((long double)this->center.z));
0053c393              *(uint32_t*)arg2 += 4;
0053c370          }
0053c370          
0053c39c          **(uint32_t**)arg2 = ((float)((long double)this->radius));
0053c39e          *(uint32_t*)arg2 += 4;
0053c367      }
0053c367      
0053c3a6      return 0x10;
0053c360  }

0053c3a9                             90 90 90 90 90 90 90                                                           .......

0053c3b0  void __fastcall BSPNODE::BSPNODE(class BSPNODE* this)

0053c3b0  {
0053c3b4      this->vtable = 0x7c9af0;
0053c3ba      __builtin_strncpy(&this->__inner2, "####", 0x14);
0053c3b0  }

0053c3ce                                            90 90                                                                ..

0053c3d0  void __fastcall BSPNODE::~BSPNODE(class BSPNODE* this)

0053c3d0  {
0053c3d3      class BSPNODE* pos_node = this->pos_node;
0053c3db      this->vtable = 0x7c9af0;
0053c3db      
0053c3e1      if (pos_node != 0)
0053c3e1      {
0053c3e3          pos_node->vtable->__vecDelDtor(1);
0053c3e9          this->pos_node = nullptr;
0053c3e1      }
0053c3e1      
0053c3ec      class CPolygon** in_polys = this->in_polys;
0053c3ec      
0053c3f1      if (in_polys != 0)
0053c3f1      {
0053c3f4          operator delete[](in_polys);
0053c3fc          this->in_polys = nullptr;
0053c3f1      }
0053c3f1      
0053c3ff      class BSPNODE* neg_node = this->neg_node;
0053c404      this->num_polys = 0;
0053c404      
0053c407      if (neg_node != 0)
0053c407      {
0053c409          neg_node->vtable->__vecDelDtor(1);
0053c40f          this->neg_node = nullptr;
0053c407      }
0053c407      
0053c413      __builtin_strncpy(&this->__inner2, "####", 4);
0053c3d0  }

0053c41c                                                                                      90 90 90 90                              ....

0053c420  uint32_t __fastcall BSPNODE::pack_size(class BSPNODE* this)

0053c420  {
0053c420      class BSPNODE* this_1 = this;
0053c425      class BSPNODE* pos_node = this->pos_node;
0053c42a      this_1 = nullptr;
0053c432      int32_t result = 0x10;
0053c432      
0053c437      if (pos_node != 0)
0053c44b          result = (BSPNODE::PackChild(pos_node, &this_1, 0) + 0x10);
0053c44b      
0053c44e      class BSPNODE* neg_node = this->neg_node;
0053c44e      
0053c453      if (neg_node != 0)
0053c465          result += BSPNODE::PackChild(neg_node, &this_1, 0);
0053c465      
0053c467      enum BSPTreeType BSPNODE::pack_tree_type_1 = BSPNODE::pack_tree_type;
0053c467      
0053c46e      if (BSPNODE::pack_tree_type_1 == DRAWING_BSP)
0053c47a          return ((result + (this->num_polys << 1)) + 0x14);
0053c47a      
0053c47e      if (BSPNODE::pack_tree_type_1 != PHYSICS_BSP)
0053c488          return result;
0053c488      
0053c480      return (result + 0x10);
0053c420  }

0053c489                             90 90 90 90 90 90 90                                                           .......

0053c490  uint32_t __thiscall BSPNODE::Pack(class BSPNODE* this, void** arg2, uint32_t arg3)

0053c490  {
0053c495      uint32_t result = BSPNODE::pack_size(this);
0053c495      
0053c4a2      if (arg3 >= result)
0053c4a2      {
0053c4b2          CSphere::Pack(&this->splitting_plane, arg2, arg3);
0053c4b7          class BSPNODE* pos_node = this->pos_node;
0053c4b7          
0053c4bc          if (pos_node != 0)
0053c4c1              BSPNODE::PackChild(pos_node, arg2, arg3);
0053c4c1          
0053c4c9          class BSPNODE* neg_node = this->neg_node;
0053c4c9          
0053c4ce          if (neg_node != 0)
0053c4d3              BSPNODE::PackChild(neg_node, arg2, arg3);
0053c4d3          
0053c4db          enum BSPTreeType BSPNODE::pack_tree_type_1 = BSPNODE::pack_tree_type;
0053c4db          
0053c4e2          if (BSPNODE::pack_tree_type_1 == DRAWING_BSP)
0053c4e2          {
0053c4e9              CSphere::Pack(&this->sphere, arg2, arg3);
0053c4f3              **(uint32_t**)arg2 = this->num_polys;
0053c4f5              *(uint32_t*)arg2 += 4;
0053c4fb              int32_t i = 0;
0053c4fb              
0053c4ff              if (this->num_polys > 0)
0053c4ff              {
0053c519                  do
0053c519                  {
0053c507                      void* ecx_4;
0053c507                      ecx_4 = this->in_polys[i]->poly_id;
0053c50d                      **(uint16_t**)arg2 = ecx_4;
0053c510                      *(uint32_t*)arg2 += 2;
0053c516                      i += 1;
0053c519                  } while (i < this->num_polys);
0053c4ff              }
0053c4e2          }
0053c4e2          else if (BSPNODE::pack_tree_type_1 == PHYSICS_BSP)
0053c52e              CSphere::Pack(&this->sphere, arg2, arg3);
0053c4a2      }
0053c4a2      
0053c539      return result;
0053c490  }

0053c53c                                                                                      90 90 90 90                              ....

0053c540  int32_t __thiscall BSPNODE::UnPack(class BSPNODE* this, void** arg2, uint32_t arg3)

0053c540  {
0053c54e      void* ebp = *(uint32_t*)arg2;
0053c54e      
0053c553      if (arg3 >= 0x10)
0053c553      {
0053c558          if (arg3 >= 0xc)
0053c558          {
0053c55d              this->splitting_plane.N.x = *(uint32_t*)ebp;
0053c562              void* edx_2 = (*(uint32_t*)arg2 + 4);
0053c565              *(uint32_t*)arg2 = edx_2;
0053c56b              this->splitting_plane.N.y = *(uint32_t*)edx_2;
0053c570              void* ecx_2 = (*(uint32_t*)arg2 + 4);
0053c573              *(uint32_t*)arg2 = ecx_2;
0053c579              this->splitting_plane.N.z = *(uint32_t*)ecx_2;
0053c57c              *(uint32_t*)arg2 += 4;
0053c558          }
0053c558          
0053c583          this->splitting_plane.d = **(uint32_t**)arg2;
0053c586          *(uint32_t*)arg2 += 4;
0053c553      }
0053c553      
0053c589      union __inner2 = this->__inner2;
0053c589      
0053c591      if (__inner2 > 0x42506e6e)
0053c591      {
0053c5fc          if (((__inner2 == 0x4270494e || __inner2 == 0x42706e4e) && BSPNODE::UnPackChild(&this->neg_node, arg2, arg3) == 0))
0053c5fc          {
0053c611              *(uint32_t*)arg2 = ebp;
0053c618              return 0;
0053c5fc          }
0053c591      }
0053c591      else if (__inner2 == 0x42506e6e)
0053c593      {
0053c5db      label_53c5db:
0053c5db          int32_t eax_11 = BSPNODE::UnPackChild(&this->pos_node, arg2, arg3);
0053c5db          
0053c5e5          if (eax_11 == 0)
0053c5e5          {
0053c5e8              *(uint32_t*)arg2 = ebp;
0053c5ed              return eax_11;
0053c5e5          }
0053c593      }
0053c593      else if (__inner2 == 0x4250494e)
0053c59a      {
0053c5ae      label_53c5ae:
0053c5ae          
0053c5b8          if (BSPNODE::UnPackChild(&this->pos_node, arg2, arg3) == 0)
0053c5b8          {
0053c611              *(uint32_t*)arg2 = ebp;
0053c618              return 0;
0053c5b8          }
0053c5b8          
0053c5c0          int32_t eax_10 = BSPNODE::UnPackChild(&this->neg_node, arg2, arg3);
0053c5c0          
0053c5ca          if (eax_10 == 0)
0053c5ca          {
0053c5cd              *(uint32_t*)arg2 = ebp;
0053c5d2              return eax_10;
0053c5ca          }
0053c59a      }
0053c59a      else
0053c59a      {
0053c59f          if (__inner2 == 0x4250496e)
0053c59f              goto label_53c5db;
0053c59f          
0053c5a6          if (__inner2 == 0x42506e4e)
0053c5a6              goto label_53c5ae;
0053c59a      }
0053c59a      
0053c61b      enum BSPTreeType BSPNODE::pack_tree_type_1 = BSPNODE::pack_tree_type;
0053c61b      
0053c622      if (BSPNODE::pack_tree_type_1 == DRAWING_BSP)
0053c622      {
0053c629          CSphere::UnPack(&this->sphere, arg2, arg3);
0053c632          this->num_polys = **(uint32_t**)arg2;
0053c635          *(uint32_t*)arg2 += 4;
0053c638          uint32_t num_polys = this->num_polys;
0053c638          
0053c63d          if (num_polys > 0)
0053c63d          {
0053c647              void* eax_15;
0053c647              class CPolygon** edx_7;
0053c647              eax_15 = operator new[]((num_polys << 2));
0053c64c              uint32_t num_polys_1 = this->num_polys;
0053c64f              this->in_polys = eax_15;
0053c655              int32_t i = 0;
0053c655              
0053c659              if (num_polys_1 > 0)
0053c659              {
0053c687                  do
0053c687                  {
0053c660                      void* ecx_7 = *(uint32_t*)arg2;
0053c662                      edx_7 = *(uint16_t*)ecx_7;
0053c668                      *(uint32_t*)arg2 = ((char*)ecx_7 + 2);
0053c673                      this->in_polys[i] = &BSPNODE::pack_poly[((int32_t)edx_7)];
0053c684                      i += 1;
0053c687                  } while (i < this->num_polys);
0053c659              }
0053c63d          }
0053c622      }
0053c622      else if (BSPNODE::pack_tree_type_1 == PHYSICS_BSP)
0053c69f          CSphere::UnPack(&this->sphere, arg2, arg3);
0053c69f      
0053c6ad      return 1;
0053c540  }

0053c65d                                                                                         8d 49 00                               .I.

0053c6b0  uint32_t __convention("regparm") BSPNODE::pack_child_size(class BSPNODE* arg1)

0053c6b0  {
0053c6b0      void* ecx;
0053c6b0      void* var_4 = ecx;
0053c6b5      union __inner2 = arg1->__inner2;
0053c6bd      var_4 = nullptr;
0053c6bd      
0053c6c7      if (__inner2 == 0x504f5254)
0053c6d7          return (BSPPORTAL::PackPortal(arg1, &var_4, 0) + 4);
0053c6d7      
0053c6dd      if (__inner2 != 0x4c454146)
0053c6fc          return (BSPNODE::Pack(arg1, &var_4, 0) + 4);
0053c6fc      
0053c6ed      return (BSPLEAF::PackLeaf(arg1, &var_4, 0) + 4);
0053c6b0  }

0053c6fd                                                                                         90 90 90                               ...

0053c700  uint32_t BSPNODE::PackChild(class BSPNODE* arg1, void** arg2, uint32_t arg3)

0053c700  {
0053c706      class BSPNODE* __saved_ebx = arg1;
0053c707      class BSPNODE* eax;
0053c707      uint32_t result = BSPNODE::pack_child_size(eax);
0053c707      
0053c717      if (arg3 >= result)
0053c717      {
0053c723          **(uint32_t**)arg2 = arg1->__inner2;
0053c72b          *(uint32_t*)arg2 += 4;
0053c72d          union __inner2 = arg1->__inner2;
0053c72d          
0053c73a          if (__inner2 == 0x504f5254)
0053c73a          {
0053c73c              BSPPORTAL::PackPortal(arg1, arg2, arg3);
0053c745              return result;
0053c73a          }
0053c73a          
0053c74c          if (__inner2 == 0x4c454146)
0053c74c          {
0053c74e              BSPLEAF::PackLeaf(arg1, arg2, arg3);
0053c757              return result;
0053c74c          }
0053c74c          
0053c758          BSPNODE::Pack(arg1, arg2, arg3);
0053c717      }
0053c717      
0053c761      return result;
0053c700  }

0053c762        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0053c770  int32_t BSPNODE::UnPackChild(class BSPNODE** arg1, void** arg2, uint32_t arg3)

0053c770  {
0053c775      void* eax = *(uint32_t*)arg2;
0053c779      int32_t edi = *(uint32_t*)eax;
0053c784      *(uint32_t*)arg2 = ((char*)eax + 4);
0053c784      
0053c786      if (edi == 0x504f5254)
0053c786      {
0053c78a          void* eax_2 = operator new(0x40);
0053c78f          class BSPPORTAL* esi = nullptr;
0053c78f          
0053c796          if (eax_2 != 0)
0053c79f              esi = BSPPORTAL::BSPPORTAL(eax_2);
0053c79f          
0053c7a9          __builtin_strncpy(&esi->__inner2, "TROP", 4);
0053c7b0          int32_t result = BSPPORTAL::UnPackPortal(esi, arg2, arg3);
0053c7ba          *(uint32_t*)arg1 = esi;
0053c7be          return result;
0053c786      }
0053c786      
0053c7c5      if (edi != 0x4c454146)
0053c7c5      {
0053c800          void* eax_7 = operator new(0x38);
0053c800          
0053c80c          if (eax_7 == 0)
0053c829              eax_7 = nullptr;
0053c80c          else
0053c80c          {
0053c80e              *(uint32_t*)eax_7 = 0x7c9af0;
0053c814              __builtin_strncpy(((char*)eax_7 + 0x24), "####", 0x14);
0053c80c          }
0053c80c          
0053c833          *(uint32_t*)arg1 = eax_7;
0053c836          *(uint32_t*)((char*)eax_7 + 0x24) = edi;
0053c844          return BSPNODE::UnPack(*(uint32_t*)arg1, arg2, arg3);
0053c7c5      }
0053c7c5      
0053c7c9      void* eax_5 = operator new(0x40);
0053c7ce      class BSPLEAF* esi_1 = nullptr;
0053c7ce      
0053c7d5      if (eax_5 != 0)
0053c7de          esi_1 = BSPLEAF::BSPLEAF(eax_5);
0053c7de      
0053c7e8      __builtin_strncpy(&esi_1->__inner2, "FAEL", 4);
0053c7ef      BSPLEAF::UnPackLeaf(esi_1, arg2, arg3);
0053c7f9      *(uint32_t*)arg1 = esi_1;
0053c7fd      return 1;
0053c770  }

0053c845                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0053c850  void __thiscall BSPNODE::LinkPortalNodeChain(class BSPNODE* this, class SmartArray<BSPNODE *,1>* arg2)

0053c850  {
0053c855      uint32_t m_num = arg2->m_num;
0053c858      int32_t eax = (m_num - 1);
0053c858      
0053c859      if ((m_num - 1) >= 0)
0053c859      {
0053c878          int32_t temp2_1;
0053c878          
0053c878          do
0053c878          {
0053c864              class BSPNODE* this_1 = arg2->m_data[eax];
0053c867              this->pos_node = this_1;
0053c867              
0053c86a              if (eax > 0)
0053c872                  this_1->pos_node = arg2[0].m_data[eax];
0053c872              
0053c875              temp2_1 = eax;
0053c875              eax -= 1;
0053c876              this = this_1;
0053c878          } while ((temp2_1 - 1) >= 0);
0053c859      }
0053c850  }

0053c85d                                                                                         8d 49 00                               .I.
0053c87e                                                                                            90 90                                ..

0053c880  void __thiscall BSPNODE::box_intersects_cell_bsp(class BSPNODE* this, class BBox const* arg2)

0053c880  {
0053c891      class BSPNODE* ebp = this;
0053c891      
0053c8ae      while (true)
0053c8ae      {
0053c8ae          long double x87_r7_4 = ((((((long double)arg2->m_vMin.z) * ((long double)ebp->splitting_plane.N.z)) + (((long double)arg2->m_vMin.y) * ((long double)ebp->splitting_plane.N.y))) + (((long double)arg2->m_vMin.x) * ((long double)ebp->splitting_plane.N.x))) + ((long double)ebp->splitting_plane.d));
0053c8b1          long double temp1_1 = ((long double)0.000199999995f);
0053c8b1          (x87_r7_4 - temp1_1);
0053c8b7          class BSPNODE* pos_node;
0053c8b7          pos_node = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0053c8b7          
0053c8bc          if ((*(uint8_t*)((char*)pos_node)[1] & 0x41) != 0)
0053c8bc          {
0053c8c8              long double x87_r6_7 = -(((long double)0.000199999995f));
0053c8cc              (x87_r7_4 - x87_r6_7);
0053c8ce              pos_node = ((((x87_r7_4 < x87_r6_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_7))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_7) ? 1 : 0) << 0xe) | 0))));
0053c8d0              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053c8d0              
0053c8d3              if (!(p_1))
0053c8d3              {
0053c8dc                  float y_2 = arg2->m_vMax.y;
0053c8df                  float z_4 = arg2->m_vMax.z;
0053c8e2                  float x = arg2->m_vMax.x;
0053c8eb                  float y_7 = y_2;
0053c8f2                  float z_7 = z_4;
0053c8f2                  
0053c8fe                  if (Plane::which_side(&ebp->splitting_plane, &x, 0.000199999995f) == NEGATIVE)
0053c8fe                  {
0053c906                      float y_5 = arg2->m_vMin.y;
0053c909                      float z = arg2->m_vMax.z;
0053c90c                      float x_1 = arg2->m_vMin.x;
0053c918                      float y_8 = y_5;
0053c91c                      float z_8 = z;
0053c91c                      
0053c928                      if (Plane::which_side(&ebp->splitting_plane, &x_1, 0.000199999995f) == NEGATIVE)
0053c928                      {
0053c930                          float z_2 = arg2->m_vMin.z;
0053c933                          float y = arg2->m_vMax.y;
0053c936                          float x_2 = arg2->m_vMin.x;
0053c93f                          float z_9 = z_2;
0053c946                          float y_9 = y;
0053c946                          
0053c952                          if (Plane::which_side(&ebp->splitting_plane, &x_2, 0.000199999995f) == NEGATIVE)
0053c952                          {
0053c95b                              float y_3 = arg2->m_vMin.y;
0053c95e                              float z_5 = arg2->m_vMin.z;
0053c961                              float x_3 = arg2->m_vMax.x;
0053c96a                              float y_10 = y_3;
0053c971                              float z_10 = z_5;
0053c971                              
0053c97d                              if (Plane::which_side(&ebp->splitting_plane, &x_3, 0.000199999995f) == NEGATIVE)
0053c97d                              {
0053c986                                  float y_6 = arg2->m_vMin.y;
0053c989                                  float z_1 = arg2->m_vMax.z;
0053c98c                                  float x_4 = arg2->m_vMax.x;
0053c998                                  float y_11 = y_6;
0053c99c                                  float z_11 = z_1;
0053c99c                                  
0053c9a8                                  if (Plane::which_side(&ebp->splitting_plane, &x_4, 0.000199999995f) == NEGATIVE)
0053c9a8                                  {
0053c9ac                                      float z_3 = arg2->m_vMax.z;
0053c9af                                      float y_1 = arg2->m_vMax.y;
0053c9b2                                      float x_5 = arg2->m_vMin.x;
0053c9bb                                      float z_12 = z_3;
0053c9c2                                      float y_12 = y_1;
0053c9c2                                      
0053c9ce                                      if (Plane::which_side(&ebp->splitting_plane, &x_5, 0.000199999995f) == NEGATIVE)
0053c9ce                                      {
0053c9d3                                          float y_4 = arg2->m_vMax.y;
0053c9d6                                          float z_6 = arg2->m_vMin.z;
0053c9d9                                          float x_6 = arg2->m_vMax.x;
0053c9e2                                          float y_13 = y_4;
0053c9e9                                          float z_13 = z_6;
0053c9e9                                          
0053c9f5                                          if (Plane::which_side(&ebp->splitting_plane, &x_6, 0.000199999995f) == NEGATIVE)
0053ca00                                              return;
0053c9ce                                      }
0053c9a8                                  }
0053c97d                              }
0053c952                          }
0053c928                      }
0053c8fe                  }
0053c8d3              }
0053c8bc          }
0053c8bc          
0053ca05          pos_node = ebp->pos_node;
0053ca05          
0053ca0a          if (pos_node == 0)
0053ca0a              break;
0053ca0a          
0053ca0c          ebp = pos_node;
0053c8ae      }
0053c880  }

0053ca22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0053ca30  void __thiscall BSPNODE::sphere_intersects_poly(class BSPNODE const* this, class CSphere const* arg2, class AC1Legacy::Vector3 const* arg3, class CPolygon const** arg4, class AC1Legacy::Vector3* arg5)

0053ca30  {
0053ca43      if (CSphere::intersects(&this->sphere, arg2) == 0)
0053ca47          return;
0053ca47      
0053ca5f      long double x87_r7_4 = ((((((long double)this->splitting_plane.N.z) * ((long double)arg2->center.z)) + (((long double)this->splitting_plane.N.y) * ((long double)arg2->center.y))) + (((long double)arg2->center.x) * ((long double)this->splitting_plane.N.x))) + ((long double)this->splitting_plane.d));
0053ca65      long double x87_r6_5 = (((long double)arg2->radius) - ((long double)0.000199999995f));
0053ca6f      (x87_r7_4 - x87_r6_5);
0053ca71      int32_t eax;
0053ca71      eax = ((((x87_r7_4 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3000))));
0053ca76      class BSPNODE* ecx_1;
0053ca76      
0053ca76      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
0053ca76      {
0053ca9b          long double x87_r7_6 = -(x87_r6_5);
0053ca9d          (x87_r7_4 - x87_r7_6);
0053ca9f          eax = ((((x87_r7_4 < x87_r7_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r7_6))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r7_6) ? 1 : 0) << 0xe) | 0))));
0053caa1          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0053caa1          
0053caa4          if (p_1)
0053caa4          {
0053cac7              if (this->pos_node->vtable->sphere_intersects_poly(arg2, arg3, arg4, arg5) != 0)
0053cad2                  return;
0053cad2              
0053cad9              this->neg_node->vtable->sphere_intersects_poly(arg2, arg3, arg4, arg5);
0053cae9              return;
0053caa4          }
0053caa4          
0053caa6          ecx_1 = this->neg_node;
0053ca76      }
0053ca76      else
0053ca78          ecx_1 = this->pos_node;
0053ca78      
0053ca83      ecx_1->vtable->sphere_intersects_poly(arg2, arg3, arg4, arg5);
0053ca30  }

0053caec                                      90 90 90 90                                                              ....

0053caf0  int32_t __thiscall BSPNODE::sphere_intersects_solid(class BSPNODE const* this, class CSphere const* arg2, int32_t arg3)

0053caf0  {
0053cafc      int32_t result = CSphere::intersects(&this->sphere, arg2);
0053cafc      
0053cb03      if (result == 0)
0053cb07          return result;
0053cb07      
0053cb1f      long double x87_r7_4 = ((((((long double)this->splitting_plane.N.z) * ((long double)arg2->center.z)) + (((long double)this->splitting_plane.N.y) * ((long double)arg2->center.y))) + (((long double)this->splitting_plane.N.x) * ((long double)arg2->center.x))) + ((long double)this->splitting_plane.d));
0053cb25      long double x87_r6_5 = (((long double)arg2->radius) - ((long double)0.000199999995f));
0053cb2f      (x87_r7_4 - x87_r6_5);
0053cb31      result = ((((x87_r7_4 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3000))));
0053cb31      
0053cb36      if ((*(uint8_t*)((char*)result)[1] & 1) == 0)
0053cb4c          return this->pos_node->vtable->sphere_intersects_solid(arg2, arg3);
0053cb4c      
0053cb4f      long double x87_r6_6 = -(x87_r6_5);
0053cb53      (x87_r7_4 - x87_r6_6);
0053cb55      result = ((((x87_r7_4 < x87_r6_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_6))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_6) ? 1 : 0) << 0xe) | 0x3800))));
0053cb57      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0053cb57      
0053cb5a      if (!(p))
0053cb6e          return this->neg_node->vtable->sphere_intersects_solid(arg2, arg3);
0053cb6e      
0053cb71      long double temp1 = ((long double)0.0);
0053cb71      (x87_r7_4 - temp1);
0053cb77      class BSPNODE* pos_node = this->pos_node;
0053cb7a      result = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0))));
0053cb7a      
0053cb7f      if ((*(uint8_t*)((char*)result)[1] & 1) != 0)
0053cb7f      {
0053cbb4          if (pos_node->vtable->sphere_intersects_solid(arg2, 0) == 0)
0053cbc6              return this->neg_node->vtable->sphere_intersects_solid(arg2, arg3);
0053cb7f      }
0053cb7f      else if (pos_node->vtable->sphere_intersects_solid(arg2, arg3) == 0)
0053cba7          return this->neg_node->vtable->sphere_intersects_solid(arg2, 0);
0053cba7      
0053cb97      return 1;
0053caf0  }

0053cbc9                             90 90 90 90 90 90 90                                                           .......

0053cbd0  void __thiscall BSPNODE::hits_walkable(class BSPNODE const* this, class SPHEREPATH* arg2, class CSphere* arg3, class AC1Legacy::Vector3 const* arg4)

0053cbd0  {
0053cbe3      if (CSphere::intersects(&this->sphere, arg3) == 0)
0053cbe7          return;
0053cbe7      
0053cbff      long double x87_r7_4 = ((((((long double)this->splitting_plane.N.z) * ((long double)arg3->center.z)) + (((long double)this->splitting_plane.N.y) * ((long double)arg3->center.y))) + (((long double)arg3->center.x) * ((long double)this->splitting_plane.N.x))) + ((long double)this->splitting_plane.d));
0053cc05      long double x87_r6_5 = (((long double)arg3->radius) - ((long double)0.000199999995f));
0053cc0f      (x87_r7_4 - x87_r6_5);
0053cc11      int32_t eax;
0053cc11      eax = ((((x87_r7_4 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3000))));
0053cc16      class BSPNODE* ecx_1;
0053cc16      
0053cc16      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
0053cc16      {
0053cc36          long double x87_r7_6 = -(x87_r6_5);
0053cc38          (x87_r7_4 - x87_r7_6);
0053cc3a          eax = ((((x87_r7_4 < x87_r7_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r7_6))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r7_6) ? 1 : 0) << 0xe) | 0))));
0053cc3c          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0053cc3c          
0053cc3f          if (p_1)
0053cc3f          {
0053cc5d              if (this->pos_node->vtable->hits_walkable(arg2, arg3, arg4) != 0)
0053cc68                  return;
0053cc68              
0053cc6b              this->neg_node->vtable->hits_walkable(arg2, arg3, arg4);
0053cc7a              return;
0053cc3f          }
0053cc3f          
0053cc41          ecx_1 = this->neg_node;
0053cc16      }
0053cc16      else
0053cc18          ecx_1 = this->pos_node;
0053cc18      
0053cc23      ecx_1->vtable->hits_walkable(arg2, arg3, arg4);
0053cbd0  }

0053cc7d                                                                                         90 90 90                               ...

0053cc80  void __thiscall BSPNODE::find_walkable(class BSPNODE const* this, class SPHEREPATH* arg2, class CSphere* arg3, class CPolygon const** arg4, class AC1Legacy::Vector3 const* arg5, class AC1Legacy::Vector3 const* arg6, int32_t* arg7)

0053cc80  {
0053cc93      if (CSphere::intersects(&this->sphere, arg3) != 0)
0053cc93      {
0053ccae          long double x87_r7_5 = ((((((long double)this->splitting_plane.N.z) * ((long double)arg3->center.z)) + (((long double)this->splitting_plane.N.y) * ((long double)arg3->center.y))) + (((long double)arg3->center.x) * ((long double)this->splitting_plane.N.x))) + ((long double)this->splitting_plane.d));
0053ccb4          long double x87_r6_6 = (((long double)arg3->radius) - ((long double)0.000199999995f));
0053ccbe          (x87_r7_5 - x87_r6_6);
0053ccc0          int32_t eax;
0053ccc0          eax = ((((x87_r7_5 < x87_r6_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, x87_r6_6))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == x87_r6_6) ? 1 : 0) << 0xe) | 0x3000))));
0053ccc0          
0053ccc5          if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
0053ccc5          {
0053ccc7              this->pos_node->vtable->find_walkable(arg2, arg3, arg4, arg5, arg6, arg7);
0053ccef              return;
0053ccc5          }
0053ccc5          
0053ccf4          long double x87_r7_7 = -(x87_r6_6);
0053ccf6          (x87_r7_5 - x87_r7_7);
0053ccf8          eax = ((((x87_r7_5 < x87_r7_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, x87_r7_7))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == x87_r7_7) ? 1 : 0) << 0xe) | 0))));
0053ccfa          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0053ccfa          
0053ccfd          if (!(p_1))
0053ccfd          {
0053ccff              this->neg_node->vtable->find_walkable(arg2, arg3, arg4, arg5, arg6, arg7);
0053ccef              return;
0053ccfd          }
0053ccfd          
0053cd08          this->pos_node->vtable->find_walkable(arg2, arg3, arg4, arg5, arg6, arg7);
0053cd2c          this->neg_node->vtable->find_walkable(arg2, arg3, arg4, arg5, arg6, arg7);
0053cc93      }
0053cc80  }

0053cd49                             90 90 90 90 90 90 90                                                           .......

0053cd50  int32_t __thiscall BSPNODE::sphere_intersects_solid_poly(class BSPNODE const* this, class CSphere const* arg2, float arg3, int32_t* arg4, class CPolygon const** arg5, int32_t arg6)

0053cd50  {
0053cd5c      int32_t result = CSphere::intersects(&this->sphere, arg2);
0053cd5c      
0053cd63      if (result == 0)
0053cd67          return result;
0053cd67      
0053cd7f      long double x87_r7_4 = ((((((long double)this->splitting_plane.N.z) * ((long double)arg2->center.z)) + (((long double)this->splitting_plane.N.y) * ((long double)arg2->center.y))) + (((long double)arg2->center.x) * ((long double)this->splitting_plane.N.x))) + ((long double)this->splitting_plane.d));
0053cd86      long double x87_r6_5 = (((long double)arg3) - ((long double)0.000199999995f));
0053cd90      (x87_r7_4 - x87_r6_5);
0053cd92      result = ((((x87_r7_4 < x87_r6_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_5))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_5) ? 1 : 0) << 0xe) | 0x3000))));
0053cd97      class BSPNODE* ecx_1;
0053cd97      
0053cd97      if ((*(uint8_t*)((char*)result)[1] & 1) != 0)
0053cd97      {
0053cdbf          long double x87_r6_6 = -(x87_r6_5);
0053cdc3          (x87_r7_4 - x87_r6_6);
0053cdc5          result = ((((x87_r7_4 < x87_r6_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, x87_r6_6))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == x87_r6_6) ? 1 : 0) << 0xe) | 0x3800))));
0053cdc7          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0053cdc7          
0053cdca          if (p_1)
0053cdca          {
0053cdd5              long double temp1 = ((long double)0.0);
0053cdd5              (x87_r7_4 - temp1);
0053cde5              result = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0))));
0053cdf3              int32_t ebx;
0053cdf3              
0053cdf3              if ((*(uint8_t*)((char*)result)[1] & 1) != 0)
0053cdf3              {
0053ce1b                  this->neg_node->vtable->sphere_intersects_solid_poly(arg2, arg3, arg4, arg5, arg6);
0053ce1b                  
0053ce26                  if (*(uint32_t*)arg5 == 0)
0053ce26                  {
0053ce31                      int32_t var_28_1 = 0;
0053ce33                      class CPolygon const** var_2c_1 = arg5;
0053ce34                      int32_t* var_30_1 = arg4;
0053ce35                      int32_t var_34_1 = ebx;
0053ce3e                      return this->pos_node->vtable->sphere_intersects_solid_poly(arg2);
0053ce26                  }
0053cdf3              }
0053cdf3              else
0053cdf3              {
0053cdf5                  this->pos_node->vtable->sphere_intersects_solid_poly(arg2, arg3, arg4, arg5, arg6);
0053cdf5                  
0053ce00                  if (*(uint32_t*)arg5 == 0)
0053ce00                  {
0053ce0b                      int32_t var_28 = 0;
0053ce0d                      class CPolygon const** var_2c = arg5;
0053ce0e                      int32_t* var_30 = arg4;
0053ce0f                      int32_t var_34 = ebx;
0053ce18                      return this->neg_node->vtable->sphere_intersects_solid_poly(arg2);
0053ce00                  }
0053cdf3              }
0053ce48              return *(uint32_t*)arg4;
0053cdca          }
0053cdca          
0053cdcc          ecx_1 = this->neg_node;
0053cd97      }
0053cd97      else
0053cd99          ecx_1 = this->pos_node;
0053cd99      
0053cdbc      return ecx_1->vtable->sphere_intersects_solid_poly(arg2, arg3, arg4, arg5, arg6);
0053cd50  }

0053ce4b                                   90 90 90 90 90                                                             .....

0053ce50  void __thiscall BSPNODE::TraceRay(class BSPNODE const* this, class Ray const* arg2, float* arg3, class Vector3* arg4)

0053ce50  {
0053ce57      long double x87_r7 = ((long double)arg2->length);
0053ce5e      float x = arg2->pt.x;
0053ce65      float y = arg2->pt.y;
0053ce83      float z = arg2->pt.z;
0053ce88      int32_t edi = 2;
0053ce93      float var_58 = ((float)((x87_r7 * ((long double)arg2->dir.x)) + ((long double)arg2->pt.x)));
0053ce9e      float var_54 = ((float)(((long double)((float)(x87_r7 * ((long double)arg2->dir.y)))) + ((long double)arg2->pt.y)));
0053cea9      float var_50 = ((float)(((long double)((float)(x87_r7 * ((long double)arg2->dir.z)))) + ((long double)arg2->pt.z)));
0053cec5      long double x87_r7_11 = ((((((long double)z) * ((long double)this->splitting_plane.N.z)) + (((long double)y) * ((long double)this->splitting_plane.N.y))) + (((long double)x) * ((long double)this->splitting_plane.N.x))) + ((long double)this->splitting_plane.d));
0053cec8      long double temp1 = ((long double)0.100000001f);
0053cec8      (x87_r7_11 - temp1);
0053cece      float eax_1;
0053cece      eax_1 = ((((x87_r7_11 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0053ced3      int32_t var_68;
0053ced3      int32_t ebx;
0053ced3      
0053ced3      if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) != 0)
0053ced3      {
0053cee5          var_68 = 1;
0053ceed          long double x87_r6_9 = -(((long double)0.100000001f));
0053cef1          (x87_r7_11 - x87_r6_9);
0053cef3          eax_1 = ((((x87_r7_11 < x87_r6_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, x87_r6_9))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == x87_r6_9) ? 1 : 0) << 0xe) | 0))));
0053cef5          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053cef5          
0053cef8          if (p_1)
0053cefa              var_68 = 2;
0053cefa          
0053cefe          ebx = var_68;
0053ced3      }
0053ced3      else
0053ced3      {
0053ced5          ebx = 0;
0053ced9          var_68 = 0;
0053ced3      }
0053ced3      
0053cf1a      long double x87_r7_17 = ((((((long double)var_50) * ((long double)this->splitting_plane.N.z)) + (((long double)var_54) * ((long double)this->splitting_plane.N.y))) + (((long double)var_58) * ((long double)this->splitting_plane.N.x))) + ((long double)this->splitting_plane.d));
0053cf1d      long double temp2 = ((long double)0.100000001f);
0053cf1d      (x87_r7_17 - temp2);
0053cf23      eax_1 = ((((x87_r7_17 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp2) ? 1 : 0) << 0xe) | 0x3800))));
0053cf23      
0053cf28      if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) != 0)
0053cf28      {
0053cf36          long double x87_r6_16 = -(((long double)0.100000001f));
0053cf3a          (x87_r7_17 - x87_r6_16);
0053cf3c          eax_1 = ((((x87_r7_17 < x87_r6_16) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, x87_r6_16))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == x87_r6_16) ? 1 : 0) << 0xe) | 0))));
0053cf3e          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0053cf3e          
0053cf41          if (!(p_2))
0053cf43              edi = 1;
0053cf28      }
0053cf28      else
0053cf2c          edi = 0;
0053cf2c      
0053cf48      class BSPNODE* pos_node = this->pos_node;
0053cf48      
0053cf57      if ((pos_node != 0 && (ebx != 1 && edi != 1)))
0053cf57      {
0053cf60          pos_node->vtable->TraceRay(arg2, arg3, arg4);
0053cf79          return;
0053cf57      }
0053cf57      
0053cf7c      class BSPNODE* neg_node = this->neg_node;
0053cf7c      
0053cf89      if ((neg_node != 0 && (ebx != 0 && edi != 0)))
0053cf89      {
0053cf92          neg_node->vtable->TraceRay(arg2, arg3, arg4);
0053cfaa          return;
0053cf89      }
0053cf89      
0053cfb0      class BSPNODE* ebx_1;
0053cfb0      
0053cfb0      if (ebx == 1)
0053cfb8          ebx_1 = neg_node;
0053cfb0      else
0053cfb0      {
0053cfb2          ebx_1 = pos_node;
0053cfb4          pos_node = neg_node;
0053cfb0      }
0053cfb0      
0053cfbe      float y_1 = Vector3_ZeroVector__.y;
0053cfc6      float x_1 = Vector3_ZeroVector__.x;
0053cfd0      float z_1 = Vector3_ZeroVector__.z;
0053cfd9      float y_2 = y_1;
0053cfdd      float y_3 = y_1;
0053cfe1      float x_2 = x_1;
0053cfe7      float x_3 = x_1;
0053cff7      float z_2 = z_1;
0053cffb      float z_3 = z_1;
0053cfff      int32_t var_4 = 0x461c4000;
0053d003      long double x87_r7_22 = (((((long double)z) * ((long double)this->splitting_plane.N.z)) + (((long double)y) * ((long double)this->splitting_plane.N.y))) + (((long double)x) * ((long double)this->splitting_plane.N.x)));
0053d005      float var_6c = 0f;
0053d00d      arg2 = nullptr;
0053d018      long double x87_r7_23 = (x87_r7_22 + ((long double)this->splitting_plane.d));
0053d038      long double x87_r6_27 = (x87_r7_23 - ((((((long double)var_50) * ((long double)this->splitting_plane.N.z)) + (((long double)var_54) * ((long double)this->splitting_plane.N.y))) + (((long double)var_58) * ((long double)this->splitting_plane.N.x))) + ((long double)this->splitting_plane.d)));
0053d03c      long double x87_r5_8 = fabsl(x87_r6_27);
0053d03e      long double x87_r4 = ((long double)0.000199999995f);
0053d044      (x87_r4 - x87_r5_8);
0053d046      y_1 = ((((x87_r4 < x87_r5_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4, x87_r5_8))) ? 1 : 0) << 0xa) | ((((x87_r4 == x87_r5_8) ? 1 : 0) << 0xe) | 0x3000))));
0053d048      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0053d048      
0053d04b      if (!(p_3))
0053d051          arg2 = ((float)(x87_r7_23 / x87_r6_27));
0053d051      
0053d076      float var_2c = ((float)(((long double)var_50) - ((long double)z)));
0053d083      float var_40 = ((float)((((long double)var_58) - ((long double)x)) * ((long double)arg2)));
0053d0a1      float var_4c = ((float)(((long double)var_40) + ((long double)x)));
0053d0ab      float var_34 = var_4c;
0053d0b3      float var_48_1 = ((float)(((((long double)var_54) - ((long double)y)) * ((long double)arg2)) + ((long double)y)));
0053d0bb      float var_30 = var_48_1;
0053d0cc      float var_44_1 = ((float)((((long double)var_2c) * ((long double)arg2)) + ((long double)z)));
0053d0d8      float var_2c_1 = var_44_1;
0053d0ff      float var_38 = ((float)(((long double)var_44_1) - ((long double)z)));
0053d103      var_40 = ((float)(((long double)var_4c) - ((long double)x)));
0053d107      float var_3c = ((float)(((long double)var_48_1) - ((long double)y)));
0053d10b      Ray::InitFromOffset(&x_2, &x, &var_40);
0053d10b      
0053d119      if ((ebx_1 != 0 && ebx_1->vtable->TraceRay(&x_2, &var_6c, arg4) == 1))
0053d119      {
0053d14c          *(uint32_t*)arg3 = ((float)(((long double)arg2) * ((long double)var_6c)));
0053d152          long double x87_r7_37 = fabsl(((long double)var_6c));
0053d154          long double temp3 = ((long double)0.000199999995f);
0053d154          (x87_r7_37 - temp3);
0053d15a          float* eax_7;
0053d15a          eax_7 = ((((x87_r7_37 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_37, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_37 == temp3) ? 1 : 0) << 0xe) | 0))));
0053d15c          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
0053d15c          
0053d15f          if (!(p_4))
0053d15f          {
0053d166              if (var_68 != 1)
0053d166              {
0053d16a                  arg4->x = this->splitting_plane.N.x;
0053d16f                  arg4->y = this->splitting_plane.N.y;
0053d175                  arg4->z = this->splitting_plane.N.z;
0053d184                  return;
0053d166              }
0053d166              
0053d198              float var_48_2 = ((float)-(((long double)this->splitting_plane.N.y)));
0053d1a5              arg4->x = ((float)-(((long double)this->splitting_plane.N.x)));
0053d1a7              float var_44_2 = ((float)-(((long double)this->splitting_plane.N.z)));
0053d1af              arg4->y = var_48_2;
0053d1b2              arg4->z = var_44_2;
0053d15f          }
0053d15f          
0053d1c1          return;
0053d119      }
0053d119      
0053d1f0      float var_38_1 = ((float)(((long double)var_50) - ((long double)var_44_1)));
0053d1f4      var_40 = ((float)(((long double)var_58) - ((long double)var_4c)));
0053d1fc      float var_3c_1 = ((float)(((long double)var_54) - ((long double)var_48_1)));
0053d200      Ray::InitFromOffset(&x_2, &var_34, &var_40);
0053d200      
0053d207      if ((pos_node != 0 && pos_node->vtable->TraceRay(&x_2, &var_6c, arg4) == 1))
0053d207      {
0053d248          *(uint32_t*)arg3 = ((float)(((((long double)1f) - ((long double)arg2)) * ((long double)var_6c)) + ((long double)arg2)));
0053d24e          long double x87_r7_52 = fabsl(((long double)var_6c));
0053d250          long double temp4 = ((long double)0.000199999995f);
0053d250          (x87_r7_52 - temp4);
0053d256          int32_t eax_12;
0053d256          eax_12 = ((((x87_r7_52 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_52, temp4))) ? 1 : 0) << 0xa) | ((((x87_r7_52 == temp4) ? 1 : 0) << 0xe) | 0))));
0053d258          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
0053d258          
0053d25b          if (!(p_5))
0053d25b          {
0053d262              if (var_68 != 1)
0053d262              {
0053d266                  arg4->x = this->splitting_plane.N.x;
0053d26b                  arg4->y = this->splitting_plane.N.y;
0053d271                  arg4->z = this->splitting_plane.N.z;
0053d280                  return;
0053d262              }
0053d262              
0053d294              float var_48_3 = ((float)-(((long double)this->splitting_plane.N.y)));
0053d2a1              arg4->x = ((float)-(((long double)this->splitting_plane.N.x)));
0053d2a3              float var_44_3 = ((float)-(((long double)this->splitting_plane.N.z)));
0053d2ab              arg4->y = var_48_3;
0053d2ae              arg4->z = var_44_3;
0053d25b          }
0053d25b          
0053d2bd          return;
0053d207      }
0053d207      
0053d2ca      *(uint32_t*)arg3 = 1f;
0053ce50  }

0053d2d9                                                                             90 90 90 90 90 90 90                           .......

0053d2e0  void* __thiscall BSPNODE::`scalar deleting destructor'(class BSPNODE* this, uint32_t arg2)

0053d2e0  {
0053d2e3      class BSPNODE* pos_node = this->pos_node;
0053d2eb      this->vtable = 0x7c9af0;
0053d2eb      
0053d2f1      if (pos_node != 0)
0053d2f1      {
0053d2f3          pos_node->vtable->__vecDelDtor(1);
0053d2f9          this->pos_node = nullptr;
0053d2f1      }
0053d2f1      
0053d2fc      class CPolygon** in_polys = this->in_polys;
0053d2fc      
0053d301      if (in_polys != 0)
0053d301      {
0053d304          operator delete[](in_polys);
0053d30c          this->in_polys = nullptr;
0053d301      }
0053d301      
0053d30f      class BSPNODE* neg_node = this->neg_node;
0053d314      this->num_polys = 0;
0053d314      
0053d317      if (neg_node != 0)
0053d317      {
0053d319          neg_node->vtable->__vecDelDtor(1);
0053d31f          this->neg_node = nullptr;
0053d317      }
0053d317      
0053d327      __builtin_strncpy(&this->__inner2, "####", 4);
0053d327      
0053d32e      if ((arg2 & 1) != 0)
0053d331          operator delete(this);
0053d331      
0053d33d      return this;
0053d2e0  }


0053d340  void __thiscall BSPNODE::DetachPortalsAndPurgeNodes(class BSPNODE* this, class SmartArray<BSPNODE *,1>* arg2)

0053d340  {
0053d349      class BSPNODE* pos_node = this->pos_node;
0053d349      
0053d351      if (pos_node != 0)
0053d351      {
0053d354          BSPNODE::DetachPortalsAndPurgeNodes(pos_node, arg2);
0053d359          class BSPNODE* pos_node_1 = this->pos_node;
0053d359          
0053d362          if (pos_node_1->__inner2 == 0x504f5254)
0053d373              SmartArray<unsigned long,1>::AddToEnd(arg2, &this->pos_node);
0053d362          else if (pos_node_1 != 0)
0053d368              pos_node_1->vtable->__vecDelDtor(1);
0053d368          
0053d34e          this->pos_node = nullptr;
0053d351      }
0053d351      
0053d37e      class BSPNODE* neg_node = this->neg_node;
0053d37e      
0053d386      if (neg_node != 0)
0053d386      {
0053d389          BSPNODE::DetachPortalsAndPurgeNodes(neg_node, arg2);
0053d38e          class BSPNODE* neg_node_1 = this->neg_node;
0053d38e          
0053d397          if (neg_node_1->__inner2 == 0x504f5254)
0053d3b2              SmartArray<unsigned long,1>::AddToEnd(arg2, &this->neg_node);
0053d397          else if (neg_node_1 != 0)
0053d39b          {
0053d39d              neg_node_1->vtable->__vecDelDtor(1);
0053d383              this->neg_node = nullptr;
0053d3ac              return;
0053d39b          }
0053d39b          
0053d383          this->neg_node = nullptr;
0053d386      }
0053d340  }

0053d3c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0053d3d0  void __fastcall BSPLEAF::BSPLEAF(class BSPLEAF* this)

0053d3d0  {
0053d3d3      BSPNODE::BSPNODE(this);
0053d3d8      this->vtable = 0x7c9ba4;
0053d3de      this->leaf_index = 0xffffffff;
0053d3e5      this->solid = 0;
0053d3d0  }


0053d3f0  int32_t __fastcall BSPLEAF::point_intersects_solid(class BSPLEAF const* this, class AC1Legacy::Vector3 const* arg2)

0053d3f0  {
0053d3f7      int32_t result;
0053d3f7      result = this->num_polys != 0;
0053d3fa      return result;
0053d3f0  }

0053d3fd                                                                                         90 90 90                               ...

0053d400  uint32_t __thiscall BSPLEAF::PackLeaf(class BSPLEAF* this, void** arg2, uint32_t arg3)

0053d400  {
0053d410      int32_t result = 4;
0053d410      
0053d415      if (BSPNODE::pack_tree_type == PHYSICS_BSP)
0053d41a          result = ((this->num_polys * 2) + 0x1c);
0053d41a      
0053d424      if (arg3 >= result)
0053d424      {
0053d431          **(uint32_t**)arg2 = this->leaf_index;
0053d435          void* eax_2 = (*(uint32_t*)arg2 + 4);
0053d438          *(uint32_t*)arg2 = eax_2;
0053d438          
0053d440          if (BSPNODE::pack_tree_type == PHYSICS_BSP)
0053d440          {
0053d445              *(uint32_t*)eax_2 = this->solid;
0053d451              *(uint32_t*)arg2 += 4;
0053d453              CSphere::Pack(&this->sphere, arg2, arg3);
0053d45d              **(uint32_t**)arg2 = this->num_polys;
0053d45f              *(uint32_t*)arg2 += 4;
0053d465              int32_t i = 0;
0053d465              
0053d469              if (this->num_polys > 0)
0053d469              {
0053d488                  do
0053d488                  {
0053d476                      void* ecx_4;
0053d476                      ecx_4 = this->in_polys[i]->poly_id;
0053d47c                      **(uint16_t**)arg2 = ecx_4;
0053d47f                      *(uint32_t*)arg2 += 2;
0053d485                      i += 1;
0053d488                  } while (i < this->num_polys);
0053d469              }
0053d440          }
0053d424      }
0053d424      
0053d490      return result;
0053d400  }

0053d46d                                         8d 49 00                                                               .I.
0053d493                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0053d4a0  int32_t __thiscall BSPLEAF::UnPackLeaf(class BSPLEAF* this, void** arg2, uint32_t arg3)

0053d4a0  {
0053d4ac      this->leaf_index = **(uint32_t**)arg2;
0053d4b1      void* edx_1 = (*(uint32_t*)arg2 + 4);
0053d4b4      *(uint32_t*)arg2 = edx_1;
0053d4b4      
0053d4bf      if (BSPNODE::pack_tree_type == PHYSICS_BSP)
0053d4bf      {
0053d4cb          this->solid = *(uint32_t*)edx_1;
0053d4d0          void* edx_4 = (*(uint32_t*)arg2 + 4);
0053d4d6          *(uint32_t*)arg2 = edx_4;
0053d4d8          void* eax_2 = edx_4;
0053d4d8          
0053d4da          if (arg3 >= 0xc)
0053d4da          {
0053d4de              this->sphere.center.x = *(uint32_t*)eax_2;
0053d4e3              void* edx_6 = (*(uint32_t*)arg2 + 4);
0053d4e6              *(uint32_t*)arg2 = edx_6;
0053d4ec              this->sphere.center.y = *(uint32_t*)edx_6;
0053d4f1              void* ecx_4 = (*(uint32_t*)arg2 + 4);
0053d4f4              *(uint32_t*)arg2 = ecx_4;
0053d4fa              this->sphere.center.z = *(uint32_t*)ecx_4;
0053d4ff              eax_2 = (*(uint32_t*)arg2 + 4);
0053d502              *(uint32_t*)arg2 = eax_2;
0053d4da          }
0053d4da          
0053d506          this->sphere.radius = *(uint32_t*)eax_2;
0053d50b          void* eax_9 = (*(uint32_t*)arg2 + 4);
0053d50e          *(uint32_t*)arg2 = eax_9;
0053d512          this->num_polys = *(uint32_t*)eax_9;
0053d515          *(uint32_t*)arg2 += 4;
0053d518          uint32_t num_polys = this->num_polys;
0053d518          
0053d51d          if (num_polys > 0)
0053d51d          {
0053d527              void* eax_10;
0053d527              class CPolygon** edx_9;
0053d527              eax_10 = operator new[]((num_polys << 2));
0053d52c              uint32_t num_polys_1 = this->num_polys;
0053d52f              this->in_polys = eax_10;
0053d535              int32_t i = 0;
0053d535              
0053d539              if (num_polys_1 > 0)
0053d539              {
0053d567                  do
0053d567                  {
0053d540                      void* ecx_6 = *(uint32_t*)arg2;
0053d542                      edx_9 = *(uint16_t*)ecx_6;
0053d548                      *(uint32_t*)arg2 = ((char*)ecx_6 + 2);
0053d55b                      this->in_polys[i] = &BSPNODE::pack_poly[((int32_t)edx_9)];
0053d564                      i += 1;
0053d567                  } while (i < this->num_polys);
0053d539              }
0053d51d          }
0053d4bf      }
0053d4bf      
0053d570      return 1;
0053d4a0  }

0053d53d                                                                                         8d 49 00                               .I.
0053d573                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0053d580  int32_t __thiscall BSPLEAF::sphere_intersects_poly(class BSPLEAF const* this, class CSphere const* arg2, class AC1Legacy::Vector3 const* arg3, class CPolygon const** arg4, class AC1Legacy::Vector3* arg5)

0053d580  {
0053d584      uint32_t num_polys = this->num_polys;
0053d584      
0053d589      if ((num_polys != 0 && CSphere::intersects(&this->sphere, arg2) != 0))
0053d589      {
0053d5a5          int32_t i = 0;
0053d5a5          
0053d5a9          if (num_polys > 0)
0053d5a9          {
0053d5d4              do
0053d5d4              {
0053d5cc                  if (CPolygon::pos_hits_sphere(this->in_polys[i], arg2, arg3, arg5, arg4) != 0)
0053d5e8                      return 1;
0053d5e8                  
0053d5d1                  i += 1;
0053d5d4              } while (i < this->num_polys);
0053d5a9          }
0053d589      }
0053d589      
0053d5a0      return 0;
0053d580  }

0053d5eb                                   90 90 90 90 90                                                             .....

0053d5f0  int32_t __thiscall BSPLEAF::sphere_intersects_solid(class BSPLEAF const* this, class CSphere const* arg2, int32_t arg3)

0053d5f0  {
0053d5f4      uint32_t num_polys = this->num_polys;
0053d5f4      
0053d5f9      if (num_polys == 0)
0053d5ff          return 0;
0053d5ff      
0053d60f      if ((arg3 != 0 && this->solid != 0))
0053d618          return 1;
0053d618      
0053d62c      if (CSphere::intersects(&this->sphere, arg2) != 0)
0053d62c      {
0053d62e          int32_t i = 0;
0053d62e          
0053d632          if (num_polys > 0)
0053d632          {
0053d64a              do
0053d64a              {
0053d642                  if (CPolygon::hits_sphere(this->in_polys[i], arg2) != 0)
0053d65e                      return 1;
0053d65e                  
0053d647                  i += 1;
0053d64a              } while (i < this->num_polys);
0053d632          }
0053d62c      }
0053d62c      
0053d652      return 0;
0053d5f0  }

0053d661     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0053d670  int32_t __thiscall BSPLEAF::hits_walkable(class BSPLEAF const* this, class SPHEREPATH* arg2, class CSphere* arg3, class AC1Legacy::Vector3 const* arg4)

0053d670  {
0053d674      uint32_t num_polys = this->num_polys;
0053d674      
0053d679      if (num_polys == 0)
0053d67f          return 0;
0053d67f      
0053d693      if (CSphere::intersects(&this->sphere, arg3) != 0)
0053d693      {
0053d695          int32_t i = 0;
0053d695          
0053d699          if (num_polys > 0)
0053d699          {
0053d6cd              do
0053d6cd              {
0053d6b4                  if ((CPolygon::walkable_hits_sphere(this->in_polys[i], arg2, arg3, arg4) != 0 && CPolygon::check_small_walkable(this->in_polys[i], arg3, arg4) != 0))
0053d6e1                      return 1;
0053d6e1                  
0053d6ca                  i += 1;
0053d6cd              } while (i < this->num_polys);
0053d699          }
0053d693      }
0053d693      
0053d6d5      return 0;
0053d670  }

0053d6e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0053d6f0  void __thiscall BSPLEAF::find_walkable(class BSPLEAF const* this, class SPHEREPATH* arg2, class CSphere* arg3, class CPolygon const** arg4, class AC1Legacy::Vector3 const* arg5, class AC1Legacy::Vector3 const* arg6, int32_t* arg7)

0053d6f0  {
0053d6f4      uint32_t num_polys = this->num_polys;
0053d6f4      
0053d6f9      if ((num_polys != 0 && CSphere::intersects(&this->sphere, arg3) != 0))
0053d6f9      {
0053d70e          int32_t i = 0;
0053d70e          
0053d712          if (num_polys > 0)
0053d712          {
0053d768              do
0053d768              {
0053d734                  if ((CPolygon::walkable_hits_sphere(this->in_polys[i], arg2, arg3, arg6) != 0 && CPolygon::adjust_sphere_to_plane(this->in_polys[i], arg2, arg3, arg5) != 0))
0053d734                  {
0053d750                      *(uint32_t*)arg7 = 1;
0053d760                      *(uint32_t*)arg4 = this->in_polys[i];
0053d734                  }
0053d734                  
0053d765                  i += 1;
0053d768              } while (i < this->num_polys);
0053d712          }
0053d6f9      }
0053d6f0  }

0053d71a                                                                                8d 9b 00 00 00 00                            ......
0053d771                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0053d780  int32_t __thiscall BSPLEAF::sphere_intersects_solid_poly(class BSPLEAF const* this, class CSphere const* arg2, float arg3, int32_t* arg4, class CPolygon const** arg5, int32_t arg6)

0053d780  {
0053d788      if (this->num_polys == 0)
0053d78d          return 0;
0053d78d      
0053d7a4      if ((arg6 != 0 && this->solid != 0))
0053d7a6          *(uint32_t*)arg4 = 1;
0053d7a6      
0053d7bc      if (CSphere::intersects(&this->sphere, arg2) != 0)
0053d7bc      {
0053d7c1          int32_t i = 0;
0053d7c1          
0053d7c5          if (this->num_polys > 0)
0053d7c5          {
0053d7dd              do
0053d7dd              {
0053d7d5                  if (CPolygon::hits_sphere(this->in_polys[i], arg2) != 0)
0053d7d5                  {
0053d7f6                      *(uint32_t*)arg5 = this->in_polys[i];
0053d7fe                      return 1;
0053d7d5                  }
0053d7d5                  
0053d7da                  i += 1;
0053d7dd              } while (i < this->num_polys);
0053d7c5          }
0053d7bc      }
0053d7bc      
0053d7e6      return *(uint32_t*)arg4;
0053d780  }

0053d801     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0053d810  void* __thiscall BSPLEAF::`scalar deleting destructor'(class BSPLEAF* this, uint32_t arg2)

0053d810  {
0053d813      this->vtable = 0x7c9ba4;
0053d819      this->leaf_index = 0xffffffff;
0053d820      BSPNODE::Destroy(this);
0053d827      BSPNODE::~BSPNODE(this);
0053d827      
0053d831      if ((arg2 & 1) != 0)
0053d834          operator delete(this);
0053d834      
0053d83f      return this;
0053d810  }

0053d842        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0053d850  void __fastcall BSPPORTAL::BSPPORTAL(class BSPPORTAL* this)

0053d850  {
0053d853      BSPNODE::BSPNODE(this);
0053d85a      this->num_portals = 0;
0053d85d      this->in_portals = nullptr;
0053d860      this->vtable = 0x7c9c00;
0053d850  }

0053d86a                                90 90 90 90 90 90                                                            ......

0053d870  void __thiscall BSPPORTAL::portal_draw_portals_only(class BSPPORTAL* this, int32_t arg2)

0053d870  {
0053d870      int32_t ebx;
0053d870      int32_t var_4 = ebx;
0053d875      int32_t esi;
0053d875      int32_t var_8 = esi;
0053d876      int32_t edi;
0053d876      int32_t var_c = edi;
0053d877      class BSPPORTAL* this_1 = this;
0053d879      int32_t* esp_1 = &var_c;
0053d879      
0053d880      while (true)
0053d880      {
0053d880          struct frameContext* Render::FrameCurrent_1 = Render::FrameCurrent;
0053d898          long double x87_r7_4 = (((((long double)Render::FrameCurrent_1->viewer.viewpoint.z) * ((long double)this_1->splitting_plane.N.z)) + (((long double)Render::FrameCurrent_1->viewer.viewpoint.y) * ((long double)this_1->splitting_plane.N.y))) + (((long double)this_1->splitting_plane.N.x) * ((long double)Render::FrameCurrent_1->viewer.viewpoint.x)));
0053d89a          long double x87_r7_5 = (x87_r7_4 + ((long double)this_1->splitting_plane.d));
0053d89d          long double temp1_1 = ((long double)0.000199999995f);
0053d89d          (x87_r7_5 - temp1_1);
0053d8a3          Render::FrameCurrent_1 = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0053d8a8          int32_t eax_1;
0053d8a8          
0053d8a8          if ((*(uint8_t*)((char*)Render::FrameCurrent_1)[1] & 0x41) != 0)
0053d8a8          {
0053d8ba              (x87_r7_5 - -(((long double)0.000199999995f)));
0053d8be              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0053d8c1              eax_1 = 1;
0053d8c1              
0053d8c6              if (p_1)
0053d8c8                  eax_1 = 2;
0053d8a8          }
0053d8a8          else
0053d8ac              eax_1 = 0;
0053d8ac          
0053d8d0          class BSPNODE* this_2;
0053d8d0          
0053d8d0          if (eax_1 == 0)
0053d8d0          {
0053d963              class BSPNODE* neg_node = this_1->neg_node;
0053d963              
0053d968              if (neg_node != 0)
0053d968              {
0053d96a                  union __inner2_2 = neg_node->__inner2;
0053d96a                  
0053d972                  if (__inner2_2 != 0x4c454146)
0053d972                  {
0053d979                      *(uint32_t*)((char*)esp_1 - 4) = arg2;
0053d979                      esp_1 -= 4;
0053d979                      
0053d97a                      if (__inner2_2 == 0x504f5254)
0053d983                          BSPPORTAL::portal_draw_portals_only();
0053d97a                      else
0053d97a                      {
0053d97c                          BSPNODE::build_draw_portals_only();
0053d97c                          esp_1 = &esp_1[1];
0053d97a                      }
0053d972                  }
0053d968              }
0053d968              
0053d98b              int32_t i = 0;
0053d98b              
0053d98f              if (this_1->num_portals > 0)
0053d98f              {
0053d9ac                  do
0053d9ac                  {
0053d99a                      int32_t edx_4 = this_1->in_portals[i];
0053d99d                      struct RenderDevice::VTable* vtable_1 = RenderDevice::render_device->vtable;
0053d99f                      *(uint32_t*)((char*)esp_1 - 4) = arg2;
0053d9a0                      *(uint32_t*)((char*)esp_1 - 8) = 1;
0053d9a2                      *(uint32_t*)((char*)esp_1 - 0xc) = edx_4;
0053d9a3                      vtable_1->DrawPortal();
0053d9a9                      i += 1;
0053d9ac                  } while (i < this_1->num_portals);
0053d98f              }
0053d98f              
0053d9ae              this_2 = this_1->pos_node;
0053d8d0          }
0053d8d0          else if (eax_1 == 1)
0053d8d7          {
0053d913              class BSPNODE* pos_node_1 = this_1->pos_node;
0053d913              
0053d918              if (pos_node_1 != 0)
0053d918              {
0053d91a                  union __inner2_1 = pos_node_1->__inner2;
0053d91a                  
0053d922                  if (__inner2_1 != 0x4c454146)
0053d922                  {
0053d929                      *(uint32_t*)((char*)esp_1 - 4) = arg2;
0053d929                      esp_1 -= 4;
0053d929                      
0053d92a                      if (__inner2_1 == 0x504f5254)
0053d933                          BSPPORTAL::portal_draw_portals_only();
0053d92a                      else
0053d92a                      {
0053d92c                          BSPNODE::build_draw_portals_only();
0053d92c                          esp_1 = &esp_1[1];
0053d92a                      }
0053d922                  }
0053d918              }
0053d918              
0053d93b              int32_t i_1 = 0;
0053d93b              
0053d93f              if (this_1->num_portals > 0)
0053d93f              {
0053d95c                  do
0053d95c                  {
0053d94a                      int32_t edx_2 = this_1->in_portals[i_1];
0053d94d                      struct RenderDevice::VTable* vtable = RenderDevice::render_device->vtable;
0053d94f                      *(uint32_t*)((char*)esp_1 - 4) = arg2;
0053d950                      *(uint32_t*)((char*)esp_1 - 8) = 1;
0053d952                      *(uint32_t*)((char*)esp_1 - 0xc) = edx_2;
0053d953                      vtable->DrawPortal();
0053d959                      i_1 += 1;
0053d95c                  } while (i_1 < this_1->num_portals);
0053d93f              }
0053d93f              
0053d95e              this_2 = this_1->neg_node;
0053d8d7          }
0053d8d7          else
0053d8d7          {
0053d8da              if (eax_1 != 2)
0053d8da                  goto label_53d9d3;
0053d8da              
0053d8e0              class BSPNODE* pos_node = this_1->pos_node;
0053d8e0              
0053d8e5              if (pos_node == 0)
0053d90b                  this_2 = this_1->neg_node;
0053d8e5              else
0053d8e5              {
0053d8e7                  union __inner2 = pos_node->__inner2;
0053d8e7                  
0053d8ef                  if (__inner2 == 0x4c454146)
0053d90b                      this_2 = this_1->neg_node;
0053d8ef                  else
0053d8ef                  {
0053d8f6                      *(uint32_t*)((char*)esp_1 - 4) = arg2;
0053d8f6                      esp_1 -= 4;
0053d8f6                      
0053d8f7                      if (__inner2 == 0x504f5254)
0053d8f7                      {
0053d906                          BSPPORTAL::portal_draw_portals_only();
0053d90b                          this_2 = this_1->neg_node;
0053d8f7                      }
0053d8f7                      else
0053d8f7                      {
0053d8f9                          BSPNODE::build_draw_portals_only();
0053d8f9                          esp_1 = &esp_1[1];
0053d8fe                          this_2 = this_1->neg_node;
0053d8f7                      }
0053d8ef                  }
0053d8e5              }
0053d8d7          }
0053d8d7          
0053d9b3          if (this_2 == 0)
0053d9b3              goto label_53d9d3;
0053d9b3          
0053d9b5          union __inner2_3 = this_2->__inner2;
0053d9b5          
0053d9bd          if (__inner2_3 == 0x4c454146)
0053d9bd              goto label_53d9d3;
0053d9bd          
0053d9c4          if (__inner2_3 != 0x504f5254)
0053d9c4          {
0053d9cd              *(uint32_t*)((char*)esp_1 - 4) = arg2;
0053d9ce              BSPNODE::build_draw_portals_only();
0053d9d3          label_53d9d3:
0053d9d3              *(uint32_t*)esp_1;
0053d9d3              esp_1[1];
0053d9d3              esp_1[2];
0053d9d6              return;
0053d9c4          }
0053d9c4          
0053d9c6          this_1 = this_2;
0053d880      }
0053d870  }

0053d9d9                                                                             90 90 90 90 90 90 90                           .......

0053d9e0  void __fastcall BSPPORTAL::Destroy(class BSPPORTAL* this)

0053d9e0  {
0053d9e8      if (this->in_portals != 0)
0053d9e8      {
0053d9ee          int32_t i = 0;
0053d9ee          
0053d9f2          if (this->num_portals > 0)
0053d9f2          {
0053da15              do
0053da15              {
0053d9f8                  class CPortalPoly* edi_1 = this->in_portals[i];
0053d9f8                  
0053d9fd                  if (edi_1 != 0)
0053d9fd                  {
0053da01                      CPortalPoly::~CPortalPoly(edi_1);
0053da07                      operator delete(edi_1);
0053d9fd                  }
0053d9fd                  
0053da12                  i += 1;
0053da15              } while (i < this->num_portals);
0053d9f2          }
0053d9f2          
0053da1c          operator delete[](this->in_portals);
0053da24          this->in_portals = nullptr;
0053d9e8      }
0053d9e8      
0053da2c      this->num_portals = 0;
0053da36      /* tailcall */
0053da36      return BSPNODE::Destroy(this);
0053d9e0  }

0053da3b                                                                                   90 90 90 90 90                             .....

0053da40  uint32_t __fastcall BSPPORTAL::pack_portal_size(class BSPPORTAL* this)

0053da40  {
0053da40      class BSPPORTAL* this_1 = this;
0053da45      class BSPNODE* pos_node = this->pos_node;
0053da50      this_1 = nullptr;
0053da72      int32_t result = ((BSPNODE::PackChild(pos_node, &this_1, 0) + 0x10) + BSPNODE::PackChild(this->neg_node, &this_1, 0));
0053da72      
0053da7e      if (BSPNODE::pack_tree_type != DRAWING_BSP)
0053da96          return result;
0053da96      
0053da90      return (result + (((this->num_polys + (this->num_portals << 1)) + 0xc) << 1));
0053da40  }

0053da97                                                                       90 90 90 90 90 90 90 90 90                         .........

0053daa0  uint32_t __thiscall BSPPORTAL::PackPortal(class BSPPORTAL* this, void** arg2, uint32_t arg3)

0053daa0  {
0053daa5      uint32_t result = BSPPORTAL::pack_portal_size(this);
0053daa5      
0053dab2      if (arg3 >= result)
0053dab2      {
0053dac2          CSphere::Pack(&this->splitting_plane.N.x, arg2, arg3);
0053dacd          BSPNODE::PackChild(this->pos_node, arg2, arg3);
0053dad8          BSPNODE::PackChild(this->neg_node, arg2, arg3);
0053dad8          
0053dae7          if (BSPNODE::pack_tree_type == DRAWING_BSP)
0053dae7          {
0053daee              CSphere::Pack(&this->sphere, arg2, arg3);
0053daf8              **(uint32_t**)arg2 = this->num_polys;
0053dafc              void* ebx_2 = (*(uint32_t*)arg2 + 4);
0053daff              *(uint32_t*)arg2 = ebx_2;
0053db06              *(uint32_t*)ebx_2 = this->num_portals;
0053db08              *(uint32_t*)arg2 += 4;
0053db0e              int32_t i = 0;
0053db0e              
0053db12              if (this->num_polys > 0)
0053db12              {
0053db2c                  do
0053db2c                  {
0053db1a                      void* ecx_5;
0053db1a                      ecx_5 = this->in_polys[i]->poly_id;
0053db20                      **(uint16_t**)arg2 = ecx_5;
0053db23                      *(uint32_t*)arg2 += 2;
0053db29                      i += 1;
0053db2c                  } while (i < this->num_polys);
0053db12              }
0053db12              
0053db31              int32_t i_1 = 0;
0053db31              
0053db35              if (this->num_portals > 0)
0053db35              {
0053db65                  do
0053db65                  {
0053db40                      void* edx_5;
0053db40                      edx_5 = this->in_portals[i_1]->portal->poly_id;
0053db46                      **(uint16_t**)arg2 = edx_5;
0053db4b                      void* ecx_11 = (*(uint32_t*)arg2 + 2);
0053db4e                      *(uint32_t*)arg2 = ecx_11;
0053db56                      int16_t* edx_7;
0053db56                      edx_7 = this->in_portals[i_1]->portal_index;
0053db59                      *(uint16_t*)ecx_11 = edx_7;
0053db5c                      *(uint32_t*)arg2 += 2;
0053db62                      i_1 += 1;
0053db65                  } while (i_1 < this->num_portals);
0053db35              }
0053dae7          }
0053dab2      }
0053dab2      
0053db6d      return result;
0053daa0  }


0053db70  int32_t __thiscall BSPPORTAL::UnPackPortal(class BSPPORTAL* this, void** arg2, uint32_t arg3)

0053db70  {
0053db7e      void* ebp = *(uint32_t*)arg2;
0053db7e      
0053db83      if (arg3 >= 0x10)
0053db83      {
0053db88          if (arg3 >= 0xc)
0053db88          {
0053db8d              this->splitting_plane.N.x = *(uint32_t*)ebp;
0053db92              void* edx_2 = (*(uint32_t*)arg2 + 4);
0053db95              *(uint32_t*)arg2 = edx_2;
0053db9b              this->splitting_plane.N.y = *(uint32_t*)edx_2;
0053dba0              void* ecx_2 = (*(uint32_t*)arg2 + 4);
0053dba3              *(uint32_t*)arg2 = ecx_2;
0053dba9              this->splitting_plane.N.z = *(uint32_t*)ecx_2;
0053dbac              *(uint32_t*)arg2 += 4;
0053db88          }
0053db88          
0053dbb3          this->splitting_plane.d = **(uint32_t**)arg2;
0053dbc1          *(uint32_t*)arg2 += 4;
0053dbc1          
0053dbcd          if ((BSPNODE::UnPackChild(&this->pos_node, arg2, arg3) != 0 && BSPNODE::UnPackChild(&this->neg_node, arg2, arg3) != 0))
0053dbcd          {
0053dbf3              if (BSPNODE::pack_tree_type == DRAWING_BSP)
0053dbf3              {
0053dbfe                  CSphere::UnPack(&this->sphere, arg2, arg3);
0053dc07                  this->num_polys = **(uint32_t**)arg2;
0053dc0c                  void* ebx_2 = (*(uint32_t*)arg2 + 4);
0053dc0f                  *(uint32_t*)arg2 = ebx_2;
0053dc15                  this->num_portals = *(uint32_t*)ebx_2;
0053dc18                  *(uint32_t*)arg2 += 4;
0053dc1b                  uint32_t num_polys = this->num_polys;
0053dc1b                  
0053dc20                  if (num_polys > 0)
0053dc20                  {
0053dc2a                      void* eax_14;
0053dc2a                      void* edx_6;
0053dc2a                      eax_14 = operator new[]((num_polys << 2));
0053dc2f                      uint32_t num_polys_1 = this->num_polys;
0053dc32                      this->in_polys = eax_14;
0053dc38                      int32_t i = 0;
0053dc38                      
0053dc3c                      if (num_polys_1 > 0)
0053dc3c                      {
0053dc67                          do
0053dc67                          {
0053dc40                              void* ecx_7 = *(uint32_t*)arg2;
0053dc42                              edx_6 = *(uint16_t*)ecx_7;
0053dc48                              *(uint32_t*)arg2 = ((char*)ecx_7 + 2);
0053dc56                              this->in_polys[i] = &BSPNODE::pack_poly[((int32_t)edx_6)];
0053dc64                              i += 1;
0053dc67                          } while (i < this->num_polys);
0053dc3c                      }
0053dc20                  }
0053dc20                  
0053dc69                  uint32_t num_portals = this->num_portals;
0053dc69                  
0053dc6e                  if (num_portals > 0)
0053dc6e                  {
0053dc81                      this->in_portals = operator new[]((num_portals << 2));
0053dc8a                      int32_t i_1 = 0;
0053dc8a                      
0053dc8e                      if (this->num_portals > 0)
0053dc8e                      {
0053dcee                          do
0053dcee                          {
0053dc92                              void* eax_17 = operator new(8);
0053dc9c                              int32_t eax_18;
0053dc9c                              
0053dc9c                              if (eax_17 == 0)
0053dca7                                  eax_18 = 0;
0053dc9c                              else
0053dca0                                  eax_18 = CPortalPoly::CPortalPoly(eax_17);
0053dca0                              
0053dca9                              this->in_portals[i_1] = eax_18;
0053dcaf                              void* eax_19 = *(uint32_t*)arg2;
0053dcb1                              class CPortalPoly** ecx_13;
0053dcb1                              ecx_13 = *(uint16_t*)eax_19;
0053dcb7                              *(uint32_t*)arg2 = ((char*)eax_19 + 2);
0053dcc5                              this->in_portals[i_1]->portal = &BSPNODE::pack_poly[((int32_t)ecx_13)];
0053dcd3                              void* eax_23 = *(uint32_t*)arg2;
0053dcd5                              void* ecx_14;
0053dcd5                              ecx_14 = *(uint16_t*)eax_23;
0053dcdb                              *(uint32_t*)arg2 = ((char*)eax_23 + 2);
0053dcdd                              this->in_portals[i_1]->portal_index = ((int32_t)ecx_14);
0053dceb                              i_1 += 1;
0053dcee                          } while (i_1 < this->num_portals);
0053dc8e                      }
0053dc6e                  }
0053dbf3              }
0053dbf3              
0053dcf9              return 1;
0053dbcd          }
0053dbcd          
0053dbe1          *(uint32_t*)arg2 = ebp;
0053db83      }
0053db83      
0053dbe9      return 0;
0053db70  }

0053dcfc                                                                                      90 90 90 90                              ....

0053dd00  void* __thiscall BSPPORTAL::`scalar deleting destructor'(class BSPPORTAL* this, uint32_t arg2)

0053dd00  {
0053dd03      this->vtable = 0x7c9c00;
0053dd09      BSPPORTAL::Destroy(this);
0053dd10      BSPNODE::~BSPNODE(this);
0053dd10      
0053dd1a      if ((arg2 & 1) != 0)
0053dd1d          operator delete(this);
0053dd1d      
0053dd28      return this;
0053dd00  }

0053dd2b                                   90 90 90 90 90                                                             .....

0053dd30  void __fastcall CSWVertex::Init(class CSWVertex* this)

0053dd30  {
0053dd32      this->vert_id = 0;
0053dd36      this->num_uvs = 0;
0053dd3a      this->uvs = nullptr;
0053dd30  }

0053dd3e                                                                                            90 90                                ..

0053dd40  uint32_t __fastcall CSWVertex::pack_size(class CSWVertex* this)

0053dd40  {
0053dd4b      return ((((uint32_t)this->num_uvs) << 3) + 0x1c);
0053dd40  }

0053dd4c                                      90 90 90 90                                                              ....

0053dd50  uint32_t __thiscall CSWVertex::Pack(class CSWVertex* this, void** arg2, uint32_t arg3)

0053dd50  {
0053dd50      class CSWVertex* this_1 = this;
0053dd5a      void* result = ((((uint32_t)this->num_uvs) << 3) + 0x1c);
0053dd63      void* result_1 = result;
0053dd63      
0053dd67      if (arg3 >= result)
0053dd67      {
0053dd76          int32_t edi;
0053dd76          edi = this->vert_id;
0053dd7a          **(uint16_t**)arg2 = edi;
0053dd7f          void* esi_3 = (*(uint32_t*)arg2 + 2);
0053dd82          *(uint32_t*)arg2 = esi_3;
0053dd84          edi = this->num_uvs;
0053dd88          *(uint16_t*)esi_3 = edi;
0053dd8d          void* ebx_2 = (*(uint32_t*)arg2 + 2);
0053dd93          *(uint32_t*)arg2 = ebx_2;
0053dd93          
0053dd97          if (arg3 >= 0xc)
0053dd97          {
0053dd9b              *(uint32_t*)ebx_2 = *(uint32_t*)((char*)this->__inner0 + 0);
0053dd9f              void* ebx_4 = (*(uint32_t*)arg2 + 4);
0053dda2              *(uint32_t*)arg2 = ebx_4;
0053dda9              *(uint32_t*)ebx_4 = ((float)((long double)*(uint32_t*)((char*)this->__inner0 + 4)));
0053ddad              void* edi_3 = (*(uint32_t*)arg2 + 4);
0053ddb0              *(uint32_t*)arg2 = edi_3;
0053ddb7              *(uint32_t*)edi_3 = ((float)((long double)*(uint32_t*)((char*)this->__inner0 + 8)));
0053ddbb              void* esi_8 = (*(uint32_t*)arg2 + 4);
0053ddc1              *(uint32_t*)arg2 = esi_8;
0053ddc1              
0053ddc3              if (arg3 >= 0xc)
0053ddc3              {
0053ddc8                  *(uint32_t*)esi_8 = this->normal.x;
0053ddcc                  void* ebx_6 = (*(uint32_t*)arg2 + 4);
0053ddcf                  *(uint32_t*)arg2 = ebx_6;
0053ddd6                  *(uint32_t*)ebx_6 = ((float)((long double)this->normal.y));
0053ddda                  void* edi_6 = (*(uint32_t*)arg2 + 4);
0053dddd                  *(uint32_t*)arg2 = edi_6;
0053dde4                  *(uint32_t*)edi_6 = ((float)((long double)this->normal.z));
0053dde6                  *(uint32_t*)arg2 += 4;
0053ddc3              }
0053dd97          }
0053dd97          
0053dde9          int32_t i = 0;
0053dde9          
0053ddef          if (this->num_uvs > 0)
0053ddef          {
0053de1c              do
0053de1c              {
0053ddf7                  void* esi_12 = &this->uvs[i];
0053ddf7                  
0053ddfa                  if (arg3 >= 8)
0053ddfa                  {
0053de00                      **(uint32_t**)arg2 = *(uint32_t*)esi_12;
0053de04                      void* ebx_9 = (*(uint32_t*)arg2 + 4);
0053de07                      *(uint32_t*)arg2 = ebx_9;
0053de0c                      *(uint32_t*)ebx_9 = ((float)((long double)*(uint32_t*)((char*)esi_12 + 4)));
0053de0e                      *(uint32_t*)arg2 += 4;
0053de11                      result = result_1;
0053ddfa                  }
0053ddfa                  
0053de19                  i += 1;
0053de1c              } while (i < ((uint32_t)this->num_uvs));
0053ddef          }
0053dd67      }
0053dd67      
0053de23      return result;
0053dd50  }

0053de26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0053de30  void __fastcall CSWVertex::Destroy(class CSWVertex* this)

0053de30  {
0053de33      class CVec2Duv* uvs = this->uvs;
0053de33      
0053de38      if (uvs != 0)
0053de38      {
0053de3e          operator delete[](((char*)uvs - 4));
0053de46          this->uvs = nullptr;
0053de38      }
0053de30  }

0053de4f                                               90                                                                 .

0053de50  int32_t __thiscall CSWVertex::UnPack(class CSWVertex* this, void** arg2, uint32_t arg3)

0053de50  {
0053de54      class CSWVertex* this_1 = this;
0053de56      class CVec2Duv* uvs = this_1->uvs;
0053de59      void* ebp = nullptr;
0053de59      
0053de5d      if (uvs != 0)
0053de5d      {
0053de63          operator delete[](((char*)uvs - 4));
0053de6b          this_1->uvs = nullptr;
0053de5d      }
0053de5d      
0053de74      this = **(uint16_t**)arg2;
0053de77      this_1->vert_id = this;
0053de81      void* eax_3 = (*(uint32_t*)arg2 + 2);
0053de84      *(uint32_t*)arg2 = eax_3;
0053de89      this_1->num_uvs = *(uint16_t*)eax_3;
0053de8f      void* ebx_1 = (*(uint32_t*)arg2 + 2);
0053de95      *(uint32_t*)arg2 = ebx_1;
0053de99      void* eax_4;
0053de99      
0053de99      if (arg3 >= 0xc)
0053de99      {
0053de9d          *(uint32_t*)((char*)this_1->__inner0 + 0) = *(uint32_t*)ebx_1;
0053dea1          void* ebx_3 = (*(uint32_t*)arg2 + 4);
0053dea4          *(uint32_t*)arg2 = ebx_3;
0053deaa          *(uint32_t*)((char*)this_1->__inner0 + 4) = *(uint32_t*)ebx_3;
0053deaf          void* edx_3 = (*(uint32_t*)arg2 + 4);
0053deb2          *(uint32_t*)arg2 = edx_3;
0053deb8          *(uint32_t*)((char*)this_1->__inner0 + 8) = *(uint32_t*)edx_3;
0053debd          eax_4 = (*(uint32_t*)arg2 + 4);
0053dec3          *(uint32_t*)arg2 = eax_4;
0053dec3          
0053dec5          if (arg3 >= 0xc)
0053dec5          {
0053decb              this_1->normal.x = *(uint32_t*)eax_4;
0053ded0              void* edx_6 = (*(uint32_t*)arg2 + 4);
0053ded3              *(uint32_t*)arg2 = edx_6;
0053ded9              this_1->normal.y = *(uint32_t*)edx_6;
0053dede              void* ecx_3 = (*(uint32_t*)arg2 + 4);
0053dee1              *(uint32_t*)arg2 = ecx_3;
0053dee7              this_1->normal.z = *(uint32_t*)ecx_3;
0053deea              *(uint32_t*)arg2 += 4;
0053dec5          }
0053de99      }
0053de99      
0053deed      eax_4 = this_1->num_uvs;
0053deed      
0053def4      if (eax_4 != 0)
0053def4      {
0053def6          uint32_t ebx_4 = ((uint32_t)eax_4);
0053df01          uint32_t* eax_12 = operator new[](((ebx_4 << 3) + 4));
0053df01          
0053df0b          if (eax_12 != 0)
0053df0b          {
0053df13              ebp = &eax_12[1];
0053df19              *(uint32_t*)eax_12 = ebx_4;
0053df1b              `vector constructor iterator'(ebp, 8, ebx_4, Vector3::Vector3);
0053df0b          }
0053df0b          
0053df20          int32_t i = 0;
0053df22          bool cond:2_1 = this_1->num_uvs <= 0;
0053df26          this_1->uvs = ebp;
0053df26          
0053df29          if (!(cond:2_1))
0053df29          {
0053df53              do
0053df53              {
0053df30                  class CVec2Duv* uvs_1 = this_1->uvs;
0053df37                  uvs_1[i].u = **(uint32_t**)arg2;
0053df3f                  void* edx_11 = (*(uint32_t*)arg2 + 4);
0053df42                  *(uint32_t*)arg2 = edx_11;
0053df3c                  uvs_1[i].v = *(uint32_t*)edx_11;
0053df49                  *(uint32_t*)arg2 += 4;
0053df50                  i += 1;
0053df53              } while (i < ((uint32_t)this_1->num_uvs));
0053df29          }
0053def4      }
0053def4      
0053df5e      return 1;
0053de50  }

0053df2d                                         8d 49 00                                                               .I.
0053df61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0053df70  void __fastcall CPortalPoly::CPortalPoly(class CPortalPoly* this)

0053df70  {
0053df72      this->portal_index = 0xffffffff;
0053df78      this->portal = nullptr;
0053df70  }


0053df80  void __fastcall CPortalPoly::~CPortalPoly(class CPortalPoly* this)

0053df80  {
0053df80      this->portal = nullptr;
0053df87      this->portal_index = 0xffffffff;
0053df80  }

0053df8e                                            90 90                                                                ..

0053df90  void __fastcall Palette::Destroy(class Palette* this)

0053df90  {
0053df93      uint32_t* ARGB = this->ARGB;
0053df93      
0053df98      if (ARGB != 0)
0053df98      {
0053df9b          operator delete[](ARGB);
0053dfa3          this->ARGB = nullptr;
0053df98      }
0053df90  }

0053dfac                                      90 90 90 90                                                              ....

0053dfb0  void Palette::releasePalette(class Palette* arg1)

0053dfb0  {
0053dfb7      if (arg1 != 0)
0053dfb7      {
0053dfb9          class Palette* Palette::solid_color_palette_1 = Palette::solid_color_palette;
0053dfb9          
0053dfc1          if (arg1 != Palette::solid_color_palette_1)
0053dfc1          {
0053e005              if (arg1->m_pMaintainer != 0)
0053e025                  /* jump -> arg1->vtable->Release */
0053e025              
0053e007              int32_t m_numLinks = arg1->m_numLinks;
0053e007              arg1->m_numLinks -= 1;
0053e007              
0053e00a              if (m_numLinks == 1)
0053e00a              {
0053e00c                  arg1->vtable->__vecDelDtor(1);
0053e015                  arg1->vtable->__vecDelDtor(1);
0053e00a              }
0053dfc1          }
0053dfc1          else
0053dfc1          {
0053dfc9              int32_t esi_2 = (Palette::solid_color_palette_1->m_numLinks - 1);
0053dfc6              Palette::solid_color_palette_1->m_numLinks = esi_2;
0053dfc6              
0053dfd0              if (esi_2 == 0)
0053dfd0              {
0053dfd2                  Palette::solid_color_palette_1->vtable->__vecDelDtor(1);
0053dfd9                  class Palette* Palette::solid_color_palette_2 = Palette::solid_color_palette;
0053dfd9                  
0053dfe1                  if (Palette::solid_color_palette_2 != 0)
0053dfe3                      Palette::solid_color_palette_2->vtable->__vecDelDtor(1);
0053dfe3                  
0053dfea                  Palette::solid_color_palette = nullptr;
0053dff4                  Palette::curr_solid_index = 0xffffffff;
0053dfd0              }
0053dfc1          }
0053dfb7      }
0053dfb0  }

0053e028                          90 90 90 90 90 90 90 90                                                          ........

0053e030  class Palette* Palette::copyRef(class Palette* arg1)

0053e030  {
0053e037      if (arg1 != 0)
0053e039          arg1->vtable->AddRef();
0053e039      
0053e043      return arg1;
0053e030  }

0053e044              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0053e050  uint32_t __thiscall Palette::get_color32(class Palette const* this, uint32_t arg2)

0053e050  {
0053e05a      return this->ARGB[arg2];
0053e050  }

0053e05d                                                                                         90 90 90                               ...

0053e060  uint8_t __fastcall Palette::InitLoad(class Palette* this)

0053e060  {
0053e077      if ((DBCache::IsRunTime() != 0 && this->num_colors == 0x100))
0053e077      {
0053e07b          uint32_t* ARGB = this->ARGB;
0053e083          this->num_colors = 0x800;
0053e08f          this->ARGB = operator new[](0x2000);
0053e095          uint32_t* ARGB_1 = ARGB;
0053e095          
0053e0e4          for (uint32_t* i = 0xc; i < 0x200c; )
0053e0e4          {
0053e0a0              uint32_t ecx = *(uint32_t*)ARGB_1;
0053e0a5              *(uint32_t*)(((char*)i + this->ARGB) - 0xc) = ecx;
0053e0ac              *(uint32_t*)(((char*)i + this->ARGB) - 8) = ecx;
0053e0b3              *(uint32_t*)(((char*)i + this->ARGB) - 4) = ecx;
0053e0ba              *(uint32_t*)((char*)i + this->ARGB) = ecx;
0053e0c0              *(uint32_t*)(((char*)i + this->ARGB) + 4) = ecx;
0053e0c7              *(uint32_t*)(((char*)i + this->ARGB) + 8) = ecx;
0053e0ce              *(uint32_t*)(((char*)i + this->ARGB) + 0xc) = ecx;
0053e0d5              *(uint32_t*)(((char*)i + this->ARGB) + 0x10) = ecx;
0053e0d9              i = &i[8];
0053e0dc              ARGB_1 = &ARGB_1[1];
0053e0e4          }
0053e0e4          
0053e0e7          operator delete[](ARGB);
0053e077      }
0053e077      
0053e0f4      return 1;
0053e060  }

0053e0f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0053e100  void __thiscall Palette::Palette(class Palette* this, int32_t arg2)

0053e100  {
0053e109      DBObj::DBObj(this, INVALID_DID.id);
0053e112      this->vtable = &PackObj::`vftable';
0053e121      this->vtable = 0x7c9c48;
0053e127      this->vtable = &Palette::`vftable';
0053e12e      this->ARGB = nullptr;
0053e135      this->min_lighting = 0.100000001f;
0053e13c      this->num_colors = arg2;
0053e144      this->ARGB = operator new[]((arg2 << 2));
0053e100  }


0053e150  void* __thiscall Palette::`vector deleting destructor'(class Palette* this, uint32_t arg2)

0053e150  {
0053e153      /* tailcall */
0053e153      return Palette::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0053e150  }

0053e158                                                                          cc cc cc cc cc cc cc cc                          ........

0053e160  int32_t __thiscall Palette::Modify(class Palette* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, uint32_t arg4)

0053e160  {
0053e180      if ((this->m_pMaintainer != 0 || arg2 == INVALID_DID.id))
0053e173          return 0;
0053e173      
0053e18c      uint32_t esi = (arg3 + arg4);
0053e18c      
0053e192      if (esi <= this->num_colors)
0053e192      {
0053e1a1          void var_8;
0053e1a1          class DBObj* eax_4 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0xa));
0053e1a1          
0053e1ab          if (eax_4 != 0)
0053e1ab          {
0053e1af              uint32_t edx = arg3;
0053e1af              
0053e1b1              if (arg3 < esi)
0053e1b1              {
0053e1c2                  do
0053e1c2                  {
0053e1b9                      this->ARGB[edx] = *(uint32_t*)(*(int32_t*)((char*)eax_4 + 0x40) + (edx << 2));
0053e1bf                      edx += 1;
0053e1c2                  } while (edx < esi);
0053e1b1              }
0053e1b1              
0053e1c4              eax_4->vtable->Release();
0053e1d6              return 1;
0053e1ab          }
0053e192      }
0053e192      
0053e1e1      return 0;
0053e160  }

0053e1e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0053e1f0  int32_t __thiscall Palette::Modify(class Palette* this, class Subpalette* arg2)

0053e1f0  {
0053e1fa      for (class Subpalette* next = arg2; next != 0; next = next->next)
0053e1fa      {
0053e215          if (Palette::Modify(this, next->subID.id, next->offset, next->numcolors) == 0)
0053e22c              return 0;
0053e1fa      }
0053e1fa      
0053e225      return 1;
0053e1f0  }

0053e22f                                               90                                                                 .

0053e230  int32_t __thiscall Palette::Modify(class Palette* this, int32_t arg2, class Subpalette* arg3)

0053e230  {
0053e238      int32_t edi = 0;
0053e238      
0053e23e      if (arg2 > 0)
0053e23e      {
0053e244          uint32_t* esi_2 = &arg3->offset;
0053e244          
0053e263          do
0053e263          {
0053e25b              if (Palette::Modify(this, ADJ(esi_2)->subID.id, ADJ(esi_2)->offset, ADJ(esi_2)->numcolors) == 0)
0053e277                  return 0;
0053e277              
0053e25d              edi += 1;
0053e25e              esi_2 = &esi_2[6];
0053e263          } while (edi < arg2);
0053e23e      }
0053e23e      
0053e26e      return 1;
0053e230  }

0053e27a                                                                                90 90 90 90 90 90                            ......

0053e280  class Palette* Palette::makeModifiedPalette()

0053e280  {
0053e282      void* eax = operator new(0x48);
0053e282      
0053e28c      if (eax == 0)
0053e2a4          return 0;
0053e2a4      
0053e295      void* result = Palette::Palette(eax, 0x800);
0053e295      
0053e29c      if (result != 0)
0053e29e          *(uint32_t*)((char*)result + 0x24) += 1;
0053e29e      
0053e2a1      return result;
0053e280  }

0053e2a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0053e2b0  uint32_t __thiscall Palette::Pack(class Palette* this, void** arg2, uint32_t arg3)

0053e2b0  {
0053e2b7      int32_t ecx = this->m_bLoaded*(int32_t*)((char*)this + 8);
0053e2b7      
0053e2c3      if (arg3 >= ((ecx << 2) + 4))
0053e2c3      {
0053e2cd          **(uint32_t**)arg2 = ecx;
0053e2d2          void* edi_2 = (*(uint32_t*)arg2 + 4);
0053e2d5          *(uint32_t*)arg2 = edi_2;
0053e2dd          int32_t ecx_2 = (this->m_bLoaded*(int32_t*)((char*)this + 8) << 2);
0053e2e5          int32_t esi_3;
0053e2e5          int32_t edi_3;
0053e2e5          edi_3 = __builtin_memcpy(edi_2, this->m_timeStamp, ((ecx_2 >> 2) << 2));
0053e2ec          __builtin_memcpy(edi_3, esi_3, (ecx_2 & 3));
0053e2f9          *(uint32_t*)arg2 += (this->m_bLoaded*(int32_t*)((char*)this + 8) << 2);
0053e2c3      }
0053e2c3      
0053e2fe      return ((ecx << 2) + 4);
0053e2b0  }

0053e301     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0053e310  int32_t __thiscall Palette::UnPack(class Palette* this, void** arg2, uint32_t arg3)

0053e310  {
0053e319      this->m_bLoaded*(int32_t*)((char*)this + 8) = **(uint32_t**)arg2;
0053e31d      *(uint32_t*)arg2 += 4;
0053e323      int32_t i = 0;
0053e323      
0053e327      if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
0053e327      {
0053e345          do
0053e345          {
0053e330              int32_t* esi_1 = *(uint32_t*)arg2;
0053e332              int32_t edi_1 = *(uint32_t*)esi_1;
0053e337              *(uint32_t*)arg2 = &esi_1[1];
0053e33c              *(uint32_t*)(this->m_timeStamp + (i << 2)) = edi_1;
0053e342              i += 1;
0053e345          } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
0053e327      }
0053e327      
0053e34e      return 1;
0053e310  }

0053e351                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0053e360  class DBObj* Palette::Allocate(class Palette const* this @ ecx)

0053e360  {
0053e360      /* tailcall */
0053e360      return Palette::Allocator();
0053e360  }

0053e365                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0053e370  void* __thiscall Palette::`scalar deleting destructor'(class Palette* this, uint32_t arg2)

0053e370  {
0053e373      uint32_t* ARGB = this->ARGB;
0053e378      this->vtable = 0x7c9c48;
0053e37e      this->vtable = &Palette::`vftable';
0053e37e      
0053e385      if (ARGB != 0)
0053e385      {
0053e388          operator delete[](ARGB);
0053e390          this->ARGB = nullptr;
0053e385      }
0053e385      
0053e399      this->vtable = &PackObj::`vftable';
0053e3a0      DBObj::~DBObj(this);
0053e3a0      
0053e3aa      if ((arg2 & 1) != 0)
0053e3ad          operator delete(this);
0053e3ad      
0053e3b8      return this;
0053e370  }

0053e3bb                                                                                   90 90 90 90 90                             .....

0053e3c0  class Palette* Palette::makeModifiedPalette(class IDClass<_tagDataID,32,0> arg1, class Subpalette* arg2)

0053e3c0  {
0053e3c0      uint32_t id = INVALID_DID.id;
0053e3c0      
0053e3cf      if (arg1 == id)
0053e3d7          return 0;
0053e3d7      
0053e3f7      if ((arg2 != 0 && (arg2->next == 0 && (arg2->offset == 0 && arg2->numcolors == 0x800))))
0053e3f9          id = arg2->subID.id;
0053e3f9      
0053e3fe      if (id != 0)
0053e3fe      {
0053e41b          void var_8;
0053e41b          return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0xa));
0053e3fe      }
0053e3fe      
0053e41e      void* eax_3 = operator new(0x48);
0053e41e      
0053e428      if (eax_3 != 0)
0053e428      {
0053e431          class Palette* result = Palette::Palette(eax_3, 0x800);
0053e431          
0053e43a          if (result != 0)
0053e43a          {
0053e43c              result->m_numLinks += 1;
0053e43f              result->vtable->SetDID(arg1);
0053e43f              
0053e458              if ((Palette::Modify(result, arg1, 0, 0x800) != 0 && Palette::Modify(result, arg2) != 0))
0053e46e                  return result;
0053e46e              
0053e46f              result->vtable->__vecDelDtor(1);
0053e43a          }
0053e428      }
0053e428      
0053e480      return 0;
0053e3c0  }

0053e481     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0053e490  uint32_t __fastcall ImgTex::get_width(class ImgTex const* this)

0053e490  {
0053e490      class RenderSurface* m_pImageData = this->m_pImageData;
0053e490      
0053e495      if (m_pImageData == 0)
0053e4a0          return 0;
0053e4a0      
0053e49d      return m_pImageData->width;
0053e490  }

0053e4a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0053e4b0  uint32_t __fastcall ImgTex::get_height(class ImgTex const* this)

0053e4b0  {
0053e4b0      class RenderSurface* m_pImageData = this->m_pImageData;
0053e4b0      
0053e4b5      if (m_pImageData == 0)
0053e4c0          return 0;
0053e4c0      
0053e4bd      return m_pImageData->height;
0053e4b0  }

0053e4c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0053e4d0  uint8_t __stdcall ImgTex::CSI2TGA(class ImgTex* this @ ecx, uint8_t* arg2, int32_t arg3, int32_t arg4, uint8_t* arg5, int32_t arg6, int32_t arg7, int32_t arg8)

0053e4d0  {
0053e4e3      if ((arg3 != arg6 || arg4 != arg7))
0053e4e3      {
0053e509          int32_t eax;
0053e509          eax = 0;
0053e50c          return 0;
0053e4e3      }
0053e4e3      
0053e4ec      int32_t ecx_1 = ((arg6 * arg7) << 2);
0053e4f9      int32_t esi_1;
0053e4f9      int32_t edi_1;
0053e4f9      edi_1 = __builtin_memcpy(arg5, arg2, ((ecx_1 >> 2) << 2));
0053e500      __builtin_memcpy(edi_1, esi_1, (ecx_1 & 3));
0053e503      int32_t eax_1;
0053e503      eax_1 = 1;
0053e506      return 1;
0053e4d0  }

0053e50f                                               90                                                                 .

0053e510  uint8_t* __fastcall ImgTex::GetData(class ImgTex* this)

0053e510  {
0053e510      class ImgTex* var_4 = this;
0053e514      class RenderSurface* m_pImageData = this->m_pImageData;
0053e514      
0053e519      if ((m_pImageData != 0 && m_pImageData->vtable->Lock(&m_pImageData->window.rect, 0, &this->m_cPitch, &var_4) != 0))
0053e519      {
0053e536          class ImgTex* result = var_4;
0053e53a          this->m_IsLocked = 1;
0053e543          return result;
0053e519      }
0053e519      
0053e548      return 0;
0053e510  }

0053e549                             90 90 90 90 90 90 90                                                           .......

0053e550  uint8_t __fastcall ImgTex::PurgeResource(class ImgTex* this)

0053e550  {
0053e553      uint8_t result = ArgumentParser::OnCommandLineEvaluationDone(this);
0053e553      
0053e55a      if (result == 0)
0053e55d          return result;
0053e55d      
0053e55e      void* eax = *(int32_t*)((char*)this + 0x34);
0053e55e      
0053e563      if ((eax != 0 && *(uint32_t*)(*(uint32_t*)((char*)eax + 0x30) + 8)() != 0))
0053e577          GraphicsResource::MarkResourceAsLost((*(int32_t*)((char*)this + 0x34) + 0x30));
0053e577      
0053e57c      uint32_t m_FrameUsed = this->m_FrameUsed;
0053e57c      
0053e581      if (m_FrameUsed != 0)
0053e581      {
0053e586          *(uint32_t*)(*(uint32_t*)m_FrameUsed + 8)(m_FrameUsed);
0053e589          this->m_FrameUsed = 0;
0053e581      }
0053e581      
0053e590      int32_t* ecx_4;
0053e590      ecx_4 = this->m_bIsThrashable;
0053e590      *(uint8_t*)((char*)ecx_4)[1] = this->m_AutoRestore;
0053e590      
0053e595      if (ecx_4 != 0)
0053e595      {
0053e599          *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
0053e59c          this->m_bIsThrashable = 0;
0053e59c          this->m_AutoRestore = 0;
0053e595      }
0053e595      
0053e5a3      m_FrameUsed = 1;
0053e5a6      return 1;
0053e550  }

0053e5a7                       90 90 90 90 90 90 90 90 90                                                         .........

0053e5b0  struct IDirect3DTexture9* __fastcall ImgTex::GetD3DTexture(class ImgTex* this)

0053e5b0  {
0053e5be      if ((this->m_bIsLost != 0 && this->vtable->RestoreResource() == 0))
0053e5d4          return 0;
0053e5d4      
0053e5e1      this->m_TimeUsed = (*(uint32_t*)Timer::local_time);
0053e5e4      *(uint32_t*)((char*)this->m_TimeUsed)[4] = *(int32_t*)((char*)Timer::local_time + 4);
0053e5e7      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0053e5e7      
0053e5ee      if (RenderDevice::render_device_1 != 0)
0053e5f6          this->m_FrameUsed = RenderDevice::render_device_1->m_nFrameStamp;
0053e5f6      
0053e5f9      class RenderTexture* m_pSystemMemTexture = this->m_pSystemMemTexture;
0053e5f9      
0053e60a      if ((m_pSystemMemTexture == 0 || m_pSystemMemTexture->m_bIsLost != 0))
0053e60a      {
0053e703      label_53e703:
0053e703          class RenderTexture* m_pRenderTexture_1 = this->m_pRenderTexture;
0053e703          
0053e708          if (m_pRenderTexture_1 != 0)
0053e708          {
0053e70a              m_pRenderTexture_1->vtable->Release();
0053e70f              this->m_pRenderTexture = nullptr;
0053e708          }
0053e708          
0053e712          class RenderTexture* m_pSystemMemTexture_1 = this->m_pSystemMemTexture;
0053e712          
0053e71a          if (m_pSystemMemTexture_1 != 0)
0053e71a          {
0053e71c              m_pSystemMemTexture_1->vtable->Release();
0053e721              this->m_pSystemMemTexture = nullptr;
0053e71a          }
0053e60a      }
0053e60a      else
0053e60a      {
0053e610          class RenderTexture* m_pRenderTexture = this->m_pRenderTexture;
0053e610          
0053e615          if (m_pRenderTexture == 0)
0053e615          {
0053e630          label_53e630:
0053e630              void var_38;
0053e630              AvailableProperty::AvailableProperty(&var_38);
0053e643              PixelFormatDesc::SetFormat(&var_38, this->m_pSystemMemTexture->m_PixelFormat);
0053e64c              class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0053e658              int32_t var_3c_1 = 0;
0053e674              int32_t var_34;
0053e674              
0053e674              if (((((int8_t)(var_34 >> 2)) & 1) == 0 && (this->m_pSystemMemTexture->m_nNumLevels == 1 && (*(int32_t*)((char*)RenderDevice::render_device_2 + 0x318) & 0x40000000) != 0)))
0053e676                  var_3c_1 = 4;
0053e676              
0053e682              class RenderTexture* eax_7 = RenderDevice::render_device_2->vtable->CreateTexture();
0053e685              class RenderTexture* m_pSystemMemTexture_2 = this->m_pSystemMemTexture;
0053e68f              this->m_pRenderTexture = eax_7;
0053e68f              
0053e6b3              if (eax_7->vtable->Create2D(m_pSystemMemTexture_2->m_nWidth, m_pSystemMemTexture_2->m_nHeight, m_pSystemMemTexture_2->m_nNumLevels, m_pSystemMemTexture_2->m_PixelFormat, var_3c_1) == 0)
0053e6b3                  goto label_53e703;
0053e6b3              
0053e6bf              if (RenderTextureD3D::Get2DTextureD3D(this->m_pRenderTexture) == 0)
0053e6bf                  goto label_53e703;
0053e6bf              
0053e6c9              GraphicsResource::SetResourceIsThrashable(&this->m_pRenderTexture->vtable, 1);
0053e6ce              this->m_pRenderTexture->m_AllowManagement = 0;
0053e6dc              struct IDirect3DTexture9* eax_11 = RenderTextureD3D::Get2DTextureD3D(this->m_pSystemMemTexture);
0053e6dc              
0053e6e3              if (eax_11 == 0)
0053e6e3                  goto label_53e703;
0053e6e3              
0053e6e5              eax_11->vtable->AddDirtyRect(eax_11, 0);
0053e6e5              
0053e6fd              if (this->m_pRenderTexture->vtable->LoadTexture(this->m_pSystemMemTexture) == 0)
0053e6fd                  goto label_53e703;
0053e615          }
0053e615          else if (m_pRenderTexture->m_bIsLost != 0)
0053e61a          {
0053e622              if (m_pRenderTexture != 0)
0053e622              {
0053e624                  m_pRenderTexture->vtable->Release();
0053e629                  this->m_pRenderTexture = nullptr;
0053e622              }
0053e622              
0053e622              goto label_53e630;
0053e61a          }
0053e60a      }
0053e60a      
0053e727      class RenderTexture* m_pRenderTexture_2 = this->m_pRenderTexture;
0053e727      
0053e72e      if (m_pRenderTexture_2 == 0)
0053e73c          return nullptr;
0053e73c      
0053e732      return RenderTextureD3D::Get2DTextureD3D(m_pRenderTexture_2);
0053e5b0  }

0053e73d                                                                                         90 90 90                               ...

0053e740  void ImgTex::TileCSI(uint8_t* arg1, uint32_t arg2, uint32_t arg3, class ImgTex* arg4, uint32_t arg5)

0053e740  {
0053e745      class ImgTex* esi = arg4;
0053e749      class RenderSurface* m_pImageData = esi->m_pImageData;
0053e751      uint32_t height;
0053e751      
0053e751      if (m_pImageData == 0)
0053e75b          height = 0;
0053e751      else
0053e753          height = m_pImageData->height;
0053e753      
0053e75f      uint32_t height_1 = height;
0053e763      uint32_t width;
0053e763      
0053e763      if (m_pImageData == 0)
0053e771          width = 0;
0053e763      else
0053e76b          width = m_pImageData->width;
0053e76b      
0053e777      int32_t* var_8;
0053e777      char eax_4;
0053e777      
0053e777      if (m_pImageData != 0)
0053e78c          eax_4 = m_pImageData->vtable->Lock(&m_pImageData->window.rect, 0, &esi->m_cPitch, &var_8);
0053e78c      
0053e791      int32_t* var_24;
0053e791      
0053e791      if ((m_pImageData == 0 || eax_4 == 0))
0053e7a4          var_24 = nullptr;
0053e791      else
0053e791      {
0053e793          int32_t* ecx = var_8;
0053e797          esi->m_IsLocked = 1;
0053e79e          var_24 = ecx;
0053e791      }
0053e791      
0053e7a8      uint32_t ecx_1 = arg5;
0053e7a8      
0053e7ae      if (ecx_1 > 0)
0053e7ae      {
0053e7b6          int32_t edx_3 = (height * arg3);
0053e7bb          int32_t eax_5 = 0;
0053e7be          int32_t var_4_1 = edx_3;
0053e7c2          int32_t var_10_1 = 0;
0053e7c6          uint32_t var_c_1 = ecx_1;
0053e7c6          
0053e7d0          while (true)
0053e7d0          {
0053e7d0              int32_t var_20_1 = 0;
0053e7d4              uint32_t var_14_1 = ecx_1;
0053e837              bool cond:1_1;
0053e837              
0053e837              do
0053e837              {
0053e7da                  int32_t* ecx_2 = var_24;
0053e7da                  
0053e7de                  if (height > 0)
0053e7de                  {
0053e7f1                      void* esi_1 = &arg1[((eax_5 + var_20_1) << 2)];
0053e7f4                      uint32_t edi_1 = height;
0053e814                      uint32_t i;
0053e814                      
0053e814                      do
0053e814                      {
0053e7f6                          uint32_t edx_6 = width;
0053e7fc                          void* eax_7 = esi_1;
0053e7fc                          
0053e7fe                          if (edx_6 > 0)
0053e7fe                          {
0053e80b                              uint32_t j;
0053e80b                              
0053e80b                              do
0053e80b                              {
0053e802                                  *(uint32_t*)eax_7 = *(uint32_t*)ecx_2;
0053e804                                  eax_7 += 4;
0053e807                                  ecx_2 = &ecx_2[1];
0053e80a                                  j = edx_6;
0053e80a                                  edx_6 -= 1;
0053e80b                              } while (j != 1);
0053e80d                              height = height_1;
0053e7fe                          }
0053e7fe                          
0053e811                          esi_1 += (arg3 << 2);
0053e813                          i = edi_1;
0053e813                          edi_1 -= 1;
0053e814                      } while (i != 1);
0053e816                      esi = arg4;
0053e81a                      eax_5 = var_10_1;
0053e81e                      edx_3 = var_4_1;
0053e7de                  }
0053e7de                  
0053e82e                  cond:1_1 = var_14_1 != 1;
0053e82f                  var_20_1 += edx_3;
0053e833                  var_14_1 -= 1;
0053e837              } while (cond:1_1);
0053e841              eax_5 += width;
0053e843              bool cond:3_1 = var_c_1 != 1;
0053e844              var_10_1 = eax_5;
0053e848              var_c_1 -= 1;
0053e848              
0053e84c              if (!(cond:3_1))
0053e84c                  break;
0053e84c              
0053e7cc              ecx_1 = arg5;
0053e7d0          }
0053e7ae      }
0053e7ae      
0053e853      class RenderSurface* m_pImageData_1 = esi->m_pImageData;
0053e853      
0053e858      if (m_pImageData_1 != 0)
0053e858      {
0053e85a          esi->m_cPitch = 0;
0053e85d          m_pImageData_1->vtable->Unlock();
0053e862          esi->m_IsLocked = 0;
0053e858      }
0053e740  }


0053e870  void ImgTex::MergeTexture(uint8_t* arg1, uint32_t arg2, uint32_t arg3, class ImgTex* arg4, uint32_t arg5, class ImgTex* arg6, enum LandDefs::Rotation arg7)

0053e870  {
0053e874      class RenderSurface* m_pImageData_1 = arg4->m_pImageData;
0053e882      uint32_t height;
0053e882      
0053e882      if (m_pImageData_1 == 0)
0053e890          height = 0;
0053e882      else
0053e88a          height = m_pImageData_1->height;
0053e88a      
0053e896      uint32_t width;
0053e896      
0053e896      if (m_pImageData_1 == 0)
0053e8a0          width = 0;
0053e896      else
0053e898          width = m_pImageData_1->width;
0053e898      
0053e8a6      class RenderSurface* m_pImageData = arg6->m_pImageData;
0053e8ab      uint32_t width_2 = width;
0053e8af      uint32_t width_1;
0053e8af      
0053e8af      if (m_pImageData == 0)
0053e8b9          width_1 = 0;
0053e8af      else
0053e8b1          width_1 = m_pImageData->width;
0053e8b1      
0053e8bd      int32_t var_2c = 0;
0053e8c1      uint8_t* var_8;
0053e8c1      char eax_1;
0053e8c1      
0053e8c1      if (m_pImageData_1 != 0)
0053e8da          eax_1 = m_pImageData_1->vtable->Lock(&m_pImageData_1->window.rect, 0, &arg4->m_cPitch, &var_8);
0053e8da      
0053e8df      uint8_t* var_34;
0053e8df      
0053e8df      if ((m_pImageData_1 == 0 || eax_1 == 0))
0053e8f6          var_34 = nullptr;
0053e8df      else
0053e8df      {
0053e8e5          uint8_t* ecx = var_8;
0053e8e9          arg4->m_IsLocked = 1;
0053e8f0          var_34 = ecx;
0053e8df      }
0053e8df      
0053e8fa      class RenderSurface* m_pImageData_2 = arg6->m_pImageData;
0053e8ff      char* var_4;
0053e8ff      char eax_5;
0053e8ff      
0053e8ff      if (m_pImageData_2 != 0)
0053e914          eax_5 = m_pImageData_2->vtable->Lock(&m_pImageData_2->window.rect, 0, &arg6->m_cPitch, &var_4);
0053e914      
0053e919      char* ecx_1;
0053e919      
0053e919      if ((m_pImageData_2 == 0 || eax_5 == 0))
0053e928          ecx_1 = nullptr;
0053e919      else
0053e919      {
0053e91b          ecx_1 = var_4;
0053e91f          arg6->m_IsLocked = 1;
0053e919      }
0053e919      
0053e930      uint32_t var_28;
0053e930      uint32_t ebp;
0053e930      
0053e930      if (arg3 <= width_1)
0053e930      {
0053e940          var_28 = 1;
0053e948          ebp = 1;
0053e930      }
0053e930      else
0053e930      {
0053e938          ebp = (COMBINE(0, arg3) / width_1);
0053e93a          var_28 = ebp;
0053e930      }
0053e930      
0053e94e      uint32_t eax_9;
0053e94e      
0053e94e      if (arg3 >= width_1)
0053e958          eax_9 = 1;
0053e94e      else
0053e954          eax_9 = (COMBINE(0, width_1) / arg3);
0053e954      
0053e968      char* edx_11;
0053e968      
0053e968      if (arg7 == ROT_90)
0053e968      {
0053e96a          edx_11 = &ecx_1[(width - 1)];
0053e96e          arg3 = width;
0053e972          arg7 = ~ROT_0;
0053e968      }
0053e968      else if (arg7 == ROT_180)
0053e97f      {
0053e988          edx_11 = &ecx_1[((width * height) - 1)];
0053e990          arg3 = 0xffffffff;
0053e998          arg7 = -(width);
0053e97f      }
0053e97f      else if (arg7 != ROT_270)
0053e9a1      {
0053e9bb          edx_11 = ecx_1;
0053e9bd          arg3 = 1;
0053e9c1          arg7 = width;
0053e9a1      }
0053e9a1      else
0053e9a1      {
0053e9ab          edx_11 = (((height - 1) * width) + ecx_1);
0053e9b1          arg3 = -(width);
0053e9b5          arg7 = ROT_90;
0053e9a1      }
0053e9a1      
0053e9c7      uint8_t* ecx_6 = arg1;
0053e9c7      
0053e9d3      if ((eax_9 < 1 || ebp > 1))
0053e9d3      {
0053eae2          void* var_18_1 = var_34;
0053eaec          arg1 = ebp;
0053eaf0          uint32_t var_24_2 = ebp;
0053eaf4          void* ebp_2 = edx_11;
0053eaf4          
0053eaf6          if (arg2 > 0)
0053eaf6          {
0053eafc              void* var_10_2 = edx_11;
0053eb00              char* var_14_1 = edx_11;
0053eb04              uint32_t i_1 = arg2;
0053ec10              uint32_t i;
0053ec10              
0053ec10              do
0053ec10              {
0053eb10                  int32_t esi_9 = 0;
0053eb12                  int32_t var_1c_1 = 0;
0053eb12                  
0053ebb2                  do
0053ebb2                  {
0053eb20                      uint32_t eax_18 = ((uint32_t)*(uint8_t*)ebp_2);
0053eb32                      char* edi_5 = ((char*)var_18_1 + (((width - 1) & esi_9) << 2));
0053eb32                      
0053eb35                      if (eax_18 < 0xff)
0053eb35                      {
0053eb3c                          if (eax_18 > 0x80)
0053eb3e                              eax_18 += 1;
0053eb3e                          
0053eb5b                          int32_t ebx_8 = (((uint32_t)ecx_6[1]) * eax_18);
0053eb5e                          *(uint8_t*)ecx_6 = ((int8_t)(((((uint32_t)*(uint8_t*)edi_5) * (0x100 - eax_18)) + (((uint32_t)*(uint8_t*)ecx_6) * eax_18)) >> 8));
0053eb69                          width = width_2;
0053eb70                          ecx_6[1] = ((int8_t)(((((uint32_t)edi_5[1]) * (0x100 - eax_18)) + ebx_8) >> 8));
0053eb83                          esi_9 = var_1c_1;
0053eb8a                          ecx_6[2] = ((int8_t)(((((uint32_t)edi_5[2]) * (0x100 - eax_18)) + (((uint32_t)ecx_6[2]) * eax_18)) >> 8));
0053eb35                      }
0053eb35                      
0053eb91                      ecx_6 = &ecx_6[4];
0053eb94                      bool cond:6_1 = arg1 != 1;
0053eb95                      arg1 -= 1;
0053eb95                      
0053eb99                      if (!(cond:6_1))
0053eb99                      {
0053eb9b                          ebp_2 += arg3;
0053eba3                          arg1 = var_28;
0053eb99                      }
0053eb99                      
0053ebab                      esi_9 += 1;
0053ebae                      var_1c_1 = esi_9;
0053ebb2                  } while (esi_9 < arg2);
0053ebb2                  
0053ebc1                  bool cond:9_1 = (var_2c + 1) < height;
0053ebc3                  var_2c += 1;
0053ebc3                  
0053ebc7                  if (!(cond:9_1))
0053ebc9                      var_2c = 0;
0053ebc9                  
0053ebe3                  bool cond:11_1 = var_24_2 != 1;
0053ebe4                  var_18_1 = &var_34[((var_2c * width) << 2)];
0053ebe8                  var_24_2 -= 1;
0053ebe8                  
0053ebec                  if (cond:11_1)
0053ec08                      ebp_2 = var_10_2;
0053ebec                  else
0053ebec                  {
0053ebf2                      ebp_2 = &var_14_1[arg7];
0053ebfa                      var_14_1 = ebp_2;
0053ebfe                      var_10_2 = ebp_2;
0053ec02                      var_24_2 = var_28;
0053ebec                  }
0053ebec                  
0053ec0c                  i = i_1;
0053ec0c                  i_1 -= 1;
0053ec10              } while (i != 1);
0053eaf6          }
0053e9d3      }
0053e9d3      else
0053e9d3      {
0053e9e4          uint32_t esi_4 = arg2;
0053e9e4          
0053e9ea          if (esi_4 > 0)
0053e9ea          {
0053e9f4              int32_t edi_1 = (arg7 * eax_9);
0053e9fb              uint8_t* edi_2 = var_34;
0053ea06              char* var_24_1 = edx_11;
0053ea0e              arg1 = edi_2;
0053ea12              uint32_t var_28_1 = esi_4;
0053ea12              
0053ea20              while (true)
0053ea20              {
0053ea20                  char* ebp_1 = edx_11;
0053ea22                  arg7 = esi_4;
0053eaa8                  bool cond:8_1;
0053eaa8                  
0053eaa8                  do
0053eaa8                  {
0053ea26                      uint32_t eax_11 = ((uint32_t)*(uint8_t*)ebp_1);
0053ea26                      
0053ea2d                      if (eax_11 < 1)
0053ea2d                      {
0053ea2f                          edx_11 = *(uint8_t*)edi_2;
0053ea31                          *(uint8_t*)ecx_6 = edx_11;
0053ea33                          eax_11 = edi_2[1];
0053ea36                          ecx_6[1] = eax_11;
0053ea39                          edx_11 = edi_2[2];
0053ea90                          ecx_6[2] = edx_11;
0053ea2d                      }
0053ea2d                      else if (eax_11 < 0xff)
0053ea43                      {
0053ea4a                          if (eax_11 > 0x80)
0053ea4c                              eax_11 += 1;
0053ea4c                          
0053ea69                          int32_t ebx_3 = (((uint32_t)ecx_6[1]) * eax_11);
0053ea6c                          *(uint8_t*)ecx_6 = ((int8_t)(((((uint32_t)*(uint8_t*)edi_2) * (0x100 - eax_11)) + (((uint32_t)*(uint8_t*)ecx_6) * eax_11)) >> 8));
0053ea7a                          ecx_6[1] = ((int8_t)(((((uint32_t)edi_2[1]) * (0x100 - eax_11)) + ebx_3) >> 8));
0053ea90                          ecx_6[2] = (((((uint32_t)edi_2[2]) * (0x100 - eax_11)) + (((uint32_t)ecx_6[2]) * eax_11)) >> 8);
0053ea43                      }
0053ea43                      
0053ea9b                      ecx_6 = &ecx_6[4];
0053ea9e                      edi_2 = &edi_2[4];
0053eaa1                      ebp_1 += (arg3 * eax_9);
0053eaa3                      cond:8_1 = arg7 != ROT_90;
0053eaa4                      arg7 -= 1;
0053eaa8                  } while (cond:8_1);
0053eac2                  edi_2 = &arg1[(width << 2)];
0053eac4                  edx_11 = &var_24_1[edi_1];
0053eac6                  bool cond:10_1 = var_28_1 != 1;
0053eac7                  arg1 = edi_2;
0053eacb                  var_24_1 = edx_11;
0053eacf                  var_28_1 -= 1;
0053eacf                  
0053ead3                  if (!(cond:10_1))
0053ead3                      break;
0053ead3                  
0053ea18                  esi_4 = arg2;
0053ea20              }
0053e9ea          }
0053e9d3      }
0053e9d3      
0053ec1a      class RenderSurface* m_pImageData_3 = arg4->m_pImageData;
0053ec1a      
0053ec21      if (m_pImageData_3 != 0)
0053ec21      {
0053ec23          arg4->m_cPitch = 0;
0053ec26          m_pImageData_3->vtable->Unlock();
0053ec2b          arg4->m_IsLocked = 0;
0053ec21      }
0053ec21      
0053ec36      class RenderSurface* m_pImageData_4 = arg6->m_pImageData;
0053ec36      
0053ec3b      if (m_pImageData_4 != 0)
0053ec3b      {
0053ec3d          arg6->m_cPitch = 0;
0053ec40          m_pImageData_4->vtable->Unlock();
0053ec45          arg6->m_IsLocked = 0;
0053ec3b      }
0053e870  }

0053eb0a                                8d 9b 00 00 00 00                                                            ......
0053eb18                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0053ec54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0053ec60  uint8_t ImgTex::CopyIntoData(uint8_t* arg1, int32_t arg2, class ImgTex* arg3, class Palette const* arg4, uint8_t arg5)

0053ec60  {
0053ec64      class ImgTex* ebx = arg3;
0053ec68      class RenderSurface* m_pImageData_3 = ebx->m_pImageData;
0053ec6d      int32_t var_8;
0053ec6d      char eax_2;
0053ec6d      
0053ec6d      if (m_pImageData_3 != 0)
0053ec83          eax_2 = m_pImageData_3->vtable->Lock(&m_pImageData_3->window.rect, 0, &ebx->m_cPitch, &var_8);
0053ec83      
0053ec88      int32_t eax_3;
0053ec88      
0053ec88      if ((m_pImageData_3 == 0 || eax_2 == 0))
0053ec97          eax_3 = 0;
0053ec88      else
0053ec88      {
0053ec8a          eax_3 = var_8;
0053ec8e          ebx->m_IsLocked = 1;
0053ec88      }
0053ec88      
0053ec99      int32_t m_cPitch = ebx->m_cPitch;
0053ec9f      uint8_t* edi = arg1;
0053eca7      arg3 = nullptr;
0053ecaf      int32_t ebp = eax_3;
0053ecb1      class RenderSurface* m_pImageData_2;
0053ecb1      
0053ecb1      while (true)
0053ecb1      {
0053ecb1          m_pImageData_2 = ebx->m_pImageData;
0053ecb6          uint8_t* var_c_1 = edi;
0053ecb6          
0053ecba          if (m_pImageData_2 == 0)
0053ecba              break;
0053ecba          
0053ecca          if (arg3 >= m_pImageData_2->height)
0053ecca              break;
0053ecca          
0053ecd6          char* esi_1 = nullptr;
0053ecd6          
0053ecdb          if (m_pImageData_2->pfDesc.format != PFID_INDEX16)
0053ecdb          {
0053ed21              while (true)
0053ed21              {
0053ed21                  class RenderSurface* m_pImageData_1 = ebx->m_pImageData;
0053ed21                  
0053ed26                  if (m_pImageData_1 == 0)
0053ed26                      break;
0053ed26                  
0053ed2e                  if (esi_1 >= m_pImageData_1->width)
0053ed2e                      break;
0053ed2e                  
0053ed30                  enum PixelFormatID ecx;
0053ed30                  ecx = arg5;
0053ed36                  m_pImageData_1 = ((uint16_t)esi_1[ebp]);
0053ed36                  
0053ed41                  if ((ecx != 0 && m_pImageData_1 < 8))
0053ed41                  {
0053ed45                      *(uint32_t*)edi = 0;
0053ed47                      edi = &edi[4];
0053ed4a                      esi_1 = &esi_1[1];
0053ed4b                      continue;
0053ed41                  }
0053ed41                  
0053ed55                  uint32_t eax_6;
0053ed55                  eax_6 = Palette::get_color32(arg4, ((uint32_t)m_pImageData_1));
0053ed5a                  *(uint32_t*)edi = eax_6;
0053ed5c                  edi = &edi[4];
0053ed5f                  esi_1 = &esi_1[1];
0053ed21              }
0053ecdb          }
0053ecdb          else
0053ecdb          {
0053ece0              while (true)
0053ece0              {
0053ece0                  class RenderSurface* m_pImageData = ebx->m_pImageData;
0053ece0                  
0053ece5                  if (m_pImageData == 0)
0053ece5                      break;
0053ece5                  
0053eced                  if (esi_1 >= m_pImageData->width)
0053eced                      break;
0053eced                  
0053ecf5                  m_pImageData = *(uint16_t*)(ebp + (esi_1 << 1));
0053ecf5                  
0053ed00                  if ((arg5 != 0 && m_pImageData < 8))
0053ed00                  {
0053ed04                      *(uint32_t*)edi = 0;
0053ed06                      edi = &edi[4];
0053ed09                      esi_1 = &esi_1[1];
0053ed0a                      continue;
0053ed00                  }
0053ed00                  
0053ed19                  *(uint32_t*)edi = Palette::get_color32(arg4, ((uint32_t)m_pImageData));
0053ed1b                  edi = &edi[4];
0053ed1e                  esi_1 = &esi_1[1];
0053ece0              }
0053ecdb          }
0053ecdb          
0053ed73          edi = &var_c_1[arg2];
0053ed75          arg3 = (&arg3->vtable + 1);
0053ed79          ebp += m_cPitch;
0053ecb1      }
0053ecb1      
0053ed80      class RenderSurface* m_pImageData_4 = ebx->m_pImageData;
0053ed80      
0053ed88      if (m_pImageData_4 != 0)
0053ed88      {
0053ed8a          ebx->m_cPitch = 0;
0053ed91          m_pImageData_4->vtable->Unlock();
0053ed96          ebx->m_IsLocked = 0;
0053ed88      }
0053ed88      
0053ed9d      m_pImageData_2 = 1;
0053eda3      return 1;
0053ec60  }

0053eda4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0053edb0  uint8_t __fastcall ImgTex::CreateD3DTexture(class ImgTex* this)

0053edb0  {
0053edb6      uint8_t result = DBCache::IsRunTime();
0053edb6      
0053edbd      if (result == 0)
0053edc3          return result;
0053edc3      
0053edc4      class RenderSurface* m_pImageData = this->m_pImageData;
0053edc4      
0053edda      if ((m_pImageData != 0 && m_pImageData->m_pSurfaceBits == 0))
0053edda      {
0053ede0          struct IDirect3DTexture9* m_pD3DTexture = this->m_pD3DTexture;
0053ede0          
0053ede5          if (m_pD3DTexture != 0)
0053ede5          {
0053ede7              m_pD3DTexture->vtable->Release(m_pD3DTexture);
0053eded              this->m_pD3DTexture = nullptr;
0053ede5          }
0053ede5          
0053edf0          class RenderTexture* m_pRenderTexture = this->m_pRenderTexture;
0053edf0          
0053edf5          if (m_pRenderTexture != 0)
0053edf5          {
0053edf7              m_pRenderTexture->vtable->Release();
0053edfc              this->m_pRenderTexture = nullptr;
0053edf5          }
0053edf5          
0053edff          class RenderTexture* m_pSystemMemTexture = this->m_pSystemMemTexture;
0053edff          
0053ee07          if (m_pSystemMemTexture != 0)
0053ee07          {
0053ee09              m_pSystemMemTexture->vtable->Release();
0053ee0e              this->m_pSystemMemTexture = nullptr;
0053ee07          }
0053ee07          
0053ee18          GraphicsResource::SetResourceSize(&this->vtable, 0);
0053ee1d          class RenderSurface* m_pImageData_2 = this->m_pImageData;
0053ee22          enum ImageScaleType ImgTex::fCurrentTextureScale_1 = ImgTex::fCurrentTextureScale;
0053ee28          class RenderSurface* m_pImageData_3 = m_pImageData_2;
0053ee2c          uint32_t width;
0053ee2c          
0053ee2c          if (m_pImageData_2 == 0)
0053ee36              width = 0;
0053ee2c          else
0053ee2e              width = m_pImageData_2->width;
0053ee2e          
0053ee3c          uint32_t i_3 = (width >> ImgTex::fCurrentTextureScale_1);
0053ee3e          uint32_t ImgTex::min_tex_size_2 = i_3;
0053ee42          uint32_t height;
0053ee42          
0053ee42          if (m_pImageData_2 == 0)
0053ee4c              height = 0;
0053ee42          else
0053ee44              height = m_pImageData_2->height;
0053ee44          
0053ee52          uint32_t ebp_1 = (height >> ImgTex::fCurrentTextureScale_1);
0053ee52          
0053ee54          if (ImgTex::fCurrentTextureScale_1 != FULL_RES)
0053ee54          {
0053ee56              uint32_t ImgTex::min_tex_size_1 = ImgTex::min_tex_size;
0053ee56              
0053ee5e              if (i_3 < ImgTex::min_tex_size_1)
0053ee5e              {
0053ee64                  ImgTex::min_tex_size_2 = ImgTex::min_tex_size_1;
0053ee64                  
0053ee6f                  if (ImgTex::min_tex_size_1 > ImgTex::get_width(this))
0053ee78                      ImgTex::min_tex_size_2 = ImgTex::get_width(this);
0053ee78                  
0053ee7c                  i_3 = ImgTex::min_tex_size_2;
0053ee80                  m_pImageData_2 = m_pImageData_3;
0053ee5e              }
0053ee5e              
0053ee86              if (ebp_1 < ImgTex::min_tex_size_1)
0053ee86              {
0053ee8a                  ebp_1 = ImgTex::min_tex_size_1;
0053ee8a                  
0053ee93                  if (ebp_1 > ImgTex::get_height(this))
0053ee9c                      ebp_1 = ImgTex::get_height(this);
0053ee9c                  
0053ee9e                  m_pImageData_2 = m_pImageData_3;
0053ee86              }
0053ee54          }
0053ee54          
0053eea4          int32_t i_5 = 1;
0053eea9          int32_t i_4 = 1;
0053eead          uint32_t i = i_3;
0053eead          
0053eeaf          if (i_3 <= ebp_1)
0053eeb1              i = ebp_1;
0053eeb1          
0053eeb6          if (i > 1)
0053eeb6          {
0053eebe              do
0053eebe              {
0053eeb8                  i u>>= 1;
0053eeba                  i_5 += 1;
0053eebe              } while (i > 1);
0053eebe              
0053eec3              i_4 = i_5;
0053eec3              
0053eec7              if (i_5 > 4)
0053eec7              {
0053eec9                  i_4 = 4;
0053eed1                  i_5 = 4;
0053eec7              }
0053eeb6          }
0053eeb6          
0053eee6          uint8_t ebx_3 = (((int8_t)(m_pImageData_2->pfDesc.flags >> 2)) & 1);
0053eee9          class RenderTexture* eax_7 = RenderDevice::render_device->vtable->CreateTexture();
0053eeee          this->m_pSystemMemTexture = eax_7;
0053eef4          int32_t i_6 = i_5;
0053eef4          
0053eef6          if (ebx_3 == 0)
0053eef8              i_6 = 1;
0053eef8          
0053eefd          class RenderSurface* m_pImageData_1 = this->m_pImageData;
0053ef04          enum PixelFormatID format;
0053ef04          
0053ef04          if (m_pImageData_1 == 0)
0053ef0e              format = PFID_UNKNOWN;
0053ef04          else
0053ef06              format = m_pImageData_1->pfDesc.format;
0053ef06          
0053ef21          bool cond:6_1 = eax_7->vtable->Create2D(ImgTex::min_tex_size_2, ebp_1, i_6, format, 2) == 0;
0053ef23          class RenderTexture* m_pSystemMemTexture_1 = this->m_pSystemMemTexture;
0053ef23          
0053ef29          if (!(cond:6_1))
0053ef29          {
0053ef2f              GraphicsResource::SetResourceIsThrashable(&m_pSystemMemTexture_1->vtable, 0);
0053ef34              this->m_pSystemMemTexture->m_AllowManagement = 0;
0053ef44              m_pImageData = RenderTextureD3D::Get2DTextureD3D(this->m_pSystemMemTexture);
0053ef44              
0053ef4d              if (m_pImageData != 0)
0053ef4d              {
0053ef71                  char var_45 = 0;
0053ef76                  struct IDirect3DSurface9* eax_9 = RenderSurfaceD3D::GetDirect3DSurface(this->m_pImageData);
0053ef7f                  struct IDirect3DTexture9* m_pD3DTexture_1;
0053ef7f                  
0053ef7f                  if (eax_9 == 0)
0053ef7f                  {
0053f03f                  label_53f03f:
0053f03f                      class RenderTexture* m_pSystemMemTexture_2 = this->m_pSystemMemTexture;
0053f03f                      
0053f047                      if (m_pSystemMemTexture_2 != 0)
0053f047                      {
0053f049                          m_pSystemMemTexture_2->vtable->Release();
0053f04e                          this->m_pSystemMemTexture = nullptr;
0053f047                      }
0053f047                      
0053f058                      m_pD3DTexture_1 = this->m_pD3DTexture;
0053f058                      
0053f05d                      if (m_pD3DTexture_1 != 0)
0053f05d                      {
0053f05f                          m_pD3DTexture_1->vtable->Release(m_pD3DTexture_1);
0053f065                          this->m_pD3DTexture = nullptr;
0053f05d                      }
0053ef7f                  }
0053ef7f                  else
0053ef7f                  {
0053ef94                      struct tagPALETTEENTRY* var_3c;
0053ef94                      
0053ef94                      if (m_pImageData->vtable->GetDBOType(m_pImageData, 0, &var_3c) < 0)
0053ef94                          goto label_53f03f;
0053ef94                      
0053ef9e                      int32_t var_5c_3 = 0;
0053efa0                      int32_t var_60_2 = 0x70005;
0053efaf                      int32_t eax_12;
0053efaf                      int80_t st0_1;
0053efaf                      st0_1 = _D3DXLoadSurfaceFromSurface@32(var_3c, nullptr, nullptr, eax_9, 0, 0);
0053efb6                      struct tagPALETTEENTRY* eax_13 = var_3c;
0053efba                      int32_t ecx_12;
0053efba                      ecx_12 = eax_13->peRed;
0053efba                      *(uint8_t*)((char*)ecx_12)[1] = eax_13->peGreen;
0053efba                      *(uint8_t*)((char*)ecx_12)[2] = eax_13->peBlue;
0053efba                      *(uint8_t*)((char*)ecx_12)[3] = eax_13->peFlags;
0053efbd                      *(uint32_t*)(ecx_12 + 8)(eax_13);
0053efbd                      
0053efc2                      if (eax_12 < 0)
0053efc2                          goto label_53f03f;
0053efc2                      
0053efd5                      if (_D3DXFilterTexture@16(m_pImageData, 0, 0xffffffff, 0x70005) < 0)
0053efd5                          goto label_53f03f;
0053efd5                      
0053efd9                      var_45 = 1;
0053efe8                      void var_38;
0053efe8                      PixelFormatDesc::PixelFormatDesc(&var_38, ImgTex::get_image_type(this));
0053eff2                      int32_t i_2 = i_4;
0053effe                      char var_2c;
0053effe                      uint32_t eax_19 = (((((uint32_t)var_2c) * ebp_1) * ImgTex::min_tex_size_2) >> 3);
0053f001                      uint32_t ecx_15 = 0;
0053f001                      
0053f005                      if (i_2 > 0)
0053f005                      {
0053f00d                          int32_t i_1;
0053f00d                          
0053f00d                          do
0053f00d                          {
0053f007                              ecx_15 += eax_19;
0053f009                              eax_19 u>>= 2;
0053f00c                              i_1 = i_2;
0053f00c                              i_2 -= 1;
0053f00d                          } while (i_1 != 1);
0053f005                      }
0053f005                      
0053f013                      GraphicsResource::SetResourceSize(&this->vtable, ecx_15);
0053f013                      
0053f026                      if (this->m_pImageData->vtable->PurgeResource() != 0)
0053f026                      {
0053f02e                          GraphicsResource::MarkResourceAsLost(&this->m_pImageData->vtable);
0053f033                          m_pD3DTexture_1 = 1;
0053f03e                          return 1;
0053f026                      }
0053ef7f                  }
0053ef7f                  
0053f06c                  m_pD3DTexture_1 = var_45;
0053f077                  return m_pD3DTexture_1;
0053ef4d              }
0053ef4d              
0053ef4f              m_pSystemMemTexture_1 = this->m_pSystemMemTexture;
0053ef29          }
0053ef29          
0053ef57          if (m_pSystemMemTexture_1 != 0)
0053ef57          {
0053ef59              m_pSystemMemTexture_1->vtable->Release();
0053ef5e              this->m_pSystemMemTexture = nullptr;
0053ef57          }
0053edda      }
0053edda      
0053ef67      m_pImageData = 0;
0053ef6d      return 0;
0053edb0  }

0053f078                                                                          90 90 90 90 90 90 90 90                          ........

0053f080  uint8_t __fastcall ImgTex::RestoreResource(class ImgTex* this)

0053f080  {
0053f081      class ImgTex* this_1 = this;
0053f08a      void* eax;
0053f08a      
0053f08a      if (GraphicsResource::RestoreResource(this) != 0)
0053f08a      {
0053f08c          eax = *(int32_t*)((char*)this_1 + 0x34);
0053f08c          
0053f091          if (eax != 0)
0053f091          {
0053f097              this = *(uint8_t*)((char*)eax + 0x38);
0053f09d              int32_t ebx;
0053f09d              ebx = 1;
0053f09d              
0053f09f              if (this != 0)
0053f09f              {
0053f0a9                  ebx = *(uint32_t*)(*(uint32_t*)((char*)eax + 0x30) + 0xc)();
0053f0ab                  ebx &= 1;
0053f09f              }
0053f09f              
0053f0b9              if (*(uint32_t*)(*(int32_t*)((char*)this_1 + 0x34) + 0x114) == 0)
0053f0c3                  ebx &= ImgTex::CreateD3DTexture(((char*)this_1 - 0x30));
0053f0c3              
0053f0c7              if (ebx != 0)
0053f0cb                  GraphicsResource::MarkResourceAsNotLost(this_1);
0053f0cb              
0053f0d0              int32_t eax_3;
0053f0d0              eax_3 = ebx;
0053f0d4              return eax_3;
0053f091          }
0053f08a      }
0053f08a      
0053f093      eax = 0;
0053f096      return 0;
0053f080  }

0053f0d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0053f0e0  class IDClass<_tagDataID,32,0>* __thiscall ImgTex::GetSurfaceDID(class ImgTex const* this, class IDClass<_tagDataID,32,0>* __return)

0053f0e0  {
0053f0e3      uint32_t m_num = this->m_SourceLevels.m_num;
0053f0e3      
0053f0e7      if (m_num != 1)
0053f0e7      {
0053f0ea          if (m_num != 2)
0053f0ea          {
0053f0f5              IError::ReportDataErrorFrom(this->m_DID.id, "Cannot get surface DID, no sourc…");
0053f100              uint32_t* __return_1 = __return;
0053f107              *(uint32_t*)__return_1 = INVALID_DID.id;
0053f10a              return __return_1;
0053f0ea          }
0053f0ea          
0053f114          if (Render::ShouldDropHighDetail() != 0)
0053f114          {
0053f120              __return->id = *(int32_t*)((char*)this->m_SourceLevels.m_data + 4);
0053f123              return __return;
0053f114          }
0053f0e7      }
0053f0e7      
0053f12b      uint32_t* __return_2 = __return;
0053f12f      *(uint32_t*)__return_2 = this->m_SourceLevels.m_data->id;
0053f132      return __return_2;
0053f0e0  }

0053f135                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0053f140  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>::~IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>* this)

0053f140  {
0053f143      class HashTableData<unsigned long,ImgTex *>** m_buckets = this->m_buckets;
0053f14b      this->vtable = 0x7c9d40;
0053f14b      
0053f151      if (m_buckets != &this->m_aInplaceBuckets)
0053f154          operator delete[](m_buckets);
0053f154      
0053f15e      this->m_buckets = nullptr;
0053f161      this->m_firstInterestingBucket = nullptr;
0053f164      this->m_numBuckets = 0;
0053f167      this->m_numElements = 0;
0053f140  }

0053f16c                                      90 90 90 90                                                              ....

0053f170  void* __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>* this, uint32_t arg2)

0053f170  {
0053f173      class HashTableData<unsigned __int64,ImgTex *>** m_buckets = this->m_buckets;
0053f17b      this->vtable = 0x7c9d34;
0053f17b      
0053f181      if (m_buckets != &this->m_aInplaceBuckets)
0053f184          operator delete[](m_buckets);
0053f184      
0053f18e      this->m_buckets = nullptr;
0053f191      this->m_firstInterestingBucket = nullptr;
0053f194      this->m_numBuckets = 0;
0053f197      this->m_numElements = 0;
0053f197      
0053f19f      if ((arg2 & 1) != 0)
0053f1a2          operator delete(this);
0053f1a2      
0053f1ad      return this;
0053f170  }


0053f1b0  void* __thiscall IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>* this, uint32_t arg2)

0053f1b0  {
0053f1b3      class HashSetData<ImgTex *>** m_buckets = this->m_buckets;
0053f1bb      this->vtable = 0x7c9d38;
0053f1bb      
0053f1c1      if (m_buckets != &this->m_aInplaceBuckets)
0053f1c4          operator delete[](m_buckets);
0053f1c4      
0053f1ce      this->m_buckets = nullptr;
0053f1d1      this->m_firstInterestingBucket = nullptr;
0053f1d4      this->m_numBuckets = 0;
0053f1d7      this->m_numElements = 0;
0053f1d7      
0053f1df      if ((arg2 & 1) != 0)
0053f1e2          operator delete(this);
0053f1e2      
0053f1ed      return this;
0053f1b0  }


0053f1f0  void* __thiscall IntrusiveHashTable<enum PixelFormatID,HashTableData<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<enum PixelFormatID,HashTableData<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *> *,0>* this, uint32_t arg2)

0053f1f0  {
0053f1f3      class HashTableData<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *>** m_buckets = this->m_buckets;
0053f1fb      this->vtable = 0x7c9d3c;
0053f1fb      
0053f201      if (m_buckets != &this->m_aInplaceBuckets)
0053f204          operator delete[](m_buckets);
0053f204      
0053f20e      this->m_buckets = nullptr;
0053f211      this->m_firstInterestingBucket = nullptr;
0053f214      this->m_numBuckets = 0;
0053f217      this->m_numElements = 0;
0053f217      
0053f21f      if ((arg2 & 1) != 0)
0053f222          operator delete(this);
0053f222      
0053f22d      return this;
0053f1f0  }


0053f230  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>* this, uint32_t arg2)

0053f230  {
0053f233      class HashTableData<unsigned long,ImgTex *>** m_buckets = this->m_buckets;
0053f23b      this->vtable = 0x7c9d40;
0053f23b      
0053f241      if (m_buckets != &this->m_aInplaceBuckets)
0053f244          operator delete[](m_buckets);
0053f244      
0053f24e      this->m_buckets = nullptr;
0053f251      this->m_firstInterestingBucket = nullptr;
0053f254      this->m_numBuckets = 0;
0053f257      this->m_numElements = 0;
0053f257      
0053f25f      if ((arg2 & 1) != 0)
0053f262          operator delete(this);
0053f262      
0053f26d      return this;
0053f230  }


0053f270  void __thiscall ImgTex::CreateFromRenderSurface_Internal(class ImgTex* this, class RenderSurface* arg2)

0053f270  {
0053f27c      this->m_pImageData = arg2;
0053f27c      
0053f27f      if (arg2 != 0)
0053f27f      {
0053f281          arg2->vtable->AddRef();
0053f286          class RenderSurface* m_pImageData = this->m_pImageData;
0053f289          uint32_t id = m_pImageData->m_didPalatte.id;
0053f289          
0053f295          if (INVALID_DID.id != id)
0053f295          {
0053f2ac              void var_8;
0053f2ac              this->m_pPalette = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, id, 0xa));
0053f2b3              return;
0053f295          }
0053f295          
0053f2be          if (m_pImageData->m_pSurfaceBits == 0)
0053f2c2              ImgTex::CreateD3DTexture(this);
0053f27f      }
0053f270  }

0053f2ce                                            90 90                                                                ..

0053f2d0  void ImgTex::CopyCSI(uint8_t* arg1, uint32_t arg2, uint32_t arg3, class ImgTex* arg4, uint32_t arg5)

0053f2d0  {
0053f2d6      if (arg4 != 0)
0053f2dc          /* tailcall */
0053f2dc          return ImgTex::TileCSI(arg1, arg2, arg3, arg4, arg5);
0053f2dc      
0053f2e5      int32_t ecx_2 = (arg2 * arg3);
0053f2ec      int32_t ecx_3;
0053f2ec      int32_t edi_2;
0053f2ec      
0053f2ec      if (ecx_2 > 0)
0053f2f8          edi_2 = __memfill_u32(arg1, 0xff00, ecx_2);
0053f2d0  }

0053f2fc                                                                                      90 90 90 90                              ....

0053f300  uint8_t __thiscall ImgTex::Load(class ImgTex* this, class ImgTex* arg2)

0053f300  {
0053f304      class RenderSurface* m_pImageData = this->m_pImageData;
0053f309      enum PixelFormatID format;
0053f309      
0053f309      if (m_pImageData == 0)
0053f313          format = PFID_UNKNOWN;
0053f309      else
0053f30b          format = m_pImageData->pfDesc.format;
0053f30b      
0053f319      class RenderSurface* m_pImageData_1 = arg2->m_pImageData;
0053f31e      enum PixelFormatID eax_1;
0053f31e      
0053f31e      if (m_pImageData_1 == 0)
0053f328          eax_1 = PFID_UNKNOWN;
0053f31e      else
0053f320          eax_1 = m_pImageData_1->pfDesc.format;
0053f320      
0053f32c      if (format == eax_1)
0053f32c      {
0053f330          uint32_t width;
0053f330          
0053f330          if (m_pImageData == 0)
0053f33a              width = 0;
0053f330          else
0053f332              width = m_pImageData->width;
0053f332          
0053f33e          if (m_pImageData_1 == 0)
0053f348              eax_1 = PFID_UNKNOWN;
0053f33e          else
0053f340              eax_1 = m_pImageData_1->width;
0053f340          
0053f34c          if (width == eax_1)
0053f34c          {
0053f350              uint32_t height;
0053f350              
0053f350              if (m_pImageData == 0)
0053f35a                  height = 0;
0053f350              else
0053f352                  height = m_pImageData->height;
0053f352              
0053f35e              if (m_pImageData_1 == 0)
0053f368                  eax_1 = PFID_UNKNOWN;
0053f35e              else
0053f360                  eax_1 = m_pImageData_1->height;
0053f360              
0053f374              if (((height == eax_1 && (m_pImageData != 0 && m_pImageData_1 != 0)) && m_pImageData->vtable->Convert(m_pImageData_1) != 0))
0053f374              {
0053f389                  ImgTex::CreateD3DTexture(this);
0053f38f                  int32_t eax_3;
0053f38f                  eax_3 = 1;
0053f392                  return 1;
0053f374              }
0053f34c          }
0053f32c      }
0053f32c      
0053f381      eax_1 = 0;
0053f384      return 0;
0053f300  }

0053f395                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0053f3a0  void __thiscall ImgTex::GetSubDataIDs(class ImgTex const* this, class QualifiedDataIDArray* arg2)

0053f3a0  {
0053f3a8      uint32_t m_num = this->m_SourceLevels.m_num;
0053f3ae      int32_t ebx;
0053f3ae      ebx = m_num > 1;
0053f3b1      int32_t i = 0;
0053f3b1      
0053f3b5      if (m_num > 0)
0053f3b5      {
0053f3f3          do
0053f3f3          {
0053f3c2              uint32_t ecx = 8;
0053f3c2              
0053f3cb              if ((ebx != 0 && i == 0))
0053f3cd                  ecx = 0xc;
0053f3cd              
0053f3e8              void var_8;
0053f3e8              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->m_SourceLevels.m_data[i].id, 0), ecx);
0053f3f0              i += 1;
0053f3f3          } while (i < this->m_SourceLevels.m_num);
0053f3b5      }
0053f3a0  }

0053f3ff                                                                                               90                                 .

0053f400  class IntrusiveHashIterator<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>* __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0> const* this, class IntrusiveHashIterator<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>* __return, uint64_t const* arg3)

0053f400  {
0053f405      int32_t ebx = *(uint32_t*)((char*)arg3 + 4);
0053f40a      int32_t edi = *(uint32_t*)arg3;
0053f411      int32_t var_10 = 0;
0053f413      uint32_t m_numBuckets = this->m_numBuckets;
0053f414      int32_t var_18 = ebx;
0053f415      int32_t var_1c = edi;
0053f41e      void* edx = &this->m_buckets[_aullrem()];
0053f421      int32_t* ecx_1 = *(uint32_t*)edx;
0053f421      
0053f425      if (ecx_1 != 0)
0053f425      {
0053f432          while ((*(uint32_t*)ecx_1 != edi || ecx_1[1] != ebx))
0053f432          {
0053f434              ecx_1 = ecx_1[2];
0053f434              
0053f439              if (ecx_1 == 0)
0053f439                  break;
0053f432          }
0053f425      }
0053f425      
0053f43b      class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>** result = __return;
0053f440      *(uint32_t*)result = this;
0053f443      result[1] = edx;
0053f446      result[2] = ecx_1;
0053f44a      return result;
0053f400  }

0053f44d                                         90 90 90                                                               ...

0053f450  uint8_t __thiscall SmartArray<IDClass<_tagDataID,32,0>,1>::SetNElements(class SmartArray<IDClass<_tagDataID,32,0>,1>* this, uint32_t const arg2, uint8_t arg3)

0053f450  {
0053f462      uint32_t const i;
0053f462      
0053f462      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
0053f462      {
0053f48c          i = arg2;
0053f48c          
0053f48e          if (arg2 < this->m_num)
0053f48e          {
0053f49f              do
0053f49f              {
0053f494                  this->m_data[i].id = arg3;
0053f49c                  i += 1;
0053f49f              } while (i < this->m_num);
0053f48e          }
0053f462      }
0053f462      else
0053f462      {
0053f464          int32_t eax_1;
0053f464          eax_1 = arg3;
0053f46a          uint32_t const eax_2;
0053f46a          
0053f46a          if (eax_1 == 0)
0053f473              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
0053f46a          else
0053f46c              eax_2 = arg2;
0053f46c          
0053f47b          i = SmartArray<IDClass<_tagDataID,32,0>,1>::grow(this, eax_2);
0053f47b          
0053f482          if (i == 0)
0053f486              return i;
0053f462      }
0053f462      
0053f4a1      this->m_num = arg2;
0053f4a5      i = 1;
0053f4a8      return 1;
0053f450  }

0053f4ab                                   90 90 90 90 90                                                             .....

0053f4b0  void __thiscall ImgTex::ImgTex(class ImgTex* this, class RenderSurface* arg2)

0053f4b0  {
0053f4ba      DBObj::DBObj(this, INVALID_DID.id);
0053f4c4      GraphicsResource::GraphicsResource(&this->vtable);
0053f4cf      this->vtable = 0x7c9d58;
0053f4bf      this->vtable = &ImgTex::`vftable';
0053f4db      __builtin_memset(&this->m_SourceLevels, 0, 0x2d);
0053f508      ImgTex::CreateFromRenderSurface_Internal(this, arg2);
0053f4b0  }

0053f514                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0053f520  void* __thiscall ImgTex::`vector deleting destructor'(class ImgTex* this, uint32_t arg2)

0053f520  {
0053f523      /* tailcall */
0053f523      return ImgTex::`scalar deleting destructor'(((char*)this - 0x30), arg2);
0053f520  }

0053f528                          cc cc cc cc cc cc cc cc                                                          ........

0053f530  uint8_t __fastcall ImgTex::InitLoad(class ImgTex* this)

0053f530  {
0053f53d      class DBObj* eax;
0053f53d      
0053f53d      if (DBCache::IsRunTime() != 0)
0053f53d      {
0053f55b          void __return;
0053f55b          void var_8;
0053f55b          eax = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, ImgTex::GetSurfaceDID(this, &__return)->id, 0xc));
0053f55b          
0053f567          if (eax != 0)
0053f567          {
0053f56c              ImgTex::CreateFromRenderSurface_Internal(this, eax);
0053f571              eax->vtable->Release();
0053f567          }
0053f53d      }
0053f53d      
0053f579      eax = 1;
0053f57f      return 1;
0053f530  }


0053f580  void __thiscall ImgTex::Serialize(class ImgTex* this, class Archive* arg2)

0053f580  {
0053f580      class ImgTex* this_1 = this;
0053f590      DBObj::Serialize(this, arg2);
0053f599      Archive::CheckAlignment(arg2, 1);
0053f5a2      uint8_t* eax = Archive::GetBytes(arg2, 1);
0053f5a2      
0053f5af      if ((eax != 0 && (arg2->m_flags & 1) != 0))
0053f5b1          *(uint8_t*)eax = 2;
0053f5b1      
0053f5b4      uint32_t m_num = this->m_SourceLevels.m_num;
0053f5bb      Archive::CheckAlignment(arg2, 4);
0053f5c4      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
0053f5c4      
0053f5cb      if (eax_1 != 0)
0053f5cb      {
0053f5d1          if ((arg2->m_flags & 1) == 0)
0053f5d7              m_num = *(uint32_t*)eax_1;
0053f5d1          else
0053f5d3              *(uint32_t*)eax_1 = m_num;
0053f5cb      }
0053f5cb      
0053f5d9      eax_1 = arg2->m_flags;
0053f5dc      eax_1 = !(eax_1);
0053f5dc      
0053f5e0      if ((eax_1 & 1) != 0)
0053f5e0      {
0053f5f0          if ((this->m_SourceLevels.m_sizeAndDeallocate & 0x7fffffff) >= m_num)
0053f5f0          {
0053f603              uint32_t i = m_num;
0053f603              
0053f605              if (m_num < this->m_SourceLevels.m_num)
0053f605              {
0053f61b                  do
0053f61b                  {
0053f5e5                      this->m_SourceLevels.m_data[i].id = arg2;
0053f618                      i += 1;
0053f61b                  } while (i < this->m_SourceLevels.m_num);
0053f605              }
0053f605              
0053f5e5              this->m_SourceLevels.m_num = m_num;
0053f5f0          }
0053f5f0          else if (SmartArray<IDClass<_tagDataID,32,0>,1>::grow(&this->m_SourceLevels, m_num) != 0)
0053f5e5              this->m_SourceLevels.m_num = m_num;
0053f5e0      }
0053f5e0      
0053f620      int32_t ebp = 0;
0053f620      
0053f624      if (m_num > 0)
0053f624      {
0053f659          do
0053f659          {
0053f62d              void* edi_2 = &this->m_SourceLevels.m_data[ebp];
0053f634              Archive::CheckAlignment(arg2, 4);
0053f63d              uint8_t* eax_4 = Archive::GetBytes(arg2, 4);
0053f63d              
0053f644              if (eax_4 != 0)
0053f644              {
0053f64a                  if ((arg2->m_flags & 1) == 0)
0053f654                      *(uint32_t*)edi_2 = *(uint32_t*)eax_4;
0053f64a                  else
0053f64e                      *(uint32_t*)eax_4 = *(uint32_t*)edi_2;
0053f644              }
0053f644              
0053f656              ebp += 1;
0053f659          } while (ebp < m_num);
0053f624      }
0053f580  }

0053f60d                                         8d 49 00                                                               .I.
0053f663           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0053f670  class DBObj* ImgTex::Allocate(class ImgTex const* this @ ecx)

0053f670  {
0053f670      /* tailcall */
0053f670      return ImgTex::Allocator();
0053f670  }

0053f675                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0053f680  uint8_t __fastcall IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::grow(class IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>* this)

0053f680  {
0053f680      class IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>* m_numBuckets = this;
0053f682      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0053f68e      m_numBuckets = this->m_numBuckets;
0053f6a5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0053f6a5      
0053f6af      if (eax_2 != bucketSizesEnd_1)
0053f6b8          eax_2 = &eax_2[1];
0053f6af      else
0053f6af      {
0053f6b1          eax_2 -= 4;
0053f6b1          
0053f6b6          if (eax_2 != bucketSizesEnd_1)
0053f6b8              eax_2 = &eax_2[1];
0053f6af      }
0053f6af      
0053f6c8      return IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
0053f680  }

0053f6c9                             90 90 90 90 90 90 90                                                           .......

0053f6d0  void __thiscall IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>(class IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>* this, uint32_t arg2)

0053f6d0  {
0053f6db      arg2 = arg2;
0053f6df      uint8_t edx = ((int8_t)arg2);
0053f6e3      this->m_buckets = nullptr;
0053f6e6      this->m_firstInterestingBucket = nullptr;
0053f6e9      this->m_numBuckets = 0;
0053f6ec      this->m_numElements = 0;
0053f6f0      this->vtable = 0x7c9d38;
0053f6f6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0053f709      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0053f709      
0053f713      if (eax == bucketSizesEnd_1)
0053f715          eax -= 4;
0053f715      
0053f718      uint32_t eax_1 = *(uint32_t*)eax;
0053f71d      this->m_numBuckets = eax_1;
0053f71d      
0053f720      if (eax_1 > 0x17)
0053f736          this->m_buckets = operator new[]((eax_1 << 2));
0053f720      else
0053f725          this->m_buckets = &this->m_aInplaceBuckets;
0053f725      
0053f73c      class HashSetData<ImgTex *>** m_buckets = this->m_buckets;
0053f73f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0053f745      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0053f756      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0053f6d0  }

0053f75f                                                                                               90                                 .

0053f760  void __thiscall IntrusiveHashTable<enum PixelFormatID,HashTableData<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *> *,0>::IntrusiveHashTable<enum PixelFormatID,HashTableData<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *> *,0>(class IntrusiveHashTable<enum PixelFormatID,HashTableData<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *> *,0>* this, uint32_t arg2)

0053f760  {
0053f76b      arg2 = arg2;
0053f76f      uint8_t edx = ((int8_t)arg2);
0053f773      this->m_buckets = nullptr;
0053f776      this->m_firstInterestingBucket = nullptr;
0053f779      this->m_numBuckets = 0;
0053f77c      this->m_numElements = 0;
0053f780      this->vtable = 0x7c9d3c;
0053f786      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0053f799      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0053f799      
0053f7a3      if (eax == bucketSizesEnd_1)
0053f7a5          eax -= 4;
0053f7a5      
0053f7a8      uint32_t eax_1 = *(uint32_t*)eax;
0053f7ad      this->m_numBuckets = eax_1;
0053f7ad      
0053f7b0      if (eax_1 > 0x17)
0053f7c6          this->m_buckets = operator new[]((eax_1 << 2));
0053f7b0      else
0053f7b5          this->m_buckets = &this->m_aInplaceBuckets;
0053f7b5      
0053f7cc      class HashTableData<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *>** m_buckets = this->m_buckets;
0053f7cf      uint32_t ecx_3 = (this->m_numBuckets << 2);
0053f7d5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0053f7e6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0053f760  }

0053f7ef                                               90                                                                 .

0053f7f0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>* this, uint32_t arg2)

0053f7f0  {
0053f7fb      arg2 = arg2;
0053f7ff      uint8_t edx = ((int8_t)arg2);
0053f803      this->m_buckets = nullptr;
0053f806      this->m_firstInterestingBucket = nullptr;
0053f809      this->m_numBuckets = 0;
0053f80c      this->m_numElements = 0;
0053f810      this->vtable = 0x7c9d40;
0053f816      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0053f829      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0053f829      
0053f833      if (eax == bucketSizesEnd_1)
0053f835          eax -= 4;
0053f835      
0053f838      uint32_t eax_1 = *(uint32_t*)eax;
0053f83d      this->m_numBuckets = eax_1;
0053f83d      
0053f840      if (eax_1 > 0x17)
0053f856          this->m_buckets = operator new[]((eax_1 << 2));
0053f840      else
0053f845          this->m_buckets = &this->m_aInplaceBuckets;
0053f845      
0053f85c      class HashTableData<unsigned long,ImgTex *>** m_buckets = this->m_buckets;
0053f85f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0053f865      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0053f876      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0053f7f0  }

0053f87f                                                                                               90                                 .

0053f880  void __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>* this, uint32_t arg2)

0053f880  {
0053f88b      arg2 = arg2;
0053f88f      uint8_t edx = ((int8_t)arg2);
0053f893      this->m_buckets = nullptr;
0053f896      this->m_firstInterestingBucket = nullptr;
0053f899      this->m_numBuckets = 0;
0053f89c      this->m_numElements = 0;
0053f8a0      this->vtable = 0x7c9d34;
0053f8a6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0053f8b9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0053f8b9      
0053f8c3      if (eax == bucketSizesEnd_1)
0053f8c5          eax -= 4;
0053f8c5      
0053f8c8      uint32_t eax_1 = *(uint32_t*)eax;
0053f8cd      this->m_numBuckets = eax_1;
0053f8cd      
0053f8d0      if (eax_1 > 0x17)
0053f8e6          this->m_buckets = operator new[]((eax_1 << 2));
0053f8d0      else
0053f8d5          this->m_buckets = &this->m_aInplaceBuckets;
0053f8d5      
0053f8ec      class HashTableData<unsigned __int64,ImgTex *>** m_buckets = this->m_buckets;
0053f8ef      uint32_t ecx_3 = (this->m_numBuckets << 2);
0053f8f5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0053f906      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0053f880  }

0053f90f                                               90                                                                 .

0053f910  uint8_t __fastcall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::grow(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>* this)

0053f910  {
0053f910      class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>* m_numBuckets = this;
0053f912      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0053f91e      m_numBuckets = this->m_numBuckets;
0053f935      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0053f935      
0053f93f      if (eax_2 != bucketSizesEnd_1)
0053f948          eax_2 = &eax_2[1];
0053f93f      else
0053f93f      {
0053f941          eax_2 -= 4;
0053f941          
0053f946          if (eax_2 != bucketSizesEnd_1)
0053f948              eax_2 = &eax_2[1];
0053f93f      }
0053f93f      
0053f958      return IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
0053f910  }

0053f959                                                                             90 90 90 90 90 90 90                           .......

0053f960  uint8_t __thiscall IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::resize_internal(class IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>* this, uint32_t arg2)

0053f960  {
0053f961      uint32_t ebp = arg2;
0053f961      
0053f96b      if (ebp == this->m_numBuckets)
0053f96b      {
0053f96e          int32_t eax;
0053f96e          eax = 0;
0053f971          return 0;
0053f96b      }
0053f96b      
0053f979      int32_t* i_1 = nullptr;
0053f979      
0053f97d      while (this->m_numElements != 0)
0053f97d      {
0053f986          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0053f98c          int32_t* i_2;
0053f98c          int32_t* m_firstInterestingBucket_2;
0053f98c          
0053f98c          if (this->m_firstInterestingBucket == ecx_1)
0053f98c          {
0053f9a2          label_53f9a2:
0053f9a2              m_firstInterestingBucket_2 = nullptr;
0053f9a4              i_2 = nullptr;
0053f98c          }
0053f98c          else
0053f98c          {
0053f990              while (true)
0053f990              {
0053f990                  class HashSetData<ImgTex *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0053f990                  
0053f996                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0053f996                  {
0053f9a8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0053f9ab                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0053f9ad                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0053f9ad                      break;
0053f996                  }
0053f996                  
0053f99d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0053f99d                  
0053f9a0                  if (&m_firstInterestingBucket[1] == ecx_1)
0053f9a0                      goto label_53f9a2;
0053f990              }
0053f98c          }
0053f98c          
0053f9af          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0053f9af          
0053f9b3          if (eax_4 == i_2)
0053f9c5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0053f9b3          else
0053f9b3          {
0053f9bc              void* edx_1;
0053f9bc              
0053f9bc              do
0053f9bc              {
0053f9b5                  edx_1 = eax_4;
0053f9b7                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0053f9bc              } while (eax_4 != i_2);
0053f9bc              
0053f9c0              if (edx_1 != 0)
0053f9cc                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0053f9c0              else
0053f9c5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0053f9b3          }
0053f9b3          
0053f9cf          this->m_numElements -= 1;
0053f9d2          i_2[1] = i_1;
0053f9da          i_1 = i_2;
0053f97d      }
0053f97d      
0053f9de      class HashSetData<ImgTex *>** m_buckets = this->m_buckets;
0053f9de      
0053f9e6      if (m_buckets != &this->m_aInplaceBuckets)
0053f9e9          operator delete[](m_buckets);
0053f9e9      
0053f9f6      this->m_buckets = nullptr;
0053f9f9      this->m_firstInterestingBucket = nullptr;
0053f9fc      this->m_numBuckets = 0;
0053f9ff      this->m_numElements = 0;
0053fa02      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
0053fa09      void* eax_7;
0053fa09      
0053fa09      if (i_1 != 0)
0053fa09      {
0053fa8b          int32_t* i;
0053fa8b          
0053fa8b          do
0053fa8b          {
0053fa10              uint32_t m_numBuckets = this->m_numBuckets;
0053fa16              i = i_1[1];
0053fa16              
0053fa1f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0053fa1f              {
0053fa21                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0053fa28                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0053fa2e                  arg2 = m_numBuckets;
0053fa3e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0053fa3e                  
0053fa48                  if (eax_8 != bucketSizesEnd_1)
0053fa51                      eax_8 = &eax_8[1];
0053fa48                  else
0053fa48                  {
0053fa4a                      eax_8 -= 4;
0053fa4a                      
0053fa4f                      if (eax_8 != bucketSizesEnd_1)
0053fa51                          eax_8 = &eax_8[1];
0053fa48                  }
0053fa48                  
0053fa59                  IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
0053fa1f              }
0053fa1f              
0053fa62              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
0053fa65              class HashSetData<ImgTex *>** m_buckets_1 = this->m_buckets;
0053fa6b              i_1[1] = m_buckets_1[temp1_1];
0053fa6e              m_buckets_1[temp1_1] = i_1;
0053fa74              eax_7 = &m_buckets_1[temp1_1];
0053fa74              
0053fa79              if (eax_7 < this->m_firstInterestingBucket)
0053fa7b                  this->m_firstInterestingBucket = eax_7;
0053fa7b              
0053fa86              this->m_numElements += 1;
0053fa89              i_1 = i;
0053fa8b          } while (i != 0);
0053fa09      }
0053fa09      
0053fa90      eax_7 = 1;
0053fa93      return 1;
0053f960  }

0053fa96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0053faa0  uint8_t __thiscall IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::add(class IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>* this, class HashSetData<ImgTex *>* arg2)

0053faa0  {
0053faa8      class ImgTex* m_hashKey = arg2->m_hashKey;
0053faab      uint32_t m_numBuckets = this->m_numBuckets;
0053faab      
0053fabe      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0053fabe      {
0053fac2          if (*(uint32_t*)i == m_hashKey)
0053fac2          {
0053fb0e              if (i == 0)
0053fb0e                  break;
0053fb0e              
0053fb12              i = 0;
0053fb15              return 0;
0053fac2          }
0053fabe      }
0053fabe      
0053fad4      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0053fad8          IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::grow(this);
0053fad8      
0053fae1      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0053fae4      class HashSetData<ImgTex *>** m_buckets = this->m_buckets;
0053faea      arg2->m_hashNext = m_buckets[temp1_1];
0053faed      m_buckets[temp1_1] = arg2;
0053faf3      class HashSetData<ImgTex *>** eax_4 = &m_buckets[temp1_1];
0053faf3      
0053faf8      if (eax_4 < this->m_firstInterestingBucket)
0053fafa          this->m_firstInterestingBucket = eax_4;
0053fafa      
0053fb02      this->m_numElements += 1;
0053fb06      uint32_t eax_6;
0053fb06      eax_6 = 1;
0053fb09      return 1;
0053faa0  }

0053fb18                                                                          90 90 90 90 90 90 90 90                          ........

0053fb20  void __thiscall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::remove(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* this, class IntrusiveHashIterator<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1> arg2)

0053fb20  {
0053fb21      class HashTableData<QualifiedDataID,CAsyncGetRequest *>* m_currElement = arg2.m_currElement;
0053fb26      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_currBucket = arg2.m_currBucket;
0053fb2a      class HashTableData<QualifiedDataID,CAsyncGetRequest *>* m_hashNext = *(uint32_t*)m_currBucket;
0053fb2a      
0053fb2e      if (m_hashNext != m_currElement)
0053fb2e      {
0053fb37          class HashTableData<QualifiedDataID,CAsyncGetRequest *>* m_hashNext_1;
0053fb37          
0053fb37          do
0053fb37          {
0053fb30              m_hashNext_1 = m_hashNext;
0053fb32              m_hashNext = m_hashNext->m_hashNext;
0053fb37          } while (m_hashNext != m_currElement);
0053fb37          
0053fb3b          if (m_hashNext_1 != 0)
0053fb3b          {
0053fb51              m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0053fb59              this->m_numElements -= 1;
0053fb5d              return;
0053fb3b          }
0053fb2e      }
0053fb2e      
0053fb40      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
0053fb47      this->m_numElements -= 1;
0053fb20  }


0053fb60  void __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::add_internal(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>* this, class HashTableData<unsigned __int64,ImgTex *>* arg2)

0053fb60  {
0053fb6e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
0053fb72          IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::grow(this);
0053fb72      
0053fb84      int32_t var_c = 0;
0053fb86      uint32_t m_numBuckets = this->m_numBuckets;
0053fb87      int32_t var_14 = *(uint32_t*)((char*)arg2->m_hashKey)[4];
0053fb88      int32_t var_18 = arg2->m_hashKey;
0053fb89      int32_t eax_3 = _aullrem();
0053fb8e      class HashTableData<unsigned __int64,ImgTex *>** m_buckets = this->m_buckets;
0053fb94      class HashTableData<unsigned __int64,ImgTex *>** eax_4 = &m_buckets[eax_3];
0053fb97      arg2->m_hashNext = m_buckets[eax_3];
0053fb9a      *(uint32_t*)eax_4 = arg2;
0053fb9a      
0053fba0      if (eax_4 < this->m_firstInterestingBucket)
0053fba2          this->m_firstInterestingBucket = eax_4;
0053fba2      
0053fba5      this->m_numElements += 1;
0053fb60  }

0053fbac                                      90 90 90 90                                                              ....

0053fbb0  uint8_t __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::resize_internal(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>* this, uint32_t arg2)

0053fbb0  {
0053fbb1      uint32_t ebp = arg2;
0053fbb1      
0053fbbb      if (ebp == this->m_numBuckets)
0053fbbb      {
0053fbbe          int32_t eax;
0053fbbe          eax = 0;
0053fbc1          return 0;
0053fbbb      }
0053fbbb      
0053fbc9      int32_t* i_1 = nullptr;
0053fbc9      
0053fbcd      while (this->m_numElements != 0)
0053fbcd      {
0053fbd6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0053fbdc          int32_t* i_2;
0053fbdc          int32_t* m_firstInterestingBucket_2;
0053fbdc          
0053fbdc          if (this->m_firstInterestingBucket == ecx_1)
0053fbdc          {
0053fbf2          label_53fbf2:
0053fbf2              m_firstInterestingBucket_2 = nullptr;
0053fbf4              i_2 = nullptr;
0053fbdc          }
0053fbdc          else
0053fbdc          {
0053fbe0              while (true)
0053fbe0              {
0053fbe0                  class HashTableData<unsigned __int64,ImgTex *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0053fbe0                  
0053fbe6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0053fbe6                  {
0053fbf8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0053fbfb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0053fbfd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0053fbfd                      break;
0053fbe6                  }
0053fbe6                  
0053fbed                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0053fbed                  
0053fbf0                  if (&m_firstInterestingBucket[1] == ecx_1)
0053fbf0                      goto label_53fbf2;
0053fbe0              }
0053fbdc          }
0053fbdc          
0053fbff          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0053fbff          
0053fc03          if (eax_4 == i_2)
0053fc15              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
0053fc03          else
0053fc03          {
0053fc0c              void* edx_1;
0053fc0c              
0053fc0c              do
0053fc0c              {
0053fc05                  edx_1 = eax_4;
0053fc07                  eax_4 = *(uint32_t*)((char*)eax_4 + 8);
0053fc0c              } while (eax_4 != i_2);
0053fc0c              
0053fc10              if (edx_1 != 0)
0053fc1c                  *(uint32_t*)((char*)edx_1 + 8) = *(uint32_t*)((char*)eax_4 + 8);
0053fc10              else
0053fc15                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 8);
0053fc03          }
0053fc03          
0053fc1f          this->m_numElements -= 1;
0053fc22          i_2[2] = i_1;
0053fc2a          i_1 = i_2;
0053fbcd      }
0053fbcd      
0053fc2e      class HashTableData<unsigned __int64,ImgTex *>** m_buckets = this->m_buckets;
0053fc2e      
0053fc36      if (m_buckets != &this->m_aInplaceBuckets)
0053fc39          operator delete[](m_buckets);
0053fc39      
0053fc46      this->m_buckets = nullptr;
0053fc49      this->m_firstInterestingBucket = nullptr;
0053fc4c      this->m_numBuckets = 0;
0053fc4f      this->m_numElements = 0;
0053fc52      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
0053fc59      void** eax_7;
0053fc59      
0053fc59      if (i_1 != 0)
0053fc59      {
0053fce2          int32_t* i;
0053fce2          
0053fce2          do
0053fce2          {
0053fc60              uint32_t m_numBuckets_1 = this->m_numBuckets;
0053fc66              i = i_1[2];
0053fc66              
0053fc6f              if ((m_numBuckets_1 * 2) < (this->m_numElements + 1))
0053fc6f              {
0053fc71                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0053fc78                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0053fc7e                  arg2 = m_numBuckets_1;
0053fc8e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0053fc8e                  
0053fc98                  if (eax_8 != bucketSizesEnd_1)
0053fca1                      eax_8 = &eax_8[1];
0053fc98                  else
0053fc98                  {
0053fc9a                      eax_8 -= 4;
0053fc9a                      
0053fc9f                      if (eax_8 != bucketSizesEnd_1)
0053fca1                          eax_8 = &eax_8[1];
0053fc98                  }
0053fc98                  
0053fca9                  IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
0053fc6f              }
0053fc6f              
0053fcb8              int32_t var_14_4 = 0;
0053fcb9              uint32_t m_numBuckets = this->m_numBuckets;
0053fcba              int32_t var_1c_2 = i_1[1];
0053fcbb              int32_t var_20_2 = *(uint32_t*)i_1;
0053fcbc              int32_t eax_10 = _aullrem();
0053fcc1              class HashTableData<unsigned __int64,ImgTex *>** m_buckets_1 = this->m_buckets;
0053fcc7              eax_7 = &m_buckets_1[eax_10];
0053fcca              i_1[2] = m_buckets_1[eax_10];
0053fccd              *(uint32_t*)eax_7 = i_1;
0053fccd              
0053fcd2              if (eax_7 < this->m_firstInterestingBucket)
0053fcd4                  this->m_firstInterestingBucket = eax_7;
0053fcd4              
0053fcdd              this->m_numElements += 1;
0053fce0              i_1 = i;
0053fce2          } while (i != 0);
0053fc59      }
0053fc59      
0053fceb      eax_7 = 1;
0053fcee      return 1;
0053fbb0  }

0053fcf1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0053fd00  uint8_t __thiscall HashSet<ImgTex *>::add(class HashSet<ImgTex *>* this, class ImgTex** arg2)

0053fd00  {
0053fd09      class ImgTex* ecx = *(uint32_t*)arg2;
0053fd09      
0053fd1c      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, ecx) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0053fd1c      {
0053fd22          if (*(uint32_t*)i == ecx)
0053fd22          {
0053fd55              if (i == 0)
0053fd55                  break;
0053fd55              
0053fd58              i = 0;
0053fd5b              return 0;
0053fd22          }
0053fd1c      }
0053fd1c      
0053fd2d      void* eax_3 = operator new(8);
0053fd2d      
0053fd37      if (eax_3 == 0)
0053fd37      {
0053fd63          IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::add(&this->m_intrusiveTable, nullptr);
0053fd69          int32_t eax_5;
0053fd69          eax_5 = 1;
0053fd6c          return 1;
0053fd37      }
0053fd37      
0053fd3b      *(uint32_t*)eax_3 = *(uint32_t*)arg2;
0053fd40      *(uint32_t*)((char*)eax_3 + 4) = 0;
0053fd47      IntrusiveHashTable<ImgTex *,HashSetData<ImgTex *> *,1>::add(&this->m_intrusiveTable, eax_3);
0053fd4d      int32_t eax_4;
0053fd4d      eax_4 = 1;
0053fd50      return 1;
0053fd00  }

0053fd6f                                               90                                                                 .

0053fd70  void* __thiscall HashSet<ImgTex *>::`scalar deleting destructor'(class HashSet<ImgTex *>* this, uint32_t arg2)

0053fd70  {
0053fd79      this->vtable = 0x7c9db0;
0053fd7f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0053fd84      class HashSetData<ImgTex *>** m_buckets = this->m_intrusiveTable.m_buckets;
0053fd74      this->m_intrusiveTable.vtable = 0x7c9d38;
0053fd74      
0053fd92      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0053fd95          operator delete[](m_buckets);
0053fd95      
0053fd74      this->m_intrusiveTable.m_buckets = nullptr;
0053fd74      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0053fd74      this->m_intrusiveTable.m_numBuckets = 0;
0053fd74      this->m_intrusiveTable.m_numElements = 0;
0053fd74      
0053fdb0      if ((arg2 & 1) != 0)
0053fdb3          operator delete(this);
0053fdb3      
0053fdbf      return this;
0053fd70  }

0053fdc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0053fdd0  void* __thiscall HashTable<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *,0>::`scalar deleting destructor'(class HashTable<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *,0>* this, uint32_t arg2)

0053fdd0  {
0053fdd9      this->vtable = 0x7c9db4;
0053fddf      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0053fde4      class HashTableData<enum PixelFormatID,HashTable<unsigned long,ImgTex *,0> *>** m_buckets = this->m_intrusiveTable.m_buckets;
0053fdd4      this->m_intrusiveTable.vtable = 0x7c9d3c;
0053fdd4      
0053fdf2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0053fdf5          operator delete[](m_buckets);
0053fdf5      
0053fdd4      this->m_intrusiveTable.m_buckets = nullptr;
0053fdd4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0053fdd4      this->m_intrusiveTable.m_numBuckets = 0;
0053fdd4      this->m_intrusiveTable.m_numElements = 0;
0053fdd4      
0053fe10      if ((arg2 & 1) != 0)
0053fe13          operator delete(this);
0053fe13      
0053fe1f      return this;
0053fdd0  }

0053fe22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0053fe30  void* __thiscall HashTable<unsigned long,ImgTex *,0>::`scalar deleting destructor'(class HashTable<unsigned long,ImgTex *,0>* this, uint32_t arg2)

0053fe30  {
0053fe39      this->vtable = 0x7c9db8;
0053fe3f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0053fe46      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>::~IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>(&this->m_intrusiveTable);
0053fe46      
0053fe50      if ((arg2 & 1) != 0)
0053fe53          operator delete(this);
0053fe53      
0053fe5f      return this;
0053fe30  }

0053fe62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0053fe70  class HashTableData<unsigned __int64,ImgTex *>* __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::remove(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>* this, uint64_t const* arg2)

0053fe70  {
0053fe86      int32_t __return;
0053fe86      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(this, &__return, arg2);
0053fe91      int32_t result;
0053fe91      
0053fe91      if (result == 0)
0053fec2          return 0;
0053fec2      
0053fea0      int32_t var_8;
0053fea0      int32_t var_20_1 = var_8;
0053fea7      int32_t result_1 = result;
0053feaa      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::remove(this, __return);
0053feb7      return result;
0053fe70  }

0053fec5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0053fed0  class ImgTex* __convention("regparm") ImgTex::AllocateTempBuffer(int32_t arg1, int32_t arg2, enum PixelFormatID arg3)

0053fed0  {
0053fed0      int32_t* result_2;
0053fed0      int32_t* result_1 = result_2;
0053fed7      void* eax = operator new(0x88);
0053fee1      int32_t* result;
0053fee1      
0053fee1      if (eax == 0)
0053fee1      {
0053ff43          result = nullptr;
0053ff05      label_53ff05:
0053ff05          
0053ff07          if (result != 0)
0053ff07          {
0053ff11              int32_t* eax_2 = RenderDevice::render_device->vtable->CreateLocalSurface();
0053ff16              result[0x19] = eax_2;
0053ff19              char eax_3;
0053ff19              
0053ff19              if (eax_2 != 0)
0053ff30                  eax_3 = *(uint32_t*)(*(uint32_t*)eax_2 + 0x58)(arg1, arg2, arg3, 1);
0053ff30              
0053ff35              if ((eax_2 == 0 || eax_3 == 0))
0053ff35              {
0053ff3b                  *(uint32_t*)(*(uint32_t*)result + 0x14)();
0053ff42                  return 0;
0053ff35              }
0053ff07          }
0053fee1      }
0053fee1      else
0053fee1      {
0053feec          result = ImgTex::ImgTex(eax, nullptr);
0053fef0          result_1 = result;
0053fef0          
0053fef4          if (result != 0)
0053fef4          {
0053ff00              HashSet<ImgTex *>::add(&ImgTex::custom_texture_table, &result_1);
0053ff00              goto label_53ff05;
0053fef4          }
0053fee1      }
0053fee1      
0053ff4b      return result;
0053fed0  }

0053ff4c                                      90 90 90 90                                                              ....

0053ff50  uint8_t __thiscall HashTable<unsigned __int64,ImgTex *,1>::add(class HashTable<unsigned __int64,ImgTex *,1>* this, uint64_t const* arg2, class ImgTex** arg3)

0053ff50  {
0053ff59      void* eax = operator new(0x18);
0053ff63      void* esi;
0053ff63      
0053ff63      if (eax == 0)
0053ff87          esi = nullptr;
0053ff63      else
0053ff63      {
0053ff6b          *(uint32_t*)eax = *(uint32_t*)arg2;
0053ff74          *(uint32_t*)((char*)eax + 4) = *(uint32_t*)((char*)arg2 + 4);
0053ff77          *(uint32_t*)((char*)eax + 8) = 0;
0053ff80          *(uint32_t*)((char*)eax + 0x10) = *(uint32_t*)arg3;
0053ff83          esi = eax;
0053ff63      }
0053ff63      
0053ff94      void __return;
0053ff94      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_intrusiveTable.vtable, &__return, esi);
0053ff9f      int32_t var_4;
0053ff9f      
0053ff9f      if (var_4 == 0)
0053ff9f      {
0053ffa4          IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::add_internal(&this->m_intrusiveTable, esi);
0053ffaa          int32_t eax_2;
0053ffaa          eax_2 = 1;
0053ffb0          return 1;
0053ff9f      }
0053ff9f      
0053ffb5      if (esi != 0)
0053ffb8          operator delete(esi);
0053ffb8      
0053ffc1      int32_t eax_1;
0053ffc1      eax_1 = 0;
0053ffc7      return 0;
0053ff50  }

0053ffca                                90 90 90 90 90 90                                                            ......

0053ffd0  void* __thiscall HashTable<unsigned __int64,ImgTex *,1>::`scalar deleting destructor'(class HashTable<unsigned __int64,ImgTex *,1>* this, uint32_t arg2)

0053ffd0  {
0053ffd9      this->vtable = 0x7c9dbc;
0053ffdf      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_intrusiveTable);
0053ffe4      class HashTableData<unsigned __int64,ImgTex *>** m_buckets = this->m_intrusiveTable.m_buckets;
0053ffd4      this->m_intrusiveTable.vtable = 0x7c9d34;
0053ffd4      
0053fff2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0053fff5          operator delete[](m_buckets);
0053fff5      
0053ffd4      this->m_intrusiveTable.m_buckets = nullptr;
0053ffd4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0053ffd4      this->m_intrusiveTable.m_numBuckets = 0;
0053ffd4      this->m_intrusiveTable.m_numElements = 0;
0053ffd4      
00540010      if ((arg2 & 1) != 0)
00540013          operator delete(this);
00540013      
0054001f      return this;
0053ffd0  }

00540022        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00540030  void __fastcall ImgTex::~ImgTex(class ImgTex* this)

00540030  {
00540030      class ImgTex* this_1 = this;
00540035      class RenderSurface* m_pImageData = this->m_pImageData;
00540040      this->vtable = 0x7c9d58;
0054003d      this->vtable = &ImgTex::`vftable';
0054003d      
0054004c      if (m_pImageData != 0)
0054004c      {
0054004e          m_pImageData->vtable->Release();
00540053          this->m_pImageData = nullptr;
0054004c      }
0054004c      
00540056      class Palette* m_pPalette = this->m_pPalette;
00540056      
0054005b      if (m_pPalette != 0)
0054005b      {
0054005d          m_pPalette->vtable->Release();
00540062          this->m_pPalette = nullptr;
0054005b      }
0054005b      
00540065      struct IDirect3DTexture9* m_pD3DTexture = this->m_pD3DTexture;
00540065      
0054006a      if (m_pD3DTexture != 0)
0054006a      {
0054006c          m_pD3DTexture->vtable->Release(m_pD3DTexture);
00540072          this->m_pD3DTexture = nullptr;
0054006a      }
0054006a      
00540075      class RenderTexture* m_pRenderTexture = this->m_pRenderTexture;
00540075      
0054007a      if (m_pRenderTexture != 0)
0054007a      {
0054007c          m_pRenderTexture->vtable->Release();
00540081          this->m_pRenderTexture = nullptr;
0054007a      }
0054007a      
00540084      class RenderTexture* m_pSystemMemTexture = this->m_pSystemMemTexture;
00540084      
0054008c      if (m_pSystemMemTexture != 0)
0054008c      {
0054008e          m_pSystemMemTexture->vtable->Release();
00540093          this->m_pSystemMemTexture = nullptr;
0054008c      }
0054008c      
005400a4      class HashTableData<unsigned __int64,ImgTex *>* eax_4;
005400a4      
005400a4      if ((this->m_TextureCode | *(uint32_t*)((char*)this->m_TextureCode)[4]) == 0)
005400a4      {
005400bd          this_1 = this;
005400c1          eax_4 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&ImgTex::custom_texture_table.m_intrusiveTable, &this_1);
005400a4      }
005400a4      else
005400ac          eax_4 = IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::remove(&ImgTex::texture_table.m_intrusiveTable, &this->m_TextureCode);
005400ac      
005400c8      if (eax_4 != 0)
005400cb          operator delete(eax_4);
005400cb      
005400e0      if ((this->m_SourceLevels.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005400e0      {
005400e2          class IDClass<_tagDataID,32,0>* m_data = this->m_SourceLevels.m_data;
005400e2          
005400e7          if (m_data != 0)
005400ed              operator delete[](&m_data[-1]);
005400e0      }
005400e0      
005400f7      GraphicsResource::~GraphicsResource(&this->vtable);
005400fe      DBObj::~DBObj(this);
00540030  }

00540108                          90 90 90 90 90 90 90 90                                                          ........

00540110  class ImgTex* ImgTex::GetTempBuffer(int32_t arg1, int32_t arg2, enum PixelFormatID arg3)

00540110  {
00540112      enum PixelFormatID i = arg3;
00540129      int32_t* eax_3 = ImgTex::temp_buffer_table.m_intrusiveTable.m_buckets[(COMBINE(0, i) % ImgTex::temp_buffer_table.m_intrusiveTable.m_numBuckets)];
0054012d      class ControlSpecification __saved_ecx;
0054012d      void* __saved_ecx_4;
0054012d      
0054012d      if (eax_3 == 0)
0054012d      {
00540146      label_540146:
00540146          __saved_ecx_4 = operator new(0x74);
00540146          
0054014d          if (__saved_ecx_4 == 0)
005401fb              return 0;
005401fb          
00540158          *(uint32_t*)__saved_ecx_4 = 0x7c9db8;
0054015e          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ImgTex *> *,0>(((char*)__saved_ecx_4 + 4), 8);
00540172          void* __saved_ecx_1 = __saved_ecx_4;
00540176          HashTable<ControlSpecification,enum ControlType,0>::add(&ImgTex::temp_buffer_table, &arg3, &__saved_ecx);
0054012d      }
0054012d      else
0054012d      {
00540132          while (*(uint32_t*)eax_3 != i)
00540132          {
00540138              eax_3 = eax_3[1];
00540138              
0054013d              if (eax_3 == 0)
0054013d                  goto label_540146;
00540132          }
00540132          
005401eb          if (eax_3 == 0)
005401eb              goto label_540146;
005401eb          
005401f1          __saved_ecx_4 = eax_3[2];
0054012d      }
0054012d      
00540191      int32_t __saved_ecx_3 = ((arg1 << 0x10) | ((uint32_t)arg2));
00540197      uint32_t temp1_1 = (COMBINE(0, __saved_ecx_3) % *(uint32_t*)((char*)__saved_ecx_4 + 0x6c));
0054019d      int32_t __saved_ecx_2 = __saved_ecx_3;
005401a8      int32_t* i_1;
005401a8      
005401a8      for (i_1 = *(uint32_t*)(*(uint32_t*)((char*)__saved_ecx_4 + 0x64) + (temp1_1 << 2)); i_1 != 0; i_1 = i_1[1])
005401a8      {
005401b2          if (*(uint32_t*)i_1 == __saved_ecx_3)
005401b2          {
005401fe              if (i_1 != 0)
0054020a                  return i_1[2];
0054020a              
005401fe              break;
005401b2          }
005401a8      }
005401a8      
005401bb      enum PixelFormatID i_2 = i;
005401bc      int32_t var_1c = arg2;
005401bd      int32_t var_20 = arg1;
005401be      class ImgTex* result = ImgTex::AllocateTempBuffer(i_1, temp1_1, __saved_ecx_3);
005401ca      arg3 = result;
005401ca      
005401ce      if (result != 0)
005401dc          HashTable<ControlSpecification,enum ControlType,0>::add(__saved_ecx_4, &__saved_ecx, &arg3);
005401dc      
005401e8      return result;
00540110  }

0054020b                                   90 90 90 90 90                                                             .....

00540210  void* __thiscall ImgTex::`scalar deleting destructor'(class ImgTex* this, uint32_t arg2)

00540210  {
00540213      ImgTex::~ImgTex(this);
00540213      
0054021d      if ((arg2 & 1) != 0)
00540220          operator delete(this);
00540220      
0054022b      return this;
00540210  }

0054022e                                            90 90                                                                ..

00540230  uint8_t __thiscall ImgTex::Combine(class ImgTex* this, class ImgTex* arg2, class Palette const* arg3, uint8_t arg4)

00540230  {
00540230      class ImgTex* this_1 = this;
00540235      class RenderSurface* m_pImageData = arg2->m_pImageData;
00540235      
0054023e      if (m_pImageData != 0)
0054023e      {
00540240          enum PixelFormatID format = m_pImageData->pfDesc.format;
00540240          
00540249          if (format == PFID_P8)
00540249          {
0054025f          label_54025f:
0054025f              format = arg4;
00540261              char temp1 = format;
00540261              format = -(format);
00540265              uint32_t height_1 = m_pImageData->height;
0054026c              uint32_t width_1 = m_pImageData->width;
00540286              class RenderSurface* eax_1 = RenderDevice::render_device->vtable->CreateSurface();
0054028f              this->m_pImageData = eax_1;
0054028f              
00540292              if (eax_1 == 0)
00540325                  eax_1 = 0;
00540292              else if (eax_1->vtable->Create(width_1, height_1, ((format - format) + 0x16), 1) == 0)
00540325                  eax_1 = 0;
005402a6              else
005402a6              {
005402ac                  class RenderSurface* m_pImageData_1 = arg2->m_pImageData;
005402b1                  uint32_t height;
005402b1                  
005402b1                  if (m_pImageData_1 == 0)
005402bb                      height = 0;
005402b1                  else
005402b3                      height = m_pImageData_1->height;
005402b3                  
005402bf                  uint32_t width;
005402bf                  
005402bf                  if (m_pImageData_1 == 0)
005402c9                      width = 0;
005402bf                  else
005402c1                      width = m_pImageData_1->width;
005402c1                  
005402d3                  class RenderSurface* esi = ImgTex::GetTempBuffer(width, height, ((format - format) + 0x16));
005402d3                  
005402da                  if (esi == 0)
00540325                      eax_1 = 0;
005402da                  else
005402da                  {
005402de                      eax_1 = ImgTex::GetData(esi);
005402de                      
005402e5                      if (eax_1 == 0)
00540325                          eax_1 = 0;
005402e5                      else
005402e5                      {
005402f3                          ImgTex::CopyIntoData(eax_1, esi->sourceData.pfDesc.flags, arg2, arg3, arg4);
005402f8                          uint8_t* sourceBits = esi->sourceData.sourceBits;
005402f8                          
00540300                          if (sourceBits != 0)
00540300                          {
00540302                              esi->sourceData.pfDesc.flags = 0;
0054030b                              *(uint32_t*)(*(uint32_t*)sourceBits + 0x64)();
0054030e                              esi->sourceData.pfDesc.alphaBitMask = 0;
00540300                          }
00540300                          
00540321                          eax_1 = 1;
00540321                          
00540323                          if (ImgTex::Load(this, esi) == 0)
00540325                              eax_1 = 0;
005402e5                      }
005402da                  }
005402a6              }
005402a6              
0054032e              return eax_1;
00540249          }
00540249          
00540252          if ((m_pImageData != 0 && format == PFID_INDEX16))
00540252              goto label_54025f;
0054023e      }
0054023e      
00540254      m_pImageData = 0;
00540257      return 0;
00540230  }

00540331                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00540340  uint8_t __thiscall ImgTex::LoadCSI(class ImgTex* this, uint8_t* arg2, uint32_t arg3, uint32_t arg4)

00540340  {
00540340      class ImgTex* this_1 = this;
00540355      class RenderSurface* eax_1 = RenderDevice::render_device->vtable->CreateSurface();
0054035a      this->m_pImageData = eax_1;
0054035a      
0054035d      if ((eax_1 != 0 && eax_1->vtable->Create(arg3, arg4, 0x16, 1) != 0))
0054035d      {
00540384          eax_1 = ImgTex::GetTempBuffer(arg3, arg4, PFID_X8R8G8B8);
00540384          
00540390          if (eax_1 != 0)
00540390          {
00540394              uint8_t* eax_2 = ImgTex::GetData(eax_1);
00540394              
0054039d              if (eax_2 != 0)
0054039d              {
0054039f                  uint8_t* sourceBits = eax_1->sourceData.sourceBits;
005403a7                  int32_t edx_2;
005403a7                  
005403a7                  if (sourceBits == 0)
005403b1                      edx_2 = 0;
005403a7                  else
005403a9                      edx_2 = *(uint32_t*)(sourceBits + 0xa4);
005403a9                  
005403b5                  int32_t ecx_3;
005403b5                  
005403b5                  if (sourceBits == 0)
005403bf                      ecx_3 = 0;
005403b5                  else
005403b7                      ecx_3 = *(uint32_t*)(sourceBits + 0xa0);
005403b7                  
005403d2                  ImgTex::CSI2TGA(this, arg2, arg3, arg4, eax_2, ecx_3, edx_2, eax_1->sourceData.pfDesc.flags);
005403d7                  uint8_t* sourceBits_1 = eax_1->sourceData.sourceBits;
005403d7                  
005403dc                  if (sourceBits_1 != 0)
005403dc                  {
005403de                      eax_1->sourceData.pfDesc.flags = 0;
005403e7                      *(uint32_t*)(*(uint32_t*)sourceBits_1 + 0x64)();
005403ea                      eax_1->sourceData.pfDesc.alphaBitMask = 0;
005403dc                  }
005403dc                  
005403fb                  if (ImgTex::Load(this, eax_1) != 0)
005403fb                  {
00540400                      eax_2 = 1;
00540404                      return 1;
005403fb                  }
0054039d              }
0054039d              
0054040a              eax_2 = 0;
0054040e              return 0;
00540390          }
0054035d      }
0054035d      
00540414      eax_1 = 0;
00540418      return 0;
00540340  }

0054041b                                                                                   90 90 90 90 90                             .....

00540420  class ImgTex* ImgTex::CreateCombinedTexture(class ImgTex* arg1, class Palette const* arg2, uint8_t arg3)

00540420  {
00540425      class Palette* ebp = arg2;
0054042d      int32_t esi = 0;
0054042f      int32_t ebx = 0;
0054042f      
00540434      if (ebp->m_pMaintainer != 0)
00540434      {
00540442          esi = (0 | ebp->m_DID.id);
00540446          ebx = (arg1->m_DID.id | 0);
00540434      }
00540434      
00540457      int32_t var_14 = esi;
0054045b      int32_t var_10 = ebx;
0054045f      int32_t var_1c = esi;
00540463      int32_t var_18 = ebx;
00540467      int32_t* result = nullptr;
00540469      void __return;
00540469      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&ImgTex::texture_table.m_intrusiveTable, &__return, &var_1c);
00540474      void* var_4;
00540474      
00540474      if (var_4 != 0)
00540474      {
00540476          result = *(uint32_t*)((char*)var_4 + 0x10);
0054047d          *(uint32_t*)(*(uint32_t*)result + 0x10)();
00540474      }
00540474      
00540482      if (result == 0)
00540482      {
00540489          void* eax_5 = operator new(0x88);
00540489          
00540493          if (eax_5 == 0)
00540510              return 0;
00540510          
0054049d          result = ImgTex::ImgTex(eax_5, result);
005404a1          arg2 = result;
005404a1          
005404a5          if (result != 0)
005404a5          {
005404bb              if (ImgTex::Combine(result, arg1, ebp, arg3) == 0)
005404bb              {
00540504                  *(uint32_t*)(*(uint32_t*)result + 0x14)();
00540510                  return 0;
005404bb              }
005404bb              
005404c1              if ((esi | ebx) == 0)
005404c1              {
005404f1                  HashSet<ImgTex *>::add(&ImgTex::custom_texture_table, &arg2);
005404ff                  return result;
005404c1              }
005404c1              
005404d2              result[0x1c] = esi;
005404d5              result[0x1d] = ebx;
005404d8              HashTable<unsigned __int64,ImgTex *,1>::add(&ImgTex::texture_table, &var_14, &arg2);
005404a5          }
00540482      }
00540482      
005404e6      return result;
00540420  }

00540511                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00540520  class ImgTex* ImgTex::CreateLScapeTexture(uint8_t* arg1, uint32_t arg2, uint32_t arg3)

00540520  {
00540526      void* eax = operator new(0x88);
00540526      
00540530      if (eax == 0)
00540581          return 0;
00540581      
00540537      class ImgTex* result = ImgTex::ImgTex(eax, nullptr);
00540540      class ImgTex* __saved_ecx_1 = result;
00540540      
00540544      if (result != 0)
00540544      {
00540557          ImgTex::fCurrentTextureScale = FULL_RES;
00540557          
00540568          if (ImgTex::LoadCSI(result, arg1, arg2, arg3) == 0)
00540568          {
00540582              result->vtable->Release();
0054058d              return 0;
00540568          }
00540568          
00540574          int32_t __saved_ecx;
00540574          HashSet<ImgTex *>::add(&ImgTex::custom_texture_table, &__saved_ecx);
00540544      }
00540544      
0054057d      return result;
00540520  }

0054058e                                            90 90                                                                ..

00540590  int32_t __thiscall NetAuthenticator::CGrowBuffer::Grow(class NetAuthenticator::CGrowBuffer* this, uint32_t arg2)

00540590  {
0054059d      if (arg2 > this->m_cbAllocatedSize)
0054059d      {
005405a2          operator delete[](this->m_pBuf);
005405a8          this->m_cbAllocatedSize = arg2;
005405b3          this->m_pBuf = operator new[](arg2);
0054059d      }
0054059d      
005405b5      uint8_t* m_pBuf = this->m_pBuf;
005405b7      this->m_cbCurSize = arg2;
005405bf      int32_t result;
005405bf      result = m_pBuf != 0;
005405c3      return result;
00540590  }

005405c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005405d0  int32_t STREAMPACK_BYTES(enum STREAMTYPE arg1, uint8_t* arg2, uint32_t arg3, void** arg4, uint32_t* arg5)

005405d0  {
005405d9      if (arg3 > 0)
005405d9      {
005405e2          if (arg1 == STREAM_GETPACKSIZE)
005405e2          {
00540610              *(uint32_t*)arg5 -= arg3;
00540618              return 1;
005405e2          }
005405e2          
005405e5          if (arg1 == 1)
005405e5          {
0054062a              int32_t esi_4;
0054062a              int32_t edi_4;
0054062a              edi_4 = __builtin_memcpy(*(uint32_t*)arg4, arg2, ((arg3 >> 2) << 2));
00540631              __builtin_memcpy(edi_4, esi_4, (arg3 & 3));
0054063b              *(uint32_t*)arg4 += arg3;
00540643              *(uint32_t*)arg5 -= arg3;
0054064b              return 1;
005405e5          }
005405e5          
005405e8          if (arg1 == 2)
005405e8          {
005405ea              int32_t* edx_1 = arg4;
005405fb              int32_t esi_2;
005405fb              int32_t edi_2;
005405fb              edi_2 = __builtin_memcpy(arg2, *(uint32_t*)edx_1, ((arg3 >> 2) << 2));
00540602              __builtin_memcpy(edi_2, esi_2, (arg3 & 3));
00540604              *(uint32_t*)edx_1 += arg3;
00540610              *(uint32_t*)arg5 -= arg3;
00540618              return 1;
005405e8          }
005405d9      }
005405d9      
00540651      return 0;
005405d0  }

00540652                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00540660  uint32_t __fastcall NetAuthenticator::GetPackSize(class NetAuthenticator const* this)

00540660  {
00540663      struct NetAuthenticator::VTable* vtable = this->vtable;
00540673      int32_t var_4 = 0;
00540677      int32_t var_8 = 0;
0054067b      vtable->StreamPack(0, &var_4, &var_8);
00540688      return -(var_8);
00540660  }

00540689                             90 90 90 90 90 90 90                                                           .......

00540690  uint32_t __thiscall StreamPackObj::Pack(class StreamPackObj* this, void** arg2, uint32_t arg3)

00540690  {
00540697      if (*(uint32_t*)arg2 == 0)
0054069e          return this->vtable->GetPackSize();
0054069e      
005406a4      uint32_t esi = arg3;
005406a1      this->vtable->StreamPack(1, arg2, &arg3);
005406be      return (esi - arg3);
00540690  }

005406c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005406d0  int32_t __thiscall StreamPackObj::UnPack(class StreamPackObj* this, void** arg2, uint32_t arg3)

005406d0  {
005406e1      return this->vtable->StreamPack(2, arg2, &arg3);
005406d0  }

005406e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005406f0  int32_t STREAMPACK(enum STREAMTYPE arg1, uint32_t* arg2, void** arg3, uint32_t* arg4)

005406f0  {
005406f8      if (arg1 == STREAM_GETPACKSIZE)
005406f8      {
00540768          *(uint32_t*)arg4 -= 4;
00540771          return 1;
005406f8      }
005406f8      
005406fb      if (arg1 == 1)
005406fb      {
00540747          if (*(uint32_t*)arg4 >= 4)
00540747          {
00540755              **(uint32_t**)arg3 = *(uint32_t*)arg2;
00540757              *(uint32_t*)arg3 += 4;
00540747          }
00540747          
0054075a          *(uint32_t*)arg4 -= 4;
00540763          return 1;
005406fb      }
005406fb      
005406fe      if (arg1 != 2)
00540703          return 0;
00540703      
0054070f      void* ecx = *(uint32_t*)arg3;
0054070f      
00540712      if (*(uint32_t*)arg4 < 4)
00540712      {
0054071f          *(uint32_t*)arg4 += (ecx * 0);
00540722          return 0;
00540712      }
00540712      
00540729      *(uint32_t*)arg2 = *(uint32_t*)ecx;
0054072b      *(uint32_t*)arg3 += 4;
00540737      *(uint32_t*)arg4 += ((char*)ecx - *(uint32_t*)arg3);
0054073f      return 1;
005406f0  }

00540772                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00540780  int32_t __thiscall NetAuthenticator::CGrowBuffer::StreamPack(class NetAuthenticator::CGrowBuffer* this, enum STREAMTYPE arg2, void** arg3, uint32_t* arg4)

00540780  {
005407a3      if (STREAMPACK(arg2, &this->m_cbCurSize, arg3, arg4) != 0)
005407a3      {
005407a8          if (arg2 != STREAM_UNPACK)
005407a8              goto label_5407b8;
005407a8          
005407aa          uint32_t m_cbCurSize = this->m_cbCurSize;
005407aa          
005407ae          if (m_cbCurSize <= *(uint32_t*)arg4)
005407ae          {
005407b3              NetAuthenticator::CGrowBuffer::Grow(this, m_cbCurSize);
005407b8          label_5407b8:
005407b8              uint32_t m_cbCurSize_1 = this->m_cbCurSize;
005407bc              int32_t eax_1;
005407bc              
005407bc              if (m_cbCurSize_1 != 0)
005407c9                  eax_1 = STREAMPACK_BYTES(arg2, this->m_pBuf, m_cbCurSize_1, arg3, arg4);
005407c9              
005407d3              if ((m_cbCurSize_1 == 0 || eax_1 != 0))
005407de                  return 1;
005407ae          }
005407a3      }
005407a3      
005407e7      return 0;
00540780  }

005407ea                                90 90 90 90 90 90                                                            ......

005407f0  void __fastcall NetAuthenticator::NetAuthenticator(class NetAuthenticator* this)

005407f0  {
005407fd      this->vtable = 0x7c9dd8;
00540803      this->m_dwAuthType = 0;
00540806      this->m_dwAuthFlags = 0;
00540809      this->m_dwConnectionSequenceNumber = 0;
0054080c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00540817      this->m_Account.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0054081a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0054081c      this->m_Account.fIsDarkMajestyExpansion_ = 0;
0054081f      this->m_Account.m_fIsThroneOfDestinyExpansion = 0;
00540822      this->m_Account.m_fPreOrderedThroneOfDestinyExpansion = 0;
00540825      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00540831      this->m_AccountToLogonAs.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00540834      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00540836      __builtin_memset(&this->m_AccountToLogonAs.fIsDarkMajestyExpansion_, 0, 0x24);
005407f0  }

00540857                                                                       90 90 90 90 90 90 90 90 90                         .........

00540860  uint32_t __thiscall NetAuthenticator::Pack(class NetAuthenticator* this, void** arg2, uint32_t arg3)

00540860  {
00540864      bool cond:0 = *(uint32_t*)arg2 != 0;
00540868      uint32_t esi = arg3;
0054086c      arg3 = esi;
0054086c      
00540870      if (!(cond:0))
00540878          return this->vtable->GetPackSize();
00540878      
0054087b      this->vtable->StreamPack(1, arg2, &arg3);
00540891      return (esi - arg3);
00540860  }

00540894                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005408a0  int32_t STREAMPACK_STREAMPACKOBJ(enum STREAMTYPE arg1, class NetAuthenticator::CGrowBuffer* arg2, void** arg3, uint32_t* arg4)

005408a0  {
005408b8      return NetAuthenticator::CGrowBuffer::StreamPack(arg2, arg1, arg3, arg4);
005408a0  }

005408b9                                                                             90 90 90 90 90 90 90                           .......

005408c0  void* __thiscall NetAuthenticator::`scalar deleting destructor'(class NetAuthenticator* this, uint32_t arg2)

005408c0  {
005408c3      NetAuthenticator::~NetAuthenticator(this);
005408c3      
005408cd      if ((arg2 & 1) != 0)
005408d0          operator delete(this);
005408d0      
005408db      return this;
005408c0  }

005408de                                                                                            90 90                                ..

005408e0  int32_t STREAMPACK(enum STREAMTYPE arg1, class accountID* arg2, void** arg3, uint32_t* arg4)

005408e0  {
005408e8      if (arg1 == STREAM_GETPACKSIZE)
005408e8      {
00540942          int32_t eax_10 = (arg2->m_buffer->m_len - 1);
00540943          int32_t ecx_5 = 0;
00540943          
0054094a          if (eax_10 >= 0xffff)
0054094c              ecx_5 = 4;
0054094c          
00540957          int32_t eax_12 = (((ecx_5 + eax_10) + 2) & 3);
00540957          
0054095a          if (eax_12 != 0)
0054095a          {
00540969              *(uint32_t*)arg4 -= ((4 - eax_12) + ((ecx_5 + eax_10) + 2));
00540971              return 1;
0054095a          }
0054095a          
0054097a          *(uint32_t*)arg4 -= ((ecx_5 + eax_10) + 2);
00540982          return 1;
005408e8      }
005408e8      
005408eb      if (arg1 == 1)
005408eb      {
0054092b          uint32_t eax_7 = AC1Legacy::PStringBase<char>::Pack(arg2, arg3, *(uint32_t*)arg4);
00540930          *(uint32_t*)arg4 -= eax_7;
00540938          return 1;
005408eb      }
005408eb      
005408ee      if (arg1 != 2)
005408f3          return 0;
005408f3      
00540904      void* esi = *(uint32_t*)arg3;
00540908      int32_t result = AC1Legacy::PStringBase<char>::UnPack(arg2, arg3, *(uint32_t*)arg4);
00540916      *(uint32_t*)arg4 += ((char*)esi - *(uint32_t*)arg3);
0054091a      return result;
005408e0  }

00540983           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00540990  uint8_t __thiscall NetAuthenticator::SetToAuthType(class NetAuthenticator* this, uint32_t arg2, class accountID const* arg3, uint32_t arg4, uint8_t const* arg5)

00540990  {
0054099d      this->m_dwAuthType = arg2;
005409ab      AC1Legacy::PStringBase<char>::set(&this->m_Account, &arg3->m_buffer->m_data);
005409a5      this->m_Account.fIsDarkMajestyExpansion_ = arg3->fIsDarkMajestyExpansion_;
005409a5      this->m_Account.m_fIsThroneOfDestinyExpansion = arg3->m_fIsThroneOfDestinyExpansion;
005409a5      this->m_Account.m_fPreOrderedThroneOfDestinyExpansion = arg3->m_fPreOrderedThroneOfDestinyExpansion;
005409a5      
005409c8      if (arg5 != 0)
005409c8      {
005409d1          if (arg4 > this->m_ExtraData.m_cbAllocatedSize)
005409d1          {
005409d7              operator delete[](this->m_ExtraData.m_pBuf);
005409dd              this->m_ExtraData.m_cbAllocatedSize = arg4;
005409e8              this->m_ExtraData.m_pBuf = operator new[](arg4);
005409d1          }
005409d1          
005409ef          this->m_ExtraData.m_cbCurSize = arg4;
005409f8          int32_t esi_2;
005409f8          int32_t edi_2;
005409f8          edi_2 = __builtin_memcpy(this->m_ExtraData.m_pBuf, arg5, ((arg4 >> 2) << 2));
005409ff          __builtin_memcpy(edi_2, esi_2, (arg4 & 3));
005409c8      }
005409c8      
00540a03      int32_t eax;
00540a03      eax = 1;
00540a06      return 1;
00540990  }

00540a09                             90 90 90 90 90 90 90                                                           .......

00540a10  int32_t __thiscall NetAuthenticator::StreamPack(class NetAuthenticator* this, enum STREAMTYPE arg2, void** arg3, uint32_t* arg4)

00540a10  {
00540a33      if ((((STREAMPACK(arg2, &this->m_dwAuthType, arg3, arg4) != 0 && STREAMPACK(arg2, &this->m_dwAuthFlags, arg3, arg4) != 0) && STREAMPACK(arg2, &this->m_dwConnectionSequenceNumber, arg3, arg4) != 0) && STREAMPACK(arg2, &this->m_Account, arg3, arg4) != 0))
00540a33      {
00540a72          int32_t eax_7;
00540a72          
00540a72          if ((this->m_dwAuthFlags & 2) != 0)
00540a7b              eax_7 = STREAMPACK(arg2, &this->m_AccountToLogonAs, arg3, arg4);
00540a7b          
00540a85          if ((((this->m_dwAuthFlags & 2) == 0 || eax_7 != 0) && NetAuthenticator::CGrowBuffer::StreamPack(&this->m_CryptoData, arg2, arg3, arg4) != 0))
00540a85          {
00540a9d              int32_t eax_9 = STREAMPACK_STREAMPACKOBJ(arg2, &this->m_ExtraData, arg3, arg4);
00540aa6              int32_t eax_10 = -(eax_9);
00540aaf              return -((eax_10 - eax_10));
00540a85          }
00540a33      }
00540a33      
00540ab8      return 0;
00540a10  }

00540abb                                                                                   90 90 90 90 90                             .....

00540ac0  class PacketController* PacketController::Instance()

00540ac0  {
00540ac5      return PacketController::pcontrol_;
00540ac0  }

00540ac6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00540ad0  int32_t __thiscall PacketController::AddReceiveQueue(class PacketController* this, uint16_t arg2, class NIList<NetBlob *>* arg3)

00540ad0  {
00540ad9      this->netQueues_[((uint32_t)arg2)] = arg3;
00540ae2      return 1;
00540ad0  }

00540ae5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00540af0  void __thiscall PacketController::EnqueueRecip(class PacketController* this, class RecipientData* arg2)

00540af0  {
00540afc      if (arg2->onQueue_ == 0)
00540afc      {
00540afe          arg2->onQueue_ = 1;
00540b0b          arg2->next_ = this->haveNaks_;
00540b11          this->haveNaks_ = arg2;
00540afc      }
00540af0  }

00540b17                                                                       90 90 90 90 90 90 90 90 90                         .........

00540b20  uint8_t __thiscall PacketController::SendBlob(class PacketController* this, class NetBlob* arg2, uint16_t arg3)

00540b20  {
00540b29      int32_t ebx;
00540b29      ebx = 0;
00540b24      this->m_pSendBlobCallsCounter->vtable->IncCounter();
00540b36      class RecipientData* ecx_2 = this->recipients_[((uint32_t)arg3)];
00540b36      
00540b3b      if (ecx_2 != 0)
00540b3b      {
00540b41          class NetBlob* var_c_1 = arg2;
00540b42          ebx = 1;
00540b44          RecipientData::EnqueueBlob(ecx_2, arg2);
00540b3b      }
00540b3b      
00540b4d      return ebx;
00540b20  }


00540b50  class RecipientData* __thiscall PacketController::GetRecipient(class PacketController* this, uint16_t arg2)

00540b50  {
00540b5b      return this->recipients_[((uint32_t)arg2)];
00540b50  }

00540b5e                                                                                            90 90                                ..

00540b60  void* __thiscall PQueueArray<double,void *>::`scalar deleting destructor'(class PQueueArray<double,void *>* this, uint32_t arg2)

00540b60  {
00540b63      class PQueueArray<double,void *>::PQueueNode* A = this->A;
00540b67      this->vtable = 0x7c9e18;
00540b6d      operator delete[](A);
00540b6d      
00540b7b      if ((arg2 & 1) != 0)
00540b7e          operator delete(this);
00540b7e      
00540b89      return this;
00540b60  }

00540b8c                                      90 90 90 90                                                              ....

00540b90  void __fastcall AC1Legacy::PQueueArray<double>::_ExpandNodes(class AC1Legacy::PQueueArray<double>* this)

00540b90  {
00540b9d      void* eax_2 = operator new[]((this->allocatedNodes << 5));
00540ba8      int32_t ecx_1 = (this->allocatedNodes << 4);
00540bad      class AC1Legacy::PQueueArray<double>::PQueueNode* ebp = eax_2;
00540bb4      int32_t esi_1;
00540bb4      int32_t edi_1;
00540bb4      edi_1 = __builtin_memcpy(ebp, this->A, ((ecx_1 >> 2) << 2));
00540bbb      __builtin_memcpy(edi_1, esi_1, (ecx_1 & 3));
00540bc0      class AC1Legacy::PQueueArray<double>::PQueueNode* A = this->A;
00540bc6      this->allocatedNodes <<= 1;
00540bc9      operator delete[](A);
00540bd3      this->A = ebp;
00540b90  }

00540bd9                                                                             90 90 90 90 90 90 90                           .......

00540be0  void __thiscall AC1Legacy::PQueueArray<double>::_Heapify(class AC1Legacy::PQueueArray<double>* this, int32_t arg2)

00540be0  {
00540be9      int32_t edx = arg2;
00540bf2      class AC1Legacy::PQueueArray<double>* this_1 = this;
00540bf6      void* __offset(AC1Legacy::PQueueArray<double>::PQueueNode, -0x10) edi_1 = (this->A - 0x10);
00540bf6      
00540c00      while (true)
00540c00      {
00540c00          int32_t curNumNodes = this->curNumNodes;
00540c03          int32_t esi_1 = (edx * 2);
00540c10          bool p_1;
00540c10          
00540c10          if (esi_1 <= curNumNodes)
00540c10          {
00540c17              long double x87_r7_1 = ((long double)*(uint64_t*)((esi_1 << 4) + edi_1));
00540c1f              long double temp1_1 = ((long double)*(uint64_t*)((edx << 4) + edi_1));
00540c1f              (x87_r7_1 - temp1_1);
00540c22              int32_t eax_2;
00540c22              eax_2 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00540c24              p_1 = /* p_1 = unimplemented  {test ah, 0x5} */;
00540c10          }
00540c10          
00540c27          if ((esi_1 > curNumNodes || p_1))
00540c29              esi_1 = edx;
00540c29          
00540c2f          if (((edx * 2) + 1) <= curNumNodes)
00540c2f          {
00540c36              long double x87_r7_2 = ((long double)*(uint64_t*)((((edx * 2) + 1) << 4) + edi_1));
00540c3e              long double temp2_1 = ((long double)*(uint64_t*)((esi_1 << 4) + edi_1));
00540c3e              (x87_r7_2 - temp2_1);
00540c41              int32_t eax_4;
00540c41              eax_4 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00540c43              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00540c43              
00540c46              if (!(p_2))
00540c48                  esi_1 = ((edx * 2) + 1);
00540c2f          }
00540c2f          
00540c4c          if (esi_1 == edx)
00540c4c              break;
00540c4c          
00540c51          void* eax_5 = ((edx << 4) + edi_1);
00540c56          int32_t ecx_4 = *(uint32_t*)eax_5;
00540c5c          int32_t ecx_5 = *(uint32_t*)((char*)eax_5 + 4);
00540c63          int32_t ecx_6 = *(uint32_t*)((char*)eax_5 + 8);
00540c66          int32_t edx_3 = *(uint32_t*)((char*)eax_5 + 0xc);
00540c76          void* edx_4 = ((esi_1 << 4) + edi_1);
00540c7d          *(uint32_t*)eax_5 = *(uint32_t*)edx_4;
00540c82          *(uint32_t*)((char*)eax_5 + 4) = *(uint32_t*)((char*)edx_4 + 4);
00540c88          *(uint32_t*)((char*)eax_5 + 8) = *(uint32_t*)((char*)edx_4 + 8);
00540c8e          *(uint32_t*)((char*)eax_5 + 0xc) = *(uint32_t*)((char*)edx_4 + 0xc);
00540c99          *(uint32_t*)edx_4 = ecx_4;
00540c9f          *(uint32_t*)((char*)edx_4 + 4) = ecx_5;
00540ca6          *(uint32_t*)((char*)edx_4 + 8) = ecx_6;
00540ca9          *(uint32_t*)((char*)edx_4 + 0xc) = edx_3;
00540cac          this = this_1;
00540cb0          edx = esi_1;
00540c00      }
00540be0  }


00540cc0  void __fastcall PacketController::~PacketController(class PacketController* this)

00540cc0  {
00540cc4      this->vtable = &PacketController::`vftable';
00540cc4      
00540cf3      for (int32_t* i = nullptr; i < 0x400; i = &i[1])
00540cf3      {
00540cd3          class RecipientData* edi_1 = *(uint32_t*)((char*)i + this->recipients_);
00540cd3          
00540cd8          if (edi_1 != 0)
00540cd8          {
00540cdc              RecipientData::~RecipientData(edi_1);
00540ce2              operator delete(edi_1);
00540cd8          }
00540cf3      }
00540cf3      
00540cf9      operator delete[](this->recipients_);
00540cfe      PacketController::pcontrol_ = nullptr;
00540d08      class PerfMonCounter<unsigned __int64>* m_pSendBlobCallsCounter = this->m_pSendBlobCallsCounter;
00540d08      
00540d1f      if ((InterlockedDecrement(&m_pSendBlobCallsCounter->m_cRef) == 0 && m_pSendBlobCallsCounter != 0))
00540d21          m_pSendBlobCallsCounter->vtable->__vecDelDtor(1);
00540d21      
00540d29      this->m_pSendBlobCallsCounter = nullptr;
00540d34      this->FlowControlTimers.vtable = 0x7c9e18;
00540d3b      operator delete[](this->FlowControlTimers.A);
00540cc0  }

00540d46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00540d50  int32_t __fastcall PacketController::GetNonEphemeralID(class PacketController* this)

00540d50  {
00540d5a      if (PacketController::pcontrol_ == 0)
00540d61          return 0;
00540d61      
00540d65      int32_t result = this->m_curNonEphemeralID;
00540d6a      int32_t var_10 = *(uint32_t*)((char*)this->m_curNonEphemeralID)[4];
00540d70      int32_t eax_1;
00540d70      int32_t edx_1;
00540d70      eax_1 = NetBlobIDUtils::NextNonEphemeralSequenceID(result);
00540d78      this->m_curNonEphemeralID = eax_1;
00540d7b      *(uint32_t*)((char*)this->m_curNonEphemeralID)[4] = edx_1;
00540d85      return result;
00540d50  }

00540d86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00540d90  uint8_t __thiscall PacketController::EnqueueOptionalHeader(class PacketController* this, uint16_t arg2, class COptionalHeader* arg3)

00540d90  {
00540daa      if (PacketController::pcontrol_->recipients_[((uint32_t)arg2)] == 0)
00540dc5          return 0;
00540dc5      
00540dbc      FlowQueue::EnqueueOptionalHeader(&this->recipients_[((uint32_t)arg2)]->flowQueue_.vtable, arg3);
00540dc1      return 1;
00540d90  }

00540dc8                          90 90 90 90 90 90 90 90                                                          ........

00540dd0  void __thiscall AC1Legacy::PQueueArray<double>::Insert(class AC1Legacy::PQueueArray<double>* this, double arg2, void* arg3)

00540dd0  {
00540dda      if (this->curNumNodes == this->allocatedNodes)
00540dde          AC1Legacy::PQueueArray<double>::_ExpandNodes(this);
00540dde      
00540de6      long double x87_r7 = ((long double)arg2);
00540ded      void* __offset(AC1Legacy::PQueueArray<double>::PQueueNode, -0x10) edi_1 = (this->A - 0x10);
00540df0      int32_t i_1 = (this->curNumNodes + 1);
00540df1      int32_t i = i_1;
00540df6      this->curNumNodes = i_1;
00540df9      int32_t i_2;
00540df9      
00540df9      for (; i > 1; i = i_2)
00540df9      {
00540e02          i_2 = (i >> 1);
00540e06          int32_t ecx_3 = (i_2 << 4);
00540e09          long double temp1_1 = ((long double)*(uint64_t*)(ecx_3 + edi_1));
00540e09          (x87_r7 - temp1_1);
00540e0c          void* ecx_4 = (ecx_3 + edi_1);
00540e0e          int32_t eax;
00540e0e          eax = ((((x87_r7 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
00540e10          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00540e10          
00540e13          if (p_1)
00540e13              break;
00540e13          
00540e1a          int32_t* edx_1 = ((i << 4) + edi_1);
00540e1c          *(uint32_t*)edx_1 = *(uint32_t*)ecx_4;
00540e21          edx_1[1] = *(uint32_t*)((char*)ecx_4 + 4);
00540e27          edx_1[2] = *(uint32_t*)((char*)ecx_4 + 8);
00540e2d          edx_1[3] = *(uint32_t*)((char*)ecx_4 + 0xc);
00540df9      }
00540df9      
00540e3a      void* eax_3 = ((i << 4) + edi_1);
00540e41      *(uint64_t*)eax_3 = ((double)x87_r7);
00540e44      *(uint32_t*)((char*)eax_3 + 8) = arg3;
00540dd0  }

00540dfd                                                                                         8d 49 00                               .I.
00540e4b                                   90 90 90 90 90                                                             .....

00540e50  uint8_t __thiscall PQueueArray<double,void *>::RemoveMin(class PQueueArray<double,void *>* this, double* arg2, void** arg3)

00540e50  {
00540e55      int32_t A;
00540e55      
00540e55      if (this->curNumNodes > 0)
00540e55      {
00540e57          A = this->A;
00540e57          
00540e5c          if (A != 0)
00540e5c          {
00540e65              *(uint32_t*)arg2 = *(uint32_t*)A;
00540e6a              *(uint32_t*)((char*)arg2 + 4) = *(uint32_t*)(A + 4);
00540e77              *(uint32_t*)arg3 = this->A->data;
00540e79              int32_t curNumNodes = this->curNumNodes;
00540e79              
00540e7f              if (curNumNodes <= 1)
00540e7f              {
00540eb2                  this->curNumNodes = 0;
00540eb9                  AC1Legacy::PQueueArray<double>::_Heapify(this, 1);
00540ebe                  int32_t eax_7;
00540ebe                  eax_7 = 1;
00540ec1                  return 1;
00540e7f              }
00540e7f              
00540e81              class PQueueArray<double,void *>::PQueueNode* A_1 = this->A;
00540e85              this->curNumNodes = (curNumNodes - 1);
00540e8b              void* eax_4 = &A_1[(curNumNodes - 1)];
00540e8f              A_1->key = *(uint32_t*)eax_4;
00540e94              *(uint32_t*)((char*)A_1->key)[4] = *(uint32_t*)((char*)eax_4 + 4);
00540e9a              A_1->data = *(uint32_t*)((char*)eax_4 + 8);
00540ea2              *(int32_t*)((char*)A_1 + 0xc) = *(uint32_t*)((char*)eax_4 + 0xc);
00540ea5              AC1Legacy::PQueueArray<double>::_Heapify(this, 1);
00540eaa              int32_t eax_6;
00540eaa              eax_6 = 1;
00540ead              return 1;
00540e5c          }
00540e55      }
00540e55      
00540ec4      A = 0;
00540ec6      return 0;
00540e50  }

00540ec9                             90 90 90 90 90 90 90                                                           .......

00540ed0  uint8_t __thiscall PQueueArray<double,void *>::RemoveByData(class PQueueArray<double,void *>* this, void* arg2)

00540ed0  {
00540ed2      int32_t curNumNodes = this->curNumNodes;
00540ed5      int32_t i = (curNumNodes - 1);
00540ed5      
00540edc      if (i >= 0)
00540edc      {
00540ede          class PQueueArray<double,void *>::PQueueNode* A = this->A;
00540eea          int32_t* edx_3 = &A[i].data;
00540eea          
00540efa          do
00540efa          {
00540ef2              if (*(uint32_t*)edx_3 == arg2)
00540ef2              {
00540f05                  int32_t ebx = (i + 1);
00540f0a                  int32_t edx_5 = (ebx >> 1);
00540f0a                  
00540f11                  if (edx_5 > 0)
00540f11                  {
00540f19                      int32_t eax_1 = (edx_5 << 4);
00540f1c                      long double x87_r7_1 = ((long double)*(uint64_t*)(eax_1 + &A[-1]));
00540f1f                      void* esi_2 = (eax_1 + &A[-1]);
00540f27                      long double temp1_1 = ((long double)A[(-1 + curNumNodes)].key);
00540f27                      (x87_r7_1 - temp1_1);
00540f2a                      int32_t eax_3;
00540f2a                      eax_3 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00540f2a                      
00540f2f                      if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
00540f2f                      {
00540f6d                          double* eax_11;
00540f6d                          
00540f6d                          do
00540f6d                          {
00540f36                              void* ebx_2 = &A[(-1 + ebx)];
00540f38                              *(uint32_t*)ebx_2 = *(uint32_t*)esi_2;
00540f3d                              *(uint32_t*)((char*)ebx_2 + 4) = *(uint32_t*)((char*)esi_2 + 4);
00540f43                              *(uint32_t*)((char*)ebx_2 + 8) = *(uint32_t*)((char*)esi_2 + 8);
00540f49                              *(uint32_t*)((char*)ebx_2 + 0xc) = *(uint32_t*)((char*)esi_2 + 0xc);
00540f4c                              ebx = edx_5;
00540f4e                              edx_5 s>>= 1;
00540f4e                              
00540f52                              if (edx_5 <= 0)
00540f52                                  break;
00540f52                              
00540f56                              int32_t eax_9 = (edx_5 << 4);
00540f59                              long double x87_r7_2 = ((long double)*(uint64_t*)(eax_9 + &A[-1]));
00540f5c                              esi_2 = (eax_9 + &A[-1]);
00540f65                              long double temp2_1 = ((long double)*(uint64_t*)((this->curNumNodes << 4) + &A[-1]));
00540f65                              (x87_r7_2 - temp2_1);
00540f68                              eax_11 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00540f6d                          } while ((*(uint8_t*)((char*)eax_11)[1] & 0x41) == 0);
00540f75                          void* edx_8 = &A[(-1 + this->curNumNodes)];
00540f7c                          void* ebx_4 = &A[(-1 + ebx)];
00540f7e                          *(uint32_t*)ebx_4 = *(uint32_t*)edx_8;
00540f83                          *(uint32_t*)((char*)ebx_4 + 4) = *(uint32_t*)((char*)edx_8 + 4);
00540f89                          *(uint32_t*)((char*)ebx_4 + 8) = *(uint32_t*)((char*)edx_8 + 8);
00540f8f                          *(uint32_t*)((char*)ebx_4 + 0xc) = *(uint32_t*)((char*)edx_8 + 0xc);
00540f99                          this->curNumNodes -= 1;
00540f9c                          int32_t eax_16;
00540f9c                          eax_16 = 1;
00540f9f                          return 1;
00540f2f                      }
00540f11                  }
00540f11                  
00540fa5                  void* ebp_1 = &A[(-1 + curNumNodes)];
00540faf                  void* eax_19 = &A[(-1 + ebx)];
00540fb1                  *(uint32_t*)eax_19 = *(uint32_t*)ebp_1;
00540fb6                  *(uint32_t*)((char*)eax_19 + 4) = *(uint32_t*)((char*)ebp_1 + 4);
00540fbc                  *(uint32_t*)((char*)eax_19 + 8) = *(uint32_t*)((char*)ebp_1 + 8);
00540fc2                  *(uint32_t*)((char*)eax_19 + 0xc) = *(uint32_t*)((char*)ebp_1 + 0xc);
00540fc8                  int32_t edx_15 = (this->curNumNodes - 1);
00540fcd                  this->curNumNodes = edx_15;
00540fcd                  
00540fd0                  if (ebx < edx_15)
00540fd3                      AC1Legacy::PQueueArray<double>::_Heapify(this, ebx);
00540fd3                  
00540fdb                  int32_t eax_20;
00540fdb                  eax_20 = 1;
00540fde                  return 1;
00540ef2              }
00540ef2              
00540ef4              i -= 1;
00540ef5              edx_3 -= 0x10;
00540efa          } while (i >= 0);
00540edc      }
00540edc      
00540eff      i = 0;
00540f02      return 0;
00540ed0  }

00540fe1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00540ff0  void __fastcall PacketController::CheckFlowControlTimers(class PacketController* this)

00540ff0  {
00540ff9      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0054100d      int32_t var_c = *(int32_t*)((char*)Timer::cur_time + 4);
0054100d      
00541019      while (this->FlowControlTimers.curNumNodes > 0)
00541019      {
0054101f          class PQueueArray<double,void *>::PQueueNode* A = this->FlowControlTimers.A;
0054101f          
00541024          if (A == 0)
00541024              break;
00541024          
0054102c          long double x87_r7_1 = ((long double)Timer::cur_time_1);
00541033          int32_t var_14_1 = *(uint32_t*)((char*)A->key)[4];
00541037          int32_t var_18 = A->key;
0054103b          long double temp0_1 = ((long double)var_18);
0054103b          (x87_r7_1 - temp0_1);
0054103f          int32_t eax_1;
0054103f          eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0054103f          
00541044          if ((*(uint8_t*)((char*)eax_1)[1] & 1) != 0)
00541044              break;
00541044          
00541052          void* var_20;
00541052          PQueueArray<double,void *>::RemoveMin(&this->FlowControlTimers, &var_18, &var_20);
00541057          class RecipientData* esi_1 = var_20;
00541057          
00541063          if (esi_1->onQueue_ == 0)
00541063          {
00541065              esi_1->onQueue_ = 1;
00541072              esi_1->next_ = this->haveNaks_;
00541078              this->haveNaks_ = esi_1;
00541063          }
00541063          
005410aa          var_18 = ((double)((((long double)(1 - _ftol2())) * ((long double)0.5)) + ((long double)var_18)));
005410b6          int32_t var_38_2 = var_14_1;
005410b8          AC1Legacy::PQueueArray<double>::Insert(&this->FlowControlTimers, var_18, esi_1);
00541019      }
00540ff0  }

005410c9                             90 90 90 90 90 90 90                                                           .......

005410d0  void __fastcall PacketController::UseTime(class PacketController* this)

005410d0  {
005410d3      PacketController::CheckFlowControlTimers(this);
005410d3      
005410d8      while (true)
005410d8      {
005410d8          class RecipientData* haveNaks_ = this->haveNaks_;
005410dd          class PacketController* ecx;
005410dd          
005410dd          if (haveNaks_ != 0)
005410dd          {
005410df              ecx = haveNaks_->recID_;
005410e9              haveNaks_->onQueue_ = 0;
005410fc              this->haveNaks_ = this->haveNaks_->next_;
005410dd          }
005410dd          
005410ff          if ((haveNaks_ == 0 || ecx == 0))
00541124              return;
00541124          
0054110d          uint32_t eax_3 = (((uint32_t)ecx) << 2);
0054110d          
00541114          if (*(uint32_t*)(eax_3 + PacketController::pcontrol_->recipients_) != 0)
0054111c              RecipientData::UseTime(*(uint32_t*)(this->recipients_ + eax_3));
005410d8      }
005410d0  }

00541125                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00541130  int32_t __thiscall PacketController::AddRecipient(class PacketController* this, uint16_t arg2, struct sockaddr_in arg3, int32_t arg4, float arg5, uint32_t arg6, int32_t arg7)

00541130  {
00541133      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00541138      int32_t ebx;
00541138      int32_t var_10 = ebx;
0054113b      int32_t edi;
0054113b      int32_t var_1c = edi;
0054113c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00541146      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00541158      NetUtils::GetIPString(&arg2, &var_10, 0);
00541166      void (__thiscall** const ecx)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = &gmJournalUI::`vftable'.RecvNotice_FillComponentBuyList;
00541166      
0054116b      if (arg6 == 0)
0054116d          ecx = "FALSE";
0054116d      
00541172      int32_t ebp;
00541172      ebp = arg3.sin_zero[4];
00541172      *(uint8_t*)((char*)ebp)[1] = arg3.sin_zero[5];
00541172      *(uint8_t*)((char*)ebp)[2] = arg3.sin_zero[6];
00541172      *(uint8_t*)((char*)ebp)[3] = arg3.sin_zero[7];
00541178      void (__thiscall** const eax_2)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = &gmJournalUI::`vftable'.RecvNotice_FillComponentBuyList;
00541178      
0054117d      if (ebp == 0)
0054117f          eax_2 = "FALSE";
0054117f      
00541193      int32_t var_24 = (var_10 + 0x14);
00541194      void (__thiscall** const var_28_1)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = ecx;
00541199      float var_2c_1 = arg5;
0054119d      double var_34 = ((double)((long double)arg4));
005411a0      void (__thiscall** const var_38)(class gmNoticeHandler* this, enum SpellComponentCategory, int32_t) = eax_2;
005411a1      uint32_t esi = ((uint32_t)__return_addr);
005411a4      uint32_t var_3c = esi;
005411af      AC1Legacy::PStringBase<char>::s_NullBuffer_2 = 5;
005411b7      int32_t* var_8 = nullptr;
005411bf      Logger::LogMacro::operator()(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "PacketController::AddRecipient(%…");
005411bf      
005411cf      if (this->recipients_[esi] != 0)
005411cf      {
0054127d          if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
00541285              **(uint32_t**)var_8(1);
00541285          
00541290          return 0;
005411cf      }
005411cf      
005411da      void* eax_4 = operator new(0x390);
005411e4      int32_t eax_5;
005411e4      
005411e4      if (eax_4 == 0)
00541216          eax_5 = 0;
005411e4      else
005411e4      {
005411f5          *(uint32_t*)((char*)var_34)[4] = arg3.sin_addr.S_un;
005411f7          int32_t ecx_5;
005411f7          ecx_5 = arg3.sin_zero[0];
005411f7          *(uint8_t*)((char*)ecx_5)[1] = arg3.sin_zero[1];
005411f7          *(uint8_t*)((char*)ecx_5)[2] = arg3.sin_zero[2];
005411f7          *(uint8_t*)((char*)ecx_5)[3] = arg3.sin_zero[3];
005411fe          int32_t ecx_6;
005411fe          ecx_6 = arg3.sin_zero[4];
005411fe          *(uint8_t*)((char*)ecx_6)[1] = arg3.sin_zero[5];
005411fe          *(uint8_t*)((char*)ecx_6)[2] = arg3.sin_zero[6];
005411fe          *(uint8_t*)((char*)ecx_6)[3] = arg3.sin_zero[7];
0054120c          var_34 = __return_addr;
0054120f          eax_5 = RecipientData::RecipientData(eax_4, var_34, ecx_5, ecx_6, arg4, ebp, arg6);
005411e4      }
005411e4      
00541218      this->recipients_[esi] = eax_5;
00541230      int32_t var_20_2 = *(int32_t*)((char*)Timer::cur_time + 4);
00541235      AC1Legacy::PQueueArray<double>::Insert(&this->FlowControlTimers, (*(uint32_t*)Timer::cur_time), this->recipients_[esi]);
00541235      
00541250      if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
00541258          **(uint32_t**)var_8(1);
00541258      
00541266      return 1;
00541130  }

00541293                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005412a0  int32_t __thiscall PacketController::DeleteRecipient(class PacketController* this, uint16_t arg2)

005412a0  {
005412a0      class PacketController* PacketController::pcontrol__1 = PacketController::pcontrol_;
005412a0      
005412ad      if (PacketController::pcontrol__1->net_ == 0)
005412b2          return 0;
005412b2      
005412c5      if (PacketController::pcontrol__1->recipients_[((uint32_t)arg2)] != 0)
005412c5      {
005412cf          void* ebx_1 = this->recipients_[((uint32_t)arg2)];
005412d6          PQueueArray<double,void *>::RemoveByData(&this->FlowControlTimers, ebx_1);
005412d6          
005412e3          if (*(uint32_t*)((char*)ebx_1 + 0x380) != 0)
005412e3          {
005412e5              class RecipientData* i = this->haveNaks_;
005412e8              class RecipientData* i_1 = nullptr;
005412e8              
005412ec              for (; i != 0; i = i->next_)
005412ec              {
005412f2                  if (i == ebx_1)
005412f2                  {
00541304                      if (i_1 != 0)
00541317                          i_1->next_ = i->next_;
00541304                      else
0054130c                          this->haveNaks_ = i->next_;
0054130c                      
00541304                      break;
005412f2                  }
005412f2                  
005412f4                  i_1 = i;
005412ec              }
005412ec              
0054131d              *(uint32_t*)((char*)ebx_1 + 0x380) = 0;
005412e3          }
005412e3          
0054132a          class RecipientData* ebx_2 = this->recipients_[((uint32_t)arg2)];
0054132a          
0054132f          if (ebx_2 != 0)
0054132f          {
00541333              RecipientData::~RecipientData(ebx_2);
00541339              operator delete(ebx_2);
0054132f          }
0054132f          
00541341          this->recipients_[((uint32_t)arg2)] = 0;
005412c5      }
005412c5      
00541353      return 1;
005412a0  }

00541356                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00541360  void __fastcall PerfMonCounterInfo::PerfMonCounterNameHelp::~PerfMonCounterNameHelp(class PerfMonCounterInfo::PerfMonCounterNameHelp* this)

00541360  {
0054136e      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = (this->m_help.m_charbuffer - 0x14);
0054136e      
0054137d      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00541385          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00541385      
0054138a      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = (this->m_name.m_charbuffer - 0x14);
0054138a      
00541399      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
005413a1          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00541360  }

005413a7                       90 90 90 90 90 90 90 90 90                                                         .........

005413b0  class PerfMonCounterInfo::PerfMonCounterNameHelp& __thiscall PerfMonCounterInfo::PerfMonCounterNameHelp::operator=(PerfMonCounterInfo::PerfMonCounterNameHelp* this, class PerfMonCounterInfo::PerfMonCounterNameHelp const& arg2)

005413b0  {
005413c3      *(uint16_t*)this = *(uint16_t*)arg2;
005413c6      void* eax_1 = *(uint32_t*)((char*)this + 4);
005413c6      
005413cc      if (eax_1 != *(uint32_t*)((char*)arg2 + 4))
005413cc      {
005413dd          if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
005413e5              **(uint32_t**)((char*)eax_1 - 0x14)(1);
005413e5          
005413e7          int32_t eax_3 = *(uint32_t*)((char*)arg2 + 4);
005413ea          *(uint32_t*)((char*)this + 4) = eax_3;
005413f1          InterlockedIncrement((eax_3 - 0x10));
005413cc      }
005413cc      
005413f7      void* eax_5 = *(uint32_t*)((char*)this + 8);
005413f7      
005413fd      if (eax_5 != *(uint32_t*)((char*)arg2 + 8))
005413fd      {
0054140e          if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
00541416              **(uint32_t**)((char*)eax_5 - 0x14)(1);
00541416          
00541418          int32_t edi_1 = *(uint32_t*)((char*)arg2 + 8);
0054141b          *(uint32_t*)((char*)this + 8) = edi_1;
00541422          InterlockedIncrement((edi_1 - 0x10));
005413fd      }
005413fd      
0054142e      return this;
005413b0  }

00541431                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00541440  void GetIPFromRecipientID(uint16_t arg1, class AC1Legacy::PStringBase<char>* arg2, uint8_t arg3)

00541440  {
00541449      if (arg1 < 0x100)
00541449      {
0054145a          void* eax_3 = (((((uint32_t)arg1) * 0x88) + SharedNet::s_pNet) + 0x20);
0054145a          
00541466          if ((eax_3 != 0 && *(uint16_t*)eax_3 != 0))
00541466          {
0054146b              arg1 = ((char*)eax_3 + 0x30);
0054146f              /* tailcall */
0054146f              return NetUtils::GetIPString(arg1, arg2, arg3);
00541466          }
00541449      }
00541449      
0054147d      AC1Legacy::PStringBase<char>::set(arg2, "(No ReceiverData for that Recipi…");
00541440  }

00541483           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00541490  int32_t __thiscall PacketController::AddReceivedBlobToQueue(class PacketController* this, class NetBlob* arg2)

00541490  {
00541491      class NetBlob* esi = arg2;
00541491      
00541498      if (esi != 0)
00541498      {
0054149e          uint16_t queueID_ = esi->queueID_;
0054149e          
005414ab          if ((queueID_ < 0xc && queueID_ != 0))
005414ab          {
005414b0              class NIList<NetBlob *>* edi = this->netQueues_[((uint32_t)queueID_)];
005414b0              
005414b6              if (edi != 0)
005414b6              {
005414f4                  InterlockedIncrement(&esi->m_cRef);
005414fd                  NIList<NetBlob *>::AddToTail(edi, esi);
00541509                  return 1;
005414b6              }
005414b6              
005414b8              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005414bd              arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005414c5              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005414d8              GetIPFromRecipientID(esi->sender_, &arg2, edi);
005414e4              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
005414ed              return 0;
005414ab          }
005414ab          
0054150c          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00541511          arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00541519          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
0054151f          esi = esi->sender_;
00541528          void* eax_6;
00541528          
00541528          if (esi < 0x100)
00541539              eax_6 = (((((uint32_t)esi) * 0x88) + SharedNet::s_pNet) + 0x20);
00541539          
00541545          if (((esi >= 0x100 || eax_6 == 0) || *(uint16_t*)eax_6 == 0))
00541565              AC1Legacy::PStringBase<char>::set(&arg2, "(No ReceiverData for that Recipi…");
00541545          else
00541552              NetUtils::GetIPString(((char*)eax_6 + 0x30), &arg2, 0);
00541552          
0054156a          class NetBlob* esi_1 = arg2;
0054156a          
0054157e          if ((InterlockedDecrement(&esi_1->m_cRef) == 0 && esi_1 != 0))
00541580              esi_1->vtable->__vecDelDtor(1);
00541498      }
00541498      
0054158c      return 0;
00541490  }

0054158f                                               90                                                                 .

00541590  uint8_t __thiscall List<PerfMonCounterInfo::PerfMonCounterNameHelp>::pop_front(class List<PerfMonCounterInfo::PerfMonCounterNameHelp>* this, class PerfMonCounterInfo::PerfMonCounterNameHelp* arg2)

00541590  {
00541595      class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* _head = this->_head;
00541595      
0054159c      if (_head == 0)
0054159c      {
005415a0          int32_t eax;
005415a0          eax = 0;
005415a3          return 0;
0054159c      }
0054159c      
005415a6      class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* next = _head->next;
005415ab      this->_head = next;
005415ab      
005415ae      if (next == 0)
005415b5          this->_tail = nullptr;
005415ae      else
005415b0          next->prev = nullptr;
005415b0      
005415bd      PerfMonCounterInfo::PerfMonCounterNameHelp::operator=(arg2, _head);
005415bd      
005415c4      if (_head != 0)
005415c4      {
005415d0          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = (_head->data.m_help.m_charbuffer - 0x14);
005415d0          
005415df          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005415e7              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
005415e7          
005415ec          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = (_head->data.m_name.m_charbuffer - 0x14);
005415ec          
005415fc          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00541604              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00541604          
00541607          operator delete(_head);
005415c4      }
005415c4      
00541614      this->_num_elements -= 1;
00541618      uint32_t eax_6;
00541618      eax_6 = 1;
0054161b      return 1;
00541590  }

0054161e                                                                                            90 90                                ..

00541620  uint8_t __fastcall List<PerfMonCounterInfo::PerfMonCounterNameHelp>::pop_head(class List<PerfMonCounterInfo::PerfMonCounterNameHelp>* this)

00541620  {
00541623      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0054163b      int16_t var_c = 0;
00541642      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00541644      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00541651      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00541670      int32_t ebx;
00541670      ebx = List<PerfMonCounterInfo::PerfMonCounterNameHelp>::pop_front(this, &var_c);
00541670      
0054167a      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_2 != 0x14))
00541682          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_2 + -0x14)(1);
00541682      
00541697      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
0054169f          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
0054169f      
005416a3      int32_t eax_5;
005416a3      eax_5 = ebx;
005416a9      return eax_5;
00541620  }

005416aa                                90 90 90 90 90 90                                                            ......

005416b0  void __fastcall List<PerfMonCounterInfo::PerfMonCounterNameHelp>::~List<PerfMonCounterInfo::PerfMonCounterNameHelp>(class List<PerfMonCounterInfo::PerfMonCounterNameHelp>* this)

005416b0  {
005416b3      this->vtable = 0x7c9e90;
005416b3      
005416c5      while (this->_head != 0)
005416c9          List<PerfMonCounterInfo::PerfMonCounterNameHelp>::pop_head(this);
005416b0  }

005416d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005416e0  void* __thiscall List<PerfMonCounterInfo::PerfMonCounterNameHelp>::`scalar deleting destructor'(class List<PerfMonCounterInfo::PerfMonCounterNameHelp>* this, uint32_t arg2)

005416e0  {
005416e3      this->vtable = 0x7c9e90;
005416e3      
005416f5      while (this->_head != 0)
005416f9          List<PerfMonCounterInfo::PerfMonCounterNameHelp>::pop_head(this);
005416f9      
00541705      if ((arg2 & 1) != 0)
00541708          operator delete(this);
00541708      
00541713      return this;
005416e0  }

00541716                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00541720  void __fastcall PerfMonCounterInfo::~PerfMonCounterInfo(class PerfMonCounterInfo* this)

00541720  {
00541724      this->m_CounterNamesList.vtable = 0x7c9e90;
00541724      
00541735      while (this->m_CounterNamesList._head != 0)
00541739          List<PerfMonCounterInfo::PerfMonCounterNameHelp>::pop_head(&this->m_CounterNamesList);
00541739      
00541740      this->vtable = 0x7942f4;
00541720  }

00541749                             90 90 90 90 90 90 90                                                           .......

00541750  void __fastcall PerfMonCounter<unsigned __int64>::IncCounter(class PerfMonCounter<unsigned __int64>* this)

00541750  {
00541750      this->m_counter += 1;
00541754      *(uint32_t*)((char*)this->m_counter)[4] = (*(uint32_t*)((char*)this->m_counter)[4] + 0);
00541750  }

00541759                                                                             90 90 90 90 90 90 90                           .......

00541760  void __fastcall PerfMonCounter<unsigned __int64>::DecCounter(class PerfMonCounter<unsigned __int64>* this)

00541760  {
00541760      int32_t edx_1 = this->m_counter;
00541768      this->m_counter = (edx_1 - 1);
0054176b      *(uint32_t*)((char*)this->m_counter)[4] = (*(uint32_t*)((char*)this->m_counter)[4] - 1);
00541760  }

0054176f                                               90                                                                 .

00541770  int32_t __fastcall PerfMonCounter<unsigned __int64>::GetValueAsInt64(class PerfMonCounter<unsigned __int64>* this)

00541770  {
00541773      this->m_counter;
00541776      return this->m_counter;
00541770  }

00541777                                                                       90 90 90 90 90 90 90 90 90                         .........

00541780  void* __thiscall PerfMonCounter<unsigned __int64>::`scalar deleting destructor'(class PerfMonCounter<unsigned __int64>* this, uint32_t arg2)

00541780  {
00541783      PerfMonCounterInfo::~PerfMonCounterInfo(this);
00541783      
0054178d      if ((arg2 & 1) != 0)
00541790          operator delete(this);
00541790      
0054179b      return this;
00541780  }

0054179e                                                                                            90 90                                ..

005417a0  void __fastcall PacketController::PacketController(class PacketController* this, class ClientNet* arg2)

005417a0  {
005417a0      class PacketController* this_1 = this;
005417a3      int32_t ebx = 0;
005417a5      this_1 = nullptr;
005417a9      class ClientNet* eax = arg2;
005417b2      this->vtable = &PacketController::`vftable';
005417b8      this->net_ = eax;
005417bb      this->haveNaks_ = nullptr;
005417c3      this->FlowControlTimers.vtable = 0x7c9e18;
005417ca      this->FlowControlTimers.curNumNodes = 0;
005417d2      this->FlowControlTimers.A = operator new[](0x400);
005417da      this->FlowControlTimers.minAllocatedNodes = 0x40;
005417dd      this->FlowControlTimers.allocatedNodes = 0x40;
005417e6      this->lastEmpty_ = 0f;
005417e9      *(uint32_t*)((char*)this->lastEmpty_)[4] = 0;
005417ec      this->m_curNonEphemeralID = 0;
005417ef      *(uint32_t*)((char*)this->m_curNonEphemeralID)[4] = 0;
005417f2      NetInterface::NetInterface(&this->netInterface_);
005417f8      this->m_pSendBlobCallsCounter = nullptr;
005417fb      int32_t edx = NetBlobIDUtils::MakeInitialSequenceID(0);
00541805      this->m_curNonEphemeralID = 0;
00541808      *(uint32_t*)((char*)this->m_curNonEphemeralID)[4] = edx;
00541810      this->recipients_ = operator new[](0x400);
00541816      PacketController::pcontrol_ = this;
00541816      
0054182e      for (int32_t* i = nullptr; i < 0x400; i = &i[1])
00541823          *(uint32_t*)((char*)i + this->recipients_) = 0;
00541823      
00541830      int32_t edi;
00541830      int32_t var_14 = edi;
0054183d      __builtin_memset(&this->netQueues_, 0, 0x30);
00541844      class PerfMonCounter<unsigned __int64>* edi_3 = operator new(0x28);
00541844      
0054184b      if (edi_3 == 0)
005418c5          edi_3 = nullptr;
0054184b      else
0054184b      {
00541862          PStringBase<unsigned short>::allocate_ref_buffer(&this_1, wcslen(u"Number of NetBlobs that have pas…"));
00541871          wcscpy(this_1, u"Number of NetBlobs that have pas…");
00541886          PStringBase<unsigned short>::allocate_ref_buffer(&arg2, wcslen(u"Net - PacketController::SendBlob…"));
00541895          wcscpy(arg2, u"Net - PacketController::SendBlob…");
005418ad          ebx = 3;
005418b2          PerfMonCounterInfo::PerfMonCounterInfo(edi_3, NORMAL, &arg2, &this_1, 9);
005418b7          edi_3->vtable = 0x7c9e94;
005418bd          edi_3->m_counter = 0;
005418c0          *(uint32_t*)((char*)edi_3->m_counter)[4] = 0;
0054184b      }
0054184b      
005418ca      this->m_pSendBlobCallsCounter = edi_3;
005418ca      
005418cd      if ((ebx & 2) != 0)
005418cd      {
005418d3          void* __offset(ClientNet, -0x14) edi_5 = ((char*)arg2 - 0x14);
005418da          ebx &= 0xfffffffd;
005418da          
005418e9          if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
005418f1              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
005418cd      }
005418cd      
005418f7      if ((ebx & 1) != 0)
005418f7      {
005418fd          void* __offset(PacketController, -0x14) ebx_2 = ((char*)this_1 - 0x14);
005418fd          
00541910          if ((InterlockedDecrement(((char*)ebx_2 + 4)) == 0 && ebx_2 != 0))
00541918              *(uint32_t*)*(int32_t*)((char*)ADJ(ebx_2) + -0x14)(1);
005418f7      }
005417a0  }

00541923           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00541930  void __stdcall SharedNet::ProcessNewestSeqNum(class SharedNet* this @ ecx, class CNetLayerPacket const* arg2)

00541930  {
0054193f      uint32_t seqID_ = arg2->m_Hdr.seqID_;
00541945      class ReceiverData* m_pRecv = arg2->m_pRecv;
00541945      
0054194b      if ((arg2->m_Hdr.header_ & 2) == 0)
0054194d          seqID_ += 1;
0054194d      
00541951      uint32_t esi_1 = (m_pRecv->highestIDReceived_ + 1);
00541951      
00541954      if (esi_1 == seqID_)
00541954      {
00541985          m_pRecv->highestIDReceived_ = arg2->m_Hdr.seqID_;
0054198a          return;
00541954      }
00541954      
0054196b      do
0054196b      {
00541958          if (esi_1 != 0)
00541963              ReceiverData::AddNakked(arg2->m_pRecv, esi_1, nullptr);
00541963          
00541968          esi_1 += 1;
0054196b      } while (esi_1 != seqID_);
0054196b      
00541975      m_pRecv->highestIDReceived_ = arg2->m_Hdr.seqID_;
00541930  }

0054198d                                         90 90 90                                                               ...

00541990  uint32_t __stdcall SharedNet::ChecksumHeader(class SharedNet* this @ ecx, class ProtoHeader const* arg2)

00541990  {
00541999      uint32_t header_ = arg2->header_;
0054199c      uint32_t seqID_ = arg2->seqID_;
005419a0      uint32_t ecx;
005419a0      ecx = arg2->recID_;
005419a4      uint32_t header = header_;
005419a8      header_ = arg2->interval_;
005419ac      int16_t var_8 = ecx;
005419b1      ecx = arg2->iteration_;
005419b5      int16_t var_6 = header_;
005419ba      header_ = arg2->datalen_;
005419c5      int16_t var_2 = ecx;
005419ca      int16_t var_4 = header_;
005419cf      int32_t var_c = 0xbadd70dd;
005419df      return PortalChecksum::CalcChecksum32(&seqID_, 0x14);
00541990  }

005419e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005419f0  uint8_t __thiscall SharedNet::ProcessOptionalHeaders(class SharedNet* this, class CNetLayerPacket const* arg2)

005419f0  {
00541a0a      PacketController::GetRecipient(PacketController::Instance(), arg2->recipient_);
00541a15      int32_t i = 0;
00541a15      
00541a19      if (arg2->numSpecialFrags_ > 0)
00541a19      {
00541a1c          class COptionalHeader* (* ebp_1)[0x20] = &arg2->specialFragList_;
00541a1c          
00541a38          do
00541a38          {
00541a29              *(uint32_t*)( + 0x34)(ADJ(ebp_1)->specialFragList_[0], arg2);
00541a32              i += 1;
00541a33              ebp_1 = &*(uint128_t*)ebp_1[1];
00541a38          } while (i < arg2->numSpecialFrags_);
00541a19      }
00541a19      
00541a3d      uint32_t eax_2;
00541a3d      eax_2 = 1;
00541a40      return 1;
005419f0  }

00541a43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00541a50  uint8_t __stdcall SharedNet::ProcessBlobFrags(class SharedNet* this @ ecx, class CNetLayerPacket const* arg2)

00541a50  {
00541a62      RecipientData::IndicateReceivedPacket(arg2->m_pRecip, arg2, arg2->realPriority_);
00541a6d      return ((int8_t)-((0xffffffff + 1)));
00541a50  }


00541a70  int32_t SharedNet::SendBuff(class SharedNet* this @ ecx, struct _WSABUF* arg2, int32_t arg3, struct sockaddr_in arg4)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00541a70  {
00541a81      int32_t ebx;
00541a81      int32_t var_4 = ebx;
00541a82      int32_t esi;
00541a82      int32_t var_8 = esi;
00541a8a      int32_t edi;
00541a8a      int32_t var_c = edi;
00541a8b      int32_t edi_1 = _chkstk();
00541a8d      struct _WSABUF* eax = *(uint32_t*)(edi_1 + 0x10);
00541a94      void* __return_addr_1 = nullptr;
00541a96      int32_t eax_1 = 0;
00541a9e      __return_addr = nullptr;
00541a9e      
00541aa2      if (arg_1001c > 0)
00541aa2      {
00541aaa          do
00541aaa          {
00541aa4              __return_addr_1 += *(uint32_t*)(arg_10018 + (eax_1 << 3));
00541aa7              eax_1 += 1;
00541aaa          } while (eax_1 < arg_1001c);
00541aaa          
00541aac          __return_addr = __return_addr_1;
00541aa2      }
00541aa2      
00541ab0      int32_t eax_2 = 0;
00541ab4      void* ebx_1 = &arg_34;
00541ab4      
00541ab8      if (arg_1001c > 0)
00541ab8      {
00541ae6          do
00541ae6          {
00541ac0              int32_t ecx_1 = *(uint32_t*)(arg_10018 + (eax_2 << 3));
00541ace              int32_t esi_3;
00541ace              int32_t edi_3;
00541ace              edi_3 = __builtin_memcpy(ebx_1, *(uint32_t*)((arg_10018 + (eax_2 << 3)) + 4), ((ecx_1 >> 2) << 2));
00541ad5              __builtin_memcpy(edi_3, esi_3, (ecx_1 & 3));
00541ae1              ebx_1 += *(uint32_t*)(arg_10018 + (eax_2 << 3));
00541ae3              eax_2 += 1;
00541ae6          } while (eax_2 < arg_1001c);
00541ae6          
00541aec          __return_addr_1 = __return_addr;
00541ab8      }
00541ab8      
00541af1      int32_t __saved_ebp = 0x10;
00541afa      void* var_14 = &arg_10020;
00541b08      int32_t result = Ordinal_WSOCK32_20(eax, &arg_34, __return_addr_1, 0, var_14, __saved_ebp);
00541b08      
00541b13      if (result == 0xffffffff)
00541b20          return 0;
00541b20      
00541b2a      **(uint32_t**)edi_1(0, result);
00541b2c      int32_t eax_4 = *(uint32_t*)(edi_1 + 0x8870);
00541b2c      
00541b34      if (eax_4 != 0)
00541b34      {
00541b3d          void* __saved_ebp_1 = &arg_10000;
00541b45          char (* var_8_1)[0x8] = &arg4.sin_zero;
00541b4d          struct sockaddr_in* var_4_1 = &arg4;
00541b51          int32_t ecx_8 = *(uint32_t*)(edi_1 + 0x887c);
00541b5b          arg4.sin_addr.S_un = &arg4.sin_zero;
00541b65          var_14 = 0x28;
00541b6d          int32_t result_1 = result;
00541b71          __return_addr = 1;
00541b79          arg2 = 0x10;
00541b81          arg3 = 2;
00541b89          arg4.sin_family = result;
00541b89          arg4.sin_port = *(uint16_t*)((char*)result)[2];
00541b8d          eax_4(&var_14, ecx_8);
00541b34      }
00541b34      
00541b9d      return result;
00541a70  }

00541abd                                                                                         8d 49 00                               .I.

00541ba0  uint8_t __thiscall SharedNet::SendPacket(class SharedNet* this, class NetPacket* arg2, class ProtoHeader* arg3, struct sockaddr_in const* arg4)

00541ba0  {
00541bb8      uint32_t eax = SharedNet::ChecksumHeader(this, arg3);
00541bc9      arg3->checksum_ += eax;
00541bcc      uint32_t numSpecialFrags_ = arg2->numSpecialFrags_;
00541bd8      int32_t edx_2 = ((numSpecialFrags_ + (arg2->numFrags_ << 1)) + 1);
00541bdc      class ProtoHeader* var_2d4 = arg3;
00541be0      int32_t i = 1;
00541bea      int32_t var_2d8 = 0x14;
00541bea      
00541bf2      if ((numSpecialFrags_ + 1) > 1)
00541bf2      {
00541bf4          class COptionalHeader* (* edi_1)[0x20] = &arg2->specialFragList_;
00541bf4          
00541c0d          do
00541c0d          {
00541bf7              class COptionalHeader* ecx = ADJ(edi_1)->specialFragList_[0];
00541bfc              &var_2d4[(i * 2)] = ecx->m_pData;
00541c03              &var_2d8[(i * 2)] = ecx->m_cbData;
00541c07              i += 1;
00541c08              edi_1 = &*(uint128_t*)edi_1[1];
00541c0d          } while (i < (numSpecialFrags_ + 1));
00541bf2      }
00541bf2      
00541c15      if (i < edx_2)
00541c15      {
00541c17          class BlobFrag* (* esi_2)[0x1d] = &arg2->fragList_;
00541c17          
00541c4b          do
00541c4b          {
00541c22              class BlobFrag* ecx_2 = ADJ(esi_2)->fragList_[0];
00541c27              &var_2d4[(i * 2)] = ecx_2->hdrRead_;
00541c2b              &var_2d8[(i * 2)] = 0x10;
00541c32              void var_2cc;
00541c32              *(uint32_t*)(&var_2cc + (i << 3)) = ecx_2->dat_;
00541c3f              void var_2d0;
00541c3f              *(uint32_t*)(&var_2d0 + (i << 3)) = (((uint32_t)ecx_2->hdrRead_->blobFragSize) - 0x10);
00541c43              i += 2;
00541c46              esi_2 = &*(uint116_t*)esi_2[1];
00541c4b          } while (i < edx_2);
00541c15      }
00541c15      
00541c4d      int32_t esi_3 = 0;
00541c4f      int32_t eax_2 = 0;
00541c4f      
00541c53      if (edx_2 > 0)
00541c53      {
00541c5c          do
00541c5c          {
00541c55              esi_3 += &var_2d8[(eax_2 * 2)];
00541c59              eax_2 += 1;
00541c5c          } while (eax_2 < edx_2);
00541c53      }
00541c53      
00541c65      int32_t ebp_4;
00541c65      ebp_4 = arg4->sin_family;
00541c65      *(uint16_t*)((char*)ebp_4)[2] = arg4->sin_port;
00541c76      int32_t ebp_6;
00541c76      ebp_6 = arg4->sin_zero[0];
00541c76      *(uint8_t*)((char*)ebp_6)[1] = arg4->sin_zero[1];
00541c76      *(uint8_t*)((char*)ebp_6)[2] = arg4->sin_zero[2];
00541c76      *(uint8_t*)((char*)ebp_6)[3] = arg4->sin_zero[3];
00541c79      int32_t ecx_7;
00541c79      ecx_7 = arg4->sin_zero[4];
00541c79      *(uint8_t*)((char*)ecx_7)[1] = arg4->sin_zero[5];
00541c79      *(uint8_t*)((char*)ecx_7)[2] = arg4->sin_zero[6];
00541c79      *(uint8_t*)((char*)ecx_7)[3] = arg4->sin_zero[7];
00541c79      
00541c8f      if (*(uint32_t*)( + 4)(&var_2d8, edx_2, ebp_4, arg4->sin_addr.S_un, ebp_6, ecx_7) < esi_3)
00541c8f      {
00541c91          int32_t eax_4;
00541c91          eax_4 = 0;
00541c9d          return 0;
00541c8f      }
00541c8f      
00541ca8      *(uint32_t*)(9, 1);
00541cad      int32_t eax_6;
00541cad      eax_6 = 1;
00541cb6      return 1;
00541ba0  }

00541cb9                                                                             90 90 90 90 90 90 90                           .......

00541cc0  void __thiscall SharedNet::SetConnectionState(class SharedNet* this, uint16_t arg2, enum ConnectionState arg3)

00541cc0  {
00541ccb      void* ecx;
00541ccb      
00541ccb      if (arg2 >= 0x100)
00541cdc          ecx = nullptr;
00541ccb      else
00541cd6          ecx = (((((uint32_t)arg2) * 0x88) + this) + 0x20);
00541cd6      
00541ce3      ReceiverData::SetConnectionState(ecx, arg3);
00541cf0      class RecipientData* eax_4 = PacketController::GetRecipient(PacketController::Instance(), arg2);
00541cf0      
00541cf7      if (eax_4 != 0)
00541cf9          eax_4->m_ConnectionState = arg3;
00541cc0  }

00541d01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00541d10  uint8_t ParseInAddr(char const** arg1, struct in_addr* arg2)

00541d10  {
00541d33      int32_t ebx = 0;
00541d3c      int32_t var_8;
00541d3c      int32_t var_4;
00541d3c      int32_t eax;
00541d3c      
00541d3c      if (sscanf(*(uint32_t*)arg1, "%d%n", &var_4, &var_8) != 0)
00541d3c      {
00541d42          while (true)
00541d42          {
00541d42              eax = var_4;
00541d42              
00541d48              if (eax < 0)
00541d48                  break;
00541d48              
00541d4f              if (eax > 0xff)
00541d4f                  break;
00541d4f              
00541d51              ebx += 1;
00541d51              
00541d55              if (ebx <= 4)
00541d55              {
00541d59                  int32_t edx_1 = var_8;
00541d62                  arg2->S_un = ((arg2->S_un << 8) | eax);
00541d66                  eax = &*(uint32_t*)arg1[edx_1];
00541d68                  *(uint32_t*)arg1 = eax;
00541d68                  
00541d6d                  if (*(uint8_t*)eax == 0x2e)
00541d6d                  {
00541d70                      *(uint32_t*)arg1 = (eax + 1);
00541d70                      
00541d8b                      if (sscanf(*(uint32_t*)arg1, "%d%n", &var_4, &var_8) != 0)
00541d8b                          continue;
00541d6d                  }
00541d55              }
00541d55              
00541d90              if (ebx < 1)
00541d90                  break;
00541d90              
00541d95              if (ebx > 4)
00541d95                  break;
00541d95              
00541da3              struct in_addr edx_4 = (arg2->S_un << ((int8_t)((4 - ebx) << 3)));
00541da8              arg2->S_un = edx_4;
00541db0              arg2->S_un = Ordinal_WSOCK32_8(edx_4);
00541db5              struct in_addr eax_4;
00541db5              *(uint8_t*)((char*)eax_4.S_un + 0) = 1;
00541dbb              return 1;
00541d42          }
00541d3c      }
00541d3c      
00541dbf      eax = 0;
00541dc5      return 0;
00541d10  }

00541dc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00541dd0  void __fastcall ClientNet::OnStateBegun(class ClientNet* this, class AsyncContext arg2)

00541dd0  {
00541dd2      *(int32_t*)((char*)this + 0x50) = 0;
00541dd5      *(int32_t*)((char*)this + 0x38) = 0;
00541dd8      int32_t eax = *(int32_t*)((char*)this + -0x8888);
00541dde      *(int32_t*)((char*)this + 0x54) = 1;
00541de8      *(uint32_t*)(eax + 0x5c)();
00541dd0  }

00541dee                                            90 90                                                                ..

00541df0  void __fastcall ClientNet::EnterWorld(class ClientNet* this)

00541df0  {
00541df0      this->fCurrentlyInGame_ = 1;
00541df0  }

00541df8                                                                          90 90 90 90 90 90 90 90                          ........

00541e00  void __fastcall ClientNet::ExitWorldDisconnect(class ClientNet* this)

00541e00  {
00541e01      class ClientNet* this_1 = this;
00541e03      uint16_t eax;
00541e03      eax = this_1->fCurrentlyInGame_;
00541e03      
00541e0b      if (eax != 0)
00541e0d          this_1->fCurrentlyInGame_ = 0;
00541e0d      
00541e1b      this_1->currServerRecID_ = this_1->logonRecID_;
00541e22      uint16_t* i_1 = *(int32_t*)((char*)this_1 + 0x8820);
00541e22      
00541e2a      if (i_1 != 0)
00541e2a      {
00541e4b          uint16_t* i;
00541e4b          
00541e4b          do
00541e4b          {
00541e30              i = *(uint32_t*)((char*)i_1 + 8);
00541e33              uint16_t eax_1 = *(uint16_t*)i_1;
00541e33              
00541e3d              if (eax_1 != this_1->logonRecID_)
00541e42                  ClientNet::RemoveConnection(this_1, eax_1);
00541e42              
00541e49              i_1 = i;
00541e4b          } while (i != 0);
00541e2a      }
00541e2a      
00541e4e      void* eax_2 = *(int32_t*)((char*)this_1 + 0x8820);
00541e4e      
00541e56      if (eax_2 == 0)
00541e56      {
00541e58          this_1->logonRecID_ = eax_2;
00541e60          return;
00541e56      }
00541e56      
00541e61      this = *(uint16_t*)((char*)eax_2 + 0x2c);
00541e65      *(int32_t*)((char*)this_1 + 0x18) = this;
00541e69      *(uint32_t*)((char*)eax_2 + 0x44) = 2;
00541e72      this_1->m_WorldSwitchHistory.bBeenSwitchedBefore = 0;
00541e79      Proto_UI::SetEventCounter(0);
00541e00  }

00541e83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00541e90  int32_t __thiscall ClientNet::SendBuff(class ClientNet* this, struct _WSABUF* arg2, int32_t arg3, struct sockaddr_in arg4)

00541e90  {
00541e99      if (this->logOffSent_ != 0)
00541e9e          return 0;
00541e9e      
00541ea1      int32_t edx;
00541ea1      edx = arg4.sin_family;
00541ea1      *(uint16_t*)((char*)edx)[2] = arg4.sin_port;
00541eb0      union in_addr::__unnamed S_un = arg4.sin_addr.S_un;
00541eb3      int32_t edx_2;
00541eb3      edx_2 = arg4.sin_zero[0];
00541eb3      *(uint8_t*)((char*)edx_2)[1] = arg4.sin_zero[1];
00541eb3      *(uint8_t*)((char*)edx_2)[2] = arg4.sin_zero[2];
00541eb3      *(uint8_t*)((char*)edx_2)[3] = arg4.sin_zero[3];
00541eb7      int32_t var_c = edx_2;
00541eba      int32_t edx_3;
00541eba      edx_3 = arg4.sin_zero[4];
00541eba      *(uint8_t*)((char*)edx_3)[1] = arg4.sin_zero[5];
00541eba      *(uint8_t*)((char*)edx_3)[2] = arg4.sin_zero[6];
00541eba      *(uint8_t*)((char*)edx_3)[3] = arg4.sin_zero[7];
00541ebe      int32_t var_8 = edx_3;
00541ecb      int32_t result = SharedNet::SendBuff(this, arg2, arg3, edx);
00541ecb      
00541ed4      if (result == 0)
00541ed6          Ordinal_WSOCK32_111();
00541ed6      
00541edf      return result;
00541e90  }

00541ee2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00541ef0  void __thiscall COnePrimHeader<512,7,sockaddr_in>::InqData(class COnePrimHeader<512,7,sockaddr_in> const* this, struct sockaddr_in* arg2)

00541ef0  {
00541ef7      int32_t edx;
00541ef7      edx = this->m_Prim.sin_family;
00541ef7      *(uint16_t*)((char*)edx)[2] = this->m_Prim.sin_port;
00541ef9      arg2->sin_family = edx;
00541ef9      arg2->sin_port = *(uint16_t*)((char*)edx)[2];
00541efe      arg2->sin_addr.S_un = this->m_Prim.sin_addr.S_un;
00541f01      int32_t edx_2;
00541f01      edx_2 = this->m_Prim.sin_zero[0];
00541f01      *(uint8_t*)((char*)edx_2)[1] = this->m_Prim.sin_zero[1];
00541f01      *(uint8_t*)((char*)edx_2)[2] = this->m_Prim.sin_zero[2];
00541f01      *(uint8_t*)((char*)edx_2)[3] = this->m_Prim.sin_zero[3];
00541f04      arg2->sin_zero[0] = edx_2;
00541f04      arg2->sin_zero[1] = *(uint8_t*)((char*)edx_2)[1];
00541f04      arg2->sin_zero[2] = *(uint8_t*)((char*)edx_2)[2];
00541f04      arg2->sin_zero[3] = *(uint8_t*)((char*)edx_2)[3];
00541f07      int32_t ecx_1;
00541f07      ecx_1 = this->m_Prim.sin_zero[4];
00541f07      *(uint8_t*)((char*)ecx_1)[1] = this->m_Prim.sin_zero[5];
00541f07      *(uint8_t*)((char*)ecx_1)[2] = this->m_Prim.sin_zero[6];
00541f07      *(uint8_t*)((char*)ecx_1)[3] = this->m_Prim.sin_zero[7];
00541f0a      arg2->sin_zero[4] = ecx_1;
00541f0a      arg2->sin_zero[5] = *(uint8_t*)((char*)ecx_1)[1];
00541f0a      arg2->sin_zero[6] = *(uint8_t*)((char*)ecx_1)[2];
00541f0a      arg2->sin_zero[7] = *(uint8_t*)((char*)ecx_1)[3];
00541ef0  }


00541f10  void* __thiscall AVLNode<unsigned long,unsigned long>::`scalar deleting destructor'(class AVLNode<unsigned long,unsigned long>* this, uint32_t arg2)

00541f10  {
00541f13      AVLNode<unsigned long,unsigned long>::~AVLNode<unsigned long,unsigned long>(this);
00541f13      
00541f1d      if ((arg2 & 1) != 0)
00541f20          operator delete(this);
00541f20      
00541f2b      return this;
00541f10  }

00541f2e                                            90 90                                                                ..

00541f30  void __fastcall AVLNode<unsigned long,unsigned long>::~AVLNode<unsigned long,unsigned long>(class AVLNode<unsigned long,unsigned long>* this)

00541f30  {
00541f34      class AVLNode<unsigned long,unsigned long>* _left = this->_left;
00541f34      
00541f38      if (_left != 0)
00541f38      {
00541f3c          AVLNode<unsigned long,unsigned long>::~AVLNode<unsigned long,unsigned long>(_left);
00541f42          operator delete(_left);
00541f38      }
00541f38      
00541f4a      class AVLNode<unsigned long,unsigned long>* _right = this->_right;
00541f4a      
00541f4f      if (_right != 0)
00541f4f      {
00541f53          AVLNode<unsigned long,unsigned long>::~AVLNode<unsigned long,unsigned long>(_right);
00541f59          operator delete(_right);
00541f4f      }
00541f4f      
00541f62      this->_left = 0;
00541f68      this->_right = nullptr;
00541f30  }

00541f71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00541f80  class AVLNode<unsigned long,unsigned long>* __thiscall AVL<unsigned long,unsigned long>::LeftRotate(class AVL<unsigned long,unsigned long>* this, class AVLNode<unsigned long,unsigned long>* arg2, class AVLNode<unsigned long,unsigned long>* arg3, class AVLNode<unsigned long,unsigned long>* arg4)

00541f80  {
00541f89      class AVLNode<unsigned long,unsigned long>* _parent = arg2->_parent;
00541f93      arg2->_right = arg4;
00541f96      arg3->_left = arg2;
00541f98      arg3->_parent = _parent;
00541f98      
00541f9b      if (_parent == 0)
00541fb5          this->_root = arg3;
00541f9b      else
00541f9b      {
00541f9d          this = arg2->_parentsize;
00541f9d          
00541fa2          if (this == 0)
00541fa2          {
00541fac              _parent->_right = arg3;
00541faf              arg3->_parentsize = 0;
00541fa2          }
00541fa2          else
00541fa2          {
00541fa4              _parent->_left = arg3;
00541fa6              arg3->_parentsize = 1;
00541fa2          }
00541f9b      }
00541f9b      
00541fb9      arg2->_parent = arg3;
00541fbc      arg2->_parentsize = 1;
00541fbc      
00541fc0      if (arg4 != 0)
00541fc0      {
00541fc2          arg4->_parent = arg2;
00541fc5          arg4->_parentsize = 0;
00541fc0      }
00541fc0      
00541fc9      class AVLNode<unsigned long,unsigned long>* _left = arg2->_left;
00541fcd      int32_t edi_2;
00541fcd      
00541fcd      if (_left == 0)
00541fd5          edi_2 = 1;
00541fcd      else
00541fd2          edi_2 = (_left->_height + 1);
00541fd2      
00541fda      class AVLNode<unsigned long,unsigned long>* _right = arg2->_right;
00541fdf      arg2->_leftHeight = edi_2;
00541fe2      int32_t esi_1;
00541fe2      
00541fe2      if (_right == 0)
00541fea          esi_1 = 1;
00541fe2      else
00541fe7          esi_1 = (_right->_height + 1);
00541fe7      
00541ff1      arg2->_rightHeight = esi_1;
00541ff1      
00541ff4      if (edi_2 >= esi_1)
00541ff6          esi_1 = edi_2;
00541ff6      
00541ff8      arg2->_height = esi_1;
00541ffb      class AVLNode<unsigned long,unsigned long>* _left_1 = arg3->_left;
00541fff      int32_t edx_1;
00541fff      
00541fff      if (_left_1 == 0)
00542007          edx_1 = 1;
00541fff      else
00542004          edx_1 = (_left_1->_height + 1);
00542004      
0054200c      class AVLNode<unsigned long,unsigned long>* _right_1 = arg3->_right;
00542011      arg3->_leftHeight = edx_1;
00542014      int32_t ecx_1;
00542014      
00542014      if (_right_1 == 0)
0054201c          ecx_1 = 1;
00542014      else
00542019          ecx_1 = (_right_1->_height + 1);
00542019      
00542024      arg3->_rightHeight = ecx_1;
00542024      
00542028      if (edx_1 >= ecx_1)
00542028      {
0054202a          arg3->_height = edx_1;
0054202d          return arg3;
00542028      }
00542028      
00542030      arg3->_height = ecx_1;
00542033      return arg3;
00541f80  }

00542036                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00542040  class AVLNode<unsigned long,unsigned long>* __thiscall AVL<unsigned long,unsigned long>::RightRotate(class AVL<unsigned long,unsigned long>* this, class AVLNode<unsigned long,unsigned long>* arg2, class AVLNode<unsigned long,unsigned long>* arg3, class AVLNode<unsigned long,unsigned long>* arg4)

00542040  {
00542049      class AVLNode<unsigned long,unsigned long>* _parent = arg2->_parent;
00542053      arg2->_left = arg4;
00542055      arg3->_right = arg2;
00542058      arg3->_parent = _parent;
00542058      
0054205b      if (_parent == 0)
00542075          this->_root = arg3;
0054205b      else
0054205b      {
0054205d          this = arg2->_parentsize;
0054205d          
00542062          if (this == 0)
00542062          {
0054206c              _parent->_right = arg3;
0054206f              arg3->_parentsize = 0;
00542062          }
00542062          else
00542062          {
00542064              _parent->_left = arg3;
00542066              arg3->_parentsize = 1;
00542062          }
0054205b      }
0054205b      
00542079      arg2->_parent = arg3;
0054207c      arg2->_parentsize = 0;
0054207c      
00542080      if (arg4 != 0)
00542080      {
00542082          arg4->_parent = arg2;
00542085          arg4->_parentsize = 1;
00542080      }
00542080      
00542089      class AVLNode<unsigned long,unsigned long>* _left = arg2->_left;
0054208d      int32_t edi_2;
0054208d      
0054208d      if (_left == 0)
00542095          edi_2 = 1;
0054208d      else
00542092          edi_2 = (_left->_height + 1);
00542092      
0054209a      class AVLNode<unsigned long,unsigned long>* _right = arg2->_right;
0054209f      arg2->_leftHeight = edi_2;
005420a2      int32_t esi_1;
005420a2      
005420a2      if (_right == 0)
005420aa          esi_1 = 1;
005420a2      else
005420a7          esi_1 = (_right->_height + 1);
005420a7      
005420b1      arg2->_rightHeight = esi_1;
005420b1      
005420b4      if (edi_2 >= esi_1)
005420b6          esi_1 = edi_2;
005420b6      
005420b8      arg2->_height = esi_1;
005420bb      class AVLNode<unsigned long,unsigned long>* _left_1 = arg3->_left;
005420bf      int32_t edx_1;
005420bf      
005420bf      if (_left_1 == 0)
005420c7          edx_1 = 1;
005420bf      else
005420c4          edx_1 = (_left_1->_height + 1);
005420c4      
005420cc      class AVLNode<unsigned long,unsigned long>* _right_1 = arg3->_right;
005420d1      arg3->_leftHeight = edx_1;
005420d4      int32_t ecx_1;
005420d4      
005420d4      if (_right_1 == 0)
005420dc          ecx_1 = 1;
005420d4      else
005420d9          ecx_1 = (_right_1->_height + 1);
005420d9      
005420e4      arg3->_rightHeight = ecx_1;
005420e4      
005420e8      if (edx_1 >= ecx_1)
005420e8      {
005420ea          arg3->_height = edx_1;
005420ed          return arg3;
005420e8      }
005420e8      
005420f0      arg3->_height = ecx_1;
005420f3      return arg3;
00542040  }

005420f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00542100  class AVLNode<unsigned long,unsigned long>* __thiscall AVL<unsigned long,unsigned long>::LeftRightRotate(class AVL<unsigned long,unsigned long>* this, class AVLNode<unsigned long,unsigned long>* arg2, class AVLNode<unsigned long,unsigned long>* arg3, class AVLNode<unsigned long,unsigned long>* arg4)

00542100  {
00542113      AVL<unsigned long,unsigned long>::LeftRotate(this, arg3, arg4, arg4->_left);
00542124      AVL<unsigned long,unsigned long>::RightRotate(this, arg2, arg4, arg4->_right);
00542129      class AVLNode<unsigned long,unsigned long>* _left = arg2->_left;
0054212d      int32_t ecx_3;
0054212d      
0054212d      if (_left == 0)
00542135          ecx_3 = 1;
0054212d      else
00542132          ecx_3 = (_left->_height + 1);
00542132      
0054213a      class AVLNode<unsigned long,unsigned long>* _right = arg2->_right;
0054213f      arg2->_leftHeight = ecx_3;
00542142      int32_t eax_2;
00542142      
00542142      if (_right == 0)
0054214a          eax_2 = 1;
00542142      else
00542147          eax_2 = (_right->_height + 1);
00542147      
00542151      arg2->_rightHeight = eax_2;
00542151      
00542154      if (ecx_3 >= eax_2)
00542156          eax_2 = ecx_3;
00542156      
00542158      arg2->_height = eax_2;
0054215b      class AVLNode<unsigned long,unsigned long>* _left_1 = arg3->_left;
00542160      int32_t ecx_5;
00542160      
00542160      if (_left_1 == 0)
00542168          ecx_5 = 1;
00542160      else
00542165          ecx_5 = (_left_1->_height + 1);
00542165      
0054216d      class AVLNode<unsigned long,unsigned long>* _right_1 = arg3->_right;
00542172      arg3->_leftHeight = ecx_5;
00542175      int32_t eax_4;
00542175      
00542175      if (_right_1 == 0)
0054217d          eax_4 = 1;
00542175      else
0054217a          eax_4 = (_right_1->_height + 1);
0054217a      
00542184      arg3->_rightHeight = eax_4;
00542184      
00542187      if (ecx_5 >= eax_4)
00542189          eax_4 = ecx_5;
00542189      
0054218b      arg3->_height = eax_4;
0054218e      class AVLNode<unsigned long,unsigned long>* _left_2 = arg4->_left;
00542192      int32_t ecx_7;
00542192      
00542192      if (_left_2 == 0)
0054219a          ecx_7 = 1;
00542192      else
00542197          ecx_7 = (_left_2->_height + 1);
00542197      
0054219f      class AVLNode<unsigned long,unsigned long>* _right_2 = arg4->_right;
005421a4      arg4->_leftHeight = ecx_7;
005421a7      int32_t eax_6;
005421a7      
005421a7      if (_right_2 == 0)
005421af          eax_6 = 1;
005421a7      else
005421ac          eax_6 = (_right_2->_height + 1);
005421ac      
005421b6      arg4->_rightHeight = eax_6;
005421b6      
005421b9      if (ecx_7 >= eax_6)
005421b9      {
005421bc          arg4->_height = ecx_7;
005421c4          return arg4;
005421b9      }
005421b9      
005421c8      arg4->_height = eax_6;
005421d0      return arg4;
00542100  }

005421d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005421e0  class AVLNode<unsigned long,unsigned long>* __thiscall AVL<unsigned long,unsigned long>::RightLeftRotate(class AVL<unsigned long,unsigned long>* this, class AVLNode<unsigned long,unsigned long>* arg2, class AVLNode<unsigned long,unsigned long>* arg3, class AVLNode<unsigned long,unsigned long>* arg4)

005421e0  {
005421f4      AVL<unsigned long,unsigned long>::RightRotate(this, arg3, arg4, arg4->_right);
00542204      AVL<unsigned long,unsigned long>::LeftRotate(this, arg2, arg4, arg4->_left);
00542209      class AVLNode<unsigned long,unsigned long>* _left = arg2->_left;
0054220d      int32_t ecx_3;
0054220d      
0054220d      if (_left == 0)
00542215          ecx_3 = 1;
0054220d      else
00542212          ecx_3 = (_left->_height + 1);
00542212      
0054221a      class AVLNode<unsigned long,unsigned long>* _right = arg2->_right;
0054221f      arg2->_leftHeight = ecx_3;
00542222      int32_t eax_2;
00542222      
00542222      if (_right == 0)
0054222a          eax_2 = 1;
00542222      else
00542227          eax_2 = (_right->_height + 1);
00542227      
00542231      arg2->_rightHeight = eax_2;
00542231      
00542234      if (ecx_3 >= eax_2)
00542236          eax_2 = ecx_3;
00542236      
00542238      arg2->_height = eax_2;
0054223b      class AVLNode<unsigned long,unsigned long>* _left_1 = arg3->_left;
00542240      int32_t ecx_5;
00542240      
00542240      if (_left_1 == 0)
00542248          ecx_5 = 1;
00542240      else
00542245          ecx_5 = (_left_1->_height + 1);
00542245      
0054224d      class AVLNode<unsigned long,unsigned long>* _right_1 = arg3->_right;
00542252      arg3->_leftHeight = ecx_5;
00542255      int32_t eax_4;
00542255      
00542255      if (_right_1 == 0)
0054225d          eax_4 = 1;
00542255      else
0054225a          eax_4 = (_right_1->_height + 1);
0054225a      
00542264      arg3->_rightHeight = eax_4;
00542264      
00542267      if (ecx_5 >= eax_4)
00542269          eax_4 = ecx_5;
00542269      
0054226b      arg3->_height = eax_4;
0054226e      class AVLNode<unsigned long,unsigned long>* _left_2 = arg4->_left;
00542272      int32_t ecx_7;
00542272      
00542272      if (_left_2 == 0)
0054227a          ecx_7 = 1;
00542272      else
00542277          ecx_7 = (_left_2->_height + 1);
00542277      
0054227f      class AVLNode<unsigned long,unsigned long>* _right_2 = arg4->_right;
00542284      arg4->_leftHeight = ecx_7;
00542287      int32_t eax_6;
00542287      
00542287      if (_right_2 == 0)
0054228f          eax_6 = 1;
00542287      else
0054228c          eax_6 = (_right_2->_height + 1);
0054228c      
00542296      arg4->_rightHeight = eax_6;
00542296      
00542299      if (ecx_7 >= eax_6)
00542299      {
0054229c          arg4->_height = ecx_7;
005422a4          return arg4;
00542299      }
00542299      
005422a8      arg4->_height = eax_6;
005422b0      return arg4;
005421e0  }

005422b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005422c0  int32_t __thiscall AC1Legacy::PStringBase<char>::find_substring(class AC1Legacy::PStringBase<char> const* this, class AC1Legacy::PStringBase<char> const* arg2)

005422c0  {
005422d3      int32_t eax_2 = strstr(&this->m_buffer->m_data, &arg2->m_buffer->m_data);
005422d3      
005422de      if (eax_2 != 0)
005422ed          return ((eax_2 - this->m_buffer) - 0x14);
005422ed      
005422e4      return 0xffffffff;
005422c0  }


005422f0  uint8_t __thiscall SmartArray<ClientNet::CReferralQueueEntry,1>::RemoveUnOrderedByIndex(class SmartArray<ClientNet::CReferralQueueEntry,1>* this, uint32_t arg2)

005422f0  {
005422f6      uint32_t m_num = this->m_num;
005422fe      class SmartArray<ClientNet::CReferralQueueEntry,1>* eax;
005422fe      
005422fe      if (arg2 >= m_num)
005422fe      {
0054233f          eax = 0;
00542344          return 0;
005422fe      }
005422fe      
00542303      this->m_num = (m_num - 1);
00542303      
00542306      if (arg2 != (m_num - 1))
00542306      {
0054230a          struct ClientNet::CReferralQueueEntry* m_data = this->m_data;
0054231d          __builtin_memcpy(&m_data[arg2], &m_data[(m_num - 1)], 0x28);
00542333          void var_28;
00542333          __builtin_memcpy(&this->m_data[this->m_num], &var_28, 0x28);
00542306      }
00542306      
00542337      eax = 1;
0054233c      return 1;
005422f0  }

00542347                       90 90 90 90 90 90 90 90 90                                                         .........

00542350  int32_t __fastcall CEchoResponseHeader::UpdateTimeSensitivePayload(class CEchoResponseHeader* this)

00542350  {
00542359      this->m_WireData.HoldingTime = ((float)(((long double)Timer::local_time) - ((long double)this->m_LocalTimeConstructed)));
00542350  }

0054235d                                                                                         90 90 90                               ...

00542360  void __fastcall CLinkStatusAverages::CLinkStatusAverages(class CLinkStatusAverages* this)

00542360  {
00542364      this->m_LocalTimeOfSnapshot = 0f;
00542367      *(uint32_t*)((char*)this->m_LocalTimeOfSnapshot)[4] = 0;
0054236a      this->m_RoundTripDelays.m_CurTotal = 0f;
0054236d      *(uint32_t*)((char*)this->m_RoundTripDelays.m_CurTotal)[4] = 0;
00542370      this->m_RoundTripDelays.m_nSamples = 0;
00542374      this->m_RoundTripDelays.m_idxFirst = 0;
00542378      this->m_nPktsSent.m_CurTotal = 0f;
0054237e      *(uint32_t*)((char*)this->m_nPktsSent.m_CurTotal)[4] = 0;
00542384      this->m_nPktsSent.m_nSamples = 0;
0054238b      this->m_nPktsSent.m_idxFirst = 0;
00542392      this->m_nPktsRetransmitted.m_CurTotal = 0f;
00542398      *(uint32_t*)((char*)this->m_nPktsRetransmitted.m_CurTotal)[4] = 0;
0054239e      this->m_nPktsRetransmitted.m_nSamples = 0;
005423a5      this->m_nPktsRetransmitted.m_idxFirst = 0;
005423ac      this->m_nPktsReceived.m_CurTotal = 0f;
005423b2      *(uint32_t*)((char*)this->m_nPktsReceived.m_CurTotal)[4] = 0;
005423b8      this->m_nPktsReceived.m_nSamples = 0;
005423bf      this->m_nPktsReceived.m_idxFirst = 0;
005423c6      this->m_nPktsNAKed.m_CurTotal = 0f;
005423cc      *(uint32_t*)((char*)this->m_nPktsNAKed.m_CurTotal)[4] = 0;
005423d2      this->m_nPktsNAKed.m_nSamples = 0;
005423d9      this->m_nPktsNAKed.m_idxFirst = 0;
005423e0      this->m_nBytesSent.m_CurTotal = 0f;
005423e6      *(uint32_t*)((char*)this->m_nBytesSent.m_CurTotal)[4] = 0;
005423ec      this->m_nBytesSent.m_nSamples = 0;
005423f3      this->m_nBytesSent.m_idxFirst = 0;
005423fa      this->m_nBytesReceived.m_CurTotal = 0f;
00542400      *(uint32_t*)((char*)this->m_nBytesReceived.m_CurTotal)[4] = 0;
00542406      this->m_nBytesReceived.m_nSamples = 0;
0054240d      this->m_nBytesReceived.m_idxFirst = 0;
00542414      this->m_TimeDiffs.m_CurTotal = 0f;
0054241a      *(uint32_t*)((char*)this->m_TimeDiffs.m_CurTotal)[4] = 0;
00542420      this->m_TimeDiffs.m_nSamples = 0;
00542427      this->m_TimeDiffs.m_idxFirst = 0;
00542360  }

0054242f                                               90                                                                 .

00542430  void* __thiscall CClientsideLoginStateHandler::`scalar deleting destructor'(class CClientsideLoginStateHandler* this, uint32_t arg2)

00542430  {
00542433      CAsyncStateHandler::~CAsyncStateHandler(this);
00542433      
0054243d      if ((arg2 & 1) != 0)
00542440          operator delete(this);
00542440      
0054244b      return this;
00542430  }

0054244e                                            90 90                                                                ..

00542450  uint8_t __fastcall SharedNet::UseTime(class SharedNet* this)

00542450  {
00542465      __builtin_memset(&*(int32_t*)((char*)this + 0x8838), 0, 0x20);
00542467      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0054246c      int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
00542480      uint32_t eax = GetTickCount();
00542482      int32_t edx = ;
00542486      *(int32_t*)((char*)this + 0x8830) = eax;
0054248c      *(uint32_t*)(edx + 0x14)();
0054249a      int32_t ebx;
0054249a      ebx = *(uint32_t*)( + 0x18)();
0054249c      *(uint32_t*)( + 8)();
0054249c      
005424b1      if ((GetTickCount() - *(int32_t*)((char*)this + 0x8830)) >= *(int32_t*)((char*)this + 0x8834))
005424b7          *(uint32_t*)( + 0x10)();
005424b7      
005424c3      *(int32_t*)((char*)this + 0x8828) = Timer::cur_time_1;
005424c9      *(int32_t*)((char*)this + 0x882c) = ecx;
005424d0      int32_t eax_4;
005424d0      eax_4 = ebx;
005424d6      return eax_4;
00542450  }

005424d7                                                                       90 90 90 90 90 90 90 90 90                         .........

005424e0  uint8_t __fastcall SharedNet::ReadAndProcessPackets(class SharedNet* this)

005424e0  {
005424e0      class SharedNet* this_1 = this;
005424e5      class CNetLayerPacket* edi = *(int32_t*)((char*)this + 0x8880);
005424ed      int32_t eax;
005424ed      
005424ed      if (edi != 0)
005424ed      {
005424f7          *(uint8_t*)((char*)this_1)[3] = 1;
00542502          bool cond:0_1;
00542502          
00542502          while (true)
00542502          {
00542502              CNetLayerPacket::Clear(edi);
00542513              int32_t ebp_1 = *(uint32_t*)( + 0x1c)(*(int32_t*)((char*)this + 0xc), edi);
00542515              cond:0_1 = ebp_1 >= 0;
00542515              
00542517              if (ebp_1 <= 0)
00542517                  break;
00542517              
00542519              eax = edi->m_bValid;
00542519              
00542521              if (eax != 0)
00542528                  *(uint32_t*)( + 0x20)(edi);
00542528              
0054253d              if ((GetTickCount() - *(int32_t*)((char*)this + 0x8830)) >= *(int32_t*)((char*)this + 0x8834))
0054253d              {
0054253f                  cond:0_1 = ebp_1 >= 0;
0054253f                  break;
0054253d              }
00542502          }
00542502          
00542543          if (cond:0_1)
00542543          {
0054254b              eax = 1;
00542552              return 1;
00542543          }
005424ed      }
005424ed      
00542546      eax = 0;
0054254a      return 0;
005424e0  }

00542553                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00542560  int32_t __thiscall SharedNet::ReadNextPacket(class SharedNet* this, uint32_t arg2, class CNetLayerPacket* arg3)

00542560  {
0054258c      int32_t var_2c = 0x10;
00542594      int32_t result = Ordinal_WSOCK32_17(arg2, &arg3->m_Hdr, 0xffe0, 0, &arg3->m_Addr, &var_2c);
00542594      
0054259e      if (result > 0)
0054259e      {
005425a8          *(uint32_t*)(1, result);
005425aa          int32_t eax_2 = *(int32_t*)((char*)this + 0x886c);
005425aa          
005425b2          if (eax_2 != 0)
005425b2          {
005425be              struct sockaddr_in* var_24_1 = &arg3->m_Addr;
005425c6              int32_t result_2;
005425c6              int32_t* var_18_1 = &result_2;
005425ca              int32_t ecx_2 = *(int32_t*)((char*)this + 0x887c);
005425d0              int32_t var_10_1 = var_2c;
005425da              int32_t var_28 = 0x28;
005425e2              int32_t result_1 = result;
005425e6              class ProtoHeader* var_1c_1 = &arg3->m_Hdr;
005425ea              int32_t var_14_1 = 1;
005425f2              int32_t var_c_1 = 2;
005425fa              class ProtoHeader* var_4_1 = &arg3->m_Hdr;
005425fe              result_2 = result;
00542602              eax_2(&var_28, ecx_2);
005425b2          }
0054259e      }
0054259e      
0054260a      if (result < 0x14)
0054260a      {
00542648          if (Ordinal_WSOCK32_111() == 0x2733)
00542653              return 0;
0054260a      }
0054260a      else
0054260a      {
0054260f          uint32_t eax_3 = SharedNet::ChecksumHeader(this, &arg3->m_Hdr);
00542584          arg3->m_Hdr.checksum_ -= eax_3;
0054261a          arg3->m_Iter.m_dwCurOfs = 0;
00542624          arg3->m_Iter.m_cbBufSize = (result - 0x14);
0054262a          arg3->m_bValid = 1;
0054260a      }
0054260a      
0054263a      return result;
00542560  }

00542656                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00542660  void __stdcall SharedNet::HandlePak(class SharedNet* this @ ecx, class COnePrimHeader<16384,1,unsigned long> const* arg2, class CNetLayerPacket const* arg3)

00542660  {
00542669      uint32_t m_Prim = arg2->m_Prim;
0054266f      class RecipientData* m_pRecip = arg3->m_pRecip;
0054266f      
00542679      if (((m_Prim != 0 && m_pRecip != 0) && PacketController::GetRecipient(PacketController::Instance(), arg3->m_Hdr.recID_) != 0))
00542696          RecipientData::QueueFlush(m_pRecip, m_Prim);
00542660  }


005426a0  void __stdcall SharedNet::HandleNak(class SharedNet* this @ ecx, class CSeqIDListHeader<4096,33> const* arg2, class CNetLayerPacket const* arg3)

005426a0  {
005426a7      uint16_t recID_ = arg3->m_Hdr.recID_;
005426a7      
005426bd      if (PacketController::GetRecipient(PacketController::Instance(), recID_) == 0)
005426e7          return;
005426e7      
005426e1      /* tailcall */
005426e1      return RecipientData::ProcessNaks(PacketController::GetRecipient(PacketController::Instance(), recID_), arg2->m_IDs[0], &arg2->m_IDs[1]);
005426a0  }

005426ea                                90 90 90 90 90 90                                                            ......

005426f0  uint8_t __fastcall SharedNet::ProcessConnections(class SharedNet* this)

005426f0  {
005426f4      void* i_1 = *(int32_t*)((char*)this + 0x8820);
005426f4      
005426fc      if (i_1 != 0)
005426fc      {
0054272f          void* i;
0054272f          
0054272f          do
0054272f          {
00542718              if ((GetTickCount() - *(int32_t*)((char*)this + 0x8830)) >= *(int32_t*)((char*)this + 0x8834))
00542718                  break;
00542718              
0054271e              i = *(uint32_t*)((char*)i_1 + 8);
0054271e              
00542721              if (*(uint16_t*)i_1 != 0)
00542728                  *(uint32_t*)( + 0xc)(i_1);
00542728              
0054272d              i_1 = i;
0054272f          } while (i != 0);
005426fc      }
005426fc      
00542734      int32_t eax;
00542734      eax = 1;
00542737      return 1;
005426f0  }

00542738                                                                          90 90 90 90 90 90 90 90                          ........

00542740  enum ReceiverState __stdcall SharedNet::SetNakState(class SharedNet* this @ ecx, class ReceiverData* arg2)

00542740  {
00542749      if (arg2->m_SeqIDsWeNAKed._currNum == 0)
00542749      {
0054274b          arg2->m_NakState = NO_NAK_STATE;
00542757          return 2;
00542749      }
00542749      
0054275a      arg2->m_NakState = NAK_STATE;
00542766      return 1;
00542740  }

00542769                             90 90 90 90 90 90 90                                                           .......

00542770  void __thiscall SharedNet::AddToPerfCounter(class SharedNet* this, enum NetPerfCounter arg2, int32_t arg3)

00542770  {
00542780      void* esi_1;
00542780      
00542780      switch (arg2)
00542780      {
005427af          case BytesSentCounter:
005427af          {
005427af              esi_1 = *(int32_t*)((char*)this + 0x8858);
00542801          label_542801:
00542801              
00542803              if (esi_1 != 0)
00542803              {
00542809                  int32_t ecx_2 = *(uint32_t*)((char*)esi_1 + 0x20);
0054280c                  int32_t eax_2;
0054280c                  int32_t edx_1;
0054280c                  edx_1 = HIGHD(((int64_t)arg3));
0054280c                  eax_2 = LOWD(((int64_t)arg3));
0054280f                  *(uint32_t*)((char*)esi_1 + 0x20) = (ecx_2 + eax_2);
00542812                  *(uint32_t*)((char*)esi_1 + 0x24) = (*(uint32_t*)((char*)esi_1 + 0x24) + edx_1);
00542803              }
005427af              break;
005427af          }
005427b7          case BytesReceivedCounter:
005427b7          {
005427b7              esi_1 = *(int32_t*)((char*)this + 0x885c);
005427bd              goto label_542801;
005427b7          }
00542787          case BadPacketsReceivedCounter:
00542787          {
00542787              *(int32_t*)((char*)this + 0x8838) += 1;
0054278d              int32_t* ecx = *(int32_t*)((char*)this + 0x8860);
0054278d              
00542795              if (ecx != 0)
00542795              {
0054279d                  *(uint32_t*)(*(uint32_t*)ecx + 0xc)();
005427a8                  *(uint32_t*)(*(uint32_t*)*(int32_t*)((char*)this + 0x8864) + 0xc)();
00542795              }
00542787              break;
00542787          }
005427bf          case OptionalHeadersOnlyPacketsReceivedCounter:
005427bf          {
005427bf              *(int32_t*)((char*)this + 0x884c) += 1;
005427bf              break;
005427bf          }
005427c9          case OptionalHeadersAndDataPacketsReceivedCounter:
005427c9          {
005427c9              *(int32_t*)((char*)this + 0x8854) += 1;
005427c9              break;
005427c9          }
005427d3          case DataOnlyPacketsReceivedCounter:
005427d3          {
005427d3              *(int32_t*)((char*)this + 0x8850) += 1;
005427d3              break;
005427d3          }
005427dd          case AcksReceivedCounter:
005427dd          {
005427dd              *(int32_t*)((char*)this + 0x8840) += 1;
005427dd              break;
005427dd          }
005427e7          case NaksReceivedCounter:
005427e7          {
005427e7              *(int32_t*)((char*)this + 0x8844) += 1;
005427e7              break;
005427e7          }
005427f1          case PaksReceivedCounter:
005427f1          {
005427f1              *(int32_t*)((char*)this + 0x8848) += 1;
005427f1              break;
005427f1          }
005427fb          case RetransmitsSentCounter:
005427fb          {
005427fb              esi_1 = *(int32_t*)((char*)this + 0x8868);
005427fb              goto label_542801;
005427fb          }
00542819          case MiscPacketsCounter:
00542819          {
00542819              *(int32_t*)((char*)this + 0x883c) += 1;
00542819              break;
00542819          }
00542780      }
00542770  }

00542823           90                                                                                         .
00542824  uint32_t jump_table_542824[0xc] = 
00542824  {
00542824      [0x0] =  0x005427af
00542828      [0x1] =  0x005427b7
0054282c      [0x2] =  0x00542787
00542830      [0x3] =  0x005427bf
00542834      [0x4] =  0x005427c9
00542838      [0x5] =  0x005427d3
0054283c      [0x6] =  0x005427dd
00542840      [0x7] =  0x005427e7
00542844      [0x8] =  0x005427f1
00542848      [0x9] =  0x0054281f
0054284c      [0xa] =  0x005427fb
00542850      [0xb] =  0x00542819
00542854  }

00542854                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00542860  uint8_t __fastcall ClientNet::UseTime(class ClientNet* this)

00542860  {
0054286b      if (this->m_LogonData.bMyTurn != 0)
0054286d          this->vtable->LogonUseTime();
0054286d      
00542875      /* tailcall */
00542875      return SharedNet::UseTime(this);
00542860  }

0054287a                                                                                90 90 90 90 90 90                            ......

00542880  void __thiscall ClientNet::AddToPerfCounter(class ClientNet* this, enum NetPerfCounter arg2, int32_t arg3)

00542880  {
0054288d      switch (arg2)
0054288d      {
00542894          case BytesSentCounter:
00542894          {
00542894              this->m_CurrentLinkStatus.nBytesSent += arg3;
005428a2              /* tailcall */
005428a2              return SharedNet::AddToPerfCounter(this, arg2, arg3);
00542894          }
005428a7          case BytesReceivedCounter:
005428a7          {
005428a7              this->m_CurrentLinkStatus.nBytesReceived += arg3;
005428b5              /* tailcall */
005428b5              return SharedNet::AddToPerfCounter(this, arg2, arg3);
005428a7          }
005428e2          case OptionalHeadersOnlyPacketsReceivedCounter:
005428e2          case OptionalHeadersAndDataPacketsReceivedCounter:
005428e2          case DataOnlyPacketsReceivedCounter:
005428e2          {
005428e2              this->m_CurrentLinkStatus.nPktsReceived += arg3;
005428f1              /* tailcall */
005428f1              return SharedNet::AddToPerfCounter(this, arg2, arg3);
005428e2          }
005428ba          case AcksReceivedCounter:
005428ba          {
005428ba              this->m_CurrentLinkStatus.nPktsNAKed += arg3;
005428c9              /* tailcall */
005428c9              return SharedNet::AddToPerfCounter(this, arg2, arg3);
005428ba          }
005428f6          case PacketsSentCounter:
005428f6          {
005428f6              this->m_CurrentLinkStatus.nPktsSent += arg3;
005428f6              break;
005428f6          }
005428ce          case RetransmitsSentCounter:
005428ce          {
005428ce              this->m_CurrentLinkStatus.nPktsRetransmitted += arg3;
005428dd              /* tailcall */
005428dd              return SharedNet::AddToPerfCounter(this, arg2, arg3);
005428ce          }
0054288d      }
0054288d      
00542905      /* tailcall */
00542905      return SharedNet::AddToPerfCounter(this, arg2, arg3);
00542880  }

0054290a                                8b ff                                                                        ..
0054290c  uint32_t jump_table_54290c[0xb] = 
0054290c  {
0054290c      [0x0] =  0x00542894
00542910      [0x1] =  0x005428a7
00542914      [0x2] =  0x005428fd
00542918      [0x3] =  0x005428e2
0054291c      [0x4] =  0x005428e2
00542920      [0x5] =  0x005428e2
00542924      [0x6] =  0x005428ba
00542928      [0x7] =  0x005428fd
0054292c      [0x8] =  0x005428fd
00542930      [0x9] =  0x005428f6
00542934      [0xa] =  0x005428ce
00542938  }

00542938                                                                          90 90 90 90 90 90 90 90                          ........

00542940  void* __thiscall CPackObjHeader<NetError,1048576,7>::`scalar deleting destructor'(class CPackObjHeader<NetError,1048576,7>* this, uint32_t arg2)

00542940  {
00542943      uint8_t* m_pAdoptedData = this->m_pAdoptedData;
00542947      this->vtable = &CPackObjHeader<class NetError,1048576,7>::`vftable';
0054294d      operator delete(m_pAdoptedData);
0054295b      this->m_pAdoptedData = nullptr;
00542962      this->m_Obj.vtable = 0x79285c;
00542969      this->vtable = 0x7942f4;
00542969      
0054296f      if ((arg2 & 1) != 0)
00542972          operator delete(this);
00542972      
0054297d      return this;
00542940  }


00542980  class AVLNode<unsigned long,unsigned long>* __thiscall AVL<unsigned long,unsigned long>::Rebalance(class AVL<unsigned long,unsigned long>* this, class AVLNode<unsigned long,unsigned long>* arg2)

00542980  {
00542990      if ((arg2->_rightHeight - arg2->_leftHeight) != 2)
00542990      {
005429c2          class AVLNode<unsigned long,unsigned long>* _left = arg2->_left;
005429c4          class AVLNode<unsigned long,unsigned long>* _right_1 = _left->_right;
005429c4          
005429d5          if ((_left->_rightHeight - _left->_leftHeight) != 1)
005429ea              return AVL<unsigned long,unsigned long>::RightRotate(this, arg2, _left, _right_1);
005429ea          
005429df          return AVL<unsigned long,unsigned long>::LeftRightRotate(this, arg2, _left, _right_1);
00542990      }
00542990      
00542992      class AVLNode<unsigned long,unsigned long>* _right = arg2->_right;
00542995      class AVLNode<unsigned long,unsigned long>* _left_1 = _right->_left;
0054299e      int32_t esi_1 = (_right->_rightHeight - _right->_leftHeight);
0054299e      
005429b5      if ((esi_1 != 1 && esi_1 == 0xffffffff))
005429bf          return AVL<unsigned long,unsigned long>::RightLeftRotate(this, arg2, _right, _left_1);
005429bf      
005429af      return AVL<unsigned long,unsigned long>::LeftRotate(this, arg2, _right, _left_1);
00542980  }

005429ed                                         90 90 90                                                               ...

005429f0  int32_t TimeStampUtils::OverflowCompare(uint16_t arg1, uint16_t arg2) __pure

005429f0  {
005429fc      if (arg1 == arg2)
00542a01          return 0;
00542a01      
00542a04      uint16_t edx_1 = (arg1 - arg2);
00542a09      int32_t result = 1;
00542a09      
00542a0e      if (arg1 < arg2)
00542a0e      {
00542a12          edx_1 = (arg2 - arg1);
00542a14          result = 0xffffffff;
00542a0e      }
00542a0e      
00542a1c      if (edx_1 <= 0x7fff)
00542a21          return result;
00542a21      
00542a1e      return -(result);
005429f0  }

00542a22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00542a30  void __fastcall SmartArray<ClientNet::CReferralQueueEntry,1>::Reset(class SmartArray<ClientNet::CReferralQueueEntry,1>* this)

00542a30  {
00542a36      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00542a4a      this->m_num = 0;
00542a4a      
00542a4d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00542a4d      {
00542a52          operator delete[](this->m_data);
00542a5a          this->m_data = 0;
00542a5c          this->m_sizeAndDeallocate = 0;
00542a64          return;
00542a4d      }
00542a4d      
00542a67      if (this->m_data != 0)
00542a67      {
00542a69          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00542a69          
00542a71          if ((i_2 - 1) >= 0)
00542a71          {
00542a76              int32_t eax_2 = ((i_2 - 1) * 0x28);
00542a79              int32_t i_1 = i_2;
00542a93              int32_t i;
00542a93              
00542a93              do
00542a93              {
00542a82                  void* edi_2 = (this->m_data + eax_2);
00542a8d                  eax_2 -= 0x28;
00542a90                  i = i_1;
00542a90                  i_1 -= 1;
00542a91                  void var_28;
00542a91                  __builtin_memcpy(edi_2, &var_28, 0x28);
00542a93              } while (i != 1);
00542a71          }
00542a67      }
00542a30  }

00542a9c                                                                                      90 90 90 90                              ....

00542aa0  void __thiscall AC1Legacy::PStringBase<unsigned short>::allocate_ref_buffer(class AC1Legacy::PStringBase<unsigned short>* this, uint32_t arg2)

00542aa0  {
00542aa9      int32_t esi = 1;
00542aa9      
00542ab4      do
00542ab0          esi <<= 1;
00542ab4       while (arg2 > esi);
00542ab4      
00542abb      void* eax_1 = operator new[](((esi * 2) + 0x18));
00542abb      
00542ac5      if (eax_1 == 0)
00542ac5      {
00542b03          this->m_buffer = 0;
00542b06          *(uint32_t*)8 = (arg2 + 1);
00542b09          this->m_buffer->m_size = (esi + 1);
00542b12          return;
00542ac5      }
00542ac5      
00542ac7      *(uint32_t*)((char*)eax_1 + 4) = 1;
00542ace      *(uint32_t*)eax_1 = 0x7ca074;
00542ad4      *(uint32_t*)((char*)eax_1 + 8) = 1;
00542adb      *(uint32_t*)((char*)eax_1 + 0xc) = 1;
00542ae2      *(uint32_t*)((char*)eax_1 + 0x10) = 0xffffffff;
00542ae9      *(uint16_t*)((char*)eax_1 + 0x14) = 0;
00542aef      this->m_buffer = eax_1;
00542af2      *(uint32_t*)((char*)eax_1 + 8) = (arg2 + 1);
00542af5      this->m_buffer->m_size = (esi + 1);
00542aa0  }

00542b15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00542b20  class COptionalHeader* CEchoResponseHeader::CreateFromData(float arg1)

00542b20  {
00542b22      void* result = operator new(0x28);
00542b22      
00542b2c      if (result == 0)
00542b7a          return 0;
00542b7a      
00542b31      *(uint32_t*)((char*)result + 4) = 1;
00542b38      *(uint32_t*)((char*)result + 8) = 0x4000000;
00542b3f      *(uint32_t*)((char*)result + 0xc) = 0x18;
00542b46      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
00542b49      *(uint32_t*)((char*)result + 0x14) = 8;
00542b50      *(uint32_t*)result = 0x7ca078;
00542b5d      int32_t esi = *(int32_t*)((char*)Timer::local_time + 4);
00542b63      *(uint32_t*)((char*)result + 0x20) = (*(uint32_t*)Timer::local_time);
00542b6a      *(uint32_t*)((char*)result + 0x24) = esi;
00542b6d      *(uint32_t*)((char*)result + 0x18) = arg1;
00542b6f      *(uint32_t*)((char*)result + 0x1c) = 0;
00542b77      return result;
00542b20  }

00542b7b                                                                                   90 90 90 90 90                             .....

00542b80  void* __thiscall DragDropInfo::`scalar deleting destructor'(class DragDropInfo* this, uint32_t arg2)

00542b80  {
00542b88      this->vtable = 0x7942f4;
00542b88      
00542b8e      if ((arg2 & 1) != 0)
00542b91          operator delete(this);
00542b91      
00542b9c      return this;
00542b80  }

00542b9f                                                                                               90                                 .

00542ba0  class NetPacket* NetPacket::CreateForSend(uint16_t arg1)

00542ba0  {
00542ba5      void* result = operator new(0x124);
00542ba5      
00542bb1      if (result == 0)
00542bb1      {
00542c0e          *(uint32_t*)0x108 = arg1;
00542c15          return result;
00542bb1      }
00542bb1      
00542bb3      *(uint32_t*)((char*)result + 8) = 0;
00542bb6      *(uint32_t*)((char*)result + 0x8c) = 0;
00542bbc      *(uint32_t*)((char*)result + 0x104) = 0;
00542bc2      *(uint16_t*)((char*)result + 0x108) = 0;
00542bc9      __builtin_memset(((char*)result + 0x10c), 0, 0x18);
00542bf2      *(uint32_t*)((char*)result + 4) = 1;
00542bf9      *(uint32_t*)result = &CNetLayerPacket::`vftable';
00542bff      *(uint16_t*)((char*)result + 0x108) = arg1;
00542c06      return result;
00542ba0  }

00542c16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00542c20  void* __thiscall NetPacket::`scalar deleting destructor'(class NetPacket* this, uint32_t arg2)

00542c20  {
00542c23      NetPacket::~NetPacket(this);
00542c23      
00542c2d      if ((arg2 & 1) != 0)
00542c30          operator delete(this);
00542c30      
00542c3b      return this;
00542c20  }

00542c3e                                                                                            90 90                                ..

00542c40  void __fastcall NetPacket::~NetPacket(class NetPacket* this)

00542c40  {
00542c43      class NetPacket* this_1 = this;
00542c4b      int32_t i = 0;
00542c4d      bool cond:0 = this_1->numSpecialFrags_ <= 0;
00542c50      this_1->vtable = &CNetLayerPacket::`vftable';
00542c50      
00542c56      if (!(cond:0))
00542c56      {
00542c58          class COptionalHeader* (* ebp_1)[0x20] = &this_1->specialFragList_;
00542c58          
00542c89          do
00542c89          {
00542c60              class COptionalHeader* edi_1 = ADJ(ebp_1)->specialFragList_[0];
00542c67              int32_t eax_2;
00542c67              eax_2 = InterlockedDecrement(&edi_1->m_cRef);
00542c67              
00542c73              if ((eax_2 == 0 && edi_1 != 0))
00542c75                  edi_1->vtable->__vecDelDtor(1);
00542c75              
00542c83              i += 1;
00542c84              ebp_1 = &*(uint128_t*)ebp_1[1];
00542c89          } while (i < this_1->numSpecialFrags_);
00542c56      }
00542c56      
00542c91      int32_t i_1 = 0;
00542c91      
00542c95      if (this_1->numFrags_ > 0)
00542c95      {
00542c97          class BlobFrag* (* ebx)[0x1d] = &this_1->fragList_;
00542c97          
00542cc8          do
00542cc8          {
00542ca0              class BlobFrag* edi_2 = ADJ(ebx)->fragList_[0];
00542ca0              
00542cb2              if ((InterlockedDecrement(&edi_2->m_cRef) == 0 && edi_2 != 0))
00542cb4                  edi_2->vtable->__vecDelDtor(1);
00542cb4              
00542cc2              i_1 += 1;
00542cc3              ebx = &*(uint116_t*)ebx[1];
00542cc8          } while (i_1 < this_1->numFrags_);
00542c95      }
00542c95      
00542ccb      this_1->vtable = 0x7942f4;
00542c40  }

00542c5d                                                                                         8d 49 00                               .I.
00542cd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00542ce0  void __fastcall SharedNet::~SharedNet(class SharedNet* this)

00542ce0  {
00542ce5      void* edi = *(int32_t*)((char*)this + 0x14);
00542cec       = &SharedNet::`vftable';
00542cec      
00542cf2      if (edi != 0)
00542cf2      {
00542cf7          AC1Legacy::vlong::~vlong(((char*)edi + 0xc));
00542cfe          AC1Legacy::vlong::~vlong(edi);
00542d04          operator delete(edi);
00542cf2      }
00542cf2      
00542d0c      int32_t* edi_1 = *(int32_t*)((char*)this + 0x8880);
00542d1b      *(int32_t*)((char*)this + 0x14) = 0;
00542d1b      
00542d1e      if (edi_1 != 0)
00542d1e      {
00542d2c          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00542d34              **(uint32_t**)edi_1(1);
00542d34          
00542d36          *(int32_t*)((char*)this + 0x8880) = 0;
00542d1e      }
00542d1e      
00542d3c      int32_t* edi_2 = *(int32_t*)((char*)this + 0x8858);
00542d3c      
00542d44      if (edi_2 != 0)
00542d44      {
00542d52          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00542d5a              **(uint32_t**)edi_2(1);
00542d5a          
00542d5c          *(int32_t*)((char*)this + 0x8858) = 0;
00542d44      }
00542d44      
00542d62      int32_t* edi_3 = *(int32_t*)((char*)this + 0x885c);
00542d62      
00542d6a      if (edi_3 != 0)
00542d6a      {
00542d78          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00542d80              **(uint32_t**)edi_3(1);
00542d80          
00542d82          *(int32_t*)((char*)this + 0x885c) = 0;
00542d6a      }
00542d6a      
00542d88      int32_t* edi_4 = *(int32_t*)((char*)this + 0x8860);
00542d88      
00542d90      if (edi_4 != 0)
00542d90      {
00542d9e          if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
00542da6              **(uint32_t**)edi_4(1);
00542da6          
00542da8          *(int32_t*)((char*)this + 0x8860) = 0;
00542d90      }
00542d90      
00542dae      int32_t* edi_5 = *(int32_t*)((char*)this + 0x8864);
00542dae      
00542db6      if (edi_5 != 0)
00542db6      {
00542dc4          if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
00542dcc              **(uint32_t**)edi_5(1);
00542dcc          
00542dce          *(int32_t*)((char*)this + 0x8864) = 0;
00542db6      }
00542db6      
00542dd4      int32_t* edi_6 = *(int32_t*)((char*)this + 0x8868);
00542dd4      
00542ddc      if (edi_6 != 0)
00542ddc      {
00542dea          if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
00542df2              **(uint32_t**)edi_6(1);
00542df2          
00542df4          *(int32_t*)((char*)this + 0x8868) = 0;
00542ddc      }
00542ddc      
00542dfa      void* __offset(SharedNet, 0x8820) edi_7 = &*(int32_t*)((char*)this + 0x8820);
00542e00      int32_t i_1 = 0x100;
00542e1e      int32_t i;
00542e1e      
00542e1e      do
00542e1e      {
00542e10          edi_7 -= 0x88;
00542e18          ReceiverData::~ReceiverData(edi_7);
00542e1d          i = i_1;
00542e1d          i_1 -= 1;
00542e1e      } while (i != 1);
00542e26      /* tailcall */
00542e26      return NetInitializer::~NetInitializer(&*(int32_t*)((char*)this + 8));
00542ce0  }

00542e08                          8d a4 24 00 00 00 00 90                                                          ..$.....
00542e2b                                   90 90 90 90 90                                                             .....

00542e30  uint8_t __thiscall SharedNet::SplitPacketData(class SharedNet* this, class CNetLayerPacket* arg2)

00542e30  {
00542e30      class SharedNet* this_1 = this;
00542e35      class CNetLayerPacket* edi = arg2;
00542e39      class ReceiverData* m_pRecv = edi->m_pRecv;
00542e41      class SharedNet* this_2 = this;
00542e43      class SharedNet* this_3 = this_2;
00542e47      int32_t ebx;
00542e47      ebx = 1;
00542e4f      char edx;
00542e4f      
00542e4f      if ((m_pRecv == 0 || m_pRecv->m_RecID == 0))
00542e4f      {
00542e59          arg2 = 0;
00542e5e          edx = arg2;
00542e4f      }
00542e4f      else
00542e4f      {
00542e51          edx = 1;
00542e53          arg2 = 1;
00542e4f      }
00542e4f      
00542e62      uint32_t header_ = edi->m_Hdr.header_;
00542e62      
00542e6d      if ((header_ & 0xffffff00) == 0)
00542e6d          goto label_542e8e;
00542e6d      
00542e7d      ebx = COptionalHeaderFactory::AddOptionalHeadersToPacket(header_, edi, &edi->m_Iter);
00542e7d      
00542e84      if (ebx != 0)
00542e84      {
00542e8a          edx = arg2;
00542e8e      label_542e8e:
00542e8e          uint32_t numSpecialFrags_ = edi->numSpecialFrags_;
00542e8e          
00542e96          if (numSpecialFrags_ > 0)
00542e96          {
00542e9b              uint32_t ebp = numSpecialFrags_;
00542e9d              class COptionalHeader* (* ecx_2)[0x20] = &edi->specialFragList_;
00542ec7              uint32_t i;
00542ec7              
00542ec7              do
00542ec7              {
00542ea2                  uint8_t m_Flags = ((int8_t)ADJ(ecx_2)->specialFragList_[0]->m_Flags);
00542ea2                  
00542eb5                  if (((m_Flags & 2) != 0 && (numSpecialFrags_ > 1 || edi->numFrags_ > 0)))
00542eb7                      ebx = 0;
00542eb7                  
00542ebf                  if ((edx == 0 && (m_Flags & 4) == 0))
00542ec1                      ebx = 0;
00542ec1                  
00542ec3                  ecx_2 = &*(uint128_t*)ecx_2[1];
00542ec6                  i = ebp;
00542ec6                  ebp -= 1;
00542ec7              } while (i != 1);
00542ec9              this_2 = this_3;
00542e96          }
00542e96          
00542ed8          if ((ebx != 0 && (edi->m_Hdr.header_ & 4) != 0))
00542ed8          {
00542edc              if (edx == 0)
00542fd2                  ebx = 0;
00542edc              else
00542edc              {
00542ee8                  while (true)
00542ee8                  {
00542ee8                      uint32_t m_dwCurOfs = edi->m_Iter.m_dwCurOfs;
00542eeb                      uint32_t m_cbBufSize = edi->m_Iter.m_cbBufSize;
00542eeb                      
00542ef0                      if (m_dwCurOfs >= m_cbBufSize)
00542ef0                          break;
00542ef0                      
00542ef2                      uint32_t eax_2 = (m_cbBufSize - m_dwCurOfs);
00542ef2                      
00542ef7                      if (eax_2 <= 0x10)
00542ef7                          break;
00542ef7                      
00542ef9                      class CBufferIterator* var_18_2 = &edi->m_Iter;
00542efa                      class BlobFrag* eax_3 = BlobFrag::CreateForRecv(eax_2);
00542efa                      
00542f06                      if (eax_3 == 0)
00542f06                      {
00542f2c                          ebx = 0;
00542f2c                          break;
00542f06                      }
00542f06                      
00542f0f                      NetPacket::AddFrag(edi, eax_3, 0, 0);
00542f0f                      
00542f20                      if (InterlockedDecrement(&eax_3->m_cRef) == 0)
00542f22                          eax_3->vtable->__vecDelDtor(1);
00542ee8                  }
00542ee8                  
00542f2e                  this_2 = this_3;
00542edc              }
00542ed8          }
00542e84      }
00542e84      
00542f32      uint32_t m_dwCurOfs_1 = edi->m_Iter.m_dwCurOfs;
00542f38      uint32_t m_cbBufSize_1 = edi->m_Iter.m_cbBufSize;
00542f38      
00542f46      if ((m_dwCurOfs_1 < m_cbBufSize_1 && (m_cbBufSize_1 - m_dwCurOfs_1) > 0))
00542f48          ebx = 0;
00542f48      
00542f5b      uint8_t eax_8 = (((int8_t)(edi->m_Hdr.header_ >> 1)) & 1);
00542f5d      uint16_t ecx_6;
00542f5d      ecx_6 = (((int16_t)(edi->flags_ >> 2)) & 1);
00542f5d      
00542f70      if ((eax_8 != ecx_6 || (eax_8 != 0 && edi->m_Hdr.seqID_ == 0)))
00542f70      {
00542f72          ebx = 0;
00542f74      label_542f74:
00542f74          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00542f79          arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00542f81          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00542f95          NetUtils::GetIPString(&edi->m_Addr, &arg2, 0);
00542f9a          class CNetLayerPacket* eax_11 = arg2;
00542f9a          
00542fb3          if ((InterlockedDecrement(&eax_11->m_cRef) == 0 && eax_11 != 0))
00542fb5              eax_11->vtable->__vecDelDtor(1);
00542f70      }
00542f70      else
00542f70      {
00542fdb          if (ebx == 0)
00542fdb              goto label_542f74;
00542fdb          
00542fe9          if (edi->checksum_ == edi->m_Hdr.checksum_)
00542fe9          {
00542ff1              edi->seqNum_ = edi->m_Hdr.seqID_;
00542ff7              uint32_t numFrags_ = edi->numFrags_;
00543006              edi->recipient_ = edi->m_Hdr.recID_;
00543006              
0054300d              if (numFrags_ != 0)
0054300d              {
00543017                  if (edi->numSpecialFrags_ != 0)
00543017                  {
00543022                      *(uint32_t*)(4, 1);
0054302b                      return ebx;
00543017                  }
00543017                  
00543034                  if (numFrags_ != 0)
00543034                  {
0054303f                      *(uint32_t*)(5, 1);
00543048                      return ebx;
00543034                  }
0054300d              }
0054300d              
00543053              if (edi->numSpecialFrags_ != 0)
0054305e                  *(uint32_t*)(3, 1);
0054305e              
00543063              uint32_t eax_20;
00543063              eax_20 = ebx;
00543067              return eax_20;
00542fe9          }
00542fe9          
0054302e          ebx = 0;
00542f70      }
00542f70      
00542fc6      *(uint32_t*)(2, 1);
00542fcf      return ebx;
00542e30  }

0054306a                                90 90 90 90 90 90                                                            ......

00543070  uint8_t __thiscall SharedNet::ProcessOptionalHeader(class SharedNet* this, class COptionalHeader const* arg2, class CNetLayerPacket const* arg3)

00543070  {
005430ee      uint32_t eax;
005430ee      
005430ee      switch (arg2->m_dwMask)
005430ee      {
00543084          case 0x1000:
00543084          {
005430c5              *(uint32_t*)( + 0x44)(arg2, arg3);
005430c9              int32_t eax_6;
005430c9              eax_6 = 1;
005430cc              return 1;
00543084              break;
00543084          }
0054308b          case 0x2000:
0054308b          {
005430b3              *(uint32_t*)( + 0x4c)(arg2, arg3);
005430b7              int32_t eax_4;
005430b7              eax_4 = 1;
005430ba              return 1;
0054308b              break;
0054308b          }
00543092          case 0x4000:
00543092          {
005430a1              *(uint32_t*)( + 0x48)(arg2, arg3);
005430a5              int32_t eax_2;
005430a5              eax_2 = 1;
005430a8              return 1;
00543092              break;
00543092          }
00543077          case 0x200000:
00543077          {
005430df              *(uint32_t*)( + 0x3c)(((uint32_t)arg3->m_Hdr.recID_), 6);
005430e3              int32_t eax_9;
005430e3              eax_9 = 1;
005430e6              return 1;
00543077              break;
00543077          }
005430e9          case 0x1000000:
005430e9          {
00543148              *(uint32_t*)( + 0x40)(arg2, arg3);
0054314c              eax = 1;
0054314f              return 1;
005430e9              break;
005430e9          }
005430f0          case 0x2000000:
005430f0          {
00543105              class COptionalHeader* ecx = *(int32_t*)((char*)arg2 + 0x18);
0054310b              arg2 = ecx;
0054310f              class COptionalHeader* eax_10 = CEchoResponseHeader::CreateFromData(ecx);
0054312d              PacketController::EnqueueOptionalHeader(PacketController::Instance(), arg3->recipient_, eax_10);
00543134              ReferenceCountTemplate<1048576,0>::Release(eax_10);
0054313a              uint32_t eax_14;
0054313a              eax_14 = 1;
0054313d              return 1;
005430f0              break;
005430f0          }
005430f7          case 0x4000000:
005430f7          {
0054314c              eax = 1;
0054314f              return 1;
005430f7              break;
005430f7          }
005430ee      }
005430ee      
005430ff      eax = 0;
00543102      return 0;
00543070  }

00543152                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00543160  uint8_t __thiscall SharedNet::SendOptionalHeader(class SharedNet* this, class COptionalHeader* arg2, struct sockaddr_in const* arg3, class ReceiverData const* arg4)

00543160  {
0054316d      uint8_t m_Flags = ((int8_t)arg2->m_Flags);
0054316d      
005431a4      if (((m_Flags & 0x10) != 0 || ((m_Flags & 1) == 0 || ((m_Flags & 2) == 0 || ((m_Flags & 8) != 0 || ((m_Flags & 4) == 0 && arg4 == 0))))))
00543247          return 0;
00543247      
005431ac      class NetPacket* eax_1 = NetPacket::CreateForSend(0);
005431b9      NetPacket::AddOptionalHeader(eax_1, arg2);
005431c0      uint32_t m_dwMask = arg2->m_dwMask;
005431c3      int32_t s = 0;
005431ea      uint16_t var_4_1 = eax_1->size_;
005431ef      uint32_t m_dwMask_1 = m_dwMask;
005431f9      uint32_t checksum_ = eax_1->checksum_;
005431fd      __builtin_memset(&s, 0, 0x14);
005431fd      
00543201      if (arg4 == 0)
00543201      {
00543217          int16_t var_8_1 = 0;
0054321c          int16_t var_2_2 = 0;
00543201      }
00543201      else
00543201      {
00543207          m_dwMask = arg4->iteration_;
0054320b          uint16_t m_NetID = arg4->m_NetID;
00543210          int16_t var_2_1 = m_dwMask;
00543201      }
00543201      
00543230      uint8_t result = SharedNet::SendPacket(this, eax_1, &s, arg3);
00543239      ReferenceCountTemplate<1048576,0>::Release(eax_1);
0054323e      return result;
00543160  }

0054324a                                90 90 90 90 90 90                                                            ......

00543250  uint8_t __convention("regparm") ParseInterfaceString(class AC1Legacy::PStringBase<char> arg1, struct in_addr* arg2, struct in_addr* arg3)

00543250  {
00543250      char* ecx;
00543250      char* var_4 = ecx;
00543253      class AC1Legacy::PStringBase<char> esi = arg1;
0054325f      var_4 = (esi + 0x14);
0054326c      arg3->S_un = 0;
00543273      arg2->S_un = 0;
00543273      
00543283      if (ParseInAddr(&var_4, arg2) == 0)
00543283      {
005432be      label_5432be:
005432be          
005432ce          if ((InterlockedDecrement((esi + 4)) == 0 && esi != 0))
005432ce          {
005432da              **(uint32_t**)esi(1);
005432de              int32_t eax_9;
005432de              eax_9 = 0;
005432e2              return 0;
005432ce          }
00543283      }
00543283      else
00543283      {
00543285          char* eax_3 = var_4;
00543285          
0054328c          if (*(uint8_t*)eax_3 == 0x2f)
0054328c          {
00543296              var_4 = &eax_3[1];
0054329a              int32_t eax_5 = strchr(&eax_3[1], 0x2e);
005432a2              char ebx_2 = ((int8_t)-(eax_5));
005432a2              
005432b8              if (ParseInAddr(&var_4, arg3) == 0)
005432b8                  goto label_5432be;
005432b8              
005432e5              if ((ebx_2 - ebx_2) != 0xff)
005432e5              {
005432f0                  uint32_t i_1 = (Ordinal_WSOCK32_14(arg3->S_un) >> 0x18);
005432f0                  
005432fa                  if ((i_1 < 0 || i_1 > 0x20))
005432fa                  {
0054334d                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
00543354                      int32_t eax_14;
00543354                      eax_14 = 0;
00543358                      return 0;
005432fa                  }
005432fa                  
005432fe                  arg3->S_un = 0;
005432fe                  
00543304                  if (i_1 > 0)
00543304                  {
00543306                      struct in_addr ecx_4 = 0;
00543319                      uint32_t i;
00543319                      
00543319                      do
00543319                      {
00543312                          ecx_4 = ((ecx_4 >> 1) | 0x80000000);
00543318                          i = i_1;
00543318                          i_1 -= 1;
00543319                      } while (i != 1);
0054331b                      arg3->S_un = ecx_4;
00543304                  }
00543304                  
00543326                  arg3->S_un = Ordinal_WSOCK32_8(arg3->S_un);
005432e5              }
005432e5              
00543338              if ((InterlockedDecrement((esi + 4)) == 0 && esi != 0))
00543340                  **(uint32_t**)esi(1);
00543340              
00543344              int32_t eax_13;
00543344              eax_13 = 1;
00543348              return 1;
0054328c          }
0054328c          
00543369          if ((InterlockedDecrement((esi + 4)) == 0 && esi != 0))
00543371              **(uint32_t**)esi(1);
00543283      }
00543283      
00543375      int32_t eax_7;
00543375      eax_7 = 0;
00543379      return 0;
00543250  }

0054330a                                8d 9b 00 00 00 00                                                            ......
0054337a                                                                                90 90 90 90 90 90                            ......

00543380  void __thiscall ClientNet::EndState(class ClientNet* this, class NetError const* arg2)

00543380  {
0054339a      int32_t eax_1 = CAsyncStateHandler::GetContextData(&this->vtable, this->m_LogonData.hCurrentContext.m_id, this->m_idxFailureReason);
005433a6      *(uint32_t*)(eax_1 + 4) = arg2->m_stringID;
005433ac      *(uint32_t*)(eax_1 + 8) = arg2->m_tableID;
005433af      this->m_LogonData.bMyTurn = 0;
005433b6      class AsyncContext m_stringID = arg2->m_stringID;
005433b6      
005433ca      if ((m_stringID != ID_NetError_None.m_stringID || arg2->m_tableID != ID_NetError_None.m_tableID))
005433ca      {
005433e4          uint32_t m_id = this->m_LogonData.hCurrentContext.m_id;
005433ea          uint32_t m_id_3 = m_id;
005433ed          CAsyncStateHandler::EndStateFailed(&this->vtable, m_id);
005433f4          return;
005433ca      }
005433ca      
005433cc      uint32_t m_id_1 = this->m_LogonData.hCurrentContext.m_id;
005433d2      int32_t var_c_1 = 0x7ffffffe;
005433d7      uint32_t m_id_2 = m_id_1;
005433da      CAsyncStateHandler::EndStateOK(&this->vtable, m_stringID, m_id_1);
00543380  }

005433f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00543400  void __fastcall ClientNet::AbortConnection(class ClientNet* this)

00543400  {
0054340c      if (this->m_LogonData.hCurrentContext.m_id != INVALID_ASYNCCONTEXT.m_id)
00543413          ClientNet::EndState(this, &ID_NetError_AbortedHandshake);
00543400  }

00543419                                                                             90 90 90 90 90 90 90                           .......

00543420  uint8_t __fastcall ClientNet::VerifyHeader(class ClientNet* this, class CNetLayerPacket const* arg2)

00543420  {
00543420      class ClientNet* var_4 = this;
00543421      int32_t __saved_ebx_1;
00543421      int32_t __saved_ebx = __saved_ebx_1;
00543422      class CNetLayerPacket* ebx = arg2;
00543426      uint16_t recID_ = ebx->m_Hdr.recID_;
00543431      int32_t __saved_esi_1;
00543431      int32_t __saved_esi = __saved_esi_1;
00543432      int32_t __saved_edi_1;
00543432      int32_t __saved_edi = __saved_edi_1;
00543439      class AC1Legacy::PStringBase<char>* var_18;
00543439      
00543439      if (recID_ >= 0x100)
00543439      {
00543577          struct ClientNet::VTable* vtable = this->vtable;
00543579          int32_t var_14_8 = 1;
0054357b          var_18 = 2;
0054357d          vtable->__vecDelDtor(var_18, var_14_8);
0054357f          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00543584          arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0054358c          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00543592          uint8_t var_14_10 = 0;
00543598          var_18 = &arg2;
0054359a          NetUtils::GetIPString(&ebx->m_Addr, var_18, var_14_10);
0054359f          class CNetLayerPacket* eax_6 = arg2;
0054359f          
005435b8          if ((InterlockedDecrement(&eax_6->m_cRef) == 0 && eax_6 != 0))
005435ba              eax_6->vtable->__vecDelDtor(1);
005435ba          
005435c4          int32_t eax_8;
005435c4          eax_8 = 0;
005435c8          return 0;
00543439      }
00543439      
00543442      int32_t eax_1 = (((uint32_t)recID_) * 0x88);
0054344e      void* edi = (eax_1 + this);
00543451      eax_1 = *(uint16_t*)((eax_1 + this) + 0x20) != 0;
00543456      class ClientNet*** esp_1;
00543456      
00543456      if (eax_1 != 0)
00543456      {
00543494      label_543494:
00543494          
00543497          if (*(uint32_t*)((char*)edi + 0x54) != ebx->m_Addr.sin_addr.S_un)
00543497          {
0054349d              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4);
005434a2              uint8_t var_14_2 = 0;
005434a8              var_18 = &var_4;
005434aa              NetUtils::GetIPString(&ebx->m_Addr, var_18, var_14_2);
005434b6              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2);
005434bb              uint8_t var_14_3 = 0;
005434c1              var_18 = &arg2;
005434c6              NetUtils::GetIPString(((char*)edi + 0x50), var_18, var_14_3);
005434d2              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
005434db              AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005434e2              int32_t eax_3;
005434e2              eax_3 = 0;
005434e6              return 0;
00543497          }
00543497          
005434eb          uint16_t ecx_6 = *(uint16_t*)((char*)edi + 0x22);
005434f1          class AC1Legacy::PStringBase<char>* edx_2;
005434f1          edx_2 = ebx->m_Hdr.iteration_;
005434f9          var_18 = edx_2;
005434fa          eax_1 = TimeStampUtils::OverflowCompare(var_18, ecx_6);
005434fa          
00543504          if (eax_1 < 0)
00543504          {
0054350a              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2);
0054350f              int32_t var_14_5 = 0;
00543515              var_18 = &arg2;
00543515              esp_1 = &var_18;
00543504          }
00543504          else if ((eax_1 <= 0 || (ebx->m_Hdr.header_ & 0x40000) != 0))
00543524          {
00543541              if (ebx->m_Hdr.datalen_ <= 0xffe0)
00543541              {
00543570                  eax_1 = 1;
00543574                  return 1;
00543541              }
00543541              
00543547              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2);
0054354c              int32_t var_14_7 = 0;
00543552              var_18 = &arg2;
00543552              esp_1 = &var_18;
00543524          }
00543524          else
00543524          {
0054352a              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2);
0054352f              int32_t var_14_6 = 0;
00543535              var_18 = &arg2;
00543535              esp_1 = &var_18;
00543524          }
00543456      }
00543456      else
00543456      {
00543460          if (ebx->m_Hdr.seqID_ == 0)
00543460          {
0054348b              if (eax_1 != 0)
0054348b                  goto label_543494;
0054348b              
00543570              eax_1 = 1;
00543574              return 1;
00543460          }
00543460          
00543462          struct ClientNet::VTable* vtable_1 = this->vtable;
00543464          int32_t var_14_1 = 1;
00543466          var_18 = 2;
00543468          vtable_1->__vecDelDtor(var_18, var_14_1);
0054346a          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0054346f          var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00543477          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0054347d          int32_t var_1c_2 = 0;
00543483          class ClientNet** var_20 = &var_4;
00543483          esp_1 = &var_20;
00543456      }
00543456      
00543553      *(uint32_t*)((char*)esp_1 - 4) = &ebx->m_Addr;
00543554      NetUtils::GetIPString();
00543560      AC1Legacy::PStringBase<char>::~PStringBase<char>(&esp_1[7]);
00543553      esp_1[2];
00543553      esp_1[3];
00543567      int32_t eax_4;
00543567      eax_4 = 0;
00543553      esp_1[4];
00543553      esp_1[5];
0054356b      return 0;
00543420  }

005435cb                                   90 90 90 90 90                                                             .....

005435d0  void __thiscall ClientNet::NotifyPluginsOfStatusChange(class ClientNet* this, enum NetStatus arg2, int32_t arg3, int32_t arg4)

005435d0  {
005435d4      uint32_t m_num = this->m_Plugins.m_num;
005435d4      
005435dc      while (m_num > 0)
005435dc      {
005435fe          int32_t vtable = this->m_Plugins.m_data[(m_num - 1)]->vtable;
00543601          m_num -= 1;
00543604          *(uint32_t*)(vtable + 0xc)(arg2, arg3, arg4);
005435dc      }
005435d0  }

005435ea                                8d 9b 00 00 00 00                                                            ......
00543612                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00543620  void __fastcall ClientNet::NotifyPluginsOfHeartbeat(class ClientNet* this)

00543620  {
00543624      uint32_t m_num = this->m_Plugins.m_num;
00543624      
0054362c      while (m_num > 0)
0054362c      {
0054364a          int32_t vtable = this->m_Plugins.m_data[(m_num - 1)]->vtable;
0054364c          m_num -= 1;
0054364e          *(uint32_t*)(vtable + 8)(&this->m_LinkStatusAverages);
0054362c      }
00543620  }

00543637                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
00543659                                                                             90 90 90 90 90 90 90                           .......

00543660  class COptionalHeader* COnePrimHeader<134217728,16,CFlowStruct>::CreateFromData(struct CFlowStruct arg1)

00543660  {
00543662      void* result = operator new(0x20);
00543662      
0054366c      if (result == 0)
005436a8          return 0;
005436a8      
00543675      *(uint32_t*)((char*)result + 0x18) = arg1.cbDataRecvd;
00543677      uint32_t edx;
00543677      edx = arg1.interval;
0054367c      *(uint32_t*)((char*)result + 4) = 1;
00543683      *(uint32_t*)((char*)result + 8) = 0x8000000;
0054368a      *(uint32_t*)((char*)result + 0xc) = 0x10;
00543691      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
00543694      *(uint32_t*)((char*)result + 0x14) = 6;
0054369b      *(uint32_t*)result = 0x7ca508;
005436a1      *(uint16_t*)((char*)result + 0x1c) = edx;
005436a5      return result;
00543660  }

005436a9                             90 90 90 90 90 90 90                                                           .......

005436b0  class COptionalHeader* CPackObjHeader<NetError,1048576,7>::CreateFromData(class NetError const* arg1)

005436b0  {
005436b1      class NetError* ebx = arg1;
005436bb      uint32_t eax_1 = ebx->vtable->GetPackSize();
005436c1      void* eax_2 = operator new[](eax_1);
005436c6      struct NetError::VTable* vtable = ebx->vtable;
005436d5      arg1 = eax_2;
005436d5      
005436de      if (vtable->Pack(&arg1, eax_1) == eax_1)
005436de      {
005436f1          struct CPackObjHeader<NetError,1048576,7>::VTable** result = operator new(0x30);
005436f1          
005436fb          if (result != 0)
005436fb          {
005436fd              result[4] = eax_2;
00543700              result[6] = eax_2;
00543704              result[5] = eax_1;
00543707              result[7] = eax_1;
0054370b              result[1] = 1;
00543712              result[2] = 0x100000;
00543719              result[3] = 7;
00543720              *(uint32_t*)result = &CPackObjHeader<class NetError,1048576,7>::`vftable';
00543726              result[8] = 0x794878;
0054372e              return result;
005436fb          }
005436de      }
005436de      else
005436e1          operator delete(eax_2);
005436e1      
005436ee      return 0;
005436b0  }

0054372f                                               90                                                                 .

00543730  class COptionalHeader* COnePrimHeader<2048,1073741922,CReferralStruct>::CreateFromData(struct CReferralStruct arg1)

00543730  {
00543732      void* result = operator new(0x38);
00543732      
0054373c      if (result == 0)
00543778          return 0;
00543778      
00543743      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
0054374f      __builtin_memcpy(((char*)result + 0x18), &arg1, 0x20);
00543752      *(uint32_t*)((char*)result + 4) = 1;
00543759      *(uint32_t*)((char*)result + 8) = 0x800;
00543760      *(uint32_t*)((char*)result + 0xc) = 0x40000062;
00543767      *(uint32_t*)((char*)result + 0x14) = 0x20;
0054376e      *(uint32_t*)result = 0x7ca508;
00543775      return result;
00543730  }

00543779                                                                             90 90 90 90 90 90 90                           .......

00543780  void __thiscall AVL<unsigned long,unsigned long>::ReBalanceTree(class AVL<unsigned long,unsigned long>* this, class AVLNode<unsigned long,unsigned long>* arg2, class AVLNode<unsigned long,unsigned long>* arg3)

00543780  {
0054378f      for (class AVLNode<unsigned long,unsigned long>* _parent = arg2; _parent != arg3; _parent = _parent->_parent)
0054378f      {
00543791          class AVLNode<unsigned long,unsigned long>* _left = _parent->_left;
00543795          int32_t ecx_1;
00543795          
00543795          if (_left == 0)
0054379d              ecx_1 = 1;
00543795          else
0054379a              ecx_1 = (_left->_height + 1);
0054379a          
005437a2          class AVLNode<unsigned long,unsigned long>* _right = _parent->_right;
005437a7          _parent->_leftHeight = ecx_1;
005437aa          int32_t eax_2;
005437aa          
005437aa          if (_right == 0)
005437b2              eax_2 = 1;
005437aa          else
005437af              eax_2 = (_right->_height + 1);
005437af          
005437b9          _parent->_rightHeight = eax_2;
005437bc          int32_t edx_1 = ecx_1;
005437bc          
005437be          if (ecx_1 < eax_2)
005437c0              edx_1 = eax_2;
005437c0          
005437c4          _parent->_height = edx_1;
005437c7          int32_t eax_4;
005437c7          int32_t edx_2;
005437c7          edx_2 = HIGHD(((int64_t)(eax_2 - ecx_1)));
005437c7          eax_4 = LOWD(((int64_t)(eax_2 - ecx_1)));
005437c7          
005437cf          if (((eax_4 ^ edx_2) - edx_2) == 2)
005437d4              AVL<unsigned long,unsigned long>::Rebalance(this, _parent);
0054378f      }
00543780  }

005437e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005437f0  class AVLNode<unsigned long,unsigned long>* __thiscall AVL<unsigned long,unsigned long>::FindSuccessor(class AVL<unsigned long,unsigned long>* this, class AVLNode<unsigned long,unsigned long>* arg2, class AVLNode<unsigned long,unsigned long>* arg3)

005437f0  {
005437f1      class AVLNode<unsigned long,unsigned long>* result = arg3;
005437f5      class AVLNode<unsigned long,unsigned long>* _left = result->_left;
005437f9      class AVLNode<unsigned long,unsigned long>* result_1;
005437f9      
005437f9      if (_left == 0)
0054380c          result_1 = arg2;
005437f9      else
005437f9      {
00543808          do
00543808          {
00543800              result_1 = result;
00543802              result = _left;
00543804              _left = result->_left;
00543808          } while (_left != 0);
005437f9      }
005437f9      
00543810      class AVLNode<unsigned long,unsigned long>* _right_1 = result->_right;
00543810      
00543815      if (_right_1 == 0)
00543815      {
00543852          _right_1 = result->_parentsize;
00543852          
00543857          if (_right_1 != 0)
00543857          {
0054385c              result_1->_left = 0;
00543862              AVL<unsigned long,unsigned long>::ReBalanceTree(this, result_1, nullptr);
0054386a              return result;
00543857          }
00543857          
00543870          result_1->_right = nullptr;
00543877          AVL<unsigned long,unsigned long>::ReBalanceTree(this, result_1, nullptr);
0054387f          return result;
00543815      }
00543815      
00543817      bool cond:0 = result->_parentsize == 0;
0054381b      _right_1->_parent = result_1;
0054381e      class AVLNode<unsigned long,unsigned long>* _right = result->_right;
0054381e      
00543821      if (!(cond:0))
00543821      {
00543823          result_1->_left = _right;
00543825          result->_right->_parentsize = 1;
0054382f          AVL<unsigned long,unsigned long>::ReBalanceTree(this, result_1, nullptr);
00543837          return result;
00543821      }
00543821      
0054383a      result_1->_right = _right;
0054383d      result->_right->_parentsize = 0;
00543847      AVL<unsigned long,unsigned long>::ReBalanceTree(this, result_1, nullptr);
0054384f      return result;
005437f0  }

005437fd                                                                                         8d 49 00                               .I.
00543882        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00543890  uint8_t TimeStampUtils::lhs_newer(uint32_t arg1, uint32_t arg2) __pure

00543890  {
0054389b      if (arg1 == arg2)
0054389b      {
005438a3          int32_t eax_1;
005438a3          eax_1 = false;
005438a7          return 0;
0054389b      }
0054389b      
005438aa      uint32_t ecx_1 = (arg1 - arg2);
005438ae      int32_t esi = 1;
005438ae      
005438b3      if (arg1 < arg2)
005438b3      {
005438b7          ecx_1 = (arg2 - arg1);
005438b9          esi = 0xffffffff;
005438b3      }
005438b3      
005438c2      if (ecx_1 > 0x7fffffff)
005438c4          esi = -(esi);
005438c4      
005438ce      return esi > 0;
00543890  }

005438cf                                               90                                                                 .

005438d0  uint8_t TimeStampUtils::lhs_newer(uint16_t arg1, uint16_t arg2) __pure

005438d0  {
005438dc      if (arg1 == arg2)
005438dc      {
005438e4          int32_t eax_1;
005438e4          eax_1 = false;
005438e8          return 0;
005438dc      }
005438dc      
005438eb      uint16_t ecx_1 = (arg1 - arg2);
005438f0      int32_t esi = 1;
005438f0      
005438f5      if (arg1 < arg2)
005438f5      {
005438f9          ecx_1 = (arg2 - arg1);
005438fb          esi = 0xffffffff;
005438f5      }
005438f5      
00543903      if (ecx_1 > 0x7fff)
00543905          esi = -(esi);
00543905      
0054390f      return esi > 0;
005438d0  }


00543910  void __thiscall AC1Legacy::PStringBase<unsigned short>::PStringBase<unsigned short>(class AC1Legacy::PStringBase<unsigned short>* this, uint16_t const* arg2)

00543910  {
00543920      if ((arg2 != 0 && *(uint16_t*)arg2 != 0))
00543920      {
0054392f          AC1Legacy::PStringBase<unsigned short>::allocate_ref_buffer(this, wcslen(arg2));
0054393b          wcscpy(&this->m_buffer->m_data, arg2);
00543948          return;
00543920      }
00543920      
0054394b      class AC1Legacy::PSRefBuffer<unsigned short>* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer;
00543957      this->m_buffer = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1;
00543959      InterlockedIncrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1->m_cRef);
00543910  }

00543966                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00543970  uint8_t __thiscall SmartArray<ClientNet::CReferralQueueEntry,1>::grow(class SmartArray<ClientNet::CReferralQueueEntry,1>* this, uint32_t arg2)

00543970  {
00543978      uint32_t esi = arg2;
0054397e      uint32_t eax;
0054397e      
0054397e      if (esi >= this->m_num)
0054397e      {
0054398e          if (esi <= (this->m_sizeAndDeallocate & 0x7fffffff))
0054398e          {
00543a12              eax = 1;
00543a15              return 1;
0054398e          }
0054398e          
00543996          if (esi == 0)
00543996          {
00543998              SmartArray<ClientNet::CReferralQueueEntry,1>::Reset(this);
0054399f              int32_t eax_2;
0054399f              eax_2 = 1;
005439a2              return 1;
00543996          }
00543996          
005439b1          uint32_t ebp_1 = operator new[]((esi * 0x28));
005439b1          
005439b8          if (ebp_1 != 0)
005439b8          {
005439bd              if (this->m_data != 0)
005439bd              {
005439bf                  uint32_t m_num = this->m_num;
005439bf                  
005439c3                  if ((m_num - 1) >= 0)
005439c3                  {
005439c8                      eax = ((m_num - 1) * 0x28);
005439cb                      int32_t edx_1 = m_num;
005439e2                      int32_t i;
005439e2                      
005439e2                      do
005439e2                      {
005439d2                          void* esi_2 = (this->m_data + eax);
005439d4                          uint32_t edi_1 = (eax + ebp_1);
005439dc                          eax -= 0x28;
005439df                          i = edx_1;
005439df                          edx_1 -= 1;
005439e0                          __builtin_memcpy(edi_1, esi_2, 0x28);
005439e2                      } while (i != 1);
005439e4                      esi = arg2;
005439c3                  }
005439c3                  
005439f8                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005439fd                      operator delete[](this->m_data);
005439bd              }
005439bd              
00543a0b              this->m_data = ebp_1;
00543a0d              this->m_sizeAndDeallocate = (esi | 0x80000000);
00543a12              eax = 1;
00543a15              return 1;
005439b8          }
0054397e      }
0054397e      
00543a1a      eax = 0;
00543a1d      return 0;
00543970  }


00543a20  uint8_t __stdcall SharedNet::SeqIDSanityCheck(class SharedNet* this @ ecx, class CNetLayerPacket const* arg2)

00543a20  {
00543a24      uint32_t seqID_ = arg2->m_Hdr.seqID_;
00543a2b      class ReceiverData* m_pRecv = arg2->m_pRecv;
00543a34      int32_t eax_1 = (m_pRecv->highestIDReceived_ + 0x7fff);
00543a34      
00543a3b      if (seqID_ != eax_1)
00543a3b      {
00543a3f          int32_t edx_2 = (seqID_ - eax_1);
00543a44          int32_t esi_1 = 1;
00543a44          
00543a49          if (seqID_ < eax_1)
00543a49          {
00543a4d              edx_2 = (eax_1 - seqID_);
00543a4f              esi_1 = 0xffffffff;
00543a49          }
00543a49          
00543a58          if (edx_2 > 0x7fffffff)
00543a5a              esi_1 = -(esi_1);
00543a5a          
00543a5f          if (esi_1 > 0)
00543a5f          {
00543a61              eax_1 = 0;
00543a64              return 0;
00543a5f          }
00543a3b      }
00543a3b      
00543a76      return ((0x40 - 0x40) + 1);
00543a20  }

00543a79                                                                             90 90 90 90 90 90 90                           .......

00543a80  uint8_t __stdcall SharedNet::ProcessNewRemoteInterval(class SharedNet* this @ ecx, class CNetLayerPacket const* arg2)

00543a80  {
00543a86      class ReceiverData* m_pRecv = arg2->m_pRecv;
00543a8c      this = m_pRecv->m_CurrentRemoteInterval;
00543a8c      
00543a93      if (this != 0)
00543a93      {
00543a9f          int16_t var_c_1 = this;
00543aa3          class COptionalHeader* eax_1 = COnePrimHeader<134217728,16,CFlowStruct>::CreateFromData(m_pRecv->m_BytesReceived);
00543ab6          var_c_1 = eax_1;
00543abf          PacketController::EnqueueOptionalHeader(PacketController::Instance(), arg2->m_Hdr.recID_, var_c_1);
00543ac7          var_c_1 = &eax_1->m_cRef;
00543ac8          int32_t eax_4;
00543ac8          eax_4 = InterlockedDecrement(var_c_1);
00543ac8          
00543ad4          if ((eax_4 == 0 && eax_1 != 0))
00543ad6              eax_1->vtable->__vecDelDtor(1);
00543a93      }
00543a93      
00543ae4      this = arg2->m_Hdr.interval_;
00543ade      arg2->m_pRecv->m_CurrentRemoteInterval = this;
00543aef      arg2->m_pRecv->m_BytesReceived = 0;
00543afd      class ReceiverData* eax_5;
00543afd      eax_5 = 1;
00543b00      return 1;
00543a80  }

00543b03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00543b10  void __stdcall SharedNet::EnqueuePak(class SharedNet* this @ ecx, class ReceiverData* arg2)

00543b10  {
00543b18      int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
00543b1e      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
00543b2f      long double x87_r7_1 = (((long double)Timer::cur_time_1) - ((long double)arg2->timeStamp_));
00543b32      long double temp1 = ((long double)2.0);
00543b32      (x87_r7_1 - temp1);
00543b38      int32_t eax;
00543b38      eax = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
00543b38      
00543b3d      if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
00543b3d      {
00543b40          uint32_t highestIDReceived_ = arg2->highestIDReceived_;
00543b45          void* eax_1 = operator new(0x1c);
00543b4f          class COptionalHeader* esi_1;
00543b4f          
00543b4f          if (eax_1 == 0)
00543b7f              esi_1 = nullptr;
00543b4f          else
00543b4f          {
00543b54              *(uint32_t*)((char*)eax_1 + 0x18) = highestIDReceived_;
00543b56              *(uint32_t*)((char*)eax_1 + 4) = 1;
00543b5d              *(uint32_t*)((char*)eax_1 + 8) = 0x4000;
00543b64              *(uint32_t*)((char*)eax_1 + 0xc) = 1;
00543b6b              *(uint32_t*)((char*)eax_1 + 0x10) = ((char*)eax_1 + 0x18);
00543b6e              *(uint32_t*)((char*)eax_1 + 0x14) = 4;
00543b75              *(uint32_t*)eax_1 = 0x7ca508;
00543b7b              esi_1 = eax_1;
00543b4f          }
00543b4f          
00543b8f          PacketController::EnqueueOptionalHeader(PacketController::Instance(), arg2->m_RecID, esi_1);
00543b8f          
00543b96          if ((esi_1 != 0 && InterlockedDecrement(&esi_1->m_cRef) == 0))
00543ba6              esi_1->vtable->__vecDelDtor(1);
00543ba6          
00543bb6          arg2->timeStamp_ = Timer::cur_time_1;
00543bb9          *(uint32_t*)((char*)arg2->timeStamp_)[4] = ecx;
00543b3d      }
00543b10  }

00543bc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00543bd0  void __stdcall SharedNet::EnqueueNaks(class SharedNet* this @ ecx, class ReceiverData* arg2)

00543bd0  {
00543bdb      int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
00543be1      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
00543bf5      long double x87_r7_1 = (((long double)Timer::cur_time_1) - ((long double)arg2->timeStamp_));
00543bf8      long double temp1 = ((long double)0.59999999999999998);
00543bf8      (x87_r7_1 - temp1);
00543bfe      int32_t eax;
00543bfe      eax = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
00543bfe      
00543c03      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00543c03      {
00543c11          void var_1cc;
00543c11          int32_t eax_1 = ReceiverData::GetNaks(arg2, &var_1cc);
00543c1d          class COptionalHeader* eax_2 = operator new(0x1e4);
00543c27          class COptionalHeader* esi_3;
00543c27          
00543c27          if (eax_2 == 0)
00543c74              esi_3 = nullptr;
00543c27          else
00543c27          {
00543c29              int32_t ecx_2 = (eax_1 << 2);
00543c34              eax_2[1].vtable = eax_1;
00543c39              eax_2->m_pData = &eax_2[1];
00543c3e              eax_2->m_cbData = (ecx_2 + 4);
00543c44              eax_2->m_cRef = 1;
00543c4b              eax_2->m_dwMask = 0x1000;
00543c52              eax_2->m_Flags = 0x21;
00543c59              eax_2->vtable = 0x7ca508;
00543c66              int32_t esi_2;
00543c66              int32_t edi_3;
00543c66              edi_3 = __builtin_memcpy(((char*)eax_2 + 0x1c), &var_1cc, ((ecx_2 >> 2) << 2));
00543c6d              __builtin_memcpy(edi_3, esi_2, (ecx_2 & 3));
00543c6f              esi_3 = eax_2;
00543c27          }
00543c27          
00543c84          PacketController::EnqueueOptionalHeader(PacketController::Instance(), arg2->m_RecID, esi_3);
00543c84          
00543c8b          if ((esi_3 != 0 && InterlockedDecrement(&esi_3->m_cRef) == 0))
00543c9b              esi_3->vtable->__vecDelDtor(1);
00543c9b          
00543cab          arg2->timeStamp_ = Timer::cur_time_1;
00543cae          *(uint32_t*)((char*)arg2->timeStamp_)[4] = ecx;
00543c03      }
00543bd0  }

00543cbc                                                                                      90 90 90 90                              ....

00543cc0  void __thiscall ClientNet::OnContextEnded(class ClientNet* this, class AsyncContext arg2, enum AsyncStateMachineStatus arg3)

00543cc0  {
00543cce      int32_t eax_1 = CAsyncStateHandler::GetContextData(this, arg2, *(int32_t*)((char*)this + 0x24));
00543cd9      *(int32_t*)((char*)this + 0x5c) = *(uint32_t*)(eax_1 + 4);
00543cdf      *(int32_t*)((char*)this + 0x60) = *(uint32_t*)(eax_1 + 8);
00543ce8      *(int32_t*)((char*)this + 0x34) = INVALID_ASYNCCONTEXT.m_id;
00543ce8      
00543cff      if ((*(int32_t*)((char*)this + 0x5c) != ID_NetError_None.m_stringID || *(int32_t*)((char*)this + 0x60) != ID_NetError_None.m_tableID))
00543cff      {
00543d21          ClientNet::NotifyPluginsOfStatusChange(((char*)this - 0x8888), Net_LoginConnectionError, &*(int32_t*)((char*)this + 0x58), 0);
00543d27          return;
00543cff      }
00543cff      
00543d0d      ClientNet::NotifyPluginsOfStatusChange(((char*)this - 0x8888), Net_LoginConnected, 0, 0);
00543cc0  }

00543d2a                                90 90 90 90 90 90                                                            ......

00543d30  void __thiscall ClientNet::HandleTimeSynch(class ClientNet* this, class CTimeSyncHeader const* arg2, class CNetLayerPacket const* arg3)

00543d30  {
00543d46      class RecipientData* m_pRecip = arg3->m_pRecip;
00543d4f      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
00543d55      int32_t var_14 = *(uint32_t*)((char*)arg2->m_time)[4];
00543d59      int32_t var_18 = arg2->m_time;
00543d6c      int32_t var_c = *(int32_t*)((char*)Timer::cur_time + 4);
00543d70      Timer::set_time(&var_18);
00543d75      long double x87_r7 = ((long double)Timer::cur_time_1);
00543d86      ((((long double)var_18) + ((long double)60.0)) - x87_r7);
00543d8a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00543d8a      
00543d8d      if (p)
00543d8d      {
00543e04          this->_timeClientSpeedHackDetection = 0f;
00543e0a          *(uint32_t*)((char*)this->_timeClientSpeedHackDetection)[4] = 0;
00543e0a          return;
00543d8d      }
00543d8d      
00543d95      (((long double)this->_timeClientSpeedHackDetection) - ((long double)0.0));
00543d9d      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00543d9d      
00543da0      if (!(p_1))
00543da0      {
00543df2          this->_timeClientSpeedHackDetection = ((double)x87_r7);
00543dfd          return;
00543da0      }
00543da0      
00543dae      long double x87_r7_1 = (((long double)this->_timeClientSpeedHackDetection) + ((long double)60.0));
00543db0      (x87_r7 - x87_r7_1);
00543db0      
00543dbb      if (((*(uint8_t*)((char*)((((x87_r7 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == x87_r7_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0 && m_pRecip != 0))
00543dbb      {
00543dc2          class COptionalHeader* eax_3 = CPackObjHeader<NetError,1048576,7>::CreateFromData(&ID_ConnectionError_RunningSpeedhack);
00543dde          PacketController::EnqueueOptionalHeader(PacketController::Instance(), m_pRecip->recID_, eax_3);
00543de5          ReferenceCountTemplate<1048576,0>::Release(eax_3);
00543dbb      }
00543d30  }

00543e18                                                                          90 90 90 90 90 90 90 90                          ........

00543e20  void __thiscall ClientNet::HandleServerSwitch(class ClientNet* this, class COnePrimHeader<256,96,CServerSwitchStruct> const* arg2, class CNetLayerPacket const* arg3)

00543e20  {
00543e20      class ClientNet* this_1 = this;
00543e24      class CNetLayerPacket* edi = arg3;
00543e28      class ReceiverData* m_pRecv = edi->m_pRecv;
00543e36      enum ServerSwitchType Type = arg2->m_Prim.Type;
00543e39      uint32_t m_timestamp_1 = arg2->m_Prim.dwSeqNo.m_timestamp;
00543e3c      struct ClientNet::CSwitchHistory* esi = nullptr;
00543e3c      
00543e42      if (Type == ssWorldSwitch)
00543e42      {
00543e4f          esi = &this->m_WorldSwitchHistory;
00543e55      label_543e55:
00543e55          
00543e57          if (esi == 0)
00543e57              goto label_543e60;
00543e57          
00543e59          int32_t eax_2;
00543e59          eax_2 = esi->bBeenSwitchedBefore;
00543e59          
00543e5e          if (eax_2 == 0)
00543e5e              goto label_543e93;
00543e5e          
00543e5e          goto label_543e60;
00543e42      }
00543e42      
00543e45      if (Type == 1)
00543e45      {
00543e47          esi = &this->m_LogonSwitchHistory;
00543e4d          goto label_543e55;
00543e45      }
00543e45      
00543e60  label_543e60:
00543e60      uint32_t m_timestamp = esi->LastSwitchStamp.m_timestamp;
00543e60      
00543e64      if (m_timestamp_1 != m_timestamp)
00543e64      {
00543e68          uint32_t edi_2 = (m_timestamp_1 - m_timestamp);
00543e6d          int32_t ebp_1 = 1;
00543e6d          
00543e72          if (m_timestamp_1 < m_timestamp)
00543e72          {
00543e76              edi_2 = (m_timestamp - m_timestamp_1);
00543e78              ebp_1 = 0xffffffff;
00543e72          }
00543e72          
00543e81          if (edi_2 > 0x7fffffff)
00543e83              ebp_1 = -(ebp_1);
00543e83          
00543e88          if (ebp_1 > 0)
00543e88          {
00543e8a              edi = arg3;
00543e93          label_543e93:
00543e93              esi->bBeenSwitchedBefore = 1;
00543e97              esi->LastSwitchStamp.m_timestamp = m_timestamp_1;
00543e97              
00543e99              if (Type == ssWorldSwitch)
00543e99              {
00543ecb                  m_timestamp_1 = edi->recipient_;
00543ed6                  this->currServerRecID_ = m_timestamp_1;
00543edd                  m_timestamp_1 = m_pRecv->m_NetID;
00543ee1                  *(int32_t*)((char*)this + 0x18) = m_timestamp_1;
00543e99              }
00543e99              else if (Type == 1)
00543e9c              {
00543e9e                  uint16_t eax_6;
00543e9e                  eax_6 = this->fCurrentlyInGame_;
00543e9e                  
00543ea6                  if (eax_6 == 0)
00543ea6                  {
00543ea8                      m_timestamp_1 = edi->recipient_;
00543eaf                      this->currServerRecID_ = m_timestamp_1;
00543ea6                  }
00543ea6                  
00543ebf                  this->logonRecID_ = edi->recipient_;
00543e9c              }
00543e88          }
00543e64      }
00543e20  }

00543eec                                      90 90 90 90                                                              ....

00543ef0  void __fastcall ClientNet::LogOffServer(class ClientNet* this)

00543ef0  {
00543ef5      class ReceiverData* next_ = *(int32_t*)((char*)this + 0x8820);
00543efd      void* eax = operator new(0x1c);
00543f07      void* edi;
00543f07      
00543f07      if (eax == 0)
00543f3b          edi = nullptr;
00543f07      else
00543f07      {
00543f0c          *(uint32_t*)((char*)eax + 4) = 1;
00543f13          *(uint32_t*)((char*)eax + 8) = 0x8000;
00543f1a          *(uint32_t*)((char*)eax + 0xc) = 3;
00543f21          *(uint32_t*)((char*)eax + 0x10) = ((char*)eax + 0x18);
00543f24          *(uint32_t*)((char*)eax + 0x14) = 0;
00543f2b          *(uint32_t*)eax = 0x7ca508;
00543f31          *(uint32_t*)((char*)eax + 0x18) = 0;
00543f37          edi = eax;
00543f07      }
00543f07      
00543f3f      for (; next_ != 0; next_ = next_->next_)
00543f49          SharedNet::SendOptionalHeader(this, edi, &next_->m_Addr, next_);
00543f49      
00543f57      if ((edi != 0 && InterlockedDecrement(((char*)edi + 4)) == 0))
00543f6d          **(uint32_t**)edi(1);
00543f6d      
00543f71      this->logOffSent_ = 1;
00543f78      this->logonRecID_ = 0;
00543f84      /* tailcall */
00543f84      return ClientNet::ExitWorldDisconnect(this);
00543ef0  }

00543f89                             90 90 90 90 90 90 90                                                           .......

00543f90  uint8_t __thiscall ClientNet::SendLoginRequest(class ClientNet* this, struct sockaddr_in const* arg2, class NetAuthenticator* arg3)

00543f90  {
00543f9b      int32_t eax;
00543f9b      eax = 0;
00543f9b      
00543fa3      if (arg3 != 0)
00543fa3      {
00543fa9          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00543faf          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00543fb8          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00543fbe          struct sockaddr_in* ebp_1 = arg2;
00543fc9          NetUtils::GetIPString(ebp_1, &AC1Legacy::PStringBase<char>::s_NullBuffer_2, 0);
00543fda          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, "1802");
00543fe5          class COptionalHeader* eax_2 = CLogonHeader::CreateFromData(&arg2, arg3);
00543fec          struct sockaddr_in* eax_3 = arg2;
00543fec          
00544005          if ((InterlockedDecrement(&eax_3->sin_addr) == 0 && eax_3 != 0))
00544005          {
00544007              int32_t edx;
00544007              edx = eax_3->sin_family;
00544007              *(uint16_t*)((char*)edx)[2] = eax_3->sin_port;
0054400d              *(uint32_t*)edx(1);
00544005          }
00544005          
0054400f          uint8_t m_Flags = ((int8_t)eax_2->m_Flags);
00544014          arg3 = 0;
00544014          
00544034          if (((m_Flags & 0x10) == 0 && ((m_Flags & 1) != 0 && ((m_Flags & 2) != 0 && ((m_Flags & 8) == 0 && (m_Flags & 4) != 0)))))
00544034          {
00544037              class NetPacket* eax_6 = NetPacket::CreateForSend(0);
00544044              NetPacket::AddOptionalHeader(eax_6, eax_2);
00544049              uint32_t m_dwMask = eax_2->m_dwMask;
0054404c              int32_t s = 0;
00544058              int16_t var_8_1 = 0;
00544062              int16_t var_2_1 = 0;
00544073              int16_t var_4_1 = eax_6->size_;
0054407d              uint32_t m_dwMask_1 = m_dwMask;
0054408d              uint32_t checksum_ = eax_6->checksum_;
00544091              __builtin_memset(&s, 0, 0x14);
005440a6              arg3 = SharedNet::SendPacket(this, eax_6, &s, ebp_1);
005440aa              ReferenceCountTemplate<1048576,0>::Release(eax_6);
00544034          }
00544034          
005440bd          if (InterlockedDecrement(&eax_2->m_cRef) == 0)
005440bf              eax_2->vtable->__vecDelDtor(1);
005440bf          
005440c7          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005440c7          
005440d9          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
005440db              AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
005440db          
005440e3          eax = arg3;
00543fa3      }
00543fa3      
005440ec      return eax;
00543f90  }

005440ef                                               90                                                                 .

005440f0  uint8_t __thiscall ClientNet::SendConnectAck(class ClientNet* this, class ReceiverData* arg2)

005440f0  {
00544102      arg2->lastSentHandshake_ = ((double)((long double)Timer::local_time));
00544108      int32_t ecx;
00544108      ecx = arg2->m_Addr.sin_family;
00544108      *(uint16_t*)((char*)ecx)[2] = arg2->m_Addr.sin_port;
0054410d      int32_t var_10 = ecx;
00544111      int32_t ecx_1;
00544111      ecx_1 = arg2->m_Addr.sin_zero[0];
00544111      *(uint8_t*)((char*)ecx_1)[1] = arg2->m_Addr.sin_zero[1];
00544111      *(uint8_t*)((char*)ecx_1)[2] = arg2->m_Addr.sin_zero[2];
00544111      *(uint8_t*)((char*)ecx_1)[3] = arg2->m_Addr.sin_zero[3];
00544114      union in_addr::__unnamed S_un = arg2->m_Addr.sin_addr.S_un;
00544118      int32_t edx_1;
00544118      edx_1 = arg2->m_Addr.sin_zero[4];
00544118      *(uint8_t*)((char*)edx_1)[1] = arg2->m_Addr.sin_zero[5];
00544118      *(uint8_t*)((char*)edx_1)[2] = arg2->m_Addr.sin_zero[6];
00544118      *(uint8_t*)((char*)edx_1)[3] = arg2->m_Addr.sin_zero[7];
00544121      char var_11 = 0;
00544126      int32_t var_8 = ecx_1;
0054412a      int32_t var_4 = edx_1;
00544136      int16_t eax_4 = Ordinal_WSOCK32_9((Ordinal_WSOCK32_15(var_10) + 1));
0054413c      int32_t edi = arg2->m_qwReferralCookie;
0054413f      int32_t ebp = *(uint32_t*)((char*)arg2->m_qwReferralCookie)[4];
00544144      *(uint16_t*)((char*)var_10)[2] = eax_4;
00544149      void* eax_5 = operator new(0x20);
00544153      void* edi_1;
00544153      
00544153      if (eax_5 == 0)
00544186          edi_1 = nullptr;
00544153      else
00544153      {
00544158          *(uint32_t*)((char*)eax_5 + 0x18) = edi;
0054415a          *(uint32_t*)((char*)eax_5 + 4) = 1;
00544161          *(uint32_t*)((char*)eax_5 + 8) = 0x80000;
00544168          *(uint32_t*)((char*)eax_5 + 0xc) = 0x20000007;
0054416f          *(uint32_t*)((char*)eax_5 + 0x10) = ((char*)eax_5 + 0x18);
00544172          *(uint32_t*)((char*)eax_5 + 0x14) = 8;
00544179          *(uint32_t*)eax_5 = 0x7ca508;
0054417f          *(uint32_t*)((char*)eax_5 + 0x1c) = ebp;
00544182          edi_1 = eax_5;
00544153      }
00544153      
00544198      if (SharedNet::SendOptionalHeader(this, edi_1, &var_10, arg2) != 0)
00544198      {
0054419c          var_11 = 1;
005441a1          ReceiverData::GetConnectionStateDuration(arg2);
005441b9          ClientNet::NotifyPluginsOfStatusChange(this, Net_LoginConnecting, (_ftol2() + 1), 0);
00544198      }
00544198      
005441c0      if ((edi_1 != 0 && InterlockedDecrement(((char*)edi_1 + 4)) == 0))
005441d6          **(uint32_t**)edi_1(1);
005441d6      
005441d8      int32_t eax_6;
005441d8      eax_6 = var_11;
005441e3      return eax_6;
005440f0  }

005441e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005441f0  void __fastcall ClientNet::ProcessReferralQueue(class ClientNet* this)

005441f0  {
005441f0      int32_t ebp;
005441f0      int32_t var_4 = ebp;
005441fa      int32_t* var_48 = &var_4;
005441ff      uint32_t m_num_1 = this->m_ReferralQueue.m_num;
00544212      int32_t Timer::local_time_1 = (*(uint32_t*)Timer::local_time);
00544216      int32_t var_34 = *(int32_t*)((char*)Timer::local_time + 4);
00544216      
0054421a      if (m_num_1 > 0)
0054421a      {
00544223          uint32_t ebx_2 = (m_num_1 * 0x28);
00544223          
005443aa          do
005443aa          {
00544230              struct ClientNet::CReferralQueueEntry* m_data_1 = this->m_ReferralQueue.m_data;
00544236              ebx_2 -= 0x28;
00544239              long double x87_r7_1 = ((long double)*(uint64_t*)(&m_data_1->localtimeToSendNextWorldAuth + ebx_2));
0054423d              void* ecx_1 = (ebx_2 + m_data_1);
00544240              long double temp0_1 = ((long double)Timer::local_time_1);
00544240              (x87_r7_1 - temp0_1);
00544244              m_num_1 -= 1;
00544249              int32_t eax;
00544249              eax = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0054424b              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0054424b              
0054424e              if (!(p_1))
0054424e              {
00544256                  long double x87_r7_2 = ((long double)*(uint32_t*)ecx_1);
00544256                  
0054425a                  if (*(uint32_t*)ecx_1 < 0)
0054425c                      x87_r7_2 = (x87_r7_2 + ((long double)4294967296.0));
0054425c                  
00544268                  long double x87_r6_2 = (((long double)280.0) / ((long double)0.33333333300000001));
0054426e                  (x87_r6_2 - x87_r7_2);
00544270                  int32_t eax_1;
00544270                  eax_1 = ((((x87_r6_2 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_2) ? 1 : 0) << 0xe) | 0))));
00544275                  class ProtoHeader* var_58;
00544275                  int32_t s;
00544275                  
00544275                  if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) != 0)
00544275                  {
005443b8                      uint32_t m_num = this->m_ReferralQueue.m_num;
005443b8                      
005443c0                      if (m_num_1 < m_num)
005443c0                      {
005443c5                          this->m_ReferralQueue.m_num = (m_num - 1);
005443c5                          
005443cb                          if (m_num_1 != (m_num - 1))
005443cb                          {
005443cd                              struct ClientNet::CReferralQueueEntry* m_data = this->m_ReferralQueue.m_data;
005443e1                              __builtin_memcpy((ebx_2 + m_data), &m_data[(m_num - 1)], 0x28);
005443fe                              __builtin_memcpy(&this->m_ReferralQueue.m_data[this->m_ReferralQueue.m_num], &s, 0x28);
005443cb                          }
005443c0                      }
005443c0                      
00544404                      int32_t var_54_7 = 0;
00544406                      var_58 = nullptr;
0054440c                      ClientNet::NotifyPluginsOfStatusChange(this, Net_WorldConnectionError, var_58, var_54_7);
00544275                  }
00544275                  else
00544275                  {
00544288                      *(uint32_t*)ecx_1 += 1;
00544290                      *(uint64_t*)(&this->m_ReferralQueue.m_data->localtimeToSendNextWorldAuth + ebx_2) = ((double)(((long double)0.33333333300000001) + ((long double)Timer::local_time_1)));
00544294                      struct ClientNet::CReferralQueueEntry* m_data_2 = this->m_ReferralQueue.m_data;
0054429a                      int32_t edi_1 = *(uint32_t*)(&m_data_2->qwCookie + ebx_2);
0054429e                      int32_t esi = *(uint32_t*)((ebx_2 + m_data_2) + 0x24);
005442a4                      void* eax_2 = operator new(0x20);
005442ae                      void* edi_2;
005442ae                      
005442ae                      if (eax_2 == 0)
005442e1                          edi_2 = nullptr;
005442ae                      else
005442ae                      {
005442b3                          *(uint32_t*)((char*)eax_2 + 0x18) = edi_1;
005442b5                          *(uint32_t*)((char*)eax_2 + 4) = 1;
005442bc                          *(uint32_t*)((char*)eax_2 + 8) = 0x20000;
005442c3                          *(uint32_t*)((char*)eax_2 + 0xc) = 7;
005442ca                          *(uint32_t*)((char*)eax_2 + 0x10) = ((char*)eax_2 + 0x18);
005442cd                          *(uint32_t*)((char*)eax_2 + 0x14) = 8;
005442d4                          *(uint32_t*)eax_2 = 0x7ca508;
005442da                          *(uint32_t*)((char*)eax_2 + 0x1c) = esi;
005442dd                          edi_2 = eax_2;
005442ae                      }
005442ae                      
005442ed                      char eax_4 = ((int8_t)*(uint32_t*)((char*)edi_2 + 0xc));
005442ed                      
00544312                      if (((eax_4 & 0x10) == 0 && ((eax_4 & 1) != 0 && ((eax_4 & 2) != 0 && ((eax_4 & 8) == 0 && (eax_4 & 4) != 0)))))
00544312                      {
00544316                          class NetPacket* eax_5 = NetPacket::CreateForSend(0);
00544323                          NetPacket::AddOptionalHeader(eax_5, edi_2);
00544328                          int32_t ecx_6 = *(uint32_t*)((char*)edi_2 + 8);
0054432d                          s = 0;
00544339                          int16_t var_24_1 = 0;
00544343                          int16_t var_1e_1 = 0;
00544354                          int32_t var_2c_1 = ecx_6;
00544358                          int16_t var_20_1 = eax_5->size_;
0054435d                          uint32_t checksum_ = eax_5->checksum_;
00544363                          __builtin_memset(&s, 0, 0x14);
0054437a                          var_58 = &s;
0054437e                          uint32_t checksum = checksum_;
00544382                          SharedNet::SendPacket(this, eax_5, var_58, (&this->m_ReferralQueue.m_data->ServerAddr + ebx_2));
00544389                          ReferenceCountTemplate<1048576,0>::Release(eax_5);
00544312                      }
00544312                      
0054439a                      if (InterlockedDecrement(((char*)edi_2 + 4)) == 0)
005443a2                          **(uint32_t**)edi_2(1);
00544275                  }
0054424e              }
005443aa          } while (m_num_1 > 0);
0054421a      }
0054421a      
005443b6      *(uint32_t*)var_48;
005441f0  }

00544228                          8d a4 24 00 00 00 00 90                                                          ..$.....
00544413                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00544420  uint32_t* __thiscall AVL<unsigned long,unsigned long>::Remove(class AVL<unsigned long,unsigned long>* this, uint32_t arg2)

00544420  {
00544425      class AVLNode<unsigned long,unsigned long>* esi = this->_root;
0054442a      class AVLNode<unsigned long,unsigned long>* ebx = nullptr;
0054442a      
0054442e      if (esi == 0)
00544435          return 0;
00544435      
0054443f      while (esi->_key != arg2)
0054443f      {
00544444          ebx = esi;
00544444          
00544446          if (arg2 >= esi->_key)
0054444c              esi = esi->_right;
00544446          else
00544448              esi = esi->_left;
00544448          
00544451          if (esi == 0)
00544435              return 0;
0054443f      }
0054443f      
0054445b      arg2 = esi->_data;
0054445f      class AVLNode<unsigned long,unsigned long>* _right = esi->_right;
0054445f      
00544468      if ((_right == 0 && esi->_left == 0))
00544468      {
0054446c          if (ebx == 0)
0054447e              this->_root = 0;
0054446c          else
0054446c          {
0054446e              _right = esi->_parentsize;
0054446e              
00544473              if (_right == 0)
00544479                  ebx->_right = nullptr;
00544473              else
00544475                  ebx->_left = 0;
0054446c          }
0054446c          
00544485          esi->_left = 0;
00544487          esi->_right = nullptr;
00544493          class AVLNode<unsigned long,unsigned long>* _right_1 = esi->_right;
00544493          
00544498          if (_right_1 != 0)
0054449c              AVLNode<unsigned long,unsigned long>::`scalar deleting destructor'(_right_1, 1);
0054449c          
005444a2          esi->_left = 0;
005444a8          esi->_right = nullptr;
005444af          operator delete(esi);
005444bc          AVL<unsigned long,unsigned long>::ReBalanceTree(this, ebx, nullptr);
005444c6          this->_currNum -= 1;
005444cf          return arg2;
00544468      }
00544468      
005444d5      class AVLNode<unsigned long,unsigned long>* edi;
005444d5      
005444d5      if (_right == 0)
005444d5      {
005444e6          if (ebx == 0)
00544514              this->_root = esi->_left;
005444e6          else
005444e6          {
005444e8              _right = esi->_parentsize;
005444e8              
005444ed              if (_right == 0)
005444ed              {
00544502                  ebx->_right = esi->_left;
00544505                  esi->_left->_parentsize = 0;
0054450b                  esi->_left->_parent = ebx;
005444ed              }
005444ed              else
005444ed              {
005444f1                  ebx->_left = esi->_left;
005444f3                  esi->_left->_parentsize = 1;
005444f9                  esi->_left->_parent = ebx;
005444ed              }
005444e6          }
005444e6          
0054451a          edi = esi;
00544517          this->_root->_parent = nullptr;
005444d5      }
005444d5      else
005444e0          edi = AVL<unsigned long,unsigned long>::FindSuccessor(this, esi, _right);
005444e0      
00544522      esi->_data = edi->_data;
00544528      esi->_key = edi->_key;
0054452b      edi->_left = 0;
00544531      edi->_right = nullptr;
00544538      class AVLNode<unsigned long,unsigned long>* _left = edi->_left;
00544538      
0054453c      if (_left != 0)
00544540          AVLNode<unsigned long,unsigned long>::`scalar deleting destructor'(_left, 1);
00544540      
00544545      class AVLNode<unsigned long,unsigned long>* _right_2 = edi->_right;
00544545      
0054454a      if (_right_2 != 0)
0054454e          AVLNode<unsigned long,unsigned long>::`scalar deleting destructor'(_right_2, 1);
0054454e      
00544554      edi->_left = 0;
0054455a      edi->_right = nullptr;
00544561      operator delete(edi);
0054456e      AVL<unsigned long,unsigned long>::ReBalanceTree(this, ebx, nullptr);
00544579      this->_currNum -= 1;
00544582      return arg2;
00544420  }

00544585                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00544590  void __fastcall CClientsideLoginStateHandler::OnStateHandlerInit(class CClientsideLoginStateHandler* this)

00544590  {
00544590      class CClientsideLoginStateHandler* this_1 = this;
0054459f      PStringBase<char>::PStringBase<char>(&this_1, "RecipientID");
005445ab      uint32_t eax = CAsyncStateHandler::RegisterContextDataName(this, &this_1);
005445ba      void* __offset(CClientsideLoginStateHandler, -0x14) edi_1 = ((char*)this_1 - 0x14);
005445c1      this->m_idxRecipientID = eax;
005445c1      
005445cc      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
005445d4          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
005445d4      
005445df      PStringBase<char>::PStringBase<char>(&this_1, "ServerAddr");
005445eb      uint32_t eax_2 = CAsyncStateHandler::RegisterContextDataName(this, &this_1);
005445f4      void* __offset(CClientsideLoginStateHandler, -0x14) edi_3 = ((char*)this_1 - 0x14);
005445fb      this->m_idxServerAddr = eax_2;
005445fb      
00544606      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0054460e          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0054460e      
00544619      PStringBase<char>::PStringBase<char>(&this_1, "NetAuthenticator");
00544625      uint32_t eax_4 = CAsyncStateHandler::RegisterContextDataName(this, &this_1);
0054462e      void* __offset(CClientsideLoginStateHandler, -0x14) edi_5 = ((char*)this_1 - 0x14);
00544635      this->m_idxNetAuth = eax_4;
00544635      
00544640      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
00544648          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
00544648      
00544653      PStringBase<char>::PStringBase<char>(&this_1, "FailureReason");
00544664      this->m_idxFailureReason = CAsyncStateHandler::RegisterContextDataName(this, &this_1);
0054466b      void* __offset(CClientsideLoginStateHandler, -0x14) esi_2 = ((char*)this_1 - 0x14);
0054466b      
0054467a      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00544682          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00544590  }

00544689                             90 90 90 90 90 90 90                                                           .......

00544690  uint8_t __thiscall SharedNet::ProcessNewSeqNum(class SharedNet* this, class CNetLayerPacket* arg2)

00544690  {
00544690      class SharedNet* this_1 = this;
00544694      class CNetLayerPacket* esi = arg2;
00544699      class ReceiverData* m_pRecv = esi->m_pRecv;
005446a1      esi->cryptoKey_ = 0;
005446ab      uint32_t seqID_ = esi->m_Hdr.seqID_;
005446c1      uint32_t* eax_4;
005446c1      
005446c1      if ((m_pRecv == 0 || (seqID_ != 0 && m_pRecv->m_RecID == 0)))
00544784          *(uint32_t*)(2, 1);
005446c1      else
005446c1      {
005446d1          if (SharedNet::SeqIDSanityCheck(this, esi) == 0)
005446d1          {
005446dc              *(uint32_t*)(2, 1);
005446e1              int32_t eax_2;
005446e1              eax_2 = 0;
005446e5              return 0;
005446d1          }
005446d1          
005446ea          this_1 = nullptr;
005446ee          arg2 = nullptr;
005446ee          
005446f9          if ((esi->m_Hdr.header_ & 2) == 0)
005446f9              goto label_544732;
005446f9          
0054470a          if (TimeStampUtils::lhs_newer(seqID_, m_pRecv->highestIDReceived_) != 0)
0054470a              goto label_544732;
0054470a          
00544710          eax_4 = AVL<unsigned long,unsigned long>::Remove(&m_pRecv->m_SeqIDsWeNAKed, seqID_);
00544710          
00544717          if (eax_4 != 0)
00544717          {
00544720              arg2 = eax_4;
00544724              this_1 = &arg2;
00544728              SharedNet::SetNakState(this, m_pRecv);
00544732          label_544732:
00544732              
0054473c              if (TimeStampUtils::lhs_newer(seqID_, m_pRecv->highestIDReceived_) != 0)
00544741                  SharedNet::ProcessNewestSeqNum(this, esi);
00544741              
0054474d              if ((esi->m_Hdr.header_ & 2) != 0)
0054476b                  esi->cryptoKey_ = ReceiverData::Decrypt(m_pRecv, esi->m_Hdr.seqID_, &esi->m_Hdr.checksum_, 4, this_1);
0054476b              
00544774              uint32_t eax_6;
00544774              eax_6 = 1;
00544778              return 1;
00544717          }
005446c1      }
005446c1      
00544789      eax_4 = 0;
0054478d      return 0;
00544690  }


00544790  uint8_t __thiscall SharedNet::ProcessPacket(class SharedNet* this, class CNetLayerPacket* arg2)

00544790  {
00544791      class CNetLayerPacket* esi = arg2;
00544791      
005447a0      if (*(uint32_t*)( + 0x24)(esi) != 0)
005447a0      {
005447b5          esi->m_pRecv = (((((uint32_t)esi->m_Hdr.recID_) * 0x88) + this) + 0x20);
005447cf          esi->m_pRecip = PacketController::GetRecipient(PacketController::Instance(), esi->m_Hdr.recID_);
005447cf          
005447dd          if (esi->m_Hdr.seqID_ != 0)
005447dd          {
005447f9              if (SharedNet::ProcessNewSeqNum(this, esi) != 0)
005447f9              {
00544804              label_544804:
00544804                  int32_t ebx;
00544804                  ebx = *(uint32_t*)( + 0x28)(esi);
00544808                  uint32_t eax_5;
00544808                  
00544808                  if (ebx != 0)
00544808                  {
00544856                      uint16_t m_CurrentRemoteInterval = esi->m_pRecv->m_CurrentRemoteInterval;
0054485d                      uint8_t eax_8;
0054485d                      
0054485d                      if (m_CurrentRemoteInterval != 0)
0054486a                          eax_8 = TimeStampUtils::lhs_newer(esi->m_Hdr.interval_, m_CurrentRemoteInterval);
0054486a                      
00544874                      if ((m_CurrentRemoteInterval == 0 || eax_8 != 0))
0054487e                          ebx |= *(uint32_t*)( + 0x2c)(esi);
0054487e                      
00544880                      class ReceiverData* m_pRecv = esi->m_pRecv;
00544894                      m_pRecv->m_BytesReceived += (esi->size_ + 0x14);
00544894                      
0054489f                      if ((esi->numSpecialFrags_ != 0 && *(uint32_t*)( + 0x30)(esi) == 0))
005448ad                          ebx = 0;
005448ad                      
005448af                      eax_5 = esi->m_pRecv;
005448af                      
005448b7                      if (eax_5 != 0)
005448b7                      {
005448bf                          int32_t edx_8 = *(int32_t*)((char*)Timer::local_time + 4);
005448c5                          *(uint32_t*)(eax_5 + 0x18) = (*(uint32_t*)Timer::local_time);
005448c8                          *(uint32_t*)(eax_5 + 0x1c) = edx_8;
005448c8                          
005448d3                          if ((esi->numFrags_ != 0 && *(uint32_t*)( + 0x38)(esi) == 0))
005448e1                              ebx = 0;
005448b7                      }
00544808                  }
00544808                  else
00544808                  {
0054480a                      class ReceiverData* m_pRecv_1 = esi->m_pRecv;
0054480a                      
00544812                      if (m_pRecv_1 != 0)
00544812                      {
00544818                          eax_5 = esi->m_Hdr.seqID_;
00544818                          
0054482d                          if ((eax_5 != 0 && (esi->m_Hdr.header_ & 2) != 0))
0054482d                          {
00544839                              arg2 = esi->cryptoKey_;
00544843                              ReceiverData::AddNakked(m_pRecv_1, eax_5, &arg2);
0054484d                              return ebx;
0054482d                          }
00544812                      }
00544808                  }
00544808                  
005448e3                  eax_5 = ebx;
005448e8                  return eax_5;
005447f9              }
005447dd          }
005447dd          else if ((esi->m_Hdr.header_ & 2) == 0)
005447e6              goto label_544804;
005447a0      }
005447a0      
005447e9      uint32_t eax_1;
005447e9      eax_1 = 0;
005447ec      return 0;
00544790  }

005448eb                                   90 90 90 90 90                                                             .....

005448f0  void __thiscall SharedNet::HandleEmptyAck(class SharedNet* this, class CSeqIDListHeader<8192,33> const* arg2, class CNetLayerPacket const* arg3)

005448f0  {
005448f4      class CNetLayerPacket* eax;
005448f4      eax = arg3->m_Hdr.recID_;
005448f4      
00544910      if ((eax < 0x100 && ((((uint32_t)eax) * 0x88) + this) != 0xffffffe0))
00544910      {
0054491b          int32_t i = 0;
0054491b          
0054491f          if (arg2->m_IDs[0] > 0)
0054491f          {
00544926              uint32_t* esi_1 = &arg2->m_IDs[1];
00544926              
00544943              do
00544943              {
00544935                  AVL<unsigned long,unsigned long>::Remove((((((uint32_t)eax) * 0x88) + this) + 0x6c), ADJ(esi_1)->m_IDs[1]);
0054493d                  i += 1;
0054493e                  esi_1 = &esi_1[1];
00544943              } while (i < arg2->m_IDs[0]);
0054491f          }
00544910      }
005448f0  }

0054494c                                      90 90 90 90                                                              ....

00544950  uint8_t __thiscall SharedNet::ProcessConnection(class SharedNet* this, class ReceiverData* arg2)

00544950  {
00544959      if (arg2->m_SeqIDsWeNAKed._currNum == 0)
00544959      {
0054495c          arg2->m_NakState = NO_NAK_STATE;
00544963          SharedNet::EnqueuePak(this, arg2);
00544968          int32_t eax;
00544968          eax = 1;
0054496a          return 1;
00544959      }
00544959      
0054496e      arg2->m_NakState = NAK_STATE;
00544975      SharedNet::EnqueueNaks(this, arg2);
0054497a      int32_t eax_1;
0054497a      eax_1 = 1;
0054497c      return 1;
00544950  }

0054497f                                                                                               90                                 .

00544980  void __thiscall ClientNet::OnContextBegun(class ClientNet* this, class AsyncContext arg2)

00544980  {
00544982      class AsyncContext edi = arg2;
00544988      *(int32_t*)((char*)this + 0x34) = edi;
00544992      CAsyncStateHandler::SetContextData(this, edi, *(int32_t*)((char*)this + 0x18), 0);
005449a2      CAsyncStateHandler::SetContextData(this, edi, *(int32_t*)((char*)this + 0x1c), &*(int32_t*)((char*)this + 0x3c));
005449b2      CAsyncStateHandler::SetContextData(this, edi, *(int32_t*)((char*)this + 0x20), *(int32_t*)((char*)this + 0x4c));
005449c0      PStringBase<char>::PStringBase<char>(&arg2, "FailureReason");
005449d9      CAsyncStateHandler::SetContextData(this, edi, CAsyncStateHandler::RegisterContextDataName(this, &arg2), &*(int32_t*)((char*)this + 0x58));
005449e2      int32_t* esi_2 = (arg2 - 0x14);
005449e2      
005449f5      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005449fd          **(uint32_t**)esi_2(1);
00544980  }

00544a04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00544a10  void __fastcall ClientNet::LogonUseTime(class ClientNet* this)

00544a10  {
00544a10      class ClientNet* this_1 = this;
00544a14      int32_t eax = Timer::get_real_time();
00544a19      uint16_t logonRecID_ = this->logonRecID_;
00544a19      
00544a23      if (logonRecID_ == 0)
00544a23      {
00544a29          int32_t nRequestsSent = this->m_LogonData.nRequestsSent;
00544a31          int32_t eax_1;
00544a31          
00544a31          if (nRequestsSent != 0)
00544a31          {
00544a3d              long double x87_r7_1 = ((long double)(eax - this->m_LogonData.timeLastLoginRequestSent));
00544a41              long double temp0_1 = ((long double)2.0);
00544a41              (x87_r7_1 - temp0_1);
00544a47              eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00544a31          }
00544a31          
00544a4c          if ((nRequestsSent == 0 || (*(uint8_t*)((char*)eax_1)[1] & 1) == 0))
00544a4c          {
00544a55              if (nRequestsSent >= 0x14)
00544a55              {
00544a5e                  ClientNet::EndState(this, &ID_ConnectionError_ClientTimedOutServer);
00544a65                  return;
00544a55              }
00544a55              
00544a67              this->m_LogonData.nRequestsSent = (nRequestsSent + 1);
00544a72              this->m_LogonData.timeLastLoginRequestSent = Timer::get_real_time();
00544a8c              CAsyncStateHandler::GetContextData(&this->vtable, this->m_LogonData.hCurrentContext.m_id, this->m_idxNetAuth);
00544a8c              
00544aaa              if (ClientNet::SendLoginRequest(this, &this->m_LogonData.ServerAddr, this->m_LogonData.pNetAuth) != 0)
00544aaa              {
00544ac4                  ClientNet::NotifyPluginsOfStatusChange(this, Net_LoginAuthenticating, this->m_LogonData.nRequestsSent, 0x14);
00544acb                  return;
00544aaa              }
00544aaa              
00544ab1              ClientNet::EndState(this, &ID_ConnectionError_Generic);
00544a4c          }
00544a23      }
00544a23      else if ((((logonRecID_ >= 0x100 || ((((uint32_t)logonRecID_) * 0x88) + this) == 0xffffffe0) || *(uint16_t*)(((((uint32_t)logonRecID_) * 0x88) + this) + 0x20) == 0) || *(uint32_t*)(((((uint32_t)logonRecID_) * 0x88) + this) + 0x68) > 5))
00544af7          ClientNet::EndState(this, &ID_ConnectionError_Generic);
00544a10  }

00544aff                                                                                               90                                 .

00544b00  class NetError* __thiscall ClientNet::InitAddresses(class ClientNet* this, class NetError* __return, char const* arg3, int32_t arg4, struct sockaddr_in* arg5, struct ClientNetConfiguration const* arg6)

00544b00  {
00544b05      char const* ebp = arg3;
00544b14      class AC1Legacy::PStringBase<char> var_30;
00544b14      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_30, ebp);
00544b22      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, &*U"mh,."[2]);
00544b27      char const* edi = arg3;
00544b2b      class AC1Legacy::PStringBase<char> ebx = var_30;
00544b33      char* esi = (ebx + 0x14);
00544b37      int32_t eax_1 = strstr(esi, &edi[0x14]);
00544b42      int32_t ebx_1;
00544b42      
00544b42      if (eax_1 != 0)
00544b4e          ebx_1 = ((eax_1 - ebx) - 0x14);
00544b42      else
00544b44          ebx_1 = 0xffffffff;
00544b44      
00544b60      if ((InterlockedDecrement(&edi[4]) == 0 && edi != 0))
00544b68          **(uint32_t**)edi(1);
00544b68      
00544b6d      class AC1Legacy::PStringBase<char> edi_1 = var_30;
00544b6d      
00544b71      if (ebx_1 != 0xffffffff)
00544b71      {
00544b73          arg3 = 0;
00544b78          int32_t eax_6 = *(uint32_t*)(edi_1 + 8);
00544b78          
00544b85          if ((ebx_1 < eax_6 && *(uint8_t*)((ebx_1 + edi_1) + 0x14) != 0))
00544b85          {
00544b8a              class AC1Legacy::PStringBase<char>* ecx_4 = &var_30;
00544b8a              
00544b8e              if (ebx_1 != (eax_6 - 1))
00544b8e              {
00544b9e                  AC1Legacy::PStringBase<char>::break_reference(ecx_4);
00544ba7                  class AC1Legacy::PStringBase<char> edx_2 = var_30;
00544bab                  *(uint8_t*)((ebx_1 + edx_2) + 0x14) = arg3;
00544bab                  
00544bb5                  if (arg3 == 0)
00544bb5                  {
00544bb7                      char* eax_9 = (edx_2 + 0x14);
00544bc5                      char i;
00544bc5                      
00544bc5                      do
00544bc5                      {
00544bc0                          i = *(uint8_t*)eax_9;
00544bc2                          eax_9 = &eax_9[1];
00544bc5                      } while (i != 0);
00544bca                      *(uint32_t*)(edx_2 + 8) = ((eax_9 - &eax_9[1]) + 1);
00544bb5                  }
00544b8e              }
00544b8e              else
00544b97                  AC1Legacy::PStringBase<char>::append_n_chars(ecx_4, &arg3, 1);
00544b97              
00544bcd              edi_1 = var_30;
00544b85          }
00544b85          
00544bd1          esi = (edi_1 + 0x14);
00544bd4          ebp = esi;
00544b71      }
00544b71      
00544bdf      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, &data_7ca134);
00544be4      char const* ebx_2 = arg3;
00544bed      int32_t eax_13 = strstr(esi, &ebx_2[0x14]);
00544bf8      int32_t esi_2;
00544bf8      
00544bf8      if (eax_13 != 0)
00544c04          esi_2 = ((eax_13 - edi_1) - 0x14);
00544bf8      else
00544bfa          esi_2 = 0xffffffff;
00544bfa      
00544c16      if ((InterlockedDecrement(&ebx_2[4]) == 0 && ebx_2 != 0))
00544c1e          **(uint32_t**)ebx_2(1);
00544c1e      
00544c23      int32_t ebx_3;
00544c23      
00544c23      if (esi_2 == 0xffffffff)
00544d30          ebx_3 = arg4;
00544c23      else
00544c23      {
00544c29          arg3 = 0;
00544c2e          int32_t eax_18 = *(uint32_t*)(edi_1 + 8);
00544c2e          
00544c3b          if ((esi_2 < eax_18 && *(uint8_t*)((esi_2 + edi_1) + 0x14) != 0))
00544c3b          {
00544c40              class AC1Legacy::PStringBase<char>* ecx_9 = &var_30;
00544c40              
00544c44              if (esi_2 != (eax_18 - 1))
00544c44              {
00544c54                  AC1Legacy::PStringBase<char>::break_reference(ecx_9);
00544c5d                  class AC1Legacy::PStringBase<char> edx_4 = var_30;
00544c61                  *(uint8_t*)((esi_2 + edx_4) + 0x14) = arg3;
00544c61                  
00544c6b                  if (arg3 == 0)
00544c6b                  {
00544c6d                      char* eax_21 = (edx_4 + 0x14);
00544c78                      char i_1;
00544c78                      
00544c78                      do
00544c78                      {
00544c73                          i_1 = *(uint8_t*)eax_21;
00544c75                          eax_21 = &eax_21[1];
00544c78                      } while (i_1 != 0);
00544c7d                      *(uint32_t*)(edx_4 + 8) = ((eax_21 - &eax_21[1]) + 1);
00544c6b                  }
00544c44              }
00544c44              else
00544c4d                  AC1Legacy::PStringBase<char>::append_n_chars(ecx_9, &arg3, 1);
00544c4d              
00544c80              edi_1 = var_30;
00544c3b          }
00544c3b          
00544c84          ebp = (edi_1 + 0x14);
00544c90          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, &ebp[(esi_2 + 1)]);
00544c95          char const* edi_3 = arg3;
00544ca7          *(uint32_t*)_errno() = 0;
00544cad          int32_t eax_26 = strtoul(&edi_3[0x14], 0, 0);
00544cb8          ebx_3 = eax_26;
00544cb8          
00544cba          if (eax_26 == 0)
00544cbc              ebx_3 = 0x1c88;
00544cbc          
00544cd1          if ((InterlockedDecrement(&edi_3[4]) == 0 && edi_3 != 0))
00544cd9              **(uint32_t**)edi_3(1);
00544cd9          
00544cdb          edi_1 = var_30;
00544c23      }
00544c23      
00544ce7      arg5->sin_family = 0;
00544ce7      arg5->sin_port = 0;
00544ce9      arg5->sin_addr.S_un = 0;
00544cec      arg5->sin_zero[0] = 0;
00544cec      arg5->sin_zero[1] = 0;
00544cec      arg5->sin_zero[2] = 0;
00544cec      arg5->sin_zero[3] = 0;
00544cef      arg5->sin_zero[4] = 0;
00544cef      arg5->sin_zero[5] = 0;
00544cef      arg5->sin_zero[6] = 0;
00544cef      arg5->sin_zero[7] = 0;
00544cf3      arg5->sin_family = 2;
00544cfe      arg5->sin_port = Ordinal_WSOCK32_9(ebx_3);
00544d11      class NetError* result;
00544d11      int32_t m_tableID;
00544d11      
00544d11      if (NetUtils::GetSinAddr(ebp, &arg5->sin_addr) != 0)
00544d11      {
00544d3c          int32_t eax_30 = Ordinal_WSOCK32_23(2, 2, 0);
00544d42          class ClientNet* this_1 = this;
00544d46          *(int32_t*)((char*)this_1 + 0xc) = eax_30;
00544d49          *(int32_t*)((char*)this_1 + 0x10) = eax_30;
00544d4e          int32_t var_10 = 0;
00544d52          int32_t var_c_1 = 0;
00544d56          int32_t var_8_1 = 0;
00544d5b          int32_t var_4_1 = 0;
00544d5f          var_10 = 2;
00544d70          int32_t var_c_2 = Ordinal_WSOCK32_8(0);
00544d74          void var_1c;
00544d74          InterfaceEnumerator::InterfaceEnumerator(&var_1c);
00544d86          int32_t esi_6 = CInputManager::GetMouseX(&var_1c);
00544d88          int32_t eax_33 = CInputManager::GetMouseY(&var_1c);
00544d88          
00544d91          if (esi_6 != 0)
00544d91          {
00544d97              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg6->DesiredInterface.m_buffer;
00544d9e              struct ClientNetConfiguration* ecx_17;
00544d9e              ecx_17 = m_buffer->m_len != 1;
00544d9e              
00544da3              if (ecx_17 == 0)
00544da3              {
00544de8              label_544de8:
00544de8                  esi_6 = *(uint32_t*)eax_33;
00544da3              }
00544da3              else
00544da3              {
00544da9                  char const** var_44_9 = &arg3;
00544dae                  int32_t* var_48_5 = &arg4;
00544daf                  int32_t* var_4c_2 = &arg4;
00544db2                  class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = m_buffer;
00544db8                  int32_t eax_35;
00544db8                  struct in_addr* ecx_18;
00544db8                  struct in_addr* edx_7;
00544db8                  eax_35 = InterlockedIncrement(&m_buffer->m_cRef);
00544db8                  
00544dc8                  if (ParseInterfaceString(eax_35, edx_7, ecx_18) == 0)
00544dc8                  {
00544de8                  label_544de8_1:
00544de8                      esi_6 = *(uint32_t*)eax_33;
00544dc8                  }
00544dc8                  else
00544dc8                  {
00544dca                      int32_t eax_37 = 0;
00544dca                      
00544dce                      if (esi_6 <= 0)
00544dce                      {
00544de8                      label_544de8_2:
00544de8                          esi_6 = *(uint32_t*)eax_33;
00544dce                      }
00544dce                      else
00544dce                      {
00544ddd                          while ((*(uint32_t*)(eax_33 + (eax_37 << 2)) & arg3) != arg4)
00544ddd                          {
00544de3                              eax_37 += 1;
00544de3                              
00544de6                              if (eax_37 >= esi_6)
00544de6                                  goto label_544de8_2;
00544ddd                          }
00544ddd                          
00544f0e                          esi_6 = *(uint32_t*)(eax_33 + (eax_37 << 2));
00544f11                          int32_t var_c_3 = esi_6;
00544dce                      }
00544dc8                  }
00544da3              }
00544d91          }
00544d91          
00544dee          InterfaceEnumerator::~InterfaceEnumerator(&var_1c);
00544df3          struct ClientNetConfiguration* ecx_21 = arg6;
00544dfd          int32_t ebx_4;
00544dfd          ebx_4 = 0;
00544dfd          
00544e01          if (ecx_21->bAutoGenerateUniquePort != 0)
00544e01          {
00544e17              uint32_t esi_7 = (COMBINE(0, Ordinal_WSOCK32_8(esi_6)) % 0xfa07);
00544e1b              uint32_t edi_5 = ((uint32_t)esi_7);
00544e1b              
00544e64              do
00544e64              {
00544e27                  esi_7 = ((uint32_t)(esi_7 + 0x100));
00544e27                  
00544e2f                  if (esi_7 == edi_5)
00544e2f                  {
00544f41                      edi_1 = var_30;
00544f41                      goto label_544f45;
00544e2f                  }
00544e2f                  
00544e3b                  if (esi_7 >= 0x400)
00544e3b                  {
00544e4a                      *(uint16_t*)((char*)var_10)[2] = Ordinal_WSOCK32_9(esi_7);
00544e54                      int32_t eax_43 = Ordinal_WSOCK32_2(*(int32_t*)((char*)this_1 + 0xc), &var_10, 0x10);
00544e5c                      ebx_4 = -(eax_43);
00544e5e                      ebx_4 = (ebx_4 - ebx_4);
00544e60                      ebx_4 += 1;
00544e3b                  }
00544e64              } while (ebx_4 == 0);
00544e64              
00544e2f              goto label_544e66;
00544e01          }
00544e01          
00544f2c          *(uint16_t*)((char*)var_10)[2] = Ordinal_WSOCK32_9(ecx_21->dwPort);
00544f31          int32_t eax_50 = Ordinal_WSOCK32_2(*(int32_t*)((char*)this_1 + 0xc), &var_10, 0x10);
00544f39          ebx_4 = -(eax_50);
00544f3b          ebx_4 = (ebx_4 - ebx_4);
00544f3d          ebx_4 += 1;
00544f45      label_544f45:
00544f45          
00544f47          if (ebx_4 != 0)
00544f47          {
00544e66          label_544e66:
00544e66              int32_t eax_44 = *(int32_t*)((char*)this_1 + 0xc);
00544e84              int32_t var_28 = 4;
00544e8c              int32_t var_24;
00544e8c              Ordinal_WSOCK32_7(eax_44, 0xffff, 0x1002, &var_24, &var_28);
00544e8e              int32_t esi_9 = var_24;
00544e92              int32_t edi_6 = 0x20000;
00544e92              
00544e99              if (esi_9 < 0x20000)
00544e99              {
00544f9c                  do
00544f9c                  {
00544ea8                      int32_t eax_46;
00544ea8                      int32_t edx_13;
00544ea8                      edx_13 = HIGHD(((int64_t)(edi_6 + esi_9)));
00544ea8                      eax_46 = LOWD(((int64_t)(edi_6 + esi_9)));
00544eb2                      esi_9 = ((COMBINE(edx_13, eax_46) / 2) + (COMBINE(edx_13, eax_46) % 2));
00544eb9                      int32_t ecx_22 = *(int32_t*)((char*)this + 0xc);
00544ecc                      arg6 = esi_9;
00544ed0                      Ordinal_WSOCK32_21(ecx_22, 0xffff, 0x1002, &arg6, 4);
00544edb                      int32_t edx_15 = *(int32_t*)((char*)this + 0xc);
00544eee                      var_28 = 4;
00544ef6                      Ordinal_WSOCK32_7(edx_15, 0xffff, 0x1002, &arg6, &var_28);
00544ef6                      
00544efc                      if (arg6 >= esi_9)
00544f96                          var_24 = esi_9;
00544efc                      else
00544efc                      {
00544f02                          edi_6 = (esi_9 - 1);
00544f05                          esi_9 = var_24;
00544efc                      }
00544f9c                  } while (esi_9 < edi_6);
00544f9c                  
00544fa2                  this_1 = this;
00544e99              }
00544e99              
00544fa6              int32_t ecx_26 = *(int32_t*)((char*)this_1 + 0xc);
00544fb4              int32_t var_20 = 1;
00544fbc              Ordinal_WSOCK32_12(ecx_26, 0x8004667e, &var_20);
00544fc2              result = __return;
00544fc6              edi_1 = var_30;
00544fca              result->vtable = 0x794878;
00544fd6              result->m_stringID = ID_NetError_None.m_stringID;
00544fd9              m_tableID = ID_NetError_None.m_tableID;
00544fd9              goto label_544fe2;
00544f47          }
00544f47          
00544f4d          result = __return;
00544f51          result->vtable = 0x794878;
00544f5c          result->m_stringID = ID_NetError_CantBind.m_stringID;
00544f69          result->m_tableID = ID_NetError_CantBind.m_tableID;
00544f69          
00544f7c          if ((InterlockedDecrement((edi_1 + 4)) == 0 && edi_1 != 0))
00544f88              **(uint32_t**)edi_1(1);
00544d11      }
00544d11      else
00544d11      {
00544d13          result = __return;
00544d17          result->vtable = 0x794878;
00544d23          result->m_stringID = ID_NetError_BadServerAddress.m_stringID;
00544d26          m_tableID = ID_NetError_BadServerAddress.m_tableID;
00544fe2      label_544fe2:
00544fe2          result->m_tableID = m_tableID;
00544fe2          
00544ff1          if ((InterlockedDecrement((edi_1 + 4)) == 0 && edi_1 != 0))
00544ff9              **(uint32_t**)edi_1(1);
00544d11      }
00545004      return result;
00544b00  }

00545007                       90 90 90 90 90 90 90 90 90                                                         .........

00545010  class NetError* __thiscall ClientNet::Init(class ClientNet* this, class NetError* __return, int32_t arg3, char const* arg4, class DatIDStamp* arg5, class NetAuthenticator* arg6, struct ClientNetConfiguration const* arg7)

00545010  {
00545013      uint32_t m_stringID = ID_ConnectionError_Generic.m_stringID;
0054501b      int32_t m_tableID = ID_ConnectionError_Generic.m_tableID;
00545022      struct ClientNetConfiguration* ebp = arg7;
0054503d      __builtin_memset(&this->m_CurrentLinkStatus, 0, 0x1c);
0054504c      __builtin_memcpy(&*(int32_t*)((char*)this + 0x886c), ebp, 0x14);
0054504e      int32_t eax = Timer::get_real_time();
0054505b      this->m_dwCurrentConnectionSequenceNumber = eax;
00545061      this->m_WorldSwitchHistory.bBeenSwitchedBefore = 0;
00545067      this->m_LogonSwitchHistory.bBeenSwitchedBefore = 0;
00545067      
0054506d      if (arg6 == 0)
0054506d      {
0054507e          __return->m_stringID = m_stringID;
00545081          __return->m_tableID = m_tableID;
00545084          __return->vtable = 0x794878;
0054508e          return __return;
0054506d      }
0054506d      
0054509d      arg6->m_dwConnectionSequenceNumber = eax;
005450ad      void __return_1;
005450ad      class NetError* eax_3 = ClientNet::InitAddresses(this, &__return_1, arg4, arg3, &this->m_LogonData.ServerAddr, ebp);
005450b2      uint32_t m_stringID_1 = eax_3->m_stringID;
005450b5      int32_t m_tableID_1 = eax_3->m_tableID;
005450b5      
005450c6      if ((ID_NetError_None.m_stringID == m_stringID_1 && ID_NetError_None.m_tableID == m_tableID_1))
005450c6      {
005450d3          this->m_LogonData.pNetAuth = arg6;
005450d9          CAsyncStateMachine::AllocateAndBeginContext(&this->m_ConnectionFSM, &arg7);
005450c6      }
005450c6      
005450de      int32_t* __return_2 = __return;
005450e3      __return_2[1] = m_stringID_1;
005450e7      __return_2[2] = m_tableID_1;
005450eb      *(uint32_t*)__return_2 = 0x794878;
005450f5      return __return_2;
00545010  }

005450f8                                                                          90 90 90 90 90 90 90 90                          ........

00545100  uint8_t __thiscall ClientNet::ProcessPacket(class ClientNet* this, class CNetLayerPacket* arg2)

00545100  {
0054510f      int32_t ebx;
0054510f      ebx = SharedNet::ProcessPacket(this, arg2);
00545113      int32_t eax;
00545113      
00545113      if (ebx == 0)
00545113      {
0054518c          eax = ebx;
0054518f          return eax;
00545113      }
00545113      
00545116      class ReceiverData* m_pRecv = arg2->m_pRecv;
00545116      
00545120      if (m_pRecv != 0)
00545120      {
00545122          enum ConnectionState m_ConnectionState = m_pRecv->m_ConnectionState;
00545122          
00545128          if (m_ConnectionState == cs_ConnectionRequestAcked)
00545128          {
0054514e              if ((arg2->m_Hdr.header_ & 0x40000) == 0)
0054514e              {
00545154                  int32_t eax_3;
00545154                  eax_3 = arg2->m_Hdr.recID_;
00545160                  *(int32_t*)((char*)this->vtable + 0x3c)(eax_3, 5);
00545165                  m_pRecv->m_qwReferralCookie = 0;
00545168                  *(uint32_t*)((char*)m_pRecv->m_qwReferralCookie)[4] = 0;
0054516b                  eax = this->m_LogonData.bMyTurn;
0054516b                  
00545173                  if (eax != 0)
0054517c                      ClientNet::EndState(this, &ID_NetError_None);
0054514e              }
00545128          }
00545128          else if (m_ConnectionState == 5)
0054512b          {
00545133              int32_t eax_2;
00545133              eax_2 = ebx;
00545133              
00545135              if ((m_pRecv->m_qwReferralCookie | *(uint32_t*)((char*)m_pRecv->m_qwReferralCookie)[4]) != 0)
00545135              {
00545137                  m_pRecv->m_qwReferralCookie = 0;
0054513a                  *(uint32_t*)((char*)m_pRecv->m_qwReferralCookie)[4] = 0;
00545135              }
00545135              
00545141              return eax_2;
0054512b          }
00545120      }
00545120      
00545184      eax = ebx;
00545187      return eax;
00545100  }

00545192                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005451a0  uint8_t __thiscall ClientNet::ProcessOptionalHeader(class ClientNet* this, class COptionalHeader const* arg2, class CNetLayerPacket const* arg3)

005451a0  {
005451a5      class CNetLayerPacket* ebp = arg3;
005451b8      int32_t ebx;
005451b8      ebx = SharedNet::ProcessOptionalHeader(this, arg2, ebp);
005451ba      uint32_t m_dwMask = arg2->m_dwMask;
005451c8      int32_t var_c;
005451c8      
005451c8      if (m_dwMask == 0x100000)
005451c8      {
00545282          int32_t var_8_1 = *(int32_t*)((char*)arg2 + 0x24);
00545286          bool cond:2 = this->m_LogonData.hCurrentContext.m_id == INVALID_ASYNCCONTEXT.m_id;
0054528c          int32_t var_4_1 = *(int32_t*)((char*)arg2 + 0x28);
00545290          var_c = 0x794878;
00545290          
0054529a          if (!(cond:2))
0054529a          {
005452a1              ClientNet::EndState(this, &var_c);
005452ab              int32_t eax_7;
005452ab              eax_7 = 1;
005452b1              return 1;
0054529a          }
0054529a          
005452b4          ClientNet::LogOffServer(this);
005452b9          ECM_Login::SendNotice_ServerDied();
005452c3          int32_t eax_8;
005452c3          eax_8 = 1;
005452c9          return 1;
005451c8      }
005451c8      
005451d5      if (m_dwMask == 0x800)
005451d5      {
0054523e          this->vtable->HandleReferral(arg2);
0054524b          int32_t eax_4;
0054524b          eax_4 = 1;
00545251          return 1;
005451d5      }
005451d5      
005451dc      if (m_dwMask == 0x100)
005451dc      {
00545227          this->vtable->HandleServerSwitch(arg2, ebp);
00545235          int32_t eax_2;
00545235          eax_2 = 1;
0054523b          return 1;
005451dc      }
005451dc      
005451e3      if (m_dwMask == 0x200)
005451e3      {
005451f4          COnePrimHeader<512,7,sockaddr_in>::InqData(arg2, &this->m_LogonData.ServerAddr);
005451fd          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3);
0054520a          NetUtils::GetIPString(&this->m_LogonData.ServerAddr, &arg3, 0);
00545216          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
0054521e          int32_t eax_1;
0054521e          eax_1 = 1;
00545224          return 1;
005451e3      }
005451e3      
00545259      if (m_dwMask == 0x40000)
00545259      {
0054525f          this->vtable->HandleConnectionRequest(arg2, ebp);
0054526d          int32_t eax_5;
0054526d          eax_5 = 1;
00545273          return 1;
00545259      }
00545259      
005452d1      if (m_dwMask == 0x200000)
005452d1      {
0054533e          uint32_t m_stringID = ID_NetError_None.m_stringID;
00545344          var_c = 0x794878;
0054534c          m_dwMask = *(int32_t*)((char*)arg2 + 0x24);
00545351          uint32_t m_dwMask_1 = m_dwMask;
00545355          int32_t edi_1 = *(int32_t*)((char*)arg2 + 0x28);
00545358          int32_t var_4_2 = edi_1;
00545358          
00545364          if ((m_stringID != m_dwMask || ID_NetError_None.m_tableID != edi_1))
00545364          {
00545366              ebp = ebp->m_Hdr.recID_;
00545366              
00545374              if (ebp == this->logonRecID_)
00545374              {
00545381                  ClientNet::NotifyPluginsOfStatusChange(this, Net_LoginConnectionError, &var_c, 0);
0054538f                  return ebx;
00545374              }
00545374              
00545399              if (ebp == this->currServerRecID_)
005453a6                  ClientNet::NotifyPluginsOfStatusChange(this, Net_WorldConnectionError, &var_c, 0);
00545364          }
005452d1      }
005452d1      else if (m_dwMask == 0x4000000)
005452d8      {
005452f6          class ReceiverData* m_pRecv = ebp->m_pRecv;
00545302          ebx = 1;
00545304          long double x87_r7_3 = ((((long double)Timer::local_time) - ((long double)*(int32_t*)((char*)arg2 + 0x18))) - ((long double)*(int32_t*)((char*)arg2 + 0x1c)));
00545307          arg3 = ((float)x87_r7_3);
0054530b          m_pRecv->RoundTripLatency_ = ((float)x87_r7_3);
0054530b          
0054531c          if (ebp->recipient_ == this->currServerRecID_)
0054531c          {
0054532d              CLinkStatusAverages::OnPingResponse(&this->m_LinkStatusAverages, arg3);
00545335              int32_t eax_10;
00545335              eax_10 = 1;
0054533b              return 1;
0054531c          }
005452d8      }
005452d8      else if (m_dwMask == 0x8000000)
005452df      {
005452ea          m_dwMask = 1;
005452f0          return 1;
005452df      }
005452df      
005453ae      m_dwMask = ebx;
005453b4      return m_dwMask;
005451a0  }

005453b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005453c0  void __thiscall ClientNet::RemoveConnection(class ClientNet* this, uint16_t arg2)

005453c0  {
005453cf      if (PacketController::Instance() != 0)
005453d9          PacketController::DeleteRecipient(PacketController::Instance(), arg2);
005453d9      
005453fc      ReceiverData::RemoveFromQueue((((((uint32_t)arg2) * 0x88) + this) + 0x20), &*(int32_t*)((char*)this + 0x8820), &*(int32_t*)((char*)this + 0x8824));
00545403      ReceiverData::Clear((((((uint32_t)arg2) * 0x88) + this) + 0x20));
00545403      
00545423      if (((arg2 == this->logonRecID_ || arg2 == this->currServerRecID_) && this->logOffSent_ == 0))
00545423      {
00545427          ClientNet::LogOffServer(this);
0054542c          ECM_Login::SendNotice_ServerDied();
00545423      }
005453c0  }

00545436                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00545440  uint8_t __fastcall ClientNet::ProcessConnections(class ClientNet* this)

00545440  {
00545443      ClientNet::ProcessReferralQueue(this);
0054544b      /* tailcall */
0054544b      return SharedNet::ProcessConnections(this);
00545440  }


00545450  uint8_t __thiscall ClientNet::ProcessConnection(class ClientNet* this, class ReceiverData* arg2)

00545450  {
0054545d      uint32_t eax_1 = (arg2->m_ConnectionState - 4);
00545466      char ebx = 1;
00545466      
0054546b      if (eax_1 > 3)
0054557d          ebx = 0;
0054546b      else
00545471          switch (eax_1)
00545471          {
0054547b              case 0:
0054547b              {
0054547b                  long double x87_r7_2 = (((long double)Timer::local_time) - ((long double)arg2->lastSentHandshake_));
00545481                  long double temp2_1 = ((long double)0.33333333300000001);
00545481                  (x87_r7_2 - temp2_1);
00545487                  eax_1 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00545487                  
0054548c                  if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
00545495                      ClientNet::SendConnectAck(this, arg2);
0054547b                  break;
0054547b              }
005454c4              case 1:
005454c4              {
005454c4              label_5454c4:
005454c4                  eax_1 = arg2->m_RecID;
005454c4                  
005454ce                  if (eax_1 == this->currServerRecID_)
005454ce                  {
005454d6                      long double x87_r7_4 = (((long double)Timer::local_time) - ((long double)arg2->localtimeLastHeartbeat_));
005454dc                      long double temp4_1 = ((long double)2.0);
005454dc                      (x87_r7_4 - temp4_1);
005454e2                      eax_1 = ((((x87_r7_4 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005454e2                      
005454e7                      if ((*(uint8_t*)((char*)eax_1)[1] & 1) == 0)
005454e7                      {
005454f8                          arg2->localtimeLastHeartbeat_ = (*(uint32_t*)Timer::local_time);
005454fe                          *(uint32_t*)((char*)arg2->localtimeLastHeartbeat_)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00545504                          this->m_CurrentLinkStatus.RoundTripDelay = arg2->RoundTripLatency_;
00545516                          this->m_CurrentLinkStatus.TimeSinceLastGotData = ((float)(((long double)Timer::local_time) - ((long double)arg2->m_LocalTimeLastGotData)));
0054552e                          this->m_CurrentLinkStatus.SnapshotDuration = ((float)(((long double)Timer::local_time) - ((long double)this->m_LinkStatusAverages.m_LocalTimeOfSnapshot)));
00545534                          CLinkStatusAverages::AddSnapshot(&this->m_LinkStatusAverages, &this->m_CurrentLinkStatus);
0054553b                          ClientNet::NotifyPluginsOfHeartbeat(this);
00545547                          __builtin_memset(&this->m_CurrentLinkStatus, 0, 0x1c);
005454e7                      }
005454ce                  }
005454ce                  
0054554e                  if (arg2->m_SeqIDsWeNAKed._currNum != 0)
0054554e                  {
00545564                      arg2->m_NakState = NAK_STATE;
00545567                      SharedNet::EnqueueNaks(this, arg2);
0054554e                  }
0054554e                  else
0054554e                  {
00545553                      arg2->m_NakState = NO_NAK_STATE;
0054555a                      SharedNet::EnqueuePak(this, arg2);
0054554e                  }
005454c4                  break;
005454c4              }
005454ac              case 2:
005454ac              {
005454ac                  eax_1 = PacketController::GetRecipient(PacketController::Instance(), arg2->m_RecID);
005454ac                  
005454b9                  if ((eax_1 == 0 || *(uint32_t*)(eax_1 + 0x10) == 7))
005454bf                      ReceiverData::SetConnectionState(arg2, cs_DisconnectSent);
005454bf                  
005454b9                  goto label_5454c4;
005454ac              }
00545576              case 3:
00545576              {
00545576                  ClientNet::RemoveConnection(this, arg2->m_RecID);
00545576                  break;
00545576              }
00545471          }
00545471      
00545585      long double x87_r7_10 = (((long double)Timer::cur_time) - ((long double)*(int32_t*)((char*)this + 0x8828)));
0054558b      long double temp1 = ((long double)140.0);
0054558b      (x87_r7_10 - temp1);
00545591      eax_1 = ((((x87_r7_10 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp1) ? 1 : 0) << 0xe) | 0))));
00545593      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00545593      
00545596      if (!(p))
00545596      {
005455a2          long double x87_r7_12 = (((long double)Timer::local_time) - ((long double)arg2->m_LocalTimeLastGotData));
005455a5          long double temp3_1 = ((long double)140.0);
005455a5          (x87_r7_12 - temp3_1);
005455ab          eax_1 = ((((x87_r7_12 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005455ab          
005455b0          if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
005455b0          {
005455b6              enum ConnectionState m_ConnectionState = arg2->m_ConnectionState;
005455b6              
005455bc              if (m_ConnectionState < cs_DisconnectReceived)
005455bc              {
005455c7                  int32_t eax_6;
005455c7                  eax_6 = arg2->m_RecID;
005455cf                  *(int32_t*)((char*)this->vtable + 0x3c)(eax_6, 6);
005455cf                  
005455d5                  if (m_ConnectionState == cs_Connected)
005455d5                  {
005455d7                      eax_1 = arg2->m_qwReferralCookie;
005455da                      int32_t ecx_11 = *(uint32_t*)((char*)arg2->m_qwReferralCookie)[4];
005455da                      
005455e1                      if ((eax_1 | ecx_11) != 0)
005455e1                      {
005455e3                          int32_t edx_4;
005455e3                          edx_4 = this->logOffSent_;
005455e3                          
005455eb                          if (edx_4 == 0)
005455eb                          {
005455f0                              int32_t edi_2;
005455f0                              edi_2 = arg2->m_Addr.sin_family;
005455f0                              *(uint16_t*)((char*)edi_2)[2] = arg2->m_Addr.sin_port;
005455f2                              int32_t var_18_1 = edi_2;
005455f9                              union in_addr::__unnamed S_un = arg2->m_Addr.sin_addr.S_un;
005455fd                              int32_t edi_4;
005455fd                              edi_4 = arg2->m_Addr.sin_zero[0];
005455fd                              *(uint8_t*)((char*)edi_4)[1] = arg2->m_Addr.sin_zero[1];
005455fd                              *(uint8_t*)((char*)edi_4)[2] = arg2->m_Addr.sin_zero[2];
005455fd                              *(uint8_t*)((char*)edi_4)[3] = arg2->m_Addr.sin_zero[3];
00545600                              int32_t edx_6;
00545600                              edx_6 = arg2->m_Addr.sin_zero[4];
00545600                              *(uint8_t*)((char*)edx_6)[1] = arg2->m_Addr.sin_zero[5];
00545600                              *(uint8_t*)((char*)edx_6)[2] = arg2->m_Addr.sin_zero[6];
00545600                              *(uint8_t*)((char*)edx_6)[3] = arg2->m_Addr.sin_zero[7];
00545603                              int32_t var_c_1 = edx_6;
00545607                              edx_6 = arg2->m_RecID;
0054560a                              int32_t var_1c_1 = ecx_11;
00545611                              int32_t var_10_1 = edi_4;
00545615                              int16_t var_8_1 = edx_6;
0054561a                              uint32_t var_20 = eax_1;
00545629                              void var_50;
00545629                              __builtin_memcpy(&var_50, &var_20, 0x20);
0054562b                              class COptionalHeader* eax_7 = COnePrimHeader<2048,1073741922,CReferralStruct>::CreateFromData(var_50);
00545632                              this->vtable->HandleReferral(eax_7);
00545640                              ReferenceCountTemplate<1048576,0>::Release(eax_7);
005455eb                          }
005455e1                      }
005455d5                  }
005455bc              }
005455b0          }
00545596      }
00545596      
00545648      eax_1 = ebx;
0054564e      return eax_1;
00545450  }

00545651                                                     8d 49 00                                                       .I.
00545654  uint32_t jump_table_545654[0x4] = 
00545654  {
00545654      [0x0] =  0x00545478
00545658      [0x1] =  0x005454c4
0054565c      [0x2] =  0x0054549f
00545660      [0x3] =  0x0054556e
00545664  }

00545664              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00545670  uint8_t __thiscall SmartArray<ClientNet::CReferralQueueEntry,1>::AddToEnd(class SmartArray<ClientNet::CReferralQueueEntry,1>* this, struct ClientNet::CReferralQueueEntry const* arg2)

00545670  {
00545679      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00545679      
00545680      if (this->m_num >= eax_1)
00545680      {
0054568e          uint8_t result = SmartArray<ClientNet::CReferralQueueEntry,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
0054568e          
00545695          if (result == 0)
00545698              return result;
00545680      }
00545680      
005456b1      __builtin_memcpy(&this->m_data[this->m_num], arg2, 0x28);
005456b8      this->m_num += 1;
005456bc      uint32_t eax_7;
005456bc      eax_7 = 1;
005456bf      return 1;
00545670  }

005456c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005456d0  class AC1Legacy::PStringBase<char>* __thiscall AC1Legacy::PStringBase<unsigned short>::to_spstring(class AC1Legacy::PStringBase<unsigned short> const* this, class AC1Legacy::PStringBase<char>* __return, uint16_t const arg3)

005456d0  {
005456dc      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005456ed      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005456f1      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005456f3      class AC1Legacy::PSRefBuffer<unsigned short>* m_buffer_2 = this->m_buffer;
005456f9      class AC1Legacy::PStringBase<char>* __return_1;
005456f9      
005456f9      if (m_buffer_2->m_len != 1)
005456f9      {
0054572f          uint32_t edi_1 = ((uint32_t)arg3);
0054573b          int32_t var_c = 0;
00545743          void* const ebp_1 = &data_7943a4;
00545748          int32_t* ebx_1 = &var_c;
00545748          
0054574c          if (edi_1 > 0xcec8)
0054574c          {
0054576d              if (edi_1 > 0xdeb3)
0054576d              {
0054578b                  if ((edi_1 >= 0xfde8 && edi_1 <= 0xfde9))
0054578b                  {
0054578d                      ebx_1 = nullptr;
0054578f                      ebp_1 = nullptr;
0054578b                  }
0054576d              }
0054576d              else if ((edi_1 >= 0xdeaa || edi_1 == 0xd698))
0054577b              {
0054578d                  ebx_1 = nullptr;
0054578f                  ebp_1 = nullptr;
0054577b              }
0054574c          }
0054574c          else if (edi_1 == 0xcec8)
0054574e          {
0054578d              ebx_1 = nullptr;
0054578f              ebp_1 = nullptr;
0054574e          }
0054574e          else if ((edi_1 - 0xc42c) <= 9)
0054577b              switch (edi_1)
0054577b              {
0054578d                  case 0xc42c:
0054578d                  case 0xc42d:
0054578d                  case 0xc42e:
0054578d                  case 0xc431:
0054578d                  case 0xc433:
0054578d                  case 0xc435:
0054578d                  {
0054578d                      ebx_1 = nullptr;
0054578f                      ebp_1 = nullptr;
0054578d                      break;
0054578d                  }
0054577b              }
0054577b          
005457a2          uint32_t eax_6 = kernel32_WideCharToMultiByte_Ptr(edi_1, 0, &m_buffer_2->m_data, m_buffer_2->m_len, 0, 0, ebp_1, ebx_1);
005457a2          
005457ac          if (eax_6 == 0)
005457ac          {
005457ae              var_c = 1;
005457d5          label_5457d5:
005457d5              uint32_t ebp_3 = (this->m_buffer->m_len - 1);
005457d5              
005457de              if (InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0)
005457de              {
005457e0                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005457e0                  
005457e6                  if (AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0)
005457e8                      AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
005457de              }
005457de              
005457f3              AC1Legacy::PStringBase<char>::allocate_ref_buffer(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, ebp_3);
005457f8              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005457fc              int32_t edi_2 = 0;
00545800              AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_len = 1;
00545800              
00545807              if (ebp_3 > 0)
00545807              {
0054580d                  int32_t var_8_1 = 0x14;
0054580d                  
005458bd                  do
005458bd                  {
00545819                      class AC1Legacy::PSRefBuffer<unsigned short>* m_buffer = this->m_buffer;
0054581b                      uint32_t m_len = m_buffer->m_len;
00545820                      void* eax_13;
00545820                      
00545820                      if (edi_2 < m_len)
0054582c                          eax_13 = ((char*)m_buffer + var_8_1);
00545820                      else
00545822                          eax_13 = (((char*)m_buffer + (m_len << 1)) + 0x12);
00545822                      
0054582e                      AC1Legacy::PStringBase<char>::s_NullBuffer_5 = *(uint16_t*)eax_13;
0054582e                      
00545835                      if (AC1Legacy::PStringBase<char>::s_NullBuffer_5 <= 0x7f)
00545835                      {
005458a6                          arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
005458aa                          AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &arg3, 1);
00545835                      }
00545835                      else
00545835                      {
00545837                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0054583c                          arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00545844                          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0054584d                          uint32_t var_24_7 = ((uint32_t)AC1Legacy::PStringBase<char>::s_NullBuffer_5);
00545858                          AC1Legacy::PStringBase<char>::sprintf(&arg3, "<%04x>");
0054585d                          int32_t* esi_1 = arg3;
0054585d                          
0054586b                          if (esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer)
0054587a                              AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &esi_1[5], (esi_1[2] - 1));
0054587a                          
0054588f                          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00545897                              **(uint32_t**)esi_1(1);
00545835                      }
00545835                      
005458b3                      edi_2 += 1;
005458b9                      var_8_1 += 2;
005458bd                  } while (edi_2 < ebp_3);
005458bd                  
005458c3                  AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00545807              }
00545807              
005458cf              __return->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
005458d1              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef);
005458d1              
005458e4              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
005458e6                  AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
005458e6              
005458f7              return __return;
005457ac          }
005457ac          
005457be          if (var_c != 0)
005457be              goto label_5457d5;
005457be          
005458ff          AC1Legacy::PStringBase<char>::allocate_ref_buffer(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, eax_6);
00545908          class AC1Legacy::PSRefBuffer<unsigned short>* m_buffer_1 = this->m_buffer;
00545910          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00545920          int32_t eax_22 = kernel32_WideCharToMultiByte_Ptr(edi_1, 0, &m_buffer_1->m_data, m_buffer_1->m_len, (AC1Legacy::PStringBase<char>::s_NullBuffer_6 + 0x14), eax_6, ebp_1, ebx_1);
00545920          
00545928          if (eax_22 != 0)
00545928          {
00545980              __return_1 = __return;
00545987              *(uint32_t*)(AC1Legacy::PStringBase<char>::s_NullBuffer_6 + 8) = eax_22;
0054598b              __return_1->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
0054598d              InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_6 + 4));
0054598d              
0054599c              if (InterlockedDecrement((AC1Legacy::PStringBase<char>::s_NullBuffer_6 + 4)) == 0)
005459a4                  **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_6(1);
00545928          }
00545928          else
00545928          {
00545932              enum WIN32_ERROR var_24_14 = GetLastError();
00545935              enum WIN32_ERROR var_28_5 = GetLastError();
00545936              uint32_t var_2c_3 = edi_1;
00545941              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, "Failed conversion to codepage %h…");
00545946              class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0054594a              __return_1 = __return;
00545955              __return_1->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
00545957              InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 4));
00545957              
0054596a              if ((InterlockedDecrement((AC1Legacy::PStringBase<char>::s_NullBuffer_7 + 4)) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_7 != 0))
00545972                  **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_7(1);
00545928          }
005456f9      }
005456f9      else
005456f9      {
005456fb          __return_1 = __return;
00545700          __return_1->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00545702          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00545702          
00545715          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
0054571b              AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
005456f9      }
005456f9      
005459af      return __return_1;
005456d0  }

005459b2                                                        8b ff                                                        ..
005459b4  uint32_t jump_table_5459b4[0x2] = 
005459b4  {
005459b4      [0x0] =  0x0054578d
005459b8      [0x1] =  0x00545791
005459bc  }
005459bc  uint8_t lookup_table_5459bc[0xa] = 
005459bc  {
005459bc      [0x0] =  0x00
005459bd      [0x1] =  0x00
005459be      [0x2] =  0x00
005459bf      [0x3] =  0x01
005459c0      [0x4] =  0x01
005459c1      [0x5] =  0x00
005459c2      [0x6] =  0x01
005459c3      [0x7] =  0x00
005459c4      [0x8] =  0x01
005459c5      [0x9] =  0x00
005459c6  }

005459c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005459d0  void __fastcall ClientNet::~ClientNet(class ClientNet* this)

005459d0  {
005459dc      *(int32_t*)((char*)this + -0x8888) = 0x7ca160;
005459e3      this->vtable = 0x7ca140;
005459e9      int32_t i = 0;
005459eb      void* __offset(ClientNet, -0x8868) ebx = ((char*)this - 0x8868);
005459eb      
00545a0c      do
00545a0c      {
005459f5          if (*(int16_t*)((char*)ADJ(ebx) + -0x8868) != 0)
005459fa              ClientNet::RemoveConnection(((char*)this - 0x8888), i);
005459fa          
005459ff          i += 1;
00545a00          ebx += 0x88;
00545a0c      } while (i < 0x100);
00545a0c      
00545a15      Ordinal_WSOCK32_3(*(int32_t*)((char*)this + -0x887c));
00545a1b      FlowQueue::SharedStaticCleanup();
00545a1b      
00545a32      if ((*(int32_t*)((char*)this + 0x1dc) & 0x80000000) == 0x80000000)
00545a3b          operator delete[](*(int32_t*)((char*)this + 0x1d8));
00545a3b      
00545a46      CAsyncStateMachine::~CAsyncStateMachine(&*(int32_t*)((char*)this + 0x64));
00545a4b      void* __offset(ClientNet, -0x8888) edi = ((char*)this - 0x8888);
00545a55      *(int32_t*)((char*)this + 0x58) = 0x79285c;
00545a5c      void* __offset(ClientNet, 0x28) eax_1;
00545a5c      
00545a5c      if (edi == 0)
00545a63          eax_1 = nullptr;
00545a5c      else
00545a5e          eax_1 = &*(int32_t*)((char*)this + 0x28);
00545a5e      
00545a68      int32_t i_1 = 0;
00545a68      
00545a6c      if (*(int32_t*)((char*)ADJ(eax_1) + 0x30) > 0)
00545a6c      {
00545a7e          do
00545a7e          {
00545a75              *(uint32_t*)(*(uint32_t*)(*(int32_t*)((char*)ADJ(eax_1) + 0x28) + (i_1 << 2)) + 4) = 0;
00545a7b              i_1 += 1;
00545a7e          } while (i_1 < *(int32_t*)((char*)ADJ(eax_1) + 0x30));
00545a6c      }
00545a6c      
00545a89      bool cond:1 = (*(int32_t*)((char*)ADJ(eax_1) + 0x2c) & 0x80000000) != 0x80000000;
00545a8f      *(int32_t*)((char*)ADJ(eax_1) + 0x30) = 0;
00545a8f      
00545a92      if (!(cond:1))
00545a97          operator delete[](*(int32_t*)((char*)ADJ(eax_1) + 0x28));
00545a97      
00545a9f      int32_t edi_1 = -(edi);
00545aa7      CAsyncStateHandler::~CAsyncStateHandler(((edi_1 - edi_1) & this));
00545ab2      /* tailcall */
00545ab2      return SharedNet::~SharedNet(((char*)this - 0x8888));
005459d0  }

00545ab7                                                                       90 90 90 90 90 90 90 90 90                         .........

00545ac0  void __thiscall ClientNet::HandleConnectionRequest(class ClientNet* this, class CConnectHeader const* arg2, class CNetLayerPacket const* arg3)

00545ac0  {
00545ac4      class CNetLayerPacket* ebx = arg3;
00545ac9      class ReceiverData* m_pRecv = ebx->m_pRecv;
00545ac9      
00545ad8      if (m_pRecv->m_RecID == 0)
00545ad8          goto label_545b29;
00545ad8      
00545adc      uint16_t iteration_ = m_pRecv->iteration_;
00545ae2      uint16_t iteration__1 = ebx->m_Hdr.iteration_;
00545ae2      
00545aec      if (iteration__1 != iteration_)
00545aec      {
00545af4          uint16_t edx_2 = (iteration__1 - iteration_);
00545af9          int32_t edi_1 = 1;
00545af9          
00545afe          if (iteration__1 < iteration_)
00545afe          {
00545b02              edx_2 = (iteration_ - iteration__1);
00545b04              edi_1 = 0xffffffff;
00545afe          }
00545afe          
00545b0c          if (edx_2 > 0x7fff)
00545b0e              edi_1 = -(edi_1);
00545b0e          
00545b12          if (edi_1 > 0)
00545b12          {
00545b24              ClientNet::RemoveConnection(this, ebx->m_Hdr.recID_);
00545b29          label_545b29:
00545b29              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00545b2e              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00545b36              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00545b4a              NetUtils::GetIPString(&ebx->m_Addr, &AC1Legacy::PStringBase<char>::s_NullBuffer_2, 0);
00545b51              void* eax_4 = operator new(0x18);
00545b51              
00545b5b              if (eax_4 == 0)
00545b6e                  arg3 = nullptr;
00545b5b              else
00545b68                  arg3 = NetKeyExch::NetKeyExch(eax_4, *(int32_t*)((char*)this + 0x14));
00545b68              
00545b86              void var_c;
00545b86              NetKeyExch::SetPrivateRandom(arg3, AC1Legacy::vlong::vlong(&var_c, 0xa));
00545b8f              AC1Legacy::vlong::~vlong(&var_c);
00545bcc              int32_t eax_9;
00545bcc              eax_9 = ebx->m_Addr.sin_family;
00545bcc              *(uint16_t*)((char*)eax_9)[2] = ebx->m_Addr.sin_port;
00545bda              union in_addr::__unnamed S_un = ebx->m_Addr.sin_addr.S_un;
00545bdd              int32_t eax_11;
00545bdd              eax_11 = ebx->m_Addr.sin_zero[0];
00545bdd              *(uint8_t*)((char*)eax_11)[1] = ebx->m_Addr.sin_zero[1];
00545bdd              *(uint8_t*)((char*)eax_11)[2] = ebx->m_Addr.sin_zero[2];
00545bdd              *(uint8_t*)((char*)eax_11)[3] = ebx->m_Addr.sin_zero[3];
00545be0              int32_t ecx_9;
00545be0              ecx_9 = ebx->m_Addr.sin_zero[4];
00545be0              *(uint8_t*)((char*)ecx_9)[1] = ebx->m_Addr.sin_zero[5];
00545be0              *(uint8_t*)((char*)ecx_9)[2] = ebx->m_Addr.sin_zero[6];
00545be0              *(uint8_t*)((char*)ecx_9)[3] = ebx->m_Addr.sin_zero[7];
00545be3              int32_t var_48_1 = eax_11;
00545be6              int32_t var_44_1 = ecx_9;
00545beb              ReceiverData::Init(m_pRecv, eax_9, 1, ebx->m_Hdr.recID_, arg2->m_Data.NetID, ebx->m_Hdr.iteration_, ebx->m_Hdr.interval_, arg3, arg2->m_Data.OutgoingSeed, arg2->m_Data.IncomingSeed);
00545bf0              int32_t eax_12;
00545bf0              eax_12 = ebx->m_Addr.sin_family;
00545bf0              *(uint16_t*)((char*)eax_12)[2] = ebx->m_Addr.sin_port;
00545c04              int32_t eax_13;
00545c04              eax_13 = ebx->m_Addr.sin_zero[0];
00545c04              *(uint8_t*)((char*)eax_13)[1] = ebx->m_Addr.sin_zero[1];
00545c04              *(uint8_t*)((char*)eax_13)[2] = ebx->m_Addr.sin_zero[2];
00545c04              *(uint8_t*)((char*)eax_13)[3] = ebx->m_Addr.sin_zero[3];
00545c07              union in_addr::__unnamed S_un_1 = ebx->m_Addr.sin_addr.S_un;
00545c0a              int32_t ecx_12;
00545c0a              ecx_12 = ebx->m_Addr.sin_zero[4];
00545c0a              *(uint8_t*)((char*)ecx_12)[1] = ebx->m_Addr.sin_zero[5];
00545c0a              *(uint8_t*)((char*)ecx_12)[2] = ebx->m_Addr.sin_zero[6];
00545c0a              *(uint8_t*)((char*)ecx_12)[3] = ebx->m_Addr.sin_zero[7];
00545c0d              int32_t var_38_2 = eax_13;
00545c10              int32_t var_34_2 = ecx_12;
00545c24              PacketController::AddRecipient(PacketController::Instance(), ebx->m_Hdr.recID_, eax_12, 0, 0f, 0, 0);
00545c39              ReceiverData::AddToQueue(m_pRecv, &*(int32_t*)((char*)this + 0x8820), &*(int32_t*)((char*)this + 0x8824));
00545c3e              m_pRecv->m_NakState = NO_NAK_STATE;
00545c3e              
00545c4d              if (this->logonRecID_ == 0)
00545c4d              {
00545c56                  this->logonRecID_ = ebx->m_Hdr.recID_;
00545c64                  this->currServerRecID_ = ebx->m_Hdr.recID_;
00545c4d              }
00545c4d              
00545c71              uint32_t i = 0;
00545c71              
00545c75              if (this->m_ReferralQueue.m_num > 0)
00545c75              {
00545c7d                  struct sockaddr_in* edi_2;
00545c7d                  edi_2 = ebx->m_Hdr.recID_;
00545c8a                  int16_t* eax_19 = &this->m_ReferralQueue.m_data->idServer;
00545c8a                  
00545c9f                  do
00545c9f                  {
00545c93                      if (*(uint16_t*)eax_19 == edi_2)
00545c93                      {
00545ca4                          SmartArray<ClientNet::CReferralQueueEntry,1>::RemoveUnOrderedByIndex(&this->m_ReferralQueue, i);
00545ca4                          break;
00545c93                      }
00545c93                      
00545c95                      i += 1;
00545c96                      eax_19 = &eax_19[0x14];
00545c9f                  } while (i < this->m_ReferralQueue.m_num);
00545c75              }
00545c75              
00545cb0              m_pRecv->m_qwReferralCookie = arg2->m_Data.qwCookie;
00545cb8              *(uint32_t*)((char*)m_pRecv->m_qwReferralCookie)[4] = *(uint32_t*)((char*)arg2->m_Data.qwCookie)[4];
00545cbb              int32_t ecx_19;
00545cbb              ecx_19 = ebx->m_Hdr.recID_;
00545cc9              *(int32_t*)((char*)this->vtable + 0x3c)(ecx_19, 4);
00545ccf              ClientNet::SendConnectAck(this, m_pRecv);
00545cd4              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00545cd4              
00545cea              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
00545cec                  AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
00545b12          }
00545aec      }
00545ac0  }

00545cfe                                                                                            90 90                                ..

00545d00  void* __thiscall ClientNet::`vector deleting destructor'(class ClientNet* this, uint32_t arg2)

00545d00  {
00545d03      ClientNet::~ClientNet(this);
00545d0d      void* __offset(ClientNet, -0x8888) result = ((char*)this - 0x8888);
00545d0d      
00545d13      if ((arg2 & 1) == 0)
00545d25          return result;
00545d25      
00545d16      operator delete(result);
00545d1e      return ((char*)this - 0x8888);
00545d00  }

00545d28                          90 90 90 90 90 90 90 90                                                          ........

00545d30  void __thiscall ClientNet::HandleReferral(class ClientNet* this, class COnePrimHeader<2048,1073741922,CReferralStruct> const* arg2)

00545d30  {
00545d39      int32_t ebx;
00545d39      ebx = arg2->m_Prim.idServer;
00545d39      
00545d5b      if ((ebx < 0x100 && ((((uint32_t)ebx) * 0x88) + this) != 0xffffffe0))
00545d5b      {
00545d65          if (*(uint32_t*)(((((uint32_t)ebx) * 0x88) + this) + 0x68) > 5)
00545d6f              ClientNet::RemoveConnection(this, *(uint16_t*)(((((uint32_t)ebx) * 0x88) + this) + 0x20));
00545d6f          
00545d78          if (*(uint16_t*)(((((uint32_t)ebx) * 0x88) + this) + 0x20) == 0)
00545d78          {
00545d7e              uint32_t m_num = this->m_ReferralQueue.m_num;
00545d84              int32_t ecx_2 = 0;
00545d84              
00545d88              if (m_num > 0)
00545d88              {
00545d90                  uint16_t* eax_4 = &this->m_ReferralQueue.m_data->idServer;
00545d90                  
00545d9e                  do
00545d9e                  {
00545d96                      if (ADJ(eax_4)->idServer == ebx)
00545e1d                          return;
00545e1d                      
00545d98                      ecx_2 += 1;
00545d99                      eax_4 = &eax_4[0x14];
00545d9e                  } while (ecx_2 < m_num);
00545d88              }
00545d88              
00545da3              int32_t eax_5;
00545da3              eax_5 = arg2->m_Prim.Addr.sin_family;
00545da3              *(uint16_t*)((char*)eax_5)[2] = arg2->m_Prim.Addr.sin_port;
00545da8              int32_t var_18 = eax_5;
00545dac              int32_t eax_6;
00545dac              eax_6 = arg2->m_Prim.Addr.sin_zero[0];
00545dac              *(uint8_t*)((char*)eax_6)[1] = arg2->m_Prim.Addr.sin_zero[1];
00545dac              *(uint8_t*)((char*)eax_6)[2] = arg2->m_Prim.Addr.sin_zero[2];
00545dac              *(uint8_t*)((char*)eax_6)[3] = arg2->m_Prim.Addr.sin_zero[3];
00545daf              union in_addr::__unnamed S_un = arg2->m_Prim.Addr.sin_addr.S_un;
00545db3              int32_t ecx_4;
00545db3              ecx_4 = arg2->m_Prim.Addr.sin_zero[4];
00545db3              *(uint8_t*)((char*)ecx_4)[1] = arg2->m_Prim.Addr.sin_zero[5];
00545db3              *(uint8_t*)((char*)ecx_4)[2] = arg2->m_Prim.Addr.sin_zero[6];
00545db3              *(uint8_t*)((char*)ecx_4)[3] = arg2->m_Prim.Addr.sin_zero[7];
00545db9              int32_t var_c = ecx_4;
00545dc1              int32_t var_10 = eax_6;
00545dcf              int32_t var_20 = 0;
00545dd7              int32_t var_1c = 0;
00545ddf              int32_t var_8 = arg2->m_Prim.qwCookie;
00545de3              int32_t var_4 = *(uint32_t*)((char*)arg2->m_Prim.qwCookie)[4];
00545de7              int32_t var_28 = 0;
00545def              int16_t var_24 = ebx;
00545df4              SmartArray<ClientNet::CReferralQueueEntry,1>::AddToEnd(&this->m_ReferralQueue, &var_28);
00545dfb              ClientNet::ProcessReferralQueue(this);
00545e07              return;
00545d78          }
00545d78          
00545e0d          *(uint32_t*)(((((uint32_t)ebx) * 0x88) + this) + 0x90) = arg2->m_Prim.qwCookie;
00545e13          *(uint32_t*)(((((uint32_t)ebx) * 0x88) + this) + 0x94) = *(uint32_t*)((char*)arg2->m_Prim.qwCookie)[4];
00545d5b      }
00545d30  }


00545e20  uint8_t PerfMonCounterFactory::CreateNewCounter(class PerfMonCounter<unsigned __int64>** arg1, enum PerfMonCounterInfo::EPerfCounterType arg2, class PStringBase<unsigned short> const* arg3, class PStringBase<unsigned short> const* arg4, uint16_t const arg5)

00545e20  {
00545e23      void* eax = operator new(0x28);
00545e23      
00545e2f      if (eax == 0)
00545e2f      {
00545e75          *(uint32_t*)arg1 = nullptr;
00545e77          eax = false;
00545e7b          return 0;
00545e2f      }
00545e2f      
00545e47      PerfMonCounterInfo::PerfMonCounterInfo(eax, arg2, arg3, arg4, arg5);
00545e50      *(uint32_t*)eax = 0x7c9e94;
00545e56      *(uint32_t*)((char*)eax + 0x20) = 0;
00545e5d      *(uint32_t*)((char*)eax + 0x24) = 0;
00545e66      *(uint32_t*)arg1 = eax;
00545e6c      return eax != 0;
00545e20  }

00545e7c                                                                                      90 90 90 90                              ....

00545e80  void __fastcall SharedNet::SharedNet(class SharedNet* this, uint16_t arg2)

00545e80  {
00545e84      class PStringBase<unsigned short> esi;
00545e84      class PStringBase<unsigned short> var_24 = esi;
00545e8b       = &SharedNet::`vftable';
00545e91      NetInitializer::NetInitializer(&*(int32_t*)((char*)this + 8));
00545e99      *(int32_t*)((char*)this + 0xc) = 0xffffffff;
00545e9c      *(int32_t*)((char*)this + 0x10) = 0xffffffff;
00545ea4      *(int32_t*)((char*)this + 0x18) = arg2;
00545ea8      void* __offset(SharedNet, 0x20) edi_1 = &*(int32_t*)((char*)this + 0x20);
00545eab      int32_t i_1 = 0x100;
00545ebe      int32_t i;
00545ebe      
00545ebe      do
00545ebe      {
00545eb2          ReceiverData::ReceiverData(edi_1);
00545eb7          edi_1 += 0x88;
00545ebd          i = i_1;
00545ebd          i_1 -= 1;
00545ebe      } while (i != 1);
00545ec2      *(int32_t*)((char*)this + 0x8820) = 0;
00545ec8      *(int32_t*)((char*)this + 0x8824) = 0;
00545ece      *(int32_t*)((char*)this + 0x8828) = 0;
00545ed4      *(int32_t*)((char*)this + 0x882c) = 0;
00545eda      *(int32_t*)((char*)this + 0x8834) = 0x32;
00545eea      *(int32_t*)((char*)this + 0x8830) = GetTickCount();
00545ef0      __builtin_memset(&*(int32_t*)((char*)this + 0x886c), 0, 0x14);
00545f0e      uint32_t var_2c = 0;
00545f13      SharedNet::s_pNet = this;
00545f19      class PStringBase<unsigned short> var_c;
00545f19      AC1Legacy::vlong::vlong(&var_c, var_2c);
00545f1e      var_2c = 0;
00545f23      void var_18;
00545f23      AC1Legacy::vlong::vlong(&var_18, var_2c);
00545f28      var_2c = 0x18;
00545f2a      void* eax_2 = operator new(var_2c);
00545f36      void* eax_3;
00545f36      
00545f36      if (eax_2 == 0)
00545f4d          eax_3 = nullptr;
00545f36      else
00545f36      {
00545f38          var_2c = 0;
00545f3b          AC1Legacy::vlong::vlong(eax_2, var_2c);
00545f40          var_2c = 0;
00545f44          AC1Legacy::vlong::vlong(((char*)eax_2 + 0xc), var_2c);
00545f49          eax_3 = eax_2;
00545f36      }
00545f36      
00545f4f      uint32_t ebp;
00545f4f      var_2c = ebp;
00545f50      char const* const var_30 = "dd80c2e508b630998076a9f7319c930d…";
00545f59      *(int32_t*)((char*)this + 0x14) = eax_3;
00545f5c      AC1Legacy::vlong::read_from_hex_string(&var_c, var_30);
00545f6a      AC1Legacy::vlong::read_from_hex_string(&var_18, "dd80c2e508b630998076a9f7319c930d…");
00545f73      void* var_30_2 = &var_18;
00545f74      class PortalDH* ecx_8 = *(int32_t*)((char*)this + 0x14);
00545f7b      class AC1Legacy::vlong* var_34 = &var_c;
00545f7c      PortalDH::Init(ecx_8, var_34, var_30_2);
00545f85      AC1Legacy::vlong::~vlong(&var_18);
00545f8e      AC1Legacy::vlong::~vlong(&var_c);
00545fa0      __builtin_memset(&*(int32_t*)((char*)this + 0x8838), 0, 0x20);
00545fad      wchar16 const* const var_30_3 = u"Bytes sent via 'sendto' calls.";
00545fb2      *(int32_t*)((char*)this + 0x8880) = CNetLayerPacket::Create();
00545fc2      class PStringBase<unsigned short> var_1c;
00545fc2      PStringBase<unsigned short>::allocate_ref_buffer(&var_1c, wcslen(var_30_3));
00545fd1      wchar16 const* const var_30_5 = u"Bytes sent via 'sendto' calls.";
00545fd6      var_34 = var_1c;
00545fd7      wcscpy(var_34, var_30_5);
00545fe8      PStringBase<unsigned short>::allocate_ref_buffer(&arg2, wcslen(u"Net - Bytes sent/sec"));
00545ff1      wchar16 const* const var_30_7 = u"Net - Bytes sent/sec";
00545ff6      var_34 = arg2;
00545ff7      wcscpy(var_34, var_30_7);
00545ffd      uint16_t var_38_1 = 9;
00545fff      class PStringBase<unsigned short> var_3c = &arg2;
00546006      class PerfMonCounterInfo* eax_8 = PerfMonCounterInfo::LookupExistingCounterByName(var_3c, var_38_1);
00546006      
00546010      if (eax_8 == 0)
00546010      {
00546017          uint16_t var_30_8 = 9;
0054601d          var_34 = &var_1c;
00546022          class PStringBase<unsigned short>* var_38_2 = &arg2;
00546023          var_3c = 2;
00546026          PerfMonCounterFactory::CreateNewCounter(&*(int32_t*)((char*)this + 0x8858), var_3c, var_38_2, var_34, var_30_8);
00546010      }
00546010      else
00546012          *(int32_t*)((char*)this + 0x8858) = eax_8;
00546012      
00546032      int32_t* ebp_3 = (arg2 - 0x14);
00546032      
00546045      if ((InterlockedDecrement(&ebp_3[1]) == 0 && ebp_3 != 0))
00546045      {
00546047          int32_t eax_10 = *(uint32_t*)ebp_3;
0054604a          var_34 = 1;
0054604e          *(uint32_t*)eax_10(var_34);
00546045      }
00546045      
0054605a      void* ebx;
0054605a      var_34 = ((char*)ebx - 0x10);
0054605a      
00546067      if ((InterlockedDecrement(var_34) == 0 && ebx != 0x14))
00546070          **(uint32_t**)((char*)ebx - 0x14)(1);
00546070      
00546081      PStringBase<unsigned short>::allocate_ref_buffer(&var_24, wcslen(u"Bytes received."));
0054608a      wchar16 const* const var_38_6 = u"Bytes received.";
0054608f      var_3c = var_24;
00546090      wcscpy(var_3c, var_38_6);
005460a1      class PStringBase<unsigned short> var_4;
005460a1      PStringBase<unsigned short>::allocate_ref_buffer(&var_4, wcslen(u"Net - Bytes received/sec"));
005460aa      wchar16 const* const var_38_8 = u"Net - Bytes received/sec";
005460af      var_3c = var_4;
005460b0      wcscpy(var_3c, var_38_8);
005460bf      class PerfMonCounterInfo* eax_15 = PerfMonCounterInfo::LookupExistingCounterByName(&var_4, 9);
005460bf      
005460c9      if (eax_15 == 0)
005460c9      {
005460d0          uint16_t var_38_9 = 9;
005460d6          var_3c = &var_24;
005460df          PerfMonCounterFactory::CreateNewCounter(&*(int32_t*)((char*)this + 0x885c), PER_SEC, &var_4, var_3c, var_38_9);
005460c9      }
005460c9      else
005460cb          *(int32_t*)((char*)this + 0x885c) = eax_15;
005460cb      
005460eb      int32_t* ebp_8 = (var_4 - 0x14);
005460eb      
005460fe      if ((InterlockedDecrement(&ebp_8[1]) == 0 && ebp_8 != 0))
005460fe      {
00546100          int32_t eax_17 = *(uint32_t*)ebp_8;
00546103          var_3c = 1;
00546107          *(uint32_t*)eax_17(var_3c);
005460fe      }
005460fe      
00546113      void* edi;
00546113      var_3c = ((char*)edi - 0x10);
00546113      
00546120      if ((InterlockedDecrement(var_3c) == 0 && edi != 0x14))
00546129          **(uint32_t**)((char*)edi - 0x14)(1);
00546129      
0054613a      PStringBase<unsigned short>::allocate_ref_buffer(&var_2c, wcslen(u"Packet rejection rate."));
00546149      wcscpy(var_2c, u"Packet rejection rate.");
0054615a      PStringBase<unsigned short>::allocate_ref_buffer(&var_c, wcslen(u"Net - Bad packets received/sec"));
00546169      wcscpy(var_c, u"Net - Bad packets received/sec");
00546178      class PerfMonCounterInfo* eax_22 = PerfMonCounterInfo::LookupExistingCounterByName(&var_c, 9);
00546178      
00546182      if (eax_22 == 0)
00546198          PerfMonCounterFactory::CreateNewCounter(&*(int32_t*)((char*)this + 0x8860), PER_SEC, &var_c, &var_2c, 9);
00546182      else
00546184          *(int32_t*)((char*)this + 0x8860) = eax_22;
00546184      
005461a4      int32_t* ebp_13 = (var_c - 0x14);
005461a4      
005461b7      if ((InterlockedDecrement(&ebp_13[1]) == 0 && ebp_13 != 0))
005461c0          **(uint32_t**)ebp_13(1);
005461c0      
005461d9      if ((InterlockedDecrement(&ebp_3[-3]) == 0 && ebp_3 != 0x10))
005461e2          *(uint32_t*)ebp_3[-4](1);
005461e2      
005461f3      PStringBase<unsigned short>::allocate_ref_buffer(&var_34, wcslen(u"Total rejected packets."));
00546202      wcscpy(var_34, u"Total rejected packets.");
00546213      class PStringBase<unsigned short> var_14;
00546213      PStringBase<unsigned short>::allocate_ref_buffer(&var_14, wcslen(u"Net - Total bad packets received"));
00546222      wcscpy(var_14, u"Net - Total bad packets received");
00546231      class PerfMonCounterInfo* eax_29 = PerfMonCounterInfo::LookupExistingCounterByName(&var_14, 9);
00546231      
0054623b      if (eax_29 == 0)
00546251          PerfMonCounterFactory::CreateNewCounter(&*(int32_t*)((char*)this + 0x8864), NORMAL, &var_14, &var_34, 9);
0054623b      else
0054623d          *(int32_t*)((char*)this + 0x8864) = eax_29;
0054623d      
0054625d      int32_t* ebp_18 = (var_14 - 0x14);
0054625d      
00546270      if ((InterlockedDecrement(&ebp_18[1]) == 0 && ebp_18 != 0))
00546279          **(uint32_t**)ebp_18(1);
00546279      
00546292      if ((InterlockedDecrement(&ebp_8[-3]) == 0 && ebp_8 != 0x10))
0054629b          *(uint32_t*)ebp_8[-4](1);
0054629b      
005462ac      PStringBase<unsigned short>::allocate_ref_buffer(&var_3c, wcslen(u"Rate at which we have had to re-…"));
005462bb      wcscpy(var_3c, u"Rate at which we have had to re-…");
005462cc      PStringBase<unsigned short>::allocate_ref_buffer(&var_1c, wcslen(u"Net - Packets retransmitted/sec"));
005462db      wcscpy(var_1c, u"Net - Packets retransmitted/sec");
005462ea      class PerfMonCounterInfo* eax_36 = PerfMonCounterInfo::LookupExistingCounterByName(&var_1c, 9);
005462ea      
005462f5      if (eax_36 == 0)
0054630a          PerfMonCounterFactory::CreateNewCounter(&*(int32_t*)((char*)this + 0x8868), PER_SEC, &var_1c, &var_3c, 9);
005462f5      else
005462f7          *(int32_t*)((char*)this + 0x8868) = eax_36;
005462f7      
0054631c      int32_t* edi_6 = (var_1c - 0x14);
0054631c      
0054632b      if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
00546333          **(uint32_t**)edi_6(1);
00546333      
00546348      if ((InterlockedDecrement(&ebp_13[-3]) == 0 && ebp_13 != 0x10))
00546350          *(uint32_t*)ebp_13[-4](1);
00545e80  }

0054635d                                                                                         90 90 90                               ...

00546360  void __fastcall ClientNet::ClientNet(class ClientNet* this)

00546360  {
00546366      int32_t var_14 = 0;
00546369      uint16_t edx;
00546369      SharedNet::SharedNet(this, edx);
00546377      CAsyncStateHandler::CAsyncStateHandler(&this->vtable, 0);
0054636e      this->vtable = &CClientsideLoginStateHandler::`vftable';
00546383      this->m_Plugins.m_data = 0;
00546389      this->m_Plugins.m_sizeAndDeallocate = 0;
0054638f      this->m_Plugins.m_num = 0;
00546395      this->vtable = 0x7ca160;
0054636e      this->vtable = &ClientNet::`vftable';
005463a2      this->m_LogonData.hCurrentContext.m_id = 0;
005463a2      this->m_LogonData.FailureReason.vtable = 0x794878;
005463b7      CAsyncStateMachine::CAsyncStateMachine(&this->m_ConnectionFSM);
005463bc      __builtin_memset(&this->m_ReferralQueue, 0, 0x18);
005463e8      this->m_LogonSwitchHistory.LastSwitchStamp.m_timestamp = 0;
005463f4      this->logOffSent_ = 0;
005463fa      this->fCurrentlyInGame_ = 0;
00546400      CLinkStatusAverages::CLinkStatusAverages(&this->m_LinkStatusAverages);
0054640c      __builtin_memset(&this->m_LogonData, 0, 0x30);
00546414      srand(Timer::get_real_time());
0054641d      FlowQueue::SharedStaticInit();
00546429      CAsyncStateMachine::AddStateHandler(&this->m_ConnectionFSM, &this->vtable);
00546360  }

00546435                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00546440  void __thiscall CLinkStatusAverages::CAverager<float,4>::AddSample(class CLinkStatusAverages::CAverager<float,4>* this, float arg2)

00546440  {
00546440      uint16_t m_nSamples = this->m_nSamples;
00546440      
00546448      if (m_nSamples != 4)
00546448      {
0054648e          this->m_Samples[((uint32_t)m_nSamples)] = ((float)((long double)arg2));
00546491          this->m_nSamples += 1;
0054649c          this->m_CurTotal = ((double)(((long double)arg2) + ((long double)this->m_CurTotal)));
0054649f          return;
00546448      }
00546448      
0054644a      uint32_t m_idxFirst = ((uint32_t)this->m_idxFirst);
0054645b      this->m_CurTotal = ((double)(((long double)this->m_CurTotal) - ((long double)this->m_Samples[m_idxFirst])));
00546458      this->m_Samples[m_idxFirst] = arg2;
00546460      void* eax;
00546460      eax = this->m_idxFirst;
00546464      eax += 1;
00546469      int32_t edx_2 = (((uint32_t)eax) & 0x80000003);
00546469      
0054646f      if (edx_2 < 0)
00546475          edx_2 = (((edx_2 - 1) | 0xfffffffc) + 1);
00546475      
0054647a      this->m_idxFirst = edx_2;
00546481      this->m_CurTotal = ((double)(((long double)arg2) + ((long double)this->m_CurTotal)));
00546440  }

005464a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005464b0  void __thiscall CLinkStatusAverages::CAverager<unsigned short,40>::AddSample(class CLinkStatusAverages::CAverager<unsigned short,40>* this, uint16_t arg2)

005464b0  {
005464b0      class CLinkStatusAverages::CAverager<unsigned short,40>* this_1 = this;
005464b1      uint16_t m_nSamples = this->m_nSamples;
005464ba      int32_t esi;
005464ba      esi = arg2;
005464ba      
005464bf      if (m_nSamples != 0x28)
005464bf      {
005464f9          this->m_Samples[((uint32_t)m_nSamples)] = esi;
005464fd          this->m_nSamples += 1;
005464bf      }
005464bf      else
005464bf      {
005464c1          uint32_t m_idxFirst = ((uint32_t)this->m_idxFirst);
005464dd          this->m_CurTotal = ((double)(((long double)this->m_CurTotal) - ((long double)((uint32_t)this->m_Samples[m_idxFirst]))));
005464c9          this->m_Samples[m_idxFirst] = esi;
005464e3          void* eax;
005464e3          eax = this->m_idxFirst;
005464e7          eax += 1;
005464f0          this->m_idxFirst = ((int16_t)(((int64_t)((uint32_t)eax)) % 0x28));
005464bf      }
005464bf      
00546504      arg2 = ((uint32_t)esi);
00546510      this->m_CurTotal = ((double)(((long double)arg2) + ((long double)this->m_CurTotal)));
005464b0  }

00546517                                                                       90 90 90 90 90 90 90 90 90                         .........

00546520  void __thiscall CLinkStatusAverages::CAverager<unsigned long,2>::AddSample(class CLinkStatusAverages::CAverager<unsigned long,2>* this, uint32_t arg2)

00546520  {
00546520      class CLinkStatusAverages::CAverager<unsigned long,2>* this_1 = this;
00546521      uint16_t m_nSamples = this->m_nSamples;
00546529      uint32_t edx_1;
00546529      
00546529      if (m_nSamples != 2)
00546529      {
00546569          edx_1 = arg2;
00546570          this->m_Samples[((uint32_t)m_nSamples)] = edx_1;
00546573          this->m_nSamples += 1;
00546529      }
00546529      else
00546529      {
0054652b          uint32_t m_idxFirst = ((uint32_t)this->m_idxFirst);
00546532          long double x87_r7_1 = ((long double)this->m_Samples[m_idxFirst]);
00546532          
0054653a          if (this->m_Samples[m_idxFirst] < 0)
0054653c              x87_r7_1 = (x87_r7_1 + ((long double)4294967296.0));
0054653c          
00546545          edx_1 = arg2;
00546549          this->m_CurTotal = ((double)(((long double)this->m_CurTotal) - x87_r7_1));
00546537          this->m_Samples[m_idxFirst] = edx_1;
0054654e          void* eax;
0054654e          eax = this->m_idxFirst;
00546552          eax += 1;
00546557          int32_t eax_2 = (((uint32_t)eax) & 0x80000001);
00546557          
0054655c          if (eax_2 < 0)
00546562              eax_2 = (((eax_2 - 1) | 0xfffffffe) + 1);
00546562          
00546563          this->m_idxFirst = eax_2;
00546529      }
00546529      
0054657d      long double x87_r7_3 = ((long double)edx_1);
0054657d      
00546581      if (edx_1 < 0)
00546583          x87_r7_3 = (x87_r7_3 + ((long double)4294967296.0));
00546583      
0054658c      this->m_CurTotal = ((double)(x87_r7_3 + ((long double)this->m_CurTotal)));
00546520  }

00546593                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005465a0  void __thiscall CLinkStatusAverages::CAverager<double,2>::AddSample(class CLinkStatusAverages::CAverager<double,2>* this, double arg2)

005465a0  {
005465a0      uint16_t m_nSamples = this->m_nSamples;
005465a0      
005465a8      if (m_nSamples != 2)
005465a8      {
005465f7          this->m_Samples[((uint32_t)m_nSamples)] = ((double)((long double)arg2));
005465fa          this->m_nSamples += 1;
00546605          this->m_CurTotal = ((double)(((long double)arg2) + ((long double)this->m_CurTotal)));
00546608          return;
005465a8      }
005465a8      
005465aa      uint32_t m_idxFirst = ((uint32_t)this->m_idxFirst);
005465b8      void* eax = &this->m_Samples[m_idxFirst];
005465c0      this->m_CurTotal = ((double)(((long double)this->m_CurTotal) - ((long double)this->m_Samples[m_idxFirst])));
005465c3      *(uint32_t*)eax = arg2;
005465c5      *(uint32_t*)((char*)eax + 4) = *(uint32_t*)((char*)arg2)[4];
005465c8      eax = this->m_idxFirst;
005465cc      eax += 1;
005465d1      int32_t edx_2 = (((uint32_t)eax) & 0x80000001);
005465d1      
005465d7      if (edx_2 < 0)
005465dd          edx_2 = (((edx_2 - 1) | 0xfffffffe) + 1);
005465dd      
005465e2      this->m_idxFirst = edx_2;
005465ea      this->m_CurTotal = ((double)(((long double)arg2) + ((long double)this->m_CurTotal)));
005465a0  }

0054660b                                   90 90 90 90 90                                                             .....

00546610  int32_t __fastcall CLinkStatusAverages::GetAveragePacketLoss(class CLinkStatusAverages const* this)

00546610  {
00546616      long double x87_r7 = (((long double)this->m_nPktsReceived.m_CurTotal) + ((long double)this->m_nPktsSent.m_CurTotal));
0054661c      long double temp0 = ((long double)0.0);
0054661c      (x87_r7 - temp0);
00546622      int32_t result;
00546622      result = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
00546624      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00546624      
00546627      if (!(p))
00546631          return result;
00546631      
00546638      (((long double)this->m_nPktsNAKed.m_CurTotal) + ((long double)this->m_nPktsRetransmitted.m_CurTotal));
00546642      return result;
00546610  }

00546643           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00546650  void __thiscall CLinkStatusAverages::AddSnapshot(class CLinkStatusAverages* this, struct CLinkStatusSnapshot const* arg2)

00546650  {
00546653      long double x87_r7 = ((long double)Timer::local_time);
0054665f      long double x87_r6 = ((long double)arg2->SnapshotDuration);
00546664      double var_8 = ((double)x87_r6);
00546669      long double x87_r5 = ((long double)this->m_LocalTimeOfSnapshot);
0054666d      long double temp1 = ((long double)0.0);
0054666d      (x87_r5 - temp1);
00546673      int32_t eax;
00546673      eax = ((((x87_r5 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5, temp1))) ? 1 : 0) << 0xa) | ((((x87_r5 == temp1) ? 1 : 0) << 0xe) | 0x3000))));
00546675      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00546675      
00546678      if (!(p))
00546678      {
00546689          x87_r7 = x87_r6;
0054668b          var_8 = 0;
00546693          *(uint32_t*)((char*)var_8)[4] = 0x3ff00000;
00546678      }
00546678      else
00546678      {
0054667a          long double temp2_1 = ((long double)0.0);
0054667a          (x87_r6 - temp2_1);
00546680          eax = ((((x87_r6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r6 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
00546682          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00546682          
00546685          if (!(p_1))
00546685          {
0054668b              var_8 = 0;
00546693              *(uint32_t*)((char*)var_8)[4] = 0x3ff00000;
00546685          }
00546678      }
00546678      
005466a4      __builtin_memcpy(this, arg2, 0x1c);
005466a6      this->m_LocalTimeOfSnapshot = ((double)x87_r7);
005466b3      CLinkStatusAverages::CAverager<unsigned short,40>::AddSample(&this->m_nPktsSent, arg2->nPktsSent);
005466c5      CLinkStatusAverages::CAverager<unsigned short,40>::AddSample(&this->m_nPktsRetransmitted, arg2->nPktsRetransmitted);
005466d7      CLinkStatusAverages::CAverager<unsigned short,40>::AddSample(&this->m_nPktsReceived, arg2->nPktsReceived);
005466e9      CLinkStatusAverages::CAverager<unsigned short,40>::AddSample(&this->m_nPktsNAKed, arg2->nPktsNAKed);
005466f8      CLinkStatusAverages::CAverager<unsigned long,2>::AddSample(&this->m_nBytesSent, arg2->nBytesSent);
00546707      CLinkStatusAverages::CAverager<unsigned long,2>::AddSample(&this->m_nBytesReceived, arg2->nBytesReceived);
00546714      int32_t var_1c_6 = *(uint32_t*)((char*)var_8)[4];
0054671c      CLinkStatusAverages::CAverager<double,2>::AddSample(&this->m_TimeDiffs.m_Samples, var_8);
00546650  }

0054672b                                   90 90 90 90 90                                                             .....

00546730  void __thiscall CLinkStatusAverages::OnPingResponse(class CLinkStatusAverages* this, float arg2)

00546730  {
00546733      /* tailcall */
00546733      return CLinkStatusAverages::CAverager<float,4>::AddSample(&this->m_RoundTripDelays, arg2);
00546730  }

00546738                                                                          90 90 90 90 90 90 90 90                          ........

00546740  int32_t Proto_UI::SendBlob(class NetBlob* arg1)

00546740  {
00546750      if ((PacketController::Instance() == 0 || arg1 == 0))
00546755          return 0;
00546755      
00546756      uint32_t queueID_ = ((uint32_t)arg1->queueID_);
0054675a      class SharedNet* SharedNet::s_pNet_1 = SharedNet::s_pNet;
00546760      char ecx = 0;
00546766      int32_t ebp;
00546766      ebp = *(int32_t*)((char*)SharedNet::s_pNet_1 + 0x8a6e);
00546766      
00546777      if ((queueID_ >= 4 && (queueID_ <= 5 || queueID_ == 8)))
00546777      {
00546779          ebp = *(int32_t*)((char*)SharedNet::s_pNet_1 + 0x8a6c);
00546780          ecx = 1;
00546777      }
00546777      
00546788      if ((arg1->id | *(uint32_t*)((char*)arg1->id)[4]) == 0)
00546788      {
00546790          int32_t ebx_1 = 0x23000000;
00546790          
00546795          if (ecx == 0)
00546797              ebx_1 = 0x3000000;
00546797          
005467a2          int32_t eax_4;
005467a2          int32_t edx;
005467a2          eax_4 = NetInterface::GetNonEphemeralID(NetInterface::netInterface_);
005467b0          int32_t var_14_1 = edx;
005467b3          int32_t var_20_1 = ebx_1;
005467b5          int32_t eax_5;
005467b5          int32_t edx_1;
005467b5          eax_5 = NetBlobIDUtils::MakeNetBlobID(0, Proto_UI::m_UnorderedStamp, eax_4);
005467bd          Proto_UI::m_UnorderedStamp += 1;
005467c5          arg1->id = eax_5;
005467c8          *(uint32_t*)((char*)arg1->id)[4] = edx_1;
00546788      }
00546788      
005467db      return ((uint32_t)NetBlob::Send(arg1, ebp, 5));
00546740  }

005467dc                                                                                      90 90 90 90                              ....

005467e0  uint32_t Proto_UI::GetNextUICounter()

005467e0  {
005467e5      uint32_t result = (Proto_UI::eventCounter_ + 1);
005467e6      Proto_UI::eventCounter_ = result;
005467eb      return result;
005467e0  }

005467ec                                      90 90 90 90                                                              ....

005467f0  void Proto_UI::UICounterFailedSend(uint32_t arg1)

005467f0  {
005467f0      Proto_UI::eventCounter_ -= 1;
005467f0  }

005467f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00546800  void Proto_UI::SetEventCounter(uint32_t arg1)

00546800  {
00546804      Proto_UI::eventCounter_ = arg1;
00546800  }

0054680a                                90 90 90 90 90 90                                                            ......

00546810  uint8_t Proto_UI::SendToWeenie(uint8_t* arg1, int32_t arg2)

00546810  {
00546811      int32_t ebx;
00546811      ebx = 0;
00546811      
0054681a      if (PacketController::Instance() != 0)
0054681a      {
0054681f          void* eax_1 = operator new(0x50);
00546829          class NetBlob* esi_1;
00546829          
00546829          if (eax_1 == 0)
00546842              esi_1 = nullptr;
00546829          else
0054683e              esi_1 = NetBlob::NetBlob(eax_1, arg1, arg2, 3);
0054683e          
00546853          ebx = Proto_UI::SendBlob(esi_1) != 0;
00546853          
00546862          if ((InterlockedDecrement(&esi_1->m_cRef) == 0 && esi_1 != 0))
00546864              esi_1->vtable->__vecDelDtor(1);
0054681a      }
0054681a      
0054686d      class PacketController* eax;
0054686d      eax = ebx;
00546870      return eax;
00546810  }

00546871                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00546880  uint8_t Proto_UI::SendToControl(uint8_t* arg1, int32_t arg2)

00546880  {
00546887      if (PacketController::Instance() == 0)
00546887      {
00546889          class PacketController* eax;
00546889          eax = 0;
0054688b          return 0;
00546887      }
00546887      
00546890      void* eax_1 = operator new(0x50);
0054689a      class NetBlob* esi;
0054689a      
0054689a      if (eax_1 == 0)
005468b3          esi = nullptr;
0054689a      else
005468af          esi = NetBlob::NetBlob(eax_1, arg1, arg2, 2);
005468af      
005468c4      int32_t ebx;
005468c4      ebx = Proto_UI::SendBlob(esi) != 0;
005468c4      
005468d3      if ((InterlockedDecrement(&esi->m_cRef) == 0 && esi != 0))
005468d5          esi->vtable->__vecDelDtor(1);
005468d5      
005468de      int32_t eax_5;
005468de      eax_5 = ebx;
005468e1      return eax_5;
00546880  }

005468e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005468f0  uint8_t Proto_UI::SendToLogon(uint8_t* arg1, int32_t arg2)

005468f0  {
005468f7      if (PacketController::Instance() == 0)
005468f7      {
005468f9          class PacketController* eax;
005468f9          eax = 0;
005468fb          return 0;
005468f7      }
005468f7      
00546900      void* eax_1 = operator new(0x50);
0054690a      class NetBlob* esi;
0054690a      
0054690a      if (eax_1 == 0)
00546923          esi = nullptr;
0054690a      else
0054691f          esi = NetBlob::NetBlob(eax_1, arg1, arg2, 4);
0054691f      
00546934      int32_t ebx;
00546934      ebx = Proto_UI::SendBlob(esi) != 0;
00546934      
00546943      if ((InterlockedDecrement(&esi->m_cRef) == 0 && esi != 0))
00546945          esi->vtable->__vecDelDtor(1);
00546945      
0054694e      int32_t eax_5;
0054694e      eax_5 = ebx;
00546951      return eax_5;
005468f0  }

00546952                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00546960  uint8_t Proto_UI::SendToDatabase(uint8_t* arg1, int32_t arg2)

00546960  {
00546967      if (PacketController::Instance() == 0)
00546967      {
00546969          class PacketController* eax;
00546969          eax = 0;
0054696b          return 0;
00546967      }
00546967      
00546970      void* eax_1 = operator new(0x50);
0054697a      class NetBlob* esi;
0054697a      
0054697a      if (eax_1 == 0)
00546993          esi = nullptr;
0054697a      else
0054698f          esi = NetBlob::NetBlob(eax_1, arg1, arg2, 5);
0054698f      
005469a4      int32_t ebx;
005469a4      ebx = Proto_UI::SendBlob(esi) != 0;
005469a4      
005469b3      if ((InterlockedDecrement(&esi->m_cRef) == 0 && esi != 0))
005469b5          esi->vtable->__vecDelDtor(1);
005469b5      
005469be      int32_t eax_5;
005469be      eax_5 = ebx;
005469c1      return eax_5;
00546960  }

005469c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005469d0  int32_t Proto_UI::SendForceObjdesc(uint32_t arg1)

005469d0  {
005469d2      void* eax = operator new[](8);
005469dd      *(uint32_t*)eax = 0xf6ea;
005469e4      *(uint32_t*)((char*)eax + 4) = arg1;
005469f2      return ((uint32_t)Proto_UI::SendToControl(eax, 8));
005469d0  }

005469f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00546a00  int32_t Proto_UI::SendEnterWorldRequest()

00546a00  {
00546a02      void* eax = operator new[](4);
00546a0a      *(uint32_t*)eax = 0xf7c8;
00546a1b      return ((uint32_t)Proto_UI::SendToLogon(eax, 4));
00546a00  }

00546a1c                                                                                      90 90 90 90                              ....

00546a20  int32_t Proto_UI::LogOffCharacter(uint32_t arg1)

00546a20  {
00546a22      void* eax = operator new[](8);
00546a2d      *(uint32_t*)eax = 0xf653;
00546a34      *(uint32_t*)((char*)eax + 4) = arg1;
00546a42      return ((uint32_t)Proto_UI::SendToLogon(eax, 8));
00546a20  }

00546a43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00546a50  int32_t Proto_UI::SendAdminGetServerVersion()

00546a50  {
00546a52      void* eax = operator new[](4);
00546a5a      *(uint32_t*)eax = 0xf7cc;
00546a6b      return ((uint32_t)Proto_UI::SendToControl(eax, 4));
00546a50  }

00546a6c                                      90 90 90 90                                                              ....

00546a70  int32_t Proto_UI::SendCharGenResult(class CharGenResult* arg1, class accountID arg2, int32_t arg3)
// This function has unresolved stack usage. View graph of stack usage to resolve.

00546a70  {
00546a73      int32_t ebx;
00546a73      int32_t var_c = ebx;
00546a74      int32_t esi;
00546a74      int32_t var_10 = esi;
00546a75      int32_t edi;
00546a75      int32_t var_14 = edi;
00546a81      int32_t var_4 = 0;
00546a9b      uint32_t esi_2 = ((AC1Legacy::PStringBase<char>::Pack(&arg2, &var_4, 0) + arg1->vtable->GetPackSize()) + 4);
00546aa0      void* eax_2 = operator new[](esi_2);
00546aa5      void* var_8 = eax_2;
00546aa9      *(uint32_t*)eax_2 = 0xf656;
00546abb      var_8 += 4;
00546ac9      AC1Legacy::PStringBase<char>::Pack(&arg2, &var_8, esi_2);
00546ace      arg1->vtable->Pack(&var_8, esi_2);
00546ae2      uint8_t* var_24 = eax_2;
00546ae3      void* var_20_1;
00546ae3      void* const __return_addr_1;
00546ae3      uint32_t result;
00546ae3      
00546ae3      if (arg2.m_fIsThroneOfDestinyExpansion == 0)
00546ae3      {
00546aff          __return_addr_1 = __return_addr;
00546b03          result = ((uint32_t)Proto_UI::SendToLogon(var_24, esi_2));
00546b0c          var_20_1 = ((char*)__return_addr_1 + 4);
00546ae3      }
00546ae3      else
00546ae3      {
00546aea          __return_addr_1 = __return_addr;
00546af4          result = ((uint32_t)Proto_UI::SendToLogon(var_24, esi_2));
00546af7          var_20_1 = ((char*)__return_addr_1 + 4);
00546ae3      }
00546ae3      
00546b19      if ((InterlockedDecrement(var_20_1) == 0 && __return_addr_1 != 0))
00546b21          **(uint32_t**)__return_addr_1(1);
00546b21      
00546b2b      return result;
00546a70  }

00546b2c                                      90 90 90 90                                                              ....

00546b30  int32_t __convention("regparm") Proto_UI::SendDeleteCharacter(class accountID arg1, int32_t arg2)

00546b30  {
00546b30      void* ecx;
00546b30      void* var_4 = ecx;
00546b3e      var_4 = nullptr;
00546b4d      uint32_t esi_1 = (AC1Legacy::PStringBase<char>::Pack(&arg1, &var_4, 0) + 8);
00546b51      void* eax_1 = operator new[](esi_1);
00546b63      var_4 = ((char*)eax_1 + 4);
00546b6c      *(uint32_t*)eax_1 = 0xf655;
00546b72      AC1Legacy::PStringBase<char>::Pack(&arg1, &var_4, esi_1);
00546b81      *(uint32_t*)var_4 = arg2;
00546b83      uint8_t eax_3 = Proto_UI::SendToLogon(eax_1, esi_1);
00546b88      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg1.m_buffer;
00546b88      
00546ba2      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00546ba4          m_buffer->vtable->__vecDelDtor(1);
00546ba4      
00546bb1      return ((uint32_t)eax_3);
00546b30  }

00546bb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00546bc0  int32_t __fastcall Proto_UI::SendEnterWorld(uint32_t arg1, class accountID arg2)

00546bc0  {
00546bc0      int32_t ecx;
00546bc0      int32_t var_4 = ecx;
00546bce      var_4 = 0;
00546bdd      uint32_t esi_1 = (AC1Legacy::PStringBase<char>::Pack(&arg2, &var_4, 0) + 8);
00546be1      void* eax_1 = operator new[](esi_1);
00546be6      uint32_t ecx_2 = arg1;
00546bf2      *(uint32_t*)eax_1 = 0xf657;
00546bf8      *(uint32_t*)((char*)eax_1 + 4) = ecx_2;
00546c07      arg1 = ((char*)eax_1 + 8);
00546c0b      AC1Legacy::PStringBase<char>::Pack(&arg2, &arg1, esi_1);
00546c12      uint8_t eax_4 = Proto_UI::SendToLogon(eax_1, esi_1);
00546c17      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2.m_buffer;
00546c17      
00546c31      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00546c33          m_buffer->vtable->__vecDelDtor(1);
00546c33      
00546c40      return ((uint32_t)eax_4);
00546bc0  }

00546c41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00546c50  int32_t __convention("regparm") Proto_UI::SendFriendsCommand(uint32_t arg1, class PStringBase<char> const* arg2)

00546c50  {
00546c50      class AC1Legacy::PStringBase<char> ecx;
00546c50      class AC1Legacy::PStringBase<char> var_4 = ecx;
00546c5f      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, arg2->m_charbuffer);
00546c6f      arg2 = nullptr;
00546c77      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(&var_4, &arg2, 0);
00546c82      void* eax_2 = operator new[]((eax_1 + 8));
00546c8b      *(uint32_t*)eax_2 = 0xf7cd;
00546c99      *(uint32_t*)((char*)eax_2 + 4) = arg1;
00546ca8      arg2 = ((char*)eax_2 + 8);
00546cac      AC1Legacy::PStringBase<char>::Pack(&var_4, &arg2, eax_1);
00546cb3      uint8_t eax_5 = Proto_UI::SendToControl(eax_2, (eax_1 + 8));
00546cb8      class AC1Legacy::PStringBase<char> esi_1 = var_4;
00546cb8      
00546cd2      if ((InterlockedDecrement((esi_1 + 4)) == 0 && esi_1 != 0))
00546cda          **(uint32_t**)esi_1(1);
00546cda      
00546ce2      return ((uint32_t)eax_5);
00546c50  }

00546ce3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00546cf0  int32_t __convention("regparm") Proto_UI::SendAdminRestoreCharacter(uint32_t arg1, class PStringBase<char> const* arg2, class PStringBase<char> const* arg3)

00546cf0  {
00546cf0      class AC1Legacy::PStringBase<char> ecx;
00546cf0      class AC1Legacy::PStringBase<char> var_4 = ecx;
00546cff      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, arg2->m_charbuffer);
00546d0f      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, arg3->m_charbuffer);
00546d1f      arg2 = nullptr;
00546d3e      uint32_t esi_1 = ((AC1Legacy::PStringBase<char>::Pack(&arg3, &arg2, 0) + AC1Legacy::PStringBase<char>::Pack(&var_4, &arg2, 0)) + 8);
00546d43      void* eax_4 = operator new[](esi_1);
00546d4c      *(uint32_t*)eax_4 = 0xf7d9;
00546d5a      *(uint32_t*)((char*)eax_4 + 4) = arg1;
00546d69      arg2 = ((char*)eax_4 + 8);
00546d6d      AC1Legacy::PStringBase<char>::Pack(&var_4, &arg2, esi_1);
00546d7c      AC1Legacy::PStringBase<char>::Pack(&arg3, &arg2, esi_1);
00546d83      uint8_t eax_7 = Proto_UI::SendToControl(eax_4, esi_1);
00546d88      class PStringBase<char>* esi_2 = arg3;
00546d88      
00546da4      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00546da6          esi_2->m_charbuffer->m_data[0](1);
00546da6      
00546dae      class AC1Legacy::PStringBase<char> esi_3 = var_4;
00546dae      
00546dbe      if ((InterlockedDecrement((esi_3 + 4)) == 0 && esi_3 != 0))
00546dc6          **(uint32_t**)esi_3(1);
00546dc6      
00546dce      return ((uint32_t)eax_7);
00546cf0  }

00546dcf                                               90                                                                 .

00546dd0  void __fastcall RecipientData::TouchConnection(class RecipientData* this)

00546dd0  {
00546dd0      class RecipientData* this_1 = this;
00546de1      this->lastTouched_ = ((double)((long double)Timer::get_real_time()));
00546dd0  }

00546de6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00546df0  int32_t __thiscall RecipientData::IndicateReceivedPacket(class RecipientData* this, class NetPacket* arg2, uint32_t arg3)

00546df0  {
00546e05      Indicator::CheckInPacket(this->dependencies_, arg2, arg2->recipient_);
00546e0f      return 1;
00546df0  }

00546e12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00546e20  void __thiscall RecipientData::EnqueueBlob(class RecipientData* this, class NetBlob* arg2)

00546e20  {
00546e2b      PacketController::EnqueueRecip(PacketController::Instance(), this);
00546e37      /* jump -> this->flowQueue_.vtable->Enqueue */
00546e20  }

00546e3a                                                                                90 90 90 90 90 90                            ......

00546e40  void __fastcall RecipientData::UseTime(class RecipientData* this)

00546e40  {
00546e49      FlowQueue::Empty(&this->flowQueue_);
00546e4e      uint32_t flushNum_ = this->flushNum_;
00546e4e      
00546e56      if (flushNum_ != 0)
00546e56      {
00546e5d          FlowQueue::FlushSentPackets(&this->flowQueue_, flushNum_, 0);
00546e62          this->flushNum_ = 0;
00546e56      }
00546e56      
00546e74      /* tailcall */
00546e74      return Indicator::FlushTimedOutEphInfo(this->dependencies_);
00546e40  }

00546e79                                                                             90 90 90 90 90 90 90                           .......

00546e80  void __thiscall RecipientData::RecipientData(class RecipientData* this, uint16_t arg2, struct sockaddr_in arg3, int32_t arg4, float arg5)

00546e80  {
00546e84      int32_t edx;
00546e84      edx = arg3.sin_family;
00546e84      *(uint16_t*)((char*)edx)[2] = arg3.sin_port;
00546e8f      double* this_1 = this;
00546e9e      int32_t edx_1;
00546e9e      edx_1 = arg3.sin_zero[0];
00546e9e      *(uint8_t*)((char*)edx_1)[1] = arg3.sin_zero[1];
00546e9e      *(uint8_t*)((char*)edx_1)[2] = arg3.sin_zero[2];
00546e9e      *(uint8_t*)((char*)edx_1)[3] = arg3.sin_zero[3];
00546ea2      union in_addr::__unnamed S_un = arg3.sin_addr.S_un;
00546ea5      int32_t eax_1;
00546ea5      eax_1 = arg3.sin_zero[4];
00546ea5      *(uint8_t*)((char*)eax_1)[1] = arg3.sin_zero[5];
00546ea5      *(uint8_t*)((char*)eax_1)[2] = arg3.sin_zero[6];
00546ea5      *(uint8_t*)((char*)eax_1)[3] = arg3.sin_zero[7];
00546eab      int32_t var_1c = edx_1;
00546eae      *(uint32_t*)this_1 = 0f;
00546eb0      *(uint32_t*)((char*)this_1 + 4) = 0;
00546eb3      int32_t var_18 = eax_1;
00546eb9      *(uint32_t*)((char*)this_1 + 0x14) = 0;
00546ebc      this_1[3] = 0;
00546ebf      ClientFlowQueue::ClientFlowQueue(&this_1[4], edx, arg2, arg5);
00546ec4      this_1[0x6f] = 0;
00546eca      *(uint16_t*)((char*)this_1 + 0x37c) = arg2;
00546ed1      this_1[0x70] = 0;
00546ed7      *(uint32_t*)((char*)this_1 + 0x384) = 0;
00546edd      this_1[0x71] = 0;
00546ee3      *(uint32_t*)((char*)this_1 + 0x38c) = 0;
00546ef7      this_1[1] = (*(uint32_t*)Timer::cur_time);
00546efa      *(uint32_t*)((char*)this_1 + 0xc) = *(int32_t*)((char*)Timer::cur_time + 4);
00546efd      void* eax_2 = operator new(0x58);
00546f07      int32_t eax_3;
00546f07      
00546f07      if (eax_2 == 0)
00546f12          eax_3 = 0;
00546f07      else
00546f0b          eax_3 = Indicator::Indicator(eax_2);
00546f0b      
00546f14      *(uint32_t*)((char*)this_1 + 0x384) = eax_3;
00546f1a      this_1[0x64] = this_1;
00546f30      *(uint64_t*)this_1 = ((double)((long double)Timer::get_real_time()));
00546e80  }

00546f37                                                                       90 90 90 90 90 90 90 90 90                         .........

00546f40  void __fastcall RecipientData::~RecipientData(class RecipientData* this)

00546f40  {
00546f50      while (true)
00546f50      {
00546f50          class NIListElement<NetBlob *>* head_ = this->waitingBlobs_.head_;
00546f54          class NetBlob* data_;
00546f54          
00546f54          if (head_ != 0)
00546f54          {
00546f5a              class NIListElement<NetBlob *>* next_ = head_->next_;
00546f46              this->waitingBlobs_.head_ = next_;
00546f46              
00546f61              if (next_ == 0)
00546f46                  this->waitingBlobs_.tail_ = nullptr;
00546f46              
00546f66              data_ = head_->data_;
00546f69              operator delete(head_);
00546f54          }
00546f54          else
00546f56              data_ = nullptr;
00546f56          
00546f73          if (data_ == 0)
00546f73              break;
00546f73          
00546f81          if (InterlockedDecrement(&data_->m_cRef) == 0)
00546f83              data_->vtable->__vecDelDtor(1);
00546f50      }
00546f50      
00546f92      FlowQueue::Destroy(&this->flowQueue_);
00546f9c      this->flushNum_ = 0;
00546fa2      FlowQueue::FlushSentPackets(&this->flowQueue_, 0, 1);
00546fa7      class Indicator* dependencies_ = this->dependencies_;
00546faf      this->flushNum_ = 0;
00546faf      
00546fb5      if (dependencies_ != 0)
00546fb7          dependencies_->vtable->__vecDelDtor(1);
00546fb7      
00546fbf      ClientFlowQueue::~ClientFlowQueue(&this->flowQueue_);
00546fca      /* tailcall */
00546fca      return NIList<NetBlob *>::DeleteContents(&this->waitingBlobs_);
00546f40  }

00546f4d                                         8d 49 00                                                               .I.
00546fcf                                               90                                                                 .

00546fd0  void __thiscall RecipientData::QueueFlush(class RecipientData* this, uint32_t arg2)

00546fd0  {
00546fd0      uint32_t flushNum_ = this->flushNum_;
00546fd0      
00546fdd      if (arg2 != flushNum_)
00546fdd      {
00546fe1          uint32_t edx_2 = (arg2 - flushNum_);
00546fe6          int32_t edi_1 = 1;
00546fe6          
00546feb          if (arg2 < flushNum_)
00546feb          {
00546fef              edx_2 = (flushNum_ - arg2);
00546ff1              edi_1 = 0xffffffff;
00546feb          }
00546feb          
00546ffa          if (edx_2 > 0x7fffffff)
00546ffc              edi_1 = -(edi_1);
00546ffc          
00547001          if (edi_1 > 0)
00547003              this->flushNum_ = arg2;
00546fdd      }
00546fd0  }

0054700d                                         90 90 90                                                               ...

00547010  void __thiscall RecipientData::ProcessNaks(class RecipientData* this, int32_t arg2, uint32_t const* arg3)

00547010  {
00547021      FlowQueue::EnqueueAcks(&this->flowQueue_.vtable, arg3, arg2);
0054702e      PacketController::EnqueueRecip(PacketController::Instance(), this);
00547033      uint32_t ecx_2 = *(uint32_t*)arg3;
00547035      uint32_t flushNum_ = this->flushNum_;
00547035      
0054703d      if (ecx_2 != flushNum_)
0054703d      {
00547041          uint32_t edx_2 = (ecx_2 - flushNum_);
00547045          int32_t edi_1 = 1;
00547045          
0054704a          if (ecx_2 < flushNum_)
0054704a          {
0054704e              edx_2 = (flushNum_ - ecx_2);
00547050              edi_1 = 0xffffffff;
0054704a          }
0054704a          
00547059          if (edx_2 > 0x7fffffff)
0054705b              edi_1 = -(edi_1);
0054705b          
0054705f          if (edi_1 > 0)
00547061              this->flushNum_ = ecx_2;
0054703d      }
00547010  }

0054706c                                      90 90 90 90                                                              ....

00547070  class NetPacket* __thiscall FlowQueue::DequeuePacket(class FlowQueue* this, class NetPacket** arg2, class NetPacket** arg3)

00547070  {
00547076      class NetPacket* result = *(uint32_t*)arg2;
00547076      
0054707a      if (result != 0)
0054707a      {
00547082          this->vtable->RecordBytesDequeued(result->size_);
00547093          *(uint32_t*)arg2 = *(uint32_t*)arg2->next_;
00547099          NetPacket::Remove(result, nullptr, arg2, arg3);
0054707a      }
0054707a      
005470a2      return result;
00547070  }

005470a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005470b0  void __thiscall FlowQueue::EncryptChecksum(class FlowQueue* this, class NetPacket* arg2, uint32_t arg3, uint32_t* arg4)

005470b0  {
005470b4      class ReceiverData* myReceiverData_ = this->myReceiverData_;
005470bb      class NetPacket* esi = arg2;
005470ca      arg2 = esi->checksum_;
005470d6      uint32_t eax_1 = ReceiverData::Encrypt(myReceiverData_, arg3, &arg2, 4, arg4);
005470df      esi->checksum_ = arg2;
005470e5      esi->flags_ |= 1;
005470ec      esi->cryptoKey_ = eax_1;
005470b0  }

005470f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00547100  void __thiscall FlowQueue::IncrementLocalInterval(class FlowQueue* this, uint32_t arg2)

00547100  {
00547105      this->CurLocalInterval_.intervalID_ += arg2;
00547100  }

0054710f                                               90                                                                 .

00547110  void __thiscall ClientFlowQueue::RecordBytesSent(class ClientFlowQueue* this, int32_t arg2)

00547110  {
0054711c      this->CurLocalInterval_.nBytes_ += arg2;
00547110  }

00547125                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00547130  void __fastcall NIListIter<unsigned long>::RemoveCur(class NIListIter<unsigned long>* this)

00547130  {
00547133      class NIListElement<unsigned long>* prev_ = this->prev_;
00547133      
00547138      if (prev_ != 0)
00547138      {
00547168          prev_->next_ = this->cur_->next_;
0054716b          class NIListElement<unsigned long>* prev__1 = this->prev_;
0054716b          
00547173          if (prev__1->next_ == 0)
00547175              this->list_->tail_ = prev__1;
00547175          
0054717e          operator delete(this->cur_);
00547189          this->cur_ = this->prev_->next_;
00547138      }
00547138      else
00547138      {
00547140          this->cur_ = this->cur_->next_;
00547143          class NIList<unsigned long>* list_ = this->list_;
00547145          class NIListElement<unsigned long>* head_ = list_->head_;
00547145          
00547149          if (head_ != 0)
00547149          {
0054714b              class NIListElement<unsigned long>* next_ = head_->next_;
00547150              list_->head_ = next_;
00547150              
00547152              if (next_ == 0)
00547154                  list_->tail_ = next_;
00547154              
00547158              operator delete(head_);
00547149          }
00547138      }
00547130  }

00547191                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005471a0  void* __thiscall PQueueArray<unsigned long,void *>::`scalar deleting destructor'(class PQueueArray<unsigned long,void *>* this, uint32_t arg2)

005471a0  {
005471a3      class PQueueArray<unsigned long,void *>::PQueueNode* A = this->A;
005471a7      this->vtable = 0x7ca4e8;
005471ad      operator delete[](A);
005471ad      
005471bb      if ((arg2 & 1) != 0)
005471be          operator delete(this);
005471be      
005471c9      return this;
005471a0  }

005471cc                                      90 90 90 90                                                              ....

005471d0  void __fastcall PQueueArray<unsigned long,void *>::_ExpandNodes(class PQueueArray<unsigned long,void *>* this)

005471d0  {
005471dd      void* eax_2 = operator new[]((this->allocatedNodes << 4));
005471e8      int32_t ecx_1 = (this->allocatedNodes << 3);
005471ed      class PQueueArray<unsigned long,void *>::PQueueNode* ebp = eax_2;
005471f4      int32_t esi_1;
005471f4      int32_t edi_1;
005471f4      edi_1 = __builtin_memcpy(ebp, this->A, ((ecx_1 >> 2) << 2));
005471fb      __builtin_memcpy(edi_1, esi_1, (ecx_1 & 3));
00547200      class PQueueArray<unsigned long,void *>::PQueueNode* A = this->A;
00547206      this->allocatedNodes <<= 1;
00547209      operator delete[](A);
00547213      this->A = ebp;
005471d0  }

00547219                                                                             90 90 90 90 90 90 90                           .......

00547220  void __thiscall PQueueArray<unsigned long,void *>::_Heapify(class PQueueArray<unsigned long,void *>* this, int32_t arg2)

00547220  {
00547223      int32_t edx = arg2;
0054722a      void* __offset(PQueueArray<unsigned long,void *>::PQueueNode, -0x8) eax = (this->A - 8);
0054722d      int32_t edi;
0054722d      int32_t var_10 = edi;
0054722d      
00547230      while (true)
00547230      {
00547230          int32_t curNumNodes = this->curNumNodes;
00547233          int32_t esi_1 = (edx * 2);
00547233          
00547244          if ((esi_1 > curNumNodes || *(uint32_t*)((char*)eax + (esi_1 << 3)) >= *(uint32_t*)((char*)eax + (edx << 3))))
00547246              esi_1 = edx;
00547246          
00547252          if ((((edx * 2) + 1) <= curNumNodes && *(uint32_t*)((char*)eax + (((edx * 2) + 1) << 3)) < *(uint32_t*)((char*)eax + (esi_1 << 3))))
00547254              esi_1 = ((edx * 2) + 1);
00547254          
00547258          if (esi_1 == edx)
00547258              break;
00547258          
0054725d          int32_t edi_3 = *(uint32_t*)((char*)eax + (edx << 3));
00547260          int32_t ebx_2 = *(uint32_t*)(((char*)eax + (edx << 3)) + 4);
00547264          *(uint32_t*)((char*)eax + (edx << 3)) = *(uint32_t*)((char*)eax + (esi_1 << 3));
0054726b          *(uint32_t*)(((char*)eax + (edx << 3)) + 4) = *(uint32_t*)(((char*)eax + (esi_1 << 3)) + 4);
0054726f          *(uint32_t*)((char*)eax + (esi_1 << 3)) = edi_3;
00547272          *(uint32_t*)(((char*)eax + (esi_1 << 3)) + 4) = ebx_2;
00547276          edx = esi_1;
00547230      }
00547220  }

00547281     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00547290  int32_t __fastcall CTimeSyncHeader::UpdateTimeSensitivePayload(class CTimeSyncHeader* this)

00547290  {
00547293      int32_t result = Timer::compute_time();
00547298      long double x87_r0;
00547298      this->m_time = ((double)x87_r0);
0054729c      return result;
00547290  }

0054729d                                                                                         90 90 90                               ...

005472a0  int32_t __fastcall CEchoRequestHeader::UpdateTimeSensitivePayload(class CEchoRequestHeader* this)

005472a0  {
005472a6      this->m_LocalTime = ((float)((long double)Timer::local_time));
005472a0  }

005472aa                                90 90 90 90 90 90                                                            ......

005472b0  void FlowQueue::SharedStaticCleanup()

005472b0  {
005472b1      class PerfMonCounter<unsigned __int64>* FlowQueue::m_pBlobsDequeuedCounter_1 = FlowQueue::m_pBlobsDequeuedCounter;
005472b1      
005472b9      if (FlowQueue::m_pBlobsDequeuedCounter_1 != 0)
005472b9      {
005472cb          if ((InterlockedDecrement(&FlowQueue::m_pBlobsDequeuedCounter_1->m_cRef) == 0 && FlowQueue::m_pBlobsDequeuedCounter_1 != 0))
005472cd              FlowQueue::m_pBlobsDequeuedCounter_1->vtable->__vecDelDtor(1);
005472cd          
005472d5          FlowQueue::m_pBlobsDequeuedCounter = nullptr;
005472b9      }
005472b0  }

005472e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005472f0  class NetPacket* __fastcall FlowQueue::DequeueAck(class FlowQueue* this)

005472f0  {
005472f0      class FlowQueue* cryptoKey_ = this;
005472f5      class NIListElement<unsigned long>* head_ = this->m_ackList.head_;
005472f5      
005472fb      if (head_ != 0)
005472fb      {
005472ff          uint32_t data_;
005472ff          
005472ff          if (head_ == 0)
00547305              data_ = 0;
005472ff          else
00547301              data_ = head_->data_;
00547301          
0054730b          class NetPacket* result = SentPacketStore::GenerateAck(&this->m_sentPacketStore, data_);
00547312          uint32_t size_ = result->size_;
00547312          
0054731f          if (size_ > 0 == 0)
0054731f          {
0054737f          label_54737f:
0054737f              class NIListElement<unsigned long>* head__1 = this->m_ackList.head_;
0054737f              
00547384              if (head__1 != 0)
00547384              {
00547386                  class NIListElement<unsigned long>* next_ = head__1->next_;
0054738b                  this->m_ackList.head_ = next_;
0054738b                  
0054738e                  if (next_ == 0)
00547390                      this->m_ackList.tail_ = next_;
00547390                  
00547394                  operator delete(head__1);
00547384              }
00547384              
005473a2              return result;
0054731f          }
0054731f          
0054732d          if (this->vtable->WireRoomLeft(size_) != 0)
0054732d          {
0054733b              NetPacket::UpdateTimeSensitiveHeaders(result);
0054733b              
00547348              if (result->checksum_ == 0)
0054734c                  NetPacket::ComputeChecksum(result);
0054734c              
00547365              if (((result->flags_ & 1) == 0 && (((int8_t)(result->flags_ >> 2)) & 1) != 0))
00547365              {
00547373                  cryptoKey_ = result->cryptoKey_;
0054737a                  FlowQueue::EncryptChecksum(this, result, data_, &cryptoKey_);
00547365              }
00547365              
00547358              goto label_54737f;
0054732d          }
0054732d          
0054732f          ReferenceCountTemplate<1048576,0>::Release(result);
005472fb      }
005472fb      
0054733a      return 0;
005472f0  }

005473a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005473b0  void __thiscall FlowQueue::EnqueuePacket(class FlowQueue* this, class NetPacket* arg2, class NetPacket** arg3, class NetPacket** arg4)

005473b0  {
005473ba      if (arg2 != 0)
005473ba      {
005473c0          InterlockedIncrement(&arg2->m_cRef);
005473c0          
005473ce          if (arg2->numSpecialFrags_ != 0)
005473ce          {
005473dc              NetPacket::AddToHead(arg2, arg3, arg4);
005473e7              this->vtable->RecordBytesQueued(arg2->size_);
005473f1              return;
005473ce          }
005473ce          
00547400          NetPacket::AddToTail(arg2, arg3, arg4);
0054740b          this->vtable->RecordBytesQueued(arg2->size_);
005473ba      }
005473b0  }

00547418                                                                          90 90 90 90 90 90 90 90                          ........

00547420  void __thiscall PQueueArray<unsigned long,void *>::Insert(class PQueueArray<unsigned long,void *>* this, uint32_t arg2, void* arg3)

00547420  {
0054742a      if (this->curNumNodes == this->allocatedNodes)
0054742e          PQueueArray<unsigned long,void *>::_ExpandNodes(this);
0054742e      
00547439      void* __offset(PQueueArray<unsigned long,void *>::PQueueNode, -0x8) eax_2 = (this->A - 8);
0054743c      int32_t i_2 = (this->curNumNodes + 1);
0054743d      int32_t i = i_2;
00547442      this->curNumNodes = i_2;
00547449      int32_t i_1;
00547449      
00547449      for (; i > 1; i = i_1)
00547449      {
00547452          i_1 = (i >> 1);
00547454          int32_t edi_1 = *(uint32_t*)((char*)eax_2 + (i_1 << 3));
00547454          
00547459          if (edi_1 <= arg2)
00547459              break;
00547459          
0054745b          *(uint32_t*)((char*)eax_2 + (i << 3)) = edi_1;
00547462          *(uint32_t*)(((char*)eax_2 + (i << 3)) + 4) = *(uint32_t*)(((char*)eax_2 + (i_1 << 3)) + 4);
00547449      }
00547449      
00547472      *(uint32_t*)((char*)eax_2 + (i << 3)) = arg2;
00547475      *(uint32_t*)(((char*)eax_2 + (i << 3)) + 4) = arg3;
00547420  }

0054744d                                         8d 49 00                                                               .I.
0054747d                                                                                         90 90 90                               ...

00547480  uint8_t __thiscall PQueueArray<unsigned long,void *>::RemoveMin(class PQueueArray<unsigned long,void *>* this, uint32_t* arg2, void** arg3)

00547480  {
00547485      int32_t A;
00547485      
00547485      if (this->curNumNodes > 0)
00547485      {
00547487          A = this->A;
00547487          
0054748c          if (A != 0)
0054748c          {
00547494              *(uint32_t*)arg2 = *(uint32_t*)A;
005474a0              *(uint32_t*)arg3 = this->A->data;
005474a2              int32_t curNumNodes = this->curNumNodes;
005474a2              
005474a8              if (curNumNodes <= 1)
005474a8              {
005474cf                  this->curNumNodes = 0;
005474d6                  PQueueArray<unsigned long,void *>::_Heapify(this, 1);
005474db                  int32_t eax_4;
005474db                  eax_4 = 1;
005474dd                  return 1;
005474a8              }
005474a8              
005474ad              class PQueueArray<unsigned long,void *>::PQueueNode* A_1 = this->A;
005474b0              this->curNumNodes = (curNumNodes - 1);
005474b7              A_1->key = A_1[(curNumNodes - 1)].key;
005474c0              A_1->data = A_1[(curNumNodes - 1)].data;
005474c3              PQueueArray<unsigned long,void *>::_Heapify(this, 1);
005474c8              int32_t eax_3;
005474c8              eax_3 = 1;
005474ca              return 1;
0054748c          }
00547485      }
00547485      
005474e0      A = 0;
005474e2      return 0;
00547480  }

005474e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005474f0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,int> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,int> *,0>* this, uint32_t arg2)

005474f0  {
005474f3      class HashTableData<unsigned long,int>** m_buckets = this->m_buckets;
005474fb      this->vtable = 0x7ca4fc;
005474fb      
00547501      if (m_buckets != &this->m_aInplaceBuckets)
00547504          operator delete[](m_buckets);
00547504      
0054750e      this->m_buckets = nullptr;
00547511      this->m_firstInterestingBucket = nullptr;
00547514      this->m_numBuckets = 0;
00547517      this->m_numElements = 0;
00547517      
0054751f      if ((arg2 & 1) != 0)
00547522          operator delete(this);
00547522      
0054752d      return this;
005474f0  }


00547530  void* __thiscall CPackObjHeader<NetError,2097152,2>::`scalar deleting destructor'(class CPackObjHeader<NetError,2097152,2>* this, uint32_t arg2)

00547530  {
00547533      uint8_t* m_pAdoptedData = this->m_pAdoptedData;
00547537      this->vtable = &CPackObjHeader<class NetError,2097152,2>::`vftable';
0054753d      operator delete(m_pAdoptedData);
0054754b      this->m_pAdoptedData = nullptr;
00547552      this->m_Obj.vtable = 0x79285c;
00547559      this->vtable = 0x7942f4;
00547559      
0054755f      if ((arg2 & 1) != 0)
00547562          operator delete(this);
00547562      
0054756d      return this;
00547530  }


00547570  void __thiscall CSeqIDListHeader<8192,33>::CSeqIDListHeader<8192,33>(class CSeqIDListHeader<8192,33>* this, uint32_t* arg2, uint32_t arg3)

00547570  {
00547577      uint32_t ecx = (arg3 << 2);
00547582      this->m_IDs[0] = arg3;
0054758b      this->m_pData = &this->m_IDs;
00547590      this->m_cbData = (ecx + 4);
00547596      this->m_cRef = 1;
0054759d      this->m_dwMask = 0x2000;
005475a4      this->m_Flags = 0x21;
005475ab      this->vtable = 0x7ca508;
005475b4      int32_t esi_2;
005475b4      int32_t edi_2;
005475b4      edi_2 = __builtin_memcpy(&this->m_IDs[1], arg2, ((ecx >> 2) << 2));
005475bb      __builtin_memcpy(edi_2, esi_2, (ecx & 3));
00547570  }

005475c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005475d0  class COptionalHeader* CTimeSyncHeader::CreateFromData(double arg1)

005475d0  {
005475d2      void* result = operator new(0x20);
005475d2      
005475dc      if (result == 0)
00547618          return 0;
00547618      
005475ea      *(uint32_t*)((char*)result + 0x1c) = *(uint32_t*)((char*)arg1)[4];
005475ed      *(uint32_t*)((char*)result + 4) = 1;
005475f4      *(uint32_t*)((char*)result + 8) = 0x1000000;
005475fb      *(uint32_t*)((char*)result + 0xc) = 0x18;
00547602      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
00547605      *(uint32_t*)((char*)result + 0x14) = 8;
0054760c      *(uint32_t*)result = 0x7ca4ec;
00547612      *(uint32_t*)((char*)result + 0x18) = arg1;
00547615      return result;
005475d0  }

00547619                                                                             90 90 90 90 90 90 90                           .......

00547620  class COptionalHeader* CEchoRequestHeader::CreateFromData()

00547620  {
00547622      void* result = operator new(0x1c);
00547622      
0054762c      if (result == 0)
00547661          return 0;
00547661      
00547637      *(uint32_t*)((char*)result + 0x18) = ((float)((long double)Timer::local_time));
00547639      *(uint32_t*)((char*)result + 4) = 1;
00547640      *(uint32_t*)((char*)result + 8) = 0x2000000;
00547647      *(uint32_t*)((char*)result + 0xc) = 0x18;
0054764e      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
00547651      *(uint32_t*)((char*)result + 0x14) = 4;
00547658      *(uint32_t*)result = 0x7ca4f4;
0054765e      return result;
00547620  }

00547662        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00547670  void __thiscall FlowQueue::EnqueueOptionalHeader(class FlowQueue* this, class COptionalHeader* arg2)

00547670  {
0054767c      InterlockedIncrement(&arg2->m_cRef);
0054768d      PQueueArray<unsigned long,void *>::Insert(&this->pqueueSpecial_, arg2->m_dwMask, arg2);
005476a0      PacketController::EnqueueRecip(PacketController::Instance(), this->myRecip_);
005476a0      
005476a9      if ((arg2->m_Flags & 0x40) != 0)
005476b1          RecipientData::TouchConnection(this->myRecip_);
00547670  }

005476bb                                                                                   90 90 90 90 90                             .....

005476c0  void __thiscall FlowQueue::FlushSentPackets(class FlowQueue* this, uint32_t arg2, int32_t arg3)

005476c0  {
005476d2      while (this->m_ackList.head_ != 0)
005476d2      {
005476d6          if (arg3 == 0)
005476d6          {
005476d8              class NIListElement<unsigned long>* head_ = this->m_ackList.head_;
005476dd              uint32_t data_;
005476dd              
005476dd              if (head_ == 0)
005476e3                  data_ = 0;
005476dd              else
005476df                  data_ = head_->data_;
005476df              
005476e7              if (data_ == arg2)
005476e7                  break;
005476e7              
005476eb              uint32_t eax_2 = (data_ - arg2);
005476ef              int32_t edx_1 = 1;
005476ef              
005476f4              if (data_ < arg2)
005476f4              {
005476f8                  eax_2 = (arg2 - data_);
005476fa                  edx_1 = 0xffffffff;
005476f4              }
005476f4              
00547702              if (eax_2 > 0x7fffffff)
00547704                  edx_1 = -(edx_1);
00547704              
00547708              if (edx_1 >= 0)
00547708                  break;
005476d6          }
005476d6          
0054770a          class NIListElement<unsigned long>* head__1 = this->m_ackList.head_;
0054770a          
0054770f          if (head__1 != 0)
0054770f          {
00547711              class NIListElement<unsigned long>* next_ = head__1->next_;
00547716              this->m_ackList.head_ = next_;
00547716              
00547719              if (next_ == 0)
0054771b                  this->m_ackList.tail_ = next_;
0054771b              
0054771f              operator delete(head__1);
0054770f          }
005476d2      }
005476d2      
00547733      SentPacketStore::Flush(&this->m_sentPacketStore, arg2, arg3);
005476c0  }

0054773e                                                                                            90 90                                ..

00547740  void __fastcall FlowQueue::CoalesceData(class FlowQueue* this)

00547740  {
00547750      uint32_t ebx = this->vtable->Dequeue(0);
00547762      uint32_t var_8 = ebx;
00547766      class BlobFrag* i_2 = nullptr;
00547775      void var_4;
00547775      
00547775      if (PQueueArray<unsigned long,void *>::RemoveMin(&this->pqueueSpecial_, &var_4, &i_2) != 0)
00547775      {
0054777b          class COptionalHeader* i = i_2;
0054777b          
00547781          if (i != 0)
00547781          {
005478d3              do
005478d3              {
00547790                  bool cond:0_1 = (i->m_Flags & 2) != 0;
00547794                  i_2 = nullptr;
00547794                  
0054779c                  if (!(cond:0_1))
0054779c                  {
0054779e                      class NetPacket* j = this->waitingPacketsHead_;
0054779e                      
005477a3                      while (j != 0)
005477a3                      {
005477a9                          uint32_t eax_3 = NetPacket::ApplySpecialFrags(j, nullptr);
005477a9                          
005477df                          if (((((j->flags_ & 1) != 0 || (j->size_ + i->m_cbData) > 0x1d0) || (i->m_dwMask & eax_3) != 0) || (j->numSpecialFrags_ == 1 && (j->specialFragList_[0]->m_Flags & 2) != 0)))
005477fe                              j = j->next_;
005477df                          else
005477df                          {
005477e4                              NetPacket::AddOptionalHeader(j, i);
005477ec                              this->vtable->RecordBytesQueued(i->m_cbData);
005477f4                              i_2 = 1;
005477df                          }
005477df                          
00547803                          if (eax_3 == 0)
00547803                              break;
00547803                          
00547809                          if ((i->m_Flags & 0x20) != 0)
00547809                              break;
00547809                          
00547811                          if (i_2 != 0)
00547811                              goto label_54787b;
005477a3                      }
0054779c                  }
0054779c                  
0054781b                  if ((cond:0_1 || i_2 == 0))
0054781b                  {
0054782d                      class NetPacket* eax_8 = NetPacket::CreateForSend(this->myRecip_->recID_);
0054783a                      NetPacket::AddOptionalHeader(eax_8, i);
0054783f                      this->vtable->EnqueuePacket(eax_8, &this->waitingPacketsHead_, &this->waitingPacketsTail_);
0054783f                      
0054785f                      if ((InterlockedDecrement(&eax_8->m_cRef) == 0 && eax_8 != 0))
00547861                          eax_8->vtable->__vecDelDtor(1);
0054781b                  }
0054781b                  
0054787b              label_54787b:
0054787b                  ebx = (((int8_t)i->m_Flags) & 0x20) == 0x20;
0054787b                  
00547882                  if (InterlockedDecrement(&i->m_cRef) == 0)
00547884                      i->vtable->__vecDelDtor(1);
00547884                  
0054788e                  if (ebx != 0)
0054788e                      break;
0054788e                  
00547890                  int32_t curNumNodes = this->pqueueSpecial_.curNumNodes;
00547890                  
0054789e                  if (curNumNodes <= 0)
0054789e                      break;
0054789e                  
005478a0                  uint32_t* A = this->pqueueSpecial_.A;
005478a0                  
005478a5                  if (A == 0)
005478a5                      break;
005478a5                  
005478aa                  i = A[1];
005478aa                  
005478ad                  if (curNumNodes <= 1)
00547898                      this->pqueueSpecial_.curNumNodes = 0;
005478ad                  else
005478ad                  {
00547898                      this->pqueueSpecial_.curNumNodes = (curNumNodes - 1);
005478b6                      *(uint32_t*)A = A[((curNumNodes - 1) * 2)];
005478bc                      A[1] = A[(((curNumNodes - 1) * 2) + 1)];
005478ad                  }
005478ad                  
005478cc                  PQueueArray<unsigned long,void *>::_Heapify(&this->pqueueSpecial_, 1);
005478d3              } while (i != 0);
005478d3              
005478df              ebx = var_8;
00547781          }
00547775      }
00547775      
005478e5      if (ebx != 0)
005478e5      {
00547908          while (true)
00547908          {
00547900              FlowQueue::m_pBlobsDequeuedCounter->vtable->IncCounter();
00547912              NetBlob::Fragmentize(ebx, &i_2);
00547917              class BlobFrag* i_1 = i_2;
00547917              
0054791d              if (i_1 != 0)
0054791d              {
00547a14                  do
00547a14                  {
00547926                      class NetPacket* ecx_18 = this->waitingPacketsHead_;
00547926                      
0054792a                      while (true)
0054792a                      {
0054792a                          if (ecx_18 == 0)
0054792a                          {
005479a1                              class NetPacket* eax_16 = NetPacket::CreateForSend(this->myRecip_->recID_);
005479a8                              class BlobFrag* i_3 = i_2;
005479c9                              NetPacket::AddFrag(eax_16, i_3, this->myRecip_->recID_, i_3->myBlob_->priority_);
005479ce                              this->vtable->EnqueuePacket(eax_16, &this->waitingPacketsHead_, &this->waitingPacketsTail_);
005479ce                              
005479e7                              if ((InterlockedDecrement(&eax_16->m_cRef) == 0 && eax_16 != 0))
005479e9                                  eax_16->vtable->__vecDelDtor(1);
005479e9                              
005479e7                              break;
0054792a                          }
0054792a                          
0054795a                          if (((ecx_18->flags_ & 1) == 0 && ((((uint32_t)i_1->hdrRead_->blobFragSize) + ecx_18->size_) <= 0x1d0 && (ecx_18->numSpecialFrags_ != 1 || (ecx_18->specialFragList_[0]->m_Flags & 2) == 0))))
0054795a                          {
00547977                              NetPacket::AddFrag(ecx_18, i_1, this->myRecip_->recID_, i_1->myBlob_->priority_);
00547987                              this->vtable->RecordBytesQueued(((uint32_t)i_2->hdrRead_->blobFragSize));
0054798f                              break;
0054795a                          }
0054795a                          
0054795c                          ecx_18 = ecx_18->next_;
0054792a                      }
0054792a                      
005479f1                      int32_t* i_4 = i_2;
005479fc                      i_2 = i_4[2];
005479fc                      
00547a04                      if (InterlockedDecrement(&i_4[1]) == 0)
00547a0c                          **(uint32_t**)i_4(1);
00547a0c                      
00547a0e                      i_1 = i_2;
00547a14                  } while (i_1 != 0);
00547a14                  
00547a1a                  ebx = var_8;
0054791d              }
0054791d              
00547a2a              if ((InterlockedDecrement((ebx + 4)) == 0 && ebx != 0))
00547a32                  **(uint32_t**)ebx(1);
00547a32              
00547a3a              uint32_t eax_24 = this->vtable->Dequeue(0);
00547a3f              var_8 = eax_24;
00547a3f              
00547a43              if (eax_24 == 0)
00547a43                  break;
00547a43              
005478f5              ebx = var_8;
00547908          }
005478e5      }
00547740  }

00547789                             8d a4 24 00 00 00 00                                                           ..$....
00547a51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00547a60  uint8_t __fastcall FlowQueue::TransmitNewPackets(class FlowQueue* this)

00547a60  {
00547a63      int32_t ebx;
00547a63      int32_t var_24 = ebx;
00547a69      char var_1d = 0;
00547a6e      FlowQueue::CoalesceData(this);
00547a79      class ReceiverData* eax;
00547a79      eax = this->myReceiverData_->iteration_;
00547a7d      int32_t ecx;
00547a7d      ecx = this->netID_;
00547a84      uint16_t intervalID_ = this->CurLocalInterval_.intervalID_;
00547a8d      uint32_t seqNum_ = 0;
00547a91      int32_t var_10 = 0;
00547a95      int32_t var_c = 0;
00547a99      int16_t var_8 = ecx;
00547a9e      uint16_t intervalID = intervalID_;
00547aa3      int16_t var_4 = 0;
00547aa8      int16_t var_2 = eax;
00547aa8      
00547ab0      while (true)
00547ab0      {
00547ab0          class NetPacket* waitingPacketsHead_ = this->waitingPacketsHead_;
00547ab0          
00547ab5          if (waitingPacketsHead_ == 0)
00547ab5          {
00547cb7              eax = var_1d;
00547cc2              return eax;
00547ab5          }
00547ab5          
00547ac1          ebx = waitingPacketsHead_->flags_;
00547acc          ebx &= 1;
00547acc          
00547ae1          if ((this->vtable->WireRoomLeft(waitingPacketsHead_->size_) == 0 && ((waitingPacketsHead_->flags_ >> 3) & 1) == 0))
00547ae1          {
00547cb7              eax = var_1d;
00547cc2              return eax;
00547ae1          }
00547ae1          
00547ae7          int32_t var_10_1 = 0;
00547ae7          
00547af1          if (waitingPacketsHead_->numFrags_ != 0)
00547af1          {
00547af9              var_10_1 = 4;
00547b01              RecipientData::TouchConnection(this->myRecip_);
00547af1          }
00547af1          
00547b0d          NetPacket::ApplySpecialFrags(waitingPacketsHead_, &seqNum_);
00547b0d          
00547b1f          if (((var_10_1 & 0xffffff) == 0 && waitingPacketsHead_->next_ == 0))
00547b1f          {
00547cb7              eax = var_1d;
00547cc2              return eax;
00547b1f          }
00547b1f          
00547b27          NetPacket::UpdateTimeSensitiveHeaders(waitingPacketsHead_);
00547b27          
00547b32          if (waitingPacketsHead_->checksum_ == 0)
00547b36              NetPacket::ComputeChecksum(waitingPacketsHead_);
00547b36          
00547b47          uint32_t eax_4;
00547b47          
00547b47          if ((((int8_t)(waitingPacketsHead_->flags_ >> 2)) & 1) == 0)
00547be8              waitingPacketsHead_->seqNum_ = this->highestIDSent_;
00547b47          else
00547b47          {
00547b54              if ((waitingPacketsHead_->flags_ & 1) == 0)
00547b54              {
00547b60                  uint32_t cryptoKey_ = waitingPacketsHead_->cryptoKey_;
00547b6a                  uint32_t* ecx_7 = nullptr;
00547b6a                  
00547b72                  if ((waitingPacketsHead_->seqNum_ == 0 || ebx == 0))
00547b72                  {
00547b7a                      uint32_t highestIDSent_ = this->highestIDSent_;
00547b7a                      this->highestIDSent_ += 1;
00547b7a                      
00547b80                      if (highestIDSent_ == 0xffffffff)
00547b82                          this->highestIDSent_ = 1;
00547b82                      
00547b92                      waitingPacketsHead_->seqNum_ = this->highestIDSent_;
00547b72                  }
00547b72                  else
00547b74                      ecx_7 = &cryptoKey_;
00547b74                  
00547b98                  uint32_t seqNum__1 = waitingPacketsHead_->seqNum_;
00547bac                  class ReceiverData* myReceiverData_ = this->myReceiverData_;
00547bb3                  uint32_t checksum_ = waitingPacketsHead_->checksum_;
00547bb7                  eax_4 = ReceiverData::Encrypt(myReceiverData_, seqNum__1, &checksum_, 4, ecx_7);
00547bc6                  uint32_t ecx_9 = (waitingPacketsHead_->flags_ | 1);
00547bc9                  waitingPacketsHead_->checksum_ = checksum_;
00547bcf                  waitingPacketsHead_->flags_ = ecx_9;
00547bd5                  waitingPacketsHead_->cryptoKey_ = eax_4;
00547b54              }
00547b54              
00547bdb              var_10_1 |= 2;
00547b47          }
00547b47          
00547bf4          seqNum_ = waitingPacketsHead_->seqNum_;
00547bfe          uint32_t checksum__1 = waitingPacketsHead_->checksum_;
00547c02          eax_4 = waitingPacketsHead_->size_;
00547c09          int16_t var_4_1 = eax_4;
00547c09          
00547c2c          if (SharedNet::SendPacket(PacketController::Instance()->net_, waitingPacketsHead_, &seqNum_, &this->addr_) == 0)
00547c2c          {
00547cb7              eax = var_1d;
00547cc2              return eax;
00547c2c          }
00547c2c          
00547c38          this->vtable->RecordBytesSent((waitingPacketsHead_->size_ + 0x14));
00547c53          this->m_cPacketsSent += 1;
00547c53          
00547c59          if ((var_10_1 & 0x200000) != 0)
00547c5b              this->myRecip_->m_ConnectionState = cs_DisconnectSent;
00547c5b          
00547c74          int32_t* eax_13 = this->vtable->DequeuePacket(&this->waitingPacketsHead_, &this->waitingPacketsTail_);
00547c74          
00547c85          if ((((int8_t)(waitingPacketsHead_->flags_ >> 2)) & 1) != 0)
00547c8b              SentPacketStore::AddSentPacket(&this->m_sentPacketStore, waitingPacketsHead_);
00547c8b          
00547ca0          if ((InterlockedDecrement(&eax_13[1]) == 0 && eax_13 != 0))
00547ca9              **(uint32_t**)eax_13(1);
00547ca9          
00547cab          var_1d = 1;
00547ab0      }
00547a60  }

00547cc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00547cd0  void __thiscall ClientFlowQueue::Enqueue(class ClientFlowQueue* this, class NetBlob* arg2)

00547cd0  {
00547cdd      if (this->myRecip_->m_ConnectionState <= cs_Connected)
00547cdd      {
00547ce8          InterlockedIncrement(&arg2->m_cRef);
00547cf9          PQueueArray<unsigned long,void *>::Insert(&this->pqueue_, arg2->priority_, arg2);
00547d0c          PacketController::EnqueueRecip(PacketController::Instance(), this->myRecip_);
00547cdd      }
00547cd0  }

00547d16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00547d20  class NetBlob* __fastcall ClientFlowQueue::Dequeue(class ClientFlowQueue* this, int32_t arg2)

00547d20  {
00547d33      int32_t var_8 = 0;
00547d3b      void var_4;
00547d3b      int32_t eax = PQueueArray<unsigned long,void *>::RemoveMin(&this->pqueue_, &var_4, &var_8);
00547d44      char temp1 = eax;
00547d44      eax = -(eax);
00547d4d      return ((eax - eax) & var_8);
00547d20  }


00547d50  void __thiscall NIListIter<unsigned long>::AddBeforeCur(class NIListIter<unsigned long>* this, uint32_t arg2)

00547d50  {
00547d58      if (this->prev_ == 0)
00547d58      {
00547d5b          class NIList<unsigned long>* list_ = this->list_;
00547d5f          class NIListElement<unsigned long>* eax_1 = operator new(8);
00547d5f          
00547d69          if (eax_1 == 0)
00547d78              eax_1 = nullptr;
00547d69          else
00547d69          {
00547d6b              class NIListElement<unsigned long>* head_ = list_->head_;
00547d71              eax_1->data_ = arg2;
00547d73              eax_1->next_ = head_;
00547d69          }
00547d69          
00547d7d          bool cond:0 = list_->tail_ != 0;
00547d7f          list_->head_ = eax_1;
00547d7f          
00547d81          if (!(cond:0))
00547d83              list_->tail_ = eax_1;
00547d83          
00547d8b          this->prev_ = this->list_->head_;
00547d8f          return;
00547d58      }
00547d58      
00547d97      if (this->cur_ == 0)
00547d97      {
00547da0          NIList<NetBlob *>::AddToTail(this->list_, arg2);
00547daa          this->prev_ = this->list_->tail_;
00547dae          return;
00547d97      }
00547d97      
00547db3      class NIListElement<unsigned long>* eax_5 = operator new(8);
00547db3      
00547dbd      if (eax_5 == 0)
00547dbd      {
00547dd8          this->prev_->next_ = nullptr;
00547de0          this->prev_ = nullptr;
00547de4          return;
00547dbd      }
00547dbd      
00547dbf      class NIListElement<unsigned long>* cur_ = this->cur_;
00547dc6      eax_5->data_ = arg2;
00547dc8      eax_5->next_ = cur_;
00547dcb      this->prev_->next_ = eax_5;
00547dd1      this->prev_ = eax_5;
00547d50  }

00547de7                       90 90 90 90 90 90 90 90 90                                                         .........

00547df0  class COptionalHeader* CPackObjHeader<NetError,2097152,2>::CreateFromData(class NetError const* arg1)

00547df0  {
00547df1      class NetError* ebx = arg1;
00547dfb      uint32_t eax_1 = ebx->vtable->GetPackSize();
00547e01      void* eax_2 = operator new[](eax_1);
00547e06      struct NetError::VTable* vtable = ebx->vtable;
00547e15      arg1 = eax_2;
00547e15      
00547e1e      if (vtable->Pack(&arg1, eax_1) == eax_1)
00547e1e      {
00547e31          struct CPackObjHeader<NetError,2097152,2>::VTable** result = operator new(0x30);
00547e31          
00547e3b          if (result != 0)
00547e3b          {
00547e3d              result[4] = eax_2;
00547e40              result[6] = eax_2;
00547e44              result[5] = eax_1;
00547e47              result[7] = eax_1;
00547e4b              result[1] = 1;
00547e52              result[2] = 0x200000;
00547e59              result[3] = 2;
00547e60              *(uint32_t*)result = &CPackObjHeader<class NetError,2097152,2>::`vftable';
00547e66              result[8] = 0x794878;
00547e6e              return result;
00547e3b          }
00547e1e      }
00547e1e      else
00547e21          operator delete(eax_2);
00547e21      
00547e2e      return 0;
00547df0  }

00547e6f                                               90                                                                 .

00547e70  class COptionalHeader* COnePrimHeader<4194304,7,CICMDCommandStruct>::CreateFromData(struct CICMDCommandStruct arg1)

00547e70  {
00547e72      void* result = operator new(0x20);
00547e72      
00547e7c      if (result == 0)
00547eb6          return 0;
00547eb6      
00547e85      *(uint32_t*)((char*)result + 0x18) = arg1.Cmd;
00547e8b      *(uint32_t*)((char*)result + 4) = 1;
00547e92      *(uint32_t*)((char*)result + 8) = 0x400000;
00547e99      *(uint32_t*)((char*)result + 0xc) = 7;
00547ea0      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
00547ea3      *(uint32_t*)((char*)result + 0x14) = 8;
00547eaa      *(uint32_t*)result = 0x7ca508;
00547eb0      *(uint32_t*)((char*)result + 0x1c) = arg1.Param;
00547eb3      return result;
00547e70  }

00547eb7                                                                       90 90 90 90 90 90 90 90 90                         .........

00547ec0  int32_t __thiscall ClientFlowQueue::OnLocalIntervalAck(class ClientFlowQueue* this, struct IntervalData const* arg2)

00547ec0  {
00547ec4      uint16_t intervalID_ = arg2->intervalID_;
00547ec9      uint16_t lastIntervalAcked_ = this->lastIntervalAcked_;
00547ec9      
00547ed3      if (intervalID_ != lastIntervalAcked_)
00547ed3      {
00547ed8          uint16_t esi_2 = (intervalID_ - lastIntervalAcked_);
00547ede          int32_t edi_1 = 1;
00547ede          
00547ee3          if (intervalID_ < lastIntervalAcked_)
00547ee3          {
00547ee7              esi_2 = (lastIntervalAcked_ - intervalID_);
00547ee9              edi_1 = 0xffffffff;
00547ee3          }
00547ee3          
00547ef1          if (esi_2 > 0x7fff)
00547ef3              edi_1 = -(edi_1);
00547ef3          
00547ef9          if (edi_1 > 0)
00547ef9          {
00547efb              this->lastIntervalAcked_ = intervalID_;
00547f07              return 1;
00547ef9          }
00547ed3      }
00547ed3      
00547f0c      return 0;
00547ec0  }

00547f0f                                               90                                                                 .

00547f10  void __thiscall ClientFlowQueue::IncrementLocalInterval(class ClientFlowQueue* this, uint32_t arg2)

00547f10  {
00547f1d      uint32_t intervalID_ = ((uint32_t)this->CurLocalInterval_.intervalID_);
00547f2e      uint32_t temp1 = (COMBINE(0, (intervalID_ + arg2)) % 6);
00547f40      int32_t Timer::cur_time_2;
00547f40      
00547f40      if ((temp1 == 1 || arg2 >= 6))
00547f40      {
00547f55      label_547f55:
00547f55          int32_t eax_4 = *(int32_t*)((char*)Timer::cur_time + 4);
00547f5a          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
00547f62          int32_t var_24_1 = eax_4;
00547f64          Timer::cur_time_2 = Timer::cur_time_1;
00547f68          int32_t var_c_1 = eax_4;
00547f6c          class COptionalHeader* eax_5 = CTimeSyncHeader::CreateFromData(Timer::cur_time_1);
00547f79          FlowQueue::EnqueueOptionalHeader(this, eax_5);
00547f79          
00547f8a          if ((InterlockedDecrement(&eax_5->m_cRef) == 0 && eax_5 != 0))
00547f8c              eax_5->vtable->__vecDelDtor(1);
00547f8c          
00547f94          class COptionalHeader* eax_8 = CEchoRequestHeader::CreateFromData();
00547f9e          FlowQueue::EnqueueOptionalHeader(this, eax_8);
00547f9e          
00547faf          if ((InterlockedDecrement(&eax_8->m_cRef) == 0 && eax_8 != 0))
00547fb1              eax_8->vtable->__vecDelDtor(1);
00547f40      }
00547f40      else if ((temp1 > 0 && temp1 < (COMBINE(0, intervalID_) % 6)))
00547f53          goto label_547f55;
00547f53      
00547fb9      uint32_t intervalID__1 = ((uint32_t)this->CurLocalInterval_.intervalID_);
00547fca      uint32_t temp1_2 = (COMBINE(0, (intervalID__1 + arg2)) % 0xdc);
00547fca      
00547fd9      if ((temp1_2 == 1 || arg2 >= 0xdc))
00547fd9      {
00547ffd      label_547ffd:
00547ffd          int32_t var_24_6 = 0;
00548004          class COptionalHeader* eax_15 = COnePrimHeader<4194304,7,CICMDCommandStruct>::CreateFromData(1);
00548016          Timer::cur_time_2 = this->addr_.sin_family;
0054801d          int32_t var_c_2 = this->addr_.sin_addr.S_un.S_un_b.s_w1;
0054802c          int32_t var_8_1 = this->addr_.sin_zero[0];
00548030          int32_t var_4_1 = this->addr_.sin_zero[4];
00548048          *(uint16_t*)((char*)Timer::cur_time_2)[2] = Ordinal_WSOCK32_9((Ordinal_WSOCK32_15(Timer::cur_time_2) + 1));
00548055          SharedNet::SendOptionalHeader(SharedNet::s_pNet, eax_15, &Timer::cur_time_2, nullptr);
00548055          
00548066          if ((InterlockedDecrement(&eax_15->m_cRef) == 0 && eax_15 != 0))
00548068              eax_15->vtable->__vecDelDtor(1);
00547fd9      }
00547fd9      else if ((temp1_2 > 0 && temp1_2 < (COMBINE(0, intervalID__1) % 0xdc)))
00547ff0          goto label_547ffd;
00547ff0      
00548070      this->CurLocalInterval_.intervalID_ += arg2;
00547f10  }

00548081     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00548090  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,int> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,int> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,int> *,0>* this, uint32_t arg2)

00548090  {
0054809b      arg2 = arg2;
0054809f      uint8_t edx = ((int8_t)arg2);
005480a3      this->m_buckets = nullptr;
005480a6      this->m_firstInterestingBucket = nullptr;
005480a9      this->m_numBuckets = 0;
005480ac      this->m_numElements = 0;
005480b0      this->vtable = 0x7ca4fc;
005480b6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005480c9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
005480c9      
005480d3      if (eax == bucketSizesEnd_1)
005480d5          eax -= 4;
005480d5      
005480d8      uint32_t eax_1 = *(uint32_t*)eax;
005480dd      this->m_numBuckets = eax_1;
005480dd      
005480e0      if (eax_1 > 0x17)
005480f6          this->m_buckets = operator new[]((eax_1 << 2));
005480e0      else
005480e5          this->m_buckets = &this->m_aInplaceBuckets;
005480e5      
005480fc      class HashTableData<unsigned long,int>** m_buckets = this->m_buckets;
005480ff      uint32_t ecx_3 = (this->m_numBuckets << 2);
00548105      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00548116      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00548090  }

0054811f                                                                                               90                                 .

00548120  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>* this, class HashTableData<unsigned long,ArchiveVersionRow>* arg2)

00548120  {
00548126      uint32_t m_hashKey = arg2->m_hashKey;
00548132      class HashTableData<unsigned long,ArchiveVersionRow>** edx_2 = &this->m_buckets[(COMBINE(0, m_hashKey) % this->m_numBuckets)];
00548132      
00548139      for (int32_t* i = *(uint32_t*)edx_2; i != 0; i = i[1])
00548139      {
00548142          if (*(uint32_t*)i == m_hashKey)
00548142          {
0054816a              if (i == 0)
0054816a                  break;
0054816a              
0054816e              i = 0;
00548170              return 0;
00548142          }
00548139      }
00548139      
0054814d      arg2->m_hashNext = *(uint32_t*)edx_2;
00548150      *(uint32_t*)edx_2 = arg2;
00548150      
00548155      if (edx_2 < this->m_firstInterestingBucket)
00548157          this->m_firstInterestingBucket = edx_2;
00548157      
00548160      this->m_numElements += 1;
00548163      uint32_t eax_4;
00548163      eax_4 = 1;
00548165      return 1;
00548120  }

0054813d                                                                                         8d 49 00                               .I.
00548173                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00548180  void* __thiscall HashTable<unsigned long,int,0>::`scalar deleting destructor'(class HashTable<unsigned long,int,0>* this, uint32_t arg2)

00548180  {
00548189      this->vtable = 0x7ca510;
0054818f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00548194      class HashTableData<unsigned long,int>** m_buckets = this->m_intrusiveTable.m_buckets;
00548184      this->m_intrusiveTable.vtable = 0x7ca4fc;
00548184      
005481a2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
005481a5          operator delete[](m_buckets);
005481a5      
00548184      this->m_intrusiveTable.m_buckets = nullptr;
00548184      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00548184      this->m_intrusiveTable.m_numBuckets = 0;
00548184      this->m_intrusiveTable.m_numElements = 0;
00548184      
005481c0      if ((arg2 & 1) != 0)
005481c3          operator delete(this);
005481c3      
005481cf      return this;
00548180  }

005481d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005481e0  void __thiscall FlowQueue::FlowQueue(class FlowQueue* this, struct sockaddr_in arg2, uint16_t arg3, float arg4)

005481e0  {
005481e6      this->vtable = 0x7ca514;
005481ec      this->waitingPacketsHead_ = nullptr;
005481ef      this->waitingPacketsTail_ = nullptr;
005481f5      this->m_ackList.head_ = 0;
005481f8      this->m_ackList.tail_ = nullptr;
005481fb      SentPacketStore::SentPacketStore(&this->m_sentPacketStore);
00548200      this->m_emptyAckList.head_ = 0;
00548206      this->m_emptyAckList.tail_ = nullptr;
00548214      this->empties_.vtable = 0x7ca510;
0054821e      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,int> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,int> *,0>(&this->empties_.m_intrusiveTable, 0x20);
00548223      int32_t ecx_2;
00548223      ecx_2 = arg2.sin_family;
00548223      *(uint16_t*)((char*)ecx_2)[2] = arg2.sin_port;
0054822b      this->addr_.sin_family = ecx_2;
0054822b      this->addr_.sin_port = *(uint16_t*)((char*)ecx_2)[2];
00548233      int32_t ecx_3;
00548233      ecx_3 = arg2.sin_zero[0];
00548233      *(uint8_t*)((char*)ecx_3)[1] = arg2.sin_zero[1];
00548233      *(uint8_t*)((char*)ecx_3)[2] = arg2.sin_zero[2];
00548233      *(uint8_t*)((char*)ecx_3)[3] = arg2.sin_zero[3];
0054822b      this->addr_.sin_addr.S_un = arg2.sin_addr.S_un;
0054823a      int32_t edx_1;
0054823a      edx_1 = arg2.sin_zero[4];
0054823a      *(uint8_t*)((char*)edx_1)[1] = arg2.sin_zero[5];
0054823a      *(uint8_t*)((char*)edx_1)[2] = arg2.sin_zero[6];
0054823a      *(uint8_t*)((char*)edx_1)[3] = arg2.sin_zero[7];
0054822b      this->addr_.sin_zero[0] = ecx_3;
0054822b      this->addr_.sin_zero[1] = *(uint8_t*)((char*)ecx_3)[1];
0054822b      this->addr_.sin_zero[2] = *(uint8_t*)((char*)ecx_3)[2];
0054822b      this->addr_.sin_zero[3] = *(uint8_t*)((char*)ecx_3)[3];
00548241      this->emptyNum_ = 0;
00548247      this->m_cPacketsSent = 0;
0054824d      this->m_cPacketsAcked = 0;
00548253      this->highestIDSent_ = 1;
0054822b      this->addr_.sin_zero[4] = edx_1;
0054822b      this->addr_.sin_zero[5] = *(uint8_t*)((char*)edx_1)[1];
0054822b      this->addr_.sin_zero[6] = *(uint8_t*)((char*)edx_1)[2];
0054822b      this->addr_.sin_zero[7] = *(uint8_t*)((char*)edx_1)[3];
00548260      this->myRecip_ = nullptr;
0054826b      ecx_3 = arg3;
00548275      class ClientNet* net_ = PacketController::Instance()->net_;
00548278      class ReceiverData* eax_2;
00548278      
00548278      if (ecx_3 >= 0x100)
00548289          eax_2 = nullptr;
00548278      else
00548283          eax_2 = (((((uint32_t)ecx_3) * 0x88) + net_) + 0x20);
00548283      
0054828b      this->myReceiverData_ = eax_2;
00548291      this->netID_ = ecx_3;
0054829d      this->pqueueSpecial_.vtable = 0x7ca4e8;
005482a7      this->pqueueSpecial_.curNumNodes = 0;
005482b2      this->pqueueSpecial_.A = operator new[](0x200);
005482bd      this->pqueueSpecial_.minAllocatedNodes = 0x40;
005482c3      this->pqueueSpecial_.allocatedNodes = 0x40;
005482c9      int32_t Timer::local_time_1 = (*(uint32_t*)Timer::local_time);
005482ce      int32_t ecx_4 = *(int32_t*)((char*)Timer::local_time + 4);
005482d7      this->lastIntervalAcked_ = 0;
005482de      this->intervalTime_ = Timer::local_time_1;
005482e5      *(uint32_t*)((char*)this->intervalTime_)[4] = ecx_4;
005481e0  }

005482f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00548300  void __fastcall FlowQueue::~FlowQueue(class FlowQueue* this)

00548300  {
00548303      this->vtable = 0x7ca514;
00548311      this->pqueueSpecial_.vtable = 0x7ca4e8;
0054831b      operator delete[](this->pqueueSpecial_.A);
0054832b      this->empties_.vtable = 0x7ca510;
00548335      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->empties_.m_intrusiveTable);
0054833a      class HashTableData<unsigned long,int>** m_buckets = this->empties_.m_intrusiveTable.m_buckets;
00548320      this->empties_.m_intrusiveTable.vtable = 0x7ca4fc;
00548320      
00548348      if (m_buckets != &this->empties_.m_intrusiveTable.m_aInplaceBuckets)
0054834b          operator delete[](m_buckets);
0054834b      
00548320      this->empties_.m_intrusiveTable.m_buckets = nullptr;
00548320      this->empties_.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00548320      this->empties_.m_intrusiveTable.m_numBuckets = 0;
00548320      this->empties_.m_intrusiveTable.m_numElements = 0;
00548367      NIList<NetBlob *>::DeleteContents(&this->m_emptyAckList);
0054836f      SentPacketStore::~SentPacketStore(&this->m_sentPacketStore);
00548379      /* tailcall */
00548379      return NIList<NetBlob *>::DeleteContents(&this->m_ackList);
00548300  }

0054837e                                                                                            90 90                                ..

00548380  void __fastcall FlowQueue::EnqueueEmptyAck(class FlowQueue* this, uint32_t arg2)

00548380  {
00548380      class FlowQueue* this_1 = this;
00548383      uint32_t i = arg2;
0054839c      int32_t* eax_3 = this->empties_.m_intrusiveTable.m_buckets[(COMBINE(0, i) % this->empties_.m_intrusiveTable.m_numBuckets)];
0054839c      
005483a0      if (eax_3 == 0)
005483a0      {
005483c3      label_5483c3:
005483c3          this->emptyNum_ += 1;
005483c9          uint32_t* eax_5 = operator new(8);
005483c9          
005483d3          if (eax_5 == 0)
005483e0              eax_5 = nullptr;
005483d3          else
005483d3          {
005483d5              *(uint32_t*)eax_5 = i;
005483d7              eax_5[1] = 0;
005483d3          }
005483d3          
005483e2          class NIListElement<unsigned long>* tail_ = this->m_emptyAckList.tail_;
005483e2          
005483ea          if (tail_ != 0)
005483ea          {
005483fa              tail_->next_ = eax_5;
00548406              this->m_emptyAckList.tail_ = this->m_emptyAckList.tail_->next_;
005483ea          }
005483ea          else
005483ea          {
005483ec              this->m_emptyAckList.head_ = eax_5;
005483f2              this->m_emptyAckList.tail_ = eax_5;
005483ea          }
005483ea          
00548423          this->m_cPacketsAcked += 1;
00548429          this_1 = nullptr;
00548431          HashTable<ControlSpecification,enum ControlType,0>::add(&this->empties_.vtable, &arg2, &this_1);
005483a0      }
005483a0      else
005483a0      {
005483a4          while (*(uint32_t*)eax_3 != i)
005483a4          {
005483a6              eax_3 = eax_3[1];
005483a6              
005483ab              if (eax_3 == 0)
005483ab                  goto label_5483c3;
005483a4          }
005483a4          
005483b8          if ((eax_3 == 0 || eax_3 == 0xfffffff8))
005483b1              goto label_5483c3;
005483a0      }
00548380  }

0054843c                                                                                      90 90 90 90                              ....

00548440  int32_t __thiscall FlowQueue::DequeueEmptyAck(class FlowQueue* this, uint32_t* arg2)

00548440  {
00548443      class NIListElement<unsigned long>* head_ = this->m_emptyAckList.head_;
00548443      
0054844b      if (head_ == 0)
0054844b      {
005484ae          *(uint32_t*)arg2 = 0;
005484b7          return 0;
0054844b      }
0054844b      
00548457      this->emptyNum_ -= 1;
0054845d      uint32_t data_;
0054845d      
0054845d      if (head_ != 0)
0054845d      {
00548463          class NIListElement<unsigned long>* next_ = head_->next_;
00548468          this->m_emptyAckList.head_ = next_;
00548468          
0054846e          if (next_ == 0)
00548470              this->m_emptyAckList.tail_ = next_;
00548470          
00548476          data_ = head_->data_;
00548479          operator delete(head_);
0054845d      }
0054845d      else
0054845f          data_ = 0;
0054845f      
0054848c      *(uint32_t*)arg2 = data_;
0054848e      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_1 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->empties_.m_intrusiveTable, arg2);
0054848e      
00548496      if (eax_1 != 0)
00548499          operator delete(eax_1);
00548499      
005484a7      return 1;
00548440  }

005484ba                                                                                90 90 90 90 90 90                            ......

005484c0  void __fastcall FlowQueue::CompileEmptyAcks(class FlowQueue* this)

005484c0  {
005484c0      class FlowQueue* this_1 = this;
005484c6      int32_t emptyNum_ = this->emptyNum_;
005484c6      
005484d9      if ((emptyNum_ == 0 || this->emptyAcks_[0] != 0))
005484d9      {
00548524          this->emptyAcks_[0] = 0;
00548524          return;
005484d9      }
005484d9      
005484de      if (emptyNum_ > 0x72)
005484e0          emptyNum_ = 0x72;
005484e0      
005484e5      int32_t edi_1 = 1;
005484ec      this->emptyAcks_[0] = emptyNum_;
005484ec      
005484f2      if (emptyNum_ >= 1)
005484f2      {
005484fa          class FlowQueue** ebx_2 = &this->emptyAcks_[1];
005484fa          
00548507          while (FlowQueue::DequeueEmptyAck(this, &this_1) != 0)
00548507          {
00548514              *(uint32_t*)ebx_2 = this_1;
00548516              edi_1 += 1;
00548517              ebx_2 = &ebx_2[1];
00548517              
0054851c              if (edi_1 > emptyNum_)
00548523                  return;
00548507          }
005484f2      }
005484c0  }

00548534                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00548540  uint8_t __fastcall FlowQueue::TransmitNaks(class FlowQueue* this)

00548540  {
00548547      FlowQueue::CompileEmptyAcks(this);
0054854c      uint32_t esi = this->emptyAcks_[0];
0054854c      
00548554      if (esi == 0)
00548554      {
005485a6          int32_t eax;
005485a6          eax = 0;
005485a9          return 0;
00548554      }
00548554      
0054855b      void* eax_1 = operator new(0x1e4);
00548565      class COptionalHeader* esi_1;
00548565      
00548565      if (eax_1 == 0)
0054857a          esi_1 = nullptr;
00548565      else
00548576          esi_1 = CSeqIDListHeader<8192,33>::CSeqIDListHeader<8192,33>(eax_1, &this->emptyAcks_[1], esi);
00548576      
0054857f      FlowQueue::EnqueueOptionalHeader(this, esi_1);
0054857f      
00548594      if ((InterlockedDecrement(&esi_1->m_cRef) == 0 && esi_1 != 0))
00548596          esi_1->vtable->__vecDelDtor(1);
00548596      
005485a0      int32_t eax_3;
005485a0      eax_3 = 1;
005485a3      return 1;
00548540  }

005485aa                                90 90 90 90 90 90                                                            ......

005485b0  uint8_t __fastcall FlowQueue::TransmitAcks(class FlowQueue* this)

005485b0  {
005485b6      class FlowQueue* this_1 = this;
005485be      class ReceiverData* eax;
005485be      eax = this_1->myReceiverData_->iteration_;
005485c2      this = this_1->netID_;
005485c9      uint16_t intervalID_ = this_1->CurLocalInterval_.intervalID_;
005485d0      int16_t var_8 = this;
005485d7      uint32_t seqNum__1 = 0;
005485df      int32_t var_10 = 3;
005485e7      int32_t var_c = 0;
005485ef      uint16_t intervalID = intervalID_;
005485f4      int16_t var_4 = 0;
005485fb      int16_t var_2 = eax;
00548600      int32_t ebp = 0;
00548602      class NetPacket* i_1;
00548602      uint32_t edx;
00548602      i_1 = FlowQueue::DequeueAck(this_1);
00548607      class NetPacket* i = i_1;
00548607      
0054860b      if (i != 0)
0054860b      {
005486d7          do
005486d7          {
00548623              if ((i->numFrags_ != 0 || i->numSpecialFrags_ != 0))
00548623              {
00548638                  int32_t var_10_1 = 3;
00548638                  
00548648                  if (i->numFrags_ != 0)
0054864a                      int32_t var_10_2 = 7;
0054864a                  
00548659                  NetPacket::ApplySpecialFrags(i, &seqNum__1);
00548664                  seqNum__1 = i->seqNum_;
0054866e                  uint32_t checksum_ = i->checksum_;
00548679                  int16_t var_4_1 = i->size_;
00548679                  
0054869c                  if (SharedNet::SendPacket(PacketController::Instance()->net_, i, &seqNum__1, &this_1->addr_) != 0)
0054869c                  {
005486a4                      this_1->vtable->RecordBytesSent((i->size_ + 0x14));
005486af                      this_1->m_cPacketsSent += 1;
0054869c                  }
0054869c                  
005486b5                  ebp += 1;
00548623              }
00548623              else
00548623              {
0054862b                  uint32_t seqNum_ = i->seqNum_;
0054862e                  FlowQueue::EnqueueEmptyAck(this_1, edx);
00548623              }
00548623              
005486c2              if (InterlockedDecrement(&i->m_cRef) == 0)
005486c4                  i->vtable->__vecDelDtor(1);
005486c4              
005486ce              class NetPacket* i_2;
005486ce              i_2 = FlowQueue::DequeueAck(this_1);
005486d3              i = i_2;
005486d7          } while (i != 0);
005486d7          
005486df          if (ebp != 0)
005486e1              PacketController::Instance()->net_->vtable->__vecDelDtor(0xa, ebp);
0054860b      }
0054860b      
005486ff      return ebp > 0;
005485b0  }


00548700  void __thiscall ClientFlowQueue::ClientFlowQueue(class ClientFlowQueue* this, struct sockaddr_in arg2, uint16_t arg3, float arg4)

00548700  {
00548704      int32_t edx;
00548704      edx = arg2.sin_family;
00548704      *(uint16_t*)((char*)edx)[2] = arg2.sin_port;
0054871d      int32_t edx_1;
0054871d      edx_1 = arg2.sin_zero[0];
0054871d      *(uint8_t*)((char*)edx_1)[1] = arg2.sin_zero[1];
0054871d      *(uint8_t*)((char*)edx_1)[2] = arg2.sin_zero[2];
0054871d      *(uint8_t*)((char*)edx_1)[3] = arg2.sin_zero[3];
00548721      union in_addr::__unnamed S_un = arg2.sin_addr.S_un;
00548724      int32_t eax_1;
00548724      eax_1 = arg2.sin_zero[4];
00548724      *(uint8_t*)((char*)eax_1)[1] = arg2.sin_zero[5];
00548724      *(uint8_t*)((char*)eax_1)[2] = arg2.sin_zero[6];
00548724      *(uint8_t*)((char*)eax_1)[3] = arg2.sin_zero[7];
00548728      int32_t var_18 = edx_1;
0054872b      int32_t var_14 = eax_1;
00548730      FlowQueue::FlowQueue(this, edx, arg3, arg4);
00548735      this->vtable = 0x7ca540;
00548740      this->pqueue_.vtable = 0x7ca4e8;
0054874a      this->pqueue_.curNumNodes = 0;
0054875c      this->pqueue_.A = operator new[](0x200);
0054876d      this->pqueue_.minAllocatedNodes = 0x40;
00548773      this->pqueue_.allocatedNodes = 0x40;
00548787      this->netID_ = *(uint16_t*)(((((uint32_t)arg3) * 0x88) + SharedNet::s_pNet) + 0x4c);
0054878f      this->CurLocalInterval_.nBytes_ = 0;
00548799      this->CurLocalInterval_.FlowLevel_ = 0xa;
005487a3      this->CurLocalInterval_.intervalID_ = 1;
005487ac      this->CurLocalInterval_.nPkts_ = 0;
00548700  }

005487bc                                                                                      90 90 90 90                              ....

005487c0  void* __thiscall FlowQueue::`scalar deleting destructor'(class FlowQueue* this, uint32_t arg2)

005487c0  {
005487c3      FlowQueue::~FlowQueue(this);
005487c3      
005487cd      if ((arg2 & 1) != 0)
005487d0          operator delete(this);
005487d0      
005487db      return this;
005487c0  }

005487de                                                                                            90 90                                ..

005487e0  void __fastcall FlowQueue::Destroy(class FlowQueue* this)

005487e0  {
005487e0      class FlowQueue* this_1 = this;
005487f2      int32_t* i_2;
005487f2      
005487f2      for (int32_t* i = this->vtable->Dequeue(1); i != 0; i = i_2)
005487f2      {
00548804          if ((InterlockedDecrement(&i[1]) == 0 && i != 0))
0054880c              **(uint32_t**)i(1);
0054880c          
00548814          int32_t ecx_3;
00548814          i_2 = this->vtable->Dequeue(1);
005487f2      }
005487f2      
0054882e      int32_t i_1;
0054882e      
0054882e      do
00548827          i_1 = FlowQueue::DequeueEmptyAck(this, &this_1);
0054882e       while (i_1 != 0);
00548833      NIList<NetBlob *>::DeleteContents(&this->m_ackList);
00548833      
00548840      while (this->waitingPacketsHead_ != 0)
00548840      {
0054884b          int32_t* eax_5 = this->vtable->DequeuePacket(&this->waitingPacketsHead_, &this->waitingPacketsTail_);
00548854          int32_t eax_7;
00548854          int32_t ecx_7;
00548854          eax_7 = InterlockedDecrement(&eax_5[1]);
00548854          
00548860          if ((eax_7 == 0 && eax_5 != 0))
00548868              **(uint32_t**)eax_5(1);
00548840      }
00548840      
00548880      while (true)
00548880      {
00548880          int32_t curNumNodes = this->pqueueSpecial_.curNumNodes;
00548880          
00548885          if (curNumNodes <= 0)
005488d1              return;
005488d1          
00548887          class PQueueArray<unsigned long,void *>::PQueueNode* A = this->pqueueSpecial_.A;
00548887          
0054888c          if (A == 0)
005488d1              return;
005488d1          
00548891          void* data = A->data;
00548891          
00548894          if (curNumNodes <= 1)
00548875              this->pqueueSpecial_.curNumNodes = 0;
00548894          else
00548894          {
00548875              this->pqueueSpecial_.curNumNodes = (curNumNodes - 1);
0054889d              A->key = A[(curNumNodes - 1)].key;
005488a3              A->data = A[(curNumNodes - 1)].data;
00548894          }
00548894          
005488af          PQueueArray<unsigned long,void *>::_Heapify(&this->pqueueSpecial_, 1);
005488af          
005488b6          if (data == 0)
005488d1              return;
005488d1          
005488c0          if (InterlockedDecrement(((char*)data + 4)) == 0)
005488c8              **(uint32_t**)data(1);
00548880      }
005487e0  }

005488d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005488e0  void __thiscall FlowQueue::EnqueueAcks(class FlowQueue* this, uint32_t const* arg2, int32_t arg3)

005488e0  {
005488ed      class NIListElement<unsigned long>* i = this->m_ackList.head_;
005488f0      int32_t edi = 0;
005488f2      class NIList<unsigned long>* var_c = &this->m_ackList;
005488f6      int32_t eax_2 = arg3;
005488fc      class NIListElement<unsigned long>* i_1 = i;
00548900      int32_t var_4 = 0;
00548900      
00548904      if (eax_2 > 0)
00548904      {
00548912          while (i != 0)
00548912          {
00548918              uint32_t data_ = i->data_;
0054891b              uint32_t ecx = arg2[edi];
0054891b              
00548920              if (ecx == data_)
00548920              {
005489ae              label_5489ae:
005489ae                  class NIListElement<unsigned long>* i_2 = i;
005489b2                  i = i->next_;
005489b5                  i_1 = i;
005489b9                  edi += 1;
00548920              }
00548920              else
00548920              {
00548928                  uint32_t edx_2 = (ecx - data_);
0054892c                  int32_t esi_1 = 1;
0054892c                  
00548931                  if (ecx < data_)
00548931                  {
00548935                      edx_2 = (data_ - ecx);
00548937                      esi_1 = 0xffffffff;
00548931                  }
00548931                  
00548940                  if (edx_2 > 0x7fffffff)
00548942                      esi_1 = -(esi_1);
00548942                  
00548946                  if (esi_1 >= 0)
00548946                  {
0054897b                      if (ecx == data_)
0054897b                          goto label_5489ae;
0054897b                      
0054897f                      uint32_t edx_6 = (ecx - data_);
00548983                      int32_t esi_3 = 1;
00548983                      
00548988                      if (ecx < data_)
00548988                      {
0054898c                          edx_6 = (data_ - ecx);
0054898e                          esi_3 = 0xffffffff;
00548988                      }
00548988                      
00548997                      if (edx_6 > 0x7fffffff)
00548999                          esi_3 = -(esi_3);
00548999                      
0054899d                      if (esi_3 <= 0)
0054899d                          goto label_5489ae;
0054899d                      
005489a3                      NIListIter<unsigned long>::RemoveCur(&var_c);
005489a8                      i = i_1;
00548946                  }
00548946                  else
00548946                  {
00548950                      int32_t eax_3;
00548950                      uint32_t edx_4;
00548950                      eax_3 = SentPacketStore::Contains(&this->m_sentPacketStore, ecx);
00548950                      
00548957                      if (eax_3 == 0)
00548957                      {
0054896f                          int32_t var_24_3 = arg2[edi];
00548972                          FlowQueue::EnqueueEmptyAck(this, edx_4);
00548957                      }
00548957                      else
00548957                      {
00548961                          NIListIter<unsigned long>::AddBeforeCur(&var_c, arg2[edi]);
00548966                          i = i_1;
00548957                      }
00548957                      
005489b9                      edi += 1;
00548946                  }
00548920              }
00548920              
005489ba              eax_2 = arg3;
005489ba              
005489c0              if (edi >= eax_2)
005489cd                  return;
00548912          }
00548912          
005489d2          if (edi < eax_2)
005489d2          {
00548a12              do
00548a12              {
005489e6                  int32_t eax_6;
005489e6                  uint32_t edx_8;
005489e6                  eax_6 = SentPacketStore::Contains(&this->m_sentPacketStore, arg2[edi]);
005489e6                  
005489ed                  if (eax_6 == 0)
005489ed                  {
00548a01                      int32_t var_24_6 = arg2[edi];
00548a06                      FlowQueue::EnqueueEmptyAck(this, edx_8);
005489ed                  }
005489ed                  else
005489f7                      NIListIter<unsigned long>::AddBeforeCur(&var_c, arg2[edi]);
005489f7                  
00548a0f                  edi += 1;
00548a12              } while (edi < arg3);
005489d2          }
00548904      }
005488e0  }

005489dd                                                                                         8d 49 00                               .I.
00548a1e                                                                                            90 90                                ..

00548a20  void __fastcall FlowQueue::Empty(class FlowQueue* this)

00548a20  {
00548a39      if ((this->addr_.sin_addr.S_un != 0 && this->myReceiverData_ != 0))
00548a39      {
00548a3f          FlowQueue::TransmitNaks(this);
00548a46          FlowQueue::TransmitAcks(this);
00548a4d          FlowQueue::TransmitNewPackets(this);
00548a5c          class RecipientData* eax_2;
00548a5c          
00548a5c          if (this->myRecip_->m_ConnectionState == cs_DisconnectReceived)
00548a5c          {
00548a63              if (this->waitingPacketsHead_ != 0)
00548a63              {
00548a6b                  long double st0_1 = ReceiverData::GetConnectionStateDuration(this->myReceiverData_);
00548a70                  long double temp1_1 = ((long double)10.0);
00548a70                  (st0_1 - temp1_1);
00548a76                  eax_2 = ((((st0_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00548a63              }
00548a63              
00548a7b              if ((this->waitingPacketsHead_ == 0 || (*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0))
00548a7b              {
00548a83                  class COptionalHeader* eax_3 = CPackObjHeader<NetError,2097152,2>::CreateFromData(&ID_NetError_None);
00548a90                  FlowQueue::EnqueueOptionalHeader(this, eax_3);
00548a97                  ReferenceCountTemplate<1048576,0>::Release(eax_3);
00548a7b              }
00548a5c          }
00548a5c          
00548a9d          long double x87_r7_2 = ((long double)Timer::local_time);
00548aa3          int32_t ecx_5 = 0;
00548aa5          long double temp0_1 = ((long double)this->intervalTime_);
00548aa5          (x87_r7_2 - temp0_1);
00548aab          eax_2 = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0x3800))));
00548aab          
00548ab0          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
00548ab0          {
00548ab2              long double x87_r6_1 = ((long double)this->intervalTime_);
00548ab2              
00548ad0              do
00548ad0              {
00548ac0                  x87_r6_1 = (x87_r6_1 + ((long double)0.5));
00548ac6                  ecx_5 += 1;
00548ac9                  (x87_r7_2 - x87_r6_1);
00548acb                  eax_2 = ((((x87_r7_2 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == x87_r6_1) ? 1 : 0) << 0xe) | 0x3000))));
00548ad0              } while ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0);
00548ad0              
00548ad4              this->intervalTime_ = ((double)x87_r6_1);
00548ad4              
00548adc              if (ecx_5 != 0)
00548ade                  this->vtable->IncrementLocalInterval(ecx_5);
00548ab0          }
00548a39      }
00548a20  }

00548aba                                                                                8d 9b 00 00 00 00                            ......
00548aec                                      90 90 90 90                                                              ....

00548af0  void __fastcall ClientFlowQueue::~ClientFlowQueue(class ClientFlowQueue* this)

00548af0  {
00548af3      this->vtable = 0x7ca540;
00548af9      FlowQueue::Destroy(this);
00548b05      this->pqueue_.vtable = 0x7ca4e8;
00548b0f      operator delete[](this->pqueue_.A);
00548b1a      /* tailcall */
00548b1a      return FlowQueue::~FlowQueue(this);
00548af0  }

00548b1f                                                                                               90                                 .

00548b20  void* __thiscall ClientFlowQueue::`scalar deleting destructor'(class ClientFlowQueue* this, uint32_t arg2)

00548b20  {
00548b23      this->vtable = 0x7ca540;
00548b29      FlowQueue::Destroy(this);
00548b35      this->pqueue_.vtable = 0x7ca4e8;
00548b3f      operator delete[](this->pqueue_.A);
00548b49      FlowQueue::~FlowQueue(this);
00548b49      
00548b53      if ((arg2 & 1) != 0)
00548b56          operator delete(this);
00548b56      
00548b61      return this;
00548b20  }

00548b64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00548b70  void FlowQueue::SharedStaticInit()

00548b70  {
00548b8a      class PStringBase<unsigned short> var_4;
00548b8a      PStringBase<unsigned short>::allocate_ref_buffer(&var_4, wcslen(u"The rate of NetBlobs released fr…"));
00548b9f      wcscpy(var_4, u"The rate of NetBlobs released fr…");
00548bb0      class PStringBase<unsigned short> var_8;
00548bb0      PStringBase<unsigned short>::allocate_ref_buffer(&var_8, wcslen(u"Net - NetBlobs FlowQueue dequeue…"));
00548bbf      wcscpy(var_8, u"Net - NetBlobs FlowQueue dequeue…");
00548bc8      class PerfMonCounterInfo* eax_3 = PerfMonCounterInfo::LookupExistingCounterByName(&var_8, 9);
00548bc8      
00548bd2      if (eax_3 == 0)
00548bee          PerfMonCounterFactory::CreateNewCounter(&FlowQueue::m_pBlobsDequeuedCounter, PER_SEC, &var_8, &var_4, 9);
00548bd2      else
00548bd4          FlowQueue::m_pBlobsDequeuedCounter = eax_3;
00548bd4      
00548c00      int32_t* esi_1 = (var_8 - 0x14);
00548c00      
00548c0f      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00548c17          **(uint32_t**)esi_1(1);
00548c17      
00548c1d      int32_t* esi_3 = (var_4 - 0x14);
00548c1d      
00548c2c      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00548c34          **(uint32_t**)esi_3(1);
00548b70  }

00548c3c                                                                                      90 90 90 90                              ....

00548c40  void __fastcall NetInterface::NetInterface(class NetInterface* this)

00548c40  {
00548c42      NetInterface::netInterface_ = this;
00548c40  }

00548c48                          90 90 90 90 90 90 90 90                                                          ........

00548c50  uint64_t __thiscall NetInterface::GetNonEphemeralID(class NetInterface* this)

00548c50  {
00548c59      /* jump -> PacketController::Instance()->vtable->GetNonEphemeralID */
00548c50  }

00548c5b                                                                                   90 90 90 90 90                             .....

00548c60  void __thiscall ReceiverData::AddToQueue(class ReceiverData* this, class ReceiverData** arg2, class ReceiverData** arg3)

00548c60  {
00548c67      if (*(uint32_t*)arg2 == 0)
00548c67      {
00548c69          *(uint32_t*)arg2 = this;
00548c6f          *(uint32_t*)arg3 = this;
00548c71          return;
00548c67      }
00548c67      
00548c78      *(uint32_t*)arg3->next_ = this;
00548c7f      this->prev_ = *(uint32_t*)arg3;
00548c82      *(uint32_t*)arg3 = this;
00548c60  }

00548c87                       90 90 90 90 90 90 90 90 90                                                         .........

00548c90  void __thiscall ReceiverData::RemoveFromQueue(class ReceiverData* this, class ReceiverData** arg2, class ReceiverData** arg3)

00548c90  {
00548c90      class ReceiverData* prev_ = this->prev_;
00548c90      
00548c98      if (prev_ != 0)
00548c98      {
00548c9a          class ReceiverData* next__1 = this->next_;
00548c9a          
00548c9f          if (next__1 != 0)
00548c9f          {
00548ca1              prev_->next_ = next__1;
00548ca7              this->next_->prev_ = this->prev_;
00548cad              this->prev_ = nullptr;
00548cb0              this->next_ = nullptr;
00548cb4              return;
00548c9f          }
00548c9f          
00548cb9          if (prev_ != 0)
00548cb9          {
00548cbf              prev_->next_ = nullptr;
00548cc5              *(uint32_t*)arg3 = this->prev_;
00548cc7              this->prev_ = nullptr;
00548cca              this->next_ = nullptr;
00548cce              return;
00548cb9          }
00548c98      }
00548c98      
00548cd1      class ReceiverData* next_ = this->next_;
00548cd1      
00548cd6      if (next_ != 0)
00548cd6      {
00548cdc          next_->prev_ = nullptr;
00548ce2          *(uint32_t*)arg2 = this->next_;
00548ce4          this->prev_ = nullptr;
00548ce7          this->next_ = nullptr;
00548ceb          return;
00548cd6      }
00548cd6      
00548cf2      *(uint32_t*)arg2 = nullptr;
00548cf8      *(uint32_t*)arg3 = nullptr;
00548cfa      this->prev_ = nullptr;
00548cfd      this->next_ = nullptr;
00548c90  }

00548d04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00548d10  uint32_t __thiscall ReceiverData::Encrypt(class ReceiverData* this, uint32_t arg2, uint8_t* arg3, uint32_t arg4, uint32_t* arg5)

00548d10  {
00548d13      /* tailcall */
00548d13      return CryptoSystem::EncryptData(this->cryptoOutgoing_, arg2, arg3, arg4, arg5);
00548d10  }

00548d18                                                                          90 90 90 90 90 90 90 90                          ........

00548d20  uint32_t __thiscall ReceiverData::Decrypt(class ReceiverData* this, uint32_t arg2, uint8_t* arg3, uint32_t arg4, uint32_t* arg5)

00548d20  {
00548d23      /* tailcall */
00548d23      return CryptoSystem::EncryptData(this->cryptoIncoming_, arg2, arg3, arg4, arg5);
00548d20  }

00548d28                          90 90 90 90 90 90 90 90                                                          ........

00548d30  void __thiscall AVLNode<unsigned long,unsigned long>::AVLNode<unsigned long,unsigned long>(class AVLNode<unsigned long,unsigned long>* this, uint32_t arg2, uint32_t* arg3, class AVLNode<unsigned long,unsigned long>* arg4)

00548d30  {
00548d3a      this->_parent = arg4;
00548d42      this->_key = arg2;
00548d49      this->_left = 0;
00548d4f      this->_right = nullptr;
00548d56      this->_leftHeight = 1;
00548d59      this->_rightHeight = 1;
00548d5c      this->_height = 1;
00548d5f      this->_data = arg3;
00548d62      this->_parentsize = 1;
00548d30  }

00548d68                          90 90 90 90 90 90 90 90                                                          ........

00548d70  void __thiscall ReceiverData::SetConnectionState(class ReceiverData* this, enum ConnectionState arg2)

00548d70  {
00548d7b      this->m_TimeLastConnectionStateChanged = (*(uint32_t*)Timer::local_time);
00548d82      *(uint32_t*)((char*)this->m_TimeLastConnectionStateChanged)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00548d85      this->m_ConnectionState = arg2;
00548d70  }

00548d8b                                   90 90 90 90 90                                                             .....

00548d90  double __fastcall ReceiverData::GetConnectionStateDuration(class ReceiverData const* this)

00548d90  {
00548d99      return ((int64_t)(((long double)Timer::local_time) - ((long double)this->m_TimeLastConnectionStateChanged)));
00548d90  }

00548d9a                                                                                90 90 90 90 90 90                            ......

00548da0  void __thiscall ReceiverData::InitCrypto(class ReceiverData* this, uint32_t arg2, uint32_t arg3)

00548da0  {
00548da4      class CryptoSystem* cryptoIncoming_ = this->cryptoIncoming_;
00548da4      
00548da9      if (cryptoIncoming_ != 0)
00548da9      {
00548dad          CryptoSystem::~CryptoSystem(cryptoIncoming_);
00548db3          operator delete(cryptoIncoming_);
00548da9      }
00548da9      
00548dbb      class CryptoSystem* cryptoOutgoing_ = this->cryptoOutgoing_;
00548dc0      this->cryptoIncoming_ = nullptr;
00548dc0      
00548dc7      if (cryptoOutgoing_ != 0)
00548dc7      {
00548dcb          CryptoSystem::~CryptoSystem(cryptoOutgoing_);
00548dd1          operator delete(cryptoOutgoing_);
00548dc7      }
00548dc7      
00548ddb      this->cryptoOutgoing_ = nullptr;
00548de2      void* eax = operator new(0xc);
00548dec      class CryptoSystem* eax_1;
00548dec      
00548dec      if (eax == 0)
00548dfc          eax_1 = nullptr;
00548dec      else
00548df5          eax_1 = CryptoSystem::CryptoSystem(eax, arg2);
00548df5      
00548e00      this->cryptoIncoming_ = eax_1;
00548e03      class CryptoSystem* eax_2 = operator new(0xc);
00548e03      
00548e0d      if (eax_2 != 0)
00548e0d      {
00548e1c          this->cryptoOutgoing_ = CryptoSystem::CryptoSystem(eax_2, arg3);
00548e20          return;
00548e0d      }
00548e0d      
00548e26      this->cryptoOutgoing_ = nullptr;
00548da0  }

00548e2d                                         90 90 90                                                               ...

00548e30  void __fastcall ReceiverData::ReceiverData(class ReceiverData* this)

00548e30  {
00548e34      this->m_RecID = 0;
00548e37      __builtin_memset(&this->highestIDReceived_, 0, 0x14);
00548e46      this->cryptoOutgoing_ = nullptr;
00548e49      this->cryptoIncoming_ = nullptr;
00548e4c      this->keyExch_ = nullptr;
00548e4f      this->m_NetID = 0;
00548e53      this->m_NakState = UNDEF_STATE;
00548e56      this->m_ConnectionState = cs_Disconnected;
00548e59      this->m_SeqIDsWeNAKed._root = 0;
00548e5c      this->m_SeqIDsWeNAKed._currNum = 0;
00548e5f      this->m_TimeLastConnectionStateChanged = 0f;
00548e62      *(uint32_t*)((char*)this->m_TimeLastConnectionStateChanged)[4] = 0;
00548e65      this->m_BytesReceived = 0;
00548e30  }

00548e69                             90 90 90 90 90 90 90                                                           .......

00548e70  void __fastcall ReceiverData::~ReceiverData(class ReceiverData* this)

00548e70  {
00548e74      class CryptoSystem* cryptoIncoming_ = this->cryptoIncoming_;
00548e74      
00548e79      if (cryptoIncoming_ != 0)
00548e79      {
00548e7d          CryptoSystem::~CryptoSystem(cryptoIncoming_);
00548e83          operator delete(cryptoIncoming_);
00548e79      }
00548e79      
00548e8b      class CryptoSystem* cryptoOutgoing_ = this->cryptoOutgoing_;
00548e90      this->cryptoIncoming_ = nullptr;
00548e90      
00548e97      if (cryptoOutgoing_ != 0)
00548e97      {
00548e9b          CryptoSystem::~CryptoSystem(cryptoOutgoing_);
00548ea1          operator delete(cryptoOutgoing_);
00548e97      }
00548e97      
00548ea9      this->cryptoOutgoing_ = nullptr;
00548eb0      class AVLNode<unsigned long,unsigned long>* _root = this->m_SeqIDsWeNAKed._root;
00548eb0      
00548eb5      if (_root != 0)
00548eb5      {
00548eb7          class AVLNode<unsigned long,unsigned long>* _left = _root->_left;
00548eb7          
00548ebb          if (_left != 0)
00548ebf              AVLNode<unsigned long,unsigned long>::`scalar deleting destructor'(_left, 1);
00548ebf          
00548ec4          class AVLNode<unsigned long,unsigned long>* _right = _root->_right;
00548ec4          
00548ec9          if (_right != 0)
00548ecd              AVLNode<unsigned long,unsigned long>::`scalar deleting destructor'(_right, 1);
00548ecd          
00548ed3          _root->_left = 0;
00548ed9          _root->_right = nullptr;
00548ee0          operator delete(_root);
00548eb5      }
00548e70  }

00548eeb                                   90 90 90 90 90                                                             .....

00548ef0  void __thiscall ReceiverData::SharedInit(class ReceiverData* this, struct sockaddr_in* arg2, uint32_t arg3, uint16_t arg4, uint16_t arg5, uint16_t arg6, uint16_t arg7, class NetKeyExch* arg8, uint32_t arg9, uint32_t arg10)

00548ef0  {
00548ef3      class NetKeyExch* keyExch_ = this->keyExch_;
00548ef3      
00548ef8      if (keyExch_ != 0)
00548ef8      {
00548efa          int32_t eax;
00548efa          eax = keyExch_->vtable;
00548efa          *(uint16_t*)((char*)eax)[2] = *(uint16_t*)((char*)keyExch_->vtable)[2];
00548efe          *(uint32_t*)eax(1);
00548ef8      }
00548ef8      
00548f08      this->keyExch_ = arg8;
00548f0b      int32_t ecx_1;
00548f0b      ecx_1 = arg2->sin_family;
00548f0b      *(uint16_t*)((char*)ecx_1)[2] = arg2->sin_port;
00548f0d      this->m_Addr.sin_family = ecx_1;
00548f0d      this->m_Addr.sin_port = *(uint16_t*)((char*)ecx_1)[2];
00548f0d      this->m_Addr.sin_addr.S_un = arg2->sin_addr.S_un;
00548f18      int32_t ecx_3;
00548f18      ecx_3 = arg2->sin_zero[0];
00548f18      *(uint8_t*)((char*)ecx_3)[1] = arg2->sin_zero[1];
00548f18      *(uint8_t*)((char*)ecx_3)[2] = arg2->sin_zero[2];
00548f18      *(uint8_t*)((char*)ecx_3)[3] = arg2->sin_zero[3];
00548f0d      this->m_Addr.sin_zero[0] = ecx_3;
00548f0d      this->m_Addr.sin_zero[1] = *(uint8_t*)((char*)ecx_3)[1];
00548f0d      this->m_Addr.sin_zero[2] = *(uint8_t*)((char*)ecx_3)[2];
00548f0d      this->m_Addr.sin_zero[3] = *(uint8_t*)((char*)ecx_3)[3];
00548f1e      int32_t eax_2;
00548f1e      eax_2 = arg2->sin_zero[4];
00548f1e      *(uint8_t*)((char*)eax_2)[1] = arg2->sin_zero[5];
00548f1e      *(uint8_t*)((char*)eax_2)[2] = arg2->sin_zero[6];
00548f1e      *(uint8_t*)((char*)eax_2)[3] = arg2->sin_zero[7];
00548f0d      this->m_Addr.sin_zero[4] = eax_2;
00548f0d      this->m_Addr.sin_zero[5] = *(uint8_t*)((char*)eax_2)[1];
00548f0d      this->m_Addr.sin_zero[6] = *(uint8_t*)((char*)eax_2)[2];
00548f0d      this->m_Addr.sin_zero[7] = *(uint8_t*)((char*)eax_2)[3];
00548f28      struct sockaddr_in* edx;
00548f28      edx = arg4;
00548f2d      this->highestIDReceived_ = arg3;
00548f30      this->m_RecID = edx;
00548f3e      *(uint32_t*)((char*)this->timeStamp_)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00548f41      int32_t ecx_5;
00548f41      ecx_5 = arg5;
00548f46      this->timeStamp_ = (*(uint32_t*)Timer::cur_time);
00548f4f      int32_t eax_4 = *(int32_t*)((char*)Timer::local_time + 4);
00548f54      this->m_TimeLastConnectionStateChanged = (*(uint32_t*)Timer::local_time);
00548f57      int32_t edx_1;
00548f57      edx_1 = arg7;
00548f5c      this->m_NetID = ecx_5;
00548f64      this->m_CurrentRemoteInterval = edx_1;
00548f6d      *(uint32_t*)((char*)this->m_TimeLastConnectionStateChanged)[4] = eax_4;
00548f70      eax_4 = arg6;
00548f78      this->m_qwReferralCookie = 0;
00548f7f      *(uint32_t*)((char*)this->m_qwReferralCookie)[4] = 0;
00548f86      this->iteration_ = eax_4;
00548f8a      ReceiverData::InitCrypto(this, arg9, arg10);
00548ef0  }

00548f93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00548fa0  void __thiscall ReceiverData::Init(class ReceiverData* this, struct sockaddr_in arg2, uint32_t arg3, uint16_t arg4, uint16_t arg5, uint16_t arg6, uint16_t arg7, class NetKeyExch* arg8, uint32_t arg9, uint32_t arg10)

00548fa0  {
00548fd2      this->RoundTripLatency_ = 0f;
00548fd9      ReceiverData::SharedInit(this, &arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
00548fe9      this->localtimeLastHeartbeat_ = (*(uint32_t*)Timer::local_time);
00548fef      *(uint32_t*)((char*)this->localtimeLastHeartbeat_)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00548fa0  }

00548ff9                                                                             90 90 90 90 90 90 90                           .......

00549000  void __fastcall ReceiverData::Clear(class ReceiverData* this)

00549000  {
00549007      this->next_ = nullptr;
0054900a      this->prev_ = nullptr;
0054900d      this->highestIDReceived_ = 0;
00549010      this->m_RecID = 0;
00549013      this->m_NetID = 0;
00549022      this->m_TimeLastConnectionStateChanged = (*(uint32_t*)Timer::local_time);
00549025      *(uint32_t*)((char*)this->m_TimeLastConnectionStateChanged)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00549028      class AVLNode<unsigned long,unsigned long>* _root = this->m_SeqIDsWeNAKed._root;
00549028      
0054902d      if (_root != 0)
0054902d      {
0054902f          class AVLNode<unsigned long,unsigned long>* _left = _root->_left;
0054902f          
00549033          if (_left != 0)
00549037              AVLNode<unsigned long,unsigned long>::`scalar deleting destructor'(_left, 1);
00549037          
0054903c          class AVLNode<unsigned long,unsigned long>* _right = _root->_right;
0054903c          
00549041          if (_right != 0)
00549045              AVLNode<unsigned long,unsigned long>::`scalar deleting destructor'(_right, 1);
00549045          
0054904b          _root->_left = 0;
0054904d          _root->_right = nullptr;
00549050          operator delete(_root);
0054902d      }
0054902d      
00549058      this->m_SeqIDsWeNAKed._root = 0;
0054905b      this->m_SeqIDsWeNAKed._currNum = 0;
0054905e      class CryptoSystem* cryptoIncoming_ = this->cryptoIncoming_;
00549063      this->m_NakState = UNDEF_STATE;
00549066      this->m_ConnectionState = cs_Disconnected;
00549069      this->timeStamp_ = 0f;
0054906c      *(uint32_t*)((char*)this->timeStamp_)[4] = 0;
0054906c      
0054906f      if (cryptoIncoming_ != 0)
0054906f      {
00549073          CryptoSystem::~CryptoSystem(cryptoIncoming_);
00549079          operator delete(cryptoIncoming_);
0054906f      }
0054906f      
00549081      class CryptoSystem* cryptoOutgoing_ = this->cryptoOutgoing_;
00549086      this->cryptoIncoming_ = nullptr;
00549086      
00549089      if (cryptoOutgoing_ != 0)
00549089      {
0054908d          CryptoSystem::~CryptoSystem(cryptoOutgoing_);
00549093          operator delete(cryptoOutgoing_);
00549089      }
00549089      
0054909b      class NetKeyExch* keyExch_ = this->keyExch_;
005490a0      this->cryptoOutgoing_ = nullptr;
005490a0      
005490a3      if (keyExch_ != 0)
005490a3      {
005490a5          int32_t edx_4;
005490a5          edx_4 = keyExch_->vtable;
005490a5          *(uint16_t*)((char*)edx_4)[2] = *(uint16_t*)((char*)keyExch_->vtable)[2];
005490a9          *(uint32_t*)edx_4(1);
005490a3      }
005490a3      
005490ab      this->keyExch_ = nullptr;
00549000  }

005490b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005490c0  int32_t __thiscall ReceiverData::GetNaks(class ReceiverData* this, uint32_t* arg2)

005490c0  {
005490c0      uint32_t _currNum = this->m_SeqIDsWeNAKed._currNum;
005490c0      
005490c6      if (_currNum > 0x72)
005490c8          _currNum = 0x72;
005490c8      
005490cd      class AVLNode<unsigned long,unsigned long>* ecx = this->m_SeqIDsWeNAKed._root;
005490d1      int32_t i_1 = 0;
005490d5      int32_t edi;
005490d5      int32_t var_8 = edi;
005490d5      
005490d6      if (ecx != 0)
005490d6      {
005490d8          class AVLNode<unsigned long,unsigned long>* i;
005490d8          i = ecx->_left;
005490d8          *(uint16_t*)((char*)i)[2] = *(uint16_t*)((char*)ecx->_left)[2];
005490d8          
005490dc          while (i != 0)
005490dc          {
005490e0              ecx = i;
005490e2              i = ecx->_left;
005490e2              *(uint16_t*)((char*)i)[2] = *(uint16_t*)((char*)ecx->_left)[2];
005490dc          }
005490dc          
005490ea          if (ecx != 0)
005490ea          {
005490f3              while (i_1 < 0x73)
005490f3              {
005490f8                  arg2[i_1] = ecx->_key;
005490fb                  class AVLNode<unsigned long,unsigned long>* _right = ecx->_right;
005490fe                  i_1 += 1;
005490fe                  
00549101                  if (_right == 0)
00549101                  {
00549121                      while (true)
00549121                      {
00549121                          _right = ecx->_parentsize;
00549126                          ecx = ecx->_parent;
00549126                          
00549129                          if (_right != 0)
00549129                              break;
00549129                          
0054912d                          if (ecx == 0)
00549131                              return _currNum;
00549121                      }
00549101                  }
00549101                  else
00549101                  {
00549103                      ecx = _right;
00549103                      
00549107                      if (ecx == 0)
00549107                          break;
00549107                      
00549110                      while (true)
00549110                      {
00549110                          class AVLNode<unsigned long,unsigned long>* edx_1;
00549110                          edx_1 = ecx->_left;
00549110                          *(uint16_t*)((char*)edx_1)[2] = *(uint16_t*)((char*)ecx->_left)[2];
00549110                          
00549114                          if (edx_1 == 0)
00549114                              break;
00549114                          
00549116                          ecx = edx_1;
00549116                          
0054911a                          if (ecx == 0)
0054911e                              return _currNum;
00549110                      }
00549101                  }
00549101                  
00549136                  if (ecx == 0)
00549136                      break;
005490f3              }
005490ea          }
005490d6      }
005490d6      
0054913a      return _currNum;
005490c0  }

0054913d                                                                                         90 90 90                               ...

00549140  uint32_t* __thiscall AVL<unsigned long,unsigned long>::Add(class AVL<unsigned long,unsigned long>* this, uint32_t arg2, uint32_t* arg3)

00549140  {
00549142      class AVL<unsigned long,unsigned long>* this_1 = this;
00549144      class AVLNode<unsigned long,unsigned long>* i = this_1->_root;
00549144      
0054914b      if (i == 0)
0054914b      {
0054914f          void* eax = operator new(0x24);
0054914f          
0054915d          if (eax == 0)
0054915d          {
00549195              this_1->_root = 0;
0054919c              this_1->_currNum += 1;
005491a3              return arg3;
0054915d          }
0054915d          
00549163          *(uint32_t*)eax = 0;
00549165          *(uint32_t*)((char*)eax + 4) = 0;
00549168          *(uint32_t*)((char*)eax + 8) = 0;
00549170          *(uint32_t*)((char*)eax + 0x18) = arg2;
00549173          *(uint32_t*)((char*)eax + 0xc) = 1;
00549176          *(uint32_t*)((char*)eax + 0x10) = 1;
00549179          *(uint32_t*)((char*)eax + 0x14) = 1;
0054917c          *(uint32_t*)((char*)eax + 0x1c) = arg3;
0054917f          *(uint8_t*)((char*)eax + 0x20) = 1;
00549182          this_1->_root = eax;
00549189          this_1->_currNum += 1;
00549190          return arg3;
0054914b      }
0054914b      
005491c5      class AVLNode<unsigned long,unsigned long>* i_1;
005491c5      
005491c5      do
005491c5      {
005491b3          this = arg2 < i->_key;
005491b8          i_1 = i;
005491b8          
005491ba          if (this == 0)
005491c0              i = i->_right;
005491ba          else
005491bc              i = i->_left;
005491c5      } while (i != 0);
005491c5      
005491cb      uint32_t* ebp;
005491cb      
005491cb      if (this == 0)
005491cb      {
005491f9          class AVLNode<unsigned long,unsigned long>* eax_9 = operator new(0x24);
00549203          ebp = arg3;
00549207          class AVLNode<unsigned long,unsigned long>* eax_10;
00549207          
00549207          if (eax_9 == 0)
00549215              eax_10 = nullptr;
00549207          else
0054920e              eax_10 = AVLNode<unsigned long,unsigned long>::AVLNode<unsigned long,unsigned long>(eax_9, arg2, ebp, i_1);
0054920e          
00549217          i_1->_right = eax_10;
0054921a          eax_10->_parentsize = 0;
005491cb      }
005491cb      else
005491cb      {
005491cd          void* eax_7 = operator new(0x24);
005491d7          ebp = arg3;
005491d7          
005491db          if (eax_7 == 0)
005491db          {
005491f1              i_1->_left = 0;
005491f3              *(uint32_t*)0x20 = 1;
005491db          }
005491db          else
005491db          {
005491e2              void* eax_8 = AVLNode<unsigned long,unsigned long>::AVLNode<unsigned long,unsigned long>(eax_7, arg2, ebp, i_1);
005491e7              i_1->_left = eax_8;
005491e9              *(uint8_t*)((char*)eax_8 + 0x20) = 1;
005491db          }
005491cb      }
005491cb      
00549223      AVL<unsigned long,unsigned long>::ReBalanceTree(this_1, i_1, nullptr);
0054922d      this_1->_currNum += 1;
00549235      return ebp;
00549140  }

005491ad                                         8d 49 00                                                               .I.
00549238                                                                          90 90 90 90 90 90 90 90                          ........

00549240  void __thiscall ReceiverData::AddNakked(class ReceiverData* this, uint32_t arg2, uint32_t* arg3)

00549240  {
00549244      if (this->m_NakState == NO_NAK_STATE)
00549246          this->m_NakState = NAK_STATE;
00549246      
0054924d      class AVLNode<unsigned long,unsigned long>* eax = this->m_SeqIDsWeNAKed._root;
00549253      uint32_t esi = arg2;
0054925b      uint32_t edx;
0054925b      
0054925b      if (eax == 0)
0054925b      {
0054927d      label_54927d:
0054927d          uint32_t* eax_2 = arg3;
00549283          arg2 = 0;
00549283          
0054928b          if (eax_2 == 0)
0054928b          {
00549290              uint32_t var_c_1 = esi;
00549296              arg2 = CryptoSystem::GetNextCryptoSeed(this->cryptoIncoming_, edx);
0054929a              eax_2 = &arg2;
0054928b          }
0054928b          
005492a4          AVL<unsigned long,unsigned long>::Add(&this->m_SeqIDsWeNAKed, esi, *(uint32_t*)eax_2);
0054925b      }
0054925b      else
0054925b      {
00549260          while (true)
00549260          {
00549260              edx = eax->_key;
00549260              
00549265              if (esi == edx)
00549265                  break;
00549265              
00549267              if (esi >= edx)
0054926d                  eax = eax->_right;
00549267              else
00549269                  eax = eax->_left;
00549269              
00549272              if (eax == 0)
00549272                  goto label_54927d;
00549260          }
00549260          
00549276          edx = eax->_data;
00549276          
0054927b          if (edx == 0)
0054927b              goto label_54927d;
0054925b      }
00549240  }

005492ae                                            90 90                                                                ..

005492b0  void __fastcall NetPacket::ComputeChecksum(class NetPacket* this)

005492b0  {
005492c2      uint32_t ecx_1 = (this->flags_ & 0xfffffffe);
005492c7      bool cond:0 = this->numSpecialFrags_ <= 0;
005492c9      this->checksum_ = 0;
005492d3      this->flags_ = ecx_1;
005492d3      
005492d9      if (!(cond:0))
005492d9      {
005492db          class COptionalHeader* (* ebx_1)[0x20] = &this->specialFragList_;
005492de          int32_t i = 0;
005492de          
0054930c          do
0054930c          {
005492e0              class COptionalHeader* eax_1 = ADJ(ebx_1)->specialFragList_[0];
005492ea              uint32_t eax_3 = PortalChecksum::CalcChecksum32(eax_1->m_pData, eax_1->m_cbData);
005492fa              this->checksum_ += eax_3;
00549306              i += 1;
00549307              ebx_1 = &*(uint128_t*)ebx_1[1];
0054930c          } while (i < this->numSpecialFrags_);
005492d9      }
005492d9      
00549314      int32_t i_1 = 0;
00549314      
00549318      if (this->numFrags_ > 0)
00549318      {
0054931a          class BlobFrag* (* ebp_3)[0x1d] = &this->fragList_;
0054931a          
00549368          do
00549368          {
00549320              class BlobFrag* edi_1 = ADJ(ebp_3)->fragList_[0];
00549329              uint32_t eax_7 = PortalChecksum::CalcChecksum32(edi_1->hdrRead_, 0x10);
0054932e              this->checksum_ += eax_7;
00549337              struct BlobFragHeader_t* eax_8;
00549337              eax_8 = edi_1->hdrRead_->blobFragSize;
00549346              uint32_t eax_9 = PortalChecksum::CalcChecksum32(edi_1->dat_, (((uint32_t)eax_8) - 0x10));
00549356              this->checksum_ += eax_9;
00549362              i_1 += 1;
00549363              ebp_3 = &*(uint116_t*)ebp_3[1];
00549368          } while (i_1 < this->numFrags_);
00549318      }
005492b0  }

0054936f                                               90                                                                 .

00549370  uint32_t __thiscall NetPacket::ApplySpecialFrags(class NetPacket* this, class ProtoHeader* arg2)

00549370  {
00549370      uint32_t numSpecialFrags_ = this->numSpecialFrags_;
00549376      int32_t result = 0;
00549376      
0054937a      if (numSpecialFrags_ > 0)
0054937a      {
0054937d          class COptionalHeader* (* ecx)[0x20] = &this->specialFragList_;
00549389          uint32_t i;
00549389          
00549389          do
00549389          {
00549382              result |= ADJ(ecx)->specialFragList_[0]->m_dwMask;
00549385              ecx = &*(uint128_t*)ecx[1];
00549388              i = numSpecialFrags_;
00549388              numSpecialFrags_ -= 1;
00549389          } while (i != 1);
0054937a      }
0054937a      
00549392      if (arg2 != 0)
00549394          arg2->header_ |= result;
00549394      
00549397      return result;
00549370  }

0054939a                                                                                90 90 90 90 90 90                            ......

005493a0  void __thiscall NetPacket::AddToTail(class NetPacket* this, class NetPacket** arg2, class NetPacket** arg3)

005493a0  {
005493a7      if (*(uint32_t*)arg2 == 0)
005493a7      {
005493a9          *(uint32_t*)arg2 = this;
005493af          *(uint32_t*)arg3 = this;
005493b1          return;
005493a7      }
005493a7      
005493b8      *(uint32_t*)arg3->next_ = this;
005493bd      *(uint32_t*)arg3 = this;
005493a0  }

005493c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005493d0  void __thiscall NetPacket::AddToHead(class NetPacket* this, class NetPacket** arg2, class NetPacket** arg3)

005493d0  {
005493d4      class NetPacket* edx = *(uint32_t*)arg2;
005493d4      
005493d8      if (edx == 0)
005493d8      {
005493de          *(uint32_t*)arg3 = this;
005493e0          *(uint32_t*)arg2 = this;
005493e2          this->next_ = nullptr;
005493e9          return;
005493d8      }
005493d8      
005493f4      if ((edx->flags_ & 1) == 0)
005493f4      {
00549415          this->next_ = edx;
00549418          *(uint32_t*)arg2 = this;
00549418          return;
005493f4      }
005493f4      
005493f9      this->next_ = edx->next_;
005493fc      *(uint32_t*)arg2->next_ = this;
005493fc      
0054940d      if (*(uint32_t*)arg3 == *(uint32_t*)arg2)
0054940f          *(uint32_t*)arg3 = this;
005493d0  }

0054941e                                                                                            90 90                                ..

00549420  void __thiscall NetPacket::Remove(class NetPacket* this, class NetPacket* arg2, class NetPacket** arg3, class NetPacket** arg4)

00549420  {
00549426      if (arg2 != 0)
00549426      {
00549445          arg2->next_ = this->next_;
00549445          
0054944e          if (*(uint32_t*)arg4 == this)
00549450              *(uint32_t*)arg4 = arg2;
00549426      }
00549426      else
00549426      {
0054942f          *(uint32_t*)arg3 = this->next_;
0054942f          
00549437          if (*(uint32_t*)arg4 == this)
00549439              *(uint32_t*)arg4 = nullptr;
00549426      }
00549420  }

00549455                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00549460  void __thiscall NetPacket::AddOptionalHeader(class NetPacket* this, class COptionalHeader* arg2)

00549460  {
0054946e      InterlockedIncrement(&arg2->m_cRef);
00549474      uint32_t numSpecialFrags_ = this->numSpecialFrags_;
00549474      
0054947c      if (numSpecialFrags_ > 0)
0054947c      {
0054947e          void* ecx = &&this->next_[numSpecialFrags_];
0054947e          
00549495          do
00549495          {
00549482              void* edx_1 = *(uint32_t*)ecx;
00549482              
0054948a              if (*(uint32_t*)((char*)edx_1 + 8) <= arg2->m_dwMask)
0054948a                  break;
0054948a              
0054948c              *(uint32_t*)((char*)ecx + 4) = edx_1;
0054948f              numSpecialFrags_ -= 1;
00549490              ecx -= 4;
00549495          } while (numSpecialFrags_ > 0);
0054947c      }
0054947c      
00549497      this->specialFragList_[numSpecialFrags_] = arg2;
005494a1      uint32_t size_ = this->size_;
005494a8      this->numSpecialFrags_ += 1;
005494b3      this->size_ = (size_ + arg2->m_cbData);
005494c1      uint32_t eax_2 = PortalChecksum::CalcChecksum32(arg2->m_pData, arg2->m_cbData);
005494c6      this->checksum_ += eax_2;
005494c6      
005494d9      if ((8 & arg2->m_Flags) != 0)
005494db          this->flags_ |= 2;
005494db      
005494e6      if ((arg2->m_Flags & 1) == 0)
005494e8          this->flags_ |= 4;
005494e8      
005494f3      if ((arg2->m_Flags & 0x20) != 0)
005494f5          this->flags_ |= 8;
00549460  }

00549502        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00549510  uint8_t __fastcall NetPacket::RemoveDisposableOptionalHeaders(class NetPacket* this)

00549510  {
0054951d      int32_t eax = 0;
0054951f      int32_t i = 0;
00549523      int32_t var_4 = 0;
00549523      
00549527      if (this->numSpecialFrags_ > 0)
00549527      {
0054952e          class COptionalHeader* (* ebx_1)[0x20] = &this->specialFragList_;
00549532          class COptionalHeader* (* var_8_1)[0x20] = ebx_1;
00549532          
00549585          do
00549585          {
0054953a              class COptionalHeader* esi_1 = ADJ(var_8_1)->specialFragList_[0];
0054953a              
00549540              if ((esi_1->m_Flags & 1) == 0)
00549540              {
00549591                  ADJ(ebx_1)->specialFragList_[0] = esi_1;
0054956a                  var_4 += 1;
0054956e                  ebx_1 = &*(uint128_t*)ebx_1[1];
00549540              }
00549540              else
00549540              {
00549545                  this->size_ -= esi_1->m_cbData;
00549545                  
00549557                  if (InterlockedDecrement(&esi_1->m_cRef) == 0)
00549559                      esi_1->vtable->__vecDelDtor(1);
00549540              }
00549540              
0054957b              i += 1;
00549581              var_8_1 = &*(uint128_t*)var_8_1[1];
00549585          } while (i < this->numSpecialFrags_);
00549585          
00549587          eax = var_4;
00549587          
0054958f          if (i != eax)
0054958f          {
005495a3              uint32_t ecx_10 = (this->flags_ & 0xfffffffe);
005495a6              this->numSpecialFrags_ += (eax - i);
005495ac              this->checksum_ = 0;
005495b6              this->flags_ = ecx_10;
0054958f          }
00549527      }
00549527      
005495c4      eax = i != eax;
005495ca      return eax;
00549510  }

005495cb                                   90 90 90 90 90                                                             .....

005495d0  uint8_t __fastcall NetPacket::UpdateTimeSensitiveHeaders(class NetPacket* this)

005495d0  {
005495db      if ((this->flags_ & 2) != 0)
005495db      {
005495e3          char eax = 0;
005495e5          int32_t i = 0;
005495e5          
005495e9          if (this->numSpecialFrags_ > 0)
005495e9          {
005495ec              class COptionalHeader* (* ebp_1)[0x20] = &this->specialFragList_;
005495ec              
0054960c              do
0054960c              {
005495f0                  class COptionalHeader* ecx_1 = ADJ(ebp_1)->specialFragList_[0];
005495f0                  
005495f7                  if ((ecx_1->m_Flags & 8) != 0)
005495f7                  {
005495f9                      ecx_1->vtable->UpdateTimeSensitivePayload();
005495fe                      eax = 1;
005495f7                  }
005495f7                  
00549606                  i += 1;
00549607                  ebp_1 = &*(uint128_t*)ebp_1[1];
0054960c              } while (i < this->numSpecialFrags_);
0054960c              
00549611              if (eax != 0)
00549611              {
00549613                  this->flags_ &= 0xfffffffe;
0054961b                  this->checksum_ = 0;
00549628                  return 1;
00549611              }
005495e9          }
005495e9          
00549629          this->flags_ &= 0xfffffffd;
005495db      }
005495db      
00549634      return 1;
005495d0  }

00549635                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00549640  void __thiscall NetPacket::AddFrag(class NetPacket* this, class BlobFrag* arg2, uint16_t arg3, uint32_t arg4)

00549640  {
0054964c      if (this->recipient_ == 0)
00549653          this->recipient_ = arg3;
00549653      
00549664      if (arg4 > this->realPriority_)
00549666          this->realPriority_ = arg4;
00549666      
00549674      InterlockedIncrement(&arg2->m_cRef);
00549680      this->fragList_[this->numFrags_] = arg2;
00549687      this->numFrags_ += 1;
00549694      this->size_ += ((uint32_t)arg2->hdrRead_->blobFragSize);
005496a0      uint32_t eax_4 = PortalChecksum::CalcChecksum32(arg2->hdrRead_, 0x10);
005496a5      this->checksum_ += eax_4;
005496ae      eax_4 = arg2->hdrRead_->blobFragSize;
005496bd      uint32_t eax_7 = PortalChecksum::CalcChecksum32(arg2->dat_, (((uint32_t)eax_4) - 0x10));
005496d3      uint32_t eax_9 = (this->flags_ | 4);
005496d7      this->checksum_ += eax_7;
005496dd      this->flags_ = eax_9;
00549640  }

005496e7                       90 90 90 90 90 90 90 90 90                                                         .........

005496f0  void __thiscall BlobFrag::BlobFrag(class BlobFrag* this, class NetBlob* arg2, uint32_t arg3, uint32_t arg4, uint8_t* arg5, uint32_t arg6)

005496f0  {
005496fe      this->blobNextFrag_ = nullptr;
00549701      this->myBlob_ = nullptr;
0054970b      this->m_cRef = 1;
00549712      this->vtable = 0x7ca714;
00549718      this->dat_ = arg5;
0054971b      this->hdrWrite_ = &this->memberHeader_;
0054971e      this->hdrRead_ = &this->memberHeader_;
00549721      InterlockedIncrement(&arg2->m_cRef);
00549727      struct BlobFragHeader_t* hdrWrite_ = this->hdrWrite_;
0054972a      this->myBlob_ = arg2;
00549730      hdrWrite_->blobID = arg2->id;
00549735      *(uint32_t*)((char*)hdrWrite_->blobID)[4] = *(uint32_t*)((char*)arg2->id)[4];
0054973b      int32_t edx_1;
0054973b      edx_1 = this->myBlob_->queueID_;
0054973f      this->hdrWrite_->queueID = edx_1;
0054974a      this->hdrWrite_->blobFragSize = (arg6 + 0x10);
00549754      this->hdrWrite_->numFrags = arg4;
00549763      struct BlobFragHeader_t* edx_2;
00549763      edx_2 = arg3;
00549760      this->hdrWrite_->blobNum = edx_2;
005496f0  }

00549773                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00549780  void* __thiscall BlobFrag::`scalar deleting destructor'(class BlobFrag* this, uint32_t arg2)

00549780  {
00549783      class NetBlob* myBlob_ = this->myBlob_;
00549788      this->vtable = 0x7ca714;
00549788      
0054978e      if (myBlob_ != 0)
00549790          ReferenceCountTemplate<1048576,0>::Release(myBlob_);
00549790      
0054979a      this->vtable = 0x7942f4;
0054979a      
005497a0      if ((arg2 & 1) != 0)
005497a3          operator delete(this);
005497a3      
005497ae      return this;
00549780  }

005497b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005497c0  void __thiscall BlobFrag::BlobFrag(class BlobFrag* this, uint8_t const* arg2, uint32_t arg3, uint32_t* arg4)

005497c0  {
005497ce      this->blobNextFrag_ = nullptr;
005497d1      this->dat_ = nullptr;
005497d4      this->myBlob_ = nullptr;
005497d7      this->hdrWrite_ = nullptr;
005497da      this->hdrRead_ = arg2;
005497dd      this->m_cRef = 1;
005497e4      this->vtable = 0x7ca714;
005497ea      *(uint32_t*)arg4 = 0;
005497ec      struct BlobFragHeader_t* hdrRead_ = this->hdrRead_;
005497ef      uint16_t blobFragSize = hdrRead_->blobFragSize;
005497ef      
0054980b      if ((blobFragSize >= 0x10 && (blobFragSize <= 0x1d0 && ((uint32_t)blobFragSize) <= arg3)))
0054980b      {
00549810          this->dat_ = &arg2[0x10];
00549817          *(uint32_t*)arg4 = ((uint32_t)hdrRead_->blobFragSize);
0054980b      }
005497c0  }

0054981e                                                                                            90 90                                ..

00549820  class BlobFrag* BlobFrag::CreateForSend(class NetBlob* arg1, uint32_t arg2, uint32_t arg3, uint8_t* arg4, uint32_t arg5)

00549820  {
00549822      void* eax = operator new(0x30);
00549822      
0054982c      if (eax == 0)
00549851          return 0;
00549851      
0054984e      return BlobFrag::BlobFrag(eax, arg1, arg2, arg3, arg4, arg5);
00549820  }

00549852                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00549860  class BlobFrag* __convention("regparm") BlobFrag::CreateForRecv(class CBufferIterator* arg1)

00549860  {
00549860      uint32_t ecx;
00549860      uint32_t var_4 = ecx;
00549863      var_4 = 0;
0054986b      void* eax = operator new(0x30);
0054986b      
00549875      if (eax == 0)
005498b5          return 0;
005498b5      
0054987c      uint32_t m_cbBufSize = arg1->m_cbBufSize;
00549880      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
00549885      uint32_t edx;
00549885      
00549885      if (m_dwCurOfs >= m_cbBufSize)
0054988b          edx = 0;
00549885      else
00549887          edx = (m_cbBufSize - m_dwCurOfs);
00549887      
0054989a      int32_t* result = BlobFrag::BlobFrag(eax, &arg1->m_pBuf[m_dwCurOfs], edx, &var_4);
005498a1      uint32_t eax_1 = var_4;
005498a1      
005498a7      if (eax_1 != 0)
005498a9          arg1->m_dwCurOfs += eax_1;
005498a7      else if (result != 0)
005498b8      {
005498c6          if (InterlockedDecrement(&result[1]) == 0)
005498ce              **(uint32_t**)result(1);
005498ce          
005498d5          return 0;
005498b8      }
005498b8      
005498b1      return result;
00549860  }

005498d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005498e0  void __thiscall NetKeyExch::SetPrivateRandom(class NetKeyExch* this, class AC1Legacy::vlong const* arg2)

005498e0  {
005498eb      AC1Legacy::vlong::operator=(&this->rnum_, arg2);
005498f0      this->fInitialized_ = 1;
005498e0  }

005498fb                                                                                   90 90 90 90 90                             .....

00549900  uint32_t __thiscall NetKeyExch::Pack(class NetKeyExch* this, void** arg2, uint32_t arg3)

00549900  {
00549900      class NetKeyExch* this_1 = this;
00549906      struct AC1Legacy::vlong::VTable* vtable = this->rnum_.vtable;
00549915      this_1 = nullptr;
00549926      int32_t result = (vtable->Pack(&this_1, 0) + 4);
00549926      
0054992b      if (arg3 >= result)
0054992b      {
0054990f          this->rnum_.vtable->Pack(arg2, arg3);
00549940          **(uint32_t**)arg2 = this->fInitialized_;
00549942          *(uint32_t*)arg2 += 4;
0054992b      }
0054992b      
0054994c      return result;
00549900  }

0054994f                                               90                                                                 .

00549950  int32_t __thiscall NetKeyExch::UnPack(class NetKeyExch* this, void** arg2, uint32_t arg3)

00549950  {
00549964      int32_t result = this->rnum_.vtable->UnPack(arg2, arg3);
00549964      
00549969      if (result == 0)
0054996d          return result;
0054996d      
00549974      this->fInitialized_ = **(uint32_t**)arg2;
00549977      *(uint32_t*)arg2 += 4;
00549981      return 1;
00549950  }

00549984              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00549990  void __thiscall NetKeyExch::NetKeyExch(class NetKeyExch* this, class PortalDH* arg2)

00549990  {
0054999c      this->vtable = 0x7ca718;
005499a2      this->dh_ = arg2;
005499a5      AC1Legacy::vlong::vlong(&this->rnum_, 0);
005499aa      this->fInitialized_ = 0;
00549990  }

005499b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005499c0  uint32_t __fastcall NetKeyExch::GetPackSize(class NetKeyExch* this)

005499c0  {
005499c0      class NetKeyExch* this_1 = this;
005499c1      struct AC1Legacy::vlong::VTable* vtable = this->rnum_.vtable;
005499ce      this_1 = nullptr;
005499dd      return (vtable->Pack(&this_1, 0) + 4);
005499c0  }

005499de                                                                                            90 90                                ..

005499e0  void* __thiscall NetKeyExch::`scalar deleting destructor'(class NetKeyExch* this, uint32_t arg2)

005499e0  {
005499e8      this->vtable = 0x7ca718;
005499ee      this->fInitialized_ = 0;
005499f1      this->dh_ = nullptr;
005499f4      AC1Legacy::vlong::~vlong(&this->rnum_);
005499fe      this->vtable = 0x79285c;
005499fe      
00549a04      if ((arg2 & 1) != 0)
00549a07          operator delete(this);
00549a07      
00549a12      return this;
005499e0  }

00549a15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00549a20  void __thiscall NetBlob::ReceiveAddFragment(class NetBlob* this, class BlobFrag* arg2)

00549a20  {
00549a20      class NetBlob* this_1 = this;
00549a20      
00549a30      if (this->numFragments_ == 0)
00549a30      {
00549a32          struct BlobFragHeader_t* hdrRead__1 = arg2->hdrRead_;
00549a39          uint32_t numFrags = ((uint32_t)hdrRead__1->numFrags);
00549a39          
00549a40          if ((((uint32_t)hdrRead__1->blobNum) + 1) != numFrags)
00549a5c              this->bufSize_ = (numFrags * 0x1c0);
00549a40          else
00549a51              this->bufSize_ = ((((numFrags - 1) * 0x1c0) + ((uint32_t)hdrRead__1->blobFragSize)) - 0x10);
00549a51          
00549a68          this->buf_ = operator new[](this->bufSize_);
00549a6b          struct BlobFragHeader_t* hdrRead__2 = arg2->hdrRead_;
00549a70          this->id = hdrRead__2->blobID;
00549a76          *(uint32_t*)((char*)this->id)[4] = *(uint32_t*)((char*)hdrRead__2->blobID)[4];
00549a80          this->cMaxFragments_ = ((uint32_t)arg2->hdrRead_->numFrags);
00549a86          struct BlobFragHeader_t* ecx_1;
00549a86          ecx_1 = arg2->hdrRead_->queueID;
00549a8d          this->queueID_ = ecx_1;
00549a30      }
00549a30      
00549a91      struct BlobFragHeader_t* hdrRead_ = arg2->hdrRead_;
00549a94      uint32_t blobNum = ((uint32_t)hdrRead_->blobNum);
00549aa0      uint8_t* buf_ = this->buf_;
00549aa3      uint32_t cMaxFragments__1 = this->cMaxFragments_;
00549ab0      int32_t edx_7 = (((uint32_t)hdrRead_->blobFragSize) - 0x10);
00549ab3      void* edi_1 = ((blobNum * 0x1c0) + buf_);
00549ab3      
00549ab7      if (((uint32_t)hdrRead_->numFrags) == cMaxFragments__1)
00549ab7      {
00549ab9          hdrRead_ = hdrRead_->queueID;
00549ab9          
00549adb          if ((hdrRead_ == this->queueID_ && (blobNum < cMaxFragments__1 && (edx_7 <= 0x1c0 && ((char*)edi_1 + edx_7) <= &buf_[this->bufSize_]))))
00549adb          {
00549aeb              int32_t esi_2;
00549aeb              int32_t edi_2;
00549aeb              edi_2 = __builtin_memcpy(edi_1, arg2->dat_, ((edx_7 >> 2) << 2));
00549af2              __builtin_memcpy(edi_2, esi_2, (edx_7 & 3));
00549af7              uint32_t cMaxFragments_ = this->cMaxFragments_;
00549afe              this->numFragments_ += 1;
00549afe              
00549b0d              if ((cMaxFragments_ > 1 && cMaxFragments_ == (((uint32_t)arg2->hdrRead_->blobNum) + 1)))
00549b18                  this->bufSize_ = (((cMaxFragments_ - 1) * 0x1c0) + edx_7);
00549adb          }
00549ab7      }
00549a20  }

00549b23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00549b30  void __fastcall NetBlob::ReceiveBlobReady(class NetBlob* this)

00549b30  {
00549b30      this->state_ = NETBLOB_RECEIVED;
00549b30  }

00549b38                                                                          90 90 90 90 90 90 90 90                          ........

00549b40  uint8_t __thiscall NetBlob::Send(class NetBlob* this, uint16_t arg2, uint32_t arg3)

00549b40  {
00549b4d      if (*(int32_t*)((char*)SharedNet::s_pNet + 0x8a6e) == 0)
00549b4d      {
00549b4f          class SharedNet* eax;
00549b4f          eax = 0;
00549b51          return 0;
00549b4d      }
00549b4d      
00549b54      uint32_t eax_1 = arg3;
00549b54      
00549b5d      if (eax_1 == 0xcdcdcdcd)
00549b5f          eax_1 = 1;
00549b5f      
00549b6a      this->state_ = NETBLOB_SENDING;
00549b71      this->priority_ = eax_1;
00549b80      return PacketController::SendBlob(PacketController::Instance(), this, arg2);
00549b40  }

00549b83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00549b90  void __thiscall NetBlob::NetBlob(class NetBlob* this, uint8_t* arg2, uint32_t arg3, int16_t arg4)

00549b90  {
00549b9c      this->m_cRef = 1;
00549ba3      this->vtable = &PackObj::`vftable';
00549baa      this->hash_next = nullptr;
00549bad      this->id = 0;
00549bb0      *(uint32_t*)((char*)this->id)[4] = 0;
00549bb3      this->vtable = &ArrivedEphInfo::`vftable';
00549bbb      this->buf_ = arg2;
00549bc2      this->queueID_ = arg4;
00549bc6      int32_t edx_1 = 0;
00549bcd      this->bufSize_ = arg3;
00549bd0      uint32_t eax_1 = (COMBINE(edx_1, arg3) / 0x1c0);
00549bd3      this->state_ = NETBLOB_FROZEN;
00549bd6      this->numFragments_ = 0;
00549bd9      this->sender_ = 0;
00549bdd      this->priority_ = 0;
00549be0      this->waitNext_ = nullptr;
00549be3      this->savedNetBlobID_ = 0;
00549be6      *(uint32_t*)((char*)this->savedNetBlobID_)[4] = 0;
00549be9      this->vtable = 0x7ca770;
00549bef      this->vtable = &*(int32_t*)((char*)NetBlob::`vftable' + 4);
00549bf6      this->vtable = &NetBlob::`vftable';
00549bf6      
00549c00      if ((COMBINE(edx_1, arg3) % 0x1c0) != 0)
00549c02          eax_1 += 1;
00549c02      
00549c03      this->cMaxFragments_ = eax_1;
00549b90  }

00549c0b                                   90 90 90 90 90                                                             .....

00549c10  void* __thiscall NetBlob::`vector deleting destructor'(class NetBlob* this, uint32_t arg2)

00549c10  {
00549c13      /* tailcall */
00549c13      return NetBlob::`scalar deleting destructor'(((char*)this - 8), arg2);
00549c10  }

00549c18                                                                          cc cc cc cc cc cc cc cc                          ........

00549c20  void* __thiscall NetBlob::`vector deleting destructor'(class NetBlob* this, uint32_t arg2)

00549c20  {
00549c23      /* tailcall */
00549c23      return NetBlob::`scalar deleting destructor'(((char*)this - 0x10), arg2);
00549c20  }

00549c28                          cc cc cc cc cc cc cc cc                                                          ........

00549c30  uint32_t __fastcall NetBlob::GetPackSize(class NetBlob* this)

00549c30  {
00549c36      return (this->state_ + 0x28);
00549c30  }

00549c37                                                                       90 90 90 90 90 90 90 90 90                         .........

00549c40  void __fastcall NetBlob::NetBlob(class NetBlob* this)

00549c40  {
00549c44      this->m_cRef = 1;
00549c4b      this->vtable = &PackObj::`vftable';
00549c52      this->hash_next = nullptr;
00549c55      this->id = 0;
00549c58      *(uint32_t*)((char*)this->id)[4] = 0;
00549c5b      this->vtable = &ArrivedEphInfo::`vftable';
00549c62      this->vtable = 0x7ca770;
00549c68      this->vtable = &*(int32_t*)((char*)NetBlob::`vftable' + 4);
00549c6f      this->vtable = &NetBlob::`vftable';
00549c76      this->state_ = NETBLOB_RECEIVING;
00549c7d      __builtin_memset(&this->buf_, 0, 0x24);
00549c40  }

00549c9e                                                                                            90 90                                ..

00549ca0  void __fastcall NetBlob::~NetBlob(class NetBlob* this)

00549ca0  {
00549ca3      uint8_t* buf_ = this->buf_;
00549ca7      this->vtable = 0x7ca770;
00549cad      this->vtable = &*(int32_t*)((char*)NetBlob::`vftable' + 4);
00549cb4      this->vtable = &NetBlob::`vftable';
00549cbb      operator delete[](buf_);
00549cc2      this->vtable = &ArrivedEphInfo::`vftable';
00549cc9      this->hash_next = nullptr;
00549ccc      this->id = 0;
00549ccf      *(uint32_t*)((char*)this->id)[4] = 0;
00549cd2      this->vtable = &PackObj::`vftable';
00549cdc      this->vtable = 0x7942f4;
00549ca0  }

00549ce4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00549cf0  uint32_t __thiscall NetBlob::Fragmentize(class NetBlob* this, class BlobFrag** arg2)

00549cf0  {
00549cfa      *(uint32_t*)arg2 = nullptr;
00549d03      uint32_t bufSize_ = this->bufSize_;
00549d06      int32_t edx = 0;
00549d0f      uint32_t temp0 = (COMBINE(edx, bufSize_) / 0x1c0);
00549d11      class BlobFrag* ecx = nullptr;
00549d13      this->state_ = NETBLOB_FRAGMENTED;
00549d1c      uint32_t var_c = temp0;
00549d1c      
00549d20      if ((COMBINE(edx, bufSize_) % 0x1c0) != 0)
00549d23          var_c = (temp0 + 1);
00549d23      
00549d2a      uint32_t result = 0;
00549d2e      uint8_t* buf_ = this->buf_;
00549d2e      
00549d32      while (bufSize_ != 0)
00549d32      {
00549d46          class BlobFrag* var_4_1 = ecx;
00549d4a          uint32_t bufSize = 0x1c0;
00549d4a          
00549d4f          if (bufSize_ <= 0x1c0)
00549d51              bufSize = bufSize_;
00549d51          
00549d65          ecx = BlobFrag::CreateForSend(this, result, var_c, buf_, bufSize);
00549d70          result += 1;
00549d70          
00549d73          if (*(uint32_t*)arg2 == 0)
00549d75              *(uint32_t*)arg2 = ecx;
00549d75          
00549d7d          if (var_4_1 != 0)
00549d7f              var_4_1->blobNextFrag_ = ecx;
00549d7f          
00549d86          bufSize_ -= bufSize;
00549d8c          buf_ = &buf_[bufSize];
00549d32      }
00549d32      
00549d9b      return result;
00549cf0  }

00549d36                                                                    8d a4 24 00 00 00 00 8d 49 00                        ..$.....I.
00549d9e                                                                                            90 90                                ..

00549da0  uint32_t __thiscall NetBlob::Pack(class NetBlob* this, void** arg2, uint32_t arg3)

00549da0  {
00549daa      int32_t result = (this->state_ + 0x28);
00549daa      
00549daf      if (arg3 >= result)
00549daf      {
00549db9          void* ecx_1 = *(uint32_t*)arg2;
00549dc0          *(uint32_t*)ecx_1 = this->hash_next;
00549dc5          *(uint32_t*)((char*)ecx_1 + 4) = *(int32_t*)((char*)this + 0x1c);
00549dca          void* ecx_3 = (*(uint32_t*)arg2 + 8);
00549dcd          *(uint32_t*)arg2 = ecx_3;
00549dd2          *(uint32_t*)ecx_3 = this->id;
00549dd6          void* ebp_2 = (*(uint32_t*)arg2 + 4);
00549dd9          *(uint32_t*)arg2 = ebp_2;
00549de1          *(uint32_t*)ebp_2 = this->state_;
00549de5          int16_t* edi_2 = (*(uint32_t*)arg2 + 4);
00549de8          *(uint32_t*)arg2 = edi_2;
00549dea          enum NetBlob::State esi_4;
00549dea          esi_4 = this->cMaxFragments_;
00549df0          *(uint16_t*)edi_2 = esi_4;
00549df5          void* esi_6 = (*(uint32_t*)arg2 + 2);
00549df8          *(uint32_t*)arg2 = esi_6;
00549dfa          int16_t* ecx_6 = esi_6;
00549dfc          esi_6 = *(uint16_t*)((char*)this->cMaxFragments_)[2];
00549e00          *(uint16_t*)ecx_6 = esi_6;
00549e05          void* ecx_8 = (*(uint32_t*)arg2 + 2);
00549e08          *(uint32_t*)arg2 = ecx_8;
00549e0d          *(uint32_t*)ecx_8 = this->numFragments_;
00549e11          void* ebp_4 = (*(uint32_t*)arg2 + 4);
00549e14          *(uint32_t*)arg2 = ebp_4;
00549e1b          *(uint32_t*)ebp_4 = this->bufSize_;
00549e1f          void* edi_4 = (*(uint32_t*)arg2 + 4);
00549e22          *(uint32_t*)arg2 = edi_4;
00549e29          *(uint32_t*)edi_4 = this->buf_;
00549e2d          void* esi_11 = (*(uint32_t*)arg2 + 4);
00549e30          *(uint32_t*)arg2 = esi_11;
00549e37          *(uint32_t*)esi_11 = this->priority_;
00549e3c          *(uint32_t*)((char*)esi_11 + 4) = this->waitNext_;
00549e41          void* ecx_13 = (*(uint32_t*)arg2 + 8);
00549e44          *(uint32_t*)arg2 = ecx_13;
00549e4b          enum NetBlob::State state_ = this->state_;
00549e53          int32_t esi_15;
00549e53          int32_t edi_6;
00549e53          edi_6 = __builtin_memcpy(ecx_13, *(uint32_t*)((char*)this->id)[4], ((state_ >> 2) << 2));
00549e5a          __builtin_memcpy(edi_6, esi_15, (state_ & NETBLOB_RECEIVED));
00549e64          *(uint32_t*)arg2 += this->state_;
00549daf      }
00549daf      
00549e69      return result;
00549da0  }

00549e6c                                      90 90 90 90                                                              ....

00549e70  int32_t __thiscall NetBlob::UnPack(class NetBlob* this, void** arg2, uint32_t arg3)

00549e70  {
00549e75      void* eax = *(uint32_t*)arg2;
00549e7c      this->hash_next = *(uint32_t*)eax;
00549e82      *(int32_t*)((char*)this + 0x1c) = *(uint32_t*)((char*)eax + 4);
00549e87      void* eax_2 = (*(uint32_t*)arg2 + 8);
00549e8a      *(uint32_t*)arg2 = eax_2;
00549e8c      int32_t ecx_1 = *(uint32_t*)eax_2;
00549e91      *(uint32_t*)arg2 = ((char*)eax_2 + 4);
00549e93      this->id = ecx_1;
00549e9a      this->state_ = **(uint32_t**)arg2;
00549ea1      void* edi_1 = (*(uint32_t*)arg2 + 4);
00549ea4      *(uint32_t*)arg2 = edi_1;
00549ea8      int32_t edx;
00549ea8      edx = *(uint16_t*)edi_1;
00549eab      this->cMaxFragments_ = edx;
00549eb1      void* esi_1 = (*(uint32_t*)arg2 + 2);
00549eb4      *(uint32_t*)arg2 = esi_1;
00549eb8      void* eax_6;
00549eb8      eax_6 = *(uint16_t*)esi_1;
00549ebb      *(uint16_t*)((char*)this->cMaxFragments_)[2] = eax_6;
00549ec1      void* edx_2 = (*(uint32_t*)arg2 + 2);
00549ec4      *(uint32_t*)arg2 = edx_2;
00549eca      this->numFragments_ = *(uint32_t*)edx_2;
00549ecf      void* ecx_5 = (*(uint32_t*)arg2 + 4);
00549ed2      *(uint32_t*)arg2 = ecx_5;
00549ed8      this->bufSize_ = *(uint32_t*)ecx_5;
00549edd      void* eax_10 = (*(uint32_t*)arg2 + 4);
00549ee0      *(uint32_t*)arg2 = eax_10;
00549ee4      this->buf_ = *(uint32_t*)eax_10;
00549ee9      void* edi_3 = (*(uint32_t*)arg2 + 4);
00549eec      *(uint32_t*)arg2 = edi_3;
00549ef2      this->priority_ = *(uint32_t*)edi_3;
00549ef8      this->waitNext_ = *(uint32_t*)((char*)edi_3 + 4);
00549efb      *(uint32_t*)arg2 += 8;
00549f02      void* eax_14 = operator new[](this->state_);
00549f07      enum NetBlob::State state_ = this->state_;
00549f0c      *(uint32_t*)((char*)this->id)[4] = eax_14;
00549f16      int32_t esi_3;
00549f16      int32_t edi_5;
00549f16      edi_5 = __builtin_memcpy(eax_14, *(uint32_t*)arg2, ((state_ >> 2) << 2));
00549f1d      __builtin_memcpy(edi_5, esi_3, (state_ & NETBLOB_RECEIVED));
00549f29      *(uint32_t*)arg2 += this->state_;
00549f34      return 1;
00549e70  }

00549f37                                                                       90 90 90 90 90 90 90 90 90                         .........

00549f40  void* __thiscall NetBlob::`scalar deleting destructor'(class NetBlob* this, uint32_t arg2)

00549f40  {
00549f43      uint8_t* buf_ = this->buf_;
00549f47      this->vtable = 0x7ca770;
00549f4d      this->vtable = &*(int32_t*)((char*)NetBlob::`vftable' + 4);
00549f54      this->vtable = &NetBlob::`vftable';
00549f5b      operator delete[](buf_);
00549f62      this->hash_next = nullptr;
00549f65      this->id = 0;
00549f68      *(uint32_t*)((char*)this->id)[4] = 0;
00549f6f      this->vtable = &ArrivedEphInfo::`vftable';
00549f7b      this->vtable = &PackObj::`vftable';
00549f82      this->vtable = 0x7942f4;
00549f82      
00549f88      if ((arg2 & 1) != 0)
00549f8b          operator delete(this);
00549f8b      
00549f96      return this;
00549f40  }

00549f99                                                                             90 90 90 90 90 90 90                           .......

00549fa0  void __fastcall HashBaseIter<unsigned __int64>::DeleteCurrent(class HashBaseIter<unsigned __int64>* this)

00549fa0  {
00549fa8      if (this->fEnd_ == 0)
00549fa8      {
00549faa          class HashBaseData<unsigned __int64>* lastThisChain_ = this->lastThisChain_;
00549faf          class HashBaseData<unsigned __int64>* curPtr_ = this->curPtr_;
00549fb3          class HashBaseData<unsigned __int64>* hash_next;
00549fb3          
00549fb3          if (lastThisChain_ == 0)
00549fb3          {
00549fc3              this->myHash_->buckets[this->curBucket_] = curPtr_->hash_next;
00549fd9              hash_next = this->myHash_->buckets[this->curBucket_];
00549fb3          }
00549fb3          else
00549fb3          {
00549fb8              lastThisChain_->hash_next = curPtr_->hash_next;
00549fbe              hash_next = this->lastThisChain_->hash_next;
00549fb3          }
00549fb3          
00549fdc          class HashBaseData<unsigned __int64>* curPtr__1 = this->curPtr_;
00549fdc          
00549fe1          if (curPtr__1 != 0)
00549fe3              curPtr__1->vtable->__vecDelDtor(1);
00549fe3          
00549feb          if (hash_next == 0)
00549feb          {
00549fed              class HashBase<unsigned __int64>* myHash_ = this->myHash_;
00549fed              
0054a00f              do
0054a00f              {
00549ff3                  uint32_t edi_2 = (this->curBucket_ + 1);
00549ff4                  this->lastThisChain_ = nullptr;
00549ffb                  this->curBucket_ = edi_2;
00549ffb                  
0054a005                  if (edi_2 >= myHash_->table_size)
0054a005                  {
0054a018                      this->fEnd_ = 1;
0054a01f                      this->curPtr_ = nullptr;
0054a027                      return;
0054a005                  }
0054a005                  
0054a00a                  hash_next = myHash_->buckets[edi_2];
0054a00f              } while (hash_next == 0);
00549feb          }
00549feb          
0054a011          this->curPtr_ = hash_next;
00549fa8      }
00549fa0  }

0054a028                          90 90 90 90 90 90 90 90                                                          ........

0054a030  void __fastcall HashBaseIter<unsigned __int64>::Next(class HashBaseIter<unsigned __int64>* this)

0054a030  {
0054a030      class HashBaseData<unsigned __int64>* curPtr_ = this->curPtr_;
0054a030      
0054a035      if (curPtr_ != 0)
0054a035      {
0054a037          this->lastThisChain_ = curPtr_;
0054a03d          this->curPtr_ = curPtr_->hash_next;
0054a035      }
0054a035      
0054a045      if (this->curPtr_ == 0)
0054a045      {
0054a047          class HashBase<unsigned __int64>* myHash_ = this->myHash_;
0054a047          
0054a053          while (true)
0054a053          {
0054a053              uint32_t eax_3 = (this->curBucket_ + 1);
0054a054              this->lastThisChain_ = nullptr;
0054a05b              this->curBucket_ = eax_3;
0054a05b              
0054a061              if (eax_3 >= myHash_->table_size)
0054a061              {
0054a072                  this->fEnd_ = 1;
0054a079                  break;
0054a061              }
0054a061              
0054a066              class HashBaseData<unsigned __int64>* eax_4 = myHash_->buckets[eax_3];
0054a06b              this->curPtr_ = eax_4;
0054a06b              
0054a06e              if (eax_4 != 0)
0054a071                  return;
0054a053          }
0054a045      }
0054a030  }

0054a07b                                                                                   90 90 90 90 90                             .....

0054a080  class HashBaseData<unsigned __int64>* __thiscall HashBase<unsigned __int64>::remove(class HashBase<unsigned __int64>* this, uint64_t arg2)

0054a080  {
0054a081      int32_t ebx = *(uint32_t*)((char*)arg2)[4];
0054a087      int32_t edi = arg2;
0054a08d      this->key_shift;
0054a094      int32_t eax_1;
0054a094      int32_t edx_1;
0054a094      eax_1 = _aullshr();
0054a0aa      void* ecx_4 = &this->buckets[((eax_1 ^ edi) & this->table_mask)];
0054a0ad      void* eax_4 = *(uint32_t*)ecx_4;
0054a0b1      *(uint32_t*)((char*)arg2)[4] = ((edx_1 ^ ebx) & *(uint32_t*)((char*)this->table_mask)[4]);
0054a0b1      
0054a0b5      if (eax_4 != 0)
0054a0b5      {
0054a0c3          if ((*(uint32_t*)((char*)eax_4 + 0x10) == edi && *(uint32_t*)((char*)eax_4 + 0x14) == ebx))
0054a0c3          {
0054a0ca              *(uint32_t*)ecx_4 = *(uint32_t*)((char*)eax_4 + 8);
0054a0cd              return eax_4;
0054a0c3          }
0054a0c3          
0054a0d5          while (*(uint32_t*)((char*)eax_4 + 8) != 0)
0054a0d5          {
0054a0d7              void* ecx_6 = *(uint32_t*)((char*)eax_4 + 8);
0054a0d7              
0054a0e6              if ((*(uint32_t*)((char*)ecx_6 + 0x10) == edi && *(uint32_t*)((char*)ecx_6 + 0x14) == ebx))
0054a0e6              {
0054a0f9                  void* ecx_8 = *(uint32_t*)((char*)eax_4 + 8);
0054a101                  *(uint32_t*)((char*)eax_4 + 8) = *(uint32_t*)((char*)ecx_8 + 8);
0054a107                  return ecx_8;
0054a0e6              }
0054a0e6              
0054a0e8              eax_4 = ecx_6;
0054a0d5          }
0054a0b5      }
0054a0b5      
0054a0f6      return 0;
0054a080  }

0054a10a                                90 90 90 90 90 90                                                            ......

0054a110  class HashBaseData<unsigned __int64>* __thiscall HashBase<unsigned __int64>::lookup(class HashBase<unsigned __int64> const* this, uint64_t arg2)

0054a110  {
0054a117      int32_t edi = arg2;
0054a11d      this->key_shift;
0054a11d      
0054a138      for (void* const i = this->buckets[((_aullshr() ^ edi) & this->table_mask)]; i != 0; i = *(uint32_t*)((char*)i + 8))
0054a138      {
0054a148          if ((edi == *(uint32_t*)((char*)i + 0x10) && *(uint32_t*)((char*)arg2)[4] == *(uint32_t*)((char*)i + 0x14)))
0054a156              return i;
0054a138      }
0054a138      
0054a151      return nullptr;
0054a110  }

0054a159                                                                             90 90 90 90 90 90 90                           .......

0054a160  void __thiscall UI64Hash<NetBlob>::add(class UI64Hash<NetBlob>* this, class NetBlob* arg2)

0054a160  {
0054a16f      struct UI64HashData::VTable** edi;
0054a16f      
0054a16f      if (arg2 == 0)
0054a176          edi = nullptr;
0054a16f      else
0054a171          edi = &arg2->vtable;
0054a171      
0054a178      int32_t ebx = ADJ(edi)->id;
0054a17b      int32_t ebp = *(uint32_t*)((char*)ADJ(edi)->id)[4];
0054a17e      this->key_shift;
0054a185      int32_t eax_1;
0054a185      int32_t edx_1;
0054a185      eax_1 = _aullshr();
0054a194      int32_t eax_3 = ((eax_1 ^ ebx) & this->table_mask);
0054a19b      int32_t var_4 = ((edx_1 ^ ebp) & *(uint32_t*)((char*)this->table_mask)[4]);
0054a178      ADJ(edi)->hash_next = this->buckets[eax_3];
0054a1a5      this->buckets[eax_3] = edi;
0054a160  }

0054a1b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0054a1c0  void* __thiscall HashBase<unsigned __int64>::`scalar deleting destructor'(class HashBase<unsigned __int64>* this, uint32_t arg2)

0054a1c0  {
0054a1c6      bool cond:0 = this->fPlacementNew_ != 0;
0054a1c8      this->vtable = 0x7ca79c;
0054a1c8      
0054a1ce      if (!(cond:0))
0054a1d4          operator delete[](this->buckets);
0054a1d4      
0054a1e1      if ((arg2 & 1) != 0)
0054a1e4          operator delete(this);
0054a1e4      
0054a1ef      return this;
0054a1c0  }

0054a1f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054a200  void __thiscall Indicator::SendBlobToQueue(class Indicator* this, class NetBlob* arg2)

0054a200  {
0054a20b      int32_t var_8 = *(uint32_t*)((char*)arg2->id)[4];
0054a210      HashBase<unsigned __int64>::remove(&this->waitingBlobs_, arg2->id);
0054a21b      *(uint32_t*)((char*)arg2->id)[4] = *(uint32_t*)((char*)arg2->savedNetBlobID_)[4];
0054a220      arg2->id = arg2->savedNetBlobID_;
0054a223      NetBlob::ReceiveBlobReady(arg2);
0054a230      PacketController::AddReceivedBlobToQueue(PacketController::Instance(), arg2);
0054a230      
0054a241      if (InterlockedDecrement(&arg2->m_cRef) == 0)
0054a243          arg2->vtable->__vecDelDtor(1);
0054a200  }

0054a24f                                               90                                                                 .

0054a250  void __fastcall Indicator::Indicator(class Indicator* this)

0054a250  {
0054a254      this->vtable = 0x7ca7a0;
0054a261      this->waitingBlobs_.vtable = 0x7ca79c;
0054a268      this->waitingBlobs_.fPlacementNew_ = 0;
0054a273      this->waitingBlobs_.buckets = operator new[](0x200);
0054a276      this->waitingBlobs_.table_size = 0x80;
0054a27d      this->waitingBlobs_.key_shift = 0x10;
0054a284      this->waitingBlobs_.table_mask = 0;
0054a287      *(uint32_t*)((char*)this->waitingBlobs_.table_mask)[4] = 0;
0054a28a      int32_t eax_1 = 1;
0054a28f      int32_t ecx = 0;
0054a28f      
0054a298      while (true)
0054a298      {
0054a298          int32_t edi_2 = (this->waitingBlobs_.table_mask | eax_1);
0054a29a          int32_t edx_2 = (*(uint32_t*)((char*)this->waitingBlobs_.table_mask)[4] | ecx);
0054a29c          ecx = ((ecx << 1) | (eax_1 >> 0xffffffe1));
0054a2a0          eax_1 <<= 1;
0054a2a2          *(uint32_t*)((char*)this->waitingBlobs_.table_mask)[4] = edx_2;
0054a2a5          this->waitingBlobs_.table_mask = edi_2;
0054a2a8          int32_t edx_3 = (edx_2 | ecx);
0054a2a8          
0054a2ae          if (edx_3 >= 0)
0054a2ae          {
0054a2b0              if (edx_3 > 0)
0054a2b0                  break;
0054a2b0              
0054a2b5              if ((edi_2 | eax_1) >= this->waitingBlobs_.table_size)
0054a2b5                  break;
0054a2ae          }
0054a298      }
0054a298      
0054a2b7      int32_t i = 0;
0054a2b7      
0054a2cc      do
0054a2cc      {
0054a2c0          this->waitingBlobs_.buckets[i] = 0;
0054a2c9          i += 1;
0054a2cc      } while (i < this->waitingBlobs_.table_size);
0054a2cc      
0054a2ce      this->waitingBlobs_.vtable = 0x7ca79c;
0054a2da      this->arrivedEphBlobs_.vtable = 0x7ca79c;
0054a2e1      this->arrivedEphBlobs_.fPlacementNew_ = 0;
0054a2ec      this->arrivedEphBlobs_.buckets = operator new[](0x80);
0054a2ef      this->arrivedEphBlobs_.table_size = 0x20;
0054a2f6      this->arrivedEphBlobs_.key_shift = 0x10;
0054a2fd      this->arrivedEphBlobs_.table_mask = 0;
0054a300      *(uint32_t*)((char*)this->arrivedEphBlobs_.table_mask)[4] = 0;
0054a303      int32_t eax_3 = 1;
0054a308      int32_t ecx_3 = 0;
0054a308      
0054a316      while (true)
0054a316      {
0054a316          int32_t edi_5 = (this->arrivedEphBlobs_.table_mask | eax_3);
0054a318          int32_t edx_5 = (*(uint32_t*)((char*)this->arrivedEphBlobs_.table_mask)[4] | ecx_3);
0054a31a          ecx_3 = ((ecx_3 << 1) | (eax_3 >> 0xffffffe1));
0054a31e          eax_3 <<= 1;
0054a320          *(uint32_t*)((char*)this->arrivedEphBlobs_.table_mask)[4] = edx_5;
0054a323          this->arrivedEphBlobs_.table_mask = edi_5;
0054a326          int32_t edx_6 = (edx_5 | ecx_3);
0054a326          
0054a32c          if (edx_6 >= 0)
0054a32c          {
0054a32e              if (edx_6 > 0)
0054a32e                  break;
0054a32e              
0054a333              if ((edi_5 | eax_3) >= this->arrivedEphBlobs_.table_size)
0054a333                  break;
0054a32c          }
0054a316      }
0054a316      
0054a335      int32_t i_1 = 0;
0054a335      
0054a34c      do
0054a34c      {
0054a340          this->arrivedEphBlobs_.buckets[i_1] = 0;
0054a349          i_1 += 1;
0054a34c      } while (i_1 < this->arrivedEphBlobs_.table_size);
0054a34c      
0054a34e      this->arrivedEphBlobs_.vtable = 0x7ca79c;
0054a355      this->firstInfo_ = nullptr;
0054a358      this->flushStamp_ = 0f;
0054a35b      *(uint32_t*)((char*)this->flushStamp_)[4] = 0;
0054a250  }

0054a33a                                                                                8d 9b 00 00 00 00                            ......
0054a363           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0054a370  void __thiscall Indicator::AddArrivedEphInfo(class Indicator* this, class ArrivedEphInfo* arg2)

0054a370  {
0054a37b      int32_t ebx = arg2->id;
0054a37e      int32_t ebp = *(uint32_t*)((char*)arg2->id)[4];
0054a383      this->arrivedEphBlobs_;
0054a38a      int32_t eax_1;
0054a38a      int32_t edx_1;
0054a38a      eax_1 = _aullshr();
0054a399      int32_t eax_3 = ((eax_1 ^ ebx) & this->arrivedEphBlobs_.table_mask);
0054a39e      int32_t var_4 = ((edx_1 ^ ebp) & *(uint32_t*)((char*)this->arrivedEphBlobs_.table_mask)[4]);
0054a3a5      arg2->hash_next = this->arrivedEphBlobs_.buckets[eax_3];
0054a3a8      this->arrivedEphBlobs_.buckets[eax_3] = arg2;
0054a3ae      class ArrivedEphInfo* firstInfo_ = this->firstInfo_;
0054a3ae      
0054a3b3      if (firstInfo_ != 0)
0054a3b5          arg2->m_next = firstInfo_;
0054a3b5      
0054a3b8      this->firstInfo_ = arg2;
0054a370  }

0054a3c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0054a3d0  void __fastcall Indicator::FlushTimedOutEphInfo(class Indicator* this)

0054a3d0  {
0054a3d9      long double x87_r7 = (((long double)Timer::cur_time) - ((long double)this->flushStamp_));
0054a3dc      long double temp0 = ((long double)5.0);
0054a3dc      (x87_r7 - temp0);
0054a3e2      int32_t eax;
0054a3e2      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0054a3e4      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0054a3e4      
0054a3e7      if (p)
0054a3e7      {
0054a3f6          class ArrivedEphInfo* i = this->firstInfo_;
0054a3f9          int32_t* i_2 = nullptr;
0054a3fd          this->flushStamp_ = (*(uint32_t*)Timer::cur_time);
0054a400          *(uint32_t*)((char*)this->flushStamp_)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0054a400          
0054a403          while (i != 0)
0054a403          {
0054a406              int32_t* i_1 = i;
0054a408              i = i->m_next;
0054a408              
0054a414              if (ArrivedEphInfo::fTimedOut(i_1) == 0)
0054a43c                  i_2 = i_1;
0054a414              else
0054a414              {
0054a418                  if (i_2 == 0)
0054a41f                      this->firstInfo_ = i;
0054a418                  else
0054a41a                      i_2[6] = i;
0054a41a                  
0054a428                  int32_t var_14_1 = i_1[5];
0054a42d                  HashBase<unsigned __int64>::remove(&this->arrivedEphBlobs_.vtable, i_1[4]);
0054a438                  **(uint32_t**)i_1(1);
0054a414              }
0054a403          }
0054a3e7      }
0054a3d0  }

0054a447                       90 90 90 90 90 90 90 90 90                                                         .........

0054a450  int32_t __thiscall Indicator::FragIsObsoleteEmphemeral(class Indicator* this, uint64_t arg2)

0054a450  {
0054a450      class Indicator* this_1 = this;
0054a453      int32_t esi = arg2;
0054a458      int32_t __saved_ebp_1 = *(uint32_t*)((char*)arg2)[4];
0054a45e      int32_t __saved_ebp = __saved_ebp_1;
0054a45e      
0054a46e      if (NetBlobIDUtils::IsEphemeralFlagSet(esi) == 0)
0054a476          return 0;
0054a476      
0054a47a      int32_t __saved_ebp_2 = __saved_ebp_1;
0054a47c      int32_t eax_2;
0054a47c      int32_t edx;
0054a47c      eax_2 = NetBlobIDUtils::GetSequenceID(esi);
0054a486      int32_t var_18_1 = edx;
0054a48b      *(uint32_t*)((char*)arg2)[4] = edx;
0054a48f      class HashBaseData<unsigned __int64>* eax_3 = HashBase<unsigned __int64>::lookup(&this->arrivedEphBlobs_, eax_2);
0054a48f      
0054a498      if (eax_3 == 0)
0054a498      {
0054a49c          class ArrivedEphInfo* eax_4 = operator new(0x30);
0054a49c          
0054a4a6          if (eax_4 == 0)
0054a4a6          {
0054a4d2              Indicator::AddArrivedEphInfo(this, nullptr);
0054a4de              return 0;
0054a4a6          }
0054a4a6          
0054a4ac          int32_t __saved_ebp_3 = __saved_ebp_1;
0054a4ae          int32_t var_20_1 = *(uint32_t*)((char*)arg2)[4];
0054a4bc          Indicator::AddArrivedEphInfo(this, ArrivedEphInfo::ArrivedEphInfo(eax_4, eax_2, esi));
0054a4c8          return 0;
0054a498      }
0054a498      
0054a4e1      int32_t eax_8 = *(int32_t*)((char*)eax_3 + 0x20);
0054a4e6      int32_t ecx_8 = *(int32_t*)((char*)eax_3 + 0x24);
0054a4e6      
0054a4ed      if ((esi != eax_8 || __saved_ebp_1 != ecx_8))
0054a4ed      {
0054a4ef          int32_t __saved_ebp_4 = __saved_ebp_1;
0054a4f1          int32_t var_20_2 = ecx_8;
0054a4f1          
0054a4fd          if (NetBlobIDUtils::LHSNewerOrderingStamp(eax_8, esi) != 0)
0054a509              return 1;
0054a509          
0054a50c          int32_t __saved_ebp_5 = __saved_ebp_1;
0054a510          ArrivedEphInfo::UpdateNetBlobID(eax_3, esi);
0054a4ed      }
0054a4ed      
0054a51c      return 0;
0054a450  }

0054a51f                                                                                               90                                 .

0054a520  void __fastcall UI64Hash<ArrivedEphInfo>::destroy_contents(class UI64Hash<ArrivedEphInfo>* this)

0054a520  {
0054a525      class UI64Hash<ArrivedEphInfo>* this_1 = this;
0054a529      int32_t var_8 = 0;
0054a531      int32_t var_10 = 0;
0054a531      
0054a539      if (this != 0)
0054a539      {
0054a53e          class HashBaseData<unsigned __int64>* eax_2 = *(uint32_t*)this->buckets;
0054a542          int32_t i = 0;
0054a54a          class HashBaseData<unsigned __int64>* var_c_1 = eax_2;
0054a54a          
0054a54e          if (eax_2 == 0)
0054a554              HashBaseIter<unsigned __int64>::Next(&this_1);
0054a554          
0054a55f          if ((eax_2 != 0 || i == 0))
0054a55f          {
0054a570              do
0054a565                  HashBaseIter<unsigned __int64>::DeleteCurrent(&this_1);
0054a570               while (i == 0);
0054a55f          }
0054a539      }
0054a520  }

0054a576                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0054a580  void __fastcall Indicator::CleanupWaitingBlobs(class Indicator* this)

0054a580  {
0054a58e      class UI64Hash<NetBlob>* var_14 = &this->waitingBlobs_;
0054a592      int32_t var_8 = 0;
0054a596      int32_t var_10 = 0;
0054a596      
0054a59a      if (this != 0xfffffff8)
0054a59a      {
0054a5a3          class HashBaseData<unsigned __int64>* j = *(uint32_t*)this->waitingBlobs_.buckets;
0054a5a7          int32_t var_4_1 = 0;
0054a5a7          
0054a5af          if (j == 0)
0054a5b5              HashBaseIter<unsigned __int64>::Next(&var_14);
0054a5b5          
0054a5be          if ((j != 0 || var_4_1 == 0))
0054a5be          {
0054a62e              int32_t i;
0054a62e              
0054a62e              do
0054a62e              {
0054a5d4                  void* __offset(HashBaseData<unsigned __int64>, -0x10) esi_1;
0054a5d4                  
0054a5d4                  if (j == 0)
0054a5d4                  {
0054a5db                      esi_1 = nullptr;
0054a5db                      goto label_54a5e3;
0054a5d4                  }
0054a5d4                  
0054a61f                  do
0054a61f                  {
0054a5d6                      esi_1 = &j[0];
0054a5e3                  label_54a5e3:
0054a5e3                      int32_t var_28_1 = *(uint32_t*)((char*)ADJ(esi_1)->id)[4];
0054a5e7                      HashBase<unsigned __int64>::remove(&this->waitingBlobs_, ADJ(esi_1)->id);
0054a5e7                      
0054a5f4                      if (InterlockedDecrement(((char*)esi_1 + 4)) == 0)
0054a5fc                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x10)(1);
0054a5fc                      
0054a602                      var_14 = &this->waitingBlobs_;
0054a606                      int32_t var_8_1 = 0;
0054a60a                      int32_t var_10_1 = 0;
0054a60a                      
0054a60e                      if (this == 0xfffffff8)
0054a637                          return;
0054a637                      
0054a613                      j = *(uint32_t*)this->waitingBlobs_.buckets;
0054a617                      i = 0;
0054a61f                  } while (j != 0);
0054a61f                  
0054a625                  HashBaseIter<unsigned __int64>::Next(&var_14);
0054a62e              } while (i == 0);
0054a5be          }
0054a59a      }
0054a580  }

0054a638                                                                          90 90 90 90 90 90 90 90                          ........

0054a640  void __thiscall Indicator::AcceptFrag(class Indicator* this, class BlobFrag* arg2, uint16_t arg3)

0054a640  {
0054a640      class Indicator* this_1 = this;
0054a645      class BlobFrag* edi = arg2;
0054a649      struct BlobFragHeader_t* hdrRead_ = edi->hdrRead_;
0054a64c      int32_t ebx = hdrRead_->blobID;
0054a64e      int32_t ebp = *(uint32_t*)((char*)hdrRead_->blobID)[4];
0054a653      int32_t var_18 = ebp;
0054a653      
0054a663      if (NetBlobIDUtils::IsEphemeralFlagSet(ebx) != 0)
0054a663      {
0054a665          int32_t var_18_1 = ebp;
0054a667          int32_t eax_1;
0054a667          int32_t edx_1;
0054a667          eax_1 = NetBlobIDUtils::GetSequenceID(ebx);
0054a66f          ebx = eax_1;
0054a671          ebp = edx_1;
0054a663      }
0054a663      
0054a673      int32_t var_18_2 = ebp;
0054a678      class HashBaseData<unsigned __int64>* eax_2 = HashBase<unsigned __int64>::lookup(&this->waitingBlobs_, ebx);
0054a67f      class NetBlob* esi_1;
0054a67f      uint32_t* edi_2;
0054a67f      
0054a67f      if (eax_2 == 0)
0054a67f      {
0054a6eb      label_54a6eb:
0054a6eb          class NetBlob* eax_7 = operator new(0x50);
0054a6eb          
0054a6f5          if (eax_7 == 0)
0054a702              esi_1 = nullptr;
0054a6f5          else
0054a6fe              esi_1 = NetBlob::NetBlob(eax_7);
0054a6fe          
0054a709          esi_1->sender_ = arg3;
0054a710          eax_7 = edi->hdrRead_->queueID;
0054a714          esi_1->queueID_ = eax_7;
0054a718          struct BlobFragHeader_t* hdrRead__2 = edi->hdrRead_;
0054a71d          esi_1->savedNetBlobID_ = hdrRead__2->blobID;
0054a723          edi_2 = &esi_1->m_cRef;
0054a727          *(uint32_t*)((char*)esi_1->savedNetBlobID_)[4] = *(uint32_t*)((char*)hdrRead__2->blobID)[4];
0054a72a          esi_1->id = ebx;
0054a72d          *(uint32_t*)((char*)esi_1->id)[4] = ebp;
0054a730          InterlockedIncrement(edi_2);
0054a73e          UI64Hash<NetBlob>::add(&this->waitingBlobs_, esi_1);
0054a73e          goto label_54a74a;
0054a67f      }
0054a67f      
0054a681      esi_1 = &eax_2[0];
0054a681      
0054a686      if (esi_1 == 0)
0054a686          goto label_54a6eb;
0054a686      
0054a688      struct BlobFragHeader_t* hdrRead__1 = edi->hdrRead_;
0054a68b      int32_t eax_3 = hdrRead__1->blobID;
0054a68d      int32_t edx_2 = *(uint32_t*)((char*)hdrRead__1->blobID)[4];
0054a690      int32_t ecx_1 = esi_1->savedNetBlobID_;
0054a695      int32_t edi_1 = *(uint32_t*)((char*)esi_1->savedNetBlobID_)[4];
0054a695      
0054a69c      if ((ecx_1 != eax_3 || edi_1 != edx_2))
0054a69c      {
0054a6ad          int32_t var_18_4 = edx_2;
0054a6af          int32_t var_20_1 = edi_1;
0054a6af          
0054a6bb          if (NetBlobIDUtils::LHSNewerOrderingStamp(ecx_1, eax_3) != 0)
0054a6bb          {
0054a6c5              int32_t var_18_5 = ebp;
0054a6ca              HashBase<unsigned __int64>::remove(&this->waitingBlobs_, ebx);
0054a6ca              
0054a6db              if (InterlockedDecrement(&esi_1->m_cRef) == 0)
0054a6dd                  esi_1->vtable->__vecDelDtor(1);
0054a6dd              
0054a6e5              edi = arg2;
0054a6e5              goto label_54a6eb;
0054a6bb          }
0054a69c      }
0054a69c      else
0054a69c      {
0054a69e          edi_2 = &esi_1->m_cRef;
0054a6a2          InterlockedIncrement(edi_2);
0054a74a      label_54a74a:
0054a74a          NetBlob::ReceiveAddFragment(esi_1, arg2);
0054a755          esi_1->id = ebx;
0054a758          *(uint32_t*)((char*)esi_1->id)[4] = ebp;
0054a758          
0054a75b          if (esi_1->numFragments_ == esi_1->cMaxFragments_)
0054a762              Indicator::SendBlobToQueue(this, esi_1);
0054a762          
0054a770          if (InterlockedDecrement(edi_2) == 0)
0054a772              esi_1->vtable->__vecDelDtor(1);
0054a69c      }
0054a640  }

0054a782        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0054a790  void __fastcall Indicator::~Indicator(class Indicator* this)

0054a790  {
0054a794      this->vtable = 0x7ca7a0;
0054a79a      Indicator::CleanupWaitingBlobs(this);
0054a7a4      UI64Hash<ArrivedEphInfo>::destroy_contents(&this->arrivedEphBlobs_);
0054a79f      this->arrivedEphBlobs_.vtable = 0x7ca79c;
0054a79f      
0054a7b4      if (this->arrivedEphBlobs_.fPlacementNew_ == 0)
0054a7ba          operator delete[](this->arrivedEphBlobs_.buckets);
0054a7ba      
0054a7c7      this->waitingBlobs_.vtable = 0x7ca79c;
0054a7c7      
0054a7ce      if (this->waitingBlobs_.fPlacementNew_ == 0)
0054a7d4          operator delete[](this->waitingBlobs_.buckets);
0054a790  }

0054a7df                                                                                               90                                 .

0054a7e0  void __thiscall Indicator::CheckInPacket(class Indicator* this, class NetPacket* arg2, uint16_t arg3)

0054a7e0  {
0054a7e7      uint32_t numFrags_ = arg2->numFrags_;
0054a7e7      
0054a7ef      if (numFrags_ > 0)
0054a7ef      {
0054a7f4          class BlobFrag* (* edi_1)[0x1d] = &arg2->fragList_;
0054a7fa          uint32_t ebp_1 = numFrags_;
0054a828          uint32_t i;
0054a828          
0054a828          do
0054a828          {
0054a800              class BlobFrag* esi_1 = ADJ(edi_1)->fragList_[0];
0054a802              struct BlobFragHeader_t* hdrRead_ = esi_1->hdrRead_;
0054a80a              int32_t var_14_1 = *(uint32_t*)((char*)hdrRead_->blobID)[4];
0054a80a              
0054a815              if (Indicator::FragIsObsoleteEmphemeral(this, hdrRead_->blobID) == 0)
0054a81f                  Indicator::AcceptFrag(this, esi_1, arg3);
0054a81f              
0054a824              edi_1 = &*(uint116_t*)edi_1[1];
0054a827              i = ebp_1;
0054a827              ebp_1 -= 1;
0054a828          } while (i != 1);
0054a7ef      }
0054a7e0  }

0054a831                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0054a840  void* __thiscall Indicator::`scalar deleting destructor'(class Indicator* this, uint32_t arg2)

0054a840  {
0054a843      Indicator::~Indicator(this);
0054a843      
0054a84d      if ((arg2 & 1) != 0)
0054a850          operator delete(this);
0054a850      
0054a85b      return this;
0054a840  }

0054a85e                                                                                            90 90                                ..

0054a860  void* __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,unsigned __int64> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,unsigned __int64> *,0>* this, uint32_t arg2)

0054a860  {
0054a863      class HashTableData<unsigned __int64,unsigned __int64>** m_buckets = this->m_buckets;
0054a86b      this->vtable = 0x7ca7cc;
0054a86b      
0054a871      if (m_buckets != &this->m_aInplaceBuckets)
0054a874          operator delete[](m_buckets);
0054a874      
0054a87e      this->m_buckets = nullptr;
0054a881      this->m_firstInterestingBucket = nullptr;
0054a884      this->m_numBuckets = 0;
0054a887      this->m_numElements = 0;
0054a887      
0054a88f      if ((arg2 & 1) != 0)
0054a892          operator delete(this);
0054a892      
0054a89d      return this;
0054a860  }


0054a8a0  int32_t __thiscall SentPacketStore::Contains(class SentPacketStore* this, uint32_t arg2)

0054a8a0  {
0054a8a0      class NIListElement<NetPacket *>* eax = this->m_sentPacketList.head_;
0054a8a0      
0054a8a8      while (true)
0054a8a8      {
0054a8a8          if (eax == 0)
0054a8c3              return 0;
0054a8c3          
0054a8b2          if (eax->data_->seqNum_ == arg2)
0054a8b2              break;
0054a8b2          
0054a8b4          eax = eax->next_;
0054a8a8      }
0054a8a8      
0054a8be      return 1;
0054a8a0  }

0054a8c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0054a8d0  class NetPacket* __thiscall SentPacketStore::GenerateAck(class SentPacketStore* this, uint32_t arg2)

0054a8d0  {
0054a8d0      class NIListElement<NetPacket *>* eax = this->m_sentPacketList.head_;
0054a8d9      class NetPacket* data_;
0054a8d9      
0054a8d9      while (true)
0054a8d9      {
0054a8d9          if (eax == 0)
0054a8fd              return 0;
0054a8fd          
0054a8db          data_ = eax->data_;
0054a8db          
0054a8e3          if (data_->seqNum_ == arg2)
0054a8e3              break;
0054a8e3          
0054a8e5          eax = eax->next_;
0054a8d9      }
0054a8d9      
0054a8ee      InterlockedIncrement(&data_->m_cRef);
0054a8f7      return data_;
0054a8d0  }


0054a900  void __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,unsigned __int64> *,0>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,unsigned __int64> *,0>(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,unsigned __int64> *,0>* this, uint32_t arg2)

0054a900  {
0054a90b      arg2 = arg2;
0054a90f      uint8_t edx = ((int8_t)arg2);
0054a913      this->m_buckets = nullptr;
0054a916      this->m_firstInterestingBucket = nullptr;
0054a919      this->m_numBuckets = 0;
0054a91c      this->m_numElements = 0;
0054a920      this->vtable = 0x7ca7cc;
0054a926      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0054a939      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0054a939      
0054a943      if (eax == bucketSizesEnd_1)
0054a945          eax -= 4;
0054a945      
0054a948      uint32_t eax_1 = *(uint32_t*)eax;
0054a94d      this->m_numBuckets = eax_1;
0054a94d      
0054a950      if (eax_1 > 0x17)
0054a966          this->m_buckets = operator new[]((eax_1 << 2));
0054a950      else
0054a955          this->m_buckets = &this->m_aInplaceBuckets;
0054a955      
0054a96c      class HashTableData<unsigned __int64,unsigned __int64>** m_buckets = this->m_buckets;
0054a96f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0054a975      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0054a986      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0054a900  }

0054a98f                                               90                                                                 .

0054a990  uint8_t __thiscall HashTable<unsigned __int64,unsigned __int64,0>::set(class HashTable<unsigned __int64,unsigned __int64,0>* this, uint64_t const* arg2, uint64_t const* arg3)

0054a990  {
0054a9a4      void __return;
0054a9a4      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_intrusiveTable.vtable, &__return, arg2);
0054a9af      void* var_4;
0054a9af      
0054a9af      if (var_4 != 0)
0054a9af      {
0054a9b7          *(uint32_t*)((char*)var_4 + 0x10) = *(uint32_t*)arg3;
0054a9be          *(uint32_t*)((char*)var_4 + 0x14) = *(uint32_t*)((char*)arg3 + 4);
0054a9c1          void* eax;
0054a9c1          eax = 1;
0054a9c7          return 1;
0054a9af      }
0054a9af      
0054a9cc      void* eax_1 = operator new(0x18);
0054a9cc      
0054a9d6      if (eax_1 == 0)
0054a9d6      {
0054aa0f          IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::add(&this->m_intrusiveTable, nullptr);
0054aa15          int32_t eax_3;
0054aa15          eax_3 = 1;
0054aa1b          return 1;
0054a9d6      }
0054a9d6      
0054a9da      *(uint32_t*)eax_1 = *(uint32_t*)arg2;
0054a9df      *(uint32_t*)((char*)eax_1 + 4) = *(uint32_t*)((char*)arg2 + 4);
0054a9e6      *(uint32_t*)((char*)eax_1 + 8) = 0;
0054a9ef      *(uint32_t*)((char*)eax_1 + 0x10) = *(uint32_t*)arg3;
0054a9f5      *(uint32_t*)((char*)eax_1 + 0x14) = *(uint32_t*)((char*)arg3 + 4);
0054a9fb      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::add(&this->m_intrusiveTable, eax_1);
0054aa01      int32_t eax_2;
0054aa01      eax_2 = 1;
0054aa07      return 1;
0054a990  }

0054aa1e                                                                                            90 90                                ..

0054aa20  void* __thiscall HashTable<unsigned __int64,unsigned __int64,0>::`scalar deleting destructor'(class HashTable<unsigned __int64,unsigned __int64,0>* this, uint32_t arg2)

0054aa20  {
0054aa29      this->vtable = 0x7ca7d0;
0054aa2f      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_intrusiveTable);
0054aa34      class HashTableData<unsigned __int64,unsigned __int64>** m_buckets = this->m_intrusiveTable.m_buckets;
0054aa24      this->m_intrusiveTable.vtable = 0x7ca7cc;
0054aa24      
0054aa42      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0054aa45          operator delete[](m_buckets);
0054aa45      
0054aa24      this->m_intrusiveTable.m_buckets = nullptr;
0054aa24      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0054aa24      this->m_intrusiveTable.m_numBuckets = 0;
0054aa24      this->m_intrusiveTable.m_numElements = 0;
0054aa24      
0054aa60      if ((arg2 & 1) != 0)
0054aa63          operator delete(this);
0054aa63      
0054aa6f      return this;
0054aa20  }

0054aa72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054aa80  void __fastcall SentPacketStore::SentPacketStore(class SentPacketStore* this)

0054aa80  {
0054aa83      this->m_sentPacketList.head_ = 0;
0054aa89      this->m_sentPacketList.tail_ = nullptr;
0054aa95      this->m_sentNetBlobIDInfo.vtable = 0x7ca7d0;
0054aa9c      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,unsigned __int64> *,0>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,unsigned __int64> *,0>(&this->m_sentNetBlobIDInfo.m_intrusiveTable, 0x40);
0054aa80  }

0054aaa5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0054aab0  void __fastcall SentPacketStore::~SentPacketStore(class SentPacketStore* this)

0054aab0  {
0054aab9      this->m_sentNetBlobIDInfo.vtable = 0x7ca7d0;
0054aac0      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_sentNetBlobIDInfo.m_intrusiveTable);
0054aac5      class HashTableData<unsigned __int64,unsigned __int64>** m_buckets = this->m_sentNetBlobIDInfo.m_intrusiveTable.m_buckets;
0054aab4      this->m_sentNetBlobIDInfo.m_intrusiveTable.vtable = 0x7ca7cc;
0054aab4      
0054aad3      if (m_buckets != &this->m_sentNetBlobIDInfo.m_intrusiveTable.m_aInplaceBuckets)
0054aad6          operator delete[](m_buckets);
0054aad6      
0054aab4      this->m_sentNetBlobIDInfo.m_intrusiveTable.m_buckets = nullptr;
0054aab4      this->m_sentNetBlobIDInfo.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0054aab4      this->m_sentNetBlobIDInfo.m_intrusiveTable.m_numBuckets = 0;
0054aab4      this->m_sentNetBlobIDInfo.m_intrusiveTable.m_numElements = 0;
0054aaf0      /* tailcall */
0054aaf0      return NIList<NetBlob *>::DeleteContents(this);
0054aab0  }

0054aaf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0054ab00  int32_t __thiscall SentPacketStore::AddSentPacket(class SentPacketStore* this, class NetPacket* arg2)

0054ab00  {
0054ab06      class NetPacket* edi = arg2;
0054ab14      InterlockedIncrement(&edi->m_cRef);
0054ab1c      void* eax_1 = operator new(8);
0054ab1c      
0054ab28      if (eax_1 == 0)
0054ab31          eax_1 = nullptr;
0054ab28      else
0054ab28      {
0054ab2a          *(uint32_t*)eax_1 = edi;
0054ab2c          *(uint32_t*)((char*)eax_1 + 4) = 0;
0054ab28      }
0054ab28      
0054ab33      class NIListElement<NetPacket *>* tail_ = this->m_sentPacketList.tail_;
0054ab33      
0054ab38      if (tail_ != 0)
0054ab38      {
0054ab41          tail_->next_ = eax_1;
0054ab4a          this->m_sentPacketList.tail_ = this->m_sentPacketList.tail_->next_;
0054ab38      }
0054ab38      else
0054ab38      {
0054ab3a          this->m_sentPacketList.head_ = eax_1;
0054ab3c          this->m_sentPacketList.tail_ = eax_1;
0054ab38      }
0054ab38      
0054ab4f      NetPacket::RemoveDisposableOptionalHeaders(edi);
0054ab5a      int32_t var_14 = 0;
0054ab5a      
0054ab5e      if (edi->numFrags_ > 0)
0054ab5e      {
0054ab6a          class BlobFrag* (* var_18_1)[0x1d] = &edi->fragList_;
0054ac36          bool cond:1_1;
0054ac36          
0054ac36          do
0054ac36          {
0054ab76              struct BlobFragHeader_t* hdrRead_ = ADJ(var_18_1)->fragList_[0]->hdrRead_;
0054ab79              int32_t ebx_1 = hdrRead_->blobID;
0054ab7b              int32_t ebp_1 = *(uint32_t*)((char*)hdrRead_->blobID)[4];
0054ab7e              int32_t var_30_1 = ebp_1;
0054ab80              int32_t var_10 = ebx_1;
0054ab84              int32_t var_c_1 = ebp_1;
0054ab84              
0054ab92              if (NetBlobIDUtils::IsEphemeralFlagSet(ebx_1) != 0)
0054ab92              {
0054ab98                  int32_t var_30_2 = ebp_1;
0054ab9a                  int32_t eax_4;
0054ab9a                  int32_t edx_3;
0054ab9a                  eax_4 = NetBlobIDUtils::GetSequenceID(ebx_1);
0054abab                  int32_t var_30_3 = 0;
0054abad                  uint32_t m_numBuckets = this->m_sentNetBlobIDInfo.m_intrusiveTable.m_numBuckets;
0054abb0                  int32_t var_38_1 = edx_3;
0054abb1                  int32_t var_3c_1 = eax_4;
0054abb2                  int32_t var_8 = eax_4;
0054abb6                  int32_t var_4_1 = edx_3;
0054abc9                  int32_t* eax_7 = this->m_sentNetBlobIDInfo.m_intrusiveTable.m_buckets[_aullrem()];
0054abc9                  
0054abcd                  if (eax_7 == 0)
0054abcd                  {
0054ac11                  label_54ac11:
0054ac11                      HashTable<unsigned __int64,unsigned __int64,0>::set(&this->m_sentNetBlobIDInfo, &var_8, &var_10);
0054abcd                  }
0054abcd                  else
0054abcd                  {
0054abdb                      while ((*(uint32_t*)eax_7 != eax_4 || eax_7[1] != edx_3))
0054abdb                      {
0054abdd                          eax_7 = eax_7[2];
0054abdd                          
0054abe2                          if (eax_7 == 0)
0054abe2                              goto label_54ac11_2;
0054abdb                      }
0054abdb                      
0054abe8                      if (eax_7 == 0)
0054abe8                      {
0054ac11                      label_54ac11_1:
0054ac11                          HashTable<unsigned __int64,unsigned __int64,0>::set(&this->m_sentNetBlobIDInfo, &var_8, &var_10);
0054abe8                      }
0054abe8                      else
0054abe8                      {
0054abf0                          int32_t var_30_4 = eax_7[5];
0054abf2                          int32_t var_38_2 = ebp_1;
0054abf2                          
0054abfe                          if (NetBlobIDUtils::LHSNewerOrderingStamp(ebx_1, eax_7[4]) != 0)
0054abfe                          {
0054ac11                          label_54ac11_2:
0054ac11                              HashTable<unsigned __int64,unsigned __int64,0>::set(&this->m_sentNetBlobIDInfo, &var_8, &var_10);
0054abfe                          }
0054abe8                      }
0054abcd                  }
0054abcd                  
0054ac16                  edi = arg2;
0054ab92              }
0054ab92              
0054ac2c              cond:1_1 = (var_14 + 1) < edi->numFrags_;
0054ac2e              var_14 += 1;
0054ac32              var_18_1 = &*(uint116_t*)var_18_1[1];
0054ac36          } while (cond:1_1);
0054ab5e      }
0054ab5e      
0054ac48      return 1;
0054ab00  }

0054ac4b                                   90 90 90 90 90                                                             .....

0054ac50  void __thiscall SentPacketStore::EraseNetBlobID(class SentPacketStore* this, uint64_t arg2)

0054ac50  {
0054ac54      int32_t ebx = *(uint32_t*)((char*)arg2)[4];
0054ac59      int32_t esi = arg2;
0054ac5e      int32_t var_1c = ebx;
0054ac5e      
0054ac6c      if (NetBlobIDUtils::IsEphemeralFlagSet(esi) != 0)
0054ac6c      {
0054ac6e          int32_t var_1c_1 = ebx;
0054ac70          int32_t eax_1;
0054ac70          int32_t edx_1;
0054ac70          eax_1 = NetBlobIDUtils::GetSequenceID(esi);
0054ac78          arg2 = eax_1;
0054ac8b          *(uint32_t*)((char*)arg2)[4] = edx_1;
0054ac8f          void __return;
0054ac8f          IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_sentNetBlobIDInfo.m_intrusiveTable.vtable, &__return, &arg2);
0054aca8          void* var_4;
0054aca8          
0054aca8          if ((var_4 != 0 && (esi == *(uint32_t*)((char*)var_4 + 0x10) && ebx == *(uint32_t*)((char*)var_4 + 0x14))))
0054aca8          {
0054acb1              class HashTableData<unsigned __int64,ImgTex *>* eax_4 = IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,ImgTex *> *,1>::remove(&this->m_sentNetBlobIDInfo.m_intrusiveTable, &arg2);
0054acb1              
0054acb8              if (eax_4 != 0)
0054acbb                  operator delete(eax_4);
0054aca8          }
0054ac6c      }
0054ac50  }

0054accc                                      90 90 90 90                                                              ....

0054acd0  int32_t __thiscall SentPacketStore::Flush(class SentPacketStore* this, uint32_t arg2, int32_t arg3)

0054acd0  {
0054ace4      class NIListElement<NetPacket *>* next_;
0054ace4      
0054ace4      for (class NIListElement<NetPacket *>* head__1 = this->m_sentPacketList.head_; head__1 != 0; head__1 = next_)
0054ace4      {
0054acf0          class NetPacket* data_ = head__1->data_;
0054acf0          
0054acf2          if (arg3 == 0)
0054acf2          {
0054acf4              uint32_t seqNum_ = data_->seqNum_;
0054acf4              
0054ad00              if (seqNum_ == arg2)
0054ad00                  break;
0054ad00              
0054ad08              uint32_t eax_3 = (seqNum_ - arg2);
0054ad0c              int32_t edx_1 = 1;
0054ad0c              
0054ad11              if (seqNum_ < arg2)
0054ad11              {
0054ad15                  eax_3 = (arg2 - seqNum_);
0054ad17                  edx_1 = 0xffffffff;
0054ad11              }
0054ad11              
0054ad1f              if (eax_3 > 0x7fffffff)
0054ad21                  edx_1 = -(edx_1);
0054ad21              
0054ad25              if (edx_1 >= 0)
0054ad25                  break;
0054acf2          }
0054acf2          
0054ad27          class NIListElement<NetPacket *>* head_ = this->m_sentPacketList.head_;
0054ad2c          next_ = head__1->next_;
0054ad2c          
0054ad33          if (head_ != 0)
0054ad33          {
0054ad35              class NIListElement<NetPacket *>* next__1 = head_->next_;
0054ad3a              this->m_sentPacketList.head_ = next__1;
0054ad3a              
0054ad3d              if (next__1 == 0)
0054ad3f                  this->m_sentPacketList.tail_ = next__1;
0054ad3f              
0054ad43              operator delete(head_);
0054ad33          }
0054ad33          
0054ad51          int32_t j = 0;
0054ad51          
0054ad55          if (data_->numFrags_ > 0)
0054ad55          {
0054ad57              class BlobFrag* (* edi)[0x1d] = &data_->fragList_;
0054ad57              
0054ad7f              do
0054ad7f              {
0054ad62                  struct BlobFragHeader_t* hdrRead_ = ADJ(edi)->fragList_[0]->hdrRead_;
0054ad6a                  int32_t var_20_2 = *(uint32_t*)((char*)hdrRead_->blobID)[4];
0054ad6e                  SentPacketStore::EraseNetBlobID(this, hdrRead_->blobID);
0054ad79                  j += 1;
0054ad7a                  edi = &*(uint116_t*)edi[1];
0054ad7f              } while (j < data_->numFrags_);
0054ad55          }
0054ad55          
0054ad8d          if (InterlockedDecrement(&data_->m_cRef) == 0)
0054ad93              data_->vtable->__vecDelDtor(1);
0054ace4      }
0054ace4      
0054adac      return 1;
0054acd0  }

0054adaf                                               90                                                                 .

0054adb0  void __thiscall ArrivedEphInfo::ArrivedEphInfo(class ArrivedEphInfo* this, uint64_t arg2, uint64_t arg3)

0054adb0  {
0054adb6      this->id = arg2;
0054adbf      this->hash_next = nullptr;
0054adc2      *(uint32_t*)((char*)this->id)[4] = *(uint32_t*)((char*)arg2)[4];
0054adc9      this->m_next = nullptr;
0054add0      this->vtable = 0x7ca754;
0054add6      this->m_latestNetBlobID = arg3;
0054add9      *(uint32_t*)((char*)this->m_latestNetBlobID)[4] = *(uint32_t*)((char*)arg3)[4];
0054ade8      this->m_timeStamp = (*(uint32_t*)Timer::cur_time);
0054adeb      *(uint32_t*)((char*)this->m_timeStamp)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0054adb0  }

0054adf1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0054ae00  void __thiscall ArrivedEphInfo::UpdateNetBlobID(class ArrivedEphInfo* this, uint64_t arg2)

0054ae00  {
0054ae08      this->m_latestNetBlobID = arg2;
0054ae0b      *(uint32_t*)((char*)this->m_latestNetBlobID)[4] = *(uint32_t*)((char*)arg2)[4];
0054ae19      this->m_timeStamp = (*(uint32_t*)Timer::cur_time);
0054ae1c      *(uint32_t*)((char*)this->m_timeStamp)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0054ae00  }

0054ae22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0054ae30  uint8_t __fastcall ArrivedEphInfo::fTimedOut(class ArrivedEphInfo const* this)

0054ae30  {
0054ae36      long double x87_r7 = (((long double)Timer::cur_time) - ((long double)this->m_timeStamp));
0054ae39      long double temp0 = ((long double)5.0);
0054ae39      (x87_r7 - temp0);
0054ae39      
0054ae44      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0054ae4e          return 0;
0054ae4e      
0054ae4b      return 1;
0054ae30  }

0054ae4f                                               90                                                                 .

0054ae50  void* __thiscall HashBaseData<unsigned __int64>::`scalar deleting destructor'(class HashBaseData<unsigned __int64>* this, uint32_t arg2)

0054ae50  {
0054ae55      this->hash_next = nullptr;
0054ae58      this->id = 0;
0054ae5b      *(uint32_t*)((char*)this->id)[4] = 0;
0054ae63      this->vtable = 0x7ca754;
0054ae63      
0054ae69      if ((arg2 & 1) != 0)
0054ae6c          operator delete(this);
0054ae6c      
0054ae77      return this;
0054ae50  }

0054ae7a                                                                                90 90 90 90 90 90                            ......

0054ae80  void CFactory::CleanUp()

0054ae80  {
0054ae80      class CFactory* CFactory::global_cfactory_1 = CFactory::global_cfactory;
0054ae80      
0054ae88      if (CFactory::global_cfactory_1 != 0)
0054ae8a          CFactory::global_cfactory_1->vtable->__vecDelDtor(1);
0054ae8a      
0054ae90      CFactory::global_cfactory = nullptr;
0054ae80  }

0054ae9b                                                                                   90 90 90 90 90                             .....

0054aea0  class CommandInterpreter* CFactory::MakeCommandInterpreter_Internal(class CFactory* this @ ecx)

0054aea0  {
0054aea5      void* eax = operator new(0xc8);
0054aea5      
0054aeaf      if (eax == 0)
0054aeba          return 0;
0054aeba      
0054aeb3      /* tailcall */
0054aeb3      return CommandInterpreter::CommandInterpreter(eax);
0054aea0  }

0054aebb                                                                                   90 90 90 90 90                             .....

0054aec0  class CommandInterpreter* CFactory::MakeCommandInterpreter()

0054aec0  {
0054aec0      class CFactory* CFactory::global_cfactory_1 = CFactory::global_cfactory;
0054aec0      
0054aec8      if (CFactory::global_cfactory_1 == 0)
0054aed1          return 0;
0054aed1      
0054aecc      /* jump -> CFactory::global_cfactory_1->vtable->MakeCommandInterpreter_Internal */
0054aec0  }

0054aed2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054aee0  class CLCache* CFactory::Make_Client_Cache()

0054aee0  {
0054aee0      class CFactory* CFactory::global_cfactory_1 = CFactory::global_cfactory;
0054aee0      
0054aeea      if (CFactory::global_cfactory_1 == 0)
0054aef1          return 0;
0054aef1      
0054aeee      /* jump -> CFactory::global_cfactory_1->vtable->Make_Client_Cache_Internal */
0054aee0  }

0054aef2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054af00  class CLCache* CFactory::Make_Client_Cache_Internal(class CFactory* this @ ecx)

0054af00  {
0054af05      void* eax = operator new(0x308);
0054af05      
0054af0f      if (eax == 0)
0054af1a          return 0;
0054af1a      
0054af13      /* tailcall */
0054af13      return CLCache::CLCache(eax);
0054af00  }

0054af1b                                                                                   90 90 90 90 90                             .....

0054af20  class CWeenieObject* CFactory::MakeCWeenieObject(uint32_t arg1)

0054af20  {
0054af20      class CFactory* CFactory::global_cfactory_1 = CFactory::global_cfactory;
0054af20      
0054af2a      if (CFactory::global_cfactory_1 == 0)
0054af36          return 0;
0054af36      
0054af33      return CFactory::global_cfactory_1->vtable->MakeCWeenieObject_Internal(arg1);
0054af20  }

0054af37                                                                       90 90 90 90 90 90 90 90 90                         .........

0054af40  class GlobalEventHandler* CFactory::MakeGlobalEventHandler()

0054af40  {
0054af40      class CFactory* CFactory::global_cfactory_1 = CFactory::global_cfactory;
0054af40      
0054af48      if (CFactory::global_cfactory_1 != 0)
0054af4f          /* jump -> CFactory::global_cfactory_1->vtable->MakeGlobalEventHandler_Internal */
0054af4f      
0054af4c      return 0;
0054af40  }

0054af52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054af60  class QualityRegistrar* CFactory::MakeQualityRegistrar()

0054af60  {
0054af60      class CFactory* CFactory::global_cfactory_1 = CFactory::global_cfactory;
0054af60      
0054af68      if (CFactory::global_cfactory_1 != 0)
0054af6f          /* jump -> CFactory::global_cfactory_1->vtable->MakeQualityRegistrar_Internal */
0054af6f      
0054af6c      return 0;
0054af60  }

0054af72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054af80  class QualityRegistrar* CFactory::MakeQualityRegistrar_Internal(class CFactory* this @ ecx)

0054af80  {
0054af85      void* eax = operator new(0x16c);
0054af85      
0054af8f      if (eax == 0)
0054af9a          return 0;
0054af9a      
0054af93      /* tailcall */
0054af93      return QualityRegistrar::QualityRegistrar(eax);
0054af80  }

0054af9b                                                                                   90 90 90 90 90                             .....

0054afa0  class CCommunicationSystem* CFactory::MakeCCommunicationSystem()

0054afa0  {
0054afa0      class CFactory* CFactory::global_cfactory_1 = CFactory::global_cfactory;
0054afa0      
0054afa8      if (CFactory::global_cfactory_1 != 0)
0054afaf          /* jump -> CFactory::global_cfactory_1->vtable->MakeCCommunicationSystem_Internal */
0054afaf      
0054afac      return 0;
0054afa0  }

0054afb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054afc0  class CCommunicationSystem* CFactory::MakeCCommunicationSystem_Internal(class CFactory* this @ ecx)

0054afc0  {
0054afc2      void* eax = operator new(0x14);
0054afc2      
0054afcc      if (eax == 0)
0054afd7          return 0;
0054afd7      
0054afd0      /* tailcall */
0054afd0      return CCommunicationSystem::CCommunicationSystem(eax);
0054afc0  }

0054afd8                                                                          90 90 90 90 90 90 90 90                          ........

0054afe0  class SmartBox* CFactory::MakeSmartBox(class NIList<NetBlob *>* arg1)

0054afe0  {
0054afe0      class CFactory* CFactory::global_cfactory_1 = CFactory::global_cfactory;
0054afe0      
0054afe8      if (CFactory::global_cfactory_1 != 0)
0054aff7          return CFactory::global_cfactory_1->vtable->MakeSmartBox_Internal(arg1);
0054aff7      
0054afec      return 0;
0054afe0  }

0054aff8                                                                          90 90 90 90 90 90 90 90                          ........

0054b000  class SmartBox* CFactory::MakeSmartBox_Internal(class CFactory* this @ ecx, class NIList<NetBlob *>* arg2)

0054b000  {
0054b005      void* eax;
0054b005      class NIList<NetBlob *>* edx;
0054b005      eax = operator new(0x118);
0054b005      
0054b00f      if (eax == 0)
0054b01a          return 0;
0054b01a      
0054b013      /* tailcall */
0054b013      return SmartBox::SmartBox(eax, edx);
0054b000  }

0054b01d                                                                                         90 90 90                               ...

0054b020  void Render::SetOverallGraphicsQuality(uint32_t arg1)

0054b020  {
0054b02c      if ((arg1 - 1) <= 4)
0054b032          switch (arg1)
0054b032          {
0054b03b              case 1:
0054b03b              {
0054b03b                  Render::m_RenderPrefs.TextureFiltering = 0;
0054b040                  Render::m_RenderPrefs.EnvironmentDetailTextures = 0;
0054b045                  Render::m_RenderPrefs.MultiPassAlpha = 0;
0054b04a                  Render::m_RenderPrefs.LandscapeTextureDetail = 4;
0054b050                  Render::m_RenderPrefs.SceneryDrawDistance = 0;
0054b055                  Render::m_RenderPrefs.LandscapeDrawDistance = 3;
0054b05f                  Render::m_RenderPrefs.LandscapeDetailTextures = 0;
0054b064                  Render::m_RenderPrefs.EnvironmentTextureDetail = 4;
0054b03b                  break;
0054b03b              }
0054b06d              case 2:
0054b06d              {
0054b06d                  Render::m_RenderPrefs.TextureFiltering = 0;
0054b072                  Render::m_RenderPrefs.LandscapeDetailTextures = 0;
0054b077                  Render::m_RenderPrefs.EnvironmentDetailTextures = 0;
0054b07c                  Render::m_RenderPrefs.MultiPassAlpha = 0;
0054b086                  Render::m_RenderPrefs.LandscapeTextureDetail = 3;
0054b08b                  Render::m_RenderPrefs.EnvironmentTextureDetail = 3;
0054b090                  Render::m_RenderPrefs.SceneryDrawDistance = 1;
0054b09a                  Render::m_RenderPrefs.LandscapeDrawDistance = 5;
0054b06d                  break;
0054b06d              }
0054b0a7              case 3:
0054b0a7              {
0054b0a7                  Render::m_RenderPrefs.TextureFiltering = 0;
0054b0ac                  Render::m_RenderPrefs.LandscapeDetailTextures = 0;
0054b0b1                  Render::m_RenderPrefs.EnvironmentDetailTextures = 0;
0054b0b6                  Render::m_RenderPrefs.MultiPassAlpha = 0;
0054b0c0                  Render::m_RenderPrefs.LandscapeTextureDetail = 2;
0054b0c5                  Render::m_RenderPrefs.EnvironmentTextureDetail = 2;
0054b0ca                  Render::m_RenderPrefs.SceneryDrawDistance = 1;
0054b0d4                  Render::m_RenderPrefs.LandscapeDrawDistance = 8;
0054b0a7                  break;
0054b0a7              }
0054b0e9              case 4:
0054b0e9              {
0054b0e9                  Render::m_RenderPrefs.TextureFiltering = 1;
0054b0ef                  Render::m_RenderPrefs.LandscapeDetailTextures = 0;
0054b0f6                  Render::m_RenderPrefs.EnvironmentDetailTextures = 1;
0054b0fc                  Render::m_RenderPrefs.MultiPassAlpha = 1;
0054b102                  Render::m_RenderPrefs.LandscapeTextureDetail = 2;
0054b107                  Render::m_RenderPrefs.SceneryDrawDistance = 2;
0054b10c                  Render::m_RenderPrefs.LandscapeDrawDistance = 0xb;
0054b116                  Render::m_RenderPrefs.EnvironmentTextureDetail = 1;
0054b0e9                  break;
0054b0e9              }
0054b124              case 5:
0054b124              {
0054b124                  Render::m_RenderPrefs.TextureFiltering = 1;
0054b12a                  Render::m_RenderPrefs.EnvironmentDetailTextures = 1;
0054b130                  Render::m_RenderPrefs.MultiPassAlpha = 1;
0054b136                  Render::m_RenderPrefs.LandscapeTextureDetail = 0;
0054b13b                  Render::m_RenderPrefs.SceneryDrawDistance = 2;
0054b145                  Render::m_RenderPrefs.LandscapeDrawDistance = 0xf;
0054b14f                  Render::m_RenderPrefs.LandscapeDetailTextures = 0;
0054b154                  Render::m_RenderPrefs.EnvironmentTextureDetail = 1;
0054b124                  break;
0054b124              }
0054b032          }
0054b020  }

0054b15b                                                                                   90                                         .
0054b15c  uint32_t jump_table_54b15c[0x5] = 
0054b15c  {
0054b15c      [0x0] =  0x0054b039
0054b160      [0x1] =  0x0054b06b
0054b164      [0x2] =  0x0054b0a5
0054b168      [0x3] =  0x0054b0df
0054b16c      [0x4] =  0x0054b11d
0054b170  }

0054b170  uint32_t Render::DetermineOverallGraphicsQuality()

0054b170  {
0054b170      uint32_t LandscapeTextureDetail = Render::m_RenderPrefs.LandscapeTextureDetail;
0054b178      uint32_t EnvironmentTextureDetail = Render::m_RenderPrefs.EnvironmentTextureDetail;
0054b17f      uint32_t LandscapeDrawDistance = Render::m_RenderPrefs.LandscapeDrawDistance;
0054b186      uint32_t SceneryDrawDistance = Render::m_RenderPrefs.SceneryDrawDistance;
0054b18c      int32_t result = 1;
0054b191      int32_t ecx = 0;
0054b191      
0054b196      while (true)
0054b196      {
0054b196          uint32_t TextureFiltering = Render::m_RenderPrefs.TextureFiltering;
0054b196          
0054b19c          if (ecx <= 4)
0054b19c          {
0054b19e              bool cond:1_1;
0054b19e              
0054b19e              switch (ecx)
0054b19e              {
0054b1a7                  case 0:
0054b1a7                  {
0054b1a7                      if (TextureFiltering != 0)
0054b1a7                          goto label_54b1fa;
0054b1a7                      
0054b1a9                      TextureFiltering = Render::m_RenderPrefs.EnvironmentDetailTextures;
0054b1a9                      
0054b1b1                      if (TextureFiltering != 0)
0054b1b1                          goto label_54b1fa;
0054b1b1                      
0054b1b3                      TextureFiltering = Render::m_RenderPrefs.MultiPassAlpha;
0054b1b3                      
0054b1c8                      if ((((TextureFiltering != 0 || LandscapeTextureDetail != 4) || EnvironmentTextureDetail != LandscapeTextureDetail) || SceneryDrawDistance != 0))
0054b1bb                          goto label_54b1fa;
0054b1bb                      
0054b1ca                      cond:1_1 = LandscapeDrawDistance == 3;
0054b1a7                      break;
0054b1a7                  }
0054b1d1                  case 1:
0054b1d1                  {
0054b1d1                      if (TextureFiltering != 0)
0054b1d1                          goto label_54b1fa;
0054b1d1                      
0054b1d3                      TextureFiltering = Render::m_RenderPrefs.EnvironmentDetailTextures;
0054b1d3                      
0054b1db                      if (TextureFiltering != 0)
0054b1db                          goto label_54b1fa;
0054b1db                      
0054b1dd                      TextureFiltering = Render::m_RenderPrefs.MultiPassAlpha;
0054b1dd                      
0054b1f3                      if ((((TextureFiltering != 0 || LandscapeTextureDetail != 3) || EnvironmentTextureDetail != LandscapeTextureDetail) || SceneryDrawDistance != 1))
0054b1e5                          goto label_54b1fa;
0054b1e5                      
0054b1f5                      cond:1_1 = LandscapeDrawDistance == 5;
0054b1d1                      break;
0054b1d1                  }
0054b1fa                  case 2:
0054b1fa                  case 3:
0054b1fa                  case 4:
0054b1fa                  {
0054b1fa                  label_54b1fa:
0054b1fa                      result += 1;
0054b1fb                      ecx += 1;
0054b1fb                      
0054b1ff                      if (result > 5)
0054b1ff                          break;
0054b1ff                      
0054b1ff                      continue;
0054b1fa                  }
0054b19e              }
0054b19e              
0054b1f8              if (!(cond:1_1))
0054b1f8                  goto label_54b1fa;
0054b19c          }
0054b19c          
0054b207          return result;
0054b196      }
0054b196      
0054b201      return 0;
0054b170  }

0054b208  uint32_t jump_table_54b208[0x5] = 
0054b208  {
0054b208      [0x0] =  0x0054b1a5
0054b20c      [0x1] =  0x0054b1cf
0054b210      [0x2] =  0x0054b1fa
0054b214      [0x3] =  0x0054b1fa
0054b218      [0x4] =  0x0054b1fa
0054b21c  }

0054b21c                                                                                      90 90 90 90                              ....

0054b220  int32_t Render::Set3DView(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4)

0054b220  {
0054b23f      return Render::m_pRenderer->vtable->Set3DViewInternal(arg1, arg2, arg3, arg4);
0054b220  }


0054b240  void Render::set_vdst(float arg1)

0054b240  {
0054b24a      long double st1 = __fpatan(((long double)arg1), ((long double)1.0));
0054b24c      long double x87_r7_1 = (st1 + st1);
0054b252      (((long double)arg1) - ((long double)0.400000006f));
0054b25a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0054b25a      
0054b25d      if (p)
0054b271          Render::znear = 0.100000001f;
0054b25d      else
0054b269          Render::znear = ((float)(((long double)arg1) * ((long double)0.25f)));
0054b269      
0054b27b      (x87_r7_1 - ((long double)0.001));
0054b283      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0054b283      
0054b286      if (!(p_1))
0054b286      {
0054b288          class Render* Render::m_pRenderer_1 = Render::m_pRenderer;
0054b298          class Render* Render::m_pRenderer_3 = Render::m_pRenderer_1;
0054b296          Render::m_pRenderer_1->vtable->SetFOVInternal(((float)((long double)0.001)));
0054b29f          return;
0054b286      }
0054b286      
0054b2a0      long double temp2 = ((long double)3.1415926535897931);
0054b2a0      (x87_r7_1 - temp2);
0054b2a0      
0054b2ab      if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0054b2af          x87_r7_1 = ((long double)3.1415926535897931);
0054b2af      
0054b2b5      class Render* Render::m_pRenderer_2 = Render::m_pRenderer;
0054b2bd      class Render* Render::m_pRenderer_4 = Render::m_pRenderer_2;
0054b2bb      Render::m_pRenderer_2->vtable->SetFOVInternal(((float)x87_r7_1));
0054b240  }

0054b2c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0054b2d0  int32_t Render::SetFOVRad(float arg1)

0054b2d0  {
0054b2d4      (((long double)arg1) - ((long double)0f));
0054b2dc      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0054b2dc      
0054b2df      if (p)
0054b2df      {
0054b2e1          long double x87_r7_1 = ((long double)arg1);
0054b2e5          long double temp1_1 = ((long double)3.1415926535897931);
0054b2e5          (x87_r7_1 - temp1_1);
0054b2e5          
0054b2f0          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
0054b2f0          {
0054b2f2              class Render* Render::m_pRenderer_1 = Render::m_pRenderer;
0054b2fc              Render::znear = 0.100000001f;
0054b306              Render::m_pRenderer_1->vtable->SetFOVInternal(arg1);
0054b311              return 1;
0054b2f0          }
0054b2df      }
0054b2df      
0054b314      return 0;
0054b2d0  }

0054b315                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0054b320  void Render::set_zfar(float arg1)

0054b320  {
0054b324      class Render* Render::m_pRenderer_1 = Render::m_pRenderer;
0054b32a      Render::zfar = arg1;
0054b334      Render::m_pRenderer_1->vtable->SetFOVInternal(Render::fov);
0054b320  }

0054b33b                                                                                   90 90 90 90 90                             .....

0054b340  void __stdcall Render::SetFOVInternal(class Render* this @ ecx, float arg2)

0054b340  {
0054b341      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054b34c      long double x87_r7 = ((long double)RenderDevice::render_device_1->m_viewportWidth);
0054b34c      
0054b354      if (RenderDevice::render_device_1->m_viewportWidth < 0)
0054b356          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
0054b356      
0054b35c      Render::bw = ((double)x87_r7);
0054b36a      long double x87_r7_1 = ((long double)RenderDevice::render_device_1->m_viewportHeight);
0054b36a      
0054b370      if (RenderDevice::render_device_1->m_viewportHeight < 0)
0054b372          x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0054b372      
0054b378      Render::bh = ((double)x87_r7_1);
0054b382      long double x87_r7_2 = ((long double)Render::scale);
0054b388      Render::fov = arg2;
0054b38d      long double x87_r7_3 = (((long double)1.0) / x87_r7_2);
0054b393      Render::xinvscale = ((double)x87_r7_3);
0054b399      Render::yinvscale = ((double)x87_r7_3);
0054b3b7      Render::tx = ((double)(((((long double)Render::bw) - ((long double)1.0)) * ((long double)0.5)) * ((long double)Render::xinvscale)));
0054b3d5      Render::ty = ((double)(((((long double)Render::bh) - ((long double)1.0)) * ((long double)0.5)) * ((long double)Render::yinvscale)));
0054b3e5      long double st0;
0054b3e5      bool c2;
0054b3e5      st0 = __fptan((((long double)arg2) * ((long double)0.5)));
0054b3e7      /* unimplemented  {fstp st0, st0} */;
0054b3e7      /* unimplemented  {fstp st0, st0} */;
0054b3e9      /* unimplemented  {fdivr st0, qword [&Render::ty]} */;
0054b3ef      Render::vdst = ((float)/* Render::vdst = fconvert.s(unimplemented  {fstp dword [&Render::vdst], st0}) */);
0054b3ef      /* unimplemented  {fstp dword [&Render::vdst], st0} */;
0054b340  }

0054b3f9                                                                             90 90 90 90 90 90 90                           .......

0054b400  void Render::GetViewerBBox(class CSphere const* arg1, class AC1Legacy::Vector3* arg2, class AC1Legacy::Vector3* arg3)

0054b400  {
0054b403      struct frameContext* Render::FrameCurrent_1 = Render::FrameCurrent;
0054b425      long double x87_r7_3 = (((((long double)Render::Xaxis.y) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[1])) + (((long double)Render::Xaxis.z) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[2]))) + (((long double)Render::Xaxis.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[0])));
0054b444      long double x87_r6_7 = (((((long double)Render::Xaxis.y) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[4])) + (((long double)Render::Xaxis.z) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[5]))) + (((long double)Render::Xaxis.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[3])));
0054b463      long double x87_r5_7 = (((((long double)Render::Xaxis.y) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[7])) + (((long double)Render::Xaxis.z) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[8]))) + (((long double)Render::Xaxis.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[6])));
0054b465      float var_4 = ((float)x87_r5_7);
0054b486      long double x87_r5_11 = (((((long double)Render::Zaxis.y) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[1])) + (((long double)Render::Zaxis.z) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[2]))) + (((long double)Render::Zaxis.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[0])));
0054b4a5      long double x87_r4_11 = (((((long double)Render::Zaxis.y) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[4])) + (((long double)Render::Zaxis.z) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[5]))) + (((long double)Render::Zaxis.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[3])));
0054b4c4      class CSphere* eax = arg1;
0054b4c8      long double x87_r3_7 = (((((long double)Render::Zaxis.y) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[7])) + (((long double)Render::Zaxis.z) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[8]))) + (((long double)Render::Zaxis.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[6])));
0054b4ca      float var_10 = ((float)x87_r3_7);
0054b4ce      long double x87_r3_8 = ((long double)eax->radius);
0054b4e7      long double x87_r1_4 = ((long double)eax->radius);
0054b508      long double x87_r1_6 = (((long double)eax->center.x) - x87_r1_4);
0054b530      long double x87_r2_12 = (((long double)((float)(((long double)eax->center.y) - ((long double)((float)(x87_r6_7 * x87_r3_8)))))) + ((long double)((float)(x87_r4_11 * x87_r1_4))));
0054b53c      float var_1c_1 = ((float)(((long double)((float)(((long double)eax->center.z) - ((long double)((float)(((long double)var_4) * x87_r3_8)))))) + ((long double)((float)(((long double)var_10) * x87_r1_4)))));
0054b552      arg2->x = ((float)(x87_r1_4 + ((long double)((float)(x87_r5_11 * x87_r1_4)))));
0054b55c      arg2->y = ((float)x87_r2_12);
0054b563      arg2->z = var_1c_1;
0054b566      float radius = eax->radius;
0054b569      arg1 = radius;
0054b575      float var_3c_2 = ((float)(((long double)arg1) * x87_r5_11));
0054b57d      float var_38_2 = ((float)(x87_r1_6 * ((long double)arg1)));
0054b587      long double x87_r5_13 = (((long double)var_10) * ((long double)arg1));
0054b58b      arg1 = radius;
0054b5c1      float* eax_1 = arg3;
0054b5d1      long double x87_r5_19 = (((long double)((float)(x87_r7_3 + ((long double)eax->center.y)))) - ((long double)var_38_2));
0054b5db      float var_4_1 = ((float)(((((long double)var_4) * ((long double)arg1)) + ((long double)eax->center.z)) - ((long double)((float)x87_r5_13))));
0054b5ef      *(uint32_t*)eax_1 = ((float)(((long double)((float)(((long double)((float)(((long double)arg1) * x87_r7_3))) + ((long double)eax->center.x)))) - ((long double)var_3c_2)));
0054b5fd      eax_1[1] = ((float)x87_r5_19);
0054b600      eax_1[2] = var_4_1;
0054b400  }

0054b607                       90 90 90 90 90 90 90 90 90                                                         .........

0054b610  class AC1Legacy::Vector3* Render::pick_ray(class AC1Legacy::Vector3* __return, int32_t arg2, int32_t arg3)

0054b610  {
0054b61d      long double x87_r7_2 = ((((long double)arg3) * ((long double)Render::yinvscale)) - ((long double)Render::ty));
0054b623      Render::Zaxis.x;
0054b64f      Render::Yaxis.y;
0054b655      Render::vdst;
0054b675      long double x87_r3_4 = ((((long double)arg2) * ((long double)Render::xinvscale)) - ((long double)Render::tx));
0054b69b      ((((long double)Render::Xaxis.x) * x87_r3_4) + (((long double)Render::Yaxis.x) * ((long double)Render::vdst)));
0054b6cb      long double x87_r6_4 = (((long double)((float)(((long double)((float)(((long double)Render::Xaxis.y) * x87_r3_4))) + x87_r3_4))) - ((long double)((float)(((long double)Render::Zaxis.y) * x87_r7_2))));
0054b6d3      long double x87_r5_12 = (((long double)((float)(((long double)((float)(((long double)Render::Xaxis.z) * x87_r3_4))) + ((long double)((float)(((long double)Render::Yaxis.z) * ((long double)Render::vdst))))))) - ((long double)((float)(((long double)Render::Zaxis.z) * x87_r7_2))));
0054b6e3      float var_24 = ((float)x87_r3_4);
0054b715      long double x87_r6_6 = (((long double)1f) / x87_r5_12);
0054b71b      arg3 = ((float)x87_r6_6);
0054b731      float* result = __return;
0054b737      *(uint32_t*)result = ((float)(sqrtl((((x87_r5_12 * x87_r5_12) + (x87_r6_4 * x87_r6_4)) + (x87_r3_4 * x87_r3_4))) * x87_r6_6));
0054b739      result[1] = ((float)(((long double)((float)x87_r6_4)) * ((long double)arg3)));
0054b73c      result[2] = ((float)(((long double)((float)x87_r5_12)) * ((long double)arg3)));
0054b742      return result;
0054b610  }

0054b743           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0054b750  void Render::set_selection_cursor(int32_t arg1, int32_t arg2, uint8_t arg3)

0054b750  {
0054b75c      Render::selection_x = arg1;
0054b763      Render::selection_y = arg2;
0054b769      Render::check_selection = 1;
0054b770      Render::check_curr_object_polys = arg3;
0054b776      Render::m_MouseSelectData.bFoundPolygon = 0;
0054b77b      Render::m_MouseSelectData.bFoundSphere = 0;
0054b750  }

0054b781     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0054b790  void Render::clear_selection_cursor()

0054b790  {
0054b792      Render::check_selection = 0;
0054b797      Render::check_curr_object_polys = 0;
0054b79c      Render::m_MouseSelectData.bFoundPolygon = 0;
0054b7a1      Render::m_MouseSelectData.bFoundSphere = 0;
0054b790  }

0054b7a7                       90 90 90 90 90 90 90 90 90                                                         .........

0054b7b0  void Render::SetSurfaceArray(class CSurface** arg1)

0054b7b0  {
0054b7b4      Render::curr_surfaces = arg1;
0054b7b0  }

0054b7ba                                                                                90 90 90 90 90 90                            ......

0054b7c0  void Render::SetLandscapeDetailSurface(class CSurface* arg1)

0054b7c0  {
0054b7c4      Render::landscape_detail_surface = arg1;
0054b7c0  }

0054b7ca                                90 90 90 90 90 90                                                            ......

0054b7d0  void Render::SetBuildingDetailSurface(class CSurface* arg1)

0054b7d0  {
0054b7d4      Render::building_detail_surface = arg1;
0054b7d0  }

0054b7da                                                                                90 90 90 90 90 90                            ......

0054b7e0  void Render::SetEnvironmentDetailSurface(class CSurface* arg1)

0054b7e0  {
0054b7e4      Render::environment_detail_surface = arg1;
0054b7e0  }

0054b7ea                                90 90 90 90 90 90                                                            ......

0054b7f0  void Render::SetObjectDetailSurface(class CSurface* arg1)

0054b7f0  {
0054b7f4      Render::object_detail_surface = arg1;
0054b7f0  }

0054b7fa                                                                                90 90 90 90 90 90                            ......

0054b800  void Render::SetLandscapeDetailTiling(float arg1)

0054b800  {
0054b804      Render::landscape_detail_tiling = arg1;
0054b800  }

0054b80a                                90 90 90 90 90 90                                                            ......

0054b810  void Render::SetEnvironmentDetailTiling(float arg1)

0054b810  {
0054b814      Render::environment_detail_tiling = arg1;
0054b810  }

0054b81a                                                                                90 90 90 90 90 90                            ......

0054b820  void Render::SetBuildingDetailTiling(float arg1)

0054b820  {
0054b824      Render::building_detail_tiling = arg1;
0054b820  }

0054b82a                                90 90 90 90 90 90                                                            ......

0054b830  void Render::SetObjectDetailTiling(float arg1)

0054b830  {
0054b834      Render::object_detail_tiling = arg1;
0054b830  }

0054b83a                                                                                90 90 90 90 90 90                            ......

0054b840  enum Sidedness Render::get_pt_limit(float arg1, float arg2, class Plane const* arg3)

0054b840  {
0054b844      long double x87_r7 = ((long double)arg3->N.z);
0054b84a      long double temp0 = ((long double)0.000199999995f);
0054b84a      (x87_r7 - temp0);
0054b850      enum Sidedness result;
0054b850      result = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0054b850      
0054b855      if ((*(uint8_t*)((char*)result)[1] & 0x41) != 0)
0054b855      {
0054b8a4          long double x87_r7_11 = -(((long double)0.000199999995f));
0054b8a6          long double temp1_1 = ((long double)arg3->N.z);
0054b8a6          (x87_r7_11 - temp1_1);
0054b8a9          result = ((((x87_r7_11 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0054b8a9          
0054b8ae          if ((*(uint8_t*)((char*)result)[1] & 0x41) != 0)
0054b8ae          {
0054b901              float var_c = arg1;
0054b90a              float var_8_1 = arg2;
0054b914              int32_t var_4_1 = 0;
0054b91c              result = Plane::which_side(arg3, &var_c, 0.000199999995f);
0054b8ae          }
0054b8ae          else
0054b8ae          {
0054b8c5              long double x87_r7_17 = -(((((((long double)arg2) * ((long double)arg3->N.y)) + (((long double)arg1) * ((long double)arg3->N.x))) + ((long double)arg3->d)) / ((long double)arg3->N.z)));
0054b8c7              long double temp3_1 = ((long double)0f);
0054b8c7              (x87_r7_17 - temp3_1);
0054b8cd              result = ((((x87_r7_17 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
0054b8cf              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0054b8cf              
0054b8d2              if (p_2)
0054b8d2              {
0054b8e0                  long double temp5_1 = ((long double)1000f);
0054b8e0                  (x87_r7_17 - temp5_1);
0054b8e6                  result = ((((x87_r7_17 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
0054b8d2              }
0054b8ae          }
0054b855      }
0054b855      else
0054b855      {
0054b86c          long double x87_r7_6 = -(((((((long double)arg2) * ((long double)arg3->N.y)) + (((long double)arg1) * ((long double)arg3->N.x))) + ((long double)arg3->d)) / ((long double)arg3->N.z)));
0054b872          long double temp2_1 = ((long double)1000f);
0054b872          (x87_r7_6 - temp2_1);
0054b878          result = ((((x87_r7_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0054b878          
0054b87d          if ((*(uint8_t*)((char*)result)[1] & 1) != 0)
0054b87d          {
0054b87f              long double x87_r7_7 = ((long double)((float)x87_r7_6));
0054b883              long double temp4_1 = ((long double)0f);
0054b883              (x87_r7_7 - temp4_1);
0054b889              result = ((((x87_r7_7 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0054b88b              /* unimplemented  {test ah, 0x41} */;
0054b87d          }
0054b855      }
0054b855      
0054b8df      return result;
0054b840  }


0054b930  void Render::corner_plane_check(float arg1, float arg2, float arg3)

0054b930  {
0054b934      (((long double)arg1) - ((long double)0f));
0054b93c      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0054b93c      
0054b93f      if (p)
0054b93f      {
0054b945          (((long double)arg1) - ((long double)0f));
0054b94d          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0054b94d          
0054b950          if (!(p_1))
0054b998              return;
0054b998          
0054b952          long double x87_r7_2 = ((long double)arg1);
0054b956          long double temp2_1 = ((long double)0f);
0054b956          (x87_r7_2 - temp2_1);
0054b95c          long double x87_r7_3 = ((long double)arg1);
0054b95c          
0054b965          if ((*(uint8_t*)((char*)((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
0054b965          {
0054b984              long double x87_r7_5 = -(x87_r7_3);
0054b986              (x87_r7_5 - ((long double)arg2));
0054b98c              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0054b98c              
0054b98f              if (!(p_2))
0054b998                  return;
0054b998              
0054b999              (x87_r7_5 - ((long double)arg3));
0054b99f              /* unimplemented  {test ah, 0x5} */;
0054b965          }
0054b965          else
0054b965          {
0054b967              long double temp4_1 = ((long double)arg3);
0054b967              (x87_r7_3 - temp4_1);
0054b967              
0054b970              if ((*(uint8_t*)((char*)((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0054b998                  return;
0054b998              
0054b976              (((long double)arg1) - ((long double)arg2));
0054b965          }
0054b93f      }
0054b930  }

0054b9aa                                90 90 90 90 90 90                                                            ......

0054b9b0  void Render::obj_view_set()

0054b9b0  {
0054b9b0      struct frameContext* Render::FrameCurrent_1 = Render::FrameCurrent;
0054b9bb      int32_t Render::portal_npnts_1 = Render::portal_npnts;
0054b9c1      int32_t esi = 0;
0054b9c1      
0054b9c6      if (Render::portal_npnts_1 >= 4)
0054b9c6      {
0054b9d2          int32_t var_10_1 = 3;
0054b9da          void* edx_1 = &Render::portal_obj_plane[1].d;
0054b9df          float* ecx_2 = &Render::portal_vertex->plane.N.y;
0054bc28          bool cond:0_1;
0054bc28          
0054bc28          do
0054bc28          {
0054b9ec              long double x87_r5_1 = ((long double)Render::FrameCurrent_1->object_offset.z);
0054ba02              long double x87_r4_4 = (((((long double)ADJ(ecx_2)->plane.N.y) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[1])) + (((long double)ADJ(ecx_2)->plane.N.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[0]))) + (((long double)ADJ(ecx_2)->plane.N.z) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[2])));
0054ba1f              long double x87_r4_8 = (((((long double)ADJ(ecx_2)->plane.N.z) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[5])) + (((long double)ADJ(ecx_2)->plane.N.y) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[4]))) + (((long double)ADJ(ecx_2)->plane.N.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[3])));
0054ba38              long double x87_r4_12 = (((((long double)ADJ(ecx_2)->plane.N.x) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[6])) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[8]) * ((long double)ADJ(ecx_2)->plane.N.z))) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[7]) * ((long double)ADJ(ecx_2)->plane.N.y)));
0054ba4e              (((((long double)Render::FrameCurrent_1->object_offset.y) * ((long double)ADJ(ecx_2)->plane.N.y)) + (((long double)Render::FrameCurrent_1->object_offset.x) * ((long double)ADJ(ecx_2)->plane.N.x))) + (x87_r5_1 * ((long double)ADJ(ecx_2)->plane.N.z)));
0054bc2e              ADJ(ecx_2)->plane;
0054ba55              *(uint32_t*)((char*)edx_1 - 0x1c) = ((float)x87_r4_4);
0054ba5f              *(uint32_t*)((char*)edx_1 - 0x18) = ((float)x87_r4_8);
0054ba66              *(uint32_t*)((char*)edx_1 - 0x10) = ((float)x87_r5_1);
0054ba69              *(uint32_t*)((char*)edx_1 - 0x14) = ((float)x87_r4_12);
0054ba72              long double x87_r5_8 = ((long double)Render::FrameCurrent_1->object_offset.z);
0054ba89              long double x87_r4_16 = (((((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x24)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[1])) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x20)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[0]))) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x28)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[2])));
0054baa3              long double x87_r4_20 = (((((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x28)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[5])) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x24)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[4]))) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x20)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[3])));
0054bac4              long double x87_r4_24 = (((((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x20)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[6])) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[8]) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x28)))) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[7]) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x24))));
0054badf              ((((((long double)Render::FrameCurrent_1->object_offset.y) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x24))) + (((long double)Render::FrameCurrent_1->object_offset.x) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x20)))) + (x87_r5_8 * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x28)))) + ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x2c)));
0054bae2              *(uint32_t*)((char*)edx_1 - 0xc) = ((float)x87_r4_16);
0054baec              *(uint32_t*)((char*)edx_1 - 8) = ((float)x87_r4_20);
0054baef              *(uint32_t*)edx_1 = ((float)x87_r5_8);
0054baf5              *(uint32_t*)((char*)edx_1 - 4) = ((float)x87_r4_24);
0054bb01              long double x87_r5_15 = ((long double)Render::FrameCurrent_1->object_offset.z);
0054bb18              long double x87_r4_28 = (((((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x3c)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[1])) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x38)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[0]))) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x40)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[2])));
0054bb36              long double x87_r4_32 = (((((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x40)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[5])) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x3c)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[4]))) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x38)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[3])));
0054bb50              long double x87_r4_36 = (((((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x38)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[6])) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[8]) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x40)))) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[7]) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x3c))));
0054bb6b              ((((((long double)Render::FrameCurrent_1->object_offset.y) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x3c))) + (((long double)Render::FrameCurrent_1->object_offset.x) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x38)))) + (x87_r5_15 * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x40)))) + ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x44)));
0054bb6e              *(uint32_t*)((char*)edx_1 + 4) = ((float)x87_r4_28);
0054bb76              *(uint32_t*)((char*)edx_1 + 8) = ((float)x87_r4_32);
0054bb7f              *(uint32_t*)((char*)edx_1 + 0x10) = ((float)x87_r5_15);
0054bb82              *(uint32_t*)((char*)edx_1 + 0xc) = ((float)x87_r4_36);
0054bb8b              long double x87_r5_22 = ((long double)Render::FrameCurrent_1->object_offset.z);
0054bb91              void* ebx_4 = ((char*)edx_1 + 0x14);
0054bb94              long double x87_r4_38 = (((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x54)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[1]));
0054bb97              esi += 4;
0054bb9a              long double x87_r3_37 = ((long double)*(int32_t*)((char*)ADJ(ecx_2) + 0x50));
0054bb9d              ecx_2 = &ecx_2[0x18];
0054bba3              edx_1 += 0x40;
0054bbcc              long double x87_r4_44 = (((((long double)*(int32_t*)((char*)ADJ(ecx_2) + -8)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[5])) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + -0xc)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[4]))) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + -0x10)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[3])));
0054bbe6              long double x87_r4_48 = (((((long double)*(int32_t*)((char*)ADJ(ecx_2) + -0x10)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[6])) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[8]) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + -8)))) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[7]) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + -0xc))));
0054bc01              ((((((long double)Render::FrameCurrent_1->object_offset.y) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + -0xc))) + (((long double)Render::FrameCurrent_1->object_offset.x) * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + -0x10)))) + (x87_r5_22 * ((long double)*(int32_t*)((char*)ADJ(ecx_2) + -8)))) + ((long double)*(uint32_t*)((char*)ADJ(ecx_2)->pt + -4)));
0054bc04              *(uint32_t*)ebx_4 = ((float)((x87_r4_38 + (x87_r3_37 * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[0]))) + (((long double)*(int32_t*)((char*)ADJ(ecx_2) + -8)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[2]))));
0054bc0c              *(uint32_t*)((char*)ebx_4 + 4) = ((float)x87_r4_44);
0054bc15              *(uint32_t*)((char*)edx_1 - 0x20) = ((float)x87_r5_22);
0054bc18              *(uint32_t*)((char*)ebx_4 + 8) = ((float)x87_r4_48);
0054bc22              cond:0_1 = (var_10_1 + 4) < Render::portal_npnts_1;
0054bc24              var_10_1 += 4;
0054bc28          } while (cond:0_1);
0054b9c6      }
0054b9c6      
0054bc31      if (esi < Render::portal_npnts_1)
0054bc31      {
0054bc45          void* edx_4 = ((esi << 4) + 0x86f078);
0054bc4b          void* ecx_4 = &*(uint32_t*)((char*)Render::portal_vertex[esi].plane)[4];
0054bc4f          int32_t i_1 = (Render::portal_npnts_1 - esi);
0054bce2          int32_t i;
0054bce2          
0054bce2          do
0054bce2          {
0054bc54              void* esi_1 = edx_4;
0054bc56              long double x87_r6_21 = ((long double)Render::FrameCurrent_1->object_offset.y);
0054bc59              ecx_4 += 0x18;
0054bc5f              edx_4 += 0x10;
0054bc62              i = i_1;
0054bc62              i_1 -= 1;
0054bc77              long double x87_r4_52 = (((((long double)*(uint32_t*)((char*)ecx_4 - 0x14)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[2])) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[0]) * ((long double)*(uint32_t*)((char*)ecx_4 - 0x1c)))) + (((long double)*(uint32_t*)((char*)ecx_4 - 0x18)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[1])));
0054bc95              long double x87_r4_56 = (((((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[3]) * ((long double)*(uint32_t*)((char*)ecx_4 - 0x1c))) + (((long double)*(uint32_t*)((char*)ecx_4 - 0x14)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[5]))) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[4]) * ((long double)*(uint32_t*)((char*)ecx_4 - 0x18))));
0054bcaf              long double x87_r4_60 = (((((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[7]) * ((long double)*(uint32_t*)((char*)ecx_4 - 0x18))) + (((long double)*(uint32_t*)((char*)ecx_4 - 0x1c)) * ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[6]))) + (((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[8]) * ((long double)*(uint32_t*)((char*)ecx_4 - 0x14))));
0054bcc8              ((((((long double)Render::FrameCurrent_1->object_offset.z) * ((long double)*(uint32_t*)((char*)ecx_4 - 0x14))) + (((long double)Render::FrameCurrent_1->object_offset.x) * ((long double)*(uint32_t*)((char*)ecx_4 - 0x1c)))) + (x87_r6_21 * ((long double)*(uint32_t*)((char*)ecx_4 - 0x18)))) + ((long double)*(uint32_t*)((char*)ecx_4 - 0x10)));
0054bccb              *(uint32_t*)esi_1 = ((float)x87_r4_52);
0054bcd5              *(uint32_t*)((char*)esi_1 + 4) = ((float)x87_r4_56);
0054bcdc              *(uint32_t*)((char*)edx_4 - 4) = ((float)x87_r6_21);
0054bcdf              *(uint32_t*)((char*)esi_1 + 8) = ((float)x87_r4_60);
0054bce2          } while (i != 1);
0054bc31      }
0054bc31      
0054bce8      long double x87_r7_36 = ((long double)Render::FrameCurrent_1->object_offset.x);
0054bd16      long double x87_r4_64 = (((((long double)Render::viewer_world_space.CY.N.y) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x2c))) + (((long double)Render::viewer_world_space.CY.N.z) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x30)))) + (((long double)Render::viewer_world_space.CY.N.x) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x28))));
0054bd3d      long double x87_r4_68 = (((((long double)Render::viewer_world_space.CY.N.y) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x38))) + (((long double)Render::viewer_world_space.CY.N.z) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x3c)))) + (((long double)Render::viewer_world_space.CY.N.x) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x34))));
0054bd60      long double x87_r4_72 = (((((long double)Render::viewer_world_space.CY.N.y) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x44))) + (((long double)Render::viewer_world_space.CY.N.z) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x48)))) + (((long double)Render::viewer_world_space.CY.N.x) * ((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x40))));
0054bd80      (((((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x5c)) * ((long double)Render::viewer_world_space.CY.N.y)) + (((long double)*(uint32_t*)((char*)Render::FrameCurrent_1->viewer.CY + 0x60)) * ((long double)Render::viewer_world_space.CY.N.z))) + (((long double)Render::viewer_world_space.CY.N.x) * x87_r7_36));
0054bd82      Render::viewer_world_space.CY;
0054bceb      Render::FrameCurrent_1->viewer.CY.N.x = ((float)x87_r4_64);
0054bceb      Render::FrameCurrent_1->viewer.CY.N.y = ((float)x87_r4_68);
0054bceb      Render::FrameCurrent_1->viewer.CY.d = ((float)x87_r7_36);
0054bceb      Render::FrameCurrent_1->viewer.CY.N.z = ((float)x87_r4_72);
0054b9b0  }

0054bda1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0054bdb0  void Render::positionPush(int32_t const arg1, class Position* arg2)

0054bdb0  {
0054bdb4      Render::m_pRenderer->vtable->positionPushInternal(arg1, arg2);
0054bdb0  }

0054bdc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0054bdd0  int32_t Render::framePop()

0054bdd0  {
0054bdd8      /* jump -> Render::m_pRenderer->vtable->positionPopInternal */
0054bdd0  }

0054bddb                                                                                   90 90 90 90 90                             .....

0054bde0  void Render::CalcObjectMatrix()

0054bde0  {
0054bde8      /* jump -> Render::m_pRenderer->vtable->CalcObjectMatrixInternal */
0054bde0  }

0054bdeb                                   90 90 90 90 90                                                             .....

0054bdf0  class Matrix4 const* Render::GetObjectMatrix()

0054bdf0  {
0054bdf8      /* jump -> Render::m_pRenderer->vtable->GetObjectMatrixInternal */
0054bdf0  }

0054bdfb                                                                                   90 90 90 90 90                             .....

0054be00  void Render::reset_active_lights_state()

0054be00  {
0054be06      Render::prevLightUsage[0].index = Render::curLightUsage[0].index;
0054be12      Render::prevLightUsage[1].carryOver = Render::curLightUsage[1].carryOver;
0054be1e      Render::prevLightUsage[1].lightClass = Render::curLightUsage[1].lightClass;
0054be2a      Render::prevLightUsage[1].index = Render::curLightUsage[1].index;
0054be36      Render::prevLightUsage[2].carryOver = Render::curLightUsage[2].carryOver;
0054be42      Render::prevLightUsage[2].lightClass = Render::curLightUsage[2].lightClass;
0054be4e      Render::prevLightUsage[2].index = Render::curLightUsage[2].index;
0054be5a      Render::prevLightUsage[3].carryOver = Render::curLightUsage[3].carryOver;
0054be66      Render::prevLightUsage[3].lightClass = Render::curLightUsage[3].lightClass;
0054be72      Render::prevLightUsage[3].index = Render::curLightUsage[3].index;
0054be7e      Render::prevLightUsage[4].carryOver = Render::curLightUsage[4].carryOver;
0054be95      Render::prevLightUsage[4].lightClass = Render::curLightUsage[4].lightClass;
0054bea1      Render::prevLightUsage[4].index = Render::curLightUsage[4].index;
0054bead      Render::prevLightUsage[5].carryOver = Render::curLightUsage[5].carryOver;
0054beb9      Render::prevLightUsage[5].lightClass = Render::curLightUsage[5].lightClass;
0054bec5      Render::prevLightUsage[5].index = Render::curLightUsage[5].index;
0054bed1      Render::prevLightUsage[6].carryOver = Render::curLightUsage[6].carryOver;
0054bedd      Render::prevLightUsage[6].lightClass = Render::curLightUsage[6].lightClass;
0054bee9      Render::prevLightUsage[6].index = Render::curLightUsage[6].index;
0054bef5      Render::prevLightUsage[7].carryOver = Render::curLightUsage[7].carryOver;
0054bf01      Render::prevLightUsage[0].carryOver = Render::curLightUsage[0].carryOver;
0054bf09      Render::prevLightUsage[0].lightClass = Render::curLightUsage[0].lightClass;
0054bf11      Render::prevLightUsage[7].lightClass = Render::curLightUsage[7].lightClass;
0054bf1d      Render::curLightUsage[0].carryOver = 0;
0054bf23      Render::curLightUsage[0].lightClass = 0xffffffff;
0054bf28      Render::curLightUsage[0].index = 0xffffffff;
0054bf2d      Render::curLightUsage[1].carryOver = 0;
0054bf33      Render::curLightUsage[1].lightClass = 0xffffffff;
0054bf38      Render::curLightUsage[1].index = 0xffffffff;
0054bf3d      Render::curLightUsage[2].carryOver = 0;
0054bf43      Render::curLightUsage[2].lightClass = 0xffffffff;
0054bf48      Render::curLightUsage[2].index = 0xffffffff;
0054bf4d      Render::curLightUsage[3].carryOver = 0;
0054bf53      Render::curLightUsage[3].lightClass = 0xffffffff;
0054bf58      Render::curLightUsage[3].index = 0xffffffff;
0054bf5d      Render::curLightUsage[4].carryOver = 0;
0054bf63      Render::curLightUsage[4].lightClass = 0xffffffff;
0054bf68      Render::curLightUsage[4].index = 0xffffffff;
0054bf6d      Render::curLightUsage[5].carryOver = 0;
0054bf73      Render::curLightUsage[5].lightClass = 0xffffffff;
0054bf78      Render::curLightUsage[5].index = 0xffffffff;
0054bf7d      Render::curLightUsage[6].carryOver = 0;
0054bf83      Render::curLightUsage[6].lightClass = 0xffffffff;
0054bf88      Render::curLightUsage[6].index = 0xffffffff;
0054bf8d      Render::prevLightUsage[7].index = Render::curLightUsage[7].index;
0054bf93      Render::curLightUsage[7].carryOver = 0;
0054bf99      Render::curLightUsage[7].lightClass = 0xffffffff;
0054bf9e      Render::curLightUsage[7].index = 0xffffffff;
0054be00  }

0054bfa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0054bfb0  void Render::add_active_light(int32_t arg1, int32_t arg2)

0054bfb0  {
0054bfba      int32_t ecx = 0;
0054bfbc      int32_t* i = &Render::prevLightUsage[0].index;
0054bfbc      
0054bfd3      do
0054bfd3      {
0054bfc8          if ((i[-1] == arg2 && *(uint32_t*)i == arg1))
0054bfc8          {
0054bff6              int32_t ecx_3 = (ecx * 0xc);
0054bffa              int32_t esi = *(uint32_t*)(ecx_3 + 0x84605c);
0054bffa              
0054c003              if (esi != 0xffffffff)
0054c003              {
0054c005                  int32_t edx_1 = 0;
0054c007                  int32_t* j = &Render::curLightUsage[0].lightClass;
0054c007                  
0054c01e                  do
0054c01e                  {
0054c013                      if (*(uint32_t*)j == 0xffffffff)
0054c013                      {
0054c025                          int32_t eax_1 = (edx_1 * 0xc);
0054c028                          *(uint32_t*)(eax_1 + 0x84605c) = esi;
0054c02e                          *(uint8_t*)(eax_1 + 0x846058) = 0;
0054c03b                          *(uint32_t*)(eax_1 + 0x846060) = *(uint32_t*)(ecx_3 + 0x846060);
0054c03b                          break;
0054c013                      }
0054c013                      
0054c015                      j = &j[3];
0054c018                      edx_1 += 1;
0054c01e                  } while (j < 0x8460bc);
0054c003              }
0054c003              
0054c042              *(uint32_t*)(ecx_3 + 0x84605c) = arg2;
0054c049              *(uint32_t*)(ecx_3 + 0x846060) = arg1;
0054c04f              *(uint8_t*)(ecx_3 + 0x846058) = 1;
0054c057              return;
0054bfc8          }
0054bfc8          
0054bfca          i = &i[3];
0054bfcd          ecx += 1;
0054bfd3      } while (i < 0x8662d0);
0054bfd3      
0054bfd5      int32_t ecx_1 = 0;
0054bfd7      int32_t* i_1 = &Render::curLightUsage[0].index;
0054bfd7      
0054bfee      do
0054bfee      {
0054bfe3          if (*(uint32_t*)i_1 == 0xffffffff)
0054bfe3          {
0054c05b              int32_t eax_3 = (ecx_1 * 0xc);
0054c05e              *(uint32_t*)(eax_3 + 0x84605c) = arg2;
0054c065              *(uint32_t*)(eax_3 + 0x846060) = arg1;
0054c06b              *(uint8_t*)(eax_3 + 0x846058) = 0;
0054c073              return;
0054bfe3          }
0054bfe3          
0054bfe5          i_1 = &i_1[3];
0054bfe8          ecx_1 += 1;
0054bfee      } while (i_1 < 0x8460c0);
0054bfb0  }

0054c074                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0054c080  void Render::enable_active_lights()

0054c080  {
0054c082      uint32_t esi = 0;
0054c084      int32_t* i = &Render::curLightUsage[0].lightClass;
0054c084      
0054c15d      do
0054c15d      {
0054c090          int32_t eax_1 = *(uint32_t*)i;
0054c090          
0054c095          if (eax_1 == 0xffffffff)
0054c14e              RenderDeviceD3D::SetFFLightEnable(RenderDevice::render_device, esi, 0);
0054c095          else
0054c095          {
0054c0a3              int32_t ecx_1;
0054c0a3              
0054c0a3              if (lightCacheing != 0)
0054c0a5                  ecx_1 = i[-1];
0054c0a5              
0054c0aa              if ((lightCacheing != 0 && ecx_1 != 0))
0054c14e                  RenderDeviceD3D::SetFFLightEnable(RenderDevice::render_device, esi, 1);
0054c0aa              else if ((doDynamic != 0 && eax_1 == 2))
0054c0c0              {
0054c0d1                  int32_t* eax_3 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0054c0dc                  *(uint32_t*)(*(uint32_t*)eax_3 + 0xcc)(eax_3, esi, Render::world_lights.sorted_dynamic_lights[i[1]]);
0054c14e                  RenderDeviceD3D::SetFFLightEnable(RenderDevice::render_device, esi, 1);
0054c0c0              }
0054c0c0              else if ((doStatic != 0 && eax_1 == 1))
0054c0f3              {
0054c104                  int32_t* eax_5 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0054c10f                  *(uint32_t*)(*(uint32_t*)eax_5 + 0xcc)(eax_5, esi, Render::world_lights.sorted_static_lights[i[1]]);
0054c14e                  RenderDeviceD3D::SetFFLightEnable(RenderDevice::render_device, esi, 1);
0054c0f3              }
0054c0f3              else if ((doSun != 0 && eax_1 == 0))
0054c125              {
0054c12c                  int32_t* eax_7 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0054c13b                  *(uint32_t*)(*(uint32_t*)eax_7 + 0xcc)(eax_7, esi, 0x8672c8);
0054c14e                  RenderDeviceD3D::SetFFLightEnable(RenderDevice::render_device, esi, 1);
0054c125              }
0054c095          }
0054c095          
0054c153          i = &i[3];
0054c156          esi += 1;
0054c15d      } while (i < 0x8460bc);
0054c080  }

0054c166                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0054c170  void Render::minimize_envcell_lighting(class Position const* arg1, float arg2)

0054c170  {
0054c172      Render::reset_active_lights_state();
0054c177      int32_t num_dynamic_lights = Render::world_lights.num_dynamic_lights;
0054c17d      int32_t esi = 0;
0054c17d      
0054c181      if (num_dynamic_lights > 0)
0054c181      {
0054c190          int32_t ecx_2;
0054c190          int32_t edi_1;
0054c190          edi_1 = __memfill_u32(0x866238, 1, num_dynamic_lights);
0054c190          
0054c1a1          do
0054c1a1          {
0054c196              Render::add_active_light(esi, 2);
0054c19e              esi += 1;
0054c1a1          } while (esi < num_dynamic_lights);
0054c181      }
0054c181      
0054c1a5      /* tailcall */
0054c1a5      return Render::enable_active_lights();
0054c170  }

0054c1aa                                90 90 90 90 90 90                                                            ......

0054c1b0  void Render::remove_object_light(class LIGHTINFO const* arg1)

0054c1b0  {
0054c1b7      if (arg1->type == 0)
0054c1b7      {
0054c1bf          long double x87_r7_2 = (((long double)arg1->viewerspace_location.x) - ((long double)Render::local_object_center.x));
0054c1c8          long double x87_r6_2 = (((long double)arg1->viewerspace_location.y) - ((long double)Render::local_object_center.y));
0054c1d1          long double x87_r5_2 = (((long double)arg1->viewerspace_location.z) - ((long double)Render::local_object_center.z));
0054c1da          long double x87_r4_2 = (((long double)arg1->falloff) + ((long double)Render::local_object_radius));
0054c1f4          long double x87_r3_5 = ((((x87_r5_2 * x87_r5_2) + (x87_r6_2 * x87_r6_2)) + (x87_r7_2 * x87_r7_2)) - (x87_r4_2 * x87_r4_2));
0054c1f6          long double temp0_1 = ((long double)0.000199999995f);
0054c1f6          (x87_r3_5 - temp0_1);
0054c200          class LIGHTINFO* eax_1;
0054c200          bool c1;
0054c200          eax_1 = ((((x87_r3_5 < temp0_1) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_5, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r3_5 == temp0_1) ? 1 : 0) << 0xe) | 0x3000))));
0054c204          /* unimplemented  {test ah, 0x5} */;
0054c1b7      }
0054c1b0  }

0054c211                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0054c220  void Render::restore_all_lighting()

0054c220  {
0054c220      int32_t num_static_lights = Render::world_lights.num_static_lights;
0054c229      int32_t ecx;
0054c229      int32_t edi_1;
0054c229      
0054c229      if (num_static_lights > 0)
0054c235          edi_1 = __memfill_u32(0x8460c8, 1, num_static_lights);
0054c237      int32_t num_dynamic_lights = Render::world_lights.num_dynamic_lights;
0054c23f      int32_t ecx_1;
0054c23f      int32_t edi_2;
0054c23f      
0054c23f      if (num_dynamic_lights > 0)
0054c24b          edi_2 = __memfill_u32(0x866238, 1, num_dynamic_lights);
0054c220  }

0054c24f                                               90                                                                 .

0054c250  void Render::viewconeCheck(class CSphere const* arg1)

0054c250  {
0054c260      float* esi = arg1;
0054c271      long double x87_r6_1 = (((long double)Render::object_scale) * ((long double)esi[1]));
0054c286      float var_10 = ((float)(((long double)Render::object_scale) * ((long double)esi[2])));
0054c294      float __return_1 = ((float)(((long double)Render::object_scale) * ((long double)*(uint32_t*)esi)));
0054c29d      float var_8 = ((float)x87_r6_1);
0054c2a1      float __return;
0054c2a1      Position::localtoglobal(&Render::viewer_pos, &__return, &Render::FrameCurrent->position, &__return_1);
0054c2b0      long double x87_r7_4 = (((long double)Render::object_scale) * ((long double)esi[3]));
0054c2b9      arg1 = ((float)x87_r7_4);
0054c2c4      float var_1c = ((float)-(x87_r7_4));
0054c2c8      Frame::globaltolocal(&Render::viewer_pos.frame, &__return_1, &__return);
0054c2d5      long double x87_r7_7 = (((long double)var_10) * ((long double)Render::viewer_world_space.CY.N.z));
0054c2e7      float var_14;
0054c2e7      long double x87_r6_4 = (((long double)var_14) * ((long double)Render::viewer_world_space.CY.N.y));
0054c2ed      Render::local_object_center.x = __return_1;
0054c2f6      Render::local_object_radius = arg1;
0054c2fd      Render::local_object_center.y = var_8;
0054c303      long double x87_r6_5 = ((long double)Render::viewer_world_space.CY.N.x);
0054c309      Render::local_object_center.z = var_10;
0054c315      long double x87_r7_10 = (((x87_r7_7 + x87_r6_4) + (x87_r6_5 * ((long double)__return))) + ((long double)Render::viewer_world_space.CY.d));
0054c31b      long double temp1 = ((long double)var_1c);
0054c31b      (x87_r7_10 - temp1);
0054c31f      class CSphere* eax_2;
0054c31f      eax_2 = ((((x87_r7_10 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0054c321      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0054c321      
0054c324      if (!(p))
0054c32e          return;
0054c32e      
0054c32f      long double temp2 = ((long double)arg1);
0054c32f      (x87_r7_10 - temp2);
0054c333      eax_2 = ((((x87_r7_10 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp2) ? 1 : 0) << 0xe) | 0))));
0054c335      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0054c338      int32_t esi_1;
0054c338      
0054c338      if (p_1)
0054c341          esi_1 = 0;
0054c338      else
0054c33a          esi_1 = 1;
0054c33a      
0054c344      int32_t Render::portal_npnts_1 = Render::portal_npnts;
0054c34a      int32_t edx_3 = 0;
0054c34a      
0054c34e      if (Render::portal_npnts_1 > 0)
0054c34e      {
0054c356          void* ecx_2 = &Render::portal_vertex->plane.N.y;
0054c356          
0054c3a4          do
0054c3a4          {
0054c378              long double x87_r7_15 = ((((((long double)var_10) * ((long double)*(uint32_t*)((char*)ecx_2 + 4))) + (((long double)__return) * ((long double)*(uint32_t*)((char*)ecx_2 - 4)))) + (((long double)var_14) * ((long double)*(uint32_t*)ecx_2))) + ((long double)*(uint32_t*)((char*)ecx_2 + 8)));
0054c37b              long double temp3_1 = ((long double)var_1c);
0054c37b              (x87_r7_15 - temp3_1);
0054c37f              eax_2 = ((((x87_r7_15 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_15, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_15 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
0054c381              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0054c381              
0054c384              if (!(p_2))
0054c3bd                  return;
0054c3bd              
0054c388              bool p_3;
0054c388              
0054c388              if (esi_1 == 0)
0054c388              {
0054c38a                  long double temp4_1 = ((long double)arg1);
0054c38a                  (x87_r7_15 - temp4_1);
0054c38e                  eax_2 = ((((x87_r7_15 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_15, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_15 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0054c390                  p_3 = /* p_3 = unimplemented  {test ah, 0x41} */;
0054c388              }
0054c388              
0054c393              if ((esi_1 != 0 || !(p_3)))
0054c399                  esi_1 = 1;
0054c399              
0054c39e              edx_3 += 1;
0054c39f              ecx_2 += 0x18;
0054c3a4          } while (edx_3 < Render::portal_npnts_1);
0054c34e      }
0054c34e      
0054c3aa      int32_t eax_4;
0054c3aa      eax_4 = esi_1 == 0;
0054c250  }

0054c3be                                                                                            90 90                                ..

0054c3c0  int32_t Render::SetDegradeLevelInternal(float arg1)

0054c3c0  {
0054c3c0      long double x87_r7 = ((long double)arg1);
0054c3c8      long double temp0 = ((long double)0f);
0054c3c8      (x87_r7 - temp0);
0054c3ce      Render::deg_mul = arg1;
0054c3d3      long double x87_r7_1 = ((long double)25f);
0054c3d9      float eax;
0054c3d9      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
0054c3db      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0054c3de      int32_t eax_1;
0054c3de      long double x87_r6_3;
0054c3de      long double x87_r7_4;
0054c3de      
0054c3de      if (p)
0054c3de      {
0054c433          x87_r7_4 = (((long double)25f) - ((x87_r7_1 - ((long double)50f)) * ((long double)arg1)));
0054c449          x87_r6_3 = (((long double)16f) - ((((long double)16f) - ((long double)25f)) * ((long double)arg1)));
0054c45f          eax_1 = _ftol2();
0054c3de      }
0054c3de      else
0054c3de      {
0054c3ea          x87_r7_4 = (((x87_r7_1 - ((long double)8f)) * ((long double)arg1)) + ((long double)25f));
0054c400          x87_r6_3 = (((((long double)16f) - ((long double)8f)) * ((long double)arg1)) + ((long double)16f));
0054c416          eax_1 = _ftol2();
0054c3de      }
0054c3de      
0054c474      Render::max_static_lights = eax_1;
0054c482      Render::max_dynamic_lights = _ftol2();
0054c48c      Render::object_distance_2dsq = ((float)(x87_r7_4 * x87_r7_4));
0054c496      Render::particle_distance_2dsq = ((float)(x87_r6_3 * x87_r6_3));
0054c4a0      return 1;
0054c3c0  }

0054c4a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0054c4b0  uint8_t Render::StartupRenderingSystem(class RenderConfig const* arg1)

0054c4b0  {
0054c4c1      class Render* eax_1;
0054c4c1      
0054c4c1      if ((Render::m_pRenderer == 0 && arg1->m_GraphicsDriver == GDRIVER_DIRECT3D))
0054c4c1      {
0054c4c3          eax_1 = RenderAllocator::AllocateRender();
0054c4ca          Render::m_pRenderer = eax_1;
0054c4ca          
0054c4cf          if (eax_1 != 0)
0054c4cf          {
0054c4db              if (eax_1->vtable->Startup(arg1) != 0)
0054c4db              {
0054c4fb                  eax_1 = 1;
0054c4fe                  return 1;
0054c4db              }
0054c4db              
0054c4dd              class Render* Render::m_pRenderer_1 = Render::m_pRenderer;
0054c4dd              
0054c4e5              if (Render::m_pRenderer_1 != 0)
0054c4e7                  Render::m_pRenderer_1->vtable->__vecDelDtor(1);
0054c4e7              
0054c4ed              Render::m_pRenderer = nullptr;
0054c4cf          }
0054c4c1      }
0054c4c1      
0054c4f7      eax_1 = 0;
0054c4fa      return 0;
0054c4b0  }

0054c4ff                                                                                               90                                 .

0054c500  uint8_t Render::StartupDevice(uint32_t const arg1, class RenderDevicePresentation const* arg2, class RenderDeviceConfig const* arg3)

0054c500  {
0054c508      class RenderDevice* eax_1 = Render::m_pRenderer->vtable->CreateRenderDevice();
0054c50d      RenderDevice::render_device = eax_1;
0054c50d      
0054c512      if (eax_1 != 0)
0054c512      {
0054c52c          if (eax_1->vtable->Startup(arg1, arg2, arg3) != 0)
0054c52c          {
0054c54b              eax_1 = 1;
0054c54d              return 1;
0054c52c          }
0054c52c          
0054c52e          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054c52e          
0054c536          if (RenderDevice::render_device_1 != 0)
0054c538              RenderDevice::render_device_1->vtable->__vecDelDtor(1);
0054c538          
0054c53e          RenderDevice::render_device = nullptr;
0054c512      }
0054c512      
0054c548      eax_1 = 0;
0054c54a      return 0;
0054c500  }

0054c54e                                            90 90                                                                ..

0054c550  void Render::ShutdownDevice()

0054c550  {
0054c550      GraphicsResource::PurgeResources();
0054c555      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054c555      
0054c55d      if (RenderDevice::render_device_1 != 0)
0054c55d      {
0054c55f          RenderDevice::render_device_1->vtable->Shutdown();
0054c564          class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0054c564          
0054c56c          if (RenderDevice::render_device_2 != 0)
0054c56e              RenderDevice::render_device_2->vtable->__vecDelDtor(1);
0054c55d      }
0054c55d      
0054c574      RenderDevice::render_device = nullptr;
0054c550  }

0054c57f                                                                                               90                                 .

0054c580  void Render::ShutdownRenderingSystem()

0054c580  {
0054c580      RenderUI::Shutdown();
0054c585      KeyStone::Release();
0054c58a      GraphicsResource::PurgeResources();
0054c58f      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054c58f      
0054c597      if (RenderDevice::render_device_1 != 0)
0054c597      {
0054c599          RenderDevice::render_device_1->vtable->Shutdown();
0054c59e          class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0054c59e          
0054c5a6          if (RenderDevice::render_device_2 != 0)
0054c5a8              RenderDevice::render_device_2->vtable->__vecDelDtor(1);
0054c597      }
0054c597      
0054c5ae      RenderDevice::render_device = nullptr;
0054c5b8      FontMapper::Shutdown();
0054c5bd      GraphicsResource::ShutdownResourceManager();
0054c5c2      Render::m_pRenderer->vtable->Shutdown();
0054c5cd      class Render* Render::m_pRenderer_1 = Render::m_pRenderer;
0054c5cd      
0054c5d5      if (Render::m_pRenderer_1 != 0)
0054c5d7          Render::m_pRenderer_1->vtable->__vecDelDtor(1);
0054c5d7      
0054c5dd      Render::m_pRenderer = nullptr;
0054c580  }

0054c5e8                          90 90 90 90 90 90 90 90                                                          ........

0054c5f0  uint8_t Render::RestartDevice(uint32_t const arg1, class RenderDevicePresentation* arg2, class RenderDeviceConfig* arg3)

0054c5f0  {
0054c5fc      int32_t eax;
0054c5fc      eax = arg3->bUseStencilBuffer;
0054c5fc      *(uint8_t*)((char*)eax)[1] = arg3->bSoftwareVertexProcessing;
0054c5fc      *(uint8_t*)((char*)eax)[2] = arg3->bUsePureDevice;
0054c600      struct HWND__* hFocusWindow = arg3->hFocusWindow;
0054c604      int32_t var_20 = eax;
0054c608      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054c61a      void var_1c;
0054c61a      __builtin_memcpy(&var_1c, arg2, 0x1c);
0054c61a      
0054c61c      if (RenderDevice::render_device_1 != 0)
0054c61c      {
0054c62a          __builtin_memcpy(&var_1c, &RenderDevice::render_device_1->m_presentation, 0x1c);
0054c62c          int32_t ecx;
0054c62c          ecx = RenderDevice::render_device_1->m_config.bUseStencilBuffer;
0054c62c          *(uint8_t*)((char*)ecx)[1] = RenderDevice::render_device_1->m_config.bSoftwareVertexProcessing;
0054c62c          *(uint8_t*)((char*)ecx)[2] = RenderDevice::render_device_1->m_config.bUsePureDevice;
0054c62f          hFocusWindow = RenderDevice::render_device_1->m_config.hFocusWindow;
0054c632          var_20 = ecx;
0054c61c      }
0054c61c      
0054c636      struct RenderDevice::VTable* vtable_1 = RenderDevice::render_device_1->vtable;
0054c638      class RenderDevicePresentation* var_38 = arg2;
0054c638      
0054c640      if (vtable_1->ResetDevice(var_38) == 0)
0054c640      {
0054c648          struct RenderDevice::VTable* vtable = RenderDevice::render_device->vtable;
0054c64e          var_38 = &var_1c;
0054c64e          
0054c654          if (vtable->ResetDevice(var_38) == 0)
0054c681              return 0;
0054c681          
0054c663          __builtin_memcpy(arg2, &var_1c, 0x1c);
0054c669          arg3->hFocusWindow = hFocusWindow;
0054c66b          arg3->bUseStencilBuffer = var_20;
0054c66b          arg3->bSoftwareVertexProcessing = *(uint8_t*)((char*)var_20)[1];
0054c66b          arg3->bUsePureDevice = *(uint8_t*)((char*)var_20)[2];
0054c640      }
0054c640      
0054c677      return 1;
0054c5f0  }

0054c682        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0054c690  class RenderIndexBuffer* Render::CreateIndexBuffer()

0054c690  {
0054c697      if (Render::m_pRenderer != 0)
0054c6a1          /* jump -> RenderDevice::render_device->vtable->CreateIndexBuffer */
0054c6a1      
0054c6a7      void* result = operator new(0x28);
0054c6a7      
0054c6b3      if (result == 0)
0054c6c9          return 0;
0054c6c9      
0054c6b7      *(uint32_t*)result = 0x79b26c;
0054c6bd      RenderIndexBuffer::Begin(result);
0054c6c5      return result;
0054c690  }

0054c6ca                                90 90 90 90 90 90                                                            ......

0054c6d0  void Render::SafelyStopUsingAndReleaseTexture(class RenderTexture** arg1)

0054c6d0  {
0054c6d5      class RenderTexture* ecx = *(uint32_t*)arg1;
0054c6d5      
0054c6d9      if (ecx != 0)
0054c6d9      {
0054c6db          ecx->vtable->Release();
0054c6e0          *(uint32_t*)arg1 = nullptr;
0054c6d9      }
0054c6d0  }

0054c6e8                          90 90 90 90 90 90 90 90                                                          ........

0054c6f0  void Render::GRPCallback_OnRenderPreferenceChanged(class PStringBase<char> const* arg1)

0054c6f0  {
0054c6f5      Render::m_CacheOverallGraphicsQuality = Render::DetermineOverallGraphicsQuality();
0054c6f0  }

0054c6fb                                                                                   90 90 90 90 90                             .....

0054c700  uint8_t Render::ShouldDropHighDetail()

0054c700  {
0054c721      if ((*(int32_t*)((char*)DBCache::s_pCache->vtable + 0x44)(0x69466948, 1) != 0 && Render::m_RenderPrefs.EnvironmentTextureDetail == 0))
0054c725          return 0;
0054c725      
0054c72b      return 1;
0054c700  }

0054c72c                                      90 90 90 90                                                              ....

0054c730  float Render::GetFramerate()

0054c730  {
0054c736      return ((int32_t)((long double)SceneTool::m_FramesPerSecond));
0054c730  }

0054c737                                                                       90 90 90 90 90 90 90 90 90                         .........

0054c740  void Render::GfxObjUnderSelectionRay(class CGfxObj const* arg1)

0054c740  {
0054c749      uint32_t eax;
0054c749      eax = Render::check_selection;
0054c749      
0054c753      if (eax != 0)
0054c753      {
0054c759          eax = Render::check_curr_object;
0054c759          
0054c760          if (eax != 0)
0054c760          {
0054c766              class CPhysicsPart* RenderDeviceD3D::s_current_physics_part_1 = RenderDeviceD3D::s_current_physics_part;
0054c766              
0054c772              if (RenderDeviceD3D::s_current_physics_part_1 != 0)
0054c772              {
0054c778                  struct frameContext* Render::FrameCurrent_1 = Render::FrameCurrent;
0054c78b                  float __return;
0054c78b                  Frame::globaltolocalvec(&Render::FrameCurrent_1->position.frame, &__return, &Render::selection_ray);
0054c790                  RenderDeviceD3D::s_current_physics_part_1->gfxobj_scale;
0054c793                  RenderDeviceD3D::s_current_physics_part_1->gfxobj_scale;
0054c798                  long double x87_r5_1 = ((long double)RenderDeviceD3D::s_current_physics_part_1->gfxobj_scale.x);
0054c79b                  float x = Render::FrameCurrent_1->viewer.viewpoint.x;
0054c7a6                  float y = Render::FrameCurrent_1->viewer.viewpoint.y;
0054c7ba                  float z = Render::FrameCurrent_1->viewer.viewpoint.z;
0054c7c6                  int32_t var_c_1 = 0x461c4000;
0054c7dc                  long double x87_r7_3 = (((long double)1f) / x87_r5_1);
0054c7fe                  float var_30;
0054c7fe                  float var_10_1 = ((float)(((long double)var_30) * x87_r7_3));
0054c808                  float var_18_1 = ((float)(((long double)__return) * x87_r7_3));
0054c80c                  float var_34;
0054c80c                  float var_14_1 = ((float)(((long double)var_34) * x87_r7_3));
0054c819                  double var_40;
0054c819                  
0054c819                  if (CSphere::sphere_intersects_ray(arg1->drawing_sphere, &x, &var_40) != 0)
0054c819                  {
0054c81f                      eax = Render::m_MouseSelectData.bFoundPolygon;
0054c81f                      
0054c826                      if (eax == 0)
0054c826                      {
0054c83d                      label_54c83d:
0054c83d                          eax = Render::m_MouseSelectData.bFoundSphere;
0054c83d                          
0054c844                          if (eax == 0)
0054c844                          {
0054c85b                          label_54c85b:
0054c85b                              int32_t eax_2 = var_40;
0054c85f                              *(uint64_t*)((char*)Render::m_MouseSelectData.fClosestSphere)[4] = *(uint32_t*)((char*)var_40)[4];
0054c867                              Render::m_MouseSelectData.bFoundSphere = 1;
0054c86e                              Render::m_MouseSelectData.fClosestSphere = eax_2;
0054c878                              Render::m_MouseSelectData.SphereID = CPhysicsPart::get_physobj_id(RenderDeviceD3D::s_current_physics_part_1);
0054c883                              Render::m_MouseSelectData.SphereIndex = RenderDeviceD3D::s_current_physics_part_1->physobj_index;
0054c844                          }
0054c844                          else
0054c844                          {
0054c846                              long double x87_r7_5 = ((long double)var_40);
0054c84a                              long double temp2_1 = ((long double)Render::m_MouseSelectData.fClosestSphere);
0054c84a                              (x87_r7_5 - temp2_1);
0054c850                              eax = ((((x87_r7_5 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0054c852                              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0054c852                              
0054c855                              if (!(p_1))
0054c855                                  goto label_54c85b;
0054c844                          }
0054c844                          
0054c889                          eax = Render::check_curr_object_polys;
0054c889                          
0054c890                          if (eax != 0)
0054c890                          {
0054c89c                              int32_t ebx_1 = 0;
0054c89c                              
0054c8a0                              if (arg1->num_polygons > 0)
0054c8a0                              {
0054c8a6                                  void* edi_1 = nullptr;
0054c8a6                                  
0054c8c3                                  while (CPolygon::polygon_hits_ray(((char*)edi_1 + arg1->polygons), &x, &__return) == 0)
0054c8c3                                  {
0054c8d2                                      ebx_1 += 1;
0054c8d3                                      edi_1 += 0x30;
0054c8d3                                      
0054c8d8                                      if (ebx_1 >= arg1->num_polygons)
0054c8d8                                      {
0054c8da                                          uint32_t eax_4;
0054c8da                                          eax_4 = 1;
0054c8e2                                          return;
0054c8d8                                      }
0054c8c3                                  }
0054c8c3                                  
0054c8e3                                  eax = Render::m_MouseSelectData.bFoundPolygon;
0054c8e3                                  
0054c8ea                                  if (eax == 0)
0054c8ea                                  {
0054c901                                  label_54c901:
0054c901                                      float __return_1 = __return;
0054c909                                      *(uint64_t*)((char*)Render::m_MouseSelectData.fClosestPolygon)[4] = var_34;
0054c911                                      Render::m_MouseSelectData.bFoundPolygon = 1;
0054c918                                      Render::m_MouseSelectData.fClosestPolygon = __return_1;
0054c922                                      Render::m_MouseSelectData.PolygonID = CPhysicsPart::get_physobj_id(RenderDeviceD3D::s_current_physics_part_1);
0054c92d                                      Render::m_MouseSelectData.PolygonIndex = RenderDeviceD3D::s_current_physics_part_1->physobj_index;
0054c8ea                                  }
0054c8ea                                  else
0054c8ea                                  {
0054c8ec                                      long double x87_r7_6 = ((long double)__return);
0054c8f0                                      long double temp3_1 = ((long double)Render::m_MouseSelectData.fClosestPolygon);
0054c8f0                                      (x87_r7_6 - temp3_1);
0054c8f6                                      eax = ((((x87_r7_6 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0054c8f8                                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0054c8f8                                      
0054c8fb                                      if (!(p_2))
0054c8fb                                          goto label_54c901;
0054c8ea                                  }
0054c8a0                              }
0054c890                          }
0054c890                          
0054c933                          eax = 1;
0054c93b                          return;
0054c826                      }
0054c826                      
0054c828                      long double x87_r7_4 = ((long double)var_40);
0054c82c                      long double temp1_1 = ((long double)Render::m_MouseSelectData.fClosestPolygon);
0054c82c                      (x87_r7_4 - temp1_1);
0054c832                      eax = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0054c832                      
0054c837                      if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
0054c837                          goto label_54c83d;
0054c819                  }
0054c772              }
0054c760          }
0054c753      }
0054c753      
0054c93e      eax = 0;
0054c740  }

0054c8aa                                8d 9b 00 00 00 00                                                            ......
0054c945                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0054c950  uint32_t Render::GetMouseSelectionObjectID()

0054c950  {
0054c950      int32_t eax;
0054c950      eax = Render::m_MouseSelectData.bFoundPolygon;
0054c950      
0054c957      if (eax != 0)
0054c95e          return Render::m_MouseSelectData.PolygonID;
0054c95e      
0054c95f      eax = Render::m_MouseSelectData.bFoundSphere;
0054c96a      char temp0 = eax;
0054c96a      eax = -(eax);
0054c970      return ((eax - eax) & Render::m_MouseSelectData.SphereID);
0054c950  }

0054c971                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0054c980  int32_t Render::GetMouseSelectionPartIndex()

0054c980  {
0054c980      int32_t eax;
0054c980      eax = Render::m_MouseSelectData.bFoundPolygon;
0054c980      
0054c987      if (eax != 0)
0054c98e          return Render::m_MouseSelectData.PolygonIndex;
0054c98e      
0054c98f      eax = Render::m_MouseSelectData.bFoundSphere;
0054c99a      char temp0 = eax;
0054c99a      eax = -(eax);
0054c9a0      return ((eax - eax) & Render::m_MouseSelectData.SphereIndex);
0054c980  }

0054c9a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0054c9b0  void __thiscall DArray<view_poly>::grow(class DArray<view_poly>* this, uint32_t arg2)

0054c9b0  {
0054c9b7      uint32_t esi = arg2;
0054c9b7      
0054c9bd      if (esi <= this->sizeOf)
0054c9bd      {
0054c9c0          DArray<view_poly>::shrink(this, esi);
0054c9c7          return;
0054c9bd      }
0054c9bd      
0054c9d2      void* eax_3 = operator new[]((esi * 0x18));
0054c9df      int32_t i = 0;
0054c9df      
0054c9e3      if (this->sizeOf > 0)
0054c9e3      {
0054c9e5          void* eax_5 = nullptr;
0054c9e5          
0054c9ff          do
0054c9ff          {
0054c9f4              __builtin_memcpy(((char*)eax_5 + eax_3), (this->data + eax_5), 0x18);
0054c9f9              i += 1;
0054c9fa              eax_5 += 0x18;
0054c9ff          } while (i < this->sizeOf);
0054c9ff          
0054ca01          esi = arg2;
0054c9e3      }
0054c9e3      
0054ca09      operator delete[](this->data);
0054ca11      this->data = eax_3;
0054ca14      this->sizeOf = esi;
0054c9b0  }

0054ca1c                                                                                      90 90 90 90                              ....

0054ca20  void __fastcall view_vertex::view_vertex(struct view_vertex* this)

0054ca20  {
0054ca23      Vector3::Vector3(this);
0054ca20  }

0054ca2c                                      90 90 90 90                                                              ....

0054ca30  void __thiscall DArray<view_poly>::shrink(class DArray<view_poly>* this, uint32_t arg2)

0054ca30  {
0054ca37      uint32_t ebp = arg2;
0054ca37      
0054ca3d      if (ebp > this->sizeOf)
0054ca3d      {
0054ca40          DArray<view_poly>::grow(this, ebp);
0054ca47          return;
0054ca3d      }
0054ca3d      
0054ca4c      if (ebp != 0)
0054ca4c      {
0054ca6d          int32_t i = 0;
0054ca71          arg2 = operator new[]((ebp * 0x18));
0054ca75          this->sizeOf = ebp;
0054ca75          
0054ca78          if (ebp > 0)
0054ca78          {
0054ca7b              int32_t eax_2 = 0;
0054ca7d              int32_t edi;
0054ca7d              int32_t var_10_1 = edi;
0054ca7d              
0054ca9b              do
0054ca9b              {
0054ca90                  __builtin_memcpy((eax_2 + arg2), (this->data + eax_2), 0x18);
0054ca95                  i += 1;
0054ca96                  eax_2 += 0x18;
0054ca9b              } while (i < this->sizeOf);
0054ca78          }
0054ca78          
0054caa2          operator delete[](this->data);
0054caab          this->data = arg2;
0054ca4c      }
0054ca4c      else
0054ca4c      {
0054ca4e          struct view_poly* data = this->data;
0054ca51          this->sizeOf = ebp;
0054ca54          operator delete[](data);
0054ca59          this->data = ebp;
0054ca4c      }
0054ca4c      
0054cab5      if (this->next_available > ebp)
0054cab7          this->next_available = ebp;
0054ca30  }

0054cabf                                                                                               90                                 .

0054cac0  void __fastcall RenderLight::RenderLight(class RenderLight* this)

0054cac0  {
0054cac5      this->info.offset.qw = 0x3f800000;
0054cac5      this->info.offset.qx = 0f;
0054cac5      this->info.offset.qy = 0f;
0054cac5      this->info.offset.qz = 0f;
0054cac5      this->info.offset.m_fOrigin.x = 0;
0054cac5      this->info.offset.m_fOrigin.y = 0f;
0054cac5      this->info.offset.m_fOrigin.z = 0f;
0054cae0      Frame::cache(&this->info.offset);
0054cac0  }

0054cae9                             90 90 90 90 90 90 90                                                           .......

0054caf0  void Render::CalcDegLevel()

0054caf0  {
0054caf8      bool cond:0 = Render::auto_update_deg_mul != 0;
0054cb0b      __builtin_memcpy(0x8661c0, 0x8661c4, 0x74);
0054cb0b      
0054cb0f      if (!(cond:0))
0054cb0f      {
0054cb16          degmulhist[0x1d] = Render::deg_mul;
0054cb1e          return;
0054cb0f      }
0054cb0f      
0054cb2a      long double x87_r7_1 = (((long double)Render::min_framerate) * ((long double)0.75f));
0054cb30      float Render::min_framerate_1 = Render::min_framerate;
0054cb3c      float Render::max_framerate_1 = Render::max_framerate;
0054cb48      float SceneTool::m_FramesPerSecond_1 = SceneTool::m_FramesPerSecond;
0054cb54      float var_20 = ((float)(((long double)Render::ideal_framerate) * ((long double)0.75f)));
0054cb68      float var_1c = ((float)((((long double)Render::min_framerate) * ((long double)0.25f)) + ((long double)var_20)));
0054cb72      long double x87_r6_6 = (((long double)Render::ideal_framerate) * ((long double)0.5f));
0054cb8a      float var_10 = ((float)((((long double)Render::min_framerate) * ((long double)0.5f)) + x87_r6_6));
0054cb9a      long double x87_r6_7 = (x87_r6_6 + (((long double)Render::max_framerate) * ((long double)0.5f)));
0054cb9c      float var_14 = ((float)x87_r6_7);
0054cbb0      float var_8 = ((float)((((long double)Render::max_framerate) * ((long double)0.25f)) + ((long double)var_20)));
0054cbc4      float var_20_1 = ((float)(((long double)Render::max_framerate) * ((long double)1.25f)));
0054cbc8      long double x87_r6_10 = ((long double)SceneTool::m_FramesPerSecond_1);
0054cbcc      (x87_r6_10 - x87_r7_1);
0054cbce      float eax_2;
0054cbce      eax_2 = ((((x87_r6_10 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == x87_r7_1) ? 1 : 0) << 0xe) | 0x3800))));
0054cbd0      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0054cbd0      
0054cbd3      if (p)
0054cbd3      {
0054cbf7          long double temp1_1 = ((long double)0f);
0054cbf7          (x87_r7_1 - temp1_1);
0054cbfd          eax_2 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0054cbff          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0054cbff          
0054cc02          if (!(p_1))
0054cc06              x87_r7_1 = ((long double)0f);
0054cbd3      }
0054cbd3      else
0054cbd7          x87_r7_1 = ((long double)1f);
0054cbd7      
0054cc14      float var_2c = ((float)(((long double)-0.150000006f) * x87_r7_1));
0054cc18      long double x87_r6_18 = ((long double)SceneTool::m_FramesPerSecond_1);
0054cc1e      float var_24_1 = ((float)(x87_r6_18 + x87_r6_18));
0054cc3a      long double x87_r6_25 = (((long double)1.0) - (fabsl((((long double)var_24_1) - (((long double)var_1c) + ((long double)Render::min_framerate_1)))) / (((long double)var_1c) - ((long double)Render::min_framerate_1))));
0054cc40      long double temp2 = ((long double)0f);
0054cc40      (x87_r6_25 - temp2);
0054cc46      eax_2 = ((((x87_r6_25 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_25, temp2))) ? 1 : 0) << 0xa) | ((((x87_r6_25 == temp2) ? 1 : 0) << 0xe) | 0x3000))));
0054cc48      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0054cc48      
0054cc4b      if (!(p_2))
0054cc4b      {
0054cc4d          x87_r7_1 = x87_r6_25;
0054cc4f          x87_r6_25 = ((long double)0f);
0054cc4b      }
0054cc4b      
0054cc65      long double x87_r7_2 = (x87_r7_1 + x87_r6_25);
0054cc7f      long double x87_r6_31 = (((long double)1.0) - (fabsl((((long double)var_24_1) - (((long double)var_14) + ((long double)var_10)))) / (((long double)var_14) - ((long double)var_10))));
0054cc85      long double temp3 = ((long double)0f);
0054cc85      (x87_r6_31 - temp3);
0054cc8b      eax_2 = ((((x87_r6_31 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_31, temp3))) ? 1 : 0) << 0xa) | ((((x87_r6_31 == temp3) ? 1 : 0) << 0xe) | 0x3000))));
0054cc8d      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0054cc8d      
0054cc90      if (!(p_3))
0054cc90      {
0054cc92          x87_r7_2 = x87_r6_31;
0054cc94          x87_r6_31 = ((long double)0f);
0054cc90      }
0054cc90      
0054ccaa      long double x87_r7_3 = (x87_r7_2 + x87_r6_31);
0054ccc4      long double x87_r6_37 = (((long double)1.0) - (fabsl((((long double)var_24_1) - (((long double)Render::max_framerate_1) + ((long double)var_8)))) / (((long double)Render::max_framerate_1) - ((long double)var_8))));
0054ccca      long double temp4 = ((long double)0f);
0054ccca      (x87_r6_37 - temp4);
0054ccd0      eax_2 = ((((x87_r6_37 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_37, temp4))) ? 1 : 0) << 0xa) | ((((x87_r6_37 == temp4) ? 1 : 0) << 0xe) | 0x3000))));
0054ccd2      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
0054ccd2      
0054ccd5      if (!(p_4))
0054ccd5      {
0054ccd7          x87_r7_3 = x87_r6_37;
0054ccd9          x87_r6_37 = ((long double)0f);
0054ccd5      }
0054ccd5      
0054ccef      long double x87_r7_4 = (x87_r7_3 + x87_r6_37);
0054ccf1      long double x87_r6_38 = ((long double)SceneTool::m_FramesPerSecond_1);
0054ccf5      long double temp5 = ((long double)var_20_1);
0054ccf5      (x87_r6_38 - temp5);
0054ccf9      eax_2 = ((((x87_r6_38 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_38, temp5))) ? 1 : 0) << 0xa) | ((((x87_r6_38 == temp5) ? 1 : 0) << 0xe) | 0x3800))));
0054ccf9      
0054ccfe      if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
0054ccfe      {
0054cd1c          long double x87_r6_39 = (((long double)1f) - (fabsl((((long double)SceneTool::m_FramesPerSecond_1) - ((long double)var_20_1))) / (((long double)var_20_1) - ((long double)((float)x87_r6_7)))));
0054cd22          long double temp6_1 = ((long double)0f);
0054cd22          (x87_r6_39 - temp6_1);
0054cd28          eax_2 = ((((x87_r6_39 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_39, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r6_39 == temp6_1) ? 1 : 0) << 0xe) | 0x3000))));
0054cd2a          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
0054cd2a          
0054cd2d          if (!(p_5))
0054cd2f              x87_r7_4 = x87_r6_39;
0054ccfe      }
0054ccfe      
0054cd49      Render::deg_mul;
0054cd51      long double temp7 = ((long double)1f);
0054cd51      (x87_r7_4 - temp7);
0054cd57      eax_2 = ((((x87_r7_4 < temp7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp7))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp7) ? 1 : 0) << 0xe) | 0x3800))));
0054cd5c      float var_28;
0054cd5c      
0054cd5c      if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
0054cd5c      {
0054cd6a          long double temp8_1 = ((long double)-1f);
0054cd6a          (x87_r7_4 - temp8_1);
0054cd70          eax_2 = ((((x87_r7_4 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp8_1) ? 1 : 0) << 0xe) | 0x3800))));
0054cd72          bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
0054cd72          
0054cd75          if (p_6)
0054cd83              var_28 = ((float)x87_r7_4);
0054cd75          else
0054cd79              var_28 = -1f;
0054cd5c      }
0054cd5c      else
0054cd60          var_28 = 1f;
0054cd60      
0054cd87      float* ecx = &degmulhist;
0054cd87      
0054cd96      while (true)
0054cd96      {
0054cd96          long double x87_r7_7 = fabsl((((long double)*(uint32_t*)ecx) - ((long double)var_28)));
0054cd98          long double temp9_1 = ((long double)0.01);
0054cd98          (x87_r7_7 - temp9_1);
0054cd9e          eax_2 = ((((x87_r7_7 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp9_1) ? 1 : 0) << 0xe) | 0))));
0054cda0          bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
0054cda0          
0054cda3          if (!(p_7))
0054cda3              break;
0054cda3          
0054cda5          ecx = &ecx[1];
0054cda5          
0054cdae          if (ecx >= 0x866234)
0054cdae          {
0054cdb5              Render::SetDegradeLevelInternal(var_28);
0054cdba              break;
0054cdae          }
0054cd96      }
0054cd96      
0054cdc3      degmulhist[0x1d] = Render::deg_mul;
0054caf0  }

0054cdcd                                         90 90 90                                                               ...

0054cdd0  void Render::update_viewpoint(class Position const* arg1)

0054cdd0  {
0054cddd      Render::viewer_pos.objcell_id = arg1->objcell_id;
0054cde9      Frame::operator=(&Render::viewer_pos.frame, &arg1->frame);
0054cdf4      long double x87_r7_1 = (((long double)Render::viewer_pos.frame.m_fOrigin.z) * ((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[5]));
0054ce06      float eax_2 = *(uint36_t*)Render::viewer_pos.frame.m_fl2gv[1];
0054ce0b      long double x87_r6_1 = (((long double)Render::viewer_pos.frame.m_fOrigin.y) * ((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[4]));
0054ce11      float ecx_1 = *(uint36_t*)Render::viewer_pos.frame.m_fl2gv[2];
0054ce17      Render::Xaxis.x = Render::viewer_pos.frame.m_fl2gv[0];
0054ce1d      float edx_1 = *(uint36_t*)Render::viewer_pos.frame.m_fl2gv[3];
0054ce25      Render::Xaxis.y = eax_2;
0054ce2a      float eax_3 = *(uint36_t*)Render::viewer_pos.frame.m_fl2gv[4];
0054ce35      long double x87_r6_3 = (((long double)Render::viewer_pos.frame.m_fOrigin.x) * ((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[3]));
0054ce3b      Render::Xaxis.z = ecx_1;
0054ce41      float ecx_2 = *(uint36_t*)Render::viewer_pos.frame.m_fl2gv[5];
0054ce47      Render::Yaxis.x = edx_1;
0054ce4d      float edx_2 = *(uint36_t*)Render::viewer_pos.frame.m_fl2gv[6];
0054ce55      Render::Yaxis.y = eax_3;
0054ce5a      float eax_4 = *(uint36_t*)Render::viewer_pos.frame.m_fl2gv[7];
0054ce5f      Render::Yaxis.z = ecx_2;
0054ce67      float ecx_3 = *(uint36_t*)Render::viewer_pos.frame.m_fl2gv[8];
0054ce6d      long double x87_r7_5 = (-(((x87_r7_1 + x87_r6_1) + x87_r6_3)) - ((long double)Render::znear));
0054ce73      Render::Zaxis.x = edx_2;
0054ce79      float x_3 = Render::viewer_pos.frame.m_fOrigin.x;
0054ce7f      Render::Zaxis.y = eax_4;
0054ce84      Render::viewer_world_space.CY.d = ((float)x87_r7_5);
0054ce8a      float y_2 = Render::viewer_pos.frame.m_fOrigin.y;
0054ce8f      Render::Zaxis.z = ecx_3;
0054ce9b      Render::viewer_world_space.viewpoint.x = x_3;
0054cea7      Render::viewer_world_space.viewpoint.y = y_2;
0054ceb1      Render::viewer_world_space.viewpoint.z = Render::viewer_pos.frame.m_fOrigin.z;
0054cebd      Render::viewer_world_space.CY.N.x = Render::Yaxis.x;
0054cec7      Render::viewer_world_space.CY.N.y = Render::Yaxis.y;
0054ced1      Render::viewer_world_space.CY.N.z = Render::Yaxis.z;
0054cedd      int32_t var_58 = 0;
0054cee5      int32_t var_54 = 0;
0054ceed      int32_t var_50 = 0;
0054cef5      int32_t __return;
0054cef5      Frame::globaltolocal(&Render::viewer_pos.frame, &__return, &var_58);
0054cf00      float z_2 = Render::Xaxis.z;
0054cf06      float y_3 = Render::Xaxis.y;
0054cf0b      float x = Render::Xaxis.x;
0054cf13      float z_3 = z_2;
0054cf1d      float y_4 = y_3;
0054cf26      int32_t __return_1 = __return;
0054cf30      float x_1 = Render::Zaxis.x;
0054cf38      float z = Render::Zaxis.z;
0054cf41      float y = Render::Zaxis.y;
0054cf4b      int32_t var_44;
0054cf4b      int32_t var_c = var_44;
0054cf55      float x_2 = Render::Yaxis.x;
0054cf5d      float z_1 = Render::Yaxis.z;
0054cf61      float y_1 = Render::Yaxis.y;
0054cf65      int32_t var_48;
0054cf65      int32_t var_8 = var_48;
0054cf74      int32_t var_34 = 0;
0054cf7c      int32_t var_24 = 0;
0054cf84      int32_t var_14 = 0;
0054cf8c      int32_t var_4 = 0x3f800000;
0054cf94      RenderDeviceD3D::SetWorldToViewMatrix(RenderDevice::render_device, &x);
0054cf99      Render::m_pRenderer->vtable->UpdateLightsInternal(var_58, var_54, var_50);
0054cf99      
0054cfab      if (Render::check_selection != 0)
0054cfab      {
0054cfbf          class AC1Legacy::Vector3* eax_11 = Render::pick_ray(&__return, Render::selection_x, Render::selection_y);
0054cfc6          Render::selection_ray.x = eax_11->x;
0054cfcf          Render::selection_ray.y = eax_11->y;
0054cfdb          Render::selection_ray.z = eax_11->z;
0054cfab      }
0054cdd0  }

0054cfe4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0054cff0  void Render::get_clip_height(float arg1, float arg2, struct ViewIntervalType* arg3)

0054cff0  {
0054d00b      arg3->bound[0] = ((float)Render::get_pt_limit(arg1, arg2, &Render::viewer_world_space.CY));
0054d012      int32_t i = 1;
0054d012      
0054d01c      if (Render::portal_npnts >= 1)
0054d01c      {
0054d01f          int32_t edi_1 = 0x18;
0054d01f          
0054d04b          do
0054d04b          {
0054d03a              arg3->bound[i] = ((float)Render::get_pt_limit(arg1, arg2, ((edi_1 + Render::portal_vertex) - 0x10)));
0054d045              i += 1;
0054d046              edi_1 += 0x18;
0054d04b          } while (i <= Render::portal_npnts);
0054d01c      }
0054cff0  }

0054d052                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054d060  enum BoundingType Render::block_plane_check(float arg1, float arg2, float arg3, float arg4, float arg5, float arg6)

0054d060  {
0054d072      int32_t eax_1;
0054d072      int80_t st0;
0054d072      st0 = Render::corner_plane_check(arg1, arg5, arg6);
0054d080      int32_t eax_3;
0054d080      int80_t st0_1;
0054d080      st0_1 = Render::corner_plane_check(arg2, arg5, arg6);
0054d08e      int32_t eax_5;
0054d08e      int80_t st0_2;
0054d08e      st0_2 = Render::corner_plane_check(arg3, arg5, arg6);
0054d09c      int32_t eax_6;
0054d09c      int80_t st0_3;
0054d09c      st0_3 = Render::corner_plane_check(arg4, arg5, arg6);
0054d09c      
0054d0a6      if (eax_1 != 0)
0054d0a6      {
0054d0c3          if (((eax_1 == 2 && (eax_3 == eax_1 && eax_5 == eax_1)) && eax_6 == eax_1))
0054d0d3              return eax_1;
0054d0a6      }
0054d0a6      else if ((eax_3 == 0 && (eax_5 == 0 && eax_6 == 0)))
0054d0b7          return eax_6;
0054d0b7      
0054d0cb      return 1;
0054d060  }

0054d0d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0054d0e0  void Render::set_view(struct view_type* arg1, int32_t arg2)

0054d0e0  {
0054d0e8      Render::portal_view_num = arg2;
0054d0ed      Render::portal_view = arg1;
0054d0f9      void* eax_2 = &arg1->poly.data[arg2];
0054d0fc      int32_t ecx_1 = *(uint32_t*)eax_2;
0054d0fe      Render::portal_npnts = ecx_1;
0054d10e      Render::portal_inmask = ((1 << (ecx_1 + 1)) - 1);
0054d120      Render::portal_vertex = &arg1->vertex.data[*(uint32_t*)((char*)eax_2 + 4)];
0054d129      Render::xmin = *(uint32_t*)((char*)eax_2 + 8);
0054d132      Render::xmax = *(uint32_t*)((char*)eax_2 + 0xc);
0054d13b      Render::ymin = *(uint32_t*)((char*)eax_2 + 0x10);
0054d144      Render::ymax = *(uint32_t*)((char*)eax_2 + 0x14);
0054d0e0  }

0054d14b                                   90 90 90 90 90                                                             .....

0054d150  void Render::framePush(int32_t const arg1, class Frame* arg2, int32_t const arg3)

0054d150  {
0054d159      if (arg2 == 0)
0054d159      {
0054d18e          Render::m_pRenderer->vtable->positionPushInternal(arg1, 0);
0054d1a3          return;
0054d159      }
0054d159      
0054d160      int32_t var_48 = 0x796910;
0054d168      int32_t var_44 = 0;
0054d170      void var_40;
0054d170      Frame::operator=(&var_40, arg2);
0054d175      Render::m_pRenderer->vtable->positionPushInternal(arg1, &var_48);
0054d150  }

0054d1a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0054d1b0  void Render::insert_light(int32_t arg1, int32_t* arg2, class RenderLight* arg3, class RenderLight** arg4, class LIGHTINFO const* arg5, uint32_t const arg6, class Frame const* arg7, int32_t arg8)

0054d1b0  {
0054d1be      class Frame* edi = arg7;
0054d1c2      float var_1c = 0f;
0054d1c2      
0054d1ca      if (arg5->type == 0)
0054d1ca      {
0054d1dd          float __return;
0054d1dd          LandDefs::get_block_offset(&__return, Render::player_pos.objcell_id, arg6);
0054d1f0          float var_14;
0054d1f0          long double x87_r6_2 = (((long double)var_14) + ((long double)edi->m_fOrigin.y));
0054d1fa          float var_10;
0054d1fa          float var_4_1 = ((float)(((long double)var_10) + ((long double)edi->m_fOrigin.z)));
0054d206          __return = ((float)((((long double)__return) + ((long double)edi->m_fOrigin.x)) - ((long double)Render::player_pos.frame.m_fOrigin.x)));
0054d20a          long double x87_r7_4 = (x87_r6_2 - ((long double)Render::player_pos.frame.m_fOrigin.y));
0054d214          long double x87_r6_6 = (((long double)var_4_1) - ((long double)Render::player_pos.frame.m_fOrigin.z));
0054d22e          var_1c = ((float)(((x87_r6_6 * x87_r6_6) + (x87_r7_4 * x87_r7_4)) + (((long double)__return) * ((long double)__return))));
0054d1ca      }
0054d1ca      
0054d23a      int32_t ebp = *(uint32_t*)arg2;
0054d242      int32_t i;
0054d242      
0054d242      if (ebp == 0)
0054d242      {
0054d2a6          i = 0;
0054d2a8          *(uint32_t*)arg2 = 1;
0054d2ae      label_54d2ae:
0054d2ae          struct _D3DLIGHT9* esi_1 = arg4[i];
0054d2ba          *(uint32_t*)((char*)esi_1 + 0x70) = arg5->type;
0054d2c1          Frame::combine(((char*)esi_1 + 0x74), edi, &arg5->offset);
0054d2c6          arg5->color;
0054d2cf          int32_t eax_6 = _ftol2();
0054d2d4          arg5->color;
0054d2e8          int32_t eax_7 = _ftol2();
0054d2ed          arg5->color;
0054d300          int32_t edi_8 = (((((eax_6 | 0xffffff00) << 8) | eax_7) << 8) | _ftol2());
0054d307          uint32_t eax_11 = ((uint32_t)((int8_t)(edi_8 >> 0x10)));
0054d312          long double x87_r7_13 = ((long double)eax_11);
0054d312          
0054d316          if (eax_11 < 0)
0054d318              x87_r7_13 = (x87_r7_13 + ((long double)4.2949673e+09f));
0054d318          
0054d329          uint32_t ecx_7 = ((uint32_t)((int8_t)(edi_8 >> 8)));
0054d331          *(int32_t*)((char*)esi_1 + 0xc0) = ((float)(x87_r7_13 * ((long double)0.00392156886f)));
0054d33b          long double x87_r7_15 = ((long double)ecx_7);
0054d33b          
0054d33f          if (ecx_7 < 0)
0054d341              x87_r7_15 = (x87_r7_15 + ((long double)4.2949673e+09f));
0054d341          
0054d34d          class LIGHTINFO* edi_9 = (edi_8 & 0xff);
0054d359          *(int32_t*)((char*)esi_1 + 0xc4) = ((float)(x87_r7_15 * ((long double)0.00392156886f)));
0054d35f          long double x87_r7_17 = ((long double)edi_9);
0054d35f          
0054d363          if (edi_9 < 0)
0054d365              x87_r7_17 = (x87_r7_17 + ((long double)4.2949673e+09f));
0054d365          
0054d37b          *(int32_t*)((char*)esi_1 + 0xc8) = ((float)(x87_r7_17 * ((long double)0.00392156886f)));
0054d38a          *(int32_t*)((char*)esi_1 + 0xcc) = ((float)((long double)arg5->intensity));
0054d394          *(int32_t*)((char*)esi_1 + 0xd0) = ((float)((long double)arg5->falloff));
0054d39a          long double x87_r7_21 = ((long double)arg5->cone_angle);
0054d39d          *(int32_t*)((char*)esi_1 + 0xd8) = var_1c;
0054d3b7          int32_t edx_5 = ((((char*)esi_1 - arg3) / 0xdc) + arg8);
0054d3bb          *(int32_t*)((char*)esi_1 + 0xd4) = ((float)x87_r7_21);
0054d3c1          *(int32_t*)((char*)esi_1 + 0x6c) = arg6;
0054d3c4          *(int32_t*)((char*)esi_1 + 0x68) = edx_5;
0054d3c7          PrimD3DRender::config_hardware_light(edx_5, esi_1, arg6, ((char*)esi_1 + 0x70));
0054d242      }
0054d242      else
0054d242      {
0054d244          i = 0;
0054d244          
0054d248          if (ebp > 0)
0054d248          {
0054d269              do
0054d269              {
0054d253                  long double x87_r7_6 = ((long double)var_1c);
0054d257                  long double temp1_1 = ((long double)arg4[i]->distancesq);
0054d257                  (x87_r7_6 - temp1_1);
0054d25d                  void* eax_2;
0054d25d                  eax_2 = ((((x87_r7_6 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0054d25f                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0054d25f                  
0054d262                  if (!(p_1))
0054d262                      break;
0054d262                  
0054d266                  i += 1;
0054d269              } while (i < *(uint32_t*)arg2);
0054d248          }
0054d248          
0054d26f          if (ebp != arg1)
0054d26f          {
0054d27c              *(uint32_t*)arg2 = (ebp + 1);
0054d284          label_54d284:
0054d284              int32_t ebp_2 = arg4[i];
0054d287              arg4[i] = arg4[(*(uint32_t*)arg2 - 1)];
0054d28a              int32_t i_1 = (i + 1);
0054d28a              
0054d28f              if (i_1 < *(uint32_t*)arg2)
0054d28f              {
0054d29e                  do
0054d29e                  {
0054d291                      int32_t edi_1 = arg4[i_1];
0054d294                      arg4[i_1] = ebp_2;
0054d297                      ebp_2 = edi_1;
0054d29b                      i_1 += 1;
0054d29e                  } while (i_1 < *(uint32_t*)arg2);
0054d29e                  
0054d2a0                  edi = arg7;
0054d28f              }
0054d28f              
0054d28f              goto label_54d2ae;
0054d26f          }
0054d26f          
0054d273          if (i != ebp)
0054d273              goto label_54d284;
0054d242      }
0054d1b0  }

0054d3d7                                                                       90 90 90 90 90 90 90 90 90                         .........

0054d3e0  void Render::add_static_light(class LIGHTINFO const* arg1, uint32_t const arg2, class Frame const* arg3)

0054d3e0  {
0054d40c      Render::insert_light(Render::max_static_lights, &Render::world_lights.num_static_lights, &Render::world_lights.static_lights, &Render::world_lights.sorted_static_lights, arg1, arg2, arg3, (Render::max_dynamic_lights + 1));
0054d3e0  }

0054d415                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0054d420  void Render::add_dynamic_light(class LIGHTINFO const* arg1, uint32_t const arg2, class Frame const* arg3)

0054d420  {
0054d446      Render::insert_light(Render::max_dynamic_lights, &Render::world_lights.num_dynamic_lights, &Render::world_lights.dynamic_lights, &Render::world_lights.sorted_dynamic_lights, arg1, arg2, arg3, 1);
0054d420  }

0054d44f                                               90                                                                 .

0054d450  void Render::useSunlightSet(int32_t arg1)

0054d450  {
0054d455      Render::useSunlight = arg1;
0054d45b      Render::reset_active_lights_state();
0054d45b      
0054d463      if (arg1 == 0)
0054d476          return;
0054d476      
0054d469      Render::add_active_light(0xffffffff, 0);
0054d471      /* tailcall */
0054d471      return Render::enable_active_lights();
0054d450  }

0054d477                                                                       90 90 90 90 90 90 90 90 90                         .........

0054d480  void Render::minimize_object_lighting()

0054d480  {
0054d484      int32_t edi = 0;
0054d486      Render::reset_active_lights_state();
0054d48b      int32_t num_dynamic_lights = Render::world_lights.num_dynamic_lights;
0054d491      int32_t esi = 0;
0054d491      
0054d49a      if (num_dynamic_lights > 0)
0054d49a      {
0054d4df          do
0054d4df          {
0054d4a3              int32_t eax_3;
0054d4a3              int80_t st0_1;
0054d4a3              
0054d4a3              if (edi < 8)
0054d4b0                  st0_1 = Render::remove_object_light(&Render::world_lights.sorted_dynamic_lights[esi]->info);
0054d4b0              
0054d4ba              if ((edi >= 8 || eax_3 != 0))
0054d4d1                  Render::dynamic_light_used[esi] = 0;
0054d4ba              else
0054d4ba              {
0054d4bf                  Render::dynamic_light_used[esi] = 1;
0054d4c6                  Render::add_active_light(esi, 2);
0054d4ce                  edi += 1;
0054d4ba              }
0054d4ba              
0054d4dc              esi += 1;
0054d4df          } while (esi < num_dynamic_lights);
0054d49a      }
0054d49a      
0054d4e1      int32_t num_static_lights = Render::world_lights.num_static_lights;
0054d4e7      int32_t esi_1 = 0;
0054d4e7      
0054d4eb      if (num_static_lights > 0)
0054d4eb      {
0054d576          do
0054d576          {
0054d4f8              int32_t* eax_5 = &Render::world_lights.sorted_static_lights[esi_1]->info.type;
0054d4f8              
0054d4fe              if (edi >= 8)
0054d568                  Render::static_light_used[esi_1] = 0;
0054d4fe              else if (*(uint32_t*)eax_5 != 0)
0054d503              {
0054d556              label_54d556:
0054d556                  Render::static_light_used[esi_1] = 1;
0054d55d                  Render::add_active_light(esi_1, 1);
0054d565                  edi += 1;
0054d503              }
0054d503              else
0054d503              {
0054d508                  long double x87_r7_2 = (((long double)eax_5[0x11]) - ((long double)Render::local_object_center.x));
0054d511                  long double x87_r6_2 = (((long double)eax_5[0x12]) - ((long double)Render::local_object_center.y));
0054d51a                  long double x87_r5_2 = (((long double)eax_5[0x13]) - ((long double)Render::local_object_center.z));
0054d523                  long double x87_r4_2 = (((long double)eax_5[0x18]) + ((long double)Render::local_object_radius));
0054d53d                  long double x87_r3_5 = ((((x87_r5_2 * x87_r5_2) + (x87_r6_2 * x87_r6_2)) + (x87_r7_2 * x87_r7_2)) - (x87_r4_2 * x87_r4_2));
0054d53f                  long double temp0_1 = ((long double)0.000199999995f);
0054d53f                  (x87_r3_5 - temp0_1);
0054d549                  bool c1;
0054d549                  eax_5 = ((((x87_r3_5 < temp0_1) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_5, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r3_5 == temp0_1) ? 1 : 0) << 0xe) | 0x3000))));
0054d54d                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0054d54d                  
0054d552                  if (!(p_1))
0054d552                      goto label_54d556;
0054d552                  
0054d568                  Render::static_light_used[esi_1] = 0;
0054d503              }
0054d503              
0054d573              esi_1 += 1;
0054d576          } while (esi_1 < num_static_lights);
0054d4eb      }
0054d4eb      
0054d580      /* tailcall */
0054d580      return Render::enable_active_lights();
0054d480  }

0054d585                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0054d590  uint8_t Render::StartupRenderingDevice(class RenderDevicePresentation const* arg1, class RenderDeviceConfig const* arg2)

0054d590  {
0054d597      class ArgumentParser* ecx;
0054d597      
0054d597      if (ArgumentParser::OnCommandLineEvaluationDone(ecx) != 0)
0054d597      {
0054d5a4          if (FontMapper::Startup() != 0)
0054d5a4          {
0054d5f3              if (Render::StartupDevice(Render::m_pRenderer->m_nDisplayAdapter, arg1, arg2) != 0)
0054d5f3              {
0054d5f5                  KeyStone::Create();
0054d5f5                  
0054d601                  if (RenderUI::Startup() != 0)
0054d640                      return 1;
0054d640                  
0054d603                  KeyStone::Release();
0054d608                  FontMapper::Shutdown();
0054d60d                  Render::ShutdownDevice();
0054d5f3              }
0054d5a4          }
0054d5a4          else
0054d5a4          {
0054d5a6              GraphicsResource::PurgeResources();
0054d5ab              class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054d5ab              
0054d5b3              if (RenderDevice::render_device_1 != 0)
0054d5b3              {
0054d5b5                  RenderDevice::render_device_1->vtable->Shutdown();
0054d5ba                  class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0054d5ba                  
0054d5c2                  if (RenderDevice::render_device_2 != 0)
0054d5c4                      RenderDevice::render_device_2->vtable->__vecDelDtor(1);
0054d5b3              }
0054d5b3              
0054d5ca              RenderDevice::render_device = nullptr;
0054d5a4          }
0054d5a4          
0054d612          class Render* Render::m_pRenderer_1 = Render::m_pRenderer;
0054d612          
0054d61a          if (Render::m_pRenderer_1 != 0)
0054d61a          {
0054d61c              Render::m_pRenderer_1->vtable->Shutdown();
0054d621              class Render* Render::m_pRenderer_2 = Render::m_pRenderer;
0054d621              
0054d629              if (Render::m_pRenderer_2 != 0)
0054d62b                  Render::m_pRenderer_2->vtable->__vecDelDtor(1);
0054d62b              
0054d631              Render::m_pRenderer = nullptr;
0054d61a          }
0054d597      }
0054d597      
0054d63d      return 0;
0054d590  }

0054d641     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0054d650  uint8_t Render::FlushGraphicsResources()

0054d650  {
0054d657      if (Render::m_pRenderer == 0)
0054d657      {
0054d6ac          class Render* eax_3;
0054d6ac          eax_3 = 0;
0054d6ae          return 0;
0054d657      }
0054d657      
0054d672      for (uint32_t i = 0; i < 8; i += 1)
0054d669          RenderDeviceD3D::SetStageTexture(RenderDevice::render_device, i, nullptr);
0054d669      
0054d674      GraphicsResource::PurgeResources();
0054d679      GraphicsResource::RestoreLostResources();
0054d683      int32_t i_1 = 0;
0054d683      
0054d687      if (Render::m_RGRCallbacks.m_num > 0)
0054d687      {
0054d6a6          do
0054d6a6          {
0054d695              int32_t eax_2 = Render::m_RGRCallbacks.m_data[i_1];
0054d695              
0054d69a              if (eax_2 != 0)
0054d69c                  eax_2();
0054d69c              
0054d6a3              i_1 += 1;
0054d6a6          } while (i_1 < Render::m_RGRCallbacks.m_num);
0054d687      }
0054d687      
0054d6a8      uint32_t eax;
0054d6a8      eax = 1;
0054d6ab      return 1;
0054d650  }

0054d6af                                               90                                                                 .

0054d6b0  uint8_t Render::RestartRenderingSystem(class RenderDevicePresentation* arg1, class RenderDeviceConfig* arg2)

0054d6b0  {
0054d6b0      class Render* Render::m_pRenderer_1 = Render::m_pRenderer;
0054d6b0      
0054d6b7      if ((Render::m_pRenderer_1 != 0 && Render::RestartDevice(Render::m_pRenderer_1->m_nDisplayAdapter, arg1, arg2) != 0))
0054d6b7      {
0054d6d4          GraphicsResource::RestoreLostResources();
0054d6de          int32_t i = 0;
0054d6de          
0054d6e2          if (Render::m_RGRCallbacks.m_num > 0)
0054d6e2          {
0054d6fa              do
0054d6fa              {
0054d6e9                  int32_t eax_3 = Render::m_RGRCallbacks.m_data[i];
0054d6e9                  
0054d6ee                  if (eax_3 != 0)
0054d6f0                      eax_3();
0054d6f0                  
0054d6f7                  i += 1;
0054d6fa              } while (i < Render::m_RGRCallbacks.m_num);
0054d6e2          }
0054d6e2          
0054d6fc          uint32_t eax_1;
0054d6fc          eax_1 = 1;
0054d6ff          return 1;
0054d6b7      }
0054d6b7      
0054d700      Render::m_pRenderer_1 = 0;
0054d702      return 0;
0054d6b0  }

0054d703           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0054d710  uint8_t Render::RestartRenderingSystem()

0054d710  {
0054d71a      if (Render::m_pRenderer == 0)
0054d71a      {
0054d757          class Render* eax_1;
0054d757          eax_1 = 0;
0054d75c          return 0;
0054d71a      }
0054d71a      
0054d71c      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054d72f      void var_1c;
0054d72f      __builtin_memcpy(&var_1c, &RenderDevice::render_device_1->m_presentation, 0x1c);
0054d734      int32_t edx;
0054d734      edx = RenderDevice::render_device_1->m_config.bUseStencilBuffer;
0054d734      *(uint8_t*)((char*)edx)[1] = RenderDevice::render_device_1->m_config.bSoftwareVertexProcessing;
0054d734      *(uint8_t*)((char*)edx)[2] = RenderDevice::render_device_1->m_config.bUsePureDevice;
0054d73b      struct HWND__* hFocusWindow = RenderDevice::render_device_1->m_config.hFocusWindow;
0054d745      int32_t var_20 = edx;
0054d756      return Render::RestartRenderingSystem(&var_1c, &hFocusWindow);
0054d710  }

0054d75d                                                                                         90 90 90                               ...

0054d760  void Render::UnlinkRGRCallback(uint8_t (* arg1)())

0054d760  {
0054d761      uint32_t m_num = Render::m_RGRCallbacks.m_num;
0054d767      int32_t eax = 0;
0054d767      
0054d76b      if (m_num > 0)
0054d76b      {
0054d77a          while (Render::m_RGRCallbacks.m_data[eax] != arg1)
0054d77a          {
0054d77c              eax += 1;
0054d77c              
0054d77f              if (eax >= m_num)
0054d782                  return;
0054d77a          }
0054d77a          
0054d786          if (eax != 0xffffffff)
0054d792              SmartArray<IConsoleCallbackObject *,1>::RemoveUnOrdered(&Render::m_RGRCallbacks, &arg1);
0054d76b      }
0054d760  }

0054d799                                                                             90 90 90 90 90 90 90                           .......

0054d7a0  void __fastcall LightParms::LightParms(struct LightParms* this)

0054d7a0  {
0054d7a5      this->m_Sunlight.info.offset.qw = 0x3f800000;
0054d7a5      this->m_Sunlight.info.offset.qx = 0f;
0054d7a5      this->m_Sunlight.info.offset.qy = 0f;
0054d7a5      this->m_Sunlight.info.offset.qz = 0f;
0054d7a5      this->m_Sunlight.info.offset.m_fOrigin.x = 0;
0054d7a5      this->m_Sunlight.info.offset.m_fOrigin.y = 0f;
0054d7a5      this->m_Sunlight.info.offset.m_fOrigin.z = 0f;
0054d7c6      Frame::cache(&this->m_Sunlight.info.offset);
0054d7cb      float* esi = &this->static_lights[0].info.offset.m_fOrigin.z;
0054d7d1      int32_t i_2 = 0x3c;
0054d806      int32_t i;
0054d806      
0054d806      do
0054d806      {
0054d7e0          esi[-0xf] = 0x3f800000;
0054d83d          ADJ(esi)->static_lights[0].info.offset.qx = 0f;
0054d83d          ADJ(esi)->static_lights[0].info.offset.qy = 0f;
0054d83d          ADJ(esi)->static_lights[0].info.offset.qz = 0f;
0054d83d          ADJ(esi)->static_lights[0].info.offset.m_fOrigin.x = 0;
0054d83d          ADJ(esi)->static_lights[0].info.offset.m_fOrigin.y = 0f;
0054d83d          ADJ(esi)->static_lights[0].info.offset.m_fOrigin.z = 0f;
0054d7fa          Frame::cache(&esi[-0xf]);
0054d7ff          esi = &esi[0x37];
0054d805          i = i_2;
0054d805          i_2 -= 1;
0054d806      } while (i != 1);
0054d808      float* esi_1 = &this->dynamic_lights[0].info.offset.m_fOrigin.z;
0054d80e      int32_t i_3 = 0xa;
0054d839      int32_t i_1;
0054d839      
0054d839      do
0054d839      {
0054d813          esi_1[-0xf] = 0x3f800000;
0054d83d          ADJ(esi_1)->dynamic_lights[0].info.offset.qx = 0f;
0054d83d          ADJ(esi_1)->dynamic_lights[0].info.offset.qy = 0f;
0054d83d          ADJ(esi_1)->dynamic_lights[0].info.offset.qz = 0f;
0054d83d          ADJ(esi_1)->dynamic_lights[0].info.offset.m_fOrigin.x = 0;
0054d83d          ADJ(esi_1)->dynamic_lights[0].info.offset.m_fOrigin.y = 0f;
0054d83d          ADJ(esi_1)->dynamic_lights[0].info.offset.m_fOrigin.z = 0f;
0054d82d          Frame::cache(&esi_1[-0xf]);
0054d832          esi_1 = &esi_1[0x37];
0054d838          i_1 = i_3;
0054d838          i_3 -= 1;
0054d839      } while (i_1 != 1);
0054d7a0  }

0054d7d8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0054d842        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0054d850  void Render::UpdateFromPreferences()

0054d850  {
0054d85a      if (RenderDevice::render_device != 0)
0054d85a      {
0054d860          class RenderDevice* eax;
0054d860          eax = Device::m_bIsInitialized;
0054d866          int32_t ebx;
0054d866          ebx = 0;
0054d86a          char var_5_1 = 0;
0054d86e          char var_3_1 = 0;
0054d872          char var_2_1 = 0;
0054d876          char var_4_1 = 0;
0054d87a          char var_1_1 = 0;
0054d87a          
0054d87e          if (eax != 0)
0054d87e          {
0054d880              uint32_t Resolution = Device::m_DisplayPrefs.Resolution;
0054d880              
0054d88b              if (Current_Display_Resolution != Resolution)
0054d88b              {
0054d88d                  ebx = 1;
0054d88f                  Current_Display_Resolution = Resolution;
0054d88b              }
0054d88b              
0054d894              Resolution = Device::m_DisplayPrefs.FullScreen;
0054d894              
0054d89f              if (Current_Display_FullScreen != Resolution)
0054d89f              {
0054d8a1                  ebx = 1;
0054d8a3                  Current_Display_FullScreen = Resolution;
0054d89f              }
0054d89f              
0054d8a8              uint32_t RefreshRate = Device::m_DisplayPrefs.RefreshRate;
0054d8a8              
0054d8b3              if (Current_Display_RefreshRate != RefreshRate)
0054d8b3              {
0054d8b5                  ebx = 1;
0054d8b7                  Current_Display_RefreshRate = RefreshRate;
0054d8b3              }
0054d8b3              
0054d8bc              RefreshRate = Device::m_DisplayPrefs.SyncToRefresh;
0054d8bc              
0054d8c7              if (Current_Display_SyncToRefresh != RefreshRate)
0054d8c7              {
0054d8c9                  ebx = 1;
0054d8cb                  Current_Display_SyncToRefresh = RefreshRate;
0054d8c7              }
0054d8c7              
0054d8d0              RefreshRate = Device::m_DisplayPrefs.Antialiasing;
0054d8d0              
0054d8db              if (Current_Display_Antialiasing != RefreshRate)
0054d8db              {
0054d8dd                  ebx = 1;
0054d8df                  Current_Display_Antialiasing = RefreshRate;
0054d8db              }
0054d87e          }
0054d87e          
0054d8e4          uint32_t LandscapeTextureDetail = Render::m_RenderPrefs.LandscapeTextureDetail;
0054d8e4          
0054d8ef          if (Current_Render_LandscapeTextureDetail != LandscapeTextureDetail)
0054d8ef          {
0054d8f3              var_5_1 = 1;
0054d8f8              Current_Render_LandscapeTextureDetail = LandscapeTextureDetail;
0054d8fd              enum ImageScaleType eax_1;
0054d8fd              
0054d8fd              if (LandscapeTextureDetail <= 0)
0054d902                  eax_1 = FULL_RES;
0054d8fd              else
0054d8ff                  eax_1 = (LandscapeTextureDetail - 1);
0054d8ff              
0054d904              ImgTex::fLandTextureScale = eax_1;
0054d8ef          }
0054d8ef          
0054d909          uint32_t EnvironmentTextureDetail = Render::m_RenderPrefs.EnvironmentTextureDetail;
0054d909          
0054d914          if (Current_Render_EnvironmentTextureDetail != EnvironmentTextureDetail)
0054d914          {
0054d918              var_5_1 = 1;
0054d91d              Current_Render_EnvironmentTextureDetail = EnvironmentTextureDetail;
0054d91d              
0054d922              if (EnvironmentTextureDetail <= 0)
0054d927                  EnvironmentTextureDetail = 0;
0054d922              else
0054d924                  EnvironmentTextureDetail -= 1;
0054d924              
0054d929              ImgTex::fClipmapTextureScale = EnvironmentTextureDetail;
0054d92e              ImgTex::fRGBATextureScale = EnvironmentTextureDetail;
0054d933              ImgTex::fIndexedTextureScale = EnvironmentTextureDetail;
0054d914          }
0054d914          
0054d938          long double x87_r7_1 = ((long double)Current_Render_ScreenBrightness);
0054d93e          long double temp0_1 = ((long double)Render::m_RenderPrefs.ScreenBrightness);
0054d93e          (x87_r7_1 - temp0_1);
0054d944          EnvironmentTextureDetail = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0054d946          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0054d946          
0054d949          if (p_1)
0054d949          {
0054d950              var_3_1 = 1;
0054d955              Current_Render_ScreenBrightness = Render::m_RenderPrefs.ScreenBrightness;
0054d949          }
0054d949          
0054d95a          uint32_t eax_3 = Render::m_RenderPrefs.AspectRatio;
0054d95a          
0054d965          if (Current_Render_AspectRatio != eax_3)
0054d965          {
0054d967              var_1_1 = 1;
0054d96c              Current_Render_AspectRatio = eax_3;
0054d965          }
0054d965          
0054d971          long double x87_r7_2 = ((long double)Current_Render_FieldOfView);
0054d977          long double temp1_1 = ((long double)Render::m_RenderPrefs.FieldOfView);
0054d977          (x87_r7_2 - temp1_1);
0054d97d          eax_3 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0054d97f          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0054d97f          
0054d982          if (p_2)
0054d982          {
0054d984              float FieldOfView = Render::m_RenderPrefs.FieldOfView;
0054d98c              Current_Render_FieldOfView = FieldOfView;
0054d999              SmartBox::SetDefaultFov(SmartBox::smartbox, FieldOfView);
0054d982          }
0054d982          
0054d99e          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0054d99e          
0054d9a6          if (SmartBox::smartbox_1 != 0)
0054d9a6          {
0054d9a8              eax_3 = Render::m_RenderPrefs.LandscapeDrawDistance;
0054d9a8              
0054d9b3              if (Current_Render_LandscapeDrawDistance != eax_3)
0054d9b3              {
0054d9b5                  var_2_1 = 1;
0054d9ba                  Current_Render_LandscapeDrawDistance = eax_3;
0054d9b3              }
0054d9b3              
0054d9bf              eax_3 = Current_Render_LandscapeDetailTextures;
0054d9bf              
0054d9c6              if (eax_3 != 0)
0054d9c6              {
0054d9c8                  var_4_1 = 1;
0054d9cd                  Current_Render_LandscapeDetailTextures = 0;
0054d9c6              }
0054d9c6              
0054d9d4              eax_3 = Render::m_RenderPrefs.EnvironmentDetailTextures;
0054d9d4              
0054d9df              if (Current_Render_EnvironmentDetailTextures == eax_3)
0054d9df              {
0054d9e8                  float edx;
0054d9e8                  edx = var_4_1;
0054d9e8                  
0054d9ee                  if (edx != 0)
0054d9f3                      SmartBox::SetDetailTexturing(SmartBox::smartbox_1, 0, eax_3);
0054d9df              }
0054d9df              else
0054d9df              {
0054d9e1                  Current_Render_EnvironmentDetailTextures = eax_3;
0054d9f3                  SmartBox::SetDetailTexturing(SmartBox::smartbox_1, 0, eax_3);
0054d9df              }
0054d9a6          }
0054d9a6          
0054d9f8          eax_3 = var_3_1;
0054d9fe          int80_t st0_1;
0054d9fe          
0054d9fe          if (eax_3 != 0)
0054da0e              eax_3 = RenderDeviceD3D::SetGamma(RenderDevice::render_device, Render::m_RenderPrefs.ScreenBrightness, 0);
0054da13          eax_3 = IsFirstTime;
0054da13          
0054da1a          if (eax_3 == 0)
0054da1a          {
0054da1c              eax_3 = Device::m_bIsInitialized;
0054da1c              
0054da27              if ((eax_3 != 0 && ebx != 0))
0054da29                  Device::ChangePresentation();
0054da29              
0054da2e              eax_3 = var_2_1;
0054da2e              
0054da34              if (eax_3 != 0)
0054da43                  SmartBox::set_mid_radius(SmartBox::smartbox, Render::m_RenderPrefs.LandscapeDrawDistance);
0054da43              
0054da48              eax_3 = var_5_1;
0054da48              
0054da4e              if (eax_3 != 0)
0054da4e              {
0054da50                  eax_3 = Device::m_bIsInitialized;
0054da50                  
0054da5b                  if ((eax_3 == 0 || ebx == 0))
0054da5d                      Render::FlushGraphicsResources();
0054da4e              }
0054da4e              
0054da62              eax_3 = var_1_1;
0054da62              
0054da68              if (eax_3 != 0)
0054da70                  RenderDeviceD3D::SetupDisplayAspectRatio(RenderDevice::render_device);
0054da1a          }
0054da1a          
0054da75          IsFirstTime = 0;
0054d85a      }
0054d850  }

0054da81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0054da90  int32_t Render::Init()

0054da90  {
0054da9d      if (Render::m_pRenderer->vtable->InitInternal() == 0)
0054daa4          return 1;
0054daa4      
0054daa5      int32_t i = 0;
0054daa7      void* ecx = nullptr;
0054daa7      
0054dad5      do
0054dad5      {
0054dab6          *(uint32_t*)((char*)ecx + 0x86a738) = (i + 0x8673a8);
0054dac2          *(uint32_t*)((char*)ecx + 0x86e6c0) = (i + 0x86b330);
0054dac8          i += 0xdc;
0054dacd          ecx += 4;
0054dad5      } while (i < 0x3390);
0054dad5      
0054dad7      Render::world_lights.sorted_dynamic_lights[0] = 0x86a82c;
0054dae1      Render::viewer_lights.sorted_dynamic_lights[0] = 0x86e7b4;
0054daeb      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[1] = &*(uint2200_t*)Render::world_lights.dynamic_lights[1];
0054daf5      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[1] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[1];
0054daff      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[2] = &*(uint2200_t*)Render::world_lights.dynamic_lights[2];
0054db09      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[2] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[2];
0054db13      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[3] = &*(uint2200_t*)Render::world_lights.dynamic_lights[3];
0054db1d      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[3] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[3];
0054db27      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[4] = &*(uint2200_t*)Render::world_lights.dynamic_lights[4];
0054db31      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[4] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[4];
0054db3b      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[5] = &*(uint2200_t*)Render::world_lights.dynamic_lights[5];
0054db45      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[5] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[5];
0054db4f      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[6] = &*(uint2200_t*)Render::world_lights.dynamic_lights[6];
0054db59      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[6] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[6];
0054db63      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[7] = &*(uint2200_t*)Render::world_lights.dynamic_lights[7];
0054db6d      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[7] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[7];
0054db77      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[8] = &*(uint2200_t*)Render::world_lights.dynamic_lights[8];
0054db81      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[8] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[8];
0054db8b      *(uint40_t*)Render::world_lights.sorted_dynamic_lights[9] = &*(uint2200_t*)Render::world_lights.dynamic_lights[9];
0054db95      *(uint40_t*)Render::viewer_lights.sorted_dynamic_lights[9] = &*(uint2200_t*)Render::viewer_lights.dynamic_lights[9];
0054db9f      Render::PolyNext = &Render::PolyList;
0054dba9      int32_t* i_1 = &Render::FrameStack[9].era;
0054dba9      
0054dbc0      do
0054dbc0      {
0054dbb0          *(uint32_t*)i_1 = 0;
0054dbb6          i_1 -= 0x168;
0054dbc0      } while (i_1 >= 0x8665c0);
0054dbc0      
0054dbc9      simple_clip_plane_list.cplane_num = 1;
0054dbd3      DArray<ClipPlane>::grow(&simple_clip_plane_list.cplane_list, 1);
0054dbd8      simple_clip_plane_list.cplane_list.data->plane = 0;
0054dbe3      class ClipPlane* data = simple_clip_plane_list.cplane_list.data;
0054dbe9      data->side = POSITIVE;
0054dbf0      Render::world_lights.num_static_lights = 0;
0054dbfa      Render::world_lights.num_dynamic_lights = 0;
0054dc04      ArgumentParser::OnCommandLineEvaluationDone(data);
0054dc09      InitState = 1;
0054dc15      return 0;
0054da90  }

0054dc16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0054dc20  void Render::update_viewpoint(class Frame const* arg1)

0054dc20  {
0054dc2c      int32_t var_48 = 0x796910;
0054dc34      int32_t var_44 = 0;
0054dc3c      void var_40;
0054dc3c      Frame::operator=(&var_40, arg1);
0054dc46      Render::update_viewpoint(&var_48);
0054dc20  }

0054dc4f                                               90                                                                 .

0054dc50  enum BoundingType Render::block_check(struct ViewIntervalType* arg1, struct ViewIntervalType* arg2, struct ViewIntervalType* arg3, struct ViewIntervalType* arg4, float arg5, float arg6)

0054dc50  {
0054dc7d      enum BoundingType eax_3 = Render::block_plane_check(arg1->bound[0], arg2->bound[0], arg3->bound[0], arg4->bound[0], arg6, arg5);
0054dc87      enum BoundingType var_8 = eax_3;
0054dc87      
0054dc8b      if (eax_3 == OUTSIDE)
0054dc93          return eax_3;
0054dc93      
0054dca2      int32_t var_c = 1;
0054dca2      
0054dca6      if (Render::portal_npnts < 1)
0054dd19          return eax_3;
0054dd19      
0054dcb0      void* eax_5 = ((char*)arg1 - arg3);
0054dcb2      int32_t* esi_1 = &arg3->bound[1];
0054dcb5      void* var_4_1 = eax_5;
0054dcb5      
0054dcd9      while (true)
0054dcd9      {
0054dcd9          enum BoundingType eax_6 = Render::block_plane_check(*(uint32_t*)((char*)eax_5 + esi_1), *(uint32_t*)((char*)esi_1 + ((char*)arg2 - arg3)), *(uint32_t*)esi_1, *(uint32_t*)(((char*)arg4 - arg3) + esi_1), arg6, arg5);
0054dcd9          
0054dce3          if (eax_6 == OUTSIDE)
0054dd10              return OUTSIDE;
0054dd10          
0054dce8          if (eax_6 == PARTIALLY_INSIDE)
0054dcea              var_8 = eax_6;
0054dcea          
0054dcf9          esi_1 = &esi_1[1];
0054dcfc          bool cond:2_1 = (var_c + 1) <= Render::portal_npnts;
0054dcfe          var_c += 1;
0054dcfe          
0054dd02          if (!(cond:2_1))
0054dd02              break;
0054dd02          
0054dcbb          eax_5 = var_4_1;
0054dcd9      }
0054dcd9      
0054dd0f      return var_8;
0054dc50  }

0054dd1a                                                                                90 90 90 90 90 90                            ......

0054dd20  void __thiscall DArray<view_vertex>::grow(class DArray<view_vertex>* this, uint32_t arg2)

0054dd20  {
0054dd24      uint32_t ebx = arg2;
0054dd24      
0054dd2e      if (ebx <= this->sizeOf)
0054dd2e      {
0054dd31          DArray<view_vertex>::shrink(this, ebx);
0054dd3b          return;
0054dd2e      }
0054dd2e      
0054dd4b      void* eax_1 = operator new[](((ebx * 0x18) + 4));
0054dd55      void* var_8;
0054dd55      
0054dd55      if (eax_1 == 0)
0054dd70          var_8 = nullptr;
0054dd55      else
0054dd55      {
0054dd63          *(uint32_t*)eax_1 = ebx;
0054dd65          `vector constructor iterator'(((char*)eax_1 + 4), 0x18, ebx, view_vertex::view_vertex);
0054dd6a          var_8 = ((char*)eax_1 + 4);
0054dd55      }
0054dd55      
0054dd7b      int32_t edx = 0;
0054dd7b      
0054dd7f      if (this->sizeOf > 0)
0054dd7f      {
0054dd8a          void* ecx_1 = (0xfffffff8 - var_8);
0054dd8c          void* eax_3 = ((char*)var_8 + 8);
0054dd8f          void* var_4_1 = ecx_1;
0054dd8f          
0054dda0          while (true)
0054dda0          {
0054dda0              struct view_vertex* data_1 = this->data;
0054dda2              int32_t* ecx_2 = ((char*)ecx_1 + eax_3);
0054dda7              void* ecx_3 = ((char*)ecx_2 + data_1);
0054dda9              *(uint32_t*)((char*)eax_3 - 8) = *(uint32_t*)((char*)ecx_2 + data_1);
0054ddaf              *(uint32_t*)((char*)eax_3 - 4) = *(uint32_t*)((char*)ecx_3 + 4);
0054ddbb              *(uint32_t*)eax_3 = *(uint32_t*)((char*)ecx_3 + 8);
0054ddc0              *(uint32_t*)((char*)eax_3 + 4) = *(uint32_t*)((char*)ecx_3 + 0xc);
0054ddc6              *(uint32_t*)((char*)eax_3 + 8) = *(uint32_t*)((char*)ecx_3 + 0x10);
0054ddcc              *(uint32_t*)((char*)eax_3 + 0xc) = *(uint32_t*)((char*)ecx_3 + 0x14);
0054ddd2              edx += 1;
0054ddd3              eax_3 += 0x18;
0054ddd3              
0054ddd8              if (edx >= this->sizeOf)
0054ddd8                  break;
0054ddd8              
0054dd95              ecx_1 = var_4_1;
0054dda0          }
0054dda0          
0054ddda          ebx = arg2;
0054dd7f      }
0054dd7f      
0054ddde      struct view_vertex* data = this->data;
0054ddde      
0054dde2      if (data != 0)
0054dde2      {
0054dde4          int32_t i_2 = *(uint32_t*)((char*)data->pt + -4);
0054ddf2          void* edi_8 = &data[i_2];
0054ddf2          
0054ddf5          if ((i_2 - 1) >= 0)
0054ddf5          {
0054ddf7              int32_t i_1 = i_2;
0054de0b              int32_t i;
0054de0b              
0054de0b              do
0054de0b              {
0054de00                  edi_8 -= 0x18;
0054de05                  IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(edi_8);
0054de0a                  i = i_1;
0054de0a                  i_1 -= 1;
0054de0b              } while (i != 1);
0054ddf5          }
0054ddf5          
0054de12          operator delete[](((char*)data - 4));
0054dde2      }
0054dde2      
0054de20      this->sizeOf = ebx;
0054de23      this->data = var_8;
0054dd20  }

0054de2d                                         90 90 90                                                               ...

0054de30  void __thiscall DArray<view_vertex>::shrink(class DArray<view_vertex>* this, uint32_t arg2)

0054de30  {
0054de3a      uint32_t edi = arg2;
0054de3a      
0054de40      if (edi > this->sizeOf)
0054de40      {
0054de43          DArray<view_vertex>::grow(this, edi);
0054de4d          return;
0054de40      }
0054de40      
0054de56      if (edi != 0)
0054de56      {
0054deb0          uint32_t* eax_3 = operator new[](((edi * 0x18) + 4));
0054deba          void* var_8_1;
0054deba          
0054deba          if (eax_3 == 0)
0054ded5              var_8_1 = nullptr;
0054deba          else
0054deba          {
0054dec8              *(uint32_t*)eax_3 = edi;
0054deca              `vector constructor iterator'(&eax_3[1], 0x18, edi, view_vertex::view_vertex);
0054decf              var_8_1 = &eax_3[1];
0054deba          }
0054deba          
0054ded9          int32_t edx_2 = 0;
0054dedd          this->sizeOf = edi;
0054dedd          
0054dee0          if (edi > 0)
0054dee0          {
0054deeb              void* ecx_2 = (0xfffffff8 - var_8_1);
0054deed              void* eax_4 = ((char*)var_8_1 + 8);
0054def0              void* var_4_1 = ecx_2;
0054def0              
0054df00              while (true)
0054df00              {
0054df00                  struct view_vertex* data_2 = this->data;
0054df02                  void* ecx_3 = ((char*)ecx_2 + eax_4);
0054df07                  void* ecx_4 = ((char*)ecx_3 + data_2);
0054df09                  *(uint32_t*)((char*)eax_4 - 8) = *(uint32_t*)((char*)ecx_3 + data_2);
0054df0f                  *(uint32_t*)((char*)eax_4 - 4) = *(uint32_t*)((char*)ecx_4 + 4);
0054df1b                  *(uint32_t*)eax_4 = *(uint32_t*)((char*)ecx_4 + 8);
0054df20                  *(uint32_t*)((char*)eax_4 + 4) = *(uint32_t*)((char*)ecx_4 + 0xc);
0054df26                  *(uint32_t*)((char*)eax_4 + 8) = *(uint32_t*)((char*)ecx_4 + 0x10);
0054df2c                  *(uint32_t*)((char*)eax_4 + 0xc) = *(uint32_t*)((char*)ecx_4 + 0x14);
0054df32                  edx_2 += 1;
0054df33                  eax_4 += 0x18;
0054df33                  
0054df38                  if (edx_2 >= this->sizeOf)
0054df38                      break;
0054df38                  
0054def6                  ecx_2 = var_4_1;
0054df00              }
0054df00              
0054df3a              edi = arg2;
0054dee0          }
0054dee0          
0054df3e          struct view_vertex* data_1 = this->data;
0054df3e          
0054df42          if (data_1 != 0)
0054df42          {
0054df44              int32_t i_5 = *(uint32_t*)((char*)data_1->pt + -4);
0054df44              
0054df55              if ((i_5 - 1) >= 0)
0054df55              {
0054df57                  int32_t i_3 = i_5;
0054df5a                  void* ebx_8 = &data_1[i_5];
0054df6b                  int32_t i;
0054df6b                  
0054df6b                  do
0054df6b                  {
0054df60                      ebx_8 -= 0x18;
0054df65                      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ebx_8);
0054df6a                      i = i_3;
0054df6a                      i_3 -= 1;
0054df6b                  } while (i != 1);
0054df55              }
0054df55              
0054df72              operator delete[](((char*)data_1 - 4));
0054df42          }
0054df42          
0054df7e          this->data = var_8_1;
0054de56      }
0054de56      else
0054de56      {
0054de58          struct view_vertex* data = this->data;
0054de5c          this->sizeOf = 0;
0054de5c          
0054de5f          if (data != 0)
0054de5f          {
0054de61              int32_t i_4 = *(uint32_t*)((char*)data->pt + -4);
0054de6f              void* ebx_2 = &data[i_4];
0054de6f              
0054de72              if ((i_4 - 1) >= 0)
0054de72              {
0054de74                  int32_t i_2 = i_4;
0054de8b                  int32_t i_1;
0054de8b                  
0054de8b                  do
0054de8b                  {
0054de80                      ebx_2 -= 0x18;
0054de85                      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(ebx_2);
0054de8a                      i_1 = i_2;
0054de8a                      i_2 -= 1;
0054de8b                  } while (i_1 != 1);
0054de72              }
0054de72              
0054de92              operator delete[](((char*)data - 4));
0054de5f          }
0054de5f          
0054de9a          this->data = 0;
0054de56      }
0054de56      
0054df85      if (this->next_available > edi)
0054df87          this->next_available = edi;
0054de30  }

0054de79                                                                             8d a4 24 00 00 00 00                           ..$....
0054df92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054dfa0  void __fastcall Render::Begin(class Render* this)

0054dfa0  {
0054dfa0      this->m_nDisplayAdapter = 0;
0054dfaa      /* tailcall */
0054dfaa      return SmartArray<PrefDisplayModeType,1>::Reset(&this->m_DisplayModes);
0054dfa0  }

0054dfaf                                               90                                                                 .

0054dfb0  void __fastcall Render::End(class Render* this)

0054dfb0  {
0054dfb3      /* tailcall */
0054dfb3      return SmartArray<PrefDisplayModeType,1>::Reset(&this->m_DisplayModes);
0054dfb0  }

0054dfb8                                                                          90 90 90 90 90 90 90 90                          ........

0054dfc0  void Render::copy_view(struct portal_view_type* arg1, struct Vec2Dscreen** arg2, uint32_t arg3)

0054dfc0  {
0054dfca      struct portal_view_type* edi = arg1;
0054dfd1      uint32_t view_count = edi->view_count;
0054dfda      uint32_t vertex_count_total;
0054dfda      
0054dfda      if (view_count != 0)
0054dfe0          vertex_count_total = edi->view.vertex_count_total;
0054dfda      else
0054dfdc          vertex_count_total = 0;
0054dfdc      
0054dfe6      uint32_t vertex_count_total_1 = vertex_count_total;
0054dfe6      
0054dfea      if (view_count >= edi->view.poly.sizeOf)
0054dff3          DArray<view_poly>::grow(&edi->view.poly, (view_count + 0x10));
0054dff3      
0054e003      int32_t __saved_edi;
0054e003      int32_t i_5;
0054e003      uint32_t ecx_5;
0054e003      int32_t i_9;
0054e003      void* esi_1;
0054e003      
0054e003      if (arg2 != 0)
0054e003      {
0054e106          int32_t ecx_6 = 0;
0054e108          int32_t ebx = 0;
0054e10c          i_5 = 1;
0054e114          int32_t var_210_1 = 0;
0054e118          int32_t var_220_1 = 0;
0054e11c          char var_1cc = 1;
0054e121          uint32_t eax_12;
0054e121          
0054e121          if (arg3 > 0)
0054e121          {
0054e127              int32_t* var_204_1 = nullptr;
0054e127              
0054e24f              do
0054e24f              {
0054e130                  float* edx_1 = arg2[ecx_6];
0054e134                  long double x87_r7_6 = ((long double)edx_1[3]);
0054e137                  long double temp3_1 = ((long double)1.0);
0054e137                  (x87_r7_6 - temp3_1);
0054e13d                  eax_12 = ((((x87_r7_6 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0054e13f                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0054e13f                  
0054e142                  if (p_1)
0054e142                  {
0054e149                      *(uint32_t*)edx_1 = ((float)(((long double)*(uint32_t*)edx_1) / ((long double)edx_1[3])));
0054e14b                      void* eax_13 = arg2[ecx_6];
0054e155                      *(uint32_t*)((char*)eax_13 + 4) = ((float)(((long double)*(uint32_t*)((char*)eax_13 + 4)) / ((long double)*(uint32_t*)((char*)eax_13 + 0xc))));
0054e158                      arg2[ecx_6]->w = 0x3f800000;
0054e142                  }
0054e142                  
0054e165                  if (ecx_6 > 0)
0054e165                  {
0054e16b                      float* edx_3 = arg2[ecx_6];
0054e171                      int32_t eax_14 = (ebx << 2);
0054e178                      float* esi_2 = *(uint32_t*)(eax_14 + arg2);
0054e17d                      int32_t var_200_1 = eax_14;
0054e181                      long double x87_r7_13 = fabsl((((long double)*(uint32_t*)edx_3) - ((long double)*(uint32_t*)esi_2)));
0054e183                      long double temp5_1 = ((long double)1.0);
0054e183                      (x87_r7_13 - temp5_1);
0054e189                      eax_14 = ((((x87_r7_13 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp5_1) ? 1 : 0) << 0xe) | 0))));
0054e189                      
0054e18e                      if ((*(uint8_t*)((char*)eax_14)[1] & 0x41) == 0)
0054e1a9                          eax_14 = 1;
0054e18e                      else
0054e18e                      {
0054e196                          long double x87_r7_16 = fabsl((((long double)edx_3[1]) - ((long double)esi_2[1])));
0054e198                          long double temp6_1 = ((long double)1.0);
0054e198                          (x87_r7_16 - temp6_1);
0054e19e                          eax_14 = ((((x87_r7_16 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_16, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_16 == temp6_1) ? 1 : 0) << 0xe) | 0))));
0054e19e                          
0054e1a3                          if ((*(uint8_t*)((char*)eax_14)[1] & 0x41) == 0)
0054e1a9                              eax_14 = 1;
0054e1a3                          else
0054e1a5                              eax_14 = 0;
0054e18e                      }
0054e18e                      
0054e1ad                      &var_1cc[ecx_6] = eax_14;
0054e1ad                      
0054e1b1                      if (eax_14 != 0)
0054e1b1                      {
0054e1b9                          if (ebx <= 0)
0054e1b9                          {
0054e230                              i_5 += 1;
0054e234                              var_220_1 = ecx_6;
0054e1b9                          }
0054e1b9                          else
0054e1b9                          {
0054e1bf                              float* edi_1 = *(uint32_t*)((char*)var_204_1 + arg2);
0054e1c6                              long double x87_r7_19 = fabsl((((long double)*(uint32_t*)edi_1) - ((long double)*(uint32_t*)edx_3)));
0054e1d0                              float var_224_1 = ((float)fabsl((((long double)edi_1[1]) - ((long double)edx_3[1]))));
0054e1d4                              long double temp8_1 = ((long double)var_224_1);
0054e1d4                              (x87_r7_19 - temp8_1);
0054e1d8                              int32_t* eax_15;
0054e1d8                              eax_15 = ((((x87_r7_19 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_19, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_19 == temp8_1) ? 1 : 0) << 0xe) | 0x3800))));
0054e1da                              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0054e1da                              
0054e1dd                              if (!(p_2))
0054e1e1                                  x87_r7_19 = ((long double)var_224_1);
0054e1e1                              
0054e1fd                              long double x87_r6_7 = (((((long double)esi_2[1]) - ((long double)edx_3[1])) * (((long double)*(uint32_t*)edi_1) - ((long double)*(uint32_t*)esi_2))) - ((((long double)*(uint32_t*)esi_2) - ((long double)*(uint32_t*)edx_3)) * (((long double)edi_1[1]) - ((long double)esi_2[1]))));
0054e1ff                              long double x87_r6_8 = fabsl(x87_r6_7);
0054e201                              (x87_r6_8 - x87_r7_19);
0054e203                              eax_15 = ((((x87_r6_8 < x87_r7_19) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_8, x87_r7_19))) ? 1 : 0) << 0xa) | ((((x87_r6_8 == x87_r7_19) ? 1 : 0) << 0xe) | 0x3800))));
0054e207                              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0054e207                              
0054e20a                              if (p_3)
0054e20a                              {
0054e222                                  i_5 += 1;
0054e226                                  var_210_1 = ebx;
0054e22a                                  var_204_1 = var_200_1;
0054e20a                              }
0054e20a                              else
0054e20a                              {
0054e210                                  &var_1cc[ebx] = 0;
0054e210                                  
0054e215                                  if (var_220_1 == ebx)
0054e234                                      var_220_1 = ecx_6;
0054e20a                              }
0054e1b9                          }
0054e1b9                          
0054e238                          ebx = ecx_6;
0054e1b1                      }
0054e1b1                      
0054e23a                      vertex_count_total = vertex_count_total_1;
0054e23e                      edi = arg1;
0054e165                  }
0054e165                  
0054e24c                  ecx_6 += 1;
0054e24f              } while (ecx_6 < arg3);
0054e121          }
0054e121          
0054e255          struct Vec2Dscreen* ecx_7 = *(uint32_t*)arg2;
0054e258          float* edx_5 = arg2[ebx];
0054e260          long double x87_r7_22 = fabsl((((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 0)) - ((long double)*(uint32_t*)edx_5)));
0054e262          long double temp1_1 = ((long double)1.0);
0054e262          (x87_r7_22 - temp1_1);
0054e268          eax_12 = ((((x87_r7_22 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_22, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_22 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0054e268          
0054e26d          if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) == 0)
0054e288              eax_12 = 1;
0054e26d          else
0054e26d          {
0054e275              long double x87_r7_25 = fabsl((((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 4)) - ((long double)edx_5[1])));
0054e277              long double temp2_1 = ((long double)1.0);
0054e277              (x87_r7_25 - temp2_1);
0054e27d              eax_12 = ((((x87_r7_25 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_25, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_25 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0054e27d              
0054e282              if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) == 0)
0054e288                  eax_12 = 1;
0054e282              else
0054e284                  eax_12 = 0;
0054e26d          }
0054e26d          
0054e294          *(uint8_t*)((&__saved_edi + ebx) + 0x6c) = eax_12;
0054e294          
0054e296          if (eax_12 == 0)
0054e2f9              i_5 -= 1;
0054e296          else
0054e296          {
0054e29c              float* edx_7 = arg2[var_210_1];
0054e2a4              long double x87_r7_28 = fabsl((((long double)*(uint32_t*)edx_7) - ((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 0))));
0054e2ae              float var_224_2 = ((float)fabsl((((long double)edx_7[1]) - ((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 4)))));
0054e2b2              long double temp4_1 = ((long double)var_224_2);
0054e2b2              (x87_r7_28 - temp4_1);
0054e2b6              int32_t eax_18;
0054e2b6              eax_18 = ((((x87_r7_28 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_28, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_28 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
0054e2b8              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
0054e2b8              
0054e2bb              if (!(p_4))
0054e2bf                  x87_r7_28 = ((long double)var_224_2);
0054e2bf              
0054e2c3              float* eax_19 = arg2[ebx];
0054e2df              long double x87_r6_15 = (((((long double)eax_19[1]) - ((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 4))) * (((long double)*(uint32_t*)edx_7) - ((long double)*(uint32_t*)eax_19))) - ((((long double)edx_7[1]) - ((long double)eax_19[1])) * (((long double)*(uint32_t*)eax_19) - ((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 0)))));
0054e2e1              long double x87_r6_16 = fabsl(x87_r6_15);
0054e2e5              (x87_r7_28 - x87_r6_16);
0054e2e7              eax_19 = ((((x87_r7_28 < x87_r6_16) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_28, x87_r6_16))) ? 1 : 0) << 0xa) | ((((x87_r7_28 == x87_r6_16) ? 1 : 0) << 0xe) | 0))));
0054e2e7              
0054e2ec              if ((*(uint8_t*)((char*)eax_19)[1] & 0x41) != 0)
0054e383                  var_210_1 = ebx;
0054e2ec              else
0054e2ec              {
0054e2f6                  *(uint8_t*)((&__saved_edi + ebx) + 0x6c) = 0;
0054e2f9                  i_5 -= 1;
0054e2ec              }
0054e296          }
0054e296          
0054e303          if (var_220_1 > 0)
0054e303          {
0054e309              float* edx_9 = arg2[var_210_1];
0054e313              float* ebx_1 = arg2[var_220_1];
0054e319              long double x87_r7_32 = fabsl((((long double)*(uint32_t*)edx_9) - ((long double)*(uint32_t*)ebx_1)));
0054e323              float var_224_3 = ((float)fabsl((((long double)edx_9[1]) - ((long double)ebx_1[1]))));
0054e327              long double temp7_1 = ((long double)var_224_3);
0054e327              (x87_r7_32 - temp7_1);
0054e32b              int32_t eax_22;
0054e32b              eax_22 = ((((x87_r7_32 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_32, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_32 == temp7_1) ? 1 : 0) << 0xe) | 0x3800))));
0054e32d              bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
0054e32d              
0054e330              if (!(p_5))
0054e334                  x87_r7_32 = ((long double)var_224_3);
0054e334              
0054e350              long double x87_r6_24 = (((((long double)*(uint32_t*)edx_9) - ((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 0))) * (((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 4)) - ((long double)ebx_1[1]))) - ((((long double)edx_9[1]) - ((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 4))) * (((long double)*(uint32_t*)((char*)ecx_7->__inner0 + 0)) - ((long double)*(uint32_t*)ebx_1))));
0054e352              long double x87_r6_25 = fabsl(x87_r6_24);
0054e356              (x87_r7_32 - x87_r6_25);
0054e358              eax_22 = ((((x87_r7_32 < x87_r6_25) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_32, x87_r6_25))) ? 1 : 0) << 0xa) | ((((x87_r7_32 == x87_r6_25) ? 1 : 0) << 0xe) | 0))));
0054e358              
0054e35d              if ((*(uint8_t*)((char*)eax_22)[1] & 0x41) == 0)
0054e35d              {
0054e364                  var_1cc = 0;
0054e369                  i_5 -= 1;
0054e35d              }
0054e303          }
0054e303          
0054e36d          int32_t i_7 = i_5;
0054e36d          
0054e374          if (i_7 < 3)
0054e382              return;
0054e382          
0054e38f          if (i_7 > 0x1f)
0054e38f          {
0054e391              i_7 = 0x1f;
0054e396              i_5 = 0x1f;
0054e38f          }
0054e38f          
0054e3a3          edi->view.vertex_count_total = ((i_7 + vertex_count_total) + 1);
0054e3a3          
0054e3a6          if (((i_7 + vertex_count_total) + 1) >= edi->view.vertex.sizeOf)
0054e3af              DArray<view_vertex>::grow(&edi->view.vertex, ((i_7 + vertex_count_total) + 0x11));
0054e3af          
0054e3bb          int32_t i_8 = i_5;
0054e3c9          ecx_5 = (view_count * 0x18);
0054e3cc          *(uint32_t*)(ecx_5 + edi->view.poly.data) = i_8;
0054e3d2          *(uint32_t*)(&edi->view.poly.data->vertex_index + ecx_5) = vertex_count_total;
0054e3dc          esi_1 = &edi->view.vertex.data[vertex_count_total];
0054e3df          int32_t eax_31 = 0;
0054e3df          
0054e3e3          if (arg3 > 0)
0054e3e3          {
0054e3e5              void* edx_10 = esi_1;
0054e3e5              
0054e413              do
0054e413              {
0054e3e7                  uint32_t ebx_2;
0054e3e7                  ebx_2 = &var_1cc[eax_31];
0054e3e7                  
0054e3ed                  if (ebx_2 != 0)
0054e3ed                  {
0054e3f5                      edx_10 += 0x18;
0054e3fa                      *(uint32_t*)((char*)edx_10 - 0x18) = ((float)fabsl(((long double)arg2[eax_31]->__inner0.__inner0.xw)));
0054e406                      *(uint32_t*)((char*)edx_10 - 0x14) = ((float)fabsl(((long double)arg2[eax_31]->__inner0.__inner0.yw)));
0054e3ed                  }
0054e3ed                  
0054e410                  eax_31 += 1;
0054e413              } while (eax_31 < arg3);
0054e413              
0054e415              i_8 = i_5;
0054e3e3          }
0054e3e3          
0054e419          i_9 = i_5;
0054e420          void* eax_32 = ((char*)esi_1 + (i_8 * 0x18));
0054e425          *(uint32_t*)eax_32 = *(uint32_t*)esi_1;
0054e42a          *(uint32_t*)((char*)eax_32 + 4) = *(uint32_t*)((char*)esi_1 + 4);
0054e003      }
0054e003      else
0054e003      {
0054e011          i_9 = 4;
0054e016          i_5 = 4;
0054e01a          edi->view.vertex_count_total = (vertex_count_total + 5);
0054e01a          
0054e01d          if ((vertex_count_total + 5) >= edi->view.vertex.sizeOf)
0054e026              DArray<view_vertex>::grow(&edi->view.vertex, (vertex_count_total + 0x15));
0054e026          
0054e033          ecx_5 = (view_count * 0x18);
0054e036          *(uint32_t*)(ecx_5 + edi->view.poly.data) = 4;
0054e040          *(uint32_t*)(&edi->view.poly.data->vertex_index + ecx_5) = vertex_count_total;
0054e04a          esi_1 = &edi->view.vertex.data[vertex_count_total];
0054e04d          *(uint32_t*)esi_1 = 0;
0054e054          uint32_t m_viewportHeight = RenderDevice::render_device->m_viewportHeight;
0054e060          long double x87_r7_1 = ((long double)m_viewportHeight);
0054e060          
0054e064          if (m_viewportHeight < 0)
0054e066              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0054e066          
0054e06c          *(uint32_t*)((char*)esi_1 + 4) = ((float)x87_r7_1);
0054e074          uint32_t m_viewportWidth = RenderDevice::render_device->m_viewportWidth;
0054e080          long double x87_r7_2 = ((long double)m_viewportWidth);
0054e080          
0054e084          if (m_viewportWidth < 0)
0054e086              x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
0054e086          
0054e08c          *(uint32_t*)((char*)esi_1 + 0x18) = ((float)x87_r7_2);
0054e094          uint32_t m_viewportHeight_1 = RenderDevice::render_device->m_viewportHeight;
0054e0a0          long double x87_r7_3 = ((long double)m_viewportHeight_1);
0054e0a0          
0054e0a4          if (m_viewportHeight_1 < 0)
0054e0a6              x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
0054e0a6          
0054e0ac          *(uint32_t*)((char*)esi_1 + 0x1c) = ((float)x87_r7_3);
0054e0b4          uint32_t m_viewportWidth_1 = RenderDevice::render_device->m_viewportWidth;
0054e0c0          long double x87_r7_4 = ((long double)m_viewportWidth_1);
0054e0c0          
0054e0c4          if (m_viewportWidth_1 < 0)
0054e0c6              x87_r7_4 = (x87_r7_4 + ((long double)4.2949673e+09f));
0054e0c6          
0054e0cc          *(uint32_t*)((char*)esi_1 + 0x30) = ((float)x87_r7_4);
0054e0cf          *(uint32_t*)((char*)esi_1 + 0x34) = 0;
0054e0d2          *(uint32_t*)((char*)esi_1 + 0x48) = 0;
0054e0d5          *(uint32_t*)((char*)esi_1 + 0x4c) = 0;
0054e0d8          *(uint32_t*)((char*)esi_1 + 0x60) = 0;
0054e0db          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054e0e7          long double x87_r7_5 = ((long double)RenderDevice::render_device_1->m_viewportHeight);
0054e0e7          
0054e0ef          if (RenderDevice::render_device_1->m_viewportHeight < 0)
0054e0f1              x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
0054e0f1          
0054e0f7          *(uint32_t*)((char*)esi_1 + 0x64) = ((float)x87_r7_5);
0054e003      }
0054e003      
0054e42d      int32_t eax_33 = (i_9 * 3);
0054e431      long double x87_r7_38 = ((long double)*(uint32_t*)(((char*)esi_1 + (eax_33 << 3)) - 0x18));
0054e439      float var_210_2 = ((float)x87_r7_38);
0054e43d      void* i = (((char*)esi_1 + (eax_33 << 3)) - 0x30);
0054e442      float var_20c = ((float)x87_r7_38);
0054e446      long double x87_r7_39 = ((long double)*(uint32_t*)((char*)i + 0x1c));
0054e449      float var_220_2 = ((float)x87_r7_39);
0054e449      
0054e44d      for (; i >= esi_1; i -= 0x18)
0054e44d      {
0054e450          long double x87_r6_27 = ((long double)*(uint32_t*)i);
0054e455          long double temp9_1 = ((long double)var_20c);
0054e455          (x87_r6_27 - temp9_1);
0054e459          float var_224_4 = *(uint32_t*)((char*)i + 4);
0054e45d          float eax_34;
0054e45d          eax_34 = ((((x87_r6_27 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_27, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r6_27 == temp9_1) ? 1 : 0) << 0xe) | 0x3000))));
0054e45f          bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
0054e45f          
0054e462          if (p_6)
0054e462          {
0054e46a              long double temp10_1 = ((long double)var_210_2);
0054e46a              (x87_r6_27 - temp10_1);
0054e46e              eax_34 = ((((x87_r6_27 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_27, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r6_27 == temp10_1) ? 1 : 0) << 0xe) | 0x3000))));
0054e46e              
0054e473              if ((*(uint8_t*)((char*)eax_34)[1] & 0x41) != 0)
0054e47b                  x87_r7_39 = x87_r6_27;
0054e473              else
0054e475                  var_210_2 = ((float)x87_r6_27);
0054e462          }
0054e462          else
0054e464              var_20c = ((float)x87_r6_27);
0054e464          
0054e47d          long double x87_r6_28 = ((long double)var_224_4);
0054e481          long double temp13_1 = ((long double)var_220_2);
0054e481          (x87_r6_28 - temp13_1);
0054e485          eax_34 = ((((x87_r6_28 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_28, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r6_28 == temp13_1) ? 1 : 0) << 0xe) | 0x3800))));
0054e487          bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
0054e487          
0054e48a          if (p_7)
0054e48a          {
0054e496              long double x87_r6_29 = ((long double)var_224_4);
0054e49a              (x87_r6_29 - x87_r7_39);
0054e49c              eax_34 = ((((x87_r6_29 < x87_r7_39) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_29, x87_r7_39))) ? 1 : 0) << 0xa) | ((((x87_r6_29 == x87_r7_39) ? 1 : 0) << 0xe) | 0x3800))));
0054e49c              
0054e4a1              if ((*(uint8_t*)((char*)eax_34)[1] & 0x41) == 0)
0054e4a5                  x87_r7_39 = ((long double)var_224_4);
0054e48a          }
0054e48a          else
0054e490              var_220_2 = var_224_4;
0054e44d      }
0054e44d      
0054e4b7      *(uint32_t*)(&edi->view.poly.data->xmin + ecx_5) = ((float)((long double)var_20c));
0054e4c2      *(uint32_t*)(&edi->view.poly.data->xmax + ecx_5) = ((float)((long double)var_210_2));
0054e4cd      *(uint32_t*)(&edi->view.poly.data->ymin + ecx_5) = ((float)((long double)var_220_2));
0054e4d8      *(uint32_t*)(&edi->view.poly.data->ymax + ecx_5) = ((float)x87_r7_39);
0054e4d8      
0054e4e5      if (newmethod != 1)
0054e4e5      {
0054e52f          if ((i_5 - 1) >= 0)
0054e52f          {
0054e53e              long double x87_r7_41 = (((long double)Render::Yaxis.x) * ((long double)Render::vdst));
0054e54d              void* eax_42 = ((char*)esi_1 + ((i_5 - 1) * 0x18));
0054e550              long double x87_r6_34 = (((long double)Render::Yaxis.y) * ((long double)Render::vdst));
0054e556              void* ecx_15 = &&__saved_edi[(((i_5 - 1) * 3) + 0x2b)];
0054e563              int32_t i_3 = i_5;
0054e566              long double x87_r5_17 = (((long double)Render::Yaxis.z) * ((long double)Render::vdst));
0054e62b              int32_t i_1;
0054e62b              
0054e62b              do
0054e62b              {
0054e570                  long double x87_r4_7 = ((long double)*(uint32_t*)((char*)eax_42 + 4));
0054e573                  eax_42 -= 0x18;
0054e57c                  long double x87_r4_9 = ((x87_r4_7 * ((long double)Render::yinvscale)) - ((long double)Render::ty));
0054e59a                  Render::Zaxis.z;
0054e5a9                  long double x87_r3_7 = ((((long double)*(uint32_t*)((char*)eax_42 + 0x18)) * ((long double)Render::xinvscale)) - ((long double)Render::tx));
0054e5cf                  long double x87_r2_3 = ((((long double)Render::Xaxis.x) * x87_r3_7) + x87_r7_41);
0054e5ef                  long double x87_r2_9 = (((long double)((float)(((long double)((float)(x87_r3_7 * ((long double)Render::Xaxis.y)))) + x87_r6_34))) - ((long double)((float)(((long double)Render::Zaxis.y) * x87_r4_9))));
0054e5f9                  float var_1d0_1 = ((float)(((long double)((float)(((long double)((float)(((long double)Render::Xaxis.z) * x87_r3_7))) + x87_r5_17))) - x87_r2_3));
0054e60f                  void* ebx_8 = ecx_15;
0054e611                  *(uint32_t*)ebx_8 = ((float)(x87_r3_7 - ((long double)((float)(((long double)Render::Zaxis.x) * x87_r4_9)))));
0054e61b                  *(uint32_t*)((char*)ebx_8 + 4) = ((float)x87_r2_9);
0054e61e                  x87_r5_17 = x87_r2_3;
0054e624                  ecx_15 -= 0xc;
0054e627                  i_1 = i_3;
0054e627                  i_3 -= 1;
0054e628                  *(uint32_t*)((char*)ebx_8 + 8) = var_1d0_1;
0054e62b              } while (i_1 != 1);
0054e52f          }
0054e4e5      }
0054e4e5      else if ((i_5 - 1) >= 0)
0054e4e9      {
0054e4f8          void* ebx_6 = &&__saved_edi[(((i_5 - 1) * 3) + 0x2b)];
0054e4ff          void* ebp_1 = ((char*)esi_1 + ((i_5 - 1) * 0x18));
0054e502          int32_t i_6 = i_5;
0054e526          bool cond:15_1;
0054e526          
0054e526          do
0054e526          {
0054e50f              PrimD3DRender::ScreenToViewTransform(ebx_6, *(uint32_t*)ebp_1, *(uint32_t*)((char*)ebp_1 + 4));
0054e51b              ebp_1 -= 0x18;
0054e51e              ebx_6 -= 0xc;
0054e521              cond:15_1 = i_6 != 1;
0054e522              i_6 -= 1;
0054e526          } while (cond:15_1);
0054e4e9      }
0054e4e9      
0054e64e      int32_t var_18c;
0054e647      &__saved_edi[((i_5 * 3) + 0x2b)] = var_18c;
0054e657      int32_t var_188;
0054e647      &__saved_edi[((i_5 * 3) + 0x2c)] = var_188;
0054e661      int32_t var_184;
0054e647      &__saved_edi[((i_5 * 3) + 0x2d)] = var_184;
0054e647      
0054e664      if ((i_5 - 1) >= 0)
0054e664      {
0054e66a          long double x87_r7_43 = ((long double)0.000199999995f);
0054e676          void* edx_21 = (((char*)esi_1 + ((i_5 - 1) * 0x18)) + 8);
0054e67a          void* ecx_18 = &&__saved_edi[(((i_5 - 1) * 3) + 0x2d)];
0054e681          int32_t i_4 = i_5;
0054e76b          int32_t i_2;
0054e76b          
0054e76b          do
0054e76b          {
0054e68f              float var_21c_2 = ((float)((((long double)*(uint32_t*)ecx_18) * ((long double)*(uint32_t*)((char*)ecx_18 + 8))) - (((long double)*(uint32_t*)((char*)ecx_18 - 4)) * ((long double)*(uint32_t*)((char*)ecx_18 + 0xc)))));
0054e6a0              float var_218_2 = ((float)((((long double)*(uint32_t*)((char*)ecx_18 + 0xc)) * ((long double)*(uint32_t*)((char*)ecx_18 - 8))) - (((long double)*(uint32_t*)ecx_18) * ((long double)*(uint32_t*)((char*)ecx_18 + 4)))));
0054e6b2              float var_214_2 = ((float)((((long double)*(uint32_t*)((char*)ecx_18 - 4)) * ((long double)*(uint32_t*)((char*)ecx_18 + 4))) - (((long double)*(uint32_t*)((char*)ecx_18 + 8)) * ((long double)*(uint32_t*)((char*)ecx_18 - 8)))));
0054e6ba              long double x87_r6_46 = fabsl(((long double)var_21c_2));
0054e6bc              (x87_r6_46 - x87_r7_43);
0054e6be              float* eax_46;
0054e6be              eax_46 = ((((x87_r6_46 < x87_r7_43) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_46, x87_r7_43))) ? 1 : 0) << 0xa) | ((((x87_r6_46 == x87_r7_43) ? 1 : 0) << 0xe) | 0x3800))));
0054e6c0              bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
0054e6c0              
0054e6c3              if (p_8)
0054e6c3              {
0054e701              label_54e701:
0054e701                  long double x87_r6_56 = (((long double)1f) / sqrtl((((((long double)var_214_2) * ((long double)var_214_2)) + (((long double)var_218_2) * ((long double)var_218_2))) + (((long double)var_21c_2) * ((long double)var_21c_2)))));
0054e70d                  var_21c_2 = ((float)(((long double)var_21c_2) * x87_r6_56));
0054e717                  var_218_2 = ((float)(((long double)var_218_2) * x87_r6_56));
0054e721                  var_214_2 = ((float)(((long double)var_214_2) * x87_r6_56));
0054e725                  x87_r7_43 = x87_r6_56;
0054e6c3              }
0054e6c3              else
0054e6c3              {
0054e6c9                  long double x87_r6_48 = fabsl(((long double)var_218_2));
0054e6cb                  (x87_r6_48 - x87_r7_43);
0054e6cd                  eax_46 = ((((x87_r6_48 < x87_r7_43) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_48, x87_r7_43))) ? 1 : 0) << 0xa) | ((((x87_r6_48 == x87_r7_43) ? 1 : 0) << 0xe) | 0x3800))));
0054e6cf                  bool p_9 = /* bool p_9 = unimplemented  {test ah, 0x5} */;
0054e6cf                  
0054e6d2                  if (p_9)
0054e6d2                      goto label_54e701;
0054e6d2                  
0054e6d8                  long double x87_r6_50 = fabsl(((long double)var_214_2));
0054e6da                  (x87_r6_50 - x87_r7_43);
0054e6dc                  eax_46 = ((((x87_r6_50 < x87_r7_43) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_50, x87_r7_43))) ? 1 : 0) << 0xa) | ((((x87_r6_50 == x87_r7_43) ? 1 : 0) << 0xe) | 0x3800))));
0054e6de                  bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x5} */;
0054e6de                  
0054e6e1                  if (p_10)
0054e6e1                      goto label_54e701;
0054e6c3              }
0054e6c3              
0054e735              eax_46 = edx_21;
0054e73d              ecx_18 -= 0xc;
0054e744              edx_21 -= 0x18;
0054e747              i_2 = i_4;
0054e747              i_4 -= 1;
0054e748              long double x87_r6_59 = ((((long double)Render::viewer_world_space.viewpoint.z) * ((long double)var_214_2)) + (((long double)Render::viewer_world_space.viewpoint.y) * ((long double)var_218_2)));
0054e754              *(uint32_t*)eax_46 = var_21c_2;
0054e75a              eax_46[1] = var_218_2;
0054e763              eax_46[2] = var_214_2;
0054e768              *(uint32_t*)((char*)edx_21 + 0x24) = ((float)-((x87_r6_59 + (((long double)var_21c_2) * ((long double)Render::viewer_world_space.viewpoint.x)))));
0054e76b          } while (i_2 != 1);
0054e664      }
0054e664      
0054e781      arg1->view_count += 1;
0054dfc0  }

0054e12d                                         8d 49 00                                                               .I.
0054e791                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0054e7a0  void __fastcall Render::Shutdown(class Render* this)

0054e7a0  {
0054e7a0      class Render* this_1 = this;
0054e7aa      UserPreferences::UnregisterPreference(&Render_TextureFiltering);
0054e7b4      UserPreferences::UnregisterPreference(&Render_LandscapeDetailTextures);
0054e7be      UserPreferences::UnregisterPreference(&Render_BuildingDetailTextures);
0054e7c8      UserPreferences::UnregisterPreference(&Render_MultiPassAlpha);
0054e7d2      UserPreferences::UnregisterPreference(&Render_LandscapeTextureDetail);
0054e7dc      UserPreferences::UnregisterPreference(&Render_EnvironmentTextureDetail);
0054e7e6      UserPreferences::UnregisterPreference(&Render_SceneryDrawDistance);
0054e7f0      UserPreferences::UnregisterPreference(&Render_LandscapeDrawDistance);
0054e7fa      UserPreferences::UnregisterPreference(&Render_ScreenBrightness);
0054e804      UserPreferences::UnregisterPreference(&Render_AspectRatio);
0054e80e      UserPreferences::UnregisterPreference(&Render_FieldOfView);
0054e818      UserPreferences::UnregisterPreference(&Render_AutomaticDegrades);
0054e822      UserPreferences::UnregisterPreference(&Render_GraphicsPerformance);
0054e82c      UserPreferences::UnregisterPreference(&Render_DegradeDistance);
0054e83d      PStringBase<char>::PStringBase<char>(&this_1, "SetGraphicsQuality");
0054e847      GlobalRegistry::UnregisterCommand(&this_1);
0054e850      void* __offset(Render, -0x14) esi_1 = ((char*)this_1 - 0x14);
0054e850      
0054e866      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0054e86e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0054e86e      
0054e875      SmartArray<PrefDisplayModeType,1>::Reset(&this->m_DisplayModes);
0054e87c      this->m_nDisplayAdapter = 0;
0054e883      SmartArray<PrefDisplayModeType,1>::Reset(&this->m_DisplayModes);
0054e7a0  }

0054e88c                                      90 90 90 90                                                              ....

0054e890  void Render::CheckForLostDevice()

0054e890  {
0054e890      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0054e890      
0054e8a2      if (((RenderDevice::render_device_1 != 0 && RenderDevice::render_device_1->m_bDeviceLost != 0) && RenderDevice::render_device_1->vtable->IsResetPossible() != 0))
0054e8a2      {
0054e8ad          uint8_t eax_3;
0054e8ad          int32_t ecx;
0054e8ad          eax_3 = Render::RestartRenderingSystem();
0054e8ad          
0054e8b4          if (eax_3 == 0)
0054e8b4          {
0054e8b6              int32_t var_4 = 0;
0054e8b8              int32_t var_8 = ecx;
0054e8bb              uint16_t* var_c = &data_794320;
0054e8c5              var_c = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, var_c);
0054e8c8              uint16_t* var_10 = &data_794320;
0054e8d2              var_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, var_10);
0054e8da              uint16_t eax_4;
0054e8da              class PStringBase<unsigned short> ecx_6;
0054e8da              class PStringBase<unsigned short> edx;
0054e8da              eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, &data_794320);
0054e8e4              PlatformString::DisplayString(eax_4, edx, ecx_6, 0x80, var_10);
0054e8ee              exit(1);
0054e8ee              /* no return */
0054e8b4          }
0054e8a2      }
0054e890  }

0054e8f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0054e900  uint8_t Render::CC_SetGraphicsQuality(class PStringBaseArray<char> const* arg1)

0054e900  {
0054e900      class PStringBaseArray<char>* eax_8 = arg1;
0054e900      
0054e90a      if (eax_8->m_num > 0)
0054e90a      {
0054e90e          class PSRefBufferCharData<char>* m_charbuffer = eax_8->m_data->m_charbuffer;
0054e91b          *(uint32_t*)_errno() = 0;
0054e921          int32_t eax_2 = strtoul(m_charbuffer, 0, 0);
0054e921          
0054e932          if ((eax_2 >= 1 && eax_2 <= 5))
0054e932          {
0054e935              Render::SetOverallGraphicsQuality(eax_2);
0054e93d              int32_t eax_3;
0054e93d              eax_3 = 1;
0054e940              return 1;
0054e932          }
0054e932          
0054e941          eax_2 = 0;
0054e944          return 0;
0054e90a      }
0054e90a      
0054e945      uint32_t eax_4 = Render::DetermineOverallGraphicsQuality();
0054e94c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0054e951      arg1 = PStringBase<char>::s_NullBuffer_1;
0054e959      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0054e95f      uint32_t var_8_2 = eax_4;
0054e96a      PStringBase<char>::sprintf(&arg1, "Current graphics quality level: …");
0054e974      GlobalRegistry::OutputText(&arg1);
0054e97d      void* __offset(PStringBaseArray<char>, -0x14) esi_2 = ((char*)arg1 - 0x14);
0054e97d      
0054e993      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0054e99b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0054e99b      
0054e99d      int32_t eax_7;
0054e99d      eax_7 = 1;
0054e9a0      return 1;
0054e900  }

0054e9a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0054e9b0  uint8_t __thiscall Render::Startup(class Render* this, class RenderConfig const* arg2)

0054e9b0  {
0054e9bd      this->m_Config.m_GraphicsDriver = arg2->m_GraphicsDriver;
0054e9c0      this->m_nDisplayAdapter = 0;
0054e9c7      SmartArray<PrefDisplayModeType,1>::Reset(&this->m_DisplayModes);
0054e9ce      Render::m_CacheOverallGraphicsQuality = 3;
0054e9d8      Render::SetOverallGraphicsQuality(3);
0054e9e9      void* var_4;
0054e9e9      PStringBase<char>::PStringBase<char>(&var_4, "SetGraphicsQuality <1-5>");
0054e9f7      class PStringBase<char> var_8;
0054e9f7      PStringBase<char>::PStringBase<char>(&var_8, "Sets rendering options to the pr…");
0054ea05      PStringBase<char>::PStringBase<char>(&arg2, "SetGraphicsQuality");
0054ea1e      GlobalRegistry::RegisterCommand(Render::CC_SetGraphicsQuality, &arg2, &var_8, &var_4);
0054ea2d      void* __offset(RenderConfig, -0x14) edi_2 = &arg2[-5];
0054ea2d      
0054ea3f      if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
0054ea47          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
0054ea47      
0054ea4d      int32_t* edi_4 = (var_8 - 0x14);
0054ea4d      
0054ea5c      if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
0054ea64          **(uint32_t**)edi_4(1);
0054ea64      
0054ea6a      int32_t* edi_6 = ((char*)var_4 - 0x14);
0054ea6a      
0054ea79      if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
0054ea81          **(uint32_t**)edi_6(1);
0054ea81      
0054ea8c      PStringBase<char>::PStringBase<char>(&arg2, "Texture filtering quality.  Bili…");
0054eaad      uint32_t* edi;
0054eaad      UserPreferences::RegisterPreference(&Render::m_RenderPrefs, &Render_TextureFiltering, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, 4, 0x86f294, nullptr, edi);
0054eab6      void* __offset(RenderConfig, -0x14) edi_8 = &arg2[-5];
0054eab6      
0054eac5      if ((InterlockedDecrement(((char*)edi_8 + 4)) == 0 && edi_8 != 0))
0054eacd          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_8) + -0x14)(1);
0054eacd      
0054ead8      PStringBase<char>::PStringBase<char>(&arg2, "Landscape Detail Textures");
0054eaf4      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.LandscapeDetailTextures, &Render_LandscapeDetailTextures, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, nullptr, 0, nullptr);
0054eafd      void* __offset(RenderConfig, -0x14) edi_10 = &arg2[-5];
0054eafd      
0054eb0c      if ((InterlockedDecrement(((char*)edi_10 + 4)) == 0 && edi_10 != 0))
0054eb14          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_10) + -0x14)(1);
0054eb14      
0054eb1f      PStringBase<char>::PStringBase<char>(&arg2, "Environment Detail Textures");
0054eb3b      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.EnvironmentDetailTextures, &Render_BuildingDetailTextures, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, nullptr, 0, nullptr);
0054eb44      void* __offset(RenderConfig, -0x14) edi_12 = &arg2[-5];
0054eb44      
0054eb53      if ((InterlockedDecrement(((char*)edi_12 + 4)) == 0 && edi_12 != 0))
0054eb5b          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_12) + -0x14)(1);
0054eb5b      
0054eb66      PStringBase<char>::PStringBase<char>(&arg2, "Multiple pass alpha renders all …");
0054eb82      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.MultiPassAlpha, &Render_MultiPassAlpha, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, nullptr, 0, nullptr);
0054eb8b      void* __offset(RenderConfig, -0x14) edi_14 = &arg2[-5];
0054eb8b      
0054eb9a      if ((InterlockedDecrement(((char*)edi_14 + 4)) == 0 && edi_14 != 0))
0054eba2          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_14) + -0x14)(1);
0054eba2      
0054ebad      PStringBase<char>::PStringBase<char>(&arg2, "Landscape texture detail level");
0054ebd2      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.LandscapeTextureDetail, &Render_LandscapeTextureDetail, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, 5, 0x86b210, &Render_LandscapeTextureDetail_Values);
0054ebdb      void* __offset(RenderConfig, -0x14) edi_16 = &arg2[-5];
0054ebdb      
0054ebea      if ((InterlockedDecrement(((char*)edi_16 + 4)) == 0 && edi_16 != 0))
0054ebf2          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_16) + -0x14)(1);
0054ebf2      
0054ebfd      PStringBase<char>::PStringBase<char>(&arg2, "Environment texture detail level");
0054ec22      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.EnvironmentTextureDetail, &Render_EnvironmentTextureDetail, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, 5, 0x867270, &Render_EnvironmentTextureDetail_Values);
0054ec2b      void* __offset(RenderConfig, -0x14) edi_18 = &arg2[-5];
0054ec2b      
0054ec3a      if ((InterlockedDecrement(((char*)edi_18 + 4)) == 0 && edi_18 != 0))
0054ec42          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_18) + -0x14)(1);
0054ec42      
0054ec4d      PStringBase<char>::PStringBase<char>(&arg2, "Distance to draw characters, sce…");
0054ec6e      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.SceneryDrawDistance, &Render_SceneryDrawDistance, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, 3, 0x86b108, nullptr);
0054ec77      void* __offset(RenderConfig, -0x14) edi_20 = &arg2[-5];
0054ec77      
0054ec86      if ((InterlockedDecrement(((char*)edi_20 + 4)) == 0 && edi_20 != 0))
0054ec8e          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_20) + -0x14)(1);
0054ec8e      
0054ec99      PStringBase<char>::PStringBase<char>(&arg2, "How far out to generate landscap…");
0054ecbe      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.LandscapeDrawDistance, &Render_LandscapeDrawDistance, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, 6, 0x86f2a4, &Render_LandscapeDrawDistance_Values);
0054ecc7      void* __offset(RenderConfig, -0x14) edi_22 = &arg2[-5];
0054ecc7      
0054ecd6      if ((InterlockedDecrement(((char*)edi_22 + 4)) == 0 && edi_22 != 0))
0054ecde          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_22) + -0x14)(1);
0054ecde      
0054ece9      PStringBase<char>::PStringBase<char>(&arg2, "Screen brightness adjustment");
0054ed05      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.ScreenBrightness, &Render_ScreenBrightness, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, nullptr, 0, nullptr);
0054ed0e      void* __offset(RenderConfig, -0x14) edi_24 = &arg2[-5];
0054ed0e      
0054ed1d      if ((InterlockedDecrement(((char*)edi_24 + 4)) == 0 && edi_24 != 0))
0054ed25          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_24) + -0x14)(1);
0054ed25      
0054ed30      PStringBase<char>::PStringBase<char>(&arg2, "Display aspect ratio; use 'Norma…");
0054ed51      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.AspectRatio, &Render_AspectRatio, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, 3, 0x86b164, nullptr);
0054ed5a      void* __offset(RenderConfig, -0x14) edi_26 = &arg2[-5];
0054ed5a      
0054ed69      if ((InterlockedDecrement(((char*)edi_26 + 4)) == 0 && edi_26 != 0))
0054ed71          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_26) + -0x14)(1);
0054ed71      
0054ed7c      PStringBase<char>::PStringBase<char>(&arg2, "Feild of View");
0054ed98      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.FieldOfView, &Render_FieldOfView, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, nullptr, 0, nullptr);
0054eda1      void* __offset(RenderConfig, -0x14) edi_28 = &arg2[-5];
0054eda1      
0054edb0      if ((InterlockedDecrement(((char*)edi_28 + 4)) == 0 && edi_28 != 0))
0054edb8          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_28) + -0x14)(1);
0054edb8      
0054edc3      PStringBase<char>::PStringBase<char>(&arg2, "Automatic degrades; adjustes the…");
0054eddf      UserPreferences::RegisterPreference(&Render::auto_update_deg_mul, &Render_AutomaticDegrades, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, nullptr, 0, nullptr);
0054ede8      void* __offset(RenderConfig, -0x14) edi_30 = &arg2[-5];
0054ede8      
0054edf7      if ((InterlockedDecrement(((char*)edi_30 + 4)) == 0 && edi_30 != 0))
0054edff          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_30) + -0x14)(1);
0054edff      
0054ee0a      PStringBase<char>::PStringBase<char>(&arg2, "Adaptive Degrade Bias; manually …");
0054ee26      UserPreferences::RegisterPreference(&Render::s_rUserSuppliedDegradeBias, &Render_GraphicsPerformance, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, nullptr, 0, nullptr);
0054ee2f      void* __offset(RenderConfig, -0x14) edi_32 = &arg2[-5];
0054ee2f      
0054ee3e      if ((InterlockedDecrement(((char*)edi_32 + 4)) == 0 && edi_32 != 0))
0054ee46          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_32) + -0x14)(1);
0054ee46      
0054ee51      PStringBase<char>::PStringBase<char>(&arg2, "Degrade Distance; scales the dis…");
0054ee6d      UserPreferences::RegisterPreference(&Render::s_rDegradeDistance, &Render_DegradeDistance, &arg2, Render::GRPCallback_OnRenderPreferenceChanged, nullptr, 0, nullptr);
0054ee76      void* __offset(RenderConfig, -0x14) edi_34 = &arg2[-5];
0054ee76      
0054ee85      if ((InterlockedDecrement(((char*)edi_34 + 4)) == 0 && edi_34 != 0))
0054ee8d          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_34) + -0x14)(1);
0054ee8d      
0054ee98      PStringBase<char>::PStringBase<char>(&arg2, "Prefer a specific display adapte…");
0054eeb0      UserPreferences::RegisterPreference(&Render::m_RenderPrefs.DisplayAdapter, &Render_DisplayAdapter, &arg2, nullptr, nullptr, 0, nullptr);
0054eeb9      void* __offset(RenderConfig, -0x14) edi_36 = &arg2[-5];
0054eeb9      
0054eec8      if ((InterlockedDecrement(((char*)edi_36 + 4)) == 0 && edi_36 != 0))
0054eed0          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_36) + -0x14)(1);
0054eed0      
0054eed8      if (Render::sm_WantSafeRenderSettings != 0)
0054eed8      {
0054eedf          Render::m_RenderPrefs.LandscapeTextureDetail = 2;
0054eee4          Render::m_RenderPrefs.EnvironmentTextureDetail = 2;
0054eeee          Render::m_RenderPrefs.TextureFiltering = 0;
0054eef4          Render::m_RenderPrefs.LandscapeDetailTextures = 0;
0054eefa          Render::m_RenderPrefs.EnvironmentDetailTextures = 0;
0054ef00          Render::m_RenderPrefs.MultiPassAlpha = 0;
0054ef06          Render::m_RenderPrefs.SceneryDrawDistance = 1;
0054ef0b          Render::m_RenderPrefs.LandscapeDrawDistance = 8;
0054ef15          Render::m_RenderPrefs.ScreenBrightness = 0f;
0054ef1f          Render::m_RenderPrefs.DisplayAdapter = 0;
0054ef25          Render::m_RenderPrefs.AspectRatio = 1;
0054ef2a          Render::sm_WantSafeRenderSettings = 0;
0054eed8      }
0054eed8      
0054ef35      UserPreferences::UnregisterPreference(&Render_DisplayAdapter);
0054ef3f      int32_t eax_21;
0054ef3f      eax_21 = 1;
0054ef45      return 1;
0054e9b0  }

0054ef48                          90 90 90 90 90 90 90 90                                                          ........

0054ef50  void Render::set_default_view()

0054ef50  {
0054ef60      if ((1 & (*(uint8_t*)$S273)) == 0)
0054ef60      {
0054ef74          $S273 |= 1;
0054ef7a          window.portal.data = 0;
0054ef80          window.portal.sizeOf = 0;
0054ef86          window.portal.next_available = 0;
0054ef8c          window.portal.blocksize = 0x80;
0054ef91          window.view.poly.data = 0;
0054ef97          window.view.poly.sizeOf = 0;
0054ef9d          window.view.poly.next_available = 0;
0054efa3          window.view.poly.blocksize = 0x80;
0054efa8          window.view.vertex.data = 0;
0054efae          window.view.vertex.sizeOf = 0;
0054efb4          window.view.vertex.next_available = 0;
0054efba          window.view.vertex.blocksize = 0x80;
0054efbf          window.view_timestamp = 0;
0054efc5          atexit($E274);
0054ef60      }
0054ef60      
0054efd4      window.view_count = 0;
0054efda      window.view.vertex_count_total = 0;
0054efe0      Render::copy_view(&window, nullptr, 0);
0054efeb      Render::PortalList = &window;
0054eff5      Render::set_view(&window.view, 0);
0054ef50  }

0054efff                                                                                               90                                 .

0054f000  uint8_t Render::LinkRGRCallback(uint8_t (* arg1)())

0054f000  {
0054f000      uint32_t m_num = Render::m_RGRCallbacks.m_num;
0054f006      uint8_t (** m_data)() = Render::m_RGRCallbacks.m_data;
0054f011      int32_t eax = 0;
0054f011      
0054f015      if (m_num > 0)
0054f015      {
0054f01a          while (m_data[eax] != arg1)
0054f01a          {
0054f01c              eax += 1;
0054f01c              
0054f01f              if (eax >= m_num)
0054f01f                  goto label_54f02d;
0054f01a          }
0054f015      }
0054f015      
0054f026      if ((m_num <= 0 || eax == 0xffffffff))
0054f026      {
0054f02d      label_54f02d:
0054f02d          eax = (Render::m_RGRCallbacks.m_sizeAndDeallocate & 0x7fffffff);
0054f02d          
0054f034          if (m_num < eax)
0054f034          {
0054f05d              m_data[m_num] = arg1;
0054f060              Render::m_RGRCallbacks.m_num += 1;
0054f034          }
0054f034          else if (SmartArray<unsigned long,1>::grow((&Render::m_RGRCallbacks), SmartArray<unsigned long,1>::get_new_size((&Render::m_RGRCallbacks), (eax + 1))) != 0)
0054f04f          {
0054f057              Render::m_RGRCallbacks.m_data[Render::m_RGRCallbacks.m_num] = arg1;
0054f060              Render::m_RGRCallbacks.m_num += 1;
0054f04f          }
0054f026      }
0054f026      
0054f066      eax = 1;
0054f069      return 1;
0054f000  }

0054f06a                                90 90 90 90 90 90                                                            ......

0054f070  int32_t Render::Set3DViewInternal(class Render* this @ ecx, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

0054f070  {
0054f070      Render::m_pRenderer->vtable->SetFOVInternal(Render::fov);
0054f084      Render::check_selection = 0;
0054f089      Render::check_curr_object_polys = 0;
0054f08e      Render::m_MouseSelectData.bFoundPolygon = 0;
0054f093      Render::m_MouseSelectData.bFoundSphere = 0;
0054f098      Render::set_default_view();
0054f0a2      return 1;
0054f070  }

0054f0a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0054f0b0  void __fastcall RenderDevice::ReleaseSurfaceResources(class RenderDevice* this)

0054f0b0  {
0054f0b3      class RenderSurface* m_pDepthStencilTarget = this->m_pDepthStencilTarget;
0054f0b3      
0054f0be      if (m_pDepthStencilTarget != 0)
0054f0be      {
0054f0c0          m_pDepthStencilTarget->vtable->Release();
0054f0c5          this->m_pDepthStencilTarget = nullptr;
0054f0be      }
0054f0be      
0054f0cb      class RenderSurface* m_pRenderTarget = this->m_pRenderTarget;
0054f0cb      
0054f0d3      if (m_pRenderTarget != 0)
0054f0d3      {
0054f0d5          m_pRenderTarget->vtable->Release();
0054f0da          this->m_pRenderTarget = nullptr;
0054f0d3      }
0054f0d3      
0054f0e0      class RenderSurface* m_pDepthStencilSurface = this->m_pDepthStencilSurface;
0054f0e0      
0054f0e8      if (m_pDepthStencilSurface != 0)
0054f0e8      {
0054f0ea          m_pDepthStencilSurface->vtable->Release();
0054f0ef          this->m_pDepthStencilSurface = nullptr;
0054f0e8      }
0054f0e8      
0054f0f5      class RenderSurface* m_pFrameBufferSurface = this->m_pFrameBufferSurface;
0054f0f5      
0054f0fd      if (m_pFrameBufferSurface != 0)
0054f0fd      {
0054f0ff          m_pFrameBufferSurface->vtable->Release();
0054f104          this->m_pFrameBufferSurface = nullptr;
0054f0fd      }
0054f0b0  }

0054f10d                                         90 90 90                                                               ...

0054f110  uint32_t __fastcall RenderDevice::GetDisplayWidth(class RenderDevice const* this)

0054f110  {
0054f11c      return this->m_pFrameBufferSurface->width;
0054f110  }

0054f11d                                                                                         90 90 90                               ...

0054f120  uint32_t __fastcall RenderDevice::GetDisplayHeight(class RenderDevice const* this)

0054f120  {
0054f12c      return this->m_pFrameBufferSurface->height;
0054f120  }

0054f12d                                         90 90 90                                                               ...

0054f130  class RenderSurface* RenderDevice::CreateLocalSurface(class RenderDevice const* this @ ecx)

0054f130  {
0054f135      void* eax = operator new(0x120);
0054f135      
0054f13f      if (eax != 0)
0054f13f      {
0054f143          int32_t result = RenderSurface::RenderSurface(eax);
0054f143          
0054f14a          if (result != 0)
0054f14e              return result;
0054f13f      }
0054f13f      
0054f14c      return 0;
0054f130  }

0054f14f                                               90                                                                 .

0054f150  uint32_t __thiscall RenderDevice::ComputeAspectForViewport(class RenderDevice const* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint8_t arg6)

0054f150  {
0054f15a      if (arg6 != 0)
0054f17e          return arg4;
0054f17e      
0054f1a3      this->m_DisplayAspectRatio;
0054f1af      return arg5;
0054f150  }

0054f1b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0054f1c0  void __thiscall RenderDevice::SetViewport(class RenderDevice* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint8_t arg6)

0054f1c0  {
0054f1c5      uint32_t m_RenderTargetWidth = this->m_RenderTargetWidth;
0054f1cc      uint32_t edi = arg2;
0054f1cc      
0054f1d2      if (edi >= m_RenderTargetWidth)
0054f1d4          edi = (m_RenderTargetWidth - 1);
0054f1d4      
0054f1d7      uint32_t m_RenderTargetHeight = this->m_RenderTargetHeight;
0054f1dd      uint32_t eax = arg3;
0054f1dd      
0054f1e3      if (eax >= m_RenderTargetHeight)
0054f1e5          eax = (m_RenderTargetHeight - 1);
0054f1e5      
0054f1e8      uint32_t ebx = arg4;
0054f1e8      
0054f1f1      if ((edi + ebx) > m_RenderTargetWidth)
0054f1f5          ebx = (m_RenderTargetWidth - edi);
0054f1f5      
0054f1f7      uint32_t ecx_1 = arg5;
0054f1f7      
0054f200      if ((eax + ecx_1) > m_RenderTargetHeight)
0054f204          ecx_1 = (m_RenderTargetHeight - eax);
0054f204      
0054f20e      this->m_viewportHeight = ecx_1;
0054f217      this->m_viewportX = edi;
0054f21d      this->m_viewportY = eax;
0054f223      this->m_viewportWidth = ebx;
0054f22e      this->m_ViewportAspectRatio = ((float)RenderDevice::ComputeAspectForViewport(this, edi, eax, ebx, ecx_1, arg6));
0054f1c0  }

0054f23b                                                                                   90 90 90 90 90                             .....

0054f240  uint8_t __thiscall RenderDevice::Startup(class RenderDevice* this, uint32_t const arg2, class RenderDevicePresentation const* arg3, class RenderDeviceConfig const* arg4)

0054f240  {
0054f24b      this->m_config.hFocusWindow = arg4->hFocusWindow;
0054f24e      int32_t eax;
0054f24e      eax = arg4->bUseStencilBuffer;
0054f24e      *(uint8_t*)((char*)eax)[1] = arg4->bSoftwareVertexProcessing;
0054f24e      *(uint8_t*)((char*)eax)[2] = arg4->bUsePureDevice;
0054f252      this->m_config.bUseStencilBuffer = eax;
0054f252      this->m_config.bSoftwareVertexProcessing = *(uint8_t*)((char*)eax)[1];
0054f252      this->m_config.bUsePureDevice = *(uint8_t*)((char*)eax)[2];
0054f25d      __builtin_memcpy(&this->m_presentation, arg3, 0x1c);
0054f260      eax = 1;
0054f263      return 1;
0054f240  }

0054f266                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0054f270  enum PixelFormatID const __fastcall RenderDevice::GetUISurfaceFormat(class RenderDevice const* this)

0054f270  {
0054f273      return this->m_displayInfo.pfARGBSurfaces;
0054f270  }

0054f274                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0054f280  class LIGHTINFO& __thiscall LIGHTINFO::operator=(class LIGHTINFO* this, class LIGHTINFO const& arg2)

0054f280  {
0054f288      int32_t* result = this;
0054f291      *(uint32_t*)result = arg2->type;
0054f293      Frame::operator=(&result[1], &arg2->offset);
0054f29d      result[0x11] = arg2->viewerspace_location.x;
0054f29d      result[0x12] = arg2->viewerspace_location.y;
0054f29d      result[0x13] = arg2->viewerspace_location.z;
0054f2b3      result[0x14] = arg2->color.r;
0054f2b3      result[0x15] = arg2->color.g;
0054f2b3      result[0x16] = arg2->color.b;
0054f2c7      result[0x17] = arg2->intensity;
0054f2cd      result[0x18] = arg2->falloff;
0054f2d3      result[0x19] = arg2->cone_angle;
0054f2da      return result;
0054f280  }

0054f2dd                                                                                         90 90 90                               ...

0054f2e0  class RenderLight& __thiscall RenderLight::operator=(class RenderLight* this, class RenderLight const& arg2)

0054f2e0  {
0054f2f3      __builtin_memcpy(this, arg2, 0x68);
0054f2f8      this->d3dLightIndex = arg2->d3dLightIndex;
0054f301      this->cellID = arg2->cellID;
0054f308      LIGHTINFO::operator=(&this->info, &arg2->info);
0054f315      this->distancesq = arg2->distancesq;
0054f31f      return this;
0054f2e0  }

0054f322        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0054f330  void __fastcall SmartArray<RenderLight,1>::Reset(class SmartArray<RenderLight,1>* this)

0054f330  {
0054f337      class SmartArray<RenderLight,1>* this_1 = this;
0054f339      uint32_t m_sizeAndDeallocate = this_1->m_sizeAndDeallocate;
0054f34d      class SmartArray<RenderLight,1>* this_2 = this_1;
0054f351      this_1->m_num = 0;
0054f351      
0054f354      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0054f354      {
0054f356          class RenderLight* m_data = this_1->m_data;
0054f356          
0054f35a          if (m_data != 0)
0054f360              operator delete[](((char*)m_data - 4));
0054f360          
0054f368          this_1->m_data = 0;
0054f36a          this_1->m_sizeAndDeallocate = 0;
0054f375          return;
0054f354      }
0054f354      
0054f378      if (this_1->m_data != 0)
0054f378      {
0054f37e          int32_t eax_1 = (m_sizeAndDeallocate & 0x7fffffff);
0054f37e          
0054f384          if ((eax_1 - 1) >= 0)
0054f384          {
0054f38e              int32_t ebp_2 = ((eax_1 - 1) * 0xdc);
0054f395              int32_t var_e4_1 = eax_1;
0054f395              
0054f3a7              while (true)
0054f3a7              {
0054f3a7                  int32_t var_68 = 0x3f800000;
0054f3b2                  int32_t var_64_1 = 0;
0054f3bd                  int32_t var_60_1 = 0;
0054f3c8                  int32_t var_5c_1 = 0;
0054f3d3                  int32_t var_34_1 = 0;
0054f3de                  int32_t var_30_1 = 0;
0054f3e9                  int32_t var_2c_1 = 0;
0054f3f4                  Frame::cache(&var_68);
0054f3fb                  void* ebx_2 = (this_1->m_data + ebp_2);
0054f408                  void var_dc;
0054f408                  __builtin_memcpy(ebx_2, &var_dc, 0x68);
0054f418                  int32_t var_74;
0054f418                  *(uint32_t*)((char*)ebx_2 + 0x68) = var_74;
0054f422                  void var_6c;
0054f422                  class LIGHTINFO* var_f8_1 = &var_6c;
0054f426                  int32_t var_70;
0054f426                  *(uint32_t*)((char*)ebx_2 + 0x6c) = var_70;
0054f429                  LIGHTINFO::operator=(((char*)ebx_2 + 0x70), var_f8_1);
0054f439                  ebp_2 -= 0xdc;
0054f43f                  bool cond:1_1 = var_e4_1 != 1;
0054f440                  int32_t var_4;
0054f440                  *(uint32_t*)((char*)ebx_2 + 0xd8) = var_4;
0054f446                  var_e4_1 -= 1;
0054f446                  
0054f44a                  if (!(cond:1_1))
0054f44a                      break;
0054f44a                  
0054f39b                  this_1 = this_2;
0054f3a7              }
0054f384          }
0054f378      }
0054f330  }

0054f45b                                                                                   90 90 90 90 90                             .....

0054f460  uint8_t __thiscall SmartArray<RenderLight,1>::grow(class SmartArray<RenderLight,1>* this, uint32_t arg2)

0054f460  {
0054f462      uint32_t ebp = arg2;
0054f46c      uint32_t* m_data;
0054f46c      
0054f46c      if (ebp >= this->m_num)
0054f46c      {
0054f47c          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
0054f47c          {
0054f52f              m_data = 1;
0054f532              return 1;
0054f47c          }
0054f47c          
0054f484          if (ebp == 0)
0054f484          {
0054f486              SmartArray<RenderLight,1>::Reset(this);
0054f48d              int32_t eax_1;
0054f48d              eax_1 = 1;
0054f490              return 1;
0054f484          }
0054f484          
0054f49f          m_data = operator new[](((ebp * 0xdc) + 4));
0054f49f          
0054f4a9          if (m_data != 0)
0054f4a9          {
0054f4b5              void* ebx_1 = &m_data[1];
0054f4be              *(uint32_t*)m_data = ebp;
0054f4c0              `vector constructor iterator'(ebx_1, 0xdc, ebp, RenderLight::RenderLight);
0054f4c0              
0054f4c7              if (ebx_1 != 0)
0054f4c7              {
0054f4cc                  if (this->m_data != 0)
0054f4cc                  {
0054f4ce                      uint32_t m_num = this->m_num;
0054f4ce                      
0054f4d2                      if ((m_num - 1) >= 0)
0054f4d2                      {
0054f4d7                          void* esi_2 = ((m_num - 1) * 0xdc);
0054f4de                          arg2 = m_num;
0054f4fe                          bool cond:0_1;
0054f4fe                          
0054f4fe                          do
0054f4fe                          {
0054f4ea                              RenderLight::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
0054f4f3                              esi_2 -= 0xdc;
0054f4f9                              cond:0_1 = arg2 != 1;
0054f4fa                              arg2 -= 1;
0054f4fe                          } while (cond:0_1);
0054f4d2                      }
0054f4d2                      
0054f50e                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0054f50e                      {
0054f510                          m_data = this->m_data;
0054f510                          
0054f514                          if (m_data != 0)
0054f51a                              operator delete[](&m_data[-1]);
0054f50e                      }
0054f4cc                  }
0054f4cc                  
0054f528                  this->m_data = ebx_1;
0054f52a                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
0054f52f                  m_data = 1;
0054f532                  return 1;
0054f4c7              }
0054f4a9          }
0054f46c      }
0054f46c      
0054f537      m_data = 0;
0054f53a      return 0;
0054f460  }

0054f53d                                                                                         90 90 90                               ...

0054f540  void __fastcall RenderDevice::GraphicsStatesType::GraphicsStatesType(class RenderDevice::GraphicsStatesType* this)

0054f540  {
0054f550      __builtin_memcpy(this, 0x8f7650, 0x40);
0054f55f      __builtin_memcpy(&this->WorldToViewMatrix, 0x8f7650, 0x40);
0054f571      __builtin_memcpy(&this->ViewToClipMatrix, 0x8f7650, 0x40);
0054f579      this->AmbientLight.r = RGBAColor_Black.r;
0054f579      this->AmbientLight.g = RGBAColor_Black.g;
0054f579      this->AmbientLight.b = RGBAColor_Black.b;
0054f579      this->AmbientLight.a = RGBAColor_Black.a;
0054f5a2      this->DistanceFogColor.r = RGBAColor_White.r;
0054f5a2      this->DistanceFogColor.g = RGBAColor_White.g;
0054f5a2      this->DistanceFogColor.b = RGBAColor_White.b;
0054f5a2      this->DistanceFogColor.a = RGBAColor_White.a;
0054f5c7      this->DistanceFogNear = 0f;
0054f5cd      this->DistantSpriteOpacityNear = 0f;
0054f5d3      this->OpacityFogNearDistance = 0f;
0054f5d9      __builtin_memset(&this->pMPLightSource, 0, 0x14);
0054f5e5      this->DistanceFogFar = 100f;
0054f5f4      this->DistantSpriteOpacityRange = 1f;
0054f5fa      this->OpacityFogRange = 1f;
0054f612      this->ChangedFFLightSources = 1;
0054f61f      this->FrameBufferBloomRGBAmount.r = RGBAColor_White.r;
0054f61f      this->FrameBufferBloomRGBAmount.g = RGBAColor_White.g;
0054f61f      this->FrameBufferBloomRGBAmount.b = RGBAColor_White.b;
0054f61f      this->FrameBufferBloomRGBAmount.a = RGBAColor_White.a;
0054f642      this->BSVLightOriginAndExtrusionOffset.x = 0x3f800000;
0054f648      this->BSVLightOriginAndExtrusionOffset.y = 1f;
0054f64e      this->BSVLightOriginAndExtrusionOffset.z = 1f;
0054f654      this->BSVLightOriginAndExtrusionOffset.w = 1f;
0054f65a      this->FrameBufferViewportScaleX = 1f;
0054f660      this->FrameBufferViewportScaleY = 1f;
0054f666      this->FrameBufferViewportOffsetX = 0f;
0054f66c      this->FrameBufferViewportOffsetY = 0f;
0054f67d      __builtin_memset(&this->PixelFilterTexCoords, 0, 0xf0);
0054f540  }

0054f684              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0054f690  void __fastcall RenderDevice::End(class RenderDevice* this)

0054f690  {
0054f690      class RenderDevice* this_1 = this;
0054f69e      PStringBase<char>::PStringBase<char>(&this_1, "RenderDevice.Wireframe");
0054f6a8      GlobalRegistry::UnregisterVariable(&this_1);
0054f6b1      void* __offset(RenderDevice, -0x14) esi_1 = ((char*)this_1 - 0x14);
0054f6b1      
0054f6c7      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0054f6cf          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0054f6cf      
0054f6d3      RenderDevice::ReleaseSurfaceResources(this);
0054f6d8      class TextureBasedFont* m_pDebugFont = this->m_pDebugFont;
0054f6d8      
0054f6e0      if (m_pDebugFont != 0)
0054f6e0      {
0054f6e2          uint32_t m_cRef = m_pDebugFont->m_cRef;
0054f6e2          m_pDebugFont->m_cRef -= 1;
0054f6e2          
0054f6e5          if (m_cRef == 1)
0054f6e7              m_pDebugFont->vtable->__vecDelDtor(1);
0054f6e7          
0054f6ed          this->m_pDebugFont = nullptr;
0054f6e0      }
0054f690  }

0054f6fb                                                                                   90 90 90 90 90                             .....

0054f700  int32_t* __thiscall SmartArray<RenderLight,1>::operator=(int32_t* arg1, int32_t* arg2)

0054f700  {
0054f707      int32_t* result = arg1;
0054f724      int32_t* result_1 = result;
0054f724      
0054f728      if ((result[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
0054f728      {
0054f74b      label_54f74b:
0054f74b          void* ebx_1 = *(uint32_t*)arg2;
0054f751          void* edi_1 = *(uint32_t*)result;
0054f759          void* ebp_3 = ((arg2[2] * 0xdc) + ebx_1);
0054f75d          void* var_e0_1 = edi_1;
0054f75d          
0054f761          if (ebx_1 < ebp_3)
0054f761          {
0054f767              void* edx_3 = ((char*)edi_1 + 0x78);
0054f76a              void* eax_3 = ((char*)ebx_1 + 0x78);
0054f76a              
0054f77a              while (true)
0054f77a              {
0054f77a                  __builtin_memcpy(edi_1, ebx_1, 0x68);
0054f77f                  *(uint32_t*)((char*)edx_3 - 0x10) = *(uint32_t*)((char*)eax_3 - 0x10);
0054f785                  *(uint32_t*)((char*)edx_3 - 0xc) = *(uint32_t*)((char*)eax_3 - 0xc);
0054f78b                  *(uint32_t*)((char*)edx_3 - 8) = *(uint32_t*)((char*)eax_3 - 8);
0054f796                  *(uint32_t*)((char*)edx_3 + 0x30) = *(uint32_t*)((char*)eax_3 + 0x30);
0054f79b                  *(uint32_t*)((char*)edx_3 + 0x34) = *(uint32_t*)((char*)eax_3 + 0x34);
0054f7a1                  *(uint32_t*)((char*)edx_3 + 0x38) = *(uint32_t*)((char*)eax_3 + 0x38);
0054f7a7                  *(uint32_t*)((char*)edx_3 - 4) = *(uint32_t*)((char*)eax_3 - 4);
0054f7ac                  *(uint32_t*)edx_3 = *(uint32_t*)eax_3;
0054f7b1                  *(uint32_t*)((char*)edx_3 + 4) = *(uint32_t*)((char*)eax_3 + 4);
0054f7b7                  *(uint32_t*)((char*)edx_3 + 8) = *(uint32_t*)((char*)eax_3 + 8);
0054f7bd                  *(uint32_t*)((char*)edx_3 + 0xc) = *(uint32_t*)((char*)eax_3 + 0xc);
0054f7c3                  *(uint32_t*)((char*)edx_3 + 0x10) = *(uint32_t*)((char*)eax_3 + 0x10);
0054f7c9                  *(uint32_t*)((char*)edx_3 + 0x14) = *(uint32_t*)((char*)eax_3 + 0x14);
0054f7cf                  *(uint32_t*)((char*)edx_3 + 0x18) = *(uint32_t*)((char*)eax_3 + 0x18);
0054f7d5                  *(uint32_t*)((char*)edx_3 + 0x1c) = *(uint32_t*)((char*)eax_3 + 0x1c);
0054f7db                  *(uint32_t*)((char*)edx_3 + 0x20) = *(uint32_t*)((char*)eax_3 + 0x20);
0054f7e1                  *(uint32_t*)((char*)edx_3 + 0x24) = *(uint32_t*)((char*)eax_3 + 0x24);
0054f7e7                  *(uint32_t*)((char*)edx_3 + 0x28) = *(uint32_t*)((char*)eax_3 + 0x28);
0054f7ed                  *(uint32_t*)((char*)edx_3 + 0x2c) = *(uint32_t*)((char*)eax_3 + 0x2c);
0054f7f8                  *(uint32_t*)((char*)edx_3 + 0x3c) = *(uint32_t*)((char*)eax_3 + 0x3c);
0054f7fd                  *(uint32_t*)((char*)edx_3 + 0x40) = *(uint32_t*)((char*)eax_3 + 0x40);
0054f803                  *(uint32_t*)((char*)edx_3 + 0x44) = *(uint32_t*)((char*)eax_3 + 0x44);
0054f80e                  *(uint32_t*)((char*)edx_3 + 0x48) = *(uint32_t*)((char*)eax_3 + 0x48);
0054f813                  *(uint32_t*)((char*)edx_3 + 0x4c) = *(uint32_t*)((char*)eax_3 + 0x4c);
0054f81d                  *(uint32_t*)((char*)edx_3 + 0x50) = *(uint32_t*)((char*)eax_3 + 0x50);
0054f823                  *(uint32_t*)((char*)edx_3 + 0x54) = *(uint32_t*)((char*)eax_3 + 0x54);
0054f829                  *(uint32_t*)((char*)edx_3 + 0x58) = *(uint32_t*)((char*)eax_3 + 0x58);
0054f82f                  *(uint32_t*)((char*)edx_3 + 0x5c) = *(uint32_t*)((char*)eax_3 + 0x5c);
0054f835                  *(uint32_t*)((char*)edx_3 + 0x60) = *(uint32_t*)((char*)eax_3 + 0x60);
0054f838                  ebx_1 += 0xdc;
0054f844                  eax_3 += 0xdc;
0054f849                  edx_3 += 0xdc;
0054f851                  var_e0_1 += 0xdc;
0054f851                  
0054f855                  if (ebx_1 >= ebp_3)
0054f855                      break;
0054f855                  
0054f76f                  edi_1 = var_e0_1;
0054f77a              }
0054f77a              
0054f85b              result = result_1;
0054f761          }
0054f761          
0054f866          int32_t i_1 = arg2[2];
0054f866          
0054f86c          if (i_1 < result[2])
0054f86c          {
0054f874              int32_t ebp_5 = (i_1 * 0xdc);
0054f87a              int32_t i = i_1;
0054f87a              
0054fa57              do
0054fa57              {
0054f887                  int32_t var_68 = 0x3f800000;
0054f892                  int32_t var_64_1 = 0;
0054f89d                  int32_t var_60_1 = 0;
0054f8a8                  int32_t var_5c_1 = 0;
0054f8b3                  int32_t var_34_1 = 0;
0054f8be                  int32_t var_30_1 = 0;
0054f8c9                  int32_t var_2c_1 = 0;
0054f8d4                  Frame::cache(&var_68);
0054f8db                  void* eax_5 = (*(uint32_t*)result + ebp_5);
0054f8e8                  void var_dc;
0054f8e8                  __builtin_memcpy(eax_5, &var_dc, 0x68);
0054f8f1                  int32_t var_74;
0054f8f1                  *(uint32_t*)((char*)eax_5 + 0x68) = var_74;
0054f8fb                  int32_t var_70;
0054f8fb                  *(uint32_t*)((char*)eax_5 + 0x6c) = var_70;
0054f905                  int32_t var_6c;
0054f905                  *(uint32_t*)((char*)eax_5 + 0x70) = var_6c;
0054f915                  *(uint32_t*)((char*)eax_5 + 0xa8) = var_34_1;
0054f91e                  *(uint32_t*)((char*)eax_5 + 0xac) = var_30_1;
0054f928                  *(uint32_t*)((char*)eax_5 + 0xb0) = var_2c_1;
0054f932                  *(uint32_t*)((char*)eax_5 + 0x74) = var_68;
0054f93c                  *(uint32_t*)((char*)eax_5 + 0x78) = var_64_1;
0054f946                  *(uint32_t*)((char*)eax_5 + 0x7c) = var_60_1;
0054f950                  *(uint32_t*)((char*)eax_5 + 0x80) = var_5c_1;
0054f95d                  int32_t var_58;
0054f95d                  *(uint32_t*)((char*)eax_5 + 0x84) = var_58;
0054f96a                  int32_t var_54;
0054f96a                  *(uint32_t*)((char*)eax_5 + 0x88) = var_54;
0054f977                  int32_t var_50;
0054f977                  *(uint32_t*)((char*)eax_5 + 0x8c) = var_50;
0054f984                  int32_t var_4c;
0054f984                  *(uint32_t*)((char*)eax_5 + 0x90) = var_4c;
0054f991                  int32_t var_48;
0054f991                  *(uint32_t*)((char*)eax_5 + 0x94) = var_48;
0054f99e                  int32_t var_44;
0054f99e                  *(uint32_t*)((char*)eax_5 + 0x98) = var_44;
0054f9ab                  int32_t var_40;
0054f9ab                  *(uint32_t*)((char*)eax_5 + 0x9c) = var_40;
0054f9b8                  int32_t var_3c;
0054f9b8                  *(uint32_t*)((char*)eax_5 + 0xa0) = var_3c;
0054f9c5                  int32_t var_38;
0054f9c5                  *(uint32_t*)((char*)eax_5 + 0xa4) = var_38;
0054f9d8                  int32_t var_28;
0054f9d8                  *(uint32_t*)((char*)eax_5 + 0xb4) = var_28;
0054f9e1                  int32_t var_24;
0054f9e1                  *(uint32_t*)((char*)eax_5 + 0xb8) = var_24;
0054f9eb                  int32_t var_20;
0054f9eb                  *(uint32_t*)((char*)eax_5 + 0xbc) = var_20;
0054f9fb                  int32_t var_1c;
0054f9fb                  *(uint32_t*)((char*)eax_5 + 0xc0) = var_1c;
0054fa04                  int32_t var_18;
0054fa04                  *(uint32_t*)((char*)eax_5 + 0xc4) = var_18;
0054fa0e                  int32_t var_14;
0054fa0e                  *(uint32_t*)((char*)eax_5 + 0xc8) = var_14;
0054fa18                  int32_t var_10;
0054fa18                  *(uint32_t*)((char*)eax_5 + 0xcc) = var_10;
0054fa25                  int32_t var_c;
0054fa25                  *(uint32_t*)((char*)eax_5 + 0xd0) = var_c;
0054fa32                  int32_t var_8;
0054fa32                  *(uint32_t*)((char*)eax_5 + 0xd4) = var_8;
0054fa3f                  int32_t var_4;
0054fa3f                  *(uint32_t*)((char*)eax_5 + 0xd8) = var_4;
0054fa4c                  i += 1;
0054fa4d                  ebp_5 += 0xdc;
0054fa53                  result = result_1;
0054fa57              } while (i < result_1[2]);
0054f86c          }
0054f86c          
0054fa68          result[2] = arg2[2];
0054f728      }
0054f728      else
0054f728      {
0054f72a          result[2] = 0;
0054f72a          
0054f744          if (SmartArray<RenderLight,1>::grow(result, (arg2[1] & 0x7fffffff)) != 0)
0054f744              goto label_54f74b;
0054f728      }
0054f728      
0054fa76      return result;
0054f700  }

0054fa79                                                                             90 90 90 90 90 90 90                           .......

0054fa80  class RenderDevice::GraphicsStatesType& __thiscall RenderDevice::GraphicsStatesType::operator=(RenderDevice::GraphicsStatesType* this, class RenderDevice::GraphicsStatesType const& arg2)

0054fa80  {
0054fa84      class RenderDevice::GraphicsStatesType const& ebp = arg2;
0054fa93      __builtin_memcpy(this, ebp, 0x40);
0054faa0      __builtin_memcpy(((char*)this + 0x40), ((char*)ebp + 0x40), 0x40);
0054fab3      __builtin_memcpy(((char*)this + 0x80), ((char*)ebp + 0x80), 0x40);
0054fac3      *(uint32_t*)((char*)this + 0xc0) = *(uint32_t*)((char*)ebp + 0xc0);
0054fac8      *(uint32_t*)((char*)this + 0xc4) = *(uint32_t*)((char*)ebp + 0xc4);
0054face      *(uint32_t*)((char*)this + 0xc8) = *(uint32_t*)((char*)ebp + 0xc8);
0054fad4      *(uint32_t*)((char*)this + 0xcc) = *(uint32_t*)((char*)ebp + 0xcc);
0054fae5      *(uint32_t*)((char*)this + 0xd0) = *(uint32_t*)((char*)ebp + 0xd0);
0054faea      *(uint32_t*)((char*)this + 0xd4) = *(uint32_t*)((char*)ebp + 0xd4);
0054faf0      *(uint32_t*)((char*)this + 0xd8) = *(uint32_t*)((char*)ebp + 0xd8);
0054faf6      *(uint32_t*)((char*)this + 0xdc) = *(uint32_t*)((char*)ebp + 0xdc);
0054faff      *(uint32_t*)((char*)this + 0xe0) = *(uint32_t*)((char*)ebp + 0xe0);
0054fb0b      *(uint32_t*)((char*)this + 0xe4) = *(uint32_t*)((char*)ebp + 0xe4);
0054fb17      *(uint32_t*)((char*)this + 0xe8) = *(uint32_t*)((char*)ebp + 0xe8);
0054fb23      *(uint32_t*)((char*)this + 0xec) = *(uint32_t*)((char*)ebp + 0xec);
0054fb2f      *(uint32_t*)((char*)this + 0xf0) = *(uint32_t*)((char*)ebp + 0xf0);
0054fb3b      *(uint32_t*)((char*)this + 0xf4) = *(uint32_t*)((char*)ebp + 0xf4);
0054fb4d      *(uint32_t*)((char*)this + 0xf8) = *(uint32_t*)((char*)ebp + 0xf8);
0054fb60      *(uint32_t*)((char*)this + 0xfc) = *(uint32_t*)((char*)ebp + 0xfc);
0054fb66      SmartArray<RenderLight,1>::operator=(((char*)this + 0x100), ((char*)ebp + 0x100));
0054fb71      *(uint8_t*)((char*)this + 0x10c) = *(uint8_t*)((char*)ebp + 0x10c);
0054fb85      *(uint32_t*)((char*)this + 0x110) = *(uint32_t*)((char*)ebp + 0x110);
0054fb8a      *(uint32_t*)((char*)this + 0x114) = *(uint32_t*)((char*)ebp + 0x114);
0054fb90      *(uint32_t*)((char*)this + 0x118) = *(uint32_t*)((char*)ebp + 0x118);
0054fb96      *(uint32_t*)((char*)this + 0x11c) = *(uint32_t*)((char*)ebp + 0x11c);
0054fb9b      void* eax_10 = ((char*)this + 0x120);
0054fba3      arg2 = 0xf;
0054fbd7      bool cond:0_1;
0054fbd7      
0054fbd7      do
0054fbd7      {
0054fbb0          void* edx_11 = (((char*)ebp - this) + eax_10);
0054fbb7          *(uint32_t*)eax_10 = *(uint32_t*)edx_11;
0054fbbc          *(uint32_t*)((char*)eax_10 + 4) = *(uint32_t*)((char*)edx_11 + 4);
0054fbc2          *(uint32_t*)((char*)eax_10 + 8) = *(uint32_t*)((char*)edx_11 + 8);
0054fbc8          *(uint32_t*)((char*)eax_10 + 0xc) = *(uint32_t*)((char*)edx_11 + 0xc);
0054fbcf          eax_10 += 0x10;
0054fbd2          cond:0_1 = arg2 != 1;
0054fbd3          arg2 -= 1;
0054fbd7      } while (cond:0_1);
0054fbe7      *(uint32_t*)((char*)this + 0x210) = *(uint32_t*)((char*)ebp + 0x210);
0054fbec      *(uint32_t*)((char*)this + 0x214) = *(uint32_t*)((char*)ebp + 0x214);
0054fbf2      *(uint32_t*)((char*)this + 0x218) = *(uint32_t*)((char*)ebp + 0x218);
0054fbf8      *(uint32_t*)((char*)this + 0x21c) = *(uint32_t*)((char*)ebp + 0x21c);
0054fc01      *(uint32_t*)((char*)this + 0x220) = *(uint32_t*)((char*)ebp + 0x220);
0054fc0d      *(uint32_t*)((char*)this + 0x224) = *(uint32_t*)((char*)ebp + 0x224);
0054fc1a      *(uint32_t*)((char*)this + 0x228) = *(uint32_t*)((char*)ebp + 0x228);
0054fc28      *(uint32_t*)((char*)this + 0x22c) = *(uint32_t*)((char*)ebp + 0x22c);
0054fc31      return this;
0054fa80  }

0054fbad                                         8d 49 00                                                               .I.
0054fc34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0054fc40  void __fastcall RenderDevice::Begin(class RenderDevice* this)

0054fc40  {
0054fc4e      int32_t var_270 = 0;
0054fc52      int32_t var_26c = 0x320;
0054fc5a      int32_t var_268 = 0x258;
0054fc62      char var_264 = 0;
0054fc66      int32_t var_260 = 0;
0054fc6a      int32_t var_25c = 0x20;
0054fc72      char var_258 = 0;
0054fc76      char var_257 = 0;
0054fc7a      char var_256 = 0;
0054fc8a      __builtin_memcpy(&this->m_presentation, &var_270, 0x1c);
0054fc8c      var_270 = 0;
0054fc90      int32_t var_26c_1 = 0;
0054fc94      int32_t s;
0054fc94      __builtin_memset(&s, 0, 0x26);
0054fcfc      __builtin_memcpy(&this->m_caps, &var_270, 0x30);
0054fd03      char var_237 = 0;
0054fd07      char var_236 = 1;
0054fd0c      int32_t eax = 1;
0054fd1c      this->m_config.bUseStencilBuffer = eax;
0054fd1c      this->m_config.bSoftwareVertexProcessing = *(uint8_t*)((char*)eax)[1];
0054fd1c      this->m_config.bUsePureDevice = *(uint8_t*)((char*)eax)[2];
0054fd1f      var_270 = 0;
0054fd23      *(uint8_t*)((char*)var_270)[1] = 0;
0054fd27      *(uint8_t*)((char*)var_270)[2] = 0;
0054fd2b      *(uint8_t*)((char*)var_270)[3] = 0;
0054fd2f      var_26c_1 = 0;
0054fd33      int32_t s_1;
0054fd33      __builtin_memset(&s_1, 0, 0x30);
0054fd5b      int32_t var_240 = 0;
0054fd5f      this->m_config.hFocusWindow = 0;
0054fd62      __builtin_memcpy(&this->m_displayInfo, &var_270, 0x34);
0054fd64      __builtin_memset(&this->m_viewportX, 0, 0x18);
0054fd97      this->m_DisplayAspectRatio = 1f;
0054fd9d      this->m_ViewportAspectRatio = 1f;
0054fda3      this->m_bOpenScene = 0;
0054fda9      this->m_bDeviceLost = 0;
0054fdaf      this->m_nFrameStamp = 1;
0054fdb9      this->m_pFrameBufferSurface = nullptr;
0054fdbf      this->m_pDepthStencilSurface = nullptr;
0054fdc5      this->m_pRenderTarget = nullptr;
0054fdcb      this->m_pDepthStencilTarget = nullptr;
0054fd8d      this->m_WireframeMode = 0;
0054fdd3      this->m_ReverseCulling = 0;
0054fde5      void var_230;
0054fde5      RenderDevice::GraphicsStatesType::operator=(&this->m_GState, RenderDevice::GraphicsStatesType::GraphicsStatesType(&var_230));
0054fe08      void* var_130;
0054fe08      int32_t var_12c;
0054fe08      
0054fe08      if (((var_12c & 0x80000000) == 0x80000000 && var_130 != 0))
0054fe0e          operator delete[](((char*)var_130 - 4));
0054fe0e      
0054fe16      char* var_284_2 = "Enable wireframe rendering";
0054fe1f      this->m_pDebugFont = nullptr;
0054fe25      this->m_DebugFontWidth = 0;
0054fe2b      this->m_DebugFontHeight = 0;
0054fe31      class PStringBase<char> var_23c;
0054fe31      PStringBase<char>::PStringBase<char>(&var_23c, var_284_2);
0054fe3f      class PStringBase<char> var_234;
0054fe3f      PStringBase<char>::PStringBase<char>(&var_234, "RenderDevice.Wireframe");
0054fe3f      
0054fe46      if (this != 0xffffff3c)
0054fe46      {
0054fe48          uint32_t* var_284_4 = nullptr;
0054fe49          class PStringBase<char>* var_288_1 = nullptr;
0054fe4a          uint32_t var_28c = 0;
0054fe4b          void (* var_290_1)(class PStringBase<char> const*) = nullptr;
0054fe50          class PStringBase<char>* var_294_1 = &var_23c;
0054fe55          class PStringBase<char>* var_298_1 = &var_234;
0054fe56          enum GRVDataType var_29c_1 = GRVDataType_Bool;
0054fe58          uint8_t* var_2a0 = &this->m_WireframeMode;
0054fe59          GlobalRegistry::RegisterVariableInternal(var_2a0, var_29c_1, var_298_1, var_294_1, var_290_1, var_28c, var_288_1, var_284_4);
0054fe46      }
0054fe46      
0054fe6b      int32_t* esi_2 = (var_234 - 0x14);
0054fe6b      
0054fe7a      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0054fe82          **(uint32_t**)esi_2(1);
0054fe82      
0054fe88      int32_t* esi_4 = (var_23c - 0x14);
0054fe88      
0054fe97      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0054fe9f          **(uint32_t**)esi_4(1);
0054fc40  }

0054feac                                      90 90 90 90                                                              ....

0054feb0  void __fastcall RenderDevice::Shutdown(class RenderDevice* this)

0054feb0  {
0054feb3      RenderDevice::End(this);
0054febb      /* tailcall */
0054febb      return RenderDevice::Begin(this);
0054feb0  }


0054fec0  void SoundManager::PlaySoundInternal(class SoundBufRef* arg1, int32_t arg2, int32_t arg3)

0054fec0  {
0054fed3      if ((SoundManager::s_bPlaySoundOnlyWhenActive == 0 || Device::m_bIsActiveApp != 0))
0054fed3      {
0054fed9          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0054fede          int32_t ecx_1 = *(int32_t*)((char*)Timer::cur_time + 4);
0054fef0          int32_t ebx_1 = 0;
0054ff09          int32_t esi_2;
0054ff09          
0054ff09          while (true)
0054ff09          {
0054ff09              esi_2 = ((SoundManager::curr_playing_buffer_ + ebx_1) & 0x8000000f);
0054ff09              
0054ff0f              if (esi_2 < 0)
0054ff15                  esi_2 = (((esi_2 - 1) | 0xfffffff0) + 1);
0054ff15              
0054ff1f              class SoundBuf* edi_1 = *(uint32_t*)((esi_2 << 4) + 0x86f510);
0054ff1f              
0054ff27              if (edi_1 == 0)
0054ff27                  break;
0054ff27              
0054ff2e              if (edi_1->m_pBuf != 0)
0054ff2e              {
0054ff37                  int32_t eax_5 = (SoundBuf::GetStatus(edi_1) & 1);
0054ff3a                  int32_t var_c_1 = eax_5;
0054ff3a                  
0054ff3e                  if (eax_5 != 0)
0054ff3e                  {
0054ff40                      ebx_1 += 1;
0054ff40                      
0054ff44                      if (ebx_1 < 0x10)
0054ff44                          continue;
0054ff44                      else
0054ff44                      {
0054ff4c                          int32_t ecx_3 = 0;
0054ff4c                          
0054ff53                          while (true)
0054ff53                          {
0054ff53                              esi_2 = ((SoundManager::curr_playing_buffer_ + ecx_3) & 0x8000000f);
0054ff53                              
0054ff59                              if (esi_2 < 0)
0054ff5f                                  esi_2 = (((esi_2 - 1) | 0xfffffff0) + 1);
0054ff5f                              
0054ff62                              int32_t eax_7 = (esi_2 << 4);
0054ff65                              long double x87_r7_1 = ((long double)*(uint32_t*)(eax_7 + 0x86f514));
0054ff6b                              edi_1 = *(uint32_t*)(eax_7 + 0x86f510);
0054ff71                              long double temp0_1 = ((long double)arg1->data_.priority_);
0054ff71                              (x87_r7_1 - temp0_1);
0054ff74                              eax_7 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0054ff76                              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0054ff76                              
0054ff79                              if (!(p_1))
0054ff79                                  break;
0054ff79                              
0054ff7b                              ecx_3 += 1;
0054ff7b                              
0054ff7f                              if (ecx_3 >= 0x10)
0054ff88                                  return;
0054ff53                          }
0054ff53                          
0054ff8b                          if (edi_1 == 0)
0054ff8b                              break;
0054ff8b                          
0054ff8f                          SoundBuf::Stop(edi_1);
0054ff44                      }
0054ff3e                  }
0054ff2e              }
0054ff2e              
0054ff96              if (edi_1 == 0)
0054ff96                  break;
0054ff96              
0054ff9a              SoundBuf::~SoundBuf(edi_1);
0054ffa0              operator delete(edi_1);
0054ffa5              break;
0054ff09          }
0054ff09          
0054ffaa          void* eax_8 = operator new(0x20);
0054ffb4          class SoundBuf* eax_9;
0054ffb4          
0054ffb4          if (eax_8 == 0)
0054ffc3              eax_9 = nullptr;
0054ffb4          else
0054ffbc              eax_9 = SoundBuf::SoundBuf(eax_8, arg1->sound_buf_);
0054ffbc          
0054ffcb          int32_t edx_4 = (esi_2 << 4);
0054ffce          *(uint32_t*)(edx_4 + 0x86f510) = eax_9;
0054ffd7          *(uint32_t*)(edx_4 + 0x86f514) = arg1->data_.priority_;
0054ffe2          int32_t esi_9 = ((esi_2 + 1) & 0x8000000f);
0054ffe8          *(uint32_t*)(edx_4 + 0x86f518) = Timer::cur_time_1;
0054ffee          *(uint32_t*)(edx_4 + 0x86f51c) = ecx_1;
0054ffee          
0054fff4          if (esi_9 < 0)
0054fffa              esi_9 = (((esi_9 - 1) | 0xfffffff0) + 1);
0054fffa          
00550007          SoundManager::curr_playing_buffer_ = esi_9;
0055000d          SoundBuf::Play(eax_9, arg2, arg3);
0054fed3      }
0054fec0  }

0054fef4                                                              8d a4 24 00 00 00 00 eb 03 8d 49 00                      ..$.......I.
0055001a                                                                                90 90 90 90 90 90                            ......

00550020  int32_t SoundManager::GetAttenuation(float arg1, float arg2, int32_t* arg3, int32_t arg4)

00550020  {
00550024      (((long double)arg1) - ((long double)5f));
0055002c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0055002f      long double x87_r7_1;
0055002f      
0055002f      if (p)
00550049          x87_r7_1 = ((((long double)0f) * ((long double)arg2)) / (((long double)arg1) * ((long double)arg1)));
0055002f      else
00550031          x87_r7_1 = ((long double)arg2);
00550031      
0055004b      long double temp2 = ((long double)1.0);
0055004b      (x87_r7_1 - temp2);
0055004b      
00550056      if ((*(uint8_t*)((char*)((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0055005a          x87_r7_1 = ((long double)1.0);
0055005a      
00550066      long double x87_r7_4;
00550066      
00550066      if (arg4 == 0)
00550070          x87_r7_4 = (x87_r7_1 * ((long double)SoundManager::effect_sound_volume));
00550066      else
00550068          x87_r7_4 = (x87_r7_1 * ((long double)SoundManager::ambient_sound_volume));
00550068      
00550076      long double temp3 = ((long double)0.0);
00550076      (x87_r7_4 - temp3);
0055007c      int32_t eax_1;
0055007c      eax_1 = ((((x87_r7_4 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3) ? 1 : 0) << 0xe) | 0x3800))));
0055007e      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0055007e      
00550081      if (!(p_1))
00550081      {
0055008f          *(uint32_t*)arg3 = SoundManager::VOL_MIN;
00550093          return 0;
00550081      }
00550081      
005500ac      ceil(((double)((__fyl2x(x87_r7_4, (((long double)0.69314718048553914) + ((long double)7.4406171098029793e-11))) * ((long double)0.0)) * ((long double)6.0206))));
005500b5      int32_t eax_4 = _ftol2();
005500be      *(uint32_t*)arg3 = eax_4;
005500c0      int32_t SoundManager::VOL_MIN_1 = SoundManager::VOL_MIN;
005500c0      
005500c8      if (eax_4 >= SoundManager::VOL_MIN_1)
005500d4          return 1;
005500d4      
005500ca      *(uint32_t*)arg3 = SoundManager::VOL_MIN_1;
005500ce      return 0;
00550020  }

005500d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005500e0  int32_t __convention("regparm") SoundManager::PlayProbability(float arg1)

005500e0  {
005500ef      int32_t ecx;
005500ef      long double x87_r7_1 = (((long double)rand(ecx)) * ((long double)3.05185094e-05f));
005500f5      long double temp0 = ((long double)arg1);
005500f5      (x87_r7_1 - temp0);
005500f9      int32_t eax;
005500f9      eax = ((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0))));
005500fb      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005500fb      
005500fe      if (p)
0055010a          return 0;
0055010a      
00550106      return 1;
005500e0  }

0055010b                                   90 90 90 90 90                                                             .....

00550110  void __thiscall SoundBufRef::SoundBufRef(class SoundBufRef* this, class IDClass<_tagDataID,32,0> arg2)

00550110  {
0055011b      this->m_hashKey.id = arg2;
0055011d      this->m_hashNext = nullptr;
00550124      SoundData::SoundData(&this->data_);
0055012b      this->links_ = 1;
00550132      this->buffer_num_ = 0xffffffff;
00550139      class SoundBuf* eax = operator new(0x20);
00550139      
00550143      if (eax != 0)
00550143      {
00550153          this->sound_buf_ = SoundBuf::SoundBuf(eax, arg2, 0, 1, 0);
0055015a          return;
00550143      }
00550143      
0055015f      this->sound_buf_ = nullptr;
00550110  }

00550169                             90 90 90 90 90 90 90                                                           .......

00550170  void SoundManager::PlaySoundInternal(class SoundBufRef* arg1, class Position const* arg2, float arg3, int32_t arg4)

00550170  {
00550183      if ((SoundManager::s_bPlaySoundOnlyWhenActive == 0 || Device::m_bIsActiveApp != 0))
00550183      {
00550194          float var_4 = ((float)Frame::get_heading(&SoundManager::player_position_.frame));
005501a8          float var_c_1 = ((float)Position::distance(arg2, &SoundManager::player_position_));
005501b3          Position::heading(arg2, &SoundManager::player_position_);
005501c1          int32_t esi_2 = 0;
005501c1          
005501c6          if (SoundManager::s_SoundFeatures != 1)
005501c6          {
005501d0              long double x87_r0_3 = ((long double)360.0);
005501d6              j__CIfmod();
005501db              long double temp0_1 = ((long double)180f);
005501db              (x87_r0_3 - temp0_1);
005501db              
005501e6              if ((*(uint8_t*)((char*)((((x87_r0_3 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_3, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r0_3 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005501e8                  x87_r0_3 = (x87_r0_3 - ((long double)360.0));
005501e8              
005501f7              int32_t eax_4;
005501f7              int32_t edx_1;
005501f7              edx_1 = HIGHD(((int64_t)_ftol2()));
005501f7              eax_4 = LOWD(((int64_t)_ftol2()));
005501fc              var_4 = ((eax_4 ^ edx_1) - edx_1);
00550200              long double x87_r7_2 = ((long double)var_4);
00550204              long double temp1_1 = ((long double)5.0);
00550204              (x87_r7_2 - temp1_1);
0055020a              float eax_6;
0055020a              eax_6 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0055020a              
0055020f              if ((*(uint8_t*)((char*)eax_6)[1] & 1) == 0)
0055020f              {
00550217                  long double st0_3;
00550217                  bool c2_3;
00550217                  st0_3 = __fsin((x87_r0_3 * ((long double)0.0174532924f)));
00550224                  esi_2 = _ftol2();
0055020f              }
005501c6          }
005501c6          
00550248          if (SoundManager::GetAttenuation(var_c_1, arg3, &var_4, arg4) != 0)
00550255              SoundManager::PlaySoundInternal(arg1, esi_2, var_4);
00550183      }
00550170  }

00550262        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00550270  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,SoundBufRef *,0>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,SoundBufRef *,0>* this, uint32_t arg2)

00550270  {
00550273      class SoundBufRef** m_buckets = this->m_buckets;
0055027b      this->vtable = 0x7caf60;
0055027b      
00550281      if (m_buckets != &this->m_aInplaceBuckets)
00550284          operator delete[](m_buckets);
00550284      
0055028e      this->m_buckets = nullptr;
00550291      this->m_firstInterestingBucket = nullptr;
00550294      this->m_numBuckets = 0;
00550297      this->m_numElements = 0;
00550297      
0055029f      if ((arg2 & 1) != 0)
005502a2          operator delete(this);
005502a2      
005502ad      return this;
00550270  }


005502b0  void SoundManager::ShutDown()

005502b0  {
005502bf      void* __return;
005502bf      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&SoundManager::sound_hash_, &__return);
005502c4      void* i_3;
005502c4      void* i_2 = i_3;
005502c4      
005502ca      if (i_2 != 0)
005502ca      {
005502cc          int32_t* var_8;
005502cc          int32_t* esi_1 = var_8;
005502d1          void* __return_1 = __return;
005502d1          
005502d8          while (true)
005502d8          {
005502d8              SoundBuf::Stop(*(uint32_t*)((char*)i_2 + 0x1c));
005502dd              i_2 = *(uint32_t*)((char*)i_2 + 4);
005502dd              
005502e2              if (i_2 == 0)
005502e2              {
005502fb                  void* i;
005502fb                  
005502fb                  do
005502fb                  {
005502f0                      esi_1 = &esi_1[1];
005502f0                      
005502f5                      if (esi_1 == (*(uint32_t*)((char*)__return_1 + 0x60) + (*(uint32_t*)((char*)__return_1 + 0x68) << 2)))
005502f5                          goto label_550304;
005502f5                      
005502f7                      i = *(uint32_t*)esi_1;
005502fb                  } while (i == 0);
005502fb                  
005502fd                  i_2 = i;
005502fd                  
00550301                  if (i_2 == 0)
00550301                      break;
005502e2              }
005502d8          }
005502ca      }
005502ca      
00550304  label_550304:
00550304      
0055034b      for (int32_t i_1 = 0; i_1 < 0x10; i_1 += 1)
0055034b      {
00550317          int32_t eax_4 = ((SoundManager::curr_playing_buffer_ + i_1) & 0x8000000f);
00550317          
0055031c          if (eax_4 < 0)
00550322              eax_4 = (((eax_4 - 1) | 0xfffffff0) + 1);
00550322          
00550326          class SoundBuf* esi_2 = *(uint32_t*)((eax_4 << 4) + 0x86f510);
00550326          
0055032e          if (esi_2 != 0)
0055032e          {
00550332              SoundBuf::Stop(esi_2);
00550339              SoundBuf::~SoundBuf(esi_2);
0055033f              operator delete(esi_2);
0055032e          }
0055034b      }
0055034b      
0055034d      midiCleanup();
00550352      SoundCleanup();
00550352      
00550360      if (SoundManager::s_bInittedPrefs != 0)
00550360      {
00550367          UserPreferences::UnregisterPreference(&Sound_SoundDisabled);
00550371          UserPreferences::UnregisterPreference(&Sound_SoundVolume);
0055037b          UserPreferences::UnregisterPreference(&Sound_AmbientSoundDisabled);
00550385          UserPreferences::UnregisterPreference(&Sound_AmbientSoundVolume);
0055038f          UserPreferences::UnregisterPreference(&Sound_InterfaceSoundDisabled);
00550399          UserPreferences::UnregisterPreference(&Sound_InterfaceSoundVolume);
005503a3          UserPreferences::UnregisterPreference(&Sound_SoundFeatures);
005503ad          UserPreferences::UnregisterPreference(&Sound_PlaySoundOnlyWhenActive);
00550360      }
005502b0  }

00550308                          8d a4 24 00 00 00 00 90                                                          ..$.....
005503b9                                                                             90 90 90 90 90 90 90                           .......

005503c0  void SoundManager::SetPlayerPosition(class Position const* arg1)

005503c0  {
005503ca      SoundManager::player_position_.objcell_id = arg1->objcell_id;
005503d6      Frame::operator=(&SoundManager::player_position_.frame, &arg1->frame);
005503c0  }

005503dc                                                                                      90 90 90 90                              ....

005503e0  void SoundManager::Cleanup()

005503e0  {
005503e0      /* tailcall */
005503e0      return SoundManager::ShutDown();
005503e0  }

005503e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005503f0  void __fastcall SoundManager::InitPrefs()

005503f0  {
005503f0      void* ecx;
005503f0      void* var_4 = ecx;
005503fc      PStringBase<char>::PStringBase<char>(&var_4, "Sound Volume");
00550418      uint32_t* edi;
00550418      UserPreferences::RegisterPreference(&SoundManager::effect_sound_volume, &Sound_SoundVolume, &var_4, nullptr, nullptr, 0, nullptr, edi);
00550427      int32_t* edi_2 = ((char*)var_4 - 0x14);
00550427      
00550436      if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0055043e          **(uint32_t**)edi_2(1);
0055043e      
00550449      PStringBase<char>::PStringBase<char>(&var_4, "Ambient Sound Volume");
00550465      UserPreferences::RegisterPreference(&SoundManager::ambient_sound_volume, &Sound_AmbientSoundVolume, &var_4, nullptr, nullptr, 0, nullptr);
0055046e      void* edi_4 = ((char*)var_4 - 0x14);
0055046e      
0055047d      if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
00550485          **(uint32_t**)edi_4(1);
00550485      
00550490      PStringBase<char>::PStringBase<char>(&var_4, "Interface Sound Volume");
005504ac      UserPreferences::RegisterPreference(&SoundManager::interface_sound_volume, &Sound_InterfaceSoundVolume, &var_4, nullptr, nullptr, 0, nullptr);
005504b5      void* edi_6 = ((char*)var_4 - 0x14);
005504b5      
005504c4      if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
005504cc          **(uint32_t**)edi_6(1);
005504cc      
005504d7      PStringBase<char>::PStringBase<char>(&var_4, "Sound Features");
005504f6      UserPreferences::RegisterPreference(&SoundManager::s_SoundFeatures, &Sound_SoundFeatures, &var_4, nullptr, 2, 0x86f3e8, nullptr);
005504ff      void* edi_8 = ((char*)var_4 - 0x14);
005504ff      
0055050e      if ((InterlockedDecrement(((char*)edi_8 + 4)) == 0 && edi_8 != 0))
00550516          **(uint32_t**)edi_8(1);
00550516      
00550521      PStringBase<char>::PStringBase<char>(&var_4, "Sound Disabled");
0055053d      UserPreferences::RegisterPreference(&SoundManager::effect_sounds_enabled, &Sound_SoundDisabled, &var_4, nullptr, nullptr, 0, nullptr);
00550546      void* edi_10 = ((char*)var_4 - 0x14);
00550546      
00550555      if ((InterlockedDecrement(((char*)edi_10 + 4)) == 0 && edi_10 != 0))
0055055d          **(uint32_t**)edi_10(1);
0055055d      
00550568      PStringBase<char>::PStringBase<char>(&var_4, "Ambient Sound Disabled");
00550584      UserPreferences::RegisterPreference(&SoundManager::ambient_sounds_enabled, &Sound_AmbientSoundDisabled, &var_4, nullptr, nullptr, 0, nullptr);
0055058d      void* edi_12 = ((char*)var_4 - 0x14);
0055058d      
0055059c      if ((InterlockedDecrement(((char*)edi_12 + 4)) == 0 && edi_12 != 0))
005505a4          **(uint32_t**)edi_12(1);
005505a4      
005505af      PStringBase<char>::PStringBase<char>(&var_4, "Interface Sound Disabled");
005505cb      UserPreferences::RegisterPreference(&SoundManager::interface_sounds_enabled, &Sound_InterfaceSoundDisabled, &var_4, nullptr, nullptr, 0, nullptr);
005505d4      void* edi_14 = ((char*)var_4 - 0x14);
005505d4      
005505e3      if ((InterlockedDecrement(((char*)edi_14 + 4)) == 0 && edi_14 != 0))
005505eb          **(uint32_t**)edi_14(1);
005505eb      
005505f6      PStringBase<char>::PStringBase<char>(&var_4, "Play Sound Only When Active");
00550612      UserPreferences::RegisterPreference(&SoundManager::s_bPlaySoundOnlyWhenActive, &Sound_PlaySoundOnlyWhenActive, &var_4, nullptr, nullptr, 0, nullptr);
0055061b      void* edi_16 = ((char*)var_4 - 0x14);
0055061b      
0055062a      if ((InterlockedDecrement(((char*)edi_16 + 4)) == 0 && edi_16 != 0))
00550632          **(uint32_t**)edi_16(1);
00550632      
00550635      SoundManager::s_bInittedPrefs = 1;
005503f0  }

0055063f                                                                                               90                                 .

00550640  void SoundManager::Init(struct HWND__* arg1)

00550640  {
00550649      struct HWND__* var_4 = arg1;
0055064a      SoundSetup(SoundManager::InitPrefs());
00550652      midiSetup();
00550657      int32_t eax_1 = SoundOK();
00550657      
0055065e      if (eax_1 == 0)
0055065e      {
00550660          SoundManager::effect_sounds_enabled = eax_1;
00550665          return;
0055065e      }
0055065e      
00550671      arg1 = time(0);
00550675      /* tailcall */
00550675      return srand();
00550640  }

0055067b                                                                                   90 90 90 90 90                             .....

00550680  void __convention("regparm") SoundManager::GetSound(enum SoundType arg1, class CSoundTable const* arg2, class SoundData* arg3)

00550680  {
00550680      class SoundTableData* ecx;
00550680      class SoundTableData* var_4 = ecx;
00550689      var_4 = nullptr;
00550689      
00550691      if ((arg2 != 0 && (CSoundTable::Lookup(arg2, arg1, &var_4) != 0 && var_4->num_stdatas_ > 0)))
00550691      {
005506bc          Random::RollDice(0f, 1f);
005506c1          class SoundTableData* edi_1 = var_4;
005506c5          uint32_t num_stdatas_ = edi_1->num_stdatas_;
005506e2          int32_t eax_3 = _ftol2();
005506e2          
005506eb          if (eax_3 < num_stdatas_)
005506eb          {
005506f6              void* edx_3 = &edi_1->data_[eax_3];
00550700              arg3->sound_id_.id = *(uint32_t*)edx_3;
00550705              arg3->priority_ = *(uint32_t*)((char*)edx_3 + 4);
0055070b              arg3->probability_ = *(uint32_t*)((char*)edx_3 + 8);
00550711              arg3->volume_ = *(uint32_t*)((char*)edx_3 + 0xc);
00550711              
00550717              if (arg3->sound_id_.id != 0)
0055071f                  IntrusiveHashTable<unsigned long,CLostCell *,0>::find(&SoundManager::sound_hash_, arg3);
005506eb          }
00550691      }
00550680  }

0055072e                                            90 90                                                                ..

00550730  void SoundManager::PlaySoundA(class IDClass<_tagDataID,32,0> arg1, class CPhysicsObj const* arg2)

00550730  {
00550749      if ((SoundManager::effect_sounds_enabled != 0 && (SoundManager::s_bPlaySoundOnlyWhenActive == 0 || Device::m_bIsActiveApp != 0)))
00550749      {
00550769          int32_t* eax_4 = SoundManager::sound_hash_.m_buckets[(COMBINE(0, arg1) % SoundManager::sound_hash_.m_numBuckets)];
00550769          
0055076d          if (eax_4 != 0)
0055076d          {
00550772              while (*(uint32_t*)eax_4 != arg1)
00550772              {
00550774                  eax_4 = eax_4[1];
00550774                  
00550779                  if (eax_4 == 0)
0055077c                      return;
00550772              }
00550772              
0055077f              if (eax_4 != 0)
0055078c                  SoundManager::PlaySoundInternal(eax_4, &arg2->m_position, SoundManager::effect_sound_volume, 0);
0055076d          }
00550749      }
00550730  }

00550796                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005507a0  void SoundManager::PlaySoundA(class IDClass<_tagDataID,32,0> arg1, class CPhysicsObj const* arg2, float arg3, float arg4, float arg5)

005507a0  {
005507b9      if ((SoundManager::effect_sounds_enabled != 0 && (SoundManager::s_bPlaySoundOnlyWhenActive == 0 || Device::m_bIsActiveApp != 0)))
005507b9      {
005507cf          int32_t* esi_1 = SoundManager::sound_hash_.m_buckets[(COMBINE(0, arg1) % SoundManager::sound_hash_.m_numBuckets)];
005507cf          
005507df          if (esi_1 != 0)
005507df          {
005507e3              while (*(uint32_t*)esi_1 != arg1)
005507e3              {
005507e5                  esi_1 = esi_1[1];
005507e5                  
005507ea                  if (esi_1 == 0)
005507ee                      return;
005507e3              }
005507e3              
005507f1              if ((esi_1 != 0 && SoundManager::PlayProbability(arg4) != 0))
0055080d                  SoundManager::PlaySoundInternal(esi_1, &arg2->m_position, arg5, 0);
005507df          }
005507b9      }
005507a0  }

00550818                                                                          90 90 90 90 90 90 90 90                          ........

00550820  void SoundManager::PlayAmbientSound(enum SoundType arg1, class CSoundTable const* arg2, class Position const* arg3, float arg4)

00550820  {
0055082a      if (SoundManager::ambient_sounds_enabled != 0)
0055082a      {
0055083b          arg4 = ((float)(((long double)SoundManager::ambient_sound_volume) * ((long double)arg4)));
00550848          class CSoundTable* edx_1 = arg1;
00550850          void var_10;
00550850          void* var_20_1 = &var_10;
00550851          class CSoundTable* var_24_1 = arg2;
00550852          class CSoundTable* var_28_1 = edx_1;
00550853          class SoundBufRef* eax_2;
00550853          int80_t st0_1;
00550853          st0_1 = SoundManager::GetSound(SoundData::SoundData(&var_10), edx_1, arg2);
00550853          
0055085f          if (eax_2 != 0)
0055085f          {
00550877              long double x87_r7_4 = (((long double)rand()) * ((long double)3.05185094e-05f));
0055087d              float var_8;
0055087d              long double temp0_1 = ((long double)var_8);
0055087d              (x87_r7_4 - temp0_1);
00550881              int32_t eax_4;
00550881              eax_4 = ((((x87_r7_4 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00550883              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00550883              
00550886              if (!(p_1))
00550895                  SoundManager::PlaySoundInternal(eax_2, arg3, arg4, 1);
0055085f          }
0055082a      }
00550820  }

005508a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005508b0  void SoundManager::PlayAmbientSoundFromCenter(enum SoundType arg1, class CSoundTable const* arg2, float arg3)

005508b0  {
005508ba      if (SoundManager::ambient_sounds_enabled != 0)
005508ba      {
005508cf          arg3 = ((float)(((long double)SoundManager::ambient_sound_volume) * ((long double)arg3)));
005508dc          class CSoundTable* edx_1 = arg1;
005508e4          void var_10;
005508e4          void* var_20_1 = &var_10;
005508e5          class CSoundTable* var_24_1 = arg2;
005508e6          class CSoundTable* var_28_1 = edx_1;
005508e7          class SoundBufRef* eax_2;
005508e7          int80_t st0_1;
005508e7          st0_1 = SoundManager::GetSound(SoundData::SoundData(&var_10), edx_1, arg2);
005508e7          
005508f3          if (eax_2 != 0)
005508f3          {
005508f9              float var_8;
005508f9              float var_14 = var_8;
0055090b              long double x87_r7_4 = (((long double)rand()) * ((long double)3.05185094e-05f));
00550911              long double temp0_1 = ((long double)var_14);
00550911              (x87_r7_4 - temp0_1);
00550915              int32_t eax_4;
00550915              eax_4 = ((((x87_r7_4 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp0_1) ? 1 : 0) << 0xe) | 0))));
00550917              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00550917              
0055091a              if ((!(p_1) && SoundManager::GetAttenuation(0f, arg3, &var_14, 1) != 0))
0055093e                  SoundManager::PlaySoundInternal(eax_2, 0, var_14);
005508f3          }
005508ba      }
005508b0  }

0055094b                                   90 90 90 90 90                                                             .....

00550950  void SoundManager::PlaySoundFromCenter(enum SoundType arg1, class CSoundTable const* arg2)

00550950  {
0055096c      if ((SoundManager::interface_sounds_enabled != 0 && (SoundManager::s_bPlaySoundOnlyWhenActive == 0 || Device::m_bIsActiveApp != 0)))
0055096c      {
0055097c          class CSoundTable* edx_1 = arg1;
00550984          void var_10;
00550984          void* var_1c_1 = &var_10;
00550985          class CSoundTable* var_20_1 = arg2;
00550986          class CSoundTable* var_24_1 = edx_1;
00550987          class SoundBufRef* eax_2;
00550987          int80_t st0_1;
00550987          st0_1 = SoundManager::GetSound(SoundData::SoundData(&var_10), edx_1, arg2);
00550993          int32_t var_14;
00550993          float var_8;
00550993          float var_4;
00550993          
00550993          if (((eax_2 != 0 && SoundManager::PlayProbability(var_8) != 0) && SoundManager::GetAttenuation(0f, var_4, &var_14, 0) != 0))
005509c8              SoundManager::PlaySoundInternal(eax_2, 0, var_14);
0055096c      }
00550950  }

005509d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005509e0  void __convention("regparm") SoundManager::PlaySoundFromCenter(class IDClass<_tagDataID,32,0> arg1, float arg2)

005509e0  {
005509e0      int32_t ecx;
005509e0      int32_t var_4 = ecx;
005509e0      
005509fa      if ((SoundManager::interface_sounds_enabled != 0 && (SoundManager::s_bPlaySoundOnlyWhenActive == 0 || Device::m_bIsActiveApp != 0)))
005509fa      {
00550a10          int32_t* esi_1 = SoundManager::sound_hash_.m_buckets[(COMBINE(0, arg1) % SoundManager::sound_hash_.m_numBuckets)];
00550a10          
00550a18          if (esi_1 != 0)
00550a18          {
00550a22              while (*(uint32_t*)esi_1 != arg1)
00550a22              {
00550a24                  esi_1 = esi_1[1];
00550a24                  
00550a29                  if (esi_1 == 0)
00550a2d                      return;
00550a22              }
00550a22              
00550a30              if ((esi_1 != 0 && SoundManager::GetAttenuation(0f, arg2, &var_4, 0) != 0))
00550a54                  SoundManager::PlaySoundInternal(esi_1, 0, var_4);
00550a18          }
005509fa      }
005509e0  }

00550a5f                                                                                               90                                 .

00550a60  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,SoundBufRef *,0>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,SoundBufRef *,0>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,SoundBufRef *,0>* this, uint32_t arg2)

00550a60  {
00550a6b      arg2 = arg2;
00550a6f      uint8_t edx = ((int8_t)arg2);
00550a73      this->m_buckets = nullptr;
00550a76      this->m_firstInterestingBucket = nullptr;
00550a79      this->m_numBuckets = 0;
00550a7c      this->m_numElements = 0;
00550a80      this->vtable = 0x7caf60;
00550a86      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00550a99      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00550a99      
00550aa3      if (eax == bucketSizesEnd_1)
00550aa5          eax -= 4;
00550aa5      
00550aa8      uint32_t eax_1 = *(uint32_t*)eax;
00550aad      this->m_numBuckets = eax_1;
00550aad      
00550ab0      if (eax_1 > 0x17)
00550ac6          this->m_buckets = operator new[]((eax_1 << 2));
00550ab0      else
00550ab5          this->m_buckets = &this->m_aInplaceBuckets;
00550ab5      
00550acc      class SoundBufRef** m_buckets = this->m_buckets;
00550acf      uint32_t ecx_3 = (this->m_numBuckets << 2);
00550ad5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00550ae6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00550a60  }

00550aef                                               90                                                                 .

00550af0  void SoundManager::PlaySoundA(enum SoundType arg1, class CPhysicsObj const* arg2, float arg3)

00550af0  {
00550b0c      if ((SoundManager::effect_sounds_enabled != 0 && (SoundManager::s_bPlaySoundOnlyWhenActive == 0 || Device::m_bIsActiveApp != 0)))
00550b0c      {
00550b14          void var_10;
00550b14          SoundData::SoundData(&var_10);
00550b20          class CSoundTable* sound_table = arg2->sound_table;
00550b20          
00550b25          if (sound_table != 0)
00550b25          {
00550b2f              void* var_1c_1 = &var_10;
00550b30              class CSoundTable* sound_table_1 = sound_table;
00550b31              enum SoundType var_24_1 = arg1;
00550b32              class SoundBufRef* eax_2;
00550b32              int80_t st0_1;
00550b32              st0_1 = SoundManager::GetSound(sound_table, arg1, 0x3f800000);
00550b3e              float var_8;
00550b3e              
00550b3e              if ((eax_2 != 0 && SoundManager::PlayProbability(var_8) != 0))
00550b5a                  SoundManager::PlaySoundInternal(eax_2, &arg2->m_position, arg3, 0);
00550b25          }
00550b0c      }
00550af0  }

00550b68                          90 90 90 90 90 90 90 90                                                          ........

00550b70  void SoundManager::PlaySoundA(enum SoundType arg1, class CPhysicsObj const* arg2)

00550b70  {
00550b8c      if ((SoundManager::effect_sounds_enabled != 0 && (SoundManager::s_bPlaySoundOnlyWhenActive == 0 || Device::m_bIsActiveApp != 0)))
00550b8c      {
00550b94          void var_10;
00550b94          SoundData::SoundData(&var_10);
00550ba0          class CSoundTable* sound_table = arg2->sound_table;
00550ba0          
00550ba5          if (sound_table != 0)
00550ba5          {
00550baf              void* var_1c_1 = &var_10;
00550bb0              class CSoundTable* sound_table_1 = sound_table;
00550bb1              enum SoundType var_24_1 = arg1;
00550bb2              class SoundBufRef* eax_2;
00550bb2              int80_t st0_1;
00550bb2              st0_1 = SoundManager::GetSound(sound_table, arg1, 0x3f800000);
00550bbe              float var_8;
00550bbe              float var_4;
00550bbe              
00550bbe              if ((eax_2 != 0 && SoundManager::PlayProbability(var_8) != 0))
00550bda                  SoundManager::PlaySoundInternal(eax_2, &arg2->m_position, var_4, 0);
00550ba5          }
00550b8c      }
00550b70  }

00550be8                          90 90 90 90 90 90 90 90                                                          ........

00550bf0  void SoundManager::CreateSound(class IDClass<_tagDataID,32,0> arg1)

00550bf0  {
00550c0b      for (int32_t* i = SoundManager::sound_hash_.m_buckets[(COMBINE(0, arg1) % SoundManager::sound_hash_.m_numBuckets)]; i != 0; i = i[1])
00550c0b      {
00550c12          if (*(uint32_t*)i == arg1)
00550c12          {
00550c1f              if (i == 0)
00550c1f                  break;
00550c1f              
00550c53              i[6] += 1;
00550c57              return;
00550c12          }
00550c0b      }
00550c0b      
00550c23      void* eax_3 = operator new(0x24);
00550c23      
00550c2d      if (eax_3 != 0)
00550c2d      {
00550c3d          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&SoundManager::sound_hash_, SoundBufRef::SoundBufRef(eax_3, arg1));
00550c43          return;
00550c2d      }
00550c2d      
00550c4c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&SoundManager::sound_hash_, nullptr);
00550bf0  }

00550c58                                                                          90 90 90 90 90 90 90 90                          ........

00550c60  void SoundManager::DestroySound(class IDClass<_tagDataID,32,0> arg1)

00550c60  {
00550c60      class IDClass<_tagDataID,32,0> i = arg1;
00550c73      int32_t* edx_2 = SoundManager::sound_hash_.m_buckets[(COMBINE(0, i) % SoundManager::sound_hash_.m_numBuckets)];
00550c73      
00550c78      if (edx_2 != 0)
00550c78      {
00550c82          while (*(uint32_t*)edx_2 != i)
00550c82          {
00550c84              edx_2 = edx_2[1];
00550c84              
00550c89              if (edx_2 == 0)
00550c8b                  return;
00550c82          }
00550c82          
00550c8e          if (edx_2 != 0)
00550c8e          {
00550c90              int32_t temp3_1 = edx_2[6];
00550c90              edx_2[6] -= 1;
00550c90              
00550c93              if (temp3_1 == 1)
00550c93              {
00550ca0                  struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_2 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&SoundManager::sound_hash_, &arg1);
00550ca0                  
00550ca9                  if (eax_2 != 0)
00550ca9                  {
00550cac                      class SoundBuf* esi_1 = *(int32_t*)((char*)eax_2 + 0x1c);
00550cac                      
00550cb1                      if (esi_1 != 0)
00550cb1                      {
00550cb5                          SoundBuf::~SoundBuf(esi_1);
00550cbb                          operator delete(esi_1);
00550cb1                      }
00550cb1                      
00550cc4                      operator delete(eax_2);
00550ca9                  }
00550c93              }
00550c8e          }
00550c78      }
00550c60  }

00550ccf                                               90                                                                 .

00550cd0  void __fastcall IntermitSound::ResetCount(class IntermitSound* this)

00550cd0  {
00550cd0      this->desc->play_count = 0;
00550cd8      this->sound_count = 0f;
00550cdb      this->num_dir = 0;
00550cde      this->play_chance = 0f;
00550cd0  }

00550ce2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00550cf0  void __thiscall IntermitSound::AddDir(class IntermitSound* this, enum LandDefs::Direction arg2, float arg3, float arg4)

00550cf0  {
00550cf1      uint32_t num_dir = this->num_dir;
00550cf4      int32_t edx = 0;
00550cfd      enum LandDefs::Direction* eax;
00550cfd      
00550cfd      if (num_dir > 0)
00550cfd      {
00550cff          eax = &this->sound_dir;
00550cff          
00550d05          while (arg2 != *(uint32_t*)eax)
00550d05          {
00550d0a              edx += 1;
00550d0b              eax = &eax[1];
00550d0b              
00550d10              if (edx >= this->num_dir)
00550d10                  break;
00550d05          }
00550cfd      }
00550cfd      
00550d15      if (edx == num_dir)
00550d15      {
00550d1b          this->sound_dir[edx] = arg2;
00550d1f          this->max_dist[edx] = ((float)((long double)arg4));
00550d29          this->min_dist[edx] = ((float)((long double)arg3));
00550d31          this->num_dir += 1;
00550d34          return;
00550d15      }
00550d15      
00550d37      long double x87_r7_2 = ((long double)arg3);
00550d3b      long double temp1 = ((long double)this->min_dist[edx]);
00550d3b      (x87_r7_2 - temp1);
00550d3f      eax = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
00550d41      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00550d41      
00550d44      if (!(p))
00550d4a          this->min_dist[edx] = ((float)((long double)arg3));
00550d4a      
00550d4e      long double x87_r7_4 = ((long double)arg4);
00550d52      long double temp2 = ((long double)this->max_dist[edx]);
00550d52      (x87_r7_4 - temp2);
00550d56      eax = ((((x87_r7_4 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2) ? 1 : 0) << 0xe) | 0))));
00550d56      
00550d5b      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00550d61          this->max_dist[edx] = ((float)((long double)arg4));
00550cf0  }

00550d6a                                90 90 90 90 90 90                                                            ......

00550d70  void __fastcall ConstantSound::ResetCount(class ConstantSound* this)

00550d70  {
00550d70      this->desc->play_count = 0;
00550d78      this->sound_count = 0f;
00550d70  }

00550d7c                                                                                      90 90 90 90                              ....

00550d80  float __fastcall ConstantSound::GetVolume(class ConstantSound* this)

00550d80  {
00550d83      return ((int32_t)((long double)this->current_volume));
00550d80  }

00550d84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00550d90  void __stdcall Ambient::PlaySoundA(class Ambient* this @ ecx, enum SoundType arg2, class CSoundTable const* arg3, class Position* arg4, float arg5)

00550d90  {
00550d96      if (arg4 == 0)
00550d96      {
00550da7          SoundManager::PlayAmbientSoundFromCenter(arg2, arg3, arg5);
00550daf          return;
00550d96      }
00550d96      
00550dc2      SoundManager::PlayAmbientSound(arg2, arg3, arg4, arg5);
00550d90  }

00550dcd                                         90 90 90                                                               ...

00550dd0  class AC1Legacy::Vector3* __stdcall Ambient::CalcWeight(class Ambient* this @ ecx, class AC1Legacy::Vector3 const* arg2)

00550dd0  {
00550dd4      long double x87_r7 = ((long double)arg2->z);
00550dd7      long double x87_r6 = ((long double)arg2->y);
00550dda      long double x87_r5 = ((long double)arg2->x);
00550dec      arg2 = ((float)(((x87_r5 * x87_r5) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7)));
00550df6      long double x87_r7_2 = ((long double)arg2);
00550dfa      long double temp1 = ((long double)Ambient::ambient_sound_max_dist_sq);
00550dfa      (x87_r7_2 - temp1);
00550e00      class AC1Legacy::Vector3* result;
00550e00      result = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
00550e00      
00550e05      if ((*(uint8_t*)((char*)result)[1] & 0x41) == 0)
00550e0d          return result;
00550e0d      
00550e10      long double x87_r7_4 = ((long double)arg2);
00550e14      long double temp2 = ((long double)Ambient::ambient_sound_min_dist_sq);
00550e14      (x87_r7_4 - temp2);
00550e1a      result = ((((x87_r7_4 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2) ? 1 : 0) << 0xe) | 0))));
00550e1c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00550e1c      
00550e1f      if (!(p))
00550e27          return result;
00550e27      
00550e2a      Ambient::ambient_sound_min_dist_sq;
00550e34      return result;
00550dd0  }

00550e37                                                                       90 90 90 90 90 90 90 90 90                         .........

00550e40  enum LandDefs::Direction __stdcall Ambient::CalcDir(class Ambient* this @ ecx, class AC1Legacy::Vector3 const* arg2)

00550e40  {
00550e49      long double x87_r7 = ((long double)arg2->y);
00550e4c      arg2 = arg2->x;
00550e56      float var_8 = ((float)fabsl(((long double)arg2)));
00550e5e      float var_4 = ((float)fabsl(x87_r7));
00550e6e      long double x87_r6_6 = ((x87_r7 * x87_r7) + (((long double)arg2) * ((long double)arg2)));
00550e76      long double x87_r5_3 = (((long double)Ambient::ambient_sound_min_dist_sq) * ((long double)0.5f));
00550e7c      (x87_r5_3 - x87_r6_6);
00550e7e      class AC1Legacy::Vector3* eax;
00550e7e      eax = ((((x87_r5_3 < x87_r6_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_3, x87_r6_6))) ? 1 : 0) << 0xa) | ((((x87_r5_3 == x87_r6_6) ? 1 : 0) << 0xe) | 0x3800))));
00550e7e      
00550e83      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
00550e8c          return 0;
00550e8c      
00550e8f      long double x87_r6_7 = ((long double)var_8);
00550e93      long double temp1 = ((long double)0.000199999995f);
00550e93      (x87_r6_7 - temp1);
00550e99      eax = ((((x87_r6_7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6_7 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
00550e9b      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00550e9b      
00550e9e      if (p)
00550e9e      {
00550ea8          long double x87_r6_9 = (((long double)var_4) / ((long double)var_8));
00550eac          long double temp3_1 = ((long double)2f);
00550eac          (x87_r6_9 - temp3_1);
00550eb2          eax = ((((x87_r6_9 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_9, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r6_9 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00550eb2          
00550eb7          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
00550eb7          {
00550ebd              long double x87_r6_10 = ((long double)var_4);
00550ec1              long double temp4 = ((long double)0.000199999995f);
00550ec1              (x87_r6_10 - temp4);
00550ec7              eax = ((((x87_r6_10 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp4))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp4) ? 1 : 0) << 0xe) | 0x3800))));
00550ec9              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00550ec9              
00550ecc              if (p_1)
00550ecc              {
00550ed2                  long double x87_r6_12 = (((long double)var_8) / ((long double)var_4));
00550ed6                  long double temp6_1 = ((long double)2f);
00550ed6                  (x87_r6_12 - temp6_1);
00550edc                  eax = ((((x87_r6_12 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_12, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r6_12 == temp6_1) ? 1 : 0) << 0xe) | 0x3800))));
00550edc                  
00550ee1                  if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
00550ee1                  {
00550ee3                      long double x87_r6_13 = ((long double)arg2);
00550ee7                      long double temp7 = ((long double)0f);
00550ee7                      (x87_r6_13 - temp7);
00550eed                      eax = ((((x87_r6_13 < temp7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_13, temp7))) ? 1 : 0) << 0xa) | ((((x87_r6_13 == temp7) ? 1 : 0) << 0xe) | 0x3800))));
00550eef                      long double temp8 = ((long double)0f);
00550eef                      (x87_r7 - temp8);
00550ef5                      bool cond:1 = (*(uint8_t*)((char*)eax)[1] & 1) != 0;
00550ef8                      eax = ((((x87_r7 < temp8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp8))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp8) ? 1 : 0) << 0xe) | 0))));
00550ef8                      
00550efa                      if (!(cond:1))
00550efa                      {
00550eff                          if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
00550f14                              return 8;
00550f14                          
00550f09                          return 7;
00550efa                      }
00550efa                      
00550f1a                      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
00550f2f                          return 6;
00550f2f                      
00550f24                      return 5;
00550ee1                  }
00550ecc              }
00550ecc              
00550f34              long double x87_r7_1 = ((long double)arg2);
00550f38              long double temp5 = ((long double)0f);
00550f38              (x87_r7_1 - temp5);
00550f3e              eax = ((((x87_r7_1 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp5) ? 1 : 0) << 0xe) | 0))));
00550f3e              
00550f43              if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
00550f58                  return 4;
00550f58              
00550f4d              return 3;
00550eb7          }
00550e9e      }
00550e9e      
00550f5b      long double temp2 = ((long double)0f);
00550f5b      (x87_r7 - temp2);
00550f61      eax = ((((x87_r7 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp2) ? 1 : 0) << 0xe) | 0))));
00550f61      
00550f6b      if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
00550f75          return 1;
00550f75      
00550f6d      return 2;
00550e40  }

00550f78                                                                          90 90 90 90 90 90 90 90                          ........

00550f80  int32_t __fastcall IntermitSound::CanHear(class IntermitSound* this)

00550f80  {
00550f80      long double x87_r7 = ((long double)this->play_chance);
00550f83      long double temp0 = ((long double)0f);
00550f83      (x87_r7 - temp0);
00550f83      
00550f8e      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
00550f98          return 0;
00550f98      
00550f95      return 1;
00550f80  }

00550f99                                                                             90 90 90 90 90 90 90                           .......

00550fa0  int32_t __fastcall IntermitSound::PlayNow(class IntermitSound* this)

00550fa0  {
00550fa0      class IntermitSound* this_1 = this;
00550fa1      float play_chance = this->play_chance;
00550faf      int32_t eax;
00550faf      long double st0;
00550faf      eax = Random::RollDice(0f, 1f);
00550fb4      long double temp0 = ((long double)play_chance);
00550fb4      (st0 - temp0);
00550fbb      eax = ((((st0 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0, temp0))) ? 1 : 0) << 0xa) | ((((st0 == temp0) ? 1 : 0) << 0xe) | 0))));
00550fbd      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00550fbd      
00550fc0      if (p)
00550fcc          return 0;
00550fcc      
00550fc8      return 1;
00550fa0  }

00550fcd                                         90 90 90                                                               ...

00550fd0  int32_t __fastcall ConstantSound::CanHear(class ConstantSound* this)

00550fd0  {
00550fd3      this->vtable->GetVolume();
00550fd8      long double temp0 = ((long double)Ambient::ambient_sound_min_vol);
00550fd8      long double x87_r0;
00550fd8      (x87_r0 - temp0);
00550fde      int32_t eax_1;
00550fde      eax_1 = ((((x87_r0 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0, temp0))) ? 1 : 0) << 0xa) | ((((x87_r0 == temp0) ? 1 : 0) << 0xe) | 0x800))));
00550fe0      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00550fe0      
00550fe3      if (!(p))
00550fe8          return 0;
00550fe8      
00550ff3      int32_t result;
00550ff3      result = this->desc->sound_table != 0;
00550ff7      return result;
00550fd0  }

00550ff8                                                                          90 90 90 90 90 90 90 90                          ........

00551000  void __thiscall ConstantSound::AddTo(class ConstantSound* this, float arg2, class AC1Legacy::Vector3 const* arg3, enum LandDefs::Direction arg4)

00551000  {
00551007      this->sound_count = ((float)(((long double)arg2) + ((long double)this->sound_count)));
00551000  }

0055100d                                         90 90 90                                                               ...

00551010  void __thiscall DArray<AmbientSound *>::grow_check(class DArray<AmbientSound *>* this, uint32_t arg2)

00551010  {
0055101d      if (arg2 >= this->sizeOf)
0055101d      {
0055101f          uint32_t edi_1 = (arg2 + this->blocksize);
0055102b          void* eax_2 = operator new[]((edi_1 << 2));
00551038          int32_t i = 0;
00551038          
0055103c          if (this->sizeOf > 0)
0055103c          {
0055104e              do
0055104e              {
00551045                  *(uint32_t*)((char*)eax_2 + (i << 2)) = this->data[i];
0055104b                  i += 1;
0055104e              } while (i < this->sizeOf);
0055103c          }
0055103c          
00551053          operator delete[](this->data);
0055105b          this->data = eax_2;
0055105d          this->sizeOf = edi_1;
0055101d      }
00551010  }

00551066                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00551070  void* __fastcall IntermitSound::GetVolume(class IntermitSound* this)

00551070  {
00551079      void* result = this->desc->ambient_sounds.m_data[this->ambient_sound_id];
0055107c      *(uint32_t*)((char*)result + 8);
0055107f      return result;
00551070  }


00551080  int32_t __fastcall IntermitSound::GetPlayInterval(class IntermitSound* this)

00551080  {
00551089      void* eax = this->desc->ambient_sounds.m_data[this->ambient_sound_id];
00551094      int32_t result;
00551094      int80_t st0;
00551094      result = Random::RollDice(*(uint32_t*)((char*)eax + 0x10), *(uint32_t*)((char*)eax + 0x14));
0055109c      return result;
00551080  }

0055109d                                                                                         90 90 90                               ...

005510a0  void* __fastcall ConstantSound::GetPlayInterval(class ConstantSound* this)

005510a0  {
005510a9      void* result = this->desc->ambient_sounds.m_data[this->ambient_sound_id];
005510ac      *(uint32_t*)((char*)result + 0x10);
005510af      return result;
005510a0  }


005510b0  class AmbientSound* __thiscall Ambient::GetSound(class Ambient* this, class AmbientSTBDesc* arg2, uint32_t arg3)

005510b0  {
005510b0      class Ambient* this_1 = this;
005510b2      class AmbientSTBDesc* ebx = arg2;
005510ba      uint32_t ebp = arg3;
005510c4      int32_t is_continuous = ebx->ambient_sounds.m_data[ebp]->is_continuous;
005510cb      uint32_t num_sounds_1 = this->num_sounds;
005510cf      class AmbientSTBDesc* i = nullptr;
005510d3      arg2 = nullptr;
005510d3      
005510d7      if (num_sounds_1 > 0)
005510d7      {
005510d9          class AmbientSound** data = this->sounds.data;
005510dc          arg3 = data;
005510dc          
005510f5          do
005510f5          {
005510e0              class AmbientSound* eax_1 = *(uint32_t*)data;
005510e0              
005510ea              if ((eax_1->desc == ebx && eax_1->ambient_sound_id == ebp))
005510ea              {
0055113c                  arg2 = i;
00551145                  return *(uint32_t*)(arg3 + (i << 2));
005510ea              }
005510ea              
005510ef              i = (&i->stb_id.id + 1);
005510f0              data = &data[1];
005510f5          } while (i < this->num_sounds);
005510f5          
005510f7          arg2 = i;
005510d7      }
005510d7      
00551101      DArray<AmbientSound *>::grow_check(&this->sounds, num_sounds_1);
0055110c      void* eax_4;
0055110c      
0055110c      if (is_continuous == 0)
0055110c      {
0055114d          eax_4 = operator new(0x80);
0055114d          
00551159          if (eax_4 == 0)
00551175              eax_4 = nullptr;
00551159          else
00551159          {
0055115b              *(uint32_t*)((char*)eax_4 + 4) = 0;
0055115e              *(uint32_t*)((char*)eax_4 + 8) = 0;
00551161              *(uint32_t*)eax_4 = 0x7cb0c4;
00551167              *(uint32_t*)((char*)eax_4 + 0x18) = 0;
0055116a              *(uint32_t*)((char*)eax_4 + 0x5c) = 0;
0055116d              *(uint32_t*)((char*)eax_4 + 0xc) = ebx;
00551170              *(uint32_t*)((char*)eax_4 + 0x10) = ebp;
00551159          }
0055110c      }
0055110c      else
0055110c      {
00551110          eax_4 = operator new(0x1c);
00551110          
0055111c          if (eax_4 == 0)
00551175              eax_4 = nullptr;
0055111c          else
0055111c          {
0055111e              *(uint32_t*)((char*)eax_4 + 4) = 0;
00551121              *(uint32_t*)((char*)eax_4 + 8) = 0;
00551124              *(uint32_t*)eax_4 = &ConstantSound::`vftable';
0055112a              *(uint32_t*)((char*)eax_4 + 0x18) = 0;
0055112d              *(uint32_t*)((char*)eax_4 + 0xc) = ebx;
00551130              *(uint32_t*)((char*)eax_4 + 0x10) = ebp;
0055111c          }
0055110c      }
0055110c      
00551177      uint32_t num_sounds = this->num_sounds;
0055117d      this->num_sounds = (num_sounds + 1);
005510fb      this->sounds.data[num_sounds] = eax_4;
00551193      return this->sounds.data[arg2];
005510b0  }

00551196                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005511a0  void __fastcall AmbientSTBDesc::AmbientSTBDesc(class AmbientSTBDesc* this)

005511a0  {
005511a4      __builtin_memset(this, 0, 0x1c);
005511a0  }

005511b9                                                                             90 90 90 90 90 90 90                           .......

005511c0  void __fastcall AmbientSTBDesc::~AmbientSTBDesc(class AmbientSTBDesc* this)

005511c0  {
005511c7      int32_t i = 0;
005511c7      
005511cb      if (this->ambient_sounds.m_num > 0)
005511cb      {
005511e5          do
005511e5          {
005511d7              operator delete(this->ambient_sounds.m_data[i]);
005511e2              i += 1;
005511e5          } while (i < this->ambient_sounds.m_num);
005511cb      }
005511cb      
005511eb      this->ambient_sounds.m_num = 0;
005511f2      this->ambient_sounds.m_size = 0;
005511f9      operator delete[](this->ambient_sounds.m_data);
005511fe      this->ambient_sounds.m_data = 0;
00551209      operator delete[](this->ambient_sounds.m_data);
005511c0  }

00551214                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00551220  uint32_t __thiscall AmbientSTBDesc::Pack(class AmbientSTBDesc* this, void** arg2, uint32_t* arg3)

00551220  {
00551230      if (*(uint32_t*)arg3 >= 4)
00551230      {
00551236          **(uint32_t**)arg2 = this->stb_id.id;
00551238          *(uint32_t*)arg2 += 4;
0055123d          uint32_t edi_3 = (*(uint32_t*)arg3 - 4);
00551245          *(uint32_t*)arg3 = edi_3;
00551245          
00551247          if (edi_3 >= 4)
00551247          {
0055124e              **(uint32_t**)arg2 = this->ambient_sounds.m_num;
00551250              *(uint32_t*)arg2 += 4;
00551253              *(uint32_t*)arg3 -= 4;
00551247          }
00551230      }
00551230      
00551259      int32_t i = 0;
00551259      
0055125d      if (this->ambient_sounds.m_num > 0)
0055125d      {
005512e6          do
005512e6          {
00551266              if (*(uint32_t*)arg3 >= 4)
00551266              {
00551272                  **(uint32_t**)arg2 = this->ambient_sounds.m_data[i]->stype;
00551274                  *(uint32_t*)arg2 += 4;
00551279                  uint32_t ebx_3 = (*(uint32_t*)arg3 - 4);
00551281                  *(uint32_t*)arg3 = ebx_3;
00551281                  
00551283                  if (ebx_3 >= 4)
00551283                  {
00551290                      **(uint32_t**)arg2 = ((float)((long double)this->ambient_sounds.m_data[i]->volume));
00551292                      *(uint32_t*)arg2 += 4;
00551297                      uint32_t ebx_5 = (*(uint32_t*)arg3 - 4);
0055129f                      *(uint32_t*)arg3 = ebx_5;
0055129f                      
005512a1                      if (ebx_5 >= 4)
005512a1                      {
005512ae                          **(uint32_t**)arg2 = ((float)((long double)this->ambient_sounds.m_data[i]->base_chance));
005512b0                          *(uint32_t*)arg2 += 4;
005512b3                          *(uint32_t*)arg3 -= 4;
005512a1                      }
00551283                  }
00551266              }
00551266              
005512c1              **(uint32_t**)arg2 = ((float)((long double)this->ambient_sounds.m_data[i]->min_rate));
005512c5              void* edi_21 = (*(uint32_t*)arg2 + 4);
005512c8              *(uint32_t*)arg2 = edi_21;
005512c8              
005512cd              if (*(uint32_t*)arg3 >= 4)
005512cd              {
005512d8                  *(uint32_t*)edi_21 = ((float)((long double)this->ambient_sounds.m_data[i]->max_rate));
005512da                  *(uint32_t*)arg2 += 4;
005512dd                  *(uint32_t*)arg3 -= 4;
005512cd              }
005512cd              
005512e3              i += 1;
005512e6          } while (i < this->ambient_sounds.m_num);
0055125d      }
0055125d      
005512f1      return *(uint32_t*)arg3;
00551220  }

005512f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00551300  uint32_t __fastcall AmbientSTBDesc::pack_size(class AmbientSTBDesc* this)

0055130d  {
0055130d      return ((this->ambient_sounds.m_num * 0x14) + 8);
0055130d  }

0055130e                                            90 90                                                                ..

00551310  void __thiscall IntermitSound::UpdateSound(class IntermitSound* this, float arg2)

00551310  {
00551310      long double x87_r7 = ((long double)this->sound_count);
00551313      long double temp1 = ((long double)0f);
00551313      (x87_r7 - temp1);
00551313      
0055131e      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0055131e      {
00551320          class AmbientSTBDesc* desc = this->desc;
00551323          desc->play_count += 1;
0055133c          this->play_chance = ((float)((((long double)this->desc->ambient_sounds.m_data[this->ambient_sound_id]->base_chance) / ((long double)arg2)) * ((long double)this->sound_count)));
0055131e      }
00551310  }

00551342        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00551350  int32_t __thiscall IntermitSound::GetSoundPos(class IntermitSound* this, class Position* arg2)

00551350  {
0055135a      long double x87_r7 = ((long double)this->num_dir);
0055135a      
00551360      if (this->num_dir < 0)
00551362          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
00551362      
00551368      class IntermitSound* this_1 = this;
0055136e      Random::RollDice(0f, ((float)x87_r7));
00551376      floor(0);
0055137c      int32_t eax_1 = _ftol2();
0055138a      enum LandDefs::Direction ebx = this->sound_dir[eax_1];
00551395      float var_20 = ((float)Random::RollDice(0f, 0.392699093f));
005513b8      float var_20_1 = ((float)((LandDefs::heading(ebx) + ((long double)var_20)) - (((long double)0.392699093f) * ((long double)0.5f))));
005513c0      float var_24 = ((float)((long double)this->min_dist[eax_1]));
005513c8      float var_1c = ((float)((long double)this->max_dist[eax_1]));
005513cc      long double st0_2 = Random::RollDice(0f, 1f);
005513dd      float z = arg2->frame.m_fOrigin.z;
005513ea      float z_1 = z;
005513f6      long double x87_r0_8 = ((st0_2 * ((((long double)var_1c) - ((long double)var_24)) * st0_2)) + ((long double)var_24));
005513ff      long double st0_3;
005513ff      bool c2;
005513ff      st0_3 = __fsin(((long double)var_20_1));
0055140d      long double st0_4;
0055140d      bool c2_1;
0055140d      st0_4 = __fcos(((long double)var_20_1));
005513e3      arg2->frame.m_fOrigin.x = ((float)(((long double)((float)(st0_3 * x87_r0_8))) + ((long double)arg2->frame.m_fOrigin.x)));
005513e3      arg2->frame.m_fOrigin.y = ((float)(((long double)((float)(x87_r0_8 * st0_4))) + ((long double)arg2->frame.m_fOrigin.y)));
005513e3      arg2->frame.m_fOrigin.z = z;
00551448      return 1;
00551350  }

0055144b                                   90 90 90 90 90                                                             .....

00551450  void __thiscall IntermitSound::AddTo(class IntermitSound* this, float arg2, class AC1Legacy::Vector3 const* arg3, enum LandDefs::Direction arg4)

00551450  {
00551450      class IntermitSound* this_1 = this;
00551464      float var_4 = ((float)(((long double)Ambient::ambient_sound_min_dist) * ((long double)0.5f)));
00551468      arg3->z;
0055146b      arg3->y;
0055146e      long double x87_r5 = ((long double)arg3->x);
00551495      this->sound_count = ((float)(((long double)arg2) + ((long double)this->sound_count)));
00551495      
00551498      if (arg4 != IN_VIEWER_BLOCK)
00551498      {
00551528          IntermitSound::AddDir(this, arg4, ((float)(x87_r5 - ((long double)var_4))), ((float)(((long double)var_4) + x87_r5)));
0055152f          return;
00551498      }
00551498      
005514b3      float ebx = ((float)(((long double)5f) - ((long double)1f)));
005514ba      IntermitSound::AddDir(this, NORTH_OF_VIEWER, ebx, var_4);
005514c5      IntermitSound::AddDir(this, SOUTH_OF_VIEWER, ebx, var_4);
005514d0      IntermitSound::AddDir(this, EAST_OF_VIEWER, ebx, var_4);
005514db      IntermitSound::AddDir(this, WEST_OF_VIEWER, ebx, var_4);
005514e6      IntermitSound::AddDir(this, NORTHWEST_OF_VIEWER, ebx, var_4);
005514f1      IntermitSound::AddDir(this, NORTHEAST_OF_VIEWER, ebx, var_4);
005514fc      IntermitSound::AddDir(this, SOUTHWEST_OF_VIEWER, ebx, var_4);
00551507      IntermitSound::AddDir(this, SOUTHEAST_OF_VIEWER, ebx, var_4);
00551450  }

00551532                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00551540  void __thiscall ConstantSound::UpdateSound(class ConstantSound* this, float arg2)

00551540  {
00551540      long double x87_r7 = ((long double)this->sound_count);
00551543      long double temp1 = ((long double)0f);
00551543      (x87_r7 - temp1);
00551549      int32_t eax;
00551549      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0055154b      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0055154b      
0055154e      if (!(p))
0055154e      {
00551550          this->current_volume = 0f;
00551557          return;
0055154e      }
0055154e      
0055155a      class AmbientSTBDesc* desc = this->desc;
0055155d      desc->play_count += 1;
00551576      this->current_volume = ((float)((((long double)this->desc->ambient_sounds.m_data[this->ambient_sound_id]->volume) / ((long double)arg2)) * ((long double)this->sound_count)));
00551540  }

0055157c                                                                                      90 90 90 90                              ....

00551580  void __fastcall Ambient::Destroy(class Ambient* this)

00551580  {
0055158a      int32_t i = 0;
0055158a      
0055158e      if (this->num_sounds > 0)
0055158e      {
005515b5          do
005515b5          {
00551593              struct AmbientSound::VTable** eax_2 = this->sounds.data[i];
00551593              
00551598              if (eax_2 != 0)
00551598              {
0055159b                  *(uint32_t*)eax_2 = &AmbientSound::`vftable';
005515a1                  operator delete(eax_2);
00551598              }
00551598              
005515a9              this->sounds.data[i] = 0;
005515b2              i += 1;
005515b5          } while (i < this->num_sounds);
0055158e      }
0055158e      
005515b8      this->num_sounds = 0;
005515bb      this->total_sound_count = 0f;
00551580  }

005515c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005515d0  void __thiscall Ambient::InitSounds(class Ambient* this, class Position* arg2)

005515d0  {
005515de      this->player_pos.objcell_id = arg2->objcell_id;
005515e5      Frame::operator=(&this->player_pos.frame, &arg2->frame);
005515ed      int32_t i = 0;
005515ef      bool cond:0 = this->num_sounds <= 0;
005515f1      this->total_sound_count = 0f;
005515f1      
005515f4      if (!(cond:0))
005515f4      {
00551606          do
00551606          {
005515f6              this->sounds.data[i]->vtable->ResetCount();
00551603              i += 1;
00551606          } while (i < this->num_sounds);
005515f4      }
005515d0  }

0055160d                                         90 90 90                                                               ...

00551610  void __thiscall Ambient::AddSound(class Ambient* this, class AmbientSTBDesc* arg2, class Position const* arg3)

00551610  {
0055161d      if (SoundManager::ambient_sounds_enabled != 0)
0055161d      {
0055162f          float __return;
0055162f          Position::get_offset(this, &__return, arg3);
0055164e          float var_8;
0055164e          float var_4;
0055164e          long double x87_r7_4 = (((((long double)var_4) * ((long double)var_4)) + (((long double)var_8) * ((long double)var_8))) + (((long double)__return) * ((long double)__return)));
00551650          long double temp1_1 = ((long double)Ambient::ambient_sound_max_dist_sq);
00551650          (x87_r7_4 - temp1_1);
00551650          
0055165b          if ((*(uint8_t*)((char*)((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0055165b          {
00551669              arg3 = ((float)Ambient::CalcWeight(this, &__return));
00551679              long double x87_r7_6 = ((long double)arg3);
0055167d              long double temp2_1 = ((long double)0f);
0055167d              (x87_r7_6 - temp2_1);
00551683              enum LandDefs::Direction var_10_1 = Ambient::CalcDir(this, &__return);
00551687              enum LandDefs::Direction eax_3;
00551687              eax_3 = ((((x87_r7_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00551689              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00551689              
0055168c              if (p_1)
0055168c              {
0055169b                  uint32_t i = 0;
0055169d                  this->total_sound_count = ((float)(((long double)arg3) + ((long double)this->total_sound_count)));
0055169d                  
005516a5                  if (arg2->ambient_sounds.m_num > 0)
005516a5                  {
005516d1                      do
005516d1                      {
005516b4                          Ambient::GetSound(this, arg2, i)->vtable->AddTo(arg3, &__return, var_10_1);
005516ce                          i += 1;
005516d1                      } while (i < arg2->ambient_sounds.m_num);
005516a5                  }
0055168c              }
0055165b          }
0055161d      }
00551610  }

005516dd                                                                                         90 90 90                               ...

005516e0  void __fastcall Ambient::Ambient(class Ambient* this)

005516e0  {
005516e6      this->player_pos.vtable = 0x796910;
005516ef      this->player_pos.objcell_id = 0;
005516e3      this->player_pos.frame.qw = 0x3f800000;
005516e3      this->player_pos.frame.qx = 0f;
005516e3      this->player_pos.frame.qy = 0f;
005516e3      this->player_pos.frame.qz = 0f;
005516e3      this->player_pos.frame.m_fOrigin.x = 0;
005516e3      this->player_pos.frame.m_fOrigin.y = 0f;
005516e3      this->player_pos.frame.m_fOrigin.z = 0f;
0055170a      Frame::cache(&this->player_pos.frame);
00551711      this->total_sound_count = 0f;
00551714      this->num_sounds = 0;
0055171c      this->sounds.data = operator new[](0x20);
00551724      this->sounds.sizeOf = 8;
00551727      this->sounds.next_available = 0;
0055172a      this->sounds.blocksize = 8;
00551732      this->sound_queue.vtable = 0x7c66a4;
00551739      this->sound_queue.curNumNodes = 0;
00551741      this->sound_queue.A = operator new[](0x100);
0055174c      this->sound_queue.minAllocatedNodes = 0x10;
0055174f      this->sound_queue.allocatedNodes = 0x10;
005516e0  }

00551757                                                                       90 90 90 90 90 90 90 90 90                         .........

00551760  void __fastcall Ambient::~Ambient(class Ambient* this)

00551760  {
00551763      Ambient::Destroy(this);
0055176c      this->sound_queue.vtable = 0x7c66a4;
00551773      operator delete[](this->sound_queue.A);
0055177c      operator delete[](this->sounds.data);
00551781      this->sounds.data = 0;
0055178b      this->player_pos.vtable = 0x79285c;
00551760  }

00551793                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005517a0  void __thiscall Ambient::Play(class Ambient* this, class AmbientSound* arg2)

005517a0  {
005517a3      uint32_t objcell_id = SoundManager::player_position_.objcell_id;
005517a8      int32_t __saved_ebp_1;
005517a8      int32_t __saved_ebp = __saved_ebp_1;
005517a9      int32_t __saved_esi_1;
005517a9      int32_t __saved_esi = __saved_esi_1;
005517ac      int32_t __saved_ebx = 0x81f0e8;
005517b5      int32_t var_48 = 0x796910;
005517bd      uint32_t objcell_id_1 = objcell_id;
005517c1      void var_40;
005517c1      Frame::operator=(&var_40, &SoundManager::player_position_.frame);
005517c1      
005517d3      if (arg2->vtable->CanHear() == 0)
005517d3      {
00551865          arg2->on_queue = 0;
00551871          return;
005517d3      }
005517d3      
005517e2      if (arg2->vtable->PlayNow() != 0)
005517e2      {
005517e6          int32_t __saved_ebx_3;
005517e6          int32_t __saved_ebx_1 = __saved_ebx_3;
005517e7          int64_t var_5c;
005517e7          int32_t edi;
005517e7          *(uint32_t*)((char*)var_5c)[4] = edi;
005517ec          var_5c = &var_48;
005517ef          int32_t eax_3 = arg2->vtable->GetSoundPos(var_5c);
005517f7          class AmbientSTBDesc* desc = arg2->desc;
005517fd          class CSoundTable* sound_table = desc->sound_table;
00551803          struct AmbientSound::VTable* vtable = arg2->vtable;
00551805          enum SoundType stype = desc->ambient_sounds.m_data[arg2->ambient_sound_id]->stype;
00551809          long double x87_r0;
00551809          
00551809          if (eax_3 == 0)
00551809          {
00551822              vtable->GetVolume();
0055182d              var_5c = ((float)x87_r0);
00551830              SoundManager::PlayAmbientSoundFromCenter(stype, sound_table, var_5c);
00551809          }
00551809          else
00551809          {
0055180e              var_5c = vtable->GetVolume();
0055180f              var_5c = ((float)x87_r0);
0055181b              Ambient::PlaySoundA(this, stype, sound_table, &var_48, var_5c);
00551809          }
005517e2      }
005517e2      
0055183a      arg2->vtable->GetPlayInterval();
00551841      /* unimplemented  {fadd qword [&Timer::cur_time]} */;
0055184e      double var_5c_1 = ((double)/* double var_5c_1 = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
0055184e      /* unimplemented  {fstp qword [esp], st0} */;
00551851      AC1Legacy::PQueueArray<double>::Insert(&this->sound_queue, var_5c_1, arg2);
00551856      arg2->on_queue = 1;
005517a0  }

00551874                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00551880  void __fastcall Ambient::UseTime(class Ambient* this)

00551880  {
0055188e      bool cond:0 = SoundManager::ambient_sounds_enabled == 0;
00551894      void* var_14 = nullptr;
00551894      
0055189c      if (!(cond:0))
0055189c      {
005518a6          while (this->sound_queue.curNumNodes > 0)
005518a6          {
005518a8              class AC1Legacy::PQueueArray<double>::PQueueNode* A = this->sound_queue.A;
005518a8              
005518ad              if (A == 0)
005518ad                  break;
005518ad              
005518af              long double x87_r7_1 = ((long double)A->key);
005518b1              long double temp0_1 = ((long double)Timer::cur_time);
005518b1              (x87_r7_1 - temp0_1);
005518b7              A = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
005518b7              
005518bc              if ((*(uint8_t*)((char*)A)[1] & 1) == 0)
005518bc                  break;
005518bc              
005518ca              void var_10;
005518ca              AC1Legacy::PQueueArray<double>::RemoveMin(&this->sound_queue, &var_10, &var_14);
005518d6              Ambient::Play(this, var_14);
005518a6          }
0055189c      }
00551880  }

005518e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005518f0  int32_t __thiscall AmbientSTBDesc::UnPack(class AmbientSTBDesc* this, void** arg2, uint32_t* arg3)

005518f0  {
005518f0      class AmbientSTBDesc* this_1 = this;
005518f4      uint32_t* esi = arg3;
005518fc      void** edi = arg2;
005518fc      
00551900      if (*(uint32_t*)esi >= 4)
00551900      {
00551902          void* eax_1 = *(uint32_t*)edi;
00551904          int32_t edx_1 = *(uint32_t*)eax_1;
00551909          *(uint32_t*)edi = ((char*)eax_1 + 4);
0055190b          *(uint32_t*)esi -= 4;
0055190e          this->stb_id.id = edx_1;
00551900      }
00551900      
00551913      void** ebx;
00551913      
00551913      if ((*(uint32_t*)esi < 4 || *(uint32_t*)esi < 4))
0055192b          ebx = arg2;
00551913      else
00551913      {
00551915          void* eax_3 = *(uint32_t*)edi;
00551917          ebx = *(uint32_t*)eax_3;
0055191c          *(uint32_t*)edi = ((char*)eax_3 + 4);
00551923          arg2 = ebx;
00551927          *(uint32_t*)esi -= 4;
00551913      }
00551913      
0055193c      if (AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->ambient_sounds, ebx) == 0)
00551a49          return 0;
00551a49      
00551944      arg3 = nullptr;
00551944      
0055194c      if (ebx <= 0)
00551a3f          return 1;
00551a3f      
00551959      while (true)
00551959      {
00551959          class AmbientSTBDesc** ebx_1 = operator new(0x18);
00551959          
00551963          if (*(uint32_t*)esi >= 4)
00551963          {
00551965              void* eax_10 = *(uint32_t*)edi;
00551967              class AmbientSTBDesc* this_2 = *(uint32_t*)eax_10;
0055196c              *(uint32_t*)edi = ((char*)eax_10 + 4);
00551973              this_1 = this_2;
00551977              *(uint32_t*)esi -= 4;
00551963          }
00551963          
0055197d          *(uint32_t*)ebx_1 = this_1;
0055197d          
00551982          if (*(uint32_t*)esi >= 4)
00551982          {
00551988              ebx_1[2] = **(uint32_t**)edi;
0055198b              *(uint32_t*)edi += 4;
00551990              uint32_t ecx_3 = (*(uint32_t*)esi - 4);
00551998              *(uint32_t*)esi = ecx_3;
00551998              
0055199a              if (ecx_3 >= 4)
0055199a              {
005519a0                  ebx_1[3] = **(uint32_t**)edi;
005519a3                  *(uint32_t*)edi += 4;
005519a6                  *(uint32_t*)esi -= 4;
0055199a              }
00551982          }
00551982          
005519a9          long double x87_r7_1 = ((long double)ebx_1[3]);
005519ac          long double temp1_1 = ((long double)0.0);
005519ac          (x87_r7_1 - temp1_1);
005519b2          uint32_t eax_9;
005519b2          eax_9 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005519b4          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005519b7          int32_t eax_14;
005519b7          
005519b7          if (p_1)
005519c0              eax_14 = 0;
005519b7          else
005519b9              eax_14 = 1;
005519b9          
005519c2          ebx_1[1] = eax_14;
005519c2          
005519c8          if (*(uint32_t*)esi >= 4)
005519c8          {
005519ce              ebx_1[4] = **(uint32_t**)edi;
005519d1              *(uint32_t*)edi += 4;
005519d6              uint32_t ecx_6 = (*(uint32_t*)esi - 4);
005519de              *(uint32_t*)esi = ecx_6;
005519de              
005519e0              if (ecx_6 >= 4)
005519e0              {
005519e6                  ebx_1[5] = **(uint32_t**)edi;
005519e9                  *(uint32_t*)edi += 4;
005519ec                  *(uint32_t*)esi -= 4;
005519e0              }
005519c8          }
005519c8          
005519ef          uint32_t m_size = this->ambient_sounds.m_size;
005519ef          
005519f5          if (this->ambient_sounds.m_num >= m_size)
005519f5          {
005519f9              uint32_t eax_17;
005519f9              
005519f9              if (m_size <= 0)
005519ff                  eax_17 = 8;
005519f9              else
005519fb                  eax_17 = (m_size * 2);
005519fb              
00551a0e              if (AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->ambient_sounds, eax_17) == 0)
00551a49                  return 0;
005519f5          }
005519f5          
0055192f          this->ambient_sounds.m_data[this->ambient_sounds.m_num] = ebx_1;
00551a26          bool cond:4_1 = ((char*)arg3 + 1) < arg2;
0055192f          this->ambient_sounds.m_num += 1;
00551a2b          arg3 += 1;
00551a2b          
00551a2f          if (!(cond:4_1))
00551a3f              return 1;
00551959      }
005518f0  }

00551a4c                                      90 90 90 90                                                              ....

00551a50  void __fastcall Ambient::UpdatePlayQueue(class Ambient* this)

00551a50  {
00551a5a      if (SoundManager::ambient_sounds_enabled != 0)
00551a5a      {
00551a60          int32_t i = 0;
00551a60          
00551a64          if (this->num_sounds > 0)
00551a64          {
00551a8d              do
00551a8d              {
00551a6a                  class AmbientSound* esi_1 = this->sounds.data[i];
00551a70                  esi_1->vtable->UpdateSound(this->total_sound_count);
00551a70                  
00551a7d                  if (esi_1->on_queue == 0)
00551a82                      Ambient::Play(this, esi_1);
00551a82                  
00551a8a                  i += 1;
00551a8d              } while (i < this->num_sounds);
00551a64          }
00551a5a      }
00551a50  }

00551a93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00551aa0  void __thiscall DBWave::DBWave(class DBWave* this, class IDClass<_tagDataID,32,0> arg2)

00551aa0  {
00551aa9      DBObj::DBObj(this, arg2);
00551aae      this->vtable = &PackObj::`vftable';
00551aba      this->vtable = 0x7c58e0;
00551ac0      this->vtable = &SerializeUsingPackDBObj::`vftable';
00551ac7      WaveFile::WaveFile(&this->vtable);
00551ab5      this->vtable = &DBWave::`vftable';
00551ad3      this->vtable = 0x7cb118;
00551ad9      this->vtable = &DBWave::`vftable';
00551aa0  }

00551ae6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00551af0  void* __thiscall DBWave::`vector deleting destructor'(class DBWave* this, uint32_t arg2)

00551af0  {
00551af3      /* tailcall */
00551af3      return DBWave::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00551af0  }

00551af8                                                                          cc cc cc cc cc cc cc cc                          ........

00551b00  void* __thiscall DBWave::`vector deleting destructor'(class DBWave* this, uint32_t arg2)

00551b00  {
00551b03      /* tailcall */
00551b03      return DBWave::`scalar deleting destructor'(((char*)this - 0x38), arg2);
00551b00  }

00551b08                          cc cc cc cc cc cc cc cc                                                          ........

00551b10  uint32_t __thiscall DBWave::Pack(class DBWave* this, void** arg2, uint32_t arg3)

00551b10  {
00551b19      int32_t result = ((this->m_mmckiFmt.fccType + this->m_mmckiFmt.cksize) + 8);
00551b19      
00551b21      if (arg3 >= result)
00551b21      {
00551b2e          **(uint32_t**)arg2 = this->m_mmckiFmt.fccType;
00551b32          void* esi_3 = (*(uint32_t*)arg2 + 4);
00551b35          *(uint32_t*)arg2 = esi_3;
00551b3c          *(uint32_t*)esi_3 = this->m_mmckiFmt.cksize;
00551b40          void* ecx_4 = (*(uint32_t*)arg2 + 4);
00551b43          *(uint32_t*)arg2 = ecx_4;
00551b4b          uint32_t fccType = this->m_mmckiFmt.fccType;
00551b53          int32_t esi_6;
00551b53          int32_t edi_2;
00551b53          edi_2 = __builtin_memcpy(ecx_4, *(int32_t*)((char*)this + 0xc), ((fccType >> 2) << 2));
00551b5a          __builtin_memcpy(edi_2, esi_6, (fccType & 3));
00551b61          void* esi_8 = (*(uint32_t*)arg2 + this->m_mmckiFmt.fccType);
00551b63          *(uint32_t*)arg2 = esi_8;
00551b65          uint32_t cksize = this->m_mmckiFmt.cksize;
00551b72          int32_t esi_10;
00551b72          int32_t edi_4;
00551b72          edi_4 = __builtin_memcpy(esi_8, this->m_timeStamp, ((cksize >> 2) << 2));
00551b79          __builtin_memcpy(edi_4, esi_10, (cksize & 3));
00551b83          *(uint32_t*)arg2 += this->m_mmckiFmt.cksize;
00551b21      }
00551b21      
00551b88      return result;
00551b10  }

00551b8b                                   90 90 90 90 90                                                             .....

00551b90  int32_t __thiscall DBWave::UnPack(class DBWave* this, void** arg2, uint32_t arg3)

00551b90  {
00551b98      WaveFile::ReleaseAll(&this->m_bLoaded);
00551ba6      this->m_mmckiFmt.fccType = **(uint32_t**)arg2;
00551bac      void* eax_2 = (*(uint32_t*)arg2 + 4);
00551baf      *(uint32_t*)arg2 = eax_2;
00551bb4      this->m_mmckiFmt.cksize = *(uint32_t*)eax_2;
00551bb7      *(uint32_t*)arg2 += 4;
00551bbf      void* eax_4 = operator new[](this->m_mmckiFmt.cksize);
00551bc9      this->m_timeStamp = eax_4;
00551bc9      
00551bcc      if (eax_4 != 0)
00551bcc      {
00551bd2          void* eax_5 = operator new[](this->m_mmckiFmt.fccType);
00551bdc          *(int32_t*)((char*)this + 0xc) = eax_5;
00551bdc          
00551bdf          if (eax_5 != 0)
00551bdf          {
00551bfc              uint32_t fccType = this->m_mmckiFmt.fccType;
00551c0a              int32_t esi_1;
00551c0a              int32_t edi_1;
00551c0a              edi_1 = __builtin_memcpy(eax_5, *(uint32_t*)arg2, ((fccType >> 2) << 2));
00551c11              __builtin_memcpy(edi_1, esi_1, (fccType & 3));
00551c19              void* edx_3 = (*(uint32_t*)arg2 + this->m_mmckiFmt.fccType);
00551c1b              *(uint32_t*)arg2 = edx_3;
00551c1e              uint32_t cksize = this->m_mmckiFmt.cksize;
00551c2b              int32_t esi_3;
00551c2b              int32_t edi_3;
00551c2b              edi_3 = __builtin_memcpy(this->m_timeStamp, edx_3, ((cksize >> 2) << 2));
00551c32              __builtin_memcpy(edi_3, esi_3, (cksize & 3));
00551c3e              *(uint32_t*)arg2 += this->m_mmckiFmt.cksize;
00551c48              return 1;
00551bdf          }
00551bdf          
00551be5          operator delete[](this->m_timeStamp);
00551bed          this->m_timeStamp = 0f;
00551bcc      }
00551bcc      
00551bf9      return 0;
00551b90  }

00551c4b                                   90 90 90 90 90                                                             .....

00551c50  class DBObj* DBWave::Allocate(class DBWave const* this @ ecx)

00551c50  {
00551c50      /* tailcall */
00551c50      return DBWave::Allocator();
00551c50  }

00551c55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00551c60  void* __thiscall DBWave::`scalar deleting destructor'(class DBWave* this, uint32_t arg2)

00551c60  {
00551c66      this->vtable = 0x7cb118;
00551c6c      this->vtable = &DBWave::`vftable';
00551c63      this->vtable = &DBWave::`vftable';
00551c79      WaveFile::~WaveFile(&this->vtable);
00551c80      this->vtable = &PackObj::`vftable';
00551c87      DBObj::~DBObj(this);
00551c87      
00551c91      if ((arg2 & 1) != 0)
00551c94          operator delete(this);
00551c94      
00551c9f      return this;
00551c60  }

00551ca2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00551cb0  void __fastcall SoundData::SoundData(class SoundData* this)

00551cb0  {
00551cb7      this->sound_id_.id = 0;
00551cbd      this->priority_ = 0f;
00551cc4      this->probability_ = 1f;
00551cc7      this->volume_ = 1f;
00551cb0  }

00551ccb                                   90 90 90 90 90                                                             .....

00551cd0  int32_t __thiscall CSoundTable::UnPack(class CSoundTable* this, void** arg2, uint32_t arg3)

00551cd0  {
00551cd9      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
00551cec      *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0x10)(arg2, arg3);
00551cf1      void* eax_3 = (*(uint32_t*)arg2 & 0x80000003);
00551cf1      bool cond:0 = eax_3 == 0;
00551cf1      
00551cf6      if (eax_3 < 0)
00551cf6      {
00551cf9          void* eax_5 = (((char*)eax_3 - 1) | 0xfffffffc);
00551cfc          eax_3 = ((char*)eax_5 + 1);
00551cfc          cond:0 = eax_5 == 0xffffffff;
00551cf6      }
00551cf6      
00551cfd      if (!(cond:0))
00551cfd      {
00551d04          void* i_1 = (4 - eax_3);
00551d04          
00551d06          if (4 != eax_3)
00551d06          {
00551d13              void* i;
00551d13              
00551d13              do
00551d13              {
00551d0a                  **(uint8_t**)arg2 = 0;
00551d10                  i = i_1;
00551d10                  i_1 -= 1;
00551d11                  *(uint32_t*)arg2 += 1;
00551d13              } while (i != 1);
00551d06          }
00551cfd      }
00551cfd      
00551d1b      return 1;
00551cd0  }

00551d1e                                                                                            90 90                                ..

00551d20  void* __thiscall IntrusiveHashTable<unsigned long,SoundTableData *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,SoundTableData *,0>* this, uint32_t arg2)

00551d20  {
00551d23      class SoundTableData** m_buckets = this->m_buckets;
00551d2b      this->vtable = 0x7cb1cc;
00551d2b      
00551d31      if (m_buckets != &this->m_aInplaceBuckets)
00551d34          operator delete[](m_buckets);
00551d34      
00551d3e      this->m_buckets = nullptr;
00551d41      this->m_firstInterestingBucket = nullptr;
00551d44      this->m_numBuckets = 0;
00551d47      this->m_numElements = 0;
00551d47      
00551d4f      if ((arg2 & 1) != 0)
00551d52          operator delete(this);
00551d52      
00551d5d      return this;
00551d20  }


00551d60  void __thiscall SoundTableData::GetSubDataIDs(class SoundTableData const* this, class QualifiedDataIDArray* arg2)

00551d60  {
00551d63      int32_t* ebx;
00551d63      int32_t* var_c = ebx;
00551d70      int32_t i = 0;
00551d70      
00551d74      if (this->num_stdatas_ > 0)
00551d74      {
00551d76          ebx = nullptr;
00551d76          
00551da8          do
00551da8          {
00551d9a              void var_8;
00551d9a              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, *(uint32_t*)((char*)ebx + this->data_), 0), 8);
00551da2              i += 1;
00551da3              ebx = &ebx[4];
00551da8          } while (i < this->num_stdatas_);
00551d74      }
00551d74      
00551db3      void* ecx_3 = &this->sound_hash_.m_buckets[this->sound_hash_.m_numBuckets];
00551db3      
00551db8      if (this->sound_hash_.m_firstInterestingBucket != ecx_3)
00551db8      {
00551dc0          while (true)
00551dc0          {
00551dc0              class SoundTableData** m_firstInterestingBucket = this->sound_hash_.m_firstInterestingBucket;
00551dc0              
00551dc6              if (*(uint32_t*)m_firstInterestingBucket != 0)
00551dc6                  break;
00551dc6              
00551dcd              this->sound_hash_.m_firstInterestingBucket = &m_firstInterestingBucket[1];
00551dcd              
00551dd0              if (&m_firstInterestingBucket[1] == ecx_3)
00551dd9                  return;
00551dc0          }
00551dc0          
00551ddc          class SoundTableData** m_firstInterestingBucket_1 = this->sound_hash_.m_firstInterestingBucket;
00551ddf          class SoundTableData* m_hashNext = *(uint32_t*)m_firstInterestingBucket_1;
00551ddf          
00551de3          if (m_hashNext != 0)
00551de3          {
00551de8              while (true)
00551de8              {
00551de8                  SoundTableData::GetSubDataIDs(m_hashNext, arg2);
00551ded                  m_hashNext = m_hashNext->m_hashNext;
00551ded                  
00551df2                  if (m_hashNext == 0)
00551df2                  {
00551e0b                      class SoundTableData* i_1;
00551e0b                      
00551e0b                      do
00551e0b                      {
00551e00                          m_firstInterestingBucket_1 = &m_firstInterestingBucket_1[1];
00551e00                          
00551e05                          if (m_firstInterestingBucket_1 == &this->sound_hash_.m_buckets[this->sound_hash_.m_numBuckets])
00551e1a                              return;
00551e1a                          
00551e07                          i_1 = *(uint32_t*)m_firstInterestingBucket_1;
00551e0b                      } while (i_1 == 0);
00551e0b                      
00551e0d                      m_hashNext = i_1;
00551e0d                      
00551e11                      if (m_hashNext == 0)
00551e11                          break;
00551df2                  }
00551de8              }
00551de3          }
00551db8      }
00551d60  }

00551d7a                                                                                8d 9b 00 00 00 00                            ......
00551e1d                                                                                         90 90 90                               ...

00551e20  uint32_t __fastcall SoundTableData::pack_size(class SoundTableData* this)

00551e20  {
00551e24      uint32_t num_stdatas_ = this->num_stdatas_;
00551e2b      int32_t ebp = 8;
00551e2b      
00551e30      if (num_stdatas_ > 0)
00551e37          ebp = ((num_stdatas_ << 4) + 8);
00551e37      
00551e3f      void* ecx_1 = &this->sound_hash_.m_buckets[this->sound_hash_.m_numBuckets];
00551e45      int32_t result = (ebp + 4);
00551e45      
00551e4a      if (this->sound_hash_.m_firstInterestingBucket != ecx_1)
00551e4a      {
00551e50          while (true)
00551e50          {
00551e50              class SoundTableData** m_firstInterestingBucket = this->sound_hash_.m_firstInterestingBucket;
00551e50              
00551e56              if (*(uint32_t*)m_firstInterestingBucket != 0)
00551e56                  break;
00551e56              
00551e5d              this->sound_hash_.m_firstInterestingBucket = &m_firstInterestingBucket[1];
00551e5d              
00551e60              if (&m_firstInterestingBucket[1] == ecx_1)
00551e68                  return result;
00551e50          }
00551e50          
00551e69          class SoundTableData** m_firstInterestingBucket_1 = this->sound_hash_.m_firstInterestingBucket;
00551e6c          class SoundTableData* m_hashNext = *(uint32_t*)m_firstInterestingBucket_1;
00551e6c          
00551e70          if (m_hashNext != 0)
00551e70          {
00551e74              while (true)
00551e74              {
00551e74                  uint32_t eax_6 = SoundTableData::pack_size(m_hashNext);
00551e79                  m_hashNext = m_hashNext->m_hashNext;
00551e7c                  result += eax_6;
00551e7c                  
00551e80                  if (m_hashNext == 0)
00551e80                  {
00551e9b                      class SoundTableData* i;
00551e9b                      
00551e9b                      do
00551e9b                      {
00551e90                          m_firstInterestingBucket_1 = &m_firstInterestingBucket_1[1];
00551e90                          
00551e95                          if (m_firstInterestingBucket_1 == &this->sound_hash_.m_buckets[this->sound_hash_.m_numBuckets])
00551ea9                              return result;
00551ea9                          
00551e97                          i = *(uint32_t*)m_firstInterestingBucket_1;
00551e9b                      } while (i == 0);
00551e9b                      
00551e9d                      m_hashNext = i;
00551e9d                      
00551ea1                      if (m_hashNext == 0)
00551ea1                          break;
00551e80                  }
00551e74              }
00551e70          }
00551e4a      }
00551e4a      
00551ea9      return result;
00551e20  }

00551e8d                                         8d 49 00                                                               .I.
00551eaa                                90 90 90 90 90 90                                                            ......

00551eb0  uint32_t __thiscall SoundTableData::Pack(class SoundTableData* this, void** arg2, uint32_t arg3)

00551eb0  {
00551eb0      class SoundTableData* this_1 = this;
00551eb4      uint32_t result = SoundTableData::pack_size(this);
00551eb4      
00551ec1      if (arg3 < result)
00552046          return result;
00552046      
00551ecd      uint32_t** esi_1 = arg2;
00551ed3      **(uint32_t**)esi_1 = this->m_hashKey;
00551ed7      void* edx_2 = &*(uint32_t*)esi_1[1];
00551eda      *(uint32_t*)esi_1 = edx_2;
00551ee1      *(uint32_t*)edx_2 = this->num_stdatas_;
00551ee5      void* ecx_2 = &*(uint32_t*)esi_1[1];
00551ee8      *(uint32_t*)esi_1 = ecx_2;
00551eed      int32_t i = 0;
00551eed      
00551ef1      if (this->num_stdatas_ > 0)
00551ef1      {
00551ef3          int32_t ebx_1 = 0;
00551ef3          
00551f4d          do
00551f4d          {
00551f0a              void* eax_4 = (this->data_ + ebx_1);
00551f0a              
00551f0f              if (arg3 >= 0x10)
00551f0f              {
00551f13                  *(uint32_t*)ecx_2 = *(uint32_t*)eax_4;
00551f17                  void* ecx_4 = &*(uint32_t*)esi_1[1];
00551f1a                  *(uint32_t*)esi_1 = ecx_4;
00551f1f                  *(uint32_t*)ecx_4 = ((float)((long double)*(uint32_t*)((char*)eax_4 + 4)));
00551f23                  void* edx_7 = &*(uint32_t*)esi_1[1];
00551f26                  *(uint32_t*)esi_1 = edx_7;
00551f2d                  *(uint32_t*)edx_7 = ((float)((long double)*(uint32_t*)((char*)eax_4 + 8)));
00551f31                  float* ecx_7 = &*(uint32_t*)esi_1[1];
00551f34                  *(uint32_t*)esi_1 = ecx_7;
00551f39                  *(uint32_t*)ecx_7 = ((float)((long double)*(uint32_t*)((char*)eax_4 + 0xc)));
00551f3d                  void* eax_6 = &*(uint32_t*)esi_1[1];
00551f40                  *(uint32_t*)esi_1 = eax_6;
00551f42                  ecx_2 = eax_6;
00551f0f              }
00551f0f              
00551f47              i += 1;
00551f48              ebx_1 += 0x10;
00551f4d          } while (i < this->num_stdatas_);
00551ef1      }
00551ef1      
00551f55      void* i_1 = &this->sound_hash_.m_buckets[this->sound_hash_.m_numBuckets];
00551f5b      uint32_t ebp_1 = 0;
00551f5b      
00551f5f      if (this->sound_hash_.m_firstInterestingBucket != i_1)
00551f5f      {
00551f71          class SoundTableData** m_firstInterestingBucket;
00551f71          
00551f71          do
00551f71          {
00551f61              m_firstInterestingBucket = this->sound_hash_.m_firstInterestingBucket;
00551f61              
00551f67              if (*(uint32_t*)m_firstInterestingBucket != 0)
00551f67              {
00551f75                  class SoundTableData** m_firstInterestingBucket_1 = this->sound_hash_.m_firstInterestingBucket;
00551f78                  class SoundTableData* m_hashNext = *(uint32_t*)m_firstInterestingBucket_1;
00551f78                  
00551f7c                  while (m_hashNext != 0)
00551f7c                  {
00551f80                      m_hashNext = m_hashNext->m_hashNext;
00551f80                      
00551f85                      if (m_hashNext == 0)
00551f85                      {
00551f90                          while (true)
00551f90                          {
00551f90                              m_firstInterestingBucket_1 = &m_firstInterestingBucket_1[1];
00551f90                              
00551f95                              if (m_firstInterestingBucket_1 == &this->sound_hash_.m_buckets[this->sound_hash_.m_numBuckets])
00551f95                                  break;
00551f95                              
00551f97                              class SoundTableData* m_hashNext_1 = *(uint32_t*)m_firstInterestingBucket_1;
00551f97                              
00551f9b                              if (m_hashNext_1 != 0)
00551f9b                              {
00551f9d                                  m_hashNext = m_hashNext_1;
00551f9d                                  break;
00551f9b                              }
00551f90                          }
00551f85                      }
00551f85                      
00551f9f                      ebp_1 += 1;
00551f7c                  }
00551f7c                  
00551f7c                  break;
00551f67              }
00551f67              
00551f6e              this->sound_hash_.m_firstInterestingBucket = &m_firstInterestingBucket[1];
00551f71          } while (&m_firstInterestingBucket[1] != i_1);
00551f5f      }
00551f5f      
00551fa6      **(uint32_t**)esi_1 = ebp_1;
00551fa8      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
00551fb4      void* ecx_10 = &this->sound_hash_.m_buckets[this->sound_hash_.m_numBuckets];
00551fb9      int32_t* m_firstInterestingBucket_3;
00551fb9      int32_t* i_5;
00551fb9      
00551fb9      if (this->sound_hash_.m_firstInterestingBucket == ecx_10)
00551fb9      {
00551fd2      label_551fd2:
00551fd2          m_firstInterestingBucket_3 = nullptr;
00551fd4          i_5 = nullptr;
00551fb9      }
00551fb9      else
00551fb9      {
00551fc0          while (true)
00551fc0          {
00551fc0              class SoundTableData** m_firstInterestingBucket_2 = this->sound_hash_.m_firstInterestingBucket;
00551fc0              
00551fc6              if (*(uint32_t*)m_firstInterestingBucket_2 != 0)
00551fc6              {
00551fd8                  m_firstInterestingBucket_3 = this->sound_hash_.m_firstInterestingBucket;
00551fdb                  i_5 = *(uint32_t*)m_firstInterestingBucket_3;
00551fdb                  break;
00551fc6              }
00551fc6              
00551fcd              this->sound_hash_.m_firstInterestingBucket = &m_firstInterestingBucket_2[1];
00551fcd              
00551fd0              if (&m_firstInterestingBucket_2[1] == ecx_10)
00551fd0                  goto label_551fd2;
00551fc0          }
00551fb9      }
00551fb9      
00551fdf      int32_t* m_firstInterestingBucket_4 = m_firstInterestingBucket_3;
00551fdf      
00551fe1      if (i_5 != 0)
00551fe1      {
00551fed          while (true)
00551fed          {
00551fed              *(uint32_t*)(*(uint32_t*)i_5 + 0xc)(esi_1, arg3);
00551ff0              i_5 = i_5[2];
00551ff0              
00551ff5              if (i_5 == 0)
00551ff5              {
0055200c                  int32_t* i_2;
0055200c                  
0055200c                  do
0055200c                  {
00552000                      m_firstInterestingBucket_4 = &m_firstInterestingBucket_4[1];
00552000                      
00552005                      if (m_firstInterestingBucket_4 == &this->sound_hash_.m_buckets[this->sound_hash_.m_numBuckets])
00552005                          goto label_552016;
00552005                      
00552007                      i_2 = *(uint32_t*)m_firstInterestingBucket_4;
0055200c                  } while (i_2 == 0);
0055200c                  
0055200e                  i_5 = i_2;
0055200e                  
00552012                  if (i_5 == 0)
00552012                      break;
00551ff5              }
00551fed          }
00551fe1      }
00551fe1      
00552016  label_552016:
00552016      void* ecx_14 = (*(uint32_t*)esi_1 & 0x80000003);
00552016      bool cond:4_1 = ecx_14 == 0;
00552016      
0055201c      if (ecx_14 < 0)
0055201c      {
0055201f          void* ecx_16 = (((char*)ecx_14 - 1) | 0xfffffffc);
00552022          ecx_14 = ((char*)ecx_16 + 1);
00552022          cond:4_1 = ecx_16 == 0xffffffff;
0055201c      }
0055201c      
00552023      if (!(cond:4_1))
00552023      {
0055202a          void* i_4 = (4 - ecx_14);
0055202a          
0055202c          if (4 != ecx_14)
0055202c          {
0055203b              void* i_3;
0055203b              
0055203b              do
0055203b              {
00552032                  **(uint8_t**)esi_1 = 0;
00552038                  i_3 = i_4;
00552038                  i_4 -= 1;
00552039                  *(uint32_t*)esi_1 += 1;
0055203b              } while (i_3 != 1);
0055202c          }
00552023      }
00552023      
0055203d      return result;
00551eb0  }

00551ef7                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
00551fbd                                                                                         8d 49 00                               .I.
00552049                             90 90 90 90 90 90 90                                                           .......

00552050  void __thiscall CSoundTable::GetSubDataIDs(class CSoundTable const* this, class QualifiedDataIDArray* arg2)

00552050  {
00552053      /* tailcall */
00552053      return SoundTableData::GetSubDataIDs(&this->sound_data_, arg2);
00552050  }

00552058                                                                          90 90 90 90 90 90 90 90                          ........

00552060  uint32_t __thiscall CSoundTable::Pack(class CSoundTable* this, void** arg2, uint32_t arg3)

00552060  {
00552067      uint32_t result = SoundTableData::pack_size(&this->m_bLoaded);
00552067      
00552074      if (arg3 >= result)
00552074      {
00552081          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(arg2, arg3);
00552085          PackObj::ALIGN_PTR(arg2);
00552074      }
00552074      
00552092      return result;
00552060  }

00552095                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005520a0  int32_t __thiscall SoundTableData::Lookup(class SoundTableData const* this, enum SoundType arg2, class SoundTableData** arg3)

005520a0  {
005520b2      class SoundTableData* m_hashNext = this->sound_hash_.m_buckets[(COMBINE(0, arg2) % this->sound_hash_.m_numBuckets)];
005520b2      
005520b6      if (m_hashNext != 0)
005520b6      {
005520bb          while (m_hashNext->m_hashKey != arg2)
005520bb          {
005520bd              m_hashNext = m_hashNext->m_hashNext;
005520bd              
005520c2              if (m_hashNext == 0)
005520c2              {
005520c8                  *(uint32_t*)arg3 = m_hashNext;
005520cb                  return m_hashNext;
005520c2              }
005520bb          }
005520bb          
005520d0          if (m_hashNext != 0)
005520d0          {
005520e6              *(uint32_t*)arg3 = m_hashNext;
005520ee              return 1;
005520d0          }
005520b6      }
005520b6      
005520d6      *(uint32_t*)arg3 = nullptr;
005520df      return 0;
005520a0  }

005520f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00552100  int32_t __thiscall CSoundTable::Lookup(class CSoundTable const* this, enum SoundType arg2, class SoundTableData** arg3)

00552100  {
00552103      /* tailcall */
00552103      return SoundTableData::Lookup(&this->sound_data_, arg2, arg3);
00552100  }

00552108                          90 90 90 90 90 90 90 90                                                          ........

00552110  void __thiscall IntrusiveHashTable<unsigned long,SoundTableData *,0>::IntrusiveHashTable<unsigned long,SoundTableData *,0>(class IntrusiveHashTable<unsigned long,SoundTableData *,0>* this, uint32_t arg2)

00552110  {
0055211b      arg2 = arg2;
0055211f      uint8_t edx = ((int8_t)arg2);
00552123      this->m_buckets = nullptr;
00552126      this->m_firstInterestingBucket = nullptr;
00552129      this->m_numBuckets = 0;
0055212c      this->m_numElements = 0;
00552130      this->vtable = 0x7cb1cc;
00552136      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00552149      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00552149      
00552153      if (eax == bucketSizesEnd_1)
00552155          eax -= 4;
00552155      
00552158      uint32_t eax_1 = *(uint32_t*)eax;
0055215d      this->m_numBuckets = eax_1;
0055215d      
00552160      if (eax_1 > 0x17)
00552176          this->m_buckets = operator new[]((eax_1 << 2));
00552160      else
00552165          this->m_buckets = &this->m_aInplaceBuckets;
00552165      
0055217c      class SoundTableData** m_buckets = this->m_buckets;
0055217f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00552185      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00552196      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00552110  }

0055219f                                                                                               90                                 .

005521a0  void __fastcall SoundTableData::SoundTableData(class SoundTableData* this)

005521a0  {
005521a6      this->m_hashNext = nullptr;
005521ae      this->vtable = 0x7cb1d0;
005521b4      IntrusiveHashTable<unsigned long,SoundTableData *,0>::IntrusiveHashTable<unsigned long,SoundTableData *,0>(&this->sound_hash_, 4);
005521bb      this->num_stdatas_ = 0;
005521be      this->data_ = nullptr;
005521c4      this->m_hashKey = 0;
005521c7      void* eax = operator new[](0x14);
005521c7      
005521d1      if (eax == 0)
005521d1      {
005521fc          this->data_ = nullptr;
00552202          this->num_stdatas_ += 1;
00552209          return;
005521d1      }
005521d1      
005521d3      *(uint32_t*)eax = 1;
005521d9      ((char*)eax + 4)->sound_id_.id = 0;
005521d9      ((char*)eax + 4)->priority_ = 0f;
005521d9      ((char*)eax + 4)->probability_ = 1f;
005521d9      ((char*)eax + 4)->volume_ = 1f;
005521ec      this->data_ = ((char*)eax + 4);
005521f2      this->num_stdatas_ += 1;
005521a0  }

0055220a                                90 90 90 90 90 90                                                            ......

00552210  uint8_t __thiscall IntrusiveHashTable<unsigned long,SoundTableData *,0>::add(class IntrusiveHashTable<unsigned long,SoundTableData *,0>* this, class SoundTableData* arg2)

00552210  {
00552211      uint32_t m_numBuckets = this->m_numBuckets;
0055221b      uint32_t m_hashKey = arg2->m_hashKey;
00552224      class SoundTableData** m_buckets = this->m_buckets;
00552224      
0055222f      for (void* i = m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 8))
0055222f      {
00552234          if (*(uint32_t*)((char*)i + 4) == m_hashKey)
00552234          {
00552269              if (i == 0)
00552269                  break;
00552269              
0055226e              i = 0;
00552271              return 0;
00552234          }
0055222f      }
0055222f      
00552244      class SoundTableData** eax_3 = &m_buckets[(COMBINE(0, arg2->m_hashKey) % m_numBuckets)];
0055224a      arg2->m_hashNext = *(uint32_t*)eax_3;
0055224d      *(uint32_t*)eax_3 = arg2;
0055224d      
00552252      if (eax_3 < this->m_firstInterestingBucket)
00552254          this->m_firstInterestingBucket = eax_3;
00552254      
0055225e      this->m_numElements += 1;
00552261      uint32_t eax_5;
00552261      eax_5 = 1;
00552264      return 1;
00552210  }

00552274                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00552280  void __fastcall IntrusiveHashTable<unsigned long,SoundTableData *,0>::delete_contents(class IntrusiveHashTable<unsigned long,SoundTableData *,0>* this)

00552280  {
00552288      if (this->m_numElements != 0)
00552288      {
0055228a          int32_t* m_firstInterestingBucket_2;
0055228a          int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
0055228a          
005522f5          do
005522f5          {
00552296              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0055229c              int32_t* ecx_2;
0055229c              
0055229c              if (this->m_firstInterestingBucket == ecx_1)
0055229c              {
005522b2              label_5522b2:
005522b2                  m_firstInterestingBucket_2 = nullptr;
005522b4                  ecx_2 = nullptr;
0055229c              }
0055229c              else
0055229c              {
005522a0                  while (true)
005522a0                  {
005522a0                      class SoundTableData** m_firstInterestingBucket = this->m_firstInterestingBucket;
005522a0                      
005522a6                      if (*(uint32_t*)m_firstInterestingBucket != 0)
005522a6                      {
005522b8                          class SoundTableData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
005522bb                          ecx_2 = *(uint32_t*)m_firstInterestingBucket_1;
005522bd                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
005522bd                          break;
005522a6                      }
005522a6                      
005522ad                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
005522ad                      
005522b0                      if (&m_firstInterestingBucket[1] == ecx_1)
005522b0                          goto label_5522b2;
005522a0                  }
0055229c              }
0055229c              
005522bf              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
005522bf              
005522c3              if (eax_3 == ecx_2)
005522d5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 8);
005522c3              else
005522c3              {
005522cc                  void* edx_1;
005522cc                  
005522cc                  do
005522cc                  {
005522c5                      edx_1 = eax_3;
005522c7                      eax_3 = *(uint32_t*)((char*)eax_3 + 8);
005522cc                  } while (eax_3 != ecx_2);
005522cc                  
005522d0                  if (edx_1 != 0)
005522dc                      *(uint32_t*)((char*)edx_1 + 8) = *(uint32_t*)((char*)eax_3 + 8);
005522d0                  else
005522d5                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 8);
005522c3              }
005522c3              
005522e5              this->m_numElements -= 1;
005522e5              
005522e8              if (ecx_2 != 0)
005522ee                  **(uint32_t**)ecx_2(1);
005522f5          } while (this->m_numElements != 0);
00552288      }
00552280  }

0055228d                                         8d 49 00                                                               .I.
005522fa                                                                                90 90 90 90 90 90                            ......

00552300  void __fastcall SoundTableData::Destroy(class SoundTableData* this)

00552300  {
00552307      IntrusiveHashTable<unsigned long,SoundTableData *,0>::delete_contents(&this->sound_hash_);
0055230f      int32_t i = 0;
0055230f      
00552313      if (this->num_stdatas_ > 0)
00552313      {
00552316          int32_t edi_1 = 0;
00552316          
00552341          do
00552341          {
00552326              class IDClass<_tagDataID,32,0> ecx_1 = *(uint32_t*)(this->data_ + edi_1);
00552326              
0055232d              if (ecx_1 != 0)
00552330                  SoundManager::DestroySound(ecx_1);
00552330              
0055233b              i += 1;
0055233c              edi_1 += 0x10;
00552341          } while (i < this->num_stdatas_);
00552313      }
00552313      
00552344      class SoundData* data_ = this->data_;
0055234c      this->num_stdatas_ = 0;
0055234c      
00552353      if (data_ != 0)
00552353      {
00552359          operator delete[](((char*)data_ - 4));
00552361          this->data_ = nullptr;
00552353      }
00552300  }

0055231a                                                                                8d 9b 00 00 00 00                            ......
0055236e                                            90 90                                                                ..

00552370  int32_t __thiscall SoundTableData::UnPack(class SoundTableData* this, void** arg2, uint32_t arg3)

00552370  {
00552376      SoundTableData::Destroy(this);
0055237b      void** esi = arg2;
0055237f      void* eax = *(uint32_t*)esi;
00552381      uint32_t ecx = *(uint32_t*)eax;
00552386      *(uint32_t*)esi = ((char*)eax + 4);
00552388      this->m_hashKey = ecx;
0055238f      this->num_stdatas_ = **(uint32_t**)esi;
00552392      *(uint32_t*)esi += 4;
00552395      class SoundData* data_ = this->data_;
00552395      
0055239f      if (data_ != 0)
005523a5          operator delete[](((char*)data_ - 4));
005523a5      
005523ad      uint32_t num_stdatas_ = this->num_stdatas_;
005523b9      void* eax_4 = operator new[](((num_stdatas_ << 4) + 4));
005523c3      void* eax_6;
005523c3      
005523c3      if (eax_4 == 0)
005523ee          eax_6 = nullptr;
005523c3      else
005523c3      {
005523cd          *(uint32_t*)eax_4 = num_stdatas_;
005523cf          void* eax_5 = ((char*)eax_4 + 4);
005523cf          
005523d1          if ((num_stdatas_ - 1) >= 0)
005523d1          {
005523d3              int32_t ecx_3 = num_stdatas_;
005523e8              int32_t i;
005523e8              
005523e8              do
005523e8              {
005523d9                  *(uint32_t*)eax_5 = 0;
005523db                  *(uint32_t*)((char*)eax_5 + 4) = 0;
005523de                  *(uint32_t*)((char*)eax_5 + 8) = 0x3f800000;
005523e1                  *(uint32_t*)((char*)eax_5 + 0xc) = 0x3f800000;
005523e4                  eax_5 += 0x10;
005523e7                  i = ecx_3;
005523e7                  ecx_3 -= 1;
005523e8              } while (i != 1);
005523d1          }
005523d1          
005523ea          eax_6 = ((char*)eax_4 + 4);
005523c3      }
005523c3      
005523f0      this->data_ = eax_6;
005523f9      arg2 = nullptr;
005523f9      
005523fd      if (this->num_stdatas_ > 0)
005523fd      {
005523ff          int32_t ebx = 0;
0055246a          bool cond:3_1;
0055246a          
0055246a          do
0055246a          {
0055240b              void* eax_8 = (this->data_ + ebx);
0055240b              
00552410              if (arg3 >= 0x10)
00552410              {
00552412                  void* ecx_5 = *(uint32_t*)esi;
00552414                  int32_t edx_4 = *(uint32_t*)ecx_5;
00552419                  *(uint32_t*)esi = ((char*)ecx_5 + 4);
0055241b                  *(uint32_t*)eax_8 = edx_4;
00552421                  *(uint32_t*)((char*)eax_8 + 4) = **(uint32_t**)esi;
00552426                  void* edx_7 = (*(uint32_t*)esi + 4);
00552429                  *(uint32_t*)esi = edx_7;
0055242f                  *(uint32_t*)((char*)eax_8 + 8) = *(uint32_t*)edx_7;
00552434                  void* ecx_11 = (*(uint32_t*)esi + 4);
00552437                  *(uint32_t*)esi = ecx_11;
0055243b                  *(uint32_t*)((char*)eax_8 + 0xc) = *(uint32_t*)ecx_11;
0055243e                  *(uint32_t*)esi += 4;
00552410              }
00552410              
00552447              class IDClass<_tagDataID,32,0> ecx_12 = *(uint32_t*)(this->data_ + ebx);
00552447              
0055244e              if (ecx_12 != 0)
00552451                  SoundManager::CreateSound(ecx_12);
00552451              
00552461              ebx += 0x10;
00552464              cond:3_1 = ((char*)arg2 + 1) < this->num_stdatas_;
00552466              arg2 += 1;
0055246a          } while (cond:3_1);
005523fd      }
005523fd      
0055246c      void* eax_13 = *(uint32_t*)esi;
0055246e      int32_t i_3 = *(uint32_t*)eax_13;
00552475      *(uint32_t*)esi = ((char*)eax_13 + 4);
00552475      
00552477      if (i_3 > 0)
00552477      {
00552484          int32_t i_2 = i_3;
00552511          int32_t i_1;
00552511          
00552511          do
00552511          {
00552490              void* edi_2 = operator new(0x84);
00552490              
00552497              if (edi_2 == 0)
005524f7                  edi_2 = nullptr;
00552497              else
00552497              {
00552499                  *(uint32_t*)((char*)edi_2 + 8) = 0;
005524a1                  *(uint32_t*)edi_2 = 0x7cb1d0;
005524a7                  IntrusiveHashTable<unsigned long,SoundTableData *,0>::IntrusiveHashTable<unsigned long,SoundTableData *,0>(((char*)edi_2 + 0xc), 4);
005524ae                  *(uint32_t*)((char*)edi_2 + 0x7c) = 0;
005524b1                  *(uint32_t*)((char*)edi_2 + 0x80) = 0;
005524b7                  *(uint32_t*)((char*)edi_2 + 4) = 0;
005524ba                  void* eax_16 = operator new[](0x14);
005524ba                  
005524c4                  if (eax_16 == 0)
005524c4                  {
005524ec                      *(uint32_t*)((char*)edi_2 + 0x80) = 0;
005524f2                      *(uint32_t*)((char*)edi_2 + 0x7c) += 1;
005524c4                  }
005524c4                  else
005524c4                  {
005524c6                      *(uint32_t*)eax_16 = 1;
005524cf                      *(uint32_t*)((char*)eax_16 + 4) = 0;
005524d1                      *(uint32_t*)((char*)eax_16 + 8) = 0;
005524d9                      *(uint32_t*)((char*)eax_16 + 0xc) = 0x3f800000;
005524dc                      *(uint32_t*)((char*)eax_16 + 0x10) = 0x3f800000;
005524df                      *(uint32_t*)((char*)edi_2 + 0x80) = ((char*)eax_16 + 4);
005524e5                      *(uint32_t*)((char*)edi_2 + 0x7c) += 1;
005524c4                  }
00552497              }
00552497              
00552503              *(uint32_t*)(*(uint32_t*)edi_2 + 0x10)(esi, arg3);
0055250b              IntrusiveHashTable<unsigned long,SoundTableData *,0>::add(&this->sound_hash_, edi_2);
00552510              i_1 = i_2;
00552510              i_2 -= 1;
00552511          } while (i_1 != 1);
00552477      }
00552477      
00552520      return 1;
00552370  }

00552523           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00552530  void __thiscall CSoundTable::CSoundTable(class CSoundTable* this, class IDClass<_tagDataID,32,0> arg2)

00552530  {
00552538      DBObj::DBObj(this, arg2);
0055253d      this->vtable = &PackObj::`vftable';
00552547      this->vtable = 0x7cb1f8;
0055254d      this->vtable = &CSoundTable::`vftable';
00552554      SoundTableData::SoundTableData(&this->sound_data_);
00552530  }

0055255f                                                                                               90                                 .

00552560  uint32_t CSoundTable::GetDBOType(class CSoundTable const* this @ ecx) __pure

00552560  {
00552565      return 0x22;
00552560  }

00552566                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00552570  void* __thiscall CSoundTable::`vector deleting destructor'(class CSoundTable* this, uint32_t arg2)

00552570  {
00552573      /* tailcall */
00552573      return CSoundTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00552570  }

00552578                                                                          cc cc cc cc cc cc cc cc                          ........

00552580  void __fastcall CSoundTable::~CSoundTable(class CSoundTable* this)

00552580  {
00552587      this->vtable = 0x7cb1f8;
0055258d      this->vtable = &CSoundTable::`vftable';
00552584      this->sound_data_.vtable = 0x7cb1d0;
0055259c      SoundTableData::Destroy(&this->sound_data_);
005525a1      class SoundTableData** m_buckets = this->sound_data_.sound_hash_.m_buckets;
00552584      this->sound_data_.sound_hash_.vtable = 0x7cb1cc;
00552584      
005525b0      if (m_buckets != &this->sound_data_.sound_hash_.m_aInplaceBuckets)
005525b3          operator delete[](m_buckets);
005525b3      
00552584      this->sound_data_.sound_hash_.m_buckets = nullptr;
00552584      this->sound_data_.sound_hash_.m_firstInterestingBucket = nullptr;
00552584      this->sound_data_.sound_hash_.m_numBuckets = 0;
00552584      this->sound_data_.sound_hash_.m_numElements = 0;
00552584      this->sound_data_.vtable = 0x79285c;
005525cf      this->vtable = &PackObj::`vftable';
005525da      /* tailcall */
005525da      return DBObj::~DBObj(this);
00552580  }

005525df                                                                                               90                                 .

005525e0  class DBObj* CSoundTable::Allocate(class CSoundTable const* this @ ecx)

005525e0  {
005525e0      /* tailcall */
005525e0      return CSoundTable::Allocator();
005525e0  }

005525e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005525f0  void* __thiscall SoundTableData::`scalar deleting destructor'(class SoundTableData* this, uint32_t arg2)

005525f0  {
005525f3      this->vtable = 0x7cb1d0;
005525f9      SoundTableData::Destroy(this);
005525fe      class SoundTableData** m_buckets = this->sound_hash_.m_buckets;
00552606      this->sound_hash_.vtable = 0x7cb1cc;
00552606      
0055260d      if (m_buckets != &this->sound_hash_.m_aInplaceBuckets)
00552610          operator delete[](m_buckets);
00552610      
0055261a      this->sound_hash_.m_buckets = nullptr;
0055261d      this->sound_hash_.m_firstInterestingBucket = nullptr;
00552620      this->sound_hash_.m_numBuckets = 0;
00552623      this->sound_hash_.m_numElements = 0;
0055262b      this->vtable = 0x79285c;
0055262b      
00552631      if ((arg2 & 1) != 0)
00552634          operator delete(this);
00552634      
0055263f      return this;
005525f0  }

00552642        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00552650  void* __thiscall CSoundTable::`scalar deleting destructor'(class CSoundTable* this, uint32_t arg2)

00552650  {
00552653      CSoundTable::~CSoundTable(this);
00552653      
0055265d      if ((arg2 & 1) != 0)
00552660          operator delete(this);
00552660      
0055266b      return this;
00552650  }

0055266e                                            90 90                                                                ..

00552670  void __fastcall SoundBuf::ReleaseAll(class SoundBuf* this)

00552670  {
00552673      char* m_filename = this->m_filename;
00552673      
0055267b      if (m_filename != 0)
0055267b      {
0055267e          operator delete[](m_filename);
00552686          this->m_filename = nullptr;
0055267b      }
0055267b      
00552689      struct IDirectSoundBuffer* m_pBuf = this->m_pBuf;
00552689      
0055268e      if (m_pBuf != 0)
0055268e      {
00552690          m_pBuf->vtable->Release(m_pBuf);
00552696          this->m_pBuf = nullptr;
0055268e      }
0055268e      
00552699      struct IDirectSound3DBuffer* m_p3DBuf = this->m_p3DBuf;
00552699      
0055269e      if (m_p3DBuf != 0)
0055269e      {
005526a0          m_p3DBuf->vtable->Release(m_p3DBuf);
005526a6          this->m_p3DBuf = nullptr;
0055269e      }
0055269e      
005526a9      __builtin_memset(&this->m_pBuf, 0, 0x18);
005526c1      this->m_gid.id = INVALID_DID.id;
00552670  }

005526c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005526d0  int32_t __thiscall SoundBuf::CopyWaveToBuffer(class SoundBuf* this, class WaveFile* arg2)

005526d0  {
005526d6      struct IDirectSoundBuffer* m_pBuf = this->m_pBuf;
005526e0      int32_t var_60 = 0;
005526e4      int32_t var_5c = 0;
005526e8      uint32_t m_bufsize_2 = 0;
005526ec      int32_t var_58 = 0;
005526ec      
005526fc      if ((m_pBuf != 0 && arg2 != 0))
005526fc      {
00552704          uint8_t* m_pData_1 = arg2->m_pData;
00552722          int32_t eax = m_pBuf->vtable->Lock(m_pBuf, 0, this->m_bufsize, &var_60, &m_bufsize_2, &var_5c, &var_58, 0);
00552722          
00552727          if (eax == 0)
00552727          {
0055272d              uint32_t m_bufsize = this->m_bufsize;
00552730              uint32_t m_bufsize_1 = m_bufsize_2;
00552734              struct HACMSTREAM__* phas_1 = phas;
0055273e              int32_t eax_2 = -((eax - eax));
0055273e              
00552742              if (phas_1 == 0)
00552742              {
005527b7                  if (eax_2 != 0)
005527b9                      m_bufsize = m_bufsize_1;
005527b9                  
005527c6                  int32_t esi_3;
005527c6                  int32_t edi_3;
005527c6                  edi_3 = __builtin_memcpy(var_60, m_pData_1, ((m_bufsize >> 2) << 2));
005527cf                  __builtin_memcpy(edi_3, esi_3, (m_bufsize & 3));
005527cf                  
005527d1                  if (eax_2 != 0)
005527d1                  {
005527d3                      int32_t edi_4 = var_5c;
005527d3                      
005527d9                      if (edi_4 != 0)
005527d9                      {
005527db                          uint32_t m_bufsize_5 = m_bufsize_2;
005527e2                          uint32_t ecx_7 = (this->m_bufsize - m_bufsize_5);
005527ec                          int32_t esi_5;
005527ec                          int32_t edi_5;
005527ec                          edi_5 = __builtin_memcpy(edi_4, &m_pData_1[m_bufsize_5], ((ecx_7 >> 2) << 2));
005527f3                          __builtin_memcpy(edi_5, esi_5, (ecx_7 & 3));
005527d9                      }
005527d1                  }
00552742              }
00552742              else
00552742              {
0055274a                  uint32_t m_nDataSize = arg2->m_nDataSize;
00552754                  uint8_t* m_pData = arg2->m_pData;
00552758                  int32_t eax_4 = var_60;
0055275e                  int32_t pash = 0x54;
00552766                  int32_t var_50_1 = 0;
0055276e                  int32_t var_38_1 = eax_4;
00552772                  uint32_t m_bufsize_3 = m_bufsize_1;
00552772                  
0055277d                  if (j_acmStreamPrepareHeader(phas_1, &pash, 0) == 0)
0055277d                  {
0055278c                      j_acmStreamConvert(phas, &pash, 4);
0055279e                      uint32_t m_nDataSize_1 = arg2->m_nDataSize;
005527aa                      uint32_t m_bufsize_4 = m_bufsize_2;
005527ae                      j_acmStreamUnprepareHeader(phas, &pash, 0);
0055277d                  }
00552742              }
00552742              
005527fd              struct IDirectSoundBuffer* m_pBuf_1 = this->m_pBuf;
00552800              m_pBuf_1->vtable->Unlock(m_pBuf_1, var_60, m_bufsize_2, var_5c, var_58);
0055281e              return 1;
00552727          }
005526fc      }
005526fc      
0055282a      return 0;
005526d0  }

0055282d                                         90 90 90                                                               ...

00552830  int32_t __fastcall SoundBuf::Stop(class SoundBuf* this)

00552830  {
00552830      struct IDirectSoundBuffer* m_pBuf = this->m_pBuf;
00552830      
00552835      if (m_pBuf == 0)
00552837          return m_pBuf;
00552837      
0055283b      int32_t eax = m_pBuf->vtable->Stop(m_pBuf);
0055283e      int32_t eax_1 = -(eax);
00552843      return ((eax_1 - eax_1) + 1);
00552830  }

00552844              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00552850  int32_t __fastcall SoundBuf::GetStatus(class SoundBuf* this)

00552850  {
00552850      class SoundBuf* result = this;
00552851      struct IDirectSoundBuffer* m_pBuf = this->m_pBuf;
00552851      
00552856      if ((m_pBuf != 0 && m_pBuf->vtable->GetStatus(m_pBuf, &result) == 0))
00552871          return result;
00552871      
0055285c      return 0xffffffff;
00552850  }

00552872                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00552880  class DBWave* DBWave::Get(class IDClass<_tagDataID,32,0> arg1)

00552880  {
0055289c      void var_8;
0055289c      return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0xf));
00552880  }

0055289d                                                                                         90 90 90                               ...

005528a0  void __fastcall SoundBuf::~SoundBuf(class SoundBuf* this)

005528a0  {
005528a0      /* tailcall */
005528a0      return SoundBuf::ReleaseAll(this);
005528a0  }

005528a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005528b0  void __thiscall SoundBuf::SoundBuf(class SoundBuf* this, class SoundBuf const* arg2)

005528b0  {
005528b8      this->m_pBuf = nullptr;
005528bb      this->m_p3DBuf = nullptr;
005528c3      this->m_filename = nullptr;
005528c6      this->m_tagval = 0;
005528c9      this->m_bufsize = 0;
005528cc      this->m_3D = 0;
005528d4      this->m_gid.id = INVALID_DID.id;
005528d7      class CDirSound* eax_1 = GetDirectSound();
005528de      this->m_pCDirSound = eax_1;
005528de      
005528e0      if (eax_1 != 0)
005528e0      {
005528e2          struct IDirectSound* m_pDirectSoundObj = eax_1->m_pDirectSoundObj;
005528e2          
005528e7          if ((m_pDirectSoundObj != 0 && m_pDirectSoundObj->vtable->DuplicateSoundBuffer(m_pDirectSoundObj, arg2->m_pBuf, &this->m_pBuf) == 0))
005528e7          {
005528ff              this->m_bufsize = arg2->m_bufsize;
00552905              this->m_tagval = arg2->m_tagval;
00552908              int32_t m_3D = arg2->m_3D;
0055290b              this->m_3D = m_3D;
00552911              this->m_gid.id = arg2->m_gid.id;
00552911              
00552918              if (m_3D != 0)
00552918              {
0055291a                  struct IDirectSoundBuffer* m_pBuf = this->m_pBuf;
0055291c                  m_pBuf->vtable->QueryInterface(m_pBuf, 0x7fd720, &this->m_p3DBuf);
00552918              }
005528e7          }
005528e0      }
005528b0  }


00552930  int32_t __fastcall SoundBuf::Create(class SoundBuf* this, int32_t arg2)

00552930  {
00552936      class CDirSound* m_pCDirSound = this->m_pCDirSound;
00552938      struct IDirectSound* m_pDirectSoundObj = m_pCDirSound->m_pDirectSoundObj;
00552940      int32_t result = 0;
00552940      
00552948      if (m_pDirectSoundObj == 0)
00552951          return 0;
00552951      
0055295e      int32_t ebp;
0055295e      
0055295e      if ((this->m_3D == 0 || m_pCDirSound->m_lpDs3dListener == 0))
0055295e      {
00552967          ebp = 0x100e0;
0055296c          this->m_3D = 0;
0055295e      }
0055295e      else
00552960          ebp = 0x100b0;
00552960      
00552973      if (arg2 != 0)
00552975          ebp |= 2;
00552975      
0055297e      class DBObj* var_4c = nullptr;
00552982      void* __offset(DBObj, 0x38) esi_1;
00552982      
00552982      if (SoundBuf::useDatabase != 0)
00552982      {
00552984          uint32_t id = this->m_gid.id;
00552984          
0055298d          if (id != INVALID_DID.id)
0055298d          {
005529a0              void var_40;
005529a0              class DBObj* eax_2 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_40, id, 0xf));
005529aa              var_4c = eax_2;
005529aa              
005529ae              if (eax_2 != 0)
005529ae              {
005529b4                  esi_1 = ((char*)eax_2 + 0x38);
00552a47              label_552a47:
00552a47                  
00552a49                  if (esi_1 != 0)
00552a49                  {
00552a5a                      int32_t s;
00552a5a                      __builtin_memset(&s, 0, 0x24);
00552a5c                      int32_t var_20_1 = ebp;
00552a60                      s = 0x24;
00552a68                      int16_t* eax_11 = *(int32_t*)((char*)ADJ(esi_1) + 0x3c);
00552a75                      int32_t edx_2;
00552a75                      edx_2 = *(uint16_t*)eax_11 != 1;
00552a7e                      int32_t var_1c_1;
00552a7e                      
00552a7e                      if (edx_2 == 0)
00552a7e                      {
00552afa                          int16_t* var_14_2 = eax_11;
00552b01                          var_1c_1 = *(int32_t*)((char*)ADJ(esi_1) + 0x94);
00552b16                      label_552b16:
00552b16                          
00552b1b                          if (m_pDirectSoundObj->vtable->CreateSoundBuffer(m_pDirectSoundObj, &s, &this->m_pBuf, 0) == 0)
00552b1b                          {
00552b24                              this->m_bufsize = var_1c_1;
00552b24                              
00552b2e                              if (SoundBuf::CopyWaveToBuffer(this, esi_1) != 0)
00552b30                                  result = 1;
00552b1b                          }
00552b1b                          
00552b1b                          goto label_552b3a;
00552a7e                      }
00552a7e                      
00552a85                      int16_t pwfxDst = 1;
00552a8a                      int16_t var_36_1 = 1;
00552a98                      int16_t* var_14_1 = &pwfxDst;
00552aa6                      int16_t var_2a_1 = 0x10;
00552aad                      int32_t var_34_1 = 0x2b11;
00552ab5                      int16_t var_2c_1 = 2;
00552abc                      int32_t var_30_1 = 0x5622;
00552ac4                      int16_t var_28_1 = 0;
00552ac4                      
00552ad0                      if (j_acmStreamOpen(&phas, nullptr, *(int32_t*)((char*)ADJ(esi_1) + 0x3c), &pwfxDst, nullptr, nullptr, nullptr, 4) == 0)
00552ad0                      {
00552aee                          if (j_acmStreamSize(phas, *(int32_t*)((char*)ADJ(esi_1) + 0x94), &arg2, 0) == 0)
00552aee                          {
00552af4                              var_1c_1 = arg2;
00552af8                              goto label_552b16;
00552aee                          }
00552aee                          
00552b3a                      label_552b3a:
00552b3a                          
00552b3a                          if (edx_2 != 0)
00552b3a                          {
00552b43                              j_acmStreamClose(phas, 0);
00552b48                              phas = nullptr;
00552b3a                          }
00552b3a                          
00552b51                          if (this->m_3D != 0)
00552b51                          {
00552b53                              struct IDirectSoundBuffer* m_pBuf = this->m_pBuf;
00552b53                              
00552b58                              if ((m_pBuf != 0 && m_pBuf->vtable->QueryInterface(m_pBuf, 0x7fd720, &this->m_p3DBuf) != 0))
00552b6c                                  this->m_3D = 0;
00552b51                          }
00552ad0                      }
00552ad0                      
00552b75                      if (var_4c != 0)
00552b77                          var_4c->vtable->Release();
00552a49                  }
005529ae              }
0055298d          }
00552982      }
00552982      else if (this->m_filename != 0)
005529bf      {
005529c7          class WaveFile* eax_3 = operator new(0x68);
005529c7          
005529d1          if (eax_3 != 0)
005529d1          {
005529de              esi_1 = WaveFile::WaveFile(eax_3);
005529de              
005529e2              if (esi_1 != 0)
005529e2              {
005529f0                  PStringBase<char>::PStringBase<char>(&arg2, this->m_filename);
005529fc                  int32_t eax_6 = WaveFile::Open(esi_1, &arg2);
00552a07                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00552a07                  
00552a10                  if (eax_6 == 0)
00552a10                  {
00552a35                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + 0x38)(1);
00552a42                      return result;
00552a10                  }
00552a10                  
00552a19                  if (WaveFile::Load(esi_1) != 0)
00552a10                      goto label_552a47;
00552a10                  
00552a21                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + 0x38)(1);
005529e2              }
005529d1          }
005529bf      }
00552b87      return result;
00552930  }

00552b8a                                90 90 90 90 90 90                                                            ......

00552b90  int32_t __fastcall SoundBuf::Restore(class SoundBuf* this)

00552b90  {
00552b96      struct IDirectSoundBuffer* m_pBuf = this->m_pBuf;
00552b9b      int32_t var_18 = 0;
00552b9b      
00552ba3      if (m_pBuf == 0)
00552ba9          return m_pBuf;
00552ba9      
00552bb2      if (m_pBuf->vtable->Restore(m_pBuf) == 0)
00552bb2      {
00552bbe          class DBWave* ebp_1 = nullptr;
00552bc3          class PStringBase<char> var_1c;
00552bc3          struct WaveFile::VTable** esi_1;
00552bc3          
00552bc3          if (SoundBuf::useDatabase != 0)
00552bc3          {
00552bc9              uint32_t id = this->m_gid.id;
00552bc9              
00552bd2              if (id != INVALID_DID.id)
00552bd2              {
00552be0                  ebp_1 = DBWave::Get(id);
00552be0                  
00552be7                  if (ebp_1 != 0)
00552be7                  {
00552bed                      esi_1 = &ebp_1->vtable;
00552bf0                  label_552bf0:
00552bf0                      
00552bf2                      if (esi_1 != 0)
00552bf2                      {
00552c02                          int32_t ebx_1;
00552c02                          ebx_1 = ADJ(esi_1)->m_pwfmt->wFormatTag != 1;
00552c02                          
00552c07                          if (ebx_1 == 0)
00552c07                          {
00552c55                          label_552c55:
00552c55                              
00552c5c                              if (SoundBuf::CopyWaveToBuffer(this, esi_1) != 0)
00552c5e                                  var_18 = 1;
00552c5e                              
00552c68                              if (ebx_1 != 0)
00552c68                              {
00552c73                                  j_acmStreamClose(phas, 0);
00552c78                                  phas = nullptr;
00552c68                              }
00552c07                          }
00552c07                          else
00552c07                          {
00552c09                              struct IDirectSoundBuffer* m_pBuf_1 = this->m_pBuf;
00552c18                              var_1c = 0;
00552c2f                              void pwfxDst;
00552c2f                              
00552c2f                              if (((m_pBuf_1->vtable->GetFormat(m_pBuf_1, &pwfxDst, 0x12, &var_1c) == 0 && var_1c <= 0x12) && j_acmStreamOpen(&phas, nullptr, ADJ(esi_1)->m_pwfmt, &pwfxDst, nullptr, nullptr, nullptr, 0) == 0))
00552c50                                  goto label_552c55;
00552c07                          }
00552c07                          
00552c85                          if (ebp_1 != 0)
00552c87                              ebp_1->vtable->Release();
00552bf2                      }
00552be7                  }
00552bd2              }
00552bc3          }
00552bc3          else if (this->m_filename != 0)
00552c9f          {
00552ca3              class WaveFile* eax_10 = operator new(0x68);
00552ca3              
00552cad              if (eax_10 != 0)
00552cad              {
00552cb6                  esi_1 = WaveFile::WaveFile(eax_10);
00552cb6                  
00552cba                  if (esi_1 != 0)
00552cba                  {
00552cc4                      PStringBase<char>::PStringBase<char>(&var_1c, this->m_filename);
00552cd0                      WaveFile::Open(esi_1, &var_1c);
00552cd9                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
00552cd9                      
00552ce7                      if (WaveFile::Load(esi_1) != 0)
00552ce7                          goto label_552bf0;
00552ce7                      
00552c31                      ADJ(esi_1)->vtable->__vecDelDtor(1);
00552cba                  }
00552cad              }
00552c9f          }
00552bb2      }
00552bb2      
00552c99      return var_18;
00552b90  }


00552d00  void __thiscall SoundBuf::SoundBuf(class SoundBuf* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00552d00  {
00552d12      this->m_pBuf = nullptr;
00552d15      this->m_p3DBuf = nullptr;
00552d18      this->m_filename = nullptr;
00552d1b      this->m_bufsize = 0;
00552d1e      this->m_tagval = arg3;
00552d21      this->m_3D = arg5;
00552d24      this->m_gid.id = arg2;
00552d27      class CDirSound* eax = GetDirectSound();
00552d2e      this->m_pCDirSound = eax;
00552d2e      
00552d30      if (eax != 0)
00552d30      {
00552d36          int32_t var_c_1 = arg4;
00552d39          SoundBuf::Create(this, arg2);
00552d30      }
00552d00  }

00552d45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00552d50  int32_t __thiscall SoundBuf::Play(class SoundBuf* this, int32_t arg2, int32_t arg3)

00552d50  {
00552d50      int32_t eax = arg2;
00552d50      
00552d5b      if (eax >= 0xfffffff1)
00552d5b      {
00552d67          if (eax > 0xf)
00552d67          {
00552d69              eax = 0xf;
00552d6e              goto label_552d74;
00552d67          }
00552d67          
00552d72          if (eax != 0)
00552d72              goto label_552d74;
00552d5b      }
00552d5b      else
00552d5b      {
00552d5d          eax = 0xfffffff1;
00552d74      label_552d74:
00552d74          struct IDirectSoundBuffer* m_pBuf_3 = this->m_pBuf;
00552d74          
00552d80          if ((m_pBuf_3 != 0 && this->m_3D == 0))
00552d82              m_pBuf_3->vtable->SetPan(m_pBuf_3, (eax * 0x64));
00552d5b      }
00552d5b      
00552d8c      int32_t SoundManager::VOL_MIN_2 = arg3;
00552d90      int32_t SoundManager::VOL_MIN_1 = SoundManager::VOL_MIN;
00552d90      
00552d97      if (SoundManager::VOL_MIN_2 < SoundManager::VOL_MIN_1)
00552d99          SoundManager::VOL_MIN_2 = SoundManager::VOL_MIN_1;
00552d99      
00552d9b      struct IDirectSoundBuffer* m_pBuf = this->m_pBuf;
00552d9b      
00552da0      if (m_pBuf != 0)
00552da2          m_pBuf->vtable->SetVolume(m_pBuf, (SoundManager::VOL_MIN_2 * 0x64));
00552da2      
00552dac      struct IDirectSoundBuffer* m_pBuf_1 = this->m_pBuf;
00552dac      
00552db3      if (m_pBuf_1 == 0)
00552db7          return m_pBuf_1;
00552db7      
00552dc4      if (m_pBuf_1->vtable->SetCurrentPosition(m_pBuf_1, 0) == 0)
00552dc4      {
00552dc6          struct IDirectSoundBuffer* m_pBuf_2 = this->m_pBuf;
00552dd2          int32_t eax_3 = m_pBuf_2->vtable->Play(m_pBuf_2, 0, 0, 0);
00552dd2          
00552dda          if (eax_3 != 0x88780096)
00552dda              goto label_552df6;
00552dda          
00552de5          if (SoundBuf::Restore(this) != 0)
00552de5          {
00552de7              struct IDirectSoundBuffer* m_pBuf_4 = this->m_pBuf;
00552df3              eax_3 = m_pBuf_4->vtable->Play(m_pBuf_4, 0, 0, 0);
00552df6          label_552df6:
00552df6              
00552df8              if (eax_3 == 0)
00552dfa                  return 1;
00552de5          }
00552dc4      }
00552dc4      
00552e03      return 0;
00552d50  }

00552e06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00552e10  int32_t SoundOK()

00552e10  {
00552e10      class CDirSound* pDirSound_1 = pDirSound;
00552e10      
00552e18      if ((pDirSound_1 != 0 && CDirSound::DirectSoundOK(pDirSound_1) != 0))
00552e28          return 1;
00552e28      
00552e2b      return 0;
00552e10  }

00552e2c                                      90 90 90 90                                                              ....

00552e30  class CDirSound* GetDirectSound()

00552e30  {
00552e35      return pDirSound;
00552e30  }

00552e36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00552e40  void SoundCleanup()

00552e40  {
00552e40      class CDirSound* pDirSound_1 = pDirSound;
00552e40      
00552e48      if (pDirSound_1 != 0)
00552e48      {
00552e4d          CDirSound::~CDirSound(pDirSound_1);
00552e53          operator delete(pDirSound_1);
00552e5b          pDirSound = nullptr;
00552e48      }
00552e40  }

00552e67                       90 90 90 90 90 90 90 90 90                                                         .........

00552e70  int32_t __fastcall SoundSetup(struct HWND__* arg1)

00552e70  {
00552e70      class PStringBase<char> ecx;
00552e70      class PStringBase<char> var_4 = ecx;
00552e73      struct HWND__* edi = arg1;
00552e73      
00552e79      if (edi != 0)
00552e79      {
00552ef1          class CDirSound* pDirSound_1 = pDirSound;
00552ef1          
00552ef9          if (pDirSound_1 != 0)
00552ef9          {
00552efd              CDirSound::~CDirSound(pDirSound_1);
00552f03              operator delete(pDirSound_1);
00552f0b              pDirSound = nullptr;
00552ef9          }
00552ef9          
00552f17          void* eax_4 = operator new(0x24);
00552f17          
00552f21          if (eax_4 == 0)
00552f21          {
00552f49              pDirSound = nullptr;
00552f57              return 0;
00552f21          }
00552f21          
00552f26          class CDirSound* eax_5 = CDirSound::CDirSound(eax_4, edi);
00552f2d          pDirSound = eax_5;
00552f2d          
00552f32          if ((eax_5 != 0 && CDirSound::DirectSoundOK(eax_5) != 0))
00552f47              return 1;
00552e79      }
00552e79      else
00552e79      {
00552e84          PStringBase<char>::PStringBase<char>(&var_4, "SoundSetup Error");
00552e92          PStringBase<char>::PStringBase<char>(&arg1, "SoundSetup requires a valid HWND…");
00552ea3          Device::Error(&arg1, &var_4, edi, edi);
00552eb2          void* __offset(HWND__, -0x14) esi_2 = &arg1[-5];
00552eb2          
00552ec4          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00552ecc              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00552ecc          
00552ed2          int32_t* esi_4 = (var_4 - 0x14);
00552ed2          
00552ee1          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00552ee9              **(uint32_t**)esi_4(1);
00552e79      }
00552e79      
00552ef0      return 0;
00552e70  }

00552f58                                                                          90 90 90 90 90 90 90 90                          ........

00552f60  int32_t SetChannelVolume(uint32_t arg1, uint32_t arg2)

00552f60  {
00552f61      struct HMIDISTRM__* hStream_1 = hStream;
00552f61      
00552f69      if (hStream_1 == 0)
00552f6e          return 0;
00552f6e      
00552f7e      int32_t edx_1 = (dwVolCache[arg1] * arg2);
00552f81      dwVolPctCache[arg1] = arg2;
00552fa0      uint32_t eax_7 = midiOutShortMsg(hStream_1, ((((edx_1 / 0x64) << 0x10) | arg1) | 0x7b0));
00552fa6      int32_t eax_8 = -(eax_7);
00552fac      return ((eax_8 - eax_8) + 1);
00552f60  }

00552fad                                         90 90 90                                                               ...

00552fb0  void FreeBuffers()

00552fb0  {
00552fba      if (b_BuffersAllocated != 0)
00552fba      {
00552fc4          if (bBuffersPrepared != 0)
00552fc4          {
00552fcd              struct MIDIHDR* pmh = &ciStreamBuffers;
00552fd2              int32_t i_2 = 6;
00552fec              int32_t i;
00552fec              
00552fec              do
00552fec              {
00552fe0                  midiOutUnprepareHeader(hStream, pmh, 0x40);
00552fe2                  pmh += 0x54;
00552fe5                  i = i_2;
00552fe5                  i_2 -= 1;
00552fe6                  bBuffersPrepared = 0;
00552fec              } while (i != 1);
00552fc4          }
00552fc4          
0055301f          for (void* i_1 = nullptr; i_1 < 0x1f8; i_1 += 0x54)
0055301f          {
00553000              void* eax_1 = *(uint32_t*)((char*)i_1 + 0x86f7b0);
00553000              
00553008              if (eax_1 != 0)
00553008              {
0055300e                  LocalFree(*(uint32_t*)((char*)eax_1 - 4));
00553010                  *(uint32_t*)((char*)i_1 + 0x86f7b0) = 0;
00553008              }
0055301f          }
0055301f          
00553022          b_BuffersAllocated = 0;
00552fba      }
00552fb0  }

00552ff9                                                                             8d a4 24 00 00 00 00                           ..$....
0055302b                                   90 90 90 90 90                                                             .....

00553030  int32_t StreamBufferSetup(char* arg1)

00553030  {
0055303d      int32_t var_c = 0;
0055303d      
00553041      if ((hStream == 0 && midiStreamOpen(&hStream, &uMIDIDeviceID, 1, MidiProc, nullptr, 0x30000) != 0))
0055306a          return 0;
0055306a      
00553074      int32_t i_1 = 0;
00553076      void* esi = nullptr;
00553076      
0055307f      while (true)
0055307f      {
0055307f          *(uint32_t*)((char*)esi + 0x86f7b4) = 0x400;
00553089          int32_t* eax_3 = LocalAlloc(LMEM_ZEROINIT, 0x423);
0055308d          void* ecx_1;
0055308d          
0055308d          if (eax_3 != 0)
0055308d          {
00553096              ecx_1 = (((char*)eax_3 + 0x23) & 0xffffffe0);
00553099              *(uint32_t*)((char*)ecx_1 - 4) = eax_3;
0055308d          }
0055308d          else
0055308f              ecx_1 = nullptr;
0055308f          
0055309e          *(uint32_t*)((char*)esi + 0x86f7b0) = ecx_1;
0055309e          
005530a4          if (ecx_1 == 0)
005530a4          {
0055310c              if (i_1 > 0)
0055310c              {
00553114                  int32_t* esi_1 = &ciStreamBuffers;
00553132                  int32_t i;
00553132                  
00553132                  do
00553132                  {
00553120                      void* eax_7 = *(uint32_t*)esi_1;
00553120                      
00553124                      if (eax_7 != 0)
00553124                      {
0055312a                          LocalFree(*(uint32_t*)((char*)eax_7 - 4));
0055312c                          *(uint32_t*)esi_1 = 0;
00553124                      }
00553124                      
0055312e                      esi_1 = &esi_1[0x15];
00553131                      i = i_1;
00553131                      i_1 -= 1;
00553132                  } while (i != 1);
0055310c              }
0055310c              
0055310c              break;
005530a4          }
005530a4          
005530a6          esi += 0x54;
005530a9          i_1 += 1;
005530a9          
005530b0          if (esi >= 0x1f8)
005530b0          {
005530bc              b_BuffersAllocated = 1;
005530bc              
005530cc              if (ConverterInit(arg1) != 0)
005530cc                  break;
005530cc              
005530ce              struct HMIDISTRM__* hStream_1 = hStream;
005530d4              uint32_t dwTimeDivision = ifs.dwTimeDivision;
005530e5              int32_t lppropdata = 8;
005530ed              uint32_t dwTimeDivision_1 = dwTimeDivision;
005530ed              
005530f9              if (midiStreamProperty(hStream_1, &lppropdata, 0x80000001) == 0)
005530f9              {
0055314a                  int32_t eax_10 = 0;
0055314c                  nEmptyBuffers = 6;
00553158                  nCurrentBuffer = 0;
0055315d                  uint32_t ecx_4 = 1;
0055315d                  
00553160                  while (true)
00553160                  {
00553160                      void* eax_11 = (eax_10 * 0x54);
00553163                      *(uint32_t*)((char*)eax_11 + 0x86f7f0) = 0;
0055316f                      *(uint32_t*)((char*)eax_11 + 0x86f7f4) = 0x400;
0055317a                      *(uint32_t*)((char*)eax_11 + 0x86f7fc) = 0;
00553181                      *(uint32_t*)((char*)eax_11 + 0x86f800) = 0;
00553187                      int32_t eax_12 = ConvertToBuffer(ecx_4, ((char*)eax_11 + 0x86f7b0));
00553187                      
00553191                      if (eax_12 != 0)
00553191                      {
00553196                          if (eax_12 != 0xffffff99)
00553196                              break;
00553196                          
0055319c                          var_c = 1;
00553191                      }
00553191                      
005531a0                      int32_t nCurrentBuffer_1 = nCurrentBuffer;
005531a7                      void* ecx_6 = (nCurrentBuffer_1 * 0x54);
005531b0                      *(uint32_t*)((char*)ecx_6 + 0x86f7b8) = *(uint32_t*)((char*)ecx_6 + 0x86f7f8);
005531b0                      
005531bc                      if (bBuffersPrepared == 0)
005531bc                      {
005531d2                          if (midiOutPrepareHeader(hStream, ((char*)ecx_6 + 0x86f7b0), 0x40) != 0)
005531d2                              break;
005531d2                          
005531d8                          nCurrentBuffer_1 = nCurrentBuffer;
005531bc                      }
005531bc                      
005531f3                      if (midiStreamOut(hStream, ((nCurrentBuffer_1 * 0x54) + 0x86f7b0), 0x40) == 0)
005531f3                      {
00553200                          nEmptyBuffers -= 1;
00553206                          ecx_4 = 0;
00553206                          
0055320a                          if (var_c == 0)
0055320a                          {
00553211                              eax_10 = (nCurrentBuffer + 1);
00553215                              nCurrentBuffer = eax_10;
00553215                              
0055321a                              if (eax_10 < 6)
0055321a                                  continue;
0055320a                          }
005531f3                      }
005531f3                      
00553222                      bBuffersPrepared = 1;
0055322b                      nCurrentBuffer = 0;
00553235                      return 1;
00553160                  }
005530f9              }
005530f9              
005530fb              ConverterCleanup();
00553109              return 0;
005530b0          }
0055307f      }
0055307f      
0055313d      return 0;
00553030  }

00553236                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00553240  void midiStop()

00553240  {
00553240      struct HMIDISTRM__* hStream_2 = hStream;
00553240      
0055324b      if (hStream_2 != 0)
0055324b      {
0055325f          uint32_t uCallbackStatus_1;
0055325f          
0055325f          if ((bPlaying == 0 && bFileOpen == 0))
0055325f          {
00553261              uCallbackStatus_1 = uCallbackStatus;
00553261              
0055326b              if (uCallbackStatus_1 == 0xc8)
0055326b                  goto label_5532ae;
0055326b              
00553280              if (uCallbackStatus_1 == 0x12c)
00553280                  goto label_55328d;
00553280              
00553280              goto label_553282;
0055325f          }
0055325f          
0055326f          uCallbackStatus_1 = uCallbackStatus;
0055326f          
00553280          if ((uCallbackStatus_1 == 0xc8 || uCallbackStatus_1 == 0x12c))
00553279              goto label_55328d;
00553279          
00553282      label_553282:
00553282          uCallbackStatus = 0x64;
0055328d      label_55328d:
0055328d          
00553295          if (midiStreamStop(hStream_2) == 0)
00553295          {
0055329b              hStream_2 = hStream;
005532a1              bPaused = 0;
005532a7              bPlaying = 0;
005532ae          label_5532ae:
005532ae              
005532b6              if ((midiOutReset(hStream_2) == 0 && (WaitForSingleObject(hBufferReturnEvent, 0x7d0) == 0x102 || uCallbackStatus == 0xc8)))
005532b6              {
005532e0                  bool cond:0_1 = bFileOpen == 0;
005532e6                  uCallbackStatus = 0;
005532e6                  
005532ec                  if (!(cond:0_1))
005532ec                  {
005532ee                      ConverterCleanup();
005532f3                      bFileOpen = 0;
005532ec                  }
005532ec                  
005532f9                  FreeBuffers();
005532fe                  struct HMIDISTRM__* hStream_1 = hStream;
005532fe                  
00553305                  if (hStream_1 != 0)
00553305                  {
00553308                      midiStreamClose(hStream_1);
00553325                      hStream = nullptr;
0055332b                      midiStreamOpen(&hStream, &uMIDIDeviceID, 1, MidiProc, nullptr, 0x30000);
00553305                  }
00553305                  
00553331                  is_pending = 0;
00553337                  pending_loop = 0;
0055333d                  dwQueuedTempoMultiplier = 0x64;
005532b6              }
00553295          }
0055324b      }
00553240  }

00553349                             90 90 90 90 90 90 90                                                           .......

00553350  void midiCleanup()

00553350  {
00553351      midiStop();
00553356      struct HMIDISTRM__* hStream_1 = hStream;
00553356      
0055335f      if (hStream_1 != 0)
0055335f      {
00553362          midiStreamClose(hStream_1);
00553368          hStream = nullptr;
0055335f      }
0055335f      
0055336e      void* hBufferReturnEvent_1 = hBufferReturnEvent;
0055336e      
00553375      if (hBufferReturnEvent_1 != 0)
00553375      {
00553378          CloseHandle(hBufferReturnEvent_1);
0055337e          hBufferReturnEvent = nullptr;
00553375      }
00553375      
00553384      MidiIsSetup = 0;
00553350  }

0055338c                                      90 90 90 90                                                              ....

00553390  int32_t midiPlay(char* arg1, int32_t arg2, int32_t arg3, uint32_t arg4)

00553390  {
00553395      bool cond:0 = bPlaying != 0;
005533a3      dwTempoMultiplier = arg4;
005533a9      bInsertTempo = 1;
005533a9      
005533b8      if ((cond:0 || bFileOpen != 0))
005533b8      {
005533c0          if (arg3 == 0)
005533c0          {
00553499              lstrcpyA(&pending, arg1);
005534a4              dwQueuedTempoMultiplier = arg4;
005534ab              is_pending = 1;
005534b3              pending_loop = arg2;
005534ba              return 1;
005533c0          }
005533c0          
005533c6          midiStop();
005533b8      }
005533b8      
005533da      if (StreamBufferSetup(arg1) != 0)
005533da      {
005533e2          int32_t esi_1 = 0;
005533e2          
00553404          while (true)
00553404          {
00553404              int32_t eax_4;
00553404              int32_t edx_1;
00553404              edx_1 = HIGHD((0x51eb851f * (dwVolPctCache[esi_1] * dwVolCache[esi_1])));
00553404              eax_4 = LOWD((0x51eb851f * (dwVolPctCache[esi_1] * dwVolCache[esi_1])));
00553422              uint32_t eax_10 = midiOutShortMsg(hStream, ((((edx_1 >> 5) << 0x10) | (esi_1 + 0xb0)) | 0x700));
00553422              
00553426              if (eax_10 != 0)
00553426                  break;
00553426              
00553428              esi_1 += 1;
00553428              
0055342c              if (esi_1 >= 0x10)
0055342c              {
0055342e                  uCallbackStatus = eax_10;
00553433                  void (* midiStartCallback_1)() = midiStartCallback;
0055343a                  bFileOpen = 1;
0055343a                  
00553440                  if (midiStartCallback_1 != 0)
00553442                      midiStartCallback_1();
00553442                  
00553453                  if (midiStreamRestart(hStream) != 0)
00553453                      break;
00553453                  
00553461                  bPlaying = 1;
00553469                  bLooped = arg2;
0055346f                  is_pending = 0;
00553479                  pending_loop = 0;
00553483                  dwQueuedTempoMultiplier = 0x64;
0055348e                  return 1;
0055342c              }
00553404          }
005533da      }
005533da      
0055345a      return 0;
00553390  }

005533e6                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.
005534bb                                                                                   90 90 90 90 90                             .....

005534c0  int32_t midiPlayNext()

005534c0  {
005534c7      if (is_pending == 0)
005534f2          return 0;
005534f2      
005534c9      uint32_t dwQueuedTempoMultiplier_1 = dwQueuedTempoMultiplier;
005534ce      int32_t pending_loop_1 = pending_loop;
005534dd      is_pending = 0;
005534ef      return midiPlay(&pending, pending_loop_1, 1, dwQueuedTempoMultiplier_1);
005534c0  }

005534f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00553500  void __stdcall MidiProc(struct HMIDIIN__* arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5)

00553500  {
0055350b      if (arg2 == 0x3c9)
0055350b      {
0055361b          uint32_t uCallbackStatus_1 = uCallbackStatus;
0055361b          
00553628          if (uCallbackStatus_1 != 0xc8)
00553628          {
00553633              int32_t eax_13 = (nEmptyBuffers + 1);
0055363a              nEmptyBuffers = eax_13;
0055363a              
0055363f              if (uCallbackStatus_1 != 0x12c)
0055363f              {
0055367c                  if (uCallbackStatus_1 != 0x64)
0055367c                  {
005536b1                      if ((bPlaying != 0 && eax_13 != 0))
005536b1                      {
005536bc                          void* eax_16 = (nCurrentBuffer * 0x54);
005536bf                          *(uint32_t*)((char*)eax_16 + 0x86f7f0) = 0;
005536c5                          *(uint32_t*)((char*)eax_16 + 0x86f7f4) = 0x400;
005536d5                          *(uint32_t*)((char*)eax_16 + 0x86f7fc) = 0;
005536dc                          *(uint32_t*)((char*)eax_16 + 0x86f7f8) = 0;
005536e3                          *(uint32_t*)((char*)eax_16 + 0x86f800) = 0;
005536e9                          int32_t eax_17 = ConvertToBuffer(0, ((char*)eax_16 + 0x86f7b0));
005536e9                          
005536f3                          if (eax_17 != 0)
005536f3                          {
005536f8                              if (eax_17 != 0xffffff99)
005536f8                              {
00553740                                  ConverterCleanup();
00553747                                  return;
005536f8                              }
005536f8                              
005536fb                              nWaitingBuffers = 5;
00553705                              uCallbackStatus = 0x12c;
00553710                              return;
005536f3                          }
005536f3                          
00553718                          void* eax_19 = (nCurrentBuffer * 0x54);
00553729                          *(uint32_t*)((char*)eax_19 + 0x86f7b8) = *(uint32_t*)((char*)eax_19 + 0x86f7f8);
00553729                          
0055373e                          if (midiStreamOut(hStream, ((char*)eax_19 + 0x86f7b0), 0x40) != 0)
0055373e                          {
00553740                              ConverterCleanup();
00553747                              return;
0055373e                          }
0055373e                          
00553750                          int32_t eax_24;
00553750                          int32_t edx_9;
00553750                          edx_9 = HIGHD(((int64_t)(nCurrentBuffer + 1)));
00553750                          eax_24 = LOWD(((int64_t)(nCurrentBuffer + 1)));
00553758                          nEmptyBuffers -= 1;
0055375e                          nCurrentBuffer = (COMBINE(edx_9, eax_24) % 6);
005536b1                      }
0055367c                  }
0055367c                  else if (eax_13 >= 6)
00553681                  {
00553687                      void* hBufferReturnEvent_2 = hBufferReturnEvent;
0055368e                      uCallbackStatus = 0xc8;
00553694                      SetEvent(hBufferReturnEvent_2);
00553681                  }
0055363f              }
0055363f              else if (eax_13 >= 6)
00553644              {
0055364a                  void* hBufferReturnEvent_1 = hBufferReturnEvent;
00553650                  uCallbackStatus = 0xc8;
00553656                  SetEvent(hBufferReturnEvent_1);
00553656                  
00553663                  if (is_pending != 0)
00553663                  {
00553665                      midiPlayNext();
0055366c                      return;
00553663                  }
00553663                  
0055366f                  midiStop();
00553644              }
00553628          }
0055350b      }
0055350b      else if (arg2 == 0x3ca)
00553512      {
0055351c          int32_t edx_1 = *(uint32_t*)arg4;
0055351e          void* esi_1 = *(uint32_t*)(arg4 + 0x1c);
00553521          int32_t eax_3 = *(uint32_t*)(((char*)esi_1 + edx_1) + 8);
00553525          void* esi_2 = ((char*)esi_1 + edx_1);
0055352b          int32_t edx_3 = (eax_3 & 0xf);
0055352e          int32_t ecx_2 = (eax_3 & 0xf0);
0055352e          
0055353c          if (ecx_2 == 0x80)
0055353c          {
005535f0              if ((edx_3 == 0xe || edx_3 == 0xf))
005535f0              {
005535f6                  void (* midiEventCallback_3)(uint8_t, int32_t, uint32_t) = midiEventCallback;
005535f6                  
005535fe                  if (midiEventCallback_3 != 0)
00553611                      midiEventCallback_3(0x80, edx_3, ((eax_3 >> 0x10) & 0x7f));
005535f0              }
0055353c          }
0055353c          else if (ecx_2 == 0x90)
00553545          {
005535bd              if ((edx_3 == 0xe || edx_3 == 0xf))
005535bd              {
005535c3                  void (* midiEventCallback_2)(uint8_t, int32_t, uint32_t) = midiEventCallback;
005535c3                  
005535cb                  if (midiEventCallback_2 != 0)
005535de                      midiEventCallback_2(0x90, edx_3, ((eax_3 >> 0x10) & 0x7f));
005535bd              }
00553545          }
00553545          else if ((ecx_2 == 0xb0 && *(uint8_t*)((char*)esi_2 + 9) == 7))
00553554          {
00553560              dwVolCache[edx_3] = ((eax_3 >> 0x10) & 0x7f);
0055356a              uint32_t eax_7 = (*(uint32_t*)((char*)esi_2 + 8) & 0xf);
00553576              SetChannelVolume(eax_7, dwVolPctCache[eax_7]);
00553576              
00553586              if ((edx_3 == 0xe || edx_3 == 0xf))
00553586              {
0055358c                  void (* midiEventCallback_1)(uint8_t, int32_t, uint32_t) = midiEventCallback;
0055358c                  
00553593                  if (midiEventCallback_1 != 0)
00553593                  {
00553599                      int32_t esi_3 = *(uint32_t*)((char*)esi_2 + 8);
005535ab                      midiEventCallback_1(7, (esi_3 & 0xf), ((esi_3 >> 0x10) & 0x7f));
00553593                  }
00553586              }
00553554          }
00553512      }
00553500  }

00553769                             90 90 90 90 90 90 90                                                           .......

00553770  int32_t midiSetup()

00553770  {
0055377a      if (MidiIsSetup != 0)
0055377a      {
0055377c          midiStop();
00553781          struct HMIDISTRM__* hStream_1 = hStream;
00553781          
00553788          if (hStream_1 != 0)
00553788          {
0055378b              midiStreamClose(hStream_1);
00553791              hStream = nullptr;
00553788          }
00553788          
00553797          void* hBufferReturnEvent_1 = hBufferReturnEvent;
00553797          
0055379e          if (hBufferReturnEvent_1 != 0)
0055379e          {
005537a1              CloseHandle(hBufferReturnEvent_1);
005537a7              hBufferReturnEvent = nullptr;
0055379e          }
0055377a      }
0055377a      
005537ad      MidiIsSetup = 0;
005537b3      is_pending = 0;
005537b3      
005537c1      if (midiOutGetNumDevs() != 0)
005537c1      {
005537d3          int32_t ecx_1;
005537d3          int32_t edi_1;
005537d3          edi_1 = __memfill_u32(0x86f9e8, 0x64, 0x10);
005537df          int32_t ecx_2;
005537df          int32_t edi_2;
005537df          edi_2 = __memfill_u32(0x86f9a8, 0x64, 0x10);
005537e1          dwTempoMultiplier = 0x64;
005537ed          HANDLE eax_1;
005537ed          
005537ed          if (hBufferReturnEvent == 0)
005537ed          {
005537f7              eax_1 = CreateEventA(nullptr, 0, 0, "Wait For Buffer Return");
005537ff              hBufferReturnEvent = eax_1;
005537ed          }
005537ed          
00553804          if (((hBufferReturnEvent != 0 || eax_1 != 0) && midiStreamOpen(&hStream, &uMIDIDeviceID, 1, MidiProc, nullptr, 0x30000) == 0))
00553804          {
00553827              MidiIsSetup = 1;
00553837              return 1;
00553804          }
005537c1      }
005537c1      
0055383b      return 0;
00553770  }

0055383c                                                                                      90 90 90 90                              ....

00553840  int32_t __fastcall WaveFile::Cue(class WaveFile* this)

00553840  {
0055385f      if (mmioSeek(this->m_hmmio, (this->m_mmckiRiff.dwDataOffset + 4), 0) == 0xffffffff)
0055388a          this->m_mmr = 0x107;
0055385f      else
0055385f      {
0055386b          __builtin_strncpy(&this->m_mmckiData, "data", 4);
00553875          uint32_t eax_5 = mmioDescend(this->m_hmmio, &this->m_mmckiData, &this->m_mmckiRiff, 0x10);
0055387d          this->m_mmr = eax_5;
0055387d          
00553880          if (eax_5 == 0)
00553880          {
00553882              this->m_nBytesPlayed = eax_5;
00553889              return 1;
00553880          }
0055385f      }
0055385f      
00553895      return 0;
00553840  }

00553896                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005538a0  uint32_t __thiscall WaveFile::Read(class WaveFile* this, uint8_t* arg2, uint32_t arg3)

005538a0  {
005538b4      void pmmioinfo;
005538b4      uint32_t eax = mmioGetInfo(this->m_hmmio, &pmmioinfo, 0);
005538bc      this->m_mmr = eax;
005538bc      
005538bf      if (eax == 0)
005538bf      {
005538c1          uint32_t cksize = this->m_mmckiData.cksize;
005538c4          uint32_t result = arg3;
005538c4          
005538ca          if (result > cksize)
005538cc              result = cksize;
005538cc          
005538d0          char* edi_1 = nullptr;
005538d4          this->m_mmckiData.cksize = (cksize - result);
005538d4          
005538d7          if (result > 0)
005538d7          {
005538d9              int32_t var_28;
005538d9              int32_t ebp_1 = var_28;
005538dd              char* var_2c;
005538dd              char* eax_2 = var_2c;
005538dd              
0055391a              do
0055391a              {
005538e3                  if (eax_2 == ebp_1)
005538e3                  {
005538f0                      uint32_t eax_4 = mmioAdvance(this->m_hmmio, &pmmioinfo, 0);
005538f8                      this->m_mmr = eax_4;
005538f8                      
005538fb                      if (eax_4 != 0)
0055393d                          return 0;
0055393d                      
005538fd                      eax_2 = var_2c;
00553901                      ebp_1 = var_28;
00553901                      
00553907                      if (eax_2 == ebp_1)
00553907                      {
00553941                          this->m_mmr = 0x105;
00553950                          return 0;
00553907                      }
005538e3                  }
005538e3                  
00553909                  char ecx_1 = *(uint8_t*)eax_2;
0055390f                  eax_2 = &eax_2[1];
00553910                  *(uint8_t*)(edi_1 + arg2) = ecx_1;
00553913                  edi_1 = &edi_1[1];
00553916                  var_2c = eax_2;
0055391a              } while (edi_1 < result);
005538d7          }
005538d7          
00553927          uint32_t eax_5 = mmioSetInfo(this->m_hmmio, &pmmioinfo, 0);
0055392f          this->m_mmr = eax_5;
0055392f          
00553932          if (eax_5 == 0)
00553932          {
00553959              this->m_nBytesPlayed += result;
00553964              return result;
00553932          }
005538bf      }
005538bf      
0055393d      return 0;
005538a0  }

00553967                       90 90 90 90 90 90 90 90 90                                                         .........

00553970  uint32_t __fastcall WaveFile::Load(class WaveFile* this)

00553970  {
0055397b      if (this->m_nDataSize == 0)
00553981          return 0;
00553981      
00553982      uint8_t* m_pData = this->m_pData;
00553982      
00553987      if (m_pData != 0)
0055398a          operator delete[](m_pData);
0055398a      
00553996      void* eax_3 = operator new[](this->m_nDataSize);
005539a0      this->m_pData = eax_3;
005539a0      
005539a3      if (eax_3 != 0)
005539a3      {
005539a6          uint32_t m_nDataSize = this->m_nDataSize;
005539a6          
005539b6          if (WaveFile::Read(this, eax_3, m_nDataSize) == m_nDataSize)
005539b8              return m_nDataSize;
005539a3      }
005539a3      
005539bf      return 0;
00553970  }


005539c0  void __fastcall WaveFile::WaveFile(class WaveFile* this)

005539c0  {
005539c4      this->vtable = 0x7cb320;
005539ca      this->m_pData = nullptr;
005539cd      this->m_pwfmt = nullptr;
005539d0      this->m_hmmio = nullptr;
005539e8      __builtin_memset(&this->m_mmckiRiff, 0, 0x54);
005539c0  }

00553a19                                                                             90 90 90 90 90 90 90                           .......

00553a20  void __fastcall WaveFile::ReleaseAll(class WaveFile* this)

00553a20  {
00553a23      struct HMMIO__* m_hmmio = this->m_hmmio;
00553a23      
00553a2b      if (m_hmmio != 0)
00553a2b      {
00553a2f          mmioClose(m_hmmio, 0);
00553a35          this->m_hmmio = nullptr;
00553a2b      }
00553a2b      
00553a38      uint8_t* m_pData = this->m_pData;
00553a38      
00553a3d      if (m_pData != 0)
00553a3d      {
00553a40          operator delete[](m_pData);
00553a48          this->m_pData = nullptr;
00553a3d      }
00553a3d      
00553a4b      struct tWAVEFORMATEX* m_pwfmt = this->m_pwfmt;
00553a4b      
00553a50      if (m_pwfmt != 0)
00553a50      {
00553a53          operator delete[](m_pwfmt);
00553a5b          this->m_pwfmt = nullptr;
00553a50      }
00553a50      
00553a5e      this->m_pData = nullptr;
00553a61      this->m_pwfmt = nullptr;
00553a64      this->m_hmmio = nullptr;
00553a7e      __builtin_memset(&this->m_mmckiRiff, 0, 0x54);
00553a20  }

00553ab5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00553ac0  int32_t __thiscall WaveFile::Open(class WaveFile* this, class PStringBase<char> const* arg2)

00553ac0  {
00553ac8      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
00553acb      int32_t pch = 0;
00553ada      void* pszFileName = operator new[](m_charbuffer->m_data[-4]);
00553ae1      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00553ae9      strncpy(pszFileName, m_charbuffer_1, m_charbuffer_1->m_data[-4]);
00553b01      this->m_hmmio = mmioOpenA(pszFileName, nullptr, 0x10000);
00553b04      operator delete[](pszFileName);
00553b09      struct HMMIO__* m_hmmio_2 = this->m_hmmio;
00553b09      
00553b11      if (m_hmmio_2 == 0)
00553b11      {
00553b14          this->m_mmr = 0x103;
00553b20          return m_hmmio_2;
00553b11      }
00553b11      
00553b33      uint32_t eax_2 = mmioDescend(m_hmmio_2, &this->m_mmckiRiff.ckid, nullptr, 0);
00553b37      this->m_mmr = eax_2;
00553b3a      class WaveFile* this_1;
00553b3a      
00553b3a      if (eax_2 != 0)
00553ca2          this_1 = this;
00553b3a      else if ((this->m_mmckiRiff.ckid != 0x46464952 || this->m_mmckiRiff.fccType != 0x45564157))
00553b53      {
00553c9b          this->m_mmr = 0x110;
00553ca2          this_1 = this;
00553b53      }
00553b53      else
00553b53      {
00553b63          HMMIO m_hmmio = this->m_hmmio;
00553b64          __builtin_strncpy(&this->m_mmckiFmt, "fmt ", 4);
00553b6a          uint32_t eax_3 = mmioDescend(m_hmmio, &this->m_mmckiFmt.ckid, &this->m_mmckiRiff, 0x10);
00553b6e          this->m_mmr = eax_3;
00553b6e          
00553b71          if (eax_3 != 0)
00553ca2              this_1 = this;
00553b71          else
00553b71          {
00553b8d              int16_t pch_1;
00553b8d              
00553b8d              if (mmioRead(this->m_hmmio, &pch_1, 0x10) != 0x10)
00553b8d              {
00553c1b              label_553c1b:
00553c1b                  this->m_mmr = 0x105;
00553c22                  WaveFile::ReleaseAll(this);
00553c30                  return 0;
00553b8d              }
00553b8d              
00553b99              if ((pch_1 != 1 && mmioRead(this->m_hmmio, &pch, 2) != 2))
00553bab                  goto label_553c1b;
00553bab              
00553bb2              uint32_t eax_8 = (((uint32_t)pch) + 0x12);
00553bb6              this->m_nFormatSize = eax_8;
00553bb9              void* eax_9 = operator new[](eax_8);
00553bc3              this->m_pwfmt = eax_9;
00553bc3              
00553bc6              if (eax_9 == 0)
00553bc6              {
00553c83                  this->m_mmr = 0x102;
00553c8a                  WaveFile::ReleaseAll(this);
00553c98                  return 0;
00553bc6              }
00553bc6              
00553bd0              *(uint32_t*)eax_9 = pch_1;
00553bd6              int32_t var_c;
00553bd6              *(uint32_t*)((char*)eax_9 + 4) = var_c;
00553bdd              int32_t var_8;
00553bdd              *(uint32_t*)((char*)eax_9 + 8) = var_8;
00553be4              int32_t var_4;
00553be4              *(uint32_t*)((char*)eax_9 + 0xc) = var_4;
00553bea              int32_t ecx_3;
00553bea              ecx_3 = pch;
00553be7              this->m_pwfmt->cbSize = ecx_3;
00553bf3              int16_t pch_2 = ((int16_t)pch);
00553bf3              
00553bfa              if (pch_2 != 0)
00553bfa              {
00553c0b                  int32_t eax_13 = mmioRead(this->m_hmmio, &this->m_pwfmt[1], ((uint32_t)pch_2));
00553c12                  bool cond:4_1 = eax_13 == ((uint32_t)pch);
00553c14                  this->m_mmr = eax_13;
00553c14                  
00553c17                  if (!(cond:4_1))
00553c17                      goto label_553c1b;
00553bfa              }
00553bfa              
00553c33              struct tWAVEFORMATEX* m_pwfmt = this->m_pwfmt;
00553c3c              this->m_nBlockAlign = ((uint32_t)m_pwfmt->nBlockAlign);
00553c46              HMMIO m_hmmio_1 = this->m_hmmio;
00553c47              this->m_nAvgDataRate = m_pwfmt->nAvgBytesPerSec;
00553c4a              uint32_t eax_16 = mmioAscend(m_hmmio_1, &this->m_mmckiFmt, 0);
00553c52              this->m_mmr = eax_16;
00553c55              this_1 = this;
00553c55              
00553c57              if (eax_16 == 0)
00553c57              {
00553c59                  WaveFile::Cue(this_1);
00553c5e                  uint32_t cksize = this->m_mmckiData.cksize;
00553c61                  this->m_nDataSize = cksize;
00553c71                  this->m_nDuration = (COMBINE(0, (cksize * 0x3e8)) / this->m_nAvgDataRate);
00553c7e                  return 1;
00553c57              }
00553b71          }
00553b53      }
00553b53      
00553ca4      WaveFile::ReleaseAll(this_1);
00553cb2      return 0;
00553ac0  }

00553cb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00553cc0  void __fastcall WaveFile::~WaveFile(class WaveFile* this)

00553cc0  {
00553cc0      this->vtable = 0x7cb320;
00553cc6      /* tailcall */
00553cc6      return WaveFile::ReleaseAll(this);
00553cc0  }

00553ccb                                   90 90 90 90 90                                                             .....

00553cd0  void* __thiscall WaveFile::`scalar deleting destructor'(class WaveFile* this, uint32_t arg2)

00553cd0  {
00553cd3      this->vtable = 0x7cb320;
00553cd9      WaveFile::ReleaseAll(this);
00553cd9      
00553ce3      if ((arg2 & 1) != 0)
00553ce6          operator delete(this);
00553ce6      
00553cf1      return this;
00553cd0  }

00553cf4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00553d00  int32_t __fastcall CDirSound::DirectSoundOK(class CDirSound* this)

00553d00  {
00553d07      int32_t result;
00553d07      result = this->m_pDirectSoundObj != 0;
00553d0a      return result;
00553d00  }

00553d0b                                   90 90 90 90 90                                                             .....

00553d10  void __thiscall CDirSound::CDirSound(class CDirSound* this, struct HWND__* arg2)

00553d10  {
00553d1d      int32_t var_38 = 0;
00553d29      int32_t var_40 = 0;
00553d2b      this->m_hWindow = arg2;
00553d1f      this->m_pDirectSoundObj = nullptr;
00553d23      this->m_lpDs3dListener = nullptr;
00553d26      this->m_3DSoundBuffer = nullptr;
00553d26      
00553d48      if (j_DirectSoundCreate(var_40, &this->m_pDirectSoundObj, var_38) == 0)
00553d48      {
00553d51          struct IDirectSound* m_pDirectSoundObj = this->m_pDirectSoundObj;
00553d51          
00553d5e          if (m_pDirectSoundObj->vtable->SetCooperativeLevel(m_pDirectSoundObj, this->m_hWindow, 2) != 0)
00553d5e          {
00553d1f              this->m_pDirectSoundObj = nullptr;
00553d6f              return;
00553d5e          }
00553d5e          
00553d7d          int32_t s;
00553d7d          __builtin_memset(&s, 0, 0x24);
00553d7f          struct IDirectSound* m_pDirectSoundObj_1 = this->m_pDirectSoundObj;
00553d84          int32_t var_38_2 = 0;
00553d8a          int32_t* var_40_2 = &s;
00553d8b          s = 0x24;
00553d93          int32_t var_20_1 = 0x11;
00553d9b          int32_t var_1c_1 = 0;
00553d9b          
00553da7          if (m_pDirectSoundObj_1->vtable->CreateSoundBuffer(m_pDirectSoundObj_1, var_40_2, &this->m_3DSoundBuffer, var_38_2) == 0)
00553da7          {
00553dad              struct IDirectSoundBuffer* m_3DSoundBuffer = this->m_3DSoundBuffer;
00553dad              
00553dbd              if (m_3DSoundBuffer->vtable->QueryInterface(m_3DSoundBuffer, 0x7fd730, &this->m_lpDs3dListener) == 0)
00553dbd              {
00553dbf                  struct IDirectSound3DListener* m_lpDs3dListener = this->m_lpDs3dListener;
00553dc1                  m_lpDs3dListener->vtable->SetRolloffFactor(m_lpDs3dListener, 0x3c23d70a, 1);
00553dce                  struct IDirectSound3DListener* m_lpDs3dListener_1 = this->m_lpDs3dListener;
00553dd0                  struct IDirectSound3DListener::VTable* vtable = m_lpDs3dListener_1->vtable;
00553dd2                  int32_t var_38_5 = 1;
00553dd4                  int32_t var_3c_5 = 0;
00553dd5                  int32_t var_40_5 = 0x3f800000;
00553dda                  int32_t var_44_2 = 0;
00553ddb                  int32_t var_48 = 0;
00553de3                  vtable->SetOrientation(m_lpDs3dListener_1, 0xbf800000, 0, var_48, var_44_2, var_40_5, var_3c_5, var_38_5);
00553de6                  struct IDirectSound3DListener* m_lpDs3dListener_2 = this->m_lpDs3dListener;
00553de8                  m_lpDs3dListener_2->vtable->CommitDeferredSettings(m_lpDs3dListener_2);
00553dee                  struct IDirectSoundBuffer* m_3DSoundBuffer_1 = this->m_3DSoundBuffer;
00553df2                  this->m_defaultFormat.wFormatTag = 1;
00553df7                  this->m_defaultFormat.nChannels = 2;
00553dfd                  this->m_defaultFormat.wBitsPerSample = 0x10;
00553e03                  this->m_defaultFormat.nSamplesPerSec = 0x2b11;
00553e0a                  this->m_defaultFormat.nBlockAlign = 4;
00553e10                  this->m_defaultFormat.nAvgBytesPerSec = 0xac44;
00553e17                  this->m_defaultFormat.cbSize = 0;
00553e1b                  m_3DSoundBuffer_1->vtable->SetFormat(m_3DSoundBuffer_1, this);
00553e21                  struct IDirectSoundBuffer* m_3DSoundBuffer_2 = this->m_3DSoundBuffer;
00553e24                  m_3DSoundBuffer_2->vtable->Play(m_3DSoundBuffer_2, 0, 0, 1);
00553dbd              }
00553da7          }
00553d48      }
00553d10  }

00553e3b                                                                                   90 90 90 90 90                             .....

00553e40  void __fastcall CDirSound::~CDirSound(class CDirSound* this)

00553e40  {
00553e43      struct IDirectSound3DListener* m_lpDs3dListener = this->m_lpDs3dListener;
00553e43      
00553e48      if (m_lpDs3dListener != 0)
00553e48      {
00553e4a          m_lpDs3dListener->vtable->Release(m_lpDs3dListener);
00553e50          this->m_lpDs3dListener = nullptr;
00553e48      }
00553e48      
00553e57      struct IDirectSoundBuffer* m_3DSoundBuffer = this->m_3DSoundBuffer;
00553e57      
00553e5c      if (m_3DSoundBuffer != 0)
00553e5c      {
00553e5e          m_3DSoundBuffer->vtable->Release(m_3DSoundBuffer);
00553e64          this->m_3DSoundBuffer = nullptr;
00553e5c      }
00553e5c      
00553e6b      struct IDirectSound* m_pDirectSoundObj = this->m_pDirectSoundObj;
00553e6b      
00553e70      if (m_pDirectSoundObj != 0)
00553e70      {
00553e72          m_pDirectSoundObj->vtable->Release(m_pDirectSoundObj);
00553e78          this->m_pDirectSoundObj = nullptr;
00553e70      }
00553e40  }

00553e81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00553e90  int32_t __convention("regparm") GetInFileData(void* arg1, uint32_t arg2)

00553e90  {
00553e90      int32_t lpNumberOfBytesRead_1;
00553e90      int32_t lpNumberOfBytesRead = lpNumberOfBytesRead_1;
00553e90      
00553eb8      if ((ReadFile(hInFile, arg1, arg2, &lpNumberOfBytesRead, nullptr) != 0 && lpNumberOfBytesRead == arg2))
00553ebe          return 0;
00553ebe      
00553ec6      return 1;
00553e90  }

00553ec7                       90 90 90 90 90 90 90 90 90                                                         .........

00553ed0  void ConverterCleanup()

00553ed0  {
00553ed0      void* hInFile_1 = hInFile;
00553ed0      
00553ed8      if (hInFile_1 != 0xffffffff)
00553ed8      {
00553edb          CloseHandle(hInFile_1);
00553ee1          hInFile = 0xffffffff;
00553ed8      }
00553ed8      
00553eeb      struct INTRACKSTATE* pitsTracks = ifs.pitsTracks;
00553eeb      
00553ef3      if (pitsTracks != 0)
00553ef3      {
00553f02          int32_t i = 0;
00553f02          
00553f06          if (ifs.dwTrackCount > 0)
00553f06          {
00553f09              int32_t esi_1 = 0;
00553f09              
00553f2c              do
00553f2c              {
00553f10                  int32_t* hMem = *(uint32_t*)(&pitsTracks->pTrackStart + esi_1);
00553f10                  
00553f16                  if (hMem != 0)
00553f16                  {
00553f19                      LocalFree(hMem);
00553f1b                      pitsTracks = ifs.pitsTracks;
00553f16                  }
00553f16                  
00553f26                  i += 1;
00553f27                  esi_1 += 0x28;
00553f2c              } while (i < ifs.dwTrackCount);
00553f06          }
00553f06          
00553f30          LocalFree(pitsTracks);
00553f33          ifs.pitsTracks = nullptr;
00553ef3      }
00553ed0  }

00553f0d                                         8d 49 00                                                               .I.
00553f3f                                                                                               90                                 .

00553f40  int32_t RefillTrackBuffer(struct INTRACKSTATE* arg1)

00553f40  {
00553f41      struct INTRACKSTATE* esi = arg1;
00553f41      
00553f4f      if ((esi != 0 && esi->dwLeftOnDisk != 0))
00553f4f      {
00553f51          uint32_t foNextReadStart = esi->foNextReadStart;
00553f54          void* hInFile_1 = hInFile;
00553f63          esi->pTrackCurrent = esi->pTrackStart;
00553f66          uint32_t eax_3 = SetFilePointer(hInFile_1, foNextReadStart, nullptr, FILE_BEGIN);
00553f66          
00553f71          if (eax_3 != 0xffffffff)
00553f71          {
00553f73              uint32_t dwLeftOnDisk = esi->dwLeftOnDisk;
00553f73              
00553f7b              if (dwLeftOnDisk <= 0x400)
00553f86                  esi->dwLeftInBuffer = dwLeftOnDisk;
00553f7b              else
00553f7d                  esi->dwLeftInBuffer = 0x400;
00553f7d              
00553f9e              BOOL eax_5 = ReadFile(hInFile, esi->pTrackStart, esi->dwLeftInBuffer, &arg1, nullptr);
00553fa4              uint32_t ecx_2 = arg1;
00553faf              esi->dwLeftOnDisk -= ecx_2;
00553fb5              esi->foNextReadStart = (ecx_2 + eax_3);
00553fb8              esi->dwLeftInBuffer = ecx_2;
00553fb8              
00553fbf              if ((eax_5 != 0 && ecx_2 != 0))
00553fc5                  return 0;
00553fc5              
00553fc6              esi->dwLeftInBuffer = ecx_2;
00553f71          }
00553f4f      }
00553f4f      
00553fd0      return 1;
00553f40  }

00553fd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00553fe0  int32_t AddEventToStreamBuffer(struct TEMPEVENT* arg1, struct _ConvertInfo* arg2)

00553fe0  {
00553fe3      int32_t* edi;
00553fe3      int32_t eax = *(uint32_t*)edi;
00553fe6      int32_t ebp = edi[0x12];
00553fe9      void* ecx = (edi[0x10] + ebp);
00553feb      int32_t* ecx_1 = ((char*)ecx + eax);
00553feb      
00553fed      if (ecx == -(eax))
00553ff5          return 0xffffff9b;
00553ff5      
00553ff8      uint32_t tkCurrentTime_1 = tkCurrentTime;
00553ff8      
00553ffe      if (ebp == 0)
00554000          edi[0x13] = tkCurrentTime_1;
00554000      
00554011      if ((tkCurrentTime_1 - edi[0x13]) <= dwBufferTickLength)
00554011          goto label_554030;
00554011      
00554018      if (edi[0x14] == 0)
00554018      {
00554029          edi[0x14] = 1;
00554030      label_554030:
00554030          int32_t* esi;
00554030          uint32_t eax_6 = *(uint32_t*)esi;
00554034          uint32_t ebx_2 = (eax_6 - tkCurrentTime_1);
00554036          tkCurrentTime = eax_6;
00554036          
00554044          if (bInsertTempo == 0)
00554044          {
00554092          label_554092:
00554092              int32_t eax_7;
00554092              eax_7 = esi[1];
00554092              
00554097              if (eax_7 >= 0xf0)
00554097              {
005540f8                  if ((eax_7 == 0xf0 || eax_7 == 0xf7))
005540f8                  {
005541e8                      if (dwMallocBlocks != 0)
005541e8                      {
005541ee                          free(esi[3]);
005541fd                          dwMallocBlocks -= 1;
005541e8                      }
005541e8                      
00554206                      return 0;
005540f8                  }
005540f8                  
00554102                  if (*(uint8_t*)((char*)esi + 5) != 0x51)
00554102                  {
0055410a                      if (dwMallocBlocks != 0)
0055410a                      {
00554110                          free(esi[3]);
0055411f                          dwMallocBlocks -= 1;
0055410a                      }
0055410a                      
0055412b                      return 0xffffff97;
00554102                  }
00554102                  
00554134                  if ((edi[0x11] - edi[0x12]) < 0xc)
00554134                  {
0055413c                      if (dwMallocBlocks != 0)
0055413c                      {
00554142                          free(esi[3]);
00554151                          dwMallocBlocks -= 1;
0055413c                      }
0055413c                      
0055415d                      return 0xffffff98;
00554134                  }
00554134                  
0055415e                  ecx_1[1] = 0;
00554161                  *(uint32_t*)ecx_1 = ebx_2;
00554163                  char* eax_30 = esi[3];
0055416c                  int32_t edx_2;
0055416c                  *(uint8_t*)((char*)edx_2)[1] = *(uint8_t*)eax_30;
0055416e                  edx_2 = eax_30[1];
00554176                  int32_t eax_32 = ((edx_2 << 8) | ((uint32_t)eax_30[2]));
00554178                  ecx_1[2] = eax_32;
0055417b                  dwCurrentTempo = eax_32;
00554193                  ecx_1[2] = ((COMBINE(0, (ecx_1[2] * 0x64)) / dwTempoMultiplier) | 0x1000000);
00554196                  uint32_t dwCurrentTempo_1 = dwCurrentTempo;
00554196                  
0055419e                  if (dwCurrentTempo_1 > 0)
005541af                      dwBufferTickLength = (COMBINE(0, (ifs.dwTimeDivision * 0xea60)) / dwCurrentTempo_1);
005541af                  
005541bb                  if (dwMallocBlocks != 0)
005541bb                  {
005541c1                      free(esi[3]);
005541d0                      dwMallocBlocks -= 1;
005541bb                  }
005541bb                  
005541db                  edi[0x12] += 0xc;
005541e1                  return 0;
00554097              }
00554097              
005540a1              if ((edi[0x11] - edi[0x12]) >= 0xc)
005540a1              {
005540a9                  ecx_1[1] = 0;
005540ac                  *(uint32_t*)ecx_1 = ebx_2;
005540ae                  int32_t eax_14;
005540ae                  *(uint8_t*)((char*)eax_14)[1] = *(uint8_t*)((char*)esi + 6);
005540b5                  eax_14 = *(uint8_t*)((char*)esi + 5);
005540bb                  int32_t eax_16 = ((eax_14 << 8) | ((uint32_t)esi[1]));
005540bd                  ecx_1[2] = eax_16;
005540c0                  uint32_t edx_1;
005540c0                  edx_1 = esi[1];
005540c3                  edx_1 &= 0xf0;
005540c3                  
005540c9                  if (edx_1 != 0xb0)
005540c9                  {
005540d9                      if ((edx_1 == 0xc0 || edx_1 == 0x90))
005540e0                          ecx_1[2] = (eax_16 | 0x40000000);
005540c9                  }
005540c9                  else if (((*(uint8_t*)((char*)esi + 5) == 7 || edx_1 == 0xc0) || edx_1 == 0x90))
005540e0                      ecx_1[2] = (eax_16 | 0x40000000);
005540e0                  
005540e9                  edi[0x12] += 0xc;
005540ef                  return 0;
005540a1              }
00554044          }
00554044          else
00554044          {
00554050              bool cond:1_1 = (edi[0x11] - ebp) < 0xc;
00554052              bInsertTempo = 0;
00554052              
00554058              if (!(cond:1_1))
00554058              {
00554060                  if (dwCurrentTempo != 0)
00554060                  {
00554062                      *(uint32_t*)ecx_1 = 0;
00554064                      ecx_1[1] = 0;
00554075                      ecx_1 = &ecx_1[0x30];
00554080                      ecx_1[-0x2e] = ((COMBINE(0, (dwCurrentTempo * 0x64)) / dwTempoMultiplier) | 0x1000000);
00554086                      edi[0x12] += 0xc;
00554060                  }
00554060                  
00554060                  goto label_554092;
00554058              }
00554044          }
00554018      }
00554018      else
0055401a          edi[0x14] = 0;
0055401a      
00554028      return 0xffffff98;
00553fe0  }

00554207                       90 90 90 90 90 90 90 90 90                                                         .........

00554210  int32_t GetTrackByte(struct INTRACKSTATE* arg1, uint8_t* arg2)

00554210  {
00554215      struct INTRACKSTATE* esi;
00554215      
00554215      if ((esi->dwLeftInBuffer == 0 && RefillTrackBuffer(esi) != 0))
00554229          return 1;
00554229      
00554233      *(uint8_t*)arg1 = *(uint8_t*)esi->pTrackCurrent;
0055423d      esi->dwLeftInBuffer -= 1;
00554240      esi->pTrackCurrent = &esi->pTrackCurrent[1];
00554245      return 0;
00554210  }

00554246                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00554250  int32_t GetTrackVDWord(struct INTRACKSTATE* arg1, uint32_t* arg2)

00554250  {
00554253      int32_t edi = 0;
00554257      char* esi;
00554257      
00554257      if ((*(uint8_t*)esi & 1) == 0)
00554257      {
00554265          while (true)
00554265          {
00554265              if (*(uint32_t*)(esi + 8) == 0)
00554265              {
0055426c                  if (*(uint32_t*)(esi + 0x24) == 0)
0055426c                  {
005542a1                      *(uint32_t*)esi |= 1;
005542a1                      break;
0055426c                  }
0055426c                  
00554279                  if (RefillTrackBuffer(esi) != 0)
00554279                      break;
00554265              }
00554265              
0055427b              char* eax_4 = *(uint32_t*)(esi + 0x10);
0055427e              char ecx = *(uint8_t*)eax_4;
00554281              *(uint32_t*)(esi + 0x10) = &eax_4[1];
00554284              *(uint32_t*)(esi + 8) -= 1;
00554289              int32_t eax_6;
00554289              eax_6 = ecx;
00554291              edi = ((edi << 7) | (eax_6 & 0x7f));
00554291              
00554295              if (ecx >= 0)
00554295              {
0055429b                  arg1->fdwTrack = edi;
005542a0                  return 0;
00554295              }
00554265          }
00554257      }
00554257      
005542aa      return 1;
00554250  }

005542ab                                   90 90 90 90 90                                                             .....

005542b0  int32_t __convention("regparm") GetTrackEvent(struct INTRACKSTATE* arg1, struct TEMPEVENT* arg2)

005542b0  {
005542b0      int32_t ecx;
005542b0      int32_t var_4 = ecx;
005542ba      int32_t* edi;
005542ba      *(uint32_t*)edi = 0;
005542bc      edi[1] = 0;
005542bf      edi[2] = 0;
005542c2      edi[3] = 0;
005542c8      char* eax;
005542c8      
005542c8      if ((*(uint8_t*)eax & 1) == 0)
005542c8      {
005542ce          int32_t eax_1 = *(uint32_t*)(eax + 8);
005542ce          
005542d3          if (eax_1 != 0)
005542d3          {
005542f5          label_5542f5:
005542f5              char* ecx_3 = *(uint32_t*)(eax + 0x10);
005542f8              eax_1 = *(uint8_t*)ecx_3;
005542fb              *(uint32_t*)(eax + 0x10) = &ecx_3[1];
00554304              *(uint32_t*)(eax + 8) -= 1;
00554307              int32_t ecx_6;
00554307              uint8_t* esi;
00554307              
00554307              if (eax_1 < 0)
00554307              {
0055435f                  ecx_6 = eax_1;
00554361                  ecx_6 &= 0xf0;
00554361                  
00554367                  if (ecx_6 != 0xf0)
00554367                  {
0055436c                      edi[1] = eax_1;
0055436f                      eax[0x18] = eax_1;
00554372                      int32_t ebx_1;
00554372                      
00554372                      if (ecx_6 != 0xc0)
00554377                          ebx_1 = 2;
00554377                      
0055437c                      if ((ecx_6 == 0xc0 || ecx_6 == 0xd0))
0055437e                          ebx_1 = 1;
0055437e                      
00554386                      edi[2] = (ebx_1 + 1);
00554386                      
00554391                      if ((*(uint32_t*)(eax + 0x24) + *(uint32_t*)(eax + 8)) < ebx_1)
00554391                      {
005544a6                          *(uint32_t*)eax |= 1;
005544b2                          return 1;
00554391                      }
00554391                      
005543a5                      if (GetTrackByte(((char*)edi + 5), esi) == 0)
005543a5                      {
005543aa                          if (ebx_1 != 2)
005543aa                              goto label_554501;
005543aa                          
005543be                          if (GetTrackByte(((char*)edi + 6)) == 0)
005543be                              goto label_554501;
005543a5                      }
00554367                  }
00554367                  else if ((eax_1 == 0xf0 || eax_1 == 0xf7))
005543d8                  {
00554480                      void* ebp_2 = &edi[2];
00554484                      edi[1] = eax_1;
00554484                      
00554491                      if (GetTrackVDWord(ebp_2, esi) == 0)
00554491                      {
0055449d                          int32_t eax_21 = *(uint32_t*)ebp_2;
0055449d                          
005544a4                          if ((*(uint32_t*)(eax + 0x24) + *(uint32_t*)(eax + 8)) < eax_21)
005544a4                          {
005544a6                              *(uint32_t*)eax |= 1;
005544b2                              return 1;
005544a4                          }
005544a4                          
005544b4                          int32_t eax_23 = malloc(eax_21);
005544bf                          edi[3] = eax_23;
005544bf                          
005544c2                          if (eax_23 != 0)
005544c2                          {
005544d2                              int32_t i = 0;
005544d4                              bool cond:5_1 = *(uint32_t*)ebp_2 <= 0;
005544d6                              dwMallocBlocks += 1;
005544d6                              
005544dc                              if (!(cond:5_1))
005544dc                              {
005544fc                                  do
005544fc                                  {
005544f0                                      if (GetTrackByte((edi[3] + i)) != 0)
005543cd                                          return 1;
005543cd                                      
005544f9                                      i += 1;
005544fc                                  } while (i < *(uint32_t*)ebp_2);
005544dc                              }
005544dc                              
005544dc                              goto label_554501;
005544c2                          }
00554491                      }
005543d8                  }
005543d8                  else if (eax_1 == 0xff)
005543e0                  {
005543e2                      edi[1] = eax_1;
005543e2                      
005543f1                      if ((*(uint32_t*)(eax + 8) == 0 && *(uint32_t*)(eax + 0x24) == 0))
005543f1                      {
005544a6                          *(uint32_t*)eax |= 1;
005544b2                          return 1;
005543f1                      }
005543f1                      
00554405                      if ((GetTrackByte(((char*)edi + 5), esi) == 0 && GetTrackVDWord(&edi[2]) == 0))
00554405                      {
00554417                          int32_t eax_15 = edi[2];
00554417                          
0055441c                          if (eax_15 == 0)
0055441c                          {
0055446e                          label_55446e:
0055446e                              
00554472                              if (*(uint8_t*)((char*)edi + 5) != 0x2f)
00554472                                  goto label_554501;
00554472                              
00554478                              *(uint32_t*)eax |= 1;
0055447b                              goto label_554501;
0055441c                          }
0055441c                          
00554426                          if ((*(uint32_t*)(eax + 0x24) + *(uint32_t*)(eax + 8)) < eax_15)
00554426                          {
005544a6                              *(uint32_t*)eax |= 1;
005544b2                              return 1;
00554426                          }
00554426                          
00554429                          int32_t eax_16 = malloc(eax_15);
00554434                          edi[3] = eax_16;
00554434                          
00554437                          if (eax_16 != 0)
00554437                          {
00554443                              int32_t i_1 = 0;
00554445                              bool cond:7_1 = edi[2] <= 0;
00554447                              dwMallocBlocks += 1;
00554447                              
0055444d                              if (!(cond:7_1))
0055444d                              {
0055446c                                  do
0055446c                                  {
00554460                                      if (GetTrackByte((edi[3] + i_1)) != 0)
005543cd                                          return 1;
005543cd                                      
00554469                                      i_1 += 1;
0055446c                                  } while (i_1 < edi[2]);
0055444d                              }
0055444d                              
0055444d                              goto label_55446e;
00554437                          }
00554405                      }
005543e0                  }
00554307              }
00554307              else
00554307              {
00554309                  ecx_6 = eax[0x18];
00554309                  
0055430e                  if (ecx_6 != 0)
0055430e                  {
00554314                      *(uint8_t*)((char*)edi + 5) = eax_1;
00554317                      eax_1 = ecx_6;
00554319                      eax_1 &= 0xf0;
0055431d                      edi[1] = ecx_6;
00554320                      edi[2] = 2;
00554320                      
0055432f                      if ((eax_1 == 0xc0 || eax_1 == 0xd0))
00554327                          goto label_554501;
00554327                      
00554341                      if ((*(uint32_t*)(eax + 8) == 0 && *(uint32_t*)(eax + 0x24) == 0))
00554341                      {
005544a6                          *(uint32_t*)eax |= 1;
005544b2                          return 1;
00554341                      }
00554341                      
00554355                      if (GetTrackByte(((char*)edi + 6), esi) == 0)
00554355                      {
00554357                          edi[2] += 1;
00554501                      label_554501:
00554501                          *(uint32_t*)edi = *(uint32_t*)(eax + 0x14);
00554501                          
00554506                          if ((*(uint8_t*)eax & 1) != 0)
0055452f                              return 0;
0055452f                          
00554517                          if (GetTrackVDWord(&var_4, esi) == 0)
00554517                          {
00554526                              *(uint32_t*)(eax + 0x14) += var_4;
0055452f                              return 0;
00554517                          }
00554355                      }
0055430e                  }
00554307              }
005542d3          }
005542d3          else if (*(uint32_t*)(eax + 0x24) != 0)
005542da          {
005542e2              if (eax_1 != 0)
005542e2                  goto label_5542f5;
005542e2              
005542ef              if (RefillTrackBuffer(eax) == 0)
005542ef                  goto label_5542f5;
005542da          }
005542c8      }
005542c8      
005543cd      return 1;
005542b0  }


00554530  int32_t ConverterInit(char* arg1)

00554530  {
00554545      ifs.cbFileLength = 0;
0055454d      ifs.dwTimeDivision = 0;
00554554      ifs.dwFormat = 0;
00554559      ifs.dwTrackCount = 0;
00554563      ifs.pitsTracks = nullptr;
00554569      tkCurrentTime = 0;
0055456f      ifs.cbFileLength = 0;
00554575      ifs.pitsTracks = nullptr;
0055457b      HANDLE hFile = CreateFileA(arg1, 0x80000000, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
00554584      hInFile = hFile;
00554584      
00554589      if (hFile != 0xffffffff)
00554589      {
00554591          uint32_t eax = GetFileSize(hFile, nullptr);
0055459a          ifs.cbFileLength = eax;
0055459a          
0055459f          if (eax != 0xffffffff)
0055459f          {
005545b9              int32_t lpBuffer;
005545b9              int32_t lpNumberOfBytesRead_1;
005545b9              BOOL eax_1;
005545b9              uint32_t edx_1;
005545b9              eax_1 = ReadFile(hInFile, &lpBuffer, 4, &lpNumberOfBytesRead_1, nullptr);
005545b9              
005545da              if ((eax_1 != 0 && (lpNumberOfBytesRead_1 == 4 && lpBuffer == 0x6468544d)))
005545da              {
005545e4                  int32_t var_2c_1 = 4;
005545e6                  void* var_18;
005545e6                  int32_t* var_30_3 = &var_18;
005545e6                  
005545f1                  if (GetInFileData(eax_1, edx_1) == 0)
005545f1                  {
005545f7                      void* ecx_1 = var_18;
00554619                      int32_t edx_7 = (((ecx_1 & 0xff00) | (ecx_1 << 0x10)) << 8);
0055461c                      void* eax_7 = ((((ecx_1 & 0xff0000) | (ecx_1 >> 0x10)) >> 8) | edx_7);
00554621                      var_18 = eax_7;
00554621                      
00554625                      if (eax_7 >= 6)
00554625                      {
0055462b                          void* var_2c_2 = eax_7;
00554630                          int16_t var_8;
00554630                          int16_t* var_30_4 = &var_8;
00554630                          
0055463b                          if (GetInFileData(eax_7, edx_7) == 0)
0055463b                          {
00554641                              uint32_t eax_9 = ((uint32_t)var_8);
00554648                              int32_t ecx_3;
00554648                              *(uint8_t*)((char*)ecx_3)[1] = eax_9;
00554651                              int16_t var_6;
00554651                              uint32_t eax_11 = ((uint32_t)var_6);
00554656                              ifs.dwFormat = (ecx_3 | (eax_9 >> 8));
0055465e                              int32_t ecx_5;
0055465e                              *(uint8_t*)((char*)ecx_5)[1] = eax_11;
00554663                              uint32_t ecx_6 = (ecx_5 | (eax_11 >> 8));
00554665                              int16_t var_4;
00554665                              uint32_t eax_13 = ((uint32_t)var_4);
0055466a                              int32_t edx_8;
0055466a                              *(uint8_t*)((char*)edx_8)[1] = eax_13;
0055466f                              ifs.dwTrackCount = ecx_6;
00554680                              ifs.dwTimeDivision = (edx_8 | (eax_13 >> 8));
00554686                              int32_t* eax_17 = LocalAlloc(LMEM_ZEROINIT, (ecx_6 * 0x28));
0055468e                              ifs.pitsTracks = eax_17;
0055468e                              
00554693                              if (eax_17 != 0)
00554693                              {
00554699                                  int32_t* esi_1 = eax_17;
0055469b                                  bool cond:4_1 = ifs.dwTrackCount <= 0;
005546a1                                  lpNumberOfBytesRead_1 = 0;
005546a1                                  
005546a5                                  if (cond:4_1)
00554809                                      return 0;
00554809                                  
005546b3                                  while (true)
005546b3                                  {
005546b3                                      if (esi_1 == 0)
00554809                                          return 0;
00554809                                      
005546c0                                      int32_t* eax_18;
005546c0                                      uint32_t edx_10;
005546c0                                      eax_18 = LocalAlloc(LMEM_ZEROINIT, 0x400);
005546c8                                      esi_1[3] = eax_18;
005546c8                                      
005546cb                                      if (eax_18 == 0)
005546cb                                          break;
005546cb                                      
005546d5                                      int32_t var_2c_4 = 4;
005546d7                                      int32_t* var_30_5 = &lpBuffer;
005546d8                                      int32_t eax_19;
005546d8                                      uint32_t edx_11;
005546d8                                      eax_19 = GetInFileData(eax_18, edx_10);
005546d8                                      
005546e2                                      if (eax_19 != 0)
005546e2                                          break;
005546e2                                      
005546f0                                      if (lpBuffer != 0x6b72544d)
005546f0                                          break;
005546f0                                      
005546fa                                      int32_t var_2c_5 = 4;
005546fc                                      void** var_30_6 = &var_18;
005546fc                                      
00554707                                      if (GetInFileData(eax_19, edx_11) != 0)
00554707                                          break;
00554707                                      
0055470d                                      void* ecx_7 = var_18;
00554732                                      int32_t eax_25 = ((((ecx_7 & 0xff0000) | (ecx_7 >> 0x10)) >> 8) | (((ecx_7 & 0xff00) | (ecx_7 << 0x10)) << 8));
00554736                                      var_18 = eax_25;
0055473b                                      esi_1[1] = eax_25;
00554747                                      esi_1[7] = SetFilePointer(hInFile, 0, nullptr, FILE_CURRENT);
0055474a                                      uint32_t nNumberOfBytesToRead_1 = esi_1[1];
00554752                                      uint32_t nNumberOfBytesToRead = 0x400;
00554752                                      
00554757                                      if (nNumberOfBytesToRead_1 <= 0x400)
00554759                                          nNumberOfBytesToRead = nNumberOfBytesToRead_1;
00554759                                      
00554774                                      int32_t lpNumberOfBytesRead;
00554774                                      
00554774                                      if (ReadFile(hInFile, esi_1[3], nNumberOfBytesToRead, &lpNumberOfBytesRead, nullptr) == 0)
00554774                                          break;
00554774                                      
0055477a                                      int32_t lpNumberOfBytesRead_2 = lpNumberOfBytesRead;
0055477a                                      
00554780                                      if (lpNumberOfBytesRead_2 != nNumberOfBytesToRead)
00554780                                          break;
00554780                                      
0055478d                                      void* hInFile_1 = hInFile;
00554793                                      esi_1[9] = (esi_1[1] - lpNumberOfBytesRead_2);
0055479c                                      esi_1[2] = lpNumberOfBytesRead;
0055479f                                      uint32_t eax_30 = SetFilePointer(hInFile_1, 0, nullptr, FILE_CURRENT);
005547a4                                      esi_1[4] = esi_1[3];
005547a7                                      bool cond:7_1 = esi_1[2] != 0;
005547aa                                      esi_1[8] = eax_30;
005547b0                                      *(uint32_t*)esi_1 = 0;
005547b2                                      esi_1[6] = 0;
005547ad                                      esi_1[5] = 0;
005547ad                                      
005547bc                                      if ((cond:7_1 || esi_1[9] != 0))
005547bc                                      {
005547d1                                          uint32_t* edi;
005547d1                                          
005547d1                                          if (GetTrackVDWord(&esi_1[5], edi) != 0)
005547d1                                              break;
005547d1                                          
005547e4                                          SetFilePointer(hInFile, (esi_1[7] + esi_1[1]), nullptr, FILE_BEGIN);
005547bc                                      }
005547bc                                      else
005547be                                          *(uint32_t*)esi_1 = 1;
005547be                                      
005547f1                                      esi_1 = &esi_1[0xa];
005547f4                                      bool cond:8_1 = (lpNumberOfBytesRead_1 + 1) < ifs.dwTrackCount;
005547f6                                      lpNumberOfBytesRead_1 += 1;
005547f6                                      
005547fa                                      if (!(cond:8_1))
00554809                                          return 0;
005546b3                                  }
00554693                              }
0055463b                          }
00554625                      }
005545f1                  }
005545da              }
0055459f          }
00554589      }
00554589      
0055480a      ConverterCleanup();
0055481b      return 1;
00554530  }

0055481c                                                                                      90 90 90 90                              ....

00554820  int32_t RewindConverter()

00554820  {
0055482c      bool cond:0 = ifs.dwTrackCount <= 0;
0055482f      struct INTRACKSTATE* pitsTracks = ifs.pitsTracks;
00554836      tkCurrentTime = 0;
0055483c      int32_t var_4 = 0;
0055483c      
00554840      if (!(cond:0))
00554840      {
00554852          while (pitsTracks != 0)
00554852          {
00554865              SetFilePointer(hInFile, pitsTracks->foTrackStart, nullptr, FILE_BEGIN);
00554867              uint32_t dwTrackLength = pitsTracks->dwTrackLength;
0055486f              uint32_t nNumberOfBytesToRead = 0x400;
0055486f              
00554874              if (dwTrackLength <= 0x400)
00554876                  nNumberOfBytesToRead = dwTrackLength;
00554876              
00554892              uint32_t lpNumberOfBytesRead;
00554892              
00554892              if (ReadFile(hInFile, pitsTracks->pTrackStart, nNumberOfBytesToRead, &lpNumberOfBytesRead, nullptr) != 0)
00554892              {
00554898                  uint32_t lpNumberOfBytesRead_1 = lpNumberOfBytesRead;
00554898                  
0055489e                  if (lpNumberOfBytesRead_1 == nNumberOfBytesToRead)
0055489e                  {
005548a7                      void* hInFile_1 = hInFile;
005548b2                      pitsTracks->dwLeftOnDisk = (pitsTracks->dwTrackLength - lpNumberOfBytesRead_1);
005548bb                      pitsTracks->dwLeftInBuffer = lpNumberOfBytesRead;
005548be                      uint32_t eax_5 = SetFilePointer(hInFile_1, 0, nullptr, FILE_CURRENT);
005548c0                      bool cond:2_1 = pitsTracks->dwLeftInBuffer != 0;
005548c3                      uint8_t* pTrackStart = pitsTracks->pTrackStart;
005548c6                      pitsTracks->foNextReadStart = eax_5;
005548cc                      pitsTracks->pTrackCurrent = pTrackStart;
005548cf                      pitsTracks->fdwTrack = 0;
005548d1                      pitsTracks->byRunningStatus = 0;
005548c9                      pitsTracks->tkNextEventDue = 0;
005548db                      uint32_t* edi;
005548db                      
005548db                      if ((cond:2_1 || pitsTracks->dwLeftOnDisk != 0))
005548db                      {
005548f0                          if (GetTrackVDWord(&pitsTracks->tkNextEventDue, edi) == 0)
005548f0                          {
00554904                              SetFilePointer(hInFile, (pitsTracks->foTrackStart + pitsTracks->dwTrackLength), nullptr, FILE_BEGIN);
00554904                              goto label_554911;
005548f0                          }
005548db                      }
005548db                      else
005548db                      {
005548dd                          pitsTracks->fdwTrack = 1;
00554911                      label_554911:
00554911                          pitsTracks = &pitsTracks[1];
00554914                          bool cond:3_1 = (var_4 + 1) < ifs.dwTrackCount;
00554916                          var_4 += 1;
00554916                          
0055491a                          if (!(cond:3_1))
0055491a                              break;
0055491a                          
0055491a                          continue;
005548db                      }
0055489e                  }
00554892              }
00554892              
0055492e              if (var_4 == 0)
0055492e                  break;
0055492e              
0055493c              return 1;
00554852          }
00554840      }
00554840      
00554929      return 0;
00554820  }

0055493d                                                                                         90 90 90                               ...

00554940  int32_t ConvertToBuffer(uint32_t arg1, struct _ConvertInfo* arg2)

00554940  {
0055494a      if (arg2 == 0)
00554953          return 0xffffff9b;
00554953      
00554959      arg2->dwBytesRecorded = 0;
0055495c      uint8_t* pLongData_1;
0055495c      int16_t byShortData_1;
0055495c      
0055495c      if ((arg1 & 1) == 0)
0055495c      {
00554991          byShortData_1 = ((int16_t)teTemp.byShortData);
00554997          pLongData_1 = teTemp.pLongData;
0055495c      }
0055495c      else
0055495c      {
0055495e          pLongData_1 = nullptr;
00554960          byShortData_1 = 0;
00554962          dwProgressBytes = 0;
00554968          dwStatus = 0;
0055496e          teTemp.pLongData = nullptr;
00554973          teTemp.tkEvent = 0;
00554978          teTemp.byShortData = 0;
0055497e          teTemp.dwEventLength = 0;
00554983          ptsFound = nullptr;
00554989          ptsTrack = nullptr;
0055495c      }
0055495c      
0055499c      uint32_t edx = dwStatus;
005549a5      uint32_t dwTrackCount;
005549a5      uint32_t dwTrackCount_1 = dwTrackCount;
005549a5      
005549a7      if ((edx & 1) != 0)
005549a7      {
005549af          if (bLooped == 0)
005549cd              return 0xffffff99;
005549cd          
005549b1          edx = RewindConverter();
005549b6          dwProgressBytes = 0;
005549bc          dwStatus = 0;
005549af          goto label_554a20;
005549a7      }
005549a7      
005549d1      if ((edx & 2) != 0)
005549dc          return 0xffffff9a;
005549dc      
005549e0      uint8_t* pLongData;
005549e0      struct TEMPEVENT* esi;
005549e0      
005549e0      if ((edx & 4) == 0)
005549e0      {
00554a20      label_554a20:
00554a20          
00554a20          while (true)
00554a20          {
00554a20              dwTrackCount = ifs.dwTrackCount;
00554a26              struct INTRACKSTATE* pitsTracks = ifs.pitsTracks;
00554a2c              struct INTRACKSTATE* pitsTracks_1 = nullptr;
00554a2e              uint32_t esi_1 = 0xffffffff;
00554a31              int32_t edi_1 = 0;
00554a35              ptsFound = nullptr;
00554a3a              tkNext = 0xffffffff;
00554a40              ptsTrack = pitsTracks;
00554a40              
00554a46              if (dwTrackCount > 0)
00554a46              {
00554a52                  while (pitsTracks != 0)
00554a52                  {
00554a57                      if ((pitsTracks->fdwTrack & 1) == 0)
00554a57                      {
00554a59                          edx = pitsTracks->tkNextEventDue;
00554a59                          
00554a5e                          if (edx < esi_1)
00554a5e                          {
00554a60                              esi_1 = edx;
00554a62                              pitsTracks_1 = pitsTracks;
00554a5e                          }
00554a57                      }
00554a57                      
00554a64                      edi_1 += 1;
00554a65                      pitsTracks = &pitsTracks[1];
00554a65                      
00554a6a                      if (edi_1 >= dwTrackCount)
00554a6a                          break;
00554a52                  }
00554a52                  
00554a6e                  ptsTrack = pitsTracks;
00554a74                  ptsFound = pitsTracks_1;
00554a79                  tkNext = esi_1;
00554a46              }
00554a46              
00554a7f              if ((dwTrackCount <= 0 || pitsTracks_1 == 0))
00554a7f              {
00554b5d                  dwStatus |= 1;
00554b65                  return 0;
00554a7f              }
00554a7f              
00554a8a              int32_t eax_5;
00554a8a              eax_5 = GetTrackEvent(pitsTracks_1, edx);
00554a8a              
00554a91              if (eax_5 != 0)
00554a91              {
00554b71                  dwStatus |= 2;
00554b7c                  return 0xffffff9b;
00554a91              }
00554a91              
00554a97              int16_t byShortData = ((int16_t)teTemp.byShortData);
00554a97              
00554aa3              if ((byShortData == 0xff && *(uint8_t*)((char*)byShortData)[1] == 0x2f))
00554aa3              {
00554aab                  if (dwMallocBlocks == 0)
00554aab                      continue;
00554aab                  else
00554aab                  {
00554ab7                      pLongData = teTemp.pLongData;
00554a06                  label_554a06:
00554a06                      edx = free(pLongData, esi, dwTrackCount_1);
00554a15                      dwMallocBlocks -= 1;
00554a1a                      continue;
00554aab                  }
00554aa3              }
00554aa3              
00554b0a              int32_t eax_11;
00554b0a              eax_11 = AddEventToStreamBuffer(esi, dwTrackCount_1);
00554b0a              
00554b11              if (eax_11 != 0)
00554b11              {
00554b1a                  if (eax_11 == 0xffffff98)
00554b1a                      goto label_554adf;
00554b1a                  
00554b1f                  if (eax_11 != 0xffffff97)
00554b1f                      break;
00554b11              }
00554a20          }
00554a20          
00554b2b          if (dwMallocBlocks != 0)
00554b2b          {
00554b34              free(teTemp.pLongData, esi, dwTrackCount_1);
00554b43              dwMallocBlocks -= 1;
00554b2b          }
005549e0      }
005549e0      else
005549e0      {
005549e2          edx ^= 4;
005549e8          dwStatus = edx;
005549e8          
005549f7          if ((byShortData_1 == 0xff && *(uint8_t*)((char*)byShortData_1)[1] == 0x2f))
005549f7          {
00554a03              if (dwMallocBlocks == 0)
00554a03                  goto label_554a20;
00554a03              
00554a05              pLongData = pLongData_1;
00554a05              goto label_554a06;
005549f7          }
005549f7          
00554ac2          int32_t eax_6;
00554ac2          eax_6 = AddEventToStreamBuffer(esi, dwTrackCount_1);
00554ac2          
00554ac9          if (eax_6 == 0)
00554ac9              goto label_554a20;
00554ac9          
00554ad2          if (eax_6 == 0xffffff98)
00554ad2          {
00554adf          label_554adf:
00554adf              dwStatus |= 4;
00554ae7              return 0;
00554ad2          }
00554ad2          
00554aeb          if (eax_6 == 0xffffff97)
00554aeb              goto label_554a20;
00554aeb          
00554af7          if (dwMallocBlocks != 0)
00554af7          {
00554b34              free(teTemp.pLongData, esi, dwTrackCount_1);
00554b43              dwMallocBlocks -= 1;
00554af7          }
005549e0      }
00554b51      return 1;
00554940  }

00554b7d                                                                                         90 90 90                               ...

00554b80  class ErrorStream* __thiscall ErrorStream::operator<<(class ErrorStream* this, class ErrorStream* (* arg2)(class ErrorStream*))

00554b80  {
00554b88      return arg2(this);
00554b80  }

00554b8b                                   90 90 90 90 90                                                             .....

00554b90  void __fastcall ErrorStream::output(class ErrorStream* this)

00554b90  {
00554b90      void* edi;
00554b90      void* var_4 = edi;
00554b96      IError::ReportDataError(this->m_strBuffer.m_charbuffer);
00554b9b      class PSRefBufferCharData<char>* m_charbuffer = this->m_strBuffer.m_charbuffer;
00554ba3      void* const* esp = &__return_addr;
00554ba3      
00554ba8      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
00554ba8      {
00554baa          void* esi;
00554baa          var_4 = esi;
00554baa          
00554bbe          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00554bc6              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00554bc6          
00554bc8          class ErrorStream PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00554bd3          this->m_strBuffer.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00554bd5          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
00554bdb          esp = &var_4;
00554ba8      }
00554ba8      
00554bdc      *(uint32_t*)esp;
00554b90  }

00554bde                                                                                            90 90                                ..

00554be0  class ErrorStream* endp(class ErrorStream* arg1)

00554be0  {
00554be7      ErrorStream::output(arg1);
00554bef      return arg1;
00554be0  }


00554bf0  class ErrorStream* __thiscall ErrorStream::operator<<(class ErrorStream* this, char const* arg2)

00554bf0  {
00554bf7      class ErrorStream* result = this;
00554bf7      
00554bfe      if ((arg2 != 0 && *(uint8_t*)arg2 != 0))
00554bfe      {
00554c00          char const* eax_1 = arg2;
00554c00          
00554c0b          do
00554c0b          {
00554c06              this = *(uint8_t*)eax_1;
00554c08              eax_1 = &eax_1[1];
00554c0b          } while (this != 0);
00554c0b          
00554c13          PStringBase<char>::append_n_chars(result, arg2, (eax_1 - &eax_1[1]));
00554bfe      }
00554bfe      
00554c1c      return result;
00554bf0  }

00554c1f                                                                                               90                                 .

00554c20  class ErrorStream* __thiscall ErrorStream::operator<<(class ErrorStream* this, class IDClass<_tagDataID,32,0> arg2)

00554c20  {
00554c25      class IDClass<_tagDataID,32,0> var_8 = arg2;
00554c28      char const* const var_c = "0x%08X";
00554c2d      class ErrorStream* this_1 = this;
00554c2e      char* edx;
00554c2e      PStringBase<char>::sprintf_append(arg2, edx);
00554c39      return this;
00554c20  }

00554c3c                                                                                      90 90 90 90                              ....

00554c40  void PopupError(char const* arg1, ...)

00554c40  {
00554c5e      void var_400;
00554c5e      _vsnprintf(&var_400, 0x400, arg1, &arg_8);
00554c72      class PStringBase<unsigned short> var_404;
00554c72      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_404, WidthConvert, &var_400);
00554c79      void* const var_410_1 = &data_554c77;
00554c7a      class PStringBase<unsigned short> ecx_1 = var_404;
00554c8a      InterlockedIncrement((var_404 - 0x10));
00554c90      PlatformString::DisplayFinalString(ecx_1, dsError);
00554c99      int32_t* esi_1 = (var_404 - 0x14);
00554c99      
00554caf      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00554cb7          **(uint32_t**)esi_1(1);
00554c40  }

00554cc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00554cd0  char* AC1Legacy::Version::StringFromVersion(struct AC1Legacy::VERSION_NO_t* arg1)

00554cd0  {
00554cd3      void* result = operator new[](0x10);
00554cde      *(uint8_t*)((char*)result + 0xf) = 0;
00554d11      _snprintf(result, 0xf, "%2.2d.%2.2d.%2.2d.%c%c%c%c.%c", ((uint32_t)arg1->rr), ((uint32_t)arg1->sc), ((uint32_t)arg1->bb), ((int32_t)arg1->mm[0]), ((int32_t)arg1->mm[1]), ((int32_t)arg1->dd[0]), ((int32_t)arg1->dd[1]), ((int32_t)arg1->debug));
00554d1d      return result;
00554cd0  }

00554d1e                                                                                            90 90                                ..

00554d20  char* AC1Legacy::Version::FileVersionStringFromVersion(struct AC1Legacy::VERSION_NO_t* arg1)

00554d20  {
00554d23      void* result = operator new[](0xe);
00554d2e      *(uint8_t*)((char*)result + 0xd) = 0;
00554d5c      _snprintf(result, 0xd, "%2.2d.%2.2d.%2.2d.%c%c%c%c", ((uint32_t)arg1->rr), ((uint32_t)arg1->sc), ((uint32_t)arg1->bb), ((int32_t)arg1->mm[0]), ((int32_t)arg1->mm[1]), ((int32_t)arg1->dd[0]), ((int32_t)arg1->dd[1]));
00554d68      return result;
00554d20  }

00554d69                             90 90 90 90 90 90 90                                                           .......

00554d70  int32_t AC1Legacy::Version::Init(char const* arg1)

00554d70  {
00554d7a      if (AC1Legacy::Version::VerboseVersionString_ == 0)
00554d7a      {
00554d81          int32_t result = AC1Legacy::Resource::Init(arg1);
00554d81          
00554d8b          if (result == 0)
00554d90              return result;
00554d90          
00554d97          void var_8;
00554d97          AC1Legacy::Resource::GetVersion(&var_8);
00554d9c          char* eax_1 = AC1Legacy::Resource::GetComments();
00554dad          AC1Legacy::Version::BuildVersion_ = AC1Legacy::Version::StringFromVersion(&var_8);
00554dbe          AC1Legacy::Version::FileVersion_ = AC1Legacy::Version::FileVersionStringFromVersion(&var_8);
00554dc3          void* eax_4 = operator new[](0x44);
00554dc8          char* AC1Legacy::Version::BuildVersion__1 = AC1Legacy::Version::BuildVersion_;
00554dd6          AC1Legacy::Version::VerboseVersionString_ = eax_4;
00554ddb          sprintf(eax_4, "%s Portal:%s", AC1Legacy::Version::BuildVersion__1, eax_1);
00554de2          operator delete(eax_1);
00554d7a      }
00554d7a      
00554df3      return 1;
00554d70  }

00554df4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00554e00  void AC1Legacy::Version::Cleanup()

00554e00  {
00554e00      AC1Legacy::Resource::Cleanup();
00554e0b      operator delete(AC1Legacy::Version::VerboseVersionString_);
00554e10      char* AC1Legacy::Version::BuildVersion__1 = AC1Legacy::Version::BuildVersion_;
00554e17      AC1Legacy::Version::VerboseVersionString_ = nullptr;
00554e21      operator delete(AC1Legacy::Version::BuildVersion__1);
00554e2d      operator delete(AC1Legacy::Version::FileVersion_);
00554e00  }

00554e36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00554e40  int32_t __convention("regparm") AC1Legacy::Resource::LoadData(char* arg1)

00554e40  {
00554e40      uint32_t lpdwHandle_1;
00554e40      uint32_t lpdwHandle = lpdwHandle_1;
00554e4d      uint32_t dwLen = j_GetFileVersionInfoSizeA(arg1, &lpdwHandle);
00554e4d      
00554e56      if (dwLen != 0)
00554e56      {
00554e59          void* lpData = operator new[](dwLen);
00554e5e          uint32_t dwHandle = lpdwHandle;
00554e69          AC1Legacy::Resource::abData = lpData;
00554e6e          j_GetFileVersionInfoA(arg1, dwHandle, dwLen, lpData);
00554e56      }
00554e56      
00554e78      return dwLen;
00554e40  }

00554e79                                                                             90 90 90 90 90 90 90                           .......

00554e80  int32_t AC1Legacy::Resource::Init(char const* arg1)

00554e80  {
00554e80      uint8_t* AC1Legacy::Resource::abData_1 = AC1Legacy::Resource::abData;
00554e80      
00554e8d      if (AC1Legacy::Resource::abData_1 != 0)
00554e90          operator delete(AC1Legacy::Resource::abData_1);
00554e90      
00554e98      char const* eax = arg1;
00554ea6      char var_400;
00554ea6      char* edx = (&var_400 - eax);
00554eb0      char const i;
00554eb0      
00554eb0      do
00554eb0      {
00554ea8          i = *(uint8_t*)eax;
00554eaa          *(uint8_t*)(edx + eax) = i;
00554ead          eax = &eax[1];
00554eb0      } while (i != 0);
00554eb0      
00554ecb      if (strchr(&var_400, 0x2e) == 0)
00554ecb      {
00554ed4          void var_401;
00554ed4          void* edi_1 = &var_401;
00554edb          int32_t eax_1;
00554edb          
00554edb          do
00554edb          {
00554ed5              eax_1 = *(uint8_t*)((char*)edi_1 + 1);
00554ed8              edi_1 += 1;
00554edb          } while (eax_1 != 0);
00554ee9          __builtin_strncpy(edi_1, ".exe", 5);
00554ecb      }
00554ecb      
00554eff      uint32_t var_508;
00554eff      char lptstrFilename;
00554eff      
00554eff      if (strchr(&var_400, 0x22) != 0)
00554eff      {
00554f08          int32_t edx_1 = 0;
00554f0c          char* eax_3 = &var_400;
00554f0c          
00554f13          if (var_400 != 0)
00554f13          {
00554f27              char i_1;
00554f27              
00554f27              do
00554f27              {
00554f15                  i_1 = *(uint8_t*)eax_3;
00554f15                  
00554f1a                  if (i_1 != 0x22)
00554f1a                  {
00554f1c                      &lptstrFilename[edx_1] = i_1;
00554f20                      edx_1 += 1;
00554f1a                  }
00554f1a                  
00554f21                  i_1 = eax_3[1];
00554f24                  eax_3 = &eax_3[1];
00554f27              } while (i_1 != 0);
00554f13          }
00554f13          
00554f2d          &lptstrFilename[edx_1] = 0;
00554f38          uint32_t dwLen = j_GetFileVersionInfoSizeA(&lptstrFilename, &var_508);
00554f38          
00554f41          if (dwLen != 0)
00554f41          {
00554f44              void* lpData = operator new[](dwLen);
00554f4d              AC1Legacy::Resource::abData = lpData;
00554f5d              j_GetFileVersionInfoA(&lptstrFilename, var_508, dwLen, lpData);
00554f41          }
00554f41          
00554f6c          return dwLen;
00554eff      }
00554eff      
00554f77      int32_t eax_6;
00554f77      char ecx;
00554f77      eax_6 = _getcwd(&lptstrFilename, 0x104);
00554f77      
00554f82      if (eax_6 != 0)
00554f82      {
00554f8c          void* edi_2 = &*(uint32_t*)((char*)var_508)[3];
00554f8c          
00554f96          do
00554f96          {
00554f90              eax_6 = *(uint8_t*)((char*)edi_2 + 1);
00554f93              edi_2 += 1;
00554f96          } while (eax_6 != 0);
00554f96          
00554f9e          *(uint16_t*)edi_2 = 0x5c;
00554fa1          char* eax_7 = &var_400;
00554fb5          char i_2;
00554fb5          
00554fb5          do
00554fb5          {
00554fb0              i_2 = *(uint8_t*)eax_7;
00554fb2              eax_7 = &eax_7[1];
00554fb5          } while (i_2 != 0);
00554fb5          
00554fbb          int32_t eax_8 = (eax_7 - &var_400);
00554fbe          void* edi_3 = &*(uint32_t*)((char*)var_508)[3];
00554fbe          
00554fc6          do
00554fc6          {
00554fc0              i_2 = *(uint8_t*)((char*)edi_3 + 1);
00554fc3              edi_3 += 1;
00554fc6          } while (i_2 != 0);
00554fc6          
00554fcf          int32_t esi_2;
00554fcf          int32_t edi_4;
00554fcf          edi_4 = __builtin_memcpy(edi_3, &var_400, ((eax_8 >> 2) << 2));
00554fd6          __builtin_memcpy(edi_4, esi_2, (eax_8 & 3));
00554fe2          uint32_t dwLen_1 = j_GetFileVersionInfoSizeA(&lptstrFilename, &var_508);
00554fe2          
00554feb          if (dwLen_1 != 0)
00554feb          {
00554fee              void* lpData_1 = operator new[](dwLen_1);
00554ff7              AC1Legacy::Resource::abData = lpData_1;
00555007              j_GetFileVersionInfoA(&lptstrFilename, var_508, dwLen_1, lpData_1);
00555019              return 1;
00554feb          }
00554f82      }
00554f82      
0055502c      lptstrFilename = 0;
00555031      _searchenv(&var_400, "PATH", &lptstrFilename);
00555037      int32_t eax_11;
00555037      eax_11 = lptstrFilename;
00555037      
00555040      if (eax_11 == 0)
0055504c          return 0;
0055504c      
00555051      char* var_514_8 = &lptstrFilename;
00555062      return AC1Legacy::Resource::LoadData(eax_11);
00554e80  }

00555063           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00555070  void AC1Legacy::Resource::Cleanup()

00555070  {
00555070      uint8_t* AC1Legacy::Resource::abData_1 = AC1Legacy::Resource::abData;
00555070      
00555077      if (AC1Legacy::Resource::abData_1 != 0)
0055507a          operator delete(AC1Legacy::Resource::abData_1);
00555070  }

00555081     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00555090  char* AC1Legacy::Resource::GetComments()

00555090  {
0055509a      if (AC1Legacy::Resource::abData == 0)
005550a1          return 0;
005550a1      
005550a5      void* result = operator new[](0x2d);
005550c5      int32_t puLen;
005550c5      char* lplpBuffer;
005550c5      j_VerQueryValueA(AC1Legacy::Resource::abData, "\StringFileInfo\040904b0\Comment…", &lplpBuffer, &puLen);
005550c5      
005550d0      if (puLen != 0)
005550d0      {
005550d2          char* lplpBuffer_1 = lplpBuffer;
005550d6          void* result_1 = result;
005550e0          int32_t eax_1;
005550e0          
005550e0          do
005550e0          {
005550d8              eax_1 = *(uint8_t*)lplpBuffer_1;
005550da              lplpBuffer_1 = &lplpBuffer_1[1];
005550db              *(uint8_t*)result_1 = eax_1;
005550dd              result_1 += 1;
005550e0          } while (eax_1 != 0);
005550d0      }
005550d0      
005550e8      return result;
00555090  }

005550e9                             90 90 90 90 90 90 90                                                           .......

005550f0  int32_t AC1Legacy::Resource::GetVersion(struct AC1Legacy::VERSION_NO_t* arg1)

005550f0  {
005550f0      uint8_t* AC1Legacy::Resource::abData_1 = AC1Legacy::Resource::abData;
005550f0      
005550fa      if (AC1Legacy::Resource::abData_1 != 0)
005550fa      {
00555112          int32_t puLen;
00555112          int32_t lplpBuffer;
00555112          j_VerQueryValueA(AC1Legacy::Resource::abData_1, "\StringFileInfo\040904b0\Turbine…", &lplpBuffer, &puLen);
00555112          
0055511d          if (puLen != 0)
0055511d          {
0055514a              sscanf(lplpBuffer, "%d.%d.%d.%c%c%c%c.%c", arg1, &arg1->sc, &arg1->bb, &arg1->mm, &arg1->mm[1], &arg1->dd, &arg1->dd[1], &arg1->debug);
0055515b              return 1;
0055511d          }
005550fa      }
005550fa      
00555101      return 0;
005550f0  }

0055515c                                                                                      90 90 90 90                              ....

00555160  void __fastcall PositionManager::UseTime(class PositionManager* this)

00555160  {
00555163      class InterpolationManager* interpolation_manager = this->interpolation_manager;
00555163      
00555167      if (interpolation_manager != 0)
00555169          InterpolationManager::UseTime(interpolation_manager);
00555169      
0055516e      class ConstraintManager* constraint_manager = this->constraint_manager;
0055516e      
00555173      if (constraint_manager != 0)
00555175          IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(constraint_manager);
00555175      
0055517a      class StickyManager* sticky_manager = this->sticky_manager;
0055517a      
00555180      if (sticky_manager == 0)
00555187          return;
00555187      
00555182      /* tailcall */
00555182      return StickyManager::UseTime(sticky_manager);
00555160  }

00555188                          90 90 90 90 90 90 90 90                                                          ........

00555190  void __thiscall PositionManager::adjust_offset(class PositionManager* this, class Frame* arg2, double arg3)

00555190  {
00555191      int32_t ebx = arg3;
0055519d      class InterpolationManager* interpolation_manager = this->interpolation_manager;
005551a2      int32_t edi = *(uint32_t*)((char*)arg3)[4];
005551a2      
005551a6      if (interpolation_manager != 0)
005551a6      {
005551a8          int32_t var_14_1 = edi;
005551ab          InterpolationManager::adjust_offset(interpolation_manager, arg2, ebx);
005551a6      }
005551a6      
005551b0      class StickyManager* sticky_manager = this->sticky_manager;
005551b0      
005551b5      if (sticky_manager != 0)
005551b5      {
005551b7          int32_t var_14_2 = edi;
005551ba          StickyManager::adjust_offset(sticky_manager, arg2, ebx);
005551b5      }
005551b5      
005551bf      class ConstraintManager* constraint_manager = this->constraint_manager;
005551bf      
005551c4      if (constraint_manager != 0)
005551c4      {
005551c6          int32_t var_14_3 = edi;
005551c9          ConstraintManager::adjust_offset(constraint_manager, arg2, ebx);
005551c4      }
00555190  }

005551d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005551e0  void __fastcall PositionManager::UnStick(class PositionManager* this)

005551e0  {
005551e0      class StickyManager* sticky_manager = this->sticky_manager;
005551e0      
005551e5      if (sticky_manager == 0)
005551ec          return;
005551ec      
005551e7      /* tailcall */
005551e7      return StickyManager::UnStick(sticky_manager);
005551e0  }

005551ed                                         90 90 90                                                               ...

005551f0  void __thiscall PositionManager::InterpolateTo(class PositionManager* this, class Position const* arg2, int32_t arg3)

005551f0  {
005551f6      if (this->interpolation_manager == 0)
00555204          this->interpolation_manager = InterpolationManager::Create(this->physics_obj);
00555204      
00555212      InterpolationManager::InterpolateTo(this->interpolation_manager, arg2, arg3);
005551f0  }

0055521b                                                                                   90 90 90 90 90                             .....

00555220  void __fastcall PositionManager::StopInterpolating(class PositionManager* this)

00555220  {
00555220      class InterpolationManager* interpolation_manager = this->interpolation_manager;
00555220      
00555224      if (interpolation_manager == 0)
0055522b          return;
0055522b      
00555226      /* tailcall */
00555226      return InterpolationManager::StopInterpolating(interpolation_manager);
00555220  }

0055522c                                      90 90 90 90                                                              ....

00555230  void __thiscall PositionManager::StickTo(class PositionManager* this, uint32_t arg2, float arg3, float arg4)

00555230  {
00555238      if (this->sticky_manager == 0)
00555246          this->sticky_manager = StickyManager::Create(this->physics_obj);
00555246      
0055525b      StickyManager::StickTo(this->sticky_manager, arg2, arg3, arg4);
00555230  }

00555264              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00555270  uint32_t __fastcall PositionManager::GetStickyObjectID(class PositionManager const* this)

00555270  {
00555270      class StickyManager* sticky_manager = this->sticky_manager;
00555270      
00555275      if (sticky_manager == 0)
0055527e          return 0;
0055527e      
00555277      /* tailcall */
00555277      return CommandList::GetHead(sticky_manager);
00555270  }

0055527f                                                                                               90                                 .

00555280  void __thiscall PositionManager::ConstrainTo(class PositionManager* this, class Position const* arg2, float arg3, float arg4)

00555280  {
00555288      if (this->constraint_manager == 0)
00555296          this->constraint_manager = ConstraintManager::Create(this->physics_obj);
00555296      
00555299      class ConstraintManager* constraint_manager = this->constraint_manager;
00555299      
0055529f      if (constraint_manager == 0)
005552a6          return;
005552a6      
005552a1      /* tailcall */
005552a1      return ConstraintManager::ConstrainTo(constraint_manager, arg2, arg3, arg4);
00555280  }

005552a9                             90 90 90 90 90 90 90                                                           .......

005552b0  void __fastcall PositionManager::UnConstrain(class PositionManager* this)

005552b0  {
005552b0      class ConstraintManager* constraint_manager = this->constraint_manager;
005552b0      
005552b5      if (constraint_manager == 0)
005552bc          return;
005552bc      
005552b7      /* tailcall */
005552b7      return ConstraintManager::UnConstrain(constraint_manager);
005552b0  }

005552bd                                                                                         90 90 90                               ...

005552c0  int32_t __fastcall PositionManager::IsFullyConstrained(class PositionManager const* this)

005552c0  {
005552c0      class ConstraintManager* constraint_manager = this->constraint_manager;
005552c0      
005552c5      if (constraint_manager == 0)
005552ce          return 0;
005552ce      
005552c7      /* tailcall */
005552c7      return ConstraintManager::IsFullyConstrained(constraint_manager);
005552c0  }

005552cf                                               90                                                                 .

005552d0  class PositionManager* PositionManager::Create(class CPhysicsObj* arg1)

005552d0  {
005552d3      void* result = operator new(0x10);
005552d3      
005552df      if (result == 0)
00555332          return 0;
00555332      
005552e1      *(uint32_t*)result = 0;
005552e7      *(uint32_t*)((char*)result + 4) = 0;
005552ee      *(uint32_t*)((char*)result + 8) = 0;
005552f5      *(uint32_t*)((char*)result + 0xc) = 0;
005552fc      class QuickWindow* ecx = *(uint32_t*)result;
00555305      *(uint32_t*)((char*)result + 0xc) = arg1;
00555305      
00555308      if (ecx != 0)
0055530b          QuickWindow::SetWindowID(ecx, arg1);
0055530b      
00555310      class StickyManager* ecx_1 = *(uint32_t*)((char*)result + 4);
00555310      
00555315      if (ecx_1 != 0)
00555318          StickyManager::SetPhysicsObject(ecx_1, arg1);
00555318      
0055531d      class ConstraintManager* ecx_2 = *(uint32_t*)((char*)result + 8);
0055531d      
00555322      if (ecx_2 != 0)
00555325          ConstraintManager::SetPhysicsObject(ecx_2, arg1);
00555325      
0055532e      return result;
005552d0  }

00555333                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00555340  void __fastcall PositionManager::Destroy(class PositionManager* this)

00555340  {
00555344      class InterpolationManager* interpolation_manager = this->interpolation_manager;
00555344      
00555348      if (interpolation_manager != 0)
00555348      {
0055534c          InterpolationManager::~InterpolationManager(interpolation_manager);
00555352          operator delete(interpolation_manager);
00555348      }
00555348      
0055535a      class StickyManager* sticky_manager = this->sticky_manager;
0055535f      this->interpolation_manager = 0;
0055535f      
00555365      if (sticky_manager != 0)
00555365      {
00555369          StickyManager::~StickyManager(sticky_manager);
0055536f          operator delete(sticky_manager);
00555365      }
00555365      
00555377      class ConstraintManager* constraint_manager = this->constraint_manager;
0055537c      this->sticky_manager = nullptr;
0055537c      
00555383      if (constraint_manager != 0)
00555383      {
00555387          ConstraintManager::~ConstraintManager(constraint_manager);
0055538d          operator delete(constraint_manager);
00555383      }
00555383      
00555396      this->constraint_manager = nullptr;
00555340  }

0055539f                                                                                               90                                 .

005553a0  void __fastcall PositionManager::~PositionManager(class PositionManager* this)

005553a0  {
005553a0      /* tailcall */
005553a0      return PositionManager::Destroy(this);
005553a0  }

005553a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005553b0  int32_t __fastcall PositionManager::IsInterpolating(class PositionManager const* this)

005553b0  {
005553b0      class InterpolationManager* interpolation_manager = this->interpolation_manager;
005553b0      
005553b4      if (interpolation_manager == 0)
005553c4          return 0;
005553c4      
005553bc      int32_t result;
005553bc      result = interpolation_manager->position_queue.head_ != 0;
005553c1      return result;
005553b0  }

005553c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005553d0  void __fastcall PositionManager::HandleUpdateTarget(class PositionManager* this, class TargetInfo arg2)

005553d0  {
005553d8      if (this->sticky_manager != 0)
005553d8      {
005553ea          void var_d4;
005553ea          TargetInfo::TargetInfo(&var_d4, &arg2);
005553f2          StickyManager::HandleUpdateTarget(this->sticky_manager, var_d4);
005553d8      }
005553d0  }

005553fb                                                                                   90 90 90 90 90                             .....

00555400  void __fastcall StickyManager::UnStick(class StickyManager* this)

00555400  {
00555406      if (this->target_id == 0)
00555427          return;
00555427      
00555408      class CPhysicsObj* physics_obj = this->physics_obj;
0055540b      this->target_id = 0;
00555411      this->initialized = 0;
00555418      CPhysicsObj::clear_target(physics_obj);
00555421      /* tailcall */
00555421      return CPhysicsObj::interrupt_current_movement(this->physics_obj);
00555400  }

00555428                          90 90 90 90 90 90 90 90                                                          ........

00555430  void __thiscall StickyManager::adjust_offset(class StickyManager* this, class Frame* arg2, double arg3)

00555430  {
00555436      uint32_t target_id = this->target_id;
00555436      
00555445      if ((target_id != 0 && this->initialized != 0))
00555445      {
00555459          class Position* edi_2 = &this->physics_obj->m_position;
0055545c          class CPhysicsObj* eax = CPhysicsObj::GetObjectA(target_id);
00555466          class Position* ebp_1 = &eax->m_position;
00555466          
00555469          if (eax == 0)
0055546b              ebp_1 = &this->target_position;
0055546b          
00555476          int32_t __return;
00555476          class AC1Legacy::Vector3* eax_1 = Position::get_offset(edi_2, &__return, ebp_1);
00555456          arg2->m_fOrigin.x = eax_1->x;
00555456          arg2->m_fOrigin.y = eax_1->y;
00555456          arg2->m_fOrigin.z = eax_1->z;
00555495          class AC1Legacy::Vector3* eax_3 = Position::globaltolocalvec(edi_2, &__return, &arg2->m_fOrigin);
00555456          arg2->m_fOrigin.x = eax_3->x;
00555456          arg2->m_fOrigin.y = eax_3->y;
00555456          arg2->m_fOrigin.z = eax_3->z;
00555456          arg2->m_fOrigin.z = 0f;
005554b3          float target_radius = this->target_radius;
005554c1          int32_t var_34_1 = CPhysicsObj::GetRadius(this->physics_obj);
005554d5          long double x87_r0;
005554d5          float var_14_1 = ((float)(Position::cylinder_distance_no_z(((float)x87_r0), edi_2, target_radius, ebp_1) - ((long double)0.300000012f)));
005554d5          int16_t top_1 = 1;
005554d5          
005554e0          if (AC1Legacy::Vector3::normalize_check_small(&arg2->m_fOrigin) != 0)
005554e0          {
005554e2              __return = 0;
00555456              arg2->m_fOrigin.x = __return;
00555456              arg2->m_fOrigin.y = 0f;
00555456              arg2->m_fOrigin.z = 0f;
005554e0          }
005554e0          
00555522          class CMotionInterp* eax_7;
00555522          long double st0_2;
00555522          
00555522          if (CPhysicsObj::get_minterp(this->physics_obj) == 0)
0055553b              top_1 = 0;
00555522          else
0055552e              eax_7 = CMotionInterp::get_max_speed(CPhysicsObj::get_minterp(this->physics_obj));
0055553f          long double temp1_1 = ((long double)0.000199999995f);
0055553f          (/* unimplemented  {fcom st0, dword [&F_EPSILON]} f- temp1_1 */ - temp1_1);
0055553f          bool c0_1 = /* bool c0_1 = unimplemented  {fcom st0, dword [&F_EPSILON]} f< temp1_1 */ < temp1_1;
0055553f          bool c2_1 = (FCMP_UO(/* bool c2_1 = is_unordered.t(unimplemented  {fcom st0, dword [&F_EPSILON]}, temp1_1) */, temp1_1));
0055553f          bool c3_1 = /* bool c3_1 = unimplemented  {fcom st0, dword [&F_EPSILON]} f== temp1_1 */ == temp1_1;
00555545          eax_7 = ((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
00555547          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00555547          
0055554a          if (!(p_1))
0055554a          {
0055554c              /* unimplemented  {fstp st0, st0} */;
0055554c              /* unimplemented  {fstp st0, st0} */;
0055554e              /* unimplemented  {fld st0, dword [&MAX_VELOCITY]} */;
0055554a          }
0055554a          
00555554          /* unimplemented  {fmul st0, qword [esp+0x2c]} */;
00555558          /* unimplemented  {fld st0, dword [esp+0x10]} */;
0055555c          /* unimplemented  {fabs } */;
0055555e          /* unimplemented  {fld st0, st1} */;
00555560          (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
00555560          bool c0_2 = /* bool c0_2 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_2 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
00555560          bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_2 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
00555560          bool c3_2 = /* bool c3_2 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_2 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
00555560          /* unimplemented  {fcompp } */;
00555560          /* unimplemented  {fcompp } */;
00555562          eax_7 = ((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
00555564          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00555567          int16_t top_9;
00555567          
00555567          if (p_2)
00555567          {
00555579              /* unimplemented  {fstp st0, st0} */;
00555579              /* unimplemented  {fstp st0, st0} */;
0055557b              /* unimplemented  {fld st0, dword [esp+0x10]} */;
0055557f              /* unimplemented  {fmul st0, dword [esi]} */;
00555456              arg2->m_fOrigin.x = ((float)/* arg2->m_fOrigin.x = fconvert.s(unimplemented  {fstp dword [esi], st0}) */);
00555581              /* unimplemented  {fstp dword [esi], st0} */;
00555583              /* unimplemented  {fld st0, dword [esp+0x10]} */;
00555587              /* unimplemented  {fmul st0, dword [esi+0x4]} */;
00555456              arg2->m_fOrigin.y = ((float)/* arg2->m_fOrigin.y = fconvert.s(unimplemented  {fstp dword [esi+0x4], st0}) */);
0055558a              /* unimplemented  {fstp dword [esi+0x4], st0} */;
0055558d              top_9 = top_1;
0055558d              /* unimplemented  {fld st0, dword [esp+0x10]} */;
00555567          }
00555567          else
00555567          {
00555569              /* unimplemented  {fld st0, st0} */;
0055556b              /* unimplemented  {fmul st0, dword [esi]} */;
00555456              arg2->m_fOrigin.x = ((float)/* arg2->m_fOrigin.x = fconvert.s(unimplemented  {fstp dword [esi], st0}) */);
0055556d              /* unimplemented  {fstp dword [esi], st0} */;
0055556f              /* unimplemented  {fld st0, st0} */;
00555571              /* unimplemented  {fmul st0, dword [esi+0x4]} */;
00555456              arg2->m_fOrigin.y = ((float)/* arg2->m_fOrigin.y = fconvert.s(unimplemented  {fstp dword [esi+0x4], st0}) */);
00555574              /* unimplemented  {fstp dword [esi+0x4], st0} */;
00555574              top_9 = top_1;
00555567          }
00555567          
00555591          /* unimplemented  {fmul st0, dword [esi+0x8]} */;
00555456          arg2->m_fOrigin.z = ((float)/* arg2->m_fOrigin.z = fconvert.s(unimplemented  {fstp dword [esi+0x8], st0}) */);
00555597          /* unimplemented  {fstp dword [esi+0x8], st0} */;
0055559a          Position::heading(edi_2, ebp_1);
005555a2          arg3 = ((float)/* arg3.d = fconvert.s(unimplemented  {fstp dword [esp+0x2c], st0}) */);
005555a2          /* unimplemented  {fstp dword [esp+0x2c], st0} */;
005555a6          Frame::get_heading(&edi_2->frame);
005555a6          /* unimplemented  {call Frame::get_heading} */;
005555ab          /* unimplemented  {fsubr st0, dword [esp+0x2c]} */;
005555b1          arg3 = ((float)/* arg3.d = fconvert.s(unimplemented  {fst dword [esp+0x24], st0}) */);
005555b6          /* unimplemented  {fabs } */;
005555b8          /* unimplemented  {fld st0, dword [&F_EPSILON]} */;
005555be          (/* unimplemented  {fcompp } f- unimplemented  {fcompp } */ - /* unimplemented  {fcompp } f- unimplemented  {fcompp } */);
005555be          bool c0_3 = /* bool c0_3 = unimplemented  {fcompp } f< unimplemented  {fcompp } */ < /* bool c0_3 = unimplemented  {fcompp } f< unimplemented  {fcompp } */;
005555be          bool c2_3 = (FCMP_UO(/* bool c2_3 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */, /* bool c2_3 = is_unordered.t(unimplemented  {fcompp }, unimplemented  {fcompp }) */));
005555be          bool c3_3 = /* bool c3_3 = unimplemented  {fcompp } f== unimplemented  {fcompp } */ == /* bool c3_3 = unimplemented  {fcompp } f== unimplemented  {fcompp } */;
005555be          /* unimplemented  {fcompp } */;
005555be          /* unimplemented  {fcompp } */;
005555be          
005555c5          if ((*(uint8_t*)((char*)((((c0_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_3) ? 1 : 0) << 0xa) | ((((c3_3) ? 1 : 0) << 0xe) | (((top_9 + 3) & 7) << 0xb))))))[1] & 0x41) == 0)
005555c7              arg3 = 0;
005555c7          
005555cf          /* unimplemented  {fld st0, dword [&F_EPSILON]} */;
005555d5          /* unimplemented  {fchs } */;
005555d7          long double temp2_1 = ((long double)arg3);
005555d7          (/* unimplemented  {fcomp st0, dword [esp+0x20]} f- temp2_1 */ - temp2_1);
005555d7          bool c0_4 = /* bool c0_4 = unimplemented  {fcomp st0, dword [esp+0x20]} f< temp2_1 */ < temp2_1;
005555d7          bool c2_4 = (FCMP_UO(/* bool c2_4 = is_unordered.t(unimplemented  {fcomp st0, dword [esp+0x20]}, temp2_1) */, temp2_1));
005555d7          bool c3_4 = /* bool c3_4 = unimplemented  {fcomp st0, dword [esp+0x20]} f== temp2_1 */ == temp2_1;
005555d7          /* unimplemented  {fcomp st0, dword [esp+0x20]} */;
005555d7          
005555e0          if ((*(uint8_t*)((char*)((((c0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_4) ? 1 : 0) << 0xa) | ((((c3_4) ? 1 : 0) << 0xe) | (((top_9 + 3) & 7) << 0xb))))))[1] & 0x41) == 0)
005555e0          {
005555e2              /* unimplemented  {fld st0, dword [esp+0x20]} */;
005555e6              /* unimplemented  {fadd dword [&data_79bc60]} */;
005555ec              arg3 = ((float)/* arg3.d = fconvert.s(unimplemented  {fstp dword [esp+0x20], st0}) */);
005555ec              /* unimplemented  {fstp dword [esp+0x20], st0} */;
005555e0          }
005555e0          
005555f9          Frame::set_heading(arg2, arg3);
00555445      }
00555430  }

00555605                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00555610  void __fastcall StickyManager::UseTime(class StickyManager* this)

00555610  {
00555616      if (this->target_id != 0)
00555616      {
00555618          long double x87_r7_1 = ((long double)Timer::cur_time);
0055561e          long double temp0_1 = ((long double)this->sticky_timeout_time);
0055561e          (x87_r7_1 - temp0_1);
0055561e          
00555626          if ((*(uint8_t*)((char*)((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00555626          {
00555628              class CPhysicsObj* physics_obj = this->physics_obj;
0055562b              this->target_id = 0;
00555631              this->initialized = 0;
00555638              CPhysicsObj::clear_target(physics_obj);
00555641              /* tailcall */
00555641              return CPhysicsObj::interrupt_current_movement(this->physics_obj);
00555626          }
00555616      }
00555610  }

00555648                          90 90 90 90 90 90 90 90                                                          ........

00555650  void __fastcall StickyManager::Destroy(class StickyManager* this)

00555650  {
00555659      if (this->target_id != 0)
0055565e          CPhysicsObj::clear_target(this->physics_obj);
0055565e      
00555667      this->target_id = 0;
0055566d      int32_t var_48 = 0x796910;
0055567d      int32_t var_40 = 0x3f800000;
00555685      int32_t var_3c = 0;
0055568d      int32_t var_38 = 0;
00555695      int32_t var_34 = 0;
0055569d      int32_t var_c = 0;
005556a5      int32_t var_8 = 0;
005556ad      int32_t var_4 = 0;
005556b5      Frame::cache(&var_40);
005556c6      this->target_position.objcell_id = 0;
005556c9      Frame::operator=(&this->target_position.frame, &var_40);
005556ce      this->initialized = 0;
00555650  }

005556da                                                                                90 90 90 90 90 90                            ......

005556e0  void __thiscall StickyManager::SetPhysicsObject(class StickyManager* this, class CPhysicsObj* arg2)

005556e0  {
005556e8      if (this->physics_obj == 0)
005556e8      {
005556fe          this->physics_obj = arg2;
00555702          return;
005556e8      }
005556e8      
005556ea      StickyManager::Destroy(this);
005556f3      this->physics_obj = arg2;
005556e0  }

00555705                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00555710  void __thiscall StickyManager::StickTo(class StickyManager* this, uint32_t arg2, float arg3, float arg4)

00555710  {
00555716      if (this->target_id != 0)
00555716      {
00555718          class CPhysicsObj* physics_obj = this->physics_obj;
0055571b          this->target_id = 0;
00555721          this->initialized = 0;
00555728          CPhysicsObj::clear_target(physics_obj);
00555730          CPhysicsObj::interrupt_current_movement(this->physics_obj);
00555716      }
00555716      
00555749      this->target_radius = arg3;
0055574c      class CPhysicsObj* physics_obj_1 = this->physics_obj;
0055574f      this->target_id = arg2;
00555751      long double x87_r7_1 = (((long double)1f) + ((long double)Timer::cur_time));
0055575a      this->initialized = 0;
00555761      this->sticky_timeout_time = ((double)x87_r7_1);
00555771      CPhysicsObj::set_target(physics_obj_1, 0, arg2, 0.5f, ((double)((long double)0.5f)));
00555710  }

0055577a                                                                                90 90 90 90 90 90                            ......

00555780  void __thiscall StickyManager::HandleUpdateTarget(class StickyManager* this, class TargetInfo arg2)

00555780  {
00555783      uint32_t target_id = this->target_id;
00555783      
00555789      if (arg2.object_id == target_id)
00555789      {
00555799          if (arg2.status == Ok_TargetStatus)
00555799          {
0055579b              uint32_t objcell_id = arg2.target_position.objcell_id;
0055579f              this->initialized = 1;
005557aa              this->target_position.objcell_id = objcell_id;
005557ad              Frame::operator=(&this->target_position.frame, &arg2.target_position.frame);
005557b3              return;
00555799          }
00555799          
005557b8          if (target_id != 0)
005557b8          {
005557ba              class CPhysicsObj* physics_obj = this->physics_obj;
005557bd              this->target_id = 0;
005557c3              this->initialized = 0;
005557ca              CPhysicsObj::clear_target(physics_obj);
005557d2              CPhysicsObj::interrupt_current_movement(this->physics_obj);
005557b8          }
00555789      }
00555780  }

005557db                                                                                   90 90 90 90 90                             .....

005557e0  void __fastcall StickyManager::~StickyManager(class StickyManager* this)

005557e0  {
005557e3      StickyManager::Destroy(this);
005557e8      this->target_position.vtable = 0x79285c;
005557e0  }

005557f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00555800  class StickyManager* StickyManager::Create(class CPhysicsObj* arg1)

00555800  {
00555804      void* result = operator new(0x60);
00555804      
00555812      if (result == 0)
00555866          return 0;
00555866      
00555814      *(uint32_t*)result = 0;
00555816      *(uint32_t*)((char*)result + 4) = 0;
0055581c      *(uint32_t*)((char*)result + 8) = 0x796910;
00555823      *(uint32_t*)((char*)result + 0xc) = 0;
00555826      *(uint32_t*)((char*)result + 0x10) = 0x3f800000;
0055582c      *(uint32_t*)((char*)result + 0x14) = 0;
0055582f      *(uint32_t*)((char*)result + 0x18) = 0;
00555832      *(uint32_t*)((char*)result + 0x1c) = 0;
00555835      *(uint32_t*)((char*)result + 0x44) = 0;
00555838      *(uint32_t*)((char*)result + 0x48) = 0;
0055583b      *(uint32_t*)((char*)result + 0x4c) = 0;
0055583e      Frame::cache(((char*)result + 0x10));
00555847      *(uint32_t*)((char*)result + 0x50) = 0;
0055584a      *(uint32_t*)((char*)result + 0x54) = 0;
0055585a      *(uint32_t*)((char*)result + 0x50) = arg1;
00555861      return result;
00555800  }

00555867                       90 90 90 90 90 90 90 90 90                                                         .........

00555870  class LListData* __fastcall LListBase::RemoveTail(class LListBase* this)

00555870  {
00555870      class LListData* head_ = this->head_;
00555870      
00555874      if (head_ == 0)
00555876          return head_;
00555876      
00555877      class LListData* llist_next = head_->llist_next;
0055587a      class LListData* tail_ = this->tail_;
0055587a      
0055587f      if (head_ == tail_)
0055587f      {
00555883          this->head_ = llist_next;
00555883          
00555885          if (llist_next == 0)
00555887              this->tail_ = llist_next;
00555887          
0055588a          head_->llist_next = 0;
00555891          return head_;
0055587f      }
0055587f      
00555894      if (llist_next != tail_)
00555894      {
005558a6          do
005558a6          {
005558a0              head_ = llist_next;
005558a2              llist_next = head_->llist_next;
005558a6          } while (llist_next != this->tail_);
00555894      }
00555894      
005558a8      class LListData* llist_next_1 = head_->llist_next;
005558a8      
005558ac      if (llist_next_1 == 0)
005558b1          return 0;
005558b1      
005558b4      head_->llist_next = llist_next_1->llist_next;
005558b6      llist_next_1->llist_next = 0;
005558b6      
005558bf      if (this->tail_ == llist_next_1)
005558c1          this->tail_ = head_;
005558c1      
005558c7      return llist_next_1;
00555870  }

005558c8                          90 90 90 90 90 90 90 90                                                          ........

005558d0  void __thiscall InterpolationManager::InterpolationManager(class InterpolationManager* this, class CPhysicsObj* arg2)

005558d0  {
005558db      this->original_distance = 999999f;
005558de      this->position_queue.head_ = 0;
005558e0      this->position_queue.tail_ = nullptr;
005558e3      this->frame_counter = 0;
005558e6      this->progress_quantum = 0f;
005558e9      this->node_fail_counter = 0;
005558ef      this->blipto_position.vtable = 0x796910;
005558f6      this->blipto_position.objcell_id = 0;
005558ec      this->blipto_position.frame.qw = 0x3f800000;
005558ec      this->blipto_position.frame.qx = 0f;
005558ec      this->blipto_position.frame.qy = 0f;
005558ec      this->blipto_position.frame.qz = 0f;
005558ec      this->blipto_position.frame.m_fOrigin.x = 0;
005558ec      this->blipto_position.frame.m_fOrigin.y = 0f;
005558ec      this->blipto_position.frame.m_fOrigin.z = 0f;
00555911      Frame::cache(&this->blipto_position.frame);
0055591a      this->physics_obj = arg2;
005558d0  }

00555923           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00555930  class InterpolationManager* InterpolationManager::Create(class CPhysicsObj* arg1)

00555930  {
00555932      void* eax = operator new(0x68);
00555932      
0055593c      if (eax == 0)
0055594d          return 0;
0055594d      
0055594a      return InterpolationManager::InterpolationManager(eax, arg1);
00555930  }

0055594e                                            90 90                                                                ..

00555950  void __fastcall InterpolationManager::StopInterpolating(class InterpolationManager* this)

00555950  {
0055595a      while (this->position_queue.head_ != 0)
0055595a      {
00555960          class LListData* head_ = this->position_queue.head_;
00555960          
00555964          if (head_ != 0)
00555964          {
00555966              class LListData* llist_next = head_->llist_next;
0055596a              this->position_queue.head_ = llist_next;
0055596a              
0055596c              if (llist_next == 0)
0055596e                  this->position_queue.tail_ = nullptr;
0055596e              
00555971              head_->llist_next = 0;
00555974              *(int32_t*)((char*)head_ + 8) = 0x79285c;
0055597b              operator delete(head_);
00555964          }
0055595a      }
0055595a      
0055598c      this->frame_counter = 0;
0055598f      this->progress_quantum = 0f;
00555992      this->node_fail_counter = 0;
00555996      this->original_distance = 999999f;
00555950  }

0055599b                                                                                   90 90 90 90 90                             .....

005559a0  void __thiscall InterpolationManager::NodeCompleted(class InterpolationManager* this, int32_t arg2)

005559a0  {
005559a8      if (this->physics_obj != 0)
005559a8      {
005559ae          class LListData* head_ = this->position_queue.head_;
005559b3          this->frame_counter = 0;
005559ba          this->progress_quantum = 0f;
005559c1          class LListData* head;
005559c1          
005559c1          if (head_ == 0)
005559d8              head = nullptr;
005559c1          else
005559c1          {
005559c3              class LListData* llist_next = head_->llist_next;
005559c7              this->position_queue.head_ = llist_next;
005559c7              
005559c9              if (llist_next == 0)
005559cb                  this->position_queue.tail_ = llist_next;
005559cb              
005559ce              head_->llist_next = 0;
005559d4              head = head_;
005559c1          }
005559c1          
005559da          class LListData* head__1 = this->position_queue.head_;
005559de          void* __offset(LListData, 0x8) var_c_1;
005559de          
005559de          if (head__1 == 0)
005559de          {
005559e5              this->original_distance = 999999f;
005559e5              
005559ee              if (arg2 != 0)
005559ee              {
005559f2                  InterpolationManager::StopInterpolating(this);
005559f7                  goto label_555a35;
005559ee              }
005559ee              
005559fb              if (head != 0)
005559fb              {
00555a00                  var_c_1 = &head[2];
00555a30              label_555a30:
00555a30                  Position::operator=(&this->blipto_position, var_c_1);
00555a30                  goto label_555a35;
005559fb              }
005559de          }
005559de          else if (*(int32_t*)((char*)head__1 + 4) != 1)
00555a07          {
00555a23              if (arg2 != 0)
00555a23                  goto label_555a35;
00555a23              
00555a27              if (head != 0)
00555a27              {
00555a2c                  var_c_1 = &head[2];
00555a2c                  goto label_555a30;
00555a27              }
00555a07          }
00555a07          else
00555a07          {
00555a18              this->original_distance = ((float)Position::distance(&this->physics_obj->m_position, &head__1[2]));
00555a35          label_555a35:
00555a35              
00555a37              if (head != 0)
00555a37              {
00555a3a                  *(int32_t*)((char*)head + 8) = 0x79285c;
00555a41                  operator delete(head);
00555a37              }
00555a07          }
005559a8      }
005559a0  }

00555a4e                                            90 90                                                                ..

00555a50  void __fastcall InterpolationNode::InterpolationNode(class InterpolationNode* this)

00555a50  {
00555a55      this->llist_next = 0;
00555a57      this->type = 0;
00555a5d      this->p.vtable = 0x796910;
00555a64      this->p.objcell_id = 0;
00555a5a      this->p.frame.qw = 0x3f800000;
00555a5a      this->p.frame.qx = 0f;
00555a5a      this->p.frame.qy = 0f;
00555a5a      this->p.frame.qz = 0f;
00555a5a      this->p.frame.m_fOrigin.x = 0;
00555a5a      this->p.frame.m_fOrigin.y = 0f;
00555a5a      this->p.frame.m_fOrigin.z = 0f;
00555a7f      Frame::cache(&this->p.frame);
00555a50  }

00555a88                          90 90 90 90 90 90 90 90                                                          ........

00555a90  class Frame* __thiscall Position::subtract2(class Position const* this, class Frame* __return, class Position const* arg3)

00555a90  {
00555aa7      void var_40;
00555aa7      Frame::subtract2(&var_40, &this->frame, &arg3->frame);
00555ab9      void __return_1;
00555ab9      class AC1Legacy::Vector3* eax_1 = Position::localtolocal(arg3, &__return_1, this, &Legacy_Vector3_ZeroVector__);
00555ac4      float x = eax_1->x;
00555acf      float y = eax_1->y;
00555ad9      float z = eax_1->z;
00555add      Frame::operator=(__return, &var_40);
00555ae9      return __return;
00555a90  }

00555aec                                      90 90 90 90                                                              ....

00555af0  void __fastcall InterpolationManager::Destroy(class InterpolationManager* this)

00555af0  {
00555af3      while (true)
00555af3      {
00555af3          class LListData** head_ = this->position_queue.head_;
00555af3          
00555af7          if (head_ == 0)
00555af7              break;
00555af7          
00555af9          class LListData* ecx = *(uint32_t*)head_;
00555afd          this->position_queue.head_ = ecx;
00555afd          
00555aff          if (ecx == 0)
00555b01              this->position_queue.tail_ = ecx;
00555b01          
00555b04          *(uint32_t*)head_ = nullptr;
00555b0b          head_[2] = 0x79285c;
00555b12          operator delete(head_);
00555af3      }
00555af0  }

00555b1e                                                                                            90 90                                ..

00555b20  void __thiscall InterpolationManager::InterpolateTo(class InterpolationManager* this, class Position const* arg2, int32_t arg3)

00555b20  {
00555b23      class CPhysicsObj* physics_obj = this->physics_obj;
00555b23      
00555b28      if (physics_obj != 0)
00555b28      {
00555b2e          class LListData* tail_ = this->position_queue.tail_;
00555b3f          class Position* ecx;
00555b3f          
00555b3f          if ((tail_ == 0 || *(int32_t*)((char*)tail_ + 4) != 1))
00555b46              ecx = &physics_obj->m_position;
00555b3f          else
00555b41              ecx = &tail_[2];
00555b41          
00555b49          class Position* ebx_1 = arg2;
00555b53          arg2 = ((float)Position::distance(ecx, ebx_1));
00555b5a          int32_t eax_1;
00555b5a          long double st0_2;
00555b5a          eax_1 = CPhysicsObj::GetAutonomyBlipDistance(this->physics_obj);
00555b5f          long double temp1_1 = ((long double)arg2);
00555b5f          (st0_2 - temp1_1);
00555b63          eax_1 = ((((st0_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_2, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00555b65          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00555b68          long double x87_r0;
00555b68          
00555b68          if (!(p_1))
00555b68          {
00555b6c              void* eax_2 = operator new(0x60);
00555b76              class LListData* edi_1;
00555b76              
00555b76              if (eax_2 == 0)
00555b83                  edi_1 = nullptr;
00555b76              else
00555b7f                  edi_1 = InterpolationNode::InterpolationNode(eax_2);
00555b7f              
00555b85              *(int32_t*)((char*)edi_1 + 4) = 1;
00555b96              *(int32_t*)((char*)edi_1 + 0xc) = ebx_1->objcell_id;
00555b99              Frame::operator=(&edi_1[4], &ebx_1->frame);
00555b99              
00555ba3              if (this->keep_heading != 0)
00555ba3              {
00555ba8                  CPhysicsObj::get_heading(this->physics_obj);
00555bb9                  Frame::set_heading(&edi_1[4], ((float)x87_r0));
00555ba3              }
00555ba3              
00555bbe              class LListData* tail__1 = this->position_queue.tail_;
00555bbe              
00555bc3              if (tail__1 != 0)
00555bc3              {
00555bc5                  tail__1->llist_next = edi_1;
00555bc7                  this->position_queue.tail_ = edi_1;
00555bcc                  this->node_fail_counter = 4;
00555bd4                  return;
00555bc3              }
00555bc3              
00555bd7              this->position_queue.head_ = edi_1;
00555bd9              this->position_queue.tail_ = edi_1;
00555bde              this->node_fail_counter = 4;
00555be6              return;
00555b68          }
00555b68          
00555bf0          class AC1Legacy::Vector3* eax_6;
00555bf0          long double st0_3;
00555bf0          eax_6 = Position::distance(&this->physics_obj->m_position, ebx_1);
00555bf5          long double temp2_1 = ((long double)0.0500000007f);
00555bf5          (st0_3 - temp2_1);
00555bfb          eax_6 = ((((st0_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_3, temp2_1))) ? 1 : 0) << 0xa) | ((((st0_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00555bfd          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
00555bfd          
00555c00          if (!(p_2))
00555c00          {
00555c08              if (arg3 == 0)
00555c08              {
00555c0e                  int32_t ecx_10;
00555c0e                  long double st0_4;
00555c0e                  ecx_10 = Frame::get_heading(&ebx_1->frame);
00555c13                  int32_t var_14_1 = ecx_10;
00555c1a                  CPhysicsObj::set_heading(this->physics_obj, ((float)st0_4), 1);
00555c08              }
00555c08              
00555c21              InterpolationManager::StopInterpolating(this);
00555c29              return;
00555c00          }
00555c00          
00555c31          while (this->position_queue.tail_ != 0)
00555c31          {
00555c33              class LListData* tail__2 = this->position_queue.tail_;
00555c33              
00555c39              if (*(int32_t*)((char*)tail__2 + 4) != 1)
00555c39                  break;
00555c39              
00555c3f              class AC1Legacy::Vector3* eax_9;
00555c3f              long double st0_5;
00555c3f              eax_9 = Position::distance(&tail__2[2], ebx_1);
00555c44              long double temp3_1 = ((long double)0.0500000007f);
00555c44              (st0_5 - temp3_1);
00555c4a              eax_9 = ((((st0_5 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_5, temp3_1))) ? 1 : 0) << 0xa) | ((((st0_5 == temp3_1) ? 1 : 0) << 0xe) | 0))));
00555c4c              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00555c4c              
00555c4f              if (p_3)
00555c4f                  break;
00555c4f              
00555c53              class LListData* eax_10 = LListBase::RemoveTail(this);
00555c53              
00555c5a              if (eax_10 != 0)
00555c5a              {
00555c5d                  *(int32_t*)((char*)eax_10 + 8) = 0x79285c;
00555c64                  operator delete(eax_10);
00555c5a              }
00555c31          }
00555c31          
00555c73          while (true)
00555c73          {
00555c73              class LListData* head_ = this->position_queue.head_;
00555c75              class LListData* llist_next = head_;
00555c77              int32_t edx_1 = 0;
00555c77              
00555c7b              if (llist_next == 0)
00555c7b                  break;
00555c7b              
00555c85              do
00555c85              {
00555c80                  llist_next = llist_next->llist_next;
00555c82                  edx_1 += 1;
00555c85              } while (llist_next != 0);
00555c85              
00555c8a              if (edx_1 < 0x14)
00555c8a                  break;
00555c8a              
00555c8e              if (head_ != 0)
00555c8e              {
00555c90                  class LListData* llist_next_1 = head_->llist_next;
00555c94                  this->position_queue.head_ = llist_next_1;
00555c94                  
00555c96                  if (llist_next_1 == 0)
00555c98                      this->position_queue.tail_ = llist_next_1;
00555c98                  
00555c9b                  head_->llist_next = 0;
00555ca2                  *(int32_t*)((char*)head_ + 8) = 0x79285c;
00555ca9                  operator delete(head_);
00555c8e              }
00555c73          }
00555c73          
00555cb9          this->keep_heading = arg3;
00555cbc          void* eax_12 = operator new(0x60);
00555cc6          class LListData* edi_2;
00555cc6          
00555cc6          if (eax_12 == 0)
00555cd3              edi_2 = nullptr;
00555cc6          else
00555ccf              edi_2 = InterpolationNode::InterpolationNode(eax_12);
00555ccf          
00555cd5          *(int32_t*)((char*)edi_2 + 4) = 1;
00555ce6          *(int32_t*)((char*)edi_2 + 0xc) = ebx_1->objcell_id;
00555ce9          Frame::operator=(&edi_2[4], &ebx_1->frame);
00555ce9          
00555cf3          if (this->keep_heading != 0)
00555cf3          {
00555cf8              CPhysicsObj::get_heading(this->physics_obj);
00555d09              Frame::set_heading(&edi_2[4], ((float)x87_r0));
00555cf3          }
00555cf3          
00555d0e          class LListData* tail__3 = this->position_queue.tail_;
00555d0e          
00555d13          if (tail__3 != 0)
00555d13          {
00555d15              tail__3->llist_next = edi_2;
00555d17              this->position_queue.tail_ = edi_2;
00555d1d              return;
00555d13          }
00555d13          
00555d20          this->position_queue.head_ = edi_2;
00555d22          this->position_queue.tail_ = edi_2;
00555b28      }
00555b20  }

00555d2b                                   90 90 90 90 90                                                             .....

00555d30  void __thiscall InterpolationManager::adjust_offset(class InterpolationManager* this, class Frame* arg2, double arg3)

00555d30  {
00555d36      class LListData* head_ = this->position_queue.head_;
00555d36      
00555d3a      if (head_ != 0)
00555d3a      {
00555d40          class CPhysicsObj* physics_obj = this->physics_obj;
00555d40          
00555d52          if ((physics_obj != 0 && (physics_obj->transient_state & 1) != 0))
00555d52          {
00555d58              int32_t edx_1 = *(int32_t*)((char*)head_ + 4);
00555d58              
00555d67              if ((edx_1 != 2 && edx_1 != 3))
00555d67              {
00555d78                  class AC1Legacy::Vector3* eax_1;
00555d78                  long double st0_1;
00555d78                  eax_1 = Position::distance(&physics_obj->m_position, &head_[2]);
00555d81                  long double temp1_1 = ((long double)0.0500000007f);
00555d81                  (st0_1 - temp1_1);
00555d81                  int16_t top_1 = 0;
00555d87                  eax_1 = ((((st0_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00555d89                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00555d89                  
00555d8c                  if (!(p_1))
00555d8c                  {
00555d92                      InterpolationManager::NodeCompleted(this, 1);
00555d9d                      return;
00555d8c                  }
00555d8c                  
00555da3                  int32_t var_4c_1 = 0;
00555db2                  class CMotionInterp* eax_2;
00555db2                  
00555db2                  if (CPhysicsObj::get_minterp(this->physics_obj) != 0)
00555db2                  {
00555dbb                      class CPhysicsObj* physics_obj_1 = this->physics_obj;
00555dbe                      long double x87_r0_1;
00555dbe                      
00555dbe                      if (InterpolationManager::fUseAdjustedSpeed_ == 0)
00555dbe                      {
00555dd5                          long double st0_3;
00555dd5                          eax_2 = CMotionInterp::get_max_speed(CPhysicsObj::get_minterp(physics_obj_1));
00555dd5                          x87_r0_1 = st0_3;
00555dbe                      }
00555dbe                      else
00555dbe                      {
00555dc7                          long double st0_2;
00555dc7                          eax_2 = CMotionInterp::get_adjusted_max_speed(CPhysicsObj::get_minterp(physics_obj_1));
00555dc7                          x87_r0_1 = st0_2;
00555dbe                      }
00555dbe                      
00555de0                      float var_4c_2 = ((float)(x87_r0_1 * ((long double)2f)));
00555de0                      top_1 = 1;
00555db2                  }
00555db2                  
00555de4                  /* unimplemented  {fld st0, dword [esp+0xc]} */;
00555de8                  long double temp2_1 = ((long double)0.000199999995f);
00555de8                  (/* unimplemented  {fcomp st0, dword [&F_EPSILON]} f- temp2_1 */ - temp2_1);
00555de8                  bool c0_2 = /* bool c0_2 = unimplemented  {fcomp st0, dword [&F_EPSILON]} f< temp2_1 */ < temp2_1;
00555de8                  bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcomp st0, dword [&F_EPSILON]}, temp2_1) */, temp2_1));
00555de8                  bool c3_2 = /* bool c3_2 = unimplemented  {fcomp st0, dword [&F_EPSILON]} f== temp2_1 */ == temp2_1;
00555de8                  /* unimplemented  {fcomp st0, dword [&F_EPSILON]} */;
00555dee                  eax_2 = ((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
00555df0                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00555df0                  
00555df3                  if (!(p_2))
00555dfa                      int32_t var_4c_3 = 0x40f00000;
00555dfa                  
00555e01                  /* unimplemented  {fld st0, qword [esp+0x60]} */;
00555e05                  /* unimplemented  {fadd dword [esi+0x18]} */;
00555e08                  uint32_t edx_3 = (this->frame_counter + 1);
00555e0e                  this->progress_quantum = ((float)/* this->progress_quantum = fconvert.s(unimplemented  {fstp dword [esi+0x18], st0}) */);
00555e0e                  /* unimplemented  {fstp dword [esi+0x18], st0} */;
00555e11                  this->frame_counter = edx_3;
00555e11                  
00555e14                  if (edx_3 >= 5)
00555e14                  {
00555e16                      /* unimplemented  {fld st0, dword [esi+0x14]} */;
00555e1c                      /* unimplemented  {fsub st0, dword [esp+0x10]} */;
00555e20                      float var_44_1 = ((float)/* float var_44_1 = fconvert.s(unimplemented  {fstp dword [esp+0x14], st0}) */);
00555e20                      /* unimplemented  {fstp dword [esp+0x14], st0} */;
00555e20                      
00555e2b                      if (CPhysicsObj::get_sticky_object_id(this->physics_obj) == 0)
00555e2b                      {
00555e2d                          /* unimplemented  {fld st0, dword [esp+0x14]} */;
00555e31                          long double temp5_1 = ((long double)0.000199999995f);
00555e31                          (/* unimplemented  {fcomp st0, dword [&F_EPSILON]} f- temp5_1 */ - temp5_1);
00555e31                          bool c0_3 = /* bool c0_3 = unimplemented  {fcomp st0, dword [&F_EPSILON]} f< temp5_1 */ < temp5_1;
00555e31                          bool c2_3 = (FCMP_UO(/* bool c2_3 = is_unordered.t(unimplemented  {fcomp st0, dword [&F_EPSILON]}, temp5_1) */, temp5_1));
00555e31                          bool c3_3 = /* bool c3_3 = unimplemented  {fcomp st0, dword [&F_EPSILON]} f== temp5_1 */ == temp5_1;
00555e31                          /* unimplemented  {fcomp st0, dword [&F_EPSILON]} */;
00555e37                          uint32_t eax_7;
00555e37                          eax_7 = ((((c0_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_3) ? 1 : 0) << 0xa) | ((((c3_3) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
00555e39                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00555e3c                          bool p_5;
00555e3c                          
00555e3c                          if (p_3)
00555e3c                          {
00555e68                              /* unimplemented  {fld st0, dword [esp+0x14]} */;
00555e6c                              /* unimplemented  {fdiv st0, dword [esi+0x18]} */;
00555e6f                              /* unimplemented  {fdiv st0, dword [esp+0xc]} */;
00555e73                              long double temp6_1 = ((long double)0.300000012f);
00555e73                              (/* unimplemented  {fcomp st0, dword [&CREATURE_FAILED_INTERPOLATION_PERCENTAGE]} f- temp6_1 */ - temp6_1);
00555e73                              bool c0_5 = /* bool c0_5 = unimplemented  {fcomp st0, dword [&CREATURE_FAILED_INTERPOLATION_PERCENTAGE]} f< temp6_1 */ < temp6_1;
00555e73                              bool c2_5 = (FCMP_UO(/* bool c2_5 = is_unordered.t(unimplemented  {fcomp st0, dword [&CREATURE_FAILED_INTERPOLATION_PERCENTAGE]}, temp6_1) */, temp6_1));
00555e73                              bool c3_5 = /* bool c3_5 = unimplemented  {fcomp st0, dword [&CREATURE_FAILED_INTERPOLATION_PERCENTAGE]} f== temp6_1 */ == temp6_1;
00555e73                              /* unimplemented  {fcomp st0, dword [&CREATURE_FAILED_INTERPOLATION_PERCENTAGE]} */;
00555e79                              eax_7 = ((((c0_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_5) ? 1 : 0) << 0xa) | ((((c3_5) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
00555e7b                              p_5 = /* p_5 = unimplemented  {test ah, 0x5} */;
00555e3c                          }
00555e3c                          
00555e7e                          if ((!(p_3) || !(p_5)))
00555e7e                          {
00555e3e                              /* unimplemented  {fld st0, dword [esp+0x10]} */;
00555e42                              long double temp7_1 = ((long double)0.200000003f);
00555e42                              (/* unimplemented  {fcomp st0, dword [&MIN_DISTANCE_TO_REACH_POSITION]} f- temp7_1 */ - temp7_1);
00555e42                              bool c0_4 = /* bool c0_4 = unimplemented  {fcomp st0, dword [&MIN_DISTANCE_TO_REACH_POSITION]} f< temp7_1 */ < temp7_1;
00555e42                              bool c2_4 = (FCMP_UO(/* bool c2_4 = is_unordered.t(unimplemented  {fcomp st0, dword [&MIN_DISTANCE_TO_REACH_POSITION]}, temp7_1) */, temp7_1));
00555e42                              bool c3_4 = /* bool c3_4 = unimplemented  {fcomp st0, dword [&MIN_DISTANCE_TO_REACH_POSITION]} f== temp7_1 */ == temp7_1;
00555e42                              /* unimplemented  {fcomp st0, dword [&MIN_DISTANCE_TO_REACH_POSITION]} */;
00555e48                              eax_7 = ((((c0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_4) ? 1 : 0) << 0xa) | ((((c3_4) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
00555e4a                              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
00555e4a                              
00555e4d                              if (!(p_4))
00555e4d                              {
00555d92                                  InterpolationManager::NodeCompleted(this, 1);
00555d9d                                  return;
00555e4d                              }
00555e4d                              
00555e53                              this->node_fail_counter += 1;
00555e5a                              InterpolationManager::NodeCompleted(this, 0);
00555e65                              return;
00555e7e                          }
00555e2b                      }
00555e2b                      
00555e84                      this->frame_counter = 0;
00555e8b                      this->progress_quantum = 0f;
00555e92                      this->original_distance = ((float)st0_1);
00555e14                  }
00555e14                  
00555e9d                  void __return;
00555e9d                  Position::subtract2(&head_[2], &__return, &physics_obj->m_position);
00555ea2                  /* unimplemented  {fld st0, dword [esp+0xc]} */;
00555ea6                  /* unimplemented  {fmul st0, qword [esp+0x60]} */;
00555eaa                  void var_c;
00555eaa                  void* ecx_9 = &var_c;
00555eae                  float var_44_2 = ((float)/* float var_44_2 = fconvert.s(unimplemented  {fstp dword [esp+0x14], st0}) */);
00555eae                  /* unimplemented  {fstp dword [esp+0x14], st0} */;
00555eb2                  AC1Legacy::Vector3::magnitude(ecx_9);
00555eb2                  /* unimplemented  {call AC1Legacy::Vector3::magnitude} */;
00555eb7                  arg3 = ((float)/* arg3.d = fconvert.s(unimplemented  {fst dword [esp+0x60], st0}) */);
00555ebb                  (/* unimplemented  {fcomp st0, dword [&DESIRED_DISTANCE]} f- fconvert.t(0.0500000007f) */ - ((long double)0.0500000007f));
00555ebb                  /* unimplemented  {fcomp st0, dword [&DESIRED_DISTANCE]} */;
00555ebb                  /* unimplemented  {fcomp st0, dword [&DESIRED_DISTANCE]} */;
00555ebb                  /* unimplemented  {fcomp st0, dword [&DESIRED_DISTANCE]} */;
00555ebb                  /* unimplemented  {fcomp st0, dword [&DESIRED_DISTANCE]} */;
00555ec3                  bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x41} */;
00555ec3                  
00555ec6                  if (!(p_6))
00555ecc                      ecx_9 = InterpolationManager::NodeCompleted(this, 1);
00555ecc                  
00555ed1                  /* unimplemented  {fld st0, dword [esp+0x60]} */;
00555ed5                  long double temp4_1 = ((long double)var_44_2);
00555ed5                  (/* unimplemented  {fcomp st0, dword [esp+0x14]} f- temp4_1 */ - temp4_1);
00555ed5                  bool c0_7 = /* bool c0_7 = unimplemented  {fcomp st0, dword [esp+0x14]} f< temp4_1 */ < temp4_1;
00555ed5                  bool c2_7 = (FCMP_UO(/* bool c2_7 = is_unordered.t(unimplemented  {fcomp st0, dword [esp+0x14]}, temp4_1) */, temp4_1));
00555ed5                  bool c3_7 = /* bool c3_7 = unimplemented  {fcomp st0, dword [esp+0x14]} f== temp4_1 */ == temp4_1;
00555ed5                  /* unimplemented  {fcomp st0, dword [esp+0x14]} */;
00555ed5                  
00555ede                  if ((*(uint8_t*)((char*)((((c0_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_7) ? 1 : 0) << 0xa) | ((((c3_7) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb))))))[1] & 0x41) == 0)
00555ede                  {
00555ee0                      /* unimplemented  {fld st0, dword [esp+0x14]} */;
00555ee4                      void* var_5c_3 = ecx_9;
00555ee5                      /* unimplemented  {fdiv st0, dword [esp+0x64]} */;
00555eed                      float var_5c_4 = ((float)/* float var_5c_4 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
00555eed                      /* unimplemented  {fstp dword [esp], st0} */;
00555ef0                      Vector3::operator*=(&var_c, var_5c_4);
00555ede                  }
00555ede                  
00555efa                  if (this->keep_heading != 0)
00555f02                      Frame::set_heading(&__return, 0f);
00555f02                  
00555f10                  Frame::operator=(arg2, &__return);
00555d67              }
00555d52          }
00555d3a      }
00555d30  }

00555f1e                                                                                            90 90                                ..

00555f20  void __fastcall InterpolationManager::UseTime(class InterpolationManager* this)

00555f20  {
00555f26      class CPhysicsObj* physics_obj = this->physics_obj;
00555f26      
00555f2d      if (physics_obj != 0)
00555f2d      {
00555f33          int32_t node_fail_counter = this->node_fail_counter;
00555f33          
00555f39          if (node_fail_counter > 3)
00555f39          {
00555f8a          label_555f8a:
00555f8a              class LListData* tail_ = this->position_queue.tail_;
00555f8f              class Position* var_70_3;
00555f8f              
00555f8f              if (tail_ == 0)
00555f8f              {
00556050                  int32_t var_6c_5 = 1;
00556055                  var_70_3 = &this->blipto_position;
00556056              label_556056:
00556056                  
0055605d                  if (CPhysicsObj::SetPositionSimple(physics_obj, var_70_3, 1) == OK_SPE)
00556061                      InterpolationManager::StopInterpolating(this);
00555f8f              }
00555f8f              else
00555f8f              {
00555f99                  int32_t ebp_1 = 0;
00555f9b                  int32_t esi_1 = 0;
00555f9d                  void var_48;
00555f9d                  Position::Position(&var_48);
00555fa2                  int32_t eax_2 = *(int32_t*)((char*)tail_ + 4);
00555fad                  class LListData var_54;
00555fad                  
00555fad                  if ((eax_2 == 2 || eax_2 == 3))
00555fad                  {
00555fbe                      class LListData* esi_2 = this->position_queue.head_;
00555fc7                      class LListData edx_2 = *(int32_t*)((char*)tail_ + 0x54);
00555fca                      class LListData eax_4 = *(int32_t*)((char*)tail_ + 0x58);
00555fd5                      var_54 = *(int32_t*)((char*)tail_ + 0x50);
00555fd9                      class LListData var_50_1 = edx_2;
00555fdd                      class LListData var_4c_1 = eax_4;
00555fdd                      
00555fe1                      if (esi_2 == tail_)
00555fe1                      {
00556045                      label_556045:
00556045                          physics_obj = this->physics_obj;
00556048                          int32_t var_6c_4 = 1;
0055604d                          var_70_3 = &this->blipto_position;
0055604e                          goto label_556056;
00555fe1                      }
00555fe1                      
00556006                      do
00556006                      {
00555fe7                          if (*(int32_t*)((char*)esi_2 + 4) == 1)
00555fe7                          {
00555fef                              int32_t var_44_1 = *(int32_t*)((char*)esi_2 + 0xc);
00555ff8                              void var_40;
00555ff8                              Frame::operator=(&var_40, &esi_2[4]);
00555ffd                              ebp_1 = 1;
00555fe7                          }
00555fe7                          
00556002                          esi_2 = esi_2->llist_next;
00556006                      } while (esi_2 != tail_);
00556006                      
0055600a                      if (ebp_1 == 0)
0055600a                          goto label_556045;
0055600a                      
0055600c                      esi_1 = 1;
00555fad                  }
00555fad                  else
00555fb7                      Position::operator=(&var_48, &tail_[2]);
00555fb7                  
00556021                  if (CPhysicsObj::SetPositionSimple(this->physics_obj, &var_48, 1) == OK_SPE)
00556021                  {
00556025                      if (esi_1 != 0)
00556025                      {
00556031                          CPhysicsObj::set_velocity(this->physics_obj, &var_54, 1);
00556038                          InterpolationManager::StopInterpolating(this);
00556044                          return;
00556025                      }
00556025                      
00556061                      InterpolationManager::StopInterpolating(this);
00556021                  }
00555f8f              }
00555f39          }
00555f39          else
00555f39          {
00555f3b              class LListData* head_ = this->position_queue.head_;
00555f3b              
00555f3f              if (head_ != 0)
00555f3f              {
00555f4d              label_555f4d:
00555f4d                  int32_t edx_1 = *(int32_t*)((char*)head_ + 4);
00555f4d                  
00555f53                  if (edx_1 == 3)
00555f53                  {
00555f5b                      CPhysicsObj::set_velocity(physics_obj, &head_[0x14], 1);
00555f64                      InterpolationManager::NodeCompleted(this, 1);
00555f6f                      return;
00555f53                  }
00555f53                  
00555f73                  if (edx_1 == 2)
00555f7d                      InterpolationManager::NodeCompleted(this, 1);
00555f3f              }
00555f3f              else
00555f3f              {
00555f43                  if (node_fail_counter > 0)
00555f43                      goto label_555f8a;
00555f43                  
00555f47                  if (head_ != 0)
00555f47                      goto label_555f4d;
00555f3f              }
00555f39          }
00555f2d      }
00555f20  }

0055606e                                            90 90                                                                ..

00556070  void __fastcall InterpolationManager::~InterpolationManager(class InterpolationManager* this)

00556070  {
00556073      InterpolationManager::Destroy(this);
00556078      this->blipto_position.vtable = 0x79285c;
00556070  }

00556081     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00556090  void __thiscall ConstraintManager::SetPhysicsObject(class ConstraintManager* this, class CPhysicsObj* arg2)

00556090  {
00556096      if (this->physics_obj == 0)
00556096      {
005560ad          this->physics_obj = arg2;
005560af          return;
00556096      }
00556096      
00556098      this->physics_obj = 0;
0055609a      this->is_constrained = 0;
0055609d      this->constraint_pos_offset = 0f;
005560a4      this->physics_obj = arg2;
00556090  }

005560b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005560c0  void __fastcall ConstraintManager::UnConstrain(class ConstraintManager* this)

005560c0  {
005560c0      this->is_constrained = 0;
005560c0  }

005560c8                          90 90 90 90 90 90 90 90                                                          ........

005560d0  int32_t __fastcall ConstraintManager::IsFullyConstrained(class ConstraintManager const* this)

005560d0  {
005560d0      long double x87_r7 = ((long double)this->constraint_pos_offset);
005560d6      long double x87_r6_1 = (((long double)this->constraint_distance_max) * ((long double)0.90000000000000002));
005560dc      (x87_r6_1 - x87_r7);
005560de      int32_t eax;
005560de      eax = ((((x87_r6_1 < x87_r7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7) ? 1 : 0) << 0xe) | 0))));
005560e0      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005560e0      
005560e3      if (p)
005560ed          return 0;
005560ed      
005560ea      return 1;
005560d0  }

005560ee                                            90 90                                                                ..

005560f0  void __fastcall ConstraintManager::~ConstraintManager(class ConstraintManager* this)

005560f0  {
005560f2      this->is_constrained = 0;
005560f5      this->constraint_pos_offset = 0f;
005560f8      this->physics_obj = 0;
005560fa      this->constraint_pos.vtable = 0x79285c;
005560f0  }

00556102        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00556110  class ConstraintManager* ConstraintManager::Create(class CPhysicsObj* arg1)

00556110  {
00556114      void* result = operator new(0x5c);
00556114      
00556122      if (result == 0)
00556177          return 0;
00556177      
00556124      *(uint32_t*)result = 0;
00556126      *(uint32_t*)((char*)result + 4) = 0;
00556129      *(uint32_t*)((char*)result + 8) = 0;
0055612f      *(uint32_t*)((char*)result + 0xc) = 0x796910;
00556136      *(uint32_t*)((char*)result + 0x10) = 0;
00556139      *(uint32_t*)((char*)result + 0x14) = 0x3f800000;
0055613f      *(uint32_t*)((char*)result + 0x18) = 0;
00556142      *(uint32_t*)((char*)result + 0x1c) = 0;
00556145      *(uint32_t*)((char*)result + 0x20) = 0;
00556148      *(uint32_t*)((char*)result + 0x48) = 0;
0055614b      *(uint32_t*)((char*)result + 0x4c) = 0;
0055614e      *(uint32_t*)((char*)result + 0x50) = 0;
00556151      Frame::cache(((char*)result + 0x14));
00556156      *(uint32_t*)((char*)result + 0x54) = 0;
00556159      *(uint32_t*)((char*)result + 0x58) = 0;
00556159      
0055615e      if (*(uint32_t*)result != 0)
0055615e      {
00556160          *(uint32_t*)((char*)result + 4) = 0;
00556163          *(uint32_t*)((char*)result + 8) = 0;
00556166          *(uint32_t*)result = 0;
0055615e      }
0055615e      
0055616c      *(uint32_t*)result = arg1;
00556172      return result;
00556110  }

00556178                                                                          90 90 90 90 90 90 90 90                          ........

00556180  void __thiscall ConstraintManager::adjust_offset(class ConstraintManager* this, class Frame* arg2, double arg3)

00556180  {
00556186      class CPhysicsObj* physics_obj = this->physics_obj;
00556186      
0055618a      if (physics_obj != 0)
0055618a      {
00556190          int32_t is_constrained = this->is_constrained;
00556190          
00556195          if (is_constrained != 0)
00556195          {
005561a7              if ((physics_obj->transient_state & 1) != 0)
005561a7              {
005561a9                  long double x87_r7_1 = ((long double)this->constraint_pos_offset);
005561ac                  long double temp1_1 = ((long double)this->constraint_distance_max);
005561ac                  (x87_r7_1 - temp1_1);
005561af                  physics_obj = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005561af                  
005561b4                  if ((*(uint8_t*)((char*)physics_obj)[1] & 1) != 0)
005561b4                  {
005561e7                      long double x87_r7_2 = ((long double)this->constraint_pos_offset);
005561ea                      long double temp2_1 = ((long double)this->constraint_distance_start);
005561ea                      (x87_r7_2 - temp2_1);
005561ed                      physics_obj = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005561ef                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
005561ef                      
005561f2                      if (p_1)
005561f2                      {
005561f7                          int32_t is_constrained_1 = is_constrained;
00556209                          Vector3::operator*=(&arg2->m_fOrigin, ((float)((((long double)this->constraint_distance_max) - ((long double)this->constraint_pos_offset)) / (((long double)this->constraint_distance_max) - ((long double)this->constraint_distance_start)))));
005561f2                      }
005561b4                  }
005561b4                  else
005561b4                  {
005561c2                      arg2->m_fOrigin.x = 0;
005561c2                      arg2->m_fOrigin.y = 0f;
005561c2                      arg2->m_fOrigin.z = 0f;
005561b4                  }
005561a7              }
005561a7              
0055620e              arg2->m_fOrigin;
00556211              arg2->m_fOrigin;
00556233              this->constraint_pos_offset = ((float)(((long double)arg2->m_fOrigin.x) + ((long double)this->constraint_pos_offset)));
00556195          }
0055618a      }
00556180  }

0055623d                                                                                         90 90 90                               ...

00556240  void __thiscall ConstraintManager::ConstrainTo(class ConstraintManager* this, class Position const* arg2, float arg3, float arg4)

00556240  {
00556248      this->is_constrained = 1;
00556259      this->constraint_pos.objcell_id = arg2->objcell_id;
0055625c      Frame::operator=(&this->constraint_pos.frame, &arg2->frame);
00556271      this->constraint_distance_start = arg3;
00556274      this->constraint_distance_max = arg4;
0055627c      this->constraint_pos_offset = ((float)Position::distance(arg2, &this->physics_obj->m_position));
00556240  }

00556284              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00556290  void CCommunicationSystem::Init()

00556290  {
00556297      if (CCommunicationSystem::s_pInstance == 0)
0055629e          CCommunicationSystem::s_pInstance = CFactory::MakeCCommunicationSystem();
00556290  }

005562a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005562b0  int32_t CCommunicationSystem::IsUsingTurbineChat()

005562b0  {
005562b0      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
005562b0      
005562b7      if (CCommunicationSystem::s_pInstance_1 != 0)
005562bd          return CCommunicationSystem::s_pInstance_1->m_fUseTurbineChat;
005562bd      
005562b9      return CCommunicationSystem::s_pInstance_1;
005562b0  }

005562be                                                                                            90 90                                ..

005562c0  void gmNoticeHandler::RecvNotice_OpenBook(class gmNoticeHandler* this @ ecx, uint32_t arg2, int32_t arg3, class PageDataList const* arg4, class AC1Legacy::PStringBase<char> const* arg5, uint32_t arg6, class AC1Legacy::PStringBase<char> const* arg7) __pure

005562c0  {
005562c0      return;
005562c0  }

005562c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005562d0  void CCommunicationSystem::ChatInterfaceProvider::OnExitRoomByNameResult(class CCommunicationSystem::ChatInterfaceProvider* this @ ecx, HRESULT arg2, uint16_t const* arg3, struct tagBLOB arg4) __pure

005562d0  {
005562d0      return;
005562d0  }

005562d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005562e0  int32_t CCommunicationSystem::CSendToTurbineRoomByID(uint32_t arg1, uint16_t const* arg2, struct tagBLOB arg3, struct tagBLOB arg4)

005562e0  {
005562e0      struct IChatClient* result = AC1ClientChatManager::GetIChatClient();
005562e0      
005562e7      if (result == 0)
005562e9          return result;
005562e9      
0055630b      int32_t eax = result->vtable->SendToRoomByID(result, arg1, arg2, arg3.cbSize, arg3.pBlobData, arg4.cbSize, arg4.pBlobData);
0055630e      int32_t eax_1 = -(eax);
00556313      return ((eax_1 - eax_1) + 1);
005562e0  }

00556314                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00556320  class AC1ClientChatManager* CCommunicationSystem::GetChatManager()

00556320  {
00556320      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00556320      
00556327      if (CCommunicationSystem::s_pInstance_1 != 0)
0055632d          return CCommunicationSystem::s_pInstance_1->m_pChatManager;
0055632d      
00556329      return CCommunicationSystem::s_pInstance_1;
00556320  }

0055632e                                            90 90                                                                ..

00556330  class NetBlob* CChatEvent::CreateForSend(uint8_t const* arg1, uint32_t arg2)

00556330  {
0055633c      void* eax = operator new[]((arg2 + 8));
00556347      *(uint32_t*)((char*)eax + 4) = arg2;
00556351      *(uint32_t*)eax = 0xf7de;
0055635a      int32_t esi_2;
0055635a      int32_t edi_1;
0055635a      edi_1 = __builtin_memcpy(((char*)eax + 8), arg1, ((arg2 >> 2) << 2));
00556363      __builtin_memcpy(edi_1, esi_2, (arg2 & 3));
00556365      void* result = operator new(0x50);
00556365      
00556371      if (result == 0)
005563a3          return 0;
005563a3      
00556377      CCliDatEvent::CCliDatEvent(result, eax, (arg2 + 8));
0055637d      *(uint32_t*)result = 0x7e5a28;
00556383      *(uint32_t*)((char*)result + 8) = 0x7e5a14;
0055638a      *(uint32_t*)((char*)result + 0x10) = &CCliDatEvent::`vftable';
00556391      *(uint16_t*)((char*)result + 0x3e) = 4;
0055639c      return result;
00556330  }

005563a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005563b0  void* __thiscall CChatEvent::`scalar deleting destructor'(class CChatEvent* this, uint32_t arg2)

005563b0  {
005563b3      NetBlob::~NetBlob(this);
005563b3      
005563bd      if ((arg2 & 1) != 0)
005563c0          operator delete(this);
005563c0      
005563cb      return this;
005563b0  }

005563ce                                            90 90                                                                ..

005563d0  HRESULT __stdcall CCommunicationSystem::ChatInterfaceProvider::SendData(class CCommunicationSystem::ChatInterfaceProvider* this @ ecx, struct tagBLOB arg2)

005563d0  {
005563dc      int32_t result = 0x8000ffff;
005563e1      class NetBlob* eax = CChatEvent::CreateForSend(arg_c, arg2.pBlobData);
005563e1      
005563ed      if (eax == 0)
005563f3          return 0x8000ffff;
005563f3      
00556401      if (Proto_UI::SendBlob(eax) != 0)
00556403          result = 0;
00556403      
00556411      if (InterlockedDecrement(&eax->m_cRef) == 0)
00556413          eax->vtable->__vecDelDtor(1);
00556413      
0055641f      return result;
005563d0  }

00556422        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00556430  int32_t __thiscall AC1Legacy::PStringBase<unsigned short>::vsprintf(class AC1Legacy::PStringBase<unsigned short>* this, uint16_t const* arg2, char* arg3)

00556430  {
00556440      int32_t result = _vscwprintf(arg2, arg3);
00556446      class AC1Legacy::PSRefBuffer<unsigned short>* m_buffer = this->m_buffer;
00556450      AC1Legacy::PStringBase<unsigned short>::allocate_ref_buffer(this, result);
00556465      _vsnwprintf(&this->m_buffer->m_data, (result + 1), arg2, arg3);
00556465      
0055647e      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00556480          m_buffer->vtable->__vecDelDtor(1);
00556480      
0055648e      return result;
00556430  }

00556491                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005564a0  int32_t CCommunicationSystem::StartupTurbineChat(class AC1Legacy::PStringBase<char> arg1)

005564a0  {
005564aa      if (CCommunicationSystem::s_pInstance == 0)
005564aa      {
005564c0          if ((InterlockedDecrement((arg1 + 4)) == 0 && arg1 != 0))
005564c8              **(uint32_t**)arg1(1);
005564c8          
005564cf          return 0;
005564aa      }
005564aa      
005564d4      int32_t ecx;
005564d4      int32_t var_10_1 = ecx;
005564dd      InterlockedIncrement((arg1 + 4), arg1);
005564eb      int32_t result = CCommunicationSystem::s_pInstance->vtable->StartupTurbineChat_Internal();
005564eb      
005564fc      if ((InterlockedDecrement((arg1 + 4)) == 0 && arg1 != 0))
00556504          **(uint32_t**)arg1(1);
00556504      
0055650b      return result;
005564a0  }

0055650c                                      90 90 90 90                                                              ....

00556510  int32_t AC1Legacy::PStringBase<unsigned short>::sprintf(class AC1Legacy::PStringBase<unsigned short>* this, uint16_t const* arg2)

00556510  {
00556523      return AC1Legacy::PStringBase<unsigned short>::vsprintf(this, arg2, &arg_c);
00556510  }

00556524              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00556530  void CCommunicationSystem::Cleanup()

00556530  {
00556530      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00556530      
0055653a      if (CCommunicationSystem::s_pInstance_1 != 0)
0055653a      {
0055653d          class PSRefBufferCharData<char>* m_charbuffer = CCommunicationSystem::s_pInstance_1->m_TurbineChatDllName.m_charbuffer;
00556540          CCommunicationSystem::s_pInstance_1->vtable = 0x7cb694;
00556540          
00556559          if ((InterlockedDecrement(((char*)m_charbuffer - 0x10)) == 0 && m_charbuffer != 0x14))
00556561              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00556561          
00556564          operator delete(CCommunicationSystem::s_pInstance_1);
0055653a      }
0055653a      
0055656d      CCommunicationSystem::s_pInstance = nullptr;
00556530  }

00556579                                                                             90 90 90 90 90 90 90                           .......

00556580  class AC1Legacy::PStringBase<unsigned short>* __thiscall AC1Legacy::PStringBase<char>::to_wpstring(class AC1Legacy::PStringBase<char> const* this, class AC1Legacy::PStringBase<unsigned short>* __return, uint16_t const arg3)

00556580  {
00556580      class AC1Legacy::PStringBase<char>* var_4 = this;
0055658a      class AC1Legacy::PSRefBuffer<unsigned short>* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer;
00556597      var_4 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1;
0055659b      InterlockedIncrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1->m_cRef);
0055659d      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
005565a0      uint32_t m_len = m_buffer->m_len;
005565a6      class AC1Legacy::PStringBase<unsigned short>* result;
005565a6      
005565a6      if (m_len != 1)
005565a6      {
005565db          uint32_t esi = ((uint32_t)arg3);
005565ec          uint32_t eax_4 = kernel32_MultiByteToWideChar_Ptr(esi, 0, &m_buffer->m_data, m_len, 0, 0);
005565f6          class AC1Legacy::PStringBase<unsigned short>* var_28_1;
005565f6          wchar16 const* const var_24_2;
005565f6          
005565f6          if (eax_4 != 0)
005565f6          {
00556616              AC1Legacy::PStringBase<unsigned short>::allocate_ref_buffer(&var_4, eax_4);
0055661b              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
00556622              class AC1Legacy::PStringBase<unsigned short> edi_2 = var_4;
00556632              int32_t eax_8 = kernel32_MultiByteToWideChar_Ptr(esi, 0, &m_buffer_1->m_data, m_buffer_1->m_len, (edi_2 + 0x14), eax_4);
00556632              
0055663a              if (eax_8 == 0)
0055663a              {
00556644                  enum WIN32_ERROR var_18_6 = GetLastError();
00556647                  enum WIN32_ERROR var_1c_3 = GetLastError();
00556648                  uint32_t var_20_4 = esi;
00556649                  var_24_2 = u"Failed conversion from codepage …";
00556652                  var_28_1 = &var_4;
00556652                  goto label_556653;
0055663a              }
0055663a              
0055668d              result = __return;
00556694              *(uint32_t*)(edi_2 + 8) = eax_8;
00556698              result->m_buffer = edi_2;
0055669b              InterlockedIncrement((edi_2 + 4));
0055669b              
005566a6              if (InterlockedDecrement((edi_2 + 4)) == 0)
005566ae                  **(uint32_t**)edi_2(1);
005565f6          }
005565f6          else
005565f6          {
00556600              enum WIN32_ERROR var_18_3 = GetLastError();
00556603              enum WIN32_ERROR var_1c_1 = GetLastError();
00556604              uint32_t var_20_2 = esi;
00556605              var_24_2 = u"Could not determine number of by…";
0055660e              var_28_1 = &var_4;
00556653          label_556653:
00556653              AC1Legacy::PStringBase<unsigned short>::sprintf(var_28_1, var_24_2);
00556658              class AC1Legacy::PStringBase<unsigned short> esi_1 = var_4;
0055665c              result = __return;
00556667              result->m_buffer = esi_1;
0055666a              InterlockedIncrement((esi_1 + 4));
0055666a              
00556679              if ((InterlockedDecrement((esi_1 + 4)) == 0 && esi_1 != 0))
00556681                  **(uint32_t**)esi_1(1);
005565f6          }
005565a6      }
005565a6      else
005565a6      {
005565a8          result = __return;
005565ad          result->m_buffer = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1;
005565b0          InterlockedIncrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1->m_cRef);
005565b0          
005565c3          if ((InterlockedDecrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1 != 0))
005565c9              AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1->vtable->__vecDelDtor(1);
005565a6      }
005565a6      
005566b7      return result;
00556580  }

005566ba                                                                                90 90 90 90 90 90                            ......

005566c0  void __fastcall CCommunicationSystem::CCommunicationSystem(class CCommunicationSystem* this)

005566c0  {
005566cd      this->vtable = 0x7cb694;
005566d3      this->m_pChatInterfaceProvider = nullptr;
005566d6      this->m_fUseTurbineChat = 0;
005566d9      PStringBase<char>::PStringBase<char>(&this->m_TurbineChatDllName, "chatclient.dll");
005566c0  }

005566e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005566f0  int32_t __fastcall CCommunicationSystem::StartupTurbineChat_Internal(class CCommunicationSystem* this, class AC1Legacy::PStringBase<char> arg2)

005566f0  {
005566f0      class CCommunicationSystem* __return = this;
005566f8      bool cond:0 = this->m_pChatInterfaceProvider == 0;
005566fb      this->m_fUseTurbineChat = 1;
00556702      int32_t eax_2;
00556702      class AC1Legacy::PStringBase<char> esi_1;
00556702      
00556702      if (cond:0)
00556702      {
00556720          this->m_pChatInterfaceProvider = this->vtable->CreateChatInterfaceProvider();
00556723          void* eax_5 = operator new(0x10);
0055672d          class AC1ClientChatManager* eax_6;
0055672d          
0055672d          if (eax_5 == 0)
00556738              eax_6 = nullptr;
0055672d          else
00556731              eax_6 = AC1ClientChatManager::AC1ClientChatManager(eax_5);
00556731          
00556745          this->m_pChatManager = eax_6;
00556748          class AC1Legacy::PStringBase<unsigned short>* eax_7;
00556748          int32_t ecx_3;
00556748          eax_7 = AC1Legacy::PStringBase<char>::to_wpstring(&arg2, &__return, 0);
0055674d          class CCommunicationSystem::ChatInterfaceProvider* m_pChatInterfaceProvider = this->m_pChatInterfaceProvider;
00556751          class PStringBase<char> m_charbuffer = this->m_TurbineChatDllName.m_charbuffer;
00556755          int32_t var_1c_1 = ecx_3;
0055675e          InterlockedIncrement((m_charbuffer - 0x10));
00556772          bool cond:2_1 = AC1ClientChatManager::Init(this->m_pChatManager, m_charbuffer, m_pChatInterfaceProvider, eax_7) == 0;
00556774          class CCommunicationSystem* __return_1 = __return;
00556778          int32_t ebx;
00556778          ebx = cond:2_1;
00556778          
00556789          if ((InterlockedDecrement(&__return_1->m_pChatInterfaceProvider) == 0 && __return_1 != 0))
0055678b              __return_1->vtable->StartupTurbineChat_Internal(1);
0055678b          
00556795          esi_1 = arg2;
00556795          
00556799          if (ebx != 0)
00556799          {
005567a7              if ((InterlockedDecrement((esi_1 + 4)) == 0 && esi_1 != 0))
005567af                  **(uint32_t**)esi_1(1);
005567af              
005567b7              return 0;
00556799          }
00556799          
005567be          eax_2 = InterlockedDecrement((esi_1 + 4));
00556702      }
00556702      else
00556702      {
00556704          esi_1 = arg2;
0055670c          eax_2 = InterlockedDecrement((esi_1 + 4));
00556702      }
00556702      
005567c6      if ((eax_2 == 0 && esi_1 != 0))
005567ce          **(uint32_t**)esi_1(1);
005567ce      
005567d9      return 1;
005566f0  }

005567dc                                                                                      90 90 90 90                              ....

005567e0  void __fastcall AC1ClientChatManager::AC1ClientChatManager(class AC1ClientChatManager* this)

005567e0  {
005567e3      TurbineDwExceptionFilter::WatsonCrashReportHelper::WatsonCrashReportHelper(this);
005567ea      this->m_pChatClient = nullptr;
005567ed      this->m_hChatClientLib = nullptr;
005567f0      this->vtable = 0x7cb718;
005567f6      s_pAC1ClientChatManager = this;
005567e0  }


00556800  struct IChatClient* AC1ClientChatManager::GetIChatClient()

00556800  {
00556800      class AC1ClientChatManager* s_pAC1ClientChatManager_1 = s_pAC1ClientChatManager;
00556800      
00556807      if (s_pAC1ClientChatManager_1 != 0)
0055680d          return s_pAC1ClientChatManager_1->m_pChatClient;
0055680d      
00556809      return s_pAC1ClientChatManager_1;
00556800  }

0055680e                                            90 90                                                                ..

00556810  void* __thiscall AC1ClientChatManager::`scalar deleting destructor'(class AC1ClientChatManager* this, uint32_t arg2)

00556810  {
00556813      struct IChatClient* m_pChatClient = this->m_pChatClient;
00556818      this->vtable = 0x7cb718;
00556818      
0055681e      if (m_pChatClient != 0)
0055681e      {
00556820          m_pChatClient->vtable->Term(m_pChatClient);
00556826          struct IChatClient* m_pChatClient_1 = this->m_pChatClient;
00556826          
0055682b          if (m_pChatClient_1 != 0)
0055682b          {
0055682d              m_pChatClient_1->vtable->Release(m_pChatClient_1);
00556833              this->m_pChatClient = nullptr;
0055682b          }
0055681e      }
0055681e      
0055683a      struct HINSTANCE__* m_hChatClientLib = this->m_hChatClientLib;
0055683a      
0055683f      if (m_hChatClientLib != 0)
0055683f      {
00556842          FreeLibrary(m_hChatClientLib);
00556848          this->m_hChatClientLib = nullptr;
0055683f      }
0055683f      
00556851      TurbineDwExceptionFilter::WatsonCrashReportHelper::~WatsonCrashReportHelper(this);
00556851      
0055685b      if ((arg2 & 1) != 0)
0055685e          operator delete(this);
0055685e      
00556869      return this;
00556810  }

0055686c                                      90 90 90 90                                                              ....

00556870  int32_t __stdcall AC1ClientChatManager::IncludeFileInWatsonUpload(class AC1ClientChatManager* this @ ecx, uint16_t* arg2, uint32_t arg3)

00556870  {
00556882      void lpFilename;
00556882      GetModuleFileNameA(nullptr, &lpFilename, 0x104);
00556888      void* eax = &lpFilename;
00556895      char i;
00556895      
00556895      do
00556895      {
00556890          i = *(uint8_t*)eax;
00556892          eax += 1;
00556895      } while (i != 0);
0055689b      int32_t __saved_esi;
0055689b      void var_103;
0055689b      void* esi = ((&__saved_esi + ((char*)eax - &var_103)) + 0x10);
0055689b      
005568a6      if (esi >= &lpFilename)
005568a6      {
005568ab          while (*(uint8_t*)esi != 0x5c)
005568ab          {
005568ad              esi -= 1;
005568ad              
005568b4              if (esi < &lpFilename)
005568b4                  break;
005568ab          }
005568a6      }
005568a6      
005568be      class AC1Legacy::PStringBase<char> var_108;
005568be      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_108, ((char*)esi + 1));
005568cc      class AC1Legacy::PSRefBuffer<unsigned short>* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2;
005568cc      AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2, ".log");
005568db      PSUtils::change_extension(&var_108, &AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2);
005568e0      int32_t* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_4 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2;
005568e0      
005568f9      if ((InterlockedDecrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_4[1]) == 0 && AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_4 != 0))
00556901          **(uint32_t**)AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_4(1);
00556901      
00556903      class AC1Legacy::PSRefBuffer<unsigned short>* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer;
00556908      AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1;
00556910      *(uint8_t*)esi = 0;
00556913      InterlockedIncrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1->m_cRef);
00556920      int32_t var_11c_4 = (var_108 + 0x14);
00556925      void* var_120_1 = &lpFilename;
00556930      AC1Legacy::PStringBase<unsigned short>::sprintf(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2, u"%hs\%hs");
00556935      class AC1Legacy::PSRefBuffer<unsigned short>* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2;
00556935      
00556949      if (arg3 < (AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3->m_len - 1))
00556949      {
00556953          if (InterlockedDecrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3->m_cRef) == 0)
00556955              AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3->vtable->__vecDelDtor(1);
00556955          
0055695d          class AC1Legacy::PStringBase<char> esi_1 = var_108;
0055695d          
0055696d          if ((InterlockedDecrement((esi_1 + 4)) == 0 && esi_1 != 0))
00556975              **(uint32_t**)esi_1(1);
00556975          
00556982          return 0;
00556949      }
00556949      
00556991      wcscpy(arg2, &AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3->m_data);
00556991      
005569a2      if (InterlockedDecrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3->m_cRef) == 0)
005569a4          AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3->vtable->__vecDelDtor(1);
005569a4      
005569ac      class AC1Legacy::PStringBase<char> esi_2 = var_108;
005569ac      
005569bc      if ((InterlockedDecrement((esi_2 + 4)) == 0 && esi_2 != 0))
005569c4          **(uint32_t**)esi_2(1);
005569c4      
005569d4      return 1;
00556870  }

005569d7                                                                       90 90 90 90 90 90 90 90 90                         .........

005569e0  int32_t __thiscall AC1ClientChatManager::Init(class AC1ClientChatManager* this, class PStringBase<char> arg2, class CCommunicationSystem::ChatInterfaceProvider* arg3, class AC1Legacy::PStringBase<unsigned short> const* arg4)

005569e0  {
005569e0      class AC1ClientChatManager* __return = this;
005569e3      class PStringBase<char> lpLibFileName = arg2;
005569ec      HINSTANCE eax = LoadLibraryA(lpLibFileName);
005569f4      this->m_hChatClientLib = eax;
005569f7      int32_t eax_3;
005569f7      int32_t* esi_2;
005569f7      
005569f7      if (eax == 0)
005569f7      {
005569f9          class PStringBase<char> lpLibFileName_1 = lpLibFileName;
00556a05          PStringBase<char>::PStringBase<char>(&arg2, eax, "FATAL ERROR: Cannot load %s!\n");
00556a14          int32_t* esi_1 = (arg2 - 0x14);
00556a14          
00556a26          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00556a2e              **(uint32_t**)esi_1(1);
00556a2e          
00556a30          esi_2 = (lpLibFileName - 0x14);
00556a37          eax_3 = InterlockedDecrement(&esi_2[1]);
00556a39          goto label_556b3d;
005569f7      }
005569f7      
00556a51      TurbineDwExceptionFilter::AddDllToDumpCapture(PStringBase<char>::to_wpstring(&arg2, &__return, 0)->m_charbuffer);
00556a5a      void* __offset(AC1ClientChatManager, -0x14) esi_4 = ((char*)__return - 0x14);
00556a5a      
00556a70      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00556a78          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00556a78      
00556a83      int32_t eax_7 = kernel32_GetProcAddress_Ptr(this->m_hChatClientLib, "CreateChatClient");
00556a83      
00556a8d      if (eax_7 != 0)
00556a8d      {
00556ad8          if (eax_7(&this->m_pChatClient, 1, (!(Turbine::Debug::GetDebugFlags()) | 0x1600)) != 0)
00556ad8          {
00556ada              struct IChatClient* m_pChatClient = this->m_pChatClient;
00556ada              
00556ade              if (m_pChatClient != 0)
00556ade              {
00556ae6                  struct IChatClientEventSink::VTable** eax_15;
00556ae6                  struct IChatClientAsyncResultSink::VTable** edx_4;
00556ae6                  
00556ae6                  if (arg3 == 0)
00556ae6                  {
00556af0                      edx_4 = nullptr;
00556af2                      eax_15 = nullptr;
00556ae6                  }
00556ae6                  else
00556ae6                  {
00556ae8                      edx_4 = &arg3->vtable;
00556aeb                      eax_15 = &arg3->vtable;
00556ae6                  }
00556ae6                  
00556b09                  class PStringBase<char>* ecx_9 = &arg2;
00556b09                  
00556b0d                  if (m_pChatClient->vtable->Init(m_pChatClient, arg3, eax_15, edx_4, &arg4->m_buffer->m_data) != 0)
00556b0d                  {
00556b0f                      PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_9);
00556b1b                      return 0;
00556b0d                  }
00556b0d                  
00556b1e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_9);
00556b2d                  return 1;
00556ade              }
00556ad8          }
00556ad8          
00556b30          esi_2 = (lpLibFileName - 0x14);
00556b37          eax_3 = InterlockedDecrement(&esi_2[1]);
00556b3d      label_556b3d:
00556b3d          
00556b43          if ((eax_3 == 0 && esi_2 != 0))
00556b4b              **(uint32_t**)esi_2(1);
00556a8d      }
00556a8d      else if ((InterlockedDecrement((lpLibFileName - 0x10)) == 0 && lpLibFileName != 0x14))
00556ab2          **(uint32_t**)(lpLibFileName - 0x14)(1);
00556ab2      
00556b54      return 0;
005569e0  }

00556b57                                                                       90 90 90 90 90 90 90 90 90                         .........

00556b60  uint8_t __fastcall CheckForMSXML4()

00556b60  {
00556b60      int32_t var_4_2 = 0xffffffff;
00556b62      int32_t var_8 = 0x6c2af8;
00556b6d      TEB* fsbase;
00556b6d      int32_t var_c = *(uint32_t*)fsbase;
00556b6e      *(uint32_t*)fsbase = &var_c;
00556b75      int32_t ecx;
00556b75      int32_t var_10 = ecx;
00556b7d      HINSTANCE hLibModule = LoadLibraryA("msxml4.dll");
00556b7d      
00556b89      if (hLibModule == 0)
00556b89      {
00556b8c          fMSXML4Initted = 0;
00556b92          hLibModule = 0;
00556b99          *(uint32_t*)fsbase = var_c;
00556ba3          return 0;
00556b89      }
00556b89      
00556ba8      fMSXML4Initted = 1;
00556baf      CParseXml::CParseXml(&var_10);
00556bb8      int32_t var_4 = 0;
00556bc2      fMSXML4Initted = CParseXml::Init(&var_10);
00556bc7      FreeLibrary(hLibModule);
00556bcd      uint8_t fMSXML4Initted_1 = fMSXML4Initted;
00556bd7      int32_t var_4_1 = 0xffffffff;
00556bdf      CParseXml::~CParseXml(&var_10);
00556bec      *(uint32_t*)fsbase = var_c;
00556bf6      return fMSXML4Initted_1;
00556b60  }

00556bf7                                                                       90 90 90 90 90 90 90 90 90                         .........

00556c00  void KeyStone::Update()

00556c00  {
00556c00      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556c00      
00556c08      if (KeyStone::m_lpKeystone_1 == 0)
00556c0f          return;
00556c0f      
00556c0c      /* jump -> KeyStone::m_lpKeystone_1->vtable->KsUpdate */
00556c00  }


00556c10  int32_t KeyStone::Create()
// This function has unresolved stack usage. View graph of stack usage to resolve.

00556c10  {
00556c15      _chkstk();
00556c15      
00556c2e      if ((RenderDevice::render_device != 0 && KeyStone::m_fnKeystoneCreate != 0))
00556c2e      {
00556c38          int32_t var_4_1 = 0x2000;
00556c44          void* const* esp = &__return_addr;
00556c44          
00556c49          if (_getcwd(&arg_4, 0x2000) != 0)
00556c49          {
00556c4b              int32_t esi;
00556c4b              int32_t var_4_2 = esi;
00556c4c              int32_t edi;
00556c4c              int32_t var_8_2 = edi;
00556c4d              int32_t var_c_1 = 0x2000;
00556c5a              int32_t var_14_1 = 0xffffffff;
00556c61              int32_t var_1c_1 = 0;
00556c63              int32_t var_20_1 = 0;
00556c65              kernel32_MultiByteToWideChar_Ptr(0, 0, &arg_4, 0xffffffff, &arg_2004, 0x2000);
00556c6b              struct HWND__* Device::m_hWnd_1 = Device::m_hWnd;
00556c72              HIMC param1 = j_ImmGetContext(Device::m_hWnd_1);
00556c7b              j_ImmReleaseContext(Device::m_hWnd_1, param1);
00556c8b              int32_t var_4_5 = 0;
00556c8d              int32_t var_8_4 = 0;
00556c8f              int32_t var_c_2 = 0;
00556c91              int32_t var_10_2 = 0;
00556ca8              KeyStone::m_lpKeystone = KeyStone::m_fnKeystoneCreate(Device::m_hWnd_1, *(int32_t*)((char*)RenderDevice::render_device + 0x468), &arg_200c, 0, 0, 0, 0);
00556cad              j_ImmAssociateContext(Device::m_hWnd_1, param1);
00556cb3              esp = &arg_8;
00556c49          }
00556c49          
00556cb4          struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556cb4          
00556cbc          if (KeyStone::m_lpKeystone_1 != 0)
00556cbc          {
00556ccb              *(uint32_t*)((char*)esp - 4) = esp;
00556ccc              *(uint32_t*)((char*)esp - 8) = 2;
00556cce              *(uint32_t*)esp = 0;
00556cd6              struct IKeystone::VTable* vtable = KeyStone::m_lpKeystone_1->vtable;
00556cd8              *(uint32_t*)((char*)esp - 0xc) = 0x69;
00556cda              vtable->KsChangeSetting();
00556ce8              return 1;
00556cbc          }
00556c2e      }
00556c2e      
00556cc6      return 0;
00556c10  }

00556ce9                             90 90 90 90 90 90 90                                                           .......

00556cf0  int32_t KeyStone::Init()

00556cf0  {
00556cf7      if (KeyStone::m_hKeystoneLib == 0)
00556cf7      {
00556d04          if (CheckForMSXML4() == 0)
00556daa              return 0;
00556daa          
00556d17          HINSTANCE eax_1 = LoadLibraryA("keystone.dll");
00556d19          void (* kernel32_GetProcAddress_Ptr_1)() = kernel32_GetProcAddress_Ptr;
00556d25          KeyStone::m_hKeystoneLib = eax_1;
00556d31          KeyStone::m_fnKeystoneCreate = kernel32_GetProcAddress_Ptr_1(eax_1, "KeystoneCreate");
00556d36          HINSTANCE eax_3 = LoadLibraryA("plugins\ACHelpPlugin.dll");
00556d3e          KeyStone::m_hAC2HelpPluginLib = eax_3;
00556d45          KeyStone::m_fnAC2HelpPluginExecute = kernel32_GetProcAddress_Ptr_1(eax_3, "ExecutePlugin");
00556d5c          KeyStone::m_fnAC2HelpPluginTerminate = kernel32_GetProcAddress_Ptr_1(KeyStone::m_hAC2HelpPluginLib, "TerminatePlugin");
00556d61          HINSTANCE eax_7 = LoadLibraryA("plugins\ACPluginManager.dll");
00556d69          KeyStone::m_hAC2PluginManagerLib = eax_7;
00556d6e          HRESULT (* eax_8)(struct IKeystone*, uint16_t* (*)(uint16_t const*), void*) = kernel32_GetProcAddress_Ptr_1(eax_7, "ExecutePlugin");
00556d70          struct HINSTANCE__* KeyStone::m_hAC2PluginManagerLib_1 = KeyStone::m_hAC2PluginManagerLib;
00556d7c          KeyStone::m_fnAC2PluginManagerExecute = eax_8;
00556d83          KeyStone::m_fnAC2PluginManagerTerminate = kernel32_GetProcAddress_Ptr_1(KeyStone::m_hAC2PluginManagerLib_1, "TerminatePlugin");
00556d83          
00556d91          if (KeyStone::m_fnKeystoneCreate == 0)
00556d91          {
00556da3              KeyStone::m_hDummyAccel = CreateAcceleratorTableA(nullptr, 0);
00556daa              return 0;
00556d91          }
00556cf7      }
00556cf7      
00556d98      return 1;
00556cf0  }

00556dab                                   90 90 90 90 90                                                             .....

00556db0  int32_t KeyStone::DispatchMessageA(uint32_t arg1, uint32_t arg2, int32_t arg3, int32_t* arg4)

00556db0  {
00556db0      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556db7      int32_t result = 0;
00556db7      
00556dbb      if (KeyStone::m_lpKeystone_1 == 0)
00556dc0          return 0;
00556dc0      
00556dd7      int32_t* eax_2 = KeyStone::m_lpKeystone_1->vtable->KsDispatchMessage(arg1, arg2, arg3, arg4);
00556dd7      
00556ddc      if (eax_2 != 0)
00556ddc      {
00556de1          result = 1;
00556de6          *(uint32_t*)(*(uint32_t*)eax_2 + 8)(eax_2);
00556ddc      }
00556ddc      
00556dec      return result;
00556db0  }

00556ded                                         90 90 90                                                               ...

00556df0  int32_t KeyStone::IsHelpFocused()

00556df0  {
00556df0      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556df0      
00556df8      if (KeyStone::m_lpKeystone_1 == 0)
00556dfc          return 0;
00556dfc      
00556e00      int32_t result = 0;
00556e02      int32_t* eax_2 = KeyStone::m_lpKeystone_1->vtable->KsGetFocusWindow();
00556e02      
00556e07      if (eax_2 != 0)
00556e07      {
00556e0c          result = 1;
00556e11          *(uint32_t*)(*(uint32_t*)eax_2 + 8)(eax_2);
00556e07      }
00556e07      
00556e17      return result;
00556df0  }

00556e18                                                                          90 90 90 90 90 90 90 90                          ........

00556e20  int32_t KeyStone::IsOverKeystoneWindow(struct tagPOINT arg1)

00556e20  {
00556e20      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556e20      
00556e28      if (KeyStone::m_lpKeystone_1 == 0)
00556e2c          return 0;
00556e2c      
00556e35      int32_t result = 0;
00556e37      int32_t* eax_2 = KeyStone::m_lpKeystone_1->vtable->KsWindowFromPoint(&arg1);
00556e37      
00556e3c      if (eax_2 != 0)
00556e3c      {
00556e41          result = 1;
00556e46          *(uint32_t*)(*(uint32_t*)eax_2 + 8)(eax_2);
00556e3c      }
00556e3c      
00556e4c      return result;
00556e20  }

00556e4d                                         90 90 90                                                               ...

00556e50  int32_t KeyStone::TranslateAcceleratorA(struct HWND__* arg1, struct HACCEL__* arg2, struct tagMSG* arg3)

00556e50  {
00556e50      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556e50      
00556e58      if (KeyStone::m_lpKeystone_1 == 0)
00556e5c          return 0;
00556e5c      
00556e5d      struct HACCEL__* KeyStone::m_hDummyAccel_1 = arg2;
00556e5d      
00556e63      if (KeyStone::m_hDummyAccel_1 == 0)
00556e65          KeyStone::m_hDummyAccel_1 = KeyStone::m_hDummyAccel;
00556e65      
00556e7c      return KeyStone::m_lpKeystone_1->vtable->KsTranslateAccelerator(arg1, KeyStone::m_hDummyAccel_1, arg3);
00556e50  }

00556e7d                                                                                         90 90 90                               ...

00556e80  int32_t KeyStone::LoseFocus()

00556e80  {
00556e80      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556e80      
00556e88      if (KeyStone::m_lpKeystone_1 != 0)
00556e88      {
00556e8c          int32_t* eax_2 = KeyStone::m_lpKeystone_1->vtable->KsGetFocusWindow();
00556e8c          
00556e91          if (eax_2 != 0)
00556e91          {
00556e96              *(uint32_t*)(*(uint32_t*)eax_2 + 8)(eax_2);
00556e99              KeyStone::m_lpKeystone->vtable->KsSetFocusWindow(0);
00556eab              return 1;
00556e91          }
00556e88      }
00556e88      
00556eae      return 0;
00556e80  }

00556eaf                                               90                                                                 .

00556eb0  int32_t KeyStone::ClosePluginManager()

00556eb0  {
00556eb7      if (KeyStone::m_lpKeystone != 0)
00556eb7      {
00556eb9          HRESULT (* KeyStone::m_fnAC2PluginManagerTerminate_1)() = KeyStone::m_fnAC2PluginManagerTerminate;
00556eb9          
00556ec0          if (KeyStone::m_fnAC2PluginManagerTerminate_1 != 0)
00556ec0          {
00556ec5              KeyStone::m_fnAC2PluginManagerTerminate_1();
00556ecc              return 1;
00556ec0          }
00556eb7      }
00556eb7      
00556ec4      return 0;
00556eb0  }

00556ecd                                         90 90 90                                                               ...

00556ed0  int32_t KeyStone::OpenPluginManager()

00556ed0  {
00556ed7      if (KeyStone::m_lpKeystone != 0)
00556ed7      {
00556ed9          HRESULT (* KeyStone::m_fnAC2PluginManagerTerminate_1)() = KeyStone::m_fnAC2PluginManagerTerminate;
00556ed9          
00556ee0          if (KeyStone::m_fnAC2PluginManagerTerminate_1 != 0)
00556ee2              KeyStone::m_fnAC2PluginManagerTerminate_1();
00556ee2          
00556ee4          HRESULT (* KeyStone::m_fnAC2PluginManagerExecute_1)(struct IKeystone*, uint16_t* (*)(uint16_t const*), void*) = KeyStone::m_fnAC2PluginManagerExecute;
00556ee4          
00556eeb          if (KeyStone::m_fnAC2PluginManagerExecute_1 != 0)
00556eeb          {
00556efe              KeyStone::m_fnAC2PluginManagerExecute_1(KeyStone::m_lpKeystone, Client::You_Must_Not_Have_Multiple_Implementations_Of_AddRef_In_A_Hierarchy, 0);
00556f08              return 1;
00556eeb          }
00556ed7      }
00556ed7      
00556eef      return 0;
00556ed0  }

00556f09                             90 90 90 90 90 90 90                                                           .......

00556f10  int32_t KeyStone::Release()

00556f10  {
00556f10      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556f10      
00556f17      if (KeyStone::m_lpKeystone_1 != 0)
00556f17      {
00556f19          HRESULT (* KeyStone::m_fnAC2HelpPluginTerminate_1)() = KeyStone::m_fnAC2HelpPluginTerminate;
00556f19          
00556f21          if (KeyStone::m_fnAC2HelpPluginTerminate_1 != 0)
00556f21          {
00556f23              KeyStone::m_fnAC2HelpPluginTerminate_1();
00556f25              KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556f21          }
00556f21          
00556f2c          if (KeyStone::m_lpKeystone_1 != 0)
00556f2c          {
00556f2e              HRESULT (* KeyStone::m_fnAC2PluginManagerTerminate_1)() = KeyStone::m_fnAC2PluginManagerTerminate;
00556f2e              
00556f36              if (KeyStone::m_fnAC2PluginManagerTerminate_1 != 0)
00556f36              {
00556f38                  KeyStone::m_fnAC2PluginManagerTerminate_1();
00556f3a                  KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556f36              }
00556f36              
00556f41              if (KeyStone::m_lpKeystone_1 != 0)
00556f41              {
00556f43                  KeyStone::m_lpKeystone_1->vtable->Release(KeyStone::m_lpKeystone_1);
00556f49                  KeyStone::m_lpKeystone = nullptr;
00556f41              }
00556f2c          }
00556f17      }
00556f17      
00556f58      return 1;
00556f10  }

00556f59                                                                             90 90 90 90 90 90 90                           .......

00556f60  int32_t KeyStone::Cleanup()

00556f60  {
00556f60      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556f60      
00556f6a      if (KeyStone::m_lpKeystone_1 != 0)
00556f6a      {
00556f6c          HRESULT (* KeyStone::m_fnAC2HelpPluginTerminate_1)() = KeyStone::m_fnAC2HelpPluginTerminate;
00556f6c          
00556f74          if (KeyStone::m_fnAC2HelpPluginTerminate_1 != 0)
00556f74          {
00556f76              KeyStone::m_fnAC2HelpPluginTerminate_1();
00556f78              KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556f74          }
00556f74          
00556f7f          if (KeyStone::m_lpKeystone_1 != 0)
00556f7f          {
00556f81              HRESULT (* KeyStone::m_fnAC2PluginManagerTerminate_1)() = KeyStone::m_fnAC2PluginManagerTerminate;
00556f81              
00556f89              if (KeyStone::m_fnAC2PluginManagerTerminate_1 != 0)
00556f89              {
00556f8b                  KeyStone::m_fnAC2PluginManagerTerminate_1();
00556f8d                  KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00556f89              }
00556f89              
00556f94              if (KeyStone::m_lpKeystone_1 != 0)
00556f94              {
00556f96                  KeyStone::m_lpKeystone_1->vtable->Release(KeyStone::m_lpKeystone_1);
00556f9c                  KeyStone::m_lpKeystone = nullptr;
00556f94              }
00556f7f          }
00556f6a      }
00556f6a      
00556fa2      struct HINSTANCE__* KeyStone::m_hKeystoneLib_1 = KeyStone::m_hKeystoneLib;
00556fa2      
00556fb0      if (KeyStone::m_hKeystoneLib_1 != 0)
00556fb3          FreeLibrary(KeyStone::m_hKeystoneLib_1);
00556fb3      
00556fb5      struct HINSTANCE__* KeyStone::m_hAC2HelpPluginLib_1 = KeyStone::m_hAC2HelpPluginLib;
00556fb5      
00556fbc      if (KeyStone::m_hAC2HelpPluginLib_1 != 0)
00556fbf          FreeLibrary(KeyStone::m_hAC2HelpPluginLib_1);
00556fbf      
00556fc1      struct HINSTANCE__* KeyStone::m_hAC2PluginManagerLib_1 = KeyStone::m_hAC2PluginManagerLib;
00556fc1      
00556fc8      if (KeyStone::m_hAC2PluginManagerLib_1 != 0)
00556fcb          FreeLibrary(KeyStone::m_hAC2PluginManagerLib_1);
00556fcb      
00556fcd      struct HACCEL__* KeyStone::m_hDummyAccel_1 = KeyStone::m_hDummyAccel;
00556fcd      
00556fd5      if (KeyStone::m_hDummyAccel_1 != 0)
00556fd8          DestroyAcceleratorTable(KeyStone::m_hDummyAccel_1);
00556fd8      
00556fde      KeyStone::m_hKeystoneLib = nullptr;
00556fe4      KeyStone::m_fnKeystoneCreate = nullptr;
00556fea      KeyStone::m_hAC2HelpPluginLib = nullptr;
00556ff0      KeyStone::m_hAC2PluginManagerLib = nullptr;
00556ff6      KeyStone::m_hDummyAccel = nullptr;
00557002      return 1;
00556f60  }

00557003           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00557010  int32_t KeyStone::OpenHelp(uint32_t const arg1, int32_t const arg2)

00557010  {
00557016      int32_t var_4 = 0xffffffff;
00557018      int32_t var_8 = 0x6c2b26;
0055701d      TEB* fsbase;
0055701d      int32_t var_c = *(uint32_t*)fsbase;
0055701e      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
00557023      *(uint32_t*)fsbase = &var_c;
00557023      
00557032      if (KeyStone::m_lpKeystone_1 != 0)
00557032      {
00557034          HRESULT (* KeyStone::m_fnAC2HelpPluginTerminate_1)() = KeyStone::m_fnAC2HelpPluginTerminate;
00557034          
0055703b          if (KeyStone::m_fnAC2HelpPluginTerminate_1 != 0)
0055703d              KeyStone::m_fnAC2HelpPluginTerminate_1();
0055703d          
0055703f          HRESULT (* KeyStone::m_fnAC2HelpPluginExecute_1)(struct IKeystone*, uint16_t* (*)(uint16_t const*), void*) = KeyStone::m_fnAC2HelpPluginExecute;
0055703f          
00557046          if (KeyStone::m_fnAC2HelpPluginExecute_1 != 0)
00557046          {
00557069              if (arg1 != 0)
00557069              {
00557086                  void var_9c;
00557086                  StringInfo::StringInfo(&var_9c);
00557098                  int32_t var_4_1 = 0;
005570a3                  StringInfo::SetStringIDandTableEnum(&var_9c, arg1, arg2);
005570b3                  void* __return;
005570b3                  StringInfo::GetString(&var_9c, &__return, 0);
005570c9                  var_4_1 = 1;
005570d1                  KeyStone::m_fnAC2HelpPluginExecute(KeyStone::m_lpKeystone, Client::You_Must_Not_Have_Multiple_Implementations_Of_AddRef_In_A_Hierarchy, __return);
005570db                  int32_t* esi_2 = ((char*)__return - 0x14);
005570e5                  var_4_1 = 0;
005570e5                  
005570f9                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00557101                      **(uint32_t**)esi_2(1);
00557101                  
00557107                  int32_t var_4_2 = 0xffffffff;
00557112                  StringInfo::~StringInfo(&var_9c);
00557069              }
00557069              else
00557078                  KeyStone::m_fnAC2HelpPluginExecute_1(KeyStone::m_lpKeystone, Client::You_Must_Not_Have_Multiple_Implementations_Of_AddRef_In_A_Hierarchy, arg1);
00557078              
00557124              *(uint32_t*)fsbase = var_c;
00557131              return 1;
00557046          }
00557032      }
00557032      
00557051      *(uint32_t*)fsbase = var_c;
0055705e      return 0;
00557010  }

00557132                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00557140  int32_t __fastcall KeyStone::IsPluginManagerOpen()

00557140  {
00557140      int32_t var_4_2 = 0xffffffff;
00557142      int32_t var_8 = 0x6c2b38;
0055714d      TEB* fsbase;
0055714d      int32_t var_c = *(uint32_t*)fsbase;
0055714e      *(uint32_t*)fsbase = &var_c;
00557155      class PStringBase<unsigned short> ecx;
00557155      class PStringBase<unsigned short> var_10 = ecx;
0055716b      PStringBase<unsigned short>::allocate_ref_buffer(&var_10, wcslen(u"acpluginmanager"));
0055717a      wcscpy(var_10, u"acpluginmanager");
00557183      struct IKeystone* KeyStone::m_lpKeystone_1 = KeyStone::m_lpKeystone;
0055718b      int32_t var_4 = 0;
00557193      int32_t result;
00557193      
00557193      if (KeyStone::m_lpKeystone_1 != 0)
00557193      {
005571a0          int32_t result_1 = 0;
005571a2          int32_t* eax_4 = KeyStone::m_lpKeystone_1->vtable->KsGetWindow(var_10);
005571a2          
005571a7          if (eax_4 != 0)
005571a7          {
005571ac              result_1 = 1;
005571b1              *(uint32_t*)(*(uint32_t*)eax_4 + 8)(eax_4);
005571a7          }
005571a7          
005571b4          result = result_1;
00557193      }
00557193      else
00557195          result = 0;
00557195      
005571ba      int32_t* esi_2 = (var_10 - 0x14);
005571c1      int32_t var_4_1 = 0xffffffff;
005571c1      
005571d5      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005571dd          **(uint32_t**)esi_2(1);
005571dd      
005571e7      *(uint32_t*)fsbase = var_c;
005571f1      return result;
00557140  }

005571f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00557200  void CParseXml::CParseXml(class CParseXml* this @ ecx)

00557200  {
00557200      struct MSXML2::IXMLDOMDocument2* m_pInterface = pXMLDoc.m_pInterface;
00557200      
0055720a      if (m_pInterface != 0)
0055720a      {
0055720c          pXMLDoc.m_pInterface = 0;
00557216          m_pInterface->vtable->Release(m_pInterface);
0055720a      }
00557200  }


00557220  void CParseXml::~CParseXml(class CParseXml* this @ ecx)

00557220  {
00557220      struct MSXML2::IXMLDOMDocument2* m_pInterface = pXMLDoc.m_pInterface;
00557220      
00557227      if (m_pInterface != 0)
00557227      {
00557229          m_pInterface->vtable->Release(m_pInterface);
0055722f          pXMLDoc.m_pInterface = 0;
00557227      }
00557220  }

0055723a                                                                                90 90 90 90 90 90                            ......

00557240  uint8_t CParseXml::Init(class CParseXml* this @ ecx)

00557240  {
00557243      int32_t var_8 = 0xffffffff;
00557245      int32_t var_c = 0x6c2b50;
00557250      TEB* fsbase;
00557250      int32_t var_10 = *(uint32_t*)fsbase;
00557251      *(uint32_t*)fsbase = &var_10;
0055725b      struct MSXML2::IXMLDOMDocument2* m_pInterface = pXMLDoc.m_pInterface;
00557267      int32_t __saved_edi;
00557267      int32_t* var_14 = &__saved_edi;
0055726a      int32_t var_8_1 = 0;
0055726a      
0055726d      if (m_pInterface != 0)
0055726f          m_pInterface->vtable->Release(m_pInterface);
0055726f      
0055728c      int32_t* var_18;
0055728c      HRESULT esi = CoCreateInstance(&data_7cb8a8, nullptr, 0x7, &IID_IUnknown, &var_18);
0055728c      
00557290      if (esi < 0)
005572c3          pXMLDoc.m_pInterface = 0;
00557290      else
00557290      {
0055729c          esi = OleRun(var_18);
0055729c          
005572a0          if (esi >= 0)
005572a0          {
005572a2              int32_t* eax_4 = var_18;
005572b4              esi = **(uint32_t**)eax_4(eax_4, 0x7cb888, 0x86fe60);
005572a0          }
005572a0          
005572b6          int32_t* eax_6 = var_18;
005572bc          *(uint32_t*)(*(uint32_t*)eax_6 + 8)(eax_6);
005572bc          
005572c1          if (esi < 0)
005572c3              pXMLDoc.m_pInterface = 0;
00557290      }
00557290      
005572e7      *(uint32_t*)fsbase = var_10;
005572f2      return esi >= 0;
00557240  }

005572cb                                   c7 45 ec 05 40 00 80 b8 d8 72 55 00 c3 8b 75 ec                            .E..@....rU...u.
005572f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00557300  void* __thiscall CFactory::`scalar deleting destructor'(class CFactory* this, uint32_t arg2)

00557300  {
00557308      this->vtable = 0x7ca8c4;
00557308      
0055730e      if ((arg2 & 1) != 0)
00557311          operator delete(this);
00557311      
0055731c      return this;
00557300  }

0055731f                                                                                               90                                 .

00557320  class CommandInterpreter* ACCFactory::MakeCommandInterpreter_Internal(class ACCFactory* this @ ecx)

00557320  {
00557325      void* eax = operator new(0x140);
00557325      
0055732f      if (eax == 0)
0055733a          return 0;
0055733a      
00557333      /* tailcall */
00557333      return ACCmdInterp::ACCmdInterp(eax);
00557320  }

0055733b                                                                                   90 90 90 90 90                             .....

00557340  class CLCache* ACCFactory::Make_Client_Cache_Internal(class ACCFactory* this @ ecx)

00557340  {
00557345      void* eax = operator new(0x308);
00557345      
0055734f      if (eax == 0)
0055735a          return 0;
0055735a      
00557353      /* tailcall */
00557353      return gmCLCache::gmCLCache(eax);
00557340  }

0055735b                                                                                   90 90 90 90 90                             .....

00557360  class CWeenieObject* __stdcall ACCFactory::MakeCWeenieObject_Internal(class ACCFactory* this @ ecx, uint32_t arg2)

00557360  {
00557365      void* eax = operator new(0x150);
00557365      
0055736f      if (eax == 0)
0055737a          return 0;
0055737a      
00557373      /* tailcall */
00557373      return ACCWeenieObject::ACCWeenieObject(eax, arg2);
00557360  }

0055737d                                                                                         90 90 90                               ...

00557380  class GlobalEventHandler* ACCFactory::MakeGlobalEventHandler_Internal(class ACCFactory* this @ ecx)

00557380  {
00557382      void* eax = operator new(8);
00557382      
0055738c      if (eax == 0)
00557397          return 0;
00557397      
00557390      /* tailcall */
00557390      return gmGlobalEventHandler::gmGlobalEventHandler(eax);
00557380  }

00557398                                                                          90 90 90 90 90 90 90 90                          ........

005573a0  class CCommunicationSystem* ACCFactory::MakeCCommunicationSystem_Internal(class ACCFactory* this @ ecx)

005573a0  {
005573a5      void* eax = operator new(0x88);
005573a5      
005573af      if (eax == 0)
005573ba          return 0;
005573ba      
005573b3      /* tailcall */
005573b3      return gmCCommunicationSystem::gmCCommunicationSystem(eax);
005573a0  }

005573bb                                                                                   90 90 90 90 90                             .....

005573c0  class SmartBox* __stdcall ACCFactory::MakeSmartBox_Internal(class ACCFactory* this @ ecx, class NIList<NetBlob *>* arg2)

005573c0  {
005573c5      void* eax = operator new(0x118);
005573c5      
005573cf      if (eax == 0)
005573da          return 0;
005573da      
005573d3      /* tailcall */
005573d3      return ACSmartBox::ACSmartBox(eax, arg2);
005573c0  }

005573dd                                                                                         90 90 90                               ...

005573e0  class TResult* __thiscall ClassFactoryPlugin<ClientObjMaintSystem>::QueryInterface(class ClassFactoryPlugin<ClientObjMaintSystem>* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

005573e0  {
005573e7      uint32_t m_data1 = arg3->m_data1;
005573e7      
005573ef      if (m_data1 != 0x4a28b2a4)
005573ef      {
00557412      label_557412:
00557412          
00557418          if (m_data1 == 0xdeadbeef)
00557418          {
0055741a              int32_t ecx;
0055741a              ecx = arg3->m_data2;
0055741a              *(uint16_t*)((char*)ecx)[2] = arg3->m_data3;
0055741a              
00557423              if (ecx == 0)
00557423              {
00557425                  int32_t edx_3;
00557425                  edx_3 = arg3->m_data4[0];
00557425                  *(uint8_t*)((char*)edx_3)[1] = arg3->m_data4[1];
00557425                  *(uint8_t*)((char*)edx_3)[2] = arg3->m_data4[2];
00557425                  *(uint8_t*)((char*)edx_3)[3] = arg3->m_data4[3];
00557425                  
0055742e                  if (edx_3 == 0)
0055742e                  {
00557430                      int32_t eax;
00557430                      eax = arg3->m_data4[4];
00557430                      *(uint8_t*)((char*)eax)[1] = arg3->m_data4[5];
00557430                      *(uint8_t*)((char*)eax)[2] = arg3->m_data4[6];
00557430                      *(uint8_t*)((char*)eax)[3] = arg3->m_data4[7];
00557430                      
00557439                      if (eax == 0xcdab0000)
00557439                          goto label_55743b;
0055742e                  }
00557423              }
00557418          }
005573ef      }
005573ef      else
005573ef      {
005573f1          int32_t edx;
005573f1          edx = arg3->m_data2;
005573f1          *(uint16_t*)((char*)edx)[2] = arg3->m_data3;
005573f1          
005573fa          if (edx != 0x4853b129)
005573fa              goto label_557412;
005573fa          
005573fc          int32_t edx_1;
005573fc          edx_1 = arg3->m_data4[0];
005573fc          *(uint8_t*)((char*)edx_1)[1] = arg3->m_data4[1];
005573fc          *(uint8_t*)((char*)edx_1)[2] = arg3->m_data4[2];
005573fc          *(uint8_t*)((char*)edx_1)[3] = arg3->m_data4[3];
005573fc          
00557405          if (edx_1 != 0xdb13b897)
00557405              goto label_557412;
00557405          
00557407          int32_t edx_2;
00557407          edx_2 = arg3->m_data4[4];
00557407          *(uint8_t*)((char*)edx_2)[1] = arg3->m_data4[5];
00557407          *(uint8_t*)((char*)edx_2)[2] = arg3->m_data4[6];
00557407          *(uint8_t*)((char*)edx_2)[3] = arg3->m_data4[7];
00557407          
00557410          if (edx_2 != 0x2c769f47)
00557410              goto label_557412;
00557410          
0055743b      label_55743b:
0055743b          
0055743d          if (this != 0)
0055743d          {
0055743f              this->vtable->AddRef();
0055744a              *(uint32_t*)arg4 = this;
00557450              __return->m_val = 0;
00557457              return __return;
0055743d          }
005573ef      }
005573ef      
0055745e      __return->m_val = 0x80004002;
00557465      return __return;
005573e0  }

00557468                          90 90 90 90 90 90 90 90                                                          ........

00557470  uint32_t __fastcall ClassFactoryPlugin<ClientObjMaintSystem>::Release(class ClassFactoryPlugin<ClientObjMaintSystem> const* this)

00557470  {
0055747a      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
0055747a      
00557487      if ((result == 0 && this != 0))
00557487      {
00557474          this->m_cTurbineRefCount.vtable = 0x792b6c;
00557490          operator delete(this);
00557487      }
00557487      
0055749d      return result;
00557470  }

0055749e                                                                                            90 90                                ..

005574a0  class TResult* __stdcall ClassFactoryPlugin<ClientObjMaintSystem>::CreateInstance(class ClassFactoryPlugin<ClientObjMaintSystem>* this @ ecx, class TResult* __return, class Interface* arg3, struct Turbine_GUID const* arg4, void** arg5)
// This function has unresolved stack usage. View graph of stack usage to resolve.

005574a0  {
005574a9      if (arg3 != 0)
005574a9      {
005574ab          class TResult* __return_1 = __return;
005574af          __return_1->m_val = 0x80040110;
005574b8          return __return_1;
005574a9      }
005574a9      
005574c1      class ClientObjMaintSystem* var_14 = ClientObjMaintSystem::Allocate();
005574cb      int32_t* var_8 = nullptr;
005574d3      int32_t var_4 = 0;
005574db      class ClientObjMaintSystem** esp = &var_14;
005574e8      int32_t* var_c;
005574e8      var_8 = *(uint32_t*)InterfacePtr<class Interface>::_QueryInterface(&var_8, &var_c);
005574ec      int32_t* ecx_2 = var_c;
005574f0      class TResult* esi;
005574f0      class ClientObjMaintSystem* __saved_esi;
005574f0      
005574f0      if (arg4 == 0)
005574f0      {
00557533          esi = __return_addr;
00557537          esi->m_val = 0x80004003;
00557537          
0055753d          if (ecx_2 != 0)
0055753d          {
00557541              *(uint32_t*)(*(uint32_t*)ecx_2 + 0x14)();
00557541              esp = &__saved_esi;
0055753d          }
005574f0      }
005574f0      else
005574f0      {
005574f3          arg4->m_data1 = 0;
00557505          *(uint32_t*)(*(uint32_t*)ecx_2 + 0xc)(&__return, arg3, arg4);
00557505          esp = &__saved_esi;
0055750e          *(uint32_t*)(*(uint32_t*)var_8 + 0x14)();
00557511          int32_t* ecx_4 = var_8;
00557517          esi = __return;
0055751f          esi->m_val = arg3;
0055751f          
00557521          if (ecx_4 != 0)
00557521          {
00557525              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
0055752e              return esi;
00557521          }
005574f0      }
00557546      *(uint32_t*)esp;
0055754a      return esi;
005574a0  }

0055754d                                         90 90 90                                                               ...

00557550  class TResult __thiscall InterfacePtr<class Interface>::_QueryInterface(InterfacePtr<class Interface>* this, class ClientObjMaintSystem* arg2)

00557550  {
00557550      InterfacePtr<class Interface>* this_1 = this;
00557554      int32_t* ecx = arg_8;
00557554      
0055755b      if (ecx == 0)
0055755b      {
005575cb          InterfacePtr<Interface>::operator=(this, nullptr);
005575d9          arg2->vtable = 0x80004002;
005575de          return arg2;
0055755b      }
0055755b      
0055755d      int32_t eax = *(uint32_t*)ecx;
0055756e      arg_8 = nullptr;
00557579      int32_t edi = *(uint32_t*)*(uint32_t*)(eax + 0xc)(&this_1, 0x7cba98, &arg_8);
0055757d      int32_t* ecx_1 = *(uint32_t*)this;
0055757d      
0055757f      if (edi < 0)
0055757f      {
00557583          if (ecx_1 != 0)
00557587              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
00557587          
0055758e          *(uint32_t*)this = 0;
00557594          *(uint32_t*)((char*)this + 4) = 0;
0055759b          arg2->vtable = edi;
005575a0          return arg2;
0055757f      }
0055757f      
005575a6      int32_t* ebx = arg_8;
005575a6      
005575aa      if (ecx_1 != 0)
005575ae          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
005575ae      
005575b5      *(uint32_t*)this = ebx;
005575b7      *(uint32_t*)((char*)this + 4) = 0;
005575bf      arg2->vtable = edi;
005575c4      return arg2;
00557550  }

005575e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005575f0  void ACCFactory::Init()

005575f0  {
005575f4      void* eax = operator new(0xc);
005575f4      
00557600      if (eax != 0)
00557600      {
00557609          *(uint32_t*)eax = 0x7cbad4;
00557615          *(uint32_t*)((char*)eax + 8) = 1;
0055761c          *(uint32_t*)((char*)eax + 4) = 0x792b6c;
0055762a          class TResult __saved_ecx;
0055762a          InterfaceSystem::RegisterClassA(InterfaceSystem::GetInstance(), &__saved_ecx, &CObjectMaint_Factory_ClassType, eax, nullptr);
00557633          *(uint32_t*)(*(uint32_t*)eax + 0x14)();
00557600      }
00557600      
00557638      void* eax_2 = operator new(4);
00557638      
00557643      if (eax_2 == 0)
00557643      {
00557652          CFactory::global_cfactory = nullptr;
0055765d          return;
00557643      }
00557643      
00557645      *(uint32_t*)eax_2 = 0x7cbab4;
0055764b      CFactory::global_cfactory = eax_2;
005575f0  }

0055765e                                                                                            90 90                                ..

00557660  void __stdcall ACCObjectMaint::SetVisualDesc(class ACCObjectMaint* this @ ecx, class CPhysicsObj* arg2, class VisualDesc* arg3)

00557660  {
00557669      CPhysicsObj::DoObjDescChangesFromDefault(arg2, arg3);
00557660  }

00557671                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00557680  void __thiscall ACCObjectMaint::SetPlayerVisualDesc(class ACCObjectMaint* this, class VisualDesc* arg2)

00557680  {
00557683      class ObjDesc* player_objdesc = this->player_objdesc;
00557683      
0055768c      if (player_objdesc != 0)
0055768c      {
0055768e          player_objdesc->vtable->__vecDelDtor(1);
00557694          this->player_objdesc = nullptr;
0055768c      }
0055768c      
0055769e      class ObjDesc* edi = arg2;
0055769e      
005576a4      if (edi != 0)
005576a4      {
005576a8          class ObjDesc* eax_2 = operator new(0x2c);
005576a8          
005576b2          if (eax_2 != 0)
005576b2          {
005576bc              this->player_objdesc = ObjDesc::ObjDesc(eax_2, edi);
005576c2              ECM_Character::SendNotice_PlayerObjDescChanged();
005576c9              return;
005576b2          }
005576b2          
005576ce          this->player_objdesc = nullptr;
005576d4          ECM_Character::SendNotice_PlayerObjDescChanged();
005576a4      }
00557680  }

005576de                                                                                            90 90                                ..

005576e0  class VisualDesc* __fastcall ACCObjectMaint::GetPlayerVisualDesc(class ACCObjectMaint const* this)

005576e0  {
005576e6      return this->player_objdesc;
005576e0  }

005576e7                       90 90 90 90 90 90 90 90 90                                                         .........

005576f0  int32_t __thiscall ACCObjectMaint::DeleteObject(class ACCObjectMaint* this, uint32_t arg2)

005576f0  {
005576ff      if (APIManager::APIIsReady() != 0)
005576ff      {
00557701          struct IACPlugin* eax_1 = APIManager::GetACPlugin();
00557706          eax_1->vtable->OnDeleteObject(eax_1, arg2);
005576ff      }
005576ff      
0055770e      ACCWeenieObject::SetCorpseDeleted(arg2);
00557720      return CObjectMaint::DeleteObject(this, arg2);
005576f0  }

00557723           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00557730  void __fastcall ClientObjMaintSystem::~ClientObjMaintSystem(class ClientObjMaintSystem* this)

00557730  {
00557734      int32_t esi_1 = -(((char*)this - 8));
00557738      void* esi_3 = ((esi_1 - esi_1) & this);
0055773e      *(int32_t*)((char*)this + -8) = 0x7cbdbc;
00557744      *(uint32_t*)((char*)this - 4) = 0x7bf328;
0055774b      this->vtable = 0x7cbd80;
00557751      this->vtable = &CObjectMaint::`vftable';
00557758      int32_t* ecx = *(uint32_t*)((char*)esi_3 + 0x1f8);
00557760      *(uint32_t*)esi_3 = 0x7cbce4;
00557766      *(uint32_t*)((char*)esi_3 + 4) = 0x7cbd20;
00557766      
0055776d      if (ecx != 0)
0055776d      {
00557773          **(uint32_t**)ecx(1);
00557775          *(uint32_t*)((char*)esi_3 + 0x1f8) = 0;
0055776d      }
0055776d      
00557781      CObjectMaint::~CObjectMaint(esi_3);
00557781      
00557788      if (this != 8)
00557788      {
0055773b          this->vtable = 0x7bf328;
00557795          /* tailcall */
00557795          return NoticeHandler::~NoticeHandler(((char*)this - 4));
00557788      }
00557788      
0055779d      *nullptr = 0x7bf328;
005577a4      /* tailcall */
005577a4      return NoticeHandler::~NoticeHandler(nullptr);
00557730  }

005577a9                             90 90 90 90 90 90 90                                                           .......

005577b0  class ACCWeenieObject* ClientObjMaintSystem::GetWeenieObject(uint32_t arg1)

005577b0  {
005577b0      class CObjectMaint* CObjectMaint::s_pcInstance_1 = CObjectMaint::s_pcInstance;
005577b0      
005577b8      if (CObjectMaint::s_pcInstance_1 == 0)
005577c7          return 0;
005577c7      
005577c4      return CObjectMaint::GetWeenieObject(CObjectMaint::s_pcInstance_1, arg1);
005577b0  }

005577c8                          90 90 90 90 90 90 90 90                                                          ........

005577d0  class CPhysicsObj* ClientObjMaintSystem::GetPhysicsObject(uint32_t arg1)

005577d0  {
005577d0      class CObjectMaint* CObjectMaint::s_pcInstance_1 = CObjectMaint::s_pcInstance;
005577d0      
005577d8      if (CObjectMaint::s_pcInstance_1 == 0)
005577e7          return 0;
005577e7      
005577e4      return CObjectMaint::GetObjectA(CObjectMaint::s_pcInstance_1, arg1);
005577d0  }

005577e8                          90 90 90 90 90 90 90 90                                                          ........

005577f0  void __thiscall Attribute::Attribute(class Attribute* this, class Attribute const* arg2)

005577f0  {
005577f6      this->vtable = 0x7a7b14;
005577ff      this->_level_from_cp = arg2->_level_from_cp;
00557805      this->_init_level = arg2->_init_level;
0055780b      this->_cp_spent = arg2->_cp_spent;
005577f0  }

00557811                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00557820  void __thiscall SecondaryAttribute::SecondaryAttribute(class SecondaryAttribute* this, class SecondaryAttribute const* arg2)

00557820  {
00557826      this->vtable = 0x7a7b14;
0055782f      this->_level_from_cp = arg2->_level_from_cp;
00557835      this->_init_level = arg2->_init_level;
0055783b      this->_cp_spent = arg2->_cp_spent;
0055783e      this->vtable = 0x7a7b30;
00557847      this->_current_level = arg2->_current_level;
00557820  }

0055784d                                         90 90 90                                                               ...

00557850  uint32_t __fastcall ClientObjMaintSystem::Release(class ClientObjMaintSystem const* this)

00557850  {
00557861      uint32_t m_cRef;
00557861      
00557861      if (InterlockedDecrement(&this->m_cTurbineRefCount.m_cRef) == 0)
00557861      {
0055787b          m_cRef = 0;
00557869      label_557869:
00557869          
0055786b          if (this != 0xfffffff8)
00557852              this->vtable->__vecDelDtor(1);
00557861      }
00557861      else
00557861      {
00557863          m_cRef = (&this->vtable - 8)->m_cTurbineRefCount.m_cRef;
00557863          
00557867          if (m_cRef == 0)
00557867              goto label_557869;
00557861      }
00557861      
0055787a      return m_cRef;
00557850  }

0055787f                                                                                               90                                 .

00557880  void* __thiscall ACCObjectMaint::`scalar deleting destructor'(class ACCObjectMaint* this, uint32_t arg2)

00557880  {
00557883      class ObjDesc* player_objdesc = this->player_objdesc;
0055788b      this->vtable = 0x7cbce4;
00557891      this->vtable = &CObjectMaint::`vftable';
00557891      
00557898      if (player_objdesc != 0)
00557898      {
0055789a          player_objdesc->vtable->__vecDelDtor(1);
005578a0          this->player_objdesc = nullptr;
00557898      }
00557898      
005578ac      CObjectMaint::~CObjectMaint(this);
005578ac      
005578b6      if ((arg2 & 1) != 0)
005578b9          operator delete(this);
005578b9      
005578c4      return this;
00557880  }

005578c7                       90 90 90 90 90 90 90 90 90                                                         .........

005578d0  void* __thiscall ClientObjMaintSystem::`vector deleting destructor'(class ClientObjMaintSystem* this, uint32_t arg2)

005578d0  {
005578d3      ClientObjMaintSystem::~ClientObjMaintSystem(this);
005578dd      void* __offset(ClientObjMaintSystem, -0x8) result = ((char*)this - 8);
005578dd      
005578e0      if ((arg2 & 1) == 0)
005578ef          return result;
005578ef      
005578e3      operator delete(result);
005578eb      return ((char*)this - 8);
005578d0  }

005578f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00557900  class TResult* __thiscall ClientObjMaintSystem::QueryInterface(class ClientObjMaintSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00557900  {
00557900      class ClientObjMaintSystem* this_2 = this;
00557902      class ClientObjMaintSystem* this_1 = this;
00557906      this = (*(uint8_t*)$S127);
00557917      int32_t* key;
00557917      
00557917      if ((1 & this) != 0)
0055797d          key = Offsets[0].key;
00557917      else
00557917      {
00557921          key = &ClientObjMaintSystem_InterfaceType;
00557926          $S127 |= 1;
0055792c          Offsets[0].key = 0x7cbba0;
00557931          Offsets[0].ofs = 0;
00557937          Offsets[1].key = 0x7cbb80;
00557941          Offsets[1].ofs = 0;
00557947          Offsets[2].key = 0x7cbaf8;
00557951          Offsets[2].ofs = 8;
0055795b          Offsets[3].key = 0x7cbcd0;
00557965          Offsets[3].ofs = 8;
0055796f          Offsets[4].key = 0;
00557975          Offsets[4].ofs = 0;
00557917      }
00557917      
00557984      void* edx = &Offsets;
00557984      
00557989      while (key != 0)
00557989      {
005579ab          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
005579ab          {
005579ce              if (arg4 != 0)
005579ce              {
005579d0                  int32_t* esi_2 = *(uint32_t*)((char*)edx + 4);
005579de                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this_1) + 0x10)();
005579e1                  *(uint32_t*)arg4 = ((char*)esi_2 + this_1);
005579ce              }
005579ce              
005579e9              __return->m_val = 0;
005579ed              return __return;
005579ab          }
005579ab          
005579ad          key = *(uint32_t*)((char*)edx + 8);
005579b0          edx += 8;
00557989      }
00557989      
005579bd      __return->m_val = 0x80004002;
005579c5      return __return;
00557900  }


005579f0  class TResult* __thiscall ClientObjMaintSystem::QueryInterface(class ClientObjMaintSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

005579f0  {
005579f3      /* tailcall */
005579f3      return ClientObjMaintSystem::QueryInterface(((char*)this - 8), __return, arg3, arg4);
005579f0  }

005579f8                                                                          cc cc cc cc cc cc cc cc                          ........

00557a00  uint32_t __fastcall ClientObjMaintSystem::AddRef(class ClientObjMaintSystem const* this)

00557a00  {
00557a03      /* tailcall */
00557a03      return ClientObjMaintSystem::AddRef(((char*)this - 8));
00557a00  }

00557a08                          cc cc cc cc cc cc cc cc                                                          ........

00557a10  uint32_t __fastcall ClientObjMaintSystem::Release(class ClientObjMaintSystem const* this)

00557a10  {
00557a13      /* tailcall */
00557a13      return ClientObjMaintSystem::Release(((char*)this - 8));
00557a10  }

00557a18                                                                          cc cc cc cc cc cc cc cc                          ........

00557a20  void __thiscall ACCObjectMaint::SetWeenieDesc(class ACCObjectMaint* this, class CWeenieObject* arg2, class WeenieDesc* arg3, int32_t arg4)

00557a20  {
00557a2a      int32_t eax = *(int32_t*)((char*)arg2 + 0xb8);
00557a30      int32_t ebp = *(int32_t*)((char*)arg2 + 0xb4);
00557a38      int32_t ecx = *(int32_t*)((char*)arg2 + 0xc4);
00557a46      class CWeenieObject* edx = *(int32_t*)((char*)arg3 + 0x1c);
00557a4d      uint32_t ecx_1 = *(int32_t*)((char*)arg3 + 0x20);
00557a51      uint32_t id = arg2->id;
00557a58      class WeenieDesc* edx_1 = *(int32_t*)((char*)arg3 + 0x2c);
00557a6a      PublicWeenieDesc::operator=(((char*)arg2 + 0x98), arg3);
00557a71      ACCWeenieObject::DeterminePositionState(arg2);
00557a7e      *(int32_t*)((char*)arg2 + 0x50) = CObjectMaint::GetObjectInventory(this, id);
00557a7e      
00557a87      if (arg4 != 0)
00557a87      {
00557a8e          if (*(int32_t*)((char*)arg2 + 0x58) != 0)
00557a90              *(int32_t*)((char*)arg2 + 0x58) = 0;
00557a8e          else if (((ebp != edx || eax != ecx_1) || ecx != edx_1))
00557ab1          {
00557ab4              Proto_UI::SendForceObjdesc(id);
00557ac4              *(int32_t*)((char*)arg2 + 0x58) = 1;
00557acb              *(int32_t*)((char*)arg2 + 0xb4) = ebp;
00557ad1              *(int32_t*)((char*)arg2 + 0xb8) = eax;
00557ad7              *(int32_t*)((char*)arg2 + 0xc4) = ecx;
00557ab1          }
00557a87      }
00557a87      
00557ae3      if (edx == 0)
00557ae3      {
00557b38          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00557b3f          uint32_t player_id;
00557b3f          
00557b3f          if (SmartBox::smartbox_1 == 0)
00557b49              player_id = 0;
00557b3f          else
00557b41              player_id = SmartBox::smartbox_1->player_id;
00557b41          
00557b5f          uint32_t var_28_1;
00557b5f          uint32_t var_24_1;
00557b5f          
00557b5f          if (((player_id == *(int32_t*)((char*)arg2 + 0xb8) && SmartBox::smartbox_1 != 0) && SmartBox::smartbox_1->player_id != 0))
00557b5f          {
00557b69              int32_t var_20_7 = 1;
00557b6b              var_24_1 = edx_1;
00557b6c              var_28_1 = ecx_1;
00557b6d              goto label_557b83;
00557b5f          }
00557b5f          
00557b75          if (arg4 != 0)
00557b75          {
00557b7f              int32_t var_20_8 = 1;
00557b81              var_24_1 = edx_1;
00557b82              var_28_1 = ecx_1;
00557b83          label_557b83:
00557b89              ACCWeenieObject::ServerSaysMoveItem(arg2, 0, 0, var_28_1, var_24_1, 1);
00557b75          }
00557ae3      }
00557ae3      else
00557ae3      {
00557ae8          class CWeenieObject* eax_8 = CObjectMaint::GetWeenieObject(this, edx);
00557aef          int32_t eax_9;
00557aef          
00557aef          if (eax_8 != 0)
00557aef          {
00557b0f              if ((((*(int32_t*)((char*)arg2 + 0x100) & "activation type (%s) with '%s' b…") != 0 || *(int32_t*)((char*)arg2 + 0xc8) != 0) || *(int32_t*)((char*)arg2 + 0xcc) != 0))
00557b14                  eax_9 = ACCWeenieObject::GetPlaceInContainersList(eax_8, id);
00557b0f              else
00557b1e                  eax_9 = ACCWeenieObject::GetPlaceInItemsList(eax_8, id);
00557aef          }
00557aef          
00557b26          if ((eax_8 == 0 || eax_9 == 0xffffffff))
00557b28              eax_9 = 0;
00557b28          
00557b2e          int32_t var_20_6 = 1;
00557b89          ACCWeenieObject::ServerSaysMoveItem(arg2, edx, eax_9, 0, 0, 1);
00557ae3      }
00557ae3      
00557b90      ACCWeenieObject::DeclareValid(arg2);
00557a20  }

00557b9f                                                                                               90                                 .

00557ba0  uint8_t __thiscall ClientObjMaintSystem::UpdateStackSize(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5)

00557ba0  {
00557ba7      uint32_t eax;
00557ba7      
00557ba7      if (arg3 != 0)
00557ba7      {
00557bb2          uint32_t esi_1 = CObjectMaint::GetWeenieObject(&this->vtable, arg3);
00557bb2          
00557bb6          if ((esi_1 != 0 && ACCWeenieObject::SetupStamper(esi_1) != 0))
00557bb6          {
00557bda              eax = WTimeStamper::UpdateTS(*(uint32_t*)(esi_1 + 0x148), 0x1000c, arg2) != 0;
00557bda              
00557bdf              if (eax != 0)
00557bdf              {
00557beb                  if (*(uint32_t*)(esi_1 + 0xfc) >= arg4)
00557bf5                      ACCWeenieObject::ServerSaysSetStackSize(esi_1, arg4, arg5);
00557bf5                  
00557bfa                  uint32_t eax_2;
00557bfa                  eax_2 = 1;
00557bfd                  return 1;
00557bdf              }
00557bb6          }
00557ba7      }
00557ba7      
00557c00      eax = 0;
00557c03      return 0;
00557ba0  }

00557c06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00557c10  uint32_t __thiscall PackableList<InventoryPlacement>::InsertTail(class PackableList<InventoryPlacement>* this, class InventoryPlacement const* arg2)

00557c10  {
00557c15      void* eax = operator new(0x18);
00557c15      
00557c21      if (eax == 0)
00557c49          eax = nullptr;
00557c21      else
00557c21      {
00557c28          *(uint32_t*)eax = 0x7aba64;
00557c31          *(uint32_t*)((char*)eax + 4) = arg2->iid_;
00557c37          *(uint32_t*)((char*)eax + 8) = arg2->loc_;
00557c3d          *(uint32_t*)((char*)eax + 0xc) = arg2->priority_;
00557c40          *(uint32_t*)((char*)eax + 0x10) = 0;
00557c43          *(uint32_t*)((char*)eax + 0x14) = 0;
00557c21      }
00557c21      
00557c4e      if (this->head == 0)
00557c4e      {
00557c50          this->head = eax;
00557c53          this->tail = eax;
00557c59          uint32_t eax_2 = (this->curNum + 1);
00557c5a          this->curNum = eax_2;
00557c5e          return eax_2;
00557c4e      }
00557c4e      
00557c61      class PackableLLNode<InventoryPlacement>* tail = this->tail;
00557c64      tail->next = eax;
00557c67      *(uint32_t*)((char*)eax + 0x14) = tail;
00557c6a      this->tail = eax;
00557c70      uint32_t eax_4 = (this->curNum + 1);
00557c71      this->curNum = eax_4;
00557c75      return eax_4;
00557c10  }

00557c78                                                                          90 90 90 90 90 90 90 90                          ........

00557c80  unsigned long __thiscall ClientObjMaintSystem::<struct Attribute_QualityType,class Attribute const&>::UpdateStat(ClientObjMaintSystem::<struct Attribute_QualityType,class Attribute const&>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, class Attribute const& arg5)

00557c80  {
00557c8a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
00557c8a      
00557c93      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00557c93      {
00557cbe          int32_t eax_4;
00557cbe          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x80000), arg3) != 0;
00557cbe          
00557cc3          if (eax_4 != 0)
00557cc3          {
00557cc5              class CACQualities* ecx_3 = *(int32_t*)((char*)eax + 0x14c);
00557cc5              
00557ccd              if (ecx_3 != 0)
00557cd5                  CACQualities::SetAttribute(ecx_3, arg2, arg5);
00557cd5              
00557cda              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00557cda              
00557ce2              if (QualityRegistrar::s_pQR_1 != 0)
00557ce8                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Attribute_StatType, arg2);
00557cc3          }
00557c93      }
00557c93      
00557cf1      return 0;
00557c80  }

00557cf4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00557d00  unsigned long __thiscall ClientObjMaintSystem::<struct Attribute_QualityType,unsigned long>::UpdateStat(ClientObjMaintSystem::<struct Attribute_QualityType,unsigned long>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, unsigned long arg5)

00557d00  {
00557d0a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
00557d0a      
00557d13      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00557d13      {
00557d3e          int32_t eax_4;
00557d3e          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x80000), arg3) != 0;
00557d3e          
00557d43          if (eax_4 != 0)
00557d43          {
00557d45              class CACQualities* ecx_3 = *(int32_t*)((char*)eax + 0x14c);
00557d45              
00557d52              if (ecx_3 != 0)
00557d56                  CACQualities::SetAttribute(ecx_3, arg2, arg5);
00557d56              
00557d5f              ACCWeenieObject::OnStatUpdated(eax, arg2, arg5);
00557d64              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00557d64              
00557d6d              if (QualityRegistrar::s_pQR_1 != 0)
00557d73                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Attribute_StatType, arg2);
00557d43          }
00557d13      }
00557d13      
00557d7c      return 0;
00557d00  }

00557d7f                                                                                               90                                 .

00557d80  unsigned long __thiscall ClientObjMaintSystem::<struct Attribute_2nd_QualityType,class SecondaryAttribute const&>::UpdateStat(ClientObjMaintSystem::<struct Attribute_2nd_QualityType,class SecondaryAttribute const&>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, class SecondaryAttribute const& arg5)

00557d80  {
00557d8a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
00557d8a      
00557d93      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00557d93      {
00557dbe          int32_t eax_4;
00557dbe          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x90000), arg3) != 0;
00557dbe          
00557dc3          if (eax_4 != 0)
00557dc3          {
00557dc5              class CACQualities* ecx_3 = *(int32_t*)((char*)eax + 0x14c);
00557dc5              
00557dcd              if (ecx_3 != 0)
00557dd5                  CACQualities::SetAttribute2nd(ecx_3, arg2, arg5);
00557dd5              
00557dda              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00557dda              
00557de2              if (QualityRegistrar::s_pQR_1 != 0)
00557de8                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Attribute_2nd_StatType, arg2);
00557dc3          }
00557d93      }
00557d93      
00557df1      return 0;
00557d80  }

00557df4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00557e00  unsigned long __thiscall ClientObjMaintSystem::<struct Attribute_2nd_QualityType,unsigned long>::UpdateStat(ClientObjMaintSystem::<struct Attribute_2nd_QualityType,unsigned long>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, unsigned long arg5)

00557e00  {
00557e0a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
00557e0a      
00557e13      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00557e13      {
00557e3e          int32_t eax_4;
00557e3e          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x90000), arg3) != 0;
00557e3e          
00557e43          if (eax_4 != 0)
00557e43          {
00557e45              class CACQualities* ecx_3 = *(int32_t*)((char*)eax + 0x14c);
00557e45              
00557e52              if (ecx_3 != 0)
00557e56                  CACQualities::SetAttribute2nd(ecx_3, arg2, arg5);
00557e56              
00557e5f              ACCWeenieObject::OnStatUpdated(eax, arg2, arg5);
00557e64              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00557e64              
00557e6d              if (QualityRegistrar::s_pQR_1 != 0)
00557e73                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Attribute_2nd_StatType, arg2);
00557e43          }
00557e13      }
00557e13      
00557e7c      return 0;
00557e00  }

00557e7f                                                                                               90                                 .

00557e80  unsigned long __thiscall ClientObjMaintSystem::<struct Skill_QualityType,class Skill const&>::UpdateStat(ClientObjMaintSystem::<struct Skill_QualityType,class Skill const&>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, class Skill const& arg5)

00557e80  {
00557e8a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
00557e8a      
00557e93      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00557e93      {
00557ebe          int32_t eax_4;
00557ebe          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x40000), arg3) != 0;
00557ebe          
00557ec3          if (eax_4 != 0)
00557ec3          {
00557ec5              class CACQualities* ecx_3 = *(int32_t*)((char*)eax + 0x14c);
00557ec5              
00557ecd              if (ecx_3 != 0)
00557ed5                  CACQualities::SetSkill(ecx_3, arg2, arg5);
00557ed5              
00557eda              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00557eda              
00557ee2              if (QualityRegistrar::s_pQR_1 != 0)
00557ee8                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Skill_StatType, arg2);
00557ec3          }
00557e93      }
00557e93      
00557ef1      return 0;
00557e80  }

00557ef4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00557f00  unsigned long __thiscall ClientObjMaintSystem::<struct Skill_QualityType,unsigned long>::UpdateStat(ClientObjMaintSystem::<struct Skill_QualityType,unsigned long>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, unsigned long arg5)

00557f00  {
00557f0a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
00557f0a      
00557f13      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00557f13      {
00557f3e          int32_t eax_4;
00557f3e          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x40000), arg3) != 0;
00557f3e          
00557f43          if (eax_4 != 0)
00557f43          {
00557f45              class CACQualities* ecx_3 = *(int32_t*)((char*)eax + 0x14c);
00557f45              
00557f52              if (ecx_3 != 0)
00557f56                  CACQualities::SetSkillLevel(ecx_3, arg2, arg5);
00557f56              
00557f5f              ACCWeenieObject::OnStatUpdated(eax, arg2, arg5);
00557f64              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00557f64              
00557f6d              if (QualityRegistrar::s_pQR_1 != 0)
00557f73                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Skill_StatType, arg2);
00557f43          }
00557f13      }
00557f13      
00557f7c      return 0;
00557f00  }

00557f7f                                                                                               90                                 .

00557f80  unsigned long __thiscall ClientObjMaintSystem::<struct Skill_QualityType,enum SKILL_ADVANCEMENT_CLASS>::UpdateStat(ClientObjMaintSystem::<struct Skill_QualityType,enum SKILL_ADVANCEMENT_CLASS>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, enum SKILL_ADVANCEMENT_CLASS arg5)

00557f80  {
00557f8a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
00557f8a      
00557f93      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00557f93      {
00557fbe          int32_t eax_4;
00557fbe          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x40000), arg3) != 0;
00557fbe          
00557fc3          if (eax_4 != 0)
00557fc3          {
00557fc5              class CACQualities* ecx_3 = *(int32_t*)((char*)eax + 0x14c);
00557fc5              
00557fcd              if (ecx_3 != 0)
00557fd5                  CACQualities::SetSkillAdvancementClass(ecx_3, arg2, arg5);
00557fd5              
00557fda              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00557fda              
00557fe2              if (QualityRegistrar::s_pQR_1 != 0)
00557fe8                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Skill_StatType, arg2);
00557fc3          }
00557f93      }
00557f93      
00557ff1      return 0;
00557f80  }

00557ff4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00558000  unsigned long __thiscall ClientObjMaintSystem::<struct Int_QualityType,long>::UpdateStat(ClientObjMaintSystem::<struct Int_QualityType,long>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, long arg5)

00558000  {
0055800a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055800a      
00558013      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558013      {
00558037          int32_t eax_4;
00558037          uint32_t edx_2;
00558037          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x10000), arg3);
0055803e          eax_4 = eax_4 != 0;
0055803e          
00558043          if (eax_4 != 0)
00558043          {
00558045              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
00558045              
00558052              if (eax_5 != 0)
00558052              {
00558054                  long var_10_2 = arg5;
00558059                  CBaseQualities::SetInt(((char*)eax_5 + 0x38), edx_2, arg2);
00558052              }
00558052              
00558062              ACCWeenieObject::OnStatUpdated(eax, arg2, arg5);
00558067              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00558067              
00558070              if (QualityRegistrar::s_pQR_1 != 0)
00558076                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Int_StatType, arg2);
00558043          }
00558013      }
00558013      
0055807f      return 0;
00558000  }

00558082        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00558090  unsigned long __thiscall ClientObjMaintSystem::<struct Int64_QualityType,int64_t>::UpdateStat(ClientObjMaintSystem::<struct Int64_QualityType,int64_t>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, int64_t arg5)

00558090  {
0055809a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055809a      
005580a3      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
005580a3      {
005580ce          int32_t eax_4;
005580ce          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0xe0000), arg3) != 0;
005580ce          
005580d3          if (eax_4 != 0)
005580d3          {
005580d5              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
005580d5              
005580dd              if (eax_5 != 0)
005580dd              {
005580e3                  uint32_t edx_2 = arg5;
005580e7                  int32_t var_c_2 = *(uint32_t*)((char*)arg5)[4];
005580e8                  uint32_t var_10_2 = edx_2;
005580ed                  CBaseQualities::SetInt64(((char*)eax_5 + 0x38), edx_2, arg2);
005580dd              }
005580dd              
005580f2              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
005580f2              
005580fa              if (QualityRegistrar::s_pQR_1 != 0)
00558100                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Int64_StatType, arg2);
005580d3          }
005580a3      }
005580a3      
00558109      return 0;
00558090  }

0055810c                                      90 90 90 90                                                              ....

00558110  unsigned long __thiscall ClientObjMaintSystem::<struct Bool_QualityType,int32_t>::UpdateStat(ClientObjMaintSystem::<struct Bool_QualityType,int32_t>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, int32_t arg5)

00558110  {
0055811a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055811a      
00558123      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558123      {
00558147          int32_t eax_4;
00558147          uint32_t edx_2;
00558147          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0xd0000), arg3);
0055814e          eax_4 = eax_4 != 0;
0055814e          
00558153          if (eax_4 != 0)
00558153          {
00558155              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
00558155              
00558162              if (eax_5 != 0)
00558162              {
00558164                  int32_t var_10_2 = arg5;
00558169                  CBaseQualities::SetBool(((char*)eax_5 + 0x38), edx_2, arg2);
00558162              }
00558162              
00558172              ACCWeenieObject::OnStatUpdated(eax, arg2, arg5);
00558177              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00558177              
00558180              if (QualityRegistrar::s_pQR_1 != 0)
00558186                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Bool_StatType, arg2);
00558153          }
00558123      }
00558123      
0055818f      return 0;
00558110  }

00558192                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005581a0  unsigned long __thiscall ClientObjMaintSystem::<struct Float_QualityType,double>::UpdateStat(ClientObjMaintSystem::<struct Float_QualityType,double>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, double arg5)

005581a0  {
005581aa      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
005581aa      
005581b3      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
005581b3      {
005581de          int32_t eax_4;
005581de          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x20000), arg3) != 0;
005581de          
005581e3          if (eax_4 != 0)
005581e3          {
005581e5              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
005581e5              
005581ed              if (eax_5 != 0)
005581ed              {
005581f3                  uint32_t edx_2 = arg5;
005581f7                  int32_t var_c_2 = *(uint32_t*)((char*)arg5)[4];
005581f8                  uint32_t var_10_2 = edx_2;
005581fd                  CBaseQualities::SetFloat(((char*)eax_5 + 0x38), edx_2, arg2);
005581ed              }
005581ed              
00558202              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00558202              
0055820a              if (QualityRegistrar::s_pQR_1 != 0)
00558210                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Float_StatType, arg2);
005581e3          }
005581b3      }
005581b3      
00558219      return 0;
005581a0  }

0055821c                                                                                      90 90 90 90                              ....

00558220  unsigned long __thiscall ClientObjMaintSystem::<struct String_QualityType,class AC1Legacy::PStringBase<char> const&>::UpdateStat(ClientObjMaintSystem::<struct String_QualityType,class AC1Legacy::PStringBase<char> const&>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, class AC1Legacy::PStringBase<char> const& arg5)

00558220  {
0055822a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055822a      
00558233      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558233      {
00558262          int32_t eax_4;
00558262          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x50000), arg3) != 0;
00558262          
00558267          if (eax_4 != 0)
00558267          {
00558269              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
00558269              
00558276              if (eax_5 != 0)
0055827d                  CBaseQualities::SetString(((char*)eax_5 + 0x38), arg2, arg5);
0055827d              
00558282              int32_t* edi_2 = *(uint32_t*)arg5;
00558289              InterlockedIncrement(&edi_2[1]);
00558289              
0055829d              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
005582a5                  **(uint32_t**)edi_2(1);
005582a5              
005582a7              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
005582a7              
005582b0              if (QualityRegistrar::s_pQR_1 != 0)
005582b6                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, String_StatType, arg2);
00558267          }
00558233      }
00558233      
005582bf      return 0;
00558220  }

005582c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005582d0  unsigned long __thiscall ClientObjMaintSystem::<struct DataID_QualityType,class IDClass<struct _tagDataID,32,0> >::UpdateStat(ClientObjMaintSystem::<struct DataID_QualityType,class IDClass<struct _tagDataID,32,0> >* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, class IDClass<struct _tagDataID,32,0> arg5)

005582d0  {
005582da      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
005582da      
005582e3      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
005582e3      {
00558307          int32_t eax_4;
00558307          uint32_t edx_2;
00558307          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x60000), arg3);
0055830e          eax_4 = eax_4 != 0;
0055830e          
00558313          if (eax_4 != 0)
00558313          {
00558315              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
0055831e              class IDClass<_tagDataID,32,0> ebx_1 = arg5;
0055831e              
00558322              if (eax_5 != 0)
00558322              {
00558324                  class IDClass<_tagDataID,32,0> var_10_2 = ebx_1;
00558329                  CBaseQualities::SetDataID(((char*)eax_5 + 0x38), edx_2, arg2);
00558322              }
00558322              
00558332              ACCWeenieObject::OnStatUpdated(eax, arg2, ebx_1);
00558337              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00558337              
00558340              if (QualityRegistrar::s_pQR_1 != 0)
00558346                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, DataID_StatType, arg2);
00558313          }
005582e3      }
005582e3      
0055834f      return 0;
005582d0  }

00558352                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00558360  unsigned long __thiscall ClientObjMaintSystem::<struct InstanceID_QualityType,unsigned long>::UpdateStat(ClientObjMaintSystem::<struct InstanceID_QualityType,unsigned long>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, unsigned long arg5)

00558360  {
0055836a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055836a      
00558373      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558373      {
00558397          int32_t eax_4;
00558397          uint32_t edx_2;
00558397          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x70000), arg3);
0055839e          eax_4 = eax_4 != 0;
0055839e          
005583a3          if (eax_4 != 0)
005583a3          {
005583a5              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
005583a5              
005583b2              if (eax_5 != 0)
005583b2              {
005583b4                  unsigned long var_10_2 = arg5;
005583b9                  CBaseQualities::SetInstanceID(((char*)eax_5 + 0x38), edx_2, arg2);
005583b2              }
005583b2              
005583c2              ACCWeenieObject::OnStatUpdated(eax, arg2, arg5);
005583c7              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
005583c7              
005583d0              if (QualityRegistrar::s_pQR_1 != 0)
005583d6                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, InstanceID_StatType, arg2);
005583a3          }
00558373      }
00558373      
005583df      return 0;
00558360  }

005583e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005583f0  unsigned long __thiscall ClientObjMaintSystem::<struct Position_QualityType,class Position const&>::UpdateStat(ClientObjMaintSystem::<struct Position_QualityType,class Position const&>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4, class Position const& arg5)

005583f0  {
005583fa      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
005583fa      
00558403      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558403      {
0055842e          int32_t eax_4;
0055842e          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x30000), arg3) != 0;
0055842e          
00558433          if (eax_4 != 0)
00558433          {
00558435              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
00558435              
0055843d              if (eax_5 != 0)
00558448                  CBaseQualities::SetPosition(((char*)eax_5 + 0x38), arg2, arg5);
00558448              
0055844d              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
0055844d              
00558455              if (QualityRegistrar::s_pQR_1 != 0)
0055845b                  QualityRegistrar::CallChangeHandler(QualityRegistrar::s_pQR_1, eax, Position_StatType, arg2);
00558433          }
00558403      }
00558403      
00558464      return 0;
005583f0  }

00558467                       90 90 90 90 90 90 90 90 90                                                         .........

00558470  unsigned long __thiscall ClientObjMaintSystem::<struct Int_QualityType>::RemoveStat(ClientObjMaintSystem::<struct Int_QualityType>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4)

00558470  {
0055847a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055847a      
00558483      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558483      {
005584a7          int32_t eax_4;
005584a7          uint32_t edx_2;
005584a7          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x10000), arg3);
005584ae          eax_4 = eax_4 != 0;
005584ae          
005584b3          if (eax_4 != 0)
005584b3          {
005584b5              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
005584b5              
005584bd              if (eax_5 != 0)
005584bd              {
005584bf                  unsigned long var_c_2 = arg2;
005584c3                  CBaseQualities::RemoveInt(((char*)eax_5 + 0x38), edx_2);
005584bd              }
005584bd              
005584c8              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
005584c8              
005584d0              if (QualityRegistrar::s_pQR_1 != 0)
005584d6                  QualityRegistrar::CallRemoveHandler(QualityRegistrar::s_pQR_1, eax, Int_StatType, arg2);
005584b3          }
00558483      }
00558483      
005584df      return 0;
00558470  }

005584e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005584f0  unsigned long __thiscall ClientObjMaintSystem::<struct Int64_QualityType>::RemoveStat(ClientObjMaintSystem::<struct Int64_QualityType>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4)

005584f0  {
005584fa      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
005584fa      
00558503      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558503      {
0055852e          int32_t eax_4;
0055852e          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0xe0000), arg3) != 0;
0055852e          
00558533          if (eax_4 != 0)
00558533          {
00558535              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
00558535              
0055853d              if (eax_5 != 0)
00558543                  CBaseQualities::RemoveInt64(((char*)eax_5 + 0x38), arg2);
00558543              
00558548              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00558548              
00558550              if (QualityRegistrar::s_pQR_1 != 0)
00558556                  QualityRegistrar::CallRemoveHandler(QualityRegistrar::s_pQR_1, eax, Int64_StatType, arg2);
00558533          }
00558503      }
00558503      
0055855f      return 0;
005584f0  }

00558562        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00558570  unsigned long __thiscall ClientObjMaintSystem::<struct Bool_QualityType>::RemoveStat(ClientObjMaintSystem::<struct Bool_QualityType>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4)

00558570  {
0055857a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055857a      
00558583      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558583      {
005585a7          int32_t eax_4;
005585a7          uint32_t edx_2;
005585a7          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0xd0000), arg3);
005585ae          eax_4 = eax_4 != 0;
005585ae          
005585b3          if (eax_4 != 0)
005585b3          {
005585b5              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
005585b5              
005585bd              if (eax_5 != 0)
005585bd              {
005585bf                  unsigned long var_c_2 = arg2;
005585c3                  CBaseQualities::RemoveBool(((char*)eax_5 + 0x38), edx_2);
005585bd              }
005585bd              
005585c8              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
005585c8              
005585d0              if (QualityRegistrar::s_pQR_1 != 0)
005585d6                  QualityRegistrar::CallRemoveHandler(QualityRegistrar::s_pQR_1, eax, Bool_StatType, arg2);
005585b3          }
00558583      }
00558583      
005585df      return 0;
00558570  }

005585e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005585f0  unsigned long __thiscall ClientObjMaintSystem::<struct Float_QualityType>::RemoveStat(ClientObjMaintSystem::<struct Float_QualityType>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4)

005585f0  {
005585fa      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
005585fa      
00558603      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558603      {
0055862e          int32_t eax_4;
0055862e          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x20000), arg3) != 0;
0055862e          
00558633          if (eax_4 != 0)
00558633          {
00558635              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
00558635              
0055863d              if (eax_5 != 0)
00558643                  CBaseQualities::RemoveFloat(((char*)eax_5 + 0x38), arg2);
00558643              
00558648              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00558648              
00558650              if (QualityRegistrar::s_pQR_1 != 0)
00558656                  QualityRegistrar::CallRemoveHandler(QualityRegistrar::s_pQR_1, eax, Float_StatType, arg2);
00558633          }
00558603      }
00558603      
0055865f      return 0;
005585f0  }

00558662        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00558670  unsigned long __thiscall ClientObjMaintSystem::<struct String_QualityType>::RemoveStat(ClientObjMaintSystem::<struct String_QualityType>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4)

00558670  {
0055867a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055867a      
00558683      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558683      {
005586a7          int32_t eax_4;
005586a7          uint32_t edx_2;
005586a7          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x50000), arg3);
005586ae          eax_4 = eax_4 != 0;
005586ae          
005586b3          if (eax_4 != 0)
005586b3          {
005586b5              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
005586b5              
005586bd              if (eax_5 != 0)
005586bd              {
005586bf                  unsigned long var_c_2 = arg2;
005586c3                  CBaseQualities::RemoveString(((char*)eax_5 + 0x38), edx_2);
005586bd              }
005586bd              
005586c8              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
005586c8              
005586d0              if (QualityRegistrar::s_pQR_1 != 0)
005586d6                  QualityRegistrar::CallRemoveHandler(QualityRegistrar::s_pQR_1, eax, String_StatType, arg2);
005586b3          }
00558683      }
00558683      
005586df      return 0;
00558670  }

005586e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005586f0  unsigned long __thiscall ClientObjMaintSystem::<struct DataID_QualityType>::RemoveStat(ClientObjMaintSystem::<struct DataID_QualityType>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4)

005586f0  {
005586fa      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
005586fa      
00558703      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558703      {
00558727          int32_t eax_4;
00558727          uint32_t edx_2;
00558727          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x60000), arg3);
0055872e          eax_4 = eax_4 != 0;
0055872e          
00558733          if (eax_4 != 0)
00558733          {
00558735              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
00558735              
0055873d              if (eax_5 != 0)
0055873d              {
0055873f                  unsigned long var_c_2 = arg2;
00558743                  CBaseQualities::RemoveDataID(((char*)eax_5 + 0x38), edx_2);
0055873d              }
0055873d              
00558748              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00558748              
00558750              if (QualityRegistrar::s_pQR_1 != 0)
00558756                  QualityRegistrar::CallRemoveHandler(QualityRegistrar::s_pQR_1, eax, DataID_StatType, arg2);
00558733          }
00558703      }
00558703      
0055875f      return 0;
005586f0  }

00558762        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00558770  unsigned long __thiscall ClientObjMaintSystem::<struct InstanceID_QualityType>::RemoveStat(ClientObjMaintSystem::<struct InstanceID_QualityType>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4)

00558770  {
0055877a      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
0055877a      
00558783      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558783      {
005587a7          int32_t eax_4;
005587a7          uint32_t edx_2;
005587a7          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x70000), arg3);
005587ae          eax_4 = eax_4 != 0;
005587ae          
005587b3          if (eax_4 != 0)
005587b3          {
005587b5              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
005587b5              
005587bd              if (eax_5 != 0)
005587bd              {
005587bf                  unsigned long var_c_2 = arg2;
005587c3                  CBaseQualities::RemoveInstanceID(((char*)eax_5 + 0x38), edx_2);
005587bd              }
005587bd              
005587c8              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
005587c8              
005587d0              if (QualityRegistrar::s_pQR_1 != 0)
005587d6                  QualityRegistrar::CallRemoveHandler(QualityRegistrar::s_pQR_1, eax, InstanceID_StatType, arg2);
005587b3          }
00558783      }
00558783      
005587df      return 0;
00558770  }

005587e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005587f0  unsigned long __thiscall ClientObjMaintSystem::<struct Position_QualityType>::RemoveStat(ClientObjMaintSystem::<struct Position_QualityType>* this, unsigned long arg2, uint8_t arg3, unsigned long arg4)

005587f0  {
005587fa      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(((char*)this + 8), arg4);
005587fa      
00558803      if ((eax != 0 && ACCWeenieObject::SetupStamper(eax) != 0))
00558803      {
00558827          int32_t eax_4;
00558827          uint32_t edx_2;
00558827          eax_4 = WTimeStamper::UpdateTS(*(int32_t*)((char*)eax + 0x148), (arg2 | 0x30000), arg3);
0055882e          eax_4 = eax_4 != 0;
0055882e          
00558833          if (eax_4 != 0)
00558833          {
00558835              void* eax_5 = *(int32_t*)((char*)eax + 0x14c);
00558835              
0055883d              if (eax_5 != 0)
0055883d              {
0055883f                  unsigned long var_c_2 = arg2;
00558843                  CBaseQualities::RemovePosition(((char*)eax_5 + 0x38), edx_2);
0055883d              }
0055883d              
00558848              class QualityRegistrar* QualityRegistrar::s_pQR_1 = QualityRegistrar::s_pQR;
00558848              
00558850              if (QualityRegistrar::s_pQR_1 != 0)
00558856                  QualityRegistrar::CallRemoveHandler(QualityRegistrar::s_pQR_1, eax, Position_StatType, arg2);
00558833          }
00558803      }
00558803      
0055885f      return 0;
005587f0  }

00558862        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00558870  class CPhysicsObj* __thiscall ACCObjectMaint::CreateObject(class ACCObjectMaint* this, uint32_t arg2, class VisualDesc* arg3, class PhysicsDesc* arg4, class WeenieDesc* arg5)

00558870  {
00558871      uint32_t ebp = arg2;
00558871      
00558897      for (void* i = this->object_table.buckets[(((ebp >> ((int8_t)this->object_table.key_shift)) ^ ebp) & this->object_table.table_mask)]; i != 0; i = *(uint32_t*)((char*)i + 4))
00558897      {
005588a3          if (ebp == *(uint32_t*)((char*)i + 8))
00558928              return 0;
00558897      }
00558897      
005588cc      for (void* i_1 = this->weenie_object_table.buckets[(((ebp >> ((int8_t)this->weenie_object_table.key_shift)) ^ ebp) & this->weenie_object_table.table_mask)]; i_1 != 0; i_1 = *(uint32_t*)((char*)i_1 + 4))
005588cc      {
005588d3          if (ebp == *(uint32_t*)((char*)i_1 + 8))
00558930              return 0;
005588cc      }
005588cc      
005588e6      class CPhysicsObj* result = CObjectMaint::GetNullObject(this, ebp, 0);
005588e6      
005588ea      if (result == 0)
0055895b          result = CPhysicsObj::makeObject(PhysicsDesc::get_setup_id(arg4, &arg2)->id, ebp, 1);
005588ea      else if (CPhysicsObj::InitNullObject(result, PhysicsDesc::get_setup_id(arg4, &arg2)->id) == 0)
00558906      {
00558936          CObjectMaint::DeleteObject(this, result);
0055893b          result = nullptr;
00558906      }
00558906      else
00558906      {
00558912          uint32_t edx_6 = HashBase<unsigned long>::remove(&this->null_object_table.vtable, result->id);
0055891a          uint32_t __saved_ebx_3 = result->id;
0055891d          CObjectMaint::RemoveObjectToBeDestroyed(this, edx_6);
00558906      }
00558906      
00558968      class CWeenieObject* ebx = CObjectMaint::GetNullWeenieObject(this, ebp, 0);
00558968      
0055896c      if (ebx == 0)
005589b4          ebx = CFactory::MakeCWeenieObject(ebp);
0055896c      else
0055896c      {
00558978          HashBase<unsigned long>::remove(&this->null_weenie_object_table.vtable, ebx->id);
0055897d          uint32_t id = ebx->id;
00558980          uint32_t id_1 = id;
00558983          CObjectMaint::RemoveObjectToBeDestroyed(this, id);
00558988          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0055898f          uint32_t player_id;
0055898f          
0055898f          if (SmartBox::smartbox_1 == 0)
00558999              player_id = 0;
0055898f          else
00558991              player_id = SmartBox::smartbox_1->player_id;
00558991          
0055899d          if (player_id == ebp)
005589a3              *(int32_t*)((char*)ebx->vtable + 0x80)();
0055896c      }
0055896c      
005589b8      if (ebx != 0)
005589b8      {
005589bd          CObjectMaint::AddWeenieObject(this, ebx);
005589c6          this->vtable->SetWeenieDesc(ebx, arg5, 0);
005589b8      }
005589b8      
005589d3      if (result != 0)
005589d3      {
005589d7          if (ebx != 0)
005589d7          {
005589dc              CPhysicsObj::set_weenie_obj_ptr(result, ebx);
005589e4              Client::SetPortA(ebx, result);
005589d7          }
005589d7          
005589f9          if (CPhysicsObj::set_description(result, arg4, 1) != 0)
005589f9          {
00558a02              CPhysicsObj::DoObjDescChanges(result, arg3);
00558a0f              CObjectMaint::SetChildren(this, result, arg4);
00558a18              uint32_t eax_20 = PhysicsDesc::get_parent_id(arg4);
00558a18              
00558a1f              if (eax_20 != 0)
00558a1f              {
00558a2d                  arg2 = CObjectMaint::GetObjectA(this, eax_20);
00558a31                  uint32_t eax_22 = PhysicsDesc::get_parent_location_id(arg4);
00558a3e                  CPhysicsObj::set_parent(result, arg2, eax_22);
00558a1f              }
00558a1f              
00558a46              CObjectMaint::AddObject(this, result);
005589f9          }
005589d3      }
005589d3      
00558a4e      if (ebx != 0)
00558a51          ECM_Physics::SendNotice_CreateObject(ebp);
00558a51      
00558a5e      return result;
00558870  }

00558a61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00558a70  void __thiscall ACCObjectMaint::ViewObjectContents(class ACCObjectMaint* this, uint32_t arg2, class PackableList<ContentProfile> const* arg3)

00558a70  {
00558a7f      class CObjectInventory* esi = CObjectMaint::GetObjectInventory(this, arg2);
00558a7f      
00558a83      if (esi == 0)
00558a83      {
00558a87          void* eax_1 = operator new(0x4c);
00558a87          
00558a91          if (eax_1 == 0)
00558a9f              esi = nullptr;
00558a91          else
00558a9b              esi = CObjectInventory::CObjectInventory(eax_1, arg2);
00558a9b          
00558aa1          uint32_t id = esi->id;
00558ab7          uint32_t eax_6 = (((id >> ((int8_t)this->object_inventory_table.key_shift)) ^ id) & this->object_inventory_table.table_mask);
00558ac2          esi->hash_next = this->object_inventory_table.buckets[eax_6];
00558ac5          this->object_inventory_table.buckets[eax_6] = esi;
00558ad0          class CWeenieObject* eax_7 = CObjectMaint::GetWeenieObject(this, arg2);
00558ad0          
00558ad7          if (eax_7 != 0)
00558ad9              *(int32_t*)((char*)eax_7 + 0x50) = esi;
00558a83      }
00558a83      
00558ae1      IDList::Clear(&esi->_itemsList);
00558aeb      IDList::Clear(&esi->_containersList);
00558aeb      
00558af9      for (class PackableLLNode<ContentProfile>* i = arg3->head; i != 0; i = i->next)
00558af9      {
00558b05          uint32_t m_iid;
00558b05          class IDList* ecx_8;
00558b05          
00558b05          if (i->data.m_uContainerProperties == 0)
00558b05          {
00558b12              m_iid = i->data.m_iid;
00558b13              ecx_8 = &esi->_itemsList;
00558b05          }
00558b05          else
00558b05          {
00558b0a              m_iid = i->data.m_iid;
00558b0b              ecx_8 = &esi->_containersList;
00558b05          }
00558b05          
00558b15          IDList::Add(ecx_8, m_iid);
00558af9      }
00558a70  }

00558afd                                                                                         8d 49 00                               .I.
00558b27                       90 90 90 90 90 90 90 90 90                                                         .........

00558b30  void __thiscall ACCObjectMaint::StopViewingObjectContents(class ACCObjectMaint* this, uint32_t arg2)

00558b30  {
00558b39      class CWeenieObject* eax = CObjectMaint::GetWeenieObject(this, arg2);
00558b39      
00558b40      if (eax != 0)
00558b42          *(int32_t*)((char*)eax + 0x50) = 0;
00558b42      
00558b50      class HashBaseData<unsigned long>* eax_1 = HashBase<unsigned long>::remove(&this->object_inventory_table, arg2);
00558b50      
00558b59      if (eax_1 == 0)
00558b69          return;
00558b69      
00558b5d      arg2 = 1;
00558b67      /* jump -> eax_1->vtable->__vecDelDtor */
00558b30  }

00558b6c                                      90 90 90 90                                                              ....

00558b70  void __fastcall ClientObjMaintSystem::ClientObjMaintSystem(class ClientObjMaintSystem* this)

00558b70  {
00558b73      int32_t esi;
00558b73      int32_t var_14 = esi;
00558b76      class ClientObjMaintSystem* edi;
00558b76      class ClientObjMaintSystem* var_18 = edi;
00558b77      this->vtable = &gmUrgentAssistanceUI::`vftable';
00558b83      this->vtable = 0x7cbde8;
00558b89      this->vtable = &gmUrgentAssistanceUI::`vftable';
00558b90      CObjectMaint::CObjectMaint(&this->vtable);
00558b7e      this->vtable = &ACCObjectMaint::`vftable';
00558b7e      this->vtable = &CObjectMaint::`vftable';
00558b7e      this->player_objdesc = nullptr;
00558bac      class ClientObjMaintSystem* this_1 = this;
00558bb6      this->vtable = 0x7cbdbc;
00558bbc      this->vtable = &gmUrgentAssistanceUI::`vftable';
00558b7e      this->vtable = &ClientObjMaintSystem::`vftable';
00558bc9      this->vtable = &CObjectMaint::`vftable';
00558bd0      int32_t var_8 = 0;
00558bd8      int32_t var_4 = 0;
00558be0      void __return;
00558be0      InterfacePtr<class Interface>::_QueryInterface(&var_8, &__return);
00558bfd      int32_t* var_c;
00558bfd      InterfaceSystem::RegisterClassA(InterfaceSystem::GetInstance(), &__return, &ClientObjMaintSystem_ClassType, var_c, nullptr);
00558bfd      class ClientObjMaintSystem** esp = &this_1;
00558bfd      
00558c04      if (var_c != 0)
00558c04      {
00558c0a          *(uint32_t*)(*(uint32_t*)var_c + 0x14)();
00558c0a          esp = &var_18;
00558c04      }
00558c04      
00558c0d      *(uint32_t*)esp;
00558c0d      esp[1];
00558b70  }

00558c15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00558c20  void __fastcall ClientObjMaintSystem::OnShutdown(class ClientObjMaintSystem* this)

00558c20  {
00558c23      int32_t __return_1;
00558c23      int32_t __return = __return_1;
00558c24      class ClientObjMaintSystem* edi;
00558c24      class ClientObjMaintSystem* var_14 = edi;
00558c27      class ClientObjMaintSystem* this_1 = this;
00558c31      int32_t var_8 = 0;
00558c39      int32_t var_4 = 0;
00558c41      class Interface* var_c;
00558c41      InterfacePtr<class Interface>::_QueryInterface(&var_8, &var_c);
00558c46      class Interface* edi_1 = var_c;
00558c5e      InterfaceSystem::UnregisterClassA(InterfaceSystem::GetInstance(), &__return, &ClientObjMaintSystem_ClassType, edi_1, nullptr);
00558c5e      class ClientObjMaintSystem** esp = &this_1;
00558c66      CObjectMaint::OnShutdown(&this->vtable);
00558c66      
00558c6d      if (edi_1 != 0)
00558c6d      {
00558c6f          edi_1->vtable->Release();
00558c73          esp = &var_14;
00558c6d      }
00558c6d      
00558c76      *(uint32_t*)esp;
00558c76      esp[1];
00558c20  }

00558c7c                                                                                      90 90 90 90                              ....

00558c80  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateAttribute(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, class Attribute* arg5)

00558c80  {
00558c94      ClientObjMaintSystem::<struct Attribute_QualityType,class Attribute const&>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558c99      return 0;
00558c80  }

00558c9c                                                                                      90 90 90 90                              ....

00558ca0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateAttributeLevel(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, int32_t arg5)

00558ca0  {
00558cb4      ClientObjMaintSystem::<struct Attribute_QualityType,unsigned long>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558cb9      return 0;
00558ca0  }

00558cbc                                                                                      90 90 90 90                              ....

00558cc0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateAttribute2nd(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, class SecondaryAttribute* arg5)

00558cc0  {
00558cd4      ClientObjMaintSystem::<struct Attribute_2nd_QualityType,class SecondaryAttribute const&>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558cd9      return 0;
00558cc0  }

00558cdc                                                                                      90 90 90 90                              ....

00558ce0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateAttribute2ndLevel(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, int32_t arg5)

00558ce0  {
00558cf4      ClientObjMaintSystem::<struct Attribute_2nd_QualityType,unsigned long>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558cf9      return 0;
00558ce0  }

00558cfc                                                                                      90 90 90 90                              ....

00558d00  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateSkill(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, class Skill* arg5)

00558d00  {
00558d14      ClientObjMaintSystem::<struct Skill_QualityType,class Skill const&>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558d19      return 0;
00558d00  }

00558d1c                                                                                      90 90 90 90                              ....

00558d20  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateSkillLevel(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, int32_t arg5)

00558d20  {
00558d34      ClientObjMaintSystem::<struct Skill_QualityType,unsigned long>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558d39      return 0;
00558d20  }

00558d3c                                                                                      90 90 90 90                              ....

00558d40  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateSkillAC(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, enum SKILL_ADVANCEMENT_CLASS arg5)

00558d40  {
00558d54      ClientObjMaintSystem::<struct Skill_QualityType,enum SKILL_ADVANCEMENT_CLASS>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558d59      return 0;
00558d40  }

00558d5c                                                                                      90 90 90 90                              ....

00558d60  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateInt(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, int32_t arg5)

00558d60  {
00558d74      ClientObjMaintSystem::<struct Int_QualityType,long>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558d79      return 0;
00558d60  }

00558d7c                                                                                      90 90 90 90                              ....

00558d80  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateInt64(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, int64_t arg5)

00558d80  {
00558d88      int32_t var_4 = *(uint32_t*)((char*)arg5)[4];
00558d99      ClientObjMaintSystem::<struct Int64_QualityType,int64_t>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558d9e      return 0;
00558d80  }

00558da1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00558db0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateBool(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, int32_t arg5)

00558db0  {
00558dc4      ClientObjMaintSystem::<struct Bool_QualityType,int32_t>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558dc9      return 0;
00558db0  }

00558dcc                                      90 90 90 90                                                              ....

00558dd0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateFloat(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, double arg5)

00558dd0  {
00558dd8      int32_t var_4 = *(uint32_t*)((char*)arg5)[4];
00558de9      ClientObjMaintSystem::<struct Float_QualityType,double>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558dee      return 0;
00558dd0  }

00558df1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00558e00  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateString(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, class AC1Legacy::PStringBase<char>* arg5)

00558e00  {
00558e14      ClientObjMaintSystem::<struct String_QualityType,class AC1Legacy::PStringBase<char> const&>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558e19      return 0;
00558e00  }

00558e1c                                                                                      90 90 90 90                              ....

00558e20  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateDataID(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, class IDClass<_tagDataID,32,0> arg5)

00558e20  {
00558e34      ClientObjMaintSystem::<struct DataID_QualityType,class IDClass<struct _tagDataID,32,0> >::UpdateStat(this, arg4, arg2, arg3, arg5);
00558e39      return 0;
00558e20  }

00558e3c                                                                                      90 90 90 90                              ....

00558e40  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdateInstanceID(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5)

00558e40  {
00558e54      ClientObjMaintSystem::<struct InstanceID_QualityType,unsigned long>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558e59      return 0;
00558e40  }

00558e5c                                                                                      90 90 90 90                              ....

00558e60  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__UpdatePosition(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4, class Position const* arg5)

00558e60  {
00558e74      ClientObjMaintSystem::<struct Position_QualityType,class Position const&>::UpdateStat(this, arg4, arg2, arg3, arg5);
00558e79      return 0;
00558e60  }

00558e7c                                                                                      90 90 90 90                              ....

00558e80  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateAttribute(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, class Attribute* arg4)

00558e80  {
00558e80      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00558e87      uint32_t player_id;
00558e87      
00558e87      if (SmartBox::smartbox_1 == 0)
00558e91          player_id = 0;
00558e87      else
00558e89          player_id = SmartBox::smartbox_1->player_id;
00558e89      
00558ea3      ClientObjMaintSystem::<struct Attribute_QualityType,class Attribute const&>::UpdateStat(this, arg3, arg2, player_id, arg4);
00558ea8      return 0;
00558e80  }

00558eab                                   90 90 90 90 90                                                             .....

00558eb0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateAttributeLevel(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, int32_t arg4)

00558eb0  {
00558eb0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00558eb7      uint32_t player_id;
00558eb7      
00558eb7      if (SmartBox::smartbox_1 == 0)
00558ec1          player_id = 0;
00558eb7      else
00558eb9          player_id = SmartBox::smartbox_1->player_id;
00558eb9      
00558ed3      ClientObjMaintSystem::<struct Attribute_QualityType,unsigned long>::UpdateStat(this, arg3, arg2, player_id, arg4);
00558ed8      return 0;
00558eb0  }

00558edb                                                                                   90 90 90 90 90                             .....

00558ee0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateAttribute2nd(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, class SecondaryAttribute* arg4)

00558ee0  {
00558ee0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00558ee7      uint32_t player_id;
00558ee7      
00558ee7      if (SmartBox::smartbox_1 == 0)
00558ef1          player_id = 0;
00558ee7      else
00558ee9          player_id = SmartBox::smartbox_1->player_id;
00558ee9      
00558f03      ClientObjMaintSystem::<struct Attribute_2nd_QualityType,class SecondaryAttribute const&>::UpdateStat(this, arg3, arg2, player_id, arg4);
00558f08      return 0;
00558ee0  }

00558f0b                                   90 90 90 90 90                                                             .....

00558f10  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateAttribute2ndLevel(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, int32_t arg4)

00558f10  {
00558f10      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00558f17      uint32_t player_id;
00558f17      
00558f17      if (SmartBox::smartbox_1 == 0)
00558f21          player_id = 0;
00558f17      else
00558f19          player_id = SmartBox::smartbox_1->player_id;
00558f19      
00558f33      ClientObjMaintSystem::<struct Attribute_2nd_QualityType,unsigned long>::UpdateStat(this, arg3, arg2, player_id, arg4);
00558f38      return 0;
00558f10  }

00558f3b                                                                                   90 90 90 90 90                             .....

00558f40  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateSkill(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, class Skill* arg4)

00558f40  {
00558f40      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00558f47      uint32_t player_id;
00558f47      
00558f47      if (SmartBox::smartbox_1 == 0)
00558f51          player_id = 0;
00558f47      else
00558f49          player_id = SmartBox::smartbox_1->player_id;
00558f49      
00558f63      ClientObjMaintSystem::<struct Skill_QualityType,class Skill const&>::UpdateStat(this, arg3, arg2, player_id, arg4);
00558f68      return 0;
00558f40  }

00558f6b                                   90 90 90 90 90                                                             .....

00558f70  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateSkillLevel(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, int32_t arg4)

00558f70  {
00558f70      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00558f77      uint32_t player_id;
00558f77      
00558f77      if (SmartBox::smartbox_1 == 0)
00558f81          player_id = 0;
00558f77      else
00558f79          player_id = SmartBox::smartbox_1->player_id;
00558f79      
00558f93      ClientObjMaintSystem::<struct Skill_QualityType,unsigned long>::UpdateStat(this, arg3, arg2, player_id, arg4);
00558f98      return 0;
00558f70  }

00558f9b                                                                                   90 90 90 90 90                             .....

00558fa0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateSkillAC(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, enum SKILL_ADVANCEMENT_CLASS arg4)

00558fa0  {
00558fa0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00558fa7      uint32_t player_id;
00558fa7      
00558fa7      if (SmartBox::smartbox_1 == 0)
00558fb1          player_id = 0;
00558fa7      else
00558fa9          player_id = SmartBox::smartbox_1->player_id;
00558fa9      
00558fc3      ClientObjMaintSystem::<struct Skill_QualityType,enum SKILL_ADVANCEMENT_CLASS>::UpdateStat(this, arg3, arg2, player_id, arg4);
00558fc8      return 0;
00558fa0  }

00558fcb                                   90 90 90 90 90                                                             .....

00558fd0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateInt(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, int32_t arg4)

00558fd0  {
00558fd0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00558fd7      uint32_t player_id;
00558fd7      
00558fd7      if (SmartBox::smartbox_1 == 0)
00558fe1          player_id = 0;
00558fd7      else
00558fd9          player_id = SmartBox::smartbox_1->player_id;
00558fd9      
00558ff3      ClientObjMaintSystem::<struct Int_QualityType,long>::UpdateStat(this, arg3, arg2, player_id, arg4);
00558ff8      return 0;
00558fd0  }

00558ffb                                                                                   90 90 90 90 90                             .....

00559000  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateInt64(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, int64_t arg4)

00559000  {
00559000      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559007      uint32_t player_id;
00559007      
00559007      if (SmartBox::smartbox_1 == 0)
00559011          player_id = 0;
00559007      else
00559009          player_id = SmartBox::smartbox_1->player_id;
00559009      
00559017      int32_t var_4 = *(uint32_t*)((char*)arg4)[4];
00559028      ClientObjMaintSystem::<struct Int64_QualityType,int64_t>::UpdateStat(this, arg3, arg2, player_id, arg4);
0055902d      return 0;
00559000  }


00559030  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateBool(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, int32_t arg4)

00559030  {
00559030      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559037      uint32_t player_id;
00559037      
00559037      if (SmartBox::smartbox_1 == 0)
00559041          player_id = 0;
00559037      else
00559039          player_id = SmartBox::smartbox_1->player_id;
00559039      
00559053      ClientObjMaintSystem::<struct Bool_QualityType,int32_t>::UpdateStat(this, arg3, arg2, player_id, arg4);
00559058      return 0;
00559030  }

0055905b                                                                                   90 90 90 90 90                             .....

00559060  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateFloat(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, double arg4)

00559060  {
00559060      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559067      uint32_t player_id;
00559067      
00559067      if (SmartBox::smartbox_1 == 0)
00559071          player_id = 0;
00559067      else
00559069          player_id = SmartBox::smartbox_1->player_id;
00559069      
00559077      int32_t var_4 = *(uint32_t*)((char*)arg4)[4];
00559088      ClientObjMaintSystem::<struct Float_QualityType,double>::UpdateStat(this, arg3, arg2, player_id, arg4);
0055908d      return 0;
00559060  }


00559090  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateString(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, class AC1Legacy::PStringBase<char>* arg4)

00559090  {
00559090      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559097      uint32_t player_id;
00559097      
00559097      if (SmartBox::smartbox_1 == 0)
005590a1          player_id = 0;
00559097      else
00559099          player_id = SmartBox::smartbox_1->player_id;
00559099      
005590b3      ClientObjMaintSystem::<struct String_QualityType,class AC1Legacy::PStringBase<char> const&>::UpdateStat(this, arg3, arg2, player_id, arg4);
005590b8      return 0;
00559090  }

005590bb                                                                                   90 90 90 90 90                             .....

005590c0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateDataID(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, class IDClass<_tagDataID,32,0> arg4)

005590c0  {
005590c0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005590c7      uint32_t player_id;
005590c7      
005590c7      if (SmartBox::smartbox_1 == 0)
005590d1          player_id = 0;
005590c7      else
005590c9          player_id = SmartBox::smartbox_1->player_id;
005590c9      
005590e3      ClientObjMaintSystem::<struct DataID_QualityType,class IDClass<struct _tagDataID,32,0> >::UpdateStat(this, arg3, arg2, player_id, arg4);
005590e8      return 0;
005590c0  }

005590eb                                   90 90 90 90 90                                                             .....

005590f0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdateInstanceID(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

005590f0  {
005590f0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005590f7      uint32_t player_id;
005590f7      
005590f7      if (SmartBox::smartbox_1 == 0)
00559101          player_id = 0;
005590f7      else
005590f9          player_id = SmartBox::smartbox_1->player_id;
005590f9      
00559113      ClientObjMaintSystem::<struct InstanceID_QualityType,unsigned long>::UpdateStat(this, arg3, arg2, player_id, arg4);
00559118      return 0;
005590f0  }

0055911b                                                                                   90 90 90 90 90                             .....

00559120  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateUpdatePosition(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, class Position const* arg4)

00559120  {
00559120      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559127      uint32_t player_id;
00559127      
00559127      if (SmartBox::smartbox_1 == 0)
00559131          player_id = 0;
00559127      else
00559129          player_id = SmartBox::smartbox_1->player_id;
00559129      
00559143      ClientObjMaintSystem::<struct Position_QualityType,class Position const&>::UpdateStat(this, arg3, arg2, player_id, arg4);
00559148      return 0;
00559120  }

0055914b                                   90 90 90 90 90                                                             .....

00559150  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__RemoveIntEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

00559150  {
0055915f      ClientObjMaintSystem::<struct Int_QualityType>::RemoveStat(this, arg4, arg2, arg3);
00559164      return 0;
00559150  }

00559167                       90 90 90 90 90 90 90 90 90                                                         .........

00559170  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__RemoveInt64Event(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

00559170  {
0055917f      ClientObjMaintSystem::<struct Int64_QualityType>::RemoveStat(this, arg4, arg2, arg3);
00559184      return 0;
00559170  }

00559187                       90 90 90 90 90 90 90 90 90                                                         .........

00559190  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__RemoveBoolEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

00559190  {
0055919f      ClientObjMaintSystem::<struct Bool_QualityType>::RemoveStat(this, arg4, arg2, arg3);
005591a4      return 0;
00559190  }

005591a7                       90 90 90 90 90 90 90 90 90                                                         .........

005591b0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__RemoveFloatEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

005591b0  {
005591bf      ClientObjMaintSystem::<struct Float_QualityType>::RemoveStat(this, arg4, arg2, arg3);
005591c4      return 0;
005591b0  }

005591c7                       90 90 90 90 90 90 90 90 90                                                         .........

005591d0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__RemoveStringEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

005591d0  {
005591df      ClientObjMaintSystem::<struct String_QualityType>::RemoveStat(this, arg4, arg2, arg3);
005591e4      return 0;
005591d0  }

005591e7                       90 90 90 90 90 90 90 90 90                                                         .........

005591f0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__RemoveDataIDEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

005591f0  {
005591ff      ClientObjMaintSystem::<struct DataID_QualityType>::RemoveStat(this, arg4, arg2, arg3);
00559204      return 0;
005591f0  }

00559207                       90 90 90 90 90 90 90 90 90                                                         .........

00559210  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__RemoveInstanceIDEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

00559210  {
0055921f      ClientObjMaintSystem::<struct InstanceID_QualityType>::RemoveStat(this, arg4, arg2, arg3);
00559224      return 0;
00559210  }

00559227                       90 90 90 90 90 90 90 90 90                                                         .........

00559230  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__RemovePositionEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3, uint32_t arg4)

00559230  {
0055923f      ClientObjMaintSystem::<struct Position_QualityType>::RemoveStat(this, arg4, arg2, arg3);
00559244      return 0;
00559230  }

00559247                       90 90 90 90 90 90 90 90 90                                                         .........

00559250  void __fastcall ClientObjMaintSystem::OnShutdown(class ClientObjMaintSystem* this)

00559250  {
00559253      /* tailcall */
00559253      return ClientObjMaintSystem::OnShutdown(((char*)this - 8));
00559250  }

00559258                                                                          cc cc cc cc cc cc cc cc                          ........

00559260  class ClientObjMaintSystem* ClientObjMaintSystem::Allocate()

00559260  {
00559265      void* eax = operator new(0x204);
00559265      
0055926f      if (eax == 0)
0055927a          return 0;
0055927a      
00559273      /* tailcall */
00559273      return ClientObjMaintSystem::ClientObjMaintSystem(eax);
00559260  }

0055927b                                                                                   90 90 90 90 90                             .....

00559280  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateRemoveIntEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3)

00559280  {
00559280      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559280      
00559287      if (SmartBox::smartbox_1 != 0)
00559287      {
0055929a          ClientObjMaintSystem::<struct Int_QualityType>::RemoveStat(this, arg3, arg2, SmartBox::smartbox_1->player_id);
0055929f          return 0;
00559287      }
00559287      
005592af      ClientObjMaintSystem::<struct Int_QualityType>::RemoveStat(this, arg3, arg2, 0);
005592b4      return 0;
00559280  }

005592b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005592c0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateRemoveInt64Event(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3)

005592c0  {
005592c0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005592c0      
005592c7      if (SmartBox::smartbox_1 != 0)
005592c7      {
005592da          ClientObjMaintSystem::<struct Int64_QualityType>::RemoveStat(this, arg3, arg2, SmartBox::smartbox_1->player_id);
005592df          return 0;
005592c7      }
005592c7      
005592ef      ClientObjMaintSystem::<struct Int64_QualityType>::RemoveStat(this, arg3, arg2, 0);
005592f4      return 0;
005592c0  }

005592f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00559300  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateRemoveBoolEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3)

00559300  {
00559300      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559300      
00559307      if (SmartBox::smartbox_1 != 0)
00559307      {
0055931a          ClientObjMaintSystem::<struct Bool_QualityType>::RemoveStat(this, arg3, arg2, SmartBox::smartbox_1->player_id);
0055931f          return 0;
00559307      }
00559307      
0055932f      ClientObjMaintSystem::<struct Bool_QualityType>::RemoveStat(this, arg3, arg2, 0);
00559334      return 0;
00559300  }

00559337                                                                       90 90 90 90 90 90 90 90 90                         .........

00559340  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateRemoveFloatEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3)

00559340  {
00559340      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559340      
00559347      if (SmartBox::smartbox_1 != 0)
00559347      {
0055935a          ClientObjMaintSystem::<struct Float_QualityType>::RemoveStat(this, arg3, arg2, SmartBox::smartbox_1->player_id);
0055935f          return 0;
00559347      }
00559347      
0055936f      ClientObjMaintSystem::<struct Float_QualityType>::RemoveStat(this, arg3, arg2, 0);
00559374      return 0;
00559340  }

00559377                                                                       90 90 90 90 90 90 90 90 90                         .........

00559380  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateRemoveStringEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3)

00559380  {
00559380      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559380      
00559387      if (SmartBox::smartbox_1 != 0)
00559387      {
0055939a          ClientObjMaintSystem::<struct String_QualityType>::RemoveStat(this, arg3, arg2, SmartBox::smartbox_1->player_id);
0055939f          return 0;
00559387      }
00559387      
005593af      ClientObjMaintSystem::<struct String_QualityType>::RemoveStat(this, arg3, arg2, 0);
005593b4      return 0;
00559380  }

005593b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005593c0  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateRemoveDataIDEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3)

005593c0  {
005593c0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005593c0      
005593c7      if (SmartBox::smartbox_1 != 0)
005593c7      {
005593da          ClientObjMaintSystem::<struct DataID_QualityType>::RemoveStat(this, arg3, arg2, SmartBox::smartbox_1->player_id);
005593df          return 0;
005593c7      }
005593c7      
005593ef      ClientObjMaintSystem::<struct DataID_QualityType>::RemoveStat(this, arg3, arg2, 0);
005593f4      return 0;
005593c0  }

005593f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00559400  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateRemoveInstanceIDEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3)

00559400  {
00559400      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559400      
00559407      if (SmartBox::smartbox_1 != 0)
00559407      {
0055941a          ClientObjMaintSystem::<struct InstanceID_QualityType>::RemoveStat(this, arg3, arg2, SmartBox::smartbox_1->player_id);
0055941f          return 0;
00559407      }
00559407      
0055942f      ClientObjMaintSystem::<struct InstanceID_QualityType>::RemoveStat(this, arg3, arg2, 0);
00559434      return 0;
00559400  }

00559437                                                                       90 90 90 90 90 90 90 90 90                         .........

00559440  uint32_t __thiscall ClientObjMaintSystem::Handle_Qualities__PrivateRemovePositionEvent(class ClientObjMaintSystem* this, uint8_t arg2, uint32_t arg3)

00559440  {
00559440      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559440      
00559447      if (SmartBox::smartbox_1 != 0)
00559447      {
0055945a          ClientObjMaintSystem::<struct Position_QualityType>::RemoveStat(this, arg3, arg2, SmartBox::smartbox_1->player_id);
0055945f          return 0;
00559447      }
00559447      
0055946f      ClientObjMaintSystem::<struct Position_QualityType>::RemoveStat(this, arg3, arg2, 0);
00559474      return 0;
00559440  }

00559477                                                                       90 90 90 90 90 90 90 90 90                         .........

00559480  void __fastcall PackableList<InventoryPlacement>::Flush(class PackableList<InventoryPlacement>* this)

00559480  {
0055948b      while (this->head != 0)
0055948b      {
00559490          class PackableLLNode<InventoryPlacement>* head = this->head;
00559490          
00559495          if (head != 0)
00559495          {
00559497              class PackableLLNode<InventoryPlacement>* next = head->next;
0055949c              this->head = next;
0055949c              
0055949f              if (next == 0)
005594a6                  this->tail = nullptr;
0055949f              else
005594a1                  next->prev = nullptr;
005594a1              
005594ab              if (head != 0)
005594ab              {
005594ae                  head->data.vtable = 0x79285c;
005594b4                  operator delete(head);
005594ab              }
005594ab              
005594bc              this->curNum -= 1;
00559495          }
0055948b      }
00559480  }

005594c7                       90 90 90 90 90 90 90 90 90                                                         .........

005594d0  class PackableList<InventoryPlacement>* __thiscall PackableList<InventoryPlacement>::operator=(class PackableList<InventoryPlacement>* arg1, void* arg2)

005594d0  {
005594d5      PackableList<InventoryPlacement>::Flush(arg1);
005594d5      
005594e5      for (void* i = *(uint32_t*)((char*)arg2 + 4); i != 0; i = *(uint32_t*)((char*)i + 0x10))
005594e5      {
005594e9          void* eax_1 = operator new(0x18);
005594e9          
005594f3          if (eax_1 == 0)
00559515              eax_1 = nullptr;
005594f3          else
005594f3          {
005594f5              *(uint32_t*)eax_1 = 0x7aba64;
005594fe              *(uint32_t*)((char*)eax_1 + 4) = *(uint32_t*)((char*)i + 4);
00559504              *(uint32_t*)((char*)eax_1 + 8) = *(uint32_t*)((char*)i + 8);
0055950a              *(uint32_t*)((char*)eax_1 + 0xc) = *(uint32_t*)((char*)i + 0xc);
0055950d              *(uint32_t*)((char*)eax_1 + 0x10) = 0;
00559510              *(uint32_t*)((char*)eax_1 + 0x14) = 0;
005594f3          }
005594f3          
0055951a          if (arg1->head != 0)
0055951a          {
00559521              class PackableLLNode<InventoryPlacement>* tail = arg1->tail;
00559524              tail->next = eax_1;
00559527              *(uint32_t*)((char*)eax_1 + 0x14) = tail;
0055951a          }
0055951a          else
0055951c              arg1->head = eax_1;
0055951c          
0055952d          uint32_t ecx_3 = (arg1->curNum + 1);
00559530          arg1->tail = eax_1;
00559533          arg1->curNum = ecx_3;
00559533          
00559536          if (i == 0)
00559536              break;
005594e5      }
005594e5      
00559544      return arg1;
005594d0  }

00559547                       90 90 90 90 90 90 90 90 90                                                         .........

00559550  void __thiscall ACCObjectMaint::UpdateObjectInventory(class ACCObjectMaint* this, uint32_t arg2, class PackableList<InventoryPlacement> const* arg3)

00559550  {
00559562      PackableList<InventoryPlacement>::operator=(&CObjectMaint::GetObjectInventory(this, arg2)->_invPlacement, arg3);
00559550  }

0055956a                                90 90 90 90 90 90                                                            ......

00559570  void __thiscall ACSmartBox::ACSmartBox(class ACSmartBox* this, class NIList<NetBlob *>* arg2)

00559570  {
00559575      class NIList<NetBlob *>* var_8 = arg2;
00559578      class NIList<NetBlob *>* edx;
00559578      SmartBox::SmartBox(this, edx);
0055957d      this->vtable = 0x7cbeb8;
00559570  }

00559589                             90 90 90 90 90 90 90                                                           .......

00559590  int32_t __thiscall ACSmartBox::IsReadyToDispatchEvent(class ACSmartBox* this, class NetBlob* arg2)

00559590  {
00559598      if (this->player_id != 0)
0055959f          return 1;
0055959f      
005595aa      if (arg2->bufSize_ < 4)
005595c2          return 0;
005595c2      
005595b8      int32_t result;
005595b8      result = *(uint32_t*)arg2->buf_ == 0xf746;
005595bd      return result;
00559590  }

005595c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005595d0  enum NetBlobProcessedStatus __thiscall ACSmartBox::DispatchSmartBoxEvent(class ACSmartBox* this, class NetBlob* arg2)

005595d0  {
005595d4      class NetBlob* ebx = arg2;
005595d8      uint32_t bufSize_ = ebx->bufSize_;
005595de      uint8_t* buf_ = ebx->buf_;
005595e4      arg2 = buf_;
005595e4      
005595ec      if (bufSize_ < 4)
00559660          return 3;
00559660      
005595ee      void* ecx = *(uint32_t*)buf_;
005595fa      arg2 = &buf_[4];
005595fa      
005595ff      if (ecx <= 0xf74b)
005595ff      {
00559605          uint32_t ebp_1;
00559605          enum NetBlobProcessedStatus result;
00559605          
00559605          switch (ecx)
00559605          {
0055962f              case 0xf619:
0055962f              {
00559663                  ebp_1 = *(uint32_t*)(buf_ + 4);
00559668                  arg2 = &buf_[8];
0055967e                  result = SmartBox::UnpackPositionEvent(this, ebp_1, &arg2, bufSize_);
0055967e                  
00559683                  if (result == NETBLOB_QUEUED)
00559683                  {
00559785                      SmartBox::QueueBlobForObject(this, ebp_1, ebx);
00559793                      return result;
00559683                  }
00559683                  
0055968c                  if (result == NETBLOB_PROCESSED_OK)
0055968c                  {
00559699                      class CPhysicsObj* eax_6 = CObjectMaint::GetObjectA(this->m_pObjMaint, ebp_1);
00559699                      
005596b6                      if (CPhysics::SetObjectMovement(this->physics, eax_6, arg2, bufSize_) != 0)
005596bc                          this->cmdinterp->vtable->LoseControlToServer();
0055968c                  }
0055968c                  
00559913                  return result;
0055962f                  break;
0055962f              }
00559637              case 0xf625:
00559637              {
00559653                  return CM_Physics::DispatchSB_ObjDescEvent(this, ebx);
00559637                  break;
00559637              }
0055961d              case 0xf745:
0055961d              {
005596e6                  return CM_Physics::DispatchSB_CreateObject(this, ebx);
0055961d                  break;
0055961d              }
005596e9              case 0xf746:
005596e9              {
00559708                  return CM_Physics::DispatchSB_CreatePlayer(this, ebx);
005596e9                  break;
005596e9              }
0055960b              case 0xf747:
0055960b              {
0055971e                  return CM_Physics::DispatchSB_DeleteObject(this, ebx);
0055960b                  break;
0055960b              }
00559721              case 0xf748:
00559721              {
0055975f                  ebp_1 = *(uint32_t*)(buf_ + 4);
00559764                  arg2 = &buf_[8];
00559776                  result = SmartBox::UnpackPositionEvent(this, ebp_1, &arg2, bufSize_);
00559776                  
0055977b                  if (result != NETBLOB_QUEUED)
00559913                      return result;
00559913                  
00559785                  SmartBox::QueueBlobForObject(this, ebp_1, ebx);
00559793                  return result;
00559721                  break;
00559721              }
00559729              case 0xf749:
00559729              {
0055975c                  return CM_Physics::DispatchSB_ParentEvent(this, ebx);
00559729                  break;
00559729              }
0055972c              case 0xf74a:
0055972c              {
00559746                  return CM_Physics::DispatchSB_PickupEvent(this, ebx);
0055972c                  break;
0055972c              }
005595f3              case 0xf74b:
005595f3              {
005597a9                  return CM_Physics::DispatchSB_SetState(this, ebx);
005595f3                  break;
005595f3              }
00559605          }
005595ff      }
005595ff      else if (((char*)ecx - 0xf74c) <= 0x8f)
005597b8          switch (ecx)
005597b8          {
00559850              case 0xf74c:
00559850              {
00559850                  uint32_t ebp_2 = *(uint32_t*)(buf_ + 4);
00559852                  class CObjectMaint* m_pObjMaint = this->m_pObjMaint;
0055985c                  arg2 = &buf_[8];
00559860                  class CPhysicsObj* eax_25 = CObjectMaint::GetObjectA(m_pObjMaint, ebp_2);
00559867                  class NetBlob* eax_26 = arg2;
0055986d                  uint16_t ecx_15 = eax_26->vtable;
00559875                  arg2 = (&eax_26->vtable + 2);
00559875                  
0055987d                  if ((eax_25 != 0 && CPhysicsObj::is_newer(eax_25->update_times[8], ecx_15) == 0))
0055987d                  {
00559896                      int32_t eax_29;
00559896                      eax_29 = eax_25->update_times[8];
00559896                      
005598a2                      if (eax_29 != ecx_15)
005598e8                          return 2;
005598e8                      
005598bc                      if (CPhysics::SetObjectMovement(this->physics, eax_25, arg2, bufSize_) != 0)
005598be                          this->cmdinterp->vtable->LoseControlToServer();
005598be                      
005598d7                      return 1;
0055987d                  }
0055987d                  
005598ef                  SmartBox::QueueBlobForObject(this, ebp_2, ebx);
00559902                  return 4;
00559850                  break;
00559850              }
0055984d              case 0xf74e:
0055984d              {
0055984d                  return CM_Physics::DispatchSB_VectorUpdate(this, ebx);
0055984d                  break;
0055984d              }
00559821              case 0xf750:
00559821              {
00559821                  return CM_Physics::DispatchSB_SoundEvent(this, ebx);
00559821                  break;
00559821              }
0055980b              case 0xf751:
0055980b              {
0055980b                  return CM_Physics::DispatchSB_PlayerTeleport(this, ebx);
0055980b                  break;
0055980b              }
005597df              case 0xf754:
005597df              {
005597df                  return CM_Physics::DispatchSB_PlayScriptID(this, ebx);
005597df                  break;
005597df              }
005597f5              case 0xf755:
005597f5              {
005597f5                  return CM_Physics::DispatchSB_PlayScriptType(this, ebx);
005597f5                  break;
005597f5              }
00559837              case 0xf7db:
00559837              {
00559837                  return CM_Physics::DispatchSB_UpdateObject(this, ebx);
00559837                  break;
00559837              }
005597b8          }
005597b8      
00559905      return NETBLOB_ERROR;
005595d0  }

00559916                                                                    8b ff                                                ..
00559918  uint32_t jump_table_559918[0x8] = 
00559918  {
00559918      [0x0] =  0x00559850
0055991c      [0x1] =  0x0055983a
00559920      [0x2] =  0x0055980e
00559924      [0x3] =  0x005597f8
00559928      [0x4] =  0x005597cc
0055992c      [0x5] =  0x005597e2
00559930      [0x6] =  0x00559824
00559934      [0x7] =  0x00559905
00559938  }
00559938  uint8_t lookup_table_559938[0x90] = 
00559938  {
00559938      [0x00] =  0x00
00559939      [0x01] =  0x07
0055993a      [0x02] =  0x01
0055993b      [0x03] =  0x07
0055993c      [0x04] =  0x02
0055993d      [0x05] =  0x03
0055993e      [0x06] =  0x07
0055993f      [0x07] =  0x07
00559940      [0x08] =  0x04
00559941      [0x09] =  0x05
00559942      [0x0a] =  0x07
00559943      [0x0b] =  0x07
00559944      [0x0c] =  0x07
00559945      [0x0d] =  0x07
00559946      [0x0e] =  0x07
00559947      [0x0f] =  0x07
00559948      [0x10] =  0x07
00559949      [0x11] =  0x07
0055994a      [0x12] =  0x07
0055994b      [0x13] =  0x07
0055994c      [0x14] =  0x07
0055994d      [0x15] =  0x07
0055994e      [0x16] =  0x07
0055994f      [0x17] =  0x07
00559950      [0x18] =  0x07
00559951      [0x19] =  0x07
00559952      [0x1a] =  0x07
00559953      [0x1b] =  0x07
00559954      [0x1c] =  0x07
00559955      [0x1d] =  0x07
00559956      [0x1e] =  0x07
00559957      [0x1f] =  0x07
00559958      [0x20] =  0x07
00559959      [0x21] =  0x07
0055995a      [0x22] =  0x07
0055995b      [0x23] =  0x07
0055995c      [0x24] =  0x07
0055995d      [0x25] =  0x07
0055995e      [0x26] =  0x07
0055995f      [0x27] =  0x07
00559960      [0x28] =  0x07
00559961      [0x29] =  0x07
00559962      [0x2a] =  0x07
00559963      [0x2b] =  0x07
00559964      [0x2c] =  0x07
00559965      [0x2d] =  0x07
00559966      [0x2e] =  0x07
00559967      [0x2f] =  0x07
00559968      [0x30] =  0x07
00559969      [0x31] =  0x07
0055996a      [0x32] =  0x07
0055996b      [0x33] =  0x07
0055996c      [0x34] =  0x07
0055996d      [0x35] =  0x07
0055996e      [0x36] =  0x07
0055996f      [0x37] =  0x07
00559970      [0x38] =  0x07
00559971      [0x39] =  0x07
00559972      [0x3a] =  0x07
00559973      [0x3b] =  0x07
00559974      [0x3c] =  0x07
00559975      [0x3d] =  0x07
00559976      [0x3e] =  0x07
00559977      [0x3f] =  0x07
00559978      [0x40] =  0x07
00559979      [0x41] =  0x07
0055997a      [0x42] =  0x07
0055997b      [0x43] =  0x07
0055997c      [0x44] =  0x07
0055997d      [0x45] =  0x07
0055997e      [0x46] =  0x07
0055997f      [0x47] =  0x07
00559980      [0x48] =  0x07
00559981      [0x49] =  0x07
00559982      [0x4a] =  0x07
00559983      [0x4b] =  0x07
00559984      [0x4c] =  0x07
00559985      [0x4d] =  0x07
00559986      [0x4e] =  0x07
00559987      [0x4f] =  0x07
00559988      [0x50] =  0x07
00559989      [0x51] =  0x07
0055998a      [0x52] =  0x07
0055998b      [0x53] =  0x07
0055998c      [0x54] =  0x07
0055998d      [0x55] =  0x07
0055998e      [0x56] =  0x07
0055998f      [0x57] =  0x07
00559990      [0x58] =  0x07
00559991      [0x59] =  0x07
00559992      [0x5a] =  0x07
00559993      [0x5b] =  0x07
00559994      [0x5c] =  0x07
00559995      [0x5d] =  0x07
00559996      [0x5e] =  0x07
00559997      [0x5f] =  0x07
00559998      [0x60] =  0x07
00559999      [0x61] =  0x07
0055999a      [0x62] =  0x07
0055999b      [0x63] =  0x07
0055999c      [0x64] =  0x07
0055999d      [0x65] =  0x07
0055999e      [0x66] =  0x07
0055999f      [0x67] =  0x07
005599a0      [0x68] =  0x07
005599a1      [0x69] =  0x07
005599a2      [0x6a] =  0x07
005599a3      [0x6b] =  0x07
005599a4      [0x6c] =  0x07
005599a5      [0x6d] =  0x07
005599a6      [0x6e] =  0x07
005599a7      [0x6f] =  0x07
005599a8      [0x70] =  0x07
005599a9      [0x71] =  0x07
005599aa      [0x72] =  0x07
005599ab      [0x73] =  0x07
005599ac      [0x74] =  0x07
005599ad      [0x75] =  0x07
005599ae      [0x76] =  0x07
005599af      [0x77] =  0x07
005599b0      [0x78] =  0x07
005599b1      [0x79] =  0x07
005599b2      [0x7a] =  0x07
005599b3      [0x7b] =  0x07
005599b4      [0x7c] =  0x07
005599b5      [0x7d] =  0x07
005599b6      [0x7e] =  0x07
005599b7      [0x7f] =  0x07
005599b8      [0x80] =  0x07
005599b9      [0x81] =  0x07
005599ba      [0x82] =  0x07
005599bb      [0x83] =  0x07
005599bc      [0x84] =  0x07
005599bd      [0x85] =  0x07
005599be      [0x86] =  0x07
005599bf      [0x87] =  0x07
005599c0      [0x88] =  0x07
005599c1      [0x89] =  0x07
005599c2      [0x8a] =  0x07
005599c3      [0x8b] =  0x07
005599c4      [0x8c] =  0x07
005599c5      [0x8d] =  0x07
005599c6      [0x8e] =  0x07
005599c7      [0x8f] =  0x06
005599c8  }

005599c8                          90 90 90 90 90 90 90 90                                                          ........

005599d0  void* __thiscall SmartBox::`scalar deleting destructor'(class SmartBox* this, uint32_t arg2)

005599d0  {
005599d3      SmartBox::~SmartBox(this);
005599d3      
005599dd      if ((arg2 & 1) != 0)
005599e0          operator delete(this);
005599e0      
005599eb      return this;
005599d0  }

005599ee                                            90 90                                                                ..

005599f0  uint32_t ATL::_AtlGetThreadACPFake()

005599f0  {
005599f4      int32_t result = 0;
00559a11      char lpLCData;
00559a11      
00559a11      if (GetLocaleInfoA(GetThreadLocale(), 0x1004, &lpLCData, 7) != 0)
00559a11      {
00559a13          int32_t eax_1;
00559a13          eax_1 = lpLCData;
00559a19          char* ecx_1 = &lpLCData;
00559a19          
00559a1d          if (eax_1 != 0)
00559a1d          {
00559a2f              do
00559a2f              {
00559a26                  ecx_1 = &ecx_1[1];
00559a27                  result = ((((int32_t)eax_1) + (result * 0xa)) - 0x30);
00559a2b                  eax_1 = *(uint8_t*)ecx_1;
00559a2f              } while (eax_1 != 0);
00559a2f              
00559a33              if (result != 0)
00559a45                  return result;
00559a1d          }
00559a11      }
00559a11      
00559a39      /* tailcall */
00559a39      return GetACP();
005599f0  }

00559a46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00559a50  uint32_t ATL::_AtlGetThreadACPThunk()
// This function has unresolved stack usage. View graph of stack usage to resolve.

00559a50  {
00559a5b      int32_t lpVersionInformation = 0x94;
00559a63      GetVersionExA(&lpVersionInformation);
00559a6e      int32_t var_84;
00559a6e      enum NodeNameType (* eax_1)(class FileNodeName_Double const* this @ ecx);
00559a6e      
00559a6e      if (var_84 == 2)
00559a75          eax_1 = FileNodeName_Double::GetType;
00559a75      
00559a7a      int32_t var_90;
00559a7a      
00559a7a      if ((var_84 != 2 || var_90 < 5))
00559a7c          eax_1 = ATL::_AtlGetThreadACPFake;
00559a7c      
00559a87      InterlockedExchange(0x81fa8c, eax_1);
00559a93      /* jump -> ATL::g_pfnGetThreadACP */
00559a50  }

00559a99                                                                             90 90 90 90 90 90 90                           .......

00559aa0  uint16_t* A2BSTR(char const* arg1)

00559aa0  {
00559aa1      ATL::g_pfnGetThreadACP();
00559aa1      
00559aad      if (arg1 == 0)
00559af6          return 0;
00559af6      
00559ab2      int32_t eax = ATL::g_pfnGetThreadACP();
00559ac4      int32_t eax_1 = kernel32_MultiByteToWideChar_Ptr(eax, 0, arg1, 0xffffffff, 0, 0);
00559ad2      BSTR result = SysAllocStringLen(nullptr, (eax_1 - 1));
00559ad2      
00559adc      if (result != 0)
00559ae6          kernel32_MultiByteToWideChar_Ptr(eax, 0, arg1, 0xffffffff, result, eax_1);
00559ae6      
00559af2      return result;
00559aa0  }

00559af7                                                                       90 90 90 90 90 90 90 90 90                         .........

00559b00  struct IACPlugin* APIManager::GetACPlugin()

00559b00  {
00559b00      class APIManager* APIManager::m_pCliAPI_1 = APIManager::m_pCliAPI;
00559b00      
00559b07      if (APIManager::m_pCliAPI_1 == 0)
00559b0e          return 0;
00559b0e      
00559b0b      return APIManager::m_pCliAPI_1->m_pPlugin;
00559b00  }

00559b0f                                               90                                                                 .

00559b10  HRESULT __stdcall APIManager::IAsheronsCallImpl::QueryInterface(class APIManager::IAsheronsCallImpl* this @ ecx, struct _GUID const* arg2, void** arg3)

00559b10  {
00559b16      if (arg_c == 0)
00559b1d          return 0x80004003;
00559b1d      
00559b27      int32_t i = 4;
00559b2c      int32_t* edi = &IID_IUnknown;
00559b31      void** esi = arg3;
00559b33      bool cond:1 = true;
00559b33      
00559b35      while (i != 0)
00559b35      {
00559b35          void* temp1_1 = *(uint32_t*)esi;
00559b35          int32_t temp2_1 = *(uint32_t*)edi;
00559b35          cond:1 = temp1_1 == temp2_1;
00559b35          esi = &esi[1];
00559b35          edi = &edi[1];
00559b35          i -= 1;
00559b35          
00559b35          if (temp1_1 != temp2_1)
00559b35              break;
00559b35      }
00559b35      
00559b37      if (!(cond:1))
00559b37      {
00559b39          void** esi_1 = arg3;
00559b3b          int32_t i_1 = 4;
00559b40          int32_t* edi_1 = &IID_IAsheronsCall;
00559b45          bool cond:3_1 = true;
00559b45          
00559b47          while (i_1 != 0)
00559b47          {
00559b47              void* temp3_1 = *(uint32_t*)esi_1;
00559b47              int32_t temp4_1 = *(uint32_t*)edi_1;
00559b47              cond:3_1 = temp3_1 == temp4_1;
00559b47              esi_1 = &esi_1[1];
00559b47              edi_1 = &edi_1[1];
00559b47              i_1 -= 1;
00559b47              
00559b47              if (temp3_1 != temp4_1)
00559b47                  break;
00559b47          }
00559b47          
00559b49          if (!(cond:3_1))
00559b49          {
00559b4d              *(uint32_t*)arg_c = 0;
00559b55              return 0x80004002;
00559b49          }
00559b37      }
00559b37      
00559b5c      *(uint32_t*)arg_c = arg2;
00559b61      *(uint32_t*)(arg2->Data1 + 4)(arg2);
00559b69      return 0;
00559b10  }

00559b6c                                      90 90 90 90                                                              ....

00559b70  uint32_t __thiscall APIManager::IAsheronsCallImpl::AddRef(class APIManager::IAsheronsCallImpl* this)

00559b70  {
00559b77      arg_4 += 4;
00559b7b      /* tailcall */
00559b7b      return InterlockedIncrement();
00559b70  }

00559b81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00559b90  HRESULT APIManager::IAsheronsCallImpl::IssueChatBarCommand(class APIManager::IAsheronsCallImpl* this @ ecx, uint16_t* arg2, int32_t const arg3) __pure

00559b90  {
00559b99      return 0x80004005;
00559b90  }

00559b9c                                                                                      90 90 90 90                              ....

00559ba0  HRESULT __stdcall APIManager::IAsheronsCallImpl::SelectItem(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2)

00559ba0  {
00559ba7      ACCWeenieObject::SetSelectedObject(arg_8, 0);
00559bb1      return 0;
00559ba0  }

00559bb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00559bc0  HRESULT __stdcall APIManager::IAsheronsCallImpl::SetSelectedObjectID(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2)

00559bc0  {
00559bc5      ACCWeenieObject::SetSelectedObjectID(arg_8);
00559bcf      return 0;
00559bc0  }

00559bd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00559be0  HRESULT __stdcall APIManager::IAsheronsCallImpl::SetPreviousSelectedItemID(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2)

00559be0  {
00559be5      ACCWeenieObject::SetPreviousSelectedObject(arg_8);
00559bef      return 0;
00559be0  }

00559bf2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00559c00  HRESULT __stdcall APIManager::IAsheronsCallImpl::GetSelectedItemID(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t* arg2)

00559c00  {
00559c0a      *(uint32_t*)arg_8 = ACCWeenieObject::selectedID;
00559c0e      return 0;
00559c00  }

00559c11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00559c20  HRESULT __stdcall APIManager::IAsheronsCallImpl::GetPreviousSelectedItemID(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t* arg2)

00559c20  {
00559c2a      *(uint32_t*)arg_8 = ACCWeenieObject::prevSelectedID;
00559c2e      return 0;
00559c20  }

00559c31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00559c40  HRESULT __stdcall APIManager::IAsheronsCallImpl::ExamineObject(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2)

00559c40  {
00559c4c      ClientUISystem::ExamineObject(ClientUISystem::GetUISystem(), arg_8);
00559c53      return 0;
00559c40  }

00559c56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00559c60  HRESULT __stdcall APIManager::IAsheronsCallImpl::UseObject(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2)

00559c60  {
00559c69      ItemHolder::UseObject(arg_8, 0, 0);
00559c73      return 0;
00559c60  }

00559c76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00559c80  HRESULT __thiscall APIManager::IAsheronsCallImpl::UseObjectOn(class APIManager::IAsheronsCallImpl* this, uint32_t const arg2, uint32_t const arg3)

00559c80  {
00559c80      class APIManager::IAsheronsCallImpl* this_1 = this;
00559c86      int32_t eax = *(uint32_t*)arg2;
00559c8e      this_1 = nullptr;
00559c96      *(uint32_t*)(eax + 0x20)(arg2, &this_1);
00559ca1      *(uint32_t*)(*(uint32_t*)arg2 + 0x18)(arg2, arg_c);
00559cad      ItemHolder::UseObject(arg3, 1, 0);
00559cbd      *(uint32_t*)(*(uint32_t*)arg2 + 0x18)(arg2, this_1);
00559cc4      return 0;
00559c80  }

00559cc7                       90 90 90 90 90 90 90 90 90                                                         .........

00559cd0  HRESULT __thiscall APIManager::IAsheronsCallImpl::UseEquippedItem(class APIManager::IAsheronsCallImpl* this, uint32_t const arg2, uint32_t const arg3)

00559cd0  {
00559cd0      class APIManager::IAsheronsCallImpl* this_1 = this;
00559cd6      int32_t eax = *(uint32_t*)arg2;
00559cde      this_1 = nullptr;
00559ce6      *(uint32_t*)(eax + 0x20)(arg2, &this_1);
00559cf1      *(uint32_t*)(*(uint32_t*)arg2 + 0x18)(arg2, arg_c);
00559cfd      ItemHolder::UseObject(arg3, 1, 1);
00559d0d      *(uint32_t*)(*(uint32_t*)arg2 + 0x18)(arg2, this_1);
00559d14      return 0;
00559cd0  }

00559d17                                                                       90 90 90 90 90 90 90 90 90                         .........

00559d20  HRESULT __stdcall APIManager::IAsheronsCallImpl::ChangeCombatMode(class APIManager::IAsheronsCallImpl* this @ ecx, enum eCombatMode const arg2)

00559d20  {
00559d36      if ((arg_8 != 1 && (arg_8 != 2 && (arg_8 != 4 && arg_8 != 8))))
00559d3d          return 0x8000ffff;
00559d3d      
00559d47      if (APIManager::m_UIReady != 0)
00559d47      {
00559d49          class ClientUISystem* eax_2 = ClientUISystem::GetUISystem();
00559d4e          int32_t eax_3 = -(eax_2);
00559d52          int32_t eax_5 = -((eax_3 - eax_3));
00559d54          arg_8 = eax_5;
00559d54          
00559d58          if (eax_5 != 0)
00559d5c              return 0;
00559d47      }
00559d47      
00559d64      return 0x80004005;
00559d20  }

00559d67                       90 90 90 90 90 90 90 90 90                                                         .........

00559d70  HRESULT __stdcall APIManager::IAsheronsCallImpl::MoveItemExternal(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2, uint32_t const arg3, int32_t const arg4)

00559d70  {
00559d7f      int32_t eax = ItemHolder::AttemptPlaceIn3D(arg3, arg4, arg_10);
00559d87      int32_t eax_1 = -(eax);
00559d8c      return ((eax_1 - eax_1) + 1);
00559d70  }

00559d8f                                               90                                                                 .

00559d90  HRESULT __stdcall APIManager::IAsheronsCallImpl::MoveItemInternal(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2, uint32_t const arg3, int32_t const arg4, int32_t const arg5)

00559d90  {
00559da6      int32_t eax_1 = ItemHolder::AttemptToPlaceInContainer(arg3, arg4, 0, arg_14, arg5);
00559dae      int32_t eax_2 = -(eax_1);
00559db3      return ((eax_2 - eax_2) + 1);
00559d90  }

00559db6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00559dc0  HRESULT __thiscall APIManager::IAsheronsCallImpl::CastSpell(class APIManager::IAsheronsCallImpl* this, uint32_t const arg2, uint32_t const arg3)

00559dc0  {
00559dc0      class APIManager::IAsheronsCallImpl* this_1 = this;
00559dc0      
00559dc9      if (APIManager::m_UIReady != 0)
00559dc9      {
00559dcb          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
00559dd0          int32_t eax_2 = -(eax_1);
00559dd4          int32_t this_2 = -((eax_2 - eax_2));
00559dd6          this_1 = this_2;
00559dd6          
00559dda          if (this_2 != 0)
00559dda          {
00559ddc              uint32_t const esi_1 = arg2;
00559de0              int32_t eax_4 = *(uint32_t*)esi_1;
00559de8              this_1 = nullptr;
00559df0              *(uint32_t*)(eax_4 + 0x3c)(esi_1, &this_1);
00559df0              
00559df8              if (this_1 == 8)
00559df8              {
00559dfa                  int32_t edx = *(uint32_t*)esi_1;
00559e02                  arg2 = 0;
00559e0a                  *(uint32_t*)(edx + 0x20)(esi_1, &arg2);
00559e15                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x18)(esi_1, arg_c);
00559e20                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x18)(esi_1, arg2);
00559e27                  return 0;
00559df8              }
00559dda          }
00559dc9      }
00559dc9      
00559e31      return 0x80004005;
00559dc0  }

00559e34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00559e40  HRESULT CPosPassThru::GetMediaTime(class CPosPassThru* this @ ecx, int64_t* arg2, int64_t* arg3) __pure

00559e40  {
00559e45      return 0x80004005;
00559e40  }

00559e48                          90 90 90 90 90 90 90 90                                                          ........

00559e50  HRESULT APIManager::IAsheronsCallImpl::SalvagePanel_Clear(class APIManager::IAsheronsCallImpl* this @ ecx) __pure

00559e50  {
00559e55      return 0x80004005;
00559e50  }

00559e58                                                                          90 90 90 90 90 90 90 90                          ........

00559e60  HRESULT __stdcall APIManager::IAsheronsCallImpl::IsStandingStill(class APIManager::IAsheronsCallImpl* this @ ecx, int32_t* arg2)

00559e60  {
00559e60      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559e60      
00559e67      if (SmartBox::smartbox_1 != 0)
00559e67      {
00559e69          class CommandInterpreter* cmdinterp = SmartBox::smartbox_1->cmdinterp;
00559e69          
00559e71          if (cmdinterp != 0)
00559e71          {
00559e7f              *(uint32_t*)arg_8 = cmdinterp->vtable->IsStandingStill();
00559e83              return 0;
00559e71          }
00559e67      }
00559e67      
00559e8b      return 0x80004005;
00559e60  }

00559e8e                                            90 90                                                                ..

00559e90  HRESULT APIManager::IAsheronsCallImpl::StopCompletely(class APIManager::IAsheronsCallImpl* this @ ecx)

00559e90  {
00559e90      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559e90      
00559e97      if (SmartBox::smartbox_1 != 0)
00559e97      {
00559e99          class CommandInterpreter* cmdinterp = SmartBox::smartbox_1->cmdinterp;
00559e99          
00559ea1          if ((cmdinterp != 0 && cmdinterp->vtable->StopCompletely() != 0))
00559eb1              return 0;
00559e97      }
00559e97      
00559eb9      return 0x80004005;
00559e90  }

00559ebc                                                                                      90 90 90 90                              ....

00559ec0  HRESULT __stdcall APIManager::IAsheronsCallImpl::TurnToHeading(class APIManager::IAsheronsCallImpl* this @ ecx, float const arg2)

00559ec0  {
00559ec0      long double x87_r7 = ((long double)arg_8);
00559ec4      long double temp1 = ((long double)0f);
00559ec4      (x87_r7 - temp1);
00559eca      int32_t eax;
00559eca      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
00559ecc      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00559ecc      
00559ecf      if (p)
00559ecf      {
00559ed1          long double x87_r7_1 = ((long double)360f);
00559ed7          long double temp2_1 = ((long double)arg_8);
00559ed7          (x87_r7_1 - temp2_1);
00559edb          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00559edd          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00559edd          
00559ee0          if (p_1)
00559ee0          {
00559ee2              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559ee2              
00559ef3              if ((SmartBox::smartbox_1 != 0 && SmartBox::smartbox_1->cmdinterp != 0))
00559ef3              {
00559efc                  *(uint32_t*)(*(uint32_t*)arg2 + 0x5c)(arg2);
00559eff                  SmartBox::smartbox->cmdinterp->vtable->TurnToHeading(arg_8, 0);
00559f1c                  return 0;
00559ef3              }
00559ee0          }
00559ecf      }
00559ecf      
00559f24      return 0x80004005;
00559ec0  }

00559f27                       90 90 90 90 90 90 90 90 90                                                         .........

00559f30  HRESULT __stdcall APIManager::IAsheronsCallImpl::SetAutoRun(class APIManager::IAsheronsCallImpl* this @ ecx, int32_t const arg2)

00559f30  {
00559f30      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00559f30      
00559f37      if (SmartBox::smartbox_1 != 0)
00559f37      {
00559f39          class CommandInterpreter* cmdinterp = SmartBox::smartbox_1->cmdinterp;
00559f39          
00559f41          if (cmdinterp != 0)
00559f41          {
00559f43              cmdinterp->vtable->SetAutoRun(arg_8, 1);
00559f43              
00559f56              if (arg_8 == 0)
00559f5f                  *(uint32_t*)(*(uint32_t*)arg2 + 0x5c)(arg2);
00559f5f              
00559f64              return 0;
00559f41          }
00559f37      }
00559f37      
00559f6c      return 0x80004005;
00559f30  }

00559f6f                                               90                                                                 .

00559f70  HRESULT CBaseInputPin::GetAllocatorRequirements(class CBaseInputPin* this @ ecx, struct _AllocatorProperties* arg2) __pure

00559f70  {
00559f75      return 0x80004001;
00559f70  }

00559f78                                                                          90 90 90 90 90 90 90 90                          ........

00559f80  HRESULT __stdcall APIManager::IAsheronsCallImpl::GetCurCoords(class APIManager::IAsheronsCallImpl* this @ ecx, double* arg2, double* arg3)

00559f80  {
00559f80      class APIManager::IAsheronsCallImpl* this_1 = this;
00559f80      
00559f88      if (APIManager::m_UIReady != 0)
00559f88      {
00559f8a          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
00559f8f          int32_t eax_2 = -(eax_1);
00559f93          int32_t this_2 = -((eax_2 - eax_2));
00559f95          this_1 = this_2;
00559f95          
00559f99          if (this_2 != 0)
00559f99          {
00559f9b              class CPlayerSystem* eax_4 = CPlayerSystem::GetPlayerSystem();
00559f9b              
00559fa2              if (eax_4 != 0)
00559fa2              {
00559fb9                  int32_t eax_6 = CPlayerSystem::InqPlayerCoords(eax_4, arg3, arg_c);
00559fbe                  char temp2 = eax_6;
00559fbe                  eax_6 = -(eax_6);
00559fc4                  return ((eax_6 - eax_6) + 1);
00559fa2              }
00559f99          }
00559f88      }
00559f88      
00559faa      return 0x80004005;
00559f80  }

00559fc7                       90 90 90 90 90 90 90 90 90                                                         .........

00559fd0  HRESULT APIManager::IAsheronsCallImpl::GetCurLoc(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t* arg2, float* arg3, float* arg4, float* arg5, float* arg6)

00559fd0  {
00559fd0      class APIManager::IAsheronsCallImpl* this_1 = this;
00559fd0      
00559fd8      if (APIManager::m_UIReady != 0)
00559fd8      {
00559fda          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
00559fdf          int32_t eax_2 = -(eax_1);
00559fe5          this_1 = -((eax_2 - eax_2));
00559fd8      }
00559fd8      
00559fef      return 0x80004005;
00559fd0  }

00559ff2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0055a000  HRESULT __stdcall APIManager::IAsheronsCallImpl::GetPlayerID(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t* arg2)

0055a000  {
0055a000      class APIManager::IAsheronsCallImpl* this_1 = this;
0055a000      
0055a008      if (APIManager::m_UIReady != 0)
0055a008      {
0055a00a          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
0055a00f          int32_t eax_2 = -(eax_1);
0055a013          int32_t this_2 = -((eax_2 - eax_2));
0055a015          this_1 = this_2;
0055a015          
0055a019          if (this_2 != 0)
0055a019          {
0055a01b              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0055a01b              
0055a022              if (SmartBox::smartbox_1 != 0)
0055a022              {
0055a02e                  *(uint32_t*)arg_8 = SmartBox::smartbox_1->player_id;
0055a033                  return 0;
0055a022              }
0055a022              
0055a03c              *(uint32_t*)arg_8 = 0;
0055a03f              return SmartBox::smartbox_1;
0055a019          }
0055a008      }
0055a008      
0055a048      return 0x80004005;
0055a000  }

0055a04b                                   90 90 90 90 90                                                             .....

0055a050  HRESULT APIManager::IAsheronsCallImpl::GetCombatMode(class APIManager::IAsheronsCallImpl* this @ ecx, enum eCombatMode* arg2)

0055a050  {
0055a050      class APIManager::IAsheronsCallImpl* this_1 = this;
0055a050      
0055a058      if (APIManager::m_UIReady != 0)
0055a058      {
0055a05a          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
0055a05f          int32_t eax_2 = -(eax_1);
0055a063          int32_t this_2 = -((eax_2 - eax_2));
0055a065          this_1 = this_2;
0055a065          
0055a069          if (this_2 != 0)
0055a06e              return 0;
0055a058      }
0055a058      
0055a077      return 0x80004005;
0055a050  }

0055a07a                                                                                90 90 90 90 90 90                            ......

0055a080  HRESULT __stdcall APIManager::IAsheronsCallImpl::GetGroundContainerID(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t* arg2)

0055a080  {
0055a080      class APIManager::IAsheronsCallImpl* this_1 = this;
0055a080      
0055a088      if (APIManager::m_UIReady != 0)
0055a088      {
0055a08a          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
0055a08f          int32_t eax_2 = -(eax_1);
0055a093          int32_t this_2 = -((eax_2 - eax_2));
0055a095          this_1 = this_2;
0055a095          
0055a099          if (this_2 != 0)
0055a099          {
0055a0a7              *(uint32_t*)arg_8 = ClientUISystem::GetUISystem()->groundObject;
0055a0ac              return 0;
0055a099          }
0055a088      }
0055a088      
0055a0b5      return 0x80004005;
0055a080  }

0055a0b8                                                                          90 90 90 90 90 90 90 90                          ........

0055a0c0  HRESULT APIManager::IAsheronsCallImpl::TradeWindow_Clear(class APIManager::IAsheronsCallImpl* this @ ecx)

0055a0c0  {
0055a0c0      CM_Trade::Event_ResetTrade();
0055a0c7      return 0;
0055a0c0  }

0055a0ca                                90 90 90 90 90 90                                                            ......

0055a0d0  HRESULT APIManager::IAsheronsCallImpl::EndCharacterSession(class APIManager::IAsheronsCallImpl* this @ ecx)

0055a0d0  {
0055a0d0      class APIManager::IAsheronsCallImpl* this_1 = this;
0055a0d0      
0055a0d8      if (APIManager::m_UIReady != 0)
0055a0d8      {
0055a0da          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
0055a0df          int32_t eax_2 = -(eax_1);
0055a0e3          int32_t this_2 = -((eax_2 - eax_2));
0055a0e5          this_1 = this_2;
0055a0e5          
0055a0e9          if (this_2 != 0)
0055a0e9          {
0055a0f4              CPlayerSystem::LogOffCharacter(CPlayerSystem::GetPlayerSystem(), 0);
0055a0fc              return 0;
0055a0e9          }
0055a0d8      }
0055a0d8      
0055a105      return 0x80004005;
0055a0d0  }

0055a108                          90 90 90 90 90 90 90 90                                                          ........

0055a110  HRESULT __stdcall APIManager::IAsheronsCallImpl::BeginCharacterSession(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t arg2)

0055a110  {
0055a110      class APIManager::IAsheronsCallImpl* this_1 = this;
0055a110      
0055a118      if (APIManager::m_UIReady != 0)
0055a118      {
0055a11a          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
0055a11f          int32_t eax_2 = -(eax_1);
0055a123          int32_t this_2 = -((eax_2 - eax_2));
0055a125          this_1 = this_2;
0055a125          
0055a129          if (this_2 != 0)
0055a129          {
0055a137              int32_t eax_6 = CPlayerSystem::LogOnCharacter(CPlayerSystem::GetPlayerSystem(), arg_8);
0055a13c              char temp2 = eax_6;
0055a13c              eax_6 = -(eax_6);
0055a142              return ((eax_6 - eax_6) + 1);
0055a129          }
0055a118      }
0055a118      
0055a14b      return 0x80004005;
0055a110  }

0055a14e                                            90 90                                                                ..

0055a150  HRESULT __stdcall APIManager::IAsheronsCallImpl::GetScreenDimensions(class APIManager::IAsheronsCallImpl* this @ ecx, int32_t* arg2, int32_t* arg3)

0055a150  {
0055a15f      *(uint32_t*)arg3 = RenderDevice::GetDisplayWidth(RenderDevice::render_device);
0055a170      *(uint32_t*)arg_c = RenderDevice::GetDisplayHeight(RenderDevice::render_device);
0055a174      return 0;
0055a150  }

0055a177                                                                       90 90 90 90 90 90 90 90 90                         .........

0055a180  HRESULT __stdcall APIManager::IAsheronsCallImpl::ItemIsKnown(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2, int32_t* arg3)

0055a180  {
0055a180      class APIManager::IAsheronsCallImpl* var_4 = this;
0055a181      int32_t APIManager::m_UIReady_1 = APIManager::m_UIReady;
0055a181      
0055a188      if (APIManager::m_UIReady_1 != 0)
0055a188      {
0055a18a          class ClientUISystem* eax = ClientUISystem::GetUISystem();
0055a18f          int32_t eax_1 = -(eax);
0055a193          APIManager::m_UIReady_1 = -((eax_1 - eax_1));
0055a195          var_4 = APIManager::m_UIReady_1;
0055a195          
0055a199          if (APIManager::m_UIReady_1 != 0)
0055a199          {
0055a1a0              class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(arg3);
0055a1ac              int32_t eax_5 = -(eax_4);
0055a1b2              *(uint32_t*)arg_c = -((eax_5 - eax_5));
0055a1b7              return 0;
0055a199          }
0055a188      }
0055a188      
0055a1c0      *(uint32_t*)arg_c = 0;
0055a1c3      return APIManager::m_UIReady_1;
0055a180  }

0055a1c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0055a1d0  uint32_t __stdcall APIManager::IAsheronsCallImpl::Release(class APIManager::IAsheronsCallImpl* this @ ecx)

0055a1d0  {
0055a1da      int32_t result = InterlockedDecrement(&arg_4[1]);
0055a1da      
0055a1e8      if ((result == 0 && arg_4 != 0))
0055a1e8      {
0055a1eb          *(uint32_t*)arg_4 = 0x7cc0f8;
0055a1f1          operator delete(arg_4);
0055a1e8      }
0055a1e8      
0055a1fd      return result;
0055a1d0  }


0055a200  HRESULT __stdcall APIManager::IAsheronsCallImpl::GetItemName(class APIManager::IAsheronsCallImpl* this @ ecx, uint32_t const arg2, uint16_t** arg3)

0055a200  {
0055a200      class APIManager::IAsheronsCallImpl* this_1 = this;
0055a200      
0055a209      if (APIManager::m_UIReady != 0)
0055a209      {
0055a20b          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
0055a210          int32_t eax_2 = -(eax_1);
0055a214          int32_t this_2 = -((eax_2 - eax_2));
0055a216          this_1 = this_2;
0055a216          
0055a21a          if (this_2 != 0)
0055a21a          {
0055a221              class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(arg3);
0055a221              
0055a22d              if (eax_5 == 0)
0055a27e                  return 1;
0055a27e              
0055a230              ATL::g_pfnGetThreadACP();
0055a236              class AC1Legacy::PSRefBuffer<char>* m_buffer = eax_5->pwd._name.m_buffer;
0055a240              InterlockedIncrement(&m_buffer->m_cRef);
0055a257              *(uint32_t*)arg_c = A2BSTR(&m_buffer->m_data);
0055a257              
0055a266              if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0055a268                  m_buffer->vtable->__vecDelDtor(1);
0055a268              
0055a274              return 0;
0055a21a          }
0055a209      }
0055a209      
0055a288      return 0x80004005;
0055a200  }

0055a28b                                   90 90 90 90 90                                                             .....

0055a290  struct IAsheronsCall* __fastcall APIManager::GetAsheronsCallImpl(class APIManager* this)

0055a290  {
0055a293      struct IAsheronsCall* m_pAsheronsCallImpl = this->m_pAsheronsCallImpl;
0055a293      
0055a298      if (m_pAsheronsCallImpl == 0)
0055a298      {
0055a29c          m_pAsheronsCallImpl = operator new(8);
0055a29c          
0055a2a6          if (m_pAsheronsCallImpl != 0)
0055a2a6          {
0055a2a8              m_pAsheronsCallImpl->vtable = 0x7cc0f8;
0055a2ae              this->m_pAsheronsCallImpl = m_pAsheronsCallImpl;
0055a2b2              return m_pAsheronsCallImpl;
0055a2a6          }
0055a2a6          
0055a2b5          this->m_pAsheronsCallImpl = nullptr;
0055a298      }
0055a298      
0055a2b9      return m_pAsheronsCallImpl;
0055a290  }

0055a2ba                                                                                90 90 90 90 90 90                            ......

0055a2c0  int32_t APIManager::Init()

0055a2c0  {
0055a2c3      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0055a2ca      class PSRefBufferCharData<char>* lpLibFileName = PStringBase<char>::s_NullBuffer_1;
0055a2d3      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0055a2e2      class PStringBase<char> var_c;
0055a2e2      PStringBase<char>::PStringBase<char>(&var_c, "ACPlugin");
0055a303      int32_t ebx;
0055a303      ebx = ClientRegKey::GetClientOptions(&var_c, &lpLibFileName);
0055a305      char temp0 = ebx;
0055a305      ebx = -(ebx);
0055a307      ebx = (ebx - ebx);
0055a309      int32_t* esi_1 = (var_c - 0x14);
0055a310      ebx += 1;
0055a310      
0055a31a      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0055a322          **(uint32_t**)esi_1(1);
0055a322      
0055a326      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3;
0055a326      bool cond:0_1;
0055a326      
0055a326      if (ebx == 0)
0055a326      {
0055a342          HINSTANCE eax_6 = LoadLibraryA(lpLibFileName);
0055a342          
0055a34c          if (eax_6 != 0)
0055a34c          {
0055a37a              int32_t eax_9 = kernel32_GetProcAddress_Ptr(eax_6, "CreateACPlugin");
0055a37a              
0055a384              if (eax_9 != 0)
0055a384              {
0055a3ac                  class APIManager* APIManager::m_pCliAPI_1 = APIManager::m_pCliAPI;
0055a3ac                  
0055a3b3                  if (APIManager::m_pCliAPI_1 == 0)
0055a3b3                  {
0055a3b7                      APIManager::m_pCliAPI_1 = operator new(8);
0055a3b7                      
0055a3c1                      if (APIManager::m_pCliAPI_1 == 0)
0055a3ca                          APIManager::m_pCliAPI_1 = nullptr;
0055a3c1                      else
0055a3c1                      {
0055a3c3                          APIManager::m_pCliAPI_1->m_pPlugin = 0;
0055a3c5                          APIManager::m_pCliAPI_1->m_pAsheronsCallImpl = nullptr;
0055a3c1                      }
0055a3c1                      
0055a3cc                      APIManager::m_pCliAPI = APIManager::m_pCliAPI_1;
0055a3b3                  }
0055a3b3                  
0055a3d3                  int32_t var_8 = 0;
0055a3dc                  struct IAsheronsCall* var_4 = APIManager::GetAsheronsCallImpl(APIManager::m_pCliAPI_1);
0055a3ea                  eax_9(&var_4, &var_8);
0055a3ec                  class APIManager* APIManager::m_pCliAPI_2 = APIManager::m_pCliAPI;
0055a3ec                  
0055a3f8                  if (APIManager::m_pCliAPI_2->m_pPlugin == 0)
0055a3fe                      APIManager::m_pCliAPI_2->m_pPlugin = var_8;
0055a3fe                  
0055a404                  void* __offset(PSRefBufferCharData<char>, -0x14) esi_9 = &lpLibFileName->m_data[0xffffffec];
0055a404                  
0055a413                  if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
0055a41b                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
0055a41b                  
0055a428                  return 1;
0055a384              }
0055a384              
0055a38a              esi_3 = &lpLibFileName->m_data[0xffffffec];
0055a38a              
0055a395              if (InterlockedDecrement(((char*)esi_3 + 4)) == 0)
0055a395              {
0055a397                  cond:0_1 = esi_3 == 0;
0055a397                  goto label_55a399;
0055a395              }
0055a34c          }
0055a34c          else
0055a34c          {
0055a352              void* __offset(PSRefBufferCharData<char>, -0x14) esi_5 = &lpLibFileName->m_data[0xffffffec];
0055a352              
0055a361              if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0055a369                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0055a34c          }
0055a326      }
0055a326      else
0055a326      {
0055a32c          esi_3 = &lpLibFileName->m_data[0xffffffec];
0055a32c          
0055a337          if (InterlockedDecrement(((char*)esi_3 + 4)) == 0)
0055a337          {
0055a339              cond:0_1 = esi_3 == 0;
0055a399          label_55a399:
0055a399              
0055a399              if (!(cond:0_1))
0055a3a1                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0055a337          }
0055a326      }
0055a3ab      return 0;
0055a2c0  }

0055a429                             90 90 90 90 90 90 90                                                           .......

0055a430  void APIManager::SetUIReady(int32_t arg1)

0055a430  {
0055a437      if (arg1 == 0)
0055a437      {
0055a439          class APIManager* APIManager::m_pCliAPI_1 = APIManager::m_pCliAPI;
0055a439          
0055a448          if ((APIManager::m_pCliAPI_1 != 0 && APIManager::m_pCliAPI_1->m_pAsheronsCallImpl != 0))
0055a44a              APIManager::GetAsheronsCallImpl(APIManager::m_pCliAPI_1);
0055a437      }
0055a437      
0055a44f      APIManager::m_UIReady = arg1;
0055a430  }

0055a457                                                                       90 90 90 90 90 90 90 90 90                         .........

0055a460  int32_t APIManager::APIIsReady()

0055a460  {
0055a460      class APIManager* APIManager::m_pCliAPI_1 = APIManager::m_pCliAPI;
0055a460      
0055a46c      if ((APIManager::m_pCliAPI_1 != 0 && APIManager::m_pCliAPI_1->m_pPlugin != 0))
0055a46c      {
0055a472          struct IAsheronsCall* m_pAsheronsCallImpl = APIManager::m_pCliAPI_1->m_pAsheronsCallImpl;
0055a472          
0055a476          if (m_pAsheronsCallImpl == 0)
0055a476          {
0055a47a              m_pAsheronsCallImpl = operator new(8);
0055a47a              
0055a484              if (m_pAsheronsCallImpl == 0)
0055a48e                  m_pAsheronsCallImpl = nullptr;
0055a484              else
0055a486                  m_pAsheronsCallImpl->vtable = 0x7cc0f8;
0055a486              
0055a46f              APIManager::m_pCliAPI_1->m_pAsheronsCallImpl = m_pAsheronsCallImpl;
0055a476          }
0055a476          
0055a495          if (m_pAsheronsCallImpl != 0)
0055a49c              return 1;
0055a46c      }
0055a46c      
0055a49f      return 0;
0055a460  }


0055a4a0  HRESULT __stdcall APIManager::IAsheronsCallImpl::WriteToChat(class APIManager::IAsheronsCallImpl* this @ ecx, uint16_t* arg2, enum eChatTypes const arg3)

0055a4a0  {
0055a4a0      class APIManager::IAsheronsCallImpl* this_1 = this;
0055a4a0      
0055a4a8      if (APIManager::m_UIReady != 0)
0055a4a8      {
0055a4aa          class ClientUISystem* eax_1 = ClientUISystem::GetUISystem();
0055a4af          int32_t eax_2 = -(eax_1);
0055a4b3          int32_t this_2 = -((eax_2 - eax_2));
0055a4b5          this_1 = this_2;
0055a4b5          
0055a4b9          if (this_2 != 0)
0055a4b9          {
0055a4c5              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, arg3);
0055a4df              ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &arg3, arg_c, 0, 0);
0055a4e8              int32_t* esi_1 = (arg3 - 0x14);
0055a4e8              
0055a4fb              if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0055a503                  **(uint32_t**)esi_1(1);
0055a503              
0055a509              return 0;
0055a4b9          }
0055a4a8      }
0055a4a8      
0055a512      return 0x80004005;
0055a4a0  }

0055a515                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0055a520  void __fastcall AllegianceProfile::~AllegianceProfile(class AllegianceProfile* this)

0055a520  {
0055a526      AllegianceHierarchy::~AllegianceHierarchy(&this->_allegiance);
0055a52b      this->vtable = 0x79285c;
0055a520  }

0055a533                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0055a540  void __fastcall PageData::~PageData(class PageData* this)

0055a540  {
0055a54b      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->pageText.m_buffer;
0055a552      this->vtable = 0x7cc420;
0055a552      
0055a560      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0055a562          m_buffer->vtable->__vecDelDtor(1);
0055a562      
0055a56a      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->authorAccount.m_buffer;
0055a56a      
0055a579      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
0055a57b          m_buffer_1->vtable->__vecDelDtor(1);
0055a57b      
0055a583      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->authorName.m_buffer;
0055a583      
0055a592      if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
0055a594          m_buffer_2->vtable->__vecDelDtor(1);
0055a594      
0055a59d      this->vtable = 0x79285c;
0055a540  }

0055a5a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0055a5b0  void* __thiscall PageData::`scalar deleting destructor'(class PageData* this, uint32_t arg2)

0055a5b0  {
0055a5b3      PageData::~PageData(this);
0055a5b3      
0055a5bd      if ((arg2 & 1) != 0)
0055a5c0          operator delete(this);
0055a5c0      
0055a5cb      return this;
0055a5b0  }

0055a5ce                                            90 90                                                                ..

0055a5d0  class TResult* __thiscall UIQueueManager::QueryInterface(class UIQueueManager* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

0055a5d0  {
0055a5e3      int32_t* key;
0055a5e3      
0055a5e3      if ((1 & (*(uint8_t*)$S127)) != 0)
0055a631          key = Offsets[0].key;
0055a5e3      else
0055a5e3      {
0055a5ed          key = &UIQueueManager_InterfaceType;
0055a5f2          $S127 |= 1;
0055a5f8          Offsets[0].key = 0x7cc3b8;
0055a5fd          Offsets[0].ofs = 0;
0055a603          Offsets[1].key = 0x7cc2b8;
0055a60d          Offsets[1].ofs = 0;
0055a613          Offsets[2].key = 0x7cc3d0;
0055a61d          Offsets[2].ofs = 0;
0055a623          Offsets[3].key = 0;
0055a629          Offsets[3].ofs = 0;
0055a5e3      }
0055a5e3      
0055a638      void* edx_3 = &Offsets;
0055a638      
0055a63d      while (key != 0)
0055a63d      {
0055a65f          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0055a65f          {
0055a682              if (arg4 != 0)
0055a682              {
0055a684                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0055a68e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
0055a691                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
0055a682              }
0055a682              
0055a69a              __return->m_val = 0;
0055a69d              return __return;
0055a65f          }
0055a65f          
0055a661          key = *(uint32_t*)((char*)edx_3 + 8);
0055a664          edx_3 += 8;
0055a63d      }
0055a63d      
0055a672      __return->m_val = 0x80004002;
0055a679      return __return;
0055a5d0  }


0055a6a0  void __fastcall UIQueueManager::OnBeginCharacterSession(class UIQueueManager* this)

0055a6a0  {
0055a6a7      int32_t i = 0;
0055a6a7      
0055a6ab      if (this->m_rgSystems.m_num > 0)
0055a6ab      {
0055a6c1          do
0055a6c1          {
0055a6b0              this->m_rgSystems.m_data[i]->vtable->OnBeginCharacterSession();
0055a6be              i += 1;
0055a6c1          } while (i < this->m_rgSystems.m_num);
0055a6ab      }
0055a6a0  }

0055a6c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0055a6d0  void __fastcall UIQueueManager::OnEndCharacterSession(class UIQueueManager* this)

0055a6d0  {
0055a6d7      int32_t i = 0;
0055a6d7      
0055a6db      if (this->m_rgSystems.m_num > 0)
0055a6db      {
0055a6f1          do
0055a6f1          {
0055a6e0              this->m_rgSystems.m_data[i]->vtable->OnEndCharacterSession();
0055a6ee              i += 1;
0055a6f1          } while (i < this->m_rgSystems.m_num);
0055a6db      }
0055a6d0  }

0055a6f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0055a700  void __fastcall UIQueueManager::OnShutdown(class UIQueueManager* this)

0055a700  {
0055a70a      int32_t i = 0;
0055a70a      
0055a70e      if (this->m_rgSystems.m_num > 0)
0055a70e      {
0055a721          do
0055a721          {
0055a710              this->m_rgSystems.m_data[i]->vtable->OnShutdown();
0055a71e              i += 1;
0055a721          } while (i < this->m_rgSystems.m_num);
0055a70e      }
0055a70e      
0055a723      class ClientMagicSystem* m_pMagicSystem = this->m_pMagicSystem;
0055a723      
0055a728      if (m_pMagicSystem != 0)
0055a728      {
0055a72a          m_pMagicSystem->vtable->Release();
0055a72f          this->m_pMagicSystem = nullptr;
0055a728      }
0055a728      
0055a732      class ClientCommunicationSystem* m_pCommunicationSystem = this->m_pCommunicationSystem;
0055a732      
0055a737      if (m_pCommunicationSystem != 0)
0055a737      {
0055a739          m_pCommunicationSystem->vtable->Release();
0055a73e          this->m_pCommunicationSystem = nullptr;
0055a737      }
0055a737      
0055a741      class ClientObjMaintSystem* m_pObjMaintSystem = this->m_pObjMaintSystem;
0055a741      
0055a746      if (m_pObjMaintSystem != 0)
0055a746      {
0055a748          m_pObjMaintSystem->vtable->Release();
0055a74d          this->m_pObjMaintSystem = nullptr;
0055a746      }
0055a746      
0055a750      class ClientUISystem* m_pUISystem = this->m_pUISystem;
0055a750      
0055a755      if (m_pUISystem != 0)
0055a755      {
0055a757          m_pUISystem->vtable->Release();
0055a75c          this->m_pUISystem = nullptr;
0055a755      }
0055a755      
0055a75f      class ClientAllegianceSystem* m_pAllegianceSystem = this->m_pAllegianceSystem;
0055a75f      
0055a764      if (m_pAllegianceSystem != 0)
0055a764      {
0055a766          m_pAllegianceSystem->vtable->Release();
0055a76b          this->m_pAllegianceSystem = nullptr;
0055a764      }
0055a764      
0055a76e      class ClientFellowshipSystem* m_pFellowshipSystem = this->m_pFellowshipSystem;
0055a76e      
0055a773      if (m_pFellowshipSystem != 0)
0055a773      {
0055a775          m_pFellowshipSystem->vtable->Release();
0055a77a          this->m_pFellowshipSystem = nullptr;
0055a773      }
0055a773      
0055a77d      class CPlayerSystem* m_pPlayerSystem = this->m_pPlayerSystem;
0055a77d      
0055a782      if (m_pPlayerSystem != 0)
0055a782      {
0055a784          m_pPlayerSystem->vtable->Release();
0055a789          this->m_pPlayerSystem = nullptr;
0055a782      }
0055a782      
0055a78c      class ClientHousingSystem* m_pHousingSystem = this->m_pHousingSystem;
0055a78c      
0055a791      if (m_pHousingSystem != 0)
0055a791      {
0055a793          m_pHousingSystem->vtable->Release();
0055a798          this->m_pHousingSystem = nullptr;
0055a791      }
0055a791      
0055a79b      class ClientMiniGameSystem* m_pMiniGameSystem = this->m_pMiniGameSystem;
0055a79b      
0055a7a0      if (m_pMiniGameSystem != 0)
0055a7a0      {
0055a7a2          m_pMiniGameSystem->vtable->Release();
0055a7a7          this->m_pMiniGameSystem = nullptr;
0055a7a0      }
0055a7a0      
0055a7aa      class ClientAdminSystem* m_pAdminSystem = this->m_pAdminSystem;
0055a7aa      
0055a7af      if (m_pAdminSystem != 0)
0055a7af      {
0055a7b1          m_pAdminSystem->vtable->Release();
0055a7b6          this->m_pAdminSystem = nullptr;
0055a7af      }
0055a7af      
0055a7b9      class ClientCombatSystem* m_pCombatSystem = this->m_pCombatSystem;
0055a7b9      
0055a7be      if (m_pCombatSystem != 0)
0055a7be      {
0055a7c0          m_pCombatSystem->vtable->Release();
0055a7c5          this->m_pCombatSystem = nullptr;
0055a7be      }
0055a7be      
0055a7c8      class ClientTradeSystem* m_pTradeSystem = this->m_pTradeSystem;
0055a7c8      
0055a7cd      if (m_pTradeSystem != 0)
0055a7cd      {
0055a7cf          m_pTradeSystem->vtable->Release();
0055a7d4          this->m_pTradeSystem = nullptr;
0055a7cd      }
0055a7cd      
0055a7dc      /* tailcall */
0055a7dc      return IQueuedUIEventDeliverer::OnShutdown(this);
0055a700  }

0055a7e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0055a7f0  void __fastcall UIQueueManager::CrucialOrderedEventsReceived(class UIQueueManager* this)

0055a7f0  {
0055a7f6      bool cond:0 = this->m_rgWaitingBlobs.head_ == 0;
0055a7f8      this->m_fCrucialOrderedEventsReceived = 1;
0055a7f8      
0055a7fc      if (!(cond:0))
0055a7fc      {
0055a84c          do
0055a84c          {
0055a806              class NIListElement<NetBlob *>* head_ = this->m_rgWaitingBlobs.head_;
0055a80b              class NetBlob* data_;
0055a80b              
0055a80b              if (head_ != 0)
0055a80b              {
0055a811                  class NIListElement<NetBlob *>* next_ = head_->next_;
0055a816                  this->m_rgWaitingBlobs.head_ = next_;
0055a816                  
0055a819                  if (next_ == 0)
0055a81b                      this->m_rgWaitingBlobs.tail_ = next_;
0055a81b                  
0055a81e                  data_ = head_->data_;
0055a821                  operator delete(head_);
0055a80b              }
0055a80b              else
0055a80d                  data_ = nullptr;
0055a80d              
0055a829              this->vtable->ProcessEphemeralNetBlob(data_);
0055a829              
0055a83d              if ((InterlockedDecrement(&data_->m_cRef) == 0 && data_ != 0))
0055a83f                  data_->vtable->__vecDelDtor(1);
0055a84c          } while (this->m_rgWaitingBlobs.head_ != 0);
0055a7fc      }
0055a7f0  }

0055a852                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0055a860  void __thiscall UIQueueManager::UIQueueManager(class UIQueueManager* this, class NIList<NetBlob *>* arg2)

0055a860  {
0055a863      IQueuedUIEventDeliverer::IQueuedUIEventDeliverer(this);
0055a86e      this->vtable = 0x7cc434;
0055a874      this->m_cTurbineRefCount.m_cRef = 1;
0055a87b      this->m_cTurbineRefCount.vtable = 0x792b6c;
0055a882      this->m_rgWaitingBlobs.head_ = 0;
0055a885      this->m_rgWaitingBlobs.tail_ = nullptr;
0055a888      this->m_fCrucialOrderedEventsReceived = 0;
0055a88b      this->m_pUIQueue = arg2;
0055a88e      __builtin_memset(&this->m_rgSystems, 0, 0x3c);
0055a860  }

0055a8c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0055a8d0  void __fastcall UIQueueManager::~UIQueueManager(class UIQueueManager* this)

0055a8d0  {
0055a8d3      this->vtable = 0x7cc434;
0055a8d3      
0055a8e6      if ((this->m_rgSystems.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0055a8ec          operator delete[](this->m_rgSystems.m_data);
0055a8ec      
0055a8f7      NIList<NetBlob *>::DeleteContents(&this->m_rgWaitingBlobs);
0055a8fc      this->m_cTurbineRefCount.vtable = 0x792b6c;
0055a906      /* tailcall */
0055a906      return IQueuedUIEventDeliverer::~IQueuedUIEventDeliverer(this);
0055a8d0  }

0055a90b                                   90 90 90 90 90                                                             .....

0055a910  uint32_t __thiscall PackableList<ContentProfile>::InsertTail(class PackableList<ContentProfile>* this, class ContentProfile const* arg2)

0055a910  {
0055a915      void* eax = operator new(0x14);
0055a915      
0055a921      if (eax == 0)
0055a943          eax = nullptr;
0055a921      else
0055a921      {
0055a928          *(uint32_t*)eax = 0x7cc40c;
0055a931          *(uint32_t*)((char*)eax + 4) = arg2->m_iid;
0055a937          *(uint32_t*)((char*)eax + 8) = arg2->m_uContainerProperties;
0055a93a          *(uint32_t*)((char*)eax + 0xc) = 0;
0055a93d          *(uint32_t*)((char*)eax + 0x10) = 0;
0055a921      }
0055a921      
0055a948      if (this->head == 0)
0055a948      {
0055a94a          this->head = eax;
0055a94d          this->tail = eax;
0055a953          uint32_t eax_2 = (this->curNum + 1);
0055a954          this->curNum = eax_2;
0055a958          return eax_2;
0055a948      }
0055a948      
0055a95b      class PackableLLNode<ContentProfile>* tail = this->tail;
0055a95e      tail->next = eax;
0055a961      *(uint32_t*)((char*)eax + 0x10) = tail;
0055a964      this->tail = eax;
0055a96a      uint32_t eax_4 = (this->curNum + 1);
0055a96b      this->curNum = eax_4;
0055a96f      return eax_4;
0055a910  }

0055a972                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0055a980  uint32_t __thiscall UIQueueManager::HandleStringUpdateEvents(class UIQueueManager* this, void* arg2, uint32_t arg3, uint32_t arg4)

0055a980  {
0055a98c      if (this->m_pObjMaintSystem == 0)
0055a993          return 0;
0055a993      
0055a996      void* eax_2 = arg2;
0055a99d      uint32_t ebx = arg4;
0055a99d      
0055a9ab      if (ebx != *(uint32_t*)eax_2)
0055a9b6          return 0;
0055a9b6      
0055a9b9      int32_t ecx;
0055a9b9      ecx = *(uint8_t*)((char*)eax_2 + 4);
0055a9bb      void* eax_5 = ((char*)eax_2 + 5);
0055a9bc      uint32_t ebp = 0;
0055a9c4      char var_8 = ecx;
0055a9c4      
0055a9c8      if (ebx == 0x2d6)
0055a9c8      {
0055a9ca          ebp = *(uint32_t*)eax_5;
0055a9cc          eax_5 += 4;
0055a9c8      }
0055a9c8      
0055a9cf      uint32_t edi = *(uint32_t*)eax_5;
0055a9d9      arg2 = ((char*)eax_5 + 4);
0055a9dd      PackObj::ALIGN_PTR(&arg2);
0055a9e2      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0055a9e7      arg4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0055a9f2      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0055aa0e      AC1Legacy::PStringBase<char>::UnPack(&arg4, &arg2, (((char*)eax_2 - arg2) + arg3));
0055aa0e      
0055aa19      if (ebx != 0x2d6)
0055aa19      {
0055aa73          ClientObjMaintSystem::Handle_Qualities__PrivateUpdateString(this->m_pObjMaintSystem, var_8, edi, &arg4);
0055aa7a          uint32_t eax_14 = arg4;
0055aa7a          
0055aa90          if ((InterlockedDecrement((eax_14 + 4)) == 0 && eax_14 != 0))
0055aa98              **(uint32_t**)eax_14(1);
0055aa19      }
0055aa19      else
0055aa19      {
0055aa2e          ClientObjMaintSystem::Handle_Qualities__UpdateString(this->m_pObjMaintSystem, var_8, ebp, edi, &arg4);
0055aa35          uint32_t eax_10 = arg4;
0055aa35          
0055aa4b          if ((InterlockedDecrement((eax_10 + 4)) == 0 && eax_10 != 0))
0055aa53              **(uint32_t**)eax_10(1);
0055aa19      }
0055aa19      
0055aaa3      return 0;
0055a980  }

0055aaa6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0055aab0  void __fastcall PackableList<ContentProfile>::Flush(class PackableList<ContentProfile>* this)

0055aab0  {
0055aabb      void var_c;
0055aabb      ContentProfile::ContentProfile(&var_c);
0055aabb      
0055aac7      while (this->head != 0)
0055aac7      {
0055aad0          class PackableLLNode<ContentProfile>* head = this->head;
0055aad0          
0055aad5          if (head != 0)
0055aad5          {
0055aad7              class PackableLLNode<ContentProfile>* next = head->next;
0055aadc              this->head = next;
0055aadc              
0055aadf              if (next == 0)
0055aae6                  this->tail = nullptr;
0055aadf              else
0055aae1                  next->prev = nullptr;
0055aae1              
0055aaec              uint32_t m_iid = head->data.m_iid;
0055aaf3              uint32_t m_uContainerProperties = head->data.m_uContainerProperties;
0055aaf8              head->data.vtable = 0x79285c;
0055aafe              operator delete(head);
0055ab0a              this->curNum -= 1;
0055aad5          }
0055aac7      }
0055aab0  }

0055ab18                                                                          90 90 90 90 90 90 90 90                          ........

0055ab20  uint32_t __fastcall UIQueueManager::Release(class UIQueueManager const* this)

0055ab20  {
0055ab27      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
0055ab27      
0055ab34      if ((result == 0 && this != 0))
0055ab34      {
0055ab38          UIQueueManager::~UIQueueManager(this);
0055ab3e          operator delete(this);
0055ab34      }
0055ab34      
0055ab4a      return result;
0055ab20  }

0055ab4b                                   90 90 90 90 90                                                             .....

0055ab50  void __fastcall UIQueueManager::OnStartup(class UIQueueManager* this)

0055ab50  {
0055ab53      int32_t ebx;
0055ab53      int32_t var_18 = ebx;
0055ab54      int32_t ebp;
0055ab54      int32_t var_1c = ebp;
0055ab55      int32_t esi;
0055ab55      int32_t var_20 = esi;
0055ab56      int32_t edi;
0055ab56      int32_t var_24 = edi;
0055ab5e      void* eax = operator new(0x104);
0055ab63      struct Turbine_GUID* i = nullptr;
0055ab6a      class ClientMagicSystem* ebp_1;
0055ab6a      
0055ab6a      if (eax == 0)
0055ab77          ebp_1 = nullptr;
0055ab6a      else
0055ab73          ebp_1 = ClientMagicSystem::ClientMagicSystem(eax);
0055ab73      
0055ab79      class SmartArray<ClientSystem *,1>* esi_1 = &this->m_rgSystems;
0055ab7c      this->m_pMagicSystem = ebp_1;
0055ab85      int32_t eax_3 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055ab8c      uint8_t eax_6;
0055ab8c      
0055ab8c      if (esi_1->m_num >= eax_3)
0055ab9a          eax_6 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_3 + 1)));
0055ab9a      
0055aba1      if ((esi_1->m_num < eax_3 || eax_6 != 0))
0055aba1      {
0055aba6          esi_1->m_data[esi_1->m_num] = ebp_1;
0055abab          esi_1->m_num += 1;
0055aba1      }
0055aba1      
0055abb3      void* eax_8 = operator new(0x9c);
0055abbd      class ClientCommunicationSystem* ebp_2;
0055abbd      
0055abbd      if (eax_8 == 0)
0055abca          ebp_2 = nullptr;
0055abbd      else
0055abc6          ebp_2 = ClientCommunicationSystem::ClientCommunicationSystem(eax_8);
0055abc6      
0055abcc      this->m_pCommunicationSystem = ebp_2;
0055abd5      int32_t eax_11 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055abdc      uint8_t eax_14;
0055abdc      
0055abdc      if (esi_1->m_num >= eax_11)
0055abea          eax_14 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_11 + 1)));
0055abea      
0055abf1      if ((esi_1->m_num < eax_11 || eax_14 != 0))
0055abf1      {
0055abf6          esi_1->m_data[esi_1->m_num] = ebp_2;
0055abfb          esi_1->m_num += 1;
0055abf1      }
0055abf1      
0055ac00      void* eax_16 = operator new(0x44);
0055ac0a      class ClientUISystem* ebp_3;
0055ac0a      
0055ac0a      if (eax_16 == 0)
0055ac17          ebp_3 = nullptr;
0055ac0a      else
0055ac13          ebp_3 = ClientUISystem::ClientUISystem(eax_16);
0055ac13      
0055ac19      this->m_pUISystem = ebp_3;
0055ac22      int32_t eax_19 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055ac29      uint8_t eax_22;
0055ac29      
0055ac29      if (esi_1->m_num >= eax_19)
0055ac37          eax_22 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_19 + 1)));
0055ac37      
0055ac3e      if ((esi_1->m_num < eax_19 || eax_22 != 0))
0055ac3e      {
0055ac43          esi_1->m_data[esi_1->m_num] = ebp_3;
0055ac48          esi_1->m_num += 1;
0055ac3e      }
0055ac3e      
0055ac50      void* eax_23 = operator new(0x128);
0055ac5a      class ClientAllegianceSystem* ebp_4;
0055ac5a      
0055ac5a      if (eax_23 == 0)
0055ac67          ebp_4 = nullptr;
0055ac5a      else
0055ac63          ebp_4 = ClientAllegianceSystem::ClientAllegianceSystem(eax_23);
0055ac63      
0055ac69      this->m_pAllegianceSystem = ebp_4;
0055ac72      int32_t eax_26 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055ac79      uint8_t eax_29;
0055ac79      
0055ac79      if (esi_1->m_num >= eax_26)
0055ac87          eax_29 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_26 + 1)));
0055ac87      
0055ac8e      if ((esi_1->m_num < eax_26 || eax_29 != 0))
0055ac8e      {
0055ac93          esi_1->m_data[esi_1->m_num] = ebp_4;
0055ac98          esi_1->m_num += 1;
0055ac8e      }
0055ac8e      
0055ac9d      void* eax_31 = operator new(0x14);
0055aca7      class ClientFellowshipSystem* ebp_5;
0055aca7      
0055aca7      if (eax_31 == 0)
0055acb4          ebp_5 = nullptr;
0055aca7      else
0055acb0          ebp_5 = ClientFellowshipSystem::ClientFellowshipSystem(eax_31);
0055acb0      
0055acb6      this->m_pFellowshipSystem = ebp_5;
0055acbf      int32_t eax_34 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055acc6      uint8_t eax_37;
0055acc6      
0055acc6      if (esi_1->m_num >= eax_34)
0055acd4          eax_37 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_34 + 1)));
0055acd4      
0055acdb      if ((esi_1->m_num < eax_34 || eax_37 != 0))
0055acdb      {
0055ace0          esi_1->m_data[esi_1->m_num] = ebp_5;
0055ace5          esi_1->m_num += 1;
0055acdb      }
0055acdb      
0055aced      void* eax_39 = operator new(0x300);
0055acf7      class CPlayerSystem* ebp_6;
0055acf7      
0055acf7      if (eax_39 == 0)
0055ad04          ebp_6 = nullptr;
0055acf7      else
0055acf7      {
0055acfb          class CPlayerSystem* eax_40;
0055acfb          eax_40 = CPlayerSystem::CPlayerSystem(eax_39);
0055ad00          ebp_6 = eax_40;
0055acf7      }
0055acf7      
0055ad06      this->m_pPlayerSystem = ebp_6;
0055ad0f      int32_t eax_42 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055ad16      uint8_t eax_45;
0055ad16      
0055ad16      if (esi_1->m_num >= eax_42)
0055ad24          eax_45 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_42 + 1)));
0055ad24      
0055ad2b      if ((esi_1->m_num < eax_42 || eax_45 != 0))
0055ad2b      {
0055ad30          esi_1->m_data[esi_1->m_num] = ebp_6;
0055ad35          esi_1->m_num += 1;
0055ad2b      }
0055ad2b      
0055ad3a      void* eax_46 = operator new(0x10);
0055ad44      class ClientHousingSystem* ebp_7;
0055ad44      
0055ad44      if (eax_46 == i)
0055ad51          ebp_7 = nullptr;
0055ad44      else
0055ad4d          ebp_7 = ClientHousingSystem::ClientHousingSystem(eax_46);
0055ad4d      
0055ad53      this->m_pHousingSystem = ebp_7;
0055ad5c      int32_t eax_49 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055ad63      uint8_t eax_52;
0055ad63      
0055ad63      if (esi_1->m_num >= eax_49)
0055ad71          eax_52 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_49 + 1)));
0055ad71      
0055ad78      if ((esi_1->m_num < eax_49 || eax_52 != 0))
0055ad78      {
0055ad7d          esi_1->m_data[esi_1->m_num] = ebp_7;
0055ad82          esi_1->m_num += 1;
0055ad78      }
0055ad78      
0055ad87      void* eax_54 = operator new(0x10);
0055ad91      class ClientMiniGameSystem* ebp_8;
0055ad91      
0055ad91      if (eax_54 == i)
0055ad9e          ebp_8 = nullptr;
0055ad91      else
0055ad9a          ebp_8 = ClientMiniGameSystem::ClientMiniGameSystem(eax_54);
0055ad9a      
0055ada0      this->m_pMiniGameSystem = ebp_8;
0055ada9      int32_t eax_57 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055adb0      uint8_t eax_60;
0055adb0      
0055adb0      if (esi_1->m_num >= eax_57)
0055adbe          eax_60 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_57 + 1)));
0055adbe      
0055adc5      if ((esi_1->m_num < eax_57 || eax_60 != 0))
0055adc5      {
0055adca          esi_1->m_data[esi_1->m_num] = ebp_8;
0055adcf          esi_1->m_num += 1;
0055adc5      }
0055adc5      
0055add4      void* eax_62 = operator new(0x60);
0055adde      class ClientCombatSystem* ebp_9;
0055adde      
0055adde      if (eax_62 == i)
0055adeb          ebp_9 = nullptr;
0055adde      else
0055ade7          ebp_9 = ClientCombatSystem::ClientCombatSystem(eax_62);
0055ade7      
0055aded      this->m_pCombatSystem = ebp_9;
0055adf6      int32_t eax_65 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055adfd      uint8_t eax_68;
0055adfd      
0055adfd      if (esi_1->m_num >= eax_65)
0055ae0b          eax_68 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_65 + 1)));
0055ae0b      
0055ae12      if ((esi_1->m_num < eax_65 || eax_68 != 0))
0055ae12      {
0055ae17          esi_1->m_data[esi_1->m_num] = ebp_9;
0055ae1c          esi_1->m_num += 1;
0055ae12      }
0055ae12      
0055ae21      void* eax_69 = operator new(0x24);
0055ae2b      class ClientTradeSystem* ebp_10;
0055ae2b      
0055ae2b      if (eax_69 == i)
0055ae38          ebp_10 = nullptr;
0055ae2b      else
0055ae34          ebp_10 = ClientTradeSystem::ClientTradeSystem(eax_69);
0055ae34      
0055ae3a      this->m_pTradeSystem = ebp_10;
0055ae43      int32_t eax_72 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055ae4a      uint8_t eax_75;
0055ae4a      
0055ae4a      if (esi_1->m_num >= eax_72)
0055ae58          eax_75 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_72 + 1)));
0055ae58      
0055ae5f      if ((esi_1->m_num < eax_72 || eax_75 != 0))
0055ae5f      {
0055ae64          esi_1->m_data[esi_1->m_num] = ebp_10;
0055ae69          esi_1->m_num += 1;
0055ae5f      }
0055ae5f      
0055ae70      struct Turbine_GUID* i_2;
0055ae70      int32_t* var_28_30 = &i_2;
0055ae75      struct Turbine_GUID* i_6 = &ClientObjMaintSystem_ClassType;
0055ae7b      i_2 = i;
0055ae86      class TResult __return;
0055ae86      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, i_6, var_28_30);
0055ae8b      struct Turbine_GUID* i_5 = i_2;
0055ae94      i_6 = i_5;
0055ae96      struct Turbine_GUID* i_1 = i;
0055ae99      struct Turbine_GUID* i_7 = i_6;
0055ae9f      struct Turbine_GUID* i_3 = i;
0055aea3      struct Turbine_GUID* i_4 = i;
0055aea3      
0055aea7      if (i_7 != i)
0055aead          *(uint32_t*)(i_7->m_data1 + 0x10)();
0055aead      
0055aeb9      void var_c;
0055aeb9      InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&i_3, &var_c);
0055aeb9      struct Turbine_GUID** esp_1 = &i_6;
0055aeb9      
0055aec0      if (i_5 != i)
0055aec7          *(uint32_t*)(i_5->m_data1 + 0x14)();
0055aec7      
0055aeca      class TResult __return_1 = __return;
0055aed0      this->m_pObjMaintSystem = __return_1;
0055aed0      
0055aed3      if (__return_1 != i)
0055aed3      {
0055aedb          int32_t eax_79 = (esi_1->m_sizeAndDeallocate & 0x7fffffff);
0055aee2          uint8_t eax_82;
0055aee2          
0055aee2          if (esi_1->m_num >= eax_79)
0055aee2          {
0055aef0              eax_82 = SmartArray<unsigned long,1>::grow(esi_1, SmartArray<unsigned long,1>::get_new_size(esi_1, (eax_79 + 1)));
0055aef0              esp_1 = &i_6;
0055aee2          }
0055aee2          
0055aef7          if ((esi_1->m_num < eax_79 || eax_82 != 0))
0055aef7          {
0055aefc              esi_1->m_data[esi_1->m_num] = __return_1;
0055af01              esi_1->m_num += 1;
0055aef7          }
0055aed3      }
0055aed3      
0055af07      if (this->m_rgSystems.m_num > i)
0055af07      {
0055af09          esp_1 = &i_6;
0055af09          
0055af20          do
0055af20          {
0055af10              esi_1->m_data[i]->vtable->OnStartup();
0055af17              esp_1 = &esp_1[2];
0055af1d              i = (&i->m_data1 + 1);
0055af20          } while (i < this->m_rgSystems.m_num);
0055af07      }
0055af07      
0055af22      *(uint32_t*)esp_1;
0055af22      esp_1[1];
0055af22      esp_1[2];
0055af22      esp_1[3];
0055ab50  }

0055af2a                                90 90 90 90 90 90                                                            ......

0055af30  void __fastcall PackableList<ContentProfile>::~PackableList<ContentProfile>(class PackableList<ContentProfile>* this)

0055af30  {
0055af33      this->vtable = 0x7cc3f8;
0055af39      PackableList<ContentProfile>::Flush(this);
0055af3e      this->vtable = 0x79285c;
0055af30  }

0055af46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0055af50  int32_t __thiscall PackableList<ContentProfile>::UnPack(class PackableList<ContentProfile>* this, void** arg2, uint32_t arg3)

0055af50  {
0055af56      PackableList<ContentProfile>::Flush(this);
0055af56      
0055af60      if (arg3 < 4)
0055afbc          return 0;
0055afbc      
0055af67      void* eax = *(uint32_t*)arg2;
0055af6b      int32_t edi = *(uint32_t*)eax;
0055af74      *(uint32_t*)arg2 = ((char*)eax + 4);
0055af76      int32_t var_c;
0055af76      ContentProfile::ContentProfile(&var_c);
0055af7b      int32_t esi = 0;
0055af7b      
0055af7f      if (edi > 0)
0055af7f      {
0055afa5          do
0055afa5          {
0055af94              if (*(uint32_t*)(var_c + 0x10)(arg2, arg3) == 0)
0055afc8                  return 0;
0055afc8              
0055af9d              PackableList<ContentProfile>::InsertTail(this, &var_c);
0055afa2              esi += 1;
0055afa5          } while (esi < edi);
0055af7f      }
0055af7f      
0055afb3      return 1;
0055af50  }

0055afcb                                   90 90 90 90 90                                                             .....

0055afd0  void* __thiscall PackableList<ContentProfile>::`scalar deleting destructor'(class PackableList<ContentProfile>* this, uint32_t arg2)

0055afd0  {
0055afd3      this->vtable = 0x7cc3f8;
0055afd9      PackableList<ContentProfile>::Flush(this);
0055afe3      this->vtable = 0x79285c;
0055afe3      
0055afe9      if ((arg2 & 1) != 0)
0055afec          operator delete(this);
0055afec      
0055aff7      return this;
0055afd0  }

0055affa                                                                                90 90 90 90 90 90                            ......

0055b000  uint32_t __thiscall UIQueueManager::ProcessNetBlobData(class UIQueueManager* this, void* arg2, uint32_t arg3)

0055b000  {
0055b013      void* ecx = arg2;
0055b01a      uint32_t edx = *(uint32_t*)ecx;
0055b01e      void* esi = ((char*)ecx + arg3);
0055b02c      arg2 = ((char*)ecx + 4);
0055b033      class AC1Legacy::PStringBase<char> var_1c0;
0055b033      
0055b033      if (edx <= 0x276)
0055b033      {
0055b039          if (edx == 0x276)
0055b039          {
0055c06f              CM_Character::DispatchUI_ConfirmationDone(this, ecx, ((char*)esi - ecx));
0055c083              return 0;
0055b039          }
0055b039          
0055b045          if (edx <= 0x1c9)
0055b045          {
0055b04b              if (edx == 0x1c9)
0055b04b              {
0055bbb7                  CM_Fellowship::DispatchUI_FellowUpdateDone(this, ecx, ((char*)esi - ecx));
0055bbcb                  return 0;
0055b04b              }
0055b04b              
0055b057              class AC1Legacy::PStringBase<char> var_1b8;
0055b057              uint32_t var_1b0;
0055b057              uint32_t esi_11;
0055b057              
0055b057              if (edx <= 0xc3)
0055b057              {
0055b05d                  if (edx == 0xc3)
0055b05d                  {
0055b63c                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1b0);
0055b645                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1b8);
0055b64e                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c0);
0055b65f                      uint32_t ecx_73 = ((char*)esi - ((char*)arg2 + 4));
0055b66e                      arg2 += 4;
0055b675                      AC1Legacy::PStringBase<char>::UnPack(&var_1b0, &arg2, ecx_73);
0055b686                      uint32_t ecx_76 = ((char*)esi - ((char*)arg2 + 4));
0055b695                      arg2 += 4;
0055b69c                      AC1Legacy::PStringBase<char>::UnPack(&var_1b8, &arg2, ecx_76);
0055b6b5                      AC1Legacy::PStringBase<char>::UnPack(&var_1c0, &arg2, ((char*)esi - arg2));
0055b6be                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c0);
0055b6c7                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1b8);
0055b6d0                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1b0);
0055b6e1                      return 0;
0055b05d                  }
0055b05d                  
0055b06c                  void var_1a0;
0055b06c                  
0055b06c                  if ((edx - 3) <= 0xb5)
0055b06c                      switch (edx)
0055b06c                      {
0055b085                          case 3:
0055b085                          {
0055b085                              CM_Allegiance::DispatchUI_AllegianceUpdateAborted(this, ecx, ((char*)esi - ecx));
0055b085                              break;
0055b085                          }
0055b0bd                          case 4:
0055b0bd                          {
0055b0bd                              CM_Communication::DispatchUI_PopUpString(this, ecx, ((char*)esi - ecx));
0055b0bd                              break;
0055b0bd                          }
0055b165                          case 0x13:
0055b165                          {
0055b165                              CPlayerSystem::Handle_PlayerDescription(this->m_pPlayerSystem, ((char*)ecx + 4), arg3);
0055b16c                              UIQueueManager::CrucialOrderedEventsReceived(this);
0055b173                              UIQueueManager::OnBeginCharacterSession(this);
0055b165                              break;
0055b165                          }
0055b5dd                          case 0x20:
0055b5dd                          {
0055b5dd                              void var_118;
0055b5dd                              CAllegianceProfile::CAllegianceProfile(&var_118);
0055b5e2                              void* eax_33 = arg2;
0055b5e9                              uint32_t ebp_6 = *(uint32_t*)eax_33;
0055b600                              arg2 = ((char*)eax_33 + 4);
0055b607                              AllegianceProfile::UnPack(&var_118, &arg2, ((char*)esi - ((char*)eax_33 + 4)));
0055b618                              ClientAllegianceSystem::Handle_Allegiance__AllegianceUpdate(this->m_pAllegianceSystem, &var_118, ebp_6);
0055b624                              void var_114;
0055b624                              AllegianceHierarchy::~AllegianceHierarchy(&var_114);
0055b5dd                              break;
0055b5dd                          }
0055b149                          case 0x21:
0055b149                          {
0055b149                              CM_Social::DispatchUI_FriendsUpdate(this, ecx, ((char*)esi - ecx));
0055b149                              break;
0055b149                          }
0055b1c8                          case 0x22:
0055b1c8                          {
0055b1c8                              uint32_t esi_10 = *(uint32_t*)((char*)ecx + 4);
0055b1cd                              arg2 = ((char*)ecx + 8);
0055b1d4                              uint32_t ebp_1 = *(uint32_t*)((char*)ecx + 8);
0055b1d9                              arg2 = ((char*)ecx + 0xc);
0055b1e0                              class AC1Legacy::PStringBase<char> eax_3 = *(uint32_t*)((char*)ecx + 0xc);
0055b1e5                              arg2 = ((char*)ecx + 0x10);
0055b1ec                              uint32_t edx_3 = *(uint32_t*)((char*)ecx + 0x10);
0055b1f1                              arg2 = ((char*)ecx + 0x14);
0055b1ff                              var_1b8 = eax_3;
0055b203                              var_1b0 = edx_3;
0055b207                              class CWeenieObject* eax_4 = CObjectMaint::GetWeenieObject(&this->m_pObjMaintSystem->vtable, esi_10);
0055b207                              
0055b20e                              if (eax_4 != 0)
0055b20e                              {
0055b21e                                  ACCWeenieObject::ServerSaysMoveItem(eax_4, ebp_1, var_1b8, 0, 0, 1);
0055b22f                                  return 0;
0055b20e                              }
0055b20e                              
0055b239                              class CWeenieObject* eax_6 = CObjectMaint::GetWeenieObject(&this->m_pObjMaintSystem->vtable, ebp_1);
0055b239                              
0055b240                              if (eax_6 != 0)
0055b24f                                  ACCWeenieObject::ServerSaysContainID(eax_6, esi_10, var_1b8, var_1b0);
0055b24f                              
0055b265                              GenItemHolder::ServerSaysMoveItem_s(esi_10, 0, 0, 0, ebp_1, var_1b8, 0, 0);
0055b1c8                              break;
0055b1c8                          }
0055b27c                          case 0x23:
0055b27c                          {
0055b27c                              esi_11 = *(uint32_t*)((char*)ecx + 4);
0055b281                              arg2 = ((char*)ecx + 8);
0055b288                              uint32_t ebp_2 = *(uint32_t*)((char*)ecx + 8);
0055b28d                              arg2 = ((char*)ecx + 0xc);
0055b29b                              class CWeenieObject* eax_8 = CObjectMaint::GetWeenieObject(&this->m_pObjMaintSystem->vtable, esi_11);
0055b29b                              
0055b2a4                              if (eax_8 != 0)
0055b2a4                              {
0055b2b5                                  ACCWeenieObject::ServerSaysMoveItem(eax_8, 0, 0, GetPlayerID(), ebp_2, 1);
0055b2c6                                  return 0;
0055b2a4                              }
0055b2a4                              
0055b813                              GenItemHolder::ServerSaysMoveItem_s(esi_11, 0, 0, 0, 0, 0, GetPlayerID(), ebp_2);
0055b27c                              break;
0055b27c                          }
0055b2d5                          case 0x24:
0055b2d5                          {
0055b2d5                              uint32_t ebp_3 = *(uint32_t*)((char*)ecx + 4);
0055b2da                              arg2 = ((char*)ecx + 8);
0055b2e8                              class CWeenieObject* eax_12 = CObjectMaint::GetWeenieObject(&this->m_pObjMaintSystem->vtable, ebp_3);
0055b2e8                              
0055b2f1                              if (eax_12 == 0)
0055b2f1                              {
0055b32b                                  GenItemHolder::ServerSaysMoveItem_s(ebp_3, 0, 0, 0, 0, 0, 0, 0);
0055b33f                                  return 0;
0055b2f1                              }
0055b2f1                              
0055b2f5                              ACCWeenieObject::ServerSaysRemove(eax_12);
0055b2fc                              ACCWeenieObject::AddContentsToDestructionQueue(eax_12);
0055b308                              CObjectMaint::AddObjectToBeDestroyed(&this->m_pObjMaintSystem->vtable, ebp_3);
0055b2d5                              break;
0055b2d5                          }
0055b12d                          case 0x29:
0055b12d                          {
0055b12d                              CM_Social::DispatchUI_CharacterTitleTable(this, ecx, ((char*)esi - ecx));
0055b12d                              break;
0055b12d                          }
0055b111                          case 0x2b:
0055b111                          {
0055b111                              CM_Social::DispatchUI_AddOrSetCharacterTitle(this, ecx, ((char*)esi - ecx));
0055b111                              break;
0055b111                          }
0055b187                          case 0x52:
0055b187                          {
0055b187                              uint32_t esi_9 = *(uint32_t*)((char*)ecx + 4);
0055b18c                              arg2 = ((char*)ecx + 8);
0055b193                              class ClientUISystem* m_pUISystem = this->m_pUISystem;
0055b193                              
0055b199                              if (esi_9 == m_pUISystem->groundObject)
0055b199                              {
0055b19f                                  ClientUISystem::SetGroundObject(m_pUISystem, 0, 0);
0055b1a5                                  ACCWeenieObject::RecordResponse(esi_9);
0055b199                              }
0055b199                              
0055b1b4                              ACCObjectMaint::StopViewingObjectContents(&this->m_pObjMaintSystem->vtable, esi_9);
0055b187                              break;
0055b187                          }
0055b5c2                          case 0x62:
0055b5c2                          {
0055b5c2                              ClientUISystem::Handle_VendorInfo(this->m_pUISystem, ((char*)ecx + 4), arg3);
0055b5c2                              break;
0055b5c2                          }
0055b0a1                          case 0x75:
0055b0a1                          {
0055b0a1                              CM_Character::DispatchUI_StartBarber(this, ecx, ((char*)esi - ecx));
0055b0a1                              break;
0055b0a1                          }
0055b342                          case 0xa0:
0055b342                          {
0055b342                              uint32_t ACCWeenieObject::prevRequestObjectID_2 = *(uint32_t*)((char*)ecx + 4);
0055b344                              uint32_t ACCWeenieObject::prevRequestObjectID_1 = ACCWeenieObject::prevRequestObjectID;
0055b34c                              arg2 = ((char*)ecx + 8);
0055b353                              uint32_t esi_13 = *(uint32_t*)((char*)ecx + 8);
0055b35a                              arg2 = ((char*)ecx + 0xc);
0055b35a                              
0055b361                              if (ACCWeenieObject::prevRequestObjectID_1 != 0)
0055b363                                  ACCWeenieObject::prevRequestObjectID_2 = ACCWeenieObject::prevRequestObjectID_1;
0055b363                              
0055b36c                              class CWeenieObject* eax_15 = CObjectMaint::GetWeenieObject(&this->m_pObjMaintSystem->vtable, ACCWeenieObject::prevRequestObjectID_2);
0055b36c                              
0055b373                              if (eax_15 != 0)
0055b37a                                  ACCWeenieObject::ServerSaysAttemptFailed(eax_15, esi_13, 1);
0055b37a                              
0055b3c7                              if ((esi_13 != 0x43e && (esi_13 != 0x46a && (esi_13 != 0x4cf && (esi_13 != 0x3ef && (esi_13 != 0x2b && (esi_13 != 0x1e && esi_13 != 0x4ce)))))))
0055b3d6                                  ClientCommunicationSystem::HandleFailureEvent(this->m_pCommunicationSystem, esi_13, &PStringBase<unsigned short>::null_string);
0055b342                              break;
0055b342                          }
0055b0f5                          case 0xa3:
0055b0f5                          {
0055b0f5                              CM_Fellowship::DispatchUI_Quit(this, ecx, ((char*)esi - ecx));
0055b0f5                              break;
0055b0f5                          }
0055b0d9                          case 0xa4:
0055b0d9                          {
0055b0d9                              CM_Fellowship::DispatchUI_Dismiss(this, ecx, ((char*)esi - ecx));
0055b0d9                              break;
0055b0d9                          }
0055b3ee                          case 0xb4:
0055b3ee                          {
0055b3ee                              PageDataList::PageDataList(&var_1a0);
0055b3f7                              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c0);
0055b400                              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1b8);
0055b405                              void* eax_17 = arg2;
0055b40c                              uint32_t ebp_4 = *(uint32_t*)eax_17;
0055b411                              arg2 = ((char*)eax_17 + 4);
0055b418                              int32_t ecx_41 = *(uint32_t*)((char*)eax_17 + 4);
0055b421                              arg2 = ((char*)eax_17 + 8);
0055b439                              PageDataList::UnPack(&var_1a0, &arg2, ((char*)esi - ((char*)eax_17 + 8)));
0055b456                              AC1Legacy::PStringBase<char>::UnPack(&var_1c0, &arg2, ((char*)esi - arg2));
0055b45b                              void* eax_21 = arg2;
0055b471                              var_1b0 = *(uint32_t*)eax_21;
0055b47a                              arg2 = ((char*)eax_21 + 4);
0055b481                              AC1Legacy::PStringBase<char>::UnPack(&var_1b8, &arg2, ((char*)esi - ((char*)eax_21 + 4)));
0055b48d                              CObjectMaint::GetWeenieObject(&this->m_pObjMaintSystem->vtable, ebp_4);
0055b4ac                              CM_Writing::SendNotice_OpenBook(ebp_4, ecx_41, &var_1a0, &var_1c0, var_1b0, &var_1b8);
0055b4b8                              AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1b8);
0055b4c1                              AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c0);
0055b4ca                              PageDataList::~PageDataList(&var_1a0);
0055b3ee                              break;
0055b3ee                          }
0055b4de                          case 0xb6:
0055b4de                          {
0055b4de                              uint32_t eax_24 = *(uint32_t*)((char*)ecx + 4);
0055b4e3                              arg2 = ((char*)ecx + 8);
0055b4ea                              int32_t edx_8 = *(uint32_t*)((char*)ecx + 8);
0055b4ef                              arg2 = ((char*)ecx + 0xc);
0055b4f6                              int32_t esi_15 = *(uint32_t*)((char*)ecx + 0xc);
0055b4fe                              arg2 = ((char*)ecx + 0x10);
0055b505                              CM_Writing::SendNotice_BookAddPageResponse(eax_24, edx_8, esi_15);
0055b4de                              break;
0055b4de                          }
0055b51c                          case 0xb7:
0055b51c                          {
0055b51c                              uint32_t eax_26 = *(uint32_t*)((char*)ecx + 4);
0055b521                              arg2 = ((char*)ecx + 8);
0055b528                              int32_t edx_9 = *(uint32_t*)((char*)ecx + 8);
0055b52d                              arg2 = ((char*)ecx + 0xc);
0055b534                              int32_t esi_16 = *(uint32_t*)((char*)ecx + 0xc);
0055b53c                              arg2 = ((char*)ecx + 0x10);
0055b543                              CM_Writing::SendNotice_BookDeletePageResponse(eax_26, edx_9, esi_16);
0055b51c                              break;
0055b51c                          }
0055b55e                          case 0xb8:
0055b55e                          {
0055b55e                              PageData::PageData(&var_1a0);
0055b563                              void* eax_28 = arg2;
0055b56a                              uint32_t edi_2 = *(uint32_t*)eax_28;
0055b56f                              arg2 = ((char*)eax_28 + 4);
0055b576                              int32_t ebp_5 = *(uint32_t*)((char*)eax_28 + 4);
0055b58a                              arg2 = ((char*)eax_28 + 8);
0055b591                              PageData::UnPack(&var_1a0, &arg2, ((char*)esi - ((char*)eax_28 + 8)));
0055b59d                              CM_Writing::SendNotice_BookPageDataResponse(edi_2, ebp_5, &var_1a0);
0055b5a9                              PageData::~PageData(&var_1a0);
0055b55e                              break;
0055b55e                          }
0055b06c                      }
0055b057              }
0055b057              else if ((edx - 0xc9) <= 0xfe)
0055b6f0              {
0055b6f6                  uint32_t edx_11 = ((uint32_t)*(uint8_t*)(edx + 0x55cb07));
0055b6f6                  
0055b6fd                  switch (edx_11)
0055b6fd                  {
0055bb60                      case 0:
0055bb60                      {
0055bb60                          void var_17c;
0055bb60                          AppraisalProfile::AppraisalProfile(&var_17c);
0055bb65                          void* eax_67 = arg2;
0055bb6c                          uint32_t edi_3 = *(uint32_t*)eax_67;
0055bb80                          arg2 = ((char*)eax_67 + 4);
0055bb87                          AppraisalProfile::UnPack(&var_17c, &arg2, ((char*)esi - ((char*)eax_67 + 4)));
0055bb92                          CM_Examine::SendNotice_SetAppraiseInfo(edi_3, &var_17c);
0055bb9e                          AppraisalProfile::~AppraisalProfile(&var_17c);
0055bb60                          break;
0055bb60                      }
0055b741                      case 1:
0055b741                      {
0055b741                          CM_Communication::DispatchUI_ChannelBroadcast(this, ecx, ((char*)esi - ecx));
0055b741                          break;
0055b741                      }
0055b779                      case 2:
0055b779                      {
0055b779                          CM_Communication::DispatchUI_ChannelList(this, ecx, ((char*)esi - ecx));
0055b779                          break;
0055b779                      }
0055b75d                      case 3:
0055b75d                      {
0055b75d                          CM_Communication::DispatchUI_ChannelIndex(this, ecx, ((char*)esi - ecx));
0055b75d                          break;
0055b75d                      }
0055ba67                      case 4:
0055ba67                      {
0055ba67                          var_1b0 = 0x7cc3f8;
0055ba6f                          int32_t var_1ac_1 = 0;
0055ba73                          int32_t var_1a8 = 0;
0055ba77                          int32_t var_1a4 = 0;
0055ba7b                          uint32_t ebp_9 = *(uint32_t*)((char*)ecx + 4);
0055ba80                          arg2 = ((char*)ecx + 8);
0055ba94                          PackableList<ContentProfile>::UnPack(&var_1b0, &arg2, ((char*)esi - ((char*)ecx + 8)));
0055baa2                          ClientUISystem::OnViewContents(this->m_pUISystem, ebp_9, &var_1b0);
0055baab                          PackableList<ContentProfile>::~PackableList<ContentProfile>(&var_1b0);
0055ba67                          break;
0055ba67                      }
0055bb0a                      case 5:
0055bb0a                      {
0055bb0a                          void* eax;
0055bb0a                          eax = *(uint8_t*)((char*)ecx + 4);
0055bb0d                          arg2 = ((char*)ecx + 5);
0055bb17                          uint8_t var_1bc = eax;
0055bb1b                          uint32_t eax_65 = *(uint32_t*)((char*)ecx + 5);
0055bb1e                          arg2 = ((char*)ecx + 9);
0055bb25                          uint32_t edx_21 = *(uint32_t*)((char*)ecx + 9);
0055bb2a                          arg2 = ((char*)ecx + 0xd);
0055bb31                          uint32_t esi_34 = *(uint32_t*)((char*)ecx + 0xd);
0055bb38                          arg2 = ((char*)ecx + 0x11);
0055bb48                          ClientObjMaintSystem::UpdateStackSize(this->m_pObjMaintSystem, var_1bc, eax_65, edx_21, esi_34);
0055bb0a                          break;
0055bb0a                      }
0055b7c8                      case 6:
0055b7c8                      {
0055b7c8                          esi_11 = *(uint32_t*)((char*)ecx + 4);
0055b7cd                          arg2 = ((char*)ecx + 8);
0055b7db                          class CWeenieObject* eax_42 = CObjectMaint::GetWeenieObject(&this->m_pObjMaintSystem->vtable, esi_11);
0055b7db                          
0055b7e2                          if (eax_42 != 0)
0055b7e2                          {
0055b7f0                              ACCWeenieObject::ServerSaysMoveItem(eax_42, 0, 0, 0, 0, 1);
0055b801                              return 0;
0055b7e2                          }
0055b7e2                          
0055b813                          GenItemHolder::ServerSaysMoveItem_s(esi_11, 0, 0, 0, 0, 0, 0, 0);
0055b7c8                          break;
0055b7c8                      }
0055bac4                      case 7:
0055bac4                      {
0055bac4                          ClientCombatSystem::HandlePlayerDeathEvent(this->m_pCombatSystem, ((char*)ecx + 4), arg3);
0055bac4                          break;
0055bac4                      }
0055b82a                      case 8:
0055b82a                      {
0055b82a                          uint32_t eax_45 = *(uint32_t*)((char*)ecx + 4);
0055b82f                          arg2 = ((char*)ecx + 8);
0055b83a                          ClientCombatSystem::HandleAttackDoneEvent(this->m_pCombatSystem, eax_45);
0055b82a                          break;
0055b82a                      }
0055b7c5                      case 9:
0055b7c5                      {
0055b7c5                          return CM_Magic::DispatchUI_RemoveSpell(this, ecx, ((char*)esi - ecx));
0055b7c5                          break;
0055b7c5                      }
0055bad8                      case 0xa:
0055bad8                      {
0055bad8                          uint32_t var_1d4_55 = arg3;
0055badd                          ClientCombatSystem::HandleKillerNotificationEvent(this->m_pCombatSystem, edx_11, ((char*)ecx + 4));
0055bad8                          break;
0055bad8                      }
0055baf1                      case 0xb:
0055baf1                      {
0055baf1                          uint32_t var_1d4_56 = arg3;
0055baf6                          ClientCombatSystem::HandleKillerNotificationEvent(this->m_pCombatSystem, edx_11, ((char*)ecx + 4));
0055baf1                          break;
0055baf1                      }
0055b869                      case 0xc:
0055b869                      {
0055b869                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c0);
0055b882                          AC1Legacy::PStringBase<char>::UnPack(&var_1c0, &arg2, ((char*)esi - arg2));
0055b887                          void* ecx_91 = arg2;
0055b88e                          enum DAMAGE_TYPE esi_28 = *(uint32_t*)ecx_91;
0055b893                          arg2 = ((char*)ecx_91 + 4);
0055b89a                          uint32_t edx_12 = *(uint32_t*)((char*)ecx_91 + 4);
0055b89c                          int32_t eax_48 = *(uint32_t*)((char*)ecx_91 + 8);
0055b8a2                          arg2 = ((char*)ecx_91 + 0xc);
0055b8a9                          int32_t ebp_7 = *(uint32_t*)((char*)ecx_91 + 0xc);
0055b8ae                          arg2 = ((char*)ecx_91 + 0x10);
0055b8b5                          var_1b0 = edx_12;
0055b8b9                          int32_t edx_13 = *(uint32_t*)((char*)ecx_91 + 0x10);
0055b8c2                          arg2 = ((char*)ecx_91 + 0x14);
0055b8cf                          int32_t eax_50;
0055b8cf                          int32_t edx_14;
0055b8cf                          edx_14 = HIGHD(((int64_t)*(uint32_t*)((char*)ecx_91 + 0x14)));
0055b8cf                          eax_50 = LOWD(((int64_t)*(uint32_t*)((char*)ecx_91 + 0x14)));
0055b8d0                          int32_t var_1d4_45 = edx_14;
0055b8d1                          uint32_t edx_15 = var_1b0;
0055b8df                          arg2 = ((char*)ecx_91 + 0x18);
0055b8ea                          int32_t var_1e4_2 = eax_48;
0055b8f5                          ClientCombatSystem::HandleAttackerNotificationEvent(this->m_pCombatSystem, &var_1c0, esi_28, edx_15, ebp_7, edx_13, eax_50);
0055b8fe                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c0);
0055b869                          break;
0055b869                      }
0055b916                      case 0xd:
0055b916                      {
0055b916                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c0);
0055b92f                          AC1Legacy::PStringBase<char>::UnPack(&var_1c0, &arg2, ((char*)esi - arg2));
0055b934                          void* ecx_102 = arg2;
0055b93b                          enum DAMAGE_TYPE esi_30 = *(uint32_t*)ecx_102;
0055b940                          arg2 = ((char*)ecx_102 + 4);
0055b947                          class AC1Legacy::PStringBase<char> edx_16 = *(uint32_t*)((char*)ecx_102 + 4);
0055b949                          int32_t eax_53 = *(uint32_t*)((char*)ecx_102 + 8);
0055b94f                          arg2 = ((char*)ecx_102 + 0xc);
0055b956                          int32_t ebp_8 = *(uint32_t*)((char*)ecx_102 + 0xc);
0055b95b                          arg2 = ((char*)ecx_102 + 0x10);
0055b962                          var_1b8 = edx_16;
0055b966                          uint32_t edx_17 = *(uint32_t*)((char*)ecx_102 + 0x10);
0055b96b                          arg2 = ((char*)ecx_102 + 0x14);
0055b976                          int32_t eax_54 = *(uint32_t*)((char*)ecx_102 + 0x14);
0055b97b                          arg2 = ((char*)ecx_102 + 0x18);
0055b986                          int32_t eax_55 = *(uint32_t*)((char*)ecx_102 + 0x18);
0055b988                          var_1b0 = edx_17;
0055b98c                          int32_t eax_56;
0055b98c                          int32_t edx_18;
0055b98c                          edx_18 = HIGHD(((int64_t)eax_55));
0055b98c                          eax_56 = LOWD(((int64_t)eax_55));
0055b98d                          int32_t var_1d4_47 = edx_18;
0055b98e                          uint32_t edx_19 = var_1b0;
0055b99a                          arg2 = ((char*)ecx_102 + 0x1c);
0055b9ac                          int32_t var_1e8_2 = eax_53;
0055b9b7                          ClientCombatSystem::HandleDefenderNotificationEvent(this->m_pCombatSystem, &var_1c0, esi_30, var_1b8, ebp_8, edx_19, eax_54, eax_56);
0055b9c0                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c0);
0055b916                          break;
0055b916                      }
0055ba1f                      case 0xe:
0055ba1f                      {
0055ba1f                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c0);
0055ba38                          AC1Legacy::PStringBase<char>::UnPack(&var_1c0, &arg2, ((char*)esi - arg2));
0055ba45                          ClientCombatSystem::HandleEvasionAttackerNotificationEvent(this->m_pCombatSystem, &var_1c0);
0055ba4e                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c0);
0055ba1f                          break;
0055ba1f                      }
0055b9d8                      case 0xf:
0055b9d8                      {
0055b9d8                          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c0);
0055b9f1                          class AC1Legacy::PStringBase<char>* edx_20 = AC1Legacy::PStringBase<char>::UnPack(&var_1c0, &arg2, ((char*)esi - arg2));
0055b9fa                          class AC1Legacy::PStringBase<char>* var_1d4_49 = &var_1c0;
0055b9fe                          ClientCombatSystem::HandleEvasionDefenderNotificationEvent(this->m_pCombatSystem, edx_20);
0055ba07                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c0);
0055b9d8                          break;
0055b9d8                      }
0055b851                      case 0x10:
0055b851                      {
0055b851                          ClientCombatSystem::HandleCommenceAttackEvent(this->m_pCombatSystem);
0055b851                          break;
0055b851                      }
0055b725                      case 0x11:
0055b725                      {
0055b725                          CM_Combat::DispatchUI_QueryHealthResponse(this, ecx, ((char*)esi - ecx));
0055b725                          break;
0055b725                      }
0055b709                      case 0x12:
0055b709                      {
0055b709                          CM_Character::DispatchUI_QueryAgeResponse(this, ecx, ((char*)esi - ecx));
0055b709                          break;
0055b709                      }
0055b795                      case 0x13:
0055b795                      {
0055b795                          CM_Item::DispatchUI_UseDone(this, ecx, ((char*)esi - ecx));
0055b795                          break;
0055b795                      }
0055b6fd                  }
0055b6f0              }
0055b045          }
0055b045          else if ((edx - 0x1ca) <= 0xaa)
0055bbda              switch (edx)
0055bbda              {
0055bc7f                  case 0x1ca:
0055bc7f                  {
0055bc7f                      CM_Fellowship::DispatchUI_FellowStatsDone(this, ecx, ((char*)esi - ecx));
0055bc7f                      break;
0055bc7f                  }
0055bd97                  case 0x1cb:
0055bd97                  {
0055bd97                      CM_Item::DispatchUI_AppraiseDone(this, ecx, ((char*)esi - ecx));
0055bd97                      break;
0055bd97                  }
0055be3f                  case 0x1d1:
0055be3f                  {
0055be3f                      CM_Qualities::DispatchUI_PrivateRemoveIntEvent(this, ecx, ((char*)esi - ecx));
0055be3f                      break;
0055be3f                  }
0055bf03                  case 0x1d2:
0055bf03                  {
0055bf03                      CM_Qualities::DispatchUI_RemoveIntEvent(this, ecx, ((char*)esi - ecx));
0055bf03                      break;
0055bf03                  }
0055bdcf                  case 0x1d3:
0055bdcf                  {
0055bdcf                      CM_Qualities::DispatchUI_PrivateRemoveBoolEvent(this, ecx, ((char*)esi - ecx));
0055bdcf                      break;
0055bdcf                  }
0055be93                  case 0x1d4:
0055be93                  {
0055be93                      CM_Qualities::DispatchUI_RemoveBoolEvent(this, ecx, ((char*)esi - ecx));
0055be93                      break;
0055be93                  }
0055be07                  case 0x1d5:
0055be07                  {
0055be07                      CM_Qualities::DispatchUI_PrivateRemoveFloatEvent(this, ecx, ((char*)esi - ecx));
0055be07                      break;
0055be07                  }
0055becb                  case 0x1d6:
0055becb                  {
0055becb                      CM_Qualities::DispatchUI_RemoveFloatEvent(this, ecx, ((char*)esi - ecx));
0055becb                      break;
0055becb                  }
0055be77                  case 0x1d7:
0055be77                  {
0055be77                      CM_Qualities::DispatchUI_PrivateRemoveStringEvent(this, ecx, ((char*)esi - ecx));
0055be77                      break;
0055be77                  }
0055bf3b                  case 0x1d8:
0055bf3b                  {
0055bf3b                      CM_Qualities::DispatchUI_RemoveStringEvent(this, ecx, ((char*)esi - ecx));
0055bf3b                      break;
0055bf3b                  }
0055bdeb                  case 0x1d9:
0055bdeb                  {
0055bdeb                      CM_Qualities::DispatchUI_PrivateRemoveDataIDEvent(this, ecx, ((char*)esi - ecx));
0055bdeb                      break;
0055bdeb                  }
0055beaf                  case 0x1da:
0055beaf                  {
0055beaf                      CM_Qualities::DispatchUI_RemoveDataIDEvent(this, ecx, ((char*)esi - ecx));
0055beaf                      break;
0055beaf                  }
0055be23                  case 0x1db:
0055be23                  {
0055be23                      CM_Qualities::DispatchUI_PrivateRemoveInstanceIDEvent(this, ecx, ((char*)esi - ecx));
0055be23                      break;
0055be23                  }
0055bee7                  case 0x1dc:
0055bee7                  {
0055bee7                      CM_Qualities::DispatchUI_RemoveInstanceIDEvent(this, ecx, ((char*)esi - ecx));
0055bee7                      break;
0055bee7                  }
0055be5b                  case 0x1dd:
0055be5b                  {
0055be5b                      CM_Qualities::DispatchUI_PrivateRemovePositionEvent(this, ecx, ((char*)esi - ecx));
0055be5b                      break;
0055be5b                  }
0055bf1f                  case 0x1de:
0055bf1f                  {
0055bf1f                      CM_Qualities::DispatchUI_RemovePositionEvent(this, ecx, ((char*)esi - ecx));
0055bf1f                      break;
0055bf1f                  }
0055bc3f                  case 0x1e0:
0055bc3f                  {
0055bc3f                      return CM_Communication::DispatchUI_HearEmote(this, ecx, ((char*)esi - ecx));
0055bc3f                      break;
0055bc3f                  }
0055bc5b                  case 0x1e2:
0055bc5b                  {
0055bc5b                      return CM_Communication::DispatchUI_HearSoulEmote(this, ecx, ((char*)esi - ecx));
0055bc5b                      break;
0055bc5b                  }
0055bc0f                  case 0x1ea:
0055bc0f                  {
0055bc0f                      CM_Character::DispatchUI_ReturnPing(this, ecx, ((char*)esi - ecx));
0055bc0f                      break;
0055bc0f                  }
0055bc63                  case 0x1f4:
0055bc63                  {
0055bc63                      CM_Communication::DispatchUI_SetSquelchDB(this, ecx, ((char*)esi - ecx));
0055bc63                      break;
0055bc63                  }
0055bfff                  case 0x1fd:
0055bfff                  {
0055bfff                      CM_Trade::DispatchUI_Recv_RegisterTrade(this, ecx, ((char*)esi - ecx));
0055bfff                      break;
0055bfff                  }
0055bfe3                  case 0x1fe:
0055bfe3                  {
0055bfe3                      CM_Trade::DispatchUI_Recv_OpenTrade(this, ecx, ((char*)esi - ecx));
0055bfe3                      break;
0055bfe3                  }
0055bfab                  case 0x1ff:
0055bfab                  {
0055bfab                      CM_Trade::DispatchUI_Recv_CloseTrade(this, ecx, ((char*)esi - ecx));
0055bfab                      break;
0055bfab                  }
0055bf73                  case 0x200:
0055bf73                  {
0055bf73                      CM_Trade::DispatchUI_Recv_AddToTrade(this, ecx, ((char*)esi - ecx));
0055bf73                      break;
0055bf73                  }
0055c01b                  case 0x201:
0055c01b                  {
0055c01b                      CM_Trade::DispatchUI_Recv_RemoveFromTrade(this, ecx, ((char*)esi - ecx));
0055c01b                      break;
0055c01b                  }
0055bf57                  case 0x202:
0055bf57                  {
0055bf57                      CM_Trade::DispatchUI_Recv_AcceptTrade(this, ecx, ((char*)esi - ecx));
0055bf57                      break;
0055bf57                  }
0055bfc7                  case 0x203:
0055bfc7                  {
0055bfc7                      CM_Trade::DispatchUI_Recv_DeclineTrade(this, ecx, ((char*)esi - ecx));
0055bfc7                      break;
0055bfc7                  }
0055c037                  case 0x205:
0055c037                  {
0055c037                      CM_Trade::DispatchUI_Recv_ResetTrade(this, ecx, ((char*)esi - ecx));
0055c037                      break;
0055c037                  }
0055c053                  case 0x207:
0055c053                  {
0055c053                      CM_Trade::DispatchUI_Recv_TradeFailure(this, ecx, ((char*)esi - ecx));
0055c053                      break;
0055c053                  }
0055bf8f                  case 0x208:
0055bf8f                  {
0055bf8f                      CM_Trade::DispatchUI_Recv_ClearTradeAcceptance(this, ecx, ((char*)esi - ecx));
0055bf8f                      break;
0055bf8f                  }
0055bcd3                  case 0x21d:
0055bcd3                  {
0055bcd3                      CM_House::DispatchUI_Recv_HouseProfile(this, ecx, ((char*)esi - ecx));
0055bcd3                      break;
0055bcd3                  }
0055bcb7                  case 0x225:
0055bcb7                  {
0055bcb7                      CM_House::DispatchUI_Recv_HouseData(this, ecx, ((char*)esi - ecx));
0055bcb7                      break;
0055bcb7                  }
0055bcef                  case 0x226:
0055bcef                  {
0055bcef                      CM_House::DispatchUI_Recv_HouseStatus(this, ecx, ((char*)esi - ecx));
0055bcef                      break;
0055bcef                  }
0055bd5f                  case 0x227:
0055bd5f                  {
0055bd5f                      CM_House::DispatchUI_Recv_UpdateRentTime(this, ecx, ((char*)esi - ecx));
0055bd5f                      break;
0055bd5f                  }
0055bd43                  case 0x228:
0055bd43                  {
0055bd43                      CM_House::DispatchUI_Recv_UpdateRentPayment(this, ecx, ((char*)esi - ecx));
0055bd43                      break;
0055bd43                  }
0055bd7b                  case 0x248:
0055bd7b                  {
0055bd7b                      CM_House::DispatchUI_Recv_UpdateRestrictions(this, ecx, ((char*)esi - ecx));
0055bd7b                      break;
0055bd7b                  }
0055bd27                  case 0x257:
0055bd27                  {
0055bd27                      CM_House::DispatchUI_Recv_UpdateHAR(this, ecx, ((char*)esi - ecx));
0055bd27                      break;
0055bd27                  }
0055bd0b                  case 0x259:
0055bd0b                  {
0055bd0b                      CM_House::DispatchUI_Recv_HouseTransaction(this, ecx, ((char*)esi - ecx));
0055bd0b                      break;
0055bd0b                  }
0055bdb3                  case 0x264:
0055bdb3                  {
0055bdb3                      CM_Item::DispatchUI_QueryItemManaResponse(this, ecx, ((char*)esi - ecx));
0055bdb3                      break;
0055bdb3                  }
0055bc9b                  case 0x271:
0055bc9b                  {
0055bc9b                      CM_House::DispatchUI_Recv_AvailableHouses(this, ecx, ((char*)esi - ecx));
0055bc9b                      break;
0055bc9b                  }
0055bbf3                  case 0x274:
0055bbf3                  {
0055bbf3                      CM_Character::DispatchUI_ConfirmationRequest(this, ecx, ((char*)esi - ecx));
0055bbf3                      break;
0055bbf3                  }
0055bbda              }
0055b033      }
0055b033      else if (edx <= 0x2d3)
0055c08c      {
0055c092          if (edx == 0x2d3)
0055c092          {
0055c536              CM_Qualities::DispatchUI_PrivateUpdateFloat(this, ecx, ((char*)esi - ecx));
0055c54a              return 0;
0055c092          }
0055c092          
0055c0a1          if ((edx - 0x27a) <= 0x58)
0055c0a1              switch (edx)
0055c0a1              {
0055c12a                  case 0x27a:
0055c12a                  {
0055c12a                      CM_Allegiance::DispatchUI_AllegianceLoginNotificationEvent(this, ecx, ((char*)esi - ecx));
0055c12a                      break;
0055c12a                  }
0055c10e                  case 0x27c:
0055c10e                  {
0055c10e                      CM_Allegiance::DispatchUI_AllegianceInfoResponseEvent(this, ecx, ((char*)esi - ecx));
0055c10e                      break;
0055c10e                  }
0055c25e                  case 0x281:
0055c25e                  {
0055c25e                      CM_Game::DispatchUI_Recv_JoinGameResponse(this, ecx, ((char*)esi - ecx));
0055c25e                      break;
0055c25e                  }
0055c2ce                  case 0x282:
0055c2ce                  {
0055c2ce                      CM_Game::DispatchUI_Recv_StartGame(this, ecx, ((char*)esi - ecx));
0055c2ce                      break;
0055c2ce                  }
0055c27a                  case 0x283:
0055c27a                  {
0055c27a                      CM_Game::DispatchUI_Recv_MoveResponse(this, ecx, ((char*)esi - ecx));
0055c27a                      break;
0055c27a                  }
0055c2b2                  case 0x284:
0055c2b2                  {
0055c2b2                      CM_Game::DispatchUI_Recv_OpponentTurn(this, ecx, ((char*)esi - ecx));
0055c2b2                      break;
0055c2b2                  }
0055c296                  case 0x285:
0055c296                  {
0055c296                      CM_Game::DispatchUI_Recv_OppenentStalemateState(this, ecx, ((char*)esi - ecx));
0055c296                      break;
0055c296                  }
0055c1b6                  case 0x28a:
0055c1b6                  {
0055c1b6                      CM_Communication::DispatchUI_WeenieError(this, ecx, ((char*)esi - ecx));
0055c1b6                      break;
0055c1b6                  }
0055c1d2                  case 0x28b:
0055c1d2                  {
0055c1d2                      CM_Communication::DispatchUI_WeenieErrorWithString(this, ecx, ((char*)esi - ecx));
0055c1d2                      break;
0055c1d2                  }
0055c242                  case 0x28c:
0055c242                  {
0055c242                      CM_Game::DispatchUI_Recv_GameOver(this, ecx, ((char*)esi - ecx));
0055c242                      break;
0055c242                  }
0055c19a                  case 0x295:
0055c19a                  {
0055c19a                      CM_Communication::DispatchUI_Recv_ChatRoomTracker(this, ecx, ((char*)esi - ecx));
0055c19a                      break;
0055c19a                  }
0055c0d6                  case 0x2ae:
0055c0d6                  {
0055c0d6                      CM_Admin::DispatchUI_Recv_QueryPluginList(this, ecx, ((char*)esi - ecx));
0055c0d6                      break;
0055c0d6                  }
0055c0ba                  case 0x2b1:
0055c0ba                  {
0055c0ba                      CM_Admin::DispatchUI_Recv_QueryPlugin(this, ecx, ((char*)esi - ecx));
0055c0ba                      break;
0055c0ba                  }
0055c0f2                  case 0x2b3:
0055c0f2                  {
0055c0f2                      CM_Admin::DispatchUI_Recv_QueryPluginResponse(this, ecx, ((char*)esi - ecx));
0055c0f2                      break;
0055c0f2                  }
0055c2ea                  case 0x2b4:
0055c2ea                  {
0055c2ea                      CM_Inventory::DispatchUI_Recv_SalvageOperationsResultData(this, ecx, ((char*)esi - ecx));
0055c2ea                      break;
0055c2ea                  }
0055c456                  case 0x2b8:
0055c456                  {
0055c456                      CM_Qualities::DispatchUI_PrivateRemoveInt64Event(this, ecx, ((char*)esi - ecx));
0055c456                      break;
0055c456                  }
0055c4c6                  case 0x2b9:
0055c4c6                  {
0055c4c6                      CM_Qualities::DispatchUI_RemoveInt64Event(this, ecx, ((char*)esi - ecx));
0055c4c6                      break;
0055c4c6                  }
0055c17e                  case 0x2bb:
0055c17e                  {
0055c17e                      CM_Communication::DispatchUI_HearSpeech(this, ecx, ((char*)esi - ecx));
0055c17e                      break;
0055c17e                  }
0055c162                  case 0x2bc:
0055c162                  {
0055c162                      CM_Communication::DispatchUI_HearRangedSpeech(this, ecx, ((char*)esi - ecx));
0055c162                      break;
0055c162                  }
0055c146                  case 0x2bd:
0055c146                  {
0055c146                      CM_Communication::DispatchUI_HearDirectSpeech(this, ecx, ((char*)esi - ecx));
0055c146                      break;
0055c146                  }
0055c20a                  case 0x2be:
0055c20a                  {
0055c20a                      CM_Fellowship::DispatchUI_FullUpdate(this, ecx, ((char*)esi - ecx));
0055c20a                      break;
0055c20a                  }
0055c1ee                  case 0x2bf:
0055c1ee                  {
0055c1ee                      CM_Fellowship::DispatchUI_Disband(this, ecx, ((char*)esi - ecx));
0055c1ee                      break;
0055c1ee                  }
0055c226                  case 0x2c0:
0055c226                  {
0055c226                      CM_Fellowship::DispatchUI_UpdateFellow(this, ecx, ((char*)esi - ecx));
0055c226                      break;
0055c226                  }
0055c3de                  case 0x2c1:
0055c3de                  {
0055c3de                      return CM_Magic::DispatchUI_UpdateSpell(this, ecx, ((char*)esi - ecx));
0055c3de                      break;
0055c3de                  }
0055c3a6                  case 0x2c2:
0055c3a6                  {
0055c3a6                      return CM_Magic::DispatchUI_UpdateEnchantment(this, ecx, ((char*)esi - ecx));
0055c3a6                      break;
0055c3a6                  }
0055c36e                  case 0x2c3:
0055c36e                  {
0055c36e                      return CM_Magic::DispatchUI_RemoveEnchantment(this, ecx, ((char*)esi - ecx));
0055c36e                      break;
0055c36e                  }
0055c3c2                  case 0x2c4:
0055c3c2                  {
0055c3c2                      return CM_Magic::DispatchUI_UpdateMultipleEnchantments(this, ecx, ((char*)esi - ecx));
0055c3c2                      break;
0055c3c2                  }
0055c38a                  case 0x2c5:
0055c38a                  {
0055c38a                      return CM_Magic::DispatchUI_RemoveMultipleEnchantments(this, ecx, ((char*)esi - ecx));
0055c38a                      break;
0055c38a                  }
0055c352                  case 0x2c6:
0055c352                  {
0055c352                      return CM_Magic::DispatchUI_PurgeEnchantments(this, ecx, ((char*)esi - ecx));
0055c352                      break;
0055c352                  }
0055c31a                  case 0x2c7:
0055c31a                  {
0055c31a                      return CM_Magic::DispatchUI_DispelEnchantment(this, ecx, ((char*)esi - ecx));
0055c31a                      break;
0055c31a                  }
0055c336                  case 0x2c8:
0055c336                  {
0055c336                      return CM_Magic::DispatchUI_DispelMultipleEnchantments(this, ecx, ((char*)esi - ecx));
0055c336                      break;
0055c336                  }
0055c402                  case 0x2c9:
0055c402                  {
0055c402                      CM_Misc::DispatchUI_PortalStormBrewing(this, ecx, ((char*)esi - ecx));
0055c402                      break;
0055c402                  }
0055c41e                  case 0x2ca:
0055c41e                  {
0055c41e                      CM_Misc::DispatchUI_PortalStormImminent(this, ecx, ((char*)esi - ecx));
0055c41e                      break;
0055c41e                  }
0055c3e6                  case 0x2cb:
0055c3e6                  {
0055c3e6                      CM_Misc::DispatchUI_PortalStorm(this, ecx, ((char*)esi - ecx));
0055c3e6                      break;
0055c3e6                  }
0055c43a                  case 0x2cc:
0055c43a                  {
0055c43a                      CM_Misc::DispatchUI_PortalStormSubsided(this, ecx, ((char*)esi - ecx));
0055c43a                      break;
0055c43a                  }
0055c48e                  case 0x2cd:
0055c48e                  {
0055c48e                      CM_Qualities::DispatchUI_PrivateUpdateInt(this, ecx, ((char*)esi - ecx));
0055c48e                      break;
0055c48e                  }
0055c4fe                  case 0x2ce:
0055c4fe                  {
0055c4fe                      CM_Qualities::DispatchUI_UpdateInt(this, ecx, ((char*)esi - ecx));
0055c4fe                      break;
0055c4fe                  }
0055c4aa                  case 0x2cf:
0055c4aa                  {
0055c4aa                      CM_Qualities::DispatchUI_PrivateUpdateInt64(this, ecx, ((char*)esi - ecx));
0055c4aa                      break;
0055c4aa                  }
0055c51a                  case 0x2d0:
0055c51a                  {
0055c51a                      CM_Qualities::DispatchUI_UpdateInt64(this, ecx, ((char*)esi - ecx));
0055c51a                      break;
0055c51a                  }
0055c472                  case 0x2d1:
0055c472                  {
0055c472                      CM_Qualities::DispatchUI_PrivateUpdateBool(this, ecx, ((char*)esi - ecx));
0055c472                      break;
0055c472                  }
0055c4e2                  case 0x2d2:
0055c4e2                  {
0055c4e2                      CM_Qualities::DispatchUI_UpdateBool(this, ecx, ((char*)esi - ecx));
0055c4e2                      break;
0055c4e2                  }
0055c0a1              }
0055c08c      }
0055c08c      else if (edx <= 0xea60)
0055c553      {
0055c559          if (edx == 0xea60)
0055c559          {
0055c858              CM_Admin::DispatchUI_Environs(this, ecx, ((char*)esi - ecx));
0055c86c              return 0;
0055c559          }
0055c559          
0055c568          if ((edx - 0x2d4) <= 0x41)
0055c568              switch (edx)
0055c568              {
0055c75d                  case 0x2d4:
0055c75d                  {
0055c75d                      CM_Qualities::DispatchUI_UpdateFloat(this, ecx, ((char*)esi - ecx));
0055c75d                      break;
0055c75d                  }
0055c83f                  case 0x2d5:
0055c83f                  case 0x2d6:
0055c83f                  {
0055c83f                      UIQueueManager::HandleStringUpdateEvents(this, ecx, ((char*)esi - ecx), edx);
0055c83f                      break;
0055c83f                  }
0055c629                  case 0x2d7:
0055c629                  {
0055c629                      CM_Qualities::DispatchUI_PrivateUpdateDataID(this, ecx, ((char*)esi - ecx));
0055c629                      break;
0055c629                  }
0055c741                  case 0x2d8:
0055c741                  {
0055c741                      CM_Qualities::DispatchUI_UpdateDataID(this, ecx, ((char*)esi - ecx));
0055c741                      break;
0055c741                  }
0055c645                  case 0x2d9:
0055c645                  {
0055c645                      CM_Qualities::DispatchUI_PrivateUpdateInstanceID(this, ecx, ((char*)esi - ecx));
0055c645                      break;
0055c645                  }
0055c779                  case 0x2da:
0055c779                  {
0055c779                      CM_Qualities::DispatchUI_UpdateInstanceID(this, ecx, ((char*)esi - ecx));
0055c779                      break;
0055c779                  }
0055c661                  case 0x2db:
0055c661                  {
0055c661                      CM_Qualities::DispatchUI_PrivateUpdatePosition(this, ecx, ((char*)esi - ecx));
0055c661                      break;
0055c661                  }
0055c795                  case 0x2dc:
0055c795                  {
0055c795                      CM_Qualities::DispatchUI_UpdatePosition(this, ecx, ((char*)esi - ecx));
0055c795                      break;
0055c795                  }
0055c67d                  case 0x2dd:
0055c67d                  {
0055c67d                      CM_Qualities::DispatchUI_PrivateUpdateSkill(this, ecx, ((char*)esi - ecx));
0055c67d                      break;
0055c67d                  }
0055c7b1                  case 0x2de:
0055c7b1                  {
0055c7b1                      CM_Qualities::DispatchUI_UpdateSkill(this, ecx, ((char*)esi - ecx));
0055c7b1                      break;
0055c7b1                  }
0055c6b5                  case 0x2df:
0055c6b5                  {
0055c6b5                      CM_Qualities::DispatchUI_PrivateUpdateSkillLevel(this, ecx, ((char*)esi - ecx));
0055c6b5                      break;
0055c6b5                  }
0055c7e9                  case 0x2e0:
0055c7e9                  {
0055c7e9                      CM_Qualities::DispatchUI_UpdateSkillLevel(this, ecx, ((char*)esi - ecx));
0055c7e9                      break;
0055c7e9                  }
0055c699                  case 0x2e1:
0055c699                  {
0055c699                      CM_Qualities::DispatchUI_PrivateUpdateSkillAC(this, ecx, ((char*)esi - ecx));
0055c699                      break;
0055c699                  }
0055c7cd                  case 0x2e2:
0055c7cd                  {
0055c7cd                      CM_Qualities::DispatchUI_UpdateSkillAC(this, ecx, ((char*)esi - ecx));
0055c7cd                      break;
0055c7cd                  }
0055c5b9                  case 0x2e3:
0055c5b9                  {
0055c5b9                      CM_Qualities::DispatchUI_PrivateUpdateAttribute(this, ecx, ((char*)esi - ecx));
0055c5b9                      break;
0055c5b9                  }
0055c6d1                  case 0x2e4:
0055c6d1                  {
0055c6d1                      CM_Qualities::DispatchUI_UpdateAttribute(this, ecx, ((char*)esi - ecx));
0055c6d1                      break;
0055c6d1                  }
0055c60d                  case 0x2e5:
0055c60d                  {
0055c60d                      CM_Qualities::DispatchUI_PrivateUpdateAttributeLevel(this, ecx, ((char*)esi - ecx));
0055c60d                      break;
0055c60d                  }
0055c725                  case 0x2e6:
0055c725                  {
0055c725                      CM_Qualities::DispatchUI_UpdateAttributeLevel(this, ecx, ((char*)esi - ecx));
0055c725                      break;
0055c725                  }
0055c5d5                  case 0x2e7:
0055c5d5                  {
0055c5d5                      CM_Qualities::DispatchUI_PrivateUpdateAttribute2nd(this, ecx, ((char*)esi - ecx));
0055c5d5                      break;
0055c5d5                  }
0055c6ed                  case 0x2e8:
0055c6ed                  {
0055c6ed                      CM_Qualities::DispatchUI_UpdateAttribute2nd(this, ecx, ((char*)esi - ecx));
0055c6ed                      break;
0055c6ed                  }
0055c5f1                  case 0x2e9:
0055c5f1                  {
0055c5f1                      CM_Qualities::DispatchUI_PrivateUpdateAttribute2ndLevel(this, ecx, ((char*)esi - ecx));
0055c5f1                      break;
0055c5f1                  }
0055c709                  case 0x2ea:
0055c709                  {
0055c709                      CM_Qualities::DispatchUI_UpdateAttribute2ndLevel(this, ecx, ((char*)esi - ecx));
0055c709                      break;
0055c709                  }
0055c581                  case 0x2eb:
0055c581                  {
0055c581                      CM_Communication::DispatchUI_TransientString(this, ecx, ((char*)esi - ecx));
0055c581                      break;
0055c581                  }
0055c5b1                  case 0x312:
0055c5b1                  {
0055c5b1                      return CM_Magic::DispatchUI_PurgeBadEnchantments(this, ecx, ((char*)esi - ecx));
0055c5b1                      break;
0055c5b1                  }
0055c821                  case 0x314:
0055c821                  {
0055c821                      CM_Social::DispatchUI_SendClientContractTrackerTable(this, ecx, ((char*)esi - ecx));
0055c821                      break;
0055c821                  }
0055c805                  case 0x315:
0055c805                  {
0055c805                      CM_Social::DispatchUI_SendClientContractTracker(this, ecx, ((char*)esi - ecx));
0055c805                      break;
0055c805                  }
0055c568              }
0055c553      }
0055c553      else if (edx <= 0xf7c1)
0055c875      {
0055c87b          if (edx == 0xf7c1)
0055c87b          {
0055c995              CPlayerSystem::Handle_AccountBanned(this->m_pPlayerSystem, ((char*)ecx + 4), arg3);
0055c9a6              return 0;
0055c87b          }
0055c87b          
0055c88a          if ((edx - 0xf630) <= 0x29)
0055c88a          {
0055c890              uint32_t edx_24 = ((uint32_t)*(uint8_t*)(edx + 0x54d9c8));
0055c890              
0055c897              switch (edx_24)
0055c897              {
0055c8a2                  case 0:
0055c8a2                  {
0055c8a2                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c0);
0055c8bb                      AC1Legacy::PStringBase<char>::UnPack(&var_1c0, &arg2, ((char*)esi - arg2));
0055c8cb                      NoticeHandler::RecvNotice_WorldName(this->m_pUISystem, (var_1c0 + 0x14));
0055c8d4                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c0);
0055c8a2                      break;
0055c8a2                  }
0055c911                  case 1:
0055c911                  {
0055c911                      CPlayerSystem::Handle_CharGenVerificationResponse(this->m_pPlayerSystem, ((char*)ecx + 4), arg3);
0055c911                      break;
0055c911                  }
0055c8e8                  case 2:
0055c8e8                  {
0055c8e8                      uint32_t eax_83 = *(uint32_t*)((char*)ecx + 4);
0055c8ed                      arg2 = ((char*)ecx + 8);
0055c8f8                      CPlayerSystem::Handle_AwaitingSubscriptionExpiration(this->m_pPlayerSystem, eax_83);
0055c8e8                      break;
0055c8e8                  }
0055c963                  case 3:
0055c963                  {
0055c963                      CPlayerSystem::ExecuteLogOff(this->m_pPlayerSystem);
0055c963                      break;
0055c963                  }
0055c94c                  case 4:
0055c94c                  {
0055c94c                      CPlayerSystem::Handle_CharacterDelete(this->m_pPlayerSystem);
0055c94c                      break;
0055c94c                  }
0055c977                  case 5:
0055c977                  {
0055c977                      uint32_t var_1d4_177 = arg3;
0055c97c                      CPlayerSystem::Handle_Login__CharacterSet(this->m_pPlayerSystem, edx_24, ((char*)ecx + 4));
0055c977                      break;
0055c977                  }
0055c925                  case 6:
0055c925                  {
0055c925                      enum charError eax_86 = *(uint32_t*)((char*)ecx + 4);
0055c92a                      arg2 = ((char*)ecx + 8);
0055c935                      CPlayerSystem::Handle_CharacterError(this->m_pPlayerSystem, eax_86);
0055c925                      break;
0055c925                  }
0055c897              }
0055c88a          }
0055c875      }
0055c875      else if ((edx - 0xf7ca) <= 0x17)
0055c9b2          switch (edx)
0055c9b2          {
0055c9cb              case 0xf7ca:
0055c9cb              {
0055c9cb                  CM_Admin::DispatchUI_ReceiveAccountData(this, ecx, ((char*)esi - ecx));
0055c9cb                  break;
0055c9cb              }
0055c9e7              case 0xf7cb:
0055c9e7              {
0055c9e7                  CM_Admin::DispatchUI_ReceivePlayerData(this, ecx, ((char*)esi - ecx));
0055c9e7                  break;
0055c9e7              }
0055ca57              case 0xf7dc:
0055ca57              {
0055ca57                  CPlayerSystem::Handle_AccountBooted(this->m_pPlayerSystem, ((char*)ecx + 4), arg3);
0055ca57                  break;
0055ca57              }
0055ca03              case 0xf7df:
0055ca03              {
0055ca03                  CM_Character::DispatchUI_EnterGame_ServerReady(this, ecx, ((char*)esi - ecx));
0055ca03                  break;
0055ca03              }
0055ca1f              case 0xf7e0:
0055ca1f              {
0055ca1f                  CM_Communication::DispatchUI_TextboxString(this, ecx, ((char*)esi - ecx));
0055ca1f                  break;
0055ca1f              }
0055ca3b              case 0xf7e1:
0055ca3b              {
0055ca3b                  CM_Login::DispatchUI_WorldInfo(this, ecx, ((char*)esi - ecx));
0055ca3b                  break;
0055ca3b              }
0055c9b2          }
0055ca68      return 0;
0055b000  }

0055ca6b                                   90                                                                         .
0055ca6c  uint32_t jump_table_55ca6c[0x16] = 
0055ca6c  {
0055ca6c      [0x00] =  0x0055b080
0055ca70      [0x01] =  0x0055b0b8
0055ca74      [0x02] =  0x0055b160
0055ca78      [0x03] =  0x0055b5d6
0055ca7c      [0x04] =  0x0055b144
0055ca80      [0x05] =  0x0055b1c8
0055ca84      [0x06] =  0x0055b27c
0055ca88      [0x07] =  0x0055b2d5
0055ca8c      [0x08] =  0x0055b128
0055ca90      [0x09] =  0x0055b10c
0055ca94      [0x0a] =  0x0055b187
0055ca98      [0x0b] =  0x0055b5bd
0055ca9c      [0x0c] =  0x0055b09c
0055caa0      [0x0d] =  0x0055b342
0055caa4      [0x0e] =  0x0055b0f0
0055caa8      [0x0f] =  0x0055b0d4
0055caac      [0x10] =  0x0055b3ea
0055cab0      [0x11] =  0x0055ca5c
0055cab4      [0x12] =  0x0055b4de
0055cab8      [0x13] =  0x0055b51c
0055cabc      [0x14] =  0x0055b55a
0055cac0      [0x15] =  0x0055ca5c
0055cac4  }
0055cac4  uint8_t lookup_table_55cac4[0xb6] = 
0055cac4  {
0055cac4      [0x00] =  0x00
0055cac5      [0x01] =  0x01
0055cac6      [0x02] =  0x15
0055cac7      [0x03] =  0x15
0055cac8      [0x04] =  0x15
0055cac9      [0x05] =  0x15
0055caca      [0x06] =  0x15
0055cacb      [0x07] =  0x15
0055cacc      [0x08] =  0x15
0055cacd      [0x09] =  0x15
0055cace      [0x0a] =  0x15
0055cacf      [0x0b] =  0x15
0055cad0      [0x0c] =  0x15
0055cad1      [0x0d] =  0x15
0055cad2      [0x0e] =  0x15
0055cad3      [0x0f] =  0x15
0055cad4      [0x10] =  0x02
0055cad5      [0x11] =  0x15
0055cad6      [0x12] =  0x15
0055cad7      [0x13] =  0x15
0055cad8      [0x14] =  0x15
0055cad9      [0x15] =  0x15
0055cada      [0x16] =  0x15
0055cadb      [0x17] =  0x15
0055cadc      [0x18] =  0x15
0055cadd      [0x19] =  0x15
0055cade      [0x1a] =  0x15
0055cadf      [0x1b] =  0x15
0055cae0      [0x1c] =  0x15
0055cae1      [0x1d] =  0x03
0055cae2      [0x1e] =  0x04
0055cae3      [0x1f] =  0x05
0055cae4      [0x20] =  0x06
0055cae5      [0x21] =  0x07
0055cae6      [0x22] =  0x15
0055cae7      [0x23] =  0x15
0055cae8      [0x24] =  0x15
0055cae9      [0x25] =  0x15
0055caea      [0x26] =  0x08
0055caeb      [0x27] =  0x15
0055caec      [0x28] =  0x09
0055caed      [0x29] =  0x15
0055caee      [0x2a] =  0x15
0055caef      [0x2b] =  0x15
0055caf0      [0x2c] =  0x15
0055caf1      [0x2d] =  0x15
0055caf2      [0x2e] =  0x15
0055caf3      [0x2f] =  0x15
0055caf4      [0x30] =  0x15
0055caf5      [0x31] =  0x15
0055caf6      [0x32] =  0x15
0055caf7      [0x33] =  0x15
0055caf8      [0x34] =  0x15
0055caf9      [0x35] =  0x15
0055cafa      [0x36] =  0x15
0055cafb      [0x37] =  0x15
0055cafc      [0x38] =  0x15
0055cafd      [0x39] =  0x15
0055cafe      [0x3a] =  0x15
0055caff      [0x3b] =  0x15
0055cb00      [0x3c] =  0x15
0055cb01      [0x3d] =  0x15
0055cb02      [0x3e] =  0x15
0055cb03      [0x3f] =  0x15
0055cb04      [0x40] =  0x15
0055cb05      [0x41] =  0x15
0055cb06      [0x42] =  0x15
0055cb07      [0x43] =  0x15
0055cb08      [0x44] =  0x15
0055cb09      [0x45] =  0x15
0055cb0a      [0x46] =  0x15
0055cb0b      [0x47] =  0x15
0055cb0c      [0x48] =  0x15
0055cb0d      [0x49] =  0x15
0055cb0e      [0x4a] =  0x15
0055cb0f      [0x4b] =  0x15
0055cb10      [0x4c] =  0x15
0055cb11      [0x4d] =  0x15
0055cb12      [0x4e] =  0x15
0055cb13      [0x4f] =  0x0a
0055cb14      [0x50] =  0x15
0055cb15      [0x51] =  0x15
0055cb16      [0x52] =  0x15
0055cb17      [0x53] =  0x15
0055cb18      [0x54] =  0x15
0055cb19      [0x55] =  0x15
0055cb1a      [0x56] =  0x15
0055cb1b      [0x57] =  0x15
0055cb1c      [0x58] =  0x15
0055cb1d      [0x59] =  0x15
0055cb1e      [0x5a] =  0x15
0055cb1f      [0x5b] =  0x15
0055cb20      [0x5c] =  0x15
0055cb21      [0x5d] =  0x15
0055cb22      [0x5e] =  0x15
0055cb23      [0x5f] =  0x0b
0055cb24      [0x60] =  0x15
0055cb25      [0x61] =  0x15
0055cb26      [0x62] =  0x15
0055cb27      [0x63] =  0x15
0055cb28      [0x64] =  0x15
0055cb29      [0x65] =  0x15
0055cb2a      [0x66] =  0x15
0055cb2b      [0x67] =  0x15
0055cb2c      [0x68] =  0x15
0055cb2d      [0x69] =  0x15
0055cb2e      [0x6a] =  0x15
0055cb2f      [0x6b] =  0x15
0055cb30      [0x6c] =  0x15
0055cb31      [0x6d] =  0x15
0055cb32      [0x6e] =  0x15
0055cb33      [0x6f] =  0x15
0055cb34      [0x70] =  0x15
0055cb35      [0x71] =  0x15
0055cb36      [0x72] =  0x0c
0055cb37      [0x73] =  0x15
0055cb38      [0x74] =  0x15
0055cb39      [0x75] =  0x15
0055cb3a      [0x76] =  0x15
0055cb3b      [0x77] =  0x15
0055cb3c      [0x78] =  0x15
0055cb3d      [0x79] =  0x15
0055cb3e      [0x7a] =  0x15
0055cb3f      [0x7b] =  0x15
0055cb40      [0x7c] =  0x15
0055cb41      [0x7d] =  0x15
0055cb42      [0x7e] =  0x15
0055cb43      [0x7f] =  0x15
0055cb44      [0x80] =  0x15
0055cb45      [0x81] =  0x15
0055cb46      [0x82] =  0x15
0055cb47      [0x83] =  0x15
0055cb48      [0x84] =  0x15
0055cb49      [0x85] =  0x15
0055cb4a      [0x86] =  0x15
0055cb4b      [0x87] =  0x15
0055cb4c      [0x88] =  0x15
0055cb4d      [0x89] =  0x15
0055cb4e      [0x8a] =  0x15
0055cb4f      [0x8b] =  0x15
0055cb50      [0x8c] =  0x15
0055cb51      [0x8d] =  0x15
0055cb52      [0x8e] =  0x15
0055cb53      [0x8f] =  0x15
0055cb54      [0x90] =  0x15
0055cb55      [0x91] =  0x15
0055cb56      [0x92] =  0x15
0055cb57      [0x93] =  0x15
0055cb58      [0x94] =  0x15
0055cb59      [0x95] =  0x15
0055cb5a      [0x96] =  0x15
0055cb5b      [0x97] =  0x15
0055cb5c      [0x98] =  0x15
0055cb5d      [0x99] =  0x15
0055cb5e      [0x9a] =  0x15
0055cb5f      [0x9b] =  0x15
0055cb60      [0x9c] =  0x15
0055cb61      [0x9d] =  0x0d
0055cb62      [0x9e] =  0x15
0055cb63      [0x9f] =  0x15
0055cb64      [0xa0] =  0x0e
0055cb65      [0xa1] =  0x0f
0055cb66      [0xa2] =  0x15
0055cb67      [0xa3] =  0x15
0055cb68      [0xa4] =  0x15
0055cb69      [0xa5] =  0x15
0055cb6a      [0xa6] =  0x15
0055cb6b      [0xa7] =  0x15
0055cb6c      [0xa8] =  0x15
0055cb6d      [0xa9] =  0x15
0055cb6e      [0xaa] =  0x15
0055cb6f      [0xab] =  0x15
0055cb70      [0xac] =  0x15
0055cb71      [0xad] =  0x15
0055cb72      [0xae] =  0x15
0055cb73      [0xaf] =  0x15
0055cb74      [0xb0] =  0x15
0055cb75      [0xb1] =  0x10
0055cb76      [0xb2] =  0x11
0055cb77      [0xb3] =  0x12
0055cb78      [0xb4] =  0x13
0055cb79      [0xb5] =  0x14
0055cb7a  }

0055cb7a                                                                                8b ff                                        ..
0055cb7c  uint32_t jump_table_55cb7c[0x15] = 
0055cb7c  {
0055cb7c      [0x00] =  0x0055bb5c
0055cb80      [0x01] =  0x0055b73c
0055cb84      [0x02] =  0x0055b774
0055cb88      [0x03] =  0x0055b758
0055cb8c      [0x04] =  0x0055ba62
0055cb90      [0x05] =  0x0055bb0a
0055cb94      [0x06] =  0x0055b7c8
0055cb98      [0x07] =  0x0055babf
0055cb9c      [0x08] =  0x0055b82a
0055cba0      [0x09] =  0x0055b7ac
0055cba4      [0x0a] =  0x0055bad8
0055cba8      [0x0b] =  0x0055baf1
0055cbac      [0x0c] =  0x0055b865
0055cbb0      [0x0d] =  0x0055b912
0055cbb4      [0x0e] =  0x0055ba1b
0055cbb8      [0x0f] =  0x0055b9d4
0055cbbc      [0x10] =  0x0055b84e
0055cbc0      [0x11] =  0x0055b720
0055cbc4      [0x12] =  0x0055b704
0055cbc8      [0x13] =  0x0055b790
0055cbcc      [0x14] =  0x0055ca5c
0055cbd0  }
0055cbd0  uint8_t lookup_table_55cbd0[0xff] = 
0055cbd0  {
0055cbd0      [0x00] =  0x00
0055cbd1      [0x01] =  0x14
0055cbd2      [0x02] =  0x14
0055cbd3      [0x03] =  0x14
0055cbd4      [0x04] =  0x14
0055cbd5      [0x05] =  0x14
0055cbd6      [0x06] =  0x14
0055cbd7      [0x07] =  0x14
0055cbd8      [0x08] =  0x14
0055cbd9      [0x09] =  0x14
0055cbda      [0x0a] =  0x14
0055cbdb      [0x0b] =  0x14
0055cbdc      [0x0c] =  0x14
0055cbdd      [0x0d] =  0x14
0055cbde      [0x0e] =  0x14
0055cbdf      [0x0f] =  0x14
0055cbe0      [0x10] =  0x14
0055cbe1      [0x11] =  0x14
0055cbe2      [0x12] =  0x14
0055cbe3      [0x13] =  0x14
0055cbe4      [0x14] =  0x14
0055cbe5      [0x15] =  0x14
0055cbe6      [0x16] =  0x14
0055cbe7      [0x17] =  0x14
0055cbe8      [0x18] =  0x14
0055cbe9      [0x19] =  0x14
0055cbea      [0x1a] =  0x14
0055cbeb      [0x1b] =  0x14
0055cbec      [0x1c] =  0x14
0055cbed      [0x1d] =  0x14
0055cbee      [0x1e] =  0x14
0055cbef      [0x1f] =  0x14
0055cbf0      [0x20] =  0x14
0055cbf1      [0x21] =  0x14
0055cbf2      [0x22] =  0x14
0055cbf3      [0x23] =  0x14
0055cbf4      [0x24] =  0x14
0055cbf5      [0x25] =  0x14
0055cbf6      [0x26] =  0x14
0055cbf7      [0x27] =  0x14
0055cbf8      [0x28] =  0x14
0055cbf9      [0x29] =  0x14
0055cbfa      [0x2a] =  0x14
0055cbfb      [0x2b] =  0x14
0055cbfc      [0x2c] =  0x14
0055cbfd      [0x2d] =  0x14
0055cbfe      [0x2e] =  0x14
0055cbff      [0x2f] =  0x14
0055cc00      [0x30] =  0x14
0055cc01      [0x31] =  0x14
0055cc02      [0x32] =  0x14
0055cc03      [0x33] =  0x14
0055cc04      [0x34] =  0x14
0055cc05      [0x35] =  0x14
0055cc06      [0x36] =  0x14
0055cc07      [0x37] =  0x14
0055cc08      [0x38] =  0x14
0055cc09      [0x39] =  0x14
0055cc0a      [0x3a] =  0x14
0055cc0b      [0x3b] =  0x14
0055cc0c      [0x3c] =  0x14
0055cc0d      [0x3d] =  0x14
0055cc0e      [0x3e] =  0x14
0055cc0f      [0x3f] =  0x14
0055cc10      [0x40] =  0x14
0055cc11      [0x41] =  0x14
0055cc12      [0x42] =  0x14
0055cc13      [0x43] =  0x14
0055cc14      [0x44] =  0x14
0055cc15      [0x45] =  0x14
0055cc16      [0x46] =  0x14
0055cc17      [0x47] =  0x14
0055cc18      [0x48] =  0x14
0055cc19      [0x49] =  0x14
0055cc1a      [0x4a] =  0x14
0055cc1b      [0x4b] =  0x14
0055cc1c      [0x4c] =  0x14
0055cc1d      [0x4d] =  0x14
0055cc1e      [0x4e] =  0x14
0055cc1f      [0x4f] =  0x14
0055cc20      [0x50] =  0x14
0055cc21      [0x51] =  0x14
0055cc22      [0x52] =  0x14
0055cc23      [0x53] =  0x14
0055cc24      [0x54] =  0x14
0055cc25      [0x55] =  0x14
0055cc26      [0x56] =  0x14
0055cc27      [0x57] =  0x14
0055cc28      [0x58] =  0x14
0055cc29      [0x59] =  0x14
0055cc2a      [0x5a] =  0x14
0055cc2b      [0x5b] =  0x14
0055cc2c      [0x5c] =  0x14
0055cc2d      [0x5d] =  0x14
0055cc2e      [0x5e] =  0x14
0055cc2f      [0x5f] =  0x14
0055cc30      [0x60] =  0x14
0055cc31      [0x61] =  0x14
0055cc32      [0x62] =  0x14
0055cc33      [0x63] =  0x14
0055cc34      [0x64] =  0x14
0055cc35      [0x65] =  0x14
0055cc36      [0x66] =  0x14
0055cc37      [0x67] =  0x14
0055cc38      [0x68] =  0x14
0055cc39      [0x69] =  0x14
0055cc3a      [0x6a] =  0x14
0055cc3b      [0x6b] =  0x14
0055cc3c      [0x6c] =  0x14
0055cc3d      [0x6d] =  0x14
0055cc3e      [0x6e] =  0x14
0055cc3f      [0x6f] =  0x14
0055cc40      [0x70] =  0x14
0055cc41      [0x71] =  0x14
0055cc42      [0x72] =  0x14
0055cc43      [0x73] =  0x14
0055cc44      [0x74] =  0x14
0055cc45      [0x75] =  0x14
0055cc46      [0x76] =  0x14
0055cc47      [0x77] =  0x14
0055cc48      [0x78] =  0x14
0055cc49      [0x79] =  0x14
0055cc4a      [0x7a] =  0x14
0055cc4b      [0x7b] =  0x14
0055cc4c      [0x7c] =  0x14
0055cc4d      [0x7d] =  0x14
0055cc4e      [0x7e] =  0x01
0055cc4f      [0x7f] =  0x02
0055cc50      [0x80] =  0x03
0055cc51      [0x81] =  0x14
0055cc52      [0x82] =  0x14
0055cc53      [0x83] =  0x14
0055cc54      [0x84] =  0x14
0055cc55      [0x85] =  0x14
0055cc56      [0x86] =  0x14
0055cc57      [0x87] =  0x14
0055cc58      [0x88] =  0x14
0055cc59      [0x89] =  0x14
0055cc5a      [0x8a] =  0x14
0055cc5b      [0x8b] =  0x14
0055cc5c      [0x8c] =  0x14
0055cc5d      [0x8d] =  0x14
0055cc5e      [0x8e] =  0x14
0055cc5f      [0x8f] =  0x14
0055cc60      [0x90] =  0x14
0055cc61      [0x91] =  0x14
0055cc62      [0x92] =  0x14
0055cc63      [0x93] =  0x14
0055cc64      [0x94] =  0x14
0055cc65      [0x95] =  0x14
0055cc66      [0x96] =  0x14
0055cc67      [0x97] =  0x14
0055cc68      [0x98] =  0x14
0055cc69      [0x99] =  0x14
0055cc6a      [0x9a] =  0x14
0055cc6b      [0x9b] =  0x14
0055cc6c      [0x9c] =  0x14
0055cc6d      [0x9d] =  0x14
0055cc6e      [0x9e] =  0x14
0055cc6f      [0x9f] =  0x14
0055cc70      [0xa0] =  0x14
0055cc71      [0xa1] =  0x14
0055cc72      [0xa2] =  0x14
0055cc73      [0xa3] =  0x14
0055cc74      [0xa4] =  0x14
0055cc75      [0xa5] =  0x14
0055cc76      [0xa6] =  0x14
0055cc77      [0xa7] =  0x14
0055cc78      [0xa8] =  0x14
0055cc79      [0xa9] =  0x14
0055cc7a      [0xaa] =  0x14
0055cc7b      [0xab] =  0x14
0055cc7c      [0xac] =  0x14
0055cc7d      [0xad] =  0x14
0055cc7e      [0xae] =  0x14
0055cc7f      [0xaf] =  0x14
0055cc80      [0xb0] =  0x14
0055cc81      [0xb1] =  0x14
0055cc82      [0xb2] =  0x14
0055cc83      [0xb3] =  0x14
0055cc84      [0xb4] =  0x14
0055cc85      [0xb5] =  0x14
0055cc86      [0xb6] =  0x14
0055cc87      [0xb7] =  0x14
0055cc88      [0xb8] =  0x14
0055cc89      [0xb9] =  0x14
0055cc8a      [0xba] =  0x14
0055cc8b      [0xbb] =  0x14
0055cc8c      [0xbc] =  0x14
0055cc8d      [0xbd] =  0x14
0055cc8e      [0xbe] =  0x14
0055cc8f      [0xbf] =  0x14
0055cc90      [0xc0] =  0x14
0055cc91      [0xc1] =  0x14
0055cc92      [0xc2] =  0x14
0055cc93      [0xc3] =  0x14
0055cc94      [0xc4] =  0x14
0055cc95      [0xc5] =  0x14
0055cc96      [0xc6] =  0x14
0055cc97      [0xc7] =  0x14
0055cc98      [0xc8] =  0x14
0055cc99      [0xc9] =  0x14
0055cc9a      [0xca] =  0x14
0055cc9b      [0xcb] =  0x14
0055cc9c      [0xcc] =  0x14
0055cc9d      [0xcd] =  0x04
0055cc9e      [0xce] =  0x05
0055cc9f      [0xcf] =  0x14
0055cca0      [0xd0] =  0x14
0055cca1      [0xd1] =  0x06
0055cca2      [0xd2] =  0x14
0055cca3      [0xd3] =  0x14
0055cca4      [0xd4] =  0x14
0055cca5      [0xd5] =  0x07
0055cca6      [0xd6] =  0x14
0055cca7      [0xd7] =  0x14
0055cca8      [0xd8] =  0x14
0055cca9      [0xd9] =  0x14
0055ccaa      [0xda] =  0x14
0055ccab      [0xdb] =  0x14
0055ccac      [0xdc] =  0x14
0055ccad      [0xdd] =  0x14
0055ccae      [0xde] =  0x08
0055ccaf      [0xdf] =  0x09
0055ccb0      [0xe0] =  0x14
0055ccb1      [0xe1] =  0x14
0055ccb2      [0xe2] =  0x14
0055ccb3      [0xe3] =  0x0a
0055ccb4      [0xe4] =  0x0b
0055ccb5      [0xe5] =  0x14
0055ccb6      [0xe6] =  0x14
0055ccb7      [0xe7] =  0x14
0055ccb8      [0xe8] =  0x0c
0055ccb9      [0xe9] =  0x0d
0055ccba      [0xea] =  0x0e
0055ccbb      [0xeb] =  0x0f
0055ccbc      [0xec] =  0x14
0055ccbd      [0xed] =  0x14
0055ccbe      [0xee] =  0x14
0055ccbf      [0xef] =  0x10
0055ccc0      [0xf0] =  0x14
0055ccc1      [0xf1] =  0x14
0055ccc2      [0xf2] =  0x14
0055ccc3      [0xf3] =  0x14
0055ccc4      [0xf4] =  0x14
0055ccc5      [0xf5] =  0x14
0055ccc6      [0xf6] =  0x14
0055ccc7      [0xf7] =  0x11
0055ccc8      [0xf8] =  0x14
0055ccc9      [0xf9] =  0x14
0055ccca      [0xfa] =  0x12
0055cccb      [0xfb] =  0x14
0055cccc      [0xfc] =  0x14
0055cccd      [0xfd] =  0x14
0055ccce      [0xfe] =  0x13
0055cccf  }

0055cccf                                               90                                                                 .
0055ccd0  uint32_t jump_table_55ccd0[0x2a] = 
0055ccd0  {
0055ccd0      [0x00] =  0x0055bc7a
0055ccd4      [0x01] =  0x0055bd92
0055ccd8      [0x02] =  0x0055be3a
0055ccdc      [0x03] =  0x0055befe
0055cce0      [0x04] =  0x0055bdca
0055cce4      [0x05] =  0x0055be8e
0055cce8      [0x06] =  0x0055be02
0055ccec      [0x07] =  0x0055bec6
0055ccf0      [0x08] =  0x0055be72
0055ccf4      [0x09] =  0x0055bf36
0055ccf8      [0x0a] =  0x0055bde6
0055ccfc      [0x0b] =  0x0055beaa
0055cd00      [0x0c] =  0x0055be1e
0055cd04      [0x0d] =  0x0055bee2
0055cd08      [0x0e] =  0x0055be56
0055cd0c      [0x0f] =  0x0055bf1a
0055cd10      [0x10] =  0x0055bc26
0055cd14      [0x11] =  0x0055bc42
0055cd18      [0x12] =  0x0055bc0a
0055cd1c      [0x13] =  0x0055bc5e
0055cd20      [0x14] =  0x0055bffa
0055cd24      [0x15] =  0x0055bfde
0055cd28      [0x16] =  0x0055bfa6
0055cd2c      [0x17] =  0x0055bf6e
0055cd30      [0x18] =  0x0055c016
0055cd34      [0x19] =  0x0055bf52
0055cd38      [0x1a] =  0x0055bfc2
0055cd3c      [0x1b] =  0x0055c032
0055cd40      [0x1c] =  0x0055c04e
0055cd44      [0x1d] =  0x0055bf8a
0055cd48      [0x1e] =  0x0055bcce
0055cd4c      [0x1f] =  0x0055bcb2
0055cd50      [0x20] =  0x0055bcea
0055cd54      [0x21] =  0x0055bd5a
0055cd58      [0x22] =  0x0055bd3e
0055cd5c      [0x23] =  0x0055bd76
0055cd60      [0x24] =  0x0055bd22
0055cd64      [0x25] =  0x0055bd06
0055cd68      [0x26] =  0x0055bdae
0055cd6c      [0x27] =  0x0055bc96
0055cd70      [0x28] =  0x0055bbee
0055cd74      [0x29] =  0x0055ca5c
0055cd78  }
0055cd78  uint8_t lookup_table_55cd78[0xab] = 
0055cd78  {
0055cd78      [0x00] =  0x00
0055cd79      [0x01] =  0x01
0055cd7a      [0x02] =  0x29
0055cd7b      [0x03] =  0x29
0055cd7c      [0x04] =  0x29
0055cd7d      [0x05] =  0x29
0055cd7e      [0x06] =  0x29
0055cd7f      [0x07] =  0x02
0055cd80      [0x08] =  0x03
0055cd81      [0x09] =  0x04
0055cd82      [0x0a] =  0x05
0055cd83      [0x0b] =  0x06
0055cd84      [0x0c] =  0x07
0055cd85      [0x0d] =  0x08
0055cd86      [0x0e] =  0x09
0055cd87      [0x0f] =  0x0a
0055cd88      [0x10] =  0x0b
0055cd89      [0x11] =  0x0c
0055cd8a      [0x12] =  0x0d
0055cd8b      [0x13] =  0x0e
0055cd8c      [0x14] =  0x0f
0055cd8d      [0x15] =  0x29
0055cd8e      [0x16] =  0x10
0055cd8f      [0x17] =  0x29
0055cd90      [0x18] =  0x11
0055cd91      [0x19] =  0x29
0055cd92      [0x1a] =  0x29
0055cd93      [0x1b] =  0x29
0055cd94      [0x1c] =  0x29
0055cd95      [0x1d] =  0x29
0055cd96      [0x1e] =  0x29
0055cd97      [0x1f] =  0x29
0055cd98      [0x20] =  0x12
0055cd99      [0x21] =  0x29
0055cd9a      [0x22] =  0x29
0055cd9b      [0x23] =  0x29
0055cd9c      [0x24] =  0x29
0055cd9d      [0x25] =  0x29
0055cd9e      [0x26] =  0x29
0055cd9f      [0x27] =  0x29
0055cda0      [0x28] =  0x29
0055cda1      [0x29] =  0x29
0055cda2      [0x2a] =  0x13
0055cda3      [0x2b] =  0x29
0055cda4      [0x2c] =  0x29
0055cda5      [0x2d] =  0x29
0055cda6      [0x2e] =  0x29
0055cda7      [0x2f] =  0x29
0055cda8      [0x30] =  0x29
0055cda9      [0x31] =  0x29
0055cdaa      [0x32] =  0x29
0055cdab      [0x33] =  0x14
0055cdac      [0x34] =  0x15
0055cdad      [0x35] =  0x16
0055cdae      [0x36] =  0x17
0055cdaf      [0x37] =  0x18
0055cdb0      [0x38] =  0x19
0055cdb1      [0x39] =  0x1a
0055cdb2      [0x3a] =  0x29
0055cdb3      [0x3b] =  0x1b
0055cdb4      [0x3c] =  0x29
0055cdb5      [0x3d] =  0x1c
0055cdb6      [0x3e] =  0x1d
0055cdb7      [0x3f] =  0x29
0055cdb8      [0x40] =  0x29
0055cdb9      [0x41] =  0x29
0055cdba      [0x42] =  0x29
0055cdbb      [0x43] =  0x29
0055cdbc      [0x44] =  0x29
0055cdbd      [0x45] =  0x29
0055cdbe      [0x46] =  0x29
0055cdbf      [0x47] =  0x29
0055cdc0      [0x48] =  0x29
0055cdc1      [0x49] =  0x29
0055cdc2      [0x4a] =  0x29
0055cdc3      [0x4b] =  0x29
0055cdc4      [0x4c] =  0x29
0055cdc5      [0x4d] =  0x29
0055cdc6      [0x4e] =  0x29
0055cdc7      [0x4f] =  0x29
0055cdc8      [0x50] =  0x29
0055cdc9      [0x51] =  0x29
0055cdca      [0x52] =  0x29
0055cdcb      [0x53] =  0x1e
0055cdcc      [0x54] =  0x29
0055cdcd      [0x55] =  0x29
0055cdce      [0x56] =  0x29
0055cdcf      [0x57] =  0x29
0055cdd0      [0x58] =  0x29
0055cdd1      [0x59] =  0x29
0055cdd2      [0x5a] =  0x29
0055cdd3      [0x5b] =  0x1f
0055cdd4      [0x5c] =  0x20
0055cdd5      [0x5d] =  0x21
0055cdd6      [0x5e] =  0x22
0055cdd7      [0x5f] =  0x29
0055cdd8      [0x60] =  0x29
0055cdd9      [0x61] =  0x29
0055cdda      [0x62] =  0x29
0055cddb      [0x63] =  0x29
0055cddc      [0x64] =  0x29
0055cddd      [0x65] =  0x29
0055cdde      [0x66] =  0x29
0055cddf      [0x67] =  0x29
0055cde0      [0x68] =  0x29
0055cde1      [0x69] =  0x29
0055cde2      [0x6a] =  0x29
0055cde3      [0x6b] =  0x29
0055cde4      [0x6c] =  0x29
0055cde5      [0x6d] =  0x29
0055cde6      [0x6e] =  0x29
0055cde7      [0x6f] =  0x29
0055cde8      [0x70] =  0x29
0055cde9      [0x71] =  0x29
0055cdea      [0x72] =  0x29
0055cdeb      [0x73] =  0x29
0055cdec      [0x74] =  0x29
0055cded      [0x75] =  0x29
0055cdee      [0x76] =  0x29
0055cdef      [0x77] =  0x29
0055cdf0      [0x78] =  0x29
0055cdf1      [0x79] =  0x29
0055cdf2      [0x7a] =  0x29
0055cdf3      [0x7b] =  0x29
0055cdf4      [0x7c] =  0x29
0055cdf5      [0x7d] =  0x29
0055cdf6      [0x7e] =  0x23
0055cdf7      [0x7f] =  0x29
0055cdf8      [0x80] =  0x29
0055cdf9      [0x81] =  0x29
0055cdfa      [0x82] =  0x29
0055cdfb      [0x83] =  0x29
0055cdfc      [0x84] =  0x29
0055cdfd      [0x85] =  0x29
0055cdfe      [0x86] =  0x29
0055cdff      [0x87] =  0x29
0055ce00      [0x88] =  0x29
0055ce01      [0x89] =  0x29
0055ce02      [0x8a] =  0x29
0055ce03      [0x8b] =  0x29
0055ce04      [0x8c] =  0x29
0055ce05      [0x8d] =  0x24
0055ce06      [0x8e] =  0x29
0055ce07      [0x8f] =  0x25
0055ce08      [0x90] =  0x29
0055ce09      [0x91] =  0x29
0055ce0a      [0x92] =  0x29
0055ce0b      [0x93] =  0x29
0055ce0c      [0x94] =  0x29
0055ce0d      [0x95] =  0x29
0055ce0e      [0x96] =  0x29
0055ce0f      [0x97] =  0x29
0055ce10      [0x98] =  0x29
0055ce11      [0x99] =  0x29
0055ce12      [0x9a] =  0x26
0055ce13      [0x9b] =  0x29
0055ce14      [0x9c] =  0x29
0055ce15      [0x9d] =  0x29
0055ce16      [0x9e] =  0x29
0055ce17      [0x9f] =  0x29
0055ce18      [0xa0] =  0x29
0055ce19      [0xa1] =  0x29
0055ce1a      [0xa2] =  0x29
0055ce1b      [0xa3] =  0x29
0055ce1c      [0xa4] =  0x29
0055ce1d      [0xa5] =  0x29
0055ce1e      [0xa6] =  0x29
0055ce1f      [0xa7] =  0x27
0055ce20      [0xa8] =  0x29
0055ce21      [0xa9] =  0x29
0055ce22      [0xaa] =  0x28
0055ce23  }

0055ce23           90                                                                                         .
0055ce24  uint32_t jump_table_55ce24[0x2a] = 
0055ce24  {
0055ce24      [0x00] =  0x0055c125
0055ce28      [0x01] =  0x0055c109
0055ce2c      [0x02] =  0x0055c259
0055ce30      [0x03] =  0x0055c2c9
0055ce34      [0x04] =  0x0055c275
0055ce38      [0x05] =  0x0055c2ad
0055ce3c      [0x06] =  0x0055c291
0055ce40      [0x07] =  0x0055c1b1
0055ce44      [0x08] =  0x0055c1cd
0055ce48      [0x09] =  0x0055c23d
0055ce4c      [0x0a] =  0x0055c195
0055ce50      [0x0b] =  0x0055c0d1
0055ce54      [0x0c] =  0x0055c0b5
0055ce58      [0x0d] =  0x0055c0ed
0055ce5c      [0x0e] =  0x0055c2e5
0055ce60      [0x0f] =  0x0055c451
0055ce64      [0x10] =  0x0055c4c1
0055ce68      [0x11] =  0x0055c179
0055ce6c      [0x12] =  0x0055c15d
0055ce70      [0x13] =  0x0055c141
0055ce74      [0x14] =  0x0055c205
0055ce78      [0x15] =  0x0055c1e9
0055ce7c      [0x16] =  0x0055c221
0055ce80      [0x17] =  0x0055c3c5
0055ce84      [0x18] =  0x0055c38d
0055ce88      [0x19] =  0x0055c355
0055ce8c      [0x1a] =  0x0055c3a9
0055ce90      [0x1b] =  0x0055c371
0055ce94      [0x1c] =  0x0055c339
0055ce98      [0x1d] =  0x0055c301
0055ce9c      [0x1e] =  0x0055c31d
0055cea0      [0x1f] =  0x0055c3fd
0055cea4      [0x20] =  0x0055c419
0055cea8      [0x21] =  0x0055c3e1
0055ceac      [0x22] =  0x0055c435
0055ceb0      [0x23] =  0x0055c489
0055ceb4      [0x24] =  0x0055c4f9
0055ceb8      [0x25] =  0x0055c4a5
0055cebc      [0x26] =  0x0055c515
0055cec0      [0x27] =  0x0055c46d
0055cec4      [0x28] =  0x0055c4dd
0055cec8      [0x29] =  0x0055ca5c
0055cecc  }
0055cecc  uint8_t lookup_table_55cecc[0x59] = 
0055cecc  {
0055cecc      [0x00] =  0x00
0055cecd      [0x01] =  0x29
0055cece      [0x02] =  0x01
0055cecf      [0x03] =  0x29
0055ced0      [0x04] =  0x29
0055ced1      [0x05] =  0x29
0055ced2      [0x06] =  0x29
0055ced3      [0x07] =  0x02
0055ced4      [0x08] =  0x03
0055ced5      [0x09] =  0x04
0055ced6      [0x0a] =  0x05
0055ced7      [0x0b] =  0x06
0055ced8      [0x0c] =  0x29
0055ced9      [0x0d] =  0x29
0055ceda      [0x0e] =  0x29
0055cedb      [0x0f] =  0x29
0055cedc      [0x10] =  0x07
0055cedd      [0x11] =  0x08
0055cede      [0x12] =  0x09
0055cedf      [0x13] =  0x29
0055cee0      [0x14] =  0x29
0055cee1      [0x15] =  0x29
0055cee2      [0x16] =  0x29
0055cee3      [0x17] =  0x29
0055cee4      [0x18] =  0x29
0055cee5      [0x19] =  0x29
0055cee6      [0x1a] =  0x29
0055cee7      [0x1b] =  0x0a
0055cee8      [0x1c] =  0x29
0055cee9      [0x1d] =  0x29
0055ceea      [0x1e] =  0x29
0055ceeb      [0x1f] =  0x29
0055ceec      [0x20] =  0x29
0055ceed      [0x21] =  0x29
0055ceee      [0x22] =  0x29
0055ceef      [0x23] =  0x29
0055cef0      [0x24] =  0x29
0055cef1      [0x25] =  0x29
0055cef2      [0x26] =  0x29
0055cef3      [0x27] =  0x29
0055cef4      [0x28] =  0x29
0055cef5      [0x29] =  0x29
0055cef6      [0x2a] =  0x29
0055cef7      [0x2b] =  0x29
0055cef8      [0x2c] =  0x29
0055cef9      [0x2d] =  0x29
0055cefa      [0x2e] =  0x29
0055cefb      [0x2f] =  0x29
0055cefc      [0x30] =  0x29
0055cefd      [0x31] =  0x29
0055cefe      [0x32] =  0x29
0055ceff      [0x33] =  0x29
0055cf00      [0x34] =  0x0b
0055cf01      [0x35] =  0x29
0055cf02      [0x36] =  0x29
0055cf03      [0x37] =  0x0c
0055cf04      [0x38] =  0x29
0055cf05      [0x39] =  0x0d
0055cf06      [0x3a] =  0x0e
0055cf07      [0x3b] =  0x29
0055cf08      [0x3c] =  0x29
0055cf09      [0x3d] =  0x29
0055cf0a      [0x3e] =  0x0f
0055cf0b      [0x3f] =  0x10
0055cf0c      [0x40] =  0x29
0055cf0d      [0x41] =  0x11
0055cf0e      [0x42] =  0x12
0055cf0f      [0x43] =  0x13
0055cf10      [0x44] =  0x14
0055cf11      [0x45] =  0x15
0055cf12      [0x46] =  0x16
0055cf13      [0x47] =  0x17
0055cf14      [0x48] =  0x18
0055cf15      [0x49] =  0x19
0055cf16      [0x4a] =  0x1a
0055cf17      [0x4b] =  0x1b
0055cf18      [0x4c] =  0x1c
0055cf19      [0x4d] =  0x1d
0055cf1a      [0x4e] =  0x1e
0055cf1b      [0x4f] =  0x1f
0055cf1c      [0x50] =  0x20
0055cf1d      [0x51] =  0x21
0055cf1e      [0x52] =  0x22
0055cf1f      [0x53] =  0x23
0055cf20      [0x54] =  0x24
0055cf21      [0x55] =  0x25
0055cf22      [0x56] =  0x26
0055cf23      [0x57] =  0x27
0055cf24      [0x58] =  0x28
0055cf25  }

0055cf25                 8d 49 00                                                                               .I.
0055cf28  uint32_t jump_table_55cf28[0x1b] = 
0055cf28  {
0055cf28      [0x00] =  0x0055c758
0055cf2c      [0x01] =  0x0055c838
0055cf30      [0x02] =  0x0055c624
0055cf34      [0x03] =  0x0055c73c
0055cf38      [0x04] =  0x0055c640
0055cf3c      [0x05] =  0x0055c774
0055cf40      [0x06] =  0x0055c65c
0055cf44      [0x07] =  0x0055c790
0055cf48      [0x08] =  0x0055c678
0055cf4c      [0x09] =  0x0055c7ac
0055cf50      [0x0a] =  0x0055c6b0
0055cf54      [0x0b] =  0x0055c7e4
0055cf58      [0x0c] =  0x0055c694
0055cf5c      [0x0d] =  0x0055c7c8
0055cf60      [0x0e] =  0x0055c5b4
0055cf64      [0x0f] =  0x0055c6cc
0055cf68      [0x10] =  0x0055c608
0055cf6c      [0x11] =  0x0055c720
0055cf70      [0x12] =  0x0055c5d0
0055cf74      [0x13] =  0x0055c6e8
0055cf78      [0x14] =  0x0055c5ec
0055cf7c      [0x15] =  0x0055c704
0055cf80      [0x16] =  0x0055c57c
0055cf84      [0x17] =  0x0055c598
0055cf88      [0x18] =  0x0055c81c
0055cf8c      [0x19] =  0x0055c800
0055cf90      [0x1a] =  0x0055ca5c
0055cf94  }
0055cf94  uint8_t lookup_table_55cf94[0x42] = 
0055cf94  {
0055cf94      [0x00] =  0x00
0055cf95      [0x01] =  0x01
0055cf96      [0x02] =  0x01
0055cf97      [0x03] =  0x02
0055cf98      [0x04] =  0x03
0055cf99      [0x05] =  0x04
0055cf9a      [0x06] =  0x05
0055cf9b      [0x07] =  0x06
0055cf9c      [0x08] =  0x07
0055cf9d      [0x09] =  0x08
0055cf9e      [0x0a] =  0x09
0055cf9f      [0x0b] =  0x0a
0055cfa0      [0x0c] =  0x0b
0055cfa1      [0x0d] =  0x0c
0055cfa2      [0x0e] =  0x0d
0055cfa3      [0x0f] =  0x0e
0055cfa4      [0x10] =  0x0f
0055cfa5      [0x11] =  0x10
0055cfa6      [0x12] =  0x11
0055cfa7      [0x13] =  0x12
0055cfa8      [0x14] =  0x13
0055cfa9      [0x15] =  0x14
0055cfaa      [0x16] =  0x15
0055cfab      [0x17] =  0x16
0055cfac      [0x18] =  0x1a
0055cfad      [0x19] =  0x1a
0055cfae      [0x1a] =  0x1a
0055cfaf      [0x1b] =  0x1a
0055cfb0      [0x1c] =  0x1a
0055cfb1      [0x1d] =  0x1a
0055cfb2      [0x1e] =  0x1a
0055cfb3      [0x1f] =  0x1a
0055cfb4      [0x20] =  0x1a
0055cfb5      [0x21] =  0x1a
0055cfb6      [0x22] =  0x1a
0055cfb7      [0x23] =  0x1a
0055cfb8      [0x24] =  0x1a
0055cfb9      [0x25] =  0x1a
0055cfba      [0x26] =  0x1a
0055cfbb      [0x27] =  0x1a
0055cfbc      [0x28] =  0x1a
0055cfbd      [0x29] =  0x1a
0055cfbe      [0x2a] =  0x1a
0055cfbf      [0x2b] =  0x1a
0055cfc0      [0x2c] =  0x1a
0055cfc1      [0x2d] =  0x1a
0055cfc2      [0x2e] =  0x1a
0055cfc3      [0x2f] =  0x1a
0055cfc4      [0x30] =  0x1a
0055cfc5      [0x31] =  0x1a
0055cfc6      [0x32] =  0x1a
0055cfc7      [0x33] =  0x1a
0055cfc8      [0x34] =  0x1a
0055cfc9      [0x35] =  0x1a
0055cfca      [0x36] =  0x1a
0055cfcb      [0x37] =  0x1a
0055cfcc      [0x38] =  0x1a
0055cfcd      [0x39] =  0x1a
0055cfce      [0x3a] =  0x1a
0055cfcf      [0x3b] =  0x1a
0055cfd0      [0x3c] =  0x1a
0055cfd1      [0x3d] =  0x1a
0055cfd2      [0x3e] =  0x17
0055cfd3      [0x3f] =  0x1a
0055cfd4      [0x40] =  0x18
0055cfd5      [0x41] =  0x19
0055cfd6  }

0055cfd6                                                                    8b ff                                                ..
0055cfd8  uint32_t jump_table_55cfd8[0x8] = 
0055cfd8  {
0055cfd8      [0x0] =  0x0055c89e
0055cfdc      [0x1] =  0x0055c90c
0055cfe0      [0x2] =  0x0055c8e8
0055cfe4      [0x3] =  0x0055c960
0055cfe8      [0x4] =  0x0055c949
0055cfec      [0x5] =  0x0055c977
0055cff0      [0x6] =  0x0055c925
0055cff4      [0x7] =  0x0055ca5c
0055cff8  }
0055cff8  uint8_t lookup_table_55cff8[0x2a] = 
0055cff8  {
0055cff8      [0x00] =  0x00
0055cff9      [0x01] =  0x07
0055cffa      [0x02] =  0x07
0055cffb      [0x03] =  0x07
0055cffc      [0x04] =  0x07
0055cffd      [0x05] =  0x07
0055cffe      [0x06] =  0x07
0055cfff      [0x07] =  0x07
0055d000      [0x08] =  0x07
0055d001      [0x09] =  0x07
0055d002      [0x0a] =  0x07
0055d003      [0x0b] =  0x07
0055d004      [0x0c] =  0x07
0055d005      [0x0d] =  0x07
0055d006      [0x0e] =  0x07
0055d007      [0x0f] =  0x07
0055d008      [0x10] =  0x07
0055d009      [0x11] =  0x07
0055d00a      [0x12] =  0x07
0055d00b      [0x13] =  0x01
0055d00c      [0x14] =  0x07
0055d00d      [0x15] =  0x07
0055d00e      [0x16] =  0x07
0055d00f      [0x17] =  0x07
0055d010      [0x18] =  0x07
0055d011      [0x19] =  0x07
0055d012      [0x1a] =  0x07
0055d013      [0x1b] =  0x07
0055d014      [0x1c] =  0x07
0055d015      [0x1d] =  0x07
0055d016      [0x1e] =  0x07
0055d017      [0x1f] =  0x07
0055d018      [0x20] =  0x07
0055d019      [0x21] =  0x02
0055d01a      [0x22] =  0x07
0055d01b      [0x23] =  0x03
0055d01c      [0x24] =  0x07
0055d01d      [0x25] =  0x04
0055d01e      [0x26] =  0x07
0055d01f      [0x27] =  0x07
0055d020      [0x28] =  0x05
0055d021      [0x29] =  0x06
0055d022  }

0055d022        8b ff                                                                                        ..
0055d024  uint32_t jump_table_55d024[0x7] = 
0055d024  {
0055d024      [0x0] =  0x0055c9c6
0055d028      [0x1] =  0x0055c9e2
0055d02c      [0x2] =  0x0055ca52
0055d030      [0x3] =  0x0055c9fe
0055d034      [0x4] =  0x0055ca1a
0055d038      [0x5] =  0x0055ca36
0055d03c      [0x6] =  0x0055ca5c
0055d040  }
0055d040  uint8_t lookup_table_55d040[0x18] = 
0055d040  {
0055d040      [0x00] =  0x00
0055d041      [0x01] =  0x01
0055d042      [0x02] =  0x06
0055d043      [0x03] =  0x06
0055d044      [0x04] =  0x06
0055d045      [0x05] =  0x06
0055d046      [0x06] =  0x06
0055d047      [0x07] =  0x06
0055d048      [0x08] =  0x06
0055d049      [0x09] =  0x06
0055d04a      [0x0a] =  0x06
0055d04b      [0x0b] =  0x06
0055d04c      [0x0c] =  0x06
0055d04d      [0x0d] =  0x06
0055d04e      [0x0e] =  0x06
0055d04f      [0x0f] =  0x06
0055d050      [0x10] =  0x06
0055d051      [0x11] =  0x06
0055d052      [0x12] =  0x02
0055d053      [0x13] =  0x06
0055d054      [0x14] =  0x06
0055d055      [0x15] =  0x03
0055d056      [0x16] =  0x04
0055d057      [0x17] =  0x05
0055d058  }

0055d058                                                                          90 90 90 90 90 90 90 90                          ........

0055d060  void __thiscall UIQueueManager::ProcessOrderedNetBlob(class UIQueueManager* this, class NetBlob* arg2)

0055d060  {
0055d063      class NetBlob* eax = arg2;
0055d068      uint32_t bufSize_ = eax->bufSize_;
0055d078      arg2 = eax->buf_;
0055d081      int32_t var_10 = 0x7cc3e4;
0055d089      int32_t var_8 = 0;
0055d08d      int32_t var_4 = 0;
0055d091      WOrderHdr::UnPack(&var_10, &arg2, bufSize_);
0055d09a      RenderSurface::GetDBOType(&var_10);
0055d0a9      UIQueueManager::ProcessNetBlobData(this, arg2, (bufSize_ - 0xc));
0055d060  }

0055d0b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0055d0c0  void __thiscall UIQueueManager::ProcessEphemeralNetBlob(class UIQueueManager* this, class NetBlob* arg2)

0055d0c0  {
0055d0d0      class NetBlob* edi = arg2;
0055d0d0      
0055d0d4      if (this->m_fCrucialOrderedEventsReceived == 0)
0055d0d4      {
0055d0da          InterlockedIncrement(&edi->m_cRef);
0055d0e2          class NIListElement<NetBlob *>* eax_2 = operator new(8);
0055d0e2          
0055d0ec          if (eax_2 == 0)
0055d0f5              eax_2 = nullptr;
0055d0ec          else
0055d0ec          {
0055d0ee              eax_2->data_ = edi;
0055d0f0              eax_2->next_ = nullptr;
0055d0ec          }
0055d0ec          
0055d0f7          class NIListElement<NetBlob *>* tail_ = this->m_rgWaitingBlobs.tail_;
0055d0f7          
0055d0fc          if (tail_ != 0)
0055d0fc          {
0055d10e              tail_->next_ = eax_2;
0055d117              this->m_rgWaitingBlobs.tail_ = this->m_rgWaitingBlobs.tail_->next_;
0055d121              return;
0055d0fc          }
0055d0fc          
0055d0fe          this->m_rgWaitingBlobs.head_ = eax_2;
0055d101          this->m_rgWaitingBlobs.tail_ = eax_2;
0055d10b          return;
0055d0d4      }
0055d0d4      
0055d124      uint32_t bufSize_ = edi->bufSize_;
0055d12b      void* buf_ = edi->buf_;
0055d12e      uint32_t eax_3 = UIQueueManager::ProcessNetBlobData(this, buf_, bufSize_);
0055d12e      void* __saved_edi;
0055d12e      void** esp = &__saved_edi;
0055d12e      
0055d137      if (eax_3 != 0)
0055d137      {
0055d13d          class NetBlob** var_24_3 = &arg2;
0055d142          buf_ = &ClientObjMaintSystem_ClassType;
0055d148          arg2 = nullptr;
0055d153          class TResult __return;
0055d153          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, buf_, var_24_3);
0055d158          class NetBlob* buf_1 = arg2;
0055d161          buf_ = buf_1;
0055d163          int32_t var_24_4 = 0;
0055d166          void* buf = buf_;
0055d16c          int32_t var_8 = 0;
0055d170          int32_t var_4_1 = 0;
0055d170          
0055d174          if (buf != 0)
0055d17a              *(uint32_t*)(*(uint32_t*)buf + 0x10)();
0055d17a          
0055d186          void var_c;
0055d186          InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&var_8, &var_c);
0055d186          
0055d18d          if (buf_1 != 0)
0055d194              *(int32_t*)((char*)buf_1->vtable + 0x14)();
0055d194          
0055d199          class TResult __return_1 = __return;
0055d1a0          CObjectMaint::QueueBlobForWeenieObject((__return_1 + 8), eax_3, edi);
0055d1a0          esp = &buf_;
0055d1a0          
0055d1a7          if (__return_1 != 0)
0055d1ad              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0055d137      }
0055d137      
0055d1b0      *(uint32_t*)esp;
0055d1b0      esp[1];
0055d1b0      esp[2];
0055d1b0      esp[3];
0055d0c0  }

0055d1ba                                                                                90 90 90 90 90 90                            ......

0055d1c0  void __thiscall UIQueueManager::HandleOrderingForBlob(class UIQueueManager* this, class NetBlob* arg2)

0055d1c0  {
0055d1c4      class NetBlob* ebx_1 = arg2;
0055d1c8      uint8_t* buf__1 = ebx_1->buf_;
0055d1cd      uint32_t bufSize__1 = ebx_1->bufSize_;
0055d1da      uint8_t* var_28;
0055d1da      uint8_t* buf_ = &var_28;
0055d1df      class UIQueueManager* this_1 = this;
0055d1e3      var_28 = buf__1;
0055d1e7      uint32_t var_10 = 0x7cc3e4;
0055d1ef      int32_t var_8 = 0;
0055d1f3      class ReferenceCountTemplate<1048576,0>* var_4 = nullptr;
0055d1f3      
0055d1fe      if (WOrderHdr::UnPack(&var_10, buf_, bufSize__1) == 0)
0055d1fe      {
0055d200          uint32_t bufSize_ = ebx_1->bufSize_;
0055d207          buf_ = ebx_1->buf_;
0055d20a          UIQueueManager::ProcessNetBlobData(this, buf_, bufSize_);
0055d216          return;
0055d1fe      }
0055d1fe      
0055d21d      if (var_8 == 0)
0055d21d      {
0055d223          RenderSurface::GetDBOType(&var_10);
0055d22f          buf_ = var_28;
0055d232          UIQueueManager::ProcessNetBlobData(this, buf_, (bufSize__1 - 0xc));
0055d23e          return;
0055d21d      }
0055d21d      
0055d245      class NetBlob** var_3c_3 = &arg2;
0055d24a      buf_ = &CObjectMaint_ClassType;
0055d250      arg2 = nullptr;
0055d25b      class TResult __return;
0055d25b      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, buf_, var_3c_3);
0055d260      class NetBlob* buf_1 = arg2;
0055d269      buf_ = buf_1;
0055d26b      int32_t var_3c_4 = 0;
0055d26e      uint8_t* buf = buf_;
0055d274      int32_t var_18 = 0;
0055d278      int32_t var_14 = 0;
0055d278      
0055d27c      if (buf != 0)
0055d282          *(uint32_t*)(*(uint32_t*)buf + 0x10)();
0055d282      
0055d28e      void var_1c;
0055d28e      InterfacePtr<class CObjectMaint>::_QueryInterface(&var_18, &var_1c);
0055d28e      uint8_t** esp = &buf_;
0055d28e      
0055d295      if (buf_1 != 0)
0055d29b          *(int32_t*)((char*)buf_1->vtable + 0x14)();
0055d29b      
0055d29e      class TResult __return_1 = __return;
0055d29e      
0055d2a4      if (__return_1 != 0)
0055d2a4      {
0055d2ad          class CWeenieObject* eax_4 = CObjectMaint::GetWeenieObject(__return_1, var_10);
0055d2b6          uint32_t var_c;
0055d2b6          
0055d2b6          if (eax_4 == 0)
0055d312              CObjectMaint::QueueBlobForWeenieObject(__return_1, var_10, var_c, ebx_1);
0055d2b6          else
0055d2b6          {
0055d2c5              var_4 = nullptr;
0055d2c5              
0055d2cf              if (CWeenieObject::fIsNextBlob(eax_4, var_c, ebx_1, &var_4) == 1)
0055d2cf              {
0055d2dc                  int32_t* ebx;
0055d2dc                  *(uint32_t*)(*(uint32_t*)ebx + 0x24)(var_4);
0055d2df                  eax_4->vtable->process_netblobs();
0055d2cf              }
0055d2cf              
0055d2e6              class ReferenceCountTemplate<1048576,0>* ecx_13 = var_4;
0055d2e6              
0055d2ec              if (ecx_13 != 0)
0055d2ec              {
0055d2ee                  ReferenceCountTemplate<1048576,0>::Release(ecx_13);
0055d2f8                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0055d302                  return;
0055d2ec              }
0055d2b6          }
0055d31c          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0055d31c          uint8_t* __saved_edi;
0055d31c          esp = &__saved_edi;
0055d2a4      }
0055d2a4      
0055d31f      *(uint32_t*)esp;
0055d31f      esp[1];
0055d31f      esp[2];
0055d31f      esp[3];
0055d1c0  }

0055d329                             90 90 90 90 90 90 90                                                           .......

0055d330  void __fastcall UIQueueManager::UseTime(class UIQueueManager* this)

0055d330  {
0055d338      if (this->m_pUIQueue != 0)
0055d338      {
0055d346          while (true)
0055d346          {
0055d346              class NIList<NetBlob *>* m_pUIQueue = this->m_pUIQueue;
0055d349              class NIListElement<NetBlob *>* head_ = m_pUIQueue->head_;
0055d34d              class NetBlob* data_;
0055d34d              
0055d34d              if (head_ != 0)
0055d34d              {
0055d353                  class NIListElement<NetBlob *>* next_ = head_->next_;
0055d358                  m_pUIQueue->head_ = next_;
0055d358                  
0055d35a                  if (next_ == 0)
0055d35c                      m_pUIQueue->tail_ = next_;
0055d35c                  
0055d35f                  data_ = head_->data_;
0055d362                  operator delete(head_);
0055d34d              }
0055d34d              else
0055d34f                  data_ = nullptr;
0055d34f              
0055d36c              if (data_ == 0)
0055d36c                  break;
0055d36c              
0055d374              int32_t var_10_2 = *(uint32_t*)((char*)data_->id)[4];
0055d374              
0055d388              if (NetBlobIDUtils::GetOrderingType(data_->id) != 0x80000000)
0055d397                  UIQueueManager::HandleOrderingForBlob(this, data_);
0055d388              else
0055d38a                  this->vtable->ProcessEphemeralNetBlob(data_);
0055d38a              
0055d3a4              if (InterlockedDecrement(&data_->m_cRef) == 0)
0055d3a6                  data_->vtable->__vecDelDtor(1);
0055d346          }
0055d346          
0055d3b3          int32_t i = 0;
0055d3b3          
0055d3b7          if (this->m_rgSystems.m_num > 0)
0055d3b7          {
0055d3d1              do
0055d3d1              {
0055d3c0                  this->m_rgSystems.m_data[i]->vtable->UseTime();
0055d3ce                  i += 1;
0055d3d1              } while (i < this->m_rgSystems.m_num);
0055d3b7          }
0055d338      }
0055d330  }

0055d3d7                                                                       90 90 90 90 90 90 90 90 90                         .........

0055d3e0  int32_t __fastcall ACCWeenieObject::BlocksUseOfShield(class ACCWeenieObject* this)

0055d3e0  {
0055d3e0      enum COMBAT_USE _combatUse = this->pwd._combatUse;
0055d3e0      
0055d3fe      if (((_combatUse != COMBAT_USE_MISSILE || this->pwd._ammoType == AMMO_NONE) && _combatUse != COMBAT_USE_TWO_HANDED))
0055d40b          return ((this->vtable->InqType() >> 0xf) & 1);
0055d40b      
0055d3fa      return 1;
0055d3e0  }

0055d40c                                      90 90 90 90                                                              ....

0055d410  void __fastcall CPlayerSystem::Begin(class CPlayerSystem* this)

0055d410  {
0055d412      this->playerID = 0;
0055d418      this->allContainedObjectsReceived = 0;
0055d41e      this->player_initialized = 0;
0055d424      this->player_desc_received = 0;
0055d42a      this->playerInitTime = 0f;
0055d430      *(uint32_t*)((char*)this->playerInitTime)[4] = 0;
0055d436      this->inventoryMask = 0;
0055d43c      this->clothingPriorityMask = 0;
0055d442      this->teleportInProgress = 0;
0055d448      this->m_fLoad = 0f;
0055d44e      this->lastFullyMergedSrcID = 0;
0055d454      this->lastFullyMergedDstID = 0;
0055d45a      this->mOpenContainerID = 0;
0055d460      this->blockingID = 0;
0055d466      this->blockedID = 0;
0055d46c      this->blockingDestID = 0;
0055d472      this->unblockAttemptNum = 0;
0055d478      this->blockedSpellID = 0;
0055d47e      this->blockedSpellTargetID = 0;
0055d484      this->blockedSide = SLOT_SIDE_NULL;
0055d48a      this->componentTracker = nullptr;
0055d490      this->fReadyToEnterGame = 0;
0055d496      this->awaitingLogOn = 0;
0055d49c      this->sendLoginCompletePending = 0;
0055d4a2      this->initialLoginComplete = 0;
0055d410  }

0055d4a9                             90 90 90 90 90 90 90                                                           .......

0055d4b0  class CPlayerSystem* CPlayerSystem::GetPlayerSystem()

0055d4b0  {
0055d4b5      return CPlayerSystem::s_pPlayerSystem;
0055d4b0  }

0055d4b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0055d4c0  class ClientCharGenState* __fastcall CPlayerSystem::GetCharGenState(class CPlayerSystem* this)

0055d4c0  {
0055d4c8      if (this->m_pCharGenState == 0)
0055d4c8      {
0055d4cf          void* eax_1 = operator new(0x268);
0055d4cf          
0055d4d9          if (eax_1 != 0)
0055d4d9          {
0055d4dd              class ClientCharGenState* result = ClientCharGenState::ClientCharGenState(eax_1);
0055d4e2              this->m_pCharGenState = result;
0055d4e6              return result;
0055d4d9          }
0055d4d9          
0055d4e9          this->m_pCharGenState = nullptr;
0055d4c8      }
0055d4c8      
0055d4f0      return this->m_pCharGenState;
0055d4c0  }

0055d4f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0055d500  class ComponentTracker* __fastcall CPlayerSystem::GetComponentTracker(class CPlayerSystem* this)

0055d500  {
0055d50b      if (this->componentTracker == 0)
0055d50b      {
0055d515          class SpellComponentTable* eax_2 = ClientMagicSystem::GetSpellComponentTable(ClientMagicSystem::GetMagicSystem());
0055d521          void* eax_3 = operator new(0x108);
0055d521          
0055d52b          if (eax_3 != 0)
0055d52b          {
0055d530              class ComponentTracker* result = ComponentTracker::ComponentTracker(eax_3, eax_2);
0055d536              this->componentTracker = result;
0055d53d              return result;
0055d52b          }
0055d52b          
0055d540          this->componentTracker = nullptr;
0055d50b      }
0055d50b      
0055d54e      return this->componentTracker;
0055d500  }

0055d54f                                               90                                                                 .

0055d550  void __thiscall CPlayerSystem::RecvNotice_NewParentContainer(class CPlayerSystem* this, uint32_t arg2)

0055d550  {
0055d559      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
0055d559      
0055d563      if ((eax != 0 && ACCWeenieObject::IsOwnedByPlayer(eax) != 0))
0055d570          this->unblockAttemptNum = arg2;
0055d550  }

0055d57b                                                                                   90 90 90 90 90                             .....

0055d580  void __thiscall CPlayerSystem::SetTeleportInProgress(class CPlayerSystem* this, uint8_t arg2)

0055d580  {
0055d58d      if (this->teleportInProgress != arg2)
0055d58d      {
0055d58f          this->teleportInProgress = arg2;
0055d58f          
0055d59c          if (ClientUISystem::GetUISystem() != 0)
0055d59c          {
0055d59e              class ClientUISystem* eax_1;
0055d59e              eax_1 = this->teleportInProgress;
0055d59e              
0055d5a6              if (eax_1 != 0)
0055d5a6              {
0055d5af                  ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
0055d5b5                  return;
0055d5a6              }
0055d5a6              
0055d5bf              ClientUISystem::DecrementBusyCount(ClientUISystem::GetUISystem());
0055d59c          }
0055d58d      }
0055d580  }

0055d5c8                          90 90 90 90 90 90 90 90                                                          ........

0055d5d0  void __thiscall CPlayerSystem::Handle_CharacterError(class CPlayerSystem* this, enum charError arg2)

0055d5d0  {
0055d5d2      this->fReadyToEnterGame = 0;
0055d5d8      this->awaitingLogOn = 0;
0055d5e3      ECM_Login::SendNotice_CharacterError(arg2);
0055d5d0  }

0055d5ec                                      90 90 90 90                                                              ....

0055d5f0  void __fastcall CPlayerSystem::Handle_CharacterDelete(class CPlayerSystem* this)

0055d5f0  {
0055d5fc      void* eax_1 = UIFlow::m_instance->vtable->GetPersistantData();
0055d5fc      
0055d609      if (this->m_pCharGenState == 0)
0055d609      {
0055d610          void* eax_3 = operator new(0x268);
0055d61a          class ClientCharGenState* eax_4;
0055d61a          
0055d61a          if (eax_3 == 0)
0055d625              eax_4 = nullptr;
0055d61a          else
0055d61e              eax_4 = ClientCharGenState::ClientCharGenState(eax_3);
0055d61e          
0055d627          this->m_pCharGenState = eax_4;
0055d609      }
0055d609      
0055d636      CharacterSet::ClearIdentity(((char*)eax_1 + 4), this->m_pCharGenState->slot);
0055d63c      this->deleteCharRequestTime = 0f;
0055d646      *(uint32_t*)((char*)this->deleteCharRequestTime)[4] = 0;
0055d650      ECM_Character::SendNotice_CharacterSet(((char*)eax_1 + 4));
0055d5f0  }

0055d65b                                                                                   90 90 90 90 90                             .....

0055d660  void __thiscall CPlayerSystem::Handle_AwaitingSubscriptionExpiration(class CPlayerSystem* this, uint32_t arg2)

0055d660  {
0055d674      void var_80;
0055d674      
0055d674      if (arg2 <= 1)
0055d68c          _snprintf(&var_80, 0x80, "*** YOUR SUBSCRIPTION EXPIRES IN…", 1, "SECOND");
0055d674      else if (arg2 > 0x3c)
0055d69a      {
0055d6c2          long double x87_r7_1 = ((long double)arg2);
0055d6c2          
0055d6c6          if (arg2 < 0)
0055d6c8              x87_r7_1 = (x87_r7_1 + ((long double)4294967296.0));
0055d6c8          
0055d6d7          int32_t var_94;
0055d6d7          var_94 = ((double)(x87_r7_1 * ((long double)0.016666666666666666)));
0055d6da          ceil(var_94);
0055d6fa          _snprintf(&var_80, 0x80, "*** WARNING: Your subscription t…", _ftol2(), "minutes");
0055d69a      }
0055d69a      else
0055d6b1          _snprintf(&var_80, 0x80, "*** YOUR SUBSCRIPTION EXPIRES IN…", arg2, "SECONDS");
0055d6b1      
0055d703      char var_1 = 0;
0055d717      NoticeHandler::RecvNotice_WorldName(ClientUISystem::GetUISystem(), &var_80);
0055d71e      uint32_t var_84_2 = arg2;
0055d722      /* unimplemented  {fild st0, dword [esp+0x8]} */;
0055d726      this->awaitingExpiration = 1;
0055d726      
0055d72d      if (arg2 < 0)
0055d72f          /* unimplemented  {fadd qword [&data_794518]} */;
0055d72f      
0055d735      /* unimplemented  {fadd qword [&Timer::cur_time]} */;
0055d73b      this->expirationTime = ((double)/* this->expirationTime = fconvert.d(unimplemented  {fstp qword [edi+0x228], st0}) */);
0055d73b      /* unimplemented  {fstp qword [edi+0x228], st0} */;
0055d660  }

0055d74c                                      90 90 90 90                                                              ....

0055d750  uint8_t __fastcall CPlayerSystem::AccountHasThroneOfDestiny(class CPlayerSystem* this)

0055d750  {
0055d756      return this->m_accountHasThroneofDestiny;
0055d750  }

0055d757                                                                       90 90 90 90 90 90 90 90 90                         .........

0055d760  void __thiscall CPlayerSystem::RestoreCharacter(class CPlayerSystem* this, uint32_t arg2)

0055d760  {
0055d764      int32_t var_4 = 0x8173b4;
0055d769      int32_t var_8 = 0x8173b4;
0055d76e      uint32_t var_c = arg2;
0055d76f      class PStringBase<char>* edx;
0055d76f      Proto_UI::SendAdminRestoreCharacter(arg2, edx, this);
0055d760  }

0055d77a                                                                                90 90 90 90 90 90                            ......

0055d780  void __fastcall CPlayerSystem::ExecuteLogOff(class CPlayerSystem* this)

0055d780  {
0055d786      this->initialLoginComplete = 0;
0055d78c      this->logOffRequested = 0;
0055d79d      this->logOffTime = (*(uint32_t*)Timer::cur_time);
0055d7a3      *(uint32_t*)((char*)this->logOffTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0055d7af      ClientNet::ExitWorldDisconnect(SharedNet::s_pNet);
0055d7b4      this->player_initialized = 0;
0055d7ba      this->player_desc_received = 0;
0055d7c0      this->playerID = 0;
0055d780  }

0055d7c9                             90 90 90 90 90 90 90                                                           .......

0055d7d0  void __fastcall CPlayerSystem::SetLogOffStarted(class CPlayerSystem* this)

0055d7d0  {
0055d7d0      this->logOffRequested = 0;
0055d7d0  }

0055d7d8                                                                          90 90 90 90 90 90 90 90                          ........

0055d7e0  int32_t Get2DDistance(double arg1, double arg2)

0055d7e0  {
0055d7ea      j__CIpow();
0055d802      return j__CIpow();
0055d7e0  }

0055d803           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0055d810  int32_t GetWeightedZDistance(double arg1) __pure

0055d810  {
0055d810      long double x87_r7 = ((long double)arg1);
0055d814      long double temp0 = ((long double)0.0);
0055d814      (x87_r7 - temp0);
0055d829      return ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
0055d810  }

0055d82a                                90 90 90 90 90 90                                                            ......

0055d830  uint8_t __stdcall CPlayerSystem::Farther(class CPlayerSystem* this @ ecx, double arg2, uint32_t arg3, double arg4, uint32_t arg5)

0055d830  {
0055d830      long double x87_r7 = ((long double)arg2);
0055d834      long double temp1 = ((long double)arg4);
0055d834      (x87_r7 - temp1);
0055d83d      int16_t eax;
0055d83d      
0055d83d      if ((*(uint8_t*)((char*)((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0055d83d      {
0055d843          (((long double)arg2) - ((long double)arg4));
0055d849          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0055d849          
0055d84c          if (!(p_1))
0055d84c          {
0055d878              eax = 0;
0055d87a              return 0;
0055d84c          }
0055d84c          
0055d852          (((long double)arg2) - ((long double)arg4));
0055d858          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0055d858          
0055d85b          if (p_2)
0055d85b          {
0055d878              eax = 0;
0055d87a              return 0;
0055d85b          }
0055d85b          
0055d867          if (arg3 <= arg5)
0055d867          {
0055d872              (((long double)arg2) - ((long double)arg4));
0055d878              eax = 0;
0055d87a              return 0;
0055d867          }
0055d83d      }
0055d83d      
0055d869      eax = 1;
0055d86b      return 1;
0055d830  }

0055d87d                                                                                         90 90 90                               ...

0055d880  int32_t CPlayerSystem::GetRadarRadius(class CPlayerSystem* this @ ecx)

0055d895  {
0055d895      return SmartBox::is_player_outside(SmartBox::smartbox);
0055d895  }

0055d89d                                                                                         90 90 90                               ...

0055d8a0  uint8_t CPlayerSystem::IsOutside(class CPlayerSystem* this @ ecx)

0055d8a0  {
0055d8a0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0055d8a0      
0055d8a8      if (SmartBox::smartbox_1 != 0)
0055d8a8      {
0055d8b1          int32_t eax_1;
0055d8b1          eax_1 = SmartBox::is_player_outside(SmartBox::smartbox_1) != 0;
0055d8b4          return eax_1;
0055d8a8      }
0055d8a8      
0055d8b5      int32_t eax;
0055d8b5      eax = 0;
0055d8b7      return 0;
0055d8a0  }

0055d8b8                                                                          90 90 90 90 90 90 90 90                          ........

0055d8c0  uint8_t __thiscall CPlayerSystem::PlaceInBackpack(class CPlayerSystem* this, uint32_t arg2, uint8_t arg3)

0055d8c0  {
0055d8ca      if (arg2 != 0)
0055d8ca      {
0055d8ce          CM_Item::SendNotice_ShowPendingInPlayer(arg2);
0055d8d7          uint32_t ebx_1 = this->mOpenContainerID;
0055d8d7          
0055d8e2          if (arg3 != 0)
0055d8f0              ebx_1 = this->playerID;
0055d8e2          else if (PlayerModule::MainPackPreferred(&this->playerModule.vtable) != 0)
0055d8f0              ebx_1 = this->playerID;
0055d8f0          
0055d90e          if (ItemHolder::AttemptToPlaceInContainer(arg2, this->playerID, ebx_1, 1, 0) != 0)
0055d90e          {
0055d911              int32_t eax_3;
0055d911              eax_3 = 1;
0055d914              return 1;
0055d90e          }
0055d90e          
0055d918          class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(arg2);
0055d918          
0055d922          if (eax_4 != 0)
0055d928              ACCWeenieObject::SetWaitingState(eax_4, 0);
0055d928          
0055d92d          CM_Item::SendNotice_EndPendingInPlayer();
0055d8ca      }
0055d8ca      
0055d933      int32_t eax;
0055d933      eax = 0;
0055d936      return 0;
0055d8c0  }

0055d939                                                                             90 90 90 90 90 90 90                           .......

0055d940  void __fastcall CPlayerSystem::ResetUnblocking(class CPlayerSystem* this)

0055d940  {
0055d942      this->blockingID = 0;
0055d948      this->blockedID = 0;
0055d94e      this->blockedSide = SLOT_SIDE_NULL;
0055d954      this->unblockAttemptNum = 0;
0055d940  }

0055d95b                                                                                   90 90 90 90 90                             .....

0055d960  void __fastcall CInvSlotModule::CInvSlotModule(class CInvSlotModule* this)

0055d960  {
0055d965      void* eax = operator new(8);
0055d965      
0055d96f      if (eax == 0)
0055d980          eax = nullptr;
0055d96f      else
0055d96f      {
0055d971          *(uint32_t*)eax = 0;
0055d977          *(uint32_t*)((char*)eax + 4) = 0x8000;
0055d96f      }
0055d96f      
0055d984      this->neckSlot = eax;
0055d986      void* eax_1 = operator new(8);
0055d986      
0055d990      if (eax_1 == 0)
0055d9a1          eax_1 = nullptr;
0055d990      else
0055d990      {
0055d992          *(uint32_t*)eax_1 = 0;
0055d998          *(uint32_t*)((char*)eax_1 + 4) = 0x10000;
0055d990      }
0055d990      
0055d9a5      this->leftWristSlot = eax_1;
0055d9a8      void* eax_2 = operator new(8);
0055d9a8      
0055d9b2      if (eax_2 == 0)
0055d9c3          eax_2 = nullptr;
0055d9b2      else
0055d9b2      {
0055d9b4          *(uint32_t*)eax_2 = 0;
0055d9ba          *(uint32_t*)((char*)eax_2 + 4) = 0x40000;
0055d9b2      }
0055d9b2      
0055d9c7      this->leftRingSlot = eax_2;
0055d9ca      void* eax_3 = operator new(8);
0055d9ca      
0055d9d4      if (eax_3 == 0)
0055d9e5          eax_3 = nullptr;
0055d9d4      else
0055d9d4      {
0055d9d6          *(uint32_t*)eax_3 = 0;
0055d9dc          *(uint32_t*)((char*)eax_3 + 4) = 0x20000;
0055d9d4      }
0055d9d4      
0055d9e9      this->rightWristSlot = eax_3;
0055d9ec      void* eax_4 = operator new(8);
0055d9ec      
0055d9f6      if (eax_4 == 0)
0055da07          eax_4 = nullptr;
0055d9f6      else
0055d9f6      {
0055d9f8          *(uint32_t*)eax_4 = 0;
0055d9fe          *(uint32_t*)((char*)eax_4 + 4) = 0x80000;
0055d9f6      }
0055d9f6      
0055da0b      this->rightRingSlot = eax_4;
0055da0e      void* eax_5 = operator new(8);
0055da0e      
0055da18      if (eax_5 == 0)
0055da29          eax_5 = nullptr;
0055da18      else
0055da18      {
0055da1a          *(uint32_t*)eax_5 = 0;
0055da20          *(uint32_t*)((char*)eax_5 + 4) = 0x3500000;
0055da18      }
0055da18      
0055da2d      this->weaponReadySlot = eax_5;
0055da30      void* eax_6 = operator new(8);
0055da30      
0055da3a      if (eax_6 == 0)
0055da4b          eax_6 = nullptr;
0055da3a      else
0055da3a      {
0055da3c          *(uint32_t*)eax_6 = 0;
0055da42          *(uint32_t*)((char*)eax_6 + 4) = "activation type (%s) with '%s' b…";
0055da3a      }
0055da3a      
0055da4f      this->ammoReadySlot = eax_6;
0055da52      void* eax_7 = operator new(8);
0055da52      
0055da5c      if (eax_7 == 0)
0055da6d          eax_7 = nullptr;
0055da5c      else
0055da5c      {
0055da5e          *(uint32_t*)eax_7 = 0;
0055da64          *(uint32_t*)((char*)eax_7 + 4) = 0x300000;
0055da5c      }
0055da5c      
0055da71      this->shieldReadySlot = eax_7;
0055da74      void* eax_8 = operator new(8);
0055da74      
0055da7e      if (eax_8 == 0)
0055da8f          eax_8 = nullptr;
0055da7e      else
0055da7e      {
0055da80          *(uint32_t*)eax_8 = 0;
0055da86          *(uint32_t*)((char*)eax_8 + 4) = 0x40;
0055da7e      }
0055da7e      
0055da93      this->clothesPantsSlot = eax_8;
0055da96      void* eax_9 = operator new(8);
0055da96      
0055daa0      if (eax_9 == 0)
0055dab1          eax_9 = nullptr;
0055daa0      else
0055daa0      {
0055daa2          *(uint32_t*)eax_9 = 0;
0055daa8          *(uint32_t*)((char*)eax_9 + 4) = 2;
0055daa0      }
0055daa0      
0055dab5      this->clothesShirtSlot = eax_9;
0055dab8      void* eax_10 = operator new(8);
0055dab8      
0055dac2      if (eax_10 == 0)
0055dad3          eax_10 = nullptr;
0055dac2      else
0055dac2      {
0055dac4          *(uint32_t*)eax_10 = 0;
0055daca          *(uint32_t*)((char*)eax_10 + 4) = 0x4000000;
0055dac2      }
0055dac2      
0055dad7      this->trinketOneSlot = eax_10;
0055dada      void* eax_11 = operator new(8);
0055dada      
0055dae4      if (eax_11 == 0)
0055daf5          eax_11 = nullptr;
0055dae4      else
0055dae4      {
0055dae6          *(uint32_t*)eax_11 = 0;
0055daec          *(uint32_t*)((char*)eax_11 + 4) = 0x8000000;
0055dae4      }
0055dae4      
0055daf9      this->cloakSlot = eax_11;
0055dafc      void* eax_12 = operator new(8);
0055dafc      
0055db06      if (eax_12 == 0)
0055db17          eax_12 = nullptr;
0055db06      else
0055db06      {
0055db08          *(uint32_t*)eax_12 = 0;
0055db0e          *(uint32_t*)((char*)eax_12 + 4) = 0x10000000;
0055db06      }
0055db06      
0055db1b      this->sigilOneSlot = eax_12;
0055db1e      void* eax_13 = operator new(8);
0055db1e      
0055db28      if (eax_13 == 0)
0055db39          eax_13 = nullptr;
0055db28      else
0055db28      {
0055db2a          *(uint32_t*)eax_13 = 0;
0055db30          *(uint32_t*)((char*)eax_13 + 4) = 0x20000000;
0055db28      }
0055db28      
0055db3d      this->sigilTwoSlot = eax_13;
0055db40      void* eax_14 = operator new(8);
0055db40      
0055db4a      if (eax_14 == 0)
0055db5b          eax_14 = nullptr;
0055db4a      else
0055db4a      {
0055db4c          *(uint32_t*)eax_14 = 0;
0055db52          *(uint32_t*)((char*)eax_14 + 4) = 0x40000000;
0055db4a      }
0055db4a      
0055db5f      this->sigilThreeSlot = eax_14;
0055db62      void* eax_15 = operator new(8);
0055db62      
0055db6c      if (eax_15 == 0)
0055db7d          eax_15 = nullptr;
0055db6c      else
0055db6c      {
0055db6e          *(uint32_t*)eax_15 = 0;
0055db74          *(uint32_t*)((char*)eax_15 + 4) = 1;
0055db6c      }
0055db6c      
0055db81      this->headSlot = eax_15;
0055db84      void* eax_16 = operator new(8);
0055db84      
0055db8e      if (eax_16 == 0)
0055db9f          eax_16 = nullptr;
0055db8e      else
0055db8e      {
0055db90          *(uint32_t*)eax_16 = 0;
0055db96          *(uint32_t*)((char*)eax_16 + 4) = 0x200;
0055db8e      }
0055db8e      
0055dba3      this->chestSlot = eax_16;
0055dba6      void* eax_17 = operator new(8);
0055dba6      
0055dbb0      if (eax_17 == 0)
0055dbc1          eax_17 = nullptr;
0055dbb0      else
0055dbb0      {
0055dbb2          *(uint32_t*)eax_17 = 0;
0055dbb8          *(uint32_t*)((char*)eax_17 + 4) = 0x400;
0055dbb0      }
0055dbb0      
0055dbc5      this->abdomenSlot = eax_17;
0055dbc8      void* eax_18 = operator new(8);
0055dbc8      
0055dbd2      if (eax_18 == 0)
0055dbe3          eax_18 = nullptr;
0055dbd2      else
0055dbd2      {
0055dbd4          *(uint32_t*)eax_18 = 0;
0055dbda          *(uint32_t*)((char*)eax_18 + 4) = 0x800;
0055dbd2      }
0055dbd2      
0055dbe7      this->upperArmSlot = eax_18;
0055dbea      void* eax_19 = operator new(8);
0055dbea      
0055dbf4      if (eax_19 == 0)
0055dc05          eax_19 = nullptr;
0055dbf4      else
0055dbf4      {
0055dbf6          *(uint32_t*)eax_19 = 0;
0055dbfc          *(uint32_t*)((char*)eax_19 + 4) = 0x1000;
0055dbf4      }
0055dbf4      
0055dc09      this->lowerArmSlot = eax_19;
0055dc0c      void* eax_20 = operator new(8);
0055dc0c      
0055dc16      if (eax_20 == 0)
0055dc27          eax_20 = nullptr;
0055dc16      else
0055dc16      {
0055dc18          *(uint32_t*)eax_20 = 0;
0055dc1e          *(uint32_t*)((char*)eax_20 + 4) = 0x20;
0055dc16      }
0055dc16      
0055dc2b      this->handSlot = eax_20;
0055dc2e      class CInvSlotInfo* eax_21 = operator new(8);
0055dc2e      
0055dc38      if (eax_21 == 0)
0055dc49          eax_21 = nullptr;
0055dc38      else
0055dc38      {
0055dc3a          eax_21->m_itemID = 0;
0055dc40          eax_21->m_invLoc = 0x2000;
0055dc38      }
0055dc38      
0055dc4d      this->upperLegSlot = eax_21;
0055dc50      class CInvSlotInfo* eax_22 = operator new(8);
0055dc50      
0055dc5a      if (eax_22 == 0)
0055dc6b          eax_22 = nullptr;
0055dc5a      else
0055dc5a      {
0055dc5c          eax_22->m_itemID = 0;
0055dc62          eax_22->m_invLoc = 0x4000;
0055dc5a      }
0055dc5a      
0055dc6f      this->lowerLegSlot = eax_22;
0055dc72      class CInvSlotInfo* eax_23 = operator new(8);
0055dc72      
0055dc7c      if (eax_23 == 0)
0055dc7c      {
0055dc94          this->footSlot = nullptr;
0055dc9a          return;
0055dc7c      }
0055dc7c      
0055dc7e      eax_23->m_itemID = 0;
0055dc84      eax_23->m_invLoc = 0x100;
0055dc8b      this->footSlot = eax_23;
0055d960  }

0055dc9b                                                                                   90 90 90 90 90                             .....

0055dca0  void __fastcall CInvSlotModule::Reset(class CInvSlotModule* this)

0055dca0  {
0055dca0      this->neckSlot->m_itemID = 0;
0055dca8      this->leftWristSlot->m_itemID = 0;
0055dcb1      this->leftRingSlot->m_itemID = 0;
0055dcba      this->rightWristSlot->m_itemID = 0;
0055dcc3      this->rightRingSlot->m_itemID = 0;
0055dccc      this->weaponReadySlot->m_itemID = 0;
0055dcd5      this->ammoReadySlot->m_itemID = 0;
0055dcde      this->shieldReadySlot->m_itemID = 0;
0055dce7      this->clothesPantsSlot->m_itemID = 0;
0055dcf0      this->clothesShirtSlot->m_itemID = 0;
0055dcf9      this->trinketOneSlot->m_itemID = 0;
0055dd02      this->cloakSlot->m_itemID = 0;
0055dd0b      this->sigilOneSlot->m_itemID = 0;
0055dd14      this->sigilTwoSlot->m_itemID = 0;
0055dd1d      this->sigilThreeSlot->m_itemID = 0;
0055dd26      this->headSlot->m_itemID = 0;
0055dd2f      this->chestSlot->m_itemID = 0;
0055dd38      this->abdomenSlot->m_itemID = 0;
0055dd41      this->upperArmSlot->m_itemID = 0;
0055dd4a      this->lowerArmSlot->m_itemID = 0;
0055dd53      this->handSlot->m_itemID = 0;
0055dd5c      this->upperLegSlot->m_itemID = 0;
0055dd65      this->lowerLegSlot->m_itemID = 0;
0055dd6e      this->footSlot->m_itemID = 0;
0055dca0  }

0055dd78                                                                          90 90 90 90 90 90 90 90                          ........

0055dd80  void __fastcall CPlayerSystem::RegisterInputMaps(class CPlayerSystem* this)

0055dd80  {
0055dd81      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0055dd81      
0055dd8c      if (ICIDM::s_cidm_1 != 0)
0055dd8c      {
0055dd90          struct IInputActionCallback::VTable** eax_1;
0055dd90          
0055dd90          if (this == 0)
0055dd97              eax_1 = nullptr;
0055dd90          else
0055dd92              eax_1 = &this->vtable;
0055dd92          
0055dd99          ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000007, eax_1, 0x3e8);
0055ddad          struct IInputActionCallback::VTable** eax_2;
0055ddad          
0055ddad          if (this == 0)
0055ddb4              eax_2 = nullptr;
0055ddad          else
0055ddaf              eax_2 = &this->vtable;
0055ddaf          
0055ddb6          ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000008, eax_2, 0x3e8);
0055ddc8          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0055ddc8          
0055ddcf          if (SmartBox::smartbox_1 != 0)
0055ddcf          {
0055ddd1              class CommandInterpreter* cmdinterp = SmartBox::smartbox_1->cmdinterp;
0055ddd1              
0055ddd9              if (cmdinterp != 0)
0055ddd9              {
0055dddb                  ICIDM::s_cidm_1->vtable->RegisterInputMap(4, cmdinterp, 0x3e8);
0055ddf6                  ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000006, SmartBox::smartbox->cmdinterp, 0x3e8);
0055ddd9              }
0055ddcf          }
0055dd8c      }
0055dd80  }

0055de0b                                   90 90 90 90 90                                                             .....

0055de10  void CPlayerSystem::SetDisplayContractTracker(class CPlayerSystem* this @ ecx, class CContractTracker arg2)

0055de10  {
0055de15      CM_Social::SendNotice_SetDisplayContractTracker(&arg2);
0055de10  }

0055de1e                                                                                            90 90                                ..

0055de20  uint32_t __thiscall CPlayerSystem::Handle_Admin__Environs(class CPlayerSystem* this, int32_t const arg2)

0055de20  {
0055de20      class CPlayerSystem* this_1 = this;
0055de20      
0055de2b      if (arg2 != 0)
0055de2b      {
0055de7a          switch (arg2)
0055de7a          {
0055de77              case 1:
0055de77              {
0055de80                  *(uint8_t*)((char*)arg2)[2] = 0x96;
0055de84                  *(uint8_t*)((char*)arg2)[1] = 0;
0055de88                  arg2 = 0;
0055de8c                  *(uint8_t*)((char*)arg2)[3] = 0x64;
0055de90                  *(uint8_t*)((char*)this_1)[2] = 0x96;
0055de94                  *(uint8_t*)((char*)this_1)[1] = 0;
0055de98                  this_1 = 0;
0055de9c                  LScape::m_override_fog_max = 50f;
0055e310              label_55e310:
0055e310                  class CPlayerSystem* this_2 = this_1;
0055e314                  LScape::m_override_ambient_color.__inner0 = arg2;
0055e31a                  LScape::m_override_fog_color.__inner0 = this_2;
0055e31f              label_55e31f:
0055e31f                  LScape::m_override_ambient_level = 0.400000006f;
0055e329                  LScape::m_override_enabled = 1;
0055e329                  goto label_55e330;
0055de77              }
0055deab              case 2:
0055deab              {
0055deba                  this_1 = 0x96;
0055dece                  *(uint8_t*)((char*)this_1)[2] = 0x32;
0055ded2                  *(uint8_t*)((char*)this_1)[1] = 0;
0055ded6                  *(uint8_t*)((char*)this_1)[3] = 0x64;
0055deda                  class CPlayerSystem* this_4 = this_1;
0055dede                  LScape::m_override_ambient_level = 0.300000012f;
0055dee8                  LScape::m_override_fog_max = 50f;
0055def2                  LScape::m_override_ambient_color.__inner0 = 0x64320096;
0055def8                  LScape::m_override_fog_color.__inner0 = this_4;
0055e329                  LScape::m_override_enabled = 1;
0055e329                  goto label_55e330;
0055deab              }
0055df03              case 3:
0055df03              {
0055df12                  __builtin_strncpy(&this_1, "dddd", 4);
0055df1a                  class CPlayerSystem* this_3 = this_1;
0055df32                  LScape::m_override_fog_max = 30f;
0055df3c                  __builtin_strncpy(&LScape::m_override_ambient_color, "dddd", 4);
0055df41                  LScape::m_override_fog_color.__inner0 = this_3;
0055df47                  goto label_55e31f;
0055df03              }
0055df4c              case 4:
0055df4c              {
0055df69                  *(uint8_t*)((char*)this_1)[2] = 0x1e;
0055df6d                  *(uint8_t*)((char*)this_1)[1] = 0x64;
0055df71                  this_1 = 0;
0055df75                  *(uint8_t*)((char*)this_1)[3] = 0x64;
0055df7d                  LScape::m_override_ambient_level = 0.300000012f;
0055df87                  LScape::m_override_fog_max = 50f;
0055df91                  LScape::m_override_ambient_color.__inner0 = 0x641e6400;
0055df97                  LScape::m_override_fog_color.__inner0 = 0x1e6400;
0055e329                  LScape::m_override_enabled = 1;
0055e329                  goto label_55e330;
0055df4c              }
0055dfa1              case 5:
0055dfa1              {
0055dfbe                  *(uint8_t*)((char*)this_1)[2] = 0;
0055dfc2                  *(uint8_t*)((char*)this_1)[1] = 0;
0055dfc6                  this_1 = 0;
0055dfca                  *(uint8_t*)((char*)this_1)[3] = 0x64;
0055dfd2                  LScape::m_override_ambient_level = 0.800000012f;
0055dfdc                  LScape::m_override_fog_max = 40f;
0055dfe6                  LScape::m_override_ambient_color.__inner0 = 0x64969696;
0055dfec                  LScape::m_override_fog_color.__inner0 = 0;
0055e329                  LScape::m_override_enabled = 1;
0055e329                  goto label_55e330;
0055dfa1              }
0055dff7              case 6:
0055dff7              {
0055e028                  LScape::m_override_enabled = 1;
0055e02f                  LScape::m_override_transition = 0f;
0055e039                  LScape::m_override_ambient_level = 0.800000012f;
0055e043                  LScape::m_override_fog_min = 0f;
0055e04d                  LScape::m_override_fog_max = 40f;
0055e057                  LScape::m_override_ambient_color.__inner0 = 0x64969696;
0055e05c                  LScape::m_override_fog_color.__inner0 = 0x64000000;
0055e062                  ClientUISystem::GetUISystem()->m_bRadarBlank = 1;
0055e070                  return 0;
0055dff7                  break;
0055dff7              }
0055de7a          }
0055de7a          
0055e07f          if ((arg2 >= 0x65 && arg2 <= 0x7c))
0055e07f          {
0055e096              if (ClientObjMaintSystem::GetPhysicsObject(this->playerID) != 0)
0055e096              {
0055e09c                  class ClientUISystem* eax_5 = ClientUISystem::GetUISystem();
0055e09c                  
0055e0b1                  if ((eax_5 != 0 && (arg2 - 0x65) <= 0x16))
0055e2dd                      switch (arg2)
0055e2dd                      {
0055e0c6                          case 0x65:
0055e0c6                          {
0055e0c6                              SoundManager::PlaySoundFromCenter(Sound_UI_Roar, ClientUISystem::GetUISoundTable(eax_5));
0055e0c6                              break;
0055e0c6                          }
0055e0de                          case 0x66:
0055e0de                          {
0055e0de                              SoundManager::PlaySoundFromCenter(Sound_UI_Bell, ClientUISystem::GetUISoundTable(eax_5));
0055e0de                              break;
0055e0de                          }
0055e0f6                          case 0x67:
0055e0f6                          {
0055e0f6                              SoundManager::PlaySoundFromCenter(Sound_UI_Chant1, ClientUISystem::GetUISoundTable(eax_5));
0055e0f6                              break;
0055e0f6                          }
0055e10e                          case 0x68:
0055e10e                          {
0055e10e                              SoundManager::PlaySoundFromCenter(Sound_UI_Chant2, ClientUISystem::GetUISoundTable(eax_5));
0055e10e                              break;
0055e10e                          }
0055e126                          case 0x69:
0055e126                          {
0055e126                              SoundManager::PlaySoundFromCenter(Sound_UI_DarkWhispers1, ClientUISystem::GetUISoundTable(eax_5));
0055e126                              break;
0055e126                          }
0055e13e                          case 0x6a:
0055e13e                          {
0055e13e                              SoundManager::PlaySoundFromCenter(Sound_UI_DarkWhispers2, ClientUISystem::GetUISoundTable(eax_5));
0055e13e                              break;
0055e13e                          }
0055e156                          case 0x6b:
0055e156                          {
0055e156                              SoundManager::PlaySoundFromCenter(Sound_UI_DarkLaugh, ClientUISystem::GetUISoundTable(eax_5));
0055e156                              break;
0055e156                          }
0055e16e                          case 0x6c:
0055e16e                          {
0055e16e                              SoundManager::PlaySoundFromCenter(Sound_UI_DarkWind, ClientUISystem::GetUISoundTable(eax_5));
0055e16e                              break;
0055e16e                          }
0055e186                          case 0x6d:
0055e186                          {
0055e186                              SoundManager::PlaySoundFromCenter(Sound_UI_DarkSpeech, ClientUISystem::GetUISoundTable(eax_5));
0055e186                              break;
0055e186                          }
0055e19e                          case 0x6e:
0055e19e                          {
0055e19e                              SoundManager::PlaySoundFromCenter(Sound_UI_Drums, ClientUISystem::GetUISoundTable(eax_5));
0055e19e                              break;
0055e19e                          }
0055e1b9                          case 0x6f:
0055e1b9                          {
0055e1b9                              SoundManager::PlaySoundFromCenter(Sound_UI_GhostSpeak, ClientUISystem::GetUISoundTable(eax_5));
0055e1b9                              break;
0055e1b9                          }
0055e1d4                          case 0x70:
0055e1d4                          {
0055e1d4                              SoundManager::PlaySoundFromCenter(Sound_UI_Breathing, ClientUISystem::GetUISoundTable(eax_5));
0055e1d4                              break;
0055e1d4                          }
0055e1ef                          case 0x71:
0055e1ef                          {
0055e1ef                              SoundManager::PlaySoundFromCenter(Sound_UI_Howl, ClientUISystem::GetUISoundTable(eax_5));
0055e1ef                              break;
0055e1ef                          }
0055e20a                          case 0x72:
0055e20a                          {
0055e20a                              SoundManager::PlaySoundFromCenter(Sound_UI_LostSouls, ClientUISystem::GetUISoundTable(eax_5));
0055e20a                              break;
0055e20a                          }
0055e225                          case 0x75:
0055e225                          {
0055e225                              SoundManager::PlaySoundFromCenter(Sound_UI_Squeal, ClientUISystem::GetUISoundTable(eax_5));
0055e225                              break;
0055e225                          }
0055e240                          case 0x76:
0055e240                          {
0055e240                              SoundManager::PlaySoundFromCenter(Sound_UI_Thunder1, ClientUISystem::GetUISoundTable(eax_5));
0055e240                              break;
0055e240                          }
0055e25b                          case 0x77:
0055e25b                          {
0055e25b                              SoundManager::PlaySoundFromCenter(Sound_UI_Thunder2, ClientUISystem::GetUISoundTable(eax_5));
0055e25b                              break;
0055e25b                          }
0055e276                          case 0x78:
0055e276                          {
0055e276                              SoundManager::PlaySoundFromCenter(Sound_UI_Thunder3, ClientUISystem::GetUISoundTable(eax_5));
0055e276                              break;
0055e276                          }
0055e291                          case 0x79:
0055e291                          {
0055e291                              SoundManager::PlaySoundFromCenter(Sound_UI_Thunder4, ClientUISystem::GetUISoundTable(eax_5));
0055e291                              break;
0055e291                          }
0055e2ac                          case 0x7a:
0055e2ac                          {
0055e2ac                              SoundManager::PlaySoundFromCenter(Sound_UI_Thunder5, ClientUISystem::GetUISoundTable(eax_5));
0055e2ac                              break;
0055e2ac                          }
0055e2c7                          case 0x7b:
0055e2c7                          {
0055e2c7                              SoundManager::PlaySoundFromCenter(Sound_UI_Thunder6, ClientUISystem::GetUISoundTable(eax_5));
0055e2c7                              break;
0055e2c7                          }
0055e2dd                      }
0055e096              }
0055e07f          }
0055e07f          else if (arg2 == 0x270f)
0055e2dd          {
0055e2e1              *(uint8_t*)((char*)arg2)[2] = 0x64;
0055e2e5              *(uint8_t*)((char*)arg2)[1] = 0x64;
0055e2e9              arg2 = 0x64;
0055e2ed              *(uint8_t*)((char*)arg2)[3] = 0x32;
0055e2fa              __builtin_strncpy(&this_1, "dddd", 4);
0055e2fe              LScape::m_override_fog_max = 30f;
0055e2fe              goto label_55e310;
0055e2dd          }
0055de2b      }
0055de2b      else
0055de2b      {
0055de41          *(uint8_t*)((char*)this_1)[2] = 0;
0055de45          *(uint8_t*)((char*)this_1)[1] = 0;
0055de49          this_1 = 0;
0055de4d          *(uint8_t*)((char*)this_1)[3] = 0;
0055de55          LScape::m_override_enabled = 0;
0055de5b          LScape::m_override_ambient_level = 0f;
0055de61          LScape::m_override_fog_max = 0f;
0055de67          LScape::m_override_ambient_color.__inner0 = 0;
0055de6c          LScape::m_override_fog_color.__inner0 = 0;
0055e330      label_55e330:
0055e330          LScape::m_override_transition = 0f;
0055e33a          LScape::m_override_fog_min = 0f;
0055e344          ClientUISystem::GetUISystem()->m_bRadarBlank = 0;
0055de2b      }
0055de2b      
0055e351      return 0;
0055de20  }

0055e354  uint32_t jump_table_55e354[0x17] = 
0055e354  {
0055e354      [0x00] =  0x0055e0be
0055e358      [0x01] =  0x0055e0d6
0055e35c      [0x02] =  0x0055e0ee
0055e360      [0x03] =  0x0055e106
0055e364      [0x04] =  0x0055e11e
0055e368      [0x05] =  0x0055e136
0055e36c      [0x06] =  0x0055e14e
0055e370      [0x07] =  0x0055e166
0055e374      [0x08] =  0x0055e17e
0055e378      [0x09] =  0x0055e196
0055e37c      [0x0a] =  0x0055e1ae
0055e380      [0x0b] =  0x0055e1c9
0055e384      [0x0c] =  0x0055e1e4
0055e388      [0x0d] =  0x0055e1ff
0055e38c      [0x0e] =  0x0055e34c
0055e390      [0x0f] =  0x0055e34c
0055e394      [0x10] =  0x0055e21a
0055e398      [0x11] =  0x0055e235
0055e39c      [0x12] =  0x0055e250
0055e3a0      [0x13] =  0x0055e26b
0055e3a4      [0x14] =  0x0055e286
0055e3a8      [0x15] =  0x0055e2a1
0055e3ac      [0x16] =  0x0055e2bc
0055e3b0  }

0055e3b0  uint32_t __fastcall CPlayerSystem::AddRef(class CPlayerSystem const* this)

0055e3b0  {
0055e3ba      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
0055e3b0  }

0055e3bb                                                                                   90 90 90 90 90                             .....

0055e3c0  class TResult* __thiscall CPlayerSystem::QueryInterface(class CPlayerSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

0055e3c0  {
0055e3d3      int32_t* key;
0055e3d3      
0055e3d3      if ((1 & (*(uint8_t*)$S164)) != 0)
0055e421          key = Offsets[0].key;
0055e3d3      else
0055e3d3      {
0055e3dd          key = &CPlayerSystem_InterfaceType;
0055e3e2          $S164 |= 1;
0055e3e8          Offsets[0].key = 0x7cc530;
0055e3ed          Offsets[0].ofs = 0;
0055e3f3          Offsets[1].key = 0x7cc4e0;
0055e3fd          Offsets[1].ofs = 0;
0055e403          Offsets[2].key = 0x7cc6b4;
0055e40d          Offsets[2].ofs = 0;
0055e413          Offsets[3].key = 0;
0055e419          Offsets[3].ofs = 0;
0055e3d3      }
0055e3d3      
0055e428      void* edx_3 = &Offsets;
0055e428      
0055e42d      while (key != 0)
0055e42d      {
0055e44f          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0055e44f          {
0055e472              if (arg4 != 0)
0055e472              {
0055e474                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0055e47e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
0055e481                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
0055e472              }
0055e472              
0055e48a              __return->m_val = 0;
0055e48d              return __return;
0055e44f          }
0055e44f          
0055e451          key = *(uint32_t*)((char*)edx_3 + 8);
0055e454          edx_3 += 8;
0055e42d      }
0055e42d      
0055e462      __return->m_val = 0x80004002;
0055e469      return __return;
0055e3c0  }


0055e490  void __thiscall CPlayerSystem::RecvNotice_ServerSaysAttemptFailed(class CPlayerSystem* this, uint32_t arg2)

0055e490  {
0055e4aa      if ((this->blockedSide > SLOT_SIDE_NULL && this->m_invSlotModule.footSlot == arg2))
0055e4aa      {
0055e4b3          class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(this->blockingID);
0055e4b3          
0055e4bd          if (eax_2 != 0)
0055e4c2              ACCWeenieObject::SetWaitingState(eax_2, 0);
0055e4c2          
0055e4c7          this->m_invSlotModule.footSlot = nullptr;
0055e4cd          this->blockingID = 0;
0055e4d3          this->blockedSpellID = 0;
0055e4d9          this->blockedSide = SLOT_SIDE_NULL;
0055e4aa      }
0055e490  }

0055e4e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0055e4f0  uint32_t __fastcall CPlayerSystem::Handle_Character__EnterGame_ServerReady(class CPlayerSystem* this)

0055e4f0  {
0055e4fb      if (this->awaitingLogOn != 0)
0055e4fb      {
0055e503          ClientNet::ExitWorldDisconnect(SharedNet::s_pNet);
0055e508          this->fReadyToEnterGame = 1;
0055e4fb      }
0055e4fb      
0055e512      return 0;
0055e4f0  }

0055e513                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0055e520  void __fastcall CInvSlotModule::~CInvSlotModule(class CInvSlotModule* this)

0055e520  {
0055e523      class CInvSlotInfo* neckSlot = this->neckSlot;
0055e523      
0055e52a      if (neckSlot != 0)
0055e52d          operator delete(neckSlot);
0055e52d      
0055e535      class CInvSlotInfo* leftWristSlot = this->leftWristSlot;
0055e53a      this->neckSlot = 0;
0055e53a      
0055e53c      if (leftWristSlot != 0)
0055e53f          operator delete(leftWristSlot);
0055e53f      
0055e547      class CInvSlotInfo* leftRingSlot = this->leftRingSlot;
0055e54c      this->leftWristSlot = nullptr;
0055e54c      
0055e54f      if (leftRingSlot != 0)
0055e552          operator delete(leftRingSlot);
0055e552      
0055e55a      class CInvSlotInfo* rightWristSlot = this->rightWristSlot;
0055e55f      this->leftRingSlot = nullptr;
0055e55f      
0055e562      if (rightWristSlot != 0)
0055e565          operator delete(rightWristSlot);
0055e565      
0055e56d      class CInvSlotInfo* rightRingSlot = this->rightRingSlot;
0055e572      this->rightWristSlot = nullptr;
0055e572      
0055e575      if (rightRingSlot != 0)
0055e578          operator delete(rightRingSlot);
0055e578      
0055e580      class CInvSlotInfo* weaponReadySlot = this->weaponReadySlot;
0055e585      this->rightRingSlot = nullptr;
0055e585      
0055e588      if (weaponReadySlot != 0)
0055e58b          operator delete(weaponReadySlot);
0055e58b      
0055e593      class CInvSlotInfo* ammoReadySlot = this->ammoReadySlot;
0055e598      this->weaponReadySlot = nullptr;
0055e598      
0055e59b      if (ammoReadySlot != 0)
0055e59e          operator delete(ammoReadySlot);
0055e59e      
0055e5a6      class CInvSlotInfo* shieldReadySlot = this->shieldReadySlot;
0055e5ab      this->ammoReadySlot = nullptr;
0055e5ab      
0055e5ae      if (shieldReadySlot != 0)
0055e5b1          operator delete(shieldReadySlot);
0055e5b1      
0055e5b9      class CInvSlotInfo* clothesPantsSlot = this->clothesPantsSlot;
0055e5be      this->shieldReadySlot = nullptr;
0055e5be      
0055e5c1      if (clothesPantsSlot != 0)
0055e5c4          operator delete(clothesPantsSlot);
0055e5c4      
0055e5cc      class CInvSlotInfo* clothesShirtSlot = this->clothesShirtSlot;
0055e5d1      this->clothesPantsSlot = nullptr;
0055e5d1      
0055e5d4      if (clothesShirtSlot != 0)
0055e5d7          operator delete(clothesShirtSlot);
0055e5d7      
0055e5df      class CInvSlotInfo* trinketOneSlot = this->trinketOneSlot;
0055e5e4      this->clothesShirtSlot = nullptr;
0055e5e4      
0055e5e7      if (trinketOneSlot != 0)
0055e5ea          operator delete(trinketOneSlot);
0055e5ea      
0055e5f2      class CInvSlotInfo* cloakSlot = this->cloakSlot;
0055e5f7      this->trinketOneSlot = nullptr;
0055e5f7      
0055e5fa      if (cloakSlot != 0)
0055e5fd          operator delete(cloakSlot);
0055e5fd      
0055e605      class CInvSlotInfo* sigilOneSlot = this->sigilOneSlot;
0055e60a      this->cloakSlot = nullptr;
0055e60a      
0055e60d      if (sigilOneSlot != 0)
0055e610          operator delete(sigilOneSlot);
0055e610      
0055e618      class CInvSlotInfo* sigilTwoSlot = this->sigilTwoSlot;
0055e61d      this->sigilOneSlot = nullptr;
0055e61d      
0055e620      if (sigilTwoSlot != 0)
0055e623          operator delete(sigilTwoSlot);
0055e623      
0055e62b      class CInvSlotInfo* sigilThreeSlot = this->sigilThreeSlot;
0055e630      this->sigilTwoSlot = nullptr;
0055e630      
0055e633      if (sigilThreeSlot != 0)
0055e636          operator delete(sigilThreeSlot);
0055e636      
0055e63e      class CInvSlotInfo* headSlot = this->headSlot;
0055e643      this->sigilThreeSlot = nullptr;
0055e643      
0055e646      if (headSlot != 0)
0055e649          operator delete(headSlot);
0055e649      
0055e651      class CInvSlotInfo* chestSlot = this->chestSlot;
0055e656      this->headSlot = nullptr;
0055e656      
0055e659      if (chestSlot != 0)
0055e65c          operator delete(chestSlot);
0055e65c      
0055e664      class CInvSlotInfo* abdomenSlot = this->abdomenSlot;
0055e669      this->chestSlot = nullptr;
0055e669      
0055e66c      if (abdomenSlot != 0)
0055e66f          operator delete(abdomenSlot);
0055e66f      
0055e677      class CInvSlotInfo* upperArmSlot = this->upperArmSlot;
0055e67c      this->abdomenSlot = nullptr;
0055e67c      
0055e67f      if (upperArmSlot != 0)
0055e682          operator delete(upperArmSlot);
0055e682      
0055e68a      class CInvSlotInfo* lowerArmSlot = this->lowerArmSlot;
0055e68f      this->upperArmSlot = nullptr;
0055e68f      
0055e692      if (lowerArmSlot != 0)
0055e695          operator delete(lowerArmSlot);
0055e695      
0055e69d      class CInvSlotInfo* handSlot = this->handSlot;
0055e6a2      this->lowerArmSlot = nullptr;
0055e6a2      
0055e6a5      if (handSlot != 0)
0055e6a8          operator delete(handSlot);
0055e6a8      
0055e6b0      class CInvSlotInfo* upperLegSlot = this->upperLegSlot;
0055e6b5      this->handSlot = nullptr;
0055e6b5      
0055e6b8      if (upperLegSlot != 0)
0055e6bb          operator delete(upperLegSlot);
0055e6bb      
0055e6c3      class CInvSlotInfo* lowerLegSlot = this->lowerLegSlot;
0055e6c8      this->upperLegSlot = nullptr;
0055e6c8      
0055e6cb      if (lowerLegSlot != 0)
0055e6ce          operator delete(lowerLegSlot);
0055e6ce      
0055e6d6      class CInvSlotInfo* footSlot = this->footSlot;
0055e6db      this->lowerLegSlot = nullptr;
0055e6db      
0055e6de      if (footSlot != 0)
0055e6e1          operator delete(footSlot);
0055e6e1      
0055e6e9      this->footSlot = nullptr;
0055e520  }

0055e6ef                                               90                                                                 .

0055e6f0  void __fastcall CPlayerSystem::OnBeginCharacterSession(class CPlayerSystem* this)

0055e6f0  {
0055e6f0      /* tailcall */
0055e6f0      return CPlayerSystem::RegisterInputMaps(this);
0055e6f0  }

0055e6f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0055e700  uint8_t __thiscall List<ObjectRangeInfo>::insert(class List<ObjectRangeInfo>* this, class ListNode<ObjectRangeInfo>* arg2, class ObjectRangeInfo const* arg3)

0055e700  {
0055e705      void* eax = operator new(0x48);
0055e705      
0055e70f      if (eax == 0)
0055e70f      {
0055e746          eax = 0;
0055e749          return 0;
0055e70f      }
0055e70f      
0055e71e      __builtin_memcpy(eax, arg3, 0x40);
0055e720      *(uint32_t*)((char*)eax + 0x40) = 0;
0055e727      *(uint32_t*)((char*)eax + 0x44) = 0;
0055e727      
0055e735      if (this->_head == 0)
0055e735      {
0055e737          this->_head = eax;
0055e73a          this->_tail = eax;
0055e73d          this->_num_elements += 1;
0055e740          eax = 1;
0055e743          return 1;
0055e735      }
0055e735      
0055e750      *(uint32_t*)((char*)eax + 0x40) = arg2;
0055e756      *(uint32_t*)((char*)eax + 0x44) = arg2->prev;
0055e759      class ListNode<ObjectRangeInfo>* prev = arg2->prev;
0055e759      
0055e75e      if (prev == 0)
0055e75e      {
0055e76f          this->_head = eax;
0055e772          arg2->prev = eax;
0055e775          this->_num_elements += 1;
0055e778          eax = 1;
0055e77b          return 1;
0055e75e      }
0055e75e      
0055e760      prev->next = eax;
0055e763      arg2->prev = eax;
0055e766      this->_num_elements += 1;
0055e769      eax = 1;
0055e76c      return 1;
0055e700  }

0055e77e                                                                                            90 90                                ..

0055e780  class TResult __thiscall InterfacePtr<class Interface>::_QueryInterface(InterfacePtr<class Interface>* this, class CPlayerModule* arg2)

0055e780  {
0055e780      InterfacePtr<class Interface>* this_1 = this;
0055e785      int32_t* ecx = arg_8;
0055e785      
0055e78e      if (ecx == 0)
0055e78e      {
0055e7ec          int32_t* ecx_4 = *(uint32_t*)this;
0055e7ec          
0055e7f0          if (ecx_4 != 0)
0055e7f0          {
0055e7f2              *(uint32_t*)this = 0;
0055e7f6              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
0055e7f9              *(uint32_t*)((char*)this + 4) = 0;
0055e7f0          }
0055e7f0          
0055e805          arg2->vtable = 0x80004002;
0055e80b          return arg2;
0055e78e      }
0055e78e      
0055e790      int32_t eax_1 = *(uint32_t*)ecx;
0055e7a1      arg_8 = nullptr;
0055e7a8      int32_t edi = *(uint32_t*)*(uint32_t*)(eax_1 + 0xc)(&this_1, 0x7cc6b4, &arg_8);
0055e7ac      int32_t* ecx_1 = *(uint32_t*)this;
0055e7ac      
0055e7ae      if (edi < 0)
0055e7ae      {
0055e7b2          if (ecx_1 != 0)
0055e7b6              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0055e7b6          
0055e7bd          *(uint32_t*)this = 0;
0055e7bf          *(uint32_t*)((char*)this + 4) = 0;
0055e7c2          arg2->vtable = edi;
0055e7c8          return arg2;
0055e7ae      }
0055e7ae      
0055e7ce      int32_t* ebx = arg_8;
0055e7ce      
0055e7d2      if (ecx_1 != 0)
0055e7d6          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0055e7d6      
0055e7dd      *(uint32_t*)this = ebx;
0055e7df      *(uint32_t*)((char*)this + 4) = 0;
0055e7e3      arg2->vtable = edi;
0055e7e9      return arg2;
0055e780  }

0055e80e                                            90 90                                                                ..

0055e810  void __thiscall AC1Legacy::PStringBase<unsigned short>::set(class AC1Legacy::PStringBase<unsigned short>* this, uint16_t const* arg2)

0055e810  {
0055e821      if ((arg2 == 0 || *(uint16_t*)arg2 == 0))
0055e821      {
0055e867          class AC1Legacy::PSRefBuffer<unsigned short>* m_buffer_1 = this->m_buffer;
0055e867          
0055e86f          if (m_buffer_1 != AC1Legacy::PStringBase<unsigned short>::s_NullBuffer)
0055e86f          {
0055e881              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
0055e883                  m_buffer_1->vtable->__vecDelDtor(1);
0055e883              
0055e88b              class AC1Legacy::PStringBase<unsigned short> AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer;
0055e890              this->m_buffer = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1;
0055e89a              arg2 = (AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1 + 4);
0055e89e              /* tailcall */
0055e89e              return InterlockedIncrement();
0055e86f          }
0055e821      }
0055e821      else
0055e821      {
0055e823          class AC1Legacy::PSRefBuffer<unsigned short>* m_buffer = this->m_buffer;
0055e823          
0055e835          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0055e837              m_buffer->vtable->__vecDelDtor(1);
0055e837          
0055e84c          AC1Legacy::PStringBase<unsigned short>::allocate_ref_buffer(this, wcslen(arg2));
0055e858          wcscpy(&this->m_buffer->m_data, arg2);
0055e821      }
0055e810  }

0055e8a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0055e8b0  void __thiscall CPlayerSystem::Handle_CharGenVerificationResponse(class CPlayerSystem* this, void* arg2, uint32_t arg3)

0055e8b0  {
0055e8b0      void* eax_24 = arg2;
0055e8bf      void* ebp = ((char*)eax_24 + arg3);
0055e8c2      int32_t ecx_1 = *(uint32_t*)eax_24;
0055e8c7      arg2 = ((char*)eax_24 + 4);
0055e8c7      
0055e8d2      if ((ecx_1 - 1) > 6)
0055e8d2      {
0055ea74      label_55ea74:
0055ea74          
0055ea74          if (this->m_pCharGenState == 0)
0055ea74          {
0055ea7b              void* eax_19 = operator new(0x268);
0055ea85              class ClientCharGenState* eax_20;
0055ea85              
0055ea85              if (eax_19 == 0)
0055ea90                  eax_20 = nullptr;
0055ea85              else
0055ea89                  eax_20 = ClientCharGenState::ClientCharGenState(eax_19);
0055ea89              
0055ea92              this->m_pCharGenState = eax_20;
0055ea74          }
0055ea74          
0055ea9a          CharGenState::SetSlot(this->m_pCharGenState, 0xffffffff);
0055ea9a          
0055eaa4          if (this->m_pCharGenState == 0)
0055eaa4          {
0055eaab              void* eax_22 = operator new(0x268);
0055eab5              class ClientCharGenState* eax_23;
0055eab5              
0055eab5              if (eax_22 == 0)
0055eac0                  eax_23 = nullptr;
0055eab5              else
0055eab9                  eax_23 = ClientCharGenState::ClientCharGenState(eax_22);
0055eab9              
0055eac2              this->m_pCharGenState = eax_23;
0055eaa4          }
0055eaa4          
0055eaca          CharGenState::SetVerificationState(this->m_pCharGenState, UNDEF_CG_VERIFICATION_RESPONSE);
0055ead1          CM_CharGen::SendNotice_CharGenVerificationResponse(UNDEF_CG_VERIFICATION_RESPONSE);
0055eadf          return;
0055e8d2      }
0055e8d2      
0055e8d8      switch (ecx_1)
0055e8d8      {
0055e8ef          case 1:
0055e8ef          {
0055e8ef              class CharacterSet* edi_2 = (UIFlow::m_instance->vtable->GetPersistantData() + 4);
0055e8f2              void* ebx;
0055e8f2              ebx = 0;
0055e8f2              
0055e903              if (CharGenState::GetVerificationState(CPlayerSystem::GetCharGenState(this)) != CG_VERIFICATION_RESPONSE_PENDING)
0055e903              {
0055e94d                  class CharacterIdentity* eax_7 = CharacterSet::GetIdentity(edi_2, CPlayerSystem::GetCharGenState(this)->slot);
0055e94d                  
0055e954                  if (eax_7 != 0)
0055e96b                      ebx = eax_7->vtable->UnPack(&arg2, ((char*)ebp - arg2)) != 0;
0055e903              }
0055e903              else
0055e903              {
0055e909                  void var_10;
0055e909                  CharacterIdentity::CharacterIdentity(&var_10);
0055e91c                  CharacterIdentity::UnPack(&var_10, &arg2, ((char*)ebp - arg2));
0055e933                  ebx = CharacterSet::AddIdentity(edi_2, &var_10) != 0;
0055e936                  CharacterIdentity::~CharacterIdentity(&var_10);
0055e903              }
0055e903              
0055e970              CM_CharGen::SendNotice_CharGenVerificationResponse(CG_VERIFICATION_RESPONSE_OK);
0055e983              CharGenState::SetVerificationState(CPlayerSystem::GetCharGenState(this), UNDEF_CG_VERIFICATION_RESPONSE);
0055e983              
0055e98b              if (ebx == 0)
0055eadf                  return;
0055eadf              
0055e992              ECM_Character::SendNotice_CharacterSet(edi_2);
0055e9a0              return;
0055e8ef              break;
0055e8ef          }
0055e8d8          case 2:
0055e8d8          {
0055e8d8              goto label_55ea74;
0055e8d8          }
0055e9ae          case 3:
0055e9ae          {
0055e9ae              CharGenState::SetSlot(CPlayerSystem::GetCharGenState(this), 0xffffffff);
0055e9be              CharGenState::SetVerificationState(CPlayerSystem::GetCharGenState(this), UNDEF_CG_VERIFICATION_RESPONSE);
0055e9c5              CM_CharGen::SendNotice_CharGenVerificationResponse(CG_VERIFICATION_RESPONSE_NAME_IN_USE);
0055e9d3              return;
0055e9ae              break;
0055e9ae          }
0055ea14          case 4:
0055ea14          {
0055ea14              CharGenState::SetSlot(CPlayerSystem::GetCharGenState(this), 0xffffffff);
0055ea24              CharGenState::SetVerificationState(CPlayerSystem::GetCharGenState(this), UNDEF_CG_VERIFICATION_RESPONSE);
0055ea2b              CM_CharGen::SendNotice_CharGenVerificationResponse(CG_VERIFICATION_RESPONSE_NAME_BANNED);
0055ea39              return;
0055ea14              break;
0055ea14          }
0055ea47          case 5:
0055ea47          case 6:
0055ea47          {
0055ea47              CharGenState::SetSlot(CPlayerSystem::GetCharGenState(this), 0xffffffff);
0055ea57              CharGenState::SetVerificationState(CPlayerSystem::GetCharGenState(this), UNDEF_CG_VERIFICATION_RESPONSE);
0055ea5e              CM_CharGen::SendNotice_CharGenVerificationResponse(CG_VERIFICATION_RESPONSE_CORRUPT);
0055ea6c              return;
0055ea47              break;
0055ea47          }
0055e9e1          case 7:
0055e9e1          {
0055e9e1              CharGenState::SetSlot(CPlayerSystem::GetCharGenState(this), 0xffffffff);
0055e9f1              CharGenState::SetVerificationState(CPlayerSystem::GetCharGenState(this), UNDEF_CG_VERIFICATION_RESPONSE);
0055e9f8              CM_CharGen::SendNotice_CharGenVerificationResponse(CG_VERIFICATION_RESPONSE_ADMIN_PRIVILEGE_DENIED);
0055ea06              return;
0055e9e1              break;
0055e9e1          }
0055e8d8      }
0055e8b0  }

0055eae2        8b ff                                                                                        ..
0055eae4  uint32_t jump_table_55eae4[0x7] = 
0055eae4  {
0055eae4      [0x0] =  0x0055e8df
0055eae8      [0x1] =  0x0055ea6f
0055eaec      [0x2] =  0x0055e9a3
0055eaf0      [0x3] =  0x0055ea09
0055eaf4      [0x4] =  0x0055ea3c
0055eaf8      [0x5] =  0x0055ea3c
0055eafc      [0x6] =  0x0055e9d6
0055eb00  }

0055eb00  enum ComponentTrackerUpdate __thiscall CPlayerSystem::UpdateSpellComponent(class CPlayerSystem* this, class ACCWeenieObject* arg2, int32_t arg3)

0055eb00  {
0055eb0b      if (this->playerID != 0)
0055eb0b      {
0055eb20          ComponentTracker::UpdateComponent(CPlayerSystem::GetComponentTracker(this), arg2, &arg2);
0055eb20          
0055eb2b          if (arg3 != 0)
0055eb32              CM_Magic::SendNotice_UpdateSpellComponents(arg2);
0055eb32          
0055eb3f          return arg2;
0055eb0b      }
0055eb0b      
0055eb47      uint32_t id = arg2->id;
0055eb4c      class NIListElement<unsigned long>* eax_5 = operator new(8);
0055eb4c      
0055eb56      if (eax_5 == 0)
0055eb65          eax_5 = nullptr;
0055eb56      else
0055eb56      {
0055eb58          class NIListElement<unsigned long>* head_ = this->pending_components_list.head_;
0055eb5e          eax_5->data_ = id;
0055eb60          eax_5->next_ = head_;
0055eb56      }
0055eb56      
0055eb6f      this->pending_components_list.head_ = eax_5;
0055eb6f      
0055eb76      if (this->pending_components_list.tail_ == 0)
0055eb78          this->pending_components_list.tail_ = eax_5;
0055eb78      
0055eb81      return 0;
0055eb00  }

0055eb84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0055eb90  void __thiscall CPlayerSystem::UnregisterObjectRangeHandler(class CPlayerSystem* this, class ObjectRangeHandler* arg2, uint32_t arg3)

0055eb90  {
0055eb98      for (class ListNode<ObjectRangeInfo>* i = this->m_objectRangeCheckList._head; i != 0; i = i->next)
0055eb98      {
0055eba9          if ((i->data.m_handler == arg2 && i->data.m_objectID == arg3))
0055ebab              i->data.m_queuedForDeletion = 1;
0055eb98      }
0055eb90  }

0055ebb9                                                                             90 90 90 90 90 90 90                           .......

0055ebc0  void __thiscall CPlayerSystem::UnregisterAllObjectRangeHandlers(class CPlayerSystem* this, class ObjectRangeHandler* arg2)

0055ebc0  {
0055ebc8      for (class ListNode<ObjectRangeInfo>* i = this->m_objectRangeCheckList._head; i != 0; i = i->next)
0055ebc8      {
0055ebd2          if (i->data.m_handler == arg2)
0055ebd4              i->data.m_queuedForDeletion = 1;
0055ebc8      }
0055ebc0  }

0055ebe1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0055ebf0  int32_t __thiscall PackableHashTable<unsigned long,CContractTracker>::remove(class PackableHashTable<unsigned long,CContractTracker>* this, uint32_t const* arg2, class CContractTracker* arg3)

0055ebf0  {
0055ebf5      uint32_t _table_size = this->_table_size;
0055ebf5      
0055ebfa      if (_table_size != 0)
0055ebfa      {
0055ebfc          class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_buckets;
0055ebfc          
0055ec01          if (_buckets != 0)
0055ec01          {
0055ec07              uint32_t const ecx = *(uint32_t*)arg2;
0055ec0f              int32_t* i_1 = nullptr;
0055ec0f              
0055ec16              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[0xc])
0055ec16              {
0055ec1a                  if (*(uint32_t*)i == ecx)
0055ec1a                  {
0055ec36                      CContractTracker::operator=(arg3, &i[2]);
0055ec3d                      int32_t ecx_2 = i[0xc];
0055ec3d                      
0055ec40                      if (i_1 == 0)
0055ec52                          this->_buckets[(COMBINE(0, *(uint32_t*)arg2) % this->_table_size)] = ecx_2;
0055ec40                      else
0055ec42                          i_1[0xc] = ecx_2;
0055ec42                      
0055ec32                      i[2] = 0x79285c;
0055ec60                      operator delete(i);
0055ec6e                      this->_currNum -= 1;
0055ec78                      return 1;
0055ec1a                  }
0055ec1a                  
0055ec1c                  i_1 = i;
0055ec16              }
0055ec01          }
0055ebfa      }
0055ebfa      
0055ec2a      return 0;
0055ebf0  }

0055ec7b                                                                                   90 90 90 90 90                             .....

0055ec80  uint8_t __thiscall List<ObjectRangeInfo>::remove(class List<ObjectRangeInfo>* this, class ListNode<ObjectRangeInfo>* arg2)

0055ec80  {
0055ec8b      if (arg2 != 0)
0055ec8b      {
0055ec8d          class ListNode<ObjectRangeInfo>* _head = this->_head;
0055ec8d          
0055ec92          if (_head != 0)
0055ec92          {
0055ec9c              class ListNode<ObjectRangeInfo>* next;
0055ec9c              
0055ec9c              if (arg2 != _head)
0055ec9c              {
0055ecad                  arg2->prev->next = arg2->next;
0055ecb7                  next = arg2->next;
0055ecb7                  
0055ecbd                  if (next == 0)
0055ecca                      this->_tail = arg2->prev;
0055ecbd                  else
0055ecc2                      next->prev = arg2->prev;
0055ec9c              }
0055ec9c              else
0055ec9c              {
0055ec9e                  next = arg2->next;
0055eca3                  this->_head = next;
0055eca3                  
0055eca6                  if (next != 0)
0055ecc2                      next->prev = nullptr;
0055eca6                  else
0055eca8                      this->_tail = nullptr;
0055ec9c              }
0055ecce              operator delete(arg2);
0055ecda              this->_num_elements -= 1;
0055ecdd              uint32_t eax_2;
0055ecdd              eax_2 = 1;
0055ece0              return 1;
0055ec92          }
0055ec8b      }
0055ec8b      
0055ec94      class ListNode<ObjectRangeInfo>* eax;
0055ec94      eax = 0;
0055ec97      return 0;
0055ec80  }

0055ece3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0055ecf0  void __fastcall CPlayerSystem::OnShutdown(class CPlayerSystem* this)

0055ecf0  {
0055ecf3      int32_t esi;
0055ecf3      int32_t var_14 = esi;
0055ecf3      int32_t* esp_1 = &var_14;
0055ecf6      class CPlayerSystem* CPlayerSystem::s_pPlayerSystem_1 = CPlayerSystem::s_pPlayerSystem;
0055ecf6      
0055ecfe      if (CPlayerSystem::s_pPlayerSystem_1 != 0)
0055ecfe      {
0055ed00          CPlayerSystem::s_pPlayerSystem_1->vtable->Release();
0055ed02          void var_10;
0055ed02          esp_1 = &var_10;
0055ed05          CPlayerSystem::s_pPlayerSystem = nullptr;
0055ecfe      }
0055ecfe      
0055ed12      *(uint32_t*)((char*)esp_1 - 4) = &this->playerModule;
0055ed17      *(uint32_t*)((char*)esp_1 - 8) = &esp_1[1];
0055ed12      esp_1[3] = 0;
0055ed12      esp_1[4] = 0;
0055ed2c      InterfacePtr<class Interface>::_QueryInterface(&esp_1[3]);
0055ed31      int32_t* esi_3 = esp_1[2];
0055ed35      *(uint32_t*)((char*)esp_1 - 8) = 0;
0055ed37      *(uint32_t*)((char*)esp_1 - 0xc) = esi_3;
0055ed3c      *(uint32_t*)((char*)esp_1 - 0x10) = 0x7cc500;
0055ed41      *(uint32_t*)((char*)esp_1 - 0x14) = &esp_1[1];
0055ed49      InterfaceSystem::UnregisterClassA(InterfaceSystem::GetInstance());
0055ed49      
0055ed50      if (esi_3 != 0)
0055ed56          *(uint32_t*)(*(uint32_t*)esi_3 + 0x14)();
0055ed56      
0055ed59      *(uint32_t*)((char*)esp_1 - 4);
0055ecf0  }

0055ed5e                                                                                            90 90                                ..

0055ed60  uint8_t __thiscall CPlayerSystem::AutoWieldIsLegal(class CPlayerSystem* this, uint32_t arg2, int32_t arg3)

0055ed60  {
0055ed74      class ACCWeenieObject* edi = ClientObjMaintSystem::GetWeenieObject(arg2);
0055ed7b      class ACCWeenieObject* eax;
0055ed7b      
0055ed7b      if (edi == 0)
0055ed7b      {
0055ed7e          eax = 0;
0055ed87          return 0;
0055ed7b      }
0055ed7b      
0055ed8b      uint32_t _valid_locations = edi->pwd._valid_locations;
0055ed8b      
0055ed97      if ((_valid_locations & 0x7fffffff) != 0)
0055ed97      {
0055eda9          uint32_t m_itemID = this->m_invSlotModule.weaponReadySlot->m_itemID;
0055edb3          void* var_a8_2;
0055edb3          void var_98;
0055edb3          void __return;
0055edb3          void var_90;
0055edb3          
0055edb3          if (((_valid_locations & "activation type (%s) with '%s' b…") == 0 || m_itemID == 0))
0055edb3          {
0055ee67          label_55ee67:
0055ee71              wchar16 const* const var_ac_2;
0055ee71              
0055ee71              if (((_valid_locations & 0x200000) == 0 || m_itemID == 0))
0055ee71              {
0055eeb2              label_55eeb2:
0055eeb2                  
0055eeb8                  if ((_valid_locations & 0x1000000) == 0)
0055eeb8                  {
0055ef34                      eax = 1;
0055ef3d                      return 1;
0055eeb8                  }
0055eeb8                  
0055eec3                  if (*(uint32_t*)((char*)ClientCombatSystem::GetCombatSystem()->update_time)[4] == 1)
0055eec3                  {
0055ef34                      eax = 1;
0055ef3d                      return 1;
0055eec3                  }
0055eec3                  
0055eece                  if (*(uint8_t*)((char*)edi->vtable->InqType())[1] < 0)
0055eece                  {
0055ef34                      eax = 1;
0055ef3d                      return 1;
0055eece                  }
0055eece                  
0055eed9                  if (arg3 == 0)
0055eed9                  {
0055eef1                      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ACCWeenieObject::GetObjectNameWide(edi, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0055eef2                      var_ac_2 = u"Cannot hold %s while in combat";
0055eef2                      goto label_55eefe;
0055eed9                  }
0055ee71              }
0055ee71              else
0055ee71              {
0055ee79                  class ACCWeenieObject* esi_1 = ClientObjMaintSystem::GetWeenieObject(m_itemID);
0055ee79                  
0055ee80                  if (esi_1 == 0)
0055ee80                      goto label_55eeb2;
0055ee80                  
0055ee8b                  if (ACCWeenieObject::BlocksUseOfShield(esi_1) == 0)
0055ee8b                      goto label_55eeb2;
0055ee8b                  
0055ee96                  if (arg3 == 0)
0055ee96                  {
0055eeaa                      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_SINGULAR, 0)->m_charbuffer;
0055eeab                      var_ac_2 = u"A shield may not be worn with th…";
0055eefe                  label_55eefe:
0055eefe                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, var_ac_2);
0055ef0a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0055ef13                      StringInfo::StringInfo(&var_90);
0055ef23                      StringInfo::SetLiteralValue(&var_90, &var_98, 1);
0055ef2c                      var_a8_2 = &var_90;
0055ef2d                      goto label_55ee3f;
0055ee96                  }
0055ee71              }
0055edb3          }
0055edb3          else
0055edb3          {
0055edba              eax = ClientObjMaintSystem::GetWeenieObject(m_itemID);
0055edba              
0055edc4              if (eax == 0)
0055edc4                  goto label_55ee67;
0055edc4              
0055edca              enum AMMO_TYPE _ammoType = eax->pwd._ammoType;
0055edca              
0055edde              if ((_ammoType == AMMO_NONE || _ammoType == edi->pwd._ammoType))
0055edd2                  goto label_55ee67;
0055edd2              
0055eded              if (arg3 == 0)
0055eded              {
0055ee01                  class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0055ee0e                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"Cannot be used with %s");
0055ee1a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0055ee23                  StringInfo::StringInfo(&var_90);
0055ee33                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
0055ee3c                  var_a8_2 = &var_90;
0055ee3f              label_55ee3f:
0055ee3f                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_a8_2);
0055ee4b                  StringInfo::~StringInfo(&var_90);
0055ee54                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
0055eded              }
0055edb3          }
0055ed97      }
0055ed97      
0055ee5b      eax = 0;
0055ee64      return 0;
0055ed60  }


0055ef40  uint8_t __thiscall CPlayerSystem::AutoWearIsLegal(class CPlayerSystem* this, uint32_t arg2, int32_t* arg3, int32_t arg4)

0055ef40  {
0055ef4f      *(uint32_t*)arg3 = 0;
0055ef4f      
0055ef5f      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) == 0)
0055ef5f      {
0055ef61          int32_t eax;
0055ef61          eax = 0;
0055ef6a          return 0;
0055ef5f      }
0055ef5f      
0055ef7c      class ACCWeenieObject* esi = ClientObjMaintSystem::GetWeenieObject(arg2);
0055ef93      class ACCWeenieObject* eax_1;
0055ef93      
0055ef93      if ((esi != 0 && (esi->pwd._valid_locations & 0x8007fff) != 0))
0055ef93      {
0055efa5          if ((esi->pwd._priority & this->clothingPriorityMask) == 0)
0055efa5          {
0055efa9              eax_1 = 1;
0055efb2              return 1;
0055efa5          }
0055efa5          
0055efbd          class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(this->playerID);
0055efbd          
0055efc9          if ((eax_3 != 0 && ACCWeenieObject::GetLocationOnObject(eax_3, arg2) != 0))
0055efde              *(uint32_t*)arg3 = 1;
0055efde          
0055efed          if (arg4 == 0)
0055efed          {
0055effd              wchar16 const* const var_b0_1;
0055effd              void __return;
0055effd              
0055effd              if (*(uint32_t*)arg3 == 0)
0055effd              {
0055f037                  eax_1 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::GetObjectAtLocation(eax_3, (this->inventoryMask & esi->pwd._valid_locations), esi->pwd._priority));
0055f037                  
0055f041                  if (eax_1 != 0)
0055f041                  {
0055f055                      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0055f056                      var_b0_1 = u"You must remove your %s to wear …";
0055f056                      goto label_55f062;
0055f041                  }
0055effd              }
0055effd              else
0055effd              {
0055f011                  class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(esi, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0055f012                  var_b0_1 = u"The %s is already being worn";
0055f062              label_55f062:
0055f062                  void var_98;
0055f062                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, var_b0_1);
0055f06e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0055f077                  void var_90;
0055f077                  StringInfo::StringInfo(&var_90);
0055f087                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
0055f093                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
0055f09f                  StringInfo::~StringInfo(&var_90);
0055f0a8                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
0055effd              }
0055efed          }
0055ef93      }
0055ef93      
0055f0b0      eax_1 = 0;
0055f0b9      return 0;
0055ef40  }

0055f0bc                                                                                      90 90 90 90                              ....

0055f0c0  void __thiscall CPlayerSystem::UpdateContractTrackerTable(class CPlayerSystem* this, class CContractTrackerTable const* arg2)

0055f0c0  {
0055f0d6      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(&this->m_contractTrackerTable._contractTrackerHash);
0055f0db      class CContractTrackerTable* edi = arg2;
0055f0db      
0055f0e3      if (edi->_contractTrackerHash._currNum > 0)
0055f0e3      {
0055f0f1          void __return;
0055f0f1          PackableHashTable<unsigned long,CContractTracker>::begin(&edi->_contractTrackerHash, &__return);
0055f0f6          void* i_1;
0055f0f6          void* const i = i_1;
0055f0f6          
0055f0fc          if (i != 0)
0055f0fc          {
0055f169              do
0055f169              {
0055f10e                  int32_t var_30;
0055f10e                  CContractTracker::CContractTracker(&var_30, ((char*)i + 8));
0055f122                  int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0055f12a                  int32_t var_c_1 = *(int32_t*)((char*)Timer::cur_time + 4);
0055f133                  uint32_t var_28;
0055f133                  uint32_t var_48 = var_28;
0055f13c                  PackableHashTable<unsigned long,CContractTracker>::add(&this->m_contractTrackerTable._contractTrackerHash, &var_48, &var_30);
0055f141                  void* const i_2 = *(uint32_t*)((char*)i + 0x30);
0055f146                  var_30 = 0x79285c;
0055f146                  
0055f14e                  if (i_2 == 0)
0055f14e                  {
0055f153                      int32_t eax_3 = (*(uint32_t*)((char*)i + 0x34) + 1);
0055f156                      int32_t var_34;
0055f156                      
0055f156                      if (eax_3 >= var_34)
0055f156                      {
0055f163                      label_55f163:
0055f163                          i_2 = nullptr;
0055f156                      }
0055f156                      else
0055f156                      {
0055f15c                          int32_t var_38;
0055f15c                          
0055f15c                          while (*(uint32_t*)(var_38 + (eax_3 << 2)) == 0)
0055f15c                          {
0055f15e                              eax_3 += 1;
0055f15e                              
0055f161                              if (eax_3 >= var_34)
0055f161                                  goto label_55f163;
0055f15c                          }
0055f15c                          
0055f180                          i_2 = *(uint32_t*)(var_38 + (eax_3 << 2));
0055f156                      }
0055f14e                  }
0055f14e                  
0055f165                  i = i_2;
0055f169              } while (i != 0);
0055f169              
0055f16b              edi = arg2;
0055f0fc          }
0055f0e3      }
0055f0e3      
0055f16f      CM_Social::SendNotice_UpdateContractTrackerTable(edi);
0055f0c0  }

0055f185                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0055f190  void __thiscall CPlayerSystem::UpdateContractTracker(class CPlayerSystem* this, class CContractTracker arg2, int32_t arg3)

0055f190  {
0055f191      uint32_t _contract_id = arg2._contract_id;
0055f19e      uint32_t _table_size = this->m_contractTrackerTable._contractTrackerHash._table_size;
0055f1a3      void* esi_1;
0055f1a3      
0055f1a3      if (_table_size == 0)
0055f1a3      {
0055f1cb      label_55f1cb:
0055f1cb          esi_1 = nullptr;
0055f1a3      }
0055f1a3      else
0055f1a3      {
0055f1a5          class PackableHashData<unsigned long,CContractTracker>** _buckets = this->m_contractTrackerTable._contractTrackerHash._buckets;
0055f1a5          
0055f1aa          if (_buckets == 0)
0055f1aa          {
0055f1cb          label_55f1cb_1:
0055f1cb              esi_1 = nullptr;
0055f1aa          }
0055f1aa          else
0055f1aa          {
0055f1b2              int32_t* edx_3 = _buckets[(COMBINE(0, _contract_id) % _table_size)];
0055f1b2              
0055f1b7              if (edx_3 == 0)
0055f1b7              {
0055f1cb              label_55f1cb_2:
0055f1cb                  esi_1 = nullptr;
0055f1b7              }
0055f1b7              else
0055f1b7              {
0055f1c2                  while (_contract_id != *(uint32_t*)edx_3)
0055f1c2                  {
0055f1c4                      edx_3 = edx_3[0xc];
0055f1c4                      
0055f1c9                      if (edx_3 == 0)
0055f1c9                          goto label_55f1cb_2;
0055f1c2                  }
0055f1c2                  
0055f220                  esi_1 = &edx_3[2];
0055f1b7              }
0055f1aa          }
0055f1a3      }
0055f1a3      
0055f1cd      int32_t ebp = arg3;
0055f1cd      
0055f1d3      if (ebp == 0)
0055f1d3          goto label_55f1f2;
0055f1d3      
0055f1d7      if (esi_1 == 0)
0055f1d7      {
0055f205      label_55f205:
0055f205          arg2._time_of_server_update = (*(uint32_t*)Timer::cur_time);
0055f211          *(uint32_t*)((char*)arg2._time_of_server_update)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0055f215          arg3 = _contract_id;
0055f219          PackableHashTable<unsigned long,CContractTracker>::add(&this->m_contractTrackerTable._contractTrackerHash, &arg3, &arg2);
0055f1d7      }
0055f1d7      else
0055f1d7      {
0055f1e5          arg3 = _contract_id;
0055f1e9          PackableHashTable<unsigned long,CContractTracker>::remove(&this->m_contractTrackerTable._contractTrackerHash, &arg3, &arg2);
0055f1ee          _contract_id = arg2._contract_id;
0055f1f2      label_55f1f2:
0055f1f2          
0055f1f4          if (esi_1 == 0)
0055f1f4              goto label_55f205;
0055f1f4          
0055f229          *(uint32_t*)((char*)esi_1 + 0xc) = arg2._contract_stage;
0055f230          int32_t edx_5 = *(uint32_t*)((char*)arg2._time_when_done)[4];
0055f234          *(uint32_t*)((char*)esi_1 + 0x10) = arg2._time_when_done;
0055f237          *(uint32_t*)((char*)esi_1 + 0x14) = edx_5;
0055f23e          int32_t ecx_3 = *(uint32_t*)((char*)arg2._time_when_repeats)[4];
0055f242          *(uint32_t*)((char*)esi_1 + 0x18) = arg2._time_when_repeats;
0055f245          *(uint32_t*)((char*)esi_1 + 0x1c) = ecx_3;
0055f24e          int32_t eax_6 = *(int32_t*)((char*)Timer::cur_time + 4);
0055f253          *(uint32_t*)((char*)esi_1 + 0x20) = (*(uint32_t*)Timer::cur_time);
0055f256          *(uint32_t*)((char*)esi_1 + 0x24) = eax_6;
0055f1d7      }
0055f1d7      
0055f25f      CM_Social::SendNotice_UpdateContractTracker(&arg2, ebp);
0055f190  }

0055f26e                                            90 90                                                                ..

0055f270  void __fastcall List<ObjectRangeInfo>::flush(class List<ObjectRangeInfo>* this)

0055f270  {
0055f276      while (true)
0055f276      {
0055f276          class ListNode<ObjectRangeInfo>* _head = this->_head;
0055f276          
0055f27b          if (_head == 0)
0055f27b              break;
0055f27b          
0055f27d          class ListNode<ObjectRangeInfo>* next = _head->next;
0055f282          this->_head = next;
0055f282          
0055f285          if (next == 0)
0055f28c              this->_tail = nullptr;
0055f285          else
0055f287              next->prev = nullptr;
0055f287          
0055f291          if (_head != 0)
0055f294              operator delete(_head);
0055f294          
0055f29c          this->_num_elements -= 1;
0055f276      }
0055f270  }

0055f2a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0055f2b0  void __fastcall CContractTrackerTable::~CContractTrackerTable(class CContractTrackerTable* this)

0055f2b0  {
0055f2b7      this->vtable = 0x7cc8f0;
0055f2b4      this->_contractTrackerHash.vtable = 0x7a6930;
0055f2c5      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(&this->_contractTrackerHash);
0055f2ca      class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_contractTrackerHash._buckets;
0055f2ca      
0055f2cf      if (_buckets != 0)
0055f2cf      {
0055f2d2          operator delete[](_buckets);
0055f2b4          this->_contractTrackerHash._buckets = nullptr;
0055f2cf      }
0055f2cf      
0055f2b4      this->_contractTrackerHash._table_size = 0;
0055f2b4      this->_contractTrackerHash.vtable = 0x79285c;
0055f2ee      this->vtable = 0x79285c;
0055f2b0  }

0055f2f7                                                                       90 90 90 90 90 90 90 90 90                         .........

0055f300  void* __thiscall CContractTrackerTable::`scalar deleting destructor'(class CContractTrackerTable* this, uint32_t arg2)

0055f300  {
0055f307      this->vtable = 0x7cc8f0;
0055f304      this->_contractTrackerHash.vtable = 0x7a6930;
0055f315      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(&this->_contractTrackerHash);
0055f31a      class PackableHashData<unsigned long,CContractTracker>** _buckets = this->_contractTrackerHash._buckets;
0055f31a      
0055f31f      if (_buckets != 0)
0055f31f      {
0055f322          operator delete[](_buckets);
0055f304          this->_contractTrackerHash._buckets = nullptr;
0055f31f      }
0055f31f      
0055f304      this->_contractTrackerHash._table_size = 0;
0055f304      this->_contractTrackerHash.vtable = 0x79285c;
0055f343      this->vtable = 0x79285c;
0055f343      
0055f349      if ((arg2 & 1) != 0)
0055f34c          operator delete(this);
0055f34c      
0055f358      return this;
0055f300  }

0055f35b                                                                                   90 90 90 90 90                             .....

0055f360  void __fastcall CPlayerSystem::CalculateObjectRangeChecks(class CPlayerSystem* this)

0055f360  {
0055f360      int32_t ebp;
0055f360      int32_t var_4 = ebp;
0055f360      
0055f377      if (this->m_objectRangeCheckList._head != 0)
0055f377      {
0055f37d          class ListNode<ObjectRangeInfo>* i = this->m_objectRangeCheckList._head;
0055f396          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0055f39a          int32_t var_c_1 = *(int32_t*)((char*)Timer::cur_time + 4);
0055f39a          
0055f39e          while (i != 0)
0055f39e          {
0055f3a6              int32_t eax_1;
0055f3a6              eax_1 = i->data.m_queuedForDeletion;
0055f3a6              
0055f3ab              if (eax_1 == 0)
0055f3ab              {
0055f3bf                  long double x87_r7_1 = ((long double)Timer::cur_time_1);
0055f3c3                  long double temp0_1 = ((long double)i->data.m_nextUpdate);
0055f3c3                  (x87_r7_1 - temp0_1);
0055f3c6                  eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0055f3c6                  
0055f3cb                  if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0055f3cb                  {
0055f3de                      i->data.m_nextUpdate = ((double)(((long double)Timer::cur_time_1) + ((long double)i->data.m_timeInterval)));
0055f3ef                      int32_t var_2c_1 = *(uint32_t*)((char*)i->data.m_range)[4];
0055f3ef                      
0055f400                      if (ACCWeenieObject::ObjectsInRange(i->data.m_objectID, this->playerID, i->data.m_range, i->data.m_useRadii, i->data.m_ignoreZDelta) != 0)
0055f400                      {
0055f412                          long double x87_r7_4 = ((long double)i->data.m_timeOut);
0055f415                          long double temp1_1 = ((long double)0.0);
0055f415                          (x87_r7_4 - temp1_1);
0055f41b                          eax_1 = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0055f41b                          
0055f420                          if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0055f420                          {
0055f422                              long double x87_r7_5 = ((long double)Timer::cur_time_1);
0055f426                              long double temp2_1 = ((long double)i->data.m_executeAtTime);
0055f426                              (x87_r7_5 - temp2_1);
0055f429                              eax_1 = ((((x87_r7_5 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0055f429                              
0055f42e                              if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0055f42e                              {
0055f430                                  class ObjectRangeHandler* m_handler_1 = i->data.m_handler;
0055f430                                  
0055f434                                  if (m_handler_1 != 0)
0055f434                                  {
0055f439                                      m_handler_1->vtable->OnObjectRangeTimeout(i->data.m_objectID);
0055f43f                                      i->data.m_queuedForDeletion = 1;
0055f434                                  }
0055f42e                              }
0055f420                          }
0055f400                      }
0055f400                      else
0055f400                      {
0055f402                          class ObjectRangeHandler* m_handler = i->data.m_handler;
0055f402                          
0055f406                          if (m_handler != 0)
0055f406                          {
0055f40b                              m_handler->vtable->OnObjectRangeExit(i->data.m_objectID);
0055f43f                              i->data.m_queuedForDeletion = 1;
0055f406                          }
0055f400                      }
0055f3cb                  }
0055f3cb                  
0055f442                  i = i->next;
0055f3ab              }
0055f3ab              else
0055f3ab              {
0055f3ad                  class ListNode<ObjectRangeInfo>* i_1 = i;
0055f3af                  i = i->next;
0055f3b5                  List<ObjectRangeInfo>::remove(&this->m_objectRangeCheckList, i_1);
0055f3ab              }
0055f39e          }
0055f377      }
0055f377      
0055f36a      var_4;
0055f360  }

0055f455                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0055f460  void __fastcall CPlayerSystem::RecvNotice_ItemAttributesChanged(class CPlayerSystem* this, uint32_t arg2, uint32_t arg3)

0055f460  {
0055f463      int32_t ebx;
0055f463      int32_t var_18 = ebx;
0055f464      int32_t ebp;
0055f464      int32_t var_1c = ebp;
0055f465      int32_t esi;
0055f465      int32_t var_20 = esi;
0055f466      struct Turbine_GUID* edi;
0055f466      struct Turbine_GUID* var_24 = edi;
0055f46b      struct Turbine_GUID* var_14;
0055f46b      int32_t* var_28 = &var_14;
0055f472      struct Turbine_GUID* var_2c = &ClientObjMaintSystem_ClassType;
0055f47a      var_14 = nullptr;
0055f485      class TResult __return;
0055f485      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
0055f48a      struct Turbine_GUID* ecx_1 = var_14;
0055f493      var_2c = ecx_1;
0055f495      int32_t var_28_1 = 0;
0055f498      struct Turbine_GUID* eax_1 = var_2c;
0055f49e      int32_t var_8 = 0;
0055f4a2      uint32_t var_4 = 0;
0055f4a2      
0055f4a6      if (eax_1 != 0)
0055f4ac          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0055f4ac      
0055f4b8      void var_c;
0055f4b8      InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&var_8, &var_c);
0055f4b8      
0055f4bf      if (ecx_1 != 0)
0055f4c5          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
0055f4c5      
0055f4cc      class TResult __return_1 = __return;
0055f4d4      class CWeenieObject* eax_3 = CObjectMaint::GetWeenieObject((__return_1 + 8), var_4);
0055f4d4      struct Turbine_GUID** esp = &var_2c;
0055f4d4      
0055f4dd      if ((eax_3 != 0 && (*(uint8_t*)((char*)eax_3->vtable->InqType())[1] & 0x10) != 0))
0055f4dd      {
0055f4f1          CPlayerSystem::UpdateSpellComponent(((char*)this - 4), eax_3, 1);
0055f4f1          esp = &var_2c;
0055f4dd      }
0055f4dd      
0055f4f8      if (__return_1 != 0)
0055f4f8      {
0055f4fe          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0055f4fe          esp = &var_24;
0055f4f8      }
0055f4f8      
0055f501      *(uint32_t*)esp;
0055f501      esp[1];
0055f501      esp[2];
0055f501      esp[3];
0055f460  }

0055f50b                                   90 90 90 90 90                                                             .....

0055f510  uint8_t __fastcall CPlayerSystem::OnLoadChanged(class CPlayerSystem* this)

0055f510  {
0055f516      float ebx;
0055f516      float var_ac = ebx;
0055f51e      int32_t* var_a8;
0055f51e      int32_t* var_bc = &var_a8;
0055f525      struct Turbine_GUID* var_c0 = &PlayerDesc_ClassType;
0055f52d      var_a8 = nullptr;
0055f538      void __return;
0055f538      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_c0, var_bc);
0055f53d      struct Turbine_GUID* ecx_1 = var_a8;
0055f546      var_c0 = ecx_1;
0055f548      int32_t var_bc_1 = 0;
0055f54b      struct Turbine_GUID* eax_1 = var_c0;
0055f551      int32_t var_a0 = 0;
0055f555      int32_t var_9c = 0;
0055f555      
0055f559      if (eax_1 != 0)
0055f55f          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0055f55f      
0055f56b      struct Turbine_GUID** esp = &var_c0;
0055f572      void var_94;
0055f572      int32_t ebp = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_a0, &var_94);
0055f572      
0055f574      if (ecx_1 != 0)
0055f57a          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
0055f57a      
0055f57d      int32_t* esi_1 = var_a8;
0055f57d      
0055f583      if (esi_1 != 0)
0055f583      {
0055f587          if (ebp >= 0)
0055f587          {
0055f5a4              var_ac = 0f;
0055f5ac              CACQualities::InqLoad(esi_1, &var_ac);
0055f5b5              (((long double)var_ac) - ((long double)this->m_fLoad));
0055f5bd              bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0055f5bd              
0055f5c0              if (!(p))
0055f5c0              {
0055f5c6                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0055f5c9                  int32_t eax_5;
0055f5c9                  eax_5 = 1;
0055f5d5                  return 1;
0055f5c0              }
0055f5c0              
0055f5dc              (((long double)this->m_fLoad) - ((long double)2.0));
0055f5e4              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0055f5e7              long double x87_r7_2;
0055f5e7              long double temp3_1;
0055f5e7              
0055f5e7              if (!(p_1))
0055f5e7              {
0055f5e9                  x87_r7_2 = ((long double)var_ac);
0055f5ed                  temp3_1 = ((long double)2.0);
0055f5ed                  (x87_r7_2 - temp3_1);
0055f5e7              }
0055f5e7              
0055f5f8              int32_t __saved_ebp;
0055f5f8              
0055f5f8              if ((p_1 || (*(uint8_t*)((char*)((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0))
0055f5f8              {
0055f637                  (((long double)this->m_fLoad) - ((long double)1.0));
0055f63f                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0055f63f                  
0055f642                  if (!(p_2))
0055f642                  {
0055f644                      long double x87_r7_4 = ((long double)var_ac);
0055f648                      long double temp4_1 = ((long double)1.0);
0055f648                      (x87_r7_4 - temp4_1);
0055f648                      
0055f653                      if ((*(uint8_t*)((char*)((((x87_r7_4 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0055f653                      {
0055f659                          StringInfo::StringInfo(&__return);
0055f667                          PStringBase<unsigned short>::PStringBase<unsigned short>(&__saved_ebp, u"You are encumbered!");
0055f677                          StringInfo::SetLiteralValue(&__return, &__saved_ebp, 1);
0055f680                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__saved_ebp);
0055f68c                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &__return);
0055f698                          StringInfo::~StringInfo(&__return);
0055f653                      }
0055f642                  }
0055f5f8              }
0055f5f8              else
0055f5f8              {
0055f5fe                  StringInfo::StringInfo(&__return);
0055f60c                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__saved_ebp, u"You are severely encumbered!");
0055f61c                  StringInfo::SetLiteralValue(&__return, &__saved_ebp, 1);
0055f625                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__saved_ebp);
0055f68c                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &__return);
0055f698                  StringInfo::~StringInfo(&__return);
0055f5f8              }
0055f69d              float ecx_17 = var_ac;
0055f6a4              this->m_fLoad = ecx_17;
0055f6aa              CM_Character::SendNotice_LoadChanged(ecx_17);
0055f6b6              *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0055f6bc              int32_t eax_7;
0055f6bc              eax_7 = 1;
0055f6c5              return 1;
0055f587          }
0055f587          
0055f58d          *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0055f58d          struct Turbine_GUID* __saved_edi;
0055f58d          esp = &__saved_edi;
0055f583      }
0055f583      
0055f590      class TResult eax_2;
0055f590      eax_2.m_val = 0;
0055f592      *(uint32_t*)esp;
0055f592      esp[1];
0055f592      esp[2];
0055f592      esp[3];
0055f59c      return 0;
0055f510  }

0055f6c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0055f6d0  void __fastcall CPlayerSystem::Handle_Login__CharacterSet(class CPlayerSystem* this, void* arg2, uint32_t arg3)

0055f6d0  {
0055f6d3      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0055f6de      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0055f6e5      uint32_t* var_68 = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
0055f6e8      uint32_t var_44 = 0x79e250;
0055f6f0      int32_t s;
0055f6f0      __builtin_memset(&s, 0, 0x1c);
0055f70c      int32_t var_1c = 5;
0055f714      InterlockedIncrement(var_68);
0055f71e      var_68 = arg3;
0055f728      int32_t var_14 = 0;
0055f72c      int32_t var_10 = 0;
0055f730      int32_t var_c = 0;
0055f734      int32_t var_3c = 0;
0055f738      CharacterSet::UnPack(&var_44, &arg2, var_68);
0055f741      var_68 = &AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0055f746      int32_t* var_54;
0055f746      accountID::accountID(&var_54, var_68);
0055f74b      int32_t* ebx = var_54;
0055f755      var_68 = &ebx[5];
0055f758      AC1Legacy::PStringBase<char>::set(&this->account_, var_68);
0055f769      int32_t var_50;
0055f752      this->account_.fIsDarkMajestyExpansion_ = var_50;
0055f76f      var_68 = &ebx[1];
0055f770      int32_t var_4c;
0055f752      this->account_.m_fIsThroneOfDestinyExpansion = var_4c;
0055f773      int32_t var_48;
0055f752      this->account_.m_fPreOrderedThroneOfDestinyExpansion = var_48;
0055f776      int32_t eax_4;
0055f776      uint32_t* ecx_5;
0055f776      eax_4 = InterlockedDecrement(var_68);
0055f776      
0055f782      if ((eax_4 == 0 && ebx != 0))
0055f782      {
0055f784          int32_t edx_1 = *(uint32_t*)ebx;
0055f786          var_68 = 1;
0055f78a          ecx_5 = *(uint32_t*)edx_1(var_68);
0055f782      }
0055f782      
0055f791      if (var_1c == 0xffffffff)
0055f793          int32_t var_1c_1 = 0x14;
0055f793      
0055f79f      int32_t var_8;
0055f79f      
0055f79f      if (var_8 != 0)
0055f79f      {
0055f7a3          var_68 = ecx_5;
0055f7aa          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_68, &this->account_.m_buffer->m_data);
0055f7aa          
0055f7b9          if (CCommunicationSystem::StartupTurbineChat(var_68) == 0)
0055f7b9          {
0055f7bb              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0055f7c0              arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0055f7c7              var_68 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef;
0055f7c8              InterlockedIncrement(var_68);
0055f7ce              var_68 = "Failed to startup Turbine chat!\n…";
0055f7d7              AC1Legacy::PStringBase<char>::set(&arg3, var_68);
0055f7dc              uint32_t esi_3 = arg3;
0055f7e3              var_68 = (esi_3 + 4);
0055f7e3              
0055f7f0              if ((InterlockedDecrement(var_68) == 0 && esi_3 != 0))
0055f7f0              {
0055f7f2                  int32_t edx_2 = *(uint32_t*)esi_3;
0055f7f4                  var_68 = 1;
0055f7f8                  *(uint32_t*)edx_2(var_68);
0055f7f0              }
0055f7b9          }
0055f79f      }
0055f79f      
0055f7fe      var_68 = &var_44;
0055f7ff      this->m_accountHasThroneofDestiny = 1;
0055f806      ECM_Character::SendNotice_CharacterSet(var_68);
0055f812      CharacterSet::~CharacterSet(&var_44);
0055f6d0  }

0055f821     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0055f830  void __thiscall CPlayerSystem::DeleteCharacter(class CPlayerSystem* this, uint32_t arg2)

0055f830  {
0055f83b      void* eax_1 = UIFlow::m_instance->vtable->GetPersistantData();
0055f83b      
0055f840      if (eax_1 != 0)
0055f840      {
0055f84a          int32_t eax_2 = CharacterSet::GetSlot(((char*)eax_1 + 4), arg2);
0055f84a          
0055f852          if (eax_2 != 0xffffffff)
0055f852          {
0055f854              int32_t var_8_2 = eax_2;
0055f85e              void var_18;
0055f85e              int32_t eax_3 = accountID::accountID(&var_18, &this->account_);
0055f863              Proto_UI::SendDeleteCharacter(var_18, eax_3);
0055f876              this->deleteCharRequestTime = (*(uint32_t*)Timer::cur_time);
0055f87c              *(uint32_t*)((char*)this->deleteCharRequestTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0055f852          }
0055f840      }
0055f830  }

0055f886                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0055f890  uint8_t __thiscall CPlayerSystem::LogOnCharacter(class CPlayerSystem* this, uint32_t arg2)

0055f890  {
0055f89c      int32_t eax_2;
0055f89c      
0055f89c      if (this->fReadyToEnterGame != 0)
0055f89c      {
0055f8dc          gmCCommunicationSystem::ClearSquelchDB();
0055f8dc          
0055f8e8          if (PacketController::Instance() == 0)
0055f8e8          {
0055f98b          label_55f98b:
0055f98b              CM_Login::SendNotice_BeginEnterWorld();
0055f991              int32_t eax_7;
0055f991              eax_7 = 1;
0055f994              return 1;
0055f8e8          }
0055f8e8          
0055f8f9          int32_t edi_1 = *(uint32_t*)(UIFlow::m_instance->vtable->GetPersistantData() + 0x4c);
0055f8f9          
0055f8fe          if (edi_1 != 0)
0055f8fe          {
0055f900              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0055f900              
0055f908              if (SmartBox::smartbox_1 != 0)
0055f90c                  SmartBox::Reset(SmartBox::smartbox_1, 1);
0055f90c              
0055f911              class IQueuedUIEventDeliverer* IQueuedUIEventDeliverer::s_pInstance_1 = IQueuedUIEventDeliverer::s_pInstance;
0055f911              
0055f919              if (IQueuedUIEventDeliverer::s_pInstance_1 != 0)
0055f91b                  IQueuedUIEventDeliverer::s_pInstance_1->vtable->ResetDeliverySystem();
0055f91b              
0055f92f              void var_18;
0055f92f              enum COMBAT_MODE edx_3 = Proto_UI::SendEnterWorld(accountID::accountID(&var_18, &this->account_), edi_1);
0055f936              this->inventoryMask = 0;
0055f940              this->clothingPriorityMask = 0;
0055f94a              gmCCommunicationSystem::SetTalkFocus(1);
0055f952              int32_t var_c_2 = 1;
0055f95d              ClientCombatSystem::SetCombatMode(ClientCombatSystem::GetCombatSystem(), edx_3, 1);
0055f962              this->fReadyToEnterGame = 0;
0055f96f              ClientNet::EnterWorld(SharedNet::s_pNet);
0055f97f              this->logOnRequestTime = (*(uint32_t*)Timer::cur_time);
0055f985              *(uint32_t*)((char*)this->logOnRequestTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0055f919              goto label_55f98b;
0055f8fe          }
0055f89c      }
0055f89c      else
0055f89c      {
0055f8a6          eax_2 = UIFlow::m_instance->vtable->GetPersistantData();
0055f8a6          
0055f8ab          if (eax_2 != 0)
0055f8ab          {
0055f8b1              *(uint32_t*)(eax_2 + 0x4c) = arg2;
0055f8b4              eax_2 = this->awaitingLogOn;
0055f8b4              
0055f8bc              if (eax_2 == 0)
0055f8bc              {
0055f8c4                  ClientNet::ExitWorldDisconnect(SharedNet::s_pNet);
0055f8c9                  Proto_UI::SendEnterWorldRequest();
0055f8bc              }
0055f8bc              
0055f8ce              this->awaitingLogOn = 1;
0055f8ab          }
0055f89c      }
0055f89c      
0055f8d5      eax_2 = 0;
0055f8d9      return 0;
0055f890  }

0055f997                                                                       90 90 90 90 90 90 90 90 90                         .........

0055f9a0  void __thiscall CPlayerSystem::SelectNext(class CPlayerSystem* this, uint8_t arg2, uint8_t arg3, enum UI_SELECTION_TYPE arg4, uint8_t arg5)

0055f9a0  {
0055f9aa      int32_t esi;
0055f9aa      int32_t var_6c = esi;
0055f9ab      int32_t edi;
0055f9ab      int32_t var_70 = edi;
0055f9b1      class CPlayerSystem* var_60 = this;
0055f9c1      class ClientFellowshipSystem* var_58 = nullptr;
0055f9c5      class CPhysicsObj* var_5c = nullptr;
0055f9d0      double __return;
0055f9d0      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, &ClientObjMaintSystem_ClassType, &var_5c);
0055f9d5      int32_t* ecx_1 = var_5c;
0055f9e9      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = nullptr;
0055f9ed      int32_t var_30 = 0;
0055f9ed      
0055f9f1      if (ecx_1 != 0)
0055f9f7          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x10)(ecx_1, 0);
0055f9f7      
0055fa03      uint32_t var_54;
0055fa03      InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&m_currHashTable, &var_54);
0055fa03      
0055fa0a      if (ecx_1 != 0)
0055fa10          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)(ecx_1, 0);
0055fa10      
0055fa13      uint32_t eax_2 = ACCWeenieObject::selectedID;
0055fa1a      uint32_t var_64 = eax_2;
0055fa1a      
0055fa1e      if (eax_2 == 0)
0055fa1e      {
0055fa20          eax_2 = ACCWeenieObject::prevSelectedID;
0055fa25          var_64 = eax_2;
0055fa1e      }
0055fa1e      
0055fa29      int32_t* var_3c;
0055fa29      int32_t* edi_1 = var_3c;
0055fa31      class CPhysicsObj* eax_3 = CObjectMaint::GetObjectA(&edi_1[2], eax_2);
0055fa4f      int32_t var_48;
0055fa4f      float var_28;
0055fa4f      int16_t top;
0055fa4f      
0055fa4f      if (((arg3 == 0 && eax_3 != 0) && eax_3->cell != 0))
0055fa4f      {
0055fa61          SmartBox::convert_to_player_space(SmartBox::smartbox, eax_3, &var_28);
0055fa6a          float var_24;
0055fa6a          __return = ((double)((long double)var_24));
0055fa72          var_58 = ((double)((long double)var_28));
0055fa76          float var_20;
0055fa76          long double x87_r7_3 = ((long double)var_20);
0055fa7a          long double temp1_1 = ((long double)0.0);
0055fa7a          (x87_r7_3 - temp1_1);
0055fa7a          
0055fa85          if ((*(uint8_t*)((char*)((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 1) != 0)
0055fa87              x87_r7_3 = -(x87_r7_3);
0055fa87          
0055fa89          var_48 = ((double)x87_r7_3);
0055fa97          j__CIpow(ecx_1, 0);
0055faa6          j__CIpow();
0055faad          eax_3 = arg2;
0055fabe          var_48 = ((double)(sqrtl((((long double)var_58) + ((long double)2.0))) + (((long double)var_48) * ((long double)1.2))));
0055fabe          top = 0xfffe;
0055fabe          goto label_55fac4;
0055fa4f      }
0055fa4f      
0055fb11      eax_3 = arg2 == 0;
0055fb16      arg2 = eax_3;
0055fb19      var_48 = 0;
0055fb21      uint32_t var_4c_1;
0055fb21      uint32_t var_44;
0055fb21      
0055fb21      if (eax_3 == 0)
0055fb21      {
0055fb2d          var_44 = 0;
0055face          var_4c_1 = 0x40f20000;
0055fb21      }
0055fb21      else
0055fb21      {
0055fb23          var_44 = 0x40f20000;
0055fac4      label_55fac4:
0055fac4          var_4c_1 = 0;
0055fac4          
0055facc          if (eax_3 == 0)
0055face              var_4c_1 = 0x40f20000;
0055fb21      }
0055fb21      
0055fae1      __return = 0;
0055fae9      void __return_1;
0055fae9      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_5 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&edi_1[0x3c], &__return_1);
0055faf0      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_5->m_currBucket;
0055faf3      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax_5->m_currElement;
0055faf8      m_currHashTable = eax_5->m_currHashTable;
0055fafc      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
0055fb00      class HashTableData<unsigned long,DBOCache *>* var_2c = m_currElement;
0055fb00      
0055fb04      if (m_currElement != 0)
0055fb04      {
0055fb44          while (true)
0055fb44          {
0055fb44              uint32_t m_hashKey = var_2c->m_hashKey;
0055fb58              class CPlayerSystem* ebx;
0055fb58              class HashTableData<unsigned long,DBOCache *>* ecx_10;
0055fb58              
0055fb58              if ((m_hashKey == 0 || m_hashKey == ebx->lastFullyMergedSrcID))
0055fb58              {
0055fedf              label_55fedf:
0055fedf                  class HashTableData<unsigned long,DBOCache *>* m_hashNext_1 = var_2c->m_hashNext;
0055fee4                  var_2c = m_hashNext_1;
0055fee4                  
0055fee8                  if (m_hashNext_1 == 0)
0055fee8                  {
0055feee                      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_2 = m_currHashTable;
0055fef8                      class HashTableData<unsigned long,DBOCache *>** m_currBucket_3 = m_currBucket_1;
0055fef8                      
0055ff00                      while (true)
0055ff00                      {
0055ff00                          m_currBucket_3 = &m_currBucket_3[1];
0055ff05                          m_currBucket_1 = m_currBucket_3;
0055ff05                          
0055ff09                          if (m_currBucket_3 == &m_currHashTable_2->m_buckets[m_currHashTable_2->m_numBuckets])
0055ff09                              break;
0055ff09                          
0055ff0b                          class HashTableData<unsigned long,DBOCache *>* edx_18 = *(uint32_t*)m_currBucket_3;
0055ff0b                          
0055ff0f                          if (edx_18 != 0)
0055ff0f                          {
0055ff11                              ecx_10 = edx_18;
0055ff11                              goto label_55ff17;
0055ff0f                          }
0055ff00                      }
0055ff00                      
0055ff09                      break;
0055fee8                  }
0055fb58              }
0055fb58              else
0055fb58              {
0055fb64                  class CWeenieObject* eax_7 = CObjectMaint::GetWeenieObject(&edi_1[2], m_hashKey);
0055fb6e                  class CPhysicsObj* eax_8;
0055fb6e                  class AC1Legacy::Vector3* edx_4;
0055fb6e                  eax_8 = CObjectMaint::GetObjectA(&edi_1[2], m_hashKey);
0055fb75                  int32_t eax_9 = 0;
0055fb79                  var_5c = eax_8;
0055fb79                  
0055fb7d                  if (eax_8 != 0)
0055fb8b                      eax_9 = SmartBox::convert_to_player_space(SmartBox::smartbox, eax_8, &__return_1);
0055fb8b                  
0055fba2                  if (((eax_7 == 0 || eax_8 == 0) || eax_9 == 0))
0055fb92                      goto label_55fedf;
0055fb92                  
0055fbaf                  int32_t var_6c_1 = 0;
0055fbb7                  class CPhysicsObj* combatMode;
0055fbb7                  bool cond:10_1;
0055fbb7                  
0055fbb7                  if ((arg4 - 1) <= 4)
0055fbbd                      switch (arg4)
0055fbbd                      {
0055fce0                          case SELECTION_TYPE_ITEM:
0055fce0                          {
0055fce0                              if (*(int32_t*)((char*)eax_7 + 0xb8) != 0)
0055fcf8                                  var_6c_1 = 1;
0055fce0                              else if (*(int32_t*)((char*)eax_7 + 0x108) != 0)
0055fcea                              {
0055fcec                                  cond:10_1 = (*(int32_t*)((char*)eax_7 + 0x100) & 0x8044000) != 0;
0055fcec                                  goto label_55fcf6;
0055fcea                              }
0055fce0                              break;
0055fce0                          }
0055fc72                          case SELECTION_TYPE_COMPASS_ITEM:
0055fc72                          {
0055fc72                              if ((*(int32_t*)((char*)eax_7 + 0x100) & 0x8044000) == 0)
0055fc72                              {
0055fc78                                  void* var_7c_13 = &__return_1;
0055fc7b                                  combatMode = ACCWeenieObject::InqShowableOnRadar(eax_7, edx_4);
0055fc72                              }
0055fc72                              
0055fc82                              if (((*(int32_t*)((char*)eax_7 + 0x100) & 0x8044000) == 0 && combatMode == 0))
0055fcf8                                  var_6c_1 = 1;
0055fc82                              else
0055fc82                              {
0055fc84                                  class ClientCombatSystem* eax_15 = ClientCombatSystem::GetCombatSystem();
0055fc8b                                  class ClientFellowshipSystem* eax_16 = ClientFellowshipSystem::GetFellowshipSystem();
0055fc94                                  combatMode = eax_15->combatMode;
0055fc94                                  
0055fc9f                                  if ((combatMode == 2 || combatMode == 4))
0055fc9f                                  {
0055fcab                                      if (ClientCombatSystem::ObjectIsAttackable(eax_15, m_hashKey) == 0)
0055fcf8                                          var_6c_1 = 1;
0055fcab                                      else if (((ClientFellowshipSystem::IsFellow(eax_16, m_hashKey) != 0 || (*(uint8_t*)((char*)*(int32_t*)((char*)eax_7 + 0x100))[1] & 2) != 0) || (var_5c->state & 0x200000) != 0))
0055fcf8                                          var_6c_1 = 1;
0055fc9f                                  }
0055fc82                              }
0055fc72                              break;
0055fc72                          }
0055fc0e                          case SELECTION_TYPE_MONSTER:
0055fc0e                          {
0055fc0e                              class ClientCombatSystem* eax_13 = ClientCombatSystem::GetCombatSystem();
0055fc15                              class ClientFellowshipSystem* eax_14 = ClientFellowshipSystem::GetFellowshipSystem();
0055fc21                              class AC1Legacy::Vector3* edx_7;
0055fc21                              combatMode = ClientCombatSystem::ObjectIsAttackable(eax_13, m_hashKey);
0055fc21                              
0055fc37                              if ((combatMode == 0 || (*(uint8_t*)((char*)*(int32_t*)((char*)eax_7 + 0x100))[1] & 2) != 0))
0055fcf8                                  var_6c_1 = 1;
0055fc37                              else
0055fc37                              {
0055fc41                                  void* var_7c_11 = &__return_1;
0055fc41                                  
0055fc4b                                  if (ACCWeenieObject::InqShowableOnRadar(eax_7, edx_7) == 0)
0055fcf8                                      var_6c_1 = 1;
0055fc4b                                  else if (ClientFellowshipSystem::IsFellow(eax_14, m_hashKey) != 0)
0055fcf8                                      var_6c_1 = 1;
0055fc37                              }
0055fc0e                              break;
0055fc0e                          }
0055fbf0                          case SELECTION_TYPE_PLAYER:
0055fbf0                          {
0055fbf0                              class AC1Legacy::Vector3* edx_6;
0055fbf0                              combatMode = eax_7->vtable->IsPlayer(ecx_1, 0);
0055fbf0                              
0055fbf5                              if (combatMode == 0)
0055fcf8                                  var_6c_1 = 1;
0055fbf5                              else
0055fbf5                              {
0055fbff                                  void* var_7c_9 = &__return_1;
0055fc07                                  cond:10_1 = ACCWeenieObject::InqShowableOnRadar(eax_7, edx_6) != 0;
0055fcf6                              label_55fcf6:
0055fcf6                                  
0055fcf6                                  if (!(cond:10_1))
0055fcf8                                      var_6c_1 = 1;
0055fbf5                              }
0055fbf0                              break;
0055fbf0                          }
0055fbc8                          case SELECTION_TYPE_UNOPENED_CORPSE:
0055fbc8                          {
0055fbcd                              if (eax_7->vtable->IsCorpse(ecx_1, 0) == 0)
0055fcf8                                  var_6c_1 = 1;
0055fbcd                              else if (ACCWeenieObject::HasCorpseBeenOpened(eax_7->id) != 0)
0055fcf8                                  var_6c_1 = 1;
0055fbc8                              break;
0055fbc8                          }
0055fbbd                      }
0055fd00                  combatMode = *(int32_t*)((char*)eax_7 + 0x100);
0055fd00                  
0055fd08                  if (combatMode >= 0)
0055fd08                  {
0055fd50                      combatMode = arg5;
0055fd50                      
0055fd7e                      if (((combatMode == 0 || *(int32_t*)((char*)eax_7 + 0xb8) != ebx->playerID) && (*(int32_t*)((char*)eax_7 + 0x64) == 0 && var_6c_1 == 0)))
0055fd7e                      {
0055fd84                          class CPhysicsObj* eax_22 = var_5c;
0055fd84                          
0055fda0                          if ((eax_22->cell != 0 && (eax_22->state & 0x100000) == 0))
0055fda0                          {
0055fdb2                              SmartBox::convert_to_player_space(SmartBox::smartbox, eax_22, &var_28);
0055fdb7                              /* unimplemented  {fld st0, dword [esp+0x54]} */;
0055fdbe                              class CPhysicsObj* var_80_3;
0055fdbe                              var_80_3 = ((double)/* var_80_3.q = fconvert.d(unimplemented  {fstp qword [esp+0x8], st0}) */);
0055fdbe                              /* unimplemented  {fstp qword [esp+0x8], st0} */;
0055fdc2                              /* unimplemented  {fld st0, dword [esp+0x60]} */;
0055fdc6                              double var_88_1 = ((double)/* double var_88_1 = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
0055fdc6                              /* unimplemented  {fstp qword [esp], st0} */;
0055fdc9                              Get2DDistance(var_88_1, var_80_3);
0055fdc9                              /* unimplemented  {call Get2DDistance} */;
0055fdd2                              var_58 = ((double)/* var_58.q = fconvert.d(unimplemented  {fstp qword [esp+0x30], st0}) */);
0055fdd2                              /* unimplemented  {fstp qword [esp+0x30], st0} */;
0055fdd9                              CPlayerSystem::GetRadarRadius(ebx);
0055fdd9                              /* unimplemented  {call CPlayerSystem::GetRadarRadius} */;
0055fdde                              long double temp2_1 = ((long double)var_58);
0055fdde                              (/* unimplemented  {fcomp st0, qword [esp+0x20]} f- temp2_1 */ - temp2_1);
0055fdde                              bool c0_2 = /* bool c0_2 = unimplemented  {fcomp st0, qword [esp+0x20]} f< temp2_1 */ < temp2_1;
0055fdde                              bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcomp st0, qword [esp+0x20]}, temp2_1) */, temp2_1));
0055fdde                              bool c3_2 = /* bool c3_2 = unimplemented  {fcomp st0, qword [esp+0x20]} f== temp2_1 */ == temp2_1;
0055fdde                              /* unimplemented  {fcomp st0, qword [esp+0x20]} */;
0055fdde                              top += 1;
0055fdde                              
0055fde7                              if ((*(uint8_t*)((char*)((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top & 7) << 0xb))))))[1] & 1) == 0)
0055fde7                              {
0055fded                                  /* unimplemented  {fld st0, dword [esp+0x58]} */;
0055fdf4                                  var_80_3 = ((double)/* var_80_3.q = fconvert.d(unimplemented  {fstp qword [esp], st0}) */);
0055fdf4                                  /* unimplemented  {fstp qword [esp], st0} */;
0055fdf7                                  GetWeightedZDistance(var_80_3);
0055fdf7                                  /* unimplemented  {call GetWeightedZDistance} */;
0055fdfc                                  /* unimplemented  {fadd qword [esp+0x28]} */;
0055fe09                                  var_58 = ((double)/* var_58.q = fconvert.d(unimplemented  {fstp qword [esp+0x20], st0}) */);
0055fe09                                  /* unimplemented  {fstp qword [esp+0x20], st0} */;
0055fe0d                                  uint32_t eax_24;
0055fe0d                                  
0055fe0d                                  if (m_hashKey == var_64)
0055fe0f                                      eax_24 = arg3;
0055fe0f                                  
0055fe24                                  if (((m_hashKey != var_64 || eax_24 != 0) && m_hashKey != ebx->playerID))
0055fe24                                  {
0055fe2a                                      eax_24 = arg2;
0055fe33                                      uint32_t edi_6 = var_54;
0055fe33                                      
0055fe37                                      if (eax_24 != 0)
0055fe37                                      {
0055fe97                                          *(uint32_t*)((char*)var_88_1)[4] = __return;
0055fe9c                                          var_88_1 = m_hashKey;
0055fe9c                                          
0055fea6                                          if (CPlayerSystem::Farther(ebx, var_58, edi_6, var_88_1, var_4c_1, var_60) == 1)
0055fea6                                          {
0055feb6                                              *(uint32_t*)((char*)var_88_1)[4] = var_48;
0055febb                                              var_88_1 = m_hashKey;
0055febb                                              
0055fec5                                              if (CPlayerSystem::Farther(ebx, var_58, edi_6, var_88_1, var_44, var_64) == 0)
0055fec5                                              {
0055fecf                                                  __return = var_58;
0055fed3                                                  var_4c_1 = var_54;
0055fed7                                                  var_60 = m_hashKey;
0055fec5                                              }
0055fea6                                          }
0055fe37                                      }
0055fe37                                      else
0055fe37                                      {
0055fe4b                                          *(uint32_t*)((char*)var_88_1)[4] = __return;
0055fe4c                                          var_88_1 = m_hashKey;
0055fe4c                                          
0055fe56                                          if (CPlayerSystem::Farther(ebx, var_58, edi_6, var_88_1, var_4c_1, var_60) == 0)
0055fe56                                          {
0055fe6e                                              *(uint32_t*)((char*)var_88_1)[4] = var_48;
0055fe6f                                              var_88_1 = m_hashKey;
0055fe6f                                              
0055fe79                                              if (CPlayerSystem::Farther(ebx, var_58, edi_6, var_88_1, var_44, var_64) == 1)
0055fe79                                              {
0055fe7f                                                  __return = var_58;
0055fe83                                                  var_4c_1 = edi_6;
0055fed7                                                  var_60 = m_hashKey;
0055fe79                                              }
0055fe56                                          }
0055fe37                                      }
0055fe24                                  }
0055fde7                              }
0055fda0                          }
0055fd7e                      }
0055fd7e                      
0055fd7e                      goto label_55fedf;
0055fd08                  }
0055fd08                  
0055fd0e                  class HashTableData<unsigned long,DBOCache *>* m_hashNext = var_2c->m_hashNext;
0055fd13                  var_2c = m_hashNext;
0055fd13                  
0055fd17                  if (m_hashNext == 0)
0055fd17                  {
0055fd1d                      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
0055fd1d                      
0055fd34                      while (true)
0055fd34                      {
0055fd34                          class HashTableData<unsigned long,DBOCache *>** m_currBucket_2 = &m_currBucket_1[1];
0055fd39                          m_currBucket_1 = m_currBucket_2;
0055fd39                          
0055fd3d                          if (m_currBucket_2 == &m_currHashTable_1->m_buckets[m_currHashTable_1->m_numBuckets])
0055fd3d                              break;
0055fd3d                          
0055fd43                          class HashTableData<unsigned long,DBOCache *>* edx_9 = *(uint32_t*)m_currBucket_2;
0055fd43                          
0055fd47                          if (edx_9 != 0)
0055fd47                          {
0055fd49                              ecx_10 = edx_9;
0055ff17                          label_55ff17:
0055ff17                              var_2c = ecx_10;
0055ff17                              
0055ff1b                              if (ecx_10 != 0)
0055ff1b                                  goto label_55fb37;
0055ff1b                              
0055ff1b                              goto label_55ff27;
0055fd47                          }
0055fd34                      }
0055fd34                      
0055fd3d                      break;
0055fd17                  }
0055fb58              }
0055fb37          label_55fb37:
0055fb37              edi_1 = var_3c;
0055fb44          }
0055fb44          
0055ff27      label_55ff27:
0055ff27          
0055ff29          if (var_60 != 0)
0055ff2d              ACCWeenieObject::SetSelectedObject(var_60, 0);
0055ff2d          
0055ff35          edi_1 = var_3c;
0055fb04      }
0055fb04      
0055ff3b      if (edi_1 != 0)
0055ff41          *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)(ecx_1, 0);
0055f9a0  }

0055ff4d                                         8d 49 00                                                               .I.
0055ff50  uint32_t jump_table_55ff50[0x5] = 
0055ff50  {
0055ff50      [0x0] =  0x0055fcd8
0055ff54      [0x1] =  0x0055fc68
0055ff58      [0x2] =  0x0055fc0e
0055ff5c      [0x3] =  0x0055fbec
0055ff60      [0x4] =  0x0055fbc4
0055ff64  }

0055ff64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0055ff70  uint8_t CPlayerSystem::ObjectIsWithinRadarRange(class CPlayerSystem* this @ ecx, uint32_t arg2)

0055ff70  {
0055ff73      int32_t esi;
0055ff73      int32_t var_1c = esi;
0055ff74      int32_t edi;
0055ff74      int32_t var_20 = edi;
0055ff86      int32_t* var_18 = nullptr;
0055ff91      class TResult __return;
0055ff91      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, &ClientObjMaintSystem_ClassType, &var_18);
0055ff96      int32_t* ecx_1 = var_18;
0055ffaa      int32_t var_c = 0;
0055ffae      int32_t var_8 = 0;
0055ffae      
0055ffb2      if (ecx_1 != 0)
0055ffb8          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x10)(ecx_1, 0);
0055ffb8      
0055ffc4      float var_10;
0055ffc4      InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&var_c, &var_10);
0055ffc4      
0055ffcb      if (ecx_1 != 0)
0055ffd1          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)(ecx_1, 0);
0055ffd1      
0055ffd8      class TResult __return_1 = __return;
0055ffe0      uint32_t var_4;
0055ffe0      class CPhysicsObj* eax_3 = CObjectMaint::GetObjectA((__return_1 + 8), var_4);
0055ffe0      
0055fff3      if ((eax_3 != 0 && eax_3->cell != 0))
0055fff3      {
00560001          SmartBox::convert_to_player_space(SmartBox::smartbox, eax_3, &__return);
00560013          float var_4_1;
00560013          
00560013          if (SmartBox::is_player_outside(SmartBox::smartbox) == 0)
00560026              var_4_1 = 25f;
00560013          else
0056001b              var_4_1 = 75f;
0056001b          
00560034          j__CIpow(ecx_1, 0);
00560039          long double x87_r5_1 = ((long double)__return);
00560043          j__CIpow();
0056004a          long double x87_r5_3 = sqrtl((x87_r5_1 + ((long double)2.0)));
0056004c          long double x87_r4_2 = ((long double)var_4_1);
00560050          (x87_r4_2 - x87_r5_3);
00560052          eax_3 = ((((x87_r4_2 < x87_r5_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_2, x87_r5_3))) ? 1 : 0) << 0xa) | ((((x87_r4_2 == x87_r5_3) ? 1 : 0) << 0xe) | 0x3000))));
00560052          
00560057          if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
00560057          {
0056005b              if (__return_1 != 0)
00560061                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00560061              
00560064              eax_3 = 1;
0056006b              return 1;
00560057          }
0055fff3      }
0055fff3      
00560070      if (__return_1 != 0)
00560076          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)(ecx_1, 0);
00560076      
0056007a      eax_3 = 0;
00560080      return 0;
0055ff70  }

00560083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00560090  uint8_t __stdcall CPlayerSystem::InqPlayerCoords(class CPlayerSystem* this @ ecx, double* arg2, double* arg3)

00560090  {
00560093      int32_t ebx;
00560093      int32_t var_14 = ebx;
00560094      double* ebx_1 = arg3;
00560098      int32_t ebp;
00560098      int32_t var_18 = ebp;
00560099      int32_t esi;
00560099      int32_t var_1c = esi;
0056009a      struct Turbine_GUID* edi;
0056009a      struct Turbine_GUID* var_20 = edi;
0056009b      double* edi_1 = arg2;
005600a5      double** var_24 = &arg2;
005600a6      class CPlayerSystem* this_1 = this;
005600ae      *(uint32_t*)edi_1 = 0f;
005600b0      *(uint32_t*)((char*)edi_1 + 4) = 0;
005600b3      struct Turbine_GUID* var_28 = &ClientObjMaintSystem_ClassType;
005600b9      *(uint32_t*)ebx_1 = 0f;
005600bb      *(uint32_t*)((char*)ebx_1 + 4) = 0;
005600be      arg2 = nullptr;
005600c9      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &arg3, var_28, var_24);
005600ce      double* ecx_1 = arg2;
005600d2      struct Turbine_GUID** esp_1 = &var_28;
005600d7      var_28 = ecx_1;
005600d9      int32_t var_24_1 = 0;
005600dc      struct Turbine_GUID* eax_1 = var_28;
005600e2      int32_t var_8 = 0;
005600e6      int32_t var_4 = 0;
005600e6      
005600ea      if (eax_1 != 0)
005600ea      {
005600f0          *(uint32_t*)(eax_1->m_data1 + 0x10)();
005600f0          esp_1 = &var_20;
005600ea      }
005600ea      
005600f7      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[7];
005600fc      InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&esp_1[8]);
005600fc      
00560103      if (ecx_1 != 0)
0056010a          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0056010a      
00560117      int32_t* ebp_2 = esp_1[6];
0056011b      *(uint32_t*)((char*)esp_1 - 4) = *(uint32_t*)(esp_1[4] + 0x1e8);
0056011f      void* eax_5 = CObjectMaint::GetObjectA(&ebp_2[2]);
0056011f      void* esp_5 = esp_1;
0056011f      
0056012e      if ((eax_5 != 0 && *(uint32_t*)((char*)eax_5 + 0x90) != 0))
0056012e      {
00560136          class CPhysicsObj* player = SmartBox::smartbox->player;
00560140          *(uint32_t*)((char*)esp_5 - 4) = ((char*)esp_5 + 0x10);
00560145          *(uint32_t*)((char*)esp_5 - 8) = ((char*)esp_5 + 0x24);
00560145          
0056014d          if (CPhysicsObj::get_landscape_coord(player) != 0)
0056014d          {
00560153              int32_t edx_4 = *(uint32_t*)((char*)esp_5 + 0x10);
0056015d              *(uint32_t*)((char*)esp_5 + 0x28) = (*(uint32_t*)((char*)esp_5 + 0x24) - 0x400);
0056016d              long double x87_r7_1 = (((long double)*(uint32_t*)((char*)esp_5 + 0x28)) * ((long double)0.10000000000000001));
00560173              *(uint32_t*)((char*)esp_5 + 0x28) = (edx_4 - 0x400);
0056017d              *(uint64_t*)edi_1 = ((double)(x87_r7_1 + ((long double)0.5)));
0056018f              *(uint64_t*)ebx_1 = ((double)((((long double)*(uint32_t*)((char*)esp_5 + 0x28)) * ((long double)0.10000000000000001)) + ((long double)0.5)));
0056018f              
00560191              if (ebp_2 != 0)
00560198                  *(uint32_t*)(*(uint32_t*)ebp_2 + 0x14)();
00560198              
0056019b              eax_5 = 1;
0056019d              *(uint32_t*)esp_5;
0056019e              *(uint32_t*)((char*)esp_5 + 4);
0056019f              *(uint32_t*)((char*)esp_5 + 8);
005601a0              *(uint32_t*)((char*)esp_5 + 0xc);
005601a4              return 1;
0056014d          }
0056012e      }
0056012e      
005601a9      if (ebp_2 != 0)
005601b0          *(uint32_t*)(*(uint32_t*)ebp_2 + 0x14)();
005601b0      
005601b3      *(uint32_t*)esp_5;
005601b4      *(uint32_t*)((char*)esp_5 + 4);
005601b5      *(uint32_t*)((char*)esp_5 + 8);
005601b6      eax_5 = 0;
005601b8      *(uint32_t*)((char*)esp_5 + 0xc);
005601bc      return 0;
00560090  }

005601bf                                                                                               90                                 .

005601c0  uint8_t __thiscall CPlayerSystem::AutoWear(class CPlayerSystem* this, uint32_t arg2, int32_t* arg3, int32_t arg4)

005601c0  {
005601d6      uint32_t esi = ((uint32_t)CPlayerSystem::AutoWearIsLegal(this, arg2, arg3, arg4));
005601d9      bool cond:0 = esi != 0;
005601db      class ACCWeenieObject* eax;
005601db      
005601db      if (esi != 0)
005601db      {
005601de          eax = ClientObjMaintSystem::GetWeenieObject(arg2);
005601de          
005601e8          if (eax != 0)
005601f3              ACCWeenieObject::UIAttemptWield(eax, eax->pwd._valid_locations);
005601f3          
005601f8          cond:0 = esi != 0;
005601db      }
005601db      
005601fb      eax = cond:0;
005601ff      return eax;
005601c0  }

00560202        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00560210  int32_t CPlayerSystem::IsOlthoi()

00560210  {
00560213      int32_t ebx;
00560213      int32_t var_1c = ebx;
0056021a      struct Turbine_GUID* var_18;
0056021a      int32_t* var_28 = &var_18;
00560221      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
00560227      int32_t var_14 = 0;
0056022b      var_18 = nullptr;
00560236      class TResult __return;
00560236      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
0056023b      struct Turbine_GUID* edi = var_18;
00560244      var_2c = edi;
00560246      int32_t var_28_1 = 0;
00560249      struct Turbine_GUID* eax_1 = var_2c;
0056024d      int32_t var_8 = 0;
00560251      int32_t var_4 = 0;
00560251      
00560255      if (eax_1 != 0)
0056025b          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0056025b      
00560267      struct Turbine_GUID** esp = &var_2c;
0056026e      void var_c;
0056026e      int32_t ebx_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0056026e      
00560270      if (edi != 0)
00560276          *(uint32_t*)(edi->m_data1 + 0x14)();
00560276      
00560279      class TResult __return_1 = __return;
00560279      
0056027f      if (__return_1 != 0)
0056027f      {
00560283          if (ebx_1 >= 0)
00560283          {
00560294              CBaseQualities::InqInt((__return_1 + 0x38), 0xbc, &var_1c, 0, 0);
00560299              int32_t eax_3 = var_1c;
00560299              
005602a5              if ((eax_3 == 0xc || eax_3 == 0xd))
005602a5              {
005602ab                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
005602b9                  return 1;
005602a5              }
00560283          }
00560283          
005602be          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
005602be          struct Turbine_GUID* __saved_edi;
005602be          esp = &__saved_edi;
0056027f      }
0056027f      
005602c1      *(uint32_t*)esp;
005602c1      esp[1];
005602c1      esp[2];
005602c9      return 0;
00560210  }

005602ca                                90 90 90 90 90 90                                                            ......

005602d0  void __thiscall CPlayerSystem::RegisterObjectRangeHandler(class CPlayerSystem* this, class ObjectRangeHandler* arg2, uint32_t arg3, double arg4, uint8_t arg5, uint8_t arg6, double arg7, double arg8)

005602d0  {
005602e4      for (class ListNode<ObjectRangeInfo>* i = this->m_objectRangeCheckList._head; i != 0; i = i->next)
005602e4      {
005602ed          if ((i->data.m_handler == arg2 && i->data.m_objectID == arg3))
005602ef              i->data.m_queuedForDeletion = 1;
005602e4      }
005602e4      
00560308      uint32_t var_3c = arg3;
00560310      int32_t var_38 = arg4;
00560314      int32_t eax;
00560314      eax = arg5;
00560318      double var_10 = ((double)(((long double)Timer::cur_time) + ((long double)arg7)));
00560322      int32_t var_34 = *(uint32_t*)((char*)arg4)[4];
00560326      int32_t edx_1;
00560326      edx_1 = arg6;
0056032e      char var_30 = eax;
00560336      char var_2f = edx_1;
0056033a      double var_18 = ((double)(((long double)Timer::cur_time) + ((long double)arg8)));
00560342      int32_t var_28 = arg7;
0056034a      int32_t var_24 = *(uint32_t*)((char*)arg7)[4];
00560352      int32_t var_20 = arg8;
00560360      int32_t var_1c = *(uint32_t*)((char*)arg8)[4];
00560369      class ObjectRangeHandler* var_40 = arg2;
0056036d      char var_8 = 0;
00560372      List<ObjectRangeInfo>::insert(&this->m_objectRangeCheckList, this->m_objectRangeCheckList._head, &var_40);
005602d0  }

0056037e                                                                                            90 90                                ..

00560380  int32_t __thiscall PackableList<InventoryPlacement>::UnPack(class PackableList<InventoryPlacement>* this, void** arg2, uint32_t arg3)

00560380  {
00560386      PackableList<InventoryPlacement>::Flush(this);
00560386      
00560390      if (arg3 < 4)
005603fb          return 0;
005603fb      
00560397      void* eax = *(uint32_t*)arg2;
0056039a      int32_t esi = 0;
0056039d      int32_t edi = *(uint32_t*)eax;
005603a4      *(uint32_t*)arg2 = ((char*)eax + 4);
005603a6      int32_t var_10 = 0x7aba64;
005603ae      int32_t var_c = 0;
005603b2      int32_t var_8 = 0;
005603b6      int32_t var_4 = 0;
005603b6      
005603ba      if (edi > 0)
005603ba      {
005603e4          do
005603e4          {
005603d3              if (*(uint32_t*)(var_10 + 0x10)(arg2, arg3) == 0)
00560407                  return 0;
00560407              
005603dc              PackableList<InventoryPlacement>::InsertTail(this, &var_10);
005603e1              esi += 1;
005603e4          } while (esi < edi);
005603ba      }
005603ba      
005603f2      return 1;
00560380  }

0056040a                                90 90 90 90 90 90                                                            ......

00560410  void* __thiscall PackableList<InventoryPlacement>::`scalar deleting destructor'(class PackableList<InventoryPlacement>* this, uint32_t arg2)

00560410  {
00560413      this->vtable = 0x7cc790;
00560419      PackableList<InventoryPlacement>::Flush(this);
00560423      this->vtable = 0x79285c;
00560423      
00560429      if ((arg2 & 1) != 0)
0056042c          operator delete(this);
0056042c      
00560437      return this;
00560410  }

0056043a                                                                                90 90 90 90 90 90                            ......

00560440  void* __thiscall List<ObjectRangeInfo>::`scalar deleting destructor'(class List<ObjectRangeInfo>* this, uint32_t arg2)

00560440  {
00560443      this->vtable = 0x7cc7a4;
00560449      List<ObjectRangeInfo>::flush(this);
00560449      
00560453      if ((arg2 & 1) != 0)
00560456          operator delete(this);
00560456      
00560461      return this;
00560440  }

00560464              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00560470  void __fastcall CPlayerSystem::CPlayerSystem(class CPlayerSystem* this)

00560470  {
00560470      int32_t ebp;
00560470      int32_t var_4 = ebp;
0056047a      int32_t* var_20 = &var_4;
0056047b      int32_t esi;
0056047b      int32_t var_24 = esi;
0056047e      this->vtable = &gmUrgentAssistanceUI::`vftable';
00560485      this->vtable = &IInputActionCallback::`vftable';
0056048c      this->vtable = &QualityChangeHandler::`vftable';
00560493      this->vtable = &ObjectRangeHandler::`vftable';
0056049a      int32_t edi;
0056049a      int32_t var_28 = edi;
005604a1      this->vtable = 0x7ccca0;
0056049b      this->vtable = &CPlayerSystem::`vftable'.AddRef;
005604ae      this->vtable = &CPlayerSystem::`vftable';
0056049e      this->vtable = &CPlayerSystem::`vftable';
005604bb      this->vtable = &CPlayerSystem::`vftable';
005604c2      this->m_cTurbineRefCount.m_cRef = 1;
005604c9      this->m_cTurbineRefCount.vtable = 0x792b6c;
005604d0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005604db      this->account_.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005604de      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005604e6      this->account_.fIsDarkMajestyExpansion_ = 0;
005604e9      this->account_.m_fIsThroneOfDestinyExpansion = 0;
005604ec      this->account_.m_fPreOrderedThroneOfDestinyExpansion = 0;
005604f2      this->m_pCharGenState = nullptr;
005604f5      CPlayerModule::CPlayerModule(&this->playerModule);
00560500      this->m_accountHasThroneofDestiny = 0;
00560506      __builtin_memset(&this->logOnRequestTime, 0, 0x20);
00560536      this->loggingOff = 0;
0056053c      this->logOffRequested = 0;
00560542      this->connectionLost = 0;
00560548      this->awaitingExpiration = 0;
0056054e      this->expirationTime = 0f;
00560554      *(uint32_t*)((char*)this->expirationTime)[4] = 0;
0056055a      this->teleportInProgress = 0;
00560560      this->m_layoutFromFile = 0;
00560566      CInvSlotModule::CInvSlotModule(&this->m_invSlotModule);
0056056b      this->pending_components_list.head_ = 0;
00560571      this->pending_components_list.tail_ = nullptr;
0056057d      this->m_objectRangeCheckList.vtable = 0x7cc7a4;
00560587      this->m_objectRangeCheckList._head = nullptr;
0056058d      this->m_objectRangeCheckList._tail = nullptr;
00560593      this->m_objectRangeCheckList._num_elements = 0;
00560599      CContractTrackerTable::CContractTrackerTable(&this->m_contractTrackerTable);
005605a2      CPlayerSystem::s_pPlayerSystem = this;
005605a8      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
005605b0      CPlayerSystem::Begin(this);
005605c2      int32_t var_10 = 0;
005605c6      int32_t var_c = 0;
005605ca      void __return;
005605ca      InterfacePtr<class Interface>::_QueryInterface(&var_10, &__return);
005605e6      class Interface* var_14;
005605e6      InterfaceSystem::RegisterClassA(InterfaceSystem::GetInstance(), &__return, &CPlayerModule_ClassType, var_14, nullptr);
005605eb      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 5, &this->vtable, &this->playerModule);
005605fb      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(8, 1, &this->vtable);
0056060b      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0xe6, &this->vtable);
0056061e      class GlobalEventHandler* eax_4 = GlobalEventHandler::GetGlobalEventHandler();
0056061e      
00560627      if (eax_4 != 0)
00560627      {
00560629          eax_4->vtable->RegisterNoticeHandler(0x186a8, &this->vtable);
00560636          eax_4->vtable->RegisterNoticeHandler(0x186ab, &this->vtable);
00560643          eax_4->vtable->RegisterNoticeHandler(0x186a9, &this->vtable);
00560650          eax_4->vtable->RegisterNoticeHandler(0x186aa, &this->vtable);
0056065d          eax_4->vtable->RegisterNoticeHandler(0x4dd201, &this->vtable);
0056066a          eax_4->vtable->RegisterNoticeHandler(0x4dd1f6, &this->vtable);
00560627      }
00560627      
0056067d      int32_t* ebx;
0056067d      
0056067d      if (ebx != 0)
00560681          *(uint32_t*)(*(uint32_t*)ebx + 0x14)();
00560681      
0056049e      this->vtable;
00560470  }

0056068e                                            90 90                                                                ..

00560690  uint32_t __fastcall CPlayerSystem::Release(class CPlayerSystem const* this)

00560690  {
00560697      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00560697      
005606a4      if ((result == 0 && this != 0))
005606a6          this->vtable->__vecDelDtor(1);
005606a6      
005606b4      return result;
00560690  }

005606b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005606c0  void __fastcall CPlayerSystem::End(class CPlayerSystem* this)

005606c0  {
005606ca      List<ObjectRangeInfo>::flush(&this->m_objectRangeCheckList);
005606d5      NIList<NetBlob *>::DeleteContents(&this->pending_components_list);
005606dd      PlayerModule::Clear(&this->playerModule.vtable);
005606e8      CInvSlotModule::Reset(&this->m_invSlotModule);
005606ed      class ComponentTracker* componentTracker = this->componentTracker;
005606ed      
005606f5      if (componentTracker != 0)
005606f5      {
005606f9          ComponentTracker::~ComponentTracker(componentTracker);
005606ff          operator delete(componentTracker);
005606f5      }
005606f5      
00560708      this->componentTracker = nullptr;
00560719      /* tailcall */
00560719      return PackableHashTable<unsigned long,CContractTracker>::EmptyContents(&this->m_contractTrackerTable._contractTrackerHash);
005606c0  }

0056071e                                                                                            90 90                                ..

00560720  void __thiscall CPlayerSystem::RecvNotice_SetSelectedItem(class CPlayerSystem* this, uint32_t arg2, uint32_t arg3)

00560720  {
00560720      class CPlayerSystem* this_1 = this;
0056072b      struct QualityChangeHandler::VTable** edx;
0056072b      
0056072b      if (this == 4)
00560732          edx = nullptr;
0056072b      else
0056072d          edx = &this->vtable;
0056072d      
00560743      for (int32_t* vtable = this->m_objectRangeCheckList.vtable; vtable != 0; vtable = vtable[0x10])
00560743      {
00560757          if ((*(uint32_t*)vtable == edx && vtable[1] == arg2))
00560759              vtable[0xe] = 1;
00560743      }
00560743      
00560769      class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg3);
00560769      
00560775      if (eax_2 != 0)
00560775      {
0056077e          int32_t ebx;
0056077e          ebx = 1;
0056077e          
00560787          if (ACCWeenieObject::IsOwnedByPlayer(eax_2) != 0)
00560789              ebx = 0;
00560789          
00560795          if ((ClientUISystem::GetUISystem()->groundObject != 0 && ACCWeenieObject::IsOwnedByObject(eax_2, ClientUISystem::GetUISystem()->groundObject) != 0))
005607ab              ebx = 0;
005607ab          
005607b7          if ((ClientUISystem::GetUISystem()->vendorID != 0 && ACCWeenieObject::IsOwnedByObject(eax_2, ClientUISystem::GetUISystem()->vendorID) != 0))
005607cd              ebx = 0;
005607cd          
005607d4          uint32_t m_iidTradePartner = ClientTradeSystem::GetTradeSystem()->m_iidTradePartner;
005607d9          int32_t eax_15;
005607d9          
005607d9          if (m_iidTradePartner != 0)
005607e6              eax_15 = ACCWeenieObject::IsOwnedByObject(eax_2, ClientTradeSystem::GetTradeSystem()->m_iidTradePartner);
005607e6          
005607f1          if (((m_iidTradePartner == 0 || eax_15 == 0) && ebx != 0))
005607f1          {
005607f8              struct QualityChangeHandler::VTable** esi_1;
005607f8              
005607f8              if (this == 4)
005607ff                  esi_1 = nullptr;
005607f8              else
005607fa                  esi_1 = &this->vtable;
005607fa              
0056080e              long double x87_r7_1;
0056080e              
0056080e              if (SmartBox::is_player_outside(SmartBox::smartbox) == 0)
00560818                  x87_r7_1 = ((long double)25f);
0056080e              else
00560810                  x87_r7_1 = ((long double)75f);
00560810              
00560829              int32_t var_18_4 = 0;
0056082d              int32_t var_20_1 = 0x3ff00000;
0056083f              CPlayerSystem::RegisterObjectRangeHandler(((char*)this - 4), esi_1, arg3, ((double)x87_r7_1), 1, 1, 0f, 0f);
005607f1          }
005607f1          
00560845          SmartBox::set_selected_object_id(arg3);
00560775      }
00560720  }

00560855                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00560860  void __fastcall CPlayerSystem::RecvNotice_EnchantmentsChanged(class CPlayerSystem* this)

00560860  {
00560863      /* tailcall */
00560863      return CPlayerSystem::OnLoadChanged(((char*)this - 4));
00560860  }

00560868                          90 90 90 90 90 90 90 90                                                          ........

00560870  void __thiscall CPlayerSystem::OnObjectRangeExit(class CPlayerSystem* this, uint32_t arg2)

00560870  {
0056087f      if (arg2 == ACCWeenieObject::selectedID)
0056087f      {
00560888          if (SmartBox::is_selected_object_in_view() != 0)
00560888          {
00560894              int32_t esi_1 = -(((char*)this - 0x10));
005608a1              long double x87_r7;
005608a1              
005608a1              if (SmartBox::is_player_outside(SmartBox::smartbox) == 0)
005608ab                  x87_r7 = ((long double)25f);
005608a1              else
005608a3                  x87_r7 = ((long double)75f);
005608a3              
005608bc              int32_t var_10 = 0;
005608c0              int32_t var_18 = 0x3ff00000;
005608d1              CPlayerSystem::RegisterObjectRangeHandler(((char*)this - 0x10), ((esi_1 - esi_1) & this), arg2, ((double)x87_r7), 1, 1, 0f, 0f);
005608d9              return;
00560888          }
00560888          
005608e0          ACCWeenieObject::SetSelectedObject(0, 0);
0056087f      }
00560870  }

005608ed                                         90 90 90                                                               ...

005608f0  void __fastcall CPlayerSystem::OnQualityChanged(class CPlayerSystem* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

005608f0  {
005608f3      CPlayerSystem::OnLoadChanged(((char*)this - 0xc));
005608f0  }

005608fb                                                                                   90 90 90 90 90                             .....

00560900  void __stdcall CPlayerSystem::SendQueryPluginData(class CPlayerSystem* this @ ecx, uint32_t arg2)

00560900  {
0056090c      class AC1Legacy::PStringBase<unsigned short> var_8;
0056090c      AC1Legacy::PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, &CPlayerSystem::`vftable'.RecvNotice_CreateObject);
00560918      uint16_t* __return;
00560918      
00560918      if (APIManager::APIIsReady() != 0)
00560918      {
0056091a          struct IACPlugin* eax_1 = APIManager::GetACPlugin();
0056091f          eax_1->vtable->QueryPluginList(eax_1, &__return);
00560933          AC1Legacy::PStringBase<unsigned short>::set(&var_8, __return);
00560918      }
00560918      
00560945      AC1Legacy::PStringBase<unsigned short>::to_spstring(&var_8, &__return, 0);
00560954      CM_Admin::Event_QueryPluginListResponse(arg2, &__return);
00560959      uint16_t* __return_1 = __return;
00560959      
00560972      if ((InterlockedDecrement(&__return_1[2]) == 0 && __return_1 != 0))
0056097a          **(uint32_t**)__return_1(1);
0056097a      
0056097c      class AC1Legacy::PStringBase<unsigned short> esi = var_8;
0056097c      
0056098c      if ((InterlockedDecrement((esi + 4)) == 0 && esi != 0))
00560994          **(uint32_t**)esi(1);
00560900  }

0056099e                                                                                            90 90                                ..

005609a0  uint8_t __thiscall CPlayerSystem::AutoSort(class CPlayerSystem* this, uint32_t arg2, int32_t arg3, int32_t arg4)

005609a0  {
005609af      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) == 0)
005609af      {
005609b1          int32_t eax;
005609b1          eax = 0;
005609b4          return 0;
005609af      }
005609af      
005609ba      uint32_t esi = arg2;
005609c4      uint32_t ebx = ClientObjMaintSystem::GetWeenieObject(esi);
005609cb      uint32_t eax_1;
005609cb      
005609cb      if (ebx != 0)
005609cb      {
005609d6          int32_t ebp_1 = *(uint32_t*)(ebx + 0xc0);
005609d6          
005609e2          if ((ebp_1 & 0x8007fff) == 0)
005609e2          {
00560a1b          label_560a1b:
00560a1b              
00560a1b              if ((arg3 != 0 && (ebp_1 & 0x7eff8000) != 0))
00560a1b              {
00560a2f                  eax_1 = ((uint32_t)CPlayerSystem::AutoWield(this, esi, SLOT_SIDE_RIGHT, 1, 0, 0, 1));
00560a2f                  
00560a34                  if (eax_1 != 0)
00560a34                  {
00560a52                      eax_1 = eax_1 != 0;
00560a56                      return eax_1;
00560a34                  }
00560a1b              }
00560a1b              
00560a38              eax_1 = ACCWeenieObject::IsOwnedByPlayer(ebx);
00560a38              
00560a3f              if (eax_1 == 0)
00560a3f              {
00560a52                  eax_1 = ((uint32_t)CPlayerSystem::PlaceInBackpack(this, esi, eax_1)) != 0;
00560a56                  return eax_1;
00560a3f              }
005609e2          }
005609e2          else
005609e2          {
005609f1              arg2 = 0;
00560a04              eax_1 = ((uint32_t)CPlayerSystem::AutoWear(this, esi, &arg2, arg4));
00560a04              
00560a07              if (arg2 == 0)
00560a07              {
00560a0b                  if (eax_1 == 0)
00560a0b                      goto label_560a1b;
00560a0b                  
00560a52                  eax_1 = eax_1 != 0;
00560a56                  return eax_1;
00560a07              }
005609e2          }
005609cb      }
005609cb      
005609d0      eax_1 = 0;
005609d3      return 0;
005609a0  }

00560a59                                                                             90 90 90 90 90 90 90                           .......

00560a60  uint8_t __thiscall CPlayerSystem::AutoWield(class CPlayerSystem* this, uint32_t arg2, enum UI_SLOT_SIDE arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7)

00560a60  {
00560a78      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(arg4) == 0)
00560a78      {
00560a7a          int32_t eax;
00560a7a          eax = 0;
00560a83          return 0;
00560a78      }
00560a78      
00560a90      int32_t ebp = 0;
00560a93      int32_t var_a0 = 0;
00560a9c      class ACCWeenieObject* ebx = ClientObjMaintSystem::GetWeenieObject(arg2);
00560aa3      class ACCWeenieObject* var_98 = ebx;
00560aa7      class ACCWeenieObject* __return_2;
00560aa7      
00560aa7      if (ebx != 0)
00560aa7      {
00560aad          uint32_t _wielderID = ebx->pwd._wielderID;
00560ac1          class ACCWeenieObject* __return;
00560ac1          void var_90;
00560ac1          
00560ac1          if ((_wielderID == 0 || _wielderID == this->playerID))
00560ac1          {
00560b49              __return_2 = ebx->pwd._valid_locations;
00560b54              class ACCWeenieObject* __return_3 = __return_2;
00560b54              
00560b58              if ((__return_2 & 0x7fffffff) != 0)
00560b58              {
00560b6c                  if (CPlayerSystem::AutoWieldIsLegal(this, arg2, arg4) != 0)
00560b6c                  {
00560baf                      this->blockingID = 0;
00560bb5                      this->blockedID = 0;
00560bbb                      this->blockedSide = SLOT_SIDE_NULL;
00560bc1                      this->unblockAttemptNum = 0;
00560bc7                      uint32_t m_invLoc_1;
00560bc7                      
00560bc7                      if ((0x8000 & __return_3) == 0)
00560bc7                      {
00560c3c                      label_560c3c:
00560c3c                          
00560c3c                          if ((0x4000000 & __return_3) != 0)
00560c3c                          {
00560c44                              if ((this->inventoryMask & 0x4000000) == 0)
00560c44                              {
00560c46                                  m_invLoc_1 = 0x4000000;
00560c47                                  goto label_561327;
00560c44                              }
00560c44                              
00560c56                              this->blockingID = this->m_invSlotModule.trinketOneSlot->m_itemID;
00560c56                              
00560c5c                              if (arg5 == 0)
00560c5c                              {
00560c62                                  StringInfo::StringInfo(&var_90);
00560c70                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing a trinket…");
00560c80                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560c89                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560c95                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560ca1                                  StringInfo::~StringInfo(&var_90);
00560c5c                              }
00560c3c                          }
00560c3c                          
00560cb1                          if ((0x8000000 & __return_3) != 0)
00560cb1                          {
00560cb9                              if ((this->inventoryMask & 0x8000000) == 0)
00560cb9                              {
00560cbb                                  m_invLoc_1 = 0x8000000;
00560cbc                                  goto label_561327;
00560cb9                              }
00560cb9                              
00560ccb                              this->blockingID = this->m_invSlotModule.cloakSlot->m_itemID;
00560ccb                              
00560cd1                              if (arg5 == 0)
00560cd1                              {
00560cd7                                  StringInfo::StringInfo(&var_90);
00560ce5                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing a cloak.");
00560cf5                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560cfe                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560d0a                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560d16                                  StringInfo::~StringInfo(&var_90);
00560cd1                              }
00560cb1                          }
00560cb1                          
00560d26                          if ((0x10000000 & __return_3) != 0)
00560d26                          {
00560d2e                              if ((this->inventoryMask & 0x10000000) == 0)
00560d2e                              {
00560d30                                  m_invLoc_1 = 0x10000000;
00560d31                                  goto label_561327;
00560d2e                              }
00560d2e                              
00560d40                              this->blockingID = this->m_invSlotModule.sigilOneSlot->m_itemID;
00560d40                              
00560d46                              if (arg5 == 0)
00560d46                              {
00560d4c                                  StringInfo::StringInfo(&var_90);
00560d5a                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already using aetheria of…");
00560d6a                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560d73                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560d7f                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560d8b                                  StringInfo::~StringInfo(&var_90);
00560d46                              }
00560d26                          }
00560d26                          
00560d9b                          if ((0x20000000 & __return_3) != 0)
00560d9b                          {
00560da3                              if ((this->inventoryMask & 0x20000000) == 0)
00560da3                              {
00560da5                                  m_invLoc_1 = 0x20000000;
00560da6                                  goto label_561327;
00560da3                              }
00560da3                              
00560db5                              this->blockingID = this->m_invSlotModule.sigilTwoSlot->m_itemID;
00560db5                              
00560dbb                              if (arg5 == 0)
00560dbb                              {
00560dc1                                  StringInfo::StringInfo(&var_90);
00560dcf                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already using aetheria of…");
00560ddf                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560de8                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560df4                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560e00                                  StringInfo::~StringInfo(&var_90);
00560dbb                              }
00560d9b                          }
00560d9b                          
00560e10                          if ((0x40000000 & __return_3) != 0)
00560e10                          {
00560e18                              if ((this->inventoryMask & 0x40000000) == 0)
00560e18                              {
00560e1a                                  m_invLoc_1 = 0x40000000;
00560e1b                                  goto label_561327;
00560e18                              }
00560e18                              
00560e2a                              this->blockingID = this->m_invSlotModule.sigilThreeSlot->m_itemID;
00560e2a                              
00560e30                              if (arg5 == 0)
00560e30                              {
00560e36                                  StringInfo::StringInfo(&var_90);
00560e44                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already using aetheria of…");
00560e54                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560e5d                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560e69                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560e75                                  StringInfo::~StringInfo(&var_90);
00560e30                              }
00560e10                          }
00560e10                          
00560e7f                          if ((__return_3 & 1) != 0)
00560e7f                          {
00560e88                              if ((this->inventoryMask & 1) == 0)
00560e88                              {
00560e8a                                  m_invLoc_1 = 1;
00560e8c                                  goto label_561327;
00560e88                              }
00560e88                              
00560e9b                              this->blockingID = this->m_invSlotModule.headSlot->m_itemID;
00560e9b                              
00560ea1                              if (arg5 == 0)
00560ea1                              {
00560ea7                                  StringInfo::StringInfo(&var_90);
00560eb5                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing a helm.");
00560ec5                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560ece                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560eda                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560ee6                                  StringInfo::~StringInfo(&var_90);
00560ea1                              }
00560e7f                          }
00560e7f                          
00560ef6                          if ((0x200 & __return_3) != 0)
00560ef6                          {
00560efe                              if ((this->inventoryMask & 0x200) == 0)
00560efe                              {
00560f00                                  m_invLoc_1 = 0x200;
00560f01                                  goto label_561327;
00560efe                              }
00560efe                              
00560f10                              this->blockingID = this->m_invSlotModule.chestSlot->m_itemID;
00560f10                              
00560f16                              if (arg5 == 0)
00560f16                              {
00560f1c                                  StringInfo::StringInfo(&var_90);
00560f2a                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing chest arm…");
00560f3a                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560f43                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560f4f                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560f5b                                  StringInfo::~StringInfo(&var_90);
00560f16                              }
00560ef6                          }
00560ef6                          
00560f6b                          if ((0x400 & __return_3) != 0)
00560f6b                          {
00560f73                              if ((this->inventoryMask & 0x400) == 0)
00560f73                              {
00560f75                                  m_invLoc_1 = 0x400;
00560f76                                  goto label_561327;
00560f73                              }
00560f73                              
00560f85                              this->blockingID = this->m_invSlotModule.abdomenSlot->m_itemID;
00560f85                              
00560f8b                              if (arg5 == 0)
00560f8b                              {
00560f91                                  StringInfo::StringInfo(&var_90);
00560f9f                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing abdomen a…");
00560faf                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560fb8                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560fc4                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560fd0                                  StringInfo::~StringInfo(&var_90);
00560f8b                              }
00560f6b                          }
00560f6b                          
00560fe0                          if ((0x800 & __return_3) != 0)
00560fe0                          {
00560fe8                              if ((this->inventoryMask & 0x800) == 0)
00560fe8                              {
00560fea                                  m_invLoc_1 = 0x800;
00560feb                                  goto label_561327;
00560fe8                              }
00560fe8                              
00560ffa                              this->blockingID = this->m_invSlotModule.upperArmSlot->m_itemID;
00560ffa                              
00561000                              if (arg5 == 0)
00561000                              {
00561006                                  StringInfo::StringInfo(&var_90);
00561014                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing upper arm…");
00561024                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
0056102d                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00561039                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00561045                                  StringInfo::~StringInfo(&var_90);
00561000                              }
00560fe0                          }
00560fe0                          
00561055                          if ((0x1000 & __return_3) != 0)
00561055                          {
0056105d                              if ((this->inventoryMask & 0x1000) == 0)
0056105d                              {
0056105f                                  m_invLoc_1 = 0x1000;
00561060                                  goto label_561327;
0056105d                              }
0056105d                              
0056106f                              this->blockingID = *(uint32_t*)this->m_invSlotModule.lowerArmSlot;
0056106f                              
00561075                              if (arg5 == 0)
00561075                              {
0056107b                                  StringInfo::StringInfo(&var_90);
00561089                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing lower arm…");
00561099                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
005610a2                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005610ae                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005610ba                                  StringInfo::~StringInfo(&var_90);
00561075                              }
00561055                          }
00561055                          
005610bf                          class ACCWeenieObject* ecx_73;
005610bf                          ecx_73 = __return_3;
005610bf                          
005610ca                          if ((0x20 & ecx_73) != 0)
005610ca                          {
005610d2                              if ((this->inventoryMask & 0x20) == 0)
005610d2                              {
005610d4                                  m_invLoc_1 = 0x20;
005610d5                                  goto label_561327;
005610d2                              }
005610d2                              
005610e4                              this->blockingID = this->m_invSlotModule.handSlot->m_itemID;
005610e4                              
005610ea                              if (arg5 == 0)
005610ea                              {
005610f0                                  StringInfo::StringInfo(&var_90);
005610fe                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing hand armo…");
0056110e                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00561117                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00561123                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
0056112f                                  StringInfo::~StringInfo(&var_90);
005610ea                              }
005610ca                          }
005610ca                          
0056113f                          if ((0x2000 & __return_3) != 0)
0056113f                          {
00561147                              if ((this->inventoryMask & 0x2000) == 0)
00561147                              {
00561149                                  m_invLoc_1 = 0x2000;
0056114a                                  goto label_561327;
00561147                              }
00561147                              
00561159                              this->blockingID = this->m_invSlotModule.upperLegSlot->m_itemID;
00561159                              
0056115f                              if (arg5 == 0)
0056115f                              {
00561165                                  StringInfo::StringInfo(&var_90);
00561173                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing upper leg…");
00561183                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
0056118c                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00561198                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005611a4                                  StringInfo::~StringInfo(&var_90);
0056115f                              }
0056113f                          }
0056113f                          
005611b4                          if ((0x4000 & __return_3) != 0)
005611b4                          {
005611bc                              if ((this->inventoryMask & 0x4000) == 0)
005611bc                              {
005611be                                  m_invLoc_1 = 0x4000;
005611bf                                  goto label_561327;
005611bc                              }
005611bc                              
005611ce                              this->blockingID = this->m_invSlotModule.lowerLegSlot->m_itemID;
005611ce                              
005611d4                              if (arg5 == 0)
005611d4                              {
005611da                                  StringInfo::StringInfo(&var_90);
005611e8                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &CPlayerSystem::`vftable'.RecvNotice_UpdateRadarVisibility);
005611f8                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00561201                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0056120d                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00561219                                  StringInfo::~StringInfo(&var_90);
005611d4                              }
005611b4                          }
005611b4                          
00561229                          if ((0x100 & __return_3) != 0)
00561229                          {
00561231                              if ((this->inventoryMask & 0x100) == 0)
00561231                              {
00561233                                  m_invLoc_1 = 0x100;
00561234                                  goto label_561327;
00561231                              }
00561231                              
00561243                              this->blockingID = this->m_invSlotModule.footSlot->m_itemID;
00561243                              
00561249                              if (arg5 == 0)
00561249                              {
0056124f                                  StringInfo::StringInfo(&var_90);
0056125d                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &CPlayerSystem::`vftable'.RecvNotice_LoadUI);
0056126d                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00561276                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00561282                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
0056128e                                  StringInfo::~StringInfo(&var_90);
00561249                              }
00561229                          }
00561229                          
00561299                          __return_2 = (__return_3 & 0x30000);
0056129e                          __return = __return_2;
0056129e                          
005612aa                          if ((__return_2 != 0 || (__return_3 & 0xc0000) != 0))
005612aa                          {
005612b9                              uint32_t* eax_18;
005612b9                              class CInvSlotInfo* edx_13;
005612b9                              
005612b9                              if (__return_2 == 0)
005612b9                              {
005612db                                  if (arg3 == SLOT_SIDE_LEFT)
005612db                                  {
005612eb                                      eax_18 = this->m_invSlotModule.leftRingSlot;
005612f1                                      edx_13 = this->m_invSlotModule.rightRingSlot;
005612db                                  }
005612db                                  else
005612db                                  {
005612dd                                      eax_18 = this->m_invSlotModule.rightRingSlot;
005612e3                                      edx_13 = this->m_invSlotModule.leftRingSlot;
005612db                                  }
005612b9                              }
005612b9                              else if (arg3 == SLOT_SIDE_LEFT)
005612bc                              {
005612cc                                  eax_18 = this->m_invSlotModule.leftWristSlot;
005612d2                                  edx_13 = this->m_invSlotModule.rightWristSlot;
005612bc                              }
005612bc                              else
005612bc                              {
005612be                                  eax_18 = this->m_invSlotModule.rightWristSlot;
005612c4                                  edx_13 = this->m_invSlotModule.leftWristSlot;
005612bc                              }
005612bc                              
005612f7                              uint32_t m_invLoc_2 = eax_18[1];
005612fa                              uint32_t inventoryMask_1 = this->inventoryMask;
005612fa                              
00561302                              if ((inventoryMask_1 & m_invLoc_2) == 0)
00561302                              {
00561304                                  m_invLoc_1 = m_invLoc_2;
00561305                                  goto label_561327;
00561302                              }
00561302                              
0056131b                              uint32_t m_invLoc;
0056131b                              
0056131b                              if ((arg7 != 0 && *(uint32_t*)eax_18 != arg2))
0056131d                                  m_invLoc = edx_13->m_invLoc;
0056131d                              
00561322                              if (((arg7 != 0 && *(uint32_t*)eax_18 != arg2) && (inventoryMask_1 & m_invLoc) == 0))
00561322                              {
00561324                                  m_invLoc_1 = m_invLoc;
00561324                                  goto label_561327;
00561322                              }
00561322                              
00561345                              this->blockingID = *(uint32_t*)eax_18;
00561345                              
0056134b                              if (arg5 == 0)
0056134b                              {
00561357                                  void* ecx_109 = &var_90;
0056135b                                  void* var_b8_19;
0056135b                                  
0056135b                                  if (__return == 0)
0056135b                                  {
00561390                                      StringInfo::StringInfo(ecx_109);
0056139e                                      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &CPlayerSystem::`vftable'.RecvNotice_CastQuickslotSpell);
005613ae                                      StringInfo::SetLiteralValue(&var_90, &__return, 1);
005613b7                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005613c0                                      var_b8_19 = &var_90;
0056135b                                  }
0056135b                                  else
0056135b                                  {
0056135d                                      StringInfo::StringInfo(ecx_109);
0056136b                                      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &CPlayerSystem::`vftable'.RecvNotice_SetDisplayContractTracker);
0056137b                                      StringInfo::SetLiteralValue(&var_90, &__return, 1);
00561384                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0056138d                                      var_b8_19 = &var_90;
0056135b                                  }
0056135b                                  
005613c3                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_b8_19);
005613cf                                  StringInfo::~StringInfo(&var_90);
0056134b                              }
005612aa                          }
00560bc7                      }
00560bc7                      else
00560bc7                      {
00560bcf                          if ((this->inventoryMask & 0x8000) != 0)
00560bcf                          {
00560be1                              this->blockingID = this->m_invSlotModule.neckSlot->m_itemID;
00560be1                              
00560be7                              if (arg5 == 0)
00560be7                              {
00560bed                                  StringInfo::StringInfo(&var_90);
00560bfb                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"You're already wearing jewelry o…");
00560c0b                                  StringInfo::SetLiteralValue(&var_90, &__return, 1);
00560c14                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560c20                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560c2c                                  StringInfo::~StringInfo(&var_90);
00560be7                              }
00560be7                              
00560be7                              goto label_560c3c;
00560bcf                          }
00560bcf                          
00560bd1                          m_invLoc_1 = 0x8000;
00561327                      label_561327:
00561327                          ACCWeenieObject::UIAttemptWield(ebx, m_invLoc_1);
0056132c                          ebp = 1;
00561331                          var_a0 = 1;
00560bc7                      }
00560bc7                      
005613e6                      if (((__return_3 & 0x2500000) != 0 && arg3 == SLOT_SIDE_LEFT))
005613e8                          __return_3 = 0x200000;
005613e8                      
005613f2                      if (ebp != 0)
005613f2                      {
00561881                          __return_2 = ebp != 0;
0056188b                          return __return_2;
005613f2                      }
005613f2                      
005613fc                      void* ebp_2 = (__return_3 & 0x3500000);
00561402                      int32_t eax_28;
00561402                      
00561402                      if (ebp_2 != 0)
00561402                      {
00561412                          if ((this->inventoryMask & 0x3500000) != 0)
00561412                          {
005614b7                              if (ItemHolder::AttemptMerge(arg2, *(uint32_t*)this->m_invSlotModule.weaponReadySlot, 1) != 0)
005614b7                              {
0056153c                                  eax_28 = true;
00561546                                  return 1;
005614b7                              }
005614b7                              
005614c1                              this->blockingID = this->m_invSlotModule.weaponReadySlot->m_itemID;
00561412                          }
00561412                          else
00561412                          {
0056141e                              uint32_t m_itemID = this->m_invSlotModule.shieldReadySlot->m_itemID;
00561422                              int32_t eax_21;
00561422                              
00561422                              if (m_itemID != 0)
00561426                                  eax_21 = ACCWeenieObject::BlocksUseOfShield(ebx);
00561426                              
0056142d                              if ((m_itemID == 0 || eax_21 == 0))
0056142d                              {
00561448                                  uint32_t m_itemID_1 = this->m_invSlotModule.ammoReadySlot->m_itemID;
00561448                                  
0056144e                                  if ((ebx->pwd._ammoType != AMMO_NONE && m_itemID_1 != 0))
0056144e                                  {
00561451                                      class ACCWeenieObject* eax_23 = ClientObjMaintSystem::GetWeenieObject(m_itemID_1);
00561451                                      
00561469                                      if ((eax_23 != 0 && ebx->pwd._ammoType != eax_23->pwd._ammoType))
0056146b                                          this->blockingID = m_itemID_1;
0056144e                                  }
0056144e                                  
00561479                                  if (this->blockingID == 0)
00561479                                  {
0056147e                                      ACCWeenieObject::UIAttemptWield(ebx, ebp_2);
0056148d                                      int32_t eax_25;
0056148d                                      eax_25 = true;
00561497                                      return 1;
00561479                                  }
0056142d                              }
0056142d                              else
0056142f                                  this->blockingID = m_itemID;
00561412                          }
00561402                      }
00561402                      
005614d0                      if ((__return_3 & 0x200000) != 0)
005614d0                      {
005614dc                          if ((this->inventoryMask & 0x200000) == 0)
005614dc                          {
005614e5                              ACCWeenieObject::UIAttemptWield(ebx, 0x200000);
005614f4                              int32_t eax_30;
005614f4                              eax_30 = true;
005614fe                              return 1;
005614dc                          }
005614dc                          
00561509                          this->blockingID = this->m_invSlotModule.shieldReadySlot->m_itemID;
005614d0                      }
005614d0                      
00561514                      void __return_1;
00561514                      
00561514                      if ((__return_3 & "activation type (%s) with '%s' b…") != 0)
00561514                      {
00561524                          if ((this->inventoryMask & "activation type (%s) with '%s' b…") == 0)
00561524                          {
0056152d                              ACCWeenieObject::UIAttemptWield(ebx, "activation type (%s) with '%s' b…");
0056153c                              eax_28 = true;
00561546                              return 1;
00561524                          }
00561524                          
00561566                          if (ItemHolder::AttemptMerge(arg2, this->m_invSlotModule.ammoReadySlot->m_itemID, 1) != 0)
00561566                          {
0056153c                              eax_28 = true;
00561546                              return 1;
00561566                          }
00561566                          
00561571                          class ACCWeenieObject* eax_34 = ClientObjMaintSystem::GetWeenieObject(this->m_invSlotModule.ammoReadySlot->m_itemID);
00561571                          
0056158d                          if ((eax_34 == 0 || eax_34->pwd._wcid.id != ebx->pwd._wcid.id))
0056160e                              this->blockingID = this->m_invSlotModule.ammoReadySlot->m_itemID;
0056158d                          else if (arg4 == 0)
00561598                          {
005615ac                              class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = ACCWeenieObject::GetObjectNameWide(ebx, &__return_1, NAME_PLURAL, 0)->m_charbuffer;
005615b9                              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, Formatted, &CPlayerSystem::`vftable'.RecvNotice_OpenSalvagePanel);
005615c5                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
005615ce                              StringInfo::StringInfo(&var_90);
005615de                              StringInfo::SetLiteralValue(&var_90, &__return, 1);
005615ea                              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005615f6                              StringInfo::~StringInfo(&var_90);
005615ff                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00561598                          }
00561514                      }
00561514                      
0056161e                      if ((__return_3 & 0x80001ff) != 0)
0056161e                      {
00561624                          uint32_t inventoryMask = this->inventoryMask;
00561634                          void* ecx_135 = (__return_3 & 2);
00561637                          void* edx_22 = (__return_3 & 0x40);
0056163a                          void* ebp_4 = (__return_3 & 0x8000000);
00561640                          int32_t edi_3 = (inventoryMask & 2);
00561643                          int32_t ebx_2 = (inventoryMask & 0x40);
00561646                          int32_t eax_38 = (inventoryMask & 0x8000000);
0056164d                          uint32_t var_b8_24;
0056164d                          
0056164d                          if (ecx_135 == 0)
0056164d                          {
005616b7                              if ((edx_22 != 0 && ebx_2 == 0))
005616b7                              {
005616b9                                  var_b8_24 = 0x40;
005616ce                              label_5616ce:
005616ce                                  ACCWeenieObject::UIAttemptWield(var_98, var_b8_24);
005616d3                                  var_a0 = 1;
005616db                                  goto label_56187c;
005616b7                              }
005616b7                              
005616bd                          label_5616bd:
005616bd                              
005616c3                              if ((ebp_4 != 0 && eax_38 == 0))
005616c3                              {
005616c5                                  var_b8_24 = 0x8000000;
005616c5                                  goto label_5616ce;
005616c3                              }
005616c3                              
005616e6                              if ((ecx_135 != 0 && edi_3 != 0))
005616f0                                  this->blockingID = this->m_invSlotModule.clothesShirtSlot->m_itemID;
005616e6                              else if ((edx_22 != 0 && ebx_2 != 0))
00561708                                  this->blockingID = this->m_invSlotModule.clothesPantsSlot->m_itemID;
005616fe                              else if ((ebp_4 != 0 && eax_38 != 0))
00561720                                  this->blockingID = this->m_invSlotModule.cloakSlot->m_itemID;
0056164d                          }
0056164d                          else
0056164d                          {
00561651                              if (edx_22 == 0)
00561651                              {
005616ab                                  if (edi_3 != 0)
005616ab                                      goto label_5616bd;
005616ab                                  
005616ad                                  var_b8_24 = 2;
005616af                                  goto label_5616ce;
00561651                              }
00561651                              
00561659                              if ((edi_3 == 0 && ebx_2 == 0))
00561659                              {
0056165b                                  var_b8_24 = 0x42;
0056165d                                  goto label_5616ce;
00561659                              }
00561659                              
00561663                              StringInfo::StringInfo(&var_90);
00561671                              PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, &CPlayerSystem::`vftable'.RecvNotice_UpdateObjectHealth);
00561681                              StringInfo::SetLiteralValue(&var_90, &__return, 1);
0056168a                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00561696                              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005616a2                              StringInfo::~StringInfo(&var_90);
0056164d                          }
0056161e                      }
0056161e                      
00561726                      __return_2 = this->blockingID;
00561726                      
0056172e                      if (__return_2 == 0)
0056172e                          goto label_56187c;
0056172e                      
0056173d                      if (arg5 == 0)
0056173d                      {
00561873                          CPlayerSystem::ResetUnblocking(this);
0056187c                      label_56187c:
00561881                          __return_2 = var_a0 != 0;
0056188b                          return __return_2;
0056173d                      }
0056173d                      
0056174c                      if (__return_2 != arg2)
0056174c                      {
0056175d                          this->unblockAttemptNum += 1;
00561763                          this->blockedID = arg2;
00561776                          this->blockedSide = arg3;
00561783                          class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(&__return_1, __return_2, NAME_APPROPRIATE, 0)->m_charbuffer;
00561790                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, &CPlayerSystem::`vftable'.RecvNotice_CraftInteraction_ConfirmationRequest);
0056179c                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
005617bf                          int32_t ebp_5;
005617bf                          
005617bf                          if (ItemHolder::AttemptToPlaceInContainer(this->blockingID, this->playerID, 0, 1, 0) == 0)
005617bf                          {
005617e5                              if (ClientObjMaintSystem::GetWeenieObject(this->blockingID) != 0)
005617e5                              {
005617f7                                  class PStringBase<unsigned short>* eax_47;
005617f7                                  uint16_t* edx_29;
005617f7                                  eax_47 = ACCWeenieObject::GetObjectNameWide(&__return_1, this->blockingID, NAME_APPROPRIATE, 0);
005617fe                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax_47->m_charbuffer;
00561803                                  void (__thiscall** const var_cc_1)(class gmNoticeHandler* this, uint32_t, uint8_t) = &CPlayerSystem::`vftable'.RecvNotice_AllegianceLogin;
00561808                                  class ACCWeenieObject** var_d0_1 = &var_98;
00561809                                  PStringBase<unsigned short>::sprintf_append(eax_47, edx_29);
00561815                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
005617e5                              }
005617e5                              
0056181c                              CPlayerSystem::ResetUnblocking(this);
00561821                              ebp_5 = var_a0;
005617bf                          }
005617bf                          else
005617bf                          {
005617c7                              this->blockingDestID = this->playerID;
005617cd                              ebp_5 = 1;
005617bf                          }
005617bf                          
00561829                          StringInfo::StringInfo(&var_90);
00561839                          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00561845                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00561851                          StringInfo::~StringInfo(&var_90);
0056185a                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
0056186e                          return ebp_5 != 0;
0056174c                      }
00560b6c                  }
00560b6c                  else if (arg6 != 0)
00560b77                  {
00560b7b                      __return_2 = ACCWeenieObject::IsOwnedByPlayer(ebx);
00560b7b                      
00560b82                      if (__return_2 == 0)
00560b98                          return CPlayerSystem::AutoSort(this, arg2, __return_2, __return_2);
00560b77                  }
00560b58              }
00560ac1          }
00560ac1          else if (arg4 == 0)
00560ad0          {
00560ae3              class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ACCWeenieObject::GetObjectNameWide(ebx, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00560aef              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"The %s is being wielded by someo…");
00560afb              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00560b04              StringInfo::StringInfo(&var_90);
00560b14              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00560b20              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00560b2c              StringInfo::~StringInfo(&var_90);
00560b35              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
00560ad0          }
00560aa7      }
00560aa7      
00560b3d      __return_2 = 0;
00560b46      return 0;
00560a60  }

0056188e                                            90 90                                                                ..

00561890  uint8_t __thiscall CPlayerSystem::OnAction(class CPlayerSystem* this, class InputEvent const* arg2)

00561890  {
0056189b      class InputEvent* eax_1 = (arg2->m_InputAction - 0x1000002a);
005618a8      class ACCWeenieObject* eax_42;
005618a8      
005618a8      if (eax_1 <= 0x114)
005618b5          switch (*(int32_t*)((char*)eax_1 + 0x562758))
005618b5          {
005618bc              case 0:
005618bc              {
005618c5                  if (ClientUISystem::GetUISystem()->targetMode == TARGET_MODE_USE_TARGET)
005618c5                  {
005618d0                      ClientUISystem::SetTargetMode(ClientUISystem::GetUISystem(), TARGET_MODE_NONE);
005618dc                      ItemHolder::TargetAcquired(this->playerModule.m_timeFirstDirtied);
005618e6                      int32_t eax_4;
005618e6                      eax_4 = 1;
005618ec                      return 1;
005618c5                  }
005618c5                  
005618fa                  if (ClientUISystem::GetUISystem()->targetMode != TARGET_MODE_EXAMINE)
005618fa                  {
0056193e                      ACCWeenieObject::SetSelectedObject(this->playerModule.m_timeFirstDirtied, 0);
00561948                      int32_t eax_10;
00561948                      eax_10 = 1;
0056194e                      return 1;
005618fa                  }
005618fa                  
00561903                  ACCWeenieObject::SetSelectedObject(this->playerModule.m_timeFirstDirtied, 0);
00561914                  ClientUISystem::SetTargetMode(ClientUISystem::GetUISystem(), TARGET_MODE_NONE);
00561927                  ClientUISystem::ExamineObject(ClientUISystem::GetUISystem(), this->playerModule.m_timeFirstDirtied);
0056192e                  int32_t eax_9;
0056192e                  eax_9 = 1;
00561934                  return 1;
005618bc                  break;
005618bc              }
00561951              case 1:
00561951              {
00561951                  eax_1 = ACCWeenieObject::selectedID;
00561951                  
00561958                  if (eax_1 == 0)
00561958                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561958                  }
00561958                  
00561964                  CPlayerSystem::PlaceInBackpack(((char*)this - 8), eax_1, 0);
0056196b                  int32_t eax_11;
0056196b                  eax_11 = 1;
00561971                  return 1;
00561951                  break;
00561951              }
00561aa1              case 2:
00561aa1              {
00561aa1                  CM_UI::SendNotice_SplitStack(ACCWeenieObject::selectedID);
00561aab                  int32_t eax_21;
00561aab                  eax_21 = 1;
00561ab1                  return 1;
00561aa1                  break;
00561aa1              }
00561ab4              case 3:
00561ab4              {
00561ab4                  eax_1 = ACCWeenieObject::prevSelectedID;
00561ab4                  
00561abb                  if (eax_1 == 0)
00561abb                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561abb                  }
00561abb                  
00561ac4                  ACCWeenieObject::SetSelectedObject(eax_1, 0);
00561ace                  int32_t eax_22;
00561ace                  eax_22 = 1;
00561ad4                  return 1;
00561ab4                  break;
00561ab4              }
00561ae2              case 4:
00561ae2              {
00561ae2                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 1, SELECTION_TYPE_COMPASS_ITEM, 0);
00561ae9                  int32_t eax_23;
00561ae9                  eax_23 = 1;
00561aef                  return 1;
00561ae2                  break;
00561ae2              }
00561af2              case 5:
00561af2              {
00561af2                  uint32_t ACCWeenieObject::selectedID_3 = ACCWeenieObject::selectedID;
00561b05                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 0, SELECTION_TYPE_COMPASS_ITEM, 0);
00561b05                  
00561b10                  if (ACCWeenieObject::selectedID_3 != ACCWeenieObject::selectedID)
00561b10                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561b10                  }
00561b10                  
00561b20                  CPlayerSystem::SelectNext(nullptr, 0, 1, SELECTION_TYPE_COMPASS_ITEM, 0);
00561b27                  int32_t eax_24;
00561b27                  eax_24 = 1;
00561b2d                  return 1;
00561af2                  break;
00561af2              }
00561b30              case 6:
00561b30              {
00561b30                  uint32_t ACCWeenieObject::selectedID_4 = ACCWeenieObject::selectedID;
00561b43                  CPlayerSystem::SelectNext(((char*)this - 8), 0, 0, SELECTION_TYPE_COMPASS_ITEM, 0);
00561b43                  
00561b4e                  if (ACCWeenieObject::selectedID_4 != ACCWeenieObject::selectedID)
00561b4e                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561b4e                  }
00561b4e                  
00561b5e                  CPlayerSystem::SelectNext(nullptr, 1, 1, SELECTION_TYPE_COMPASS_ITEM, 0);
00561b65                  int32_t eax_25;
00561b65                  eax_25 = 1;
00561b6b                  return 1;
00561b30                  break;
00561b30              }
00561b79              case 7:
00561b79              {
00561b79                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 1, SELECTION_TYPE_ITEM, 1);
00561b80                  int32_t eax_26;
00561b80                  eax_26 = 1;
00561b86                  return 1;
00561b79                  break;
00561b79              }
00561b89              case 8:
00561b89              {
00561b89                  uint32_t ACCWeenieObject::selectedID_5 = ACCWeenieObject::selectedID;
00561b9c                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 0, SELECTION_TYPE_ITEM, 0);
00561b9c                  
00561ba7                  if (ACCWeenieObject::selectedID_5 != ACCWeenieObject::selectedID)
00561ba7                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561ba7                  }
00561ba7                  
00561bb7                  CPlayerSystem::SelectNext(nullptr, 0, 1, SELECTION_TYPE_ITEM, 0);
00561bbe                  int32_t eax_27;
00561bbe                  eax_27 = 1;
00561bc4                  return 1;
00561b89                  break;
00561b89              }
00561bc7              case 9:
00561bc7              {
00561bc7                  uint32_t ACCWeenieObject::selectedID_6 = ACCWeenieObject::selectedID;
00561bda                  CPlayerSystem::SelectNext(((char*)this - 8), 0, 0, SELECTION_TYPE_ITEM, 0);
00561bda                  
00561be5                  if (ACCWeenieObject::selectedID_6 != ACCWeenieObject::selectedID)
00561be5                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561be5                  }
00561be5                  
00561bf5                  CPlayerSystem::SelectNext(nullptr, 1, 1, SELECTION_TYPE_ITEM, 0);
00561bfc                  int32_t eax_28;
00561bfc                  eax_28 = 1;
00561c02                  return 1;
00561bc7                  break;
00561bc7              }
00561c10              case 0xa:
00561c10              {
00561c10                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 1, SELECTION_TYPE_MONSTER, 0);
00561c17                  int32_t eax_29;
00561c17                  eax_29 = 1;
00561c1d                  return 1;
00561c10                  break;
00561c10              }
00561c20              case 0xb:
00561c20              {
00561c20                  uint32_t ACCWeenieObject::selectedID_7 = ACCWeenieObject::selectedID;
00561c33                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 0, SELECTION_TYPE_MONSTER, 0);
00561c33                  
00561c3e                  if (ACCWeenieObject::selectedID_7 != ACCWeenieObject::selectedID)
00561c3e                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561c3e                  }
00561c3e                  
00561c4e                  CPlayerSystem::SelectNext(nullptr, 0, 1, SELECTION_TYPE_MONSTER, 0);
00561c55                  int32_t eax_30;
00561c55                  eax_30 = 1;
00561c5b                  return 1;
00561c20                  break;
00561c20              }
00561c5e              case 0xc:
00561c5e              {
00561c5e                  uint32_t ACCWeenieObject::selectedID_8 = ACCWeenieObject::selectedID;
00561c71                  CPlayerSystem::SelectNext(((char*)this - 8), 0, 0, SELECTION_TYPE_MONSTER, 0);
00561c71                  
00561c7c                  if (ACCWeenieObject::selectedID_8 != ACCWeenieObject::selectedID)
00561c7c                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561c7c                  }
00561c7c                  
00561c8c                  CPlayerSystem::SelectNext(nullptr, 1, 1, SELECTION_TYPE_MONSTER, 0);
00561c93                  int32_t eax_31;
00561c93                  eax_31 = 1;
00561c99                  return 1;
00561c5e                  break;
00561c5e              }
00561cb3              case 0xd:
00561cb3              {
00561cb3                  int32_t* var_18;
00561cb3                  int32_t* __return;
00561cb3                  InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_18, GetClassObject(&__return, &PlayerDesc_ClassType));
00561cb8                  int32_t* __return_2 = __return;
00561cb8                  
00561cbe                  if (__return_2 != 0)
00561cc2                      *(uint32_t*)(*(uint32_t*)__return_2 + 0x14)();
00561cc2                  
00561cd0                  if (InterfacePtr<ClientObjMaintSystem>::IsValid(&var_18) != 0)
00561cd0                  {
00561cea                      int32_t* ebx_1 = var_18;
00561cf8                      arg2 = nullptr;
00561d00                      CBaseQualities::InqInstanceID(&ebx_1[0xe], 0xb, &arg2);
00561d00                      
00561d0b                      if (arg2 != 0)
00561d0b                      {
00561d3e                          int32_t* __return_1;
00561d3e                          InterfacePtr<ClientObjMaintSystem>::InterfacePtr<ClientObjMaintSystem>(&var_18, GetClassObject(&__return_1, &ClientObjMaintSystem_ClassType));
00561d43                          int32_t* __return_3 = __return_1;
00561d43                          
00561d49                          if (__return_3 != 0)
00561d4d                              *(uint32_t*)(*(uint32_t*)__return_3 + 0x14)();
00561d4d                          
00561d50                          int32_t* edi_1 = var_18;
00561d50                          
00561d66                          if ((HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(&edi_1[0x3b], &arg2) != 0 && CPlayerSystem::ObjectIsWithinRadarRange(((char*)this - 8), arg2) != 0))
00561d80                              ACCWeenieObject::SetSelectedObject(arg2, 0);
00561d80                          
00561d8a                          if (edi_1 != 0)
00561d90                              *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
00561d90                          
00561d95                          if (ebx_1 != 0)
00561d9b                              *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
00561d0b                      }
00561d0b                      else if (ebx_1 != 0)
00561d0f                      {
00561d19                          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
00561d1e                          int32_t eax_34;
00561d1e                          eax_34 = 1;
00561d24                          return 1;
00561d0f                      }
00561d0f                      
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561cd0                  }
00561cd0                  
00561cd2                  int32_t* ecx_26 = var_18;
00561cd2                  
00561cd8                  if (ecx_26 != 0)
00561cdc                      *(uint32_t*)(*(uint32_t*)ecx_26 + 0x14)();
00561cb3                  break;
00561cb3              }
00561db4              case 0xe:
00561db4              {
00561db4                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 1, SELECTION_TYPE_PLAYER, 0);
00561dbb                  int32_t eax_37;
00561dbb                  eax_37 = 1;
00561dc1                  return 1;
00561db4                  break;
00561db4              }
00561dc4              case 0xf:
00561dc4              {
00561dc4                  uint32_t ACCWeenieObject::selectedID_9 = ACCWeenieObject::selectedID;
00561dd7                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 0, SELECTION_TYPE_PLAYER, 0);
00561dd7                  
00561de2                  if (ACCWeenieObject::selectedID_9 == ACCWeenieObject::selectedID)
00561dee                      CPlayerSystem::SelectNext(nullptr, 0, 1, SELECTION_TYPE_PLAYER, 0);
00561dee                  
00561df5                  int32_t eax_38;
00561df5                  eax_38 = 1;
00561dfb                  return 1;
00561dc4                  break;
00561dc4              }
00561dfe              case 0x10:
00561dfe              {
00561dfe                  uint32_t ACCWeenieObject::selectedID_10 = ACCWeenieObject::selectedID;
00561e11                  CPlayerSystem::SelectNext(((char*)this - 8), 0, 0, SELECTION_TYPE_PLAYER, 0);
00561e11                  
00561e1c                  if (ACCWeenieObject::selectedID_10 == ACCWeenieObject::selectedID)
00561e28                      CPlayerSystem::SelectNext(nullptr, 1, 1, SELECTION_TYPE_PLAYER, 0);
00561e28                  
00561e2f                  int32_t eax_39;
00561e2f                  eax_39 = 1;
00561e35                  return 1;
00561dfe                  break;
00561dfe              }
00561f4d              case 0x11:
00561f4d              {
00561f4d                  ClientFellowshipSystem::SelectPreviousFellow(ClientFellowshipSystem::GetFellowshipSystem());
00561f54                  int32_t eax_47;
00561f54                  eax_47 = 1;
00561f5a                  return 1;
00561f4d                  break;
00561f4d              }
00561f64              case 0x12:
00561f64              {
00561f64                  ClientFellowshipSystem::SelectNextFellow(ClientFellowshipSystem::GetFellowshipSystem());
00561f6b                  int32_t eax_49;
00561f6b                  eax_49 = 1;
00561f71                  return 1;
00561f64                  break;
00561f64              }
00561e98              case 0x13:
00561e98              {
00561e98                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 1, SELECTION_TYPE_UNOPENED_CORPSE, 0);
00561ea4                  eax_42 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
00561ea4                  
00561eae                  if ((eax_42 != 0 && eax_42->vtable->IsCorpse() != 0))
00561eae                  {
00561ec9                      int32_t eax_44;
00561ec9                      int80_t st0_1;
00561ec9                      eax_44 = ItemHolder::UseObject(ACCWeenieObject::selectedID, 1, 0);
00561ed3                      eax_44 = 1;
00561ed9                      return 1;
00561eae                  }
00561eae                  
00561f3d                  eax_42 = 1;
00561f43                  return 1;
00561e98                  break;
00561e98              }
00561edc              case 0x14:
00561edc              {
00561edc                  uint32_t ACCWeenieObject::selectedID_12 = ACCWeenieObject::selectedID;
00561eef                  CPlayerSystem::SelectNext(((char*)this - 8), 0, 0, SELECTION_TYPE_UNOPENED_CORPSE, 0);
00561eef                  
00561efa                  if (ACCWeenieObject::selectedID_12 == ACCWeenieObject::selectedID)
00561f06                      CPlayerSystem::SelectNext(nullptr, 1, 1, SELECTION_TYPE_UNOPENED_CORPSE, 0);
00561f06                  
00561f12                  eax_42 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID);
00561f1c                  int80_t st0_2;
00561f1c                  
00561f1c                  if ((eax_42 != 0 && eax_42->vtable->IsCorpse() != 0))
00561f33                      eax_42 = ItemHolder::UseObject(ACCWeenieObject::selectedID, 1, 0);
00561f3d                  eax_42 = 1;
00561f43                  return 1;
00561edc                  break;
00561edc              }
00561997              case 0x15:
00561997              {
00561997                  uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0056199f                  uint32_t ACCWeenieObject::prevSelectedID_1 = ACCWeenieObject::prevSelectedID;
0056199f                  
005619b5                  if ((ACCWeenieObject::selectedID_1 == 0 || (ACCWeenieObject::prevSelectedID_1 == 0 || ACCWeenieObject::selectedID_1 == ACCWeenieObject::prevSelectedID_1)))
005619b5                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
005619b5                  }
005619b5                  
005619bc                  class ACCWeenieObject* eax_13 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::prevSelectedID_1);
005619bc                  
005619c6                  if ((eax_13 != 0 && (eax_13->vtable->InqType() & 0x10) != 0))
005619c6                  {
005619d7                      ItemHolder::AttemptPlaceIn3D(ACCWeenieObject::selectedID_1, ACCWeenieObject::prevSelectedID_1, 0);
005619df                      ACCWeenieObject::SetSelectedObject(ACCWeenieObject::prevSelectedID_1, 0);
005619e9                      int32_t eax_15;
005619e9                      eax_15 = 1;
005619ef                      return 1;
005619c6                  }
005619c6                  
005619fb                  void var_20;
005619fb                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, u"You must select a creature or a …");
00561a0e                  ClientSystem::AddTextToScroll(((char*)this - 8), &var_20, 0x1a, 1, 0);
00561a17                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
00561a1e                  int32_t eax_16;
00561a1e                  eax_16 = 1;
00561a24                  return 1;
00561997                  break;
00561997              }
00561a27              case 0x16:
00561a27              {
00561a27                  uint32_t ACCWeenieObject::selectedID_2 = ACCWeenieObject::selectedID;
00561a27                  
00561a2f                  if (ACCWeenieObject::selectedID_2 == 0)
00561a2f                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
00561a2f                  }
00561a2f                  
00561a36                  class ACCWeenieObject* eax_17 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_2);
00561a36                  
00561a40                  if ((eax_17 != 0 && ACCWeenieObject::IsOwnedByPlayer(eax_17) != 0))
00561a40                  {
00561a52                      ItemHolder::AttemptPlaceIn3D(ACCWeenieObject::selectedID_2, 0, 1);
00561a5c                      int32_t eax_19;
00561a5c                      eax_19 = 1;
00561a62                      return 1;
00561a40                  }
00561a40                  
00561a6e                  void var_1c;
00561a6e                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1c, u"You must pick that up first");
00561a81                  ClientSystem::AddTextToScroll(((char*)this - 8), &var_1c, 0x1a, 1, 0);
00561a8a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
00561a91                  int32_t eax_20;
00561a91                  eax_20 = 1;
00561a97                  return 1;
00561a27                  break;
00561a27              }
00561f79              case 0x17:
00561f79              {
00561f79                  uint8_t eax_50 = PlayerModule::AutoRepeatAttack(&this->m_pCharGenState);
00561f7e                  uint8_t temp1 = eax_50;
00561f7e                  eax_50 = -(eax_50);
00561f87                  PlayerModule::SetAutoRepeatAttack(&this->m_pCharGenState, ((eax_50 - eax_50) + 1));
00561f8e                  int32_t eax_51;
00561f8e                  eax_51 = 1;
00561f94                  return 1;
00561f79                  break;
00561f79              }
00561f9c              case 0x18:
00561f9c              {
00561f9c                  uint8_t eax_52 = PlayerModule::IgnoreAllegianceRequests(&this->m_pCharGenState);
00561fa1                  uint8_t temp2 = eax_52;
00561fa1                  eax_52 = -(eax_52);
00561faa                  PlayerModule::SetIgnoreAllegianceRequests(&this->m_pCharGenState, ((eax_52 - eax_52) + 1));
00561fb1                  int32_t eax_53;
00561fb1                  eax_53 = 1;
00561fb7                  return 1;
00561f9c                  break;
00561f9c              }
00561fbf              case 0x19:
00561fbf              {
00561fbf                  uint8_t eax_54 = PlayerModule::IgnoreFellowshipRequests(&this->m_pCharGenState);
00561fc4                  uint8_t temp3 = eax_54;
00561fc4                  eax_54 = -(eax_54);
00561fcd                  PlayerModule::SetIgnoreFellowshipRequests(&this->m_pCharGenState, ((eax_54 - eax_54) + 1));
00561fd4                  int32_t eax_55;
00561fd4                  eax_55 = 1;
00561fda                  return 1;
00561fbf                  break;
00561fbf              }
00561fe2              case 0x1a:
00561fe2              {
00561fe2                  uint8_t eax_56 = PlayerModule::IgnoreTradeRequests(&this->m_pCharGenState);
00561fe7                  uint8_t temp4 = eax_56;
00561fe7                  eax_56 = -(eax_56);
00561ff0                  PlayerModule::SetIgnoreTradeRequests(&this->m_pCharGenState, ((eax_56 - eax_56) + 1));
00561ff7                  int32_t eax_57;
00561ff7                  eax_57 = 1;
00561ffd                  return 1;
00561fe2                  break;
00561fe2              }
00562005              case 0x1b:
00562005              {
00562005                  uint8_t eax_58 = PlayerModule::DisableMostWeatherEffects(&this->m_pCharGenState);
0056200a                  uint8_t temp5 = eax_58;
0056200a                  eax_58 = -(eax_58);
00562013                  PlayerModule::SetDisableMostWeatherEffects(&this->m_pCharGenState, ((eax_58 - eax_58) + 1));
0056201a                  int32_t eax_59;
0056201a                  eax_59 = 1;
00562020                  return 1;
00562005                  break;
00562005              }
00562028              case 0x1c:
00562028              {
00562028                  uint8_t eax_60 = PlayerModule::PersistentAtDay(&this->m_pCharGenState);
0056202d                  uint8_t temp6 = eax_60;
0056202d                  eax_60 = -(eax_60);
00562036                  PlayerModule::SetPersistentAtDay(&this->m_pCharGenState, ((eax_60 - eax_60) + 1));
0056203d                  int32_t eax_61;
0056203d                  eax_61 = 1;
00562043                  return 1;
00562028                  break;
00562028              }
0056204b              case 0x1d:
0056204b              {
0056204b                  uint8_t eax_62 = PlayerModule::AllowGive(&this->m_pCharGenState);
00562050                  uint8_t temp7 = eax_62;
00562050                  eax_62 = -(eax_62);
00562059                  PlayerModule::SetAllowGive(&this->m_pCharGenState, ((eax_62 - eax_62) + 1));
00562060                  int32_t eax_63;
00562060                  eax_63 = 1;
00562066                  return 1;
0056204b                  break;
0056204b              }
0056206e              case 0x1e:
0056206e              {
0056206e                  uint8_t eax_64 = PlayerModule::ViewCombatTarget(&this->m_pCharGenState);
00562073                  uint8_t temp8 = eax_64;
00562073                  eax_64 = -(eax_64);
0056207c                  PlayerModule::SetViewCombatTarget(&this->m_pCharGenState, ((eax_64 - eax_64) + 1));
00562083                  int32_t eax_65;
00562083                  eax_65 = 1;
00562089                  return 1;
0056206e                  break;
0056206e              }
00562091              case 0x1f:
00562091              {
00562091                  uint8_t eax_66 = PlayerModule::ShowTooltips(&this->m_pCharGenState);
00562096                  uint8_t temp9 = eax_66;
00562096                  eax_66 = -(eax_66);
0056209f                  PlayerModule::SetShowTooltips(&this->m_pCharGenState, ((eax_66 - eax_66) + 1));
005620a6                  int32_t eax_67;
005620a6                  eax_67 = 1;
005620ac                  return 1;
00562091                  break;
00562091              }
005620b4              case 0x20:
005620b4              {
005620b4                  uint8_t eax_68 = PlayerModule::UseDeception(&this->m_pCharGenState);
005620b9                  uint8_t temp10 = eax_68;
005620b9                  eax_68 = -(eax_68);
005620c2                  PlayerModule::SetUseDeception(&this->m_pCharGenState, ((eax_68 - eax_68) + 1));
005620c9                  int32_t eax_69;
005620c9                  eax_69 = 1;
005620cf                  return 1;
005620b4                  break;
005620b4              }
005620d7              case 0x21:
005620d7              {
005620d7                  uint8_t eax_70 = PlayerModule::ToggleRun(&this->m_pCharGenState);
005620dc                  uint8_t temp11 = eax_70;
005620dc                  eax_70 = -(eax_70);
005620e5                  PlayerModule::SetToggleRun(&this->m_pCharGenState, ((eax_70 - eax_70) + 1));
005620ec                  int32_t eax_71;
005620ec                  eax_71 = 1;
005620f2                  return 1;
005620d7                  break;
005620d7              }
005620fa              case 0x22:
005620fa              {
005620fa                  uint8_t eax_72 = PlayerModule::StayInChatMode(&this->m_pCharGenState);
005620ff                  uint8_t temp12 = eax_72;
005620ff                  eax_72 = -(eax_72);
00562108                  PlayerModule::SetStayInChatMode(&this->m_pCharGenState, ((eax_72 - eax_72) + 1));
0056210f                  int32_t eax_73;
0056210f                  eax_73 = 1;
00562115                  return 1;
005620fa                  break;
005620fa              }
0056211d              case 0x23:
0056211d              {
0056211d                  uint8_t eax_74 = PlayerModule::AdvancedCombatUI(&this->m_pCharGenState);
00562122                  uint8_t temp13 = eax_74;
00562122                  eax_74 = -(eax_74);
0056212b                  PlayerModule::SetAdvancedCombatUI(&this->m_pCharGenState, ((eax_74 - eax_74) + 1));
00562132                  int32_t eax_75;
00562132                  eax_75 = 1;
00562138                  return 1;
0056211d                  break;
0056211d              }
00562140              case 0x24:
00562140              {
00562140                  uint8_t eax_76 = PlayerModule::AutoTarget(&this->m_pCharGenState);
00562145                  uint8_t temp14 = eax_76;
00562145                  eax_76 = -(eax_76);
0056214e                  PlayerModule::SetAutoTarget(&this->m_pCharGenState, ((eax_76 - eax_76) + 1));
00562155                  int32_t eax_77;
00562155                  eax_77 = 1;
0056215b                  return 1;
00562140                  break;
00562140              }
00562163              case 0x25:
00562163              {
00562163                  uint8_t eax_78 = PlayerModule::VividTargetingIndicator(&this->m_pCharGenState);
00562168                  uint8_t temp15 = eax_78;
00562168                  eax_78 = -(eax_78);
00562171                  PlayerModule::SetVividTargetingIndicator(&this->m_pCharGenState, ((eax_78 - eax_78) + 1));
00562178                  int32_t eax_79;
00562178                  eax_79 = 1;
0056217e                  return 1;
00562163                  break;
00562163              }
00562186              case 0x26:
00562186              {
00562186                  uint8_t eax_80 = PlayerModule::FellowshipShareXP(&this->m_pCharGenState);
0056218b                  uint8_t temp16 = eax_80;
0056218b                  eax_80 = -(eax_80);
00562194                  PlayerModule::SetFellowshipShareXP(&this->m_pCharGenState, ((eax_80 - eax_80) + 1));
0056219b                  int32_t eax_81;
0056219b                  eax_81 = 1;
005621a1                  return 1;
00562186                  break;
00562186              }
005621a9              case 0x27:
005621a9              {
005621a9                  uint8_t eax_82 = PlayerModule::AcceptLootPermits(&this->m_pCharGenState);
005621ae                  uint8_t temp17 = eax_82;
005621ae                  eax_82 = -(eax_82);
005621b7                  PlayerModule::SetAcceptLootPermits(&this->m_pCharGenState, ((eax_82 - eax_82) + 1));
005621be                  int32_t eax_83;
005621be                  eax_83 = 1;
005621c4                  return 1;
005621a9                  break;
005621a9              }
005621cc              case 0x28:
005621cc              {
005621cc                  uint8_t eax_84 = PlayerModule::FellowshipShareLoot(&this->m_pCharGenState);
005621d1                  uint8_t temp18 = eax_84;
005621d1                  eax_84 = -(eax_84);
005621da                  PlayerModule::SetFellowshipShareLoot(&this->m_pCharGenState, ((eax_84 - eax_84) + 1));
005621e1                  int32_t eax_85;
005621e1                  eax_85 = 1;
005621e7                  return 1;
005621cc                  break;
005621cc              }
005621ef              case 0x29:
005621ef              {
005621ef                  uint8_t eax_86 = PlayerModule::FellowshipAutoAcceptRequests(&this->m_pCharGenState);
005621f4                  uint8_t temp19 = eax_86;
005621f4                  eax_86 = -(eax_86);
005621fd                  PlayerModule::SetFellowshipAutoAcceptRequests(&this->m_pCharGenState, ((eax_86 - eax_86) + 1));
00562204                  int32_t eax_87;
00562204                  eax_87 = 1;
0056220a                  return 1;
005621ef                  break;
005621ef              }
00562235              case 0x2a:
00562235              {
00562235                  uint8_t eax_90 = PlayerModule::CoordinatesOnRadar(&this->m_pCharGenState);
0056223a                  uint8_t temp21 = eax_90;
0056223a                  eax_90 = -(eax_90);
00562243                  PlayerModule::SetCoordinatesOnRadar(&this->m_pCharGenState, ((eax_90 - eax_90) + 1));
0056224a                  int32_t eax_91;
0056224a                  eax_91 = 1;
00562250                  return 1;
00562235                  break;
00562235              }
00562258              case 0x2b:
00562258              {
00562258                  uint8_t eax_92 = PlayerModule::SpellDuration(&this->m_pCharGenState);
0056225d                  uint8_t temp22 = eax_92;
0056225d                  eax_92 = -(eax_92);
00562266                  PlayerModule::SetSpellDuration(&this->m_pCharGenState, ((eax_92 - eax_92) + 1));
0056226d                  int32_t eax_93;
0056226d                  eax_93 = 1;
00562273                  return 1;
00562258                  break;
00562258              }
0056227b              case 0x2c:
0056227b              {
0056227b                  uint8_t eax_94 = PlayerModule::DisableHouseRestrictionEffects(&this->m_pCharGenState);
00562280                  uint8_t temp23 = eax_94;
00562280                  eax_94 = -(eax_94);
00562289                  PlayerModule::SetDisableHouseRestrictionEffects(&this->m_pCharGenState, ((eax_94 - eax_94) + 1));
00562290                  int32_t eax_95;
00562290                  eax_95 = 1;
00562296                  return 1;
0056227b                  break;
0056227b              }
0056229e              case 0x2d:
0056229e              {
0056229e                  uint8_t eax_96 = PlayerModule::DragItemOnPlayerOpensSecureTrade(&this->m_pCharGenState);
005622a3                  uint8_t temp24 = eax_96;
005622a3                  eax_96 = -(eax_96);
005622ac                  PlayerModule::SetDragItemOnPlayerOpensSecureTrade(&this->m_pCharGenState, ((eax_96 - eax_96) + 1));
005622b3                  int32_t eax_97;
005622b3                  eax_97 = 1;
005622b9                  return 1;
0056229e                  break;
0056229e              }
005622c1              case 0x2e:
005622c1              {
005622c1                  uint8_t eax_98 = PlayerModule::DisplayAllegianceLogonNotifications(&this->m_pCharGenState);
005622c6                  uint8_t temp25 = eax_98;
005622c6                  eax_98 = -(eax_98);
005622cf                  PlayerModule::SetDisplayAllegianceLogonNotifications(&this->m_pCharGenState, ((eax_98 - eax_98) + 1));
005622d6                  int32_t eax_99;
005622d6                  eax_99 = 1;
005622dc                  return 1;
005622c1                  break;
005622c1              }
005622e4              case 0x2f:
005622e4              {
005622e4                  uint8_t eax_100 = PlayerModule::UseChargeAttack(&this->m_pCharGenState);
005622e9                  uint8_t temp26 = eax_100;
005622e9                  eax_100 = -(eax_100);
005622f2                  PlayerModule::SetUseChargeAttack(&this->m_pCharGenState, ((eax_100 - eax_100) + 1));
005622f9                  int32_t eax_101;
005622f9                  eax_101 = 1;
005622ff                  return 1;
005622e4                  break;
005622e4              }
0056234d              case 0x30:
0056234d              {
0056234d                  uint8_t eax_106 = PlayerModule::UseCraftSuccessDialog(&this->m_pCharGenState);
00562352                  uint8_t temp29 = eax_106;
00562352                  eax_106 = -(eax_106);
0056235b                  PlayerModule::SetUseCraftSuccessDialog(&this->m_pCharGenState, ((eax_106 - eax_106) + 1));
00562362                  int32_t eax_107;
00562362                  eax_107 = 1;
00562368                  return 1;
0056234d                  break;
0056234d              }
00562393              case 0x31:
00562393              {
00562393                  uint8_t eax_110 = PlayerModule::HearAllegianceChat(&this->m_pCharGenState);
00562398                  uint8_t temp31 = eax_110;
00562398                  eax_110 = -(eax_110);
005623a1                  PlayerModule::SetHearAllegianceChat(&this->m_pCharGenState, ((eax_110 - eax_110) + 1));
005623a8                  int32_t eax_111;
005623a8                  eax_111 = 1;
005623ae                  return 1;
00562393                  break;
00562393              }
00562465              case 0x32:
00562465              {
00562465                  uint8_t eax_122 = PlayerModule::DisplayDateOfBirth(&this->m_pCharGenState);
0056246a                  uint8_t temp37 = eax_122;
0056246a                  eax_122 = -(eax_122);
00562473                  PlayerModule::SetDisplayDateOfBirth(&this->m_pCharGenState, ((eax_122 - eax_122) + 1));
0056247a                  int32_t eax_123;
0056247a                  eax_123 = 1;
00562480                  return 1;
00562465                  break;
00562465              }
00562488              case 0x33:
00562488              {
00562488                  uint8_t eax_124 = PlayerModule::DisplayAge(&this->m_pCharGenState);
0056248d                  uint8_t temp38 = eax_124;
0056248d                  eax_124 = -(eax_124);
00562496                  PlayerModule::SetDisplayAge(&this->m_pCharGenState, ((eax_124 - eax_124) + 1));
0056249d                  int32_t eax_125;
0056249d                  eax_125 = 1;
005624a3                  return 1;
00562488                  break;
00562488              }
005624ab              case 0x34:
005624ab              {
005624ab                  uint8_t eax_126 = PlayerModule::DisplayChessRank(&this->m_pCharGenState);
005624b0                  uint8_t temp39 = eax_126;
005624b0                  eax_126 = -(eax_126);
005624b9                  PlayerModule::SetDisplayChessRank(&this->m_pCharGenState, ((eax_126 - eax_126) + 1));
005624c0                  int32_t eax_127;
005624c0                  eax_127 = 1;
005624c6                  return 1;
005624ab                  break;
005624ab              }
005624ce              case 0x35:
005624ce              {
005624ce                  uint8_t eax_128 = PlayerModule::DisplayFishingSkill(&this->m_pCharGenState);
005624d3                  uint8_t temp40 = eax_128;
005624d3                  eax_128 = -(eax_128);
005624dc                  PlayerModule::SetDisplayFishingSkill(&this->m_pCharGenState, ((eax_128 - eax_128) + 1));
005624e3                  int32_t eax_129;
005624e3                  eax_129 = 1;
005624e9                  return 1;
005624ce                  break;
005624ce              }
005624f1              case 0x36:
005624f1              {
005624f1                  uint8_t eax_130 = PlayerModule::DisplayNumberDeaths(&this->m_pCharGenState);
005624f6                  uint8_t temp41 = eax_130;
005624f6                  eax_130 = -(eax_130);
005624ff                  PlayerModule::SetDisplayNumberDeaths(&this->m_pCharGenState, ((eax_130 - eax_130) + 1));
00562506                  int32_t eax_131;
00562506                  eax_131 = 1;
0056250c                  return 1;
005624f1                  break;
005624f1              }
00562537              case 0x37:
00562537              {
00562537                  uint8_t eax_134 = PlayerModule::DisplayTimeStamps(&this->m_pCharGenState);
0056253c                  uint8_t temp43 = eax_134;
0056253c                  eax_134 = -(eax_134);
00562545                  PlayerModule::SetDisplayTimeStamps(&this->m_pCharGenState, ((eax_134 - eax_134) + 1));
0056254c                  int32_t eax_135;
0056254c                  eax_135 = 1;
00562552                  return 1;
00562537                  break;
00562537              }
0056257d              case 0x38:
0056257d              {
0056257d                  uint8_t eax_138 = PlayerModule::SalvageMultiple(&this->m_pCharGenState);
00562582                  uint8_t temp45 = eax_138;
00562582                  eax_138 = -(eax_138);
0056258b                  PlayerModule::SetSalvageMultiple(&this->m_pCharGenState, ((eax_138 - eax_138) + 1));
00562592                  int32_t eax_139;
00562592                  eax_139 = 1;
00562598                  return 1;
0056257d                  break;
0056257d              }
005623b6              case 0x39:
005623b6              {
005623b6                  uint8_t eax_112 = PlayerModule::HearGeneralChat(&this->m_pCharGenState);
005623bb                  uint8_t temp32 = eax_112;
005623bb                  eax_112 = -(eax_112);
005623c4                  PlayerModule::SetHearGeneralChat(&this->m_pCharGenState, ((eax_112 - eax_112) + 1));
005623cb                  int32_t eax_113;
005623cb                  eax_113 = 1;
005623d1                  return 1;
005623b6                  break;
005623b6              }
005623d9              case 0x3a:
005623d9              {
005623d9                  uint8_t eax_114 = PlayerModule::HearTradeChat(&this->m_pCharGenState);
005623de                  uint8_t temp33 = eax_114;
005623de                  eax_114 = -(eax_114);
005623e7                  PlayerModule::SetHearTradeChat(&this->m_pCharGenState, ((eax_114 - eax_114) + 1));
005623ee                  int32_t eax_115;
005623ee                  eax_115 = 1;
005623f4                  return 1;
005623d9                  break;
005623d9              }
005623fc              case 0x3b:
005623fc              {
005623fc                  uint8_t eax_116 = PlayerModule::HearLFGChat(&this->m_pCharGenState);
00562401                  uint8_t temp34 = eax_116;
00562401                  eax_116 = -(eax_116);
0056240a                  PlayerModule::SetHearLFGChat(&this->m_pCharGenState, ((eax_116 - eax_116) + 1));
00562411                  int32_t eax_117;
00562411                  eax_117 = 1;
00562417                  return 1;
005623fc                  break;
005623fc              }
0056241f              case 0x3c:
0056241f              {
0056241f                  uint8_t eax_118 = PlayerModule::HearRoleplayChat(&this->m_pCharGenState);
00562424                  uint8_t temp35 = eax_118;
00562424                  eax_118 = -(eax_118);
0056242d                  PlayerModule::SetHearRoleplayChat(&this->m_pCharGenState, ((eax_118 - eax_118) + 1));
00562434                  int32_t eax_119;
00562434                  eax_119 = 1;
0056243a                  return 1;
0056241f                  break;
0056241f              }
00562514              case 0x3d:
00562514              {
00562514                  uint8_t eax_132 = PlayerModule::DisplayNumberCharacterTitles(&this->m_pCharGenState);
00562519                  uint8_t temp42 = eax_132;
00562519                  eax_132 = -(eax_132);
00562522                  PlayerModule::SetDisplayNumberCharacterTitles(&this->m_pCharGenState, ((eax_132 - eax_132) + 1));
00562529                  int32_t eax_133;
00562529                  eax_133 = 1;
0056252f                  return 1;
00562514                  break;
00562514              }
00561974              case 0x3e:
00561974              {
00561974                  eax_1 = ACCWeenieObject::selectedID;
00561974                  
0056197b                  if (eax_1 == 0)
0056197b                  {
00561da0                      eax_1 = 1;
00561da6                      return 1;
0056197b                  }
0056197b                  
00561987                  CPlayerSystem::PlaceInBackpack(((char*)this - 8), eax_1, 1);
0056198e                  int32_t eax_12;
0056198e                  eax_12 = 1;
00561994                  return 1;
00561974                  break;
00561974              }
005625a0              case 0x3f:
005625a0              {
005625a0                  uint8_t eax_140 = PlayerModule::MainPackPreferred(&this->m_pCharGenState);
005625a5                  uint8_t temp46 = eax_140;
005625a5                  eax_140 = -(eax_140);
005625ae                  PlayerModule::SetMainPackPreferred(&this->m_pCharGenState, ((eax_140 - eax_140) + 1));
005625b5                  int32_t eax_141;
005625b5                  eax_141 = 1;
005625bb                  return 1;
005625a0                  break;
005625a0              }
00562307              case 0x40:
00562307              {
00562307                  uint8_t eax_102 = PlayerModule::LeadMissileTargets(&this->m_pCharGenState);
0056230c                  uint8_t temp27 = eax_102;
0056230c                  eax_102 = -(eax_102);
00562315                  PlayerModule::SetLeadMissileTargets(&this->m_pCharGenState, ((eax_102 - eax_102) + 1));
0056231c                  int32_t eax_103;
0056231c                  eax_103 = 1;
00562322                  return 1;
00562307                  break;
00562307              }
0056232a              case 0x41:
0056232a              {
0056232a                  uint8_t eax_104 = PlayerModule::UseFastMissiles(&this->m_pCharGenState);
0056232f                  uint8_t temp28 = eax_104;
0056232f                  eax_104 = -(eax_104);
00562338                  PlayerModule::SetUseFastMissiles(&this->m_pCharGenState, ((eax_104 - eax_104) + 1));
0056233f                  int32_t eax_105;
0056233f                  eax_105 = 1;
00562345                  return 1;
0056232a                  break;
0056232a              }
0056255a              case 0x42:
0056255a              {
0056255a                  uint8_t eax_136 = PlayerModule::FilterLanguage(&this->m_pCharGenState);
0056255f                  uint8_t temp44 = eax_136;
0056255f                  eax_136 = -(eax_136);
00562568                  PlayerModule::SetFilterLanguage(&this->m_pCharGenState, ((eax_136 - eax_136) + 1));
0056256f                  int32_t eax_137;
0056256f                  eax_137 = 1;
00562575                  return 1;
0056255a                  break;
0056255a              }
00561e43              case 0x43:
00561e43              {
00561e43                  CPlayerSystem::SelectNext(((char*)this - 8), 1, 1, SELECTION_TYPE_UNOPENED_CORPSE, 0);
00561e4a                  int32_t eax_40;
00561e4a                  eax_40 = 1;
00561e50                  return 1;
00561e43                  break;
00561e43              }
00561e53              case 0x44:
00561e53              {
00561e53                  uint32_t ACCWeenieObject::selectedID_11 = ACCWeenieObject::selectedID;
00561e66                  CPlayerSystem::SelectNext(((char*)this - 8), 0, 0, SELECTION_TYPE_UNOPENED_CORPSE, 0);
00561e66                  
00561e71                  if (ACCWeenieObject::selectedID_11 == ACCWeenieObject::selectedID)
00561e7d                      CPlayerSystem::SelectNext(nullptr, 1, 1, SELECTION_TYPE_UNOPENED_CORPSE, 0);
00561e7d                  
00561e84                  int32_t eax_41;
00561e84                  eax_41 = 1;
00561e8a                  return 1;
00561e53                  break;
00561e53              }
00562370              case 0x45:
00562370              {
00562370                  uint8_t eax_108 = PlayerModule::ConfirmVolatileRareUse(&this->m_pCharGenState);
00562375                  uint8_t temp30 = eax_108;
00562375                  eax_108 = -(eax_108);
0056237e                  PlayerModule::SetConfirmVolatileRareUse(&this->m_pCharGenState, ((eax_108 - eax_108) + 1));
00562385                  int32_t eax_109;
00562385                  eax_109 = 1;
0056238b                  return 1;
00562370                  break;
00562370              }
00562442              case 0x46:
00562442              {
00562442                  uint8_t eax_120 = PlayerModule::HearSocietyChat(&this->m_pCharGenState);
00562447                  uint8_t temp36 = eax_120;
00562447                  eax_120 = -(eax_120);
00562450                  PlayerModule::SetHearSocietyChat(&this->m_pCharGenState, ((eax_120 - eax_120) + 1));
00562457                  int32_t eax_121;
00562457                  eax_121 = 1;
0056245d                  return 1;
00562442                  break;
00562442              }
005625c3              case 0x47:
005625c3              {
005625c3                  uint8_t eax_142 = PlayerModule::ShowHelm(&this->m_pCharGenState);
005625c8                  uint8_t temp47 = eax_142;
005625c8                  eax_142 = -(eax_142);
005625d1                  PlayerModule::SetShowHelm(&this->m_pCharGenState, ((eax_142 - eax_142) + 1));
005625d8                  int32_t eax_143;
005625d8                  eax_143 = 1;
005625de                  return 1;
005625c3                  break;
005625c3              }
005625e6              case 0x48:
005625e6              {
005625e6                  uint8_t eax_144 = PlayerModule::DisableDistanceFog(&this->m_pCharGenState);
005625eb                  uint8_t temp48 = eax_144;
005625eb                  eax_144 = -(eax_144);
005625f4                  PlayerModule::SetDisableDistanceFog(&this->m_pCharGenState, ((eax_144 - eax_144) + 1));
005625fb                  int32_t eax_145;
005625fb                  eax_145 = 1;
00562601                  return 1;
005625e6                  break;
005625e6              }
00562609              case 0x49:
00562609              {
00562609                  uint8_t eax_146 = PlayerModule::UseMouseTurning(&this->m_pCharGenState);
0056260e                  uint8_t temp49 = eax_146;
0056260e                  eax_146 = -(eax_146);
00562617                  PlayerModule::SetUseMouseTurning(&this->m_pCharGenState, ((eax_146 - eax_146) + 1));
0056261e                  int32_t eax_147;
0056261e                  eax_147 = 1;
00562624                  return 1;
00562609                  break;
00562609              }
00562212              case 0x4a:
00562212              {
00562212                  uint8_t eax_88 = PlayerModule::SideBySideVitals(&this->m_pCharGenState);
00562217                  uint8_t temp20 = eax_88;
00562217                  eax_88 = -(eax_88);
00562220                  PlayerModule::SetSideBySideVitals(&this->m_pCharGenState, ((eax_88 - eax_88) + 1));
00562227                  int32_t eax_89;
00562227                  eax_89 = 1;
0056222d                  return 1;
00562212                  break;
00562212              }
005618b5          }
00561ce1      eax_1 = 0;
00561ce7      return 0;
00561890  }

00562627                       90                                                                                 .
00562628  uint32_t jump_table_562628[0x4c] = 
00562628  {
00562628      [0x00] =  0x005618bc
0056262c      [0x01] =  0x00561951
00562630      [0x02] =  0x00561a9a
00562634      [0x03] =  0x00561ab4
00562638      [0x04] =  0x00561ad7
0056263c      [0x05] =  0x00561af2
00562640      [0x06] =  0x00561b30
00562644      [0x07] =  0x00561b6e
00562648      [0x08] =  0x00561b89
0056264c      [0x09] =  0x00561bc7
00562650      [0x0a] =  0x00561c05
00562654      [0x0b] =  0x00561c20
00562658      [0x0c] =  0x00561c5e
0056265c      [0x0d] =  0x00561c9c
00562660      [0x0e] =  0x00561da9
00562664      [0x0f] =  0x00561dc4
00562668      [0x10] =  0x00561dfe
0056266c      [0x11] =  0x00561f46
00562670      [0x12] =  0x00561f5d
00562674      [0x13] =  0x00561e8d
00562678      [0x14] =  0x00561edc
0056267c      [0x15] =  0x00561997
00562680      [0x16] =  0x00561a27
00562684      [0x17] =  0x00561f74
00562688      [0x18] =  0x00561f97
0056268c      [0x19] =  0x00561fba
00562690      [0x1a] =  0x00561fdd
00562694      [0x1b] =  0x00562000
00562698      [0x1c] =  0x00562023
0056269c      [0x1d] =  0x00562046
005626a0      [0x1e] =  0x00562069
005626a4      [0x1f] =  0x0056208c
005626a8      [0x20] =  0x005620af
005626ac      [0x21] =  0x005620d2
005626b0      [0x22] =  0x005620f5
005626b4      [0x23] =  0x00562118
005626b8      [0x24] =  0x0056213b
005626bc      [0x25] =  0x0056215e
005626c0      [0x26] =  0x00562181
005626c4      [0x27] =  0x005621a4
005626c8      [0x28] =  0x005621c7
005626cc      [0x29] =  0x005621ea
005626d0      [0x2a] =  0x00562230
005626d4      [0x2b] =  0x00562253
005626d8      [0x2c] =  0x00562276
005626dc      [0x2d] =  0x00562299
005626e0      [0x2e] =  0x005622bc
005626e4      [0x2f] =  0x005622df
005626e8      [0x30] =  0x00562348
005626ec      [0x31] =  0x0056238e
005626f0      [0x32] =  0x00562460
005626f4      [0x33] =  0x00562483
005626f8      [0x34] =  0x005624a6
005626fc      [0x35] =  0x005624c9
00562700      [0x36] =  0x005624ec
00562704      [0x37] =  0x00562532
00562708      [0x38] =  0x00562578
0056270c      [0x39] =  0x005623b1
00562710      [0x3a] =  0x005623d4
00562714      [0x3b] =  0x005623f7
00562718      [0x3c] =  0x0056241a
0056271c      [0x3d] =  0x0056250f
00562720      [0x3e] =  0x00561974
00562724      [0x3f] =  0x0056259b
00562728      [0x40] =  0x00562302
0056272c      [0x41] =  0x00562325
00562730      [0x42] =  0x00562555
00562734      [0x43] =  0x00561e38
00562738      [0x44] =  0x00561e53
0056273c      [0x45] =  0x0056236b
00562740      [0x46] =  0x0056243d
00562744      [0x47] =  0x005625be
00562748      [0x48] =  0x005625e1
0056274c      [0x49] =  0x00562604
00562750      [0x4a] =  0x0056220d
00562754      [0x4b] =  0x00561cdf
00562758  }
00562758  uint8_t lookup_table_562758[0x115] = 
00562758  {
00562758      [0x000] =  0x00
00562759      [0x001] =  0x4b
0056275a      [0x002] =  0x01
0056275b      [0x003] =  0x02
0056275c      [0x004] =  0x03
0056275d      [0x005] =  0x04
0056275e      [0x006] =  0x05
0056275f      [0x007] =  0x06
00562760      [0x008] =  0x07
00562761      [0x009] =  0x08
00562762      [0x00a] =  0x09
00562763      [0x00b] =  0x0a
00562764      [0x00c] =  0x0b
00562765      [0x00d] =  0x0c
00562766      [0x00e] =  0x0d
00562767      [0x00f] =  0x0e
00562768      [0x010] =  0x0f
00562769      [0x011] =  0x10
0056276a      [0x012] =  0x11
0056276b      [0x013] =  0x12
0056276c      [0x014] =  0x13
0056276d      [0x015] =  0x14
0056276e      [0x016] =  0x15
0056276f      [0x017] =  0x16
00562770      [0x018] =  0x4b
00562771      [0x019] =  0x4b
00562772      [0x01a] =  0x4b
00562773      [0x01b] =  0x4b
00562774      [0x01c] =  0x4b
00562775      [0x01d] =  0x4b
00562776      [0x01e] =  0x4b
00562777      [0x01f] =  0x4b
00562778      [0x020] =  0x4b
00562779      [0x021] =  0x4b
0056277a      [0x022] =  0x4b
0056277b      [0x023] =  0x4b
0056277c      [0x024] =  0x4b
0056277d      [0x025] =  0x4b
0056277e      [0x026] =  0x4b
0056277f      [0x027] =  0x4b
00562780      [0x028] =  0x4b
00562781      [0x029] =  0x4b
00562782      [0x02a] =  0x4b
00562783      [0x02b] =  0x4b
00562784      [0x02c] =  0x4b
00562785      [0x02d] =  0x4b
00562786      [0x02e] =  0x4b
00562787      [0x02f] =  0x4b
00562788      [0x030] =  0x4b
00562789      [0x031] =  0x4b
0056278a      [0x032] =  0x4b
0056278b      [0x033] =  0x4b
0056278c      [0x034] =  0x4b
0056278d      [0x035] =  0x4b
0056278e      [0x036] =  0x4b
0056278f      [0x037] =  0x4b
00562790      [0x038] =  0x4b
00562791      [0x039] =  0x4b
00562792      [0x03a] =  0x4b
00562793      [0x03b] =  0x4b
00562794      [0x03c] =  0x4b
00562795      [0x03d] =  0x4b
00562796      [0x03e] =  0x4b
00562797      [0x03f] =  0x4b
00562798      [0x040] =  0x4b
00562799      [0x041] =  0x4b
0056279a      [0x042] =  0x4b
0056279b      [0x043] =  0x4b
0056279c      [0x044] =  0x4b
0056279d      [0x045] =  0x4b
0056279e      [0x046] =  0x4b
0056279f      [0x047] =  0x17
005627a0      [0x048] =  0x18
005627a1      [0x049] =  0x19
005627a2      [0x04a] =  0x1a
005627a3      [0x04b] =  0x1b
005627a4      [0x04c] =  0x1c
005627a5      [0x04d] =  0x1d
005627a6      [0x04e] =  0x1e
005627a7      [0x04f] =  0x1f
005627a8      [0x050] =  0x20
005627a9      [0x051] =  0x21
005627aa      [0x052] =  0x22
005627ab      [0x053] =  0x23
005627ac      [0x054] =  0x24
005627ad      [0x055] =  0x25
005627ae      [0x056] =  0x26
005627af      [0x057] =  0x27
005627b0      [0x058] =  0x28
005627b1      [0x059] =  0x29
005627b2      [0x05a] =  0x4b
005627b3      [0x05b] =  0x2a
005627b4      [0x05c] =  0x2b
005627b5      [0x05d] =  0x2c
005627b6      [0x05e] =  0x2d
005627b7      [0x05f] =  0x2e
005627b8      [0x060] =  0x2f
005627b9      [0x061] =  0x30
005627ba      [0x062] =  0x31
005627bb      [0x063] =  0x32
005627bc      [0x064] =  0x33
005627bd      [0x065] =  0x34
005627be      [0x066] =  0x35
005627bf      [0x067] =  0x36
005627c0      [0x068] =  0x37
005627c1      [0x069] =  0x38
005627c2      [0x06a] =  0x4b
005627c3      [0x06b] =  0x4b
005627c4      [0x06c] =  0x4b
005627c5      [0x06d] =  0x4b
005627c6      [0x06e] =  0x4b
005627c7      [0x06f] =  0x4b
005627c8      [0x070] =  0x4b
005627c9      [0x071] =  0x4b
005627ca      [0x072] =  0x4b
005627cb      [0x073] =  0x4b
005627cc      [0x074] =  0x4b
005627cd      [0x075] =  0x4b
005627ce      [0x076] =  0x4b
005627cf      [0x077] =  0x4b
005627d0      [0x078] =  0x4b
005627d1      [0x079] =  0x4b
005627d2      [0x07a] =  0x4b
005627d3      [0x07b] =  0x4b
005627d4      [0x07c] =  0x4b
005627d5      [0x07d] =  0x4b
005627d6      [0x07e] =  0x4b
005627d7      [0x07f] =  0x4b
005627d8      [0x080] =  0x4b
005627d9      [0x081] =  0x4b
005627da      [0x082] =  0x4b
005627db      [0x083] =  0x4b
005627dc      [0x084] =  0x4b
005627dd      [0x085] =  0x4b
005627de      [0x086] =  0x4b
005627df      [0x087] =  0x4b
005627e0      [0x088] =  0x4b
005627e1      [0x089] =  0x4b
005627e2      [0x08a] =  0x4b
005627e3      [0x08b] =  0x4b
005627e4      [0x08c] =  0x4b
005627e5      [0x08d] =  0x4b
005627e6      [0x08e] =  0x4b
005627e7      [0x08f] =  0x4b
005627e8      [0x090] =  0x4b
005627e9      [0x091] =  0x4b
005627ea      [0x092] =  0x4b
005627eb      [0x093] =  0x4b
005627ec      [0x094] =  0x4b
005627ed      [0x095] =  0x4b
005627ee      [0x096] =  0x4b
005627ef      [0x097] =  0x4b
005627f0      [0x098] =  0x4b
005627f1      [0x099] =  0x4b
005627f2      [0x09a] =  0x4b
005627f3      [0x09b] =  0x4b
005627f4      [0x09c] =  0x4b
005627f5      [0x09d] =  0x4b
005627f6      [0x09e] =  0x4b
005627f7      [0x09f] =  0x4b
005627f8      [0x0a0] =  0x4b
005627f9      [0x0a1] =  0x4b
005627fa      [0x0a2] =  0x4b
005627fb      [0x0a3] =  0x4b
005627fc      [0x0a4] =  0x4b
005627fd      [0x0a5] =  0x4b
005627fe      [0x0a6] =  0x4b
005627ff      [0x0a7] =  0x4b
00562800      [0x0a8] =  0x4b
00562801      [0x0a9] =  0x4b
00562802      [0x0aa] =  0x4b
00562803      [0x0ab] =  0x4b
00562804      [0x0ac] =  0x4b
00562805      [0x0ad] =  0x4b
00562806      [0x0ae] =  0x4b
00562807      [0x0af] =  0x4b
00562808      [0x0b0] =  0x4b
00562809      [0x0b1] =  0x4b
0056280a      [0x0b2] =  0x4b
0056280b      [0x0b3] =  0x4b
0056280c      [0x0b4] =  0x4b
0056280d      [0x0b5] =  0x4b
0056280e      [0x0b6] =  0x4b
0056280f      [0x0b7] =  0x4b
00562810      [0x0b8] =  0x4b
00562811      [0x0b9] =  0x4b
00562812      [0x0ba] =  0x4b
00562813      [0x0bb] =  0x4b
00562814      [0x0bc] =  0x4b
00562815      [0x0bd] =  0x4b
00562816      [0x0be] =  0x4b
00562817      [0x0bf] =  0x4b
00562818      [0x0c0] =  0x4b
00562819      [0x0c1] =  0x4b
0056281a      [0x0c2] =  0x4b
0056281b      [0x0c3] =  0x4b
0056281c      [0x0c4] =  0x4b
0056281d      [0x0c5] =  0x4b
0056281e      [0x0c6] =  0x4b
0056281f      [0x0c7] =  0x4b
00562820      [0x0c8] =  0x4b
00562821      [0x0c9] =  0x4b
00562822      [0x0ca] =  0x4b
00562823      [0x0cb] =  0x4b
00562824      [0x0cc] =  0x4b
00562825      [0x0cd] =  0x4b
00562826      [0x0ce] =  0x4b
00562827      [0x0cf] =  0x4b
00562828      [0x0d0] =  0x4b
00562829      [0x0d1] =  0x4b
0056282a      [0x0d2] =  0x4b
0056282b      [0x0d3] =  0x4b
0056282c      [0x0d4] =  0x4b
0056282d      [0x0d5] =  0x4b
0056282e      [0x0d6] =  0x4b
0056282f      [0x0d7] =  0x4b
00562830      [0x0d8] =  0x4b
00562831      [0x0d9] =  0x4b
00562832      [0x0da] =  0x4b
00562833      [0x0db] =  0x4b
00562834      [0x0dc] =  0x4b
00562835      [0x0dd] =  0x4b
00562836      [0x0de] =  0x4b
00562837      [0x0df] =  0x4b
00562838      [0x0e0] =  0x4b
00562839      [0x0e1] =  0x4b
0056283a      [0x0e2] =  0x4b
0056283b      [0x0e3] =  0x4b
0056283c      [0x0e4] =  0x39
0056283d      [0x0e5] =  0x3a
0056283e      [0x0e6] =  0x3b
0056283f      [0x0e7] =  0x4b
00562840      [0x0e8] =  0x3c
00562841      [0x0e9] =  0x4b
00562842      [0x0ea] =  0x4b
00562843      [0x0eb] =  0x4b
00562844      [0x0ec] =  0x4b
00562845      [0x0ed] =  0x4b
00562846      [0x0ee] =  0x4b
00562847      [0x0ef] =  0x4b
00562848      [0x0f0] =  0x4b
00562849      [0x0f1] =  0x3d
0056284a      [0x0f2] =  0x3e
0056284b      [0x0f3] =  0x3f
0056284c      [0x0f4] =  0x40
0056284d      [0x0f5] =  0x41
0056284e      [0x0f6] =  0x42
0056284f      [0x0f7] =  0x43
00562850      [0x0f8] =  0x44
00562851      [0x0f9] =  0x45
00562852      [0x0fa] =  0x4b
00562853      [0x0fb] =  0x46
00562854      [0x0fc] =  0x4b
00562855      [0x0fd] =  0x4b
00562856      [0x0fe] =  0x4b
00562857      [0x0ff] =  0x4b
00562858      [0x100] =  0x47
00562859      [0x101] =  0x4b
0056285a      [0x102] =  0x48
0056285b      [0x103] =  0x49
0056285c      [0x104] =  0x4b
0056285d      [0x105] =  0x4b
0056285e      [0x106] =  0x4b
0056285f      [0x107] =  0x4b
00562860      [0x108] =  0x4b
00562861      [0x109] =  0x4b
00562862      [0x10a] =  0x4b
00562863      [0x10b] =  0x4b
00562864      [0x10c] =  0x4b
00562865      [0x10d] =  0x4b
00562866      [0x10e] =  0x4b
00562867      [0x10f] =  0x4b
00562868      [0x110] =  0x4b
00562869      [0x111] =  0x4b
0056286a      [0x112] =  0x4b
0056286b      [0x113] =  0x4b
0056286c      [0x114] =  0x4a
0056286d  }

0056286d                                         90 90 90                                                               ...

00562870  void __fastcall CPlayerSystem::OnEndCharacterSession(class CPlayerSystem* this)

00562870  {
00562871      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00562871      
0056287c      if (ICIDM::s_cidm_1 != 0)
0056287c      {
00562880          struct IInputActionCallback::VTable** eax_1;
00562880          
00562880          if (this == 0)
00562887              eax_1 = nullptr;
00562880          else
00562882              eax_1 = &this->vtable;
00562882          
00562889          ICIDM::s_cidm_1->vtable->UnregisterCallback(eax_1);
00562891          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00562891          
00562898          if (SmartBox::smartbox_1 != 0)
00562898          {
0056289a              class CommandInterpreter* cmdinterp = SmartBox::smartbox_1->cmdinterp;
0056289a              
005628a2              if (cmdinterp != 0)
005628a4                  ICIDM::s_cidm_1->vtable->UnregisterCallback(cmdinterp);
00562898          }
0056287c      }
0056287c      
005628ae      CPlayerSystem::End(this);
005628b7      /* tailcall */
005628b7      return CPlayerSystem::Begin(this);
00562870  }

005628bc                                                                                      90 90 90 90                              ....

005628c0  void __fastcall CPlayerSystem::~CPlayerSystem(class CPlayerSystem* this)

005628c0  {
005628c0      class CPlayerSystem* this_1 = this;
005628d4      *(int32_t*)((char*)this + -8) = 0x7ccca0;
005628c9      this->vtable = 0x7cc9f8;
005628e1      this->vtable = 0x7cc9e8;
005628cc      this->vtable = &CPlayerSystem::`vftable';
005628ed      this->vtable = &CPlayerSystem::`vftable';
005628f4      CPlayerSystem::End(((char*)this - 8));
00562906      int32_t eax_1 = -(((char*)this - 8));
005628f9      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 5, ((eax_1 - eax_1) & &this->vtable));
0056291e      int32_t eax_5 = -(((char*)this - 8));
00562914      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(8, 1, ((eax_5 - eax_5) & &this->vtable));
00562936      int32_t eax_9 = -(((char*)this - 8));
0056292c      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0xe6, ((eax_9 - eax_9) & &this->vtable));
00562947      class GlobalEventHandler* eax_12 = GlobalEventHandler::GetGlobalEventHandler();
00562947      
00562950      if (eax_12 != 0)
00562950      {
00562956          int32_t ecx_5 = -(((char*)this - 8));
00562952          eax_12->vtable->UnRegisterAllNoticeHandlers(((ecx_5 - ecx_5) & ((char*)this - 4)));
00562950      }
00562950      
00562962      int32_t m_fIsThroneOfDestinyExpansion = this->account_.m_fIsThroneOfDestinyExpansion;
00562962      
00562967      if (m_fIsThroneOfDestinyExpansion != 0)
00562967      {
0056296b          ClientCharGenState::~ClientCharGenState(m_fIsThroneOfDestinyExpansion);
00562971          operator delete(m_fIsThroneOfDestinyExpansion);
00562967      }
00562967      
00562979      this->account_.m_fIsThroneOfDestinyExpansion = 0;
00562982      this->m_objectRangeCheckList._tail = &CContractTrackerTable::`vftable';
0056297c      this->m_objectRangeCheckList._num_elements = 0x7a6930;
00562995      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(&this->m_objectRangeCheckList._num_elements);
0056299a      struct PackableHashTable<unsigned long,CContractTracker>::VTable* vtable = this->m_contractTrackerTable._contractTrackerHash.vtable;
0056299a      
0056299f      if (vtable != 0)
0056299f      {
005629a2          operator delete[](vtable);
0056297c          this->m_contractTrackerTable._contractTrackerHash.vtable = 0;
0056299f      }
0056299f      
0056297c      this->m_contractTrackerTable._contractTrackerHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
0056297c      this->m_objectRangeCheckList._num_elements = 0x79285c;
005629bd      this->m_objectRangeCheckList._tail = &PackObj::`vftable';
005629b7      this->pending_components_list.tail_ = &List<class ObjectRangeInfo>::`vftable';
005629cd      List<ObjectRangeInfo>::flush(&this->pending_components_list.tail_);
005629d8      NIList<NetBlob *>::DeleteContents(&this->unblockAttemptNum);
005629e3      CInvSlotModule::~CInvSlotModule(&this->lastFullyMergedSrcID);
005629eb      CPlayerModule::~CPlayerModule(&this->m_pCharGenState);
005629f0      struct Turbine_RefCount::VTable* vtable_1 = this->m_cTurbineRefCount.vtable;
005629f0      
00562a03      if ((InterlockedDecrement(&vtable_1[1]) == 0 && vtable_1 != 0))
00562a0c          *(uint32_t*)vtable_1->__vecDelDtor(1);
00562a0c      
00562a0e      int32_t edi_1 = -(((char*)this - 8));
00562a12      void* edi_3 = ((edi_1 - edi_1) & this);
00562a14      this->vtable = &ReferenceCountTemplate<1048576,2>::`vftable';
00562a1b      *(uint32_t*)edi_3 = 0x794824;
00562a21      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00562a21      
00562a29      if (ICIDM::s_cidm_1 != 0)
00562a2b          ICIDM::s_cidm_1->vtable->UnregisterCallback(edi_3);
00562a2b      
00562a37      if (this != 8)
00562a37      {
005628c6          this->vtable = 0x7bf328;
00562a49          /* tailcall */
00562a49          return NoticeHandler::~NoticeHandler(((char*)this - 4));
00562a37      }
00562a37      
00562a53      *nullptr = 0x7bf328;
00562a5d      /* tailcall */
00562a5d      return NoticeHandler::~NoticeHandler(nullptr);
005628c0  }

00562a62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00562a70  void __stdcall CPlayerSystem::Handle_AccountBooted(class CPlayerSystem* this @ ecx, void* arg2, uint32_t arg3)

00562a70  {
00562a76      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00562a85      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00562a8d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00562a8f      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00562a94      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
00562a9c      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00562ab7      bool cond:0 = AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &arg2, arg3) == 0;
00562ab9      int32_t (* const ebx)() = InterlockedDecrement;
00562abf      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00562abf      
00562ac9      if ((cond:0 || AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_len == 1))
00562b0c          PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_3, u" for Code of Conduct Violations");
00562ac9      else
00562ac9      {
00562ad5          class PStringBase<unsigned short>* eax_4;
00562ad5          eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data);
00562adf          PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_3, eax_4);
00562ae8          void* __offset(AC1Legacy::PSRefBuffer<char>, -0x14) esi_2 = ((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_2 - 0x14);
00562ae8          
00562af7          if ((ebx(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00562aff              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00562ac9      }
00562ac9      
00562b11      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00562b16      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
00562b1e      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00562b24      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_3;
00562b2f      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_4, u"You have been booted from Ashero…");
00562b3b      void var_90;
00562b3b      StringInfo::StringInfo(&var_90);
00562b4b      StringInfo::SetLiteralValue(&var_90, &PStringBase<unsigned short>::s_NullBuffer_4, 1);
00562b50      UIFlow::m_instance->vtable->QueueUIModeWithError(0x10000002, &var_90);
00562b69      StringInfo::~StringInfo(&var_90);
00562b72      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
00562b72      
00562b81      if ((ebx(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00562b89          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00562b89      
00562b8f      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
00562b8f      
00562b9e      if ((ebx(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00562ba6          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00562ba6      
00562bb4      if ((ebx(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
00562bb6          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
00562a70  }

00562bcc                                      90 90 90 90                                                              ....

00562bd0  void __stdcall CPlayerSystem::Handle_AccountBanned(class CPlayerSystem* this @ ecx, void* arg2, uint32_t arg3)

00562bd0  {
00562bd6      void* eax = arg2;
00562bde      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00562be5      int32_t ebp = *(uint32_t*)eax;
00562bf2      arg2 = ((char*)eax + 4);
00562bfd      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_2;
00562c01      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00562c03      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00562c08      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00562c10      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00562c2d      class PStringBase<unsigned short> var_94;
00562c2d      
00562c2d      if (AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &arg2, arg3) != 0)
00562c2d      {
00562c2f          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00562c2f          
00562c37          if (AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_len != 1)
00562c37          {
00562c4d              PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_5, PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data));
00562c56              int32_t* esi_2 = (var_94 - 0x14);
00562c56              
00562c69              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00562c71                  **(uint32_t**)esi_2(1);
00562c71              
00562c73              PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_5;
00562c37          }
00562c2d      }
00562c2d      
00562c77      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00562c7c      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_1;
00562c84      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00562c84      
00562c88      if (ebp > 0)
00562c88      {
00562ca8          int32_t eax_10 = Timer::get_real_time();
00562cad          int32_t ecx_5 = eax_10;
00562cb5          int32_t temp1_1 = (((int64_t)eax_10) % 0x3c);
00562cb5          
00562cb9          if (temp1_1 != 0)
00562cbf              ecx_5 += (0x3c - temp1_1);
00562cbf          
00562cc3          var_94 = (ecx_5 + ebp);
00562cd3          int32_t eax_15 = asctime(localtime(&var_94));
00562cd9          int32_t ecx_7 = eax_15;
00562cde          int32_t esi_3 = (ecx_7 + 1);
00562ce6          char i;
00562ce6          
00562ce6          do
00562ce6          {
00562ce1              i = *(uint8_t*)ecx_7;
00562ce3              ecx_7 += 1;
00562ce6          } while (i != 0);
00562ce6          
00562ceb          *(uint8_t*)(((ecx_7 - esi_3) + eax_15) - 1) = i;
00562cf5          PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_5, WidthConvert, eax_15);
00562cfe          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
00562cff          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_5;
00562d0a          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_6, u"You have been banned until %s%s.…");
00562d19          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_5 = &PStringBase<unsigned short>::s_NullBuffer_5->m_data[-0xa];
00562d19          
00562d2b          if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
00562d33              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00562c88      }
00562c88      else
00562c88      {
00562c8a          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
00562c95          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_6, u"You have been banned from Ashero…");
00562c88      }
00562c88      
00562d39      void var_90;
00562d39      StringInfo::StringInfo(&var_90);
00562d49      StringInfo::SetLiteralValue(&var_90, &PStringBase<unsigned short>::s_NullBuffer_6, 1);
00562d4e      UIFlow::m_instance->vtable->QueueUIModeWithError(0x10000002, &var_90);
00562d67      StringInfo::~StringInfo(&var_90);
00562d70      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_7 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
00562d70      
00562d7f      if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
00562d87          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
00562d87      
00562d89      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00562d89      
00562d99      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
00562d9b          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
00562d9b      
00562db2      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_2 != 0x14))
00562dba          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_2 + -0x14)(1);
00562bd0  }

00562dc9                             90 90 90 90 90 90 90                                                           .......

00562dd0  void __fastcall CPlayerSystem::RequestLogOff(class CPlayerSystem* this)

00562dd0  {
00562dd0      class CPlayerSystem* this_1 = this;
00562de0      class ClientSystem* esi_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, WidthConvert, "Logging off...\n");
00562df2      ClientSystem::AddTextToScroll(esi_1, &this_1, 0, 1, 0);
00562dfb      void* __offset(CPlayerSystem, -0x14) edi_1 = ((char*)this_1 - 0x14);
00562dfb      
00562e0e      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00562e16          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00562e16      
00562e1f      Proto_UI::LogOffCharacter(*(int32_t*)((char*)esi_1 + 0x1e8));
00562e24      uint32_t eax_2 = *(int32_t*)((char*)esi_1 + 0x1e8);
00562e2a      *(int32_t*)((char*)esi_1 + 0x221) = 1;
00562e3e      *(int32_t*)((char*)esi_1 + 0x1f8) = ((double)(((long double)Timer::cur_time) + ((long double)3.0)));
00562e44      class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(eax_2);
00562e44      
00562e4e      if ((eax_3 != 0 && eax_3->vtable->IsPlayerKiller() != 0))
00562e67          *(int32_t*)((char*)esi_1 + 0x1f8) = ((double)(((long double)*(int32_t*)((char*)esi_1 + 0x1f8)) + ((long double)20.0)));
00562e67      
00562e6d      SmartBox::smartbox->cmdinterp->vtable->HandleLogOff();
00562dd0  }

00562e84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00562e90  void __fastcall CPlayerSystem::SendLoginCompleteNotification(class CPlayerSystem* this)

00562e90  {
00562e9b      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(this->playerID);
00562e9b      
00562ea7      if ((eax_1 != 0 && ACCWeenieObject::AllContainedObjectsExist(eax_1) != 0))
00562ea7      {
00562eb4          CM_Character::Event_LoginCompleteNotification();
00562eb4          
00562ec1          if (this->initialLoginComplete == 0)
00562ec1          {
00562ec9              PlayerDesc::PlayerIsPSR(eax_1->m_pQualities);
00562ec9              
00562ed5              if (APIManager::APIIsReady() != 0)
00562ed5              {
00562ed7                  struct IACPlugin* eax_5 = APIManager::GetACPlugin();
00562edc                  eax_5->vtable->OnLoginComplete(eax_5);
00562ee6                  CPlayerSystem::SendQueryPluginData(this, 0);
00562ed5              }
00562ec1          }
00562ec1          
00562eed          this->initialLoginComplete = 1;
00562ef4          CM_UI::SendNotice_SetDisplayInventory(1);
00562f06          UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance, 0xb, 0);
00562f0c          this->sendLoginCompletePending = 0;
00562f14          return;
00562ea7      }
00562ea7      
00562f16      this->sendLoginCompletePending = 1;
00562e90  }

00562f1f                                                                                               90                                 .

00562f20  void __fastcall CPlayerSystem::AttemptSendLoginCompleteNotification(class CPlayerSystem* this)

00562f20  {
00562f2a      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(this->playerID);
00562f2a      
00562f3e      if (((this->player_desc_received != 0 && eax_1 != 0) && ACCWeenieObject::AllContainedObjectsExist(eax_1) != 0))
00562f3e      {
00562f4b          int32_t eax_2;
00562f4b          eax_2 = this->sendLoginCompletePending;
00562f53          this->allContainedObjectsReceived = 1;
00562f53          
00562f5a          if (eax_2 != 0)
00562f5f              /* tailcall */
00562f5f              return CPlayerSystem::SendLoginCompleteNotification(this);
00562f3e      }
00562f20  }

00562f66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00562f70  uint8_t __thiscall CPlayerSystem::UsingItem(class CPlayerSystem* this, uint32_t arg2, int32_t arg3, int32_t arg4)

00562f70  {
00562f73      uint32_t edi = arg2;
00562f77      uint32_t esi = 0;
00562f77      
00562f7d      if (edi == 0)
00562f7d      {
00562f81          int32_t eax;
00562f81          eax = 0;
00562f84          return 0;
00562f7d      }
00562f7d      
00562f89      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(edi);
00562f89      
00562f95      if (eax_1 == 0)
00562f95      {
00562f9a          eax_1 = 0;
00562f9d          return 0;
00562f95      }
00562f95      
00562fa6      if (arg4 == 0)
00562fc0          switch ((((uint32_t)ItemHolder::DetermineUseResult(eax_1)) - 2))
00562fc0          {
00562fd1              case 0:
00562fd1              {
00562fd1                  esi = ((uint32_t)CPlayerSystem::PlaceInBackpack(this, edi, 0));
00562fd1                  break;
00562fd1              }
00562fe8              case 1:
00562fe8              {
00562fe8                  esi = ((uint32_t)CPlayerSystem::AutoWield(this, edi, SLOT_SIDE_RIGHT, 0, 1, 0, 1));
00562fe8                  break;
00562fe8              }
00563010              case 2:
00563010              {
00563010                  esi = ((uint32_t)CPlayerSystem::AutoSort(this, edi, 1, 0));
00563010                  break;
00563010              }
00563022              case 3:
00563022              {
00563022                  esi = ((uint32_t)ClientTradeSystem::AttemptToOpenTradeNegotiations(ClientTradeSystem::GetTradeSystem(), edi));
00563022                  break;
00563022              }
00563028              case 4:
00563028              {
00563028                  CM_Inventory::SendNotice_OpenSalvagePanel(edi);
0056302d                  esi = 1;
00563028                  break;
00563028              }
00563035              case 5:
00563035              {
00563035                  CM_Game::SendNotice_BeginGame(edi);
00563035                  break;
00563035              }
00562fff              case 6:
00562fff              {
00562fff                  esi = ((uint32_t)CPlayerSystem::AutoWield(this, edi, SLOT_SIDE_LEFT, 0, 1, 0, 1));
00562fff                  break;
00562fff              }
00562fc0          }
00562fc0      
00563048      ItemUses::ItemUses(&arg2, eax_1->pwd._useability);
00563048      
00563056      if ((ACCWeenieObject::IsOwnedByPlayer(eax_1) != 0 && ACCWeenieObject::IsContainer(eax_1) != 0))
00563056      {
00563067          CM_UI::SendNotice_OpenContainedContainer(eax_1->id);
0056306f          esi = 1;
00563056      }
00563056      
0056307f      if ((((ItemUses::IsUseable(&arg2) != 0 && ItemUses::IsUseable_Targeted(&arg2) == 0) && ACCWeenieObject::IsContainer(eax_1) != 0) && ACCWeenieObject::IsOwnedByPlayer(eax_1) == 0))
0056307f      {
005630a5          ItemHolder::AttemptSetGroundObject(edi);
005630ad          esi = 1;
0056307f      }
0056307f      
005630b7      int32_t eax_15;
005630b7      eax_15 = esi != 0;
005630bb      return eax_15;
00562f70  }

005630be                                                                                            8b ff                                ..
005630c0  uint32_t jump_table_5630c0[0x7] = 
005630c0  {
005630c0      [0x0] =  0x00562fc7
005630c4      [0x1] =  0x00562fd6
005630c8      [0x2] =  0x00563004
005630cc      [0x3] =  0x00563015
005630d0      [0x4] =  0x00563027
005630d4      [0x5] =  0x00563034
005630d8      [0x6] =  0x00562fed
005630dc  }

005630dc                                                                                      90 90 90 90                              ....

005630e0  void* __thiscall CPlayerSystem::`scalar deleting destructor'(class CPlayerSystem* this, uint32_t arg2)

005630e0  {
005630e3      CPlayerSystem::~CPlayerSystem(this);
005630ed      void* __offset(CPlayerSystem, -0x8) result = ((char*)this - 8);
005630ed      
005630f0      if ((arg2 & 1) == 0)
005630ff          return result;
005630ff      
005630f3      operator delete(result);
005630fb      return ((char*)this - 8);
005630e0  }

00563102        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00563110  void __fastcall CPlayerSystem::UseTime(class CPlayerSystem* this)

00563110  {
00563122      int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
00563128      void* Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0056312c      void* eax;
0056312c      eax = this->awaitingLogOn;
0056312c      
00563142      if ((eax != 0 && this->fReadyToEnterGame != 0))
00563142      {
00563144          this->awaitingLogOn = 0;
00563152          eax = UIFlow::m_instance->vtable->GetPersistantData();
00563152          
00563157          if (eax != 0)
0056315f              CPlayerSystem::LogOnCharacter(this, *(uint32_t*)((char*)eax + 0x4c));
00563142      }
00563142      
00563164      long double x87_r7 = ((long double)this->logOnRequestTime);
0056316a      long double temp0 = ((long double)0.0);
0056316a      (x87_r7 - temp0);
00563170      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
00563172      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
00563172      
00563175      if (p)
00563175      {
0056317b          long double x87_r7_2 = (((long double)Timer::cur_time_1) - ((long double)this->logOnRequestTime));
00563181          long double temp2_1 = ((long double)110.0);
00563181          (x87_r7_2 - temp2_1);
00563187          eax = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00563187          
0056318c          if ((*(uint8_t*)((char*)eax)[1] & 1) == 0)
0056318c          {
0056318e              this->logOnRequestTime = 0f;
00563194              *(uint32_t*)((char*)this->logOnRequestTime)[4] = 0;
0056319a              ECM_Login::SendNotice_ServerDied();
0056318c          }
00563175      }
00563175      
005631a3      long double x87_r7_4 = (((long double)Timer::cur_time_1) - ((long double)lastCheckLinkStatusTime));
005631a9      long double temp1 = ((long double)4.0);
005631a9      (x87_r7_4 - temp1);
005631af      eax = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0))));
005631af      
005631b4      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005631b4      {
005631c5          int32_t var_14;
005631c5          long double st0_1 = LinkStatusHolder::GetConnectionStatus(&Client::GetInstance()->vtable, &var_14);
005631c5          
005631d0          if (this->connectionLost == 0)
005631d0          {
005631d2              long double temp3_1 = ((long double)40.0);
005631d2              (st0_1 - temp3_1);
005631d2              
005631e3              if (((*(uint8_t*)((char*)((((st0_1 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp3_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0 || var_14 == 0))
005631e5                  ECM_Login::SendNotice_ServerDied();
005631d0          }
005631d0          
005631f6          (*(uint32_t*)lastCheckLinkStatusTime) = Timer::cur_time_1;
005631fc          *(int32_t*)((char*)lastCheckLinkStatusTime + 4) = ecx;
005631b4      }
005631b4      
00563204      CPlayerModule::UseTime(&this->playerModule);
00563204      
00563217      if ((this->loggingOff != 0 && ACCWeenieObject::prevRequest == IR_NONE))
00563217      {
0056321b          this->loggingOff = 0;
00563221          CPlayerSystem::RequestLogOff(this);
00563217      }
00563217      
0056322c      if (this->awaitingExpiration != 0)
0056322c      {
0056322e          long double x87_r7_6 = ((long double)Timer::cur_time_1);
00563232          long double temp4_1 = ((long double)this->expirationTime);
00563232          (x87_r7_6 - temp4_1);
00563232          
0056323d          if ((*(uint8_t*)((char*)((((x87_r7_6 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
0056323d          {
00563241              ECM_Login::SendNotice_CharacterError(CHAR_ERROR_SUBSCRIPTION_EXPIRED);
00563249              this->awaitingExpiration = 0;
0056323d          }
0056322c      }
0056322c      
00563251      CPlayerSystem::CalculateObjectRangeChecks(this);
00563110  }

0056325c                                                                                      90 90 90 90                              ....

00563260  void __thiscall CPlayerSystem::RecvNotice_ServerSaysMoveItem(class CPlayerSystem* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, int32_t arg7, uint32_t arg8, uint32_t arg9)

00563260  {
0056326b      class CPlayerSystem* this_1 = this;
0056326e      class CPlayerSystem* this_2 = this_1;
00563272      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
00563284      int32_t i = 0;
00563284      
00563288      if (arg2 == ClientUISystem::GetUISystem()->groundObject)
00563294          ClientUISystem::SetGroundObject(ClientUISystem::GetUISystem(), 0, 1);
00563294      
0056329d      if (arg6 == 0)
0056329d      {
0056339b      label_56339b:
0056339b          
0056339d          if (eax != 0)
0056339d          {
005633a2              if ((eax->sellState != 0 && ACCWeenieObject::IsOwnedByPlayer(eax) == 0))
005633b2                  ACCWeenieObject::SetSellState(eax, 0);
005633b2              
005633ba              if ((eax->tradeState != 0 && ACCWeenieObject::IsOwnedByPlayer(eax) == 0))
005633ca                  ACCWeenieObject::SetTradeState(eax, 0);
0056339d          }
0056329d      }
0056329d      else if (eax != 0)
005632a5      {
005632ab          class ClientTradeSystem* eax_3 = ClientTradeSystem::GetTradeSystem();
005632b2          class ClientUISystem* eax_4 = ClientUISystem::GetUISystem();
005632b9          class CObjectMaint* CObjectMaint::s_pcInstance_1 = CObjectMaint::s_pcInstance;
005632c0          void* __offset(CObjectMaint, -0x8) var_4_1;
005632c0          
005632c0          if (CObjectMaint::s_pcInstance_1 == 0)
005632cb              var_4_1 = nullptr;
005632c0          else
005632c5              var_4_1 = ((char*)CObjectMaint::s_pcInstance_1 - 8);
005632c5          
005632cf          uint32_t m_iidTradePartner = eax_3->m_iidTradePartner;
005632d4          int32_t eax_6;
005632d4          uint8_t eax_8;
005632d4          
005632d4          if (m_iidTradePartner != 0)
005632d4          {
005632d9              eax_6 = ACCWeenieObject::IsOwnedByTrader(eax, m_iidTradePartner);
005632d9              
005632e0              if (eax_6 == 0)
005632e9                  eax_8 = ClientTradeSystem::IsPartnerTradingItem(eax_3, arg2);
005632d4          }
005632d4          
005632f0          char var_9_1;
005632f0          
005632f0          if ((m_iidTradePartner == 0 || (eax_6 == 0 && eax_8 == 0)))
005632f9              var_9_1 = 0;
005632f0          else
005632f2              var_9_1 = 1;
005632f2          
00563305          bool cond:0_1 = ACCWeenieObject::IsOwnedByPlayer(eax) != 0;
00563307          int32_t groundObject = eax_4->groundObject;
0056330a          i = cond:0_1;
0056330a          
0056330f          if (groundObject == 0)
00563321              groundObject = 0;
0056330f          else if (ACCWeenieObject::IsOwnedByObject(eax, groundObject) == 0)
00563321              groundObject = 0;
0056331b          else
0056331d              groundObject = 1;
0056331d          
00563329          uint32_t var_20_5;
00563329          
00563329          if ((i != 0 || groundObject != 0))
00563329          {
0056336c              var_20_5 = arg2;
00563374              CObjectMaint::RemoveObjectToBeDestroyed(((char*)var_4_1 + 8), ACCWeenieObject::RemoveContentsFromDestructionQueue(eax));
00563329          }
00563329          else
00563329          {
0056332b              groundObject = var_9_1;
0056332b              
00563331              if (groundObject != 0)
00563331              {
0056336c                  var_20_5 = arg2;
00563374                  CObjectMaint::RemoveObjectToBeDestroyed(((char*)var_4_1 + 8), ACCWeenieObject::RemoveContentsFromDestructionQueue(eax));
00563331              }
00563331              else
00563331              {
00563335                  ACCWeenieObject::AddContentsToDestructionQueue(eax);
00563346                  CObjectMaint::AddObjectToBeDestroyed(((char*)var_4_1 + 8), arg2);
00563346                  
00563351                  if (arg2 == ACCWeenieObject::selectedID)
00563357                      ACCWeenieObject::SetSelectedObject(0, 0);
00563331              }
00563329          }
00563329          
00563389          if ((this_2->fReadyToEnterGame == 0 && i != 0))
00563390              CPlayerSystem::AttemptSendLoginCompleteNotification(((char*)this_2 - 4));
00563390          
00563395          this_1 = this_2;
00563399          i = 0;
005632d4          goto label_56339b;
005632a5      }
005632a5      
005633e1      if ((this_1->blockedSide > SLOT_SIDE_NULL && this_1->m_invSlotModule.footSlot == arg2))
005633e1      {
005633e3          uint32_t blockingID = this_1->blockingID;
005633e3          
005633eb          if (blockingID != 0)
005633eb          {
005633ed              uint32_t blockedSpellID = this_1->blockedSpellID;
005633f7              this_1->m_invSlotModule.footSlot = nullptr;
005633f7              this_1->blockingID = 0;
005633f7              this_1->blockedSpellID = 0;
005633f7              this_1->blockedSide = SLOT_SIDE_NULL;
005633f7              
00563418              if ((this_1->blockedID == arg6 && CPlayerSystem::AutoWield(((char*)this_1 - 4), blockingID, blockedSpellID, 0, 1, 0, 1) == 0))
00563418              {
0056342c                  class ACCWeenieObject* eax_15 = ClientObjMaintSystem::GetWeenieObject(blockingID);
0056342c                  
00563436                  if (eax_15 != 0)
0056343b                      ACCWeenieObject::SetWaitingState(eax_15, 0);
00563418              }
005633eb          }
005633e1      }
005633e1      
00563442      if (eax != 0)
00563442      {
00563452          if ((*(uint8_t*)((char*)eax->vtable->InqType())[1] & 0x10) != 0)
0056345a              CPlayerSystem::UpdateSpellComponent(((char*)this_1 - 4), eax, 1);
0056345a          
00563469          if ((*(uint8_t*)((char*)eax->vtable->InqType())[1] & 2) != 0)
00563469          {
0056346f              int32_t eax_19 = *(uint32_t*)((char*)this_1->playerModule.m_timeFirstDirtied)[4];
0056346f              
0056347f              if ((arg3 == eax_19 || arg6 == eax_19))
0056347f              {
00563487                  class IDList* eax_20 = ACCWeenieObject::GetContainedItemsList(eax);
00563487                  
00563490                  if (eax_20 != 0)
00563490                  {
00563495                      IDList::SetCurToNum(eax_20, 0);
00563495                      
0056349f                      if (eax_20->numIDs > 0)
0056349f                      {
005634a1                          uint32_t ebp_1 = arg2;
005634a1                          
005634e5                          do
005634e5                          {
005634ad                              class ACCWeenieObject* eax_23 = ClientObjMaintSystem::GetWeenieObject(IDList::GetCurID(eax_20));
005634ad                              
005634b9                              if ((eax_23 != 0 && (*(uint8_t*)((char*)eax_23->vtable->InqType())[1] & 0x10) != 0))
005634d6                                  ebp_1 = CPlayerSystem::UpdateSpellComponent(((char*)this_2 - 4), eax_23, 0);
005634d6                              
005634da                              IDList::SetCurToNext(eax_20);
005634e2                              i += 1;
005634e5                          } while (i < eax_20->numIDs);
005634e5                          
005634e8                          CM_Magic::SendNotice_UpdateSpellComponents(ebp_1);
005634f7                          return;
0056349f                      }
00563490                  }
00563490                  
005634ff                  CM_Magic::SendNotice_UpdateSpellComponents(arg2);
0056347f              }
00563469          }
00563442      }
00563260  }

00563511                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00563520  void __thiscall CPlayerSystem::LogOffCharacter(class CPlayerSystem* this, uint8_t arg2)

00563520  {
00563528      CPlayerModule::SaveToServer(&this->playerModule, 0);
00563528      
00563535      if (arg2 != 0)
00563535      {
00563537          CPlayerSystem::ExecuteLogOff(this);
0056353d          return;
00563535      }
00563535      
00563547      if (ACCWeenieObject::prevRequest == IR_NONE)
00563547      {
00563549          CPlayerSystem::RequestLogOff(this);
0056354f          return;
00563547      }
00563547      
0056355d      ClientSystem::AddTextToScroll(this, "Logging off...\n", 0, 1, 0);
00563562      this->loggingOff = 1;
00563520  }

0056356d                                         90 90 90                                                               ...

00563570  void __fastcall CPlayerSystem::InitializePlayer(class CPlayerSystem* this)

00563570  {
00563570      class CPlayerSystem* this_1 = this;
00563570      
0056357f      if (this->player_initialized != 0)
00563698          return;
00563698      
00563585      this->player_initialized = 1;
00563597      this->playerInitTime = (*(uint32_t*)Timer::cur_time);
0056359d      *(uint32_t*)((char*)this->playerInitTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005635a9      uint32_t player_id = SmartBox::smartbox->player_id;
005635b0      this->playerID = player_id;
005635b6      this->logOnRequestTime = 0f;
005635bc      *(uint32_t*)((char*)this->logOnRequestTime)[4] = 0;
005635cc      ACCWeenieObject::RemoveContentsFromDestructionQueue(ClientObjMaintSystem::GetWeenieObject(player_id));
005635cc      
005635d7      if (this->pending_components_list.head_ != 0)
005635d7      {
005635e0          while (true)
005635e0          {
005635e0              class NIListElement<unsigned long>* head_ = this->pending_components_list.head_;
005635e8              uint32_t data_;
005635e8              
005635e8              if (head_ != 0)
005635e8              {
005635ee                  class NIListElement<unsigned long>* next_ = head_->next_;
005635f3                  this->pending_components_list.head_ = next_;
005635f3                  
005635f9                  if (next_ == 0)
005635fb                      this->pending_components_list.tail_ = nullptr;
005635fb                  
00563601                  data_ = head_->data_;
00563604                  operator delete(head_);
005635e8              }
005635e8              else
005635ea                  data_ = 0;
005635ea              
0056360e              if (data_ == 0)
0056360e                  break;
0056360e              
00563611              class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(data_);
00563611              
0056361d              if (eax_3 != 0)
0056361d              {
00563625                  if (this->componentTracker == 0)
00563625                  {
0056362e                      class SpellComponentTable* eax_5 = ClientMagicSystem::GetSpellComponentTable(ClientMagicSystem::GetMagicSystem());
0056363a                      void* eax_6 = operator new(0x108);
00563644                      class ComponentTracker* eax_7;
00563644                      
00563644                      if (eax_6 == 0)
00563650                          eax_7 = nullptr;
00563644                      else
00563649                          eax_7 = ComponentTracker::ComponentTracker(eax_6, eax_5);
00563649                      
00563652                      this->componentTracker = eax_7;
00563625                  }
00563625                  
00563664                  ComponentTracker::UpdateComponent(this->componentTracker, eax_3, &this_1);
0056361d              }
005635e0          }
005635d7      }
005635d7      
00563672      CM_Magic::SendNotice_UpdateSpellComponents(1);
00563672      
00563682      if (this->sendLoginCompletePending != 0)
00563686          CPlayerSystem::AttemptSendLoginCompleteNotification(this);
00563686      
00563690      /* tailcall */
00563690      return CM_House::Event_QueryHouse();
00563570  }

00563699                                                                             90 90 90 90 90 90 90                           .......

005636a0  void __thiscall CPlayerSystem::Handle_PlayerDescription(class CPlayerSystem* this, void* arg2, uint32_t arg3)

005636a0  {
005636a3      void* eax = arg2;
005636a7      int32_t ebx;
005636a7      int32_t var_3c = ebx;
005636a8      int32_t ebp;
005636a8      int32_t var_40 = ebp;
005636a9      int32_t esi;
005636a9      int32_t var_44 = esi;
005636aa      void** edi;
005636aa      void** var_48 = edi;
005636b5      uint32_t* var_4c = &arg3;
005636b6      void* esi_1 = ((char*)eax + arg3);
005636bd      void** var_50 = &PlayerDesc_ClassType;
005636c5      arg3 = 0;
005636d0      class TResult __return;
005636d0      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_50, var_4c);
005636d5      uint32_t ecx_2 = arg3;
005636de      var_50 = ecx_2;
005636e0      int32_t var_4c_1 = 0;
005636e3      void** eax_2 = var_50;
005636e9      int32_t* var_30 = nullptr;
005636ed      int32_t var_2c = 0;
005636ed      
005636f1      if (eax_2 != 0)
005636f7          *(uint32_t*)(*(uint32_t*)eax_2 + 0x10)();
005636f7      
00563703      void __return_1;
00563703      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_30, &__return_1);
00563703      void*** esp = &var_50;
00563703      
0056370a      if (ecx_2 != 0)
00563711          *(uint32_t*)(*(uint32_t*)ecx_2 + 0x14)();
00563711      
00563714      class TResult __return_2 = __return;
00563714      
0056371a      if (__return_2 != 0)
0056371a      {
00563733          int32_t var_4;
00563733          *(uint32_t*)(*(uint32_t*)(__return_2 + 0x30) + 0x10)(&var_4, ((char*)esi_1 - var_4));
0056373b          PlayerModule::Clear(&this->playerModule.vtable);
00563744          struct PlayerModule::VTable* vtable = this->playerModule.vtable;
00563749          void* ecx_9 = ((char*)esi_1 - arg2);
00563750          var_50 = &arg2;
00563753          vtable->UnPack(var_50, ecx_9);
0056375c          void* eax_5 = ((char*)esi_1 - arg2);
00563763          var_50 = &arg2;
00563768          this->player_desc_received = 1;
0056376f          int32_t var_10 = 0x7cc3f8;
00563777          int32_t var_c_1 = 0;
0056377b          int32_t var_8_1 = 0;
0056377f          var_4 = 0;
00563783          int32_t var_20 = 0x7cc790;
0056378b          int32_t var_1c_1 = 0;
0056378f          int32_t var_18 = 0;
00563793          int32_t var_14_1 = 0;
00563797          PackableList<ContentProfile>::UnPack(&var_10, var_50, eax_5);
0056379c          uint32_t esi_2 = ((char*)esi_1 - arg2);
005637a5          var_50 = &arg2;
005637aa          PackableList<InventoryPlacement>::UnPack(&var_20, var_50, esi_2);
005637af          uint32_t esi_3 = this->playerID;
005637af          
005637b7          if (esi_3 == 0)
005637b7          {
005637b9              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005637b9              
005637c0              if (SmartBox::smartbox_1 != 0)
005637c2                  esi_3 = SmartBox::smartbox_1->player_id;
005637b7          }
005637b7          
005637cc          uint32_t* var_4c_5 = &arg3;
005637d1          var_50 = &ClientObjMaintSystem_ClassType;
005637d7          arg3 = 0;
005637e2          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, var_50, var_4c_5);
005637e7          uint32_t ecx_14 = arg3;
005637f0          var_50 = ecx_14;
005637f2          int32_t var_4c_6 = 0;
005637f5          void** eax_7 = var_50;
005637fb          int32_t var_28 = 0;
005637ff          int32_t var_24_1 = 0;
005637ff          
00563803          if (eax_7 != 0)
00563809              *(uint32_t*)(*(uint32_t*)eax_7 + 0x10)();
00563809          
00563815          InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&var_28, &__return);
00563815          
0056381c          if (ecx_14 != 0)
00563823              *(uint32_t*)(*(uint32_t*)ecx_14 + 0x14)();
00563823          
0056382f          class ACCObjectMaint* ebp_6 = &var_30[2];
00563835          ACCObjectMaint::ViewObjectContents(ebp_6, esi_3, &var_18);
00563842          ACCObjectMaint::UpdateObjectInventory(ebp_6, esi_3, &var_28);
00563842          
0056384d          if (this->player_initialized == 0)
00563851              CPlayerSystem::InitializePlayer(this);
00563851          
0056385b          CPlayerModule::OnInitialize(&this->playerModule);
00563860          class TResult __return_3 = __return;
00563866          CM_UI::SendNotice_PlayerDescReceived(__return_3, &this->playerModule);
0056386e          CM_Character::SendNotice_ReloadOptions();
00563873          int32_t* ecx_22 = var_30;
00563873          
00563879          if (ecx_22 != 0)
0056387d              *(uint32_t*)(*(uint32_t*)ecx_22 + 0x14)();
0056387d          
00563884          var_28 = 0x7cc790;
0056388c          PackableList<InventoryPlacement>::Flush(&var_28);
00563895          var_28 = 0x79285c;
0056389d          var_18 = 0x7cc3f8;
005638a5          PackableList<ContentProfile>::Flush(&var_18);
005638ae          *(uint32_t*)(*(uint32_t*)__return_3 + 0x14)();
005638ae          esp = &var_48;
0056371a      }
0056371a      
005638b1      *(uint32_t*)esp;
005638b1      esp[1];
005638b1      esp[2];
005638b1      esp[3];
005636a0  }

005638bb                                                                                   90 90 90 90 90                             .....

005638c0  void __fastcall ClientCharGenState::ClientCharGenState(class ClientCharGenState* this)

005638c0  {
005638c3      int32_t eax;
005638c3      uint32_t ecx;
005638c3      int32_t edx;
005638c3      eax = CharGenState::CharGenState(this);
005638c8      int32_t var_8 = 0xa;
005638cc      int32_t var_c = 0x10000008;
005638d1      int32_t var_10 = 1;
005638d3      this->vtable = &ClientCharGenState::`vftable';
005638d9      this->grayFacePal = nullptr;
005638df      this->trueFacePal = nullptr;
005638e5      this->trueFacePalChangeNum = 0;
005638f3      this->grayFacePal = DBObj::GetByEnum(eax, edx, ecx);
005638fe      this->trueFacePal = Palette::makeModifiedPalette();
005638c0  }

00563908                          90 90 90 90 90 90 90 90                                                          ........

00563910  int32_t __stdcall CharGenState::GetRandomInt(class CharGenState const* this @ ecx, int32_t arg2)

00563910  {
0056391d      return RandInt(arg2);
00563910  }


00563920  int32_t __stdcall CharGenState::GetRandomInt(class CharGenState const* this @ ecx, int32_t arg2, int32_t arg3)

00563920  {
00563932      return RandInt(arg2, arg3);
00563920  }

00563935                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00563940  int32_t __fastcall CharGenState::GetRandomReal(class CharGenState const* this)

00563940  {
00563956      return rand(this);
00563940  }

00563957                                                                       90 90 90 90 90 90 90 90 90                         .........

00563960  void __fastcall ClientCharGenState::~ClientCharGenState(class ClientCharGenState* this)

00563960  {
00563963      class Palette* grayFacePal = this->grayFacePal;
00563969      this->vtable = &ClientCharGenState::`vftable';
0056396f      grayFacePal->vtable->Release();
0056397b      Palette::releasePalette(this->trueFacePal);
00563986      /* tailcall */
00563986      return CharGenState::~CharGenState(this);
00563960  }

0056398b                                   90 90 90 90 90                                                             .....

00563990  uint32_t __stdcall ClientCharGenState::GetColorFromPal(class ClientCharGenState* this @ ecx, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

00563990  {
005639a9      void var_8;
005639a9      class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0xa));
005639a9      
005639b5      if (eax_1 == 0)
005639b5      {
00563a01          ErrorStream::operator<<(ErrorStream::operator<<(ErrorStream::operator<<(ErrorStream::operator<<(&perr, "palette "), arg2), " not loaded correctly from datab…"), endp);
00563a0e          return 0;
005639b5      }
005639b5      
005639be      uint32_t result = Palette::get_color32(eax_1, arg3);
005639c3      eax_1->vtable->Release();
005639d4      return result;
00563990  }

00563a11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00563a20  void __fastcall ClientCharGenState::UpdateTrueFacePal(class ClientCharGenState* this)

00563a20  {
00563a2f      class ClientCharGenState* this_1 = this;
00563a2f      
00563a31      if (((*(uint8_t*)$S109) & 1) == 0)
00563a31      {
00563a46          $S109 |= 1;
00563a4c          skinPalID.id = INVALID_DID.id;
00563a51          atexit($E110);
00563a31      }
00563a31      
00563a59      this = (*(uint8_t*)$S109);
00563a59      
00563a66      if ((2 & this) == 0)
00563a66      {
00563a7b          $S109 |= 2;
00563a81          eyesPalID.id = INVALID_DID.id;
00563a87          atexit($E111);
00563a66      }
00563a66      
00563a8f      this = (*(uint8_t*)$S109);
00563a8f      
00563a9c      if ((4 & this) == 0)
00563a9c      {
00563a9e          $S109 |= 4;
00563aaf          hairPalID.id = INVALID_DID.id;
00563ab5          atexit($E112);
00563a9c      }
00563a9c      
00563abd      uint32_t mHeritageGroup = this_1->mHeritageGroup;
00563ac3      int32_t ebx = 0;
00563ac3      
00563ac7      if (mHeritageGroup != 0)
00563ac7      {
00563acd          uint32_t mGender = this_1->mGender;
00563acd          
00563ad5          if (mGender != 0)
00563ad5          {
00563af8              void __return_1;
00563af8              void __return_2;
00563af8              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this_1->charGenData, &__return_2, mHeritageGroup), &__return_1, mGender);
00563b04              HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
00563b1a              void var_1a4;
00563b1a              class IDClass<_tagDataID,32,0> var_148;
00563b1a              class DBObj* eax_4 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1a4, var_148, 0x18));
00563b26              class IDClass<_tagDataID,32,0> __return;
00563b26              
00563b26              if (eax_4 != 0)
00563b26              {
00563b28                  int32_t eax_5 = *(uint32_t*)((char*)this_1->skinShade)[4];
00563b2e                  class IDClass<_tagDataID,32,0> __return_3 = this_1->skinShade;
00563b36                  int32_t var_1bc_3 = eax_5;
00563b37                  int32_t var_1a8_1 = eax_5;
00563b43                  __return = __return_3;
00563b4c                  uint32_t id = PalSet::GetPaletteID(eax_4, &__return, __return_3)->id;
00563b4c                  
00563b54                  if (id != skinPalID.id)
00563b54                  {
00563b5c                      skinPalID.id = id;
00563b68                      Palette::Modify(this_1->trueFacePal, id, 0, 0xc0);
00563b6d                      ebx = 1;
00563b54                  }
00563b54                  
00563b72                  eax_4->vtable->Release();
00563b26              }
00563b26              
00563b79              int32_t hairColor = this_1->hairColor;
00563b88              int32_t var_13c;
00563b88              
00563b88              if ((hairColor > 0xffffffff && hairColor < var_13c))
00563b88              {
00563b92                  int32_t var_144;
00563b92                  class PalSet* eax_8 = PalSet::Get(*(uint32_t*)(var_144 + (hairColor << 2)));
00563b92                  
00563b9e                  if (eax_8 != 0)
00563b9e                  {
00563ba0                      int32_t eax_9 = *(uint32_t*)((char*)this_1->hairShade)[4];
00563ba6                      class IDClass<_tagDataID,32,0> __return_4 = this_1->hairShade;
00563bae                      int32_t var_1bc_5 = eax_9;
00563baf                      int32_t var_1a8_2 = eax_9;
00563bbb                      __return = __return_4;
00563bc4                      uint32_t id_1 = PalSet::GetPaletteID(eax_8, &__return, __return_4)->id;
00563bc4                      
00563bcc                      if (id_1 != hairPalID.id)
00563bcc                      {
00563bd5                          hairPalID.id = id_1;
00563be1                          Palette::Modify(this_1->trueFacePal, id_1, 0xc0, 0x40);
00563be6                          ebx = 1;
00563bcc                      }
00563bcc                      
00563beb                      eax_8->vtable->Release();
00563b9e                  }
00563b88              }
00563b88              
00563bf2              int32_t eyeColor = this_1->eyeColor;
00563c05              int32_t var_124;
00563c05              class IDClass<_tagDataID,32,0> eax_11;
00563c05              int32_t var_12c;
00563c05              
00563c05              if ((eyeColor != 0xffffffff && eyeColor < var_124))
00563c0e                  eax_11 = *(uint32_t*)(var_12c + (eyeColor << 2));
00563c0e              
00563c17              if (((eyeColor != 0xffffffff && eyeColor < var_124) && eax_11 != eyesPalID.id))
00563c17              {
00563c20                  eyesPalID.id = eax_11;
00563c2c                  Palette::Modify(this_1->trueFacePal, eax_11, 0x100, 0x40);
00563c37                  this_1->trueFacePalChangeNum += 1;
00563c17              }
00563c17              else if (ebx != 0)
00563c37                  this_1->trueFacePalChangeNum += 1;
00563c37              
00563c41              Sex_CG::~Sex_CG(&__return_1);
00563ad5          }
00563ac7      }
00563a20  }

00563c4f                                               90                                                                 .

00563c50  void __thiscall ClientSystem::AddTextToScroll(class ClientSystem* this, class PStringBase<unsigned short> const* arg2, uint32_t arg3, uint8_t arg4, uint32_t arg5)

00563c50  {
00563c60      BSTR m_charbuffer_5 = nullptr;
00563c70      int32_t var_93c = 0;
00563c74      uint32_t m_charbuffer_2;
00563c74      
00563c74      if (arg4 != 0)
00563c74      {
00563c7d          if (APIManager::APIIsReady() != 0)
00563c7d          {
00563c7f              class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
00563c7f              
00563c83              if (m_charbuffer != 0)
00563c83              {
00563c85                  m_charbuffer_2 = m_charbuffer;
00563c8c                  m_charbuffer_5 = SysAllocString(m_charbuffer_2);
00563c83              }
00563c83              
00563c8e              struct IACPlugin* eax_3 = APIManager::GetACPlugin();
00563c93              struct IACPlugin::VTable* vtable = eax_3->vtable;
00563c99              m_charbuffer_2 = &var_93c;
00563ca4              vtable->OnChatWindowText(eax_3, m_charbuffer_5, arg3, m_charbuffer_2);
00563ca7              m_charbuffer_2 = m_charbuffer_5;
00563ca8              SysFreeString(m_charbuffer_2);
00563c7d          }
00563c7d          
00563cb6          if (var_93c == 0)
00563cb6              goto label_563cbc;
00563cb6          
00563cb6          return;
00563c74      }
00563c74      
00563cbc  label_563cbc:
00563cbc      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_charbuffer;
00563cc4      class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = m_charbuffer_1;
00563ccb      m_charbuffer_2 = &m_charbuffer_1->m_data[-8];
00563cce      m_charbuffer_2 = InterlockedIncrement(m_charbuffer_2);
00563cd6      PStringBase<unsigned short>::PStringBase<unsigned short>(&m_charbuffer_2, &data_79c288);
00563ce3      PStringBase<unsigned short>::trim(&m_charbuffer_3, 1, 1, m_charbuffer_2);
00563cfd      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3;
00563cfd      
00563cfd      if (PlayerModule::FilterLanguage(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0)
00563cfd      {
00563d07          int32_t var_930;
00563d07          m_charbuffer_2 = &var_930;
00563d0f          var_930 = 0x794488;
00563d17          class PStringBase<unsigned short>* i_1 = nullptr;
00563d1b          int32_t var_928_1 = 0;
00563d1f          int32_t var_924_1 = 0;
00563d23          PSUtils::explode(&m_charbuffer_3, 0x20, m_charbuffer_2);
00563d23          
00563d32          for (class PStringBase<unsigned short>* i = i_1; i != 0; i = *(int32_t*)((char*)i + 4))
00563d32          {
00563d38              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00563d3d              PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
00563d44              m_charbuffer_2 = &PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8];
00563d45              InterlockedIncrement(m_charbuffer_2);
00563d4b              m_charbuffer_2 = &PStringBase<unsigned short>::s_NullBuffer_3;
00563d4b              
00563d5b              if (TabooTableAdaptor::CheckCensorsW(i, 1, 1, m_charbuffer_2) != 0)
00563d5b              {
00563d5d                  m_charbuffer_2 = u"****";
00563d66                  void* var_938;
00563d66                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_938, m_charbuffer_2);
00563d6f                  m_charbuffer_2 = &var_938;
00563d75                  PStringBase<unsigned short>::replace(&m_charbuffer_3, i, m_charbuffer_2);
00563d7e                  int32_t* esi_1 = ((char*)var_938 - 0x14);
00563d84                  m_charbuffer_2 = &esi_1[1];
00563d84                  
00563d8d                  if ((InterlockedDecrement(m_charbuffer_2) == 0 && esi_1 != 0))
00563d8d                  {
00563d8f                      int32_t edx_2 = *(uint32_t*)esi_1;
00563d91                      m_charbuffer_2 = 1;
00563d95                      *(uint32_t*)edx_2(m_charbuffer_2);
00563d8d                  }
00563d5b              }
00563d5b              
00563d9b              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
00563da1              m_charbuffer_2 = ((char*)esi_3 + 4);
00563da1              
00563daa              if ((InterlockedDecrement(m_charbuffer_2) == 0 && esi_3 != 0))
00563daa              {
00563dac                  int32_t edx_3 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
00563dae                  m_charbuffer_2 = 1;
00563db2                  *(uint32_t*)edx_3(m_charbuffer_2);
00563daa              }
00563d32          }
00563d32          
00563dc0          var_930 = 0x794488;
00563dc8          List<PStringBase<unsigned short> >::flush(&var_930);
00563cfd      }
00563cfd      
00563dcd      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00563dd2      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
00563dd9      m_charbuffer_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8];
00563dda      InterlockedIncrement(m_charbuffer_2);
00563de6      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_10;
00563de6      
00563de6      if (arg3 == 0x1a)
00563de6      {
00563ee4      label_563ee4:
00563ee4          void var_890;
00563ee4          StringInfo::StringInfo(&var_890);
00563ee9          m_charbuffer_2 = 1;
00563ef7          StringInfo::SetLiteralValue(&var_890, &m_charbuffer_3, m_charbuffer_2);
00563f00          void var_920;
00563f00          StringInfo::StringInfo(&var_920);
00563f05          m_charbuffer_2 = 1;
00563f10          StringInfo::SetLiteralValue(&var_920, &PStringBase<unsigned short>::s_NullBuffer_4, m_charbuffer_2);
00563f1c          m_charbuffer_2 = arg5;
00563f2b          ECM_UI::SendNotice_DisplayFinalStringInfo(arg3, &var_890, &var_920, m_charbuffer_2);
00563f37          StringInfo::~StringInfo(&var_920);
00563f43          StringInfo::~StringInfo(&var_890);
00563f4c          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_12 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
00563f52          m_charbuffer_2 = ((char*)esi_12 + 4);
00563f52          
00563f5b          if ((InterlockedDecrement(m_charbuffer_2) == 0 && esi_12 != 0))
00563f5b          {
00563f5d              int32_t eax_23 = *(int32_t*)((char*)ADJ(esi_12) + -0x14);
00563f5f              m_charbuffer_2 = 1;
00563f63              *(uint32_t*)eax_23(m_charbuffer_2);
00563f5b          }
00563f5b          
00563f69          esi_10 = &m_charbuffer_3->m_data[-0xa];
00563f6f          m_charbuffer_2 = ((char*)esi_10 + 4);
00563de6      }
00563de6      else
00563de6      {
00563dfb          if (PlayerModule::DisplayTimeStamps(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0)
00563dfb          {
00563e02              PStringBase<unsigned short>::s_NullBuffer_3 = Timer::get_real_time();
00563e0a              m_charbuffer_2 = &PStringBase<unsigned short>::s_NullBuffer_3;
00563e24              void var_800;
00563e24              wcsftime(&var_800, 0x400, u"%#H:%M:%S ", localtime(m_charbuffer_2));
00563e34              m_charbuffer_2 = &var_800;
00563e39              PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_4, m_charbuffer_2);
00563dfb          }
00563dfb          
00563e3e          struct _iobuf* ClientSystem::s_pLogFile_1 = ClientSystem::s_pLogFile;
00563e3e          
00563e45          if (ClientSystem::s_pLogFile_1 == 0)
00563e45              goto label_563ee4;
00563e45          
00563e4f          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_4;
00563e53          m_charbuffer_2 = m_charbuffer_3;
00563e5b          int32_t m_charbuffer_4 = fprintf(ClientSystem::s_pLogFile_1, "%ls%ls\n", PStringBase<unsigned short>::s_NullBuffer_5, m_charbuffer_2);
00563e5b          
00563e69          if (m_charbuffer_4 <= 0x800)
00563e69              goto label_563ee4;
00563e69          
00563e6b          m_charbuffer_2 = m_charbuffer_4;
00563e78          PStringBase<unsigned short>::PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_3, Formatted, u"Wrote long string (%d characters…");
00563e80          m_charbuffer_2 = 0;
00563e8e          ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_3, arg3, 1, m_charbuffer_2);
00563e97          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
00563e9d          m_charbuffer_2 = ((char*)esi_6 + 4);
00563e9d          
00563ea6          if ((InterlockedDecrement(m_charbuffer_2) == 0 && esi_6 != 0))
00563ea6          {
00563ea8              int32_t eax_19 = *(int32_t*)((char*)ADJ(esi_6) + -0x14);
00563eaa              m_charbuffer_2 = 1;
00563eae              *(uint32_t*)eax_19(m_charbuffer_2);
00563ea6          }
00563ea6          
00563eb4          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_8 = &PStringBase<unsigned short>::s_NullBuffer_4->m_data[-0xa];
00563eba          m_charbuffer_2 = ((char*)esi_8 + 4);
00563eba          
00563ec3          if ((InterlockedDecrement(m_charbuffer_2) == 0 && esi_8 != 0))
00563ec3          {
00563ec5              int32_t edx_5 = *(int32_t*)((char*)ADJ(esi_8) + -0x14);
00563ec7              m_charbuffer_2 = 1;
00563ecb              *(uint32_t*)edx_5(m_charbuffer_2);
00563ec3          }
00563ec3          
00563ed1          esi_10 = &m_charbuffer_3->m_data[-0xa];
00563ed7          m_charbuffer_2 = ((char*)esi_10 + 4);
00563de6      }
00563de6      
00563f78      if ((InterlockedDecrement() == 0 && esi_10 != 0))
00563f78      {
00563f7a          int32_t edx_8 = *(int32_t*)((char*)ADJ(esi_10) + -0x14);
00563f7e          m_charbuffer_2 = 1;
00563f80          *(uint32_t*)edx_8(m_charbuffer_2);
00563f78      }
00563c50  }

00563f8f                                               90                                                                 .

00563f90  class ClientUISystem* ClientUISystem::GetUISystem()

00563f90  {
00563f95      return ClientUISystem::s_pUISystem;
00563f90  }

00563f96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00563fa0  void ClientUISystem::OnStartup(class ClientUISystem* this @ ecx)

00563fa0  {
00563fa2      APIManager::SetUIReady(1);
00563fa0  }

00563fa9                             90 90 90 90 90 90 90                                                           .......

00563fb0  class CSoundTable const* __fastcall ClientUISystem::GetUISoundTable(class ClientUISystem* this)

00563fb0  {
00563fb3      class CSoundTable* soundTable = this->soundTable;
00563fb3      
00563fb8      if (soundTable == 0)
00563fb8      {
00563fba          int32_t var_8_1 = 0x22;
00563fbc          int32_t var_c_1 = 7;
00563fbe          int32_t var_10_1 = 0x10000003;
00563fcb          int32_t edx;
00563fcb          this->soundTable = DBObj::GetByEnum(soundTable, edx, this);
00563fb8      }
00563fb8      
00563fd2      return this->soundTable;
00563fb0  }

00563fd3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00563fe0  uint32_t __stdcall ClientUISystem::Handle_Item__QueryItemManaResponse(class ClientUISystem* this @ ecx, uint32_t arg2, float arg3, int32_t arg4)

00563fe0  {
00563ff4      CM_Item::SendNotice_UpdateItemMana(arg2, arg3, arg4 != 0);
00563ffe      return 0;
00563fe0  }

00564001     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00564010  void __thiscall ClientUISystem::AttemptSellToVendor(class ClientUISystem* this, uint32_t arg2, uint32_t arg3)

00564010  {
00564019      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg3);
00564019      
00564023      if ((eax != 0 && ACCWeenieObject::IsOwnedByPlayer(eax) != 0))
00564023      {
0056403a          if (this->vendorID == arg2)
0056403a          {
0056403d              CM_Vendor::SendNotice_AddItemToSell(arg3);
00564048              return;
0056403a          }
0056403a          
00564050          ItemHolder::UseObject(arg2, 0, 0);
00564058          this->attemptOpenVendorID = arg2;
0056405b          this->attemptSaleObjectID = arg3;
00564023      }
00564010  }

00564064              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00564070  void __thiscall ClientUISystem::CloseVendor(class ClientUISystem* this, uint8_t arg2)

00564070  {
00564075      if (this->vendorID != 0)
00564075      {
00564077          int32_t eax = arg2;
00564077          
0056407d          if (eax == 0)
0056407f              this->vendorID = 0;
0056407f          
00564087          CM_Vendor::SendNotice_CloseVendor(eax);
00564075      }
00564070  }


00564090  uint32_t ClientUISystem::Handle_Character__ReturnPing(class ClientUISystem* this @ ecx)

00564090  {
00564090      CM_Character::SendNotice_Ping();
00564097      return 0;
00564090  }

00564098                                                                          90 90 90 90 90 90 90 90                          ........

005640a0  uint32_t __stdcall ClientUISystem::Handle_Character__ConfirmationRequest(class ClientUISystem* this @ ecx, int32_t arg2, uint32_t arg3, class AC1Legacy::PStringBase<char> const* arg4)

005640a0  {
005640a8      if ((arg2 - 1) <= 6)
005640ae          switch (arg2)
005640ae          {
005640bf              case 1:
005640bf              {
005640bf                  CM_Allegiance::SendNotice_SwearAllegianceRequest(arg4, arg3);
005640bf                  break;
005640bf              }
005640ed              case 2:
005640ed              {
005640ed                  CM_Character::SendNotice_AlterSkill_ConfirmationRequest(arg4, arg3);
005640ed                  break;
005640ed              }
00564104              case 3:
00564104              {
00564104                  CM_Character::SendNotice_AlterAttribute_ConfirmationRequest(arg4, arg3);
00564104                  break;
00564104              }
005640d6              case 4:
005640d6              {
005640d6                  CM_Fellowship::SendNotice_FellowshipRequest(arg4, arg3);
005640d6                  break;
005640d6              }
00564132              case 5:
00564132              {
00564132                  CM_Character::SendNotice_CraftInteraction_ConfirmationRequest(arg4, arg3);
00564132                  break;
00564132              }
0056411b              case 6:
0056411b              {
0056411b                  CM_Character::SendNotice_Augmentation_ConfirmationRequest(arg4, arg3);
0056411b                  break;
0056411b              }
00564149              case 7:
00564149              {
00564149                  CM_Character::SendNotice_YesNo_ConfirmationRequest(arg4, arg3);
00564149                  break;
00564149              }
005640ae          }
005640ae      
00564153      return 0;
005640a0  }

00564156                                                                    8b ff                                                ..
00564158  uint32_t jump_table_564158[0x7] = 
00564158  {
00564158      [0x0] =  0x005640b5
0056415c      [0x1] =  0x005640e3
00564160      [0x2] =  0x005640fa
00564164      [0x3] =  0x005640cc
00564168      [0x4] =  0x00564128
0056416c      [0x5] =  0x00564111
00564170      [0x6] =  0x0056413f
00564174  }

00564174                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00564180  uint32_t __stdcall ClientUISystem::Handle_Character__ConfirmationDone(class ClientUISystem* this @ ecx, int32_t arg2, uint32_t arg3)

00564180  {
0056418a      CM_Character::SendNotice_AbortConfirmationRequest(arg2, arg3);
00564194      return 0;
00564180  }

00564197                                                                       90 90 90 90 90 90 90 90 90                         .........

005641a0  uint32_t __stdcall ClientUISystem::Handle_Login__WorldInfo(class ClientUISystem* this @ ecx, int32_t arg2, int32_t arg3, class AC1Legacy::PStringBase<char> const* arg4)

005641a0  {
005641a5      ECM_Login::SendNotice_WorldName(arg4);
005641af      return 0;
005641a0  }

005641b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005641c0  void __thiscall ClientUISystem::InitializeCameraSet(class ClientUISystem* this, class SmartBox* arg2)

005641c0  {
005641c8      void* eax = operator new(0x88);
005641c8      
005641d2      if (eax != 0)
005641d2      {
005641e0          this->m_pCameraSet = CameraSet::CameraSet(eax, arg2);
005641e4          return;
005641d2      }
005641d2      
005641e9      this->m_pCameraSet = nullptr;
005641c0  }


005641f0  class CameraSet* __fastcall ClientUISystem::AccessCameraSet(class ClientUISystem* this)

005641f0  {
005641f3      return this->m_pCameraSet;
005641f0  }

005641f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00564200  void __stdcall ClientUISystem::RecvNotice_ToggleChatEntry(class ClientUISystem* this @ ecx, uint8_t arg2)

00564200  {
00564206      if (arg2 != 0)
00564208          SmartBox::smartbox->cmdinterp->vtable->FinishJump();
00564200  }

0056421b                                                                                   90 90 90 90 90                             .....

00564220  uint32_t __stdcall ClientUISystem::Handle_Social__FriendsUpdate(class ClientUISystem* this @ ecx, class FriendDataList const* arg2, int32_t arg3)

00564220  {
0056422a      CM_Social::SendNotice_UpdateFriendsList(arg2, arg3);
00564234      return 0;
00564220  }

00564237                                                                       90 90 90 90 90 90 90 90 90                         .........

00564240  uint32_t __stdcall ClientUISystem::Handle_Social__CharacterTitleTable(class ClientUISystem* this @ ecx, class CharacterTitleTable const* arg2)

00564240  {
00564245      CM_Social::SendNotice_UpdateCharacterTitleTable(arg2);
0056424f      return 0;
00564240  }

00564252                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00564260  uint32_t __stdcall ClientUISystem::Handle_Social__AddOrSetCharacterTitle(class ClientUISystem* this @ ecx, uint32_t arg2, int32_t arg3)

00564260  {
00564266      CM_Social::SendNotice_AddCharacterTitle(arg2);
00564266      
00564274      if (arg3 != 0)
00564277          CM_Social::SendNotice_SetDisplayCharacterTitle(arg2);
00564277      
00564282      return 0;
00564260  }

00564285                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00564290  uint32_t __stdcall ClientUISystem::Handle_Social__SendClientContractTrackerTable(class ClientUISystem* this @ ecx, class CContractTrackerTable const* arg2)

00564290  {
0056429c      CPlayerSystem::UpdateContractTrackerTable(CPlayerSystem::GetPlayerSystem(), arg2);
005642a3      return 0;
00564290  }

005642a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005642b0  uint32_t __stdcall ClientUISystem::Handle_Character__StartBarber(class ClientUISystem* this @ ecx, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3, class IDClass<_tagDataID,32,0> arg4, class IDClass<_tagDataID,32,0> arg5, class IDClass<_tagDataID,32,0> arg6, class IDClass<_tagDataID,32,0> arg7, class IDClass<_tagDataID,32,0> arg8, class IDClass<_tagDataID,32,0> arg9, class IDClass<_tagDataID,32,0> arg10, class IDClass<_tagDataID,32,0> arg11, class IDClass<_tagDataID,32,0> arg12, class IDClass<_tagDataID,32,0> arg13, class IDClass<_tagDataID,32,0> arg14, class IDClass<_tagDataID,32,0> arg15, int32_t arg16, int32_t arg17)

005642b0  {
00564300      CM_Character::SendNotice_StartBarberNotice(arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17);
0056430a      return 0;
005642b0  }

0056430d                                         90 90 90                                                               ...

00564310  void __fastcall ClientUISystem::~ClientUISystem(class ClientUISystem* this)

00564310  {
0056431b      *(int32_t*)((char*)this + -8) = 0x7cde28;
00564318      this->vtable = 0x7cdb80;
00564327      this->vtable = "@HV";
0056432d      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0056432d      
00564334      if (eax != 0)
00564334      {
00564339          int32_t edx_2 = -(((char*)this - 8));
0056433f          eax->vtable->UnRegisterAllNoticeHandlers(((edx_2 - edx_2) & ((char*)this - 4)));
00564334      }
00564334      
0056434a      int32_t eax_2 = -(((char*)this - 8));
0056434e      void* eax_4 = ((eax_2 - eax_2) & this);
00564350      this->vtable = &ReferenceCountTemplate<1048576,2>::`vftable';
00564357      *(uint32_t*)eax_4 = 0x794824;
0056435d      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0056435d      
00564365      if (ICIDM::s_cidm_1 != 0)
00564367          ICIDM::s_cidm_1->vtable->UnregisterCallback(eax_4);
00564367      
0056436f      if (this != 8)
0056436f      {
00564315          this->vtable = 0x7bf328;
0056437d          /* tailcall */
0056437d          return NoticeHandler::~NoticeHandler(((char*)this - 4));
0056436f      }
0056436f      
00564386      *nullptr = 0x7bf328;
0056438d      /* tailcall */
0056438d      return NoticeHandler::~NoticeHandler(nullptr);
00564310  }

00564392                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005643a0  uint32_t __fastcall ClientUISystem::Release(class ClientUISystem const* this)

005643a0  {
005643a7      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
005643a7      
005643b4      if ((result == 0 && this != 0))
005643b6          this->vtable->__vecDelDtor(1);
005643b6      
005643c4      return result;
005643a0  }

005643c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005643d0  void __fastcall ClientUISystem::OnShutdown(class ClientUISystem* this)

005643d0  {
005643d6      APIManager::SetUIReady(0);
005643db      class ClientUISystem* ClientUISystem::s_pUISystem_1 = ClientUISystem::s_pUISystem;
005643db      
005643e6      if (ClientUISystem::s_pUISystem_1 != 0)
005643e6      {
005643e8          ClientUISystem::s_pUISystem_1->vtable->Release();
005643ed          ClientUISystem::s_pUISystem = nullptr;
005643e6      }
005643e6      
005643f7      class CSoundTable* soundTable = this->soundTable;
005643f7      
005643fc      if (soundTable != 0)
005643fc      {
005643fe          soundTable->vtable->Release();
00564403          this->soundTable = nullptr;
005643fc      }
005643fc      
0056440a      class CameraSet* m_pCameraSet = this->m_pCameraSet;
0056440a      
0056440f      if (m_pCameraSet != 0)
0056440f      {
00564421          if ((InterlockedDecrement(&m_pCameraSet->m_cRef) == 0 && m_pCameraSet != 0))
00564423              m_pCameraSet->vtable->__vecDelDtor(1);
00564423          
0056442b          this->m_pCameraSet = nullptr;
0056440f      }
005643d0  }

00564435                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00564440  class TResult* __thiscall ClientUISystem::QueryInterface(class ClientUISystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00564440  {
00564453      int32_t* key;
00564453      
00564453      if ((1 & (*(uint8_t*)$S176)) != 0)
005644a1          key = Offsets[0].key;
00564453      else
00564453      {
0056445d          key = &ClientUISystem_InterfaceType;
00564462          $S176 |= 1;
00564468          Offsets[0].key = 0x7cdb20;
0056446d          Offsets[0].ofs = 0;
00564473          Offsets[1].key = 0x7cda30;
0056447d          Offsets[1].ofs = 0;
00564483          Offsets[2].key = 0x7cdb58;
0056448d          Offsets[2].ofs = 0;
00564493          Offsets[3].key = 0;
00564499          Offsets[3].ofs = 0;
00564453      }
00564453      
005644a8      void* edx_3 = &Offsets;
005644a8      
005644ad      while (key != 0)
005644ad      {
005644cf          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
005644cf          {
005644f2              if (arg4 != 0)
005644f2              {
005644f4                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
005644fe                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
00564501                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
005644f2              }
005644f2              
0056450a              __return->m_val = 0;
0056450d              return __return;
005644cf          }
005644cf          
005644d1          key = *(uint32_t*)((char*)edx_3 + 8);
005644d4          edx_3 += 8;
005644ad      }
005644ad      
005644e2      __return->m_val = 0x80004002;
005644e9      return __return;
00564440  }


00564510  void __thiscall ClientUISystem::SetGroundObject(class ClientUISystem* this, uint32_t arg2, uint8_t arg3)

00564510  {
0056451d      if (this->groundObject != arg2)
0056451d      {
00564528          if (this->vendorID != 0)
00564528          {
0056452c              this->vendorID = 0;
00564533              CM_Vendor::SendNotice_CloseVendor(0);
00564528          }
00564528          
0056453b          uint32_t groundObject = this->groundObject;
0056453b          
00564540          if (groundObject != 0)
00564540          {
00564543              class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(groundObject);
00564543              
0056454d              if (eax_2 != 0)
00564551                  ACCWeenieObject::AddContentsToDestructionQueue(eax_2);
00564551              
00564558              CM_Item::SendNotice_SetGroundObject(0);
00564558              
00564566              if (arg3 != 0)
0056456c                  CM_Inventory::Event_NoLongerViewingContents(this->groundObject);
00564540          }
00564540          
00564574          uint32_t groundObject_1 = this->groundObject;
00564574          
00564579          if (groundObject_1 != 0)
00564579          {
0056457b              uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0056457b              
00564586              if ((ACCWeenieObject::selectedID_1 != 0 && ACCWeenieObject::selectedID_1 != groundObject_1))
00564586              {
00564589                  class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
00564589                  
00564593                  if ((eax_5 != 0 && ACCWeenieObject::IsOwnedByObject(eax_5, this->groundObject) != 0))
005645a8                      ACCWeenieObject::SetSelectedObject(0, 0);
00564586              }
00564579          }
00564579          
005645b2          this->groundObject = arg2;
005645b5          this->requestedGroundObject = arg2;
005645b5          
005645b8          if ((arg2 != 0 && ClientObjMaintSystem::GetWeenieObject(arg2)->vtable->IsCorpse() != 0))
005645d2              ACCWeenieObject::SetCorpseOpened(this->groundObject);
0056451d      }
00564510  }

005645df                                                                                               90                                 .

005645e0  void __fastcall ClientUISystem::OnBeginCharacterSession(class ClientUISystem* this)

005645e0  {
005645e1      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
005645e1      
005645ec      if (ICIDM::s_cidm_1 != 0)
005645ec      {
005645f0          struct IInputActionCallback::VTable** eax_1;
005645f0          
005645f0          if (this == 0)
005645f7              eax_1 = nullptr;
005645f0          else
005645f2              eax_1 = &this->vtable;
005645f2          
005645f9          ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000009, eax_1, 0x3e8);
0056460d          struct IInputActionCallback::VTable** eax_2;
0056460d          
0056460d          if (this == 0)
00564614              eax_2 = nullptr;
0056460d          else
0056460f              eax_2 = &this->vtable;
0056460f          
00564616          ICIDM::s_cidm_1->vtable->RegisterInputMap(0x1000000c, eax_2, 0x3e8);
005645ec      }
005645e0  }

0056462b                                   90 90 90 90 90                                                             .....

00564630  void __fastcall ClientUISystem::UpdateCursorState(class ClientUISystem* this)

00564630  {
00564642      int32_t ebx;
00564642      ebx = SmartBox::get_found_object_id() != 0;
00564649      int32_t eax_1;
00564649      eax_1 = ebx != 0;
0056464c      int32_t edi = 0;
0056464e      int32_t ebp = 0;
00564651      int32_t esi = (eax_1 + 1);
00564651      
0056465c      if (this->m_cBusy <= 0)
0056465c      {
0056466f          enum Target_Mode targetMode = this->targetMode;
0056466f          
00564674          if (targetMode == TARGET_MODE_NONE)
00564674          {
005646db              enum COMBAT_MODE combatMode = ClientCombatSystem::GetCombatSystem()->combatMode;
005646db              
005646e6              if ((combatMode == MELEE_COMBAT_MODE || combatMode == 4))
005646e6              {
005646ff                  int32_t edx_3;
005646ff                  edx_3 = ebx != 0;
00564705                  esi = (edx_3 + 3);
005646e6              }
005646e6              else if (combatMode == 8)
005646eb              {
005646f1                  int32_t ecx_3;
005646f1                  ecx_3 = ebx != 0;
005646f7                  esi = (ecx_3 + 5);
005646eb              }
00564674          }
00564674          else if (targetMode == TARGET_MODE_USE)
00564677          {
005646c5              int32_t eax_11;
005646c5              eax_11 = ebx != 0;
005646c8              edi = 0xe;
005646cd              ebp = 0xe;
005646d2              esi = (eax_11 + 0xc);
00564677          }
00564677          else if (targetMode == 2)
0056467a          {
005646b9              int32_t edx_1;
005646b9              edx_1 = ebx != 0;
00564705              esi = (edx_1 + 0xa);
0056467a          }
0056467a          else if (targetMode == 3)
0056467d          {
00564685              if (ebx == 0)
00564685              {
005646a7                  edi = 0xe;
005646ac                  esi = 0x27;
005646b1                  ebp = 0xe;
00564685              }
00564685              else
00564685              {
0056468d                  int32_t eax_8 = ItemHolder::IsTargetCompatibleWithTargetingObject(SmartBox::get_found_object_id());
00564695                  char temp6_1 = eax_8;
00564695                  eax_8 = -(eax_8);
00564697                  edi = 0xe;
0056469c                  ebp = 0xe;
005646a3                  esi = ((eax_8 - eax_8) + 0x29);
00564685              }
0056467d          }
0056465c      }
0056465c      else
0056465c      {
00564662          int32_t ecx_1;
00564662          ecx_1 = ebx != 0;
00564668          esi = (ecx_1 + 0xe);
0056465c      }
0056465c      
0056470f      class IDClass<_tagDataID,32,0> __return;
0056470f      DBObj::GetDIDByEnum(&__return, esi, 6);
0056471b      class IDClass<_tagDataID,32,0> __return_1 = __return;
0056471b      
00564724      if (__return_1 != this->m_didCurrentCursor.id)
00564724      {
00564726          this->m_didCurrentCursor.id = __return_1;
00564729          class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00564729          
00564731          if (UIElementManager::s_pInstance_1 != 0)
00564738              UIElementManager::SetCursor(UIElementManager::s_pInstance_1, __return_1, edi, ebp, 1);
00564724      }
00564630  }

00564745                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00564750  uint32_t __stdcall ClientUISystem::Handle_Social__SendClientContractTracker(class ClientUISystem* this @ ecx, class CContractTracker const* arg2, int32_t arg3, int32_t arg4)

00564750  {
00564760      class CContractTracker* var_30;
00564760      CContractTracker::CContractTracker(&var_30, arg2);
0056476c      CPlayerSystem::UpdateContractTracker(CPlayerSystem::GetPlayerSystem(), var_30, arg3);
0056476c      
00564777      if (arg4 != 0)
00564777      {
0056477e          var_30 = arg2;
0056477f          void var_2c;
0056477f          CContractTracker::CContractTracker(&var_2c, var_30);
0056478b          CPlayerSystem::SetDisplayContractTracker(CPlayerSystem::GetPlayerSystem(), var_2c);
00564777      }
00564777      
00564793      return 0;
00564750  }

00564796                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005647a0  void __fastcall ClientUISystem::ClientUISystem(class ClientUISystem* this)

005647a0  {
005647a4      this->vtable = &gmUrgentAssistanceUI::`vftable';
005647ab      this->vtable = &IInputActionCallback::`vftable';
005647b6      this->vtable = 0x7cde28;
005647b3      this->vtable = &ClientUISystem::`vftable';
005647c2      this->vtable = "@HV";
005647c9      this->m_cTurbineRefCount.m_cRef = 1;
005647d0      this->m_cTurbineRefCount.vtable = 0x792b6c;
005647dc      this->soundTable = nullptr;
005647df      this->m_pCameraSet = nullptr;
005647e3      ClientUISystem::s_pUISystem = this;
005647e9      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
005647ef      this->m_bLeaveTargetMode = 0;
005647f5      this->m_bRadarVisible = 1;
005647f9      this->m_bRadarBlank = 0;
0056480b      __builtin_memset(&this->m_cBusy, 0, 0x1c);
00564814      this->m_didCurrentCursor.id = INVALID_DID.id;
00564817      class GlobalEventHandler* eax_1 = GlobalEventHandler::GetGlobalEventHandler();
00564817      
0056481e      if (eax_1 != 0)
00564820          eax_1->vtable->RegisterNoticeHandler(0x4dd26d, &this->vtable);
005647a0  }

00564833                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00564840  void* __thiscall ClientUISystem::`vector deleting destructor'(class ClientUISystem* this, uint32_t arg2)

00564840  {
00564843      ClientUISystem::~ClientUISystem(this);
0056484d      void* __offset(ClientUISystem, -0x8) result = ((char*)this - 8);
0056484d      
00564850      if ((arg2 & 1) == 0)
0056485f          return result;
0056485f      
00564853      operator delete(result);
0056485b      return ((char*)this - 8);
00564840  }

00564862        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00564870  void __fastcall ClientUISystem::IncrementBusyCount(class ClientUISystem* this)

00564870  {
00564873      uint32_t edx = (this->m_cBusy + 1);
00564879      this->m_cBusy = edx;
00564879      
0056487c      if (edx != 1)
00564883          return;
00564883      
0056487e      /* tailcall */
0056487e      return ClientUISystem::UpdateCursorState(this);
00564870  }

00564884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00564890  void __fastcall ClientUISystem::DecrementBusyCount(class ClientUISystem* this)

00564890  {
00564890      uint32_t m_cBusy = this->m_cBusy;
00564890      this->m_cBusy -= 1;
00564890      
00564893      if (m_cBusy != 1)
0056489a          return;
0056489a      
00564895      /* tailcall */
00564895      return ClientUISystem::UpdateCursorState(this);
00564890  }

0056489b                                                                                   90 90 90 90 90                             .....

005648a0  void __fastcall ClientUISystem::CleanUpGameUI(class ClientUISystem* this)

005648a0  {
005648a8      CM_Trade::SendNotice_CloseTrade(0x451);
005648a8      
005648b5      if (this->vendorID != 0)
005648b5      {
005648b9          this->vendorID = 0;
005648c0          CM_Vendor::SendNotice_CloseVendor(0);
005648b5      }
005648b5      
005648ce      ClientUISystem::SetGroundObject(this, 0, 1);
005648d3      this->requestedGroundObject = 0;
005648da      ClientCombatSystem::GetCombatSystem()->targetWillinglyLost = 1;
005648e7      ACCWeenieObject::SetSelectedObject(0, 0);
005648a0  }

005648f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00564900  uint32_t __stdcall ClientUISystem::Handle_Item__UseDone(class ClientUISystem* this @ ecx, uint32_t const arg2)

00564900  {
00564900      class ClientUISystem* ClientUISystem::s_pUISystem_1 = ClientUISystem::s_pUISystem;
0056490d      uint32_t esi_1 = (ClientUISystem::s_pUISystem_1->m_cBusy - 1);
00564907      ClientUISystem::s_pUISystem_1->m_cBusy = esi_1;
00564907      
00564914      if (esi_1 == 0)
00564916          ClientUISystem::UpdateCursorState(ClientUISystem::s_pUISystem_1);
00564916      
00564921      if (arg2 != 0)
00564921      {
00564923          class ClientCommunicationSystem* eax_1 = ClientCommunicationSystem::GetCommunicationSystem();
00564923          
0056492a          if (eax_1 != 0)
00564934              ClientCommunicationSystem::HandleFailureEvent(eax_1, arg2, &PStringBase<unsigned short>::null_string);
00564921      }
00564921      
0056493c      return 0;
00564900  }

0056493f                                                                                               90                                 .

00564940  void __thiscall ClientUISystem::SetTargetMode(class ClientUISystem* this, enum Target_Mode arg2)

00564940  {
0056494a      if (this->targetMode != arg2)
0056494a      {
00564950          this->targetMode = arg2;
00564950          
00564953          if (arg2 == TARGET_MODE_NONE)
00564953          {
00564987              this->m_bLeaveTargetMode = 0;
0056498a              class ICIDM* ICIDM::s_cidm_2 = ICIDM::s_cidm;
0056498a              
00564992              if (ICIDM::s_cidm_2 != 0)
00564994                  ICIDM::s_cidm_2->vtable->UnregisterInputMap(0x1000000b, &this->vtable);
00564953          }
00564953          else if ((arg2 > TARGET_MODE_NONE && arg2 <= TARGET_MODE_USE_TARGET))
0056495a          {
0056495c              this->m_bLeaveTargetMode = 0;
0056495f              class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0056495f              
00564967              if (ICIDM::s_cidm_1 != 0)
00564967              {
00564969                  ICIDM::s_cidm_1->vtable->RegisterInputMap(0x1000000b, &this->vtable, 0x7d0);
0056497e                  ClientUISystem::UpdateCursorState(this);
00564984                  return;
00564967              }
0056495a          }
0056495a          
005649a4          ClientUISystem::UpdateCursorState(this);
0056494a      }
00564940  }

005649ad                                         90 90 90                                                               ...

005649b0  void __thiscall ClientUISystem::UseObject(class ClientUISystem* this, uint32_t arg2)

005649b0  {
005649b9      if (arg2 != 0)
005649b9      {
005649c0          ItemHolder::UseObject(arg2, 0, 0);
005649c9          return;
005649b9      }
005649b9      
005649d6      if (this->targetMode != TARGET_MODE_USE)
005649d6      {
005649d8          this->targetMode = TARGET_MODE_USE;
005649db          this->m_bLeaveTargetMode = 0;
005649df          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
005649df          
005649e7          if (ICIDM::s_cidm_1 != 0)
005649e9              ICIDM::s_cidm_1->vtable->RegisterInputMap(0x1000000b, &this->vtable, 0x7d0);
005649e9          
005649fe          ClientUISystem::UpdateCursorState(this);
005649d6      }
005649b0  }

00564a07                       90 90 90 90 90 90 90 90 90                                                         .........

00564a10  void __thiscall ClientUISystem::ExamineObject(class ClientUISystem* this, uint32_t arg2)

00564a10  {
00564a19      if (arg2 != 0)
00564a19      {
00564a1c          CM_Examine::SendNotice_ExamineObject(arg2);
00564a25          return;
00564a19      }
00564a19      
00564a32      if (this->targetMode != TARGET_MODE_EXAMINE)
00564a32      {
00564a34          this->targetMode = TARGET_MODE_EXAMINE;
00564a37          this->m_bLeaveTargetMode = 0;
00564a3b          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00564a3b          
00564a43          if (ICIDM::s_cidm_1 != 0)
00564a45              ICIDM::s_cidm_1->vtable->RegisterInputMap(0x1000000b, &this->vtable, 0x7d0);
00564a45          
00564a5a          ClientUISystem::UpdateCursorState(this);
00564a32      }
00564a10  }

00564a63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00564a70  void __thiscall ClientUISystem::ExamineSpell(class ClientUISystem* this, uint32_t arg2)

00564a70  {
00564a79      if (arg2 != 0)
00564a79      {
00564a7c          CM_Examine::SendNotice_ExamineSpell(arg2);
00564a85          return;
00564a79      }
00564a79      
00564a92      if (this->targetMode != TARGET_MODE_EXAMINE)
00564a92      {
00564a94          this->targetMode = TARGET_MODE_EXAMINE;
00564a97          this->m_bLeaveTargetMode = 0;
00564a9b          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00564a9b          
00564aa3          if (ICIDM::s_cidm_1 != 0)
00564aa5              ICIDM::s_cidm_1->vtable->RegisterInputMap(0x1000000b, &this->vtable, 0x7d0);
00564aa5          
00564aba          ClientUISystem::UpdateCursorState(this);
00564a92      }
00564a70  }

00564ac3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00564ad0  void __fastcall ClientUISystem::OnEndCharacterSession(class ClientUISystem* this)

00564ad0  {
00564ad4      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00564ad4      
00564ade      if (ICIDM::s_cidm_1 != 0)
00564ade      {
00564ae2          struct IInputActionCallback::VTable** eax_1;
00564ae2          
00564ae2          if (this == 0)
00564ae9              eax_1 = nullptr;
00564ae2          else
00564ae4              eax_1 = &this->vtable;
00564ae4          
00564aeb          ICIDM::s_cidm_1->vtable->UnregisterCallback(eax_1);
00564ade      }
00564ade      
00564af3      ClientUISystem::CleanUpGameUI(this);
00564af8      this->m_bLeaveTargetMode = 0;
00564afe      this->m_bRadarBlank = 0;
00564b10      __builtin_memset(&this->m_cBusy, 0, 0x1c);
00564b13      this->m_bRadarVisible = 1;
00564b1c      this->m_didCurrentCursor.id = INVALID_DID.id;
00564b23      /* tailcall */
00564b23      return ClientUISystem::UpdateCursorState(this);
00564ad0  }

00564b28                          90 90 90 90 90 90 90 90                                                          ........

00564b30  void __thiscall ClientUISystem::ExecuteTargetModeForItem(class ClientUISystem* this, uint32_t arg2, enum Target_Mode arg3)

00564b30  {
00564b35      if (arg3 == TARGET_MODE_USE)
00564b35      {
00564b63          ItemHolder::UseObject(arg2, 0, 0);
00564b63          return;
00564b35      }
00564b35      
00564b38      if (arg3 == 2)
00564b38      {
00564b52          ClientUISystem::ExamineObject(this, arg2);
00564b57          return;
00564b38      }
00564b38      
00564b3b      if (arg3 == 3)
00564b42          ItemHolder::TargetAcquired(arg2);
00564b30  }

00564b6e                                            90 90                                                                ..

00564b70  void __stdcall ClientUISystem::ExecuteTargetModeForSpell(class ClientUISystem* this @ ecx, uint32_t arg2, enum Target_Mode arg3)

00564b70  {
00564b77      if (arg3 == TARGET_MODE_EXAMINE)
00564b84          ClientUISystem::ExamineSpell(ClientUISystem::s_pUISystem, arg2);
00564b70  }

00564b8c                                      90 90 90 90                                                              ....

00564b90  uint8_t __thiscall ClientUISystem::OnAction(class ClientUISystem* this, class InputEvent const* arg2)

00564b90  {
00564b90      class InputEvent* edx_5 = arg2;
00564b94      uint32_t m_InputAction = edx_5->m_InputAction;
00564ba1      uint32_t UIElementManager::s_pInstance_1;
00564ba1      
00564ba1      if (m_InputAction > 0x7c)
00564ba1      {
00564df9          if (m_InputAction == 0x1000001e)
00564df9          {
00564e80              edx_5 = this->m_bLeaveTargetMode;
00564e85              int32_t eax_26;
00564e85              eax_26 = edx_5 == 0;
00564e88              this->m_bLeaveTargetMode = eax_26;
00564e8c              CM_UI::SendNotice_UpdateRadarVisibility(eax_26);
00564e96              UIElementManager::s_pInstance_1 = 1;
00564e9c              return 1;
00564df9          }
00564df9          
00564e02          if (m_InputAction == 0x10000025)
00564e02          {
00564e70              ClientUISystem::UseObject(((char*)this - 8), ACCWeenieObject::selectedID);
00564e77              int32_t eax_32;
00564e77              eax_32 = 1;
00564e7d              return 1;
00564e02          }
00564e02          
00564e07          if (m_InputAction != 0x1000002b)
00564e07          {
00564e0b              UIElementManager::s_pInstance_1 = 0;
00564e11              return 0;
00564e07          }
00564e07          
00564e14          class UIElementManager* UIElementManager::s_pInstance_2 = UIElementManager::s_pInstance;
00564e14          
00564e1c          if (UIElementManager::s_pInstance_2 == 0)
00564e1c          {
00564e96              UIElementManager::s_pInstance_1 = 1;
00564e9c              return 1;
00564e1c          }
00564e1c          
00564e23          class UIElement* eax_28 = UIElementManager::GetElement(UIElementManager::s_pInstance_2, 0x100005f7);
00564e23          
00564e37          if ((eax_28 == 0 || (((int8_t)(eax_28->__bitfield164 >> 1)) & 1) == 0))
00564e37          {
00564e56              ClientUISystem::ExamineObject(((char*)this - 8), ACCWeenieObject::selectedID);
00564e5d              int32_t eax_31;
00564e5d              eax_31 = 1;
00564e63              return 1;
00564e37          }
00564e37          
00564e39          eax_28->vtable->SetVisible(0);
00564e44          int32_t eax_29;
00564e44          eax_29 = 1;
00564e4a          return 1;
00564ba1      }
00564ba1      
00564ba7      if (m_InputAction == 0x7c)
00564ba7      {
00564dd2          if (KeyStone::IsPluginManagerOpen() != 0)
00564dd2          {
00564dd4              KeyStone::ClosePluginManager();
00564ddb              int32_t eax_24;
00564ddb              eax_24 = 1;
00564de1              return 1;
00564dd2          }
00564dd2          
00564de4          KeyStone::OpenPluginManager();
00564deb          int32_t eax_25;
00564deb          eax_25 = 1;
00564df1          return 1;
00564ba7      }
00564ba7      
00564bb3      if ((m_InputAction - 7) > 0x74)
00564bb3      {
00564e0b          UIElementManager::s_pInstance_1 = 0;
00564e11          return 0;
00564bb3      }
00564bb3      
00564bb3      switch (m_InputAction)
00564bb3      {
00564d9e          case 7:
00564d9e          case 8:
00564d9e          {
00564d9e              UIElementManager::s_pInstance_1 = edx_5->m_fStart;
00564d9e              
00564daa              if ((UIElementManager::s_pInstance_1 != 0 && this->attemptOpenVendorID != 0))
00564dac                  this->m_didCurrentCursor.id = 1;
00564dac              
00564db0              UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00564db0              
00564db7              if (UIElementManager::s_pInstance_1 != 0)
00564dc8                  return *(uint32_t*)(*(uint32_t*)(UIElementManager::s_pInstance_1 + 4) + 4)(edx_5);
00564dc8              
00564e0b              UIElementManager::s_pInstance_1 = 0;
00564e11              return 0;
00564d9e              break;
00564d9e          }
00564e0b          case 9:
00564e0b          case 0xa:
00564e0b          case 0xb:
00564e0b          case 0xc:
00564e0b          case 0xd:
00564e0b          case 0xe:
00564e0b          case 0xf:
00564e0b          case 0x10:
00564e0b          case 0x11:
00564e0b          case 0x12:
00564e0b          case 0x13:
00564e0b          case 0x14:
00564e0b          case 0x15:
00564e0b          case 0x16:
00564e0b          case 0x17:
00564e0b          case 0x18:
00564e0b          case 0x19:
00564e0b          case 0x1a:
00564e0b          case 0x1b:
00564e0b          case 0x1c:
00564e0b          case 0x1d:
00564e0b          case 0x1e:
00564e0b          case 0x1f:
00564e0b          case 0x20:
00564e0b          case 0x21:
00564e0b          case 0x22:
00564e0b          case 0x23:
00564e0b          case 0x24:
00564e0b          case 0x25:
00564e0b          case 0x26:
00564e0b          case 0x28:
00564e0b          case 0x29:
00564e0b          case 0x2a:
00564e0b          case 0x2b:
00564e0b          case 0x2c:
00564e0b          case 0x2d:
00564e0b          case 0x2e:
00564e0b          case 0x2f:
00564e0b          case 0x30:
00564e0b          case 0x31:
00564e0b          case 0x32:
00564e0b          case 0x33:
00564e0b          case 0x34:
00564e0b          case 0x35:
00564e0b          case 0x36:
00564e0b          case 0x37:
00564e0b          case 0x38:
00564e0b          case 0x39:
00564e0b          case 0x3a:
00564e0b          case 0x3b:
00564e0b          case 0x3c:
00564e0b          case 0x3d:
00564e0b          case 0x3e:
00564e0b          case 0x3f:
00564e0b          case 0x40:
00564e0b          case 0x41:
00564e0b          case 0x42:
00564e0b          case 0x43:
00564e0b          case 0x44:
00564e0b          case 0x45:
00564e0b          case 0x46:
00564e0b          case 0x47:
00564e0b          case 0x48:
00564e0b          case 0x49:
00564e0b          case 0x4a:
00564e0b          case 0x4b:
00564e0b          case 0x4c:
00564e0b          case 0x4d:
00564e0b          case 0x4e:
00564e0b          case 0x4f:
00564e0b          case 0x50:
00564e0b          case 0x51:
00564e0b          case 0x52:
00564e0b          case 0x53:
00564e0b          case 0x54:
00564e0b          case 0x56:
00564e0b          case 0x57:
00564e0b          case 0x58:
00564e0b          case 0x59:
00564e0b          case 0x5a:
00564e0b          case 0x5b:
00564e0b          case 0x5c:
00564e0b          case 0x5d:
00564e0b          case 0x5e:
00564e0b          case 0x5f:
00564e0b          case 0x60:
00564e0b          case 0x61:
00564e0b          case 0x62:
00564e0b          case 0x63:
00564e0b          case 0x64:
00564e0b          case 0x65:
00564e0b          case 0x66:
00564e0b          case 0x67:
00564e0b          case 0x68:
00564e0b          case 0x69:
00564e0b          case 0x6a:
00564e0b          case 0x6b:
00564e0b          case 0x6c:
00564e0b          case 0x6d:
00564e0b          case 0x6e:
00564e0b          case 0x6f:
00564e0b          case 0x70:
00564e0b          case 0x71:
00564e0b          case 0x72:
00564e0b          case 0x73:
00564e0b          case 0x74:
00564e0b          case 0x75:
00564e0b          case 0x76:
00564e0b          case 0x77:
00564e0b          case 0x78:
00564e0b          case 0x79:
00564e0b          case 0x7a:
00564e0b          {
00564e0b              UIElementManager::s_pInstance_1 = 0;
00564e11              return 0;
00564e0b              break;
00564e0b          }
00564be1          case 0x27:
00564be1          {
00564be1              class UIElementManager* UIElementManager::s_pInstance_3 = UIElementManager::s_pInstance;
00564bee              long double st0_1 = ClientCombatSystem::GetJumpPowerLevel(ClientCombatSystem::GetCombatSystem());
00564bf3              long double temp4_1 = ((long double)0.0);
00564bf3              (st0_1 - temp4_1);
00564bf3              
00564bfe              if ((*(uint8_t*)((char*)((((st0_1 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp4_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00564bfe              {
00564c00                  SmartBox::smartbox->cmdinterp->vtable->FinishJump();
00564c13                  int32_t eax_3;
00564c13                  eax_3 = 1;
00564c19                  return 1;
00564bfe              }
00564bfe              
00564c1e              if (UIElementManager::s_pInstance_3 != 0)
00564c1e              {
00564c20                  class UIElement* m_focusElement = UIElementManager::s_pInstance_3->m_focusElement;
00564c20                  
00564c28                  if (m_focusElement != 0)
00564c28                  {
00564c2a                      m_focusElement->vtable->RelinquishFocus();
00564c34                      int32_t eax_5;
00564c34                      eax_5 = 1;
00564c3a                      return 1;
00564c28                  }
00564c1e              }
00564c1e              
00564c4b              int32_t eax_6 = SmartBox::smartbox->cmdinterp->vtable->IsStandingStill();
00564c53              char ebx_2 = ((int8_t)-(eax_6));
00564c55              ebx_2 = (ebx_2 - ebx_2);
00564c59              uint8_t eax_8;
00564c59              
00564c59              if (ebx_2 == 0xff)
00564c62                  eax_8 = ClientCombatSystem::RepeatAttackInProgress(ClientCombatSystem::GetCombatSystem());
00564c62              
00564c69              if ((ebx_2 != 0xff || eax_8 != 0))
00564c69              {
00564ccf                  SmartBox::smartbox->cmdinterp->vtable->StopCompletely();
00564ccf                  
00564ce4                  if (ebx_2 != 0xff)
00564ce4                  {
00564cef                      void var_8;
00564cef                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8, &ClientUISystem::`vftable'.RecvNotice_SwearAllegianceRequest);
00564d02                      ClientSystem::AddTextToScroll(((char*)this - 8), &var_8, 0x1a, 1, 0);
00564d0b                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00564ce4                  }
00564ce4                  
00564d1e                  if (ClientCombatSystem::RepeatAttackInProgress(ClientCombatSystem::GetCombatSystem()) == 0)
00564d1e                  {
00564e0b                      UIElementManager::s_pInstance_1 = 0;
00564e11                      return 0;
00564d1e                  }
00564d1e                  
00564d2b                  ClientCombatSystem::AbortAutomaticAttack(ClientCombatSystem::GetCombatSystem());
00564d32                  int32_t eax_17;
00564d32                  eax_17 = 0;
00564d38                  return 0;
00564c69              }
00564c69              
00564c70              if (this->attemptOpenVendorID != 0)
00564c70              {
00564c77                  ClientUISystem::SetTargetMode(((char*)this - 8), TARGET_MODE_NONE);
00564c7e                  int32_t eax_10;
00564c7e                  eax_10 = 1;
00564c84                  return 1;
00564c70              }
00564c70              
00564c8e              if (ACCWeenieObject::selectedID != 0)
00564c8e              {
00564c90                  ClientCombatSystem::GetCombatSystem()->targetWillinglyLost = 1;
00564c9d                  ACCWeenieObject::SetSelectedObject(0, 0);
00564ca7                  int32_t eax_12;
00564ca7                  eax_12 = 1;
00564cad                  return 1;
00564c8e              }
00564c8e              
00564cb2              if (UIElementManager::s_pInstance_3 == 0)
00564cb2              {
00564e96                  UIElementManager::s_pInstance_1 = 1;
00564e9c                  return 1;
00564cb2              }
00564cb2              
00564cbf              UIElementManager::DoVisibilityToggleAction(UIElementManager::s_pInstance_3, 0x1000001b);
00564cc6              int32_t eax_13;
00564cc6              eax_13 = 1;
00564ccc              return 1;
00564be1              break;
00564be1          }
00564d3f          case 0x55:
00564d3f          {
00564d3f              PStringBase<char>::PStringBase<char>(&arg2);
00564d3f              
00564d53              if (Device::SaveScreenshot(&arg2) != 0)
00564d53              {
00564d59                  class InputEvent* var_18_2 = arg2;
00564d66                  void var_4;
00564d66                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, Formatted, &ClientUISystem::`vftable'.RecvNotice_CreateObject);
00564d7c                  ClientSystem::AddTextToScroll(((char*)this - 8), &var_4, 0x1a, 1, 0);
00564d85                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
00564d53              }
00564d53              
00564d8e              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00564d95              int32_t eax_19;
00564d95              eax_19 = 1;
00564d9b              return 1;
00564d3f              break;
00564d3f          }
00564bce          case 0x7b:
00564bce          {
00564bce              KeyStone::OpenHelp(0, 0x10000001);
00564bd8              int32_t eax;
00564bd8              eax = 1;
00564bde              return 1;
00564bce              break;
00564bce          }
00564bb3      }
00564b90  }

00564e9f                                                                                               90                                 .
00564ea0  uint32_t jump_table_564ea0[0x5] = 
00564ea0  {
00564ea0      [0x0] =  0x00564d9e
00564ea4      [0x1] =  0x00564be1
00564ea8      [0x2] =  0x00564d3b
00564eac      [0x3] =  0x00564bc7
00564eb0      [0x4] =  0x00564e09
00564eb4  }
00564eb4  uint8_t lookup_table_564eb4[0x75] = 
00564eb4  {
00564eb4      [0x00] =  0x00
00564eb5      [0x01] =  0x00
00564eb6      [0x02] =  0x04
00564eb7      [0x03] =  0x04
00564eb8      [0x04] =  0x04
00564eb9      [0x05] =  0x04
00564eba      [0x06] =  0x04
00564ebb      [0x07] =  0x04
00564ebc      [0x08] =  0x04
00564ebd      [0x09] =  0x04
00564ebe      [0x0a] =  0x04
00564ebf      [0x0b] =  0x04
00564ec0      [0x0c] =  0x04
00564ec1      [0x0d] =  0x04
00564ec2      [0x0e] =  0x04
00564ec3      [0x0f] =  0x04
00564ec4      [0x10] =  0x04
00564ec5      [0x11] =  0x04
00564ec6      [0x12] =  0x04
00564ec7      [0x13] =  0x04
00564ec8      [0x14] =  0x04
00564ec9      [0x15] =  0x04
00564eca      [0x16] =  0x04
00564ecb      [0x17] =  0x04
00564ecc      [0x18] =  0x04
00564ecd      [0x19] =  0x04
00564ece      [0x1a] =  0x04
00564ecf      [0x1b] =  0x04
00564ed0      [0x1c] =  0x04
00564ed1      [0x1d] =  0x04
00564ed2      [0x1e] =  0x04
00564ed3      [0x1f] =  0x04
00564ed4      [0x20] =  0x01
00564ed5      [0x21] =  0x04
00564ed6      [0x22] =  0x04
00564ed7      [0x23] =  0x04
00564ed8      [0x24] =  0x04
00564ed9      [0x25] =  0x04
00564eda      [0x26] =  0x04
00564edb      [0x27] =  0x04
00564edc      [0x28] =  0x04
00564edd      [0x29] =  0x04
00564ede      [0x2a] =  0x04
00564edf      [0x2b] =  0x04
00564ee0      [0x2c] =  0x04
00564ee1      [0x2d] =  0x04
00564ee2      [0x2e] =  0x04
00564ee3      [0x2f] =  0x04
00564ee4      [0x30] =  0x04
00564ee5      [0x31] =  0x04
00564ee6      [0x32] =  0x04
00564ee7      [0x33] =  0x04
00564ee8      [0x34] =  0x04
00564ee9      [0x35] =  0x04
00564eea      [0x36] =  0x04
00564eeb      [0x37] =  0x04
00564eec      [0x38] =  0x04
00564eed      [0x39] =  0x04
00564eee      [0x3a] =  0x04
00564eef      [0x3b] =  0x04
00564ef0      [0x3c] =  0x04
00564ef1      [0x3d] =  0x04
00564ef2      [0x3e] =  0x04
00564ef3      [0x3f] =  0x04
00564ef4      [0x40] =  0x04
00564ef5      [0x41] =  0x04
00564ef6      [0x42] =  0x04
00564ef7      [0x43] =  0x04
00564ef8      [0x44] =  0x04
00564ef9      [0x45] =  0x04
00564efa      [0x46] =  0x04
00564efb      [0x47] =  0x04
00564efc      [0x48] =  0x04
00564efd      [0x49] =  0x04
00564efe      [0x4a] =  0x04
00564eff      [0x4b] =  0x04
00564f00      [0x4c] =  0x04
00564f01      [0x4d] =  0x04
00564f02      [0x4e] =  0x02
00564f03      [0x4f] =  0x04
00564f04      [0x50] =  0x04
00564f05      [0x51] =  0x04
00564f06      [0x52] =  0x04
00564f07      [0x53] =  0x04
00564f08      [0x54] =  0x04
00564f09      [0x55] =  0x04
00564f0a      [0x56] =  0x04
00564f0b      [0x57] =  0x04
00564f0c      [0x58] =  0x04
00564f0d      [0x59] =  0x04
00564f0e      [0x5a] =  0x04
00564f0f      [0x5b] =  0x04
00564f10      [0x5c] =  0x04
00564f11      [0x5d] =  0x04
00564f12      [0x5e] =  0x04
00564f13      [0x5f] =  0x04
00564f14      [0x60] =  0x04
00564f15      [0x61] =  0x04
00564f16      [0x62] =  0x04
00564f17      [0x63] =  0x04
00564f18      [0x64] =  0x04
00564f19      [0x65] =  0x04
00564f1a      [0x66] =  0x04
00564f1b      [0x67] =  0x04
00564f1c      [0x68] =  0x04
00564f1d      [0x69] =  0x04
00564f1e      [0x6a] =  0x04
00564f1f      [0x6b] =  0x04
00564f20      [0x6c] =  0x04
00564f21      [0x6d] =  0x04
00564f22      [0x6e] =  0x04
00564f23      [0x6f] =  0x04
00564f24      [0x70] =  0x04
00564f25      [0x71] =  0x04
00564f26      [0x72] =  0x04
00564f27      [0x73] =  0x04
00564f28      [0x74] =  0x03
00564f29  }

00564f29                             90 90 90 90 90 90 90                                                           .......

00564f30  uint32_t ClientUISystem::Handle_Misc__PortalStormSubsided(class ClientUISystem* this @ ecx)

00564f30  {
00564f3b      void var_90;
00564f3b      StringInfo::StringInfo(&var_90);
00564f53      class PStringBase<unsigned short> var_94;
00564f53      PStringBase<unsigned short>::allocate_ref_buffer(&var_94, wcslen(&ClientUISystem::`vftable'.RecvNotice_LoadChanged));
00564f62      wcscpy(var_94, &ClientUISystem::`vftable'.RecvNotice_LoadChanged);
00564f76      StringInfo::SetLiteralValue(&var_90, &var_94, 1);
00564f7f      int32_t* esi_1 = (var_94 - 0x14);
00564f7f      
00564f92      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00564f9a          **(uint32_t**)esi_1(1);
00564f9a      
00564fa3      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00564faa      CM_Misc::SendNotice_PortalStormLevel(0f);
00564fb6      StringInfo::~StringInfo(&var_90);
00564fc4      return 0;
00564f30  }

00564fc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00564fd0  uint32_t __stdcall ClientUISystem::Handle_Misc__PortalStormBrewing(class ClientUISystem* this @ ecx, float arg2)

00564fd0  {
00564fdb      void var_90;
00564fdb      StringInfo::StringInfo(&var_90);
00564ff3      class PStringBase<unsigned short> var_94;
00564ff3      PStringBase<unsigned short>::allocate_ref_buffer(&var_94, wcslen(&ClientUISystem::`vftable'.RecvNotice_FellowAdded));
00565002      wcscpy(var_94, &ClientUISystem::`vftable'.RecvNotice_FellowAdded);
00565016      StringInfo::SetLiteralValue(&var_90, &var_94, 1);
0056501f      int32_t* esi_1 = (var_94 - 0x14);
0056501f      
00565032      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0056503a          **(uint32_t**)esi_1(1);
0056503a      
00565043      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00565048      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00565053      uint32_t player_id;
00565053      
00565053      if (SmartBox::smartbox_1 == 0)
0056505d          player_id = 0;
00565053      else
00565055          player_id = SmartBox::smartbox_1->player_id;
00565055      
00565060      class CPhysicsObj* eax_4 = ClientObjMaintSystem::GetPhysicsObject(player_id);
00565060      
0056506a      if (eax_4 != 0)
00565072          CPhysicsObj::play_script(eax_4, PS_PortalStorm, 0f);
00565072      
0056507f      CM_Misc::SendNotice_PortalStormLevel(arg2);
0056508b      StringInfo::~StringInfo(&var_90);
00565098      return 0;
00564fd0  }

0056509b                                                                                   90 90 90 90 90                             .....

005650a0  uint32_t __stdcall ClientUISystem::Handle_Misc__PortalStormImminent(class ClientUISystem* this @ ecx, float arg2)

005650a0  {
005650ab      void var_90;
005650ab      StringInfo::StringInfo(&var_90);
005650c3      class PStringBase<unsigned short> var_94;
005650c3      PStringBase<unsigned short>::allocate_ref_buffer(&var_94, wcslen(&ClientUISystem::`vftable'.RecvNotice_UpdateItemMana));
005650d2      wcscpy(var_94, &ClientUISystem::`vftable'.RecvNotice_UpdateItemMana);
005650e6      StringInfo::SetLiteralValue(&var_90, &var_94, 1);
005650ef      int32_t* esi_1 = (var_94 - 0x14);
005650ef      
00565102      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0056510a          **(uint32_t**)esi_1(1);
0056510a      
00565113      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00565118      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00565123      uint32_t player_id;
00565123      
00565123      if (SmartBox::smartbox_1 == 0)
0056512d          player_id = 0;
00565123      else
00565125          player_id = SmartBox::smartbox_1->player_id;
00565125      
00565130      class CPhysicsObj* eax_4 = ClientObjMaintSystem::GetPhysicsObject(player_id);
00565130      
0056513a      if (eax_4 != 0)
00565145          CPhysicsObj::play_script(eax_4, PS_PortalStorm, 1f);
00565145      
00565152      CM_Misc::SendNotice_PortalStormLevel(arg2);
0056515e      StringInfo::~StringInfo(&var_90);
0056516b      return 0;
005650a0  }

0056516e                                            90 90                                                                ..

00565170  uint32_t __fastcall ClientUISystem::Handle_Misc__PortalStorm(class ClientUISystem* this)

00565170  {
00565170      class ClientUISystem* this_1 = this;
00565187      PStringBase<unsigned short>::allocate_ref_buffer(&this_1, wcslen(&ClientUISystem::`vftable'.RecvNotice_SetDisplayContractTracker));
00565196      wcscpy(this_1, &ClientUISystem::`vftable'.RecvNotice_SetDisplayContractTracker);
0056519c      CM_Misc::SendNotice_PlayerPortalStormed();
005651a3      CM_Misc::SendNotice_PortalStormLevel(0f);
005651b8      ClientSystem::AddTextToScroll(this, &this_1, 0, 1, 0);
005651c1      void* __offset(ClientUISystem, -0x14) esi_2 = ((char*)this_1 - 0x14);
005651c1      
005651d4      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005651dc          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
005651dc      
005651e2      return 0;
00565170  }

005651e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005651f0  void __fastcall ClientUISystem::UseTime(class ClientUISystem* this)

005651f0  {
005651f4      int32_t ebp;
005651f4      int32_t var_20 = ebp;
005651f5      class ICIDM* ICIDM::s_cidm_2 = ICIDM::s_cidm;
00565210      int32_t* Timer::cur_time_2 = nullptr;
0056521b      class TResult __return;
0056521b      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, &PlayerDesc_ClassType, &Timer::cur_time_2);
00565220      int32_t* Timer::cur_time_3 = Timer::cur_time_2;
00565234      class PlayerDesc* var_8 = nullptr;
00565238      int32_t var_4 = 0;
00565238      
0056523c      if (Timer::cur_time_3 != 0)
00565242          *(uint32_t*)(*(uint32_t*)Timer::cur_time_3 + 0x10)(Timer::cur_time_3, 0);
00565242      
00565257      double var_10;
00565257      int32_t var_20_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_10);
00565257      
0056525b      if (Timer::cur_time_3 != 0)
00565261          *(uint32_t*)(*(uint32_t*)Timer::cur_time_3 + 0x14)(Timer::cur_time_3, 0);
00565261      
0056526a      int32_t* Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0056526f      struct ICIDM::VTable* vtable = ICIDM::s_cidm_2->vtable;
00565272      __return = *(int32_t*)((char*)Timer::cur_time + 4);
00565278      Timer::cur_time_2 = Timer::cur_time_1;
0056527c      vtable->GetLastInputTimestamp(Timer::cur_time_3, 0);
0056527f      long double x87_r0;
0056527f      long double x87_r0_1 = (((long double)var_10) - x87_r0);
00565283      class PlayerDesc* edi_1 = var_8;
00565287      long double temp0 = ((long double)1200.0);
00565287      (x87_r0_1 - temp0);
00565287      
0056529c      if ((((*(uint8_t*)((char*)((((x87_r0_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r0_1 == temp0) ? 1 : 0) << 0xe) | 0x800)))))[1] & 0x41) == 0 && (edi_1 != 0 && Timer::cur_time_2 >= 0)) && PlayerDesc::PlayerIsPSR(edi_1) == 0))
005652b1          CPlayerSystem::LogOffCharacter(CPlayerSystem::GetPlayerSystem(), 0);
005652b1      
005652b9      if (this->m_bLeaveTargetMode != 0)
005652b9      {
005652be          if (this->targetMode != TARGET_MODE_NONE)
005652be          {
005652c0              this->targetMode = TARGET_MODE_NONE;
005652c3              this->m_bLeaveTargetMode = 0;
005652c6              class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
005652c6              
005652ce              if (ICIDM::s_cidm_1 != 0)
005652d0                  ICIDM::s_cidm_1->vtable->UnregisterInputMap(0x1000000b, &this->vtable);
005652d0              
005652e0              ClientUISystem::UpdateCursorState(this);
005652be          }
005652be          
005652e5          this->m_bLeaveTargetMode = 0;
005652b9      }
005652b9      
005652ea      if (edi_1 != 0)
005652ec          edi_1->vtable->Release();
005651f0  }

005652fb                                                                                   90 90 90 90 90                             .....

00565300  class PStringBase<char>* GenerateMaterialsSalvagedString(class PStringBase<char>* __return, class PackableList<SalvageResult>* arg2)

00565300  {
00565308      class PackableLLNode<SalvageResult>* i = arg2->head;
00565316      arg2 = 1;
0056531b      class PStringBase<char> var_4;
0056531b      PStringBase<char>::PStringBase<char>(&var_4, &data_7928af);
0056531b      
00565322      if (i != 0)
00565322      {
00565328          int32_t ebx;
00565328          int32_t var_1c_1 = ebx;
00565328          
0056542f          do
0056542f          {
00565330              bool cond:0_1 = i == 0;
00565332              class PackableLLNode<SalvageResult>* i_1 = i;
00565332              
00565334              if (i != 0)
00565334              {
00565336                  i = i->next;
00565339                  cond:0_1 = i == 0;
00565334              }
00565334              
0056533b              char const* const eax_1 = "Unknown";
00565340              ebx = cond:0_1;
0056534b              char const j;
0056534b              
0056534b              do
0056534b              {
00565346                  j = *(uint8_t*)eax_1;
00565348                  eax_1 = &eax_1[1];
0056534b              } while (j != 0);
00565354              class PStringBase<char> var_8;
00565354              PStringBase<char>::allocate_ref_buffer(&var_8, (eax_1 - "nknown"));
00565359              uint8_t* edx_1 = var_8;
0056535d              char const* const ecx_2 = "Unknown";
0056536a              uint8_t j_1;
0056536a              
0056536a              do
0056536a              {
00565362                  j_1 = *(uint8_t*)ecx_2;
00565364                  ecx_2 = &ecx_2[1];
00565365                  *(uint8_t*)edx_1 = j_1;
00565367                  edx_1 = &edx_1[1];
0056536a              } while (j_1 != 0);
00565379              MaterialTypeEnumMapper::MaterialTypeToString(CInputManager::GetMouseX(i_1), &var_8);
00565382              class PStringBase<char> esi_1 = var_8;
0056538b              char* m_charbuffer_1;
0056538b              
0056538b              if (arg2 == 0)
0056538b              {
005653a8                  char* var_20_4;
005653a8                  
005653a8                  if (ebx == 0)
005653b1                      var_20_4 = &data_794334;
005653a8                  else
005653aa                      var_20_4 = &ClientUISystem::`vftable'.RecvNotice_CraftInteraction_ConfirmationRequest;
005653aa                  
005653b6                  PStringBase<char>::PStringBase<char>(&m_charbuffer_1, var_20_4);
0056538b              }
0056538b              else
0056538b              {
0056538d                  class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
00565392                  m_charbuffer_1 = m_charbuffer;
0056539a                  InterlockedIncrement(&m_charbuffer[-1]);
0056538b              }
0056538b              
005653c5              uint32_t var_24_1;
005653c5              var_24_1 = ((double)EnchantmentSpell::InqDuration(i_1));
005653c8              class PStringBase<char> var_28_1 = esi_1;
005653cb              int32_t eax_6 = PhysicsDesc::get_autonomous_movement(i_1);
005653d0              char* m_charbuffer_2 = m_charbuffer_1;
005653d4              int32_t var_2c_1 = eax_6;
005653d5              char* m_charbuffer_3 = m_charbuffer_2;
005653da              void (__thiscall** const var_34_1)(class gmNoticeHandler* this, uint32_t, class StringInfo const*) = &ClientUISystem::`vftable'.RecvNotice_SetChatWindowTitle;
005653df              int32_t* var_38_1 = &var_4;
005653e0              PStringBase<char>::sprintf_append(eax_6, m_charbuffer_2);
005653ef              void* esi_3 = &m_charbuffer_1[0xffffffec];
005653ef              
00565401              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00565409                  **(uint32_t**)esi_3(1);
00565409              
0056540f              int32_t* esi_5 = (var_8 - 0x14);
00565416              arg2 = 0;
00565416              
00565423              if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0056542b                  **(uint32_t**)esi_5(1);
0056542f          } while (i != 0);
00565322      }
00565322      
00565436      class PStringBase<char> eax_10 = var_4;
0056543e      __return->m_charbuffer = eax_10;
00565444      InterlockedIncrement((eax_10 - 0x10));
0056544e      int32_t* esi_7 = (var_4 - 0x14);
0056544e      
00565461      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
00565469          **(uint32_t**)esi_7(1);
00565469      
00565473      return __return;
00565300  }

00565474                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00565480  class PStringBase<unsigned short>* GenerateNonSuitablesString(class PStringBase<unsigned short>* __return, class PackableList<unsigned long>* arg2)

00565480  {
00565499      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_2;
00565499      PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_2, wcslen(&ClientUISystem::`vftable'.RecvNotice_CloseVendor));
005654a8      wcscpy(PStringBase<unsigned short>::s_NullBuffer_2, &ClientUISystem::`vftable'.RecvNotice_CloseVendor);
005654b2      class PackableLLNode<unsigned long>* i = arg2->head;
005654b5      int32_t esi = 0;
005654bc      int32_t var_4 = 0;
005654bc      
005654c0      if (i == 0)
005654c0      {
00565536      label_565536:
00565536          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
00565536          
00565540          if (PStringBase<unsigned short>::s_NullBuffer_4 != PStringBase<unsigned short>::s_NullBuffer)
00565540          {
00565559              if ((InterlockedDecrement((PStringBase<unsigned short>::s_NullBuffer_4 - 0x10)) == 0 && PStringBase<unsigned short>::s_NullBuffer_4 != 0x14))
00565561                  **(uint32_t**)(PStringBase<unsigned short>::s_NullBuffer_4 - 0x14)(1);
00565561              
00565563              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00565568              PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
00565570              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00565540          }
005654c0      }
005654c0      else
005654c0      {
0056552f          do
0056552f          {
005654c7              class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(i->data);
005654c7              
005654d1              if (eax_2 != 0)
005654d1              {
005654d5                  void (__thiscall** const ebx_1)(class gmNoticeHandler* this, class PStringBase<char> const*) = &ClientUISystem::`vftable'.RecvNotice_UserPreferenceChanged;
005654d5                  
005654da                  if (esi != 0)
005654dc                      ebx_1 = &ClientUISystem::`vftable'.RecvNotice_UpdateSquelchPanel;
005654dc                  
005654e1                  class AC1Legacy::PSRefBuffer<char>* m_buffer = eax_2->pwd._name.m_buffer;
005654eb                  uint16_t* edx_2 = InterlockedIncrement(&m_buffer->m_cRef);
005654f4                  char (* var_1c_3)[0x1] = &m_buffer->m_data;
005654f5                  void (__thiscall** const var_20_1)(class gmNoticeHandler* this, class PStringBase<char> const*) = ebx_1;
005654fa                  void (__thiscall** const var_24_1)(class gmNoticeHandler* this, uint8_t) = &ClientUISystem::`vftable'.RecvNotice_ToggleChatEntry;
005654ff                  class PStringBase<unsigned short>* var_28_1 = &PStringBase<unsigned short>::s_NullBuffer_2;
00565500                  PStringBase<unsigned short>::sprintf_append(&m_buffer->m_data, edx_2);
00565500                  
00565515                  if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00565517                      m_buffer->vtable->__vecDelDtor(1);
00565517                  
00565523                  int32_t eax_6 = (var_4 + 1);
00565524                  var_4 = eax_6;
00565528                  esi = eax_6;
005654d1              }
005654d1              
0056552a              i = i->next;
0056552f          } while (i != 0);
0056552f          
00565534          if (esi == 0)
00565534              goto label_565536;
00565534          
0056558b          PStringBase<unsigned short>::allocate_ref_buffer(&arg2, wcslen(&ClientUISystem::`vftable'.RecvNotice_StackSliderChanged));
0056559a          wcscpy(arg2, &ClientUISystem::`vftable'.RecvNotice_StackSliderChanged);
005655a0          class PackableList<unsigned long>* ecx_5 = arg2;
005655a4          int32_t vtable = ecx_5->vtable;
005655a4          
005655ad          if (vtable != 1)
005655ad          {
005655b6              PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_2, ecx_5, (vtable - 1));
005655bb              ecx_5 = arg2;
005655ad          }
005655ad          
005655d2          if ((InterlockedDecrement(&ecx_5[-1]) == 0 && ecx_5 != 0x14))
005655da              *(uint32_t*)*(int32_t*)((char*)ecx_5 + -0x14)(1);
005654c0      }
005654c0      
005655dc      class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
005655e4      __return->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_3;
005655ea      InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_3 - 0x10));
005655f4      int32_t* esi_4 = (PStringBase<unsigned short>::s_NullBuffer_2 - 0x14);
005655f4      
00565607      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0056560f          **(uint32_t**)esi_4(1);
0056560f      
00565619      return __return;
00565480  }

0056561a                                                                                90 90 90 90 90 90                            ......

00565620  uint32_t __fastcall ClientUISystem::Handle_Inventory__Recv_SalvageOperationsResultData(class ClientUISystem* this, class SalvageOperationsResultData const* arg2)

00565620  {
00565633      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00565633      AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &data_7928af);
00565641      int32_t eax = gmCCommunicationSystem::IsSquelched(0, &AC1Legacy::PStringBase<char>::s_NullBuffer_2, 0x19);
0056564e      int32_t* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0056564e      
00565663      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3[1]) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
0056566b          **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_3(1);
0056566b      
0056566f      if (eax == 0)
0056566f      {
00565675          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00565680          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
00565688          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0056568a          class SalvageOperationsResultData* edi_1 = arg2;
0056568a          
0056569a          if (SalvageOperationsResultData::GetSalvageResults(edi_1)->head != 0)
0056569a          {
005656ad              class PStringBase<char> __return;
005656ad              GenerateMaterialsSalvagedString(&__return, SalvageOperationsResultData::GetSalvageResults(edi_1));
005656b2              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005656b7              AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005656c2              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005656d1              AppraisalSystem::SkillToString(CInputManager::GetMouseX(edi_1), &AC1Legacy::PStringBase<char>::s_NullBuffer_2);
005656d6              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
005656db              arg2 = PStringBase<unsigned short>::s_NullBuffer_2;
005656e6              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
005656e6              
005656f1              if (CBasePin::GetMediaTypeVersion(edi_1) != 0)
005656f1              {
005656fa                  int32_t __saved_ebp_6 = CBasePin::GetMediaTypeVersion(edi_1);
00565705                  PStringBase<unsigned short>::sprintf(&arg2, u" Your augmentation has given you…");
005656f1              }
005656f1              
00565716              class PStringBase<char> __return_1 = __return;
0056571a              class SalvageOperationsResultData* var_24_3 = arg2;
0056571e              char (* var_28_2)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data;
0056571f              class PStringBase<char> __return_2 = __return_1;
0056572a              PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_3, u"You obtain %hs using your knowle…");
00565741              ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_3, 0, 1, 0);
0056574a              void* __offset(SalvageOperationsResultData, -0x14) esi_2 = ((char*)arg2 - 0x14);
0056574a              
00565759              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00565761                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00565761              
00565763              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00565763              
00565773              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
00565775                  AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
00565775              
0056578d              if ((InterlockedDecrement((__return_1 - 0x10)) == 0 && __return_1 != 0x14))
00565795                  **(uint32_t**)(__return_1 - 0x14)(1);
0056569a          }
0056569a          
005657a3          if (ArrayPropertyValue::AccessArray(edi_1)->m_sizeAndDeallocate != 0)
005657a3          {
005657c5              ClientSystem::AddTextToScroll(this, GenerateNonSuitablesString(&arg2, ArrayPropertyValue::AccessArray(edi_1)), 0, 1, 0);
005657ce              void* __offset(SalvageOperationsResultData, -0x14) esi_5 = ((char*)arg2 - 0x14);
005657ce              
005657dd              if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
005657e5                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
005657a3          }
005657a3          
005657f3          if ((SalvageOperationsResultData::GetSalvageResults(edi_1)->head == 0 && ArrayPropertyValue::AccessArray(edi_1)->m_sizeAndDeallocate == 0))
005657f3          {
0056580c              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Salvaging Failed!\n");
00565820              ClientSystem::AddTextToScroll(this, &arg2, 0, 1, 0);
00565829              void* __offset(SalvageOperationsResultData, -0x14) esi_7 = ((char*)arg2 - 0x14);
00565829              
00565838              if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
00565840                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
005657f3          }
005657f3          
00565846          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_9 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
00565846          
00565855          if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
0056585d              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
0056566f      }
0056566f      
00565867      return 0;
00565620  }

0056586a                                90 90 90 90 90 90                                                            ......

00565870  void ClientUISystem::OnViewContents(class ClientUISystem* this @ ecx, uint32_t arg2, class PackableList<ContentProfile>* arg3)

00565870  {
00565874      int32_t ebp;
00565874      int32_t var_20 = ebp;
00565875      int32_t esi;
00565875      int32_t var_24 = esi;
00565876      struct Turbine_GUID* edi;
00565876      struct Turbine_GUID* var_28 = edi;
0056587b      struct Turbine_GUID* var_18;
0056587b      int32_t* var_2c = &var_18;
0056587c      class ClientUISystem* this_1 = this;
00565884      struct Turbine_GUID* var_30 = &ClientObjMaintSystem_ClassType;
0056588c      var_18 = nullptr;
00565897      class TResult __return;
00565897      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_30, var_2c);
0056589c      struct Turbine_GUID* ecx_1 = var_18;
005658a5      var_30 = ecx_1;
005658a7      int32_t var_2c_1 = 0;
005658aa      struct Turbine_GUID* eax_1 = var_30;
005658b0      int32_t var_8 = 0;
005658b4      uint32_t var_4 = 0;
005658b4      
005658b8      if (eax_1 != 0)
005658be          *(uint32_t*)(eax_1->m_data1 + 0x10)();
005658be      
005658ca      struct Turbine_GUID** esp = &var_30;
005658d1      void var_c;
005658d1      int32_t ecx_4 = *(uint32_t*)InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&var_8, &var_c);
005658d1      
005658d7      if (ecx_1 != 0)
005658dd          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
005658dd      
005658e0      class TResult __return_1 = __return;
005658e0      
005658f0      if ((__return_1 != 0 && ecx_4 >= 0))
005658f0      {
005658fd          ACCObjectMaint::ViewObjectContents((__return_1 + 8), var_4, __return_addr);
00565905          class CWeenieObject* eax_4 = CObjectMaint::GetWeenieObject((__return_1 + 8), var_4);
00565905          esp = &var_30;
00565905          
0056590c          if (eax_4 != 0)
00565910              ACCWeenieObject::RemoveContentsFromDestructionQueue(eax_4);
005658f0      }
005658f0      
00565919      void* ebx;
00565919      uint32_t eax_5 = *(uint32_t*)((char*)ebx + 0x1c);
00565919      
0056592f      if ((var_4 == eax_5 && (var_4 != ACCWeenieObject::prevRequestObjectID || ACCWeenieObject::prevRequest != IR_PICK_UP)))
0056592f      {
00565932          CM_Item::SendNotice_SetGroundObject(eax_5);
00565938          ACCWeenieObject::RecordResponse(var_4);
0056593d          esp = &var_30;
0056592f      }
0056592f      
00565942      if (__return_1 != 0)
00565942      {
00565948          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00565948          esp = &var_28;
00565942      }
00565942      
0056594b      *(uint32_t*)esp;
0056594b      esp[1];
0056594b      esp[2];
0056594b      esp[3];
00565870  }

00565955                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00565960  void ClientUISystem::TargetedUsageCallback(class PropertyCollection const* arg1)

00565960  {
00565965      class PropertyCollection* esi = arg1;
00565970      uint32_t temp1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
00565973      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
00565978      char var_d = 0;
0056597c      int32_t* var_8 = nullptr;
00565980      int32_t* var_4 = nullptr;
00565987      int32_t* eax_2 = m_buckets[temp1];
00565987      
0056598b      if (eax_2 != 0)
0056598b      {
00565997          while (*(uint32_t*)eax_2 != 0x92)
00565997          {
00565999              eax_2 = eax_2[1];
00565999              
0056599e              if (eax_2 == 0)
005659a5                  return;
00565997          }
00565997          
005659a8          if (eax_2 != 0)
005659a8          {
005659b6              BaseProperty::operator=(&var_8, &eax_2[2]);
005659bb              int32_t* ecx_2 = var_4;
005659bb              
005659c1              if (ecx_2 != 0)
005659c1              {
005659ca                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&var_d);
005659cd                  ecx_2 = var_4;
005659c1              }
005659c1              
005659d5              if (var_d != 0)
005659d5              {
005659e2                  uint32_t temp1_1 = (COMBINE(0, 0x1000003d) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
005659e5                  class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
005659e8                  arg1 = nullptr;
005659e8                  
005659f3                  for (int32_t* i = m_buckets_1[temp1_1]; i != 0; i = i[1])
005659f3                  {
005659fb                      if (*(uint32_t*)i == 0x1000003d)
005659fb                      {
00565a08                          if (i != 0)
00565a08                          {
00565a12                              BaseProperty::operator=(&var_8, &i[2]);
00565a17                              ecx_2 = var_4;
00565a17                              
00565a1d                              if (ecx_2 != 0)
00565a1d                              {
00565a26                                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0xc8)(&arg1);
00565a2c                                  ecx_2 = var_4;
00565a1d                              }
00565a08                          }
00565a08                          
00565a08                          break;
005659fb                      }
005659f3                  }
005659f3                  
00565a37                  uint32_t temp1_2 = (COMBINE(0, 0x1000003e) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
00565a3a                  class HashTableData<unsigned long,BaseProperty>** m_buckets_2 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
00565a3d                  uint32_t var_c = 0;
00565a3d                  
00565a48                  for (int32_t* i_1 = m_buckets_2[temp1_2]; i_1 != 0; i_1 = i_1[1])
00565a48                  {
00565a56                      if (*(uint32_t*)i_1 == 0x1000003e)
00565a56                      {
00565a63                          if (i_1 != 0)
00565a63                          {
00565a6d                              BaseProperty::operator=(&var_8, &i_1[2]);
00565a72                              ecx_2 = var_4;
00565a72                              
00565a78                              if (ecx_2 != 0)
00565a78                              {
00565a81                                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0xc8)(&var_c);
00565a87                                  ecx_2 = var_4;
00565a78                              }
00565a63                          }
00565a63                          
00565a63                          break;
00565a56                      }
00565a48                  }
00565a48                  
00565a8b                  class PropertyCollection* edx_9 = arg1;
00565a8b                  
00565a91                  if (edx_9 != 0)
00565a91                  {
00565a93                      uint32_t eax_10 = var_c;
00565a93                      
00565a99                      if (eax_10 != 0)
00565a99                      {
00565a9d                          CM_Inventory::Event_UseWithTargetEvent(edx_9, eax_10);
00565aa2                          class ClientUISystem* ClientUISystem::s_pUISystem_1 = ClientUISystem::s_pUISystem;
00565ab2                          uint32_t esi_2 = (ClientUISystem::s_pUISystem_1->m_cBusy + 1);
00565aac                          ClientUISystem::s_pUISystem_1->m_cBusy = esi_2;
00565aac                          
00565aba                          if (esi_2 == 1)
00565abc                              ClientUISystem::UpdateCursorState(ClientUISystem::s_pUISystem_1);
00565abc                          
00565ad0                          CPlayerSystem::UsingItem(CPlayerSystem::GetPlayerSystem(), arg1, 1, 0);
00565ad5                          ecx_2 = var_4;
00565a99                      }
00565a91                  }
005659d5              }
005659d5              
00565ad9              int32_t* eax_13 = var_8;
00565ad9              
00565adf              if (eax_13 != 0)
00565adf              {
00565ae9                  int32_t esi_4 = (eax_13[1] - 1);
00565ae6                  eax_13[1] = esi_4;
00565ae6                  
00565af0                  if (esi_4 == 0)
00565af6                      **(uint32_t**)eax_13(1);
00565af6                  
00565af8                  ecx_2 = var_4;
00565afc                  var_8 = nullptr;
00565adf              }
00565adf              
00565b02              if (ecx_2 != 0)
00565b02              {
00565b0a                  int32_t esi_6 = (ecx_2[1] - 1);
00565b07                  ecx_2[1] = esi_6;
00565b07                  
00565b11                  if (esi_6 == 0)
00565b17                      **(uint32_t**)ecx_2(1);
00565b02              }
005659a8          }
0056598b      }
00565960  }

00565b1f                                                                                               90                                 .

00565b20  void ClientUISystem::UsageCallback(class PropertyCollection const* arg1)

00565b20  {
00565b25      class PropertyCollection* esi = arg1;
00565b30      uint32_t temp1 = (COMBINE(0, 0x92) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
00565b33      class HashTableData<unsigned long,BaseProperty>** m_buckets = esi->m_hashProperties.m_intrusiveTable.m_buckets;
00565b38      char var_11 = 0;
00565b3c      int32_t* var_8 = nullptr;
00565b40      int32_t* var_4 = nullptr;
00565b47      int32_t* eax_2 = m_buckets[temp1];
00565b47      
00565b4b      if (eax_2 != 0)
00565b4b      {
00565b57          while (*(uint32_t*)eax_2 != 0x92)
00565b57          {
00565b59              eax_2 = eax_2[1];
00565b59              
00565b5e              if (eax_2 == 0)
00565b65                  return;
00565b57          }
00565b57          
00565b68          if (eax_2 != 0)
00565b68          {
00565b76              BaseProperty::operator=(&var_8, &eax_2[2]);
00565b7b              int32_t* ecx_2 = var_4;
00565b7b              
00565b81              if (ecx_2 != 0)
00565b81              {
00565b8a                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&var_11);
00565b8d                  ecx_2 = var_4;
00565b81              }
00565b81              
00565b95              if (var_11 != 0)
00565b95              {
00565ba2                  uint32_t temp1_1 = (COMBINE(0, 0x1000003d) % esi->m_hashProperties.m_intrusiveTable.m_numBuckets);
00565ba5                  class HashTableData<unsigned long,BaseProperty>** m_buckets_1 = esi->m_hashProperties.m_intrusiveTable.m_buckets;
00565ba8                  arg1 = nullptr;
00565ba8                  
00565bb3                  for (int32_t* i = m_buckets_1[temp1_1]; i != 0; i = i[1])
00565bb3                  {
00565bbb                      if (*(uint32_t*)i == 0x1000003d)
00565bbb                      {
00565bc8                          if (i != 0)
00565bc8                          {
00565bd2                              BaseProperty::operator=(&var_8, &i[2]);
00565bd2                              
00565bdd                              if (var_4 != 0)
00565be6                                  *(uint32_t*)(*(uint32_t*)var_4 + 0xc8)(&arg1);
00565bc8                          }
00565bc8                          
00565bc8                          break;
00565bbb                      }
00565bb3                  }
00565bb3                  
00565bf1                  CM_Inventory::Event_UseEvent(arg1);
00565bf6                  class ClientUISystem* ClientUISystem::s_pUISystem_1 = ClientUISystem::s_pUISystem;
00565c06                  uint32_t esi_2 = (ClientUISystem::s_pUISystem_1->m_cBusy + 1);
00565c00                  ClientUISystem::s_pUISystem_1->m_cBusy = esi_2;
00565c00                  
00565c0e                  if (esi_2 == 1)
00565c10                      ClientUISystem::UpdateCursorState(ClientUISystem::s_pUISystem_1);
00565c10                  
00565c24                  CPlayerSystem::UsingItem(CPlayerSystem::GetPlayerSystem(), arg1, 1, 0);
00565c2e                  class ACCWeenieObject* eax_10 = ClientObjMaintSystem::GetWeenieObject(arg1);
00565c2e                  
00565c38                  if (eax_10 != 0)
00565c38                  {
00565c50                      class PStringBase<unsigned short> __return;
00565c50                      class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax_10, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00565c5c                      class PStringBase<unsigned short> var_10;
00565c5c                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, Formatted, u"Using the %s");
00565c6b                      int32_t* esi_4 = (__return - 0x14);
00565c6b                      
00565c7d                      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00565c85                          **(uint32_t**)esi_4(1);
00565c85                      
00565c97                      ClientSystem::AddTextToScroll(ClientUISystem::s_pUISystem, &var_10, 0x1a, 1, 0);
00565ca0                      int32_t* esi_6 = (var_10 - 0x14);
00565ca0                      
00565cb0                      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00565cb8                          **(uint32_t**)esi_6(1);
00565c38                  }
00565c38                  
00565cba                  ecx_2 = var_4;
00565b95              }
00565b95              
00565cbe              int32_t* eax_14 = var_8;
00565cbe              
00565cc4              if (eax_14 != 0)
00565cc4              {
00565cce                  int32_t esi_8 = (eax_14[1] - 1);
00565ccb                  eax_14[1] = esi_8;
00565ccb                  
00565cd5                  if (esi_8 == 0)
00565cdb                      **(uint32_t**)eax_14(1);
00565cdb                  
00565cdd                  ecx_2 = var_4;
00565ce1                  var_8 = nullptr;
00565cc4              }
00565cc4              
00565ce7              if (ecx_2 != 0)
00565ce7              {
00565cef                  int32_t esi_10 = (ecx_2[1] - 1);
00565cec                  ecx_2[1] = esi_10;
00565cec                  
00565cf6                  if (esi_10 == 0)
00565cfc                      **(uint32_t**)ecx_2(1);
00565ce7              }
00565b68          }
00565b4b      }
00565b20  }

00565d04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00565d10  void __thiscall ClientUISystem::Handle_VendorInfo(class ClientUISystem* this, void* arg2, uint32_t arg3)

00565d10  {
00565d13      void* eax = arg2;
00565d1b      uint32_t edi = *(uint32_t*)eax;
00565d26      void* ebx = (((char*)eax + 4) + arg3);
00565d2d      arg2 = ((char*)eax + 4);
00565d31      void var_28;
00565d31      VendorProfile::VendorProfile(&var_28);
00565d48      VendorProfile::UnPack(&var_28, &arg2, ((char*)ebx - arg2));
00565d4d      uint32_t ebx_1 = ((char*)ebx - arg2);
00565d5d      int32_t var_38 = 0x7b4fa8;
00565d65      int32_t var_34 = 0;
00565d69      int32_t var_30 = 0;
00565d6d      int32_t var_2c = 0;
00565d71      PackableList<ItemProfile>::UnPack(&var_38, &arg2, ebx_1);
00565d7b      ClientUISystem::SetGroundObject(this, 0, 1);
00565d87      int32_t edx_2;
00565d87      edx_2 = edi == this->attemptOpenVendorID;
00565d92      this->vendorID = edi;
00565d9c      CM_Vendor::SendNotice_OpenVendor(edi, &var_28, &var_38, (edx_2 + 2));
00565d9c      
00565da9      if (edi == this->attemptOpenVendorID)
00565da9      {
00565dab          uint32_t attemptSaleObjectID = this->attemptSaleObjectID;
00565dab          
00565db0          if (attemptSaleObjectID != 0)
00565db3              CM_Vendor::SendNotice_AddItemToSell(attemptSaleObjectID);
00565da9      }
00565da9      
00565dbf      this->attemptOpenVendorID = 0;
00565dc2      this->attemptSaleObjectID = 0;
00565dc5      var_38 = 0x7b4fa8;
00565dcd      PackableList<ItemProfile>::Flush(&var_38);
00565dda      var_38 = 0x79285c;
00565dee      int32_t* var_4;
00565dee      
00565dee      if ((InterlockedDecrement(&var_4[1]) == 0 && var_4 != 0))
00565df6          **(uint32_t**)var_4(1);
00565d10  }

00565e02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00565e10  uint8_t ClientUISystem::DeltaTimeToString(double const arg1, class PStringBase<unsigned short>* arg2)

00565e10  {
00565e21      int32_t eax = _ftol2();
00565e26      int32_t edx = 0;
00565e2d      uint32_t temp0 = (COMBINE(edx, eax) / 0x278d00);
00565e2d      uint32_t temp1 = (COMBINE(edx, eax) % 0x278d00);
00565e3e      int32_t edx_2 = 0;
00565e40      uint32_t temp0_1 = (COMBINE(edx_2, temp1) / 0x15180);
00565e40      uint32_t temp1_1 = (COMBINE(edx_2, temp1) % 0x15180);
00565e4b      int32_t edx_4 = 0;
00565e4d      uint32_t temp0_2 = (COMBINE(edx_4, temp1_1) / 0xe10);
00565e4d      uint32_t temp1_2 = (COMBINE(edx_4, temp1_1) % 0xe10);
00565e58      int32_t edx_6 = 0;
00565e5e      void var_400;
00565e5e      void* esi = &var_400;
00565e62      uint32_t var_408 = (COMBINE(edx_6, temp1_2) % 0x3c);
00565e66      uint32_t var_404 = (COMBINE(edx_6, temp1_2) / 0x3c);
00565e6a      int32_t __saved_edi;
00565e6a      
00565e6a      if (temp0 != 0)
00565e81          esi = ((&__saved_edi + _snprintf(&var_400, 0x400, "%dmo ", temp0)) + 0x18);
00565e81      
00565e87      if (temp0_1 != 0)
00565e9f          esi += _snprintf(esi, (&__return_addr - esi), "%dd ", temp0_1);
00565e9f      
00565ea3      if (temp0_2 != 0)
00565ebb          esi += _snprintf(esi, (&__return_addr - esi), "%dh ", temp0_2);
00565ebb      
00565ebd      uint32_t eax_12 = var_404;
00565ebd      
00565ec3      if (eax_12 != 0)
00565edb          esi += _snprintf(esi, (&__return_addr - esi), "%dm ", eax_12);
00565edb      
00565ef2      _snprintf(esi, (&__return_addr - esi), "%ds ", var_408);
00565ef4      void* eax_15 = &var_400;
00565f05      char i;
00565f05      
00565f05      do
00565f05      {
00565f00          i = *(uint8_t*)eax_15;
00565f02          eax_15 += 1;
00565f05      } while (i != 0);
00565f05      
00565f0e      void var_3ff;
00565f0e      *(uint8_t*)(&*(uint32_t*)((char*)var_404)[3] + ((char*)eax_15 - &var_3ff)) = i;
00565f1d      uint16_t* eax_18 = *(uint32_t*)PStringBase<unsigned short>::PStringBase<unsigned short>(&var_408, WidthConvert, &var_400);
00565f1f      int32_t ecx_4 = *(uint32_t*)((char*)eax_18 - 4);
00565f1f      
00565f25      if (ecx_4 != 1)
00565f31          PStringBase<unsigned short>::append_n_chars(arg2, eax_18, (ecx_4 - 1));
00565f31      
00565f3a      int32_t* esi_2 = (var_408 - 0x14);
00565f3a      
00565f4d      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00565f55          **(uint32_t**)esi_2(1);
00565f55      
00565f5a      int32_t eax_20;
00565f5a      eax_20 = 1;
00565f63      return 1;
00565e10  }

00565f64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00565f70  int32_t __thiscall AC1Legacy::PStringBase<char>::replace(class AC1Legacy::PStringBase<char>* this, class AC1Legacy::PStringBase<char> const* arg2, class AC1Legacy::PStringBase<char> const* arg3)

00565f70  {
00565f85      int32_t* edi = nullptr;
00565f8c      void* var_c = nullptr;
00565f90      int32_t* var_8 = nullptr;
00565f94      int32_t var_4 = 0;
00565f9e      int32_t i = strstr(&this->m_buffer->m_data, &arg2->m_buffer->m_data);
00565fa5      int32_t result = i;
00565fa5      
00565fa9      while (i != 0)
00565fa9      {
00565fb4          if (edi == var_4)
00565fb4          {
00565fd8              _STL::vector<char const *,_STL::allocator<char const *> >::_M_insert_overflow(&var_c, edi, &result, &arg3, 1, 1);
00565fdd              edi = var_8;
00565fb4          }
00565fb4          else
00565fb4          {
00565fb8              if (edi != 0)
00565fba                  *(uint32_t*)edi = i;
00565fba              
00565fbc              edi = &edi[1];
00565fbf              var_8 = edi;
00565fb4          }
00565fb4          
00565fe1          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
00565ff5          i = strstr(((m_buffer->m_len + i) - 1), &m_buffer->m_data);
00565ffc          result = i;
00565fa9      }
00565fa9      
00566002      void* ecx_4 = var_c;
00566008      int32_t result_1 = (((char*)edi - ecx_4) >> 2);
0056600f      result = result_1;
0056600f      
00566013      if (result_1 == 0)
00566013      {
00566017          if (ecx_4 != 0)
00566027              _STL::__node_alloc<1,0>::deallocate(ecx_4, (((var_4 - ecx_4) >> 2) << 2));
00566027          
00566038          return 0;
00566013      }
00566013      
00566049      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
0056605f      AC1Legacy::PStringBase<char>::allocate_ref_buffer(this, ((((arg3->m_buffer->m_len - arg2->m_buffer->m_len) * result_1) + m_buffer_1->m_len) - 1));
0056606b      char (* esi_3)[0x1] = &this->m_buffer->m_data;
00566070      char (* ebx_1)[0x1] = &m_buffer_1->m_data;
00566073      int32_t var_18 = 0;
00566073      
0056607b      if (result > 0)
0056607b      {
005660dc          bool cond:3_1;
005660dc          
005660dc          do
005660dc          {
0056608b              void* edi_3 = (*(uint32_t*)((char*)var_c + (var_18 << 2)) - ebx_1);
00566090              strncpy(esi_3, ebx_1, edi_3);
0056609c              void* esi_4 = (esi_3 + edi_3);
005660a1              char (* eax_14)[0x1] = &arg3->m_buffer->m_data;
005660a4              void* ebp_1 = esi_4;
005660af              class AC1Legacy::PStringBase<char>* ecx_10;
005660af              
005660af              do
005660af              {
005660a6                  ecx_10 = ADJ(eax_14)->m_data;
005660a8                  eax_14 = &eax_14[1];
005660a9                  *(uint8_t*)ebp_1 = ecx_10;
005660ac                  ebp_1 += 1;
005660af              } while (ecx_10 != 0);
005660c0              esi_3 = (((char*)esi_4 + arg3->m_buffer->m_len) - 1);
005660cd              ebx_1 = ((ebx_1 + (*(uint32_t*)(*(uint32_t*)arg2 + 8) + edi_3)) - 1);
005660d6              cond:3_1 = (var_18 + 1) < result;
005660d8              var_18 += 1;
005660dc          } while (cond:3_1);
0056607b      }
0056607b      
005660e2      char* esi_5 = (esi_3 - ebx_1);
005660ec      int32_t eax_11;
005660ec      
005660ec      do
005660ec      {
005660e4          eax_11 = ADJ(ebx_1)->m_data;
005660e6          *(uint8_t*)(esi_5 + ebx_1) = eax_11;
005660e9          ebx_1 = &ebx_1[1];
005660ec      } while (eax_11 != 0);
005660ec      
005660fe      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00566100          m_buffer_1->vtable->__vecDelDtor(1);
00566100      
00566108      void* ecx_16 = var_c;
00566108      
0056610e      if (ecx_16 != 0)
0056611e          _STL::__node_alloc<1,0>::deallocate(ecx_16, (((var_4 - ecx_16) >> 2) << 2));
0056611e      
00566131      return result;
00565f70  }

00565fad                                         8d 49 00                                                               .I.
00566134                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00566140  uint8_t __stdcall ClientUISystem::TargetedUsageConfirmation_ManaStone(class ClientUISystem* this @ ecx, uint32_t arg2, uint32_t arg3)

00566140  {
0056614f      int32_t ebx;
0056614f      int32_t var_128 = ebx;
00566150      int32_t esi;
00566150      int32_t var_12c = esi;
00566151      int32_t edi;
00566151      int32_t var_130 = edi;
00566153      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg3);
00566166      void var_114;
00566166      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_114, "\nAre you sure you want to attem…");
0056616b      class AC1Legacy::PSRefBuffer<char>* m_buffer = eax_1->pwd._name.m_buffer;
00566175      InterlockedIncrement(&m_buffer->m_cRef);
0056617b      uint32_t m_len = m_buffer->m_len;
00566189      class AC1Legacy::PStringBase<char> var_118;
00566189      
00566189      if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
00566195          AC1Legacy::PStringBase<char>::append_n_chars(&var_118, &m_buffer->m_data, (m_len - 1));
00566195      
005661a5      if (InterlockedDecrement(&m_buffer->m_cRef) == 0)
005661a7          m_buffer->vtable->__vecDelDtor(1);
005661a7      
005661b8      int32_t* var_11c;
005661b8      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_11c, " and drain its mana into this st…");
005661bd      int32_t* esi_2 = var_11c;
005661c1      int32_t eax_4 = esi_2[2];
005661c1      
005661cf      if ((eax_4 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005661db          AC1Legacy::PStringBase<char>::append_n_chars(&var_118, &esi_2[5], (eax_4 - 1));
005661db      
005661e8      if (InterlockedDecrement(&esi_2[1]) == 0)
005661f0          **(uint32_t**)esi_2(1);
005661f0      
005661f9      void var_9c;
005661f9      StringInfo::StringInfo(&var_9c);
005661fe      class AC1Legacy::PStringBase<char> edi_2 = var_118;
0056620f      class PStringBase<unsigned short>* eax_9;
0056620f      int32_t* ebx_1;
0056620f      eax_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, WidthConvert, (edi_2 + 0x14));
0056621c      StringInfo::SetLiteralValue(&var_9c, eax_9, 1);
00566225      void* esi_4 = &var_11c[-5];
00566225      
00566238      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != ebx_1))
00566240          **(uint32_t**)esi_4(1);
00566240      
00566246      PropertyCollection::PropertyCollection(&var_114);
00566254      int32_t* var_124 = ebx_1;
0056625c      BaseProperty::SetPropertyName(&var_124, 0x8e);
0056625c      
00566265      if (ebx_1 != ebx_1)
00566265      {
0056626b          BaseProperty::CheckCopyOnWrite(&var_124);
00566278          *(uint32_t*)(*(uint32_t*)ebx_1 + 0xac)(1);
00566265      }
00566265      
00566295      var_11c = BaseProperty::GetPropertyName(&var_124);
00566299      void var_110;
00566299      HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_11c, &var_124);
005662a7      BaseProperty::SetPropertyName(&var_124, 0xc5);
005662a7      
005662b0      if (ebx_1 != ebx_1)
005662b0      {
005662b6          BaseProperty::CheckCopyOnWrite(&var_124);
005662c9          *(uint32_t*)(*(uint32_t*)ebx_1 + 0xc4)(&var_9c);
005662b0      }
005662b0      
005662d8      var_11c = BaseProperty::GetPropertyName(&var_124);
005662ea      HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_11c, &var_124);
005662f8      BaseProperty::SetPropertyName(&var_124, 0x1000003d);
005662f8      
00566301      if (ebx_1 != ebx_1)
00566301      {
00566307          BaseProperty::CheckCopyOnWrite(&var_124);
00566316          *(uint32_t*)(*(uint32_t*)ebx_1 + 0xcc)(arg2);
00566301      }
00566301      
00566333      var_11c = BaseProperty::GetPropertyName(&var_124);
00566337      HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_11c, &var_124);
00566345      BaseProperty::SetPropertyName(&var_124, 0x1000003e);
00566345      
0056634e      if (ebx_1 != ebx_1)
0056634e      {
00566354          BaseProperty::CheckCopyOnWrite(&var_124);
00566363          *(uint32_t*)(*(uint32_t*)ebx_1 + 0xcc)(arg3);
0056634e      }
0056634e      
00566372      var_11c = BaseProperty::GetPropertyName(&var_124);
00566384      class PropertyCollection* eax_19;
00566384      void (* edx_6)(class PropertyCollection const*);
00566384      eax_19 = HashTable<unsigned long,BaseProperty,1>::add(&var_110, &var_11c, &var_124);
0056638d      void (* var_138_13)(class PropertyCollection const* arg1) = ClientUISystem::TargetedUsageCallback;
00566392      void* var_13c_9 = &var_114;
00566393      DialogFactory::MakeCallbackDialogInCurrentUI(eax_19, edx_6);
00566398      int32_t* eax_20 = var_124;
00566398      
005663a1      if (eax_20 != ebx_1)
005663a1      {
005663ab          int32_t esi_6 = (eax_20[1] - 1);
005663a8          eax_20[1] = esi_6;
005663a8          
005663b2          if (esi_6 == ebx_1)
005663b8              **(uint32_t**)eax_20(1);
005663b8          
005663ba          var_124 = ebx_1;
005663a1      }
005663a1      
005663c4      if (ebx_1 != ebx_1)
005663c4      {
005663ce          int32_t esi_8 = (ebx_1[1] - 1);
005663cb          ebx_1[1] = esi_8;
005663cb          
005663d5          if (esi_8 == ebx_1)
005663db              **(uint32_t**)ebx_1(1);
005663db          
005663dd          int32_t* var_120_1 = ebx_1;
005663c4      }
005663c4      
005663e5      PropertyCollection::~PropertyCollection(&var_114);
005663f1      StringInfo::~StringInfo(&var_9c);
005663f1      
00566406      if ((InterlockedDecrement((edi_2 + 4)) == 0 && edi_2 != ebx_1))
0056640e          **(uint32_t**)edi_2(1);
0056640e      
00566412      int32_t eax_26;
00566412      eax_26 = 1;
00566418      return 1;
00566140  }

0056641b                                                                                   90 90 90 90 90                             .....

00566420  uint8_t __stdcall ClientUISystem::UsageConfirmation_PKAltar(class ClientUISystem* this @ ecx, uint32_t arg2)

00566420  {
0056642f      void var_90;
0056642f      StringInfo::StringInfo(&var_90);
00566447      class PStringBase<unsigned short> var_10c;
00566447      PStringBase<unsigned short>::allocate_ref_buffer(&var_10c, wcslen(u"Using this altar will make you a…"));
00566456      wcscpy(var_10c, u"Using this altar will make you a…");
0056646d      StringInfo::SetLiteralValue(&var_90, &var_10c, 1);
00566476      int32_t* esi_1 = (var_10c - 0x14);
00566476      
0056648b      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00566493          **(uint32_t**)esi_1(1);
00566493      
00566499      void var_108;
00566499      PropertyCollection::PropertyCollection(&var_108);
005664a7      int32_t* var_114 = nullptr;
005664ab      int32_t* var_110 = nullptr;
005664af      BaseProperty::SetPropertyName(&var_114, 0x8e);
005664af      
005664b8      if (var_110 != 0)
005664b8      {
005664be          BaseProperty::CheckCopyOnWrite(&var_114);
005664cb          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(1);
005664b8      }
005664b8      
005664da      var_10c = BaseProperty::GetPropertyName(&var_114);
005664ec      void var_104;
005664ec      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
005664fa      BaseProperty::SetPropertyName(&var_114, 0xc5);
005664fa      
00566503      if (var_110 != 0)
00566503      {
00566509          BaseProperty::CheckCopyOnWrite(&var_114);
0056651c          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
00566503      }
00566503      
00566539      var_10c = BaseProperty::GetPropertyName(&var_114);
0056653d      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0056654b      BaseProperty::SetPropertyName(&var_114, 0x1000003d);
0056654b      
00566554      if (var_110 != 0)
00566554      {
0056655a          BaseProperty::CheckCopyOnWrite(&var_114);
0056656d          *(uint32_t*)(*(uint32_t*)var_110 + 0xcc)(arg2);
00566554      }
00566554      
0056657c      var_10c = BaseProperty::GetPropertyName(&var_114);
0056658e      class PropertyCollection* eax_8;
0056658e      void (* edx_4)(class PropertyCollection const*);
0056658e      eax_8 = HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
00566597      void (* var_120_7)(class PropertyCollection const* arg1) = ClientUISystem::UsageCallback;
0056659c      void* var_124_5 = &var_108;
0056659d      DialogFactory::MakeCallbackDialogInCurrentUI(eax_8, edx_4);
005665a2      int32_t* eax_9 = var_114;
005665a2      
005665ab      if (eax_9 != 0)
005665ab      {
005665b5          int32_t esi_3 = (eax_9[1] - 1);
005665b2          eax_9[1] = esi_3;
005665b2          
005665bc          if (esi_3 == 0)
005665c2              **(uint32_t**)eax_9(1);
005665c2          
005665c4          var_114 = nullptr;
005665ab      }
005665ab      
005665ce      if (var_110 != 0)
005665ce      {
005665d8          int32_t esi_5 = (var_110[1] - 1);
005665d5          var_110[1] = esi_5;
005665d5          
005665df          if (esi_5 == 0)
005665e5              **(uint32_t**)var_110(1);
005665e5          
005665e7          int32_t var_110_1 = 0;
005665ce      }
005665ce      
005665ef      PropertyCollection::~PropertyCollection(&var_108);
005665fb      StringInfo::~StringInfo(&var_90);
00566601      int32_t eax_14;
00566601      eax_14 = 1;
0056660a      return 1;
00566420  }

0056660d                                         90 90 90                                                               ...

00566610  uint8_t __stdcall ClientUISystem::UsageConfirmation_NPKAltar(class ClientUISystem* this @ ecx, uint32_t arg2)

00566610  {
0056661f      void var_90;
0056661f      StringInfo::StringInfo(&var_90);
00566637      class PStringBase<unsigned short> var_10c;
00566637      PStringBase<unsigned short>::allocate_ref_buffer(&var_10c, wcslen(u"Using this altar will make you a…"));
00566646      wcscpy(var_10c, u"Using this altar will make you a…");
0056665d      StringInfo::SetLiteralValue(&var_90, &var_10c, 1);
00566666      int32_t* esi_1 = (var_10c - 0x14);
00566666      
0056667b      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00566683          **(uint32_t**)esi_1(1);
00566683      
00566689      void var_108;
00566689      PropertyCollection::PropertyCollection(&var_108);
00566697      int32_t* var_114 = nullptr;
0056669b      int32_t* var_110 = nullptr;
0056669f      BaseProperty::SetPropertyName(&var_114, 0x8e);
0056669f      
005666a8      if (var_110 != 0)
005666a8      {
005666ae          BaseProperty::CheckCopyOnWrite(&var_114);
005666bb          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(1);
005666a8      }
005666a8      
005666ca      var_10c = BaseProperty::GetPropertyName(&var_114);
005666dc      void var_104;
005666dc      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
005666ea      BaseProperty::SetPropertyName(&var_114, 0xc5);
005666ea      
005666f3      if (var_110 != 0)
005666f3      {
005666f9          BaseProperty::CheckCopyOnWrite(&var_114);
0056670c          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
005666f3      }
005666f3      
00566729      var_10c = BaseProperty::GetPropertyName(&var_114);
0056672d      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0056673b      BaseProperty::SetPropertyName(&var_114, 0x1000003d);
0056673b      
00566744      if (var_110 != 0)
00566744      {
0056674a          BaseProperty::CheckCopyOnWrite(&var_114);
0056675d          *(uint32_t*)(*(uint32_t*)var_110 + 0xcc)(arg2);
00566744      }
00566744      
0056676c      var_10c = BaseProperty::GetPropertyName(&var_114);
0056677e      class PropertyCollection* eax_8;
0056677e      void (* edx_4)(class PropertyCollection const*);
0056677e      eax_8 = HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
00566787      void (* var_120_7)(class PropertyCollection const* arg1) = ClientUISystem::UsageCallback;
0056678c      void* var_124_5 = &var_108;
0056678d      DialogFactory::MakeCallbackDialogInCurrentUI(eax_8, edx_4);
00566792      int32_t* eax_9 = var_114;
00566792      
0056679b      if (eax_9 != 0)
0056679b      {
005667a5          int32_t esi_3 = (eax_9[1] - 1);
005667a2          eax_9[1] = esi_3;
005667a2          
005667ac          if (esi_3 == 0)
005667b2              **(uint32_t**)eax_9(1);
005667b2          
005667b4          var_114 = nullptr;
0056679b      }
0056679b      
005667be      if (var_110 != 0)
005667be      {
005667c8          int32_t esi_5 = (var_110[1] - 1);
005667c5          var_110[1] = esi_5;
005667c5          
005667cf          if (esi_5 == 0)
005667d5              **(uint32_t**)var_110(1);
005667d5          
005667d7          int32_t var_110_1 = 0;
005667be      }
005667be      
005667df      PropertyCollection::~PropertyCollection(&var_108);
005667eb      StringInfo::~StringInfo(&var_90);
005667f1      int32_t eax_14;
005667f1      eax_14 = 1;
005667fa      return 1;
00566610  }

005667fd                                                                                         90 90 90                               ...

00566800  uint8_t __stdcall ClientUISystem::UsageConfirmation_VolatileRare(class ClientUISystem* this @ ecx, uint32_t arg2)

00566800  {
0056680f      void var_90;
0056680f      StringInfo::StringInfo(&var_90);
00566827      class PStringBase<unsigned short> var_10c;
00566827      PStringBase<unsigned short>::allocate_ref_buffer(&var_10c, wcslen(u"Are you sure you want to use thi…"));
00566836      wcscpy(var_10c, u"Are you sure you want to use thi…");
0056684d      StringInfo::SetLiteralValue(&var_90, &var_10c, 1);
00566856      int32_t* esi_1 = (var_10c - 0x14);
00566856      
0056686b      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00566873          **(uint32_t**)esi_1(1);
00566873      
00566879      void var_108;
00566879      PropertyCollection::PropertyCollection(&var_108);
00566887      int32_t* var_114 = nullptr;
0056688b      int32_t* var_110 = nullptr;
0056688f      BaseProperty::SetPropertyName(&var_114, 0x8e);
0056688f      
00566898      if (var_110 != 0)
00566898      {
0056689e          BaseProperty::CheckCopyOnWrite(&var_114);
005668ab          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(1);
00566898      }
00566898      
005668ba      var_10c = BaseProperty::GetPropertyName(&var_114);
005668cc      void var_104;
005668cc      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
005668da      BaseProperty::SetPropertyName(&var_114, 0xc5);
005668da      
005668e3      if (var_110 != 0)
005668e3      {
005668e9          BaseProperty::CheckCopyOnWrite(&var_114);
005668fc          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
005668e3      }
005668e3      
00566919      var_10c = BaseProperty::GetPropertyName(&var_114);
0056691d      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0056692b      BaseProperty::SetPropertyName(&var_114, 0x1000003d);
0056692b      
00566934      if (var_110 != 0)
00566934      {
0056693a          BaseProperty::CheckCopyOnWrite(&var_114);
0056694d          *(uint32_t*)(*(uint32_t*)var_110 + 0xcc)(arg2);
00566934      }
00566934      
0056695c      var_10c = BaseProperty::GetPropertyName(&var_114);
0056696e      class PropertyCollection* eax_8;
0056696e      void (* edx_4)(class PropertyCollection const*);
0056696e      eax_8 = HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
00566977      void (* var_120_7)(class PropertyCollection const* arg1) = ClientUISystem::UsageCallback;
0056697c      void* var_124_5 = &var_108;
0056697d      DialogFactory::MakeCallbackDialogInCurrentUI(eax_8, edx_4);
00566982      int32_t* eax_9 = var_114;
00566982      
0056698b      if (eax_9 != 0)
0056698b      {
00566995          int32_t esi_3 = (eax_9[1] - 1);
00566992          eax_9[1] = esi_3;
00566992          
0056699c          if (esi_3 == 0)
005669a2              **(uint32_t**)eax_9(1);
005669a2          
005669a4          var_114 = nullptr;
0056698b      }
0056698b      
005669ae      if (var_110 != 0)
005669ae      {
005669b8          int32_t esi_5 = (var_110[1] - 1);
005669b5          var_110[1] = esi_5;
005669b5          
005669bf          if (esi_5 == 0)
005669c5              **(uint32_t**)var_110(1);
005669c5          
005669c7          int32_t var_110_1 = 0;
005669ae      }
005669ae      
005669cf      PropertyCollection::~PropertyCollection(&var_108);
005669db      StringInfo::~StringInfo(&var_90);
005669e1      int32_t eax_14;
005669e1      eax_14 = 1;
005669ea      return 1;
00566800  }

005669ed                                         90 90 90                                                               ...

005669f0  uint8_t __stdcall ClientUISystem::TargetedUsageConfirmation_Salvage(class ClientUISystem* this @ ecx, uint32_t arg2, uint32_t arg3)

005669f0  {
00566a03      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
00566a0e      class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg3);
00566a13      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = eax_1->pwd._name.m_buffer;
00566a19      class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = m_buffer_1;
00566a2c      InterlockedIncrement(&m_buffer_1->m_cRef);
00566a37      class AC1Legacy::PSRefBuffer<char>* m_buffer_3;
00566a37      AC1Legacy::PStringBase<char>::PStringBase<char>(&m_buffer_3, " (100)");
00566a4a      AC1Legacy::PStringBase<char>::replace(&m_buffer_4, &m_buffer_3, &AC1Legacy::PStringBase<char>::null_string);
00566a4f      class AC1Legacy::PSRefBuffer<char>* m_buffer_6 = m_buffer_3;
00566a4f      
00566a63      if ((InterlockedDecrement(&m_buffer_6->m_cRef) == 0 && m_buffer_6 != 0))
00566a65          m_buffer_6->vtable->__vecDelDtor(1);
00566a65      
00566a6d      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = eax_2->pwd._name.m_buffer;
00566a77      m_buffer_3 = m_buffer_2;
00566a7b      InterlockedIncrement(&m_buffer_2->m_cRef);
00566a86      class AC1Legacy::PStringBase<char> var_128;
00566a86      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_128, "\nAre you sure you want to apply…");
00566a94      int32_t* var_124;
00566a94      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_124, " may be destroyed.");
00566aa2      int32_t* var_130;
00566aa2      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_130, "? The ");
00566ab0      int32_t* var_12c;
00566ab0      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_12c, " to the ");
00566b0c      class AC1Legacy::PStringBase<char> __return;
00566b0c      int32_t* __return_1;
00566b0c      class AC1Legacy::PStringBase<char> __return_2;
00566b0c      class AC1Legacy::PStringBase<char> __return_3;
00566b0c      class AC1Legacy::PStringBase<char> __return_4;
00566b0c      class AC1Legacy::PSRefBuffer<char>* m_buffer = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(&m_buffer_4, &__return, &var_12c), &__return_3, &m_buffer_3), &__return_2, &var_130), &__return_4, &m_buffer_3), &__return_1, &var_124)->m_buffer;
00566b0e      uint32_t m_len = m_buffer->m_len;
00566b0e      
00566b1c      if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
00566b28          AC1Legacy::PStringBase<char>::append_n_chars(&var_128, &m_buffer->m_data, (m_len - 1));
00566b28      
00566b2d      int32_t* __return_5 = __return_1;
00566b2d      
00566b43      if ((InterlockedDecrement(&__return_5[1]) == 0 && __return_5 != 0))
00566b4b          **(uint32_t**)__return_5(1);
00566b4b      
00566b4d      class AC1Legacy::PStringBase<char> __return_6 = __return_4;
00566b4d      
00566b5d      if ((InterlockedDecrement((__return_6 + 4)) == 0 && __return_6 != 0))
00566b65          **(uint32_t**)__return_6(1);
00566b65      
00566b67      class AC1Legacy::PStringBase<char> __return_7 = __return_2;
00566b67      
00566b77      if ((InterlockedDecrement((__return_7 + 4)) == 0 && __return_7 != 0))
00566b7f          **(uint32_t**)__return_7(1);
00566b7f      
00566b81      class AC1Legacy::PStringBase<char> __return_8 = __return_3;
00566b81      
00566b91      if ((InterlockedDecrement((__return_8 + 4)) == 0 && __return_8 != 0))
00566b99          **(uint32_t**)__return_8(1);
00566b99      
00566b9b      class AC1Legacy::PStringBase<char> __return_9 = __return;
00566b9b      
00566bab      if ((InterlockedDecrement((__return_9 + 4)) == 0 && __return_9 != 0))
00566bb3          **(uint32_t**)__return_9(1);
00566bb3      
00566bb5      int32_t* esi_2 = var_12c;
00566bb5      
00566bc5      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00566bcd          **(uint32_t**)esi_2(1);
00566bcd      
00566bcf      int32_t* esi_3 = var_130;
00566bcf      
00566bdf      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00566be7          **(uint32_t**)esi_3(1);
00566be7      
00566be9      int32_t* esi_4 = var_124;
00566be9      
00566bf9      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00566c01          **(uint32_t**)esi_4(1);
00566c01      
00566c0a      void var_98;
00566c0a      StringInfo::StringInfo(&var_98);
00566c1f      class PStringBase<unsigned short>* eax_28;
00566c1f      int32_t* ebx_1;
00566c1f      eax_28 = PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, WidthConvert, (var_128 + 0x14));
00566c2c      StringInfo::SetLiteralValue(&var_98, eax_28, 1);
00566c35      int32_t* esi_6 = (__return - 0x14);
00566c35      
00566c44      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00566c4c          **(uint32_t**)esi_6(1);
00566c4c      
00566c52      void var_110;
00566c52      PropertyCollection::PropertyCollection(&var_110);
00566c62      int32_t* var_144 = nullptr;
00566c66      int32_t* var_140 = nullptr;
00566c6a      BaseProperty::SetPropertyName(&var_144, 0x8e);
00566c6a      
00566c73      if (var_140 != 0)
00566c73      {
00566c79          BaseProperty::CheckCopyOnWrite(&var_144);
00566c86          *(uint32_t*)(*(uint32_t*)var_140 + 0xac)(1);
00566c73      }
00566c73      
00566ca3      __return = BaseProperty::GetPropertyName(&var_144);
00566ca7      void var_10c;
00566ca7      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &__return, &var_144);
00566cb5      BaseProperty::SetPropertyName(&var_144, 0xc5);
00566cb5      
00566cbe      if (var_140 != 0)
00566cbe      {
00566cc4          BaseProperty::CheckCopyOnWrite(&var_144);
00566cd7          *(uint32_t*)(*(uint32_t*)var_140 + 0xc4)(&var_98);
00566cbe      }
00566cbe      
00566ce6      __return = BaseProperty::GetPropertyName(&var_144);
00566cf8      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &__return, &var_144);
00566d06      BaseProperty::SetPropertyName(&var_144, 0x1000003d);
00566d06      
00566d0f      if (var_140 != 0)
00566d0f      {
00566d15          BaseProperty::CheckCopyOnWrite(&var_144);
00566d24          *(uint32_t*)(*(uint32_t*)var_140 + 0xcc)(arg2);
00566d0f      }
00566d0f      
00566d41      __return = BaseProperty::GetPropertyName(&var_144);
00566d45      HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &__return, &var_144);
00566d53      BaseProperty::SetPropertyName(&var_144, 0x1000003e);
00566d53      
00566d5c      if (var_140 != 0)
00566d5c      {
00566d62          BaseProperty::CheckCopyOnWrite(&var_144);
00566d71          *(uint32_t*)(*(uint32_t*)var_140 + 0xcc)(arg3);
00566d5c      }
00566d5c      
00566d80      __return = BaseProperty::GetPropertyName(&var_144);
00566d92      class PropertyCollection* eax_38;
00566d92      void (* edx_13)(class PropertyCollection const*);
00566d92      eax_38 = HashTable<unsigned long,BaseProperty,1>::add(&var_10c, &__return, &var_144);
00566d9b      void (* var_154_22)(class PropertyCollection const* arg1) = ClientUISystem::TargetedUsageCallback;
00566da0      void* var_158_10 = &var_110;
00566da1      DialogFactory::MakeCallbackDialogInCurrentUI(eax_38, edx_13);
00566da6      int32_t* eax_39 = var_144;
00566da6      
00566daf      if (eax_39 != 0)
00566daf      {
00566db9          int32_t edx_15 = (eax_39[1] - 1);
00566db6          eax_39[1] = edx_15;
00566db6          
00566dbe          if (edx_15 == 0)
00566dc4              **(uint32_t**)eax_39(1);
00566dc4          
00566dc6          var_144 = nullptr;
00566daf      }
00566daf      
00566dd0      if (var_140 != 0)
00566dd0      {
00566dda          int32_t edx_17 = (var_140[1] - 1);
00566dd7          var_140[1] = edx_17;
00566dd7          
00566ddf          if (edx_17 == 0)
00566de5              **(uint32_t**)var_140(1);
00566de5          
00566de7          int32_t var_140_1 = 0;
00566dd0      }
00566dd0      
00566def      PropertyCollection::~PropertyCollection(&var_110);
00566dfb      StringInfo::~StringInfo(&var_98);
00566dfb      
00566e0c      if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
00566e14          **(uint32_t**)ebx_1(1);
00566e14      
00566e22      if (InterlockedDecrement(&m_buffer_3->m_cRef) == 0)
00566e22      {
00566e24          class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = m_buffer_3;
00566e24          
00566e2a          if (m_buffer_5 != 0)
00566e2c              m_buffer_5->vtable->__vecDelDtor(1);
00566e22      }
00566e22      
00566e32      class AC1Legacy::PSRefBuffer<char>* m_buffer_7 = m_buffer_4;
00566e32      
00566e42      if ((InterlockedDecrement(&m_buffer_7->m_cRef) == 0 && m_buffer_7 != 0))
00566e44          m_buffer_7->vtable->__vecDelDtor(1);
00566e44      
00566e4e      int32_t eax_50;
00566e4e      eax_50 = 1;
00566e54      return 1;
005669f0  }

00566e57                                                                       90 90 90 90 90 90 90 90 90                         .........

00566e60  class ClientMagicSystem* ClientMagicSystem::GetMagicSystem()

00566e60  {
00566e65      return ClientMagicSystem::s_pMagicSystem;
00566e60  }

00566e66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00566e70  class SpellComponentTable* __fastcall ClientMagicSystem::GetSpellComponentTable(class ClientMagicSystem* this)

00566e70  {
00566e73      class SpellComponentTable* spellComponentTable = this->spellComponentTable;
00566e73      
00566e78      if (spellComponentTable == 0)
00566e78      {
00566e7a          int32_t var_8_1 = 0x10000006;
00566e7f          int32_t var_c_1 = 2;
00566e81          int32_t var_10_1 = 5;
00566e8b          int32_t edx;
00566e8b          this->spellComponentTable = DBObj::GetByEnum(spellComponentTable, edx, this);
00566e78      }
00566e78      
00566e92      return this->spellComponentTable;
00566e70  }

00566e93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00566ea0  void __fastcall ClientMagicSystem::OnShutdown(class ClientMagicSystem* this)

00566ea0  {
00566ea3      class SpellComponentTable* spellComponentTable = this->spellComponentTable;
00566ea3      
00566ea8      if (spellComponentTable != 0)
00566ea8      {
00566eaa          spellComponentTable->vtable->Release();
00566eaf          this->spellComponentTable = nullptr;
00566ea8      }
00566ea8      
00566eb6      class CSpellTable* spellTable = this->spellTable;
00566eb6      
00566ebb      if (spellTable != 0)
00566ebb      {
00566ebd          spellTable->vtable->Release();
00566ec2          this->spellTable = nullptr;
00566ebb      }
00566ebb      
00566ec9      class ClientMagicSystem* ClientMagicSystem::s_pMagicSystem_1 = ClientMagicSystem::s_pMagicSystem;
00566ec9      
00566ed2      if (ClientMagicSystem::s_pMagicSystem_1 != 0)
00566ed2      {
00566ed4          ClientMagicSystem::s_pMagicSystem_1->vtable->Release();
00566ed9          ClientMagicSystem::s_pMagicSystem = nullptr;
00566ed2      }
00566ea0  }

00566ee4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00566ef0  void __stdcall ClientMagicSystem::FreeHandsAndCastSpell(class ClientMagicSystem* this @ ecx, uint32_t arg2, uint32_t arg3)

00566ef0  {
00566ef0      SmartBox::smartbox->cmdinterp->vtable->MaybeStopCompletely();
00566ef0      
00566f09      if (arg3 == 0)
00566f09      {
00566f10          CM_Magic::Event_CastUntargetedSpell(arg2);
00566f1f          ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
00566f24          return;
00566f09      }
00566f09      
00566f2d      CM_Magic::Event_CastTargetedSpell(arg3, arg2);
00566f3c      ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
00566ef0  }

00566f44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00566f50  void __fastcall ClientMagicSystem::OnEndCharacterSession(class ClientMagicSystem* this)

00566f50  {
00566f52      this->selectedSpell = 0;
00566f55      ClientMagicSystem::targetingSpell = 0;
00566f50  }

00566f5b                                                                                   90 90 90 90 90                             .....

00566f60  class TResult* __thiscall ClientMagicSystem::QueryInterface(class ClientMagicSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00566f60  {
00566f73      int32_t* key;
00566f73      
00566f73      if ((1 & (*(uint8_t*)$S129)) != 0)
00566fc1          key = Offsets[0].key;
00566f73      else
00566f73      {
00566f7d          key = &ClientMagicSystem_InterfaceType;
00566f82          $S129 |= 1;
00566f88          Offsets[0].key = 0x7ce608;
00566f8d          Offsets[0].ofs = 0;
00566f93          Offsets[1].key = 0x7ce5f8;
00566f9d          Offsets[1].ofs = 0;
00566fa3          Offsets[2].key = 0x7ce758;
00566fad          Offsets[2].ofs = 0;
00566fb3          Offsets[3].key = 0;
00566fb9          Offsets[3].ofs = 0;
00566f73      }
00566f73      
00566fc8      void* edx_3 = &Offsets;
00566fc8      
00566fcd      while (key != 0)
00566fcd      {
00566fef          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
00566fef          {
00567012              if (arg4 != 0)
00567012              {
00567014                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0056701e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
00567021                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
00567012              }
00567012              
0056702a              __return->m_val = 0;
0056702d              return __return;
00566fef          }
00566fef          
00566ff1          key = *(uint32_t*)((char*)edx_3 + 8);
00566ff4          edx_3 += 8;
00566fcd      }
00566fcd      
00567002      __return->m_val = 0x80004002;
00567009      return __return;
00566f60  }


00567030  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>* this, uint32_t arg2)

00567030  {
00567033      class HashTableData<unsigned long,Graphic *>** m_buckets = this->m_buckets;
0056703b      this->vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class Graphic*>*,1>::`vftable';
0056703b      
00567041      if (m_buckets != &this->m_aInplaceBuckets)
00567044          operator delete[](m_buckets);
00567044      
0056704e      this->m_buckets = nullptr;
00567051      this->m_firstInterestingBucket = nullptr;
00567054      this->m_numBuckets = 0;
00567057      this->m_numElements = 0;
00567057      
0056705f      if ((arg2 & 1) != 0)
00567062          operator delete(this);
00567062      
0056706d      return this;
00567030  }


00567070  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>* this, uint32_t arg2)

00567070  {
00567073      class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_buckets = this->m_buckets;
0056707b      this->vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,class HashTableData<class IDClass<struct _tagDataID,32,0>,class Graphic*>*,1>::`vftable';
0056707b      
00567081      if (m_buckets != &this->m_aInplaceBuckets)
00567084          operator delete[](m_buckets);
00567084      
0056708e      this->m_buckets = nullptr;
00567091      this->m_firstInterestingBucket = nullptr;
00567094      this->m_numBuckets = 0;
00567097      this->m_numElements = 0;
00567097      
0056709f      if ((arg2 & 1) != 0)
005670a2          operator delete(this);
005670a2      
005670ad      return this;
00567070  }


005670b0  int32_t __thiscall CSpellTable::InqSpellBase(class CSpellTable const* this, uint32_t const arg2, class CSpellBase* arg3)

005670b0  {
005670b1      uint32_t _table_size = this->_spellBaseHash._table_size;
005670b1      
005670b7      if (_table_size != 0)
005670b7      {
005670b9          class PackableHashData<unsigned long,CSpellBase>** _buckets = this->_spellBaseHash._buckets;
005670b9          
005670be          if (_buckets != 0)
005670be          {
005670ca              int32_t* edx_3 = _buckets[(COMBINE(0, arg2) % _table_size)];
005670ca              
005670cf              if (edx_3 != 0)
005670cf              {
005670d3                  while (arg2 != *(uint32_t*)edx_3)
005670d3                  {
005670d5                      edx_3 = edx_3[0x26];
005670d5                      
005670dd                      if (edx_3 == 0)
005670e3                          return 0;
005670d3                  }
005670d3                  
005670eb                  if (edx_3 != 0xfffffff8)
005670eb                  {
005670f9                      CSpellBase::operator=(arg3, &edx_3[2]);
00567105                      return 1;
005670eb                  }
005670cf              }
005670be          }
005670b7      }
005670b7      
005670f1      return 0;
005670b0  }

00567108                          90 90 90 90 90 90 90 90                                                          ........

00567110  uint8_t __thiscall ClientMagicSystem::InqSpellBase(class ClientMagicSystem* this, uint32_t arg2, class CSpellBase* arg3)

00567110  {
00567113      class CSpellTable* spellTable = this->spellTable;
00567113      
00567118      if (spellTable == 0)
00567118      {
0056711a          int32_t var_8_1 = 0x10000005;
0056711f          int32_t var_c_1 = 2;
00567121          int32_t var_10_1 = 6;
0056712b          int32_t edx;
0056712b          this->spellTable = DBObj::GetByEnum(spellTable, edx, this);
00567118      }
00567118      
00567142      int32_t eax_2;
00567142      eax_2 = CSpellTable::InqSpellBase(this->spellTable, arg2, arg3) != 0;
00567146      return eax_2;
00567110  }

00567149                             90 90 90 90 90 90 90                                                           .......

00567150  class AC1Legacy::PStringBase<char>* __thiscall ClientMagicSystem::GetSpellName(class ClientMagicSystem* this, class AC1Legacy::PStringBase<char>* __return, uint32_t arg3)

00567150  {
0056715d      void var_90;
0056715d      CSpellBase::CSpellBase(&var_90);
00567162      class CSpellTable* spellTable = this->spellTable;
00567162      
00567167      if (spellTable == 0)
00567167      {
00567169          int32_t var_98_1 = 0x10000005;
0056716e          int32_t var_9c_1 = 2;
00567170          int32_t var_a0_1 = 6;
0056717a          this->spellTable = DBObj::GetByEnum(spellTable, 0, 0);
00567167      }
00567167      
0056718d      CSpellTable::InqSpellBase(this->spellTable, arg3, &var_90);
0056719e      CSpellBase::InqName(&var_90, __return);
005671a7      CSpellBase::~CSpellBase(&var_90);
005671b5      return __return;
00567150  }

005671b8                                                                          90 90 90 90 90 90 90 90                          ........

005671c0  class AC1Legacy::PStringBase<char>* __thiscall ClientMagicSystem::GetSpellDescription(class ClientMagicSystem* this, class AC1Legacy::PStringBase<char>* __return, uint32_t arg3)

005671c0  {
005671cd      void var_90;
005671cd      CSpellBase::CSpellBase(&var_90);
005671d2      class CSpellTable* spellTable = this->spellTable;
005671d2      
005671d7      if (spellTable == 0)
005671d7      {
005671d9          int32_t var_98_1 = 0x10000005;
005671de          int32_t var_9c_1 = 2;
005671e0          int32_t var_a0_1 = 6;
005671ea          this->spellTable = DBObj::GetByEnum(spellTable, 0, 0);
005671d7      }
005671d7      
005671fd      CSpellTable::InqSpellBase(this->spellTable, arg3, &var_90);
0056720e      CSpellBase::InqDescription(&var_90, __return);
00567217      CSpellBase::~CSpellBase(&var_90);
00567225      return __return;
005671c0  }

00567228                          90 90 90 90 90 90 90 90                                                          ........

00567230  uint8_t ClientMagicSystem::ObjectCompatibleWithSpellTargetType(uint32_t arg1, uint32_t arg2, uint8_t arg3)

00567230  {
00567240      int32_t __saved_esi;
00567240      int32_t* esp = &__saved_esi;
00567241      uint32_t eax;
00567241      void* __saved_edi_2;
00567241      void* var_98;
00567241      void __return;
00567241      void var_90;
00567241      
00567241      if (arg2 != 0)
00567241      {
005672dc          if (arg1 != 0)
005672dc          {
00567344              int32_t edi_1 = (arg2 & 0x8107);
0056734a              class CPlayerSystem* ebp = CPlayerSystem::GetPlayerSystem();
00567354              class CPlayerSystem* m_pVersionStack;
00567354              
00567354              if ((edi_1 != 0 || arg1 != ebp->playerID))
00567354              {
005673bc                  class CPlayerSystem* esi_7 = ClientObjMaintSystem::GetWeenieObject(arg1);
005673bc                  
005673c3                  if (esi_7 != 0)
005673c3                  {
005673c5                      m_pVersionStack = esi_7->playerModule.m_colGameplayOptions.m_ar.m_pVersionStack;
005673c5                      
005673d2                      if ((m_pVersionStack == 0 || m_pVersionStack <= 1))
005673d2                      {
00567423                          void* var_ac_3;
00567423                          
00567423                          if (((arg2 & esi_7->vtable->OnStartup()) != 0 || edi_1 != 0))
00567423                          {
00567496                              if ((esi_7->vtable->AddRef() == 0 && (esi_7->playerModule.m_colGameplayOptions.m_ar.m_SerializeVersionRow.m_hSerialize & 0x10) == 0))
0056748d                                  goto label_567425;
0056748d                              
00567498                              m_pVersionStack = esi_7->playerModule.m_colGameplayOptions.m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_aPrimitiveInplaceMemory[0x28];
00567498                              *(uint8_t*)((char*)m_pVersionStack)[1] = esi_7->playerModule.m_colGameplayOptions.m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_aPrimitiveInplaceMemory[0x29];
00567498                              *(uint8_t*)((char*)m_pVersionStack)[2] = esi_7->playerModule.m_colGameplayOptions.m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_aPrimitiveInplaceMemory[0x2a];
00567498                              *(uint8_t*)((char*)m_pVersionStack)[3] = esi_7->playerModule.m_colGameplayOptions.m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_aPrimitiveInplaceMemory[0x2b];
00567498                              
005674a0                              if (m_pVersionStack == 0)
005674a0                              {
00567540                                  class ACCWeenieObject* eax_10;
00567540                                  eax_10 = ClientObjMaintSystem::GetWeenieObject(ebp->playerID) != 0;
0056754a                                  return eax_10;
005674a0                              }
005674a0                              
005674a6                              m_pVersionStack = arg3;
005674a6                              
005674af                              if (m_pVersionStack == 0)
005674af                              {
005674c7                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(esi_7, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
005674d4                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"This spell cannot be cast on %s");
005674e0                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005674e9                                  StringInfo::StringInfo(&var_90);
005674f9                                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00567502                                  var_ac_3 = &var_90;
00567502                                  goto label_567505;
005674af                              }
00567423                          }
00567423                          else
00567423                          {
00567425                          label_567425:
00567425                              m_pVersionStack = arg3;
00567425                              
0056742e                              if (m_pVersionStack == 0)
0056742e                              {
00567446                                  class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(esi_7, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00567453                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"This spell cannot be cast on %s");
0056745f                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00567468                                  StringInfo::StringInfo(&var_90);
00567478                                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00567481                                  var_ac_3 = &var_90;
00567505                              label_567505:
00567505                                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_ac_3);
00567511                                  StringInfo::~StringInfo(&var_90);
0056751a                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
00567522                                  int32_t eax_8;
00567522                                  eax_8 = 0;
0056752b                                  return 0;
0056742e                              }
00567423                          }
005673d2                      }
005673d2                      else
005673d2                      {
005673d4                          m_pVersionStack = arg3;
005673d4                          
005673dd                          if (m_pVersionStack == 0)
005673dd                          {
005673e3                              StringInfo::StringInfo(&var_90);
005673f1                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"Cannot cast spell on a stack of …");
00567401                              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
0056740a                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
00567398                              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005673a4                              StringInfo::~StringInfo(&var_90);
005673dd                          }
005673d2                      }
005673c3                  }
00567354              }
00567354              else
00567354              {
00567356                  m_pVersionStack = arg3;
00567356                  
0056735f                  if (m_pVersionStack == 0)
0056735f                  {
00567365                      StringInfo::StringInfo(&var_90);
00567373                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"You cannot cast this spell upon …");
00567383                      StringInfo::SetLiteralValue(&var_90, &var_98, 1);
0056738c                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
00567398                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005673a4                      StringInfo::~StringInfo(&var_90);
0056735f                  }
00567354              }
00567354              
005673ac              m_pVersionStack = 0;
005673b5              return 0;
005672dc          }
005672dc          
005672de          eax = arg3;
005672de          
005672e7          if (eax == 0)
005672e7          {
005672ed              StringInfo::StringInfo(&var_90);
005672fb              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"This spell would require a targe…");
0056730b              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00567314              void* esi_6 = ((char*)var_98 - 0x14);
00567314              
00567327              if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
0056732f                  **(uint32_t**)esi_6(1);
0056732f              
00567335              __saved_edi_2 = &__return;
005672b7          label_5672b7:
005672b7              ECM_UI::SendNotice_DisplayStringInfo(0x1a, __saved_edi_2);
005672bc              int32_t __saved_ebp;
005672bc              esp = &__saved_ebp;
005672c3              StringInfo::~StringInfo(&__return);
005672e7          }
00567241      }
00567241      else
00567241      {
00567250          if (arg1 == 0)
00567250          {
00567253              eax = 1;
0056725c              return 1;
00567250          }
00567250          
0056725d          eax = arg3;
0056725d          
00567266          if (eax == 0)
00567266          {
0056726c              StringInfo::StringInfo(&var_90);
0056727a              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"This spell would require no targ…");
0056728a              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00567293              int32_t* esi_2 = ((char*)var_98 - 0x14);
00567293              
005672a6              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005672ae                  **(uint32_t**)esi_2(1);
005672ae              
005672b4              __saved_edi_2 = &__return;
005672b4              goto label_5672b7;
00567266          }
00567241      }
005672c8      *(uint32_t*)esp;
005672c9      eax = 0;
005672c8      esp[1];
005672d2      return 0;
00567230  }

0056754b                                   90 90 90 90 90                                                             .....

00567550  void __stdcall ClientMagicSystem::CompositeSpellIcon(class ClientMagicSystem* this @ ecx, uint32_t arg2, class Graphic* arg3)

00567550  {
0056755b      void var_b4;
0056755b      CSpellBase::CSpellBase(&var_b4);
00567560      class ClientMagicSystem* ClientMagicSystem::s_pMagicSystem_1 = ClientMagicSystem::s_pMagicSystem;
00567566      class CSpellTable* spellTable = ClientMagicSystem::s_pMagicSystem_1->spellTable;
00567566      
0056756e      if (spellTable == 0)
0056756e      {
00567570          int32_t __saved_ebx_1 = 0x10000005;
00567575          int32_t __saved_edi_1 = 2;
00567577          int32_t var_e0_1 = 6;
00567569          ClientMagicSystem::s_pMagicSystem_1->spellTable = DBObj::GetByEnum(spellTable, 0, 0);
0056756e      }
0056756e      
0056759b      void* ecx_3 = &var_b4;
0056759b      
0056759f      if (CSpellTable::InqSpellBase(ClientMagicSystem::s_pMagicSystem_1->spellTable, arg2, &var_b4) != 0)
0056759f      {
005675b7          class RenderSurface* m_image = arg3->m_image;
005675b7          
005675bc          if (m_image != 0)
005675bc          {
005675c8              int32_t __return;
005675c8              class SpellFormula* eax_2;
005675c8              int32_t edx_2;
005675c8              int32_t ebp;
005675c8              eax_2 = CSpellBase::InqSpellFormula(ecx_3, &__return);
005675cf              uint32_t eax_3;
005675cf              uint32_t ecx_5;
005675cf              eax_3 = SpellFormula::GetPowerLevelOfPowerComponent(eax_2);
005675d4              int32_t var_e0_3 = 0xc;
005675d6              int32_t var_e4 = 0x10000006;
005675db              uint32_t var_e8 = eax_3;
005675e4              class DBObj* edi = DBObj::GetByEnum(eax_3, edx_2, ecx_5);
00567600              __return = 0x79285c;
0056760b              SurfaceWindow::Blit(&m_image->window, ((char*)edi + 0xac), Blit_Normal, 1f);
00567621              void var_bc;
00567621              class IDClass<_tagDataID,32,0> var_a4;
00567621              class DBObj* eax_6;
00567621              uint32_t ecx_9;
00567621              int32_t edx_4;
00567621              eax_6 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_bc, var_a4, 0xc));
00567621              
0056762d              if (eax_6 != 0)
0056763f                  ecx_9 = SurfaceWindow::Blit(&m_image->window, ((char*)eax_6 + 0xac), Blit_4Alpha, 1f);
0056763f              
00567648              int32_t var_9c;
00567648              int32_t eax_8;
00567648              eax_8 = (var_9c & 0x10);
0056764a              char temp1 = eax_8;
0056764a              eax_8 = -(eax_8);
0056764d              int32_t var_e4_2 = 0xc;
0056764f              int32_t var_e8_3 = 0x10000007;
00567659              int32_t var_ec = ((eax_8 - eax_8) + 2);
0056765a              class DBObj* eax_11 = DBObj::GetByEnum(((eax_8 - eax_8) + 2), edx_4, ecx_9);
00567672              int32_t var_cc = 0x3f800000;
0056767a              int32_t var_c8 = 0x3f800000;
00567682              int32_t var_c4 = 0x3f800000;
0056768a              int32_t var_c0 = 0x3f800000;
00567692              uint32_t ecx_13;
00567692              int32_t edx_5;
00567692              ecx_13 = SurfaceWindow::ReplaceColor(&m_image->window, &var_cc, ((char*)eax_11 + 0xac));
00567692              
0056769e              if ((*(uint8_t*)((char*)var_9c)[1] & 0x20) != 0)
0056769e              {
005676a0                  int32_t var_e4_4 = 0xc;
005676a2                  int32_t var_e8_5 = 0x10000007;
005676a7                  int32_t var_ec_1 = 4;
005676c5              label_5676c5:
005676c5                  int32_t* edi_1 = DBObj::GetByEnum(var_9c, edx_5, ecx_13);
005676d2                  SurfaceWindow::Blit(&m_image->window, &edi_1[0x2b], Blit_4Alpha, 1f);
005676d2                  
005676d9                  if (edi_1 != 0)
005676df                      *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)(ebp);
0056769e              }
0056769e              else if ((var_9c & 8) != 0)
005676ad              {
005676af                  int32_t var_e4_5 = 0xc;
005676b1                  int32_t var_e8_6 = 0x10000007;
005676b6                  int32_t var_ec_2 = 3;
005676b6                  goto label_5676c5;
005676ad              }
005676ad              
005676e8              if (eax_11 != 0)
005676ea                  eax_11->vtable->Release(ebp);
005676ea              
005676f5              if (eax_6 != 0)
005676f7                  eax_6->vtable->Release();
005676f7              
00567700              if (edi != 0)
00567702                  edi->vtable->Release();
00567702              
0056770d              CSpellBase::~CSpellBase(&var_b4);
0056771b              return;
005675bc          }
0056759f      }
0056759f      
005675a1      CSpellBase::~CSpellBase(ecx_3);
00567550  }

0056771e                                                                                            90 90                                ..

00567720  void __stdcall ClientMagicSystem::CompositeSpellComponentIcon(class ClientMagicSystem* this @ ecx, class IDClass<_tagDataID,32,0> arg2, class Graphic* arg3)

00567720  {
00567728      class RenderSurface* m_image = arg3->m_image;
00567728      
0056772d      if (m_image != 0)
0056772d      {
00567745          void var_28;
00567745          class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_28, arg2, 0xc));
00567745          
00567751          if (eax_1 == 0)
00567751          {
005677d9              SurfaceWindow::Fill(&m_image->window, &ClientMagicSystem::s_NullColor);
005677e3              return;
00567751          }
00567751          
00567769          SurfaceWindow::Blit(&m_image->window, ((char*)eax_1 + 0xac), Blit_Normal, 1f);
0056779a          int32_t var_20 = 0;
005677a2          int32_t var_1c_1 = 0;
005677aa          int32_t var_18_1 = 0;
005677b2          int32_t var_14;
005677b2          __builtin_memcpy(&var_14, "\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f", 0x14);
005677ba          int32_t var_10;
005677ba          SurfaceWindow::ReplaceColor(&m_image->window, &var_10, &var_20);
005677bf          eax_1->vtable->Release();
0056772d      }
00567720  }

005677e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005677f0  uint32_t ClientMagicSystem::Handle_Magic__UpdateSpell(class ClientMagicSystem* this @ ecx, uint32_t arg2)

005677f0  {
005677f3      int32_t esi;
005677f3      int32_t var_18 = esi;
005677f4      struct Turbine_GUID* edi;
005677f4      struct Turbine_GUID* var_1c = edi;
005677f9      struct Turbine_GUID* var_14;
005677f9      int32_t* var_20 = &var_14;
005677fe      struct Turbine_GUID* var_24 = &PlayerDesc_ClassType;
00567806      var_14 = nullptr;
00567811      class TResult __return;
00567811      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_24, var_20);
00567816      struct Turbine_GUID* ecx_1 = var_14;
0056781f      var_24 = ecx_1;
00567821      int32_t var_20_1 = 0;
00567824      struct Turbine_GUID* eax_1 = var_24;
0056782a      int32_t var_8 = 0;
0056782e      uint32_t var_4 = 0;
0056782e      
00567832      if (eax_1 != 0)
00567838          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00567838      
00567844      void var_c;
00567844      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
00567844      struct Turbine_GUID** esp = &var_24;
00567844      
0056784b      if (ecx_1 != 0)
00567851          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00567851      
00567854      class TResult __return_1 = __return;
00567854      
0056785a      if (__return_1 != 0)
0056785a      {
00567863          CACQualities::AddSpell(__return_1, var_4);
00567869          CM_Magic::SendNotice_SpellAdded(var_4);
00567875          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00567875          esp = &var_1c;
0056785a      }
0056785a      
00567878      *(uint32_t*)esp;
00567878      esp[1];
0056787f      return 0;
005677f0  }

00567882        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00567890  uint32_t ClientMagicSystem::Handle_Magic__RemoveSpell(class ClientMagicSystem* this @ ecx, uint32_t arg2)

00567890  {
00567893      int32_t esi;
00567893      int32_t var_18 = esi;
00567894      struct Turbine_GUID* edi;
00567894      struct Turbine_GUID* var_1c = edi;
00567899      struct Turbine_GUID* var_14;
00567899      int32_t* var_20 = &var_14;
0056789e      struct Turbine_GUID* var_24 = &PlayerDesc_ClassType;
005678a6      var_14 = nullptr;
005678b1      class TResult __return;
005678b1      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_24, var_20);
005678b6      struct Turbine_GUID* ecx_1 = var_14;
005678bf      var_24 = ecx_1;
005678c1      int32_t var_20_1 = 0;
005678c4      struct Turbine_GUID* eax_1 = var_24;
005678ca      int32_t var_8 = 0;
005678ce      uint32_t var_4 = 0;
005678ce      
005678d2      if (eax_1 != 0)
005678d8          *(uint32_t*)(eax_1->m_data1 + 0x10)();
005678d8      
005678e4      void var_c;
005678e4      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
005678e4      struct Turbine_GUID** esp = &var_24;
005678e4      
005678eb      if (ecx_1 != 0)
005678f1          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
005678f1      
005678f4      class TResult __return_1 = __return;
005678f4      
005678fa      if (__return_1 != 0)
005678fa      {
00567903          CACQualities::RemoveSpell(__return_1, var_4);
00567909          CM_Magic::SendNotice_SpellRemoved(var_4);
00567915          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00567915          esp = &var_1c;
005678fa      }
005678fa      
00567918      *(uint32_t*)esp;
00567918      esp[1];
0056791f      return 0;
00567890  }

00567922        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00567930  uint32_t ClientMagicSystem::Handle_Magic__UpdateEnchantment(class ClientMagicSystem* this @ ecx, class Enchantment const* arg2)

00567930  {
00567939      struct Turbine_GUID* var_14;
00567939      int32_t* var_20 = &var_14;
0056793e      struct Turbine_GUID* var_24 = &PlayerDesc_ClassType;
00567946      var_14 = nullptr;
00567951      class TResult __return;
00567951      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_24, var_20);
00567956      struct Turbine_GUID* ecx_1 = var_14;
0056795f      var_24 = ecx_1;
00567961      int32_t var_20_1 = 0;
00567964      struct Turbine_GUID* eax_1 = var_24;
0056796a      int32_t var_8 = 0;
0056796e      class Enchantment* var_4 = nullptr;
0056796e      
00567972      if (eax_1 != 0)
00567978          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00567978      
00567984      void var_c;
00567984      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
00567984      struct Turbine_GUID** esp = &var_24;
00567984      
0056798b      if (ecx_1 != 0)
00567991          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00567991      
00567994      class TResult __return_1 = __return;
00567994      
0056799a      if (__return_1 != 0)
0056799a      {
005679a3          CACQualities::UpdateEnchantment(__return_1, var_4);
005679a3          
005679af          if ((var_4->_smod.type & "activation type (%s) with '%s' b…") != 0)
005679af          {
005679b1              CM_Magic::SendNotice_VitaeChanged();
005679ba              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
005679c4              return 0;
005679af          }
005679af          
005679c7          CM_Magic::SendNotice_EnchantmentsChanged();
005679d0          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
005679d0          struct Turbine_GUID* __saved_edi;
005679d0          esp = &__saved_edi;
0056799a      }
0056799a      
005679d3      *(uint32_t*)esp;
005679d3      esp[1];
005679da      return 0;
00567930  }

005679dd                                                                                         90 90 90                               ...

005679e0  uint32_t ClientMagicSystem::Handle_Magic__UpdateMultipleEnchantments(class ClientMagicSystem* this @ ecx, class PackableList<Enchantment>* arg2)

005679e0  {
005679e3      int32_t esi;
005679e3      int32_t var_18 = esi;
005679e4      struct Turbine_GUID* edi;
005679e4      struct Turbine_GUID* var_1c = edi;
005679e9      struct Turbine_GUID* var_14;
005679e9      int32_t* var_20 = &var_14;
005679ee      struct Turbine_GUID* var_24 = &PlayerDesc_ClassType;
005679f6      var_14 = nullptr;
00567a01      class TResult __return;
00567a01      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_24, var_20);
00567a06      struct Turbine_GUID* ecx_1 = var_14;
00567a0f      var_24 = ecx_1;
00567a11      int32_t var_20_1 = 0;
00567a14      struct Turbine_GUID* eax_1 = var_24;
00567a1a      int32_t var_8 = 0;
00567a1e      class PackableList<Enchantment>* var_4 = nullptr;
00567a1e      
00567a22      if (eax_1 != 0)
00567a28          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00567a28      
00567a34      void var_c;
00567a34      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
00567a34      struct Turbine_GUID** esp = &var_24;
00567a34      
00567a3b      if (ecx_1 != 0)
00567a41          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00567a41      
00567a44      class TResult __return_1 = __return;
00567a44      
00567a4a      if (__return_1 != 0)
00567a4a      {
00567a53          CACQualities::UpdateEnchantments(__return_1, var_4);
00567a58          CM_Magic::SendNotice_EnchantmentsChanged();
00567a61          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00567a61          esp = &var_1c;
00567a4a      }
00567a4a      
00567a64      *(uint32_t*)esp;
00567a64      esp[1];
00567a6b      return 0;
005679e0  }

00567a6e                                            90 90                                                                ..

00567a70  uint32_t ClientMagicSystem::Handle_Magic__PurgeEnchantments(class ClientMagicSystem* this @ ecx)

00567a70  {
00567a73      int32_t esi;
00567a73      int32_t var_18 = esi;
00567a74      struct Turbine_GUID* edi;
00567a74      struct Turbine_GUID* var_1c = edi;
00567a79      struct Turbine_GUID* var_14;
00567a79      int32_t* var_20 = &var_14;
00567a7e      struct Turbine_GUID* var_24 = &PlayerDesc_ClassType;
00567a86      var_14 = nullptr;
00567a91      class TResult __return;
00567a91      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_24, var_20);
00567a96      struct Turbine_GUID* ecx_1 = var_14;
00567a9f      var_24 = ecx_1;
00567aa1      int32_t var_20_1 = 0;
00567aa4      struct Turbine_GUID* eax_1 = var_24;
00567aaa      int32_t var_8 = 0;
00567aae      int32_t var_4 = 0;
00567aae      
00567ab2      if (eax_1 != 0)
00567ab8          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00567ab8      
00567ac4      void var_c;
00567ac4      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
00567ac4      struct Turbine_GUID** esp = &var_24;
00567ac4      
00567acb      if (ecx_1 != 0)
00567ad1          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00567ad1      
00567ad4      class TResult __return_1 = __return;
00567ad4      
00567ada      if (__return_1 != 0)
00567ada      {
00567ade          CACQualities::PurgeEnchantments(__return_1);
00567ae3          CM_Magic::SendNotice_EnchantmentsChanged();
00567ae8          CM_Magic::SendNotice_VitaeChanged();
00567af1          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00567af1          esp = &var_1c;
00567ada      }
00567ada      
00567af4      *(uint32_t*)esp;
00567af4      esp[1];
00567afb      return 0;
00567a70  }

00567afc                                                                                      90 90 90 90                              ....

00567b00  uint32_t ClientMagicSystem::Handle_Magic__PurgeBadEnchantments(class ClientMagicSystem* this @ ecx)

00567b00  {
00567b03      int32_t esi;
00567b03      int32_t var_18 = esi;
00567b04      struct Turbine_GUID* edi;
00567b04      struct Turbine_GUID* var_1c = edi;
00567b09      struct Turbine_GUID* var_14;
00567b09      int32_t* var_20 = &var_14;
00567b0e      struct Turbine_GUID* var_24 = &PlayerDesc_ClassType;
00567b16      var_14 = nullptr;
00567b21      class TResult __return;
00567b21      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_24, var_20);
00567b26      struct Turbine_GUID* ecx_1 = var_14;
00567b2f      var_24 = ecx_1;
00567b31      int32_t var_20_1 = 0;
00567b34      struct Turbine_GUID* eax_1 = var_24;
00567b3a      int32_t var_8 = 0;
00567b3e      int32_t var_4 = 0;
00567b3e      
00567b42      if (eax_1 != 0)
00567b48          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00567b48      
00567b54      void var_c;
00567b54      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
00567b54      struct Turbine_GUID** esp = &var_24;
00567b54      
00567b5b      if (ecx_1 != 0)
00567b61          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00567b61      
00567b64      class TResult __return_1 = __return;
00567b64      
00567b6a      if (__return_1 != 0)
00567b6a      {
00567b6e          CACQualities::PurgeBadEnchantments(__return_1);
00567b73          CM_Magic::SendNotice_EnchantmentsChanged();
00567b78          CM_Magic::SendNotice_VitaeChanged();
00567b81          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00567b81          esp = &var_1c;
00567b6a      }
00567b6a      
00567b84      *(uint32_t*)esp;
00567b84      esp[1];
00567b8b      return 0;
00567b00  }

00567b8c                                      90 90 90 90                                                              ....

00567b90  uint8_t ClientMagicSystem::AreSpellComponentsRequired(class ClientMagicSystem const* this @ ecx)

00567b90  {
00567b93      int32_t ebx;
00567b93      int32_t var_1c = ebx;
00567b94      int32_t esi;
00567b94      int32_t var_20 = esi;
00567b95      struct Turbine_GUID* edi;
00567b95      struct Turbine_GUID* var_24 = edi;
00567b9a      struct Turbine_GUID* var_18;
00567b9a      int32_t* var_28 = &var_18;
00567b9f      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
00567ba7      int32_t var_14 = 1;
00567baf      var_18 = nullptr;
00567bba      void __return;
00567bba      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
00567bbf      struct Turbine_GUID* ecx_1 = var_18;
00567bc3      struct Turbine_GUID** esp_1 = &var_2c;
00567bc8      var_2c = ecx_1;
00567bca      int32_t var_28_1 = 0;
00567bcd      struct Turbine_GUID* eax_1 = var_2c;
00567bd3      int32_t var_8 = 0;
00567bd7      int32_t var_4 = 0;
00567bd7      
00567bdb      if (eax_1 != 0)
00567bdb      {
00567be1          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00567be1          esp_1 = &var_24;
00567bdb      }
00567bdb      
00567be8      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[8];
00567bed      InterfacePtr<class PlayerDesc>::_QueryInterface(&esp_1[9]);
00567bed      
00567bf4      if (ecx_1 != 0)
00567bfa          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00567bfa      
00567bfd      int32_t* esi_2 = esp_1[7];
00567c05      *(uint32_t*)((char*)esp_1 - 4) = &esp_1[4];
00567c06      *(uint32_t*)((char*)esp_1 - 8) = 0x44;
00567c0b      CBaseQualities::InqBool(&esi_2[0xe]);
00567c14      ebx = esp_1[4] != 0;
00567c14      
00567c19      if (esi_2 != 0)
00567c1f          *(uint32_t*)(*(uint32_t*)esi_2 + 0x14)();
00567c1f      
00567c22      *(uint32_t*)esp_1;
00567be8      esp_1[1];
00567be8      esp_1[2];
00567c2a      return ebx;
00567b90  }

00567c2b                                   90 90 90 90 90                                                             .....

00567c30  uint8_t ClientMagicSystem::ObjectCompatibleWithSpell(uint32_t arg1, uint32_t arg2, uint8_t arg3, uint8_t arg4)

00567c30  {
00567c40      if (arg2 != 0)
00567c40      {
00567c47          void var_120;
00567c47          CSpellBase::CSpellBase(&var_120);
00567c4c          class ClientMagicSystem* ClientMagicSystem::s_pMagicSystem_1 = ClientMagicSystem::s_pMagicSystem;
00567c52          class CSpellTable* spellTable = ClientMagicSystem::s_pMagicSystem_1->spellTable;
00567c52          
00567c5a          if (spellTable == 0)
00567c5a          {
00567c5c              int32_t var_134_1 = 0x10000005;
00567c61              int32_t var_138_1 = 2;
00567c63              int32_t var_13c_1 = 6;
00567c55              ClientMagicSystem::s_pMagicSystem_1->spellTable = DBObj::GetByEnum(spellTable, 0, 0);
00567c5a          }
00567c5a          
00567c7f          if ((CSpellTable::InqSpellBase(ClientMagicSystem::s_pMagicSystem_1->spellTable, arg2, &var_120) != 0 && ClientMagicSystem::ObjectCompatibleWithSpellTargetType(arg1, CSpellBase::InqTargetType(&var_120), arg3) != 0))
00567c7f          {
00567cc3              if (arg4 != 0)
00567cc3              {
00567ccc                  void var_90;
00567ccc                  StringInfo::StringInfo(&var_90);
00567ce6                  void __return;
00567ce6                  char (* var_134_4)[0x1] = &CSpellBase::InqName(&var_120, &__return)->m_buffer->m_data;
00567d03                  void var_124;
00567d03                  StringInfo::SetLiteralValue(&var_90, PStringBase<unsigned short>::PStringBase<unsigned short>(&var_124, Formatted, u"Casting %hs"), 1);
00567d0c                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_124);
00567d15                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&__return);
00567d24                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00567d33                  StringInfo::~StringInfo(&var_90);
00567cc3              }
00567cc3              
00567d3c              CSpellBase::~CSpellBase(&var_120);
00567d41              int32_t eax_7;
00567d41              eax_7 = 1;
00567d4a              return 1;
00567c7f          }
00567c7f          
00567cab          CSpellBase::~CSpellBase(&var_120);
00567c40      }
00567c40      
00567cb0      int32_t eax;
00567cb0      eax = 0;
00567cb9      return 0;
00567c30  }

00567d4b                                   90 90 90 90 90                                                             .....

00567d50  class SpellFormula* ClientMagicSystem::GetAppropriateSpellFormula(class SpellFormula* __return, class CSpellBase const* arg2)

00567d50  {
00567d54      int32_t* ebp;
00567d54      int32_t* var_2c = ebp;
00567d55      int32_t esi;
00567d55      int32_t var_30 = esi;
00567d56      class CSpellBase* esi_1 = arg2;
00567d5a      uint32_t _school = esi_1->_school;
00567d5d      int32_t edi;
00567d5d      int32_t var_34 = edi;
00567d5e      uint32_t _school_1 = _school;
00567d63      void var_20;
00567d63      void* var_3c = &var_20;
00567d64      uint32_t edx;
00567d64      SpellComponentTable::SchoolOfMagic2WCID(_school, edx);
00567d69      class CPlayerSystem* eax = CPlayerSystem::GetPlayerSystem();
00567d77      class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(eax->playerID);
00567d83      class ACCWeenieObject* var_1c = eax_2;
00567d87      int32_t* var_24;
00567d87      int32_t* var_10;
00567d87      
00567d87      if (eax_2 == 0)
00567d87      {
00567d91          accountID::accountID(&var_10, &eax->account_);
00567d96          int32_t* edi_3 = var_10;
00567da2          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_24, &edi_3[5]);
00567db3          CSpellBase::InqCustomizedSpellFormula(esi_1, __return, &var_24);
00567db8          int32_t* eax_3 = var_24;
00567db8          
00567dd0          if ((InterlockedDecrement(&eax_3[1]) == 0 && eax_3 != 0))
00567dd8              **(uint32_t**)eax_3(1);
00567dd8          
00567de6          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00567dee              **(uint32_t**)edi_3(1);
00567dee          
00567df9          return __return;
00567d87      }
00567d87      
00567e09      arg2 = nullptr;
00567e0d      var_24 = nullptr;
00567e18      class TResult __return_1;
00567e18      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, &PlayerDesc_ClassType, &var_24);
00567e1d      int32_t* ecx_6 = var_24;
00567e31      var_10 = nullptr;
00567e35      int32_t var_c = 0;
00567e35      
00567e39      if (ecx_6 != 0)
00567e3f          *(uint32_t*)(*(uint32_t*)ecx_6 + 0x10)(ecx_6, 0);
00567e3f      
00567e4b      void var_14;
00567e4b      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_10, &var_14);
00567e4b      
00567e52      if (ecx_6 != 0)
00567e59          *(uint32_t*)(*(uint32_t*)ecx_6 + 0x14)(ecx_6, 0);
00567e59      
00567e5f      class TResult __return_3 = __return_1;
00567e63      int32_t eax_12 = (esi_1->_school - 1);
00567e63      
00567e67      if (eax_12 <= 4)
00567e67      {
00567e69          uint32_t var_4c_1;
00567e69          void* const* var_48_1;
00567e69          
00567e69          switch (eax_12)
00567e69          {
00567e70              case 0:
00567e70              {
00567e70                  int32_t var_40_3 = 0;
00567e71                  int32_t var_44_1 = 0;
00567e76                  var_48_1 = &__return_addr;
00567e77                  var_4c_1 = 0x129;
00567e70                  break;
00567e70              }
00567e7e              case 1:
00567e7e              {
00567e7e                  int32_t var_40_4 = 0;
00567e7f                  int32_t var_44_2 = 0;
00567e84                  var_48_1 = &__return_addr;
00567e85                  var_4c_1 = 0x128;
00567e7e                  break;
00567e7e              }
00567e8c              case 2:
00567e8c              {
00567e8c                  int32_t var_40_5 = 0;
00567e8d                  int32_t var_44_3 = 0;
00567e92                  var_48_1 = &__return_addr;
00567e93                  var_4c_1 = 0x127;
00567e8c                  break;
00567e8c              }
00567e9a              case 3:
00567e9a              {
00567e9a                  int32_t var_40_6 = 0;
00567e9b                  int32_t var_44_4 = 0;
00567ea0                  var_48_1 = &__return_addr;
00567ea1                  var_4c_1 = 0x126;
00567e9a                  break;
00567e9a              }
00567ea8              case 4:
00567ea8              {
00567ea8                  int32_t var_40_7 = 0;
00567ea9                  int32_t var_44_5 = 0;
00567eae                  var_48_1 = &__return_addr;
00567eaf                  var_4c_1 = 0x148;
00567ea8                  break;
00567ea8              }
00567e69          }
00567e69          
00567eb7          CBaseQualities::InqInt((__return_3 + 0x38), var_4c_1, var_48_1, 0, 0);
00567e67      }
00567e67      
00567ec5      class SpellFormula* __return_2;
00567ec5      class IDClass<_tagDataID,32,0> ebx;
00567ec5      
00567ec5      if (((eax_12 > 4 || __return_addr > 0 == 0) && ACCWeenieObject::MagicPackIsOwned(var_24, ebx) == 0))
00567ec5      {
00567ee5          accountID::accountID(&__return_1, &eax->account_);
00567eea          class TResult __return_4 = __return_1;
00567ef6          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_2c, (__return_4 + 0x14));
00567f07          CSpellBase::InqCustomizedSpellFormula(esi_1, __return_2, &var_2c);
00567f0c          int32_t* eax_16 = var_2c;
00567f0c          
00567f24          if ((InterlockedDecrement(&eax_16[1]) == 0 && eax_16 != 0))
00567f2c              **(uint32_t**)eax_16(1);
00567f2c          
00567f3a          if ((InterlockedDecrement((__return_4 + 4)) == 0 && __return_4 != 0))
00567f42              **(uint32_t**)__return_4(1);
00567f42          
00567f46          if (__return_3 != 0)
00567f4d              *(uint32_t*)(*(uint32_t*)__return_3 + 0x14)(ecx_6, 0);
00567f4d          
00567f5b          return __return_2;
00567ec5      }
00567ec5      
00567f63      CSpellBase::InqScarabOnlyFormula(esi_1, __return_2);
00567f63      
00567f6a      if (__return_3 != 0)
00567f71          *(uint32_t*)(*(uint32_t*)__return_3 + 0x14)(ecx_6, 0);
00567f71      
00567f7d      return __return_2;
00567d50  }

00567f7e                                                                                            8b ff                                ..
00567f80  uint32_t jump_table_567f80[0x5] = 
00567f80  {
00567f80      [0x0] =  0x00567e70
00567f84      [0x1] =  0x00567e7e
00567f88      [0x2] =  0x00567e8c
00567f8c      [0x3] =  0x00567e9a
00567f90      [0x4] =  0x00567ea8
00567f94  }

00567f94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00567fa0  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::grow(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>* this)

00567fa0  {
00567fa0      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>* m_numBuckets = this;
00567fa2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00567fae      m_numBuckets = this->m_numBuckets;
00567fc5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00567fc5      
00567fcf      if (eax_2 != bucketSizesEnd_1)
00567fd8          eax_2 = &eax_2[1];
00567fcf      else
00567fcf      {
00567fd1          eax_2 -= 4;
00567fd1          
00567fd6          if (eax_2 != bucketSizesEnd_1)
00567fd8              eax_2 = &eax_2[1];
00567fcf      }
00567fcf      
00567fe8      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00567fa0  }

00567fe9                             90 90 90 90 90 90 90                                                           .......

00567ff0  uint8_t __fastcall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::grow(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>* this)

00567ff0  {
00567ff0      class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>* m_numBuckets = this;
00567ff2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00567ffe      m_numBuckets = this->m_numBuckets;
00568015      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00568015      
0056801f      if (eax_2 != bucketSizesEnd_1)
00568028          eax_2 = &eax_2[1];
0056801f      else
0056801f      {
00568021          eax_2 -= 4;
00568021          
00568026          if (eax_2 != bucketSizesEnd_1)
00568028              eax_2 = &eax_2[1];
0056801f      }
0056801f      
00568038      return IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00567ff0  }

00568039                                                                             90 90 90 90 90 90 90                           .......

00568040  void ClientMagicSystem::CastSpell(uint32_t arg1, uint8_t arg2)

00568040  {
0056804c      void var_120;
0056804c      CSpellBase::CSpellBase(&var_120);
00568051      class ClientMagicSystem* ClientMagicSystem::s_pMagicSystem_1 = ClientMagicSystem::s_pMagicSystem;
00568057      class CSpellTable* spellTable = ClientMagicSystem::s_pMagicSystem_1->spellTable;
00568057      
0056805f      if (spellTable == 0)
0056805f      {
00568061          int32_t __saved_edi_1 = 0x10000005;
00568066          int32_t var_158_1 = 2;
00568068          int32_t var_15c_1 = 6;
0056805a          ClientMagicSystem::s_pMagicSystem_1->spellTable = DBObj::GetByEnum(spellTable, 0, 0);
0056805f      }
0056805f      
0056808a      if (CSpellTable::InqSpellBase(ClientMagicSystem::s_pMagicSystem_1->spellTable, arg1, &var_120) == 0)
0056808a      {
00568090          CSpellBase::~CSpellBase(&var_120);
0056809d          return;
0056808a      }
0056808a      
005680ac      void* var_148;
005680ac      void var_90;
005680ac      
005680ac      if (ClientMagicSystem::AreSpellComponentsRequired(ClientMagicSystem::s_pMagicSystem) != 0)
005680ac      {
005680b8          int32_t __return;
005680b8          ClientMagicSystem::GetAppropriateSpellFormula(&__return, &var_120);
005680c7          class ComponentTracker* eax_4 = CPlayerSystem::GetComponentTracker(CPlayerSystem::GetPlayerSystem());
005680d2          int32_t esi_1 = 0;
005680d4          int32_t eax_5;
005680d4          uint32_t edx_1;
005680d4          eax_5 = SpellFormula::GetNumSpellComponents(&__return);
005680d4          
005680db          if (eax_5 > 0)
005680db          {
00568119              int32_t eax_8;
00568119              
00568119              do
00568119              {
005680e7                  class IDClass<_tagDataID,32,0>* __return_1;
005680e7                  void var_140;
005680e7                  
005680e7                  if ((esi_1 < 0 || esi_1 >= 8))
005680ef                      __return_1 = nullptr;
005680e7                  else
005680e9                      __return_1 = *(uint32_t*)(&var_140 + (esi_1 << 2));
005680f1                  class IDClass<_tagDataID,32,0>* __return_2 = __return_1;
005680f6                  int32_t* var_15c_3 = &var_148;
005680f6                  
0056810b                  if (ComponentTracker::ComponentIsOwned(eax_4, SpellComponentTable::SCIDtoWCID(__return_1, edx_1)->id) == 0)
0056810b                  {
00568160                      StringInfo::StringInfo(&var_90);
0056816e                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_148, u"You do not have all of this spel…");
00568181                      StringInfo::SetLiteralValue(&var_90, &var_148, 1);
0056818a                      void* esi_3 = ((char*)var_148 - 0x14);
0056818a                      
0056819d                      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
005681a5                          **(uint32_t**)esi_3(1);
005681a5                      
005681b1                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005681c0                      StringInfo::~StringInfo(&var_90);
005681c9                      __return = 0x79285c;
005681d1                      CSpellBase::~CSpellBase(&var_120);
005681df                      return;
0056810b                  }
0056810b                  
00568111                  esi_1 += 1;
00568112                  eax_8 = SpellFormula::GetNumSpellComponents(&__return);
00568119              } while (esi_1 < eax_8);
005680db          }
005680ac      }
005680ac      
00568120      char var_108;
00568120      
00568120      if ((var_108 & 8) != 0)
00568120      {
00568126          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00568126          
0056812d          if (SmartBox::smartbox_1 == 0)
0056812d          {
005681ea              ClientMagicSystem::FreeHandsAndCastSpell(ClientMagicSystem::s_pMagicSystem, arg1, 0);
005681f3              CSpellBase::~CSpellBase(&var_120);
00568201              return;
0056812d          }
0056812d          
00568141          ClientMagicSystem::FreeHandsAndCastSpell(ClientMagicSystem::s_pMagicSystem, arg1, SmartBox::smartbox_1->player_id);
0056814a          CSpellBase::~CSpellBase(&var_120);
00568158          return;
00568120      }
00568120      
0056820d      if (CSpellBase::InqTargetType(&var_120) == 0)
0056820d      {
0056820f          SmartBox::smartbox->cmdinterp->vtable->MaybeStopCompletely();
00568224          CM_Magic::Event_CastUntargetedSpell(arg1);
00568233          ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
0056823c          CSpellBase::~CSpellBase(&var_120);
0056824a          return;
0056820d      }
0056820d      
0056824b      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0056824b      
00568253      if (ACCWeenieObject::selectedID_1 == 0)
00568253      {
0056829d          StringInfo::StringInfo(&var_90);
005682ab          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_148, u"You must select a suitable targe…");
005682be          StringInfo::SetLiteralValue(&var_90, &var_148, 1);
005682c7          int32_t* esi_5 = ((char*)var_148 - 0x14);
005682c7          
005682da          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
005682e2              **(uint32_t**)esi_5(1);
005682e2          
005682ee          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005682fd          StringInfo::~StringInfo(&var_90);
00568253      }
00568253      else if (ClientMagicSystem::ObjectCompatibleWithSpell(ACCWeenieObject::selectedID_1, arg1, 0, 1) != 0)
00568265      {
00568273          ClientMagicSystem::FreeHandsAndCastSpell(ClientMagicSystem::s_pMagicSystem, arg1, ACCWeenieObject::selectedID_1);
0056827b          ACCWeenieObject::SetSelectedObject(ACCWeenieObject::selectedID_1, 0);
00568287          CSpellBase::~CSpellBase(&var_120);
00568295          return;
00568265      }
00568265      
00568306      CSpellBase::~CSpellBase(&var_120);
00568040  }

00568315                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00568320  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>* this, uint32_t arg2)

00568320  {
0056832b      arg2 = arg2;
0056832f      uint8_t edx = ((int8_t)arg2);
00568333      this->m_buckets = nullptr;
00568336      this->m_firstInterestingBucket = nullptr;
00568339      this->m_numBuckets = 0;
0056833c      this->m_numElements = 0;
00568340      this->vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class Graphic*>*,1>::`vftable';
00568346      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00568359      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00568359      
00568363      if (eax == bucketSizesEnd_1)
00568365          eax -= 4;
00568365      
00568368      uint32_t eax_1 = *(uint32_t*)eax;
0056836d      this->m_numBuckets = eax_1;
0056836d      
00568370      if (eax_1 > 0x17)
00568386          this->m_buckets = operator new[]((eax_1 << 2));
00568370      else
00568375          this->m_buckets = &this->m_aInplaceBuckets;
00568375      
0056838c      class HashTableData<unsigned long,Graphic *>** m_buckets = this->m_buckets;
0056838f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00568395      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
005683a6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00568320  }

005683af                                               90                                                                 .

005683b0  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>* this, uint32_t arg2)

005683b0  {
005683bb      arg2 = arg2;
005683bf      uint8_t edx = ((int8_t)arg2);
005683c3      this->m_buckets = nullptr;
005683c6      this->m_firstInterestingBucket = nullptr;
005683c9      this->m_numBuckets = 0;
005683cc      this->m_numElements = 0;
005683d0      this->vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,class HashTableData<class IDClass<struct _tagDataID,32,0>,class Graphic*>*,1>::`vftable';
005683d6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005683e9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
005683e9      
005683f3      if (eax == bucketSizesEnd_1)
005683f5          eax -= 4;
005683f5      
005683f8      uint32_t eax_1 = *(uint32_t*)eax;
005683fd      this->m_numBuckets = eax_1;
005683fd      
00568400      if (eax_1 > 0x17)
00568416          this->m_buckets = operator new[]((eax_1 << 2));
00568400      else
00568405          this->m_buckets = &this->m_aInplaceBuckets;
00568405      
0056841c      class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_buckets = this->m_buckets;
0056841f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00568425      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00568436      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
005683b0  }

0056843f                                                                                               90                                 .

00568440  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>* this, uint32_t arg2)

00568440  {
00568441      uint32_t ebp = arg2;
00568441      
0056844b      if (ebp == this->m_numBuckets)
0056844b      {
0056844e          int32_t eax;
0056844e          eax = 0;
00568451          return 0;
0056844b      }
0056844b      
00568459      int32_t* i_1 = nullptr;
00568459      
0056845d      while (this->m_numElements != 0)
0056845d      {
00568466          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0056846c          int32_t* i_2;
0056846c          int32_t* m_firstInterestingBucket_2;
0056846c          
0056846c          if (this->m_firstInterestingBucket == ecx_1)
0056846c          {
00568482          label_568482:
00568482              m_firstInterestingBucket_2 = nullptr;
00568484              i_2 = nullptr;
0056846c          }
0056846c          else
0056846c          {
00568470              while (true)
00568470              {
00568470                  class HashTableData<unsigned long,Graphic *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00568470                  
00568476                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00568476                  {
00568488                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0056848b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0056848d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0056848d                      break;
00568476                  }
00568476                  
0056847d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0056847d                  
00568480                  if (&m_firstInterestingBucket[1] == ecx_1)
00568480                      goto label_568482;
00568470              }
0056846c          }
0056846c          
0056848f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0056848f          
00568493          if (eax_4 == i_2)
005684a5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00568493          else
00568493          {
0056849c              void* edx_1;
0056849c              
0056849c              do
0056849c              {
00568495                  edx_1 = eax_4;
00568497                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0056849c              } while (eax_4 != i_2);
0056849c              
005684a0              if (edx_1 != 0)
005684ac                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
005684a0              else
005684a5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00568493          }
00568493          
005684af          this->m_numElements -= 1;
005684b2          i_2[1] = i_1;
005684ba          i_1 = i_2;
0056845d      }
0056845d      
005684be      class HashTableData<unsigned long,Graphic *>** m_buckets = this->m_buckets;
005684be      
005684c6      if (m_buckets != &this->m_aInplaceBuckets)
005684c9          operator delete[](m_buckets);
005684c9      
005684d6      this->m_buckets = nullptr;
005684d9      this->m_firstInterestingBucket = nullptr;
005684dc      this->m_numBuckets = 0;
005684df      this->m_numElements = 0;
005684e2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
005684e9      void* eax_7;
005684e9      
005684e9      if (i_1 != 0)
005684e9      {
0056856b          int32_t* i;
0056856b          
0056856b          do
0056856b          {
005684f0              uint32_t m_numBuckets = this->m_numBuckets;
005684f6              i = i_1[1];
005684f6              
005684ff              if ((m_numBuckets * 2) < (this->m_numElements + 1))
005684ff              {
00568501                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00568508                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0056850e                  arg2 = m_numBuckets;
0056851e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0056851e                  
00568528                  if (eax_8 != bucketSizesEnd_1)
00568531                      eax_8 = &eax_8[1];
00568528                  else
00568528                  {
0056852a                      eax_8 -= 4;
0056852a                      
0056852f                      if (eax_8 != bucketSizesEnd_1)
00568531                          eax_8 = &eax_8[1];
00568528                  }
00568528                  
00568539                  IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
005684ff              }
005684ff              
00568542              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
00568545              class HashTableData<unsigned long,Graphic *>** m_buckets_1 = this->m_buckets;
0056854b              i_1[1] = m_buckets_1[temp1_1];
0056854e              m_buckets_1[temp1_1] = i_1;
00568554              eax_7 = &m_buckets_1[temp1_1];
00568554              
00568559              if (eax_7 < this->m_firstInterestingBucket)
0056855b                  this->m_firstInterestingBucket = eax_7;
0056855b              
00568566              this->m_numElements += 1;
00568569              i_1 = i;
0056856b          } while (i != 0);
005684e9      }
005684e9      
00568570      eax_7 = 1;
00568573      return 1;
00568440  }

00568576                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00568580  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::resize_internal(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>* this, uint32_t arg2)

00568580  {
00568581      uint32_t ebp = arg2;
00568581      
0056858b      if (ebp == this->m_numBuckets)
0056858b      {
0056858e          int32_t eax;
0056858e          eax = 0;
00568591          return 0;
0056858b      }
0056858b      
00568599      int32_t* i_1 = nullptr;
00568599      
0056859d      while (this->m_numElements != 0)
0056859d      {
005685a6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
005685ac          int32_t* i_2;
005685ac          int32_t* m_firstInterestingBucket_2;
005685ac          
005685ac          if (this->m_firstInterestingBucket == ecx_1)
005685ac          {
005685c2          label_5685c2:
005685c2              m_firstInterestingBucket_2 = nullptr;
005685c4              i_2 = nullptr;
005685ac          }
005685ac          else
005685ac          {
005685b0              while (true)
005685b0              {
005685b0                  class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
005685b0                  
005685b6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
005685b6                  {
005685c8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
005685cb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
005685cd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
005685cd                      break;
005685b6                  }
005685b6                  
005685bd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
005685bd                  
005685c0                  if (&m_firstInterestingBucket[1] == ecx_1)
005685c0                      goto label_5685c2;
005685b0              }
005685ac          }
005685ac          
005685cf          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
005685cf          
005685d3          if (eax_4 == i_2)
005685e5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
005685d3          else
005685d3          {
005685dc              void* edx_1;
005685dc              
005685dc              do
005685dc              {
005685d5                  edx_1 = eax_4;
005685d7                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
005685dc              } while (eax_4 != i_2);
005685dc              
005685e0              if (edx_1 != 0)
005685ec                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
005685e0              else
005685e5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
005685d3          }
005685d3          
005685ef          this->m_numElements -= 1;
005685f2          i_2[1] = i_1;
005685fa          i_1 = i_2;
0056859d      }
0056859d      
005685fe      class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_buckets = this->m_buckets;
005685fe      
00568606      if (m_buckets != &this->m_aInplaceBuckets)
00568609          operator delete[](m_buckets);
00568609      
00568616      this->m_buckets = nullptr;
00568619      this->m_firstInterestingBucket = nullptr;
0056861c      this->m_numBuckets = 0;
0056861f      this->m_numElements = 0;
00568622      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00568629      void* eax_7;
00568629      
00568629      if (i_1 != 0)
00568629      {
005686ab          int32_t* i;
005686ab          
005686ab          do
005686ab          {
00568630              uint32_t m_numBuckets = this->m_numBuckets;
00568636              i = i_1[1];
00568636              
0056863f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0056863f              {
00568641                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00568648                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0056864e                  arg2 = m_numBuckets;
0056865e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0056865e                  
00568668                  if (eax_8 != bucketSizesEnd_1)
00568671                      eax_8 = &eax_8[1];
00568668                  else
00568668                  {
0056866a                      eax_8 -= 4;
0056866a                      
0056866f                      if (eax_8 != bucketSizesEnd_1)
00568671                          eax_8 = &eax_8[1];
00568668                  }
00568668                  
00568679                  IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
0056863f              }
0056863f              
00568682              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
00568685              class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_buckets_1 = this->m_buckets;
0056868b              i_1[1] = m_buckets_1[temp1_1];
0056868e              m_buckets_1[temp1_1] = i_1;
00568694              eax_7 = &m_buckets_1[temp1_1];
00568694              
00568699              if (eax_7 < this->m_firstInterestingBucket)
0056869b                  this->m_firstInterestingBucket = eax_7;
0056869b              
005686a6              this->m_numElements += 1;
005686a9              i_1 = i;
005686ab          } while (i != 0);
00568629      }
00568629      
005686b0      eax_7 = 1;
005686b3      return 1;
00568580  }

005686b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005686c0  uint8_t __thiscall ClientMagicSystem::NotifyOfEnchantmentRemoval(class ClientMagicSystem* this, uint32_t arg2)

005686c0  {
005686d5      int32_t* var_98;
005686d5      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_98, &data_7928af);
005686e3      int32_t eax = gmCCommunicationSystem::IsSquelched(0, &var_98, 7);
005686f0      int32_t* eax_1 = var_98;
005686f0      
00568705      if ((InterlockedDecrement(&eax_1[1]) == 0 && eax_1 != 0))
0056870d          **(uint32_t**)eax_1(1);
0056870d      
00568711      if (eax == 0)
00568711      {
0056871e          uint32_t edi_2 = ((uint32_t)arg2);
0056871e          
0056872a          if (edi_2 < 0x8000)
0056872a          {
00568734              void var_90;
00568734              CSpellBase::CSpellBase(&var_90);
00568739              class ClientMagicSystem* ClientMagicSystem::s_pMagicSystem_1 = ClientMagicSystem::s_pMagicSystem;
0056873f              class CSpellTable* spellTable = ClientMagicSystem::s_pMagicSystem_1->spellTable;
0056873f              
00568747              if (spellTable == 0)
00568747              {
00568749                  int32_t var_ac_1 = 0x10000005;
0056874e                  int32_t var_b0_1 = 2;
00568750                  int32_t var_b4_1 = 6;
00568742                  ClientMagicSystem::s_pMagicSystem_1->spellTable = DBObj::GetByEnum(spellTable, 0, 0);
00568747              }
00568747              
0056876d              if (CSpellTable::InqSpellBase(ClientMagicSystem::s_pMagicSystem_1->spellTable, edi_2, &var_90) == 0)
0056876d              {
00568773                  CSpellBase::~CSpellBase(&var_90);
0056877b                  int32_t eax_6;
0056877b                  eax_6 = 0;
00568784                  return 0;
0056876d              }
0056876d              
00568790              class AC1Legacy::PStringBase<char> __return;
00568790              CSpellBase::InqName(&var_90, &__return);
00568790              
0056879b              if (edi_2 == 0x29a)
0056879b              {
005687a6                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_98, " penalty");
005687b4                  AC1Legacy::PStringBase<char>::operator+=(&__return, &var_98);
005687bd                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_98);
0056879b              }
0056879b              
005687cb              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_98, " has expired.\n");
005687d0              int32_t* esi_3 = var_98;
005687d4              int32_t eax_7 = esi_3[2];
005687d4              
005687e2              if ((eax_7 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005687ee                  AC1Legacy::PStringBase<char>::append_n_chars(&__return, &esi_3[5], (eax_7 - 1));
005687ee              
005687fb              if (InterlockedDecrement(&esi_3[1]) == 0)
00568803                  **(uint32_t**)esi_3(1);
00568803              
00568815              ClientSystem::AddTextToScroll(this, (__return + 0x14), 7, 1, 0);
0056881a              class AC1Legacy::PStringBase<char> __return_1 = __return;
0056881a              
0056882c              if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
00568834                  **(uint32_t**)__return_1(1);
00568834              
0056883a              CSpellBase::~CSpellBase(&var_90);
0056872a          }
00568711      }
00568711      
00568842      int32_t eax_3;
00568842      eax_3 = 1;
0056884b      return 1;
005686c0  }

0056884e                                            90 90                                                                ..

00568850  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::add(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>* this, class HashTableData<unsigned long,Graphic *>* arg2)

00568850  {
00568858      uint32_t m_hashKey = arg2->m_hashKey;
0056885b      uint32_t m_numBuckets = this->m_numBuckets;
0056885b      
0056886e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0056886e      {
00568872          if (*(uint32_t*)i == m_hashKey)
00568872          {
005688be              if (i == 0)
005688be                  break;
005688be              
005688c2              i = 0;
005688c5              return 0;
00568872          }
0056886e      }
0056886e      
00568884      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00568888          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::grow(this);
00568888      
00568891      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
00568894      class HashTableData<unsigned long,Graphic *>** m_buckets = this->m_buckets;
0056889a      arg2->m_hashNext = m_buckets[temp1_1];
0056889d      m_buckets[temp1_1] = arg2;
005688a3      class HashTableData<unsigned long,Graphic *>** eax_4 = &m_buckets[temp1_1];
005688a3      
005688a8      if (eax_4 < this->m_firstInterestingBucket)
005688aa          this->m_firstInterestingBucket = eax_4;
005688aa      
005688b2      this->m_numElements += 1;
005688b6      uint32_t eax_6;
005688b6      eax_6 = 1;
005688b9      return 1;
00568850  }

005688c8                          90 90 90 90 90 90 90 90                                                          ........

005688d0  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::add(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>* this, class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>* arg2)

005688d0  {
005688d8      uint32_t id = arg2->m_hashKey.id;
005688db      uint32_t m_numBuckets = this->m_numBuckets;
005688db      
005688ee      for (int32_t* i = this->m_buckets[(COMBINE(0, id) % m_numBuckets)]; i != 0; i = i[1])
005688ee      {
005688f2          if (*(uint32_t*)i == id)
005688f2          {
0056893e              if (i == 0)
0056893e                  break;
0056893e              
00568942              i = 0;
00568945              return 0;
005688f2          }
005688ee      }
005688ee      
00568904      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00568908          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::grow(this);
00568908      
00568911      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.id) % this->m_numBuckets);
00568914      class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_buckets = this->m_buckets;
0056891a      arg2->m_hashNext = m_buckets[temp1_1];
0056891d      m_buckets[temp1_1] = arg2;
00568923      class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** eax_4 = &m_buckets[temp1_1];
00568923      
00568928      if (eax_4 < this->m_firstInterestingBucket)
0056892a          this->m_firstInterestingBucket = eax_4;
0056892a      
00568932      this->m_numElements += 1;
00568936      uint32_t eax_6;
00568936      eax_6 = 1;
00568939      return 1;
005688d0  }

00568948                          90 90 90 90 90 90 90 90                                                          ........

00568950  uint32_t __fastcall ClientMagicSystem::Handle_Magic__RemoveEnchantment(class ClientMagicSystem* this, uint32_t arg2, uint8_t arg3)

00568950  {
00568953      int32_t ebx;
00568953      int32_t var_68 = ebx;
00568954      int32_t ebp;
00568954      int32_t var_6c = ebp;
00568955      int32_t esi;
00568955      int32_t var_70 = esi;
00568956      struct Turbine_GUID* edi;
00568956      struct Turbine_GUID* var_74 = edi;
0056895b      struct Turbine_GUID* var_64;
0056895b      int32_t* var_78 = &var_64;
00568962      struct Turbine_GUID* var_7c = &PlayerDesc_ClassType;
0056896a      var_64 = nullptr;
00568975      class TResult __return;
00568975      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_7c, var_78);
0056897a      struct Turbine_GUID* ecx_1 = var_64;
00568983      var_7c = ecx_1;
00568985      int32_t var_78_1 = 0;
00568988      struct Turbine_GUID* eax_1 = var_7c;
0056898e      int32_t var_58 = 0;
00568992      int32_t var_54 = 0;
00568992      
00568996      if (eax_1 != 0)
0056899c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0056899c      
005689a8      void var_5c;
005689a8      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_58, &var_5c);
005689a8      struct Turbine_GUID** esp = &var_7c;
005689a8      
005689af      if (ecx_1 != 0)
005689b5          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
005689b5      
005689b8      class TResult __return_1 = __return;
005689be      uint32_t var_4;
005689be      uint32_t edi_1 = var_4;
005689be      
005689c2      if (__return_1 != 0)
005689c2      {
005689c8          var_4 = 0;
005689cc          Enchantment::Enchantment(&var_58);
005689cc          
005689e5          if ((CACQualities::InqVitae(__return_1, &var_58) != 0 && var_54 == edi_1))
005689e7              var_4 = 1;
005689e7          
005689ef          CACQualities::RemoveEnchantment(__return_1, edi_1);
005689ef          esp = &var_7c;
005689ef          
005689f8          if (var_4 == 0)
00568a01              CM_Magic::SendNotice_EnchantmentsChanged();
005689f8          else
005689fa              CM_Magic::SendNotice_VitaeChanged();
005689c2      }
005689c2      
00568a0a      if (__return_addr != 0)
00568a0a      {
00568a0f          ClientMagicSystem::NotifyOfEnchantmentRemoval(this, edi_1);
00568a0f          esp = &var_7c;
00568a0a      }
00568a0a      
00568a16      if (__return_1 != 0)
00568a16      {
00568a1c          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00568a1c          esp = &var_74;
00568a16      }
00568a16      
00568a1f      *(uint32_t*)esp;
00568a1f      esp[1];
00568a1f      esp[2];
00568a1f      esp[3];
00568a28      return 0;
00568950  }

00568a2b                                   90 90 90 90 90                                                             .....

00568a30  uint32_t ClientMagicSystem::Handle_Magic__RemoveMultipleEnchantments(class ClientMagicSystem* this @ ecx, class PackableList<unsigned long>* arg2, uint8_t arg3)

00568a30  {
00568a34      int32_t ebp;
00568a34      int32_t var_70 = ebp;
00568a35      int32_t esi;
00568a35      int32_t var_74 = esi;
00568a36      struct Turbine_GUID* edi;
00568a36      struct Turbine_GUID* var_78 = edi;
00568a3b      struct Turbine_GUID* var_68;
00568a3b      int32_t* var_7c = &var_68;
00568a3c      class ClientMagicSystem* this_1 = this;
00568a44      struct Turbine_GUID* var_80 = &PlayerDesc_ClassType;
00568a4c      int32_t ebp_1 = 0;
00568a4e      var_68 = nullptr;
00568a59      class TResult __return;
00568a59      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_80, var_7c);
00568a5e      struct Turbine_GUID* ecx_1 = var_68;
00568a67      var_80 = ecx_1;
00568a69      int32_t var_7c_1 = 0;
00568a6c      struct Turbine_GUID* eax_1 = var_80;
00568a72      int32_t var_58 = 0;
00568a76      int32_t var_54 = 0;
00568a76      
00568a7a      if (eax_1 != 0)
00568a80          *(uint32_t*)(eax_1->m_data1 + 0x10)();
00568a80      
00568a8c      void var_5c;
00568a8c      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_58, &var_5c);
00568a8c      struct Turbine_GUID** esp = &var_80;
00568a8c      
00568a93      if (ecx_1 != 0)
00568a99          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00568a99      
00568a9c      class TResult __return_1 = __return;
00568aa2      class PackableList<unsigned long>* head_1;
00568aa2      class PackableList<unsigned long>* head = head_1;
00568aa2      
00568aa6      if (__return_1 != 0)
00568aa6      {
00568aac          Enchantment::Enchantment(&var_58);
00568aac          
00568abf          if (CACQualities::InqVitae(__return_1, &var_58) != 0)
00568ac1              ebp_1 = var_54;
00568ac1          
00568ac8          CACQualities::RemoveEnchantments(__return_1, head);
00568ac8          esp = &var_80;
00568acd          CM_Magic::SendNotice_EnchantmentsChanged();
00568aa6      }
00568aa6      
00568ad2      while (true)
00568ad2      {
00568ad2          head = head->head;
00568ad2          
00568ad7          if (head == 0)
00568ad7              break;
00568ad7          
00568ae0          if (__return_addr != 0)
00568ae0          {
00568ae9              class ClientMagicSystem* ebx;
00568ae9              ClientMagicSystem::NotifyOfEnchantmentRemoval(ebx, head->vtable);
00568ae9              esp = &var_80;
00568ae0          }
00568ae0          
00568af0          if (head->vtable == ebp_1)
00568af2              CM_Magic::SendNotice_VitaeChanged();
00568ad2      }
00568ad2      
00568afb      if (__return_1 != 0)
00568afb      {
00568b01          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
00568b01          esp = &var_78;
00568afb      }
00568afb      
00568b04      *(uint32_t*)esp;
00568b04      esp[1];
00568b04      esp[2];
00568b04      esp[3];
00568b0d      return 0;
00568a30  }


00568b10  uint32_t __thiscall ClientMagicSystem::Handle_Magic__DispelEnchantment(class ClientMagicSystem* this, uint32_t arg2)

00568b10  {
00568b14      int32_t var_4 = 0;
00568b1c      uint32_t edx;
00568b1c      return ClientMagicSystem::Handle_Magic__RemoveEnchantment(this, edx, arg2);
00568b10  }

00568b1f                                                                                               90                                 .

00568b20  uint32_t __thiscall ClientMagicSystem::Handle_Magic__DispelMultipleEnchantments(class ClientMagicSystem* this, class PackableList<unsigned long>* arg2)

00568b20  {
00568b2c      return ClientMagicSystem::Handle_Magic__RemoveMultipleEnchantments(this, arg2, 0);
00568b20  }

00568b2f                                               90                                                                 .

00568b30  uint8_t __thiscall HashTable<unsigned long,Graphic *,1>::add(class HashTable<unsigned long,Graphic *,1>* this, uint32_t const* arg2, class Graphic** arg3)

00568b30  {
00568b36      void* eax = operator new(0xc);
00568b40      void* esi;
00568b40      
00568b40      if (eax == 0)
00568b5e          esi = nullptr;
00568b40      else
00568b40      {
00568b4c          *(uint32_t*)eax = *(uint32_t*)arg2;
00568b4e          *(uint32_t*)((char*)eax + 4) = 0;
00568b57          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
00568b5a          esi = eax;
00568b40      }
00568b40      
00568b6b      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::add(&this->m_intrusiveTable, esi) != 0)
00568b85          return 1;
00568b85      
00568b6f      if (esi != 0)
00568b72          operator delete(esi);
00568b72      
00568b7e      return 0;
00568b30  }

00568b88                          90 90 90 90 90 90 90 90                                                          ........

00568b90  uint8_t __thiscall HashTable<IDClass<_tagDataID,32,0>,Graphic *,1>::add(class HashTable<IDClass<_tagDataID,32,0>,Graphic *,1>* this, class IDClass<_tagDataID,32,0>* arg2, class Graphic** arg3)

00568b90  {
00568b96      void* eax = operator new(0xc);
00568ba0      void* esi;
00568ba0      
00568ba0      if (eax == 0)
00568bbe          esi = nullptr;
00568ba0      else
00568ba0      {
00568bac          *(uint32_t*)eax = arg2->id;
00568bae          *(uint32_t*)((char*)eax + 4) = 0;
00568bb7          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
00568bba          esi = eax;
00568ba0      }
00568ba0      
00568bcb      if (IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::add(&this->m_intrusiveTable, esi) != 0)
00568be5          return 1;
00568be5      
00568bcf      if (esi != 0)
00568bd2          operator delete(esi);
00568bd2      
00568bde      return 0;
00568b90  }

00568be8                          90 90 90 90 90 90 90 90                                                          ........

00568bf0  class Graphic* __fastcall ClientMagicSystem::GetSpellIcon(class ClientMagicSystem* this, uint32_t arg2)

00568bf0  {
00568bf0      class ClientMagicSystem* var_4 = this;
00568bf4      uint32_t i = arg2;
00568c09      class ClientMagicSystem* result = nullptr;
00568c0e      int32_t* eax_3 = this->m_hashSpellIconTable.m_intrusiveTable.m_buckets[(COMBINE(0, i) % this->m_hashSpellIconTable.m_intrusiveTable.m_numBuckets)];
00568c0e      
00568c12      if (eax_3 == 0)
00568c12      {
00568c35      label_568c35:
00568c35          int32_t* eax_4 = RenderDevice::render_device->vtable->CreateLocalSurface();
00568c35          
00568c3c          if (eax_4 != 0)
00568c3c          {
00568c5b              if (*(uint32_t*)(*(uint32_t*)eax_4 + 0x58)(0x20, 0x20, RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1) != 0)
00568c5b              {
00568c5f                  class Graphic* eax_7 = operator new(0xc);
00568c5f                  
00568c69                  if (eax_7 == 0)
00568c77                      result = nullptr;
00568c69                  else
00568c73                      result = Graphic::Graphic(eax_7, eax_4);
00568c73                  
00568c86                  var_4 = result;
00568c8a                  HashTable<unsigned long,Graphic *,1>::add(&this->m_hashSpellIconTable, &arg2, &var_4);
00568c97                  ClientMagicSystem::CompositeSpellIcon(this, arg2, result);
00568c5b              }
00568c5b              
00568ca0              *(uint32_t*)(*(uint32_t*)eax_4 + 0x14)();
00568c3c          }
00568c12      }
00568c12      else
00568c12      {
00568c16          while (*(uint32_t*)eax_3 != i)
00568c16          {
00568c18              eax_3 = eax_3[1];
00568c18              
00568c1d              if (eax_3 == 0)
00568c1d                  goto label_568c35;
00568c16          }
00568c16          
00568c23          if (eax_3 == 0)
00568c23              goto label_568c35;
00568c23          
00568c25          result = eax_3[2];
00568c25          
00568c2a          if (result == 0)
00568c2a              goto label_568c35;
00568c12      }
00568c12      
00568ca9      return result;
00568bf0  }

00568cac                                      90 90 90 90                                                              ....

00568cb0  class Graphic* __fastcall ClientMagicSystem::GetSpellComponentIcon(class ClientMagicSystem* this, class IDClass<_tagDataID,32,0> arg2)

00568cb0  {
00568cb0      class ClientMagicSystem* var_4 = this;
00568cb4      class IDClass<_tagDataID,32,0> i = arg2;
00568cc9      class ClientMagicSystem* result = nullptr;
00568cce      int32_t* eax_3 = this->m_hashSpellComponentIconTable.m_intrusiveTable.m_buckets[(COMBINE(0, i) % this->m_hashSpellComponentIconTable.m_intrusiveTable.m_numBuckets)];
00568cce      
00568cd2      if (eax_3 == 0)
00568cd2      {
00568cf5      label_568cf5:
00568cf5          int32_t* eax_4 = RenderDevice::render_device->vtable->CreateLocalSurface();
00568cf5          
00568cfc          if (eax_4 != 0)
00568cfc          {
00568d1b              if (*(uint32_t*)(*(uint32_t*)eax_4 + 0x58)(0x20, 0x20, RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1) != 0)
00568d1b              {
00568d1f                  class Graphic* eax_7 = operator new(0xc);
00568d1f                  
00568d29                  if (eax_7 == 0)
00568d37                      result = nullptr;
00568d29                  else
00568d33                      result = Graphic::Graphic(eax_7, eax_4);
00568d33                  
00568d49                  var_4 = result;
00568d4d                  HashTable<IDClass<_tagDataID,32,0>,Graphic *,1>::add(&this->m_hashSpellComponentIconTable, &arg2, &var_4);
00568d5a                  ClientMagicSystem::CompositeSpellComponentIcon(this, arg2, result);
00568d1b              }
00568d1b              
00568d63              *(uint32_t*)(*(uint32_t*)eax_4 + 0x14)();
00568cfc          }
00568cd2      }
00568cd2      else
00568cd2      {
00568cd6          while (*(uint32_t*)eax_3 != i)
00568cd6          {
00568cd8              eax_3 = eax_3[1];
00568cd8              
00568cdd              if (eax_3 == 0)
00568cdd                  goto label_568cf5;
00568cd6          }
00568cd6          
00568ce3          if (eax_3 == 0)
00568ce3              goto label_568cf5;
00568ce3          
00568ce5          result = eax_3[2];
00568ce5          
00568cea          if (result == 0)
00568cea              goto label_568cf5;
00568cd2      }
00568cd2      
00568d6c      return result;
00568cb0  }

00568d6f                                               90                                                                 .

00568d70  void* __thiscall HashTable<unsigned long,Graphic *,1>::`scalar deleting destructor'(class HashTable<unsigned long,Graphic *,1>* this, uint32_t arg2)

00568d70  {
00568d79      this->vtable = 0x7ce9fc;
00568d7f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00568d84      class HashTableData<unsigned long,Graphic *>** m_buckets = this->m_intrusiveTable.m_buckets;
00568d74      this->m_intrusiveTable.vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class Graphic*>*,1>::`vftable';
00568d74      
00568d92      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00568d95          operator delete[](m_buckets);
00568d95      
00568d74      this->m_intrusiveTable.m_buckets = nullptr;
00568d74      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00568d74      this->m_intrusiveTable.m_numBuckets = 0;
00568d74      this->m_intrusiveTable.m_numElements = 0;
00568d74      
00568db0      if ((arg2 & 1) != 0)
00568db3          operator delete(this);
00568db3      
00568dbf      return this;
00568d70  }

00568dc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00568dd0  void* __thiscall HashTable<IDClass<_tagDataID,32,0>,Graphic *,1>::`scalar deleting destructor'(class HashTable<IDClass<_tagDataID,32,0>,Graphic *,1>* this, uint32_t arg2)

00568dd0  {
00568dd9      this->vtable = 0x7cea00;
00568ddf      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00568de4      class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_buckets = this->m_intrusiveTable.m_buckets;
00568dd4      this->m_intrusiveTable.vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,class HashTableData<class IDClass<struct _tagDataID,32,0>,class Graphic*>*,1>::`vftable';
00568dd4      
00568df2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00568df5          operator delete[](m_buckets);
00568df5      
00568dd4      this->m_intrusiveTable.m_buckets = nullptr;
00568dd4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00568dd4      this->m_intrusiveTable.m_numBuckets = 0;
00568dd4      this->m_intrusiveTable.m_numElements = 0;
00568dd4      
00568e10      if ((arg2 & 1) != 0)
00568e13          operator delete(this);
00568e13      
00568e1f      return this;
00568dd0  }

00568e22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00568e30  void __fastcall ClientMagicSystem::ClientMagicSystem(class ClientMagicSystem* this)

00568e30  {
00568e33      this->vtable = &gmUrgentAssistanceUI::`vftable';
00568e3a      this->vtable = 0x7cea04;
00568e40      this->vtable = &gmUrgentAssistanceUI::`vftable';
00568e47      this->m_cTurbineRefCount.m_cRef = 1;
00568e4e      this->m_cTurbineRefCount.vtable = 0x792b6c;
00568e57      this->spellTable = nullptr;
00568e5a      this->spellComponentTable = nullptr;
00568e5d      this->selectedSpell = 0;
00568e65      this->m_hashSpellIconTable.vtable = 0x7ce9fc;
00568e6c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Graphic *> *,1>(&this->m_hashSpellIconTable.m_intrusiveTable, 0x17);
00568e79      this->m_hashSpellComponentIconTable.vtable = 0x7cea00;
00568e83      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,Graphic *> *,1>(&this->m_hashSpellComponentIconTable.m_intrusiveTable, 0x17);
00568e8c      ClientMagicSystem::s_pMagicSystem = this;
00568e92      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00568e30  }

00568e9c                                                                                      90 90 90 90                              ....

00568ea0  void __fastcall ClientMagicSystem::~ClientMagicSystem(class ClientMagicSystem* this)

00568ea0  {
00568ea7      this->vtable = &gmUrgentAssistanceUI::`vftable';
00568ec0      this->vtable = 0x7cea04;
00568ec7      void __return;
00568ec7      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_1 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashSpellIconTable.m_intrusiveTable, &__return);
00568ecc      class HashTableData<unsigned long,DBOCache *>* i_2 = eax_1->m_currElement;
00568ed1      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_1->m_currHashTable;
00568ed3      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_1->m_currBucket;
00568ed6      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
00568ed6      
00568eda      if (i_2 != 0)
00568eda      {
00568ee0          while (true)
00568ee0          {
00568ee0              class DBOCache* m_data = i_2->m_data;
00568ee0              
00568ee5              if (m_data != 0)
00568ee5              {
00568ee7                  m_data->vtable->__vecDelDtor(1);
00568eed                  m_currHashTable = m_currHashTable_1;
00568ee5              }
00568ee5              
00568ef1              i_2 = i_2->m_hashNext;
00568ef1              
00568ef6              if (i_2 == 0)
00568ef6              {
00568f0c                  class HashTableData<unsigned long,DBOCache *>* i;
00568f0c                  
00568f0c                  do
00568f0c                  {
00568f01                      m_currBucket = &m_currBucket[1];
00568f01                      
00568f06                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00568f06                          goto label_568f16;
00568f06                      
00568f08                      i = *(uint32_t*)m_currBucket;
00568f0c                  } while (i == 0);
00568f0c                  
00568f0e                  i_2 = i;
00568f0e                  
00568f12                  if (i_2 == 0)
00568f12                      break;
00568ef6              }
00568ee0          }
00568eda      }
00568eda      
00568f16  label_568f16:
00568f16      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashSpellIconTable.m_intrusiveTable);
00568f2d      void* ecx_3 = &this->m_hashSpellComponentIconTable.m_intrusiveTable.m_buckets[this->m_hashSpellComponentIconTable.m_intrusiveTable.m_numBuckets];
00568f33      void** m_firstInterestingBucket_1;
00568f33      void* i_3;
00568f33      
00568f33      if (this->m_hashSpellComponentIconTable.m_intrusiveTable.m_firstInterestingBucket == ecx_3)
00568f33      {
00568f47      label_568f47:
00568f47          m_firstInterestingBucket_1 = nullptr;
00568f49          i_3 = nullptr;
00568f33      }
00568f33      else
00568f33      {
00568f35          while (true)
00568f35          {
00568f35              class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_firstInterestingBucket = this->m_hashSpellComponentIconTable.m_intrusiveTable.m_firstInterestingBucket;
00568f35              
00568f3b              if (*(uint32_t*)m_firstInterestingBucket != 0)
00568f3b              {
00568f4d                  m_firstInterestingBucket_1 = this->m_hashSpellComponentIconTable.m_intrusiveTable.m_firstInterestingBucket;
00568f50                  i_3 = *(uint32_t*)m_firstInterestingBucket_1;
00568f50                  break;
00568f3b              }
00568f3b              
00568f27              this->m_hashSpellComponentIconTable.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
00568f27              
00568f45              if (&m_firstInterestingBucket[1] == ecx_3)
00568f45                  goto label_568f47;
00568f35          }
00568f33      }
00568f33      
00568f54      void** m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00568f54      
00568f56      if (i_3 != 0)
00568f56      {
00568f58          while (true)
00568f58          {
00568f58              int32_t* ecx_4 = *(uint32_t*)((char*)i_3 + 8);
00568f58              
00568f5d              if (ecx_4 != 0)
00568f63                  **(uint32_t**)ecx_4(1);
00568f63              
00568f65              i_3 = *(uint32_t*)((char*)i_3 + 4);
00568f65              
00568f6a              if (i_3 == 0)
00568f6a              {
00568f80                  void* i_1;
00568f80                  
00568f80                  do
00568f80                  {
00568f75                      m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
00568f75                      
00568f7a                      if (m_firstInterestingBucket_2 == &this->m_hashSpellComponentIconTable.m_intrusiveTable.m_buckets[this->m_hashSpellComponentIconTable.m_intrusiveTable.m_numBuckets])
00568f7a                          goto label_568f8a;
00568f7a                      
00568f7c                      i_1 = *(uint32_t*)m_firstInterestingBucket_2;
00568f80                  } while (i_1 == 0);
00568f80                  
00568f82                  i_3 = i_1;
00568f82                  
00568f86                  if (i_3 == 0)
00568f86                      break;
00568f6a              }
00568f58          }
00568f56      }
00568f56      
00568f8a  label_568f8a:
00568f8a      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashSpellComponentIconTable.m_intrusiveTable);
00568f97      this->m_hashSpellComponentIconTable.vtable = 0x7cea00;
00568fa1      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashSpellComponentIconTable.m_intrusiveTable);
00568fa6      class HashTableData<IDClass<_tagDataID,32,0>,Graphic *>** m_buckets = this->m_hashSpellComponentIconTable.m_intrusiveTable.m_buckets;
00568f8f      this->m_hashSpellComponentIconTable.m_intrusiveTable.vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,class HashTableData<class IDClass<struct _tagDataID,32,0>,class Graphic*>*,1>::`vftable';
00568f8f      
00568fb4      if (m_buckets != &this->m_hashSpellComponentIconTable.m_intrusiveTable.m_aInplaceBuckets)
00568fb7          operator delete[](m_buckets);
00568fb7      
00568f8f      this->m_hashSpellComponentIconTable.m_intrusiveTable.m_buckets = nullptr;
00568f8f      this->m_hashSpellComponentIconTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00568f8f      this->m_hashSpellComponentIconTable.m_intrusiveTable.m_numBuckets = 0;
00568f8f      this->m_hashSpellComponentIconTable.m_intrusiveTable.m_numElements = 0;
00568fd2      this->m_hashSpellIconTable.vtable = 0x7ce9fc;
00568fd9      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashSpellIconTable.m_intrusiveTable);
00568fde      class HashTableData<unsigned long,Graphic *>** m_buckets_1 = this->m_hashSpellIconTable.m_intrusiveTable.m_buckets;
00568fcd      this->m_hashSpellIconTable.m_intrusiveTable.vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class Graphic*>*,1>::`vftable';
00568fcd      
00568fec      if (m_buckets_1 != &this->m_hashSpellIconTable.m_intrusiveTable.m_aInplaceBuckets)
00568fef          operator delete[](m_buckets_1);
00568fef      
00568fcd      this->m_hashSpellIconTable.m_intrusiveTable.m_buckets = nullptr;
00568fcd      this->m_hashSpellIconTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00568fcd      this->m_hashSpellIconTable.m_intrusiveTable.m_numBuckets = 0;
00568fcd      this->m_hashSpellIconTable.m_intrusiveTable.m_numElements = 0;
00569007      this->m_cTurbineRefCount.vtable = 0x792b6c;
00568ea7      this->vtable = &gmUrgentAssistanceUI::`vftable';
00569014      NoticeHandler::~NoticeHandler(&this->vtable);
00568ea0  }

00569021     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00569030  uint32_t __fastcall ClientMagicSystem::Release(class ClientMagicSystem const* this)

00569030  {
00569037      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00569037      
00569044      if ((result == 0 && this != 0))
00569044      {
00569048          ClientMagicSystem::~ClientMagicSystem(this);
0056904e          operator delete(this);
00569044      }
00569044      
0056905a      return result;
00569030  }

0056905b                                                                                   90 90 90 90 90                             .....

00569060  void __fastcall ClientFellowshipSystem::~ClientFellowshipSystem(class ClientFellowshipSystem* this)

00569060  {
00569065      this->vtable = 0x7cec14;
00569062      this->vtable = &gmUrgentAssistanceUI::`vftable';
00569071      this->m_cTurbineRefCount.vtable = 0x792b6c;
00569062      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056907e      /* tailcall */
0056907e      return NoticeHandler::~NoticeHandler(&this->vtable);
00569060  }

00569083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00569090  class ClientFellowshipSystem* ClientFellowshipSystem::GetFellowshipSystem()

00569090  {
00569095      return ClientFellowshipSystem::s_pFellowshipSystem;
00569090  }

00569096                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005690a0  void __fastcall ClientFellowshipSystem::OnEndCharacterSession(class ClientFellowshipSystem* this)

005690a0  {
005690a3      class CFellowship* m_pFellowship = this->m_pFellowship;
005690a3      
005690a8      if (m_pFellowship != 0)
005690aa          m_pFellowship->vtable->__vecDelDtor(1);
005690aa      
005690b0      this->m_pFellowship = nullptr;
005690a0  }

005690b9                                                                             90 90 90 90 90 90 90                           .......

005690c0  uint32_t __thiscall ClientFellowshipSystem::Handle_Fellowship__UpdateFellow(class ClientFellowshipSystem* this, uint32_t arg2, class Fellow const* arg3, uint32_t arg4)

005690c0  {
005690ce      int32_t eax = Fellowship::IsFellow(this->m_pFellowship, arg2);
005690dc      char ebx_1 = ((int8_t)-(eax));
005690e4      Fellowship::UpdateFellow(this->m_pFellowship, arg2, arg3);
005690e4      
005690eb      if ((ebx_1 - ebx_1) != 0xff)
005690eb      {
005690ee          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
005690ee          
005690f8          if (eax_1 != 0)
005690fb              CM_Character::SendNotice_ChangeRadarLook(eax_1);
005690fb          
00569104          CM_Fellowship::SendNotice_FellowAdded(arg2);
005690eb      }
005690eb      
00569113      CM_Fellowship::SendNotice_FellowUpdated(arg2, arg3, arg4);
0056911c      gmCCommunicationSystem::SetTalkFocusEnabled(3, 1);
0056912a      return 0;
005690c0  }

0056912d                                         90 90 90                                                               ...

00569130  uint8_t __thiscall ClientFellowshipSystem::IsFellow(class ClientFellowshipSystem* this, uint32_t arg2)

00569130  {
00569130      class CFellowship* m_pFellowship = this->m_pFellowship;
00569130      
00569135      if (m_pFellowship != 0)
00569135      {
00569143          int32_t eax_2;
00569143          eax_2 = Fellowship::IsFellow(m_pFellowship, arg2) != 0;
00569146          return eax_2;
00569135      }
00569135      
00569149      int32_t eax;
00569149      eax = 0;
0056914b      return 0;
00569130  }

0056914e                                            90 90                                                                ..

00569150  uint8_t __thiscall ClientFellowshipSystem::IsFellowshipLeader(class ClientFellowshipSystem* this, uint32_t arg2)

00569150  {
00569150      class CFellowship* m_pFellowship = this->m_pFellowship;
00569150      
00569155      if (m_pFellowship != 0)
00569155      {
0056915e          uint32_t eax;
0056915e          eax = m_pFellowship->_leader == arg2;
00569161          return eax;
00569155      }
00569155      
00569164      m_pFellowship = 0;
00569166      return 0;
00569150  }

00569169                             90 90 90 90 90 90 90                                                           .......

00569170  class TResult* __thiscall ClientFellowshipSystem::QueryInterface(class ClientFellowshipSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00569170  {
00569183      int32_t* key;
00569183      
00569183      if ((1 & (*(uint8_t*)$S127)) != 0)
005691d1          key = Offsets[0].key;
00569183      else
00569183      {
0056918d          key = &ClientFellowshipSystem_InterfaceType;
00569192          $S127 |= 1;
00569198          Offsets[0].key = 0x7ceac0;
0056919d          Offsets[0].ofs = 0;
005691a3          Offsets[1].key = 0x7ceab0;
005691ad          Offsets[1].ofs = 0;
005691b3          Offsets[2].key = 0x7cec00;
005691bd          Offsets[2].ofs = 0;
005691c3          Offsets[3].key = 0;
005691c9          Offsets[3].ofs = 0;
00569183      }
00569183      
005691d8      void* edx_3 = &Offsets;
005691d8      
005691dd      while (key != 0)
005691dd      {
005691ff          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
005691ff          {
00569222              if (arg4 != 0)
00569222              {
00569224                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0056922e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
00569231                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
00569222              }
00569222              
0056923a              __return->m_val = 0;
0056923d              return __return;
005691ff          }
005691ff          
00569201          key = *(uint32_t*)((char*)edx_3 + 8);
00569204          edx_3 += 8;
005691dd      }
005691dd      
00569212      __return->m_val = 0x80004002;
00569219      return __return;
00569170  }


00569240  uint32_t __fastcall ClientFellowshipSystem::Release(class ClientFellowshipSystem const* this)

00569240  {
00569247      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00569247      
00569254      if ((result == 0 && this != 0))
00569254      {
00569258          ClientFellowshipSystem::~ClientFellowshipSystem(this);
0056925e          operator delete(this);
00569254      }
00569254      
0056926a      return result;
00569240  }

0056926b                                   90 90 90 90 90                                                             .....

00569270  void __fastcall ClientFellowshipSystem::ClientFellowshipSystem(class ClientFellowshipSystem* this)

00569270  {
00569273      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056927a      this->vtable = 0x7cec14;
00569280      this->vtable = &gmUrgentAssistanceUI::`vftable';
00569287      this->m_cTurbineRefCount.m_cRef = 1;
0056928e      this->m_cTurbineRefCount.vtable = 0x792b6c;
00569298      this->m_pFellowship = nullptr;
005692a0      ClientFellowshipSystem::s_pFellowshipSystem = this;
005692a6      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00569270  }


005692b0  uint32_t __thiscall PackableHashTable<unsigned long,long>::Pack(class PackableHashTable<unsigned long,long>* this, void** arg2, uint32_t arg3)

005692b0  {
005692b0      class PackableHashTable<unsigned long,long>* this_1 = this;
005692b5      uint32_t result = PackableHashTable<IDClass<_tagDataID,32,0>,int>::pack_size(this);
005692c0      uint32_t result_1 = result;
005692c0      
005692c4      if (arg3 >= result)
005692c4      {
005692d9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005692dd          void* esi_3 = (*(uint32_t*)arg2 + 4);
005692e0          *(uint32_t*)arg2 = esi_3;
005692e5          int32_t i = 0;
005692e5          
005692e9          if (this->_table_size > 0)
005692e9          {
0056932f              do
0056932f              {
005692f3                  int32_t* j = this->_buckets[i];
005692f3                  
005692f8                  if (j != 0)
005692f8                  {
00569323                      do
00569323                      {
00569303                          if (arg3 >= 4)
00569303                          {
00569307                              *(uint32_t*)esi_3 = *(uint32_t*)j;
0056930b                              void* esi_5 = (*(uint32_t*)arg2 + 4);
0056930e                              *(uint32_t*)arg2 = esi_5;
00569313                              *(uint32_t*)esi_5 = j[1];
00569317                              void* eax_3 = (*(uint32_t*)arg2 + 4);
0056931a                              *(uint32_t*)arg2 = eax_3;
0056931c                              esi_3 = eax_3;
00569303                          }
00569303                          
0056931e                          j = j[2];
00569323                      } while (j != 0);
00569323                      
00569325                      result = result_1;
005692f8                  }
005692f8                  
0056932c                  i += 1;
0056932f              } while (i < this->_table_size);
005692e9          }
005692c4      }
005692c4      
00569336      return result;
005692b0  }

005692ed                                         8d 49 00                                                               .I.
00569339                                                                             90 90 90 90 90 90 90                           .......

00569340  uint32_t __fastcall PackableHashTable<IDClass<_tagDataID,32,0>,int>::pack_size(class PackableHashTable<IDClass<_tagDataID,32,0>,int>* this)

00569340  {
00569340      uint32_t _table_size = this->_table_size;
00569345      int32_t result = 4;
00569345      
0056934a      if (_table_size > 0)
0056934a      {
0056934d          class PackableHashData<IDClass<_tagDataID,32,0>,int>** _buckets = this->_buckets;
00569364          uint32_t i;
00569364          
00569364          do
00569364          {
00569350              class PackableHashData<IDClass<_tagDataID,32,0>,int>* _next = *(uint32_t*)_buckets;
00569350              
00569354              while (_next != 0)
00569354              {
00569356                  _next = _next->_next;
00569359                  result += 8;
00569354              }
00569354              
00569360              _buckets = &_buckets[1];
00569363              i = _table_size;
00569363              _table_size -= 1;
00569364          } while (i != 1);
0056934a      }
0056934a      
00569367      return result;
00569340  }

00569368                          90 90 90 90 90 90 90 90                                                          ........

00569370  void* __thiscall PackableHashTable<unsigned long,long>::`scalar deleting destructor'(class PackableHashTable<unsigned long,long>* this, uint32_t arg2)

00569370  {
00569373      this->vtable = 0x7cec44;
00569379      PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(this);
0056937e      class PackableHashData<unsigned long,long>** _buckets = this->_buckets;
0056937e      
00569383      if (_buckets != 0)
00569383      {
00569386          operator delete[](_buckets);
0056938e          this->_buckets = nullptr;
00569383      }
00569383      
0056939a      this->_table_size = 0;
005693a1      this->vtable = 0x79285c;
005693a1      
005693a7      if ((arg2 & 1) != 0)
005693aa          operator delete(this);
005693aa      
005693b5      return this;
00569370  }

005693b8                                                                          90 90 90 90 90 90 90 90                          ........

005693c0  uint32_t __thiscall ClientFellowshipSystem::Handle_Fellowship__FullUpdate(class ClientFellowshipSystem* this, class CFellowship const* arg2)

005693c0  {
005693ce      uint8_t var_11 = 0;
005693ce      
005693d3      if (this->m_pFellowship == 0)
005693d3      {
005693d7          var_11 = 1;
005693dc          void* eax_1 = operator new(0x44);
005693e6          class CFellowship* eax_2;
005693e6          
005693e6          if (eax_1 == 0)
005693f1              eax_2 = nullptr;
005693e6          else
005693ea              eax_2 = CFellowship::CFellowship(eax_1);
005693ea          
005693f3          this->m_pFellowship = eax_2;
005693d3      }
005693d3      
005693f6      class CFellowship* m_pFellowship = this->m_pFellowship;
005693fd      uint32_t _leader = m_pFellowship->_leader;
00569400      uint32_t _leader_1 = arg2->_leader;
00569403      uint32_t _leader_3 = 0;
00569405      uint32_t _leader_2 = 0;
00569405      
00569409      if (_leader != _leader_1)
00569409      {
0056940b          _leader_3 = _leader;
0056940d          _leader_2 = _leader_1;
00569409      }
00569409      
00569410      Fellowship::operator=(m_pFellowship, arg2);
00569419      CM_Fellowship::SendNotice_FellowshipUpdate(this->m_pFellowship);
00569419      
00569427      if (var_11 != 0)
00569427      {
00569434          void __return;
00569434          PackableHashTable<unsigned long,Fellow>::begin(&this->m_pFellowship->_fellowship_table, &__return);
0056943f          int32_t* i_1;
0056943f          int32_t* i_2;
0056943f          
0056943f          for (int32_t* i = i_1; i != 0; i = i_2)
0056943f          {
00569453              class ACCWeenieObject* eax_6 = ClientObjMaintSystem::GetWeenieObject(*(uint32_t*)i);
00569453              
0056945d              if (eax_6 != 0)
00569460                  CM_Character::SendNotice_ChangeRadarLook(eax_6);
00569460              
00569468              i_2 = i[0xd];
00569468              
0056946d              if (i_2 == 0)
0056946d              {
00569472                  int32_t eax_8 = (i[0xe] + 1);
00569475                  int32_t var_4;
00569475                  
00569475                  if (eax_8 >= var_4)
00569475                  {
00569482                  label_569482:
00569482                      i_2 = nullptr;
00569475                  }
00569475                  else
00569475                  {
0056947b                      int32_t var_8;
0056947b                      
0056947b                      while (*(uint32_t*)(var_8 + (eax_8 << 2)) == 0)
0056947b                      {
0056947d                          eax_8 += 1;
0056947d                          
00569480                          if (eax_8 >= var_4)
00569480                              goto label_569482;
0056947b                      }
0056947b                      
0056948c                      i_2 = *(uint32_t*)(var_8 + (eax_8 << 2));
00569475                  }
0056946d              }
0056943f          }
00569427      }
00569427      else if (_leader_3 != _leader_2)
00569493      {
00569496          class ACCWeenieObject* eax_9 = ClientObjMaintSystem::GetWeenieObject(_leader_3);
00569496          
005694a0          if (eax_9 != 0)
005694a3              CM_Character::SendNotice_ChangeRadarLook(eax_9);
005694a3          
005694ac          class ACCWeenieObject* eax_10 = ClientObjMaintSystem::GetWeenieObject(_leader_2);
005694ac          
005694b6          if (eax_10 != 0)
005694b9              CM_Character::SendNotice_ChangeRadarLook(eax_10);
005694b9          
005694c3          CM_Fellowship::SendNotice_FellowshipLeaderChanged(_leader_2, _leader_3);
00569493      }
00569493      
005694cf      gmCCommunicationSystem::SetTalkFocusEnabled(3, 1);
005694e0      return 0;
005693c0  }

005694e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005694f0  void __fastcall ClientFellowshipSystem::SelectNextFellow(class ClientFellowshipSystem* this)

005694f0  {
005694f6      class CFellowship* m_pFellowship_1 = this->m_pFellowship;
005694f6      
005694fb      if (m_pFellowship_1 != 0)
005694fb      {
00569511          int32_t eax_2;
00569511          eax_2 = Fellowship::IsFellow(m_pFellowship_1, ACCWeenieObject::selectedID) != 0;
00569516          void __return;
00569516          
00569516          if (eax_2 != 0)
00569516          {
00569523              int32_t edi_1 = 0;
00569525              PackableHashTable<unsigned long,Fellow>::begin(&this->m_pFellowship->_fellowship_table, &__return);
0056952a              int32_t* i_1;
0056952a              int32_t* i = i_1;
0056952a              
00569530              while (i != 0)
00569530              {
00569542                  if (edi_1 == ACCWeenieObject::selectedID)
00569542                  {
005695aa                      ACCWeenieObject::SetSelectedObject(*(uint32_t*)i, 0);
005695b9                      return;
00569542                  }
00569542                  
00569544                  int32_t* i_2 = i[0xd];
00569549                  edi_1 = *(uint32_t*)i;
00569549                  
0056954b                  if (i_2 == 0)
0056954b                  {
00569554                      int32_t eax_4 = (i[0xe] + 1);
00569557                      int32_t var_4;
00569557                      
00569557                      if (eax_4 >= var_4)
00569557                      {
0056956b                      label_56956b:
0056956b                          i = nullptr;
00569557                      }
00569557                      else
00569557                      {
00569564                          int32_t var_8;
00569564                          
00569564                          while (*(uint32_t*)(var_8 + (eax_4 << 2)) == 0)
00569564                          {
00569566                              eax_4 += 1;
00569566                              
00569569                              if (eax_4 >= var_4)
00569569                                  goto label_56956b;
00569564                          }
00569564                          
005695a0                          i = *(uint32_t*)(var_8 + (eax_4 << 2));
00569557                      }
0056954b                  }
0056954b                  else
0056954d                      i = i_2;
00569530              }
00569516          }
00569516          
00569571          class CFellowship* m_pFellowship = this->m_pFellowship;
00569571          
00569579          if (m_pFellowship->_fellowship_table._currNum != 0)
00569590              ACCWeenieObject::SetSelectedObject(PackableHashTable<unsigned long,Fellow>::begin(&m_pFellowship->_fellowship_table, &__return)->_current->_key, 0);
005694fb      }
005694f0  }

005695ba                                                                                90 90 90 90 90 90                            ......

005695c0  void __fastcall ClientFellowshipSystem::SelectPreviousFellow(class ClientFellowshipSystem* this)

005695c0  {
005695c3      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
005695cc      class CFellowship* m_pFellowship = this->m_pFellowship;
005695cc      
005695d5      if (m_pFellowship != 0)
005695d5      {
005695e5          void __return;
005695e5          PackableHashTable<unsigned long,Fellow>::begin(&m_pFellowship->_fellowship_table, &__return);
005695ea          int32_t* i_1;
005695ea          int32_t* i = i_1;
005695ee          uint32_t ebx_1 = 0;
005695f2          int32_t* i_2;
005695f2          
005695f2          for (; i != 0; i = i_2)
005695f2          {
00569602              if (ebx_1 != 0)
00569602              {
00569608                  class CFellowship* m_pFellowship_1 = this->m_pFellowship;
00569608                  
0056960d                  if (m_pFellowship_1 != 0)
0056960d                  {
0056961b                      int32_t eax_1;
0056961b                      eax_1 = Fellowship::IsFellow(m_pFellowship_1, ACCWeenieObject::selectedID_1) != 0;
0056961b                      
00569628                      if ((eax_1 != 0 && *(uint32_t*)i == ACCWeenieObject::selectedID_1))
00569628                          break;
0056960d                  }
00569602              }
00569602              
0056962a              i_2 = i[0xd];
0056962f              ebx_1 = *(uint32_t*)i;
0056962f              
00569631              if (i_2 == 0)
00569631              {
00569636                  int32_t eax_3 = (i[0xe] + 1);
00569639                  int32_t var_4;
00569639                  
00569639                  if (eax_3 >= var_4)
00569639                  {
0056964b                  label_56964b:
0056964b                      i_2 = nullptr;
00569639                  }
00569639                  else
00569639                  {
00569644                      int32_t var_8;
00569644                      
00569644                      while (*(uint32_t*)(var_8 + (eax_3 << 2)) == 0)
00569644                      {
00569646                          eax_3 += 1;
00569646                          
00569649                          if (eax_3 >= var_4)
00569649                              goto label_56964b;
00569644                      }
00569644                      
00569666                      i_2 = *(uint32_t*)(var_8 + (eax_3 << 2));
00569639                  }
00569631              }
005695f2          }
005695f2          
00569658          ACCWeenieObject::SetSelectedObject(ebx_1, 0);
005695d5      }
005695c0  }

0056963d                                                                                         8d 49 00                               .I.
0056966b                                   90 90 90 90 90                                                             .....

00569670  int32_t __thiscall PackableHashTable<unsigned long,long>::UnPack(class PackableHashTable<unsigned long,long>* this, void** arg2, uint32_t arg3)

00569670  {
0056967e      if (arg3 < 4)
00569687          return 0;
00569687      
0056968c      void** edi = arg2;
00569690      void* eax_1 = *(uint32_t*)edi;
00569698      uint32_t var_4 = arg3;
0056969c      PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(this);
005696a1      class PackableHashData<unsigned long,long>** _buckets = this->_buckets;
005696a1      
005696a8      if (_buckets != 0)
005696a8      {
005696ab          operator delete[](_buckets);
005696b3          this->_buckets = nullptr;
005696a8      }
005696a8      
005696b6      this->_table_size = 0;
005696b9      void* ecx_1 = *(uint32_t*)edi;
005696bb      int32_t eax_2 = *(uint32_t*)ecx_1;
005696c0      *(uint32_t*)edi = ((char*)ecx_1 + 4);
005696c4      uint32_t ecx_4 = (eax_2 >> 0x10);
005696c7      int32_t eax_3 = (eax_2 & 0xffff);
005696cc      int32_t ebp_1 = (arg3 - 4);
005696d1      this->_table_size = ecx_4;
005696d1      
005696d6      if (ecx_4 == 0)
005696d6      {
005696df          int32_t result;
005696df          result = eax_3 == 0;
005696e6          return result;
005696d6      }
005696d6      
00569703      if ((ecx_4 <= 0x10000 && eax_3 <= 0x10000))
00569703      {
00569707          int32_t eax_5 = PackableHashTable<unsigned long,CContractTracker>::Init(this);
00569707          
0056970e          if (eax_5 != 0)
0056970e          {
00569712              arg3 = 0;
00569712              
0056971a              if (eax_3 <= 0)
0056977e                  return ((eax_5 - eax_5) + 1);
0056977e              
00569723              while (true)
00569723              {
00569723                  if (ebp_1 < 4)
005696fa                      return 0;
005696fa                  
00569725                  int32_t* eax_6 = *(uint32_t*)edi;
00569727                  class IDClass<_tagDataID,32,0> ecx_6 = *(uint32_t*)eax_6;
0056972c                  *(uint32_t*)edi = &eax_6[1];
0056972e                  void** edx_1 = eax_6[1];
00569733                  *(uint32_t*)edi = &eax_6[2];
00569735                  class IDClass<_tagDataID,32,0> var_c = ecx_6;
00569745                  arg2 = edx_1;
00569745                  
00569757                  if ((PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(this, &var_c, &arg2) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
005696fa                      return 0;
005696fa                  
0056975d                  eax_5 = (arg3 + 1);
00569760                  arg3 = eax_5;
00569760                  
00569764                  if (eax_5 >= eax_3)
0056977e                      return ((eax_5 - eax_5) + 1);
00569723              }
0056970e          }
00569703      }
00569703      
005696fa      return 0;
00569670  }

00569781     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00569790  int32_t __thiscall PackableHashTable<unsigned long,Fellow>::add(class PackableHashTable<unsigned long,Fellow>* this, uint32_t const* arg2, class Fellow const* arg3)

00569790  {
0056979a      uint32_t _table_size_1 = this->_table_size;
0056979a      
0056979f      if (_table_size_1 == 0)
0056979f      {
005697ce      label_5697ce:
005697ce          void* eax_4 = operator new(0x3c);
005697ce          
005697da          if (eax_4 != 0)
005697da          {
005697e3              uint32_t _table_size = this->_table_size;
005697ea              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
005697ec              Fellow::Fellow(((char*)eax_4 + 4), arg3);
005697f1              *(uint32_t*)((char*)eax_4 + 0x34) = 0;
005697fd              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
005697ff              *(uint32_t*)((char*)eax_4 + 0x38) = temp1_2;
0056980a              *(uint32_t*)((char*)eax_4 + 0x34) = this->_buckets[temp1_2];
0056980d              this->_buckets[temp1_2] = eax_4;
00569813              this->_currNum += 1;
0056981f              return 1;
005697da          }
0056979f      }
0056979f      else
0056979f      {
005697a1          class PackableHashData<unsigned long,Fellow>** _buckets = this->_buckets;
005697a1          
005697a6          if (_buckets == 0)
005697a6              goto label_5697ce;
005697a6          
005697a8          uint32_t const i = *(uint32_t*)arg2;
005697b1          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
005697b1          
005697b6          if (edx_3 == 0)
005697b6              goto label_5697ce;
005697b6          
005697ba          while (i != *(uint32_t*)edx_3)
005697ba          {
005697bc              edx_3 = edx_3[0xd];
005697bc              
005697c1              if (edx_3 == 0)
005697c1                  goto label_5697ce;
005697ba          }
005697ba          
005697ca          if (edx_3 == 0xfffffffc)
005697ca              goto label_5697ce;
0056979f      }
0056979f      
00569828      return 0;
00569790  }

0056982b                                   90 90 90 90 90                                                             .....

00569830  class PackableHashTable<unsigned long,CContractTracker>* __thiscall PackableHashTable<unsigned long,long>::operator=(class PackableHashTable<IDClass<_tagDataID,32,0>,int>* arg1, void* arg2)

00569830  {
00569836      class PackableHashTable<unsigned long,CContractTracker>* result = arg1;
00569836      
0056983a      if (result != arg2)
0056983a      {
0056983d          PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(arg1);
00569842          void* _buckets = result->_buckets;
00569845          int32_t i = 0;
00569845          
00569849          if (_buckets != 0)
00569849          {
0056984c              operator delete[](_buckets);
00569854              result->_buckets = nullptr;
00569849          }
00569849          
00569857          result->_table_size = 0;
0056985f          result->_table_size = *(uint32_t*)((char*)arg2 + 0xc);
00569862          PackableHashTable<unsigned long,CContractTracker>::Init(result);
00569862          
0056986a          if (*(uint32_t*)((char*)arg2 + 0xc) > 0)
0056986a          {
0056989b              do
0056989b              {
00569873                  class IDClass<_tagDataID,32,0>* j_1 = *(uint32_t*)(*(uint32_t*)((char*)arg2 + 8) + (i << 2));
00569873                  
00569878                  if (j_1 != 0)
00569878                  {
00569893                      class IDClass<_tagDataID,32,0>* j;
00569893                      
00569893                      do
00569893                      {
00569880                          j = *(int32_t*)((char*)j_1 + 8);
0056988a                          PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(result, j_1, &j_1[1]);
00569891                          j_1 = j;
00569893                      } while (j != 0);
00569878                  }
00569878                  
00569898                  i += 1;
0056989b              } while (i < *(uint32_t*)((char*)arg2 + 0xc));
0056986a          }
0056983a      }
0056983a      
005698a3      return result;
00569830  }

005698a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005698b0  void* __thiscall PackableHashData<unsigned long,Fellow>::`scalar deleting destructor'(class PackableHashData<unsigned long,Fellow>* this, uint32_t arg2)

005698b0  {
005698b4      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_data._name.m_buffer;
005698bb      this->_data.vtable = 0x7a515c;
005698bb      
005698ce      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005698d0          m_buffer->vtable->__vecDelDtor(1);
005698d0      
005698dd      this->_data.vtable = 0x79285c;
005698dd      
005698e4      if ((arg2 & 1) != 0)
005698e7          operator delete(this);
005698e7      
005698f3      return this;
005698b0  }

005698f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00569900  void __fastcall PackableHashTable<unsigned long,Fellow>::EmptyContents(class PackableHashTable<unsigned long,Fellow>* this)

00569900  {
00569900      class PackableHashTable<unsigned long,Fellow>* var_4 = this;
00569900      
00569909      if (this->_buckets != 0)
00569909      {
0056990e          class PackableHashTable<unsigned long,Fellow>* i = nullptr;
00569912          var_4 = nullptr;
00569912          
00569916          if (this->_table_size > 0)
00569916          {
00569918              void* j;
00569918              void* j_1 = j;
00569918              
00569985              do
00569985              {
00569923                  void* j_2 = this->_buckets[i];
00569923                  
00569928                  if (j_2 != 0)
00569928                  {
0056996b                      do
0056996b                      {
00569930                          int32_t* edi_1 = *(uint32_t*)((char*)j_2 + 8);
00569933                          j = *(uint32_t*)((char*)j_2 + 0x34);
0056993a                          *(uint32_t*)((char*)j_2 + 4) = 0x7a515c;
0056993a                          
0056994d                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00569955                              **(uint32_t**)edi_1(1);
00569955                          
00569958                          *(uint32_t*)((char*)j_2 + 4) = 0x79285c;
0056995f                          operator delete(j_2);
00569969                          j_2 = j;
0056996b                      } while (j != 0);
0056996b                      
0056996d                      i = var_4;
00569928                  }
00569928                  
00569971                  this->_buckets[i] = 0;
0056997e                  i = (&i->vtable + 1);
00569981                  var_4 = i;
00569985              } while (i < this->_table_size);
00569916          }
00569909      }
00569909      
0056998a      this->_currNum = 0;
00569900  }

0056991d                                                                                         8d 49 00                               .I.
00569994                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005699a0  uint32_t __thiscall PackableHashTable<unsigned long,Fellow>::Pack(class PackableHashTable<unsigned long,Fellow>* this, void** arg2, uint32_t arg3)

005699a0  {
005699a0      class PackableHashTable<unsigned long,Fellow>* this_1 = this;
005699a5      uint32_t result = PackableHashTable<unsigned long,Fellow>::pack_size(this);
005699aa      uint32_t ebx = arg3;
005699b0      uint32_t result_1 = result;
005699b0      
005699b4      if (ebx >= result)
005699b4      {
005699c9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005699cb          *(uint32_t*)arg2 += 4;
005699d1          uint32_t i = 0;
005699d5          arg3 = 0;
005699d5          
005699d9          if (this->_table_size > 0)
005699d9          {
00569a22              do
00569a22              {
005699e3                  int32_t* j = this->_buckets[i];
005699e3                  
005699e8                  if (j != 0)
005699e8                  {
00569a0e                      do
00569a0e                      {
005699f3                          if (ebx >= 4)
005699f3                          {
005699f9                              **(uint32_t**)arg2 = *(uint32_t*)j;
005699fb                              *(uint32_t*)arg2 += 4;
005699f3                          }
005699f3                          
00569a06                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
00569a09                          j = j[0xd];
00569a0e                      } while (j != 0);
00569a0e                      
00569a10                      result = result_1;
00569a14                      i = arg3;
005699e8                  }
005699e8                  
00569a1b                  i += 1;
00569a1e                  arg3 = i;
00569a22              } while (i < this->_table_size);
005699d9          }
005699b4      }
005699b4      
00569a29      return result;
005699a0  }

005699dd                                                                                         8d 49 00                               .I.
00569a2c                                      90 90 90 90                                                              ....

00569a30  uint32_t __fastcall PackableHashTable<unsigned long,Fellow>::pack_size(class PackableHashTable<unsigned long,Fellow>* this)

00569a30  {
00569a30      class PackableHashTable<unsigned long,Fellow>* this_1 = this;
00569a38      int32_t i = 0;
00569a3a      bool cond:0 = this->_table_size <= 0;
00569a3d      int32_t result = 4;
00569a42      this_1 = nullptr;
00569a42      
00569a46      if (!(cond:0))
00569a46      {
00569a81          do
00569a81          {
00569a53              void* j = this->_buckets[i];
00569a53              
00569a58              while (j != 0)
00569a58              {
00569a6d                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
00569a70                  j = *(uint32_t*)((char*)j + 0x34);
00569a75                  result = ((result + eax_2) + 4);
00569a58              }
00569a58              
00569a7e              i += 1;
00569a81          } while (i < this->_table_size);
00569a46      }
00569a46      
00569a8a      return result;
00569a30  }

00569a8b                                   90 90 90 90 90                                                             .....

00569a90  int32_t __thiscall PackableHashTable<unsigned long,Fellow>::UnPack(class PackableHashTable<unsigned long,Fellow>* this, void** arg2, uint32_t arg3)

00569a90  {
00569a9e      if (arg3 < 4)
00569aa7          return 0;
00569aa7      
00569aac      void** edi = arg2;
00569ab0      void* eax_1 = *(uint32_t*)edi;
00569ab8      uint32_t var_34 = arg3;
00569abc      PackableHashTable<unsigned long,Fellow>::EmptyContents(this);
00569ac1      class PackableHashData<unsigned long,Fellow>** _buckets = this->_buckets;
00569ac1      
00569ac8      if (_buckets != 0)
00569ac8      {
00569acb          operator delete[](_buckets);
00569ad3          this->_buckets = nullptr;
00569ac8      }
00569ac8      
00569ad6      this->_table_size = 0;
00569ad9      void* ecx_1 = *(uint32_t*)edi;
00569adb      int32_t eax_2 = *(uint32_t*)ecx_1;
00569ae0      *(uint32_t*)edi = ((char*)ecx_1 + 4);
00569ae4      uint32_t ecx_4 = (eax_2 >> 0x10);
00569ae7      int32_t eax_3 = (eax_2 & 0xffff);
00569aec      int32_t ebx_1 = (arg3 - 4);
00569af1      this->_table_size = ecx_4;
00569af1      
00569af6      if (ecx_4 == 0)
00569af6      {
00569aff          int32_t result;
00569aff          result = eax_3 == 0;
00569b06          return result;
00569af6      }
00569af6      
00569b1b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
00569b1b      {
00569b34          int32_t var_30;
00569b34          Fellow::Fellow(&var_30);
00569b3b          arg3 = 0;
00569b43          int32_t* ecx_10;
00569b43          
00569b43          if (eax_3 <= 0)
00569b43          {
00569b9f          label_569b9f:
00569b9f              ecx_10 = &var_30;
00569b9f              
00569ba3              if (var_34 >= (*(uint32_t*)edi - eax_1))
00569ba3              {
00569ba5                  Fellow::~Fellow(ecx_10);
00569bb6                  return 1;
00569ba3              }
00569b43          }
00569b43          else
00569b43          {
00569b48              while (true)
00569b48              {
00569b48                  if (ebx_1 >= 4)
00569b48                  {
00569b4a                      int32_t* eax_5 = *(uint32_t*)edi;
00569b4e                      int32_t edx_1 = var_30;
00569b53                      arg2 = *(uint32_t*)eax_5;
00569b5f                      *(uint32_t*)edi = &eax_5[1];
00569b5f                      
00569b66                      if ((*(uint32_t*)(edx_1 + 0x10)(edi, ebx_1) != 0 && (PackableHashTable<unsigned long,Fellow>::add(this, &arg2, &var_30) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
00569b66                      {
00569b89                          bool cond:5_1 = (arg3 + 1) < eax_3;
00569b8b                          arg3 += 1;
00569b8b                          
00569b8f                          if (!(cond:5_1))
00569b8f                              goto label_569b9f;
00569b8f                          
00569b8f                          continue;
00569b66                      }
00569b48                  }
00569b48                  
00569bb9                  ecx_10 = &var_30;
00569bb9                  break;
00569b48              }
00569b43          }
00569b43          
00569bbd          Fellow::~Fellow(ecx_10);
00569b1b      }
00569b1b      
00569bcb      return 0;
00569a90  }

00569bce                                            90 90                                                                ..

00569bd0  void* __thiscall PackableHashTable<unsigned long,Fellow>::`scalar deleting destructor'(class PackableHashTable<unsigned long,Fellow>* this, uint32_t arg2)

00569bd0  {
00569bd3      this->vtable = 0x7cec58;
00569bd9      PackableHashTable<unsigned long,Fellow>::EmptyContents(this);
00569bde      class PackableHashData<unsigned long,Fellow>** _buckets = this->_buckets;
00569bde      
00569be3      if (_buckets != 0)
00569be3      {
00569be6          operator delete[](_buckets);
00569bee          this->_buckets = nullptr;
00569be3      }
00569be3      
00569bfa      this->_table_size = 0;
00569c01      this->vtable = 0x79285c;
00569c01      
00569c07      if ((arg2 & 1) != 0)
00569c0a          operator delete(this);
00569c0a      
00569c15      return this;
00569bd0  }

00569c18                                                                          90 90 90 90 90 90 90 90                          ........

00569c20  class PackableHashTable<unsigned long,CContractTracker>* __thiscall PackableHashTable<unsigned long,Fellow>::operator=(class PackableHashTable<unsigned long,Fellow>* arg1, void* arg2)

00569c20  {
00569c26      class PackableHashTable<unsigned long,CContractTracker>* result = arg1;
00569c26      
00569c2a      if (result != arg2)
00569c2a      {
00569c2d          PackableHashTable<unsigned long,Fellow>::EmptyContents(arg1);
00569c32          void* _buckets = result->_buckets;
00569c35          int32_t i = 0;
00569c35          
00569c39          if (_buckets != 0)
00569c39          {
00569c3c              operator delete[](_buckets);
00569c44              result->_buckets = nullptr;
00569c39          }
00569c39          
00569c47          result->_table_size = 0;
00569c4f          result->_table_size = *(uint32_t*)((char*)arg2 + 0xc);
00569c52          PackableHashTable<unsigned long,CContractTracker>::Init(result);
00569c52          
00569c5a          if (*(uint32_t*)((char*)arg2 + 0xc) > 0)
00569c5a          {
00569c8b              do
00569c8b              {
00569c63                  uint32_t* j_1 = *(uint32_t*)(*(uint32_t*)((char*)arg2 + 8) + (i << 2));
00569c63                  
00569c68                  if (j_1 != 0)
00569c68                  {
00569c83                      uint32_t* j;
00569c83                      
00569c83                      do
00569c83                      {
00569c70                          j = j_1[0xd];
00569c7a                          PackableHashTable<unsigned long,Fellow>::add(result, j_1, &j_1[1]);
00569c81                          j_1 = j;
00569c83                      } while (j != 0);
00569c68                  }
00569c68                  
00569c88                  i += 1;
00569c8b              } while (i < *(uint32_t*)((char*)arg2 + 0xc));
00569c5a          }
00569c2a      }
00569c2a      
00569c93      return result;
00569c20  }

00569c96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00569ca0  void __fastcall Fellowship::~Fellowship(class Fellowship* this)

00569ca0  {
00569ca5      this->_fellows_departed.vtable = 0x7cec44;
00569cb0      PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(&this->_fellows_departed);
00569cb5      class PackableHashData<unsigned long,long>** _buckets = this->_fellows_departed._buckets;
00569cb5      
00569cbc      if (_buckets != 0)
00569cbc      {
00569cbf          operator delete[](_buckets);
00569ca5          this->_fellows_departed._buckets = nullptr;
00569cbc      }
00569cbc      
00569ca5      this->_fellows_departed._table_size = 0;
00569ca5      this->_fellows_departed.vtable = 0x79285c;
00569cd3      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
00569cd3      
00569ce6      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00569ce8          m_buffer->vtable->__vecDelDtor(1);
00569ce8      
00569cf0      this->_fellowship_table.vtable = 0x7cec58;
00569cfb      PackableHashTable<unsigned long,Fellow>::EmptyContents(&this->_fellowship_table);
00569d00      class PackableHashData<unsigned long,Fellow>** _buckets_1 = this->_fellowship_table._buckets;
00569d00      
00569d05      if (_buckets_1 != 0)
00569d05      {
00569d08          operator delete[](_buckets_1);
00569cf0          this->_fellowship_table._buckets = nullptr;
00569d05      }
00569d05      
00569cf0      this->_fellowship_table._table_size = 0;
00569cf0      this->_fellowship_table.vtable = 0x79285c;
00569d1c      this->vtable = 0x79285c;
00569ca0  }

00569d26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00569d30  void __thiscall Fellowship::Fellowship(class Fellowship* this, class Fellowship const* arg2)

00569d30  {
00569d3c      this->vtable = 0x7cec6c;
00569d39      this->_fellowship_table.vtable = 0x7cec58;
00569d39      this->_fellowship_table._buckets = nullptr;
00569d39      this->_fellowship_table._table_size = 0;
00569d39      this->_fellowship_table._currNum = 0;
00569d57      PackableHashTable<unsigned long,Fellow>::operator=(&this->_fellowship_table, &arg2->_fellowship_table);
00569d5c      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
00569d5f      this->_name.m_buffer = m_buffer;
00569d66      InterlockedIncrement(&m_buffer->m_cRef);
00569d6f      this->_leader = arg2->_leader;
00569d75      this->_share_xp = arg2->_share_xp;
00569d7b      this->_even_xp_split = arg2->_even_xp_split;
00569d81      this->_open_fellow = arg2->_open_fellow;
00569d8a      this->_locked = arg2->_locked;
00569d87      this->_fellows_departed.vtable = 0x7cec44;
00569d87      this->_fellows_departed._buckets = nullptr;
00569d87      this->_fellows_departed._table_size = 0;
00569d87      this->_fellows_departed._currNum = 0;
00569da0      PackableHashTable<unsigned long,long>::operator=(&this->_fellows_departed, &arg2->_fellows_departed);
00569d30  }

00569dad                                         90 90 90                                                               ...

00569db0  void __fastcall ClientFellowshipSystem::DeleteFellowship(class ClientFellowshipSystem* this)

00569db0  {
00569db6      class CFellowship* m_pFellowship = this->m_pFellowship;
00569db6      
00569dbb      if (m_pFellowship != 0)
00569dbb      {
00569dc6          void var_44;
00569dc6          Fellowship::Fellowship(&var_44, m_pFellowship);
00569dcb          class CFellowship* m_pFellowship_1 = this->m_pFellowship;
00569dcb          
00569dd0          if (m_pFellowship_1 != 0)
00569dd2              m_pFellowship_1->vtable->__vecDelDtor(1);
00569dd2          
00569de1          this->m_pFellowship = nullptr;
00569de8          void __return;
00569de8          void var_40;
00569de8          PackableHashTable<unsigned long,Fellow>::begin(&var_40, &__return);
00569df3          int32_t* i_1;
00569df3          int32_t* i_2;
00569df3          
00569df3          for (int32_t* i = i_1; i != 0; i = i_2)
00569df3          {
00569e03              class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(*(uint32_t*)i);
00569e03              
00569e0d              if (eax_2 != 0)
00569e10                  CM_Character::SendNotice_ChangeRadarLook(eax_2);
00569e10              
00569e18              i_2 = i[0xd];
00569e18              
00569e1d              if (i_2 == 0)
00569e1d              {
00569e22                  int32_t eax_4 = (i[0xe] + 1);
00569e25                  int32_t var_48;
00569e25                  
00569e25                  if (eax_4 >= var_48)
00569e25                  {
00569e32                  label_569e32:
00569e32                      i_2 = nullptr;
00569e25                  }
00569e25                  else
00569e25                  {
00569e2b                      int32_t var_4c;
00569e2b                      
00569e2b                      while (*(uint32_t*)(var_4c + (eax_4 << 2)) == 0)
00569e2b                      {
00569e2d                          eax_4 += 1;
00569e2d                          
00569e30                          if (eax_4 >= var_48)
00569e30                              goto label_569e32;
00569e2b                      }
00569e2b                      
00569e4a                      i_2 = *(uint32_t*)(var_4c + (eax_4 << 2));
00569e25                  }
00569e1d              }
00569df3          }
00569df3          
00569e40          Fellowship::~Fellowship(&var_44);
00569dbb      }
00569db0  }

00569e4f                                               90                                                                 .

00569e50  void __fastcall ClientFellowshipSystem::OnShutdown(class ClientFellowshipSystem* this)

00569e50  {
00569e50      ClientFellowshipSystem::DeleteFellowship(this);
00569e55      class ClientFellowshipSystem* ClientFellowshipSystem::s_pFellowshipSystem_1 = ClientFellowshipSystem::s_pFellowshipSystem;
00569e55      
00569e5d      if (ClientFellowshipSystem::s_pFellowshipSystem_1 != 0)
00569e5d      {
00569e5f          ClientFellowshipSystem::s_pFellowshipSystem_1->vtable->Release();
00569e64          ClientFellowshipSystem::s_pFellowshipSystem = nullptr;
00569e5d      }
00569e50  }

00569e6f                                               90                                                                 .

00569e70  uint32_t __fastcall ClientFellowshipSystem::Handle_Fellowship__Disband(class ClientFellowshipSystem* this)

00569e70  {
00569e70      ClientFellowshipSystem::DeleteFellowship(this);
00569e75      CM_Fellowship::SendNotice_FellowshipDisbanded();
00569e7e      gmCCommunicationSystem::SetTalkFocusEnabled(3, 0);
00569e88      return 0;
00569e70  }

00569e89                             90 90 90 90 90 90 90                                                           .......

00569e90  uint32_t __thiscall ClientFellowshipSystem::Handle_Fellowship__Quit(class ClientFellowshipSystem* this, uint32_t arg2)

00569e90  {
00569e90      class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
00569e97      uint32_t player_id;
00569e97      
00569e97      if (SmartBox::smartbox_2 == 0)
00569ea1          player_id = 0;
00569e97      else
00569e99          player_id = SmartBox::smartbox_2->player_id;
00569e99      
00569eaa      if (arg2 != player_id)
00569eaa      {
00569eb7          Fellowship::RemoveFellow(this->m_pFellowship, arg2);
00569ebd          class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
00569ebd          
00569ec7          if (eax != 0)
00569eca              CM_Character::SendNotice_ChangeRadarLook(eax);
00569eaa      }
00569eaa      else
00569eac          ClientFellowshipSystem::DeleteFellowship(this);
00569eac      
00569ed3      CM_Fellowship::SendNotice_FellowQuit(arg2);
00569ed8      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00569ee2      uint32_t player_id_1;
00569ee2      
00569ee2      if (SmartBox::smartbox_1 == 0)
00569eec          player_id_1 = 0;
00569ee2      else
00569ee4          player_id_1 = SmartBox::smartbox_1->player_id;
00569ee4      
00569ef1      if (arg2 == player_id_1)
00569ef7          gmCCommunicationSystem::SetTalkFocusEnabled(3, 0);
00569ef7      
00569f01      return 0;
00569e90  }

00569f04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00569f10  uint32_t __thiscall ClientFellowshipSystem::Handle_Fellowship__Dismiss(class ClientFellowshipSystem* this, uint32_t arg2)

00569f10  {
00569f10      class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
00569f17      uint32_t player_id;
00569f17      
00569f17      if (SmartBox::smartbox_2 == 0)
00569f21          player_id = 0;
00569f17      else
00569f19          player_id = SmartBox::smartbox_2->player_id;
00569f19      
00569f2a      if (arg2 != player_id)
00569f2a      {
00569f37          Fellowship::RemoveFellow(this->m_pFellowship, arg2);
00569f3d          class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
00569f3d          
00569f47          if (eax != 0)
00569f4a              CM_Character::SendNotice_ChangeRadarLook(eax);
00569f2a      }
00569f2a      else
00569f2c          ClientFellowshipSystem::DeleteFellowship(this);
00569f2c      
00569f53      CM_Fellowship::SendNotice_FellowDismissed(arg2);
00569f58      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00569f62      uint32_t player_id_1;
00569f62      
00569f62      if (SmartBox::smartbox_1 == 0)
00569f6c          player_id_1 = 0;
00569f62      else
00569f64          player_id_1 = SmartBox::smartbox_1->player_id;
00569f64      
00569f71      if (arg2 == player_id_1)
00569f77          gmCCommunicationSystem::SetTalkFocusEnabled(3, 0);
00569f77      
00569f81      return 0;
00569f10  }

00569f84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00569f90  class ClientAllegianceSystem* ClientAllegianceSystem::GetAllegianceSystem()

00569f90  {
00569f95      return ClientAllegianceSystem::s_pAllegianceSystem;
00569f90  }

00569f96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00569fa0  void __fastcall ClientAllegianceSystem::OnEndCharacterSession(class ClientAllegianceSystem* this)

00569fa0  {
00569fa3      /* tailcall */
00569fa3      return AllegianceProfile::Clear(&this->m_allegianceProfile);
00569fa0  }

00569fa8                          90 90 90 90 90 90 90 90                                                          ........

00569fb0  void ClientAllegianceSystem::OnShutdown(class ClientAllegianceSystem* this @ ecx)

00569fb0  {
00569fb0      class ClientAllegianceSystem* ClientAllegianceSystem::s_pAllegianceSystem_1 = ClientAllegianceSystem::s_pAllegianceSystem;
00569fb0      
00569fb8      if (ClientAllegianceSystem::s_pAllegianceSystem_1 != 0)
00569fb8      {
00569fba          ClientAllegianceSystem::s_pAllegianceSystem_1->vtable->Release();
00569fbf          ClientAllegianceSystem::s_pAllegianceSystem = nullptr;
00569fb8      }
00569fb0  }

00569fca                                90 90 90 90 90 90                                                            ......

00569fd0  uint32_t __stdcall ClientAllegianceSystem::Handle_Allegiance__AllegianceUpdateAborted(class ClientAllegianceSystem* this @ ecx, uint32_t const arg2)

00569fd0  {
00569fd5      CM_Allegiance::SendNotice_AllegianceUpdateAborted(arg2);
00569fdf      return 0;
00569fd0  }

00569fe2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00569ff0  uint32_t __stdcall ClientAllegianceSystem::Handle_Allegiance__AllegianceLoginNotificationEvent(class ClientAllegianceSystem* this @ ecx, uint32_t arg2, int32_t arg3)

00569ff0  {
00569fff      CM_Allegiance::SendNotice_AllegianceLogin(arg2, ((int8_t)arg3 != 0));
0056a009      return 0;
00569ff0  }

0056a00c                                      90 90 90 90                                                              ....

0056a010  void __fastcall ClientAllegianceSystem::~ClientAllegianceSystem(class ClientAllegianceSystem* this)

0056a010  {
0056a01a      this->vtable = 0x7cee5c;
0056a014      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056a026      AllegianceHierarchy::~AllegianceHierarchy(&this->m_allegianceProfile._allegiance);
0056a02b      this->m_allegianceProfile.vtable = 0x79285c;
0056a032      this->m_cTurbineRefCount.vtable = 0x792b6c;
0056a014      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056a043      /* tailcall */
0056a043      return NoticeHandler::~NoticeHandler(&this->vtable);
0056a010  }

0056a048                          90 90 90 90 90 90 90 90                                                          ........

0056a050  class TResult* __thiscall ClientAllegianceSystem::QueryInterface(class ClientAllegianceSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

0056a050  {
0056a063      int32_t* key;
0056a063      
0056a063      if ((1 & (*(uint8_t*)$S124)) != 0)
0056a0b1          key = Offsets[0].key;
0056a063      else
0056a063      {
0056a06d          key = &ClientAllegianceSystem_InterfaceType;
0056a072          $S124 |= 1;
0056a078          Offsets[0].key = 0x7ceda0;
0056a07d          Offsets[0].ofs = 0;
0056a083          Offsets[1].key = 0x7cecf8;
0056a08d          Offsets[1].ofs = 0;
0056a093          Offsets[2].key = 0x7cee48;
0056a09d          Offsets[2].ofs = 0;
0056a0a3          Offsets[3].key = 0;
0056a0a9          Offsets[3].ofs = 0;
0056a063      }
0056a063      
0056a0b8      void* edx_3 = &Offsets;
0056a0b8      
0056a0bd      while (key != 0)
0056a0bd      {
0056a0df          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0056a0df          {
0056a102              if (arg4 != 0)
0056a102              {
0056a104                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0056a10e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
0056a111                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
0056a102              }
0056a102              
0056a11a              __return->m_val = 0;
0056a11d              return __return;
0056a0df          }
0056a0df          
0056a0e1          key = *(uint32_t*)((char*)edx_3 + 8);
0056a0e4          edx_3 += 8;
0056a0bd      }
0056a0bd      
0056a0f2      __return->m_val = 0x80004002;
0056a0f9      return __return;
0056a050  }


0056a120  uint32_t __thiscall ClientAllegianceSystem::Handle_Allegiance__AllegianceUpdate(class ClientAllegianceSystem* this, class CAllegianceProfile const* arg2, uint32_t arg3)

0056a120  {
0056a129      AllegianceProfile::operator=(&this->m_allegianceProfile.vtable, arg2);
0056a134      CM_Allegiance::SendNotice_AllegianceUpdate(arg2, arg3);
0056a13f      return 0;
0056a120  }

0056a142        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056a150  void __fastcall ClientAllegianceSystem::ClientAllegianceSystem(class ClientAllegianceSystem* this)

0056a150  {
0056a153      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056a15a      this->vtable = 0x7cee5c;
0056a160      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056a16a      this->m_cTurbineRefCount.m_cRef = 1;
0056a171      this->m_cTurbineRefCount.vtable = 0x792b6c;
0056a178      CAllegianceProfile::CAllegianceProfile(&this->m_allegianceProfile);
0056a181      ClientAllegianceSystem::s_pAllegianceSystem = this;
0056a187      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
0056a150  }

0056a191                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0056a1a0  uint32_t __fastcall ClientAllegianceSystem::Release(class ClientAllegianceSystem const* this)

0056a1a0  {
0056a1a7      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
0056a1a7      
0056a1b4      if ((result == 0 && this != 0))
0056a1b4      {
0056a1b8          ClientAllegianceSystem::~ClientAllegianceSystem(this);
0056a1be          operator delete(this);
0056a1b4      }
0056a1b4      
0056a1ca      return result;
0056a1a0  }

0056a1cb                                   90 90 90 90 90                                                             .....

0056a1d0  uint32_t __thiscall ClientAllegianceSystem::Handle_Allegiance__AllegianceInfoResponseEvent(class ClientAllegianceSystem* this, uint32_t arg2, class CAllegianceProfile const* arg3)

0056a1d0  {
0056a1dc      void var_38;
0056a1dc      CAllegianceData::CAllegianceData(&var_38);
0056a1e1      uint32_t ebp = arg2;
0056a1e1      
0056a1f8      if (AllegianceProfile::GetData(arg3, ebp, &var_38) == 0)
0056a1f8      {
0056a1fe          AllegianceData::~AllegianceData(&var_38);
0056a20b          return 0;
0056a1f8      }
0056a1f8      
0056a218      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Note: An asterisk (*) indicates …");
0056a22a      ClientSystem::AddTextToScroll(this, &arg2, 0, 1, 0);
0056a233      int32_t* esi_1 = (arg2 - 0x14);
0056a233      
0056a246      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0056a24e          **(uint32_t**)esi_1(1);
0056a24e      
0056a250      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056a255      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0056a25d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0056a26c      AllegianceData::GetFullName(&var_38, &AC1Legacy::PStringBase<char>::s_NullBuffer_2);
0056a27c      void* const eax_6 = &data_7cef28;
0056a27c      
0056a281      if (AllegianceData::IsLoggedIn(&var_38) == 0)
0056a283          eax_6 = &data_794320;
0056a283      
0056a28c      void* const var_54_4 = eax_6;
0056a290      char (* var_58)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data;
0056a29d      void* var_3c;
0056a29d      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3c, Formatted, u"Allegiance information for %hs%s…");
0056a2b2      ClientSystem::AddTextToScroll(this, &var_3c, 0, 1, 0);
0056a2b2      
0056a2c6      if (AllegianceProfile::GetPatron(arg3, ebp, &var_38) != 0)
0056a2c6      {
0056a2d1          AllegianceData::GetFullName(&var_38, &AC1Legacy::PStringBase<char>::s_NullBuffer_2);
0056a2e1          void* const eax_9 = &data_7cef28;
0056a2e1          
0056a2e6          if (AllegianceData::IsLoggedIn(&var_38) == 0)
0056a2e8              eax_9 = &data_794320;
0056a2e8          
0056a2f1          void* const var_54_7 = eax_9;
0056a2f5          char (* var_58_2)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data;
0056a300          PStringBase<unsigned short>::sprintf(&var_3c, u"   Patron: %hs%s\n");
0056a315          ClientSystem::AddTextToScroll(this, &var_3c, 0, 1, 0);
0056a2c6      }
0056a2c6      
0056a327      uint32_t i = AllegianceProfile::GetFirstVassal(arg3, ebp, &var_38);
0056a327      
0056a32b      if (i != 0)
0056a32b      {
0056a33a          ClientSystem::AddTextToScroll(this, "   Vassals: \n", 0, 1, 0);
0056a33a          
0056a3a3          do
0056a3a3          {
0056a349              AllegianceData::GetFullName(&var_38, &AC1Legacy::PStringBase<char>::s_NullBuffer_2);
0056a359              void* const eax_12 = &data_7cef28;
0056a359              
0056a35e              if (AllegianceData::IsLoggedIn(&var_38) == 0)
0056a360                  eax_12 = &data_794320;
0056a360              
0056a365              void* const var_54_10 = eax_12;
0056a36d              char (* var_58_4)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data;
0056a378              PStringBase<unsigned short>::sprintf(&var_3c, u"      %hs%s\n");
0056a38d              ClientSystem::AddTextToScroll(this, &var_3c, 0, 1, 0);
0056a39f              i = AllegianceProfile::GetNextVassal(arg3, i, &var_38);
0056a3a3          } while (i != 0);
0056a32b      }
0056a32b      
0056a3af      int32_t* esi_3 = ((char*)var_3c - 0x14);
0056a3af      
0056a3be      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0056a3c6          **(uint32_t**)esi_3(1);
0056a3c6      
0056a3c8      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0056a3c8      
0056a3d8      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
0056a3da          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
0056a3da      
0056a3e6      AllegianceData::~AllegianceData(&var_38);
0056a3f4      return 0;
0056a1d0  }

0056a3f7                                                                       90 90 90 90 90 90 90 90 90                         .........

0056a400  void* __thiscall Subpalette::`vector deleting destructor'(class Subpalette* this, uint32_t arg2)

0056a400  {
0056a400      char edx = arg2;
0056a400      
0056a40a      if ((edx & 2) == 0)
0056a40a      {
0056a444          this->vtable = 0x79285c;
0056a444          
0056a44a          if ((edx & 1) != 0)
0056a44d              operator delete(this);
0056a44d          
0056a458          return this;
0056a40a      }
0056a40a      
0056a40c      int32_t vtable = this->vtable;
0056a417      void* eax_1 = &this[vtable];
0056a417      
0056a41a      if ((vtable - 1) >= 0)
0056a41a      {
0056a41d          int32_t ecx_2 = vtable;
0056a42a          int32_t i;
0056a42a          
0056a42a          do
0056a42a          {
0056a420              eax_1 -= 0x18;
0056a423              i = ecx_2;
0056a423              ecx_2 -= 1;
0056a424              *(uint32_t*)eax_1 = 0x79285c;
0056a42a          } while (i != 1);
0056a41a      }
0056a41a      
0056a42f      if ((edx & 1) != 0)
0056a432          operator delete[](((char*)this - 4));
0056a432      
0056a43e      return ((char*)this - 4);
0056a400  }

0056a45b                                                                                   90 90 90 90 90                             .....

0056a460  void __fastcall ClientCombatSystem::Begin(class ClientCombatSystem* this)

0056a460  {
0056a466      this->combatMode = NONCOMBAT_COMBAT_MODE;
0056a46d      this->pendingCombatMode = UNDEF_COMBAT_MODE;
0056a470      this->jump_pending = 0;
0056a473      this->buildStartTime = 0f;
0056a476      *(uint32_t*)((char*)this->buildStartTime)[4] = 0;
0056a479      this->buildInProgress = 0;
0056a47c      this->powerBarMode = PBM_UNDEF;
0056a47f      this->latestPowerBarLevel = 0f;
0056a482      this->attackServerResponsePending = 0;
0056a485      this->attackWhenResponseReceived = 0;
0056a488      this->attackWhenResponseReceived_Power = 0f;
0056a48b      this->attackRequestInProgress = 0;
0056a48e      this->attackInProgress = 0;
0056a491      this->requestedAttackPower = 0f;
0056a494      this->requestedAttackHeight = MEDIUM_ATTACK_HEIGHT;
0056a49b      this->currentBuildIsAutomatic = 0;
0056a49e      this->targetWillinglyLost = 0;
0056a4a1      this->repeatAttacking = 0;
0056a4a4      this->m_rUIRequestedPower = 0.5f;
0056a4ab      this->m_bTrackingTarget = 0;
0056a4ae      this->m_bAdvancedCombatMode = 0;
0056a4b1      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0056a4b1      
0056a4b8      if (eax != 0)
0056a4ba          eax->vtable->RegisterNoticeHandler(0x4dd1ef, &this->vtable);
0056a460  }

0056a4cd                                         90 90 90                                                               ...

0056a4d0  class ClientCombatSystem* ClientCombatSystem::GetCombatSystem()

0056a4d0  {
0056a4d5      return ClientCombatSystem::s_pCombatSystem;
0056a4d0  }

0056a4d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0056a4e0  void __fastcall ClientCombatSystem::OnStartup(class ClientCombatSystem* this)

0056a4e0  {
0056a4e3      ClientCombatSystem::s_pCombatSystem = this;
0056a4e9      this->vtable->AddRef();
0056a4ee      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(1, 0x28, &this->vtable);
0056a4e0  }

0056a503           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0056a510  void __fastcall ClientCombatSystem::OnShutdown(class ClientCombatSystem* this)

0056a510  {
0056a513      class ClientCombatSystem* ClientCombatSystem::s_pCombatSystem_1 = ClientCombatSystem::s_pCombatSystem;
0056a513      
0056a51b      if (ClientCombatSystem::s_pCombatSystem_1 != 0)
0056a51b      {
0056a51d          ClientCombatSystem::s_pCombatSystem_1->vtable->Release();
0056a522          ClientCombatSystem::s_pCombatSystem = nullptr;
0056a51b      }
0056a51b      
0056a52e      if (this != 0)
0056a52e      {
0056a530          QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x28, &this->vtable);
0056a544          return;
0056a52e      }
0056a52e      
0056a545      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(1, 0x28, 0);
0056a510  }

0056a559                                                                             90 90 90 90 90 90 90                           .......

0056a560  uint32_t __stdcall ClientCombatSystem::Handle_Combat__QueryHealthResponse(class ClientCombatSystem* this @ ecx, uint32_t arg2, float arg3)

0056a560  {
0056a56a      CM_Combat::SendNotice_UpdateObjectHealth(arg2, arg3);
0056a574      return 0;
0056a560  }

0056a577                                                                       90 90 90 90 90 90 90 90 90                         .........

0056a580  uint8_t __stdcall ClientCombatSystem::CompatibleCombatMode(class ClientCombatSystem* this @ ecx, enum COMBAT_MODE arg2)

0056a580  {
0056a587      enum COMBAT_MODE eax_2;
0056a587      
0056a587      if (arg2 == MISSILE_COMBAT_MODE)
0056a587      {
0056a599          if (((CPlayerSystem::GetPlayerSystem()->inventoryMask >> 0x16) & 1) == 0)
0056a599          {
0056a59b              eax_2 = 0;
0056a59d              return 0;
0056a599          }
0056a587      }
0056a587      else if (arg2 == MAGIC_COMBAT_MODE)
0056a5a3      {
0056a5b1          if ((*(uint8_t*)(CPlayerSystem::GetPlayerSystem() + 0x233) & 1) == 0)
0056a5b1          {
0056a5b3              eax_2 = 0;
0056a5b5              return 0;
0056a5b1          }
0056a5a3      }
0056a5a3      else if ((((arg2 == MELEE_COMBAT_MODE && (((int8_t)(*(uint32_t*)(CPlayerSystem::GetPlayerSystem() + 0x230) >> 0x14)) & 1) == 0) && (((int8_t)(*(uint32_t*)(CPlayerSystem::GetPlayerSystem() + 0x230) >> 0x19)) & 1) == 0) && (*(uint32_t*)(CPlayerSystem::GetPlayerSystem() + 0x230) & 0x3500000) != 0))
0056a5bb      {
0056a5b3          eax_2 = 0;
0056a5b5          return 0;
0056a5bb      }
0056a5bb      
0056a5f4      eax_2 = 1;
0056a5f6      return 1;
0056a580  }

0056a5f9                                                                             90 90 90 90 90 90 90                           .......

0056a600  uint8_t __stdcall ClientCombatSystem::ObjectIsAttackable(class ClientCombatSystem* this @ ecx, uint32_t arg2)

0056a600  {
0056a606      uint32_t player_id;
0056a606      
0056a606      if (arg2 != 0)
0056a606      {
0056a608          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056a608          
0056a60f          if (SmartBox::smartbox_1 == 0)
0056a619              player_id = 0;
0056a60f          else
0056a611              player_id = SmartBox::smartbox_1->player_id;
0056a611          
0056a61d          if (arg2 != player_id)
0056a61d          {
0056a62c              class ACCWeenieObject* esi = ClientObjMaintSystem::GetWeenieObject(arg2);
0056a633              class ACCWeenieObject* eax;
0056a633              
0056a633              if (esi != 0)
0056a633              {
0056a63d                  eax = esi->vtable->InqType();
0056a63d                  
0056a642                  if ((eax & 0x10) != 0)
0056a642                  {
0056a652                      if ((esi->pwd._bitfield & 0x200000) != 0)
0056a652                      {
0056a6b2                          eax = 1;
0056a6b5                          return 1;
0056a652                      }
0056a652                      
0056a665                      class ACCWeenieObject* edi_1 = ClientObjMaintSystem::GetWeenieObject(CPlayerSystem::GetPlayerSystem()->playerID);
0056a665                      
0056a66c                      if (edi_1 != 0)
0056a66c                      {
0056a678                          if ((edi_1->pwd._bitfield & 0x200000) != 0)
0056a678                          {
0056a6b2                              eax = 1;
0056a6b5                              return 1;
0056a678                          }
0056a678                          
0056a683                          if (esi->vtable->IsPlayer() != 0)
0056a683                          {
0056a689                              int32_t eax_6 = esi->vtable->IsPK();
0056a689                              
0056a68e                              if (eax_6 != 0)
0056a694                                  eax = edi_1->vtable->IsPK();
0056a694                              
0056a699                              if ((eax_6 != 0 && eax != 0))
0056a699                              {
0056a6b2                                  eax = 1;
0056a6b5                                  return 1;
0056a699                              }
0056a699                              
0056a6a4                              if ((esi->vtable->IsPKLite() != 0 && edi_1->vtable->IsPKLite() != 0))
0056a6a4                              {
0056a6b2                                  eax = 1;
0056a6b5                                  return 1;
0056a6a4                              }
0056a683                          }
0056a683                          else if (esi->pwd._pet_owner == 0)
0056a6c0                          {
0056a6c2                              eax = esi->pwd._bitfield;
0056a6c8                              eax u>>= 4;
0056a6cc                              eax &= 1;
0056a6cf                              return eax;
0056a6c0                          }
0056a66c                      }
0056a642                  }
0056a633              }
0056a633              
0056a6d3              eax = 0;
0056a6d6              return 0;
0056a61d          }
0056a606      }
0056a606      
0056a61f      player_id = 1;
0056a621      return 1;
0056a600  }

0056a6d9                                                                             90 90 90 90 90 90 90                           .......

0056a6e0  uint8_t __stdcall ClientCombatSystem::HandleMagicAction(class ClientCombatSystem* this @ ecx, class InputEvent const* arg2)

0056a6e0  {
0056a6e4      this = arg2->m_fStart;
0056a6e4      
0056a6e9      if (this != 0)
0056a6e9      {
0056a6ef          uint32_t m_InputAction = arg2->m_InputAction;
0056a6ef          
0056a6fc          if ((m_InputAction - 0x10000060) <= 0xa5)
0056a705              switch (jump_table_56a780[((uint32_t)*(int32_t*)((char*)(m_InputAction - 0x10000060) + 0x56a7ac))])
0056a705              {
0056a70c                  case 0x56a70c:
0056a70c                  {
0056a70c                      CM_Magic::SendNotice_PrevSpellTab();
0056a711                      int32_t eax_1;
0056a711                      eax_1 = 1;
0056a713                      return 1;
0056a70c                      break;
0056a70c                  }
0056a716                  case 0x56a716:
0056a716                  {
0056a716                      CM_Magic::SendNotice_NextSpellTab();
0056a71b                      int32_t eax_2;
0056a71b                      eax_2 = 1;
0056a71d                      return 1;
0056a716                      break;
0056a716                  }
0056a720                  case 0x56a720:
0056a720                  {
0056a720                      CM_Magic::SendNotice_NextSpellSelection();
0056a725                      int32_t eax_3;
0056a725                      eax_3 = 1;
0056a727                      return 1;
0056a720                      break;
0056a720                  }
0056a72a                  case 0x56a72a:
0056a72a                  {
0056a72a                      CM_Magic::SendNotice_CastCurrentSpell();
0056a72f                      int32_t eax_4;
0056a72f                      eax_4 = 1;
0056a731                      return 1;
0056a72a                      break;
0056a72a                  }
0056a734                  case 0x56a734:
0056a734                  {
0056a734                      CM_Magic::SendNotice_PrevSpellSelection();
0056a739                      int32_t eax_5;
0056a739                      eax_5 = 1;
0056a73b                      return 1;
0056a734                      break;
0056a734                  }
0056a73e                  case 0x56a73e:
0056a73e                  {
0056a73e                      CM_Magic::SendNotice_FirstSpellTab();
0056a743                      int32_t eax_6;
0056a743                      eax_6 = 1;
0056a745                      return 1;
0056a73e                      break;
0056a73e                  }
0056a748                  case 0x56a748:
0056a748                  {
0056a748                      CM_Magic::SendNotice_LastSpellTab();
0056a74d                      int32_t eax_7;
0056a74d                      eax_7 = 1;
0056a74f                      return 1;
0056a748                      break;
0056a748                  }
0056a752                  case 0x56a752:
0056a752                  {
0056a752                      CM_Magic::SendNotice_FirstSpellSelection();
0056a757                      int32_t eax_8;
0056a757                      eax_8 = 1;
0056a759                      return 1;
0056a752                      break;
0056a752                  }
0056a75c                  case 0x56a75c:
0056a75c                  {
0056a75c                      CM_Magic::SendNotice_LastSpellSelection();
0056a761                      int32_t eax_9;
0056a761                      eax_9 = 1;
0056a763                      return 1;
0056a75c                      break;
0056a75c                  }
0056a76d                  case 0x56a766:
0056a76d                  {
0056a76d                      CM_Magic::SendNotice_CastQuickslotSpell((m_InputAction - 0x10000065));
0056a775                      int32_t eax_10;
0056a775                      eax_10 = 1;
0056a777                      return 1;
0056a76d                      break;
0056a76d                  }
0056a705              }
0056a6e9      }
0056a6e9      
0056a77a      class InputEvent* eax;
0056a77a      eax = 0;
0056a77c      return 0;
0056a6e0  }

0056a77f                                                                                               90                                 .
0056a780  uint32_t jump_table_56a780[0xb] = 
0056a780  {
0056a780      [0x0] =  0x0056a72a
0056a784      [0x1] =  0x0056a734
0056a788      [0x2] =  0x0056a720
0056a78c      [0x3] =  0x0056a70c
0056a790      [0x4] =  0x0056a716
0056a794      [0x5] =  0x0056a766
0056a798      [0x6] =  0x0056a752
0056a79c      [0x7] =  0x0056a75c
0056a7a0      [0x8] =  0x0056a73e
0056a7a4      [0x9] =  0x0056a748
0056a7a8      [0xa] =  0x0056a77a
0056a7ac  }

0056a7ac                                      00 01 02 03 04 05 05 05 05 05 05 05 05 05 05 05 05 0a 0a 0a              ....................
0056a7c0  0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a  ................................
0056a7e0  0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a  ................................
0056a800  0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a  ................................
0056a820  0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a  ................................
0056a840  0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 06 07 08 09 90 90 90 90 90 90 90 90 90 90 90 90 90 90  ................................

0056a860  uint8_t __fastcall ClientCombatSystem::RepeatAttackInProgress(class ClientCombatSystem* this)

0056a860  {
0056a86b      uint8_t result = PlayerModule::AutoRepeatAttack(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0056a86b      
0056a872      if (result != 0)
0056a872      {
0056a874          struct PlayerModule::VTable** ecx;
0056a874          ecx = this->attackInProgress;
0056a874          
0056a883          if ((ecx != 0 || this->powerBarMode == PBM_COMBAT))
0056a888              return result;
0056a872      }
0056a872      
0056a885      return 0;
0056a860  }

0056a889                             90 90 90 90 90 90 90                                                           .......

0056a890  void __thiscall ClientCombatSystem::SetPowerBarLevel(class ClientCombatSystem* this, float arg2)

0056a890  {
0056a89c      CM_Character::SendNotice_SetPowerbarLevel(this->powerBarMode, arg2);
0056a8a8      this->latestPowerBarLevel = arg2;
0056a890  }

0056a8af                                               90                                                                 .

0056a8b0  void __fastcall ClientCombatSystem::HidePowerBar(class ClientCombatSystem* this)

0056a8b0  {
0056a8b4      enum PowerBarMode powerBarMode = this->powerBarMode;
0056a8bc      this->buildInProgress = 0;
0056a8bf      this->buildStartTime = 0f;
0056a8c2      *(uint32_t*)((char*)this->buildStartTime)[4] = 0;
0056a8c2      
0056a8c5      if (powerBarMode == PBM_COMBAT)
0056a8c5      {
0056a8c9          CM_Character::SendNotice_SetPowerbarLevel(powerBarMode, 0f);
0056a8d1          this->powerBarMode = PBM_UNDEF;
0056a8d6          return;
0056a8c5      }
0056a8c5      
0056a8d8      CM_Character::SendNotice_FinishPowerbar(powerBarMode);
0056a8e0      this->powerBarMode = PBM_UNDEF;
0056a8b0  }

0056a8e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0056a8f0  uint32_t ClientCombatSystem::GetAttackTarget(class ClientCombatSystem* this @ ecx)

0056a8f0  {
0056a8f1      uint32_t result = ACCWeenieObject::selectedID;
0056a8f1      
0056a8f9      if (result != 0)
0056a8f9      {
0056a8fc          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(result);
0056a8fc          
0056a906          if ((eax_1 != 0 && ACCWeenieObject::IsOwnedByPlayer(eax_1) == 0))
0056a906          {
0056a914              class CPhysicsObj* eax_3 = ClientObjMaintSystem::GetPhysicsObject(result);
0056a914              
0056a91e              if (eax_3 != 0)
0056a91e              {
0056a920                  class CPhysicsObj* parent = eax_3->parent;
0056a920                  
0056a925                  if (parent != 0)
0056a927                      result = parent->id;
0056a91e              }
0056a91e              
0056a92c              class ACCWeenieObject* eax_4;
0056a92c              
0056a92c              if (result != 0)
0056a92f                  eax_4 = ClientObjMaintSystem::GetWeenieObject(result);
0056a92f              
0056a939              if ((result == 0 || eax_4 != 0))
0056a942                  return result;
0056a906          }
0056a8f9      }
0056a8f9      
0056a93e      return 0;
0056a8f0  }

0056a943           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0056a950  void __fastcall ClientCombatSystem::UpdateTargetTracking(class ClientCombatSystem* this)

0056a950  {
0056a960      class CameraSet* ebx = ClientUISystem::AccessCameraSet(ClientUISystem::GetUISystem());
0056a960      
0056a964      if (ebx != 0)
0056a964      {
0056a966          class CameraSet* eax_1;
0056a966          eax_1 = this->m_bTrackingTarget;
0056a966          
0056a96c          if (eax_1 != 0)
0056a96c          {
0056a96e              enum COMBAT_MODE combatMode = this->combatMode;
0056a96e              
0056a979              if ((combatMode == MELEE_COMBAT_MODE || combatMode == MISSILE_COMBAT_MODE))
0056a979              {
0056a97d                  uint32_t eax_2 = ClientCombatSystem::GetAttackTarget(this);
0056a97d                  
0056a986                  if ((eax_2 != 0 && ClientCombatSystem::ObjectIsAttackable(this, eax_2) != 0))
0056a986                  {
0056a997                      CameraSet::TrackTarget(ebx, eax_2);
0056a99f                      return;
0056a986                  }
0056a979              }
0056a96c          }
0056a96c          
0056a9a4          CameraSet::TrackTarget(ebx, 0);
0056a964      }
0056a950  }

0056a9ad                                         90 90 90                                                               ...

0056a9b0  void __fastcall ClientCombatSystem::FinishJump(class ClientCombatSystem* this)

0056a9b0  {
0056a9bc      if (this->jump_pending != 0)
0056a9bc      {
0056a9be          enum PowerBarMode powerBarMode = this->powerBarMode;
0056a9c4          this->buildInProgress = 0;
0056a9c7          this->buildStartTime = 0f;
0056a9ca          *(uint32_t*)((char*)this->buildStartTime)[4] = 0;
0056a9ca          
0056a9cd          if (powerBarMode != PBM_COMBAT)
0056a9dc              CM_Character::SendNotice_FinishPowerbar(powerBarMode);
0056a9cd          else
0056a9d1              CM_Character::SendNotice_SetPowerbarLevel(powerBarMode, 0f);
0056a9d1          
0056a9e4          this->powerBarMode = PBM_UNDEF;
0056a9bc      }
0056a9bc      
0056a9ec      class CPhysicsObj* player = SmartBox::smartbox->player;
0056a9ec      
0056a9f4      if ((player != 0 && CPhysicsObj::get_minterp(player) != 0))
0056aa03          CPhysicsObj::get_minterp(player)->standing_longjump = 0;
0056aa03      
0056aa0c      this->jump_pending = 0;
0056a9b0  }

0056aa12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0056aa20  void __thiscall ClientCombatSystem::RegisterInputMaps(class ClientCombatSystem* this, enum COMBAT_MODE arg2, enum COMBAT_MODE arg3)

0056aa20  {
0056aa21      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0056aa21      
0056aa2c      if (ICIDM::s_cidm_1 != 0)
0056aa2c      {
0056aa39          if (arg3 == MELEE_COMBAT_MODE)
0056aa39          {
0056aa79              struct IInputActionCallback::VTable** eax_7;
0056aa79              
0056aa79              if (this == 0)
0056aa80                  eax_7 = nullptr;
0056aa79              else
0056aa7b                  eax_7 = &this->vtable;
0056aa7b              
0056aa88              ICIDM::s_cidm_1->vtable->UnregisterInputMap(0x10000003, eax_7);
0056aa39          }
0056aa39          else
0056aa39          {
0056aa3e              int32_t var_10_1;
0056aa3e              struct IInputActionCallback::VTable** var_c_1;
0056aa3e              
0056aa3e              if (arg3 == 4)
0056aa3e              {
0056aa60                  if (this == 0)
0056aa60                  {
0056aa6f                      var_c_1 = nullptr;
0056aa70                      var_10_1 = 0x10000004;
0056aa60                  }
0056aa60                  else
0056aa60                  {
0056aa65                      var_c_1 = &this->vtable;
0056aa66                      var_10_1 = 0x10000004;
0056aa60                  }
0056aa60                  
0056aa88                  ICIDM::s_cidm_1->vtable->UnregisterInputMap(var_10_1, var_c_1);
0056aa3e              }
0056aa3e              else if (arg3 == 8)
0056aa43              {
0056aa47                  if (this == 0)
0056aa47                  {
0056aa56                      var_c_1 = nullptr;
0056aa57                      var_10_1 = 0x10000005;
0056aa47                  }
0056aa47                  else
0056aa47                  {
0056aa4c                      var_c_1 = &this->vtable;
0056aa4d                      var_10_1 = 0x10000005;
0056aa47                  }
0056aa47                  
0056aa88                  ICIDM::s_cidm_1->vtable->UnregisterInputMap(var_10_1, var_c_1);
0056aa43              }
0056aa39          }
0056aa39          
0056aa91          struct IInputActionCallback::VTable** eax_8;
0056aa91          
0056aa91          if (this == 0)
0056aa98              eax_8 = nullptr;
0056aa91          else
0056aa93              eax_8 = &this->vtable;
0056aa93          
0056aa9a          ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000002, eax_8, 0x3e8);
0056aa9a          
0056aab3          if (arg2 == MELEE_COMBAT_MODE)
0056aab3          {
0056ab33              struct IInputActionCallback::VTable** eax_15;
0056ab33              
0056ab33              if (this == 0)
0056ab3a                  eax_15 = nullptr;
0056ab33              else
0056ab35                  eax_15 = &this->vtable;
0056ab35              
0056ab3c              ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000003, eax_15, 0x3e8);
0056aab3          }
0056aab3          else
0056aab3          {
0056aab8              if (arg2 == 4)
0056aab8              {
0056aafc                  if (this != 0)
0056aafc                  {
0056aafe                      ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000004, &this->vtable, 0x3e8);
0056ab15                      return;
0056aafc                  }
0056aafc                  
0056ab18                  ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000004, 0, 0x3e8);
0056ab2e                  return;
0056aab8              }
0056aab8              
0056aabd              if (arg2 == 8)
0056aabd              {
0056aac5                  if (this != 0)
0056aac5                  {
0056aac7                      ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000005, &this->vtable, 0x3e8);
0056aade                      return;
0056aac5                  }
0056aac5                  
0056aae1                  ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000005, 0, 0x3e8);
0056aabd              }
0056aab3          }
0056aa2c      }
0056aa20  }

0056ab53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0056ab60  class CombatManeuverTable* CombatManeuverTable::Get(class IDClass<_tagDataID,32,0> arg1)

0056ab60  {
0056ab7f      void var_8;
0056ab7f      return DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg1, 0x1000000d));
0056ab60  }


0056ab80  void __fastcall ClientCombatSystem::~ClientCombatSystem(class ClientCombatSystem* this)

0056ab80  {
0056ab87      *(int32_t*)((char*)this + -8) = 0x7cf498;
0056ab8d      *(uint32_t*)((char*)this - 4) = 0x7cf1f0;
0056ab94      this->vtable = 0x7cf1e4;
0056ab9a      this->vtable = &ClientCombatSystem::`vftable';
0056aba1      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0056aba1      
0056aba8      if (eax != 0)
0056aba8      {
0056abac          void* __offset(ClientCombatSystem, -0x4) ecx;
0056abac          
0056abac          if (this == 8)
0056abb3              ecx = nullptr;
0056abac          else
0056abae              ecx = ((char*)this - 4);
0056abae          
0056abb5          eax->vtable->UnRegisterAllNoticeHandlers(ecx);
0056aba8      }
0056aba8      
0056abc0      int32_t eax_2 = -(((char*)this - 8));
0056abc4      void* eax_4 = ((eax_2 - eax_2) & this);
0056abc6      this->vtable = &ReferenceCountTemplate<1048576,2>::`vftable';
0056abcd      *(uint32_t*)eax_4 = 0x794824;
0056abd3      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0056abd3      
0056abdb      if (ICIDM::s_cidm_1 != 0)
0056abdd          ICIDM::s_cidm_1->vtable->UnregisterCallback(eax_4);
0056abdd      
0056abe5      if (this != 8)
0056abe5      {
0056ab84          this->vtable = 0x7bf328;
0056abf2          /* tailcall */
0056abf2          return NoticeHandler::~NoticeHandler(((char*)this - 4));
0056abe5      }
0056abe5      
0056abfa      *nullptr = 0x7bf328;
0056ac01      /* tailcall */
0056ac01      return NoticeHandler::~NoticeHandler(nullptr);
0056ab80  }

0056ac06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0056ac10  uint32_t __fastcall ClientObjMaintSystem::AddRef(class ClientObjMaintSystem const* this)

0056ac10  {
0056ac1a      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
0056ac10  }

0056ac1b                                                                                   90 90 90 90 90                             .....

0056ac20  uint32_t __fastcall ClientCombatSystem::Release(class ClientCombatSystem const* this)

0056ac20  {
0056ac27      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
0056ac27      
0056ac34      if ((result == 0 && this != 0))
0056ac36          this->vtable->__vecDelDtor(1);
0056ac36      
0056ac44      return result;
0056ac20  }

0056ac45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0056ac50  class TResult* __thiscall ClientCombatSystem::QueryInterface(class ClientCombatSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

0056ac50  {
0056ac63      int32_t* key;
0056ac63      
0056ac63      if ((1 & (*(uint8_t*)$S160)) != 0)
0056acb1          key = Offsets[0].key;
0056ac63      else
0056ac63      {
0056ac6d          key = &ClientCombatSystem_InterfaceType;
0056ac72          $S160 |= 1;
0056ac78          Offsets[0].key = 0x7cf060;
0056ac7d          Offsets[0].ofs = 0;
0056ac83          Offsets[1].key = 0x7cf050;
0056ac8d          Offsets[1].ofs = 0;
0056ac93          Offsets[2].key = 0x7cf1c8;
0056ac9d          Offsets[2].ofs = 0;
0056aca3          Offsets[3].key = 0;
0056aca9          Offsets[3].ofs = 0;
0056ac63      }
0056ac63      
0056acb8      void* edx_3 = &Offsets;
0056acb8      
0056acbd      while (key != 0)
0056acbd      {
0056acdf          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0056acdf          {
0056ad02              if (arg4 != 0)
0056ad02              {
0056ad04                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0056ad0e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
0056ad11                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
0056ad02              }
0056ad02              
0056ad1a              __return->m_val = 0;
0056ad1d              return __return;
0056acdf          }
0056acdf          
0056ace1          key = *(uint32_t*)((char*)edx_3 + 8);
0056ace4          edx_3 += 8;
0056acbd      }
0056acbd      
0056acf2      __return->m_val = 0x80004002;
0056acf9      return __return;
0056ac50  }


0056ad20  void __fastcall ClientCombatSystem::HandleCommenceAttackEvent(class ClientCombatSystem* this)

0056ad20  {
0056ad20      class ClientCombatSystem* this_1 = this;
0056ad22      class ClientCombatSystem* this_2 = this;
0056ad27      bool cond:0 = this_2->attackRequestInProgress != 0;
0056ad29      this_2->attackInProgress = 1;
0056ad2d      this_2->attackServerResponsePending = 1;
0056ad2d      
0056ad31      if (!(cond:0))
0056ad31      {
0056ad38          if (this_2->powerBarMode == PBM_UNDEF)
0056ad38          {
0056ad3a              this = this_2->m_bAdvancedCombatMode;
0056ad41              int32_t eax_2;
0056ad41              eax_2 = this != 0;
0056ad48              this_2->powerBarMode = (eax_2 + 1);
0056ad48              
0056ad4b              if (eax_2 != PBM_UNDEF)
0056ad5b                  CM_Character::SendNotice_BeginPowerbar((eax_2 + 1));
0056ad4b              else
0056ad50                  CM_Character::SendNotice_SetPowerbarLevel((eax_2 + 1), 0f);
0056ad38          }
0056ad38          
0056ad63          float requestedAttackPower = this_2->requestedAttackPower;
0056ad71          CM_Character::SendNotice_SetPowerbarLevel(this_2->powerBarMode, requestedAttackPower);
0056ad7d          this_2->latestPowerBarLevel = requestedAttackPower;
0056ad80          this_2->buildInProgress = 0;
0056ad84          this_2->buildStartTime = 0f;
0056ad8b          *(uint32_t*)((char*)this_2->buildStartTime)[4] = 0;
0056ad31      }
0056ad31      
0056ad92      ACCWeenieObject::attackInProgress = 1;
0056ada7      /* tailcall */
0056ada7      return ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
0056ad20  }

0056adac                                      90 90 90 90                                                              ....

0056adb0  void __fastcall ClientCombatSystem::StartPowerBarBuild(class ClientCombatSystem* this)

0056adb0  {
0056adb3      enum PowerBarMode powerBarMode = this->powerBarMode;
0056adb6      this->buildInProgress = 1;
0056adc8      this->buildStartTime = (*(uint32_t*)Timer::cur_time);
0056adcb      *(uint32_t*)((char*)this->buildStartTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0056adce      CM_Character::SendNotice_SetPowerbarLevel(powerBarMode, 0f);
0056add6      this->latestPowerBarLevel = 0f;
0056adb0  }

0056addf                                                                                               90                                 .

0056ade0  uint8_t __fastcall ClientCombatSystem::GetPowerBarLevel(class ClientCombatSystem const* this)

0056ade0  {
0056ade6      uint8_t buildInProgress = this->buildInProgress;
0056ade6      
0056adeb      if (buildInProgress == 0)
0056adf7          return buildInProgress;
0056adf7      
0056ae03      int32_t var_8 = 0;
0056ae07      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056ae0e      int32_t var_4 = 0x3ff00000;
0056ae12      uint32_t player_id;
0056ae12      
0056ae12      if (SmartBox::smartbox_1 == 0)
0056ae1c          player_id = 0;
0056ae12      else
0056ae14          player_id = SmartBox::smartbox_1->player_id;
0056ae14      
0056ae29      CPhysicsObj::InqInterpretedMotionState(ClientObjMaintSystem::GetPhysicsObject(player_id))->current_style;
0056ae49      long double x87_r6_1 = (((long double)Timer::cur_time) - ((long double)this->buildStartTime));
0056ae4c      long double x87_r7_3 = (x87_r6_1 / x87_r6_1);
0056ae4e      long double temp0 = ((long double)1f);
0056ae4e      (x87_r7_3 - temp0);
0056ae54      class InterpretedMotionState* eax_1;
0056ae54      eax_1 = ((((x87_r7_3 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
0056ae54      
0056ae59      if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0056ae67          return eax_1;
0056ae67      
0056ae68      long double temp1 = ((long double)0f);
0056ae68      (x87_r7_3 - temp1);
0056ae6e      eax_1 = ((((x87_r7_3 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
0056ae70      /* unimplemented  {test ah, 0x5} */;
0056ae81      return eax_1;
0056ade0  }

0056ae82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056ae90  void __fastcall ClientCombatSystem::AbortAutomaticAttack(class ClientCombatSystem* this)

0056ae90  {
0056aead      if ((((this->attackServerResponsePending != 0 || this->attackRequestInProgress != 0) || this->attackInProgress != 0) || this->repeatAttacking != 0))
0056aead      {
0056aeaf          CM_Combat::Event_CancelAttack();
0056aeb7          bool cond:0_1 = this->buildInProgress == 0;
0056aeb9          this->repeatAttacking = 0;
0056aeb9          
0056aec3          if ((!(cond:0_1) && this->powerBarMode == PBM_COMBAT))
0056aec8              /* tailcall */
0056aec8              return ClientCombatSystem::HidePowerBar(this);
0056aead      }
0056ae90  }

0056aecf                                               90                                                                 .

0056aed0  void __thiscall ClientCombatSystem::TrackTarget(class ClientCombatSystem* this, uint8_t arg2)

0056aed0  {
0056aed7      if (arg2 != this->m_bTrackingTarget)
0056aed7      {
0056aed9          this->m_bTrackingTarget = arg2;
0056aedc          ClientCombatSystem::UpdateTargetTracking(this);
0056aed7      }
0056aed0  }

0056aee4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0056aef0  void __fastcall ClientCombatSystem::OnBeginCharacterSession(class ClientCombatSystem* this)

0056aef0  {
0056aef2      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0056aef2      
0056aefa      if (ICIDM::s_cidm_1 != 0)
0056aefa      {
0056aefe          if (this != 0)
0056aefe          {
0056af00              ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000002, &this->vtable, 0x3e8);
0056af13              return;
0056aefe          }
0056aefe          
0056af14          ICIDM::s_cidm_1->vtable->RegisterInputMap(0x10000002, 0, 0x3e8);
0056aefa      }
0056aef0  }

0056af27                       90 90 90 90 90 90 90 90 90                                                         .........

0056af30  void __fastcall ClientCombatSystem::OnEndCharacterSession(class ClientCombatSystem* this)

0056af30  {
0056af33      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0056af33      
0056af3b      if (ICIDM::s_cidm_1 != 0)
0056af3b      {
0056af3f          struct IInputActionCallback::VTable** eax_1;
0056af3f          
0056af3f          if (this == 0)
0056af46              eax_1 = nullptr;
0056af3f          else
0056af41              eax_1 = &this->vtable;
0056af41          
0056af48          ICIDM::s_cidm_1->vtable->UnregisterCallback(eax_1);
0056af3b      }
0056af3b      
0056af4e      class GlobalEventHandler* eax_2 = GlobalEventHandler::GetGlobalEventHandler();
0056af4e      
0056af55      if (eax_2 != 0)
0056af55      {
0056af59          int32_t edi;
0056af59          
0056af59          if (this != 0)
0056af59          {
0056af5b              int32_t var_8_2 = edi;
0056af5c              eax_2->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0056af6b              /* tailcall */
0056af6b              return ClientCombatSystem::Begin(this);
0056af59          }
0056af59          
0056af70          int32_t var_8_3 = edi;
0056af71          eax_2->vtable->UnRegisterAllNoticeHandlers(0);
0056af55      }
0056af55      
0056af7f      /* tailcall */
0056af7f      return ClientCombatSystem::Begin(this);
0056af30  }

0056af84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0056af90  void __thiscall ClientCombatSystem::CommenceJump(class ClientCombatSystem* this)

0056af90  {
0056af98      if (this->jump_pending == 0)
0056af98      {
0056afac          uint32_t eax_3 = CMotionInterp::charge_jump(CPhysicsObj::get_minterp(SmartBox::smartbox->player));
0056afac          
0056afb4          if (eax_3 == 0)
0056afb4          {
0056aff9              if (PlayerModule::AutoRepeatAttack(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0)
0056aff9              {
0056affb                  CM_Combat::Event_CancelAttack();
0056b000                  this->repeatAttacking = 0;
0056aff9              }
0056aff9              
0056b00a              CM_Character::SendNotice_SetPowerbarLevel(this->powerBarMode, 0f);
0056b011              this->latestPowerBarLevel = 0f;
0056b018              this->jump_pending = 1;
0056b01c              this->powerBarMode = PBM_JUMP;
0056b023              CM_Character::SendNotice_BeginPowerbar(PBM_JUMP);
0056b02d              ClientCombatSystem::StartPowerBarBuild(this);
0056b041              /* jump -> SmartBox::smartbox->cmdinterp->vtable->SendMovementEvent */
0056afb4          }
0056afb4          
0056afc1          if (eax_3 == 0x48)
0056afc1          {
0056afe3              ClientSystem::AddTextToScroll(this, &cant_jump_position, 0x1a, 1, 0);
0056afe9              return;
0056afc1          }
0056afc1          
0056afc4          if (eax_3 == 0x49)
0056afc4          {
0056afd7              ClientSystem::AddTextToScroll(this, &cant_jump_load, 0x1a, 1, 0);
0056afdd              return;
0056afc4          }
0056afc4          
0056afcb          ClientSystem::AddTextToScroll(this, &cant_jump_in_air, 0x1a, 1, 0);
0056af98      }
0056af90  }

0056b044              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0056b050  uint8_t __fastcall ClientCombatSystem::GetJumpPowerLevel(class ClientCombatSystem const* this)

0056b050  {
0056b050      class ClientCombatSystem* this_1 = this;
0056b051      uint8_t jump_pending = this->jump_pending;
0056b051      
0056b056      if (jump_pending == 0)
0056b082          return jump_pending;
0056b082      
0056b058      long double st0 = ClientCombatSystem::GetPowerBarLevel(this);
0056b05d      this_1 = ((float)st0);
0056b061      (st0 - ((long double)0.00100000005f));
0056b069      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0056b06c      class ClientCombatSystem** eax = &MIN_JUMP_EXTENT;
0056b06c      
0056b071      if (p)
0056b073          eax = &this_1;
0056b073      
0056b077      *(uint32_t*)eax;
0056b07a      return eax;
0056b050  }

0056b083           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0056b090  void __fastcall ClientCombatSystem::ClientCombatSystem(class ClientCombatSystem* this)

0056b090  {
0056b093      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056b09a      this->vtable = &IInputActionCallback::`vftable';
0056b0a1      this->vtable = &QualityChangeHandler::`vftable';
0056b0a8      this->vtable = 0x7cf498;
0056b0ae      this->vtable = &ClientCombatSystem::`vftable'.Release;
0056b0b5      this->vtable = &ClientCombatSystem::`vftable'.IUnknown_Release;
0056b0bc      this->vtable = &ClientCombatSystem::`vftable';
0056b0c3      this->m_cTurbineRefCount.m_cRef = 1;
0056b0ca      this->m_cTurbineRefCount.vtable = 0x792b6c;
0056b0d1      ClientCombatSystem::Begin(this);
0056b090  }

0056b0da                                                                                90 90 90 90 90 90                            ......

0056b0e0  void* __thiscall ClientCombatSystem::`scalar deleting destructor'(class ClientCombatSystem* this, uint32_t arg2)

0056b0e0  {
0056b0e3      ClientCombatSystem::~ClientCombatSystem(this);
0056b0ed      void* __offset(ClientCombatSystem, -0x8) result = ((char*)this - 8);
0056b0ed      
0056b0f0      if ((arg2 & 1) == 0)
0056b0ff          return result;
0056b0ff      
0056b0f3      operator delete(result);
0056b0fb      return ((char*)this - 8);
0056b0e0  }

0056b102        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056b110  void __thiscall ClientCombatSystem::DoJump(class ClientCombatSystem* this, uint8_t arg2)

0056b110  {
0056b11c      float var_78;
0056b11c      
0056b11c      if (arg2 == 0)
0056b11c      {
0056b11e          ClientCombatSystem::FinishJump(this);
0056b11e          
0056b128          if (this->jump_pending == 0)
0056b128          {
0056b163              var_78 = 0f;
0056b170              CM_Movement::Event_Jump_NonAutonomous(var_78);
0056b17c              return;
0056b128          }
0056b128          
0056b12c          long double st0_1 = ClientCombatSystem::GetPowerBarLevel(this);
0056b131          var_78 = ((float)st0_1);
0056b135          (st0_1 - ((long double)0.00100000005f));
0056b13d          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0056b140          float const* const eax_2 = &MIN_JUMP_EXTENT;
0056b140          
0056b145          if (p_1)
0056b147              eax_2 = &var_78;
0056b147          
0056b14b          float const eax_3 = *(uint32_t*)eax_2;
0056b150          var_78 = eax_3;
0056b154          CM_Movement::Event_Jump_NonAutonomous(eax_3);
0056b160          return;
0056b11c      }
0056b11c      
0056b184      if (this->jump_pending != 0)
0056b184      {
0056b18c          long double st0_2 = ClientCombatSystem::GetPowerBarLevel(this);
0056b191          var_78 = ((float)st0_2);
0056b195          (st0_2 - ((long double)0.00100000005f));
0056b19d          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0056b1a0          float* eax_4 = &MIN_JUMP_EXTENT;
0056b1a0          
0056b1a5          if (p_2)
0056b1a7              eax_4 = &var_78;
0056b1a7          
0056b1b2          var_78 = *(uint32_t*)eax_4;
0056b1b6          ClientCombatSystem::FinishJump(this);
0056b1c0          class CPhysicsObj* player = SmartBox::smartbox->player;
0056b1c6          float ebp_1 = var_78;
0056b1d9          void var_74;
0056b1d9          uint32_t eax_7 = CMotionInterp::jump(CPhysicsObj::get_minterp(player), ebp_1, &var_74);
0056b1e7          void var_70;
0056b1e7          CPhysicsObj::get_local_physics_velocity(player, &var_70);
0056b1e7          
0056b1ef          switch (eax_7)
0056b1ef          {
0056b239              case 0:
0056b239              {
0056b239                  void var_64;
0056b239                  JumpPack::JumpPack(&var_64, ebp_1, &var_70, &player->m_position, *(uint16_t*)((char*)player->m_position + 0x12c), player->update_times[5], player->update_times[4], player->update_times[6]);
0056b243                  CM_Movement::Event_Jump(&var_64);
0056b239                  break;
0056b239              }
0056b29a              case 0x24:
0056b29a              {
0056b29a                  ClientSystem::AddTextToScroll(this, &cant_jump_in_air, 0x1a, 1, 0);
0056b29a                  break;
0056b29a              }
0056b27e              case 0x48:
0056b27e              {
0056b27e                  ClientSystem::AddTextToScroll(this, &cant_jump_position, 0x1a, 1, 0);
0056b27e                  break;
0056b27e              }
0056b262              case 0x49:
0056b262              {
0056b262                  ClientSystem::AddTextToScroll(this, &cant_jump_load, 0x1a, 1, 0);
0056b262                  break;
0056b262              }
0056b1ef          }
0056b184      }
0056b110  }

0056b2a9                             8d 49 00                                                                       .I.
0056b2ac  uint32_t jump_table_56b2ac[0x5] = 
0056b2ac  {
0056b2ac      [0x0] =  0x0056b203
0056b2b0      [0x1] =  0x0056b28d
0056b2b4      [0x2] =  0x0056b271
0056b2b8      [0x3] =  0x0056b255
0056b2bc      [0x4] =  0x0056b29f
0056b2c0  }
0056b2c0  uint8_t lookup_table_56b2c0[0x4a] = 
0056b2c0  {
0056b2c0      [0x00] =  0x00
0056b2c1      [0x01] =  0x04
0056b2c2      [0x02] =  0x04
0056b2c3      [0x03] =  0x04
0056b2c4      [0x04] =  0x04
0056b2c5      [0x05] =  0x04
0056b2c6      [0x06] =  0x04
0056b2c7      [0x07] =  0x04
0056b2c8      [0x08] =  0x04
0056b2c9      [0x09] =  0x04
0056b2ca      [0x0a] =  0x04
0056b2cb      [0x0b] =  0x04
0056b2cc      [0x0c] =  0x04
0056b2cd      [0x0d] =  0x04
0056b2ce      [0x0e] =  0x04
0056b2cf      [0x0f] =  0x04
0056b2d0      [0x10] =  0x04
0056b2d1      [0x11] =  0x04
0056b2d2      [0x12] =  0x04
0056b2d3      [0x13] =  0x04
0056b2d4      [0x14] =  0x04
0056b2d5      [0x15] =  0x04
0056b2d6      [0x16] =  0x04
0056b2d7      [0x17] =  0x04
0056b2d8      [0x18] =  0x04
0056b2d9      [0x19] =  0x04
0056b2da      [0x1a] =  0x04
0056b2db      [0x1b] =  0x04
0056b2dc      [0x1c] =  0x04
0056b2dd      [0x1d] =  0x04
0056b2de      [0x1e] =  0x04
0056b2df      [0x1f] =  0x04
0056b2e0      [0x20] =  0x04
0056b2e1      [0x21] =  0x04
0056b2e2      [0x22] =  0x04
0056b2e3      [0x23] =  0x04
0056b2e4      [0x24] =  0x01
0056b2e5      [0x25] =  0x04
0056b2e6      [0x26] =  0x04
0056b2e7      [0x27] =  0x04
0056b2e8      [0x28] =  0x04
0056b2e9      [0x29] =  0x04
0056b2ea      [0x2a] =  0x04
0056b2eb      [0x2b] =  0x04
0056b2ec      [0x2c] =  0x04
0056b2ed      [0x2d] =  0x04
0056b2ee      [0x2e] =  0x04
0056b2ef      [0x2f] =  0x04
0056b2f0      [0x30] =  0x04
0056b2f1      [0x31] =  0x04
0056b2f2      [0x32] =  0x04
0056b2f3      [0x33] =  0x04
0056b2f4      [0x34] =  0x04
0056b2f5      [0x35] =  0x04
0056b2f6      [0x36] =  0x04
0056b2f7      [0x37] =  0x04
0056b2f8      [0x38] =  0x04
0056b2f9      [0x39] =  0x04
0056b2fa      [0x3a] =  0x04
0056b2fb      [0x3b] =  0x04
0056b2fc      [0x3c] =  0x04
0056b2fd      [0x3d] =  0x04
0056b2fe      [0x3e] =  0x04
0056b2ff      [0x3f] =  0x04
0056b300      [0x40] =  0x04
0056b301      [0x41] =  0x04
0056b302      [0x42] =  0x04
0056b303      [0x43] =  0x04
0056b304      [0x44] =  0x04
0056b305      [0x45] =  0x04
0056b306      [0x46] =  0x04
0056b307      [0x47] =  0x04
0056b308      [0x48] =  0x02
0056b309      [0x49] =  0x03
0056b30a  }

0056b30a                                90 90 90 90 90 90                                                            ......

0056b310  enum COMBAT_MODE __fastcall ClientCombatSystem::GetDefaultCombatMode(class ClientCombatSystem* this, uint8_t arg2)

0056b310  {
0056b310      class ClientCombatSystem* __return = this;
0056b311      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056b31c      uint32_t player_id;
0056b31c      
0056b31c      if (SmartBox::smartbox_1 == 0)
0056b326          player_id = 0;
0056b31c      else
0056b31e          player_id = SmartBox::smartbox_1->player_id;
0056b31e      
0056b329      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(player_id);
0056b329      
0056b335      if (eax != 0)
0056b335      {
0056b344          uint32_t eax_1 = ACCWeenieObject::GetObjectAtLocation(eax, 0x2500000, 0);
0056b344          
0056b34b          if (eax_1 == 0)
0056b34b          {
0056b381              uint32_t eax_6 = ACCWeenieObject::GetObjectAtLocation(eax, 0x1000000, 0);
0056b381              
0056b388              if (eax_6 == 0)
0056b419                  return 2;
0056b419              
0056b38f              class ACCWeenieObject* eax_7 = ClientObjMaintSystem::GetWeenieObject(eax_6);
0056b38f              
0056b39b              if (eax_7 != 0)
0056b39b              {
0056b3a6                  if (*(uint8_t*)((char*)eax_7->vtable->InqType())[1] < 0)
0056b3b0                      return 8;
0056b3b0                  
0056b3b3                  int16_t eax_9;
0056b3b3                  eax_9 = arg2;
0056b3b3                  
0056b3b9                  if (eax_9 == 0)
0056b3b9                  {
0056b3cd                      class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax_7, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0056b3da                      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, Formatted, &ClientCombatSystem::`vftable'.RecvNotice_CreateObject);
0056b3e6                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0056b3f8                      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, 0);
0056b401                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0056b3b9                  }
0056b39b              }
0056b34b          }
0056b34b          else
0056b34b          {
0056b34e              class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(eax_1);
0056b34e              
0056b358              if (eax_2 != 0)
0056b358              {
0056b367                  if (eax_2->pwd._combatUse == COMBAT_USE_MISSILE)
0056b375                      return 4;
0056b375                  
0056b419                  return 2;
0056b358              }
0056b34b          }
0056b335      }
0056b335      
0056b40e      return 1;
0056b310  }

0056b41c                                                                                      90 90 90 90                              ....

0056b420  void __thiscall ClientCombatSystem::HandleAttackerNotificationEvent(class ClientCombatSystem* this, class AC1Legacy::PStringBase<char> const* arg2, enum DAMAGE_TYPE const arg3, double const arg4, int32_t const arg5, int32_t arg6, int64_t const arg7)

0056b420  {
0056b432      void* var_48 = nullptr;
0056b43a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0056b43a      AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, &data_7928af);
0056b448      int32_t eax = gmCCommunicationSystem::IsSquelched(0, &AC1Legacy::PStringBase<char>::s_NullBuffer_4, 6);
0056b44f      int32_t* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0056b456      char ebx_1 = ((int8_t)-(eax));
0056b456      
0056b46e      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6[1]) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0))
0056b476          **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_6(1);
0056b476      
0056b47a      if ((ebx_1 - ebx_1) != 0xff)
0056b47a      {
0056b480          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056b48c          AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0056b495          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0056b497          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056b49c          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0056b4a4          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
0056b4aa          enum DAMAGE_TYPE esi_1 = arg3;
0056b4bc          int32_t var_74_1 = *(uint32_t*)((char*)arg4)[4];
0056b4bf          CombatSystem::InqCombatHitAdjectives(esi_1, arg4, &AC1Legacy::PStringBase<char>::s_NullBuffer_4, &AC1Legacy::PStringBase<char>::s_NullBuffer_5);
0056b4cc          void var_40;
0056b4cc          AppraisalSystem::DamageTypeToString(esi_1, &var_40, 0x40);
0056b4dd          class PStringBase<char> var_54;
0056b4dd          PStringBase<char>::PStringBase<char>(&var_54, &var_40);
0056b4e6          PStringBase<char>::break_reference(&var_54);
0056b4f0          _strlwr(var_54);
0056b4fd          int32_t ebx_2 = 1;
0056b507          int32_t* eax_8;
0056b507          
0056b507          if (*(uint32_t*)(var_54 - 4) != 1)
0056b507          {
0056b522              PStringBase<char>::PStringBase<char>(&arg3, &data_794098);
0056b535              ebx_2 = 6;
0056b53a              eax_8 = PStringBase<char>::operator+(&var_54, &arg4, &arg3);
0056b507          }
0056b507          else
0056b512              eax_8 = PStringBase<char>::PStringBase<char>(&var_48, &data_7928af);
0056b512          
0056b541          class PStringBase<char> eax_9 = var_54;
0056b541          
0056b547          if (eax_9 != *(uint32_t*)eax_8)
0056b547          {
0056b55c              if ((InterlockedDecrement((eax_9 - 0x10)) == 0 && eax_9 != 0x14))
0056b564                  **(uint32_t**)(eax_9 - 0x14)(1);
0056b564              
0056b566              class PStringBase<char> edi_2 = *(uint32_t*)eax_8;
0056b568              var_54 = edi_2;
0056b570              InterlockedIncrement((edi_2 - 0x10));
0056b547          }
0056b547          
0056b57b          if ((ebx_2 & 4) != 0)
0056b57b          {
0056b581              int32_t* esi_4 = (arg4 - 0x14);
0056b588              ebx_2 &= 0xfffffffb;
0056b588              
0056b593              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0056b59b                  **(uint32_t**)esi_4(1);
0056b57b          }
0056b57b          
0056b5a0          if ((ebx_2 & 2) != 0)
0056b5a0          {
0056b5a6              int32_t* esi_6 = (arg3 - 0x14);
0056b5ad              ebx_2 &= 0xfffffffd;
0056b5ad              
0056b5b8              if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0056b5c0                  **(uint32_t**)esi_6(1);
0056b5a0          }
0056b5a0          
0056b5c5          if ((ebx_2 & 1) != 0)
0056b5c5          {
0056b5cb              int32_t* esi_8 = ((char*)var_48 - 0x14);
0056b5cb              
0056b5da              if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
0056b5e2                  **(uint32_t**)esi_8(1);
0056b5c5          }
0056b5c5          
0056b5e4          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056b5ee          arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0056b5f2          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
0056b5f2          
0056b5fb          if (arg5 != 1)
0056b5fb          {
0056b606              AC1Legacy::PStringBase<char>::set(&arg3, &data_794520);
0056b60b              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = arg3;
0056b5fb          }
0056b5fb          
0056b60f          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0056b614          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0056b61c          char* edx_7 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0056b61c          
0056b627          if (arg6 != 0)
0056b632              edx_7 = PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_2, &ClientCombatSystem::`vftable'.RecvNotice_AddSalvageItem);
0056b632          
0056b637          int32_t esi_9 = arg7;
0056b645          class PStringBase<char>* eax_22 = ((esi_9 & 4) | 0);
0056b645          
0056b647          if (eax_22 != 0)
0056b647          {
0056b64d              void (__thiscall** const var_6c_14)(class gmNoticeHandler* this, class HouseData const*) = &ClientCombatSystem::`vftable'.RecvNotice_UpdateHouseData;
0056b652              class PSRefBufferCharData<char>** var_70_3 = &PStringBase<char>::s_NullBuffer_2;
0056b653              edx_7 = PStringBase<char>::sprintf_append(eax_22, edx_7);
0056b647          }
0056b647          
0056b662          class PStringBase<char>* eax_25 = ((esi_9 & 2) | 0);
0056b662          
0056b664          if (eax_25 != 0)
0056b664          {
0056b66a              void (__thiscall** const var_6c_15)(class gmNoticeHandler* this, uint32_t, int32_t, class GameMoveData const*) = &ClientCombatSystem::`vftable'.RecvNotice_OpponentTurn;
0056b66f              class PSRefBufferCharData<char>** var_70_4 = &PStringBase<char>::s_NullBuffer_2;
0056b670              PStringBase<char>::sprintf_append(eax_25, edx_7);
0056b664          }
0056b664          
0056b680          class PStringBase<char> var_6c_16 = var_54;
0056b686          char (* var_70_5)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_data;
0056b68b          int32_t const var_74_2 = arg5;
0056b68c          class PStringBase<char>* eax_28 = &arg2->m_buffer->m_data;
0056b68f          class PStringBase<char>* var_78_2 = eax_28;
0056b693          char (* var_7c_2)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data;
0056b698          void (__thiscall** const var_80_1)(class gmNoticeHandler* this) = &ClientCombatSystem::`vftable'.RecvNotice_FellowshipDisbanded;
0056b69d          class PSRefBufferCharData<char>** var_84_2 = &PStringBase<char>::s_NullBuffer_2;
0056b69e          PStringBase<char>::sprintf_append(eax_28, arg2);
0056b69e          
0056b6ad          if (((esi_9 & 1) | 0) != 0)
0056b6ad          {
0056b6b8              PStringBase<char>::PStringBase<char>(&arg3, &ClientCombatSystem::`vftable'.RecvNotice_CraftInteraction_ConfirmationRequest);
0056b6bd              enum DAMAGE_TYPE eax_29 = arg3;
0056b6c1              int32_t ecx_19 = *(uint32_t*)(eax_29 - 4);
0056b6c1              
0056b6c7              if (ecx_19 != 1)
0056b6c7              {
0056b6d0                  PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, eax_29, (ecx_19 - 1));
0056b6d5                  eax_29 = arg3;
0056b6c7              }
0056b6c7              
0056b6ee              if ((InterlockedDecrement((eax_29 - 0x10)) == 0 && eax_29 != 0x14))
0056b6f6                  **(uint32_t**)(eax_29 - 0x14)(1);
0056b6ad          }
0056b6ad          
0056b709          PStringBase<char>::PStringBase<char>(&arg3, &data_794508);
0056b70e          enum DAMAGE_TYPE eax_32 = arg3;
0056b712          int32_t ecx_24 = *(uint32_t*)(eax_32 - 4);
0056b712          
0056b718          if (ecx_24 != 1)
0056b718          {
0056b721              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, eax_32, (ecx_24 - 1));
0056b726              eax_32 = arg3;
0056b718          }
0056b718          
0056b739          if ((InterlockedDecrement((eax_32 - 0x10)) == 0 && eax_32 != 0x14))
0056b741              **(uint32_t**)(eax_32 - 0x14)(1);
0056b741          
0056b761          ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &arg3, 0), 0x16, 1, 0);
0056b76a          int32_t* esi_15 = (arg3 - 0x14);
0056b76a          
0056b779          if ((InterlockedDecrement(&esi_15[1]) == 0 && esi_15 != 0))
0056b781              **(uint32_t**)esi_15(1);
0056b781          
0056b787          void* __offset(PSRefBufferCharData<char>, -0x14) esi_17 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0056b787          
0056b796          if ((InterlockedDecrement(((char*)esi_17 + 4)) == 0 && esi_17 != 0))
0056b79e              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_17) + -0x14)(1);
0056b79e          
0056b7ac          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
0056b7ae              AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
0056b7ae          
0056b7ba          int32_t* esi_19 = (var_54 - 0x14);
0056b7ba          
0056b7c9          if ((InterlockedDecrement(&esi_19[1]) == 0 && esi_19 != 0))
0056b7d1              **(uint32_t**)esi_19(1);
0056b7d1          
0056b7d3          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
0056b7d3          
0056b7e3          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_7 != 0))
0056b7e5              AC1Legacy::PStringBase<char>::s_NullBuffer_7->vtable->__vecDelDtor(1);
0056b7e5          
0056b7ed          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0056b7ed          
0056b7ff          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
0056b801              AC1Legacy::PStringBase<char>::s_NullBuffer_8->vtable->__vecDelDtor(1);
0056b47a      }
0056b420  }

0056b811                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0056b820  uint8_t __thiscall ClientCombatSystem::PlayerInReadyPosition(class ClientCombatSystem* this, uint8_t arg2)

0056b820  {
0056b820      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056b82f      uint32_t player_id;
0056b82f      
0056b82f      if (SmartBox::smartbox_1 == 0)
0056b839          player_id = 0;
0056b82f      else
0056b831          player_id = SmartBox::smartbox_1->player_id;
0056b831      
0056b841      class CPhysicsObj* edi = ClientObjMaintSystem::GetPhysicsObject(player_id);
0056b848      class CPhysicsObj* forward_command;
0056b848      
0056b848      if (edi != 0)
0056b85b          switch ((this->combatMode - 1))
0056b85b          {
0056b864              case nullptr:
0056b864              case 7:
0056b864              {
0056b864              label_56b864:
0056b864                  int32_t eax_1 = CPhysicsObj::motions_pending(edi);
0056b869                  int32_t eax_2 = -(eax_1);
0056b874                  return (((int8_t)(eax_2 - eax_2)) + 1);
0056b864                  break;
0056b864              }
0056b881              case 1:
0056b881              {
0056b881                  int32_t var_18 = 0;
0056b896                  int32_t* __return;
0056b896                  int32_t* var_8;
0056b896                  InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_8, GetClassObject(&__return, &PlayerDesc_ClassType));
0056b89b                  int32_t* __return_1 = __return;
0056b89b                  
0056b8a1                  if (__return_1 != 0)
0056b8a5                      *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0056b8a5                  
0056b8a8                  int32_t* esi_1 = var_8;
0056b8bc                  CBaseQualities::InqInt(&esi_1[0xe], 0x2f, &var_18, 0, 0);
0056b8bc                  
0056b8c7                  if (var_18 == 0)
0056b8c9                      var_18 = 0x19;
0056b8c9                  
0056b8d3                  CPhysicsObj::InqInterpretedMotionState(edi);
0056b8e3                  class IDClass<_tagDataID,32,0> id = INVALID_DID.id;
0056b8eb                  CBaseQualities::InqDataID(&esi_1[0xe], 4, &id);
0056b8f0                  forward_command = id;
0056b8f0                  
0056b8fa                  if (forward_command != INVALID_DID.id)
0056b8fa                  {
0056b913                      forward_command = CombatManeuverTable::Get(forward_command);
0056b913                      
0056b91d                      if (forward_command != 0)
0056b91d                      {
0056b93b                          if (arg2 != 0)
0056b93b                          {
0056b93f                              if (esi_1 != 0)
0056b945                                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0056b945                              
0056b94a                              forward_command = 1;
0056b950                              return 1;
0056b93b                          }
0056b93b                          
0056b957                          *(int32_t*)((char*)forward_command->vtable + 0x14)();
0056b95c                          int32_t eax_10 = CPhysicsObj::motions_pending(edi);
0056b963                          char ebx_3 = ((int8_t)-(eax_10));
0056b963                          
0056b96b                          if (esi_1 != 0)
0056b971                              *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0056b971                          
0056b976                          eax_10 = ((ebx_3 - ebx_3) + 1);
0056b97c                          return eax_10;
0056b91d                      }
0056b91d                      
0056b921                      if (esi_1 != 0)
0056b921                      {
0056b927                          *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0056b92c                          int32_t eax_8;
0056b92c                          eax_8 = 0;
0056b932                          return 0;
0056b921                      }
0056b8fa                  }
0056b8fa                  else if (esi_1 != 0)
0056b904                      *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0056b881                  break;
0056b881              }
0056b986              case 3:
0056b986              {
0056b986                  uint32_t current_style = CPhysicsObj::InqInterpretedMotionState(edi)->current_style;
0056b990                  forward_command = CPhysicsObj::InqInterpretedMotionState(edi)->forward_command;
0056b990                  
0056b99f                  if ((current_style + 0x7fffffc1) <= 0xfa)
0056b99f                      switch (current_style)
0056b99f                      {
0056b9b8                          case 0x8000003f:
0056b9b8                          case 0x80000041:
0056b9b8                          case 0x80000043:
0056b9b8                          case 0x80000047:
0056b9b8                          case 0x80000138:
0056b9b8                          case 0x80000139:
0056b9b8                          {
0056b9b8                              if (forward_command == 0x41000003)
0056b9b8                              {
0056b9be                                  forward_command = arg2;
0056b9be                                  
0056b9c4                                  if (forward_command == 0)
0056b9c4                                      goto label_56b864;
0056b9c4                                  
0056b9cc                                  forward_command = 1;
0056b9d2                                  return 1;
0056b9b8                              }
0056b9b8                              break;
0056b9b8                          }
0056b99f                      }
0056b986                  break;
0056b986              }
0056b85b          }
0056b85b      
0056b909      forward_command = 0;
0056b90f      return 0;
0056b820  }

0056b9d5                                                                 8d 49 00                                               .I.
0056b9d8  uint32_t jump_table_56b9d8[0x8] = 
0056b9d8  {
0056b9d8      [0x0] =  0x0056b862
0056b9dc      [0x1] =  0x0056b877
0056b9e0      [0x2] =  0x0056b907
0056b9e4      [0x3] =  0x0056b97f
0056b9e8      [0x4] =  0x0056b907
0056b9ec      [0x5] =  0x0056b907
0056b9f0      [0x6] =  0x0056b907
0056b9f4      [0x7] =  0x0056b862
0056b9f8  }
0056b9f8  uint32_t jump_table_56b9f8[0x2] = 
0056b9f8  {
0056b9f8      [0x0] =  0x0056b9b3
0056b9fc      [0x1] =  0x0056b907
0056ba00  }
0056ba00  uint8_t lookup_table_56ba00[0xfb] = 
0056ba00  {
0056ba00      [0x00] =  0x00
0056ba01      [0x01] =  0x01
0056ba02      [0x02] =  0x00
0056ba03      [0x03] =  0x01
0056ba04      [0x04] =  0x00
0056ba05      [0x05] =  0x01
0056ba06      [0x06] =  0x01
0056ba07      [0x07] =  0x01
0056ba08      [0x08] =  0x00
0056ba09      [0x09] =  0x01
0056ba0a      [0x0a] =  0x01
0056ba0b      [0x0b] =  0x01
0056ba0c      [0x0c] =  0x01
0056ba0d      [0x0d] =  0x01
0056ba0e      [0x0e] =  0x01
0056ba0f      [0x0f] =  0x01
0056ba10      [0x10] =  0x01
0056ba11      [0x11] =  0x01
0056ba12      [0x12] =  0x01
0056ba13      [0x13] =  0x01
0056ba14      [0x14] =  0x01
0056ba15      [0x15] =  0x01
0056ba16      [0x16] =  0x01
0056ba17      [0x17] =  0x01
0056ba18      [0x18] =  0x01
0056ba19      [0x19] =  0x01
0056ba1a      [0x1a] =  0x01
0056ba1b      [0x1b] =  0x01
0056ba1c      [0x1c] =  0x01
0056ba1d      [0x1d] =  0x01
0056ba1e      [0x1e] =  0x01
0056ba1f      [0x1f] =  0x01
0056ba20      [0x20] =  0x01
0056ba21      [0x21] =  0x01
0056ba22      [0x22] =  0x01
0056ba23      [0x23] =  0x01
0056ba24      [0x24] =  0x01
0056ba25      [0x25] =  0x01
0056ba26      [0x26] =  0x01
0056ba27      [0x27] =  0x01
0056ba28      [0x28] =  0x01
0056ba29      [0x29] =  0x01
0056ba2a      [0x2a] =  0x01
0056ba2b      [0x2b] =  0x01
0056ba2c      [0x2c] =  0x01
0056ba2d      [0x2d] =  0x01
0056ba2e      [0x2e] =  0x01
0056ba2f      [0x2f] =  0x01
0056ba30      [0x30] =  0x01
0056ba31      [0x31] =  0x01
0056ba32      [0x32] =  0x01
0056ba33      [0x33] =  0x01
0056ba34      [0x34] =  0x01
0056ba35      [0x35] =  0x01
0056ba36      [0x36] =  0x01
0056ba37      [0x37] =  0x01
0056ba38      [0x38] =  0x01
0056ba39      [0x39] =  0x01
0056ba3a      [0x3a] =  0x01
0056ba3b      [0x3b] =  0x01
0056ba3c      [0x3c] =  0x01
0056ba3d      [0x3d] =  0x01
0056ba3e      [0x3e] =  0x01
0056ba3f      [0x3f] =  0x01
0056ba40      [0x40] =  0x01
0056ba41      [0x41] =  0x01
0056ba42      [0x42] =  0x01
0056ba43      [0x43] =  0x01
0056ba44      [0x44] =  0x01
0056ba45      [0x45] =  0x01
0056ba46      [0x46] =  0x01
0056ba47      [0x47] =  0x01
0056ba48      [0x48] =  0x01
0056ba49      [0x49] =  0x01
0056ba4a      [0x4a] =  0x01
0056ba4b      [0x4b] =  0x01
0056ba4c      [0x4c] =  0x01
0056ba4d      [0x4d] =  0x01
0056ba4e      [0x4e] =  0x01
0056ba4f      [0x4f] =  0x01
0056ba50      [0x50] =  0x01
0056ba51      [0x51] =  0x01
0056ba52      [0x52] =  0x01
0056ba53      [0x53] =  0x01
0056ba54      [0x54] =  0x01
0056ba55      [0x55] =  0x01
0056ba56      [0x56] =  0x01
0056ba57      [0x57] =  0x01
0056ba58      [0x58] =  0x01
0056ba59      [0x59] =  0x01
0056ba5a      [0x5a] =  0x01
0056ba5b      [0x5b] =  0x01
0056ba5c      [0x5c] =  0x01
0056ba5d      [0x5d] =  0x01
0056ba5e      [0x5e] =  0x01
0056ba5f      [0x5f] =  0x01
0056ba60      [0x60] =  0x01
0056ba61      [0x61] =  0x01
0056ba62      [0x62] =  0x01
0056ba63      [0x63] =  0x01
0056ba64      [0x64] =  0x01
0056ba65      [0x65] =  0x01
0056ba66      [0x66] =  0x01
0056ba67      [0x67] =  0x01
0056ba68      [0x68] =  0x01
0056ba69      [0x69] =  0x01
0056ba6a      [0x6a] =  0x01
0056ba6b      [0x6b] =  0x01
0056ba6c      [0x6c] =  0x01
0056ba6d      [0x6d] =  0x01
0056ba6e      [0x6e] =  0x01
0056ba6f      [0x6f] =  0x01
0056ba70      [0x70] =  0x01
0056ba71      [0x71] =  0x01
0056ba72      [0x72] =  0x01
0056ba73      [0x73] =  0x01
0056ba74      [0x74] =  0x01
0056ba75      [0x75] =  0x01
0056ba76      [0x76] =  0x01
0056ba77      [0x77] =  0x01
0056ba78      [0x78] =  0x01
0056ba79      [0x79] =  0x01
0056ba7a      [0x7a] =  0x01
0056ba7b      [0x7b] =  0x01
0056ba7c      [0x7c] =  0x01
0056ba7d      [0x7d] =  0x01
0056ba7e      [0x7e] =  0x01
0056ba7f      [0x7f] =  0x01
0056ba80      [0x80] =  0x01
0056ba81      [0x81] =  0x01
0056ba82      [0x82] =  0x01
0056ba83      [0x83] =  0x01
0056ba84      [0x84] =  0x01
0056ba85      [0x85] =  0x01
0056ba86      [0x86] =  0x01
0056ba87      [0x87] =  0x01
0056ba88      [0x88] =  0x01
0056ba89      [0x89] =  0x01
0056ba8a      [0x8a] =  0x01
0056ba8b      [0x8b] =  0x01
0056ba8c      [0x8c] =  0x01
0056ba8d      [0x8d] =  0x01
0056ba8e      [0x8e] =  0x01
0056ba8f      [0x8f] =  0x01
0056ba90      [0x90] =  0x01
0056ba91      [0x91] =  0x01
0056ba92      [0x92] =  0x01
0056ba93      [0x93] =  0x01
0056ba94      [0x94] =  0x01
0056ba95      [0x95] =  0x01
0056ba96      [0x96] =  0x01
0056ba97      [0x97] =  0x01
0056ba98      [0x98] =  0x01
0056ba99      [0x99] =  0x01
0056ba9a      [0x9a] =  0x01
0056ba9b      [0x9b] =  0x01
0056ba9c      [0x9c] =  0x01
0056ba9d      [0x9d] =  0x01
0056ba9e      [0x9e] =  0x01
0056ba9f      [0x9f] =  0x01
0056baa0      [0xa0] =  0x01
0056baa1      [0xa1] =  0x01
0056baa2      [0xa2] =  0x01
0056baa3      [0xa3] =  0x01
0056baa4      [0xa4] =  0x01
0056baa5      [0xa5] =  0x01
0056baa6      [0xa6] =  0x01
0056baa7      [0xa7] =  0x01
0056baa8      [0xa8] =  0x01
0056baa9      [0xa9] =  0x01
0056baaa      [0xaa] =  0x01
0056baab      [0xab] =  0x01
0056baac      [0xac] =  0x01
0056baad      [0xad] =  0x01
0056baae      [0xae] =  0x01
0056baaf      [0xaf] =  0x01
0056bab0      [0xb0] =  0x01
0056bab1      [0xb1] =  0x01
0056bab2      [0xb2] =  0x01
0056bab3      [0xb3] =  0x01
0056bab4      [0xb4] =  0x01
0056bab5      [0xb5] =  0x01
0056bab6      [0xb6] =  0x01
0056bab7      [0xb7] =  0x01
0056bab8      [0xb8] =  0x01
0056bab9      [0xb9] =  0x01
0056baba      [0xba] =  0x01
0056babb      [0xbb] =  0x01
0056babc      [0xbc] =  0x01
0056babd      [0xbd] =  0x01
0056babe      [0xbe] =  0x01
0056babf      [0xbf] =  0x01
0056bac0      [0xc0] =  0x01
0056bac1      [0xc1] =  0x01
0056bac2      [0xc2] =  0x01
0056bac3      [0xc3] =  0x01
0056bac4      [0xc4] =  0x01
0056bac5      [0xc5] =  0x01
0056bac6      [0xc6] =  0x01
0056bac7      [0xc7] =  0x01
0056bac8      [0xc8] =  0x01
0056bac9      [0xc9] =  0x01
0056baca      [0xca] =  0x01
0056bacb      [0xcb] =  0x01
0056bacc      [0xcc] =  0x01
0056bacd      [0xcd] =  0x01
0056bace      [0xce] =  0x01
0056bacf      [0xcf] =  0x01
0056bad0      [0xd0] =  0x01
0056bad1      [0xd1] =  0x01
0056bad2      [0xd2] =  0x01
0056bad3      [0xd3] =  0x01
0056bad4      [0xd4] =  0x01
0056bad5      [0xd5] =  0x01
0056bad6      [0xd6] =  0x01
0056bad7      [0xd7] =  0x01
0056bad8      [0xd8] =  0x01
0056bad9      [0xd9] =  0x01
0056bada      [0xda] =  0x01
0056badb      [0xdb] =  0x01
0056badc      [0xdc] =  0x01
0056badd      [0xdd] =  0x01
0056bade      [0xde] =  0x01
0056badf      [0xdf] =  0x01
0056bae0      [0xe0] =  0x01
0056bae1      [0xe1] =  0x01
0056bae2      [0xe2] =  0x01
0056bae3      [0xe3] =  0x01
0056bae4      [0xe4] =  0x01
0056bae5      [0xe5] =  0x01
0056bae6      [0xe6] =  0x01
0056bae7      [0xe7] =  0x01
0056bae8      [0xe8] =  0x01
0056bae9      [0xe9] =  0x01
0056baea      [0xea] =  0x01
0056baeb      [0xeb] =  0x01
0056baec      [0xec] =  0x01
0056baed      [0xed] =  0x01
0056baee      [0xee] =  0x01
0056baef      [0xef] =  0x01
0056baf0      [0xf0] =  0x01
0056baf1      [0xf1] =  0x01
0056baf2      [0xf2] =  0x01
0056baf3      [0xf3] =  0x01
0056baf4      [0xf4] =  0x01
0056baf5      [0xf5] =  0x01
0056baf6      [0xf6] =  0x01
0056baf7      [0xf7] =  0x01
0056baf8      [0xf8] =  0x01
0056baf9      [0xf9] =  0x00
0056bafa      [0xfa] =  0x00
0056bafb  }

0056bafb                                                                                   90 90 90 90 90                             .....

0056bb00  void __fastcall ClientCombatSystem::AttemptStartBuildingAttack(class ClientCombatSystem* this)

0056bb00  {
0056bb13      if ((ClientCombatSystem::PlayerInReadyPosition(this, 1) != 0 && this->buildInProgress == 0))
0056bb13      {
0056bb1c          int32_t eax_1;
0056bb1c          eax_1 = this->m_bAdvancedCombatMode != 0;
0056bb23          this->powerBarMode = (eax_1 + 1);
0056bb23          
0056bb26          if (eax_1 != PBM_UNDEF)
0056bb36              CM_Character::SendNotice_BeginPowerbar((eax_1 + 1));
0056bb26          else
0056bb2b              CM_Character::SendNotice_SetPowerbarLevel((eax_1 + 1), 0f);
0056bb2b          
0056bb3e          enum PowerBarMode powerBarMode = this->powerBarMode;
0056bb41          this->buildInProgress = 1;
0056bb53          this->buildStartTime = (*(uint32_t*)Timer::cur_time);
0056bb56          *(uint32_t*)((char*)this->buildStartTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0056bb59          CM_Character::SendNotice_SetPowerbarLevel(powerBarMode, 0f);
0056bb61          this->latestPowerBarLevel = 0f;
0056bb13      }
0056bb00  }

0056bb6a                                90 90 90 90 90 90                                                            ......

0056bb70  void __thiscall ClientCombatSystem::ExecuteAttack(class ClientCombatSystem* this, enum ATTACK_HEIGHT arg2, uint8_t arg3)

0056bb70  {
0056bb77      this->buildInProgress = 0;
0056bb7a      this->buildStartTime = 0f;
0056bb7d      *(uint32_t*)((char*)this->buildStartTime)[4] = 0;
0056bb87      uint32_t edi = ClientCombatSystem::GetAttackTarget(this);
0056bb87      
0056bb98      if (ClientCombatSystem::ObjectIsAttackable(this, ClientCombatSystem::GetAttackTarget(this)) == 0)
0056bb9a          edi = 0;
0056bb9a      
0056bba7      if (ClientCombatSystem::PlayerInReadyPosition(this, 1) != 0)
0056bba7      {
0056bbab          if (edi == 0)
0056bbab              goto label_56bc05;
0056bbab          
0056bbad          enum COMBAT_MODE combatMode = this->combatMode;
0056bbad          
0056bbb3          if (combatMode == MELEE_COMBAT_MODE)
0056bbd5              CM_Combat::Event_TargetedMeleeAttack(edi, arg2, this->requestedAttackPower);
0056bbb3          else if (combatMode == 4)
0056bbc4              CM_Combat::Event_TargetedMissileAttack(edi, arg2, this->requestedAttackPower);
0056bbc4          
0056bbec          if (PlayerModule::AutoRepeatAttack(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0)
0056bbee              this->repeatAttacking = 1;
0056bbee          
0056bbf2          this->attackServerResponsePending = 1;
0056bba7      }
0056bba7      else if (edi == 0)
0056bbfa      {
0056bc05      label_56bc05:
0056bc05          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &ClientCombatSystem::`vftable'.RecvNotice_EndPendingInPlayer);
0056bc16          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, 0);
0056bc1f          int32_t* edi_2 = (arg2 - 0x14);
0056bc1f          
0056bc32          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0056bc3a              **(uint32_t**)edi_2(1);
0056bbfa      }
0056bbfa      
0056bc3f      if (this->attackServerResponsePending == 0)
0056bc3f      {
0056bc41          enum PowerBarMode powerBarMode = this->powerBarMode;
0056bc47          this->buildInProgress = 0;
0056bc4a          this->buildStartTime = 0f;
0056bc4d          *(uint32_t*)((char*)this->buildStartTime)[4] = 0;
0056bc4d          
0056bc50          if (powerBarMode != PBM_COMBAT)
0056bc5f              CM_Character::SendNotice_FinishPowerbar(powerBarMode);
0056bc50          else
0056bc54              CM_Character::SendNotice_SetPowerbarLevel(powerBarMode, 0f);
0056bc54          
0056bc67          this->powerBarMode = PBM_UNDEF;
0056bc3f      }
0056bc3f      
0056bc6e      if (arg3 == 0)
0056bc70          this->attackServerResponsePending = 0;
0056bb70  }

0056bc79                                                                             90 90 90 90 90 90 90                           .......

0056bc80  void __fastcall ClientCombatSystem::AutoTarget(class ClientCombatSystem* this)

0056bc80  {
0056bc84      uint32_t esi;
0056bc84      uint32_t var_20 = esi;
0056bc8a      struct Turbine_GUID* var_14;
0056bc8a      int32_t* var_28 = &var_14;
0056bc93      struct Turbine_GUID* var_2c = &PlayerDesc_ClassType;
0056bc99      int32_t var_18 = 0;
0056bc9d      var_14 = nullptr;
0056bca8      class TResult __return;
0056bca8      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28);
0056bcad      struct Turbine_GUID* ecx_1 = var_14;
0056bcb6      var_2c = ecx_1;
0056bcb8      int32_t var_28_1 = 0;
0056bcbb      struct Turbine_GUID* eax_1 = var_2c;
0056bcc1      int32_t var_8 = 0;
0056bcc5      int32_t var_4 = 0;
0056bcc5      
0056bcc9      if (eax_1 != 0)
0056bccf          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0056bccf      
0056bcdb      void var_c;
0056bcdb      InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0056bcdb      
0056bce2      if (ecx_1 != 0)
0056bce8          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
0056bce8      
0056bceb      class TResult __return_1 = __return;
0056bceb      
0056bcf1      if (__return_1 != 0)
0056bcfd          CBaseQualities::InqInstanceID((__return_1 + 0x38), 0xb, &var_20);
0056bcfd      
0056bd02      uint32_t ecx_6 = var_20;
0056bd08      struct Turbine_GUID** esp;
0056bd08      
0056bd08      if (ecx_6 == 0)
0056bd08      {
0056bd60      label_56bd60:
0056bd60          CPlayerSystem::SelectNext(CPlayerSystem::GetPlayerSystem(), 1, 1, SELECTION_TYPE_COMPASS_ITEM, 0);
0056bd60          esp = &var_2c;
0056bd60          
0056bd67          if (__return_1 != 0)
0056bd67          {
0056bd6d              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0056bd6d              struct Turbine_GUID* __saved_edi;
0056bd6d              esp = &__saved_edi;
0056bd67          }
0056bd08      }
0056bd08      else
0056bd08      {
0056bd10          long double x87_r7_2 = (((long double)Timer::cur_time) - ((long double)this->lastAttackedTime));
0056bd13          long double temp0_1 = ((long double)15.0);
0056bd13          (x87_r7_2 - temp0_1);
0056bd19          class TResult eax_2;
0056bd19          eax_2.m_val = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0056bd1b          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0056bd1b          
0056bd1e          if (p_1)
0056bd1e              goto label_56bd60;
0056bd1e          
0056bd21          class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(ecx_6);
0056bd21          
0056bd30          if ((eax_3 == 0 || eax_3->beingRemoved != 0))
0056bd2b              goto label_56bd60;
0056bd2b          
0056bd38          ACCWeenieObject::SetSelectedObject(var_20, 0);
0056bd3d          esp = &var_2c;
0056bd3d          
0056bd42          if (__return_1 != 0)
0056bd42          {
0056bd48              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0056bd51              return;
0056bd42          }
0056bd08      }
0056bd08      
0056bd70      *(uint32_t*)esp;
0056bd70      esp[1];
0056bd70      esp[2];
0056bc80  }

0056bd77                                                                       90 90 90 90 90 90 90 90 90                         .........

0056bd80  void __fastcall ClientCombatSystem::RecvNotice_SelectionChanged(class ClientCombatSystem* this)

0056bd80  {
0056bd89      ClientCombatSystem::UpdateTargetTracking(((char*)this - 4));
0056bd89      
0056bdc6      if ((PlayerModule::AutoRepeatAttack(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0 && ((this->latestPowerBarLevel*(int32_t*)((char*)this + 0x38) != 0 || this->buildInProgress*(int32_t*)((char*)this + 0x30) == 1) && (((this->latestPowerBarLevel*(int32_t*)((char*)this + 0x39) != 0 || this->latestPowerBarLevel*(int32_t*)((char*)this + 0x3a) != 0) || this->latestPowerBarLevel*(int32_t*)((char*)this + 0x38) != 0) || this->requestedAttackPower*(int32_t*)((char*)this + 0x40) != 0))))
0056bdc6      {
0056bdc8          CM_Combat::Event_CancelAttack();
0056bdd0          bool cond:0_1 = this->buildStartTime*(int32_t*)((char*)this + 0x2c) == 0;
0056bd84          this->requestedAttackPower*(int32_t*)((char*)this + 0x40) = 0;
0056bd84          
0056bddc          if ((!(cond:0_1) && this->buildInProgress*(int32_t*)((char*)this + 0x30) == 1))
0056bde0              ClientCombatSystem::HidePowerBar(((char*)this - 4));
0056bdc6      }
0056bdc6      
0056bdec      if (ACCWeenieObject::selectedID == 0)
0056bdec      {
0056bdee          uint32_t eax_3;
0056bdee          eax_3 = *(uint8_t*)((char*)this->requestedAttackPower)[2];
0056bdee          
0056bdf3          if (eax_3 == 0)
0056bdf3          {
0056bdfc              int32_t eax_4;
0056bdfc              eax_4 = this->jump_pending;
0056bdfc              *(uint8_t*)((char*)eax_4)[1] = this->m_bTrackingTarget;
0056bdfc              
0056be07              if (((eax_4 == 2 || eax_4 == 4) && PlayerModule::AutoTarget(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0))
0056be1e                  /* tailcall */
0056be1e                  return ClientCombatSystem::AutoTarget(((char*)this - 4));
0056bdf3          }
0056bdf3          else
0056bdf5              *(uint8_t*)((char*)this->requestedAttackPower)[2] = 0;
0056bdec      }
0056bd80  }

0056be23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0056be30  void __fastcall ClientCombatSystem::SetCombatMode(class ClientCombatSystem* this, enum COMBAT_MODE arg2, uint8_t arg3)

0056be30  {
0056be30      class ClientCombatSystem* __return = this;
0056be35      enum COMBAT_MODE combatMode = this->combatMode;
0056be39      enum COMBAT_MODE edi = arg2;
0056be3f      enum COMBAT_MODE combatMode_3 = combatMode;
0056be3f      
0056be41      if (edi != combatMode)
0056be41      {
0056be47          combatMode = arg3;
0056be47          
0056be4d          if (combatMode == 0)
0056be4d          {
0056bf2d          label_56bf2d:
0056bf2d              this->combatMode = edi;
0056bf37              ClientUISystem::UpdateCursorState(ClientUISystem::GetUISystem());
0056bf37              
0056bf41              if (this->m_bTrackingTarget != 0)
0056bf45                  ClientCombatSystem::UpdateTargetTracking(this);
0056bf45              
0056bf50              if (arg3 != 0)
0056bf56                  CM_Combat::Event_ChangeCombatMode(this->combatMode);
0056bf56              
0056bf66              uint8_t eax_13 = PlayerModule::AdvancedCombatUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0056bf6b              enum COMBAT_MODE combatMode_2 = this->combatMode;
0056bf6f              this->m_bAdvancedCombatMode = eax_13;
0056bf72              CM_Combat::SendNotice_SetCombatMode(combatMode_2);
0056bf81              ClientCombatSystem::RegisterInputMaps(this, this->combatMode, combatMode_3);
0056bf86              enum COMBAT_MODE combatMode_1 = this->combatMode;
0056bf86              
0056bf91              if ((combatMode_1 == MELEE_COMBAT_MODE || combatMode_1 == MISSILE_COMBAT_MODE))
0056bf91              {
0056bf94                  uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0056bf9c                  uint32_t eax_15 = ClientCombatSystem::GetAttackTarget(this);
0056bfa3                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056bfaa                  uint32_t player_id;
0056bfaa                  
0056bfaa                  if (SmartBox::smartbox_1 == 0)
0056bfb4                      player_id = 0;
0056bfaa                  else
0056bfac                      player_id = SmartBox::smartbox_1->player_id;
0056bfac                  
0056bfb8                  if (ACCWeenieObject::selectedID_1 != player_id)
0056bfb8                  {
0056bfc4                      if (ClientCombatSystem::ObjectIsAttackable(this, eax_15) == 0)
0056bfc4                      {
0056bfc6                          int32_t var_18_7 = 0;
0056bfd3                          ACCWeenieObject::SetSelectedObject(0, 0);
0056bfc4                      }
0056bfc4                      else if (ACCWeenieObject::selectedID_1 != eax_15)
0056bfce                      {
0056bfd0                          int32_t var_18_8 = 0;
0056bfd3                          ACCWeenieObject::SetSelectedObject(eax_15, 0);
0056bfce                      }
0056bfb8                  }
0056bfb8                  
0056bfeb                  if (PlayerModule::AutoTarget(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0)
0056bfeb                  {
0056bfef                      uint32_t eax_19 = ClientCombatSystem::GetAttackTarget(this);
0056bff6                      uint8_t eax_21;
0056bff6                      
0056bff6                      if (eax_19 != 0)
0056c002                          eax_21 = ClientCombatSystem::ObjectIsAttackable(this, ClientCombatSystem::GetAttackTarget(this));
0056c002                      
0056c009                      if ((eax_19 == 0 || eax_21 == 0))
0056c00d                          ClientCombatSystem::AutoTarget(this);
0056bfeb                  }
0056bf91              }
0056bf91              
0056c019              if (APIManager::APIIsReady() != 0)
0056c019              {
0056c01b                  struct IACPlugin* eax_23 = APIManager::GetACPlugin();
0056c025                  eax_23->vtable->OnCombatModeChange(eax_23, combatMode_3, this->combatMode, ((uint32_t)arg3));
0056c019              }
0056be4d          }
0056be4d          else
0056be4d          {
0056be5b              uint8_t* var_20_1;
0056be5b              
0056be5b              if (ClientCombatSystem::CompatibleCombatMode(this, edi) != 0)
0056be5b              {
0056bee4                  if (CPlayerSystem::GetPlayerSystem()->teleportInProgress == 0)
0056bee4                  {
0056bf21                      if (ClientCombatSystem::PlayerInReadyPosition(this, 0) != 0)
0056bf21                          goto label_56bf2d;
0056bf21                      
0056bf23                      this->pendingCombatMode = edi;
0056bf2a                      return;
0056bee4                  }
0056bee4                  
0056beef                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, &ClientCombatSystem::`vftable'.RecvNotice_AddCharacterTitle);
0056bef4                  int32_t __saved_ebp_6 = 0;
0056bef6                  int32_t var_18_4 = 1;
0056bef8                  int32_t var_1c_3 = 0x1a;
0056befe                  var_20_1 = &arg3;
0056bf01              label_56bf01:
0056bf01                  ClientSystem::AddTextToScroll(this, var_20_1, 0x1a, 1, 0);
0056bf0a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056bf13                  return;
0056be5b              }
0056be5b              
0056be6b              class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(CPlayerSystem::GetPlayerSystem()->m_invSlotModule.weaponReadySlot->m_itemID);
0056be6b              
0056be77              if (eax_4 != 0)
0056be77              {
0056be98                  char (* edi_2)[0x1] = &CombatEnumMapper::CombatModeToString(&arg2, edi)->m_buffer->m_data;
0056bea2                  class PSRefBufferCharData<unsigned short>* __saved_ebp_4 = ACCWeenieObject::GetObjectNameWide(eax_4, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0056bea3                  char (* var_18_2)[0x1] = edi_2;
0056beb0                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, Formatted, &ClientCombatSystem::`vftable'.RecvNotice_FillComponentBuyList);
0056bebc                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
0056bec5                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0056beca                  int32_t __saved_ebp_5 = 0;
0056becc                  int32_t var_18_3 = 1;
0056bece                  int32_t var_1c_2 = 0x1a;
0056bed4                  var_20_1 = &arg3;
0056bed5                  goto label_56bf01;
0056be77              }
0056be4d          }
0056be41      }
0056be30  }

0056c038                                                                          90 90 90 90 90 90 90 90                          ........

0056c040  void __fastcall ClientCombatSystem::StartAttackRequest(class ClientCombatSystem* this)

0056c040  {
0056c040      class ClientCombatSystem* this_1 = this;
0056c044      uint32_t eax = ClientCombatSystem::GetAttackTarget(this);
0056c04e      uint8_t eax_1;
0056c04e      
0056c04e      if ((this->m_bAdvancedCombatMode == 0 && eax != 0))
0056c057          eax_1 = ClientCombatSystem::ObjectIsAttackable(this, eax);
0056c057      
0056c05e      if ((this->m_bAdvancedCombatMode != 0 || (eax != 0 && eax_1 != 0)))
0056c05e      {
0056c0a4          this->attackRequestInProgress = 1;
0056c0a8          this->requestedAttackPower = 1f;
0056c0af          SmartBox::smartbox->cmdinterp->vtable->FinishJump();
0056c0bf          SmartBox::smartbox->cmdinterp->vtable->MaybeStopCompletely();
0056c0d4          this->currentBuildIsAutomatic = 0;
0056c0d8          ClientCombatSystem::AttemptStartBuildingAttack(this);
0056c05e      }
0056c05e      else
0056c05e      {
0056c069          PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, &ClientCombatSystem::`vftable'.RecvNotice_EndPendingInPlayer);
0056c07b          ClientSystem::AddTextToScroll(this, &this_1, 0x1a, 1, 0);
0056c084          void* __offset(ClientCombatSystem, -0x14) esi_2 = ((char*)this_1 - 0x14);
0056c084          
0056c097          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0056c09f              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0056c05e      }
0056c040  }


0056c0e0  void __thiscall ClientCombatSystem::EndAttackRequest(class ClientCombatSystem* this, enum ATTACK_HEIGHT arg2, float arg3)

0056c0e0  {
0056c0e0      class ClientCombatSystem* this_1 = this;
0056c0e0      
0056c0e9      if (this->attackRequestInProgress != 0)
0056c0e9      {
0056c0ef          this->attackRequestInProgress = 0;
0056c0f3          class ClientCombatSystem* eax_1;
0056c0f3          long double st0_1;
0056c0f3          eax_1 = ClientCombatSystem::GetPowerBarLevel(this);
0056c0f8          this_1 = ((float)st0_1);
0056c0fc          long double x87_r7_2 = ((long double)arg3);
0056c100          long double temp1_1 = ((long double)-1f);
0056c100          (x87_r7_2 - temp1_1);
0056c106          eax_1 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0056c108          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0056c108          
0056c10b          if (p_1)
0056c142              this->requestedAttackPower = arg3;
0056c10b          else
0056c10b          {
0056c10d              eax_1 = this->m_bAdvancedCombatMode;
0056c10d              
0056c112              if (eax_1 != 0)
0056c139                  this->requestedAttackPower = this_1;
0056c112              else
0056c112              {
0056c114                  long double x87_r7_3 = ((long double)this->m_rUIRequestedPower);
0056c117                  arg3 = ((float)x87_r7_3);
0056c11b                  (x87_r7_3 - ((long double)this_1));
0056c121                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0056c124                  class ClientCombatSystem** eax_2 = &this_1;
0056c124                  
0056c128                  if (p_2)
0056c12a                      eax_2 = &arg3;
0056c12a                  
0056c130                  this->requestedAttackPower = *(uint32_t*)eax_2;
0056c112              }
0056c10b          }
0056c10b          
0056c145          eax_1 = this->attackServerResponsePending;
0056c145          
0056c14a          if (eax_1 != 0)
0056c14a          {
0056c14c              float requestedAttackPower = this->requestedAttackPower;
0056c14f              this->attackWhenResponseReceived = 1;
0056c153              this->attackWhenResponseReceived_Power = requestedAttackPower;
0056c158              return;
0056c14a          }
0056c14a          
0056c15b          eax_1 = this->m_bAdvancedCombatMode;
0056c15b          
0056c160          if (eax_1 != 0)
0056c160          {
0056c181          label_56c181:
0056c181              ClientCombatSystem::ExecuteAttack(this, arg2, 1);
0056c186              int16_t eax_3;
0056c186              eax_3 = this->m_bAdvancedCombatMode;
0056c186              
0056c18b              if (eax_3 == 0)
0056c18b              {
0056c18d                  long double x87_r7_5 = ((long double)this->requestedAttackPower);
0056c190                  long double temp4_1 = ((long double)this->m_rUIRequestedPower);
0056c190                  (x87_r7_5 - temp4_1);
0056c190                  
0056c198                  if ((*(uint8_t*)((char*)((((x87_r7_5 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0056c198                  {
0056c19f                      this->requestedAttackPower = this->m_rUIRequestedPower;
0056c1a5                      ClientCombatSystem::ExecuteAttack(this, arg2, 1);
0056c198                  }
0056c18b              }
0056c160          }
0056c160          else
0056c160          {
0056c162              long double x87_r7_4 = ((long double)this->m_rUIRequestedPower);
0056c165              long double temp3_1 = ((long double)this_1);
0056c165              (x87_r7_4 - temp3_1);
0056c169              eax_1 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0056c169              
0056c16e              if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) != 0)
0056c16e                  goto label_56c181;
0056c16e              
0056c170              eax_1 = this->repeatAttacking;
0056c170              
0056c175              if (eax_1 != 0)
0056c175                  goto label_56c181;
0056c160          }
0056c0e9      }
0056c0e0  }


0056c1b0  void __thiscall ClientCombatSystem::OnQualityChanged(class ClientCombatSystem* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

0056c1b0  {
0056c1d2      if (CBaseQualities::InqInt((*(int32_t*)((char*)arg2 + 0x14c) + 0x38), 0x28, &arg2, 0, 0) != 0)
0056c1d2      {
0056c1d4          enum COMBAT_MODE edx_1 = arg2;
0056c1d8          int32_t var_8_1 = 0;
0056c1de          ClientCombatSystem::SetCombatMode(((char*)this - 0xc), edx_1, edx_1);
0056c1d2      }
0056c1b0  }

0056c1e7                       90 90 90 90 90 90 90 90 90                                                         .........

0056c1f0  void __fastcall ClientCombatSystem::UseTime(class ClientCombatSystem* this)

0056c1f0  {
0056c1f0      class ClientCombatSystem* this_1 = this;
0056c1f0      
0056c1fc      if (this->buildInProgress != 0)
0056c1fc      {
0056c207          this_1 = ((float)ClientCombatSystem::GetPowerBarLevel(this));
0056c20b          enum PowerBarMode powerBarMode = this->powerBarMode;
0056c20b          
0056c210          if (powerBarMode > PBM_UNDEF)
0056c210          {
0056c219              if (powerBarMode <= PBM_ADVANCED_COMBAT)
0056c219              {
0056c240                  if (ClientCombatSystem::PlayerInReadyPosition(this, 1) == 0)
0056c240                  {
0056c2b0                      if (PlayerModule::AutoRepeatAttack(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0)
0056c2b0                      {
0056c2b2                          CM_Combat::Event_CancelAttack();
0056c2b7                          this->repeatAttacking = 0;
0056c2b0                      }
0056c2b0                      
0056c2bf                      if (this->attackRequestInProgress == 0)
0056c2d2                          ClientCombatSystem::HidePowerBar(this);
0056c2bf                      else
0056c2bf                      {
0056c2c2                          this->buildInProgress = 0;
0056c2c5                          this->buildStartTime = 0f;
0056c2c8                          *(uint32_t*)((char*)this->buildStartTime)[4] = 0;
0056c2cb                          ClientCombatSystem::SetPowerBarLevel(this, 0f);
0056c2bf                      }
0056c240                  }
0056c240                  else
0056c240                  {
0056c24a                      long double x87_r7_2;
0056c24a                      long double temp0_1;
0056c24a                      
0056c24a                      if ((this->attackRequestInProgress == 0 && this->m_bAdvancedCombatMode == 0))
0056c24a                      {
0056c24c                          x87_r7_2 = ((long double)this_1);
0056c253                          temp0_1 = ((long double)this->requestedAttackPower);
0056c253                          (x87_r7_2 - temp0_1);
0056c24a                      }
0056c24a                      
0056c25a                      if (((this->attackRequestInProgress != 0 || this->m_bAdvancedCombatMode != 0) || (*(uint8_t*)((char*)((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0))
0056c29a                          ClientCombatSystem::SetPowerBarLevel(this, this_1);
0056c25a                      else
0056c25a                      {
0056c26f                          ClientCombatSystem::SetPowerBarLevel(this, *(uint32_t*)_STL::min(&this->requestedAttackPower, &this_1));
0056c26f                          
0056c277                          if (this->currentBuildIsAutomatic == 0)
0056c28c                              ClientCombatSystem::ExecuteAttack(this, this->requestedAttackHeight, 1);
0056c277                          else
0056c277                          {
0056c279                              this->buildInProgress = 0;
0056c27c                              this->buildStartTime = 0f;
0056c27f                              *(uint32_t*)((char*)this->buildStartTime)[4] = 0;
0056c277                          }
0056c25a                      }
0056c240                  }
0056c219              }
0056c219              else if (powerBarMode == PBM_JUMP)
0056c22b                  ClientCombatSystem::SetPowerBarLevel(this, this_1);
0056c210          }
0056c1fc      }
0056c1fc      
0056c2e4      if ((this->attackRequestInProgress != 0 && (this->buildInProgress == 0 && this->attackServerResponsePending == 0)))
0056c2e8          ClientCombatSystem::AttemptStartBuildingAttack(this);
0056c2e8      
0056c2f0      if (this->pendingCombatMode != UNDEF_COMBAT_MODE)
0056c2f0      {
0056c2f5          uint8_t eax_7;
0056c2f5          enum COMBAT_MODE edx_2;
0056c2f5          eax_7 = ClientCombatSystem::PlayerInReadyPosition(this, 0);
0056c2f5          
0056c2fc          if (eax_7 != 0)
0056c2fc          {
0056c301              int32_t var_10_5 = 1;
0056c306              ClientCombatSystem::SetCombatMode(this, edx_2, ((int8_t)this->pendingCombatMode));
0056c30b              this->pendingCombatMode = UNDEF_COMBAT_MODE;
0056c2fc          }
0056c2f0      }
0056c1f0  }

0056c312                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0056c320  int32_t __thiscall ClientCombatSystem::HandlePlayerDeathEvent(class ClientCombatSystem* this, void* arg2, uint32_t arg3)

0056c320  {
0056c320      class ClientCombatSystem* var_4 = this;
0056c321      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056c32c      uint32_t player_id;
0056c32c      
0056c32c      if (SmartBox::smartbox_1 == 0)
0056c336          player_id = 0;
0056c32c      else
0056c32e          player_id = SmartBox::smartbox_1->player_id;
0056c32e      
0056c338      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056c33d      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0056c345      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0056c345      
0056c360      if (AC1Legacy::PStringBase<char>::UnPack(&var_4, &arg2, arg3) == 0)
0056c360      {
0056c362          class ClientCombatSystem* esi = var_4;
0056c362          
0056c376          if ((InterlockedDecrement(&esi->vtable) == 0 && esi != 0))
0056c378              esi->vtable->__vecDelDtor(1);
0056c378          
0056c385          return 0;
0056c360      }
0056c360      
0056c388      void* eax_6 = arg2;
0056c397      class ClientCombatSystem* esi_1;
0056c397      
0056c397      if ((player_id == *(uint32_t*)eax_6 || player_id == *(uint32_t*)((char*)eax_6 + 4)))
0056c3df          esi_1 = var_4;
0056c397      else
0056c397      {
0056c399          esi_1 = var_4;
0056c399          
0056c3a1          if (esi_1->vtable != 1)
0056c3a1          {
0056c3ac              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794508);
0056c3ba              AC1Legacy::PStringBase<char>::operator+=(&var_4, &arg2);
0056c3c3              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
0056c3c8              esi_1 = var_4;
0056c3d8              ClientSystem::AddTextToScroll(this, &esi_1->m_cTurbineRefCount.m_cRef, 0, 1, 0);
0056c3a1          }
0056c397      }
0056c397      
0056c3f3      if ((InterlockedDecrement(&esi_1->vtable) == 0 && esi_1 != 0))
0056c3f5          esi_1->vtable->__vecDelDtor(1);
0056c3f5      
0056c405      return 1;
0056c320  }

0056c408                          90 90 90 90 90 90 90 90                                                          ........

0056c410  int32_t __fastcall ClientCombatSystem::HandleKillerNotificationEvent(class ClientCombatSystem* this, void* arg2, uint32_t arg3)

0056c410  {
0056c410      class ClientCombatSystem* var_4 = this;
0056c411      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056c417      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0056c422      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0056c422      
0056c43d      if (AC1Legacy::PStringBase<char>::UnPack(&var_4, &arg2, arg3) == 0)
0056c43d      {
0056c43f          class ClientCombatSystem* esi_1 = var_4;
0056c43f          
0056c453          if ((InterlockedDecrement(&esi_1->vtable) == 0 && esi_1 != 0))
0056c455              esi_1->vtable->__vecDelDtor(1);
0056c455          
0056c462          return 0;
0056c43d      }
0056c43d      
0056c46d      class ClientCombatSystem* edi = var_4;
0056c46d      
0056c475      if (edi->vtable != 1)
0056c475      {
0056c480          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, &data_794508);
0056c485          uint32_t esi_2 = arg3;
0056c489          int32_t eax_6 = *(uint32_t*)(esi_2 + 8);
0056c489          
0056c497          if ((eax_6 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0056c497          {
0056c4a3              AC1Legacy::PStringBase<char>::append_n_chars(&var_4, (esi_2 + 0x14), (eax_6 - 1));
0056c4a8              edi = var_4;
0056c497          }
0056c497          
0056c4b4          if (InterlockedDecrement((esi_2 + 4)) == 0)
0056c4bc              **(uint32_t**)esi_2(1);
0056c4bc          
0056c4ca          ClientSystem::AddTextToScroll(this, &edi->m_cTurbineRefCount.m_cRef, 0, 1, 0);
0056c475      }
0056c475      
0056c4db      if ((InterlockedDecrement(&edi->vtable) == 0 && edi != 0))
0056c4dd          edi->vtable->__vecDelDtor(1);
0056c4dd      
0056c4ef      return 1;
0056c410  }

0056c4f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0056c500  void __thiscall ClientCombatSystem::HandleAttackDoneEvent(class ClientCombatSystem* this, uint32_t const arg2)

0056c500  {
0056c50b      if (this->attackInProgress != 0)
0056c50b      {
0056c514          ClientUISystem::DecrementBusyCount(ClientUISystem::GetUISystem());
0056c519          this->attackInProgress = 0;
0056c50b      }
0056c50b      
0056c520      this->attackServerResponsePending = 0;
0056c523      ACCWeenieObject::attackInProgress = 0;
0056c523      
0056c52e      if ((arg2 != 0 && this->repeatAttacking != 0))
0056c532          ClientCombatSystem::AbortAutomaticAttack(this);
0056c532      
0056c53f      if (((this->attackRequestInProgress == 0 && this->m_bAdvancedCombatMode == 0) && (PlayerModule::AutoRepeatAttack(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0 && this->repeatAttacking != 0)))
0056c53f      {
0056c55d          long double x87_r7_3 = fabsl((((long double)this->requestedAttackPower) - ((long double)this->m_rUIRequestedPower)));
0056c55f          long double temp1_1 = ((long double)0.00999999978f);
0056c55f          (x87_r7_3 - temp1_1);
0056c55f          
0056c56a          if ((*(uint8_t*)((char*)((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
0056c56a          {
0056c56c              enum ATTACK_HEIGHT requestedAttackHeight = this->requestedAttackHeight;
0056c576              this->requestedAttackPower = this->m_rUIRequestedPower;
0056c579              ClientCombatSystem::ExecuteAttack(this, requestedAttackHeight, 0);
0056c56a          }
0056c53f      }
0056c53f      
0056c592      if ((PlayerModule::AutoRepeatAttack(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0 || this->repeatAttacking == 0))
0056c592      {
0056c5a6          enum PowerBarMode powerBarMode = this->powerBarMode;
0056c5ac          this->repeatAttacking = 0;
0056c5ac          
0056c5af          if (powerBarMode != PBM_JUMP)
0056c5af          {
0056c5b4              this->buildInProgress = 0;
0056c5b7              this->buildStartTime = 0f;
0056c5ba              *(uint32_t*)((char*)this->buildStartTime)[4] = 0;
0056c5ba              
0056c5bd              if (powerBarMode != PBM_COMBAT)
0056c5cc                  CM_Character::SendNotice_FinishPowerbar(powerBarMode);
0056c5bd              else
0056c5c1                  CM_Character::SendNotice_SetPowerbarLevel(powerBarMode, 0f);
0056c5c1              
0056c5d4              this->powerBarMode = PBM_UNDEF;
0056c5af          }
0056c5af          
0056c5af          goto label_56c5d7;
0056c592      }
0056c592      
0056c597      if (this->attackRequestInProgress != 0)
0056c597      {
0056c5dc      label_56c5dc:
0056c5dc          
0056c5e4          if ((this->buildInProgress == 0 && this->attackServerResponsePending == 0))
0056c5e8              ClientCombatSystem::AttemptStartBuildingAttack(this);
0056c597      }
0056c597      else
0056c597      {
0056c59b          ClientCombatSystem::StartPowerBarBuild(this);
0056c5a0          this->currentBuildIsAutomatic = 1;
0056c5d7      label_56c5d7:
0056c5d7          
0056c5da          if (this->attackRequestInProgress != 0)
0056c5da              goto label_56c5dc;
0056c597      }
0056c597      
0056c5f0      if (this->attackWhenResponseReceived != 0)
0056c5f0      {
0056c5f4          ClientCombatSystem::StartAttackRequest(this);
0056c603          ClientCombatSystem::EndAttackRequest(this, this->requestedAttackHeight, this->attackWhenResponseReceived_Power);
0056c608          this->attackWhenResponseReceived = 0;
0056c60b          this->attackWhenResponseReceived_Power = 0f;
0056c5f0      }
0056c500  }

0056c613                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0056c620  void __fastcall ClientCombatSystem::HandleEvasionDefenderNotificationEvent(class ClientCombatSystem* this, class AC1Legacy::PStringBase<char> const* arg2)

0056c620  {
0056c630      class AC1Legacy::PStringBase<char> var_8;
0056c630      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &ClientCombatSystem::`vftable'.RecvNotice_UserPreferenceChanged);
0056c639      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
0056c63b      uint32_t m_len = m_buffer->m_len;
0056c63b      
0056c649      if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
0056c655          AC1Legacy::PStringBase<char>::append_n_chars(&var_8, &m_buffer->m_data, (m_len - 1));
0056c655      
0056c667      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &ClientCombatSystem::`vftable'.RecvNotice_UpdateToolbarSelectionDisplay);
0056c66c      class AC1Legacy::PStringBase<char>* esi = arg2;
0056c670      int32_t eax_2 = *(int32_t*)((char*)esi + 8);
0056c670      
0056c67e      if ((eax_2 != 1 && esi != AC1Legacy::PStringBase<char>::s_NullBuffer))
0056c68a          AC1Legacy::PStringBase<char>::append_n_chars(&var_8, &esi[5], (eax_2 - 1));
0056c68a      
0056c69d      if (InterlockedDecrement(&esi[1]) == 0)
0056c69f          esi->m_buffer->vtable(1);
0056c69f      
0056c6b0      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_7928af);
0056c6be      int32_t eax_6 = gmCCommunicationSystem::IsSquelched(0, &arg2, 6);
0056c6c3      class AC1Legacy::PStringBase<char>* esi_1 = arg2;
0056c6cc      char ebx_1 = ((int8_t)-(eax_6));
0056c6cc      
0056c6de      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0056c6e0          esi_1->m_buffer->vtable(1);
0056c6e0      
0056c6ea      class AC1Legacy::PStringBase<char> edi = var_8;
0056c6ee      class ClientCombatSystem* this_1;
0056c6ee      
0056c6ee      if ((ebx_1 - ebx_1) == 0xff)
0056c734          this_1 = this;
0056c6ee      else
0056c6ee      {
0056c6fa          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, (edi + 0x14));
0056c6ff          this_1 = this;
0056c710          ClientSystem::AddTextToScroll(this_1, &arg2, 0x15, 1, 0);
0056c719          void* __offset(AC1Legacy::PStringBase<char>, -0x14) esi_3 = &arg2[-5];
0056c719          
0056c728          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0056c730              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0056c6ee      }
0056c6ee      
0056c743      this_1->lastAttackedTime = (*(uint32_t*)Timer::cur_time);
0056c746      enum COMBAT_MODE combatMode = this_1->combatMode;
0056c74c      *(uint32_t*)((char*)this_1->lastAttackedTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0056c74c      
0056c754      if (((combatMode == MELEE_COMBAT_MODE || combatMode == MISSILE_COMBAT_MODE) && (PlayerModule::AutoTarget(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0 && ACCWeenieObject::selectedID == 0)))
0056c772          ClientCombatSystem::AutoTarget(this_1);
0056c772      
0056c783      if ((InterlockedDecrement((edi + 4)) == 0 && edi != 0))
0056c78b          **(uint32_t**)edi(1);
0056c620  }

0056c797                                                                       90 90 90 90 90 90 90 90 90                         .........

0056c7a0  void __thiscall ClientCombatSystem::HandleEvasionAttackerNotificationEvent(class ClientCombatSystem* this, class AC1Legacy::PStringBase<char> const* arg2)

0056c7a0  {
0056c7aa      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
0056c7b4      arg2 = m_buffer;
0056c7b8      InterlockedIncrement(&m_buffer->m_cRef);
0056c7c7      int32_t* var_8;
0056c7c7      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &ClientCombatSystem::`vftable'.RecvNotice_CloseVendor);
0056c7cc      int32_t* esi = var_8;
0056c7d0      int32_t eax_1 = esi[2];
0056c7d0      
0056c7de      if ((eax_1 != 1 && esi != AC1Legacy::PStringBase<char>::s_NullBuffer))
0056c7de      {
0056c7ea          AC1Legacy::PStringBase<char>::append_n_chars(&arg2, &esi[5], (eax_1 - 1));
0056c7ef          m_buffer = arg2;
0056c7de      }
0056c7de      
0056c801      if (InterlockedDecrement(&esi[1]) == 0)
0056c809          **(uint32_t**)esi(1);
0056c809      
0056c815      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_7928af);
0056c823      int32_t eax_5 = gmCCommunicationSystem::IsSquelched(0, &arg2, 6);
0056c828      class AC1Legacy::PStringBase<char>* esi_1 = arg2;
0056c831      char ebx_1 = ((int8_t)-(eax_5));
0056c831      
0056c843      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0056c845          esi_1->m_buffer->vtable(1);
0056c845      
0056c850      if ((ebx_1 - ebx_1) != 0xff)
0056c850      {
0056c85c          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &m_buffer->m_data);
0056c870          ClientSystem::AddTextToScroll(this, &arg2, 0x16, 1, 0);
0056c879          void* __offset(AC1Legacy::PStringBase<char>, -0x14) esi_3 = &arg2[-5];
0056c879          
0056c888          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0056c890              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0056c850      }
0056c850      
0056c89e      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0056c8a0          m_buffer->vtable->__vecDelDtor(1);
0056c7a0  }

0056c8b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0056c8c0  void __fastcall ClientCombatSystem::ToggleCombatMode(class ClientCombatSystem* this)

0056c8c0  {
0056c8c7      int32_t var_8 = 1;
0056c8c9      enum COMBAT_MODE edx;
0056c8c9      
0056c8c9      if (this->combatMode != NONCOMBAT_COMBAT_MODE)
0056c8c9      {
0056c8de          ClientCombatSystem::SetCombatMode(this, edx, 1);
0056c8e4          return;
0056c8c9      }
0056c8c9      
0056c8cb      int32_t var_c = 0;
0056c8cd      uint8_t eax;
0056c8cd      enum COMBAT_MODE edx_1;
0056c8cd      eax = ClientCombatSystem::GetDefaultCombatMode(this, edx);
0056c8d5      ClientCombatSystem::SetCombatMode(this, edx_1, eax);
0056c8c0  }

0056c8e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0056c8f0  void __thiscall ClientCombatSystem::SetRequestedAttackHeight(class ClientCombatSystem* this, enum ATTACK_HEIGHT arg2)

0056c8f0  {
0056c8f9      enum ATTACK_HEIGHT edx;
0056c8f9      edx = this->requestedAttackHeight != arg2;
0056c8fe      this->requestedAttackHeight = arg2;
0056c901      enum ATTACK_HEIGHT eax;
0056c901      
0056c901      if (edx == 0)
0056c903          eax = this->attackRequestInProgress;
0056c903      
0056c908      if ((edx != 0 || eax == 0))
0056c90a          ClientCombatSystem::StartAttackRequest(this);
0056c8f0  }

0056c912                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0056c920  void __thiscall ClientCombatSystem::HandleDefenderNotificationEvent(class ClientCombatSystem* this, class AC1Legacy::PStringBase<char> const* arg2, enum DAMAGE_TYPE const arg3, double const arg4, int32_t const arg5, int32_t const arg6, int32_t const arg7, int64_t const arg8)

0056c920  {
0056c928      class AC1Legacy::PStringBase<char> var_1ac = 0;
0056c930      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056c93c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_14 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0056c94c      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0056c94e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056c953      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0056c95b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
0056c95d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056c962      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_12 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0056c96a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
0056c98e      int32_t var_1dc = *(uint32_t*)((char*)arg4)[4];
0056c991      CombatSystem::InqCombatHitAdjectives(arg3, arg4, &AC1Legacy::PStringBase<char>::s_NullBuffer_14, &AC1Legacy::PStringBase<char>::s_NullBuffer_11);
0056c9a1      void var_140;
0056c9a1      AppraisalSystem::DamageTypeToString(arg3, &var_140, 0x40);
0056c9b5      class PStringBase<char> var_1b4;
0056c9b5      PStringBase<char>::PStringBase<char>(&var_1b4, &var_140);
0056c9be      PStringBase<char>::break_reference(&var_1b4);
0056c9c8      _strlwr(var_1b4);
0056c9d5      int32_t ebx = 1;
0056c9df      class AC1Legacy::PStringBase<char> __return_10;
0056c9df      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9;
0056c9df      int32_t __return_43;
0056c9df      class PStringBase<char>* eax_6;
0056c9df      
0056c9df      if (*(uint32_t*)(var_1b4 - 4) != 1)
0056c9df      {
0056c9fa          PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_9, &data_794098);
0056ca0d          ebx = 6;
0056ca12          eax_6 = PStringBase<char>::operator+(&var_1b4, &__return_10, &AC1Legacy::PStringBase<char>::s_NullBuffer_9);
0056c9df      }
0056c9df      else
0056c9ea          eax_6 = PStringBase<char>::PStringBase<char>(&__return_43, &data_7928af);
0056c9ea      
0056ca1d      int32_t* var_1bc = eax_6;
0056ca25      class PStringBase<char> eax_7 = var_1b4;
0056ca25      
0056ca2b      if (eax_7 != *(uint32_t*)var_1bc)
0056ca2b      {
0056ca3c          if ((InterlockedDecrement((eax_7 - 0x10)) == 0 && eax_7 != 0x14))
0056ca44              **(uint32_t**)(eax_7 - 0x14)(1);
0056ca44          
0056ca4a          class PStringBase<char> eax_10 = *(uint32_t*)var_1bc;
0056ca4c          var_1b4 = eax_10;
0056ca54          InterlockedIncrement((eax_10 - 0x10));
0056ca2b      }
0056ca2b      
0056ca59      if ((ebx & 4) != 0)
0056ca59      {
0056ca5f          int32_t* edi_3 = (__return_10 - 0x14);
0056ca66          ebx &= 0xfffffffb;
0056ca66          
0056ca71          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
0056ca79              **(uint32_t**)edi_3(1);
0056ca59      }
0056ca59      
0056ca7e      if ((ebx & 2) != 0)
0056ca7e      {
0056ca84          int32_t* edi_5 = ((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_9 - 0x14);
0056ca8b          ebx &= 0xfffffffd;
0056ca8b          
0056ca96          if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
0056ca9e              **(uint32_t**)edi_5(1);
0056ca7e      }
0056ca7e      
0056caa3      if ((ebx & 1) != 0)
0056caa3      {
0056caa9          int32_t* edi_7 = (__return_43 - 0x14);
0056caa9          
0056cab8          if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
0056cac0              **(uint32_t**)edi_7(1);
0056caa3      }
0056caa3      
0056caca      if (arg5 != 1)
0056cad5          AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_12, &data_794520);
0056cad5      
0056cadc      char var_100 = 0;
0056caf0      void s;
0056caf0      int16_t* edi_8 = __builtin_memset(&s, 0, 0xfc);
0056caf2      *(uint16_t*)edi_8 = 0;
0056caf2      edi_8[1] = 0;
0056caf5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056cafa      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_13 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0056cb02      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
0056cb04      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056cb0e      var_1bc = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
0056cb12      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef);
0056cb29      BodyPartEnumMapper::BodyPartToString(arg6, &var_100, 0x100);
0056cb3d      class AC1Legacy::PStringBase<char> var_158;
0056cb3d      class AC1Legacy::PStringBase<char>* eax_19;
0056cb3d      class AC1Legacy::PStringBase<char>* edx_5;
0056cb3d      eax_19 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_158, &var_100);
0056cb46      class AC1Legacy::PSRefBuffer<char>** var_1d4_23 = &AC1Legacy::PStringBase<char>::s_NullBuffer_13;
0056cb4b      class AC1Legacy::PStringBase<char>* var_1d8_3 = &var_158;
0056cb51      __return_43 = EmapToDisplay::LowerCaseRemoveUnderscores(eax_19, edx_5);
0056cb55      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056cb5a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
0056cb65      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef);
0056cb65      
0056cb70      if (arg7 != 0)
0056cb7b          AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_10, "Critical hit! ");
0056cb7b      
0056cb8e      if (((arg8 & 4) | 0) != 0)
0056cb8e      {
0056cb9e          void* eax_27 = *(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_10, &ClientCombatSystem::`vftable'.RecvNotice_UpdateHouseData);
0056cba0          int32_t ecx_18 = *(uint32_t*)((char*)eax_27 + 8);
0056cba0          
0056cbae          if ((ecx_18 != 1 && eax_27 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0056cbba              AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_10, ((char*)eax_27 + 0x14), (ecx_18 - 1));
0056cbba          
0056cbbf          class AC1Legacy::PStringBase<char> __return_41 = __return_10;
0056cbbf          
0056cbcf          if ((InterlockedDecrement((__return_41 + 4)) == 0 && __return_41 != 0))
0056cbd7              **(uint32_t**)__return_41(1);
0056cb8e      }
0056cb8e      
0056cbe7      if (((arg8 & 2) | 0) != 0)
0056cbe7      {
0056cbf7          void* eax_35 = *(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_10, "Reckless! ");
0056cbf9          int32_t ecx_23 = *(uint32_t*)((char*)eax_35 + 8);
0056cbf9          
0056cc07          if ((ecx_23 != 1 && eax_35 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0056cc13              AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_10, ((char*)eax_35 + 0x14), (ecx_23 - 1));
0056cc13          
0056cc18          class AC1Legacy::PStringBase<char> __return_42 = __return_10;
0056cc18          
0056cc28          if ((InterlockedDecrement((__return_42 + 4)) == 0 && __return_42 != 0))
0056cc30              **(uint32_t**)__return_42(1);
0056cbe7      }
0056cbe7      
0056cc38      class PStringBase<char> eax_39 = var_1b4;
0056cc3d      int32_t* __return_30;
0056cc3d      class AC1Legacy::PSRefBuffer<char>** var_1fc;
0056cc3d      int32_t* var_19c;
0056cc3d      int32_t* __return_11;
0056cc3d      int32_t* __return_12;
0056cc3d      int32_t* __return_13;
0056cc3d      int32_t* __return_14;
0056cc3d      int32_t* var_188;
0056cc3d      int32_t* __return_15;
0056cc3d      int32_t* var_180;
0056cc3d      int32_t* __return_16;
0056cc3d      int32_t* __return_17;
0056cc3d      int32_t* __return_18;
0056cc3d      uint32_t* var_16c;
0056cc3d      class AC1Legacy::PStringBase<char> var_168;
0056cc3d      int32_t* var_164;
0056cc3d      class AC1Legacy::PStringBase<char> __return_19;
0056cc3d      class AC1Legacy::PStringBase<char> var_15c;
0056cc3d      
0056cc3d      if (__return_43 == 0)
0056cc3d      {
0056d024          AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_43, eax_39);
0056d029          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056d02e          AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
0056d036          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef);
0056d044          AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_9, arg5);
0056d050          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->m_buffer;
0056d052          __return_10 = m_buffer_1;
0056d05a          InterlockedIncrement(&m_buffer_1->m_cRef);
0056d065          class AC1Legacy::PStringBase<char>* eax_107 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_188, "damage!");
0056d06f          class AC1Legacy::PStringBase<char>* __return_9 = &var_1ac;
0056d074          class AC1Legacy::PStringBase<char>* var_1dc_3 = &__return_43;
0056d079          class AC1Legacy::PStringBase<char>* __return_7 = &var_168;
0056d083          class AC1Legacy::PStringBase<char>* eax_108 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_19c, " of ");
0056d090          class AC1Legacy::PStringBase<char>* __return_5 = &var_15c;
0056d095          class AC1Legacy::PStringBase<char>* var_1ec_2 = &AC1Legacy::PStringBase<char>::s_NullBuffer_12;
0056d09d          int32_t** __return_3 = &var_164;
0056d0a7          class AC1Legacy::PStringBase<char>* eax_109 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_180, " point");
0056d0b4          class AC1Legacy::PStringBase<char>* __return_1 = &var_16c;
0056d0b9          var_1fc = &AC1Legacy::PStringBase<char>::s_NullBuffer_9;
0056d0ce          class AC1Legacy::PStringBase<char>* eax_110 = AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_19, " for ");
0056d0e8          class AC1Legacy::PStringBase<char>* eax_111 = AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_17, " you");
0056d10f          class AC1Legacy::PStringBase<char>* eax_112 = AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_13, &data_794098);
0056d154          class AC1Legacy::PStringBase<char>* eax_118 = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(&AC1Legacy::PStringBase<char>::s_NullBuffer_10, &__return_11, &__return_10), &__return_12, eax_112), &__return_14, &AC1Legacy::PStringBase<char>::s_NullBuffer_11), &__return_15, eax_111), &__return_16, eax_110), &__return_18, var_1fc);
0056d177          class AC1Legacy::PStringBase<char>* eax_123 = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(eax_118, __return_1, eax_109), __return_3, var_1ec_2), __return_5, eax_108), __return_7, var_1dc_3), __return_9, eax_107);
0056d177          
0056d180          if (AC1Legacy::PStringBase<char>::s_NullBuffer_8 != eax_123->m_buffer)
0056d180          {
0056d18e              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
0056d190                  AC1Legacy::PStringBase<char>::s_NullBuffer_8->vtable->__vecDelDtor(1);
0056d190              
0056d198              class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = eax_123->m_buffer;
0056d19a              var_1bc = m_buffer_3;
0056d1a2              InterlockedIncrement(&m_buffer_3->m_cRef);
0056d180          }
0056d180          
0056d1a4          class AC1Legacy::PStringBase<char> esi_9 = var_1ac;
0056d1a4          
0056d1b4          if ((InterlockedDecrement((esi_9 + 4)) == 0 && esi_9 != 0))
0056d1bc              **(uint32_t**)esi_9(1);
0056d1bc          
0056d1be          class AC1Legacy::PStringBase<char> esi_10 = var_168;
0056d1be          
0056d1ce          if ((InterlockedDecrement((esi_10 + 4)) == 0 && esi_10 != 0))
0056d1d6              **(uint32_t**)esi_10(1);
0056d1d6          
0056d1d8          class AC1Legacy::PStringBase<char> esi_11 = var_15c;
0056d1d8          
0056d1e8          if ((InterlockedDecrement((esi_11 + 4)) == 0 && esi_11 != 0))
0056d1f0              **(uint32_t**)esi_11(1);
0056d1f0          
0056d1f2          int32_t* esi_12 = var_164;
0056d1f2          
0056d202          if ((InterlockedDecrement(&esi_12[1]) == 0 && esi_12 != 0))
0056d20a              **(uint32_t**)esi_12(1);
0056d20a          
0056d20c          uint32_t* esi_13 = var_16c;
0056d20c          
0056d21c          if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
0056d224              *(uint32_t*)ADJ(esi_13)->m_cRef(1);
0056d224          
0056d226          int32_t* __return_31 = __return_18;
0056d226          
0056d236          if ((InterlockedDecrement(&__return_31[1]) == 0 && __return_31 != 0))
0056d23e              **(uint32_t**)__return_31(1);
0056d23e          
0056d240          int32_t* __return_32 = __return_16;
0056d240          
0056d250          if ((InterlockedDecrement(&__return_32[1]) == 0 && __return_32 != 0))
0056d258              **(uint32_t**)__return_32(1);
0056d258          
0056d25a          int32_t* __return_33 = __return_15;
0056d25a          
0056d26a          if ((InterlockedDecrement(&__return_33[1]) == 0 && __return_33 != 0))
0056d272              **(uint32_t**)__return_33(1);
0056d272          
0056d274          int32_t* __return_34 = __return_14;
0056d274          
0056d284          if ((InterlockedDecrement(&__return_34[1]) == 0 && __return_34 != 0))
0056d28c              **(uint32_t**)__return_34(1);
0056d28c          
0056d28e          int32_t* __return_35 = __return_12;
0056d28e          
0056d29e          if ((InterlockedDecrement(&__return_35[1]) == 0 && __return_35 != 0))
0056d2a6              **(uint32_t**)__return_35(1);
0056d2a6          
0056d2a8          int32_t* __return_36 = __return_11;
0056d2a8          
0056d2b8          if ((InterlockedDecrement(&__return_36[1]) == 0 && __return_36 != 0))
0056d2c0              **(uint32_t**)__return_36(1);
0056d2c0          
0056d2c2          class AC1Legacy::PStringBase<char> __return_37 = __return_10;
0056d2c2          
0056d2d2          if ((InterlockedDecrement((__return_37 + 4)) == 0 && __return_37 != 0))
0056d2da              **(uint32_t**)__return_37(1);
0056d2da          
0056d2dc          int32_t* __return_38 = __return_13;
0056d2dc          
0056d2ec          if ((InterlockedDecrement(&__return_38[1]) == 0 && __return_38 != 0))
0056d2f4              **(uint32_t**)__return_38(1);
0056d2f4          
0056d2f6          int32_t* __return_39 = __return_17;
0056d2f6          
0056d306          if ((InterlockedDecrement(&__return_39[1]) == 0 && __return_39 != 0))
0056d30e              **(uint32_t**)__return_39(1);
0056d30e          
0056d310          class AC1Legacy::PStringBase<char> __return_40 = __return_19;
0056d310          
0056d320          if ((InterlockedDecrement((__return_40 + 4)) == 0 && __return_40 != 0))
0056d328              **(uint32_t**)__return_40(1);
0056d328          
0056d32a          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_17 = AC1Legacy::PStringBase<char>::s_NullBuffer_9;
0056d32a          
0056d33a          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_17->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_17 != 0))
0056d33c              AC1Legacy::PStringBase<char>::s_NullBuffer_17->vtable->__vecDelDtor(1);
0056d33c          
0056d344          int32_t* esi_14 = var_180;
0056d344          
0056d354          if ((InterlockedDecrement(&esi_14[1]) == 0 && esi_14 != 0))
0056d35c              **(uint32_t**)esi_14(1);
0056d35c          
0056d35e          int32_t* esi_15 = var_19c;
0056d35e          
0056d36e          if ((InterlockedDecrement(&esi_15[1]) == 0 && esi_15 != 0))
0056d376              **(uint32_t**)esi_15(1);
0056d376          
0056d378          int32_t* esi_16 = var_188;
0056d378          
0056d388          if ((InterlockedDecrement(&esi_16[1]) == 0 && esi_16 != 0))
0056d390              **(uint32_t**)esi_16(1);
0056d390          
0056d392          __return_30 = __return_43;
0056cc3d      }
0056cc3d      else
0056cc3d      {
0056cc47          AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_10, eax_39);
0056cc4c          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056cc51          AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
0056cc59          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef);
0056cc67          AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_9, arg5);
0056cc6c          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_15 = AC1Legacy::PStringBase<char>::s_NullBuffer_13;
0056cc70          __return_43 = AC1Legacy::PStringBase<char>::s_NullBuffer_15;
0056cc78          var_16c = &AC1Legacy::PStringBase<char>::s_NullBuffer_15->m_cRef;
0056cc7c          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_15->m_cRef);
0056cc85          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
0056cc87          class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = m_buffer;
0056cc92          InterlockedIncrement(&m_buffer->m_cRef);
0056cc9d          class AC1Legacy::PStringBase<char>* eax_43 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1ac, "damage!");
0056ccaa          int32_t* var_148;
0056ccaa          int32_t* __return_8 = &var_148;
0056ccaf          class AC1Legacy::PStringBase<char>* var_1dc_2 = &__return_10;
0056ccb7          int32_t* var_144;
0056ccb7          int32_t* __return_6 = &var_144;
0056ccc1          class AC1Legacy::PStringBase<char>* eax_44 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_168, " of ");
0056cccb          int32_t* __return_4 = &var_188;
0056ccd0          class AC1Legacy::PSRefBuffer<char>** var_1ec_1 = &AC1Legacy::PStringBase<char>::s_NullBuffer_12;
0056ccd5          int32_t* __return_2 = &var_19c;
0056cce2          class AC1Legacy::PStringBase<char>* eax_45 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_15c, " point");
0056ccec          int32_t* __return = &var_180;
0056ccf1          var_1fc = &AC1Legacy::PStringBase<char>::s_NullBuffer_9;
0056cd06          class AC1Legacy::PStringBase<char>* eax_46 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_164, " for ");
0056cd2a          class AC1Legacy::PStringBase<char>* eax_47 = AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_18, " your ");
0056cd4e          class AC1Legacy::PStringBase<char>* eax_48 = AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_16, &data_794098);
0056cd96          class AC1Legacy::PStringBase<char>* eax_54 = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(&AC1Legacy::PStringBase<char>::s_NullBuffer_10, &__return_15, &m_buffer_4), &__return_14, eax_48), &__return_12, &AC1Legacy::PStringBase<char>::s_NullBuffer_11), &__return_11, eax_47), &__return_13, &__return_43), &__return_17, eax_46);
0056cdc0          class AC1Legacy::PStringBase<char>* eax_60 = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(eax_54, &__return_19, var_1fc), __return, eax_45), __return_2, var_1ec_1), __return_4, eax_44), __return_6, var_1dc_2), __return_8, eax_43);
0056cdc0          
0056cdc9          if (AC1Legacy::PStringBase<char>::s_NullBuffer_8 != eax_60->m_buffer)
0056cdc9          {
0056cdd7              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
0056cdd9                  AC1Legacy::PStringBase<char>::s_NullBuffer_8->vtable->__vecDelDtor(1);
0056cdd9              
0056cde1              class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = eax_60->m_buffer;
0056cde3              var_1bc = m_buffer_2;
0056cdeb              InterlockedIncrement(&m_buffer_2->m_cRef);
0056cdc9          }
0056cdc9          
0056cded          int32_t* esi = var_148;
0056cded          
0056ce00          if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
0056ce08              **(uint32_t**)esi(1);
0056ce08          
0056ce0a          int32_t* esi_1 = var_144;
0056ce0a          
0056ce1d          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0056ce25              **(uint32_t**)esi_1(1);
0056ce25          
0056ce27          int32_t* esi_2 = var_188;
0056ce27          
0056ce37          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056ce3f              **(uint32_t**)esi_2(1);
0056ce3f          
0056ce41          int32_t* esi_3 = var_19c;
0056ce41          
0056ce51          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0056ce59              **(uint32_t**)esi_3(1);
0056ce59          
0056ce5b          int32_t* esi_4 = var_180;
0056ce5b          
0056ce6b          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0056ce73              **(uint32_t**)esi_4(1);
0056ce73          
0056ce75          class AC1Legacy::PStringBase<char> __return_21 = __return_19;
0056ce75          
0056ce85          if ((InterlockedDecrement((__return_21 + 4)) == 0 && __return_21 != 0))
0056ce8d              **(uint32_t**)__return_21(1);
0056ce8d          
0056ce8f          int32_t* __return_22 = __return_17;
0056ce8f          
0056ce9f          if ((InterlockedDecrement(&__return_22[1]) == 0 && __return_22 != 0))
0056cea7              **(uint32_t**)__return_22(1);
0056cea7          
0056cea9          int32_t* __return_23 = __return_13;
0056cea9          
0056ceb9          if ((InterlockedDecrement(&__return_23[1]) == 0 && __return_23 != 0))
0056cec1              **(uint32_t**)__return_23(1);
0056cec1          
0056cec3          int32_t* __return_24 = __return_11;
0056cec3          
0056ced3          if ((InterlockedDecrement(&__return_24[1]) == 0 && __return_24 != 0))
0056cedb              **(uint32_t**)__return_24(1);
0056cedb          
0056cedd          int32_t* __return_25 = __return_12;
0056cedd          
0056ceed          if ((InterlockedDecrement(&__return_25[1]) == 0 && __return_25 != 0))
0056cef5              **(uint32_t**)__return_25(1);
0056cef5          
0056cef7          int32_t* __return_26 = __return_14;
0056cef7          
0056cf07          if ((InterlockedDecrement(&__return_26[1]) == 0 && __return_26 != 0))
0056cf0f              **(uint32_t**)__return_26(1);
0056cf0f          
0056cf11          int32_t* __return_27 = __return_15;
0056cf11          
0056cf21          if ((InterlockedDecrement(&__return_27[1]) == 0 && __return_27 != 0))
0056cf29              **(uint32_t**)__return_27(1);
0056cf29          
0056cf2b          class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = m_buffer_4;
0056cf2b          
0056cf3e          if ((InterlockedDecrement(&m_buffer_5->m_cRef) == 0 && m_buffer_5 != 0))
0056cf40              m_buffer_5->vtable->__vecDelDtor(1);
0056cf40          
0056cf48          int32_t* __return_28 = __return_16;
0056cf48          
0056cf58          if ((InterlockedDecrement(&__return_28[1]) == 0 && __return_28 != 0))
0056cf60              **(uint32_t**)__return_28(1);
0056cf60          
0056cf62          int32_t* __return_29 = __return_18;
0056cf62          
0056cf72          if ((InterlockedDecrement(&__return_29[1]) == 0 && __return_29 != 0))
0056cf7a              **(uint32_t**)__return_29(1);
0056cf7a          
0056cf85          if (InterlockedDecrement(var_16c) == 0)
0056cf85          {
0056cf87              int32_t __return_44 = __return_43;
0056cf87              
0056cf8d              if (__return_44 != 0)
0056cf93                  **(uint32_t**)__return_44(1);
0056cf85          }
0056cf85          
0056cf95          int32_t* esi_5 = var_164;
0056cf95          
0056cfa5          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0056cfad              **(uint32_t**)esi_5(1);
0056cfad          
0056cfaf          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_16 = AC1Legacy::PStringBase<char>::s_NullBuffer_9;
0056cfaf          
0056cfbf          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_16->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_16 != 0))
0056cfc1              AC1Legacy::PStringBase<char>::s_NullBuffer_16->vtable->__vecDelDtor(1);
0056cfc1          
0056cfc9          class AC1Legacy::PStringBase<char> esi_6 = var_15c;
0056cfc9          
0056cfd9          if ((InterlockedDecrement((esi_6 + 4)) == 0 && esi_6 != 0))
0056cfe1              **(uint32_t**)esi_6(1);
0056cfe1          
0056cfe3          class AC1Legacy::PStringBase<char> esi_7 = var_168;
0056cfe3          
0056cff3          if ((InterlockedDecrement((esi_7 + 4)) == 0 && esi_7 != 0))
0056cffb              **(uint32_t**)esi_7(1);
0056cffb          
0056cffd          class AC1Legacy::PStringBase<char> esi_8 = var_1ac;
0056cffd          
0056d00d          if ((InterlockedDecrement((esi_8 + 4)) == 0 && esi_8 != 0))
0056d015              **(uint32_t**)esi_8(1);
0056d015          
0056d017          __return_30 = __return_10;
0056cc3d      }
0056cc3d      
0056d3a2      if ((InterlockedDecrement(&__return_30[1]) == 0 && __return_30 != 0))
0056d3aa          **(uint32_t**)__return_30(1);
0056d3aa      
0056d3b5      AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_10, &data_7928af);
0056d3c3      int32_t eax_166 = gmCCommunicationSystem::IsSquelched(0, &__return_10, 6);
0056d3ca      class AC1Legacy::PStringBase<char> __return_20 = __return_10;
0056d3d1      char ebx_2 = ((int8_t)-(eax_166));
0056d3d1      
0056d3e5      if ((InterlockedDecrement((__return_20 + 4)) == 0 && __return_20 != 0))
0056d3ed          **(uint32_t**)__return_20(1);
0056d3ed      
0056d3f1      class ClientCombatSystem* this_1;
0056d3f1      
0056d3f1      if ((ebx_2 - ebx_2) == 0xff)
0056d4d8          this_1 = this;
0056d3f1      else
0056d3f1      {
0056d405          if (((arg8 & 1) | 0) != 0)
0056d405          {
0056d410              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1ac, " Your Critical Protection augmen…");
0056d415              class AC1Legacy::PStringBase<char> esi_18 = var_1ac;
0056d419              int32_t eax_172 = *(uint32_t*)(esi_18 + 8);
0056d419              
0056d427              if ((eax_172 != 1 && esi_18 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0056d433                  AC1Legacy::PStringBase<char>::append_n_chars(&var_1bc, (esi_18 + 0x14), (eax_172 - 1));
0056d433              
0056d440              if (InterlockedDecrement((esi_18 + 4)) == 0)
0056d448                  **(uint32_t**)esi_18(1);
0056d405          }
0056d405          
0056d453          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1ac, &data_794508);
0056d458          class AC1Legacy::PStringBase<char> esi_19 = var_1ac;
0056d45c          int32_t eax_176 = *(uint32_t*)(esi_19 + 8);
0056d45c          
0056d46a          if ((eax_176 != 1 && esi_19 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0056d476              AC1Legacy::PStringBase<char>::append_n_chars(&var_1bc, (esi_19 + 0x14), (eax_176 - 1));
0056d476          
0056d483          if (InterlockedDecrement((esi_19 + 4)) == 0)
0056d48b              **(uint32_t**)esi_19(1);
0056d48b          
0056d49b          PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_10, WidthConvert, &var_1bc[5]);
0056d4a0          this_1 = this;
0056d4b4          ClientSystem::AddTextToScroll(this_1, &__return_10, 0x15, 1, 0);
0056d4bd          int32_t* esi_21 = (__return_10 - 0x14);
0056d4bd          
0056d4cc          if ((InterlockedDecrement(&esi_21[1]) == 0 && esi_21 != 0))
0056d4d4              **(uint32_t**)esi_21(1);
0056d3f1      }
0056d3f1      
0056d4eb      enum COMBAT_MODE combatMode = this_1->combatMode;
0056d4f1      this_1->lastAttackedTime = (*(uint32_t*)Timer::cur_time);
0056d4f4      *(uint32_t*)((char*)this_1->lastAttackedTime)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
0056d4f4      
0056d4fc      if (((combatMode == MELEE_COMBAT_MODE || combatMode == MISSILE_COMBAT_MODE) && (PlayerModule::AutoTarget(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0 && ACCWeenieObject::selectedID == 0)))
0056d51a          ClientCombatSystem::AutoTarget(this_1);
0056d51a      
0056d51f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_18 = AC1Legacy::PStringBase<char>::s_NullBuffer_10;
0056d51f      
0056d52f      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_18->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_18 != 0))
0056d531          AC1Legacy::PStringBase<char>::s_NullBuffer_18->vtable->__vecDelDtor(1);
0056d531      
0056d539      class AC1Legacy::PStringBase<char> esi_22 = var_158;
0056d539      
0056d549      if ((InterlockedDecrement((esi_22 + 4)) == 0 && esi_22 != 0))
0056d551          **(uint32_t**)esi_22(1);
0056d551      
0056d553      int32_t* esi_23 = var_1bc;
0056d553      
0056d563      if ((InterlockedDecrement(&esi_23[1]) == 0 && esi_23 != 0))
0056d56b          **(uint32_t**)esi_23(1);
0056d56b      
0056d56d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_19 = AC1Legacy::PStringBase<char>::s_NullBuffer_13;
0056d56d      
0056d57d      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_19->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_19 != 0))
0056d57f          AC1Legacy::PStringBase<char>::s_NullBuffer_19->vtable->__vecDelDtor(1);
0056d57f      
0056d58b      int32_t* esi_25 = (var_1b4 - 0x14);
0056d58b      
0056d59a      if ((InterlockedDecrement(&esi_25[1]) == 0 && esi_25 != 0))
0056d5a2          **(uint32_t**)esi_25(1);
0056d5a2      
0056d5a4      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_20 = AC1Legacy::PStringBase<char>::s_NullBuffer_12;
0056d5a4      
0056d5b4      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_20->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_20 != 0))
0056d5b6          AC1Legacy::PStringBase<char>::s_NullBuffer_20->vtable->__vecDelDtor(1);
0056d5b6      
0056d5be      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_21 = AC1Legacy::PStringBase<char>::s_NullBuffer_11;
0056d5be      
0056d5ce      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_21->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_21 != 0))
0056d5d0          AC1Legacy::PStringBase<char>::s_NullBuffer_21->vtable->__vecDelDtor(1);
0056d5d0      
0056d5d8      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_22 = AC1Legacy::PStringBase<char>::s_NullBuffer_14;
0056d5d8      
0056d5e8      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_22->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_22 != 0))
0056d5ea          AC1Legacy::PStringBase<char>::s_NullBuffer_22->vtable->__vecDelDtor(1);
0056c920  }

0056d5ff                                                                                               90                                 .

0056d600  uint8_t __thiscall ClientCombatSystem::HandleCombatAction(class ClientCombatSystem* this, class InputEvent const* arg2)

0056d600  {
0056d605      class ClientCombatSystem* this_1 = this;
0056d607      this = arg2->m_fStart;
0056d607      
0056d60d      if (this == 0)
0056d70b          switch ((arg2->m_InputAction - 0x1000005d))
0056d70b          {
0056d71f              case 0:
0056d71f              case 1:
0056d71f              case 2:
0056d71f              case 0x94:
0056d71f              case 0x95:
0056d71f              case 0x96:
0056d71f              {
0056d71f                  ClientCombatSystem::EndAttackRequest(this_1, this_1->requestedAttackHeight, -1f);
0056d725                  int32_t eax_10;
0056d725                  eax_10 = 1;
0056d728                  return 1;
0056d71f                  break;
0056d71f              }
0056d70b          }
0056d60d      else
0056d60d      {
0056d613          uint32_t m_InputAction = arg2->m_InputAction;
0056d613          
0056d620          if ((m_InputAction - 0x1000005b) <= 0x98)
0056d620              switch (m_InputAction)
0056d620              {
0056d634                  case 0x1000005b:
0056d634                  case 0x1000005c:
0056d634                  case 0x100000ef:
0056d634                  case 0x100000f0:
0056d634                  {
0056d634                      this_1->m_rUIRequestedPower;
0056d643                      int32_t eax_1;
0056d643                      int32_t ecx;
0056d643                      eax_1 = _ftol2();
0056d648                      ecx = 0;
0056d648                      
0056d658                      if ((m_InputAction == 0x1000005c || m_InputAction == 0x100000f0))
0056d65a                          ecx = 1;
0056d65a                      
0056d660                      int32_t edx;
0056d660                      edx = ecx != 0;
0056d66a                      int32_t var_14 = ecx;
0056d682                      long double st0 = MathLib::Clamp(((float)(((long double)(((edx * 2) - 1) + eax_1)) * ((long double)0.166666672f))), 0f, 1f);
0056d68f                      this_1->m_rUIRequestedPower = ((float)st0);
0056d693                      CM_Combat::SendNotice_DesiredAttackPowerChanged(((float)st0));
0056d69c                      int32_t eax_3;
0056d69c                      eax_3 = 1;
0056d69f                      return 1;
0056d634                      break;
0056d634                  }
0056d6de                  case 0x1000005d:
0056d6de                  case 0x100000f1:
0056d6de                  {
0056d6de                      ClientCombatSystem::SetRequestedAttackHeight(this_1, LOW_ATTACK_HEIGHT);
0056d6e7                      CM_Combat::SendNotice_AttackHeightChanged(this_1->requestedAttackHeight);
0056d6f0                      int32_t eax_7;
0056d6f0                      eax_7 = 1;
0056d6f3                      return 1;
0056d6de                      break;
0056d6de                  }
0056d6c2                  case 0x1000005e:
0056d6c2                  case 0x100000f2:
0056d6c2                  {
0056d6c2                      ClientCombatSystem::SetRequestedAttackHeight(this_1, MEDIUM_ATTACK_HEIGHT);
0056d6cb                      CM_Combat::SendNotice_AttackHeightChanged(this_1->requestedAttackHeight);
0056d6d4                      int32_t eax_5;
0056d6d4                      eax_5 = 1;
0056d6d7                      return 1;
0056d6c2                      break;
0056d6c2                  }
0056d6a6                  case 0x1000005f:
0056d6a6                  case 0x100000f3:
0056d6a6                  {
0056d6a6                      ClientCombatSystem::SetRequestedAttackHeight(this_1, HIGH_ATTACK_HEIGHT);
0056d6af                      CM_Combat::SendNotice_AttackHeightChanged(this_1->requestedAttackHeight);
0056d6b8                      int32_t eax_4;
0056d6b8                      eax_4 = 1;
0056d6bb                      return 1;
0056d6a6                      break;
0056d6a6                  }
0056d620              }
0056d60d      }
0056d60d      
0056d72c      uint32_t eax;
0056d72c      eax = 0;
0056d72f      return 0;
0056d600  }

0056d732                                                        8b ff                                                        ..
0056d734  uint32_t jump_table_56d734[0x5] = 
0056d734  {
0056d734      [0x0] =  0x0056d634
0056d738      [0x1] =  0x0056d6da
0056d73c      [0x2] =  0x0056d6be
0056d740      [0x3] =  0x0056d6a2
0056d744      [0x4] =  0x0056d72b
0056d748  }
0056d748  uint8_t lookup_table_56d748[0x99] = 
0056d748  {
0056d748      [0x00] =  0x00
0056d749      [0x01] =  0x00
0056d74a      [0x02] =  0x01
0056d74b      [0x03] =  0x02
0056d74c      [0x04] =  0x03
0056d74d      [0x05] =  0x04
0056d74e      [0x06] =  0x04
0056d74f      [0x07] =  0x04
0056d750      [0x08] =  0x04
0056d751      [0x09] =  0x04
0056d752      [0x0a] =  0x04
0056d753      [0x0b] =  0x04
0056d754      [0x0c] =  0x04
0056d755      [0x0d] =  0x04
0056d756      [0x0e] =  0x04
0056d757      [0x0f] =  0x04
0056d758      [0x10] =  0x04
0056d759      [0x11] =  0x04
0056d75a      [0x12] =  0x04
0056d75b      [0x13] =  0x04
0056d75c      [0x14] =  0x04
0056d75d      [0x15] =  0x04
0056d75e      [0x16] =  0x04
0056d75f      [0x17] =  0x04
0056d760      [0x18] =  0x04
0056d761      [0x19] =  0x04
0056d762      [0x1a] =  0x04
0056d763      [0x1b] =  0x04
0056d764      [0x1c] =  0x04
0056d765      [0x1d] =  0x04
0056d766      [0x1e] =  0x04
0056d767      [0x1f] =  0x04
0056d768      [0x20] =  0x04
0056d769      [0x21] =  0x04
0056d76a      [0x22] =  0x04
0056d76b      [0x23] =  0x04
0056d76c      [0x24] =  0x04
0056d76d      [0x25] =  0x04
0056d76e      [0x26] =  0x04
0056d76f      [0x27] =  0x04
0056d770      [0x28] =  0x04
0056d771      [0x29] =  0x04
0056d772      [0x2a] =  0x04
0056d773      [0x2b] =  0x04
0056d774      [0x2c] =  0x04
0056d775      [0x2d] =  0x04
0056d776      [0x2e] =  0x04
0056d777      [0x2f] =  0x04
0056d778      [0x30] =  0x04
0056d779      [0x31] =  0x04
0056d77a      [0x32] =  0x04
0056d77b      [0x33] =  0x04
0056d77c      [0x34] =  0x04
0056d77d      [0x35] =  0x04
0056d77e      [0x36] =  0x04
0056d77f      [0x37] =  0x04
0056d780      [0x38] =  0x04
0056d781      [0x39] =  0x04
0056d782      [0x3a] =  0x04
0056d783      [0x3b] =  0x04
0056d784      [0x3c] =  0x04
0056d785      [0x3d] =  0x04
0056d786      [0x3e] =  0x04
0056d787      [0x3f] =  0x04
0056d788      [0x40] =  0x04
0056d789      [0x41] =  0x04
0056d78a      [0x42] =  0x04
0056d78b      [0x43] =  0x04
0056d78c      [0x44] =  0x04
0056d78d      [0x45] =  0x04
0056d78e      [0x46] =  0x04
0056d78f      [0x47] =  0x04
0056d790      [0x48] =  0x04
0056d791      [0x49] =  0x04
0056d792      [0x4a] =  0x04
0056d793      [0x4b] =  0x04
0056d794      [0x4c] =  0x04
0056d795      [0x4d] =  0x04
0056d796      [0x4e] =  0x04
0056d797      [0x4f] =  0x04
0056d798      [0x50] =  0x04
0056d799      [0x51] =  0x04
0056d79a      [0x52] =  0x04
0056d79b      [0x53] =  0x04
0056d79c      [0x54] =  0x04
0056d79d      [0x55] =  0x04
0056d79e      [0x56] =  0x04
0056d79f      [0x57] =  0x04
0056d7a0      [0x58] =  0x04
0056d7a1      [0x59] =  0x04
0056d7a2      [0x5a] =  0x04
0056d7a3      [0x5b] =  0x04
0056d7a4      [0x5c] =  0x04
0056d7a5      [0x5d] =  0x04
0056d7a6      [0x5e] =  0x04
0056d7a7      [0x5f] =  0x04
0056d7a8      [0x60] =  0x04
0056d7a9      [0x61] =  0x04
0056d7aa      [0x62] =  0x04
0056d7ab      [0x63] =  0x04
0056d7ac      [0x64] =  0x04
0056d7ad      [0x65] =  0x04
0056d7ae      [0x66] =  0x04
0056d7af      [0x67] =  0x04
0056d7b0      [0x68] =  0x04
0056d7b1      [0x69] =  0x04
0056d7b2      [0x6a] =  0x04
0056d7b3      [0x6b] =  0x04
0056d7b4      [0x6c] =  0x04
0056d7b5      [0x6d] =  0x04
0056d7b6      [0x6e] =  0x04
0056d7b7      [0x6f] =  0x04
0056d7b8      [0x70] =  0x04
0056d7b9      [0x71] =  0x04
0056d7ba      [0x72] =  0x04
0056d7bb      [0x73] =  0x04
0056d7bc      [0x74] =  0x04
0056d7bd      [0x75] =  0x04
0056d7be      [0x76] =  0x04
0056d7bf      [0x77] =  0x04
0056d7c0      [0x78] =  0x04
0056d7c1      [0x79] =  0x04
0056d7c2      [0x7a] =  0x04
0056d7c3      [0x7b] =  0x04
0056d7c4      [0x7c] =  0x04
0056d7c5      [0x7d] =  0x04
0056d7c6      [0x7e] =  0x04
0056d7c7      [0x7f] =  0x04
0056d7c8      [0x80] =  0x04
0056d7c9      [0x81] =  0x04
0056d7ca      [0x82] =  0x04
0056d7cb      [0x83] =  0x04
0056d7cc      [0x84] =  0x04
0056d7cd      [0x85] =  0x04
0056d7ce      [0x86] =  0x04
0056d7cf      [0x87] =  0x04
0056d7d0      [0x88] =  0x04
0056d7d1      [0x89] =  0x04
0056d7d2      [0x8a] =  0x04
0056d7d3      [0x8b] =  0x04
0056d7d4      [0x8c] =  0x04
0056d7d5      [0x8d] =  0x04
0056d7d6      [0x8e] =  0x04
0056d7d7      [0x8f] =  0x04
0056d7d8      [0x90] =  0x04
0056d7d9      [0x91] =  0x04
0056d7da      [0x92] =  0x04
0056d7db      [0x93] =  0x04
0056d7dc      [0x94] =  0x00
0056d7dd      [0x95] =  0x00
0056d7de      [0x96] =  0x01
0056d7df      [0x97] =  0x02
0056d7e0      [0x98] =  0x03
0056d7e1  }

0056d7e1     8d 49 00                                                                                       .I.
0056d7e4  uint32_t jump_table_56d7e4[0x2] = 
0056d7e4  {
0056d7e4      [0x0] =  0x0056d712
0056d7e8      [0x1] =  0x0056d72b
0056d7ec  }
0056d7ec  uint8_t lookup_table_56d7ec[0x97] = 
0056d7ec  {
0056d7ec      [0x00] =  0x00
0056d7ed      [0x01] =  0x00
0056d7ee      [0x02] =  0x00
0056d7ef      [0x03] =  0x01
0056d7f0      [0x04] =  0x01
0056d7f1      [0x05] =  0x01
0056d7f2      [0x06] =  0x01
0056d7f3      [0x07] =  0x01
0056d7f4      [0x08] =  0x01
0056d7f5      [0x09] =  0x01
0056d7f6      [0x0a] =  0x01
0056d7f7      [0x0b] =  0x01
0056d7f8      [0x0c] =  0x01
0056d7f9      [0x0d] =  0x01
0056d7fa      [0x0e] =  0x01
0056d7fb      [0x0f] =  0x01
0056d7fc      [0x10] =  0x01
0056d7fd      [0x11] =  0x01
0056d7fe      [0x12] =  0x01
0056d7ff      [0x13] =  0x01
0056d800      [0x14] =  0x01
0056d801      [0x15] =  0x01
0056d802      [0x16] =  0x01
0056d803      [0x17] =  0x01
0056d804      [0x18] =  0x01
0056d805      [0x19] =  0x01
0056d806      [0x1a] =  0x01
0056d807      [0x1b] =  0x01
0056d808      [0x1c] =  0x01
0056d809      [0x1d] =  0x01
0056d80a      [0x1e] =  0x01
0056d80b      [0x1f] =  0x01
0056d80c      [0x20] =  0x01
0056d80d      [0x21] =  0x01
0056d80e      [0x22] =  0x01
0056d80f      [0x23] =  0x01
0056d810      [0x24] =  0x01
0056d811      [0x25] =  0x01
0056d812      [0x26] =  0x01
0056d813      [0x27] =  0x01
0056d814      [0x28] =  0x01
0056d815      [0x29] =  0x01
0056d816      [0x2a] =  0x01
0056d817      [0x2b] =  0x01
0056d818      [0x2c] =  0x01
0056d819      [0x2d] =  0x01
0056d81a      [0x2e] =  0x01
0056d81b      [0x2f] =  0x01
0056d81c      [0x30] =  0x01
0056d81d      [0x31] =  0x01
0056d81e      [0x32] =  0x01
0056d81f      [0x33] =  0x01
0056d820      [0x34] =  0x01
0056d821      [0x35] =  0x01
0056d822      [0x36] =  0x01
0056d823      [0x37] =  0x01
0056d824      [0x38] =  0x01
0056d825      [0x39] =  0x01
0056d826      [0x3a] =  0x01
0056d827      [0x3b] =  0x01
0056d828      [0x3c] =  0x01
0056d829      [0x3d] =  0x01
0056d82a      [0x3e] =  0x01
0056d82b      [0x3f] =  0x01
0056d82c      [0x40] =  0x01
0056d82d      [0x41] =  0x01
0056d82e      [0x42] =  0x01
0056d82f      [0x43] =  0x01
0056d830      [0x44] =  0x01
0056d831      [0x45] =  0x01
0056d832      [0x46] =  0x01
0056d833      [0x47] =  0x01
0056d834      [0x48] =  0x01
0056d835      [0x49] =  0x01
0056d836      [0x4a] =  0x01
0056d837      [0x4b] =  0x01
0056d838      [0x4c] =  0x01
0056d839      [0x4d] =  0x01
0056d83a      [0x4e] =  0x01
0056d83b      [0x4f] =  0x01
0056d83c      [0x50] =  0x01
0056d83d      [0x51] =  0x01
0056d83e      [0x52] =  0x01
0056d83f      [0x53] =  0x01
0056d840      [0x54] =  0x01
0056d841      [0x55] =  0x01
0056d842      [0x56] =  0x01
0056d843      [0x57] =  0x01
0056d844      [0x58] =  0x01
0056d845      [0x59] =  0x01
0056d846      [0x5a] =  0x01
0056d847      [0x5b] =  0x01
0056d848      [0x5c] =  0x01
0056d849      [0x5d] =  0x01
0056d84a      [0x5e] =  0x01
0056d84b      [0x5f] =  0x01
0056d84c      [0x60] =  0x01
0056d84d      [0x61] =  0x01
0056d84e      [0x62] =  0x01
0056d84f      [0x63] =  0x01
0056d850      [0x64] =  0x01
0056d851      [0x65] =  0x01
0056d852      [0x66] =  0x01
0056d853      [0x67] =  0x01
0056d854      [0x68] =  0x01
0056d855      [0x69] =  0x01
0056d856      [0x6a] =  0x01
0056d857      [0x6b] =  0x01
0056d858      [0x6c] =  0x01
0056d859      [0x6d] =  0x01
0056d85a      [0x6e] =  0x01
0056d85b      [0x6f] =  0x01
0056d85c      [0x70] =  0x01
0056d85d      [0x71] =  0x01
0056d85e      [0x72] =  0x01
0056d85f      [0x73] =  0x01
0056d860      [0x74] =  0x01
0056d861      [0x75] =  0x01
0056d862      [0x76] =  0x01
0056d863      [0x77] =  0x01
0056d864      [0x78] =  0x01
0056d865      [0x79] =  0x01
0056d866      [0x7a] =  0x01
0056d867      [0x7b] =  0x01
0056d868      [0x7c] =  0x01
0056d869      [0x7d] =  0x01
0056d86a      [0x7e] =  0x01
0056d86b      [0x7f] =  0x01
0056d86c      [0x80] =  0x01
0056d86d      [0x81] =  0x01
0056d86e      [0x82] =  0x01
0056d86f      [0x83] =  0x01
0056d870      [0x84] =  0x01
0056d871      [0x85] =  0x01
0056d872      [0x86] =  0x01
0056d873      [0x87] =  0x01
0056d874      [0x88] =  0x01
0056d875      [0x89] =  0x01
0056d876      [0x8a] =  0x01
0056d877      [0x8b] =  0x01
0056d878      [0x8c] =  0x01
0056d879      [0x8d] =  0x01
0056d87a      [0x8e] =  0x01
0056d87b      [0x8f] =  0x01
0056d87c      [0x90] =  0x01
0056d87d      [0x91] =  0x01
0056d87e      [0x92] =  0x01
0056d87f      [0x93] =  0x01
0056d880      [0x94] =  0x00
0056d881      [0x95] =  0x00
0056d882      [0x96] =  0x00
0056d883  }

0056d883           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0056d890  uint8_t __thiscall ClientCombatSystem::OnAction(class ClientCombatSystem* this, class InputEvent const* arg2)

0056d890  {
0056d89a      if (arg2->m_InputAction != 0x1000005a)
0056d89a      {
0056d8ce          uint32_t m_cRef = this->m_cTurbineRefCount.m_cRef;
0056d8ce          
0056d8d9          if ((m_cRef == 2 || m_cRef == 4))
0056d8f8              /* tailcall */
0056d8f8              return ClientCombatSystem::HandleCombatAction(((char*)this - 8), arg2);
0056d8f8          
0056d8de          if (m_cRef == 8)
0056d8ec              /* tailcall */
0056d8ec              return ClientCombatSystem::HandleMagicAction(((char*)this - 8), arg2);
0056d8ec          
0056d8e0          int32_t eax_6;
0056d8e0          eax_6 = 0;
0056d8e2          return 0;
0056d89a      }
0056d89a      
0056d8a8      int32_t var_8 = 1;
0056d8a8      
0056d8aa      if (this->m_cTurbineRefCount.m_cRef != 1)
0056d8aa      {
0056d8c3          ClientCombatSystem::SetCombatMode(((char*)this - 8), arg2, 1);
0056d8c8          int32_t eax_3;
0056d8c8          eax_3 = 1;
0056d8cb          return 1;
0056d8aa      }
0056d8aa      
0056d8ac      int32_t var_c = 0;
0056d8ae      uint8_t eax_1;
0056d8ae      enum COMBAT_MODE edx;
0056d8ae      eax_1 = ClientCombatSystem::GetDefaultCombatMode(((char*)this - 8), arg2);
0056d8b6      ClientCombatSystem::SetCombatMode(((char*)this - 8), edx, eax_1);
0056d8bb      int32_t eax_2;
0056d8bb      eax_2 = 1;
0056d8be      return 1;
0056d890  }

0056d8fd                                                                                         90 90 90                               ...

0056d900  class ClientTradeSystem* ClientTradeSystem::GetTradeSystem()

0056d900  {
0056d905      return ClientTradeSystem::s_pTradeSystem;
0056d900  }

0056d906                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0056d910  void ClientTradeSystem::OnShutdown(class ClientTradeSystem* this @ ecx)

0056d910  {
0056d910      class ClientTradeSystem* ClientTradeSystem::s_pTradeSystem_1 = ClientTradeSystem::s_pTradeSystem;
0056d910      
0056d918      if (ClientTradeSystem::s_pTradeSystem_1 != 0)
0056d918      {
0056d91a          ClientTradeSystem::s_pTradeSystem_1->vtable->Release();
0056d91f          ClientTradeSystem::s_pTradeSystem = nullptr;
0056d918      }
0056d910  }

0056d92a                                90 90 90 90 90 90                                                            ......

0056d930  uint32_t __stdcall ClientTradeSystem::Handle_Trade__Recv_OpenTrade(class ClientTradeSystem* this @ ecx, uint32_t arg2)

0056d930  {
0056d935      CM_Trade::SendNotice_OpenTrade(arg2);
0056d93f      return 0;
0056d930  }

0056d942        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056d950  uint32_t __thiscall ClientTradeSystem::Handle_Trade__Recv_ResetTrade(class ClientTradeSystem* this, uint32_t arg2)

0056d950  {
0056d958      CM_Trade::SendNotice_ResetTrade(arg2);
0056d958      
0056d967      if (APIManager::APIIsReady() != 0)
0056d967      {
0056d969          struct IACPlugin* eax_1 = APIManager::GetACPlugin();
0056d96e          eax_1->vtable->OnTradeWindowCleared(eax_1);
0056d967      }
0056d967      
0056d977      Trade::Reset(this->m_pTrade);
0056d97f      return 0;
0056d950  }

0056d982        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056d990  uint32_t __thiscall ClientTradeSystem::Handle_Trade__Recv_TradeFailure(class ClientTradeSystem* this, uint32_t arg2, uint32_t arg3)

0056d990  {
0056d99b      Trade::RemoveItem(this->m_pTrade, arg2, 1);
0056d9a6      CM_Trade::SendNotice_TradeFailure(arg2, arg3);
0056d9b1      return 0;
0056d990  }

0056d9b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0056d9c0  uint32_t ClientTradeSystem::Handle_Trade__Recv_ClearTradeAcceptance(class ClientTradeSystem* this @ ecx)

0056d9c0  {
0056d9c0      CM_Trade::SendNotice_ClearTradeAcceptance();
0056d9c7      return 0;
0056d9c0  }

0056d9c8                          90 90 90 90 90 90 90 90                                                          ........

0056d9d0  void __stdcall ClientTradeSystem::AddItemToSelfTradeList(class ClientTradeSystem* this @ ecx, uint32_t arg2, int32_t arg3)

0056d9d0  {
0056d9da      CM_Trade::Event_AddToTrade(arg2, arg3);
0056d9d0  }

0056d9e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0056d9f0  void __fastcall ClientTradeSystem::AcceptTrade(class ClientTradeSystem* this)

0056d9f0  {
0056d9f0      this->m_pTrade->_accepted = 1;
0056d9fe      CM_Trade::Event_AcceptTrade(this->m_pTrade);
0056d9f0  }

0056da05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0056da10  void __fastcall ClientTradeSystem::DeclineTrade(class ClientTradeSystem* this)

0056da10  {
0056da10      this->m_pTrade->_accepted = 0;
0056da1a      /* tailcall */
0056da1a      return CM_Trade::Event_DeclineTrade();
0056da10  }

0056da1f                                                                                               90                                 .

0056da20  void ClientTradeSystem::ResetTrade(class ClientTradeSystem* this @ ecx)

0056da20  {
0056da20      /* tailcall */
0056da20      return CM_Trade::Event_ResetTrade();
0056da20  }

0056da25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0056da30  void ClientTradeSystem::CloseTradeNegotiations(class ClientTradeSystem* this @ ecx)

0056da30  {
0056da30      /* tailcall */
0056da30      return CM_Trade::Event_CloseTradeNegotiations();
0056da30  }

0056da35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0056da40  uint32_t __fastcall ClientTradeSystem::GetNumSelfObjectsInTrade(class ClientTradeSystem const* this)

0056da40  {
0056da47      uint32_t eax = Trade::GetNumContainers(this->m_pTrade);
0056da5a      return (Trade::GetNumItems(this->m_pTrade) + eax);
0056da40  }

0056da5b                                                                                   90 90 90 90 90                             .....

0056da60  uint32_t __fastcall ClientTradeSystem::GetNumPartnerObjectsInTrade(class ClientTradeSystem const* this)

0056da60  {
0056da67      uint32_t eax = Trade::GetNumPartnerContainers(this->m_pTrade);
0056da7a      return (Trade::GetNumPartnerItems(this->m_pTrade) + eax);
0056da60  }

0056da7b                                                                                   90 90 90 90 90                             .....

0056da80  uint8_t __thiscall ClientTradeSystem::IsPartnerTradingItem(class ClientTradeSystem* this, uint32_t arg2)

0056da80  {
0056da8f      int32_t eax;
0056da8f      eax = Trade::IsPartnerTradingItem(this->m_pTrade, arg2) != 0;
0056da92      return eax;
0056da80  }

0056da95                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0056daa0  void __fastcall ClientTradeSystem::OnEndCharacterSession(class ClientTradeSystem* this)

0056daa0  {
0056daa3      class Trade* m_pTrade = this->m_pTrade;
0056daa3      
0056daab      if (m_pTrade != 0)
0056daad          m_pTrade->vtable->__vecDelDtor(1);
0056daad      
0056dab5      __builtin_memset(&this->m_pTrade, 0, 0x14);
0056dac4      class Trade* eax_2 = operator new(0x40);
0056dac4      
0056dace      if (eax_2 != 0)
0056dace      {
0056dad8          this->m_pTrade = Trade::Trade(eax_2);
0056dadc          return;
0056dace      }
0056dace      
0056dadd      this->m_pTrade = nullptr;
0056daa0  }

0056dae3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0056daf0  void __fastcall ClientTradeSystem::~ClientTradeSystem(class ClientTradeSystem* this)

0056daf0  {
0056daf3      class Trade* m_pTrade = this->m_pTrade;
0056dafc      this->vtable = 0x7cfcec;
0056daf9      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056daf9      
0056db08      if (m_pTrade != 0)
0056db0a          m_pTrade->vtable->__vecDelDtor(1);
0056db0a      
0056db10      this->m_pTrade = nullptr;
0056db17      this->m_cTurbineRefCount.vtable = 0x792b6c;
0056daf9      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056db28      /* tailcall */
0056db28      return NoticeHandler::~NoticeHandler(&this->vtable);
0056daf0  }

0056db2d                                         90 90 90                                                               ...

0056db30  class TResult* __thiscall ClientTradeSystem::QueryInterface(class ClientTradeSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

0056db30  {
0056db43      int32_t* key;
0056db43      
0056db43      if ((1 & (*(uint8_t*)$S127)) != 0)
0056db91          key = Offsets[0].key;
0056db43      else
0056db43      {
0056db4d          key = &ClientTradeSystem_InterfaceType;
0056db52          $S127 |= 1;
0056db58          Offsets[0].key = 0x7cfb88;
0056db5d          Offsets[0].ofs = 0;
0056db63          Offsets[1].key = 0x7cfb78;
0056db6d          Offsets[1].ofs = 0;
0056db73          Offsets[2].key = 0x7cfcd8;
0056db7d          Offsets[2].ofs = 0;
0056db83          Offsets[3].key = 0;
0056db89          Offsets[3].ofs = 0;
0056db43      }
0056db43      
0056db98      void* edx_3 = &Offsets;
0056db98      
0056db9d      while (key != 0)
0056db9d      {
0056dbbf          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0056dbbf          {
0056dbe2              if (arg4 != 0)
0056dbe2              {
0056dbe4                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0056dbee                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
0056dbf1                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
0056dbe2              }
0056dbe2              
0056dbfa              __return->m_val = 0;
0056dbfd              return __return;
0056dbbf          }
0056dbbf          
0056dbc1          key = *(uint32_t*)((char*)edx_3 + 8);
0056dbc4          edx_3 += 8;
0056db9d      }
0056db9d      
0056dbd2      __return->m_val = 0x80004002;
0056dbd9      return __return;
0056db30  }


0056dc00  uint32_t __thiscall ClientTradeSystem::Handle_Trade__Recv_RemoveFromTrade(class ClientTradeSystem* this, uint32_t arg2, uint32_t arg3)

0056dc00  {
0056dc0d      if (arg3 == 1)
0056dc1d          Trade::RemoveItem(this->m_pTrade, arg2, 1);
0056dc0d      else if (arg3 == 2)
0056dc1d          Trade::RemoveItem(this->m_pTrade, arg2, arg3);
0056dc1d      
0056dc24      CM_Trade::SendNotice_RemoveItemFromTrade(arg2, arg3);
0056dc30      return 0;
0056dc00  }

0056dc33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0056dc40  uint32_t __thiscall ClientTradeSystem::Handle_Trade__Recv_AcceptTrade(class ClientTradeSystem* this, uint32_t arg2)

0056dc40  {
0056dc47      if (arg2 != 0)
0056dc47      {
0056dc51          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056dc58          uint32_t player_id;
0056dc58          
0056dc58          if (SmartBox::smartbox_1 == 0)
0056dc62              player_id = 0;
0056dc58          else
0056dc5a              player_id = SmartBox::smartbox_1->player_id;
0056dc5a          
0056dc66          if (arg2 != player_id)
0056dc74              this->m_pTrade->_p_accepted = 1;
0056dc66          else
0056dc68              this->m_pTrade->_accepted = 1;
0056dc47      }
0056dc47      else
0056dc49          this->m_pTrade->_accepted = arg2;
0056dc49      
0056dc7f      CM_Trade::SendNotice_AcceptTrade(arg2);
0056dc7f      
0056dc89      if (arg2 != 0)
0056dc89      {
0056dc8b          class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
0056dc92          uint32_t player_id_1;
0056dc92          
0056dc92          if (SmartBox::smartbox_2 == 0)
0056dc9c              player_id_1 = 0;
0056dc92          else
0056dc94              player_id_1 = SmartBox::smartbox_2->player_id;
0056dc94          
0056dca0          if (arg2 == player_id_1)
0056dca0          {
0056dcc5              if (APIManager::APIIsReady() != 0)
0056dcc5              {
0056dcc7                  struct IACPlugin* eax_5 = APIManager::GetACPlugin();
0056dccc                  eax_5->vtable->OnTradeWindowAccepted(eax_5, 1);
0056dcc5              }
0056dca0          }
0056dca0          else if (APIManager::APIIsReady() != 0)
0056dca9          {
0056dcab              struct IACPlugin* eax_2 = APIManager::GetACPlugin();
0056dcb0              eax_2->vtable->OnTradeWindowAccepted(eax_2, 2);
0056dca9          }
0056dc89      }
0056dc89      
0056dcd7      return 0;
0056dc40  }

0056dcda                                                                                90 90 90 90 90 90                            ......

0056dce0  uint32_t __thiscall ClientTradeSystem::Handle_Trade__Recv_DeclineTrade(class ClientTradeSystem* this, uint32_t arg2)

0056dce0  {
0056dce0      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056dce9      uint32_t player_id;
0056dce9      
0056dce9      if (SmartBox::smartbox_1 == 0)
0056dcf3          player_id = 0;
0056dce9      else
0056dceb          player_id = SmartBox::smartbox_1->player_id;
0056dceb      
0056dcfc      if (arg2 != player_id)
0056dd06          this->m_pTrade->_p_accepted = 0;
0056dcfc      else
0056dcfe          this->m_pTrade->_accepted = 0;
0056dcfe      
0056dd0d      CM_Trade::SendNotice_DeclineTrade(arg2);
0056dd0d      
0056dd24      if (arg2 == SmartBox::smartbox->player_id)
0056dd24      {
0056dd48          if (APIManager::APIIsReady() != 0)
0056dd48          {
0056dd4a              struct IACPlugin* eax_6 = APIManager::GetACPlugin();
0056dd4f              eax_6->vtable->OnTradeWindowDeclined(eax_6, 1);
0056dd48          }
0056dd24      }
0056dd24      else if (APIManager::APIIsReady() != 0)
0056dd2d      {
0056dd2f          struct IACPlugin* eax_3 = APIManager::GetACPlugin();
0056dd34          eax_3->vtable->OnTradeWindowDeclined(eax_3, 2);
0056dd2d      }
0056dd2d      
0056dd59      return 0;
0056dce0  }

0056dd5c                                                                                      90 90 90 90                              ....

0056dd60  void __fastcall ClientTradeSystem::ClientTradeSystem(class ClientTradeSystem* this)

0056dd60  {
0056dd63      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056dd6a      this->vtable = 0x7cfcec;
0056dd70      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056dd7b      this->m_cTurbineRefCount.m_cRef = 1;
0056dd82      this->m_cTurbineRefCount.vtable = 0x792b6c;
0056dd8a      ClientTradeSystem::s_pTradeSystem = this;
0056dd90      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
0056dd9a      this->m_iidTradeInitiator = 0;
0056dd9d      this->m_iidTradePartner = 0;
0056dda0      this->attemptTradeToPlayerID = 0;
0056dda3      this->attemptTradeObjectID = 0;
0056dda6      class Trade* eax_1 = operator new(0x40);
0056dda6      
0056ddb0      if (eax_1 != 0)
0056ddb0      {
0056ddb9          this->m_pTrade = Trade::Trade(eax_1);
0056ddc0          return;
0056ddb0      }
0056ddb0      
0056ddc3      this->m_pTrade = nullptr;
0056dd60  }

0056ddcb                                   90 90 90 90 90                                                             .....

0056ddd0  int32_t __thiscall ClientTradeSystem::GetItemLocationInPartnerTradeList(class ClientTradeSystem* this, uint32_t arg2)

0056ddd0  {
0056ddd3      class PackableLLNode<ContentProfile>* i = this->m_pTrade->_partner_list.head;
0056ddd6      int32_t result = 0;
0056ddd6      
0056ddda      while (i != 0)
0056ddda      {
0056dde3          if (i->data.m_iid == arg2)
0056ddef              return result;
0056ddef          
0056dde5          i = i->next;
0056dde8          result += 1;
0056ddda      }
0056ddda      
0056dded      return 0;
0056ddd0  }

0056ddf2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0056de00  uint32_t __fastcall ClientTradeSystem::Release(class ClientTradeSystem const* this)

0056de00  {
0056de07      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
0056de07      
0056de14      if ((result == 0 && this != 0))
0056de14      {
0056de18          ClientTradeSystem::~ClientTradeSystem(this);
0056de1e          operator delete(this);
0056de14      }
0056de14      
0056de2a      return result;
0056de00  }

0056de2b                                   90 90 90 90 90                                                             .....

0056de30  uint32_t __thiscall ClientTradeSystem::Handle_Trade__Recv_CloseTrade(class ClientTradeSystem* this, uint32_t arg2)

0056de30  {
0056de30      class ClientTradeSystem* this_1 = this;
0056de48      PStringBase<unsigned short>::allocate_ref_buffer(&this_1, wcslen(u"The trade has been cancelled."));
0056de57      wcscpy(this_1, u"The trade has been cancelled.");
0056de6d      ClientSystem::AddTextToScroll(this, &this_1, 0x1a, 1, 0);
0056de76      void* __offset(ClientTradeSystem, -0x14) esi_1 = ((char*)this_1 - 0x14);
0056de76      
0056de89      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0056de91          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0056de91      
0056de98      CM_Trade::SendNotice_CloseTrade(arg2);
0056de98      
0056dea7      if (APIManager::APIIsReady() != 0)
0056dea7      {
0056dea9          struct IACPlugin* eax_5 = APIManager::GetACPlugin();
0056deae          eax_5->vtable->OnTradeWindowClosed(eax_5);
0056dea7      }
0056dea7      
0056deb7      Trade::Reset(this->m_pTrade);
0056debc      this->m_iidTradeInitiator = 0;
0056dec3      this->m_iidTradePartner = 0;
0056decf      return 0;
0056de30  }

0056ded2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0056dee0  uint8_t __stdcall ClientTradeSystem::AttemptToOpenTradeNegotiations(class ClientTradeSystem* this @ ecx, uint32_t arg2)

0056dee0  {
0056deef      if (ClientCombatSystem::GetCombatSystem()->combatMode != NONCOMBAT_COMBAT_MODE)
0056deef      {
0056def6          void var_90;
0056def6          StringInfo::StringInfo(&var_90);
0056df04          void* var_94;
0056df04          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You need to be in peace mode to …");
0056df14          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
0056df1d          int32_t* esi_2 = ((char*)var_94 - 0x14);
0056df1d          
0056df30          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056df38              **(uint32_t**)esi_2(1);
0056df38          
0056df41          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
0056df4d          StringInfo::~StringInfo(&var_90);
0056deef      }
0056deef      else if (arg2 != 0)
0056df67      {
0056df6a          CM_Trade::Event_OpenTradeNegotiations(arg2);
0056df72          int32_t eax_3;
0056df72          eax_3 = 1;
0056df7a          return 1;
0056df67      }
0056df67      
0056df53      uint32_t eax_2;
0056df53      eax_2 = 0;
0056df5b      return 0;
0056dee0  }

0056df7d                                                                                         90 90 90                               ...

0056df80  void __thiscall ClientTradeSystem::AttemptToTradeItem(class ClientTradeSystem* this, uint32_t arg2, uint32_t arg3)

0056df80  {
0056df92      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg3);
0056df92      
0056df9c      if ((eax != 0 && ACCWeenieObject::IsOwnedByPlayer(eax) != 0))
0056df9c      {
0056dfb1          uint32_t m_iidTradePartner = this->m_iidTradePartner;
0056dfb1          
0056dfb6          if (m_iidTradePartner != 0)
0056dfb6          {
0056dfbf              if (m_iidTradePartner == arg2)
0056dfbf              {
0056dfc2                  CM_Trade::SendNotice_TradeAnItemForDummies(arg3);
0056dfd2                  return;
0056dfbf              }
0056dfbf              
0056dfd9              void var_90;
0056dfd9              StringInfo::StringInfo(&var_90);
0056dfe7              void var_94;
0056dfe7              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You are already trading with som…");
0056dff7              StringInfo::SetLiteralValue(&var_90, &var_94, 1);
0056e000              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
0056e00c              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
0056e018              StringInfo::~StringInfo(&var_90);
0056e025              return;
0056dfb6          }
0056dfb6          
0056e035          ItemHolder::UseObject(arg2, 0, 0);
0056e03d          this->attemptTradeToPlayerID = arg2;
0056e040          this->attemptTradeObjectID = arg3;
0056df9c      }
0056df80  }

0056e04f                                               90                                                                 .

0056e050  void __thiscall ClientTradeSystem::Handle_Trade__Recv_RegisterTrade(class ClientTradeSystem* this, uint32_t arg2, uint32_t arg3, double arg4)

0056e050  {
0056e057      class Trade* m_pTrade = this->m_pTrade;
0056e061      this->m_iidTradeInitiator = arg2;
0056e064      this->m_iidTradePartner = arg3;
0056e064      
0056e067      if (m_pTrade != 0)
0056e067      {
0056e06e          int32_t ebx_1 = *(uint32_t*)((char*)arg4)[4];
0056e073          int32_t ebp_1 = arg4;
0056e077          int32_t var_14_1 = ebx_1;
0056e07a          Trade::Register(m_pTrade, arg3, ebp_1);
0056e07f          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0056e086          uint32_t player_id;
0056e086          
0056e086          if (SmartBox::smartbox_1 == 0)
0056e090              player_id = 0;
0056e086          else
0056e088              player_id = SmartBox::smartbox_1->player_id;
0056e088          
0056e098          if (arg2 != player_id)
0056e0a6              this->m_pTrade->_initiator = 0;
0056e098          else
0056e09a              this->m_pTrade->_initiator = 1;
0056e09a          
0056e0b0          int32_t var_14_2 = ebx_1;
0056e0b4          CM_Trade::SendNotice_RegisterTrade(arg2, arg3, ebp_1);
0056e0b4          
0056e0c5          if (APIManager::APIIsReady() != 0)
0056e0c5          {
0056e0c7              struct IACPlugin* eax_2 = APIManager::GetACPlugin();
0056e0cc              eax_2->vtable->OnTradeWindowOpened(eax_2, arg3);
0056e0c5          }
0056e0c5          
0056e0d3          uint32_t attemptTradeToPlayerID = this->attemptTradeToPlayerID;
0056e0d3          
0056e0d9          if (this->m_iidTradePartner == attemptTradeToPlayerID)
0056e0e2              ClientTradeSystem::AttemptToTradeItem(this, attemptTradeToPlayerID, this->attemptTradeObjectID);
0056e0e2          
0056e0e9          this->attemptTradeObjectID = 0;
0056e0ec          this->attemptTradeToPlayerID = 0;
0056e067      }
0056e050  }

0056e0f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0056e100  uint8_t __stdcall ClientTradeSystem::AddPartnerItem(class ClientTradeSystem* this @ ecx, uint32_t arg2, uint32_t arg3)

0056e100  {
0056e104      uint32_t ebx = arg2;
0056e10c      class ClientTradeSystem* this_1 = this;
0056e110      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(ebx);
0056e11e      uint32_t* var_28_1 = &arg2;
0056e123      struct Turbine_GUID* var_2c = &ClientObjMaintSystem_ClassType;
0056e12b      arg2 = 0;
0056e136      class TResult __return;
0056e136      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, var_28_1);
0056e13b      uint32_t ecx_1 = arg2;
0056e144      var_2c = ecx_1;
0056e146      int32_t var_28_2 = 0;
0056e149      struct Turbine_GUID* eax_2 = var_2c;
0056e14f      int32_t var_8 = 0;
0056e153      int32_t var_4 = 0;
0056e153      
0056e157      if (eax_2 != 0)
0056e15d          *(uint32_t*)(eax_2->m_data1 + 0x10)();
0056e15d      
0056e169      struct Turbine_GUID** esp = &var_2c;
0056e170      void var_c;
0056e170      int32_t ecx_4 = *(uint32_t*)InterfacePtr<class ClientObjMaintSystem>::_QueryInterface(&var_8, &var_c);
0056e170      
0056e176      if (ecx_1 != 0)
0056e17c          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
0056e17c      
0056e17f      class TResult __return_1 = __return;
0056e17f      
0056e185      if (__return_1 != 0)
0056e185      {
0056e18b          if (ecx_4 >= 0)
0056e18b          {
0056e19c              void* ebp;
0056e19c              Trade::AddItem(*(uint32_t*)((char*)ebp + 0x10), ebx, 2, __return_addr);
0056e19c              
0056e1a3              if (eax != 0)
0056e1a3              {
0056e1bf                  uint32_t var_30_3 = ebx;
0056e1c3                  CObjectMaint::RemoveObjectToBeDestroyed((__return_1 + 8), ACCWeenieObject::RemoveContentsFromDestructionQueue(eax));
0056e1cc                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0056e1d2                  int32_t eax_5;
0056e1d2                  eax_5 = 1;
0056e1d8                  return 1;
0056e1a3              }
0056e18b          }
0056e18b          
0056e1a9          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0056e1a9          struct Turbine_GUID* __saved_edi;
0056e1a9          esp = &__saved_edi;
0056e185      }
0056e185      
0056e1ac      class TResult eax_3;
0056e1ac      eax_3.m_val = 0;
0056e1ae      *(uint32_t*)esp;
0056e1ae      esp[1];
0056e1ae      esp[2];
0056e1ae      esp[3];
0056e1b5      return 0;
0056e100  }

0056e1db                                                                                   90 90 90 90 90                             .....

0056e1e0  uint32_t __thiscall ClientTradeSystem::Handle_Trade__Recv_AddToTrade(class ClientTradeSystem* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

0056e1e0  {
0056e1f2      if (arg3 == 1)
0056e1fb          Trade::AddItem(this->m_pTrade, arg2, 1, arg4);
0056e1f2      else if (arg3 == 2)
0056e209          ClientTradeSystem::AddPartnerItem(this, arg2, arg4);
0056e209      
0056e211      CM_Trade::SendNotice_AddItemToTrade(arg2, arg3, arg4);
0056e211      
0056e220      if (APIManager::APIIsReady() != 0)
0056e220      {
0056e222          struct IACPlugin* eax_1 = APIManager::GetACPlugin();
0056e227          eax_1->vtable->OnTradeWindowItemAdded(eax_1, arg3, arg2);
0056e220      }
0056e220      
0056e234      return 0;
0056e1e0  }

0056e237                                                                       90 90 90 90 90 90 90 90 90                         .........

0056e240  void ClientTradeSystem::NotifyServerThatTradeIsOutOfSync(class ClientTradeSystem* this @ ecx)

0056e240  {
0056e24d      void var_40;
0056e24d      CM_Trade::Event_AcceptTrade(Trade::Trade(&var_40));
0056e259      int32_t var_2c = 0x7cc3f8;
0056e261      PackableList<ContentProfile>::Flush(&var_2c);
0056e26a      var_2c = 0x79285c;
0056e272      int32_t var_3c = 0x7cc3f8;
0056e27a      PackableList<ContentProfile>::Flush(&var_3c);
0056e240  }

0056e283           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0056e290  int32_t MagicEnumMapper::SpellComponentCategoryFromString(char const* arg1, enum SpellComponentCategory* arg2)

0056e290  {
0056e297      if (arg1 == 0)
0056e29c          return 0;
0056e29c      
0056e2b1      if (_stricmp(arg1, "Scarab") != 0)
0056e2b1      {
0056e2d2          if (_stricmp(arg1, "Herb") == 0)
0056e2d2          {
0056e2d9              *(uint32_t*)arg2 = Herb_SpellComponentCategory;
0056e2e5              return 1;
0056e2d2          }
0056e2d2          
0056e2f3          if (_stricmp(arg1, "PowderedGem") == 0)
0056e2f3          {
0056e2fa              *(uint32_t*)arg2 = PowderedGem_SpellComponentCategory;
0056e306              return 1;
0056e2f3          }
0056e2f3          
0056e314          if (_stricmp(arg1, "Powder") == 0)
0056e314          {
0056e31b              *(uint32_t*)arg2 = PowderedGem_SpellComponentCategory;
0056e327              return 1;
0056e314          }
0056e314          
0056e335          if (_stricmp(arg1, "AlchemicalSubstance") == 0)
0056e335          {
0056e33c              *(uint32_t*)arg2 = AlchemicalSubstance_SpellComponentCategory;
0056e348              return 1;
0056e335          }
0056e335          
0056e356          if (_stricmp(arg1, "Potion") == 0)
0056e356          {
0056e35d              *(uint32_t*)arg2 = AlchemicalSubstance_SpellComponentCategory;
0056e369              return 1;
0056e356          }
0056e356          
0056e377          if (_stricmp(arg1, "Talisman") == 0)
0056e377          {
0056e37e              *(uint32_t*)arg2 = Talisman_SpellComponentCategory;
0056e38a              return 1;
0056e377          }
0056e377          
0056e398          if (_stricmp(arg1, "Taper") == 0)
0056e398          {
0056e39f              *(uint32_t*)arg2 = Taper_SpellComponentCategory;
0056e3ab              return 1;
0056e398          }
0056e398          
0056e3b9          if (_stricmp(arg1, &data_7d0080) == 0)
0056e3b9          {
0056e3c0              *(uint32_t*)arg2 = Pea_SpellComponentCategory;
0056e3cc              return 1;
0056e3b9          }
0056e3b9          
0056e3da          if (_stricmp(arg1, "Scarabs") != 0)
0056e3da          {
0056e3ed              if (_stricmp(arg1, "Herbs") == 0)
0056e3ed              {
0056e2d9                  *(uint32_t*)arg2 = Herb_SpellComponentCategory;
0056e2e5                  return 1;
0056e3ed              }
0056e3ed              
0056e400              if (_stricmp(arg1, "PowderedGems") == 0)
0056e400              {
0056e2fa                  *(uint32_t*)arg2 = PowderedGem_SpellComponentCategory;
0056e306                  return 1;
0056e400              }
0056e400              
0056e413              if (_stricmp(arg1, "Powders") == 0)
0056e413              {
0056e31b                  *(uint32_t*)arg2 = PowderedGem_SpellComponentCategory;
0056e327                  return 1;
0056e413              }
0056e413              
0056e426              if (_stricmp(arg1, "AlchemicalSubstances") == 0)
0056e426              {
0056e33c                  *(uint32_t*)arg2 = AlchemicalSubstance_SpellComponentCategory;
0056e348                  return 1;
0056e426              }
0056e426              
0056e439              if (_stricmp(arg1, "Potions") == 0)
0056e439              {
0056e35d                  *(uint32_t*)arg2 = AlchemicalSubstance_SpellComponentCategory;
0056e369                  return 1;
0056e439              }
0056e439              
0056e44c              if (_stricmp(arg1, "Talismans") == 0)
0056e44c              {
0056e37e                  *(uint32_t*)arg2 = Talisman_SpellComponentCategory;
0056e38a                  return 1;
0056e44c              }
0056e44c              
0056e45f              if (_stricmp(arg1, "Tapers") == 0)
0056e45f              {
0056e39f                  *(uint32_t*)arg2 = Taper_SpellComponentCategory;
0056e3ab                  return 1;
0056e45f              }
0056e45f              
0056e472              if (_stricmp(arg1, "Peas") != 0)
0056e47c                  return 0;
0056e47c              
0056e3c0              *(uint32_t*)arg2 = Pea_SpellComponentCategory;
0056e3cc              return 1;
0056e3da          }
0056e2b1      }
0056e2b1      
0056e2b8      *(uint32_t*)arg2 = Scarab_SpellComponentCategory;
0056e2c4      return 1;
0056e290  }

0056e47d                                                                                         90 90 90                               ...

0056e480  class ClientCommunicationSystem* ClientCommunicationSystem::GetCommunicationSystem()

0056e480  {
0056e485      return ClientCommunicationSystem::s_pCommunicationSystem;
0056e480  }

0056e486                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0056e490  void __fastcall ClientCommunicationSystem::OnBeginCharacterSession(class ClientCommunicationSystem* this)

0056e490  {
0056e492      if (this != 0)
0056e492      {
0056e497          QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(0xd, 0x6e, &this->vtable);
0056e4a7          return;
0056e492      }
0056e492      
0056e4a8      QualityRegistrar::s_pQR->vtable->RegisterQualityHandlerForThePlayer(0xd, 0x6e, 0);
0056e490  }

0056e4bb                                                                                   90 90 90 90 90                             .....

0056e4c0  void __fastcall ClientCommunicationSystem::OnEndCharacterSession(class ClientCommunicationSystem* this)

0056e4c0  {
0056e4c2      if (this != 0)
0056e4c2      {
0056e4c7          QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(0xd, 0x6e, &this->vtable);
0056e4d7          return;
0056e4c2      }
0056e4c2      
0056e4d8      QualityRegistrar::s_pQR->vtable->UnRegisterQualityHandlerForThePlayer(0xd, 0x6e, 0);
0056e4c0  }

0056e4eb                                   90 90 90 90 90                                                             .....

0056e4f0  uint32_t __stdcall ClientCommunicationSystem::Handle_Communication__Recv_ChatRoomTracker(class ClientCommunicationSystem* this @ ecx, class ChatRoomTracker const* arg2)

0056e4f0  {
0056e4f5      gmCCommunicationSystem::SetChatRoomTracker(arg2);
0056e4fd      class ChatRoomTracker* eax = gmCCommunicationSystem::GetChatRoomTracker();
0056e4fd      
0056e504      if (eax != 0)
0056e504      {
0056e509          int32_t eax_1 = CInputManager::GetMouseX(eax);
0056e510          int32_t esi_2 = -(eax_1);
0056e514          int32_t esi_4 = -((esi_2 - esi_2));
0056e516          class ChatRoomTracker* ecx;
0056e516          ecx = esi_4 != 0;
0056e51c          gmCCommunicationSystem::SetTalkFocusEnabled(7, ecx);
0056e51c          
0056e52f          if ((gmCCommunicationSystem::WantsToBeInAllegChat() != 0 && esi_4 != 0))
0056e533              gmCCommunicationSystem::SetTalkFocus(7);
0056e504      }
0056e504      
0056e53e      return 0;
0056e4f0  }

0056e541     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0056e550  uint32_t __stdcall ClientCommunicationSystem::Handle_Communication__HearRangedSpeech(class ClientCommunicationSystem* this @ ecx, class AC1Legacy::PStringBase<char> const* arg2, class AC1Legacy::PStringBase<char> const* arg3, uint32_t arg4, float arg5, uint32_t arg6)

0056e550  {
0056e55c      uint32_t var_4 = arg6;
0056e561      float var_8 = arg5;
0056e562      uint32_t ecx_1 = arg2;
0056e566      uint32_t var_c = arg4;
0056e569      gmCCommunicationSystem::HandleRangedTalkEvent(arg3, arg4, ecx_1, ecx_1, arg3);
0056e573      return 0;
0056e550  }

0056e576                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0056e580  int32_t __fastcall ClientCommunicationSystem::IsMessageSpam(class ClientCommunicationSystem* this, int32_t arg2)

0056e580  {
0056e583      int32_t eax = Timer::get_real_time();
0056e588      int32_t m_LastSpamCheck = this->m_LastSpamCheck;
0056e590      this->m_LastSpamCheck = eax;
0056e590      
0056e596      if (m_LastSpamCheck == 0)
0056e59b          return 0;
0056e59b      
0056e5a9      int32_t m_ChatMessageCount = this->m_ChatMessageCount;
0056e5a9      this->m_ChatMessageCount += (1 - (eax - m_LastSpamCheck));
0056e5a9      
0056e5af      if ((m_ChatMessageCount + (1 - (eax - m_LastSpamCheck))) < 0)
0056e5b1          this->m_ChatMessageCount = 0;
0056e5b1      
0056e5c5      int32_t result;
0056e5c5      result = this->m_ChatMessageCount > 0;
0056e5c9      return result;
0056e580  }

0056e5cc                                      90 90 90 90                                                              ....

0056e5d0  uint8_t __stdcall ClientCommunicationSystem::HelpMessageTypes(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0056e5d0  {
0056e5d5      gmCCommunicationSystem::GetListofSquelchChannels(arg4);
0056e5dd      int32_t eax;
0056e5dd      eax = 1;
0056e5df      return 1;
0056e5d0  }

0056e5e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056e5f0  uint8_t ClientCommunicationSystem::DoBirth(class ClientCommunicationSystem* this @ ecx, int32_t arg2, char** arg3)

0056e5f0  {
0056e5fa      return CM_Character::Event_QueryBirth(0);
0056e5f0  }

0056e5fd                                                                                         90 90 90                               ...

0056e600  uint8_t __thiscall ClientCommunicationSystem::DoClear(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056e600  {
0056e607      uint32_t m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0056e607      
0056e60d      if ((arg2 != 0 && _stricmp(*(uint32_t*)arg3, &data_7d00d8) == 0))
0056e628          m_idCurrentCommandSource = 0;
0056e628      
0056e62b      CM_UI::SendNotice_ClearChatBuffer(m_idCurrentCommandSource);
0056e633      int32_t eax_2;
0056e633      eax_2 = 1;
0056e636      return 1;
0056e600  }

0056e639                                                                             90 90 90 90 90 90 90                           .......

0056e640  uint8_t ClientCommunicationSystem::DoChannelIndex(class ClientCommunicationSystem* this @ ecx, int32_t arg2, char** arg3)

0056e640  {
0056e645      return CM_Communication::Event_ChannelIndex();
0056e640  }

0056e648                          90 90 90 90 90 90 90 90                                                          ........

0056e650  uint8_t ClientCommunicationSystem::EnableChatTalkFocuses(class ClientCommunicationSystem* this @ ecx)

0056e650  {
0056e650      class ClientCommunicationSystem* this_1 = this;
0056e651      int32_t eax = CCommunicationSystem::IsUsingTurbineChat();
0056e651      
0056e658      if (eax == 0)
0056e658      {
0056e65d          gmCCommunicationSystem::SetTalkFocusEnabled(8, eax);
0056e666          gmCCommunicationSystem::SetTalkFocusEnabled(9, 0);
0056e66f          gmCCommunicationSystem::SetTalkFocusEnabled(0xa, 0);
0056e678          gmCCommunicationSystem::SetTalkFocusEnabled(0xb, 0);
0056e681          gmCCommunicationSystem::SetTalkFocusEnabled(0xc, 0);
0056e68a          gmCCommunicationSystem::SetTalkFocusEnabled(0xd, 0);
0056e692          int32_t eax_1;
0056e692          eax_1 = 0;
0056e695          return 0;
0056e658      }
0056e658      
0056e6a3      this_1 = PlayerModule::HearGeneralChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0056e6ae      gmCCommunicationSystem::SetTalkFocusEnabled(8, this_1);
0056e6c3      this_1 = PlayerModule::HearTradeChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0056e6ce      gmCCommunicationSystem::SetTalkFocusEnabled(9, this_1);
0056e6e3      this_1 = PlayerModule::HearLFGChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0056e6ee      gmCCommunicationSystem::SetTalkFocusEnabled(0xa, this_1);
0056e703      this_1 = PlayerModule::HearRoleplayChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0056e70e      gmCCommunicationSystem::SetTalkFocusEnabled(0xb, this_1);
0056e723      this_1 = PlayerModule::HearSocietyChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0056e72e      gmCCommunicationSystem::SetTalkFocusEnabled(0xc, this_1);
0056e73d      this_1 = CPlayerSystem::IsOlthoi() != 0;
0056e748      gmCCommunicationSystem::SetTalkFocusEnabled(0xd, this_1);
0056e750      int32_t eax_16;
0056e750      eax_16 = 1;
0056e753      return 1;
0056e650  }

0056e754                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0056e760  uint8_t PStringBaseIter_Common<char>::FindSubStringIter(char const* arg1, char const* arg2)

0056e760  {
0056e763      char const* esi = arg2;
0056e76b      int32_t eax;
0056e76b      
0056e76b      if (*(uint8_t*)esi != 0)
0056e76b      {
0056e773          char const* edi_1 = arg1;
0056e773          
0056e799          do
0056e799          {
0056e777              eax = *(uint8_t*)edi_1;
0056e777              
0056e77b              if (eax == 0)
0056e77b              {
0056e7a5                  eax = 0;
0056e7a8                  return 0;
0056e77b              }
0056e77b              
0056e790              if (tolower(((int32_t)eax)) != tolower(((int32_t)*(uint8_t*)esi)))
0056e790              {
0056e7a5                  eax = 0;
0056e7a8                  return 0;
0056e790              }
0056e790              
0056e792              eax = esi[1];
0056e795              edi_1 = &edi_1[1];
0056e796              esi = &esi[1];
0056e799          } while (eax != 0);
0056e76b      }
0056e76b      
0056e79e      eax = 1;
0056e7a1      return 1;
0056e760  }

0056e7a9                             90 90 90 90 90 90 90                                                           .......

0056e7b0  uint32_t __fastcall ClientUISystem::AddRef(class ClientUISystem const* this)

0056e7b0  {
0056e7ba      return InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
0056e7b0  }

0056e7bb                                                                                   90 90 90 90 90                             .....

0056e7c0  class TResult* __thiscall ClientCommunicationSystem::QueryInterface(class ClientCommunicationSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

0056e7c0  {
0056e7d3      int32_t* key;
0056e7d3      
0056e7d3      if ((1 & (*(uint8_t*)$S197)) != 0)
0056e821          key = Offsets[0].key;
0056e7d3      else
0056e7d3      {
0056e7dd          key = &ClientCommunicationSystem_InterfaceType;
0056e7e2          $S197 |= 1;
0056e7e8          Offsets[0].key = 0x7cfea8;
0056e7ed          Offsets[0].ofs = 0;
0056e7f3          Offsets[1].key = 0x7cfe78;
0056e7fd          Offsets[1].ofs = 0;
0056e803          Offsets[2].key = 0x7d0008;
0056e80d          Offsets[2].ofs = 0;
0056e813          Offsets[3].key = 0;
0056e819          Offsets[3].ofs = 0;
0056e7d3      }
0056e7d3      
0056e828      void* edx_3 = &Offsets;
0056e828      
0056e82d      while (key != 0)
0056e82d      {
0056e84f          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0056e84f          {
0056e872              if (arg4 != 0)
0056e872              {
0056e874                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0056e87e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
0056e881                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
0056e872              }
0056e872              
0056e88a              __return->m_val = 0;
0056e88d              return __return;
0056e84f          }
0056e84f          
0056e851          key = *(uint32_t*)((char*)edx_3 + 8);
0056e854          edx_3 += 8;
0056e82d      }
0056e82d      
0056e862      __return->m_val = 0x80004002;
0056e869      return __return;
0056e7c0  }


0056e890  void __thiscall ClientCommunicationSystem::RecvNotice_DisplayStringInfo(class ClientCommunicationSystem* this, uint32_t arg2, class StringInfo const* arg3)

0056e890  {
0056e8b0      ClientSystem::AddTextToScroll(((char*)this - 4), StringInfo::GetString(arg3, &arg2, 0), arg2, 1, 0);
0056e8b9      int32_t* esi_2 = (arg2 - 0x14);
0056e8b9      
0056e8cc      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056e8d4          **(uint32_t**)esi_2(1);
0056e890  }

0056e8da                                                                                90 90 90 90 90 90                            ......

0056e8e0  void __fastcall ClientCommunicationSystem::RecvNotice_PlayerDescReceived(class ClientCommunicationSystem* this, class CACQualities const* arg2, class CPlayerModule const* arg3)

0056e8e0  {
0056e8e3      ClientCommunicationSystem::EnableChatTalkFocuses(((char*)this - 4));
0056e8e0  }

0056e8eb                                   90 90 90 90 90                                                             .....

0056e8f0  void __thiscall ClientCommunicationSystem::RecvNotice_PlayerOptionChanged(class ClientCommunicationSystem* this, enum PlayerOption arg2)

0056e8f0  {
0056e90b      if (((((arg2 == HearGeneralChat_PlayerOption || arg2 == HearTradeChat_PlayerOption) || arg2 == HearLFGChat_PlayerOption) || arg2 == HearRoleplayChat_PlayerOption) || arg2 == HearSocietyChat_PlayerOption))
0056e910          ClientCommunicationSystem::EnableChatTalkFocuses(((char*)this - 4));
0056e8f0  }

0056e918                                                                          90 90 90 90 90 90 90 90                          ........

0056e920  void* __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* this, uint32_t arg2)

0056e920  {
0056e923      class ClientCommunicationSystem::CmdHashData** m_buckets = this->m_buckets;
0056e92b      this->vtable = 0x7d00dc;
0056e92b      
0056e931      if (m_buckets != &this->m_aInplaceBuckets)
0056e934          operator delete[](m_buckets);
0056e934      
0056e93e      this->m_buckets = nullptr;
0056e941      this->m_firstInterestingBucket = nullptr;
0056e944      this->m_numBuckets = 0;
0056e947      this->m_numElements = 0;
0056e947      
0056e94f      if ((arg2 & 1) != 0)
0056e952          operator delete(this);
0056e952      
0056e95d      return this;
0056e920  }


0056e960  uint8_t __thiscall PStringBaseIter_Common<char>::FindSubString(class PStringBaseIter_Common<char>* this, class PStringBase<char> const* arg2, uint8_t arg3)

0056e960  {
0056e967      int32_t eax_1 = arg2->m_charbuffer->m_data[-4];
0056e967      
0056e970      if (eax_1 == 1)
0056e970      {
0056e973          eax_1 = eax_1;
0056e976          return eax_1;
0056e970      }
0056e970      
0056e97a      int32_t ebp = (eax_1 - 1);
0056e97d      eax_1 = arg3;
0056e97d      
0056e984      if (eax_1 == 0)
0056e984      {
0056e9f2          while (true)
0056e9f2          {
0056e9fc              if (PStringBaseIter_Common<char>::FindSubStringIter(this->vtable->IndexToConstPointer(this->curr), arg2->m_charbuffer) != 0)
0056e9fc              {
0056ea2a                  this->mark = (this->curr + ebp);
0056ea2e                  int32_t eax_12;
0056ea2e                  eax_12 = 1;
0056ea31                  return 1;
0056e9fc              }
0056e9fc              
0056ea05              uint32_t edi_2 = (this->curr + 1);
0056ea05              
0056ea0a              if (edi_2 > this->vtable->GetStrLen())
0056ea0a                  break;
0056ea0a              
0056ea0c              this->curr = edi_2;
0056e9f2          }
0056e9f2          
0056ea19          this->curr = this->vtable->GetStrLen();
0056ea1d          uint32_t eax_10;
0056ea1d          eax_10 = 0;
0056ea20          return 0;
0056e984      }
0056e984      
0056e98a      if (ebp < 0)
0056e98f          PStringBaseIter_Common<char>::Next(this, ebp);
0056e98f      
0056e994      uint32_t curr = this->curr;
0056e994      
0056e999      if (ebp <= curr)
0056e999      {
0056e9aa          int32_t eax_2 = (curr - ebp);
0056e9aa          
0056e9ac          while (true)
0056e9ac          {
0056e9ac              struct PStringBaseIter_Common<char>::VTable* vtable = this->vtable;
0056e9b1              this->curr = eax_2;
0056e9b1              
0056e9c5              if (PStringBaseIter_Common<char>::FindSubStringIter(vtable->IndexToConstPointer(eax_2), arg2->m_charbuffer) != 0)
0056e9c5              {
0056e9d9                  this->mark = (this->curr + ebp);
0056e9e0                  return 1;
0056e9c5              }
0056e9c5              
0056e9c7              curr = this->curr;
0056e9c7              
0056e9cd              if (curr < 1)
0056e9cd                  break;
0056e9cd              
0056e9cf              eax_2 = (curr - 1);
0056e9ac          }
0056e999      }
0056e999      else
0056e99b          this->curr = 0;
0056e99b      
0056e99e      this->curr = 0;
0056e9a4      curr = 0;
0056e9a7      return 0;
0056e960  }

0056ea34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0056ea40  uint8_t __convention("regparm") PSUtils::is_int32(class PStringBase<char> arg1)

0056ea40  {
0056ea40      char* ecx;
0056ea40      char* var_4 = ecx;
0056ea4a      var_4 = nullptr;
0056ea58      *(uint32_t*)_errno() = 0;
0056ea66      strtol(arg1, &var_4, 0);
0056ea77      int32_t ebx;
0056ea77      
0056ea77      if (*(uint8_t*)var_4 != 0)
0056ea84          ebx = 0;
0056ea77      else if (*(uint32_t*)_errno() == 0x22)
0056ea84          ebx = 0;
0056ea7e      else
0056ea80          ebx = 1;
0056ea80      
0056ea99      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
0056eaa1          **(uint32_t**)(arg1 - 0x14)(1);
0056eaa1      
0056eaa5      int32_t eax_3;
0056eaa5      eax_3 = ebx;
0056eaa9      return eax_3;
0056ea40  }

0056eaaa                                90 90 90 90 90 90                                                            ......

0056eab0  void __fastcall ClientCommunicationSystem::~ClientCommunicationSystem(class ClientCommunicationSystem* this)

0056eab0  {
0056eab9      this->vtable = 0x7d0390;
0056eab5      this->vtable = &ClientCommunicationSystem::`vftable';
0056eac6      this->vtable = &ClientCommunicationSystem::`vftable';
0056eacd      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0056eacd      
0056ead4      if (eax != 0)
0056ead6          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0056ead6      
0056eaea      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_strLogName.m_charbuffer - 0x14);
0056eaea      
0056eaf9      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0056eb01          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0056eb01      
0056eb09      void* __offset(PSRefBufferCharData<char>, -0x14) edi_3 = (this->m_strCurrentCommand.m_charbuffer - 0x14);
0056eb09      
0056eb18      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0056eb20          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0056eb20      
0056eb28      void* __offset(PSRefBufferCharData<char>, -0x14) edi_5 = (this->m_strLastCommandLine.m_charbuffer - 0x14);
0056eb28      
0056eb39      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
0056eb41          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
0056eb41      
0056eb43      class ClientCommunicationSystem::CmdHashData** m_buckets = this->m_hashCommands.m_buckets;
0056eb4b      this->m_hashCommands.vtable = 0x7d00dc;
0056eb4b      
0056eb52      if (m_buckets != &this->m_hashCommands.m_aInplaceBuckets)
0056eb55          operator delete[](m_buckets);
0056eb55      
0056eb5d      this->m_hashCommands.m_buckets = nullptr;
0056eb60      this->m_hashCommands.m_firstInterestingBucket = nullptr;
0056eb63      this->m_hashCommands.m_numBuckets = 0;
0056eb66      this->m_hashCommands.m_numElements = 0;
0056eb6d      this->m_cTurbineRefCount.vtable = 0x792b6c;
0056eab5      this->vtable = &gmUrgentAssistanceUI::`vftable';
0056eb80      /* tailcall */
0056eb80      return NoticeHandler::~NoticeHandler(&this->vtable);
0056eab0  }

0056eb85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0056eb90  uint32_t __stdcall ClientCommunicationSystem::Handle_Communication__SetSquelchDB(class ClientCommunicationSystem* this @ ecx, class SquelchDB const* arg2)

0056eb90  {
0056eb96      gmCCommunicationSystem::SetSquelchDB(arg2);
0056eb9b      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0056eb9b      
0056eba6      if (ACCWeenieObject::selectedID_1 != 0)
0056eba6      {
0056ebb1          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_7928af);
0056ebbe          gmCCommunicationSystem::IsSquelched(ACCWeenieObject::selectedID_1, &arg2, 1);
0056ebc3          class SquelchDB* esi = arg2;
0056ebc3          
0056ebda          if ((InterlockedDecrement(&esi->_account_hash) == 0 && esi != 0))
0056ebdc              esi->vtable->__vecDelDtor(1);
0056eba6      }
0056eba6      
0056ebe7      return 0;
0056eb90  }

0056ebea                                90 90 90 90 90 90                                                            ......

0056ebf0  void __thiscall AC1Legacy::PStringBase<char>::trim(class AC1Legacy::PStringBase<char>* this, int32_t arg2, int32_t arg3, class AC1Legacy::PStringBase<char> arg4)

0056ebf0  {
0056ebf0      class AC1Legacy::PStringBase<char>* this_1 = this;
0056ebf1      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
0056ec00      char (* edi)[0x1] = &m_buffer->m_data;
0056ec07      uint32_t i_1 = (m_buffer->m_len - 1);
0056ec07      
0056ec0e      if (arg2 != 0)
0056ec0e      {
0056ec10          int32_t eax;
0056ec10          eax = ADJ(edi)->m_data;
0056ec10          
0056ec14          while (eax != 0)
0056ec14          {
0056ec2c              if (strchr((arg4 + 0x14), ((int32_t)eax)) == 0)
0056ec2c                  break;
0056ec2c              
0056ec2e              eax = *(int8_t*)((char*)ADJ(edi) + 0x15);
0056ec31              edi = &edi[1];
0056ec32              i_1 -= 1;
0056ec14          }
0056ec0e      }
0056ec0e      
0056ec41      if ((arg3 != 0 && i_1 > 0))
0056ec41      {
0056ec61          uint32_t i;
0056ec61          
0056ec61          do
0056ec61          {
0056ec5e              if (strchr((arg4 + 0x14), ((int32_t)edi[(i_1 - 1)])) == 0)
0056ec5e                  break;
0056ec5e              
0056ec60              i = i_1;
0056ec60              i_1 -= 1;
0056ec61          } while (i != 1);
0056ec41      }
0056ec41      
0056ec67      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_buffer;
0056ec76      int32_t eax_5;
0056ec76      class AC1Legacy::PStringBase<char> esi_1;
0056ec76      
0056ec76      if ((edi != &m_buffer_1->m_data || i_1 != (m_buffer_1->m_len - 1)))
0056ec76      {
0056ec91          InterlockedIncrement(&m_buffer_1->m_cRef);
0056ec9b          class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->m_buffer;
0056eca3          class AC1Legacy::PStringBase<char>* this_2;
0056eca3          
0056eca3          if (m_buffer_2 == AC1Legacy::PStringBase<char>::s_NullBuffer)
0056ecd8              this_2 = this;
0056eca3          else
0056eca3          {
0056ecb5              if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
0056ecb7                  m_buffer_2->vtable->__vecDelDtor(1);
0056ecb7              
0056ecbf              class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056ecc4              this_2 = this;
0056ecce              this_2->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0056ecd0              InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
0056eca3          }
0056eca3          
0056ecde          if (i_1 != 0)
0056ece4              AC1Legacy::PStringBase<char>::append_n_chars(this_2, edi, i_1);
0056ece4          
0056ecfb          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
0056ecfd              m_buffer_1->vtable->__vecDelDtor(1);
0056ecfd          
0056ed06          esi_1 = arg4;
0056ed0e          eax_5 = InterlockedDecrement((esi_1 + 4));
0056ec76      }
0056ec76      else
0056ec76      {
0056ec78          esi_1 = arg4;
0056ec80          eax_5 = InterlockedDecrement((esi_1 + 4));
0056ec76      }
0056ec76      
0056ed16      if ((eax_5 == 0 && esi_1 != 0))
0056ed1e          **(uint32_t**)esi_1(1);
0056ebf0  }

0056ed28                          90 90 90 90 90 90 90 90                                                          ........

0056ed30  void __thiscall ClientCommunicationSystem::CmdHashData::CmdHashData(class ClientCommunicationSystem::CmdHashData* this, class CaseInsensitiveStringBase<PStringBase<char> > const* arg2, uint8_t (__thiscall* arg3)(class ClientCommunicationSystem* this, int32_t, char**), uint8_t (__thiscall* arg4)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType, char const*, class PStringBase<char>*))

0056ed30  {
0056ed34      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0056ed39      this->m_hashKey.m_charbuffer = m_charbuffer;
0056ed3f      InterlockedIncrement(&m_charbuffer[-1]);
0056ed51      this->func = arg3;
0056ed58      this->help = arg_10;
0056ed5b      this->m_hashNext = nullptr;
0056ed62      *(int32_t*)((char*)this + 0xc) = arg4;
0056ed65      *(int32_t*)((char*)this + 0x14) = arg_14;
0056ed30  }

0056ed6e                                            90 90                                                                ..

0056ed70  int32_t __stdcall ClientCommunicationSystem::IsMessageSafe(class ClientCommunicationSystem const* this @ ecx, class PStringBase<char> const* arg2)

0056ed70  {
0056ed77      class PStringBase<char>* edi = arg2;
0056ed7b      class PSRefBufferCharData<char>* m_charbuffer = edi->m_charbuffer;
0056ed7d      arg2 = m_charbuffer;
0056ed85      InterlockedIncrement(&m_charbuffer[-1]);
0056ed8f      PStringBase<char>::break_reference(&arg2);
0056ed99      _strlwr(arg2);
0056edab      void* var_8;
0056edab      PStringBase<char>::PStringBase<char>(&var_8, &ClientCommunicationSystem::`vftable'.RecvNotice_CreateObject);
0056edc0      int32_t eax_2 = strstr(arg2, var_8);
0056edc7      void* eax_3;
0056edc7      
0056edc7      if (eax_2 != 0)
0056edce          eax_3 = (eax_2 - arg2);
0056edc7      else
0056edc9          eax_3 = 0xffffffff;
0056edc9      
0056ede1      int32_t ecx_3;
0056ede1      ecx_3 = eax_3 != 0xffffffff;
0056ede4      int32_t* esi_1 = ((char*)var_8 - 0x14);
0056ede4      
0056edf7      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0056edff          **(uint32_t**)esi_1(1);
0056edff      
0056ee0a      PStringBase<char>::PStringBase<char>(&var_8, &data_794508);
0056ee17      int32_t eax_7 = strstr(edi->m_charbuffer, var_8);
0056ee1e      void* eax_8;
0056ee1e      
0056ee1e      if (eax_7 != 0)
0056ee25          eax_8 = (eax_7 - edi->m_charbuffer);
0056ee1e      else
0056ee20          eax_8 = 0xffffffff;
0056ee20      
0056ee30      int32_t edx_2;
0056ee30      edx_2 = eax_8 != 0xffffffff;
0056ee33      void* esi_3 = ((char*)var_8 - 0x14);
0056ee33      
0056ee44      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0056ee4c          **(uint32_t**)esi_3(1);
0056ee4c      
0056ee58      int32_t result;
0056ee58      
0056ee58      if ((ecx_3 != 0 || edx_2 != 0))
0056ee61          result = 0;
0056ee58      else
0056ee5a          result = 1;
0056ee5a      
0056ee67      void* __offset(PStringBase<char>, -0x14) esi_5 = &arg2[-5];
0056ee67      
0056ee76      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0056ee7e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0056ee7e      
0056ee89      return result;
0056ed70  }

0056ee8c                                      90 90 90 90                                                              ....

0056ee90  class PStringBase<char>* __convention("regparm") NextArg(class PStringBase<char>* __return, int32_t* arg2, char*** arg3)

0056ee90  {
0056ee90      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4;
0056ee90      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_4;
0056ee91      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0056ee9d      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0056eea6      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0056eea6      
0056eeaf      if (*(uint32_t*)arg2 != 0)
0056eeaf      {
0056eebf          PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_2, **(uint32_t**)arg3);
0056eec4          *(uint32_t*)arg2 -= 1;
0056eec6          *(uint32_t*)arg3 = &*(uint32_t*)arg3[1];
0056eeaf      }
0056eeaf      
0056eeca      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0056eed2      __return->m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0056eed8      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
0056eede      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0056eede      
0056eef1      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0056eef9          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0056eef9      
0056ef00      return __return;
0056ee90  }

0056ef01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0056ef10  uint8_t __thiscall ClientCommunicationSystem::DoAllegianceHometown(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056ef10  {
0056ef19      if (arg2 == 0)
0056ef6d          return CM_Allegiance::Event_RecallAllegianceHometown();
0056ef6d      
0056ef24      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_DisplayFinalStringInfo);
0056ef3b      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056ef44      int32_t* esi_2 = (arg2 - 0x14);
0056ef44      
0056ef57      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056ef5f          **(uint32_t**)esi_2(1);
0056ef5f      
0056ef61      int32_t eax_1;
0056ef61      eax_1 = 1;
0056ef64      return 1;
0056ef10  }


0056ef70  uint8_t __thiscall ClientCommunicationSystem::DoAllegianceHouse(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056ef70  {
0056ef70      int32_t __return_1 = arg2;
0056ef70      
0056ef7a      if (__return_1 < 2)
0056ef89          return CM_Allegiance::Event_DoAllegianceHouseAction(1);
0056ef89      
0056ef94      char*** var_1c = &arg3;
0056ef99      int32_t* var_20 = &arg2;
0056ef9e      void* var_4;
0056ef9e      int32_t* var_24 = &var_4;
0056efa4      int32_t* edx;
0056efa4      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return_1, edx, this)->m_charbuffer;
0056efac      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0056efb7      InterlockedIncrement(&m_charbuffer[-1]);
0056efc3      int32_t* edi_1 = ((char*)var_4 - 0x14);
0056efca      int32_t __return;
0056efca      char*** ecx;
0056efca      int32_t* edx_1;
0056efca      __return = InterlockedDecrement(&edi_1[1]);
0056efca      
0056efd2      if ((__return == 0 && edi_1 != 0))
0056efda          __return = **(uint32_t**)edi_1(1);
0056efda      
0056efe0      char*** var_1c_3 = &arg3;
0056efe5      int32_t* var_20_1 = &arg2;
0056efea      int32_t* var_24_1 = &var_4;
0056eff0      class PSRefBufferCharData<char>* m_charbuffer_1 = NextArg(__return, edx_1, ecx)->m_charbuffer;
0056eff9      arg2 = m_charbuffer_1;
0056effd      InterlockedIncrement(&m_charbuffer_1[-1]);
0056f003      void* edi_3 = ((char*)var_4 - 0x14);
0056f003      
0056f012      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0056f01a          **(uint32_t**)edi_3(1);
0056f01a      
0056f025      PStringBase<char>::PStringBase<char>(&arg3, &ClientCommunicationSystem::`vftable'.RecvNotice_Augmentation_ConfirmationRequest);
0056f035      int32_t eax_7 = PStringBase<char>::cmp(&m_charbuffer_2, &arg3, 0);
0056f040      char ebx_1 = ((int8_t)-(eax_7));
0056f044      void* edi_5 = &arg3[-5];
0056f044      
0056f055      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
0056f05d          **(uint32_t**)edi_5(1);
0056f05d      
0056f061      char*** ecx_8 = &arg3;
0056f065      uint32_t var_1c_11;
0056f065      char ebx_5;
0056f065      
0056f065      if ((ebx_1 - ebx_1) == 0xff)
0056f065      {
0056f176          PStringBase<char>::PStringBase<char>(ecx_8, &ClientCommunicationSystem::`vftable'.RecvNotice_AbuseReportResponse);
0056f186          int32_t eax_19 = PStringBase<char>::cmp(&m_charbuffer_2, &arg3, 0);
0056f191          char ebx_7 = ((int8_t)-(eax_19));
0056f195          void* edi_14 = &arg3[-5];
0056f195          
0056f1a6          if ((InterlockedDecrement(((char*)edi_14 + 4)) == 0 && edi_14 != 0))
0056f1ae              **(uint32_t**)edi_14(1);
0056f1ae          
0056f1b2          if ((ebx_7 - ebx_7) != 0xff)
0056f1b2          {
0056f1c1              PStringBase<char>::PStringBase<char>(&arg3, "open");
0056f1d1              int32_t eax_21 = PStringBase<char>::cmp(&arg2, &arg3, 0);
0056f1dc              ebx_5 = ((int8_t)-(eax_21));
0056f1e0              void* edi_16 = &arg3[-5];
0056f1e0              
0056f1f1              if ((InterlockedDecrement(((char*)edi_16 + 4)) == 0 && edi_16 != 0))
0056f1f9                  **(uint32_t**)edi_16(1);
0056f1f9              
0056f1fd              if ((ebx_5 - ebx_5) != 0xff)
0056f1fd              {
0056f1ff                  var_1c_11 = 4;
0056f149              label_56f149:
0056f149                  char result = CM_Allegiance::Event_DoAllegianceHouseAction(var_1c_11);
0056f157                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0056f160                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_2);
0056f16e                  return result;
0056f1fd              }
0056f1fd              
0056f20f              PStringBase<char>::PStringBase<char>(&arg3, &ClientCommunicationSystem::`vftable'.RecvNotice_AlterAttribute_ConfirmationRequest);
0056f21f              int32_t eax_23 = PStringBase<char>::cmp(&arg2, &arg3, 0);
0056f226              ebx_5 = ((int8_t)-(eax_23));
0056f230              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056f230              
0056f237              if ((ebx_5 - ebx_5) != 0xff)
0056f237              {
0056f239                  var_1c_11 = 5;
0056f23b                  goto label_56f149;
0056f237              }
0056f1b2          }
0056f065      }
0056f065      else
0056f065      {
0056f070          PStringBase<char>::PStringBase<char>(ecx_8, "open");
0056f080          int32_t eax_9 = PStringBase<char>::cmp(&arg2, &arg3, 0);
0056f08b          char ebx_3 = ((int8_t)-(eax_9));
0056f08f          void* edi_7 = &arg3[-5];
0056f08f          
0056f0a0          if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
0056f0a8              **(uint32_t**)edi_7(1);
0056f0a8          
0056f0ac          if ((ebx_3 - ebx_3) != 0xff)
0056f0ac          {
0056f0b0              uint8_t eax_11 = CM_Allegiance::Event_DoAllegianceHouseAction(2);
0056f0b0              
0056f0c9              if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0056f0d1                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0056f0d1              
0056f0d7              void* __offset(PSRefBufferCharData<char>, -0x14) edi_10 = &m_charbuffer_2->m_data[0xffffffec];
0056f0d7              
0056f0e6              if ((InterlockedDecrement(((char*)edi_10 + 4)) == 0 && edi_10 != 0))
0056f0ee                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_10) + -0x14)(1);
0056f0ee              
0056f0f3              int32_t eax_15;
0056f0f3              eax_15 = eax_11;
0056f0f9              return eax_15;
0056f0ac          }
0056f0ac          
0056f105          PStringBase<char>::PStringBase<char>(&arg3, &ClientCommunicationSystem::`vftable'.RecvNotice_AlterAttribute_ConfirmationRequest);
0056f115          int32_t eax_16 = PStringBase<char>::cmp(&arg2, &arg3, 0);
0056f120          ebx_5 = ((int8_t)-(eax_16));
0056f124          void* edi_12 = &arg3[-5];
0056f124          
0056f135          if ((InterlockedDecrement(((char*)edi_12 + 4)) == 0 && edi_12 != 0))
0056f13d              **(uint32_t**)edi_12(1);
0056f13d          
0056f141          if ((ebx_5 - ebx_5) != 0xff)
0056f141          {
0056f147              var_1c_11 = 3;
0056f147              goto label_56f149;
0056f141          }
0056f065      }
0056f065      
0056f24f      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0056f257          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0056f257      
0056f25d      void* __offset(PSRefBufferCharData<char>, -0x14) edi_19 = &m_charbuffer_2->m_data[0xffffffec];
0056f25d      
0056f26c      if ((InterlockedDecrement(((char*)edi_19 + 4)) == 0 && edi_19 != 0))
0056f274          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_19) + -0x14)(1);
0056f274      
0056f279      int32_t eax_26;
0056f279      eax_26 = 0;
0056f27f      return 0;
0056ef70  }

0056f282        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056f290  uint8_t __stdcall ClientCommunicationSystem::HelpStupidChannelHack(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0056f290  {
0056f296      char const* esi = arg3;
0056f2a9      class AC1Legacy::PStringBase<char> var_28;
0056f2a9      class AC1Legacy::PStringBase<char>* var_3c_1 = &var_28;
0056f2aa      uint32_t eax = ChannelSystem::GetChannelID(AC1Legacy::PStringBase<char>::PStringBase<char>(&var_28, esi));
0056f2b7      class AC1Legacy::PStringBase<char> eax_1 = var_28;
0056f2b7      
0056f2cc      if ((InterlockedDecrement((eax_1 + 4)) == 0 && eax_1 != 0))
0056f2d4          **(uint32_t**)eax_1(1);
0056f2d4      
0056f2d6      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0056f2db      arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0056f2e3      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0056f2ef      ChannelSystem::GetChannelName(eax, &arg3);
0056f300      void* var_18;
0056f300      PStringBase<char>::PStringBase<char>(&var_18, &ClientCommunicationSystem::`vftable'.RecvNotice_StartBarberNotice);
0056f311      class PStringBase<char> var_1c;
0056f311      PStringBase<char>::PStringBase<char>(&var_1c, &arg3[0x14]);
0056f31f      void* var_20;
0056f31f      PStringBase<char>::PStringBase<char>(&var_20, &ClientCommunicationSystem::`vftable'.RecvNotice_CraftInteraction_ConfirmationRequest);
0056f329      class PStringBase<char> var_24;
0056f329      PStringBase<char>::PStringBase<char>(&var_24, esi);
0056f337      PStringBase<char>::PStringBase<char>(&var_28, &ClientCommunicationSystem::`vftable'.RecvNotice_ChangeRadarLook);
0056f390      void* __return;
0056f390      class PStringBase<char> __return_1;
0056f390      class PStringBase<char> __return_2;
0056f390      class PStringBase<char> __return_3;
0056f390      class PStringBase<char> __return_4;
0056f390      class PStringBase<char>* eax_9 = PStringBase<char>::operator+(PStringBase<char>::operator+(PStringBase<char>::operator+(PStringBase<char>::operator+(PStringBase<char>::operator+(arg4, &__return_4, &var_28), &__return_3, &var_24), &__return_2, &var_20), &__return_1, &var_1c), &__return, &var_18);
0056f397      class PSRefBufferCharData<char>* m_charbuffer = arg4->m_charbuffer;
0056f397      
0056f39b      if (m_charbuffer != eax_9->m_charbuffer)
0056f39b      {
0056f3ac          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0056f3b4              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0056f3b4          
0056f3b6          class PStringBase<char> m_charbuffer_1 = eax_9->m_charbuffer;
0056f3b8          arg4->m_charbuffer = m_charbuffer_1;
0056f3be          InterlockedIncrement((m_charbuffer_1 - 0x10));
0056f39b      }
0056f39b      
0056f3c8      int32_t* esi_3 = ((char*)__return - 0x14);
0056f3c8      
0056f3d7      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0056f3df          **(uint32_t**)esi_3(1);
0056f3df      
0056f3e5      int32_t* esi_5 = (__return_1 - 0x14);
0056f3e5      
0056f3f4      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0056f3fc          **(uint32_t**)esi_5(1);
0056f3fc      
0056f402      int32_t* esi_7 = (__return_2 - 0x14);
0056f402      
0056f411      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
0056f419          **(uint32_t**)esi_7(1);
0056f419      
0056f41f      int32_t* esi_9 = (__return_3 - 0x14);
0056f41f      
0056f42e      if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
0056f436          **(uint32_t**)esi_9(1);
0056f436      
0056f43c      int32_t* esi_11 = (__return_4 - 0x14);
0056f43c      
0056f44b      if ((InterlockedDecrement(&esi_11[1]) == 0 && esi_11 != 0))
0056f453          **(uint32_t**)esi_11(1);
0056f453      
0056f459      int32_t* esi_13 = (var_28 - 0x14);
0056f459      
0056f468      if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
0056f470          **(uint32_t**)esi_13(1);
0056f470      
0056f476      int32_t* esi_15 = (var_24 - 0x14);
0056f476      
0056f485      if ((InterlockedDecrement(&esi_15[1]) == 0 && esi_15 != 0))
0056f48d          **(uint32_t**)esi_15(1);
0056f48d      
0056f493      int32_t* esi_17 = ((char*)var_20 - 0x14);
0056f493      
0056f4a2      if ((InterlockedDecrement(&esi_17[1]) == 0 && esi_17 != 0))
0056f4aa          **(uint32_t**)esi_17(1);
0056f4aa      
0056f4b0      int32_t* esi_19 = (var_1c - 0x14);
0056f4b0      
0056f4bf      if ((InterlockedDecrement(&esi_19[1]) == 0 && esi_19 != 0))
0056f4c7          **(uint32_t**)esi_19(1);
0056f4c7      
0056f4cd      int32_t* esi_21 = ((char*)var_18 - 0x14);
0056f4cd      
0056f4dc      if ((InterlockedDecrement(&esi_21[1]) == 0 && esi_21 != 0))
0056f4e4          **(uint32_t**)esi_21(1);
0056f4e4      
0056f4e6      char const* esi_22 = arg3;
0056f4e6      
0056f4f6      if ((InterlockedDecrement(&esi_22[4]) == 0 && esi_22 != 0))
0056f4fe          **(uint32_t**)esi_22(1);
0056f4fe      
0056f503      int32_t eax_33;
0056f503      eax_33 = 1;
0056f509      return 1;
0056f290  }

0056f50c                                      90 90 90 90                                                              ....

0056f510  uint8_t __fastcall ClientCommunicationSystem::DoJoinChat(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056f510  {
0056f510      class ClientCommunicationSystem* this_1 = this;
0056f519      char*** var_18 = &arg3;
0056f51e      int32_t* var_1c = &arg2;
0056f523      class ClientCommunicationSystem** var_20 = &this_1;
0056f529      class PStringBase<char>* __return;
0056f529      int32_t* edx;
0056f529      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return, edx, this)->m_charbuffer;
0056f532      arg3 = m_charbuffer;
0056f536      InterlockedIncrement(&m_charbuffer[-1]);
0056f546      void* __offset(ClientCommunicationSystem, -0x14) edi_1 = ((char*)this_1 - 0x14);
0056f546      
0056f555      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0056f55d          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0056f55d      
0056f568      PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_FellowQuit);
0056f578      int32_t eax_3 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f583      char ebx_1 = ((int8_t)-(eax_3));
0056f587      int32_t* edi_3 = (arg2 - 0x14);
0056f587      
0056f598      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
0056f5a0          **(uint32_t**)edi_3(1);
0056f5a0      
0056f5a4      if ((ebx_1 - ebx_1) == 0xff)
0056f5a4      {
0056f5c3          PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_FellowAdded);
0056f5d3          int32_t eax_6 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f5de          char ebx_3 = ((int8_t)-(eax_6));
0056f5e2          int32_t* edi_5 = (arg2 - 0x14);
0056f5e2          
0056f5f3          if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
0056f5fb              **(uint32_t**)edi_5(1);
0056f5fb          
0056f5ff          if ((ebx_3 - ebx_3) == 0xff)
0056f5ff          {
0056f61b              PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_ExamineSpell);
0056f62b              int32_t eax_9 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f636              char ebx_5 = ((int8_t)-(eax_9));
0056f63a              int32_t* edi_7 = (arg2 - 0x14);
0056f63a              
0056f64b              if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
0056f653                  **(uint32_t**)edi_7(1);
0056f653              
0056f657              if ((ebx_5 - ebx_5) == 0xff)
0056f657              {
0056f694                  PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_ExamineObject);
0056f6a4                  int32_t eax_14 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f6af                  char ebx_7 = ((int8_t)-(eax_14));
0056f6b3                  int32_t* edi_10 = (arg2 - 0x14);
0056f6b3                  
0056f6c4                  if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
0056f6cc                      **(uint32_t**)edi_10(1);
0056f6cc                  
0056f6d0                  if ((ebx_7 - ebx_7) != 0xff)
0056f6d0                  {
0056f6dc                      PlayerModule::SetHearLFGChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 1);
0056f6e5                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056f6ed                      int32_t eax_17;
0056f6ed                      eax_17 = 1;
0056f6f1                      return 1;
0056f6d0                  }
0056f6d0                  
0056f6fd                  PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_DesiredAttackPowerChanged);
0056f70d                  int32_t eax_18 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f714                  char ebx_9 = ((int8_t)-(eax_18));
0056f71e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0056f71e                  
0056f725                  if ((ebx_9 - ebx_9) != 0xff)
0056f725                  {
0056f731                      PlayerModule::SetHearRoleplayChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 1);
0056f73a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056f742                      int32_t eax_20;
0056f742                      eax_20 = 1;
0056f746                      return 1;
0056f725                  }
0056f725                  
0056f752                  PStringBase<char>::PStringBase<char>(&this_1, &ClientCommunicationSystem::`vftable'.RecvNotice_YesNo_ConfirmationRequest);
0056f762                  int32_t eax_21 = PStringBase<char>::cmp(&arg3, &this_1, 0);
0056f762                  
0056f769                  if (eax_21 != 0)
0056f769                  {
0056f774                      PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_UseShortcut);
0056f784                      int32_t eax_22 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f78b                      ebx_9 = ((int8_t)-(eax_22));
0056f793                      ebx_9 = ((ebx_9 - ebx_9) + 1);
0056f795                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0056f769                  }
0056f769                  
0056f79c                  if ((eax_21 == 0 || ebx_9 != 0))
0056f79e                      ebx_9 = 1;
0056f79e                  
0056f7a4                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&this_1);
0056f7a4                  
0056f7ab                  if (ebx_9 == 0)
0056f7ab                  {
0056f7d3                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056f7db                      int32_t eax_25;
0056f7db                      eax_25 = 0;
0056f7df                      return 0;
0056f7ab                  }
0056f7ab                  
0056f7b7                  PlayerModule::SetHearSocietyChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 1);
0056f7c0                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056f7c8                  int32_t eax_24;
0056f7c8                  eax_24 = 1;
0056f7cc                  return 1;
0056f657              }
0056f657              
0056f663              PlayerModule::SetHearTradeChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 1);
0056f5ff          }
0056f5ff          else
0056f60b              PlayerModule::SetHearGeneralChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 1);
0056f5a4      }
0056f5a4      else
0056f5b0          PlayerModule::SetHearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 1);
0056f5b0      
0056f677      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0056f67f          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0056f67f      
0056f684      int32_t eax_13;
0056f684      eax_13 = 1;
0056f688      return 1;
0056f510  }

0056f7e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056f7f0  uint8_t __fastcall ClientCommunicationSystem::DoLeaveChat(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056f7f0  {
0056f7f0      class ClientCommunicationSystem* this_1 = this;
0056f7f9      char*** var_18 = &arg3;
0056f7fe      int32_t* var_1c = &arg2;
0056f803      class ClientCommunicationSystem** var_20 = &this_1;
0056f809      class PStringBase<char>* __return;
0056f809      int32_t* edx;
0056f809      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return, edx, this)->m_charbuffer;
0056f812      arg3 = m_charbuffer;
0056f816      InterlockedIncrement(&m_charbuffer[-1]);
0056f826      void* __offset(ClientCommunicationSystem, -0x14) edi_1 = ((char*)this_1 - 0x14);
0056f826      
0056f835      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0056f83d          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0056f83d      
0056f848      PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_FellowQuit);
0056f858      int32_t eax_3 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f863      char ebx_1 = ((int8_t)-(eax_3));
0056f867      int32_t* edi_3 = (arg2 - 0x14);
0056f867      
0056f878      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
0056f880          **(uint32_t**)edi_3(1);
0056f880      
0056f884      if ((ebx_1 - ebx_1) == 0xff)
0056f884      {
0056f8a3          PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_FellowAdded);
0056f8b3          int32_t eax_6 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f8be          char ebx_3 = ((int8_t)-(eax_6));
0056f8c2          int32_t* edi_5 = (arg2 - 0x14);
0056f8c2          
0056f8d3          if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
0056f8db              **(uint32_t**)edi_5(1);
0056f8db          
0056f8df          if ((ebx_3 - ebx_3) == 0xff)
0056f8df          {
0056f8fb              PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_ExamineSpell);
0056f90b              int32_t eax_9 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f916              char ebx_5 = ((int8_t)-(eax_9));
0056f91a              int32_t* edi_7 = (arg2 - 0x14);
0056f91a              
0056f92b              if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
0056f933                  **(uint32_t**)edi_7(1);
0056f933              
0056f937              if ((ebx_5 - ebx_5) == 0xff)
0056f937              {
0056f974                  PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_ExamineObject);
0056f984                  int32_t eax_14 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f98f                  char ebx_7 = ((int8_t)-(eax_14));
0056f993                  int32_t* edi_10 = (arg2 - 0x14);
0056f993                  
0056f9a4                  if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
0056f9ac                      **(uint32_t**)edi_10(1);
0056f9ac                  
0056f9b0                  if ((ebx_7 - ebx_7) != 0xff)
0056f9b0                  {
0056f9bc                      PlayerModule::SetHearLFGChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 0);
0056f9c5                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056f9cd                      int32_t eax_17;
0056f9cd                      eax_17 = 1;
0056f9d1                      return 1;
0056f9b0                  }
0056f9b0                  
0056f9dd                  PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_DesiredAttackPowerChanged);
0056f9ed                  int32_t eax_18 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056f9f4                  char ebx_9 = ((int8_t)-(eax_18));
0056f9fe                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0056f9fe                  
0056fa05                  if ((ebx_9 - ebx_9) != 0xff)
0056fa05                  {
0056fa11                      PlayerModule::SetHearRoleplayChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 0);
0056fa1a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056fa22                      int32_t eax_20;
0056fa22                      eax_20 = 1;
0056fa26                      return 1;
0056fa05                  }
0056fa05                  
0056fa32                  PStringBase<char>::PStringBase<char>(&this_1, &ClientCommunicationSystem::`vftable'.RecvNotice_YesNo_ConfirmationRequest);
0056fa42                  int32_t eax_21 = PStringBase<char>::cmp(&arg3, &this_1, 0);
0056fa42                  
0056fa49                  if (eax_21 != 0)
0056fa49                  {
0056fa54                      PStringBase<char>::PStringBase<char>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_UseShortcut);
0056fa64                      int32_t eax_22 = PStringBase<char>::cmp(&arg3, &arg2, 0);
0056fa6b                      ebx_9 = ((int8_t)-(eax_22));
0056fa73                      ebx_9 = ((ebx_9 - ebx_9) + 1);
0056fa75                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0056fa49                  }
0056fa49                  
0056fa7c                  if ((eax_21 == 0 || ebx_9 != 0))
0056fa7e                      ebx_9 = 1;
0056fa7e                  
0056fa84                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&this_1);
0056fa84                  
0056fa8b                  if (ebx_9 == 0)
0056fa8b                  {
0056fab3                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056fabb                      int32_t eax_25;
0056fabb                      eax_25 = 0;
0056fabf                      return 0;
0056fa8b                  }
0056fa8b                  
0056fa97                  PlayerModule::SetHearSocietyChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 0);
0056faa0                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0056faa8                  int32_t eax_24;
0056faa8                  eax_24 = 1;
0056faac                  return 1;
0056f937              }
0056f937              
0056f943              PlayerModule::SetHearTradeChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 0);
0056f8df          }
0056f8df          else
0056f8eb              PlayerModule::SetHearGeneralChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 0);
0056f884      }
0056f884      else
0056f890          PlayerModule::SetHearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 0);
0056f890      
0056f957      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0056f95f          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0056f95f      
0056f964      int32_t eax_13;
0056f964      eax_13 = 1;
0056f968      return 1;
0056f7f0  }

0056fac2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056fad0  uint8_t __thiscall ClientCommunicationSystem::DoChatToggle(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056fad0  {
0056fad8      if (arg2 != 1)
0056fad8      {
0056fae3          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateRentPayment);
0056fafa          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056fb03          int32_t* esi_2 = (arg2 - 0x14);
0056fb03          
0056fb16          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056fb1e              **(uint32_t**)esi_2(1);
0056fb1e          
0056fb20          int32_t eax_1;
0056fb20          eax_1 = 1;
0056fb23          return 1;
0056fad8      }
0056fad8      
0056fb41      if (_stricmp(*(uint32_t*)arg3, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseProfile) == 0)
0056fb56          return CM_Communication::Event_ModifyGlobalSquelch(0, 2);
0056fb56      
0056fb68      if (_stricmp(*(uint32_t*)arg3, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseData) == 0)
0056fb7d          return CM_Communication::Event_ModifyGlobalSquelch(1, 2);
0056fb7d      
0056fb89      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_FellowshipLeaderChanged);
0056fba0      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056fba9      int32_t* esi_4 = (arg2 - 0x14);
0056fba9      
0056fbbc      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0056fbc4          **(uint32_t**)esi_4(1);
0056fbc4      
0056fbc8      int32_t eax_8;
0056fbc8      eax_8 = 1;
0056fbcb      return 1;
0056fad0  }

0056fbce                                            90 90                                                                ..

0056fbd0  uint8_t __thiscall ClientCommunicationSystem::DoNoTell(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056fbd0  {
0056fbd5      char ebx = 1;
0056fbd5      
0056fbdf      if (arg2 != 1)
0056fbdf      {
0056fbea          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_PrevSpellSelection);
0056fc00          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056fc09          int32_t* esi_2 = (arg2 - 0x14);
0056fc09          
0056fc1c          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056fc23              **(uint32_t**)esi_2(1);
0056fc23          
0056fc26          int32_t eax_1;
0056fc26          eax_1 = 1;
0056fc29          return 1;
0056fbdf      }
0056fbdf      
0056fc46      if ((_stricmp(*(uint32_t*)arg3, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseProfile) != 0 && _stricmp(*(uint32_t*)arg3, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseData) == 0))
0056fc59          ebx = 0;
0056fc59      
0056fc6c      return CM_Communication::Event_ModifyGlobalSquelch(((uint32_t)ebx), 3);
0056fbd0  }

0056fc6f                                               90                                                                 .

0056fc70  uint8_t __thiscall ClientCommunicationSystem::DoLifestone(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056fc70  {
0056fc79      if (arg2 == 0)
0056fcc7          CM_Character::Event_TeleToLifestone();
0056fc79      else
0056fc79      {
0056fc84          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_AddItemToTrade);
0056fc9b          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056fca4          int32_t* esi_2 = (arg2 - 0x14);
0056fca4          
0056fcb7          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056fcb7          {
0056fcbf              **(uint32_t**)esi_2(1);
0056fcc1              int32_t eax_3;
0056fcc1              eax_3 = 1;
0056fcc4              return 1;
0056fcb7          }
0056fc79      }
0056fc79      
0056fccc      int32_t eax_1;
0056fccc      eax_1 = 1;
0056fccf      return 1;
0056fc70  }

0056fcd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0056fce0  uint8_t __thiscall ClientCommunicationSystem::DoMarketplace(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056fce0  {
0056fce9      if (arg2 == 0)
0056fd37          CM_Character::Event_TeleToMarketplace();
0056fce9      else
0056fce9      {
0056fcf4          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateToolbarSelectionDisplay);
0056fd0b          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056fd14          int32_t* esi_2 = (arg2 - 0x14);
0056fd14          
0056fd27          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056fd27          {
0056fd2f              **(uint32_t**)esi_2(1);
0056fd31              int32_t eax_3;
0056fd31              eax_3 = 1;
0056fd34              return 1;
0056fd27          }
0056fce9      }
0056fce9      
0056fd3c      int32_t eax_1;
0056fd3c      eax_1 = 1;
0056fd3f      return 1;
0056fce0  }

0056fd42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0056fd50  uint8_t __thiscall ClientCommunicationSystem::DoFillComponents(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056fd50  {
0056fd53      int32_t __return = arg2;
0056fd60      int32_t var_4 = 0;
0056fd68      enum SpellComponentCategory var_8 = Undef_SpellComponentCategory;
0056fd70      int32_t eax_1;
0056fd70      
0056fd70      if (__return <= 2)
0056fd70      {
0056fdce          if (__return == 0)
0056fdce          {
0056fdd3              CM_UI::SendNotice_FillComponentBuyList(Undef_SpellComponentCategory, __return);
0056fddb              int32_t eax_4;
0056fddb              eax_4 = 1;
0056fde4              return 1;
0056fdce          }
0056fdce          
0056fdeb          char*** var_24_3 = &arg3;
0056fdf0          int32_t* var_28_1 = &arg2;
0056fdf5          class PStringBase<unsigned short> var_10;
0056fdf5          int32_t* var_2c_1 = &var_10;
0056fdf6          int32_t* edx;
0056fdf6          NextArg(__return, edx, this);
0056fe07          void* var_c;
0056fe07          PStringBase<char>::PStringBase<char>(&var_c, "clear");
0056fe10          class PStringBase<unsigned short> ebp_1 = var_10;
0056fe16          int32_t eax_5 = _stricmp(ebp_1, var_c);
0056fe25          char ebx_2 = ((int8_t)-(eax_5));
0056fe29          int32_t* edi_2 = ((char*)var_c - 0x14);
0056fe29          
0056fe3e          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0056fe46              **(uint32_t**)edi_2(1);
0056fe46          
0056fe4a          int32_t* esi_5;
0056fe4a          
0056fe4a          if ((ebx_2 - ebx_2) == 0xff)
0056fe4a          {
0056fed0              ebx_2 = 0;
0056fed2              int32_t eax_11;
0056fed2              char*** ecx_12;
0056fed2              int32_t* edx_5;
0056fed2              eax_11 = MagicEnumMapper::SpellComponentCategoryFromString(ebp_1, &var_8);
0056fed2              
0056fedc              if (eax_11 != 0)
0056fedc              {
0056fede                  int32_t __return_1 = arg2;
0056fee4                  ebx_2 = 1;
0056fee4                  
0056fee6                  if (__return_1 != 0)
0056fee6                  {
0056feec                      char*** var_24_10 = &arg3;
0056fef1                      int32_t* var_28_5 = &arg2;
0056fef6                      void** var_2c_2 = &var_c;
0056ff04                      PStringBase<unsigned short>::operator=(&var_10, NextArg(__return_1, edx_5, ecx_12));
0056ff0d                      ecx_12 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0056ff12                      ebp_1 = var_10;
0056fee6                  }
0056fedc              }
0056fedc              
0056ff16              char*** var_24_12 = ecx_12;
0056ff1d              class PStringBase<unsigned short> var_24_13 = ebp_1;
0056ff1d              
0056ff2f              if (PSUtils::is_int32(InterlockedIncrement((ebp_1 - 0x10))) != 0)
0056ff2f              {
0056ff35                  int32_t eax_15 = PStringBase<char>::to_int32(&var_10);
0056ff35                  
0056ff3c                  if (eax_15 <= 0)
0056ff3c                  {
0056ff47                      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please specify a value greater t…");
0056ff5e                      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056ff67                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0056ff70                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
0056ff75                      int32_t eax_16;
0056ff75                      eax_16 = 1;
0056ff7e                      return 1;
0056ff3c                  }
0056ff3c                  
0056ff8f                  CM_UI::SendNotice_FillComponentBuyList(var_8, eax_15);
0056ff2f              }
0056ff2f              else if (ebx_2 == 0)
0056ff83              {
0056ffa2                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Invalid component type specified…");
0056ffb9                  ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056ffc2                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0056ff83              }
0056ff83              else
0056ff8f                  CM_UI::SendNotice_FillComponentBuyList(var_8, var_4);
0056ff8f              
0056ffc7              esi_5 = (ebp_1 - 0x14);
0056ffce              eax_1 = InterlockedDecrement(&esi_5[1]);
0056fe4a          }
0056fe4a          else
0056fe4a          {
0056fe55              CM_Character::Event_SetDesiredComponentLevel(INVALID_DID.id, 0xffffffff);
0056fe65              PlayerModule::ClearDesiredCompList(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
0056fe6c              CM_Magic::SendNotice_UpdateSpellComponents(2);
0056fe7d              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Component list cleared.");
0056fe94              ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056fea3              int32_t* esi_4 = (arg2 - 0x14);
0056fea3              
0056feb2              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0056feba                  **(uint32_t**)esi_4(1);
0056feba              
0056febc              esi_5 = (ebp_1 - 0x14);
0056fec3              eax_1 = InterlockedDecrement(&esi_5[1]);
0056fe4a          }
0056fe4a          
0056ffda          if ((eax_1 == 0 && esi_5 != 0))
0056ffe2              **(uint32_t**)esi_5(1);
0056fd70      }
0056fd70      else
0056fd70      {
0056fd7b          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please use @help fillcomps for p…");
0056fd92          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0056fd9b          int32_t* esi_2 = (arg2 - 0x14);
0056fd9b          
0056fdb2          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0056fdb2          {
0056fdbe              **(uint32_t**)esi_2(1);
0056fdc0              int32_t eax_3;
0056fdc0              eax_3 = 1;
0056fdc9              return 1;
0056fdb2          }
0056fd70      }
0056fd70      
0056ffe7      eax_1 = 1;
0056ffed      return 1;
0056fd50  }


0056fff0  uint8_t __thiscall ClientCommunicationSystem::DoSaveUI(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0056fff0  {
0056fff5      int32_t edi = arg2;
0056fffe      int32_t esi_1;
0056fffe      
0056fffe      if (edi <= 1)
0056fffe      {
00570034          int32_t var_8;
00570034          class PStringBase<char>* __return;
00570034          char*** ecx_3;
00570034          int32_t* edx_1;
00570034          __return = PStringBase<char>::PStringBase<char>(&var_8, &data_7928af);
00570034          
0057003b          if (edi == 0)
0057003b          {
00570042              CM_UI::SendNotice_SaveUI(&var_8);
00570047              esi_1 = var_8;
0057004b              goto label_570055;
0057003b          }
0057003b          
00570082          char*** var_18_1 = &arg3;
00570087          int32_t* var_1c_1 = &arg2;
0057008c          void* var_4;
0057008c          int32_t* var_20_2 = &var_4;
0057009a          PStringBase<unsigned short>::operator=(&var_8, NextArg(__return, edx_1, ecx_3));
005700a9          int32_t* edi_2 = ((char*)var_4 - 0x14);
005700a9          
005700b8          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
005700c0              **(uint32_t**)edi_2(1);
005700c0          
005700ca          void* var_18_6;
005700ca          int32_t* esi_6;
005700ca          
005700ca          if (*(uint32_t*)(var_8 - 4) <= 0x10)
005700ca          {
00570120              CM_UI::SendNotice_SaveUI(&var_8);
0057012c              esi_6 = (var_8 - 0x14);
00570132              var_18_6 = &esi_6[1];
005700ca          }
005700ca          else
005700ca          {
005700d5              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"The file name must be 16 charact…");
005700ec              ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
005700f5              int32_t* esi_4 = (arg2 - 0x14);
005700f5              
00570104              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0057010c                  **(uint32_t**)esi_4(1);
0057010c              
00570112              esi_6 = (var_8 - 0x14);
00570118              var_18_6 = &esi_6[1];
005700ca          }
005700ca          
0057013b          if ((InterlockedDecrement(var_18_6) == 0 && esi_6 != 0))
00570143              **(uint32_t**)esi_6(1);
0056fffe      }
0056fffe      else
0056fffe      {
00570009          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please use @help saveui for prop…");
00570020          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00570025          esi_1 = arg2;
00570055      label_570055:
00570055          
00570065          if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
00570065          {
00570071              **(uint32_t**)(esi_1 - 0x14)(1);
00570074              int32_t eax_3;
00570074              eax_3 = 1;
0057007a              return 1;
00570065          }
0056fffe      }
00570147      int32_t eax_1;
00570147      eax_1 = 1;
0057014d      return 1;
0056fff0  }


00570150  uint8_t __thiscall ClientCommunicationSystem::DoLoadUI(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00570150  {
00570155      int32_t edi = arg2;
0057015e      int32_t esi_1;
0057015e      
0057015e      if (edi <= 1)
0057015e      {
00570194          int32_t var_8;
00570194          class PStringBase<char>* __return;
00570194          char*** ecx_3;
00570194          int32_t* edx_1;
00570194          __return = PStringBase<char>::PStringBase<char>(&var_8, &data_7928af);
00570194          
0057019b          if (edi == 0)
0057019b          {
005701a2              CM_UI::SendNotice_LoadUI(&var_8);
005701a7              esi_1 = var_8;
005701ab              goto label_5701b5;
0057019b          }
0057019b          
005701e2          char*** var_18_1 = &arg3;
005701e7          int32_t* var_1c_1 = &arg2;
005701ec          void* var_4;
005701ec          int32_t* var_20_2 = &var_4;
005701fa          PStringBase<unsigned short>::operator=(&var_8, NextArg(__return, edx_1, ecx_3));
00570209          int32_t* edi_2 = ((char*)var_4 - 0x14);
00570209          
00570218          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00570220              **(uint32_t**)edi_2(1);
00570220          
0057022a          void* var_18_6;
0057022a          int32_t* esi_6;
0057022a          
0057022a          if (*(uint32_t*)(var_8 - 4) <= 0x10)
0057022a          {
00570280              CM_UI::SendNotice_LoadUI(&var_8);
0057028c              esi_6 = (var_8 - 0x14);
00570292              var_18_6 = &esi_6[1];
0057022a          }
0057022a          else
0057022a          {
00570235              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"The file name must be 16 charact…");
0057024c              ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00570255              int32_t* esi_4 = (arg2 - 0x14);
00570255              
00570264              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0057026c                  **(uint32_t**)esi_4(1);
0057026c              
00570272              esi_6 = (var_8 - 0x14);
00570278              var_18_6 = &esi_6[1];
0057022a          }
0057022a          
0057029b          if ((InterlockedDecrement(var_18_6) == 0 && esi_6 != 0))
005702a3              **(uint32_t**)esi_6(1);
0057015e      }
0057015e      else
0057015e      {
00570169          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please use @help loadui for prop…");
00570180          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00570185          esi_1 = arg2;
005701b5      label_5701b5:
005701b5          
005701c5          if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
005701c5          {
005701d1              **(uint32_t**)(esi_1 - 0x14)(1);
005701d4              int32_t eax_3;
005701d4              eax_3 = 1;
005701da              return 1;
005701c5          }
0057015e      }
005702a7      int32_t eax_1;
005702a7      eax_1 = 1;
005702ad      return 1;
00570150  }


005702b0  uint8_t __fastcall ClientCommunicationSystem::DoSaveAutoUI(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005702b0  {
005702b0      class ClientCommunicationSystem* this_1 = this;
005702ba      int32_t this_2;
005702ba      
005702ba      if (arg2 <= 0)
005702ba      {
005702f0          PStringBase<char>::PStringBase<char>(&this_1, &gmGamePlayUI::`vftable'.RecvNotice_AttackHeightChanged);
005702fa          CM_UI::SendNotice_SaveUI(&this_1);
005702ff          this_2 = this_1;
005702ba      }
005702ba      else
005702ba      {
005702c5          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please use @help saveautoui for …");
005702dc          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
005702e1          this_2 = arg2;
005702ba      }
005702ba      
00570319      if ((InterlockedDecrement((this_2 - 0x10)) == 0 && this_2 != 0x14))
00570321          **(uint32_t**)(this_2 - 0x14)(1);
00570321      
00570323      int32_t eax_2;
00570323      eax_2 = 1;
00570327      return 1;
005702b0  }

0057032a                                90 90 90 90 90 90                                                            ......

00570330  uint8_t __fastcall ClientCommunicationSystem::DoLoadAutoUI(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00570330  {
00570330      class ClientCommunicationSystem* this_1 = this;
0057033a      int32_t this_2;
0057033a      
0057033a      if (arg2 <= 0)
0057033a      {
00570370          PStringBase<char>::PStringBase<char>(&this_1, &gmGamePlayUI::`vftable'.RecvNotice_AttackHeightChanged);
0057037a          CM_UI::SendNotice_LoadUI(&this_1);
0057037f          this_2 = this_1;
0057033a      }
0057033a      else
0057033a      {
00570345          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please use @help loadautoui for …");
0057035c          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00570361          this_2 = arg2;
0057033a      }
0057033a      
00570399      if ((InterlockedDecrement((this_2 - 0x10)) == 0 && this_2 != 0x14))
005703a1          **(uint32_t**)(this_2 - 0x14)(1);
005703a1      
005703a3      int32_t eax_2;
005703a3      eax_2 = 1;
005703a7      return 1;
00570330  }

005703aa                                90 90 90 90 90 90                                                            ......

005703b0  uint8_t __thiscall ClientCommunicationSystem::DoLockUI(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005703b0  {
005703b9      if (arg2 <= 0)
005703b9      {
00570407          class CPlayerSystem* eax_4 = CPlayerSystem::GetPlayerSystem();
0057040e          uint8_t eax_6;
0057040e          
0057040e          if (eax_4 != 0)
00570418              eax_6 = PlayerModule::LockUI(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable);
00570418          
0057041f          uint8_t var_8_2;
0057041f          class CPlayerSystem* eax_7;
0057041f          
0057041f          if ((eax_4 == 0 || eax_6 == 0))
0057041f          {
0057042a              eax_7 = CPlayerSystem::GetPlayerSystem();
0057042f              var_8_2 = 1;
0057041f          }
0057041f          else
0057041f          {
00570421              eax_7 = CPlayerSystem::GetPlayerSystem();
00570426              var_8_2 = 0;
0057041f          }
0057041f          
00570434          PlayerModule::SetLockUI(&eax_7->playerModule.vtable, var_8_2);
00570443          UIElementManager::BroadcastGlobalMessage(UIElementManager::s_pInstance, 0xd, 0);
005703b9      }
005703b9      else
005703b9      {
005703c4          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please use @help lockui for prop…");
005703db          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
005703e4          int32_t* esi_2 = (arg2 - 0x14);
005703e4          
005703f7          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005703f7          {
005703ff              **(uint32_t**)esi_2(1);
00570401              int32_t eax_3;
00570401              eax_3 = 1;
00570404              return 1;
005703f7          }
005703b9      }
005703b9      
00570448      int32_t eax_1;
00570448      eax_1 = 1;
0057044b      return 1;
005703b0  }

0057044e                                            90 90                                                                ..

00570450  uint8_t __thiscall ClientCommunicationSystem::DoHouseRecall(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00570450  {
00570459      if (arg2 == 0)
005704ad          return CM_House::Event_TeleToHouse_Event();
005704ad      
00570464      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please see @help House for more …");
0057047b      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00570484      int32_t* esi_2 = (arg2 - 0x14);
00570484      
00570497      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057049f          **(uint32_t**)esi_2(1);
0057049f      
005704a1      int32_t eax_1;
005704a1      eax_1 = 1;
005704a4      return 1;
00570450  }


005704b0  uint8_t __thiscall ClientCommunicationSystem::DoMansionRecall(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005704b0  {
005704b9      if (arg2 == 0)
0057050d          return CM_House::Event_TeleToMansion_Event();
0057050d      
005704c4      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please see @help House for more …");
005704db      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
005704e4      int32_t* esi_2 = (arg2 - 0x14);
005704e4      
005704f7      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005704ff          **(uint32_t**)esi_2(1);
005704ff      
00570501      int32_t eax_1;
00570501      eax_1 = 1;
00570504      return 1;
005704b0  }


00570510  uint8_t __fastcall ClientCommunicationSystem::DoHouseAvailableList(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00570510  {
0057051f      char*** var_1c = &arg3;
00570524      int32_t* var_20 = &arg2;
00570529      void* var_8;
00570529      int32_t* var_24 = &var_8;
0057052a      class PStringBase<char>* __return;
0057052a      int32_t* edx;
0057052a      NextArg(__return, edx, this);
0057053b      PStringBase<char>::PStringBase<char>(&arg3, "apartment");
00570544      void* ebp = var_8;
00570550      int32_t eax_1 = _stricmp(ebp, arg3);
0057055b      char ebx_1 = ((int8_t)-(eax_1));
0057055f      void* esi_1 = &arg3[-5];
0057055f      
00570574      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0057057c          **(uint32_t**)esi_1(1);
0057057c      
00570580      uint32_t eax_3;
00570580      
00570580      if ((ebx_1 - ebx_1) == 0xff)
00570580      {
00570595          PStringBase<char>::PStringBase<char>(&arg3, "cottage");
005705a0          int32_t eax_5 = _stricmp(ebp, arg3);
005705ab          ebx_1 = ((int8_t)-(eax_5));
005705af          void* esi_3 = &arg3[-5];
005705af          
005705c4          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
005705cc              **(uint32_t**)esi_3(1);
005705cc          
005705d0          if ((ebx_1 - ebx_1) == 0xff)
005705d0          {
005705e5              PStringBase<char>::PStringBase<char>(&arg3, "villa");
005705f0              int32_t eax_8 = _stricmp(ebp, arg3);
005705fb              ebx_1 = ((int8_t)-(eax_8));
005705ff              void* esi_5 = &arg3[-5];
005705ff              
00570614              if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0057061c                  **(uint32_t**)esi_5(1);
0057061c              
00570620              if ((ebx_1 - ebx_1) == 0xff)
00570620              {
00570632                  PStringBase<char>::PStringBase<char>(&arg3, "mansion");
0057063d                  int32_t eax_11 = _stricmp(ebp, arg3);
00570648                  ebx_1 = ((int8_t)-(eax_11));
0057064c                  void* esi_7 = &arg3[-5];
0057064c                  
00570661                  if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
00570669                      **(uint32_t**)esi_7(1);
00570669                  
0057066d                  if ((ebx_1 - ebx_1) == 0xff)
0057066d                  {
005706b2                      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Please see @help hslist for more…");
005706cb                      ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
005706d4                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
005706dd                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
005706e5                      int32_t eax_17;
005706e5                      eax_17 = 1;
005706eb                      return 1;
0057066d                  }
0057066d                  
0057066f                  eax_3 = 3;
00570620              }
00570620              else
00570622                  eax_3 = 2;
005705d0          }
005705d0          else
005705d2              eax_3 = 1;
00570580      }
00570580      else
00570582          eax_3 = 4;
00570582      
00570675      char eax_13 = CM_House::Event_ListAvailableHouses(eax_3);
00570675      
00570692      if ((InterlockedDecrement(((char*)ebp - 0x10)) == 0 && ebp != 0x14))
0057069b          **(uint32_t**)((char*)ebp - 0x14)(1);
0057069b      
005706a0      int32_t eax_15;
005706a0      eax_15 = eax_13;
005706a6      return eax_15;
00570510  }

005706ee                                            90 90                                                                ..

005706f0  uint8_t __fastcall ClientCommunicationSystem::DoDay(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005706f0  {
005706f0      class ClientCommunicationSystem* this_1 = this;
005706f2      class ClientCommunicationSystem* this_2 = this;
005706f4      this = LScape::m_fAlwaysDaylight;
005706fe      int32_t eax;
005706fe      eax = this == 0;
00570702      LScape::SetDay(eax);
00570711      class ClientCommunicationSystem** ecx = &this_1;
00570711      
00570715      if (LScape::m_fAlwaysDaylight != 0)
00570715      {
0057071c          PStringBase<unsigned short>::PStringBase<unsigned short>(ecx, u"Let there be light!");
00570733          ClientSystem::AddTextToScroll(this_2, &this_1, 0x1a, 1, this_2->m_idCurrentCommandSource);
0057073c          void* __offset(ClientCommunicationSystem, -0x14) esi_1 = ((char*)this_1 - 0x14);
0057073c          
0057074f          if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00570757              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00570757          
00570763          PlayerModule::SetPersistentAtDay(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 1);
00570768          int32_t eax_5;
00570768          eax_5 = 1;
0057076c          return 1;
00570715      }
00570715      
00570774      PStringBase<unsigned short>::PStringBase<unsigned short>(ecx, u"Normality has been restored.");
0057078b      ClientSystem::AddTextToScroll(this_2, &this_1, 0x1a, 1, this_2->m_idCurrentCommandSource);
00570794      void* __offset(ClientCommunicationSystem, -0x14) esi_3 = ((char*)this_1 - 0x14);
00570794      
005707a7      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
005707af          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
005707af      
005707bb      PlayerModule::SetPersistentAtDay(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 0);
005707c0      int32_t eax_10;
005707c0      eax_10 = 1;
005707c4      return 1;
005706f0  }

005707c7                       90 90 90 90 90 90 90 90 90                                                         .........

005707d0  uint8_t __thiscall ClientCommunicationSystem::DoFrameRate(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005707d0  {
005707d9      if (arg2 == 0)
005707d9      {
0057082f          int32_t eax_4;
0057082f          eax_4 = fShowFramerate == 0;
00570832          fShowFramerate = eax_4;
00570838          CM_UI::SendNotice_SetFramerateDisplay(eax_4);
005707d9      }
005707d9      else
005707d9      {
005707e4          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Unexpected arguments to @framera…");
005707fb          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00570804          int32_t* esi_2 = (arg2 - 0x14);
00570804          
00570817          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00570817          {
0057081f              **(uint32_t**)esi_2(1);
00570821              int32_t eax_3;
00570821              eax_3 = 1;
00570824              return 1;
00570817          }
005707d9      }
005707d9      
00570840      int32_t eax_1;
00570840      eax_1 = 1;
00570843      return 1;
005707d0  }

00570846                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00570850  uint32_t PSUtils::FindAllWords(class PStringBase<char> arg1, class PStringBase<char> arg2, class List<PStringBase<char> >* arg3)

00570850  {
00570861      class PStringBase<char>* var_4 = &arg1;
0057086a      int32_t result = 0;
0057086e      int32_t var_10 = 0x79448c;
00570876      int32_t var_c = 0;
0057087a      int32_t var_8 = 0;
00570891      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7;
00570891      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8;
00570891      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_9;
00570891      
00570891      if (PStringBaseIter_Common<char>::FindChar(&var_10, &arg2, 0) != 0)
00570891      {
0057098f          uint8_t i;
0057098f          
0057098f          do
0057098f          {
005708a0              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005708a5              PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_1;
005708ad              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005708af              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
005708b4              PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_2;
005708bc              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
005708be              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
005708c3              PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_3;
005708cb              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
005708e0              PStringBaseIter_Common<char>::Split(&var_10, &PStringBase<char>::s_NullBuffer_9, &PStringBase<char>::s_NullBuffer_7, &PStringBase<char>::s_NullBuffer_8);
005708e5              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_7;
005708e5              
005708ed              if (PStringBase<char>::s_NullBuffer_10->m_data[-4] != 1)
005708ed              {
005708f8                  List<PStringBase<char> >::push_back(arg3, &PStringBase<char>::s_NullBuffer_7);
005708fd                  result += 1;
005708ed              }
005708ed              
00570912              int32_t eax_6;
00570912              
00570912              if ((var_c + 1) <= *(uint32_t*)var_10())
00570920                  eax_6 = (var_c + 1);
00570912              else
0057091c                  eax_6 = *(uint32_t*)var_10();
0057091c              
00570926              void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_8->m_data[0xffffffec];
0057092d              var_c = eax_6;
00570931              int32_t var_8_1 = eax_6;
00570931              
0057093d              if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00570945                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00570945              
00570956              if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_10[-1]) == 0 && PStringBase<char>::s_NullBuffer_10 != 0x14))
0057095e                  *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_10 + -0x14)(1);
0057095e              
00570964              void* __offset(PSRefBufferCharData<char>, -0x14) esi_7 = &PStringBase<char>::s_NullBuffer_9->m_data[0xffffffec];
00570964              
00570973              if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0057097b                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0057097b              
00570988              i = PStringBaseIter_Common<char>::FindChar(&var_10, &arg2, 0);
0057098f          } while (i != 0);
00570891      }
00570891      
00570996      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
0057099b      PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_4;
005709a3      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
005709a5      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer;
005709aa      PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_5;
005709b2      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_5[-1]);
005709b4      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer;
005709b9      PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_6;
005709c1      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_6[-1]);
005709d6      PStringBaseIter_Common<char>::Split(&var_10, &PStringBase<char>::s_NullBuffer_8, &PStringBase<char>::s_NullBuffer_7, &PStringBase<char>::s_NullBuffer_9);
005709db      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_7;
005709db      
005709e3      if (PStringBase<char>::s_NullBuffer_11->m_data[-4] != 1)
005709e3      {
005709ee          List<PStringBase<char> >::push_back(arg3, &PStringBase<char>::s_NullBuffer_7);
005709f3          result += 1;
005709e3      }
005709e3      
005709fb      void* __offset(PSRefBufferCharData<char>, -0x14) esi_9 = &PStringBase<char>::s_NullBuffer_9->m_data[0xffffffec];
005709fb      
00570a0a      if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
00570a12          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
00570a12      
00570a23      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_11[-1]) == 0 && PStringBase<char>::s_NullBuffer_11 != 0x14))
00570a2b          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_11 + -0x14)(1);
00570a2b      
00570a31      void* __offset(PSRefBufferCharData<char>, -0x14) esi_12 = &PStringBase<char>::s_NullBuffer_8->m_data[0xffffffec];
00570a31      
00570a40      if ((InterlockedDecrement(((char*)esi_12 + 4)) == 0 && esi_12 != 0))
00570a48          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_12) + -0x14)(1);
00570a48      
00570a4e      int32_t* esi_14 = (arg1 - 0x14);
00570a55      var_10 = 0x794478;
00570a55      
00570a65      if ((InterlockedDecrement(&esi_14[1]) == 0 && esi_14 != 0))
00570a6d          **(uint32_t**)esi_14(1);
00570a6d      
00570a73      int32_t* esi_16 = (arg2 - 0x14);
00570a73      
00570a82      if ((InterlockedDecrement(&esi_16[1]) == 0 && esi_16 != 0))
00570a8a          **(uint32_t**)esi_16(1);
00570a8a      
00570a96      return result;
00570850  }

0057089a                                                                                8d 9b 00 00 00 00                            ......
00570a97                                                                       90 90 90 90 90 90 90 90 90                         .........

00570aa0  uint32_t __fastcall ClientCommunicationSystem::Release(class ClientCommunicationSystem const* this)

00570aa0  {
00570aa7      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00570aa7      
00570ab4      if ((result == 0 && this != 0))
00570ab4      {
00570ab8          ClientCommunicationSystem::~ClientCommunicationSystem(this);
00570abe          operator delete(this);
00570ab4      }
00570ab4      
00570aca      return result;
00570aa0  }

00570acb                                   90 90 90 90 90                                                             .....

00570ad0  int32_t __thiscall ChatPoseTable::InqChatPoseCommand(class ChatPoseTable* this, class AC1Legacy::PStringBase<char> const* arg2, class AC1Legacy::PStringBase<char>* arg3, class AC1Legacy::PStringBase<char>* arg4, class AC1Legacy::PStringBase<char>* arg5)

00570ad0  {
00570ad8      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg2->m_buffer;
00570ae0      arg2 = m_buffer_2;
00570ae4      InterlockedIncrement(&m_buffer_2->m_cRef);
00570af2      class AC1Legacy::PStringBase<char>* eax = PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,AC1Legacy::PStringBase<char> >::lookup(&this->_chatPoseHash, &arg2);
00570af2      
00570b06      if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
00570b08          m_buffer_2->vtable->__vecDelDtor(1);
00570b08      
00570b12      if (eax != 0)
00570b12      {
00570b18          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg3->m_buffer;
00570b18          
00570b1c          if (m_buffer_1 != eax->m_buffer)
00570b1c          {
00570b2e              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00570b30                  m_buffer_1->vtable->__vecDelDtor(1);
00570b30              
00570b38              class AC1Legacy::PSRefBuffer<char>* m_buffer = eax->m_buffer;
00570b3a              arg3->m_buffer = m_buffer;
00570b40              InterlockedIncrement(&m_buffer->m_cRef);
00570b1c          }
00570b1c          
00570b4a          class ChatEmoteData* eax_5 = PackableHashTable<AC1Legacy::PStringBase<char>,ChatEmoteData>::lookup(&this->_chatEmoteHash, arg3);
00570b4a          
00570b53          if (eax_5 != 0)
00570b53          {
00570b66              AC1Legacy::PStringBase<char>::operator=(arg4, &eax_5->myEmote);
00570b73              AC1Legacy::PStringBase<char>::operator=(arg5, &eax_5->otherEmote);
00570b81              return 1;
00570b53          }
00570b12      }
00570b12      
00570b5b      return 0;
00570ad0  }

00570b84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00570b90  uint32_t __thiscall ClientCommunicationSystem::Handle_Communication__ChannelBroadcast(class ClientCommunicationSystem* this, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3, class AC1Legacy::PStringBase<char> const* arg4)

00570b90  {
00570b93      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00570ba2      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00570ba9      uint32_t* m_buffer_4 = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
00570bae      InterlockedIncrement(m_buffer_4);
00570bb0      uint32_t ebp = arg2;
00570bb8      m_buffer_4 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00570bb8      
00570bc4      if (ChannelSystem::GetChannelName(ebp, m_buffer_4) == 0)
00570bc4      {
00570bc6          m_buffer_4 = "<unknown>";
00570bcf          AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, m_buffer_4);
00570bc4      }
00570bc4      
00570bd4      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00570bd9      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00570be0      m_buffer_4 = &PStringBase<char>::s_NullBuffer_1[-1];
00570be1      InterlockedIncrement(m_buffer_4);
00570be3      class AC1Legacy::PStringBase<char>* ebx = arg3;
00570be7      class AC1Legacy::PSRefBuffer<char>* m_buffer = ebx->m_buffer;
00570bed      uint32_t* m_buffer_5;
00570bed      uint32_t var_10;
00570bed      uint32_t var_c;
00570bed      uint32_t var_8;
00570bed      
00570bed      if (m_buffer->m_len != 1)
00570bed      {
00570e3a          char* var_38_4;
00570e3a          
00570e3a          if (ebp > 0x4000)
00570e3a          {
00570ef2              if (ebp == 0x1000000)
00570ef2              {
00571025                  m_buffer_4 = &m_buffer->m_data;
00571026                  char (* var_34_16)[0x1] = &m_buffer->m_data;
00571027                  var_38_4 = "[Co-Vassals] <Tell:IIDString:0:%…";
00571030              label_571030:
00571031                  m_buffer_5 = 0xa;
00571036                  PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, var_38_4);
00570ef2              }
00570ef2              else if (ebp == 0x2000000)
00570efe              {
00571014                  m_buffer_4 = &m_buffer->m_data;
00571015                  char (* var_34_15)[0x1] = &m_buffer->m_data;
00571031                  m_buffer_5 = 0xa;
00571036                  PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "[Allegiance Broadcast] <Tell:IID…");
00570efe              }
00570efe              else
00570efe              {
00570f0a              label_570f0a:
00570f0a                  
00570f0a                  if (ebp != 0x400)
00570f0a                  {
00570f16                      int32_t esi_7 = -((ebp - 1));
00570f1d                      m_buffer_5 = (((esi_7 - esi_7) & 0xfffffffa) + 0xe);
00570f0a                  }
00570f0a                  else
00570f0c                      m_buffer_5 = 0xf;
00570f0c                  
00570f20                  m_buffer_4 = "<Tell:IIDString:0:%s>";
00570f29                  PStringBase<char>::PStringBase<char>(&arg2, m_buffer_4);
00570f2e                  uint32_t ecx_31 = arg2;
00570f32                  int32_t eax_20 = *(uint32_t*)(ecx_31 - 4);
00570f32                  
00570f38                  if (eax_20 != 1)
00570f38                  {
00570f3b                      m_buffer_4 = (eax_20 - 1);
00570f41                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_31, m_buffer_4);
00570f38                  }
00570f38                  
00570f4a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00570f54                  m_buffer_4 = &ebx->m_buffer->m_data;
00570f59                  PStringBase<char>::PStringBase<char>(&arg3, m_buffer_4);
00570f5e                  class AC1Legacy::PStringBase<char>* ecx_37 = arg3;
00570f62                  int32_t m_buffer_3 = ecx_37->m_buffer;
00570f62                  
00570f68                  if (m_buffer_3 != 1)
00570f68                  {
00570f6b                      m_buffer_4 = (m_buffer_3 - 1);
00570f71                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_37, m_buffer_4);
00570f68                  }
00570f68                  
00570f7a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00570f7f                  m_buffer_4 = "<\Tell> says on the ";
00570f88                  PStringBase<char>::PStringBase<char>(&var_8, m_buffer_4);
00570f8d                  uint32_t ecx_41 = var_8;
00570f91                  int32_t eax_23 = *(uint32_t*)(ecx_41 - 4);
00570f91                  
00570f97                  if (eax_23 != 1)
00570f97                  {
00570f9a                      m_buffer_4 = (eax_23 - 1);
00570fa0                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_41, m_buffer_4);
00570f97                  }
00570f97                  
00570fa9                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00570fb5                  m_buffer_4 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data;
00570fba                  PStringBase<char>::PStringBase<char>(&var_c, m_buffer_4);
00570fbf                  uint32_t ecx_45 = var_c;
00570fc3                  int32_t eax_25 = *(uint32_t*)(ecx_45 - 4);
00570fc3                  
00570fc9                  if (eax_25 != 1)
00570fc9                  {
00570fcc                      m_buffer_4 = (eax_25 - 1);
00570fd2                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_45, m_buffer_4);
00570fc9                  }
00570fc9                  
00570fdb                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
00570fe0                  m_buffer_4 = " channel, "";
00570fe9                  PStringBase<char>::PStringBase<char>(&var_10, m_buffer_4);
00570fee                  uint32_t ecx_49 = var_10;
00570ff2                  int32_t eax_27 = *(uint32_t*)(ecx_49 - 4);
00570ff2                  
00570ff8                  if (eax_27 != 1)
00570ff8                  {
00570ffb                      m_buffer_4 = (eax_27 - 1);
00571001                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_49, m_buffer_4);
00570ff8                  }
00570ff8                  
0057100a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
00570efe              }
00570e3a          }
00570e3a          else if (ebp == 0x4000)
00570e40          {
00570eba              m_buffer_4 = &m_buffer->m_data;
00570ebb              char (* var_34_8)[0x1] = &m_buffer->m_data;
00570ec6              m_buffer_5 = 0xa;
00570ecb              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "Your follower <Tell:IIDString:0:…");
00570ed0              class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = ebx->m_buffer;
00570ed7              m_buffer_4 = m_buffer_2;
00570edd              InterlockedIncrement(&m_buffer_2->m_cRef);
00570edf              gmCCommunicationSystem::SetLastAtMonarchUserName(m_buffer_4);
00570e40          }
00570e40          else if (ebp == 0x800)
00570e48          {
00570ea1              m_buffer_4 = &m_buffer->m_data;
00570ea2              char (* var_34_7)[0x1] = &m_buffer->m_data;
00570eac              m_buffer_5 = 0x13;
00571036              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "[Fellowship] <Tell:IIDString:0:%…");
00570e48          }
00570e48          else
00570e48          {
00570e50              if (ebp == 0x1000)
00570e50              {
00570e92                  m_buffer_4 = &m_buffer->m_data;
00570e93                  char (* var_34_6)[0x1] = &m_buffer->m_data;
00570e94                  var_38_4 = "Your patron <Tell:IIDString:0:%s…";
00570e99                  goto label_571030;
00570e50              }
00570e50              
00570e58              if (ebp != 0x2000)
00570e58                  goto label_570f0a;
00570e58              
00570e61              m_buffer_4 = &m_buffer->m_data;
00570e62              char (* var_34_4)[0x1] = &m_buffer->m_data;
00570e6d              m_buffer_5 = 0xa;
00570e72              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "Your vassal <Tell:IIDString:0:%s…");
00570e7d              AC1Legacy::PStringBase<char>::PStringBase<char>(&m_buffer_4, ebx);
00570e82              gmCCommunicationSystem::SetLastAtPatronUserName(m_buffer_4);
00570e48          }
00570bed      }
00570bed      else if (ebp > 0x4000)
00570bf9      {
00570d2b          if (ebp == 0x1000000)
00570d2b          {
00570e17              m_buffer_4 = &m_buffer->m_data;
00570e22              m_buffer_5 = 0xa;
00570e27              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "[Co-Vassals] You say, "");
00570d2b          }
00570d2b          else if (ebp == 0x2000000)
00570d37          {
00570df7              m_buffer_4 = &m_buffer->m_data;
00570e02              m_buffer_5 = 0xa;
00570e07              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "[Allegiance Broadcast] You say, …");
00570d37          }
00570d37          else if (ebp == 0x4000000)
00570d43          {
00570ddc              m_buffer_4 = &data_7928af;
00570de5              m_buffer_5 = 0x13;
00570dea              PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_2, m_buffer_4);
00570d43          }
00570d43          else
00570d43          {
00570d4f          label_570d4f:
00570d4f              
00570d4f              if (ebp != 0x400)
00570d4f              {
00570d5b                  int32_t esi_2 = -((ebp - 1));
00570d62                  m_buffer_5 = (((esi_2 - esi_2) & 0xfffffffb) + 0xe);
00570d4f              }
00570d4f              else
00570d51                  m_buffer_5 = 0xf;
00570d51              
00570d65              m_buffer_4 = "You say on the ";
00570d6e              PStringBase<char>::PStringBase<char>(&var_10, m_buffer_4);
00570d77              m_buffer_4 = &var_10;
00570d7c              PStringBase<char>::operator+=(&PStringBase<char>::s_NullBuffer_2, m_buffer_4);
00570d85              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
00570d91              m_buffer_4 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data;
00570d96              PStringBase<char>::PStringBase<char>(&var_c, m_buffer_4);
00570d9f              m_buffer_4 = &var_c;
00570da4              PStringBase<char>::operator+=(&PStringBase<char>::s_NullBuffer_2, m_buffer_4);
00570dad              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
00570db2              m_buffer_4 = " channel, "";
00570dbb              PStringBase<char>::PStringBase<char>(&var_8, m_buffer_4);
00570dc4              m_buffer_4 = &var_8;
00570dc9              PStringBase<char>::operator+=(&PStringBase<char>::s_NullBuffer_2, m_buffer_4);
00570dd2              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00570d43          }
00570bf9      }
00570bf9      else if (ebp == 0x4000)
00570bff      {
00570c21      label_570c21:
00570c21          m_buffer_4 = "You say to your ";
00570c2a          m_buffer_5 = 0xb;
00570c2f          PStringBase<char>::PStringBase<char>(&arg2, m_buffer_4);
00570c34          uint32_t ecx_2 = arg2;
00570c38          int32_t eax_3 = *(uint32_t*)(ecx_2 - 4);
00570c38          
00570c3e          if (eax_3 != 1)
00570c3e          {
00570c41              m_buffer_4 = (eax_3 - 1);
00570c47              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_2, m_buffer_4);
00570c4c              ecx_2 = arg2;
00570c3e          }
00570c3e          
00570c5c          m_buffer_4 = (ecx_2 - 0x10);
00570c5c          
00570c65          if ((InterlockedDecrement(m_buffer_4) == 0 && ecx_2 != 0x14))
00570c65          {
00570c67              int32_t eax_6 = *(uint32_t*)(ecx_2 - 0x14);
00570c69              m_buffer_4 = 1;
00570c6d              *(uint32_t*)eax_6(m_buffer_4);
00570c65          }
00570c65          
00570c76          m_buffer_4 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data;
00570c7b          PStringBase<char>::PStringBase<char>(&arg3, m_buffer_4);
00570c80          class AC1Legacy::PStringBase<char>* ecx_8 = arg3;
00570c84          int32_t m_buffer_1 = ecx_8->m_buffer;
00570c84          
00570c8a          if (m_buffer_1 != 1)
00570c8a          {
00570c8d              m_buffer_4 = (m_buffer_1 - 1);
00570c93              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_8, m_buffer_4);
00570c98              ecx_8 = arg3;
00570c8a          }
00570c8a          
00570ca2          m_buffer_4 = &ecx_8[-4];
00570ca2          
00570cab          if ((InterlockedDecrement(m_buffer_4) == 0 && ecx_8 != 0x14))
00570cab          {
00570cad              class AC1Legacy::PStringBase<char> eax_9 = *(int32_t*)((char*)ecx_8 + -0x14);
00570caf              m_buffer_4 = 1;
00570cb3              *(uint32_t*)eax_9(m_buffer_4);
00570cab          }
00570cab          
00570cb5          m_buffer_4 = &data_7d0df8;
00570cbe          char* var_14;
00570cbe          PStringBase<char>::PStringBase<char>(&var_14, m_buffer_4);
00570cc3          char* eax_10 = var_14;
00570cc7          int32_t ecx_12 = *(uint32_t*)(eax_10 - 4);
00570cc7          
00570ccd          if (ecx_12 != 1)
00570ccd          {
00570cd0              m_buffer_4 = (ecx_12 - 1);
00570cd6              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, eax_10, m_buffer_4);
00570cdb              eax_10 = var_14;
00570ccd          }
00570ccd          
00570ce5          m_buffer_4 = &eax_10[0xfffffff0];
00570ce5          
00570cf2          if ((InterlockedDecrement(m_buffer_4) == 0 && eax_10 != 0x14))
00570cf2          {
00570cf8              int32_t edx_3 = *(uint32_t*)(eax_10 - 0x14);
00570cfa              m_buffer_4 = 1;
00570cfe              *(uint32_t*)edx_3(m_buffer_4);
00570cf2          }
00570bff      }
00570bff      else
00570bff      {
00570c07          if (ebp != 0x800)
00570c07          {
00570c1b              if ((ebp == 0x1000 || ebp == 0x2000))
00570c13                  goto label_570c21;
00570c13              
00570c13              goto label_570d4f;
00570c07          }
00570c07          
00570d08          m_buffer_4 = &m_buffer->m_data;
00570d13          m_buffer_5 = 0x13;
00570d18          PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "[Fellowship] You say, "");
00570bff      }
00571047      m_buffer_4 = &arg4->m_buffer->m_data;
0057104c      PStringBase<char>::PStringBase<char>(&arg2, m_buffer_4);
00571051      uint32_t ecx_53 = arg2;
00571055      int32_t eax_33 = *(uint32_t*)(ecx_53 - 4);
00571055      
0057105b      if (eax_33 != 1)
0057105b      {
0057105e          m_buffer_4 = (eax_33 - 1);
00571064          PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_53, m_buffer_4);
00571069          ecx_53 = arg2;
0057105b      }
0057105b      
00571079      m_buffer_4 = (ecx_53 - 0x10);
00571079      
00571082      if ((InterlockedDecrement(m_buffer_4) == 0 && ecx_53 != 0x14))
00571082      {
00571084          int32_t edx_7 = *(uint32_t*)(ecx_53 - 0x14);
00571086          m_buffer_4 = 1;
0057108a          *(uint32_t*)edx_7(m_buffer_4);
00571082      }
00571082      
00571092      uint32_t eax_36;
00571092      
00571092      if (ebp == 0x4000000)
00571092      {
005710c0          m_buffer_4 = &data_794508;
005710c9          PStringBase<char>::PStringBase<char>(&arg3, m_buffer_4);
005710ce          eax_36 = arg3;
005710d2          int32_t ecx_62 = *(uint32_t*)(eax_36 - 4);
005710d2          
005710d8          if (ecx_62 != 1)
005710d8          {
005710db              m_buffer_4 = (ecx_62 - 1);
005710e1              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, eax_36, m_buffer_4);
005710e6              eax_36 = arg3;
005710d8          }
00571092      }
00571092      else
00571092      {
00571094          m_buffer_4 = &data_7d0bf8;
0057109d          PStringBase<char>::PStringBase<char>(&arg2, m_buffer_4);
005710a2          eax_36 = arg2;
005710a6          int32_t ecx_58 = *(uint32_t*)(eax_36 - 4);
005710a6          
005710ac          if (ecx_58 != 1)
005710ac          {
005710af              m_buffer_4 = (ecx_58 - 1);
005710b5              PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, eax_36, m_buffer_4);
005710ba              eax_36 = arg2;
005710ac          }
00571092      }
00571092      
005710f0      m_buffer_4 = (eax_36 - 0x10);
005710f0      
005710f9      if ((InterlockedDecrement(m_buffer_4) == 0 && eax_36 != 0x14))
005710f9      {
005710fb          int32_t edx_8 = *(uint32_t*)(eax_36 - 0x14);
005710ff          m_buffer_4 = 1;
00571101          *(uint32_t*)edx_8(m_buffer_4);
005710f9      }
005710f9      
00571103      m_buffer_4 = &data_7928af;
0057110c      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, m_buffer_4);
00571111      m_buffer_4 = m_buffer_5;
00571119      int32_t eax_39 = gmCCommunicationSystem::IsSquelched(0, &arg2, m_buffer_4);
00571126      uint32_t eax_40 = arg2;
0057112d      char ebx_2 = ((int8_t)-(eax_39));
00571136      m_buffer_4 = (eax_40 + 4);
00571136      
00571141      if ((InterlockedDecrement(m_buffer_4) == 0 && eax_40 != 0))
00571141      {
00571143          int32_t edx_9 = *(uint32_t*)eax_40;
00571145          m_buffer_4 = 1;
00571149          *(uint32_t*)edx_9(m_buffer_4);
00571141      }
00571141      
0057114d      if ((ebx_2 - ebx_2) != 0xff)
0057114d      {
0057114f          m_buffer_4 = nullptr;
00571169          ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &arg2, 0), m_buffer_5, 1, m_buffer_4);
00571172          int32_t* esi_11 = (arg2 - 0x14);
00571178          m_buffer_4 = &esi_11[1];
00571178          
00571181          if ((InterlockedDecrement(m_buffer_4) == 0 && esi_11 != 0))
00571181          {
00571183              int32_t edx_10 = *(uint32_t*)esi_11;
00571185              m_buffer_4 = 1;
00571189              *(uint32_t*)edx_10(m_buffer_4);
00571181          }
0057114d      }
0057114d      
0057118f      void* __offset(PSRefBufferCharData<char>, -0x14) esi_13 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00571195      m_buffer_4 = ((char*)esi_13 + 4);
00571195      
0057119e      if ((InterlockedDecrement(m_buffer_4) == 0 && esi_13 != 0))
0057119e      {
005711a0          int32_t edx_11 = *(int32_t*)((char*)ADJ(esi_13) + -0x14);
005711a2          m_buffer_4 = 1;
005711a6          *(uint32_t*)edx_11(m_buffer_4);
0057119e      }
0057119e      
005711a8      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005711af      m_buffer_4 = &AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef;
005711af      
005711b8      if ((InterlockedDecrement(m_buffer_4) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
005711b8      {
005711ba          struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable;
005711bc          m_buffer_4 = 1;
005711c0          vtable->__vecDelDtor(m_buffer_4);
005711b8      }
005711b8      
005711cb      return 0;
00570b90  }

005711ce                                            90 90                                                                ..

005711d0  uint32_t __fastcall ClientCommunicationSystem::Handle_Character__QueryAgeResponse(class ClientCommunicationSystem* this, class AC1Legacy::PStringBase<char> const* arg2, class AC1Legacy::PStringBase<char> const* arg3)

005711d0  {
005711d0      class ClientCommunicationSystem* this_1 = this;
005711d1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005711d6      class PStringBase<char> esi;
005711d6      class PStringBase<char> var_8 = esi;
005711e1      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005711eb      int32_t eax_2 = *(uint32_t*)__return_addr;
005711f5      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
005711f5      
005711f7      if (*(uint32_t*)(eax_2 + 8) != 1)
005711f7      {
00571214          char (* var_10_1)[0x1] = &m_buffer->m_data;
00571218          int32_t var_14_1 = (eax_2 + 0x14);
00571223          PStringBase<char>::sprintf(&var_8, "%s has played for %s.\n");
005711f7      }
005711f7      else
005711f7      {
005711fc          char (* var_10)[0x1] = &m_buffer->m_data;
00571207          PStringBase<char>::sprintf(&var_8, "You have played for %s.\n");
005711f7      }
005711f7      
0057122b      int32_t edi;
0057122b      int32_t var_10_2 = edi;
00571245      ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&var_8, &arg2, 0), 0, 1, 0);
00571254      void* __offset(AC1Legacy::PStringBase<char>, -0x14) esi_3 = &arg2[-5];
00571254      
00571263      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0057126b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0057126b      
00571281      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
00571281      {
00571283          int32_t edx_3 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14);
00571285          var_8 = 1;
00571289          *(uint32_t*)edx_3(var_8);
00571281      }
00571281      
0057128f      return 0;
005711d0  }

00571292                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005712a0  uint32_t __thiscall ClientCommunicationSystem::Handle_Communication__HearSpeech(class ClientCommunicationSystem* this, class AC1Legacy::PStringBase<char> const* arg2, class AC1Legacy::PStringBase<char> const* arg3, uint32_t arg4, uint32_t arg5)

005712a0  {
005712b2      int32_t ebp = 0;
005712b2      
005712c8      if ((SmartBox::smartbox->player != 0 && arg4 != 0))
005712c8      {
005712ce          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005712d9          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005712e0          uint32_t __return = &PStringBase<char>::s_NullBuffer_1[-1];
005712e1          InterlockedIncrement(__return);
005712e3          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005712ea          uint32_t player_id;
005712ea          
005712ea          if (SmartBox::smartbox_1 == 0)
005712f4              player_id = 0;
005712ea          else
005712ec              player_id = SmartBox::smartbox_1->player_id;
005712ec          
005712f8          if (arg4 != player_id)
005712f8          {
00571333              __return = arg5;
00571333              
0057133f              if (gmCCommunicationSystem::CanHear(arg4, __return) == 0)
0057133f              {
00571345                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2);
00571353                  return 0;
0057133f              }
0057133f              
00571356              int32_t* __return_1 = nullptr;
0057135a              int32_t eax_5 = CPlayerSystem::IsOlthoi();
00571363              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg3->m_buffer;
00571368              __return = &m_buffer_1->m_cRef;
00571369              int32_t var_c = eax_5;
0057136d              arg3 = m_buffer_1;
00571371              InterlockedIncrement(__return);
00571377              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
00571379              class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = m_buffer;
00571380              __return = &m_buffer->m_cRef;
00571381              InterlockedIncrement(__return);
00571383              __return = &data_7d0e98;
0057138c              void var_1c;
0057138c              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c, __return);
00571395              __return = &var_1c;
005713a5              class ClientCommunicationSystem* ebx;
005713a5              ebx = AC1Legacy::PStringBase<char>::find_substring(&arg3, __return) >= 0;
005713a8              uint32_t __return_3 = AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c);
005713af              int32_t* __return_6;
005713af              
005713af              if (ebx == 0)
005713af              {
005713e9                  __return = &data_7d0e94;
005713f2                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c, __return);
005713fb                  __return = &var_1c;
0057140b                  ebx = AC1Legacy::PStringBase<char>::find_substring(&arg3, __return) >= 0;
0057140e                  uint32_t __return_4 = AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_1c);
0057140e                  
00571415                  if (ebx == 0)
005713d4                      __return_6 = __return_1;
00571415                  else
00571415                  {
00571417                      __return = __return_4;
0057141f                      AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &data_7d0e94);
0057142c                      AC1Legacy::PStringBase<char>::trim(&arg3, 0, 1, __return);
00571431                      m_buffer_1 = arg3;
00571435                      __return_6 = 1;
00571415                  }
005713af              }
005713af              else
005713af              {
005713b1                  __return = __return_3;
005713b9                  AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &data_7d0e98);
005713c6                  AC1Legacy::PStringBase<char>::trim(&arg3, 0, 1, __return);
005713cb                  m_buffer_1 = arg3;
005713cf                  ebp = 1;
005713d4                  __return_6 = __return_1;
005713af              }
005713af              
005713e0              int32_t ebp_1;
005713e0              
005713e0              if ((__return_6 == var_c || ebp != 0))
0057143c                  ebp_1 = 0;
005713e0              else
005713e2                  ebp_1 = 1;
005713e2              
00571442              __return = 0x7cfe98;
00571448              int32_t var_10 = 0;
00571458              __return = GetClassObject(&__return_1, __return);
0057145d              InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_c, __return);
00571462              int32_t* __return_5 = __return_1;
00571462              
00571468              if (__return_5 != 0)
0057146c                  *(uint32_t*)(*(uint32_t*)__return_5 + 0x14)();
0057146c              
0057146f              int32_t esi_1 = var_c;
0057147d              int32_t var_8;
0057147d              
0057147d              if ((esi_1 != 0 && var_8 >= 0))
0057147d              {
00571483                  __return = &var_10;
0057148c                  CBaseQualities::InqBool((esi_1 + 0x38), 0x81, __return);
0057148c                  
00571497                  if ((var_10 != 0 || ebp_1 == 0))
00571497                      goto label_5714e9;
00571497                  
00571497                  goto label_57149f;
0057147d              }
0057147d              
0057149b              if (ebp_1 == 0)
0057149b              {
005714e9              label_5714e9:
005714e9                  
005714f5                  if ((arg4 < 0x50000001 || arg4 > 0x6fffffff))
005714f5                  {
00571524                      __return = &arg2->m_buffer->m_data;
00571528                      char (* var_3c_5)[0x1] = &m_buffer_1->m_data;
00571533                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "%s says, "%s"\n");
005714f5                  }
005714f5                  else
005714f5                  {
00571500                      __return = &arg2->m_buffer->m_data;
00571504                      char (* var_3c_4)[0x1] = &m_buffer_1->m_data;
00571505                      char (* var_40_4)[0x1] = &m_buffer_1->m_data;
00571506                      uint32_t var_44_3 = arg4;
00571511                      PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "<Tell:IIDString:%d:%s>%s<\Tell> …");
005714f5                  }
0057149b              }
0057149b              else
0057149b              {
0057149f              label_57149f:
0057149f                  class AC1Legacy::PStringBase<char>* __return_2;
0057149f                  
0057149f                  if (__return_6 == 0)
0057149f                  {
005714b1                      __return = &arg2;
005714b2                      __return_2 = GetRandomHumanText(__return);
0057149f                  }
0057149f                  else
0057149f                  {
005714a5                      __return = &arg2;
005714a6                      __return_2 = GetRandomOlthoiText(__return);
0057149f                  }
0057149f                  
005714be                  __return = __return_2;
005714bf                  AC1Legacy::PStringBase<char>::operator=(&m_buffer_2, __return);
005714c8                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
005714d4                  __return = &m_buffer_2->m_data;
005714d8                  char (* var_3c_3)[0x1] = &m_buffer_1->m_data;
00571533                  PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "%s %s\n");
0057149b              }
0057149b              
0057153f              __return = 0;
0057154d              ClientSystem::AddTextToScroll(this, &PStringBase<char>::s_NullBuffer_2, arg5, 1, __return);
0057154d              
00571554              if (esi_1 != 0)
0057155a                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)();
0057155a              
00571561              AC1Legacy::PStringBase<char>::~PStringBase<char>(&m_buffer_2);
0057156a              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
005712f8          }
005712f8          else
005712f8          {
00571303              __return = &arg2->m_buffer->m_data;
0057130e              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "You say, "%s"\n");
0057131a              __return = 0;
00571325              ClientSystem::AddTextToScroll(this, &PStringBase<char>::s_NullBuffer_2, arg5, 1, __return);
005712f8          }
005712f8          
00571573          void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00571579          __return = ((char*)esi_3 + 4);
00571579          
00571586          if ((InterlockedDecrement(__return) == 0 && esi_3 != 0))
00571586          {
00571588              int32_t edx_7 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
0057158a              __return = 1;
0057158e              *(uint32_t*)edx_7(__return);
00571586          }
005712c8      }
005712c8      
00571599      return 0;
005712a0  }

0057159c                                                                                      90 90 90 90                              ....

005715a0  uint32_t __thiscall ClientCommunicationSystem::Handle_Communication__HearDirectSpeech(class ClientCommunicationSystem* this, class AC1Legacy::PStringBase<char> const* arg2, class AC1Legacy::PStringBase<char>* arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, uint32_t arg7)

005715a0  {
005715aa      void* esi;
005715aa      void* var_30 = esi;
005715ab      uint32_t edi;
005715ab      uint32_t var_34 = edi;
005715b4      int32_t ebp = 0;
005715b6      bool cond:0 = SmartBox::smartbox->player == 0;
005715b8      class ClientCommunicationSystem* this_1 = this;
005715b8      
005715bc      if (!(cond:0))
005715bc      {
005715c2          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005715cd          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
005715d5          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005715d5          
005715df          if (arg4 != arg5)
005715df          {
0057161c              int32_t var_1c_1 = 0;
00571620              int32_t eax_4 = CPlayerSystem::IsOlthoi();
00571629              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg3->m_buffer;
0057162f              int32_t var_c_1 = eax_4;
00571633              arg3 = m_buffer_1;
00571637              InterlockedIncrement(&m_buffer_1->m_cRef);
0057163d              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
0057163f              class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = m_buffer;
00571647              InterlockedIncrement(&m_buffer->m_cRef);
00571652              int32_t* var_18;
00571652              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_18, &data_7d0e98);
00571657              int32_t* esi_1 = var_18;
00571663              int32_t eax_7 = strstr(&m_buffer_1->m_data, &esi_1[5]);
0057166e              void* eax_8;
0057166e              
0057166e              if (eax_7 != 0)
00571677                  eax_8 = ((eax_7 - m_buffer_1) - 0x14);
0057166e              else
00571670                  eax_8 = 0xffffffff;
00571670              
0057167f              var_30 = &esi_1[1];
00571680              int32_t ebx;
00571680              ebx = eax_8 >= 0;
00571683              int32_t eax_11;
00571683              void* ecx_6;
00571683              eax_11 = InterlockedDecrement(var_30);
00571683              
0057168f              if ((eax_11 == 0 && esi_1 != 0))
0057168f              {
00571691                  int32_t edx_5 = *(uint32_t*)esi_1;
00571693                  var_30 = 1;
00571697                  ecx_6 = *(uint32_t*)edx_5(var_30);
0057168f              }
0057168f              
0057169b              int32_t var_14;
0057169b              
0057169b              if (ebx == 0)
0057169b              {
005716c3                  var_30 = &data_7d0e94;
005716cc                  AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, var_30);
005716d5                  var_30 = &this_1;
005716da                  int32_t eax_12 = AC1Legacy::PStringBase<char>::find_substring(&arg5, var_30);
005716df                  int32_t* this_2 = this_1;
005716e8                  var_30 = &this_2[1];
005716e9                  ebx = eax_12 >= 0;
005716ec                  int32_t eax_13;
005716ec                  void* ecx_13;
005716ec                  eax_13 = InterlockedDecrement(var_30);
005716ec                  
005716f8                  if ((eax_13 == 0 && this_2 != 0))
005716f8                  {
005716fa                      int32_t edx_6 = *(uint32_t*)this_2;
005716fc                      var_30 = 1;
00571700                      ecx_13 = *(uint32_t*)edx_6(var_30);
005716f8                  }
005716f8                  
00571704                  if (ebx != 0)
00571704                  {
00571706                      var_30 = ecx_13;
0057170e                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_30, &data_7d0e94);
0057171b                      AC1Legacy::PStringBase<char>::trim(&arg5, 0, 1, var_30);
00571720                      m_buffer_1 = arg5;
00571724                      var_14 = 1;
00571704                  }
0057169b              }
0057169b              else
0057169b              {
0057169d                  var_30 = ecx_6;
005716a5                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_30, &data_7d0e98);
005716b3                  AC1Legacy::PStringBase<char>::trim(&arg5, 0, 1, var_30);
005716b8                  m_buffer_1 = arg5;
005716bc                  ebp = 1;
0057169b              }
0057169b              
0057173a              class TResult __return;
0057173a              int32_t ebp_1;
0057173a              
0057173a              if ((var_14 == __return || ebp != 0))
00571743                  ebp_1 = 0;
0057173a              else
0057173c                  ebp_1 = 1;
0057173c              
00571749              var_30 = &arg5;
00571754              int32_t var_c_2 = 0;
00571758              arg5 = 0;
00571763              InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, &PlayerDesc_ClassType, var_30);
00571768              uint32_t esi_2 = arg5;
00571773              var_30 = nullptr;
0057177a              __return_addr = nullptr;
0057177e              arg2 = nullptr;
0057177e              
00571782              if (esi_2 != 0)
00571788                  *(uint32_t*)(*(uint32_t*)esi_2 + 0x10)(esi_2);
00571788              
0057179b              int32_t ebx_1 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&__return_addr, &this_1);
0057179b              
0057179d              if (esi_2 != 0)
005717a3                  *(uint32_t*)(*(uint32_t*)esi_2 + 0x14)(esi_2);
005717a3              
005717b0              int32_t* var_8;
005717b0              
005717b0              if ((var_8 != 0 && ebx_1 >= 0))
005717b0              {
005717bf                  CBaseQualities::InqBool(&var_8[0xe], 0x81, &var_14);
005717bf                  
005717ca                  if ((var_14 != 0 || ebp_1 == 0))
005717ca                      goto label_57183e;
005717ca                  
005717ca                  goto label_5717d6;
005717b0              }
005717b0              
005717ce              class AC1Legacy::PSRefBuffer<char>* m_buffer_3;
005717ce              
005717ce              if (ebp_1 == 0)
005717ce              {
0057183e              label_57183e:
0057183e                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00571845                  uint32_t player_id;
00571845                  
00571845                  if (SmartBox::smartbox_1 == 0)
0057184f                      player_id = 0;
00571845                  else
00571847                      player_id = SmartBox::smartbox_1->player_id;
00571847                  
00571855                  if (arg5 == player_id)
00571855                  {
0057185b                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00571860                      arg5 = PStringBase<char>::s_NullBuffer_2;
00571868                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00571880                      char (* esi_3)[0x1];
00571880                      
00571880                      if ((arg4 < 0x50000001 || arg4 > 0x6fffffff))
00571880                      {
005718af                          char (* var_38_15)[0x1] = &arg2->m_buffer->m_data;
005718b0                          esi_3 = &m_buffer_1->m_data;
005718b3                          char (* var_3c_4)[0x1] = esi_3;
005718be                          PStringBase<char>::sprintf(&arg5, "%s tells you, "%s"\n");
00571880                      }
00571880                      else
00571880                      {
0057188b                          char (* var_38_14)[0x1] = &arg2->m_buffer->m_data;
0057188c                          esi_3 = &m_buffer_1->m_data;
0057188f                          char (* var_3c_3)[0x1] = esi_3;
00571890                          char (* var_40_4)[0x1] = esi_3;
00571891                          uint32_t var_44_4 = arg4;
0057189c                          PStringBase<char>::sprintf(&arg5, "<Tell:IIDString:%d:%s>%s<\Tell> …");
00571880                      }
00571880                      
005718d8                      ClientSystem::AddTextToScroll(this_1, &arg5, arg6, 1, 0);
005718d8                      
005718eb                      if ((arg4 >= 0x50000001 && arg4 <= 0x6fffffff))
005718eb                      {
005718ee                          gmCCommunicationSystem::SetLastTeller(arg4);
005718fb                          PStringBase<char>::PStringBase<char>(&arg2, esi_3);
00571905                          gmCCommunicationSystem::SetLastTellerName(&arg2);
00571911                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
005718eb                      }
005718eb                      
0057191a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg5);
00571855                  }
00571855                  
0057191f                  m_buffer_3 = m_buffer_2;
005717ce              }
005717ce              else
005717ce              {
005717d6              label_5717d6:
005717d6                  class AC1Legacy::PStringBase<char>* eax_21;
005717d6                  
005717d6                  if (var_1c_1 == 0)
005717e9                      eax_21 = GetRandomHumanText(&arg2);
005717d6                  else
005717dd                      eax_21 = GetRandomOlthoiText(&arg2);
005717dd                  
005717f6                  AC1Legacy::PStringBase<char>::operator=(&m_buffer_2, eax_21);
005717ff                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
00571804                  m_buffer_3 = m_buffer_2;
0057180b                  char (* var_38_12)[0x1] = &m_buffer_3->m_data;
0057180f                  char (* var_3c_2)[0x1] = &m_buffer_1->m_data;
0057181a                  PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "%s %s\n");
00571834                  ClientSystem::AddTextToScroll(this_1, &PStringBase<char>::s_NullBuffer_3, arg6, 1, 0);
005717ce              }
005717ce              
00571929              if (var_8 != 0)
0057192d                  *(uint32_t*)(*(uint32_t*)var_8 + 0x14)(esi_2);
0057192d              
00571942              if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
00571944                  m_buffer_3->vtable->__vecDelDtor(1);
00571944              
00571958              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
0057195a                  m_buffer_1->vtable->__vecDelDtor(1);
005715df          }
005715df          else
005715df          {
005715ea              char (* var_38_2)[0x1] = &arg2->m_buffer->m_data;
005715f5              PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_3, "You think, "%s"\n");
0057160c              ClientSystem::AddTextToScroll(this, &PStringBase<char>::s_NullBuffer_3, arg6, 1, 0);
005715df          }
005715df          
00571966          void* __offset(PSRefBufferCharData<char>, -0x14) esi_5 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
00571966          
00571975          if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0057197d              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
005715bc      }
005715bc      
00571988      return 0;
005715a0  }

0057198b                                   90 90 90 90 90                                                             .....

00571990  void __thiscall ClientCommunicationSystem::HandleFailureEvent(class ClientCommunicationSystem* this, uint32_t arg2, class PStringBase<unsigned short> const* arg3)

00571990  {
00571997      char ebx = 0;
00571999      int32_t var_50 = 0;
005719a0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
005719a6      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
005719b1      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
005719b1      
005719dc      if ((arg2 == 0x43 || arg2 == 0x3f7))
005719dc      {
005719de      label_5719de:
005719de          
005719e5          if ((ClientCombatSystem::GetCombatSystem() != 0 && ClientCombatSystem::RepeatAttackInProgress(ClientCombatSystem::GetCombatSystem()) != 0))
005719fe              ClientCombatSystem::AbortAutomaticAttack(ClientCombatSystem::GetCombatSystem());
005719dc      }
005719dc      
005719cd      if (((arg2 == 0x3e || arg2 == 0x23) || arg2 == 0x36))
005719c3          goto label_5719de;
005719c3      
00571a09      if (arg2 > 0x4e8)
00571a09      {
00573843          if ((arg2 - 0x4e9) <= 0xaa)
00571dc5              switch (arg2)
00571dc5              {
00574e5e                  case 0x4e9:
00574e5e                  {
00574e5e                      class PSRefBufferCharData<unsigned short>* m_charbuffer_68 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The %s cannot be used while on a…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574e5e                      break;
00574e5e                  }
00574ed6                  case 0x4ea:
00574ed6                  {
00574ed6                      class PSRefBufferCharData<unsigned short>* m_charbuffer_69 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The %s can only be used while on…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574ed6                      break;
00574ed6                  }
00573859                  case 0x4eb:
00573859                  {
00573859                      void var_36c;
00573859                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_36c, u"You can't do that while in the a…");
0057386b                      ClientSystem::AddTextToScroll(this, &var_36c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_36c);
00573859                      break;
00573859                  }
0057446f                  case 0x4ec:
0057446f                  {
0057446f                      void var_254;
0057446f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_254, u"You cannot modify your player ki…");
00574484                      ClientSystem::AddTextToScroll(this, &var_254, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_254);
0057446f                      break;
0057446f                  }
005744a1                  case 0x4ed:
005744a1                  {
005744a1                      void var_24c;
005744a1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_24c, u"Advocates may not change their p…");
005744b6                      ClientSystem::AddTextToScroll(this, &var_24c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_24c);
005744a1                      break;
005744a1                  }
005744d3                  case 0x4ee:
005744d3                  {
005744d3                      void var_244;
005744d3                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_244, u"Your level is too low to change …");
005744e8                      ClientSystem::AddTextToScroll(this, &var_244, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_244);
005744d3                      break;
005744d3                  }
00574505                  case 0x4ef:
00574505                  {
00574505                      void var_23c;
00574505                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_23c, u"Your level is too high to change…");
0057451a                      ClientSystem::AddTextToScroll(this, &var_23c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_23c);
00574505                      break;
00574505                  }
00574537                  case 0x4f0:
00574537                  {
00574537                      void var_234;
00574537                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_234, u"You feel a harsh dissonance, and…");
0057454c                      ClientSystem::AddTextToScroll(this, &var_234, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_234);
00574537                      break;
00574537                  }
00574569                  case 0x4f1:
00574569                  {
00574569                      void var_22c;
00574569                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_22c, u"Bael'Zharon's power flows throug…");
0057457e                      ClientSystem::AddTextToScroll(this, &var_22c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_22c);
00574569                      break;
00574569                  }
0057459b                  case 0x4f2:
0057459b                  {
0057459b                      void var_224;
0057459b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_224, u"Bael'Zharon has granted you resp…");
005745b0                      ClientSystem::AddTextToScroll(this, &var_224, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_224);
0057459b                      break;
0057459b                  }
00573c64                  case 0x4f3:
00573c64                  {
00573c64                      void var_2fc;
00573c64                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2fc, u"Lite Player Killers may not inte…");
00573c79                      ClientSystem::AddTextToScroll(this, &var_2fc, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2fc);
00573c64                      break;
00573c64                  }
0057465e                  case 0x4f4:
0057465e                  {
0057465e                      class PSRefBufferCharData<unsigned short>* m_charbuffer_80 = arg3->m_charbuffer;
00574660                      class PSRefBufferCharData<unsigned short>* m_charbuffer_110 = m_charbuffer_80;
00574663                      class PSRefBufferCharData<unsigned short>* m_charbuffer_96 = m_charbuffer_80;
00571e23                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s fails to affect you because $…");
00571e38                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
0057465e                      break;
0057465e                  }
00574677                  case 0x4f5:
00574677                  {
00574677                      class PSRefBufferCharData<unsigned short>* m_charbuffer_64 = arg3->m_charbuffer;
00574682                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s fails to affect you because y…");
00571e6e                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00574677                      break;
00574677                  }
00574696                  case 0x4f6:
00574696                  {
00574696                      class PSRefBufferCharData<unsigned short>* m_charbuffer_81 = arg3->m_charbuffer;
00574698                      class PSRefBufferCharData<unsigned short>* m_charbuffer_111 = m_charbuffer_81;
0057469b                      class PSRefBufferCharData<unsigned short>* m_charbuffer_97 = m_charbuffer_81;
00571e23                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s fails to affect you because %…");
00571e38                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00574696                      break;
00574696                  }
005746b2                  case 0x4f7:
005746b2                  {
005746b2                      void var_204;
005746b2                      class PStringBase<unsigned short>* __return_1;
005746b2                      class PStringBase<unsigned short>* edx_54;
005746b2                      __return_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_204, u" fails to affect you because you…");
005746c5                      void* var_3dc_20 = &var_204;
005746cd                      void var_20;
005746cd                      void* var_3e0_19 = &var_20;
005746d8                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::operator+(arg3, __return_1, edx_54));
005746e4                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
005746f0                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_204);
00574702                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
005746b2                      break;
005746b2                  }
00574718                  case 0x4f8:
00574718                  {
00574718                      void var_1f4;
00574718                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1f4, &data_7d2f80);
00574729                      void var_1fc;
00574729                      class PStringBase<unsigned short>* __return_2;
00574729                      class PStringBase<unsigned short>* edx_55;
00574729                      __return_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1fc, u" fails to affect you because you…");
0057473c                      void* var_3dc_22 = &var_1f4;
00574744                      void var_10;
00574744                      void* var_3e0_20 = &var_10;
00574745                      class PStringBase<unsigned short>* var_3e4_12 = arg3;
0057474d                      void var_18;
0057474d                      void* var_3e8_191 = &var_18;
00574755                      void* var_3ec_1 = &var_1fc;
0057475d                      void var_8;
0057475d                      void* var_3f0_1 = &var_8;
0057475e                      class PStringBase<unsigned short>* __return_3;
0057475e                      class PStringBase<unsigned short>* edx_56;
0057475e                      __return_3 = PStringBase<unsigned short>::operator+(arg3, __return_2, edx_55);
00574765                      class PStringBase<unsigned short>* __return_4;
00574765                      class PStringBase<unsigned short>* edx_57;
00574765                      __return_4 = PStringBase<unsigned short>::operator+(__return_3, __return_3, edx_56);
00574776                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::operator+(__return_4, __return_4, edx_57));
00574782                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
0057478e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
0057479a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
005747a6                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1fc);
005747b2                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1f4);
00573ba5                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00574718                      break;
00574718                  }
005747c8                  case 0x4f9:
005747c8                  {
005747c8                      void var_1ec;
005747c8                      class PStringBase<unsigned short>* __return_5;
005747c8                      class PStringBase<unsigned short>* edx_58;
005747c8                      __return_5 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1ec, u" fails to affect you across a ho…");
005747d4                      void* var_3dc_24 = &var_1ec;
005747e3                      void var_24;
005747e3                      void* var_3e0_21 = &var_24;
005747ee                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::operator+(arg3, __return_5, edx_58));
005747fa                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_24);
00574806                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1ec);
00573ba5                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
005747c8                      break;
005747c8                  }
00573b44                  case 0x4fa:
00573b44                  {
00573b44                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00573b55                      void var_314;
00573b55                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_314, u" is an invalid target.\n");
00573b66                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_314);
00573b72                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_314);
00571e6e                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00573b44                      break;
00573b44                  }
00573b85                  case 0x4fb:
00573b85                  {
00573b85                      class PSRefBufferCharData<unsigned short>* m_charbuffer_29 = arg3->m_charbuffer;
00573b90                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You are an invalid target for th…");
00573ba5                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00573b85                      break;
00573b85                  }
005739f4                  case 0x4fc:
005739f4                  {
005739f4                      void var_344;
005739f4                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_344, u"You aren't trained in healing!");
00573a09                      ClientSystem::AddTextToScroll(this, &var_344, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_344);
005739f4                      break;
005739f4                  }
00573a26                  case 0x4fd:
00573a26                  {
00573a26                      void var_33c;
00573a26                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_33c, u"You don't own that healing kit!");
00573a3b                      ClientSystem::AddTextToScroll(this, &var_33c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_33c);
00573a26                      break;
00573a26                  }
00573a58                  case 0x4fe:
00573a58                  {
00573a58                      void var_334;
00573a58                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_334, u"You can't heal that!");
00573a6d                      ClientSystem::AddTextToScroll(this, &var_334, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_334);
00573a58                      break;
00573a58                  }
00573a8a                  case 0x4ff:
00573a8a                  {
00573a8a                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00573a9b                      void var_32c;
00573a9b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_32c, u" is already at full health!");
00573aac                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_32c);
00573ab8                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_32c);
00573aca                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
00573a8a                      break;
00573a8a                  }
00573ae0                  case 0x500:
00573ae0                  {
00573ae0                      void var_324;
00573ae0                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_324, u"You aren't ready to heal!");
00573af5                      ClientSystem::AddTextToScroll(this, &var_324, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_324);
00573ae0                      break;
00573ae0                  }
00573b12                  case 0x501:
00573b12                  {
00573b12                      void var_31c;
00573b12                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_31c, u"You can only use Healing Kits on…");
00573b27                      ClientSystem::AddTextToScroll(this, &var_31c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_31c);
00573b12                      break;
00573b12                  }
00573cfa                  case 0x502:
00573cfa                  {
00573cfa                      void var_2e4;
00573cfa                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2e4, u"The Lifestone's magic protects y…");
00573d0f                      ClientSystem::AddTextToScroll(this, &var_2e4, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2e4);
00573cfa                      break;
00573cfa                  }
00573c96                  case 0x503:
00573c96                  {
00573c96                      void var_2f4;
00573c96                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2f4, u"The portal's residual energy pro…");
00573cab                      ClientSystem::AddTextToScroll(this, &var_2f4, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2f4);
00573c96                      break;
00573c96                  }
005745cd                  case 0x504:
005745cd                  {
005745cd                      void var_21c;
005745cd                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_21c, u"You are enveloped in a feeling o…");
005745e2                      ClientSystem::AddTextToScroll(this, &var_21c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_21c);
005745cd                      break;
005745cd                  }
00574c65                  case 0x505:
00574c65                  {
00574c65                      void var_164;
00574c65                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_164, u"You're too close to your sanctua…");
00574c7a                      ClientSystem::AddTextToScroll(this, &var_164, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_164);
00574c65                      break;
00574c65                  }
00573990                  case 0x506:
00573990                  {
00573990                      void var_354;
00573990                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_354, u"You can't do that -- you're trad…");
005739a5                      ClientSystem::AddTextToScroll(this, &var_354, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_354);
00573990                      break;
00573990                  }
005745ff                  case 0x507:
005745ff                  {
005745ff                      void var_214;
005745ff                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_214, u"Only Non-Player Killers may ente…");
00574614                      ClientSystem::AddTextToScroll(this, &var_214, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_214);
005745ff                      break;
005745ff                  }
00574631                  case 0x508:
00574631                  {
00574631                      void var_20c;
00574631                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20c, u"A cold wind touches your heart. …");
00574646                      ClientSystem::AddTextToScroll(this, &var_20c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20c);
00574631                      break;
00574631                  }
00573bbb                  case 0x509:
00573bbb                  {
00573bbb                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00573bcc                      void var_30c;
00573bcc                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_30c, u" has no appropriate targets equi…");
00573bdd                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_30c);
00573be9                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30c);
00573bfb                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00573bbb                      break;
00573bbb                  }
00573c0e                  case 0x50a:
00573c0e                  {
00573c0e                      class PSRefBufferCharData<unsigned short>* m_charbuffer_30 = arg3->m_charbuffer;
00573c19                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have no appropriate targets …");
00571e38                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00573c0e                      break;
00573c0e                  }
00574880                  case 0x50b:
00574880                  {
00574880                      void var_1d4;
00574880                      class PStringBase<unsigned short>* __return_6;
00574880                      class PStringBase<unsigned short>* edx_59;
00574880                      __return_6 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1d4, u" is now an open fellowship; anyo…");
0057488c                      void* var_3dc_26 = &var_1d4;
00574894                      void var_1c;
00574894                      void* var_3e0_22 = &var_1c;
005748a6                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::operator+(arg3, __return_6, edx_59));
005748b2                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
005748be                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1d4);
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574880                      break;
00574880                  }
005748d4                  case 0x50c:
005748d4                  {
005748d4                      void var_1cc;
005748d4                      class PStringBase<unsigned short>* __return_7;
005748d4                      class PStringBase<unsigned short>* edx_60;
005748d4                      __return_7 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1cc, u" is now a closed fellowship.\n");
005748e0                      void* var_3dc_28 = &var_1cc;
005748e8                      void var_14;
005748e8                      void* var_3e0_23 = &var_14;
005748fa                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::operator+(arg3, __return_7, edx_60));
00574906                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14);
00574912                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1cc);
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005748d4                      break;
005748d4                  }
00574928                  case 0x50d:
00574928                  {
00574928                      void var_1c4;
00574928                      class PStringBase<unsigned short>* __return_8;
00574928                      class PStringBase<unsigned short>* edx_61;
00574928                      __return_8 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1c4, u" is now the leader of this fello…");
00574934                      void* var_3dc_30 = &var_1c4;
0057493c                      void var_c;
0057493c                      void* var_3e0_24 = &var_c;
0057494e                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::operator+(arg3, __return_8, edx_61));
0057495a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
00574966                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c4);
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574928                      break;
00574928                  }
00574979                  case 0x50e:
00574979                  {
00574979                      class PSRefBufferCharData<unsigned short>* m_charbuffer_65 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have passed leadership of th…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574979                      break;
00574979                  }
00574990                  case 0x50f:
00574990                  {
00574990                      void var_1bc;
00574990                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1bc, u"You do not belong to a Fellowshi…");
005749a5                      ClientSystem::AddTextToScroll(this, &var_1bc, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1bc);
00574990                      break;
00574990                  }
00574d5a                  case 0x510:
00574d5a                  {
00574d5a                      class PSRefBufferCharData<unsigned short>* m_charbuffer_87 = arg3->m_charbuffer;
00574d5c                      class PSRefBufferCharData<unsigned short>* m_charbuffer_112 = m_charbuffer_87;
00574d5f                      class PSRefBufferCharData<unsigned short>* m_charbuffer_98 = m_charbuffer_87;
00574d6a                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You may not hook any more %s on …");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574d5a                      break;
00574d5a                  }
00574d83                  case 0x512:
00574d83                  {
00574d83                      void var_13c;
00574d83                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_13c, u"You are now using the maximum nu…");
00574d98                      ClientSystem::AddTextToScroll(this, &var_13c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_13c);
00574d83                      break;
00574d83                  }
00574db5                  case 0x513:
00574db5                  {
00574db5                      void var_134;
00574db5                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_134, u"You are no longer using the maxi…");
00574dca                      ClientSystem::AddTextToScroll(this, &var_134, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_134);
00574db5                      break;
00574db5                  }
00574de2                  case 0x514:
00574de2                  {
00574de2                      class PSRefBufferCharData<unsigned short>* m_charbuffer_88 = arg3->m_charbuffer;
00574de4                      class PSRefBufferCharData<unsigned short>* m_charbuffer_113 = m_charbuffer_88;
00574de7                      class PSRefBufferCharData<unsigned short>* m_charbuffer_99 = m_charbuffer_88;
00574df2                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You now have the maximum number …");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574de2                      break;
00574de2                  }
00574e06                  case 0x515:
00574e06                  {
00574e06                      class PSRefBufferCharData<unsigned short>* m_charbuffer_82 = arg3->m_charbuffer;
00574e08                      class PSRefBufferCharData<unsigned short>* m_charbuffer_114 = m_charbuffer_82;
00574e0b                      class PSRefBufferCharData<unsigned short>* m_charbuffer_100 = m_charbuffer_82;
00574e16                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You no longer have the maximum n…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574e06                      break;
00574e06                  }
00574e2f                  case 0x516:
00574e2f                  {
00574e2f                      void var_12c;
00574e2f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_12c, u"You are not permitted to use tha…");
00574e44                      ClientSystem::AddTextToScroll(this, &var_12c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_12c);
00574e2f                      break;
00574e2f                  }
005749c2                  case 0x517:
005749c2                  {
005749c2                      void var_1b4;
005749c2                      class PStringBase<unsigned short>* __return_9;
005749c2                      class PStringBase<unsigned short>* edx_62;
005749c2                      __return_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1b4, u" is not close enough to your lev…");
005749d5                      void* var_3dc_32 = &var_1b4;
005749dd                      int32_t* var_3e0_25 = &var_50;
005749e8                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::operator+(arg3, __return_9, edx_62));
005749f4                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_50);
00574a00                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1b4);
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005749c2                      break;
005749c2                  }
00574bcb                  case 0x518:
00574bcb                  {
00574bcb                      PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_2, u"This fellowship is locked; ");
00574bdc                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00574bed                      void var_174;
00574bed                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_174, u" cannot be recruited into the fe…");
00574bfe                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_174);
00574c0a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_174);
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574bcb                      break;
00574bcb                  }
00574c20                  case 0x519:
00574c20                  {
00574c20                      void var_16c;
00574c20                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_16c, u"The fellowship is locked, you we…");
00574c35                      ClientSystem::AddTextToScroll(this, &var_16c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_16c);
00574c20                      break;
00574c20                  }
00573c32                  case 0x51a:
00573c32                  {
00573c32                      void var_304;
00573c32                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_304, u"Only the original owner may use …");
00573c47                      ClientSystem::AddTextToScroll(this, &var_304, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_304);
00573c32                      break;
00573c32                  }
005743d0                  case 0x51b:
005743d0                  {
005743d0                      class PSRefBufferCharData<unsigned short>* m_charbuffer_60 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have entered the %s channel.…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005743d0                      break;
005743d0                  }
005743e4                  case 0x51c:
005743e4                  {
005743e4                      class PSRefBufferCharData<unsigned short>* m_charbuffer_61 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have left the %s channel.\n");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005743e4                      break;
005743e4                  }
00574a16                  case 0x51e:
00574a16                  {
00574a16                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00574a27                      void var_1ac;
00574a27                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1ac, u" will not receive your message, …");
00574a38                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_1ac);
00574a44                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1ac);
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574a16                      break;
00574a16                  }
00574a57                  case 0x51f:
00574a57                  {
00574a57                      class PSRefBufferCharData<unsigned short>* m_charbuffer_66 = arg3->m_charbuffer;
00574a67                      void var_1a4;
00574a67                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1a4, Formatted, u"Message Blocked: %s");
00574a7f                      ClientSystem::AddTextToScroll(this, &var_1a4, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1a4);
00574a57                      break;
00574a57                  }
00574b24                  case 0x520:
00574b24                  {
00574b24                      void var_18c;
00574b24                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18c, u"You cannot add anymore people to…");
00574b39                      ClientSystem::AddTextToScroll(this, &var_18c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18c);
00574b24                      break;
00574b24                  }
00574a9c                  case 0x521:
00574a9c                  {
00574a9c                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00574aad                      void var_19c;
00574aad                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_19c, u" has been added to the list of p…");
00574abe                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_19c);
00574aca                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_19c);
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574a9c                      break;
00574a9c                  }
00574ae0                  case 0x522:
00574ae0                  {
00574ae0                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00574af1                      void var_194;
00574af1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_194, u" has been removed from the list …");
00574b02                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_194);
00574b0e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_194);
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574ae0                      break;
00574ae0                  }
00574b56                  case 0x523:
00574b56                  {
00574b56                      void var_184;
00574b56                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_184, u"You are now deaf to player's scr…");
00574b6b                      ClientSystem::AddTextToScroll(this, &var_184, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_184);
00574b56                      break;
00574b56                  }
00574b88                  case 0x524:
00574b88                  {
00574b88                      void var_17c;
00574b88                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_17c, u"You can hear all players once ag…");
00574b9d                      ClientSystem::AddTextToScroll(this, &var_17c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_17c);
00574b88                      break;
00574b88                  }
00574bb7                  case 0x525:
00574bb7                  {
00574bb7                      class PSRefBufferCharData<unsigned short>* m_charbuffer_67 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to remove %s from your …");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574bb7                      break;
00574bb7                  }
00574c97                  case 0x526:
00574c97                  {
00574c97                      void var_15c;
00574c97                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_15c, u"You chicken out.");
00574cac                      ClientSystem::AddTextToScroll(this, &var_15c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_15c);
00574c97                      break;
00574c97                  }
00574cc9                  case 0x527:
00574cc9                  {
00574cc9                      void var_154;
00574cc9                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_154, u"You cannot posssibly succeed.");
00574cde                      ClientSystem::AddTextToScroll(this, &var_154, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_154);
00574cc9                      break;
00574cc9                  }
00574c4f                  case 0x528:
00574c4f                  {
00574c4f                      PStringBase<unsigned short>::set(&PStringBase<unsigned short>::s_NullBuffer_2, u"The fellowship is locked; you ca…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574c4f                      break;
00574c4f                  }
00575056                  case 0x529:
00575056                  {
00575056                      void var_ec;
00575056                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_ec, u"Trade Complete!");
0057506b                      ClientSystem::AddTextToScroll(this, &var_ec, 0x1a, 1, 0);
00575077                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_ec);
00575077                      
00575083                      if (APIManager::APIIsReady() != 0)
00575083                      {
00575089                          struct IACPlugin* eax_97 = APIManager::GetACPlugin();
0057508e                          eax_97->vtable->OnTradeCompleted(eax_97);
00575083                      }
00575056                      break;
00575056                  }
00574cfb                  case 0x52a:
00574cfb                  {
00574cfb                      void var_14c;
00574cfb                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14c, u"That is not a salvaging tool.");
00574d10                      ClientSystem::AddTextToScroll(this, &var_14c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14c);
00574cfb                      break;
00574cfb                  }
005738b1                  case 0x52b:
005738b1                  {
005738b1                      void var_35c;
005738b1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_35c, u"That person is not available now…");
005738c6                      ClientSystem::AddTextToScroll(this, &var_35c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_35c);
005738b1                      break;
005738b1                  }
005738dd                  case 0x52c:
005738dd                  {
005738dd                      class PSRefBufferCharData<unsigned short>* m_charbuffer_23 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You are now snooping on %s.\n");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005738dd                      break;
005738dd                  }
00573910                  case 0x52d:
00573910                  {
00573910                      class PSRefBufferCharData<unsigned short>* m_charbuffer_24 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You are no longer snooping on %s…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573910                      break;
00573910                  }
00573924                  case 0x52e:
00573924                  {
00573924                      class PSRefBufferCharData<unsigned short>* m_charbuffer_25 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to snoop on %s.\n");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573924                      break;
00573924                  }
00573957                  case 0x52f:
00573957                  {
00573957                      class PSRefBufferCharData<unsigned short>* m_charbuffer_26 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s attempted to snoop on you.\n");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573957                      break;
00573957                  }
00573968                  case 0x530:
00573968                  {
00573968                      class PSRefBufferCharData<unsigned short>* m_charbuffer_27 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is already being snooped on, …");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573968                      break;
00573968                  }
0057397c                  case 0x531:
0057397c                  {
0057397c                      class PSRefBufferCharData<unsigned short>* m_charbuffer_28 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is in limbo and cannot receiv…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057397c                      break;
0057397c                  }
00574f20                  case 0x532:
00574f20                  {
00574f20                      void var_114;
00574f20                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_114, u"You must wait 30 days after purc…");
00574f35                      ClientSystem::AddTextToScroll(this, &var_114, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
00574f20                      break;
00574f20                  }
00573f94                  case 0x533:
00573f94                  {
00573f94                      class PSRefBufferCharData<unsigned short>* m_charbuffer_41 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have been booted from your a…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573f94                      break;
00573f94                  }
00573fa8                  case 0x534:
00573fa8                  {
00573fa8                      class PSRefBufferCharData<unsigned short>* m_charbuffer_42 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s has been booted from the alle…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573fa8                      break;
00573fa8                  }
005740c5                  case 0x535:
005740c5                  {
005740c5                      void var_28c;
005740c5                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_28c, u"You do not have the authority wi…");
005740da                      ClientSystem::AddTextToScroll(this, &var_28c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_28c);
005740c5                      break;
005740c5                  }
005740f4                  case 0x536:
005740f4                  {
005740f4                      class PSRefBufferCharData<unsigned short>* m_charbuffer_45 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The account of %s is already ban…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005740f4                      break;
005740f4                  }
00574108                  case 0x537:
00574108                  {
00574108                      class PSRefBufferCharData<unsigned short>* m_charbuffer_46 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The account of %s is not banned …");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574108                      break;
00574108                  }
0057411c                  case 0x538:
0057411c                  {
0057411c                      class PSRefBufferCharData<unsigned short>* m_charbuffer_47 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The account of %s was not unbann…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057411c                      break;
0057411c                  }
00574130                  case 0x539:
00574130                  {
00574130                      class PSRefBufferCharData<unsigned short>* m_charbuffer_48 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The account of %s has been banne…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574130                      break;
00574130                  }
00574144                  case 0x53a:
00574144                  {
00574144                      class PSRefBufferCharData<unsigned short>* m_charbuffer_49 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The account of %s is no longer b…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574144                      break;
00574144                  }
0057415b                  case 0x53b:
0057415b                  {
0057415b                      void var_284;
0057415b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_284, u"Banned Characters: ");
00574170                      ClientSystem::AddTextToScroll(this, &var_284, 0, 1, 0);
0057417c                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_284);
00574191                      ClientSystem::AddTextToScroll(this, arg3, 0, 1, 0);
005741a2                      void var_27c;
005741a2                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_27c, &data_79c288);
005741b7                      ClientSystem::AddTextToScroll(this, &var_27c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_27c);
0057415b                      break;
0057415b                  }
00573d29                  case 0x53e:
00573d29                  {
00573d29                      class PSRefBufferCharData<unsigned short>* m_charbuffer_31 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is banned from the allegiance…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573d29                      break;
00573d29                  }
00573d3d                  case 0x53f:
00573d3d                  {
00573d3d                      class PSRefBufferCharData<unsigned short>* m_charbuffer_32 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You are banned from %s's allegia…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573d3d                      break;
00573d3d                  }
00573d54                  case 0x540:
00573d54                  {
00573d54                      void var_2dc;
00573d54                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2dc, u"You have the maximum number of a…");
00573d69                      ClientSystem::AddTextToScroll(this, &var_2dc, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2dc);
00573d54                      break;
00573d54                  }
00573db5                  case 0x541:
00573db5                  {
00573db5                      class PSRefBufferCharData<unsigned short>* m_charbuffer_33 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is now an allegiance officer.…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573db5                      break;
00573db5                  }
00573ddd                  case 0x542:
00573ddd                  {
00573ddd                      class PSRefBufferCharData<unsigned short>* m_charbuffer_35 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"An unspecified error occurred wh…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573ddd                      break;
00573ddd                  }
00573e4b                  case 0x543:
00573e4b                  {
00573e4b                      class PSRefBufferCharData<unsigned short>* m_charbuffer_38 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is no longer an allegiance of…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573e4b                      break;
00573e4b                  }
00573e5f                  case 0x544:
00573e5f                  {
00573e5f                      class PSRefBufferCharData<unsigned short>* m_charbuffer_39 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"An unspecified error occurred wh…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573e5f                      break;
00573e5f                  }
00573e1c                  case 0x545:
00573e1c                  {
00573e1c                      void var_2cc;
00573e1c                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2cc, u"You already have the maximum num…");
00573e31                      ClientSystem::AddTextToScroll(this, &var_2cc, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2cc);
00573e1c                      break;
00573e1c                  }
00573ea8                  case 0x546:
00573ea8                  {
00573ea8                      void var_2bc;
00573ea8                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2bc, u"Your allegiance officers have be…");
00573ebd                      ClientSystem::AddTextToScroll(this, &var_2bc, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2bc);
00573ea8                      break;
00573ea8                  }
005743f8                  case 0x547:
005743f8                  {
005743f8                      class PSRefBufferCharData<unsigned short>* m_charbuffer_62 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You must wait %s before communic…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005743f8                      break;
005743f8                  }
0057440f                  case 0x548:
0057440f                  {
0057440f                      void var_25c;
0057440f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_25c, u"You cannot join any chat channel…");
00574424                      ClientSystem::AddTextToScroll(this, &var_25c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_25c);
0057440f                      break;
0057440f                  }
00573dc9                  case 0x549:
00573dc9                  {
00573dc9                      class PSRefBufferCharData<unsigned short>* m_charbuffer_34 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your allegiance officer status h…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573dc9                      break;
00573dc9                  }
00573e76                  case 0x54a:
00573e76                  {
00573e76                      void var_2c4;
00573e76                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2c4, u"You are no longer an allegiance …");
00573e8b                      ClientSystem::AddTextToScroll(this, &var_2c4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2c4);
00573e76                      break;
00573e76                  }
00573e05                  case 0x54b:
00573e05                  {
00573e05                      class PSRefBufferCharData<unsigned short>* m_charbuffer_37 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is already an allegiance offi…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573e05                      break;
00573e05                  }
00573f65                  case 0x54c:
00573f65                  {
00573f65                      void var_2ac;
00573f65                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2ac, u"Your allegiance does not have a …");
00573f7a                      ClientSystem::AddTextToScroll(this, &var_2ac, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2ac);
00573f65                      break;
00573f65                  }
00574eea                  case 0x54d:
00574eea                  {
00574eea                      class PSRefBufferCharData<unsigned short>* m_charbuffer_70 = arg3->m_charbuffer;
00574ef5                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The %s is currently in use.\n");
00574f0a                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
00574eea                      break;
00574eea                  }
00574e75                  case 0x54e:
00574e75                  {
00574e75                      void var_124;
00574e75                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_124, u"The hook does not contain a usab…");
00574e8a                      ClientSystem::AddTextToScroll(this, &var_124, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_124);
00574e75                      break;
00574e75                  }
00574ea7                  case 0x54f:
00574ea7                  {
00574ea7                      void var_11c;
00574ea7                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"The hook does not contain a usab…");
00574ebc                      ClientSystem::AddTextToScroll(this, &var_11c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00574ea7                      break;
00574ea7                  }
00573882                  case 0x550:
00573882                  {
00573882                      void var_364;
00573882                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_364, u"Out of Range!");
00573897                      ClientSystem::AddTextToScroll(this, &var_364, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_364);
00573882                      break;
00573882                  }
0057443e                  case 0x551:
0057443e                  {
0057443e                      class PSRefBufferCharData<unsigned short>* m_charbuffer_63 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You are not listening to the %s …");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057443e                      break;
0057443e                  }
005750a5                  case 0x552:
005750a5                  {
005750a5                      void var_e4;
005750a5                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_e4, u"You must purchase Asheron's Call…");
005750ba                      ClientSystem::AddTextToScroll(this, &var_e4, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_e4);
005750a5                      break;
005750a5                  }
005750d7                  case 0x553:
005750d7                  {
005750d7                      void var_dc;
005750d7                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_dc, u"You must purchase Asheron's Call…");
005750ec                      ClientSystem::AddTextToScroll(this, &var_dc, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_dc);
005750d7                      break;
005750d7                  }
00575109                  case 0x554:
00575109                  {
00575109                      void var_d4;
00575109                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_d4, u"You must purchase Asheron's Call…");
0057511e                      ClientSystem::AddTextToScroll(this, &var_d4, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_d4);
00575109                      break;
00575109                  }
0057513b                  case 0x555:
0057513b                  {
0057513b                      void var_cc;
0057513b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_cc, u"You must purchase Asheron's Call…");
00575150                      ClientSystem::AddTextToScroll(this, &var_cc, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_cc);
0057513b                      break;
0057513b                  }
00574f66                  case 0x556:
00574f66                  {
00574f66                      void var_10c;
00574f66                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10c, u"You have failed to complete the …");
00574f7b                      ClientSystem::AddTextToScroll(this, &var_10c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10c);
00574f66                      break;
00574f66                  }
00574f98                  case 0x557:
00574f98                  {
00574f98                      void var_104;
00574f98                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_104, u"You have used this augmentation …");
00574fad                      ClientSystem::AddTextToScroll(this, &var_104, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_104);
00574f98                      break;
00574f98                  }
00574fca                  case 0x558:
00574fca                  {
00574fca                      void var_fc;
00574fca                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_fc, u"You have used augmentations of t…");
00574fdf                      ClientSystem::AddTextToScroll(this, &var_fc, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_fc);
00574fca                      break;
00574fca                  }
00574ffc                  case 0x559:
00574ffc                  {
00574ffc                      void var_f4;
00574ffc                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_f4, u"You do not have enough unspent e…");
00575011                      ClientSystem::AddTextToScroll(this, &var_f4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_f4);
00574ffc                      break;
00574ffc                  }
0057502b                  case 0x55a:
0057502b                  {
0057502b                      class PSRefBufferCharData<unsigned short>* m_charbuffer_72 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, &data_7d1878);
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057502b                      break;
0057502b                  }
0057503f                  case 0x55b:
0057503f                  {
0057503f                      class PSRefBufferCharData<unsigned short>* m_charbuffer_73 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Congratulations! You have succee…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057503f                      break;
0057503f                  }
00574f4f                  case 0x55c:
00574f4f                  {
00574f4f                      class PSRefBufferCharData<unsigned short>* m_charbuffer_71 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Although your augmentation will …");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574f4f                      break;
00574f4f                  }
00573cc8                  case 0x55d:
00573cc8                  {
00573cc8                      void var_2ec;
00573cc8                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2ec, u"You must exit the Training Acade…");
00573cdd                      ClientSystem::AddTextToScroll(this, &var_2ec, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2ec);
00573cc8                      break;
00573cc8                  }
00574459                  case 0x55e:
00574459                  {
00574459                      ClientSystem::AddTextToScroll(this, arg3, 0, 1, 0);
00574459                      break;
00574459                  }
0057481c                  case 0x55f:
0057481c                  {
0057481c                      void var_1e4;
0057481c                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1e4, u"Only Player Killer characters ma…");
00574831                      ClientSystem::AddTextToScroll(this, &var_1e4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1e4);
0057481c                      break;
0057481c                  }
0057484e                  case 0x560:
0057484e                  {
0057484e                      void var_1dc;
0057484e                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1dc, u"Only Player Killer Lite characte…");
00574863                      ClientSystem::AddTextToScroll(this, &var_1dc, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1dc);
0057484e                      break;
0057484e                  }
00574379                  case 0x561:
00574379                  {
00574379                      void var_264;
00574379                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_264, u"You may only have a maximum of 5…");
0057438e                      ClientSystem::AddTextToScroll(this, &var_264, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_264);
00574379                      break;
00574379                  }
005743a8                  case 0x562:
005743a8                  {
005743a8                      class PSRefBufferCharData<unsigned short>* m_charbuffer_58 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is already on your friends li…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005743a8                      break;
005743a8                  }
005743bc                  case 0x563:
005743bc                  {
005743bc                      class PSRefBufferCharData<unsigned short>* m_charbuffer_59 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That character is not on your fr…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005743bc                      break;
005743bc                  }
00574d2d                  case 0x564:
00574d2d                  {
00574d2d                      void var_144;
00574d2d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_144, u"Only the character who owns the …");
00574d42                      ClientSystem::AddTextToScroll(this, &var_144, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_144);
00574d2d                      break;
00574d2d                  }
005741d2                  case 0x565:
005741d2                  {
005741d2                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That allegiance name is invalid …");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005741d2                      break;
005741d2                  }
005741e9                  case 0x566:
005741e9                  {
005741e9                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That allegiance name is too long…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005741e9                      break;
005741e9                  }
00574200                  case 0x567:
00574200                  {
00574200                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That allegiance name contains il…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574200                      break;
00574200                  }
00574217                  case 0x568:
00574217                  {
00574217                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That allegiance name is not appr…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574217                      break;
00574217                  }
0057422e                  case 0x569:
0057422e                  {
0057422e                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That allegiance name is already …");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057422e                      break;
0057422e                  }
00574244                  case 0x56a:
00574244                  {
00574244                      class PSRefBufferCharData<unsigned short>* m_charbuffer_50 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You may only change your allegia…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574244                      break;
00574244                  }
00574259                  case 0x56b:
00574259                  {
00574259                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your allegiance name has been cl…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574259                      break;
00574259                  }
00574270                  case 0x56c:
00574270                  {
00574270                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That is already the name of your…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574270                      break;
00574270                  }
00573df1                  case 0x56d:
00573df1                  {
00573df1                      class PSRefBufferCharData<unsigned short>* m_charbuffer_36 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is the monarch and cannot be …");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573df1                      break;
00573df1                  }
00573ed7                  case 0x56e:
00573ed7                  {
00573ed7                      class PSRefBufferCharData<unsigned short>* m_charbuffer_40 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That level of allegiance officer…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573ed7                      break;
00573ed7                  }
00573d86                  case 0x56f:
00573d86                  {
00573d86                      void var_2d4;
00573d86                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2d4, u"That is an invalid officer level…");
00573d9b                      ClientSystem::AddTextToScroll(this, &var_2d4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2d4);
00573d86                      break;
00573d86                  }
00573f05                  case 0x570:
00573f05                  {
00573f05                      void var_2b4;
00573f05                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2b4, u"That allegiance officer title is…");
00573f1a                      ClientSystem::AddTextToScroll(this, &var_2b4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2b4);
00573f05                      break;
00573f05                  }
00573eec                  case 0x571:
00573eec                  {
00573eec                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That allegiance name is too long…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573eec                      break;
00573eec                  }
00573f4c                  case 0x572:
00573f4c                  {
00573f4c                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"All of your allegiance officer t…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573f4c                      break;
00573f4c                  }
00573f35                  case 0x573:
00573f35                  {
00573f35                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"That allegiance title contains i…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573f35                      break;
00573f35                  }
00574286                  case 0x574:
00574286                  {
00574286                      class PSRefBufferCharData<unsigned short>* m_charbuffer_51 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your allegiance is currently: %s…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574286                      break;
00574286                  }
0057429a                  case 0x575:
0057429a                  {
0057429a                      class PSRefBufferCharData<unsigned short>* m_charbuffer_52 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your allegiance is now: %s.\n");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057429a                      break;
0057429a                  }
005742ae                  case 0x576:
005742ae                  {
005742ae                      class PSRefBufferCharData<unsigned short>* m_charbuffer_53 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You may not accept the offer of …");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005742ae                      break;
005742ae                  }
005742c2                  case 0x577:
005742c2                  {
005742c2                      class PSRefBufferCharData<unsigned short>* m_charbuffer_54 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You may not swear allegiance at …");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005742c2                      break;
005742c2                  }
005742d6                  case 0x578:
005742d6                  {
005742d6                      class PSRefBufferCharData<unsigned short>* m_charbuffer_55 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have pre-approved %s to join…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005742d6                      break;
005742d6                  }
005742ed                  case 0x579:
005742ed                  {
005742ed                      void var_274;
005742ed                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_274, u"You have not pre-approved any va…");
00574302                      ClientSystem::AddTextToScroll(this, &var_274, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_274);
005742ed                      break;
005742ed                  }
0057431c                  case 0x57a:
0057431c                  {
0057431c                      class PSRefBufferCharData<unsigned short>* m_charbuffer_56 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is already a member of your a…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057431c                      break;
0057431c                  }
00574330                  case 0x57b:
00574330                  {
00574330                      class PSRefBufferCharData<unsigned short>* m_charbuffer_57 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s has been pre-approved to join…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574330                      break;
00574330                  }
00574347                  case 0x57c:
00574347                  {
00574347                      void var_26c;
00574347                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_26c, u"You have cleared the pre-approve…");
0057435c                      ClientSystem::AddTextToScroll(this, &var_26c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_26c);
00574347                      break;
00574347                  }
00573fbf                  case 0x57d:
00573fbf                  {
00573fbf                      void var_2a4;
00573fbf                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2a4, u"That character is already gagged…");
00573fd4                      ClientSystem::AddTextToScroll(this, &var_2a4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2a4);
00573fbf                      break;
00573fbf                  }
00573ff1                  case 0x57e:
00573ff1                  {
00573ff1                      void var_29c;
00573ff1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_29c, u"That character is not currently …");
00574006                      ClientSystem::AddTextToScroll(this, &var_29c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_29c);
00573ff1                      break;
00573ff1                  }
00574020                  case 0x57f:
00574020                  {
00574020                      class PSRefBufferCharData<unsigned short>* m_charbuffer_43 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your allegiance chat privileges …");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574020                      break;
00574020                  }
00574032                  case 0x580:
00574032                  {
00574032                      class PSRefBufferCharData<unsigned short>* m_charbuffer_85 = arg3->m_charbuffer;
00574034                      class PSRefBufferCharData<unsigned short>* m_charbuffer_108 = m_charbuffer_85;
00574037                      class PSRefBufferCharData<unsigned short>* m_charbuffer_94 = m_charbuffer_85;
00574042                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is now temporarily unable to …");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00574032                      break;
00574032                  }
0057405b                  case 0x581:
0057405b                  {
0057405b                      void var_294;
0057405b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_294, u"Your allegiance chat privileges …");
00574070                      ClientSystem::AddTextToScroll(this, &var_294, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_294);
0057405b                      break;
0057405b                  }
0057408a                  case 0x582:
0057408a                  {
0057408a                      class PSRefBufferCharData<unsigned short>* m_charbuffer_44 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your allegiance chat privileges …");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057408a                      break;
0057408a                  }
0057409c                  case 0x583:
0057409c                  {
0057409c                      class PSRefBufferCharData<unsigned short>* m_charbuffer_86 = arg3->m_charbuffer;
0057409e                      class PSRefBufferCharData<unsigned short>* m_charbuffer_109 = m_charbuffer_86;
005740a1                      class PSRefBufferCharData<unsigned short>* m_charbuffer_95 = m_charbuffer_86;
005740ac                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have restored allegiance cha…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057409c                      break;
0057409c                  }
005739c2                  case 0x584:
005739c2                  {
005739c2                      void var_34c;
005739c2                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_34c, u"You cannot pick up more of that …");
005739d7                      ClientSystem::AddTextToScroll(this, &var_34c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_34c);
005739c2                      break;
005739c2                  }
0057516d                  case 0x585:
0057516d                  {
0057516d                      void var_c4;
0057516d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c4, u"You are restricted to clothes an…");
00575182                      ClientSystem::AddTextToScroll(this, &var_c4, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c4);
0057516d                      break;
0057516d                  }
0057519f                  case 0x586:
0057519f                  {
0057519f                      void var_bc;
0057519f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_bc, u"That item was specifically creat…");
005751b4                      ClientSystem::AddTextToScroll(this, &var_bc, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_bc);
0057519f                      break;
0057519f                  }
005751d1                  case 0x587:
005751d1                  {
005751d1                      void var_b4;
005751d1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_b4, u"Olthoi cannot interact with that…");
005751e6                      ClientSystem::AddTextToScroll(this, &var_b4, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b4);
005751d1                      break;
005751d1                  }
00575203                  case 0x588:
00575203                  {
00575203                      void var_ac;
00575203                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_ac, u"Olthoi cannot use regular lifest…");
00575218                      ClientSystem::AddTextToScroll(this, &var_ac, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_ac);
00575203                      break;
00575203                  }
00575235                  case 0x589:
00575235                  {
00575235                      void var_a4;
00575235                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a4, u"The vendor looks at you in horro…");
0057524a                      ClientSystem::AddTextToScroll(this, &var_a4, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a4);
00575235                      break;
00575235                  }
00575264                  case 0x58a:
00575264                  {
00575264                      class PSRefBufferCharData<unsigned short>* m_charbuffer_74 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s cowers from you!\n");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00575264                      break;
00575264                  }
0057529a                  case 0x58b:
0057529a                  {
0057529a                      void var_9c;
0057529a                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, u"As a mindless engine of destruct…");
005752af                      ClientSystem::AddTextToScroll(this, &var_9c, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
0057529a                      break;
0057529a                  }
005752cc                  case 0x58c:
005752cc                  {
005752cc                      void var_94;
005752cc                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"The Olthoi only have an allegian…");
005752e1                      ClientSystem::AddTextToScroll(this, &var_94, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
005752cc                      break;
005752cc                  }
005752fe                  case 0x58d:
005752fe                  {
005752fe                      void var_8c;
005752fe                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8c, u"You cannot use that item!\n");
00575313                      ClientSystem::AddTextToScroll(this, &var_8c, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8c);
005752fe                      break;
005752fe                  }
00575330                  case 0x58e:
00575330                  {
00575330                      void var_84;
00575330                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_84, u"This person will not interact wi…");
00575345                      ClientSystem::AddTextToScroll(this, &var_84, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_84);
00575330                      break;
00575330                  }
00575362                  case 0x58f:
00575362                  {
00575362                      void var_7c;
00575362                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_7c, u"Only Olthoi may pass through thi…");
00575377                      ClientSystem::AddTextToScroll(this, &var_7c, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_7c);
00575362                      break;
00575362                  }
00575394                  case 0x590:
00575394                  {
00575394                      void var_74;
00575394                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_74, u"Olthoi may not pass through this…");
005753a9                      ClientSystem::AddTextToScroll(this, &var_74, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_74);
00575394                      break;
00575394                  }
005753c6                  case 0x591:
005753c6                  {
005753c6                      void var_6c;
005753c6                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_6c, u"You may not pass through this po…");
005753db                      ClientSystem::AddTextToScroll(this, &var_6c, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_6c);
005753c6                      break;
005753c6                  }
005753f5                  case 0x592:
005753f5                  {
005753f5                      void var_64;
005753f5                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_64, u"This character must be two weeks…");
0057540a                      ClientSystem::AddTextToScroll(this, &var_64, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_64);
005753f5                      break;
005753f5                  }
00575424                  case 0x593:
00575424                  {
00575424                      void var_5c;
00575424                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_5c, u"Olthoi characters can only use L…");
00575439                      ClientSystem::AddTextToScroll(this, &var_5c, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_5c);
00575424                      break;
00575424                  }
00571dc5              }
00571a09      }
00571a09      else if (arg2 == 0x4e8)
00571a0f      {
0057382d          class PSRefBufferCharData<unsigned short>* m_charbuffer_22 = arg3->m_charbuffer;
0057392f          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The %s cannot be used while on a…");
00573944          ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00571a0f      }
00571a0f      else if (arg2 > 0x48a)
00571a1b      {
0057297c          if ((arg2 - 0x48b) <= 0x5c)
00571dc5              switch (arg2)
00571dc5              {
0057361a                  case 0x48b:
0057361a                  {
0057361a                      class PSRefBufferCharData<unsigned short>* m_charbuffer_11 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You must be above allegiance ran…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057361a                      break;
0057361a                  }
0057362e                  case 0x48c:
0057362e                  {
0057362e                      class PSRefBufferCharData<unsigned short>* m_charbuffer_12 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You must be at or below allegian…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057362e                      break;
0057362e                  }
00573194                  case 0x48e:
00573194                  {
00573194                      void var_110;
00573194                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_110, u"Your offer of Allegiance has bee…");
005731a9                      ClientSystem::AddTextToScroll(this, &var_110, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_110);
00573194                      break;
00573194                  }
00572995                  case 0x48f:
00572995                  {
00572995                      void var_b0;
00572995                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_b0, u"You are already involved in some…");
005729aa                      ClientSystem::AddTextToScroll(this, &var_b0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b0);
00572995                      break;
00572995                  }
00572a2b                  case 0x490:
00572a2b                  {
00572a2b                      void var_2a8;
00572a2b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2a8, u"You must be a monarch to use thi…");
00572a40                      ClientSystem::AddTextToScroll(this, &var_2a8, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2a8);
00572a2b                      break;
00572a2b                  }
005731c6                  case 0x491:
005731c6                  {
005731c6                      void var_218;
005731c6                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_218, u"You must specify a character to …");
005731db                      ClientSystem::AddTextToScroll(this, &var_218, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_218);
005731c6                      break;
005731c6                  }
005731f8                  case 0x492:
005731f8                  {
005731f8                      void var_88;
005731f8                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_88, u"You can't boot yourself!");
0057320d                      ClientSystem::AddTextToScroll(this, &var_88, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_88);
005731f8                      break;
005731f8                  }
00572a5d                  case 0x493:
00572a5d                  {
00572a5d                      void var_58;
00572a5d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_58, u"That character does not exist.");
00572a72                      ClientSystem::AddTextToScroll(this, &var_58, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_58);
00572a5d                      break;
00572a5d                  }
005732c0                  case 0x494:
005732c0                  {
005732c0                      void var_38;
005732c0                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_38, u"That person is not a member of y…");
005732d5                      ClientSystem::AddTextToScroll(this, &var_38, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_38);
005732c0                      break;
005732c0                  }
005732f2                  case 0x495:
005732f2                  {
005732f2                      void var_200;
005732f2                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_200, u"No patron from which to break!");
00573307                      ClientSystem::AddTextToScroll(this, &var_200, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_200);
005732f2                      break;
005732f2                  }
00573324                  case 0x496:
00573324                  {
00573324                      void var_100;
00573324                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_100, u"Your Allegiance has been dissolv…");
00573339                      ClientSystem::AddTextToScroll(this, &var_100, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_100);
00573324                      break;
00573324                  }
00573356                  case 0x497:
00573356                  {
00573356                      void var_1f8;
00573356                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1f8, u"Your patron's Allegiance to you …");
0057336b                      ClientSystem::AddTextToScroll(this, &var_1f8, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1f8);
00573356                      break;
00573356                  }
005729c7                  case 0x498:
005729c7                  {
005729c7                      void var_2b0;
005729c7                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2b0, u"You have moved too far!");
005729dc                      ClientSystem::AddTextToScroll(this, &var_2b0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2b0);
005729c7                      break;
005729c7                  }
005729f9                  case 0x499:
005729f9                  {
005729f9                      void var_158;
005729f9                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_158, u"That is not a valid destination!");
00572a0e                      ClientSystem::AddTextToScroll(this, &var_158, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_158);
005729f9                      break;
005729f9                  }
00572a8f                  case 0x49a:
00572a8f                  {
00572a8f                      void var_2a0;
00572a8f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2a0, u"You must purchase Asheron's Call…");
00572aa4                      ClientSystem::AddTextToScroll(this, &var_2a0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2a0);
00572a8f                      break;
00572a8f                  }
0057309a                  case 0x49b:
0057309a                  {
0057309a                      void var_230;
0057309a                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_230, u"You fail to link with the lifest…");
005730af                      ClientSystem::AddTextToScroll(this, &var_230, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_230);
0057309a                      break;
0057309a                  }
005730cc                  case 0x49c:
005730cc                  {
005730cc                      void var_118;
005730cc                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_118, u"You wandered too far to link wit…");
005730e1                      ClientSystem::AddTextToScroll(this, &var_118, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
005730cc                      break;
005730cc                  }
005730fe                  case 0x49d:
005730fe                  {
005730fe                      void var_228;
005730fe                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_228, u"You successfully link with the l…");
00573113                      ClientSystem::AddTextToScroll(this, &var_228, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_228);
005730fe                      break;
005730fe                  }
00573130                  case 0x49e:
00573130                  {
00573130                      void var_48;
00573130                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_48, u"You must have linked with a life…");
00573145                      ClientSystem::AddTextToScroll(this, &var_48, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_48);
00573130                      break;
00573130                  }
00573162                  case 0x49f:
00573162                  {
00573162                      void var_220;
00573162                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_220, u"You fail to recall to the lifest…");
00573177                      ClientSystem::AddTextToScroll(this, &var_220, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_220);
00573162                      break;
00573162                  }
00572d7a                  case 0x4a0:
00572d7a                  {
00572d7a                      void var_270;
00572d7a                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_270, u"You fail to link with the portal…");
00572d8f                      ClientSystem::AddTextToScroll(this, &var_270, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_270);
00572d7a                      break;
00572d7a                  }
00572dac                  case 0x4a1:
00572dac                  {
00572dac                      void var_138;
00572dac                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_138, u"You successfully link with the p…");
00572dc1                      ClientSystem::AddTextToScroll(this, &var_138, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_138);
00572dac                      break;
00572dac                  }
00572dde                  case 0x4a2:
00572dde                  {
00572dde                      void var_268;
00572dde                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_268, u"You fail to recall to the portal…");
00572df3                      ClientSystem::AddTextToScroll(this, &var_268, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_268);
00572dde                      break;
00572dde                  }
00572e10                  case 0x4a3:
00572e10                  {
00572e10                      void var_2c;
00572e10                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2c, u"You must have linked with a port…");
00572e25                      ClientSystem::AddTextToScroll(this, &var_2c, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2c);
00572e10                      break;
00572e10                  }
00572e42                  case 0x4a4:
00572e42                  {
00572e42                      void var_260;
00572e42                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_260, u"You fail to summon the portal!\n");
00572e57                      ClientSystem::AddTextToScroll(this, &var_260, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_260);
00572e42                      break;
00572e42                  }
00572e74                  case 0x4a5:
00572e74                  {
00572e74                      void var_130;
00572e74                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_130, u"You must have linked with a port…");
00572e89                      ClientSystem::AddTextToScroll(this, &var_130, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_130);
00572e74                      break;
00572e74                  }
00572ea6                  case 0x4a6:
00572ea6                  {
00572ea6                      void var_258;
00572ea6                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_258, u"You fail to teleport!\n");
00572ebb                      ClientSystem::AddTextToScroll(this, &var_258, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_258);
00572ea6                      break;
00572ea6                  }
00572ed8                  case 0x4a7:
00572ed8                  {
00572ed8                      void var_98;
00572ed8                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"You have been teleported too rec…");
00572eed                      ClientSystem::AddTextToScroll(this, &var_98, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
00572ed8                      break;
00572ed8                  }
00572f0a                  case 0x4a8:
00572f0a                  {
00572f0a                      void var_250;
00572f0a                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_250, u"You must be an Advocate to inter…");
00572f1f                      ClientSystem::AddTextToScroll(this, &var_250, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_250);
00572f0a                      break;
00572f0a                  }
00572f3c                  case 0x4aa:
00572f3c                  {
00572f3c                      void var_128;
00572f3c                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_128, u"Players may not interact with th…");
00572f51                      ClientSystem::AddTextToScroll(this, &var_128, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_128);
00572f3c                      break;
00572f3c                  }
00572fa0                  case 0x4ab:
00572fa0                  {
00572fa0                      void var_30;
00572fa0                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_30, u"You are not powerful enough to i…");
00572fb5                      ClientSystem::AddTextToScroll(this, &var_30, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30);
00572fa0                      break;
00572fa0                  }
00572f6e                  case 0x4ac:
00572f6e                  {
00572f6e                      void var_248;
00572f6e                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_248, u"You are too powerful to interact…");
00572f83                      ClientSystem::AddTextToScroll(this, &var_248, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_248);
00572f6e                      break;
00572f6e                  }
00573004                  case 0x4ad:
00573004                  {
00573004                      void var_120;
00573004                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_120, u"You cannot recall to that portal…");
00573019                      ClientSystem::AddTextToScroll(this, &var_120, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_120);
00573004                      break;
00573004                  }
00573036                  case 0x4ae:
00573036                  {
00573036                      void var_238;
00573036                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_238, u"You cannot summon that portal!\n");
0057304b                      ClientSystem::AddTextToScroll(this, &var_238, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_238);
00573036                      break;
00573036                  }
00572b49                  case 0x4af:
00572b49                  {
00572b49                      void var_a8;
00572b49                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a8, u"The lock is already unlocked.");
00572b5e                      ClientSystem::AddTextToScroll(this, &var_a8, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a8);
00572b49                      break;
00572b49                  }
00572b7b                  case 0x4b0:
00572b7b                  {
00572b7b                      void var_290;
00572b7b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_290, u"You can't lock or unlock that!");
00572b90                      ClientSystem::AddTextToScroll(this, &var_290, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_290);
00572b7b                      break;
00572b7b                  }
00572bad                  case 0x4b1:
00572bad                  {
00572bad                      void var_148;
00572bad                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_148, u"You can't lock or unlock what is…");
00572bc2                      ClientSystem::AddTextToScroll(this, &var_148, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_148);
00572bad                      break;
00572bad                  }
00572bdf                  case 0x4b2:
00572bdf                  {
00572bdf                      void var_288;
00572bdf                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_288, u"The key doesn't fit this lock.\n");
00572bf4                      ClientSystem::AddTextToScroll(this, &var_288, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_288);
00572bdf                      break;
00572bdf                  }
00572c11                  case 0x4b3:
00572c11                  {
00572c11                      void var_34;
00572c11                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_34, u"The lock has been used too recen…");
00572c26                      ClientSystem::AddTextToScroll(this, &var_34, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_34);
00572c11                      break;
00572c11                  }
00572c43                  case 0x4b4:
00572c43                  {
00572c43                      void var_280;
00572c43                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_280, u"You aren't trained in lockpickin…");
00572c58                      ClientSystem::AddTextToScroll(this, &var_280, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_280);
00572c43                      break;
00572c43                  }
0057322a                  case 0x4b5:
0057322a                  {
0057322a                      void var_210;
0057322a                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_210, u"You must specify a character to …");
0057323f                      ClientSystem::AddTextToScroll(this, &var_210, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_210);
0057322a                      break;
0057322a                  }
0057325c                  case 0x4b6:
0057325c                  {
0057325c                      void var_108;
0057325c                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_108, u"Please use the allegiance panel …");
00573271                      ClientSystem::AddTextToScroll(this, &var_108, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_108);
0057325c                      break;
0057325c                  }
0057328e                  case 0x4b7:
0057328e                  {
0057328e                      void var_208;
0057328e                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_208, u"You have used that command too r…");
005732a3                      ClientSystem::AddTextToScroll(this, &var_208, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_208);
0057328e                      break;
0057328e                  }
005733af                  case 0x4b8:
005733af                  case 0x4b9:
005733af                  case 0x4ba:
005733af                  {
005733af                      CM_Character::SendNotice_AbuseReportResponse(arg2);
005733af                      break;
005733af                  }
005733c8                  case 0x4bd:
005733c8                  {
005733c8                      void var_1f0;
005733c8                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1f0, u"You do not own that salvage tool…");
005733dd                      ClientSystem::AddTextToScroll(this, &var_1f0, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1f0);
005733c8                      break;
005733c8                  }
005733fa                  case 0x4be:
005733fa                  {
005733fa                      void var_f8;
005733fa                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_f8, u"You do not own that item!\n");
0057340f                      ClientSystem::AddTextToScroll(this, &var_f8, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_f8);
005733fa                      break;
005733fa                  }
005734ab                  case 0x4bf:
005734ab                  {
005734ab                      class PSRefBufferCharData<unsigned short>* m_charbuffer_75 = arg3->m_charbuffer;
005734b1                      void var_28;
005734b1                      
005734b1                      if (m_charbuffer_75->m_data[0x7ffffffffffffffe] == 1)
005734b1                      {
005734bf                          ebx = 1;
005734c9                          m_charbuffer_75 = *(uint32_t*)PStringBase<unsigned short>::PStringBase<unsigned short>(&var_28, u"item");
005734b1                      }
005734b1                      
005734cb                      class PSRefBufferCharData<unsigned short>* m_charbuffer_105 = m_charbuffer_75;
005734d6                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The %s was not suitable for salv…");
005734d6                      
005734e1                      if ((ebx & 1) != 0)
005734ea                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_28);
005734ea                      
005734fc                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
005734ab                      break;
005734ab                  }
0057350d                  case 0x4c0:
0057350d                  {
0057350d                      class PSRefBufferCharData<unsigned short>* m_charbuffer_76 = arg3->m_charbuffer;
0057350d                      
00573513                      if (m_charbuffer_76->m_data[0x7ffffffffffffffe] == 1)
00573515                          m_charbuffer_76 = u"item";
00573515                      
0057351a                      class PSRefBufferCharData<unsigned short>* m_charbuffer_106 = m_charbuffer_76;
00573525                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"The %s contains the wrong materi…");
0057353a                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
0057350d                      break;
0057350d                  }
0057342c                  case 0x4c1:
0057342c                  {
0057342c                      void var_1e8;
0057342c                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1e8, u"The material cannot be created.\n");
00573441                      ClientSystem::AddTextToScroll(this, &var_1e8, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1e8);
0057342c                      break;
0057342c                  }
0057345b                  case 0x4c2:
0057345b                  {
0057345b                      void var_3c8;
0057345b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3c8, u"The list of items you are attemp…");
0057346d                      ClientSystem::AddTextToScroll(this, &var_3c8, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c8);
0057345b                      break;
0057345b                  }
00573484                  case 0x4c3:
00573484                  {
00573484                      void var_3c4;
00573484                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3c4, u"You cannot salvage items that yo…");
00573496                      ClientSystem::AddTextToScroll(this, &var_3c4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c4);
00573484                      break;
00573484                  }
00572fd2                  case 0x4c4:
00572fd2                  {
00572fd2                      void var_240;
00572fd2                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_240, u"You must be a guest in this hous…");
00572fe7                      ClientSystem::AddTextToScroll(this, &var_240, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_240);
00572fd2                      break;
00572fd2                  }
00572c75                  case 0x4c5:
00572c75                  {
00572c75                      void var_140;
00572c75                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_140, u"Your Allegiance Rank is too low …");
00572c8a                      ClientSystem::AddTextToScroll(this, &var_140, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_140);
00572c75                      break;
00572c75                  }
00572ca4                  case 0x4c6:
00572ca4                  {
00572ca4                      class PSRefBufferCharData<unsigned short>* m_charbuffer_7 = arg3->m_charbuffer;
00573525                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You must be %s to use that item'…");
0057353a                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
00572ca4                      break;
00572ca4                  }
00572cbb                  case 0x4c7:
00572cbb                  {
00572cbb                      void var_278;
00572cbb                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_278, u"Your Arcane Lore skill is too lo…");
00572cd0                      ClientSystem::AddTextToScroll(this, &var_278, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_278);
00572cbb                      break;
00572cbb                  }
00572ced                  case 0x4c8:
00572ced                  {
00572ced                      void var_a0;
00572ced                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, u"That item doesn't have enough Ma…");
00572d02                      ClientSystem::AddTextToScroll(this, &var_a0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a0);
00572ced                      break;
00572ced                  }
00572d1c                  case 0x4c9:
00572d1c                  {
00572d1c                      class PSRefBufferCharData<unsigned short>* m_charbuffer_8 = arg3->m_charbuffer;
00573525                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your %s is too low to use that i…");
0057353a                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
00572d1c                      break;
00572d1c                  }
00572d30                  case 0x4ca:
00572d30                  {
00572d30                      class PSRefBufferCharData<unsigned short>* m_charbuffer_9 = arg3->m_charbuffer;
00572d3b                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Only %s may use that item's magi…");
00572d50                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
00572d30                      break;
00572d30                  }
00572d63                  case 0x4cb:
00572d63                  {
00572d63                      class PSRefBufferCharData<unsigned short>* m_charbuffer_10 = arg3->m_charbuffer;
00574ef5                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You must have %s specialized to …");
00574f0a                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
00572d63                      break;
00572d63                  }
00573068                  case 0x4cc:
00573068                  {
00573068                      void var_90;
00573068                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_90, u"You have been involved in a play…");
0057307d                      ClientSystem::AddTextToScroll(this, &var_90, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_90);
00573068                      break;
00573068                  }
00572b05                  case 0x4ce:
00572b05                  {
00572b05                  label_572b05:
00572b05                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00572b16                      void var_298;
00572b16                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_298, u" is too busy to accept gifts rig…");
00572b27                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_298);
00572b33                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_298);
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00572b05                      break;
00572b05                  }
00572ac1                  case 0x4cf:
00572ac1                  {
00572ac1                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00572ad2                      void var_150;
00572ad2                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_150, u" cannot accept stacked objects. …");
00572ae3                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_150);
00572aef                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_150);
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00572ac1                      break;
00572ac1                  }
00573642                  case 0x4d0:
00573642                  {
00573642                      void var_394;
00573642                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_394, u"You have failed to alter your sk…");
00573654                      ClientSystem::AddTextToScroll(this, &var_394, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_394);
00573642                      break;
00573642                  }
0057366b                  case 0x4d1:
0057366b                  {
0057366b                      class PSRefBufferCharData<unsigned short>* m_charbuffer_13 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your %s skill must be trained, n…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057366b                      break;
0057366b                  }
0057367f                  case 0x4d2:
0057367f                  {
0057367f                      class PSRefBufferCharData<unsigned short>* m_charbuffer_14 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You do not have enough skill cre…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057367f                      break;
0057367f                  }
00573693                  case 0x4d3:
00573693                  {
00573693                      class PSRefBufferCharData<unsigned short>* m_charbuffer_15 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have too many available expe…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573693                      break;
00573693                  }
005736a7                  case 0x4d4:
005736a7                  {
005736a7                      class PSRefBufferCharData<unsigned short>* m_charbuffer_16 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Your %s skill is already untrain…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005736a7                      break;
005736a7                  }
005736b9                  case 0x4d5:
005736b9                  {
005736b9                      class PSRefBufferCharData<unsigned short>* m_charbuffer_79 = arg3->m_charbuffer;
005736bb                      class PSRefBufferCharData<unsigned short>* m_charbuffer_107 = m_charbuffer_79;
005736be                      class PSRefBufferCharData<unsigned short>* m_charbuffer_93 = m_charbuffer_79;
005736c9                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You are currently wielding items…");
005736de                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005736b9                      break;
005736b9                  }
00573705                  case 0x4d6:
00573705                  {
00573705                      class PSRefBufferCharData<unsigned short>* m_charbuffer_18 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have succeeded in specializi…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573705                      break;
00573705                  }
00573719                  case 0x4d7:
00573719                  {
00573719                      class PSRefBufferCharData<unsigned short>* m_charbuffer_19 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have succeeded in lowering y…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573719                      break;
00573719                  }
0057372d                  case 0x4d8:
0057372d                  {
0057372d                      class PSRefBufferCharData<unsigned short>* m_charbuffer_20 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have succeeded in untraining…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057372d                      break;
0057372d                  }
00573741                  case 0x4d9:
00573741                  {
00573741                      class PSRefBufferCharData<unsigned short>* m_charbuffer_21 = arg3->m_charbuffer;
0057526f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"Although you cannot untrain your…");
00575284                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00573741                      break;
00573741                  }
005736f1                  case 0x4da:
005736f1                  {
005736f1                      class PSRefBufferCharData<unsigned short>* m_charbuffer_17 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You have too many credits invest…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
005736f1                      break;
005736f1                  }
00573755                  case 0x4dd:
00573755                  {
00573755                      void var_38c;
00573755                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_38c, u"You have failed to alter your at…");
00573767                      ClientSystem::AddTextToScroll(this, &var_38c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_38c);
00573755                      break;
00573755                  }
0057377e                  case 0x4de:
0057377e                  case 0x4df:
0057377e                  {
0057377e                      void var_384;
0057377e                      class PStringBase<unsigned short>* __return;
0057377e                      class PStringBase<unsigned short>* edx_20;
0057377e                      __return = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_384, &data_79c288);
0057378e                      void* var_3dc_12 = &var_384;
00573796                      void var_4;
00573796                      void* var_3e0_8 = &var_4;
005737a1                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::operator+(arg3, __return, edx_20));
005737ad                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
005737b6                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_384);
005737c8                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
0057377e                      break;
0057377e                  }
005737db                  case 0x4e0:
005737db                  {
005737db                      void var_37c;
005737db                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_37c, u"You are currently wielding items…");
005737ed                      ClientSystem::AddTextToScroll(this, &var_37c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_37c);
005737db                      break;
005737db                  }
00573804                  case 0x4e1:
00573804                  {
00573804                      void var_374;
00573804                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_374, u"You have succeeded in transferri…");
00573816                      ClientSystem::AddTextToScroll(this, &var_374, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_374);
00573804                      break;
00573804                  }
0057354d                  case 0x4e2:
0057354d                  {
0057354d                      void var_3bc;
0057354d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3bc, u"This hook is a duplicated housin…");
0057355f                      ClientSystem::AddTextToScroll(this, &var_3bc, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3bc);
0057354d                      break;
0057354d                  }
0057359f                  case 0x4e3:
0057359f                  {
0057359f                      void var_3ac;
0057359f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3ac, u"That item is of the wrong type t…");
005735b1                      ClientSystem::AddTextToScroll(this, &var_3ac, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3ac);
0057359f                      break;
0057359f                  }
005735c8                  case 0x4e4:
005735c8                  {
005735c8                      void var_3a4;
005735c8                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3a4, u"This chest is a duplicated housi…");
005735da                      ClientSystem::AddTextToScroll(this, &var_3a4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3a4);
005735c8                      break;
005735c8                  }
00573576                  case 0x4e5:
00573576                  {
00573576                      void var_3b4;
00573576                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3b4, u"This hook was a duplicated housi…");
00573588                      ClientSystem::AddTextToScroll(this, &var_3b4, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3b4);
00573576                      break;
00573576                  }
005735f1                  case 0x4e6:
005735f1                  {
005735f1                      void var_39c;
005735f1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_39c, u"This chest was a duplicated hous…");
00573603                      ClientSystem::AddTextToScroll(this, &var_39c, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_39c);
005735f1                      break;
005735f1                  }
00573388                  case 0x4e7:
00573388                  {
00573388                      void var_80;
00573388                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_80, u"You cannot swear allegiance to a…");
0057339d                      ClientSystem::AddTextToScroll(this, &var_80, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_80);
00573388                      break;
00573388                  }
00571dc5              }
00571a1b      }
00571a1b      else if (arg2 == 0x48a)
00571a21      {
0057294d          void var_2b8;
0057294d          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2b8, u"You must be a monarch to purchas…");
00572962          ClientSystem::AddTextToScroll(this, &var_2b8, 0, 1, 0);
00575445          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2b8);
00571a21      }
00571a21      else if (arg2 > 0x408)
00571a2d      {
005721b1          if ((arg2 - 0x40a) <= 0x7f)
00571dc5              switch (arg2)
00571dc5              {
00572353                  case 0x40a:
00572353                  {
00572353                      void var_198;
00572353                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_198, u"You are unprepared to cast a spe…");
00572368                      ClientSystem::AddTextToScroll(this, &var_198, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_198);
00572353                      break;
00572353                  }
005724b1                  case 0x40b:
005724b1                  {
005724b1                      void var_310;
005724b1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_310, u"You've already sworn your Allegi…");
005724c6                      ClientSystem::AddTextToScroll(this, &var_310, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_310);
005724b1                      break;
005724b1                  }
0057247f                  case 0x40c:
0057247f                  {
0057247f                      void var_c8;
0057247f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c8, u"You don't have enough experience…");
00572494                      ClientSystem::AddTextToScroll(this, &var_c8, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c8);
0057247f                      break;
0057247f                  }
00572526                  case 0x413:
00572526                  {
00572526                      class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = arg3->m_charbuffer;
00574ef5                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s is already one of your follow…");
00574f0a                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
00572526                      break;
00572526                  }
005724e3                  case 0x414:
005724e3                  {
005724e3                      void var_188;
005724e3                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_188, u"You are not in an allegiance!");
005724f8                      ClientSystem::AddTextToScroll(this, &var_188, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_188);
005724e3                      break;
005724e3                  }
00572512                  case 0x416:
00572512                  {
00572512                      class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = arg3->m_charbuffer;
00572d3b                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"%s cannot have any more Vassals");
00572d50                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0x1a, 1, 0);
00572512                      break;
00572512                  }
0057253d                  case 0x41d:
0057253d                  {
0057253d                      void var_308;
0057253d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_308, u"You must be the leader of a Fell…");
00572552                      ClientSystem::AddTextToScroll(this, &var_308, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_308);
0057253d                      break;
0057253d                  }
0057256f                  case 0x41e:
0057256f                  {
0057256f                      void var_44;
0057256f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_44, u"Your Fellowship is full");
00572584                      ClientSystem::AddTextToScroll(this, &var_44, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_44);
0057256f                      break;
0057256f                  }
005725a1                  case 0x41f:
005725a1                  {
005725a1                      void var_300;
005725a1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_300, u"That Fellowship name is not perm…");
005725b6                      ClientSystem::AddTextToScroll(this, &var_300, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_300);
005725a1                      break;
005725a1                  }
005725d3                  case 0x422:
005725d3                  {
005725d3                      void var_180;
005725d3                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_180, u"That channel doesn't exist.");
005725e8                      ClientSystem::AddTextToScroll(this, &var_180, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_180);
005725d3                      break;
005725d3                  }
00572605                  case 0x423:
00572605                  {
00572605                      void var_2f8;
00572605                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2f8, u"You can't use that channel.");
0057261a                      ClientSystem::AddTextToScroll(this, &var_2f8, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2f8);
00572605                      break;
00572605                  }
00572637                  case 0x424:
00572637                  {
00572637                      void var_c0;
00572637                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c0, u"You're already on that channel.");
0057264c                      ClientSystem::AddTextToScroll(this, &var_c0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c0);
00572637                      break;
00572637                  }
00572669                  case 0x425:
00572669                  {
00572669                      void var_2f0;
00572669                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2f0, u"You're not currently on that cha…");
0057267e                      ClientSystem::AddTextToScroll(this, &var_2f0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2f0);
00572669                      break;
00572669                  }
005721d1                  case 0x427:
005721d1                  {
005721d1                      void var_348;
005721d1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_348, u"You cannot merge different stack…");
005721e6                      ClientSystem::AddTextToScroll(this, &var_348, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_348);
005721d1                      break;
005721d1                  }
00572203                  case 0x428:
00572203                  {
00572203                      void var_4c;
00572203                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4c, u"You cannot merge enchanted items…");
00572218                      ClientSystem::AddTextToScroll(this, &var_4c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4c);
00572203                      break;
00572203                  }
00572235                  case 0x429:
00572235                  {
00572235                      void var_340;
00572235                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_340, u"You must control at least one st…");
0057224a                      ClientSystem::AddTextToScroll(this, &var_340, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_340);
00572235                      break;
00572235                  }
0057269b                  case 0x432:
0057269b                  case 0x433:
0057269b                  case 0x435:
0057269b                  {
0057269b                      void var_178;
0057269b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_178, u"Your craft attempt fails.");
005726b0                      ClientSystem::AddTextToScroll(this, &var_178, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_178);
0057269b                      break;
0057269b                  }
00572731                  case 0x434:
00572731                  {
00572731                      void var_2e0;
00572731                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2e0, u"Given that number of items, you …");
00572746                      ClientSystem::AddTextToScroll(this, &var_2e0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2e0);
00572731                      break;
00572731                  }
005726ff                  case 0x437:
005726ff                  {
005726ff                      void var_60;
005726ff                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_60, u"Either you or one of the items i…");
00572714                      ClientSystem::AddTextToScroll(this, &var_60, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_60);
005726ff                      break;
005726ff                  }
00572763                  case 0x438:
00572763                  {
00572763                      void var_170;
00572763                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_170, u"You do not have all the neccessa…");
00572778                      ClientSystem::AddTextToScroll(this, &var_170, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_170);
00572763                      break;
00572763                  }
005726cd                  case 0x439:
005726cd                  {
005726cd                      void var_2e8;
005726cd                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2e8, u"Not all the items are avaliable.");
005726e2                      ClientSystem::AddTextToScroll(this, &var_2e8, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2e8);
005726cd                      break;
005726cd                  }
00572795                  case 0x43a:
00572795                  {
00572795                      void var_2d8;
00572795                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2d8, u"You must be at rest in peace mod…");
005727aa                      ClientSystem::AddTextToScroll(this, &var_2d8, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2d8);
00572795                      break;
00572795                  }
005727c7                  case 0x43b:
005727c7                  {
005727c7                      void var_b8;
005727c7                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_b8, u"You are not trained in that trad…");
005727dc                      ClientSystem::AddTextToScroll(this, &var_b8, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_b8);
005727c7                      break;
005727c7                  }
005727f9                  case 0x43c:
005727f9                  {
005727f9                      void var_2d0;
005727f9                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2d0, u"Your hands must be free.");
0057280e                      ClientSystem::AddTextToScroll(this, &var_2d0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2d0);
005727f9                      break;
005727f9                  }
0057244d                  case 0x43d:
0057244d                  {
0057244d                      void var_318;
0057244d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_318, u"You cannot link to that portal!\n");
00572462                      ClientSystem::AddTextToScroll(this, &var_318, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_318);
0057244d                      break;
0057244d                  }
005722bd                  case 0x43e:
005722bd                  {
005722bd                      void var_338;
005722bd                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_338, u"You have solved this quest too r…");
005722d2                      ClientSystem::AddTextToScroll(this, &var_338, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_338);
005722bd                      break;
005722bd                  }
005722ef                  case 0x43f:
005722ef                  {
005722ef                      void var_d0;
005722ef                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_d0, u"You have solved this quest too m…");
00572304                      ClientSystem::AddTextToScroll(this, &var_d0, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_d0);
005722ef                      break;
005722ef                  }
00572321                  case 0x445:
00572321                  {
00572321                      void var_330;
00572321                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_330, u"This item requires you to comple…");
00572336                      ClientSystem::AddTextToScroll(this, &var_330, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_330);
00572321                      break;
00572321                  }
00572385                  case 0x45c:
00572385                  {
00572385                      void var_328;
00572385                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_328, u"Player killers may not interact …");
0057239a                      ClientSystem::AddTextToScroll(this, &var_328, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_328);
00572385                      break;
00572385                  }
005723b7                  case 0x45d:
005723b7                  {
005723b7                      void var_68;
005723b7                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_68, u"Non-player killers may not inter…");
005723cc                      ClientSystem::AddTextToScroll(this, &var_68, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_68);
005723b7                      break;
005723b7                  }
0057285d                  case 0x45e:
0057285d                  case 0x45f:
0057285d                  {
0057285d                      void var_2c8;
0057285d                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2c8, u"You do not own a house!");
00572872                      ClientSystem::AddTextToScroll(this, &var_2c8, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2c8);
0057285d                      break;
0057285d                  }
005723e9                  case 0x466:
005723e9                  {
005723e9                      void var_320;
005723e9                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_320, u"You must purchase Asheron's Call…");
005723fe                      ClientSystem::AddTextToScroll(this, &var_320, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_320);
005723e9                      break;
005723e9                  }
005728f3                  case 0x469:
005728f3                  {
005728f3                      void var_160;
005728f3                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_160, u"You have used all the hooks you …");
00572908                      ClientSystem::AddTextToScroll(this, &var_160, 0, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_160);
005728f3                      break;
005728f3                  }
00572267                  case 0x46a:
00572267                  {
00572267                      PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00572278                      void var_1a0;
00572278                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1a0, u" doesn't know what to do with th…");
00572289                      PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_1a0);
00572295                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1a0);
005722a7                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00572267                      break;
00572267                  }
0057241b                  case 0x474:
0057241b                  {
0057241b                      void var_190;
0057241b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_190, u"You must complete a quest to int…");
00572430                      ClientSystem::AddTextToScroll(this, &var_190, 7, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_190);
0057241b                      break;
0057241b                  }
0057282b                  case 0x47f:
0057282b                  {
0057282b                      void var_168;
0057282b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_168, u"You must own a house to use this…");
00572840                      ClientSystem::AddTextToScroll(this, &var_168, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_168);
0057282b                      break;
0057282b                  }
0057288f                  case 0x480:
0057288f                  case 0x481:
0057288f                  {
0057288f                      void var_3c;
0057288f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3c, u"Your monarch does not own a mans…");
005728a4                      ClientSystem::AddTextToScroll(this, &var_3c, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c);
0057288f                      break;
0057288f                  }
005728c1                  case 0x482:
005728c1                  {
005728c1                      void var_2c0;
005728c1                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_2c0, u"Your monarch has closed the mans…");
005728d6                      ClientSystem::AddTextToScroll(this, &var_2c0, 0x1a, 1, 0);
00575445                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2c0);
005728c1                      break;
005728c1                  }
00572922                  case 0x488:
00572922                  {
00572922                      class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = arg3->m_charbuffer;
0057392f                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You must be above level %s to pu…");
00573944                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00572922                      break;
00572922                  }
00572936                  case 0x489:
00572936                  {
00572936                      class PSRefBufferCharData<unsigned short>* m_charbuffer_6 = arg3->m_charbuffer;
005738e8                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You must be at or below level %s…");
005738fd                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00572936                      break;
00572936                  }
00571dc5              }
00571a2d      }
00571a2d      else if (arg2 == 0x408)
00571a33      {
00572182          void var_1a8;
00572182          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1a8, u"Your spell cannot be cast inside");
00572197          ClientSystem::AddTextToScroll(this, &var_1a8, 0x1a, 1, 0);
00575445          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1a8);
00571a33      }
00571a33      else if (arg2 > 0x4f)
00571a3c      {
00571dc5          if (arg2 > 0x3ee)
00571dc5          {
00571ebe              if ((arg2 - 0x3ef) <= 0x18)
00571dc5                  switch (arg2)
00571dc5                  {
00571f94                      case 0x3ef:
00571f94                      {
00571f94                          PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00571fa5                          void var_e0;
00571fa5                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_e0, u" is not accepting gifts right no…");
00571fb6                          PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_e0);
00571fc2                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_e0);
00575284                          ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00571f94                          break;
00571f94                      }
00571ede                      case 0x3f1:
00571ede                      {
00571ede                          void var_54;
00571ede                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_54, u"You failed to go to non-combat m…");
00571ef3                          ClientSystem::AddTextToScroll(this, &var_54, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_54);
00571ede                          break;
00571ede                      }
00571f0d                      case 0x3f7:
00571f0d                      {
00571f0d                          void var_380;
00571f0d                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_380, u"You are too fatigued to attack!");
00571f1f                          ClientSystem::AddTextToScroll(this, &var_380, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_380);
00571f0d                          break;
00571f0d                      }
00571f39                      case 0x3f8:
00571f39                      {
00571f39                          void var_1c0;
00571f39                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1c0, u"You are out of ammunition!");
00571f4e                          ClientSystem::AddTextToScroll(this, &var_1c0, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c0);
00571f39                          break;
00571f39                      }
00571f68                      case 0x3f9:
00571f68                      {
00571f68                          void var_378;
00571f68                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_378, u"Your missile attack misfired!");
00571f7a                          ClientSystem::AddTextToScroll(this, &var_378, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_378);
00571f68                          break;
00571f68                      }
0057211e                      case 0x3fa:
0057211e                      {
0057211e                          void var_d8;
0057211e                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_d8, u"You've attempted an impossible s…");
00572133                          ClientSystem::AddTextToScroll(this, &var_d8, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_d8);
0057211e                          break;
0057211e                      }
00571fd5                      case 0x3fe:
00571fd5                      {
00571fd5                          void var_370;
00571fd5                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_370, u"You don't know that spell!");
00571fe7                          ClientSystem::AddTextToScroll(this, &var_370, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_370);
00571fd5                          break;
00571fd5                      }
00572001                      case 0x3ff:
00572001                      {
00572001                          void var_1b8;
00572001                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1b8, u"Incorrect target type");
00572016                          ClientSystem::AddTextToScroll(this, &var_1b8, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1b8);
00572001                          break;
00572001                      }
00572030                      case 0x400:
00572030                      {
00572030                          void var_368;
00572030                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_368, u"You don't have all the component…");
00572042                          ClientSystem::AddTextToScroll(this, &var_368, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_368);
00572030                          break;
00572030                      }
0057205c                      case 0x401:
0057205c                      {
0057205c                          void var_70;
0057205c                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_70, u"You don't have enough Mana to ca…");
00572071                          ClientSystem::AddTextToScroll(this, &var_70, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_70);
0057205c                          break;
0057205c                      }
0057208b                      case 0x402:
0057208b                      {
0057208b                          void var_360;
0057208b                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_360, u"Your spell fizzled.\n");
005720a0                          ClientSystem::AddTextToScroll(this, &var_360, 7, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_360);
0057208b                          break;
0057208b                      }
005720ba                      case 0x403:
005720ba                      {
005720ba                          void var_1b0;
005720ba                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1b0, u"Your spell's target is missing!");
005720cf                          ClientSystem::AddTextToScroll(this, &var_1b0, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1b0);
005720ba                          break;
005720ba                      }
005720ec                      case 0x404:
005720ec                      {
005720ec                          void var_358;
005720ec                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_358, u"Your projectile spell mislaunche…");
00572101                          ClientSystem::AddTextToScroll(this, &var_358, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_358);
005720ec                          break;
005720ec                      }
00572150                      case 0x407:
00572150                      {
00572150                          void var_350;
00572150                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_350, u"Your spell cannot be cast outsid…");
00572165                          ClientSystem::AddTextToScroll(this, &var_350, 0x1a, 1, 0);
00575445                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_350);
00572150                          break;
00572150                      }
00571dc5                  }
00571dc5          }
00571dc5          else if (arg2 == 0x3ee)
00571dcb          {
00571e95              void var_388;
00571e95              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_388, u"The container is closed!");
00571ea7              ClientSystem::AddTextToScroll(this, &var_388, 0x1a, 1, 0);
00575445              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_388);
00571dcb          }
00571dcb          else if ((arg2 - 0x50) <= 4)
00571dc5              switch (arg2)
00571dc5              {
00571deb                  case 0x50:
00571deb                  {
00571deb                      class PSRefBufferCharData<unsigned short>* m_charbuffer_83 = arg3->m_charbuffer;
00571ded                      class PSRefBufferCharData<unsigned short>* m_charbuffer_102 = m_charbuffer_83;
00571df0                      class PSRefBufferCharData<unsigned short>* m_charbuffer_90 = m_charbuffer_83;
00571e59                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to affect %s because be…");
00571e6e                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00571deb                      break;
00571deb                  }
00571e01                  case 0x51:
00571e01                  {
00571e01                      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg3->m_charbuffer;
00573b90                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to affect %s because yo…");
00573ba5                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00571e01                      break;
00571e01                  }
00571e13                  case 0x52:
00571e13                  {
00571e13                      class PSRefBufferCharData<unsigned short>* m_charbuffer_78 = arg3->m_charbuffer;
00571e15                      class PSRefBufferCharData<unsigned short>* m_charbuffer_103 = m_charbuffer_78;
00571e18                      class PSRefBufferCharData<unsigned short>* m_charbuffer_91 = m_charbuffer_78;
00571e23                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to affect %s because %s…");
00571e38                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00571e13                      break;
00571e13                  }
00571e49                  case 0x53:
00571e49                  {
00571e49                      class PSRefBufferCharData<unsigned short>* m_charbuffer_84 = arg3->m_charbuffer;
00571e4b                      class PSRefBufferCharData<unsigned short>* m_charbuffer_104 = m_charbuffer_84;
00571e4e                      class PSRefBufferCharData<unsigned short>* m_charbuffer_92 = m_charbuffer_84;
00571e59                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to affect %s because yo…");
00571e6e                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00571e49                      break;
00571e49                  }
00571e81                  case 0x54:
00571e81                  {
00571e81                      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = arg3->m_charbuffer;
00573b90                      PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to affect %s because yo…");
00573ba5                      ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00571e81                      break;
00571e81                  }
00571dc5              }
00571a3c      }
00571a3c      else if (arg2 == 0x4f)
00571a42      {
00571db2          class PSRefBufferCharData<unsigned short>* m_charbuffer_77 = arg3->m_charbuffer;
00571db4          class PSRefBufferCharData<unsigned short>* m_charbuffer_101 = m_charbuffer_77;
00571db7          class PSRefBufferCharData<unsigned short>* m_charbuffer_89 = m_charbuffer_77;
00571e23          PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to affect %s because $s…");
00571e38          ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00571a42      }
00571a42      else if ((arg2 - 0x17) <= 0x37)
00571dc5          switch (arg2)
00571dc5          {
00571ac9              case 0x17:
00571ac9              {
00571ac9                  void var_1e0;
00571ac9                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1e0, u"You failed to go to non-combat m…");
00571ade                  ClientSystem::AddTextToScroll(this, &var_1e0, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1e0);
00571ac9                  break;
00571ac9              }
00571a6e              case 0x1d:
00571a6e              {
00571a6e                  void var_40;
00571a6e                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_40, u"You're too busy!");
00571a83                  ClientSystem::AddTextToScroll(this, &var_40, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_40);
00571a6e                  break;
00571a6e              }
00571a5b              case 0x1e:
00571a5b              {
00571a5b                  goto label_572b05;
00571a5b              }
00571af8              case 0x20:
00571af8              {
00571af8                  void var_3b8;
00571af8                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3b8, u"You must control both objects!");
00571b0a                  ClientSystem::AddTextToScroll(this, &var_3b8, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3b8);
00571af8                  break;
00571af8              }
00571b23              case 0x23:
00571b23              case 0x37:
00571b23              case 0x38:
00571b23              case 0x39:
00571b23              {
00571b23                  ClientUISystem::SetGroundObject(ClientUISystem::GetUISystem(), 0, 1);
00571b34                  void var_f0;
00571b34                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_f0, u"Unable to move to object!");
00571b49                  ClientSystem::AddTextToScroll(this, &var_f0, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_f0);
00571b23                  break;
00571b23              }
00571da1              case 0x24:
00571da1              {
00571da1                  ClientSystem::AddTextToScroll(this, &cant_jump_in_air, 0x1a, 1, 0);
00571da1                  break;
00571da1              }
00571c74              case 0x26:
00571c74              {
00571c74                  void var_398;
00571c74                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_398, u"That is not a valid command.");
00571c86                  ClientSystem::AddTextToScroll(this, &var_398, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_398);
00571c74                  break;
00571c74              }
00571bbe              case 0x28:
00571bbe              {
00571bbe                  void var_3a8;
00571bbe                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3a8, u"The item is under someone else's…");
00571bd0                  ClientSystem::AddTextToScroll(this, &var_3a8, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3a8);
00571bbe                  break;
00571bbe              }
00571bea              case 0x29:
00571bea              {
00571bea                  void var_78;
00571bea                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_78, u"You cannot pick that up!");
00571bff                  ClientSystem::AddTextToScroll(this, &var_78, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_78);
00571bea                  break;
00571bea              }
00571c19              case 0x2a:
00571c19              {
00571c19                  void var_3a0;
00571c19                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3a0, u"You are too encumbered to carry …");
00571c2b                  ClientSystem::AddTextToScroll(this, &var_3a0, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3a0);
00571c19                  break;
00571c19              }
00571ca0              case 0x2b:
00571ca0              {
00571ca0                  PStringBase<unsigned short>::operator=(&PStringBase<unsigned short>::s_NullBuffer_2, arg3);
00571cb1                  void var_e8;
00571cb1                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_e8, u" cannot carry anymore.\n");
00571cc2                  PStringBase<unsigned short>::operator+=(&PStringBase<unsigned short>::s_NullBuffer_2, &var_e8);
00571cce                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_e8);
00575284                  ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 0, 1, 0);
00571ca0                  break;
00571ca0              }
00571b8f              case 0x36:
00571b8f              {
00571b8f                  void var_1d8;
00571b8f                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1d8, u"Action cancelled!");
00571ba4                  ClientSystem::AddTextToScroll(this, &var_1d8, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1d8);
00571b8f                  break;
00571b8f              }
00571a9d              case 0x3a:
00571a9d              {
00571a9d                  void var_3c0;
00571a9d                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3c0, u"You can't do that... you're dead…");
00571aaf                  ClientSystem::AddTextToScroll(this, &var_3c0, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c0);
00571a9d                  break;
00571a9d              }
00571b63              case 0x3d:
00571b63              {
00571b63                  void var_3b0;
00571b63                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_3b0, u"You charged too far!");
00571b75                  ClientSystem::AddTextToScroll(this, &var_3b0, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3b0);
00571b63                  break;
00571b63              }
00571c45              case 0x3e:
00571c45              {
00571c45                  void var_1d0;
00571c45                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1d0, u"You are too tired to do that!");
00571c5a                  ClientSystem::AddTextToScroll(this, &var_1d0, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1d0);
00571c45                  break;
00571c45              }
00571d73              case 0x48:
00571d73              {
00571d73                  ClientSystem::AddTextToScroll(this, &cant_jump_position, 0x1a, 1, 0);
00571d73                  break;
00571d73              }
00571d8a              case 0x49:
00571d8a              {
00571d8a                  ClientSystem::AddTextToScroll(this, &cant_jump_load, 0x1a, 1, 0);
00571d8a                  break;
00571d8a              }
00571d40              case 0x4a:
00571d40              {
00571d40                  void var_1c8;
00571d40                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1c8, u"Ack! You killed yourself!\n");
00571d55                  ClientSystem::AddTextToScroll(this, &var_1c8, 0, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c8);
00571d40                  break;
00571d40              }
00571ce1              case 0x4d:
00571ce1              {
00571ce1                  void var_390;
00571ce1                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_390, u"Invalid PK status!");
00571cf3                  ClientSystem::AddTextToScroll(this, &var_390, 0x1a, 1, 0);
00575445                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_390);
00571ce1                  break;
00571ce1              }
00571d0a              case 0x4e:
00571d0a              {
00571d0a                  class PSRefBufferCharData<unsigned short>* m_charbuffer = arg3->m_charbuffer;
00571d15                  PStringBase<unsigned short>::sprintf(&PStringBase<unsigned short>::s_NullBuffer_2, u"You fail to affect %s because yo…");
00571d2a                  ClientSystem::AddTextToScroll(this, &PStringBase<unsigned short>::s_NullBuffer_2, 7, 1, 0);
00571d0a                  break;
00571d0a              }
00571dc5          }
00571dc5      
0057544e      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0057544e      
00575461      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00575469          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00571990  }

00575477                                                                       90                                                 .
00575478  uint32_t jump_table_575478[0x15] = 
00575478  {
00575478      [0x00] =  0x00571abd
0057547c      [0x01] =  0x00571a62
00575480      [0x02] =  0x00572af9
00575484      [0x03] =  0x00571aef
00575488      [0x04] =  0x00571b18
0057548c      [0x05] =  0x00571d94
00575490      [0x06] =  0x00571c6b
00575494      [0x07] =  0x00571bb5
00575498      [0x08] =  0x00571bde
0057549c      [0x09] =  0x00571c10
005754a0      [0x0a] =  0x00571c94
005754a4      [0x0b] =  0x00571b83
005754a8      [0x0c] =  0x00571a94
005754ac      [0x0d] =  0x00571b5a
005754b0      [0x0e] =  0x00571c39
005754b4      [0x0f] =  0x00571d66
005754b8      [0x10] =  0x00571d7d
005754bc      [0x11] =  0x00571d34
005754c0      [0x12] =  0x00571cd8
005754c4      [0x13] =  0x00571d01
005754c8      [0x14] =  0x0057544a
005754cc  }
005754cc  uint8_t lookup_table_5754cc[0x38] = 
005754cc  {
005754cc      [0x00] =  0x00
005754cd      [0x01] =  0x14
005754ce      [0x02] =  0x14
005754cf      [0x03] =  0x14
005754d0      [0x04] =  0x14
005754d1      [0x05] =  0x14
005754d2      [0x06] =  0x01
005754d3      [0x07] =  0x02
005754d4      [0x08] =  0x14
005754d5      [0x09] =  0x03
005754d6      [0x0a] =  0x14
005754d7      [0x0b] =  0x14
005754d8      [0x0c] =  0x04
005754d9      [0x0d] =  0x05
005754da      [0x0e] =  0x14
005754db      [0x0f] =  0x06
005754dc      [0x10] =  0x14
005754dd      [0x11] =  0x07
005754de      [0x12] =  0x08
005754df      [0x13] =  0x09
005754e0      [0x14] =  0x0a
005754e1      [0x15] =  0x14
005754e2      [0x16] =  0x14
005754e3      [0x17] =  0x14
005754e4      [0x18] =  0x14
005754e5      [0x19] =  0x14
005754e6      [0x1a] =  0x14
005754e7      [0x1b] =  0x14
005754e8      [0x1c] =  0x14
005754e9      [0x1d] =  0x14
005754ea      [0x1e] =  0x14
005754eb      [0x1f] =  0x0b
005754ec      [0x20] =  0x04
005754ed      [0x21] =  0x04
005754ee      [0x22] =  0x04
005754ef      [0x23] =  0x0c
005754f0      [0x24] =  0x14
005754f1      [0x25] =  0x14
005754f2      [0x26] =  0x0d
005754f3      [0x27] =  0x0e
005754f4      [0x28] =  0x14
005754f5      [0x29] =  0x14
005754f6      [0x2a] =  0x14
005754f7      [0x2b] =  0x14
005754f8      [0x2c] =  0x14
005754f9      [0x2d] =  0x14
005754fa      [0x2e] =  0x14
005754fb      [0x2f] =  0x14
005754fc      [0x30] =  0x14
005754fd      [0x31] =  0x0f
005754fe      [0x32] =  0x10
005754ff      [0x33] =  0x11
00575500      [0x34] =  0x14
00575501      [0x35] =  0x14
00575502      [0x36] =  0x12
00575503      [0x37] =  0x13
00575504  }
00575504  uint32_t jump_table_575504[0x5] = 
00575504  {
00575504      [0x0] =  0x00571de4
00575508      [0x1] =  0x00571df8
0057550c      [0x2] =  0x00571e0c
00575510      [0x3] =  0x00571e42
00575514      [0x4] =  0x00571e78
00575518  }
00575518  uint32_t jump_table_575518[0xf] = 
00575518  {
00575518      [0x0] =  0x00571f88
0057551c      [0x1] =  0x00571ed2
00575520      [0x2] =  0x00571f04
00575524      [0x3] =  0x00571f2d
00575528      [0x4] =  0x00571f5f
0057552c      [0x5] =  0x00572112
00575530      [0x6] =  0x00571fcc
00575534      [0x7] =  0x00571ff5
00575538      [0x8] =  0x00572027
0057553c      [0x9] =  0x00572050
00575540      [0xa] =  0x00572082
00575544      [0xb] =  0x005720ae
00575548      [0xc] =  0x005720e0
0057554c      [0xd] =  0x00572144
00575550      [0xe] =  0x0057544a
00575554  }
00575554  uint8_t lookup_table_575554[0x19] = 
00575554  {
00575554      [0x00] =  0x00
00575555      [0x01] =  0x0e
00575556      [0x02] =  0x01
00575557      [0x03] =  0x0e
00575558      [0x04] =  0x0e
00575559      [0x05] =  0x0e
0057555a      [0x06] =  0x0e
0057555b      [0x07] =  0x0e
0057555c      [0x08] =  0x02
0057555d      [0x09] =  0x03
0057555e      [0x0a] =  0x04
0057555f      [0x0b] =  0x05
00575560      [0x0c] =  0x0e
00575561      [0x0d] =  0x0e
00575562      [0x0e] =  0x0e
00575563      [0x0f] =  0x06
00575564      [0x10] =  0x07
00575565      [0x11] =  0x08
00575566      [0x12] =  0x09
00575567      [0x13] =  0x0a
00575568      [0x14] =  0x0b
00575569      [0x15] =  0x0c
0057556a      [0x16] =  0x0e
0057556b      [0x17] =  0x0e
0057556c      [0x18] =  0x0d
0057556d  }

0057556d                                         8d 49 00                                                               .I.
00575570  uint32_t jump_table_575570[0x29] = 
00575570  {
00575570      [0x00] =  0x00572347
00575574      [0x01] =  0x005724a5
00575578      [0x02] =  0x00572473
0057557c      [0x03] =  0x0057251d
00575580      [0x04] =  0x005724d7
00575584      [0x05] =  0x00572509
00575588      [0x06] =  0x00572531
0057558c      [0x07] =  0x00572563
00575590      [0x08] =  0x00572595
00575594      [0x09] =  0x005725c7
00575598      [0x0a] =  0x005725f9
0057559c      [0x0b] =  0x0057262b
005755a0      [0x0c] =  0x0057265d
005755a4      [0x0d] =  0x005721c5
005755a8      [0x0e] =  0x005721f7
005755ac      [0x0f] =  0x00572229
005755b0      [0x10] =  0x0057268f
005755b4      [0x11] =  0x00572725
005755b8      [0x12] =  0x005726f3
005755bc      [0x13] =  0x00572757
005755c0      [0x14] =  0x005726c1
005755c4      [0x15] =  0x00572789
005755c8      [0x16] =  0x005727bb
005755cc      [0x17] =  0x005727ed
005755d0      [0x18] =  0x00572441
005755d4      [0x19] =  0x005722b1
005755d8      [0x1a] =  0x005722e3
005755dc      [0x1b] =  0x00572315
005755e0      [0x1c] =  0x00572379
005755e4      [0x1d] =  0x005723ab
005755e8      [0x1e] =  0x00572851
005755ec      [0x1f] =  0x005723dd
005755f0      [0x20] =  0x005728e7
005755f4      [0x21] =  0x0057225b
005755f8      [0x22] =  0x0057240f
005755fc      [0x23] =  0x0057281f
00575600      [0x24] =  0x00572883
00575604      [0x25] =  0x005728b5
00575608      [0x26] =  0x00572919
0057560c      [0x27] =  0x0057292d
00575610      [0x28] =  0x0057544a
00575614  }
00575614  uint8_t lookup_table_575614[0x80] = 
00575614  {
00575614      [0x00] =  0x00
00575615      [0x01] =  0x01
00575616      [0x02] =  0x02
00575617      [0x03] =  0x28
00575618      [0x04] =  0x28
00575619      [0x05] =  0x28
0057561a      [0x06] =  0x28
0057561b      [0x07] =  0x28
0057561c      [0x08] =  0x28
0057561d      [0x09] =  0x03
0057561e      [0x0a] =  0x04
0057561f      [0x0b] =  0x28
00575620      [0x0c] =  0x05
00575621      [0x0d] =  0x28
00575622      [0x0e] =  0x28
00575623      [0x0f] =  0x28
00575624      [0x10] =  0x28
00575625      [0x11] =  0x28
00575626      [0x12] =  0x28
00575627      [0x13] =  0x06
00575628      [0x14] =  0x07
00575629      [0x15] =  0x08
0057562a      [0x16] =  0x28
0057562b      [0x17] =  0x28
0057562c      [0x18] =  0x09
0057562d      [0x19] =  0x0a
0057562e      [0x1a] =  0x0b
0057562f      [0x1b] =  0x0c
00575630      [0x1c] =  0x28
00575631      [0x1d] =  0x0d
00575632      [0x1e] =  0x0e
00575633      [0x1f] =  0x0f
00575634      [0x20] =  0x28
00575635      [0x21] =  0x28
00575636      [0x22] =  0x28
00575637      [0x23] =  0x28
00575638      [0x24] =  0x28
00575639      [0x25] =  0x28
0057563a      [0x26] =  0x28
0057563b      [0x27] =  0x28
0057563c      [0x28] =  0x10
0057563d      [0x29] =  0x10
0057563e      [0x2a] =  0x11
0057563f      [0x2b] =  0x10
00575640      [0x2c] =  0x28
00575641      [0x2d] =  0x12
00575642      [0x2e] =  0x13
00575643      [0x2f] =  0x14
00575644      [0x30] =  0x15
00575645      [0x31] =  0x16
00575646      [0x32] =  0x17
00575647      [0x33] =  0x18
00575648      [0x34] =  0x19
00575649      [0x35] =  0x1a
0057564a      [0x36] =  0x28
0057564b      [0x37] =  0x28
0057564c      [0x38] =  0x28
0057564d      [0x39] =  0x28
0057564e      [0x3a] =  0x28
0057564f      [0x3b] =  0x1b
00575650      [0x3c] =  0x28
00575651      [0x3d] =  0x28
00575652      [0x3e] =  0x28
00575653      [0x3f] =  0x28
00575654      [0x40] =  0x28
00575655      [0x41] =  0x28
00575656      [0x42] =  0x28
00575657      [0x43] =  0x28
00575658      [0x44] =  0x28
00575659      [0x45] =  0x28
0057565a      [0x46] =  0x28
0057565b      [0x47] =  0x28
0057565c      [0x48] =  0x28
0057565d      [0x49] =  0x28
0057565e      [0x4a] =  0x28
0057565f      [0x4b] =  0x28
00575660      [0x4c] =  0x28
00575661      [0x4d] =  0x28
00575662      [0x4e] =  0x28
00575663      [0x4f] =  0x28
00575664      [0x50] =  0x28
00575665      [0x51] =  0x28
00575666      [0x52] =  0x1c
00575667      [0x53] =  0x1d
00575668      [0x54] =  0x1e
00575669      [0x55] =  0x1e
0057566a      [0x56] =  0x28
0057566b      [0x57] =  0x28
0057566c      [0x58] =  0x28
0057566d      [0x59] =  0x28
0057566e      [0x5a] =  0x28
0057566f      [0x5b] =  0x28
00575670      [0x5c] =  0x1f
00575671      [0x5d] =  0x28
00575672      [0x5e] =  0x28
00575673      [0x5f] =  0x20
00575674      [0x60] =  0x21
00575675      [0x61] =  0x28
00575676      [0x62] =  0x28
00575677      [0x63] =  0x28
00575678      [0x64] =  0x28
00575679      [0x65] =  0x28
0057567a      [0x66] =  0x28
0057567b      [0x67] =  0x28
0057567c      [0x68] =  0x28
0057567d      [0x69] =  0x28
0057567e      [0x6a] =  0x22
0057567f      [0x6b] =  0x28
00575680      [0x6c] =  0x28
00575681      [0x6d] =  0x28
00575682      [0x6e] =  0x28
00575683      [0x6f] =  0x28
00575684      [0x70] =  0x28
00575685      [0x71] =  0x28
00575686      [0x72] =  0x28
00575687      [0x73] =  0x28
00575688      [0x74] =  0x28
00575689      [0x75] =  0x23
0057568a      [0x76] =  0x24
0057568b      [0x77] =  0x24
0057568c      [0x78] =  0x25
0057568d      [0x79] =  0x28
0057568e      [0x7a] =  0x28
0057568f      [0x7b] =  0x28
00575690      [0x7c] =  0x28
00575691      [0x7d] =  0x28
00575692      [0x7e] =  0x26
00575693      [0x7f] =  0x27
00575694  }
00575694  uint32_t jump_table_575694[0x5d] = 
00575694  {
00575694      [0x00] =  0x00573611
00575698      [0x01] =  0x00573625
0057569c      [0x02] =  0x0057544a
005756a0      [0x03] =  0x00573188
005756a4      [0x04] =  0x00572989
005756a8      [0x05] =  0x00572a1f
005756ac      [0x06] =  0x005731ba
005756b0      [0x07] =  0x005731ec
005756b4      [0x08] =  0x00572a51
005756b8      [0x09] =  0x005732b4
005756bc      [0x0a] =  0x005732e6
005756c0      [0x0b] =  0x00573318
005756c4      [0x0c] =  0x0057334a
005756c8      [0x0d] =  0x005729bb
005756cc      [0x0e] =  0x005729ed
005756d0      [0x0f] =  0x00572a83
005756d4      [0x10] =  0x0057308e
005756d8      [0x11] =  0x005730c0
005756dc      [0x12] =  0x005730f2
005756e0      [0x13] =  0x00573124
005756e4      [0x14] =  0x00573156
005756e8      [0x15] =  0x00572d6e
005756ec      [0x16] =  0x00572da0
005756f0      [0x17] =  0x00572dd2
005756f4      [0x18] =  0x00572e04
005756f8      [0x19] =  0x00572e36
005756fc      [0x1a] =  0x00572e68
00575700      [0x1b] =  0x00572e9a
00575704      [0x1c] =  0x00572ecc
00575708      [0x1d] =  0x00572efe
0057570c      [0x1e] =  0x0057544a
00575710      [0x1f] =  0x00572f30
00575714      [0x20] =  0x00572f94
00575718      [0x21] =  0x00572f62
0057571c      [0x22] =  0x00572ff8
00575720      [0x23] =  0x0057302a
00575724      [0x24] =  0x00572b3d
00575728      [0x25] =  0x00572b6f
0057572c      [0x26] =  0x00572ba1
00575730      [0x27] =  0x00572bd3
00575734      [0x28] =  0x00572c05
00575738      [0x29] =  0x00572c37
0057573c      [0x2a] =  0x0057321e
00575740      [0x2b] =  0x00573250
00575744      [0x2c] =  0x00573282
00575748      [0x2d] =  0x005733ae
0057574c      [0x2e] =  0x005733ae
00575750      [0x2f] =  0x005733ae
00575754      [0x30] =  0x0057544a
00575758      [0x31] =  0x0057544a
0057575c      [0x32] =  0x005733bc
00575760      [0x33] =  0x005733ee
00575764      [0x34] =  0x005734a4
00575768      [0x35] =  0x00573506
0057576c      [0x36] =  0x00573420
00575770      [0x37] =  0x00573452
00575774      [0x38] =  0x0057347b
00575778      [0x39] =  0x00572fc6
0057577c      [0x3a] =  0x00572c69
00575780      [0x3b] =  0x00572c9b
00575784      [0x3c] =  0x00572caf
00575788      [0x3d] =  0x00572ce1
0057578c      [0x3e] =  0x00572d13
00575790      [0x3f] =  0x00572d27
00575794      [0x40] =  0x00572d5a
00575798      [0x41] =  0x0057305c
0057579c      [0x42] =  0x0057544a
005757a0      [0x43] =  0x00572af9
005757a4      [0x44] =  0x00572ab5
005757a8      [0x45] =  0x00573639
005757ac      [0x46] =  0x00573662
005757b0      [0x47] =  0x00573676
005757b4      [0x48] =  0x0057368a
005757b8      [0x49] =  0x0057369e
005757bc      [0x4a] =  0x005736b2
005757c0      [0x4b] =  0x005736fc
005757c4      [0x4c] =  0x00573710
005757c8      [0x4d] =  0x00573724
005757cc      [0x4e] =  0x00573738
005757d0      [0x4f] =  0x005736e8
005757d4      [0x50] =  0x0057544a
005757d8      [0x51] =  0x0057544a
005757dc      [0x52] =  0x0057374c
005757e0      [0x53] =  0x00573775
005757e4      [0x54] =  0x00573775
005757e8      [0x55] =  0x005737d2
005757ec      [0x56] =  0x005737fb
005757f0      [0x57] =  0x00573544
005757f4      [0x58] =  0x00573596
005757f8      [0x59] =  0x005735bf
005757fc      [0x5a] =  0x0057356d
00575800      [0x5b] =  0x005735e8
00575804      [0x5c] =  0x0057337c
00575808  }
00575808  uint32_t jump_table_575808[0xab] = 
00575808  {
00575808      [0x00] =  0x00574e55
0057580c      [0x01] =  0x00574ecd
00575810      [0x02] =  0x00573850
00575814      [0x03] =  0x00574463
00575818      [0x04] =  0x00574495
0057581c      [0x05] =  0x005744c7
00575820      [0x06] =  0x005744f9
00575824      [0x07] =  0x0057452b
00575828      [0x08] =  0x0057455d
0057582c      [0x09] =  0x0057458f
00575830      [0x0a] =  0x00573c58
00575834      [0x0b] =  0x00574657
00575838      [0x0c] =  0x0057466e
0057583c      [0x0d] =  0x0057468f
00575840      [0x0e] =  0x005746a6
00575844      [0x0f] =  0x0057470c
00575848      [0x10] =  0x005747bc
0057584c      [0x11] =  0x00573b38
00575850      [0x12] =  0x00573b7c
00575854      [0x13] =  0x005739e8
00575858      [0x14] =  0x00573a1a
0057585c      [0x15] =  0x00573a4c
00575860      [0x16] =  0x00573a7e
00575864      [0x17] =  0x00573ad4
00575868      [0x18] =  0x00573b06
0057586c      [0x19] =  0x00573cee
00575870      [0x1a] =  0x00573c8a
00575874      [0x1b] =  0x005745c1
00575878      [0x1c] =  0x00574c59
0057587c      [0x1d] =  0x00573984
00575880      [0x1e] =  0x005745f3
00575884      [0x1f] =  0x00574625
00575888      [0x20] =  0x00573baf
0057588c      [0x21] =  0x00573c05
00575890      [0x22] =  0x00574874
00575894      [0x23] =  0x005748c8
00575898      [0x24] =  0x0057491c
0057589c      [0x25] =  0x00574970
005758a0      [0x26] =  0x00574984
005758a4      [0x27] =  0x00574d53
005758a8      [0x28] =  0x0057544a
005758ac      [0x29] =  0x00574d77
005758b0      [0x2a] =  0x00574da9
005758b4      [0x2b] =  0x00574ddb
005758b8      [0x2c] =  0x00574dff
005758bc      [0x2d] =  0x00574e23
005758c0      [0x2e] =  0x005749b6
005758c4      [0x2f] =  0x00574bc2
005758c8      [0x30] =  0x00574c14
005758cc      [0x31] =  0x00573c26
005758d0      [0x32] =  0x005743c7
005758d4      [0x33] =  0x005743db
005758d8      [0x34] =  0x0057544a
005758dc      [0x35] =  0x00574a0a
005758e0      [0x36] =  0x00574a4e
005758e4      [0x37] =  0x00574b18
005758e8      [0x38] =  0x00574a90
005758ec      [0x39] =  0x00574ad4
005758f0      [0x3a] =  0x00574b4a
005758f4      [0x3b] =  0x00574b7c
005758f8      [0x3c] =  0x00574bae
005758fc      [0x3d] =  0x00574c8b
00575900      [0x3e] =  0x00574cbd
00575904      [0x3f] =  0x00574c46
00575908      [0x40] =  0x0057504a
0057590c      [0x41] =  0x00574cef
00575910      [0x42] =  0x005738a5
00575914      [0x43] =  0x005738d4
00575918      [0x44] =  0x00573907
0057591c      [0x45] =  0x0057391b
00575920      [0x46] =  0x0057394e
00575924      [0x47] =  0x0057395f
00575928      [0x48] =  0x00573973
0057592c      [0x49] =  0x00574f14
00575930      [0x4a] =  0x00573f8b
00575934      [0x4b] =  0x00573f9f
00575938      [0x4c] =  0x005740b9
0057593c      [0x4d] =  0x005740eb
00575940      [0x4e] =  0x005740ff
00575944      [0x4f] =  0x00574113
00575948      [0x50] =  0x00574127
0057594c      [0x51] =  0x0057413b
00575950      [0x52] =  0x0057414f
00575954      [0x53] =  0x0057544a
00575958      [0x54] =  0x0057544a
0057595c      [0x55] =  0x00573d20
00575960      [0x56] =  0x00573d34
00575964      [0x57] =  0x00573d48
00575968      [0x58] =  0x00573dac
0057596c      [0x59] =  0x00573dd4
00575970      [0x5a] =  0x00573e42
00575974      [0x5b] =  0x00573e56
00575978      [0x5c] =  0x00573e10
0057597c      [0x5d] =  0x00573e9c
00575980      [0x5e] =  0x005743ef
00575984      [0x5f] =  0x00574403
00575988      [0x60] =  0x00573dc0
0057598c      [0x61] =  0x00573e6a
00575990      [0x62] =  0x00573dfc
00575994      [0x63] =  0x00573f59
00575998      [0x64] =  0x00574ee1
0057599c      [0x65] =  0x00574e69
005759a0      [0x66] =  0x00574e9b
005759a4      [0x67] =  0x00573879
005759a8      [0x68] =  0x00574435
005759ac      [0x69] =  0x00575099
005759b0      [0x6a] =  0x005750cb
005759b4      [0x6b] =  0x005750fd
005759b8      [0x6c] =  0x0057512f
005759bc      [0x6d] =  0x00574f5a
005759c0      [0x6e] =  0x00574f8c
005759c4      [0x6f] =  0x00574fbe
005759c8      [0x70] =  0x00574ff0
005759cc      [0x71] =  0x00575022
005759d0      [0x72] =  0x00575036
005759d4      [0x73] =  0x00574f46
005759d8      [0x74] =  0x00573cbc
005759dc      [0x75] =  0x00574449
005759e0      [0x76] =  0x00574810
005759e4      [0x77] =  0x00574842
005759e8      [0x78] =  0x0057436d
005759ec      [0x79] =  0x0057439f
005759f0      [0x7a] =  0x005743b3
005759f4      [0x7b] =  0x00574d21
005759f8      [0x7c] =  0x005741c8
005759fc      [0x7d] =  0x005741df
00575a00      [0x7e] =  0x005741f6
00575a04      [0x7f] =  0x0057420d
00575a08      [0x80] =  0x00574224
00575a0c      [0x81] =  0x0057423b
00575a10      [0x82] =  0x0057424f
00575a14      [0x83] =  0x00574266
00575a18      [0x84] =  0x00573de8
00575a1c      [0x85] =  0x00573ece
00575a20      [0x86] =  0x00573d7a
00575a24      [0x87] =  0x00573ef9
00575a28      [0x88] =  0x00573ee2
00575a2c      [0x89] =  0x00573f42
00575a30      [0x8a] =  0x00573f2b
00575a34      [0x8b] =  0x0057427d
00575a38      [0x8c] =  0x00574291
00575a3c      [0x8d] =  0x005742a5
00575a40      [0x8e] =  0x005742b9
00575a44      [0x8f] =  0x005742cd
00575a48      [0x90] =  0x005742e1
00575a4c      [0x91] =  0x00574313
00575a50      [0x92] =  0x00574327
00575a54      [0x93] =  0x0057433b
00575a58      [0x94] =  0x00573fb3
00575a5c      [0x95] =  0x00573fe5
00575a60      [0x96] =  0x00574017
00575a64      [0x97] =  0x0057402b
00575a68      [0x98] =  0x0057404f
00575a6c      [0x99] =  0x00574081
00575a70      [0x9a] =  0x00574095
00575a74      [0x9b] =  0x005739b6
00575a78      [0x9c] =  0x00575161
00575a7c      [0x9d] =  0x00575193
00575a80      [0x9e] =  0x005751c5
00575a84      [0x9f] =  0x005751f7
00575a88      [0xa0] =  0x00575229
00575a8c      [0xa1] =  0x0057525b
00575a90      [0xa2] =  0x0057528e
00575a94      [0xa3] =  0x005752c0
00575a98      [0xa4] =  0x005752f2
00575a9c      [0xa5] =  0x00575324
00575aa0      [0xa6] =  0x00575356
00575aa4      [0xa7] =  0x00575388
00575aa8      [0xa8] =  0x005753ba
00575aac      [0xa9] =  0x005753e9
00575ab0      [0xaa] =  0x00575418
00575ab4  }

00575ab4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00575ac0  class PStringBase<char>* JoinArgs(class PStringBase<char>* __return, int32_t arg2, char** arg3)

00575ac0  {
00575ac3      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00575aca      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00575ad3      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00575ad9      int32_t ebx = arg2;
00575ad9      
00575adf      if (ebx != 0)
00575adf      {
00575ae6          char** ebp_1 = arg3;
00575aea          int32_t ebx_1 = ebx;
00575aea          
00575af8          while (true)
00575af8          {
00575af8              class PStringBase<char> var_4;
00575af8              PStringBase<char>::PStringBase<char>(&var_4, *(uint32_t*)ebp_1);
00575afd              class PStringBase<char> ecx_2 = var_4;
00575b01              int32_t eax_2 = *(uint32_t*)(ecx_2 - 4);
00575b01              
00575b07              if (eax_2 != 1)
00575b07              {
00575b10                  PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, ecx_2, (eax_2 - 1));
00575b15                  ecx_2 = var_4;
00575b07              }
00575b07              
00575b2c              if ((InterlockedDecrement((ecx_2 - 0x10)) == 0 && ecx_2 != 0x14))
00575b34                  **(uint32_t**)(ecx_2 - 0x14)(1);
00575b34              
00575b36              ebx_1 -= 1;
00575b37              ebp_1 = &ebp_1[1];
00575b37              
00575b3c              if (ebx_1 == 0)
00575b3c                  break;
00575b3c              
00575b42              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00575b46              arg2 = 0x20;
00575b4f              int32_t edi_1 = PStringBase<char>::s_NullBuffer_3->m_data[-4];
00575b4f              
00575b5a              if ((*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x10) != 1 || (edi_1 + 1) > *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0xc)))
00575b5a              {
00575b75                  PStringBase<char>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_2, edi_1);
00575b7a                  uint8_t* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_2;
00575b7e                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_3;
00575b89                  uint8_t i;
00575b89                  
00575b89                  do
00575b89                  {
00575b81                      i = PStringBase<char>::s_NullBuffer_7->m_data[0];
00575b83                      PStringBase<char>::s_NullBuffer_7 = &PStringBase<char>::s_NullBuffer_7->m_data[1];
00575b84                      *(uint8_t*)PStringBase<char>::s_NullBuffer_6 = i;
00575b86                      PStringBase<char>::s_NullBuffer_6 = &PStringBase<char>::s_NullBuffer_6[1];
00575b89                  } while (i != 0);
00575b89                  
00575b9b                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_3[-1]) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
00575ba3                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x14)(1);
00575b5a              }
00575b5a              else
00575b5a              {
00575b5c                  *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_3 - 4) = (edi_1 + 1);
00575b63                  *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_2 - 8) = 0xffffffff;
00575b5a              }
00575b5a              
00575bb5              strncpy(&PStringBase<char>::s_NullBuffer_2->m_data[(edi_1 - 1)], &arg2, 1);
00575bbb              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
00575bc5              PStringBase<char>::s_NullBuffer_4->m_data[(PStringBase<char>::s_NullBuffer_4->m_data[-4] - 1)] = 0;
00575af8          }
00575adf      }
00575adf      
00575bd0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_2;
00575bd8      __return->m_charbuffer = PStringBase<char>::s_NullBuffer_5;
00575bde      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_5[-1]);
00575be8      void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00575be8      
00575bfb      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00575c03          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00575c03      
00575c0d      return __return;
00575ac0  }

00575c0e                                            90 90                                                                ..

00575c10  class PStringBase<char>* __convention("regparm") JoinArgsAsName(class PStringBase<char>* __return, int32_t arg2, char** arg3)

00575c10  {
00575c10      class PStringBase<char> __return_3;
00575c10      class PStringBase<char> __return_1 = __return_3;
00575c1c      char** m_charbuffer_1 = arg3;
00575c23      JoinArgs(&__return_1, arg2, m_charbuffer_1);
00575c28      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::whitespace_string.m_charbuffer;
00575c3f      m_charbuffer_1 = m_charbuffer;
00575c41      InterlockedIncrement(((char*)m_charbuffer - 0x10));
00575c4b      PStringBase<char>::trim(&__return_1, 1, 1, m_charbuffer_1);
00575c50      m_charbuffer_1 = &__return_1;
00575c57      PStringBase<char>::allocate_ref_buffer(&m_charbuffer_1, 1);
00575c5e      *(uint8_t*)m_charbuffer_1 = 0x2b;
00575c65      *(uint8_t*)((char*)m_charbuffer_1 + 1) = 0;
00575c6f      PStringBase<char>::trim(&__return_1, 1, 0, m_charbuffer_1);
00575c74      class PStringBase<char> __return_2 = __return_1;
00575c7c      __return->m_charbuffer = __return_2;
00575c81      m_charbuffer_1 = (__return_2 - 0x10);
00575c82      InterlockedIncrement(m_charbuffer_1);
00575c88      int32_t* esi_1 = (__return_1 - 0x14);
00575c8e      m_charbuffer_1 = &esi_1[1];
00575c8e      
00575c9b      if ((InterlockedDecrement(m_charbuffer_1) == 0 && esi_1 != 0))
00575c9b      {
00575c9d          int32_t eax_4 = *(uint32_t*)esi_1;
00575c9f          m_charbuffer_1 = 1;
00575ca3          *(uint32_t*)eax_4(m_charbuffer_1);
00575c9b      }
00575c9b      
00575cab      return __return;
00575c10  }

00575cac                                      90 90 90 90                                                              ....

00575cb0  uint8_t __fastcall ClientCommunicationSystem::DoAllegianceChat(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00575cb0  {
00575cbb      class ClientCommunicationSystem* __return = this;
00575cbf      char*** var_34 = &arg3;
00575cc4      int32_t* var_38 = &arg2;
00575cc9      class AC1Legacy::PStringBase<char> var_18;
00575cc9      int32_t* var_3c = &var_18;
00575ccf      class PStringBase<char>* __return_1;
00575ccf      int32_t* edx;
00575ccf      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return_1, edx, this)->m_charbuffer;
00575cd7      class PSRefBufferCharData<char>* m_charbuffer_4 = m_charbuffer;
00575ce2      InterlockedIncrement(&m_charbuffer[-1]);
00575cee      int32_t* edi_1 = (var_18 - 0x14);
00575cee      
00575cfd      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00575d05          **(uint32_t**)edi_1(1);
00575d05      
00575d10      int32_t* var_1c;
00575d10      PStringBase<char>::PStringBase<char>(&var_1c, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseProfile);
00575d20      int32_t eax_4 = PStringBase<char>::cmp(&m_charbuffer_4, &var_1c, 0);
00575d2b      char ebx_1 = ((int8_t)-(eax_4));
00575d2f      int32_t* edi_3 = &var_1c[-5];
00575d2f      
00575d40      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00575d48          **(uint32_t**)edi_3(1);
00575d48      
00575d4c      uint8_t var_34_4;
00575d4c      class CPlayerSystem* eax_6;
00575d4c      void* __offset(PSRefBufferCharData<char>, -0x14) edi_5;
00575d4c      bool cond:2_1;
00575d4c      
00575d4c      if ((ebx_1 - ebx_1) == 0xff)
00575d4c      {
00575d97          PStringBase<char>::PStringBase<char>(&var_1c, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseData);
00575da7          int32_t eax_10 = PStringBase<char>::cmp(&m_charbuffer_4, &var_1c, 0);
00575db2          char ebx_3 = ((int8_t)-(eax_10));
00575db6          void* edi_7 = &var_1c[-5];
00575db6          
00575dc7          if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
00575dcf              **(uint32_t**)edi_7(1);
00575dcf          
00575dd3          if ((ebx_3 - ebx_3) != 0xff)
00575dd3          {
00575dd5              eax_6 = CPlayerSystem::GetPlayerSystem();
00575dda              var_34_4 = 0;
00575ddc              goto label_575d58;
00575dd3          }
00575dd3          
00575dea          PStringBase<char>::PStringBase<char>(&var_1c, "kick");
00575dfa          int32_t eax_12 = PStringBase<char>::cmp(&m_charbuffer_4, &var_1c, 0);
00575e05          char ebx_5 = ((int8_t)-(eax_12));
00575e09          void* edi_9 = &var_1c[-5];
00575e09          
00575e1a          if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
00575e22              **(uint32_t**)edi_9(1);
00575e22          
00575e26          if ((ebx_5 - ebx_5) == 0xff)
00575e26          {
00576007              PStringBase<char>::PStringBase<char>(&var_18, &data_7da0b0);
00576017              int32_t eax_36 = PStringBase<char>::cmp(&m_charbuffer_4, &var_18, 0);
00576022              char ebx_7 = ((int8_t)-(eax_36));
00576026              int32_t* edi_22 = (var_18 - 0x14);
00576026              
00576037              if ((InterlockedDecrement(&edi_22[1]) == 0 && edi_22 != 0))
0057603f                  **(uint32_t**)edi_22(1);
0057603f              
00576043              int32_t* ecx_43;
00576043              
00576043              if ((ebx_7 - ebx_7) == 0xff)
00576043              {
005760e4                  PStringBase<char>::PStringBase<char>(&var_18, "ungag");
005760f4                  int32_t eax_41 = PStringBase<char>::cmp(&m_charbuffer_4, &var_18, 0);
005760fb                  char ebx_9 = ((int8_t)-(eax_41));
00576105                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
00576105                  
0057610c                  if ((ebx_9 - ebx_9) == 0xff)
0057610c                  {
005761d4                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_4);
005761dc                      int32_t eax_47;
005761dc                      eax_47 = 0;
005761e2                      return 0;
0057610c                  }
0057610c                  
0057612e                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, JoinArgs(&arg2, arg2, arg3));
00576137                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057613c                  char** eax_44 = arg3;
00576144                  class AC1Legacy::PStringBase<char>* ecx_51 = &arg2;
00576144                  
00576148                  if (eax_44[-1] == 1)
00576148                  {
0057614f                      PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_51, u"Please specify an actual name.");
00576154                      class ClientCommunicationSystem* __return_3 = __return;
00576168                      ClientSystem::AddTextToScroll(__return_3, &arg2, 0x1a, 1, __return_3->m_idCurrentCommandSource);
00576171                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057617a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00576183                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_4);
00576188                      int32_t eax_46;
00576188                      eax_46 = 1;
00576191                      return 1;
00576148                  }
00576148                  
00576195                  AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_51, eax_44);
005761a1                  CM_Allegiance::Event_AllegianceChatGag(&arg2, 0);
005761ad                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
005761b2                  ecx_43 = &arg3;
00576043              }
00576043              else
00576043              {
0057605d                  class PSRefBufferCharData<char>* m_charbuffer_3 = JoinArgs(&arg3, arg2, arg3)->m_charbuffer;
00576066                  arg2 = m_charbuffer_3;
0057606a                  InterlockedIncrement(&m_charbuffer_3[-1]);
00576070                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00576079                  class AC1Legacy::PStringBase<char>* ecx_41 = &arg3;
00576079                  
0057607d                  if (m_charbuffer_3->m_data[-4] != 1)
0057607d                  {
005760b5                      AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_41, m_charbuffer_3);
005760c1                      CM_Allegiance::Event_AllegianceChatGag(&arg3, 1);
005760cd                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
005760d2                      ecx_43 = &arg2;
0057607d                  }
0057607d                  else
0057607d                  {
00576084                      PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_41, u"Please specify an actual name.");
00576089                      class ClientCommunicationSystem* __return_2 = __return;
0057609d                      ClientSystem::AddTextToScroll(__return_2, &arg3, 0x1a, 1, __return_2->m_idCurrentCommandSource);
005760a6                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
005760ab                      ecx_43 = &arg2;
0057607d                  }
00576043              }
00576043              
005761b6              PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_43);
005761bf              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_4);
00575e26          }
00575e26          else
00575e26          {
00575e40              class PSRefBufferCharData<char>* m_charbuffer_1 = JoinArgs(&__return, arg2, arg3)->m_charbuffer;
00575e42              arg2 = m_charbuffer_1;
00575e4d              InterlockedIncrement(&m_charbuffer_1[-1]);
00575e53              void* __offset(ClientCommunicationSystem, -0x14) edi_11 = ((char*)__return - 0x14);
00575e53              
00575e64              if ((InterlockedDecrement(((char*)edi_11 + 4)) == 0 && edi_11 != 0))
00575e6c                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_11) + -0x14)(1);
00575e6c              
00575e7b              int32_t var_10 = 0x79448c;
00575e83              int32_t* var_4_1 = &arg2;
00575e87              int32_t var_8_1 = 0;
00575e8b              int32_t var_c_1 = 0;
00575e8f              PStringBase<char>::PStringBase<char>(&arg3, "No reason given.");
00575e8f              
00575ea2              if (PStringBaseIter_Common<char>::FindChar(&var_10, 0x2c, 0) != 0)
00575ea2              {
00575eb9                  int32_t var_c_2;
00575eb9                  
00575eb9                  if ((var_c_1 + 1) <= *(uint32_t*)var_10())
00575ecb                      var_c_2 = (var_c_1 + 1);
00575eb9                  else
00575ec5                      var_c_2 = *(uint32_t*)var_10();
00575ec5                  
00575ede                  PStringBaseIter_Common<unsigned short>::SetMark(&var_10, (*(uint32_t*)(*(uint32_t*)var_4_1 - 4) - 1));
00575ef6                  PStringBase<unsigned short>::operator=(&arg3, PStringBaseIter_Common<char>::GetSubString(&var_10, &__return));
00575eff                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00575eff                  
00575f09                  if (var_c_2 >= 1)
00575f11                      int32_t var_c_4 = (var_c_2 - 1);
00575f09                  else
00575f0b                      int32_t var_c_3 = 0;
00575f0b                  
00575f19                  int32_t ecx_25 = PStringBaseIter<char>::Truncate(&var_10);
00575f1e                  class PSRefBufferCharData<char>* m_charbuffer_2 = PStringBase<char>::whitespace_string.m_charbuffer;
00575f24                  int32_t var_34_14 = ecx_25;
00575f2f                  InterlockedIncrement(((char*)m_charbuffer_2 - 0x10));
00575f39                  PStringBase<char>::trim(&arg3, 1, 1, m_charbuffer_2);
00575ea2              }
00575ea2              
00575f47              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_18, arg3);
00575f55              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_1c, arg2);
00575f64              CM_Allegiance::Event_AllegianceChatBoot(&var_1c, &var_18);
00575f69              int32_t* edi_14 = var_1c;
00575f69              
00575f7c              if ((InterlockedDecrement(&edi_14[1]) == 0 && edi_14 != 0))
00575f84                  **(uint32_t**)edi_14(1);
00575f84              
00575f86              class AC1Legacy::PStringBase<char> edi_15 = var_18;
00575f86              
00575f96              if ((InterlockedDecrement((edi_15 + 4)) == 0 && edi_15 != 0))
00575f9e                  **(uint32_t**)edi_15(1);
00575f9e              
00575fa4              void* edi_17 = &arg3[-5];
00575fa4              
00575fb3              if ((InterlockedDecrement(((char*)edi_17 + 4)) == 0 && edi_17 != 0))
00575fbb                  **(uint32_t**)edi_17(1);
00575fbb              
00575fc1              int32_t* edi_19 = (arg2 - 0x14);
00575fc8              var_10 = 0x794478;
00575fc8              
00575fd8              if ((InterlockedDecrement(&edi_19[1]) == 0 && edi_19 != 0))
00575fe0                  **(uint32_t**)edi_19(1);
00575fe0              
00575fe6              edi_5 = &m_charbuffer_4->m_data[0xffffffec];
00575fe6              
00575ff1              if (InterlockedDecrement(((char*)edi_5 + 4)) == 0)
00575ff1              {
00575ff7                  cond:2_1 = edi_5 == 0;
00575ff9                  goto label_575d74;
00575ff1              }
00575e26          }
00575d4c      }
00575d4c      else
00575d4c      {
00575d4e          eax_6 = CPlayerSystem::GetPlayerSystem();
00575d53          var_34_4 = 1;
00575d58      label_575d58:
00575d58          PlayerModule::SetHearAllegianceChat(&eax_6->playerModule.vtable, var_34_4);
00575d61          edi_5 = &m_charbuffer_4->m_data[0xffffffec];
00575d61          
00575d6c          if (InterlockedDecrement(((char*)edi_5 + 4)) == 0)
00575d6c          {
00575d72              cond:2_1 = edi_5 == 0;
00575d74          label_575d74:
00575d74              
00575d74              if (!(cond:2_1))
00575d74              {
00575d80                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
00575d82                  int32_t eax_9;
00575d82                  eax_9 = 1;
00575d8b                  return 1;
00575d74              }
00575d6c          }
00575d4c      }
005761c4      int32_t eax_8;
005761c4      eax_8 = 1;
005761cd      return 1;
00575cb0  }

005761e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005761f0  uint8_t __stdcall ClientCommunicationSystem::DoAllegianceBroadcast(class ClientCommunicationSystem* this @ ecx, int32_t arg2, char** arg3)

005761f0  {
00576201      JoinArgs(&arg3, arg2, arg3);
00576206      char** edi = arg3;
00576206      
00576213      if (edi[-1] == 1)
00576213      {
0057628c          if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
00576294              *(uint32_t*)edi[-5](1);
00576294          
00576297          int32_t eax_8;
00576297          eax_8 = 0;
0057629a          return 0;
00576213      }
00576213      
0057621c      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, edi);
00576236      int32_t ebx;
00576236      ebx = CM_Communication::Event_ChannelBroadcast(0x2000000, &arg3);
00576238      char** eax_2 = arg3;
00576238      
0057624d      if ((InterlockedDecrement(&eax_2[1]) == 0 && eax_2 != 0))
00576255          **(uint32_t**)eax_2(1);
00576255      
00576266      if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
0057626e          *(uint32_t*)edi[-5](1);
0057626e      
00576271      int32_t eax_6;
00576271      eax_6 = ebx;
00576276      return eax_6;
005761f0  }

0057629d                                                                                         90 90 90                               ...

005762a0  uint8_t __fastcall ClientCommunicationSystem::DoAllegianceBan(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005762a0  {
005762ad      char*** var_1c = &arg3;
005762b2      int32_t* var_20 = &arg2;
005762b7      void* var_4;
005762b7      int32_t* var_24 = &var_4;
005762bd      class PStringBase<char>* __return;
005762bd      int32_t* edx;
005762bd      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return, edx, this)->m_charbuffer;
005762bf      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
005762ca      InterlockedIncrement(&m_charbuffer[-1]);
005762da      int32_t* edi_1 = ((char*)var_4 - 0x14);
005762da      
005762e9      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
005762f1          **(uint32_t**)edi_1(1);
005762f1      
005762fc      PStringBase<char>::PStringBase<char>(&var_4, "list");
0057630c      int32_t eax_4 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
00576317      char ebx_1 = ((int8_t)-(eax_4));
0057631b      int32_t* edi_3 = ((char*)var_4 - 0x14);
00576324      int32_t eax_5;
00576324      int32_t edx_2;
00576324      eax_5 = InterlockedDecrement(&edi_3[1]);
00576324      
0057632c      if ((eax_5 == 0 && edi_3 != 0))
00576334          edx_2 = **(uint32_t**)edi_3(1);
00576334      
00576338      if ((ebx_1 - ebx_1) == 0xff)
00576338      {
00576346          char** __return_1 = arg3;
0057634a          char** ecx_5 = arg2;
0057634e          char** __return_2 = __return_1;
0057634f          char** var_20_2 = ecx_5;
00576354          char*** var_24_1 = &arg3;
00576355          JoinArgsAsName(__return_1, edx_2, ecx_5);
0057635a          char** ebx_2 = arg3;
0057635a          
00576367          if (ebx_2[-1] == 1)
00576367          {
00576376              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Please specify an actual name.");
0057638d              ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
00576396              void* edi_5 = &arg3[-5];
00576396              
005763a5              if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
005763ad                  **(uint32_t**)edi_5(1);
005763ad              
005763be              if ((InterlockedDecrement(&ebx_2[-4]) == 0 && ebx_2 != 0x14))
005763c6                  *(uint32_t*)ebx_2[-5](1);
005763c6              
005763cc              void* __offset(PSRefBufferCharData<char>, -0x14) edi_8 = &m_charbuffer_1->m_data[0xffffffec];
005763cc              
005763db              if ((InterlockedDecrement(((char*)edi_8 + 4)) == 0 && edi_8 != 0))
005763e3                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_8) + -0x14)(1);
005763e3              
005763e8              int32_t eax_13;
005763e8              eax_13 = 1;
005763ee              return 1;
00576367          }
00576367          
005763fa          PStringBase<char>::PStringBase<char>(&arg2, &data_7da0d8);
0057640a          int32_t eax_14 = PStringBase<char>::cmp(&m_charbuffer_1, &arg2, 0);
00576415          ebx_1 = ((int8_t)-(eax_14));
00576419          int32_t* edi_10 = (arg2 - 0x14);
00576419          
0057642a          if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
00576432              **(uint32_t**)edi_10(1);
00576432          
00576436          if ((ebx_1 - ebx_1) == 0xff)
00576436          {
005764ba              PStringBase<char>::PStringBase<char>(&arg2, "remove");
005764ca              int32_t eax_22 = PStringBase<char>::cmp(&m_charbuffer_1, &arg2, 0);
005764d5              char ebx_5 = ((int8_t)-(eax_22));
005764d9              int32_t* edi_16 = (arg2 - 0x14);
005764d9              
005764ea              if ((InterlockedDecrement(&edi_16[1]) == 0 && edi_16 != 0))
005764f2                  **(uint32_t**)edi_16(1);
005764f2              
005764f6              if ((ebx_5 - ebx_5) == 0xff)
005764f6              {
00576540                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00576549                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00576551                  int32_t eax_26;
00576551                  eax_26 = 0;
00576557                  return 0;
005764f6              }
005764f6              
00576501              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, arg3);
0057650b              uint8_t result = CM_Allegiance::Event_RemoveAllegianceBan(&arg2);
00576519              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
00576522              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057652b              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00576539              return result;
00576436          }
00576436          
00576438          char** ebp_1 = arg3;
00576441          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, ebp_1);
0057644b          char eax_16 = CM_Allegiance::Event_AddAllegianceBan(&arg3);
00576450          char** edi_11 = arg3;
0057645b          ebx_1 = eax_16;
0057645b          
00576465          if ((InterlockedDecrement(&edi_11[1]) == 0 && edi_11 != 0))
0057646d              **(uint32_t**)edi_11(1);
0057646d          
0057647e          if ((InterlockedDecrement(&ebp_1[-4]) == 0 && ebp_1 != 0x14))
00576486              *(uint32_t*)ebp_1[-5](1);
00576338      }
00576338      else
0057633f          ebx_1 = CM_Allegiance::Event_ListAllegianceBans();
0057633f      
0057648c      void* __offset(PSRefBufferCharData<char>, -0x14) edi_14 = &m_charbuffer_1->m_data[0xffffffec];
0057648c      
0057649b      if ((InterlockedDecrement(((char*)edi_14 + 4)) == 0 && edi_14 != 0))
005764a3          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_14) + -0x14)(1);
005764a3      
005764a8      int32_t eax_21;
005764a8      eax_21 = ebx_1;
005764ae      return eax_21;
005762a0  }

0057655a                                                                                90 90 90 90 90 90                            ......

00576560  uint8_t __thiscall ClientCommunicationSystem::DoAllegianceInfo(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00576560  {
00576560      char** __return = arg3;
00576569      char** ecx = arg2;
0057656d      char** __saved_ebp = __return;
0057656e      char** var_14 = ecx;
00576573      char*** var_18 = &arg3;
00576574      int32_t edx;
00576574      JoinArgsAsName(__return, edx, ecx);
00576579      char** edi = arg3;
00576586      char*** ecx_1 = &arg3;
00576586      
0057658a      if (edi[-1] == 1)
0057658a      {
00576591          PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_1, u"Please specify an actual name.");
005765a8          ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
005765b7          void* esi_2 = &arg3[-5];
005765b7          
005765c6          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005765ce              **(uint32_t**)esi_2(1);
005765ce          
005765df          if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
005765e7              *(uint32_t*)edi[-5](1);
005765e7          
005765eb          int32_t eax_4;
005765eb          eax_4 = 1;
005765ee          return 1;
0057658a      }
0057658a      
005765f3      AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_1, edi);
00576608      int32_t ebx;
00576608      ebx = CM_Allegiance::Event_AllegianceInfoRequest(&arg3);
0057660a      char** eax_6 = arg3;
0057660a      
0057661f      if ((InterlockedDecrement(&eax_6[1]) == 0 && eax_6 != 0))
00576627          **(uint32_t**)eax_6(1);
00576627      
00576639      if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
00576641          *(uint32_t*)edi[-5](1);
00576641      
00576645      int32_t eax_10;
00576645      eax_10 = ebx;
00576648      return eax_10;
00576560  }

0057664b                                   90 90 90 90 90                                                             .....

00576650  uint8_t __thiscall ClientCommunicationSystem::DoAllegianceOfficer(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00576650  {
00576653      int32_t __return = arg2;
00576653      
0057665d      if (__return == 0)
00576667          return CM_Allegiance::Event_ListAllegianceOfficers();
00576667      
00576672      char*** var_24 = &arg3;
00576677      int32_t* var_28 = &arg2;
0057667c      void* var_4;
0057667c      int32_t* var_2c = &var_4;
00576682      int32_t* edx;
00576682      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return, edx, this)->m_charbuffer;
0057668b      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0057668f      InterlockedIncrement(&m_charbuffer[-1]);
0057669f      int32_t* edi_1 = ((char*)var_4 - 0x14);
0057669f      
005766ae      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
005766b6          **(uint32_t**)edi_1(1);
005766b6      
005766c1      void* var_c;
005766c1      PStringBase<char>::PStringBase<char>(&var_c, "list");
005766d1      int32_t eax_4 = PStringBase<char>::cmp(&m_charbuffer_1, &var_c, 0);
005766dc      char ebx_1 = ((int8_t)-(eax_4));
005766e0      int32_t* edi_3 = ((char*)var_c - 0x14);
005766e0      
005766f1      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
005766f9          **(uint32_t**)edi_3(1);
005766f9      
005766fd      uint8_t eax_6;
005766fd      
005766fd      if ((ebx_1 - ebx_1) == 0xff)
005766fd      {
00576734          PStringBase<char>::PStringBase<char>(&var_c, "clear");
00576744          int32_t eax_9 = PStringBase<char>::cmp(&m_charbuffer_1, &var_c, 0);
0057674f          ebx_1 = ((int8_t)-(eax_9));
00576753          void* edi_6 = ((char*)var_c - 0x14);
00576753          
00576764          if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
0057676c              **(uint32_t**)edi_6(1);
0057676c          
00576770          if ((ebx_1 - ebx_1) == 0xff)
00576770          {
00576782              PStringBase<char>::PStringBase<char>(&var_c, "remove");
00576792              int32_t eax_11 = PStringBase<char>::cmp(&m_charbuffer_1, &var_c, 0);
0057679d              char ebx_4 = ((int8_t)-(eax_11));
005767a1              void* edi_8 = ((char*)var_c - 0x14);
005767aa              int32_t eax_12;
005767aa              int32_t edx_5;
005767aa              eax_12 = InterlockedDecrement(((char*)edi_8 + 4));
005767aa              
005767b2              if ((eax_12 == 0 && edi_8 != 0))
005767ba                  edx_5 = **(uint32_t**)edi_8(1);
005767ba              
005767be              void** ecx_20;
005767be              
005767be              if ((ebx_4 - ebx_4) == 0xff)
005767be              {
0057687a                  PStringBase<char>::PStringBase<char>(&var_4, &data_7da1f0);
0057688a                  int32_t eax_18 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057688a                  
00576891                  if (eax_18 != 0)
00576891                  {
0057689c                      PStringBase<char>::PStringBase<char>(&var_c, &data_7da0d8);
005768ac                      int32_t eax_19 = PStringBase<char>::cmp(&m_charbuffer_1, &var_c, 0);
005768b3                      ebx_4 = ((int8_t)-(eax_19));
005768bb                      ebx_4 = ((ebx_4 - ebx_4) + 1);
005768bd                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
00576891                  }
00576891                  
005768c4                  if ((eax_18 == 0 || ebx_4 != 0))
005768c6                      ebx_4 = 1;
005768c6                  
005768cc                  class PStringBase<char>* __return_2;
005768cc                  char*** ecx_31;
005768cc                  int32_t* edx_7;
005768cc                  __return_2 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
005768cc                  
005768d3                  if (ebx_4 == 0)
005768d3                  {
005769fa                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00576a02                      int32_t eax_24;
00576a02                      eax_24 = 0;
00576a08                      return 0;
005768d3                  }
005768d3                  
005768e8                  NextArg(__return_2, edx_7, ecx_31);
005768f6                  int32_t __return_3 = strtol(var_c, 0, 0, &var_c, &arg2, &arg3);
005768f6                  
0057690c                  if ((__return_3 <= 0 || __return_3 > 3))
0057690c                  {
005769c6                      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please specify a valid officer l…");
005769df                      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
005769e8                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
005769ed                      ecx_20 = &var_c;
0057690c                  }
0057690c                  else
0057690c                  {
00576912                      char** ecx_32 = arg3;
00576916                      int32_t edx_8 = arg2;
0057691a                      char** var_24_11 = ecx_32;
0057691b                      int32_t var_28_8 = edx_8;
00576920                      int32_t* var_2c_3 = &arg2;
00576921                      JoinArgsAsName(__return_3, edx_8, ecx_32);
00576926                      int32_t eax_21 = arg2;
00576933                      class AC1Legacy::PStringBase<char>* ecx_34 = &arg3;
00576933                      
00576937                      if (*(uint32_t*)(eax_21 - 4) != 1)
00576937                      {
00576978                          AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_34, eax_21);
00576983                          char eax_22 = CM_Allegiance::Event_SetAllegianceOfficer(&arg3, __return_3);
00576991                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
0057699a                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
005769a3                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
005769ac                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
005769ba                          return eax_22;
00576937                      }
00576937                      
0057693e                      PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_34, u"Please specify the name of an al…");
00576957                      ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
00576960                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00576969                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057696e                      ecx_20 = &var_c;
0057690c                  }
005767be              }
005767be              else
005767be              {
005767c4                  char** __return_1 = arg3;
005767c8                  char** ecx_15 = arg2;
005767cc                  char** __return_4 = __return_1;
005767cd                  char** var_28_4 = ecx_15;
005767d2                  int32_t* var_2c_1 = &arg2;
005767d3                  JoinArgsAsName(__return_1, edx_5, ecx_15);
005767d8                  int32_t eax_13 = arg2;
005767e5                  class AC1Legacy::PStringBase<char>* ecx_17 = &arg3;
005767e5                  
005767e9                  if (*(uint32_t*)(eax_13 - 4) != 1)
005767e9                  {
00576836                      AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_17, eax_13);
00576840                      uint8_t eax_16 = CM_Allegiance::Event_RemoveAllegianceOfficer(&arg3);
0057684e                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
00576857                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00576860                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
0057686e                      return eax_16;
005767e9                  }
005767e9                  
005767f0                  PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_17, u"Please specify the name of an al…");
00576809                  ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
00576812                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00576817                  ecx_20 = &arg2;
005767be              }
005767be              
0057681b              PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_20);
00576824              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
0057682c              int32_t eax_15;
0057682c              eax_15 = 1;
00576832              return 1;
00576770          }
00576770          
00576772          eax_6 = CM_Allegiance::Event_ClearAllegianceOfficers();
005766fd      }
005766fd      else
005766ff          eax_6 = CM_Allegiance::Event_ListAllegianceOfficers();
005766ff      
00576715      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0057671d          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0057671d      
00576722      int32_t eax_8;
00576722      eax_8 = eax_6;
00576728      return eax_8;
00576650  }

00576a0b                                   90 90 90 90 90                                                             .....

00576a10  uint8_t __thiscall ClientCommunicationSystem::DoAllegianceOfficerTitle(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00576a10  {
00576a13      int32_t __return = arg2;
00576a13      
00576a1d      if (__return == 0)
00576a27          return CM_Allegiance::Event_ListAllegianceOfficerTitles();
00576a27      
00576a32      char*** var_20 = &arg3;
00576a37      int32_t* var_24 = &arg2;
00576a3c      void* var_8;
00576a3c      int32_t* var_28 = &var_8;
00576a42      int32_t* edx;
00576a42      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return, edx, this)->m_charbuffer;
00576a4b      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
00576a4f      InterlockedIncrement(&m_charbuffer[-1]);
00576a5f      int32_t* edi_1 = ((char*)var_8 - 0x14);
00576a5f      
00576a6e      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00576a76          **(uint32_t**)edi_1(1);
00576a76      
00576a81      PStringBase<char>::PStringBase<char>(&var_8, "list");
00576a91      int32_t eax_4 = PStringBase<char>::cmp(&m_charbuffer_1, &var_8, 0);
00576a9c      char ebx_1 = ((int8_t)-(eax_4));
00576aa0      int32_t* edi_3 = ((char*)var_8 - 0x14);
00576aa0      
00576ab1      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00576ab9          **(uint32_t**)edi_3(1);
00576ab9      
00576abd      uint8_t eax_6;
00576abd      
00576abd      if ((ebx_1 - ebx_1) == 0xff)
00576abd      {
00576af4          PStringBase<char>::PStringBase<char>(&var_8, "clear");
00576b04          int32_t eax_9 = PStringBase<char>::cmp(&m_charbuffer_1, &var_8, 0);
00576b0f          ebx_1 = ((int8_t)-(eax_9));
00576b13          void* edi_6 = ((char*)var_8 - 0x14);
00576b13          
00576b24          if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
00576b2c              **(uint32_t**)edi_6(1);
00576b2c          
00576b30          if ((ebx_1 - ebx_1) == 0xff)
00576b30          {
00576b42              PStringBase<char>::PStringBase<char>(&var_8, &data_7da1f0);
00576b52              int32_t eax_11 = PStringBase<char>::cmp(&m_charbuffer_1, &var_8, 0);
00576b5d              char ebx_4 = ((int8_t)-(eax_11));
00576b61              void* edi_8 = ((char*)var_8 - 0x14);
00576b6a              int32_t __return_1;
00576b6a              char*** ecx_14;
00576b6a              int32_t* edx_5;
00576b6a              __return_1 = InterlockedDecrement(((char*)edi_8 + 4));
00576b6a              
00576b72              if ((__return_1 == 0 && edi_8 != 0))
00576b7a                  __return_1 = **(uint32_t**)edi_8(1);
00576b7a              
00576b7e              if ((ebx_4 - ebx_4) == 0xff)
00576b7e              {
00576c6c                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00576c74                  int32_t eax_16;
00576c74                  eax_16 = 0;
00576c7a                  return 0;
00576b7e              }
00576b7e              
00576b93              NextArg(__return_1, edx_5, ecx_14);
00576ba1              int32_t __return_2 = strtol(var_8, 0, 0, &var_8, &arg2, &arg3);
00576ba1              
00576bb3              if ((__return_2 <= 0 || __return_2 > 3))
00576bb3              {
00576c23                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please specify a valid officer l…");
00576c3c                  ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00576c45                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00576c4e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00576c57                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00576c5f                  int32_t eax_15;
00576c5f                  eax_15 = 1;
00576c65                  return 1;
00576bb3              }
00576bb3              
00576bb5              char** ecx_16 = arg3;
00576bb9              int32_t edx_7 = arg2;
00576bbd              char** var_20_8 = ecx_16;
00576bbe              int32_t var_24_5 = edx_7;
00576bc3              char*** var_28_2 = &arg3;
00576bc4              JoinArgsAsName(__return_2, edx_7, ecx_16);
00576bd5              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, arg3);
00576be0              uint8_t result = CM_Allegiance::Event_SetAllegianceOfficerTitle(__return_2, &arg2);
00576bee              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
00576bf7              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00576c00              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
00576c09              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00576c17              return result;
00576b30          }
00576b30          
00576b32          eax_6 = CM_Allegiance::Event_ClearAllegianceOfficerTitles();
00576abd      }
00576abd      else
00576abf          eax_6 = CM_Allegiance::Event_ListAllegianceOfficerTitles();
00576abf      
00576ad5      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00576add          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00576add      
00576ae2      int32_t eax_8;
00576ae2      eax_8 = eax_6;
00576ae8      return eax_8;
00576a10  }

00576c7d                                                                                         90 90 90                               ...

00576c80  uint8_t __thiscall ClientCommunicationSystem::DoAllegianceName(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00576c80  {
00576c80      int32_t __return = arg2;
00576c80      
00576c8d      if (__return == 0)
00576c9b          return CM_Allegiance::Event_QueryAllegianceName();
00576c9b      
00576ca2      char*** var_1c = &arg3;
00576ca7      int32_t* var_20 = &arg2;
00576cac      void* var_4;
00576cac      int32_t* var_24 = &var_4;
00576cb2      int32_t* edx;
00576cb2      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return, edx, this)->m_charbuffer;
00576cba      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
00576cc5      InterlockedIncrement(&m_charbuffer[-1]);
00576cd1      int32_t* edi_1 = ((char*)var_4 - 0x14);
00576cd1      
00576ce0      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00576ce8          **(uint32_t**)edi_1(1);
00576ce8      
00576cf3      PStringBase<char>::PStringBase<char>(&var_4, &data_7da1f0);
00576d03      int32_t eax_5 = PStringBase<char>::cmp(&m_charbuffer_2, &var_4, 0);
00576d0e      char ebx_1 = ((int8_t)-(eax_5));
00576d12      int32_t* edi_3 = ((char*)var_4 - 0x14);
00576d12      
00576d23      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00576d2b          **(uint32_t**)edi_3(1);
00576d2b      
00576d2f      if ((ebx_1 - ebx_1) == 0xff)
00576d2f      {
00576dcc          PStringBase<char>::PStringBase<char>(&arg2, "clear");
00576ddc          int32_t eax_15 = PStringBase<char>::cmp(&m_charbuffer_2, &arg2, 0);
00576de7          ebx_1 = ((int8_t)-(eax_15));
00576deb          int32_t* edi_8 = (arg2 - 0x14);
00576deb          
00576dfc          if ((InterlockedDecrement(&edi_8[1]) == 0 && edi_8 != 0))
00576e04              **(uint32_t**)edi_8(1);
00576e04          
00576e08          if ((ebx_1 - ebx_1) == 0xff)
00576e08          {
00576e3e              void* __offset(PSRefBufferCharData<char>, -0x14) edi_12 = &m_charbuffer_2->m_data[0xffffffec];
00576e3e              
00576e4d              if ((InterlockedDecrement(((char*)edi_12 + 4)) == 0 && edi_12 != 0))
00576e55                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_12) + -0x14)(1);
00576e55              
00576e5a              int32_t eax_21;
00576e5a              eax_21 = 0;
00576e60              return 0;
00576e08          }
00576e08          
00576e0f          ebx_1 = CM_Allegiance::Event_ClearAllegianceName();
00576d2f      }
00576d2f      else
00576d2f      {
00576d44          JoinArgs(&arg2, arg2, arg3);
00576d49          class PSRefBufferCharData<char>* m_charbuffer_1 = PStringBase<char>::whitespace_string.m_charbuffer;
00576d5c          InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
00576d66          PStringBase<char>::trim(&arg2, 1, 1, m_charbuffer_1);
00576d74          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, arg2);
00576d83          ebx_1 = CM_Allegiance::Event_SetAllegianceName(&arg3);
00576d85          char** eax_10 = arg3;
00576d85          
00576d9a          if ((InterlockedDecrement(&eax_10[1]) == 0 && eax_10 != 0))
00576da2              **(uint32_t**)eax_10(1);
00576da2          
00576da8          int32_t* edi_6 = (arg2 - 0x14);
00576da8          
00576db7          if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
00576dbf              **(uint32_t**)edi_6(1);
00576d2f      }
00576d2f      
00576e15      void* __offset(PSRefBufferCharData<char>, -0x14) edi_10 = &m_charbuffer_2->m_data[0xffffffec];
00576e15      
00576e24      if ((InterlockedDecrement(((char*)edi_10 + 4)) == 0 && edi_10 != 0))
00576e2c          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_10) + -0x14)(1);
00576e2c      
00576e2e      int32_t eax_19;
00576e2e      eax_19 = ebx_1;
00576e37      return eax_19;
00576c80  }

00576e63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00576e70  uint8_t __thiscall ClientCommunicationSystem::DoAllegianceLock(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00576e70  {
00576e70      int32_t __return_1 = arg2;
00576e70      
00576e79      if (__return_1 == 0)
00576e88          return CM_Allegiance::Event_DoAllegianceLockAction(4);
00576e88      
00576e93      char*** var_1c = &arg3;
00576e98      int32_t* var_20 = &arg2;
00576e9d      void* var_4;
00576e9d      int32_t* var_24 = &var_4;
00576ea3      int32_t* edx;
00576ea3      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return_1, edx, this)->m_charbuffer;
00576eac      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
00576eb0      InterlockedIncrement(&m_charbuffer[-1]);
00576ec0      int32_t* edi_1 = ((char*)var_4 - 0x14);
00576ec0      
00576ecf      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
00576ed7          **(uint32_t**)edi_1(1);
00576ed7      
00576ee2      PStringBase<char>::PStringBase<char>(&var_4, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseData);
00576ef2      int32_t eax_4 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
00576efd      char ebx_1 = ((int8_t)-(eax_4));
00576f01      int32_t* edi_3 = ((char*)var_4 - 0x14);
00576f01      
00576f12      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00576f1a          **(uint32_t**)edi_3(1);
00576f1a      
00576f1e      uint32_t var_1c_4;
00576f1e      
00576f1e      if ((ebx_1 - ebx_1) == 0xff)
00576f1e      {
00576f5a          PStringBase<char>::PStringBase<char>(&var_4, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseProfile);
00576f6a          int32_t eax_9 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
00576f75          ebx_1 = ((int8_t)-(eax_9));
00576f79          void* edi_6 = ((char*)var_4 - 0x14);
00576f79          
00576f8a          if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
00576f92              **(uint32_t**)edi_6(1);
00576f92          
00576f96          if ((ebx_1 - ebx_1) == 0xff)
00576f96          {
00576fa5              PStringBase<char>::PStringBase<char>(&var_4, "toggle");
00576fb5              int32_t eax_11 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
00576fc0              char ebx_4 = ((int8_t)-(eax_11));
00576fc4              void* edi_8 = ((char*)var_4 - 0x14);
00576fc4              
00576fd5              if ((InterlockedDecrement(((char*)edi_8 + 4)) == 0 && edi_8 != 0))
00576fdd                  **(uint32_t**)edi_8(1);
00576fdd              
00576fe1              if ((ebx_4 - ebx_4) != 0xff)
00576fe1              {
00576fe5                  uint8_t eax_13 = CM_Allegiance::Event_DoAllegianceLockAction(3);
00576ff3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00577001                  return eax_13;
00576fe1              }
00576fe1              
0057700d              PStringBase<char>::PStringBase<char>(&var_4, "check");
0057701d              int32_t eax_15 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
00577024              char ebx_6 = ((int8_t)-(eax_15));
0057702e              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057702e              
00577035              if ((ebx_6 - ebx_6) != 0xff)
00577035              {
00577039                  uint8_t eax_16 = CM_Allegiance::Event_DoAllegianceLockAction(4);
00577047                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00577055                  return eax_16;
00577035              }
00577035              
00577061              PStringBase<char>::PStringBase<char>(&var_4, "bypass");
00577071              int32_t eax_18 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
00577078              char ebx_8 = ((int8_t)-(eax_18));
00577082              char** ecx_23 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
00577082              
00577089              if ((ebx_8 - ebx_8) == 0xff)
00577089              {
0057713e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00577146                  int32_t eax_25;
00577146                  eax_25 = 0;
0057714c                  return 0;
00577089              }
00577089              
0057708f              char** edx_6 = arg3;
00577093              class PStringBase<char>* __return = arg2;
00577097              char** var_1c_8 = edx_6;
00577098              class PStringBase<char>* __return_2 = __return;
0057709d              int32_t* var_24_1 = &arg2;
0057709e              JoinArgsAsName(__return, edx_6, ecx_23);
005770a3              int32_t esi = arg2;
005770a3              
005770b0              if (*(uint32_t*)(esi - 4) != 1)
005770b0              {
005770c9                  PStringBase<char>::PStringBase<char>(&arg3, "clear");
005770d4                  int32_t eax_21 = _stricmp(esi, arg3);
005770e3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
005770e3                  
005770ea                  if (eax_21 != 0)
005770ea                  {
005770ff                      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, esi);
00577115                      ebx_8 = CM_Allegiance::Event_SetAllegianceApprovedVassal(&arg3);
00577117                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
005770ea                  }
005770ea                  else
005770f6                      ebx_8 = CM_Allegiance::Event_DoAllegianceLockAction(6);
005770b0              }
005770b0              else
005770bc                  ebx_8 = CM_Allegiance::Event_DoAllegianceLockAction(5);
005770bc              
00577120              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00577129              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_charbuffer_1);
00577137              return ebx_8;
00576f96          }
00576f96          
00576f98          var_1c_4 = 2;
00576f1e      }
00576f1e      else
00576f20          var_1c_4 = 1;
00576f20      
00576f22      uint8_t eax_6 = CM_Allegiance::Event_DoAllegianceLockAction(var_1c_4);
00576f22      
00576f3b      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00576f43          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00576f43      
00576f48      int32_t eax_8;
00576f48      eax_8 = eax_6;
00576f4e      return eax_8;
00576e70  }

0057714f                                               90                                                                 .

00577150  uint8_t __thiscall ClientCommunicationSystem::DoMotd(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00577150  {
00577150      int32_t __return = arg2;
00577150      
00577159      if (__return == 0)
00577163          return CM_Allegiance::Event_QueryMotd();
00577163      
0057716e      char*** var_1c = &arg3;
00577173      int32_t* var_20 = &arg2;
00577178      void* var_8;
00577178      int32_t* var_24 = &var_8;
0057717e      int32_t* edx;
0057717e      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return, edx, this)->m_charbuffer;
00577187      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0057718b      InterlockedIncrement(&m_charbuffer[-1]);
0057719b      int32_t* edi_1 = ((char*)var_8 - 0x14);
0057719b      
005771aa      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
005771b2          **(uint32_t**)edi_1(1);
005771b2      
005771bd      PStringBase<char>::PStringBase<char>(&var_8, &data_7da1f0);
005771cd      int32_t eax_4 = PStringBase<char>::cmp(&m_charbuffer_1, &var_8, 0);
005771d8      char ebx_1 = ((int8_t)-(eax_4));
005771dc      int32_t* edi_3 = ((char*)var_8 - 0x14);
005771dc      
005771ed      if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
005771f5          **(uint32_t**)edi_3(1);
005771f5      
005771f9      if ((ebx_1 - ebx_1) != 0xff)
005771f9      {
0057720e          JoinArgs(&arg2, arg2, arg3);
00577213          int32_t ebx_2 = arg2;
0057721f          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, ebx_2);
00577229          uint8_t eax_7 = CM_Allegiance::Event_SetMotd(&arg3);
0057722e          char** edi_4 = arg3;
00577239          arg2 = eax_7;
00577239          
00577245          if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
0057724d              **(uint32_t**)edi_4(1);
0057724d          
0057725e          if ((InterlockedDecrement((ebx_2 - 0x10)) == 0 && ebx_2 != 0x14))
00577266              **(uint32_t**)(ebx_2 - 0x14)(1);
00577266          
00577277          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0057727f              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0057727f          
00577281          int32_t eax_12;
00577281          eax_12 = arg2;
0057728c          return eax_12;
005771f9      }
005771f9      
00577298      PStringBase<char>::PStringBase<char>(&arg2, "clear");
005772a8      int32_t eax_13 = PStringBase<char>::cmp(&m_charbuffer_1, &arg2, 0);
005772b3      char ebx_4 = ((int8_t)-(eax_13));
005772b7      int32_t* edi_8 = (arg2 - 0x14);
005772b7      
005772c8      if ((InterlockedDecrement(&edi_8[1]) == 0 && edi_8 != 0))
005772d0          **(uint32_t**)edi_8(1);
005772d0      
005772d4      if ((ebx_4 - ebx_4) == 0xff)
005772d4      {
00577311          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00577319              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00577319          
0057731e          int32_t eax_19;
0057731e          eax_19 = 0;
00577324          return 0;
005772d4      }
005772d4      
005772d6      char eax_15 = CM_Allegiance::Event_ClearMotd();
005772d6      
005772ec      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005772f4          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005772f4      
005772f9      int32_t eax_17;
005772f9      eax_17 = eax_15;
005772ff      return eax_17;
00577150  }

00577327                       90 90 90 90 90 90 90 90 90                                                         .........

00577330  uint8_t __stdcall ClientCommunicationSystem::HelpMotd(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577330  {
0057733b      char* var_8;
0057733b      
0057733b      if (arg2 != Summary_HelpType)
00577344          var_8 = "@allegiance motd - Displays the …";
0057733b      else
0057733d          var_8 = "@allegiance motd - Displays or s…";
0057733d      
00577349      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057734e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00577352      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00577352      
00577358      if (eax != 1)
00577358      {
00577361          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00577366          ecx_1 = arg2;
00577358      }
00577358      
0057737d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00577385          **(uint32_t**)(ecx_1 - 0x14)(1);
00577385      
00577387      int32_t eax_3;
00577387      eax_3 = 1;
0057738a      return 1;
00577330  }

0057738d                                         90 90 90                                                               ...

00577390  uint8_t __thiscall ClientCommunicationSystem::HelpSpeaker(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577390  {
00577390      class ClientCommunicationSystem* this_1 = this;
0057739a      PStringBase<char>::PStringBase<char>(&this_1, "@speaker - No longer used, see @…");
0057739f      class ClientCommunicationSystem* this_2 = this_1;
005773a3      int32_t vtable = this_2->vtable;
005773a3      
005773a9      if (vtable != 1)
005773a9      {
005773b2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
005773b7          this_2 = this_1;
005773a9      }
005773a9      
005773cf      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
005773d7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
005773d7      
005773d9      int32_t eax_2;
005773d9      eax_2 = 1;
005773dd      return 1;
00577390  }


005773e0  uint8_t __thiscall ClientCommunicationSystem::HelpChannelsGroup(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

005773e0  {
005773e9      if (arg2 != Summary_HelpType)
005773e9      {
00577447          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, &*U"fvpca"[4], arg4);
00577456          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, &*U"fvpca"[3], arg4);
00577465          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, U"mh,.", arg4);
00577474          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, &*U"fvpca"[2], arg4);
00577483          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, &*U"fvpca"[1], arg4);
00577492          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, U"fvpca", arg4);
005773e9      }
005773e9      else
005773e9      {
005773f4          PStringBase<char>::PStringBase<char>(&arg2, "@help channels - How to communic…");
005773f9          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
005773fd          int32_t eax = *(uint32_t*)(ecx_1 - 4);
005773fd          
00577403          if (eax != 1)
00577403          {
0057740c              PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00577411              ecx_1 = arg2;
00577403          }
00577403          
00577428          if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00577428          {
00577430              **(uint32_t**)(ecx_1 - 0x14)(1);
00577432              int32_t eax_4;
00577432              eax_4 = 1;
00577435              return 1;
00577428          }
005773e9      }
005773e9      
00577498      int32_t eax_3;
00577498      eax_3 = 1;
0057749b      return 1;
005773e0  }

0057749e                                                                                            90 90                                ..

005774a0  uint8_t __thiscall ClientCommunicationSystem::DoChannelCommand(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005774a0  {
005774a1      int32_t ebx = arg2;
005774a1      
005774a7      if (ebx <= 0)
005774a7      {
005774a9          int32_t eax;
005774a9          eax = 0;
005774ac          return 0;
005774a7      }
005774a7      
005774c6      int32_t* var_14_1 = &arg2;
005774c7      uint32_t eax_2 = ChannelSystem::GetChannelID(AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, this->m_strCurrentCommand.m_charbuffer));
005774d4      int32_t eax_3 = arg2;
005774d4      
005774e9      if ((InterlockedDecrement((eax_3 + 4)) == 0 && eax_3 != 0))
005774f1          **(uint32_t**)eax_3(1);
005774f1      
005774fd      if ((eax_2 == 0 || eax_2 == 0x400))
005774fd      {
00577571          int32_t eax_5;
00577571          eax_5 = 0;
00577574          return 0;
005774fd      }
005774fd      
0057750a      JoinArgs(&arg3, ebx, arg3);
0057750f      char** edi_1 = arg3;
0057751b      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, edi_1);
0057752b      ebx = CM_Communication::Event_ChannelBroadcast(eax_2, &arg2);
0057752d      int32_t eax_8 = arg2;
0057752d      
00577542      if ((InterlockedDecrement((eax_8 + 4)) == 0 && eax_8 != 0))
0057754a          **(uint32_t**)eax_8(1);
0057754a      
0057755b      if ((InterlockedDecrement(&edi_1[-4]) == 0 && edi_1 != 0x14))
00577563          *(uint32_t*)edi_1[-5](1);
00577563      
00577568      int32_t eax_12;
00577568      eax_12 = ebx;
0057756b      return eax_12;
005774a0  }

00577577                                                                       90 90 90 90 90 90 90 90 90                         .........

00577580  uint8_t __thiscall ClientCommunicationSystem::HelpJoinChat(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577580  {
00577580      class ClientCommunicationSystem* this_1 = this;
0057758a      PStringBase<char>::PStringBase<char>(&this_1, "@join <channel tag> - Allows you…");
0057758f      class ClientCommunicationSystem* this_2 = this_1;
00577593      int32_t vtable = this_2->vtable;
00577593      
00577599      if (vtable != 1)
00577599      {
005775a2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
005775a7          this_2 = this_1;
00577599      }
00577599      
005775bf      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
005775c7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
005775c7      
005775c9      int32_t eax_2;
005775c9      eax_2 = 1;
005775cd      return 1;
00577580  }


005775d0  uint8_t __thiscall ClientCommunicationSystem::HelpLeaveChat(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

005775d0  {
005775d0      class ClientCommunicationSystem* this_1 = this;
005775da      PStringBase<char>::PStringBase<char>(&this_1, "@leave <channel tag> - Prevents …");
005775df      class ClientCommunicationSystem* this_2 = this_1;
005775e3      int32_t vtable = this_2->vtable;
005775e3      
005775e9      if (vtable != 1)
005775e9      {
005775f2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
005775f7          this_2 = this_1;
005775e9      }
005775e9      
0057760f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00577617          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00577617      
00577619      int32_t eax_2;
00577619      eax_2 = 1;
0057761d      return 1;
005775d0  }


00577620  uint8_t __thiscall ClientCommunicationSystem::HelpTurbineChat_Allegiance(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577620  {
00577620      class ClientCommunicationSystem* this_1 = this;
0057762a      PStringBase<char>::PStringBase<char>(&this_1, "@a - Sends a message to your All…");
0057762f      class ClientCommunicationSystem* this_2 = this_1;
00577633      int32_t vtable = this_2->vtable;
00577633      
00577639      if (vtable != 1)
00577639      {
00577642          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00577647          this_2 = this_1;
00577639      }
00577639      
0057765f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00577667          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00577667      
00577669      int32_t eax_2;
00577669      eax_2 = 1;
0057766d      return 1;
00577620  }


00577670  uint8_t __thiscall ClientCommunicationSystem::HelpTurbineChat_General(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577670  {
00577670      class ClientCommunicationSystem* this_1 = this;
0057767a      PStringBase<char>::PStringBase<char>(&this_1, "@general - Sends a message to th…");
0057767f      class ClientCommunicationSystem* this_2 = this_1;
00577683      int32_t vtable = this_2->vtable;
00577683      
00577689      if (vtable != 1)
00577689      {
00577692          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00577697          this_2 = this_1;
00577689      }
00577689      
005776af      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
005776b7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
005776b7      
005776b9      int32_t eax_2;
005776b9      eax_2 = 1;
005776bd      return 1;
00577670  }


005776c0  uint8_t __thiscall ClientCommunicationSystem::HelpTurbineChat_Trade(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

005776c0  {
005776c0      class ClientCommunicationSystem* this_1 = this;
005776ca      PStringBase<char>::PStringBase<char>(&this_1, "@trade - Sends a message to the …");
005776cf      class ClientCommunicationSystem* this_2 = this_1;
005776d3      int32_t vtable = this_2->vtable;
005776d3      
005776d9      if (vtable != 1)
005776d9      {
005776e2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
005776e7          this_2 = this_1;
005776d9      }
005776d9      
005776ff      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00577707          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00577707      
00577709      int32_t eax_2;
00577709      eax_2 = 1;
0057770d      return 1;
005776c0  }


00577710  uint8_t __thiscall ClientCommunicationSystem::HelpTurbineChat_LFG(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577710  {
00577710      class ClientCommunicationSystem* this_1 = this;
0057771a      PStringBase<char>::PStringBase<char>(&this_1, "@lfg - Sends a message to the gl…");
0057771f      class ClientCommunicationSystem* this_2 = this_1;
00577723      int32_t vtable = this_2->vtable;
00577723      
00577729      if (vtable != 1)
00577729      {
00577732          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00577737          this_2 = this_1;
00577729      }
00577729      
0057774f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00577757          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00577757      
00577759      int32_t eax_2;
00577759      eax_2 = 1;
0057775d      return 1;
00577710  }


00577760  uint8_t __thiscall ClientCommunicationSystem::HelpTurbineChat_Roleplay(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577760  {
00577760      class ClientCommunicationSystem* this_1 = this;
0057776a      PStringBase<char>::PStringBase<char>(&this_1, "@roleplay - Sends a message to t…");
0057776f      class ClientCommunicationSystem* this_2 = this_1;
00577773      int32_t vtable = this_2->vtable;
00577773      
00577779      if (vtable != 1)
00577779      {
00577782          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00577787          this_2 = this_1;
00577779      }
00577779      
0057779f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
005777a7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
005777a7      
005777a9      int32_t eax_2;
005777a9      eax_2 = 1;
005777ad      return 1;
00577760  }


005777b0  uint8_t __thiscall ClientCommunicationSystem::HelpTurbineChat_Olthoi(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

005777b0  {
005777b0      class ClientCommunicationSystem* this_1 = this;
005777ba      PStringBase<char>::PStringBase<char>(&this_1, "@olthoi - If you are an Olthoi, …");
005777bf      class ClientCommunicationSystem* this_2 = this_1;
005777c3      int32_t vtable = this_2->vtable;
005777c3      
005777c9      if (vtable != 1)
005777c9      {
005777d2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
005777d7          this_2 = this_1;
005777c9      }
005777c9      
005777ef      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
005777f7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
005777f7      
005777f9      int32_t eax_2;
005777f9      eax_2 = 1;
005777fd      return 1;
005777b0  }


00577800  uint8_t __thiscall ClientCommunicationSystem::HelpTurbineChat_Society(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577800  {
00577800      class ClientCommunicationSystem* this_1 = this;
0057780a      PStringBase<char>::PStringBase<char>(&this_1, "@society - Sends a message to th…");
0057780f      class ClientCommunicationSystem* this_2 = this_1;
00577813      int32_t vtable = this_2->vtable;
00577813      
00577819      if (vtable != 1)
00577819      {
00577822          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00577827          this_2 = this_1;
00577819      }
00577819      
0057783f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00577847          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00577847      
00577849      int32_t eax_2;
00577849      eax_2 = 1;
0057784d      return 1;
00577800  }


00577850  uint8_t __stdcall ClientCommunicationSystem::HelpChatToggle(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577850  {
0057785b      char* var_8;
0057785b      
0057785b      if (arg2 != Summary_HelpType)
00577864          var_8 = "@chat <on/off> - Sets whether or…";
0057785b      else
0057785d          var_8 = "@chat - Sets whether or not you …";
0057785d      
00577869      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057786e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00577872      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00577872      
00577878      if (eax != 1)
00577878      {
00577881          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00577886          ecx_1 = arg2;
00577878      }
00577878      
0057789d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
005778a5          **(uint32_t**)(ecx_1 - 0x14)(1);
005778a5      
005778a7      int32_t eax_3;
005778a7      eax_3 = 1;
005778aa      return 1;
00577850  }

005778ad                                         90 90 90                                                               ...

005778b0  uint8_t __stdcall ClientCommunicationSystem::HelpNoTell(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

005778b0  {
005778bb      char* var_8;
005778bb      
005778bb      if (arg2 != Summary_HelpType)
005778c4          var_8 = "@notell <on/off> - Sets whether …";
005778bb      else
005778bd          var_8 = "@notell - Sets whether or not yo…";
005778bd      
005778c9      PStringBase<char>::PStringBase<char>(&arg2, var_8);
005778ce      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
005778d2      int32_t eax = *(uint32_t*)(ecx_1 - 4);
005778d2      
005778d8      if (eax != 1)
005778d8      {
005778e1          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
005778e6          ecx_1 = arg2;
005778d8      }
005778d8      
005778fd      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00577905          **(uint32_t**)(ecx_1 - 0x14)(1);
00577905      
00577907      int32_t eax_3;
00577907      eax_3 = 1;
0057790a      return 1;
005778b0  }

0057790d                                         90 90 90                                                               ...

00577910  uint8_t __thiscall ClientCommunicationSystem::DoReply(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00577910  {
00577923      JoinArgs(&arg3, arg2, arg3);
00577928      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::whitespace_string.m_charbuffer;
0057793b      InterlockedIncrement(((char*)m_charbuffer - 0x10));
00577949      PStringBase<char>::trim(&arg3, 1, 1, m_charbuffer);
00577956      void* var_c_4;
00577956      void* esi_4;
00577956      
00577956      if (arg3[-1] != 1)
00577956      {
005779b4          int32_t* ecx_6 = &arg2;
005779b8          int32_t* esi_6;
005779b8          
005779b8          if (gmCCommunicationSystem::GetLastTeller() != 0)
005779b8          {
005779e9              AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_6, arg3);
005779f9              CM_Communication::Event_TalkDirect(&arg2, gmCCommunicationSystem::GetLastTeller());
005779fe              esi_6 = arg2;
005779b8          }
005779b8          else
005779b8          {
005779bf              PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_6, u"Someone must @tell you first!");
005779d6              ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
005779df              esi_6 = (arg2 - 0x14);
005779b8          }
005779b8          
00577a17          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00577a1f              **(uint32_t**)esi_6(1);
00577a1f          
00577a25          esi_4 = &arg3[-5];
00577a2b          var_c_4 = ((char*)esi_4 + 4);
00577956      }
00577956      else
00577956      {
00577961          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"You must specify the text you wi…");
00577978          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00577987          int32_t* esi_2 = (arg2 - 0x14);
00577987          
00577996          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057799e              **(uint32_t**)esi_2(1);
0057799e          
005779a4          esi_4 = &arg3[-5];
005779aa          var_c_4 = ((char*)esi_4 + 4);
00577956      }
00577956      
00577a34      if ((InterlockedDecrement(var_c_4) == 0 && esi_4 != 0))
00577a3c          **(uint32_t**)esi_4(1);
00577a3c      
00577a3f      int32_t eax_10;
00577a3f      eax_10 = 1;
00577a42      return 1;
00577910  }

00577a45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00577a50  uint8_t __stdcall ClientCommunicationSystem::HelpReply(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577a50  {
00577a59      enum ClientCommunicationSystem::HelpType* ecx = &arg2;
00577a5d      char const* const var_10_9;
00577a5d      class PStringBase<char>* ebx;
00577a5d      
00577a5d      if (arg2 != Summary_HelpType)
00577a5d      {
00577afa          PStringBase<char>::PStringBase<char>(ecx, "@reply <text> - Sends the text t…");
00577aff          enum ClientCommunicationSystem::HelpType ecx_8 = arg2;
00577b03          int32_t eax_7 = *(uint32_t*)(ecx_8 - 4);
00577b09          ebx = arg4;
00577b09          
00577b0d          if (eax_7 != 1)
00577b0d          {
00577b14              PStringBase<char>::append_n_chars(ebx, ecx_8, (eax_7 - 1));
00577b19              ecx_8 = arg2;
00577b0d          }
00577b0d          
00577b32          if ((InterlockedDecrement((ecx_8 - 0x10)) == 0 && ecx_8 != 0x14))
00577b3a              **(uint32_t**)(ecx_8 - 0x14)(1);
00577b3a          
00577b45          PStringBase<char>::PStringBase<char>(&arg4, "@pr <text> - Sends the text to t…");
00577b4a          char* eax_11 = arg4;
00577b4e          int32_t ecx_12 = *(uint32_t*)(eax_11 - 4);
00577b4e          
00577b54          if (ecx_12 != 1)
00577b54          {
00577b5b              PStringBase<char>::append_n_chars(ebx, eax_11, (ecx_12 - 1));
00577b60              eax_11 = arg4;
00577b54          }
00577b54          
00577b73          if ((InterlockedDecrement(&eax_11[0xfffffff0]) == 0 && eax_11 != 0x14))
00577b7b              **(uint32_t**)(eax_11 - 0x14)(1);
00577b7b          
00577b7d          var_10_9 = "@mr <text> - Sends the text to t…";
00577a5d      }
00577a5d      else
00577a5d      {
00577a68          PStringBase<char>::PStringBase<char>(ecx, "@reply - Sends some text to the …");
00577a6d          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00577a71          int32_t eax = *(uint32_t*)(ecx_1 - 4);
00577a77          ebx = arg4;
00577a77          
00577a7b          if (eax != 1)
00577a7b          {
00577a82              PStringBase<char>::append_n_chars(ebx, ecx_1, (eax - 1));
00577a87              ecx_1 = arg2;
00577a7b          }
00577a7b          
00577aa0          if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00577aa8              **(uint32_t**)(ecx_1 - 0x14)(1);
00577aa8          
00577ab3          PStringBase<char>::PStringBase<char>(&arg4, "@pr - Sends some text to the las…");
00577ab8          class PStringBase<char>* eax_4 = arg4;
00577abc          int32_t m_charbuffer = eax_4->m_charbuffer;
00577abc          
00577ac2          if (m_charbuffer != 1)
00577ac2          {
00577ac9              PStringBase<char>::append_n_chars(ebx, eax_4, (m_charbuffer - 1));
00577ace              eax_4 = arg4;
00577ac2          }
00577ac2          
00577ae1          if ((InterlockedDecrement(&eax_4[-4]) == 0 && eax_4 != 0x14))
00577ae9              *(uint32_t*)*(int32_t*)((char*)eax_4 + -0x14)(1);
00577ae9          
00577aeb          var_10_9 = "@mr - Sends some text to the las…";
00577a5d      }
00577a5d      
00577b86      PStringBase<char>::PStringBase<char>(&arg4, var_10_9);
00577b8b      char* eax_14 = arg4;
00577b8f      int32_t ecx_17 = *(uint32_t*)(eax_14 - 4);
00577b8f      
00577b95      if (ecx_17 != 1)
00577b95      {
00577b9c          PStringBase<char>::append_n_chars(ebx, eax_14, (ecx_17 - 1));
00577ba1          eax_14 = arg4;
00577b95      }
00577b95      
00577bb4      if ((InterlockedDecrement(&eax_14[0xfffffff0]) == 0 && eax_14 != 0x14))
00577bbc          **(uint32_t**)(eax_14 - 0x14)(1);
00577bbc      
00577bc0      int32_t eax_16;
00577bc0      eax_16 = 1;
00577bc3      return 1;
00577a50  }

00577bc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00577bd0  uint8_t __thiscall ClientCommunicationSystem::DoReTell(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00577bd0  {
00577be8      JoinArgs(&arg3, arg2, arg3);
00577bed      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::whitespace_string.m_charbuffer;
00577c00      InterlockedIncrement(((char*)m_charbuffer - 0x10));
00577c0e      PStringBase<char>::trim(&arg3, 1, 1, m_charbuffer);
00577c13      char** eax = arg3;
00577c1b      int32_t eax_2;
00577c1b      void* esi;
00577c1b      
00577c1b      if (eax[-1] != 1)
00577c1b      {
00577c43          uint8_t eax_4 = PStringBase<char>::operator==(gmCCommunicationSystem::GetLastTelleeName(&arg2), &PStringBase<char>::null_string);
00577c52          int32_t* esi_2 = (arg2 - 0x14);
00577c59          int32_t ebx;
00577c59          ebx = eax_4;
00577c59          
00577c63          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00577c6b              **(uint32_t**)esi_2(1);
00577c6b          
00577c6f          void* var_1c_6;
00577c6f          
00577c6f          if (ebx == 0)
00577c6f          {
00577cd7              class AC1Legacy::PStringBase<char> var_8;
00577cd7              void* __return;
00577cd7              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, gmCCommunicationSystem::GetLastTelleeName(&__return)->m_charbuffer);
00577ce5              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, arg3);
00577cf4              CM_Communication::Event_TalkDirectByName(&arg2, &var_8);
00577cf9              int32_t esi_6 = arg2;
00577cf9              
00577d0c              if ((InterlockedDecrement((esi_6 + 4)) == 0 && esi_6 != 0))
00577d14                  **(uint32_t**)esi_6(1);
00577d14              
00577d16              class AC1Legacy::PStringBase<char> esi_7 = var_8;
00577d16              
00577d26              if ((InterlockedDecrement((esi_7 + 4)) == 0 && esi_7 != 0))
00577d2e                  **(uint32_t**)esi_7(1);
00577d2e              
00577d34              int32_t* esi_9 = ((char*)__return - 0x14);
00577d34              
00577d43              if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
00577d4b                  **(uint32_t**)esi_9(1);
00577d4b              
00577d51              esi = &arg3[-5];
00577d57              var_1c_6 = ((char*)esi + 4);
00577c6f          }
00577c6f          else
00577c6f          {
00577c7a              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"You must first provide a name us…");
00577c91              ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00577c9a              int32_t* esi_4 = (arg2 - 0x14);
00577c9a              
00577ca9              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00577cb1                  **(uint32_t**)esi_4(1);
00577cb1              
00577cb7              esi = &arg3[-5];
00577cbd              var_1c_6 = ((char*)esi + 4);
00577c6f          }
00577c6f          
00577d58          eax_2 = InterlockedDecrement(var_1c_6);
00577c1b      }
00577c1b      else
00577c1b      {
00577c1d          esi = &eax[-5];
00577c24          eax_2 = InterlockedDecrement(((char*)esi + 4));
00577c1b      }
00577c1b      
00577d60      if ((eax_2 == 0 && esi != 0))
00577d68          **(uint32_t**)esi(1);
00577d68      
00577d6d      eax_2 = 1;
00577d73      return 1;
00577bd0  }

00577d76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00577d80  uint8_t __stdcall ClientCommunicationSystem::HelpReTell(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577d80  {
00577d8b      char* var_8;
00577d8b      
00577d8b      if (arg2 != Summary_HelpType)
00577d94          var_8 = "@retell <text> - Sends the text …";
00577d8b      else
00577d8d          var_8 = "@retell - Sends some text to the…";
00577d8d      
00577d99      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00577d9e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00577da2      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00577da2      
00577da8      if (eax != 1)
00577da8      {
00577db1          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00577db6          ecx_1 = arg2;
00577da8      }
00577da8      
00577dcd      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00577dd5          **(uint32_t**)(ecx_1 - 0x14)(1);
00577dd5      
00577dd7      int32_t eax_3;
00577dd7      eax_3 = 1;
00577dda      return 1;
00577d80  }

00577ddd                                                                                         90 90 90                               ...

00577de0  uint8_t __stdcall ClientCommunicationSystem::HelpSay(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00577de0  {
00577deb      char* var_8;
00577deb      
00577deb      if (arg2 != Summary_HelpType)
00577df4          var_8 = "@say <text> - Says the text to t…";
00577deb      else
00577ded          var_8 = "@say - Says some text to everyon…";
00577ded      
00577df9      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00577dfe      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00577e02      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00577e02      
00577e08      if (eax != 1)
00577e08      {
00577e11          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00577e16          ecx_1 = arg2;
00577e08      }
00577e08      
00577e2d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00577e35          **(uint32_t**)(ecx_1 - 0x14)(1);
00577e35      
00577e37      int32_t eax_3;
00577e37      eax_3 = 1;
00577e3a      return 1;
00577de0  }

00577e3d                                                                                         90 90 90                               ...

00577e40  uint8_t __thiscall ClientCommunicationSystem::DoTell(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00577e40  {
00577e40      char** __return_1 = arg3;
00577e47      int32_t ebx;
00577e47      int32_t var_c = ebx;
00577e48      int32_t ebp;
00577e48      int32_t var_10 = ebp;
00577e4a      class PStringBase<char> __return_addr_4;
00577e4a      class PStringBase<char> __return_addr_3 = __return_addr_4;
00577e4d      char** ecx = arg2;
00577e58      int32_t edx;
00577e58      JoinArgsAsName(__return_1, edx, ecx);
00577e5d      char** ebp_1 = arg3;
00577e61      int32_t var_28 = 0x2c;
00577e64      int32_t eax = strchr(ebp_1, 0x2c, &arg3, ecx, __return_1);
00577e6f      void* eax_1;
00577e6f      
00577e6f      if (eax != 0)
00577e71          eax_1 = (eax - ebp_1);
00577e71      
00577e78      int32_t eax_5;
00577e78      int32_t* esp_1;
00577e78      void* esi_4;
00577e78      
00577e78      if ((eax != 0 && eax_1 >= 1))
00577e78      {
00577ed4          int32_t var_20_2 = 0;
00577edf          void __return;
00577edf          PStringBase<char>::substring(&arg3, &__return, 0, ((char*)eax_1 - 1));
00577ee4          int32_t var_1c_7 = 0xffffffff;
00577efc          int32_t var_1c_8 = PStringBase<char>::substring(&arg3, &arg2, ((char*)eax_1 + 1), 0xffffffff);
00577efd          class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::whitespace_string.m_charbuffer;
00577f0d          InterlockedIncrement(((char*)m_charbuffer - 0x10), m_charbuffer);
00577f0f          int32_t var_1c_10 = 1;
00577f11          int32_t var_20_5 = 1;
00577f17          PStringBase<char>::trim(&arg3, 1, 1, __return_addr_3);
00577f1c          void* const __return_addr_1 = __return_addr;
00577f20          __return_addr_3 = &arg3;
00577f23          __return_addr_3 = __return_addr_1;
00577f29          InterlockedIncrement(((char*)__return_addr_1 - 0x10), __return_addr_3);
00577f2b          class PStringBase<char> esi;
00577f2b          gmCCommunicationSystem::SetLastTelleeName(esi);
00577f38          AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_addr, __return_addr_1);
00577f46          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg_10, arg_c);
00577f4f          class AC1Legacy::PStringBase<char>* var_14_3 = &__return_addr;
00577f54          __return_addr_3 = &arg_10;
00577f55          CM_Communication::Event_TalkDirectByName(__return_addr_3, var_14_3);
00577f5a          int32_t* eax_8 = arg_10;
00577f5a          
00577f75          if ((InterlockedDecrement(&eax_8[1]) == 0 && eax_8 != 0))
00577f7d              **(uint32_t**)eax_8(1);
00577f7d          
00577f7f          void* const __return_addr_2 = __return_addr;
00577f7f          
00577f8f          if ((InterlockedDecrement(((char*)__return_addr_2 + 4)) == 0 && __return_addr_2 != 0))
00577f97              **(uint32_t**)__return_addr_2(1);
00577f97          
00577fac          if ((InterlockedDecrement(&arg_c[0xfffffff0]) == 0 && arg_c != 0x14))
00577fb4              **(uint32_t**)(arg_c - 0x14)(1);
00577fb4          
00577fc5          if ((InterlockedDecrement(((char*)__return_addr_1 - 0x10)) == 0 && __return_addr_1 != 0x14))
00577fcd              **(uint32_t**)((char*)__return_addr_1 - 0x14)(1);
00577fcd          
00577fcf          esi_4 = &ebp_1[-5];
00577fd6          eax_5 = InterlockedDecrement(((char*)esi_4 + 4));
00577fd6          esp_1 = &var_10;
00577e78      }
00577e78      else
00577e78      {
00577e7a          wchar16 const* const var_1c_1 = u"Use comma after the name for tar…";
00577e83          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Use comma after the name for tar…");
00577e8f          int32_t var_20_1 = 1;
00577e91          int32_t var_24_1 = 0x1a;
00577e9a          ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
00577ea9          void* esi_3 = &arg3[-5];
00577ea9          
00577eb8          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00577eb8          {
00577ebc              int32_t var_1c_4 = 1;
00577ec0              **(uint32_t**)esi_3(1);
00577eb8          }
00577eb8          
00577ec2          esi_4 = &ebp_1[-5];
00577ec9          eax_5 = InterlockedDecrement(((char*)esi_4 + 4));
00577ec9          esp_1 = &__return_addr_3;
00577e78      }
00577e78      
00577fde      if ((eax_5 == 0 && esi_4 != 0))
00577fde      {
00577fe0          int32_t edx_8 = *(uint32_t*)esi_4;
00577fe4          *(uint32_t*)((char*)esp_1 - 4) = 1;
00577fe6          *(uint32_t*)edx_8();
00577fde      }
00577fde      
00577fe8      *(uint32_t*)esp_1;
00577fe8      esp_1[1];
00577fe8      esp_1[2];
00577feb      eax_5 = 1;
00577fe8      esp_1[3];
00577ff1      return 1;
00577e40  }

00577ff4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00578000  uint8_t __stdcall ClientCommunicationSystem::HelpTell(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578000  {
0057800b      char* var_8;
0057800b      
0057800b      if (arg2 != Summary_HelpType)
00578014          var_8 = "@tell <name>, <text>  - Sends a …";
0057800b      else
0057800d          var_8 = "@tell - Sends a private message …";
0057800d      
00578019      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057801e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578022      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578022      
00578028      if (eax != 1)
00578028      {
00578031          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578036          ecx_1 = arg2;
00578028      }
00578028      
0057804d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578055          **(uint32_t**)(ecx_1 - 0x14)(1);
00578055      
00578057      int32_t eax_3;
00578057      eax_3 = 1;
0057805a      return 1;
00578000  }

0057805d                                                                                         90 90 90                               ...

00578060  uint8_t __stdcall ClientCommunicationSystem::HelpAFK(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578060  {
00578066      int32_t esi;
00578066      int32_t var_4 = esi;
00578067      enum ClientCommunicationSystem::HelpType* ecx = &arg2;
0057806b      int32_t eax_3;
0057806b      char** esp_1;
0057806b      int32_t* esi_1;
0057806b      char* var_8;
0057806b      
0057806b      if (arg2 != Summary_HelpType)
0057806b      {
005780a5          char* ebx;
005780a5          var_8 = ebx;
005780a6          int32_t edi;
005780a6          int32_t var_c_2 = edi;
005780ac          PStringBase<char>::PStringBase<char>(ecx, "@afk - Turns on AFK (away-from-k…");
005780b1          enum ClientCommunicationSystem::HelpType ecx_3 = arg2;
005780b5          int32_t eax_4 = *(uint32_t*)(ecx_3 - 4);
005780bf          char* var_14;
005780bf          
005780bf          if (eax_4 != 1)
005780bf          {
005780c3              var_14 = ecx_3;
005780c6              PStringBase<char>::append_n_chars(arg4, var_14, (eax_4 - 1));
005780cb              ecx_3 = arg2;
005780bf          }
005780bf          
005780e4          if ((InterlockedDecrement((ecx_3 - 0x10)) == 0 && ecx_3 != 0x14))
005780e4          {
005780e6              int32_t edx_1 = *(uint32_t*)(ecx_3 - 0x14);
005780e8              var_14 = 1;
005780ec              *(uint32_t*)edx_1(var_14);
005780e4          }
005780e4          
005780ee          var_14 = "@afk on - Turns on AFK mode. Whe…";
005780f7          PStringBase<char>::PStringBase<char>(&arg3, var_14);
005780fc          char const* eax_8 = arg3;
00578100          int32_t ecx_7 = *(uint32_t*)(eax_8 - 4);
00578100          
00578106          if (ecx_7 != 1)
00578106          {
00578109              var_14 = (ecx_7 - 1);
0057810d              PStringBase<char>::append_n_chars(arg4, eax_8, var_14);
00578112              eax_8 = arg3;
00578106          }
00578106          
0057811c          var_14 = &eax_8[0xfffffff0];
0057811c          
00578125          if ((InterlockedDecrement(var_14) == 0 && eax_8 != 0x14))
00578125          {
00578129              int32_t var_18_2 = 1;
0057812d              **(uint32_t**)(eax_8 - 0x14)(1);
00578125          }
00578125          
0057812f          char const* const var_18_3 = "@afk off - Turn off AFK mode.\n";
00578138          PStringBase<char>::PStringBase<char>(&arg2, "@afk off - Turn off AFK mode.\n");
0057813d          char* eax_11 = arg2;
00578141          int32_t ecx_12 = *(uint32_t*)(eax_11 - 4);
00578141          
00578147          if (ecx_12 != 1)
00578147          {
0057814e              PStringBase<char>::append_n_chars(arg4, eax_11, (ecx_12 - 1));
00578153              eax_11 = arg2;
00578147          }
00578147          
00578166          if ((InterlockedDecrement(&eax_11[0xfffffff0]) == 0 && eax_11 != 0x14))
00578166          {
0057816a              int32_t var_1c_2 = 1;
0057816e              **(uint32_t**)(eax_11 - 0x14)(1);
00578166          }
00578166          
00578170          char const* const var_1c_3 = "@afk msg <message> - Set the mes…";
00578179          PStringBase<char>::PStringBase<char>(&__return_addr, "@afk msg <message> - Set the mes…");
0057817e          void* const __return_addr_1 = __return_addr;
00578182          int32_t ecx_17 = *(uint32_t*)((char*)__return_addr_1 - 4);
00578182          
00578188          if (ecx_17 != 1)
00578188          {
0057818f              PStringBase<char>::append_n_chars(arg4, __return_addr_1, (ecx_17 - 1));
00578194              __return_addr_1 = __return_addr;
00578188          }
00578188          
00578198          esi_1 = ((char*)__return_addr_1 - 0x14);
0057819f          eax_3 = InterlockedDecrement(&esi_1[1]);
005781a2          esp_1 = &var_14;
0057806b      }
0057806b      else
0057806b      {
0057806d          var_8 = "@afk - Set your away-from-keyboa…";
00578072          PStringBase<char>::PStringBase<char>(ecx, var_8);
00578077          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057807b          int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057807b          
00578081          if (eax != 1)
00578081          {
00578084              var_8 = (eax - 1);
0057808a              PStringBase<char>::append_n_chars(arg4, ecx_1, var_8);
0057808f              ecx_1 = arg2;
00578081          }
00578081          
00578093          esi_1 = (ecx_1 - 0x14);
00578099          var_8 = &esi_1[1];
00578099          esp_1 = &var_8;
0057809a          eax_3 = InterlockedDecrement(var_8);
0057806b      }
0057806b      
005781a9      if ((eax_3 == 0 && esi_1 != 0))
005781a9      {
005781ab          int32_t edx_4 = *(uint32_t*)esi_1;
005781af          *(uint32_t*)((char*)esp_1 - 4) = 1;
005781b1          *(uint32_t*)edx_4();
005781a9      }
005781a9      
005781b3      eax_3 = 1;
005781b5      *(uint32_t*)esp_1;
005781b6      return 1;
00578060  }

005781b9                                                                             90 90 90 90 90 90 90                           .......

005781c0  uint8_t __stdcall ClientCommunicationSystem::HelpConsent(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

005781c0  {
005781cb      char* var_8;
005781cb      
005781cb      if (arg2 != Summary_HelpType)
005781d4          var_8 = "The @consent commands allow you …";
005781cb      else
005781cd          var_8 = "@consent - Commands to help you …";
005781cd      
005781d9      PStringBase<char>::PStringBase<char>(&arg2, var_8);
005781de      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
005781e2      int32_t eax = *(uint32_t*)(ecx_1 - 4);
005781e2      
005781e8      if (eax != 1)
005781e8      {
005781f1          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
005781f6          ecx_1 = arg2;
005781e8      }
005781e8      
0057820d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578215          **(uint32_t**)(ecx_1 - 0x14)(1);
00578215      
00578217      int32_t eax_3;
00578217      eax_3 = 1;
0057821a      return 1;
005781c0  }

0057821d                                                                                         90 90 90                               ...

00578220  uint8_t __fastcall ClientCommunicationSystem::DoCorpse(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00578220  {
00578223      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00578223      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00578224      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
00578224      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
0057822b      struct Turbine_GUID* var_5c;
0057822b      int32_t* var_74 = &var_5c;
00578232      struct Turbine_GUID* var_78 = &PlayerDesc_ClassType;
0057823a      var_5c = nullptr;
00578245      class TResult __return_1;
00578245      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return_1, var_78, var_74);
0057824a      struct Turbine_GUID* ecx_1 = var_5c;
00578253      var_78 = ecx_1;
00578255      int32_t var_74_1 = 0;
00578258      struct Turbine_GUID* eax_1 = var_78;
0057825e      int32_t var_50 = 0;
00578262      int32_t var_4c = 0;
00578262      
00578266      if (eax_1 != 0)
0057826c          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0057826c      
00578278      struct Turbine_GUID** esp = &var_78;
0057827f      void var_54;
0057827f      int32_t edi = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_50, &var_54);
0057827f      
00578281      if (ecx_1 != 0)
00578287          *(uint32_t*)(ecx_1->m_data1 + 0x14)();
00578287      
0057828a      class TResult __return_2 = __return_1;
0057828a      
00578290      if (__return_2 != 0)
00578290      {
00578294          if (edi >= 0)
00578294          {
005782ab              var_50 = 0x796910;
005782b3              uint32_t var_4c_1 = 0;
005782b7              int32_t var_48 = 0x3f800000;
005782bf              int32_t var_44 = 0;
005782c7              int32_t var_40 = 0;
005782cf              int32_t var_3c = 0;
005782d7              int32_t var_14 = 0;
005782df              int32_t var_10 = 0;
005782e7              int32_t var_c = 0;
005782ef              Frame::cache(&var_48);
005782f4              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005782ff              PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00578307              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00578324              int32_t* __return;
00578324              
00578324              if (CBaseQualities::InqPosition((__return_1 + 0x38), 0xe, &var_50) == 0)
005783a6                  PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_2, "We're sorry, but we have no reco…");
00578324              else
00578324              {
00578326                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0057832b                  AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00578333                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0057834c                  AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, LandDefs::CellidToCoordinateString(&__return, var_4c_1));
00578351                  int32_t* __return_4 = __return;
00578351                  
00578361                  if ((InterlockedDecrement(&__return_4[1]) == 0 && __return_4 != 0))
00578369                      **(uint32_t**)__return_4(1);
00578369                  
0057836b                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00578372                  char (* var_7c_8)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data;
0057837d                  PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, "The last time you died outside, …");
0057837d                  
00578391                  if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
00578393                      AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
00578324              }
00578324              
005783c7              ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &__return, 0), 0, 1, this->m_idCurrentCommandSource);
005783d0              void* esi_3 = &__return[-5];
005783d0              
005783df              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
005783e7                  **(uint32_t**)esi_3(1);
005783e7              
005783ed              void* __offset(PSRefBufferCharData<char>, -0x14) esi_5 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
005783ed              
005783fc              if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
00578404                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00578404              
00578406              class TResult __return_3 = __return_1;
0057840a              var_50 = 0x79285c;
00578414              *(uint32_t*)(*(uint32_t*)__return_3 + 0x14)();
0057841a              int32_t eax_18;
0057841a              eax_18 = 1;
00578420              return 1;
00578294          }
00578294          
00578298          *(uint32_t*)(*(uint32_t*)__return_2 + 0x14)();
00578298          struct Turbine_GUID* __saved_edi;
00578298          esp = &__saved_edi;
00578290      }
00578290      
0057829b      class TResult eax_2;
0057829b      eax_2.m_val = 0;
0057829d      *(uint32_t*)esp;
0057829d      esp[1];
0057829d      esp[2];
0057829d      esp[3];
005782a4      return 0;
00578220  }

00578423           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00578430  uint8_t __stdcall ClientCommunicationSystem::HelpCorpse(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578430  {
00578430      enum ClientCommunicationSystem::HelpType eax_4 = arg2;
0057843c      char const* const var_8;
0057843c      
0057843c      if ((eax_4 == Summary_HelpType || eax_4 == List_HelpType))
00578445          var_8 = "@corpse - Displays the location …";
0057843c      else
0057843e          var_8 = "@corpse - Displays the location …";
0057843e      
0057844e      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00578453      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578457      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578457      
0057845d      if (eax != 1)
0057845d      {
00578466          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057846b          ecx_1 = arg2;
0057845d      }
0057845d      
00578482      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
0057848a          **(uint32_t**)(ecx_1 - 0x14)(1);
0057848a      
0057848c      int32_t eax_3;
0057848c      eax_3 = 1;
0057848f      return 1;
00578430  }

00578492                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005784a0  uint8_t __stdcall ClientCommunicationSystem::HelpDie(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

005784a0  {
005784ab      char* var_8;
005784ab      
005784ab      if (arg2 != Summary_HelpType)
005784b4          var_8 = "@die - If you wish to kill your …";
005784ab      else
005784ad          var_8 = "@die - Kills your character and …";
005784ad      
005784b9      PStringBase<char>::PStringBase<char>(&arg2, var_8);
005784be      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
005784c2      int32_t eax = *(uint32_t*)(ecx_1 - 4);
005784c2      
005784c8      if (eax != 1)
005784c8      {
005784d1          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
005784d6          ecx_1 = arg2;
005784c8      }
005784c8      
005784ed      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
005784f5          **(uint32_t**)(ecx_1 - 0x14)(1);
005784f5      
005784f7      int32_t eax_3;
005784f7      eax_3 = 1;
005784fa      return 1;
005784a0  }

005784fd                                                                                         90 90 90                               ...

00578500  uint8_t __thiscall ClientCommunicationSystem::HelpLifestone(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578500  {
00578500      class ClientCommunicationSystem* this_1 = this;
0057850a      PStringBase<char>::PStringBase<char>(&this_1, "@lifestone - Returns you to the …");
0057850f      class ClientCommunicationSystem* this_2 = this_1;
00578513      int32_t vtable = this_2->vtable;
00578513      
00578519      if (vtable != 1)
00578519      {
00578522          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00578527          this_2 = this_1;
00578519      }
00578519      
0057853f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00578547          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00578547      
00578549      int32_t eax_2;
00578549      eax_2 = 1;
0057854d      return 1;
00578500  }


00578550  uint8_t __thiscall ClientCommunicationSystem::HelpMarketplace(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578550  {
00578550      class ClientCommunicationSystem* this_1 = this;
0057855a      PStringBase<char>::PStringBase<char>(&this_1, "@marketplace - Teleports you to …");
0057855f      class ClientCommunicationSystem* this_2 = this_1;
00578563      int32_t vtable = this_2->vtable;
00578563      
00578569      if (vtable != 1)
00578569      {
00578572          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00578577          this_2 = this_1;
00578569      }
00578569      
0057858f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00578597          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00578597      
00578599      int32_t eax_2;
00578599      eax_2 = 1;
0057859d      return 1;
00578550  }


005785a0  uint8_t __fastcall ClientCommunicationSystem::DoPermit(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005785a0  {
005785ad      char*** var_24 = &arg3;
005785b2      int32_t* var_28 = &arg2;
005785b7      void* var_c;
005785b7      int32_t* var_2c = &var_c;
005785b8      class PStringBase<char>* __return;
005785b8      int32_t* edx;
005785b8      NextArg(__return, edx, this);
005785c9      void* var_4;
005785c9      PStringBase<char>::PStringBase<char>(&var_4, &data_7da0d8);
005785d2      void* edi = var_c;
005785de      int32_t eax_1 = _stricmp(edi, var_4);
005785eb      char var_d_2;
005785eb      int32_t eax_3;
005785eb      
005785eb      if (eax_1 != 0)
005785eb      {
005785f6          void* var_8;
005785f6          PStringBase<char>::PStringBase<char>(&var_8, "remove");
00578601          int32_t eax_2 = _stricmp(edi, var_8);
00578611          int32_t* edi_2 = ((char*)var_8 - 0x14);
00578611          
00578620          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00578628              **(uint32_t**)edi_2(1);
00578628          
0057862a          eax_3 = eax_2 != 0;
00578630          var_d_2 = 1;
005785eb      }
005785eb      
00578635      if ((eax_1 == 0 || eax_3 == 0))
00578637          var_d_2 = 0;
00578637      
00578640      int32_t* edi_4 = ((char*)var_4 - 0x14);
00578647      int32_t eax_5;
00578647      int32_t edx_2;
00578647      eax_5 = InterlockedDecrement(&edi_4[1]);
00578647      
0057864f      if ((eax_5 == 0 && edi_4 != 0))
00578657          eax_5 = **(uint32_t**)edi_4(1);
00578657      
00578659      eax_5 = var_d_2;
00578659      
0057865f      if (eax_5 == 0)
0057865f      {
005786d4          char** __return_1 = arg3;
005786d8          char** ecx_11 = arg2;
005786dc          char** __return_2 = __return_1;
005786dd          char** var_28_3 = ecx_11;
005786e2          char*** var_2c_1 = &arg3;
005786e3          JoinArgsAsName(__return_1, edx_2, ecx_11);
005786f5          int32_t* ecx_13 = &arg2;
005786f5          
005786f9          if (arg3[-1] != 1)
005786f9          {
00578788              PStringBase<char>::PStringBase<char>(ecx_13, &data_7da0d8);
00578797              int32_t eax_18 = _stricmp(var_c, arg2);
005787a2              char ebx_2 = ((int8_t)-(eax_18));
005787a6              int32_t* edi_16 = (arg2 - 0x14);
005787a6              
005787b7              if ((InterlockedDecrement(&edi_16[1]) == 0 && edi_16 != 0))
005787bf                  **(uint32_t**)edi_16(1);
005787bf              
005787c1              char** ebp = arg3;
005787ca              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, ebp);
005787d1              void* var_24_17;
005787d1              void* edi_18;
005787d1              
005787d1              if ((ebx_2 - ebx_2) == 0xff)
005787d1              {
0057880a                  char eax_24 = CM_Character::Event_RemovePlayerPermission(&arg3);
0057880f                  char** edi_19 = arg3;
0057881a                  ebx_2 = eax_24;
0057881a                  
00578824                  if ((InterlockedDecrement(&edi_19[1]) == 0 && edi_19 != 0))
0057882c                      **(uint32_t**)edi_19(1);
0057882c                  
0057882e                  edi_18 = &ebp[-5];
00578834                  var_24_17 = ((char*)edi_18 + 4);
005787d1              }
005787d1              else
005787d1              {
005787d8                  uint8_t eax_21 = CM_Character::Event_AddPlayerPermission(&arg3);
005787dd                  char** edi_17 = arg3;
005787e8                  ebx_2 = eax_21;
005787e8                  
005787f2                  if ((InterlockedDecrement(&edi_17[1]) == 0 && edi_17 != 0))
005787fa                      **(uint32_t**)edi_17(1);
005787fa                  
005787fc                  edi_18 = &ebp[-5];
00578802                  var_24_17 = ((char*)edi_18 + 4);
005787d1              }
005787d1              
0057883d              if ((InterlockedDecrement(var_24_17) == 0 && edi_18 != 0))
00578845                  **(uint32_t**)edi_18(1);
00578845              
0057884b              void* edi_21 = ((char*)var_c - 0x14);
0057884b              
0057885a              if ((InterlockedDecrement(((char*)edi_21 + 4)) == 0 && edi_21 != 0))
00578862                  **(uint32_t**)edi_21(1);
00578862              
00578867              int32_t eax_29;
00578867              eax_29 = ebx_2;
0057886d              return eax_29;
005786f9          }
005786f9          
00578704          PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_13, u"Please specify a person for the …");
0057871b          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00578724          int32_t* edi_10 = (arg2 - 0x14);
00578724          
00578733          if ((InterlockedDecrement(&edi_10[1]) == 0 && edi_10 != 0))
0057873b              **(uint32_t**)edi_10(1);
0057873b          
00578741          void* edi_12 = &arg3[-5];
00578741          
00578750          if ((InterlockedDecrement(((char*)edi_12 + 4)) == 0 && edi_12 != 0))
00578758              **(uint32_t**)edi_12(1);
00578758          
0057875e          void* edi_14 = ((char*)var_c - 0x14);
0057875e          
0057876d          if ((InterlockedDecrement(((char*)edi_14 + 4)) == 0 && edi_14 != 0))
00578775              **(uint32_t**)edi_14(1);
0057865f      }
0057865f      else
0057865f      {
0057866a          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Please specify a valid permit co…");
00578681          ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
0057868a          void* edi_6 = &arg3[-5];
0057868a          
00578699          if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
005786a1              **(uint32_t**)edi_6(1);
005786a1          
005786a7          int32_t* edi_8 = ((char*)var_c - 0x14);
005786a7          
005786ba          if ((InterlockedDecrement(&edi_8[1]) == 0 && edi_8 != 0))
005786ba          {
005786c6              **(uint32_t**)edi_8(1);
005786cb              int32_t eax_10;
005786cb              eax_10 = 1;
005786d1              return 1;
005786ba          }
0057865f      }
0057865f      
0057877a      int32_t eax_9;
0057877a      eax_9 = 1;
00578780      return 1;
005785a0  }


00578870  uint8_t __stdcall ClientCommunicationSystem::HelpPermit(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578870  {
0057887b      char* var_8;
0057887b      
0057887b      if (arg2 != Summary_HelpType)
00578884          var_8 = "The @permit command gives or rev…";
0057887b      else
0057887d          var_8 = "@permit - Commands to give or re…";
0057887d      
00578889      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057888e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578892      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578892      
00578898      if (eax != 1)
00578898      {
005788a1          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
005788a6          ecx_1 = arg2;
00578898      }
00578898      
005788bd      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
005788c5          **(uint32_t**)(ecx_1 - 0x14)(1);
005788c5      
005788c7      int32_t eax_3;
005788c7      eax_3 = 1;
005788ca      return 1;
00578870  }

005788cd                                         90 90 90                                                               ...

005788d0  uint8_t __thiscall ClientCommunicationSystem::DoPKArena(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005788d0  {
005788d9      if (arg2 == 0)
005788d9      {
00578927          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0057892e          uint32_t player_id;
0057892e          
0057892e          if (SmartBox::smartbox_1 == 0)
00578938              player_id = 0;
0057892e          else
00578930              player_id = SmartBox::smartbox_1->player_id;
00578930          
0057893b          class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(player_id);
0057893b          
00578945          if ((eax_4 != 0 && eax_4->vtable->IsPK() == 0))
00578945          {
0057895e              ClientCommunicationSystem::HandleFailureEvent(this, 0x55f, &PStringBase<unsigned short>::null_string);
00578963              int32_t eax_6;
00578963              eax_6 = 1;
00578966              return 1;
00578945          }
00578945          
00578969          CM_Character::Event_TeleToPKArena();
005788d9      }
005788d9      else
005788d9      {
005788e4          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please see @help pkarena for mor…");
005788fb          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00578904          int32_t* esi_2 = (arg2 - 0x14);
00578904          
00578917          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00578917          {
0057891f              **(uint32_t**)esi_2(1);
00578921              int32_t eax_3;
00578921              eax_3 = 1;
00578924              return 1;
00578917          }
005788d9      }
005788d9      
0057896e      int32_t eax_1;
0057896e      eax_1 = 1;
00578971      return 1;
005788d0  }

00578974                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00578980  uint8_t __thiscall ClientCommunicationSystem::HelpPKArena(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578980  {
00578980      class ClientCommunicationSystem* this_1 = this;
0057898a      PStringBase<char>::PStringBase<char>(&this_1, "@pkarena - Teleports you to the …");
0057898f      class ClientCommunicationSystem* this_2 = this_1;
00578993      int32_t vtable = this_2->vtable;
00578993      
00578999      if (vtable != 1)
00578999      {
005789a2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
005789a7          this_2 = this_1;
00578999      }
00578999      
005789bf      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
005789c7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
005789c7      
005789c9      int32_t eax_2;
005789c9      eax_2 = 1;
005789cd      return 1;
00578980  }


005789d0  uint8_t __thiscall ClientCommunicationSystem::DoPKLArena(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005789d0  {
005789d9      if (arg2 == 0)
005789d9      {
00578a27          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00578a2e          uint32_t player_id;
00578a2e          
00578a2e          if (SmartBox::smartbox_1 == 0)
00578a38              player_id = 0;
00578a2e          else
00578a30              player_id = SmartBox::smartbox_1->player_id;
00578a30          
00578a3b          class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(player_id);
00578a3b          
00578a45          if ((eax_4 != 0 && eax_4->vtable->IsPKLite() == 0))
00578a45          {
00578a5e              ClientCommunicationSystem::HandleFailureEvent(this, 0x560, &PStringBase<unsigned short>::null_string);
00578a63              int32_t eax_6;
00578a63              eax_6 = 1;
00578a66              return 1;
00578a45          }
00578a45          
00578a69          CM_Character::Event_TeleToPKLArena();
005789d9      }
005789d9      else
005789d9      {
005789e4          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please see @help pklarena for mo…");
005789fb          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00578a04          int32_t* esi_2 = (arg2 - 0x14);
00578a04          
00578a17          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00578a17          {
00578a1f              **(uint32_t**)esi_2(1);
00578a21              int32_t eax_3;
00578a21              eax_3 = 1;
00578a24              return 1;
00578a17          }
005789d9      }
005789d9      
00578a6e      int32_t eax_1;
00578a6e      eax_1 = 1;
00578a71      return 1;
005789d0  }

00578a74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00578a80  uint8_t __thiscall ClientCommunicationSystem::HelpPKLArena(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578a80  {
00578a80      class ClientCommunicationSystem* this_1 = this;
00578a8a      PStringBase<char>::PStringBase<char>(&this_1, "@pklarena - Teleports you to the…");
00578a8f      class ClientCommunicationSystem* this_2 = this_1;
00578a93      int32_t vtable = this_2->vtable;
00578a93      
00578a99      if (vtable != 1)
00578a99      {
00578aa2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00578aa7          this_2 = this_1;
00578a99      }
00578a99      
00578abf      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00578ac7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00578ac7      
00578ac9      int32_t eax_2;
00578ac9      eax_2 = 1;
00578acd      return 1;
00578a80  }


00578ad0  uint8_t __stdcall ClientCommunicationSystem::DoEmote(class ClientCommunicationSystem* this @ ecx, int32_t arg2, char** arg3)

00578ad0  {
00578ae1      JoinArgs(&arg3, arg2, arg3);
00578ae6      char** edi = arg3;
00578ae6      
00578af3      if (edi[-1] == 1)
00578af3      {
00578b08          if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
00578b10              *(uint32_t*)edi[-5](1);
00578b10          
00578b13          int32_t eax_2;
00578b13          eax_2 = 1;
00578b16          return 1;
00578af3      }
00578af3      
00578b20      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, edi);
00578b35      int32_t ebx;
00578b35      ebx = CM_Communication::Event_Emote(&arg3);
00578b37      char** eax_4 = arg3;
00578b37      
00578b4c      if ((InterlockedDecrement(&eax_4[1]) == 0 && eax_4 != 0))
00578b54          **(uint32_t**)eax_4(1);
00578b54      
00578b65      if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
00578b6d          *(uint32_t*)edi[-5](1);
00578b6d      
00578b70      int32_t eax_8;
00578b70      eax_8 = ebx;
00578b75      return eax_8;
00578ad0  }

00578b78                                                                          90 90 90 90 90 90 90 90                          ........

00578b80  uint8_t __stdcall ClientCommunicationSystem::HelpEmote(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578b80  {
00578b80      enum ClientCommunicationSystem::HelpType eax_10 = arg2;
00578b87      enum ClientCommunicationSystem::HelpType* ecx = &arg2;
00578b8b      int32_t eax_3;
00578b8b      int32_t* esi;
00578b8b      char* __saved_ebx_1;
00578b8b      
00578b8b      if (eax_10 != Summary_HelpType)
00578b8b      {
00578b97          if (eax_10 == List_HelpType)
00578b97          {
00578b99              __saved_ebx_1 = "@emote - Performs a text emote.\n…";
00578b99              goto label_578b9e;
00578b97          }
00578b97          
00578bd5          PStringBase<char>::PStringBase<char>(ecx, "The @emote command causes your c…");
00578bda          enum ClientCommunicationSystem::HelpType ecx_3 = arg2;
00578bde          int32_t eax_4 = *(uint32_t*)(ecx_3 - 4);
00578be4          class PStringBase<char>* ebx_1 = arg4;
00578be4          
00578be8          if (eax_4 != 1)
00578be8          {
00578bef              PStringBase<char>::append_n_chars(ebx_1, ecx_3, (eax_4 - 1));
00578bf4              ecx_3 = arg2;
00578be8          }
00578be8          
00578c0d          if ((InterlockedDecrement((ecx_3 - 0x10)) == 0 && ecx_3 != 0x14))
00578c15              **(uint32_t**)(ecx_3 - 0x14)(1);
00578c15          
00578c20          PStringBase<char>::PStringBase<char>(&arg4, "You can also use a variety of st…");
00578c25          class PStringBase<char>* eax_8 = arg4;
00578c29          int32_t m_charbuffer = eax_8->m_charbuffer;
00578c29          
00578c2f          if (m_charbuffer != 1)
00578c2f          {
00578c36              PStringBase<char>::append_n_chars(ebx_1, eax_8, (m_charbuffer - 1));
00578c3b              eax_8 = arg4;
00578c2f          }
00578c2f          
00578c3f          esi = &eax_8[-5];
00578c46          eax_3 = InterlockedDecrement(&esi[1]);
00578b8b      }
00578b8b      else
00578b8b      {
00578b8d          __saved_ebx_1 = "@help emote - How to perform tex…";
00578b9e      label_578b9e:
00578b9e          PStringBase<char>::PStringBase<char>(ecx, __saved_ebx_1);
00578ba3          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578ba7          int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578ba7          
00578bad          if (eax != 1)
00578bad          {
00578bb6              PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578bbb              ecx_1 = arg2;
00578bad          }
00578bad          
00578bbf          esi = (ecx_1 - 0x14);
00578bc6          eax_3 = InterlockedDecrement(&esi[1]);
00578b8b      }
00578b8b      
00578c50      if ((eax_3 == 0 && esi != 0))
00578c58          **(uint32_t**)esi(1);
00578c58      
00578c5a      eax_3 = 1;
00578c5d      return 1;
00578b80  }


00578c60  uint8_t __thiscall ClientCommunicationSystem::HelpEmoteList(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578c60  {
00578c60      class ClientCommunicationSystem* this_1 = this;
00578c6a      PStringBase<char>::PStringBase<char>(&this_1, "Standard Emotes:\nNote: These co…");
00578c6f      class ClientCommunicationSystem* this_2 = this_1;
00578c73      int32_t vtable = this_2->vtable;
00578c73      
00578c79      if (vtable != 1)
00578c79      {
00578c82          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00578c87          this_2 = this_1;
00578c79      }
00578c79      
00578c9f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00578ca7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00578ca7      
00578ca9      int32_t eax_2;
00578ca9      eax_2 = 1;
00578cad      return 1;
00578c60  }


00578cb0  uint8_t __stdcall ClientCommunicationSystem::HelpFillComponents(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578cb0  {
00578cb0      enum ClientCommunicationSystem::HelpType eax_4 = arg2;
00578cb7      char const* const var_8;
00578cb7      
00578cb7      if (eax_4 == Summary_HelpType)
00578cb9          var_8 = "@help fillcomps - A command to h…";
00578cb7      else if (eax_4 != List_HelpType)
00578ccc          var_8 = "The @fillcomps command assists i…";
00578cc3      else
00578cc5          var_8 = "@fillcomps - Helps you buy compo…";
00578cc5      
00578cd5      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00578cda      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578cde      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578cde      
00578ce4      if (eax != 1)
00578ce4      {
00578ced          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578cf2          ecx_1 = arg2;
00578ce4      }
00578ce4      
00578d09      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578d11          **(uint32_t**)(ecx_1 - 0x14)(1);
00578d11      
00578d13      int32_t eax_3;
00578d13      eax_3 = 1;
00578d16      return 1;
00578cb0  }

00578d19                                                                             90 90 90 90 90 90 90                           .......

00578d20  uint8_t __stdcall ClientCommunicationSystem::HelpSaveUI(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578d20  {
00578d20      enum ClientCommunicationSystem::HelpType eax_4 = arg2;
00578d27      char const* const var_8;
00578d27      
00578d27      if (eax_4 == Summary_HelpType)
00578d29          var_8 = "@help saveui <filename> - Saves …";
00578d27      else if (eax_4 != List_HelpType)
00578d3c          var_8 = "@saveui <filename> - Saves the c…";
00578d33      else
00578d35          var_8 = "@saveui <filename> - Saves the c…";
00578d35      
00578d45      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00578d4a      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578d4e      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578d4e      
00578d54      if (eax != 1)
00578d54      {
00578d5d          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578d62          ecx_1 = arg2;
00578d54      }
00578d54      
00578d79      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578d81          **(uint32_t**)(ecx_1 - 0x14)(1);
00578d81      
00578d83      int32_t eax_3;
00578d83      eax_3 = 1;
00578d86      return 1;
00578d20  }

00578d89                             90 90 90 90 90 90 90                                                           .......

00578d90  uint8_t __stdcall ClientCommunicationSystem::HelpLoadUI(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578d90  {
00578d90      enum ClientCommunicationSystem::HelpType eax_4 = arg2;
00578d97      char const* const var_8;
00578d97      
00578d97      if (eax_4 == Summary_HelpType)
00578d99          var_8 = "@help loadui <filename> - Loads …";
00578d97      else if (eax_4 != List_HelpType)
00578dac          var_8 = "@loadui <filename> - Loads a pre…";
00578da3      else
00578da5          var_8 = "@loadui <filename> - Loads a pre…";
00578da5      
00578db5      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00578dba      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578dbe      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578dbe      
00578dc4      if (eax != 1)
00578dc4      {
00578dcd          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578dd2          ecx_1 = arg2;
00578dc4      }
00578dc4      
00578de9      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578df1          **(uint32_t**)(ecx_1 - 0x14)(1);
00578df1      
00578df3      int32_t eax_3;
00578df3      eax_3 = 1;
00578df6      return 1;
00578d90  }

00578df9                                                                             90 90 90 90 90 90 90                           .......

00578e00  uint8_t __stdcall ClientCommunicationSystem::HelpSaveAutoUI(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578e00  {
00578e00      enum ClientCommunicationSystem::HelpType eax_4 = arg2;
00578e07      char const* const var_8;
00578e07      
00578e07      if (eax_4 == Summary_HelpType)
00578e09          var_8 = "@help saveautoui - Saves the cur…";
00578e07      else if (eax_4 != List_HelpType)
00578e1c          var_8 = "@saveautoui - Stores the current…";
00578e13      else
00578e15          var_8 = "@saveautoui - Saves the current …";
00578e15      
00578e25      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00578e2a      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578e2e      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578e2e      
00578e34      if (eax != 1)
00578e34      {
00578e3d          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578e42          ecx_1 = arg2;
00578e34      }
00578e34      
00578e59      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578e61          **(uint32_t**)(ecx_1 - 0x14)(1);
00578e61      
00578e63      int32_t eax_3;
00578e63      eax_3 = 1;
00578e66      return 1;
00578e00  }

00578e69                             90 90 90 90 90 90 90                                                           .......

00578e70  uint8_t __stdcall ClientCommunicationSystem::HelpLoadAutoUI(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578e70  {
00578e70      enum ClientCommunicationSystem::HelpType eax_4 = arg2;
00578e77      char const* const var_8;
00578e77      
00578e77      if (eax_4 == Summary_HelpType)
00578e79          var_8 = "@help loadautoui - Forces a prev…";
00578e77      else if (eax_4 != List_HelpType)
00578e8c          var_8 = "@loadautoui - Forces a previousl…";
00578e83      else
00578e85          var_8 = "@loadautoui - Forces a previousl…";
00578e85      
00578e95      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00578e9a      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578e9e      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578e9e      
00578ea4      if (eax != 1)
00578ea4      {
00578ead          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578eb2          ecx_1 = arg2;
00578ea4      }
00578ea4      
00578ec9      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578ed1          **(uint32_t**)(ecx_1 - 0x14)(1);
00578ed1      
00578ed3      int32_t eax_3;
00578ed3      eax_3 = 1;
00578ed6      return 1;
00578e70  }

00578ed9                                                                             90 90 90 90 90 90 90                           .......

00578ee0  uint8_t __stdcall ClientCommunicationSystem::HelpLockUI(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578ee0  {
00578ee7      char const* const var_8;
00578ee7      
00578ee7      if (arg2 != Summary_HelpType)
00578ef0          var_8 = "@lockui - Toggles the locked sta…";
00578ee7      else
00578ee9          var_8 = "@help lockui - Toggles the locke…";
00578ee9      
00578ef9      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00578efe      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578f02      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578f02      
00578f08      if (eax != 1)
00578f08      {
00578f11          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578f16          ecx_1 = arg2;
00578f08      }
00578f08      
00578f2d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578f35          **(uint32_t**)(ecx_1 - 0x14)(1);
00578f35      
00578f37      int32_t eax_3;
00578f37      eax_3 = 1;
00578f3a      return 1;
00578ee0  }

00578f3d                                                                                         90 90 90                               ...

00578f40  uint8_t __stdcall ClientCommunicationSystem::HelpFriends(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00578f40  {
00578f40      enum ClientCommunicationSystem::HelpType eax_4 = arg2;
00578f47      char const* const var_8;
00578f47      
00578f47      if (eax_4 == Summary_HelpType)
00578f49          var_8 = "@help friends - Commands to help…";
00578f47      else if (eax_4 != List_HelpType)
00578f5c          var_8 = "Every time someone on your frien…";
00578f53      else
00578f55          var_8 = "@friends - Helps you manage your…";
00578f55      
00578f65      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00578f6a      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00578f6e      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00578f6e      
00578f74      if (eax != 1)
00578f74      {
00578f7d          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00578f82          ecx_1 = arg2;
00578f74      }
00578f74      
00578f99      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00578fa1          **(uint32_t**)(ecx_1 - 0x14)(1);
00578fa1      
00578fa3      int32_t eax_3;
00578fa3      eax_3 = 1;
00578fa6      return 1;
00578f40  }

00578fa9                             90 90 90 90 90 90 90                                                           .......

00578fb0  uint8_t __thiscall ClientCommunicationSystem::DoFriendsAdd(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00578fb0  {
00578fb0      char** __return = arg3;
00578fb7      char** ecx = arg2;
00578fbb      char** __saved_edi = __return;
00578fbc      char** var_c = ecx;
00578fc1      char*** var_10 = &arg3;
00578fc2      int32_t edx;
00578fc2      JoinArgsAsName(__return, edx, ecx);
00578fc2      
00578fd4      if (arg3[-1] != 1)
00578fd4      {
00579049          uint8_t eax_5 = CM_Social::SendNotice_ChatCommand_AddFriend(&arg3);
00579052          void* esi_6 = &arg3[-5];
0057905c          int32_t ebx;
0057905c          ebx = eax_5;
0057905c          
0057906a          if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00579072              **(uint32_t**)esi_6(1);
00579072          
00579074          int32_t eax_6;
00579074          eax_6 = ebx;
00579078          return eax_6;
00578fd4      }
00578fd4      
00578fe0      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"You must specify the name of the…");
00578ff7      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
00579006      int32_t* esi_2 = (arg2 - 0x14);
00579006      
00579015      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057901d          **(uint32_t**)esi_2(1);
0057901d      
00579023      void* esi_4 = &arg3[-5];
00579023      
00579033      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0057903b          **(uint32_t**)esi_4(1);
0057903b      
0057903d      int32_t eax_4;
0057903d      eax_4 = 1;
00579040      return 1;
00578fb0  }

0057907b                                                                                   90 90 90 90 90                             .....

00579080  uint8_t __thiscall ClientCommunicationSystem::DoFriendsRemove(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00579080  {
00579080      char** __return = arg3;
00579088      char** ecx = arg2;
0057908c      char** __saved_ebx = __return;
0057908d      char** var_10 = ecx;
00579092      char*** var_14 = &arg3;
00579093      int32_t edx;
00579093      JoinArgsAsName(__return, edx, ecx);
005790a5      int32_t* ecx_2 = &arg2;
005790a5      
005790a9      if (arg3[-1] == 1)
005790a9      {
005790b0          PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_2, u"You must specify the name of the…");
005790c7          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
005790d6          int32_t* esi_2 = (arg2 - 0x14);
005790d6          
005790e5          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005790ed              **(uint32_t**)esi_2(1);
005790ed          
005790f3          void* esi_4 = &arg3[-5];
005790f3          
00579102          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0057910a              **(uint32_t**)esi_4(1);
0057910a          
0057910d          int32_t eax_4;
0057910d          eax_4 = 1;
00579110          return 1;
005790a9      }
005790a9      
00579119      PStringBase<char>::PStringBase<char>(ecx_2, "-all");
00579128      int32_t eax_6 = _stricmp(arg3, arg2);
0057913d      char ebx_1 = ((int8_t)-(eax_6));
00579141      int32_t* esi_6 = (arg2 - 0x14);
00579141      
00579152      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0057915a          **(uint32_t**)esi_6(1);
0057915a      
0057915e      char eax_9;
0057915e      
0057915e      if ((ebx_1 - ebx_1) == 0xff)
0057916c          eax_9 = CM_Social::SendNotice_ChatCommand_RemoveFriend(&arg3);
0057915e      else
00579160          eax_9 = CM_Social::SendNotice_ChatCommand_RemoveAllFriends();
00579160      
00579178      void* esi_8 = &arg3[-5];
00579178      
00579189      if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
00579191          **(uint32_t**)esi_8(1);
00579191      
00579193      int32_t eax_10;
00579193      eax_10 = eax_9;
00579198      return eax_10;
00579080  }

0057919b                                                                                   90 90 90 90 90                             .....

005791a0  uint8_t __fastcall ClientCommunicationSystem::DoHouseGuests(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

005791a0  {
005791af      char*** var_20 = &arg3;
005791b4      int32_t* var_24 = &arg2;
005791b9      void* var_c;
005791b9      int32_t* var_28 = &var_c;
005791ba      class PStringBase<char>* __return;
005791ba      int32_t* edx;
005791ba      NextArg(__return, edx, this);
005791cb      void* var_8;
005791cb      PStringBase<char>::PStringBase<char>(&var_8, &data_7da0d8);
005791e0      int32_t eax_1 = _stricmp(var_c, var_8);
005791f1      char result = ((int8_t)-(eax_1));
005791f5      int32_t* ebp_1 = ((char*)var_8 - 0x14);
005791fe      int32_t eax_2;
005791fe      int32_t edx_2;
005791fe      eax_2 = InterlockedDecrement(&ebp_1[1]);
005791fe      
00579206      if ((eax_2 == 0 && ebp_1 != 0))
0057920f          edx_2 = **(uint32_t**)ebp_1(1);
0057920f      
00579213      int32_t eax_14;
00579213      
00579213      if ((result - result) == 0xff)
00579213      {
00579222          PStringBase<char>::PStringBase<char>(&var_8, "remove");
00579231          int32_t eax_4 = _stricmp(var_c, var_8);
0057923c          result = ((int8_t)-(eax_4));
00579240          void* ebp_3 = ((char*)var_8 - 0x14);
00579249          int32_t eax_6;
00579249          eax_6 = InterlockedDecrement(((char*)ebp_3 + 4));
00579249          
00579251          if ((eax_6 == 0 && ebp_3 != 0))
0057925a              edx_2 = **(uint32_t**)ebp_3(1);
0057925a          
0057925e          if ((result - result) != 0xff)
0057925e          {
00579264              result = 0;
00579264              goto label_579266;
0057925e          }
0057925e          
005793a0          PStringBase<char>::PStringBase<char>(&arg3, "remove_all");
005793af          int32_t eax_22 = _stricmp(var_c, arg3);
005793ba          result = ((int8_t)-(eax_22));
005793be          void* ebp_6 = &arg3[-5];
005793be          
005793cf          if ((InterlockedDecrement(((char*)ebp_6 + 4)) == 0 && ebp_6 != 0))
005793d8              **(uint32_t**)ebp_6(1);
005793d8          
005793dc          if ((result - result) == 0xff)
005793dc          {
00579417              PStringBase<char>::PStringBase<char>(&arg3, "list");
00579426              int32_t eax_27 = _stricmp(var_c, arg3);
00579431              int32_t ebx_4 = -(eax_27);
00579433              ebx_4 = (ebx_4 - ebx_4);
00579435              void* ebp_8 = &arg3[-5];
0057943c              ebx_4 += 1;
0057943c              
00579446              if ((InterlockedDecrement(((char*)ebp_8 + 4)) == 0 && ebp_8 != 0))
0057944f                  **(uint32_t**)ebp_8(1);
0057944f              
00579453              int32_t eax_32;
00579453              void* esi_1;
00579453              
00579453              if (ebx_4 == 0)
00579453              {
0057947a                  PStringBase<char>::PStringBase<char>(&arg3, "show");
00579483                  esi_1 = var_c;
00579489                  eax_32 = _stricmp(esi_1, arg3);
00579494                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00579453              }
00579453              
0057949b              if ((ebx_4 != 0 || eax_32 == 0))
0057949b              {
0057945e                  ebx_4 = CM_House::Event_RequestFullGuestList_Event();
00579460                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057946e                  return ebx_4;
0057949b              }
0057949b              
005794a6              PStringBase<char>::PStringBase<char>(&arg3, "add_allegiance");
005794b1              int32_t eax_33 = _stricmp(esi_1, arg3);
005794bc              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
005794c3              int32_t var_20_21;
005794c3              
005794c3              if (eax_33 == 0)
005794c3              {
005794c5                  var_20_21 = 1;
005794fe              label_5794fe:
005794fe                  int32_t ebx_5;
005794fe                  ebx_5 = CM_House::Event_ModifyAllegianceGuestPermission(var_20_21);
00579500                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057950e                  return ebx_5;
005794c3              }
005794c3              
005794d2              PStringBase<char>::PStringBase<char>(&arg3, "remove_allegiance");
005794dd              int32_t eax_35 = _stricmp(esi_1, arg3);
005794e8              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
005794e8              
005794ef              if (eax_35 == 0)
005794ef              {
005794f1                  var_20_21 = eax_35;
005794f1                  goto label_5794fe;
005794ef              }
005794ef              
0057951a              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Please see @help House for more …");
00579533              ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
0057953c              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
00579545              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057954d              eax_14 = 1;
00579553              return 1;
005793dc          }
005793dc          
005793de          uint8_t result_2 = CM_House::Event_RemoveAllPermanentGuests_Event();
005793e7          void* edi_11 = ((char*)var_c - 0x14);
005793ee          result = result_2;
005793ee          
005793f8          if ((InterlockedDecrement(((char*)edi_11 + 4)) == 0 && edi_11 != 0))
005793f8          {
00579400              **(uint32_t**)edi_11(1);
0057940b              return result;
005793f8          }
00579213      }
00579213      else
00579213      {
00579215          result = 1;
00579266      label_579266:
00579266          char** __return_1 = arg3;
0057926a          char** ecx_6 = arg2;
0057926e          char** __return_2 = __return_1;
0057926f          char** var_24_3 = ecx_6;
00579274          char*** var_28_1 = &arg3;
00579275          JoinArgsAsName(__return_1, edx_2, ecx_6);
0057927a          char** ebp_4 = arg3;
00579287          char*** ecx_7 = &arg3;
00579287          
0057928b          if (ebp_4[-1] == 1)
0057928b          {
00579296              PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_7, u"Please specify the guest's name.");
005792af              ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
005792b8              void* edi_2 = &arg3[-5];
005792b8              
005792c7              if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
005792cf                  **(uint32_t**)edi_2(1);
005792cf              
005792e0              if ((InterlockedDecrement(&ebp_4[-4]) == 0 && ebp_4 != 0x14))
005792e8                  *(uint32_t*)ebp_4[-5](1);
005792e8              
005792ee              int32_t* edi_5 = ((char*)var_c - 0x14);
005792ee              
00579301              if ((InterlockedDecrement(&edi_5[1]) != 0 || edi_5 == 0))
00579301              {
0057954d                  eax_14 = 1;
00579553                  return 1;
00579301              }
00579301              
0057930d              **(uint32_t**)edi_5(1);
00579312              int32_t eax_15;
00579312              eax_15 = 1;
00579318              return 1;
0057928b          }
0057928b          
0057931c          AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_7, ebp_4);
00579327          char*** var_20_10 = &arg3;
00579328          uint8_t result_1;
00579328          
00579328          if (result == 0)
00579331              result_1 = CM_House::Event_RemovePermanentGuest_Event(var_20_10);
00579328          else
0057932a              result_1 = CM_House::Event_AddPermanentGuest_Event(var_20_10);
0057932a          
00579336          char** edi_6 = arg3;
00579341          result = result_1;
00579341          
0057934b          if ((InterlockedDecrement(&edi_6[1]) == 0 && edi_6 != 0))
00579353              **(uint32_t**)edi_6(1);
00579353          
00579364          if ((InterlockedDecrement(&ebp_4[-4]) == 0 && ebp_4 != 0x14))
0057936c              *(uint32_t*)ebp_4[-5](1);
0057936c          
00579372          void* edi_9 = ((char*)var_c - 0x14);
00579372          
00579381          if ((InterlockedDecrement(((char*)edi_9 + 4)) == 0 && edi_9 != 0))
00579389              **(uint32_t**)edi_9(1);
00579213      }
0057938e      int32_t eax_20;
0057938e      eax_20 = result;
00579394      return eax_20;
005791a0  }

00579556                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00579560  uint8_t __fastcall ClientCommunicationSystem::DoHouseStorage(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00579560  {
0057956f      char*** var_24 = &arg3;
00579574      int32_t* var_28 = &arg2;
00579579      void* var_c;
00579579      int32_t* var_2c = &var_c;
0057957a      class PStringBase<char>* __return;
0057957a      int32_t* edx;
0057957a      NextArg(__return, edx, this);
0057958b      void* var_8;
0057958b      PStringBase<char>::PStringBase<char>(&var_8, &data_7da0d8);
005795a0      int32_t eax_1 = _stricmp(var_c, var_8);
005795b1      char ebx_1 = ((int8_t)-(eax_1));
005795b5      int32_t* ebp_1 = ((char*)var_8 - 0x14);
005795be      int32_t eax_2;
005795be      int32_t edx_2;
005795be      eax_2 = InterlockedDecrement(&ebp_1[1]);
005795be      
005795c6      if ((eax_2 == 0 && ebp_1 != 0))
005795cf          edx_2 = **(uint32_t**)ebp_1(1);
005795cf      
005795d3      void* var_24_16;
005795d3      char ebx_5;
005795d3      void* edi_10;
005795d3      char var_d_1;
005795d3      int32_t eax_14;
005795d3      
005795d3      if ((ebx_1 - ebx_1) == 0xff)
005795d3      {
005795e5          PStringBase<char>::PStringBase<char>(&var_8, "remove");
005795f4          int32_t eax_4 = _stricmp(var_c, var_8);
005795ff          char ebx_3 = ((int8_t)-(eax_4));
00579603          void* ebp_3 = ((char*)var_8 - 0x14);
0057960c          int32_t eax_6;
0057960c          eax_6 = InterlockedDecrement(((char*)ebp_3 + 4));
0057960c          
00579614          if ((eax_6 == 0 && ebp_3 != 0))
0057961d              edx_2 = **(uint32_t**)ebp_3(1);
0057961d          
00579621          if ((ebx_3 - ebx_3) != 0xff)
00579621          {
00579627              var_d_1 = 0;
00579627              goto label_57962c;
00579621          }
00579621          
005797d4          PStringBase<char>::PStringBase<char>(&arg3, "remove_all");
005797e3          int32_t eax_32 = _stricmp(var_c, arg3);
005797ee          ebx_5 = ((int8_t)-(eax_32));
005797f2          void* ebp_8 = &arg3[-5];
005797f2          
00579803          if ((InterlockedDecrement(((char*)ebp_8 + 4)) == 0 && ebp_8 != 0))
0057980c              **(uint32_t**)ebp_8(1);
0057980c          
00579810          if ((ebx_5 - ebx_5) == 0xff)
00579810          {
0057982f              PStringBase<char>::PStringBase<char>(&arg3, "list");
0057983e              int32_t eax_37 = _stricmp(var_c, arg3);
00579849              int32_t ebx_8 = -(eax_37);
0057984b              ebx_8 = (ebx_8 - ebx_8);
0057984d              void* ebp_10 = &arg3[-5];
00579854              ebx_8 += 1;
00579854              
0057985e              if ((InterlockedDecrement(((char*)ebp_10 + 4)) == 0 && ebp_10 != 0))
00579867                  **(uint32_t**)ebp_10(1);
00579867              
0057986b              int32_t eax_42;
0057986b              void* esi_1;
0057986b              
0057986b              if (ebx_8 == 0)
0057986b              {
00579892                  PStringBase<char>::PStringBase<char>(&arg3, "show");
0057989b                  esi_1 = var_c;
005798a1                  eax_42 = _stricmp(esi_1, arg3);
005798ac                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057986b              }
0057986b              
005798b3              if ((ebx_8 != 0 || eax_42 == 0))
005798b3              {
00579876                  ebx_8 = CM_House::Event_RequestFullGuestList_Event();
00579878                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
00579886                  return ebx_8;
005798b3              }
005798b3              
005798be              PStringBase<char>::PStringBase<char>(&arg3, "add_allegiance");
005798c9              int32_t eax_43 = _stricmp(esi_1, arg3);
005798d4              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
005798db              int32_t var_24_23;
005798db              
005798db              if (eax_43 == 0)
005798db              {
005798dd                  var_24_23 = 1;
005798eb              label_5798eb:
005798eb                  int32_t ebx_9;
005798eb                  ebx_9 = CM_House::Event_ModifyAllegianceStoragePermission(var_24_23);
005798ed                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
005798fb                  return ebx_9;
005798db              }
005798db              
00579907              PStringBase<char>::PStringBase<char>(&arg3, "remove_allegiance");
00579912              int32_t eax_47 = _stricmp(esi_1, arg3);
0057991d              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057991d              
00579924              if (eax_47 == 0)
00579924              {
00579926                  var_24_23 = eax_47;
00579927                  goto label_5798eb;
00579924              }
00579924              
00579932              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Please see @help House for more …");
0057994b              ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
00579954              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057995d              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
00579965              eax_14 = 1;
0057996b              return 1;
00579810          }
00579810          
00579812          char eax_35 = CM_House::Event_RemoveAllStoragePermission();
0057981b          edi_10 = ((char*)var_c - 0x14);
00579821          ebx_5 = eax_35;
00579823          var_24_16 = ((char*)edi_10 + 4);
005795d3      }
005795d3      else
005795d3      {
005795d5          var_d_1 = 1;
0057962c      label_57962c:
0057962c          char** __return_1 = arg3;
00579630          char** ecx_6 = arg2;
00579634          char** __return_2 = __return_1;
00579635          char** var_28_3 = ecx_6;
0057963a          char*** var_2c_1 = &arg3;
0057963b          JoinArgsAsName(__return_1, edx_2, ecx_6);
00579640          char** ebp_4 = arg3;
0057964d          char*** ecx_7 = &arg3;
0057964d          
00579651          if (ebp_4[-1] == 1)
00579651          {
0057965c              PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_7, u"Please specify an actual name.");
00579675              ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
0057967e              void* edi_2 = &arg3[-5];
0057967e              
0057968d              if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
00579695                  **(uint32_t**)edi_2(1);
00579695              
005796a6              if ((InterlockedDecrement(&ebp_4[-4]) == 0 && ebp_4 != 0x14))
005796af                  *(uint32_t*)ebp_4[-5](1);
005796af              
005796b5              int32_t* edi_4 = ((char*)var_c - 0x14);
005796b5              
005796c8              if ((InterlockedDecrement(&edi_4[1]) != 0 || edi_4 == 0))
005796c8              {
00579965                  eax_14 = 1;
0057996b                  return 1;
005796c8              }
005796c8              
005796d4              **(uint32_t**)edi_4(1);
005796d9              int32_t eax_15;
005796d9              eax_15 = 1;
005796df              return 1;
00579651          }
00579651          
005796e7          PStringBase<char>::PStringBase<char>(ecx_7, "-all");
005796f2          int32_t eax_17 = _stricmp(ebp_4, arg3);
005796fd          ebx_5 = ((int8_t)-(eax_17));
00579701          void* edi_6 = &arg3[-5];
00579701          
00579712          if ((InterlockedDecrement(((char*)edi_6 + 4)) == 0 && edi_6 != 0))
0057971a              **(uint32_t**)edi_6(1);
0057971a          
0057971e          if ((ebx_5 - ebx_5) == 0xff)
0057971e          {
00579752              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, ebp_4);
00579767              ebx_5 = CM_House::Event_ChangeStoragePermission_Event(&arg3, ((uint32_t)var_d_1));
00579769              char** eax_24 = arg3;
00579769              
0057977e              if ((InterlockedDecrement(&eax_24[1]) == 0 && eax_24 != 0))
00579786                  **(uint32_t**)eax_24(1);
00579786              
00579797              if ((InterlockedDecrement(&ebp_4[-4]) == 0 && ebp_4 != 0x14))
005797a0                  *(uint32_t*)ebp_4[-5](1);
0057971e          }
0057971e          else
0057971e          {
00579720              int32_t eax_18;
00579720              eax_18 = var_d_1;
00579726              uint8_t eax_19;
00579726              
00579726              if (eax_18 == 0)
0057972f                  eax_19 = CM_House::Event_RemoveAllStoragePermission();
00579726              else
00579728                  eax_19 = CM_House::Event_AddAllStoragePermission();
00579728              
00579734              ebx_5 = eax_19;
00579734              
00579745              if ((InterlockedDecrement(&ebp_4[-4]) == 0 && ebp_4 != 0x14))
005797a0                  *(uint32_t*)ebp_4[-5](1);
0057971e          }
0057971e          
005797a6          edi_10 = ((char*)var_c - 0x14);
005797ac          var_24_16 = ((char*)edi_10 + 4);
005795d3      }
005795d3      
005797b5      if ((InterlockedDecrement(var_24_16) == 0 && edi_10 != 0))
005797bd          **(uint32_t**)edi_10(1);
005797bd      
005797c2      int32_t eax_30;
005797c2      eax_30 = ebx_5;
005797c8      return eax_30;
00579560  }

0057996e                                            90 90                                                                ..

00579970  uint8_t __thiscall ClientCommunicationSystem::DoHouseBoot(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00579970  {
00579970      char** __return = arg3;
00579979      char** ecx = arg2;
0057997d      char** __saved_ebp = __return;
0057997e      char** var_14 = ecx;
00579983      char*** var_18 = &arg3;
00579984      int32_t edx;
00579984      JoinArgsAsName(__return, edx, ecx);
00579989      char** edi = arg3;
00579996      char*** ecx_1 = &arg3;
00579996      
0057999a      if (edi[-1] == 1)
0057999a      {
005799a1          PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_1, u"Please see @help House for more …");
005799b8          ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
005799c7          void* esi_2 = &arg3[-5];
005799c7          
005799d6          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005799de              **(uint32_t**)esi_2(1);
005799de          
005799ef          if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
005799f7              *(uint32_t*)edi[-5](1);
005799f7          
005799fb          int32_t eax_4;
005799fb          eax_4 = 1;
005799fe          return 1;
0057999a      }
0057999a      
00579a07      PStringBase<char>::PStringBase<char>(ecx_1, "-all");
00579a12      int32_t eax_6 = _stricmp(edi, arg3);
00579a27      char result = ((int8_t)-(eax_6));
00579a2b      void* esi_4 = &arg3[-5];
00579a2b      
00579a3c      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00579a44          **(uint32_t**)esi_4(1);
00579a44      
00579a48      if ((result - result) == 0xff)
00579a48      {
00579a78          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, edi);
00579a82          char result_1 = CM_House::Event_BootSpecificHouseGuest_Event(&arg3);
00579a87          char** esi_6 = arg3;
00579a92          result = result_1;
00579a92          
00579a9c          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00579aa4              **(uint32_t**)esi_6(1);
00579aa4          
00579ab5          if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
00579abd              *(uint32_t*)edi[-5](1);
00579a48      }
00579a48      else
00579a48      {
00579a4f          result = CM_House::Event_BootEveryone_Event();
00579a4f          
00579a60          if ((InterlockedDecrement(&edi[-4]) == 0 && edi != 0x14))
00579a60          {
00579a68              *(uint32_t*)edi[-5](1);
00579a70              return result;
00579a60          }
00579a48      }
00579a48      
00579ac2      int32_t eax_10;
00579ac2      eax_10 = result;
00579ac5      return eax_10;
00579970  }

00579ac8                          90 90 90 90 90 90 90 90                                                          ........

00579ad0  uint8_t __stdcall ClientCommunicationSystem::HelpHouse(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00579ad0  {
00579ad0      enum ClientCommunicationSystem::HelpType eax_4 = arg2;
00579ad7      char const* const var_8;
00579ad7      
00579ad7      if (eax_4 == Summary_HelpType)
00579ad9          var_8 = "@help house - Commands that help…";
00579ad7      else if (eax_4 != List_HelpType)
00579aec          var_8 = "@house abandon - Abandons your h…";
00579ae3      else
00579ae5          var_8 = "@house - Commands that help you …";
00579ae5      
00579af5      PStringBase<char>::PStringBase<char>(&arg2, var_8);
00579afa      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
00579afe      int32_t eax = *(uint32_t*)(ecx_1 - 4);
00579afe      
00579b04      if (eax != 1)
00579b04      {
00579b0d          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
00579b12          ecx_1 = arg2;
00579b04      }
00579b04      
00579b29      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
00579b31          **(uint32_t**)(ecx_1 - 0x14)(1);
00579b31      
00579b33      int32_t eax_3;
00579b33      eax_3 = 1;
00579b36      return 1;
00579ad0  }

00579b39                                                                             90 90 90 90 90 90 90                           .......

00579b40  uint8_t __thiscall ClientCommunicationSystem::HelpHouseAvailableList(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00579b40  {
00579b40      class ClientCommunicationSystem* this_1 = this;
00579b4a      PStringBase<char>::PStringBase<char>(&this_1, "@hslist <house type> - Lists the…");
00579b4f      class ClientCommunicationSystem* this_2 = this_1;
00579b53      int32_t vtable = this_2->vtable;
00579b53      
00579b59      if (vtable != 1)
00579b59      {
00579b62          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00579b67          this_2 = this_1;
00579b59      }
00579b59      
00579b7f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00579b87          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00579b87      
00579b89      int32_t eax_2;
00579b89      eax_2 = 1;
00579b8d      return 1;
00579b40  }


00579b90  uint8_t __thiscall ClientCommunicationSystem::HelpAdvancedSquelch(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00579b90  {
00579b90      class ClientCommunicationSystem* this_1 = this;
00579b9a      PStringBase<char>::PStringBase<char>(&this_1, "@squelch - Shows the current lis…");
00579b9f      class ClientCommunicationSystem* this_2 = this_1;
00579ba3      int32_t vtable = this_2->vtable;
00579ba3      
00579ba9      if (vtable != 1)
00579ba9      {
00579bb2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00579bb7          this_2 = this_1;
00579ba9      }
00579ba9      
00579bcf      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00579bd7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00579bd7      
00579bd9      int32_t eax_2;
00579bd9      eax_2 = 1;
00579bdd      return 1;
00579b90  }


00579be0  uint8_t __thiscall ClientCommunicationSystem::HelpAdvancedUnSquelch(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

00579be0  {
00579be0      class ClientCommunicationSystem* this_1 = this;
00579bea      PStringBase<char>::PStringBase<char>(&this_1, "@unsquelch - Shows the current l…");
00579bef      class ClientCommunicationSystem* this_2 = this_1;
00579bf3      int32_t vtable = this_2->vtable;
00579bf3      
00579bf9      if (vtable != 1)
00579bf9      {
00579c02          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
00579c07          this_2 = this_1;
00579bf9      }
00579bf9      
00579c1f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
00579c27          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
00579c27      
00579c29      int32_t eax_2;
00579c29      eax_2 = 1;
00579c2d      return 1;
00579be0  }


00579c30  uint8_t __thiscall ClientCommunicationSystem::ProcessSquelchArgs(class ClientCommunicationSystem* this, int32_t arg2, char** arg3, uint8_t arg4, uint8_t* arg5, class PStringBase<char>* arg6, uint32_t* arg7)

00579c30  {
00579c3e      *(uint8_t*)arg5 = 0;
00579c41      *(uint32_t*)arg7 = 1;
00579c54      PStringBase<char>::set(arg6, &data_7928af);
00579c59      int32_t ecx_2 = arg2;
00579c59      
00579c60      if (ecx_2 < 1)
00579c60      {
00579c6b          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg4, u"Not enough arguements.");
00579c82          ClientSystem::AddTextToScroll(this, &arg4, 0x1a, 1, this->m_idCurrentCommandSource);
00579c8b          int32_t* esi_2 = (arg4 - 0x14);
00579c8b          
00579c9e          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00579ca6              **(uint32_t**)esi_2(1);
00579ca6          
00579ca8          int32_t eax_1;
00579ca8          eax_1 = 1;
00579cae          return 1;
00579c60      }
00579c60      
00579cb3      int32_t ebp = 0;
00579cbe      char var_15 = 0;
00579cc3      int32_t eax_22;
00579cc3      void* var_2c_16;
00579cc3      int32_t* esi_15;
00579cc3      
00579cc3      if (ecx_2 <= 0)
00579cc3      {
00579f42      label_579f42:
00579f42          int32_t edx_16 = &arg3[ebp];
00579f45          int32_t var_2c_20 = edx_16;
00579f46          char** ecx_31 = (ecx_2 - ebp);
00579f48          char** var_30_5 = ecx_31;
00579f4d          int32_t* var_34_2 = &arg2;
00579f4e          class PStringBase<char>* eax_28 = JoinArgsAsName(arg3, edx_16, ecx_31);
00579f59          class PSRefBufferCharData<char>* m_charbuffer_2 = arg6->m_charbuffer;
00579f59          
00579f62          if (m_charbuffer_2 != eax_28->m_charbuffer)
00579f62          {
00579f73              if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
00579f7b                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00579f7b              
00579f7d              class PSRefBufferCharData<char>* m_charbuffer_3 = eax_28->m_charbuffer;
00579f83              arg6->m_charbuffer = m_charbuffer_3;
00579f89              InterlockedIncrement(&m_charbuffer_3[-1]);
00579f62          }
00579f62          
00579f93          int32_t* esi_20 = (arg2 - 0x14);
00579f93          
00579fa2          if ((InterlockedDecrement(&esi_20[1]) == 0 && esi_20 != 0))
00579faa              **(uint32_t**)esi_20(1);
00579faa          
00579fac          eax_22 = arg4;
00579fac          
00579fbe          if ((eax_22 != 0 && arg6->m_charbuffer->m_data[-4] == 1))
00579fbe          {
00579fc9              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg4, u"You have not specified a squelch…");
00579fe2              ClientSystem::AddTextToScroll(this, &arg4, 0x1a, 1, this->m_idCurrentCommandSource);
00579feb              esi_15 = (arg4 - 0x14);
00579ff1              var_2c_16 = &esi_15[1];
00579ff2          label_579ff2:
00579ff2              
00579ffa              if ((InterlockedDecrement(var_2c_16) == 0 && esi_15 != 0))
0057a002                  **(uint32_t**)esi_15(1);
00579fbe          }
00579cc3      }
00579cc3      else
00579cc3      {
00579e09          int32_t eax_3;
00579e09          
00579e09          do
00579e09          {
00579cd4              eax_3 = arg3[ebp];
00579cd4              
00579cda              if (*(uint8_t*)eax_3 != 0x2d)
00579cda                  break;
00579cda              
00579ce6              class PStringBase<char> var_14;
00579ce6              PStringBase<char>::PStringBase<char>(&var_14, (eax_3 + 1));
00579cf4              void* var_c;
00579cf4              PStringBase<char>::PStringBase<char>(&var_c, "reply");
00579d03              int32_t eax_5 = _stricmp(var_14, var_c);
00579d12              char ebx_2 = ((int8_t)-(eax_5));
00579d16              int32_t* esi_4 = ((char*)var_c - 0x14);
00579d16              
00579d27              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00579d2f                  **(uint32_t**)esi_4(1);
00579d2f              
00579d33              if ((ebx_2 - ebx_2) == 0xff)
00579d33              {
00579d6d                  void* var_8;
00579d6d                  PStringBase<char>::PStringBase<char>(&var_8, "account");
00579d7c                  int32_t eax_11 = _stricmp(var_14, var_8);
00579d8b                  char ebx_4 = ((int8_t)-(eax_11));
00579d8f                  int32_t* esi_8 = ((char*)var_8 - 0x14);
00579d8f                  
00579da0                  if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
00579da8                      **(uint32_t**)esi_8(1);
00579da8                  
00579dac                  if ((ebx_4 - ebx_4) == 0xff)
00579dac                  {
00579dc0                      char* var_30_3 = var_14;
00579dc1                      uint32_t var_4 = 0;
00579dc1                      
00579dd3                      if (LogTextTypeEnumMapper::LogTextTypeFromString(var_30_3, &var_4) == 0)
00579dd3                      {
00579ee9                          int32_t var_2c_17 = arg3[ebp];
00579ef4                          PStringBase<char>::sprintf(&var_14, ""%s" is not a valid squelch cate…");
00579f10                          ClientSystem::AddTextToScroll(this, &var_14, 0x1a, 1, this->m_idCurrentCommandSource);
00579f19                          void* esi_17 = (var_14 - 0x14);
00579f19                          
00579f28                          if ((InterlockedDecrement(((char*)esi_17 + 4)) == 0 && esi_17 != 0))
00579f30                              **(uint32_t**)esi_17(1);
00579f30                          
00579f35                          int32_t eax_26;
00579f35                          eax_26 = 0;
00579f3b                          return 0;
00579dd3                      }
00579dd3                      
00579de1                      *(uint32_t*)arg7 = var_4;
00579dac                  }
00579dac                  else
00579db2                      *(uint8_t*)arg5 = 1;
00579db2                  
00579de7                  void* esi_10 = (var_14 - 0x14);
00579de7                  
00579df6                  if ((InterlockedDecrement(((char*)esi_10 + 4)) == 0 && esi_10 != 0))
00579dfe                      **(uint32_t**)esi_10(1);
00579d33              }
00579d33              else
00579d33              {
00579d39                  int32_t* esi_6 = (var_14 - 0x14);
00579d40                  var_15 = 1;
00579d40                  
00579d51                  if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00579d5d                      **(uint32_t**)esi_6(1);
00579d33              }
00579d33              
00579e00              eax_3 = arg2;
00579e04              ebp += 1;
00579e07              ecx_2 = eax_3;
00579e09          } while (ebp < eax_3);
00579e09          
00579e0f          eax_3 = var_15;
00579e0f          
00579e15          if (eax_3 == 0)
00579e15              goto label_579f42;
00579e15          
00579e20          class PStringBase<char>* eax_18 = gmCCommunicationSystem::GetLastTellerName(&arg4);
00579e2b          class PSRefBufferCharData<char>* m_charbuffer = arg6->m_charbuffer;
00579e2b          
00579e34          if (m_charbuffer != eax_18->m_charbuffer)
00579e34          {
00579e45              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00579e4d                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00579e4d              
00579e4f              class PSRefBufferCharData<char>* m_charbuffer_1 = eax_18->m_charbuffer;
00579e55              arg6->m_charbuffer = m_charbuffer_1;
00579e5b              InterlockedIncrement(&m_charbuffer_1[-1]);
00579e34          }
00579e34          
00579e65          int32_t* esi_13 = (arg4 - 0x14);
00579e65          
00579e74          if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
00579e7c              **(uint32_t**)esi_13(1);
00579e7c          
00579e88          if (arg6->m_charbuffer->m_data[-4] == 1)
00579e88          {
00579ea1              PStringBase<unsigned short>::allocate_ref_buffer(&arg4, wcslen(u"A player must @tell you before y…"));
00579eb0              wcscpy(arg4, u"A player must @tell you before y…");
00579ecd              ClientSystem::AddTextToScroll(this, &arg4, 0x1a, 1, this->m_idCurrentCommandSource);
00579ed6              esi_15 = (arg4 - 0x14);
00579edc              var_2c_16 = &esi_15[1];
00579edd              goto label_579ff2;
00579e88          }
00579cc3      }
0057a007      eax_22 = 1;
0057a00d      return 1;
00579c30  }


0057a010  uint8_t __fastcall ClientCommunicationSystem::DoMessageTypes(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057a010  {
0057a013      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057a019      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0057a024      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0057a02f      gmCCommunicationSystem::GetListofSquelchChannels(&PStringBase<char>::s_NullBuffer_2);
0057a055      void* __return;
0057a055      ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &__return, 0), 0, 1, this->m_idCurrentCommandSource);
0057a064      int32_t* esi_2 = ((char*)__return - 0x14);
0057a064      
0057a073      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057a07b          **(uint32_t**)esi_2(1);
0057a07b      
0057a081      void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0057a081      
0057a090      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0057a098          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0057a098      
0057a09b      int32_t eax_5;
0057a09b      eax_5 = 1;
0057a0a1      return 1;
0057a010  }

0057a0a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0057a0b0  uint8_t __thiscall ClientCommunicationSystem::HelpAge(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a0b0  {
0057a0b0      class ClientCommunicationSystem* this_1 = this;
0057a0ba      PStringBase<char>::PStringBase<char>(&this_1, "@age - Displays your total gamep…");
0057a0bf      class ClientCommunicationSystem* this_2 = this_1;
0057a0c3      int32_t vtable = this_2->vtable;
0057a0c3      
0057a0c9      if (vtable != 1)
0057a0c9      {
0057a0d2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
0057a0d7          this_2 = this_1;
0057a0c9      }
0057a0c9      
0057a0ef      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
0057a0f7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
0057a0f7      
0057a0f9      int32_t eax_2;
0057a0f9      eax_2 = 1;
0057a0fd      return 1;
0057a0b0  }


0057a100  uint8_t __thiscall ClientCommunicationSystem::HelpBirth(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a100  {
0057a100      class ClientCommunicationSystem* this_1 = this;
0057a10a      PStringBase<char>::PStringBase<char>(&this_1, "@birth - Displays when your char…");
0057a10f      class ClientCommunicationSystem* this_2 = this_1;
0057a113      int32_t vtable = this_2->vtable;
0057a113      
0057a119      if (vtable != 1)
0057a119      {
0057a122          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
0057a127          this_2 = this_1;
0057a119      }
0057a119      
0057a13f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
0057a147          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
0057a147      
0057a149      int32_t eax_2;
0057a149      eax_2 = 1;
0057a14d      return 1;
0057a100  }


0057a150  uint8_t __thiscall ClientCommunicationSystem::HelpDay(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a150  {
0057a150      class ClientCommunicationSystem* this_1 = this;
0057a15a      PStringBase<char>::PStringBase<char>(&this_1, "@day - A toggle that lightens th…");
0057a15f      class ClientCommunicationSystem* this_2 = this_1;
0057a163      int32_t vtable = this_2->vtable;
0057a163      
0057a169      if (vtable != 1)
0057a169      {
0057a172          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
0057a177          this_2 = this_1;
0057a169      }
0057a169      
0057a18f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
0057a197          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
0057a197      
0057a199      int32_t eax_2;
0057a199      eax_2 = 1;
0057a19d      return 1;
0057a150  }


0057a1a0  uint8_t __stdcall ClientCommunicationSystem::HelpEndurance(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a1a0  {
0057a1ab      char* var_8;
0057a1ab      
0057a1ab      if (arg2 != Summary_HelpType)
0057a1b4          var_8 = "The endurance attribute has a nu…";
0057a1ab      else
0057a1ad          var_8 = "@endurance - Explains how endura…";
0057a1ad      
0057a1b9      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057a1be      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057a1c2      int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057a1c2      
0057a1c8      if (eax != 1)
0057a1c8      {
0057a1d1          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057a1d6          ecx_1 = arg2;
0057a1c8      }
0057a1c8      
0057a1ed      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
0057a1f5          **(uint32_t**)(ecx_1 - 0x14)(1);
0057a1f5      
0057a1f7      int32_t eax_3;
0057a1f7      eax_3 = 1;
0057a1fa      return 1;
0057a1a0  }

0057a1fd                                                                                         90 90 90                               ...

0057a200  uint8_t __thiscall ClientCommunicationSystem::HelpFrameRate(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a200  {
0057a200      class ClientCommunicationSystem* this_1 = this;
0057a20a      PStringBase<char>::PStringBase<char>(&this_1, "@framerate - Toggles the framera…");
0057a20f      class ClientCommunicationSystem* this_2 = this_1;
0057a213      int32_t vtable = this_2->vtable;
0057a213      
0057a219      if (vtable != 1)
0057a219      {
0057a222          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
0057a227          this_2 = this_1;
0057a219      }
0057a219      
0057a23f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
0057a247          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
0057a247      
0057a249      int32_t eax_2;
0057a249      eax_2 = 1;
0057a24d      return 1;
0057a200  }


0057a250  uint8_t __thiscall ClientCommunicationSystem::DoLoc(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057a250  {
0057a25f      uint32_t var_c4;
0057a25f      class PStringBase<unsigned short> var_b4;
0057a25f      
0057a25f      if (arg2 == 0)
0057a25f      {
0057a2c2          class CPhysicsObj* player = SmartBox::smartbox->player;
0057a2c2          
0057a2ca          if (player != 0)
0057a2ca          {
0057a2d4              int32_t var_ac = 0x796910;
0057a2dc              int32_t var_a8_1 = 0;
0057a2e4              int32_t var_a4 = 0x3f800000;
0057a2ec              int32_t var_a0_1 = 0;
0057a2f4              int32_t var_9c_1 = 0;
0057a2fc              int32_t var_98_1 = 0;
0057a304              int32_t var_70_1 = 0;
0057a30c              int32_t var_6c_1 = 0;
0057a314              int32_t var_68_1 = 0;
0057a31c              Frame::cache(&var_a4);
0057a321              uint32_t objcell_id = player->m_position.objcell_id;
0057a330              Frame::operator=(&var_a4, &player->m_position.frame);
0057a330              
0057a33b              if (objcell_id != 0)
0057a33b              {
0057a398                  char var_64 = 0;
0057a3a8                  void s;
0057a3a8                  int16_t* edi_2 = __builtin_memset(&s, 0, 0x60);
0057a3aa                  *(uint16_t*)edi_2 = 0;
0057a3ac                  uint32_t var_c0_7 = 0x64;
0057a3b2                  var_c4 = &var_64;
0057a3aa                  edi_2[1] = 0;
0057a3b8                  Position::ToString(&var_ac, var_c4, var_c0_7);
0057a3bd                  class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057a3c2                  class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0057a3ca                  InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0057a3d4                  char* var_c0_9 = &var_64;
0057a3d9                  var_c4 = "Your location is: %s\n";
0057a3df                  PStringBase<char>::sprintf(&PStringBase<char>::s_NullBuffer_2, var_c4);
0057a3e4                  uint32_t m_idCurrentCommandSource_2 = this->m_idCurrentCommandSource;
0057a3ee                  var_c4 = 1;
0057a3f9                  ClientSystem::AddTextToScroll(this, &PStringBase<char>::s_NullBuffer_2, 0, var_c4, m_idCurrentCommandSource_2);
0057a402                  int32_t* esi_6 = (PStringBase<char>::s_NullBuffer_2 - 0x14);
0057a402                  
0057a415                  if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0057a41d                      **(uint32_t**)esi_6(1);
0057a33b              }
0057a33b              else
0057a33b              {
0057a346                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_b4, u"Not in valid cell!");
0057a34b                  uint32_t m_idCurrentCommandSource_1 = this->m_idCurrentCommandSource;
0057a352                  var_c4 = 1;
0057a35d                  ClientSystem::AddTextToScroll(this, &var_b4, 0x1a, var_c4, m_idCurrentCommandSource_1);
0057a366                  int32_t* esi_4 = (var_b4 - 0x14);
0057a366                  
0057a37d                  if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0057a37d                  {
0057a389                      **(uint32_t**)esi_4(1);
0057a38c                      int32_t eax_5;
0057a38c                      eax_5 = 1;
0057a395                      return 1;
0057a37d                  }
0057a33b              }
0057a2ca          }
0057a25f      }
0057a25f      else
0057a25f      {
0057a26a          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_b4, u"Unexpected arguments to @loc");
0057a26f          uint32_t m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057a276          uint8_t var_c0_1 = 1;
0057a278          var_c4 = 0x1a;
0057a281          ClientSystem::AddTextToScroll(this, &var_b4, var_c4, var_c0_1, m_idCurrentCommandSource);
0057a28a          int32_t* esi_2 = (var_b4 - 0x14);
0057a28a          
0057a2a1          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057a2a1          {
0057a2ad              **(uint32_t**)esi_2(1);
0057a2af              int32_t eax_2;
0057a2af              eax_2 = 1;
0057a2b8              return 1;
0057a2a1          }
0057a25f      }
0057a420      int32_t eax;
0057a420      eax = 1;
0057a429      return 1;
0057a250  }

0057a42c                                      90 90 90 90                                                              ....

0057a430  uint8_t __stdcall ClientCommunicationSystem::HelpLoc(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a430  {
0057a43b      char* var_8;
0057a43b      
0057a43b      if (arg2 != Summary_HelpType)
0057a444          var_8 = "@loc - Displays your current pos…";
0057a43b      else
0057a43d          var_8 = "@loc - Displays your current pos…";
0057a43d      
0057a449      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057a44e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057a452      int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057a452      
0057a458      if (eax != 1)
0057a458      {
0057a461          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057a466          ecx_1 = arg2;
0057a458      }
0057a458      
0057a47d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
0057a485          **(uint32_t**)(ecx_1 - 0x14)(1);
0057a485      
0057a487      int32_t eax_3;
0057a487      eax_3 = 1;
0057a48a      return 1;
0057a430  }

0057a48d                                         90 90 90                                                               ...

0057a490  uint8_t __thiscall ClientCommunicationSystem::DoPKLite(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057a490  {
0057a499      if (arg2 == 0)
0057a499      {
0057a4e7          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0057a4ee          uint32_t player_id;
0057a4ee          
0057a4ee          if (SmartBox::smartbox_1 == 0)
0057a4f8              player_id = 0;
0057a4ee          else
0057a4f0              player_id = SmartBox::smartbox_1->player_id;
0057a4f0          
0057a4fb          class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(player_id);
0057a4fb          
0057a505          if ((eax_4 != 0 && eax_4->vtable->IsPlayerKiller() != 0))
0057a505          {
0057a51e              ClientCommunicationSystem::HandleFailureEvent(this, 0x507, &PStringBase<unsigned short>::null_string);
0057a523              int32_t eax_6;
0057a523              eax_6 = 1;
0057a526              return 1;
0057a505          }
0057a505          
0057a529          CM_Character::Event_EnterPKLite();
0057a499      }
0057a499      else
0057a499      {
0057a4a4          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please see @help pklite for more…");
0057a4bb          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0057a4c4          int32_t* esi_2 = (arg2 - 0x14);
0057a4c4          
0057a4d7          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057a4d7          {
0057a4df              **(uint32_t**)esi_2(1);
0057a4e1              int32_t eax_3;
0057a4e1              eax_3 = 1;
0057a4e4              return 1;
0057a4d7          }
0057a499      }
0057a499      
0057a52e      int32_t eax_1;
0057a52e      eax_1 = 1;
0057a531      return 1;
0057a490  }

0057a534                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0057a540  uint8_t __stdcall ClientCommunicationSystem::HelpPKLite(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a540  {
0057a54b      char* var_8;
0057a54b      
0057a54b      if (arg2 != Summary_HelpType)
0057a554          var_8 = "@pklite - Sets your status to Pl…";
0057a54b      else
0057a54d          var_8 = "@pklite - Sets your status to Pl…";
0057a54d      
0057a559      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057a55e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057a562      int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057a562      
0057a568      if (eax != 1)
0057a568      {
0057a571          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057a576          ecx_1 = arg2;
0057a568      }
0057a568      
0057a58d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
0057a595          **(uint32_t**)(ecx_1 - 0x14)(1);
0057a595      
0057a597      int32_t eax_3;
0057a597      eax_3 = 1;
0057a59a      return 1;
0057a540  }

0057a59d                                                                                         90 90 90                               ...

0057a5a0  uint8_t __thiscall ClientCommunicationSystem::HelpVersion(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a5a0  {
0057a5a0      class ClientCommunicationSystem* this_1 = this;
0057a5aa      PStringBase<char>::PStringBase<char>(&this_1, "@version - Tells you what versio…");
0057a5af      class ClientCommunicationSystem* this_2 = this_1;
0057a5b3      int32_t vtable = this_2->vtable;
0057a5b3      
0057a5b9      if (vtable != 1)
0057a5b9      {
0057a5c2          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
0057a5c7          this_2 = this_1;
0057a5b9      }
0057a5b9      
0057a5df      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
0057a5e7          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
0057a5e7      
0057a5e9      int32_t eax_2;
0057a5e9      eax_2 = 1;
0057a5ed      return 1;
0057a5a0  }


0057a5f0  uint8_t __thiscall ClientCommunicationSystem::HelpClear(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a5f0  {
0057a5f0      class ClientCommunicationSystem* this_1 = this;
0057a5fa      PStringBase<char>::PStringBase<char>(&this_1, "@clear - Clears the chat box of …");
0057a5ff      class ClientCommunicationSystem* this_2 = this_1;
0057a603      int32_t vtable = this_2->vtable;
0057a603      
0057a609      if (vtable != 1)
0057a609      {
0057a612          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
0057a617          this_2 = this_1;
0057a609      }
0057a609      
0057a62f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
0057a637          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
0057a637      
0057a639      int32_t eax_2;
0057a639      eax_2 = 1;
0057a63d      return 1;
0057a5f0  }


0057a640  uint8_t __thiscall ClientCommunicationSystem::DoTitle(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057a640  {
0057a64a      uint32_t m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057a65c      int32_t eax_5;
0057a65c      int32_t* esi_3;
0057a65c      class PStringBase<unsigned short> __return;
0057a65c      
0057a65c      if ((m_idCurrentCommandSource == 1 || m_idCurrentCommandSource == 8))
0057a65c      {
0057a796          PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"This command must be issued from…");
0057a7ad          ClientSystem::AddTextToScroll(this, &__return, 0, 1, this->m_idCurrentCommandSource);
0057a7b6          esi_3 = (__return - 0x14);
0057a7bd          eax_5 = InterlockedDecrement(&esi_3[1]);
0057a65c      }
0057a65c      else
0057a65c      {
0057a677          class PStringBase<char> __return_1;
0057a677          JoinArgs(&__return_1, arg2, arg3);
0057a67c          class PStringBase<char> __return_2 = __return_1;
0057a680          int32_t eax_1 = *(uint32_t*)(__return_2 - 4);
0057a680          
0057a689          if (eax_1 != 1)
0057a689          {
0057a6e6              if (eax_1 >= 0x64)
0057a6e6              {
0057a6f1                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"Window title length cannot excee…");
0057a708                  ClientSystem::AddTextToScroll(this, &__return, 0, 1, this->m_idCurrentCommandSource);
0057a711                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0057a71a                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0057a720                  int32_t eax_7;
0057a720                  eax_7 = 1;
0057a729                  return 1;
0057a6e6              }
0057a6e6              
0057a730              void var_90;
0057a730              StringInfo::StringInfo(&var_90);
0057a74c              StringInfo::SetLiteralValue(&var_90, PStringBase<char>::to_wpstring(&__return_1, &__return, 0), 1);
0057a755              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0057a766              CM_UI::SendNotice_SetChatWindowTitle(this->m_idCurrentCommandSource, &var_90);
0057a772              StringInfo::~StringInfo(&var_90);
0057a77b              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0057a781              int32_t eax_9;
0057a781              eax_9 = 1;
0057a78a              return 1;
0057a689          }
0057a689          
0057a695          PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, u"You must provide a new title for…");
0057a6ac          ClientSystem::AddTextToScroll(this, &__return_1, 0, 1, this->m_idCurrentCommandSource);
0057a6bb          int32_t* esi_2 = (__return_1 - 0x14);
0057a6bb          
0057a6ca          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057a6d2              **(uint32_t**)esi_2(1);
0057a6d2          
0057a6d4          esi_3 = (__return_2 - 0x14);
0057a6db          eax_5 = InterlockedDecrement(&esi_3[1]);
0057a65c      }
0057a65c      
0057a7c9      if ((eax_5 == 0 && esi_3 != 0))
0057a7d1          **(uint32_t**)esi_3(1);
0057a7d1      
0057a7d4      eax_5 = 1;
0057a7dd      return 1;
0057a640  }


0057a7e0  uint8_t __thiscall ClientCommunicationSystem::HelpTitle(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a7e0  {
0057a7e0      class ClientCommunicationSystem* this_1 = this;
0057a7ea      PStringBase<char>::PStringBase<char>(&this_1, "@title <new title> - Sets the ti…");
0057a7ef      class ClientCommunicationSystem* this_2 = this_1;
0057a7f3      int32_t vtable = this_2->vtable;
0057a7f3      
0057a7f9      if (vtable != 1)
0057a7f9      {
0057a802          PStringBase<char>::append_n_chars(arg4, this_2, (vtable - 1));
0057a807          this_2 = this_1;
0057a7f9      }
0057a7f9      
0057a81f      if ((InterlockedDecrement(&this_2[0]) == 0 && this_2 != 0x14))
0057a827          *(uint32_t*)*(int32_t*)((char*)this_2 + -0x14)(1);
0057a827      
0057a829      int32_t eax_2;
0057a829      eax_2 = 1;
0057a82d      return 1;
0057a7e0  }


0057a830  uint8_t __stdcall ClientCommunicationSystem::HelpFilter(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a830  {
0057a83b      char* var_8;
0057a83b      
0057a83b      if (arg2 != Summary_HelpType)
0057a844          var_8 = "The @filter commands filter out …";
0057a83b      else
0057a83d          var_8 = "@filter - Commands to filter out…";
0057a83d      
0057a849      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057a84e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057a852      int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057a852      
0057a858      if (eax != 1)
0057a858      {
0057a861          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057a866          ecx_1 = arg2;
0057a858      }
0057a858      
0057a87d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
0057a885          **(uint32_t**)(ecx_1 - 0x14)(1);
0057a885      
0057a887      int32_t eax_3;
0057a887      eax_3 = 1;
0057a88a      return 1;
0057a830  }

0057a88d                                         90 90 90                                                               ...

0057a890  uint8_t __stdcall ClientCommunicationSystem::HelpUnFilter(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a890  {
0057a89b      char* var_8;
0057a89b      
0057a89b      if (arg2 != Summary_HelpType)
0057a8a4          var_8 = "The @unfilter commands remove sp…";
0057a89b      else
0057a89d          var_8 = "@unfilter - Commands to remove f…";
0057a89d      
0057a8a9      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057a8ae      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057a8b2      int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057a8b2      
0057a8b8      if (eax != 1)
0057a8b8      {
0057a8c1          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057a8c6          ecx_1 = arg2;
0057a8b8      }
0057a8b8      
0057a8dd      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
0057a8e5          **(uint32_t**)(ecx_1 - 0x14)(1);
0057a8e5      
0057a8e7      int32_t eax_3;
0057a8e7      eax_3 = 1;
0057a8ea      return 1;
0057a890  }

0057a8ed                                         90 90 90                                                               ...

0057a8f0  uint8_t __stdcall ClientCommunicationSystem::HelpLoadFile(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a8f0  {
0057a8fb      char* var_8;
0057a8fb      
0057a8fb      if (arg2 != Summary_HelpType)
0057a904          var_8 = "usage: @loadfile filename\nThis …";
0057a8fb      else
0057a8fd          var_8 = "@loadfile - Reads in the given t…";
0057a8fd      
0057a909      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057a90e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057a912      int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057a912      
0057a918      if (eax != 1)
0057a918      {
0057a921          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057a926          ecx_1 = arg2;
0057a918      }
0057a918      
0057a93d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
0057a945          **(uint32_t**)(ecx_1 - 0x14)(1);
0057a945      
0057a947      int32_t eax_3;
0057a947      eax_3 = 1;
0057a94a      return 1;
0057a8f0  }

0057a94d                                         90 90 90                                                               ...

0057a950  uint8_t __stdcall ClientCommunicationSystem::DoSetOutputHelp(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057a950  {
0057a95b      char* var_8;
0057a95b      
0057a95b      if (arg2 != Summary_HelpType)
0057a964          var_8 = "@log <name> - Echoes chat text t…";
0057a95b      else
0057a95d          var_8 = "@log - Commands to echo chat tex…";
0057a95d      
0057a969      PStringBase<char>::PStringBase<char>(&arg2, var_8);
0057a96e      enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057a972      int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057a972      
0057a978      if (eax != 1)
0057a978      {
0057a981          PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057a986          ecx_1 = arg2;
0057a978      }
0057a978      
0057a99d      if ((InterlockedDecrement((ecx_1 - 0x10)) == 0 && ecx_1 != 0x14))
0057a9a5          **(uint32_t**)(ecx_1 - 0x14)(1);
0057a9a5      
0057a9a7      int32_t eax_3;
0057a9a7      eax_3 = 1;
0057a9aa      return 1;
0057a950  }

0057a9ad                                         90 90 90                                                               ...

0057a9b0  uint8_t __thiscall ClientCommunicationSystem::DoChannelList(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057a9b0  {
0057a9b9      if (arg2 != 1)
0057a9b9      {
0057a9c4          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please specify the channel name.");
0057a9db          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0057a9e4          int32_t* esi_1 = (arg2 - 0x14);
0057a9e4          
0057a9f7          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0057a9ff              **(uint32_t**)esi_1(1);
0057a9ff          
0057aa02          int32_t eax_1;
0057aa02          eax_1 = 1;
0057aa05          return 1;
0057a9b9      }
0057a9b9      
0057aa1d      int32_t* var_10_1 = &arg2;
0057aa1e      uint32_t eax_3 = ChannelSystem::GetChannelID(AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, *(uint32_t*)arg3));
0057aa23      int32_t esi_2 = arg2;
0057aa23      
0057aa3c      if ((InterlockedDecrement((esi_2 + 4)) == 0 && esi_2 != 0))
0057aa44          **(uint32_t**)esi_2(1);
0057aa44      
0057aa48      if (eax_3 != 0)
0057aa6f          return CM_Communication::Event_ChannelList(eax_3);
0057aa6f      
0057aa56      ClientCommunicationSystem::HandleFailureEvent(this, 0x422, &PStringBase<unsigned short>::null_string);
0057aa5d      int32_t eax_5;
0057aa5d      eax_5 = 1;
0057aa60      return 1;
0057a9b0  }

0057aa72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0057aa80  uint8_t __thiscall ClientCommunicationSystem::DoChannelOn(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057aa80  {
0057aa89      if (arg2 != 1)
0057aa89      {
0057aa94          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please specify the channel name.");
0057aaab          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0057aab4          int32_t* esi_1 = (arg2 - 0x14);
0057aab4          
0057aac7          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0057aacf              **(uint32_t**)esi_1(1);
0057aacf          
0057aad2          int32_t eax_1;
0057aad2          eax_1 = 1;
0057aad5          return 1;
0057aa89      }
0057aa89      
0057aaed      int32_t* var_10_1 = &arg2;
0057aaee      uint32_t eax_3 = ChannelSystem::GetChannelID(AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, *(uint32_t*)arg3));
0057aaf3      int32_t esi_2 = arg2;
0057aaf3      
0057ab0c      if ((InterlockedDecrement((esi_2 + 4)) == 0 && esi_2 != 0))
0057ab14          **(uint32_t**)esi_2(1);
0057ab14      
0057ab18      if (eax_3 != 0)
0057ab3f          return CM_Communication::Event_AddToChannel(eax_3);
0057ab3f      
0057ab26      ClientCommunicationSystem::HandleFailureEvent(this, 0x422, &PStringBase<unsigned short>::null_string);
0057ab2d      int32_t eax_5;
0057ab2d      eax_5 = 1;
0057ab30      return 1;
0057aa80  }

0057ab42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0057ab50  uint8_t __thiscall ClientCommunicationSystem::DoChannelOff(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057ab50  {
0057ab59      if (arg2 != 1)
0057ab59      {
0057ab64          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"Please specify the channel name.");
0057ab7b          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0057ab84          int32_t* esi_1 = (arg2 - 0x14);
0057ab84          
0057ab97          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0057ab9f              **(uint32_t**)esi_1(1);
0057ab9f          
0057aba2          int32_t eax_1;
0057aba2          eax_1 = 1;
0057aba5          return 1;
0057ab59      }
0057ab59      
0057abbd      int32_t* var_10_1 = &arg2;
0057abbe      uint32_t eax_3 = ChannelSystem::GetChannelID(AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, *(uint32_t*)arg3));
0057abc3      int32_t esi_2 = arg2;
0057abc3      
0057abdc      if ((InterlockedDecrement((esi_2 + 4)) == 0 && esi_2 != 0))
0057abe4          **(uint32_t**)esi_2(1);
0057abe4      
0057abe8      if (eax_3 != 0)
0057ac0f          return CM_Communication::Event_RemoveFromChannel(eax_3);
0057ac0f      
0057abf6      ClientCommunicationSystem::HandleFailureEvent(this, 0x422, &PStringBase<unsigned short>::null_string);
0057abfd      int32_t eax_5;
0057abfd      eax_5 = 1;
0057ac00      return 1;
0057ab50  }

0057ac12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0057ac20  uint8_t ClientCommunicationSystem::PlayerIsPSR(class ClientCommunicationSystem const* this @ ecx)

0057ac20  {
0057ac2a      struct Turbine_GUID* var_14;
0057ac2a      int32_t* var_24 = &var_14;
0057ac2f      struct Turbine_GUID* var_28 = &PlayerDesc_ClassType;
0057ac37      var_14 = nullptr;
0057ac42      class TResult __return;
0057ac42      InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_28, var_24);
0057ac47      struct Turbine_GUID* esi = var_14;
0057ac50      var_28 = esi;
0057ac52      int32_t var_24_1 = 0;
0057ac55      struct Turbine_GUID* eax_1 = var_28;
0057ac59      int32_t var_8 = 0;
0057ac5d      int32_t var_4 = 0;
0057ac5d      
0057ac61      if (eax_1 != 0)
0057ac67          *(uint32_t*)(eax_1->m_data1 + 0x10)();
0057ac67      
0057ac73      struct Turbine_GUID** esp = &var_28;
0057ac7a      void var_c;
0057ac7a      int32_t ebx = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &var_c);
0057ac7a      
0057ac7c      if (esi != 0)
0057ac82          *(uint32_t*)(esi->m_data1 + 0x14)();
0057ac82      
0057ac85      class TResult __return_1 = __return;
0057ac85      
0057ac8b      if (__return_1 != 0)
0057ac8b      {
0057ac8f          if ((ebx >= 0 && PlayerDesc::PlayerIsPSR(__return_1) != 0))
0057ac8f          {
0057aca0              *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0057aca3              int32_t eax_5;
0057aca3              eax_5 = 1;
0057acab              return 1;
0057ac8f          }
0057ac8f          
0057acb0          *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0057acb0          struct Turbine_GUID* __saved_edi;
0057acb0          esp = &__saved_edi;
0057ac8b      }
0057ac8b      
0057acb3      *(uint32_t*)esp;
0057acb3      esp[1];
0057acb5      class TResult eax_2;
0057acb5      eax_2.m_val = 0;
0057acb3      esp[2];
0057acbb      return 0;
0057ac20  }

0057acbc                                                                                      90 90 90 90                              ....

0057acc0  uint8_t __fastcall ClientCommunicationSystem::CloseLogFile(class ClientCommunicationSystem* this)

0057acc0  {
0057accd      if (ClientSystem::s_pLogFile == 0)
0057accd      {
0057ad73          struct _iobuf* eax_7;
0057ad73          eax_7 = 0;
0057ad79          return 0;
0057accd      }
0057accd      
0057acda      class PSRefBufferCharData<char>* m_charbuffer = this->m_strLogName.m_charbuffer;
0057ace7      class PStringBase<char> var_8;
0057ace7      PStringBase<char>::PStringBase<char>(&var_8, Formatted, "Chat log %s closed.\n");
0057ad0d      void* __return;
0057ad0d      ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&var_8, &__return, 0), 0, 1, this->m_idCurrentCommandSource);
0057ad1c      int32_t* esi_2 = ((char*)__return - 0x14);
0057ad1c      
0057ad2b      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057ad33          **(uint32_t**)esi_2(1);
0057ad33      
0057ad3b      fclose(ClientSystem::s_pLogFile);
0057ad45      int32_t* esi_4 = (var_8 - 0x14);
0057ad4f      ClientSystem::s_pLogFile = nullptr;
0057ad4f      
0057ad62      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0057ad6a          **(uint32_t**)esi_4(1);
0057ad6a      
0057ad6c      int32_t eax_6;
0057ad6c      eax_6 = 1;
0057ad72      return 1;
0057acc0  }

0057ad7a                                                                                90 90 90 90 90 90                            ......

0057ad80  uint8_t __fastcall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::grow(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* this)

0057ad80  {
0057ad80      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* m_numBuckets = this;
0057ad82      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0057ad8e      m_numBuckets = this->m_numBuckets;
0057ada5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0057ada5      
0057adaf      if (eax_2 != bucketSizesEnd_1)
0057adb8          eax_2 = &eax_2[1];
0057adaf      else
0057adaf      {
0057adb1          eax_2 -= 4;
0057adb1          
0057adb6          if (eax_2 != bucketSizesEnd_1)
0057adb8              eax_2 = &eax_2[1];
0057adaf      }
0057adaf      
0057adc8      return IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::resize_internal(this, *(uint32_t*)eax_2);
0057ad80  }

0057adc9                             90 90 90 90 90 90 90                                                           .......

0057add0  void __fastcall ClientCommunicationSystem::OnShutdown(class ClientCommunicationSystem* this)

0057add0  {
0057add0      ClientCommunicationSystem::CloseLogFile(this);
0057add5      class ClientCommunicationSystem* ClientCommunicationSystem::s_pCommunicationSystem_1 = ClientCommunicationSystem::s_pCommunicationSystem;
0057add5      
0057addd      if (ClientCommunicationSystem::s_pCommunicationSystem_1 != 0)
0057addd      {
0057addf          ClientCommunicationSystem::s_pCommunicationSystem_1->vtable->Release();
0057ade4          ClientCommunicationSystem::s_pCommunicationSystem = nullptr;
0057addd      }
0057add0  }

0057adef                                               90                                                                 .

0057adf0  uint32_t __thiscall ClientCommunicationSystem::Handle_Communication__WeenieError(class ClientCommunicationSystem* this, uint32_t arg2)

0057adf0  {
0057adfa      ClientCommunicationSystem::HandleFailureEvent(this, arg2, &PStringBase<unsigned short>::null_string);
0057ae01      return 0;
0057adf0  }

0057ae04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0057ae10  uint8_t __stdcall ClientCommunicationSystem::HelpAllegiance(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057ae10  {
0057ae17      enum ClientCommunicationSystem::HelpType* ecx = &arg2;
0057ae1b      int32_t eax_3;
0057ae1b      int32_t* esi;
0057ae1b      
0057ae1b      if (arg2 != Summary_HelpType)
0057ae1b      {
0057ae59          PStringBase<char>::PStringBase<char>(ecx, "@allegiance boot [-account] <nam…");
0057ae5e          enum ClientCommunicationSystem::HelpType ecx_3 = arg2;
0057ae62          int32_t eax_4 = *(uint32_t*)(ecx_3 - 4);
0057ae68          class PStringBase<char>* ebx_1 = arg4;
0057ae68          
0057ae6c          if (eax_4 != 1)
0057ae6c          {
0057ae73              PStringBase<char>::append_n_chars(ebx_1, ecx_3, (eax_4 - 1));
0057ae78              ecx_3 = arg2;
0057ae6c          }
0057ae6c          
0057ae91          if ((InterlockedDecrement((ecx_3 - 0x10)) == 0 && ecx_3 != 0x14))
0057ae99              **(uint32_t**)(ecx_3 - 0x14)(1);
0057ae99          
0057aea4          PStringBase<char>::PStringBase<char>(&arg4, "@allegiance motd - Displays or s…");
0057aea9          char* eax_8 = arg4;
0057aead          int32_t ecx_7 = *(uint32_t*)(eax_8 - 4);
0057aead          
0057aeb3          if (ecx_7 != 1)
0057aeb3          {
0057aeba              PStringBase<char>::append_n_chars(ebx_1, eax_8, (ecx_7 - 1));
0057aebf              eax_8 = arg4;
0057aeb3          }
0057aeb3          
0057aec3          esi = &eax_8[0xffffffec];
0057aeca          eax_3 = InterlockedDecrement(&esi[1]);
0057ae1b      }
0057ae1b      else
0057ae1b      {
0057ae22          PStringBase<char>::PStringBase<char>(ecx, "@allegiance - Commands to help m…");
0057ae27          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057ae2b          int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057ae2b          
0057ae31          if (eax != 1)
0057ae31          {
0057ae3a              PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057ae3f              ecx_1 = arg2;
0057ae31          }
0057ae31          
0057ae43          esi = (ecx_1 - 0x14);
0057ae4a          eax_3 = InterlockedDecrement(&esi[1]);
0057ae1b      }
0057ae1b      
0057aed4      if ((eax_3 == 0 && esi != 0))
0057aedc          **(uint32_t**)esi(1);
0057aedc      
0057aede      eax_3 = 1;
0057aee1      return 1;
0057ae10  }

0057aee4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0057aef0  uint8_t __thiscall ClientCommunicationSystem::DoAllegianceBoot(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057aef0  {
0057aef0      char** __return_1 = arg3;
0057aefc      char** ecx = arg2;
0057af00      char** __return_2 = __return_1;
0057af01      char** var_2c = ecx;
0057af06      char*** var_30 = &arg3;
0057af07      int32_t edx;
0057af07      JoinArgsAsName(__return_1, edx, ecx);
0057af19      class PStringBase<unsigned short> __return;
0057af19      
0057af19      if (arg3[-1] == 1)
0057af19      {
0057af24          PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"Please specify an actual name.");
0057af3b          ClientSystem::AddTextToScroll(this, &__return, 0x1a, 1, this->m_idCurrentCommandSource);
0057af4a          int32_t* esi_2 = (__return - 0x14);
0057af4a          
0057af59          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057af61              **(uint32_t**)esi_2(1);
0057af61          
0057af67          void* esi_4 = &arg3[-5];
0057af67          
0057af76          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0057af7e              **(uint32_t**)esi_4(1);
0057af7e          
0057af80          int32_t eax_4;
0057af80          eax_4 = 1;
0057af88          return 1;
0057af19      }
0057af19      
0057af94      PStringBase<char>::PStringBase<char>(&arg2, "-account");
0057afa8      int32_t ebx;
0057afa8      ebx = 0;
0057afaa      int32_t var_10 = 0x79448c;
0057afb2      char*** var_4 = &arg3;
0057afb6      int32_t var_c = 0;
0057afbe      int32_t var_8 = 0;
0057afc6      uint8_t eax_5;
0057afc6      int32_t ecx_9;
0057afc6      eax_5 = PStringBaseIter_Common<char>::FindSubString(&var_10, &arg2, 0);
0057afc6      
0057afcd      if (eax_5 != 0)
0057afcd      {
0057afd7          int32_t var_8_1 = var_c;
0057afe3          ebx = 1;
0057afe5          PStringBaseIter_Common<char>::Next(&var_10, *(uint32_t*)(arg2 - 4));
0057aff3          ecx_9 = PStringBaseIter<char>::Replace(&var_10, &PStringBase<char>::s_NullBuffer);
0057afcd      }
0057afcd      
0057aff8      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::whitespace_string.m_charbuffer;
0057affe      int32_t var_28_4 = ecx_9;
0057b009      InterlockedIncrement(((char*)m_charbuffer - 0x10));
0057b017      PStringBase<char>::trim(&arg3, 1, 1, m_charbuffer);
0057b01e      char const* const eax_9 = " (Account)";
0057b01e      
0057b023      if (ebx == 0)
0057b025          eax_9 = &data_7928af;
0057b025      
0057b02e      char const* const var_28_6 = eax_9;
0057b02f      char** var_2c_3 = arg3;
0057b03c      class PStringBase<char> var_14;
0057b03c      PStringBase<char>::PStringBase<char>(&var_14, Formatted, "Attempting to boot %s%s...\n");
0057b062      ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&var_14, &__return, 0), 0, 1, this->m_idCurrentCommandSource);
0057b071      int32_t* esi_6 = (__return - 0x14);
0057b071      
0057b080      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0057b088          **(uint32_t**)esi_6(1);
0057b088      
0057b093      AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, arg3);
0057b0a1      uint8_t eax_14 = CM_Allegiance::Event_BreakAllegianceBoot(&__return, ((uint32_t)ebx));
0057b0a6      class PStringBase<unsigned short> __return_3 = __return;
0057b0aa      ebx = eax_14;
0057b0aa      
0057b0bb      if ((InterlockedDecrement((__return_3 + 4)) == 0 && __return_3 != 0))
0057b0c3          **(uint32_t**)__return_3(1);
0057b0c3      
0057b0c9      int32_t* esi_8 = (var_14 - 0x14);
0057b0c9      
0057b0d8      if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
0057b0e0          **(uint32_t**)esi_8(1);
0057b0e0      
0057b0e6      int32_t* esi_10 = (arg2 - 0x14);
0057b0ed      var_10 = 0x794478;
0057b0ed      
0057b0fd      if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
0057b105          **(uint32_t**)esi_10(1);
0057b105      
0057b10b      void* esi_12 = &arg3[-5];
0057b10b      
0057b11a      if ((InterlockedDecrement(((char*)esi_12 + 4)) == 0 && esi_12 != 0))
0057b122          **(uint32_t**)esi_12(1);
0057b122      
0057b126      int32_t eax_22;
0057b126      eax_22 = ebx;
0057b12c      return eax_22;
0057aef0  }

0057b12f                                               90                                                                 .

0057b130  uint8_t __thiscall ClientCommunicationSystem::DoStupidChannelHack(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057b130  {
0057b130      int32_t eax_4 = arg2;
0057b130      
0057b139      if (eax_4 > 0)
0057b195          return ClientCommunicationSystem::DoChannelCommand(this, eax_4, arg3);
0057b195      
0057b144      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"You must specify the text you wi…");
0057b15b      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0057b164      int32_t* esi_2 = (arg2 - 0x14);
0057b164      
0057b177      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057b17f          **(uint32_t**)esi_2(1);
0057b17f      
0057b181      int32_t eax_1;
0057b181      eax_1 = 1;
0057b184      return 1;
0057b130  }

0057b198                                                                          90 90 90 90 90 90 90 90                          ........

0057b1a0  uint8_t __thiscall ClientCommunicationSystem::HelpChattingGroup(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057b1a0  {
0057b1a4      bool cond:0 = arg2 != Summary_HelpType;
0057b1a6      char* esi;
0057b1a6      char* var_4 = esi;
0057b1a7      char* edi;
0057b1a7      char* var_8 = edi;
0057b1aa      enum ClientCommunicationSystem::HelpType* ecx = &arg2;
0057b1ae      int32_t eax_3;
0057b1ae      char** esp_1;
0057b1ae      int32_t* esi_1;
0057b1ae      char* var_c;
0057b1ae      
0057b1ae      if (cond:0)
0057b1ae      {
0057b1e8          var_c = "@chat - Sets whether or not you …";
0057b1ed          PStringBase<char>::PStringBase<char>(ecx, var_c);
0057b1f2          enum ClientCommunicationSystem::HelpType ecx_3 = arg2;
0057b1f6          int32_t eax_4 = *(uint32_t*)(ecx_3 - 4);
0057b1f6          
0057b200          if (eax_4 != 1)
0057b200          {
0057b203              var_c = (eax_4 - 1);
0057b207              PStringBase<char>::append_n_chars(arg4, ecx_3, var_c);
0057b20c              ecx_3 = arg2;
0057b200          }
0057b200          
0057b210          char* ebx;
0057b210          var_c = ebx;
0057b214          int32_t ebp;
0057b214          int32_t var_10_3 = ebp;
0057b214          
0057b227          if ((InterlockedDecrement((ecx_3 - 0x10)) == 0 && ecx_3 != 0x14))
0057b22f              **(uint32_t**)(ecx_3 - 0x14)(1);
0057b22f          
0057b23a          PStringBase<char>::PStringBase<char>(&arg3, "@notell - Sets whether or not yo…");
0057b23f          char const* eax_8 = arg3;
0057b243          int32_t ecx_7 = *(uint32_t*)(eax_8 - 4);
0057b243          
0057b249          if (ecx_7 != 1)
0057b249          {
0057b250              PStringBase<char>::append_n_chars(arg4, eax_8, (ecx_7 - 1));
0057b255              eax_8 = arg3;
0057b249          }
0057b249          
0057b268          if ((InterlockedDecrement(&eax_8[0xfffffff0]) == 0 && eax_8 != 0x14))
0057b270              **(uint32_t**)(eax_8 - 0x14)(1);
0057b270          
0057b273          char* var_20 = "@reply";
0057b278          int32_t var_24_1 = 0;
0057b27c          ClientCommunicationSystem::HelpReply(this, Summary_HelpType, var_20, arg4);
0057b28a          PStringBase<char>::PStringBase<char>(&arg2, "@retell - Sends some text to the…");
0057b28f          enum ClientCommunicationSystem::HelpType ecx_13 = arg2;
0057b293          int32_t eax_11 = *(uint32_t*)(ecx_13 - 4);
0057b293          
0057b299          if (eax_11 != 1)
0057b299          {
0057b29d              var_20 = ecx_13;
0057b2a0              PStringBase<char>::append_n_chars(arg4, var_20, (eax_11 - 1));
0057b2a5              ecx_13 = arg2;
0057b299          }
0057b299          
0057b2b8          if ((InterlockedDecrement((ecx_13 - 0x10)) == 0 && ecx_13 != 0x14))
0057b2b8          {
0057b2ba              int32_t edx_3 = *(uint32_t*)(ecx_13 - 0x14);
0057b2bc              var_20 = 1;
0057b2c0              *(uint32_t*)edx_3(var_20);
0057b2b8          }
0057b2b8          
0057b2c2          var_20 = "@say - Says some text to everyon…";
0057b2cb          PStringBase<char>::PStringBase<char>(&__return_addr, var_20);
0057b2d0          void* const __return_addr_1 = __return_addr;
0057b2d4          int32_t ecx_17 = *(uint32_t*)((char*)__return_addr_1 - 4);
0057b2d4          
0057b2da          if (ecx_17 != 1)
0057b2da          {
0057b2dd              var_20 = (ecx_17 - 1);
0057b2e1              PStringBase<char>::append_n_chars(arg4, __return_addr_1, var_20);
0057b2e6              __return_addr_1 = __return_addr;
0057b2da          }
0057b2da          
0057b2f0          var_20 = ((char*)__return_addr_1 - 0x10);
0057b2f0          
0057b2f9          if ((InterlockedDecrement(var_20) == 0 && __return_addr_1 != 0x14))
0057b2f9          {
0057b2fd              int32_t var_24_3 = 1;
0057b301              **(uint32_t**)((char*)__return_addr_1 - 0x14)(1);
0057b2f9          }
0057b2f9          
0057b303          char const* const var_24_4 = "@tell - Sends a private message …";
0057b30c          PStringBase<char>::PStringBase<char>(&var_4, "@tell - Sends a private message …");
0057b311          char* ebx_5 = var_4;
0057b315          int32_t eax_17 = *(uint32_t*)(ebx_5 - 4);
0057b315          
0057b31b          if (eax_17 != 1)
0057b31b          {
0057b322              PStringBase<char>::append_n_chars(arg4, ebx_5, (eax_17 - 1));
0057b327              ebx_5 = var_4;
0057b31b          }
0057b31b          
0057b33a          if ((InterlockedDecrement(&ebx_5[0xfffffff0]) == 0 && ebx_5 != 0x14))
0057b33a          {
0057b33e              int32_t var_28_2 = 1;
0057b342              **(uint32_t**)(ebx_5 - 0x14)(1);
0057b33a          }
0057b33a          
0057b345          wchar32 const* const var_2c_1 = &*U"fvpca"[4];
0057b34a          int32_t var_30_1 = 0;
0057b34e          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, &*U"fvpca"[4], arg4);
0057b354          wchar32 const* const var_2c_2 = &*U"fvpca"[3];
0057b359          int32_t var_30_2 = 0;
0057b35d          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, &*U"fvpca"[3], arg4);
0057b363          wchar32 const* const var_2c_3 = U"mh,.";
0057b368          int32_t var_30_3 = 0;
0057b36c          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, U"mh,.", arg4);
0057b372          wchar32 const* const var_2c_4 = &*U"fvpca"[2];
0057b377          int32_t var_30_4 = 0;
0057b37b          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, &*U"fvpca"[2], arg4);
0057b381          wchar32 const* const var_2c_5 = &*U"fvpca"[1];
0057b386          int32_t var_30_5 = 0;
0057b38a          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, &*U"fvpca"[1], arg4);
0057b390          wchar32 const* const var_2c_6 = U"fvpca";
0057b395          int32_t var_30_6 = 0;
0057b399          ClientCommunicationSystem::HelpStupidChannelHack(this, Summary_HelpType, U"fvpca", arg4);
0057b39e          char const* const var_28_9 = "@afk - Set your away-from-keyboa…";
0057b3a7          PStringBase<char>::PStringBase<char>(&var_8, "@afk - Set your away-from-keyboa…");
0057b3ac          char* ecx_31 = var_8;
0057b3b0          int32_t eax_21 = *(uint32_t*)(ecx_31 - 4);
0057b3b0          
0057b3b6          if (eax_21 != 1)
0057b3b6          {
0057b3bd              PStringBase<char>::append_n_chars(arg4, ecx_31, (eax_21 - 1));
0057b3c2              ecx_31 = var_8;
0057b3b6          }
0057b3b6          
0057b3c6          esi_1 = &ecx_31[0xffffffec];
0057b3cd          eax_3 = InterlockedDecrement(&esi_1[1]);
0057b3d0          esp_1 = &var_20;
0057b1ae      }
0057b1ae      else
0057b1ae      {
0057b1b0          var_c = "@help chatting - How to chat pub…";
0057b1b5          PStringBase<char>::PStringBase<char>(ecx, var_c);
0057b1ba          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057b1be          int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057b1be          
0057b1c4          if (eax != 1)
0057b1c4          {
0057b1c7              var_c = (eax - 1);
0057b1cd              PStringBase<char>::append_n_chars(arg4, ecx_1, var_c);
0057b1d2              ecx_1 = arg2;
0057b1c4          }
0057b1c4          
0057b1d6          esi_1 = (ecx_1 - 0x14);
0057b1dc          var_c = &esi_1[1];
0057b1dc          esp_1 = &var_c;
0057b1dd          eax_3 = InterlockedDecrement(var_c);
0057b1ae      }
0057b1ae      
0057b3d7      if ((eax_3 == 0 && esi_1 != 0))
0057b3d7      {
0057b3d9          int32_t edx_6 = *(uint32_t*)esi_1;
0057b3dd          *(uint32_t*)((char*)esp_1 - 4) = 1;
0057b3df          *(uint32_t*)edx_6();
0057b3d7      }
0057b3d7      
0057b3e1      *(uint32_t*)esp_1;
0057b3e2      eax_3 = 1;
0057b3e1      esp_1[1];
0057b3e5      return 1;
0057b1a0  }

0057b3e8                          90 90 90 90 90 90 90 90                                                          ........

0057b3f0  uint8_t __fastcall ClientCommunicationSystem::DoAFK(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057b3f0  {
0057b3f3      int32_t ebx;
0057b3f3      int32_t var_18 = ebx;
0057b3f4      int32_t ebp;
0057b3f4      int32_t var_1c = ebp;
0057b3f5      int32_t esi;
0057b3f5      int32_t var_20 = esi;
0057b3f6      int32_t* edi;
0057b3f6      int32_t* var_24 = edi;
0057b3fd      char*** m_idCurrentCommandSource = &arg3;
0057b402      int32_t* var_2c = &arg2;
0057b407      int32_t* var_14;
0057b407      int32_t* var_30 = &var_14;
0057b408      class PStringBase<char>* __return_1;
0057b408      int32_t* edx;
0057b408      NextArg(__return_1, edx, this);
0057b410      m_idCurrentCommandSource = &data_7928af;
0057b419      char*** __return;
0057b419      PStringBase<char>::PStringBase<char>(&__return, m_idCurrentCommandSource);
0057b422      int32_t* esi_1 = var_14;
0057b42c      m_idCurrentCommandSource = __return;
0057b42d      var_2c = esi_1;
0057b42e      int32_t eax_1 = _stricmp(var_2c, m_idCurrentCommandSource);
0057b435      char*** m_idCurrentCommandSource_1;
0057b435      
0057b435      if (eax_1 != 0)
0057b435      {
0057b437          m_idCurrentCommandSource = &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseProfile;
0057b440          PStringBase<char>::PStringBase<char>(&m_idCurrentCommandSource_1, m_idCurrentCommandSource);
0057b449          m_idCurrentCommandSource = m_idCurrentCommandSource_1;
0057b44a          var_2c = esi_1;
0057b44b          int32_t eax_2 = _stricmp(var_2c, m_idCurrentCommandSource);
0057b456          ebx = -(eax_2);
0057b458          ebx = (ebx - ebx);
0057b45a          void* esi_3 = &m_idCurrentCommandSource_1[-5];
0057b460          m_idCurrentCommandSource = ((char*)esi_3 + 4);
0057b461          ebx += 1;
0057b461          
0057b46f          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_3 != 0))
0057b46f          {
0057b471              int32_t eax_4 = *(uint32_t*)esi_3;
0057b473              m_idCurrentCommandSource = 1;
0057b477              *(uint32_t*)eax_4(m_idCurrentCommandSource);
0057b46f          }
0057b435      }
0057b435      
0057b47b      if ((eax_1 == 0 || ebx != 0))
0057b47d          ebx = 1;
0057b47d      
0057b483      int32_t* esi_5 = &__return[-5];
0057b489      m_idCurrentCommandSource = &esi_5[1];
0057b489      
0057b496      if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_5 != 0))
0057b496      {
0057b498          int32_t edx_2 = *(uint32_t*)esi_5;
0057b49a          m_idCurrentCommandSource = 1;
0057b49e          *(uint32_t*)edx_2(m_idCurrentCommandSource);
0057b496      }
0057b496      
0057b4a6      int32_t** esp_1;
0057b4a6      int32_t var_8;
0057b4a6      int32_t var_4;
0057b4a6      
0057b4a6      if (ebx == 0)
0057b4a6      {
0057b544          m_idCurrentCommandSource = &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseData;
0057b549          PStringBase<char>::PStringBase<char>(&__return, m_idCurrentCommandSource);
0057b552          int32_t* ecx_14 = var_14;
0057b556          m_idCurrentCommandSource = __return;
0057b557          var_2c = ecx_14;
0057b558          int32_t eax_9 = _stricmp(var_2c, m_idCurrentCommandSource);
0057b563          char ebx_3 = ((int8_t)-(eax_9));
0057b567          void* esi_8 = &__return[-5];
0057b56d          m_idCurrentCommandSource = ((char*)esi_8 + 4);
0057b56d          
0057b57c          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_8 != 0))
0057b57c          {
0057b57e              int32_t eax_11 = *(uint32_t*)esi_8;
0057b580              m_idCurrentCommandSource = 1;
0057b584              *(uint32_t*)eax_11(m_idCurrentCommandSource);
0057b57c          }
0057b57c          
0057b588          if ((ebx_3 - ebx_3) == 0xff)
0057b588          {
0057b629              m_idCurrentCommandSource = &data_7e0580;
0057b632              PStringBase<char>::PStringBase<char>(&__return, m_idCurrentCommandSource);
0057b63b              int32_t* ecx_24 = var_14;
0057b63f              m_idCurrentCommandSource = __return;
0057b640              var_2c = ecx_24;
0057b641              int32_t eax_15 = _stricmp(var_2c, m_idCurrentCommandSource);
0057b652              char ebx_5 = ((int8_t)-(eax_15));
0057b656              void* esi_11 = &__return[-5];
0057b65c              m_idCurrentCommandSource = ((char*)esi_11 + 4);
0057b65c              
0057b667              if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_11 != 0))
0057b667              {
0057b669                  int32_t eax_17 = *(uint32_t*)esi_11;
0057b66b                  m_idCurrentCommandSource = 1;
0057b66f                  *(uint32_t*)eax_17(m_idCurrentCommandSource);
0057b667              }
0057b667              
0057b673              void* esi_14;
0057b673              
0057b673              if ((ebx_5 - ebx_5) == 0xff)
0057b673              {
0057b7f5                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057b7fa                  arg3 = PStringBase<char>::s_NullBuffer_1;
0057b801                  m_idCurrentCommandSource = &PStringBase<char>::s_NullBuffer_1[-1];
0057b802                  InterlockedIncrement(m_idCurrentCommandSource);
0057b80c                  m_idCurrentCommandSource = &arg3;
0057b80d                  var_2c = "@afk";
0057b812                  int32_t var_30_14 = 2;
0057b816                  ClientCommunicationSystem::HelpAFK(this, Detail_HelpType, var_2c, m_idCurrentCommandSource);
0057b821                  m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057b822                  var_2c = 1;
0057b824                  int32_t var_30_15 = 0;
0057b826                  int32_t var_34_5 = 0;
0057b839                  ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&arg3, &arg2, 0), 0, var_2c, m_idCurrentCommandSource);
0057b842                  int32_t* esi_17 = (arg2 - 0x14);
0057b848                  m_idCurrentCommandSource = &esi_17[1];
0057b848                  
0057b851                  if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_17 != 0))
0057b851                  {
0057b853                      int32_t eax_33 = *(uint32_t*)esi_17;
0057b855                      m_idCurrentCommandSource = 1;
0057b859                      *(uint32_t*)eax_33(m_idCurrentCommandSource);
0057b851                  }
0057b851                  
0057b85f                  esi_14 = &arg3[-5];
0057b865                  m_idCurrentCommandSource = ((char*)esi_14 + 4);
0057b673              }
0057b673              else
0057b673              {
0057b67d                  int32_t edx_11 = arg2;
0057b681                  m_idCurrentCommandSource = arg3;
0057b682                  var_2c = edx_11;
0057b688                  JoinArgs(&arg3, var_2c, m_idCurrentCommandSource);
0057b692                  var_2c = &data_794098;
0057b697                  PStringBase<char>::PStringBase<char>(&m_idCurrentCommandSource, var_2c);
0057b69c                  var_2c = 1;
0057b69e                  int32_t var_30_10 = 1;
0057b6a4                  PStringBase<char>::trim(&arg3, 1, var_2c);
0057b6ad                  int32_t eax_18 = arg3[-1];
0057b6ad                  
0057b6b3                  if (eax_18 != 1)
0057b6b3                  {
0057b6be                      if (eax_18 > 0xc0)
0057b6be                      {
0057b6c0                          m_idCurrentCommandSource = 0xbf;
0057b6c5                          var_2c = nullptr;
0057b6d5                          m_idCurrentCommandSource = PStringBase<char>::substring(&arg3, &arg2, var_2c, m_idCurrentCommandSource);
0057b6da                          PStringBase<unsigned short>::operator=(&arg3, m_idCurrentCommandSource);
0057b6e3                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057b6be                      }
0057b6be                      
0057b6e8                      m_idCurrentCommandSource = &data_794508;
0057b6f1                      PStringBase<char>::PStringBase<char>(&arg2, m_idCurrentCommandSource);
0057b6fa                      m_idCurrentCommandSource = &arg2;
0057b70b                      ebx_5 = PStringBase<char>::find_substring(&arg3, m_idCurrentCommandSource) == 0xffffffff;
0057b70e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057b70e                      
0057b715                      if (ebx_5 != 0)
0057b715                      {
0057b717                          m_idCurrentCommandSource = &data_794508;
0057b720                          PStringBase<char>::PStringBase<char>(&arg2, m_idCurrentCommandSource);
0057b729                          m_idCurrentCommandSource = &arg2;
0057b72e                          PStringBase<char>::operator+=(&arg3, m_idCurrentCommandSource);
0057b737                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057b715                      }
0057b6b3                  }
0057b6b3                  
0057b740                  m_idCurrentCommandSource = arg3;
0057b74a                  m_idCurrentCommandSource = AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, m_idCurrentCommandSource);
0057b74b                  CM_Communication::Event_SetAFKMessage(m_idCurrentCommandSource);
0057b750                  int32_t esi_12 = arg2;
0057b75a                  m_idCurrentCommandSource = (esi_12 + 4);
0057b75a                  
0057b763                  if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_12 != 0))
0057b763                  {
0057b765                      int32_t edx_13 = *(uint32_t*)esi_12;
0057b767                      m_idCurrentCommandSource = 1;
0057b76b                      *(uint32_t*)edx_13(m_idCurrentCommandSource);
0057b763                  }
0057b763                  
0057b775                  if (arg3[-1] != 1)
0057b775                  {
0057b7bb                      m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057b7bc                      var_2c = 1;
0057b7be                      int32_t var_30_13 = 0;
0057b7c9                      char const* const var_38_1 = "New AFK message set: ";
0057b7da                      ClientSystem::AddTextToScroll(this, operator+(&arg2, "New AFK message set: ", &arg3), 0, var_2c, m_idCurrentCommandSource);
0057b7e3                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057b7ec                      esi_14 = &arg3[-5];
0057b7f2                      m_idCurrentCommandSource = ((char*)esi_14 + 4);
0057b775                  }
0057b775                  else
0057b775                  {
0057b777                      m_idCurrentCommandSource = u"New AFK message set: I am curren…";
0057b780                      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, m_idCurrentCommandSource);
0057b78b                      m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057b78c                      var_2c = 1;
0057b78e                      int32_t var_30_12 = 0;
0057b797                      ClientSystem::AddTextToScroll(this, &arg2, 0, var_2c, m_idCurrentCommandSource);
0057b7a0                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057b7a9                      esi_14 = &arg3[-5];
0057b7af                      m_idCurrentCommandSource = ((char*)esi_14 + 4);
0057b775                  }
0057b673              }
0057b673              
0057b866              esp_1 = &var_24;
0057b866              
0057b86e              if ((InterlockedDecrement() == 0 && esi_14 != 0))
0057b86e              {
0057b870                  int32_t edx_15 = *(uint32_t*)esi_14;
0057b874                  m_idCurrentCommandSource = 1;
0057b876                  *(uint32_t*)edx_15(m_idCurrentCommandSource);
0057b876                  esp_1 = &var_24;
0057b86e              }
0057b588          }
0057b588          else
0057b588          {
0057b592              m_idCurrentCommandSource = &arg3;
0057b599              var_2c = &PlayerDesc_ClassType;
0057b59f              arg2 = 0;
0057b5a3              arg3 = nullptr;
0057b5ae              InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, m_idCurrentCommandSource);
0057b5b3              char** ecx_17 = arg3;
0057b5be              var_2c = ecx_17;
0057b5c0              m_idCurrentCommandSource = nullptr;
0057b5c3              int32_t* eax_13 = var_2c;
0057b5c9              var_8 = 0;
0057b5cd              var_4 = 0;
0057b5cd              
0057b5d1              if (eax_13 != 0)
0057b5d7                  *(uint32_t*)(*(uint32_t*)eax_13 + 0x10)();
0057b5d7              
0057b5e3              InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &m_idCurrentCommandSource_1);
0057b5e3              
0057b5ea              if (ecx_17 != 0)
0057b5f0                  *(uint32_t*)(*(uint32_t*)ecx_17 + 0x14)();
0057b5f0              
0057b5f3              char*** m_idCurrentCommandSource_3 = m_idCurrentCommandSource_1;
0057b5fc              int32_t var_34_1 = 0x6e;
0057b601              CBaseQualities::InqBool(&m_idCurrentCommandSource_3[0xe], 0x6e, &var_4);
0057b601              esp_1 = &var_2c;
0057b601              
0057b60a              if (var_4 != 0)
0057b60a              {
0057b60c                  int32_t var_30_8 = 0;
0057b60d                  CM_Communication::Event_SetAFKMode(0);
0057b612                  esp_1 = &var_2c;
0057b60a              }
0057b60a              
0057b617              if (m_idCurrentCommandSource_3 != 0)
0057b61d                  *(uint32_t*)m_idCurrentCommandSource_3[5]();
0057b588          }
0057b4a6      }
0057b4a6      else
0057b4a6      {
0057b4ae          arg2 = 0;
0057b4b2          arg3 = nullptr;
0057b4ba          m_idCurrentCommandSource = &arg3;
0057b4bb          var_2c = &PlayerDesc_ClassType;
0057b4c8          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_2c, m_idCurrentCommandSource);
0057b4cd          char** ecx_8 = arg3;
0057b4d8          var_2c = ecx_8;
0057b4da          m_idCurrentCommandSource = nullptr;
0057b4dd          int32_t* eax_7 = var_2c;
0057b4e3          var_8 = 0;
0057b4e7          var_4 = 0;
0057b4e7          
0057b4eb          if (eax_7 != 0)
0057b4f1              *(uint32_t*)(*(uint32_t*)eax_7 + 0x10)();
0057b4f1          
0057b4fd          InterfacePtr<class PlayerDesc>::_QueryInterface(&var_8, &m_idCurrentCommandSource_1);
0057b4fd          
0057b504          if (ecx_8 != 0)
0057b50a              *(uint32_t*)(*(uint32_t*)ecx_8 + 0x14)();
0057b50a          
0057b50d          char*** m_idCurrentCommandSource_2 = m_idCurrentCommandSource_1;
0057b516          int32_t var_34 = 0x6e;
0057b51b          CBaseQualities::InqBool(&m_idCurrentCommandSource_2[0xe], 0x6e, &var_4);
0057b51b          esp_1 = &var_2c;
0057b51b          
0057b524          if (var_4 == 0)
0057b524          {
0057b526              int32_t var_30_4 = 1;
0057b528              CM_Communication::Event_SetAFKMode(1);
0057b52d              esp_1 = &var_2c;
0057b524          }
0057b524          
0057b532          if (m_idCurrentCommandSource_2 != 0)
0057b538              *(uint32_t*)m_idCurrentCommandSource_2[5]();
0057b4a6      }
0057b87c      int32_t* esi_20 = &esp_1[4][-5];
0057b882      *(uint32_t*)((char*)esp_1 - 4) = &esi_20[1];
0057b883      void* esp_3 = esp_1;
0057b883      
0057b88f      if ((InterlockedDecrement() == 0 && esi_20 != 0))
0057b88f      {
0057b891          int32_t edx_16 = *(uint32_t*)esi_20;
0057b893          *(uint32_t*)((char*)esp_3 - 4) = 1;
0057b897          *(uint32_t*)edx_16();
0057b88f      }
0057b88f      
0057b899      *(uint32_t*)esp_3;
0057b89a      *(uint32_t*)((char*)esp_3 + 4);
0057b89b      *(uint32_t*)((char*)esp_3 + 8);
0057b89c      int32_t eax_36;
0057b89c      eax_36 = 1;
0057b89e      *(uint32_t*)((char*)esp_3 + 0xc);
0057b8a2      return 1;
0057b3f0  }

0057b8a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0057b8b0  uint8_t __thiscall ClientCommunicationSystem::HelpDeathGroup(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0057b8b0  {
0057b8b6      int32_t ebp;
0057b8b6      int32_t var_4 = ebp;
0057b8b9      int32_t esi;
0057b8b9      int32_t var_8 = esi;
0057b8ba      enum ClientCommunicationSystem::HelpType* ecx = &arg2;
0057b8be      char** esp;
0057b8be      char* var_c;
0057b8be      
0057b8be      if (arg2 != Summary_HelpType)
0057b8be      {
0057b912          char* edi;
0057b912          var_c = edi;
0057b918          PStringBase<char>::PStringBase<char>(ecx, "@permit - Commands to give or re…");
0057b91d          enum ClientCommunicationSystem::HelpType ecx_4 = arg2;
0057b921          int32_t eax_5 = *(uint32_t*)(ecx_4 - 4);
0057b921          
0057b92b          if (eax_5 != 1)
0057b92b          {
0057b932              PStringBase<char>::append_n_chars(arg4, ecx_4, (eax_5 - 1));
0057b937              ecx_4 = arg2;
0057b92b          }
0057b92b          
0057b93e          int32_t ebx;
0057b93e          int32_t var_10_5 = ebx;
0057b951          char* var_18;
0057b951          
0057b951          if ((InterlockedDecrement((ecx_4 - 0x10)) == 0 && ecx_4 != 0x14))
0057b951          {
0057b953              int32_t edx_2 = *(uint32_t*)(ecx_4 - 0x14);
0057b955              var_18 = 1;
0057b959              *(uint32_t*)edx_2(var_18);
0057b951          }
0057b951          
0057b95b          var_18 = "@consent - Commands to help you …";
0057b964          PStringBase<char>::PStringBase<char>(&arg3, var_18);
0057b969          char* eax_9 = arg3;
0057b96d          int32_t ecx_8 = *(uint32_t*)(eax_9 - 4);
0057b96d          
0057b973          if (ecx_8 != 1)
0057b973          {
0057b976              var_18 = (ecx_8 - 1);
0057b97a              PStringBase<char>::append_n_chars(arg4, eax_9, var_18);
0057b97f              eax_9 = arg3;
0057b973          }
0057b973          
0057b989          var_18 = &eax_9[0xfffffff0];
0057b989          
0057b992          if ((InterlockedDecrement(var_18) == 0 && eax_9 != 0x14))
0057b99a              **(uint32_t**)(eax_9 - 0x14)(1);
0057b99a          
0057b9a5          PStringBase<char>::PStringBase<char>(&arg2, "@corpse - Displays the location …");
0057b9aa          enum ClientCommunicationSystem::HelpType eax_12 = arg2;
0057b9ae          int32_t ecx_13 = *(uint32_t*)(eax_12 - 4);
0057b9ae          
0057b9b4          if (ecx_13 != 1)
0057b9b4          {
0057b9bb              PStringBase<char>::append_n_chars(arg4, eax_12, (ecx_13 - 1));
0057b9c0              eax_12 = arg2;
0057b9b4          }
0057b9b4          
0057b9d3          if ((InterlockedDecrement((eax_12 - 0x10)) == 0 && eax_12 != 0x14))
0057b9db              **(uint32_t**)(eax_12 - 0x14)(1);
0057b9db          
0057b9e6          PStringBase<char>::PStringBase<char>(&__return_addr, "@die - Kills your character and …");
0057b9eb          char* __return_addr_1 = __return_addr;
0057b9ef          int32_t ecx_18 = *(uint32_t*)(__return_addr_1 - 4);
0057b9ef          
0057b9f5          if (ecx_18 != 1)
0057b9f5          {
0057b9fc              PStringBase<char>::append_n_chars(arg4, __return_addr_1, (ecx_18 - 1));
0057ba01              __return_addr_1 = __return_addr;
0057b9f5          }
0057b9f5          
0057ba15          if ((InterlockedDecrement(&__return_addr_1[0xfffffff0]) == 0 && __return_addr_1 != 0x14))
0057ba1d              **(uint32_t**)(__return_addr_1 - 0x14)(1);
0057ba1d          
0057ba29          ClientCommunicationSystem::HelpLifestone(this, Summary_HelpType, "@lifestone", arg4);
0057ba38          ClientCommunicationSystem::HelpMarketplace(this, Summary_HelpType, "@marketplace", arg4);
0057ba47          ClientCommunicationSystem::HelpPKArena(this, Summary_HelpType, "@pkarena", arg4);
0057ba56          ClientCommunicationSystem::HelpPKLArena(this, Summary_HelpType, "@pklarena", arg4);
0057ba5b          esp = &var_18;
0057b8be      }
0057b8be      else
0057b8be      {
0057b8c0          var_c = "@help death - Commands for makin…";
0057b8c5          PStringBase<char>::PStringBase<char>(ecx, var_c);
0057b8ca          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057b8ce          int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057b8ce          
0057b8d4          if (eax != 1)
0057b8d4          {
0057b8d7              var_c = (eax - 1);
0057b8dd              PStringBase<char>::append_n_chars(arg4, ecx_1, var_c);
0057b8e2              ecx_1 = arg2;
0057b8d4          }
0057b8d4          
0057b8ec          var_c = (ecx_1 - 0x10);
0057b8ec          esp = &var_c;
0057b8ec          
0057b8fd          if ((InterlockedDecrement(var_c) == 0 && ecx_1 != 0x14))
0057b8fd          {
0057b909              **(uint32_t**)(ecx_1 - 0x14)(1);
0057b90c              int32_t eax_4;
0057b90c              eax_4 = 1;
0057b90f              return 1;
0057b8fd          }
0057b8be      }
0057ba5c      *(uint32_t*)esp;
0057ba5d      int32_t eax_3;
0057ba5d      eax_3 = 1;
0057ba5c      esp[1];
0057ba60      return 1;
0057b8b0  }

0057ba63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0057ba70  void ClientCommunicationSystem::DieDialogCallback(class PropertyCollection const* arg1)

0057ba70  {
0057ba7e      uint32_t temp1 = (COMBINE(0, 0x92) % arg1->m_hashProperties.m_intrusiveTable.m_numBuckets);
0057ba81      class HashTableData<unsigned long,BaseProperty>** m_buckets = arg1->m_hashProperties.m_intrusiveTable.m_buckets;
0057ba87      char var_9 = 0;
0057ba8b      int32_t* var_8 = nullptr;
0057ba8f      int32_t* var_4 = nullptr;
0057ba96      int32_t* eax_2 = m_buckets[temp1];
0057ba96      
0057ba9a      if (eax_2 != 0)
0057ba9a      {
0057baa6          while (*(uint32_t*)eax_2 != 0x92)
0057baa6          {
0057baa8              eax_2 = eax_2[1];
0057baa8              
0057baad              if (eax_2 == 0)
0057bab3                  return;
0057baa6          }
0057baa6          
0057bab6          if (eax_2 != 0)
0057bab6          {
0057bac0              BaseProperty::operator=(&var_8, &eax_2[2]);
0057bac5              int32_t* ecx_2 = var_4;
0057bac5              
0057bacb              if (ecx_2 != 0)
0057bacb              {
0057bad4                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&var_9);
0057bad7                  ecx_2 = var_4;
0057bacb              }
0057bacb              
0057badf              if (var_9 != 0)
0057badf              {
0057bae1                  CM_Character::Event_Suicide();
0057bae6                  ecx_2 = var_4;
0057badf              }
0057badf              
0057baea              int32_t* eax_4 = var_8;
0057baea              
0057baf0              if (eax_4 != 0)
0057baf0              {
0057bafa                  int32_t edx_4 = (eax_4[1] - 1);
0057baf7                  eax_4[1] = edx_4;
0057baf7                  
0057baff                  if (edx_4 == 0)
0057bb05                      **(uint32_t**)eax_4(1);
0057bb05                  
0057bb07                  ecx_2 = var_4;
0057bb0b                  var_8 = nullptr;
0057baf0              }
0057baf0              
0057bb11              if (ecx_2 != 0)
0057bb11              {
0057bb19                  int32_t edx_7 = (ecx_2[1] - 1);
0057bb16                  ecx_2[1] = edx_7;
0057bb16                  
0057bb1e                  if (edx_7 == 0)
0057bb24                      **(uint32_t**)ecx_2(1);
0057bb11              }
0057bab6          }
0057ba9a      }
0057ba70  }

0057bb2b                                   90 90 90 90 90                                                             .....

0057bb30  uint8_t __fastcall ClientCommunicationSystem::DoEmoteList(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057bb30  {
0057bb33      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057bb3b      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0057bb45      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0057bb54      char* __return;
0057bb54      PStringBase<char>::PStringBase<char>(&__return, "Standard Emotes:\nNote: These co…");
0057bb59      char* __return_1 = __return;
0057bb5d      int32_t eax_1 = *(uint32_t*)(__return_1 - 4);
0057bb5d      
0057bb63      if (eax_1 != 1)
0057bb63      {
0057bb6c          PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, __return_1, (eax_1 - 1));
0057bb71          __return_1 = __return;
0057bb63      }
0057bb63      
0057bb8a      if ((InterlockedDecrement(&__return_1[0xfffffff0]) == 0 && __return_1 != 0x14))
0057bb92          **(uint32_t**)(__return_1 - 0x14)(1);
0057bb92      
0057bbb2      ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &__return, 0), 0, 1, this->m_idCurrentCommandSource);
0057bbbb      void* esi_2 = &__return[0xffffffec];
0057bbbb      
0057bbca      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0057bbd2          **(uint32_t**)esi_2(1);
0057bbd2      
0057bbd8      void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0057bbd8      
0057bbe7      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0057bbef          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0057bbef      
0057bbf3      int32_t eax_9;
0057bbf3      eax_9 = 1;
0057bbf9      return 1;
0057bb30  }

0057bbfc                                                                                      90 90 90 90                              ....

0057bc00  uint8_t __fastcall ClientCommunicationSystem::DoFriends(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057bc00  {
0057bc0f      char*** var_20 = &arg3;
0057bc14      int32_t* var_24 = &arg2;
0057bc19      class PStringBase<unsigned short> var_c;
0057bc19      int32_t* var_28 = &var_c;
0057bc1a      class PStringBase<char>* __return;
0057bc1a      int32_t* edx;
0057bc1a      NextArg(__return, edx, this);
0057bc2b      void* var_4;
0057bc2b      PStringBase<char>::PStringBase<char>(&var_4, &data_7da0d8);
0057bc34      class PStringBase<unsigned short> edi = var_c;
0057bc3a      int32_t eax_1 = _stricmp(edi, var_4);
0057bc4f      char ebx_1 = ((int8_t)-(eax_1));
0057bc53      int32_t* ebp_1 = ((char*)var_4 - 0x14);
0057bc53      
0057bc64      if ((InterlockedDecrement(&ebp_1[1]) == 0 && ebp_1 != 0))
0057bc6d          **(uint32_t**)ebp_1(1);
0057bc6d      
0057bc71      if ((ebx_1 - ebx_1) == 0xff)
0057bc71      {
0057bcbe          PStringBase<char>::PStringBase<char>(&var_4, "remove");
0057bcc9          int32_t eax_8 = _stricmp(edi, var_4);
0057bcd8          ebx_1 = ((int8_t)-(eax_8));
0057bcdc          int32_t* ebp_3 = ((char*)var_4 - 0x14);
0057bcdc          
0057bced          if ((InterlockedDecrement(&ebp_3[1]) == 0 && ebp_3 != 0))
0057bcf6              **(uint32_t**)ebp_3(1);
0057bcf6          
0057bcfa          uint8_t eax_11;
0057bcfa          
0057bcfa          if ((ebx_1 - ebx_1) == 0xff)
0057bcfa          {
0057bd1a              PStringBase<char>::PStringBase<char>(&arg3, "online");
0057bd25              int32_t eax_13 = _stricmp(edi, arg3);
0057bd34              ebx_1 = ((int8_t)-(eax_13));
0057bd38              void* ebp_5 = &arg3[-5];
0057bd38              
0057bd49              if ((InterlockedDecrement(((char*)ebp_5 + 4)) == 0 && ebp_5 != 0))
0057bd52                  **(uint32_t**)ebp_5(1);
0057bd52              
0057bd56              if ((ebx_1 - ebx_1) == 0xff)
0057bd56              {
0057bd92                  PStringBase<char>::PStringBase<char>(&arg3, &data_7e0648);
0057bd9d                  int32_t eax_17 = _stricmp(edi, arg3);
0057bdac                  char ebx_5 = ((int8_t)-(eax_17));
0057bdb0                  void* ebp_7 = &arg3[-5];
0057bdb0                  
0057bdc1                  if ((InterlockedDecrement(((char*)ebp_7 + 4)) == 0 && ebp_7 != 0))
0057bdca                      **(uint32_t**)ebp_7(1);
0057bdca                  
0057bdce                  if ((ebx_5 - ebx_5) != 0xff)
0057bdce                  {
0057bdd0                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057bdd5                      arg3 = PStringBase<char>::s_NullBuffer_1;
0057bddd                      int32_t eax_20;
0057bddd                      class PStringBase<char>* edx_8;
0057bddd                      eax_20 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0057bde7                      char*** var_20_14 = &arg3;
0057bde8                      int32_t var_24_7 = 0;
0057bdf8                      ebx_5 = Proto_UI::SendFriendsCommand(eax_20, edx_8) != 0;
0057bdfb                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057be04                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057be12                      return ebx_5;
0057bdce                  }
0057bdce                  
0057be19                  if (*(uint32_t*)(edi - 4) == 1)
0057be19                  {
0057be1d                      uint8_t eax_23 = CM_Social::SendNotice_ChatCommand_DisplayFriends(0);
0057be2b                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057be39                      return eax_23;
0057be19                  }
0057be19                  
0057be45                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Invalid friends command specifie…");
0057be5e                  ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
0057be67                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057be70                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057be78                  int32_t eax_25;
0057be78                  eax_25 = 1;
0057be7e                  return 1;
0057bd56              }
0057bd56              
0057bd5a              eax_11 = CM_Social::SendNotice_ChatCommand_DisplayFriends(1);
0057bcfa          }
0057bcfa          else
0057bd0a              eax_11 = ClientCommunicationSystem::DoFriendsRemove(this, arg2, arg3);
0057bd0a          
0057bd62          ebx_1 = eax_11;
0057bd62          
0057bd73          if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0057bd7b              **(uint32_t**)(edi - 0x14)(1);
0057bc71      }
0057bc71      else
0057bc71      {
0057bc8d          ebx_1 = ClientCommunicationSystem::DoFriendsAdd(this, arg2, arg3);
0057bc8d          
0057bc9b          if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0057bc9b          {
0057bca7              **(uint32_t**)(edi - 0x14)(1);
0057bcb2              return ebx_1;
0057bc9b          }
0057bc71      }
0057bc71      
0057bd80      int32_t eax_5;
0057bd80      eax_5 = ebx_1;
0057bd86      return eax_5;
0057bc00  }

0057be81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0057be90  void ClientCommunicationSystem::HouseAbandonDialogCallback_Second(class PropertyCollection const* arg1)

0057be90  {
0057be9e      uint32_t temp1 = (COMBINE(0, 0x92) % arg1->m_hashProperties.m_intrusiveTable.m_numBuckets);
0057bea1      class HashTableData<unsigned long,BaseProperty>** m_buckets = arg1->m_hashProperties.m_intrusiveTable.m_buckets;
0057bea7      char var_9 = 0;
0057beab      int32_t* var_8 = nullptr;
0057beaf      int32_t* var_4 = nullptr;
0057beb6      int32_t* eax_2 = m_buckets[temp1];
0057beb6      
0057beba      if (eax_2 != 0)
0057beba      {
0057bec6          while (*(uint32_t*)eax_2 != 0x92)
0057bec6          {
0057bec8              eax_2 = eax_2[1];
0057bec8              
0057becd              if (eax_2 == 0)
0057bed3                  return;
0057bec6          }
0057bec6          
0057bed6          if (eax_2 != 0)
0057bed6          {
0057bee0              BaseProperty::operator=(&var_8, &eax_2[2]);
0057bee5              int32_t* ecx_2 = var_4;
0057bee5              
0057beeb              if (ecx_2 != 0)
0057beeb              {
0057bef4                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&var_9);
0057bef7                  ecx_2 = var_4;
0057beeb              }
0057beeb              
0057beff              if (var_9 != 0)
0057beff              {
0057bf01                  CM_House::Event_AbandonHouse();
0057bf06                  ecx_2 = var_4;
0057beff              }
0057beff              
0057bf0a              int32_t* eax_4 = var_8;
0057bf0a              
0057bf10              if (eax_4 != 0)
0057bf10              {
0057bf1a                  int32_t edx_4 = (eax_4[1] - 1);
0057bf17                  eax_4[1] = edx_4;
0057bf17                  
0057bf1f                  if (edx_4 == 0)
0057bf25                      **(uint32_t**)eax_4(1);
0057bf25                  
0057bf27                  ecx_2 = var_4;
0057bf2b                  var_8 = nullptr;
0057bf10              }
0057bf10              
0057bf31              if (ecx_2 != 0)
0057bf31              {
0057bf39                  int32_t edx_7 = (ecx_2[1] - 1);
0057bf36                  ecx_2[1] = edx_7;
0057bf36                  
0057bf3e                  if (edx_7 == 0)
0057bf44                      **(uint32_t**)ecx_2(1);
0057bf31              }
0057bed6          }
0057beba      }
0057be90  }

0057bf4b                                   90 90 90 90 90                                                             .....

0057bf50  uint8_t __fastcall ClientCommunicationSystem::DoSquelch(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057bf50  {
0057bf50      class ClientCommunicationSystem* var_4 = this;
0057bf53      int32_t edi = arg2;
0057bf53      
0057bf5b      if (edi == 0)
0057bf5b      {
0057bf65          int32_t eax;
0057bf65          eax = gmCCommunicationSystem::DoSquelchQuery() != 0;
0057bf6a          return eax;
0057bf5b      }
0057bf5b      
0057bf6d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057bf72      var_4 = PStringBase<char>::s_NullBuffer_1;
0057bf7a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0057bfa0      int32_t eax_4;
0057bfa0      void* __offset(ClientCommunicationSystem, -0x14) esi_2;
0057bfa0      
0057bfa0      if (ClientCommunicationSystem::ProcessSquelchArgs(this, edi, arg3, 1, &arg2, &var_4, &arg3) != 0)
0057bfa0      {
0057bfbe          if (arg2 == 0)
0057bfbe          {
0057c008              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, var_4);
0057c01b              CM_Communication::Event_ModifyCharacterSquelch(1, 0, &arg2, arg3);
0057c020              int32_t esi_4 = arg2;
0057c020              
0057c039              if ((InterlockedDecrement((esi_4 + 4)) == 0 && esi_4 != 0))
0057c041                  **(uint32_t**)esi_4(1);
0057bfbe          }
0057bfbe          else
0057bfbe          {
0057bfc9              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, var_4);
0057bfd5              CM_Communication::Event_ModifyAccountSquelch(1, &arg2);
0057bfda              int32_t esi_3 = arg2;
0057bfda              
0057bff3              if ((InterlockedDecrement((esi_3 + 4)) == 0 && esi_3 != 0))
0057bffb                  **(uint32_t**)esi_3(1);
0057bfbe          }
0057bfbe          
0057c047          esi_2 = ((char*)var_4 - 0x14);
0057c04e          eax_4 = InterlockedDecrement(((char*)esi_2 + 4));
0057bfa0      }
0057bfa0      else
0057bfa0      {
0057bfa6          esi_2 = ((char*)var_4 - 0x14);
0057bfad          eax_4 = InterlockedDecrement(((char*)esi_2 + 4));
0057bfa0      }
0057bfa0      
0057c056      if ((eax_4 == 0 && esi_2 != 0))
0057c05e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0057c05e      
0057c061      eax_4 = 1;
0057c065      return 1;
0057bf50  }

0057c068                          90 90 90 90 90 90 90 90                                                          ........

0057c070  uint8_t __fastcall ClientCommunicationSystem::DoUnSquelch(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057c070  {
0057c070      class ClientCommunicationSystem* var_4 = this;
0057c073      int32_t edi = arg2;
0057c073      
0057c07b      if (edi == 0)
0057c07b      {
0057c085          int32_t eax;
0057c085          eax = gmCCommunicationSystem::DoSquelchQuery() != 0;
0057c08a          return eax;
0057c07b      }
0057c07b      
0057c08d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057c092      var_4 = PStringBase<char>::s_NullBuffer_1;
0057c09a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0057c0c0      int32_t eax_4;
0057c0c0      void* __offset(ClientCommunicationSystem, -0x14) esi_2;
0057c0c0      
0057c0c0      if (ClientCommunicationSystem::ProcessSquelchArgs(this, edi, arg3, 1, &arg2, &var_4, &arg3) != 0)
0057c0c0      {
0057c0de          if (arg2 == 0)
0057c0de          {
0057c128              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, var_4);
0057c13b              CM_Communication::Event_ModifyCharacterSquelch(0, 0, &arg2, arg3);
0057c140              int32_t esi_4 = arg2;
0057c140              
0057c159              if ((InterlockedDecrement((esi_4 + 4)) == 0 && esi_4 != 0))
0057c161                  **(uint32_t**)esi_4(1);
0057c0de          }
0057c0de          else
0057c0de          {
0057c0e9              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, var_4);
0057c0f5              CM_Communication::Event_ModifyAccountSquelch(0, &arg2);
0057c0fa              int32_t esi_3 = arg2;
0057c0fa              
0057c113              if ((InterlockedDecrement((esi_3 + 4)) == 0 && esi_3 != 0))
0057c11b                  **(uint32_t**)esi_3(1);
0057c0de          }
0057c0de          
0057c167          esi_2 = ((char*)var_4 - 0x14);
0057c16e          eax_4 = InterlockedDecrement(((char*)esi_2 + 4));
0057c0c0      }
0057c0c0      else
0057c0c0      {
0057c0c6          esi_2 = ((char*)var_4 - 0x14);
0057c0cd          eax_4 = InterlockedDecrement(((char*)esi_2 + 4));
0057c0c0      }
0057c0c0      
0057c176      if ((eax_4 == 0 && esi_2 != 0))
0057c17e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0057c17e      
0057c181      eax_4 = 1;
0057c185      return 1;
0057c070  }

0057c188                          90 90 90 90 90 90 90 90                                                          ........

0057c190  uint8_t __thiscall ClientCommunicationSystem::HelpSquelch(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057c190  {
0057c190      enum ClientCommunicationSystem::HelpType eax_13 = arg2;
0057c19a      enum ClientCommunicationSystem::HelpType* ecx = &arg2;
0057c19e      int32_t eax_3;
0057c19e      int32_t* esi_1;
0057c19e      
0057c19e      if (eax_13 == Summary_HelpType)
0057c19e      {
0057c1a5          PStringBase<char>::PStringBase<char>(ecx, "@help squelch - Commands that le…");
0057c1aa          enum ClientCommunicationSystem::HelpType esi = arg2;
0057c1ae          int32_t eax = *(uint32_t*)(esi - 4);
0057c1ae          
0057c1b4          if (eax != 1)
0057c1b4          {
0057c1bd              PStringBase<char>::append_n_chars(arg4, esi, (eax - 1));
0057c1c2              esi = arg2;
0057c1b4          }
0057c1b4          
0057c1c6          esi_1 = (esi - 0x14);
0057c1cd          eax_3 = InterlockedDecrement(&esi_1[1]);
0057c19e      }
0057c19e      else if (eax_13 != List_HelpType)
0057c1db      {
0057c21a          PStringBase<char>::PStringBase<char>(ecx, "The @squelch commands let you bl…");
0057c21f          enum ClientCommunicationSystem::HelpType ecx_4 = arg2;
0057c223          int32_t eax_7 = *(uint32_t*)(ecx_4 - 4);
0057c229          class PStringBase<char>* esi_2 = arg4;
0057c229          
0057c22d          if (eax_7 != 1)
0057c22d          {
0057c234              PStringBase<char>::append_n_chars(esi_2, ecx_4, (eax_7 - 1));
0057c239              ecx_4 = arg2;
0057c22d          }
0057c22d          
0057c254          if ((InterlockedDecrement((ecx_4 - 0x10)) == 0 && ecx_4 != 0x14))
0057c25c              **(uint32_t**)(ecx_4 - 0x14)(1);
0057c25c          
0057c268          ClientCommunicationSystem::HelpAdvancedSquelch(this, Detail_HelpType, &data_7928af, esi_2);
0057c277          ClientCommunicationSystem::HelpAdvancedUnSquelch(this, Detail_HelpType, &data_7928af, esi_2);
0057c285          PStringBase<char>::PStringBase<char>(&arg4, "Type @messagetypes for a complet…");
0057c28a          class PStringBase<char>* ecx_10 = arg4;
0057c28e          int32_t m_charbuffer = ecx_10->m_charbuffer;
0057c28e          
0057c294          if (m_charbuffer != 1)
0057c294          {
0057c29b              PStringBase<char>::append_n_chars(esi_2, ecx_10, (m_charbuffer - 1));
0057c2a0              ecx_10 = arg4;
0057c294          }
0057c294          
0057c2a4          esi_1 = &ecx_10[-5];
0057c2ab          eax_3 = InterlockedDecrement(&esi_1[1]);
0057c1db      }
0057c1db      else
0057c1db      {
0057c1e2          PStringBase<char>::PStringBase<char>(ecx, "@squelch - Squelches a character…");
0057c1e7          enum ClientCommunicationSystem::HelpType ecx_2 = arg2;
0057c1eb          int32_t eax_4 = *(uint32_t*)(ecx_2 - 4);
0057c1eb          
0057c1f1          if (eax_4 != 1)
0057c1f1          {
0057c1fa              PStringBase<char>::append_n_chars(arg4, ecx_2, (eax_4 - 1));
0057c1ff              ecx_2 = arg2;
0057c1f1          }
0057c1f1          
0057c203          esi_1 = (ecx_2 - 0x14);
0057c20a          eax_3 = InterlockedDecrement(&esi_1[1]);
0057c1db      }
0057c1db      
0057c2b5      if ((eax_3 == 0 && esi_1 != 0))
0057c2bd          **(uint32_t**)esi_1(1);
0057c2bd      
0057c2c0      eax_3 = 1;
0057c2c3      return 1;
0057c190  }

0057c2c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0057c2d0  uint8_t __fastcall ClientCommunicationSystem::PerformGlobalSquelchMod(class ClientCommunicationSystem* this, int32_t arg2, char** arg3, uint8_t arg4)

0057c2d0  {
0057c2d0      class ClientCommunicationSystem* var_4 = this;
0057c2d1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057c2d8      var_4 = PStringBase<char>::s_NullBuffer_1;
0057c2e2      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0057c2e8      int32_t eax_1 = arg2;
0057c2e8      
0057c2ee      if (eax_1 == 0)
0057c2ee      {
0057c2fb          int32_t ebx;
0057c2fb          ebx = gmCCommunicationSystem::DoGlobalSquelchQuery() != 0;
0057c2fe          void* __offset(ClientCommunicationSystem, -0x14) esi_2 = ((char*)var_4 - 0x14);
0057c2fe          
0057c311          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0057c319              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0057c319          
0057c31c          int32_t eax_4;
0057c31c          eax_4 = ebx;
0057c320          return eax_4;
0057c2ee      }
0057c2ee      
0057c323      char** ecx_2 = arg3;
0057c32d      int32_t eax_7;
0057c32d      void* __offset(ClientCommunicationSystem, -0x14) esi_4;
0057c32d      wchar16 const* const var_14;
0057c32d      
0057c32d      if (**(uint8_t**)ecx_2 == 0x2d)
0057c32d      {
0057c352          if (ClientCommunicationSystem::ProcessSquelchArgs(this, eax_1, ecx_2, 0, &arg2, &var_4, &arg3) != 0)
0057c352          {
0057c379              if ((arg2 == 1 || var_4->vtable != 1))
0057c379              {
0057c3a0                  var_14 = u"Incorrect usage, use @help for p…";
0057c3a0                  goto label_57c3a9;
0057c379              }
0057c379              
0057c386              CM_Communication::Event_ModifyGlobalSquelch(((uint32_t)arg4), arg3);
0057c392              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057c399              int32_t eax_9;
0057c399              eax_9 = 1;
0057c39d              return 1;
0057c352          }
0057c352          
0057c358          esi_4 = ((char*)var_4 - 0x14);
0057c35f          eax_7 = InterlockedDecrement(((char*)esi_4 + 4));
0057c32d      }
0057c32d      else
0057c32d      {
0057c32f          var_14 = u"You must specify a valid message…";
0057c3a9      label_57c3a9:
0057c3a9          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg4, var_14);
0057c3c0          ClientSystem::AddTextToScroll(this, &arg4, 0x1a, 1, this->m_idCurrentCommandSource);
0057c3cf          int32_t* esi_6 = (arg4 - 0x14);
0057c3cf          
0057c3de          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0057c3e6              **(uint32_t**)esi_6(1);
0057c3e6          
0057c3ec          esi_4 = ((char*)var_4 - 0x14);
0057c3f3          eax_7 = InterlockedDecrement(((char*)esi_4 + 4));
0057c32d      }
0057c32d      
0057c3fb      if ((eax_7 == 0 && esi_4 != 0))
0057c403          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0057c403      
0057c407      eax_7 = 1;
0057c40b      return 1;
0057c2d0  }

0057c40e                                            90 90                                                                ..

0057c410  uint8_t __thiscall ClientCommunicationSystem::HelpStatusGroup(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0057c410  {
0057c416      int32_t esi;
0057c416      int32_t var_4 = esi;
0057c417      int32_t edi;
0057c417      int32_t var_8 = edi;
0057c41a      char const* const* esp;
0057c41a      char const* const var_c;
0057c41a      
0057c41a      if (arg2 != Summary_HelpType)
0057c41a      {
0057c472          class PStringBase<char>* esi_3 = arg4;
0057c476          var_c = esi_3;
0057c477          char const* const var_10_3 = "@age";
0057c47c          char* var_14 = nullptr;
0057c480          ClientCommunicationSystem::HelpAge(this, var_14, var_10_3, var_c);
0057c485          var_c = esi_3;
0057c486          char const* const var_10_4 = "@birth";
0057c48b          var_14 = nullptr;
0057c48f          ClientCommunicationSystem::HelpBirth(this, var_14, var_10_4, var_c);
0057c494          var_c = esi_3;
0057c495          char* var_10_5 = "@day";
0057c49a          var_14 = nullptr;
0057c49e          ClientCommunicationSystem::HelpDay(this, var_14, var_10_5, var_c);
0057c4a3          var_c = "@endurance - Explains how endura…";
0057c4ac          PStringBase<char>::PStringBase<char>(&arg4, var_c);
0057c4b1          class PStringBase<char>* ecx_8 = arg4;
0057c4b5          int32_t m_charbuffer = ecx_8->m_charbuffer;
0057c4b5          
0057c4bb          if (m_charbuffer != 1)
0057c4bb          {
0057c4be              var_c = (m_charbuffer - 1);
0057c4c2              PStringBase<char>::append_n_chars(esi_3, ecx_8, var_c);
0057c4c7              ecx_8 = arg4;
0057c4bb          }
0057c4bb          
0057c4cb          char* ebx;
0057c4cb          var_c = ebx;
0057c4cf          int32_t ebp;
0057c4cf          int32_t var_10_7 = ebp;
0057c4d9          var_14 = &ecx_8[-4];
0057c4d9          
0057c4e2          if ((InterlockedDecrement(var_14) == 0 && ecx_8 != 0x14))
0057c4ea              *(uint32_t*)*(int32_t*)((char*)ecx_8 + -0x14)(1);
0057c4ea          
0057c4f6          ClientCommunicationSystem::HelpFrameRate(this, Summary_HelpType, "@framerate", esi_3);
0057c504          PStringBase<char>::PStringBase<char>(&arg3, "@loc - Displays your current pos…");
0057c509          char const* ecx_13 = arg3;
0057c50d          int32_t eax_8 = *(uint32_t*)(ecx_13 - 4);
0057c50d          
0057c513          if (eax_8 != 1)
0057c513          {
0057c51a              PStringBase<char>::append_n_chars(esi_3, ecx_13, (eax_8 - 1));
0057c51f              ecx_13 = arg3;
0057c513          }
0057c513          
0057c532          if ((InterlockedDecrement(&ecx_13[0xfffffff0]) == 0 && ecx_13 != 0x14))
0057c53a              **(uint32_t**)(ecx_13 - 0x14)(1);
0057c53a          
0057c545          PStringBase<char>::PStringBase<char>(&arg2, "@pklite - Sets your status to Pl…");
0057c54a          char* ebx_3 = arg2;
0057c54e          int32_t eax_12 = *(uint32_t*)(ebx_3 - 4);
0057c54e          
0057c554          if (eax_12 != 1)
0057c554          {
0057c55b              PStringBase<char>::append_n_chars(esi_3, ebx_3, (eax_12 - 1));
0057c560              ebx_3 = arg2;
0057c554          }
0057c554          
0057c573          if ((InterlockedDecrement(&ebx_3[0xfffffff0]) == 0 && ebx_3 != 0x14))
0057c57b              **(uint32_t**)(ebx_3 - 0x14)(1);
0057c57b          
0057c587          ClientCommunicationSystem::HelpVersion(this, Summary_HelpType, "@version", esi_3);
0057c58d          esp = &var_14;
0057c41a      }
0057c41a      else
0057c41a      {
0057c41c          var_c = "@help status - Commands that dis…";
0057c425          PStringBase<char>::PStringBase<char>(&arg2, var_c);
0057c42a          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057c42e          int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057c42e          
0057c434          if (eax != 1)
0057c434          {
0057c437              var_c = (eax - 1);
0057c43d              PStringBase<char>::append_n_chars(arg4, ecx_1, var_c);
0057c442              ecx_1 = arg2;
0057c434          }
0057c434          
0057c44c          var_c = (ecx_1 - 0x10);
0057c44c          esp = &var_c;
0057c44c          
0057c45d          if ((InterlockedDecrement(var_c) == 0 && ecx_1 != 0x14))
0057c45d          {
0057c469              **(uint32_t**)(ecx_1 - 0x14)(1);
0057c46c              int32_t eax_4;
0057c46c              eax_4 = 1;
0057c46f              return 1;
0057c45d          }
0057c41a      }
0057c58e      *(uint32_t*)esp;
0057c58f      int32_t eax_3;
0057c58f      eax_3 = 1;
0057c58e      esp[1];
0057c592      return 1;
0057c410  }

0057c595                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0057c5a0  uint8_t __fastcall ClientCommunicationSystem::DoAge(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057c5a0  {
0057c5a1      uint32_t ACCWeenieObject::selectedID_1 = 0;
0057c5a1      
0057c5aa      if (ClientCommunicationSystem::PlayerIsPSR(this) != 0)
0057c5aa      {
0057c5ac          ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0057c5ac          
0057c5b4          if (ACCWeenieObject::selectedID_1 != 0)
0057c5b4          {
0057c5b7              class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
0057c5b7              
0057c5c1              if (eax_1 == 0)
0057c5c1              {
0057c5c3                  eax_1 = 0;
0057c5c6                  return 0;
0057c5c1              }
0057c5c1              
0057c5d2              if (eax_1->vtable->IsPlayer() == 0)
0057c5d4                  ACCWeenieObject::selectedID_1 = 0;
0057c5b4          }
0057c5aa      }
0057c5aa      
0057c5e0      return CM_Character::Event_QueryAge(ACCWeenieObject::selectedID_1);
0057c5a0  }

0057c5e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0057c5f0  uint8_t __fastcall ClientCommunicationSystem::DoEndurance(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057c5f0  {
0057c5f3      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057c5fb      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0057c605      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0057c614      char* __return;
0057c614      PStringBase<char>::PStringBase<char>(&__return, "The endurance attribute has a nu…");
0057c619      char* __return_1 = __return;
0057c61d      int32_t eax_1 = *(uint32_t*)(__return_1 - 4);
0057c61d      
0057c623      if (eax_1 != 1)
0057c623      {
0057c62c          PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, __return_1, (eax_1 - 1));
0057c631          __return_1 = __return;
0057c623      }
0057c623      
0057c64a      if ((InterlockedDecrement(&__return_1[0xfffffff0]) == 0 && __return_1 != 0x14))
0057c652          **(uint32_t**)(__return_1 - 0x14)(1);
0057c652      
0057c672      ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &__return, 0), 0, 1, this->m_idCurrentCommandSource);
0057c67b      void* esi_2 = &__return[0xffffffec];
0057c67b      
0057c68a      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0057c692          **(uint32_t**)esi_2(1);
0057c692      
0057c698      void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0057c698      
0057c6a7      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0057c6af          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0057c6af      
0057c6b3      int32_t eax_9;
0057c6b3      eax_9 = 1;
0057c6b9      return 1;
0057c5f0  }

0057c6bc                                                                                      90 90 90 90                              ....

0057c6c0  uint8_t __thiscall ClientCommunicationSystem::HelpTextGroup(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0057c6c0  {
0057c6c6      int32_t ebp;
0057c6c6      int32_t var_4 = ebp;
0057c6c7      int32_t esi;
0057c6c7      int32_t var_8 = esi;
0057c6ca      char const* const* esp;
0057c6ca      char const* const var_c;
0057c6ca      
0057c6ca      if (arg2 != Summary_HelpType)
0057c6ca      {
0057c722          char* edi;
0057c722          var_c = edi;
0057c723          class PStringBase<char>* edi_1 = arg4;
0057c728          char* var_14_1 = "@clear";
0057c72d          char* var_18 = nullptr;
0057c731          ClientCommunicationSystem::HelpClear(this, var_18, var_14_1, edi_1);
0057c73f          PStringBase<char>::PStringBase<char>(&arg4, "@filter - Commands to filter out…");
0057c744          class PStringBase<char>* ecx_6 = arg4;
0057c748          int32_t m_charbuffer = ecx_6->m_charbuffer;
0057c748          
0057c74e          if (m_charbuffer != 1)
0057c74e          {
0057c755              PStringBase<char>::append_n_chars(edi_1, ecx_6, (m_charbuffer - 1));
0057c75a              ecx_6 = arg4;
0057c74e          }
0057c74e          
0057c761          int32_t ebx;
0057c761          int32_t var_10_6 = ebx;
0057c761          
0057c774          if ((InterlockedDecrement(&ecx_6[-4]) == 0 && ecx_6 != 0x14))
0057c774          {
0057c776              class PStringBase<char> edx_2 = *(int32_t*)((char*)ecx_6 + -0x14);
0057c778              var_18 = 1;
0057c77c              *(uint32_t*)edx_2(var_18);
0057c774          }
0057c774          
0057c77e          var_18 = "@unfilter - Commands to remove f…";
0057c787          PStringBase<char>::PStringBase<char>(&arg3, var_18);
0057c78c          char* eax_8 = arg3;
0057c790          int32_t ecx_10 = *(uint32_t*)(eax_8 - 4);
0057c790          
0057c796          if (ecx_10 != 1)
0057c796          {
0057c799              var_18 = (ecx_10 - 1);
0057c79d              PStringBase<char>::append_n_chars(edi_1, eax_8, var_18);
0057c7a2              eax_8 = arg3;
0057c796          }
0057c796          
0057c7ac          var_18 = &eax_8[0xfffffff0];
0057c7ac          
0057c7b5          if ((InterlockedDecrement(var_18) == 0 && eax_8 != 0x14))
0057c7bd              **(uint32_t**)(eax_8 - 0x14)(1);
0057c7bd          
0057c7c8          PStringBase<char>::PStringBase<char>(&arg2, "@loadfile - Reads in the given t…");
0057c7cd          enum ClientCommunicationSystem::HelpType eax_11 = arg2;
0057c7d1          int32_t ecx_15 = *(uint32_t*)(eax_11 - 4);
0057c7d1          
0057c7d7          if (ecx_15 != 1)
0057c7d7          {
0057c7de              PStringBase<char>::append_n_chars(edi_1, eax_11, (ecx_15 - 1));
0057c7e3              eax_11 = arg2;
0057c7d7          }
0057c7d7          
0057c7f6          if ((InterlockedDecrement((eax_11 - 0x10)) == 0 && eax_11 != 0x14))
0057c7fe              **(uint32_t**)(eax_11 - 0x14)(1);
0057c7fe          
0057c809          PStringBase<char>::PStringBase<char>(&__return_addr, "@log - Commands to echo chat tex…");
0057c80e          char* __return_addr_1 = __return_addr;
0057c812          int32_t ecx_20 = *(uint32_t*)(__return_addr_1 - 4);
0057c812          
0057c818          if (ecx_20 != 1)
0057c818          {
0057c81f              PStringBase<char>::append_n_chars(edi_1, __return_addr_1, (ecx_20 - 1));
0057c824              __return_addr_1 = __return_addr;
0057c818          }
0057c818          
0057c838          if ((InterlockedDecrement(&__return_addr_1[0xfffffff0]) == 0 && __return_addr_1 != 0x14))
0057c840              **(uint32_t**)(__return_addr_1 - 0x14)(1);
0057c840          
0057c84c          ClientCommunicationSystem::HelpTitle(this, Summary_HelpType, "@title", edi_1);
0057c851          esp = &var_18;
0057c6ca      }
0057c6ca      else
0057c6ca      {
0057c6cc          var_c = "@help text - Commands that help …";
0057c6d5          PStringBase<char>::PStringBase<char>(&arg2, var_c);
0057c6da          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057c6de          int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057c6de          
0057c6e4          if (eax != 1)
0057c6e4          {
0057c6e7              var_c = (eax - 1);
0057c6ed              PStringBase<char>::append_n_chars(arg4, ecx_1, var_c);
0057c6f2              ecx_1 = arg2;
0057c6e4          }
0057c6e4          
0057c6fc          var_c = (ecx_1 - 0x10);
0057c6fc          esp = &var_c;
0057c6fc          
0057c70d          if ((InterlockedDecrement(var_c) == 0 && ecx_1 != 0x14))
0057c70d          {
0057c719              **(uint32_t**)(ecx_1 - 0x14)(1);
0057c71c              int32_t eax_4;
0057c71c              eax_4 = 1;
0057c71f              return 1;
0057c70d          }
0057c6ca      }
0057c852      *(uint32_t*)esp;
0057c853      int32_t eax_3;
0057c853      eax_3 = 1;
0057c852      esp[1];
0057c856      return 1;
0057c6c0  }

0057c859                                                                             90 90 90 90 90 90 90                           .......

0057c860  uint8_t __thiscall ClientCommunicationSystem::DoFilter(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057c860  {
0057c868      int32_t var_4 = 1;
0057c871      return ClientCommunicationSystem::PerformGlobalSquelchMod(this, arg2, arg2, arg3);
0057c860  }

0057c874                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0057c880  uint8_t __thiscall ClientCommunicationSystem::DoUnFilter(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057c880  {
0057c888      int32_t var_4 = 0;
0057c891      return ClientCommunicationSystem::PerformGlobalSquelchMod(this, arg2, arg2, arg3);
0057c880  }

0057c894                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0057c8a0  uint8_t __thiscall ClientCommunicationSystem::StartCopyOutputToFile(class ClientCommunicationSystem* this, class PStringBase<char> const* arg2)

0057c8a0  {
0057c8a4      ClientCommunicationSystem::CloseLogFile(this);
0057c8bb      ClientSystem::s_pLogFile = fopen(arg2->m_charbuffer, &data_7e0ab0);
0057c8c0      class PSRefBufferCharData<char>* m_charbuffer = this->m_strLogName.m_charbuffer;
0057c8c0      
0057c8cd      if (m_charbuffer != arg2->m_charbuffer)
0057c8cd      {
0057c8cf          int32_t ebx;
0057c8cf          int32_t var_c_1 = ebx;
0057c8cf          
0057c8e3          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0057c8eb              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0057c8eb          
0057c8ed          class PStringBase<char> m_charbuffer_1 = arg2->m_charbuffer;
0057c8ef          this->m_strLogName.m_charbuffer = m_charbuffer_1;
0057c8f9          InterlockedIncrement((m_charbuffer_1 - 0x10));
0057c8cd      }
0057c8cd      
0057c90f      return ClientSystem::s_pLogFile != 0;
0057c8a0  }

0057c912                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0057c920  void __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* this, uint32_t arg2)

0057c920  {
0057c92b      arg2 = arg2;
0057c92f      uint8_t edx = ((int8_t)arg2);
0057c933      this->m_buckets = nullptr;
0057c936      this->m_firstInterestingBucket = nullptr;
0057c939      this->m_numBuckets = 0;
0057c93c      this->m_numElements = 0;
0057c940      this->vtable = 0x7d00dc;
0057c946      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0057c959      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0057c959      
0057c963      if (eax == bucketSizesEnd_1)
0057c965          eax -= 4;
0057c965      
0057c968      uint32_t eax_1 = *(uint32_t*)eax;
0057c96d      this->m_numBuckets = eax_1;
0057c96d      
0057c970      if (eax_1 > 0x17)
0057c986          this->m_buckets = operator new[]((eax_1 << 2));
0057c970      else
0057c975          this->m_buckets = &this->m_aInplaceBuckets;
0057c975      
0057c98c      class ClientCommunicationSystem::CmdHashData** m_buckets = this->m_buckets;
0057c98f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0057c995      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0057c9a6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0057c920  }

0057c9af                                               90                                                                 .

0057c9b0  void __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* this, class ClientCommunicationSystem::CmdHashData* arg2)

0057c9b0  {
0057c9be      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
0057c9c2          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::grow(this);
0057c9c2      
0057c9d9      uint32_t temp1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<char> >::case_insensitive_hash(arg2)) % this->m_numBuckets);
0057c9db      class ClientCommunicationSystem::CmdHashData** m_buckets = this->m_buckets;
0057c9e1      arg2->m_hashNext = m_buckets[temp1];
0057c9e4      m_buckets[temp1] = arg2;
0057c9ec      class ClientCommunicationSystem::CmdHashData** eax_3 = &m_buckets[temp1];
0057c9ec      
0057c9f1      if (eax_3 < this->m_firstInterestingBucket)
0057c9f3          this->m_firstInterestingBucket = eax_3;
0057c9f3      
0057c9f6      this->m_numElements += 1;
0057c9b0  }

0057c9fd                                                                                         90 90 90                               ...

0057ca00  uint8_t __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::resize_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* this, uint32_t arg2)

0057ca00  {
0057ca01      uint32_t ebp = arg2;
0057ca01      
0057ca0b      if (ebp == this->m_numBuckets)
0057ca0b      {
0057ca0e          int32_t eax;
0057ca0e          eax = 0;
0057ca11          return 0;
0057ca0b      }
0057ca0b      
0057ca19      class CaseInsensitiveStringBase<PStringBase<char> >* i_1 = nullptr;
0057ca19      
0057ca1d      while (this->m_numElements != 0)
0057ca1d      {
0057ca26          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0057ca2c          class CaseInsensitiveStringBase<PStringBase<char> >* i_2;
0057ca2c          int32_t* m_firstInterestingBucket_2;
0057ca2c          
0057ca2c          if (this->m_firstInterestingBucket == ecx_1)
0057ca2c          {
0057ca42          label_57ca42:
0057ca42              m_firstInterestingBucket_2 = nullptr;
0057ca44              i_2 = nullptr;
0057ca2c          }
0057ca2c          else
0057ca2c          {
0057ca30              while (true)
0057ca30              {
0057ca30                  class ClientCommunicationSystem::CmdHashData** m_firstInterestingBucket = this->m_firstInterestingBucket;
0057ca30                  
0057ca36                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0057ca36                  {
0057ca48                      class CaseInsensitiveStringBase<PStringBase<char> >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0057ca4b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0057ca4d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0057ca4d                      break;
0057ca36                  }
0057ca36                  
0057ca3d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0057ca3d                  
0057ca40                  if (&m_firstInterestingBucket[1] == ecx_1)
0057ca40                      goto label_57ca42;
0057ca30              }
0057ca2c          }
0057ca2c          
0057ca4f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0057ca4f          
0057ca53          if (eax_4 == i_2)
0057ca65              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0057ca53          else
0057ca53          {
0057ca5c              void* edx_1;
0057ca5c              
0057ca5c              do
0057ca5c              {
0057ca55                  edx_1 = eax_4;
0057ca57                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0057ca5c              } while (eax_4 != i_2);
0057ca5c              
0057ca60              if (edx_1 != 0)
0057ca6c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0057ca60              else
0057ca65                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0057ca53          }
0057ca53          
0057ca6f          this->m_numElements -= 1;
0057ca72          *(int32_t*)((char*)i_2 + 4) = i_1;
0057ca7a          i_1 = i_2;
0057ca1d      }
0057ca1d      
0057ca7e      class ClientCommunicationSystem::CmdHashData** m_buckets = this->m_buckets;
0057ca7e      
0057ca86      if (m_buckets != &this->m_aInplaceBuckets)
0057ca89          operator delete[](m_buckets);
0057ca89      
0057ca96      this->m_buckets = nullptr;
0057ca99      this->m_firstInterestingBucket = nullptr;
0057ca9c      this->m_numBuckets = 0;
0057ca9f      this->m_numElements = 0;
0057caa2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
0057caa9      void* eax_7;
0057caa9      
0057caa9      if (i_1 != 0)
0057caa9      {
0057cb31          class CaseInsensitiveStringBase<PStringBase<char> >* i;
0057cb31          
0057cb31          do
0057cb31          {
0057cab0              uint32_t m_numBuckets = this->m_numBuckets;
0057cab6              i = *(int32_t*)((char*)i_1 + 4);
0057cab6              
0057cabf              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0057cabf              {
0057cac1                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0057cac7                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0057cacd                  arg2 = m_numBuckets;
0057cadf                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0057cadf                  
0057cae9                  if (eax_8 != bucketSizesEnd_1)
0057caf2                      eax_8 = &eax_8[1];
0057cae9                  else
0057cae9                  {
0057caeb                      eax_8 -= 4;
0057caeb                      
0057caf0                      if (eax_8 != bucketSizesEnd_1)
0057caf2                          eax_8 = &eax_8[1];
0057cae9                  }
0057cae9                  
0057cafa                  IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::resize_internal(this, *(uint32_t*)eax_8);
0057cabf              }
0057cabf              
0057cb0b              uint32_t temp1_1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<char> >::case_insensitive_hash(i_1)) % this->m_numBuckets);
0057cb0d              class ClientCommunicationSystem::CmdHashData** m_buckets_1 = this->m_buckets;
0057cb13              *(int32_t*)((char*)i_1 + 4) = m_buckets_1[temp1_1];
0057cb16              m_buckets_1[temp1_1] = i_1;
0057cb1c              eax_7 = &m_buckets_1[temp1_1];
0057cb1c              
0057cb21              if (eax_7 < this->m_firstInterestingBucket)
0057cb23                  this->m_firstInterestingBucket = eax_7;
0057cb23              
0057cb2c              this->m_numElements += 1;
0057cb2f              i_1 = i;
0057cb31          } while (i != 0);
0057caa9      }
0057caa9      
0057cb3a      eax_7 = 1;
0057cb3d      return 1;
0057ca00  }


0057cb40  void __thiscall ClientCommunicationSystem::OnQualityChanged(class ClientCommunicationSystem* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

0057cb40  {
0057cb5e      if (CBaseQualities::InqBool((*(int32_t*)((char*)arg2 + 0x14c) + 0x38), 0x6e, &arg2) != 0)
0057cb5e      {
0057cb6f          if (arg2 != 0)
0057cb6f          {
0057cb76              ClientSystem::AddTextToScroll(((char*)this - 8), "You are now set to away-from-key…", 0, 1, 0);
0057cb7c              return;
0057cb6f          }
0057cb6f          
0057cb84          ClientSystem::AddTextToScroll(((char*)this - 8), "You are no longer set to away-fr…", 0, 1, 0);
0057cb5e      }
0057cb40  }

0057cb8d                                         90 90 90                                                               ...

0057cb90  uint32_t __stdcall ClientCommunicationSystem::Handle_Communication__WeenieErrorWithString(class ClientCommunicationSystem* this @ ecx, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3)

0057cb90  {
0057cbb4      ClientCommunicationSystem::HandleFailureEvent(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, WidthConvert, &arg3->m_buffer->m_data), arg2, &arg3);
0057cbbd      void* __offset(AC1Legacy::PStringBase<char>, -0x14) esi_3 = &arg3[-5];
0057cbbd      
0057cbd0      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0057cbd8          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0057cbd8      
0057cbdd      return 0;
0057cb90  }


0057cbe0  uint32_t __thiscall ClientCommunicationSystem::Handle_Communication__HearEmote(class ClientCommunicationSystem* this, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3, class AC1Legacy::PStringBase<char> const* arg4)

0057cbe0  {
0057cbe8      class AC1Legacy::PStringBase<char> ebp;
0057cbe8      class AC1Legacy::PStringBase<char> var_28 = ebp;
0057cbe9      int32_t esi;
0057cbe9      int32_t var_2c = esi;
0057cbea      uint32_t edi;
0057cbea      uint32_t var_30 = edi;
0057cbeb      uint32_t var_34 = 0xc;
0057cbed      uint32_t var_38 = arg2;
0057cbf7      uint32_t* esp = &var_30;
0057cbf7      
0057cbfc      if (gmCCommunicationSystem::CanHear(var_38, var_34) != 0)
0057cbfc      {
0057cc04          int32_t var_1c = 0;
0057cc08          uint32_t var_14 = 0;
0057cc0c          int32_t __return_1 = CPlayerSystem::IsOlthoi();
0057cc15          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg3->m_buffer;
0057cc20          var_34 = &m_buffer_1->m_cRef;
0057cc21          int32_t __return = __return_1;
0057cc25          arg2 = m_buffer_1;
0057cc29          InterlockedIncrement(var_34);
0057cc2f          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg4->m_buffer;
0057cc31          class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = m_buffer;
0057cc38          var_34 = &m_buffer->m_cRef;
0057cc39          InterlockedIncrement(var_34);
0057cc3b          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0057cc40          arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0057cc47          var_34 = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
0057cc48          InterlockedIncrement(var_34);
0057cc4a          var_34 = &data_7d0e98;
0057cc53          int32_t* var_c;
0057cc53          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, var_34);
0057cc58          int32_t* edi_1 = var_c;
0057cc65          var_34 = &edi_1[5];
0057cc66          char (* esi_1)[0x1] = &m_buffer_1->m_data;
0057cc69          var_38 = esi_1;
0057cc6a          int32_t eax_5 = strstr(var_38, var_34);
0057cc71          void* eax_6;
0057cc71          
0057cc71          if (eax_5 != 0)
0057cc7a              eax_6 = ((eax_5 - m_buffer_1) - 0x14);
0057cc71          else
0057cc73              eax_6 = 0xffffffff;
0057cc73          
0057cc82          var_34 = &edi_1[1];
0057cc83          m_buffer_1 = eax_6 >= 0;
0057cc86          int32_t eax_8;
0057cc86          uint32_t ecx_3;
0057cc86          eax_8 = InterlockedDecrement(var_34);
0057cc86          
0057cc92          if ((eax_8 == 0 && edi_1 != 0))
0057cc92          {
0057cc94              int32_t eax_9 = *(uint32_t*)edi_1;
0057cc96              var_34 = 1;
0057cc9a              ecx_3 = *(uint32_t*)eax_9(var_34);
0057cc92          }
0057cc92          
0057cc9e          int32_t ebp_1;
0057cc9e          
0057cc9e          if (m_buffer_1 == 0)
0057cc9e          {
0057ccc5              var_34 = &data_7d0e94;
0057ccce              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, var_34);
0057ccd3              int32_t* edi_2 = var_c;
0057ccda              var_34 = &edi_2[5];
0057ccdb              var_38 = esi_1;
0057ccdc              int32_t eax_10 = strstr(var_38, var_34);
0057cce3              int32_t eax_11;
0057cce3              
0057cce3              if (eax_10 != 0)
0057ccee                  eax_11 = ((eax_10 - arg2) - 0x14);
0057cce3              else
0057cce5                  eax_11 = 0xffffffff;
0057cce5              
0057ccf6              var_34 = &edi_2[1];
0057ccf7              m_buffer_1 = eax_11 >= 0;
0057ccfa              int32_t eax_13;
0057ccfa              uint32_t ecx_9;
0057ccfa              eax_13 = InterlockedDecrement(var_34);
0057ccfa              
0057cd06              if ((eax_13 == 0 && edi_2 != 0))
0057cd06              {
0057cd08                  int32_t eax_14 = *(uint32_t*)edi_2;
0057cd0a                  var_34 = 1;
0057cd0e                  ecx_9 = *(uint32_t*)eax_14(var_34);
0057cd06              }
0057cd06              
0057cd12              if (m_buffer_1 == 0)
0057cd39                  ebp_1 = var_1c;
0057cd12              else
0057cd12              {
0057cd14                  var_34 = ecx_9;
0057cd17                  var_38 = &data_7d0e94;
0057cd1c                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_34, var_38);
0057cd21                  var_38 = 1;
0057cd29                  AC1Legacy::PStringBase<char>::trim(&arg2, 0, var_38, var_34);
0057cd2e                  ebp_1 = 1;
0057cd12              }
0057cc9e          }
0057cc9e          else
0057cc9e          {
0057cca0              var_34 = ecx_3;
0057cca3              var_38 = &data_7d0e98;
0057cca8              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_34, var_38);
0057ccad              var_38 = 1;
0057ccb6              AC1Legacy::PStringBase<char>::trim(&arg2, 0, var_38, var_34);
0057ccbb              var_14 = 1;
0057cd39              ebp_1 = var_1c;
0057cc9e          }
0057cc9e          
0057cd47          int32_t ebx_1;
0057cd47          
0057cd47          if ((ebp_1 == __return || var_14 != 0))
0057cd50              ebx_1 = 0;
0057cd47          else
0057cd49              ebx_1 = 1;
0057cd49          
0057cd56          var_34 = &var_14;
0057cd5b          var_38 = 0x7cfe98;
0057cd61          int32_t var_10_1 = 0;
0057cd65          var_14 = 0;
0057cd70          InterfaceSystem::GetClass(InterfaceSystem::GetInstance(), &__return, var_38, var_34);
0057cd75          uint32_t esi_2 = var_14;
0057cd7e          var_38 = esi_2;
0057cd80          var_34 = 0;
0057cd83          uint32_t eax_16 = var_38;
0057cd87          var_1c = 0;
0057cd8b          int32_t var_18 = 0;
0057cd8b          
0057cd8f          if (eax_16 != 0)
0057cd95              *(uint32_t*)(*(uint32_t*)eax_16 + 0x10)();
0057cd95          
0057cda8          int32_t edi_3 = *(uint32_t*)InterfacePtr<class PlayerDesc>::_QueryInterface(&var_1c, &var_c);
0057cda8          
0057cdaa          if (esi_2 != 0)
0057cdb0              *(uint32_t*)(*(uint32_t*)esi_2 + 0x14)();
0057cdb0          
0057cdbd          int32_t* ebx;
0057cdbd          
0057cdbd          if ((ebx != 0 && edi_3 >= 0))
0057cdbd          {
0057cdcc              CBaseQualities::InqBool(&ebx[0xe], 0x81, &var_18);
0057cdcc              
0057cdd7              if ((var_18 != 0 || ebx_1 == 0))
0057cdd7                  goto label_57ce72;
0057cdd7              
0057cdd7              goto label_57cde7;
0057cdbd          }
0057cdbd          
0057cddf          class ClientCommunicationSystem* this_1;
0057cddf          
0057cddf          if (ebx_1 == 0)
0057cddf          {
0057ce72          label_57ce72:
0057ce72              AC1Legacy::PStringBase<char>::set(&__return_addr, &this->m_hashCommands);
0057ce77              uint32_t edi_4 = arg2;
0057ce7b              void* eax_27 = *(uint32_t*)edi_4;
0057ce7d              int32_t ecx_24 = *(uint32_t*)((char*)eax_27 + 8);
0057ce82              void* eax_28;
0057ce82              
0057ce82              if (ecx_24 > 0)
0057ce8a                  eax_28 = ((char*)eax_27 + 0x14);
0057ce82              else
0057ce84                  eax_28 = ((ecx_24 + eax_27) + 0x13);
0057ce84              
0057ce90              if (*(uint8_t*)eax_28 != 0x27)
0057ce90              {
0057ce9b                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794098);
0057cea0                  uint32_t esi_4 = arg2;
0057cea4                  int32_t eax_29 = *(uint32_t*)(esi_4 + 8);
0057cea4                  
0057ceb2                  if ((eax_29 != 1 && esi_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0057cebe                      AC1Legacy::PStringBase<char>::append_n_chars(&__return_addr, (esi_4 + 0x14), (eax_29 - 1));
0057cebe                  
0057ced1                  if (InterlockedDecrement((esi_4 + 4)) == 0)
0057ced9                      **(uint32_t**)esi_4(1);
0057ce90              }
0057ce90              
0057ceed              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, (*(uint32_t*)edi_4 + 0x14));
0057cef2              uint32_t esi_5 = arg2;
0057cef6              int32_t eax_33 = *(uint32_t*)(esi_5 + 8);
0057cef6              
0057cf04              if ((eax_33 != 1 && esi_5 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0057cf10                  AC1Legacy::PStringBase<char>::append_n_chars(&__return_addr, (esi_5 + 0x14), (eax_33 - 1));
0057cf10              
0057cf1d              if (InterlockedDecrement((esi_5 + 4)) == 0)
0057cf25                  **(uint32_t**)esi_5(1);
0057cf25              
0057cf30              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794508);
0057cf35              uint32_t esi_6 = arg2;
0057cf39              int32_t eax_37 = *(uint32_t*)(esi_6 + 8);
0057cf39              
0057cf47              if ((eax_37 != 1 && esi_6 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0057cf53                  AC1Legacy::PStringBase<char>::append_n_chars(&__return_addr, (esi_6 + 0x14), (eax_37 - 1));
0057cf53              
0057cf60              if (InterlockedDecrement((esi_6 + 4)) == 0)
0057cf68                  **(uint32_t**)esi_6(1);
0057cf68              
0057cf6e              this_1 = this;
0057cddf          }
0057cddf          else
0057cddf          {
0057cde7          label_57cde7:
0057cde7              int32_t var_3c_6;
0057cde7              uint32_t esi_3;
0057cde7              
0057cde7              if (ebp_1 == 0)
0057cde7              {
0057ce1c                  AC1Legacy::PStringBase<char>::operator=(&var_28, GetRandomHumanText(&arg2));
0057ce21                  esi_3 = arg2;
0057ce28                  var_3c_6 = (esi_3 + 4);
0057cde7              }
0057cde7              else
0057cde7              {
0057cdfb                  AC1Legacy::PStringBase<char>::operator=(&var_28, GetRandomOlthoiText(&arg2));
0057ce00                  esi_3 = arg2;
0057ce07                  var_3c_6 = (esi_3 + 4);
0057cde7              }
0057cde7              
0057ce35              if ((InterlockedDecrement(var_3c_6) == 0 && esi_3 != 0))
0057ce3d                  **(uint32_t**)esi_3(1);
0057ce3d              
0057ce43              this_1 = this;
0057ce4a              int32_t var_3c_9 = (var_28 + 0x14);
0057ce4e              class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* var_40_1 = &this_1->m_hashCommands;
0057ce59              AC1Legacy::PStringBase<char>::sprintf(&__return_addr, "%s %s\n");
0057cddf          }
0057cddf          
0057cf72          void* const __return_addr_1 = __return_addr;
0057cf80          int32_t* ebx_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, ((char*)__return_addr_1 + 0x14));
0057cf94          ClientSystem::AddTextToScroll(var_c, &arg2, 0xc, 1, 0);
0057cf9d          int32_t* esi_8 = (arg2 - 0x14);
0057cf9d          
0057cfb0          if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
0057cfb8              **(uint32_t**)esi_8(1);
0057cfb8          
0057cfc0          if (ebx != 0)
0057cfc4              *(uint32_t*)(*(uint32_t*)ebx + 0x14)();
0057cfc4          
0057cfd9          if ((InterlockedDecrement(((char*)__return_addr_1 + 4)) == 0 && __return_addr_1 != 0))
0057cfe1              **(uint32_t**)__return_addr_1(1);
0057cfe1          
0057cfef          if ((InterlockedDecrement(&ebx_4[1]) == 0 && ebx_4 != 0))
0057cff7              **(uint32_t**)ebx_4(1);
0057cff7          
0057cffd          esp = &var_38;
0057cffd          
0057d005          if ((InterlockedDecrement(&this_1->vtable) == 0 && this_1 != 0))
0057d005          {
0057d007              this_1->vtable->IUnknown_QueryInterface(1);
0057d00e              esp = &var_38;
0057d005          }
0057cbfc      }
0057cbfc      
0057d010      *(uint32_t*)esp;
0057d010      esp[1];
0057d010      esp[2];
0057d010      esp[3];
0057d019      return 0;
0057cbe0  }

0057d01c                                                                                      90 90 90 90                              ....

0057d020  uint32_t __thiscall ClientCommunicationSystem::Handle_Communication__HearSoulEmote(class ClientCommunicationSystem* this, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3, class AC1Legacy::PStringBase<char> const* arg4)

0057d020  {
0057d020      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0057d02b      uint32_t player_id;
0057d02b      
0057d02b      if (SmartBox::smartbox_1 == 0)
0057d035          player_id = 0;
0057d02b      else
0057d02d          player_id = SmartBox::smartbox_1->player_id;
0057d02d      
0057d037      uint32_t ebx = arg2;
0057d037      
0057d03d      if (ebx == player_id)
0057d043          return 0;
0057d043      
0057d051      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_7d0e98);
0057d064      AC1Legacy::PStringBase<char>::operator+(arg3, &arg3, &arg2);
0057d069      uint32_t esi = arg2;
0057d069      
0057d07f      if ((InterlockedDecrement((esi + 4)) == 0 && esi != 0))
0057d087          **(uint32_t**)esi(1);
0057d087      
0057d096      uint32_t result = ClientCommunicationSystem::Handle_Communication__HearEmote(this, ebx, &arg3, arg4);
0057d09b      class AC1Legacy::PStringBase<char>* esi_1 = arg3;
0057d09b      
0057d0ad      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0057d0af          esi_1->m_buffer->vtable(1);
0057d0af      
0057d0bd      return result;
0057d020  }


0057d0c0  uint32_t __fastcall ClientCommunicationSystem::Handle_Communication__ChannelIndex(class ClientCommunicationSystem* this, class PackableList<AC1Legacy::PStringBase<char> > const* arg2)

0057d0c0  {
0057d0ea      class PStringBase<unsigned short> var_c;
0057d0ea      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, WidthConvert, "The following channels are avail…"), &var_c, 0, 1, 0);
0057d0f9      int32_t* esi_3 = (var_c - 0x14);
0057d0f9      
0057d108      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0057d110          **(uint32_t**)esi_3(1);
0057d110      
0057d112      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0057d11c      class PackableLLNode<AC1Legacy::PStringBase<char> >* head = arg2->head;
0057d123      arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0057d127      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0057d12f      void* ebx;
0057d12f      
0057d12f      for (; head != 0; head = *(uint32_t*)((char*)ebx + 4))
0057d12f      {
0057d149          AC1Legacy::PStringBase<char>::set(&arg2, &data_7e0b0c);
0057d14e          class AC1Legacy::PSRefBuffer<char>* m_buffer = head->data.m_buffer;
0057d150          uint32_t m_len = m_buffer->m_len;
0057d150          
0057d15e          if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
0057d16a              AC1Legacy::PStringBase<char>::append_n_chars(&arg2, &m_buffer->m_data, (m_len - 1));
0057d16a          
0057d178          int32_t* var_8;
0057d178          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &data_794508);
0057d17d          int32_t* esi_4 = var_8;
0057d181          int32_t eax_3 = esi_4[2];
0057d181          
0057d18f          if ((eax_3 != 1 && esi_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0057d19b              AC1Legacy::PStringBase<char>::append_n_chars(&arg2, &esi_4[5], (eax_3 - 1));
0057d19b          
0057d1a8          if (InterlockedDecrement(&esi_4[1]) == 0)
0057d1b0              **(uint32_t**)esi_4(1);
0057d1b0          
0057d1b2          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = arg2;
0057d1c0          ebx = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data);
0057d1d4          ClientSystem::AddTextToScroll(this, &var_c, 0, 1, 0);
0057d1dd          int32_t* esi_6 = (var_c - 0x14);
0057d1dd          
0057d1ec          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0057d1f4              **(uint32_t**)esi_6(1);
0057d12f      }
0057d12f      
0057d20d      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
0057d20f          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
0057d20f      
0057d220      return 0;
0057d0c0  }

0057d137                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
0057d223           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0057d230  uint32_t __fastcall ClientCommunicationSystem::Handle_Communication__ChannelList(class ClientCommunicationSystem* this, class PackableList<AC1Legacy::PStringBase<char> > const* arg2)

0057d230  {
0057d25a      class PStringBase<unsigned short> var_c;
0057d25a      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, WidthConvert, "The following characters are cur…"), &var_c, 0, 1, 0);
0057d269      int32_t* esi_3 = (var_c - 0x14);
0057d269      
0057d278      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0057d280          **(uint32_t**)esi_3(1);
0057d280      
0057d282      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0057d28c      class PackableLLNode<AC1Legacy::PStringBase<char> >* head = arg2->head;
0057d293      arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0057d297      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0057d29f      void* ebx;
0057d29f      
0057d29f      for (; head != 0; head = *(uint32_t*)((char*)ebx + 4))
0057d29f      {
0057d2b9          AC1Legacy::PStringBase<char>::set(&arg2, &data_7e0b0c);
0057d2be          class AC1Legacy::PSRefBuffer<char>* m_buffer = head->data.m_buffer;
0057d2c0          uint32_t m_len = m_buffer->m_len;
0057d2c0          
0057d2ce          if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
0057d2da              AC1Legacy::PStringBase<char>::append_n_chars(&arg2, &m_buffer->m_data, (m_len - 1));
0057d2da          
0057d2e8          int32_t* var_8;
0057d2e8          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &data_794508);
0057d2ed          int32_t* esi_4 = var_8;
0057d2f1          int32_t eax_3 = esi_4[2];
0057d2f1          
0057d2ff          if ((eax_3 != 1 && esi_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0057d30b              AC1Legacy::PStringBase<char>::append_n_chars(&arg2, &esi_4[5], (eax_3 - 1));
0057d30b          
0057d318          if (InterlockedDecrement(&esi_4[1]) == 0)
0057d320              **(uint32_t**)esi_4(1);
0057d320          
0057d322          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = arg2;
0057d330          ebx = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, WidthConvert, &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data);
0057d344          ClientSystem::AddTextToScroll(this, &var_c, 0, 1, 0);
0057d34d          int32_t* esi_6 = (var_c - 0x14);
0057d34d          
0057d35c          if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0057d364              **(uint32_t**)esi_6(1);
0057d29f      }
0057d29f      
0057d37d      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
0057d37f          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
0057d37f      
0057d390      return 0;
0057d230  }

0057d2a7                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
0057d393                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0057d3a0  uint32_t __thiscall ClientCommunicationSystem::Handle_Communication__TextboxString(class ClientCommunicationSystem* this, class AC1Legacy::PStringBase<char>* arg2, uint32_t arg3)

0057d3a0  {
0057d3a0      class ClientCommunicationSystem* this_1 = this;
0057d3af      AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, &data_7928af);
0057d3c0      int32_t eax_1 = gmCCommunicationSystem::IsSquelched(0, &this_1, arg3);
0057d3c7      class ClientCommunicationSystem* this_2 = this_1;
0057d3ce      char ebx_1 = ((int8_t)-(eax_1));
0057d3ce      
0057d3e6      if ((InterlockedDecrement(&this_2->vtable) == 0 && this_2 != 0))
0057d3e8          this_2->vtable->IUnknown_QueryInterface(1);
0057d3e8      
0057d3f2      if ((ebx_1 - ebx_1) != 0xff)
0057d3f2      {
0057d3fe          AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, &data_794508);
0057d403          class ClientCommunicationSystem* this_3 = this_1;
0057d407          struct QualityChangeHandler::VTable* vtable = this_3->vtable;
0057d407          
0057d419          if ((vtable != 1 && this_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0057d423              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &this_3->m_hashCommands, ((char*)vtable - 1));
0057d423          
0057d434          if (InterlockedDecrement(&this_3->vtable) == 0)
0057d436              this_3->vtable->IUnknown_QueryInterface(1);
0057d436          
0057d44f          ClientSystem::AddTextToScroll(this, &arg2->m_buffer->m_data, arg3, 1, 0);
0057d3f2      }
0057d3f2      
0057d45b      return 0;
0057d3a0  }

0057d45e                                                                                            90 90                                ..

0057d460  uint32_t __stdcall ClientCommunicationSystem::Handle_Communication__TransientString(class ClientCommunicationSystem* this @ ecx, class AC1Legacy::PStringBase<char> const* arg2)

0057d460  {
0057d485      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, &arg2->m_buffer->m_data), &arg2, 0x1a, 1, 0);
0057d48e      void* __offset(AC1Legacy::PStringBase<char>, -0x14) esi_3 = &arg2[-5];
0057d48e      
0057d4a1      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0057d4a9          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0057d4a9      
0057d4ae      return 0;
0057d460  }

0057d4b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0057d4c0  uint8_t __stdcall ClientCommunicationSystem::HelpAllegiancesGroup(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)

0057d4c0  {
0057d4c7      enum ClientCommunicationSystem::HelpType* ecx = &arg2;
0057d4cb      int32_t eax_3;
0057d4cb      int32_t* esi;
0057d4cb      
0057d4cb      if (arg2 != Summary_HelpType)
0057d4cb      {
0057d509          PStringBase<char>::PStringBase<char>(ecx, "@allegiance - Commands to help m…");
0057d50e          enum ClientCommunicationSystem::HelpType ecx_3 = arg2;
0057d512          int32_t eax_4 = *(uint32_t*)(ecx_3 - 4);
0057d518          class PStringBase<char>* ebx_1 = arg4;
0057d518          
0057d51c          if (eax_4 != 1)
0057d51c          {
0057d523              PStringBase<char>::append_n_chars(ebx_1, ecx_3, (eax_4 - 1));
0057d528              ecx_3 = arg2;
0057d51c          }
0057d51c          
0057d541          if ((InterlockedDecrement((ecx_3 - 0x10)) == 0 && ecx_3 != 0x14))
0057d549              **(uint32_t**)(ecx_3 - 0x14)(1);
0057d549          
0057d554          PStringBase<char>::PStringBase<char>(&arg4, "@allegiance motd - Displays or s…");
0057d559          char* eax_8 = arg4;
0057d55d          int32_t ecx_7 = *(uint32_t*)(eax_8 - 4);
0057d55d          
0057d563          if (ecx_7 != 1)
0057d563          {
0057d56a              PStringBase<char>::append_n_chars(ebx_1, eax_8, (ecx_7 - 1));
0057d56f              eax_8 = arg4;
0057d563          }
0057d563          
0057d573          esi = &eax_8[0xffffffec];
0057d57a          eax_3 = InterlockedDecrement(&esi[1]);
0057d4cb      }
0057d4cb      else
0057d4cb      {
0057d4d2          PStringBase<char>::PStringBase<char>(ecx, "@help allegiances - Commands to …");
0057d4d7          enum ClientCommunicationSystem::HelpType ecx_1 = arg2;
0057d4db          int32_t eax = *(uint32_t*)(ecx_1 - 4);
0057d4db          
0057d4e1          if (eax != 1)
0057d4e1          {
0057d4ea              PStringBase<char>::append_n_chars(arg4, ecx_1, (eax - 1));
0057d4ef              ecx_1 = arg2;
0057d4e1          }
0057d4e1          
0057d4f3          esi = (ecx_1 - 0x14);
0057d4fa          eax_3 = InterlockedDecrement(&esi[1]);
0057d4cb      }
0057d4cb      
0057d584      if ((eax_3 == 0 && esi != 0))
0057d58c          **(uint32_t**)esi(1);
0057d58c      
0057d58e      eax_3 = 1;
0057d591      return 1;
0057d4c0  }

0057d594                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0057d5a0  uint8_t __fastcall ClientCommunicationSystem::DoAllegiance(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057d5a0  {
0057d5ad      char*** var_1c = &arg3;
0057d5b2      int32_t* var_20 = &arg2;
0057d5b7      class PStringBase<char> var_4;
0057d5b7      int32_t* var_24 = &var_4;
0057d5bd      class PStringBase<char>* __return;
0057d5bd      int32_t* edx;
0057d5bd      class PSRefBufferCharData<char>* m_charbuffer = NextArg(__return, edx, this)->m_charbuffer;
0057d5bf      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
0057d5ca      InterlockedIncrement(&m_charbuffer[-1]);
0057d5da      int32_t* esi_1 = (var_4 - 0x14);
0057d5da      
0057d5e9      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0057d5f1          **(uint32_t**)esi_1(1);
0057d5f1      
0057d5fc      PStringBase<char>::PStringBase<char>(&var_4, "boot");
0057d60c      int32_t eax_4 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d617      char ebx_1 = ((int8_t)-(eax_4));
0057d61b      int32_t* esi_3 = (var_4 - 0x14);
0057d61b      
0057d62c      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0057d634          **(uint32_t**)esi_3(1);
0057d634      
0057d638      uint8_t eax_7;
0057d638      
0057d638      if ((ebx_1 - ebx_1) == 0xff)
0057d638      {
0057d659          PStringBase<char>::PStringBase<char>(&var_4, "info");
0057d669          int32_t eax_8 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d674          char ebx_3 = ((int8_t)-(eax_8));
0057d678          int32_t* esi_5 = (var_4 - 0x14);
0057d678          
0057d689          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0057d691              **(uint32_t**)esi_5(1);
0057d691          
0057d695          if ((ebx_3 - ebx_3) != 0xff)
0057d695          {
0057d6a3              eax_7 = ClientCommunicationSystem::DoAllegianceInfo(this, arg2, arg3);
0057d6a8              goto label_57da3e;
0057d695          }
0057d695          
0057d6b6          PStringBase<char>::PStringBase<char>(&var_4, "chat");
0057d6c6          int32_t eax_12 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d6d1          char ebx_5 = ((int8_t)-(eax_12));
0057d6d5          int32_t* esi_7 = (var_4 - 0x14);
0057d6de          int32_t eax_14;
0057d6de          int32_t edx_4;
0057d6de          eax_14 = InterlockedDecrement(&esi_7[1]);
0057d6de          
0057d6e6          if ((eax_14 == 0 && esi_7 != 0))
0057d6ee              edx_4 = **(uint32_t**)esi_7(1);
0057d6ee          
0057d6f2          int32_t eax_16;
0057d6f2          char ebx_7;
0057d6f2          
0057d6f2          if ((ebx_5 - ebx_5) == 0xff)
0057d6f2          {
0057d713              PStringBase<char>::PStringBase<char>(&var_4, &data_7e0cb8);
0057d723              eax_16 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d72e              ebx_7 = ((int8_t)-(eax_16));
0057d732              int32_t* esi_9 = (var_4 - 0x14);
0057d73b              int32_t eax_18;
0057d73b              eax_18 = InterlockedDecrement(&esi_9[1]);
0057d73b              
0057d743              if ((eax_18 == 0 && esi_9 != 0))
0057d74b                  edx_4 = **(uint32_t**)esi_9(1);
0057d6f2          }
0057d6f2          
0057d74f          if (((ebx_5 - ebx_5) != 0xff || (ebx_7 - ebx_7) != 0xff))
0057d74f          {
0057d6fc              char** var_1c_8 = arg3;
0057d700              eax_7 = ClientCommunicationSystem::DoAllegianceChat(this, edx_4, arg2);
0057d74f          }
0057d74f          else
0057d74f          {
0057d75a              PStringBase<char>::PStringBase<char>(&var_4, "broadcast");
0057d76a              int32_t eax_19 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d771              char ebx_9 = ((int8_t)-(eax_19));
0057d77b              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d782              int32_t eax_21;
0057d782              char ebx_11;
0057d782              
0057d782              if ((ebx_9 - ebx_9) == 0xff)
0057d782              {
0057d7a3                  PStringBase<char>::PStringBase<char>(&var_4, &data_7e0ca8);
0057d7b3                  eax_21 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d7ba                  ebx_11 = ((int8_t)-(eax_21));
0057d7c4                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d782              }
0057d782              
0057d7cb              if (((ebx_9 - ebx_9) != 0xff || (ebx_11 - ebx_11) != 0xff))
0057d790                  eax_7 = ClientCommunicationSystem::DoAllegianceBroadcast(this, arg2, arg3);
0057d7cb              else
0057d7cb              {
0057d7d6                  PStringBase<char>::PStringBase<char>(&var_4, &data_7e0ca4);
0057d7e6                  int32_t eax_22 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d7ed                  char ebx_13 = ((int8_t)-(eax_22));
0057d7f7                  int32_t edx_7 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d7f7                  
0057d7fe                  if ((ebx_13 - ebx_13) == 0xff)
0057d7fe                  {
0057d81f                      PStringBase<char>::PStringBase<char>(&var_4, "officer");
0057d82f                      int32_t eax_24 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d836                      char ebx_15 = ((int8_t)-(eax_24));
0057d840                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d840                      
0057d847                      if ((ebx_15 - ebx_15) == 0xff)
0057d847                      {
0057d868                          PStringBase<char>::PStringBase<char>(&var_4, "title");
0057d878                          int32_t eax_26 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d87f                          char ebx_17 = ((int8_t)-(eax_26));
0057d889                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d889                          
0057d890                          if ((ebx_17 - ebx_17) == 0xff)
0057d890                          {
0057d8b1                              PStringBase<char>::PStringBase<char>(&var_4, "hometown");
0057d8c1                              int32_t eax_28 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d8c8                              char ebx_19 = ((int8_t)-(eax_28));
0057d8d2                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d8d2                              
0057d8d9                              if ((ebx_19 - ebx_19) == 0xff)
0057d8d9                              {
0057d8ee                                  PStringBase<char>::PStringBase<char>(&var_4, &data_7e0c84);
0057d8fe                                  int32_t eax_29 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d905                                  char ebx_21 = ((int8_t)-(eax_29));
0057d90f                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d90f                                  
0057d916                                  if ((ebx_21 - ebx_21) == 0xff)
0057d916                                  {
0057d92b                                      PStringBase<char>::PStringBase<char>(&var_4, "motd");
0057d93b                                      int32_t eax_30 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d942                                      char ebx_23 = ((int8_t)-(eax_30));
0057d94c                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d94c                                      
0057d953                                      if ((ebx_23 - ebx_23) == 0xff)
0057d953                                      {
0057d974                                          PStringBase<char>::PStringBase<char>(&var_4, &DBCache::`vftable'.CallPendingCallbacks);
0057d984                                          int32_t eax_32 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d98b                                          char ebx_25 = ((int8_t)-(eax_32));
0057d995                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d995                                          
0057d99c                                          if ((ebx_25 - ebx_25) == 0xff)
0057d99c                                          {
0057d9bd                                              PStringBase<char>::PStringBase<char>(&var_4, "lock");
0057d9cd                                              int32_t eax_34 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057d9d4                                              char ebx_27 = ((int8_t)-(eax_34));
0057d9de                                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057d9de                                              
0057d9e5                                              if ((ebx_27 - ebx_27) == 0xff)
0057d9e5                                              {
0057da03                                                  PStringBase<char>::PStringBase<char>(&var_4, "house");
0057da13                                                  int32_t eax_36 = PStringBase<char>::cmp(&m_charbuffer_1, &var_4, 0);
0057da1a                                                  char ebx_29 = ((int8_t)-(eax_36));
0057da24                                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057da24                                                  
0057da2b                                                  if ((ebx_29 - ebx_29) == 0xff)
0057da2b                                                      goto label_57da4b;
0057da2b                                                  
0057da39                                                  eax_7 = ClientCommunicationSystem::DoAllegianceHouse(this, arg2, arg3);
0057d9e5                                              }
0057d9e5                                              else
0057d9f3                                                  eax_7 = ClientCommunicationSystem::DoAllegianceLock(this, arg2, arg3);
0057d99c                                          }
0057d99c                                          else
0057d9aa                                              eax_7 = ClientCommunicationSystem::DoAllegianceName(this, arg2, arg3);
0057d953                                      }
0057d953                                      else
0057d961                                          eax_7 = ClientCommunicationSystem::DoMotd(this, arg2, arg3);
0057d916                                  }
0057d916                                  else
0057d918                                      eax_7 = CM_Allegiance::Event_RecallAllegianceHometown();
0057d8d9                              }
0057d8d9                              else
0057d8db                                  eax_7 = CM_Allegiance::Event_RecallAllegianceHometown();
0057d890                          }
0057d890                          else
0057d89e                              eax_7 = ClientCommunicationSystem::DoAllegianceOfficerTitle(this, arg2, arg3);
0057d847                      }
0057d847                      else
0057d855                          eax_7 = ClientCommunicationSystem::DoAllegianceOfficer(this, arg2, arg3);
0057d7fe                  }
0057d7fe                  else
0057d7fe                  {
0057d808                      char** var_1c_11 = arg3;
0057d80c                      eax_7 = ClientCommunicationSystem::DoAllegianceBan(this, edx_7, arg2);
0057d7fe                  }
0057d7cb              }
0057d74f          }
0057d638      }
0057d638      else
0057d646          eax_7 = ClientCommunicationSystem::DoAllegianceBoot(this, arg2, arg3);
0057d646      
0057da3e  label_57da3e:
0057da3e      
0057da40      if (eax_7 == 0)
0057da40      {
0057da4b      label_57da4b:
0057da4b          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Please see @help Allegiance for …");
0057da62          ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
0057da6b          void* esi_11 = &arg3[-5];
0057da6b          
0057da7a          if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
0057da82              **(uint32_t**)esi_11(1);
0057da40      }
0057da40      
0057da88      void* __offset(PSRefBufferCharData<char>, -0x14) esi_13 = &m_charbuffer_1->m_data[0xffffffec];
0057da88      
0057da97      if ((InterlockedDecrement(((char*)esi_13 + 4)) == 0 && esi_13 != 0))
0057da9f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_13) + -0x14)(1);
0057da9f      
0057daa4      int32_t eax_41;
0057daa4      eax_41 = 1;
0057daaa      return 1;
0057d5a0  }

0057daad                                         90 90 90                                                               ...

0057dab0  uint8_t __fastcall ClientCommunicationSystem::DoSpeaker(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057dab0  {
0057dab0      class ClientCommunicationSystem* this_1 = this;
0057dad7      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, WidthConvert, "This command is no longer in use…"), &this_1, 0, 1, this->m_idCurrentCommandSource);
0057dae0      void* __offset(ClientCommunicationSystem, -0x14) esi_3 = ((char*)this_1 - 0x14);
0057dae0      
0057daf3      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0057dafb          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0057dafb      
0057dafe      int32_t eax;
0057dafe      eax = 1;
0057db02      return 1;
0057dab0  }

0057db05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0057db10  uint8_t __thiscall ClientCommunicationSystem::SendTurbineChat(class ClientCommunicationSystem* this, uint32_t arg2, enum ChatTypeEnum arg3, class PStringBase<char> const* arg4, uint8_t arg5)

0057db10  {
0057db2b      class PSRefBufferCharData<char>* eax_6;
0057db2b      
0057db2b      if ((CCommunicationSystem::IsUsingTurbineChat() == 0 || arg2 <= 0))
0057db2b      {
0057dd42          this->m_idCurrentCommandSource;
0057dd64          ClientSystem::AddTextToScroll(this, &arg5, 0, 1, PStringBase<unsigned short>::PStringBase<unsigned short>(&arg5, WidthConvert, "Turbine chat is not available.\n"));
0057dd6d          int32_t* esi_8 = (arg5 - 0x14);
0057dd6d          
0057dd80          if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
0057dd88              **(uint32_t**)esi_8(1);
0057db2b      }
0057db2b      else
0057db2b      {
0057db31          uint32_t eax_1;
0057db31          eax_1 = arg5;
0057db37          int32_t eax_5;
0057db37          
0057db37          if (eax_1 == 0)
0057db37          {
0057db3d              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0057db42              arg5 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0057db4a              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0057db5a              ChannelSystem::GetGlobalChannelName(arg3, &arg5);
0057db70              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, (arg5 + 0x14));
0057db81              ClientCommunicationSystem::HandleFailureEvent(this, 0x551, &arg2);
0057db90              int32_t* esi_2 = (arg2 - 0x14);
0057db90              
0057db9f              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057dba7                  **(uint32_t**)esi_2(1);
0057dba7              
0057dba9              int32_t* esi_3 = arg5;
0057dba9              
0057dbb9              if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0057dbc1                  **(uint32_t**)esi_3(1);
0057dbc1              
0057dbc5              eax_5 = 1;
0057dbcb              return 1;
0057db37          }
0057db37          
0057dbd8          if (arg4->m_charbuffer->m_data[-4] != 1)
0057dbd8          {
0057dbe1              int32_t edx_5;
0057dbe1              eax_6 = ClientCommunicationSystem::IsMessageSafe(this, arg4);
0057dbe1              
0057dbe8              if (eax_6 != 0)
0057dbe8              {
0057dbee                  int32_t __saved_ebp_8 = 0;
0057dbee                  
0057dbf9                  if (ClientCommunicationSystem::IsMessageSpam(this, edx_5) != 0)
0057dbf9                  {
0057dbff                      PStringBase<char>::PStringBase<char>(&arg5);
0057dc04                      int32_t __saved_ebp_9 = 0;
0057dc10                      PStringBase<char>::sprintf(&arg5, "You must wait %ds before communi…");
0057dc2a                      ClientSystem::AddTextToScroll(this, &arg5, 0, 1, this->m_idCurrentCommandSource);
0057dc33                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg5);
0057dc3a                      int32_t eax_8;
0057dc3a                      eax_8 = 0;
0057dc40                      return 0;
0057dbf9                  }
0057dbf9                  
0057dc45                  void* eax_9 = operator new(0xc);
0057dc4f                  class MotionTableManager* esi_4;
0057dc4f                  
0057dc4f                  if (eax_9 == 0)
0057dc5c                      esi_4 = nullptr;
0057dc4f                  else
0057dc58                      esi_4 = CSoundDesc::CSoundDesc(eax_9);
0057dc58                  
0057dc67                  MotionTableManager::SetPhysicsObject(esi_4, GetPlayerID());
0057dc76                  esi_4->state.style = arg3;
0057dc81                  class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<char>::to_wpstring(arg4, &arg5, 0)->m_charbuffer;
0057dc8a                  void __return;
0057dc8a                  struct tagBLOB* eax_13 = TurbineChatBlob::GetBlob(esi_4, &__return);
0057dc98                  void __return_1;
0057dc98                  struct tagBLOB* eax_14 = TurbineChatBlob::GetBlob(esi_4, &__return_1);
0057dca2                  uint8_t* pBlobData_1 = eax_13->pBlobData;
0057dcad                  uint8_t* pBlobData = eax_14->pBlobData;
0057dcb1                  int32_t eax_16 = CCommunicationSystem::CSendToTurbineRoomByID(arg2, m_charbuffer, eax_14->cbSize, eax_13->cbSize);
0057dcbb                  char ebx_4 = ((int8_t)-(eax_16));
0057dcc5                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg5);
0057dcc5                  
0057dccd                  if ((ebx_4 - ebx_4) == 0xff)
0057dccd                  {
0057dbc5                      eax_5 = 1;
0057dbcb                      return 1;
0057dccd                  }
0057dccd                  
0057dcd7                  PStringBase<char>::PStringBase<char>(&arg2);
0057dce0                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg5);
0057dcef                  ChannelSystem::GetGlobalChannelName(arg3, &arg5);
0057dcfb                  int32_t var_28_4 = (arg5 + 0x14);
0057dd06                  PStringBase<char>::sprintf(&arg2, "Failed to send text to channel: …");
0057dd20                  ClientSystem::AddTextToScroll(this, &arg2, 0, 1, this->m_idCurrentCommandSource);
0057dd29                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg5);
0057dd32                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057dd39                  int32_t eax_19;
0057dd39                  eax_19 = 0;
0057dd3f                  return 0;
0057dbe8              }
0057dbd8          }
0057db2b      }
0057db2b      
0057dd8c      eax_6 = 0;
0057dd92      return 0;
0057db10  }

0057dd95                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0057dda0  uint8_t __fastcall ClientCommunicationSystem::DoConsent(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057dda0  {
0057ddaf      char*** var_20 = &arg3;
0057ddb4      int32_t* var_24 = &arg2;
0057ddb9      class PStringBase<unsigned short> var_c;
0057ddb9      int32_t* var_28 = &var_c;
0057ddba      class PStringBase<char>* __return;
0057ddba      int32_t* edx;
0057ddba      NextArg(__return, edx, this);
0057ddcb      void* var_4;
0057ddcb      PStringBase<char>::PStringBase<char>(&var_4, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseProfile);
0057ddd4      class PStringBase<unsigned short> edi = var_c;
0057ddda      int32_t eax_1 = _stricmp(edi, var_4);
0057ddef      char ebx_1 = ((int8_t)-(eax_1));
0057ddf3      int32_t* ebp_1 = ((char*)var_4 - 0x14);
0057ddf3      
0057de04      if ((InterlockedDecrement(&ebp_1[1]) == 0 && ebp_1 != 0))
0057de0d          **(uint32_t**)ebp_1(1);
0057de0d      
0057de11      if ((ebx_1 - ebx_1) == 0xff)
0057de11      {
0057dea4          PStringBase<char>::PStringBase<char>(&var_4, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseData);
0057deaf          int32_t eax_9 = _stricmp(edi, var_4);
0057debe          char ebx_7 = ((int8_t)-(eax_9));
0057dec2          int32_t* ebp_4 = ((char*)var_4 - 0x14);
0057dec2          
0057ded3          if ((InterlockedDecrement(&ebp_4[1]) == 0 && ebp_4 != 0))
0057dedc              **(uint32_t**)ebp_4(1);
0057dedc          
0057dee0          if ((ebx_7 - ebx_7) == 0xff)
0057dee0          {
0057df40              PStringBase<char>::PStringBase<char>(&var_4, &data_7e0e54);
0057df4b              int32_t eax_15 = _stricmp(edi, var_4);
0057df5a              char ebx_9 = ((int8_t)-(eax_15));
0057df5e              int32_t* ebp_6 = ((char*)var_4 - 0x14);
0057df5e              
0057df6f              if ((InterlockedDecrement(&ebp_6[1]) == 0 && ebp_6 != 0))
0057df78                  **(uint32_t**)ebp_6(1);
0057df78              
0057df7c              if ((ebx_9 - ebx_9) != 0xff)
0057df7c              {
0057df7e                  char eax_17 = CM_Character::Event_DisplayPlayerConsentList();
0057df7e                  
0057df94                  if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0057df9c                      **(uint32_t**)(edi - 0x14)(1);
0057df9c                  
0057dfa1                  int32_t eax_19;
0057dfa1                  eax_19 = eax_17;
0057dfa7                  return eax_19;
0057df7c              }
0057df7c              
0057dfb3              PStringBase<char>::PStringBase<char>(&var_4, "clear");
0057dfbe              int32_t eax_21 = _stricmp(edi, var_4);
0057dfcd              char ebx_11 = ((int8_t)-(eax_21));
0057dfd1              void* ebp_8 = ((char*)var_4 - 0x14);
0057dfd1              
0057dfe2              if ((InterlockedDecrement(((char*)ebp_8 + 4)) == 0 && ebp_8 != 0))
0057dfeb                  **(uint32_t**)ebp_8(1);
0057dfeb              
0057dfef              if ((ebx_11 - ebx_11) != 0xff)
0057dfef              {
0057dff1                  char eax_23 = CM_Character::Event_ClearPlayerConsentList();
0057dffc                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057e00a                  return eax_23;
0057dfef              }
0057dfef              
0057e016              PStringBase<char>::PStringBase<char>(&var_4, "remove");
0057e021              int32_t eax_26 = _stricmp(edi, var_4);
0057e030              class PStringBase<char>* __return_1 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0057e030              
0057e037              if (eax_26 != 0)
0057e037              {
0057e0e0                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"Please specify a valid consent c…");
0057e0f9                  ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
0057e102                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057e037              }
0057e037              else
0057e037              {
0057e03d                  char** ecx_26 = arg3;
0057e041                  int32_t edx_9 = arg2;
0057e045                  char** var_20_16 = ecx_26;
0057e046                  int32_t var_24_6 = edx_9;
0057e04b                  char*** var_28_1 = &arg3;
0057e04c                  JoinArgsAsName(__return_1, edx_9, ecx_26);
0057e051                  char** eax_27 = arg3;
0057e05e                  class AC1Legacy::PStringBase<char>* ecx_28 = &arg2;
0057e05e                  
0057e062                  if (eax_27[-1] != 1)
0057e062                  {
0057e09c                      AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_28, eax_27);
0057e0a6                      char eax_28 = CM_Character::Event_RemoveFromPlayerConsentList(&arg2);
0057e0b4                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
0057e0bd                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057e0c6                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057e0d4                      return eax_28;
0057e062                  }
0057e062                  
0057e069                  PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_28, u"Please specify a person to remov…");
0057e082                  ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
0057e08b                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057e094                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0057e037              }
0057e037              
0057e10b              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0057dee0          }
0057dee0          else
0057dee0          {
0057deec              PlayerModule::SetAcceptLootPermits(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 0);
0057df05              ClientSystem::AddTextToScroll(this, "You are no longer accepting corp…", 0, 1, this->m_idCurrentCommandSource);
0057df05              
0057df1d              if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0057df1d              {
0057df29                  **(uint32_t**)(edi - 0x14)(1);
0057df2e                  int32_t eax_13;
0057df2e                  eax_13 = 1;
0057df34                  return 1;
0057df1d              }
0057dee0          }
0057de11      }
0057de11      else
0057de11      {
0057de21          PlayerModule::SetAcceptLootPermits(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable, 1);
0057de2a          this->m_idCurrentCommandSource;
0057de3b          uint32_t ebx_3;
0057de3b          int32_t esi_1;
0057de3b          ebx_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, WidthConvert, "You can now accept corpse lootin…");
0057de4c          ClientSystem::AddTextToScroll(this, &arg3, 0, 1, ebx_3);
0057de55          void* ebx_5 = &arg3[-5];
0057de55          
0057de64          if ((esi_1(((char*)ebx_5 + 4)) == 0 && ebx_5 != 0))
0057de6c              **(uint32_t**)ebx_5(1);
0057de6c          
0057de81          if ((esi_1((edi - 0x10)) == 0 && edi != 0x14))
0057de81          {
0057de8d              **(uint32_t**)(edi - 0x14)(1);
0057de92              int32_t eax_7;
0057de92              eax_7 = 1;
0057de98              return 1;
0057de81          }
0057de11      }
0057de11      
0057e113      int32_t eax_6;
0057e113      eax_6 = 1;
0057e119      return 1;
0057dda0  }

0057e11c                                                                                      90 90 90 90                              ....

0057e120  uint8_t __thiscall ClientCommunicationSystem::DoRenderOption(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057e120  {
0057e126      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0057e126      
0057e12e      if (SmartBox::smartbox_1 == 0)
0057e12e      {
0057e19f          int32_t eax;
0057e19f          eax = 0;
0057e1a5          return 0;
0057e12e      }
0057e12e      
0057e145      char* var_8 = nullptr;
0057e14d      char* var_4 = nullptr;
0057e15a      bool cond:0 = SmartBox::HandleRenderOption(SmartBox::smartbox_1, arg2, arg3, &var_8, &var_4) != 0;
0057e15c      char* eax_3 = var_8;
0057e160      int32_t ebx;
0057e160      ebx = cond:0;
0057e160      
0057e165      if (eax_3 != 0)
0057e175          ClientSystem::AddTextToScroll(this, eax_3, 0x1a, 1, this->m_idCurrentCommandSource);
0057e175      
0057e17a      char* eax_4 = var_4;
0057e17a      
0057e180      if (eax_4 != 0)
0057e190          ClientSystem::AddTextToScroll(this, eax_4, 0, 1, this->m_idCurrentCommandSource);
0057e190      
0057e195      eax_4 = ebx;
0057e19c      return eax_4;
0057e120  }

0057e1a8                          90 90 90 90 90 90 90 90                                                          ........

0057e1b0  uint8_t __thiscall ClientCommunicationSystem::DoVersion(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057e1b0  {
0057e1b0      class ClientCommunicationSystem* this_1 = this;
0057e1ba      wchar16 const* const* esp;
0057e1ba      wchar16 const* const var_c;
0057e1ba      
0057e1ba      if (arg2 == 0)
0057e1ba      {
0057e218          if (CCommunicationSystem::IsUsingTurbineChat() != 0)
0057e218          {
0057e220              var_c = this->m_idCurrentCommandSource;
0057e22c              ClientSystem::AddTextToScroll(this, "Using Turbine Chat.\n", 0, 1, var_c);
0057e218          }
0057e218          
0057e231          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0057e236          wchar16* ebx;
0057e236          var_c = ebx;
0057e237          arg2 = PStringBase<char>::s_NullBuffer_1;
0057e23b          int32_t edi;
0057e23b          int32_t var_10_1 = edi;
0057e240          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0057e24c          var_c = AC1Legacy::Version::VerboseVersionString_;
0057e257          PStringBase<char>::sprintf(&arg_c, "Client version %s\n");
0057e265          var_c = this->m_idCurrentCommandSource;
0057e27d          ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&arg_c, &arg2, 0), 0, 1, var_c);
0057e28c          int32_t* edi_2 = (arg2 - 0x14);
0057e292          var_c = &edi_2[1];
0057e292          
0057e29b          if ((InterlockedDecrement(var_c) == 0 && edi_2 != 0))
0057e2a3              **(uint32_t**)edi_2(1);
0057e2a3          
0057e2ae          if (ClientCommunicationSystem::PlayerIsPSR(this) != 0)
0057e2b0              Proto_UI::SendAdminGetServerVersion();
0057e2b0          
0057e2c5          wchar16* __saved_esi;
0057e2c5          esp = &__saved_esi;
0057e2c5          
0057e2ca          if ((InterlockedDecrement(&arg3[-4]) == 0 && arg3 != 0x14))
0057e2ca          {
0057e2cc              int32_t edx_3 = arg3[-5];
0057e2ce              var_c = 1;
0057e2d2              *(uint32_t*)edx_3(var_c);
0057e2d2              esp = &__saved_esi;
0057e2ca          }
0057e1ba      }
0057e1ba      else
0057e1ba      {
0057e1bc          var_c = u"Unexpected arguments to @version";
0057e1c5          PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, var_c);
0057e1d0          var_c = this->m_idCurrentCommandSource;
0057e1dc          ClientSystem::AddTextToScroll(this, &this_1, 0x1a, 1, var_c);
0057e1e5          void* __offset(ClientCommunicationSystem, -0x14) esi_2 = ((char*)this_1 - 0x14);
0057e1eb          var_c = ((char*)esi_2 + 4);
0057e1eb          esp = &var_c;
0057e1eb          
0057e1fc          if ((InterlockedDecrement(var_c) == 0 && esi_2 != 0))
0057e1fc          {
0057e208              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0057e20a              int32_t eax_4;
0057e20a              eax_4 = 1;
0057e20e              return 1;
0057e1fc          }
0057e1ba      }
0057e2d4      int32_t eax_2;
0057e2d4      eax_2 = 1;
0057e2d6      *(uint32_t*)esp;
0057e2d6      esp[1];
0057e2d8      return 1;
0057e1b0  }

0057e2db                                                                                   90 90 90 90 90                             .....

0057e2e0  uint8_t __fastcall ClientCommunicationSystem::DoCommand(class ClientCommunicationSystem* this)

0057e2e0  {
0057e2e9      int32_t* var_c = nullptr;
0057e2ed      int32_t var_8 = 0;
0057e2f1      int32_t var_4 = 0;
0057e2f9      struct List<PStringBase<char> >::VTable* const var_10;
0057e2f9      int32_t* m_charbuffer = &var_10;
0057e2fa      class ClientCommunicationSystem* __return = this;
0057e309      var_10 = &List<class PStringBase<char> >::`vftable';
0057e30d      int32_t ecx_1 = PStringBase<char>::PStringBase<char>(&__return, &data_7e0f5c);
0057e312      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_strLastCommandLine.m_charbuffer;
0057e318      int32_t var_40 = ecx_1;
0057e321      InterlockedIncrement(&m_charbuffer_1[-1]);
0057e327      uint32_t eax_1 = PSUtils::FindAllWords(m_charbuffer_1, __return, m_charbuffer);
0057e335      m_charbuffer = &this->m_strCurrentCommand;
0057e335      
0057e343      if (List<PStringBase<char> >::pop_front(&var_10, m_charbuffer) == 0)
0057e343      {
0057e349          var_10 = &List<class PStringBase<char> >::`vftable';
0057e34d          List<PStringBase<char> >::flush(&var_10);
0057e352          int32_t eax_3;
0057e352          eax_3 = 0;
0057e35b          return 0;
0057e343      }
0057e343      
0057e35c      m_charbuffer = 0xffffffff;
0057e35e      __return = 1;
0057e368      class PSRefBufferCharData<char>* __return_1;
0057e368      class PStringBase<char>* eax_4 = PStringBase<char>::substring(&this->m_strCurrentCommand, &__return_1, __return, m_charbuffer);
0057e36f      class PSRefBufferCharData<char>* m_charbuffer_2 = this->m_strCurrentCommand.m_charbuffer;
0057e374      void* __offset(PSRefBufferCharData<char>, -0x14) var_24;
0057e374      
0057e374      if (m_charbuffer_2 != eax_4->m_charbuffer)
0057e374      {
0057e379          var_24 = &m_charbuffer_2->m_data[0xffffffec];
0057e380          m_charbuffer = &m_charbuffer_2[-1];
0057e380          
0057e389          if (InterlockedDecrement(m_charbuffer) == 0)
0057e389          {
0057e38b              void* __offset(PSRefBufferCharData<char>, -0x14) ecx_5 = var_24;
0057e38b              
0057e391              if (ecx_5 != 0)
0057e391              {
0057e393                  int32_t edx_1 = *(int32_t*)((char*)ADJ(ecx_5) + -0x14);
0057e395                  m_charbuffer = 1;
0057e397                  *(uint32_t*)edx_1(m_charbuffer);
0057e391              }
0057e389          }
0057e389          
0057e399          class PSRefBufferCharData<char>* m_charbuffer_3 = eax_4->m_charbuffer;
0057e32f          this->m_strCurrentCommand.m_charbuffer = m_charbuffer_3;
0057e3a1          m_charbuffer = &m_charbuffer_3[-1];
0057e3a2          InterlockedIncrement(m_charbuffer);
0057e374      }
0057e374      
0057e3ac      int32_t* ebp_3 = &__return_1->m_data[0xffffffec];
0057e3b2      m_charbuffer = &ebp_3[1];
0057e3b3      int32_t eax_9;
0057e3b3      int32_t* m_charbuffer_6;
0057e3b3      eax_9 = InterlockedDecrement(m_charbuffer);
0057e3b3      
0057e3bf      if ((eax_9 == 0 && ebp_3 != 0))
0057e3bf      {
0057e3c1          int32_t edx_2 = *(uint32_t*)ebp_3;
0057e3c4          m_charbuffer = 1;
0057e3c8          m_charbuffer_6 = *(uint32_t*)edx_2(m_charbuffer);
0057e3bf      }
0057e3bf      
0057e3ca      m_charbuffer = m_charbuffer_6;
0057e3cd      __return = &*U"mh,."[2];
0057e3d2      PStringBase<char>::PStringBase<char>(&m_charbuffer, __return);
0057e3d7      __return = 1;
0057e3dd      PStringBase<char>::trim(&this->m_strCurrentCommand, 0, __return, m_charbuffer);
0057e3e9      m_charbuffer = ((eax_1 - 1) << 2);
0057e3ea      void* m_charbuffer_5 = operator new[](m_charbuffer);
0057e3ef      int32_t* ecx_9 = var_c;
0057e3f8      int32_t eax_11 = 0;
0057e3f8      
0057e3fc      if ((eax_1 - 1) > 0)
0057e3fc      {
0057e400          if (0 < (eax_1 - 1))
0057e400              goto label_57e404;
0057e400          
0057e40a          while (true)
0057e40a          {
0057e40a              if (ecx_9 != 0)
0057e40c                  ecx_9 = ecx_9[1];
0057e40c              
0057e40f              eax_11 += 1;
0057e40f              
0057e412              if (eax_11 >= (eax_1 - 1))
0057e412                  break;
0057e412              
0057e404          label_57e404:
0057e404              *(uint32_t*)((char*)m_charbuffer_5 + (eax_11 << 2)) = *(uint32_t*)ecx_9;
0057e40a          }
0057e3fc      }
0057e3fc      
0057e414      class PSRefBufferCharData<char>* m_charbuffer_4 = this->m_strCurrentCommand.m_charbuffer;
0057e419      m_charbuffer = &m_charbuffer_4[-1];
0057e41a      __return_1 = m_charbuffer_4;
0057e41e      InterlockedIncrement(m_charbuffer);
0057e428      m_charbuffer = &__return_1;
0057e42d      void var_1c;
0057e42d      __return = &var_1c;
0057e431      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_hashCommands, __return, m_charbuffer);
0057e43c      m_charbuffer = &m_charbuffer_4[-1];
0057e43c      
0057e449      if ((InterlockedDecrement(m_charbuffer) == 0 && m_charbuffer_4 != 0x14))
0057e449      {
0057e44b          int32_t edx_4 = *(int32_t*)((char*)m_charbuffer_4 + -0x14);
0057e44d          m_charbuffer = 1;
0057e451          *(uint32_t*)edx_4(m_charbuffer);
0057e449      }
0057e449      
0057e459      void* var_14;
0057e459      int32_t eax_15;
0057e459      
0057e459      if (var_14 != 0)
0057e45b          eax_15 = *(uint32_t*)((char*)var_14 + 8);
0057e45b      
0057e460      if ((var_14 == 0 || eax_15 == 0))
0057e460      {
0057e47f          m_charbuffer = m_charbuffer_5;
0057e480          __return = (eax_1 - 1);
0057e480          
0057e48a          if (ClientCommunicationSystem::DoChannelCommand(this, __return, m_charbuffer) == 0)
0057e48a          {
0057e492              m_charbuffer = this->m_strLastCommandLine.m_charbuffer;
0057e497              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_24, m_charbuffer);
0057e4a0              m_charbuffer = &var_24;
0057e4a1              CM_Communication::Event_Talk(m_charbuffer);
0057e4a6              void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = var_24;
0057e4b0              m_charbuffer = ((char*)esi_2 + 4);
0057e4b0              
0057e4bd              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_2 != 0))
0057e4bd              {
0057e4bf                  int32_t eax_20 = *(int32_t*)((char*)ADJ(esi_2) + -0x14);
0057e4c1                  m_charbuffer = 1;
0057e4c5                  *(uint32_t*)eax_20(m_charbuffer);
0057e4bd              }
0057e48a          }
0057e460      }
0057e460      else
0057e460      {
0057e462          *(uint32_t*)((char*)var_14 + 0xc);
0057e465          m_charbuffer = m_charbuffer_5;
0057e466          __return = (eax_1 - 1);
0057e466          
0057e46d          if (eax_15(__return, m_charbuffer) == 0)
0057e46d          {
0057e46f              m_charbuffer = &PStringBase<unsigned short>::null_string;
0057e474              __return = 0x26;
0057e478              ClientCommunicationSystem::HandleFailureEvent(this, __return, m_charbuffer);
0057e46d          }
0057e460      }
0057e460      
0057e4c7      m_charbuffer = m_charbuffer_5;
0057e4c8      operator delete[](m_charbuffer);
0057e4d4      var_10 = &List<class PStringBase<char> >::`vftable';
0057e4dc      List<PStringBase<char> >::flush(&var_10);
0057e4e4      int32_t eax_21;
0057e4e4      eax_21 = 1;
0057e4ea      return 1;
0057e2e0  }

0057e4eb                                   90 90 90 90 90                                                             .....

0057e4f0  uint8_t __fastcall ClientCommunicationSystem::DoSetOutput(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057e4f0  {
0057e4f0      class ClientCommunicationSystem* __return = this;
0057e504      JoinArgs(&arg3, arg2, arg3);
0057e504      
0057e516      if (arg3[-1] == 1)
0057e516      {
0057e63e          int32_t* ecx_13 = &arg2;
0057e63e          
0057e642          if (ClientCommunicationSystem::CloseLogFile(this) == 0)
0057e642          {
0057e68f              PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_13, u"Please specify a file to append …");
0057e6a6              ClientSystem::AddTextToScroll(this, &arg2, 0, 1, this->m_idCurrentCommandSource);
0057e6b5          label_57e6b5:
0057e6b5              int32_t* esi_6 = (arg2 - 0x14);
0057e6b5              
0057e6c4              if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0057e6cc                  **(uint32_t**)esi_6(1);
0057e642          }
0057e642          else
0057e642          {
0057e649              PStringBase<unsigned short>::PStringBase<unsigned short>(ecx_13, u"Chat output now directed only to…");
0057e660              ClientSystem::AddTextToScroll(this, &arg2, 0, 1, this->m_idCurrentCommandSource);
0057e66f              int32_t* esi_4 = (arg2 - 0x14);
0057e66f              
0057e67e              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0057e686                  **(uint32_t**)esi_4(1);
0057e642          }
0057e642          
0057e6d2          void* esi_8 = &arg3[-5];
0057e6d2          
0057e6e1          if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
0057e6e9              **(uint32_t**)esi_8(1);
0057e6e9          
0057e6ec          int32_t eax_22;
0057e6ec          eax_22 = 1;
0057e6f0          return 1;
0057e516      }
0057e516      
0057e546      int32_t ebx;
0057e546      ebx = PStringBase<char>::operator==(PSUtils::get_extension(&__return, &arg3), &PStringBase<char>::null_string);
0057e548      void* __offset(ClientCommunicationSystem, -0x14) ebp_2 = ((char*)__return - 0x14);
0057e548      
0057e557      if ((InterlockedDecrement(((char*)ebp_2 + 4)) == 0 && ebp_2 != 0))
0057e560          *(uint32_t*)*(int32_t*)((char*)ADJ(ebp_2) + -0x14)(1);
0057e560      
0057e564      if (ebx != 0)
0057e564      {
0057e56f          PStringBase<char>::PStringBase<char>(&__return, ".txt");
0057e574          class ClientCommunicationSystem* __return_1 = __return;
0057e578          int32_t vtable = __return_1->vtable;
0057e578          
0057e57e          if (vtable != 1)
0057e57e          {
0057e587              PStringBase<char>::append_n_chars(&arg3, __return_1, (vtable - 1));
0057e58c              __return_1 = __return;
0057e57e          }
0057e57e          
0057e59f          if ((InterlockedDecrement(&__return_1[0]) == 0 && __return_1 != 0x14))
0057e5a7              *(uint32_t*)*(int32_t*)((char*)__return_1 + -0x14)(1);
0057e564      }
0057e564      
0057e5ad      char** var_18_4 = arg3;
0057e5ba      PStringBase<char>::PStringBase<char>(&arg2, Formatted, "Copying chat to %s.  Run command…");
0057e5ba      
0057e5d2      if (ClientCommunicationSystem::StartCopyOutputToFile(this, &arg3) == 0)
0057e5d2      {
0057e5d8          char** __saved_ebx_1 = arg3;
0057e5e3          PStringBase<char>::sprintf(&arg2, "Failed to redirect to file %s!\n");
0057e5d2      }
0057e5d2      
0057e609      ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&arg2, &__return, 0), 0, 1, this->m_idCurrentCommandSource);
0057e612      void* __offset(ClientCommunicationSystem, -0x14) esi_2 = ((char*)__return - 0x14);
0057e612      
0057e625      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0057e631          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0057e631      
0057e564      goto label_57e6b5;
0057e4f0  }

0057e6f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0057e700  void __stdcall ClientCommunicationSystem::RecvNotice_DisplayWeenieError(class ClientCommunicationSystem* this @ ecx, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3)

0057e700  {
0057e725      ClientCommunicationSystem::HandleFailureEvent((PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, WidthConvert, &arg3->m_buffer->m_data) - 4), arg2, &arg3);
0057e72e      void* __offset(AC1Legacy::PStringBase<char>, -0x14) esi_3 = &arg3[-5];
0057e72e      
0057e741      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0057e749          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0057e700  }

0057e74f                                               90                                                                 .

0057e750  uint8_t __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* this, class ClientCommunicationSystem::CmdHashData* arg2)

0057e750  {
0057e761      void __return;
0057e761      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(this, &__return, arg2);
0057e76c      int32_t var_4;
0057e76c      
0057e76c      if (var_4 != 0)
0057e76c      {
0057e76f          int32_t eax;
0057e76f          eax = 0;
0057e775          return 0;
0057e76c      }
0057e76c      
0057e77b      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(this, arg2);
0057e781      int32_t eax_1;
0057e781      eax_1 = 1;
0057e787      return 1;
0057e750  }

0057e78a                                90 90 90 90 90 90                                                            ......

0057e790  class ClientCommunicationSystem::CmdHashData* __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::remove(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* this, class CaseInsensitiveStringBase<PStringBase<char> > const* arg2)

0057e790  {
0057e7a6      int32_t __return;
0057e7a6      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(this, &__return, arg2);
0057e7b1      int32_t result;
0057e7b1      
0057e7b1      if (result == 0)
0057e7e2          return 0;
0057e7e2      
0057e7c0      int32_t var_8;
0057e7c0      int32_t var_20_1 = var_8;
0057e7c7      int32_t result_1 = result;
0057e7ca      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, __return);
0057e7d7      return result;
0057e790  }

0057e7e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0057e7f0  uint8_t __thiscall ClientCommunicationSystem::HelpAllGroup(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0057e7f0  {
0057e7f4      bool cond:0 = arg2 != Summary_HelpType;
0057e7f6      char* ebx;
0057e7f6      char* var_4 = ebx;
0057e7f7      char* esi;
0057e7f7      char* var_8 = esi;
0057e7fa      uint32_t* esp;
0057e7fa      enum ClientCommunicationSystem::HelpType var_10;
0057e7fa      char const* const var_c;
0057e7fa      
0057e7fa      if (cond:0)
0057e7fa      {
0057e852          class PStringBase<char>* esi_4 = arg4;
0057e856          var_c = esi_4;
0057e857          var_10 = "@allegiances";
0057e85c          enum ClientCommunicationSystem::HelpType var_14 = Detail_HelpType;
0057e860          ClientCommunicationSystem::HelpAllegiancesGroup(this, var_14, var_10, var_c);
0057e865          var_c = esi_4;
0057e866          var_10 = &*U"fvpca"[4];
0057e86b          var_14 = Summary_HelpType;
0057e86f          ClientCommunicationSystem::HelpStupidChannelHack(this, var_14, var_10, var_c);
0057e874          var_c = esi_4;
0057e875          var_10 = &*U"fvpca"[3];
0057e87a          var_14 = Summary_HelpType;
0057e87e          ClientCommunicationSystem::HelpStupidChannelHack(this, var_14, var_10, var_c);
0057e883          var_c = esi_4;
0057e884          var_10 = U"mh,.";
0057e889          var_14 = Summary_HelpType;
0057e88d          ClientCommunicationSystem::HelpStupidChannelHack(this, var_14, var_10, var_c);
0057e892          var_c = esi_4;
0057e893          var_10 = &*U"fvpca"[2];
0057e898          var_14 = Summary_HelpType;
0057e89c          ClientCommunicationSystem::HelpStupidChannelHack(this, var_14, var_10, var_c);
0057e8a1          var_c = esi_4;
0057e8a2          var_10 = &*U"fvpca"[1];
0057e8a7          var_14 = Summary_HelpType;
0057e8ab          ClientCommunicationSystem::HelpStupidChannelHack(this, var_14, var_10, var_c);
0057e8b0          var_c = esi_4;
0057e8b1          var_10 = U"fvpca";
0057e8b6          var_14 = Summary_HelpType;
0057e8ba          ClientCommunicationSystem::HelpStupidChannelHack(this, var_14, var_10, var_c);
0057e8bf          var_c = esi_4;
0057e8c0          var_10 = "@chatting";
0057e8c5          var_14 = Detail_HelpType;
0057e8c9          ClientCommunicationSystem::HelpChattingGroup(this, var_14, var_10, var_c);
0057e8ce          var_c = esi_4;
0057e8cf          var_10 = "@death";
0057e8d4          var_14 = Detail_HelpType;
0057e8d8          ClientCommunicationSystem::HelpDeathGroup(this, var_14, var_10, var_c);
0057e8dd          var_c = "@emote - Performs a text emote.\n…";
0057e8e6          PStringBase<char>::PStringBase<char>(&arg4, var_c);
0057e8eb          class PStringBase<char>* ecx_13 = arg4;
0057e8ef          int32_t m_charbuffer = ecx_13->m_charbuffer;
0057e8ef          
0057e8f5          if (m_charbuffer != 1)
0057e8f5          {
0057e8f8              var_c = (m_charbuffer - 1);
0057e8f9              var_10 = ecx_13;
0057e8fc              PStringBase<char>::append_n_chars(esi_4, var_10, var_c);
0057e901              ecx_13 = arg4;
0057e8f5          }
0057e8f5          
0057e905          char* ebp;
0057e905          var_c = ebp;
0057e90c          enum ClientCommunicationSystem::HelpType edi;
0057e90c          var_10 = edi;
0057e913          var_14 = &ecx_13[-4];
0057e91c          char const* const var_18;
0057e91c          
0057e91c          if ((InterlockedDecrement(var_14) == 0 && ecx_13 != 0x14))
0057e91c          {
0057e91e              class PStringBase<char> edx_2 = *(int32_t*)((char*)ecx_13 + -0x14);
0057e920              var_18 = 1;
0057e924              *(uint32_t*)edx_2(var_18);
0057e91c          }
0057e91c          
0057e926          var_18 = "@fillcomps - Helps you buy compo…";
0057e92f          PStringBase<char>::PStringBase<char>(&arg3, var_18);
0057e934          char const* eax_8 = arg3;
0057e938          int32_t ecx_17 = *(uint32_t*)(eax_8 - 4);
0057e938          
0057e93e          if (ecx_17 != 1)
0057e93e          {
0057e941              var_18 = (ecx_17 - 1);
0057e945              PStringBase<char>::append_n_chars(esi_4, eax_8, var_18);
0057e94a              eax_8 = arg3;
0057e93e          }
0057e93e          
0057e954          var_18 = &eax_8[0xfffffff0];
0057e954          
0057e95d          if ((InterlockedDecrement(var_18) == 0 && eax_8 != 0x14))
0057e965              **(uint32_t**)(eax_8 - 0x14)(1);
0057e965          
0057e970          PStringBase<char>::PStringBase<char>(&arg2, "@saveui <filename> - Saves the c…");
0057e975          enum ClientCommunicationSystem::HelpType ecx_22 = arg2;
0057e979          int32_t eax_11 = *(uint32_t*)(ecx_22 - 4);
0057e979          
0057e97f          if (eax_11 != 1)
0057e97f          {
0057e986              PStringBase<char>::append_n_chars(esi_4, ecx_22, (eax_11 - 1));
0057e98b              ecx_22 = arg2;
0057e97f          }
0057e97f          
0057e99e          if ((InterlockedDecrement((ecx_22 - 0x10)) == 0 && ecx_22 != 0x14))
0057e9a6              **(uint32_t**)(ecx_22 - 0x14)(1);
0057e9a6          
0057e9b1          PStringBase<char>::PStringBase<char>(&__return_addr, "@loadui <filename> - Loads a pre…");
0057e9b6          void* const __return_addr_1 = __return_addr;
0057e9ba          int32_t eax_15 = *(uint32_t*)((char*)__return_addr_1 - 4);
0057e9ba          
0057e9c0          if (eax_15 != 1)
0057e9c0          {
0057e9c7              PStringBase<char>::append_n_chars(esi_4, __return_addr_1, (eax_15 - 1));
0057e9cc              __return_addr_1 = __return_addr;
0057e9c0          }
0057e9c0          
0057e9df          if ((InterlockedDecrement(((char*)__return_addr_1 - 0x10)) == 0 && __return_addr_1 != 0x14))
0057e9e7              **(uint32_t**)((char*)__return_addr_1 - 0x14)(1);
0057e9e7          
0057e9f2          PStringBase<char>::PStringBase<char>(&var_4, "@saveui <filename> - Saves the c…");
0057e9f7          char* ecx_29 = var_4;
0057e9fb          int32_t eax_19 = *(uint32_t*)(ecx_29 - 4);
0057e9fb          
0057ea01          if (eax_19 != 1)
0057ea01          {
0057ea08              PStringBase<char>::append_n_chars(esi_4, ecx_29, (eax_19 - 1));
0057ea0d              ecx_29 = var_4;
0057ea01          }
0057ea01          
0057ea20          if ((InterlockedDecrement(&ecx_29[0xfffffff0]) == 0 && ecx_29 != 0x14))
0057ea28              **(uint32_t**)(ecx_29 - 0x14)(1);
0057ea28          
0057ea33          PStringBase<char>::PStringBase<char>(&var_8, "@loadui <filename> - Loads a pre…");
0057ea38          char* ecx_33 = var_8;
0057ea3c          int32_t eax_23 = *(uint32_t*)(ecx_33 - 4);
0057ea3c          
0057ea42          if (eax_23 != 1)
0057ea42          {
0057ea49              PStringBase<char>::append_n_chars(esi_4, ecx_33, (eax_23 - 1));
0057ea4e              ecx_33 = var_8;
0057ea42          }
0057ea42          
0057ea61          if ((InterlockedDecrement(&ecx_33[0xfffffff0]) == 0 && ecx_33 != 0x14))
0057ea69              **(uint32_t**)(ecx_33 - 0x14)(1);
0057ea69          
0057ea74          PStringBase<char>::PStringBase<char>(&var_c, "@lockui - Toggles the locked sta…");
0057ea79          char const* const eax_27 = var_c;
0057ea7d          int32_t ecx_37 = *(uint32_t*)(eax_27 - 4);
0057ea83          uint32_t var_30;
0057ea83          
0057ea83          if (ecx_37 != 1)
0057ea83          {
0057ea87              var_30 = eax_27;
0057ea8a              PStringBase<char>::append_n_chars(esi_4, var_30, (ecx_37 - 1));
0057ea8f              eax_27 = var_c;
0057ea83          }
0057ea83          
0057eaa2          if ((InterlockedDecrement(&eax_27[0xfffffff0]) == 0 && eax_27 != 0x14))
0057eaa2          {
0057eaa4              int32_t edx_8 = *(uint32_t*)(eax_27 - 0x14);
0057eaa6              var_30 = 1;
0057eaaa              *(uint32_t*)edx_8(var_30);
0057eaa2          }
0057eaa2          
0057eaac          var_30 = "@friends - Helps you manage your…";
0057eab5          PStringBase<char>::PStringBase<char>(&var_10, var_30);
0057eaba          enum ClientCommunicationSystem::HelpType eax_30 = var_10;
0057eabe          int32_t ecx_42 = *(uint32_t*)(eax_30 - 4);
0057eabe          
0057eac4          if (ecx_42 != 1)
0057eac4          {
0057eac7              var_30 = (ecx_42 - 1);
0057eacb              PStringBase<char>::append_n_chars(esi_4, eax_30, var_30);
0057ead0              eax_30 = var_10;
0057eac4          }
0057eac4          
0057eada          var_30 = (eax_30 - 0x10);
0057eada          
0057eae3          if ((InterlockedDecrement(var_30) == 0 && eax_30 != 0x14))
0057eaeb              **(uint32_t**)(eax_30 - 0x14)(1);
0057eaeb          
0057eaf6          PStringBase<char>::PStringBase<char>(&var_14, "@house - Commands that help you …");
0057eafb          enum ClientCommunicationSystem::HelpType eax_33 = var_14;
0057eaff          int32_t ecx_47 = *(uint32_t*)(eax_33 - 4);
0057eaff          
0057eb05          if (ecx_47 != 1)
0057eb05          {
0057eb0c              PStringBase<char>::append_n_chars(esi_4, eax_33, (ecx_47 - 1));
0057eb11              eax_33 = var_14;
0057eb05          }
0057eb05          
0057eb24          if ((InterlockedDecrement((eax_33 - 0x10)) == 0 && eax_33 != 0x14))
0057eb2c              **(uint32_t**)(eax_33 - 0x14)(1);
0057eb2c          
0057eb37          PStringBase<char>::PStringBase<char>(&var_18, "@squelch - Squelches a character…");
0057eb3c          char const* const eax_36 = var_18;
0057eb40          int32_t ecx_52 = *(uint32_t*)(eax_36 - 4);
0057eb40          
0057eb46          if (ecx_52 != 1)
0057eb46          {
0057eb4d              PStringBase<char>::append_n_chars(esi_4, eax_36, (ecx_52 - 1));
0057eb52              eax_36 = var_18;
0057eb46          }
0057eb46          
0057eb65          if ((InterlockedDecrement(&eax_36[0xfffffff0]) == 0 && eax_36 != 0x14))
0057eb6d              **(uint32_t**)(eax_36 - 0x14)(1);
0057eb6d          
0057eb79          ClientCommunicationSystem::HelpStatusGroup(this, Detail_HelpType, "@status", esi_4);
0057eb88          ClientCommunicationSystem::HelpTextGroup(this, Detail_HelpType, "@text", esi_4);
0057eb8e          esp = &var_30;
0057e7fa      }
0057e7fa      else
0057e7fa      {
0057e7fc          var_c = "@help commands - Lists all comma…";
0057e805          PStringBase<char>::PStringBase<char>(&arg2, var_c);
0057e80a          enum ClientCommunicationSystem::HelpType esi_1 = arg2;
0057e80e          int32_t eax = *(uint32_t*)(esi_1 - 4);
0057e80e          
0057e814          if (eax != 1)
0057e814          {
0057e816              class PStringBase<char>* ecx_1 = arg4;
0057e81b              var_c = (eax - 1);
0057e81c              var_10 = esi_1;
0057e81d              PStringBase<char>::append_n_chars(ecx_1, var_10, var_c);
0057e822              esi_1 = arg2;
0057e814          }
0057e814          
0057e82c          var_c = (esi_1 - 0x10);
0057e82c          esp = &var_c;
0057e82c          
0057e83d          if ((InterlockedDecrement(var_c) == 0 && esi_1 != 0x14))
0057e83d          {
0057e843              int32_t edx_1 = *(uint32_t*)(esi_1 - 0x14);
0057e845              var_10 = List_HelpType;
0057e849              *(uint32_t*)edx_1(var_10);
0057e84c              int32_t eax_4;
0057e84c              eax_4 = 1;
0057e84f              return 1;
0057e83d          }
0057e7fa      }
0057eb8f      *(uint32_t*)esp;
0057eb90      int32_t eax_3;
0057eb90      eax_3 = 1;
0057eb8f      esp[1];
0057eb93      return 1;
0057e7f0  }

0057eb96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0057eba0  uint8_t __thiscall ClientCommunicationSystem::DoTurbineChat_Allegiance(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057eba0  {
0057eba1      int32_t ebx = arg2;
0057eba1      
0057ebaa      if (ebx == 0)
0057ebaa      {
0057ebb3          ClientCommunicationSystem::HandleFailureEvent(this, 0x26, &PStringBase<unsigned short>::null_string);
0057ebb9          int32_t eax;
0057ebb9          eax = 0;
0057ebbc          return 0;
0057ebaa      }
0057ebaa      
0057ebc7      int32_t eax_2 = CInputManager::GetMouseX(gmCCommunicationSystem::GetChatRoomTracker());
0057ebc7      
0057ebd0      if (eax_2 <= 0)
0057ebd0      {
0057ebde          ClientCommunicationSystem::HandleFailureEvent(this, 0x414, &PStringBase<unsigned short>::null_string);
0057ebe5          int32_t eax_3;
0057ebe5          eax_3 = 0;
0057ebe8          return 0;
0057ebd0      }
0057ebd0      
0057ebf6      JoinArgs(&arg2, ebx, arg3);
0057ec1f      ebx = ClientCommunicationSystem::SendTurbineChat(this, eax_2, Allegiance_ChatTypeEnum, &arg2, PlayerModule::HearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
0057ec21      int32_t* esi_2 = (arg2 - 0x14);
0057ec21      
0057ec34      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057ec3c          **(uint32_t**)esi_2(1);
0057ec3c      
0057ec40      int32_t eax_9;
0057ec40      eax_9 = ebx;
0057ec43      return eax_9;
0057eba0  }

0057ec46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0057ec50  uint8_t __thiscall ClientCommunicationSystem::DoTurbineChat_General(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057ec50  {
0057ec51      int32_t ebx = arg2;
0057ec51      
0057ec5a      if (ebx == 0)
0057ec5a      {
0057ec63          ClientCommunicationSystem::HandleFailureEvent(this, 0x26, &PStringBase<unsigned short>::null_string);
0057ec69          int32_t eax;
0057ec69          eax = 0;
0057ec6c          return 0;
0057ec5a      }
0057ec5a      
0057ec77      int32_t eax_2 = CInputManager::GetMouseY(gmCCommunicationSystem::GetChatRoomTracker());
0057ec89      JoinArgs(&arg2, ebx, arg3);
0057ecb2      ebx = ClientCommunicationSystem::SendTurbineChat(this, eax_2, General_ChatTypeEnum, &arg2, PlayerModule::HearGeneralChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
0057ecb4      int32_t* esi_2 = (arg2 - 0x14);
0057ecb4      
0057ecc7      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057eccf          **(uint32_t**)esi_2(1);
0057eccf      
0057ecd3      int32_t eax_8;
0057ecd3      eax_8 = ebx;
0057ecd6      return eax_8;
0057ec50  }

0057ecd9                                                                             90 90 90 90 90 90 90                           .......

0057ece0  uint8_t __thiscall ClientCommunicationSystem::DoTurbineChat_Trade(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057ece0  {
0057ece1      int32_t ebx = arg2;
0057ece1      
0057ecea      if (ebx == 0)
0057ecea      {
0057ecf3          ClientCommunicationSystem::HandleFailureEvent(this, 0x26, &PStringBase<unsigned short>::null_string);
0057ecf9          int32_t eax;
0057ecf9          eax = 0;
0057ecfc          return 0;
0057ecea      }
0057ecea      
0057ed07      uint32_t eax_2 = DiskConBase::GetSubset(gmCCommunicationSystem::GetChatRoomTracker());
0057ed19      JoinArgs(&arg2, ebx, arg3);
0057ed42      ebx = ClientCommunicationSystem::SendTurbineChat(this, eax_2, Trade_ChatTypeEnum, &arg2, PlayerModule::HearTradeChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
0057ed44      int32_t* esi_2 = (arg2 - 0x14);
0057ed44      
0057ed57      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057ed5f          **(uint32_t**)esi_2(1);
0057ed5f      
0057ed63      int32_t eax_8;
0057ed63      eax_8 = ebx;
0057ed66      return eax_8;
0057ece0  }

0057ed69                             90 90 90 90 90 90 90                                                           .......

0057ed70  uint8_t __thiscall ClientCommunicationSystem::DoTurbineChat_LFG(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057ed70  {
0057ed71      int32_t ebx = arg2;
0057ed71      
0057ed7a      if (ebx == 0)
0057ed7a      {
0057ed83          ClientCommunicationSystem::HandleFailureEvent(this, 0x26, &PStringBase<unsigned short>::null_string);
0057ed89          int32_t eax;
0057ed89          eax = 0;
0057ed8c          return 0;
0057ed7a      }
0057ed7a      
0057ed97      int32_t eax_2 = PhysicsDesc::get_autonomous_movement(gmCCommunicationSystem::GetChatRoomTracker());
0057eda9      JoinArgs(&arg2, ebx, arg3);
0057edd2      ebx = ClientCommunicationSystem::SendTurbineChat(this, eax_2, LFG_ChatTypeEnum, &arg2, PlayerModule::HearLFGChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
0057edd4      int32_t* esi_2 = (arg2 - 0x14);
0057edd4      
0057ede7      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057edef          **(uint32_t**)esi_2(1);
0057edef      
0057edf3      int32_t eax_8;
0057edf3      eax_8 = ebx;
0057edf6      return eax_8;
0057ed70  }

0057edf9                                                                             90 90 90 90 90 90 90                           .......

0057ee00  uint8_t __thiscall ClientCommunicationSystem::DoTurbineChat_Roleplay(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057ee00  {
0057ee01      int32_t ebx = arg2;
0057ee01      
0057ee0a      if (ebx == 0)
0057ee0a      {
0057ee13          ClientCommunicationSystem::HandleFailureEvent(this, 0x26, &PStringBase<unsigned short>::null_string);
0057ee19          int32_t eax;
0057ee19          eax = 0;
0057ee1c          return 0;
0057ee0a      }
0057ee0a      
0057ee27      uint32_t eax_2 = EffectInfoRegion::GetStat(gmCCommunicationSystem::GetChatRoomTracker());
0057ee39      JoinArgs(&arg2, ebx, arg3);
0057ee62      ebx = ClientCommunicationSystem::SendTurbineChat(this, eax_2, Roleplay_ChatTypeEnum, &arg2, PlayerModule::HearRoleplayChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
0057ee64      int32_t* esi_2 = (arg2 - 0x14);
0057ee64      
0057ee77      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057ee7f          **(uint32_t**)esi_2(1);
0057ee7f      
0057ee83      int32_t eax_8;
0057ee83      eax_8 = ebx;
0057ee86      return eax_8;
0057ee00  }

0057ee89                             90 90 90 90 90 90 90                                                           .......

0057ee90  uint8_t __thiscall ClientCommunicationSystem::DoTurbineChat_Olthoi(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057ee90  {
0057ee91      int32_t ebx = arg2;
0057ee91      
0057ee9a      if (ebx == 0)
0057ee9a      {
0057eea3          ClientCommunicationSystem::HandleFailureEvent(this, 0x26, &PStringBase<unsigned short>::null_string);
0057eea9          int32_t eax;
0057eea9          eax = 0;
0057eeac          return 0;
0057ee9a      }
0057ee9a      
0057eeb7      uint32_t eax_2 = Attribute2ndInfoRegion::GetStat(gmCCommunicationSystem::GetChatRoomTracker());
0057eec9      JoinArgs(&arg2, ebx, arg3);
0057eee6      uint8_t eax_5 = ClientCommunicationSystem::SendTurbineChat(this, eax_2, Olthoi_ChatTypeEnum, &arg2, ((int8_t)CPlayerSystem::IsOlthoi() != 0));
0057eeef      int32_t* esi_2 = (arg2 - 0x14);
0057eef6      ebx = eax_5;
0057eef6      
0057ef04      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057ef0c          **(uint32_t**)esi_2(1);
0057ef0c      
0057ef10      int32_t eax_6;
0057ef10      eax_6 = ebx;
0057ef13      return eax_6;
0057ee90  }

0057ef16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0057ef20  uint8_t __thiscall ClientCommunicationSystem::DoTurbineChat_Society(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057ef20  {
0057ef21      int32_t ebx = arg2;
0057ef21      
0057ef2a      if (ebx == 0)
0057ef2a      {
0057ef33          ClientCommunicationSystem::HandleFailureEvent(this, 0x26, &PStringBase<unsigned short>::null_string);
0057ef39          int32_t eax;
0057ef39          eax = 0;
0057ef3c          return 0;
0057ef2a      }
0057ef2a      
0057ef47      char* eax_2 = MMapUtil::GetMappingAddr(gmCCommunicationSystem::GetChatRoomTracker());
0057ef59      JoinArgs(&arg2, ebx, arg3);
0057ef82      ebx = ClientCommunicationSystem::SendTurbineChat(this, eax_2, Society_ChatTypeEnum, &arg2, PlayerModule::HearSocietyChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
0057ef84      int32_t* esi_2 = (arg2 - 0x14);
0057ef84      
0057ef97      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057ef9f          **(uint32_t**)esi_2(1);
0057ef9f      
0057efa3      int32_t eax_8;
0057efa3      eax_8 = ebx;
0057efa6      return eax_8;
0057ef20  }

0057efa9                             90 90 90 90 90 90 90                                                           .......

0057efb0  uint8_t __fastcall ClientCommunicationSystem::StartupTurbineChatSystem(class ClientCommunicationSystem* this)

0057efb0  {
0057efb9      int32_t ebx = 0;
0057efc4      class CaseInsensitiveStringBase<PStringBase<char> > var_10 = 0;
0057efc8      PStringBase<char>::PStringBase<char>(&var_10, &*U"fvpca"[4]);
0057efcd      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* ebp = &this->m_hashCommands;
0057efd7      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* var_14 = ebp;
0057efdb      class ClientCommunicationSystem::CmdHashData* eax = IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::remove(ebp, &var_10);
0057efe4      int32_t* esi_2 = (var_10 - 0x14);
0057efe4      
0057eff9      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0057f001          **(uint32_t**)esi_2(1);
0057f001      
0057f005      if (eax != 0)
0057f005      {
0057f009          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = (eax->m_hashKey.m_charbuffer - 0x14);
0057f009          
0057f01c          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0057f024              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0057f024          
0057f027          operator delete(eax);
0057f005      }
0057f005      
0057f03c      void* esi_5 = operator new(0x18);
0057f03c      
0057f043      if (esi_5 == 0)
0057f08d          esi_5 = nullptr;
0057f043      else
0057f043      {
0057f053          PStringBase<char>::PStringBase<char>(&var_10, &*U"fvpca"[4]);
0057f05c          *(uint32_t*)esi_5 = var_10;
0057f066          ebx = 1;
0057f06b          InterlockedIncrement((var_10 - 0x10));
0057f072          *(uint32_t*)((char*)esi_5 + 8) = ClientCommunicationSystem::DoTurbineChat_Allegiance;
0057f077          *(uint32_t*)((char*)esi_5 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Allegiance;
0057f07a          ebp = var_14;
0057f07e          *(uint32_t*)((char*)esi_5 + 4) = 0;
0057f085          *(uint32_t*)((char*)esi_5 + 0xc) = 0;
0057f088          *(uint32_t*)((char*)esi_5 + 0x14) = 0;
0057f043      }
0057f043      
0057f097      uint8_t (__thiscall* __return)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3);
0057f097      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_5);
0057f0a2      int32_t var_4;
0057f0a2      
0057f0a2      if (var_4 == 0)
0057f0a7          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_5);
0057f0a7      
0057f0af      if ((ebx & 1) != 0)
0057f0af      {
0057f0b5          void* esi_7 = (var_10 - 0x14);
0057f0bc          ebx &= 0xfffffffe;
0057f0bc          
0057f0cb          if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0057f0d3              **(uint32_t**)esi_7(1);
0057f0af      }
0057f0af      
0057f0dc      void* esi_8 = operator new(0x18);
0057f0dc      
0057f0e3      if (esi_8 == 0)
0057f12b          esi_8 = nullptr;
0057f0e3      else
0057f0e3      {
0057f0f3          PStringBase<char>::PStringBase<char>(&var_10, "guild");
0057f0fc          *(uint32_t*)esi_8 = var_10;
0057f106          ebx |= 2;
0057f109          InterlockedIncrement((var_10 - 0x10));
0057f110          *(uint32_t*)((char*)esi_8 + 8) = ClientCommunicationSystem::DoTurbineChat_Allegiance;
0057f115          *(uint32_t*)((char*)esi_8 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Allegiance;
0057f118          ebp = var_14;
0057f11c          *(uint32_t*)((char*)esi_8 + 4) = 0;
0057f123          *(uint32_t*)((char*)esi_8 + 0xc) = 0;
0057f126          *(uint32_t*)((char*)esi_8 + 0x14) = 0;
0057f0e3      }
0057f0e3      
0057f135      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_8);
0057f135      
0057f140      if (var_4 == 0)
0057f145          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_8);
0057f145      
0057f14d      if ((ebx & 2) != 0)
0057f14d      {
0057f153          void* esi_10 = (var_10 - 0x14);
0057f15a          ebx &= 0xfffffffd;
0057f15a          
0057f169          if ((InterlockedDecrement(((char*)esi_10 + 4)) == 0 && esi_10 != 0))
0057f171              **(uint32_t**)esi_10(1);
0057f14d      }
0057f14d      
0057f17a      void* esi_11 = operator new(0x18);
0057f17a      
0057f181      if (esi_11 == 0)
0057f1d0          esi_11 = nullptr;
0057f181      else
0057f181      {
0057f191          __return = ClientCommunicationSystem::DoTurbineChat_Allegiance;
0057f199          PStringBase<char>::PStringBase<char>(&var_10, &data_7e1148);
0057f1a2          *(uint32_t*)esi_11 = var_10;
0057f1ac          ebx |= 4;
0057f1af          InterlockedIncrement((var_10 - 0x10));
0057f1b1          uint8_t (__thiscall* __return_1)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
0057f1b7          *(uint32_t*)((char*)esi_11 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Allegiance;
0057f1ba          ebp = var_14;
0057f1be          *(uint32_t*)((char*)esi_11 + 4) = 0;
0057f1c5          *(uint32_t*)((char*)esi_11 + 8) = __return_1;
0057f1c8          *(uint32_t*)((char*)esi_11 + 0xc) = 0;
0057f1cb          *(uint32_t*)((char*)esi_11 + 0x14) = 0;
0057f181      }
0057f181      
0057f1da      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_11);
0057f1da      
0057f1e5      if (var_4 == 0)
0057f1ea          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_11);
0057f1ea      
0057f1f2      if ((ebx & 4) != 0)
0057f1f2      {
0057f1f8          void* esi_13 = (var_10 - 0x14);
0057f1ff          ebx &= 0xfffffffb;
0057f1ff          
0057f20e          if ((InterlockedDecrement(((char*)esi_13 + 4)) == 0 && esi_13 != 0))
0057f216              **(uint32_t**)esi_13(1);
0057f1f2      }
0057f1f2      
0057f21f      void* esi_14 = operator new(0x18);
0057f21f      
0057f226      if (esi_14 == 0)
0057f26e          esi_14 = nullptr;
0057f226      else
0057f226      {
0057f236          PStringBase<char>::PStringBase<char>(&var_10, "general");
0057f23f          *(uint32_t*)esi_14 = var_10;
0057f249          ebx |= 8;
0057f24c          InterlockedIncrement((var_10 - 0x10));
0057f253          *(uint32_t*)((char*)esi_14 + 8) = ClientCommunicationSystem::DoTurbineChat_General;
0057f258          *(uint32_t*)((char*)esi_14 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_General;
0057f25b          ebp = var_14;
0057f25f          *(uint32_t*)((char*)esi_14 + 4) = 0;
0057f266          *(uint32_t*)((char*)esi_14 + 0xc) = 0;
0057f269          *(uint32_t*)((char*)esi_14 + 0x14) = 0;
0057f226      }
0057f226      
0057f278      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_14);
0057f278      
0057f283      if (var_4 == 0)
0057f288          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_14);
0057f288      
0057f290      if ((ebx & 8) != 0)
0057f290      {
0057f296          void* esi_16 = (var_10 - 0x14);
0057f29d          ebx &= 0xfffffff7;
0057f29d          
0057f2ac          if ((InterlockedDecrement(((char*)esi_16 + 4)) == 0 && esi_16 != 0))
0057f2b4              **(uint32_t**)esi_16(1);
0057f290      }
0057f290      
0057f2bd      void* esi_17 = operator new(0x18);
0057f2bd      
0057f2c4      if (esi_17 == 0)
0057f313          esi_17 = nullptr;
0057f2c4      else
0057f2c4      {
0057f2d4          __return = ClientCommunicationSystem::DoTurbineChat_General;
0057f2dc          PStringBase<char>::PStringBase<char>(&var_10, &data_7e113c);
0057f2e5          *(uint32_t*)esi_17 = var_10;
0057f2ef          ebx |= 0x10;
0057f2f2          InterlockedIncrement((var_10 - 0x10));
0057f2f4          uint8_t (__thiscall* __return_2)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
0057f2fa          *(uint32_t*)((char*)esi_17 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_General;
0057f2fd          ebp = var_14;
0057f301          *(uint32_t*)((char*)esi_17 + 4) = 0;
0057f308          *(uint32_t*)((char*)esi_17 + 8) = __return_2;
0057f30b          *(uint32_t*)((char*)esi_17 + 0xc) = 0;
0057f30e          *(uint32_t*)((char*)esi_17 + 0x14) = 0;
0057f2c4      }
0057f2c4      
0057f31d      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_17);
0057f31d      
0057f328      if (var_4 == 0)
0057f32d          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_17);
0057f32d      
0057f335      if ((ebx & 0x10) != 0)
0057f335      {
0057f33b          void* esi_19 = (var_10 - 0x14);
0057f342          ebx &= 0xffffffef;
0057f342          
0057f351          if ((InterlockedDecrement(((char*)esi_19 + 4)) == 0 && esi_19 != 0))
0057f359              **(uint32_t**)esi_19(1);
0057f335      }
0057f335      
0057f362      void* esi_20 = operator new(0x18);
0057f362      
0057f369      if (esi_20 == 0)
0057f3b1          esi_20 = nullptr;
0057f369      else
0057f369      {
0057f379          PStringBase<char>::PStringBase<char>(&var_10, "trade");
0057f382          *(uint32_t*)esi_20 = var_10;
0057f38c          ebx |= 0x20;
0057f38f          InterlockedIncrement((var_10 - 0x10));
0057f396          *(uint32_t*)((char*)esi_20 + 8) = ClientCommunicationSystem::DoTurbineChat_Trade;
0057f39b          *(uint32_t*)((char*)esi_20 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Trade;
0057f39e          ebp = var_14;
0057f3a2          *(uint32_t*)((char*)esi_20 + 4) = 0;
0057f3a9          *(uint32_t*)((char*)esi_20 + 0xc) = 0;
0057f3ac          *(uint32_t*)((char*)esi_20 + 0x14) = 0;
0057f369      }
0057f369      
0057f3bb      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_20);
0057f3bb      
0057f3c6      if (var_4 == 0)
0057f3cb          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_20);
0057f3cb      
0057f3d3      if ((ebx & 0x20) != 0)
0057f3d3      {
0057f3d9          void* esi_22 = (var_10 - 0x14);
0057f3e0          ebx &= 0xffffffdf;
0057f3e0          
0057f3ef          if ((InterlockedDecrement(((char*)esi_22 + 4)) == 0 && esi_22 != 0))
0057f3f7              **(uint32_t**)esi_22(1);
0057f3d3      }
0057f3d3      
0057f400      void* esi_23 = operator new(0x18);
0057f400      
0057f407      if (esi_23 == 0)
0057f456          esi_23 = nullptr;
0057f407      else
0057f407      {
0057f417          __return = ClientCommunicationSystem::DoTurbineChat_Trade;
0057f41f          PStringBase<char>::PStringBase<char>(&var_10, &data_7e1130);
0057f428          *(uint32_t*)esi_23 = var_10;
0057f432          ebx |= 0x40;
0057f435          InterlockedIncrement((var_10 - 0x10));
0057f437          uint8_t (__thiscall* __return_3)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
0057f43d          *(uint32_t*)((char*)esi_23 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Trade;
0057f440          ebp = var_14;
0057f444          *(uint32_t*)((char*)esi_23 + 4) = 0;
0057f44b          *(uint32_t*)((char*)esi_23 + 8) = __return_3;
0057f44e          *(uint32_t*)((char*)esi_23 + 0xc) = 0;
0057f451          *(uint32_t*)((char*)esi_23 + 0x14) = 0;
0057f407      }
0057f407      
0057f460      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_23);
0057f460      
0057f46b      if (var_4 == 0)
0057f470          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_23);
0057f470      
0057f478      if ((ebx & 0x40) != 0)
0057f478      {
0057f47e          void* esi_25 = (var_10 - 0x14);
0057f485          ebx &= 0xffffffbf;
0057f485          
0057f494          if ((InterlockedDecrement(((char*)esi_25 + 4)) == 0 && esi_25 != 0))
0057f49c              **(uint32_t**)esi_25(1);
0057f478      }
0057f478      
0057f4a5      void* esi_26 = operator new(0x18);
0057f4a5      
0057f4ac      if (esi_26 == 0)
0057f4f7          esi_26 = nullptr;
0057f4ac      else
0057f4ac      {
0057f4bc          PStringBase<char>::PStringBase<char>(&var_10, &data_7e112c);
0057f4c5          *(uint32_t*)esi_26 = var_10;
0057f4cf          ebx |= 0x80;
0057f4d5          InterlockedIncrement((var_10 - 0x10));
0057f4dc          *(uint32_t*)((char*)esi_26 + 8) = ClientCommunicationSystem::DoTurbineChat_LFG;
0057f4e1          *(uint32_t*)((char*)esi_26 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_LFG;
0057f4e4          ebp = var_14;
0057f4e8          *(uint32_t*)((char*)esi_26 + 4) = 0;
0057f4ef          *(uint32_t*)((char*)esi_26 + 0xc) = 0;
0057f4f2          *(uint32_t*)((char*)esi_26 + 0x14) = 0;
0057f4ac      }
0057f4ac      
0057f501      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_26);
0057f501      
0057f50c      if (var_4 == 0)
0057f511          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_26);
0057f511      
0057f518      if (ebx < 0)
0057f518      {
0057f51e          void* esi_28 = (var_10 - 0x14);
0057f525          ebx &= 0xffffff7f;
0057f525          
0057f537          if ((InterlockedDecrement(((char*)esi_28 + 4)) == 0 && esi_28 != 0))
0057f53f              **(uint32_t**)esi_28(1);
0057f518      }
0057f518      
0057f548      void* esi_29 = operator new(0x18);
0057f548      
0057f54f      if (esi_29 == 0)
0057f5a1          esi_29 = nullptr;
0057f54f      else
0057f54f      {
0057f55f          __return = ClientCommunicationSystem::DoTurbineChat_LFG;
0057f567          PStringBase<char>::PStringBase<char>(&var_10, "clfg");
0057f570          *(uint32_t*)esi_29 = var_10;
0057f57a          ebx |= 0x100;
0057f580          InterlockedIncrement((var_10 - 0x10));
0057f582          uint8_t (__thiscall* __return_4)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
0057f588          *(uint32_t*)((char*)esi_29 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_LFG;
0057f58b          ebp = var_14;
0057f58f          *(uint32_t*)((char*)esi_29 + 4) = 0;
0057f596          *(uint32_t*)((char*)esi_29 + 8) = __return_4;
0057f599          *(uint32_t*)((char*)esi_29 + 0xc) = 0;
0057f59c          *(uint32_t*)((char*)esi_29 + 0x14) = 0;
0057f54f      }
0057f54f      
0057f5ab      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_29);
0057f5ab      
0057f5b6      if (var_4 == 0)
0057f5bb          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_29);
0057f5bb      
0057f5c3      if ((*(uint8_t*)((char*)ebx)[1] & 1) != 0)
0057f5c3      {
0057f5c9          void* esi_31 = (var_10 - 0x14);
0057f5d0          ebx &= 0xfffffeff;
0057f5d0          
0057f5e2          if ((InterlockedDecrement(((char*)esi_31 + 4)) == 0 && esi_31 != 0))
0057f5ea              **(uint32_t**)esi_31(1);
0057f5c3      }
0057f5c3      
0057f5f3      void* esi_32 = operator new(0x18);
0057f5f3      
0057f5fa      if (esi_32 == 0)
0057f645          esi_32 = nullptr;
0057f5fa      else
0057f5fa      {
0057f60a          PStringBase<char>::PStringBase<char>(&var_10, "roleplay");
0057f613          *(uint32_t*)esi_32 = var_10;
0057f61d          ebx |= 0x200;
0057f623          InterlockedIncrement((var_10 - 0x10));
0057f62a          *(uint32_t*)((char*)esi_32 + 8) = ClientCommunicationSystem::DoTurbineChat_Roleplay;
0057f62f          *(uint32_t*)((char*)esi_32 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Roleplay;
0057f632          ebp = var_14;
0057f636          *(uint32_t*)((char*)esi_32 + 4) = 0;
0057f63d          *(uint32_t*)((char*)esi_32 + 0xc) = 0;
0057f640          *(uint32_t*)((char*)esi_32 + 0x14) = 0;
0057f5fa      }
0057f5fa      
0057f64f      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_32);
0057f64f      
0057f65a      if (var_4 == 0)
0057f65f          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_32);
0057f65f      
0057f667      if ((*(uint8_t*)((char*)ebx)[1] & 2) != 0)
0057f667      {
0057f66d          void* esi_34 = (var_10 - 0x14);
0057f674          ebx &= 0xfffffdff;
0057f674          
0057f686          if ((InterlockedDecrement(((char*)esi_34 + 4)) == 0 && esi_34 != 0))
0057f68e              **(uint32_t**)esi_34(1);
0057f667      }
0057f667      
0057f697      void* esi_35 = operator new(0x18);
0057f697      
0057f69e      if (esi_35 == 0)
0057f6f0          esi_35 = nullptr;
0057f69e      else
0057f69e      {
0057f6ae          __return = ClientCommunicationSystem::DoTurbineChat_Roleplay;
0057f6b6          PStringBase<char>::PStringBase<char>(&var_10, &data_7e1114);
0057f6bf          *(uint32_t*)esi_35 = var_10;
0057f6c9          ebx |= 0x400;
0057f6cf          InterlockedIncrement((var_10 - 0x10));
0057f6d1          uint8_t (__thiscall* __return_5)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
0057f6d7          *(uint32_t*)((char*)esi_35 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Roleplay;
0057f6da          ebp = var_14;
0057f6de          *(uint32_t*)((char*)esi_35 + 4) = 0;
0057f6e5          *(uint32_t*)((char*)esi_35 + 8) = __return_5;
0057f6e8          *(uint32_t*)((char*)esi_35 + 0xc) = 0;
0057f6eb          *(uint32_t*)((char*)esi_35 + 0x14) = 0;
0057f69e      }
0057f69e      
0057f6fa      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_35);
0057f6fa      
0057f705      if (var_4 == 0)
0057f70a          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_35);
0057f70a      
0057f712      if ((*(uint8_t*)((char*)ebx)[1] & 4) != 0)
0057f712      {
0057f718          void* esi_37 = (var_10 - 0x14);
0057f71f          ebx &= 0xfffffbff;
0057f71f          
0057f731          if ((InterlockedDecrement(((char*)esi_37 + 4)) == 0 && esi_37 != 0))
0057f739              **(uint32_t**)esi_37(1);
0057f712      }
0057f712      
0057f742      void* esi_38 = operator new(0x18);
0057f742      
0057f749      if (esi_38 == 0)
0057f794          esi_38 = nullptr;
0057f749      else
0057f749      {
0057f759          PStringBase<char>::PStringBase<char>(&var_10, "society");
0057f762          *(uint32_t*)esi_38 = var_10;
0057f76c          ebx |= 0x800;
0057f772          InterlockedIncrement((var_10 - 0x10));
0057f779          *(uint32_t*)((char*)esi_38 + 8) = ClientCommunicationSystem::DoTurbineChat_Society;
0057f77e          *(uint32_t*)((char*)esi_38 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Society;
0057f781          ebp = var_14;
0057f785          *(uint32_t*)((char*)esi_38 + 4) = 0;
0057f78c          *(uint32_t*)((char*)esi_38 + 0xc) = 0;
0057f78f          *(uint32_t*)((char*)esi_38 + 0x14) = 0;
0057f749      }
0057f749      
0057f79e      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_38);
0057f79e      
0057f7a9      if (var_4 == 0)
0057f7ae          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_38);
0057f7ae      
0057f7b6      if ((*(uint8_t*)((char*)ebx)[1] & 8) != 0)
0057f7b6      {
0057f7bc          void* esi_40 = (var_10 - 0x14);
0057f7c3          ebx &= 0xfffff7ff;
0057f7c3          
0057f7d5          if ((InterlockedDecrement(((char*)esi_40 + 4)) == 0 && esi_40 != 0))
0057f7dd              **(uint32_t**)esi_40(1);
0057f7b6      }
0057f7b6      
0057f7e6      void* esi_41 = operator new(0x18);
0057f7e6      
0057f7ed      if (esi_41 == 0)
0057f83f          esi_41 = nullptr;
0057f7ed      else
0057f7ed      {
0057f7fd          __return = ClientCommunicationSystem::DoTurbineChat_Society;
0057f805          PStringBase<char>::PStringBase<char>(&var_10, &data_7e1108);
0057f80e          *(uint32_t*)esi_41 = var_10;
0057f818          ebx |= 0x1000;
0057f81e          InterlockedIncrement((var_10 - 0x10));
0057f820          uint8_t (__thiscall* __return_6)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
0057f826          *(uint32_t*)((char*)esi_41 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Society;
0057f829          ebp = var_14;
0057f82d          *(uint32_t*)((char*)esi_41 + 4) = 0;
0057f834          *(uint32_t*)((char*)esi_41 + 8) = __return_6;
0057f837          *(uint32_t*)((char*)esi_41 + 0xc) = 0;
0057f83a          *(uint32_t*)((char*)esi_41 + 0x14) = 0;
0057f7ed      }
0057f7ed      
0057f849      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_41);
0057f849      
0057f854      if (var_4 == 0)
0057f859          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_41);
0057f859      
0057f861      if ((*(uint8_t*)((char*)ebx)[1] & 0x10) != 0)
0057f861      {
0057f867          void* esi_43 = (var_10 - 0x14);
0057f86e          ebx &= 0xffffefff;
0057f86e          
0057f880          if ((InterlockedDecrement(((char*)esi_43 + 4)) == 0 && esi_43 != 0))
0057f888              **(uint32_t**)esi_43(1);
0057f861      }
0057f861      
0057f891      void* esi_44 = operator new(0x18);
0057f891      
0057f898      if (esi_44 == 0)
0057f8e3          esi_44 = nullptr;
0057f898      else
0057f898      {
0057f8a8          PStringBase<char>::PStringBase<char>(&var_10, "olthoi");
0057f8b1          *(uint32_t*)esi_44 = var_10;
0057f8bb          ebx |= 0x2000;
0057f8c1          InterlockedIncrement((var_10 - 0x10));
0057f8c8          *(uint32_t*)((char*)esi_44 + 8) = ClientCommunicationSystem::DoTurbineChat_Olthoi;
0057f8cd          *(uint32_t*)((char*)esi_44 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Olthoi;
0057f8d0          ebp = var_14;
0057f8d4          *(uint32_t*)((char*)esi_44 + 4) = 0;
0057f8db          *(uint32_t*)((char*)esi_44 + 0xc) = 0;
0057f8de          *(uint32_t*)((char*)esi_44 + 0x14) = 0;
0057f898      }
0057f898      
0057f8ed      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_44);
0057f8ed      
0057f8f8      if (var_4 == 0)
0057f8fd          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_44);
0057f8fd      
0057f905      if ((*(uint8_t*)((char*)ebx)[1] & 0x20) != 0)
0057f905      {
0057f90b          void* esi_46 = (var_10 - 0x14);
0057f912          ebx &= 0xffffdfff;
0057f912          
0057f924          if ((InterlockedDecrement(((char*)esi_46 + 4)) == 0 && esi_46 != 0))
0057f92c              **(uint32_t**)esi_46(1);
0057f905      }
0057f905      
0057f935      class CaseInsensitiveStringBase<PStringBase<char> >* esi_47 = operator new(0x18);
0057f935      
0057f93c      if (esi_47 == 0)
0057f98e          esi_47 = nullptr;
0057f93c      else
0057f93c      {
0057f94c          __return = ClientCommunicationSystem::DoTurbineChat_Olthoi;
0057f954          PStringBase<char>::PStringBase<char>(&var_10, &data_7e10fc);
0057f95d          esi_47->m_charbuffer = var_10;
0057f967          ebx |= 0x4000;
0057f96d          InterlockedIncrement((var_10 - 0x10));
0057f96f          uint8_t (__thiscall* __return_7)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
0057f975          *(int32_t*)((char*)esi_47 + 0x10) = ClientCommunicationSystem::HelpTurbineChat_Olthoi;
0057f978          ebp = var_14;
0057f97c          *(int32_t*)((char*)esi_47 + 4) = 0;
0057f983          *(int32_t*)((char*)esi_47 + 8) = __return_7;
0057f986          *(int32_t*)((char*)esi_47 + 0xc) = 0;
0057f989          *(int32_t*)((char*)esi_47 + 0x14) = 0;
0057f93c      }
0057f93c      
0057f998      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp, &__return, esi_47);
0057f998      
0057f9a3      if (var_4 == 0)
0057f9a8          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp, esi_47);
0057f9a8      
0057f9b0      if ((*(uint8_t*)((char*)ebx)[1] & 0x40) != 0)
0057f9b0      {
0057f9b6          void* esi_49 = (var_10 - 0x14);
0057f9b6          
0057f9c9          if ((InterlockedDecrement(((char*)esi_49 + 4)) == 0 && esi_49 != 0))
0057f9d1              **(uint32_t**)esi_49(1);
0057f9b0      }
0057f9b0      
0057f9d6      int32_t eax_70;
0057f9d6      eax_70 = 1;
0057f9dc      return 1;
0057efb0  }

0057f9dd                                                                                         90 90 90                               ...

0057f9e0  uint8_t __fastcall ClientCommunicationSystem::DoHelp(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

0057f9e0  {
0057f9e8      char const* const m_idCurrentCommandSource = "\nNote: You may substitute a for…";
0057f9f1      char* var_14;
0057f9f1      PStringBase<char>::PStringBase<char>(&var_14, m_idCurrentCommandSource);
0057f9fc      void* esi_4;
0057f9fc      
0057f9fc      if (arg2 > 0)
0057f9fc      {
0057fca5          m_idCurrentCommandSource = "For more information, type @help…";
0057fcae          class PStringBase<char> var_10;
0057fcae          class PStringBase<char>* __return_1;
0057fcae          char*** ecx_36;
0057fcae          int32_t* edx_10;
0057fcae          __return_1 = PStringBase<char>::PStringBase<char>(&var_10, m_idCurrentCommandSource);
0057fcb7          m_idCurrentCommandSource = &arg3;
0057fcbc          int32_t* var_2c_8 = &arg2;
0057fcc1          int32_t var_18;
0057fcc1          int32_t* var_30_1 = &var_18;
0057fcc2          NextArg(__return_1, edx_10, ecx_36);
0057fcd1          PStringBase<char>::PStringBase<char>(&m_idCurrentCommandSource, &data_7e1174);
0057fcde          PStringBase<char>::trim(&var_18, 1, 0, m_idCurrentCommandSource);
0057fce3          int32_t eax_31 = var_18;
0057fcec          m_idCurrentCommandSource = (eax_31 - 0x10);
0057fced          arg2 = eax_31;
0057fcf1          InterlockedIncrement(m_idCurrentCommandSource);
0057fcfb          m_idCurrentCommandSource = &arg2;
0057fd04          void __return;
0057fd04          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_hashCommands.vtable, &__return, m_idCurrentCommandSource);
0057fd15          m_idCurrentCommandSource = (eax_31 - 0x10);
0057fd15          
0057fd1e          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && eax_31 != 0x14))
0057fd1e          {
0057fd20              int32_t eax_34 = *(uint32_t*)(eax_31 - 0x14);
0057fd22              m_idCurrentCommandSource = 1;
0057fd26              *(uint32_t*)eax_34(m_idCurrentCommandSource);
0057fd1e          }
0057fd1e          
0057fd2e          void* var_4;
0057fd2e          
0057fd2e          if (var_4 != 0)
0057fd2e          {
0057fd34              int32_t eax_35 = *(uint32_t*)((char*)var_4 + 0x10);
0057fd34              
0057fd39              if (eax_35 != 0)
0057fd39              {
0057fd3f                  *(uint32_t*)((char*)var_4 + 0x14);
0057fd46                  m_idCurrentCommandSource = &var_10;
0057fd46                  
0057fd54                  if (eax_35(2, var_18, m_idCurrentCommandSource) != 0)
0057fd54                  {
0057fd8c                      m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057fd98                      ClientSystem::AddTextToScroll(this, &var_14, 0, 1, m_idCurrentCommandSource);
0057fda3                      m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057fdaf                      ClientSystem::AddTextToScroll(this, &var_10, 0, 1, m_idCurrentCommandSource);
0057fd54                  }
0057fd54                  else
0057fd54                  {
0057fd56                      m_idCurrentCommandSource = u"Unknown command";
0057fd5f                      PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, m_idCurrentCommandSource);
0057fd6a                      m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057fd76                      ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, m_idCurrentCommandSource);
0057fd7f                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0057fd54                  }
0057fd54                  
0057fdb8                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
0057fdc1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
0057fdca                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14);
0057fdcf                  int32_t eax_38;
0057fdcf                  eax_38 = 1;
0057fdd7                  return 1;
0057fd39              }
0057fd2e          }
0057fd2e          
0057fdda          m_idCurrentCommandSource = u"Unknown command";
0057fde3          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, m_idCurrentCommandSource);
0057fdee          m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057fdfa          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, m_idCurrentCommandSource);
0057fe03          int32_t* esi_6 = (arg2 - 0x14);
0057fe09          m_idCurrentCommandSource = &esi_6[1];
0057fe09          
0057fe12          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_6 != 0))
0057fe12          {
0057fe14              int32_t eax_41 = *(uint32_t*)esi_6;
0057fe16              m_idCurrentCommandSource = 1;
0057fe1a              *(uint32_t*)eax_41(m_idCurrentCommandSource);
0057fe12          }
0057fe12          
0057fe20          int32_t* esi_8 = (var_18 - 0x14);
0057fe26          m_idCurrentCommandSource = &esi_8[1];
0057fe26          
0057fe2f          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_8 != 0))
0057fe2f          {
0057fe31              int32_t edx_15 = *(uint32_t*)esi_8;
0057fe33              m_idCurrentCommandSource = 1;
0057fe37              *(uint32_t*)edx_15(m_idCurrentCommandSource);
0057fe2f          }
0057fe2f          
0057fe3d          int32_t* esi_10 = (var_10 - 0x14);
0057fe43          m_idCurrentCommandSource = &esi_10[1];
0057fe43          
0057fe4c          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_10 != 0))
0057fe4c          {
0057fe4e              int32_t edx_16 = *(uint32_t*)esi_10;
0057fe50              m_idCurrentCommandSource = 1;
0057fe54              *(uint32_t*)edx_16(m_idCurrentCommandSource);
0057fe4c          }
0057fe4c          
0057fe5a          esi_4 = &var_14[0xffffffec];
0057fe60          m_idCurrentCommandSource = ((char*)esi_4 + 4);
0057f9fc      }
0057f9fc      else
0057f9fc      {
0057fa02          m_idCurrentCommandSource = "Available help:\n";
0057fa0b          PStringBase<char>::PStringBase<char>(&arg2, m_idCurrentCommandSource);
0057fa10          m_idCurrentCommandSource = "@help allegiances - Commands to …";
0057fa19          PStringBase<char>::PStringBase<char>(&arg3, m_idCurrentCommandSource);
0057fa1e          char** edi = arg3;
0057fa22          int32_t eax_1 = edi[-1];
0057fa22          
0057fa28          if (eax_1 != 1)
0057fa28          {
0057fa2b              m_idCurrentCommandSource = (eax_1 - 1);
0057fa31              PStringBase<char>::append_n_chars(&arg2, edi, m_idCurrentCommandSource);
0057fa36              edi = arg3;
0057fa28          }
0057fa28          
0057fa46          m_idCurrentCommandSource = &edi[-4];
0057fa46          
0057fa4f          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && edi != 0x14))
0057fa4f          {
0057fa51              int32_t edx_1 = edi[-5];
0057fa53              m_idCurrentCommandSource = 1;
0057fa57              *(uint32_t*)edx_1(m_idCurrentCommandSource);
0057fa4f          }
0057fa4f          
0057fa59          m_idCurrentCommandSource = "@help channels - How to communic…";
0057fa62          PStringBase<char>::PStringBase<char>(&arg3, m_idCurrentCommandSource);
0057fa67          char** edi_2 = arg3;
0057fa6b          int32_t eax_5 = edi_2[-1];
0057fa6b          
0057fa71          if (eax_5 != 1)
0057fa71          {
0057fa74              m_idCurrentCommandSource = (eax_5 - 1);
0057fa7a              PStringBase<char>::append_n_chars(&arg2, edi_2, m_idCurrentCommandSource);
0057fa7f              edi_2 = arg3;
0057fa71          }
0057fa71          
0057fa89          m_idCurrentCommandSource = &edi_2[-4];
0057fa89          
0057fa92          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && edi_2 != 0x14))
0057fa92          {
0057fa94              int32_t edx_2 = edi_2[-5];
0057fa96              m_idCurrentCommandSource = 1;
0057fa9a              *(uint32_t*)edx_2(m_idCurrentCommandSource);
0057fa92          }
0057fa92          
0057fa9c          m_idCurrentCommandSource = "@help chatting - How to chat pub…";
0057faa5          PStringBase<char>::PStringBase<char>(&arg3, m_idCurrentCommandSource);
0057faaa          char** edi_4 = arg3;
0057faae          int32_t eax_9 = edi_4[-1];
0057faae          
0057fab4          if (eax_9 != 1)
0057fab4          {
0057fab7              m_idCurrentCommandSource = (eax_9 - 1);
0057fabd              PStringBase<char>::append_n_chars(&arg2, edi_4, m_idCurrentCommandSource);
0057fac2              edi_4 = arg3;
0057fab4          }
0057fab4          
0057facc          m_idCurrentCommandSource = &edi_4[-4];
0057facc          
0057fad5          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && edi_4 != 0x14))
0057fad5          {
0057fad7              int32_t edx_3 = edi_4[-5];
0057fad9              m_idCurrentCommandSource = 1;
0057fadd              *(uint32_t*)edx_3(m_idCurrentCommandSource);
0057fad5          }
0057fad5          
0057fadf          m_idCurrentCommandSource = "@help death - Commands for makin…";
0057fae8          PStringBase<char>::PStringBase<char>(&arg3, m_idCurrentCommandSource);
0057faed          char** edi_6 = arg3;
0057faf1          int32_t eax_13 = edi_6[-1];
0057faf1          
0057faf7          if (eax_13 != 1)
0057faf7          {
0057fafa              m_idCurrentCommandSource = (eax_13 - 1);
0057fb00              PStringBase<char>::append_n_chars(&arg2, edi_6, m_idCurrentCommandSource);
0057fb05              edi_6 = arg3;
0057faf7          }
0057faf7          
0057fb0f          m_idCurrentCommandSource = &edi_6[-4];
0057fb0f          
0057fb18          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && edi_6 != 0x14))
0057fb18          {
0057fb1a              int32_t edx_4 = edi_6[-5];
0057fb1c              m_idCurrentCommandSource = 1;
0057fb20              *(uint32_t*)edx_4(m_idCurrentCommandSource);
0057fb18          }
0057fb18          
0057fb26          m_idCurrentCommandSource = &arg2;
0057fb30          ClientCommunicationSystem::HelpEmote(this, Summary_HelpType, "@emote", m_idCurrentCommandSource);
0057fb35          m_idCurrentCommandSource = "@help fillcomps - A command to h…";
0057fb3e          PStringBase<char>::PStringBase<char>(&arg3, m_idCurrentCommandSource);
0057fb43          char** edi_8 = arg3;
0057fb47          int32_t eax_17 = edi_8[-1];
0057fb47          
0057fb4d          if (eax_17 != 1)
0057fb4d          {
0057fb50              m_idCurrentCommandSource = (eax_17 - 1);
0057fb56              PStringBase<char>::append_n_chars(&arg2, edi_8, m_idCurrentCommandSource);
0057fb5b              edi_8 = arg3;
0057fb4d          }
0057fb4d          
0057fb65          m_idCurrentCommandSource = &edi_8[-4];
0057fb65          
0057fb6e          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && edi_8 != 0x14))
0057fb6e          {
0057fb70              int32_t edx_5 = edi_8[-5];
0057fb72              m_idCurrentCommandSource = 1;
0057fb76              *(uint32_t*)edx_5(m_idCurrentCommandSource);
0057fb6e          }
0057fb6e          
0057fb78          m_idCurrentCommandSource = "@help friends - Commands to help…";
0057fb81          PStringBase<char>::PStringBase<char>(&arg3, m_idCurrentCommandSource);
0057fb86          char** edi_10 = arg3;
0057fb8a          int32_t eax_20 = edi_10[-1];
0057fb8a          
0057fb90          if (eax_20 != 1)
0057fb90          {
0057fb93              m_idCurrentCommandSource = (eax_20 - 1);
0057fb99              PStringBase<char>::append_n_chars(&arg2, edi_10, m_idCurrentCommandSource);
0057fb9e              edi_10 = arg3;
0057fb90          }
0057fb90          
0057fba8          m_idCurrentCommandSource = &edi_10[-4];
0057fba8          
0057fbb1          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && edi_10 != 0x14))
0057fbb1          {
0057fbb3              int32_t edx_6 = edi_10[-5];
0057fbb5              m_idCurrentCommandSource = 1;
0057fbb9              *(uint32_t*)edx_6(m_idCurrentCommandSource);
0057fbb1          }
0057fbb1          
0057fbbb          m_idCurrentCommandSource = "@help house - Commands that help…";
0057fbc4          PStringBase<char>::PStringBase<char>(&arg3, m_idCurrentCommandSource);
0057fbc9          char** edi_12 = arg3;
0057fbcd          int32_t eax_24 = edi_12[-1];
0057fbcd          
0057fbd3          if (eax_24 != 1)
0057fbd3          {
0057fbd6              m_idCurrentCommandSource = (eax_24 - 1);
0057fbdc              PStringBase<char>::append_n_chars(&arg2, edi_12, m_idCurrentCommandSource);
0057fbe1              edi_12 = arg3;
0057fbd3          }
0057fbd3          
0057fbeb          m_idCurrentCommandSource = &edi_12[-4];
0057fbeb          
0057fbf4          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && edi_12 != 0x14))
0057fbf4          {
0057fbf6              int32_t edx_7 = edi_12[-5];
0057fbf8              m_idCurrentCommandSource = 1;
0057fbfc              *(uint32_t*)edx_7(m_idCurrentCommandSource);
0057fbf4          }
0057fbf4          
0057fc02          m_idCurrentCommandSource = &arg2;
0057fc0c          ClientCommunicationSystem::HelpSquelch(this, Summary_HelpType, "@squelching", m_idCurrentCommandSource);
0057fc15          m_idCurrentCommandSource = &arg2;
0057fc1f          ClientCommunicationSystem::HelpStatusGroup(this, Summary_HelpType, "@status", m_idCurrentCommandSource);
0057fc28          m_idCurrentCommandSource = &arg2;
0057fc32          ClientCommunicationSystem::HelpTextGroup(this, Summary_HelpType, "@text", m_idCurrentCommandSource);
0057fc3b          m_idCurrentCommandSource = &arg2;
0057fc45          ClientCommunicationSystem::HelpAllGroup(this, Summary_HelpType, "@commands", m_idCurrentCommandSource);
0057fc50          char* edx_8 = var_14;
0057fc54          m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057fc5c          ClientSystem::AddTextToScroll(this, edx_8, 0, 1, m_idCurrentCommandSource);
0057fc67          char* ecx_31 = arg2;
0057fc6b          m_idCurrentCommandSource = this->m_idCurrentCommandSource;
0057fc73          ClientSystem::AddTextToScroll(this, ecx_31, 0, 1, m_idCurrentCommandSource);
0057fc7c          int32_t* esi_2 = (arg2 - 0x14);
0057fc82          m_idCurrentCommandSource = &esi_2[1];
0057fc82          
0057fc8b          if ((InterlockedDecrement(m_idCurrentCommandSource) == 0 && esi_2 != 0))
0057fc8b          {
0057fc8d              int32_t eax_30 = *(uint32_t*)esi_2;
0057fc8f              m_idCurrentCommandSource = 1;
0057fc93              *(uint32_t*)eax_30(m_idCurrentCommandSource);
0057fc8b          }
0057fc8b          
0057fc99          esi_4 = &var_14[0xffffffec];
0057fc9f          m_idCurrentCommandSource = ((char*)esi_4 + 4);
0057f9fc      }
0057f9fc      
0057fe69      if ((InterlockedDecrement() == 0 && esi_4 != 0))
0057fe69      {
0057fe6b          int32_t edx_17 = *(uint32_t*)esi_4;
0057fe6f          m_idCurrentCommandSource = 1;
0057fe71          *(uint32_t*)edx_17(m_idCurrentCommandSource);
0057fe69      }
0057fe69      
0057fe75      int32_t eax_46;
0057fe75      eax_46 = 1;
0057fe7b      return 1;
0057f9e0  }

0057fe7e                                                                                            90 90                                ..

0057fe80  uint32_t __stdcall ClientCommunicationSystem::Handle_Communication__PopUpString(class ClientCommunicationSystem* this @ ecx, class AC1Legacy::PStringBase<char> const* arg2)

0057fe80  {
0057fe8f      void var_90;
0057fe8f      StringInfo::StringInfo(&var_90);
0057feb7      class PStringBase<unsigned short> var_10c;
0057feb7      StringInfo::SetLiteralValue(&var_90, PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10c, WidthConvert, &arg2->m_buffer->m_data), 1);
0057fec0      int32_t* esi_1 = (var_10c - 0x14);
0057fec0      
0057fed3      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0057fedb          **(uint32_t**)esi_1(1);
0057fedb      
0057fee1      void var_108;
0057fee1      PropertyCollection::PropertyCollection(&var_108);
0057feef      int32_t* var_114 = nullptr;
0057fef3      int32_t* var_110 = nullptr;
0057fef7      BaseProperty::SetPropertyName(&var_114, 0x8e);
0057fef7      
0057ff00      if (var_110 != 0)
0057ff00      {
0057ff06          BaseProperty::CheckCopyOnWrite(&var_114);
0057ff13          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(3);
0057ff00      }
0057ff00      
0057ff22      var_10c = BaseProperty::GetPropertyName(&var_114);
0057ff34      void var_104;
0057ff34      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0057ff42      BaseProperty::SetPropertyName(&var_114, 0xc3);
0057ff42      
0057ff4b      if (var_110 != 0)
0057ff4b      {
0057ff51          BaseProperty::CheckCopyOnWrite(&var_114);
0057ff5e          *(uint32_t*)(*(uint32_t*)var_110 + 0xac)(1);
0057ff4b      }
0057ff4b      
0057ff6d      var_10c = BaseProperty::GetPropertyName(&var_114);
0057ff7f      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0057ff8d      BaseProperty::SetPropertyName(&var_114, 0xc5);
0057ff8d      
0057ff96      if (var_110 != 0)
0057ff96      {
0057ff9c          BaseProperty::CheckCopyOnWrite(&var_114);
0057ffaf          *(uint32_t*)(*(uint32_t*)var_110 + 0xc4)(&var_90);
0057ff96      }
0057ff96      
0057ffcc      var_10c = BaseProperty::GetPropertyName(&var_114);
0057ffd0      HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_10c, &var_114);
0057ffda      DialogFactory::MakeDialogInCurrentUI(&var_108);
0057ffdf      int32_t* eax_7 = var_114;
0057ffdf      
0057ffe8      if (eax_7 != 0)
0057ffe8      {
0057fff2          int32_t esi_3 = (eax_7[1] - 1);
0057ffef          eax_7[1] = esi_3;
0057ffef          
0057fff9          if (esi_3 == 0)
0057ffff              **(uint32_t**)eax_7(1);
0057ffff          
00580001          var_114 = nullptr;
0057ffe8      }
0057ffe8      
0058000b      if (var_110 != 0)
0058000b      {
00580015          int32_t esi_5 = (var_110[1] - 1);
00580012          var_110[1] = esi_5;
00580012          
0058001c          if (esi_5 == 0)
00580022              **(uint32_t**)var_110(1);
00580022          
00580024          int32_t var_110_1 = 0;
0058000b      }
0058000b      
0058002c      PropertyCollection::~PropertyCollection(&var_108);
00580038      StringInfo::~StringInfo(&var_90);
00580047      return 0;
0057fe80  }

0058004a                                90 90 90 90 90 90                                                            ......

00580050  uint8_t __thiscall ClientCommunicationSystem::DoDie(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00580050  {
00580062      class PStringBase<unsigned short> var_114;
00580062      
00580062      if (arg2 == 0)
00580062      {
005800c6          void var_90;
005800c6          StringInfo::StringInfo(&var_90);
005800d4          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_114, u"Do you really want to kill your …");
005800e7          StringInfo::SetLiteralValue(&var_90, &var_114, 1);
005800f0          int32_t* esi_4 = (var_114 - 0x14);
005800f0          
00580103          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0058010b              **(uint32_t**)esi_4(1);
0058010b          
00580111          void var_108;
00580111          PropertyCollection::PropertyCollection(&var_108);
0058011f          int32_t* var_110 = nullptr;
00580123          int32_t* var_10c_1 = nullptr;
00580127          BaseProperty::SetPropertyName(&var_110, 0x8e);
00580127          
00580130          if (var_10c_1 != 0)
00580130          {
00580136              BaseProperty::CheckCopyOnWrite(&var_110);
00580143              *(uint32_t*)(*(uint32_t*)var_10c_1 + 0xac)(1);
00580130          }
00580130          
00580152          var_114 = BaseProperty::GetPropertyName(&var_110);
00580164          void var_104;
00580164          HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_114, &var_110);
00580172          BaseProperty::SetPropertyName(&var_110, 0xc5);
00580172          
0058017b          if (var_10c_1 != 0)
0058017b          {
00580181              BaseProperty::CheckCopyOnWrite(&var_110);
00580194              *(uint32_t*)(*(uint32_t*)var_10c_1 + 0xc4)(&var_90);
0058017b          }
0058017b          
005801b1          var_114 = BaseProperty::GetPropertyName(&var_110);
005801b5          class PropertyCollection* eax_8;
005801b5          void (* edx_4)(class PropertyCollection const*);
005801b5          eax_8 = HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_114, &var_110);
005801be          void (* var_120_6)(class PropertyCollection const* arg1) = ClientCommunicationSystem::DieDialogCallback;
005801c3          void* var_124_4 = &var_108;
005801c4          DialogFactory::MakeCallbackDialogInCurrentUI(eax_8, edx_4);
005801c9          int32_t* eax_9 = var_110;
005801c9          
005801d2          if (eax_9 != 0)
005801d2          {
005801dc              int32_t esi_6 = (eax_9[1] - 1);
005801d9              eax_9[1] = esi_6;
005801d9              
005801e3              if (esi_6 == 0)
005801e9                  **(uint32_t**)eax_9(1);
005801e9              
005801eb              var_110 = nullptr;
005801d2          }
005801d2          
005801f5          if (var_10c_1 != 0)
005801f5          {
005801ff              int32_t esi_8 = (var_10c_1[1] - 1);
005801fc              var_10c_1[1] = esi_8;
005801fc              
00580206              if (esi_8 == 0)
0058020c                  **(uint32_t**)var_10c_1(1);
0058020c              
0058020e              int32_t var_10c_2 = 0;
005801f5          }
005801f5          
00580216          PropertyCollection::~PropertyCollection(&var_108);
00580222          StringInfo::~StringInfo(&var_90);
00580062      }
00580062      else
00580062      {
0058006d          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_114, u"Please see @help die for more in…");
00580084          ClientSystem::AddTextToScroll(this, &var_114, 0x1a, 1, this->m_idCurrentCommandSource);
0058008d          int32_t* esi_2 = (var_114 - 0x14);
0058008d          
005800a4          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005800a4          {
005800b0              **(uint32_t**)esi_2(1);
005800b3              int32_t eax_3;
005800b3              eax_3 = 1;
005800bc              return 1;
005800a4          }
00580062      }
00580228      int32_t eax_1;
00580228      eax_1 = 1;
00580231      return 1;
00580050  }

00580234                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00580240  void ClientCommunicationSystem::HouseAbandonDialogCallback_First(class PropertyCollection const* arg1)

00580240  {
00580254      uint32_t temp1 = (COMBINE(0, 0x92) % arg1->m_hashProperties.m_intrusiveTable.m_numBuckets);
00580257      class HashTableData<unsigned long,BaseProperty>** m_buckets = arg1->m_hashProperties.m_intrusiveTable.m_buckets;
0058025d      char var_11d = 0;
00580261      int32_t* var_110 = nullptr;
00580265      int32_t* var_10c = nullptr;
0058026c      int32_t* eax_2 = m_buckets[temp1];
0058026c      
00580270      if (eax_2 != 0)
00580270      {
0058027c          while (*(uint32_t*)eax_2 != 0x92)
0058027c          {
0058027e              eax_2 = eax_2[1];
0058027e              
00580283              if (eax_2 == 0)
0058028c                  return;
0058027c          }
0058027c          
0058028f          if (eax_2 != 0)
0058028f          {
0058029d              BaseProperty::operator=(&var_110, &eax_2[2]);
005802a2              int32_t* ecx_2 = var_10c;
005802a2              
005802a8              if (ecx_2 != 0)
005802a8              {
005802b1                  *(uint32_t*)(*(uint32_t*)ecx_2 + 0x70)(&var_11d);
005802b4                  ecx_2 = var_10c;
005802a8              }
005802a8              
005802bd              if (var_11d != 0)
005802bd              {
005802ca                  void var_90;
005802ca                  StringInfo::StringInfo(&var_90);
005802d8                  uint32_t var_114;
005802d8                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_114, u"Are you absolutely certain you w…");
005802eb                  StringInfo::SetLiteralValue(&var_90, &var_114, 1);
005802f4                  int32_t* esi_2 = (var_114 - 0x14);
005802f4                  
00580307                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0058030f                      **(uint32_t**)esi_2(1);
0058030f                  
00580315                  void var_108;
00580315                  PropertyCollection::PropertyCollection(&var_108);
00580323                  int32_t* var_11c = nullptr;
00580327                  int32_t* var_118_1 = nullptr;
0058032b                  BaseProperty::SetPropertyName(&var_11c, 0x8e);
0058032b                  
00580334                  if (var_118_1 != 0)
00580334                  {
0058033a                      BaseProperty::CheckCopyOnWrite(&var_11c);
00580347                      *(uint32_t*)(*(uint32_t*)var_118_1 + 0xac)(1);
00580334                  }
00580334                  
00580356                  var_114 = BaseProperty::GetPropertyName(&var_11c);
00580368                  void var_104;
00580368                  HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_114, &var_11c);
00580376                  BaseProperty::SetPropertyName(&var_11c, 0xc5);
00580376                  
0058037f                  if (var_118_1 != 0)
0058037f                  {
00580385                      BaseProperty::CheckCopyOnWrite(&var_11c);
00580398                      *(uint32_t*)(*(uint32_t*)var_118_1 + 0xc4)(&var_90);
0058037f                  }
0058037f                  
005803b5                  var_114 = BaseProperty::GetPropertyName(&var_11c);
005803b9                  class PropertyCollection* eax_8;
005803b9                  void (* edx_6)(class PropertyCollection const*);
005803b9                  eax_8 = HashTable<unsigned long,BaseProperty,1>::add(&var_104, &var_114, &var_11c);
005803c2                  void (* var_12c_5)(class PropertyCollection const* arg1) = ClientCommunicationSystem::HouseAbandonDialogCallback_Second;
005803c7                  void* var_130_4 = &var_108;
005803c8                  DialogFactory::MakeCallbackDialogInCurrentUI(eax_8, edx_6);
005803cd                  int32_t* eax_9 = var_11c;
005803cd                  
005803d6                  if (eax_9 != 0)
005803d6                  {
005803e0                      int32_t esi_4 = (eax_9[1] - 1);
005803dd                      eax_9[1] = esi_4;
005803dd                      
005803e7                      if (esi_4 == 0)
005803ed                          **(uint32_t**)eax_9(1);
005803ed                      
005803ef                      var_11c = nullptr;
005803d6                  }
005803d6                  
005803f9                  if (var_118_1 != 0)
005803f9                  {
00580403                      int32_t esi_6 = (var_118_1[1] - 1);
00580400                      var_118_1[1] = esi_6;
00580400                      
0058040a                      if (esi_6 == 0)
00580410                          **(uint32_t**)var_118_1(1);
00580410                      
00580412                      int32_t var_118_2 = 0;
005803f9                  }
005803f9                  
0058041a                  PropertyCollection::~PropertyCollection(&var_108);
00580426                  StringInfo::~StringInfo(&var_90);
0058042b                  ecx_2 = var_10c;
005802bd              }
005802bd              
0058042f              int32_t* eax_14 = var_110;
0058042f              
00580435              if (eax_14 != 0)
00580435              {
0058043f                  int32_t esi_8 = (eax_14[1] - 1);
0058043c                  eax_14[1] = esi_8;
0058043c                  
00580446                  if (esi_8 == 0)
0058044c                      **(uint32_t**)eax_14(1);
0058044c                  
0058044e                  ecx_2 = var_10c;
00580452                  var_110 = nullptr;
00580435              }
00580435              
00580458              if (ecx_2 != 0)
00580458              {
00580460                  int32_t esi_10 = (ecx_2[1] - 1);
0058045d                  ecx_2[1] = esi_10;
0058045d                  
00580467                  if (esi_10 == 0)
0058046d                      **(uint32_t**)ecx_2(1);
00580458              }
0058028f          }
00580270      }
00580240  }

00580478                                                                          90 90 90 90 90 90 90 90                          ........

00580480  uint8_t __thiscall ClientCommunicationSystem::Pose(class ClientCommunicationSystem* this, class PStringBase<char> const* arg2)

00580480  {
00580487      int32_t __saved_ebp = 0x11;
00580489      int32_t __saved_esi = 2;
0058048b      int32_t __saved_edi = 7;
00580491      char var_131 = 0;
00580496      int32_t eax;
00580496      int32_t edx;
00580496      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
00580496      
005804a2      if (eax_1 == 0)
005804a2      {
005804a4          eax_1 = 0;
005804ad          return 0;
005804a2      }
005804a2      
005804b0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005804bd      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005804c6      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005804c8      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005804cd      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005804d5      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005804d7      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005804dc      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005804e4      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
005804f4      class AC1Legacy::PStringBase<char> var_130;
005804f4      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_130, arg2->m_charbuffer);
0058050f      int32_t eax_6 = ChatPoseTable::InqChatPoseCommand(eax_1, &var_130, &AC1Legacy::PStringBase<char>::s_NullBuffer_6, &AC1Legacy::PStringBase<char>::s_NullBuffer_5, &AC1Legacy::PStringBase<char>::s_NullBuffer_4);
00580514      class AC1Legacy::PStringBase<char> esi = var_130;
00580514      
0058052c      if ((InterlockedDecrement((esi + 4)) == 0 && esi != 0))
00580534          **(uint32_t**)esi(1);
00580534      
0058053a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9;
0058053a      
0058053a      if (eax_6 == 0)
005806d3          AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
0058053a      else
0058053a      {
00580540          int32_t var_c_1 = 0;
00580547          int32_t var_8_1 = 0;
00580556          uint32_t eax_11 = string2command(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data);
00580560          uint32_t var_4_1 = eax_11;
00580560          
00580567          if (eax_11 != 0)
00580567          {
00580570              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00580576              void var_10c;
00580576              *(uint32_t*)(&var_10c + var_c_1) = 1;
0058057e              int32_t var_c_2 = (var_c_1 + 4);
00580586              SmartBox::smartbox_1->cmdinterp->vtable->HandleKeyboardCommand(&var_10c);
00580599              var_131 = 1;
00580567          }
00580567          
005805ac          int32_t* var_124;
005805ac          
005805ac          if (AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_len != 1)
005805ac          {
005805bc              var_130 = 1;
005805cd              int32_t* __return;
005805cd              InterfacePtr<PlayerDesc>::InterfacePtr<PlayerDesc>(&var_124, GetClassObject(&__return, &PlayerDesc_ClassType));
005805d2              int32_t* __return_1 = __return;
005805d2              
005805d8              if (__return_1 != 0)
005805dc                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
005805dc              
005805df              int32_t* edi_1 = var_124;
005805ed              int32_t var_120;
005805ed              
005805ed              if ((edi_1 != 0 && var_120 >= 0))
005805fd                  CBaseQualities::InqInt(&edi_1[0xe], 0x71, &var_130, 0, 0);
005805fd              
00580607              void* const eax_16 = &data_7e1434;
00580607              
0058060c              if (var_130 != 1)
0058060e                  eax_16 = &data_7e1430;
0058060e              
00580618              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_124, eax_16);
00580626              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &data_7e142c);
00580639              AC1Legacy::PStringBase<char>::replace(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, &__return, &var_124);
0058063e              int32_t* __return_2 = __return;
0058063e              
0058064e              if ((InterlockedDecrement(&__return_2[1]) == 0 && __return_2 != 0))
00580656                  **(uint32_t**)__return_2(1);
00580656              
00580658              int32_t* esi_1 = var_124;
00580658              
00580668              if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00580670                  **(uint32_t**)esi_1(1);
00580670              
00580677              CM_Communication::Event_SoulEmote(&AC1Legacy::PStringBase<char>::s_NullBuffer_4);
00580677              
00580681              if (edi_1 != 0)
00580687                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x14)();
005805ac          }
005805ac          
0058068a          AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
0058068a          
00580692          if (AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_len != 1)
00580692          {
0058069d              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_124, &data_7e1428);
005806b2              ClientCommunicationSystem::Handle_Communication__HearSoulEmote(this, 0, &var_124, &AC1Legacy::PStringBase<char>::s_NullBuffer_5);
005806b7              int32_t* esi_2 = var_124;
005806b7              
005806c7              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005806cf                  **(uint32_t**)esi_2(1);
00580692          }
0058053a      }
0058053a      
005806d7      eax_1->vtable->Release();
005806de      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
005806de      
005806ee      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_7 != 0))
005806f0          AC1Legacy::PStringBase<char>::s_NullBuffer_7->vtable->__vecDelDtor(1);
005806f0      
00580704      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_9 != 0))
00580706          AC1Legacy::PStringBase<char>::s_NullBuffer_9->vtable->__vecDelDtor(1);
00580706      
0058070e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
0058070e      
0058071e      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_8 != 0))
00580720          AC1Legacy::PStringBase<char>::s_NullBuffer_8->vtable->__vecDelDtor(1);
00580720      
00580728      int32_t eax_27;
00580728      eax_27 = var_131;
00580736      return eax_27;
00580480  }

00580739                                                                             90 90 90 90 90 90 90                           .......

00580740  void __stdcall ClientCommunicationSystem::MakeLoadFileVariableSubstitutions(class ClientCommunicationSystem* this @ ecx, class PStringBase<char>* arg2)

00580740  {
00580752      class PStringBase<char> var_40c;
00580752      PStringBase<char>::PStringBase<char>(&var_40c, &data_7928af);
00580760      class PStringBase<char> var_408;
00580760      PStringBase<char>::PStringBase<char>(&var_408, &data_794508);
00580778      PStringBase<char>::replace(arg2, &var_408, &var_40c);
00580787      int32_t* esi_1 = (var_408 - 0x14);
00580787      
00580796      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0058079e          **(uint32_t**)esi_1(1);
0058079e      
005807a4      int32_t* esi_3 = (var_40c - 0x14);
005807a4      
005807b3      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
005807bb          **(uint32_t**)esi_3(1);
005807bb      
005807c2      int32_t var_404 = Timer::get_real_time();
005807e1      void var_400;
005807e1      strftime(&var_400, 0x400, "%Y-%m-%d-%a", localtime(&var_404));
005807f3      PStringBase<char>::PStringBase<char>(&var_408, &var_400);
00580801      PStringBase<char>::PStringBase<char>(&var_40c, "%DATE%");
00580812      PStringBase<char>::replace(arg2, &var_40c, &var_408);
0058081b      int32_t* esi_5 = (var_40c - 0x14);
0058081b      
0058082a      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00580832          **(uint32_t**)esi_5(1);
00580832      
00580838      int32_t* esi_7 = (var_408 - 0x14);
00580838      
00580847      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
0058084f          **(uint32_t**)esi_7(1);
00580740  }

0058085d                                                                                         90 90 90                               ...

00580860  uint8_t __fastcall ClientCommunicationSystem::DoHouse(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00580860  {
00580872      char*** __saved_ebp = &arg3;
0058087a      int32_t* var_130 = &arg2;
0058087f      class PStringBase<unsigned short> var_118;
0058087f      int32_t* var_134 = &var_118;
00580880      class ClientCommunicationSystem* this_1 = this;
00580884      class PStringBase<char>* __return;
00580884      int32_t* edx;
00580884      NextArg(__return, edx, this);
00580889      class PStringBase<unsigned short> esi = var_118;
00580889      
00580896      if (*(uint32_t*)(esi - 4) == 1)
00580896      {
005808a1          PStringBase<unsigned short>::PStringBase<unsigned short>(&this_1, u"Please see @help House for more …");
005808b8          ClientSystem::AddTextToScroll(this, &this_1, 0x1a, 1, this->m_idCurrentCommandSource);
005808c7          void* __offset(ClientCommunicationSystem, -0x14) edi_2 = ((char*)this_1 - 0x14);
005808c7          
005808d6          if ((InterlockedDecrement(((char*)edi_2 + 4)) == 0 && edi_2 != 0))
005808de              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_2) + -0x14)(1);
005808de          
005808ef          if ((InterlockedDecrement((esi - 0x10)) == 0 && esi != 0x14))
005808f7              **(uint32_t**)(esi - 0x14)(1);
005808f7          
005808fb          int32_t eax_4;
005808fb          eax_4 = 1;
00580904          return 1;
00580896      }
00580896      
00580911      void* const var_114;
00580911      PStringBase<char>::PStringBase<char>(&var_114, "open");
00580922      int32_t eax_6 = _stricmp(esi, var_114);
00580933      char ebx_1 = ((int8_t)-(eax_6));
00580937      void* eax_8 = ((char*)var_114 - 0x14);
0058093a      int32_t* var_11c = eax_8;
0058093a      
00580948      if (InterlockedDecrement(((char*)eax_8 + 4)) == 0)
00580948      {
0058094a          int32_t* ecx_6 = var_11c;
0058094a          
00580950          if (ecx_6 != 0)
00580956              **(uint32_t**)ecx_6(1);
00580948      }
00580948      
0058095a      int32_t var_130_3;
0058095a      
0058095a      if ((ebx_1 - ebx_1) == 0xff)
0058095a      {
00580999          PStringBase<char>::PStringBase<char>(&var_114, &ClientCommunicationSystem::`vftable'.RecvNotice_AlterAttribute_ConfirmationRequest);
005809a4          int32_t eax_15 = _stricmp(esi, var_114);
005809af          ebx_1 = ((int8_t)-(eax_15));
005809b3          int32_t* eax_17 = ((char*)var_114 - 0x14);
005809b6          var_11c = eax_17;
005809b6          
005809c4          if (InterlockedDecrement(&eax_17[1]) == 0)
005809c4          {
005809c6              int32_t* ecx_9 = var_11c;
005809c6              
005809cc              if (ecx_9 != 0)
005809d2                  **(uint32_t**)ecx_9(1);
005809c4          }
005809c4          
005809d6          if ((ebx_1 - ebx_1) == 0xff)
005809d6          {
005809e5              PStringBase<char>::PStringBase<char>(&var_114, "recall");
005809f0              int32_t eax_21 = _stricmp(esi, var_114);
005809fb              int32_t ebx_4 = -(eax_21);
005809fd              ebx_4 = (ebx_4 - ebx_4);
005809ff              void* eax_23 = ((char*)var_114 - 0x14);
00580a02              var_11c = eax_23;
00580a0a              ebx_4 += 1;
00580a0a              
00580a10              if (InterlockedDecrement(((char*)eax_23 + 4)) == 0)
00580a10              {
00580a12                  int32_t* ecx_11 = var_11c;
00580a12                  
00580a18                  if (ecx_11 != 0)
00580a1e                      **(uint32_t**)ecx_11(1);
00580a10              }
00580a10              
00580a22              if (ebx_4 == 0)
00580a22              {
00580a60                  PStringBase<char>::PStringBase<char>(&var_114, &data_7e15c4);
00580a6b                  int32_t eax_29 = _stricmp(esi, var_114);
00580a76                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
00580a76                  
00580a7f                  if (eax_29 != 0)
00580a7f                  {
00580a8a                      PStringBase<char>::PStringBase<char>(&var_11c, "mansion_recall");
00580a95                      int32_t eax_30 = _stricmp(esi, var_11c);
00580a9c                      int32_t eax_32;
00580a9c                      
00580a9c                      if (eax_30 != 0)
00580a9c                      {
00580aa7                          PStringBase<char>::PStringBase<char>(&var_114, "alleg_recall");
00580ab2                          eax_32 = _stricmp(esi, var_114);
00580abd                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
00580a9c                      }
00580a9c                      
00580ac4                      if ((eax_30 == 0 || eax_32 == 0))
00580aca                          ebx_4 = 1;
00580ac4                      else
00580ac6                          ebx_4 = 0;
00580ac6                      
00580ad0                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580ad0                      
00580ad7                      if (ebx_4 != 0)
00580ad7                      {
00580af6                          ebx_4 = ClientCommunicationSystem::DoMansionRecall(this_1, arg2, arg3);
00580af8                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580b09                          return ebx_4;
00580ad7                      }
00580ad7                      
00580b15                      PStringBase<char>::PStringBase<char>(&var_114, &data_7e15a0);
00580b20                      int32_t eax_36 = _stricmp(esi, var_114);
00580b27                      int32_t eax_37;
00580b27                      
00580b27                      if (eax_36 != 0)
00580b27                      {
00580b32                          PStringBase<char>::PStringBase<char>(&var_11c, "alleg_recall");
00580b3d                          eax_37 = _stricmp(esi, var_11c);
00580b48                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580b27                      }
00580b27                      
00580b4f                      if ((eax_36 == 0 || eax_37 == 0))
00580b55                          ebx_4 = 1;
00580b4f                      else
00580b51                          ebx_4 = 0;
00580b51                      
00580b5b                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
00580b5b                      
00580b62                      if (ebx_4 != 0)
00580b62                      {
00580b81                          ebx_4 = ClientCommunicationSystem::DoMansionRecall(this_1, arg2, arg3);
00580b83                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580b94                          return ebx_4;
00580b62                      }
00580b62                      
00580ba0                      PStringBase<char>::PStringBase<char>(&var_11c, &ClientCommunicationSystem::`vftable'.RecvNotice_AbuseReportResponse);
00580bab                      int32_t eax_41 = _stricmp(esi, var_11c);
00580bb6                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580bbd                      int32_t ebx_5;
00580bbd                      
00580bbd                      if (eax_41 == 0)
00580bbd                      {
00580bbf                          char** edx_11 = arg3;
00580bd1                          char** var_130_18 = edx_11;
00580bdc                          ebx_5 = ClientCommunicationSystem::DoHouseStorage(this_1, edx_11, arg2);
00580bde                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580bef                          return ebx_5;
00580bbd                      }
00580bbd                      
00580bfb                      PStringBase<char>::PStringBase<char>(&var_114, "remove");
00580c06                      int32_t eax_45 = _stricmp(esi, var_114);
00580c0d                      int32_t eax_46;
00580c0d                      
00580c0d                      if (eax_45 != 0)
00580c0d                      {
00580c18                          PStringBase<char>::PStringBase<char>(&var_11c, "boot");
00580c23                          eax_46 = _stricmp(esi, var_11c);
00580c2e                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580c0d                      }
00580c0d                      
00580c35                      if ((eax_45 == 0 || eax_46 == 0))
00580c3b                          ebx_5 = 1;
00580c35                      else
00580c37                          ebx_5 = 0;
00580c37                      
00580c41                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
00580c41                      
00580c48                      if (ebx_5 != 0)
00580c48                      {
00580c67                          ebx_5 = ClientCommunicationSystem::DoHouseBoot(this_1, arg2, arg3);
00580c69                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580c7a                          return ebx_5;
00580c48                      }
00580c48                      
00580c86                      PStringBase<char>::PStringBase<char>(&var_114, "boot_all");
00580c91                      int32_t eax_50 = _stricmp(esi, var_114);
00580c98                      int32_t eax_52;
00580c98                      
00580c98                      if (eax_50 != 0)
00580c98                      {
00580ca3                          PStringBase<char>::PStringBase<char>(&var_11c, "remove_all");
00580cae                          eax_52 = _stricmp(esi, var_11c);
00580cb9                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580c98                      }
00580c98                      
00580cc0                      if ((eax_50 == 0 || eax_52 == 0))
00580cc6                          ebx_5 = 1;
00580cc0                      else
00580cc2                          ebx_5 = 0;
00580cc2                      
00580ccc                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_114);
00580ccc                      
00580cd3                      if (ebx_5 != 0)
00580cd3                      {
00580cde                          ebx_5 = CM_House::Event_BootEveryone_Event();
00580ce0                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580cf1                          return ebx_5;
00580cd3                      }
00580cd3                      
00580cfd                      PStringBase<char>::PStringBase<char>(&var_11c, &ClientCommunicationSystem::`vftable'.RecvNotice_Augmentation_ConfirmationRequest);
00580d08                      int32_t eax_55 = _stricmp(esi, var_11c);
00580d13                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580d13                      
00580d1a                      if (eax_55 == 0)
00580d1a                      {
00580d1c                          char** edx_14 = arg3;
00580d2e                          char** var_130_25 = edx_14;
00580d39                          int32_t ebx_6;
00580d39                          ebx_6 = ClientCommunicationSystem::DoHouseGuests(this_1, edx_14, arg2);
00580d3b                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580d4c                          return ebx_6;
00580d1a                      }
00580d1a                      
00580d58                      PStringBase<char>::PStringBase<char>(&var_11c, "abandon");
00580d63                      int32_t eax_59 = _stricmp(esi, var_11c);
00580d6e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580d6e                      
00580d75                      if (eax_59 != 0)
00580d75                      {
00580e54                          PStringBase<char>::PStringBase<char>(&var_11c, "available");
00580e5f                          int32_t eax_61 = _stricmp(esi, var_11c);
00580e6a                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580e6a                          
00580e71                          if (eax_61 == 0)
00580e71                          {
00580e73                              char** edx_16 = arg3;
00580e85                              char** var_130_32 = edx_16;
00580e90                              int32_t ebx_8;
00580e90                              ebx_8 = ClientCommunicationSystem::DoHouseAvailableList(this_1, edx_16, arg2);
00580e92                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580ea3                              return ebx_8;
00580e71                          }
00580e71                          
00580eaf                          PStringBase<char>::PStringBase<char>(&var_11c, "hooks");
00580eba                          int32_t eax_65 = _stricmp(esi, var_11c);
00580ec5                          class PStringBase<char>* __return_1;
00580ec5                          char*** ecx_79;
00580ec5                          int32_t* edx_17;
00580ec5                          __return_1 = PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580ec5                          
00580ecc                          if (eax_65 == 0)
00580ecc                          {
00580ed9                              char*** var_130_34 = &arg3;
00580ee1                              int32_t* var_134_27 = &arg2;
00580ee6                              int32_t** var_138_2 = &var_11c;
00580ef4                              PStringBase<unsigned short>::operator=(&var_118, NextArg(__return_1, edx_17, ecx_79));
00580efd                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580f0b                              PStringBase<char>::PStringBase<char>(&var_11c, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseProfile);
00580f14                              class PStringBase<unsigned short> esi_4 = var_118;
00580f1a                              int32_t eax_67 = _stricmp(esi_4, var_11c);
00580f25                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580f2c                              int32_t var_130_37;
00580f2c                              
00580f2c                              if (eax_67 == 0)
00580f2c                              {
00580f2e                                  var_130_37 = 1;
00580f67                              label_580f67:
00580f67                                  int32_t ebx_9;
00580f67                                  ebx_9 = CM_House::Event_SetHooksVisibility(var_130_37);
00580f69                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580f7a                                  return ebx_9;
00580f2c                              }
00580f2c                              
00580f3b                              PStringBase<char>::PStringBase<char>(&var_11c, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseData);
00580f46                              int32_t eax_69 = _stricmp(esi_4, var_11c);
00580f51                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580f51                              
00580f58                              if (eax_69 == 0)
00580f58                              {
00580f5a                                  var_130_37 = 0;
00580f5a                                  goto label_580f67;
00580f58                              }
00580ecc                          }
00580ecc                          
00580f86                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Please see @help House for more …");
00580f8b                          class ClientCommunicationSystem* this_2 = this_1;
00580f9f                          ClientSystem::AddTextToScroll(this_2, &var_11c, 0x1a, 1, this_2->m_idCurrentCommandSource);
00580fa8                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580d75                      }
00580d75                      else
00580d75                      {
00580d82                          void var_90;
00580d82                          StringInfo::StringInfo(&var_90);
00580d90                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_11c, u"Do you really want to abandon yo…");
00580da3                          StringInfo::SetLiteralValue(&var_90, &var_11c, 1);
00580dac                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_11c);
00580db5                          void var_108;
00580db5                          PropertyCollection::PropertyCollection(&var_108);
00580dc3                          var_114 = nullptr;
00580dc7                          int32_t var_110_1 = 0;
00580dcb                          BaseProperty::SetPropertyName(&var_114, 0x8e);
00580dd6                          BaseProperty::SetEnum(&var_114, 1);
00580de4                          PropertyCollection::AddProperty(&var_108, &var_114);
00580df2                          BaseProperty::SetPropertyName(&var_114, 0xc5);
00580e03                          BaseProperty::SetStringInfo(&var_114, &var_90);
00580e11                          class PropertyCollection* eax_60;
00580e11                          void (* edx_15)(class PropertyCollection const*);
00580e11                          eax_60 = PropertyCollection::AddProperty(&var_108, &var_114);
00580e1a                          void (* var_130_30)(class PropertyCollection const* arg1) = ClientCommunicationSystem::HouseAbandonDialogCallback_First;
00580e1f                          void* var_134_23 = &var_108;
00580e20                          DialogFactory::MakeCallbackDialogInCurrentUI(eax_60, edx_15);
00580e2c                          BaseProperty::~BaseProperty(&var_114);
00580e35                          PropertyCollection::~PropertyCollection(&var_108);
00580e41                          StringInfo::~StringInfo(&var_90);
00580d75                      }
00580d75                      
00580fb1                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580fb9                      int32_t eax_72;
00580fb9                      eax_72 = 1;
00580fc2                      return 1;
00580a7f                  }
00580a22              }
00580a22              
00580a41              ebx_4 = ClientCommunicationSystem::DoHouseRecall(this_1, arg2, arg3);
00580a43              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_118);
00580a54              return ebx_4;
005809d6          }
005809d6          
005809d8          var_130_3 = 0;
0058095a      }
0058095a      else
0058095c          var_130_3 = 1;
0058095c      
0058095e      char eax_11 = CM_House::Event_SetOpenHouseStatus_Event(var_130_3);
0058095e      
00580977      if ((InterlockedDecrement((esi - 0x10)) == 0 && esi != 0x14))
0058097f          **(uint32_t**)(esi - 0x14)(1);
0058097f      
00580984      int32_t eax_13;
00580984      eax_13 = eax_11;
0058098d      return eax_13;
00580860  }

00580fc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00580fd0  void __thiscall ClientCommunicationSystem::RemoveTextBetween(class ClientCommunicationSystem* this, class PStringBaseIter<char>* arg2, char arg3, char arg4)

00580fd0  {
00580fd0      class ClientCommunicationSystem* var_4 = this;
00580fd1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00580fd7      var_4 = PStringBase<char>::s_NullBuffer_1;
00580fe2      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00580fe2      
00580ffc      if (PStringBaseIter_Common<char>::FindChar(arg2, arg3, 0) != 0)
00580ffc      {
0058100a          uint32_t edi_2 = (arg2->curr + 1);
0058100a          
0058100f          if (edi_2 <= arg2->vtable->GetStrLen())
0058101c              arg2->curr = edi_2;
0058100f          else
00581017              arg2->curr = arg2->vtable->GetStrLen();
00581017          
00581023          uint32_t curr_1 = arg2->curr;
00581023          
00581032          if (PStringBaseIter_Common<char>::FindChar(arg2, arg4, 0) != 0)
00581032          {
00581040              if (curr_1 <= arg2->vtable->GetStrLen())
0058104d                  arg2->mark = curr_1;
00581040              else
00581048                  arg2->mark = arg2->vtable->GetStrLen();
00581048              
0058105e              if ((PStringBaseIter_Common<char>::GetSubString(arg2, &var_4) != 0 && ClientCommunicationSystem::Pose(this, &var_4) != 0))
0058105e              {
00581077                  PStringBaseIter_Common<unsigned short>::SetMark(arg2, (arg2->mark - 1));
00581083                  uint32_t edi_4 = (arg2->curr + 1);
00581083                  
00581088                  if (edi_4 <= arg2->vtable->GetStrLen())
00581095                      arg2->curr = edi_4;
00581088                  else
00581090                      arg2->curr = arg2->vtable->GetStrLen();
00581090                  
0058109f                  PStringBaseIter<char>::Replace(arg2, &PStringBase<char>::s_NullBuffer);
005810a4                  uint32_t curr = arg2->curr;
005810a4                  
005810aa                  if (curr >= 1)
005810b6                      arg2->curr = (curr - 1);
005810aa                  else
005810ac                      arg2->curr = 0;
0058105e              }
00581032          }
00580ffc      }
00580ffc      
005810be      void* __offset(ClientCommunicationSystem, -0x14) esi_2 = ((char*)var_4 - 0x14);
005810be      
005810d1      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005810d9          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00580fd0  }

005810e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005810f0  void __thiscall ClientCommunicationSystem::PublicChat(class ClientCommunicationSystem* this, class PStringBase<char>* arg2)

005810f0  {
005810f5      class PStringBase<char>* ebp = arg2;
00581104      int32_t var_10 = 0x79448c;
0058110c      class PStringBase<char>* var_4 = ebp;
00581110      int32_t var_c = 0;
00581114      int32_t var_8 = 0;
00581118      char eax;
00581118      int32_t ecx;
00581118      eax = PStringBaseIter_Const<char>::IndexToChar(this, 0);
00581118      
00581120      if (eax != 0)
00581120      {
005811ca          char i;
005811ca          
005811ca          do
005811ca          {
00581139              ClientCommunicationSystem::RemoveTextBetween(this, &var_10, 0x2a, 0x2a);
00581139              
0058114a              if (var_c > *(uint32_t*)var_10())
00581156                  var_c = *(uint32_t*)var_10();
00581156              
0058116c              if (var_8 <= *(uint32_t*)var_10())
0058117e                  int32_t var_8_2 = var_8;
0058116c              else
00581178                  int32_t var_8_1 = *(uint32_t*)var_10();
00581178              
0058118d              ClientCommunicationSystem::RemoveTextBetween(this, &var_10, 0x3c, 0x3e);
0058118d              
005811a2              if (var_c <= *(uint32_t*)var_10())
005811b4                  var_8 = var_c;
005811a2              else
005811ae                  var_8 = *(uint32_t*)var_10();
005811ae              
005811c5              i = *(uint32_t*)(var_10 + 8)(var_c);
005811ca          } while (i != 0);
00581120      }
00581120      
005811d0      int32_t var_24_2 = ecx;
005811d1      class PStringBase<char> m_charbuffer_1 = PStringBase<char>::whitespace_string.m_charbuffer;
005811e1      InterlockedIncrement((m_charbuffer_1 - 0x10));
005811ed      PStringBase<char>::trim(ebp, 1, 1, m_charbuffer_1);
005811f2      class PSRefBufferCharData<char>* m_charbuffer = ebp->m_charbuffer;
005811f2      
005811f9      if (m_charbuffer->m_data[-4] != 1)
005811f9      {
00581200          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, m_charbuffer);
0058120a          CM_Communication::Event_Talk(&arg2);
0058120f          class PStringBase<char>* esi_3 = arg2;
0058120f          
00581226          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
00581228              esi_3->m_charbuffer->m_data[0](1);
005811f9      }
005810f0  }

0058123a                                                                                90 90 90 90 90 90                            ......

00581240  uint8_t __thiscall ClientCommunicationSystem::DoSay(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00581240  {
00581253      JoinArgs(&arg3, arg2, arg3);
00581258      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::whitespace_string.m_charbuffer;
0058126b      InterlockedIncrement(((char*)m_charbuffer - 0x10));
00581279      PStringBase<char>::trim(&arg3, 1, 1, m_charbuffer);
00581286      int32_t eax_4;
00581286      void* esi_4;
00581286      
00581286      if (arg3[-1] != 1)
00581286      {
005812e6          ClientCommunicationSystem::PublicChat(this, &arg3);
005812ef          esi_4 = &arg3[-5];
005812f6          eax_4 = InterlockedDecrement(((char*)esi_4 + 4));
00581286      }
00581286      else
00581286      {
00581291          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, u"You must specify the text you wi…");
005812a8          ClientSystem::AddTextToScroll(this, &arg2, 0x1a, 1, this->m_idCurrentCommandSource);
005812b7          int32_t* esi_2 = (arg2 - 0x14);
005812b7          
005812c6          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005812ce              **(uint32_t**)esi_2(1);
005812ce          
005812d4          esi_4 = &arg3[-5];
005812db          eax_4 = InterlockedDecrement(((char*)esi_4 + 4));
00581286      }
00581286      
00581302      if ((eax_4 == 0 && esi_4 != 0))
0058130a          **(uint32_t**)esi_4(1);
0058130a      
0058130d      eax_4 = 1;
00581310      return 1;
00581240  }

00581313                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00581320  uint8_t __fastcall ClientCommunicationSystem::OnChatCommand(class ClientCommunicationSystem* this, class PStringBase<unsigned short> const* arg2, uint32_t arg3)

00581320  {
0058132e      bool cond:0 = APIManager::APIIsReady() == 0;
00581330      class PStringBase<unsigned short>* esi = arg2;
00581330      
00581334      if (!(cond:0))
00581334      {
00581339          BSTR eax_2 = SysAllocString(esi->m_charbuffer);
00581341          arg2 = nullptr;
00581349          struct IACPlugin* eax_3 = APIManager::GetACPlugin();
0058134e          eax_3->vtable->OnChatBarEnter(eax_3, eax_2, &arg2);
00581334      }
00581334      
00581360      class PStringBase<unsigned short>* eax_4;
00581360      
00581360      if ((cond:0 || arg2 == 0))
00581360      {
00581373          this->m_idCurrentCommandSource = arg3;
00581379          class PStringBase<char>* eax_6 = PStringBase<unsigned short>::to_spstring(esi, &arg2, 0);
00581380          class PSRefBufferCharData<char>* m_charbuffer = this->m_strLastCommandLine.m_charbuffer;
00581380          
0058138e          if (m_charbuffer != eax_6->m_charbuffer)
0058138e          {
005813a3              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005813ac                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005813ac              
005813ae              class PSRefBufferCharData<char>* m_charbuffer_3 = eax_6->m_charbuffer;
00581388              this->m_strLastCommandLine.m_charbuffer = m_charbuffer_3;
005813b6              InterlockedIncrement(&m_charbuffer_3[-1]);
0058138e          }
0058138e          
005813c6          void* __offset(PStringBase<unsigned short>, -0x14) ebx_5 = &arg2[-5];
005813cd          int32_t eax_9;
005813cd          int32_t ecx_4;
005813cd          eax_9 = InterlockedDecrement(((char*)ebx_5 + 4));
005813cd          
005813d5          if ((eax_9 == 0 && ebx_5 != 0))
005813dd              ecx_4 = *(uint32_t*)*(int32_t*)((char*)ADJ(ebx_5) + -0x14)(1);
005813dd          
005813df          int32_t var_20_6 = ecx_4;
005813e0          class PSRefBufferCharData<char>* m_charbuffer_2 = PStringBase<char>::whitespace_string.m_charbuffer;
005813f0          InterlockedIncrement(((char*)m_charbuffer_2 - 0x10));
005813fc          PStringBase<char>::trim(&this->m_strLastCommandLine, 1, 1, m_charbuffer_2);
00581401          class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_strLastCommandLine.m_charbuffer;
00581403          int32_t ecx_7 = m_charbuffer_1->m_data[-4];
00581403          
00581408          if (ecx_7 <= 0)
0058140a              m_charbuffer_1 = &m_charbuffer_1->m_data[(ecx_7 - 1)];
0058140a          
00581424          switch ((((int32_t)m_charbuffer_1->m_data[0]) - 0x2f))
00581424          {
00581431              case nullptr:
00581431              {
00581431                  PStringBase<char>::SetAtIndex(&this->m_strLastCommandLine, 0, 0x40);
00581444                  return ClientCommunicationSystem::DoCommand(this);
00581431                  break;
00581431              }
0058144d              case 0xb:
0058144d              case 0xc:
0058144d              {
0058144d                  PStringBase<char>::SetAtIndex(&this->m_strLastCommandLine, 0, 0x20);
00581470                  PStringBase<unsigned short>::operator=(&this->m_strLastCommandLine.m_charbuffer, PStringBase<char>::operator+(PStringBase<char>::PStringBase<char>(&arg3, "@emote"), &arg2, &this->m_strLastCommandLine));
00581479                  void* __offset(PStringBase<unsigned short>, -0x14) esi_3 = &arg2[-5];
00581479                  
00581488                  if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00581490                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00581490                  
00581496                  int32_t* esi_5 = (arg3 - 0x14);
00581496                  
005814a5                  if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
005814ad                      **(uint32_t**)esi_5(1);
005814ad                  
005814bd                  return ClientCommunicationSystem::DoCommand(this);
0058144d                  break;
0058144d              }
00581444              case 0x11:
00581444              {
00581444                  return ClientCommunicationSystem::DoCommand(this);
00581444                  break;
00581444              }
00581424          }
00581424          
005814c0          uint32_t m_idCurrentCommandSource = this->m_idCurrentCommandSource;
005814c0          
005814ce          if ((m_idCurrentCommandSource != 1 && m_idCurrentCommandSource != 8))
005814ce          {
005814e9          label_5814e9:
005814e9              ClientCommunicationSystem::PublicChat(this, &this->m_strLastCommandLine);
005814ee              int32_t eax_21;
005814ee              eax_21 = 1;
005814f7              return 1;
005814ce          }
005814ce          
005814df          switch ((gmCCommunicationSystem::GetTalkFocus() - 1))
005814df          {
005814df              case nullptr:
005814df              {
005814df                  goto label_5814e9;
005814df              }
005814fa              case 1:
005814fa              {
005814fa                  eax_4 = gmCCommunicationSystem::GetLastSpeakableTarget();
005814fa                  
00581503                  if (eax_4 != 0)
00581503                  {
00581510                      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, this->m_strLastCommandLine.m_charbuffer);
0058151b                      CM_Communication::Event_TalkDirect(&arg2, eax_4);
00581527                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
0058152c                      int32_t eax_23;
0058152c                      eax_23 = 1;
00581535                      return 1;
00581503                  }
005814fa                  break;
005814fa              }
0058153f              case 2:
0058153f              {
0058153f                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, this->m_strLastCommandLine.m_charbuffer);
0058154e                  CM_Communication::Event_ChannelBroadcast(0x800, &arg3);
0058155a                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
0058155f                  int32_t eax_24;
0058155f                  eax_24 = 1;
00581568                  return 1;
0058153f                  break;
0058153f              }
00581572              case 3:
00581572              {
00581572                  void var_c;
00581572                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_c, this->m_strLastCommandLine.m_charbuffer);
00581581                  CM_Communication::Event_ChannelBroadcast(0x2000, &var_c);
0058158d                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_c);
00581592                  int32_t eax_25;
00581592                  eax_25 = 1;
0058159b                  return 1;
00581572                  break;
00581572              }
005815a5              case 4:
005815a5              {
005815a5                  void var_8;
005815a5                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, this->m_strLastCommandLine.m_charbuffer);
005815b4                  CM_Communication::Event_ChannelBroadcast(0x4000, &var_8);
005815c0                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_8);
005815c5                  int32_t eax_27;
005815c5                  eax_27 = 1;
005815ce                  return 1;
005815a5                  break;
005815a5              }
005815d8              case 5:
005815d8              {
005815d8                  void var_4;
005815d8                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, this->m_strLastCommandLine.m_charbuffer);
005815e7                  CM_Communication::Event_ChannelBroadcast(0x1000, &var_4);
005815f3                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005815f8                  int32_t eax_28;
005815f8                  eax_28 = 1;
00581601                  return 1;
005815d8                  break;
005815d8              }
0058160b              case 6:
0058160b              {
0058169c                  ClientCommunicationSystem::SendTurbineChat(this, CInputManager::GetMouseX(gmCCommunicationSystem::GetChatRoomTracker()), Allegiance_ChatTypeEnum, &this->m_strLastCommandLine, PlayerModule::HearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
0058160b                  break;
0058160b              }
00581619              case 7:
00581619              {
0058169c                  ClientCommunicationSystem::SendTurbineChat(this, CInputManager::GetMouseY(gmCCommunicationSystem::GetChatRoomTracker()), Allegiance_ChatTypeEnum, &this->m_strLastCommandLine, PlayerModule::HearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
00581619                  break;
00581619              }
00581627              case 8:
00581627              {
0058169c                  ClientCommunicationSystem::SendTurbineChat(this, DiskConBase::GetSubset(gmCCommunicationSystem::GetChatRoomTracker()), Allegiance_ChatTypeEnum, &this->m_strLastCommandLine, PlayerModule::HearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
00581627                  break;
00581627              }
00581635              case 9:
00581635              {
0058169c                  ClientCommunicationSystem::SendTurbineChat(this, PhysicsDesc::get_autonomous_movement(gmCCommunicationSystem::GetChatRoomTracker()), Allegiance_ChatTypeEnum, &this->m_strLastCommandLine, PlayerModule::HearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
00581635                  break;
00581635              }
00581643              case 0xa:
00581643              {
0058169c                  ClientCommunicationSystem::SendTurbineChat(this, EffectInfoRegion::GetStat(gmCCommunicationSystem::GetChatRoomTracker()), Allegiance_ChatTypeEnum, &this->m_strLastCommandLine, PlayerModule::HearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
00581643                  break;
00581643              }
00581681              case 0xb:
00581681              {
0058169c                  ClientCommunicationSystem::SendTurbineChat(this, MMapUtil::GetMappingAddr(gmCCommunicationSystem::GetChatRoomTracker()), Allegiance_ChatTypeEnum, &this->m_strLastCommandLine, PlayerModule::HearAllegianceChat(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable));
00581681                  break;
00581681              }
00581669              case 0xc:
00581669              {
00581669                  ClientCommunicationSystem::SendTurbineChat(this, Attribute2ndInfoRegion::GetStat(gmCCommunicationSystem::GetChatRoomTracker()), Olthoi_ChatTypeEnum, &this->m_strLastCommandLine, ((int8_t)CPlayerSystem::IsOlthoi() != 0));
0058166e                  int32_t eax_38;
0058166e                  eax_38 = 1;
00581677                  return 1;
00581669                  break;
00581669              }
005814df          }
00581360      }
00581360      
005816a4      eax_4 = 1;
005816aa      return 1;
00581320  }

005816ad                                         8d 49 00                                                               .I.
005816b0  uint32_t jump_table_5816b0[0x4] = 
005816b0  {
005816b0      [0x0] =  0x0058142b
005816b4      [0x1] =  0x00581447
005816b8      [0x2] =  0x00581436
005816bc      [0x3] =  0x005814c0
005816c0  }
005816c0  uint8_t lookup_table_5816c0[0x12] = 
005816c0  {
005816c0      [0x00] =  0x00
005816c1      [0x01] =  0x03
005816c2      [0x02] =  0x03
005816c3      [0x03] =  0x03
005816c4      [0x04] =  0x03
005816c5      [0x05] =  0x03
005816c6      [0x06] =  0x03
005816c7      [0x07] =  0x03
005816c8      [0x08] =  0x03
005816c9      [0x09] =  0x03
005816ca      [0x0a] =  0x03
005816cb      [0x0b] =  0x01
005816cc      [0x0c] =  0x01
005816cd      [0x0d] =  0x03
005816ce      [0x0e] =  0x03
005816cf      [0x0f] =  0x03
005816d0      [0x10] =  0x03
005816d1      [0x11] =  0x02
005816d2  }

005816d2                                                        8b ff                                                        ..
005816d4  uint32_t jump_table_5816d4[0xd] = 
005816d4  {
005816d4      [0x0] =  0x005814e6
005816d8      [0x1] =  0x005814fa
005816dc      [0x2] =  0x00581538
005816e0      [0x3] =  0x0058156b
005816e4      [0x4] =  0x0058159e
005816e8      [0x5] =  0x005815d1
005816ec      [0x6] =  0x00581604
005816f0      [0x7] =  0x00581612
005816f4      [0x8] =  0x00581620
005816f8      [0x9] =  0x0058162e
005816fc      [0xa] =  0x0058163c
00581700      [0xb] =  0x0058167a
00581704      [0xc] =  0x0058164a
00581708  }

00581708                          90 90 90 90 90 90 90 90                                                          ........

00581710  uint8_t __thiscall ClientCommunicationSystem::LoadFile(class ClientCommunicationSystem* this, class PStringBase<char> const* arg2)

00581710  {
00581726      int32_t eax = fopen(arg2->m_charbuffer, &data_7e15d0);
00581726      
00581733      if (eax == 0)
00581733      {
00581736          eax = 0;
0058173f          return 0;
00581733      }
00581733      
00581742      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00581747      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00581750      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00581772      void var_400;
00581772      
00581772      if (fgets(&var_400, 0x400, eax) != 0)
00581772      {
0058182c          int32_t i;
0058182c          
0058182c          do
0058182c          {
00581789              PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_2, &var_400);
00581795              ClientCommunicationSystem::MakeLoadFileVariableSubstitutions(this, &PStringBase<char>::s_NullBuffer_2);
005817b8              void* __return;
005817b8              ClientSystem::AddTextToScroll(this, PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &__return, 0), 0, 1, this->m_idCurrentCommandSource);
005817c1              int32_t* edi_2 = ((char*)__return - 0x14);
005817c1              
005817d0              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
005817d8                  **(uint32_t**)edi_2(1);
005817d8              
005817e0              uint32_t m_idCurrentCommandSource = this->m_idCurrentCommandSource;
005817ec              class PStringBase<unsigned short> __return_1;
005817ec              uint32_t eax_8;
005817ec              class PStringBase<unsigned short>* edx_2;
005817ec              eax_8 = PStringBase<char>::to_wpstring(&PStringBase<char>::s_NullBuffer_2, &__return_1, 0);
005817f4              ClientCommunicationSystem::OnChatCommand(this, edx_2, eax_8);
005817fd              int32_t* edi_4 = (__return_1 - 0x14);
005817fd              
0058180c              if ((InterlockedDecrement(&edi_4[1]) == 0 && edi_4 != 0))
00581814                  **(uint32_t**)edi_4(1);
00581814              
00581821              i = fgets(&var_400, 0x400, eax);
0058182c          } while (i != 0);
00581772      }
00581772      
00581834      fclose(eax);
0058183e      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0058183e      
00581851      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00581859          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00581859      
0058185c      int32_t eax_11;
0058185c      eax_11 = 1;
00581865      return 1;
00581710  }

00581868                          90 90 90 90 90 90 90 90                                                          ........

00581870  uint8_t __thiscall ClientCommunicationSystem::DoLoadFile(class ClientCommunicationSystem* this, int32_t arg2, char** arg3)

00581870  {
00581884      JoinArgs(&arg3, arg2, arg3);
00581889      char** ebx = arg3;
00581896      void* var_10_3;
00581896      void* esi_3;
00581896      
00581896      if (ebx[-1] != 1)
00581896      {
005818fd          if (ClientCommunicationSystem::LoadFile(this, &arg3) == 0)
005818fd          {
005818ff              char** var_10_5 = ebx;
0058190c              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, Formatted, u"Cannot open file %hs");
00581926              ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
0058192f              void* esi_5 = &arg3[-5];
0058192f              
0058193e              if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
00581946                  **(uint32_t**)esi_5(1);
005818fd          }
005818fd          
00581948          esi_3 = &ebx[-5];
0058194e          var_10_3 = ((char*)esi_3 + 4);
00581896      }
00581896      else
00581896      {
005818a1          PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"You must provide a file name.");
005818b8          ClientSystem::AddTextToScroll(this, &arg3, 0x1a, 1, this->m_idCurrentCommandSource);
005818c7          void* esi_2 = &arg3[-5];
005818c7          
005818d6          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005818de              **(uint32_t**)esi_2(1);
005818de          
005818e0          esi_3 = &ebx[-5];
005818e6          var_10_3 = ((char*)esi_3 + 4);
00581896      }
00581896      
00581957      if ((InterlockedDecrement(var_10_3) == 0 && esi_3 != 0))
0058195f          **(uint32_t**)esi_3(1);
0058195f      
00581963      int32_t eax_7;
00581963      eax_7 = 1;
00581966      return 1;
00581870  }

00581969                             90 90 90 90 90 90 90                                                           .......

00581970  void __fastcall ClientCommunicationSystem::InitializeCommands(class ClientCommunicationSystem* this)

00581970  {
00581976      int32_t ebx = 0;
00581979      int32_t var_4 = 0;
00581983      int32_t var_10 = 0;
00581987      int32_t var_c = 0;
0058198b      int32_t var_4_1 = 0;
0058199a      void* esi = operator new(0x18);
005819a1      class CaseInsensitiveStringBase<PStringBase<char> > var_20;
005819a1      
005819a1      if (esi == 0)
005819e0          esi = nullptr;
005819a1      else
005819a1      {
005819ae          PStringBase<char>::PStringBase<char>(&var_20, &data_7943a4);
005819b7          *(uint32_t*)esi = var_20;
005819c1          ebx = 1;
005819c6          InterlockedIncrement((var_20 - 0x10));
005819cd          *(uint32_t*)((char*)esi + 8) = ClientCommunicationSystem::DoHelp;
005819d2          *(uint32_t*)((char*)esi + 4) = 0;
005819d5          *(uint32_t*)((char*)esi + 0xc) = 0;
005819d8          *(uint32_t*)((char*)esi + 0x10) = 0;
005819db          *(uint32_t*)((char*)esi + 0x14) = 0;
005819a1      }
005819a1      
005819e6      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* ebp_1 = &this->m_hashCommands;
005819f1      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>* var_24_1 = ebp_1;
005819f5      uint8_t (__fastcall* __return)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3);
005819f5      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi);
00581a00      int32_t var_14;
00581a00      
00581a00      if (var_14 == 0)
00581a05          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi);
00581a05      
00581a0d      if ((ebx & 1) != 0)
00581a0d      {
00581a13          int32_t* esi_2 = (var_20 - 0x14);
00581a1a          ebx &= 0xfffffffe;
00581a1a          
00581a29          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00581a31              **(uint32_t**)esi_2(1);
00581a0d      }
00581a0d      
00581a3a      void* esi_3 = operator new(0x18);
00581a3a      
00581a41      if (esi_3 == 0)
00581a89          esi_3 = nullptr;
00581a41      else
00581a41      {
00581a4e          __return = ClientCommunicationSystem::DoHelp;
00581a56          PStringBase<char>::PStringBase<char>(&var_20, "help");
00581a5f          *(uint32_t*)esi_3 = var_20;
00581a69          ebx |= 2;
00581a6c          InterlockedIncrement((var_20 - 0x10));
00581a6e          uint8_t (__fastcall* __return_12)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
00581a74          *(uint32_t*)((char*)esi_3 + 4) = 0;
00581a77          *(uint32_t*)((char*)esi_3 + 0x10) = 0;
00581a7a          ebp_1 = var_24_1;
00581a7e          *(uint32_t*)((char*)esi_3 + 8) = __return_12;
00581a81          *(uint32_t*)((char*)esi_3 + 0xc) = 0;
00581a84          *(uint32_t*)((char*)esi_3 + 0x14) = 0;
00581a41      }
00581a41      
00581a93      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_3);
00581a93      
00581a9e      if (var_14 == 0)
00581aa3          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_3);
00581aa3      
00581aab      if ((ebx & 2) != 0)
00581aab      {
00581ab1          int32_t* esi_5 = (var_20 - 0x14);
00581ab8          ebx &= 0xfffffffd;
00581ab8          
00581ac7          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00581acf              **(uint32_t**)esi_5(1);
00581aab      }
00581aab      
00581ad8      void* esi_6 = operator new(0x18);
00581ad8      
00581adf      if (esi_6 == 0)
00581b22          esi_6 = nullptr;
00581adf      else
00581adf      {
00581aef          PStringBase<char>::PStringBase<char>(&var_20, "commands");
00581af8          *(uint32_t*)esi_6 = var_20;
00581b02          ebx |= 4;
00581b05          InterlockedIncrement((var_20 - 0x10));
00581b09          *(uint32_t*)((char*)esi_6 + 0x10) = ClientCommunicationSystem::HelpAllGroup;
00581b0c          ebp_1 = var_24_1;
00581b10          *(uint32_t*)((char*)esi_6 + 4) = 0;
00581b17          *(uint32_t*)((char*)esi_6 + 8) = 0;
00581b1a          *(uint32_t*)((char*)esi_6 + 0xc) = 0;
00581b1d          *(uint32_t*)((char*)esi_6 + 0x14) = 0;
00581adf      }
00581adf      
00581b2c      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_6);
00581b2c      
00581b37      if (var_14 == 0)
00581b3c          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_6);
00581b3c      
00581b44      if ((ebx & 4) != 0)
00581b44      {
00581b4a          int32_t* esi_8 = (var_20 - 0x14);
00581b51          ebx &= 0xfffffffb;
00581b51          
00581b60          if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
00581b68              **(uint32_t**)esi_8(1);
00581b44      }
00581b44      
00581b71      void* esi_9 = operator new(0x18);
00581b71      
00581b78      if (esi_9 == 0)
00581bbb          esi_9 = nullptr;
00581b78      else
00581b78      {
00581b88          PStringBase<char>::PStringBase<char>(&var_20, "allegiances");
00581b91          *(uint32_t*)esi_9 = var_20;
00581b9b          ebx |= 8;
00581b9e          InterlockedIncrement((var_20 - 0x10));
00581ba2          *(uint32_t*)((char*)esi_9 + 0x10) = ClientCommunicationSystem::HelpAllegiancesGroup;
00581ba5          ebp_1 = var_24_1;
00581ba9          *(uint32_t*)((char*)esi_9 + 4) = 0;
00581bb0          *(uint32_t*)((char*)esi_9 + 8) = 0;
00581bb3          *(uint32_t*)((char*)esi_9 + 0xc) = 0;
00581bb6          *(uint32_t*)((char*)esi_9 + 0x14) = 0;
00581b78      }
00581b78      
00581bc5      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_9);
00581bc5      
00581bd0      if (var_14 == 0)
00581bd5          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_9);
00581bd5      
00581bdd      if ((ebx & 8) != 0)
00581bdd      {
00581be3          int32_t* esi_11 = (var_20 - 0x14);
00581bea          ebx &= 0xfffffff7;
00581bea          
00581bf9          if ((InterlockedDecrement(&esi_11[1]) == 0 && esi_11 != 0))
00581c01              **(uint32_t**)esi_11(1);
00581bdd      }
00581bdd      
00581c0a      void* esi_12 = operator new(0x18);
00581c0a      
00581c11      if (esi_12 == 0)
00581c59          esi_12 = nullptr;
00581c11      else
00581c11      {
00581c21          PStringBase<char>::PStringBase<char>(&var_20, "allegiance");
00581c2a          *(uint32_t*)esi_12 = var_20;
00581c34          ebx |= 0x10;
00581c37          InterlockedIncrement((var_20 - 0x10));
00581c3e          *(uint32_t*)((char*)esi_12 + 8) = ClientCommunicationSystem::DoAllegiance;
00581c43          *(uint32_t*)((char*)esi_12 + 0x10) = ClientCommunicationSystem::HelpAllegiance;
00581c46          ebp_1 = var_24_1;
00581c4a          *(uint32_t*)((char*)esi_12 + 4) = 0;
00581c51          *(uint32_t*)((char*)esi_12 + 0xc) = 0;
00581c54          *(uint32_t*)((char*)esi_12 + 0x14) = 0;
00581c11      }
00581c11      
00581c63      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_12);
00581c63      
00581c6e      if (var_14 == 0)
00581c73          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_12);
00581c73      
00581c7b      if ((ebx & 0x10) != 0)
00581c7b      {
00581c81          int32_t* esi_14 = (var_20 - 0x14);
00581c88          ebx &= 0xffffffef;
00581c88          
00581c97          if ((InterlockedDecrement(&esi_14[1]) == 0 && esi_14 != 0))
00581c9f              **(uint32_t**)esi_14(1);
00581c7b      }
00581c7b      
00581ca8      void* esi_15 = operator new(0x18);
00581ca8      
00581caf      if (esi_15 == 0)
00581cfe          esi_15 = nullptr;
00581caf      else
00581caf      {
00581cbf          __return = ClientCommunicationSystem::DoAllegiance;
00581cc7          PStringBase<char>::PStringBase<char>(&var_20, &data_7d00d8);
00581cd0          *(uint32_t*)esi_15 = var_20;
00581cda          ebx |= 0x20;
00581cdd          InterlockedIncrement((var_20 - 0x10));
00581cdf          uint8_t (__fastcall* __return_13)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
00581ce5          *(uint32_t*)((char*)esi_15 + 0x10) = ClientCommunicationSystem::HelpAllegiance;
00581ce8          ebp_1 = var_24_1;
00581cec          *(uint32_t*)((char*)esi_15 + 4) = 0;
00581cf3          *(uint32_t*)((char*)esi_15 + 8) = __return_13;
00581cf6          *(uint32_t*)((char*)esi_15 + 0xc) = 0;
00581cf9          *(uint32_t*)((char*)esi_15 + 0x14) = 0;
00581caf      }
00581caf      
00581d08      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_15);
00581d08      
00581d13      if (var_14 == 0)
00581d18          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_15);
00581d18      
00581d20      if ((ebx & 0x20) != 0)
00581d20      {
00581d26          int32_t* esi_17 = (var_20 - 0x14);
00581d2d          ebx &= 0xffffffdf;
00581d2d          
00581d3c          if ((InterlockedDecrement(&esi_17[1]) == 0 && esi_17 != 0))
00581d44              **(uint32_t**)esi_17(1);
00581d20      }
00581d20      
00581d4d      void* esi_18 = operator new(0x18);
00581d4d      
00581d54      if (esi_18 == 0)
00581d9c          esi_18 = nullptr;
00581d54      else
00581d54      {
00581d64          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1904);
00581d6d          *(uint32_t*)esi_18 = var_20;
00581d77          ebx |= 0x40;
00581d7a          InterlockedIncrement((var_20 - 0x10));
00581d81          *(uint32_t*)((char*)esi_18 + 8) = ClientCommunicationSystem::DoAllegianceBroadcast;
00581d86          *(uint32_t*)((char*)esi_18 + 0x10) = ClientCommunicationSystem::HelpAllegiance;
00581d89          ebp_1 = var_24_1;
00581d8d          *(uint32_t*)((char*)esi_18 + 4) = 0;
00581d94          *(uint32_t*)((char*)esi_18 + 0xc) = 0;
00581d97          *(uint32_t*)((char*)esi_18 + 0x14) = 0;
00581d54      }
00581d54      
00581da6      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_18);
00581da6      
00581db1      if (var_14 == 0)
00581db6          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_18);
00581db6      
00581dbe      if ((ebx & 0x40) != 0)
00581dbe      {
00581dc4          int32_t* esi_20 = (var_20 - 0x14);
00581dcb          ebx &= 0xffffffbf;
00581dcb          
00581dda          if ((InterlockedDecrement(&esi_20[1]) == 0 && esi_20 != 0))
00581de2              **(uint32_t**)esi_20(1);
00581dbe      }
00581dbe      
00581deb      void* esi_21 = operator new(0x18);
00581deb      
00581df2      if (esi_21 == 0)
00581e3d          esi_21 = nullptr;
00581df2      else
00581df2      {
00581e02          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1900);
00581e0b          *(uint32_t*)esi_21 = var_20;
00581e15          ebx |= 0x80;
00581e1b          InterlockedIncrement((var_20 - 0x10));
00581e22          *(uint32_t*)((char*)esi_21 + 8) = ClientCommunicationSystem::DoAllegianceHometown;
00581e27          *(uint32_t*)((char*)esi_21 + 0x10) = ClientCommunicationSystem::HelpAllegiance;
00581e2a          ebp_1 = var_24_1;
00581e2e          *(uint32_t*)((char*)esi_21 + 4) = 0;
00581e35          *(uint32_t*)((char*)esi_21 + 0xc) = 0;
00581e38          *(uint32_t*)((char*)esi_21 + 0x14) = 0;
00581df2      }
00581df2      
00581e47      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_21);
00581e47      
00581e52      if (var_14 == 0)
00581e57          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_21);
00581e57      
00581e5e      if (ebx < 0)
00581e5e      {
00581e64          int32_t* esi_23 = (var_20 - 0x14);
00581e6b          ebx &= 0xffffff7f;
00581e6b          
00581e7d          if ((InterlockedDecrement(&esi_23[1]) == 0 && esi_23 != 0))
00581e85              **(uint32_t**)esi_23(1);
00581e5e      }
00581e5e      
00581e8e      void* esi_24 = operator new(0x18);
00581e8e      
00581e95      if (esi_24 == 0)
00581ee7          esi_24 = nullptr;
00581e95      else
00581e95      {
00581ea5          __return = ClientCommunicationSystem::DoAllegianceHometown;
00581ead          PStringBase<char>::PStringBase<char>(&var_20, &data_7e18fc);
00581eb6          *(uint32_t*)esi_24 = var_20;
00581ec0          ebx |= 0x100;
00581ec6          InterlockedIncrement((var_20 - 0x10));
00581ec8          uint8_t (__fastcall* __return_14)(class ClientCommunicationSystem* this, int32_t arg2, char** arg3) = __return;
00581ece          *(uint32_t*)((char*)esi_24 + 0x10) = ClientCommunicationSystem::HelpAllegiance;
00581ed1          ebp_1 = var_24_1;
00581ed5          *(uint32_t*)((char*)esi_24 + 4) = 0;
00581edc          *(uint32_t*)((char*)esi_24 + 8) = __return_14;
00581edf          *(uint32_t*)((char*)esi_24 + 0xc) = 0;
00581ee2          *(uint32_t*)((char*)esi_24 + 0x14) = 0;
00581e95      }
00581e95      
00581ef1      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_24);
00581ef1      
00581efc      if (var_14 == 0)
00581f01          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_24);
00581f01      
00581f09      if ((*(uint8_t*)((char*)ebx)[1] & 1) != 0)
00581f09      {
00581f0f          int32_t* esi_26 = (var_20 - 0x14);
00581f16          ebx &= 0xfffffeff;
00581f16          
00581f28          if ((InterlockedDecrement(&esi_26[1]) == 0 && esi_26 != 0))
00581f30              **(uint32_t**)esi_26(1);
00581f09      }
00581f09      
00581f39      void* esi_27 = operator new(0x18);
00581f39      
00581f40      if (esi_27 == 0)
00581f8b          esi_27 = nullptr;
00581f40      else
00581f40      {
00581f50          PStringBase<char>::PStringBase<char>(&var_20, "motd");
00581f59          *(uint32_t*)esi_27 = var_20;
00581f63          ebx |= 0x200;
00581f69          InterlockedIncrement((var_20 - 0x10));
00581f70          *(uint32_t*)((char*)esi_27 + 8) = ClientCommunicationSystem::DoMotd;
00581f75          *(uint32_t*)((char*)esi_27 + 0x10) = ClientCommunicationSystem::HelpMotd;
00581f78          ebp_1 = var_24_1;
00581f7c          *(uint32_t*)((char*)esi_27 + 4) = 0;
00581f83          *(uint32_t*)((char*)esi_27 + 0xc) = 0;
00581f86          *(uint32_t*)((char*)esi_27 + 0x14) = 0;
00581f40      }
00581f40      
00581f95      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_27);
00581f95      
00581fa0      if (var_14 == 0)
00581fa5          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_27);
00581fa5      
00581fad      if ((*(uint8_t*)((char*)ebx)[1] & 2) != 0)
00581fad      {
00581fb3          int32_t* esi_29 = (var_20 - 0x14);
00581fba          ebx &= 0xfffffdff;
00581fba          
00581fcc          if ((InterlockedDecrement(&esi_29[1]) == 0 && esi_29 != 0))
00581fd4              **(uint32_t**)esi_29(1);
00581fad      }
00581fad      
00581fdd      void* esi_30 = operator new(0x18);
00581fdd      
00581fe4      if (esi_30 == 0)
0058202f          esi_30 = nullptr;
00581fe4      else
00581fe4      {
00581ff4          PStringBase<char>::PStringBase<char>(&var_20, "speaker");
00581ffd          *(uint32_t*)esi_30 = var_20;
00582007          ebx |= 0x400;
0058200d          InterlockedIncrement((var_20 - 0x10));
00582014          *(uint32_t*)((char*)esi_30 + 8) = ClientCommunicationSystem::DoSpeaker;
00582019          *(uint32_t*)((char*)esi_30 + 0x10) = ClientCommunicationSystem::HelpSpeaker;
0058201c          ebp_1 = var_24_1;
00582020          *(uint32_t*)((char*)esi_30 + 4) = 0;
00582027          *(uint32_t*)((char*)esi_30 + 0xc) = 0;
0058202a          *(uint32_t*)((char*)esi_30 + 0x14) = 0;
00581fe4      }
00581fe4      
00582039      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_30);
00582039      
00582044      if (var_14 == 0)
00582049          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_30);
00582049      
00582051      if ((*(uint8_t*)((char*)ebx)[1] & 4) != 0)
00582051      {
00582057          int32_t* esi_32 = (var_20 - 0x14);
0058205e          ebx &= 0xfffffbff;
0058205e          
00582070          if ((InterlockedDecrement(&esi_32[1]) == 0 && esi_32 != 0))
00582078              **(uint32_t**)esi_32(1);
00582051      }
00582051      
00582081      void* esi_33 = operator new(0x18);
00582081      
00582088      if (esi_33 == 0)
005820ce          esi_33 = nullptr;
00582088      else
00582088      {
00582098          PStringBase<char>::PStringBase<char>(&var_20, "channels");
005820a1          *(uint32_t*)esi_33 = var_20;
005820ab          ebx |= 0x800;
005820b1          InterlockedIncrement((var_20 - 0x10));
005820b5          *(uint32_t*)((char*)esi_33 + 0x10) = ClientCommunicationSystem::HelpChannelsGroup;
005820b8          ebp_1 = var_24_1;
005820bc          *(uint32_t*)((char*)esi_33 + 4) = 0;
005820c3          *(uint32_t*)((char*)esi_33 + 8) = 0;
005820c6          *(uint32_t*)((char*)esi_33 + 0xc) = 0;
005820c9          *(uint32_t*)((char*)esi_33 + 0x14) = 0;
00582088      }
00582088      
005820d8      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_33);
005820d8      
005820e3      if (var_14 == 0)
005820e8          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_33);
005820e8      
005820f0      if ((*(uint8_t*)((char*)ebx)[1] & 8) != 0)
005820f0      {
005820f6          int32_t* esi_35 = (var_20 - 0x14);
005820fd          ebx &= 0xfffff7ff;
005820fd          
0058210f          if ((InterlockedDecrement(&esi_35[1]) == 0 && esi_35 != 0))
00582117              **(uint32_t**)esi_35(1);
005820f0      }
005820f0      
00582120      void* esi_36 = operator new(0x18);
00582120      
00582127      if (esi_36 == 0)
00582172          esi_36 = nullptr;
00582127      else
00582127      {
00582137          PStringBase<char>::PStringBase<char>(&var_20, &*U"fvpca"[4]);
00582140          *(uint32_t*)esi_36 = var_20;
0058214a          ebx |= 0x1000;
00582150          InterlockedIncrement((var_20 - 0x10));
00582157          *(uint32_t*)((char*)esi_36 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
0058215c          *(uint32_t*)((char*)esi_36 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
0058215f          ebp_1 = var_24_1;
00582163          *(uint32_t*)((char*)esi_36 + 4) = 0;
0058216a          *(uint32_t*)((char*)esi_36 + 0xc) = 0;
0058216d          *(uint32_t*)((char*)esi_36 + 0x14) = 0;
00582127      }
00582127      
0058217c      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_36);
0058217c      
00582187      if (var_14 == 0)
0058218c          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_36);
0058218c      
00582194      if ((*(uint8_t*)((char*)ebx)[1] & 0x10) != 0)
00582194      {
0058219a          int32_t* esi_38 = (var_20 - 0x14);
005821a1          ebx &= 0xffffefff;
005821a1          
005821b3          if ((InterlockedDecrement(&esi_38[1]) == 0 && esi_38 != 0))
005821bb              **(uint32_t**)esi_38(1);
00582194      }
00582194      
005821c4      void* esi_39 = operator new(0x18);
005821c4      
005821cb      if (esi_39 == 0)
00582216          esi_39 = nullptr;
005821cb      else
005821cb      {
005821db          PStringBase<char>::PStringBase<char>(&var_20, "co-vassals");
005821e4          *(uint32_t*)esi_39 = var_20;
005821ee          ebx |= 0x2000;
005821f4          InterlockedIncrement((var_20 - 0x10));
005821fb          *(uint32_t*)((char*)esi_39 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
00582200          *(uint32_t*)((char*)esi_39 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
00582203          ebp_1 = var_24_1;
00582207          *(uint32_t*)((char*)esi_39 + 4) = 0;
0058220e          *(uint32_t*)((char*)esi_39 + 0xc) = 0;
00582211          *(uint32_t*)((char*)esi_39 + 0x14) = 0;
005821cb      }
005821cb      
00582220      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_39);
00582220      
0058222b      if (var_14 == 0)
00582230          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_39);
00582230      
00582238      if ((*(uint8_t*)((char*)ebx)[1] & 0x20) != 0)
00582238      {
0058223e          int32_t* esi_41 = (var_20 - 0x14);
00582245          ebx &= 0xffffdfff;
00582245          
00582257          if ((InterlockedDecrement(&esi_41[1]) == 0 && esi_41 != 0))
0058225f              **(uint32_t**)esi_41(1);
00582238      }
00582238      
00582268      void* esi_42 = operator new(0x18);
00582268      
0058226f      if (esi_42 == 0)
005822ba          esi_42 = nullptr;
0058226f      else
0058226f      {
0058227f          PStringBase<char>::PStringBase<char>(&var_20, "covassals");
00582288          *(uint32_t*)esi_42 = var_20;
00582292          ebx |= 0x4000;
00582298          InterlockedIncrement((var_20 - 0x10));
0058229f          *(uint32_t*)((char*)esi_42 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
005822a4          *(uint32_t*)((char*)esi_42 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
005822a7          ebp_1 = var_24_1;
005822ab          *(uint32_t*)((char*)esi_42 + 4) = 0;
005822b2          *(uint32_t*)((char*)esi_42 + 0xc) = 0;
005822b5          *(uint32_t*)((char*)esi_42 + 0x14) = 0;
0058226f      }
0058226f      
005822c4      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_42);
005822c4      
005822cf      if (var_14 == 0)
005822d4          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_42);
005822d4      
005822dc      if ((*(uint8_t*)((char*)ebx)[1] & 0x40) != 0)
005822dc      {
005822e2          int32_t* esi_44 = (var_20 - 0x14);
005822e9          ebx &= 0xffffbfff;
005822e9          
005822fb          if ((InterlockedDecrement(&esi_44[1]) == 0 && esi_44 != 0))
00582303              **(uint32_t**)esi_44(1);
005822dc      }
005822dc      
0058230c      void* esi_45 = operator new(0x18);
0058230c      
00582313      if (esi_45 == 0)
0058235e          esi_45 = nullptr;
00582313      else
00582313      {
00582323          PStringBase<char>::PStringBase<char>(&var_20, "covassal");
0058232c          *(uint32_t*)esi_45 = var_20;
00582336          ebx |= 0x8000;
0058233c          InterlockedIncrement((var_20 - 0x10));
00582343          *(uint32_t*)((char*)esi_45 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
00582348          *(uint32_t*)((char*)esi_45 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
0058234b          ebp_1 = var_24_1;
0058234f          *(uint32_t*)((char*)esi_45 + 4) = 0;
00582356          *(uint32_t*)((char*)esi_45 + 0xc) = 0;
00582359          *(uint32_t*)((char*)esi_45 + 0x14) = 0;
00582313      }
00582313      
00582368      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_45);
00582368      
00582373      if (var_14 == 0)
00582378          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_45);
00582378      
0058237f      if (*(uint8_t*)((char*)ebx)[1] < 0)
0058237f      {
00582385          int32_t* esi_47 = (var_20 - 0x14);
0058238c          ebx &= 0xffff7fff;
0058238c          
0058239e          if ((InterlockedDecrement(&esi_47[1]) == 0 && esi_47 != 0))
005823a6              **(uint32_t**)esi_47(1);
0058237f      }
0058237f      
005823af      void* esi_48 = operator new(0x18);
005823af      
005823b6      if (esi_48 == 0)
00582401          esi_48 = nullptr;
005823b6      else
005823b6      {
005823c6          PStringBase<char>::PStringBase<char>(&var_20, &*U"fvpca"[3]);
005823cf          *(uint32_t*)esi_48 = var_20;
005823d9          ebx |= 0x10000;
005823df          InterlockedIncrement((var_20 - 0x10));
005823e6          *(uint32_t*)((char*)esi_48 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
005823eb          *(uint32_t*)((char*)esi_48 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
005823ee          ebp_1 = var_24_1;
005823f2          *(uint32_t*)((char*)esi_48 + 4) = 0;
005823f9          *(uint32_t*)((char*)esi_48 + 0xc) = 0;
005823fc          *(uint32_t*)((char*)esi_48 + 0x14) = 0;
005823b6      }
005823b6      
0058240b      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_48);
0058240b      
00582416      if (var_14 == 0)
0058241b          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_48);
0058241b      
00582426      if ((ebx & 0x10000) != 0)
00582426      {
0058242c          int32_t* esi_50 = (var_20 - 0x14);
00582433          ebx &= 0xfffeffff;
00582433          
00582445          if ((InterlockedDecrement(&esi_50[1]) == 0 && esi_50 != 0))
0058244d              **(uint32_t**)esi_50(1);
00582426      }
00582426      
00582456      void* esi_51 = operator new(0x18);
00582456      
0058245d      if (esi_51 == 0)
005824a8          esi_51 = nullptr;
0058245d      else
0058245d      {
0058246d          PStringBase<char>::PStringBase<char>(&var_20, "fellowship");
00582476          *(uint32_t*)esi_51 = var_20;
00582480          ebx |= 0x20000;
00582486          InterlockedIncrement((var_20 - 0x10));
0058248d          *(uint32_t*)((char*)esi_51 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
00582492          *(uint32_t*)((char*)esi_51 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
00582495          ebp_1 = var_24_1;
00582499          *(uint32_t*)((char*)esi_51 + 4) = 0;
005824a0          *(uint32_t*)((char*)esi_51 + 0xc) = 0;
005824a3          *(uint32_t*)((char*)esi_51 + 0x14) = 0;
0058245d      }
0058245d      
005824b2      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_51);
005824b2      
005824bd      if (var_14 == 0)
005824c2          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_51);
005824c2      
005824cd      if ((ebx & 0x20000) != 0)
005824cd      {
005824d3          int32_t* esi_53 = (var_20 - 0x14);
005824da          ebx &= 0xfffdffff;
005824da          
005824ec          if ((InterlockedDecrement(&esi_53[1]) == 0 && esi_53 != 0))
005824f4              **(uint32_t**)esi_53(1);
005824cd      }
005824cd      
005824fd      void* esi_54 = operator new(0x18);
005824fd      
00582504      if (esi_54 == 0)
0058254f          esi_54 = nullptr;
00582504      else
00582504      {
00582514          PStringBase<char>::PStringBase<char>(&var_20, "fellows");
0058251d          *(uint32_t*)esi_54 = var_20;
00582527          ebx |= 0x40000;
0058252d          InterlockedIncrement((var_20 - 0x10));
00582534          *(uint32_t*)((char*)esi_54 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
00582539          *(uint32_t*)((char*)esi_54 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
0058253c          ebp_1 = var_24_1;
00582540          *(uint32_t*)((char*)esi_54 + 4) = 0;
00582547          *(uint32_t*)((char*)esi_54 + 0xc) = 0;
0058254a          *(uint32_t*)((char*)esi_54 + 0x14) = 0;
00582504      }
00582504      
00582559      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_54);
00582559      
00582564      if (var_14 == 0)
00582569          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_54);
00582569      
00582574      if ((ebx & 0x40000) != 0)
00582574      {
0058257a          int32_t* esi_56 = (var_20 - 0x14);
00582581          ebx &= 0xfffbffff;
00582581          
00582593          if ((InterlockedDecrement(&esi_56[1]) == 0 && esi_56 != 0))
0058259b              **(uint32_t**)esi_56(1);
00582574      }
00582574      
005825a4      void* esi_57 = operator new(0x18);
005825a4      
005825ab      if (esi_57 == 0)
005825f6          esi_57 = nullptr;
005825ab      else
005825ab      {
005825bb          PStringBase<char>::PStringBase<char>(&var_20, "fellow");
005825c4          *(uint32_t*)esi_57 = var_20;
005825ce          ebx |= 0x80000;
005825d4          InterlockedIncrement((var_20 - 0x10));
005825db          *(uint32_t*)((char*)esi_57 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
005825e0          *(uint32_t*)((char*)esi_57 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
005825e3          ebp_1 = var_24_1;
005825e7          *(uint32_t*)((char*)esi_57 + 4) = 0;
005825ee          *(uint32_t*)((char*)esi_57 + 0xc) = 0;
005825f1          *(uint32_t*)((char*)esi_57 + 0x14) = 0;
005825ab      }
005825ab      
00582600      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_57);
00582600      
0058260b      if (var_14 == 0)
00582610          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_57);
00582610      
0058261b      if ((ebx & 0x80000) != 0)
0058261b      {
00582621          int32_t* esi_59 = (var_20 - 0x14);
00582628          ebx &= 0xfff7ffff;
00582628          
0058263a          if ((InterlockedDecrement(&esi_59[1]) == 0 && esi_59 != 0))
00582642              **(uint32_t**)esi_59(1);
0058261b      }
0058261b      
0058264b      void* esi_60 = operator new(0x18);
0058264b      
00582652      if (esi_60 == 0)
0058269d          esi_60 = nullptr;
00582652      else
00582652      {
00582662          PStringBase<char>::PStringBase<char>(&var_20, U"fvpca");
0058266b          *(uint32_t*)esi_60 = var_20;
00582675          ebx |= 0x100000;
0058267b          InterlockedIncrement((var_20 - 0x10));
00582682          *(uint32_t*)((char*)esi_60 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
00582687          *(uint32_t*)((char*)esi_60 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
0058268a          ebp_1 = var_24_1;
0058268e          *(uint32_t*)((char*)esi_60 + 4) = 0;
00582695          *(uint32_t*)((char*)esi_60 + 0xc) = 0;
00582698          *(uint32_t*)((char*)esi_60 + 0x14) = 0;
00582652      }
00582652      
005826a7      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_60);
005826a7      
005826b2      if (var_14 == 0)
005826b7          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_60);
005826b7      
005826c2      if ((ebx & 0x100000) != 0)
005826c2      {
005826c8          int32_t* esi_62 = (var_20 - 0x14);
005826cf          ebx &= 0xffefffff;
005826cf          
005826e1          if ((InterlockedDecrement(&esi_62[1]) == 0 && esi_62 != 0))
005826e9              **(uint32_t**)esi_62(1);
005826c2      }
005826c2      
005826f2      void* esi_63 = operator new(0x18);
005826f2      
005826f9      if (esi_63 == 0)
00582744          esi_63 = nullptr;
005826f9      else
005826f9      {
00582709          PStringBase<char>::PStringBase<char>(&var_20, "group");
00582712          *(uint32_t*)esi_63 = var_20;
0058271c          ebx |= 0x200000;
00582722          InterlockedIncrement((var_20 - 0x10));
00582729          *(uint32_t*)((char*)esi_63 + 8) = ClientCommunicationSystem::DoStupidChannelHack;
0058272e          *(uint32_t*)((char*)esi_63 + 0x10) = ClientCommunicationSystem::HelpStupidChannelHack;
00582731          ebp_1 = var_24_1;
00582735          *(uint32_t*)((char*)esi_63 + 4) = 0;
0058273c          *(uint32_t*)((char*)esi_63 + 0xc) = 0;
0058273f          *(uint32_t*)((char*)esi_63 + 0x14) = 0;
005826f9      }
005826f9      
0058274e      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(ebp_1, &__return, esi_63);
0058274e      
00582759      if (var_14 == 0)
0058275e          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add_internal(ebp_1, esi_63);
0058275e      
00582769      if ((ebx & 0x200000) != 0)
00582769      {
0058276f          int32_t* esi_65 = (var_20 - 0x14);
00582776          ebx &= 0xffdfffff;
00582776          
00582788          if ((InterlockedDecrement(&esi_65[1]) == 0 && esi_65 != 0))
00582790              **(uint32_t**)esi_65(1);
00582769      }
00582769      
00582794      void* __return_1 = operator new(0x18);
0058279e      __return = __return_1;
005827a2      class ClientCommunicationSystem::CmdHashData* eax_107;
005827a2      
005827a2      if (__return_1 == 0)
005827de          eax_107 = nullptr;
005827a2      else
005827a2      {
005827b9          PStringBase<char>::PStringBase<char>(&var_20, &data_7e189c);
005827c2          int32_t var_38_89 = 0;
005827c3          uint8_t (__stdcall* var_3c_22)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
005827cd          ebx |= 0x400000;
005827d3          eax_107 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
005827d8          ebp_1 = var_24_1;
005827a2      }
005827a2      
005827e3      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_107);
005827e3      
005827ee      if ((ebx & 0x400000) != 0)
005827ee      {
005827f4          int32_t* esi_67 = (var_20 - 0x14);
005827fb          ebx &= 0xffbfffff;
005827fb          
0058280d          if ((InterlockedDecrement(&esi_67[1]) == 0 && esi_67 != 0))
00582815              **(uint32_t**)esi_67(1);
005827ee      }
005827ee      
00582819      void* __return_2 = operator new(0x18);
00582823      __return = __return_2;
00582827      class ClientCommunicationSystem::CmdHashData* eax_109;
00582827      
00582827      if (__return_2 == 0)
00582863          eax_109 = nullptr;
00582827      else
00582827      {
0058283e          PStringBase<char>::PStringBase<char>(&var_20, "party");
00582847          int32_t var_38_92 = 0;
00582848          uint8_t (__stdcall* var_3c_23)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
00582852          ebx |= "activation type (%s) with '%s' b…";
00582858          eax_109 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
0058285d          ebp_1 = var_24_1;
00582827      }
00582827      
00582868      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_109);
00582868      
00582873      if ((ebx & "activation type (%s) with '%s' b…") != 0)
00582873      {
00582879          int32_t* esi_69 = (var_20 - 0x14);
00582880          ebx &= 0xff7fffff;
00582880          
00582892          if ((InterlockedDecrement(&esi_69[1]) == 0 && esi_69 != 0))
0058289a              **(uint32_t**)esi_69(1);
00582873      }
00582873      
0058289e      void* __return_3 = operator new(0x18);
005828a8      __return = __return_3;
005828ac      class ClientCommunicationSystem::CmdHashData* eax_111;
005828ac      
005828ac      if (__return_3 == 0)
005828e8          eax_111 = nullptr;
005828ac      else
005828ac      {
005828c3          PStringBase<char>::PStringBase<char>(&var_20, "monarch");
005828cc          int32_t var_38_95 = 0;
005828cd          uint8_t (__stdcall* var_3c_24)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
005828d7          ebx |= 0x1000000;
005828dd          eax_111 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
005828e2          ebp_1 = var_24_1;
005828ac      }
005828ac      
005828ed      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_111);
005828ed      
005828f8      if ((ebx & 0x1000000) != 0)
005828f8      {
005828fe          int32_t* esi_71 = (var_20 - 0x14);
00582905          ebx &= 0xfeffffff;
00582905          
00582917          if ((InterlockedDecrement(&esi_71[1]) == 0 && esi_71 != 0))
0058291f              **(uint32_t**)esi_71(1);
005828f8      }
005828f8      
00582923      void* __return_4 = operator new(0x18);
0058292d      __return = __return_4;
00582931      class ClientCommunicationSystem::CmdHashData* eax_113;
00582931      
00582931      if (__return_4 == 0)
0058296d          eax_113 = nullptr;
00582931      else
00582931      {
00582948          PStringBase<char>::PStringBase<char>(&var_20, U"mh,.");
00582951          int32_t var_38_98 = 0;
00582952          uint8_t (__stdcall* var_3c_25)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
0058295c          ebx |= 0x2000000;
00582962          eax_113 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
00582967          ebp_1 = var_24_1;
00582931      }
00582931      
00582972      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_113);
00582972      
0058297d      if ((ebx & 0x2000000) != 0)
0058297d      {
00582983          int32_t* esi_73 = (var_20 - 0x14);
0058298a          ebx &= 0xfdffffff;
0058298a          
0058299c          if ((InterlockedDecrement(&esi_73[1]) == 0 && esi_73 != 0))
005829a4              **(uint32_t**)esi_73(1);
0058297d      }
0058297d      
005829a8      void* __return_5 = operator new(0x18);
005829b2      __return = __return_5;
005829b6      class ClientCommunicationSystem::CmdHashData* eax_115;
005829b6      
005829b6      if (__return_5 == 0)
005829f2          eax_115 = nullptr;
005829b6      else
005829b6      {
005829cd          PStringBase<char>::PStringBase<char>(&var_20, "patron");
005829d6          int32_t var_38_101 = 0;
005829d7          uint8_t (__stdcall* var_3c_26)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
005829e1          ebx |= 0x4000000;
005829e7          eax_115 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
005829ec          ebp_1 = var_24_1;
005829b6      }
005829b6      
005829f7      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_115);
005829f7      
00582a02      if ((ebx & 0x4000000) != 0)
00582a02      {
00582a08          int32_t* esi_75 = (var_20 - 0x14);
00582a0f          ebx &= 0xfbffffff;
00582a0f          
00582a21          if ((InterlockedDecrement(&esi_75[1]) == 0 && esi_75 != 0))
00582a29              **(uint32_t**)esi_75(1);
00582a02      }
00582a02      
00582a2d      void* __return_6 = operator new(0x18);
00582a37      __return = __return_6;
00582a3b      class ClientCommunicationSystem::CmdHashData* eax_117;
00582a3b      
00582a3b      if (__return_6 == 0)
00582a77          eax_117 = nullptr;
00582a3b      else
00582a3b      {
00582a52          PStringBase<char>::PStringBase<char>(&var_20, &*U"fvpca"[2]);
00582a5b          int32_t var_38_104 = 0;
00582a5c          uint8_t (__stdcall* var_3c_27)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
00582a66          ebx |= 0x8000000;
00582a6c          eax_117 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
00582a71          ebp_1 = var_24_1;
00582a3b      }
00582a3b      
00582a7c      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_117);
00582a7c      
00582a87      if ((ebx & 0x8000000) != 0)
00582a87      {
00582a8d          int32_t* esi_77 = (var_20 - 0x14);
00582a94          ebx &= 0xf7ffffff;
00582a94          
00582aa6          if ((InterlockedDecrement(&esi_77[1]) == 0 && esi_77 != 0))
00582aae              **(uint32_t**)esi_77(1);
00582a87      }
00582a87      
00582ab2      void* __return_7 = operator new(0x18);
00582abc      __return = __return_7;
00582ac0      class ClientCommunicationSystem::CmdHashData* eax_119;
00582ac0      
00582ac0      if (__return_7 == 0)
00582afc          eax_119 = nullptr;
00582ac0      else
00582ac0      {
00582ad7          PStringBase<char>::PStringBase<char>(&var_20, "vassals");
00582ae0          int32_t var_38_107 = 0;
00582ae1          uint8_t (__stdcall* var_3c_28)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
00582aeb          ebx |= 0x10000000;
00582af1          eax_119 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
00582af6          ebp_1 = var_24_1;
00582ac0      }
00582ac0      
00582b01      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_119);
00582b01      
00582b0c      if ((ebx & 0x10000000) != 0)
00582b0c      {
00582b12          int32_t* esi_79 = (var_20 - 0x14);
00582b19          ebx &= 0xefffffff;
00582b19          
00582b2b          if ((InterlockedDecrement(&esi_79[1]) == 0 && esi_79 != 0))
00582b33              **(uint32_t**)esi_79(1);
00582b0c      }
00582b0c      
00582b37      void* __return_8 = operator new(0x18);
00582b41      __return = __return_8;
00582b45      class ClientCommunicationSystem::CmdHashData* eax_121;
00582b45      
00582b45      if (__return_8 == 0)
00582b81          eax_121 = nullptr;
00582b45      else
00582b45      {
00582b5c          PStringBase<char>::PStringBase<char>(&var_20, "vassal");
00582b65          int32_t var_38_110 = 0;
00582b66          uint8_t (__stdcall* var_3c_29)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
00582b70          ebx |= 0x20000000;
00582b76          eax_121 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
00582b7b          ebp_1 = var_24_1;
00582b45      }
00582b45      
00582b86      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_121);
00582b86      
00582b91      if ((ebx & 0x20000000) != 0)
00582b91      {
00582b97          int32_t* esi_81 = (var_20 - 0x14);
00582b9e          ebx &= 0xdfffffff;
00582b9e          
00582bb0          if ((InterlockedDecrement(&esi_81[1]) == 0 && esi_81 != 0))
00582bb8              **(uint32_t**)esi_81(1);
00582b91      }
00582b91      
00582bbc      void* __return_9 = operator new(0x18);
00582bc6      __return = __return_9;
00582bca      class ClientCommunicationSystem::CmdHashData* eax_123;
00582bca      
00582bca      if (__return_9 == 0)
00582c06          eax_123 = nullptr;
00582bca      else
00582bca      {
00582be1          PStringBase<char>::PStringBase<char>(&var_20, &*U"fvpca"[1]);
00582bea          int32_t var_38_113 = 0;
00582beb          uint8_t (__stdcall* var_3c_30)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStupidChannelHack;
00582bf5          ebx |= 0x40000000;
00582bfb          eax_123 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoStupidChannelHack, nullptr);
00582c00          ebp_1 = var_24_1;
00582bca      }
00582bca      
00582c0b      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_123);
00582c0b      
00582c16      if ((ebx & 0x40000000) != 0)
00582c16      {
00582c1c          int32_t* esi_83 = (var_20 - 0x14);
00582c23          ebx &= 0xbfffffff;
00582c23          
00582c35          if ((InterlockedDecrement(&esi_83[1]) == 0 && esi_83 != 0))
00582c3d              **(uint32_t**)esi_83(1);
00582c16      }
00582c16      
00582c41      void* __return_10 = operator new(0x18);
00582c4b      __return = __return_10;
00582c4f      class ClientCommunicationSystem::CmdHashData* eax_125;
00582c4f      
00582c4f      if (__return_10 == 0)
00582c8b          eax_125 = nullptr;
00582c4f      else
00582c4f      {
00582c66          PStringBase<char>::PStringBase<char>(&var_20, "join");
00582c6f          int32_t var_38_116 = 0;
00582c70          uint8_t (__thiscall* var_3c_31)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpJoinChat;
00582c7a          ebx |= 0x80000000;
00582c80          eax_125 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoJoinChat, nullptr);
00582c85          ebp_1 = var_24_1;
00582c4f      }
00582c4f      
00582c90      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_125);
00582c90      
00582c97      if (ebx < 0)
00582c97      {
00582c9d          int32_t* esi_85 = (var_20 - 0x14);
00582c9d          
00582cb0          if ((InterlockedDecrement(&esi_85[1]) == 0 && esi_85 != 0))
00582cb8              **(uint32_t**)esi_85(1);
00582c97      }
00582c97      
00582cbc      void* __return_11 = operator new(0x18);
00582cc6      __return = __return_11;
00582cca      class ClientCommunicationSystem::CmdHashData* eax_127;
00582cca      int32_t ebx_1;
00582cca      
00582cca      if (__return_11 == 0)
00582cca      {
00582d05          ebx_1 = var_10;
00582d09          eax_127 = nullptr;
00582cca      }
00582cca      else
00582cca      {
00582ce1          PStringBase<char>::PStringBase<char>(&var_20, "leave");
00582cea          int32_t var_38_119 = 0;
00582ceb          uint8_t (__thiscall* var_3c_32)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLeaveChat;
00582cf5          ebx_1 = 1;
00582cfa          eax_127 = ClientCommunicationSystem::CmdHashData::CmdHashData(__return, &var_20, ClientCommunicationSystem::DoLeaveChat, nullptr);
00582cff          ebp_1 = var_24_1;
00582cca      }
00582cca      
00582d0e      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_127);
00582d0e      
00582d16      if ((ebx_1 & 1) != 0)
00582d16      {
00582d1c          int32_t* esi_87 = (var_20 - 0x14);
00582d23          ebx_1 &= 0xfffffffe;
00582d23          
00582d32          if ((InterlockedDecrement(&esi_87[1]) == 0 && esi_87 != 0))
00582d3a              **(uint32_t**)esi_87(1);
00582d16      }
00582d16      
00582d3e      void* eax_129 = operator new(0x18);
00582d4c      class ClientCommunicationSystem::CmdHashData* eax_130;
00582d4c      
00582d4c      if (eax_129 == 0)
00582d82          eax_130 = nullptr;
00582d4c      else
00582d4c      {
00582d60          PStringBase<char>::PStringBase<char>(&var_20, "chatting");
00582d69          int32_t var_38_122 = 0;
00582d6a          uint8_t (__thiscall* var_3c_33)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpChattingGroup;
00582d74          ebx_1 |= 2;
00582d77          eax_130 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_129, &var_20, nullptr, nullptr);
00582d7c          ebp_1 = var_24_1;
00582d4c      }
00582d4c      
00582d87      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_130);
00582d87      
00582d8f      if ((ebx_1 & 2) != 0)
00582d8f      {
00582d95          int32_t* esi_89 = (var_20 - 0x14);
00582d9c          ebx_1 &= 0xfffffffd;
00582d9c          
00582dab          if ((InterlockedDecrement(&esi_89[1]) == 0 && esi_89 != 0))
00582db3              **(uint32_t**)esi_89(1);
00582d8f      }
00582d8f      
00582db7      void* eax_132 = operator new(0x18);
00582dc5      class ClientCommunicationSystem::CmdHashData* eax_133;
00582dc5      
00582dc5      if (eax_132 == 0)
00582dfe          eax_133 = nullptr;
00582dc5      else
00582dc5      {
00582ddc          PStringBase<char>::PStringBase<char>(&var_20, "chat");
00582de5          int32_t var_38_125 = 0;
00582de6          uint8_t (__stdcall* var_3c_34)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpChatToggle;
00582df0          ebx_1 |= 4;
00582df3          eax_133 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_132, &var_20, ClientCommunicationSystem::DoChatToggle, nullptr);
00582df8          ebp_1 = var_24_1;
00582dc5      }
00582dc5      
00582e03      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_133);
00582e03      
00582e0b      if ((ebx_1 & 4) != 0)
00582e0b      {
00582e11          int32_t* esi_91 = (var_20 - 0x14);
00582e18          ebx_1 &= 0xfffffffb;
00582e18          
00582e27          if ((InterlockedDecrement(&esi_91[1]) == 0 && esi_91 != 0))
00582e2f              **(uint32_t**)esi_91(1);
00582e0b      }
00582e0b      
00582e33      void* eax_135 = operator new(0x18);
00582e41      class ClientCommunicationSystem::CmdHashData* eax_136;
00582e41      
00582e41      if (eax_135 == 0)
00582e7a          eax_136 = nullptr;
00582e41      else
00582e41      {
00582e58          PStringBase<char>::PStringBase<char>(&var_20, "notell");
00582e61          int32_t var_38_128 = 0;
00582e62          uint8_t (__stdcall* var_3c_35)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpNoTell;
00582e6c          ebx_1 |= 8;
00582e6f          eax_136 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_135, &var_20, ClientCommunicationSystem::DoNoTell, nullptr);
00582e74          ebp_1 = var_24_1;
00582e41      }
00582e41      
00582e7f      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_136);
00582e7f      
00582e87      if ((ebx_1 & 8) != 0)
00582e87      {
00582e8d          int32_t* esi_93 = (var_20 - 0x14);
00582e94          ebx_1 &= 0xfffffff7;
00582e94          
00582ea3          if ((InterlockedDecrement(&esi_93[1]) == 0 && esi_93 != 0))
00582eab              **(uint32_t**)esi_93(1);
00582e87      }
00582e87      
00582eaf      void* eax_138 = operator new(0x18);
00582ebd      class ClientCommunicationSystem::CmdHashData* eax_139;
00582ebd      
00582ebd      if (eax_138 == 0)
00582ef6          eax_139 = nullptr;
00582ebd      else
00582ebd      {
00582ed4          PStringBase<char>::PStringBase<char>(&var_20, "reply");
00582edd          int32_t var_38_131 = 0;
00582ede          uint8_t (__stdcall* var_3c_36)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpReply;
00582ee8          ebx_1 |= 0x10;
00582eeb          eax_139 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_138, &var_20, ClientCommunicationSystem::DoReply, nullptr);
00582ef0          ebp_1 = var_24_1;
00582ebd      }
00582ebd      
00582efb      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_139);
00582efb      
00582f03      if ((ebx_1 & 0x10) != 0)
00582f03      {
00582f09          int32_t* esi_95 = (var_20 - 0x14);
00582f10          ebx_1 &= 0xffffffef;
00582f10          
00582f1f          if ((InterlockedDecrement(&esi_95[1]) == 0 && esi_95 != 0))
00582f27              **(uint32_t**)esi_95(1);
00582f03      }
00582f03      
00582f2b      void* eax_141 = operator new(0x18);
00582f39      class ClientCommunicationSystem::CmdHashData* eax_142;
00582f39      
00582f39      if (eax_141 == 0)
00582f72          eax_142 = nullptr;
00582f39      else
00582f39      {
00582f50          PStringBase<char>::PStringBase<char>(&var_20, &gmJournalUI::`vftable'.RecvNotice_UpdateToolbarSelectionDisplay);
00582f59          int32_t var_38_134 = 0;
00582f5a          uint8_t (__stdcall* var_3c_37)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpReply;
00582f64          ebx_1 |= 0x20;
00582f67          eax_142 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_141, &var_20, ClientCommunicationSystem::DoReply, nullptr);
00582f6c          ebp_1 = var_24_1;
00582f39      }
00582f39      
00582f77      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_142);
00582f77      
00582f7f      if ((ebx_1 & 0x20) != 0)
00582f7f      {
00582f85          int32_t* esi_97 = (var_20 - 0x14);
00582f8c          ebx_1 &= 0xffffffdf;
00582f8c          
00582f9b          if ((InterlockedDecrement(&esi_97[1]) == 0 && esi_97 != 0))
00582fa3              **(uint32_t**)esi_97(1);
00582f7f      }
00582f7f      
00582fa7      void* eax_144 = operator new(0x18);
00582fb5      class ClientCommunicationSystem::CmdHashData* eax_145;
00582fb5      
00582fb5      if (eax_144 == 0)
00582fee          eax_145 = nullptr;
00582fb5      else
00582fb5      {
00582fcc          PStringBase<char>::PStringBase<char>(&var_20, &data_7e184c);
00582fd5          int32_t var_38_137 = 0;
00582fd6          uint8_t (__stdcall* var_3c_38)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpReply;
00582fe0          ebx_1 |= 0x40;
00582fe3          eax_145 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_144, &var_20, ClientCommunicationSystem::DoReply, nullptr);
00582fe8          ebp_1 = var_24_1;
00582fb5      }
00582fb5      
00582ff3      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_145);
00582ff3      
00582ffb      if ((ebx_1 & 0x40) != 0)
00582ffb      {
00583001          int32_t* esi_99 = (var_20 - 0x14);
00583008          ebx_1 &= 0xffffffbf;
00583008          
00583017          if ((InterlockedDecrement(&esi_99[1]) == 0 && esi_99 != 0))
0058301f              **(uint32_t**)esi_99(1);
00582ffb      }
00582ffb      
00583023      void* eax_147 = operator new(0x18);
00583031      class ClientCommunicationSystem::CmdHashData* eax_148;
00583031      
00583031      if (eax_147 == 0)
0058306a          eax_148 = nullptr;
00583031      else
00583031      {
00583045          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1848);
0058304e          int32_t var_38_140 = 0;
0058304f          uint8_t (__stdcall* var_3c_39)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpReply;
00583059          ebx_1 |= 0x80;
0058305f          eax_148 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_147, &var_20, nullptr, nullptr);
00583064          ebp_1 = var_24_1;
00583031      }
00583031      
0058306f      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_148);
0058306f      
00583076      if (ebx_1 < 0)
00583076      {
0058307c          int32_t* esi_101 = (var_20 - 0x14);
00583083          ebx_1 &= 0xffffff7f;
00583083          
00583095          if ((InterlockedDecrement(&esi_101[1]) == 0 && esi_101 != 0))
0058309d              **(uint32_t**)esi_101(1);
00583076      }
00583076      
005830a1      void* eax_150 = operator new(0x18);
005830af      class ClientCommunicationSystem::CmdHashData* eax_151;
005830af      
005830af      if (eax_150 == 0)
005830e8          eax_151 = nullptr;
005830af      else
005830af      {
005830c3          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1844);
005830cc          int32_t var_38_143 = 0;
005830cd          uint8_t (__stdcall* var_3c_40)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpReply;
005830d7          ebx_1 |= 0x100;
005830dd          eax_151 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_150, &var_20, nullptr, nullptr);
005830e2          ebp_1 = var_24_1;
005830af      }
005830af      
005830ed      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_151);
005830ed      
005830f5      if ((*(uint8_t*)((char*)ebx_1)[1] & 1) != 0)
005830f5      {
005830fb          int32_t* esi_103 = (var_20 - 0x14);
00583102          ebx_1 &= 0xfffffeff;
00583102          
00583114          if ((InterlockedDecrement(&esi_103[1]) == 0 && esi_103 != 0))
0058311c              **(uint32_t**)esi_103(1);
005830f5      }
005830f5      
00583120      void* eax_153 = operator new(0x18);
0058312e      class ClientCommunicationSystem::CmdHashData* eax_154;
0058312e      
0058312e      if (eax_153 == 0)
0058316a          eax_154 = nullptr;
0058312e      else
0058312e      {
00583145          PStringBase<char>::PStringBase<char>(&var_20, "retell");
0058314e          int32_t var_38_146 = 0;
0058314f          uint8_t (__stdcall* var_3c_41)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpReTell;
00583159          ebx_1 |= 0x200;
0058315f          eax_154 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_153, &var_20, ClientCommunicationSystem::DoReTell, nullptr);
00583164          ebp_1 = var_24_1;
0058312e      }
0058312e      
0058316f      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_154);
0058316f      
00583177      if ((*(uint8_t*)((char*)ebx_1)[1] & 2) != 0)
00583177      {
0058317d          int32_t* esi_105 = (var_20 - 0x14);
00583184          ebx_1 &= 0xfffffdff;
00583184          
00583196          if ((InterlockedDecrement(&esi_105[1]) == 0 && esi_105 != 0))
0058319e              **(uint32_t**)esi_105(1);
00583177      }
00583177      
005831a2      void* eax_156 = operator new(0x18);
005831b0      class ClientCommunicationSystem::CmdHashData* eax_157;
005831b0      
005831b0      if (eax_156 == 0)
005831ec          eax_157 = nullptr;
005831b0      else
005831b0      {
005831c7          PStringBase<char>::PStringBase<char>(&var_20, &data_7e15d0);
005831d0          int32_t var_38_149 = 0;
005831d1          uint8_t (__stdcall* var_3c_42)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpReTell;
005831db          ebx_1 |= 0x400;
005831e1          eax_157 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_156, &var_20, ClientCommunicationSystem::DoReTell, nullptr);
005831e6          ebp_1 = var_24_1;
005831b0      }
005831b0      
005831f1      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_157);
005831f1      
005831f9      if ((*(uint8_t*)((char*)ebx_1)[1] & 4) != 0)
005831f9      {
005831ff          int32_t* esi_107 = (var_20 - 0x14);
00583206          ebx_1 &= 0xfffffbff;
00583206          
00583218          if ((InterlockedDecrement(&esi_107[1]) == 0 && esi_107 != 0))
00583220              **(uint32_t**)esi_107(1);
005831f9      }
005831f9      
00583224      void* eax_159 = operator new(0x18);
00583232      class ClientCommunicationSystem::CmdHashData* eax_160;
00583232      
00583232      if (eax_159 == 0)
0058326e          eax_160 = nullptr;
00583232      else
00583232      {
00583249          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1838);
00583252          int32_t var_38_152 = 0;
00583253          uint8_t (__stdcall* var_3c_43)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpSay;
0058325d          ebx_1 |= 0x800;
00583263          eax_160 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_159, &var_20, ClientCommunicationSystem::DoSay, nullptr);
00583268          ebp_1 = var_24_1;
00583232      }
00583232      
00583273      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_160);
00583273      
0058327b      if ((*(uint8_t*)((char*)ebx_1)[1] & 8) != 0)
0058327b      {
00583281          int32_t* esi_109 = (var_20 - 0x14);
00583288          ebx_1 &= 0xfffff7ff;
00583288          
0058329a          if ((InterlockedDecrement(&esi_109[1]) == 0 && esi_109 != 0))
005832a2              **(uint32_t**)esi_109(1);
0058327b      }
0058327b      
005832a6      void* eax_162 = operator new(0x18);
005832b4      class ClientCommunicationSystem::CmdHashData* eax_163;
005832b4      
005832b4      if (eax_162 == 0)
005832f0          eax_163 = nullptr;
005832b4      else
005832b4      {
005832cb          PStringBase<char>::PStringBase<char>(&var_20, &data_794520);
005832d4          int32_t var_38_155 = 0;
005832d5          uint8_t (__stdcall* var_3c_44)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpSay;
005832df          ebx_1 |= 0x1000;
005832e5          eax_163 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_162, &var_20, ClientCommunicationSystem::DoSay, nullptr);
005832ea          ebp_1 = var_24_1;
005832b4      }
005832b4      
005832f5      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_163);
005832f5      
005832fd      if ((*(uint8_t*)((char*)ebx_1)[1] & 0x10) != 0)
005832fd      {
00583303          int32_t* esi_111 = (var_20 - 0x14);
0058330a          ebx_1 &= 0xffffefff;
0058330a          
0058331c          if ((InterlockedDecrement(&esi_111[1]) == 0 && esi_111 != 0))
00583324              **(uint32_t**)esi_111(1);
005832fd      }
005832fd      
00583328      void* eax_165 = operator new(0x18);
00583336      class ClientCommunicationSystem::CmdHashData* eax_166;
00583336      
00583336      if (eax_165 == 0)
00583372          eax_166 = nullptr;
00583336      else
00583336      {
0058334d          PStringBase<char>::PStringBase<char>(&var_20, "tell");
00583356          int32_t var_38_158 = 0;
00583357          uint8_t (__stdcall* var_3c_45)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpTell;
00583361          ebx_1 |= 0x2000;
00583367          eax_166 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_165, &var_20, ClientCommunicationSystem::DoTell, nullptr);
0058336c          ebp_1 = var_24_1;
00583336      }
00583336      
00583377      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_166);
00583377      
0058337f      if ((*(uint8_t*)((char*)ebx_1)[1] & 0x20) != 0)
0058337f      {
00583385          int32_t* esi_113 = (var_20 - 0x14);
0058338c          ebx_1 &= 0xffffdfff;
0058338c          
0058339e          if ((InterlockedDecrement(&esi_113[1]) == 0 && esi_113 != 0))
005833a6              **(uint32_t**)esi_113(1);
0058337f      }
0058337f      
005833aa      void* eax_168 = operator new(0x18);
005833b8      class ClientCommunicationSystem::CmdHashData* eax_169;
005833b8      
005833b8      if (eax_168 == 0)
005833f4          eax_169 = nullptr;
005833b8      else
005833b8      {
005833cf          PStringBase<char>::PStringBase<char>(&var_20, &data_7e182c);
005833d8          int32_t var_38_161 = 0;
005833d9          uint8_t (__stdcall* var_3c_46)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpTell;
005833e3          ebx_1 |= 0x4000;
005833e9          eax_169 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_168, &var_20, ClientCommunicationSystem::DoTell, nullptr);
005833ee          ebp_1 = var_24_1;
005833b8      }
005833b8      
005833f9      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_169);
005833f9      
00583401      if ((*(uint8_t*)((char*)ebx_1)[1] & 0x40) != 0)
00583401      {
00583407          int32_t* esi_115 = (var_20 - 0x14);
0058340e          ebx_1 &= 0xffffbfff;
0058340e          
00583420          if ((InterlockedDecrement(&esi_115[1]) == 0 && esi_115 != 0))
00583428              **(uint32_t**)esi_115(1);
00583401      }
00583401      
0058342c      void* eax_171 = operator new(0x18);
0058343a      class ClientCommunicationSystem::CmdHashData* eax_172;
0058343a      
0058343a      if (eax_171 == 0)
00583476          eax_172 = nullptr;
0058343a      else
0058343a      {
00583451          PStringBase<char>::PStringBase<char>(&var_20, "send");
0058345a          int32_t var_38_164 = 0;
0058345b          uint8_t (__stdcall* var_3c_47)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpTell;
00583465          ebx_1 |= 0x8000;
0058346b          eax_172 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_171, &var_20, ClientCommunicationSystem::DoTell, nullptr);
00583470          ebp_1 = var_24_1;
0058343a      }
0058343a      
0058347b      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_172);
0058347b      
00583482      if (*(uint8_t*)((char*)ebx_1)[1] < 0)
00583482      {
00583488          int32_t* esi_117 = (var_20 - 0x14);
0058348f          ebx_1 &= 0xffff7fff;
0058348f          
005834a1          if ((InterlockedDecrement(&esi_117[1]) == 0 && esi_117 != 0))
005834a9              **(uint32_t**)esi_117(1);
00583482      }
00583482      
005834ad      void* eax_174 = operator new(0x18);
005834bb      class ClientCommunicationSystem::CmdHashData* eax_175;
005834bb      
005834bb      if (eax_174 == 0)
005834f7          eax_175 = nullptr;
005834bb      else
005834bb      {
005834d2          PStringBase<char>::PStringBase<char>(&var_20, "whisper");
005834db          int32_t var_38_167 = 0;
005834dc          uint8_t (__stdcall* var_3c_48)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpTell;
005834e6          ebx_1 |= 0x10000;
005834ec          eax_175 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_174, &var_20, ClientCommunicationSystem::DoTell, nullptr);
005834f1          ebp_1 = var_24_1;
005834bb      }
005834bb      
005834fc      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_175);
005834fc      
00583507      if ((ebx_1 & 0x10000) != 0)
00583507      {
0058350d          int32_t* esi_119 = (var_20 - 0x14);
00583514          ebx_1 &= 0xfffeffff;
00583514          
00583526          if ((InterlockedDecrement(&esi_119[1]) == 0 && esi_119 != 0))
0058352e              **(uint32_t**)esi_119(1);
00583507      }
00583507      
00583532      void* eax_177 = operator new(0x18);
00583540      class ClientCommunicationSystem::CmdHashData* eax_178;
00583540      
00583540      if (eax_177 == 0)
0058357c          eax_178 = nullptr;
00583540      else
00583540      {
00583557          PStringBase<char>::PStringBase<char>(&var_20, &data_7945dc);
00583560          int32_t var_38_170 = 0;
00583561          uint8_t (__stdcall* var_3c_49)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpTell;
0058356b          ebx_1 |= 0x20000;
00583571          eax_178 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_177, &var_20, ClientCommunicationSystem::DoTell, nullptr);
00583576          ebp_1 = var_24_1;
00583540      }
00583540      
00583581      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_178);
00583581      
0058358c      if ((ebx_1 & 0x20000) != 0)
0058358c      {
00583592          int32_t* esi_121 = (var_20 - 0x14);
00583599          ebx_1 &= 0xfffdffff;
00583599          
005835ab          if ((InterlockedDecrement(&esi_121[1]) == 0 && esi_121 != 0))
005835b3              **(uint32_t**)esi_121(1);
0058358c      }
0058358c      
005835b7      void* eax_180 = operator new(0x18);
005835c5      class ClientCommunicationSystem::CmdHashData* eax_181;
005835c5      
005835c5      if (eax_180 == 0)
00583601          eax_181 = nullptr;
005835c5      else
005835c5      {
005835dc          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1818);
005835e5          int32_t var_38_173 = 0;
005835e6          uint8_t (__stdcall* var_3c_50)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpAFK;
005835f0          ebx_1 |= 0x40000;
005835f6          eax_181 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_180, &var_20, ClientCommunicationSystem::DoAFK, nullptr);
005835fb          ebp_1 = var_24_1;
005835c5      }
005835c5      
00583606      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_181);
00583606      
00583611      if ((ebx_1 & 0x40000) != 0)
00583611      {
00583617          int32_t* esi_123 = (var_20 - 0x14);
0058361e          ebx_1 &= 0xfffbffff;
0058361e          
00583630          if ((InterlockedDecrement(&esi_123[1]) == 0 && esi_123 != 0))
00583638              **(uint32_t**)esi_123(1);
00583611      }
00583611      
0058363c      void* eax_183 = operator new(0x18);
0058364a      class ClientCommunicationSystem::CmdHashData* eax_184;
0058364a      
0058364a      if (eax_183 == 0)
00583683          eax_184 = nullptr;
0058364a      else
0058364a      {
0058365e          PStringBase<char>::PStringBase<char>(&var_20, "death");
00583667          int32_t var_38_176 = 0;
00583668          uint8_t (__thiscall* var_3c_51)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpDeathGroup;
00583672          ebx_1 |= 0x80000;
00583678          eax_184 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_183, &var_20, nullptr, nullptr);
0058367d          ebp_1 = var_24_1;
0058364a      }
0058364a      
00583688      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_184);
00583688      
00583693      if ((ebx_1 & 0x80000) != 0)
00583693      {
00583699          int32_t* esi_125 = (var_20 - 0x14);
005836a0          ebx_1 &= 0xfff7ffff;
005836a0          
005836b2          if ((InterlockedDecrement(&esi_125[1]) == 0 && esi_125 != 0))
005836ba              **(uint32_t**)esi_125(1);
00583693      }
00583693      
005836be      void* eax_186 = operator new(0x18);
005836cc      class ClientCommunicationSystem::CmdHashData* eax_187;
005836cc      
005836cc      if (eax_186 == 0)
00583708          eax_187 = nullptr;
005836cc      else
005836cc      {
005836e3          PStringBase<char>::PStringBase<char>(&var_20, "consent");
005836ec          int32_t var_38_179 = 0;
005836ed          uint8_t (__stdcall* var_3c_52)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpConsent;
005836f7          ebx_1 |= 0x100000;
005836fd          eax_187 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_186, &var_20, ClientCommunicationSystem::DoConsent, nullptr);
00583702          ebp_1 = var_24_1;
005836cc      }
005836cc      
0058370d      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_187);
0058370d      
00583718      if ((ebx_1 & 0x100000) != 0)
00583718      {
0058371e          int32_t* esi_127 = (var_20 - 0x14);
00583725          ebx_1 &= 0xffefffff;
00583725          
00583737          if ((InterlockedDecrement(&esi_127[1]) == 0 && esi_127 != 0))
0058373f              **(uint32_t**)esi_127(1);
00583718      }
00583718      
00583743      void* eax_189 = operator new(0x18);
00583751      class ClientCommunicationSystem::CmdHashData* eax_190;
00583751      
00583751      if (eax_189 == 0)
0058378d          eax_190 = nullptr;
00583751      else
00583751      {
00583768          PStringBase<char>::PStringBase<char>(&var_20, "corpse");
00583771          int32_t var_38_182 = 0;
00583772          uint8_t (__stdcall* var_3c_53)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpCorpse;
0058377c          ebx_1 |= 0x200000;
00583782          eax_190 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_189, &var_20, ClientCommunicationSystem::DoCorpse, nullptr);
00583787          ebp_1 = var_24_1;
00583751      }
00583751      
00583792      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_190);
00583792      
0058379d      if ((ebx_1 & 0x200000) != 0)
0058379d      {
005837a3          int32_t* esi_129 = (var_20 - 0x14);
005837aa          ebx_1 &= 0xffdfffff;
005837aa          
005837bc          if ((InterlockedDecrement(&esi_129[1]) == 0 && esi_129 != 0))
005837c4              **(uint32_t**)esi_129(1);
0058379d      }
0058379d      
005837c8      void* eax_192 = operator new(0x18);
005837d6      class ClientCommunicationSystem::CmdHashData* eax_193;
005837d6      
005837d6      if (eax_192 == 0)
00583812          eax_193 = nullptr;
005837d6      else
005837d6      {
005837ed          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17fc);
005837f6          int32_t var_38_185 = 0;
005837f7          uint8_t (__stdcall* var_3c_54)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpCorpse;
00583801          ebx_1 |= 0x400000;
00583807          eax_193 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_192, &var_20, ClientCommunicationSystem::DoCorpse, nullptr);
0058380c          ebp_1 = var_24_1;
005837d6      }
005837d6      
00583817      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_193);
00583817      
00583822      if ((ebx_1 & 0x400000) != 0)
00583822      {
00583828          int32_t* esi_131 = (var_20 - 0x14);
0058382f          ebx_1 &= 0xffbfffff;
0058382f          
00583841          if ((InterlockedDecrement(&esi_131[1]) == 0 && esi_131 != 0))
00583849              **(uint32_t**)esi_131(1);
00583822      }
00583822      
0058384d      void* eax_195 = operator new(0x18);
0058385b      class ClientCommunicationSystem::CmdHashData* eax_196;
0058385b      
0058385b      if (eax_195 == 0)
00583897          eax_196 = nullptr;
0058385b      else
0058385b      {
00583872          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17f8);
0058387b          int32_t var_38_188 = 0;
0058387c          uint8_t (__stdcall* var_3c_55)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpDie;
00583886          ebx_1 |= "activation type (%s) with '%s' b…";
0058388c          eax_196 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_195, &var_20, ClientCommunicationSystem::DoDie, nullptr);
00583891          ebp_1 = var_24_1;
0058385b      }
0058385b      
0058389c      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_196);
0058389c      
005838a7      if ((ebx_1 & "activation type (%s) with '%s' b…") != 0)
005838a7      {
005838ad          int32_t* esi_133 = (var_20 - 0x14);
005838b4          ebx_1 &= 0xff7fffff;
005838b4          
005838c6          if ((InterlockedDecrement(&esi_133[1]) == 0 && esi_133 != 0))
005838ce              **(uint32_t**)esi_133(1);
005838a7      }
005838a7      
005838d2      void* eax_198 = operator new(0x18);
005838e0      class ClientCommunicationSystem::CmdHashData* eax_199;
005838e0      
005838e0      if (eax_198 == 0)
0058391c          eax_199 = nullptr;
005838e0      else
005838e0      {
005838f7          PStringBase<char>::PStringBase<char>(&var_20, "lifestone");
00583900          int32_t var_38_191 = 0;
00583901          uint8_t (__thiscall* var_3c_56)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLifestone;
0058390b          ebx_1 |= 0x1000000;
00583911          eax_199 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_198, &var_20, ClientCommunicationSystem::DoLifestone, nullptr);
00583916          ebp_1 = var_24_1;
005838e0      }
005838e0      
00583921      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_199);
00583921      
0058392c      if ((ebx_1 & 0x1000000) != 0)
0058392c      {
00583932          int32_t* esi_135 = (var_20 - 0x14);
00583939          ebx_1 &= 0xfeffffff;
00583939          
0058394b          if ((InterlockedDecrement(&esi_135[1]) == 0 && esi_135 != 0))
00583953              **(uint32_t**)esi_135(1);
0058392c      }
0058392c      
00583957      void* eax_201 = operator new(0x18);
00583965      class ClientCommunicationSystem::CmdHashData* eax_202;
00583965      
00583965      if (eax_201 == 0)
005839a1          eax_202 = nullptr;
00583965      else
00583965      {
0058397c          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17e8);
00583985          int32_t var_38_194 = 0;
00583986          uint8_t (__thiscall* var_3c_57)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLifestone;
00583990          ebx_1 |= 0x2000000;
00583996          eax_202 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_201, &var_20, ClientCommunicationSystem::DoLifestone, nullptr);
0058399b          ebp_1 = var_24_1;
00583965      }
00583965      
005839a6      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_202);
005839a6      
005839b1      if ((ebx_1 & 0x2000000) != 0)
005839b1      {
005839b7          int32_t* esi_137 = (var_20 - 0x14);
005839be          ebx_1 &= 0xfdffffff;
005839be          
005839d0          if ((InterlockedDecrement(&esi_137[1]) == 0 && esi_137 != 0))
005839d8              **(uint32_t**)esi_137(1);
005839b1      }
005839b1      
005839dc      void* eax_204 = operator new(0x18);
005839ea      class ClientCommunicationSystem::CmdHashData* eax_205;
005839ea      
005839ea      if (eax_204 == 0)
00583a26          eax_205 = nullptr;
005839ea      else
005839ea      {
00583a01          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17e4);
00583a0a          int32_t var_38_197 = 0;
00583a0b          uint8_t (__thiscall* var_3c_58)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLifestone;
00583a15          ebx_1 |= 0x4000000;
00583a1b          eax_205 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_204, &var_20, ClientCommunicationSystem::DoLifestone, nullptr);
00583a20          ebp_1 = var_24_1;
005839ea      }
005839ea      
00583a2b      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_205);
00583a2b      
00583a36      if ((ebx_1 & 0x4000000) != 0)
00583a36      {
00583a3c          int32_t* esi_139 = (var_20 - 0x14);
00583a43          ebx_1 &= 0xfbffffff;
00583a43          
00583a55          if ((InterlockedDecrement(&esi_139[1]) == 0 && esi_139 != 0))
00583a5d              **(uint32_t**)esi_139(1);
00583a36      }
00583a36      
00583a61      void* eax_207 = operator new(0x18);
00583a6f      class ClientCommunicationSystem::CmdHashData* eax_208;
00583a6f      
00583a6f      if (eax_207 == 0)
00583aab          eax_208 = nullptr;
00583a6f      else
00583a6f      {
00583a86          PStringBase<char>::PStringBase<char>(&var_20, "marketplace");
00583a8f          int32_t var_38_200 = 0;
00583a90          uint8_t (__thiscall* var_3c_59)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpMarketplace;
00583a9a          ebx_1 |= 0x8000000;
00583aa0          eax_208 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_207, &var_20, ClientCommunicationSystem::DoMarketplace, nullptr);
00583aa5          ebp_1 = var_24_1;
00583a6f      }
00583a6f      
00583ab0      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_208);
00583ab0      
00583abb      if ((ebx_1 & 0x8000000) != 0)
00583abb      {
00583ac1          int32_t* esi_141 = (var_20 - 0x14);
00583ac8          ebx_1 &= 0xf7ffffff;
00583ac8          
00583ada          if ((InterlockedDecrement(&esi_141[1]) == 0 && esi_141 != 0))
00583ae2              **(uint32_t**)esi_141(1);
00583abb      }
00583abb      
00583ae6      void* eax_210 = operator new(0x18);
00583af4      class ClientCommunicationSystem::CmdHashData* eax_211;
00583af4      
00583af4      if (eax_210 == 0)
00583b30          eax_211 = nullptr;
00583af4      else
00583af4      {
00583b0b          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17d4);
00583b14          int32_t var_38_203 = 0;
00583b15          uint8_t (__thiscall* var_3c_60)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpMarketplace;
00583b1f          ebx_1 |= 0x10000000;
00583b25          eax_211 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_210, &var_20, ClientCommunicationSystem::DoMarketplace, nullptr);
00583b2a          ebp_1 = var_24_1;
00583af4      }
00583af4      
00583b35      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_211);
00583b35      
00583b40      if ((ebx_1 & 0x10000000) != 0)
00583b40      {
00583b46          int32_t* esi_143 = (var_20 - 0x14);
00583b4d          ebx_1 &= 0xefffffff;
00583b4d          
00583b5f          if ((InterlockedDecrement(&esi_143[1]) == 0 && esi_143 != 0))
00583b67              **(uint32_t**)esi_143(1);
00583b40      }
00583b40      
00583b6b      void* eax_213 = operator new(0x18);
00583b79      class ClientCommunicationSystem::CmdHashData* eax_214;
00583b79      
00583b79      if (eax_213 == 0)
00583bb5          eax_214 = nullptr;
00583b79      else
00583b79      {
00583b90          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17d0);
00583b99          int32_t var_38_206 = 0;
00583b9a          uint8_t (__thiscall* var_3c_61)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpMarketplace;
00583ba4          ebx_1 |= 0x20000000;
00583baa          eax_214 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_213, &var_20, ClientCommunicationSystem::DoMarketplace, nullptr);
00583baf          ebp_1 = var_24_1;
00583b79      }
00583b79      
00583bba      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_214);
00583bba      
00583bc5      if ((ebx_1 & 0x20000000) != 0)
00583bc5      {
00583bcb          int32_t* esi_145 = (var_20 - 0x14);
00583bd2          ebx_1 &= 0xdfffffff;
00583bd2          
00583be4          if ((InterlockedDecrement(&esi_145[1]) == 0 && esi_145 != 0))
00583bec              **(uint32_t**)esi_145(1);
00583bc5      }
00583bc5      
00583bf0      void* eax_216 = operator new(0x18);
00583bfe      class ClientCommunicationSystem::CmdHashData* eax_217;
00583bfe      
00583bfe      if (eax_216 == 0)
00583c3a          eax_217 = nullptr;
00583bfe      else
00583bfe      {
00583c15          PStringBase<char>::PStringBase<char>(&var_20, "permit");
00583c1e          int32_t var_38_209 = 0;
00583c1f          uint8_t (__stdcall* var_3c_62)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpPermit;
00583c29          ebx_1 |= 0x40000000;
00583c2f          eax_217 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_216, &var_20, ClientCommunicationSystem::DoPermit, nullptr);
00583c34          ebp_1 = var_24_1;
00583bfe      }
00583bfe      
00583c3f      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_217);
00583c3f      
00583c4a      if ((ebx_1 & 0x40000000) != 0)
00583c4a      {
00583c50          int32_t* esi_147 = (var_20 - 0x14);
00583c57          ebx_1 &= 0xbfffffff;
00583c57          
00583c69          if ((InterlockedDecrement(&esi_147[1]) == 0 && esi_147 != 0))
00583c71              **(uint32_t**)esi_147(1);
00583c4a      }
00583c4a      
00583c75      void* eax_219 = operator new(0x18);
00583c83      class ClientCommunicationSystem::CmdHashData* eax_220;
00583c83      
00583c83      if (eax_219 == 0)
00583cbf          eax_220 = nullptr;
00583c83      else
00583c83      {
00583c9a          PStringBase<char>::PStringBase<char>(&var_20, "pkarena");
00583ca3          int32_t var_38_212 = 0;
00583ca4          uint8_t (__thiscall* var_3c_63)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpPKArena;
00583cae          ebx_1 |= 0x80000000;
00583cb4          eax_220 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_219, &var_20, ClientCommunicationSystem::DoPKArena, nullptr);
00583cb9          ebp_1 = var_24_1;
00583c83      }
00583c83      
00583cc4      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_220);
00583cc4      
00583ccb      if (ebx_1 < 0)
00583ccb      {
00583cd1          int32_t* esi_149 = (var_20 - 0x14);
00583cd1          
00583ce4          if ((InterlockedDecrement(&esi_149[1]) == 0 && esi_149 != 0))
00583cec              **(uint32_t**)esi_149(1);
00583ccb      }
00583ccb      
00583cf0      void* eax_222 = operator new(0x18);
00583cfe      class ClientCommunicationSystem::CmdHashData* eax_223;
00583cfe      int32_t ebx_2;
00583cfe      
00583cfe      if (eax_222 == 0)
00583cfe      {
00583d39          ebx_2 = var_c;
00583d3d          eax_223 = nullptr;
00583cfe      }
00583cfe      else
00583cfe      {
00583d15          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17bc);
00583d1e          int32_t var_38_215 = 0;
00583d1f          uint8_t (__thiscall* var_3c_64)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpPKArena;
00583d29          ebx_2 = 1;
00583d2e          eax_223 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_222, &var_20, ClientCommunicationSystem::DoPKArena, nullptr);
00583d33          ebp_1 = var_24_1;
00583cfe      }
00583cfe      
00583d42      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_223);
00583d42      
00583d4a      if ((ebx_2 & 1) != 0)
00583d4a      {
00583d50          int32_t* esi_151 = (var_20 - 0x14);
00583d57          ebx_2 &= 0xfffffffe;
00583d57          
00583d66          if ((InterlockedDecrement(&esi_151[1]) == 0 && esi_151 != 0))
00583d6e              **(uint32_t**)esi_151(1);
00583d4a      }
00583d4a      
00583d72      void* eax_225 = operator new(0x18);
00583d80      class ClientCommunicationSystem::CmdHashData* eax_226;
00583d80      
00583d80      if (eax_225 == 0)
00583db9          eax_226 = nullptr;
00583d80      else
00583d80      {
00583d97          PStringBase<char>::PStringBase<char>(&var_20, "pklarena");
00583da0          int32_t var_38_218 = 0;
00583da1          uint8_t (__thiscall* var_3c_65)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpPKLArena;
00583dab          ebx_2 |= 2;
00583dae          eax_226 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_225, &var_20, ClientCommunicationSystem::DoPKLArena, nullptr);
00583db3          ebp_1 = var_24_1;
00583d80      }
00583d80      
00583dbe      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_226);
00583dbe      
00583dc6      if ((ebx_2 & 2) != 0)
00583dc6      {
00583dcc          int32_t* esi_153 = (var_20 - 0x14);
00583dd3          ebx_2 &= 0xfffffffd;
00583dd3          
00583de2          if ((InterlockedDecrement(&esi_153[1]) == 0 && esi_153 != 0))
00583dea              **(uint32_t**)esi_153(1);
00583dc6      }
00583dc6      
00583dee      void* eax_228 = operator new(0x18);
00583dfc      class ClientCommunicationSystem::CmdHashData* eax_229;
00583dfc      
00583dfc      if (eax_228 == 0)
00583e35          eax_229 = nullptr;
00583dfc      else
00583dfc      {
00583e13          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17ac);
00583e1c          int32_t var_38_221 = 0;
00583e1d          uint8_t (__thiscall* var_3c_66)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpPKLArena;
00583e27          ebx_2 |= 4;
00583e2a          eax_229 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_228, &var_20, ClientCommunicationSystem::DoPKLArena, nullptr);
00583e2f          ebp_1 = var_24_1;
00583dfc      }
00583dfc      
00583e3a      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_229);
00583e3a      
00583e42      if ((ebx_2 & 4) != 0)
00583e42      {
00583e48          int32_t* esi_155 = (var_20 - 0x14);
00583e4f          ebx_2 &= 0xfffffffb;
00583e4f          
00583e5e          if ((InterlockedDecrement(&esi_155[1]) == 0 && esi_155 != 0))
00583e66              **(uint32_t**)esi_155(1);
00583e42      }
00583e42      
00583e6a      void* eax_231 = operator new(0x18);
00583e78      class ClientCommunicationSystem::CmdHashData* eax_232;
00583e78      
00583e78      if (eax_231 == 0)
00583eb1          eax_232 = nullptr;
00583e78      else
00583e78      {
00583e8f          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17a8);
00583e98          int32_t var_38_224 = 0;
00583e99          uint8_t (__stdcall* var_3c_67)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpEmote;
00583ea3          ebx_2 |= 8;
00583ea6          eax_232 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_231, &var_20, ClientCommunicationSystem::DoEmote, nullptr);
00583eab          ebp_1 = var_24_1;
00583e78      }
00583e78      
00583eb6      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_232);
00583eb6      
00583ebe      if ((ebx_2 & 8) != 0)
00583ebe      {
00583ec4          int32_t* esi_157 = (var_20 - 0x14);
00583ecb          ebx_2 &= 0xfffffff7;
00583ecb          
00583eda          if ((InterlockedDecrement(&esi_157[1]) == 0 && esi_157 != 0))
00583ee2              **(uint32_t**)esi_157(1);
00583ebe      }
00583ebe      
00583ee6      void* eax_234 = operator new(0x18);
00583ef4      class ClientCommunicationSystem::CmdHashData* eax_235;
00583ef4      
00583ef4      if (eax_234 == 0)
00583f2d          eax_235 = nullptr;
00583ef4      else
00583ef4      {
00583f0b          PStringBase<char>::PStringBase<char>(&var_20, &data_7e17a4);
00583f14          int32_t var_38_227 = 0;
00583f15          uint8_t (__stdcall* var_3c_68)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpEmote;
00583f1f          ebx_2 |= 0x10;
00583f22          eax_235 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_234, &var_20, ClientCommunicationSystem::DoEmote, nullptr);
00583f27          ebp_1 = var_24_1;
00583ef4      }
00583ef4      
00583f32      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_235);
00583f32      
00583f3a      if ((ebx_2 & 0x10) != 0)
00583f3a      {
00583f40          int32_t* esi_159 = (var_20 - 0x14);
00583f47          ebx_2 &= 0xffffffef;
00583f47          
00583f56          if ((InterlockedDecrement(&esi_159[1]) == 0 && esi_159 != 0))
00583f5e              **(uint32_t**)esi_159(1);
00583f3a      }
00583f3a      
00583f62      void* eax_237 = operator new(0x18);
00583f70      class ClientCommunicationSystem::CmdHashData* eax_238;
00583f70      
00583f70      if (eax_237 == 0)
00583fa9          eax_238 = nullptr;
00583f70      else
00583f70      {
00583f87          PStringBase<char>::PStringBase<char>(&var_20, "emote");
00583f90          int32_t var_38_230 = 0;
00583f91          uint8_t (__stdcall* var_3c_69)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpEmote;
00583f9b          ebx_2 |= 0x20;
00583f9e          eax_238 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_237, &var_20, ClientCommunicationSystem::DoEmote, nullptr);
00583fa3          ebp_1 = var_24_1;
00583f70      }
00583f70      
00583fae      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_238);
00583fae      
00583fb6      if ((ebx_2 & 0x20) != 0)
00583fb6      {
00583fbc          int32_t* esi_161 = (var_20 - 0x14);
00583fc3          ebx_2 &= 0xffffffdf;
00583fc3          
00583fd2          if ((InterlockedDecrement(&esi_161[1]) == 0 && esi_161 != 0))
00583fda              **(uint32_t**)esi_161(1);
00583fb6      }
00583fb6      
00583fde      void* eax_240 = operator new(0x18);
00583fec      class ClientCommunicationSystem::CmdHashData* eax_241;
00583fec      
00583fec      if (eax_240 == 0)
00584025          eax_241 = nullptr;
00583fec      else
00583fec      {
00584003          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1798);
0058400c          int32_t var_38_233 = 0;
0058400d          uint8_t (__stdcall* var_3c_70)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpEmote;
00584017          ebx_2 |= 0x40;
0058401a          eax_241 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_240, &var_20, ClientCommunicationSystem::DoEmote, nullptr);
0058401f          ebp_1 = var_24_1;
00583fec      }
00583fec      
0058402a      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_241);
0058402a      
00584032      if ((ebx_2 & 0x40) != 0)
00584032      {
00584038          int32_t* esi_163 = (var_20 - 0x14);
0058403f          ebx_2 &= 0xffffffbf;
0058403f          
0058404e          if ((InterlockedDecrement(&esi_163[1]) == 0 && esi_163 != 0))
00584056              **(uint32_t**)esi_163(1);
00584032      }
00584032      
0058405a      void* eax_243 = operator new(0x18);
00584068      class ClientCommunicationSystem::CmdHashData* eax_244;
00584068      
00584068      if (eax_243 == 0)
005840a4          eax_244 = nullptr;
00584068      else
00584068      {
0058407f          PStringBase<char>::PStringBase<char>(&var_20, "emotes");
00584088          int32_t var_38_236 = 0;
00584089          uint8_t (__thiscall* var_3c_71)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpEmoteList;
00584093          ebx_2 |= 0x80;
00584099          eax_244 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_243, &var_20, ClientCommunicationSystem::DoEmoteList, nullptr);
0058409e          ebp_1 = var_24_1;
00584068      }
00584068      
005840a9      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_244);
005840a9      
005840b0      if (ebx_2 < 0)
005840b0      {
005840b6          int32_t* esi_165 = (var_20 - 0x14);
005840bd          ebx_2 &= 0xffffff7f;
005840bd          
005840cf          if ((InterlockedDecrement(&esi_165[1]) == 0 && esi_165 != 0))
005840d7              **(uint32_t**)esi_165(1);
005840b0      }
005840b0      
005840db      void* eax_246 = operator new(0x18);
005840e9      class ClientCommunicationSystem::CmdHashData* eax_247;
005840e9      
005840e9      if (eax_246 == 0)
00584125          eax_247 = nullptr;
005840e9      else
005840e9      {
00584100          PStringBase<char>::PStringBase<char>(&var_20, "fillcomps");
00584109          int32_t var_38_239 = 0;
0058410a          uint8_t (__stdcall* var_3c_72)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpFillComponents;
00584114          ebx_2 |= 0x100;
0058411a          eax_247 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_246, &var_20, ClientCommunicationSystem::DoFillComponents, nullptr);
0058411f          ebp_1 = var_24_1;
005840e9      }
005840e9      
0058412a      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_247);
0058412a      
00584132      if ((*(uint8_t*)((char*)ebx_2)[1] & 1) != 0)
00584132      {
00584138          int32_t* esi_167 = (var_20 - 0x14);
0058413f          ebx_2 &= 0xfffffeff;
0058413f          
00584151          if ((InterlockedDecrement(&esi_167[1]) == 0 && esi_167 != 0))
00584159              **(uint32_t**)esi_167(1);
00584132      }
00584132      
0058415d      void* eax_249 = operator new(0x18);
0058416b      class ClientCommunicationSystem::CmdHashData* eax_250;
0058416b      
0058416b      if (eax_249 == 0)
005841a7          eax_250 = nullptr;
0058416b      else
0058416b      {
00584182          PStringBase<char>::PStringBase<char>(&var_20, "loadfile");
0058418b          int32_t var_38_242 = 0;
0058418c          uint8_t (__stdcall* var_3c_73)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLoadFile;
00584196          ebx_2 |= 0x200;
0058419c          eax_250 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_249, &var_20, ClientCommunicationSystem::DoLoadFile, nullptr);
005841a1          ebp_1 = var_24_1;
0058416b      }
0058416b      
005841ac      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_250);
005841ac      
005841b4      if ((*(uint8_t*)((char*)ebx_2)[1] & 2) != 0)
005841b4      {
005841ba          int32_t* esi_169 = (var_20 - 0x14);
005841c1          ebx_2 &= 0xfffffdff;
005841c1          
005841d3          if ((InterlockedDecrement(&esi_169[1]) == 0 && esi_169 != 0))
005841db              **(uint32_t**)esi_169(1);
005841b4      }
005841b4      
005841df      void* eax_252 = operator new(0x18);
005841ed      class ClientCommunicationSystem::CmdHashData* eax_253;
005841ed      
005841ed      if (eax_252 == 0)
00584229          eax_253 = nullptr;
005841ed      else
005841ed      {
00584204          PStringBase<char>::PStringBase<char>(&var_20, "friends");
0058420d          int32_t var_38_245 = 0;
0058420e          uint8_t (__stdcall* var_3c_74)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpFriends;
00584218          ebx_2 |= 0x400;
0058421e          eax_253 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_252, &var_20, ClientCommunicationSystem::DoFriends, nullptr);
00584223          ebp_1 = var_24_1;
005841ed      }
005841ed      
0058422e      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_253);
0058422e      
00584236      if ((*(uint8_t*)((char*)ebx_2)[1] & 4) != 0)
00584236      {
0058423c          int32_t* esi_171 = (var_20 - 0x14);
00584243          ebx_2 &= 0xfffffbff;
00584243          
00584255          if ((InterlockedDecrement(&esi_171[1]) == 0 && esi_171 != 0))
0058425d              **(uint32_t**)esi_171(1);
00584236      }
00584236      
00584261      void* eax_255 = operator new(0x18);
0058426f      class ClientCommunicationSystem::CmdHashData* eax_256;
0058426f      
0058426f      if (eax_255 == 0)
005842ab          eax_256 = nullptr;
0058426f      else
0058426f      {
00584286          PStringBase<char>::PStringBase<char>(&var_20, "friends_add");
0058428f          int32_t var_38_248 = 0;
00584290          uint8_t (__stdcall* var_3c_75)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpFriends;
0058429a          ebx_2 |= 0x800;
005842a0          eax_256 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_255, &var_20, ClientCommunicationSystem::DoFriendsAdd, nullptr);
005842a5          ebp_1 = var_24_1;
0058426f      }
0058426f      
005842b0      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_256);
005842b0      
005842b8      if ((*(uint8_t*)((char*)ebx_2)[1] & 8) != 0)
005842b8      {
005842be          int32_t* esi_173 = (var_20 - 0x14);
005842c5          ebx_2 &= 0xfffff7ff;
005842c5          
005842d7          if ((InterlockedDecrement(&esi_173[1]) == 0 && esi_173 != 0))
005842df              **(uint32_t**)esi_173(1);
005842b8      }
005842b8      
005842e3      void* eax_258 = operator new(0x18);
005842f1      class ClientCommunicationSystem::CmdHashData* eax_259;
005842f1      
005842f1      if (eax_258 == 0)
0058432d          eax_259 = nullptr;
005842f1      else
005842f1      {
00584308          PStringBase<char>::PStringBase<char>(&var_20, "friends_remove");
00584311          int32_t var_38_251 = 0;
00584312          uint8_t (__stdcall* var_3c_76)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpFriends;
0058431c          ebx_2 |= 0x1000;
00584322          eax_259 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_258, &var_20, ClientCommunicationSystem::DoFriendsRemove, nullptr);
00584327          ebp_1 = var_24_1;
005842f1      }
005842f1      
00584332      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_259);
00584332      
0058433a      if ((*(uint8_t*)((char*)ebx_2)[1] & 0x10) != 0)
0058433a      {
00584340          int32_t* esi_175 = (var_20 - 0x14);
00584347          ebx_2 &= 0xffffefff;
00584347          
00584359          if ((InterlockedDecrement(&esi_175[1]) == 0 && esi_175 != 0))
00584361              **(uint32_t**)esi_175(1);
0058433a      }
0058433a      
00584365      void* eax_261 = operator new(0x18);
00584373      class ClientCommunicationSystem::CmdHashData* eax_262;
00584373      
00584373      if (eax_261 == 0)
005843af          eax_262 = nullptr;
00584373      else
00584373      {
0058438a          PStringBase<char>::PStringBase<char>(&var_20, "house");
00584393          int32_t var_38_254 = 0;
00584394          uint8_t (__stdcall* var_3c_77)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpHouse;
0058439e          ebx_2 |= 0x2000;
005843a4          eax_262 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_261, &var_20, ClientCommunicationSystem::DoHouse, nullptr);
005843a9          ebp_1 = var_24_1;
00584373      }
00584373      
005843b4      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_262);
005843b4      
005843bc      if ((*(uint8_t*)((char*)ebx_2)[1] & 0x20) != 0)
005843bc      {
005843c2          int32_t* esi_177 = (var_20 - 0x14);
005843c9          ebx_2 &= 0xffffdfff;
005843c9          
005843db          if ((InterlockedDecrement(&esi_177[1]) == 0 && esi_177 != 0))
005843e3              **(uint32_t**)esi_177(1);
005843bc      }
005843bc      
005843e7      void* eax_264 = operator new(0x18);
005843f5      class ClientCommunicationSystem::CmdHashData* eax_265;
005843f5      
005843f5      if (eax_264 == 0)
00584431          eax_265 = nullptr;
005843f5      else
005843f5      {
0058440c          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1750);
00584415          int32_t var_38_257 = 0;
00584416          uint8_t (__stdcall* var_3c_78)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpHouse;
00584420          ebx_2 |= 0x4000;
00584426          eax_265 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_264, &var_20, ClientCommunicationSystem::DoHouse, nullptr);
0058442b          ebp_1 = var_24_1;
005843f5      }
005843f5      
00584436      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_265);
00584436      
0058443e      if ((*(uint8_t*)((char*)ebx_2)[1] & 0x40) != 0)
0058443e      {
00584444          int32_t* esi_179 = (var_20 - 0x14);
0058444b          ebx_2 &= 0xffffbfff;
0058444b          
0058445d          if ((InterlockedDecrement(&esi_179[1]) == 0 && esi_179 != 0))
00584465              **(uint32_t**)esi_179(1);
0058443e      }
0058443e      
00584469      void* eax_267 = operator new(0x18);
00584477      class ClientCommunicationSystem::CmdHashData* eax_268;
00584477      
00584477      if (eax_267 == 0)
005844b3          eax_268 = nullptr;
00584477      else
00584477      {
0058448e          PStringBase<char>::PStringBase<char>(&var_20, "hslist");
00584497          int32_t var_38_260 = 0;
00584498          uint8_t (__thiscall* var_3c_79)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpHouseAvailableList;
005844a2          ebx_2 |= 0x8000;
005844a8          eax_268 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_267, &var_20, ClientCommunicationSystem::DoHouseAvailableList, nullptr);
005844ad          ebp_1 = var_24_1;
00584477      }
00584477      
005844b8      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_268);
005844b8      
005844bf      if (*(uint8_t*)((char*)ebx_2)[1] < 0)
005844bf      {
005844c5          int32_t* esi_181 = (var_20 - 0x14);
005844cc          ebx_2 &= 0xffff7fff;
005844cc          
005844de          if ((InterlockedDecrement(&esi_181[1]) == 0 && esi_181 != 0))
005844e6              **(uint32_t**)esi_181(1);
005844bf      }
005844bf      
005844ea      void* eax_270 = operator new(0x18);
005844f8      class ClientCommunicationSystem::CmdHashData* eax_271;
005844f8      
005844f8      if (eax_270 == 0)
00584534          eax_271 = nullptr;
005844f8      else
005844f8      {
0058450f          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1744);
00584518          int32_t var_38_263 = 0;
00584519          uint8_t (__stdcall* var_3c_80)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpHouse;
00584523          ebx_2 |= 0x10000;
00584529          eax_271 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_270, &var_20, ClientCommunicationSystem::DoHouseRecall, nullptr);
0058452e          ebp_1 = var_24_1;
005844f8      }
005844f8      
00584539      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_271);
00584539      
00584544      if ((ebx_2 & 0x10000) != 0)
00584544      {
0058454a          int32_t* esi_183 = (var_20 - 0x14);
00584551          ebx_2 &= 0xfffeffff;
00584551          
00584563          if ((InterlockedDecrement(&esi_183[1]) == 0 && esi_183 != 0))
0058456b              **(uint32_t**)esi_183(1);
00584544      }
00584544      
0058456f      void* eax_273 = operator new(0x18);
0058457d      class ClientCommunicationSystem::CmdHashData* eax_274;
0058457d      
0058457d      if (eax_273 == 0)
005845b9          eax_274 = nullptr;
0058457d      else
0058457d      {
00584594          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1740);
0058459d          int32_t var_38_266 = 0;
0058459e          uint8_t (__stdcall* var_3c_81)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpHouse;
005845a8          ebx_2 |= 0x20000;
005845ae          eax_274 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_273, &var_20, ClientCommunicationSystem::DoHouseRecall, nullptr);
005845b3          ebp_1 = var_24_1;
0058457d      }
0058457d      
005845be      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_274);
005845be      
005845c9      if ((ebx_2 & 0x20000) != 0)
005845c9      {
005845cf          int32_t* esi_185 = (var_20 - 0x14);
005845d6          ebx_2 &= 0xfffdffff;
005845d6          
005845e8          if ((InterlockedDecrement(&esi_185[1]) == 0 && esi_185 != 0))
005845f0              **(uint32_t**)esi_185(1);
005845c9      }
005845c9      
005845f4      void* eax_276 = operator new(0x18);
00584602      class ClientCommunicationSystem::CmdHashData* eax_277;
00584602      
00584602      if (eax_276 == 0)
0058463e          eax_277 = nullptr;
00584602      else
00584602      {
00584619          PStringBase<char>::PStringBase<char>(&var_20, &data_7e173c);
00584622          int32_t var_38_269 = 0;
00584623          uint8_t (__stdcall* var_3c_82)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpHouse;
0058462d          ebx_2 |= 0x40000;
00584633          eax_277 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_276, &var_20, ClientCommunicationSystem::DoMansionRecall, nullptr);
00584638          ebp_1 = var_24_1;
00584602      }
00584602      
00584643      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_277);
00584643      
0058464e      if ((ebx_2 & 0x40000) != 0)
0058464e      {
00584654          int32_t* esi_187 = (var_20 - 0x14);
0058465b          ebx_2 &= 0xfffbffff;
0058465b          
0058466d          if ((InterlockedDecrement(&esi_187[1]) == 0 && esi_187 != 0))
00584675              **(uint32_t**)esi_187(1);
0058464e      }
0058464e      
00584679      void* eax_279 = operator new(0x18);
00584687      class ClientCommunicationSystem::CmdHashData* eax_280;
00584687      
00584687      if (eax_279 == 0)
005846c3          eax_280 = nullptr;
00584687      else
00584687      {
0058469e          PStringBase<char>::PStringBase<char>(&var_20, &data_7e1738);
005846a7          int32_t var_38_272 = 0;
005846a8          uint8_t (__stdcall* var_3c_83)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpHouse;
005846b2          ebx_2 |= 0x80000;
005846b8          eax_280 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_279, &var_20, ClientCommunicationSystem::DoMansionRecall, nullptr);
005846bd          ebp_1 = var_24_1;
00584687      }
00584687      
005846c8      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_280);
005846c8      
005846d3      if ((ebx_2 & 0x80000) != 0)
005846d3      {
005846d9          int32_t* esi_189 = (var_20 - 0x14);
005846e0          ebx_2 &= 0xfff7ffff;
005846e0          
005846f2          if ((InterlockedDecrement(&esi_189[1]) == 0 && esi_189 != 0))
005846fa              **(uint32_t**)esi_189(1);
005846d3      }
005846d3      
005846fe      void* eax_282 = operator new(0x18);
0058470c      class ClientCommunicationSystem::CmdHashData* eax_283;
0058470c      
0058470c      if (eax_282 == 0)
00584748          eax_283 = nullptr;
0058470c      else
0058470c      {
00584723          PStringBase<char>::PStringBase<char>(&var_20, "squelch");
0058472c          int32_t var_38_275 = 0;
0058472d          uint8_t (__thiscall* var_3c_84)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpSquelch;
00584737          ebx_2 |= 0x100000;
0058473d          eax_283 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_282, &var_20, ClientCommunicationSystem::DoSquelch, nullptr);
00584742          ebp_1 = var_24_1;
0058470c      }
0058470c      
0058474d      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_283);
0058474d      
00584758      if ((ebx_2 & 0x100000) != 0)
00584758      {
0058475e          int32_t* esi_191 = (var_20 - 0x14);
00584765          ebx_2 &= 0xffefffff;
00584765          
00584777          if ((InterlockedDecrement(&esi_191[1]) == 0 && esi_191 != 0))
0058477f              **(uint32_t**)esi_191(1);
00584758      }
00584758      
00584783      void* eax_285 = operator new(0x18);
00584791      class ClientCommunicationSystem::CmdHashData* eax_286;
00584791      
00584791      if (eax_285 == 0)
005847cd          eax_286 = nullptr;
00584791      else
00584791      {
005847a8          PStringBase<char>::PStringBase<char>(&var_20, "unsquelch");
005847b1          int32_t var_38_278 = 0;
005847b2          uint8_t (__thiscall* var_3c_85)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpSquelch;
005847bc          ebx_2 |= 0x200000;
005847c2          eax_286 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_285, &var_20, ClientCommunicationSystem::DoUnSquelch, nullptr);
005847c7          ebp_1 = var_24_1;
00584791      }
00584791      
005847d2      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_286);
005847d2      
005847dd      if ((ebx_2 & 0x200000) != 0)
005847dd      {
005847e3          int32_t* esi_193 = (var_20 - 0x14);
005847ea          ebx_2 &= 0xffdfffff;
005847ea          
005847fc          if ((InterlockedDecrement(&esi_193[1]) == 0 && esi_193 != 0))
00584804              **(uint32_t**)esi_193(1);
005847dd      }
005847dd      
00584808      void* eax_288 = operator new(0x18);
00584816      class ClientCommunicationSystem::CmdHashData* eax_289;
00584816      
00584816      if (eax_288 == 0)
00584852          eax_289 = nullptr;
00584816      else
00584816      {
0058482d          PStringBase<char>::PStringBase<char>(&var_20, "messagetypes");
00584836          int32_t var_38_281 = 0;
00584837          uint8_t (__stdcall* var_3c_86)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpMessageTypes;
00584841          ebx_2 |= 0x400000;
00584847          eax_289 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_288, &var_20, ClientCommunicationSystem::DoMessageTypes, nullptr);
0058484c          ebp_1 = var_24_1;
00584816      }
00584816      
00584857      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_289);
00584857      
00584862      if ((ebx_2 & 0x400000) != 0)
00584862      {
00584868          int32_t* esi_195 = (var_20 - 0x14);
0058486f          ebx_2 &= 0xffbfffff;
0058486f          
00584881          if ((InterlockedDecrement(&esi_195[1]) == 0 && esi_195 != 0))
00584889              **(uint32_t**)esi_195(1);
00584862      }
00584862      
0058488d      void* eax_291 = operator new(0x18);
0058489b      class ClientCommunicationSystem::CmdHashData* eax_292;
0058489b      
0058489b      if (eax_291 == 0)
005848d7          eax_292 = nullptr;
0058489b      else
0058489b      {
005848b2          PStringBase<char>::PStringBase<char>(&var_20, "message_types");
005848bb          int32_t var_38_284 = 0;
005848bc          uint8_t (__stdcall* var_3c_87)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpMessageTypes;
005848c6          ebx_2 |= "activation type (%s) with '%s' b…";
005848cc          eax_292 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_291, &var_20, ClientCommunicationSystem::DoMessageTypes, nullptr);
005848d1          ebp_1 = var_24_1;
0058489b      }
0058489b      
005848dc      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_292);
005848dc      
005848e7      if ((ebx_2 & "activation type (%s) with '%s' b…") != 0)
005848e7      {
005848ed          int32_t* esi_197 = (var_20 - 0x14);
005848f4          ebx_2 &= 0xff7fffff;
005848f4          
00584906          if ((InterlockedDecrement(&esi_197[1]) == 0 && esi_197 != 0))
0058490e              **(uint32_t**)esi_197(1);
005848e7      }
005848e7      
00584912      void* eax_294 = operator new(0x18);
00584920      class ClientCommunicationSystem::CmdHashData* eax_295;
00584920      
00584920      if (eax_294 == 0)
0058495c          eax_295 = nullptr;
00584920      else
00584920      {
00584937          PStringBase<char>::PStringBase<char>(&var_20, "msgtypes");
00584940          int32_t var_38_287 = 0;
00584941          uint8_t (__stdcall* var_3c_88)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpMessageTypes;
0058494b          ebx_2 |= 0x1000000;
00584951          eax_295 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_294, &var_20, ClientCommunicationSystem::DoMessageTypes, nullptr);
00584956          ebp_1 = var_24_1;
00584920      }
00584920      
00584961      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_295);
00584961      
0058496c      if ((ebx_2 & 0x1000000) != 0)
0058496c      {
00584972          int32_t* esi_199 = (var_20 - 0x14);
00584979          ebx_2 &= 0xfeffffff;
00584979          
0058498b          if ((InterlockedDecrement(&esi_199[1]) == 0 && esi_199 != 0))
00584993              **(uint32_t**)esi_199(1);
0058496c      }
0058496c      
00584997      void* eax_297 = operator new(0x18);
005849a5      class ClientCommunicationSystem::CmdHashData* eax_298;
005849a5      
005849a5      if (eax_297 == 0)
005849e1          eax_298 = nullptr;
005849a5      else
005849a5      {
005849bc          PStringBase<char>::PStringBase<char>(&var_20, "msg_types");
005849c5          int32_t var_38_290 = 0;
005849c6          uint8_t (__stdcall* var_3c_89)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpMessageTypes;
005849d0          ebx_2 |= 0x2000000;
005849d6          eax_298 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_297, &var_20, ClientCommunicationSystem::DoMessageTypes, nullptr);
005849db          ebp_1 = var_24_1;
005849a5      }
005849a5      
005849e6      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_298);
005849e6      
005849f1      if ((ebx_2 & 0x2000000) != 0)
005849f1      {
005849f7          int32_t* esi_201 = (var_20 - 0x14);
005849fe          ebx_2 &= 0xfdffffff;
005849fe          
00584a10          if ((InterlockedDecrement(&esi_201[1]) == 0 && esi_201 != 0))
00584a18              **(uint32_t**)esi_201(1);
005849f1      }
005849f1      
00584a1c      void* eax_300 = operator new(0x18);
00584a2a      class ClientCommunicationSystem::CmdHashData* eax_301;
00584a2a      
00584a2a      if (eax_300 == 0)
00584a63          eax_301 = nullptr;
00584a2a      else
00584a2a      {
00584a3e          PStringBase<char>::PStringBase<char>(&var_20, "status");
00584a47          int32_t var_38_293 = 0;
00584a48          uint8_t (__thiscall* var_3c_90)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpStatusGroup;
00584a52          ebx_2 |= 0x4000000;
00584a58          eax_301 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_300, &var_20, nullptr, nullptr);
00584a5d          ebp_1 = var_24_1;
00584a2a      }
00584a2a      
00584a68      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_301);
00584a68      
00584a73      if ((ebx_2 & 0x4000000) != 0)
00584a73      {
00584a79          int32_t* esi_203 = (var_20 - 0x14);
00584a80          ebx_2 &= 0xfbffffff;
00584a80          
00584a92          if ((InterlockedDecrement(&esi_203[1]) == 0 && esi_203 != 0))
00584a9a              **(uint32_t**)esi_203(1);
00584a73      }
00584a73      
00584a9e      void* eax_303 = operator new(0x18);
00584aac      class ClientCommunicationSystem::CmdHashData* eax_304;
00584aac      
00584aac      if (eax_303 == 0)
00584ae8          eax_304 = nullptr;
00584aac      else
00584aac      {
00584ac3          PStringBase<char>::PStringBase<char>(&var_20, &data_7e16e0);
00584acc          int32_t var_38_296 = 0;
00584acd          uint8_t (__thiscall* var_3c_91)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpAge;
00584ad7          ebx_2 |= 0x8000000;
00584add          eax_304 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_303, &var_20, ClientCommunicationSystem::DoAge, nullptr);
00584ae2          ebp_1 = var_24_1;
00584aac      }
00584aac      
00584aed      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_304);
00584aed      
00584af8      if ((ebx_2 & 0x8000000) != 0)
00584af8      {
00584b01          ebx_2 &= 0xf7ffffff;
00584b07          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584af8      }
00584af8      
00584b0e      void* eax_305 = operator new(0x18);
00584b1c      class ClientCommunicationSystem::CmdHashData* eax_306;
00584b1c      
00584b1c      if (eax_305 == 0)
00584b58          eax_306 = nullptr;
00584b1c      else
00584b1c      {
00584b33          PStringBase<char>::PStringBase<char>(&var_20, "birth");
00584b38          int32_t var_38_298 = 0;
00584b39          uint8_t (__thiscall* var_3c_92)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpBirth;
00584b47          ebx_2 |= 0x10000000;
00584b4d          eax_306 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_305, &var_20, ClientCommunicationSystem::DoBirth, nullptr);
00584b52          ebp_1 = var_24_1;
00584b1c      }
00584b1c      
00584b5d      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_306);
00584b5d      
00584b68      if ((ebx_2 & 0x10000000) != 0)
00584b68      {
00584b71          ebx_2 &= 0xefffffff;
00584b77          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584b68      }
00584b68      
00584b7e      void* eax_307 = operator new(0x18);
00584b8c      class ClientCommunicationSystem::CmdHashData* eax_308;
00584b8c      
00584b8c      if (eax_307 == 0)
00584bc8          eax_308 = nullptr;
00584b8c      else
00584b8c      {
00584ba3          PStringBase<char>::PStringBase<char>(&var_20, &data_7e16d4);
00584bac          int32_t var_38_300 = 0;
00584bad          uint8_t (__thiscall* var_3c_93)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpDay;
00584bb7          ebx_2 |= 0x20000000;
00584bbd          eax_308 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_307, &var_20, ClientCommunicationSystem::DoDay, nullptr);
00584bc2          ebp_1 = var_24_1;
00584b8c      }
00584b8c      
00584bcd      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_308);
00584bcd      
00584bd8      if ((ebx_2 & 0x20000000) != 0)
00584bd8      {
00584be1          ebx_2 &= 0xdfffffff;
00584be7          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584bd8      }
00584bd8      
00584bee      void* eax_309 = operator new(0x18);
00584bfc      class ClientCommunicationSystem::CmdHashData* eax_310;
00584bfc      
00584bfc      if (eax_309 == 0)
00584c38          eax_310 = nullptr;
00584bfc      else
00584bfc      {
00584c13          PStringBase<char>::PStringBase<char>(&var_20, "endurance");
00584c1c          int32_t var_38_302 = 0;
00584c1d          uint8_t (__stdcall* var_3c_94)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpEndurance;
00584c27          ebx_2 |= 0x40000000;
00584c2d          eax_310 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_309, &var_20, ClientCommunicationSystem::DoEndurance, nullptr);
00584c32          ebp_1 = var_24_1;
00584bfc      }
00584bfc      
00584c3d      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_310);
00584c3d      
00584c48      if ((ebx_2 & 0x40000000) != 0)
00584c48      {
00584c51          ebx_2 &= 0xbfffffff;
00584c57          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584c48      }
00584c48      
00584c5e      void* eax_311 = operator new(0x18);
00584c6c      class ClientCommunicationSystem::CmdHashData* eax_312;
00584c6c      
00584c6c      if (eax_311 == 0)
00584ca8          eax_312 = nullptr;
00584c6c      else
00584c6c      {
00584c83          PStringBase<char>::PStringBase<char>(&var_20, "framerate");
00584c88          int32_t var_38_304 = 0;
00584c89          uint8_t (__thiscall* var_3c_95)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpFrameRate;
00584c97          ebx_2 |= 0x80000000;
00584c9d          eax_312 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_311, &var_20, ClientCommunicationSystem::DoFrameRate, nullptr);
00584ca2          ebp_1 = var_24_1;
00584c6c      }
00584c6c      
00584cad      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_312);
00584cad      
00584cb4      if (ebx_2 < 0)
00584cbd          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584cbd      
00584cc4      void* eax_313 = operator new(0x18);
00584cd2      class ClientCommunicationSystem::CmdHashData* eax_314;
00584cd2      int32_t ebx_3;
00584cd2      
00584cd2      if (eax_313 == 0)
00584cd2      {
00584d0d          ebx_3 = var_4_1;
00584d11          eax_314 = nullptr;
00584cd2      }
00584cd2      else
00584cd2      {
00584ce9          PStringBase<char>::PStringBase<char>(&var_20, &data_7e16b8);
00584cf2          int32_t var_38_306 = 0;
00584cf3          uint8_t (__stdcall* var_3c_96)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLoc;
00584cfd          ebx_3 = 1;
00584d02          eax_314 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_313, &var_20, ClientCommunicationSystem::DoLoc, nullptr);
00584d07          ebp_1 = var_24_1;
00584cd2      }
00584cd2      
00584d16      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_314);
00584d16      
00584d1e      if ((ebx_3 & 1) != 0)
00584d1e      {
00584d27          ebx_3 &= 0xfffffffe;
00584d2a          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584d1e      }
00584d1e      
00584d31      void* eax_315 = operator new(0x18);
00584d3f      class ClientCommunicationSystem::CmdHashData* eax_316;
00584d3f      
00584d3f      if (eax_315 == 0)
00584d78          eax_316 = nullptr;
00584d3f      else
00584d3f      {
00584d56          PStringBase<char>::PStringBase<char>(&var_20, "pklite");
00584d5f          int32_t var_38_308 = 0;
00584d60          uint8_t (__stdcall* var_3c_97)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpPKLite;
00584d6a          ebx_3 |= 2;
00584d6d          eax_316 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_315, &var_20, ClientCommunicationSystem::DoPKLite, nullptr);
00584d72          ebp_1 = var_24_1;
00584d3f      }
00584d3f      
00584d7d      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_316);
00584d7d      
00584d85      if ((ebx_3 & 2) != 0)
00584d85      {
00584d8e          ebx_3 &= 0xfffffffd;
00584d91          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584d85      }
00584d85      
00584d98      void* eax_317 = operator new(0x18);
00584da6      class ClientCommunicationSystem::CmdHashData* eax_318;
00584da6      
00584da6      if (eax_317 == 0)
00584ddf          eax_318 = nullptr;
00584da6      else
00584da6      {
00584dbd          PStringBase<char>::PStringBase<char>(&var_20, &data_7e16ac);
00584dc2          int32_t var_38_310 = 0;
00584dc3          uint8_t (__stdcall* var_3c_98)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpPKLite;
00584dd1          ebx_3 |= 4;
00584dd4          eax_318 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_317, &var_20, ClientCommunicationSystem::DoPKLite, nullptr);
00584dd9          ebp_1 = var_24_1;
00584da6      }
00584da6      
00584de4      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_318);
00584de4      
00584dec      if ((ebx_3 & 4) != 0)
00584dec      {
00584df5          ebx_3 &= 0xfffffffb;
00584df8          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584dec      }
00584dec      
00584dff      void* eax_319 = operator new(0x18);
00584e0d      class ClientCommunicationSystem::CmdHashData* eax_320;
00584e0d      
00584e0d      if (eax_319 == 0)
00584e43          eax_320 = nullptr;
00584e0d      else
00584e0d      {
00584e21          PStringBase<char>::PStringBase<char>(&var_20, "render");
00584e2a          int32_t var_38_312 = 0;
00584e2b          int32_t var_3c_99 = 0;
00584e35          ebx_3 |= 8;
00584e38          eax_320 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_319, &var_20, ClientCommunicationSystem::DoRenderOption, nullptr);
00584e3d          ebp_1 = var_24_1;
00584e0d      }
00584e0d      
00584e48      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_320);
00584e48      
00584e50      if ((ebx_3 & 8) != 0)
00584e50      {
00584e59          ebx_3 &= 0xfffffff7;
00584e5c          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584e50      }
00584e50      
00584e63      void* eax_321 = operator new(0x18);
00584e71      class ClientCommunicationSystem::CmdHashData* eax_322;
00584e71      
00584e71      if (eax_321 == 0)
00584eaa          eax_322 = nullptr;
00584e71      else
00584e71      {
00584e88          PStringBase<char>::PStringBase<char>(&var_20, "version");
00584e91          int32_t var_38_314 = 0;
00584e92          uint8_t (__thiscall* var_3c_100)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpVersion;
00584e9c          ebx_3 |= 0x10;
00584e9f          eax_322 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_321, &var_20, ClientCommunicationSystem::DoVersion, nullptr);
00584ea4          ebp_1 = var_24_1;
00584e71      }
00584e71      
00584eaf      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_322);
00584eaf      
00584eb7      if ((ebx_3 & 0x10) != 0)
00584eb7      {
00584ec0          ebx_3 &= 0xffffffef;
00584ec3          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584eb7      }
00584eb7      
00584eca      void* eax_323 = operator new(0x18);
00584ed8      class ClientCommunicationSystem::CmdHashData* eax_324;
00584ed8      
00584ed8      if (eax_323 == 0)
00584f11          eax_324 = nullptr;
00584ed8      else
00584ed8      {
00584eef          PStringBase<char>::PStringBase<char>(&var_20, "saveui");
00584ef4          int32_t var_38_316 = 0;
00584ef5          uint8_t (__stdcall* var_3c_101)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpSaveUI;
00584f03          ebx_3 |= 0x20;
00584f06          eax_324 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_323, &var_20, ClientCommunicationSystem::DoSaveUI, nullptr);
00584f0b          ebp_1 = var_24_1;
00584ed8      }
00584ed8      
00584f16      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_324);
00584f16      
00584f1e      if ((ebx_3 & 0x20) != 0)
00584f1e      {
00584f27          ebx_3 &= 0xffffffdf;
00584f2a          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584f1e      }
00584f1e      
00584f31      class ClientCommunicationSystem::CmdHashData* eax_325 = operator new(0x18);
00584f3f      class ClientCommunicationSystem::CmdHashData* eax_326;
00584f3f      
00584f3f      if (eax_325 == 0)
00584f78          eax_326 = nullptr;
00584f3f      else
00584f3f      {
00584f56          PStringBase<char>::PStringBase<char>(&var_20, "loadui");
00584f5f          int32_t var_38_318 = 0;
00584f60          uint8_t (__stdcall* var_3c_102)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLoadUI;
00584f6a          ebx_3 |= 0x40;
00584f6d          eax_326 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_325, &var_20, ClientCommunicationSystem::DoLoadUI, nullptr);
00584f72          ebp_1 = var_24_1;
00584f3f      }
00584f3f      
00584f7d      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_326);
00584f7d      
00584f85      if ((ebx_3 & 0x40) != 0)
00584f85      {
00584f8e          ebx_3 &= 0xffffffbf;
00584f91          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584f85      }
00584f85      
00584f98      class ClientCommunicationSystem::CmdHashData* eax_327 = operator new(0x18);
00584fa6      class ClientCommunicationSystem::CmdHashData* eax_328;
00584fa6      
00584fa6      if (eax_327 == 0)
00584fe2          eax_328 = nullptr;
00584fa6      else
00584fa6      {
00584fbd          PStringBase<char>::PStringBase<char>(&var_20, "saveautoui");
00584fc6          int32_t var_38_320 = 0;
00584fc7          uint8_t (__stdcall* var_3c_103)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpSaveAutoUI;
00584fd1          ebx_3 |= 0x80;
00584fd7          eax_328 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_327, &var_20, ClientCommunicationSystem::DoSaveAutoUI, nullptr);
00584fdc          ebp_1 = var_24_1;
00584fa6      }
00584fa6      
00584fe7      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_328);
00584fe7      
00584fee      if (ebx_3 < 0)
00584fee      {
00584ff7          ebx_3 &= 0xffffff7f;
00584ffd          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00584fee      }
00584fee      
00585004      class ClientCommunicationSystem::CmdHashData* eax_329 = operator new(0x18);
00585012      class ClientCommunicationSystem::CmdHashData* eax_330;
00585012      
00585012      if (eax_329 == 0)
0058504e          eax_330 = nullptr;
00585012      else
00585012      {
00585029          PStringBase<char>::PStringBase<char>(&var_20, "loadautoui");
0058502e          int32_t var_38_322 = 0;
0058502f          uint8_t (__stdcall* var_3c_104)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLoadAutoUI;
0058503d          ebx_3 |= 0x100;
00585043          eax_330 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_329, &var_20, ClientCommunicationSystem::DoLoadAutoUI, nullptr);
00585048          ebp_1 = var_24_1;
00585012      }
00585012      
00585053      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_330);
00585053      
0058505b      if ((*(uint8_t*)((char*)ebx_3)[1] & 1) != 0)
0058505b      {
00585064          ebx_3 &= 0xfffffeff;
0058506a          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
0058505b      }
0058505b      
00585071      class ClientCommunicationSystem::CmdHashData* eax_331 = operator new(0x18);
0058507f      class ClientCommunicationSystem::CmdHashData* eax_332;
0058507f      
0058507f      if (eax_331 == 0)
005850bb          eax_332 = nullptr;
0058507f      else
0058507f      {
00585096          PStringBase<char>::PStringBase<char>(&var_20, "lockui");
0058509f          int32_t var_38_324 = 0;
005850a0          uint8_t (__stdcall* var_3c_105)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpLockUI;
005850aa          ebx_3 |= 0x200;
005850b0          eax_332 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_331, &var_20, ClientCommunicationSystem::DoLockUI, nullptr);
005850b5          ebp_1 = var_24_1;
0058507f      }
0058507f      
005850c0      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_332);
005850c0      
005850c8      if ((*(uint8_t*)((char*)ebx_3)[1] & 2) != 0)
005850c8      {
005850d1          ebx_3 &= 0xfffffdff;
005850d7          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
005850c8      }
005850c8      
005850de      class ClientCommunicationSystem::CmdHashData* eax_333 = operator new(0x18);
005850ec      class ClientCommunicationSystem::CmdHashData* eax_334;
005850ec      
005850ec      if (eax_333 == 0)
00585125          eax_334 = nullptr;
005850ec      else
005850ec      {
00585100          PStringBase<char>::PStringBase<char>(&var_20, "text");
00585109          int32_t var_38_326 = 0;
0058510a          uint8_t (__thiscall* var_3c_106)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpTextGroup;
00585114          ebx_3 |= 0x400;
0058511a          eax_334 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_333, &var_20, nullptr, nullptr);
0058511f          ebp_1 = var_24_1;
005850ec      }
005850ec      
0058512a      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_334);
0058512a      
00585132      if ((*(uint8_t*)((char*)ebx_3)[1] & 4) != 0)
00585132      {
0058513b          ebx_3 &= 0xfffffbff;
00585141          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00585132      }
00585132      
00585148      class ClientCommunicationSystem::CmdHashData* eax_335 = operator new(0x18);
00585156      class ClientCommunicationSystem::CmdHashData* eax_336;
00585156      
00585156      if (eax_335 == 0)
00585192          eax_336 = nullptr;
00585156      else
00585156      {
0058516d          PStringBase<char>::PStringBase<char>(&var_20, "clear");
00585172          int32_t var_38_328 = 0;
00585173          uint8_t (__thiscall* var_3c_107)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpClear;
00585181          ebx_3 |= 0x800;
00585187          eax_336 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_335, &var_20, ClientCommunicationSystem::DoClear, nullptr);
0058518c          ebp_1 = var_24_1;
00585156      }
00585156      
00585197      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_336);
00585197      
0058519f      if ((*(uint8_t*)((char*)ebx_3)[1] & 8) != 0)
0058519f      {
005851a8          ebx_3 &= 0xfffff7ff;
005851ae          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
0058519f      }
0058519f      
005851b5      class ClientCommunicationSystem::CmdHashData* eax_337 = operator new(0x18);
005851c3      class ClientCommunicationSystem::CmdHashData* eax_338;
005851c3      
005851c3      if (eax_337 == 0)
005851ff          eax_338 = nullptr;
005851c3      else
005851c3      {
005851da          PStringBase<char>::PStringBase<char>(&var_20, "filter");
005851e3          int32_t var_38_330 = 0;
005851e4          uint8_t (__stdcall* var_3c_108)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpFilter;
005851ee          ebx_3 |= 0x1000;
005851f4          eax_338 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_337, &var_20, ClientCommunicationSystem::DoFilter, nullptr);
005851f9          ebp_1 = var_24_1;
005851c3      }
005851c3      
00585204      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_338);
00585204      
0058520c      if ((*(uint8_t*)((char*)ebx_3)[1] & 0x10) != 0)
0058520c      {
00585215          ebx_3 &= 0xffffefff;
0058521b          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
0058520c      }
0058520c      
00585222      class ClientCommunicationSystem::CmdHashData* eax_339 = operator new(0x18);
00585230      class ClientCommunicationSystem::CmdHashData* eax_340;
00585230      
00585230      if (eax_339 == 0)
0058526c          eax_340 = nullptr;
00585230      else
00585230      {
00585247          PStringBase<char>::PStringBase<char>(&var_20, "unfilter");
00585250          int32_t var_38_332 = 0;
00585251          uint8_t (__stdcall* var_3c_109)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpUnFilter;
0058525b          ebx_3 |= 0x2000;
00585261          eax_340 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_339, &var_20, ClientCommunicationSystem::DoUnFilter, nullptr);
00585266          ebp_1 = var_24_1;
00585230      }
00585230      
00585271      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_340);
00585271      
00585279      if ((*(uint8_t*)((char*)ebx_3)[1] & 0x20) != 0)
00585279      {
00585282          ebx_3 &= 0xffffdfff;
00585288          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00585279      }
00585279      
0058528f      class ClientCommunicationSystem::CmdHashData* eax_341 = operator new(0x18);
0058529d      class ClientCommunicationSystem::CmdHashData* eax_342;
0058529d      
0058529d      if (eax_341 == 0)
005852d9          eax_342 = nullptr;
0058529d      else
0058529d      {
005852b4          PStringBase<char>::PStringBase<char>(&var_20, &data_7e164c);
005852b9          int32_t var_38_334 = 0;
005852ba          uint8_t (__stdcall* var_3c_110)(class ClientCommunicationSystem* this @ ecx, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::DoSetOutputHelp;
005852c8          ebx_3 |= 0x4000;
005852ce          eax_342 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_341, &var_20, ClientCommunicationSystem::DoSetOutput, nullptr);
005852d3          ebp_1 = var_24_1;
0058529d      }
0058529d      
005852de      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_342);
005852de      
005852e6      if ((*(uint8_t*)((char*)ebx_3)[1] & 0x40) != 0)
005852e6      {
005852ef          ebx_3 &= 0xffffbfff;
005852f5          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
005852e6      }
005852e6      
005852fc      class ClientCommunicationSystem::CmdHashData* eax_343 = operator new(0x18);
0058530a      class ClientCommunicationSystem::CmdHashData* eax_344;
0058530a      
0058530a      if (eax_343 == 0)
00585346          eax_344 = nullptr;
0058530a      else
0058530a      {
00585321          PStringBase<char>::PStringBase<char>(&var_20, "title");
0058532a          int32_t var_38_336 = 0;
0058532b          uint8_t (__thiscall* var_3c_111)(class ClientCommunicationSystem* this, enum ClientCommunicationSystem::HelpType arg2, char const* arg3, class PStringBase<char>* arg4) = ClientCommunicationSystem::HelpTitle;
00585335          ebx_3 |= 0x8000;
0058533b          eax_344 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_343, &var_20, ClientCommunicationSystem::DoTitle, nullptr);
00585340          ebp_1 = var_24_1;
0058530a      }
0058530a      
0058534b      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_344);
0058534b      
00585352      if (*(uint8_t*)((char*)ebx_3)[1] < 0)
00585352      {
0058535b          ebx_3 &= 0xffff7fff;
00585361          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00585352      }
00585352      
00585368      class ClientCommunicationSystem::CmdHashData* eax_345 = operator new(0x18);
00585376      class ClientCommunicationSystem::CmdHashData* eax_346;
00585376      
00585376      if (eax_345 == 0)
005853af          eax_346 = nullptr;
00585376      else
00585376      {
0058538a          PStringBase<char>::PStringBase<char>(&var_20, "index");
00585393          int32_t var_38_338 = 0;
00585394          int32_t var_3c_112 = 0;
0058539e          ebx_3 |= 0x10000;
005853a4          eax_346 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_345, &var_20, ClientCommunicationSystem::DoChannelIndex, nullptr);
005853a9          ebp_1 = var_24_1;
00585376      }
00585376      
005853b4      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_346);
005853b4      
005853bf      if ((ebx_3 & 0x10000) != 0)
005853bf      {
005853c8          ebx_3 &= 0xfffeffff;
005853ce          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
005853bf      }
005853bf      
005853d5      class ClientCommunicationSystem::CmdHashData* eax_347 = operator new(0x18);
005853e3      class ClientCommunicationSystem::CmdHashData* eax_348;
005853e3      
005853e3      if (eax_347 == 0)
0058541c          eax_348 = nullptr;
005853e3      else
005853e3      {
005853f7          PStringBase<char>::PStringBase<char>(&var_20, "clist");
005853fc          int32_t var_38_340 = 0;
005853fd          int32_t var_3c_113 = 0;
0058540b          ebx_3 |= 0x20000;
00585411          eax_348 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_347, &var_20, ClientCommunicationSystem::DoChannelList, nullptr);
00585416          ebp_1 = var_24_1;
005853e3      }
005853e3      
00585421      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_348);
00585421      
0058542c      if ((ebx_3 & 0x20000) != 0)
0058542c      {
00585435          ebx_3 &= 0xfffdffff;
0058543b          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
0058542c      }
0058542c      
00585442      class ClientCommunicationSystem::CmdHashData* eax_349 = operator new(0x18);
00585450      class ClientCommunicationSystem::CmdHashData* eax_350;
00585450      
00585450      if (eax_349 == 0)
00585489          eax_350 = nullptr;
00585450      else
00585450      {
00585464          PStringBase<char>::PStringBase<char>(&var_20, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseProfile);
0058546d          int32_t var_38_342 = 0;
0058546e          int32_t var_3c_114 = 0;
00585478          ebx_3 |= 0x40000;
0058547e          eax_350 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_349, &var_20, ClientCommunicationSystem::DoChannelOn, nullptr);
00585483          ebp_1 = var_24_1;
00585450      }
00585450      
0058548e      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_350);
0058548e      
00585499      if ((ebx_3 & 0x40000) != 0)
00585499      {
005854a2          ebx_3 &= 0xfffbffff;
005854a8          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00585499      }
00585499      
005854af      class ClientCommunicationSystem::CmdHashData* eax_351 = operator new(0x18);
005854bd      class ClientCommunicationSystem::CmdHashData* eax_352;
005854bd      
005854bd      if (eax_351 == 0)
005854fa          eax_352 = nullptr;
005854bd      else
005854bd      {
005854d1          int32_t var_8_1 = 0;
005854d5          PStringBase<char>::PStringBase<char>(&var_20, &ClientCommunicationSystem::`vftable'.RecvNotice_UpdateHouseData);
005854da          int32_t var_38_344 = 0;
005854db          int32_t var_3c_115 = 0;
005854e9          ebx_3 |= 0x80000;
005854ef          eax_352 = ClientCommunicationSystem::CmdHashData::CmdHashData(eax_351, &var_20, ClientCommunicationSystem::DoChannelOff, nullptr);
005854f4          ebp_1 = var_24_1;
005854bd      }
005854bd      
005854ff      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::add(ebp_1, eax_352);
005854ff      
0058550e      if ((ebx_3 & 0x80000) != 0)
00585517          ReferenceCountTemplate<268435456,0>::Release((var_20 - 0x14));
00581970  }


00585520  void __fastcall ClientCommunicationSystem::ClientCommunicationSystem(class ClientCommunicationSystem* this)

00585520  {
00585525      this->vtable = &gmUrgentAssistanceUI::`vftable';
0058552c      this->vtable = &QualityChangeHandler::`vftable';
00585537      this->vtable = 0x7d0390;
00585533      this->vtable = &ClientCommunicationSystem::`vftable';
00585543      this->vtable = &ClientCommunicationSystem::`vftable';
0058554f      this->m_cTurbineRefCount.m_cRef = 1;
00585556      this->m_cTurbineRefCount.vtable = 0x792b6c;
0058555d      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>::IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,ClientCommunicationSystem::CmdHashData *,1>(&this->m_hashCommands, 0x64);
00585562      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00585573      this->m_strLastCommandLine.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00585579      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0058557b      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
00585587      this->m_strCurrentCommand.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0058558d      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
00585591      this->m_idCurrentCommandSource = 0;
00585597      this->m_LastSpamCheck = 0;
0058559d      this->m_ChatMessageCount = 0;
005855a3      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
005855af      this->m_strLogName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
005855b5      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
005855b7      class AC1Legacy::PSRefBuffer<char>* m_buffer = g_rename_cache.m_buffer;
005855b7      
005855c2      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
005855c2      {
005855d6          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005855d8              m_buffer->vtable->__vecDelDtor(1);
005855d8          
005855e1          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005855e6          g_rename_cache.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005855ef          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005855c2      }
005855c2      
005855f7      ClientCommunicationSystem::s_pCommunicationSystem = this;
005855fd      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00585601      ClientCommunicationSystem::InitializeCommands(this);
00585606      class GlobalEventHandler* eax_6 = GlobalEventHandler::GetGlobalEventHandler();
00585606      
0058560f      if (eax_6 != 0)
0058560f      {
00585611          eax_6->vtable->RegisterNoticeHandler(0x186a5, &this->vtable);
0058561e          eax_6->vtable->RegisterNoticeHandler(0x186b7, &this->vtable);
0058562b          eax_6->vtable->RegisterNoticeHandler(0x4dd1f0, &this->vtable);
00585638          eax_6->vtable->RegisterNoticeHandler(0x4dd21f, &this->vtable);
0058560f      }
00585520  }

0058564c                                      90 90 90 90                                                              ....

00585650  void __fastcall ClientMiniGameSystem::~ClientMiniGameSystem(class ClientMiniGameSystem* this)

00585650  {
00585655      this->vtable = 0x7e1b14;
00585652      this->vtable = &gmUrgentAssistanceUI::`vftable';
00585661      this->m_cTurbineRefCount.vtable = 0x792b6c;
00585652      this->vtable = &gmUrgentAssistanceUI::`vftable';
0058566e      /* tailcall */
0058566e      return NoticeHandler::~NoticeHandler(&this->vtable);
00585650  }

00585673                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00585680  void ClientMiniGameSystem::OnShutdown(class ClientMiniGameSystem* this @ ecx)

00585680  {
00585680      class ClientMiniGameSystem* ClientMiniGameSystem::s_pMiniGameSystem_1 = ClientMiniGameSystem::s_pMiniGameSystem;
00585680      
00585688      if (ClientMiniGameSystem::s_pMiniGameSystem_1 != 0)
00585688      {
0058568a          ClientMiniGameSystem::s_pMiniGameSystem_1->vtable->Release();
0058568f          ClientMiniGameSystem::s_pMiniGameSystem = nullptr;
00585688      }
00585680  }

0058569a                                                                                90 90 90 90 90 90                            ......

005856a0  uint32_t __stdcall ClientMiniGameSystem::Handle_Game__Recv_JoinGameResponse(class ClientMiniGameSystem* this @ ecx, uint32_t arg2, int32_t arg3)

005856a0  {
005856aa      CM_Game::SendNotice_JoinGameResponse(arg2, arg3);
005856b4      return 0;
005856a0  }

005856b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005856c0  uint32_t __stdcall ClientMiniGameSystem::Handle_Game__Recv_StartGame(class ClientMiniGameSystem* this @ ecx, uint32_t arg2, int32_t arg3)

005856c0  {
005856ca      CM_Game::SendNotice_StartGame(arg2, arg3);
005856d4      return 0;
005856c0  }

005856d7                                                                       90 90 90 90 90 90 90 90 90                         .........

005856e0  uint32_t __stdcall ClientMiniGameSystem::Handle_Game__Recv_MoveResponse(class ClientMiniGameSystem* this @ ecx, uint32_t arg2, int32_t arg3)

005856e0  {
005856ea      CM_Game::SendNotice_MoveResponse(arg2, arg3);
005856f4      return 0;
005856e0  }

005856f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00585700  uint32_t __stdcall ClientMiniGameSystem::Handle_Game__Recv_OpponentTurn(class ClientMiniGameSystem* this @ ecx, uint32_t arg2, int32_t arg3, class GameMoveData const* arg4)

00585700  {
0058570f      CM_Game::SendNotice_OpponentTurn(arg2, arg3, arg4);
00585719      return 0;
00585700  }

0058571c                                                                                      90 90 90 90                              ....

00585720  uint32_t __stdcall ClientMiniGameSystem::Handle_Game__Recv_OppenentStalemateState(class ClientMiniGameSystem* this @ ecx, uint32_t arg2, int32_t arg3, int32_t arg4)

00585720  {
0058572f      CM_Game::SendNotice_OpponentOffersStalemate(arg2, arg3, arg4);
00585739      return 0;
00585720  }

0058573c                                                                                      90 90 90 90                              ....

00585740  uint32_t __stdcall ClientMiniGameSystem::Handle_Game__Recv_GameOver(class ClientMiniGameSystem* this @ ecx, uint32_t arg2, int32_t arg3)

00585740  {
0058574a      CM_Game::SendNotice_GameOver(arg2, arg3);
00585754      return 0;
00585740  }

00585757                                                                       90 90 90 90 90 90 90 90 90                         .........

00585760  class TResult* __thiscall ClientMiniGameSystem::QueryInterface(class ClientMiniGameSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00585760  {
00585773      int32_t* key;
00585773      
00585773      if ((1 & (*(uint8_t*)$S124)) != 0)
005857c1          key = Offsets[0].key;
00585773      else
00585773      {
0058577d          key = &ClientMiniGameSystem_InterfaceType;
00585782          $S124 |= 1;
00585788          Offsets[0].key = 0x7e19c0;
0058578d          Offsets[0].ofs = 0;
00585793          Offsets[1].key = 0x7e19b0;
0058579d          Offsets[1].ofs = 0;
005857a3          Offsets[2].key = 0x7e1b00;
005857ad          Offsets[2].ofs = 0;
005857b3          Offsets[3].key = 0;
005857b9          Offsets[3].ofs = 0;
00585773      }
00585773      
005857c8      void* edx_3 = &Offsets;
005857c8      
005857cd      while (key != 0)
005857cd      {
005857ef          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
005857ef          {
00585812              if (arg4 != 0)
00585812              {
00585814                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0058581e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
00585821                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
00585812              }
00585812              
0058582a              __return->m_val = 0;
0058582d              return __return;
005857ef          }
005857ef          
005857f1          key = *(uint32_t*)((char*)edx_3 + 8);
005857f4          edx_3 += 8;
005857cd      }
005857cd      
00585802      __return->m_val = 0x80004002;
00585809      return __return;
00585760  }


00585830  uint32_t __fastcall ClientMiniGameSystem::Release(class ClientMiniGameSystem const* this)

00585830  {
00585837      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00585837      
00585844      if ((result == 0 && this != 0))
00585844      {
00585848          ClientMiniGameSystem::~ClientMiniGameSystem(this);
0058584e          operator delete(this);
00585844      }
00585844      
0058585a      return result;
00585830  }

0058585b                                                                                   90 90 90 90 90                             .....

00585860  void __fastcall ClientMiniGameSystem::ClientMiniGameSystem(class ClientMiniGameSystem* this)

00585860  {
00585863      this->vtable = &gmUrgentAssistanceUI::`vftable';
0058586a      this->vtable = 0x7e1b14;
00585870      this->vtable = &gmUrgentAssistanceUI::`vftable';
0058587a      this->m_cTurbineRefCount.m_cRef = 1;
00585881      this->m_cTurbineRefCount.vtable = 0x792b6c;
00585889      ClientMiniGameSystem::s_pMiniGameSystem = this;
0058588f      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00585860  }

00585899                                                                             90 90 90 90 90 90 90                           .......

005858a0  void __thiscall ACCWeenieObject::SetRestrictions(class ACCWeenieObject* this, class RestrictionDB const* arg2)

005858a0  {
005858a3      class RestrictionDB* _db = this->pwd._db;
005858a3      
005858ab      if (_db != 0)
005858e1          /* tailcall */
005858e1          return RestrictionDB::operator=(_db, arg2);
005858e1      
005858b2      void* eax = operator new(0x84);
005858b2      
005858bc      if (eax != 0)
005858bc      {
005858ca          this->pwd._db = RestrictionDB::RestrictionDB(eax, arg2);
005858d1          return;
005858bc      }
005858bc      
005858d6      this->pwd._db = nullptr;
005858a0  }

005858e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005858f0  void __fastcall ClientHousingSystem::~ClientHousingSystem(class ClientHousingSystem* this)

005858f0  {
005858f5      this->vtable = 0x7e1d24;
005858f2      this->vtable = &gmUrgentAssistanceUI::`vftable';
00585901      this->m_cTurbineRefCount.vtable = 0x792b6c;
005858f2      this->vtable = &gmUrgentAssistanceUI::`vftable';
0058590e      /* tailcall */
0058590e      return NoticeHandler::~NoticeHandler(&this->vtable);
005858f0  }

00585913                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00585920  void ClientHousingSystem::OnShutdown(class ClientHousingSystem* this @ ecx)

00585920  {
00585920      class ClientHousingSystem* ClientHousingSystem::s_pHousingSystem_1 = ClientHousingSystem::s_pHousingSystem;
00585920      
00585928      if (ClientHousingSystem::s_pHousingSystem_1 != 0)
00585928      {
0058592a          ClientHousingSystem::s_pHousingSystem_1->vtable->Release();
0058592f          ClientHousingSystem::s_pHousingSystem = nullptr;
00585928      }
00585920  }

0058593a                                                                                90 90 90 90 90 90                            ......

00585940  uint32_t __stdcall ClientHousingSystem::Handle_House__Recv_HouseProfile(class ClientHousingSystem* this @ ecx, uint32_t arg2, class HouseProfile const* arg3)

00585940  {
0058594a      CM_House::SendNotice_UpdateHouseProfile(arg2, arg3);
00585954      return 0;
00585940  }

00585957                                                                       90 90 90 90 90 90 90 90 90                         .........

00585960  uint32_t __stdcall ClientHousingSystem::Handle_House__Recv_HouseStatus(class ClientHousingSystem* this @ ecx, uint32_t arg2)

00585960  {
00585965      CM_House::SendNotice_FailedHouseTransaction(arg2);
0058596f      return 0;
00585960  }

00585972                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00585980  uint32_t __stdcall ClientHousingSystem::Handle_House__Recv_HouseData(class ClientHousingSystem* this @ ecx, class HouseData const* arg2)

00585980  {
00585985      CM_House::SendNotice_UpdateHouseData(arg2);
0058598f      return 0;
00585980  }

00585992                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005859a0  uint32_t __stdcall ClientHousingSystem::Handle_House__Recv_UpdateRentTime(class ClientHousingSystem* this @ ecx, int32_t arg2)

005859a0  {
005859a5      CM_House::SendNotice_UpdateRentTime(arg2);
005859af      return 0;
005859a0  }

005859b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005859c0  uint32_t __stdcall ClientHousingSystem::Handle_House__Recv_UpdateRentPayment(class ClientHousingSystem* this @ ecx, class HousePaymentList const* arg2)

005859c0  {
005859c5      CM_House::SendNotice_UpdateRentPayment(arg2);
005859cf      return 0;
005859c0  }

005859d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005859e0  uint32_t __stdcall ClientHousingSystem::Handle_House__Recv_UpdateRestrictions(class ClientHousingSystem* this @ ecx, uint8_t arg2, uint32_t arg3, class RestrictionDB const* arg4)

005859e0  {
005859e7      if (arg3 != 0)
005859e7      {
005859e9          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005859f0          uint32_t player_id;
005859f0          
005859f0          if (SmartBox::smartbox_1 == 0)
005859fa              player_id = 0;
005859f0          else
005859f2              player_id = SmartBox::smartbox_1->player_id;
005859f2          
005859fe          if (arg3 != player_id)
005859fe          {
00585a01              class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg3);
00585a01              
00585a0d              if ((eax_1 != 0 && ACCWeenieObject::UpdateHouseRestrictionTS(eax_1, arg2) != 0))
00585a26                  ACCWeenieObject::SetRestrictions(eax_1, arg4);
005859fe          }
005859e7      }
005859e7      
00585a2e      return 0;
005859e0  }

00585a31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00585a40  class TResult* __thiscall ClientHousingSystem::QueryInterface(class ClientHousingSystem* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00585a40  {
00585a53      int32_t* key;
00585a53      
00585a53      if ((1 & (*(uint8_t*)$S127)) != 0)
00585aa1          key = Offsets[0].key;
00585a53      else
00585a53      {
00585a5d          key = &ClientHousingSystem_InterfaceType;
00585a62          $S127 |= 1;
00585a68          Offsets[0].key = 0x7e1bd0;
00585a6d          Offsets[0].ofs = 0;
00585a73          Offsets[1].key = 0x7e1bc0;
00585a7d          Offsets[1].ofs = 0;
00585a83          Offsets[2].key = 0x7e1d10;
00585a8d          Offsets[2].ofs = 0;
00585a93          Offsets[3].key = 0;
00585a99          Offsets[3].ofs = 0;
00585a53      }
00585a53      
00585aa8      void* edx_3 = &Offsets;
00585aa8      
00585aad      while (key != 0)
00585aad      {
00585acf          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
00585acf          {
00585af2              if (arg4 != 0)
00585af2              {
00585af4                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
00585afe                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
00585b01                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
00585af2              }
00585af2              
00585b0a              __return->m_val = 0;
00585b0d              return __return;
00585acf          }
00585acf          
00585ad1          key = *(uint32_t*)((char*)edx_3 + 8);
00585ad4          edx_3 += 8;
00585aad      }
00585aad      
00585ae2      __return->m_val = 0x80004002;
00585ae9      return __return;
00585a40  }


00585b10  uint32_t __fastcall ClientHousingSystem::Release(class ClientHousingSystem const* this)

00585b10  {
00585b17      uint32_t result = ReferenceCountTemplate<1048576,2>::Release(&this->m_cTurbineRefCount);
00585b17      
00585b24      if ((result == 0 && this != 0))
00585b24      {
00585b28          ClientHousingSystem::~ClientHousingSystem(this);
00585b2e          operator delete(this);
00585b24      }
00585b24      
00585b3a      return result;
00585b10  }

00585b3b                                                                                   90 90 90 90 90                             .....

00585b40  void __fastcall ClientHousingSystem::ClientHousingSystem(class ClientHousingSystem* this)

00585b40  {
00585b43      this->vtable = &gmUrgentAssistanceUI::`vftable';
00585b4a      this->vtable = 0x7e1d24;
00585b50      this->vtable = &gmUrgentAssistanceUI::`vftable';
00585b5a      this->m_cTurbineRefCount.m_cRef = 1;
00585b61      this->m_cTurbineRefCount.vtable = 0x792b6c;
00585b69      ClientHousingSystem::s_pHousingSystem = this;
00585b6f      InterlockedIncrement(&this->m_cTurbineRefCount.m_cRef);
00585b40  }

00585b79                                                                             90 90 90 90 90 90 90                           .......

00585b80  uint32_t __fastcall ClientHousingSystem::Handle_House__Recv_UpdateHAR(class ClientHousingSystem* this, class HAR const* arg2)

00585b80  {
00585b80      class ClientHousingSystem* var_4 = this;
00585b81      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00585b87      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00585b92      class AC1Legacy::PStringBase<char>* edx = InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00585b9c      int32_t var_10_1 = 0;
00585ba3      HAR::Dump(arg2, edx, &var_4);
00585bc8      ClientSystem::AddTextToScroll(PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2, WidthConvert, ((char*)var_4 + 0x14)), &arg2, 0, 1, 0);
00585bd7      void* __offset(HAR, -0x14) esi_3 = ((char*)arg2 - 0x14);
00585bd7      
00585be6      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00585bee          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00585bee      
00585bf0      class ClientHousingSystem* esi_4 = var_4;
00585bf0      
00585c00      if ((InterlockedDecrement(&esi_4->vtable) == 0 && esi_4 != 0))
00585c02          esi_4->vtable->IUnknown_QueryInterface(1);
00585c02      
00585c0f      return 0;
00585b80  }

00585c12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00585c20  void __thiscall ClientHousingSystem::DisplayListOfCoords(class ClientHousingSystem* this, class PackableList<unsigned long> const* arg2)

00585c20  {
00585c2f      class PackableLLNode<unsigned long>* head = arg2->head;
00585c2f      
00585c3b      if (head != 0)
00585c3b      {
00585c4d          class PackableLLNode<unsigned long>* var_74_1 = head;
00585d3b          class PackableLLNode<unsigned long>* next;
00585d3b          
00585d3b          do
00585d3b          {
00585c62              int32_t var_88;
00585c62              int32_t var_84;
00585c62              LandDefs::gid_to_lcoord(var_74_1->data, &var_88, &var_84);
00585c67              int32_t esi_1 = var_88;
00585c74              void (__thiscall** const ecx_1)(class gmNoticeHandler* this) = &gmHouseUI::`vftable'.RecvNotice_SkillAdvancementClassChanged;
00585c74              
00585c79              if (esi_1 < 0x400)
00585c7b                  ecx_1 = &gmHouseUI::`vftable'.RecvNotice_TradeFailure;
00585c7b              
00585c80              int32_t edx_1 = var_84;
00585c8a              void* const eax_2 = &data_799b78;
00585c8a              
00585c8f              if (edx_1 < 0x400)
00585c91                  eax_2 = &gmHouseUI::`vftable'.RecvNotice_TradeAnItemForDummies;
00585c91              
00585ca4              void (__thiscall** const var_9c_2)(class gmNoticeHandler* this) = ecx_1;
00585cc4              uint32_t var_a4_1;
00585cc4              var_a4_1 = ((double)fabsl(((((long double)(esi_1 - 0x400)) * ((long double)0.10000000000000001)) + ((long double)0.5))));
00585ce8              void var_70;
00585ce8              _snprintf(&var_70, 0x63, "     %.1f%s, %.1f%s\n", ((double)fabsl(((((long double)(edx_1 - 0x400)) * ((long double)0.10000000000000001)) + ((long double)0.5)))), eax_2, var_a4_1);
00585cf8              class PStringBase<unsigned short> var_8c;
00585cf8              int32_t ebx_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_8c, WidthConvert, &var_70);
00585d0c              ClientSystem::AddTextToScroll(this, &var_8c, 0, 1, 0);
00585d15              int32_t* esi_4 = (var_8c - 0x14);
00585d15              
00585d24              if ((ebx_2(&esi_4[1]) == 0 && esi_4 != 0))
00585d2c                  **(uint32_t**)esi_4(1);
00585d2c              
00585d32              next = var_74_1->next;
00585d37              var_74_1 = next;
00585d3b          } while (next != 0);
00585c3b      }
00585c20  }

00585d4a                                90 90 90 90 90 90                                                            ......

00585d50  uint32_t __thiscall ClientHousingSystem::Handle_House__Recv_AvailableHouses(class ClientHousingSystem* this, uint32_t arg2, class PackableList<unsigned long> const* arg3, int32_t arg4)

00585d50  {
00585d50      class ClientHousingSystem* var_4 = this;
00585d5b      class ClientHousingSystem* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00585d67      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00585d6b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable);
00585d6b      
00585d75      if ((arg2 - 1) <= 3)
00585d75      {
00585d77          char const* const var_18_1;
00585d77          
00585d77          switch (arg2)
00585d77          {
00585d7e              case 1:
00585d7e              {
00585d7e                  var_18_1 = "cottages";
00585d7e                  break;
00585d7e              }
00585d85              case 2:
00585d85              {
00585d85                  var_18_1 = "villas";
00585d85                  break;
00585d85              }
00585d8c              case 3:
00585d8c              {
00585d8c                  var_18_1 = "mansions";
00585d8c                  break;
00585d8c              }
00585d93              case 4:
00585d93              {
00585d93                  var_18_1 = "apartments";
00585d93                  break;
00585d93              }
00585d77          }
00585d77          
00585d9c          AC1Legacy::PStringBase<char>::set(&var_4, var_18_1);
00585da1          AC1Legacy::PStringBase<char>::s_NullBuffer_2 = var_4;
00585d75      }
00585d75      
00585da5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00585daa      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00585db2      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00585dbb      void* __offset(ClientHousingSystem, 0x14) var_18_3 = ((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_2 + 0x14);
00585dbc      int32_t var_1c = arg4;
00585dc7      AC1Legacy::PStringBase<char>::sprintf(&var_4, "There are %d %s available.\n");
00585dcc      class ClientHousingSystem* ebp = var_4;
00585ddd      class ClientSystem* ebx_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_4, WidthConvert, ((char*)ebp + 0x14));
00585def      ClientSystem::AddTextToScroll(ebx_1, &var_4, 0, 1, 0);
00585df8      void* __offset(ClientHousingSystem, -0x14) esi_1 = ((char*)var_4 - 0x14);
00585df8      
00585e0b      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
00585e13          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
00585e13      
00585e1a      if (arg2 != 4)
00585e1a      {
00585e23          ClientHousingSystem::DisplayListOfCoords(ebx_1, arg3);
00585e23          
00585e30          if (arg4 > 0x190)
00585e3f              ClientSystem::AddTextToScroll(ebx_1, "There were too many houses to di…", 0, 1, 0);
00585e1a      }
00585e1a      
00585e56      if ((InterlockedDecrement(&ebp->vtable) == 0 && ebp != 0))
00585e58          ebp->vtable->IUnknown_QueryInterface(1);
00585e58      
00585e6d      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
00585e6f          AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->IUnknown_QueryInterface(1);
00585e6f      
00585e7e      return 0;
00585d50  }

00585e81     8d 49 00                                                                                       .I.
00585e84  uint32_t jump_table_585e84[0x4] = 
00585e84  {
00585e84      [0x0] =  0x00585d7e
00585e88      [0x1] =  0x00585d85
00585e8c      [0x2] =  0x00585d8c
00585e90      [0x3] =  0x00585d93
00585e94  }

00585e94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00585ea0  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>* this, uint32_t arg2)

00585ea0  {
00585ea3      class HashSetData<IDClass<_tagDataID,32,0> >** m_buckets = this->m_buckets;
00585eab      this->vtable = 0x7e1ef4;
00585eab      
00585eb1      if (m_buckets != &this->m_aInplaceBuckets)
00585eb4          operator delete[](m_buckets);
00585eb4      
00585ebe      this->m_buckets = nullptr;
00585ec1      this->m_firstInterestingBucket = nullptr;
00585ec4      this->m_numBuckets = 0;
00585ec7      this->m_numElements = 0;
00585ec7      
00585ecf      if ((arg2 & 1) != 0)
00585ed2          operator delete(this);
00585ed2      
00585edd      return this;
00585ea0  }


00585ee0  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, uint32_t arg2)

00585ee0  {
00585eeb      this->m_numBuckets = arg2;
00585eee      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** s;
00585eee      
00585eee      if (arg2 > 0x17)
00585efd          s = operator new[]((arg2 << 2));
00585eee      else
00585ef0          s = &this->m_aInplaceBuckets;
00585ef0      
00585f08      uint32_t ecx_2 = (this->m_numBuckets << 2);
00585f10      this->m_firstInterestingBucket = &s[*(int32_t*)((char*)this + 0x68)];
00585f15      this->m_buckets = s;
00585f24      __builtin_memset(__builtin_memset(s, 0, ((ecx_2 >> 2) << 2)), 0, (ecx_2 & 3));
00585ee0  }

00585f2b                                   90 90 90 90 90                                                             .....

00585f30  uint32_t __fastcall ComponentData::GetFirstObjectID(class ComponentData const* this)

00585f30  {
00585f48      void __return;
00585f48      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->objects.m_intrusiveTable.vtable, &__return)->m_currElement->m_hashKey;
00585f30  }

00585f49                             90 90 90 90 90 90 90                                                           .......

00585f50  enum SpellComponentCategory __thiscall ComponentTracker::DetermineComponentCategory(class ComponentTracker* this, class IDClass<_tagDataID,32,0> arg2)

00585f50  {
00585f5a      class IDClass<_tagDataID,32,0> var_34 = arg2;
00585f5d      uint32_t eax_1 = SpellComponentTable::WCIDtoSCID(arg2);
00585f6a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00585f6f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00585f7a      int32_t var_24 = 0x7a33cc;
00585f82      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00585f84      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00585f89      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00585f91      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00585f97      SpellComponentBase::Init(&var_24);
00585fab      int32_t* ecx_2 = &var_24;
00585fab      
00585faf      if (SpellComponentTable::InqSpellComponentBase(this->spellComponentTable, eax_1, &var_24) == 0)
00585faf      {
00585fb1          SpellComponentBase::~SpellComponentBase(ecx_2);
00585fc1          return 8;
00585faf      }
00585faf      
00585fc8      SpellComponentBase::~SpellComponentBase(ecx_2);
00585fd5      int32_t result;
00585fd5      return result;
00585f50  }

00585fd8                                                                          90 90 90 90 90 90 90 90                          ........

00585fe0  void __thiscall ComponentTracker::GetNumComponent(class ComponentTracker* this, class IDClass<_tagDataID,32,0> arg2, int32_t* arg3)

00585fe0  {
00585feb      class IDClass<_tagDataID,32,0> var_38 = arg2;
00585fee      class IDClass<_tagDataID,32,0> eax;
00585fee      uint32_t eax_1 = SpellComponentTable::WCIDtoSCID(eax);
00585ffb      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00586000      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0058600b      int32_t var_24 = 0x7a33cc;
00586013      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00586015      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0058601a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00586022      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00586028      SpellComponentBase::Init(&var_24);
00586035      SpellComponentTable::InqSpellComponentBase(this->spellComponentTable, eax_1, &var_24);
00586046      int32_t var_1c;
00586046      
00586046      for (void** head_ = this->componentLists[var_1c]->head_; head_ != 0; head_ = *(uint32_t*)head_)
00586046      {
0058604b          if (head_[2] == arg2)
0058604b          {
0058607a              *(uint32_t*)arg3 = head_[0x22];
00586080              SpellComponentBase::~SpellComponentBase(&var_24);
0058608c              return;
0058604b          }
00586046      }
00586046      
0058605b      *(uint32_t*)arg3 = 0;
00586061      SpellComponentBase::~SpellComponentBase(&var_24);
00585fe0  }

0058608f                                               90                                                                 .

00586090  void __thiscall ComponentTracker::GetCompNameFromWCID(class ComponentTracker* this, class IDClass<_tagDataID,32,0> arg2, class AC1Legacy::PStringBase<char>* arg3)

00586090  {
00586093      class IDClass<_tagDataID,32,0> eax = arg2;
0058609b      class IDClass<_tagDataID,32,0> var_38 = eax;
0058609e      uint32_t eax_1 = SpellComponentTable::WCIDtoSCID(eax);
005860ab      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005860bb      int32_t var_24 = 0x7a33cc;
005860c3      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005860c5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005860d2      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005860d8      SpellComponentBase::Init(&var_24);
005860e5      SpellComponentTable::InqSpellComponentBase(this->spellComponentTable, eax_1, &var_24);
005860f3      class AC1Legacy::PStringBase<char>* eax_4 = CSpellBase::InqName(&var_24, &arg2);
005860fc      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg3->m_buffer;
005860fc      
00586103      if (m_buffer_1 != eax_4->m_buffer)
00586103      {
00586115          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00586117              m_buffer_1->vtable->__vecDelDtor(1);
00586117          
0058611f          class AC1Legacy::PStringBase<char> m_buffer = eax_4->m_buffer;
00586121          arg3->m_buffer = m_buffer;
00586128          InterlockedIncrement((m_buffer + 4));
00586103      }
00586103      
0058612a      class IDClass<_tagDataID,32,0> esi_1 = arg2;
0058612a      
00586140      if ((InterlockedDecrement((esi_1 + 4)) == 0 && esi_1 != 0))
00586148          **(uint32_t**)esi_1(1);
00586148      
0058615a      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
0058615c          AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
0058615c      
00586174      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
00586176          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
00586090  }

00586188                          90 90 90 90 90 90 90 90                                                          ........

00586190  uint8_t __fastcall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::grow(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>* this)

00586190  {
00586190      class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>* m_numBuckets = this;
00586192      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0058619e      m_numBuckets = this->m_numBuckets;
005861b5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
005861b5      
005861bf      if (eax_2 != bucketSizesEnd_1)
005861c8          eax_2 = &eax_2[1];
005861bf      else
005861bf      {
005861c1          eax_2 -= 4;
005861c1          
005861c6          if (eax_2 != bucketSizesEnd_1)
005861c8              eax_2 = &eax_2[1];
005861bf      }
005861bf      
005861d8      return IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::resize_internal(this, *(uint32_t*)eax_2);
00586190  }

005861d9                                                                             90 90 90 90 90 90 90                           .......

005861e0  int32_t __thiscall ComponentTracker::ObjectIsOwnedComponent(class ComponentTracker* this, uint32_t arg2, class IDClass<_tagDataID,32,0>* arg3)

005861e0  {
005861fc      for (int32_t* i = this->objectIDHash.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->objectIDHash.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
005861fc      {
00586202          if (*(uint32_t*)i == arg2)
00586202          {
00586216              if (i == 0)
00586216                  break;
00586216              
00586221              arg3->id = i[2];
00586227              return 1;
00586202          }
005861fc      }
005861fc      
00586211      return 0;
005861e0  }

0058622a                                90 90 90 90 90 90                                                            ......

00586230  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>* this, uint32_t arg2)

00586230  {
0058623b      arg2 = arg2;
0058623f      uint8_t edx = ((int8_t)arg2);
00586243      this->m_buckets = nullptr;
00586246      this->m_firstInterestingBucket = nullptr;
00586249      this->m_numBuckets = 0;
0058624c      this->m_numElements = 0;
00586250      this->vtable = 0x7e1ef4;
00586256      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00586269      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00586269      
00586273      if (eax == bucketSizesEnd_1)
00586275          eax -= 4;
00586275      
00586278      uint32_t eax_1 = *(uint32_t*)eax;
0058627d      this->m_numBuckets = eax_1;
0058627d      
00586280      if (eax_1 > 0x17)
00586296          this->m_buckets = operator new[]((eax_1 << 2));
00586280      else
00586285          this->m_buckets = &this->m_aInplaceBuckets;
00586285      
0058629c      class HashSetData<IDClass<_tagDataID,32,0> >** m_buckets = this->m_buckets;
0058629f      uint32_t ecx_3 = (this->m_numBuckets << 2);
005862a5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
005862b6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00586230  }

005862bf                                                                                               90                                 .

005862c0  void __fastcall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this)

005862c0  {
005862c8      if (this->m_numElements != 0)
005862c8      {
005862ca          int32_t* m_firstInterestingBucket_2;
005862ca          int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
005862ca          
00586338          do
00586338          {
005862d6              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
005862dc              void* ecx_2;
005862dc              
005862dc              if (this->m_firstInterestingBucket == ecx_1)
005862dc              {
005862f2              label_5862f2:
005862f2                  m_firstInterestingBucket_2 = nullptr;
005862f4                  ecx_2 = nullptr;
005862dc              }
005862dc              else
005862dc              {
005862e0                  while (true)
005862e0                  {
005862e0                      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
005862e0                      
005862e6                      if (*(uint32_t*)m_firstInterestingBucket != 0)
005862e6                      {
005862f8                          struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
005862fb                          ecx_2 = *(uint32_t*)m_firstInterestingBucket_1;
005862fd                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
005862fd                          break;
005862e6                      }
005862e6                      
005862ed                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
005862ed                      
005862f0                      if (&m_firstInterestingBucket[1] == ecx_1)
005862f0                          goto label_5862f2;
005862e0                  }
005862dc              }
005862dc              
005862ff              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
005862ff              
00586303              if (eax_3 == ecx_2)
00586315                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00586303              else
00586303              {
0058630c                  void* edx_1;
0058630c                  
0058630c                  do
0058630c                  {
00586305                      edx_1 = eax_3;
00586307                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0058630c                  } while (eax_3 != ecx_2);
0058630c                  
00586310                  if (edx_1 != 0)
0058631c                      *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00586310                  else
00586315                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00586303              }
00586303              
00586325              this->m_numElements -= 1;
00586325              
00586328              if (ecx_2 != 0)
0058632b                  operator delete(ecx_2);
00586338          } while (this->m_numElements != 0);
005862c8      }
005862c0  }

005862cd                                         8d 49 00                                                               .I.
0058633d                                                                                         90 90 90                               ...

00586340  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::resize_internal(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>* this, uint32_t arg2)

00586340  {
00586341      uint32_t ebp = arg2;
00586341      
0058634b      if (ebp == this->m_numBuckets)
0058634b      {
0058634e          int32_t eax;
0058634e          eax = 0;
00586351          return 0;
0058634b      }
0058634b      
00586359      int32_t* i_1 = nullptr;
00586359      
0058635d      while (this->m_numElements != 0)
0058635d      {
00586366          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0058636c          int32_t* i_2;
0058636c          int32_t* m_firstInterestingBucket_2;
0058636c          
0058636c          if (this->m_firstInterestingBucket == ecx_1)
0058636c          {
00586382          label_586382:
00586382              m_firstInterestingBucket_2 = nullptr;
00586384              i_2 = nullptr;
0058636c          }
0058636c          else
0058636c          {
00586370              while (true)
00586370              {
00586370                  class HashSetData<IDClass<_tagDataID,32,0> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
00586370                  
00586376                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00586376                  {
00586388                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0058638b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0058638d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0058638d                      break;
00586376                  }
00586376                  
0058637d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0058637d                  
00586380                  if (&m_firstInterestingBucket[1] == ecx_1)
00586380                      goto label_586382;
00586370              }
0058636c          }
0058636c          
0058638f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0058638f          
00586393          if (eax_4 == i_2)
005863a5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00586393          else
00586393          {
0058639c              void* edx_1;
0058639c              
0058639c              do
0058639c              {
00586395                  edx_1 = eax_4;
00586397                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0058639c              } while (eax_4 != i_2);
0058639c              
005863a0              if (edx_1 != 0)
005863ac                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
005863a0              else
005863a5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00586393          }
00586393          
005863af          this->m_numElements -= 1;
005863b2          i_2[1] = i_1;
005863ba          i_1 = i_2;
0058635d      }
0058635d      
005863be      class HashSetData<IDClass<_tagDataID,32,0> >** m_buckets = this->m_buckets;
005863be      
005863c6      if (m_buckets != &this->m_aInplaceBuckets)
005863c9          operator delete[](m_buckets);
005863c9      
005863d6      this->m_buckets = nullptr;
005863d9      this->m_firstInterestingBucket = nullptr;
005863dc      this->m_numBuckets = 0;
005863df      this->m_numElements = 0;
005863e2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
005863e9      void* eax_7;
005863e9      
005863e9      if (i_1 != 0)
005863e9      {
0058646b          int32_t* i;
0058646b          
0058646b          do
0058646b          {
005863f0              uint32_t m_numBuckets = this->m_numBuckets;
005863f6              i = i_1[1];
005863f6              
005863ff              if ((m_numBuckets * 2) < (this->m_numElements + 1))
005863ff              {
00586401                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00586408                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0058640e                  arg2 = m_numBuckets;
0058641e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0058641e                  
00586428                  if (eax_8 != bucketSizesEnd_1)
00586431                      eax_8 = &eax_8[1];
00586428                  else
00586428                  {
0058642a                      eax_8 -= 4;
0058642a                      
0058642f                      if (eax_8 != bucketSizesEnd_1)
00586431                          eax_8 = &eax_8[1];
00586428                  }
00586428                  
00586439                  IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::resize_internal(this, *(uint32_t*)eax_8);
005863ff              }
005863ff              
00586442              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
00586445              class HashSetData<IDClass<_tagDataID,32,0> >** m_buckets_1 = this->m_buckets;
0058644b              i_1[1] = m_buckets_1[temp1_1];
0058644e              m_buckets_1[temp1_1] = i_1;
00586454              eax_7 = &m_buckets_1[temp1_1];
00586454              
00586459              if (eax_7 < this->m_firstInterestingBucket)
0058645b                  this->m_firstInterestingBucket = eax_7;
0058645b              
00586466              this->m_numElements += 1;
00586469              i_1 = i;
0058646b          } while (i != 0);
005863e9      }
005863e9      
00586470      eax_7 = 1;
00586473      return 1;
00586340  }

00586476                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00586480  int32_t __thiscall ComponentTracker::ComponentIsOwned(class ComponentTracker* this, class IDClass<_tagDataID,32,0> arg2)

00586480  {
00586498      int32_t* eax_3 = this->classIDHash.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->classIDHash.m_intrusiveTable.m_numBuckets)];
0058649a      bool cond:0 = eax_3 != 0;
0058649a      
0058649c      if (eax_3 != 0)
0058649c      {
005864a2          while (*(uint32_t*)eax_3 != arg2)
005864a2          {
005864a4              eax_3 = eax_3[1];
005864a4              
005864a9              if (eax_3 == 0)
005864a9                  break;
005864a2          }
005864a2          
005864ab          cond:0 = eax_3 != 0;
0058649c      }
0058649c      
005864ad      this = cond:0;
005864b4      return ((uint32_t)this);
00586480  }

005864b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005864c0  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::add(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>* this, class HashSetData<IDClass<_tagDataID,32,0> >* arg2)

005864c0  {
005864c8      uint32_t id = arg2->m_hashKey.id;
005864cb      uint32_t m_numBuckets = this->m_numBuckets;
005864cb      
005864de      for (int32_t* i = this->m_buckets[(COMBINE(0, id) % m_numBuckets)]; i != 0; i = i[1])
005864de      {
005864e2          if (*(uint32_t*)i == id)
005864e2          {
0058652e              if (i == 0)
0058652e                  break;
0058652e              
00586532              i = 0;
00586535              return 0;
005864e2          }
005864de      }
005864de      
005864f4      if ((m_numBuckets * 2) < (this->m_numElements + 1))
005864f8          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::grow(this);
005864f8      
00586501      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.id) % this->m_numBuckets);
00586504      class HashSetData<IDClass<_tagDataID,32,0> >** m_buckets = this->m_buckets;
0058650a      arg2->m_hashNext = m_buckets[temp1_1];
0058650d      m_buckets[temp1_1] = arg2;
00586513      class HashSetData<IDClass<_tagDataID,32,0> >** eax_4 = &m_buckets[temp1_1];
00586513      
00586518      if (eax_4 < this->m_firstInterestingBucket)
0058651a          this->m_firstInterestingBucket = eax_4;
0058651a      
00586522      this->m_numElements += 1;
00586526      uint32_t eax_6;
00586526      eax_6 = 1;
00586529      return 1;
005864c0  }

00586538                                                                          90 90 90 90 90 90 90 90                          ........

00586540  uint8_t __thiscall HashSet<IDClass<_tagDataID,32,0> >::add(class HashSet<IDClass<_tagDataID,32,0> >* this, class IDClass<_tagDataID,32,0>* arg2)

00586540  {
00586549      uint32_t id = arg2->id;
00586549      
0058655c      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, id) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0058655c      {
00586562          if (*(uint32_t*)i == id)
00586562          {
00586595              if (i == 0)
00586595                  break;
00586595              
00586598              i = 0;
0058659b              return 0;
00586562          }
0058655c      }
0058655c      
0058656d      void* eax_3 = operator new(8);
0058656d      
00586577      if (eax_3 == 0)
00586577      {
005865a3          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::add(&this->m_intrusiveTable, nullptr);
005865a9          int32_t eax_5;
005865a9          eax_5 = 1;
005865ac          return 1;
00586577      }
00586577      
0058657b      *(uint32_t*)eax_3 = arg2->id;
00586580      *(uint32_t*)((char*)eax_3 + 4) = 0;
00586587      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::add(&this->m_intrusiveTable, eax_3);
0058658d      int32_t eax_4;
0058658d      eax_4 = 1;
00586590      return 1;
00586540  }

005865af                                               90                                                                 .

005865b0  void* __thiscall HashSet<IDClass<_tagDataID,32,0> >::`scalar deleting destructor'(class HashSet<IDClass<_tagDataID,32,0> >* this, uint32_t arg2)

005865b0  {
005865b9      this->vtable = 0x7e1ef8;
005865bf      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
005865c4      class HashSetData<IDClass<_tagDataID,32,0> >** m_buckets = this->m_intrusiveTable.m_buckets;
005865b4      this->m_intrusiveTable.vtable = 0x7e1ef4;
005865b4      
005865d2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
005865d5          operator delete[](m_buckets);
005865d5      
005865b4      this->m_intrusiveTable.m_buckets = nullptr;
005865b4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
005865b4      this->m_intrusiveTable.m_numBuckets = 0;
005865b4      this->m_intrusiveTable.m_numElements = 0;
005865b4      
005865f0      if ((arg2 & 1) != 0)
005865f3          operator delete(this);
005865f3      
005865ff      return this;
005865b0  }

00586602        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00586610  void __fastcall ComponentData::AddItem(class ComponentData* this, class ACCWeenieObject* arg2)

00586610  {
00586610      class ComponentData* id = this;
00586613      class ACCWeenieObject* edi = arg2;
00586617      uint32_t _stackSize = edi->pwd._stackSize;
00586621      arg2 = _stackSize;
00586621      
00586625      if (_stackSize == 0)
00586627          arg2 = 1;
00586627      
0058663f      id = edi->id;
00586643      HashTable<ControlSpecification,enum ControlType,0>::add(&this->objects.vtable, &id, &arg2);
00586648      uint32_t _stackSize_1 = edi->pwd._stackSize;
00586648      
00586650      if (_stackSize_1 != 0)
00586650      {
0058665b          this->numItems += _stackSize_1;
00586663          return;
00586650      }
00586650      
00586674      this->numItems += 1;
00586610  }

0058667f                                                                                               90                                 .

00586680  void __thiscall ComponentData::RemoveItem(class ComponentData* this, class ACCWeenieObject* arg2)

00586680  {
00586682      class ACCWeenieObject* edi = arg2;
00586693      arg2 = edi->id;
00586697      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_1 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->objects.m_intrusiveTable, &arg2);
00586697      
0058669e      if (eax_1 != 0)
005866a1          operator delete(eax_1);
005866a1      
005866a9      uint32_t _stackSize = edi->pwd._stackSize;
005866a9      
005866b7      if (_stackSize == 0)
005866b9          _stackSize = 1;
005866b9      
005866c1      this->numItems -= _stackSize;
00586680  }

005866cb                                   90 90 90 90 90                                                             .....

005866d0  void __thiscall ComponentData::UpdateStackSize(class ComponentData* this, class ACCWeenieObject* arg2, enum ComponentTrackerUpdate* arg3)

005866d0  {
005866d2      class ACCWeenieObject* edi = arg2;
005866d6      uint32_t id = edi->id;
005866e9      int32_t* eax_3 = this->objects.m_intrusiveTable.m_buckets[(COMBINE(0, id) % this->objects.m_intrusiveTable.m_numBuckets)];
005866ed      enum ComponentTrackerUpdate* esi;
005866ed      
005866ed      if (eax_3 == 0)
005866ed      {
005866fb      label_5866fb:
005866fb          esi = arg3;
005866ed      }
005866ed      else
005866ed      {
005866f2          while (*(uint32_t*)eax_3 != id)
005866f2          {
005866f4              eax_3 = eax_3[1];
005866f4              
005866f9              if (eax_3 == 0)
005866f9                  goto label_5866fb_1;
005866f2          }
005866f2          
00586727          if (eax_3 == 0)
00586727          {
005866fb          label_5866fb_1:
005866fb              esi = arg3;
00586727          }
00586727          else
00586729              esi = eax_3[2];
005866ed      }
005866ed      
005866ff      uint32_t _stackSize = edi->pwd._stackSize;
005866ff      
00586707      if (_stackSize == 0)
00586709          _stackSize = 1;
00586709      
00586710      arg2 = _stackSize;
00586710      
00586714      if (esi == _stackSize)
00586714      {
0058671b          *(uint32_t*)arg3 = CT_CHANGE_NONE;
00586722          return;
00586714      }
00586714      
00586732      int32_t eax_4;
00586732      eax_4 = esi > _stackSize;
00586740      *(uint32_t*)arg3 = (eax_4 + 1);
00586747      *(uint32_t*)((char*)this->objects.vtable)[0x74] += (_stackSize - esi);
00586751      arg3 = edi->id;
0058675b      HashTable<unsigned long,StringInfoData *,0>::set(&this->objects.vtable, &arg3, &arg2);
005866d0  }

00586766                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00586770  void __thiscall ComponentTracker::ComponentTracker(class ComponentTracker* this, class SpellComponentTable* arg2)

00586770  {
00586776      class SpellComponentTable** this_1 = this;
00586779      *(uint32_t*)this_1 = arg2;
00586780      this_1[8] = &HashTable<unsigned long,class IDClass<struct _tagDataID,32,0>,0>::`vftable';
00586787      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>(&this_1[9], 0x20);
00586794      this_1[0x25] = 0x7e1ef8;
0058679e      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>(&this_1[0x26], 0x20);
005867a3      void* edi = &this_1[1];
005867a6      int32_t i_1 = 7;
005867d5      int32_t i;
005867d5      
005867d5      do
005867d5      {
005867b2          void* eax = operator new(8);
005867b2          
005867bc          if (eax == 0)
005867cd              eax = nullptr;
005867bc          else
005867bc          {
005867be              *(uint32_t*)eax = 0;
005867c4              *(uint32_t*)((char*)eax + 4) = 0;
005867bc          }
005867bc          
005867cf          *(uint32_t*)edi = eax;
005867d1          edi += 4;
005867d4          i = i_1;
005867d4          i_1 -= 1;
005867d5      } while (i != 1);
00586770  }

005867ad                                         8d 49 00                                                               .I.
005867df                                                                                               90                                 .

005867e0  void __thiscall ComponentTracker::UpdateComponentStackSize(class ComponentTracker* this, class ACCWeenieObject* arg2, enum ComponentTrackerUpdate* arg3)

005867e0  {
005867f8      void** head_ = this->componentLists[ComponentTracker::DetermineComponentCategory(this, arg2->pwd._wcid.id)]->head_;
005867f8      
005867fc      if (head_ != 0)
005867fc      {
00586807          while (head_[2] != arg2->pwd._wcid.id)
00586807          {
00586809              head_ = *(uint32_t*)head_;
00586809              
0058680d              if (head_ == 0)
00586811                  return;
00586807          }
00586807          
0058681a          ComponentData::UpdateStackSize(head_, arg2, arg3);
005867fc      }
005867e0  }

00586824              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00586830  void __fastcall ComponentData::ComponentData(class ComponentData* this, class ACCWeenieObject* arg2)

00586830  {
00586830      class ComponentData* id = this;
0058683f      this->dllist_next = 0;
00586841      this->dllist_prev = nullptr;
00586849      this->classID.id = INVALID_DID.id;
0058684c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00586858      this->componentName.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0058685b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00586862      this->componentIconID.id = INVALID_DID.id;
0058686a      this->objects.vtable = 0x79c9ac;
00586871      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(&this->objects.m_intrusiveTable, 4);
00586876      this->numItems = 0;
0058687c      class ACCWeenieObject* edi = arg2;
00586886      this->classID.id = edi->pwd._wcid.id;
00586897      this->componentIconID.id = *(uint32_t*)edi->vtable->InqIconID(&arg2);
0058689a      class AC1Legacy::PSRefBuffer<char>* m_buffer = edi->pwd._name.m_buffer;
005868a4      InterlockedIncrement(&m_buffer->m_cRef);
005868a6      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->componentName.m_buffer;
005868a6      
005868ab      if (m_buffer_1 != m_buffer)
005868ab      {
005868bd          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005868bf              m_buffer_1->vtable->__vecDelDtor(1);
005868bf          
005868cc          this->componentName.m_buffer = m_buffer;
005868cf          InterlockedIncrement(&m_buffer->m_cRef);
005868ab      }
005868ab      
005868e5      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005868e7          m_buffer->vtable->__vecDelDtor(1);
005868e7      
005868ef      uint32_t _stackSize = edi->pwd._stackSize;
005868f7      arg2 = _stackSize;
005868f7      
005868fb      if (_stackSize == 0)
005868fd          arg2 = 1;
005868fd      
00586915      id = edi->id;
00586919      HashTable<ControlSpecification,enum ControlType,0>::add(&this->objects.vtable, &id, &arg2);
0058691e      uint32_t _stackSize_1 = edi->pwd._stackSize;
0058691e      
00586926      if (_stackSize_1 != 0)
00586926      {
00586931          this->numItems += _stackSize_1;
0058693d          return;
00586926      }
00586926      
0058694e      this->numItems += 1;
00586830  }

0058695d                                                                                         90 90 90                               ...

00586960  void __fastcall ComponentData::~ComponentData(class ComponentData* this)

00586960  {
0058696a      this->objects.vtable = 0x79c9ac;
00586971      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->objects.m_intrusiveTable);
00586976      class HashTableData<unsigned long,unsigned long>** m_buckets = this->objects.m_intrusiveTable.m_buckets;
00586965      this->objects.m_intrusiveTable.vtable = 0x79c9a8;
00586965      
00586984      if (m_buckets != &this->objects.m_intrusiveTable.m_aInplaceBuckets)
00586987          operator delete[](m_buckets);
00586987      
00586965      this->objects.m_intrusiveTable.m_buckets = nullptr;
00586965      this->objects.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00586965      this->objects.m_intrusiveTable.m_numBuckets = 0;
00586965      this->objects.m_intrusiveTable.m_numElements = 0;
0058699d      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->componentName.m_buffer;
0058699d      
005869b0      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005869b2          m_buffer->vtable->__vecDelDtor(1);
00586960  }

005869be                                                                                            90 90                                ..

005869c0  void __thiscall ComponentTracker::InsertNewComponentData(class ComponentTracker* this, class ACCWeenieObject* arg2, class DLList<ComponentData>* arg3, class ComponentData* arg4)

005869c0  {
005869c9      void* eax;
005869c9      class ACCWeenieObject* edx;
005869c9      eax = operator new(0x8c);
005869ce      class ACCWeenieObject* esi = arg2;
005869d7      class DLListData* eax_1;
005869d7      
005869d7      if (eax == 0)
005869e3          eax_1 = nullptr;
005869d7      else
005869d7      {
005869d9          class ACCWeenieObject* var_c_1 = esi;
005869dc          eax_1 = ComponentData::ComponentData(eax, edx);
005869d7      }
005869d7      
005869ef      DLListBase::InsertAfter(arg3, eax_1, arg4);
00586a05      arg2 = esi->pwd._wcid.id;
00586a09      HashSet<IDClass<_tagDataID,32,0> >::add(&this->classIDHash, &arg2);
005869c0  }

00586a13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00586a20  void __thiscall ComponentTracker::AddComponent(class ComponentTracker* this, class ACCWeenieObject* arg2)

00586a20  {
00586a26      class ACCWeenieObject* esi = arg2;
00586a30      uint32_t id_1 = esi->pwd._wcid.id;
00586a3a      uint32_t id = esi->id;
00586a43      uint32_t id_2 = id_1;
00586a4f      HashTable<ControlSpecification,enum ControlType,0>::add(&this->objectIDHash.vtable, &id, &id_2);
00586a62      uint32_t id_4 = this->componentLists[ComponentTracker::DetermineComponentCategory(this, esi->pwd._wcid.id)];
00586a66      void** id_3 = *(uint32_t*)id_4;
00586a6a      id_2 = id_4;
00586a6e      id = 0;
00586a6e      
00586a76      if (id_3 != 0)
00586a76      {
00586a80          while (true)
00586a80          {
00586a80              class AC1Legacy::PSRefBuffer<char>* m_buffer = esi->pwd._name.m_buffer;
00586a8a              InterlockedIncrement(&m_buffer->m_cRef);
00586a93              char* eax_4 = (id_3[3] + 0x14);
00586a96              char (* esi_1)[0x1] = &m_buffer->m_data;
00586aa0              int32_t esi_3;
00586aa0              
00586aa0              while (true)
00586aa0              {
00586aa0                  char m_data = ADJ(esi_1)->m_data;
00586aa4                  char temp1_1 = *(uint8_t*)eax_4;
00586aa4                  bool c_1 = m_data < temp1_1;
00586aa4                  
00586aa6                  if (m_data == temp1_1)
00586aa6                  {
00586aaa                      if (m_data == 0)
00586aaa                      {
00586ac0                          esi_3 = 0;
00586ac2                          break;
00586aaa                      }
00586aaa                      
00586aac                      m_data = *(int8_t*)((char*)ADJ(esi_1) + 0x15);
00586ab1                      char temp4_1 = eax_4[1];
00586ab1                      c_1 = m_data < temp4_1;
00586ab1                      
00586ab4                      if (m_data == temp4_1)
00586ab4                      {
00586ab6                          esi_1 = &esi_1[2];
00586ab9                          eax_4 = &eax_4[2];
00586ab9                          
00586abe                          if (m_data != 0)
00586abe                              continue;
00586abe                          
00586ac0                          esi_3 = 0;
00586ac2                          break;
00586ab4                      }
00586aa6                  }
00586aa6                  
00586ac4                  bool c_2 = /* bool c_2 = unimplemented  {sbb esi, esi} */;
00586ac6                  esi_3 = ((esi_1 - esi_1) + 1);
00586ac6                  break;
00586aa0              }
00586aa0              
00586aca              int32_t eax_5;
00586aca              class ACCWeenieObject* edx_1;
00586aca              eax_5 = InterlockedDecrement(&m_buffer->m_cRef);
00586aca              
00586ad6              if ((eax_5 == 0 && m_buffer != 0))
00586ade                  edx_1 = m_buffer->vtable->__vecDelDtor(1);
00586ade              
00586ae2              if (esi_3 == 0)
00586ae2              {
00586b19                  class ACCWeenieObject* var_20_5 = arg2;
00586b1c                  ComponentData::AddItem(id_3, edx_1);
00586b28                  return;
00586ae2              }
00586ae2              
00586ae4              if (esi_3 < 0)
00586ae4              {
00586b3e                  ComponentTracker::InsertNewComponentData(this, arg2, id_2, id);
00586b4a                  return;
00586ae4              }
00586ae4              
00586ae6              esi = arg2;
00586aea              id = id_3;
00586aee              id_3 = *(uint32_t*)id_3;
00586aee              
00586af3              if (id_3 == 0)
00586af3                  break;
00586a80          }
00586a80          
00586af9          id_4 = id_2;
00586a76      }
00586a76      
00586b06      ComponentTracker::InsertNewComponentData(this, esi, id_4, id);
00586a20  }

00586b4d                                         90 90 90                                                               ...

00586b50  void __thiscall ComponentTracker::RemoveComponent(class ComponentTracker* this, class ACCWeenieObject* arg2)

00586b50  {
00586b51      class ACCWeenieObject* ebx = arg2;
00586b65      arg2 = ebx->id;
00586b69      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_1 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->objectIDHash.m_intrusiveTable, &arg2);
00586b69      
00586b70      if (eax_1 != 0)
00586b73          operator delete(eax_1);
00586b73      
00586b89      int32_t* ebp = this->componentLists[ComponentTracker::DetermineComponentCategory(this, ebx->pwd._wcid.id)];
00586b8d      void** esi = *(uint32_t*)ebp;
00586b8d      
00586b92      if (esi != 0)
00586b92      {
00586ba3          while (esi[2] != ebx->pwd._wcid.id)
00586ba3          {
00586ba5              esi = *(uint32_t*)esi;
00586ba5              
00586ba9              if (esi == 0)
00586baf                  return;
00586ba3          }
00586ba3          
00586bb5          ComponentData::RemoveItem(esi, ebx);
00586bb5          
00586bc2          if (esi[0x22] == 0)
00586bc2          {
00586bd2              arg2 = esi[2];
00586bd6              struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_6 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->classIDHash.m_intrusiveTable, &arg2);
00586bd6              
00586bdd              if (eax_6 != 0)
00586be0                  operator delete(eax_6);
00586be0              
00586beb              DLListBase::Remove(ebp, esi);
00586bf2              ComponentData::~ComponentData(esi);
00586bf8              operator delete(esi);
00586bc2          }
00586b92      }
00586b50  }

00586c07                       90 90 90 90 90 90 90 90 90                                                         .........

00586c10  void __fastcall ComponentTracker::~ComponentTracker(class ComponentTracker* this)

00586c10  {
00586c16      class ComponentTracker* this_1 = this;
00586c18      class ComponentTracker* this_2 = this_1;
00586c1c      class DLList<ComponentData>* (* ebp)[0x7] = &this_1->componentLists;
00586c1f      int32_t var_8 = 7;
00586d4d      bool cond:0_1;
00586d4d      
00586d4d      do
00586d4d      {
00586c30          class DLList<ComponentData>* ecx = ADJ(ebp)->componentLists[0];
00586c33          class DLListData* head__1 = ecx->head_;
00586c33          
00586c37          if (head__1 != 0)
00586c37          {
00586c3d              class DLListData* dllist_prev = head__1->dllist_prev;
00586c3d              
00586c42              if (dllist_prev == 0)
00586c42              {
00586c4a                  class DLListData* dllist_next = head__1->dllist_next;
00586c4e                  ecx->head_ = dllist_next;
00586c4e                  
00586c50                  if (dllist_next != 0)
00586c52                      dllist_next->dllist_prev = nullptr;
00586c42              }
00586c42              else
00586c46                  dllist_prev->dllist_next = head__1->dllist_next;
00586c46              
00586c55              class DLListData* dllist_next_1 = head__1->dllist_next;
00586c55              
00586c59              if (dllist_next_1 == 0)
00586c59              {
00586c66                  class DLListData* dllist_prev_1 = ecx->tail_->dllist_prev;
00586c6b                  ecx->tail_ = dllist_prev_1;
00586c6b                  
00586c6e                  if (dllist_prev_1 != 0)
00586c70                      dllist_prev_1->dllist_next = 0;
00586c59              }
00586c59              else
00586c5e                  dllist_next_1->dllist_prev = head__1->dllist_prev;
00586c5e              
00586c74              head__1->dllist_next = 0;
00586c76              head__1->dllist_prev = nullptr;
00586c76              
00586c79              if (head__1 != 0)
00586c79              {
00586d27                  class DLListData* head_;
00586d27                  
00586d27                  do
00586d27                  {
00586c82                      if (head__1 != 0)
00586c82                      {
00586c89                          *(int32_t*)((char*)head__1 + 0x14) = 0x79c9ac;
00586c90                          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&head__1[3]);
00586c95                          void* eax_1 = *(int32_t*)((char*)head__1 + 0x78);
00586c9d                          *(int32_t*)((char*)head__1 + 0x18) = 0x79c9a8;
00586c9d                          
00586ca3                          if (eax_1 != ((char*)head__1 + 0x1c))
00586ca6                              operator delete[](eax_1);
00586ca6                          
00586cae                          *(int32_t*)((char*)head__1 + 0x78) = 0;
00586cb1                          *(int32_t*)((char*)head__1 + 0x7c) = 0;
00586cb4                          *(int32_t*)((char*)head__1 + 0x80) = 0;
00586cb7                          *(int32_t*)((char*)head__1 + 0x84) = 0;
00586cba                          int32_t* esi_1 = *(int32_t*)((char*)head__1 + 0xc);
00586cba                          
00586ccd                          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00586cd5                              **(uint32_t**)esi_1(1);
00586cd5                          
00586cd8                          operator delete(head__1);
00586c82                      }
00586c82                      
00586ce0                      class DLList<ComponentData>* edx_4 = ADJ(ebp)->componentLists[0];
00586ce3                      head_ = edx_4->head_;
00586ce3                      
00586ce7                      if (head_ != 0)
00586ce7                      {
00586ce9                          class DLListData* dllist_prev_2 = head_->dllist_prev;
00586ce9                          
00586cee                          if (dllist_prev_2 == 0)
00586cee                          {
00586cf6                              class DLListData* dllist_next_2 = head_->dllist_next;
00586cfa                              edx_4->head_ = dllist_next_2;
00586cfa                              
00586cfc                              if (dllist_next_2 != 0)
00586cfe                                  dllist_next_2->dllist_prev = nullptr;
00586cee                          }
00586cee                          else
00586cf2                              dllist_prev_2->dllist_next = head_->dllist_next;
00586cf2                          
00586d01                          class DLListData* dllist_next_3 = head_->dllist_next;
00586d01                          
00586d05                          if (dllist_next_3 == 0)
00586d05                          {
00586d12                              class DLListData* dllist_prev_3 = edx_4->tail_->dllist_prev;
00586d17                              edx_4->tail_ = dllist_prev_3;
00586d17                              
00586d1a                              if (dllist_prev_3 != 0)
00586d1c                                  dllist_prev_3->dllist_next = 0;
00586d05                          }
00586d05                          else
00586d0a                              dllist_next_3->dllist_prev = head_->dllist_prev;
00586d0a                          
00586d1e                          head_->dllist_next = 0;
00586d20                          head_->dllist_prev = nullptr;
00586ce7                      }
00586ce7                      
00586d25                      head__1 = head_;
00586d27                  } while (head_ != 0);
00586d2d                  this_1 = this_2;
00586c79              }
00586c37          }
00586c37          
00586d31          class DLList<ComponentData>* eax_4 = ADJ(ebp)->componentLists[0];
00586d31          
00586d36          if (eax_4 != 0)
00586d39              operator delete(eax_4);
00586d39          
00586d45          ebp = &*(uint28_t*)ebp[1];
00586d48          cond:0_1 = var_8 != 1;
00586d49          var_8 -= 1;
00586d4d      } while (cond:0_1);
00586d53      this_1->classIDHash.vtable = 0x7e1ef8;
00586d65      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this_1->classIDHash.m_intrusiveTable);
00586d6a      class HashSetData<IDClass<_tagDataID,32,0> >** m_buckets = this_1->classIDHash.m_intrusiveTable.m_buckets;
00586d5d      this_1->classIDHash.m_intrusiveTable.vtable = 0x7e1ef4;
00586d5d      
00586d79      if (m_buckets != &this_1->classIDHash.m_intrusiveTable.m_aInplaceBuckets)
00586d7c          operator delete[](m_buckets);
00586d7c      
00586d5d      this_1->classIDHash.m_intrusiveTable.m_buckets = nullptr;
00586d5d      this_1->classIDHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00586d5d      this_1->classIDHash.m_intrusiveTable.m_numBuckets = 0;
00586d5d      this_1->classIDHash.m_intrusiveTable.m_numElements = 0;
00586d94      this_2->objectIDHash.vtable = &HashTable<unsigned long,class IDClass<struct _tagDataID,32,0>,0>::`vftable';
00586da0      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this_2->objectIDHash.m_intrusiveTable);
00586da5      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_buckets_1 = this_2->objectIDHash.m_intrusiveTable.m_buckets;
00586d9b      this_2->objectIDHash.m_intrusiveTable.vtable = 0x795298;
00586d9b      
00586db3      if (m_buckets_1 != &this_2->objectIDHash.m_intrusiveTable.m_aInplaceBuckets)
00586db6          operator delete[](m_buckets_1);
00586db6      
00586d9b      this_2->objectIDHash.m_intrusiveTable.m_buckets = nullptr;
00586d9b      this_2->objectIDHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00586d9b      this_2->objectIDHash.m_intrusiveTable.m_numBuckets = 0;
00586d9b      this_2->objectIDHash.m_intrusiveTable.m_numElements = 0;
00586c10  }

00586dd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00586de0  void __thiscall ComponentTracker::UpdateComponent(class ComponentTracker* this, class ACCWeenieObject* arg2, enum ComponentTrackerUpdate* arg3)

00586de0  {
00586deb      int32_t eax = ACCWeenieObject::IsOwnedByPlayer(arg2);
00586df0      uint32_t id = arg2->id;
00586e08      int32_t* eax_4 = this->objectIDHash.m_intrusiveTable.m_buckets[(COMBINE(0, id) % this->objectIDHash.m_intrusiveTable.m_numBuckets)];
00586e08      
00586e0c      if (eax_4 == 0)
00586e0c      {
00586e1b      label_586e1b:
00586e1b          eax_4 = 0;
00586e0c      }
00586e0c      else
00586e0c      {
00586e12          while (*(uint32_t*)eax_4 != id)
00586e12          {
00586e14              eax_4 = eax_4[1];
00586e14              
00586e19              if (eax_4 == 0)
00586e19                  goto label_586e1b_1;
00586e12          }
00586e12          
00586e42          if (eax_4 == 0)
00586e42          {
00586e1b          label_586e1b_1:
00586e1b              eax_4 = 0;
00586e42          }
00586e42          else
00586e44              eax_4 = 1;
00586e0c      }
00586e0c      
00586e1f      uint32_t eax_5 = ((uint32_t)eax_4);
00586e1f      
00586e22      if (eax != 0)
00586e22      {
00586e28          if (eax_5 != 0)
00586e28          {
00586e6a              ComponentTracker::UpdateComponentStackSize(this, arg2, arg3);
00586e72              return;
00586e28          }
00586e28          
00586e2b          ComponentTracker::AddComponent(this, arg2);
00586e36          *(uint32_t*)arg3 = CT_CHANGE_ADD;
00586e3d          return;
00586e22      }
00586e22      
00586e4a      if (eax_5 == 0)
00586e4a      {
00586e7b          *(uint32_t*)arg3 = CT_CHANGE_NONE;
00586e82          return;
00586e4a      }
00586e4a      
00586e4f      ComponentTracker::RemoveComponent(this, arg2);
00586e5a      *(uint32_t*)arg3 = CT_CHANGE_REMOVE;
00586de0  }

00586e85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00586e90  int32_t ItemHolder::CheckHookStatus(class ACCWeenieObject* arg1, class ACCWeenieObject* arg2, int32_t* arg3)

00586e90  {
00586e9c      *(uint32_t*)arg3 = 0;
00586e9c      
00586eaa      if ((arg1 != 0 && arg2 != 0))
00586eaa      {
00586eac          uint32_t _hook_type_1 = arg2->pwd._hook_type;
00586eb4          enum ITEM_TYPE _hook_item_types = arg2->pwd._hook_item_types;
00586eb4          
00586ebe          if ((_hook_type_1 == 0 || _hook_item_types == TYPE_UNDEF))
00586ec7              return 1;
00586ec7          
00586ed2          if (arg2->pwd._house_owner_iid != 0)
00586ed2          {
00586edf              uint32_t _hook_type = arg1->pwd._hook_type;
00586edf              
00586eeb              if ((_hook_type != 0 && (_hook_type_1 & _hook_type) != 0))
00586eeb              {
00586ef2                  int32_t eax_6 = (arg1->vtable->InqType() & _hook_item_types);
00586ef4                  int32_t eax_7 = -(eax_6);
00586efc                  return -((eax_7 - eax_7));
00586eeb              }
00586ed2          }
00586ed2          else
00586ed4              *(uint32_t*)arg3 = 1;
00586eaa      }
00586eaa      
00586ede      return 0;
00586e90  }

00586efd                                                                                         90 90 90                               ...

00586f00  uint32_t ItemHolder::GetObjectSplitSize(class ACCWeenieObject* arg1)

00586f00  {
00586f0d      if (arg1->id == ACCWeenieObject::selectedID)
00586f14          return GenItemHolder::splitSize;
00586f14      
00586f15      uint32_t _stackSize = arg1->pwd._stackSize;
00586f15      
00586f1d      if (_stackSize != 0)
00586f24          return _stackSize;
00586f24      
00586f1f      return 1;
00586f00  }

00586f25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00586f30  int32_t ItemHolder::IsMergeAttemptLegal(uint32_t arg1, uint32_t arg2, int32_t arg3)

00586f30  {
00586f3f      int32_t result = ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(arg3);
00586f3f      
00586f49      if (result == 0)
00586f52          return result;
00586f52      
00586f65      if (arg1 != arg2)
00586f65      {
00586f6c          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg1);
00586f74          class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
00586f74          
00586f99          if ((eax_1 != 0 && (eax_2 != 0 && eax_1->pwd._maxStackSize > 1)))
00586f99          {
00586f9f              uint32_t _maxStackSize = eax_2->pwd._maxStackSize;
00586f9f              
00586fa7              if (_maxStackSize > 1)
00586fa7              {
00586fb9                  void var_94;
00586fb9                  void var_90;
00586fb9                  
00586fb9                  if ((eax_1->tradeState == 1 || eax_2->tradeState == 1))
00586fb9                  {
00587062                      if (arg3 == 0)
00587062                      {
00587068                          StringInfo::StringInfo(&var_90);
00587076                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You cannot merge items while the…");
00587085                          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
0058708e                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
0058709a                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005870a6                          StringInfo::~StringInfo(&var_90);
00587062                      }
00586fb9                  }
00586fb9                  else if (eax_1->pwd._wcid.id == eax_2->pwd._wcid.id)
00586fcb                  {
00587014                      if (eax_2->pwd._stackSize < _maxStackSize)
0058705f                          return 1;
0058705f                      
00587018                      if (arg3 == 0)
00587018                      {
00587022                          StringInfo::StringInfo(&var_90);
00587030                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"The destination stack is already…");
0058703f                          StringInfo::SetLiteralValue(&var_90, &var_94, 1);
00587048                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
0058709a                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005870a6                          StringInfo::~StringInfo(&var_90);
00587018                      }
00586fcb                  }
00586fcb                  else if (arg3 == 0)
00586fcf                  {
00586fd9                      StringInfo::StringInfo(&var_90);
00586fe7                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You cannot merge different types…");
00586ff6                      StringInfo::SetLiteralValue(&var_90, &var_94, 1);
00586fff                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
0058709a                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005870a6                      StringInfo::~StringInfo(&var_90);
00586fcf                  }
00586fa7              }
00586f99          }
00586f65      }
00586f65      
005870b6      return 0;
00586f30  }

005870b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005870c0  int32_t ItemHolder::AttemptToPlaceInContainer_IsItemLegal(uint32_t arg1, int32_t arg2)

005870c0  {
005870c6      int32_t __saved_esi_1;
005870c6      int32_t __saved_esi = __saved_esi_1;
005870c7      int32_t __saved_edi_1;
005870c7      int32_t __saved_edi = __saved_edi_1;
005870cf      uint32_t m_charbuffer = arg1;
005870d0      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(m_charbuffer);
005870dc      uint32_t var_a8;
005870dc      void* var_98;
005870dc      void __return;
005870dc      void var_90;
005870dc      uint32_t* esp_1;
005870dc      
005870dc      if (eax != 0)
005870dc      {
00587158          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0058715f          uint32_t player_id;
0058715f          
0058715f          if (SmartBox::smartbox_1 == 0)
00587169              player_id = 0;
0058715f          else
00587161              player_id = SmartBox::smartbox_1->player_id;
00587161          
0058716d          if (arg1 != player_id)
0058716d          {
005871da              if (eax->vtable->InqType() != 0x10)
005871da              {
00587240                  if ((((eax->pwd._bitfield & 4) == 0 || eax->pwd._containerID != 0) || eax->pwd._wielderID != 0))
00587240                  {
005872b7                      if ((ACCWeenieObject::IsOwnedByPlayer(eax) != 0 || eax->pwd._location == 0))
005872b7                      {
0058732f                          if ((ACCWeenieObject::IsContainer(eax) == 0 || eax->pwd._containersCapacity == 0))
005873c2                              return 1;
005873c2                          
0058733e                          if (arg2 == 0)
0058733e                          {
00587340                              m_charbuffer = 0;
00587342                              var_a8 = 2;
00587352                              m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax, &__return, var_a8, m_charbuffer)->m_charbuffer;
00587353                              var_a8 = u"The %s can't be picked up!";
0058735c                              int32_t var_ac_6 = 0;
0058735f                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, var_a8);
0058736b                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00587374                              StringInfo::StringInfo(&var_90);
00587379                              m_charbuffer = 1;
0058737f                              var_a8 = &var_98;
00587384                              StringInfo::SetLiteralValue(&var_90, var_a8, m_charbuffer);
0058738d                              m_charbuffer = &var_90;
0058738d                              goto label_58738e;
0058733e                          }
005872b7                      }
005872b7                      else if (arg2 == 0)
005872c2                      {
005872c8                          m_charbuffer = 0;
005872ca                          var_a8 = 2;
005872da                          m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax, &__return, var_a8, m_charbuffer)->m_charbuffer;
005872db                          var_a8 = u"The %s is being wielded by someo…";
005872e4                          int32_t var_ac_4 = 0;
005872e7                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, var_a8);
005872f3                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005872fc                          StringInfo::StringInfo(&var_90);
00587301                          m_charbuffer = 1;
00587307                          var_a8 = &var_98;
0058730c                          StringInfo::SetLiteralValue(&var_90, var_a8, m_charbuffer);
00587315                          m_charbuffer = &var_90;
00587316                          goto label_58738e;
005872c2                      }
00587240                  }
00587240                  else if (arg2 == 0)
0058724b                  {
00587251                      m_charbuffer = 0;
00587253                      var_a8 = 2;
00587263                      m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax, &__return, var_a8, m_charbuffer)->m_charbuffer;
00587264                      var_a8 = u"The %s cannot be picked up!";
0058726d                      int32_t var_ac_2 = 0;
00587270                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, var_a8);
0058727c                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00587285                      StringInfo::StringInfo(&var_90);
0058728a                      m_charbuffer = 1;
00587290                      var_a8 = &var_98;
00587295                      StringInfo::SetLiteralValue(&var_90, var_a8, m_charbuffer);
0058729e                      m_charbuffer = &var_90;
0058738e                  label_58738e:
0058738e                      var_a8 = 0x1a;
00587390                      ECM_UI::SendNotice_DisplayStringInfo(var_a8, m_charbuffer);
0058739c                      StringInfo::~StringInfo(&var_90);
005873a5                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
0058724b                  }
005871da              }
005871da              else if (arg2 == 0)
005871e5              {
005871ef                  StringInfo::StringInfo(&var_90);
005871f4                  m_charbuffer = u"You cannot pick up creatures!";
005871fd                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, m_charbuffer);
00587202                  m_charbuffer = 1;
00587208                  var_a8 = &var_98;
0058720d                  StringInfo::SetLiteralValue(&var_90, var_a8, m_charbuffer);
00587216                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
0058721f                  m_charbuffer = &var_90;
0058721f                  esp_1 = &m_charbuffer;
0058713a              label_58713a:
0058713a                  *(uint32_t*)((char*)esp_1 - 4) = 0x1a;
0058713c                  ECM_UI::SendNotice_DisplayStringInfo();
00587148                  StringInfo::~StringInfo(&esp_1[5]);
0058713a                  esp_1[1];
0058713a                  esp_1[2];
005871e5              }
0058716d          }
0058716d          else if (arg2 == 0)
00587178          {
00587182              StringInfo::StringInfo(&var_90);
00587187              m_charbuffer = u"You cannot place yourself within…";
00587190              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, m_charbuffer);
00587195              m_charbuffer = 1;
0058719b              var_a8 = &var_98;
005871a0              StringInfo::SetLiteralValue(&var_90, var_a8, m_charbuffer);
005871a9              void* esi_5 = ((char*)var_98 - 0x14);
005871af              m_charbuffer = ((char*)esi_5 + 4);
005871af              
005871bc              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_5 != 0))
005871bc              {
005871be                  int32_t eax_6 = *(uint32_t*)esi_5;
005871c0                  var_a8 = 1;
005871c4                  *(uint32_t*)eax_6(var_a8);
005871bc              }
005871bc              
005871ca              var_a8 = &__return;
005871ca              esp_1 = &var_a8;
005871cb              goto label_58713a;
00587178          }
005870dc      }
005870dc      else if (arg2 == 0)
005870e7      {
005870f1          StringInfo::StringInfo(&var_90);
005870f6          m_charbuffer = u"That item is not valid!";
005870ff          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, m_charbuffer);
00587104          m_charbuffer = 1;
0058710a          var_a8 = &var_98;
0058710f          StringInfo::SetLiteralValue(&var_90, var_a8, m_charbuffer);
00587118          int32_t* esi_2 = ((char*)var_98 - 0x14);
0058711e          m_charbuffer = &esi_2[1];
0058711e          
0058712b          if ((InterlockedDecrement(m_charbuffer) == 0 && esi_2 != 0))
0058712b          {
0058712d              int32_t edx_1 = *(uint32_t*)esi_2;
0058712f              var_a8 = 1;
00587133              *(uint32_t*)edx_1(var_a8);
0058712b          }
0058712b          
00587139          var_a8 = &__return;
00587139          esp_1 = &var_a8;
00587139          goto label_58713a;
005870e7      }
005873b4      return 0;
005870c0  }

005873c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005873d0  int32_t ItemHolder::AttemptSetGroundObject(uint32_t arg1)

005873d0  {
005873d6      class ClientUISystem* result = ClientUISystem::GetUISystem();
005873d6      
005873dd      if (result == 0)
005873e5          return result;
005873e5      
005873f0      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg1);
005873f0      
00587403      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
00587403      {
00587407          void* var_98;
00587407          void var_90;
00587407          
00587407          if (eax != 0)
00587407          {
0058747b              if ((eax->pwd._bitfield & 1) != 0)
0058747b              {
00587506                  ClientUISystem::SetGroundObject(ClientUISystem::GetUISystem(), arg1, 1);
00587518                  return 1;
0058747b              }
0058747b              
00587481              int32_t eax_4 = eax->vtable->IsCreature();
00587481              
00587486              if (eax_4 == 0)
00587486              {
00587499                  void __return;
00587499                  class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax, &__return, NAME_APPROPRIATE, eax_4)->m_charbuffer;
005874a6                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"The %s is locked");
005874b2                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005874bb                  StringInfo::StringInfo(&var_90);
005874cb                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
005874d7                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005874e3                  StringInfo::~StringInfo(&var_90);
005874ec                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
00587486              }
00587486              
005874fb              return 0;
00587407          }
00587407          
0058740d          StringInfo::StringInfo(&var_90);
0058741b          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"The object has no representation…");
0058742b          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00587434          int32_t* esi_2 = ((char*)var_98 - 0x14);
00587434          
00587447          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0058744f              **(uint32_t**)esi_2(1);
0058744f          
00587458          ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00587464          StringInfo::~StringInfo(&var_90);
00587403      }
00587403      
00587473      return 0;
005873d0  }

00587519                                                                             90 90 90 90 90 90 90                           .......

00587520  uint8_t ItemHolder::TargetCompatibleWithObject(uint32_t arg1, uint32_t arg2, uint8_t arg3, uint8_t arg4)

00587520  {
00587541      uint32_t eax;
00587541      
00587541      if ((arg1 != 0 && arg2 != 0))
00587541      {
00587548          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
0058755a          uint32_t edi_1 = ClientObjMaintSystem::GetWeenieObject(arg1);
0058755a          
00587564          if ((eax_1 != 0 && edi_1 != 0))
00587564          {
00587575              void var_94;
00587575              ItemUses::ItemUses(&var_94, eax_1->pwd._useability);
00587583              wchar16 const* const var_b4_2;
00587583              wchar16 const* const var_b4_4;
00587583              void* var_b0_3;
00587583              void var_a0;
00587583              void __return;
00587583              void var_90;
00587583              
00587583              if (ACCWeenieObject::IsOwnedByPlayer(eax_1) != 0)
00587583              {
0058765e              label_58765e:
00587662                  wchar16 const* const var_b4_6;
00587662                  void* ecx_22;
00587662                  
00587662                  if (*(uint32_t*)(edi_1 + 0x78) != 1)
00587662                  {
00587699                      if (ACCWeenieObject::IsOwnedByPlayer(edi_1) != 0)
00587699                      {
0058771a                      label_58771a:
0058771a                          
00587721                          if (arg1 != GetPlayerID())
00587721                          {
005877bb                          label_5877bb:
005877c8                              void __return_1;
005877c8                              
005877c8                              if ((eax_1->pwd._targetType & *(uint32_t*)(*(uint32_t*)edi_1 + 0x18)()) != 0)
005877c8                              {
00587823                                  eax = arg4;
00587823                                  
0058782c                                  if (eax != 0)
0058782c                                  {
00587844                                      class PSRefBufferCharData<unsigned short>* m_charbuffer_8 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return_1, NAME_APPROPRIATE, 0)->m_charbuffer;
00587851                                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, Formatted, u"Using the %s");
0058785d                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0058786f                                      uint16_t* var_b0_4;
0058786f                                      
0058786f                                      if (*(uint32_t*)(*(uint32_t*)edi_1 + 0x10)() == 0)
00587878                                          var_b0_4 = u" with the ";
0058786f                                      else
00587871                                          var_b0_4 = u" on ";
00587871                                      
0058787d                                      PStringBase<unsigned short>::append_string(&var_a0, var_b0_4);
00587897                                      PStringBase<unsigned short>::append_string(&var_a0, ACCWeenieObject::GetObjectNameWide(edi_1, &__return_1, NAME_APPROPRIATE, 0));
005878a0                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
005878a9                                      StringInfo::StringInfo(&var_90);
005878b9                                      StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
005878c5                                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005878d1                                      StringInfo::~StringInfo(&var_90);
005878da                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a0);
0058782c                                  }
0058782c                                  
005878e1                                  eax = 1;
005878ea                                  return 1;
005877c8                              }
005877c8                              
005877ca                              eax = arg3;
005877ca                              
005877d3                              if (eax == 0)
005877d3                              {
005877e0                                  class PStringBase<unsigned short>* eax_13 = ACCWeenieObject::GetObjectNameWide(edi_1, &__return_1, NAME_APPROPRIATE, 0);
005877f2                                  class PStringBase<unsigned short>* eax_14 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0);
005877fb                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_7 = eax_13->m_charbuffer;
005877fc                                  class PSRefBufferCharData<unsigned short>* m_charbuffer = eax_14->m_charbuffer;
00587809                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, Formatted, u"Cannot use the %s with the %s");
00587815                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0058781a                                  ecx_22 = &__return_1;
0058781e                                  goto label_58776e;
005877d3                              }
00587721                          }
00587721                          else
00587721                          {
00587732                              if (ItemUses::IsUseable_SelfTarget(&var_94) != 0)
00587732                                  goto label_5877bb;
00587732                              
00587738                              eax = arg3;
00587738                              
00587741                              if (eax == 0)
00587741                              {
00587755                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_6 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00587756                                  var_b4_6 = u"Cannot use the %s on yourself";
00587756                                  goto label_587762;
00587741                              }
00587721                          }
00587699                      }
00587699                      else
00587699                      {
0058769f                          eax = ItemUses::GetLeastLimitedTargetUse(&var_94);
0058769f                          
005876a6                          if ((eax & 8) == 0)
005876a6                          {
005876ec                              if ((eax & 4) == 0)
005876ec                                  goto label_58771a;
005876ec                              
005876ee                              eax = arg3;
005876ee                              
005876f7                              if (eax == 0)
005876f7                              {
0058770f                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00587710                                  var_b4_4 = u"You can't use the %s on what you…";
00587715                                  goto label_58762a;
005876f7                              }
005876a6                          }
005876a6                          else
005876a6                          {
005876af                              if ((arg1 == GetPlayerID() && ItemUses::IsUseable_SelfTarget(&var_94) != 0))
005876bc                                  goto label_58771a;
005876bc                              
005876be                              eax = arg3;
005876be                              
005876c7                              if (eax == 0)
005876c7                              {
005876df                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
005876e0                                  var_b4_2 = u"You can't use the %s on what you…";
005876e5                                  goto label_5875c4;
005876c7                              }
005876a6                          }
00587699                      }
00587662                  }
00587662                  else
00587662                  {
00587664                      eax = arg3;
00587664                      
0058766d                      if (eax == 0)
0058766d                      {
00587685                          class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00587686                          var_b4_6 = u"You can't use the %s on an item …";
00587762                      label_587762:
00587762                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, Formatted, var_b4_6);
0058776a                          ecx_22 = &__return;
0058776e                      label_58776e:
0058776e                          PStringBase<unsigned short>::~PStringBase<unsigned short>(ecx_22);
00587777                          StringInfo::StringInfo(&var_90);
00587787                          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
00587790                          var_b0_3 = &var_90;
00587790                          goto label_587793;
0058766d                      }
00587662                  }
00587583              }
00587583              else
00587583              {
0058758d                  eax = ItemUses::GetLeastLimitedSourceUse(&var_94);
0058758d                  
00587594                  if ((eax & 8) == 0)
00587594                  {
005875fa                      if ((eax & 4) == 0)
005875fa                          goto label_58765e;
005875fa                      
005875fc                      eax = arg3;
005875fc                      
00587605                      if (eax == 0)
00587605                      {
0058761d                          class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0058761e                          var_b4_4 = u"You must wield the %s to use it";
0058762a                      label_58762a:
0058762a                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, Formatted, var_b4_4);
00587636                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0058763f                          StringInfo::StringInfo(&var_90);
0058764f                          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
00587658                          var_b0_3 = &var_90;
00587659                          goto label_587793;
00587605                      }
00587594                  }
00587594                  else
00587594                  {
00587596                      eax = arg3;
00587596                      
0058759f                      if (eax == 0)
0058759f                      {
005875b7                          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
005875b8                          var_b4_2 = u"You must own the %s to use it";
005875c4                      label_5875c4:
005875c4                          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_a0, Formatted, var_b4_2);
005875d0                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005875d9                          StringInfo::StringInfo(&var_90);
005875e9                          StringInfo::SetLiteralValue(&var_90, &var_a0, 1);
005875f2                          var_b0_3 = &var_90;
00587793                      label_587793:
00587793                          ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_b0_3);
0058779f                          StringInfo::~StringInfo(&var_90);
005877a8                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_a0);
0058759f                      }
00587594                  }
00587583              }
00587564          }
00587541      }
00587541      
005877af      eax = 0;
005877b8      return 0;
00587520  }

005878eb                                   90 90 90 90 90                                                             .....

005878f0  int32_t ItemHolder::AttemptMerge(uint32_t arg1, uint32_t arg2, int32_t arg3)

005878f0  {
005878fc      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg1);
00587908      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
00587916      int32_t result = ItemHolder::IsMergeAttemptLegal(arg1, arg2, arg3);
00587916      
00587920      if (result == 0)
00587929          return result;
00587929      
00587933      uint32_t edx;
00587933      
00587933      if (eax->id != ACCWeenieObject::selectedID)
00587933      {
0058793d          edx = eax->pwd._stackSize;
0058793d          
00587945          if (edx == 0)
00587947              edx = 1;
00587933      }
00587933      else
00587935          edx = GenItemHolder::splitSize;
00587935      
0058794c      uint32_t _stackSize = eax_1->pwd._stackSize;
00587954      uint32_t _maxStackSize = eax_1->pwd._maxStackSize;
0058795a      uint32_t var_8 = edx;
0058795a      
0058795e      if (_stackSize == 0)
00587960          _stackSize = 1;
00587960      
00587965      uint32_t eax_3 = (_maxStackSize - _stackSize);
00587967      uint32_t var_4 = eax_3;
0058796d      uint32_t* eax_4 = &var_8;
0058796d      
00587971      if (edx >= eax_3)
00587973          eax_4 = &var_4;
00587973      
0058797d      ACCWeenieObject::UIAttemptMerge(eax, arg2, *(uint32_t*)eax_4);
00587984      CM_UI::SendNotice_FullMergingItem(arg1, arg2);
0058798c      ACCWeenieObject::SetSelectedObject(arg2, 0);
005879a0      return 1;
005878f0  }

005879a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005879b0  int32_t ItemHolder::AttemptToPlaceInContainer_IsContainerLegal(uint32_t arg1, uint32_t arg2, int32_t arg3)

005879b0  {
005879b7      int32_t edi;
005879b7      int32_t var_a0 = edi;
005879c0      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
005879cc      int32_t* var_a8_2;
005879cc      class PStringBase<unsigned short> var_98;
005879cc      int32_t __return;
005879cc      void var_90;
005879cc      
005879cc      if (eax != 0)
005879cc      {
00587a51          if (arg1 != arg2)
00587a51          {
00587abb              uint32_t player_id;
00587abb              
00587abb              if ((eax->pwd._bitfield & 1) == 0)
00587abb              {
00587abd                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00587abd                  
00587ac4                  if (SmartBox::smartbox_1 == 0)
00587ace                      player_id = 0;
00587ac4                  else
00587ac6                      player_id = SmartBox::smartbox_1->player_id;
00587abb              }
00587abb              
00587ad2              void* var_a4_2;
00587ad2              
00587ad2              if (((eax->pwd._bitfield & 1) != 0 || arg2 == player_id))
00587ad2              {
00587b3a                  if (eax->tradeState != 1)
00587b3a                  {
00587bb2                      if (ItemHolder::CheckHookStatus(ClientObjMaintSystem::GetWeenieObject(arg1), eax, &__return) != 0)
00587c39                          return 1;
00587c39                      
00587bbd                      if (arg3 == 0)
00587bbd                      {
00587bc8                          uint16_t* edx_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"That item cannot be placed on th…");
00587bcd                          int32_t __return_1 = __return;
00587bcd                          
00587bd3                          if (__return_1 != 0)
00587bd3                          {
00587bd9                              wchar16 const* const var_a4_4 = u" You must own the house to manip…";
00587bde                              class PStringBase<unsigned short>* var_a8_7 = &var_98;
00587bdf                              PStringBase<unsigned short>::sprintf_append(__return_1, edx_4);
00587bd3                          }
00587bd3                          
00587beb                          StringInfo::StringInfo(&var_90);
00587bfb                          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00587c04                          var_a4_2 = &var_90;
00587c04                          goto label_587c07;
00587bbd                      }
00587b3a                  }
00587b3a                  else if (arg3 == 0)
00587b45                  {
00587b5d                      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(eax, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00587b6a                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"The %s is being traded");
00587b76                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00587b7f                      StringInfo::StringInfo(&var_90);
00587b8f                      StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00587b98                      var_a4_2 = &var_90;
00587c07                  label_587c07:
00587c07                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_a4_2);
00587c13                      StringInfo::~StringInfo(&var_90);
00587c1c                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_98);
00587b45                  }
00587ad2              }
00587ad2              else if (arg3 == 0)
00587add              {
00587af5                  class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(eax, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00587b02                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, Formatted, u"The %s is locked");
00587b0e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00587b17                  StringInfo::StringInfo(&var_90);
00587b27                  StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00587b30                  var_a4_2 = &var_90;
00587b31                  goto label_587c07;
00587add              }
00587a51          }
00587a51          else if (arg3 == 0)
00587a5c          {
00587a66              StringInfo::StringInfo(&var_90);
00587a74              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"You cannot place an object withi…");
00587a84              StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00587a8d              int32_t* esi_5 = (var_98 - 0x14);
00587a8d              
00587aa0              if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00587aa8                  **(uint32_t**)esi_5(1);
00587aa8              
00587aae              var_a8_2 = &__return;
00587a2c          label_587a2c:
00587a2c              ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_a8_2);
00587a38              StringInfo::~StringInfo(&__return);
00587a5c          }
005879cc      }
005879cc      else if (arg3 == 0)
005879d7      {
005879e1          StringInfo::StringInfo(&var_90);
005879ef          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_98, u"The destination container is not…");
005879ff          StringInfo::SetLiteralValue(&var_90, &var_98, 1);
00587a08          int32_t* esi_2 = (var_98 - 0x14);
00587a08          
00587a1b          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00587a23              **(uint32_t**)esi_2(1);
00587a23          
00587a29          var_a8_2 = &__return;
00587a29          goto label_587a2c;
005879d7      }
00587c2b      return 0;
005879b0  }

00587c3a                                                                                90 90 90 90 90 90                            ......

00587c40  int32_t ItemHolder::AttemptAutoMerge(uint32_t arg1, uint32_t arg2, uint32_t arg3)

00587c40  {
00587c4c      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg1);
00587c58      class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
00587c64      class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(arg3);
00587c64      
00587c93      if ((eax != 0 && (eax_2 != 0 && ((arg3 == 0 || eax_3 != 0) && eax->pwd._maxStackSize > 1))))
00587c93      {
00587c9c          void __return;
00587c9c          ACCWeenieObject::GetExhaustiveContainedItemsList(eax_2, &__return);
00587ca5          int32_t ebx_1 = 0;
00587ca9          int32_t var_8;
00587ca9          
00587ca9          if (var_8 > 0)
00587ca9          {
00587d07              do
00587d07              {
00587cb5                  uint32_t eax_5 = IDList::GetByNum(&__return, ebx_1);
00587cbd                  class ACCWeenieObject* eax_6 = ClientObjMaintSystem::GetWeenieObject(eax_5);
00587cbd                  
00587ccd                  if (((eax_6 != 0 && arg1 != eax_5) && ItemHolder::IsMergeAttemptLegal(arg1, eax_5, 1) != 0))
00587ccd                  {
00587ce5                      uint32_t _stackSize = eax_6->pwd._stackSize;
00587ce5                      
00587ced                      if (_stackSize == 0)
00587cef                          _stackSize = 1;
00587cef                      
00587cfe                      if (GenItemHolder::splitSize <= (eax_6->pwd._maxStackSize - _stackSize))
00587cfe                      {
00587d22                          if (eax_3 != 0)
00587d2c                              IDList::IsInList(ACCWeenieObject::GetContainedItemsList(eax_3), eax_5);
00587d2c                          
00587d35                          int32_t result = ItemHolder::AttemptMerge(arg1, eax_5, 0);
00587d43                          IDList::~IDList(&__return);
00587d51                          return result;
00587cfe                      }
00587ccd                  }
00587ccd                  
00587d04                  ebx_1 += 1;
00587d07              } while (ebx_1 < var_8);
00587ca9          }
00587ca9          
00587d0d          IDList::~IDList(&__return);
00587c93      }
00587c93      
00587d1b      return 0;
00587c40  }

00587cad                                         8d 49 00                                                               .I.
00587d52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00587d60  int32_t ItemHolder::WillItemFitInContainer(uint32_t arg1, uint32_t arg2)

00587d60  {
00587d69      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg2);
00587d69      
00587d7d      if ((eax != 0 && arg1 != arg2))
00587d7d      {
00587d86          uint32_t player_id;
00587d86          
00587d86          if ((eax->pwd._bitfield & 1) == 0)
00587d86          {
00587d88              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00587d88              
00587d8f              if (SmartBox::smartbox_1 == 0)
00587d99                  player_id = 0;
00587d8f              else
00587d91                  player_id = SmartBox::smartbox_1->player_id;
00587d86          }
00587d86          
00587d9d          int32_t __saved_ecx;
00587d9d          
00587d9d          if (((((eax->pwd._bitfield & 1) != 0 || arg2 == player_id) && eax->tradeState != 1) && ItemHolder::CheckHookStatus(ClientObjMaintSystem::GetWeenieObject(arg1), eax, &__saved_ecx) != 0))
00587d9d          {
00587dc7              class ACCWeenieObject* eax_4 = ClientObjMaintSystem::GetWeenieObject(arg1);
00587dcf              class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(arg2);
00587dcf              
00587de3              if ((eax_4 != 0 && eax_5 != 0))
00587de3              {
00587df2                  if (ACCWeenieObject::IsContainer(eax_4) == 0)
00587df2                  {
00587e33                      int32_t _itemsCapacity = eax_5->pwd._itemsCapacity;
00587e33                      
00587e3c                      if (_itemsCapacity == 0xffffffff)
00587e32                          return 1;
00587e32                      
00587e47                      if (ACCWeenieObject::GetNumContainedItems(eax_5) < _itemsCapacity)
00587e32                          return 1;
00587e32                      
00587e55                      if (((GenItemHolder::splitSize == GenItemHolder::maxSplitSize && ACCWeenieObject::GetContainedItemsList(eax_5) != 0) && IDList::IsInList(ACCWeenieObject::GetContainedItemsList(eax_5), arg1) != 0))
00587e7f                          return 1;
00587df2                  }
00587df2                  else
00587df2                  {
00587df4                      int32_t _containersCapacity = eax_5->pwd._containersCapacity;
00587df4                      
00587dfd                      if (_containersCapacity == 0xffffffff)
00587e32                          return 1;
00587e32                      
00587e08                      if (ACCWeenieObject::GetNumContainedContainers(eax_5) < _containersCapacity)
00587e32                          return 1;
00587e32                      
00587e13                      if ((ACCWeenieObject::GetContainedContainersList(eax_5) != 0 && IDList::IsInList(ACCWeenieObject::GetContainedContainersList(eax_5), arg1) != 0))
00587e32                          return 1;
00587df2                  }
00587de3              }
00587d9d          }
00587d7d      }
00587d7d      
00587dc4      return 0;
00587d60  }

00587e88                          90 90 90 90 90 90 90 90                                                          ........

00587e90  int32_t ItemHolder::IsDragIntoContainerAttemptLegal(uint32_t arg1, uint32_t arg2)

00587e90  {
00587e93      int32_t result = ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(1);
00587e93      
00587e9d      if (result == 0)
00587ea0          return result;
00587ea0      
00587eaa      class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(arg1);
00587eaa      
00587eb6      if (eax != 0)
00587eb6      {
00587ebc          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00587ec3          uint32_t player_id;
00587ec3          
00587ec3          if (SmartBox::smartbox_1 == 0)
00587ecd              player_id = 0;
00587ec3          else
00587ec5              player_id = SmartBox::smartbox_1->player_id;
00587ec5          
00587ed1          if ((((arg1 != player_id && (eax->vtable->InqType() != 0x10 && (((eax->pwd._bitfield & 4) == 0 || eax->pwd._containerID != 0) || eax->pwd._wielderID != 0))) && (ACCWeenieObject::IsOwnedByPlayer(eax) != 0 || eax->pwd._location == 0)) && (ACCWeenieObject::IsContainer(eax) == 0 || eax->pwd._containersCapacity == 0)))
00587ed1          {
00587f3f              class ACCWeenieObject* eax_9 = ClientObjMaintSystem::GetWeenieObject(arg2);
00587f3f              
00587f53              if ((eax_9 != 0 && arg1 != arg2))
00587f53              {
00587f60                  uint32_t player_id_1;
00587f60                  
00587f60                  if ((eax_9->pwd._bitfield & 1) == 0)
00587f60                  {
00587f62                      class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
00587f62                      
00587f69                      if (SmartBox::smartbox_2 == 0)
00587f73                          player_id_1 = 0;
00587f69                      else
00587f6b                          player_id_1 = SmartBox::smartbox_2->player_id;
00587f60                  }
00587f60                  
00587f77                  int32_t __saved_ecx;
00587f77                  
00587f77                  if (((((eax_9->pwd._bitfield & 1) != 0 || arg2 == player_id_1) && eax_9->tradeState != 1) && ItemHolder::CheckHookStatus(ClientObjMaintSystem::GetWeenieObject(arg1), eax_9, &__saved_ecx) != 0))
00587f77                  {
00587fa5                      class ACCWeenieObject* eax_12 = ClientObjMaintSystem::GetWeenieObject(arg1);
00587fad                      class ACCWeenieObject* eax_13 = ClientObjMaintSystem::GetWeenieObject(arg2);
00587fad                      
00587fc1                      if ((eax_12 != 0 && eax_13 != 0))
00587fc1                      {
00587fd0                          if (ACCWeenieObject::IsContainer(eax_12) == 0)
00587fd0                          {
00588008                          label_588008:
00588008                              
0058800f                              if (ACCWeenieObject::IsContainer(eax_12) != 0)
0058805d                                  return 1;
0058805d                              
00588011                              int32_t _itemsCapacity = eax_13->pwd._itemsCapacity;
00588011                              
0058801a                              if (_itemsCapacity == 0xffffffff)
0058805d                                  return 1;
0058805d                              
00588025                              if (ACCWeenieObject::GetNumContainedItems(eax_13) < _itemsCapacity)
0058805d                                  return 1;
0058805d                              
00588033                              if (((GenItemHolder::splitSize == GenItemHolder::maxSplitSize && ACCWeenieObject::GetContainedItemsList(eax_13) != 0) && IDList::IsInList(ACCWeenieObject::GetContainedItemsList(eax_13), arg1) != 0))
0058805d                                  return 1;
00587fd0                          }
00587fd0                          else
00587fd0                          {
00587fd2                              int32_t _containersCapacity = eax_13->pwd._containersCapacity;
00587fd2                              
00587fdb                              if (_containersCapacity == 0xffffffff)
00587fdb                                  goto label_588008;
00587fdb                              
00587fe6                              if (ACCWeenieObject::GetNumContainedContainers(eax_13) < _containersCapacity)
00587fe6                                  goto label_588008;
00587fe6                              
00587ff1                              if ((ACCWeenieObject::GetContainedContainersList(eax_13) != 0 && IDList::IsInList(ACCWeenieObject::GetContainedContainersList(eax_13), arg1) != 0))
00588004                                  goto label_588008;
00587fd0                          }
00587fc1                      }
00587f77                  }
00587f53              }
00587ed1          }
00587eb6      }
00587eb6      
00588065      return 0;
00587e90  }

00588066                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00588070  uint8_t ItemHolder::IsTargetCompatibleWithTargetingObject(uint32_t arg1)

00588070  {
00588071      uint32_t ebx = arg1;
00588079      class ACCWeenieObject* ItemHolder::targetingObject_1;
00588079      
00588079      if (ebx != 0)
00588079      {
0058807f          ItemHolder::targetingObject_1 = ItemHolder::targetingObject;
0058807f          
00588086          if (ItemHolder::targetingObject_1 != 0)
00588086          {
00588089              class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(ItemHolder::targetingObject_1);
0058809b              class ACCWeenieObject* edi_1 = ClientObjMaintSystem::GetWeenieObject(ebx);
0058809b              
005880a1              if ((eax != 0 && edi_1 != 0))
005880a1              {
005880ae                  ItemUses::ItemUses(&arg1, eax->pwd._useability);
005880b5                  ItemHolder::targetingObject_1 = ACCWeenieObject::IsOwnedByPlayer(eax);
005880b5                  
005880bc                  if (ItemHolder::targetingObject_1 != 0)
005880bc                  {
005880cf                  label_5880cf:
005880cf                      
005880d3                      if (edi_1->tradeState != 1)
005880d3                      {
005880de                          if (ACCWeenieObject::IsOwnedByPlayer(edi_1) != 0)
005880de                          {
0058810d                          label_58810d:
0058810d                              uint32_t eax_3 = GetPlayerID();
0058810d                              
00588114                              if (ebx == eax_3)
0058811a                                  ItemHolder::targetingObject_1 = ItemUses::IsUseable_SelfTarget(&arg1);
0058811a                              
00588121                              if ((ebx != eax_3 || ItemHolder::targetingObject_1 != 0))
00588121                              {
00588134                                  int32_t eax_4;
00588134                                  eax_4 = (eax->pwd._targetType & edi_1->vtable->InqType()) != 0;
00588138                                  return eax_4;
00588121                              }
005880de                          }
005880de                          else
005880de                          {
005880e4                              ItemHolder::targetingObject_1 = ItemUses::GetLeastLimitedTargetUse(&arg1);
005880e4                              
005880eb                              if ((ItemHolder::targetingObject_1 & 8) != 0)
005880eb                              {
005880f4                                  if (ebx == GetPlayerID())
005880f4                                  {
005880fa                                      ItemHolder::targetingObject_1 = ItemUses::IsUseable_SelfTarget(&arg1);
005880fa                                      
00588101                                      if (ItemHolder::targetingObject_1 != 0)
00588101                                          goto label_58810d;
005880f4                                  }
005880eb                              }
005880eb                              else if ((ItemHolder::targetingObject_1 & 4) == 0)
0058810b                                  goto label_58810d;
005880de                          }
005880d3                      }
005880bc                  }
005880bc                  else
005880bc                  {
005880c2                      ItemHolder::targetingObject_1 = ItemUses::GetLeastLimitedSourceUse(&arg1);
005880c2                      
005880cd                      if (((ItemHolder::targetingObject_1 & 8) == 0 && (ItemHolder::targetingObject_1 & 4) == 0))
005880cd                          goto label_5880cf;
005880bc                  }
005880a1              }
00588086          }
00588079      }
00588079      
00588105      ItemHolder::targetingObject_1 = 0;
00588108      return 0;
00588070  }

00588139                                                                             90 90 90 90 90 90 90                           .......

00588140  int32_t ItemHolder::AttemptToPlaceInContainer(uint32_t arg1, uint32_t arg2, uint32_t arg3, int32_t arg4, int32_t arg5)

00588140  {
00588148      int32_t result = ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0);
00588148      
00588152      if (result == 0)
0058815a          return result;
0058815a      
00588173      if ((ItemHolder::AttemptToPlaceInContainer_IsItemLegal(arg1, 0) != 0 && ItemHolder::AttemptToPlaceInContainer_IsContainerLegal(arg1, arg2, 0) != 0))
00588173      {
00588194          uint32_t id = arg3;
0058819c          class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(id);
005881ac          int32_t __return_1;
005881ac          
005881ac          if ((eax_2 == 0 || arg1 == id))
005881ed              id = 0;
005881ac          else if ((eax_2->pwd._bitfield & 1) == 0)
005881b5          {
005881b7              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
005881be              uint32_t player_id;
005881be              
005881be              if (SmartBox::smartbox_1 == 0)
005881c8                  player_id = 0;
005881be              else
005881c0                  player_id = SmartBox::smartbox_1->player_id;
005881c0              
005881cc              if ((id == player_id && eax_2->tradeState != 1))
005881cc                  goto label_5881e1;
005881cc              
005881ed              id = 0;
005881b5          }
005881b5          else if (eax_2->tradeState == 1)
005881ed              id = 0;
005881d2          else
005881d2          {
005881e1          label_5881e1:
005881e1              
005881eb              if (ItemHolder::CheckHookStatus(ClientObjMaintSystem::GetWeenieObject(arg1), eax_2, &__return_1) == 0)
005881ed                  id = 0;
005881d2          }
005881d2          
005881f8          if ((arg4 != 0 && ItemHolder::AttemptAutoMerge(arg1, arg2, id) != 0))
005883f6              return 1;
005883f6          
00588213          class ACCWeenieObject* edi_2 = ClientObjMaintSystem::GetWeenieObject(arg1);
00588216          class ACCWeenieObject* var_94 = edi_2;
00588224          int32_t __return_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
00588226          __return_1 = __return_2;
00588226          
00588232          if ((edi_2 != 0 && __return_2 != 0))
00588232          {
00588244              if (ItemHolder::WillItemFitInContainer(arg1, id) != 0)
00588244              {
00588300              label_588300:
00588300                  
00588302                  if (id != 0)
00588302                  {
0058830a                      int32_t GenItemHolder::splitSize_1 = GenItemHolder::splitSize;
0058830a                      
00588313                      if (GenItemHolder::splitSize_1 >= GenItemHolder::maxSplitSize)
00588313                      {
005883e2                          ACCWeenieObject::UIAttemptPutInContainer(edi_2, id, arg5);
005883f6                          return 1;
00588313                      }
00588313                      
00588323                      ACCWeenieObject::UIAttemptSplitToContainer(edi_2, id, arg5, GenItemHolder::splitSize_1);
00588337                      return 1;
00588302                  }
00588244              }
00588244              else
00588244              {
0058824a                  id = arg2;
0058824a                  
0058825d                  if (ItemHolder::WillItemFitInContainer(arg1, id) != 0)
0058825d                      goto label_588300;
0058825d                  
00588265                  class IDList* eax_11 = ACCWeenieObject::GetContainedContainersList(__return_2);
00588265                  
0058826e                  if (eax_11 == 0)
005882b4                      edi_2 = var_94;
0058826e                  else
0058826e                  {
00588273                      int32_t ebp_2 = 0;
00588273                      
00588277                      if (eax_11->numIDs > 0)
00588277                      {
00588289                          while (true)
00588289                          {
00588289                              class ACCWeenieObject* eax_14 = ClientObjMaintSystem::GetWeenieObject(IDList::GetByNum(eax_11, ebp_2));
00588289                              
00588295                              if ((eax_14 != 0 && ItemHolder::WillItemFitInContainer(arg1, eax_14->id) != 0))
00588295                              {
005882f5                                  id = eax_14->id;
005882f8                                  __return_2 = __return_1;
005882fc                                  edi_2 = var_94;
005882fc                                  break;
00588295                              }
00588295                              
005882ab                              ebp_2 += 1;
005882ab                              
005882ae                              if (ebp_2 >= eax_11->numIDs)
005882ae                                  goto label_5882b0;
00588289                          }
00588289                          
005882ae                          goto label_588300;
00588277                      }
00588277                      
005882b0                  label_5882b0:
005882b0                      __return_2 = __return_1;
005882b4                      edi_2 = var_94;
0058826e                  }
00588244              }
00588244              
005882bc              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94);
005882cd              wchar16 const* const var_b0_8;
005882cd              
005882cd              if (*(uint32_t*)(*(uint32_t*)__return_2 + 0x10)() == 0)
005882cd              {
0058835d                  class PStringBase<unsigned short>* __return = &__return_1;
0058835d                  
0058835e                  if (ACCWeenieObject::IsContainer(edi_2) == 0)
0058835e                  {
00588376                      class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = ACCWeenieObject::GetObjectNameWide(__return_2, __return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588377                      var_b0_8 = u"The %s is completely full!";
0058835e                  }
0058835e                  else
0058835e                  {
00588367                      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ACCWeenieObject::GetObjectNameWide(__return_2, __return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588368                      var_b0_8 = u"The %s can fit no more container…";
0058835e                  }
005882cd              }
005882cd              else if (ACCWeenieObject::IsContainer(edi_2) == 0)
005882dc              {
00588344                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(__return_2, &__return_1, NAME_APPROPRIATE, 1)->m_charbuffer;
00588345                  var_b0_8 = u"%s is completely full!";
005882dc              }
005882dc              else
005882dc              {
005882ea                  class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(__return_2, &__return_1, NAME_APPROPRIATE, 0)->m_charbuffer;
005882eb                  var_b0_8 = u"%s can carry no more containers!";
005882dc              }
005882dc              
00588381              PStringBase<unsigned short>::sprintf(&var_94, var_b0_8);
0058838d              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00588396              void var_90;
00588396              StringInfo::StringInfo(&var_90);
005883a6              StringInfo::SetLiteralValue(&var_90, &var_94, 1);
005883b2              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
005883be              StringInfo::~StringInfo(&var_90);
005883c7              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
00588232          }
00588173      }
00588173      
005883d8      return 0;
00588140  }

005883f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00588400  int32_t __fastcall ACCWeenieObject::IsComponentPack(class ACCWeenieObject const* this)

00588400  {
00588401      int32_t var_8 = 0x28;
00588403      int32_t var_c = 0x10000001;
00588408      int32_t var_10 = 5;
0058840c      int32_t eax;
0058840c      int32_t edx;
0058840c      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
00588411      uint32_t id = this->pwd._wcid.id;
0058842f      int32_t* eax_5 = *(uint32_t*)(*(int32_t*)((char*)eax_1 + 0x264) + ((COMBINE(0, id) % *(int32_t*)((char*)eax_1 + 0x26c)) << 2));
00588431      bool cond:0 = eax_5 != 0;
00588431      
00588433      if (eax_5 != 0)
00588433      {
00588437          while (*(uint32_t*)eax_5 != id)
00588437          {
00588439              eax_5 = eax_5[1];
00588439              
0058843e              if (eax_5 == 0)
0058843e                  break;
00588437          }
00588437          
00588440          cond:0 = eax_5 != 0;
00588433      }
00588433      
00588442      uint32_t edx_2;
00588442      edx_2 = cond:0;
00588442      
0058844a      if (eax_1 != 0)
0058844c          eax_1->vtable->Release();
0058844c      
00588454      return ((uint32_t)edx_2);
00588400  }

00588455                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00588460  uint16_t ItemHolder::DetermineUseResult(class ACCWeenieObject* arg1)

00588460  {
00588461      class ACCWeenieObject* esi = arg1;
00588461      
00588477      if ((esi->pwd._containerID != 0 || (esi->pwd._bitfield & 4) != 0))
00588477      {
00588483          if ((ClientUISystem::GetUISystem()->groundObject != 0 && esi->pwd._containerID == ClientUISystem::GetUISystem()->groundObject))
00588493              goto label_588495;
00588477      }
00588477      else
00588477      {
00588495      label_588495:
00588495          uint32_t _wielderID = esi->pwd._wielderID;
0058849d          uint32_t player_id;
0058849d          
0058849d          if (_wielderID != 0)
0058849d          {
0058849f              class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0058849f              
005884a6              if (SmartBox::smartbox_1 == 0)
005884b0                  player_id = 0;
005884a6              else
005884a8                  player_id = SmartBox::smartbox_1->player_id;
0058849d          }
0058849d          
005884b4          if ((_wielderID == 0 || _wielderID == player_id))
005884b4          {
005884d4              int32_t eax_4;
005884d4              
005884d4              if ((((esi->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || esi->pwd._itemsCapacity != 0) || esi->pwd._containersCapacity != 0))
005884d8                  eax_4 = ACCWeenieObject::IsComponentPack(esi);
005884d8              
005884d4              if (((((esi->pwd._bitfield & "activation type (%s) with '%s' b…") == 0 && esi->pwd._itemsCapacity == 0) && esi->pwd._containersCapacity == 0) || eax_4 != 0))
005884d4              {
005884e2                  eax_4 = 2;
005884e7                  return 2;
005884d4              }
005884b4          }
00588477      }
00588477      
005884ec      int32_t eax_6 = esi->vtable->InqType();
005884ec      
005884fa      if (ACCWeenieObject::IsOwnedByPlayer(esi) != 0)
005884fa      {
0058851c          if (((esi->pwd._combatUse != COMBAT_USE_NONE || (eax_6 & 0x8000) != 0) || (esi->pwd._bitfield & 0x20000000) != 0))
0058851c          {
0058851e              class SmartBox* SmartBox::smartbox_2 = SmartBox::smartbox;
0058852b              uint32_t player_id_1;
0058852b              
0058852b              if (SmartBox::smartbox_2 == 0)
00588535                  player_id_1 = 0;
0058852b              else
0058852d                  player_id_1 = SmartBox::smartbox_2->player_id;
0058852d              
00588539              if (esi->pwd._wielderID != player_id_1)
00588539              {
00588541                  int32_t eax_10 = (esi->pwd._bitfield & 0x40000000);
00588546                  int32_t eax_11 = -(eax_10);
00588552                  return ((((int16_t)(eax_11 - eax_11)) & 5) + 3);
00588539              }
0058851c          }
0058851c          
00588553          uint32_t _valid_locations = esi->pwd._valid_locations;
0058855c          uint32_t _location = esi->pwd._location;
0058855c          
00588576          if ((((*(uint8_t*)((char*)_valid_locations)[1] & 0x7e) != 0 && (*(uint8_t*)((char*)_location)[1] & 0x7e) == 0) || ((_valid_locations & 0x80001ff) != 0 && (_location & 0x80001ff) == 0)))
00588576          {
00588588              _valid_locations = 4;
0058858d              return 4;
00588576          }
00588576          
00588585          if (((_valid_locations & 0x7c0f8000) != 0 && (_location & 0x7c0f8000) == 0))
00588585          {
00588588              _valid_locations = 4;
0058858d              return 4;
00588585          }
00588585          
00588594          if ((eax_6 & 0x20000000) != 0)
00588594          {
00588597              _valid_locations = 6;
0058859c              return 6;
00588594          }
005884fa      }
005884fa      else if (eax_6 < 0)
0058859f      {
005885a2          int32_t eax_7;
005885a2          eax_7 = 7;
005885a7          return 7;
0058859f      }
0058859f      
005885b3      ItemUses::ItemUses(&arg1, esi->pwd._useability);
005885b3      
005885c3      if (ItemUses::IsUseable(&arg1) != 0)
005885c3      {
005885c6          int32_t eax_15;
005885c6          eax_15 = 1;
005885cb          return 1;
005885c3      }
005885c3      
005885d5      uint32_t player_id_2;
005885d5      
005885d5      if (esi->vtable->IsPlayer() != 0)
005885d5      {
005885d7          class SmartBox* SmartBox::smartbox_3 = SmartBox::smartbox;
005885d7          
005885e1          if (SmartBox::smartbox_3 == 0)
005885eb              player_id_2 = 0;
005885e1          else
005885e3              player_id_2 = SmartBox::smartbox_3->player_id;
005885e3          
005885ef          if (esi->id != player_id_2)
005885ef          {
005885f2              player_id_2 = 5;
005885f7              return 5;
005885ef          }
005885d5      }
005885d5      
005885f9      player_id_2 = 0;
005885fd      return 0;
00588460  }

005885fe                                                                                            90 90                                ..

00588600  int32_t ItemHolder::AttemptPlaceIn3D(uint32_t arg1, uint32_t arg2, int32_t arg3)

00588600  {
00588608      int32_t eax = ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0);
00588608      
00588612      if (eax == 0)
0058861a          return eax;
0058861a      
00588627      int32_t ebp = 0;
00588629      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg1);
00588629      
00588635      if (eax_1 != 0)
00588635      {
0058863b          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00588642          uint32_t player_id;
00588642          
00588642          if (SmartBox::smartbox_1 == 0)
0058864c              player_id = 0;
00588642          else
00588644              player_id = SmartBox::smartbox_1->player_id;
00588644          
00588657          if (arg2 == player_id)
00588675              return ((uint32_t)CPlayerSystem::PlaceInBackpack(CPlayerSystem::GetPlayerSystem(), arg1, 0));
00588675          
00588678          int32_t eax_5 = ACCWeenieObject::IsOwnedByPlayer(eax_1);
0058867f          wchar16 const* const var_b4_2;
0058867f          void* var_b0_2;
0058867f          void var_9c;
0058867f          void __return;
0058867f          void var_90;
0058867f          
0058867f          if (eax_5 != 0)
0058867f          {
005886fc              wchar16 const* const var_b4_4;
005886fc              
005886fc              if (eax_1->tradeState != 0)
005886fc              {
00588710                  class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588711                  var_b4_4 = u"You are trading the %s, it canno…";
0058888b              label_58888b:
0058888b                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, var_b4_4);
00588897                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005888a0                  StringInfo::StringInfo(&var_90);
005888b0                  StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
005888b9                  var_b0_2 = &var_90;
005888ba                  goto label_5886d0;
005886fc              }
005886fc              
0058871d              void* var_b0_5;
0058871d              
0058871d              if (arg2 == 0)
0058871d              {
0058895f                  if (arg3 == 0)
005889ac                      return ebp;
005889ac                  
00588967              label_588967:
00588967                  class CPhysicsObj* eax_36 = ClientObjMaintSystem::GetPhysicsObject(GetPlayerID());
00588967                  
00588971                  if ((eax_36 != 0 && CPhysicsObj::on_ground(eax_36) != 0))
00588971                  {
00588986                      uint32_t GenItemHolder::splitSize_1 = GenItemHolder::splitSize;
00588986                      
00588991                      if (GenItemHolder::splitSize_1 < GenItemHolder::maxSplitSize)
00588991                      {
00588996                          ACCWeenieObject::UIAttemptSplitTo3D(eax_1, GenItemHolder::splitSize_1);
0058899b                          return 1;
00588991                      }
00588991                      
005889b2                      if (eax_1->current_state != IN_3D_VIEW)
005889b2                      {
005889b6                          ACCWeenieObject::UIAttemptPutIn3D(eax_1);
005889cc                          return 1;
005889b2                      }
005889b2                      
005889d1                      StringInfo::StringInfo(&var_90);
005889df                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, u"Move cancelled");
005889ef                      StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
005889f8                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
00588a04                      ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
00588a10                      StringInfo::~StringInfo(&var_90);
00588a21                      return ebp;
00588971                  }
00588971                  
00588a26                  StringInfo::StringInfo(&var_90);
00588a34                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, u"You cannot do that in mid air");
00588a44                  StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
00588a4d                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
00588a56                  var_b0_5 = &var_90;
0058871d              }
0058871d              else
0058871d              {
0058872c                  ebp = ItemHolder::AttemptMerge(arg1, arg2, 0);
0058872c                  
00588733                  if (ebp != 0)
005889ac                      return ebp;
005889ac                  
0058873a                  class ACCWeenieObject* eax_12 = ClientObjMaintSystem::GetWeenieObject(arg2);
0058873a                  
00588746                  if (eax_12 == 0)
00588746                  {
00588952                  label_588952:
00588952                      
00588954                      if ((ebp != 0 || arg3 == 0))
005889ac                          return ebp;
005889ac                      
00588954                      goto label_588967;
00588746                  }
00588746                  
00588755                  if ((*(uint8_t*)((char*)((int16_t)eax_12->pwd._bitfield))[1] & 2) == 0)
00588755                  {
005887d0                      if ((PlayerModule::DragItemOnPlayerOpensSecureTrade(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0 && eax_12->vtable->IsPlayer() != 0))
005887d0                      {
005887ed                          ClientTradeSystem::AttemptToTradeItem(ClientTradeSystem::GetTradeSystem(), arg2, arg1);
005887fe                          return 0;
005887d0                      }
005887d0                      
00588809                      if (eax_12->vtable->InqType() == 0x10)
00588809                      {
00588818                          ACCWeenieObject::UIAttemptGive(eax_1, arg2, ItemHolder::GetObjectSplitSize(eax_1));
0058882c                          return 1;
00588809                      }
00588809                      
00588836                      if (ACCWeenieObject::IsContainer(eax_12) != 0)
00588836                      {
00588843                          if ((eax_12->pwd._bitfield & 1) == 0)
00588843                          {
00588857                              class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = ACCWeenieObject::GetObjectNameWide(eax_12, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588858                              var_b4_2 = u"The %s is locked";
0058885d                              goto label_58869f;
00588843                          }
00588843                          
0058886c                          if (ClientUISystem::GetUISystem()->groundObject != arg2)
0058886c                          {
0058887e                              class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = ACCWeenieObject::GetObjectNameWide(eax_12, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0058887f                              var_b4_4 = u"You must open the %s first";
0058887f                              goto label_58888b;
0058886c                          }
0058886c                          
005888d4                          ebp = ItemHolder::AttemptToPlaceInContainer(arg1, arg2, 0, 1, 0);
00588836                      }
00588836                      
005888df                      if (arg3 != 0)
005888df                          goto label_588952;
005888df                      
005888ec                      void __return_1;
005888ec                      class PStringBase<unsigned short>* eax_32 = ACCWeenieObject::GetObjectNameWide(eax_12, &__return_1, NAME_APPROPRIATE, 0);
005888fe                      class PStringBase<unsigned short>* eax_33 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, 0);
00588907                      class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = eax_32->m_charbuffer;
00588908                      class PSRefBufferCharData<unsigned short>* m_charbuffer = eax_33->m_charbuffer;
00588915                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, u"Cannot give %s to %s");
00588921                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0058892a                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00588933                      StringInfo::StringInfo(&var_90);
00588943                      StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
0058894c                      var_b0_2 = &var_90;
0058894d                      goto label_5886d0;
00588755                  }
00588755                  
00588763                  if (GenItemHolder::splitSize == GenItemHolder::maxSplitSize)
00588763                  {
00588775                      ClientUISystem::AttemptSellToVendor(ClientUISystem::GetUISystem(), arg2, arg1);
00588786                      return 0;
00588763                  }
00588763                  
0058878b                  StringInfo::StringInfo(&var_90);
00588799                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, u"You must split the stack before …");
005887a9                  StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
005887b2                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
005887bb                  var_b0_5 = &var_90;
0058871d              }
0058871d              
00588a59              ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_b0_5);
00588a65              StringInfo::~StringInfo(&var_90);
00588a76              return 0;
0058867f          }
0058867f          
00588692          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(eax_1, &__return, NAME_APPROPRIATE, eax_5)->m_charbuffer;
00588693          var_b4_2 = u"You must first pick up the %s";
0058869f      label_58869f:
0058869f          PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, var_b4_2);
005886ab          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005886b4          StringInfo::StringInfo(&var_90);
005886c4          StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
005886cd          var_b0_2 = &var_90;
005886d0      label_5886d0:
005886d0          ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_b0_2);
005886dc          StringInfo::~StringInfo(&var_90);
005886e5          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
00588635      }
00588635      
005886f6      return 0;
00588600  }

00588a77                                                                       90 90 90 90 90 90 90 90 90                         .........

00588a80  void ItemHolder::UseObject(uint32_t arg1, int32_t arg2, int32_t arg3)

00588a80  {
00588a8f      if (ClientUISystem::GetUISystem() != 0)
00588a8f      {
00588aa4          class ACCWeenieObject* esi_1 = ClientObjMaintSystem::GetWeenieObject(arg1);
00588aa4          
00588aab          if (esi_1 != 0)
00588aab          {
00588ab1              long double x87_r7_1 = ((long double)Timer::cur_time);
00588abd              long double x87_r6_2 = (((long double)ItemHolder::m_timeLastUsed) + ((long double)0.20000000000000001));
00588ac5              (x87_r7_1 - x87_r6_2);
00588ac7              class ACCWeenieObject* eax_1;
00588ac7              eax_1 = ((((x87_r7_1 < x87_r6_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, x87_r6_2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == x87_r6_2) ? 1 : 0) << 0xe) | 0x3800))));
00588ac9              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00588ac9              
00588acc              if (p_1)
00588acc              {
00588ad4                  ItemHolder::m_timeLastUsed = ((double)x87_r7_1);
00588ad4                  
00588ae4                  if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
00588ae4                  {
00588aef                      uint32_t vendorID = ClientUISystem::GetUISystem()->vendorID;
00588af4                      class ClientUISystem* eax_4;
00588af4                      uint32_t _containerID;
00588af4                      
00588af4                      if (vendorID != 0)
00588af4                      {
00588af6                          _containerID = esi_1->pwd._containerID;
00588afc                          eax_4 = ClientUISystem::GetUISystem();
00588af4                      }
00588af4                      
00588b04                      if ((vendorID == 0 || _containerID != eax_4->vendorID))
00588b04                      {
00588b11                          int32_t ebx_1 = 0;
00588b11                          
00588b15                          if (arg3 == 0)
00588b15                          {
00588b1d                              uint32_t eax_6 = ((uint32_t)ItemHolder::DetermineUseResult(esi_1));
00588b1d                              
00588b2b                              if ((eax_6 >= 2 && eax_6 <= 7))
00588b2d                                  ebx_1 = 1;
00588b15                          }
00588b15                          
00588b3d                          void var_94;
00588b3d                          ItemUses::ItemUses(&var_94, esi_1->pwd._useability);
00588b3d                          
00588b44                          if (ebx_1 != 0)
00588b44                          {
00588c9d                              CPlayerSystem::UsingItem(CPlayerSystem::GetPlayerSystem(), arg1, 1, arg3);
00588cac                              return;
00588b44                          }
00588b44                          
00588b54                          wchar16 const* const var_b4_1;
00588b54                          void* var_b0_4;
00588b54                          void var_9c;
00588b54                          void __return;
00588b54                          void var_90;
00588b54                          
00588b54                          if (esi_1->tradeState == 1)
00588b54                          {
00588b68                              class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588b69                              var_b4_1 = u"You cannot use the %s because yo…";
00588b75                          label_588b75:
00588b75                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, var_b4_1);
00588b81                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00588b8a                              StringInfo::StringInfo(&var_90);
00588b99                              StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
00588ba2                              var_b0_4 = &var_90;
00588ba5                          label_588ba5:
00588ba5                              ECM_UI::SendNotice_DisplayStringInfo(0x1a, var_b0_4);
00588bb1                              StringInfo::~StringInfo(&var_90);
00588bba                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_9c);
00588bc9                              return;
00588b54                          }
00588b54                          
00588bd2                          char eax_11;
00588bd2                          
00588bd2                          if (esi_1->pwd._location == 0)
00588bd8                              eax_11 = ItemUses::GetLeastLimitedSourceUse(&var_94);
00588bd8                          
00588bdf                          wchar16 const* const var_b4_3;
00588bdf                          
00588bdf                          if ((esi_1->pwd._location == 0 && (eax_11 & 4) != 0))
00588bdf                          {
00588bf3                              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588bf4                              var_b4_3 = u"You must wield the %s to use it";
00588eb0                          label_588eb0:
00588eb0                              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, var_b4_3);
00588ebc                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00588ec5                              StringInfo::StringInfo(&var_90);
00588ed4                              StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
00588edd                              var_b0_4 = &var_90;
00588ede                              goto label_588ba5;
00588bdf                          }
00588bdf                          
00588c09                          if (ItemUses::IsUseable_Targeted(&var_94) == 0)
00588c09                          {
00588ce9                              if (ItemUses::IsUseable(&var_94) != 0)
00588ce9                              {
00588cef                                  uint32_t _bitfield = esi_1->pwd._bitfield;
00588cef                                  
00588cf8                                  if ((*(uint8_t*)((char*)_bitfield)[1] & 4) != 0)
00588cf8                                  {
00588d02                                      ClientUISystem::UsageConfirmation_PKAltar(ClientUISystem::GetUISystem(), arg1);
00588d11                                      return;
00588cf8                                  }
00588cf8                                  
00588d15                                  if ((*(uint8_t*)((char*)_bitfield)[1] & 8) != 0)
00588d15                                  {
00588d1f                                      ClientUISystem::UsageConfirmation_NPKAltar(ClientUISystem::GetUISystem(), arg1);
00588d2e                                      return;
00588d15                                  }
00588d15                                  
00588d34                                  if (((_bitfield & 0x10000000) != 0 && PlayerModule::ConfirmVolatileRareUse(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) != 0))
00588d34                                  {
00588d4f                                      ClientUISystem::UsageConfirmation_VolatileRare(ClientUISystem::GetUISystem(), arg1);
00588d5e                                      return;
00588d34                                  }
00588d34                                  
00588d60                                  CM_Inventory::Event_UseEvent(arg1);
00588d6f                                  ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
00588d7e                                  CPlayerSystem::UsingItem(CPlayerSystem::GetPlayerSystem(), arg1, 1, arg3);
00588d7e                                  
00588d90                                  if ((esi_1->vtable->InqType() & 0x10) != 0)
00588d90                                  {
00588da0                                      class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588da1                                      var_b4_1 = u"Approaching %s";
00588da6                                      goto label_588b75;
00588d90                                  }
00588d90                                  
00588db9                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588dba                                  var_b4_3 = u"Using the %s";
00588dbf                                  goto label_588eb0;
00588ce9                              }
00588ce9                              
00588dcf                              CPlayerSystem::UsingItem(CPlayerSystem::GetPlayerSystem(), arg1, 0, arg3);
00588dcf                              
00588ddb                              if (arg1 != GetPlayerID())
00588ddb                              {
00588dea                                  if ((*(uint8_t*)((char*)((int16_t)esi_1->pwd._bitfield))[1] & 0x10) != 0)
00588dea                                  {
00588dfe                                      class PSRefBufferCharData<unsigned short>* m_charbuffer_6 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588e0b                                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, Formatted, u"You can't open or close this %s …");
00588e17                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00588e20                                      StringInfo::StringInfo(&var_90);
00588e25                                      int32_t var_b0_15 = 1;
00588e25                                      goto label_588e2f;
00588dea                                  }
00588dea                                  
00588e46                                  uint8_t eax_40 = ClientCombatSystem::ObjectIsAttackable(ClientCombatSystem::GetCombatSystem(), arg1);
00588e4d                                  class ClientCombatSystem* eax_41;
00588e4d                                  
00588e4d                                  if (eax_40 != 0)
00588e4f                                      eax_41 = ClientCombatSystem::GetCombatSystem();
00588e4f                                  
00588e57                                  if ((eax_40 != 0 && eax_41->combatMode == NONCOMBAT_COMBAT_MODE))
00588e57                                  {
00588e6b                                      class PSRefBufferCharData<unsigned short>* m_charbuffer_7 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588e6c                                      var_b4_1 = u"To attack %s, click on the dove …";
00588e71                                      goto label_588b75;
00588e57                                  }
00588e57                                  
00588e7e                                  uint8_t eax_44 = ClientCombatSystem::ObjectIsAttackable(ClientCombatSystem::GetCombatSystem(), arg1);
00588e85                                  class ClientCombatSystem* eax_45;
00588e85                                  
00588e85                                  if (eax_44 != 0)
00588e87                                      eax_45 = ClientCombatSystem::GetCombatSystem();
00588e87                                  
00588e8f                                  if ((eax_44 == 0 || eax_45->combatMode == NONCOMBAT_COMBAT_MODE))
00588e8f                                  {
00588ea3                                      class PSRefBufferCharData<unsigned short>* m_charbuffer_8 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588ea4                                      var_b4_3 = u"The %s cannot be used";
00588ea4                                      goto label_588eb0;
00588e8f                                  }
00588ddb                              }
00588c09                          }
00588c09                          else
00588c09                          {
00588c18                              if (arg2 == 0)
00588c18                              {
00588caf                                  ItemHolder::targetingObject = arg1;
00588cbc                                  ClientUISystem::SetTargetMode(ClientUISystem::GetUISystem(), TARGET_MODE_USE_TARGET);
00588cd3                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
00588cd4                                  var_b4_1 = u"Choose a target for the %s";
00588cd9                                  goto label_588b75;
00588c18                              }
00588c18                              
00588c1e                              uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
00588c1e                              
00588c26                              if (ACCWeenieObject::selectedID_1 == 0)
00588c26                              {
00588c39                                  class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ACCWeenieObject::GetObjectNameWide(esi_1, &__return, NAME_APPROPRIATE, ACCWeenieObject::selectedID_1)->m_charbuffer;
00588c45                                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_9c, ACCWeenieObject::selectedID_1, u"Select your target before using …");
00588c51                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00588c5a                                  StringInfo::StringInfo(&var_90);
00588c5f                                  int32_t var_b0_6 = 1;
00588e2f                              label_588e2f:
00588e2f                                  StringInfo::SetLiteralValue(&var_90, &var_9c, 1);
00588e38                                  var_b0_4 = &var_90;
00588e39                                  goto label_588ba5;
00588c26                              }
00588c26                              
00588c76                              if (ItemHolder::TargetCompatibleWithObject(ACCWeenieObject::selectedID_1, arg1, 0, 1) != 0)
00588c76                              {
00588c7e                                  CM_Inventory::Event_UseWithTargetEvent(arg1, ACCWeenieObject::selectedID_1);
00588c8d                                  ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
00588c9d                                  CPlayerSystem::UsingItem(CPlayerSystem::GetPlayerSystem(), arg1, 1, arg3);
00588c76                              }
00588c09                          }
00588b04                      }
00588ae4                  }
00588acc              }
00588aab          }
00588a8f      }
00588a80  }


00588ef0  void ItemHolder::TargetAcquired(uint32_t arg1)

00588ef0  {
00588ef6      uint32_t ItemHolder::targetingObject_1 = ItemHolder::targetingObject;
00588f02      ItemHolder::targetingObject = 0;
00588f02      
00588f16      if (ItemHolder::TargetCompatibleWithObject(arg1, ItemHolder::targetingObject_1, 0, 1) != 0)
00588f16      {
00588f1f          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(ItemHolder::targetingObject_1);
00588f27          class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg1);
00588f27          
00588f3b          if ((eax_1 != 0 && eax_2 != 0))
00588f3b          {
00588f56              if (((eax_1->vtable->InqType() & 0x80000) != 0 && (eax_1->pwd._effects & 1) == 0))
00588f56              {
00588f5f                  if ((*(uint8_t*)((char*)eax_2->pwd._bitfield)[3] & 1) != 0)
00588f5f                  {
00588f73                      ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), "You cannot drain the mana of thi…", 0, 1, 0);
00588f7c                      return;
00588f5f                  }
00588f5f                  
00588f86                  ClientUISystem::TargetedUsageConfirmation_ManaStone(ClientUISystem::GetUISystem(), ItemHolder::targetingObject_1, arg1);
00588f8f                  return;
00588f56              }
00588f56              
00588f9f              if ((PlayerModule::UseCraftSuccessDialog(&CPlayerSystem::GetPlayerSystem()->playerModule.vtable) == 0 && (eax_1->vtable->InqType() & 0x40000000) != 0))
00588f9f              {
00588fb8                  ClientUISystem::TargetedUsageConfirmation_Salvage(ClientUISystem::GetUISystem(), ItemHolder::targetingObject_1, arg1);
00588fc1                  return;
00588f9f              }
00588f9f              
00588fc2              eax_1->vtable->InqType();
00588f3b          }
00588f3b          
00588fcb          CM_Inventory::Event_UseWithTargetEvent(ItemHolder::targetingObject_1, arg1);
00588fda          ClientUISystem::IncrementBusyCount(ClientUISystem::GetUISystem());
00588feb          CPlayerSystem::UsingItem(CPlayerSystem::GetPlayerSystem(), ItemHolder::targetingObject_1, 1, 0);
00588f16      }
00588ef0  }

00588ff5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00589000  HRESULT CBasePin::QueryInternalConnections(class CBasePin* this @ ecx, struct IPin** arg2, uint32_t* arg3) __pure

00589000  {
00589005      return 0x80004001;
00589000  }

00589008                          90 90 90 90 90 90 90 90                                                          ........

00589010  void* __thiscall CCommunicationSystem::ChatInterfaceProvider::`scalar deleting destructor'(class CCommunicationSystem::ChatInterfaceProvider* this, uint32_t arg2)

00589010  {
00589018      this->vtable = 0x7e2ebc;
0058901e      this->vtable = &CCommunicationSystem::ChatInterfaceProvider::`vftable';
00589025      this->vtable = &CCommunicationSystem::ChatInterfaceProvider::`vftable';
00589025      
0058902c      if ((arg2 & 1) != 0)
0058902f          operator delete(this);
0058902f      
0058903a      return this;
00589010  }

0058903d                                                                                         90 90 90                               ...

00589040  void gmCCommunicationSystem::SetTalkFocus(uint32_t arg1)

00589040  {
00589040      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589040      
00589047      if (CCommunicationSystem::s_pInstance_1 != 0)
0058904d          *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x14) = arg1;
00589040  }

00589051                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00589060  uint32_t gmCCommunicationSystem::GetTalkFocus()

00589060  {
00589060      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589060      
00589067      if (CCommunicationSystem::s_pInstance_1 != 0)
00589072          return *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x14);
00589072      
0058906e      return 1;
00589060  }

00589073                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00589080  void gmCCommunicationSystem::SetTalkFocusEnabled(uint32_t arg1, uint8_t arg2)

00589080  {
00589084      int32_t edx = arg2;
00589088      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589093      int32_t esi = (1 << arg1);
00589098      int32_t edi = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x18);
00589098      
0058909b      if (edx != 0)
0058909b      {
0058909f          *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x18) = (edi | esi);
005890a4          arg2 = edx;
005890ac          /* tailcall */
005890ac          return CM_UI::SendNotice_EnableChatTargetSelection(arg1, arg2);
0058909b      }
0058909b      
005890b5      *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x18) = (edi & !(esi));
005890ba      arg2 = edx;
005890c2      /* tailcall */
005890c2      return CM_UI::SendNotice_EnableChatTargetSelection(arg1, arg2);
00589080  }

005890c7                       90 90 90 90 90 90 90 90 90                                                         .........

005890d0  uint8_t gmCCommunicationSystem::IsTalkFocusEnabled(uint32_t arg1)

005890d0  {
005890e4      int32_t eax;
005890e4      eax = (*(int32_t*)((char*)CCommunicationSystem::s_pInstance + 0x18) & (1 << arg1)) != 0;
005890e7      return eax;
005890d0  }

005890e8                          90 90 90 90 90 90 90 90                                                          ........

005890f0  class ChatRoomTracker* gmCCommunicationSystem::GetChatRoomTracker()

005890f0  {
005890f0      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
005890f0      
005890f7      if (CCommunicationSystem::s_pInstance_1 != 0)
00589100          return *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x80);
00589100      
005890f9      return CCommunicationSystem::s_pInstance_1;
005890f0  }

00589101     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00589110  int32_t gmCCommunicationSystem::SetChatRoomTracker(class ChatRoomTracker* arg1)

00589110  {
00589110      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589110      
00589117      if (CCommunicationSystem::s_pInstance_1 == 0)
00589119          return CCommunicationSystem::s_pInstance_1;
00589119      
00589125      ChatRoomTracker::operator=(*(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x80), arg1);
0058912f      return 1;
00589110  }


00589130  void gmCCommunicationSystem::SetWantsToBeInAllegChat(int32_t arg1)

00589130  {
00589130      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589130      
00589137      if (CCommunicationSystem::s_pInstance_1 != 0)
0058913d          *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x84) = arg1;
00589130  }

00589144              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00589150  int32_t gmCCommunicationSystem::WantsToBeInAllegChat()

00589150  {
00589150      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589150      
00589157      if (CCommunicationSystem::s_pInstance_1 != 0)
00589160          return *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x84);
00589160      
00589159      return CCommunicationSystem::s_pInstance_1;
00589150  }

00589161     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00589170  void gmCCommunicationSystem::SetLastSpeakableTarget(uint32_t arg1)

00589170  {
00589170      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589170      
00589177      if (CCommunicationSystem::s_pInstance_1 != 0)
0058917d          *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x64) = arg1;
00589170  }

00589181     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00589190  uint32_t gmCCommunicationSystem::GetLastSpeakableTarget()

00589190  {
00589190      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589190      
00589197      if (CCommunicationSystem::s_pInstance_1 != 0)
0058919d          return *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x64);
0058919d      
00589199      return CCommunicationSystem::s_pInstance_1;
00589190  }

0058919e                                                                                            90 90                                ..

005891a0  void gmCCommunicationSystem::SetLastTeller(uint32_t arg1)

005891a0  {
005891a0      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
005891a0      
005891a7      if (CCommunicationSystem::s_pInstance_1 != 0)
005891ad          *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x6c) = arg1;
005891a0  }

005891b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005891c0  uint32_t gmCCommunicationSystem::GetLastTeller()

005891c0  {
005891c0      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
005891c0      
005891c7      if (CCommunicationSystem::s_pInstance_1 != 0)
005891cd          return *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x6c);
005891cd      
005891c9      return CCommunicationSystem::s_pInstance_1;
005891c0  }

005891ce                                            90 90                                                                ..

005891d0  int32_t gmCCommunicationSystem::IsSquelched(uint32_t const arg1, class AC1Legacy::PStringBase<char> const* arg2, uint32_t const arg3)

005891d0  {
005891d7      if (CCommunicationSystem::s_pInstance == 0)
005891de          return 1;
005891de      
005891e7      if (arg3 != 1)
005891e7      {
005891ea          int32_t result = LogTextTypeEnumMapper::IsLegalChannel(arg3);
005891ea          
005891f4          if (result == 0)
005891f7              return result;
005891e7      }
005891e7      
00589212      return SquelchDB::IsSquelched((CCommunicationSystem::s_pInstance + 0x1c), arg1, arg2, arg3);
005891d0  }

00589213                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00589220  void gmCCommunicationSystem::SetSquelchDB(class SquelchDB const* arg1)

00589220  {
00589220      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589220      
00589227      if (CCommunicationSystem::s_pInstance_1 == 0)
0058923b          return;
0058923b      
00589231      SquelchDB::operator=(((char*)CCommunicationSystem::s_pInstance_1 + 0x1c), arg1);
00589236      /* tailcall */
00589236      return CM_UI::SendNotice_UpdateSquelchPanel();
00589220  }

0058923c                                                                                      90 90 90 90                              ....

00589240  void gmCCommunicationSystem::ClearSquelchDB()

00589240  {
00589240      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589240      
00589247      if (CCommunicationSystem::s_pInstance_1 == 0)
00589256          return;
00589256      
0058924c      SquelchDB::Clear(((char*)CCommunicationSystem::s_pInstance_1 + 0x1c));
00589251      /* tailcall */
00589251      return CM_UI::SendNotice_UpdateSquelchPanel();
00589240  }

00589257                                                                       90 90 90 90 90 90 90 90 90                         .........

00589260  void* __thiscall PackableHashIterator<unsigned long,SquelchInfo>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,SquelchInfo>* this, uint32_t arg2)

00589260  {
00589268      this->vtable = 0x7e2ed4;
00589268      
0058926e      if ((arg2 & 1) != 0)
00589271          operator delete(this);
00589271      
0058927c      return this;
00589260  }

0058927f                                                                                               90                                 .

00589280  HRESULT __thiscall CCommunicationSystem::ChatInterfaceProvider::QueryInterface(class CCommunicationSystem::ChatInterfaceProvider* this, struct _GUID const* arg2, void** arg3)

00589280  {
00589285      /* tailcall */
00589285      return CBasePin::QueryInternalConnections(this, ((char*)arg2 - 4), arg3);
00589280  }

0058928a                                cc cc cc cc cc cc                                                            ......

00589290  HRESULT __thiscall CCommunicationSystem::ChatInterfaceProvider::QueryInterface(class CCommunicationSystem::ChatInterfaceProvider* this, struct _GUID const* arg2, void** arg3)

00589290  {
00589295      /* tailcall */
00589295      return CBasePin::QueryInternalConnections(this, ((char*)arg2 - 8), arg3);
00589290  }

0058929a                                                                                cc cc cc cc cc cc                            ......

005892a0  class PackableHashIterator<unsigned long,SquelchInfo>* __thiscall PackableHashTable<unsigned long,SquelchInfo>::begin(class PackableHashTable<unsigned long,SquelchInfo> const* this, class PackableHashIterator<unsigned long,SquelchInfo>* __return)

005892a0  {
005892a0      uint32_t _table_size = this->_table_size;
005892a4      int32_t eax = 0;
005892a4      
005892a9      if (_table_size > 0)
005892a9      {
005892ab          class PackableHashData<unsigned long,SquelchInfo>** _buckets_1 = this->_buckets;
005892ae          class PackableHashData<unsigned long,SquelchInfo>** _buckets_2 = _buckets_1;
005892ae          
005892bb          do
005892bb          {
005892b3              if (*(uint32_t*)_buckets_2 != 0)
005892b3              {
005892dc                  int32_t ecx = _buckets_1[eax];
005892df                  int32_t* __return_1 = __return;
005892e3                  __return_1[2] = _buckets_1;
005892e8                  __return_1[1] = ecx;
005892eb                  *(uint32_t*)__return_1 = 0x7e2ed4;
005892f1                  __return_1[3] = _table_size;
005892f4                  return __return_1;
005892b3              }
005892b3              
005892b5              eax += 1;
005892b6              _buckets_2 = &_buckets_2[1];
005892bb          } while (eax < _table_size);
005892a9      }
005892a9      
005892bd      class PackableHashData<unsigned long,SquelchInfo>** _buckets = this->_buckets;
005892c6      __return->_current = nullptr;
005892cd      __return->_buckets = _buckets;
005892d0      __return->vtable = 0x7e2ed4;
005892d6      __return->_table_size = _table_size;
005892d9      return __return;
005892a0  }

005892f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00589300  void __fastcall PackableHashIterator<unsigned long,SquelchInfo>::GetNext(class PackableHashIterator<unsigned long,SquelchInfo>* this)

00589300  {
00589300      class PackableHashData<unsigned long,SquelchInfo>* _current = this->_current;
00589303      class PackableHashData<unsigned long,SquelchInfo>* _next = _current->_next;
00589303      
00589308      if (_next != 0)
00589308      {
0058930a          this->_current = _next;
0058930d          return;
00589308      }
00589308      
00589314      int32_t i = (_current->_hashVal + 1);
00589314      
00589319      if (i < this->_table_size)
00589319      {
0058931b          class PackableHashData<unsigned long,SquelchInfo>** _buckets = this->_buckets;
0058931e          void* edx_1 = &_buckets[i];
0058931e          
0058932f          do
0058932f          {
00589324              if (*(uint32_t*)edx_1 != 0)
00589324              {
0058933d                  this->_current = _buckets[i];
00589341                  return;
00589324              }
00589324              
00589329              i += 1;
0058932a              edx_1 += 4;
0058932f          } while (i < this->_table_size);
00589319      }
00589319      
00589334      this->_current = nullptr;
00589300  }

00589342        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00589350  void __thiscall SquelchInfo::InqName(class SquelchInfo const* this, class AC1Legacy::PStringBase<char>* arg2)

00589350  {
00589356      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->m_buffer;
00589356      
0058935e      if (m_buffer_1 == this->_name.m_buffer)
00589392          return;
00589392      
00589370      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00589372          m_buffer_1->vtable->__vecDelDtor(1);
00589372      
0058937a      class AC1Legacy::PStringBase<char> m_buffer = this->_name.m_buffer;
0058937e      arg2->m_buffer = m_buffer;
00589385      arg2 = (m_buffer + 4);
00589389      /* tailcall */
00589389      return InterlockedIncrement();
00589350  }

00589395                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005893a0  void* __thiscall SquelchInfo::`scalar deleting destructor'(class SquelchInfo* this, uint32_t arg2)

005893a0  {
005893a3      SquelchInfo::~SquelchInfo(this);
005893a3      
005893ad      if ((arg2 & 1) != 0)
005893b0          operator delete(this);
005893b0      
005893bb      return this;
005893a0  }

005893be                                                                                            90 90                                ..

005893c0  void __fastcall gmCCommunicationSystem::gmCCommunicationSystem(class gmCCommunicationSystem* this)

005893c0  {
005893c5      CCommunicationSystem::CCommunicationSystem(this);
005893cd      this->vtable = 0x7e2eec;
005893d3      this->talkFocus = 1;
005893da      this->m_uiAllowedTalkFocusBitmask = 2;
005893e1      SquelchDB::SquelchDB(&this->_squelch_db);
005893ee      this->chatSquelched = 0;
005893f1      this->m_iidLastSpeakableTarget = 0;
005893f4      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005893ff      this->lastTelleeName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00589402      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00589404      this->lastTeller = 0;
00589407      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00589413      this->lastTellerName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00589416      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
00589418      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00589424      this->lastAtMonarchUserName.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00589427      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00589429      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00589434      this->lastAtPatronUserName.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00589437      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00589439      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00589445      this->system_message_string.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00589448      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
0058944c      this->m_WantsToBeInAllegChat = 0;
00589452      class ChatRoomTracker* eax_4 = operator new(0x2c);
00589452      
0058945c      if (eax_4 != 0)
0058945c      {
00589465          this->crt = ChatRoomTracker::ChatRoomTracker(eax_4);
00589470          return;
0058945c      }
0058945c      
00589472      this->crt = nullptr;
005893c0  }

0058947d                                                                                         90 90 90                               ...

00589480  void gmCCommunicationSystem::SetLastTelleeName(class PStringBase<char> arg1)

00589480  {
00589480      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589488      int32_t eax_1;
00589488      int32_t* esi_2;
00589488      
00589488      if (CCommunicationSystem::s_pInstance_1 != 0)
00589488      {
005894ad          void* eax_2 = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x68);
005894ad          
005894b1          if (eax_2 != arg1)
005894b1          {
005894c2              if ((InterlockedDecrement(((char*)eax_2 - 0x10)) == 0 && eax_2 != 0x14))
005894ca                  **(uint32_t**)((char*)eax_2 - 0x14)(1);
005894ca              
005894d0              *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x68) = arg1;
005894d2              InterlockedIncrement((arg1 - 0x10));
005894b1          }
005894b1          
005894d8          esi_2 = (arg1 - 0x14);
005894df          eax_1 = InterlockedDecrement(&esi_2[1]);
00589488      }
00589488      else
00589488      {
0058948e          esi_2 = (arg1 - 0x14);
00589495          eax_1 = InterlockedDecrement(&esi_2[1]);
00589488      }
00589488      
005894ea      if ((eax_1 == 0 && esi_2 != 0))
005894f2          **(uint32_t**)esi_2(1);
00589480  }

005894f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00589500  void gmCCommunicationSystem::SetLastTellerName(class PStringBase<char> const* arg1)

00589500  {
00589500      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589500      
00589507      if (CCommunicationSystem::s_pInstance_1 != 0)
00589507      {
00589514          void* eax = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x70);
00589514          
00589518          if (eax != arg1->m_charbuffer)
00589518          {
0058952e              if ((InterlockedDecrement(((char*)eax - 0x10)) == 0 && eax != 0x14))
00589536                  **(uint32_t**)((char*)eax - 0x14)(1);
00589536              
00589538              class PSRefBufferCharData<char>* m_charbuffer = arg1->m_charbuffer;
0058953a              *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x70) = m_charbuffer;
00589540              InterlockedIncrement(&m_charbuffer[-1]);
00589518          }
00589507      }
00589500  }

0058954a                                90 90 90 90 90 90                                                            ......

00589550  class PStringBase<char>* gmCCommunicationSystem::GetLastTellerName(class PStringBase<char>* __return)

00589550  {
00589550      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589550      
0058955c      if (CCommunicationSystem::s_pInstance_1 == 0)
0058955c      {
0058955e          class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
00589569          __return->m_charbuffer = m_charbuffer;
0058956b          InterlockedIncrement(((char*)m_charbuffer - 0x10));
00589574          return __return;
0058955c      }
0058955c      
00589575      class PStringBase<char> eax_1 = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x70);
00589578      __return->m_charbuffer = eax_1;
0058957e      InterlockedIncrement((eax_1 - 0x10));
00589587      return __return;
00589550  }

00589588                          90 90 90 90 90 90 90 90                                                          ........

00589590  void gmCCommunicationSystem::SetLastAtMonarchUserName(class AC1Legacy::PStringBase<char> arg1)

00589590  {
00589590      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589590      
00589598      if (CCommunicationSystem::s_pInstance_1 == 0)
00589598      {
005895ae          if ((InterlockedDecrement((arg1 + 4)) == 0 && arg1 != 0))
005895b6              **(uint32_t**)arg1(1);
005895b6          
005895ae          return;
00589598      }
00589598      
005895ba      int32_t* esi_1 = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x74);
005895ba      
005895cf      if (esi_1 != arg1)
005895cf      {
005895dd          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
005895e5              **(uint32_t**)esi_1(1);
005895e5          
005895eb          *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x74) = arg1;
005895ed          InterlockedIncrement((arg1 + 4));
005895cf      }
005895cf      
005895ff      if ((InterlockedDecrement((arg1 + 4)) == 0 && arg1 != 0))
00589607          **(uint32_t**)arg1(1);
00589590  }

0058960e                                            90 90                                                                ..

00589610  class AC1Legacy::PStringBase<char>* gmCCommunicationSystem::GetLastAtMonarchUserName(class AC1Legacy::PStringBase<char>* __return)

00589610  {
00589610      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589610      
0058961c      if (CCommunicationSystem::s_pInstance_1 == 0)
0058961c      {
0058961e          class AC1Legacy::PSRefBuffer<char>* m_buffer = AC1Legacy::PStringBase<char>::null_string.m_buffer;
00589629          __return->m_buffer = m_buffer;
0058962b          InterlockedIncrement(&m_buffer->m_cRef);
00589634          return __return;
0058961c      }
0058961c      
00589635      class AC1Legacy::PStringBase<char> eax_1 = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x74);
00589638      __return->m_buffer = eax_1;
0058963e      InterlockedIncrement((eax_1 + 4));
00589647      return __return;
00589610  }

00589648                          90 90 90 90 90 90 90 90                                                          ........

00589650  void gmCCommunicationSystem::SetLastAtPatronUserName(class AC1Legacy::PStringBase<char> arg1)

00589650  {
00589650      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589650      
00589658      if (CCommunicationSystem::s_pInstance_1 == 0)
00589658      {
0058966e          if ((InterlockedDecrement((arg1 + 4)) == 0 && arg1 != 0))
00589676              **(uint32_t**)arg1(1);
00589676          
0058966e          return;
00589658      }
00589658      
0058967a      int32_t* esi_1 = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x78);
0058967a      
0058968f      if (esi_1 != arg1)
0058968f      {
0058969d          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
005896a5              **(uint32_t**)esi_1(1);
005896a5          
005896ab          *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x78) = arg1;
005896ad          InterlockedIncrement((arg1 + 4));
0058968f      }
0058968f      
005896bf      if ((InterlockedDecrement((arg1 + 4)) == 0 && arg1 != 0))
005896c7          **(uint32_t**)arg1(1);
00589650  }

005896ce                                            90 90                                                                ..

005896d0  class AC1Legacy::PStringBase<char>* gmCCommunicationSystem::GetLastAtPatronUserName(class AC1Legacy::PStringBase<char>* __return)

005896d0  {
005896d0      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
005896d0      
005896dc      if (CCommunicationSystem::s_pInstance_1 == 0)
005896dc      {
005896de          class AC1Legacy::PSRefBuffer<char>* m_buffer = AC1Legacy::PStringBase<char>::null_string.m_buffer;
005896e9          __return->m_buffer = m_buffer;
005896eb          InterlockedIncrement(&m_buffer->m_cRef);
005896f4          return __return;
005896dc      }
005896dc      
005896f5      class AC1Legacy::PStringBase<char> eax_1 = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x78);
005896f8      __return->m_buffer = eax_1;
005896fe      InterlockedIncrement((eax_1 + 4));
00589707      return __return;
005896d0  }

00589708                          90 90 90 90 90 90 90 90                                                          ........

00589710  void gmCCommunicationSystem::StartSquelchIteration()

00589710  {
00589721      void __return;
00589721      PackableHashTable<unsigned long,SquelchInfo>::begin((CCommunicationSystem::s_pInstance + 0x34), &__return);
00589732      class PackableHashData<unsigned long,SquelchInfo>* var_c;
00589732      global_Squelch_Iter._current = var_c;
00589738      uint32_t var_4;
00589738      global_Squelch_Iter._table_size = var_4;
0058973e      class PackableHashData<unsigned long,SquelchInfo>** var_8;
0058973e      global_Squelch_Iter._buckets = var_8;
00589710  }

00589747                       90 90 90 90 90 90 90 90 90                                                         .........

00589750  int32_t __thiscall gmCCommunicationSystem::StartupTurbineChat_Internal(class gmCCommunicationSystem* this, class AC1Legacy::PStringBase<char> arg2)

00589750  {
00589757      class gmCCommunicationSystem* this_1 = this;
00589760      class AC1Legacy::PStringBase<char> var_10 = arg2;
00589771      class gmCCommunicationSystem* ebx;
00589771      ebx = CCommunicationSystem::StartupTurbineChat_Internal(this, InterlockedIncrement((arg2 + 4))) != 0;
00589771      
00589776      if (ebx != 0)
00589776      {
00589778          class ClientCommunicationSystem* eax_1 = ClientCommunicationSystem::GetCommunicationSystem();
00589778          
0058977f          if (eax_1 != 0)
00589783              ClientCommunicationSystem::StartupTurbineChatSystem(eax_1);
00589776      }
00589776      
00589798      if ((InterlockedDecrement((arg2 + 4)) == 0 && arg2 != 0))
005897a0          **(uint32_t**)arg2(1);
005897a0      
005897a7      return ((uint32_t)ebx);
00589750  }

005897aa                                90 90 90 90 90 90                                                            ......

005897b0  uint32_t __stdcall RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::Release(class RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>* this @ ecx)

005897b0  {
005897bc      return ReferenceCountTemplate<1048576,0>::Release(((char*)arg_4 + 0xc));
005897b0  }

005897bf                                                                                               90                                 .

005897c0  void* __thiscall RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::`scalar deleting destructor'(class RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>* this, uint32_t arg2)

005897c0  {
005897c3      RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::~RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>(this);
005897c3      
005897cd      if ((arg2 & 1) != 0)
005897d0          operator delete(this);
005897d0      
005897db      return this;
005897c0  }

005897de                                                                                            90 90                                ..

005897e0  void __fastcall RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::~RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>(class RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>* this)

005897e0  {
005897e0      this->vtable = &RefCountIUnknown<class gmCCommunicationSystem::uiChatInterfaceProvider>::`vftable';
005897e7      this->vtable = &TimerInstance<class TimeSource_QueryPerformanceCounter>::`vftable';
005897ee      this->vtable = 0x7e2ebc;
005897f4      this->vtable = &CCommunicationSystem::ChatInterfaceProvider::`vftable';
005897fb      this->vtable = &CCommunicationSystem::ChatInterfaceProvider::`vftable';
005897e0  }

00589803           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00589810  uint32_t __convention("regparm") RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::AddRef(class RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>* this @ ecx)

00589810  {
00589810      arg_4 -= 4;
00589815      /* tailcall */
00589815      return CEnumMediaTypes::AddRef(this);
00589810  }

0058981a                                                                                cc cc cc cc cc cc                            ......

00589820  uint32_t __thiscall RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::Release(class RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>* this)

00589820  {
00589820      arg_4 -= 4;
00589825      /* tailcall */
00589825      return RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::Release(this);
00589820  }

0058982a                                cc cc cc cc cc cc                                                            ......

00589830  uint32_t __convention("regparm") RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::AddRef(class RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>* this @ ecx)

00589830  {
00589830      arg_4 -= 8;
00589835      /* tailcall */
00589835      return CEnumMediaTypes::AddRef(this);
00589830  }

0058983a                                                                                cc cc cc cc cc cc                            ......

00589840  uint32_t __thiscall RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::Release(class RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>* this)

00589840  {
00589840      arg_4 -= 8;
00589845      /* tailcall */
00589845      return RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::Release(this);
00589840  }

0058984a                                cc cc cc cc cc cc                                                            ......

00589850  void* __thiscall RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::`vector deleting destructor'(class RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>* this, uint32_t arg2)

00589850  {
00589853      /* tailcall */
00589853      return RefCountIUnknown<gmCCommunicationSystem::uiChatInterfaceProvider>::`scalar deleting destructor'(((char*)this - 0xc), arg2);
00589850  }

00589858                                                                          cc cc cc cc cc cc cc cc                          ........

00589860  int32_t gmCCommunicationSystem::CanHear(uint32_t const arg1, uint32_t const arg2)

00589860  {
00589864      uint32_t const ebx = arg1;
00589864      
0058986a      if (ebx == 0)
00589875          return 1;
00589875      
00589881      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_7928af);
0058988d      int32_t edi;
0058988d      
0058988d      if (CCommunicationSystem::s_pInstance == 0)
0058988f          edi = 1;
0058988d      else if (arg2 == 1)
005898c5          edi = SquelchDB::IsSquelched((CCommunicationSystem::s_pInstance + 0x1c), ebx, &arg1, arg2);
0058989d      else if (LogTextTypeEnumMapper::IsLegalChannel(arg2) != 0)
005898c5          edi = SquelchDB::IsSquelched((CCommunicationSystem::s_pInstance + 0x1c), ebx, &arg1, arg2);
005898aa      else
005898ac          edi = 0;
005898ac      
005898c7      uint32_t const esi_2 = arg1;
005898c7      
005898db      if ((InterlockedDecrement((esi_2 + 4)) == 0 && esi_2 != 0))
005898e3          **(uint32_t**)esi_2(1);
005898e3      
005898e7      if (edi == 0)
005898e7      {
005898f3          class CPhysicsObj* eax_6 = ClientObjMaintSystem::GetPhysicsObject(ebx);
005898ff          bool p_1;
005898ff          
005898ff          if (eax_6 != 0)
005898ff          {
00589901              class CPlayerSystem* eax_7 = CPlayerSystem::GetPlayerSystem();
00589914              float var_c;
00589914              SmartBox::convert_to_player_space(SmartBox::smartbox, eax_6, &var_c);
0058992d              float var_8;
0058992d              float var_10_1 = ((float)((((long double)var_8) * ((long double)var_8)) + (((long double)var_c) * ((long double)var_c))));
00589938              arg1 = ((float)CPlayerSystem::GetRadarRadius(eax_7));
0058993c              int32_t eax_8;
0058993c              long double st0_2;
0058993c              eax_8 = CPlayerSystem::GetRadarRadius(eax_7);
00589941              long double x87_r7_6 = (st0_2 * ((long double)arg1));
00589945              long double temp0_1 = ((long double)var_10_1);
00589945              (x87_r7_6 - temp0_1);
00589949              eax_8 = ((((x87_r7_6 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0058994b              p_1 = /* p_1 = unimplemented  {test ah, 0x41} */;
005898ff          }
005898ff          
0058994e          if ((eax_6 == 0 || p_1))
0058995b              return 1;
005898e7      }
005898e7      
005898f1      return 0;
00589860  }

0058995c                                                                                      90 90 90 90                              ....

00589960  int32_t gmCCommunicationSystem::NextSquelchIteration(class AC1Legacy::PStringBase<char>* arg1, int32_t* arg2)

00589960  {
0058996a      if (CCommunicationSystem::s_pInstance != 0)
0058996a      {
0058996c          class PackableHashData<unsigned long,SquelchInfo>* _current = global_Squelch_Iter._current;
0058996c          
00589973          if (_current != 0)
00589973          {
00589981              int32_t var_18 = 0x7e2ed8;
00589989              void var_14;
00589989              AC1Legacy::vlong::vlong(&var_14, &_current->_data._squelch_msgs);
00589995              class AC1Legacy::PSRefBuffer<char>* m_buffer = _current->_data._name.m_buffer;
00589998              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = m_buffer;
005899a0              InterlockedIncrement(&m_buffer->m_cRef);
005899b2              int32_t* ecx_4 = &var_18;
005899b2              
005899b6              if (SquelchInfo::IsEmpty(&var_18) == 0)
005899b6              {
005899c8                  SquelchInfo::InqName(ecx_4, arg1);
005899d5                  *(uint32_t*)arg2 = _current->_data._is_zone_squelch;
005899dc                  PackableHashIterator<unsigned long,SquelchInfo>::GetNext(&global_Squelch_Iter);
005899e5                  SquelchInfo::~SquelchInfo(&var_18);
005899f2                  return 1;
005899b6              }
005899b6              
005899b8              SquelchInfo::~SquelchInfo(ecx_4);
00589973          }
0058996a      }
0058996a      
005899c2      return 0;
00589960  }

005899f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00589a00  class CCommunicationSystem::ChatInterfaceProvider* gmCCommunicationSystem::CreateChatInterfaceProvider(class gmCCommunicationSystem* this @ ecx)

00589a00  {
00589a02      void* result = operator new(0x14);
00589a02      
00589a0c      if (result == 0)
00589a3a          return 0;
00589a3a      
00589a0e      *(uint32_t*)((char*)result + 0xc) = 0x7942f4;
00589a15      *(uint32_t*)((char*)result + 0x10) = 1;
00589a1c      *(uint32_t*)result = 0x7e2f24;
00589a22      *(uint32_t*)((char*)result + 4) = 0x7e2f14;
00589a29      *(uint32_t*)((char*)result + 8) = 0x7e2ef8;
00589a30      *(uint32_t*)((char*)result + 0xc) = 0x7e2ef4;
00589a37      return result;
00589a00  }

00589a3b                                                                                   90 90 90 90 90                             .....

00589a40  class PStringBase<char>* gmCCommunicationSystem::GetLastTelleeName(class PStringBase<char>* __return)

00589a40  {
00589a40      class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
00589a40      
00589a4c      if (CCommunicationSystem::s_pInstance_1 == 0)
00589a4c      {
00589a4e          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00589a59          __return->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00589a5b          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00589a64          return __return;
00589a4c      }
00589a4c      
00589a65      class PStringBase<char> eax_1 = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_1 + 0x68);
00589a68      __return->m_charbuffer = eax_1;
00589a6e      InterlockedIncrement((eax_1 - 0x10));
00589a77      return __return;
00589a40  }

00589a78                                                                          90 90 90 90 90 90 90 90                          ........

00589a80  void gmCCommunicationSystem::ConvertSQToPString(class SquelchInfo const* arg1, class AC1Legacy::PStringBase<char>* arg2, int32_t const arg3)

00589a80  {
00589a90      AC1Legacy::PStringBase<char>::set(arg2, &data_7928af);
00589a90      
00589aa5      if (SquelchInfo::IsEmpty(arg1) == 0)
00589aa5      {
00589aac          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00589abe          class AC1Legacy::PSRefBuffer<char>* var_418 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00589ac2          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00589acd          class SquelchInfo* edi_2;
00589acd          
00589acd          if (AC1Legacy::PStringBase<char>::s_NullBuffer_2 == arg1->_name.m_buffer)
00589afc              edi_2 = arg1;
00589acd          else
00589acd          {
00589ad8              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
00589ada                  AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
00589ada              
00589ae2              edi_2 = arg1;
00589ae9              class AC1Legacy::PSRefBuffer<char>* m_buffer = edi_2->_name.m_buffer;
00589aec              var_418 = m_buffer;
00589af4              InterlockedIncrement(&m_buffer->m_cRef);
00589af6              AC1Legacy::PStringBase<char>::s_NullBuffer_2 = var_418;
00589acd          }
00589acd          
00589b03          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00589b08          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00589b10          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00589b10          
00589b17          if (edi_2->_is_zone_squelch != 0)
00589b22              AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, " (account) ");
00589b22          
00589b2b          int32_t* var_41c;
00589b2b          class AC1Legacy::PStringBase<char> __return;
00589b2b          class AC1Legacy::PStringBase<char> __return_1;
00589b2b          int32_t* var_408;
00589b2b          class AC1Legacy::PStringBase<char> __return_2;
00589b2b          
00589b2b          if (AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_len != 1)
00589b2b          {
00589b3a              class AC1Legacy::PStringBase<char>* eax_6 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_41c, &data_794098);
00589b7c              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&var_408, "Name: "), &__return_2, &var_418), &__return_1, &AC1Legacy::PStringBase<char>::s_NullBuffer_3), &__return, eax_6)->m_buffer;
00589b7e              uint32_t m_len = m_buffer_1->m_len;
00589b7e              
00589b8c              if ((m_len != 1 && m_buffer_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
00589b9b                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &m_buffer_1->m_data, (m_len - 1));
00589b9b              
00589ba0              class AC1Legacy::PStringBase<char> __return_3 = __return;
00589ba0              
00589bb0              if ((InterlockedDecrement((__return_3 + 4)) == 0 && __return_3 != 0))
00589bb8                  **(uint32_t**)__return_3(1);
00589bb8              
00589bba              class AC1Legacy::PStringBase<char> __return_4 = __return_1;
00589bba              
00589bca              if ((InterlockedDecrement((__return_4 + 4)) == 0 && __return_4 != 0))
00589bd2                  **(uint32_t**)__return_4(1);
00589bd2              
00589bd4              class AC1Legacy::PStringBase<char> __return_5 = __return_2;
00589bd4              
00589be4              if ((InterlockedDecrement((__return_5 + 4)) == 0 && __return_5 != 0))
00589bec                  **(uint32_t**)__return_5(1);
00589bec              
00589bee              int32_t* esi_1 = var_408;
00589bee              
00589bfe              if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00589c06                  **(uint32_t**)esi_1(1);
00589c06              
00589c08              int32_t* esi_2 = var_41c;
00589c08              
00589c18              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00589c20                  **(uint32_t**)esi_2(1);
00589b2b          }
00589b2b          
00589c2b          uint32_t* var_430_14;
00589c2b          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4;
00589c2b          
00589c2b          if (arg3 != 0)
00589c2b          {
00589c8d          label_589c8d:
00589c8d              __return_1 = 1;
00589c8d              
00589deb              for (uint32_t i = 0; i < 0x22; i += 1)
00589deb              {
00589caf                  if ((SquelchInfo::IsSquelched(arg1, i) != 0 && LogTextTypeEnumMapper::IsLegalChannel(i) != 0))
00589caf                  {
00589cd1                      void var_400;
00589cd1                      LogTextTypeEnumMapper::LogTextTypeToString(i, &var_400, 0x400);
00589ce2                      int32_t* eax_31 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_408, "Unknown");
00589d03                      int32_t eax_35 = _stricmp((*(uint32_t*)AC1Legacy::PStringBase<char>::PStringBase<char>(&var_41c, &var_400) + 0x14), (*(uint32_t*)eax_31 + 0x14));
00589d0b                      int32_t* eax_36 = var_41c;
00589d12                      char ebx_2 = ((int8_t)-(eax_35));
00589d12                      
00589d26                      if ((InterlockedDecrement(&eax_36[1]) == 0 && eax_36 != 0))
00589d2e                          **(uint32_t**)eax_36(1);
00589d2e                      
00589d30                      int32_t* esi_6 = var_408;
00589d30                      
00589d40                      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00589d48                          **(uint32_t**)esi_6(1);
00589d48                      
00589d4c                      if ((ebx_2 - ebx_2) == 0xff)
00589d4c                      {
00589d58                          if (__return_1 == 0)
00589d58                          {
00589d6d                              AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &data_794334);
00589d7e                              AC1Legacy::PStringBase<char>::operator+=(arg2, &__return);
00589d83                              class AC1Legacy::PStringBase<char> __return_6 = __return;
00589d83                              
00589d93                              if ((InterlockedDecrement((__return_6 + 4)) == 0 && __return_6 != 0))
00589d9b                                  **(uint32_t**)__return_6(1);
00589d58                          }
00589d58                          else
00589d5a                              __return_1 = 0;
00589d5a                          
00589da6                          AC1Legacy::PStringBase<char>::PStringBase<char>(&__return_2, &var_400);
00589dab                          class AC1Legacy::PStringBase<char> __return_7 = __return_2;
00589daf                          int32_t eax_43 = *(uint32_t*)(__return_7 + 8);
00589daf                          
00589dbd                          if ((eax_43 != 1 && __return_7 != AC1Legacy::PStringBase<char>::s_NullBuffer))
00589dcc                              AC1Legacy::PStringBase<char>::append_n_chars(arg2, (__return_7 + 0x14), (eax_43 - 1));
00589dcc                          
00589dd9                          if (InterlockedDecrement((__return_7 + 4)) == 0)
00589de1                              **(uint32_t**)__return_7(1);
00589d4c                      }
00589d4c                      
00589de3                      AC1Legacy::PStringBase<char>::s_NullBuffer_2 = var_418;
00589caf                  }
00589deb              }
00589deb              
00589df1              AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00589df8              var_430_14 = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef;
00589c2b          }
00589c2b          else
00589c2b          {
00589c38              if (SquelchInfo::IsSquelched(edi_2, 1) == 0)
00589c38                  goto label_589c8d;
00589c38              
00589c43              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_41c, "All message types");
00589c48              int32_t* esi_3 = var_41c;
00589c4c              int32_t eax_24 = esi_3[2];
00589c4c              
00589c5a              if ((eax_24 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
00589c69                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_3[5], (eax_24 - 1));
00589c69              
00589c76              if (InterlockedDecrement(&esi_3[1]) == 0)
00589c7e                  **(uint32_t**)esi_3(1);
00589c7e              
00589c80              AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00589c87              var_430_14 = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef;
00589c2b          }
00589c2b          
00589e01          if ((InterlockedDecrement(var_430_14) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
00589e03              AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
00589e03          
00589e13          if (InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0)
00589e15              AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
00589aa5      }
00589a80  }

00589c99                                                                             8d a4 24 00 00 00 00                           ..$....
00589e28                          90 90 90 90 90 90 90 90                                                          ........

00589e30  void __stdcall gmCCommunicationSystem::uiChatInterfaceProvider::OnSendToRoomByIDResult(class gmCCommunicationSystem::uiChatInterfaceProvider* this @ ecx, HRESULT arg2, uint32_t arg3, uint16_t const* arg4, struct tagBLOB arg5)

00589e30  {
00589e30      class gmCCommunicationSystem::uiChatInterfaceProvider* this_1 = this;
00589e31      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00589e3d      void* __offset(PSRefBufferCharData<unsigned short>, -0x10) var_8 = &PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8];
00589e3e      InterlockedIncrement(var_8, PStringBase<unsigned short>::s_NullBuffer_1);
00589e3e      
00589e4a      if (arg2 != 0)
00589e4a      {
00589e54          uint32_t var_c_1 = arg3;
00589e55          uint16_t const* var_10_1 = arg4;
00589e60          PStringBase<unsigned short>::sprintf(&var_8, u"Failed to send text: [%ws] to ro…");
00589e7a          ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &var_8, 0, 1, 0);
00589e4a      }
00589e4a      
00589e7f      int32_t esi;
00589e7f      int32_t var_c_2 = esi;
00589e84      void* __offset(PSRefBufferCharData<unsigned short>, -0x24) esi_2 = ((char*)var_8 - 0x14);
00589e84      
00589e97      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00589e9f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x24)(1);
00589e30  }

00589ea6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00589eb0  int32_t gmCCommunicationSystem::GetListofSquelchChannels(class PStringBase<char>* arg1)

00589eb0  {
00589ebe      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00589ebe      AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &data_7928af);
00589ece      void var_18;
00589ece      SquelchInfo::SquelchInfo(&var_18, &AC1Legacy::PStringBase<char>::s_NullBuffer_2, 1);
00589ed3      int32_t* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00589ed3      
00589ee9      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3[1]) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
00589ef1          **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_3(1);
00589ef1      
00589ef3      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00589ef8      AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00589f00      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00589f12      gmCCommunicationSystem::ConvertSQToPString(&var_18, &AC1Legacy::PStringBase<char>::s_NullBuffer_2, 1);
00589f17      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00589f22      char (* var_34)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data;
00589f29      PStringBase<char>::sprintf(arg1, "Squelch channels are as follows:…");
00589f29      
00589f3d      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
00589f3f          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
00589f3f      
00589f4b      SquelchInfo::~SquelchInfo(&var_18);
00589f5a      return 1;
00589eb0  }

00589f5b                                                                                   90 90 90 90 90                             .....

00589f60  void __convention("regparm") gmCCommunicationSystem::HandleRangedTalkEvent(class AC1Legacy::PStringBase<char> const* arg1, class AC1Legacy::PStringBase<char> const* arg2, uint32_t const arg3, float arg4, uint32_t const arg5)

00589f60  {
00589f60      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4;
00589f60      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
00589f60      
00589f6e      if (SmartBox::smartbox->player != 0)
00589f6e      {
00589f74          int32_t __saved_ebx_2;
00589f74          int32_t __saved_ebx_1 = __saved_ebx_2;
00589f75          int32_t __saved_ebp_2;
00589f75          int32_t __saved_ebp_1 = __saved_ebp_2;
00589f76          int32_t __saved_esi_2;
00589f76          int32_t __saved_esi_1 = __saved_esi_2;
00589f7d          int32_t __saved_edi_2;
00589f7d          int32_t __saved_edi_1 = __saved_edi_2;
00589f7d          
00589f7e          if (arg3 != 0)
00589f7e          {
00589f84              int32_t var_18_1 = 0x7928af;
00589f8d              AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, &data_7928af);
00589f96              uint32_t const var_18_2 = arg5;
00589f9b              int32_t* var_1c_1 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00589f9c              uint32_t const var_20_1 = arg3;
00589f9d              int32_t eax_1 = gmCCommunicationSystem::IsSquelched();
00589fa4              int32_t* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00589fa4              
00589fbd              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3[1]) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
00589fbd              {
00589fc1                  int32_t var_18_4 = 1;
00589fc5                  **(uint32_t**)AC1Legacy::PStringBase<char>::s_NullBuffer_3(1);
00589fbd              }
00589fbd              
00589fc9              if ((eax_1 == 0 && ACCWeenieObject::ObjectsInRange(SmartBox::smartbox->player_id, arg3, ((double)((long double)arg4)), eax_1, eax_1) != 0))
00589fc9              {
00589ff8                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00589ffd                  AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0058a005                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0058a019                  double var_24_1;
0058a019                  
0058a019                  if ((arg3 < 0x50000001 || arg3 > 0x6fffffff))
0058a019                  {
0058a054                      char (* var_18_8)[0x1] = &arg1->m_buffer->m_data;
0058a058                      char (* var_1c_4)[0x1] = &arg2->m_buffer->m_data;
0058a05d                      char const* const var_20_3 = "%s says, "%s"\n";
0058a062                      var_24_1 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0058a063                      AC1Legacy::PStringBase<char>::sprintf(var_24_1, "%s says, "%s"\n");
0058a019                  }
0058a019                  else
0058a019                  {
0058a02a                      char (* var_18_7)[0x1] = &arg1->m_buffer->m_data;
0058a02b                      char (* eax_9)[0x1] = &arg2->m_buffer->m_data;
0058a02e                      char (* var_1c_3)[0x1] = eax_9;
0058a02f                      char (* var_20_2)[0x1] = eax_9;
0058a030                      var_24_1 = arg3;
0058a035                      char const* const var_28_2 = "<Tell:IIDString:%d:%s>%s<\Tell> …";
0058a03b                      AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "<Tell:IIDString:%d:%s>%s<\Tell> …");
0058a019                  }
0058a019                  
0058a06f                  int32_t var_18_9 = 0;
0058a071                  int32_t var_1c_5 = 1;
0058a077                  var_24_1 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data;
0058a07f                  ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), var_24_1, arg5, 1, 0);
0058a088                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2);
00589fc9              }
00589f7e          }
00589f6e      }
00589f60  }

0058a093                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058a0a0  int32_t gmCCommunicationSystem::DoGlobalSquelchQuery()

0058a0a0  {
0058a0aa      if (CCommunicationSystem::s_pInstance == 0)
0058a0b1          return 0;
0058a0b1      
0058a0b2      class PStringBase<unsigned short> ebx;
0058a0b2      class PStringBase<unsigned short> var_24 = ebx;
0058a0b3      wchar16* esi;
0058a0b3      wchar16 const* const var_28 = esi;
0058a0bd      uint16_t* var_20;
0058a0bd      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, u"The following types of messages …");
0058a0c8      void* __offset(CCommunicationSystem, 0x48) esi_2 = (CCommunicationSystem::s_pInstance + 0x48);
0058a0d3      uint16_t* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = &SquelchInfo::`vftable';
0058a0db      class PStringBase<unsigned short> var_14;
0058a0db      AC1Legacy::vlong::vlong(&var_14, ((char*)esi_2 + 4));
0058a0e3      int32_t var_8 = *(int32_t*)((char*)ADJ(esi_2) + 0x58);
0058a0e7      int32_t esi_3 = *(int32_t*)((char*)ADJ(esi_2) + 0x5c);
0058a0ea      int32_t var_4 = esi_3;
0058a0f8      InterlockedIncrement((esi_3 + 4));
0058a105      class PStringBase<unsigned short> var_1c;
0058a105      
0058a105      if (SquelchInfo::IsEmpty(&var_14) == 0)
0058a105      {
0058a15d          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0058a162          AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0058a166          wchar16* edi;
0058a166          var_28 = edi;
0058a16b          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0058a16d          var_28 = nullptr;
0058a179          void var_10;
0058a179          gmCCommunicationSystem::ConvertSQToPString(&var_10, &var_14, var_28);
0058a17e          class PStringBase<unsigned short> edi_1 = var_14;
0058a188          var_28 = (edi_1 + 0x14);
0058a194          uint16_t* eax_8 = *(uint32_t*)PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, WidthConvert, var_28);
0058a196          int32_t ecx_10 = *(uint32_t*)((char*)eax_8 - 4);
0058a196          
0058a19c          if (ecx_10 != 1)
0058a19c          {
0058a19f              var_28 = (ecx_10 - 1);
0058a1a5              PStringBase<unsigned short>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, eax_8, var_28);
0058a19c          }
0058a19c          
0058a1b4          int32_t* esi_7 = (var_14 - 0x14);
0058a1ba          var_28 = &esi_7[1];
0058a1ba          
0058a1c3          if ((InterlockedDecrement(var_28) == 0 && esi_7 != 0))
0058a1cb              **(uint32_t**)esi_7(1);
0058a1cb          
0058a1d9          if ((InterlockedDecrement((edi_1 + 4)) == 0 && edi_1 != 0))
0058a1e1              **(uint32_t**)edi_1(1);
0058a105      }
0058a105      else
0058a105      {
0058a107          var_28 = u"none";
0058a110          PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, var_28);
0058a115          uint16_t* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0058a119          int32_t ecx_5 = *(uint32_t*)((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_3 - 4);
0058a119          
0058a11f          if (ecx_5 != 1)
0058a11f          {
0058a122              var_28 = (ecx_5 - 1);
0058a128              PStringBase<unsigned short>::append_n_chars(&var_1c, AC1Legacy::PStringBase<char>::s_NullBuffer_3, var_28);
0058a12d              AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0058a11f          }
0058a11f          
0058a13d          var_28 = &AC1Legacy::PStringBase<char>::s_NullBuffer_3[-8];
0058a13d          
0058a14a          if ((InterlockedDecrement(var_28) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0x14))
0058a156              **(uint32_t**)((char*)AC1Legacy::PStringBase<char>::s_NullBuffer_3 - 0x14)(1);
0058a105      }
0058a105      
0058a1ed      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_1c, &data_79c288);
0058a1f2      class PStringBase<unsigned short> eax_12 = var_1c;
0058a1f6      int32_t ecx_17 = *(uint32_t*)(eax_12 - 4);
0058a1f6      
0058a1fc      if (ecx_17 != 1)
0058a1fc      {
0058a205          PStringBase<unsigned short>::append_n_chars(&var_20, eax_12, (ecx_17 - 1));
0058a20a          eax_12 = var_1c;
0058a1fc      }
0058a1fc      
0058a21d      if ((InterlockedDecrement((eax_12 - 0x10)) == 0 && eax_12 != 0x14))
0058a225          **(uint32_t**)(eax_12 - 0x14)(1);
0058a225      
0058a230      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, u"(For a list of filter options, t…");
0058a235      uint16_t* eax_15 = var_20;
0058a239      int32_t ecx_22 = *(uint32_t*)((char*)eax_15 - 4);
0058a239      
0058a23f      if (ecx_22 != 1)
0058a23f      {
0058a248          PStringBase<unsigned short>::append_n_chars(&var_24, eax_15, (ecx_22 - 1));
0058a24d          eax_15 = var_20;
0058a23f      }
0058a23f      
0058a260      if ((InterlockedDecrement(&eax_15[-8]) == 0 && eax_15 != 0x14))
0058a268          **(uint32_t**)((char*)eax_15 - 0x14)(1);
0058a268      
0058a27c      ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), &var_28, 0, 1, 0);
0058a285      SquelchInfo::~SquelchInfo(&var_20);
0058a28e      void* esi_11 = &var_28[-0xa];
0058a28e      
0058a29d      if ((InterlockedDecrement(((char*)esi_11 + 4)) == 0 && esi_11 != 0))
0058a2a5          **(uint32_t**)esi_11(1);
0058a2a5      
0058a2b1      return 1;
0058a0a0  }

0058a2b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0058a2c0  int32_t gmCCommunicationSystem::DoSquelchQuery()

0058a2c0  {
0058a2ca      if (CCommunicationSystem::s_pInstance == 0)
0058a2d1          return 0;
0058a2d1      
0058a2df      class AC1Legacy::PStringBase<char> var_24;
0058a2df      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_24, "(account) denotes a character wh…");
0058a2e4      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0058a2ef      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0058a2f7      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0058a2f9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0058a303      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0058a307      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
0058a317      void __return_2;
0058a317      PackableHashTable<unsigned long,SquelchInfo>::begin((CCommunicationSystem::s_pInstance + 0x34), &__return_2);
0058a31c      void* i_1;
0058a31c      void* const i = i_1;
0058a322      int32_t* var_14;
0058a322      
0058a322      if (i != 0)
0058a322      {
0058a37f          int32_t* __return;
0058a37f          AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &data_794508);
0058a384          int32_t* __return_3 = __return;
0058a388          int32_t eax_6 = __return_3[2];
0058a388          
0058a396          if ((eax_6 != 1 && __return_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0058a3a2              AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &__return_3[5], (eax_6 - 1));
0058a3a2          
0058a3b5          if (InterlockedDecrement(&__return_3[1]) == 0)
0058a3bd              **(uint32_t**)__return_3(1);
0058a3bd          
0058a4c5          do
0058a4c5          {
0058a3ce              gmCCommunicationSystem::ConvertSQToPString(((char*)i + 4), &AC1Legacy::PStringBase<char>::s_NullBuffer_4, 0);
0058a3df              class AC1Legacy::PStringBase<char>* eax_10 = AC1Legacy::PStringBase<char>::PStringBase<char>(&var_14, &data_794508);
0058a410              class AC1Legacy::PStringBase<char> __return_1;
0058a410              int32_t* var_18;
0058a410              class AC1Legacy::PSRefBuffer<char>* m_buffer = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&var_18, (&data_794338)), &__return_1, &AC1Legacy::PStringBase<char>::s_NullBuffer_4), &__return, eax_10)->m_buffer;
0058a412              uint32_t m_len_2 = m_buffer->m_len;
0058a412              
0058a420              if ((m_len_2 != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
0058a42c                  AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &m_buffer->m_data, (m_len_2 - 1));
0058a42c              
0058a431              int32_t* __return_4 = __return;
0058a431              
0058a441              if ((InterlockedDecrement(&__return_4[1]) == 0 && __return_4 != 0))
0058a449                  **(uint32_t**)__return_4(1);
0058a449              
0058a44b              class AC1Legacy::PStringBase<char> __return_5 = __return_1;
0058a44b              
0058a45b              if ((InterlockedDecrement((__return_5 + 4)) == 0 && __return_5 != 0))
0058a463                  **(uint32_t**)__return_5(1);
0058a463              
0058a465              int32_t* esi = var_18;
0058a465              
0058a475              if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
0058a47d                  **(uint32_t**)esi(1);
0058a47d              
0058a47f              int32_t* esi_1 = var_14;
0058a47f              
0058a48f              if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0058a497                  **(uint32_t**)esi_1(1);
0058a497              
0058a499              void* const i_2 = *(uint32_t*)((char*)i + 0x1c);
0058a499              
0058a49e              if (i_2 == 0)
0058a49e              {
0058a4a7                  int32_t eax_23 = (*(uint32_t*)((char*)i + 0x20) + 1);
0058a4aa                  int32_t var_4;
0058a4aa                  
0058a4aa                  if (eax_23 >= var_4)
0058a4aa                  {
0058a4bf                  label_58a4bf:
0058a4bf                      i_2 = nullptr;
0058a4aa                  }
0058a4aa                  else
0058a4aa                  {
0058a4b4                      int32_t var_8;
0058a4b4                      
0058a4b4                      while (*(uint32_t*)(var_8 + (eax_23 << 2)) == 0)
0058a4b4                      {
0058a4ba                          eax_23 += 1;
0058a4ba                          
0058a4bd                          if (eax_23 >= var_4)
0058a4bd                              goto label_58a4bf;
0058a4b4                      }
0058a4b4                      
0058a584                      i_2 = *(uint32_t*)(var_8 + (eax_23 << 2));
0058a4aa                  }
0058a49e              }
0058a49e              
0058a4c1              i = i_2;
0058a4c5          } while (i != 0);
0058a322      }
0058a322      else
0058a322      {
0058a32d          AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, "none\n");
0058a332          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0058a336          uint32_t m_len = AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_len;
0058a336          
0058a344          if ((m_len != 1 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0058a350              AC1Legacy::PStringBase<char>::append_n_chars(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_data, (m_len - 1));
0058a350          
0058a363          if (InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef) == 0)
0058a369              AC1Legacy::PStringBase<char>::s_NullBuffer_6->vtable->__vecDelDtor(1);
0058a322      }
0058a322      
0058a4cf      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058a4d3      uint32_t m_len_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_len;
0058a4d3      
0058a4e1      if ((m_len_1 != 1 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != AC1Legacy::PStringBase<char>::s_NullBuffer))
0058a4ed          AC1Legacy::PStringBase<char>::append_n_chars(&var_24, &AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_data, (m_len_1 - 1));
0058a4ed      
0058a4f2      class AC1Legacy::PStringBase<char> edi = var_24;
0058a506      class PStringBase<unsigned short>* eax_26;
0058a506      int32_t* ebx_2;
0058a506      eax_26 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, WidthConvert, (edi + 0x14));
0058a513      ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), eax_26, 0, 1, 0);
0058a51c      int32_t* esi_3 = &var_14[-5];
0058a51c      
0058a52b      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0058a533          **(uint32_t**)esi_3(1);
0058a533      
0058a541      if ((InterlockedDecrement(&ebx_2[1]) == 0 && ebx_2 != 0))
0058a549          **(uint32_t**)ebx_2(1);
0058a549      
0058a54b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058a54b      
0058a557      if (InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef) == 0)
0058a559          AC1Legacy::PStringBase<char>::s_NullBuffer_7->vtable->__vecDelDtor(1);
0058a559      
0058a56d      if ((InterlockedDecrement((edi + 4)) == 0 && edi != 0))
0058a575          **(uint32_t**)edi(1);
0058a575      
0058a583      return 1;
0058a2c0  }

0058a58c                                      90 90 90 90                                                              ....

0058a590  void __stdcall gmCCommunicationSystem::uiChatInterfaceProvider::OnSendToRoom(class gmCCommunicationSystem::uiChatInterfaceProvider* this @ ecx, uint32_t arg2, uint16_t const* arg3, uint16_t const* arg4, struct tagBLOB arg5)
// This function has unresolved stack usage. View graph of stack usage to resolve.

0058a590  {
0058a597      int32_t ebx;
0058a597      int32_t var_20 = ebx;
0058a598      int32_t ebp;
0058a598      int32_t var_24 = ebp;
0058a599      uint32_t* esi;
0058a599      uint32_t* var_28 = esi;
0058a59a      int32_t edi;
0058a59a      int32_t var_2c = edi;
0058a59b      class CommandListElement* eax = CommandList::GetHead(arg_18);
0058a5a0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0058a5b3      uint32_t* var_30 = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
0058a5b4      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0058a5b8      InterlockedIncrement(var_30);
0058a5c3      class AC1Legacy::PStringBase<unsigned short> AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058a5c3      AC1Legacy::PStringBase<unsigned short>::PStringBase<unsigned short>(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, arg3);
0058a5d1      class AC1Legacy::PStringBase<char>* __return_1;
0058a5d1      class AC1Legacy::PStringBase<unsigned short>* edx;
0058a5d1      __return_1 = AC1Legacy::PStringBase<unsigned short>::PStringBase<unsigned short>(&arg5, arg4);
0058a5da      struct tagBLOB* var_34_2 = &arg5;
0058a5df      class AC1Legacy::PSRefBuffer<char>** var_38 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0058a5e0      PSUtils::narrowify(__return_1, edx);
0058a5e5      uint32_t** esp_1 = &var_30;
0058a5e8      class ClientCommunicationSystem* eax_3 = ClientCommunicationSystem::GetCommunicationSystem();
0058a5e8      
0058a5f1      if (eax_3 == 0)
0058a5f1          goto label_58a7e9;
0058a5f1      
0058a603      PStringBase<char>::PStringBase<char>(&arg3, &AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_data);
0058a60f      int32_t eax_4 = ClientCommunicationSystem::IsMessageSafe(eax_3, &arg3);
0058a620      char ebx_2 = ((int8_t)-(eax_4));
0058a624      void* esi_3 = &arg3[-0xa];
0058a62d      esp_1 = &var_28;
0058a62d      
0058a635      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0058a635      {
0058a63d          **(uint32_t**)esi_3(1);
0058a63d          esp_1 = &var_28;
0058a635      }
0058a635      
0058a641      void* const* esp_2;
0058a641      
0058a641      if ((ebx_2 - ebx_2) != 0xff)
0058a641      {
0058a7e5          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058a7e9      label_58a7e9:
0058a7e9          int32_t* esi_10 = esp_1[5];
0058a7f0          *(uint32_t*)((char*)esp_1 - 4) = &esi_10[1];
0058a7f1          void* esp_4 = &esp_1[2];
0058a7f1          
0058a7f9          if ((InterlockedDecrement() == 0 && esi_10 != 0))
0058a7f9          {
0058a7fb              int32_t edx_9 = *(uint32_t*)esi_10;
0058a7fd              *(uint32_t*)((char*)esp_4 - 4) = 1;
0058a801              *(uint32_t*)edx_9();
0058a7f9          }
0058a7f9          
0058a803          int32_t* esi_11 = *(uint32_t*)((char*)esp_4 + 0x40);
0058a80a          *(uint32_t*)((char*)esp_4 - 4) = &esi_11[1];
0058a80b          void* esp_7 = ((char*)esp_4 + 8);
0058a80b          
0058a813          if ((InterlockedDecrement() == 0 && esi_11 != 0))
0058a813          {
0058a815              int32_t edx_10 = *(uint32_t*)esi_11;
0058a817              *(uint32_t*)((char*)esp_7 - 4) = 1;
0058a81b              *(uint32_t*)edx_10();
0058a813          }
0058a813          
0058a81d          int32_t* esi_12 = *(uint32_t*)((char*)esp_7 + 0x18);
0058a824          *(uint32_t*)((char*)esp_7 - 4) = &esi_12[1];
0058a825          void* esp_10 = ((char*)esp_7 + 8);
0058a825          
0058a82d          if ((InterlockedDecrement() == 0 && esi_12 != 0))
0058a82d          {
0058a82f              int32_t edx_11 = *(uint32_t*)esi_12;
0058a831              *(uint32_t*)((char*)esp_10 - 4) = 1;
0058a835              *(uint32_t*)edx_11();
0058a82d          }
0058a82d          
0058a83a          *(uint32_t*)((char*)esp_10 - 4) = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef;
0058a83b          esp_2 = ((char*)esp_10 + 8);
0058a83b          
0058a843          if ((InterlockedDecrement() == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
0058a843          {
0058a845              struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable;
0058a849              *(uint32_t*)((char*)esp_2 - 4) = 1;
0058a84b              vtable->__vecDelDtor();
0058a843          }
0058a641      }
0058a641      else
0058a641      {
0058a650          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg5, &data_7928af);
0058a655          class CCommunicationSystem* CCommunicationSystem::s_pInstance_1 = CCommunicationSystem::s_pInstance;
0058a65c          uint32_t var_c;
0058a65c          int32_t eax_7;
0058a65c          
0058a65c          if (CCommunicationSystem::s_pInstance_1 != 0)
0058a65c          {
0058a669              uint32_t var_2c_3 = 1;
0058a66f              var_30 = &arg5;
0058a674              eax_7 = SquelchDB::IsSquelched(((char*)CCommunicationSystem::s_pInstance_1 + 0x1c), var_c, var_30, var_2c_3);
0058a65c          }
0058a65c          else
0058a65e              eax_7 = 1;
0058a65e          
0058a67b          uint32_t cbSize = arg5.cbSize;
0058a688          int32_t eax_9;
0058a688          int32_t ecx_11;
0058a688          eax_9 = InterlockedDecrement((cbSize + 4));
0058a688          
0058a690          if ((eax_9 == 0 && cbSize != 0))
0058a698              ecx_11 = **(uint32_t**)cbSize(1);
0058a698          
0058a69c          int32_t* __return;
0058a69c          int32_t* __return_2 = __return;
0058a69c          
0058a6a0          if (eax_7 == 0 != 0)
0058a6a0          {
0058a6a6              int32_t var_24_2 = ecx_11;
0058a6b6              var_28 = ((char*)arg_20 + 4);
0058a6b9              int32_t var_2c_5 = InterlockedIncrement(var_28, arg_20);
0058a6c1              var_30 = &__return_2[1];
0058a6c2              InterlockedIncrement(var_30, __return_2);
0058a6c4              class CCommunicationSystem* CCommunicationSystem::s_pInstance_2 = CCommunicationSystem::s_pInstance;
0058a6c4              
0058a6cb              if (CCommunicationSystem::s_pInstance_2 != 0)
0058a6cd                  CCommunicationSystem::s_pInstance_2 = *(int32_t*)((char*)CCommunicationSystem::s_pInstance_2 + 0x80);
0058a6cd              
0058a6df              ChatRoomTracker::GetChatFormat(CCommunicationSystem::s_pInstance_2, &__return, arg4, var_30);
0058a6df              
0058a6ef              if (CInputManager::GetMouseY(&__return) != 0)
0058a6ef              {
0058a6ff                  class AC1Legacy::PSRefBuffer<char>* m_buffer = ChatDisplayInfo::GetDisplayText(&__return, &arg5.pBlobData)->m_buffer;
0058a701                  uint32_t var_2c_8 = 0;
0058a703                  var_30 = 1;
0058a711                  uint32_t var_34_8 = CommandList::GetHead(&__return);
0058a713                  int32_t var_3c_1 = 0;
0058a719                  class PStringBase<unsigned short>* eax_15 = PStringBase<unsigned short>::PStringBase<unsigned short>(&arg5, WidthConvert, &m_buffer->m_data);
0058a726                  ClientSystem::AddTextToScroll(ClientUISystem::GetUISystem(), eax_15, var_34_8, var_30, var_2c_8);
0058a72f                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg5);
0058a738                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg5.pBlobData);
0058a6ef              }
0058a6ef              
0058a753              int32_t* var_4;
0058a753              
0058a753              if ((InterlockedDecrement(&var_4[1]) == 0 && var_4 != 0))
0058a75b                  **(uint32_t**)var_4(1);
0058a6a0          }
0058a6a0          
0058a775          if ((InterlockedDecrement((var_c + 4)) == 0 && var_c != 0))
0058a775          {
0058a777              int32_t edx_6 = *(uint32_t*)var_c;
0058a779              AC1Legacy::PStringBase<char>::s_NullBuffer_2 = 1;
0058a77d              *(uint32_t*)edx_6(AC1Legacy::PStringBase<char>::s_NullBuffer_2);
0058a775          }
0058a775          
0058a786          AC1Legacy::PStringBase<char>::s_NullBuffer_2 = &arg_28[1];
0058a786          
0058a78f          if ((InterlockedDecrement(AC1Legacy::PStringBase<char>::s_NullBuffer_2) == 0 && arg_28 != 0))
0058a797              **(uint32_t**)arg_28(1);
0058a797          
0058a7a5          if ((InterlockedDecrement(&__return_2[1], eax) == 0 && __return_2 != 0))
0058a7ad              **(uint32_t**)__return_2(1);
0058a7ad          
0058a7b7          esp_2 = &__return_addr;
0058a7b7          
0058a7bb          if (InterlockedDecrement(&arg3[2]) == 0)
0058a7bb          {
0058a7c1              uint32_t cbSize_1 = arg5.cbSize;
0058a7c1              
0058a7c7              if (cbSize_1 != 0)
0058a7c7              {
0058a7d1                  **(uint32_t**)cbSize_1(1);
0058a7da                  return;
0058a7c7              }
0058a7bb          }
0058a641      }
0058a641      
0058a84d      *(uint32_t*)esp_2;
0058a84d      esp_2[1];
0058a84d      esp_2[2];
0058a84d      esp_2[3];
0058a590  }

0058a857                                                                       90 90 90 90 90 90 90 90 90                         .........

0058a860  class DBObj* ACCharGenData::Allocator()

0058a860  {
0058a865      void* eax = operator new(0xb0);
0058a865      
0058a86f      if (eax == 0)
0058a87a          return 0;
0058a87a      
0058a873      /* tailcall */
0058a873      return ACCharGenData::ACCharGenData(eax);
0058a860  }

0058a87b                                                                                   90 90 90 90 90                             .....

0058a880  class DBObj* Attribute2ndTable::Allocator()

0058a880  {
0058a885      void* eax = operator new(0x98);
0058a885      
0058a88f      if (eax == 0)
0058a8a2          return 0;
0058a8a2      
0058a89f      return Attribute2ndTable::Attribute2ndTable(eax, INVALID_DID.id);
0058a880  }

0058a8a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0058a8b0  class DBObj* SkillTable::Allocator()

0058a8b0  {
0058a8b2      void* eax = operator new(0x50);
0058a8b2      
0058a8bc      if (eax == 0)
0058a8cf          return 0;
0058a8cf      
0058a8cc      return SkillTable::SkillTable(eax, INVALID_DID.id);
0058a8b0  }


0058a8d0  class DBObj* CSpellTable::Allocator()

0058a8d0  {
0058a8d5      void* eax = operator new(0xc8);
0058a8d5      
0058a8df      if (eax == 0)
0058a8f2          return 0;
0058a8f2      
0058a8ef      return CSpellTable::CSpellTable(eax, INVALID_DID.id);
0058a8d0  }

0058a8f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058a900  class DBObj* SpellComponentTable::Allocator()

0058a900  {
0058a902      void* eax = operator new(0x50);
0058a902      
0058a90c      if (eax == 0)
0058a91f          return 0;
0058a91f      
0058a91c      return SpellComponentTable::SpellComponentTable(eax, INVALID_DID.id);
0058a900  }


0058a920  class DBObj* ExperienceTable::Allocator()

0058a920  {
0058a922      void* eax = operator new(0x68);
0058a922      
0058a92c      if (eax == 0)
0058a93f          return 0;
0058a93f      
0058a93c      return ExperienceTable::ExperienceTable(eax, INVALID_DID.id);
0058a920  }


0058a940  class DBObj* CQuestDefDB::Allocator()

0058a940  {
0058a942      void* eax = operator new(0x50);
0058a942      
0058a94c      if (eax == 0)
0058a957          return 0;
0058a957      
0058a950      /* tailcall */
0058a950      return CQuestDefDB::CQuestDefDB(eax);
0058a940  }

0058a958                                                                          90 90 90 90 90 90 90 90                          ........

0058a960  class DBObj* ACQualityFilter::Allocator()

0058a960  {
0058a962      void* eax = operator new(0x68);
0058a962      
0058a96c      if (eax == 0)
0058a97f          return 0;
0058a97f      
0058a97c      return ACQualityFilter::ACQualityFilter(eax, INVALID_DID.id);
0058a960  }


0058a980  class DBObj* CombatManeuverTable::Allocator()

0058a980  {
0058a982      void* eax = operator new(0x40);
0058a982      
0058a98c      if (eax == 0)
0058a99f          return 0;
0058a99f      
0058a99c      return CombatManeuverTable::CombatManeuverTable(eax, INVALID_DID.id);
0058a980  }


0058a9a0  class DBObj* CContractTable::Allocator()

0058a9a0  {
0058a9a2      void* eax = operator new(0x50);
0058a9a2      
0058a9ac      if (eax == 0)
0058a9bf          return 0;
0058a9bf      
0058a9bc      return CContractTable::CContractTable(eax, INVALID_DID.id);
0058a9a0  }


0058a9c0  void __fastcall gmCLCache::gmCLCache(class gmCLCache* this)

0058a9c0  {
0058a9c3      CLCache::CLCache(this);
0058a9c8      this->vtable = 0x7e3230;
0058a9ce      this->vtable = &gmCLCache::`vftable';
0058a9d5      this->vtable = &gmCLCache::`vftable';
0058a9c0  }

0058a9e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0058a9f0  void* __thiscall gmCLCache::`vector deleting destructor'(class gmCLCache* this, uint32_t arg2)

0058a9f0  {
0058a9f6      /* tailcall */
0058a9f6      return gmCLCache::`scalar deleting destructor'(((char*)this - 0x130), arg2);
0058a9f0  }

0058a9fb                                                                                   cc cc cc cc cc                             .....

0058aa00  void* __thiscall gmCLCache::`scalar deleting destructor'(class gmCLCache* this, uint32_t arg2)

0058aa00  {
0058aa03      this->vtable = 0x7e3230;
0058aa09      this->vtable = &gmCLCache::`vftable';
0058aa10      this->vtable = &gmCLCache::`vftable';
0058aa1a      CLCache::~CLCache(this);
0058aa1a      
0058aa24      if ((arg2 & 1) != 0)
0058aa27          operator delete(this);
0058aa27      
0058aa32      return this;
0058aa00  }

0058aa35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0058aa40  uint8_t __thiscall gmCLCache::Init(class gmCLCache* this, class PStringBase<char> const* arg2, uint8_t arg3, uint8_t arg4, uint8_t arg5, uint8_t arg6, uint32_t arg7, int32_t arg8)

0058aa40  {
0058aa45      void* eax = operator new(4);
0058aa45      
0058aa4f      if (eax == 0)
0058aa59          eax = nullptr;
0058aa4f      else
0058aa51          *(uint32_t*)eax = 0x7e32ac;
0058aa51      
0058aa5c      uint8_t result = MasterDBMap::Init(eax);
0058aa5c      
0058aa66      if (result == 0)
0058aa69          return result;
0058aa69      
0058aa8e      DBCache::s_GameDataPackVer = 0;
0058aa98      DBCache::s_GameCellPackVer = 0;
0058aaa2      DBCache::s_GameDidPackVer = 0;
0058aab2      return CLCache::Init(this, arg2, arg3, arg4, arg5, 0, arg7, arg8);
0058aa40  }

0058aab5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0058aac0  void __fastcall gmCLCache::Init_Internal(class gmCLCache* this)

0058aac0  {
0058aac2      CLCache::Init_Internal(this);
0058aacc      void* eax = operator new(0x114);
0058aad8      int32_t esi;
0058aad8      
0058aad8      if (eax == 0)
0058aaef          esi = 0;
0058aad8      else
0058aaeb          esi = CLOCache::CLOCache(eax, ACCharGenData::Allocator, 0x10000002);
0058aaeb      
0058aaf3      void* eax_2 = operator new(0xc);
0058aafd      void* esi_1;
0058aafd      
0058aafd      if (eax_2 == 0)
0058ab0f          esi_1 = nullptr;
0058aafd      else
0058aafd      {
0058aaff          *(uint32_t*)((char*)eax_2 + 8) = esi;
0058ab02          *(uint32_t*)eax_2 = 0x10000002;
0058ab08          *(uint32_t*)((char*)eax_2 + 4) = 0;
0058ab0b          esi_1 = eax_2;
0058aafd      }
0058aafd      
0058ab22      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_1) == 0 && esi_1 != 0))
0058ab25          operator delete(esi_1);
0058ab25      
0058ab32      void* eax_4 = operator new(0x114);
0058ab3c      int32_t esi_2;
0058ab3c      
0058ab3c      if (eax_4 == 0)
0058ab53          esi_2 = 0;
0058ab3c      else
0058ab4f          esi_2 = CLOCache::CLOCache(eax_4, Attribute2ndTable::Allocator, 0x10000003);
0058ab4f      
0058ab57      void* eax_6 = operator new(0xc);
0058ab61      void* esi_3;
0058ab61      
0058ab61      if (eax_6 == 0)
0058ab73          esi_3 = nullptr;
0058ab61      else
0058ab61      {
0058ab63          *(uint32_t*)((char*)eax_6 + 8) = esi_2;
0058ab66          *(uint32_t*)eax_6 = 0x10000003;
0058ab6c          *(uint32_t*)((char*)eax_6 + 4) = 0;
0058ab6f          esi_3 = eax_6;
0058ab61      }
0058ab61      
0058ab86      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_3) == 0 && esi_3 != 0))
0058ab89          operator delete(esi_3);
0058ab89      
0058ab96      void* eax_8 = operator new(0x114);
0058aba0      int32_t esi_4;
0058aba0      
0058aba0      if (eax_8 == 0)
0058abb7          esi_4 = 0;
0058aba0      else
0058abb3          esi_4 = CLOCache::CLOCache(eax_8, SkillTable::Allocator, 0x10000004);
0058abb3      
0058abbb      void* eax_10 = operator new(0xc);
0058abc5      void* esi_5;
0058abc5      
0058abc5      if (eax_10 == 0)
0058abd7          esi_5 = nullptr;
0058abc5      else
0058abc5      {
0058abc7          *(uint32_t*)((char*)eax_10 + 8) = esi_4;
0058abca          *(uint32_t*)eax_10 = 0x10000004;
0058abd0          *(uint32_t*)((char*)eax_10 + 4) = 0;
0058abd3          esi_5 = eax_10;
0058abc5      }
0058abc5      
0058abea      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_5) == 0 && esi_5 != 0))
0058abed          operator delete(esi_5);
0058abed      
0058abfa      void* eax_12 = operator new(0x114);
0058ac04      int32_t esi_6;
0058ac04      
0058ac04      if (eax_12 == 0)
0058ac1b          esi_6 = 0;
0058ac04      else
0058ac17          esi_6 = CLOCache::CLOCache(eax_12, CSpellTable::Allocator, 0x10000005);
0058ac17      
0058ac1f      void* eax_14 = operator new(0xc);
0058ac29      void* esi_7;
0058ac29      
0058ac29      if (eax_14 == 0)
0058ac3b          esi_7 = nullptr;
0058ac29      else
0058ac29      {
0058ac2b          *(uint32_t*)((char*)eax_14 + 8) = esi_6;
0058ac2e          *(uint32_t*)eax_14 = 0x10000005;
0058ac34          *(uint32_t*)((char*)eax_14 + 4) = 0;
0058ac37          esi_7 = eax_14;
0058ac29      }
0058ac29      
0058ac4e      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_7) == 0 && esi_7 != 0))
0058ac51          operator delete(esi_7);
0058ac51      
0058ac5e      void* eax_16 = operator new(0x114);
0058ac68      int32_t esi_8;
0058ac68      
0058ac68      if (eax_16 == 0)
0058ac7f          esi_8 = 0;
0058ac68      else
0058ac7b          esi_8 = CLOCache::CLOCache(eax_16, SpellComponentTable::Allocator, 0x10000006);
0058ac7b      
0058ac83      void* eax_18 = operator new(0xc);
0058ac8d      void* esi_9;
0058ac8d      
0058ac8d      if (eax_18 == 0)
0058ac9f          esi_9 = nullptr;
0058ac8d      else
0058ac8d      {
0058ac8f          *(uint32_t*)((char*)eax_18 + 8) = esi_8;
0058ac92          *(uint32_t*)eax_18 = 0x10000006;
0058ac98          *(uint32_t*)((char*)eax_18 + 4) = 0;
0058ac9b          esi_9 = eax_18;
0058ac8d      }
0058ac8d      
0058acb2      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_9) == 0 && esi_9 != 0))
0058acb5          operator delete(esi_9);
0058acb5      
0058acc2      void* eax_20 = operator new(0x114);
0058accc      int32_t esi_10;
0058accc      
0058accc      if (eax_20 == 0)
0058ace3          esi_10 = 0;
0058accc      else
0058acdf          esi_10 = CLOCache::CLOCache(eax_20, ExperienceTable::Allocator, 0x10000009);
0058acdf      
0058ace7      void* eax_22 = operator new(0xc);
0058acf1      void* esi_11;
0058acf1      
0058acf1      if (eax_22 == 0)
0058ad03          esi_11 = nullptr;
0058acf1      else
0058acf1      {
0058acf3          *(uint32_t*)((char*)eax_22 + 8) = esi_10;
0058acf6          *(uint32_t*)eax_22 = 0x10000009;
0058acfc          *(uint32_t*)((char*)eax_22 + 4) = 0;
0058acff          esi_11 = eax_22;
0058acf1      }
0058acf1      
0058ad16      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_11) == 0 && esi_11 != 0))
0058ad19          operator delete(esi_11);
0058ad19      
0058ad26      void* eax_24 = operator new(0x114);
0058ad30      int32_t esi_12;
0058ad30      
0058ad30      if (eax_24 == 0)
0058ad47          esi_12 = 0;
0058ad30      else
0058ad43          esi_12 = CLOCache::CLOCache(eax_24, CQuestDefDB::Allocator, 0x1000000a);
0058ad43      
0058ad4b      void* eax_26 = operator new(0xc);
0058ad55      void* esi_13;
0058ad55      
0058ad55      if (eax_26 == 0)
0058ad67          esi_13 = nullptr;
0058ad55      else
0058ad55      {
0058ad57          *(uint32_t*)((char*)eax_26 + 8) = esi_12;
0058ad5a          *(uint32_t*)eax_26 = 0x1000000a;
0058ad60          *(uint32_t*)((char*)eax_26 + 4) = 0;
0058ad63          esi_13 = eax_26;
0058ad55      }
0058ad55      
0058ad7a      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_13) == 0 && esi_13 != 0))
0058ad7d          operator delete(esi_13);
0058ad7d      
0058ad8a      void* eax_28 = operator new(0x114);
0058ad94      int32_t esi_14;
0058ad94      
0058ad94      if (eax_28 == 0)
0058adab          esi_14 = 0;
0058ad94      else
0058ada7          esi_14 = CLOCache::CLOCache(eax_28, ACQualityFilter::Allocator, 0x1000000c);
0058ada7      
0058adaf      void* eax_30 = operator new(0xc);
0058adb9      void* esi_15;
0058adb9      
0058adb9      if (eax_30 == 0)
0058adcb          esi_15 = nullptr;
0058adb9      else
0058adb9      {
0058adbb          *(uint32_t*)((char*)eax_30 + 8) = esi_14;
0058adbe          *(uint32_t*)eax_30 = 0x1000000c;
0058adc4          *(uint32_t*)((char*)eax_30 + 4) = 0;
0058adc7          esi_15 = eax_30;
0058adb9      }
0058adb9      
0058adde      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_15) == 0 && esi_15 != 0))
0058ade1          operator delete(esi_15);
0058ade1      
0058adee      void* eax_32 = operator new(0x114);
0058adf8      int32_t esi_16;
0058adf8      
0058adf8      if (eax_32 == 0)
0058ae0f          esi_16 = 0;
0058adf8      else
0058ae0b          esi_16 = CLOCache::CLOCache(eax_32, CombatManeuverTable::Allocator, 0x1000000d);
0058ae0b      
0058ae13      void* eax_34 = operator new(0xc);
0058ae1d      void* esi_17;
0058ae1d      
0058ae1d      if (eax_34 == 0)
0058ae2f          esi_17 = nullptr;
0058ae1d      else
0058ae1d      {
0058ae1f          *(uint32_t*)((char*)eax_34 + 8) = esi_16;
0058ae22          *(uint32_t*)eax_34 = 0x1000000d;
0058ae28          *(uint32_t*)((char*)eax_34 + 4) = 0;
0058ae2b          esi_17 = eax_34;
0058ae1d      }
0058ae1d      
0058ae42      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_17) == 0 && esi_17 != 0))
0058ae45          operator delete(esi_17);
0058ae45      
0058ae52      void* eax_36 = operator new(0x114);
0058ae5c      int32_t esi_18;
0058ae5c      
0058ae5c      if (eax_36 == 0)
0058ae73          esi_18 = 0;
0058ae5c      else
0058ae6f          esi_18 = CLOCache::CLOCache(eax_36, CContractTable::Allocator, 0x10000010);
0058ae6f      
0058ae77      void* eax_38 = operator new(0xc);
0058ae81      void* esi_19;
0058ae81      
0058ae81      if (eax_38 == 0)
0058ae93          esi_19 = nullptr;
0058ae81      else
0058ae81      {
0058ae83          *(uint32_t*)((char*)eax_38 + 8) = esi_18;
0058ae86          *(uint32_t*)eax_38 = 0x10000010;
0058ae8c          *(uint32_t*)((char*)eax_38 + 4) = 0;
0058ae8f          esi_19 = eax_38;
0058ae81      }
0058ae81      
0058aea6      if ((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&DBCache::s_ObjCache.m_intrusiveTable, esi_19) == 0 && esi_19 != 0))
0058aea9          operator delete(esi_19);
0058aac0  }

0058aeb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058aec0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,RenderVertexStreamD3D *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,RenderVertexStreamD3D *> *,0>* this, uint32_t arg2)

0058aec0  {
0058aec3      class HashTableData<unsigned long,RenderVertexStreamD3D *>** m_buckets = this->m_buckets;
0058aecb      this->vtable = 0x7e32fc;
0058aecb      
0058aed1      if (m_buckets != &this->m_aInplaceBuckets)
0058aed4          operator delete[](m_buckets);
0058aed4      
0058aede      this->m_buckets = nullptr;
0058aee1      this->m_firstInterestingBucket = nullptr;
0058aee4      this->m_numBuckets = 0;
0058aee7      this->m_numElements = 0;
0058aee7      
0058aeef      if ((arg2 & 1) != 0)
0058aef2          operator delete(this);
0058aef2      
0058aefd      return this;
0058aec0  }


0058af00  float __stdcall Render::GetFogAdjustment(class Render const* this @ ecx, float arg2) __pure

0058af00  {
0058af04      return ((int32_t)((long double)arg2));
0058af00  }

0058af07                       90 90 90 90 90 90 90 90 90                                                         .........

0058af10  void* __thiscall Render::`scalar deleting destructor'(class Render* this, uint32_t arg2)

0058af10  {
0058af13      this->vtable = 0x7e3300;
0058af19      Render::End(this);
0058af19      
0058af2b      if ((this->m_DisplayModes.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0058af31          operator delete[](this->m_DisplayModes.m_data);
0058af31      
0058af3e      if ((arg2 & 1) != 0)
0058af41          operator delete(this);
0058af41      
0058af4c      return this;
0058af10  }

0058af4f                                               90                                                                 .

0058af50  class Matrix4 const* __fastcall PrimD3DRender::GetObjectMatrixInternal(class PrimD3DRender* this)

0058af50  {
0058af50      this->vtable->CalcObjectMatrixInternal();
0058af5f      return &RenderDevice::render_device->m_GState;
0058af50  }


0058af60  void __fastcall PrimD3DRender::~PrimD3DRender(class PrimD3DRender* this)

0058af60  {
0058af63      this->vtable = 0x7e3300;
0058af69      Render::End(this);
0058af69      
0058af7b      if ((this->m_DisplayModes.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0058af81          operator delete[](this->m_DisplayModes.m_data);
0058af60  }

0058af8b                                   90 90 90 90 90                                                             .....

0058af90  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,RenderVertexStreamD3D *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,RenderVertexStreamD3D *> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,RenderVertexStreamD3D *> *,0>* this, uint32_t arg2)

0058af90  {
0058af9b      arg2 = arg2;
0058af9f      uint8_t edx = ((int8_t)arg2);
0058afa3      this->m_buckets = nullptr;
0058afa6      this->m_firstInterestingBucket = nullptr;
0058afa9      this->m_numBuckets = 0;
0058afac      this->m_numElements = 0;
0058afb0      this->vtable = 0x7e32fc;
0058afb6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0058afc9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0058afc9      
0058afd3      if (eax == bucketSizesEnd_1)
0058afd5          eax -= 4;
0058afd5      
0058afd8      uint32_t eax_1 = *(uint32_t*)eax;
0058afdd      this->m_numBuckets = eax_1;
0058afdd      
0058afe0      if (eax_1 > 0x17)
0058aff6          this->m_buckets = operator new[]((eax_1 << 2));
0058afe0      else
0058afe5          this->m_buckets = &this->m_aInplaceBuckets;
0058afe5      
0058affc      class HashTableData<unsigned long,RenderVertexStreamD3D *>** m_buckets = this->m_buckets;
0058afff      uint32_t ecx_3 = (this->m_numBuckets << 2);
0058b005      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0058b016      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0058af90  }

0058b01f                                                                                               90                                 .

0058b020  void __fastcall HashTable<unsigned long,RenderVertexStreamD3D *,0>::~HashTable<unsigned long,RenderVertexStreamD3D *,0>(class HashTable<unsigned long,RenderVertexStreamD3D *,0>* this)

0058b020  {
0058b024      this->vtable = 0x7e3348;
0058b02c      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0058b031      class HashTableData<unsigned long,RenderVertexStreamD3D *>** m_buckets = this->m_intrusiveTable.m_buckets;
0058b021      this->m_intrusiveTable.vtable = 0x7e32fc;
0058b021      
0058b03f      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0058b042          operator delete[](m_buckets);
0058b042      
0058b021      this->m_intrusiveTable.m_buckets = nullptr;
0058b021      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0058b021      this->m_intrusiveTable.m_numBuckets = 0;
0058b021      this->m_intrusiveTable.m_numElements = 0;
0058b020  }

0058b05a                                                                                90 90 90 90 90 90                            ......

0058b060  void* __thiscall HashTable<unsigned long,RenderVertexStreamD3D *,0>::`scalar deleting destructor'(class HashTable<unsigned long,RenderVertexStreamD3D *,0>* this, uint32_t arg2)

0058b060  {
0058b069      this->vtable = 0x7e3348;
0058b06f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0058b074      class HashTableData<unsigned long,RenderVertexStreamD3D *>** m_buckets = this->m_intrusiveTable.m_buckets;
0058b064      this->m_intrusiveTable.vtable = 0x7e32fc;
0058b064      
0058b082      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0058b085          operator delete[](m_buckets);
0058b085      
0058b064      this->m_intrusiveTable.m_buckets = nullptr;
0058b064      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0058b064      this->m_intrusiveTable.m_numBuckets = 0;
0058b064      this->m_intrusiveTable.m_numElements = 0;
0058b064      
0058b0a0      if ((arg2 & 1) != 0)
0058b0a3          operator delete(this);
0058b0a3      
0058b0af      return this;
0058b060  }

0058b0b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0058b0c0  void* __thiscall D3DPolyRender::`scalar deleting destructor'(class D3DPolyRender* this, uint32_t arg2)

0058b0c0  {
0058b0c3      this->vtable = 0x7e3350;
0058b0c9      D3DPolyRender::End(this);
0058b0d1      HashTable<unsigned long,RenderVertexStreamD3D *,0>::~HashTable<unsigned long,RenderVertexStreamD3D *,0>(&this->m_DynamicVertexStreamHash);
0058b0d8      PrimD3DRender::~PrimD3DRender(this);
0058b0d8      
0058b0e2      if ((arg2 & 1) != 0)
0058b0e5          operator delete(this);
0058b0e5      
0058b0f0      return this;
0058b0c0  }

0058b0f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058b100  class Render* RenderAllocator::AllocateRender()

0058b100  {
0058b106      void* result = operator new(0x9c);
0058b106      
0058b114      if (result == 0)
0058b154          return result;
0058b154      
0058b116      *(uint32_t*)result = 0x7e3300;
0058b11c      *(uint32_t*)((char*)result + 4) = 1;
0058b125      *(uint32_t*)((char*)result + 0xc) = 0;
0058b128      *(uint32_t*)((char*)result + 0x10) = 0;
0058b12b      *(uint32_t*)((char*)result + 0x14) = 0;
0058b12e      Render::Begin(result);
0058b133      *(uint32_t*)result = 0x7e3350;
0058b13e      *(uint32_t*)((char*)result + 0x20) = 0x7e3348;
0058b145      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,RenderVertexStreamD3D *> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,RenderVertexStreamD3D *> *,0>(((char*)result + 0x24), 0x17);
0058b14c      D3DPolyRender::Begin(result);
0058b151      return result;
0058b100  }

0058b155                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0058b160  void __fastcall ACCmdInterp::TakeControlFromServer(class ACCmdInterp* this)

0058b160  {
0058b16a      if (ClientCombatSystem::GetCombatSystem() != 0)
0058b173          ClientCombatSystem::AbortAutomaticAttack(ClientCombatSystem::GetCombatSystem());
0058b173      
0058b17b      /* tailcall */
0058b17b      return CommandInterpreter::TakeControlFromServer(this);
0058b160  }


0058b180  int32_t ACCmdInterp::UITogglesRun(class ACCmdInterp const* this @ ecx)

0058b180  {
0058b180      class CPlayerSystem* eax_3 = CPlayerSystem::GetPlayerSystem();
0058b180      
0058b187      if (eax_3 == 0)
0058b197          return 0;
0058b197      
0058b194      return ((uint32_t)PlayerModule::ToggleRun(&eax_3->playerModule.vtable));
0058b180  }

0058b198                                                                          90 90 90 90 90 90 90 90                          ........

0058b1a0  void __fastcall ACCmdInterp::CommenceJump(class ACCmdInterp* this)

0058b1a0  {
0058b1aa      ClientCombatSystem::CommenceJump(ClientCombatSystem::GetCombatSystem());
0058b1b2      /* tailcall */
0058b1b2      return IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(this);
0058b1a0  }

0058b1b7                                                                       90 90 90 90 90 90 90 90 90                         .........

0058b1c0  void __stdcall ACCmdInterp::DoJump(class ACCmdInterp* this @ ecx, uint8_t arg2)

0058b1c0  {
0058b1c7      /* tailcall */
0058b1c7      return ClientCombatSystem::DoJump(ClientCombatSystem::GetCombatSystem(), arg2);
0058b1c0  }

0058b1cc                                      90 90 90 90                                                              ....

0058b1d0  void __fastcall ACCmdInterp::FinishJump(class ACCmdInterp* this)

0058b1d0  {
0058b1d3      class ClientCombatSystem* eax = ClientCombatSystem::GetCombatSystem();
0058b1d3      
0058b1da      if (eax != 0)
0058b1de          ClientCombatSystem::FinishJump(eax);
0058b1de      
0058b1e6      /* tailcall */
0058b1e6      return IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(this);
0058b1d0  }

0058b1eb                                   90 90 90 90 90                                                             .....

0058b1f0  void __fastcall ACCmdInterp::HandleNewForwardMovement(class ACCmdInterp* this)

0058b1f0  {
0058b1fa      if (ClientCombatSystem::GetCombatSystem() != 0)
0058b203          ClientCombatSystem::AbortAutomaticAttack(ClientCombatSystem::GetCombatSystem());
0058b203      
0058b20b      /* tailcall */
0058b20b      return CommandInterpreter::HandleNewForwardMovement(this);
0058b1f0  }


0058b210  int32_t __stdcall ACCmdInterp::SendAutonomyLevelEvent(class ACCmdInterp* this @ ecx, uint32_t arg2)

0058b210  {
0058b220      return ((uint32_t)CM_Movement::Event_AutonomyLevel(arg2));
0058b210  }

0058b223           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0058b230  int32_t __stdcall ACCmdInterp::SendDoMovementEvent(class ACCmdInterp* this @ ecx, uint32_t arg2, float arg3, enum HoldKey arg4)

0058b230  {
0058b24a      return ((uint32_t)CM_Movement::Event_DoMovementCommand(arg2, arg3, arg4));
0058b230  }

0058b24d                                         90 90 90                                                               ...

0058b250  int32_t __stdcall ACCmdInterp::SendStopMovementEvent(class ACCmdInterp* this @ ecx, uint32_t arg2, enum HoldKey arg3)

0058b250  {
0058b265      return ((uint32_t)CM_Movement::Event_StopMovementCommand(arg2, arg3));
0058b250  }

0058b268                          90 90 90 90 90 90 90 90                                                          ........

0058b270  int32_t __stdcall ACCmdInterp::SendMoveToStateEvent(class ACCmdInterp* this @ ecx, class MoveToStatePack* arg2)

0058b270  {
0058b280      return ((uint32_t)CM_Movement::Event_MoveToState(arg2));
0058b270  }

0058b283           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0058b290  int32_t __stdcall ACCmdInterp::SendAutonomousPositionEvent(class ACCmdInterp* this @ ecx, class AutonomousPositionPack* arg2)

0058b290  {
0058b2a0      return ((uint32_t)CM_Movement::Event_AutonomousPosition(arg2));
0058b290  }

0058b2a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0058b2b0  int32_t __stdcall ACCmdInterp::SendTurnToEvent(class ACCmdInterp* this @ ecx, class TurnToEventPack* arg2)

0058b2b0  {
0058b2c0      return ((uint32_t)CM_Movement::Event_TurnToEvent(arg2));
0058b2b0  }

0058b2c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0058b2d0  void __thiscall ACCmdInterp::RecvNotice_PlayerOptionChanged(class ACCmdInterp* this, enum PlayerOption arg2)

0058b2d0  {
0058b2e2      if ((arg2 == ToggleRun_PlayerOption && *(int32_t*)((char*)this + -0x98) != 0))
0058b2e2      {
0058b2f2          int32_t eax_3 = *(uint32_t*)(*(int32_t*)((char*)this + -0xc8) + 0x3c)(1);
0058b303          CMotionInterp::set_hold_run(CPhysicsObj::get_minterp(*(int32_t*)((char*)this + -0xc0)), eax_3);
0058b2e2      }
0058b2d0  }

0058b30c                                      90 90 90 90                                                              ....

0058b310  void __thiscall ACCmdInterp::SetMotion(class ACCmdInterp* this, uint32_t arg2, uint8_t arg3)

0058b310  {
0058b31b      if (this->player != 0)
0058b31b      {
0058b32c          class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0058b332          int32_t var_8_1 = 0;
0058b33d          uint32_t var_4_1 = arg2;
0058b344          uint32_t var_10c = ((uint32_t)arg3);
0058b348          int32_t var_c_1 = 4;
0058b353          SmartBox::smartbox_1->cmdinterp->vtable->HandleKeyboardCommand(&var_10c);
0058b31b      }
0058b310  }

0058b36f                                               90                                                                 .

0058b370  uint8_t __thiscall ACCmdInterp::OnAction(class ACCmdInterp* this, class InputEvent const* arg2)

0058b370  {
0058b37d      if (this->vtable->IsActive() == 0)
0058b37d      {
0058b37f          int32_t eax_1;
0058b37f          eax_1 = 1;
0058b382          return 1;
0058b37d      }
0058b37d      
0058b38d      int32_t eax_3 = (arg2->m_InputAction - 0x29);
0058b38d      
0058b393      if (eax_3 > 9)
0058b393      {
0058b4b1          class List<NoticeHandler *>** eax_19;
0058b4b1          
0058b4b1          if (HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(&this->m_hashEmoteInputActionsToCommands.vtable, arg2) != 0)
0058b4b1          {
0058b4b6              eax_19 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->m_hashEmoteInputActionsToCommands.vtable, arg2);
0058b4b6              
0058b4bd              if (eax_19 != 0)
0058b4bd              {
0058b4c6                  ACCmdInterp::SetMotion(this, *(uint32_t*)eax_19, 1);
0058b4cd                  int32_t eax_20;
0058b4cd                  eax_20 = 1;
0058b4d0                  return 1;
0058b4bd              }
0058b4b1          }
0058b4b1          
0058b4d5          eax_19 = 0;
0058b4d8          return 0;
0058b393      }
0058b393      
0058b399      switch (eax_3)
0058b399      {
0058b3d7          case 0:
0058b3d7          {
0058b3d7              ACCmdInterp::SetMotion(this, 0x45000005, arg2->m_fStart);
0058b3de              int32_t eax_7;
0058b3de              eax_7 = 1;
0058b3e1              return 1;
0058b3d7              break;
0058b3d7          }
0058b3f1          case 1:
0058b3f1          {
0058b3f1              ACCmdInterp::SetMotion(this, 0x45000006, arg2->m_fStart);
0058b3f8              int32_t eax_8;
0058b3f8              eax_8 = 1;
0058b3fb              return 1;
0058b3f1              break;
0058b3f1          }
0058b407          case 2:
0058b407          {
0058b407              ACCmdInterp::SetMotion(this, 0x41000003, 1);
0058b40e              int32_t eax_9;
0058b40e              eax_9 = 1;
0058b411              return 1;
0058b407              break;
0058b407          }
0058b455          case 3:
0058b455          {
0058b455              ACCmdInterp::SetMotion(this, 0x6500000f, arg2->m_fStart);
0058b45c              int32_t eax_13;
0058b45c              eax_13 = 1;
0058b45f              return 1;
0058b455              break;
0058b455          }
0058b46f          case 4:
0058b46f          {
0058b46f              ACCmdInterp::SetMotion(this, 0x65000010, arg2->m_fStart);
0058b476              int32_t eax_15;
0058b476              eax_15 = 1;
0058b479              return 1;
0058b46f              break;
0058b46f          }
0058b421          case 5:
0058b421          {
0058b421              ACCmdInterp::SetMotion(this, 0x6500000d, arg2->m_fStart);
0058b428              int32_t eax_11;
0058b428              eax_11 = 1;
0058b42b              return 1;
0058b421              break;
0058b421          }
0058b43b          case 6:
0058b43b          {
0058b43b              ACCmdInterp::SetMotion(this, 0x6500000e, arg2->m_fStart);
0058b442              int32_t eax_12;
0058b442              eax_12 = 1;
0058b445              return 1;
0058b43b              break;
0058b43b          }
0058b3bd          case 7:
0058b3bd          {
0058b3bd              ACCmdInterp::SetMotion(this, 0x90000c7, 1);
0058b3c4              int32_t eax_6;
0058b3c4              eax_6 = 1;
0058b3c7              return 1;
0058b3bd              break;
0058b3bd          }
0058b47c          case 8:
0058b47c          {
0058b47c              eax_3 = arg2->m_fStart;
0058b47c              
0058b483              if (eax_3 != 0)
0058b483              {
0058b485                  this->vtable->CommenceJump();
0058b48c                  int32_t eax_16;
0058b48c                  eax_16 = 1;
0058b48f                  return 1;
0058b483              }
0058b483              
0058b492              this->vtable->DoJump(1);
0058b49b              int32_t eax_18;
0058b49b              eax_18 = 1;
0058b49e              return 1;
0058b47c              break;
0058b47c          }
0058b3a9          case 9:
0058b3a9          {
0058b3a4              this->vtable->SetHoldRun(((uint32_t)arg2->m_fStart));
0058b3ae              int32_t eax_5;
0058b3ae              eax_5 = 1;
0058b3b1              return 1;
0058b3a9              break;
0058b3a9          }
0058b399      }
0058b370  }

0058b4db                                                                                   90                                         .
0058b4dc  uint32_t jump_table_58b4dc[0xa] = 
0058b4dc  {
0058b4dc      [0x0] =  0x0058b3ca
0058b4e0      [0x1] =  0x0058b3e4
0058b4e4      [0x2] =  0x0058b3fe
0058b4e8      [0x3] =  0x0058b448
0058b4ec      [0x4] =  0x0058b462
0058b4f0      [0x5] =  0x0058b414
0058b4f4      [0x6] =  0x0058b42e
0058b4f8      [0x7] =  0x0058b3b4
0058b4fc      [0x8] =  0x0058b47c
0058b500      [0x9] =  0x0058b3a0
0058b504  }

0058b504              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058b510  void __fastcall ACCmdInterp::InitializeEmoteInputActionHash(class ACCmdInterp* this)

0058b510  {
0058b523      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Ready, &Motion_Ready);
0058b534      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Crouch, &Motion_Crouch);
0058b545      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Sitting, &Motion_Sitting);
0058b556      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Sleeping, &Motion_Sleeping);
0058b567      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ShakeFistState, &Motion_ShakeFistState);
0058b578      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PrayState, &Motion_PrayState);
0058b589      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &BowDeepState, &Motion_BowDeepState);
0058b59a      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ClapHandsState, &Motion_ClapHandsState);
0058b5ab      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &CrossArmsState, &Motion_CrossArmsState);
0058b5bc      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ShiverState, &Motion_ShiverState);
0058b5cd      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PointState, &Motion_PointState);
0058b5de      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &WaveState, &Motion_WaveState);
0058b5ef      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &AkimboState, &Motion_AkimboState);
0058b600      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &SaluteState, &Motion_SaluteState);
0058b611      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ScratchHeadState, &Motion_ScratchHeadState);
0058b622      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &TapFootState, &Motion_TapFootState);
0058b633      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &LeanState, &Motion_LeanState);
0058b644      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &KneelState, &Motion_KneelState);
0058b655      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PleadState, &Motion_PleadState);
0058b666      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ATOYOT, &Motion_ATOYOT);
0058b677      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &SlouchState, &Motion_SlouchState);
0058b688      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &SurrenderState, &Motion_SurrenderState);
0058b699      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &WoahState, &Motion_WoahState);
0058b6aa      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &WindedState, &Motion_WindedState);
0058b6bb      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &SnowAngelState, &Motion_SnowAngelState);
0058b6cc      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &CurtseyState, &Motion_CurtseyState);
0058b6dd      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &AFKState, &Motion_AFKState);
0058b6ee      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &MeditateState, &Motion_MeditateState);
0058b6ff      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &SitState, &Motion_SitState);
0058b710      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &SitCrossleggedState, &Motion_SitCrossleggedState);
0058b721      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &SitBackState, &Motion_SitBackState);
0058b732      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PointLeftState, &Motion_PointLeftState);
0058b743      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PointRightState, &Motion_PointRightState);
0058b754      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &TalktotheHandState, &Motion_TalktotheHandState);
0058b765      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PointDownState, &Motion_PointDownState);
0058b776      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &DrudgeDanceState, &Motion_DrudgeDanceState);
0058b787      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PossumState, &Motion_PossumState);
0058b798      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ReadState, &Motion_ReadState);
0058b7a9      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ThinkerState, &Motion_ThinkerState);
0058b7ba      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &HaveASeatState, &Motion_HaveASeatState);
0058b7cb      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &AtEaseState, &Motion_AtEaseState);
0058b7dc      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Cheer, &Motion_Cheer);
0058b7ed      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Cry, &Motion_Cry);
0058b7fe      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ShakeFist, &Motion_ShakeFist);
0058b80f      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Beckon, &Motion_Beckon);
0058b820      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &BeSeeingYou, &Motion_BeSeeingYou);
0058b831      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &BlowKiss, &Motion_BlowKiss);
0058b842      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &BowDeep, &Motion_BowDeep);
0058b853      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ClapHands, &Motion_ClapHands);
0058b864      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Laugh, &Motion_Laugh);
0058b875      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &MimeEat, &Motion_MimeEat);
0058b886      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &MimeDrink, &Motion_MimeDrink);
0058b897      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Nod, &Motion_Nod);
0058b8a8      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Point, &Motion_Point);
0058b8b9      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ShakeHead, &Motion_ShakeHead);
0058b8ca      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Shrug, &Motion_Shrug);
0058b8db      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Wave, &Motion_Wave);
0058b8ec      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Akimbo, &Motion_Akimbo);
0058b8fd      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &HeartyLaugh, &Motion_HeartyLaugh);
0058b90e      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Salute, &Motion_Salute);
0058b91f      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ScratchHead, &Motion_ScratchHead);
0058b930      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &SmackHead, &Motion_SmackHead);
0058b941      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &TapFoot, &Motion_TapFoot);
0058b952      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &WaveHigh, &Motion_WaveHigh);
0058b963      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &WaveLow, &Motion_WaveLow);
0058b974      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &YawnStretch, &Motion_YawnStretch);
0058b985      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Cringe, &Motion_Cringe);
0058b996      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Kneel, &Motion_Kneel);
0058b9a7      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Plead, &Motion_Plead);
0058b9b8      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Shiver, &Motion_Shiver);
0058b9c9      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Shoo, &Motion_Shoo);
0058b9da      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Slouch, &Motion_Slouch);
0058b9eb      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Spit, &Motion_Spit);
0058b9fc      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Surrender, &Motion_Surrender);
0058ba0d      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Woah, &Motion_Woah);
0058ba1e      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Winded, &Motion_Winded);
0058ba2f      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &YMCA, &Motion_YMCA);
0058ba40      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Pray, &Motion_Pray);
0058ba51      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Mock, &Motion_Mock);
0058ba62      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Teapot, &Motion_Teapot);
0058ba73      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &WarmHands, &Motion_WarmHands);
0058ba84      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &NudgeLeft, &Motion_NudgeLeft);
0058ba95      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &NudgeRight, &Motion_NudgeRight);
0058baa6      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PointLeft, &Motion_PointLeft);
0058bab7      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PointRight, &Motion_PointRight);
0058bac8      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &PointDown, &Motion_PointDown);
0058bad9      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Knock, &Motion_Knock);
0058baea      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &ScanHorizon, &Motion_ScanHorizon);
0058bafb      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &DrudgeDance, &Motion_DrudgeDance);
0058bb0c      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &HaveASeat, &Motion_HaveASeat);
0058bb1d      HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashEmoteInputActionsToCommands, &Helper, &Motion_Helper);
0058b510  }

0058bb24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058bb30  void __fastcall ACCmdInterp::ACCmdInterp(class ACCmdInterp* this)

0058bb30  {
0058bb34      CommandInterpreter::CommandInterpreter(this);
0058bb39      this->vtable = &gmUrgentAssistanceUI::`vftable';
0058bb45      this->vtable = 0x7e3b00;
0058bb39      this->vtable = &ACCmdInterp::`vftable';
0058bb5c      this->m_hashEmoteInputActionsToCommands.vtable = 0x79c9ac;
0058bb66      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(&this->m_hashEmoteInputActionsToCommands.m_intrusiveTable, 0x80);
0058bb6d      ACCmdInterp::InitializeEmoteInputActionHash(this);
0058bb72      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0058bb72      
0058bb79      if (eax != 0)
0058bb7b          eax->vtable->RegisterNoticeHandler(0x4dd21f, &this->vtable);
0058bb30  }

0058bb8d                                         90 90 90                                                               ...

0058bb90  int32_t __fastcall CommandInterpreter::IsEnabled(class CommandInterpreter const* this)

0058bb90  {
0058bb93      return this->enabled;
0058bb90  }

0058bb94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058bba0  void __thiscall CommandInterpreter::SetMouseLookActive(class CommandInterpreter* this, int32_t arg2)

0058bba0  {
0058bba4      this->mouselook_active = arg2;
0058bba0  }

0058bbaa                                90 90 90 90 90 90                                                            ......

0058bbb0  int32_t __fastcall CommandInterpreter::GetMouseLookActive(class CommandInterpreter* this)

0058bbb0  {
0058bbb3      return this->mouselook_active;
0058bbb0  }

0058bbb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058bbc0  void __thiscall CommandInterpreter::SetMouseLeftDown(class CommandInterpreter* this, int32_t arg2)

0058bbc0  {
0058bbc4      this->mouseleft_down = arg2;
0058bbc0  }

0058bbca                                90 90 90 90 90 90                                                            ......

0058bbd0  int32_t __fastcall CommandInterpreter::GetMouseLeftDown(class CommandInterpreter* this)

0058bbd0  {
0058bbd3      return this->mouseleft_down;
0058bbd0  }

0058bbd4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058bbe0  void __fastcall ACCmdInterp::~ACCmdInterp(class ACCmdInterp* this)

0058bbe0  {
0058bbec      this->vtable = 0x7e3b00;
0058bbe6      this->vtable = &ACCmdInterp::`vftable';
0058bbf8      class GlobalEventHandler* eax = GlobalEventHandler::GetGlobalEventHandler();
0058bbf8      
0058bc01      if (eax != 0)
0058bc03          eax->vtable->UnRegisterAllNoticeHandlers(&this->vtable);
0058bc03      
0058bc13      this->m_hashEmoteInputActionsToCommands.vtable = 0x79c9ac;
0058bc1d      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashEmoteInputActionsToCommands.m_intrusiveTable);
0058bc22      class HashTableData<unsigned long,unsigned long>** m_buckets = this->m_hashEmoteInputActionsToCommands.m_intrusiveTable.m_buckets;
0058bc0b      this->m_hashEmoteInputActionsToCommands.m_intrusiveTable.vtable = 0x79c9a8;
0058bc0b      
0058bc30      if (m_buckets != &this->m_hashEmoteInputActionsToCommands.m_intrusiveTable.m_aInplaceBuckets)
0058bc33          operator delete[](m_buckets);
0058bc33      
0058bc0b      this->m_hashEmoteInputActionsToCommands.m_intrusiveTable.m_buckets = nullptr;
0058bc0b      this->m_hashEmoteInputActionsToCommands.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0058bc0b      this->m_hashEmoteInputActionsToCommands.m_intrusiveTable.m_numBuckets = 0;
0058bc0b      this->m_hashEmoteInputActionsToCommands.m_intrusiveTable.m_numElements = 0;
0058bbe6      this->vtable = &gmUrgentAssistanceUI::`vftable';
0058bc4f      NoticeHandler::~NoticeHandler(&this->vtable);
0058bc54      this->last_sent_position.vtable = 0x79285c;
0058bc5b      this->vtable = 0x794824;
0058bc61      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0058bc61      
0058bc69      if (ICIDM::s_cidm_1 != 0)
0058bc6b          ICIDM::s_cidm_1->vtable->UnregisterCallback(this);
0058bbe0  }

0058bc76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0058bc80  void* __thiscall ACCmdInterp::`scalar deleting destructor'(class ACCmdInterp* this, uint32_t arg2)

0058bc80  {
0058bc83      ACCmdInterp::~ACCmdInterp(this);
0058bc83      
0058bc8d      if ((arg2 & 1) != 0)
0058bc90          operator delete(this);
0058bc90      
0058bc9b      return this;
0058bc80  }

0058bc9e                                                                                            90 90                                ..

0058bca0  void __thiscall ACCWeenieObject::SetOpenable(class ACCWeenieObject* this, int32_t const arg2)

0058bca0  {
0058bca6      uint32_t _bitfield = this->pwd._bitfield;
0058bca6      
0058bcac      if (arg2 != 0)
0058bcac      {
0058bcb1          this->pwd._bitfield = (_bitfield | 1);
0058bcb7          return;
0058bcac      }
0058bcac      
0058bcbd      this->pwd._bitfield = (_bitfield & 0xfffffffe);
0058bca0  }

0058bcc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0058bcd0  void __thiscall ACCWeenieObject::SetStuck(class ACCWeenieObject* this, int32_t const arg2)

0058bcd0  {
0058bcd6      uint32_t _bitfield = this->pwd._bitfield;
0058bcd6      
0058bcdc      if (arg2 != 0)
0058bcdc      {
0058bce1          this->pwd._bitfield = (_bitfield | 4);
0058bce7          return;
0058bcdc      }
0058bcdc      
0058bced      this->pwd._bitfield = (_bitfield & 0xfffffffb);
0058bcd0  }

0058bcf6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0058bd00  void __thiscall ACCWeenieObject::SetInscribable(class ACCWeenieObject* this, int32_t const arg2)

0058bd00  {
0058bd06      uint32_t _bitfield = this->pwd._bitfield;
0058bd06      
0058bd0c      if (arg2 != 0)
0058bd0c      {
0058bd11          this->pwd._bitfield = (_bitfield | 2);
0058bd17          return;
0058bd0c      }
0058bd0c      
0058bd1d      this->pwd._bitfield = (_bitfield & 0xfffffffd);
0058bd00  }

0058bd26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0058bd30  void __thiscall ACCWeenieObject::SetHiddenAdmin(class ACCWeenieObject* this, int32_t const arg2)

0058bd30  {
0058bd36      uint32_t _bitfield = this->pwd._bitfield;
0058bd36      
0058bd3c      if (arg2 != 0)
0058bd3c      {
0058bd41          this->pwd._bitfield = (_bitfield | 0x40);
0058bd47          return;
0058bd3c      }
0058bd3c      
0058bd4d      this->pwd._bitfield = (_bitfield & 0xffffffbf);
0058bd30  }

0058bd56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0058bd60  void __thiscall ACCWeenieObject::SetUIHidden(class ACCWeenieObject* this, int32_t const arg2)

0058bd60  {
0058bd66      uint32_t _bitfield = this->pwd._bitfield;
0058bd66      
0058bd6c      if (arg2 != 0)
0058bd6c      {
0058bd73          this->pwd._bitfield = (_bitfield | 0x80);
0058bd79          return;
0058bd6c      }
0058bd6c      
0058bd81      this->pwd._bitfield = (_bitfield & 0xffffff7f);
0058bd60  }

0058bd8a                                90 90 90 90 90 90                                                            ......

0058bd90  void __thiscall ACCWeenieObject::SetCellBarrierImmune(class ACCWeenieObject* this, int32_t const arg2)

0058bd90  {
0058bd96      uint32_t _bitfield = this->pwd._bitfield;
0058bd96      
0058bd9c      if (arg2 != 0)
0058bd9c      {
0058bda3          this->pwd._bitfield = (_bitfield | 0x400000);
0058bda9          return;
0058bd9c      }
0058bd9c      
0058bdb1      this->pwd._bitfield = (_bitfield & 0xffbfffff);
0058bd90  }

0058bdba                                                                                90 90 90 90 90 90                            ......

0058bdc0  void __fastcall ACCWeenieObject::ResetPlayerDesc(class ACCWeenieObject* this)

0058bdc0  {
0058bdc3      class PlayerDesc* m_pQualities = this->m_pQualities;
0058bdc3      
0058bdcb      if (m_pQualities != 0)
0058bdcb      {
0058bdcd          m_pQualities->vtable->Release();
0058bdd2          this->m_pQualities = nullptr;
0058bdcb      }
0058bdcb      
0058bde1      class PlayerDesc* eax_2 = operator new(0x90);
0058bde1      
0058bdeb      if (eax_2 != 0)
0058bdeb      {
0058bdf4          this->m_pQualities = PlayerDesc::PlayerDesc(eax_2);
0058bdfb          return;
0058bdeb      }
0058bdeb      
0058bdfe      this->m_pQualities = nullptr;
0058bdc0  }

0058be06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0058be10  void __thiscall ACCWeenieObject::SetParentedState(class ACCWeenieObject* this, int32_t arg2)

0058be10  {
0058be16      if (arg2 != 0)
0058be16      {
0058be1e          this->pwd._location = this->pwd._valid_locations;
0058be24          return;
0058be16      }
0058be16      
0058be27      this->pwd._location = 0;
0058be10  }

0058be34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058be40  void __thiscall ACCWeenieObject::ServerSaysContainID(class ACCWeenieObject* this, uint32_t arg2, int32_t arg3, int32_t arg4)

0058be40  {
0058be40      class CObjectInventory* objInventory = this->objInventory;
0058be40      
0058be45      if (objInventory == 0)
0058be62          return;
0058be62      
0058be55      class IDList* ecx_1 = &objInventory->_containersList;
0058be55      
0058be58      if (arg4 == 0)
0058be5a          ecx_1 = &objInventory->_itemsList;
0058be5a      
0058be5d      /* tailcall */
0058be5d      return IDList::AddAtNum(ecx_1, arg2, arg3, 1);
0058be40  }

0058be65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0058be70  void __fastcall ACCWeenieObject::DeterminePositionState(class ACCWeenieObject* this)

0058be70  {
0058be75      if (this->beingRemoved != 0)
0058be75      {
0058be77          this->current_state = BEING_REMOVED;
0058be7e          return;
0058be75      }
0058be75      
0058be87      if (this->pwd._containerID != 0)
0058be87      {
0058be89          this->current_state = IN_CONTAINER;
0058be90          return;
0058be87      }
0058be87      
0058be9b      enum PositionState eax_1;
0058be9b      eax_1 = this->pwd._location != 0;
0058be9e      this->current_state = eax_1;
0058be70  }

0058bea2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0058beb0  int32_t __fastcall ACCWeenieObject::GetNumContainedItems(class ACCWeenieObject* this)

0058beb0  {
0058beb0      class CObjectInventory* objInventory = this->objInventory;
0058beb0      
0058beb5      if (objInventory == 0)
0058bebd          return 0;
0058bebd      
0058beba      return objInventory->_itemsList.numIDs;
0058beb0  }

0058bebe                                                                                            90 90                                ..

0058bec0  int32_t __fastcall ACCWeenieObject::GetNumContainedContainers(class ACCWeenieObject* this)

0058bec0  {
0058bec0      class CObjectInventory* objInventory = this->objInventory;
0058bec0      
0058bec5      if (objInventory == 0)
0058becd          return 0;
0058becd      
0058beca      return objInventory->_containersList.numIDs;
0058bec0  }

0058bece                                            90 90                                                                ..

0058bed0  int32_t __fastcall ACCWeenieObject::GetNumEmptyItemSlots(class ACCWeenieObject* this)

0058bed0  {
0058bed0      int32_t _itemsCapacity = this->pwd._itemsCapacity;
0058bed0      
0058bed9      if (_itemsCapacity == 0xffffffff)
0058bedd          return _itemsCapacity;
0058bedd      
0058bede      class CObjectInventory* objInventory = this->objInventory;
0058bede      
0058bee3      if (objInventory == 0)
0058beef          return _itemsCapacity;
0058beef      
0058beea      return (_itemsCapacity - objInventory->_itemsList.numIDs);
0058bed0  }


0058bef0  class IDList* __fastcall ACCWeenieObject::GetContainedItemsList(class ACCWeenieObject* this)

0058bef0  {
0058bef0      class CObjectInventory* objInventory = this->objInventory;
0058bef0      
0058bef5      if (objInventory == 0)
0058befd          return 0;
0058befd      
0058befa      return &objInventory->_itemsList;
0058bef0  }

0058befe                                                                                            90 90                                ..

0058bf00  class IDList* __fastcall ACCWeenieObject::GetContainedContainersList(class ACCWeenieObject* this)

0058bf00  {
0058bf00      class CObjectInventory* objInventory = this->objInventory;
0058bf00      
0058bf05      if (objInventory == 0)
0058bf0d          return 0;
0058bf0d      
0058bf0a      return &objInventory->_containersList;
0058bf00  }

0058bf0e                                            90 90                                                                ..

0058bf10  class IDList* __thiscall ACCWeenieObject::GetExhaustiveContainedItemsList(class ACCWeenieObject* this, class IDList* __return)

0058bf10  {
0058bf1c      void var_18;
0058bf1c      IDList::IDList(&var_18);
0058bf21      class CObjectInventory* objInventory = this->objInventory;
0058bf21      
0058bf2d      if ((objInventory != 0 && objInventory != 0xfffffff4))
0058bf2d      {
0058bf32          int32_t i = 0;
0058bf32          
0058bf36          if (objInventory->_itemsList.numIDs > 0)
0058bf36          {
0058bf50              do
0058bf50              {
0058bf45                  IDList::Add(&var_18, IDList::GetByNum(&objInventory->_itemsList, i));
0058bf4d                  i += 1;
0058bf50              } while (i < objInventory->_itemsList.numIDs);
0058bf36          }
0058bf2d      }
0058bf2d      
0058bf52      class CObjectInventory* objInventory_1 = this->objInventory;
0058bf52      
0058bf5e      if ((objInventory_1 != 0 && objInventory_1 != 0xffffffdc))
0058bf5e      {
0058bf64          int32_t i_1 = 0;
0058bf64          
0058bf68          if (objInventory_1->_containersList.numIDs > 0)
0058bf68          {
0058bfc0              do
0058bfc0              {
0058bf79                  class ACCWeenieObject* eax_5 = ClientObjMaintSystem::GetWeenieObject(IDList::GetByNum(&objInventory_1->_containersList, i_1));
0058bf79                  
0058bf83                  if (eax_5 != 0)
0058bf83                  {
0058bf85                      class CObjectInventory* objInventory_2 = eax_5->objInventory;
0058bf85                      
0058bf91                      if ((objInventory_2 != 0 && objInventory_2 != 0xfffffff4))
0058bf91                      {
0058bf96                          int32_t j = 0;
0058bf96                          
0058bf9a                          if (objInventory_2->_itemsList.numIDs > 0)
0058bf9a                          {
0058bfb8                              do
0058bfb8                              {
0058bfad                                  IDList::Add(&var_18, IDList::GetByNum(&objInventory_2->_itemsList, j));
0058bfb5                                  j += 1;
0058bfb8                              } while (j < objInventory_2->_itemsList.numIDs);
0058bf9a                          }
0058bf91                      }
0058bf83                  }
0058bf83                  
0058bfbd                  i_1 += 1;
0058bfc0              } while (i_1 < objInventory_1->_containersList.numIDs);
0058bf68          }
0058bf5e      }
0058bf5e      
0058bfce      IDList::IDList(__return, &var_18);
0058bfd7      IDList::~IDList(&var_18);
0058bfe4      return __return;
0058bf10  }

0058bfe7                       90 90 90 90 90 90 90 90 90                                                         .........

0058bff0  class PackableList<InventoryPlacement>* __fastcall ACCWeenieObject::GetInvPlacementList(class ACCWeenieObject* this)

0058bff0  {
0058bff0      class CObjectInventory* objInventory = this->objInventory;
0058bff0      
0058bff5      if (objInventory == 0)
0058bffd          return 0;
0058bffd      
0058bffa      return &objInventory->_invPlacement;
0058bff0  }

0058bffe                                                                                            90 90                                ..

0058c000  int32_t __fastcall ACCWeenieObject::AllContainedObjectsExist(class ACCWeenieObject* this)

0058c000  {
0058c003      class CObjectInventory* objInventory = this->objInventory;
0058c003      
0058c011      if ((objInventory != 0 && objInventory != 0xffffffdc))
0058c011      {
0058c016          int32_t i = 0;
0058c016          
0058c01a          if (objInventory->_containersList.numIDs > 0)
0058c01a          {
0058c046              do
0058c046              {
0058c029                  class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(IDList::GetByNum(&objInventory->_containersList, i));
0058c033                  int32_t eax_3;
0058c033                  
0058c033                  if (eax_2 != 0)
0058c037                      eax_3 = ACCWeenieObject::AllContainedObjectsExist(eax_2);
0058c037                  
0058c03e                  if ((eax_2 == 0 || eax_3 == 0))
0058c08b                      return 0;
0058c08b                  
0058c043                  i += 1;
0058c046              } while (i < objInventory->_containersList.numIDs);
0058c01a          }
0058c011      }
0058c011      
0058c048      class CObjectInventory* objInventory_1 = this->objInventory;
0058c048      
0058c054      if ((objInventory_1 != 0 && objInventory_1 != 0xfffffff4))
0058c054      {
0058c059          int32_t edi_1 = 0;
0058c059          
0058c05d          if (objInventory_1->_itemsList.numIDs > 0)
0058c05d          {
0058c069              while (true)
0058c069              {
0058c073                  if (ClientObjMaintSystem::GetWeenieObject(IDList::GetByNum(&objInventory_1->_itemsList, edi_1)) == 0)
0058c08b                      return 0;
0058c08b                  
0058c078                  edi_1 += 1;
0058c078                  
0058c07b                  if (edi_1 >= objInventory_1->_itemsList.numIDs)
0058c085                      return 1;
0058c069              }
0058c05d          }
0058c054      }
0058c054      
0058c085      return 1;
0058c000  }

0058c08c                                      90 90 90 90                                                              ....

0058c090  int32_t __thiscall ACCWeenieObject::GetPlaceInItemsList(class ACCWeenieObject* this, uint32_t arg2)

0058c090  {
0058c090      class CObjectInventory* objInventory = this->objInventory;
0058c090      
0058c095      if (objInventory == 0)
0058c0a1          return 0;
0058c0a1      
0058c09a      /* tailcall */
0058c09a      return IDList::GetPlaceInList(&objInventory->_itemsList, arg2);
0058c090  }

0058c0a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058c0b0  int32_t __thiscall ACCWeenieObject::GetPlaceInContainersList(class ACCWeenieObject* this, uint32_t arg2)

0058c0b0  {
0058c0b0      class CObjectInventory* objInventory = this->objInventory;
0058c0b0      
0058c0b5      if (objInventory == 0)
0058c0c1          return 0;
0058c0c1      
0058c0ba      /* tailcall */
0058c0ba      return IDList::GetPlaceInList(&objInventory->_containersList, arg2);
0058c0b0  }

0058c0c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058c0d0  void __thiscall ACCWeenieObject::SetWaitingState(class ACCWeenieObject* this, int32_t arg2)

0058c0d0  {
0058c0d7      if (arg2 != this->waiting)
0058c0d7      {
0058c0d9          this->waiting = arg2;
0058c0d9          
0058c0e1          if (this->valid != 0)
0058c0e9              GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058c0d7      }
0058c0d0  }

0058c0f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058c100  void __thiscall ACCWeenieObject::SetShortcutNum(class ACCWeenieObject* this, int32_t arg2, uint8_t arg3)

0058c100  {
0058c109      int32_t edx;
0058c109      edx = arg3;
0058c109      
0058c115      if ((arg2 != this->shortcutNum || edx != this->m_bShortcutGhosted))
0058c115      {
0058c117          this->shortcutNum = arg2;
0058c11d          bool cond:1_1 = this->valid == 0;
0058c11f          this->m_bShortcutGhosted = edx;
0058c11f          
0058c125          if (!(cond:1_1))
0058c12d              GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058c115      }
0058c100  }

0058c138                                                                          90 90 90 90 90 90 90 90                          ........

0058c140  void __thiscall ACCWeenieObject::SetTradeState(class ACCWeenieObject* this, int32_t arg2)

0058c140  {
0058c147      if (arg2 != this->tradeState)
0058c147      {
0058c149          this->tradeState = arg2;
0058c149          
0058c151          if (this->valid != 0)
0058c159              GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058c147      }
0058c140  }

0058c164              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058c170  void __thiscall ACCWeenieObject::SetSellState(class ACCWeenieObject* this, int32_t arg2)

0058c170  {
0058c177      if (arg2 != this->sellState)
0058c177      {
0058c179          this->sellState = arg2;
0058c179          
0058c181          if (this->valid != 0)
0058c189              GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058c177      }
0058c170  }

0058c194                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058c1a0  int32_t ACCWeenieObject::ObjectsInRange(uint32_t arg1, uint32_t arg2, double arg3, uint8_t arg4, uint8_t arg5)

0058c1a0  {
0058c1ac      class CPhysicsObj* eax = CObjectMaint::GetObjectA(CWeenieObject::objMaint, arg1);
0058c1be      class CPhysicsObj* eax_1 = CObjectMaint::GetObjectA(CWeenieObject::objMaint, arg2);
0058c1be      
0058c1c9      if ((eax != 0 && eax_1 != 0))
0058c1c9      {
0058c1d1          if (arg5 == 0)
0058c1d1          {
0058c1fa              class AC1Legacy::Vector3* eax_5;
0058c1fa              long double st0_2;
0058c1fa              eax_5 = CPhysicsObj::get_distance_to_object(eax, eax_1, ((uint32_t)arg4));
0058c1ff              long double temp0_1 = ((long double)arg3);
0058c1ff              (st0_2 - temp0_1);
0058c203              eax_5 = ((((st0_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_2, temp0_1))) ? 1 : 0) << 0xa) | ((((st0_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0058c205              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0058c205              
0058c208              if (!(p_2))
0058c210                  return 1;
0058c1d1          }
0058c1d1          else
0058c1d1          {
0058c1da              class AC1Legacy::Vector3* eax_3;
0058c1da              long double st0_1;
0058c1da              eax_3 = Position::xy_distance(&eax->m_position, &eax_1->m_position);
0058c1df              long double temp1_1 = ((long double)arg3);
0058c1df              (st0_1 - temp1_1);
0058c1e3              eax_3 = ((((st0_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_1, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0058c1e5              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0058c1e5              
0058c1e8              if (!(p_1))
0058c1f0                  return 1;
0058c1d1          }
0058c1c9      }
0058c1c9      
0058c214      return 0;
0058c1a0  }

0058c215                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0058c220  void ACCWeenieObject::RecordRequest(uint32_t arg1, enum InventoryRequest arg2)

0058c220  {
0058c228      int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0058c22e      ACCWeenieObject::prevRequestObjectID = arg1;
0058c233      int32_t eax = *(int32_t*)((char*)Timer::cur_time + 4);
0058c238      ACCWeenieObject::prevRequest = arg2;
0058c23e      (*(uint32_t*)ACCWeenieObject::prevRequestTime) = Timer::cur_time_1;
0058c244      *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = eax;
0058c220  }

0058c24a                                90 90 90 90 90 90                                                            ......

0058c250  int32_t __fastcall ACCWeenieObject::InqShowableOnRadar(class ACCWeenieObject const* this, class AC1Legacy::Vector3 const* arg2)

0058c250  {
0058c258      if (this->_phys_obj != 0)
0058c258      {
0058c25f          enum RadarEnum _radar_enum = this->pwd._radar_enum;
0058c25f          
0058c272          if (((_radar_enum == ShowMovement_RadarEnum || _radar_enum == ShowAlways_RadarEnum) || _radar_enum == ShowAttacking_RadarEnum))
0058c279              return 1;
0058c258      }
0058c258      
0058c25c      return 0;
0058c250  }

0058c27c                                                                                      90 90 90 90                              ....

0058c280  void __thiscall ACCWeenieObject::SetStructure(class ACCWeenieObject* this, uint32_t const arg2)

0058c280  {
0058c284      this->pwd._structure = arg2;
0058c290      GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058c280  }

0058c29b                                                                                   90 90 90 90 90                             .....

0058c2a0  void __thiscall ACCWeenieObject::SetMaxStructure(class ACCWeenieObject* this, uint32_t const arg2)

0058c2a0  {
0058c2a4      this->pwd._maxStructure = arg2;
0058c2b0      GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058c2a0  }

0058c2bb                                                                                   90 90 90 90 90                             .....

0058c2c0  void __thiscall ACCWeenieObject::SetStackSize(class ACCWeenieObject* this, uint32_t const arg2)

0058c2c0  {
0058c2c4      this->pwd._stackSize = arg2;
0058c2d0      GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058c2c0  }

0058c2db                                                                                   90 90 90 90 90                             .....

0058c2e0  void ACCWeenieObject::SetSelectedObject(uint32_t arg1, int32_t arg2)

0058c2e0  {
0058c2e6      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0058c2e6      
0058c2f7      if ((arg2 != 0 || ACCWeenieObject::selectedID_1 != arg1))
0058c2f7      {
0058c2fb          if (ACCWeenieObject::selectedID_1 != 0)
0058c2fb          {
0058c2fe              class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
0058c2fe              
0058c308              if (eax != 0)
0058c30a                  eax->selected = 0;
0058c2fb          }
0058c2fb          
0058c313          ACCWeenieObject::selectedID = arg1;
0058c313          
0058c319          if (arg1 != 0)
0058c319          {
0058c31c              class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg1);
0058c31c              
0058c326              if (eax_1 != 0)
0058c328                  eax_1->selected = 1;
0058c319          }
0058c319          
0058c331          if (ACCWeenieObject::selectedID_1 != arg1)
0058c331          {
0058c335              ACCWeenieObject::prevSelectedID = ACCWeenieObject::selectedID_1;
0058c335              
0058c33b              if (ACCWeenieObject::selectedID_1 != 0)
0058c33d                  ACCWeenieObject::prevSelectedValidID = ACCWeenieObject::selectedID_1;
0058c33d              
0058c343              CM_UI::SendNotice_SelectionChanged();
0058c331          }
0058c331          
0058c34f          GenItemHolder::SetSelectedItem_s(ACCWeenieObject::selectedID_1, ACCWeenieObject::selectedID);
0058c34f          
0058c35e          if (APIManager::APIIsReady() != 0)
0058c35e          {
0058c360              struct IACPlugin* eax_4 = APIManager::GetACPlugin();
0058c36b              eax_4->vtable->OnSelectedTargetChange(eax_4, ACCWeenieObject::selectedID_1, ACCWeenieObject::selectedID);
0058c35e          }
0058c2f7      }
0058c2e0  }

0058c376                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0058c380  void ACCWeenieObject::SetPreviousSelectedObject(uint32_t arg1)

0058c380  {
0058c384      ACCWeenieObject::prevSelectedID = arg1;
0058c380  }

0058c38a                                90 90 90 90 90 90                                                            ......

0058c390  void ACCWeenieObject::SetSelectedObjectID(uint32_t arg1)

0058c390  {
0058c394      ACCWeenieObject::selectedID = arg1;
0058c390  }

0058c39a                                                                                90 90 90 90 90 90                            ......

0058c3a0  int32_t __fastcall ACCWeenieObject::DoCollision(class ACCWeenieObject* this, class AtkCollisionProfile const* arg2)

0058c3a0  {
0058c3a0      class CPhysicsObj* _phys_obj = this->_phys_obj;
0058c3a0      
0058c3b2      if ((_phys_obj != 0 && *(uint8_t*)((char*)((int16_t)_phys_obj->state))[1] < 0))
0058c3b4          CPhysicsObj::play_default_script(_phys_obj);
0058c3b4      
0058c3be      return 1;
0058c3a0  }

0058c3c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058c3d0  int32_t __fastcall ACCWeenieObject::IsThePlayer(class ACCWeenieObject const* this)

0058c3d0  {
0058c3d9      uint32_t eax = (this->id - SmartBox::smartbox->player_id);
0058c3df      int32_t eax_1 = -(eax);
0058c3e4      return ((eax_1 - eax_1) + 1);
0058c3d0  }

0058c3e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0058c3f0  int32_t __fastcall ACCWeenieObject::IsCreature(class ACCWeenieObject const* this)

0058c3f0  {
0058c3fb      return ((this->vtable->InqType() >> 4) & 1);
0058c3f0  }

0058c3fc                                                                                      90 90 90 90                              ....

0058c400  uint8_t __thiscall ACCWeenieObject::CanJump(class ACCWeenieObject const* this, float arg2)

0058c400  {
0058c40a      class PlayerDesc* m_pQualities;
0058c40a      
0058c40a      if (this->vtable->IsThePlayer() != 0)
0058c40a      {
0058c40c          m_pQualities = this->m_pQualities;
0058c40c          
0058c414          if (m_pQualities != 0)
0058c414          {
0058c426              int32_t eax_2;
0058c426              eax_2 = m_pQualities->vtable->CanJump(arg2) != 0;
0058c42a              return eax_2;
0058c414          }
0058c40a      }
0058c40a      
0058c42d      m_pQualities = 0;
0058c430      return 0;
0058c400  }

0058c433                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058c440  uint8_t __thiscall ACCWeenieObject::JumpStaminaCost(class ACCWeenieObject const* this, float arg2, int32_t* arg3)

0058c440  {
0058c44a      class PlayerDesc* m_pQualities;
0058c44a      
0058c44a      if (this->vtable->IsThePlayer() != 0)
0058c44a      {
0058c44c          m_pQualities = this->m_pQualities;
0058c44c          
0058c454          if (m_pQualities != 0)
0058c454          {
0058c46b              int32_t eax_3;
0058c46b              eax_3 = m_pQualities->vtable->JumpStaminaCost(arg2, arg3) != 0;
0058c46f              return eax_3;
0058c454          }
0058c44a      }
0058c44a      
0058c472      m_pQualities = 0;
0058c475      return 0;
0058c440  }

0058c478                                                                          90 90 90 90 90 90 90 90                          ........

0058c480  int32_t __thiscall ACCWeenieObject::PlayScript(class ACCWeenieObject* this, enum PScriptType arg2, float arg3)

0058c480  {
0058c480      class CPhysicsObj* _phys_obj = this->_phys_obj;
0058c480      
0058c488      if (_phys_obj != 0)
0058c48f          /* tailcall */
0058c48f          return CPhysicsObj::play_script(_phys_obj, arg2, arg3);
0058c48f      
0058c48c      return 0;
0058c480  }

0058c494                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058c4a0  uint32_t __fastcall ACCWeenieObject::GetNumEmitters(class ACCWeenieObject* this)

0058c4a0  {
0058c4a0      class CPhysicsObj* _phys_obj = this->_phys_obj;
0058c4a0      
0058c4a8      if (_phys_obj != 0)
0058c4ad          /* tailcall */
0058c4ad          return CPhysicsObj::get_num_emitters(_phys_obj);
0058c4ad      
0058c4ac      return 0;
0058c4a0  }

0058c4b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0058c4c0  int32_t __thiscall ACCWeenieObject::GetGlobalVelocity(class ACCWeenieObject const* this, class AC1Legacy::Vector3* arg2)

0058c4c0  {
0058c4c0      class CPhysicsObj* _phys_obj = this->_phys_obj;
0058c4c0      
0058c4cb      if (_phys_obj == 0)
0058c4d2          return 0;
0058c4d2      
0058c4da      void __return;
0058c4da      class AC1Legacy::Vector3* eax_1 = CPhysicsObj::get_velocity(_phys_obj, &__return);
0058c4e1      int32_t* ecx = arg2;
0058c4e5      *(uint32_t*)ecx = eax_1->x;
0058c4ea      ecx[1] = eax_1->y;
0058c4f0      ecx[2] = eax_1->z;
0058c4fb      return 1;
0058c4c0  }

0058c4fe                                                                                            90 90                                ..

0058c500  int32_t __fastcall ACCWeenieObject::CanBypassMoveRestrictions(class ACCWeenieObject const* this)

0058c500  {
0058c500      uint32_t _bitfield = this->pwd._bitfield;
0058c500      
0058c512      if (((_bitfield & 0x100000) != 0 && (_bitfield & 0x400000) != 0))
0058c519          return 1;
0058c519      
0058c51c      return 0;
0058c500  }

0058c51d                                                                                         90 90 90                               ...

0058c520  uint8_t __thiscall ACCWeenieObject::InqJumpVelocity(class ACCWeenieObject const* this, float arg2, float* arg3)

0058c520  {
0058c52a      class PlayerDesc* m_pQualities;
0058c52a      
0058c52a      if (this->vtable->IsThePlayer() != 0)
0058c52a      {
0058c52c          m_pQualities = this->m_pQualities;
0058c52c          
0058c534          if (m_pQualities != 0)
0058c534          {
0058c54b              int32_t eax_3;
0058c54b              eax_3 = m_pQualities->vtable->InqJumpVelocity(arg2, arg3) != 0;
0058c54f              return eax_3;
0058c534          }
0058c52a      }
0058c52a      
0058c552      m_pQualities = 0;
0058c555      return 0;
0058c520  }

0058c558                                                                          90 90 90 90 90 90 90 90                          ........

0058c560  uint8_t __thiscall ACCWeenieObject::InqRunRate(class ACCWeenieObject const* this, float* arg2)

0058c560  {
0058c56a      class PlayerDesc* m_pQualities;
0058c56a      
0058c56a      if (this->vtable->IsThePlayer() != 0)
0058c56a      {
0058c56c          m_pQualities = this->m_pQualities;
0058c56c          
0058c574          if (m_pQualities != 0)
0058c574          {
0058c586              int32_t eax_2;
0058c586              eax_2 = m_pQualities->vtable->InqRunRate(arg2) != 0;
0058c58a              return eax_2;
0058c574          }
0058c56a      }
0058c56a      
0058c58d      m_pQualities = 0;
0058c590      return 0;
0058c560  }

0058c593                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058c5a0  uint8_t __thiscall ACCWeenieObject::InqMaxRunRate(class ACCWeenieObject const* this, float* arg2)

0058c5a0  {
0058c5aa      class PlayerDesc* m_pQualities;
0058c5aa      
0058c5aa      if (this->vtable->IsThePlayer() != 0)
0058c5aa      {
0058c5ac          m_pQualities = this->m_pQualities;
0058c5ac          
0058c5b4          if (m_pQualities != 0)
0058c5b4          {
0058c5c6              int32_t eax_2;
0058c5c6              eax_2 = m_pQualities->vtable->InqMaxRunRate(arg2) != 0;
0058c5ca              return eax_2;
0058c5b4          }
0058c5aa      }
0058c5aa      
0058c5cd      m_pQualities = 0;
0058c5d0      return 0;
0058c5a0  }

0058c5d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058c5e0  int32_t __fastcall ACCWeenieObject::SetupStamper(class ACCWeenieObject* this)

0058c5e0  {
0058c5eb      if (this->_stamper != 0)
0058c5f3          return 1;
0058c5f3      
0058c5f9      void* eax_2 = operator new(0x80);
0058c5f9      
0058c603      if (eax_2 == 0)
0058c603      {
0058c626          this->_stamper = nullptr;
0058c62f          return 0;
0058c603      }
0058c603      
0058c607      class ACWTimeStamper* eax_3 = ACWTimeStamper::ACWTimeStamper(eax_2);
0058c610      int32_t result;
0058c610      result = eax_3 != 0;
0058c613      this->_stamper = eax_3;
0058c61c      return result;
0058c5e0  }


0058c630  int32_t __thiscall ACCWeenieObject::IsAllegianceMember(class ACCWeenieObject const* this, class ACCWeenieObject* arg2)

0058c630  {
0058c636      if (arg2 != 0)
0058c636      {
0058c638          uint32_t _monarch = this->pwd._monarch;
0058c638          
0058c640          if (_monarch != 0)
0058c640          {
0058c64d              int32_t result;
0058c64d              result = _monarch == arg2->pwd._monarch;
0058c653              return result;
0058c640          }
0058c636      }
0058c636      
0058c658      return 0;
0058c630  }

0058c65b                                                                                   90 90 90 90 90                             .....

0058c660  int32_t __fastcall ACCWeenieObject::IsHook(class ACCWeenieObject const* this)

0058c660  {
0058c674      if ((this->pwd._hook_type != 0 && this->pwd._hook_item_types != TYPE_UNDEF))
0058c676          return 1;
0058c676      
0058c67b      return 0;
0058c660  }

0058c67c                                                                                      90 90 90 90                              ....

0058c680  void __thiscall ACCWeenieObject::OnStatUpdated(class ACCWeenieObject* this, uint32_t arg2, int32_t arg3)

0058c680  {
0058c688      if ((arg2 - 1) <= 0x19)
0058c691          switch (arg2)
0058c691          {
0058c6b1              case 1:
0058c6b1              {
0058c6b1                  ACCWeenieObject::SetStuck(this, arg3);
0058c6b1                  break;
0058c6b1              }
0058c6a0              case 3:
0058c6a0              {
0058c6a0                  int32_t edx;
0058c6a0                  edx = arg3 == 0;
0058c6a4                  ACCWeenieObject::SetOpenable(this, edx);
0058c6a0                  break;
0058c6a0              }
0058c6be              case 0x16:
0058c6be              {
0058c6be                  ACCWeenieObject::SetInscribable(this, arg3);
0058c6be                  break;
0058c6be              }
0058c6d8              case 0x18:
0058c6d8              {
0058c6d8                  ACCWeenieObject::SetUIHidden(this, arg3);
0058c6d8                  break;
0058c6d8              }
0058c6e5              case 0x19:
0058c6e5              {
0058c6e5                  ACCWeenieObject::SetCellBarrierImmune(this, arg3);
0058c6e5                  break;
0058c6e5              }
0058c6cb              case 0x1a:
0058c6cb              {
0058c6cb                  ACCWeenieObject::SetHiddenAdmin(this, arg3);
0058c6cb                  break;
0058c6cb              }
0058c691          }
0058c680  }

0058c6ed                                         8d 49 00                                                               .I.
0058c6f0  uint32_t jump_table_58c6f0[0x7] = 
0058c6f0  {
0058c6f0      [0x0] =  0x0058c6ac
0058c6f4      [0x1] =  0x0058c698
0058c6f8      [0x2] =  0x0058c6b9
0058c6fc      [0x3] =  0x0058c6d3
0058c700      [0x4] =  0x0058c6e0
0058c704      [0x5] =  0x0058c6c6
0058c708      [0x6] =  0x0058c6ea
0058c70c  }
0058c70c  uint8_t lookup_table_58c70c[0x1a] = 
0058c70c  {
0058c70c      [0x00] =  0x00
0058c70d      [0x01] =  0x06
0058c70e      [0x02] =  0x01
0058c70f      [0x03] =  0x06
0058c710      [0x04] =  0x06
0058c711      [0x05] =  0x06
0058c712      [0x06] =  0x06
0058c713      [0x07] =  0x06
0058c714      [0x08] =  0x06
0058c715      [0x09] =  0x06
0058c716      [0x0a] =  0x06
0058c717      [0x0b] =  0x06
0058c718      [0x0c] =  0x06
0058c719      [0x0d] =  0x06
0058c71a      [0x0e] =  0x06
0058c71b      [0x0f] =  0x06
0058c71c      [0x10] =  0x06
0058c71d      [0x11] =  0x06
0058c71e      [0x12] =  0x06
0058c71f      [0x13] =  0x06
0058c720      [0x14] =  0x06
0058c721      [0x15] =  0x02
0058c722      [0x16] =  0x06
0058c723      [0x17] =  0x03
0058c724      [0x18] =  0x04
0058c725      [0x19] =  0x05
0058c726  }

0058c726                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0058c730  void* __thiscall CWeenieObject::`vector deleting destructor'(class CWeenieObject* this, uint32_t arg2)

0058c730  {
0058c733      /* tailcall */
0058c733      return CWeenieObject::`scalar deleting destructor'(((char*)this - 0xc), arg2);
0058c730  }

0058c738                                                                          cc cc cc cc cc cc cc cc                          ........

0058c740  void* __thiscall CWeenieObject::`scalar deleting destructor'(class CWeenieObject* this, uint32_t arg2)

0058c740  {
0058c74a      this->vtable = 0x7e3e08;
0058c744      this->vtable = &CWeenieObject::`vftable';
0058c756      TSRecv::~TSRecv(&this->blobOrdering);
0058c75d      NoticeRegistrar::~NoticeRegistrar(&this->vtable);
0058c764      this->hash_next = nullptr;
0058c767      this->id = 0;
0058c76f      this->vtable = 0x7c62f8;
0058c76f      
0058c775      if ((arg2 & 1) != 0)
0058c778          operator delete(this);
0058c778      
0058c784      return this;
0058c740  }

0058c787                       90 90 90 90 90 90 90 90 90                                                         .........

0058c790  void __thiscall ACCWeenieObject::ACCWeenieObject(class ACCWeenieObject* this, uint32_t arg2)

0058c790  {
0058c7a0      this->hash_next = nullptr;
0058c7a3      this->id = arg2;
0058c7a6      this->vtable = 0x7c62f8;
0058c7ac      NoticeRegistrar::NoticeRegistrar(&this->vtable);
0058c7ba      this->vtable = 0x7e3e08;
0058c799      this->vtable = &CWeenieObject::`vftable';
0058c7c6      this->netblob_list = nullptr;
0058c7c9      TSRecv::TSRecv(&this->blobOrdering, TSRECV_BLOCK, 0x80000000);
0058c7d4      this->vtable = 0x7e3ea0;
0058c799      this->vtable = &ACCWeenieObject::`vftable';
0058c7e0      __builtin_memset(&this->objInventory, 0, 0x2c);
0058c801      this->shortcutNum = 0xffffffff;
0058c808      this->m_bShortcutGhosted = 0;
0058c80e      __builtin_memset(&this->preRemoveContainerID, 0, 0x14);
0058c82c      PublicWeenieDesc::PublicWeenieDesc(&this->pwd);
0058c831      uint32_t id = this->id;
0058c834      this->_stamper = nullptr;
0058c83a      this->m_pQualities = nullptr;
0058c83a      
0058c84c      if (id == SmartBox::smartbox->player_id)
0058c84c      {
0058c853          class PlayerDesc* eax = operator new(0x90);
0058c853          
0058c85d          if (eax != 0)
0058c85d          {
0058c866              this->m_pQualities = PlayerDesc::PlayerDesc(eax);
0058c871              return;
0058c85d          }
0058c85d          
0058c876          this->m_pQualities = nullptr;
0058c84c      }
0058c790  }

0058c884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058c890  int32_t __fastcall ACCWeenieObject::IsPlayer(class ACCWeenieObject const* this)

0058c890  {
0058c89c      return ((this->pwd._bitfield >> 3) & 1);
0058c890  }

0058c89d                                                                                         90 90 90                               ...

0058c8a0  int32_t __fastcall ACCWeenieObject::IsPKLite(class ACCWeenieObject const* this)

0058c8a0  {
0058c8ac      return ((this->pwd._bitfield >> 0x19) & 1);
0058c8a0  }

0058c8ad                                         90 90 90                                                               ...

0058c8b0  int32_t __fastcall ACCWeenieObject::IsPK(class ACCWeenieObject const* this)

0058c8b0  {
0058c8bc      return ((this->pwd._bitfield >> 5) & 1);
0058c8b0  }

0058c8bd                                                                                         90 90 90                               ...

0058c8c0  int32_t __fastcall ACCWeenieObject::IsImpenetrable(class ACCWeenieObject const* this)

0058c8c0  {
0058c8cc      return ((this->pwd._bitfield >> 0x15) & 1);
0058c8c0  }

0058c8cd                                         90 90 90                                                               ...

0058c8d0  enum ITEM_TYPE __fastcall ACCWeenieObject::InqType(class ACCWeenieObject const* this)

0058c8d0  {
0058c8d6      return this->pwd._type;
0058c8d0  }

0058c8d7                                                                       90 90 90 90 90 90 90 90 90                         .........

0058c8e0  int32_t __fastcall ACCWeenieObject::IsCorpse(class ACCWeenieObject const* this)

0058c8e0  {
0058c8ec      return ((this->pwd._bitfield >> 0xd) & 1);
0058c8e0  }

0058c8ed                                         90 90 90                                                               ...

0058c8f0  void* __thiscall ACCWeenieObject::`vector deleting destructor'(class ACCWeenieObject* this, uint32_t arg2)

0058c8f0  {
0058c8f3      /* tailcall */
0058c8f3      return ACCWeenieObject::`scalar deleting destructor'(((char*)this - 0xc), arg2);
0058c8f0  }

0058c8f8                                                                          cc cc cc cc cc cc cc cc                          ........

0058c900  class IDClass<_tagDataID,32,0>* __thiscall ACCWeenieObject::InqIconID(class ACCWeenieObject const* this, class IDClass<_tagDataID,32,0>* __return)

0058c900  {
0058c906      uint32_t* result = __return;
0058c90a      *(uint32_t*)result = this->pwd._iconID.id;
0058c90c      return result;
0058c900  }

0058c90f                                               90                                                                 .

0058c910  int32_t __fastcall ACCWeenieObject::IsPlayerKiller(class ACCWeenieObject const* this)

0058c910  {
0058c910      uint32_t _bitfield = this->pwd._bitfield;
0058c910      
0058c91f      if (((_bitfield & 0x20) == 0 && (_bitfield & 0x2000000) == 0))
0058c923          return 0;
0058c923      
0058c929      return 1;
0058c910  }

0058c92a                                90 90 90 90 90 90                                                            ......

0058c930  void __fastcall ACCWeenieObject::~ACCWeenieObject(class ACCWeenieObject* this)

0058c930  {
0058c933      class PlayerDesc* m_pQualities = this->m_pQualities;
0058c93f      this->vtable = 0x7e3ea0;
0058c93c      this->vtable = &ACCWeenieObject::`vftable';
0058c93c      
0058c94b      if (m_pQualities != 0)
0058c94b      {
0058c94d          PlayerDesc::Cleanup(m_pQualities);
0058c952          this->m_pQualities->vtable->Release();
0058c94b      }
0058c94b      
0058c963      PublicWeenieDesc::~PublicWeenieDesc(&this->pwd);
0058c96b      this->vtable = 0x7e3e08;
0058c93c      this->vtable = &CWeenieObject::`vftable';
0058c977      TSRecv::~TSRecv(&this->blobOrdering);
0058c97e      NoticeRegistrar::~NoticeRegistrar(&this->vtable);
0058c984      this->vtable = 0x7c62f8;
0058c98a      this->hash_next = nullptr;
0058c991      this->id = 0;
0058c930  }

0058c99a                                                                                90 90 90 90 90 90                            ......

0058c9a0  void __fastcall ACCWeenieObject::AddContentsToDestructionQueue(class ACCWeenieObject* this)

0058c9a0  {
0058c9a3      class CObjectInventory* objInventory = this->objInventory;
0058c9a3      
0058c9b1      if ((objInventory != 0 && objInventory != 0xffffffdc))
0058c9b1      {
0058c9b6          int32_t i = 0;
0058c9b6          
0058c9ba          if (objInventory->_containersList.numIDs > 0)
0058c9ba          {
0058c9da              do
0058c9da              {
0058c9c3                  uint32_t eax_1 = IDList::GetByNum(&objInventory->_containersList, i);
0058c9cf                  CObjectMaint::AddObjectToBeDestroyed(CWeenieObject::objMaint, eax_1);
0058c9d7                  i += 1;
0058c9da              } while (i < objInventory->_containersList.numIDs);
0058c9ba          }
0058c9b1      }
0058c9b1      
0058c9dc      class CObjectInventory* objInventory_1 = this->objInventory;
0058c9dc      
0058c9e8      if ((objInventory_1 != 0 && objInventory_1 != 0xfffffff4))
0058c9e8      {
0058c9ed          int32_t i_1 = 0;
0058c9ed          
0058c9f1          if (objInventory_1->_itemsList.numIDs > 0)
0058c9f1          {
0058ca0d              do
0058ca0d              {
0058c9f6                  uint32_t eax_4 = IDList::GetByNum(&objInventory_1->_itemsList, i_1);
0058ca02                  CObjectMaint::AddObjectToBeDestroyed(CWeenieObject::objMaint, eax_4);
0058ca0a                  i_1 += 1;
0058ca0d              } while (i_1 < objInventory_1->_itemsList.numIDs);
0058c9f1          }
0058c9e8      }
0058c9a0  }

0058ca13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058ca20  void __fastcall ACCWeenieObject::RemoveContentsFromDestructionQueue(class ACCWeenieObject* this)

0058ca20  {
0058ca23      class CObjectInventory* objInventory = this->objInventory;
0058ca23      
0058ca31      if ((objInventory != 0 && objInventory != 0xffffffdc))
0058ca31      {
0058ca37          int32_t i = 0;
0058ca37          
0058ca3b          if (objInventory->_containersList.numIDs > 0)
0058ca3b          {
0058ca70              do
0058ca70              {
0058ca43                  uint32_t eax_1;
0058ca43                  uint32_t edx_1;
0058ca43                  eax_1 = IDList::GetByNum(&objInventory->_containersList, i);
0058ca50                  uint32_t var_14_2 = eax_1;
0058ca51                  CObjectMaint::RemoveObjectToBeDestroyed(CWeenieObject::objMaint, edx_1);
0058ca57                  class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(eax_1);
0058ca57                  
0058ca61                  if (eax_2 != 0)
0058ca65                      ACCWeenieObject::RemoveContentsFromDestructionQueue(eax_2);
0058ca65                  
0058ca6d                  i += 1;
0058ca70              } while (i < objInventory->_containersList.numIDs);
0058ca3b          }
0058ca31      }
0058ca31      
0058ca73      class CObjectInventory* objInventory_1 = this->objInventory;
0058ca73      
0058ca7f      if ((objInventory_1 != 0 && objInventory_1 != 0xfffffff4))
0058ca7f      {
0058ca84          int32_t i_1 = 0;
0058ca84          
0058ca88          if (objInventory_1->_itemsList.numIDs > 0)
0058ca88          {
0058caaa              do
0058caaa              {
0058ca93                  uint32_t eax_5;
0058ca93                  uint32_t edx_2;
0058ca93                  eax_5 = IDList::GetByNum(&objInventory_1->_itemsList, i_1);
0058ca9e                  uint32_t var_10_3 = eax_5;
0058ca9f                  CObjectMaint::RemoveObjectToBeDestroyed(CWeenieObject::objMaint, edx_2);
0058caa7                  i_1 += 1;
0058caaa              } while (i_1 < objInventory_1->_itemsList.numIDs);
0058ca88          }
0058ca7f      }
0058ca20  }


0058cab0  void ACCWeenieObject::RecordResponse(uint32_t arg1)

0058cab0  {
0058caba      if (arg1 == ACCWeenieObject::prevRequestObjectID)
0058caba      {
0058cabe          ACCWeenieObject::prevRequestObjectID = 0;
0058cac3          ACCWeenieObject::prevRequest = IR_NONE;
0058cac8          (*(uint32_t*)ACCWeenieObject::prevRequestTime) = 0f;
0058cacd          *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = 0f;
0058caba      }
0058cab0  }

0058cad3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058cae0  int32_t __thiscall ACCWeenieObject::InqCollisionProfile(class ACCWeenieObject const* this, class ObjCollisionProfile* arg2)

0058cae0  {
0058caee      arg2->wcid.id = this->pwd._wcid.id;
0058caf6      arg2->itemType = this->vtable->InqType();
0058cb03      ObjCollisionProfile::SetCreature(arg2, this->vtable->IsCreature());
0058cb12      ObjCollisionProfile::SetPlayer(arg2, this->vtable->IsPlayer());
0058cb26      ObjCollisionProfile::SetAttackable(arg2, ((this->pwd._bitfield >> 4) & 1));
0058cb3a      ObjCollisionProfile::SetDoor(arg2, ((this->pwd._bitfield >> 0xc) & 1));
0058cb46      return 1;
0058cae0  }

0058cb49                             90 90 90 90 90 90 90                                                           .......

0058cb50  int32_t __thiscall ACCWeenieObject::UpdateHouseRestrictionTS(class ACCWeenieObject* this, uint8_t arg2)

0058cb50  {
0058cb53      int32_t result = ACCWeenieObject::SetupStamper(this);
0058cb53      
0058cb5a      if (result != 0)
0058cb71          return WTimeStamper::UpdateHouseRestrictionTS(this->_stamper, arg2);
0058cb71      
0058cb5d      return result;
0058cb50  }

0058cb74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058cb80  int32_t __thiscall ACCWeenieObject::MagicPackIsOwned(class ACCWeenieObject* this, class IDClass<_tagDataID,32,0> arg2)

0058cb80  {
0058cb80      class CObjectInventory* objInventory = this->objInventory;
0058cb80      
0058cb98      if ((objInventory != 0 && (objInventory != 0xffffffdc && objInventory->_containersList.numIDs > 0)))
0058cb98      {
0058cb9e          int32_t i = 0;
0058cb9e          
0058cbc3          do
0058cbc3          {
0058cba9              class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(IDList::GetByNum(&objInventory->_containersList, i));
0058cba9              
0058cbbb              if ((eax_2 != 0 && eax_2->pwd._wcid.id == arg2))
0058cbd5                  return 1;
0058cbd5              
0058cbc0              i += 1;
0058cbc3          } while (i < objInventory->_containersList.numIDs);
0058cb98      }
0058cb98      
0058cbca      return 0;
0058cb80  }

0058cbd8                                                                          90 90 90 90 90 90 90 90                          ........

0058cbe0  int32_t __fastcall ACCWeenieObject::IsStorage(class ACCWeenieObject const* this)

0058cbe0  {
0058cbe0      class ACCWeenieObject* __return = this;
0058cbe7      uint32_t id = this->pwd._wcid.id;
0058cbe7      
0058cbef      if (id == INVALID_DID.id)
0058cc1b          return 0;
0058cc1b      
0058cbfd      DBObj::GetDIDByEnum(&__return, 0x10000001, 0xc);
0058cc0b      class ACCWeenieObject* eax_1;
0058cc0b      eax_1 = __return == id;
0058cc13      return ((uint32_t)eax_1);
0058cbe0  }

0058cc1c                                                                                      90 90 90 90                              ....

0058cc20  void* __thiscall ACCWeenieObject::`scalar deleting destructor'(class ACCWeenieObject* this, uint32_t arg2)

0058cc20  {
0058cc23      ACCWeenieObject::~ACCWeenieObject(this);
0058cc23      
0058cc2d      if ((arg2 & 1) != 0)
0058cc30          operator delete(this);
0058cc30      
0058cc3b      return this;
0058cc20  }

0058cc3e                                                                                            90 90                                ..

0058cc40  void __thiscall ACCWeenieObject::ServerSaysSetStackSize(class ACCWeenieObject* this, int32_t arg2, uint32_t arg3)

0058cc40  {
0058cc4d      this->pwd._stackSize = arg2;
0058cc53      GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058cc64      this->pwd._value = arg3;
0058cc64      
0058cc6a      if (this->waiting != 0)
0058cc6a      {
0058cc6f          bool cond:1_1 = this->valid == 0;
0058cc71          this->waiting = 0;
0058cc71          
0058cc78          if (!(cond:1_1))
0058cc80              GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058cc6a      }
0058cc6a      
0058cc91      if (this->id == ACCWeenieObject::prevRequestObjectID)
0058cc91      {
0058cc93          ACCWeenieObject::prevRequestObjectID = 0;
0058cc9d          ACCWeenieObject::prevRequest = IR_NONE;
0058cca7          (*(uint32_t*)ACCWeenieObject::prevRequestTime) = 0f;
0058ccb1          *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = 0f;
0058cc91      }
0058cc91      
0058ccc0      if (this->markedForDeletion != 0)
0058ccc2          this->movedWhileMarkedForDeletion = 1;
0058ccc2      
0058cccf      GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058cc40  }

0058ccdb                                                                                   90 90 90 90 90                             .....

0058cce0  void __thiscall ACCWeenieObject::AddContent(class ACCWeenieObject* this, class ACCWeenieObject* arg2, int32_t arg3)

0058cce0  {
0058cce0      class ACCWeenieObject* eax_3 = arg2;
0058cce0      
0058cce9      if (eax_3 != 0)
0058cce9      {
0058cceb          class CObjectInventory* objInventory = this->objInventory;
0058cceb          
0058ccf0          if (objInventory != 0)
0058ccf0          {
0058ccfe              uint32_t id = eax_3->id;
0058cd01              class IDList* esi_1 = &objInventory->_itemsList;
0058cd01              
0058cd18              if ((((eax_3->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || eax_3->pwd._itemsCapacity != 0) || eax_3->pwd._containersCapacity != 0))
0058cd1a                  esi_1 = &objInventory->_containersList;
0058cd1a              
0058cd27              if (IDList::IsInList(esi_1, id) == 0)
0058cd27              {
0058cd29                  int32_t numIDs = esi_1->numIDs;
0058cd2c                  int32_t ecx_1 = arg3;
0058cd30                  arg2 = numIDs;
0058cd36                  class ACCWeenieObject** eax_1 = &arg2;
0058cd36                  
0058cd3a                  if (numIDs >= ecx_1)
0058cd3c                      eax_1 = &arg3;
0058cd3c                  
0058cd48                  IDList::AddAtNum(esi_1, id, *(uint32_t*)eax_1, 1);
0058cd53                  GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058cd27              }
0058ccf0          }
0058cce9      }
0058cce0  }

0058cd61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058cd70  void __thiscall ACCWeenieObject::RemoveContent(class ACCWeenieObject* this, class ACCWeenieObject* arg2)

0058cd70  {
0058cd79      if (arg2 != 0)
0058cd79      {
0058cd7b          class CObjectInventory* objInventory = this->objInventory;
0058cd7b          
0058cd80          if (objInventory != 0)
0058cd80          {
0058cd91              class IDList* ecx = &objInventory->_itemsList;
0058cd91              
0058cda8              if ((((arg2->pwd._bitfield & "activation type (%s) with '%s' b…") != 0 || arg2->pwd._itemsCapacity != 0) || arg2->pwd._containersCapacity != 0))
0058cdaa                  ecx = &objInventory->_containersList;
0058cdaa              
0058cdae              IDList::RemoveByID(ecx, arg2->id);
0058cdb9              GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058cd80          }
0058cd79      }
0058cd70  }

0058cdc7                       90 90 90 90 90 90 90 90 90                                                         .........

0058cdd0  uint32_t __thiscall ACCWeenieObject::GetLocationOnObject(class ACCWeenieObject* this, uint32_t arg2)

0058cdd0  {
0058cdd0      class CObjectInventory* objInventory = this->objInventory;
0058cdd0      
0058cdd5      if (objInventory == 0)
0058cdd7          return objInventory;
0058cdd7      
0058cde0      for (class PackableLLNode<InventoryPlacement>* i = objInventory->_invPlacement.head; i != 0; i = i->next)
0058cde0      {
0058cdee          if (i->data.iid_ == arg2)
0058cdfa              return i->data.loc_;
0058cde0      }
0058cde0      
0058cdf7      return 0;
0058cdd0  }

0058cdfd                                                                                         90 90 90                               ...

0058ce00  uint32_t __thiscall ACCWeenieObject::GetObjectAtLocation(class ACCWeenieObject* this, uint32_t arg2, uint32_t arg3)

0058ce00  {
0058ce00      class CObjectInventory* objInventory = this->objInventory;
0058ce00      
0058ce05      if (objInventory == 0)
0058ce07          return objInventory;
0058ce07      
0058ce11      for (class PackableLLNode<InventoryPlacement>* i = objInventory->_invPlacement.head; i != 0; i = i->next)
0058ce11      {
0058ce31          if ((((i->data.priority_ & arg3) != 0 || arg3 == 0) && (arg2 & i->data.loc_) != 0))
0058ce3e              return i->data.iid_;
0058ce11      }
0058ce11      
0058ce3a      return 0;
0058ce00  }

0058ce1d                                                                                         8d 49 00                               .I.
0058ce41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058ce50  int32_t __thiscall ACCWeenieObject::IsOwnedByTrader(class ACCWeenieObject* this, uint32_t arg2)

0058ce50  {
0058ce59      if (arg2 != 0)
0058ce59      {
0058ce7d          if (((this->id == arg2 || this->pwd._containerID == arg2) || this->pwd._wielderID == arg2))
0058ce6c              return 1;
0058ce6c          
0058ce80          class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg2);
0058ce80          
0058ce8a          if (eax_2 != 0)
0058ce8a          {
0058ce92              uint32_t eax_3 = ACCWeenieObject::GetLocationOnObject(eax_2, this->id);
0058ce97              int32_t eax_4 = -(eax_3);
0058ce9e              return -((eax_4 - eax_4));
0058ce8a          }
0058ce59      }
0058ce59      
0058ce5e      return 0;
0058ce50  }

0058cea1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058ceb0  int32_t __thiscall ACCWeenieObject::IsOwnedByObject(class ACCWeenieObject* this, uint32_t arg2)

0058ceb0  {
0058ceb9      if (arg2 == 0)
0058cebc          return arg2;
0058cebc      
0058cedb      if ((this->id == arg2 || (this->pwd._containerID == arg2 || this->pwd._wielderID == arg2)))
0058ceca          return 1;
0058ceca      
0058cedf      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
0058cedf      
0058ceeb      if (eax_1 == 0)
0058ceef          return eax_1;
0058ceef      
0058cef2      uint32_t _containerID = this->pwd._containerID;
0058cef2      
0058cefa      if ((_containerID != 0 && ACCWeenieObject::GetPlaceInContainersList(eax_1, _containerID) != 0xffffffff))
0058cf10          return 1;
0058cf10      
0058cf19      uint32_t eax_5 = ACCWeenieObject::GetLocationOnObject(eax_1, this->id);
0058cf1e      int32_t eax_6 = -(eax_5);
0058cf26      return -((eax_6 - eax_6));
0058ceb0  }

0058cf29                             90 90 90 90 90 90 90                                                           .......

0058cf30  void* __thiscall IconData::`scalar deleting destructor'(class IconData* this, uint32_t arg2)

0058cf30  {
0058cf33      class Graphic* m_pIcon = this->m_pIcon;
0058cf3b      this->vtable = 0x7e3f24;
0058cf3b      
0058cf41      if (m_pIcon != 0)
0058cf43          m_pIcon->vtable->__vecDelDtor(1);
0058cf43      
0058cf49      class Graphic* m_pDragIcon = this->m_pDragIcon;
0058cf4e      this->m_pIcon = nullptr;
0058cf4e      
0058cf51      if (m_pDragIcon != 0)
0058cf53          m_pDragIcon->vtable->__vecDelDtor(1);
0058cf53      
0058cf5e      this->m_pDragIcon = nullptr;
0058cf61      this->vtable = 0x7c62f8;
0058cf67      this->hash_next = nullptr;
0058cf6a      this->id = 0;
0058cf6a      
0058cf6d      if ((arg2 & 1) != 0)
0058cf70          operator delete(this);
0058cf70      
0058cf7c      return this;
0058cf30  }

0058cf7f                                                                                               90                                 .

0058cf80  int32_t __fastcall ACCWeenieObject::GetHousePayment(class ACCWeenieObject const* this)

0058cf80  {
0058cf80      uint32_t _stackSize = this->pwd._stackSize;
0058cf80      
0058cf88      if (_stackSize != 0)
0058cf8f          return _stackSize;
0058cf8f      
0058cf8a      return 1;
0058cf80  }


0058cf90  uint32_t __thiscall PackableList<InventoryPlacement>::InsertPos(class PackableList<InventoryPlacement>* this, uint32_t const arg2, class InventoryPlacement const* arg3)

0058cf90  {
0058cf9b      uint32_t const i_1 = arg2;
0058cf9d      void* eax = operator new(0x18);
0058cf9d      
0058cfa7      if (eax == 0)
0058cfd5          eax = nullptr;
0058cfa7      else
0058cfa7      {
0058cfad          *(uint32_t*)eax = 0x7aba64;
0058cfb6          *(uint32_t*)((char*)eax + 4) = arg3->iid_;
0058cfbc          *(uint32_t*)((char*)eax + 8) = arg3->loc_;
0058cfc2          *(uint32_t*)((char*)eax + 0xc) = arg3->priority_;
0058cfc5          *(uint32_t*)((char*)eax + 0x10) = 0;
0058cfcc          *(uint32_t*)((char*)eax + 0x14) = 0;
0058cfa7      }
0058cfa7      
0058cfd7      class PackableLLNode<InventoryPlacement>* ecx_2 = this->head;
0058cfd7      
0058cfdc      if (ecx_2 == 0)
0058cfdc      {
0058cfde          this->head = eax;
0058cfe1          this->tail = eax;
0058cfe4          this->curNum += 1;
0058cfec          return 0;
0058cfdc      }
0058cfdc      
0058cff1      if (arg2 != 0)
0058cff1      {
0058cffb          uint32_t const i;
0058cffb          
0058cffb          do
0058cffb          {
0058cff5              if (ecx_2 == 0)
0058cff5                  goto label_58d001;
0058cff5              
0058cff7              i = i_1;
0058cff7              i_1 -= 1;
0058cff8              ecx_2 = ecx_2->next;
0058cffb          } while (i != 1);
0058cff1      }
0058cff1      
0058cfff      if (ecx_2 == 0)
0058cfff      {
0058d001      label_58d001:
0058d001          class PackableLLNode<InventoryPlacement>* tail = this->tail;
0058d004          tail->next = eax;
0058d007          *(uint32_t*)((char*)eax + 0x14) = tail;
0058d00a          this->tail = eax;
0058d00d          uint32_t curNum = this->curNum;
0058d013          this->curNum = (curNum + 1);
0058d019          return curNum;
0058cfff      }
0058cfff      
0058d01c      class PackableLLNode<InventoryPlacement>* prev = ecx_2->prev;
0058d01c      
0058d021      if (prev == 0)
0058d028          this->head = eax;
0058d021      else
0058d023          prev->next = eax;
0058d023      
0058d02e      *(uint32_t*)((char*)eax + 0x14) = ecx_2->prev;
0058d031      *(uint32_t*)((char*)eax + 0x10) = ecx_2;
0058d034      ecx_2->prev = eax;
0058d037      this->curNum += 1;
0058d03f      return arg2;
0058cf90  }

0058d042        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0058d050  int32_t ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(int32_t arg1)

0058d050  {
0058d05d      if (ClientUISystem::GetUISystem() != 0)
0058d05d      {
0058d06a          void* var_94;
0058d06a          void var_90;
0058d06a          
0058d06a          if (ACCWeenieObject::prevRequest != IR_NONE)
0058d06a          {
0058d075              if (arg1 == 0)
0058d075              {
0058d07c                  StringInfo::StringInfo(&var_90);
0058d08a                  PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You can only move or use one ite…");
0058d09a                  StringInfo::SetLiteralValue(&var_90, &var_94, 1);
0058d0a3                  int32_t* esi_2 = ((char*)var_94 - 0x14);
0058d0a3                  
0058d0b6                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0058d0be                      **(uint32_t**)esi_2(1);
0058d0be                  
0058d0c7                  ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
0058d0d3                  StringInfo::~StringInfo(&var_90);
0058d075              }
0058d075              
0058d0e1              return 0;
0058d06a          }
0058d06a          
0058d0e9          if (ACCWeenieObject::attackInProgress == 0)
0058d152              return 1;
0058d152          
0058d0f4          if (arg1 == 0)
0058d0f4          {
0058d0fa              StringInfo::StringInfo(&var_90);
0058d108              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_94, u"You cannot move or use an item w…");
0058d118              StringInfo::SetLiteralValue(&var_90, &var_94, 1);
0058d121              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_94);
0058d12d              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_90);
0058d139              StringInfo::~StringInfo(&var_90);
0058d0f4          }
0058d05d      }
0058d05d      
0058d146      return 0;
0058d050  }

0058d153                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058d160  int32_t __fastcall ACCWeenieObject::IsOwnedByPlayer(class ACCWeenieObject* this)

0058d160  {
0058d171      return ACCWeenieObject::IsOwnedByObject(this, SmartBox::smartbox->player_id);
0058d160  }

0058d172                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0058d180  void __thiscall IconData::RenderIcons(class IconData* this, class ACCWeenieObject* arg2)

0058d180  {
0058d189      class ACCWeenieObject* edi = arg2;
0058d19b      this->m_idIcon.id = *(uint32_t*)edi->vtable->InqIconID(&arg2);
0058d1a4      this->m_idCustomOverlay.id = edi->pwd._iconOverlayID.id;
0058d1ad      this->m_idCustomUnderlay.id = edi->pwd._iconUnderlayID.id;
0058d1b7      this->m_itemType = edi->vtable->InqType();
0058d1c0      this->m_effects = edi->pwd._effects;
0058d1c3      class Graphic* m_pIcon = this->m_pIcon;
0058d1c3      
0058d1ca      if (m_pIcon != 0)
0058d1cc          m_pIcon->vtable->__vecDelDtor(1);
0058d1cc      
0058d1d2      class Graphic* m_pDragIcon = this->m_pDragIcon;
0058d1d7      this->m_pIcon = nullptr;
0058d1d7      
0058d1da      if (m_pDragIcon != 0)
0058d1dc          m_pDragIcon->vtable->__vecDelDtor(1);
0058d1dc      
0058d1e2      this->m_pDragIcon = nullptr;
0058d1e2      
0058d1ee      if (edi->vtable->IsThePlayer() != 0)
0058d1ee      {
0058d206          this->m_idIcon.id = DBObj::GetDIDByEnum(&arg2, 0x10000004, 7)->id;
0058d209          this->m_itemType = TYPE_CONTAINER;
0058d1ee      }
0058d1ee      
0058d214      int32_t eax_9;
0058d214      uint32_t ecx_5;
0058d214      int32_t edx_4;
0058d214      eax_9 = LowestSetBit(this->m_itemType);
0058d21c      int32_t eax_10 = (eax_9 + 1);
0058d21c      
0058d21d      if (eax_9 == 0xffffffff)
0058d21f          eax_10 = 0x21;
0058d21f      
0058d224      int32_t var_4c_2 = 0xc;
0058d226      int32_t var_50 = 0x10000004;
0058d22b      int32_t var_54_2 = eax_10;
0058d22c      class DBObj* eax_11 = DBObj::GetByEnum(eax_10, edx_4, ecx_5);
0058d239      int32_t eax_13;
0058d239      uint32_t ecx_6;
0058d239      int32_t edx_5;
0058d239      eax_13 = LowestSetBit(this->m_effects);
0058d23e      int32_t var_5c = 0xc;
0058d241      int32_t var_60 = 0x10000005;
0058d246      int32_t var_64 = (eax_13 + 1);
0058d247      class DBObj* eax_15;
0058d247      uint32_t ecx_7;
0058d247      int32_t edx_6;
0058d247      eax_15 = DBObj::GetByEnum((eax_13 + 1), edx_5, ecx_6);
0058d251      arg2 = eax_15;
0058d251      
0058d255      if (eax_15 == 0)
0058d255      {
0058d257          int32_t var_4c_3 = 0xc;
0058d259          int32_t var_50_1 = 0x10000005;
0058d25e          int32_t var_54_3 = 0x21;
0058d268          arg2 = DBObj::GetByEnum(eax_15, edx_6, ecx_7);
0058d255      }
0058d255      
0058d27c      void var_28;
0058d27c      class DBObj* eax_19 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_28, this->m_idCustomUnderlay.id, 0xc));
0058d2a0      void var_20;
0058d2a0      class DBObj* ebp = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_20, this->m_idIcon.id, 0xc));
0058d2ac      class DBObj* var_2c = ebp;
0058d2c3      void var_18;
0058d2c3      class DBObj* edi_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_18, this->m_idCustomOverlay.id, 0xc));
0058d2c8      class DBObj* var_38 = edi_1;
0058d2cc      int32_t* eax_26 = RenderDevice::render_device->vtable->CreateLocalSurface();
0058d2cc      
0058d2d3      if (eax_26 != 0)
0058d2d3      {
0058d2f4          if (*(uint32_t*)(*(uint32_t*)eax_26 + 0x58)(0x20, 0x20, RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1) != 0)
0058d2f4          {
0058d2fc              if (ebp != 0)
0058d312                  SurfaceWindow::Blit(&eax_26[0x2b], ((char*)ebp + 0xac), Blit_Normal, 1f);
0058d312              
0058d31d              if (var_38 != 0)
0058d332                  SurfaceWindow::Blit(&eax_26[0x2b], ((char*)var_38 + 0xac), Blit_4Alpha, 1f);
0058d332              
0058d337              class ACCWeenieObject* eax_32 = arg2;
0058d337              
0058d33d              if (eax_32 != 0)
0058d33d              {
0058d350                  int32_t var_10 = 0x3f800000;
0058d358                  int32_t var_c_1 = 0x3f800000;
0058d360                  int32_t var_8_1 = 0x3f800000;
0058d368                  int32_t var_4_1 = 0x3f800000;
0058d370                  SurfaceWindow::ReplaceColor(&eax_26[0x2b], &var_10, &eax_32->pwd._iconOverlayID);
0058d33d              }
0058d33d              
0058d377              void* eax_34 = operator new(0xc);
0058d381              class Graphic* eax_35;
0058d381              
0058d381              if (eax_34 == 0)
0058d38d                  eax_35 = nullptr;
0058d381              else
0058d386                  eax_35 = Graphic::Graphic(eax_34, eax_26);
0058d386              
0058d38f              this->m_pDragIcon = eax_35;
0058d39a              class RenderSurface* eax_36 = RenderDevice::render_device->vtable->CreateLocalSurface();
0058d39a              
0058d3a1              if (eax_36 != 0)
0058d3a1              {
0058d3c2                  if (eax_36->vtable->Create(0x20, 0x20, RenderDevice::GetUISurfaceFormat(RenderDevice::render_device), 1) != 0)
0058d3c2                  {
0058d3ca                      if (eax_11 != 0)
0058d3df                          SurfaceWindow::Blit(&eax_36->window, ((char*)eax_11 + 0xac), Blit_Normal, 1f);
0058d3df                      
0058d3ea                      if (eax_19 != 0)
0058d3ff                          SurfaceWindow::Blit(&eax_36->window, ((char*)eax_19 + 0xac), Blit_3Alpha, 1f);
0058d3ff                      
0058d418                      SurfaceWindow::Blit(&eax_36->window, &eax_26[0x2b], Blit_3Alpha, 1f);
0058d41f                      void* eax_44 = operator new(0xc);
0058d429                      class Graphic* eax_45;
0058d429                      
0058d429                      if (eax_44 == 0)
0058d435                          eax_45 = nullptr;
0058d429                      else
0058d42e                          eax_45 = Graphic::Graphic(eax_44, eax_36);
0058d42e                      
0058d437                      this->m_pIcon = eax_45;
0058d3c2                  }
0058d3c2                  
0058d43a                  eax_36->vtable->Release();
0058d441                  ebp = var_2c;
0058d3a1              }
0058d2f4          }
0058d2f4          
0058d449          *(uint32_t*)(*(uint32_t*)eax_26 + 0x14)();
0058d44c          edi_1 = var_38;
0058d2d3      }
0058d2d3      
0058d452      if (edi_1 != 0)
0058d454          edi_1->vtable->Release();
0058d454      
0058d45d      if (ebp != 0)
0058d45f          ebp->vtable->Release();
0058d45f      
0058d471      if (eax_19 != 0)
0058d473          eax_19->vtable->Release(var_38, eax_19, eax_11, var_2c);
0058d473      
0058d478      class ACCWeenieObject* ecx_30 = arg2;
0058d478      
0058d47e      if (ecx_30 != 0)
0058d480          ecx_30->vtable->IsThePlayer(var_38, eax_19, eax_11, var_2c);
0058d480      
0058d48b      if (eax_11 != 0)
0058d48d          eax_11->vtable->Release(var_38, eax_19, eax_11, var_2c);
0058d180  }

0058d498                                                                          90 90 90 90 90 90 90 90                          ........

0058d4a0  int32_t __thiscall PackableList<InventoryPlacement>::Remove(class PackableList<InventoryPlacement>* this, class InventoryPlacement* arg2)

0058d4a0  {
0058d4a3      class PackableLLNode<InventoryPlacement>* head = this->head;
0058d4a3      
0058d4a8      if (head == 0)
0058d4ab          return head;
0058d4ab      
0058d4b7      uint32_t iid_ = arg2->iid_;
0058d4b7      
0058d4c4      if ((head->data.iid_ == iid_ && head->data.loc_ == arg2->loc_))
0058d4c4      {
0058d4c9          arg2->iid_ = head->data.iid_;
0058d4cf          arg2->loc_ = head->data.loc_;
0058d4d5          arg2->priority_ = head->data.priority_;
0058d4db          class PackableLLNode<InventoryPlacement>* next = this->head->next;
0058d4e0          this->head = next;
0058d4e0          
0058d4e3          if (next == 0)
0058d4ee              this->tail = nullptr;
0058d4e3          else
0058d4e5              next->prev = nullptr;
0058d4e5          
0058d4f7          if (head != 0)
0058d4f7          {
0058d4fa              head->data.vtable = 0x79285c;
0058d500              operator delete(head);
0058d4f7          }
0058d4f7          
0058d50d          this->curNum -= 1;
0058d517          return 1;
0058d4c4      }
0058d4c4      
0058d51f      while (head->next != 0)
0058d51f      {
0058d521          class PackableLLNode<InventoryPlacement>* next_2 = head->next;
0058d521          
0058d52f          if ((next_2->data.iid_ == iid_ && next_2->data.loc_ == arg2->loc_))
0058d52f          {
0058d542              class PackableLLNode<InventoryPlacement>* next_3 = head->next;
0058d548              arg2->iid_ = next_3->data.iid_;
0058d54e              arg2->loc_ = next_3->data.loc_;
0058d554              arg2->priority_ = next_3->data.priority_;
0058d557              class PackableLLNode<InventoryPlacement>* next_4 = head->next;
0058d55a              class PackableLLNode<InventoryPlacement>* next_1 = next_4->next;
0058d55f              head->next = next_1;
0058d55f              
0058d562              if (next_1 == 0)
0058d569                  this->tail = head;
0058d562              else
0058d564                  next_1->prev = head;
0058d564              
0058d56d              next_4->data.vtable = 0x79285c;
0058d573              operator delete(next_4);
0058d580              this->curNum -= 1;
0058d58a              return 1;
0058d52f          }
0058d52f          
0058d531          head = next_2;
0058d51f      }
0058d51f      
0058d53f      return 0;
0058d4a0  }

0058d58d                                         90 90 90                                                               ...

0058d590  void __thiscall ACCWeenieObject::UIAttemptWield(class ACCWeenieObject* this, uint32_t arg2)

0058d590  {
0058d59f      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
0058d59f      {
0058d5a1          uint32_t _stackSize = this->pwd._stackSize;
0058d5a1          
0058d5ae          if ((_stackSize != 0 && _stackSize > 1))
0058d5ae          {
0058d5b0              uint32_t GenItemHolder::splitSize_1 = GenItemHolder::splitSize;
0058d5b0              
0058d5bb              if (GenItemHolder::splitSize_1 != GenItemHolder::maxSplitSize)
0058d5bb              {
0058d5c7                  CM_Inventory::Event_StackableSplitToWield(this->id, arg2, GenItemHolder::splitSize_1);
0058d5d0                  return;
0058d5bb              }
0058d5ae          }
0058d5ae          
0058d5dc          CM_Inventory::Event_GetAndWieldItem(this->id, arg2);
0058d5e4          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0058d5ea          int32_t eax_3 = *(int32_t*)((char*)Timer::cur_time + 4);
0058d5f2          ACCWeenieObject::prevRequestObjectID = this->id;
0058d5f8          ACCWeenieObject::prevRequest = IR_WIELD;
0058d602          (*(uint32_t*)ACCWeenieObject::prevRequestTime) = Timer::cur_time_1;
0058d608          *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = eax_3;
0058d59f      }
0058d590  }

0058d611                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0058d620  void __thiscall ACCWeenieObject::UIAttemptGive(class ACCWeenieObject* this, uint32_t arg2, uint32_t arg3)

0058d620  {
0058d62f      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
0058d62f      {
0058d63f          CM_Inventory::Event_GiveObjectRequest(arg2, this->id, arg3);
0058d647          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0058d64d          int32_t edx_2 = *(int32_t*)((char*)Timer::cur_time + 4);
0058d656          ACCWeenieObject::prevRequestObjectID = this->id;
0058d65b          ACCWeenieObject::prevRequest = IR_GIVE;
0058d665          (*(uint32_t*)ACCWeenieObject::prevRequestTime) = Timer::cur_time_1;
0058d66b          *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = edx_2;
0058d62f      }
0058d620  }

0058d675                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0058d680  void __thiscall ACCWeenieObject::UIAttemptPutInContainer(class ACCWeenieObject* this, uint32_t arg2, int32_t arg3)

0058d680  {
0058d68f      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
0058d68f      {
0058d69f          CM_Inventory::Event_PutItemInContainer(this->id, arg2, arg3);
0058d6a4          enum PositionState current_state = this->current_state;
0058d6a4          
0058d6ac          if (current_state == IN_3D_VIEW)
0058d6ac          {
0058d6ca              int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0058d6d0              int32_t eax_3 = *(int32_t*)((char*)Timer::cur_time + 4);
0058d6d5              ACCWeenieObject::prevRequestObjectID = this->id;
0058d6db              ACCWeenieObject::prevRequest = IR_PICK_UP;
0058d6e5              (*(uint32_t*)ACCWeenieObject::prevRequestTime) = Timer::cur_time_1;
0058d6eb              *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = eax_3;
0058d6ac          }
0058d6ac          else if ((current_state > IN_3D_VIEW && current_state <= IN_CONTAINER))
0058d6bb              ACCWeenieObject::RecordRequest(this->id, IR_PUT_IN_CONTAINER);
0058d68f      }
0058d680  }

0058d6f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058d700  void __fastcall ACCWeenieObject::UIAttemptPutIn3D(class ACCWeenieObject* this)

0058d700  {
0058d70f      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
0058d70f      {
0058d715          CM_Inventory::Event_DropItem(this->id);
0058d71a          enum PositionState current_state = this->current_state;
0058d71a          
0058d722          if (current_state == IN_3D_VIEW)
0058d722          {
0058d73e              int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0058d743              int32_t ecx_1 = *(int32_t*)((char*)Timer::cur_time + 4);
0058d749              ACCWeenieObject::prevRequestObjectID = this->id;
0058d74f              ACCWeenieObject::prevRequest = IR_MOVE;
0058d759              (*(uint32_t*)ACCWeenieObject::prevRequestTime) = Timer::cur_time_1;
0058d75e              *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = ecx_1;
0058d722          }
0058d722          else if ((current_state > IN_3D_VIEW && current_state <= IN_CONTAINER))
0058d731              ACCWeenieObject::RecordRequest(this->id, IR_DROP);
0058d70f      }
0058d700  }

0058d766                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0058d770  void __thiscall ACCWeenieObject::UIAttemptMerge(class ACCWeenieObject* this, uint32_t arg2, int32_t arg3)

0058d770  {
0058d77f      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
0058d77f      {
0058d78f          CM_Inventory::Event_StackableMerge(this->id, arg2, arg3);
0058d797          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0058d79d          int32_t edx_2 = *(int32_t*)((char*)Timer::cur_time + 4);
0058d7a6          ACCWeenieObject::prevRequestObjectID = this->id;
0058d7ab          ACCWeenieObject::prevRequest = IR_MERGE;
0058d7b5          (*(uint32_t*)ACCWeenieObject::prevRequestTime) = Timer::cur_time_1;
0058d7bb          *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = edx_2;
0058d77f      }
0058d770  }

0058d7c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0058d7d0  void __thiscall ACCWeenieObject::UIAttemptSplitToContainer(class ACCWeenieObject* this, uint32_t arg2, int32_t arg3, int32_t arg4)

0058d7d0  {
0058d7df      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
0058d7df      {
0058d7f5          CM_Inventory::Event_StackableSplitToContainer(this->id, arg2, arg3, arg4);
0058d7fd          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0058d803          int32_t edx_2 = *(int32_t*)((char*)Timer::cur_time + 4);
0058d809          ACCWeenieObject::prevRequestObjectID = this->id;
0058d80e          ACCWeenieObject::prevRequest = IR_SPLIT;
0058d818          (*(uint32_t*)ACCWeenieObject::prevRequestTime) = Timer::cur_time_1;
0058d81e          *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = edx_2;
0058d824          uint32_t id = this->pwd._wcid.id;
0058d82d          ACCWeenieObject::splitStackSize = arg4;
0058d833          ACCWeenieObject::splitClassID.id = id;
0058d838          (*(uint32_t*)ACCWeenieObject::splitTime) = Timer::cur_time_1;
0058d83e          *(int32_t*)((char*)ACCWeenieObject::splitTime + 4) = edx_2;
0058d7df      }
0058d7d0  }

0058d849                             90 90 90 90 90 90 90                                                           .......

0058d850  void __thiscall ACCWeenieObject::UIAttemptSplitTo3D(class ACCWeenieObject* this, int32_t arg2)

0058d850  {
0058d85f      if (ACCWeenieObject::IsPlayerReadyToMakeInventoryRequest(0) != 0)
0058d85f      {
0058d86b          CM_Inventory::Event_StackableSplitTo3D(this->id, arg2);
0058d873          int32_t Timer::cur_time_1 = (*(uint32_t*)Timer::cur_time);
0058d879          int32_t eax_2 = *(int32_t*)((char*)Timer::cur_time + 4);
0058d87e          ACCWeenieObject::prevRequestObjectID = this->id;
0058d884          ACCWeenieObject::prevRequest = IR_SPLIT;
0058d88e          (*(uint32_t*)ACCWeenieObject::prevRequestTime) = Timer::cur_time_1;
0058d894          *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = eax_2;
0058d899          uint32_t id = this->pwd._wcid.id;
0058d8a2          ACCWeenieObject::splitStackSize = arg2;
0058d8a8          ACCWeenieObject::splitClassID.id = id;
0058d8ae          (*(uint32_t*)ACCWeenieObject::splitTime) = Timer::cur_time_1;
0058d8b4          *(int32_t*)((char*)ACCWeenieObject::splitTime + 4) = eax_2;
0058d85f      }
0058d850  }

0058d8be                                                                                            90 90                                ..

0058d8c0  void __thiscall ACCWeenieObject::SetPlayerWieldLocation(class ACCWeenieObject* this, uint32_t const arg2)

0058d8c0  {
0058d8d2      class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(SmartBox::smartbox->player_id);
0058d8d2      
0058d8dc      if (eax_1 != 0)
0058d8dc      {
0058d8e2          class CObjectInventory* objInventory = eax_1->objInventory;
0058d8e2          
0058d8f3          if ((objInventory != 0 && objInventory != 0xffffffc4))
0058d8f3          {
0058d8f6              uint32_t id_1 = this->id;
0058d8fc              uint32_t eax_2 = ACCWeenieObject::GetLocationOnObject(eax_1, id_1);
0058d903              int32_t var_10;
0058d903              
0058d903              if (eax_2 != 0)
0058d903              {
0058d90f                  uint32_t _priority = this->pwd._priority;
0058d916                  var_10 = 0x7aba64;
0058d91e                  uint32_t id_2 = id_1;
0058d922                  uint32_t var_8_1 = eax_2;
0058d926                  PackableList<InventoryPlacement>::Remove(&objInventory->_invPlacement, &var_10);
0058d92b                  class CPhysicsObj* _phys_obj = this->_phys_obj;
0058d92b                  
0058d933                  if (_phys_obj != 0)
0058d937                      CPhysicsObj::SetTranslucencyHierarchical(_phys_obj, 0f);
0058d903              }
0058d903              
0058d943              if (arg2 != 0)
0058d943              {
0058d948                  uint32_t _priority_1 = this->pwd._priority;
0058d94e                  uint32_t const var_8_2 = arg2;
0058d957                  uint32_t id = this->id;
0058d95f                  var_10 = 0x7aba64;
0058d967                  uint32_t _priority_2 = _priority_1;
0058d96b                  PackableList<InventoryPlacement>::InsertPos(&objInventory->_invPlacement, 0, &var_10);
0058d943              }
0058d8f3          }
0058d8dc      }
0058d8c0  }

0058d978                                                                          90 90 90 90 90 90 90 90                          ........

0058d980  void __thiscall IconData::IconData(class IconData* this, class ACCWeenieObject* arg2, int32_t arg3)

0058d980  {
0058d989      this->hash_next = nullptr;
0058d98c      this->id = arg3;
0058d98f      this->vtable = 0x7e3f24;
0058d99b      this->m_idIcon.id = INVALID_DID.id;
0058d9a4      this->m_idCustomOverlay.id = INVALID_DID.id;
0058d9ad      this->m_itemType = TYPE_UNDEF;
0058d9b0      this->m_effects = 0;
0058d9b3      this->m_pIcon = nullptr;
0058d9b6      this->m_pDragIcon = nullptr;
0058d9c0      this->m_idCustomUnderlay.id = INVALID_DID.id;
0058d9c3      IconData::RenderIcons(this, arg2);
0058d980  }

0058d9ce                                            90 90                                                                ..

0058d9d0  int32_t __thiscall IconData::UpdateIcons(class IconData* this, class ACCWeenieObject* arg2)

0058d9d0  {
0058d9d1      class ACCWeenieObject* esi = arg2;
0058d9e4      int32_t eax_2 = *(uint32_t*)esi->vtable->InqIconID(&arg2);
0058d9e4      
0058d9ff      if ((this->m_idIcon.id == eax_2 && (this->m_idCustomOverlay.id == esi->pwd._iconOverlayID.id && this->m_idCustomUnderlay.id == esi->pwd._iconUnderlayID.id)))
0058d9ff      {
0058da05          enum ITEM_TYPE eax_5 = esi->vtable->InqType();
0058da05          
0058da16          if ((this->m_itemType == eax_5 && this->m_effects == esi->pwd._effects))
0058da2e              return 0;
0058d9ff      }
0058d9ff      
0058da1b      IconData::RenderIcons(this, esi);
0058da27      return 1;
0058d9d0  }

0058da31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0058da40  int32_t __thiscall ACCWeenieObject::CanMoveInto(class ACCWeenieObject* this, class CWeenieObject* arg2)

0058da40  {
0058da45      class CWeenieObject* edi = arg2;
0058da45      
0058da4d      if (edi != 0)
0058da4d      {
0058da53          uint32_t _house_owner_iid = this->pwd._house_owner_iid;
0058da5b          uint32_t id = edi->id;
0058da5b          
0058da66          if ((_house_owner_iid == 0 || _house_owner_iid == id))
0058db5f              return 1;
0058db5f          
0058da6c          class RestrictionDB* _db = this->pwd._db;
0058da6c          
0058da7a          if (_db == 0)
0058db5f              return 1;
0058db5f          
0058da89          if (RestrictionDB::IsAllowedIn(_db, id, *(int32_t*)((char*)edi + 0x128)) != 0)
0058db5f              return 1;
0058db5f          
0058da8f          enum PScriptType _pscript = this->pwd._pscript;
0058da8f          
0058da97          if (_pscript != PS_Invalid)
0058da97          {
0058dab4              int32_t* __return;
0058dab4              int32_t* var_c;
0058dab4              InterfacePtr<CPlayerModule>::InterfacePtr<CPlayerModule>(&var_c, GetClassObject(&__return, &CPlayerModule_ClassType));
0058dab9              int32_t* __return_1 = __return;
0058dab9              
0058dabf              if (__return_1 != 0)
0058dac3                  *(uint32_t*)(*(uint32_t*)__return_1 + 0x14)();
0058dac3              
0058dac7              int32_t* ebx_1 = var_c;
0058dac7              
0058dacd              if (ebx_1 != 0)
0058dacd              {
0058dad9                  if (PlayerModule::DisableHouseRestrictionEffects(&ebx_1[1]) == 0)
0058dad9                  {
0058dae4                      arg2 = 0x3f000000;
0058dae4                      
0058daf1                      if (edi->vtable->GetGlobalVelocity(&var_c) != 0)
0058daf1                      {
0058dafc                          long double x87_r7_2 = (AC1Legacy::Vector3::magnitude(&var_c) * ((long double)0.100000001f));
0058db02                          arg2 = ((float)x87_r7_2);
0058db06                          long double temp1_1 = ((long double)0f);
0058db06                          (x87_r7_2 - temp1_1);
0058db0c                          int32_t eax_6;
0058db0c                          eax_6 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0058db0e                          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0058db0e                          
0058db11                          if (p_1)
0058db11                          {
0058db1d                              long double x87_r7_3 = ((long double)arg2);
0058db21                              long double temp2_1 = ((long double)1f);
0058db21                              (x87_r7_3 - temp2_1);
0058db27                              eax_6 = ((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0058db27                              
0058db2c                              if ((*(uint8_t*)((char*)eax_6)[1] & 0x41) == 0)
0058db2e                                  arg2 = 0x3f800000;
0058db11                          }
0058db11                          else
0058db13                              arg2 = nullptr;
0058daf1                      }
0058daf1                      
0058db3a                      edi->vtable->PlayScript(_pscript, arg2);
0058dad9                  }
0058dad9                  
0058db47                  *(uint32_t*)(*(uint32_t*)ebx_1 + 0x14)();
0058dacd              }
0058da97          }
0058da4d      }
0058da4d      
0058db52      return 0;
0058da40  }

0058db62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0058db70  int32_t ACCWeenieObject::HasCorpseBeenOpened(uint32_t const arg1)

0058db70  {
0058db86      int32_t* eax_3 = ACCWeenieObject::m_openedCorpses.m_intrusiveTable.m_buckets[(COMBINE(0, arg1) % ACCWeenieObject::m_openedCorpses.m_intrusiveTable.m_numBuckets)];
0058db88      bool cond:0 = eax_3 != 0;
0058db88      
0058db8a      if (eax_3 != 0)
0058db8a      {
0058db92          while (*(uint32_t*)eax_3 != arg1)
0058db92          {
0058db94              eax_3 = eax_3[1];
0058db94              
0058db99              if (eax_3 == 0)
0058db99                  break;
0058db92          }
0058db92          
0058db9b          cond:0 = eax_3 != 0;
0058db8a      }
0058db8a      
0058db9d      uint32_t const ecx;
0058db9d      ecx = cond:0;
0058dba3      return ((uint32_t)ecx);
0058db70  }

0058dba4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058dbb0  void __thiscall ACCWeenieObject::ServerSaysMoveItem(class ACCWeenieObject* this, uint32_t arg2, int32_t arg3, uint32_t arg4, uint32_t arg5, int32_t arg6)

0058dbb0  {
0058dbb8      uint32_t _containerID = this->pwd._containerID;
0058dbc0      uint32_t _wielderID = this->pwd._wielderID;
0058dbc6      uint32_t _location = this->pwd._location;
0058dbc6      
0058dbd5      if (_containerID != 0)
0058dbd5      {
0058dbd8          class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(_containerID);
0058dbd8          
0058dbe2          if (eax != 0)
0058dbe7              ACCWeenieObject::RemoveContent(eax, this);
0058dbd5      }
0058dbd5      
0058dbf2      this->pwd._containerID = arg2;
0058dbf2      
0058dbf8      if (arg2 != 0)
0058dbf8      {
0058dbfb          class ACCWeenieObject* eax_1 = ClientObjMaintSystem::GetWeenieObject(arg2);
0058dbfb          
0058dc05          if (eax_1 != 0)
0058dc0f              ACCWeenieObject::AddContent(eax_1, this, arg3);
0058dbf8      }
0058dbf8      
0058dc19      uint32_t player_id = SmartBox::smartbox->player_id;
0058dc19      
0058dc27      if (arg4 == player_id)
0058dc27      {
0058dc2c          ACCWeenieObject::SetPlayerWieldLocation(this, arg5);
0058dc3d          this->pwd._wielderID = SmartBox::smartbox->player_id;
0058dc27      }
0058dc27      else if (_wielderID == player_id)
0058dc49      {
0058dc4f          ACCWeenieObject::SetPlayerWieldLocation(this, 0);
0058dc54          this->pwd._wielderID = 0;
0058dc49      }
0058dc49      
0058dc63      this->pwd._location = arg5;
0058dc63      
0058dc69      if (this->beingRemoved != 0)
0058dc6b          this->current_state = BEING_REMOVED;
0058dc69      else if (this->pwd._containerID == 0)
0058dc7c      {
0058dc8b          enum PositionState eax_5;
0058dc8b          eax_5 = arg5 != 0;
0058dc8e          this->current_state = eax_5;
0058dc7c      }
0058dc7c      else
0058dc7e          this->current_state = IN_CONTAINER;
0058dc7e      
0058dc96      if (this->waiting != 0)
0058dc96      {
0058dc9b          bool cond:4_1 = this->valid == 0;
0058dc9d          this->waiting = 0;
0058dc9d          
0058dca4          if (!(cond:4_1))
0058dcac              GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058dc96      }
0058dc96      
0058dcbd      if (this->id == ACCWeenieObject::prevRequestObjectID)
0058dcbd      {
0058dcc1          ACCWeenieObject::prevRequestObjectID = 0;
0058dcc6          ACCWeenieObject::prevRequest = IR_NONE;
0058dccb          (*(uint32_t*)ACCWeenieObject::prevRequestTime) = 0f;
0058dcd0          *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = 0f;
0058dcbd      }
0058dcbd      
0058dcda      if (this->markedForDeletion != 0)
0058dcdc          this->movedWhileMarkedForDeletion = 1;
0058dcdc      
0058dce9      if (arg6 != 0)
0058dd06          GenItemHolder::ServerSaysMoveItem_s(this->id, _containerID, _wielderID, _location, arg2, arg3, arg4, arg5);
0058dbb0  }

0058dd18                                                                          90 90 90 90 90 90 90 90                          ........

0058dd20  void __fastcall ACCWeenieObject::Remove(class ACCWeenieObject* this)

0058dd20  {
0058dd2b      uint32_t _containerID = this->pwd._containerID;
0058dd31      uint32_t _location = this->pwd._location;
0058dd3e      this->preRemoveWielderID = this->pwd._wielderID;
0058dd47      this->preRemoveContainerID = _containerID;
0058dd4d      this->preRemoveLocation = _location;
0058dd53      this->preRemoveContainerPlace = 0;
0058dd59      this->beingRemoved = 1;
0058dd60      ACCWeenieObject::ServerSaysMoveItem(this, 0, 0, 0, 0, 1);
0058dd65      uint32_t ACCWeenieObject::selectedID_1 = ACCWeenieObject::selectedID;
0058dd65      
0058dd73      if ((this->id == ACCWeenieObject::selectedID_1 && ACCWeenieObject::selectedID_1 != 0))
0058dd73      {
0058dd76          class ACCWeenieObject* eax = ClientObjMaintSystem::GetWeenieObject(ACCWeenieObject::selectedID_1);
0058dd76          
0058dd80          if (eax != 0)
0058dd82              eax->selected = 0;
0058dd82          
0058dd85          ACCWeenieObject::selectedID = 0;
0058dd8b          ACCWeenieObject::prevSelectedID = ACCWeenieObject::selectedID_1;
0058dd91          ACCWeenieObject::prevSelectedValidID = ACCWeenieObject::selectedID_1;
0058dd97          CM_UI::SendNotice_SelectionChanged();
0058dda3          GenItemHolder::SetSelectedItem_s(ACCWeenieObject::selectedID_1, ACCWeenieObject::selectedID);
0058dda3          
0058ddb2          if (APIManager::APIIsReady() != 0)
0058ddb2          {
0058ddb4              struct IACPlugin* eax_3 = APIManager::GetACPlugin();
0058ddbf              eax_3->vtable->OnSelectedTargetChange(eax_3, ACCWeenieObject::selectedID_1, ACCWeenieObject::selectedID);
0058ddb2          }
0058dd73      }
0058dd73      
0058ddc8      this->beingRemoved = 0;
0058dd20  }

0058ddce                                            90 90                                                                ..

0058ddd0  void __fastcall ACCWeenieObject::IconDataChanged(class ACCWeenieObject* this)

0058ddd0  {
0058ddd3      uint32_t id = this->id;
0058ddf0      class IconData* hash_next = ACCWeenieObject::iconDataTable.buckets[(((id >> ((int8_t)ACCWeenieObject::iconDataTable.key_shift)) ^ id) & ACCWeenieObject::iconDataTable.table_mask)];
0058ddf0      
0058ddf5      if (hash_next != 0)
0058ddf5      {
0058ddfa          while (id != hash_next->id)
0058ddfa          {
0058ddfc              hash_next = hash_next->hash_next;
0058ddfc              
0058de01              if (hash_next == 0)
0058de04                  return;
0058ddfa          }
0058ddfa          
0058de07          if ((hash_next != 0 && IconData::UpdateIcons(hash_next, this) != 0))
0058de19              GenItemHolder::ItemAttributesChanged_s(this->id, 2);
0058ddf5      }
0058ddd0  }

0058de23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0058de30  class IconData* __fastcall ACCWeenieObject::GetIconData(class ACCWeenieObject* this)

0058de30  {
0058de33      uint32_t id = this->id;
0058de50      void* const result = ACCWeenieObject::iconDataTable.buckets[(((id >> ((int8_t)ACCWeenieObject::iconDataTable.key_shift)) ^ id) & ACCWeenieObject::iconDataTable.table_mask)];
0058de50      
0058de55      if (result == 0)
0058de55      {
0058de63      label_58de63:
0058de63          result = nullptr;
0058de55      }
0058de55      else
0058de55      {
0058de5a          while (id != *(uint32_t*)((char*)result + 8))
0058de5a          {
0058de5c              result = *(uint32_t*)((char*)result + 4);
0058de5c              
0058de61              if (result == 0)
0058de61                  goto label_58de63;
0058de5a          }
0058de55      }
0058de55      
0058de67      if (result == 0)
0058de67      {
0058de6b          void* eax_4 = operator new(0x28);
0058de6b          
0058de75          if (eax_4 == 0)
0058de85              result = nullptr;
0058de75          else
0058de7e              result = IconData::IconData(eax_4, this, this->id);
0058de7e          
0058de87          int32_t esi_1 = *(uint32_t*)((char*)result + 8);
0058de9c          int32_t edx_4 = (((esi_1 >> ((int8_t)ACCWeenieObject::iconDataTable.key_shift)) ^ esi_1) & ACCWeenieObject::iconDataTable.table_mask);
0058dea7          *(uint32_t*)((char*)result + 4) = ACCWeenieObject::iconDataTable.buckets[edx_4];
0058deaa          ACCWeenieObject::iconDataTable.buckets[edx_4] = result;
0058de67      }
0058de67      
0058deb4      return result;
0058de30  }

0058deb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0058dec0  void __thiscall ACCWeenieObject::SetType(class ACCWeenieObject* this, enum ITEM_TYPE const arg2)

0058dec0  {
0058dec4      this->pwd._type = arg2;
0058dec4      
0058decf      if (this->valid != 0)
0058ded1          ACCWeenieObject::IconDataChanged(this);
0058dec0  }

0058ded9                                                                             90 90 90 90 90 90 90                           .......

0058dee0  void __thiscall ACCWeenieObject::SetUseability(class ACCWeenieObject* this, enum ITEM_USEABLE const arg2)

0058dee0  {
0058dee4      this->pwd._useability = arg2;
0058dee4      
0058deef      if (this->valid != 0)
0058def1          ACCWeenieObject::IconDataChanged(this);
0058dee0  }

0058def9                                                                             90 90 90 90 90 90 90                           .......

0058df00  void __thiscall ACCWeenieObject::SetEffects(class ACCWeenieObject* this, uint32_t const arg2)

0058df00  {
0058df04      this->pwd._effects = arg2;
0058df04      
0058df0f      if (this->valid != 0)
0058df11          ACCWeenieObject::IconDataChanged(this);
0058df00  }

0058df19                                                                             90 90 90 90 90 90 90                           .......

0058df20  void __thiscall ACCWeenieObject::OnStatUpdated(class ACCWeenieObject* this, uint32_t arg2, int32_t arg3)

0058df20  {
0058df2d      if ((arg2 - 1) <= 0x97)
0058df3a          switch (arg2)
0058df3a          {
0058df66              case 1:
0058df66              {
0058df66                  ACCWeenieObject::SetType(this, arg3);
0058df66                  break;
0058df66              }
0058dfdd              case 4:
0058dfdd              {
0058dfdd                  this->pwd._priority = arg3;
0058dfdd                  break;
0058dfdd              }
0058e024              case 6:
0058e024              {
0058e024                  this->pwd._itemsCapacity = arg3;
0058e024                  break;
0058e024              }
0058e016              case 7:
0058e016              {
0058e016                  this->pwd._containersCapacity = arg3;
0058e016                  break;
0058e016              }
0058dfcf              case 9:
0058dfcf              {
0058dfcf                  this->pwd._valid_locations = arg3;
0058dfcf                  break;
0058dfcf              }
0058dfef              case 0xa:
0058dfef              {
0058dfef                  if ((ACCWeenieObject::prevRequestObjectID != this->id && ACCWeenieObject::IsOwnedByPlayer(this) == 0))
0058e008                      this->pwd._location = arg3;
0058dfef                  break;
0058dfef              }
0058df55              case 0xb:
0058df55              {
0058df55                  this->pwd._maxStackSize = arg3;
0058df55                  break;
0058df55              }
0058df48              case 0xc:
0058df48              {
0058df48                  ACCWeenieObject::SetStackSize(this, arg3);
0058df48                  break;
0058df48              }
0058df76              case 0x10:
0058df76              {
0058df76                  ACCWeenieObject::SetUseability(this, arg3);
0058df76                  break;
0058df76              }
0058df86              case 0x12:
0058df86              {
0058df86                  ACCWeenieObject::SetEffects(this, arg3);
0058df86                  break;
0058df86              }
0058e032              case 0x13:
0058e032              {
0058e032                  this->pwd._value = arg3;
0058e032                  break;
0058e032              }
0058df93              case 0x32:
0058df93              {
0058df93                  this->pwd._ammoType = arg3;
0058df93                  break;
0058df93              }
0058dfa1              case 0x33:
0058dfa1              {
0058dfa1                  this->pwd._combatUse = arg3;
0058dfa1                  break;
0058dfa1              }
0058dfc2              case 0x5b:
0058dfc2              {
0058dfc2                  ACCWeenieObject::SetMaxStructure(this, arg3);
0058dfc2                  break;
0058dfc2              }
0058dfb2              case 0x5c:
0058dfb2              {
0058dfb2                  ACCWeenieObject::SetStructure(this, arg3);
0058dfb2                  break;
0058dfb2              }
0058e05c              case 0x5f:
0058e05c              {
0058e05c                  this->pwd._blipColor = arg3;
0058e05c                  break;
0058e05c              }
0058e06a              case 0x85:
0058e06a              {
0058e06a                  this->pwd._radar_enum = arg3;
0058e06a                  break;
0058e06a              }
0058e07f              case 0x86:
0058e07f              {
0058e07f                  PublicWeenieDesc::SetPlayerKillerStatus(&this->pwd, arg3);
0058e07f                  break;
0058e07f              }
0058e040              case 0x97:
0058e040              {
0058e040                  this->pwd._hook_type = arg3;
0058e040                  break;
0058e040              }
0058e04e              case 0x98:
0058e04e              {
0058e04e                  this->pwd._hook_item_types = arg3;
0058e04e                  break;
0058e04e              }
0058df3a          }
0058df20  }

0058e088  uint32_t jump_table_58e088[0x15] = 
0058e088  {
0058e088      [0x00] =  0x0058df5f
0058e08c      [0x01] =  0x0058dfd9
0058e090      [0x02] =  0x0058e020
0058e094      [0x03] =  0x0058e012
0058e098      [0x04] =  0x0058dfcb
0058e09c      [0x05] =  0x0058dfe7
0058e0a0      [0x06] =  0x0058df51
0058e0a4      [0x07] =  0x0058df41
0058e0a8      [0x08] =  0x0058df6f
0058e0ac      [0x09] =  0x0058df7f
0058e0b0      [0x0a] =  0x0058e02e
0058e0b4      [0x0b] =  0x0058df8f
0058e0b8      [0x0c] =  0x0058df9d
0058e0bc      [0x0d] =  0x0058dfbb
0058e0c0      [0x0e] =  0x0058dfab
0058e0c4      [0x0f] =  0x0058e058
0058e0c8      [0x10] =  0x0058e066
0058e0cc      [0x11] =  0x0058e074
0058e0d0      [0x12] =  0x0058e03c
0058e0d4      [0x13] =  0x0058e04a
0058e0d8      [0x14] =  0x0058e084
0058e0dc  }
0058e0dc  uint8_t lookup_table_58e0dc[0x98] = 
0058e0dc  {
0058e0dc      [0x00] =  0x00
0058e0dd      [0x01] =  0x14
0058e0de      [0x02] =  0x14
0058e0df      [0x03] =  0x01
0058e0e0      [0x04] =  0x14
0058e0e1      [0x05] =  0x02
0058e0e2      [0x06] =  0x03
0058e0e3      [0x07] =  0x14
0058e0e4      [0x08] =  0x04
0058e0e5      [0x09] =  0x05
0058e0e6      [0x0a] =  0x06
0058e0e7      [0x0b] =  0x07
0058e0e8      [0x0c] =  0x14
0058e0e9      [0x0d] =  0x14
0058e0ea      [0x0e] =  0x14
0058e0eb      [0x0f] =  0x08
0058e0ec      [0x10] =  0x14
0058e0ed      [0x11] =  0x09
0058e0ee      [0x12] =  0x0a
0058e0ef      [0x13] =  0x14
0058e0f0      [0x14] =  0x14
0058e0f1      [0x15] =  0x14
0058e0f2      [0x16] =  0x14
0058e0f3      [0x17] =  0x14
0058e0f4      [0x18] =  0x14
0058e0f5      [0x19] =  0x14
0058e0f6      [0x1a] =  0x14
0058e0f7      [0x1b] =  0x14
0058e0f8      [0x1c] =  0x14
0058e0f9      [0x1d] =  0x14
0058e0fa      [0x1e] =  0x14
0058e0fb      [0x1f] =  0x14
0058e0fc      [0x20] =  0x14
0058e0fd      [0x21] =  0x14
0058e0fe      [0x22] =  0x14
0058e0ff      [0x23] =  0x14
0058e100      [0x24] =  0x14
0058e101      [0x25] =  0x14
0058e102      [0x26] =  0x14
0058e103      [0x27] =  0x14
0058e104      [0x28] =  0x14
0058e105      [0x29] =  0x14
0058e106      [0x2a] =  0x14
0058e107      [0x2b] =  0x14
0058e108      [0x2c] =  0x14
0058e109      [0x2d] =  0x14
0058e10a      [0x2e] =  0x14
0058e10b      [0x2f] =  0x14
0058e10c      [0x30] =  0x14
0058e10d      [0x31] =  0x0b
0058e10e      [0x32] =  0x0c
0058e10f      [0x33] =  0x14
0058e110      [0x34] =  0x14
0058e111      [0x35] =  0x14
0058e112      [0x36] =  0x14
0058e113      [0x37] =  0x14
0058e114      [0x38] =  0x14
0058e115      [0x39] =  0x14
0058e116      [0x3a] =  0x14
0058e117      [0x3b] =  0x14
0058e118      [0x3c] =  0x14
0058e119      [0x3d] =  0x14
0058e11a      [0x3e] =  0x14
0058e11b      [0x3f] =  0x14
0058e11c      [0x40] =  0x14
0058e11d      [0x41] =  0x14
0058e11e      [0x42] =  0x14
0058e11f      [0x43] =  0x14
0058e120      [0x44] =  0x14
0058e121      [0x45] =  0x14
0058e122      [0x46] =  0x14
0058e123      [0x47] =  0x14
0058e124      [0x48] =  0x14
0058e125      [0x49] =  0x14
0058e126      [0x4a] =  0x14
0058e127      [0x4b] =  0x14
0058e128      [0x4c] =  0x14
0058e129      [0x4d] =  0x14
0058e12a      [0x4e] =  0x14
0058e12b      [0x4f] =  0x14
0058e12c      [0x50] =  0x14
0058e12d      [0x51] =  0x14
0058e12e      [0x52] =  0x14
0058e12f      [0x53] =  0x14
0058e130      [0x54] =  0x14
0058e131      [0x55] =  0x14
0058e132      [0x56] =  0x14
0058e133      [0x57] =  0x14
0058e134      [0x58] =  0x14
0058e135      [0x59] =  0x14
0058e136      [0x5a] =  0x0d
0058e137      [0x5b] =  0x0e
0058e138      [0x5c] =  0x14
0058e139      [0x5d] =  0x14
0058e13a      [0x5e] =  0x0f
0058e13b      [0x5f] =  0x14
0058e13c      [0x60] =  0x14
0058e13d      [0x61] =  0x14
0058e13e      [0x62] =  0x14
0058e13f      [0x63] =  0x14
0058e140      [0x64] =  0x14
0058e141      [0x65] =  0x14
0058e142      [0x66] =  0x14
0058e143      [0x67] =  0x14
0058e144      [0x68] =  0x14
0058e145      [0x69] =  0x14
0058e146      [0x6a] =  0x14
0058e147      [0x6b] =  0x14
0058e148      [0x6c] =  0x14
0058e149      [0x6d] =  0x14
0058e14a      [0x6e] =  0x14
0058e14b      [0x6f] =  0x14
0058e14c      [0x70] =  0x14
0058e14d      [0x71] =  0x14
0058e14e      [0x72] =  0x14
0058e14f      [0x73] =  0x14
0058e150      [0x74] =  0x14
0058e151      [0x75] =  0x14
0058e152      [0x76] =  0x14
0058e153      [0x77] =  0x14
0058e154      [0x78] =  0x14
0058e155      [0x79] =  0x14
0058e156      [0x7a] =  0x14
0058e157      [0x7b] =  0x14
0058e158      [0x7c] =  0x14
0058e159      [0x7d] =  0x14
0058e15a      [0x7e] =  0x14
0058e15b      [0x7f] =  0x14
0058e15c      [0x80] =  0x14
0058e15d      [0x81] =  0x14
0058e15e      [0x82] =  0x14
0058e15f      [0x83] =  0x14
0058e160      [0x84] =  0x10
0058e161      [0x85] =  0x11
0058e162      [0x86] =  0x14
0058e163      [0x87] =  0x14
0058e164      [0x88] =  0x14
0058e165      [0x89] =  0x14
0058e166      [0x8a] =  0x14
0058e167      [0x8b] =  0x14
0058e168      [0x8c] =  0x14
0058e169      [0x8d] =  0x14
0058e16a      [0x8e] =  0x14
0058e16b      [0x8f] =  0x14
0058e16c      [0x90] =  0x14
0058e16d      [0x91] =  0x14
0058e16e      [0x92] =  0x14
0058e16f      [0x93] =  0x14
0058e170      [0x94] =  0x14
0058e171      [0x95] =  0x14
0058e172      [0x96] =  0x12
0058e173      [0x97] =  0x13
0058e174  }

0058e174                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0058e180  void __thiscall ACCWeenieObject::OnStatUpdated(class ACCWeenieObject* this, uint32_t arg2, class IDClass<_tagDataID,32,0> arg3)

0058e180  {
0058e18a      if ((arg2 - 8) <= 0x2c)
0058e193          switch (arg2)
0058e193          {
0058e19e              case 8:
0058e19e              {
0058e19e                  this->pwd._iconID.id = arg3;
0058e1bf              label_58e1bf:
0058e1bf                  
0058e1c1                  if (this->valid != 0)
0058e1c3                      ACCWeenieObject::IconDataChanged(this);
0058e19e                  break;
0058e19e              }
0058e1cf              case 0x2c:
0058e1cf              {
0058e1cf                  this->pwd._pscript = arg3;
0058e1cf                  break;
0058e1cf              }
0058e1aa              case 0x32:
0058e1aa              {
0058e1aa                  this->pwd._iconOverlayID.id = arg3;
0058e1b0                  goto label_58e1bf;
0058e1aa              }
0058e1b6              case 0x34:
0058e1b6              {
0058e1b6                  this->pwd._iconUnderlayID.id = arg3;
0058e1b6                  goto label_58e1bf;
0058e1b6              }
0058e193          }
0058e180  }

0058e1d8  uint32_t jump_table_58e1d8[0x5] = 
0058e1d8  {
0058e1d8      [0x0] =  0x0058e19a
0058e1dc      [0x1] =  0x0058e1cb
0058e1e0      [0x2] =  0x0058e1a6
0058e1e4      [0x3] =  0x0058e1b2
0058e1e8      [0x4] =  0x0058e1d5
0058e1ec  }
0058e1ec  uint8_t lookup_table_58e1ec[0x2d] = 
0058e1ec  {
0058e1ec      [0x00] =  0x00
0058e1ed      [0x01] =  0x04
0058e1ee      [0x02] =  0x04
0058e1ef      [0x03] =  0x04
0058e1f0      [0x04] =  0x04
0058e1f1      [0x05] =  0x04
0058e1f2      [0x06] =  0x04
0058e1f3      [0x07] =  0x04
0058e1f4      [0x08] =  0x04
0058e1f5      [0x09] =  0x04
0058e1f6      [0x0a] =  0x04
0058e1f7      [0x0b] =  0x04
0058e1f8      [0x0c] =  0x04
0058e1f9      [0x0d] =  0x04
0058e1fa      [0x0e] =  0x04
0058e1fb      [0x0f] =  0x04
0058e1fc      [0x10] =  0x04
0058e1fd      [0x11] =  0x04
0058e1fe      [0x12] =  0x04
0058e1ff      [0x13] =  0x04
0058e200      [0x14] =  0x04
0058e201      [0x15] =  0x04
0058e202      [0x16] =  0x04
0058e203      [0x17] =  0x04
0058e204      [0x18] =  0x04
0058e205      [0x19] =  0x04
0058e206      [0x1a] =  0x04
0058e207      [0x1b] =  0x04
0058e208      [0x1c] =  0x04
0058e209      [0x1d] =  0x04
0058e20a      [0x1e] =  0x04
0058e20b      [0x1f] =  0x04
0058e20c      [0x20] =  0x04
0058e20d      [0x21] =  0x04
0058e20e      [0x22] =  0x04
0058e20f      [0x23] =  0x04
0058e210      [0x24] =  0x01
0058e211      [0x25] =  0x04
0058e212      [0x26] =  0x04
0058e213      [0x27] =  0x04
0058e214      [0x28] =  0x04
0058e215      [0x29] =  0x04
0058e216      [0x2a] =  0x02
0058e217      [0x2b] =  0x04
0058e218      [0x2c] =  0x03
0058e219  }

0058e219                                                                             90 90 90 90 90 90 90                           .......

0058e220  void __thiscall ACCWeenieObject::OnStatUpdated(class ACCWeenieObject* this, uint32_t arg2, uint32_t arg3)

0058e220  {
0058e22d      if ((arg2 - 2) <= 0x2a)
0058e23a          switch (arg2)
0058e23a          {
0058e24a              case 2:
0058e24a              {
0058e24a                  if ((ACCWeenieObject::prevRequestObjectID != this->id && ACCWeenieObject::IsOwnedByObject(this, SmartBox::smartbox->player_id) == 0))
0058e24a                  {
0058e26c                      uint32_t eax_4 = GetPlayerID();
0058e26c                      
0058e27b                      if ((arg3 != eax_4 || eax_4 == 0))
0058e27b                      {
0058e291                          this->pwd._containerID = arg3;
0058e298                          return;
0058e27b                      }
0058e27b                      
0058e288                      ACCWeenieObject::ServerSaysMoveItem(this, arg3, 0, 0, 0, 1);
0058e24a                  }
0058e24a                  break;
0058e24a              }
0058e2a3              case 3:
0058e2a3              {
0058e2a3                  if ((ACCWeenieObject::prevRequestObjectID != this->id && ACCWeenieObject::IsOwnedByObject(this, SmartBox::smartbox->player_id) == 0))
0058e2c1                      this->pwd._wielderID = arg3;
0058e2a3                  break;
0058e2a3              }
0058e2dd              case 0x1a:
0058e2dd              {
0058e2dd                  this->pwd._monarch = arg3;
0058e2dd                  break;
0058e2dd              }
0058e2cf              case 0x20:
0058e2cf              {
0058e2cf                  this->pwd._house_owner_iid = arg3;
0058e2cf                  break;
0058e2cf              }
0058e2eb              case 0x2c:
0058e2eb              {
0058e2eb                  this->pwd._pet_owner = arg3;
0058e2eb                  break;
0058e2eb              }
0058e23a          }
0058e220  }

0058e2f5                                                                 8d 49 00                                               .I.
0058e2f8  uint32_t jump_table_58e2f8[0x6] = 
0058e2f8  {
0058e2f8      [0x0] =  0x0058e241
0058e2fc      [0x1] =  0x0058e29b
0058e300      [0x2] =  0x0058e2d9
0058e304      [0x3] =  0x0058e2cb
0058e308      [0x4] =  0x0058e2e7
0058e30c      [0x5] =  0x0058e2f1
0058e310  }
0058e310  uint8_t lookup_table_58e310[0x2b] = 
0058e310  {
0058e310      [0x00] =  0x00
0058e311      [0x01] =  0x01
0058e312      [0x02] =  0x05
0058e313      [0x03] =  0x05
0058e314      [0x04] =  0x05
0058e315      [0x05] =  0x05
0058e316      [0x06] =  0x05
0058e317      [0x07] =  0x05
0058e318      [0x08] =  0x05
0058e319      [0x09] =  0x05
0058e31a      [0x0a] =  0x05
0058e31b      [0x0b] =  0x05
0058e31c      [0x0c] =  0x05
0058e31d      [0x0d] =  0x05
0058e31e      [0x0e] =  0x05
0058e31f      [0x0f] =  0x05
0058e320      [0x10] =  0x05
0058e321      [0x11] =  0x05
0058e322      [0x12] =  0x05
0058e323      [0x13] =  0x05
0058e324      [0x14] =  0x05
0058e325      [0x15] =  0x05
0058e326      [0x16] =  0x05
0058e327      [0x17] =  0x05
0058e328      [0x18] =  0x02
0058e329      [0x19] =  0x05
0058e32a      [0x1a] =  0x05
0058e32b      [0x1b] =  0x05
0058e32c      [0x1c] =  0x05
0058e32d      [0x1d] =  0x05
0058e32e      [0x1e] =  0x03
0058e32f      [0x1f] =  0x05
0058e330      [0x20] =  0x05
0058e331      [0x21] =  0x05
0058e332      [0x22] =  0x05
0058e333      [0x23] =  0x05
0058e334      [0x24] =  0x05
0058e335      [0x25] =  0x05
0058e336      [0x26] =  0x05
0058e337      [0x27] =  0x05
0058e338      [0x28] =  0x05
0058e339      [0x29] =  0x05
0058e33a      [0x2a] =  0x04
0058e33b  }

0058e33b                                                                                   90 90 90 90 90                             .....

0058e340  void __fastcall ACCWeenieObject::DeclareValid(class ACCWeenieObject* this)

0058e340  {
0058e340      class ACCWeenieObject* this_1 = this;
0058e344      class CObjectInventory* objInventory = this->objInventory;
0058e34a      this->valid = 1;
0058e34a      
0058e351      if (objInventory != 0)
0058e351      {
0058e356          int32_t i = 0;
0058e356          
0058e35a          if (objInventory->_itemsList.numIDs > 0)
0058e35a          {
0058e381              do
0058e381              {
0058e367                  uint32_t eax;
0058e367                  uint32_t edx_1;
0058e367                  eax = IDList::GetByNum(&this->objInventory->_itemsList, i);
0058e372                  uint32_t var_10_2 = eax;
0058e373                  CObjectMaint::RemoveObjectToBeDestroyed(CWeenieObject::objMaint, edx_1);
0058e37e                  i += 1;
0058e381              } while (i < this->objInventory->_itemsList.numIDs);
0058e35a          }
0058e35a          
0058e389          int32_t i_1 = 0;
0058e389          
0058e38d          if (this->objInventory->_containersList.numIDs > 0)
0058e38d          {
0058e3b1              do
0058e3b1              {
0058e397                  uint32_t eax_3;
0058e397                  uint32_t edx_2;
0058e397                  eax_3 = IDList::GetByNum(&this->objInventory->_containersList, i_1);
0058e3a2                  uint32_t var_10_4 = eax_3;
0058e3a3                  CObjectMaint::RemoveObjectToBeDestroyed(CWeenieObject::objMaint, edx_2);
0058e3ae                  i_1 += 1;
0058e3b1              } while (i_1 < this->objInventory->_containersList.numIDs);
0058e38d          }
0058e351      }
0058e351      
0058e3b3      uint32_t id = this->id;
0058e3b3      
0058e3d5      for (class IconData* hash_next = ACCWeenieObject::iconDataTable.buckets[(((id >> ((int8_t)ACCWeenieObject::iconDataTable.key_shift)) ^ id) & ACCWeenieObject::iconDataTable.table_mask)]; hash_next != 0; hash_next = hash_next->hash_next)
0058e3d5      {
0058e3da          if (id == hash_next->id)
0058e3da          {
0058e3e7              if (hash_next != 0)
0058e3e7              {
0058e3f5                  int32_t eax_6 = *(uint32_t*)this->vtable->InqIconID(&this_1);
0058e410                  enum ITEM_TYPE eax_9;
0058e410                  
0058e410                  if (((hash_next->m_idIcon.id == eax_6 && hash_next->m_idCustomOverlay.id == this->pwd._iconOverlayID.id) && hash_next->m_idCustomUnderlay.id == this->pwd._iconUnderlayID.id))
0058e416                      eax_9 = this->vtable->InqType();
0058e416                  
0058e427                  if (((((hash_next->m_idIcon.id != eax_6 || hash_next->m_idCustomOverlay.id != this->pwd._iconOverlayID.id) || hash_next->m_idCustomUnderlay.id != this->pwd._iconUnderlayID.id) || hash_next->m_itemType != eax_9) || hash_next->m_effects != this->pwd._effects))
0058e427                  {
0058e42c                      IconData::RenderIcons(hash_next, this);
0058e437                      GenItemHolder::ItemAttributesChanged_s(this->id, 2);
0058e427                  }
0058e3e7              }
0058e3e7              
0058e3e7              break;
0058e3da          }
0058e3d5      }
0058e3d5      
0058e445      GenItemHolder::ItemAttributesChanged_s(this->id, 1);
0058e44a      uint32_t eax_11 = ACCWeenieObject::splitClassID.id;
0058e44f      uint32_t id_1 = INVALID_DID.id;
0058e44f      
0058e45a      if (eax_11 != id_1)
0058e45a      {
0058e462          if (eax_11 == this->pwd._wcid.id)
0058e462          {
0058e464              eax_11 = this->pwd._stackSize;
0058e464              
0058e46c              if (eax_11 == 0)
0058e46e                  eax_11 = 1;
0058e46e              
0058e479              if (ACCWeenieObject::splitStackSize == eax_11)
0058e479              {
0058e481                  ACCWeenieObject::SetSelectedObject(this->id, 0);
0058e490                  ACCWeenieObject::splitClassID.id = INVALID_DID.id;
0058e498                  return;
0058e479              }
0058e462          }
0058e462          
0058e49f          long double x87_r7_2 = (((long double)Timer::cur_time) - ((long double)ACCWeenieObject::splitTime));
0058e4a5          long double temp0_1 = ((long double)10.0);
0058e4a5          (x87_r7_2 - temp0_1);
0058e4ab          eax_11 = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0058e4ab          
0058e4b0          if ((*(uint8_t*)((char*)eax_11)[1] & 0x41) == 0)
0058e4b2              ACCWeenieObject::splitClassID.id = id_1;
0058e45a      }
0058e340  }

0058e4bc                                                                                      90 90 90 90                              ....

0058e4c0  void __fastcall ACCWeenieObject::ServerSaysRemove(class ACCWeenieObject* this)

0058e4c0  {
0058e4c0      /* tailcall */
0058e4c0      return ACCWeenieObject::Remove(this);
0058e4c0  }

0058e4c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0058e4d0  void __fastcall ACCWeenieObject::ObjectBeingDeleted(class ACCWeenieObject* this)

0058e4d0  {
0058e4d8      int32_t i = 0;
0058e4da      bool cond:0 = this->markedForDeletion == 0;
0058e4dd      this->_phys_obj = nullptr;
0058e4dd      
0058e4e8      if ((cond:0 || this->movedWhileMarkedForDeletion != 0))
0058e4ec          ACCWeenieObject::Remove(this);
0058e4ec      
0058e4f1      class CObjectInventory* objInventory = this->objInventory;
0058e4f1      
0058e4f6      if (objInventory != 0)
0058e4f6      {
0058e4ff          if (objInventory->_itemsList.numIDs > 0)
0058e4ff          {
0058e558              do
0058e558              {
0058e508                  uint32_t eax_1 = IDList::GetByNum(&this->objInventory->_itemsList, i);
0058e516                  class CPhysicsObj* eax_2 = CObjectMaint::GetObjectA(CWeenieObject::objMaint, eax_1);
0058e51e                  class ACCWeenieObject* eax_3 = ClientObjMaintSystem::GetWeenieObject(eax_1);
0058e51e                  
0058e541                  if (((eax_3 == 0 || eax_3->pwd._containerID == this->id) && (eax_2 == 0 || eax_2->cell == 0)))
0058e54a                      CObjectMaint::AddObjectToBeDestroyed(CWeenieObject::objMaint, eax_1);
0058e54a                  
0058e555                  i += 1;
0058e558              } while (i < this->objInventory->_itemsList.numIDs);
0058e4ff          }
0058e4ff          
0058e560          int32_t i_1 = 0;
0058e560          
0058e564          if (this->objInventory->_containersList.numIDs > 0)
0058e564          {
0058e5bd              do
0058e5bd              {
0058e56d                  uint32_t eax_8 = IDList::GetByNum(&this->objInventory->_containersList, i_1);
0058e57b                  class CPhysicsObj* eax_9 = CObjectMaint::GetObjectA(CWeenieObject::objMaint, eax_8);
0058e583                  class ACCWeenieObject* eax_10 = ClientObjMaintSystem::GetWeenieObject(eax_8);
0058e583                  
0058e5a6                  if (((eax_10 == 0 || eax_10->pwd._containerID == this->id) && (eax_9 == 0 || eax_9->cell == 0)))
0058e5af                      CObjectMaint::AddObjectToBeDestroyed(CWeenieObject::objMaint, eax_8);
0058e5af                  
0058e5ba                  i_1 += 1;
0058e5bd              } while (i_1 < this->objInventory->_containersList.numIDs);
0058e564          }
0058e4f6      }
0058e4f6      
0058e5bf      uint32_t id = this->id;
0058e5d2      class HashBaseData<unsigned long>** buckets = ACCWeenieObject::iconDataTable.buckets;
0058e5da      uint32_t edx_5 = (((id >> ((int8_t)ACCWeenieObject::iconDataTable.key_shift)) ^ id) & ACCWeenieObject::iconDataTable.table_mask);
0058e5dc      int32_t* eax_14 = buckets[edx_5];
0058e5dc      
0058e5e1      if (eax_14 != 0)
0058e5e1      {
0058e5e6          if (eax_14[2] == id)
0058e5e6          {
0058e5eb              buckets[edx_5] = eax_14[1];
0058e615          label_58e615:
0058e615              
0058e617              if (eax_14 != 0)
0058e61f                  **(uint32_t**)eax_14(1);
0058e5e6          }
0058e5e6          else if (eax_14[1] != 0)
0058e5f5          {
0058e5f7              while (true)
0058e5f7              {
0058e5f7                  int32_t* ecx_13 = eax_14[1];
0058e5f7                  
0058e5fd                  if (ecx_13[2] == id)
0058e5fd                  {
0058e60a                      int32_t* ecx_15 = eax_14[1];
0058e610                      eax_14[1] = ecx_15[1];
0058e613                      eax_14 = ecx_15;
0058e613                      break;
0058e5fd                  }
0058e5fd                  
0058e5ff                  eax_14 = ecx_13;
0058e5ff                  
0058e606                  if (eax_14[1] == 0)
0058e606                      goto label_58e621;
0058e5f7              }
0058e5f7              
0058e5fd              goto label_58e615;
0058e5f5          }
0058e5e1      }
0058e5e1      
0058e621  label_58e621:
0058e621      class ACWTimeStamper* _stamper = this->_stamper;
0058e621      
0058e629      if (_stamper != 0)
0058e629      {
0058e62b          _stamper->vtable->__vecDelDtor(1);
0058e631          this->_stamper = nullptr;
0058e629      }
0058e629      
0058e641      /* tailcall */
0058e641      return CWeenieObject::ObjectBeingDeleted(this);
0058e4d0  }

0058e646                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0058e650  class Graphic* __fastcall ACCWeenieObject::GetIcon(class ACCWeenieObject* this)

0058e650  {
0058e658      return ACCWeenieObject::GetIconData(this)->m_pIcon;
0058e650  }

0058e659                                                                             90 90 90 90 90 90 90                           .......

0058e660  class Graphic* __fastcall ACCWeenieObject::GetDragIcon(class ACCWeenieObject* this)

0058e660  {
0058e668      return ACCWeenieObject::GetIconData(this)->m_pDragIcon;
0058e660  }

0058e669                             90 90 90 90 90 90 90                                                           .......

0058e670  void ACCWeenieObject::SetCorpseOpened(uint32_t const arg1)

0058e670  {
0058e670      uint32_t const i = arg1;
0058e686      int32_t* eax_3 = ACCWeenieObject::m_openedCorpses.m_intrusiveTable.m_buckets[(COMBINE(0, i) % ACCWeenieObject::m_openedCorpses.m_intrusiveTable.m_numBuckets)];
0058e686      
0058e68a      if (eax_3 == 0)
0058e68a      {
0058e6b9          HashSet<unsigned long>::add(&ACCWeenieObject::m_openedCorpses, &arg1);
0058e6b9          return;
0058e68a      }
0058e68a      
0058e692      while (*(uint32_t*)eax_3 != i)
0058e692      {
0058e694          eax_3 = eax_3[1];
0058e694          
0058e699          if (eax_3 == 0)
0058e699          {
0058e6a5              HashSet<unsigned long>::add(&ACCWeenieObject::m_openedCorpses, &arg1);
0058e6aa              return;
0058e699          }
0058e692      }
0058e692      
0058e6ad      if (eax_3 == 0)
0058e6b9          HashSet<unsigned long>::add(&ACCWeenieObject::m_openedCorpses, &arg1);
0058e670  }

0058e6bf                                                                                               90                                 .

0058e6c0  void ACCWeenieObject::SetCorpseDeleted(uint32_t const arg1)

0058e6c0  {
0058e6ca      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&ACCWeenieObject::m_openedCorpses.m_intrusiveTable, &arg1);
0058e6ca      
0058e6d1      if (eax == 0)
0058e6dc          return;
0058e6dc      
0058e6d3      arg1 = eax;
0058e6d7      /* tailcall */
0058e6d7      return operator delete(arg1);
0058e6c0  }

0058e6dd                                                                                         90 90 90                               ...

0058e6e0  char* __thiscall ACCWeenieObject::GetObjectName(class ACCWeenieObject* this, enum NameType arg2, int32_t arg3)

0058e6e0  {
0058e6ec      class ACCWeenieObject* this_1 = this;
0058e6ef      class ACCWeenieObject* this_2 = this_1;
0058e6ef      
0058e6f3      if ((arg3 != 0 && this_1->vtable->IsThePlayer() != 0))
0058e6f3      {
0058e714          __builtin_strncpy(&ACCWeenieObject::nameString, "Backpack", 9);
0058e72c          return 0x870e50;
0058e6f3      }
0058e6f3      
0058e72f      enum NameType ebx = arg2;
0058e73c      ACCWeenieObject::nameString[0] = 0;
0058e73c      
0058e743      if (ebx == NAME_APPROPRIATE)
0058e743      {
0058e745          uint32_t _stackSize = this_1->pwd._stackSize;
0058e745          
0058e756          if ((_stackSize != 0 && _stackSize > 1))
0058e756          {
0058e75c              arg2 = NAME_PLURAL;
0058e76b          label_58e76b:
0058e76b              class AC1Legacy::PSRefBuffer<char>* m_buffer = this_1->pwd._plural_name.m_buffer;
0058e775              InterlockedIncrement(&m_buffer->m_cRef);
0058e77c              ebx = m_buffer->m_len != 1;
0058e77c              
0058e787              if (InterlockedDecrement(&m_buffer->m_cRef) == 0)
0058e789                  m_buffer->vtable->__vecDelDtor(1);
0058e789              
0058e793              if (ebx != 0)
0058e793              {
0058e799                  class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this_2->pwd._plural_name.m_buffer;
0058e7a3                  InterlockedIncrement(&m_buffer_1->m_cRef);
0058e7a5                  char (* eax_6)[0x1] = &m_buffer_1->m_data;
0058e7ad                  void* edx_2 = (0x870e50 - eax_6);
0058e7b8                  char m_data[0x1];
0058e7b8                  
0058e7b8                  do
0058e7b8                  {
0058e7b0                      m_data = ADJ(eax_6)->m_data;
0058e7b2                      *(uint8_t*)((char*)edx_2 + eax_6) = m_data;
0058e7b5                      eax_6 = &eax_6[1];
0058e7b8                  } while (m_data != 0);
0058e7b8                  
0058e7cd                  if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
0058e7d3                      m_buffer_1->vtable->__vecDelDtor(1);
0058e7d3                  
0058e7cd                  goto label_58e887;
0058e793              }
0058e793              
0058e7e0              ebx = arg2;
0058e7e4              this_1 = this_2;
0058e756          }
0058e743      }
0058e743      else if (ebx == NAME_PLURAL)
0058e769          goto label_58e76b;
0058e769      
0058e7e8      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this_1->pwd._name.m_buffer;
0058e7f2      InterlockedIncrement(&m_buffer_2->m_cRef);
0058e7f4      char (* eax_8)[0x1] = &m_buffer_2->m_data;
0058e7fc      void* edx_4 = (0x870e50 - eax_8);
0058e808      char m_data_1[0x1];
0058e808      
0058e808      do
0058e808      {
0058e800          m_data_1 = ADJ(eax_8)->m_data;
0058e802          *(uint8_t*)((char*)edx_4 + eax_8) = m_data_1;
0058e805          eax_8 = &eax_8[1];
0058e808      } while (m_data_1 != 0);
0058e808      
0058e817      if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
0058e819          m_buffer_2->vtable->__vecDelDtor(1);
0058e819      
0058e824      if (ebx != NAME_PLURAL)
0058e824      {
0058e887      label_58e887:
0058e887          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0058e891          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0058e895          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0058e89b          int32_t _material_type = this_2->pwd._material_type;
0058e89b          
0058e8a3          if (_material_type > 0)
0058e8a3          {
0058e8a9              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0058e8ae              arg3 = PStringBase<char>::s_NullBuffer_1;
0058e8b6              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0058e8c1              PStringBase<char>::PStringBase<char>(&arg2, &ACCWeenieObject::nameString);
0058e8cc              AppraisalSystem::InqMaterialName(_material_type, &arg3);
0058e8dd              void* var_8;
0058e8dd              PStringBase<char>::PStringBase<char>(&var_8, &data_7928af);
0058e8f0              int32_t eax_14 = PStringBase<char>::replace(&arg2, &arg3, &var_8);
0058e8fb              int32_t* esi_1 = ((char*)var_8 - 0x14);
0058e902              int32_t eax_16;
0058e902              int32_t ecx_7;
0058e902              eax_16 = InterlockedDecrement(&esi_1[1]);
0058e902              
0058e90a              if ((eax_16 == 0 && esi_1 != 0))
0058e912                  ecx_7 = **(uint32_t**)esi_1(1);
0058e912              
0058e916              if (eax_14 != 0)
0058e916              {
0058e918                  int32_t var_20_12 = ecx_7;
0058e919                  class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::whitespace_string.m_charbuffer;
0058e929                  InterlockedIncrement(((char*)m_charbuffer - 0x10));
0058e933                  PStringBase<char>::trim(&arg2, 1, 1, m_charbuffer);
0058e916              }
0058e916              
0058e940              enum NameType var_20_14 = arg2;
0058e941              int32_t var_24_4 = arg3;
0058e94c              AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "%s %s");
0058e951              AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0058e955              char (* eax_18)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_data;
0058e960              void* edx_9 = (0x870e50 - eax_18);
0058e96a              char m_data_2[0x1];
0058e96a              
0058e96a              do
0058e96a              {
0058e962                  m_data_2 = ADJ(eax_18)->m_data;
0058e964                  *(uint8_t*)((char*)edx_9 + eax_18) = m_data_2;
0058e967                  eax_18 = &eax_18[1];
0058e96a              } while (m_data_2 != 0);
0058e970              int32_t* edi_9 = (arg2 - 0x14);
0058e970              
0058e97f              if ((InterlockedDecrement(&edi_9[1]) == 0 && edi_9 != 0))
0058e987                  **(uint32_t**)edi_9(1);
0058e987              
0058e98d              int32_t* edi_11 = (arg3 - 0x14);
0058e98d              
0058e99c              if ((InterlockedDecrement(&edi_11[1]) == 0 && edi_11 != 0))
0058e9a4                  **(uint32_t**)edi_11(1);
0058e8a3          }
0058e8a3          
0058e9ba          if ((ACCWeenieObject::nameString[0] == 0x2b && (this_2->pwd._bitfield & 0x40) != 0))
0058e9ba          {
0058e9c8              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
0058e9ca                  AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
0058e9ca              
0058e9de              return 0x870e51;
0058e9ba          }
0058e9ba          
0058e9ed          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
0058e9ef              AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
0058e824      }
0058e824      else
0058e824      {
0058e826          char* eax_11 = &ACCWeenieObject::nameString;
0058e835          char i;
0058e835          
0058e835          do
0058e835          {
0058e830              i = *(uint8_t*)eax_11;
0058e832              eax_11 = &eax_11[1];
0058e835          } while (i != 0);
0058e835          
0058e83b          if ((eax_11 - 0x870e51) > 0)
0058e83b          {
0058e84c              int16_t* edi_6 = &*(int32_t*)((char*)ACCWeenieObject::prevSelectedValidID + 3);
0058e850              void* eax_12;
0058e850              
0058e850              if (*(uint8_t*)(eax_11 - 2) != 0x73)
0058e850              {
0058e876                  do
0058e876                  {
0058e870                      eax_12 = *(uint8_t*)((char*)edi_6 + 1);
0058e873                      edi_6 += 1;
0058e876                  } while (eax_12 != 0);
0058e876                  
0058e87e                  *(uint16_t*)edi_6 = 0x73;
0058e850              }
0058e850              else
0058e850              {
0058e858                  do
0058e858                  {
0058e852                      eax_12 = *(uint8_t*)((char*)edi_6 + 1);
0058e855                      edi_6 += 1;
0058e858                  } while (eax_12 != 0);
0058e858                  
0058e867                  *(uint16_t*)edi_6 = 0x7365;
0058e86a                  edi_6[1] = 0;
0058e850              }
0058e850              goto label_58e887;
0058e83b          }
0058e824      }
0058e824      
0058ea03      return 0x870e50;
0058e6e0  }

0058e86f                                               90                                                                 .
0058ea06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0058ea10  char* ACCWeenieObject::GetObjectName(uint32_t arg1, enum NameType arg2, int32_t arg3)

0058ea10  {
0058ea28      if ((arg3 != 0 && arg1 == SmartBox::smartbox->player_id))
0058ea28      {
0058ea40          __builtin_strncpy(&ACCWeenieObject::nameString, "Backpack", 9);
0058ea51          return 0x870e50;
0058ea28      }
0058ea28      
0058ea53      class ACCWeenieObject* eax_2 = ClientObjMaintSystem::GetWeenieObject(arg1);
0058ea53      
0058ea5d      if (eax_2 != 0)
0058ea6d          return ACCWeenieObject::GetObjectName(eax_2, arg2, 0);
0058ea6d      
0058ea6e      ACCWeenieObject::nameString[0] = 0;
0058ea7a      return 0x870e50;
0058ea10  }

0058ea7b                                                                                   90 90 90 90 90                             .....

0058ea80  class PStringBase<unsigned short>* __thiscall ACCWeenieObject::GetObjectNameWide(class ACCWeenieObject* this, class PStringBase<unsigned short>* __return, enum NameType arg3, int32_t arg4)

0058ea80  {
0058eaa1      return PStringBase<unsigned short>::PStringBase<unsigned short>(__return, WidthConvert, ACCWeenieObject::GetObjectName(this, arg3, arg4));
0058ea80  }

0058eaa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058eab0  class PStringBase<unsigned short>* ACCWeenieObject::GetObjectNameWide(class PStringBase<unsigned short>* __return, uint32_t arg2, enum NameType arg3, int32_t arg4)

0058eab0  {
0058ead9      return PStringBase<unsigned short>::PStringBase<unsigned short>(__return, WidthConvert, ACCWeenieObject::GetObjectName(arg2, arg3, arg4));
0058eab0  }

0058eada                                                                                90 90 90 90 90 90                            ......

0058eae0  void __thiscall ACCWeenieObject::ServerSaysAttemptFailed(class ACCWeenieObject* this, uint32_t arg2, int32_t arg3)

0058eae0  {
0058eae6      class PStringBase<unsigned short> esi;
0058eae6      class PStringBase<unsigned short> var_b8 = esi;
0058eae6      
0058eaee      if (this->waiting != 0)
0058eaee      {
0058eaf3          bool cond:0_1 = this->valid == 0;
0058eaf5          this->waiting = 0;
0058eaf5          
0058eafc          if (!(cond:0_1))
0058eb04              GenItemHolder::ItemAttributesChanged_s(this->id, 0);
0058eaee      }
0058eaee      
0058eb13      if (ClientUISystem::GetUISystem() != 0)
0058eb13      {
0058eb22          if (arg3 != 0)
0058eb22          {
0058eb28              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0058eb2d              class PSRefBufferCharData<unsigned short>* __return = PStringBase<unsigned short>::s_NullBuffer_1;
0058eb35              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0058eb4a              void __return_1;
0058eb4a              void __return_2;
0058eb4a              void __return_3;
0058eb4a              void __return_4;
0058eb4a              void __return_5;
0058eb4a              void __return_6;
0058eb4a              
0058eb4a              switch ((ACCWeenieObject::prevRequest - 1))
0058eb4a              {
0058eb63                  case 0:
0058eb63                  {
0058eb63                      class PSRefBufferCharData<unsigned short>* m_charbuffer = ACCWeenieObject::GetObjectNameWide(this, &__return_4, NAME_PLURAL, 0)->m_charbuffer;
0058eb6e                      PStringBase<unsigned short>::sprintf(&var_b8, u"The %s can't be merged");
0058ec9e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_4);
0058eb63                      break;
0058eb63                  }
0058eb8e                  case 1:
0058eb8e                  {
0058eb8e                      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ACCWeenieObject::GetObjectNameWide(this, &__return_2, NAME_PLURAL, 0)->m_charbuffer;
0058eb99                      PStringBase<unsigned short>::sprintf(&var_b8, u"The %s can't be split");
0058ec9e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_2);
0058eb8e                      break;
0058eb8e                  }
0058ebb9                  case 2:
0058ebb9                  {
0058ebb9                      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = ACCWeenieObject::GetObjectNameWide(this, &__return_1, NAME_APPROPRIATE, 0)->m_charbuffer;
0058ebc4                      PStringBase<unsigned short>::sprintf(&var_b8, u"The %s can't be moved");
0058ec9e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0058ebb9                      break;
0058ebb9                  }
0058ebe4                  case 3:
0058ebe4                  {
0058ebe4                      class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = ACCWeenieObject::GetObjectNameWide(this, &__return, NAME_APPROPRIATE, 0)->m_charbuffer;
0058ebef                      PStringBase<unsigned short>::sprintf(&var_b8, u"The %s can't be picked up");
0058ec9e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0058ebe4                      break;
0058ebe4                  }
0058ec0f                  case 4:
0058ec0f                  {
0058ec0f                      class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = ACCWeenieObject::GetObjectNameWide(this, &__return_3, NAME_APPROPRIATE, 0)->m_charbuffer;
0058ec1a                      PStringBase<unsigned short>::sprintf(&var_b8, u"The %s can't be put in the conta…");
0058ec9e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_3);
0058ec0f                      break;
0058ec0f                  }
0058ec37                  case 5:
0058ec37                  {
0058ec37                      class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = ACCWeenieObject::GetObjectNameWide(this, &__return_5, NAME_APPROPRIATE, 0)->m_charbuffer;
0058ec42                      PStringBase<unsigned short>::sprintf(&var_b8, u"The %s can't be dropped");
0058ec9e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_5);
0058ec37                      break;
0058ec37                  }
0058ec5f                  case 6:
0058ec5f                  {
0058ec5f                      class PSRefBufferCharData<unsigned short>* m_charbuffer_6 = ACCWeenieObject::GetObjectNameWide(this, &__return_6, NAME_APPROPRIATE, 0)->m_charbuffer;
0058ec6a                      PStringBase<unsigned short>::sprintf(&var_b8, u"The %s can't be wielded");
0058ec9e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_6);
0058ec5f                      break;
0058ec5f                  }
0058ec87                  case 8:
0058ec87                  {
0058ec87                      void __return_7;
0058ec87                      class PSRefBufferCharData<unsigned short>* m_charbuffer_7 = ACCWeenieObject::GetObjectNameWide(this, &__return_7, NAME_APPROPRIATE, 0)->m_charbuffer;
0058ec92                      PStringBase<unsigned short>::sprintf(&var_b8, u"The %s can't be given");
0058ec9e                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_7);
0058ec87                      break;
0058ec87                  }
0058eb4a              }
0058eb4a              
0058ed6a              if (__return_addr > 0x39)
0058ed6a              {
0058edbf                  if (__return_addr == 0x3ee)
0058edbf                  {
0058edca                      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_4, u" - the container is closed");
0058edd8                      PStringBase<unsigned short>::operator+=(&var_b8, &__return_4);
0058ede1                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_4);
0058edbf                  }
0058ed6a              }
0058ed6a              else if (__return_addr >= 0x37)
0058ed6f              {
0058eda1                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_2, u" - unable to move to object");
0058edaf                  PStringBase<unsigned short>::operator+=(&var_b8, &__return_2);
0058ede1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_2);
0058ed6f              }
0058ed6f              else if (__return_addr == 0x36)
0058ed74              {
0058ed7f                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_1, u" - action cancelled");
0058ed8d                  PStringBase<unsigned short>::operator+=(&var_b8, &__return_1);
0058ede1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0058ed74              }
0058ed74              
0058ecb3              if (__return_addr == 0x2a)
0058ecb3              {
0058ed44                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u" - you are too encumbered");
0058ed49                  uint16_t* __return_8 = __return;
0058ed4d                  int32_t eax_17 = *(uint32_t*)((char*)__return_8 - 4);
0058ed4d                  
0058ed53                  if (eax_17 != 1)
0058ed5c                      PStringBase<unsigned short>::append_n_chars(&var_b8, __return_8, (eax_17 - 1));
0058ed5c                  
0058ede1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0058ecb3              }
0058ecb3              else if (__return_addr == 0x1d)
0058ecbc              {
0058ed1f                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_3, u" - you're too busy");
0058ed2d                  PStringBase<unsigned short>::operator+=(&var_b8, &__return_3);
0058ede1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_3);
0058ecbc              }
0058ecbc              else if (__return_addr == 0x20)
0058ecc1              {
0058ecfa                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_5, u" - you must control both objects");
0058ed08                  PStringBase<unsigned short>::operator+=(&var_b8, &__return_5);
0058ede1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_5);
0058ecc1              }
0058ecc1              else if (__return_addr == 0x28)
0058ecc6              {
0058ecd5                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_6, u" - the item is under someone els…");
0058ece3                  PStringBase<unsigned short>::operator+=(&var_b8, &__return_6);
0058ede1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_6);
0058ecc6              }
0058ecc6              
0058ede6              int32_t edi;
0058ede6              int32_t var_c0_9 = edi;
0058edeb              void var_94;
0058edeb              StringInfo::StringInfo(&var_94);
0058edfb              StringInfo::SetLiteralValue(&var_94, &var_b8, 1);
0058ee07              ECM_UI::SendNotice_DisplayStringInfo(0x1a, &var_94);
0058ee13              StringInfo::~StringInfo(&var_94);
0058ee1c              int32_t* edi_2 = (var_b8 - 0x14);
0058ee1c              
0058ee2f              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0058ee37                  **(uint32_t**)edi_2(1);
0058eb22          }
0058eb22          
0058ee43          if (this->id == ACCWeenieObject::prevRequestObjectID)
0058ee43          {
0058ee45              ACCWeenieObject::prevRequestObjectID = 0;
0058ee4f              ACCWeenieObject::prevRequest = IR_NONE;
0058ee59              (*(uint32_t*)ACCWeenieObject::prevRequestTime) = 0f;
0058ee63              *(int32_t*)((char*)ACCWeenieObject::prevRequestTime + 4) = 0f;
0058ee43          }
0058ee43          
0058ee71          GenItemHolder::ServerSaysAttemptFailed_s(this->id);
0058eb13      }
0058eae0  }

0058ee83           90                                                                                         .
0058ee84  uint32_t jump_table_58ee84[0x9] = 
0058ee84  {
0058ee84      [0x0] =  0x0058eb51
0058ee88      [0x1] =  0x0058eb7c
0058ee8c      [0x2] =  0x0058eba7
0058ee90      [0x3] =  0x0058ebd2
0058ee94      [0x4] =  0x0058ebfd
0058ee98      [0x5] =  0x0058ec25
0058ee9c      [0x6] =  0x0058ec4d
0058eea0      [0x7] =  0x0058eca3
0058eea4      [0x8] =  0x0058ec75
0058eea8  }

0058eea8                          90 90 90 90 90 90 90 90                                                          ........

0058eeb0  int32_t __fastcall CACQualities::HasSpellBook(class CACQualities const* this)

0058eeb0  {
0058eeb7      int32_t result;
0058eeb7      result = this->_spell_book != 0;
0058eeba      return result;
0058eeb0  }

0058eebb                                                                                   90 90 90 90 90                             .....

0058eec0  int32_t __thiscall CACQualities::IsSpellKnown(class CACQualities const* this, uint32_t const arg2)

0058eec0  {
0058eec0      class CSpellBook* _spell_book = this->_spell_book;
0058eec0      
0058eec5      if (_spell_book == 0)
0058eece          return 0;
0058eece      
0058eec7      /* tailcall */
0058eec7      return CSpellBook::Exists(_spell_book, arg2);
0058eec0  }

0058eed1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0058eee0  int32_t __thiscall CACQualities::TranscribeSpells(class CACQualities const* this, class PackableList<unsigned long>* arg2)

0058eee0  {
0058eee0      class CSpellBook* _spell_book = this->_spell_book;
0058eee0      
0058eee5      if (_spell_book == 0)
0058eeee          return 0;
0058eeee      
0058eee7      /* tailcall */
0058eee7      return CSpellBook::TranscribeSpells(_spell_book, arg2);
0058eee0  }

0058eef1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0058ef00  int32_t __fastcall CACQualities::HasEnchantmentRegistry(class CACQualities const* this)

0058ef00  {
0058ef07      int32_t result;
0058ef07      result = this->_enchantment_reg != 0;
0058ef0a      return result;
0058ef00  }

0058ef0b                                   90 90 90 90 90                                                             .....

0058ef10  int32_t __thiscall CACQualities::IsEnchanted(class CACQualities const* this, uint32_t const arg2)

0058ef10  {
0058ef10      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058ef10      
0058ef15      if (_enchantment_reg == 0)
0058ef1e          return 0;
0058ef1e      
0058ef17      /* tailcall */
0058ef17      return CEnchantmentRegistry::IsEnchanted(_enchantment_reg, arg2);
0058ef10  }

0058ef21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058ef30  int32_t __fastcall CACQualities::PurgeEnchantments(class CACQualities* this)

0058ef30  {
0058ef30      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058ef30      
0058ef35      if (_enchantment_reg != 0)
0058ef3a          /* tailcall */
0058ef3a          return CEnchantmentRegistry::PurgeEnchantments(_enchantment_reg);
0058ef3a      
0058ef39      return 0;
0058ef30  }

0058ef3f                                                                                               90                                 .

0058ef40  int32_t __fastcall CACQualities::PurgeBadEnchantments(class CACQualities* this)

0058ef40  {
0058ef40      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058ef40      
0058ef45      if (_enchantment_reg != 0)
0058ef4a          /* tailcall */
0058ef4a          return CEnchantmentRegistry::PurgeBadEnchantments(_enchantment_reg);
0058ef4a      
0058ef49      return 0;
0058ef40  }

0058ef4f                                               90                                                                 .

0058ef50  int32_t __thiscall CACQualities::GetEnchantmentsInEffect(class CACQualities const* this, class PackableList<Enchantment>* arg2)

0058ef50  {
0058ef50      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058ef50      
0058ef55      if (_enchantment_reg != 0)
0058ef5c          /* tailcall */
0058ef5c          return CEnchantmentRegistry::GetEnchantmentsInEffect(_enchantment_reg, arg2);
0058ef5c      
0058ef59      return 0;
0058ef50  }

0058ef61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058ef70  int32_t __thiscall CACQualities::RemoveEnchantment(class CACQualities* this, uint32_t const arg2)

0058ef70  {
0058ef70      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058ef70      
0058ef75      if (_enchantment_reg != 0)
0058ef7c          /* tailcall */
0058ef7c          return CEnchantmentRegistry::RemoveEnchantment(_enchantment_reg, arg2);
0058ef7c      
0058ef79      return 0;
0058ef70  }

0058ef81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058ef90  int32_t __thiscall CACQualities::RemoveEnchantments(class CACQualities* this, class PackableList<unsigned long>* arg2)

0058ef90  {
0058ef90      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058ef90      
0058ef95      if (_enchantment_reg != 0)
0058ef9c          /* tailcall */
0058ef9c          return CEnchantmentRegistry::RemoveEnchantments(_enchantment_reg, arg2);
0058ef9c      
0058ef99      return 0;
0058ef90  }

0058efa1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058efb0  int32_t __thiscall CACQualities::UpdateEnchantment(class CACQualities* this, class Enchantment const* arg2)

0058efb0  {
0058efb8      if (this->_enchantment_reg == 0)
0058efb8      {
0058efbc          void* eax_1 = operator new(0x1c);
0058efc6          class CEnchantmentRegistry* result;
0058efc6          
0058efc6          if (eax_1 == 0)
0058efd1              result = nullptr;
0058efc6          else
0058efca              result = CEnchantmentRegistry::CEnchantmentRegistry(eax_1);
0058efca          
0058efd5          this->_enchantment_reg = result;
0058efd5          
0058efd8          if (result == 0)
0058efdb              return result;
0058efb8      }
0058efb8      
0058efec      return CEnchantmentRegistry::UpdateEnchantment(this->_enchantment_reg, arg2);
0058efb0  }

0058efef                                               90                                                                 .

0058eff0  int32_t __thiscall CACQualities::UpdateEnchantments(class CACQualities* this, class PackableList<Enchantment>* arg2)

0058eff0  {
0058eff8      if (this->_enchantment_reg == 0)
0058eff8      {
0058effc          void* eax_1 = operator new(0x1c);
0058f006          class CEnchantmentRegistry* result;
0058f006          
0058f006          if (eax_1 == 0)
0058f011              result = nullptr;
0058f006          else
0058f00a              result = CEnchantmentRegistry::CEnchantmentRegistry(eax_1);
0058f00a          
0058f015          this->_enchantment_reg = result;
0058f015          
0058f018          if (result == 0)
0058f01b              return result;
0058eff8      }
0058eff8      
0058f02c      return CEnchantmentRegistry::UpdateEnchantmentList(this->_enchantment_reg, arg2);
0058eff0  }

0058f02f                                               90                                                                 .

0058f030  int32_t __thiscall CACQualities::InqVitae(class CACQualities const* this, class Enchantment* arg2)

0058f030  {
0058f030      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058f030      
0058f035      if (_enchantment_reg != 0)
0058f03c          /* tailcall */
0058f03c          return CEnchantmentRegistry::InqVitae(_enchantment_reg, arg2);
0058f03c      
0058f039      return 0;
0058f030  }

0058f041     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058f050  void __fastcall CACQualities::GetVitaeValue(class CACQualities const* this)

0058f050  {
0058f050      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058f050      
0058f055      if (_enchantment_reg != 0)
0058f05e          /* tailcall */
0058f05e          return CEnchantmentRegistry::GetVitaeValue(_enchantment_reg);
0058f050  }

0058f063           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0058f070  int32_t __thiscall CACQualities::EnchantAttribute(class CACQualities const* this, uint32_t arg2, uint32_t* arg3)

0058f070  {
0058f070      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058f070      
0058f075      if (_enchantment_reg != 0)
0058f07c          /* tailcall */
0058f07c          return CEnchantmentRegistry::EnchantAttribute(_enchantment_reg, arg2, arg3);
0058f07c      
0058f079      return 0;
0058f070  }

0058f081     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058f090  int32_t __thiscall CACQualities::EnchantAttribute2nd(class CACQualities const* this, uint32_t arg2, uint32_t* arg3)

0058f090  {
0058f090      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058f090      
0058f095      if (_enchantment_reg != 0)
0058f09c          /* tailcall */
0058f09c          return CEnchantmentRegistry::EnchantAttribute2nd(_enchantment_reg, arg2, arg3);
0058f09c      
0058f099      return 0;
0058f090  }

0058f0a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058f0b0  int32_t __thiscall CACQualities::EnchantSkill(class CACQualities const* this, uint32_t arg2, int32_t* arg3)

0058f0b0  {
0058f0b0      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
0058f0b0      
0058f0b5      if (_enchantment_reg != 0)
0058f0bc          /* tailcall */
0058f0bc          return CEnchantmentRegistry::EnchantSkill(_enchantment_reg, arg2, arg3);
0058f0bc      
0058f0b9      return 0;
0058f0b0  }

0058f0c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058f0d0  int32_t __thiscall CACQualities::EnchantInt(class CACQualities const* this, uint32_t arg2, int32_t* arg3, int32_t arg4)

0058f0d0  {
0058f0d0      struct CBaseQualities::VTable* vtable = this->vtable;
0058f0d0      
0058f0d5      if (vtable != 0)
0058f0dc          /* tailcall */
0058f0dc          return CEnchantmentRegistry::EnchantInt(vtable, arg2, arg3, arg4);
0058f0dc      
0058f0d9      return 0;
0058f0d0  }

0058f0e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058f0f0  int32_t __thiscall CACQualities::EnchantFloat(class CACQualities const* this, uint32_t arg2, double* arg3)

0058f0f0  {
0058f0f0      struct CBaseQualities::VTable* vtable = this->vtable;
0058f0f0      
0058f0f5      if (vtable != 0)
0058f0fc          /* tailcall */
0058f0fc          return CEnchantmentRegistry::EnchantFloat(vtable, arg2, arg3);
0058f0fc      
0058f0f9      return 0;
0058f0f0  }

0058f101     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058f110  int32_t __thiscall CACQualities::GetFloatEnchantmentDetails(class CACQualities const* this, uint32_t arg2, struct EnchantedQualityDetails* arg3)

0058f110  {
0058f110      struct CBaseQualities::VTable* vtable = this->vtable;
0058f110      
0058f115      if (vtable != 0)
0058f11c          /* tailcall */
0058f11c          return CEnchantmentRegistry::GetFloatEnchantmentDetails(vtable, arg2, arg3);
0058f11c      
0058f119      return 0;
0058f110  }

0058f121     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0058f130  int32_t __thiscall CACQualities::InqLoad(class CACQualities const* this, float* arg2)

0058f130  {
0058f141      int32_t var_8 = 0xa;
0058f149      int32_t var_4 = 0;
0058f16b      int32_t result = (CACQualities::InqAttribute(this, 1, &var_8, 0) | 1);
0058f16e      int32_t var_c = 0;
0058f176      CBaseQualities::InqInt(&this->vtable, 0xe6, &var_c, 0, 0);
0058f185      int32_t eax_2 = EncumbranceSystem::EncumbranceCapacity(var_8, var_c);
0058f19c      CBaseQualities::InqInt(&this->vtable, 5, &var_4, 0, 0);
0058f1b3      *(uint32_t*)arg2 = ((float)EncumbranceSystem::Load(eax_2, var_4));
0058f1bd      return result;
0058f130  }


0058f1c0  void __fastcall BodyPart::BodyPart(class BodyPart* this)

0058f1c0  {
0058f1c4      this->vtable = 0x7e4380;
0058f1ca      this->_dtype = UNDEF_DAMAGE_TYPE;
0058f1cd      this->_dval = 0;
0058f1d0      this->_dvar = 0f;
0058f1d3      this->_acache.vtable = 0x7e436c;
0058f1da      __builtin_memset(&this->_acache._base_armor, 0, 0x2c);
0058f1c0  }

0058f1fc                                                                                      90 90 90 90                              ....

0058f200  void* __thiscall BodyPart::`scalar deleting destructor'(class BodyPart* this, uint32_t arg2)

0058f200  {
0058f203      BodyPart::~BodyPart(this);
0058f203      
0058f20d      if ((arg2 & 1) != 0)
0058f210          operator delete(this);
0058f210      
0058f21b      return this;
0058f200  }

0058f21e                                                                                            90 90                                ..

0058f220  int32_t __thiscall CACQualities::AddSpell(class CACQualities* this, uint32_t const arg2)

0058f220  {
0058f229      bool cond:0 = this->_spell_book != 0;
0058f22b      int32_t var_8 = 0x7e4394;
0058f233      int32_t var_4 = 0;
0058f233      
0058f23b      if (!(cond:0))
0058f23b      {
0058f23f          void* eax_1 = operator new(0x18);
0058f249          class CSpellBook* result;
0058f249          
0058f249          if (eax_1 == 0)
0058f254              result = nullptr;
0058f249          else
0058f24d              result = CSpellBook::CSpellBook(eax_1);
0058f24d          
0058f258          this->_spell_book = result;
0058f258          
0058f25b          if (result == 0)
0058f261              return result;
0058f23b      }
0058f23b      
0058f27a      return CSpellBook::AddSpell(this->_spell_book, arg2, &var_8);
0058f220  }

0058f27d                                                                                         90 90 90                               ...

0058f280  int32_t __thiscall CACQualities::RemoveSpell(class CACQualities* this, uint32_t const arg2)

0058f280  {
0058f283      class CSpellBook* _spell_book = this->_spell_book;
0058f288      int32_t var_8 = 0x7e4394;
0058f290      int32_t var_4 = 0;
0058f290      
0058f298      if (_spell_book != 0)
0058f2b4          return CSpellBook::RemoveSpell(_spell_book, arg2, &var_8);
0058f2b4      
0058f29f      return 0;
0058f280  }

0058f2b7                                                                       90 90 90 90 90 90 90 90 90                         .........

0058f2c0  void __fastcall PackableHashTable<long,BodyPart>::EmptyContents(class PackableHashTable<long,BodyPart>* this)

0058f2c0  {
0058f2c9      if (this->_buckets != 0)
0058f2c9      {
0058f2ce          int32_t i = 0;
0058f2ce          
0058f2d2          if (this->_table_size > 0)
0058f2d2          {
0058f30a              do
0058f30a              {
0058f2d9                  void* j_1 = this->_buckets[i];
0058f2d9                  
0058f2de                  if (j_1 != 0)
0058f2de                  {
0058f2f8                      void* j;
0058f2f8                      
0058f2f8                      do
0058f2f8                      {
0058f2e0                          j = *(uint32_t*)((char*)j_1 + 0x44);
0058f2e6                          BodyPart::~BodyPart(((char*)j_1 + 4));
0058f2ec                          operator delete(j_1);
0058f2f6                          j_1 = j;
0058f2f8                      } while (j != 0);
0058f2de                  }
0058f2de                  
0058f2fa                  this->_buckets[i] = 0;
0058f307                  i += 1;
0058f30a              } while (i < this->_table_size);
0058f2d2          }
0058f2c9      }
0058f2c9      
0058f30f      this->_currNum = 0;
0058f2c0  }

0058f318                                                                          90 90 90 90 90 90 90 90                          ........

0058f320  int32_t __thiscall PackableHashTable<long,BodyPart>::add(class PackableHashTable<long,BodyPart>* this, int32_t const* arg2, class BodyPart const* arg3)

0058f320  {
0058f32a      uint32_t _table_size_1 = this->_table_size;
0058f32a      
0058f32f      if (_table_size_1 == 0)
0058f32f      {
0058f35e      label_58f35e:
0058f35e          void* eax_4 = operator new(0x4c);
0058f35e          
0058f36a          if (eax_4 != 0)
0058f36a          {
0058f373              uint32_t _table_size = this->_table_size;
0058f37a              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
0058f37c              BodyPart::BodyPart(((char*)eax_4 + 4), arg3);
0058f381              *(uint32_t*)((char*)eax_4 + 0x44) = 0;
0058f38d              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
0058f38f              *(uint32_t*)((char*)eax_4 + 0x48) = temp1_2;
0058f39a              *(uint32_t*)((char*)eax_4 + 0x44) = this->_buckets[temp1_2];
0058f39d              this->_buckets[temp1_2] = eax_4;
0058f3a3              this->_currNum += 1;
0058f3af              return 1;
0058f36a          }
0058f32f      }
0058f32f      else
0058f32f      {
0058f331          class PackableHashData<long,BodyPart>** _buckets = this->_buckets;
0058f331          
0058f336          if (_buckets == 0)
0058f336              goto label_58f35e;
0058f336          
0058f338          int32_t const i = *(uint32_t*)arg2;
0058f341          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
0058f341          
0058f346          if (edx_3 == 0)
0058f346              goto label_58f35e;
0058f346          
0058f34a          while (i != *(uint32_t*)edx_3)
0058f34a          {
0058f34c              edx_3 = edx_3[0x11];
0058f34c              
0058f351              if (edx_3 == 0)
0058f351                  goto label_58f35e;
0058f34a          }
0058f34a          
0058f35a          if (edx_3 == 0xfffffffc)
0058f35a              goto label_58f35e;
0058f32f      }
0058f32f      
0058f3b8      return 0;
0058f320  }

0058f3bb                                                                                   90 90 90 90 90                             .....

0058f3c0  uint32_t __thiscall PackableHashTable<long,BodyPart>::Pack(class PackableHashTable<long,BodyPart>* this, void** arg2, uint32_t arg3)

0058f3c0  {
0058f3c0      class PackableHashTable<long,BodyPart>* this_1 = this;
0058f3c5      uint32_t result = PackableHashTable<long,BodyPart>::pack_size(this);
0058f3ca      uint32_t ebx = arg3;
0058f3d0      uint32_t result_1 = result;
0058f3d0      
0058f3d4      if (ebx >= result)
0058f3d4      {
0058f3e9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
0058f3eb          *(uint32_t*)arg2 += 4;
0058f3f1          uint32_t i = 0;
0058f3f5          arg3 = 0;
0058f3f5          
0058f3f9          if (this->_table_size > 0)
0058f3f9          {
0058f442              do
0058f442              {
0058f403                  int32_t* j = this->_buckets[i];
0058f403                  
0058f408                  if (j != 0)
0058f408                  {
0058f42e                      do
0058f42e                      {
0058f413                          if (ebx >= 4)
0058f413                          {
0058f419                              **(uint32_t**)arg2 = *(uint32_t*)j;
0058f41b                              *(uint32_t*)arg2 += 4;
0058f413                          }
0058f413                          
0058f426                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
0058f429                          j = j[0x11];
0058f42e                      } while (j != 0);
0058f42e                      
0058f430                      result = result_1;
0058f434                      i = arg3;
0058f408                  }
0058f408                  
0058f43b                  i += 1;
0058f43e                  arg3 = i;
0058f442              } while (i < this->_table_size);
0058f3f9          }
0058f3d4      }
0058f3d4      
0058f449      return result;
0058f3c0  }

0058f3fd                                                                                         8d 49 00                               .I.
0058f44c                                      90 90 90 90                                                              ....

0058f450  uint32_t __fastcall PackableHashTable<long,BodyPart>::pack_size(class PackableHashTable<long,BodyPart>* this)

0058f450  {
0058f450      class PackableHashTable<long,BodyPart>* this_1 = this;
0058f458      int32_t i = 0;
0058f45a      bool cond:0 = this->_table_size <= 0;
0058f45d      int32_t result = 4;
0058f462      this_1 = nullptr;
0058f462      
0058f466      if (!(cond:0))
0058f466      {
0058f4a1          do
0058f4a1          {
0058f473              void* j = this->_buckets[i];
0058f473              
0058f478              while (j != 0)
0058f478              {
0058f48d                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
0058f490                  j = *(uint32_t*)((char*)j + 0x44);
0058f495                  result = ((result + eax_2) + 4);
0058f478              }
0058f478              
0058f49e              i += 1;
0058f4a1          } while (i < this->_table_size);
0058f466      }
0058f466      
0058f4aa      return result;
0058f450  }

0058f4ab                                   90 90 90 90 90                                                             .....

0058f4b0  uint32_t __thiscall PackableList<CreationProfile>::InsertTail(class PackableList<CreationProfile>* this, class CreationProfile const* arg2)

0058f4b0  {
0058f4bb      void* edi = operator new(0x24);
0058f4bb      
0058f4c2      if (edi == 0)
0058f4e0          edi = nullptr;
0058f4c2      else
0058f4c2      {
0058f4cb          CreationProfile::CreationProfile(edi, arg2);
0058f4d0          *(uint32_t*)((char*)edi + 0x1c) = 0;
0058f4d7          *(uint32_t*)((char*)edi + 0x20) = 0;
0058f4c2      }
0058f4c2      
0058f4e7      if (this->head == 0)
0058f4e7      {
0058f4e9          uint32_t curNum = this->curNum;
0058f4ec          this->head = edi;
0058f4ef          this->tail = edi;
0058f4f4          this->curNum = (curNum + 1);
0058f4f8          return (curNum + 1);
0058f4e7      }
0058f4e7      
0058f4fb      class PackableLLNode<CreationProfile>* tail = this->tail;
0058f4fe      tail->next = edi;
0058f501      *(uint32_t*)((char*)edi + 0x20) = tail;
0058f504      uint32_t curNum_1 = this->curNum;
0058f507      this->tail = edi;
0058f50c      this->curNum = (curNum_1 + 1);
0058f510      return (curNum_1 + 1);
0058f4b0  }

0058f513                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0058f520  uint32_t __thiscall PackableList<CreationProfile>::Pack(class PackableList<CreationProfile>* this, void** arg2, uint32_t arg3)

0058f520  {
0058f525      uint32_t result = PackableList<CreationProfile>::pack_size(this);
0058f525      
0058f532      if (arg3 >= result)
0058f532      {
0058f53c          if (arg3 >= 4)
0058f53c          {
0058f543              **(uint32_t**)arg2 = this->curNum;
0058f545              *(uint32_t*)arg2 += 4;
0058f53c          }
0058f53c          
0058f54d          for (class PackableLLNode<CreationProfile>* i = this->head; i != 0; i = i->next)
0058f550              i->data.vtable->Pack(arg2, arg3);
0058f532      }
0058f532      
0058f566      return result;
0058f520  }

0058f569                             90 90 90 90 90 90 90                                                           .......

0058f570  uint32_t __fastcall PackableList<CreationProfile>::pack_size(class PackableList<CreationProfile>* this)

0058f570  {
0058f570      class PackableList<CreationProfile>* this_1 = this;
0058f572      class PackableLLNode<CreationProfile>* i = this->head;
0058f578      int32_t result = 4;
0058f57d      this_1 = nullptr;
0058f57d      
0058f585      while (i != 0)
0058f585      {
0058f592          int32_t eax_2 = i->data.vtable->Pack(&this_1, 0);
0058f595          i = i->next;
0058f598          result += eax_2;
0058f585      }
0058f585      
0058f5a3      return result;
0058f570  }

0058f5a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058f5b0  void __fastcall PackableHashTable<long,BodyPart>::~PackableHashTable<long,BodyPart>(class PackableHashTable<long,BodyPart>* this)

0058f5b0  {
0058f5b3      this->vtable = 0x7e43a8;
0058f5b9      PackableHashTable<long,BodyPart>::EmptyContents(this);
0058f5be      class PackableHashData<long,BodyPart>** _buckets = this->_buckets;
0058f5be      
0058f5c3      if (_buckets != 0)
0058f5c3      {
0058f5c6          operator delete[](_buckets);
0058f5ce          this->_buckets = nullptr;
0058f5c3      }
0058f5c3      
0058f5d5      this->_table_size = 0;
0058f5dc      this->vtable = 0x79285c;
0058f5b0  }

0058f5e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058f5f0  int32_t __thiscall PackableHashTable<long,BodyPart>::UnPack(class PackableHashTable<long,BodyPart>* this, void** arg2, uint32_t arg3)

0058f5f0  {
0058f5fe      if (arg3 < 4)
0058f607          return 0;
0058f607      
0058f60c      void** edi = arg2;
0058f610      void* eax_1 = *(uint32_t*)edi;
0058f618      uint32_t var_44 = arg3;
0058f61c      PackableHashTable<long,BodyPart>::EmptyContents(this);
0058f621      class PackableHashData<long,BodyPart>** _buckets = this->_buckets;
0058f621      
0058f628      if (_buckets != 0)
0058f628      {
0058f62b          operator delete[](_buckets);
0058f633          this->_buckets = nullptr;
0058f628      }
0058f628      
0058f636      this->_table_size = 0;
0058f639      void* ecx_1 = *(uint32_t*)edi;
0058f63b      int32_t eax_2 = *(uint32_t*)ecx_1;
0058f640      *(uint32_t*)edi = ((char*)ecx_1 + 4);
0058f644      uint32_t ecx_4 = (eax_2 >> 0x10);
0058f647      int32_t eax_3 = (eax_2 & 0xffff);
0058f64c      int32_t ebx_1 = (arg3 - 4);
0058f651      this->_table_size = ecx_4;
0058f651      
0058f656      if (ecx_4 == 0)
0058f656      {
0058f65f          int32_t result;
0058f65f          result = eax_3 == 0;
0058f666          return result;
0058f656      }
0058f656      
0058f67b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
0058f67b      {
0058f694          int32_t var_40;
0058f694          BodyPart::BodyPart(&var_40);
0058f69b          arg3 = 0;
0058f6a3          int32_t* ecx_10;
0058f6a3          
0058f6a3          if (eax_3 <= 0)
0058f6a3          {
0058f6ff          label_58f6ff:
0058f6ff              ecx_10 = &var_40;
0058f6ff              
0058f703              if (var_44 >= (*(uint32_t*)edi - eax_1))
0058f703              {
0058f705                  BodyPart::~BodyPart(ecx_10);
0058f716                  return 1;
0058f703              }
0058f6a3          }
0058f6a3          else
0058f6a3          {
0058f6a8              while (true)
0058f6a8              {
0058f6a8                  if (ebx_1 >= 4)
0058f6a8                  {
0058f6aa                      int32_t* eax_5 = *(uint32_t*)edi;
0058f6ae                      int32_t edx_1 = var_40;
0058f6b3                      arg2 = *(uint32_t*)eax_5;
0058f6bf                      *(uint32_t*)edi = &eax_5[1];
0058f6bf                      
0058f6c6                      if ((*(uint32_t*)(edx_1 + 0x10)(edi, ebx_1) != 0 && (PackableHashTable<long,BodyPart>::add(this, &arg2, &var_40) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
0058f6c6                      {
0058f6e9                          bool cond:5_1 = (arg3 + 1) < eax_3;
0058f6eb                          arg3 += 1;
0058f6eb                          
0058f6ef                          if (!(cond:5_1))
0058f6ef                              goto label_58f6ff;
0058f6ef                          
0058f6ef                          continue;
0058f6c6                      }
0058f6a8                  }
0058f6a8                  
0058f719                  ecx_10 = &var_40;
0058f719                  break;
0058f6a8              }
0058f6a3          }
0058f6a3          
0058f71d          BodyPart::~BodyPart(ecx_10);
0058f67b      }
0058f67b      
0058f72b      return 0;
0058f5f0  }

0058f72e                                            90 90                                                                ..

0058f730  void* __thiscall PackableHashTable<long,BodyPart>::`scalar deleting destructor'(class PackableHashTable<long,BodyPart>* this, uint32_t arg2)

0058f730  {
0058f733      this->vtable = 0x7e43a8;
0058f739      PackableHashTable<long,BodyPart>::EmptyContents(this);
0058f73e      class PackableHashData<long,BodyPart>** _buckets = this->_buckets;
0058f73e      
0058f743      if (_buckets != 0)
0058f743      {
0058f746          operator delete[](_buckets);
0058f74e          this->_buckets = nullptr;
0058f743      }
0058f743      
0058f75a      this->_table_size = 0;
0058f761      this->vtable = 0x79285c;
0058f761      
0058f767      if ((arg2 & 1) != 0)
0058f76a          operator delete(this);
0058f76a      
0058f775      return this;
0058f730  }

0058f778                                                                          90 90 90 90 90 90 90 90                          ........

0058f780  void __fastcall Body::Body(class Body* this)

0058f780  {
0058f786      this->vtable = 0x7e43d0;
0058f783      this->_body_part_table.vtable = 0x7e43a8;
0058f783      this->_body_part_table.m_fThrowawayDuplicateKeysOnUnPack = 0;
0058f783      this->_body_part_table._buckets = nullptr;
0058f783      this->_body_part_table._table_size = 0x20;
0058f783      this->_body_part_table._currNum = 0;
0058f7a4      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_body_part_table);
0058f780  }

0058f7ad                                         90 90 90                                                               ...

0058f7b0  void __fastcall PackableList<CreationProfile>::Flush(class PackableList<CreationProfile>* this)

0058f7b0  {
0058f7bb      void var_1c;
0058f7bb      CreationProfile::CreationProfile(&var_1c);
0058f7bb      
0058f7c7      while (this->head != 0)
0058f7c7      {
0058f7d0          class PackableLLNode<CreationProfile>* head = this->head;
0058f7d0          
0058f7d5          if (head != 0)
0058f7d5          {
0058f7d7              class PackableLLNode<CreationProfile>* next = head->next;
0058f7dc              this->head = next;
0058f7dc              
0058f7df              if (next == 0)
0058f7e6                  this->tail = nullptr;
0058f7df              else
0058f7e1                  next->prev = nullptr;
0058f7e1              
0058f7ee              CreationProfile::operator=(&var_1c, head);
0058f7ee              
0058f7f5              if (head != 0)
0058f7f5              {
0058f7f8                  head->data.vtable = 0x79285c;
0058f7fe                  operator delete(head);
0058f7f5              }
0058f7f5              
0058f806              this->curNum -= 1;
0058f7d5          }
0058f7c7      }
0058f7b0  }

0058f815                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0058f820  void* __thiscall Body::`scalar deleting destructor'(class Body* this, uint32_t arg2)

0058f820  {
0058f826      PackableHashTable<long,BodyPart>::~PackableHashTable<long,BodyPart>(&this->_body_part_table);
0058f830      this->vtable = 0x79285c;
0058f830      
0058f836      if ((arg2 & 1) != 0)
0058f839          operator delete(this);
0058f839      
0058f844      return this;
0058f820  }

0058f847                       90 90 90 90 90 90 90 90 90                                                         .........

0058f850  int32_t __thiscall CACQualities::InqPluralNameString(class CACQualities* this, class AC1Legacy::PStringBase<char>* arg2)

0058f850  {
0058f854      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0058f869      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0058f86d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
0058f86f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0058f874      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0058f87c      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0058f87c      
0058f891      if (CBaseQualities::InqString(&this->vtable, 0x14, &AC1Legacy::PStringBase<char>::s_NullBuffer_3) == 0)
0058f891      {
0058f925          int32_t eax_11 = CBaseQualities::InqString(&this->vtable, 1, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
0058f92c          void* eax_12;
0058f92c          
0058f92c          if (eax_11 != 0)
0058f92c          {
0058f92e              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058f932              uint32_t m_len = AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_len;
0058f93a              eax_12 = ((m_len + AC1Legacy::PStringBase<char>::s_NullBuffer_8) + 0x13);
0058f93a              
0058f93e              if ((m_len - 1) < m_len)
0058f940                  eax_12 = &&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_data[(m_len - 1)];
0058f92c          }
0058f92c          
0058f946          if ((eax_11 == 0 || eax_12 == 0))
0058f946          {
0058f951              AC1Legacy::PStringBase<char>::set(arg2, &gmVendorUI::`vftable'.RecvNotice_OpenVendor);
0058f956              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058f956              
0058f96c              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_9 != 0))
0058f96e                  AC1Legacy::PStringBase<char>::s_NullBuffer_9->vtable->__vecDelDtor(1);
0058f96e              
0058f97f              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
0058f981                  AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
0058f981              
0058f992              return 0;
0058f946          }
0058f946          
0058f995          eax_12 = *(uint8_t*)eax_12;
0058f995          
0058f9a3          if ((eax_12 == 0x73 || eax_12 == 0x78))
0058f9a3          {
0058f9db              AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, &data_7e3fe8));
0058f9e0              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0058f9e0              
0058f9f0              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_10->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_10 != 0))
0058f9f2                  AC1Legacy::PStringBase<char>::s_NullBuffer_10->vtable->__vecDelDtor(1);
0058f9a3          }
0058f9a3          else
0058f9a3          {
0058f9b8              AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, AC1Legacy::PStringBase<char>::PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, &data_794520));
0058f9c1              AC1Legacy::PStringBase<char>::~PStringBase<char>(&AC1Legacy::PStringBase<char>::s_NullBuffer_4);
0058f9a3          }
0058f9a3          
0058fa03          AC1Legacy::PStringBase<char>::operator=(arg2, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
0058fa08          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058fa08          
0058fa18          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_11->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_11 != 0))
0058fa1a              AC1Legacy::PStringBase<char>::s_NullBuffer_11->vtable->__vecDelDtor(1);
0058fa1a          
0058fa2b          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
0058fa2d              AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
0058f891      }
0058f891      else
0058f891      {
0058f89b          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
0058f89d          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058f89d          
0058f8a9          if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer_5)
0058f8a9          {
0058f8b7              if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
0058f8b9                  m_buffer->vtable->__vecDelDtor(1);
0058f8b9              
0058f8c1              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058f8c5              arg2->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
0058f8cb              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef);
0058f8cd              AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0058f8a9          }
0058f8a9          
0058f8df          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
0058f8e1              AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
0058f8e1          
0058f8f5          if (InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0)
0058f8f5          {
0058f8fb              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0058f8fb              
0058f901              if (AC1Legacy::PStringBase<char>::s_NullBuffer_7 != 0)
0058f907                  AC1Legacy::PStringBase<char>::s_NullBuffer_7->vtable->__vecDelDtor(1);
0058f8f5          }
0058f891      }
0058f891      
0058fa41      return 1;
0058f850  }

0058fa44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0058fa50  int32_t __thiscall PackableList<CreationProfile>::UnPack(class PackableList<CreationProfile>* this, void** arg2, uint32_t arg3)

0058fa50  {
0058fa56      PackableList<CreationProfile>::Flush(this);
0058fa56      
0058fa60      if (arg3 < 4)
0058fabc          return 0;
0058fabc      
0058fa67      void* eax = *(uint32_t*)arg2;
0058fa6b      int32_t edi = *(uint32_t*)eax;
0058fa74      *(uint32_t*)arg2 = ((char*)eax + 4);
0058fa76      int32_t var_1c;
0058fa76      CreationProfile::CreationProfile(&var_1c);
0058fa7b      int32_t esi = 0;
0058fa7b      
0058fa7f      if (edi > 0)
0058fa7f      {
0058faa5          do
0058faa5          {
0058fa94              if (*(uint32_t*)(var_1c + 0x10)(arg2, arg3) == 0)
0058fac8                  return 0;
0058fac8              
0058fa9d              PackableList<CreationProfile>::InsertTail(this, &var_1c);
0058faa2              esi += 1;
0058faa5          } while (esi < edi);
0058fa7f      }
0058fa7f      
0058fab3      return 1;
0058fa50  }

0058facb                                   90 90 90 90 90                                                             .....

0058fad0  void* __thiscall PackableList<CreationProfile>::`scalar deleting destructor'(class PackableList<CreationProfile>* this, uint32_t arg2)

0058fad0  {
0058fad3      this->vtable = 0x7e43bc;
0058fad9      PackableList<CreationProfile>::Flush(this);
0058fae3      this->vtable = 0x79285c;
0058fae3      
0058fae9      if ((arg2 & 1) != 0)
0058faec          operator delete(this);
0058faec      
0058faf7      return this;
0058fad0  }

0058fafa                                                                                90 90 90 90 90 90                            ......

0058fb00  void __thiscall PackableHashTable<unsigned long,long>::PackableHashTable<unsigned long,long>(class PackableHashTable<unsigned long,long>* this, uint32_t const arg2)

0058fb00  {
0058fb09      this->_table_size = arg2;
0058fb0e      this->vtable = 0x7cec44;
0058fb14      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
0058fb17      this->_buckets = nullptr;
0058fb1a      this->_currNum = 0;
0058fb1d      PackableHashTable<unsigned long,CContractTracker>::Init(this);
0058fb00  }

0058fb28                          90 90 90 90 90 90 90 90                                                          ........

0058fb30  int32_t __thiscall PackableHashTable<unsigned long,int>::remove(class PackableHashTable<unsigned long,int>* this, uint32_t const* arg2, int32_t* arg3)

0058fb30  {
0058fb36      uint32_t _table_size = this->_table_size;
0058fb36      
0058fb3b      if (_table_size != 0)
0058fb3b      {
0058fb3d          class PackableHashData<unsigned long,int>** _buckets = this->_buckets;
0058fb3d          
0058fb42          if (_buckets != 0)
0058fb42          {
0058fb48              uint32_t const esi_1 = *(uint32_t*)arg2;
0058fb51              int32_t* i_1 = nullptr;
0058fb51              
0058fb58              for (int32_t* i = _buckets[(COMBINE(0, esi_1) % _table_size)]; i != 0; i = i[2])
0058fb58              {
0058fb62                  if (*(uint32_t*)i == esi_1)
0058fb62                  {
0058fb7f                      *(uint32_t*)arg3 = i[1];
0058fb7f                      
0058fb81                      if (i_1 == 0)
0058fb93                          this->_buckets[(COMBINE(0, *(uint32_t*)arg2) % this->_table_size)] = i[2];
0058fb81                      else
0058fb86                          i_1[2] = i[2];
0058fb86                      
0058fb9d                      operator delete(i);
0058fbab                      this->_currNum -= 1;
0058fbb5                      return 1;
0058fb62                  }
0058fb62                  
0058fb64                  i_1 = i;
0058fb58              }
0058fb42          }
0058fb3b      }
0058fb3b      
0058fb73      return 0;
0058fb30  }

0058fbb8                                                                          90 90 90 90 90 90 90 90                          ........

0058fbc0  void __thiscall PackableHashTable<unsigned long,__int64>::PackableHashTable<unsigned long,__int64>(class PackableHashTable<unsigned long,__int64>* this, uint32_t const arg2)

0058fbc0  {
0058fbc9      this->_table_size = arg2;
0058fbce      this->vtable = 0x7e441c;
0058fbd4      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
0058fbd7      this->_buckets = nullptr;
0058fbda      this->_currNum = 0;
0058fbdd      PackableHashTable<unsigned long,CContractTracker>::Init(this);
0058fbc0  }

0058fbe8                          90 90 90 90 90 90 90 90                                                          ........

0058fbf0  int32_t __thiscall PackableHashTable<unsigned long,double>::remove(class PackableHashTable<unsigned long,double>* this, uint32_t const* arg2, double* arg3)

0058fbf0  {
0058fbf6      uint32_t _table_size = this->_table_size;
0058fbf6      
0058fbfb      if (_table_size != 0)
0058fbfb      {
0058fbfd          class PackableHashData<unsigned long,double>** _buckets = this->_buckets;
0058fbfd          
0058fc02          if (_buckets != 0)
0058fc02          {
0058fc08              uint32_t const esi_1 = *(uint32_t*)arg2;
0058fc11              int32_t* i_1 = nullptr;
0058fc11              
0058fc18              for (int32_t* i = _buckets[(COMBINE(0, esi_1) % _table_size)]; i != 0; i = i[4])
0058fc18              {
0058fc22                  if (*(uint32_t*)i == esi_1)
0058fc22                  {
0058fc3f                      *(uint32_t*)arg3 = i[2];
0058fc44                      *(uint32_t*)((char*)arg3 + 4) = i[3];
0058fc44                      
0058fc47                      if (i_1 == 0)
0058fc59                          this->_buckets[(COMBINE(0, *(uint32_t*)arg2) % this->_table_size)] = i[4];
0058fc47                      else
0058fc4c                          i_1[4] = i[4];
0058fc4c                      
0058fc63                      operator delete(i);
0058fc71                      this->_currNum -= 1;
0058fc7b                      return 1;
0058fc22                  }
0058fc22                  
0058fc24                  i_1 = i;
0058fc18              }
0058fc02          }
0058fbfb      }
0058fbfb      
0058fc33      return 0;
0058fbf0  }

0058fc7e                                                                                            90 90                                ..

0058fc80  void __thiscall PackableHashTable<unsigned long,int>::PackableHashTable<unsigned long,int>(class PackableHashTable<unsigned long,int>* this, uint32_t const arg2)

0058fc80  {
0058fc89      this->_table_size = arg2;
0058fc8e      this->vtable = 0x7e4430;
0058fc94      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
0058fc97      this->_buckets = nullptr;
0058fc9a      this->_currNum = 0;
0058fc9d      PackableHashTable<unsigned long,CContractTracker>::Init(this);
0058fc80  }

0058fca8                          90 90 90 90 90 90 90 90                                                          ........

0058fcb0  void __thiscall PackableHashTable<unsigned long,double>::PackableHashTable<unsigned long,double>(class PackableHashTable<unsigned long,double>* this, uint32_t const arg2)

0058fcb0  {
0058fcb9      this->_table_size = arg2;
0058fcbe      this->vtable = 0x7e4444;
0058fcc4      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
0058fcc7      this->_buckets = nullptr;
0058fcca      this->_currNum = 0;
0058fccd      PackableHashTable<unsigned long,CContractTracker>::Init(this);
0058fcb0  }

0058fcd8                                                                          90 90 90 90 90 90 90 90                          ........

0058fce0  double* __thiscall PackableHashTable<unsigned long,double>::lookup(class PackableHashTable<unsigned long,double> const* this, uint32_t const* arg2)

0058fce0  {
0058fce2      uint32_t _table_size = this->_table_size;
0058fce2      
0058fce7      if (_table_size != 0)
0058fce7      {
0058fce9          class PackableHashData<unsigned long,double>** _buckets = this->_buckets;
0058fce9          
0058fcee          if (_buckets != 0)
0058fcee          {
0058fcf4              uint32_t const ecx = *(uint32_t*)arg2;
0058fcf4              
0058fd01              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[4])
0058fd01              {
0058fd05                  if (ecx == *(uint32_t*)i)
0058fd1a                      return &i[2];
0058fd01              }
0058fcee          }
0058fce7      }
0058fce7      
0058fd12      return 0;
0058fce0  }

0058fd1d                                                                                         90 90 90                               ...

0058fd20  void __thiscall PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >::PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >(class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* this, uint32_t const arg2)

0058fd20  {
0058fd29      this->_table_size = arg2;
0058fd2e      this->vtable = 0x7e4458;
0058fd34      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
0058fd37      this->_buckets = nullptr;
0058fd3a      this->_currNum = 0;
0058fd3d      PackableHashTable<unsigned long,CContractTracker>::Init(this);
0058fd20  }

0058fd48                          90 90 90 90 90 90 90 90                                                          ........

0058fd50  void __thiscall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this, uint32_t const arg2)

0058fd50  {
0058fd59      this->_table_size = arg2;
0058fd5e      this->vtable = 0x7e446c;
0058fd64      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
0058fd67      this->_buckets = nullptr;
0058fd6a      this->_currNum = 0;
0058fd6d      PackableHashTable<unsigned long,CContractTracker>::Init(this);
0058fd50  }

0058fd78                                                                          90 90 90 90 90 90 90 90                          ........

0058fd80  void __thiscall PackableHashTable<unsigned long,Position>::PackableHashTable<unsigned long,Position>(class PackableHashTable<unsigned long,Position>* this, uint32_t const arg2)

0058fd80  {
0058fd89      this->_table_size = arg2;
0058fd8e      this->vtable = 0x7e4480;
0058fd94      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
0058fd97      this->_buckets = nullptr;
0058fd9a      this->_currNum = 0;
0058fd9d      PackableHashTable<unsigned long,CContractTracker>::Init(this);
0058fd80  }

0058fda8                          90 90 90 90 90 90 90 90                                                          ........

0058fdb0  class Position* __thiscall PackableHashTable<unsigned long,Position>::lookup(class PackableHashTable<unsigned long,Position> const* this, uint32_t const* arg2)

0058fdb0  {
0058fdb2      uint32_t _table_size = this->_table_size;
0058fdb2      
0058fdb7      if (_table_size != 0)
0058fdb7      {
0058fdb9          class PackableHashData<unsigned long,Position>** _buckets = this->_buckets;
0058fdb9          
0058fdbe          if (_buckets != 0)
0058fdbe          {
0058fdc4              uint32_t const ecx = *(uint32_t*)arg2;
0058fdc4              
0058fdd1              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[0x13])
0058fdd1              {
0058fdd5                  if (ecx == *(uint32_t*)i)
0058fdea                      return &i[1];
0058fdd1              }
0058fdbe          }
0058fdb7      }
0058fdb7      
0058fde2      return 0;
0058fdb0  }

0058fded                                         90 90 90                                                               ...

0058fdf0  int32_t __thiscall CBaseQualities::InqInt(class CBaseQualities const* this, uint32_t arg2, int32_t* arg3, int32_t arg4, int32_t arg5)

0058fdf0  {
0058fdf3      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
0058fdf3      
0058fdf8      if (_intStatsTable != 0)
0058fdf8      {
0058fdff          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_intStatsTable, &arg2);
0058fdff          
0058fe06          if (eax_1 != 0)
0058fe06          {
0058fe10              uint32_t* eax_3 = arg3;
0058fe14              *(uint32_t*)eax_3 = *(uint32_t*)eax_1;
0058fe14              
0058fe1c              if (arg4 == 0)
0058fe22                  this->vtable->EnchantInt(arg2, eax_3, arg5);
0058fe22              
0058fe36              return 1;
0058fe06          }
0058fdf8      }
0058fdf8      
0058fe0b      return 0;
0058fdf0  }

0058fe39                                                                             90 90 90 90 90 90 90                           .......

0058fe40  int32_t __thiscall CBaseQualities::InqInt64(class CBaseQualities const* this, uint32_t arg2, int64_t* arg3)

0058fe40  {
0058fe40      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
0058fe40      
0058fe45      if (_int64StatsTable != 0)
0058fe45      {
0058fe4c          double* eax_1 = PackableHashTable<unsigned long,double>::lookup(_int64StatsTable, &arg2);
0058fe4c          
0058fe53          if (eax_1 != 0)
0058fe53          {
0058fe60              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
0058fe65              *(uint32_t*)((char*)arg3 + 4) = *(uint32_t*)((char*)eax_1 + 4);
0058fe6d              return 1;
0058fe53          }
0058fe45      }
0058fe45      
0058fe57      return 0;
0058fe40  }


0058fe70  int32_t __thiscall CBaseQualities::InqBool(class CBaseQualities const* this, uint32_t arg2, int32_t* arg3)

0058fe70  {
0058fe70      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
0058fe70      
0058fe75      if (_boolStatsTable != 0)
0058fe75      {
0058fe7c          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_boolStatsTable, &arg2);
0058fe7c          
0058fe83          if (eax_1 != 0)
0058fe83          {
0058fe90              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
0058fe97              return 1;
0058fe83          }
0058fe75      }
0058fe75      
0058fe87      return 0;
0058fe70  }

0058fe9a                                                                                90 90 90 90 90 90                            ......

0058fea0  int32_t __thiscall CBaseQualities::InqFloat(class CBaseQualities const* this, uint32_t arg2, double* arg3, int32_t arg4)

0058fea0  {
0058fea3      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
0058fea3      
0058fea8      if (_floatStatsTable != 0)
0058fea8      {
0058feaf          double* eax_1 = PackableHashTable<unsigned long,double>::lookup(_floatStatsTable, &arg2);
0058feaf          
0058feb6          if (eax_1 != 0)
0058feb6          {
0058fec4              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
0058fec9              *(uint32_t*)((char*)arg3 + 4) = *(uint32_t*)((char*)eax_1 + 4);
0058fec9              
0058fed2              if (arg4 == 0)
0058fed8                  this->vtable->EnchantFloat(arg2, arg3);
0058fed8              
0058fee7              return 1;
0058feb6          }
0058fea8      }
0058fea8      
0058febb      return 0;
0058fea0  }

0058feea                                90 90 90 90 90 90                                                            ......

0058fef0  int32_t __thiscall CBaseQualities::InqDataID(class CBaseQualities const* this, uint32_t arg2, class IDClass<_tagDataID,32,0>* arg3)

0058fef0  {
0058fef0      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
0058fef0      
0058fef5      if (_didStatsTable != 0)
0058fef5      {
0058fefc          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_didStatsTable, &arg2);
0058fefc          
0058ff03          if (eax_1 != 0)
0058ff03          {
0058ff10              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
0058ff17              return 1;
0058ff03          }
0058fef5      }
0058fef5      
0058ff07      return 0;
0058fef0  }

0058ff1a                                                                                90 90 90 90 90 90                            ......

0058ff20  int32_t __thiscall CBaseQualities::InqInstanceID(class CBaseQualities const* this, uint32_t arg2, uint32_t* arg3)

0058ff20  {
0058ff20      class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
0058ff20      
0058ff25      if (_iidStatsTable != 0)
0058ff25      {
0058ff2c          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_iidStatsTable, &arg2);
0058ff2c          
0058ff33          if (eax_1 != 0)
0058ff33          {
0058ff40              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
0058ff47              return 1;
0058ff33          }
0058ff25      }
0058ff25      
0058ff37      return 0;
0058ff20  }

0058ff4a                                90 90 90 90 90 90                                                            ......

0058ff50  int32_t __thiscall CBaseQualities::InqPosition(class CBaseQualities const* this, uint32_t arg2, class Position* arg3)

0058ff50  {
0058ff50      class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
0058ff50      
0058ff55      if (_posStatsTable != 0)
0058ff55      {
0058ff5c          class Position* eax_1 = PackableHashTable<unsigned long,Position>::lookup(_posStatsTable, &arg2);
0058ff5c          
0058ff63          if (eax_1 != 0)
0058ff63          {
0058ff74              arg3->objcell_id = eax_1->objcell_id;
0058ff7b              Frame::operator=(&arg3->frame, &eax_1->frame);
0058ff85              return 1;
0058ff63          }
0058ff55      }
0058ff55      
0058ff67      return 0;
0058ff50  }

0058ff88                          90 90 90 90 90 90 90 90                                                          ........

0058ff90  uint32_t __thiscall PackableHashTable<unsigned long,__int64>::Pack(class PackableHashTable<unsigned long,__int64>* this, void** arg2, uint32_t arg3)

0058ff90  {
0058ff90      class PackableHashTable<unsigned long,__int64>* this_1 = this;
0058ff95      uint32_t result = PackableHashTable<unsigned long,double>::pack_size(this);
0058ffa0      uint32_t result_1 = result;
0058ffa0      
0058ffa4      if (arg3 >= result)
0058ffa4      {
0058ffb9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
0058ffbb          *(uint32_t*)arg2 += 4;
0058ffc1          int32_t i = 0;
0058ffc1          
0058ffc5          if (this->_table_size > 0)
0058ffc5          {
00590005              do
00590005              {
0058ffca                  int32_t* j = this->_buckets[i];
0058ffca                  
0058ffcf                  if (j != 0)
0058ffcf                  {
0058fff9                      do
0058fff9                      {
0058ffd4                          if (arg3 >= 4)
0058ffd4                          {
0058ffda                              **(uint32_t**)arg2 = *(uint32_t*)j;
0058ffdc                              *(uint32_t*)arg2 += 4;
0058ffd4                          }
0058ffd4                          
0058ffe2                          if (arg3 >= 8)
0058ffe2                          {
0058ffe7                              void* eax_1 = *(uint32_t*)arg2;
0058ffe9                              *(uint32_t*)eax_1 = j[2];
0058ffee                              *(uint32_t*)((char*)eax_1 + 4) = j[3];
0058fff1                              *(uint32_t*)arg2 += 8;
0058ffe2                          }
0058ffe2                          
0058fff4                          j = j[4];
0058fff9                      } while (j != 0);
0058fff9                      
0058fffb                      result = result_1;
0058ffcf                  }
0058ffcf                  
00590002                  i += 1;
00590005              } while (i < this->_table_size);
0058ffc5          }
0058ffa4      }
0058ffa4      
0059000c      return result;
0058ff90  }

0059000f                                               90                                                                 .

00590010  int32_t __thiscall PackableHashTable<unsigned long,__int64>::UnPack(class PackableHashTable<unsigned long,__int64>* this, void** arg2, uint32_t arg3)

00590010  {
0059001e      if (arg3 < 4)
00590027          return 0;
00590027      
0059002c      void** esi = arg2;
00590030      void* eax_1 = *(uint32_t*)esi;
00590038      uint32_t var_c = arg3;
0059003c      PackableHashTable<unsigned long,double>::Destroy(this);
00590041      void* ecx_1 = *(uint32_t*)esi;
00590043      int32_t eax_2 = *(uint32_t*)ecx_1;
00590048      *(uint32_t*)esi = ((char*)ecx_1 + 4);
0059004c      uint32_t ecx_4 = (eax_2 >> 0x10);
0059004f      int32_t eax_3 = (eax_2 & 0xffff);
00590054      int32_t edi_1 = (arg3 - 4);
00590059      this->_table_size = ecx_4;
00590059      
0059005e      if (ecx_4 == 0)
0059005e      {
00590067          int32_t result;
00590067          result = eax_3 == 0;
0059006e          return result;
0059005e      }
0059005e      
0059008b      if ((ecx_4 <= 0x10000 && eax_3 <= 0x10000))
0059008b      {
0059008f          int32_t eax_5 = PackableHashTable<unsigned long,CContractTracker>::Init(this);
0059008f          
00590096          if (eax_5 != 0)
00590096          {
0059009a              arg3 = 0;
0059009a              
005900a2              if (eax_3 <= 0)
0059010e                  return ((eax_5 - eax_5) + 1);
0059010e              
005900a7              while (true)
005900a7              {
005900a7                  if (edi_1 < 4)
00590082                      return 0;
00590082                  
005900a9                  int32_t* eax_6 = *(uint32_t*)esi;
005900b3                  arg2 = *(uint32_t*)eax_6;
005900b7                  *(uint32_t*)esi = &eax_6[1];
005900b7                  
005900b9                  if (edi_1 < 8)
00590082                      return 0;
00590082                  
005900bd                  int32_t ecx_7 = eax_6[2];
005900c3                  int32_t var_8 = eax_6[1];
005900cb                  *(uint32_t*)esi = &eax_6[3];
005900d2                  int32_t var_4_1 = ecx_7;
005900d2                  
005900e7                  if ((PackableHashTable<unsigned long,double>::add(this, &arg2, &var_8) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
00590082                      return 0;
00590082                  
005900ed                  eax_5 = (arg3 + 1);
005900f0                  arg3 = eax_5;
005900f0                  
005900f4                  if (eax_5 >= eax_3)
0059010e                      return ((eax_5 - eax_5) + 1);
005900a7              }
00590096          }
0059008b      }
0059008b      
00590082      return 0;
00590010  }

00590111                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00590120  void __fastcall PackableHashTable<unsigned long,double>::Destroy(class PackableHashTable<unsigned long,double>* this)

00590120  {
00590123      PackableHashTable<unsigned long,double>::EmptyContents(this);
00590128      class PackableHashData<unsigned long,double>** _buckets = this->_buckets;
00590128      
0059012d      if (_buckets != 0)
0059012d      {
00590130          operator delete[](_buckets);
00590138          this->_buckets = nullptr;
0059012d      }
0059012d      
0059013f      this->_table_size = 0;
00590120  }

00590148                          90 90 90 90 90 90 90 90                                                          ........

00590150  int32_t __thiscall PackableHashTable<unsigned long,unsigned long>::UnPack(class PackableHashTable<unsigned long,unsigned long>* this, void** arg2, uint32_t arg3)

00590150  {
0059015e      if (arg3 < 4)
00590167          return 0;
00590167      
0059016c      void** esi = arg2;
00590170      void* eax_1 = *(uint32_t*)esi;
00590178      uint32_t var_4 = arg3;
0059017c      PackableHashTable<unsigned long,unsigned long>::Destroy(this);
00590181      void* ecx_1 = *(uint32_t*)esi;
00590183      int32_t eax_2 = *(uint32_t*)ecx_1;
00590188      *(uint32_t*)esi = ((char*)ecx_1 + 4);
0059018c      uint32_t ecx_4 = (eax_2 >> 0x10);
0059018f      int32_t eax_3 = (eax_2 & 0xffff);
00590194      int32_t ebx_1 = (arg3 - 4);
00590199      this->_table_size = ecx_4;
00590199      
0059019e      if (ecx_4 == 0)
0059019e      {
005901a7          int32_t result;
005901a7          result = eax_3 == 0;
005901ae          return result;
0059019e      }
0059019e      
005901cb      if ((ecx_4 <= 0x10000 && eax_3 <= 0x10000))
005901cb      {
005901cf          int32_t eax_5 = PackableHashTable<unsigned long,CContractTracker>::Init(this);
005901cf          
005901d6          if (eax_5 != 0)
005901d6          {
005901da              arg3 = 0;
005901da              
005901e2              if (eax_3 <= 0)
00590242                  return ((eax_5 - eax_5) + 1);
00590242              
005901e7              while (true)
005901e7              {
005901e7                  if (ebx_1 < 4)
005901c2                      return 0;
005901c2                  
005901e9                  int32_t* eax_6 = *(uint32_t*)esi;
005901eb                  class IDClass<_tagDataID,32,0> ecx_6 = *(uint32_t*)eax_6;
005901f0                  *(uint32_t*)esi = &eax_6[1];
005901f2                  void** edx_1 = eax_6[1];
005901f7                  *(uint32_t*)esi = &eax_6[2];
005901f9                  class IDClass<_tagDataID,32,0> var_c = ecx_6;
00590209                  arg2 = edx_1;
00590209                  
0059021b                  if ((PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(this, &var_c, &arg2) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
005901c2                      return 0;
005901c2                  
00590221                  eax_5 = (arg3 + 1);
00590224                  arg3 = eax_5;
00590224                  
00590228                  if (eax_5 >= eax_3)
00590242                      return ((eax_5 - eax_5) + 1);
005901e7              }
005901d6          }
005901cb      }
005901cb      
005901c2      return 0;
00590150  }

00590245                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00590250  void __fastcall PackableHashTable<unsigned long,unsigned long>::Destroy(class PackableHashTable<unsigned long,unsigned long>* this)

00590250  {
00590253      PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(this);
00590258      class PackableHashData<unsigned long,unsigned long>** _buckets = this->_buckets;
00590258      
0059025d      if (_buckets != 0)
0059025d      {
00590260          operator delete[](_buckets);
00590268          this->_buckets = nullptr;
0059025d      }
0059025d      
0059026f      this->_table_size = 0;
00590250  }

00590278                                                                          90 90 90 90 90 90 90 90                          ........

00590280  int32_t __thiscall PackableHashTable<unsigned long,double>::add(class PackableHashTable<unsigned long,double>* this, uint32_t const* arg2, double const* arg3)

00590280  {
0059028a      uint32_t _table_size = this->_table_size;
0059028a      
0059028f      if (_table_size == 0)
0059028f      {
005902be      label_5902be:
005902be          void* eax_4 = operator new(0x18);
005902be          
005902ca          if (eax_4 != 0)
005902ca          {
005902cf              uint32_t _table_size_1 = this->_table_size;
005902d2              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
005902da              *(uint32_t*)((char*)eax_4 + 8) = *(uint32_t*)arg3;
005902e0              *(uint32_t*)((char*)eax_4 + 0xc) = *(uint32_t*)((char*)arg3 + 4);
005902e3              *(uint32_t*)((char*)eax_4 + 0x10) = 0;
005902ef              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size_1);
005902f2              *(uint32_t*)((char*)eax_4 + 0x14) = temp1_2;
005902fd              *(uint32_t*)((char*)eax_4 + 0x10) = this->_buckets[temp1_2];
00590300              this->_buckets[temp1_2] = eax_4;
00590306              this->_currNum += 1;
00590311              return 1;
005902ca          }
0059028f      }
0059028f      else
0059028f      {
00590291          class PackableHashData<unsigned long,double>** _buckets = this->_buckets;
00590291          
00590296          if (_buckets == 0)
00590296              goto label_5902be;
00590296          
00590298          uint32_t const i = *(uint32_t*)arg2;
005902a1          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
005902a1          
005902a6          if (edx_3 == 0)
005902a6              goto label_5902be;
005902a6          
005902aa          while (i != *(uint32_t*)edx_3)
005902aa          {
005902ac              edx_3 = edx_3[4];
005902ac              
005902b1              if (edx_3 == 0)
005902b1                  goto label_5902be;
005902aa          }
005902aa          
005902ba          if (edx_3 == 0xfffffff8)
005902ba              goto label_5902be;
0059028f      }
0059028f      
0059031a      return 0;
00590280  }

0059031d                                                                                         90 90 90                               ...

00590320  uint32_t __thiscall PackableHashTable<unsigned long,double>::Pack(class PackableHashTable<unsigned long,double>* this, void** arg2, uint32_t arg3)

00590320  {
00590320      class PackableHashTable<unsigned long,double>* this_1 = this;
00590325      uint32_t result = PackableHashTable<unsigned long,double>::pack_size(this);
00590330      uint32_t result_1 = result;
00590330      
00590334      if (arg3 >= result)
00590334      {
00590349          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
0059034b          *(uint32_t*)arg2 += 4;
00590351          int32_t i = 0;
00590351          
00590355          if (this->_table_size > 0)
00590355          {
0059038f              do
0059038f              {
0059035a                  int32_t* j = this->_buckets[i];
0059035a                  
0059035f                  if (j != 0)
0059035f                  {
00590383                      do
00590383                      {
00590364                          if (arg3 >= 4)
00590364                          {
0059036a                              **(uint32_t**)arg2 = *(uint32_t*)j;
0059036c                              *(uint32_t*)arg2 += 4;
00590364                          }
00590364                          
00590372                          if (arg3 >= 8)
00590372                          {
00590379                              **(uint64_t**)arg2 = ((double)((long double)*(uint64_t*)((char*)j + 8)));
0059037b                              *(uint32_t*)arg2 += 8;
00590372                          }
00590372                          
0059037e                          j = j[4];
00590383                      } while (j != 0);
00590383                      
00590385                      result = result_1;
0059035f                  }
0059035f                  
0059038c                  i += 1;
0059038f              } while (i < this->_table_size);
00590355          }
00590334      }
00590334      
00590396      return result;
00590320  }

00590399                                                                             90 90 90 90 90 90 90                           .......

005903a0  uint32_t __fastcall PackableHashTable<unsigned long,double>::pack_size(class PackableHashTable<unsigned long,double>* this)

005903a0  {
005903a0      uint32_t _table_size = this->_table_size;
005903a5      int32_t result = 4;
005903a5      
005903aa      if (_table_size > 0)
005903aa      {
005903ad          class PackableHashData<unsigned long,double>** _buckets = this->_buckets;
005903c4          uint32_t i;
005903c4          
005903c4          do
005903c4          {
005903b0              class PackableHashData<unsigned long,double>* _next = *(uint32_t*)_buckets;
005903b0              
005903b4              while (_next != 0)
005903b4              {
005903b6                  _next = _next->_next;
005903b9                  result += 0xc;
005903b4              }
005903b4              
005903c0              _buckets = &_buckets[1];
005903c3              i = _table_size;
005903c3              _table_size -= 1;
005903c4          } while (i != 1);
005903aa      }
005903aa      
005903c7      return result;
005903a0  }

005903c8                          90 90 90 90 90 90 90 90                                                          ........

005903d0  int32_t __thiscall PackableHashTable<unsigned long,double>::UnPack(class PackableHashTable<unsigned long,double>* this, void** arg2, uint32_t arg3)

005903d0  {
005903e4      if (arg3 >= 4)
005903e4      {
005903f4          void* eax_2 = *(uint32_t*)arg2;
00590400          PackableHashTable<unsigned long,double>::Destroy(this);
00590405          void* ecx_1 = *(uint32_t*)arg2;
00590407          int32_t eax_3 = *(uint32_t*)ecx_1;
0059040c          *(uint32_t*)arg2 = ((char*)ecx_1 + 4);
00590410          uint32_t result = (eax_3 >> 0x10);
00590413          int32_t eax_4 = (eax_3 & 0xffff);
0059041d          this->_table_size = result;
0059041d          
00590424          if (result == 0)
00590424          {
00590428              result = eax_4 == 0;
00590433              return result;
00590424          }
00590424          
00590443          if (((result <= 0x10000 && eax_4 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
00590443          {
00590456              int32_t var_24_1 = 0;
00590456              
0059045e              if (eax_4 <= 0)
005904d5                  return ((eax_4 - eax_4) + 1);
005904d5              
00590463              while (true)
00590463              {
00590463                  if ((arg3 - 4) < 4)
005903ee                      return 0;
005903ee                  
00590465                  void* eax_8 = *(uint32_t*)arg2;
0059046f                  uint32_t var_1c = *(uint32_t*)eax_8;
00590473                  *(uint32_t*)arg2 = ((char*)eax_8 + 4);
00590473                  
00590475                  if ((arg3 - 4) < 8)
005903ee                      return 0;
005903ee                  
0059047b                  int32_t ecx_5 = *(uint32_t*)((char*)eax_8 + 4);
0059047d                  int32_t edx_2 = *(uint32_t*)((char*)eax_8 + 8);
00590483                  *(uint32_t*)arg2 = ((char*)eax_8 + 0xc);
00590485                  int32_t var_10 = ecx_5;
00590495                  int32_t var_c_1 = edx_2;
00590495                  
005904a7                  if ((PackableHashTable<unsigned long,double>::add(this, &var_1c, &var_10) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
005903ee                      return 0;
005903ee                  
005904b5                  int32_t eax_7 = (var_24_1 + 1);
005904b8                  var_24_1 = eax_7;
005904b8                  
005904bc                  if (eax_7 >= eax_4)
005904d5                      return ((eax_7 - eax_7) + 1);
00590463              }
00590443          }
005903e4      }
005903e4      
005903ee      return 0;
005903d0  }

005904d8                                                                          90 90 90 90 90 90 90 90                          ........

005904e0  void __fastcall PackableHashTable<unsigned long,double>::EmptyContents(class PackableHashTable<unsigned long,double>* this)

005904e0  {
005904e9      if (this->_buckets != 0)
005904e9      {
005904ee          int32_t i = 0;
005904ee          
005904f2          if (this->_table_size > 0)
005904f2          {
00590522              do
00590522              {
005904f8                  void* j_1 = this->_buckets[i];
005904f8                  
005904fd                  if (j_1 != 0)
005904fd                  {
00590510                      void* j;
00590510                      
00590510                      do
00590510                      {
00590500                          j = *(uint32_t*)((char*)j_1 + 0x10);
00590504                          operator delete(j_1);
0059050e                          j_1 = j;
00590510                      } while (j != 0);
005904fd                  }
005904fd                  
00590512                  this->_buckets[i] = 0;
0059051f                  i += 1;
00590522              } while (i < this->_table_size);
005904f2          }
005904e9      }
005904e9      
00590525      this->_currNum = 0;
005904e0  }

0059052f                                               90                                                                 .

00590530  uint32_t __thiscall PackableHashTable<unsigned long,Position>::Pack(class PackableHashTable<unsigned long,Position>* this, void** arg2, uint32_t arg3)

00590530  {
00590530      class PackableHashTable<unsigned long,Position>* this_1 = this;
00590535      uint32_t result = PackableHashTable<unsigned long,Position>::pack_size(this);
0059053a      uint32_t ebx = arg3;
00590540      uint32_t result_1 = result;
00590540      
00590544      if (ebx >= result)
00590544      {
00590559          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
0059055b          *(uint32_t*)arg2 += 4;
00590561          uint32_t i = 0;
00590565          arg3 = 0;
00590565          
00590569          if (this->_table_size > 0)
00590569          {
005905b2              do
005905b2              {
00590573                  int32_t* j = this->_buckets[i];
00590573                  
00590578                  if (j != 0)
00590578                  {
0059059e                      do
0059059e                      {
00590583                          if (ebx >= 4)
00590583                          {
00590589                              **(uint32_t**)arg2 = *(uint32_t*)j;
0059058b                              *(uint32_t*)arg2 += 4;
00590583                          }
00590583                          
00590596                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
00590599                          j = j[0x13];
0059059e                      } while (j != 0);
0059059e                      
005905a0                      result = result_1;
005905a4                      i = arg3;
00590578                  }
00590578                  
005905ab                  i += 1;
005905ae                  arg3 = i;
005905b2              } while (i < this->_table_size);
00590569          }
00590544      }
00590544      
005905b9      return result;
00590530  }

0059056d                                         8d 49 00                                                               .I.
005905bc                                                                                      90 90 90 90                              ....

005905c0  uint32_t __fastcall PackableHashTable<unsigned long,Position>::pack_size(class PackableHashTable<unsigned long,Position>* this)

005905c0  {
005905c0      class PackableHashTable<unsigned long,Position>* this_1 = this;
005905c8      int32_t i = 0;
005905ca      bool cond:0 = this->_table_size <= 0;
005905cd      int32_t result = 4;
005905d2      this_1 = nullptr;
005905d2      
005905d6      if (!(cond:0))
005905d6      {
00590611          do
00590611          {
005905e3              void* j = this->_buckets[i];
005905e3              
005905e8              while (j != 0)
005905e8              {
005905fd                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
00590600                  j = *(uint32_t*)((char*)j + 0x4c);
00590605                  result = ((result + eax_2) + 4);
005905e8              }
005905e8              
0059060e              i += 1;
00590611          } while (i < this->_table_size);
005905d6      }
005905d6      
0059061a      return result;
005905c0  }

0059061b                                                                                   90 90 90 90 90                             .....

00590620  void* __thiscall PackableHashTable<unsigned long,__int64>::`scalar deleting destructor'(class PackableHashTable<unsigned long,__int64>* this, uint32_t arg2)

00590620  {
00590623      this->vtable = 0x7e441c;
00590629      PackableHashTable<unsigned long,double>::Destroy(this);
00590633      this->vtable = 0x79285c;
00590633      
00590639      if ((arg2 & 1) != 0)
0059063c          operator delete(this);
0059063c      
00590647      return this;
00590620  }

0059064a                                90 90 90 90 90 90                                                            ......

00590650  void* __thiscall PackableHashTable<unsigned long,int>::`scalar deleting destructor'(class PackableHashTable<unsigned long,int>* this, uint32_t arg2)

00590650  {
00590653      this->vtable = 0x7e4430;
00590659      PackableHashTable<unsigned long,unsigned long>::Destroy(this);
00590663      this->vtable = 0x79285c;
00590663      
00590669      if ((arg2 & 1) != 0)
0059066c          operator delete(this);
0059066c      
00590677      return this;
00590650  }

0059067a                                                                                90 90 90 90 90 90                            ......

00590680  void* __thiscall PackableHashTable<unsigned long,double>::`scalar deleting destructor'(class PackableHashTable<unsigned long,double>* this, uint32_t arg2)

00590680  {
00590683      this->vtable = 0x7e4444;
00590689      PackableHashTable<unsigned long,double>::Destroy(this);
00590693      this->vtable = 0x79285c;
00590693      
00590699      if ((arg2 & 1) != 0)
0059069c          operator delete(this);
0059069c      
005906a7      return this;
00590680  }

005906aa                                90 90 90 90 90 90                                                            ......

005906b0  void __thiscall PackableHashData<unsigned long,Position>::PackableHashData<unsigned long,Position>(class PackableHashData<unsigned long,Position>* this, uint32_t const* arg2, class Position const* arg3, int32_t arg4)

005906b0  {
005906b8      uint32_t* this_1 = this;
005906ba      *(uint32_t*)this_1 = *(uint32_t*)arg2;
005906c0      this_1[1] = 0x796910;
005906cd      this_1[2] = arg3->objcell_id;
005906d4      Frame::operator=(&this_1[3], &arg3->frame);
005906d9      this_1[0x13] = 0;
005906eb      this_1[0x14] = (COMBINE(0, *(uint32_t*)arg2) % arg4);
005906b0  }

005906f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00590700  int32_t __fastcall CBaseQualities::RemoveInt(class CBaseQualities* this, uint32_t arg2)

00590700  {
00590700      class CBaseQualities* this_1 = this;
00590701      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
0059070a      arg2 = arg2;
0059070a      
0059070e      if (_intStatsTable == 0)
00590726          return 0;
00590726      
00590720      return PackableHashTable<unsigned long,int>::remove(_intStatsTable, &arg2, &this_1);
00590700  }

00590729                             90 90 90 90 90 90 90                                                           .......

00590730  int32_t __fastcall CBaseQualities::SetInt(class CBaseQualities* this, uint32_t arg2, int32_t const arg3)

00590730  {
00590739      if (this->_intStatsTable == 0)
00590739      {
00590742          class PackableHashTable<unsigned long,long>* esi_1 = operator new(0x14);
00590742          
00590749          if (esi_1 == 0)
00590776              esi_1 = nullptr;
00590749          else
00590749          {
0059074d              esi_1->vtable = 0x7cec44;
00590753              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
0059075a              esi_1->_buckets = nullptr;
00590761              esi_1->_table_size = 0x40;
00590768              esi_1->_currNum = 0;
0059076f              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
00590749          }
00590749          
0059077a          this->_intStatsTable = esi_1;
0059077a          
0059077d          if (esi_1 == 0)
00590783              return 0;
00590739      }
00590739      
00590786      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
00590789      uint32_t _table_size = _intStatsTable->_table_size;
00590789      
0059078f      if (_table_size != 0)
0059078f      {
00590791          class PackableHashData<unsigned long,long>** _buckets = _intStatsTable->_buckets;
00590791          
00590796          if (_buckets != 0)
00590796          {
00590798              uint32_t i = arg2;
005907a2              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
005907a2              
005907a7              if (edx_3 != 0)
005907a7              {
005907b2                  while (i != *(uint32_t*)edx_3)
005907b2                  {
005907b4                      edx_3 = edx_3[2];
005907b4                      
005907b9                      if (edx_3 == 0)
005907cd                          return PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(_intStatsTable, &arg2, &arg3);
005907b2                  }
005907b2                  
005907d5                  if (edx_3 != 0xfffffffc)
005907d5                  {
005907d0                      edx_3[1] = arg3;
005907fa                      return 1;
005907d5                  }
005907a7              }
00590796          }
0059078f      }
0059078f      
005907e9      return PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(_intStatsTable, &arg2, &arg3);
00590730  }

005907fd                                                                                         90 90 90                               ...

00590800  int32_t __thiscall CBaseQualities::RemoveInt64(class CBaseQualities* this, uint32_t arg2)

00590800  {
00590803      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
0059080c      arg2 = arg2;
0059080c      
00590810      if (_int64StatsTable == 0)
0059082c          return 0;
0059082c      
00590824      void var_8;
00590824      return PackableHashTable<unsigned long,double>::remove(_int64StatsTable, &arg2, &var_8);
00590800  }

0059082f                                               90                                                                 .

00590830  int32_t __fastcall CBaseQualities::SetInt64(class CBaseQualities* this, uint32_t arg2, int64_t const arg3)

00590830  {
00590839      if (this->_int64StatsTable == 0)
00590839      {
00590842          class PackableHashTable<unsigned long,__int64>* esi_1 = operator new(0x14);
00590842          
00590849          if (esi_1 == 0)
00590876              esi_1 = nullptr;
00590849          else
00590849          {
0059084d              esi_1->vtable = 0x7e441c;
00590853              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
0059085a              esi_1->_buckets = nullptr;
00590861              esi_1->_table_size = 0x40;
00590868              esi_1->_currNum = 0;
0059086f              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
00590849          }
00590849          
0059087a          this->_int64StatsTable = esi_1;
0059087a          
0059087d          if (esi_1 == 0)
00590883              return 0;
00590839      }
00590839      
00590886      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
00590889      uint32_t _table_size = _int64StatsTable->_table_size;
00590889      
0059088f      if (_table_size != 0)
0059088f      {
00590891          class PackableHashData<unsigned long,__int64>** _buckets = _int64StatsTable->_buckets;
00590891          
00590896          if (_buckets != 0)
00590896          {
00590898              uint32_t i = arg2;
005908a2              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
005908a2              
005908a7              if (edx_3 != 0)
005908a7              {
005908b2                  while (i != *(uint32_t*)edx_3)
005908b2                  {
005908b4                      edx_3 = edx_3[4];
005908b4                      
005908b9                      if (edx_3 == 0)
005908cd                          return PackableHashTable<unsigned long,double>::add(_int64StatsTable, &arg2, &arg3);
005908b2                  }
005908b2                  
005908d5                  if (edx_3 != 0xfffffff8)
005908d5                  {
005908f0                      int32_t edx_4 = *(uint32_t*)((char*)arg3)[4];
005908d0                      edx_3[2] = arg3;
005908d0                      edx_3[3] = edx_4;
00590901                      return 1;
005908d5                  }
005908a7              }
00590896          }
0059088f      }
0059088f      
005908e9      return PackableHashTable<unsigned long,double>::add(_int64StatsTable, &arg2, &arg3);
00590830  }

00590904              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00590910  int32_t __fastcall CBaseQualities::RemoveBool(class CBaseQualities* this, uint32_t arg2)

00590910  {
00590910      class CBaseQualities* this_1 = this;
00590911      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
0059091a      arg2 = arg2;
0059091a      
0059091e      if (_boolStatsTable == 0)
00590936          return 0;
00590936      
00590930      return PackableHashTable<unsigned long,int>::remove(_boolStatsTable, &arg2, &this_1);
00590910  }

00590939                                                                             90 90 90 90 90 90 90                           .......

00590940  int32_t __fastcall CBaseQualities::SetBool(class CBaseQualities* this, uint32_t arg2, int32_t const arg3)

00590940  {
00590949      if (this->_boolStatsTable == 0)
00590949      {
00590952          class PackableHashTable<unsigned long,int>* esi_1 = operator new(0x14);
00590952          
00590959          if (esi_1 == 0)
00590986              esi_1 = nullptr;
00590959          else
00590959          {
0059095d              esi_1->vtable = 0x7e4430;
00590963              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
0059096a              esi_1->_buckets = nullptr;
00590971              esi_1->_table_size = 0x20;
00590978              esi_1->_currNum = 0;
0059097f              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
00590959          }
00590959          
0059098a          this->_boolStatsTable = esi_1;
0059098a          
0059098d          if (esi_1 == 0)
00590993              return 0;
00590949      }
00590949      
00590996      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
00590999      uint32_t _table_size = _boolStatsTable->_table_size;
00590999      
0059099f      if (_table_size != 0)
0059099f      {
005909a1          class PackableHashData<unsigned long,int>** _buckets = _boolStatsTable->_buckets;
005909a1          
005909a6          if (_buckets != 0)
005909a6          {
005909a8              uint32_t i = arg2;
005909b2              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
005909b2              
005909b7              if (edx_3 != 0)
005909b7              {
005909c2                  while (i != *(uint32_t*)edx_3)
005909c2                  {
005909c4                      edx_3 = edx_3[2];
005909c4                      
005909c9                      if (edx_3 == 0)
005909dd                          return PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(_boolStatsTable, &arg2, &arg3);
005909c2                  }
005909c2                  
005909e5                  if (edx_3 != 0xfffffffc)
005909e5                  {
005909e0                      edx_3[1] = arg3;
00590a0a                      return 1;
005909e5                  }
005909b7              }
005909a6          }
0059099f      }
0059099f      
005909f9      return PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(_boolStatsTable, &arg2, &arg3);
00590940  }

00590a0d                                         90 90 90                                                               ...

00590a10  int32_t __thiscall CBaseQualities::RemoveFloat(class CBaseQualities* this, uint32_t arg2)

00590a10  {
00590a13      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00590a1c      arg2 = arg2;
00590a1c      
00590a20      if (_floatStatsTable == 0)
00590a3c          return 0;
00590a3c      
00590a34      void var_8;
00590a34      return PackableHashTable<unsigned long,double>::remove(_floatStatsTable, &arg2, &var_8);
00590a10  }

00590a3f                                                                                               90                                 .

00590a40  int32_t __fastcall CBaseQualities::SetFloat(class CBaseQualities* this, uint32_t arg2, double const arg3)

00590a40  {
00590a49      if (this->_floatStatsTable == 0)
00590a49      {
00590a52          class PackableHashTable<unsigned long,double>* esi_1 = operator new(0x14);
00590a52          
00590a59          if (esi_1 == 0)
00590a86              esi_1 = nullptr;
00590a59          else
00590a59          {
00590a5d              esi_1->vtable = 0x7e4444;
00590a63              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
00590a6a              esi_1->_buckets = nullptr;
00590a71              esi_1->_table_size = 0x20;
00590a78              esi_1->_currNum = 0;
00590a7f              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
00590a59          }
00590a59          
00590a8a          this->_floatStatsTable = esi_1;
00590a8a          
00590a8d          if (esi_1 == 0)
00590a93              return 0;
00590a49      }
00590a49      
00590a96      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00590a99      uint32_t _table_size = _floatStatsTable->_table_size;
00590a99      
00590a9f      if (_table_size != 0)
00590a9f      {
00590aa1          class PackableHashData<unsigned long,double>** _buckets = _floatStatsTable->_buckets;
00590aa1          
00590aa6          if (_buckets != 0)
00590aa6          {
00590aa8              uint32_t i = arg2;
00590ab2              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00590ab2              
00590ab7              if (edx_3 != 0)
00590ab7              {
00590ac2                  while (i != *(uint32_t*)edx_3)
00590ac2                  {
00590ac4                      edx_3 = edx_3[4];
00590ac4                      
00590ac9                      if (edx_3 == 0)
00590add                          return PackableHashTable<unsigned long,double>::add(_floatStatsTable, &arg2, &arg3);
00590ac2                  }
00590ac2                  
00590ae5                  if (edx_3 != 0xfffffff8)
00590ae5                  {
00590b00                      int32_t edx_4 = *(uint32_t*)((char*)arg3)[4];
00590ae0                      edx_3[2] = arg3;
00590ae0                      edx_3[3] = edx_4;
00590b11                      return 1;
00590ae5                  }
00590ab7              }
00590aa6          }
00590a9f      }
00590a9f      
00590af9      return PackableHashTable<unsigned long,double>::add(_floatStatsTable, &arg2, &arg3);
00590a40  }

00590b14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00590b20  int32_t __fastcall CBaseQualities::SetDataID(class CBaseQualities* this, uint32_t arg2, class IDClass<_tagDataID,32,0> arg3)

00590b20  {
00590b29      if (this->_didStatsTable == 0)
00590b29      {
00590b32          class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* esi_1 = operator new(0x14);
00590b32          
00590b39          if (esi_1 == 0)
00590b66              esi_1 = nullptr;
00590b39          else
00590b39          {
00590b3d              esi_1->vtable = 0x7e4458;
00590b43              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
00590b4a              esi_1->_buckets = nullptr;
00590b51              esi_1->_table_size = 0x20;
00590b58              esi_1->_currNum = 0;
00590b5f              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
00590b39          }
00590b39          
00590b6a          this->_didStatsTable = esi_1;
00590b6a          
00590b6d          if (esi_1 == 0)
00590b73              return 0;
00590b29      }
00590b29      
00590b76      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
00590b79      uint32_t _table_size = _didStatsTable->_table_size;
00590b79      
00590b7f      if (_table_size != 0)
00590b7f      {
00590b81          class PackableHashData<unsigned long,IDClass<_tagDataID,32,0> >** _buckets = _didStatsTable->_buckets;
00590b81          
00590b86          if (_buckets != 0)
00590b86          {
00590b88              uint32_t i = arg2;
00590b92              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00590b92              
00590b97              if (edx_3 != 0)
00590b97              {
00590ba2                  while (i != *(uint32_t*)edx_3)
00590ba2                  {
00590ba4                      edx_3 = edx_3[2];
00590ba4                      
00590ba9                      if (edx_3 == 0)
00590bbd                          return PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(_didStatsTable, &arg2, &arg3);
00590ba2                  }
00590ba2                  
00590bc5                  if (edx_3 != 0xfffffffc)
00590bc5                  {
00590bc0                      edx_3[1] = arg3;
00590bea                      return 1;
00590bc5                  }
00590b97              }
00590b86          }
00590b7f      }
00590b7f      
00590bd9      return PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(_didStatsTable, &arg2, &arg3);
00590b20  }

00590bed                                         90 90 90                                                               ...

00590bf0  int32_t __fastcall CBaseQualities::RemoveInstanceID(class CBaseQualities* this, uint32_t arg2)

00590bf0  {
00590bf0      class CBaseQualities* this_1 = this;
00590bf1      class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
00590bfa      arg2 = arg2;
00590bfa      
00590bfe      if (_iidStatsTable == 0)
00590c16          return 0;
00590c16      
00590c10      return PackableHashTable<unsigned long,int>::remove(_iidStatsTable, &arg2, &this_1);
00590bf0  }

00590c19                                                                             90 90 90 90 90 90 90                           .......

00590c20  int32_t __fastcall CBaseQualities::SetInstanceID(class CBaseQualities* this, uint32_t arg2, uint32_t const arg3)

00590c20  {
00590c29      if (this->_iidStatsTable == 0)
00590c29      {
00590c32          class PackableHashTable<unsigned long,unsigned long>* esi_1 = operator new(0x14);
00590c32          
00590c39          if (esi_1 == 0)
00590c66              esi_1 = nullptr;
00590c39          else
00590c39          {
00590c3d              esi_1->vtable = 0x7c8ee0;
00590c43              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
00590c4a              esi_1->_buckets = nullptr;
00590c51              esi_1->_table_size = 0x20;
00590c58              esi_1->_currNum = 0;
00590c5f              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
00590c39          }
00590c39          
00590c6a          this->_iidStatsTable = esi_1;
00590c6a          
00590c6d          if (esi_1 == 0)
00590c73              return 0;
00590c29      }
00590c29      
00590c76      class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
00590c79      uint32_t _table_size = _iidStatsTable->_table_size;
00590c79      
00590c7f      if (_table_size != 0)
00590c7f      {
00590c81          class PackableHashData<unsigned long,unsigned long>** _buckets = _iidStatsTable->_buckets;
00590c81          
00590c86          if (_buckets != 0)
00590c86          {
00590c88              uint32_t i = arg2;
00590c92              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00590c92              
00590c97              if (edx_3 != 0)
00590c97              {
00590ca2                  while (i != *(uint32_t*)edx_3)
00590ca2                  {
00590ca4                      edx_3 = edx_3[2];
00590ca4                      
00590ca9                      if (edx_3 == 0)
00590cbd                          return PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(_iidStatsTable, &arg2, &arg3);
00590ca2                  }
00590ca2                  
00590cc5                  if (edx_3 != 0xfffffffc)
00590cc5                  {
00590cc0                      edx_3[1] = arg3;
00590cea                      return 1;
00590cc5                  }
00590c97              }
00590c86          }
00590c7f      }
00590c7f      
00590cd9      return PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(_iidStatsTable, &arg2, &arg3);
00590c20  }

00590ced                                         90 90 90                                                               ...

00590cf0  int32_t __thiscall CBaseQualities::InqString(class CBaseQualities const* this, uint32_t arg2, class AC1Legacy::PStringBase<char>* arg3)

00590cf0  {
00590cf0      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
00590cf0      
00590cf6      if (_strStatsTable != 0)
00590cf6      {
00590cfd          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_strStatsTable, &arg2);
00590cfd          
00590d06          if (eax_1 != 0)
00590d06          {
00590d11              uint32_t* ebx = arg3;
00590d16              uint32_t esi = *(uint32_t*)ebx;
00590d16              
00590d1a              if (esi != *(uint32_t*)eax_1)
00590d1a              {
00590d2c                  if ((InterlockedDecrement((esi + 4)) == 0 && esi != 0))
00590d34                      **(uint32_t**)esi(1);
00590d34                  
00590d36                  uint32_t edi_2 = *(uint32_t*)eax_1;
00590d38                  *(uint32_t*)ebx = edi_2;
00590d3e                  InterlockedIncrement((edi_2 + 4));
00590d1a              }
00590d1a              
00590d4c              return 1;
00590d06          }
00590cf6      }
00590cf6      
00590d0b      return 0;
00590cf0  }

00590d4f                                               90                                                                 .

00590d50  uint32_t __thiscall PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >::Pack(class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* this, void** arg2, uint32_t arg3)

00590d50  {
00590d50      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* this_1 = this;
00590d5f      uint32_t result = PackableHashTable<IDClass<_tagDataID,32,0>,int>::pack_size(this);
00590d63      uint32_t result_1 = result;
00590d63      
00590d67      if (arg3 >= result)
00590d67      {
00590d7a          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
00590d7f          void* esi_2 = (*(uint32_t*)arg2 + 4);
00590d82          *(uint32_t*)arg2 = esi_2;
00590d87          int32_t i = 0;
00590d87          
00590d8b          if (this->_table_size > 0)
00590d8b          {
00590dd2              do
00590dd2              {
00590d93                  int32_t* j = this->_buckets[i];
00590d93                  
00590d98                  if (j != 0)
00590d98                  {
00590dc6                      do
00590dc6                      {
00590da3                          if (arg3 >= 4)
00590da3                          {
00590da7                              *(uint32_t*)esi_2 = *(uint32_t*)j;
00590dab                              esi_2 = (*(uint32_t*)arg2 + 4);
00590dae                              *(uint32_t*)arg2 = esi_2;
00590da3                          }
00590da3                          
00590db6                          if (arg3 >= 4)
00590db6                          {
00590db8                              *(uint32_t*)esi_2 = j[1];
00590dbc                              esi_2 = (*(uint32_t*)arg2 + 4);
00590dbf                              *(uint32_t*)arg2 = esi_2;
00590db6                          }
00590db6                          
00590dc1                          j = j[2];
00590dc6                      } while (j != 0);
00590dc6                      
00590dc8                      result = result_1;
00590d98                  }
00590d98                  
00590dcf                  i += 1;
00590dd2              } while (i < this->_table_size);
00590d8b          }
00590d67      }
00590d67      
00590ddb      return result;
00590d50  }

00590dde                                                                                            90 90                                ..

00590de0  int32_t __thiscall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::add(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this, uint32_t const* arg2, class AC1Legacy::PStringBase<char> const* arg3)

00590de0  {
00590dea      uint32_t _table_size_1 = this->_table_size;
00590dea      
00590def      if (_table_size_1 == 0)
00590def      {
00590e1e      label_590e1e:
00590e1e          void* eax_4 = operator new(0x10);
00590e1e          
00590e2a          if (eax_4 != 0)
00590e2a          {
00590e2f              uint32_t _table_size = this->_table_size;
00590e36              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
00590e38              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg3->m_buffer;
00590e3a              *(uint32_t*)((char*)eax_4 + 4) = m_buffer;
00590e41              InterlockedIncrement(&m_buffer->m_cRef);
00590e47              *(uint32_t*)((char*)eax_4 + 8) = 0;
00590e53              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
00590e55              *(uint32_t*)((char*)eax_4 + 0xc) = temp1_2;
00590e60              *(uint32_t*)((char*)eax_4 + 8) = this->_buckets[temp1_2];
00590e63              this->_buckets[temp1_2] = eax_4;
00590e69              this->_currNum += 1;
00590e75              return 1;
00590e2a          }
00590def      }
00590def      else
00590def      {
00590df1          class PackableHashData<unsigned long,AC1Legacy::PStringBase<char> >** _buckets = this->_buckets;
00590df1          
00590df6          if (_buckets == 0)
00590df6              goto label_590e1e;
00590df6          
00590df8          uint32_t const i = *(uint32_t*)arg2;
00590e01          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
00590e01          
00590e06          if (edx_3 == 0)
00590e06              goto label_590e1e;
00590e06          
00590e0a          while (i != *(uint32_t*)edx_3)
00590e0a          {
00590e0c              edx_3 = edx_3[2];
00590e0c              
00590e11              if (edx_3 == 0)
00590e11                  goto label_590e1e;
00590e0a          }
00590e0a          
00590e1a          if (edx_3 == 0xfffffffc)
00590e1a              goto label_590e1e;
00590def      }
00590def      
00590e7e      return 0;
00590de0  }

00590e81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00590e90  int32_t __thiscall PackableHashTable<unsigned long,Position>::add(class PackableHashTable<unsigned long,Position>* this, uint32_t const* arg2, class Position const* arg3)

00590e90  {
00590e9a      uint32_t _table_size = this->_table_size;
00590e9a      
00590e9f      if (_table_size == 0)
00590e9f      {
00590ece      label_590ece:
00590ece          void* eax_4 = operator new(0x54);
00590ece          
00590ed8          if (eax_4 != 0)
00590ed8          {
00590ee6              void* eax_5 = PackableHashData<unsigned long,Position>::PackableHashData<unsigned long,Position>(eax_4, arg2, arg3, this->_table_size);
00590ee6              
00590eed              if (eax_5 != 0)
00590eed              {
00590ef8                  int32_t ecx_2 = *(uint32_t*)((char*)eax_5 + 0x50);
00590f01                  *(uint32_t*)((char*)eax_5 + 0x4c) = this->_buckets[ecx_2];
00590f04                  this->_buckets[ecx_2] = eax_5;
00590f0f                  this->_currNum += 1;
00590f1a                  return 1;
00590eed              }
00590ed8          }
00590e9f      }
00590e9f      else
00590e9f      {
00590ea1          class PackableHashData<unsigned long,Position>** _buckets = this->_buckets;
00590ea1          
00590ea6          if (_buckets == 0)
00590ea6              goto label_590ece;
00590ea6          
00590ea8          uint32_t const i = *(uint32_t*)arg2;
00590eb1          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00590eb1          
00590eb6          if (edx_3 == 0)
00590eb6              goto label_590ece;
00590eb6          
00590eba          while (i != *(uint32_t*)edx_3)
00590eba          {
00590ebc              edx_3 = edx_3[0x13];
00590ebc              
00590ec1              if (edx_3 == 0)
00590ec1                  goto label_590ece;
00590eba          }
00590eba          
00590eca          if (edx_3 == 0xfffffffc)
00590eca              goto label_590ece;
00590e9f      }
00590e9f      
00590ef5      return 0;
00590e90  }

00590f1d                                                                                         90 90 90                               ...

00590f20  int32_t __thiscall PackableHashTable<unsigned long,Position>::remove(class PackableHashTable<unsigned long,Position>* this, uint32_t const* arg2, class Position* arg3)

00590f20  {
00590f26      uint32_t _table_size = this->_table_size;
00590f26      
00590f2b      if (_table_size != 0)
00590f2b      {
00590f2d          class PackableHashData<unsigned long,Position>** _buckets = this->_buckets;
00590f2d          
00590f32          if (_buckets != 0)
00590f32          {
00590f38              uint32_t const ecx = *(uint32_t*)arg2;
00590f41              int32_t* i_1 = nullptr;
00590f41              
00590f48              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[0x13])
00590f48              {
00590f52                  if (*(uint32_t*)i == ecx)
00590f52                  {
00590f70                      arg3->objcell_id = i[2];
00590f77                      Frame::operator=(&arg3->frame, &i[3]);
00590f77                      
00590f7e                      if (i_1 == 0)
00590f90                          this->_buckets[(COMBINE(0, *(uint32_t*)arg2) % this->_table_size)] = i[0x13];
00590f7e                      else
00590f83                          i_1[0x13] = i[0x13];
00590f83                      
00590f9a                      i[1] = 0x79285c;
00590fa1                      operator delete(i);
00590faf                      this->_currNum -= 1;
00590fb9                      return 1;
00590f52                  }
00590f52                  
00590f54                  i_1 = i;
00590f48              }
00590f32          }
00590f2b      }
00590f2b      
00590f63      return 0;
00590f20  }

00590fbc                                                                                      90 90 90 90                              ....

00590fc0  int32_t __thiscall CBaseQualities::SetString(class CBaseQualities* this, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3)

00590fc0  {
00590fc9      if (this->_strStatsTable == 0)
00590fc9      {
00590fd2          class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* esi_1 = operator new(0x14);
00590fd2          
00590fd9          if (esi_1 == 0)
00591006              esi_1 = nullptr;
00590fd9          else
00590fd9          {
00590fdd              esi_1->vtable = 0x7e446c;
00590fe3              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
00590fea              esi_1->_buckets = nullptr;
00590ff1              esi_1->_table_size = 0x10;
00590ff8              esi_1->_currNum = 0;
00590fff              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
00590fd9          }
00590fd9          
0059100a          this->_strStatsTable = esi_1;
0059100a          
0059100d          if (esi_1 == 0)
00591013              return 0;
00590fc9      }
00590fc9      
00591016      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
00591019      uint32_t _table_size = _strStatsTable->_table_size;
00591019      
0059101f      if (_table_size != 0)
0059101f      {
00591021          class PackableHashData<unsigned long,AC1Legacy::PStringBase<char> >** _buckets = _strStatsTable->_buckets;
00591021          
00591026          if (_buckets != 0)
00591026          {
00591028              uint32_t i = arg2;
00591032              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00591032              
00591037              if (edx_3 != 0)
00591037              {
00591042                  while (i != *(uint32_t*)edx_3)
00591042                  {
00591044                      edx_3 = edx_3[2];
00591044                      
00591049                      if (edx_3 == 0)
0059105d                          return PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::add(_strStatsTable, &arg2, arg3);
00591042                  }
00591042                  
00591065                  if (edx_3 != 0xfffffffc)
00591065                  {
00591083                      AC1Legacy::PStringBase<char>::operator=(&edx_3[1], arg3);
00591090                      return 1;
00591065                  }
00591037              }
00591026          }
0059101f      }
0059101f      
00591079      return PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::add(_strStatsTable, &arg2, arg3);
00590fc0  }

00591093                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005910a0  int32_t __thiscall CBaseQualities::SetPosition(class CBaseQualities* this, uint32_t arg2, class Position const* arg3)

005910a0  {
005910a9      if (this->_posStatsTable == 0)
005910a9      {
005910b2          class PackableHashTable<unsigned long,Position>* esi_1 = operator new(0x14);
005910b2          
005910b9          if (esi_1 == 0)
005910e6              esi_1 = nullptr;
005910b9          else
005910b9          {
005910bd              esi_1->vtable = 0x7e4480;
005910c3              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
005910ca              esi_1->_buckets = nullptr;
005910d1              esi_1->_table_size = 0x10;
005910d8              esi_1->_currNum = 0;
005910df              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
005910b9          }
005910b9          
005910ea          this->_posStatsTable = esi_1;
005910ea          
005910ed          if (esi_1 == 0)
005910f3              return 0;
005910a9      }
005910a9      
005910f6      class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
005910f9      uint32_t _table_size = _posStatsTable->_table_size;
005910f9      
005910ff      if (_table_size != 0)
005910ff      {
00591101          class PackableHashData<unsigned long,Position>** _buckets = _posStatsTable->_buckets;
00591101          
00591106          if (_buckets != 0)
00591106          {
00591108              uint32_t i = arg2;
00591112              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00591112              
00591117              if (edx_3 != 0)
00591117              {
00591122                  while (i != *(uint32_t*)edx_3)
00591122                  {
00591124                      edx_3 = edx_3[0x13];
00591124                      
00591129                      if (edx_3 == 0)
0059113d                          return PackableHashTable<unsigned long,Position>::add(_posStatsTable, &arg2, arg3);
00591122                  }
00591122                  
00591145                  if (edx_3 != 0xfffffffc)
00591145                  {
00591140                      edx_3[2] = arg3->objcell_id;
0059116d                      Frame::operator=(&edx_3[3], &arg3->frame);
0059117a                      return 1;
00591145                  }
00591117              }
00591106          }
005910ff      }
005910ff      
00591159      return PackableHashTable<unsigned long,Position>::add(_posStatsTable, &arg2, arg3);
005910a0  }

0059117d                                                                                         90 90 90                               ...

00591180  int32_t __thiscall PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >::UnPack(class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* this, void** arg2, uint32_t arg3)

00591180  {
0059118e      if (arg3 < 4)
00591197          return 0;
00591197      
0059119c      void** esi = arg2;
005911a0      void* eax_1 = *(uint32_t*)esi;
005911a8      uint32_t var_4 = arg3;
005911ac      PackableHashTable<unsigned long,unsigned long>::Destroy(this);
005911b1      void* ecx_1 = *(uint32_t*)esi;
005911b3      int32_t eax_2 = *(uint32_t*)ecx_1;
005911b8      *(uint32_t*)esi = ((char*)ecx_1 + 4);
005911bc      uint32_t ecx_4 = (eax_2 >> 0x10);
005911bf      int32_t eax_3 = (eax_2 & 0xffff);
005911c4      int32_t ebx_1 = (arg3 - 4);
005911c9      this->_table_size = ecx_4;
005911c9      
005911ce      if (ecx_4 == 0)
005911ce      {
005911d7          int32_t result;
005911d7          result = eax_3 == 0;
005911de          return result;
005911ce      }
005911ce      
005911fb      if ((ecx_4 <= 0x10000 && eax_3 <= 0x10000))
005911fb      {
005911ff          int32_t eax_5 = PackableHashTable<unsigned long,CContractTracker>::Init(this);
005911ff          
00591206          if (eax_5 != 0)
00591206          {
0059120a              arg3 = 0;
0059120a              
00591212              if (eax_3 <= 0)
00591272                  return ((eax_5 - eax_5) + 1);
00591272              
00591217              while (true)
00591217              {
00591217                  if (ebx_1 < 4)
005911f2                      return 0;
005911f2                  
00591219                  int32_t* eax_6 = *(uint32_t*)esi;
0059121b                  class IDClass<_tagDataID,32,0> ecx_6 = *(uint32_t*)eax_6;
00591220                  *(uint32_t*)esi = &eax_6[1];
00591222                  class IDClass<_tagDataID,32,0> var_c = ecx_6;
00591226                  void** ecx_7 = eax_6[1];
0059122f                  *(uint32_t*)esi = &eax_6[2];
00591236                  arg2 = ecx_7;
00591236                  
0059124b                  if ((PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(this, &var_c, &arg2) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
005911f2                      return 0;
005911f2                  
00591251                  eax_5 = (arg3 + 1);
00591254                  arg3 = eax_5;
00591254                  
00591258                  if (eax_5 >= eax_3)
00591272                      return ((eax_5 - eax_5) + 1);
00591217              }
00591206          }
005911fb      }
005911fb      
005911f2      return 0;
00591180  }

00591275                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00591280  int32_t __thiscall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::remove(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this, uint32_t const* arg2, class AC1Legacy::PStringBase<char>* arg3)

00591280  {
00591285      uint32_t _table_size = this->_table_size;
00591285      
0059128a      if (_table_size != 0)
0059128a      {
0059128c          class PackableHashData<unsigned long,AC1Legacy::PStringBase<char> >** _buckets = this->_buckets;
0059128c          
00591291          if (_buckets != 0)
00591291          {
00591297              uint32_t const ecx = *(uint32_t*)arg2;
0059129f              int32_t* i_1 = nullptr;
0059129f              
005912a6              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[2])
005912a6              {
005912aa                  if (*(uint32_t*)i == ecx)
005912aa                  {
005912c6                      AC1Legacy::PStringBase<char>::operator=(arg3, &i[1]);
005912cd                      int32_t ecx_2 = i[2];
005912cd                      
005912d0                      if (i_1 == 0)
005912e2                          this->_buckets[(COMBINE(0, *(uint32_t*)arg2) % this->_table_size)] = ecx_2;
005912d0                      else
005912d2                          i_1[2] = ecx_2;
005912d2                      
005912e8                      int32_t* edi = i[1];
005912e8                      
005912fb                      if ((InterlockedDecrement(&edi[1]) == 0 && edi != 0))
00591303                          **(uint32_t**)edi(1);
00591303                      
00591306                      operator delete(i);
00591313                      this->_currNum -= 1;
0059131d                      return 1;
005912aa                  }
005912aa                  
005912ac                  i_1 = i;
005912a6              }
00591291          }
0059128a      }
0059128a      
005912ba      return 0;
00591280  }


00591320  int32_t __thiscall PackableHashTable<unsigned long,Position>::UnPack(class PackableHashTable<unsigned long,Position>* this, void** arg2, uint32_t arg3)

00591320  {
0059132e      if (arg3 < 4)
00591337          return 0;
00591337      
0059133c      void** esi = arg2;
00591340      void* eax_1 = *(uint32_t*)esi;
00591348      uint32_t var_4c = arg3;
0059134c      PackableHashTable<unsigned long,Position>::Destroy(this);
00591351      void* ecx_1 = *(uint32_t*)esi;
00591353      int32_t eax_2 = *(uint32_t*)ecx_1;
00591358      *(uint32_t*)esi = ((char*)ecx_1 + 4);
0059135c      uint32_t ecx_4 = (eax_2 >> 0x10);
0059135f      int32_t eax_3 = (eax_2 & 0xffff);
00591364      int32_t edi_1 = (arg3 - 4);
00591369      this->_table_size = ecx_4;
00591369      
0059136e      if (ecx_4 == 0)
0059136e      {
00591377          int32_t result;
00591377          result = eax_3 == 0;
0059137e          return result;
0059136e      }
0059136e      
0059139b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
0059139b      {
005913ac          int32_t var_48;
005913ac          uint32_t eax_6;
005913ac          int32_t ecx_7;
005913ac          eax_6 = Position::Position(&var_48);
005913b3          arg3 = 0;
005913b3          
005913bb          if (eax_3 <= 0)
00591424              return ((eax_6 - eax_6) + 1);
00591424          
005913c3          while (true)
005913c3          {
005913c3              if (edi_1 < 4)
00591392                  return 0;
00591392              
005913c5              int32_t* eax_7 = *(uint32_t*)esi;
005913c9              int32_t edx_1 = var_48;
005913ce              arg2 = *(uint32_t*)eax_7;
005913da              *(uint32_t*)esi = &eax_7[1];
005913da              
005913e1              if (*(uint32_t*)(edx_1 + 0x10)(esi, edi_1) == 0)
00591392                  return 0;
00591392              
005913fd              if ((PackableHashTable<unsigned long,Position>::add(this, &arg2, &var_48) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
00591392                  return 0;
00591392              
00591403              eax_6 = (arg3 + 1);
00591406              arg3 = eax_6;
00591406              
0059140a              if (eax_6 >= eax_3)
00591424                  return ((eax_6 - eax_6) + 1);
005913c3          }
0059139b      }
0059139b      
00591392      return 0;
00591320  }

00591427                       90 90 90 90 90 90 90 90 90                                                         .........

00591430  void __fastcall PackableHashTable<unsigned long,Position>::Destroy(class PackableHashTable<unsigned long,Position>* this)

00591430  {
00591433      PackableHashTable<unsigned long,Position>::EmptyContents(this);
00591438      class PackableHashData<unsigned long,Position>** _buckets = this->_buckets;
00591438      
0059143d      if (_buckets != 0)
0059143d      {
00591440          operator delete[](_buckets);
00591448          this->_buckets = nullptr;
0059143d      }
0059143d      
0059144f      this->_table_size = 0;
00591430  }

00591458                                                                          90 90 90 90 90 90 90 90                          ........

00591460  void __fastcall PackableHashTable<unsigned long,Position>::EmptyContents(class PackableHashTable<unsigned long,Position>* this)

00591460  {
00591469      if (this->_buckets != 0)
00591469      {
0059146e          int32_t i = 0;
0059146e          
00591472          if (this->_table_size > 0)
00591472          {
005914a9              do
005914a9              {
00591478                  void* j_1 = this->_buckets[i];
00591478                  
0059147d                  if (j_1 != 0)
0059147d                  {
00591497                      void* j;
00591497                      
00591497                      do
00591497                      {
00591480                          j = *(uint32_t*)((char*)j_1 + 0x4c);
00591484                          *(uint32_t*)((char*)j_1 + 4) = 0x79285c;
0059148b                          operator delete(j_1);
00591495                          j_1 = j;
00591497                      } while (j != 0);
0059147d                  }
0059147d                  
00591499                  this->_buckets[i] = 0;
005914a6                  i += 1;
005914a9              } while (i < this->_table_size);
00591472          }
00591469      }
00591469      
005914ac      this->_currNum = 0;
00591460  }

005914b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005914c0  void* __thiscall PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >::`scalar deleting destructor'(class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* this, uint32_t arg2)

005914c0  {
005914c3      this->vtable = 0x7e4458;
005914c9      PackableHashTable<unsigned long,unsigned long>::Destroy(this);
005914d3      this->vtable = 0x79285c;
005914d3      
005914d9      if ((arg2 & 1) != 0)
005914dc          operator delete(this);
005914dc      
005914e7      return this;
005914c0  }

005914ea                                90 90 90 90 90 90                                                            ......

005914f0  void* __thiscall PackableHashTable<unsigned long,Position>::`scalar deleting destructor'(class PackableHashTable<unsigned long,Position>* this, uint32_t arg2)

005914f0  {
005914f3      this->vtable = 0x7e4480;
005914f9      PackableHashTable<unsigned long,Position>::Destroy(this);
00591503      this->vtable = 0x79285c;
00591503      
00591509      if ((arg2 & 1) != 0)
0059150c          operator delete(this);
0059150c      
00591517      return this;
005914f0  }

0059151a                                                                                90 90 90 90 90 90                            ......

00591520  int32_t __fastcall CBaseQualities::RemoveDataID(class CBaseQualities* this, uint32_t arg2)

00591520  {
00591520      class CBaseQualities* this_1 = this;
00591521      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
0059152a      arg2 = arg2;
0059152a      
0059152e      if (_didStatsTable == 0)
00591546          return 0;
00591546      
00591540      return PackableHashTable<unsigned long,int>::remove(_didStatsTable, &arg2, &this_1);
00591520  }

00591549                             90 90 90 90 90 90 90                                                           .......

00591550  int32_t __fastcall CBaseQualities::RemovePosition(class CBaseQualities* this, uint32_t arg2)

00591550  {
0059155a      int32_t var_48 = 0x796910;
00591562      int32_t var_44 = 0;
0059156a      int32_t var_40 = 0x3f800000;
00591572      int32_t var_3c = 0;
0059157a      int32_t var_38 = 0;
00591582      int32_t var_34 = 0;
0059158a      int32_t var_c = 0;
00591592      int32_t var_8 = 0;
0059159a      int32_t var_4 = 0;
005915a2      Frame::cache(&var_40);
005915a7      class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
005915b0      arg2 = arg2;
005915b0      
005915b5      if (_posStatsTable == 0)
005915d1          return 0;
005915d1      
005915c9      return PackableHashTable<unsigned long,Position>::remove(_posStatsTable, &arg2, &var_48);
00591550  }

005915d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005915e0  uint32_t __thiscall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::Pack(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this, void** arg2, uint32_t arg3)

005915e0  {
005915e0      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this_1 = this;
005915e5      uint32_t result = PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::pack_size(this);
005915ea      uint32_t ebp = arg3;
005915f0      uint32_t result_1 = result;
005915f0      
005915f4      if (ebp >= result)
005915f4      {
00591609          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
0059160b          *(uint32_t*)arg2 += 4;
00591611          uint32_t i = 0;
00591615          arg3 = 0;
00591615          
00591619          if (this->_table_size > 0)
00591619          {
00591661              do
00591661              {
00591623                  int32_t* j = this->_buckets[i];
00591623                  
00591628                  if (j != 0)
00591628                  {
0059164d                      do
0059164d                      {
00591633                          if (ebp >= 4)
00591633                          {
00591639                              **(uint32_t**)arg2 = *(uint32_t*)j;
0059163b                              *(uint32_t*)arg2 += 4;
00591633                          }
00591633                          
00591643                          AC1Legacy::PStringBase<char>::Pack(&j[1], arg2, ebp);
00591648                          j = j[2];
0059164d                      } while (j != 0);
0059164d                      
0059164f                      result = result_1;
00591653                      i = arg3;
00591628                  }
00591628                  
0059165a                  i += 1;
0059165d                  arg3 = i;
00591661              } while (i < this->_table_size);
00591619          }
005915f4      }
005915f4      
00591668      return result;
005915e0  }

0059161d                                                                                         8d 49 00                               .I.
0059166b                                   90 90 90 90 90                                                             .....

00591670  uint32_t __fastcall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::pack_size(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this)

00591670  {
00591670      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this_1 = this;
00591678      int32_t i = 0;
0059167a      bool cond:0 = this->_table_size <= 0;
0059167d      int32_t result = 4;
00591682      this_1 = nullptr;
00591682      
00591686      if (!(cond:0))
00591686      {
005916c0          do
005916c0          {
00591693              void* j = this->_buckets[i];
00591693              
00591698              while (j != 0)
00591698              {
005916aa                  uint32_t eax_2 = AC1Legacy::PStringBase<char>::Pack(((char*)j + 4), &this_1, 0);
005916af                  j = *(uint32_t*)((char*)j + 8);
005916b4                  result = ((result + eax_2) + 4);
00591698              }
00591698              
005916bd              i += 1;
005916c0          } while (i < this->_table_size);
00591686      }
00591686      
005916c9      return result;
00591670  }

005916ca                                90 90 90 90 90 90                                                            ......

005916d0  int32_t __thiscall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::UnPack(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this, void** arg2, uint32_t arg3)

005916d0  {
005916d5      uint32_t edi = arg3;
005916d5      
005916de      if (edi < 4)
005916e7          return 0;
005916e7      
005916ec      void** esi = arg2;
005916f0      void* eax_1 = *(uint32_t*)esi;
005916fc      PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::Destroy(this);
00591701      void* ecx_1 = *(uint32_t*)esi;
00591703      int32_t eax_2 = *(uint32_t*)ecx_1;
00591708      *(uint32_t*)esi = ((char*)ecx_1 + 4);
0059170c      uint32_t ecx_4 = (eax_2 >> 0x10);
0059170f      int32_t eax_3 = (eax_2 & 0xffff);
00591719      this->_table_size = ecx_4;
00591719      
0059171e      if (ecx_4 == 0)
0059171e      {
00591727          int32_t result;
00591727          result = eax_3 == 0;
0059172e          return result;
0059171e      }
0059171e      
00591743      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
00591743      {
0059175c          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3);
00591763          arg2 = nullptr;
0059176b          uint32_t* ecx_14;
0059176b          
0059176b          if (eax_3 <= 0)
0059176b          {
005917c8          label_5917c8:
005917c8              ecx_14 = &arg3;
005917c8              
005917cc              if (edi >= (*(uint32_t*)esi - eax_1))
005917cc              {
005917ce                  AC1Legacy::PStringBase<char>::~PStringBase<char>(ecx_14);
005917df                  return 1;
005917cc              }
0059176b          }
0059176b          else
0059176b          {
00591773              while (true)
00591773              {
00591773                  if ((edi - 4) >= 4)
00591773                  {
00591775                      int32_t* eax_5 = *(uint32_t*)esi;
0059177a                      uint32_t var_c = *(uint32_t*)eax_5;
00591786                      *(uint32_t*)esi = &eax_5[1];
00591786                      
0059178f                      if ((AC1Legacy::PStringBase<char>::UnPack(&arg3, esi, (edi - 4)) != 0 && (PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::add(this, &var_c, &arg3) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
0059178f                      {
005917b2                          bool cond:5_1 = ((char*)arg2 + 1) < eax_3;
005917b4                          arg2 += 1;
005917b4                          
005917b8                          if (!(cond:5_1))
005917b8                              goto label_5917c8;
005917b8                          
005917b8                          continue;
0059178f                      }
00591773                  }
00591773                  
005917e2                  ecx_14 = &arg3;
005917e2                  break;
00591773              }
0059176b          }
0059176b          
005917e6          AC1Legacy::PStringBase<char>::~PStringBase<char>(ecx_14);
00591743      }
00591743      
005917f4      return 0;
005916d0  }

005917f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00591800  void __fastcall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::Destroy(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this)

00591800  {
00591803      PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::EmptyContents(this);
00591808      class PackableHashData<unsigned long,AC1Legacy::PStringBase<char> >** _buckets = this->_buckets;
00591808      
0059180d      if (_buckets != 0)
0059180d      {
00591810          operator delete[](_buckets);
00591818          this->_buckets = nullptr;
0059180d      }
0059180d      
0059181f      this->_table_size = 0;
00591800  }

00591828                          90 90 90 90 90 90 90 90                                                          ........

00591830  void __fastcall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::EmptyContents(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this)

00591830  {
00591830      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* var_4 = this;
00591830      
00591839      if (this->_buckets != 0)
00591839      {
0059183e          class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* i = nullptr;
00591842          var_4 = nullptr;
00591842          
00591846          if (this->_table_size > 0)
00591846          {
00591848              void* j;
00591848              void* j_1 = j;
00591848              
005918a7              do
005918a7              {
00591853                  void* j_2 = this->_buckets[i];
00591853                  
00591858                  if (j_2 != 0)
00591858                  {
0059188d                      do
0059188d                      {
00591860                          int32_t* edi_1 = *(uint32_t*)((char*)j_2 + 4);
00591863                          j = *(uint32_t*)((char*)j_2 + 8);
00591863                          
00591876                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0059187e                              **(uint32_t**)edi_1(1);
0059187e                          
00591881                          operator delete(j_2);
0059188b                          j_2 = j;
0059188d                      } while (j != 0);
0059188d                      
0059188f                      i = var_4;
00591858                  }
00591858                  
00591893                  this->_buckets[i] = 0;
005918a0                  i = (&i->vtable + 1);
005918a3                  var_4 = i;
005918a7              } while (i < this->_table_size);
00591846          }
00591839      }
00591839      
005918ac      this->_currNum = 0;
00591830  }

0059184d                                         8d 49 00                                                               .I.
005918b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005918c0  void* __thiscall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::`scalar deleting destructor'(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* this, uint32_t arg2)

005918c0  {
005918c3      this->vtable = 0x7e446c;
005918c9      PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::Destroy(this);
005918d3      this->vtable = 0x79285c;
005918d3      
005918d9      if ((arg2 & 1) != 0)
005918dc          operator delete(this);
005918dc      
005918e7      return this;
005918c0  }

005918ea                                90 90 90 90 90 90                                                            ......

005918f0  int32_t __fastcall CBaseQualities::RemoveString(class CBaseQualities* this, uint32_t arg2)

005918f0  {
005918f0      class CBaseQualities* var_4 = this;
005918f2      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005918ff      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00591903      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0059190d      arg2 = arg2;
00591911      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
00591916      int32_t result;
00591916      
00591916      if (_strStatsTable == 0)
0059192f          result = 0;
00591916      else
00591916      {
00591922          int32_t result_1 = PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::remove(_strStatsTable, &arg2, &var_4);
00591927          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = var_4;
0059192b          result = result_1;
00591916      }
00591916      
00591941      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
00591943          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
00591943      
00591950      return result;
005918f0  }

00591953                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00591960  int32_t __thiscall SkillFormula::Calculate(class SkillFormula const* this, uint32_t arg2, uint32_t arg3, uint32_t* arg4)

00591960  {
00591960      uint32_t _z = this->_z;
00591960      
00591965      if (_z == 0)
00591967          return _z;
00591967      
0059197d      uint32_t edx_3 = (((this->_x * arg2) + (this->_y * arg3)) + this->_w);
00591986      long double x87_r7 = ((long double)edx_3);
00591986      
0059198a      if (edx_3 < 0)
0059198c          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
0059198c      
00591998      long double x87_r6 = ((long double)_z);
00591998      
0059199c      if (_z < 0)
0059199e          x87_r6 = (x87_r6 + ((long double)4.2949673e+09f));
0059199e      
005919b2      floor(((double)((x87_r7 / x87_r6) + ((long double)0.5f))));
005919c4      *(uint32_t*)arg4 = _ftol2();
005919cc      return 1;
00591960  }

005919cf                                               90                                                                 .

005919d0  int32_t __thiscall CACQualities::InqAttribute(class CACQualities const* this, uint32_t arg2, class Attribute* arg3)

005919d0  {
005919d0      class AttributeCache* _attribCache = this->_attribCache;
005919d0      
005919d5      if ((_attribCache != 0 && AttributeCache::InqAttribute(_attribCache, arg2, arg3) != 0))
005919f4          return 1;
005919f4      
005919ec      return 0;
005919d0  }

005919f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00591a00  int32_t __thiscall CACQualities::InqAttribute(class CACQualities const* this, uint32_t arg2, uint32_t* arg3, int32_t arg4)

00591a00  {
00591a03      class AttributeCache* _attribCache = this->_attribCache;
00591a03      
00591a0a      if ((_attribCache != 0 && AttributeCache::InqAttribute(_attribCache, arg2, arg3) != 0))
00591a0a      {
00591a2d          if (arg4 == 0)
00591a33              CACQualities::EnchantAttribute(this, arg2, arg3);
00591a33          
00591a40          return 1;
00591a0a      }
00591a0a      
00591a24      return 0;
00591a00  }

00591a43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00591a50  int32_t __thiscall CACQualities::SetAttribute(class CACQualities* this, uint32_t arg2, class Attribute const* arg3)

00591a50  {
00591a58      if (this->_attribCache == 0)
00591a58      {
00591a5c          void* eax_1 = operator new(0x28);
00591a66          class AttributeCache* result;
00591a66          
00591a66          if (eax_1 == 0)
00591a71              result = nullptr;
00591a66          else
00591a6a              result = AttributeCache::AttributeCache(eax_1);
00591a6a          
00591a75          this->_attribCache = result;
00591a75          
00591a78          if (result == 0)
00591a7b              return result;
00591a58      }
00591a58      
00591a91      return AttributeCache::SetAttribute(this->_attribCache, arg2, arg3);
00591a50  }

00591a94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00591aa0  int32_t __thiscall CACQualities::SetAttribute(class CACQualities* this, uint32_t arg2, uint32_t arg3)

00591aa0  {
00591aa8      if (this->_attribCache == 0)
00591aa8      {
00591aac          void* eax_1 = operator new(0x28);
00591ab6          class AttributeCache* result;
00591ab6          
00591ab6          if (eax_1 == 0)
00591ac1              result = nullptr;
00591ab6          else
00591aba              result = AttributeCache::AttributeCache(eax_1);
00591aba          
00591ac5          this->_attribCache = result;
00591ac5          
00591ac8          if (result == 0)
00591acb              return result;
00591aa8      }
00591aa8      
00591ae1      return AttributeCache::SetAttribute(this->_attribCache, arg2, arg3);
00591aa0  }

00591ae4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00591af0  int32_t __thiscall CACQualities::InqAttribute2nd(class CACQualities const* this, uint32_t arg2, class SecondaryAttribute* arg3)

00591af0  {
00591af0      class AttributeCache* _attribCache = this->_attribCache;
00591af0      
00591af5      if ((_attribCache != 0 && AttributeCache::InqAttribute2nd(_attribCache, arg2, arg3) != 0))
00591b14          return 1;
00591b14      
00591b0c      return 0;
00591af0  }

00591b17                                                                       90 90 90 90 90 90 90 90 90                         .........

00591b20  int32_t __stdcall CACQualities::InqMaxRunRate(class CACQualities const* this @ ecx, float* arg2)

00591b20  {
00591b35      *(uint32_t*)arg2 = ((float)MovementSystem::GetRunRate(0f, 0x270f, 1f));
00591b3f      return 1;
00591b20  }

00591b42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00591b50  int32_t __fastcall CACQualities::CanJump(class CACQualities const* this, float arg2)

00591b50  {
00591b50      class CACQualities* this_1 = this;
00591b59      this_1 = nullptr;
00591b59      
00591b68      if (CACQualities::InqLoad(((char*)this - 0x38), &this_1) != 0)
00591b68      {
00591b6a          long double x87_r7_1 = ((long double)this_1);
00591b6e          long double temp1_1 = ((long double)2f);
00591b6e          (x87_r7_1 - temp1_1);
00591b74          int32_t eax;
00591b74          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00591b76          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00591b76          
00591b79          if (!(p_1))
00591b81              return 1;
00591b68      }
00591b68      
00591b87      return 0;
00591b50  }

00591b8a                                90 90 90 90 90 90                                                            ......

00591b90  int32_t __thiscall CACQualities::JumpStaminaCost(class CACQualities const* this, float arg2, int32_t* arg3)

00591b90  {
00591b9e      float var_c = 0f;
00591b9e      
00591bad      if (CACQualities::InqLoad(((char*)this - 0x38), &var_c) == 0)
00591c3e          return 0;
00591c3e      
00591bb4      int32_t edi = 0;
00591bc4      int32_t var_10 = 8;
00591bcc      CBaseQualities::InqInt(this, 0x86, &var_10, 0, 0);
00591bd1      int32_t eax_1 = var_10;
00591bdd      double var_8;
00591bdd      
00591bdd      if (((eax_1 == 4 || eax_1 == 0x40) && CBaseQualities::InqFloat(this, 0x91, &var_8, 0) != 0))
00591bdd      {
00591bfa          long double x87_r7_2 = (((long double)var_8) + ((long double)20.0));
00591c00          long double temp1_1 = ((long double)Timer::cur_time);
00591c00          (x87_r7_2 - temp1_1);
00591c06          int32_t eax_2;
00591c06          eax_2 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00591c06          
00591c0b          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
00591c0d              edi = 1;
00591bdd      }
00591bdd      
00591c2a      *(uint32_t*)arg3 = MovementSystem::JumpStaminaCost(arg2, var_c, edi);
00591c35      return 1;
00591b90  }

00591c41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00591c50  void __thiscall PackableHashTable<unsigned long,Skill>::PackableHashTable<unsigned long,Skill>(class PackableHashTable<unsigned long,Skill>* this, uint32_t const arg2)

00591c50  {
00591c59      this->_table_size = arg2;
00591c5e      this->vtable = 0x7e44cc;
00591c64      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
00591c67      this->_buckets = nullptr;
00591c6a      this->_currNum = 0;
00591c6d      PackableHashTable<unsigned long,CContractTracker>::Init(this);
00591c50  }

00591c78                                                                          90 90 90 90 90 90 90 90                          ........

00591c80  class Skill* __thiscall PackableHashTable<unsigned long,Skill>::lookup(class PackableHashTable<unsigned long,Skill> const* this, uint32_t const* arg2)

00591c80  {
00591c82      uint32_t _table_size = this->_table_size;
00591c82      
00591c87      if (_table_size != 0)
00591c87      {
00591c89          class PackableHashData<unsigned long,Skill>** _buckets = this->_buckets;
00591c89          
00591c8e          if (_buckets != 0)
00591c8e          {
00591c94              uint32_t const ecx = *(uint32_t*)arg2;
00591c94              
00591ca1              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[0xa])
00591ca1              {
00591ca5                  if (ecx == *(uint32_t*)i)
00591cba                      return &i[2];
00591ca1              }
00591c8e          }
00591c87      }
00591c87      
00591cb2      return 0;
00591c80  }

00591cbd                                                                                         90 90 90                               ...

00591cc0  void __thiscall PackableHashData<unsigned long,Skill>::PackableHashData<unsigned long,Skill>(class PackableHashData<unsigned long,Skill>* this, uint32_t const* arg2, class Skill const* arg3, int32_t arg4)

00591cc0  {
00591cc6      this->_key = *(uint32_t*)arg2;
00591ccc      this->_data.vtable = 0x7a7408;
00591cd7      this->_data._sac = arg3->_sac;
00591cdd      this->_data._pp = arg3->_pp;
00591ce3      this->_data._init_level = arg3->_init_level;
00591ce9      this->_data._level_from_pp = arg3->_level_from_pp;
00591cef      this->_data._resistance_of_last_check = arg3->_resistance_of_last_check;
00591cf5      this->_data._last_used_time = arg3->_last_used_time;
00591cfb      *(uint32_t*)((char*)this->_data._last_used_time)[4] = *(uint32_t*)((char*)arg3->_last_used_time)[4];
00591cfe      this->_next = nullptr;
00591d10      this->_hashVal = (COMBINE(0, *(uint32_t*)arg2) % arg4);
00591cc0  }

00591d16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00591d20  int32_t __thiscall CACQualities::InqAttribute2ndBaseLevel(class CACQualities const* this, uint32_t arg2, uint32_t* arg3, int32_t arg4)

00591d20  {
00591d24      int32_t __saved_esi = 0x10000003;
00591d29      int32_t __saved_ebx = 2;
00591d2b      int32_t __saved_ebp = 1;
00591d31      int32_t eax;
00591d31      int32_t edx;
00591d31      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
00591d31      
00591d3f      if (eax_1 == 0)
00591d47          return 0;
00591d47      
00591d50      void* __offset(DBObj, 0x78) esi_1;
00591d50      
00591d50      if (arg2 == 1)
00591d50      {
00591d66          esi_1 = ((char*)eax_1 + 0x38);
00591d69      label_591d69:
00591d69          
00591d6b          if (esi_1 != 0)
00591d6b          {
00591d7e              uint32_t var_4 = 0;
00591d82              uint32_t var_8 = 0;
00591d86              uint32_t eax_9 = *(int32_t*)((char*)ADJ(esi_1) + 0x90);
00591d8c              uint32_t ebx = *(int32_t*)((char*)ADJ(esi_1) + 0x94);
00591d8c              
00591d94              if (eax_9 != 0)
00591da1                  CACQualities::InqAttribute(this, eax_9, &var_4, arg4);
00591da1              
00591da8              if (ebx != 0)
00591db5                  CACQualities::InqAttribute(this, ebx, &var_8, arg4);
00591db5              
00591dcc              int32_t result = SkillFormula::Calculate(((char*)esi_1 + 4), var_4, var_8, arg3);
00591dd3              eax_1->vtable->Release();
00591de3              return result;
00591d6b          }
00591d50      }
00591d50      else
00591d50      {
00591d55          if (arg2 == 3)
00591d55          {
00591d61              esi_1 = ((char*)eax_1 + 0x58);
00591d64              goto label_591d69;
00591d55          }
00591d55          
00591d5a          if (arg2 == 5)
00591d5a          {
00591d5c              esi_1 = ((char*)eax_1 + 0x78);
00591d5f              goto label_591d69;
00591d5a          }
00591d50      }
00591d6d      eax_1->vtable->Release();
00591d7b      return 0;
00591d20  }

00591de6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00591df0  int32_t __thiscall CACQualities::InqSkill(class CACQualities const* this, uint32_t arg2, class Skill* arg3)

00591df0  {
00591df0      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
00591df0      
00591df5      if (_skillStatsTable != 0)
00591df5      {
00591dfc          class Skill* eax_1 = PackableHashTable<unsigned long,Skill>::lookup(_skillStatsTable, &arg2);
00591dfc          
00591e03          if (eax_1 != 0)
00591e03          {
00591e11              arg3->_sac = eax_1->_sac;
00591e17              arg3->_pp = eax_1->_pp;
00591e1d              arg3->_init_level = eax_1->_init_level;
00591e23              arg3->_level_from_pp = eax_1->_level_from_pp;
00591e29              arg3->_resistance_of_last_check = eax_1->_resistance_of_last_check;
00591e2f              arg3->_last_used_time = eax_1->_last_used_time;
00591e35              *(uint32_t*)((char*)arg3->_last_used_time)[4] = *(uint32_t*)((char*)eax_1->_last_used_time)[4];
00591e3d              return 1;
00591e03          }
00591df5      }
00591df5      
00591e07      return 0;
00591df0  }


00591e40  int32_t __thiscall CACQualities::InqSkillLevel(class CACQualities const* this, uint32_t arg2, int32_t* arg3)

00591e40  {
00591e40      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
00591e40      
00591e45      if (_skillStatsTable != 0)
00591e45      {
00591e4c          class Skill* eax_1 = PackableHashTable<unsigned long,Skill>::lookup(_skillStatsTable, &arg2);
00591e4c          
00591e53          if (eax_1 != 0)
00591e53          {
00591e66              *(uint32_t*)arg3 = (eax_1->_level_from_pp + eax_1->_init_level);
00591e6d              return 1;
00591e53          }
00591e45      }
00591e45      
00591e57      return 0;
00591e40  }


00591e70  int32_t __thiscall CACQualities::InqSkillAdvancementClass(class CACQualities const* this, uint32_t arg2, enum SKILL_ADVANCEMENT_CLASS* arg3)

00591e70  {
00591e70      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
00591e70      
00591e75      if (_skillStatsTable != 0)
00591e75      {
00591e7c          class Skill* eax_1 = PackableHashTable<unsigned long,Skill>::lookup(_skillStatsTable, &arg2);
00591e7c          
00591e83          if (eax_1 != 0)
00591e83          {
00591e91              *(uint32_t*)arg3 = eax_1->_sac;
00591e98              return 1;
00591e83          }
00591e75      }
00591e75      
00591e87      return 0;
00591e70  }

00591e9b                                                                                   90 90 90 90 90                             .....

00591ea0  int32_t __thiscall PackableHashTable<unsigned long,Skill>::add(class PackableHashTable<unsigned long,Skill>* this, uint32_t const* arg2, class Skill const* arg3)

00591ea0  {
00591eaa      uint32_t _table_size = this->_table_size;
00591eaa      
00591eaf      if (_table_size == 0)
00591eaf      {
00591ede      label_591ede:
00591ede          void* eax_4 = operator new(0x30);
00591ede          
00591ee8          if (eax_4 != 0)
00591ee8          {
00591ef6              void* eax_5 = PackableHashData<unsigned long,Skill>::PackableHashData<unsigned long,Skill>(eax_4, arg2, arg3, this->_table_size);
00591ef6              
00591efd              if (eax_5 != 0)
00591efd              {
00591f08                  int32_t ecx_2 = *(uint32_t*)((char*)eax_5 + 0x2c);
00591f11                  *(uint32_t*)((char*)eax_5 + 0x28) = this->_buckets[ecx_2];
00591f14                  this->_buckets[ecx_2] = eax_5;
00591f1f                  this->_currNum += 1;
00591f2a                  return 1;
00591efd              }
00591ee8          }
00591eaf      }
00591eaf      else
00591eaf      {
00591eb1          class PackableHashData<unsigned long,Skill>** _buckets = this->_buckets;
00591eb1          
00591eb6          if (_buckets == 0)
00591eb6              goto label_591ede;
00591eb6          
00591eb8          uint32_t const i = *(uint32_t*)arg2;
00591ec1          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00591ec1          
00591ec6          if (edx_3 == 0)
00591ec6              goto label_591ede;
00591ec6          
00591eca          while (i != *(uint32_t*)edx_3)
00591eca          {
00591ecc              edx_3 = edx_3[0xa];
00591ecc              
00591ed1              if (edx_3 == 0)
00591ed1                  goto label_591ede;
00591eca          }
00591eca          
00591eda          if (edx_3 == 0xfffffff8)
00591eda              goto label_591ede;
00591eaf      }
00591eaf      
00591f05      return 0;
00591ea0  }

00591f2d                                         90 90 90                                                               ...

00591f30  uint32_t __thiscall PackableHashTable<unsigned long,Skill>::Pack(class PackableHashTable<unsigned long,Skill>* this, void** arg2, uint32_t arg3)

00591f30  {
00591f30      class PackableHashTable<unsigned long,Skill>* this_1 = this;
00591f35      uint32_t result = PackableHashTable<unsigned long,Skill>::pack_size(this);
00591f3a      uint32_t ebx = arg3;
00591f40      uint32_t result_1 = result;
00591f40      
00591f44      if (ebx >= result)
00591f44      {
00591f59          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
00591f5b          *(uint32_t*)arg2 += 4;
00591f61          uint32_t i = 0;
00591f65          arg3 = 0;
00591f65          
00591f69          if (this->_table_size > 0)
00591f69          {
00591fb2              do
00591fb2              {
00591f73                  int32_t* j = this->_buckets[i];
00591f73                  
00591f78                  if (j != 0)
00591f78                  {
00591f9e                      do
00591f9e                      {
00591f83                          if (ebx >= 4)
00591f83                          {
00591f89                              **(uint32_t**)arg2 = *(uint32_t*)j;
00591f8b                              *(uint32_t*)arg2 += 4;
00591f83                          }
00591f83                          
00591f96                          *(uint32_t*)(j[2] + 0xc)(arg2, ebx);
00591f99                          j = j[0xa];
00591f9e                      } while (j != 0);
00591f9e                      
00591fa0                      result = result_1;
00591fa4                      i = arg3;
00591f78                  }
00591f78                  
00591fab                  i += 1;
00591fae                  arg3 = i;
00591fb2              } while (i < this->_table_size);
00591f69          }
00591f44      }
00591f44      
00591fb9      return result;
00591f30  }

00591f6d                                         8d 49 00                                                               .I.
00591fbc                                                                                      90 90 90 90                              ....

00591fc0  uint32_t __fastcall PackableHashTable<unsigned long,Skill>::pack_size(class PackableHashTable<unsigned long,Skill>* this)

00591fc0  {
00591fc0      class PackableHashTable<unsigned long,Skill>* this_1 = this;
00591fc8      int32_t i = 0;
00591fca      bool cond:0 = this->_table_size <= 0;
00591fcd      int32_t result = 4;
00591fd2      this_1 = nullptr;
00591fd2      
00591fd6      if (!(cond:0))
00591fd6      {
00592011          do
00592011          {
00591fe3              void* j = this->_buckets[i];
00591fe3              
00591fe8              while (j != 0)
00591fe8              {
00591ffd                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 8) + 0xc)(&this_1, 0);
00592000                  j = *(uint32_t*)((char*)j + 0x28);
00592005                  result = ((result + eax_2) + 4);
00591fe8              }
00591fe8              
0059200e              i += 1;
00592011          } while (i < this->_table_size);
00591fd6      }
00591fd6      
0059201a      return result;
00591fc0  }

0059201b                                                                                   90 90 90 90 90                             .....

00592020  int32_t __thiscall CACQualities::InqAttribute2nd(class CACQualities const* this, uint32_t arg2, uint32_t* arg3, int32_t arg4)

00592020  {
00592020      class CACQualities* this_1 = this;
00592024      uint32_t esi = arg2;
00592028      class CACQualities* this_2 = nullptr;
0059202f      this_1 = nullptr;
0059202f      
0059203d      if (((esi == 1 || esi == 3) || esi == 5))
0059203d      {
0059204c          int32_t result = CACQualities::InqAttribute2ndBaseLevel(this, esi, &this_1, arg4);
0059204c          
00592053          if (result == 0)
00592059              return result;
00592059          
0059205c          this_2 = this_1;
0059203d      }
0059203d      
00592063      if (esi == 1)
00592063      {
00592076          arg2 = 0;
00592076          
00592085          if (CBaseQualities::InqInt(&this->vtable, 0x17b, &arg2, 0, 0) != 0)
00592087              this_2 += arg2;
00592063      }
00592063      
0059208b      class AttributeCache* _attribCache = this->_attribCache;
00592091      void** edi = arg3;
00592095      int32_t eax_3;
00592095      
00592095      if (_attribCache != 0)
00592099          eax_3 = AttributeCache::InqAttribute2nd(_attribCache, esi, edi);
00592099      
005920a0      if ((_attribCache != 0 && eax_3 != 0))
005920b4          *(uint32_t*)edi += this_2;
005920a0      else
005920a0      {
005920a4          if (this_2 == 0)
005920ad              return 0;
005920ad          
005920b0          *(uint32_t*)edi = this_2;
005920a0      }
005920a0      
005920bc      if (arg4 == 0)
005920c2          CACQualities::EnchantAttribute2nd(this, esi, edi);
005920c2      
005920d1      return 1;
00592020  }

005920d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005920e0  int32_t __thiscall CACQualities::BoundsCheck(class CACQualities* this, uint32_t arg2, int32_t* arg3, uint32_t* arg4)

005920e0  {
005920f1      if ((arg2 != 2 && (arg2 != 4 && arg2 != 6)))
005920f8          return 1;
005920f8      
00592104      if (*(uint32_t*)arg3 < 0)
00592104      {
00592106          *(uint32_t*)arg3 = 0;
00592113          return 1;
00592104      }
00592104      
00592116      int32_t* esi = arg4;
0059211f      int32_t result = CACQualities::InqAttribute2nd(this, (arg2 - 1), esi, 0);
0059211f      
00592126      if (result == 0)
0059212a          return result;
0059212a      
0059212d      int32_t eax_3 = *(uint32_t*)esi;
0059212d      
00592131      if (*(uint32_t*)arg3 > eax_3)
00592133          *(uint32_t*)arg3 = eax_3;
00592133      
0059213c      return 1;
005920e0  }

0059213f                                                                                               90                                 .

00592140  int32_t __thiscall CACQualities::InqSkillBaseLevel(class CACQualities const* this, uint32_t arg2, int32_t* arg3, int32_t arg4)

00592140  {
00592144      int32_t __saved_ebx = 0x10000004;
00592149      int32_t __saved_ebp = 2;
0059214b      int32_t __saved_esi = 4;
00592151      int32_t eax;
00592151      int32_t edx;
00592151      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
00592151      
0059215d      if (eax_1 == 0)
00592163          return eax_1;
00592163      
00592167      uint32_t ebx = arg2;
00592170      class SkillBase* eax_2 = SkillTable::GetSkillBase(eax_1, ebx);
00592170      
00592179      if (eax_2 == 0)
00592179      {
0059217b          eax_1->vtable->Release();
0059218b          return 0;
00592179      }
00592179      
00592192      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
00592195      arg2 = ebx;
0059219d      enum SKILL_ADVANCEMENT_CLASS _sac = UNTRAINED_SKILL_ADVANCEMENT_CLASS;
0059219d      
005921a2      if (_skillStatsTable != 0)
005921a2      {
005921a9          class Skill* eax_5 = PackableHashTable<unsigned long,Skill>::lookup(_skillStatsTable, &arg2);
005921a9          
005921b0          if (eax_5 != 0)
005921b2              _sac = eax_5->_sac;
005921a2      }
005921a2      
005921b8      if (_sac < eax_2->_min_level)
005921b8      {
005921be          *(uint32_t*)arg3 = 0;
005921c0          eax_1->vtable->Release();
005921d3          return 1;
005921b8      }
005921b8      
005921da      uint32_t var_4 = 0;
005921de      uint32_t var_8 = 0;
005921e2      uint32_t _attr1 = eax_2->_formula._attr1;
005921e7      uint32_t _attr2 = eax_2->_formula._attr2;
005921e7      
005921ea      if (_attr1 != 0)
005921f7          CACQualities::InqAttribute(this, _attr1, &var_4, arg4);
005921f7      
005921fe      if (_attr2 != 0)
0059220b          CACQualities::InqAttribute(this, _attr2, &var_8, arg4);
0059220b      
00592222      int32_t eax_9 = SkillFormula::Calculate(&eax_2->_formula, var_4, var_8, arg3);
00592229      eax_1->vtable->Release();
00592239      return eax_9;
00592140  }

0059223c                                                                                      90 90 90 90                              ....

00592240  int32_t __thiscall CACQualities::SetSkill(class CACQualities* this, uint32_t arg2, class Skill const* arg3)

00592240  {
00592249      if (this->_skillStatsTable == 0)
00592249      {
00592252          class PackableHashTable<unsigned long,Skill>* esi_1 = operator new(0x14);
00592252          
00592259          if (esi_1 == 0)
00592286              esi_1 = nullptr;
00592259          else
00592259          {
0059225d              esi_1->vtable = 0x7e44cc;
00592263              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
0059226a              esi_1->_buckets = nullptr;
00592271              esi_1->_table_size = 0x20;
00592278              esi_1->_currNum = 0;
0059227f              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
00592259          }
00592259          
0059228a          this->_skillStatsTable = esi_1;
0059228a          
0059228d          if (esi_1 == 0)
00592293              return 0;
00592249      }
00592249      
00592296      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
00592299      uint32_t _table_size = _skillStatsTable->_table_size;
00592299      
0059229f      if (_table_size != 0)
0059229f      {
005922a1          class PackableHashData<unsigned long,Skill>** _buckets = _skillStatsTable->_buckets;
005922a1          
005922a6          if (_buckets != 0)
005922a6          {
005922a8              uint32_t i = arg2;
005922b2              int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
005922b2              
005922b7              if (edx_3 != 0)
005922b7              {
005922c2                  while (i != *(uint32_t*)edx_3)
005922c2                  {
005922c4                      edx_3 = edx_3[0xa];
005922c4                      
005922c9                      if (edx_3 == 0)
005922dd                          return PackableHashTable<unsigned long,Skill>::add(_skillStatsTable, &arg2, arg3);
005922c2                  }
005922c2                  
005922e5                  if (edx_3 != 0xfffffff8)
005922e5                  {
005922e0                      edx_3[3] = arg3->_sac;
005922e0                      edx_3[4] = arg3->_pp;
005922e0                      edx_3[5] = arg3->_init_level;
005922e0                      edx_3[6] = arg3->_level_from_pp;
005922e0                      edx_3[7] = arg3->_resistance_of_last_check;
005922e0                      edx_3[8] = arg3->_last_used_time;
005922e0                      edx_3[9] = *(uint32_t*)((char*)arg3->_last_used_time)[4];
00592332                      return 1;
005922e5                  }
005922b7              }
005922a6          }
0059229f      }
0059229f      
005922f9      return PackableHashTable<unsigned long,Skill>::add(_skillStatsTable, &arg2, arg3);
00592240  }

00592335                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00592340  int32_t __thiscall CACQualities::SetSkillLevel(class CACQualities* this, uint32_t arg2, uint32_t arg3)

00592340  {
0059234f      if (this->_skillStatsTable == 0)
0059234f      {
00592358          class PackableHashTable<unsigned long,Skill>* esi_1 = operator new(0x14);
00592358          
0059235f          if (esi_1 == 0)
00592380              esi_1 = nullptr;
0059235f          else
0059235f          {
00592363              esi_1->vtable = 0x7e44cc;
00592369              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
0059236c              esi_1->_buckets = nullptr;
0059236f              esi_1->_table_size = 0x20;
00592376              esi_1->_currNum = 0;
00592379              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
0059235f          }
0059235f          
00592384          this->_skillStatsTable = esi_1;
00592384          
00592387          if (esi_1 == 0)
00592391              return 0;
0059234f      }
0059234f      
00592394      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
00592397      uint32_t _table_size = _skillStatsTable->_table_size;
00592397      
0059239d      if (_table_size != 0)
0059239d      {
0059239f          class PackableHashData<unsigned long,Skill>** _buckets = _skillStatsTable->_buckets;
0059239f          
005923a4          if (_buckets != 0)
005923a4          {
005923a6              uint32_t ebx_1 = arg2;
005923a6              
005923b5              for (int32_t* i = _buckets[(COMBINE(0, ebx_1) % _table_size)]; i != 0; i = i[0xa])
005923b5              {
005923b9                  if (ebx_1 == *(uint32_t*)i)
005923b9                  {
005923c9                      if (i == 0xfffffff8)
005923c9                          break;
005923c9                      
005923c4                      i[5] = arg3;
00592427                      return 1;
005923b9                  }
005923b5              }
005923a4          }
0059239d      }
0059239d      
005923d3      uint32_t var_14 = arg3;
005923dd      int32_t var_20 = 0x7a7408;
005923e5      int32_t var_1c = 0;
005923e9      int32_t var_18 = 0;
005923ed      int32_t var_10 = 0;
005923f1      int32_t var_c = 0;
005923f5      int32_t var_8 = 0;
005923fd      int32_t var_4 = 0;
00592411      return PackableHashTable<unsigned long,Skill>::add(_skillStatsTable, &arg2, &var_20);
00592340  }

0059242a                                90 90 90 90 90 90                                                            ......

00592430  int32_t __thiscall CACQualities::SetSkillAdvancementClass(class CACQualities* this, uint32_t arg2, enum SKILL_ADVANCEMENT_CLASS arg3)

00592430  {
0059243f      if (this->_skillStatsTable == 0)
0059243f      {
00592448          class PackableHashTable<unsigned long,Skill>* esi_1 = operator new(0x14);
00592448          
0059244f          if (esi_1 == 0)
00592470              esi_1 = nullptr;
0059244f          else
0059244f          {
00592453              esi_1->vtable = 0x7e44cc;
00592459              esi_1->m_fThrowawayDuplicateKeysOnUnPack = 0;
0059245c              esi_1->_buckets = nullptr;
0059245f              esi_1->_table_size = 0x20;
00592466              esi_1->_currNum = 0;
00592469              PackableHashTable<unsigned long,CContractTracker>::Init(esi_1);
0059244f          }
0059244f          
00592474          this->_skillStatsTable = esi_1;
00592474          
00592477          if (esi_1 == 0)
00592481              return 0;
0059243f      }
0059243f      
00592484      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
00592487      uint32_t _table_size = _skillStatsTable->_table_size;
00592487      
0059248d      if (_table_size != 0)
0059248d      {
0059248f          class PackableHashData<unsigned long,Skill>** _buckets = _skillStatsTable->_buckets;
0059248f          
00592494          if (_buckets != 0)
00592494          {
00592496              uint32_t ebx_1 = arg2;
00592496              
005924a5              for (int32_t* i = _buckets[(COMBINE(0, ebx_1) % _table_size)]; i != 0; i = i[0xa])
005924a5              {
005924a9                  if (ebx_1 == *(uint32_t*)i)
005924a9                  {
005924b9                      if (i == 0xfffffff8)
005924b9                          break;
005924b9                      
00592516                      Skill::SetSkillAdvancementClass(&i[2], arg3);
00592527                      return 1;
005924a9                  }
005924a5              }
00592494          }
0059248d      }
0059248d      
005924c4      int32_t var_20 = 0x7a7408;
005924cc      int32_t s;
005924cc      __builtin_memset(&s, 0, 0x1c);
005924f0      Skill::SetSkillAdvancementClass(&var_20, arg3);
0059250e      return PackableHashTable<unsigned long,Skill>::add(this->_skillStatsTable, &arg2, &var_20);
00592430  }

0059252a                                90 90 90 90 90 90                                                            ......

00592530  int32_t __thiscall CACQualities::SetAttribute2nd(class CACQualities* this, uint32_t arg2, class SecondaryAttribute const* arg3)

00592530  {
0059253b      if (this->_attribCache == 0)
0059253b      {
0059253f          void* eax_1 = operator new(0x28);
00592549          class AttributeCache* result;
00592549          
00592549          if (eax_1 == 0)
00592554              result = nullptr;
00592549          else
0059254d              result = AttributeCache::AttributeCache(eax_1);
0059254d          
00592558          this->_attribCache = result;
00592558          
0059255b          if (result == 0)
00592561              return result;
0059253b      }
0059253b      
00592564      class SecondaryAttribute* eax_2 = arg3;
00592576      uint32_t _level_from_cp = eax_2->_level_from_cp;
0059257d      uint32_t _init_level = eax_2->_init_level;
00592581      uint32_t _current_level = eax_2->_current_level;
00592584      uint32_t _cp_spent = eax_2->_cp_spent;
00592588      int32_t var_14 = 0x7a7b30;
00592588      
0059259e      if (((arg2 == 2 || arg2 == 4) || arg2 == 6))
0059259e      {
005925ad          arg3 = nullptr;
005925ad          
005925bc          if (CACQualities::InqAttribute2nd(this, (arg2 - 1), &arg3, 0) == 0)
005925e9              return 0;
005925e9          
005925be          class SecondaryAttribute* eax_4 = arg3;
005925be          
005925c6          if (_current_level > eax_4)
005925c8              class SecondaryAttribute* var_4_1 = eax_4;
0059259e      }
0059259e      
005925df      return AttributeCache::SetAttribute2nd(this->_attribCache, arg2, &var_14);
00592530  }

005925ec                                      90 90 90 90                                                              ....

005925f0  int32_t __thiscall CACQualities::SetAttribute2nd(class CACQualities* this, uint32_t arg2, uint32_t arg3, uint32_t* arg4, uint32_t* arg5)

005925f0  {
005925f8      if (this->_attribCache == 0)
005925f8      {
005925fc          void* eax_1 = operator new(0x28);
00592606          class AttributeCache* eax_2;
00592606          
00592606          if (eax_1 == 0)
00592611              eax_2 = nullptr;
00592606          else
0059260a              eax_2 = AttributeCache::AttributeCache(eax_1);
0059260a          
00592615          this->_attribCache = eax_2;
00592615          
00592618          if (eax_2 == 0)
0059261b              return eax_2;
005925f8      }
005925f8      
00592635      *(uint32_t*)arg4 = arg3;
00592637      int32_t eax_4 = CACQualities::BoundsCheck(this, arg2, arg4, arg5);
00592637      
0059263e      if (eax_4 != 0)
00592655          return AttributeCache::SetAttribute2nd(this->_attribCache, arg2, *(uint32_t*)arg4);
00592655      
00592643      return eax_4;
005925f0  }

00592658                                                                          90 90 90 90 90 90 90 90                          ........

00592660  int32_t __thiscall CACQualities::InqSkill(class CACQualities const* this, uint32_t arg2, int32_t* arg3, int32_t arg4)

00592660  {
00592669      uint32_t ebp = arg2;
0059266e      int32_t* edi = arg3;
00592677      int32_t result = CACQualities::InqSkillBaseLevel(this, ebp, edi, arg4);
00592677      
0059267e      if (result == 0)
00592686          return result;
00592686      
00592689      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
0059268e      uint32_t var_8 = ebp;
0059268e      
00592692      if (_skillStatsTable != 0)
00592692      {
00592699          class Skill* eax = PackableHashTable<unsigned long,Skill>::lookup(_skillStatsTable, &var_8);
00592699          
005926a0          if (eax != 0)
005926ae              *(uint32_t*)edi += (eax->_level_from_pp + eax->_init_level);
00592692      }
00592692      
005926c4      arg2 = 0;
005926c4      
005926d3      if (CBaseQualities::InqInt(&this->vtable, 0x16d, &arg2, 0, 0) != 0)
005926d3      {
005926d5          uint32_t eax_4 = arg2;
005926d5          
005926db          if (eax_4 > 0)
005926dd              *(uint32_t*)edi += eax_4;
005926d3      }
005926d3      
005926e5      arg3 = nullptr;
005926ed      uint32_t var_28_1;
005926ed      int32_t* var_24_1;
005926ed      
005926ed      if ((ebp - 0x1f) <= 0x12)
005926f6          switch (ebp)
005926f6          {
0059271d              case 0x1f:
0059271d              case 0x20:
0059271d              case 0x21:
0059271d              case 0x22:
0059271d              case 0x2b:
0059271d              {
0059271d                  int32_t var_1c_3 = 0;
0059271f                  int32_t var_20_3 = 0;
00592725                  var_24_1 = &arg3;
00592726                  var_28_1 = 0x12e;
00592726                  goto label_59272d;
0059271d              }
005926fd              case 0x29:
005926fd              case 0x2c:
005926fd              case 0x2d:
005926fd              case 0x2e:
005926fd              case 0x31:
005926fd              {
005926fd                  int32_t var_1c_1 = 0;
005926ff                  int32_t var_20_1 = 0;
00592705                  var_24_1 = &arg3;
00592706                  var_28_1 = 0x12c;
0059272d              label_59272d:
0059272d                  CBaseQualities::InqInt(&this->vtable, var_28_1, var_24_1, 0, 0);
0059272d                  
00592738                  if (arg3 > 0)
0059273a                      *(uint32_t*)edi += 0xa;
005926fd                  break;
005926fd              }
0059270d              case 0x2f:
0059270d              {
0059270d                  int32_t var_1c_2 = 0;
0059270f                  int32_t var_20_2 = 0;
00592715                  var_24_1 = &arg3;
00592716                  var_28_1 = 0x12d;
0059271b                  goto label_59272d;
0059270d              }
005926f6          }
005926f6      
00592745      if (arg4 == 0)
00592745      {
0059274b          arg4 = 0;
0059274f          var_8 = 0;
00592753          CACQualities::EnchantSkill(this, ebp, edi);
00592753          
00592777          if ((CBaseQualities::InqInt(&this->vtable, 0x146, &arg4, 0, 0) != 0 && arg4 > 0))
00592779              *(uint32_t*)edi += 5;
00592779          
0059278c          CBaseQualities::InqInt(&this->vtable, 0x158, &var_8, 0, 0);
00592791          uint32_t esi_1 = var_8;
00592791          
00592797          if (esi_1 > 0)
00592797          {
00592799              class PackableHashTable<unsigned long,Skill>* _skillStatsTable_1 = this->_skillStatsTable;
0059279e              uint32_t var_4 = ebp;
0059279e              
005927a2              if (_skillStatsTable_1 != 0)
005927a2              {
005927a9                  class Skill* eax_9 = PackableHashTable<unsigned long,Skill>::lookup(_skillStatsTable_1, &var_4);
005927a9                  
005927b6                  if ((eax_9 != 0 && eax_9->_sac == SPECIALIZED_SKILL_ADVANCEMENT_CLASS))
005927bf                      *(uint32_t*)edi += (esi_1 * 2);
005927a2              }
00592797          }
00592745      }
00592745      
005927cd      return 1;
00592660  }

005927d0  uint32_t jump_table_5927d0[0x4] = 
005927d0  {
005927d0      [0x0] =  0x0059271d
005927d4      [0x1] =  0x005926fd
005927d8      [0x2] =  0x0059270d
005927dc      [0x3] =  0x0059273d
005927e0  }
005927e0  uint8_t lookup_table_5927e0[0x13] = 
005927e0  {
005927e0      [0x00] =  0x00
005927e1      [0x01] =  0x00
005927e2      [0x02] =  0x00
005927e3      [0x03] =  0x00
005927e4      [0x04] =  0x03
005927e5      [0x05] =  0x03
005927e6      [0x06] =  0x03
005927e7      [0x07] =  0x03
005927e8      [0x08] =  0x03
005927e9      [0x09] =  0x03
005927ea      [0x0a] =  0x01
005927eb      [0x0b] =  0x03
005927ec      [0x0c] =  0x00
005927ed      [0x0d] =  0x01
005927ee      [0x0e] =  0x01
005927ef      [0x0f] =  0x01
005927f0      [0x10] =  0x02
005927f1      [0x11] =  0x03
005927f2      [0x12] =  0x01
005927f3  }

005927f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00592800  int32_t __thiscall CACQualities::InqRunRate(class CACQualities const* this, float* arg2)

00592800  {
0059280f      float var_c = 1f;
00592817      int32_t result = CACQualities::InqLoad(((char*)this - 0x38), &var_c);
00592817      
00592820      if (result == 0)
0059297b          return result;
0059297b      
00592826      uint32_t id = this->m_DID.id;
0059282b      uint32_t var_10;
0059282b      
0059282b      if ((id != 0 && AttributeCache::InqAttribute2nd(id, 4, &var_10) != 0))
0059282b      {
00592846          CACQualities::EnchantAttribute2nd(((char*)this - 0x38), 4, &var_10);
0059285c          int32_t var_20;
0059285c          
0059285c          if (CACQualities::InqSkillBaseLevel(((char*)this - 0x38), 0x18, &var_20, 0) != 0)
0059285c          {
00592868              class PackableHashTable<unsigned long,Skill>* ecx_3 = this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c);
0059286d              int32_t var_14 = 0x18;
0059286d              
00592875              if (ecx_3 != 0)
00592875              {
0059287c                  class Skill* eax_3 = PackableHashTable<unsigned long,Skill>::lookup(ecx_3, &var_14);
0059287c                  
00592883                  if (eax_3 != 0)
00592893                      var_20 += (eax_3->_level_from_pp + eax_3->_init_level);
00592875              }
00592875              
005928a9              int32_t var_1c = 0;
005928a9              
005928b4              if (CBaseQualities::InqInt(this, 0x16d, &var_1c, 0, 0) != 0)
005928b4              {
005928b6                  int32_t eax_7 = var_1c;
005928b6                  
005928bc                  if (eax_7 > 0)
005928be                      var_20 += eax_7;
005928b4              }
005928b4              
005928cb              int32_t var_4_1 = 0;
005928cf              int32_t var_18 = 0;
005928d3              var_14 = 0;
005928d7              CACQualities::EnchantSkill(((char*)this - 0x38), 0x18, &var_20);
005928d7              
005928f7              if ((CBaseQualities::InqInt(this, 0x146, &var_18, 0, 0) != 0 && var_18 > 0))
005928f9                  var_20 += 5;
005928f9              
0059290c              CBaseQualities::InqInt(this, 0x158, &var_14, 0, 0);
00592911              int32_t edi_2 = var_14;
00592911              
00592917              if (edi_2 > 0)
00592917              {
00592919                  class PackableHashTable<unsigned long,Skill>* ecx_10 = this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c);
0059291e                  int32_t var_8 = 0x18;
0059291e                  
00592926                  if (ecx_10 != 0)
00592926                  {
0059292d                      class Skill* eax_9 = PackableHashTable<unsigned long,Skill>::lookup(ecx_10, &var_8);
0059292d                      
0059293a                      if ((eax_9 != 0 && eax_9->_sac == SPECIALIZED_SKILL_ADVANCEMENT_CLASS))
00592943                          var_20 += (edi_2 << 1);
00592926                  }
00592917              }
00592917              
00592951              if (var_10 == 0)
00592953                  var_20 = 0;
00592953              
0059296f              *(uint32_t*)arg2 = ((float)MovementSystem::GetRunRate(var_c, var_20, 1f));
00592974              return 1;
0059285c          }
0059282b      }
0059282b      
00592865      return 0;
00592800  }

0059297e                                                                                            90 90                                ..

00592980  int32_t __thiscall CACQualities::InqJumpVelocity(class CACQualities const* this, float arg2, float* arg3)

00592980  {
0059298f      float var_c = 1f;
00592997      int32_t result = CACQualities::InqLoad(((char*)this - 0x38), &var_c);
005929a0      int32_t var_20 = 1;
005929a8      uint32_t var_1c = 0;
005929a8      
005929ac      if (result != 0)
005929ac      {
005929b2          uint32_t id = this->m_DID.id;
005929b2          
005929b7          if (id == 0)
005929f1              return 0;
005929f1          
005929c7          if (AttributeCache::InqAttribute2nd(id, 4, &var_1c) == 0)
005929f1              return 0;
005929f1          
005929d2          CACQualities::EnchantAttribute2nd(((char*)this - 0x38), 4, &var_1c);
005929d2          
005929e8          if (CACQualities::InqSkillBaseLevel(((char*)this - 0x38), 0x16, &var_20, 0) == 0)
005929f1              return 0;
005929f1          
005929f4          class PackableHashTable<unsigned long,Skill>* ecx_3 = this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c);
005929f9          int32_t var_10 = 0x16;
005929f9          
00592a01          if (ecx_3 != 0)
00592a01          {
00592a08              class Skill* eax_3 = PackableHashTable<unsigned long,Skill>::lookup(ecx_3, &var_10);
00592a08              
00592a0f              if (eax_3 != 0)
00592a1f                  var_20 += (eax_3->_level_from_pp + eax_3->_init_level);
00592a01          }
00592a01          
00592a35          int32_t var_18 = 0;
00592a35          
00592a40          if (CBaseQualities::InqInt(this, 0x16d, &var_18, 0, 0) != 0)
00592a40          {
00592a42              int32_t eax_7 = var_18;
00592a42              
00592a48              if (eax_7 > 0)
00592a4a                  var_20 += eax_7;
00592a40          }
00592a40          
00592a57          int32_t var_4_1 = 0;
00592a5b          int32_t var_14 = 0;
00592a5f          var_10 = 0;
00592a63          CACQualities::EnchantSkill(((char*)this - 0x38), 0x16, &var_20);
00592a63          
00592a83          if ((CBaseQualities::InqInt(this, 0x146, &var_14, 0, 0) != 0 && var_14 > 0))
00592a85              var_20 += 5;
00592a85          
00592a98          CBaseQualities::InqInt(this, 0x158, &var_10, 0, 0);
00592a9d          int32_t edi_2 = var_10;
00592a9d          
00592aa3          if (edi_2 > 0)
00592aa3          {
00592aa5              class PackableHashTable<unsigned long,Skill>* ecx_10 = this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c);
00592aaa              int32_t var_8 = 0x16;
00592aaa              
00592ab2              if (ecx_10 != 0)
00592ab2              {
00592ab9                  class Skill* eax_9 = PackableHashTable<unsigned long,Skill>::lookup(ecx_10, &var_8);
00592ab9                  
00592ac6                  if ((eax_9 != 0 && eax_9->_sac == SPECIALIZED_SKILL_ADVANCEMENT_CLASS))
00592acf                      var_20 += (edi_2 << 1);
00592ab2              }
00592aa3          }
00592aa3          
00592add          if (var_1c == 0)
00592adf              var_20 = 0;
00592adf          
00592b0b          result = 1;
00592b0d          *(uint32_t*)arg3 = ((float)sqrtl((MovementSystem::GetJumpHeight(var_c, var_20, arg2, 1f) * ((long double)19.600000000000001))));
005929ac      }
005929ac      
00592b14      return result;
00592980  }

00592b17                                                                       90 90 90 90 90 90 90 90 90                         .........

00592b20  int32_t __thiscall PackableHashTable<unsigned long,Skill>::UnPack(class PackableHashTable<unsigned long,Skill>* this, void** arg2, uint32_t arg3)

00592b20  {
00592b2e      if (arg3 < 4)
00592b37          return 0;
00592b37      
00592b3c      void** esi = arg2;
00592b40      void* eax_1 = *(uint32_t*)esi;
00592b48      uint32_t var_24 = arg3;
00592b4c      PackableHashTable<unsigned long,Skill>::Destroy(this);
00592b51      void* ecx_1 = *(uint32_t*)esi;
00592b53      int32_t eax_2 = *(uint32_t*)ecx_1;
00592b58      *(uint32_t*)esi = ((char*)ecx_1 + 4);
00592b5c      uint32_t ecx_4 = (eax_2 >> 0x10);
00592b5f      int32_t eax_3 = (eax_2 & 0xffff);
00592b64      int32_t edi_1 = (arg3 - 4);
00592b69      this->_table_size = ecx_4;
00592b69      
00592b6e      if (ecx_4 == 0)
00592b6e      {
00592b77          int32_t result;
00592b77          result = eax_3 == 0;
00592b7e          return result;
00592b6e      }
00592b6e      
00592b9b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
00592b9b      {
00592bac          int32_t var_20;
00592bac          uint32_t eax_6 = Skill::Skill(&var_20);
00592bb3          arg3 = 0;
00592bb3          
00592bbb          if (eax_3 <= 0)
00592c24              return ((eax_6 - eax_6) + 1);
00592c24          
00592bc3          while (true)
00592bc3          {
00592bc3              if (edi_1 < 4)
00592b92                  return 0;
00592b92              
00592bc5              int32_t* eax_7 = *(uint32_t*)esi;
00592bc9              int32_t edx_1 = var_20;
00592bce              arg2 = *(uint32_t*)eax_7;
00592bda              *(uint32_t*)esi = &eax_7[1];
00592bda              
00592be1              if (*(uint32_t*)(edx_1 + 0x10)(esi, edi_1) == 0)
00592b92                  return 0;
00592b92              
00592bfd              if ((PackableHashTable<unsigned long,Skill>::add(this, &arg2, &var_20) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
00592b92                  return 0;
00592b92              
00592c03              eax_6 = (arg3 + 1);
00592c06              arg3 = eax_6;
00592c06              
00592c0a              if (eax_6 >= eax_3)
00592c24                  return ((eax_6 - eax_6) + 1);
00592bc3          }
00592b9b      }
00592b9b      
00592b92      return 0;
00592b20  }

00592c27                       90 90 90 90 90 90 90 90 90                                                         .........

00592c30  void __fastcall PackableHashTable<unsigned long,Skill>::Destroy(class PackableHashTable<unsigned long,Skill>* this)

00592c30  {
00592c33      PackableHashTable<unsigned long,Skill>::EmptyContents(this);
00592c38      class PackableHashData<unsigned long,Skill>** _buckets = this->_buckets;
00592c38      
00592c3d      if (_buckets != 0)
00592c3d      {
00592c40          operator delete[](_buckets);
00592c48          this->_buckets = nullptr;
00592c3d      }
00592c3d      
00592c4f      this->_table_size = 0;
00592c30  }

00592c58                                                                          90 90 90 90 90 90 90 90                          ........

00592c60  void __fastcall PackableHashTable<unsigned long,Skill>::EmptyContents(class PackableHashTable<unsigned long,Skill>* this)

00592c60  {
00592c69      if (this->_buckets != 0)
00592c69      {
00592c6e          int32_t i = 0;
00592c6e          
00592c72          if (this->_table_size > 0)
00592c72          {
00592ca9              do
00592ca9              {
00592c78                  void* j_1 = this->_buckets[i];
00592c78                  
00592c7d                  if (j_1 != 0)
00592c7d                  {
00592c97                      void* j;
00592c97                      
00592c97                      do
00592c97                      {
00592c80                          j = *(uint32_t*)((char*)j_1 + 0x28);
00592c84                          *(uint32_t*)((char*)j_1 + 8) = 0x79285c;
00592c8b                          operator delete(j_1);
00592c95                          j_1 = j;
00592c97                      } while (j != 0);
00592c7d                  }
00592c7d                  
00592c99                  this->_buckets[i] = 0;
00592ca6                  i += 1;
00592ca9              } while (i < this->_table_size);
00592c72          }
00592c69      }
00592c69      
00592cac      this->_currNum = 0;
00592c60  }

00592cb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00592cc0  void* __thiscall PackableHashTable<unsigned long,Skill>::`scalar deleting destructor'(class PackableHashTable<unsigned long,Skill>* this, uint32_t arg2)

00592cc0  {
00592cc3      this->vtable = 0x7e44cc;
00592cc9      PackableHashTable<unsigned long,Skill>::Destroy(this);
00592cd3      this->vtable = 0x79285c;
00592cd3      
00592cd9      if ((arg2 & 1) != 0)
00592cdc          operator delete(this);
00592cdc      
00592ce7      return this;
00592cc0  }

00592cea                                90 90 90 90 90 90                                                            ......

00592cf0  int32_t __thiscall CACQualities::SetAttribute2nd(class CACQualities* this, uint32_t arg2, uint32_t arg3)

00592cf0  {
00592d09      return CACQualities::SetAttribute2nd(this, arg2, arg3, &arg2, &arg3);
00592cf0  }

00592d0c                                      90 90 90 90                                                              ....

00592d10  void __fastcall CACQualities::Clear(class CACQualities* this)

00592d10  {
00592d13      class AttributeCache* _attribCache = this->_attribCache;
00592d13      
00592d1b      if (_attribCache != 0)
00592d1b      {
00592d1d          _attribCache->vtable->__vecDelDtor(1);
00592d23          this->_attribCache = nullptr;
00592d1b      }
00592d1b      
00592d26      class PackableHashTable<unsigned long,Skill>* _skillStatsTable = this->_skillStatsTable;
00592d26      
00592d2b      if (_skillStatsTable != 0)
00592d2b      {
00592d2d          _skillStatsTable->vtable->__vecDelDtor(1);
00592d33          this->_skillStatsTable = nullptr;
00592d2b      }
00592d2b      
00592d36      class Body* _body = this->_body;
00592d36      
00592d3b      if (_body != 0)
00592d3b      {
00592d3d          _body->vtable->__vecDelDtor(1);
00592d43          this->_body = nullptr;
00592d3b      }
00592d3b      
00592d46      class CSpellBook* _spell_book = this->_spell_book;
00592d46      
00592d4b      if (_spell_book != 0)
00592d4b      {
00592d4d          _spell_book->vtable->__vecDelDtor(1);
00592d53          this->_spell_book = nullptr;
00592d4b      }
00592d4b      
00592d56      class CEnchantmentRegistry* _enchantment_reg = this->_enchantment_reg;
00592d56      
00592d5b      if (_enchantment_reg != 0)
00592d5b      {
00592d5d          _enchantment_reg->vtable->__vecDelDtor(1);
00592d63          this->_enchantment_reg = nullptr;
00592d5b      }
00592d5b      
00592d66      class EventFilter* _event_filter = this->_event_filter;
00592d66      
00592d6b      if (_event_filter != 0)
00592d6b      {
00592d6d          _event_filter->vtable->__vecDelDtor(1);
00592d73          this->_event_filter = nullptr;
00592d6b      }
00592d6b      
00592d76      class CEmoteTable* _emote_table = this->_emote_table;
00592d76      
00592d7b      if (_emote_table != 0)
00592d7b      {
00592d7d          _emote_table->vtable->__vecDelDtor(1);
00592d83          this->_emote_table = nullptr;
00592d7b      }
00592d7b      
00592d86      class PackableList<CreationProfile>* _create_list = this->_create_list;
00592d86      
00592d8b      if (_create_list != 0)
00592d8b      {
00592d8d          _create_list->vtable->__vecDelDtor(1);
00592d93          this->_create_list = nullptr;
00592d8b      }
00592d8b      
00592d96      class PageDataList* _pageDataList = this->_pageDataList;
00592d96      
00592d9e      if (_pageDataList != 0)
00592d9e      {
00592da0          _pageDataList->vtable->__vecDelDtor(1);
00592da6          this->_pageDataList = nullptr;
00592d9e      }
00592d9e      
00592dac      class GeneratorTable* _generator_table = this->_generator_table;
00592dac      
00592db4      if (_generator_table != 0)
00592db4      {
00592db6          _generator_table->vtable->__vecDelDtor(1);
00592dbc          this->_generator_table = nullptr;
00592db4      }
00592db4      
00592dc2      class GeneratorRegistry* _generator_registry = this->_generator_registry;
00592dc2      
00592dca      if (_generator_registry != 0)
00592dca      {
00592dcc          _generator_registry->vtable->__vecDelDtor(1);
00592dd2          this->_generator_registry = nullptr;
00592dca      }
00592dca      
00592dd8      class GeneratorQueue* _generator_queue = this->_generator_queue;
00592dd8      
00592de0      if (_generator_queue != 0)
00592de0      {
00592de2          _generator_queue->vtable->__vecDelDtor(1);
00592de8          this->_generator_queue = nullptr;
00592de0      }
00592d10  }

00592df1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00592e00  int32_t __thiscall CACQualities::InqWeenieTypeString(class CACQualities const* this, char* arg2, uint32_t const arg3)

00592e00  {
00592e08      uint32_t m_dataCategory = this->m_dataCategory;
00592e0b      uint32_t const var_4 = arg3;
00592e0c      char* var_8 = arg2;
00592e0d      uint32_t m_dataCategory_1 = m_dataCategory;
00592e0e      Client::You_Must_Not_Have_Multiple_Implementations_Of_AddRef_In_A_Hierarchy(m_dataCategory);
00592e16      return 0;
00592e00  }

00592e19                                                                             90 90 90 90 90 90 90                           .......

00592e20  void __thiscall CACQualities::SetPackHeader(class CACQualities* this, uint32_t* arg2)

00592e20  {
00592e29      if (this->_attribCache != 0)
00592e2b          *(uint32_t*)arg2 |= 1;
00592e2b      
00592e33      if (this->_skillStatsTable != 0)
00592e35          *(uint32_t*)arg2 |= 2;
00592e35      
00592e3d      if (this->_body != 0)
00592e3f          *(uint32_t*)arg2 |= 4;
00592e3f      
00592e47      if (this->_spell_book != 0)
00592e49          *(uint32_t*)arg2 |= 0x100;
00592e49      
00592e54      if (this->_enchantment_reg != 0)
00592e56          *(uint32_t*)arg2 |= 0x200;
00592e56      
00592e61      if (this->_event_filter != 0)
00592e63          *(uint32_t*)arg2 |= 8;
00592e63      
00592e6b      if (this->_emote_table != 0)
00592e6d          *(uint32_t*)arg2 |= 0x10;
00592e6d      
00592e75      if (this->_create_list != 0)
00592e77          *(uint32_t*)arg2 |= 0x20;
00592e77      
00592e82      if (this->_pageDataList != 0)
00592e84          *(uint32_t*)arg2 |= 0x40;
00592e84      
00592e8f      if (this->_generator_table != 0)
00592e91          *(uint32_t*)arg2 |= 0x80;
00592e91      
00592e9f      if (this->_generator_registry != 0)
00592ea1          *(uint32_t*)arg2 |= 0x400;
00592ea1      
00592eaf      if (this->_generator_queue != 0)
00592eb1          *(uint32_t*)arg2 |= 0x800;
00592e20  }

00592eba                                                                                90 90 90 90 90 90                            ......

00592ec0  uint32_t __fastcall CACQualities::GetPackSize(class CACQualities* this)

00592ec0  {
00592ec0      class CACQualities* this_1 = this;
00592ec8      uint32_t eax = CBaseQualities::GetPackSize(&this->m_bLoaded);
00592ecd      struct PackObj::VTable* vtable = this->vtable;
00592ed2      int32_t result = (eax + 8);
00592ed7      this_1 = nullptr;
00592ed7      
00592edf      if (vtable != 0)
00592eed          result += *(uint32_t*)(vtable->__vecDelDtor + 0xc)(&this_1, 0);
00592eed      
00592eef      int32_t* ecx_1 = *(int32_t*)((char*)this + 0x34);
00592eef      
00592ef4      if (ecx_1 != 0)
00592f02          result += *(uint32_t*)(*(uint32_t*)ecx_1 + 0xc)(&this_1, 0);
00592f02      
00592f04      struct CBaseQualities::VTable* vtable_1 = this->vtable;
00592f04      
00592f09      if (vtable_1 != 0)
00592f17          result += *(uint32_t*)(vtable_1->__vecDelDtor + 0xc)(&this_1, 0);
00592f17      
00592f19      uint32_t _weenie_type = this->_weenie_type;
00592f19      
00592f1e      if (_weenie_type != 0)
00592f2c          result += *(uint32_t*)(*(uint32_t*)_weenie_type + 0xc)(&this_1, 0);
00592f2c      
00592f2e      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
00592f2e      
00592f33      if (_intStatsTable != 0)
00592f41          result += _intStatsTable->vtable->Pack(&this_1, 0);
00592f41      
00592f43      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
00592f43      
00592f48      if (_int64StatsTable != 0)
00592f56          result += _int64StatsTable->vtable->Pack(&this_1, 0);
00592f56      
00592f58      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
00592f58      
00592f5d      if (_boolStatsTable != 0)
00592f6b          result += _boolStatsTable->vtable->Pack(&this_1, 0);
00592f6b      
00592f6d      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00592f6d      
00592f72      if (_floatStatsTable != 0)
00592f80          result += _floatStatsTable->vtable->Pack(&this_1, 0);
00592f80      
00592f82      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
00592f82      
00592f87      if (_strStatsTable != 0)
00592f95          result += _strStatsTable->vtable->Pack(&this_1, 0);
00592f95      
00592f97      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
00592f97      
00592f9c      if (_didStatsTable != 0)
00592faa          result += _didStatsTable->vtable->Pack(&this_1, 0);
00592faa      
00592fac      class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
00592fac      
00592fb1      if (_iidStatsTable != 0)
00592fbf          result += _iidStatsTable->vtable->Pack(&this_1, 0);
00592fbf      
00592fc1      class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
00592fc1      
00592fc6      if (_posStatsTable == 0)
00592fdb          return result;
00592fdb      
00592fd4      return (result + _posStatsTable->vtable->Pack(&this_1, 0));
00592ec0  }

00592fdc                                                                                      90 90 90 90                              ....

00592fe0  uint8_t __fastcall PlayerDesc::PlayerIsPSRLead(class PlayerDesc* this)

00592fe0  {
00592ff0      int32_t var_8 = 0;
00592ff8      CBaseQualities::InqBool(&this->vtable, 0x2c, &var_8);
00592ff8      
00593003      if (var_8 != 0)
00593003      {
00593005          int32_t eax;
00593005          eax = 1;
0059300b          return 1;
00593003      }
00593003      
00593015      int32_t var_4 = 0;
0059301d      CBaseQualities::InqBool(&this->vtable, 0x2d, &var_4);
00593028      int32_t eax_1;
00593028      eax_1 = var_4 != 0;
0059302f      return eax_1;
00592fe0  }


00593030  uint8_t __fastcall PlayerDesc::PlayerIsPSR(class PlayerDesc* this)

00593030  {
00593030      class PlayerDesc* this_1 = this;
00593030      
0059303b      if (PlayerDesc::PlayerIsPSRLead(this) != 0)
00593041          return 1;
00593041      
0059304c      this_1 = nullptr;
00593054      CBaseQualities::InqBool(&this->vtable, 0x61, &this_1);
0059305f      class PlayerDesc* eax_1;
0059305f      eax_1 = this_1 != 0;
00593064      return eax_1;
00593030  }

00593065                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00593070  void __thiscall CACQualities::CACQualities(class CACQualities* this, class IDClass<_tagDataID,32,0> arg2)

00593070  {
0059307a      class IDClass<_tagDataID,32,0> edx = DBObj::DBObj(this, arg2);
0059307f      this->vtable = &PackObj::`vftable';
00593089      class IDClass<_tagDataID,32,0> var_10_1 = arg2;
0059308c      this->vtable = 0x7c58e0;
00593092      this->vtable = &SerializeUsingPackDBObj::`vftable';
00593099      CBaseQualities::CBaseQualities(&this->vtable, edx);
00593086      this->vtable = &CACQualities::`vftable';
005930a6      __builtin_memset(&this->_attribCache, 0, 0x30);
005930d7      this->vtable = 0x7e4560;
005930dd      this->vtable = &PlayerDesc::`vftable';
00593070  }

005930eb                                   90 90 90 90 90                                                             .....

005930f0  uint32_t CACQualities::GetDBOType(class CACQualities const* this @ ecx) __pure

005930f0  {
005930f5      return 0x10000001;
005930f0  }

005930f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00593100  void* __thiscall PlayerDesc::`vector deleting destructor'(class PlayerDesc* this, uint32_t arg2)

00593100  {
00593103      /* tailcall */
00593103      return PlayerDesc::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00593100  }

00593108                          cc cc cc cc cc cc cc cc                                                          ........

00593110  void* __thiscall PlayerDesc::`vector deleting destructor'(class PlayerDesc* this, uint32_t arg2)

00593110  {
00593113      /* tailcall */
00593113      return PlayerDesc::`scalar deleting destructor'(((char*)this - 0x38), arg2);
00593110  }

00593118                                                                          cc cc cc cc cc cc cc cc                          ........

00593120  class TResult* __thiscall PlayerDesc::QueryInterface(class PlayerDesc* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

00593120  {
00593133      int32_t* key;
00593133      
00593133      if ((1 & (*(uint8_t*)$S97)) != 0)
00593171          key = Offsets[0].key;
00593133      else
00593133      {
0059313d          key = &PlayerDesc_InterfaceType;
00593142          $S97 |= 1;
00593148          Offsets[0].key = 0x7e451c;
0059314d          Offsets[0].ofs = 0;
00593153          Offsets[1].key = 0x7e453c;
0059315d          Offsets[1].ofs = 0;
00593163          Offsets[2].key = 0;
00593169          Offsets[2].ofs = 0;
00593133      }
00593133      
00593178      void* edx_3 = &Offsets;
00593178      
0059317d      while (key != 0)
0059317d      {
0059319f          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0059319f          {
005931c2              if (arg4 != 0)
005931c2              {
005931c4                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
005931ce                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
005931d1                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
005931c2              }
005931c2              
005931da              __return->m_val = 0;
005931dd              return __return;
0059319f          }
0059319f          
005931a1          key = *(uint32_t*)((char*)edx_3 + 8);
005931a4          edx_3 += 8;
0059317d      }
0059317d      
005931b2      __return->m_val = 0x80004002;
005931b9      return __return;
00593120  }


005931e0  class DBObj* CACQualities::Allocate(class CACQualities const* this @ ecx)

005931e0  {
005931e0      /* tailcall */
005931e0      return CACQualities::Allocator();
005931e0  }

005931e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005931f0  class DBObj* CACQualities::Allocator()

005931f0  {
005931f5      void* eax = operator new(0x90);
005931f5      
005931ff      if (eax == 0)
00593212          return 0;
00593212      
0059320f      return CACQualities::CACQualities(eax, INVALID_DID.id);
005931f0  }

00593213                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00593220  void* __thiscall PlayerDesc::`scalar deleting destructor'(class PlayerDesc* this, uint32_t arg2)

00593220  {
00593227      this->vtable = 0x7e4560;
0059322d      this->vtable = &PlayerDesc::`vftable';
00593224      this->vtable = &CACQualities::`vftable';
0059323a      CACQualities::Clear(this);
00593241      CBaseQualities::~CBaseQualities(&this->vtable);
00593248      this->vtable = &PackObj::`vftable';
0059324f      DBObj::~DBObj(this);
0059324f      
00593259      if ((arg2 & 1) != 0)
0059325c          operator delete(this);
0059325c      
00593268      return this;
00593220  }

0059326b                                   90 90 90 90 90                                                             .....

00593270  uint32_t __thiscall CACQualities::Pack(class CACQualities* this, void** arg2, uint32_t arg3)

00593270  {
00593277      int32_t result = this->vtable->IUnknown_Release();
0059327a      uint32_t ebx = arg3;
0059327a      
00593282      if (ebx >= result)
00593282      {
00593292          CBaseQualities::Pack(&this->m_bLoaded, arg2, ebx);
0059329f          arg3 = 0;
005932a7          CACQualities::SetPackHeader(((char*)this - 0x30), &arg3);
005932b2          **(uint32_t**)arg2 = arg3;
005932b6          void* edx_3 = (*(uint32_t*)arg2 + 4);
005932b9          *(uint32_t*)arg2 = edx_3;
005932c0          *(uint32_t*)edx_3 = *(int32_t*)((char*)this + -8);
005932c2          *(uint32_t*)arg2 += 4;
005932c5          struct PackObj::VTable* vtable = this->vtable;
005932c5          
005932ca          if (vtable != 0)
005932d0              *(uint32_t*)(vtable->__vecDelDtor + 0xc)(arg2, ebx);
005932d0          
005932d3          int32_t* ecx_3 = *(int32_t*)((char*)this + 0x34);
005932d3          
005932d8          if (ecx_3 != 0)
005932de              *(uint32_t*)(*(uint32_t*)ecx_3 + 0xc)(arg2, ebx);
005932de          
005932e1          struct CBaseQualities::VTable* vtable_1 = this->vtable;
005932e1          
005932e6          if (vtable_1 != 0)
005932ec              *(uint32_t*)(vtable_1->__vecDelDtor + 0xc)(arg2, ebx);
005932ec          
005932ef          uint32_t _weenie_type = this->_weenie_type;
005932ef          
005932f4          if (_weenie_type != 0)
005932fa              *(uint32_t*)(*(uint32_t*)_weenie_type + 0xc)(arg2, ebx);
005932fa          
005932fd          class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
005932fd          
00593302          if (_intStatsTable != 0)
00593304              _intStatsTable->vtable->Pack(arg2, ebx);
00593304          
0059330b          class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
0059330b          
00593310          if (_int64StatsTable != 0)
00593312              _int64StatsTable->vtable->Pack(arg2, ebx);
00593312          
00593319          class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
00593319          
0059331e          if (_boolStatsTable != 0)
00593320              _boolStatsTable->vtable->Pack(arg2, ebx);
00593320          
00593327          class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00593327          
0059332c          if (_floatStatsTable != 0)
0059332e              _floatStatsTable->vtable->Pack(arg2, ebx);
0059332e          
00593335          class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
00593335          
0059333a          if (_strStatsTable != 0)
0059333c              _strStatsTable->vtable->Pack(arg2, ebx);
0059333c          
00593343          class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
00593343          
00593348          if (_didStatsTable != 0)
0059334a              _didStatsTable->vtable->Pack(arg2, ebx);
0059334a          
00593351          class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
00593351          
00593356          if (_iidStatsTable != 0)
00593358              _iidStatsTable->vtable->Pack(arg2, ebx);
00593358          
0059335f          class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
0059335f          
00593364          if (_posStatsTable != 0)
00593366              _posStatsTable->vtable->Pack(arg2, ebx);
00593282      }
00593282      
00593373      return result;
00593270  }

00593376                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00593380  class TResult __thiscall InterfacePtr<class Interface>::_QueryInterface(InterfacePtr<class Interface>* this, class PlayerDesc* arg2)

00593380  {
00593380      InterfacePtr<class Interface>* this_1 = this;
00593385      int32_t* ecx = arg_8;
00593385      
0059338e      if (ecx == 0)
0059338e      {
005933ec          int32_t* ecx_4 = *(uint32_t*)this;
005933ec          
005933f0          if (ecx_4 != 0)
005933f0          {
005933f2              *(uint32_t*)this = 0;
005933f6              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x14)();
005933f9              *(uint32_t*)((char*)this + 4) = 0;
005933f0          }
005933f0          
00593405          arg2->vtable = 0x80004002;
0059340b          return arg2;
0059338e      }
0059338e      
00593390      int32_t eax_1 = *(uint32_t*)ecx;
005933a1      arg_8 = nullptr;
005933a8      int32_t edi = *(uint32_t*)*(uint32_t*)(eax_1 + 0xc)(&this_1, 0x7e453c, &arg_8);
005933ac      int32_t* ecx_1 = *(uint32_t*)this;
005933ac      
005933ae      if (edi < 0)
005933ae      {
005933b2          if (ecx_1 != 0)
005933b6              *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
005933b6          
005933bd          *(uint32_t*)this = 0;
005933bf          *(uint32_t*)((char*)this + 4) = 0;
005933c2          arg2->vtable = edi;
005933c8          return arg2;
005933ae      }
005933ae      
005933ce      int32_t* ebx = arg_8;
005933ce      
005933d2      if (ecx_1 != 0)
005933d6          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)();
005933d6      
005933dd      *(uint32_t*)this = ebx;
005933df      *(uint32_t*)((char*)this + 4) = 0;
005933e3      arg2->vtable = edi;
005933e9      return arg2;
00593380  }

0059340e                                            90 90                                                                ..

00593410  uint8_t CACQualities::Pack(uint32_t arg1, void*& arg2, uint32_t arg3)

00593410  {
00593413      int32_t ecx;
00593413      /* tailcall */
00593413      return CACQualities::Pack((ecx - 8), arg1, arg2);
00593410  }

00593418                                                                          cc cc cc cc cc cc cc cc                          ........

00593420  int32_t __thiscall CACQualities::UnPack(class CACQualities* this, void** arg2, uint32_t arg3)

00593420  {
00593420      class CACQualities* this_1 = this;
00593427      void* ebx = *(uint32_t*)arg2;
00593427      
00593442      if (CBaseQualities::UnPack(&this->m_bLoaded, arg2, arg3) != 0)
00593442      {
00593448          void* edx_1 = *(uint32_t*)arg2;
0059344d          void* eax_2 = ((char*)edx_1 - ebx);
0059344d          
00593451          if (arg3 > eax_2)
00593451          {
00593459              void* ecx_2 = (arg3 - eax_2);
00593459              
0059345e              if (ecx_2 >= 4)
0059345e              {
00593464                  void** eax_3 = *(uint32_t*)edx_1;
00593473                  *(uint32_t*)arg2 = ((char*)edx_1 + 4);
00593473                  
00593476                  if (((char*)ecx_2 - 4) >= 4)
00593476                  {
0059347c                      int32_t edx_2 = *(uint32_t*)((char*)edx_1 + 4);
00593484                      *(uint32_t*)arg2 = ((char*)edx_1 + 8);
0059348d                      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x44)(edx_2);
0059348d                      
00593498                      if ((eax_3 & 1) == 0)
00593498                      {
005934d1                          struct PackObj::VTable* vtable = this->vtable;
005934d1                          
005934d6                          if (vtable != 0)
005934d6                          {
005934dc                              *(uint32_t*)vtable->__vecDelDtor(1);
005934de                              this->vtable = nullptr;
005934d6                          }
00593498                      }
00593498                      else
00593498                      {
0059349d                          if (this->vtable == 0)
0059349d                          {
005934a1                              void* eax_8 = operator new(0x28);
005934ab                              struct PackObj::VTable* eax_9;
005934ab                              
005934ab                              if (eax_8 == 0)
005934b6                                  eax_9 = nullptr;
005934ab                              else
005934af                                  eax_9 = AttributeCache::AttributeCache(eax_8);
005934af                              
005934b8                              this->vtable = eax_9;
0059349d                          }
0059349d                          
005934c2                          int32_t eax_10 = *(uint32_t*)(this->vtable->__vecDelDtor + 0x10)(arg2, ((char*)ecx_2 - 8));
005934c2                          
005934c7                          if (eax_10 == 0)
005934ce                              return eax_10;
00593498                      }
00593498                      
005934e6                      if ((eax_3 & 2) == 0)
005934e6                      {
00593520                          int32_t* ecx_10 = *(int32_t*)((char*)this + 0x34);
00593520                          
00593525                          if (ecx_10 != 0)
00593525                          {
0059352b                              **(uint32_t**)ecx_10(1);
0059352d                              *(int32_t*)((char*)this + 0x34) = 0;
00593525                          }
005934e6                      }
005934e6                      else
005934e6                      {
005934eb                          if (*(int32_t*)((char*)this + 0x34) == 0)
005934eb                          {
005934ef                              void* eax_12 = operator new(0x14);
005934f9                              int32_t eax_13;
005934f9                              
005934f9                              if (eax_12 == 0)
00593505                                  eax_13 = 0;
005934f9                              else
005934fe                                  eax_13 = PackableHashTable<unsigned long,Skill>::PackableHashTable<unsigned long,Skill>(eax_12, 0);
005934fe                              
00593507                              *(int32_t*)((char*)this + 0x34) = eax_13;
005934eb                          }
005934eb                          
00593511                          int32_t eax_14 = *(uint32_t*)(*(uint32_t*)*(int32_t*)((char*)this + 0x34) + 0x10)(arg2, ((char*)ecx_2 - 8));
00593511                          
00593516                          if (eax_14 == 0)
0059351d                              return eax_14;
005934e6                      }
005934e6                      
00593535                      if ((eax_3 & 4) == 0)
00593535                      {
0059356e                          struct CBaseQualities::VTable* vtable_1 = this->vtable;
0059356e                          
00593573                          if (vtable_1 != 0)
00593573                          {
00593579                              *(uint32_t*)vtable_1->__vecDelDtor(1);
0059357b                              this->vtable = nullptr;
00593573                          }
00593535                      }
00593535                      else
00593535                      {
0059353a                          if (this->vtable == 0)
0059353a                          {
0059353e                              void* eax_16 = operator new(0x18);
00593548                              struct CBaseQualities::VTable* eax_17;
00593548                              
00593548                              if (eax_16 == 0)
00593553                                  eax_17 = nullptr;
00593548                              else
0059354c                                  eax_17 = Body::Body(eax_16);
0059354c                              
00593555                              this->vtable = eax_17;
0059353a                          }
0059353a                          
0059355f                          int32_t eax_18 = *(uint32_t*)(this->vtable->__vecDelDtor + 0x10)(arg2, ((char*)ecx_2 - 8));
0059355f                          
00593564                          if (eax_18 == 0)
0059356b                              return eax_18;
00593535                      }
00593535                      
00593585                      if ((*(uint8_t*)((char*)eax_3)[1] & 1) == 0)
00593585                      {
005935be                          uint32_t _weenie_type = this->_weenie_type;
005935be                          
005935c3                          if (_weenie_type != 0)
005935c3                          {
005935c9                              **(uint32_t**)_weenie_type(1);
005935cb                              this->_weenie_type = 0;
005935c3                          }
00593585                      }
00593585                      else
00593585                      {
0059358a                          if (this->_weenie_type == 0)
0059358a                          {
0059358e                              void* eax_21 = operator new(0x18);
00593598                              uint32_t eax_22;
00593598                              
00593598                              if (eax_21 == 0)
005935a3                                  eax_22 = 0;
00593598                              else
0059359c                                  eax_22 = CSpellBook::CSpellBook(eax_21);
0059359c                              
005935a5                              this->_weenie_type = eax_22;
0059358a                          }
0059358a                          
005935af                          int32_t eax_23 = *(uint32_t*)(*(uint32_t*)this->_weenie_type + 0x10)(arg2, ((char*)ecx_2 - 8));
005935af                          
005935b4                          if (eax_23 == 0)
005935bb                              return eax_23;
00593585                      }
00593585                      
005935d5                      void** eax_27;
005935d5                      
005935d5                      if ((*(uint8_t*)((char*)eax_3)[1] & 2) == 0)
005935d5                      {
0059360e                          class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
0059360e                          
00593613                          if (_intStatsTable != 0)
00593613                          {
00593615                              _intStatsTable->vtable->__vecDelDtor(1);
0059361b                              this->_intStatsTable = nullptr;
00593613                          }
005935d5                      }
005935d5                      else
005935d5                      {
005935da                          if (this->_intStatsTable == 0)
005935da                          {
005935de                              void* eax_25 = operator new(0x1c);
005935e8                              class PackableHashTable<unsigned long,long>* eax_26;
005935e8                              
005935e8                              if (eax_25 == 0)
005935f3                                  eax_26 = nullptr;
005935e8                              else
005935ec                                  eax_26 = CEnchantmentRegistry::CEnchantmentRegistry(eax_25);
005935ec                              
005935f5                              this->_intStatsTable = eax_26;
005935da                          }
005935da                          
005935ff                          eax_27 = this->_intStatsTable->vtable->UnPack(arg2, ((char*)ecx_2 - 8));
005935ff                          
00593604                          if (eax_27 == 0)
0059360b                              return eax_27;
005935d5                      }
005935d5                      
00593623                      if ((eax_3 & 8) == 0)
00593623                      {
0059365c                          class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
0059365c                          
00593661                          if (_int64StatsTable != 0)
00593661                          {
00593663                              _int64StatsTable->vtable->__vecDelDtor(1);
00593669                              this->_int64StatsTable = nullptr;
00593661                          }
00593623                      }
00593623                      else
00593623                      {
00593628                          if (this->_int64StatsTable == 0)
00593628                          {
0059362c                              void* eax_29 = operator new(0xc);
00593636                              class PackableHashTable<unsigned long,__int64>* eax_30;
00593636                              
00593636                              if (eax_29 == 0)
00593641                                  eax_30 = nullptr;
00593636                              else
0059363a                                  eax_30 = EventFilter::EventFilter(eax_29);
0059363a                              
00593643                              this->_int64StatsTable = eax_30;
00593628                          }
00593628                          
0059364d                          eax_27 = this->_int64StatsTable->vtable->UnPack(arg2, ((char*)ecx_2 - 8));
0059364d                          
00593652                          if (eax_27 == 0)
00593659                              return eax_27;
00593623                      }
00593623                      
00593671                      if ((eax_3 & 0x10) == 0)
00593671                      {
005936aa                          class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
005936aa                          
005936af                          if (_boolStatsTable != 0)
005936af                          {
005936b1                              _boolStatsTable->vtable->__vecDelDtor(1);
005936b7                              this->_boolStatsTable = nullptr;
005936af                          }
00593671                      }
00593671                      else
00593671                      {
00593676                          if (this->_boolStatsTable == 0)
00593676                          {
0059367a                              void* eax_32 = operator new(0x18);
00593684                              class PackableHashTable<unsigned long,int>* eax_33;
00593684                              
00593684                              if (eax_32 == 0)
0059368f                                  eax_33 = nullptr;
00593684                              else
00593688                                  eax_33 = CEmoteTable::CEmoteTable(eax_32);
00593688                              
00593691                              this->_boolStatsTable = eax_33;
00593676                          }
00593676                          
0059369b                          eax_27 = this->_boolStatsTable->vtable->UnPack(arg2, ((char*)ecx_2 - 8));
0059369b                          
005936a0                          if (eax_27 == 0)
005936a7                              return eax_27;
00593671                      }
00593671                      
005936bf                      if ((eax_3 & 0x20) == 0)
005936bf                      {
00593700                          class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00593700                          
00593705                          if (_floatStatsTable != 0)
00593705                          {
00593707                              _floatStatsTable->vtable->__vecDelDtor(1);
0059370d                              this->_floatStatsTable = nullptr;
00593705                          }
005936bf                      }
005936bf                      else
005936bf                      {
005936c4                          if (this->_floatStatsTable == 0)
005936c4                          {
005936c8                              void* eax_35 = operator new(0x10);
005936c8                              
005936d2                              if (eax_35 == 0)
005936e5                                  eax_35 = nullptr;
005936d2                              else
005936d2                              {
005936d4                                  *(uint32_t*)eax_35 = 0x7e43bc;
005936da                                  *(uint32_t*)((char*)eax_35 + 4) = 0;
005936dd                                  *(uint32_t*)((char*)eax_35 + 8) = 0;
005936e0                                  *(uint32_t*)((char*)eax_35 + 0xc) = 0;
005936d2                              }
005936d2                              
005936e7                              this->_floatStatsTable = eax_35;
005936c4                          }
005936c4                          
005936f1                          eax_27 = this->_floatStatsTable->vtable->UnPack(arg2, ((char*)ecx_2 - 8));
005936f1                          
005936f6                          if (eax_27 == 0)
005936fd                              return eax_27;
005936bf                      }
005936bf                      
00593715                      if ((eax_3 & 0x40) == 0)
00593715                      {
0059374e                          class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
0059374e                          
00593753                          if (_strStatsTable != 0)
00593753                          {
00593755                              _strStatsTable->vtable->__vecDelDtor(1);
0059375b                              this->_strStatsTable = nullptr;
00593753                          }
00593715                      }
00593715                      else
00593715                      {
0059371a                          if (this->_strStatsTable == 0)
0059371a                          {
0059371e                              void* eax_37 = operator new(0x1c);
00593728                              class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* eax_38;
00593728                              
00593728                              if (eax_37 == 0)
00593733                                  eax_38 = nullptr;
00593728                              else
0059372c                                  eax_38 = PageDataList::PageDataList(eax_37);
0059372c                              
00593735                              this->_strStatsTable = eax_38;
0059371a                          }
0059371a                          
0059373f                          eax_27 = this->_strStatsTable->vtable->UnPack(arg2, ((char*)ecx_2 - 8));
0059373f                          
00593744                          if (eax_27 == 0)
0059374b                              return eax_27;
00593715                      }
00593715                      
0059375e                      eax_27 = eax_3;
0059375e                      
00593764                      if (eax_27 >= 0)
00593764                      {
0059379d                          class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
0059379d                          
005937a2                          if (_didStatsTable != 0)
005937a2                          {
005937a4                              _didStatsTable->vtable->__vecDelDtor(1);
005937aa                              this->_didStatsTable = nullptr;
005937a2                          }
00593764                      }
00593764                      else
00593764                      {
00593769                          if (this->_didStatsTable == 0)
00593769                          {
0059376d                              void* eax_40 = operator new(0x14);
00593777                              class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* eax_41;
00593777                              
00593777                              if (eax_40 == 0)
00593782                                  eax_41 = nullptr;
00593777                              else
0059377b                                  eax_41 = GeneratorTable::GeneratorTable(eax_40);
0059377b                              
00593784                              this->_didStatsTable = eax_41;
00593769                          }
00593769                          
0059378e                          int32_t eax_42 = this->_didStatsTable->vtable->UnPack(arg2, ((char*)ecx_2 - 8));
0059378e                          
00593793                          if (eax_42 == 0)
0059379a                              return eax_42;
00593764                      }
00593764                      
005937b4                      if ((*(uint8_t*)((char*)eax_3)[1] & 4) == 0)
005937b4                      {
005937ed                          class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
005937ed                          
005937f2                          if (_iidStatsTable != 0)
005937f2                          {
005937f4                              _iidStatsTable->vtable->__vecDelDtor(1);
005937fa                              this->_iidStatsTable = nullptr;
005937f2                          }
005937b4                      }
005937b4                      else
005937b4                      {
005937b9                          if (this->_iidStatsTable == 0)
005937b9                          {
005937bd                              void* eax_45 = operator new(0x18);
005937c7                              class PackableHashTable<unsigned long,unsigned long>* eax_46;
005937c7                              
005937c7                              if (eax_45 == 0)
005937d2                                  eax_46 = nullptr;
005937c7                              else
005937cb                                  eax_46 = GeneratorRegistry::GeneratorRegistry(eax_45);
005937cb                              
005937d4                              this->_iidStatsTable = eax_46;
005937b9                          }
005937b9                          
005937de                          int32_t eax_47 = this->_iidStatsTable->vtable->UnPack(arg2, ((char*)ecx_2 - 8));
005937de                          
005937e3                          if (eax_47 == 0)
005937ea                              return eax_47;
005937b4                      }
005937b4                      
00593804                      if ((*(uint8_t*)((char*)eax_3)[1] & 8) == 0)
00593804                      {
0059383f                          class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
0059383f                          
00593844                          if (_posStatsTable != 0)
00593844                          {
00593846                              _posStatsTable->vtable->__vecDelDtor(1);
0059384c                              this->_posStatsTable = nullptr;
00593844                          }
00593844                          
0059386a                          return PackObj::VERIFY_ADDR(*(uint32_t*)arg2, ebx, arg3);
00593804                      }
00593804                      
00593809                      if (this->_posStatsTable == 0)
00593809                      {
0059380d                          void* eax_50 = operator new(0x14);
00593817                          class PackableHashTable<unsigned long,Position>* eax_51;
00593817                          
00593817                          if (eax_50 == 0)
00593822                              eax_51 = nullptr;
00593817                          else
0059381b                              eax_51 = GeneratorQueue::GeneratorQueue(eax_50);
0059381b                          
00593824                          this->_posStatsTable = eax_51;
00593809                      }
00593809                      
00593833                      if (this->_posStatsTable->vtable->UnPack(arg2, ((char*)ecx_2 - 8)) != 0)
0059386a                          return PackObj::VERIFY_ADDR(*(uint32_t*)arg2, ebx, arg3);
00593476                  }
0059345e              }
00593451          }
00593442      }
00593442      
0059383c      return 0;
00593420  }

0059386d                                         90 90 90                                                               ...

00593870  void __fastcall PlayerDesc::PlayerDesc(class PlayerDesc* this)

00593870  {
00593878      int32_t esi;
00593878      int32_t var_14 = esi;
00593879      uint32_t edi;
00593879      uint32_t var_18 = edi;
0059387a      uint32_t id = INVALID_DID.id;
0059387d      CACQualities::CACQualities(this, id);
00593882      id = this;
0059388c      this->vtable = 0x7e4600;
00593892      this->vtable = &PlayerDesc::`vftable';
00593899      this->vtable = &CACQualities::`vftable';
005938a0      int32_t var_8 = 0;
005938a8      int32_t var_4 = 0;
005938b0      void __return;
005938b0      InterfacePtr<class Interface>::_QueryInterface(&var_8, &__return);
005938cd      int32_t* var_c;
005938cd      InterfaceSystem::RegisterClassA(InterfaceSystem::GetInstance(), &__return, &PlayerDesc_ClassType, var_c, nullptr);
005938cd      uint32_t* esp = &id;
005938cd      
005938d4      if (var_c != 0)
005938d4      {
005938da          *(uint32_t*)(*(uint32_t*)var_c + 0x14)();
005938da          esp = &var_18;
005938d4      }
005938d4      
005938dd      *(uint32_t*)esp;
005938dd      esp[1];
00593870  }

005938e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005938f0  uint32_t __fastcall PlayerDesc::AddRef(class PlayerDesc const* this)

005938f0  {
005938f0      /* tailcall */
005938f0      return DBObj::AddRef(this);
005938f0  }

005938f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00593900  uint32_t __fastcall PlayerDesc::Release(class PlayerDesc const* this)

00593900  {
00593900      /* tailcall */
00593900      return DBObj::Release(this);
00593900  }

00593905                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00593910  void __fastcall PlayerDesc::Cleanup(class PlayerDesc* this)

00593910  {
00593913      class PlayerDesc* __return_1;
00593913      class PlayerDesc* __return = __return_1;
00593914      class PlayerDesc* this_1 = this;
0059391e      int32_t var_8 = 0;
00593926      int32_t var_4 = 0;
0059392e      int32_t* var_c;
0059392e      InterfacePtr<class Interface>::_QueryInterface(&var_8, &var_c);
00593933      int32_t* esi = var_c;
0059394b      InterfaceSystem::UnregisterClassA(InterfaceSystem::GetInstance(), &__return, &PlayerDesc_ClassType, esi, nullptr);
0059394b      class PlayerDesc** esp = &this_1;
0059394b      
00593952      if (esi != 0)
00593952      {
00593958          *(uint32_t*)(*(uint32_t*)esi + 0x14)();
00593958          esp = &__return;
00593952      }
00593952      
0059395b      *(uint32_t*)esp;
00593910  }


00593960  uint8_t CACQualities::UnPack(int32_t arg1, void*& arg2, uint32_t arg3)

00593960  {
00593963      int32_t ecx;
00593963      /* tailcall */
00593963      return CACQualities::UnPack((ecx - 8), arg1, arg2);
00593960  }

00593968                          cc cc cc cc cc cc cc cc                                                          ........

00593970  int32_t __thiscall CEnchantmentRegistry::InqVitae(class CEnchantmentRegistry const* this, class Enchantment* arg2)

00593970  {
00593970      class Enchantment* _vitae = this->_vitae;
00593970      
00593975      if (_vitae == 0)
00593977          return _vitae;
00593977      
0059397f      Enchantment::operator=(arg2, _vitae);
00593989      return 1;
00593970  }

0059398c                                      90 90 90 90                                                              ....

00593990  class Enchantment* __fastcall CEnchantmentRegistry::GetVitaeValue(class CEnchantmentRegistry const* this)

00593990  {
00593990      class Enchantment* _vitae = this->_vitae;
00593990      
00593995      if (_vitae == 0)
0059399d          return _vitae;
0059399d      
0059399e      _vitae->_smod;
005939a1      return _vitae;
00593990  }

005939a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005939b0  void __fastcall CEnchantmentRegistry::CEnchantmentRegistry(class CEnchantmentRegistry* this)

005939b0  {
005939b4      this->vtable = 0x7e4668;
005939ba      __builtin_memset(&this->_mult_list, 0, 0x18);
005939b0  }

005939cd                                         90 90 90                                                               ...

005939d0  void __fastcall CEnchantmentRegistry::Clear(class CEnchantmentRegistry* this)

005939d0  {
005939d3      class Enchantment* _vitae = this->_vitae;
005939d3      
005939db      if (_vitae != 0)
005939db      {
005939dd          _vitae->vtable->__vecDelDtor(1);
005939e3          this->_vitae = nullptr;
005939db      }
005939db      
005939e6      class PackableList<Enchantment>* _mult_list = this->_mult_list;
005939e6      
005939eb      if (_mult_list != 0)
005939eb      {
005939ed          _mult_list->vtable->__vecDelDtor(1);
005939f3          this->_mult_list = nullptr;
005939eb      }
005939eb      
005939f6      class PackableList<Enchantment>* _add_list = this->_add_list;
005939f6      
005939fb      if (_add_list != 0)
005939fb      {
005939fd          _add_list->vtable->__vecDelDtor(1);
00593a03          this->_add_list = nullptr;
005939fb      }
005939fb      
00593a06      class PackableList<Enchantment>* _cooldown_list = this->_cooldown_list;
00593a06      
00593a0b      if (_cooldown_list != 0)
00593a0b      {
00593a0d          _cooldown_list->vtable->__vecDelDtor(1);
00593a13          this->_cooldown_list = nullptr;
00593a0b      }
00593a0b      
00593a16      this->m_cHelpfulEnchantments = 0;
00593a19      this->m_cHarmfulEnchantments = 0;
005939d0  }

00593a1f                                                                                               90                                 .

00593a20  int32_t __thiscall CEnchantmentRegistry::UpdateVitae(class CEnchantmentRegistry* this, class Enchantment const* arg2)

00593a20  {
00593a2f      if ((arg2->_smod.type & "activation type (%s) with '%s' b…") != 0)
00593a2f      {
00593a36          class Enchantment* eax_3;
00593a36          
00593a36          if (this->_vitae == 0)
00593a36          {
00593a3a              void* eax_2 = operator new(0x50);
00593a3a              
00593a44              if (eax_2 == 0)
00593a50                  eax_3 = nullptr;
00593a44              else
00593a49                  eax_3 = Enchantment::Enchantment(eax_2, arg2);
00593a49              
00593a54              this->_vitae = eax_3;
00593a36          }
00593a36          
00593a57          if ((this->_vitae != 0 || eax_3 != 0))
00593a57          {
00593a64              Enchantment::operator=(this->_vitae, arg2);
00593a70              return 1;
00593a57          }
00593a2f      }
00593a2f      
00593a5d      return 0;
00593a20  }

00593a73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00593a80  uint32_t __thiscall CEnchantmentRegistry::Pack(class CEnchantmentRegistry* this, void** arg2, uint32_t arg3)

00593a80  {
00593a85      uint32_t result = CEnchantmentRegistry::pack_size(this);
00593a85      
00593a92      if (arg3 >= result)
00593a92      {
00593a97          int32_t eax = 0;
00593a97          
00593a9b          if (this->_mult_list != 0)
00593a9d              eax = 1;
00593a9d          
00593aa7          if (this->_add_list != 0)
00593aa9              eax |= 2;
00593aa9          
00593ab1          if (this->_cooldown_list != 0)
00593ab3              eax |= 8;
00593ab3          
00593abb          if (this->_vitae != 0)
00593abd              eax |= 4;
00593abd          
00593ac7          **(uint32_t**)arg2 = eax;
00593ac9          *(uint32_t*)arg2 += 4;
00593acc          class PackableList<Enchantment>* _mult_list = this->_mult_list;
00593acc          
00593ad1          if (_mult_list != 0)
00593ad3              _mult_list->vtable->Pack(arg2, arg3);
00593ad3          
00593ada          class PackableList<Enchantment>* _add_list = this->_add_list;
00593ada          
00593adf          if (_add_list != 0)
00593ae1              _add_list->vtable->Pack(arg2, arg3);
00593ae1          
00593ae8          class PackableList<Enchantment>* _cooldown_list = this->_cooldown_list;
00593ae8          
00593aed          if (_cooldown_list != 0)
00593aef              _cooldown_list->vtable->Pack(arg2, arg3);
00593aef          
00593af6          class Enchantment* _vitae = this->_vitae;
00593af6          
00593afb          if (_vitae != 0)
00593afd              _vitae->vtable->Pack(arg2, arg3);
00593a92      }
00593a92      
00593b0a      return result;
00593a80  }

00593b0d                                         90 90 90                                                               ...

00593b10  class CSpellBase* __thiscall CSpellTable::GetSpellBase(class CSpellTable const* this, uint32_t const arg2)

00593b10  {
00593b11      uint32_t _table_size = this->_spellBaseHash._table_size;
00593b11      
00593b17      if (_table_size != 0)
00593b17      {
00593b19          class PackableHashData<unsigned long,CSpellBase>** _buckets = this->_spellBaseHash._buckets;
00593b19          
00593b1e          if (_buckets != 0)
00593b1e          {
00593b2f              for (int32_t* i = _buckets[(COMBINE(0, arg2) % _table_size)]; i != 0; i = i[0x26])
00593b2f              {
00593b33                  if (arg2 == *(uint32_t*)i)
00593b4b                      return &i[2];
00593b2f              }
00593b1e          }
00593b17      }
00593b17      
00593b43      return 0;
00593b10  }

00593b4e                                            90 90                                                                ..

00593b50  int32_t __stdcall CEnchantmentRegistry::Enchant(class CEnchantmentRegistry const* this @ ecx, class PackableList<Enchantment>* arg2, float* arg3)

00593b50  {
00593b5a      class PackableLLNode<Enchantment>* i = arg2->head;
00593b5e      int32_t result = 0;
00593b5e      
00593b62      while (i != 0)
00593b62      {
00593b67          int32_t eax = Enchantment::Enchant(i, arg3);
00593b6c          i = i->next;
00593b6f          result |= eax;
00593b62      }
00593b62      
00593b78      return result;
00593b50  }

00593b7b                                                                                   90 90 90 90 90                             .....

00593b80  int32_t __stdcall CEnchantmentRegistry::Enchant(class CEnchantmentRegistry const* this @ ecx, class PackableList<Enchantment>* arg2, struct EnchantedQualityDetails* arg3)

00593b80  {
00593b8a      class PackableLLNode<Enchantment>* i = arg2->head;
00593b8e      int32_t result = 0;
00593b8e      
00593b92      while (i != 0)
00593b92      {
00593b97          int32_t eax = Enchantment::Enchant(i, arg3);
00593b9c          i = i->next;
00593b9f          result |= eax;
00593b92      }
00593b92      
00593ba8      return result;
00593b80  }

00593bab                                   90 90 90 90 90                                                             .....

00593bb0  int32_t __stdcall CEnchantmentRegistry::ReplaceEnchantmentInList(class CEnchantmentRegistry* this @ ecx, class Enchantment const* arg2, class PackableList<Enchantment>* arg3)

00593bb0  {
00593bb5      int32_t ebx = 0;
00593bb5      
00593bb9      if (arg3 == 0)
00593bbc          return arg3;
00593bbc      
00593bc0      class PackableLLNode<Enchantment>* i = arg3->head;
00593bc0      
00593bca      while (i != 0)
00593bca      {
00593bd6          if (ContentProfile::operator==(i, arg2) == 0)
00593bd6          {
00593bec              i = i->next;
00593bf1              ebx |= 0;
00593bd6          }
00593bd6          else
00593bd6          {
00593bdb              Enchantment::operator=(i, arg2);
00593be0              i = i->next;
00593be8              ebx |= 1;
00593bd6          }
00593bca      }
00593bca      
00593bfa      return ebx;
00593bb0  }

00593bfd                                                                                         90 90 90                               ...

00593c00  int32_t __stdcall CEnchantmentRegistry::IsEnchantmentInList(class CEnchantmentRegistry const* this @ ecx, uint32_t const arg2, class PackableList<Enchantment>* arg3)

00593c00  {
00593c06      if (arg3 != 0)
00593c06      {
00593c12          for (class PackableLLNode<Enchantment>* i = arg3->head; i != 0; i = i->next)
00593c12          {
00593c1f              if (((uint32_t)((int16_t)i->data._id)) == arg2)
00593c2b                  return 1;
00593c12          }
00593c06      }
00593c06      
00593c30      return 0;
00593c00  }

00593c33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00593c40  int32_t __thiscall CEnchantmentRegistry::UpdateSpellTotals(class CEnchantmentRegistry* this, uint32_t arg2, int32_t arg3)

00593c40  {
00593c4e      if (arg2 >= 0x8000)
00593c57          return 1;
00593c57      
00593c5b      int32_t var_10 = 0x10000005;
00593c60      int32_t var_14 = 2;
00593c62      int32_t var_18 = 6;
00593c64      int32_t eax;
00593c64      int32_t edx;
00593c64      class DBObj* eax_2 = DBObj::GetByEnum(eax, edx, this);
00593c64      
00593c70      if (eax_2 != 0)
00593c70      {
00593c75          class CSpellBase* eax_3 = CSpellTable::GetSpellBase(eax_2, arg2);
00593c75          
00593c7c          if (eax_3 != 0)
00593c7c          {
00593c91              if ((eax_3->_bitfield & 4) != 0)
00593c91              {
00593c9c                  this->m_cHelpfulEnchantments += arg3;
00593c9f                  eax_2->vtable->Release();
00593cae                  return 1;
00593c91              }
00593c91              
00593cba              this->m_cHarmfulEnchantments += arg3;
00593cbd              eax_2->vtable->Release();
00593ccc              return 1;
00593c7c          }
00593c7c          
00593c7e          eax_2->vtable->Release();
00593c70      }
00593c70      
00593c8a      return 0;
00593c40  }

00593ccf                                               90                                                                 .

00593cd0  void __thiscall CEnchantmentRegistry::CountSpellsInList(class CEnchantmentRegistry* this, class PackableList<Enchantment>* arg2)

00593cd0  {
00593cd9      if (arg2 != 0)
00593cd9      {
00593ce2          for (class PackableLLNode<Enchantment>* i = arg2->head; i != 0; i = i->next)
00593cf1              CEnchantmentRegistry::UpdateSpellTotals(this, ((uint32_t)((int16_t)i->data._id)), 1);
00593cd9      }
00593cd0  }


00593d00  int32_t __stdcall CEnchantmentRegistry::AttemptToReplaceSpellInList(class CEnchantmentRegistry* this @ ecx, class Enchantment const* arg2, class PackableList<Enchantment>** arg3)

00593d00  {
00593d04      class PackableList<Enchantment>* ecx = *(uint32_t*)arg3;
00593d04      
00593d08      if (ecx != 0)
00593d08      {
00593d0e          long double x87_r7_1 = ((long double)arg2->_duration);
00593d11          long double temp1_1 = ((long double)0.0);
00593d11          (x87_r7_1 - temp1_1);
00593d17          class PackableList<Enchantment>** eax;
00593d17          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00593d19          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00593d19          
00593d1c          if (p_1)
00593d1c          {
00593d28              for (class PackableLLNode<Enchantment>* i = ecx->head; i != 0; i = i->next)
00593d28              {
00593d35                  if (((uint32_t)(((int16_t)i->data._id) ^ ((int16_t)arg2->_id))) == 0)
00593d35                  {
00593d37                      long double x87_r7_2 = ((long double)i->data._duration);
00593d3a                      long double temp2_1 = ((long double)0.0);
00593d3a                      (x87_r7_2 - temp2_1);
00593d3a                      
00593d45                      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
00593d45                      {
00593d4d                          Enchantment::operator=(i, arg2);
00593d57                          return 1;
00593d45                      }
00593d35                  }
00593d28              }
00593d1c          }
00593d08      }
00593d08      
00593d20      return 0;
00593d00  }

00593d5f                                                                                               90                                 .

00593d60  void __thiscall PackableList<Enchantment>::InsertHead(class PackableList<Enchantment>* this, class Enchantment const* arg2)

00593d60  {
00593d6b      void* edi = operator new(0x58);
00593d6b      
00593d72      if (edi == 0)
00593d90          edi = nullptr;
00593d72      else
00593d72      {
00593d7b          Enchantment::Enchantment(edi, arg2);
00593d80          *(uint32_t*)((char*)edi + 0x50) = 0;
00593d87          *(uint32_t*)((char*)edi + 0x54) = 0;
00593d72      }
00593d72      
00593d92      class PackableLLNode<Enchantment>* head = this->head;
00593d92      
00593d97      if (head == 0)
00593d97      {
00593d99          uint32_t curNum = this->curNum;
00593d9c          this->tail = edi;
00593d9f          this->head = edi;
00593da4          this->curNum = (curNum + 1);
00593da8          return;
00593d97      }
00593d97      
00593dab      head->prev = edi;
00593dae      *(uint32_t*)((char*)edi + 0x50) = head;
00593db1      uint32_t curNum_1 = this->curNum;
00593db4      this->head = edi;
00593db9      this->curNum = (curNum_1 + 1);
00593d60  }


00593dc0  void* __thiscall CEnchantmentRegistry::`scalar deleting destructor'(class CEnchantmentRegistry* this, uint32_t arg2)

00593dc0  {
00593dc3      this->vtable = 0x7e4668;
00593dc9      CEnchantmentRegistry::Clear(this);
00593dd3      this->vtable = 0x79285c;
00593dd3      
00593dd9      if ((arg2 & 1) != 0)
00593ddc          operator delete(this);
00593ddc      
00593de7      return this;
00593dc0  }

00593dea                                90 90 90 90 90 90                                                            ......

00593df0  int32_t __thiscall CEnchantmentRegistry::AddEnchantmentToList(class CEnchantmentRegistry* this, class Enchantment const* arg2, class PackableList<Enchantment>** arg3)

00593df0  {
00593dff      if (*(uint32_t*)arg3 == 0)
00593dff      {
00593e03          class PackableList<Enchantment>* eax_1 = operator new(0x10);
00593e03          
00593e0d          if (eax_1 == 0)
00593e20              eax_1 = nullptr;
00593e0d          else
00593e0d          {
00593e0f              eax_1->vtable = 0x7b15c4;
00593e15              eax_1->head = nullptr;
00593e18              eax_1->tail = nullptr;
00593e1b              eax_1->curNum = 0;
00593e0d          }
00593e0d          
00593e24          *(uint32_t*)arg3 = eax_1;
00593e24          
00593e26          if (eax_1 == 0)
00593e2d              return 0;
00593dff      }
00593dff      
00593e3f      if (CEnchantmentRegistry::AttemptToReplaceSpellInList(this, arg2, arg3) == 0)
00593e3f      {
00593e44          PackableList<Enchantment>::InsertHead(*(uint32_t*)arg3, arg2);
00593e56          CEnchantmentRegistry::UpdateSpellTotals(this, ((uint32_t)((int16_t)arg2->_id)), 1);
00593e3f      }
00593e3f      
00593e63      return 1;
00593df0  }

00593e66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00593e70  int32_t __thiscall CEnchantmentRegistry::UpdateEnchantment(class CEnchantmentRegistry* this, class Enchantment const* arg2)

00593e70  {
00593e75      uint32_t type = arg2->_smod.type;
00593e75      
00593e89      if ((*(uint8_t*)((char*)(((int16_t)(((type >> 9) ^ type) >> 1)) ^ type))[1] & 0x40) == 0)
00593e8f          return 0;
00593e8f      
00593e92      uint32_t type_1 = arg2->_smod.type;
00593e92      
00593e9a      if ((type_1 & "activation type (%s) with '%s' b…") != 0)
00593ea6          return CEnchantmentRegistry::UpdateVitae(this, arg2);
00593ea6      
00593eae      int32_t eax_2;
00593eae      
00593eae      if ((type_1 & 0x1000000) != 0)
00593eb7          eax_2 = CEnchantmentRegistry::ReplaceEnchantmentInList(this, arg2, this->_cooldown_list);
00593eb7      
00593ebe      if (((type_1 & 0x1000000) == 0 || eax_2 == 0))
00593ebe      {
00593ec4          uint16_t type_2 = ((int16_t)arg2->_smod.type);
00593ec4          
00593eca          if ((*(uint8_t*)((char*)type_2)[1] & 0x40) != 0)
00593eca          {
00593eda              if (CEnchantmentRegistry::ReplaceEnchantmentInList(this, arg2, this->_mult_list) != 0)
00593ee3                  return 1;
00593ee3              
00593eda              goto label_593efa;
00593eca          }
00593eca          
00593ee8          if (*(uint8_t*)((char*)type_2)[1] >= 0)
00593ee8          {
00593efa          label_593efa:
00593efa              uint32_t type_3 = arg2->_smod.type;
00593efa              
00593f02              if ((type_3 & 0x1000000) != 0)
00593f02              {
00593f0b                  CEnchantmentRegistry::AddEnchantmentToList(this, arg2, &this->_cooldown_list);
00593f17                  return 1;
00593f02              }
00593f02              
00593f1d              if ((*(uint8_t*)((char*)type_3)[1] & 0x40) != 0)
00593f1d              {
00593f26                  CEnchantmentRegistry::AddEnchantmentToList(this, arg2, &this->_mult_list);
00593f32                  return 1;
00593f1d              }
00593f1d              
00593f37              if (*(uint8_t*)((char*)type_3)[1] < 0)
00593f40                  CEnchantmentRegistry::AddEnchantmentToList(this, arg2, &this->_add_list);
00593ee8          }
00593ee8          else if (CEnchantmentRegistry::ReplaceEnchantmentInList(this, arg2, this->_add_list) == 0)
00593ef8              goto label_593efa;
00593ebe      }
00593ebe      
00593f4c      return 1;
00593e70  }

00593f4f                                               90                                                                 .

00593f50  int32_t __thiscall CEnchantmentRegistry::UpdateEnchantmentList(class CEnchantmentRegistry* this, class PackableList<Enchantment>* arg2)

00593f50  {
00593f56      class PackableLLNode<Enchantment>* i = arg2->head;
00593f5e      int32_t result = 0;
00593f5e      
00593f62      while (i != 0)
00593f62      {
00593f67          int32_t eax = CEnchantmentRegistry::UpdateEnchantment(this, i);
00593f6c          i = i->next;
00593f6f          result |= eax;
00593f62      }
00593f62      
00593f78      return result;
00593f50  }

00593f7b                                                                                   90 90 90 90 90                             .....

00593f80  int32_t __thiscall CEnchantmentRegistry::IsEnchanted(class CEnchantmentRegistry const* this, uint32_t const arg2)

00593f80  {
00593f8a      if (arg2 == 0)
00593f90          return 0;
00593f90      
00593f99      if (arg2 == 0x29a)
00593f99      {
00593fa3          int32_t result;
00593fa3          result = this->_vitae != 0;
00593fa7          return result;
00593f99      }
00593f99      
00593fb8      if ((CEnchantmentRegistry::IsEnchantmentInList(this, arg2, this->_cooldown_list) == 0 && CEnchantmentRegistry::IsEnchantmentInList(this, arg2, this->_mult_list) == 0))
00593fb8      {
00593fdb          int32_t eax_5 = CEnchantmentRegistry::IsEnchantmentInList(this, arg2, this->_add_list);
00593fe0          int32_t eax_6 = -(eax_5);
00593fe8          return -((eax_6 - eax_6));
00593fb8      }
00593fb8      
00593fc1      return 1;
00593f80  }

00593feb                                   90 90 90 90 90                                                             .....

00593ff0  int32_t __thiscall CEnchantmentRegistry::UnPack(class CEnchantmentRegistry* this, void** arg2, uint32_t arg3)

00593ff0  {
00593ff0      class CEnchantmentRegistry* this_1 = this;
00593ff0      
00593ffc      if (arg3 < 4)
00594003          return 0;
00594003      
0059400b      void* eax_1 = *(uint32_t*)arg2;
0059400e      void** ecx_1 = *(uint32_t*)eax_1;
00594024      *(uint32_t*)arg2 = ((char*)eax_1 + 4);
00594024      
00594027      if ((ecx_1 & 1) == 0)
00594027      {
0059406a          class PackableList<Enchantment>* _mult_list_1 = this->_mult_list;
0059406a          
0059406f          if (_mult_list_1 != 0)
0059406f          {
00594071              _mult_list_1->vtable->__vecDelDtor(1);
00594077              this->_mult_list = nullptr;
0059406f          }
0059406f          
0059406f          goto label_59407f;
00594027      }
00594027      
0059402c      if (this->_mult_list == 0)
0059402c      {
00594030          void* eax_3 = operator new(0x10);
00594030          
0059403a          if (eax_3 == 0)
0059404d              eax_3 = nullptr;
0059403a          else
0059403a          {
0059403c              *(uint32_t*)eax_3 = 0x7b15c4;
00594042              *(uint32_t*)((char*)eax_3 + 4) = 0;
00594045              *(uint32_t*)((char*)eax_3 + 8) = 0;
00594048              *(uint32_t*)((char*)eax_3 + 0xc) = 0;
0059403a          }
0059403a          
0059404f          this->_mult_list = eax_3;
0059402c      }
0059402c      
0059405e      if (this->_mult_list->vtable->UnPack(arg2, (arg3 - 4)) != 0)
0059405e      {
0059407f      label_59407f:
0059407f          
0059407f          if ((ecx_1 & 2) == 0)
0059407f          {
005940c0              class PackableList<Enchantment>* _add_list = this->_add_list;
005940c0              
005940c5              if (_add_list != 0)
005940c5              {
005940c7                  _add_list->vtable->__vecDelDtor(1);
005940cd                  this->_add_list = nullptr;
005940c5              }
0059407f          }
0059407f          else
0059407f          {
00594084              if (this->_add_list == 0)
00594084              {
00594088                  void* eax_7 = operator new(0x10);
00594088                  
00594092                  if (eax_7 == 0)
005940a5                      eax_7 = nullptr;
00594092                  else
00594092                  {
00594094                      *(uint32_t*)eax_7 = 0x7b15c4;
0059409a                      *(uint32_t*)((char*)eax_7 + 4) = 0;
0059409d                      *(uint32_t*)((char*)eax_7 + 8) = 0;
005940a0                      *(uint32_t*)((char*)eax_7 + 0xc) = 0;
00594092                  }
00594092                  
005940a7                  this->_add_list = eax_7;
00594084              }
00594084              
005940b1              int32_t eax_9 = this->_add_list->vtable->UnPack(arg2, (arg3 - 4));
005940b1              
005940b6              if (eax_9 == 0)
005940bd                  return eax_9;
0059407f          }
0059407f          
005940d5          if ((ecx_1 & 8) == 0)
005940d5          {
00594116              class PackableList<Enchantment>* _cooldown_list = this->_cooldown_list;
00594116              
0059411b              if (_cooldown_list != 0)
0059411b              {
0059411d                  _cooldown_list->vtable->__vecDelDtor(1);
00594123                  this->_cooldown_list = nullptr;
0059411b              }
005940d5          }
005940d5          else
005940d5          {
005940da              if (this->_cooldown_list == 0)
005940da              {
005940de                  void* eax_10 = operator new(0x10);
005940de                  
005940e8                  if (eax_10 == 0)
005940fb                      eax_10 = nullptr;
005940e8                  else
005940e8                  {
005940ea                      *(uint32_t*)eax_10 = 0x7b15c4;
005940f0                      *(uint32_t*)((char*)eax_10 + 4) = 0;
005940f3                      *(uint32_t*)((char*)eax_10 + 8) = 0;
005940f6                      *(uint32_t*)((char*)eax_10 + 0xc) = 0;
005940e8                  }
005940e8                  
005940fd                  this->_cooldown_list = eax_10;
005940da              }
005940da              
00594107              int32_t eax_12 = this->_cooldown_list->vtable->UnPack(arg2, (arg3 - 4));
00594107              
0059410c              if (eax_12 == 0)
00594113                  return eax_12;
005940d5          }
005940d5          
0059412b          if ((ecx_1 & 4) == 0)
0059412b          {
00594164              class Enchantment* _vitae = this->_vitae;
00594164              
00594169              if (_vitae != 0)
00594169              {
0059416b                  _vitae->vtable->__vecDelDtor(1);
00594171                  this->_vitae = nullptr;
00594169              }
0059412b          }
0059412b          else
0059412b          {
00594130              if (this->_vitae == 0)
00594130              {
00594134                  class Enchantment* eax_13 = operator new(0x50);
0059413e                  class Enchantment* eax_14;
0059413e                  
0059413e                  if (eax_13 == 0)
00594149                      eax_14 = nullptr;
0059413e                  else
00594142                      eax_14 = Enchantment::Enchantment(eax_13);
00594142                  
0059414b                  this->_vitae = eax_14;
00594130              }
00594130              
00594155              int32_t eax_16 = this->_vitae->vtable->UnPack(arg2, (arg3 - 4));
00594155              
0059415a              if (eax_16 == 0)
00594161                  return eax_16;
0059412b          }
0059412b          
00594174          class PackableList<Enchantment>* _mult_list = this->_mult_list;
0059417a          this->m_cHelpfulEnchantments = 0;
0059417d          this->m_cHarmfulEnchantments = 0;
00594180          CEnchantmentRegistry::CountSpellsInList(this, _mult_list);
0059418b          CEnchantmentRegistry::CountSpellsInList(this, this->_add_list);
00594190          void* eax_17 = *(uint32_t*)arg2;
00594190          
00594199          if (eax_1 <= eax_17)
00594199          {
005941a3              void* eax_18 = ((char*)eax_17 - eax_1);
005941af              return (((char*)eax_18 - eax_18) + 1);
00594199          }
0059405e      }
0059405e      
00594067      return 0;
00593ff0  }

005941b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005941c0  int32_t __thiscall PackableList<Enchantment>::Remove(class PackableList<Enchantment>* this, class Enchantment* arg2)

005941c0  {
005941c3      class PackableLLNode<Enchantment>* head = this->head;
005941c3      
005941c8      if (head == 0)
005941cd          return 0;
005941cd      
005941d7      class PackableLLNode<Enchantment>* next_2 = head;
005941d9      int32_t eax_1;
005941d9      int32_t ecx;
005941d9      eax_1 = ContentProfile::operator==(head, arg2);
005941d9      
005941e0      if (eax_1 != 0)
005941e0      {
005941e8          Enchantment::operator=(arg2, this->head);
005941f0          class PackableLLNode<Enchantment>* next = this->head->next;
005941f5          this->head = next;
005941f5          
005941f8          if (next == 0)
00594203              this->tail = nullptr;
005941f8          else
005941fa              next->prev = nullptr;
005941fa          
0059420c          if (next_2 != 0)
0059420c          {
0059420f              next_2->data._smod.vtable = 0x79285c;
00594216              next_2->data.vtable = 0x79285c;
0059421c              operator delete(next_2);
0059420c          }
0059420c          
00594229          this->curNum -= 1;
00594233          return 1;
005941e0      }
005941e0      
0059423b      while (next_2->next != 0)
0059423b      {
0059424b          if (ContentProfile::operator==(next_2->next, arg2) != 0)
0059424b          {
00594265              Enchantment::operator=(arg2, next_2->next);
0059426a              int32_t* next_1 = next_2->next;
0059426d              class PackableLLNode<Enchantment>* ecx_6 = next_1[0x14];
00594272              next_2->next = ecx_6;
00594272              
00594275              if (ecx_6 == 0)
0059427c                  this->tail = next_2;
00594275              else
00594277                  ecx_6->prev = next_2;
00594277              
00594280              next_1[0x10] = 0x79285c;
00594287              *(uint32_t*)next_1 = 0x79285c;
0059428d              operator delete(next_1);
0059429a              this->curNum -= 1;
005942a4              return 1;
0059424b          }
0059424b          
0059424d          next_2 = next_2->next;
0059423b      }
0059423b      
0059425c      return 0;
005941c0  }

005942a7                       90 90 90 90 90 90 90 90 90                                                         .........

005942b0  int32_t __stdcall CEnchantmentRegistry::Duel(class CEnchantmentRegistry const* this @ ecx, class Enchantment const* arg2, class PackableList<Enchantment>* arg3)

005942b0  {
005942c3      for (class PackableLLNode<Enchantment>* i = arg3->head; i != 0; i = i->next)
005942c3      {
005942cb          if (i->data._spell_category == arg2->_spell_category)
005942cb          {
005942dc              if (Enchantment::Duel(i, arg2) != 0)
005942e6                  return 0;
005942e6              
005942e9              uint32_t _id = i->data._id;
005942ee              void var_50;
005942ee              
005942ee              if (_id != 0)
005942fd                  PackableList<Enchantment>::Remove(arg3, Enchantment::Enchantment(&var_50, _id));
005942dc              break;
005942cb          }
005942c3      }
005942c3      
00594309      void* esi = operator new(0x58);
00594309      
00594310      if (esi == 0)
0059432a          esi = nullptr;
00594310      else
00594310      {
00594315          Enchantment::Enchantment(esi, arg2);
0059431a          *(uint32_t*)((char*)esi + 0x50) = 0;
00594321          *(uint32_t*)((char*)esi + 0x54) = 0;
00594310      }
00594310      
00594331      if (arg3->head != 0)
00594331      {
00594338          class PackableLLNode<Enchantment>* tail = arg3->tail;
0059433b          tail->next = esi;
0059433e          *(uint32_t*)((char*)esi + 0x54) = tail;
00594331      }
00594331      else
00594333          arg3->head = esi;
00594333      
00594344      uint32_t eax_8 = (arg3->curNum + 1);
00594345      arg3->tail = esi;
00594348      arg3->curNum = eax_8;
00594356      return 1;
005942b0  }

00594359                                                                             90 90 90 90 90 90 90                           .......

00594360  int32_t __thiscall CEnchantmentRegistry::RemoveEnchantmentFromList(class CEnchantmentRegistry* this, uint32_t const arg2, class PackableList<Enchantment>* arg3)

00594360  {
0059436d      if (arg3 == 0)
00594376          return 0;
00594376      
0059438b      void var_50;
0059438b      int32_t result = PackableList<Enchantment>::Remove(arg3, Enchantment::Enchantment(&var_50, arg2));
0059438b      
00594394      if (result != 0)
005943a1          CEnchantmentRegistry::UpdateSpellTotals(this, (arg2 & 0xffff), 0xffffffff);
005943a1      
005943ae      return result;
00594360  }

005943b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005943c0  int32_t __thiscall CEnchantmentRegistry::OnCooldown(class CEnchantmentRegistry const* this, uint32_t const arg2, double* arg3)

005943c0  {
005943c7      if (arg2 != 0)
005943c7      {
005943c9          class PackableList<Enchantment>* _cooldown_list = this->_cooldown_list;
005943c9          
005943ce          if (_cooldown_list != 0)
005943ce          {
005943d5              for (class PackableLLNode<Enchantment>* i = _cooldown_list->head; i != 0; i = i->next)
005943d5              {
005943e1                  if (((uint32_t)((int16_t)i->data._id)) == arg2)
005943e1                  {
005943f2                      long double x87_r7_3 = ((((long double)i->data._duration) + ((long double)i->data._start_time)) - ((long double)Timer::cur_time));
005943fa                      *(uint64_t*)arg3 = ((double)x87_r7_3);
005943fc                      long double temp1_1 = ((long double)0.0);
005943fc                      (x87_r7_3 - temp1_1);
00594402                      double* eax_3;
00594402                      eax_3 = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00594404                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00594404                      
00594407                      if (p_1)
0059441e                          return 1;
0059441e                      
0059440d                      PackableList<Enchantment>::Remove(this->_cooldown_list, i);
00594407                      break;
005943e1                  }
005943d5              }
005943ce          }
005943c7      }
005943c7      
00594415      return 0;
005943c0  }

00594421     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00594430  int32_t __thiscall CEnchantmentRegistry::GetEnchantmentsInEffectFromList(class CEnchantmentRegistry const* this, class PackableList<Enchantment>* arg2, class PackableList<Enchantment>* arg3)

00594430  {
00594436      int32_t edi = 0;
00594436      
0059443c      if (arg2 == 0)
00594440          return arg2;
00594440      
00594449      class PackableLLNode<Enchantment>* i = arg2->head;
00594449      
00594452      while (i != 0)
00594452      {
00594458          int32_t eax = CEnchantmentRegistry::Duel(this, i, arg3);
0059445d          i = i->next;
00594460          edi |= eax;
00594452      }
00594452      
0059446a      return edi;
00594430  }

0059446d                                         90 90 90                                                               ...

00594470  int32_t __thiscall CEnchantmentRegistry::CullEnchantmentsFromList(class CEnchantmentRegistry const* this, class PackableList<Enchantment>* arg2, uint32_t const arg3, uint32_t const arg4, class PackableList<Enchantment>* arg5)

00594470  {
00594470      class CEnchantmentRegistry* this_1 = this;
00594470      
0059447b      if (arg2 == 0)
0059447e          return arg2;
0059447e      
00594488      class PackableLLNode<Enchantment>* i = arg2->head;
00594490      int32_t ebx = 0;
00594490      
00594494      for (; i != 0; i = i->next)
00594494      {
00594496          uint32_t type = i->data._smod.type;
00594496          
0059449f          if ((arg3 & type) != 0)
0059449f          {
005944a9              if (((*(uint8_t*)((char*)type)[1] & 0x20) != 0 || i->data._smod.key == arg4))
005944ce                  ebx |= CEnchantmentRegistry::Duel(this, i, arg5);
005944a9              else if (Enchantment::AffectsAttackSkills(i, arg4) != 0)
005944ce                  ebx |= CEnchantmentRegistry::Duel(this, i, arg5);
005944b5              else if (Enchantment::AffectsDefenseSkills(i, arg4) != 0)
005944ce                  ebx |= CEnchantmentRegistry::Duel(this, i, arg5);
0059449f          }
00594494      }
00594494      
005944dc      return ebx;
00594470  }

005944df                                                                                               90                                 .

005944e0  int32_t __thiscall CEnchantmentRegistry::RemoveEnchantment(class CEnchantmentRegistry* this, uint32_t const arg2)

005944e0  {
005944e3      class Enchantment* _vitae = this->_vitae;
005944e3      
005944f2      if ((_vitae == 0 || _vitae->_id != arg2))
005944f2      {
00594519          if ((CEnchantmentRegistry::RemoveEnchantmentFromList(this, arg2, this->_cooldown_list) == 0 && CEnchantmentRegistry::RemoveEnchantmentFromList(this, arg2, this->_mult_list) == 0))
00594539              return CEnchantmentRegistry::RemoveEnchantmentFromList(this, arg2, this->_add_list);
005944f2      }
005944f2      else
005944f2      {
005944f4          _vitae->vtable->__vecDelDtor(1);
005944fa          this->_vitae = nullptr;
005944f2      }
005944f2      
00594508      return 1;
005944e0  }

0059453c                                                                                      90 90 90 90                              ....

00594540  int32_t __thiscall CEnchantmentRegistry::GetEnchantmentsInEffect(class CEnchantmentRegistry const* this, class PackableList<Enchantment>* arg2)

00594540  {
0059454e      int32_t eax_1 = CEnchantmentRegistry::GetEnchantmentsInEffectFromList(this, this->_mult_list, arg2);
00594566      return (CEnchantmentRegistry::GetEnchantmentsInEffectFromList(this, this->_add_list, arg2) | eax_1);
00594540  }

00594569                             90 90 90 90 90 90 90                                                           .......

00594570  int32_t __thiscall CEnchantmentRegistry::EnchantAttribute(class CEnchantmentRegistry const* this, uint32_t arg2, uint32_t* arg3)

00594570  {
00594574      uint32_t* ebp = arg3;
0059457b      long double x87_r7 = ((long double)*(uint32_t*)ebp);
0059457b      
00594584      if (*(uint32_t*)ebp < 0)
00594586          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
00594586      
00594590      arg3 = ((float)x87_r7);
00594594      class PackableList<Enchantment>* _mult_list = this->_mult_list;
005945a2      int32_t var_10 = 0x7b15c4;
005945aa      class Enchantment* i_1 = nullptr;
005945b2      int32_t var_8 = 0;
005945ba      int32_t var_4 = 0;
005945c2      CEnchantmentRegistry::CullEnchantmentsFromList(this, _mult_list, 1, arg2, &var_10);
005945d5      CEnchantmentRegistry::CullEnchantmentsFromList(this, this->_add_list, 1, arg2, &var_10);
005945da      class Enchantment* i = i_1;
005945de      int32_t result = 0;
005945de      
005945e2      for (; i != 0; i = *(int32_t*)((char*)i + 0x50))
005945e2      {
005945f0          result |= Enchantment::Enchant(i, &arg3);
005945f0          
005945f4          if (i == 0)
005945f4              break;
005945e2      }
005945e2      
00594600      long double x87_r7_1 = ((long double)arg3);
00594607      uint32_t eax_2;
00594607      
00594607      if (*(uint32_t*)ebp < 0xa)
00594607      {
00594620          long double temp1_1 = ((long double)1f);
00594620          (x87_r7_1 - temp1_1);
00594626          eax_2 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00594628          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00594628          
0059462b          if (!(p_1))
0059462d              arg3 = 0x3f800000;
00594607      }
00594607      else
00594607      {
00594609          long double temp2_1 = ((long double)10f);
00594609          (x87_r7_1 - temp2_1);
0059460f          eax_2 = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00594611          bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00594611          
00594614          if (!(p))
00594616              arg3 = 0x41200000;
00594607      }
00594648      *(uint32_t*)ebp = _ftol2();
0059464b      var_10 = 0x7b15c4;
00594653      PackableList<Enchantment>::Flush(&var_10);
00594660      return result;
00594570  }

00594663           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00594670  int32_t __thiscall CEnchantmentRegistry::EnchantAttribute2nd(class CEnchantmentRegistry const* this, uint32_t arg2, uint32_t* arg3)

00594670  {
00594675      int32_t __saved_ebx = 0x1000000c;
0059467a      int32_t __saved_ebp = 3;
0059467c      int32_t var_28 = 0x10000002;
00594683      int32_t eax;
00594683      int32_t edx;
00594683      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
00594683      
0059468f      if (eax_1 == 0)
00594696          return eax_1;
00594696      
005946a2      int32_t eax_2 = ACQualityFilter::QueryAttribute2nd(eax_1, arg2);
005946a9      eax_1->vtable->Release();
005946a9      
005946b2      if (eax_2 == 0)
005946bd          return 0;
005946bd      
005946c7      long double x87_r7 = ((long double)*(uint32_t*)arg3);
005946ca      int32_t edi_1 = 0;
005946ca      
005946ce      if (*(uint32_t*)arg3 < 0)
005946d0          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
005946d0      
005946d6      class Enchantment* _vitae = this->_vitae;
005946d9      float var_14 = ((float)x87_r7);
005946d9      
005946e1      if (_vitae != 0)
005946ed          edi_1 = Enchantment::Enchant(_vitae, &var_14);
005946ed      
005946f1      class PackableList<Enchantment>* _mult_list = this->_mult_list;
005946f4      int32_t var_c = 0;
005946f8      int32_t var_8 = 0;
005946fc      int32_t var_4 = 0;
0059470b      int32_t var_10 = 0x7b15c4;
00594713      CEnchantmentRegistry::CullEnchantmentsFromList(this, _mult_list, 2, arg2, &var_10);
00594726      CEnchantmentRegistry::CullEnchantmentsFromList(this, this->_add_list, 2, arg2, &var_10);
00594737      int32_t eax_7 = CEnchantmentRegistry::Enchant(this, &var_10, &var_14);
0059473c      long double x87_r7_1 = ((long double)var_14);
00594740      int32_t edi_2 = (edi_1 | eax_7);
00594740      
00594746      if (*(uint32_t*)arg3 < 5)
00594746      {
0059475f          long double temp1_1 = ((long double)1f);
0059475f          (x87_r7_1 - temp1_1);
00594765          eax_7 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00594767          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00594767          
0059476a          if (!(p_1))
0059476c              var_14 = 1f;
00594746      }
00594746      else
00594746      {
00594748          long double temp2_1 = ((long double)5f);
00594748          (x87_r7_1 - temp2_1);
0059474e          eax_7 = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00594750          bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00594750          
00594753          if (!(p))
00594755              var_14 = 5f;
00594746      }
00594746      
00594787      *(uint32_t*)arg3 = _ftol2();
0059478a      var_10 = 0x7b15c4;
00594792      PackableList<Enchantment>::Flush(&var_10);
005947a0      return edi_2;
00594670  }

005947a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005947b0  int32_t __thiscall CEnchantmentRegistry::EnchantSkill(class CEnchantmentRegistry const* this, uint32_t arg2, int32_t* arg3)

005947b0  {
005947bd      class Enchantment* _vitae = this->_vitae;
005947c0      float var_14 = ((float)((long double)*(uint32_t*)arg3));
005947c4      int32_t ebp = 0;
005947c4      
005947c8      if (_vitae != 0)
005947d4          ebp = Enchantment::Enchant(_vitae, &var_14);
005947d4      
005947d6      class PackableList<Enchantment>* _mult_list = this->_mult_list;
005947e9      int32_t var_10 = 0x7b15c4;
005947f1      class Enchantment* i_1 = nullptr;
005947f9      int32_t var_8 = 0;
00594801      int32_t var_4 = 0;
00594809      CEnchantmentRegistry::CullEnchantmentsFromList(this, _mult_list, 0x10, arg2, &var_10);
0059481c      CEnchantmentRegistry::CullEnchantmentsFromList(this, this->_add_list, 0x10, arg2, &var_10);
00594821      class Enchantment* i = i_1;
00594825      int32_t edi_1 = 0;
00594825      
00594829      for (; i != 0; i = *(int32_t*)((char*)i + 0x50))
00594829      {
0059483c          edi_1 |= Enchantment::Enchant(i, &var_14);
0059483c          
00594840          if (i == 0)
00594840              break;
00594829      }
00594829      
00594849      long double x87_r7_1 = ((long double)var_14);
0059484f      long double temp1 = ((long double)0.5f);
0059484f      (x87_r7_1 - temp1);
00594856      int32_t eax_3;
00594856      eax_3 = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
00594858      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
00594858      
0059485b      if (!(p))
0059485d          var_14 = 0f;
0059485d      
0059487c      *(uint32_t*)arg3 = _ftol2();
0059487e      var_10 = 0x7b15c4;
00594886      PackableList<Enchantment>::Flush(&var_10);
00594892      return (ebp | edi_1);
005947b0  }

0059482d                                         8d 49 00                                                               .I.
00594895                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005948a0  int32_t __thiscall CEnchantmentRegistry::EnchantInt(class CEnchantmentRegistry const* this, uint32_t arg2, int32_t* arg3, int32_t arg4)

005948a0  {
005948a5      int32_t __saved_edi = 0x1000000c;
005948aa      int32_t var_24 = 3;
005948ac      int32_t var_28 = 0x10000002;
005948b3      int32_t eax;
005948b3      int32_t edx;
005948b3      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
005948b3      
005948bf      if (eax_1 == 0)
005948c6          return eax_1;
005948c6      
005948d1      int32_t eax_2 = QualityFilter::QueryInt(eax_1, arg2);
005948da      eax_1->vtable->Release();
005948da      
005948e7      if (eax_2 == 0)
005948f1          return 0;
005948f1      
005948fa      class PackableList<Enchantment>* _mult_list = this->_mult_list;
00594903      float var_14 = ((float)((long double)*(uint32_t*)arg3));
0059490c      int32_t var_10 = 0x7b15c4;
00594914      int32_t var_c = 0;
0059491c      int32_t var_8 = 0;
00594924      int32_t var_4 = 0;
0059492c      CEnchantmentRegistry::CullEnchantmentsFromList(this, _mult_list, 4, arg2, &var_10);
0059493f      CEnchantmentRegistry::CullEnchantmentsFromList(this, this->_add_list, 4, arg2, &var_10);
00594950      int32_t eax_6 = CEnchantmentRegistry::Enchant(this, &var_10, &var_14);
00594955      long double x87_r7_1 = ((long double)var_14);
00594955      
00594961      if (arg4 == 0)
00594961      {
00594963          long double temp1_1 = ((long double)0.5f);
00594963          (x87_r7_1 - temp1_1);
00594969          int32_t eax_7;
00594969          eax_7 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0059496b          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0059496b          
0059496e          if (!(p_1))
00594970              var_14 = 0f;
00594961      }
00594961      
0059498b      *(uint32_t*)arg3 = _ftol2();
0059498d      var_10 = 0x7b15c4;
00594995      PackableList<Enchantment>::Flush(&var_10);
005949a2      return eax_6;
005948a0  }

005949a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005949b0  int32_t __thiscall CEnchantmentRegistry::EnchantFloat(class CEnchantmentRegistry const* this, uint32_t arg2, double* arg3)

005949b0  {
005949b5      int32_t __saved_edi = 0x1000000c;
005949ba      int32_t var_24 = 3;
005949bc      int32_t var_28 = 0x10000002;
005949c3      int32_t eax;
005949c3      int32_t edx;
005949c3      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, this);
005949c3      
005949cf      if (eax_1 == 0)
005949d6          return eax_1;
005949d6      
005949e1      int32_t eax_2 = QualityFilter::QueryFloat(eax_1, arg2);
005949ea      eax_1->vtable->Release();
005949ea      
005949f7      if (eax_2 == 0)
00594a01          return 0;
00594a01      
00594a08      class PackableList<Enchantment>* _mult_list = this->_mult_list;
00594a11      float var_14 = ((float)((long double)*(uint64_t*)arg3));
00594a1c      int32_t var_10 = 0x7b15c4;
00594a24      int32_t var_c = 0;
00594a2c      int32_t var_8 = 0;
00594a34      int32_t var_4 = 0;
00594a3c      CEnchantmentRegistry::CullEnchantmentsFromList(this, _mult_list, 8, arg2, &var_10);
00594a4f      CEnchantmentRegistry::CullEnchantmentsFromList(this, this->_add_list, 8, arg2, &var_10);
00594a60      int32_t eax_6 = CEnchantmentRegistry::Enchant(this, &var_10, &var_14);
00594a6d      *(uint64_t*)arg3 = ((double)((long double)var_14));
00594a71      var_10 = 0x7b15c4;
00594a79      PackableList<Enchantment>::Flush(&var_10);
00594a86      return eax_6;
005949b0  }

00594a89                             90 90 90 90 90 90 90                                                           .......

00594a90  int32_t __thiscall CEnchantmentRegistry::GetFloatEnchantmentDetails(class CEnchantmentRegistry const* this, uint32_t arg2, struct EnchantedQualityDetails* arg3)

00594a90  {
00594a95      int32_t __saved_ebx = 0x1000000c;
00594a9a      int32_t __saved_ebp = 3;
00594a9c      int32_t var_24 = 0x10000002;
00594aa3      int32_t eax;
00594aa3      int32_t edx;
00594aa3      class DBObj* result = DBObj::GetByEnum(eax, edx, this);
00594aa3      
00594aaf      if (result == 0)
00594ab6          return result;
00594ab6      
00594ac2      int32_t eax_1 = QualityFilter::QueryFloat(result, arg2);
00594ac9      result->vtable->Release();
00594ac9      
00594ad4      if (eax_1 != 0)
00594ad4      {
00594ad6          class PackableList<Enchantment>* _mult_list = this->_mult_list;
00594ae9          int32_t var_10 = 0x7b15c4;
00594aed          int32_t var_c_1 = 0;
00594af1          int32_t var_8_1 = 0;
00594af5          int32_t var_4_1 = 0;
00594af9          CEnchantmentRegistry::CullEnchantmentsFromList(this, _mult_list, 8, arg2, &var_10);
00594b0c          CEnchantmentRegistry::CullEnchantmentsFromList(this, this->_add_list, 8, arg2, &var_10);
00594b1d          CEnchantmentRegistry::Enchant(this, &var_10, arg3);
00594b26          var_10 = 0x7b15c4;
00594b2a          PackableList<Enchantment>::Flush(&var_10);
00594ad4      }
00594ad4      
00594b3b      return 1;
00594a90  }

00594b3e                                                                                            90 90                                ..

00594b40  int32_t __thiscall CEnchantmentRegistry::RemoveEnchantments(class CEnchantmentRegistry* this, class PackableList<unsigned long>* arg2)

00594b40  {
00594b47      class PackableLLNode<unsigned long>* head = arg2->head;
00594b4f      int32_t var_54 = 0;
00594b4f      
00594b57      if (head == 0)
00594b5d          return head;
00594b5d      
00594b63      class PackableLLNode<unsigned long>* next = head;
00594b63      
00594b67      while (next != 0)
00594b67      {
00594b6d          class Enchantment* _vitae = this->_vitae;
00594b72          uint32_t data = next->data;
00594b72          
00594b7a          if ((_vitae != 0 && _vitae->_id == data))
00594b7a          {
00594b7c              _vitae->vtable->__vecDelDtor(1);
00594b8d              this->_vitae = nullptr;
00594b94              next = next->next;
00594b97              var_54 |= 1;
00594b9b              continue;
00594b7a          }
00594b7a          
00594b9d          class PackableList<Enchantment>* _cooldown_list = this->_cooldown_list;
00594b9d          
00594ba2          if (_cooldown_list != 0)
00594ba2          {
00594bb6              int32_t var_50;
00594bb6              bool cond:2_1 = PackableList<Enchantment>::Remove(_cooldown_list, Enchantment::Enchantment(&var_50, data)) == 0;
00594bbd              int32_t var_10_1 = 0x79285c;
00594bc1              var_50 = 0x79285c;
00594bc1              
00594bc5              if (!(cond:2_1))
00594bc5              {
00594bd2                  CEnchantmentRegistry::UpdateSpellTotals(this, (data & 0xffff), 0xffffffff);
00594bdb                  next = next->next;
00594be5                  var_54 |= 1;
00594be9                  continue;
00594bc5              }
00594ba2          }
00594ba2          
00594bfc          if (CEnchantmentRegistry::RemoveEnchantmentFromList(this, data, this->_mult_list) == 0)
00594bfc          {
00594c1c              int32_t eax_5 = CEnchantmentRegistry::RemoveEnchantmentFromList(this, data, this->_add_list);
00594c25              next = next->next;
00594c2a              var_54 |= eax_5;
00594bfc          }
00594bfc          else
00594bfc          {
00594c02              next = next->next;
00594c0c              var_54 |= 1;
00594bfc          }
00594b67      }
00594b67      
00594c3e      return var_54;
00594b40  }

00594c41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00594c50  int32_t __thiscall CEnchantmentRegistry::PurgeEnchantmentList(class CEnchantmentRegistry* this, class PackableList<Enchantment>* arg2)

00594c50  {
00594c60      if (arg2 == 0)
00594c68          return 0;
00594c68      
00594c6d      class PackableList<Enchantment>* ebx = nullptr;
00594c70      class PackableLLNode<Enchantment>* i = arg2->head;
00594c73      int32_t var_10 = 0x7a3e80;
00594c7b      int32_t var_c = 0;
00594c7f      int32_t var_8 = 0;
00594c83      int32_t var_4 = 0;
00594c83      
00594c89      while (i != 0)
00594c89      {
00594c8b          long double x87_r7_1 = ((long double)i->data._duration);
00594c8e          long double temp1_1 = ((long double)-1.0);
00594c8e          (x87_r7_1 - temp1_1);
00594c94          class PackableList<Enchantment>* eax;
00594c94          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00594c96          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00594c96          
00594c99          if (p_1)
00594c99          {
00594c9b              uint32_t _id = i->data._id;
00594ca0              eax = operator new(0xc);
00594ca0              
00594caa              if (eax == 0)
00594cb6                  eax = nullptr;
00594caa              else
00594caa              {
00594cac                  eax->vtable = _id;
00594cae                  eax->head = nullptr;
00594cb1                  eax->tail = nullptr;
00594caa              }
00594caa              
00594cba              if (ebx != 0)
00594cba              {
00594ccb                  ebx->tail = eax;
00594cce                  eax->head = ebx;
00594cd1                  ebx = eax;
00594cd3                  var_4 += 1;
00594cba              }
00594cba              else
00594cba              {
00594cbc                  i = i->next;
00594cbf                  class PackableList<Enchantment>* var_8_1 = eax;
00594cc3                  ebx = eax;
00594cc5                  var_4 += 1;
00594cc9                  continue;
00594cba              }
00594c99          }
00594c99          
00594cd7          i = i->next;
00594c89      }
00594c89      
00594ce5      class PackableList<Enchantment>* var_c_1 = ebx;
00594ce9      int32_t result = CEnchantmentRegistry::RemoveEnchantments(this, &var_10);
00594cf4      var_10 = 0x7a3e80;
00594cfc      PackableList<unsigned long>::Flush(&var_10);
00594d0a      return result;
00594c50  }

00594d0d                                         90 90 90                                                               ...

00594d10  int32_t __thiscall CEnchantmentRegistry::PurgeBadEnchantmentList(class CEnchantmentRegistry* this, class PackableList<Enchantment>* arg2)

00594d10  {
00594d20      if (arg2 == 0)
00594d28          return 0;
00594d28      
00594d2d      class PackableList<Enchantment>* ebx = nullptr;
00594d30      class PackableLLNode<Enchantment>* i = arg2->head;
00594d33      int32_t var_10 = 0x7a3e80;
00594d3b      int32_t var_c = 0;
00594d3f      int32_t var_8 = 0;
00594d43      int32_t var_4 = 0;
00594d43      
00594d49      while (i != 0)
00594d49      {
00594d52          if ((i->data._smod.type & 0x2000000) == 0)
00594d52          {
00594d54              long double x87_r7_1 = ((long double)i->data._duration);
00594d57              long double temp1_1 = ((long double)-1.0);
00594d57              (x87_r7_1 - temp1_1);
00594d5d              class PackableList<Enchantment>* eax;
00594d5d              eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
00594d5f              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00594d5f              
00594d62              if (p_1)
00594d62              {
00594d64                  uint32_t _id = i->data._id;
00594d69                  eax = operator new(0xc);
00594d69                  
00594d73                  if (eax == 0)
00594d7f                      eax = nullptr;
00594d73                  else
00594d73                  {
00594d75                      eax->vtable = _id;
00594d77                      eax->head = nullptr;
00594d7a                      eax->tail = nullptr;
00594d73                  }
00594d73                  
00594d83                  if (ebx != 0)
00594d83                  {
00594d94                      ebx->tail = eax;
00594d97                      eax->head = ebx;
00594d9a                      ebx = eax;
00594d9c                      var_4 += 1;
00594d83                  }
00594d83                  else
00594d83                  {
00594d85                      i = i->next;
00594d88                      class PackableList<Enchantment>* var_8_1 = eax;
00594d8c                      ebx = eax;
00594d8e                      var_4 += 1;
00594d92                      continue;
00594d83                  }
00594d62              }
00594d52          }
00594d52          
00594da0          i = i->next;
00594d49      }
00594d49      
00594dae      class PackableList<Enchantment>* var_c_1 = ebx;
00594db2      int32_t result = CEnchantmentRegistry::RemoveEnchantments(this, &var_10);
00594dbd      var_10 = 0x7a3e80;
00594dc5      PackableList<unsigned long>::Flush(&var_10);
00594dd3      return result;
00594d10  }

00594dd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00594de0  int32_t __fastcall CEnchantmentRegistry::PurgeEnchantments(class CEnchantmentRegistry* this)

00594de0  {
00594de8      int32_t eax_1 = CEnchantmentRegistry::PurgeEnchantmentList(this, this->_mult_list);
00594dfe      return (CEnchantmentRegistry::PurgeEnchantmentList(this, this->_add_list) | eax_1);
00594de0  }

00594dff                                                                                               90                                 .

00594e00  int32_t __fastcall CEnchantmentRegistry::PurgeBadEnchantments(class CEnchantmentRegistry* this)

00594e00  {
00594e08      int32_t eax_1 = CEnchantmentRegistry::PurgeBadEnchantmentList(this, this->_mult_list);
00594e1e      return (CEnchantmentRegistry::PurgeBadEnchantmentList(this, this->_add_list) | eax_1);
00594e00  }

00594e1f                                                                                               90                                 .

00594e20  int32_t __thiscall CEmoteTable::UnPack(class CEmoteTable* this, void** arg2, uint32_t arg3)

00594e20  {
00594e25      /* jump -> this->_emote_table.vtable->UnPack */
00594e20  }

00594e28                          90 90 90 90 90 90 90 90                                                          ........

00594e30  uint32_t __thiscall PackableList<EmoteSet>::InsertTail(class PackableList<EmoteSet>* this, class EmoteSet const* arg2)

00594e30  {
00594e3b      void* edi = operator new(0x40);
00594e3b      
00594e42      if (edi == 0)
00594e60          edi = nullptr;
00594e42      else
00594e42      {
00594e4b          EmoteSet::EmoteSet(edi, arg2);
00594e50          *(uint32_t*)((char*)edi + 0x38) = 0;
00594e57          *(uint32_t*)((char*)edi + 0x3c) = 0;
00594e42      }
00594e42      
00594e67      if (this->head == 0)
00594e67      {
00594e69          uint32_t curNum = this->curNum;
00594e6c          this->head = edi;
00594e6f          this->tail = edi;
00594e74          this->curNum = (curNum + 1);
00594e78          return (curNum + 1);
00594e67      }
00594e67      
00594e7b      class PackableLLNode<EmoteSet>* tail = this->tail;
00594e7e      tail->next = edi;
00594e81      *(uint32_t*)((char*)edi + 0x3c) = tail;
00594e84      uint32_t curNum_1 = this->curNum;
00594e87      this->tail = edi;
00594e8c      this->curNum = (curNum_1 + 1);
00594e90      return (curNum_1 + 1);
00594e30  }

00594e93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00594ea0  uint32_t __thiscall PackableList<EmoteSet>::Pack(class PackableList<EmoteSet>* this, void** arg2, uint32_t arg3)

00594ea0  {
00594ea5      uint32_t result = PackableList<EmoteSet>::pack_size(this);
00594ea5      
00594eb2      if (arg3 >= result)
00594eb2      {
00594ebc          if (arg3 >= 4)
00594ebc          {
00594ec3              **(uint32_t**)arg2 = this->curNum;
00594ec5              *(uint32_t*)arg2 += 4;
00594ebc          }
00594ebc          
00594ecd          for (class PackableLLNode<EmoteSet>* i = this->head; i != 0; i = i->next)
00594ed0              i->data.vtable->Pack(arg2, arg3);
00594eb2      }
00594eb2      
00594ee6      return result;
00594ea0  }

00594ee9                             90 90 90 90 90 90 90                                                           .......

00594ef0  uint32_t __fastcall PackableList<EmoteSet>::pack_size(class PackableList<EmoteSet>* this)

00594ef0  {
00594ef0      class PackableList<EmoteSet>* this_1 = this;
00594ef2      class PackableLLNode<EmoteSet>* i = this->head;
00594ef8      int32_t result = 4;
00594efd      this_1 = nullptr;
00594efd      
00594f05      while (i != 0)
00594f05      {
00594f12          int32_t eax_2 = i->data.vtable->Pack(&this_1, 0);
00594f15          i = i->next;
00594f18          result += eax_2;
00594f05      }
00594f05      
00594f23      return result;
00594ef0  }

00594f24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00594f30  void __fastcall PackableList<EmoteSet>::Flush(class PackableList<EmoteSet>* this)

00594f30  {
00594f3b      void var_38;
00594f3b      EmoteSet::EmoteSet(&var_38);
00594f3b      
00594f47      while (this->head != 0)
00594f47      {
00594f50          class PackableLLNode<EmoteSet>* head = this->head;
00594f50          
00594f55          if (head != 0)
00594f55          {
00594f57              class PackableLLNode<EmoteSet>* next = head->next;
00594f5c              this->head = next;
00594f5c              
00594f5f              if (next == 0)
00594f66                  this->tail = nullptr;
00594f5f              else
00594f61                  next->prev = nullptr;
00594f61              
00594f6e              EmoteSet::operator=(&var_38, head);
00594f6e              
00594f75              if (head != 0)
00594f75              {
00594f79                  EmoteSet::~EmoteSet(head);
00594f7f                  operator delete(head);
00594f75              }
00594f75              
00594f87              this->curNum -= 1;
00594f55          }
00594f47      }
00594f47      
00594f94      EmoteSet::~EmoteSet(&var_38);
00594f30  }

00594f9f                                                                                               90                                 .

00594fa0  class PackableList<EmoteSet>* __thiscall PackableList<EmoteSet>::operator=(class PackableList<EmoteSet>* arg1, void* arg2)

00594fa0  {
00594fa6      PackableList<EmoteSet>::Flush(arg1);
00594fa6      
00594fb6      for (class EmoteSet* i = *(uint32_t*)((char*)arg2 + 4); i != 0; i = *(int32_t*)((char*)i + 0x38))
00594fb6      {
00594fbf          void* esi_1 = operator new(0x40);
00594fbf          
00594fc6          if (esi_1 == 0)
00594fd8              esi_1 = nullptr;
00594fc6          else
00594fc6          {
00594fcb              EmoteSet::EmoteSet(esi_1, i);
00594fd0              *(uint32_t*)((char*)esi_1 + 0x38) = 0;
00594fd3              *(uint32_t*)((char*)esi_1 + 0x3c) = 0;
00594fc6          }
00594fc6          
00594fdd          if (arg1->head != 0)
00594fdd          {
00594fe4              class PackableLLNode<EmoteSet>* tail = arg1->tail;
00594fe7              tail->next = esi_1;
00594fea              *(uint32_t*)((char*)esi_1 + 0x3c) = tail;
00594fdd          }
00594fdd          else
00594fdf              arg1->head = esi_1;
00594fdf          
00594ff0          uint32_t ecx_2 = (arg1->curNum + 1);
00594ff3          arg1->tail = esi_1;
00594ff6          arg1->curNum = ecx_2;
00594ff6          
00594ff9          if (i == 0)
00594ff9              break;
00594fb6      }
00594fb6      
00595008      return arg1;
00594fa0  }

0059500b                                   90 90 90 90 90                                                             .....

00595010  void __fastcall PackableList<EmoteSet>::~PackableList<EmoteSet>(class PackableList<EmoteSet>* this)

00595010  {
00595013      this->vtable = 0x7e46dc;
00595019      PackableList<EmoteSet>::Flush(this);
0059501e      this->vtable = 0x79285c;
00595010  }

00595026                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00595030  int32_t __thiscall PackableList<EmoteSet>::UnPack(class PackableList<EmoteSet>* this, void** arg2, uint32_t arg3)

00595030  {
00595036      PackableList<EmoteSet>::Flush(this);
00595036      
00595040      if (arg3 < 4)
005950a5          return 0;
005950a5      
00595047      void* eax = *(uint32_t*)arg2;
0059504b      int32_t edi = *(uint32_t*)eax;
00595054      *(uint32_t*)arg2 = ((char*)eax + 4);
00595056      int32_t var_38;
00595056      EmoteSet::EmoteSet(&var_38);
0059505b      int32_t esi = 0;
0059505b      
0059505f      if (edi > 0)
0059505f      {
00595085          do
00595085          {
00595074              if (*(uint32_t*)(var_38 + 0x10)(arg2, arg3) == 0)
00595074              {
005950ac                  EmoteSet::~EmoteSet(&var_38);
005950ba                  return 0;
00595074              }
00595074              
0059507d              PackableList<EmoteSet>::InsertTail(this, &var_38);
00595082              esi += 1;
00595085          } while (esi < edi);
0059505f      }
0059505f      
0059508b      EmoteSet::~EmoteSet(&var_38);
0059509c      return 1;
00595030  }

005950bd                                                                                         90 90 90                               ...

005950c0  void* __thiscall PackableList<EmoteSet>::`scalar deleting destructor'(class PackableList<EmoteSet>* this, uint32_t arg2)

005950c0  {
005950c3      this->vtable = 0x7e46dc;
005950c9      PackableList<EmoteSet>::Flush(this);
005950d3      this->vtable = 0x79285c;
005950d3      
005950d9      if ((arg2 & 1) != 0)
005950dc          operator delete(this);
005950dc      
005950e7      return this;
005950c0  }

005950ea                                90 90 90 90 90 90                                                            ......

005950f0  void __thiscall PackableHashData<unsigned long,PackableList<EmoteSet> >::PackableHashData<unsigned long,PackableList<EmoteSet> >(class PackableHashData<unsigned long,PackableList<EmoteSet> >* this, uint32_t const* arg2, class PackableList<EmoteSet> const* arg3, int32_t arg4)

005950f0  {
005950fd      uint32_t* this_1 = this;
00595102      *(uint32_t*)this_1 = *(uint32_t*)arg2;
005950ff      this_1[1] = 0x7e46dc;
0059510d      *(uint32_t*)((char*)this_1[1])[4] = nullptr;
00595110      *(uint32_t*)((char*)this_1[1])[8] = nullptr;
00595113      *(uint32_t*)((char*)this_1[1])[0xc] = 0;
00595116      PackableList<EmoteSet>::operator=(&this_1[1], arg3);
0059511b      this_1[5] = 0;
00595129      this_1[6] = (COMBINE(0, *(uint32_t*)arg2) % arg4);
005950f0  }

00595131                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00595140  int32_t __thiscall PackableHashTable<unsigned long,PackableList<EmoteSet> >::add(class PackableHashTable<unsigned long,PackableList<EmoteSet> >* this, uint32_t const* arg2, class PackableList<EmoteSet> const* arg3)

00595140  {
0059514a      uint32_t _table_size = this->_table_size;
0059514a      
0059514f      if (_table_size == 0)
0059514f      {
0059517e      label_59517e:
0059517e          void* eax_4 = operator new(0x1c);
0059517e          
00595188          if (eax_4 != 0)
00595188          {
00595196              void* eax_5 = PackableHashData<unsigned long,PackableList<EmoteSet> >::PackableHashData<unsigned long,PackableList<EmoteSet> >(eax_4, arg2, arg3, this->_table_size);
00595196              
0059519d              if (eax_5 != 0)
0059519d              {
005951a8                  int32_t ecx_2 = *(uint32_t*)((char*)eax_5 + 0x18);
005951b1                  *(uint32_t*)((char*)eax_5 + 0x14) = this->_buckets[ecx_2];
005951b4                  this->_buckets[ecx_2] = eax_5;
005951bf                  this->_currNum += 1;
005951ca                  return 1;
0059519d              }
00595188          }
0059514f      }
0059514f      else
0059514f      {
00595151          class PackableHashData<unsigned long,PackableList<EmoteSet> >** _buckets = this->_buckets;
00595151          
00595156          if (_buckets == 0)
00595156              goto label_59517e;
00595156          
00595158          uint32_t const i = *(uint32_t*)arg2;
00595161          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00595161          
00595166          if (edx_3 == 0)
00595166              goto label_59517e;
00595166          
0059516a          while (i != *(uint32_t*)edx_3)
0059516a          {
0059516c              edx_3 = edx_3[5];
0059516c              
00595171              if (edx_3 == 0)
00595171                  goto label_59517e;
0059516a          }
0059516a          
0059517a          if (edx_3 == 0xfffffffc)
0059517a              goto label_59517e;
0059514f      }
0059514f      
005951a5      return 0;
00595140  }

005951cd                                         90 90 90                                                               ...

005951d0  void __fastcall PackableHashTable<unsigned long,PackableList<EmoteSet> >::EmptyContents(class PackableHashTable<unsigned long,PackableList<EmoteSet> >* this)

005951d0  {
005951d0      class PackableHashTable<unsigned long,PackableList<EmoteSet> >* var_4 = this;
005951d0      
005951d9      if (this->_buckets != 0)
005951d9      {
005951de          class PackableHashTable<unsigned long,PackableList<EmoteSet> >* i = nullptr;
005951e2          var_4 = nullptr;
005951e2          
005951e6          if (this->_table_size > 0)
005951e6          {
005951e8              void* j;
005951e8              void* j_1 = j;
005951e8              
00595240              do
00595240              {
005951f3                  void* j_2 = this->_buckets[i];
005951f3                  
005951f8                  if (j_2 != 0)
005951f8                  {
00595226                      do
00595226                      {
00595200                          j = *(uint32_t*)((char*)j_2 + 0x14);
00595208                          *(uint32_t*)((char*)j_2 + 4) = 0x7e46dc;
0059520e                          PackableList<EmoteSet>::Flush(((char*)j_2 + 4));
00595214                          *(uint32_t*)((char*)j_2 + 4) = 0x79285c;
0059521a                          operator delete(j_2);
00595224                          j_2 = j;
00595226                      } while (j != 0);
00595226                      
00595228                      i = var_4;
005951f8                  }
005951f8                  
0059522c                  this->_buckets[i] = 0;
00595239                  i = (&i->vtable + 1);
0059523c                  var_4 = i;
00595240              } while (i < this->_table_size);
005951e6          }
005951d9      }
005951d9      
00595245      this->_currNum = 0;
005951d0  }

005951ed                                         8d 49 00                                                               .I.
0059524f                                               90                                                                 .

00595250  int32_t __thiscall PackableHashTable<unsigned long,PackableList<EmoteSet> >::UnPack(class PackableHashTable<unsigned long,PackableList<EmoteSet> >* this, void** arg2, uint32_t arg3)

00595250  {
0059525e      if (arg3 < 4)
00595267          return 0;
00595267      
0059526c      void** esi = arg2;
00595270      void* eax_1 = *(uint32_t*)esi;
00595278      uint32_t var_14 = arg3;
0059527c      PackableHashTable<unsigned long,PackableList<EmoteSet> >::EmptyContents(this);
00595281      class PackableHashData<unsigned long,PackableList<EmoteSet> >** _buckets = this->_buckets;
00595281      
00595288      if (_buckets != 0)
00595288      {
0059528b          operator delete[](_buckets);
00595293          this->_buckets = nullptr;
00595288      }
00595288      
00595296      this->_table_size = 0;
00595299      void* ecx_1 = *(uint32_t*)esi;
0059529b      int32_t eax_2 = *(uint32_t*)ecx_1;
005952a0      *(uint32_t*)esi = ((char*)ecx_1 + 4);
005952a4      uint32_t ecx_4 = (eax_2 >> 0x10);
005952a7      int32_t eax_3 = (eax_2 & 0xffff);
005952ac      int32_t i = (arg3 - 4);
005952b1      this->_table_size = ecx_4;
005952b1      
005952b6      if (ecx_4 == 0)
005952b6      {
005952bf          int32_t result;
005952bf          result = eax_3 == 0;
005952c6          return result;
005952b6      }
005952b6      
005952db      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
005952db      {
005952f4          int32_t var_10 = 0x7e46dc;
005952fc          int32_t var_c_1 = 0;
00595300          int32_t var_8_1 = 0;
00595304          int32_t var_4_1 = 0;
00595308          arg3 = 0;
0059530c          int32_t* ecx_9;
0059530c          
0059530c          if (eax_3 <= 0)
0059530c          {
00595368          label_595368:
00595368              bool cond:4_1 = var_14 < (*(uint32_t*)esi - eax_1);
0059536a              ecx_9 = &var_10;
0059536e              var_10 = 0x7e46dc;
0059536e              
00595376              if (!(cond:4_1))
00595376              {
00595378                  PackableList<EmoteSet>::Flush(ecx_9);
00595389                  return 1;
00595376              }
0059530c          }
0059530c          else
0059530c          {
00595313              while (i >= 4)
00595313              {
00595315                  int32_t* eax_5 = *(uint32_t*)esi;
00595319                  int32_t edx_1 = var_10;
0059531e                  arg2 = *(uint32_t*)eax_5;
0059532a                  *(uint32_t*)esi = &eax_5[1];
0059532a                  
00595331                  if (*(uint32_t*)(edx_1 + 0x10)(esi, i) == 0)
00595331                  {
005953ad                      PackableList<EmoteSet>::~PackableList<EmoteSet>(&var_10);
005953bb                      return 0;
00595331                  }
00595331                  
0059534d                  if ((PackableHashTable<unsigned long,PackableList<EmoteSet> >::add(this, &arg2, &var_10) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
0059534d                  {
005953ad                      PackableList<EmoteSet>::~PackableList<EmoteSet>(&var_10);
005953bb                      return 0;
0059534d                  }
0059534d                  
00595354                  bool cond:5_1 = (arg3 + 1) < eax_3;
00595356                  arg3 += 1;
00595356                  
0059535a                  if (!(cond:5_1))
0059535a                      goto label_595368;
00595313              }
00595313              
0059538c              var_10 = 0x7e46dc;
00595394              ecx_9 = &var_10;
0059530c          }
0059530c          
00595398          PackableList<EmoteSet>::Flush(ecx_9);
005952db      }
005952db      
005953a6      return 0;
00595250  }

005953be                                                                                            90 90                                ..

005953c0  void* __thiscall PackableHashTable<unsigned long,PackableList<EmoteSet> >::`scalar deleting destructor'(class PackableHashTable<unsigned long,PackableList<EmoteSet> >* this, uint32_t arg2)

005953c0  {
005953c3      this->vtable = 0x7e46c8;
005953c9      PackableHashTable<unsigned long,PackableList<EmoteSet> >::EmptyContents(this);
005953ce      class PackableHashData<unsigned long,PackableList<EmoteSet> >** _buckets = this->_buckets;
005953ce      
005953d3      if (_buckets != 0)
005953d3      {
005953d6          operator delete[](_buckets);
005953de          this->_buckets = nullptr;
005953d3      }
005953d3      
005953ea      this->_table_size = 0;
005953f1      this->vtable = 0x79285c;
005953f1      
005953f7      if ((arg2 & 1) != 0)
005953fa          operator delete(this);
005953fa      
00595405      return this;
005953c0  }

00595408                          90 90 90 90 90 90 90 90                                                          ........

00595410  void __fastcall CEmoteTable::CEmoteTable(class CEmoteTable* this)

00595410  {
00595416      this->vtable = &CEmoteTable::`vftable';
00595413      this->_emote_table.vtable = 0x7e46c8;
00595413      this->_emote_table.m_fThrowawayDuplicateKeysOnUnPack = 0;
00595413      this->_emote_table._buckets = nullptr;
00595413      this->_emote_table._table_size = 0x20;
00595413      this->_emote_table._currNum = 0;
00595434      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_emote_table);
00595410  }

0059543d                                                                                         90 90 90                               ...

00595440  void* __thiscall CEmoteTable::`scalar deleting destructor'(class CEmoteTable* this, uint32_t arg2)

00595440  {
00595447      this->vtable = &CEmoteTable::`vftable';
00595444      this->_emote_table.vtable = 0x7e46c8;
00595455      PackableHashTable<unsigned long,PackableList<EmoteSet> >::EmptyContents(&this->_emote_table);
0059545a      class PackableHashData<unsigned long,PackableList<EmoteSet> >** _buckets = this->_emote_table._buckets;
0059545a      
0059545f      if (_buckets != 0)
0059545f      {
00595462          operator delete[](_buckets);
00595444          this->_emote_table._buckets = nullptr;
0059545f      }
0059545f      
00595444      this->_emote_table._table_size = 0;
00595444      this->_emote_table.vtable = 0x79285c;
00595483      this->vtable = 0x79285c;
00595483      
00595489      if ((arg2 & 1) != 0)
0059548c          operator delete(this);
0059548c      
00595498      return this;
00595440  }

0059549b                                                                                   90 90 90 90 90                             .....

005954a0  void* __thiscall PackableHashIterator<unsigned long,SpellBookPage>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,SpellBookPage>* this, uint32_t arg2)

005954a0  {
005954a8      this->vtable = 0x7e4704;
005954a8      
005954ae      if ((arg2 & 1) != 0)
005954b1          operator delete(this);
005954b1      
005954bc      return this;
005954a0  }

005954bf                                                                                               90                                 .

005954c0  class PackableHashIterator<unsigned long,SpellBookPage>* __thiscall PackableHashTable<unsigned long,SpellBookPage>::begin(class PackableHashTable<unsigned long,SpellBookPage> const* this, class PackableHashIterator<unsigned long,SpellBookPage>* __return)

005954c0  {
005954c0      uint32_t _table_size = this->_table_size;
005954c4      int32_t eax = 0;
005954c4      
005954c9      if (_table_size > 0)
005954c9      {
005954cb          class PackableHashData<unsigned long,SpellBookPage>** _buckets_1 = this->_buckets;
005954ce          class PackableHashData<unsigned long,SpellBookPage>** _buckets_2 = _buckets_1;
005954ce          
005954db          do
005954db          {
005954d3              if (*(uint32_t*)_buckets_2 != 0)
005954d3              {
005954fc                  int32_t ecx = _buckets_1[eax];
005954ff                  int32_t* __return_1 = __return;
00595503                  __return_1[2] = _buckets_1;
00595508                  __return_1[1] = ecx;
0059550b                  *(uint32_t*)__return_1 = 0x7e4704;
00595511                  __return_1[3] = _table_size;
00595514                  return __return_1;
005954d3              }
005954d3              
005954d5              eax += 1;
005954d6              _buckets_2 = &_buckets_2[1];
005954db          } while (eax < _table_size);
005954c9      }
005954c9      
005954dd      class PackableHashData<unsigned long,SpellBookPage>** _buckets = this->_buckets;
005954e6      __return->_current = nullptr;
005954ed      __return->_buckets = _buckets;
005954f0      __return->vtable = 0x7e4704;
005954f6      __return->_table_size = _table_size;
005954f9      return __return;
005954c0  }

00595517                                                                       90 90 90 90 90 90 90 90 90                         .........

00595520  int32_t __thiscall CSpellBook::Exists(class CSpellBook const* this, uint32_t const arg2)

00595520  {
00595521      uint32_t _table_size = this->_spellbook._table_size;
00595521      
00595527      if (_table_size != 0)
00595527      {
00595529          class PackableHashData<unsigned long,SpellBookPage>** _buckets = this->_spellbook._buckets;
00595529          
0059552e          if (_buckets != 0)
0059552e          {
0059553f              for (int32_t* i = _buckets[(COMBINE(0, arg2) % _table_size)]; i != 0; i = i[3])
0059553f              {
00595543                  if (arg2 == *(uint32_t*)i)
00595543                  {
00595563                      int32_t result;
00595563                      result = i != 0xfffffffc;
0059556a                      return result;
00595543                  }
0059553f              }
0059552e          }
00595527      }
00595527      
00595559      return 0;
00595520  }

0059556d                                         90 90 90                                                               ...

00595570  int32_t __thiscall CSpellBook::TranscribeSpells(class CSpellBook const* this, class PackableList<unsigned long>* arg2)

00595570  {
0059557f      void __return;
0059557f      PackableHashTable<unsigned long,SpellBookPage>::begin(&this->_spellbook, &__return);
0059558c      int32_t* i_1;
0059558c      int32_t* i = i_1;
0059558c      
00595594      while (i != 0)
00595594      {
00595598          class PackableLLNode<unsigned long>* eax_1 = operator new(0xc);
00595598          
005955a2          if (eax_1 == 0)
005955b0              eax_1 = nullptr;
005955a2          else
005955a2          {
005955a6              eax_1->data = *(uint32_t*)i;
005955a8              eax_1->next = nullptr;
005955ab              eax_1->prev = nullptr;
005955a2          }
005955a2          
005955b2          class PackableLLNode<unsigned long>* head = arg2->head;
005955b2          
005955b7          if (head != 0)
005955b7          {
005955be              head->prev = eax_1;
005955c1              eax_1->next = head;
005955b7          }
005955b7          else
005955b9              arg2->tail = eax_1;
005955b9          
005955c7          uint32_t edx_2 = (arg2->curNum + 1);
005955c8          arg2->head = eax_1;
005955cb          arg2->curNum = edx_2;
005955ce          int32_t* i_2 = i[3];
005955ce          
005955d3          if (i_2 == 0)
005955d3          {
005955e0              int32_t eax_3 = (i[4] + 1);
005955e3              int32_t var_4;
005955e3              
005955e3              if (eax_3 >= var_4)
005955e3              {
005955f2              label_5955f2:
005955f2                  i = nullptr;
005955e3              }
005955e3              else
005955e3              {
005955e9                  int32_t var_8;
005955e9                  
005955e9                  while (*(uint32_t*)(var_8 + (eax_3 << 2)) == 0)
005955e9                  {
005955eb                      eax_3 += 1;
005955eb                      
005955ee                      if (eax_3 >= var_4)
005955ee                          goto label_5955f2;
005955e9                  }
005955e9                  
005955fa                  i = *(uint32_t*)(var_8 + (eax_3 << 2));
005955e3              }
005955d3          }
005955d3          else
005955d5              i = i_2;
00595594      }
00595594      
0059560a      return 1;
00595570  }

0059560d                                         90 90 90                                                               ...

00595610  uint32_t __thiscall PackableHashTable<unsigned long,SpellBookPage>::Pack(class PackableHashTable<unsigned long,SpellBookPage>* this, void** arg2, uint32_t arg3)

00595610  {
00595610      class PackableHashTable<unsigned long,SpellBookPage>* this_1 = this;
00595615      uint32_t result = PackableHashTable<unsigned long,SpellBookPage>::pack_size(this);
0059561a      uint32_t ebx = arg3;
00595620      uint32_t result_1 = result;
00595620      
00595624      if (ebx >= result)
00595624      {
00595639          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
0059563b          *(uint32_t*)arg2 += 4;
00595641          uint32_t i = 0;
00595645          arg3 = 0;
00595645          
00595649          if (this->_table_size > 0)
00595649          {
00595692              do
00595692              {
00595653                  int32_t* j = this->_buckets[i];
00595653                  
00595658                  if (j != 0)
00595658                  {
0059567e                      do
0059567e                      {
00595663                          if (ebx >= 4)
00595663                          {
00595669                              **(uint32_t**)arg2 = *(uint32_t*)j;
0059566b                              *(uint32_t*)arg2 += 4;
00595663                          }
00595663                          
00595676                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
00595679                          j = j[3];
0059567e                      } while (j != 0);
0059567e                      
00595680                      result = result_1;
00595684                      i = arg3;
00595658                  }
00595658                  
0059568b                  i += 1;
0059568e                  arg3 = i;
00595692              } while (i < this->_table_size);
00595649          }
00595624      }
00595624      
00595699      return result;
00595610  }

0059564d                                         8d 49 00                                                               .I.
0059569c                                                                                      90 90 90 90                              ....

005956a0  uint32_t __fastcall PackableHashTable<unsigned long,SpellBookPage>::pack_size(class PackableHashTable<unsigned long,SpellBookPage>* this)

005956a0  {
005956a0      class PackableHashTable<unsigned long,SpellBookPage>* this_1 = this;
005956a8      int32_t i = 0;
005956aa      bool cond:0 = this->_table_size <= 0;
005956ad      int32_t result = 4;
005956b2      this_1 = nullptr;
005956b2      
005956b6      if (!(cond:0))
005956b6      {
005956f1          do
005956f1          {
005956c3              void* j = this->_buckets[i];
005956c3              
005956c8              while (j != 0)
005956c8              {
005956dd                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
005956e0                  j = *(uint32_t*)((char*)j + 0xc);
005956e5                  result = ((result + eax_2) + 4);
005956c8              }
005956c8              
005956ee              i += 1;
005956f1          } while (i < this->_table_size);
005956b6      }
005956b6      
005956fa      return result;
005956a0  }

005956fb                                                                                   90 90 90 90 90                             .....

00595700  void __fastcall PackableHashTable<unsigned long,SpellBookPage>::EmptyContents(class PackableHashTable<unsigned long,SpellBookPage>* this)

00595700  {
00595709      if (this->_buckets != 0)
00595709      {
0059570e          int32_t i = 0;
0059570e          
00595712          if (this->_table_size > 0)
00595712          {
00595749              do
00595749              {
00595718                  void* j_1 = this->_buckets[i];
00595718                  
0059571d                  if (j_1 != 0)
0059571d                  {
00595737                      void* j;
00595737                      
00595737                      do
00595737                      {
00595720                          j = *(uint32_t*)((char*)j_1 + 0xc);
00595724                          *(uint32_t*)((char*)j_1 + 4) = 0x79285c;
0059572b                          operator delete(j_1);
00595735                          j_1 = j;
00595737                      } while (j != 0);
0059571d                  }
0059571d                  
00595739                  this->_buckets[i] = 0;
00595746                  i += 1;
00595749              } while (i < this->_table_size);
00595712          }
00595709      }
00595709      
0059574c      this->_currNum = 0;
00595700  }

00595756                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00595760  int32_t __thiscall PackableHashTable<unsigned long,SpellBookPage>::add(class PackableHashTable<unsigned long,SpellBookPage>* this, uint32_t const* arg2, class SpellBookPage const* arg3)

00595760  {
0059576a      uint32_t _table_size = this->_table_size;
0059576a      
0059576f      if (_table_size == 0)
0059576f      {
0059579e      label_59579e:
0059579e          void* eax_4 = operator new(0x14);
0059579e          
005957aa          if (eax_4 != 0)
005957aa          {
005957af              uint32_t _table_size_1 = this->_table_size;
005957b6              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
005957b8              *(uint32_t*)((char*)eax_4 + 4) = 0x7e4394;
005957c2              *(uint32_t*)((char*)eax_4 + 8) = arg3->_casting_likelihood;
005957c5              *(uint32_t*)((char*)eax_4 + 0xc) = 0;
005957d1              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size_1);
005957d4              *(uint32_t*)((char*)eax_4 + 0x10) = temp1_2;
005957df              *(uint32_t*)((char*)eax_4 + 0xc) = this->_buckets[temp1_2];
005957e2              this->_buckets[temp1_2] = eax_4;
005957e8              this->_currNum += 1;
005957f3              return 1;
005957aa          }
0059576f      }
0059576f      else
0059576f      {
00595771          class PackableHashData<unsigned long,SpellBookPage>** _buckets = this->_buckets;
00595771          
00595776          if (_buckets == 0)
00595776              goto label_59579e;
00595776          
00595778          uint32_t const i = *(uint32_t*)arg2;
00595781          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
00595781          
00595786          if (edx_3 == 0)
00595786              goto label_59579e;
00595786          
0059578a          while (i != *(uint32_t*)edx_3)
0059578a          {
0059578c              edx_3 = edx_3[3];
0059578c              
00595791              if (edx_3 == 0)
00595791                  goto label_59579e;
0059578a          }
0059578a          
0059579a          if (edx_3 == 0xfffffffc)
0059579a              goto label_59579e;
0059576f      }
0059576f      
005957fc      return 0;
00595760  }

005957ff                                                                                               90                                 .

00595800  int32_t __thiscall PackableHashTable<unsigned long,SpellBookPage>::remove(class PackableHashTable<unsigned long,SpellBookPage>* this, uint32_t const* arg2, class SpellBookPage* arg3)

00595800  {
00595806      uint32_t _table_size = this->_table_size;
00595806      
0059580b      if (_table_size != 0)
0059580b      {
0059580d          class PackableHashData<unsigned long,SpellBookPage>** _buckets = this->_buckets;
0059580d          
00595812          if (_buckets != 0)
00595812          {
00595818              uint32_t const esi_1 = *(uint32_t*)arg2;
00595821              int32_t* i_1 = nullptr;
00595821              
00595828              for (int32_t* i = _buckets[(COMBINE(0, esi_1) % _table_size)]; i != 0; i = i[3])
00595828              {
00595832                  if (*(uint32_t*)i == esi_1)
00595832                  {
0059584f                      arg3->_casting_likelihood = i[2];
0059584f                      
00595852                      if (i_1 == 0)
00595864                          this->_buckets[(COMBINE(0, *(uint32_t*)arg2) % this->_table_size)] = i[3];
00595852                      else
00595857                          i_1[3] = i[3];
00595857                      
0059586e                      i[1] = 0x79285c;
00595875                      operator delete(i);
00595883                      this->_currNum -= 1;
0059588d                      return 1;
00595832                  }
00595832                  
00595834                  i_1 = i;
00595828              }
00595812          }
0059580b      }
0059580b      
00595843      return 0;
00595800  }


00595890  int32_t __thiscall CSpellBook::AddSpell(class CSpellBook* this, uint32_t const arg2, class SpellBookPage const* arg3)

00595890  {
00595896      if (arg2 == 0)
005958af          return 0;
005958af      
005958aa      return PackableHashTable<unsigned long,SpellBookPage>::add(&this->_spellbook, &arg2, arg3);
00595890  }

005958b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005958c0  int32_t __thiscall CSpellBook::RemoveSpell(class CSpellBook* this, uint32_t const arg2, class SpellBookPage* arg3)

005958c0  {
005958d2      return PackableHashTable<unsigned long,SpellBookPage>::remove(&this->_spellbook, &arg2, arg3);
005958c0  }

005958d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005958e0  void __fastcall CSpellBook::Prune(class CSpellBook* this)

005958e0  {
005958e0      int32_t ebp;
005958e0      int32_t var_4 = ebp;
005958ec      class PackableHashTable<unsigned long,SpellBookPage>* esi = &this->_spellbook;
005958f7      class PackableHashTable<unsigned long,SpellBookPage>* var_38 = esi;
005958fb      void __return;
005958fb      PackableHashTable<unsigned long,SpellBookPage>::begin(esi, &__return);
00595900      int32_t* var_24;
00595900      int32_t* ebx = var_24;
00595900      
00595906      if (ebx != 0)
00595906      {
00595916          while (true)
00595916          {
00595916              int32_t* eax_3 = ebx[3];
0059591b              uint32_t ecx_1 = *(uint32_t*)ebx;
0059591d              uint32_t var_34 = ecx_1;
0059591d              
00595921              if (eax_3 == 0)
00595921              {
0059592a                  int32_t eax_2 = (ebx[4] + 1);
0059592d                  int32_t var_1c;
0059592d                  
0059592d                  if (eax_2 >= var_1c)
0059592d                  {
0059593c                  label_59593c:
0059593c                      eax_3 = nullptr;
0059592d                  }
0059592d                  else
0059592d                  {
00595935                      int32_t var_20;
00595935                      
00595935                      while (*(uint32_t*)(var_20 + (eax_2 << 2)) == 0)
00595935                      {
00595937                          eax_2 += 1;
00595937                          
0059593a                          if (eax_2 >= var_1c)
0059593a                              goto label_59593c;
00595935                      }
00595935                      
00595980                      eax_3 = *(uint32_t*)(var_20 + (eax_2 << 2));
0059592d                  }
00595921              }
00595921              
00595940              ebx = eax_3;
0059594a              void var_30;
0059594a              
0059594a              if ((ecx_1 == 0 || ecx_1 >= 0x2000))
00595992                  PackableHashTable<unsigned long,SpellBookPage>::remove(esi, &var_34, &var_30);
0059594a              else
0059594a              {
0059594c                  int32_t var_4c_1 = 0x10;
00595952                  void var_18;
00595952                  void* var_50_1 = &var_18;
00595953                  uint32_t var_54_1 = ecx_1;
00595954                  Client::You_Must_Not_Have_Multiple_Implementations_Of_AddRef_In_A_Hierarchy(ecx_1);
0059595c                  char const* const edi_1 = "Unknown";
00595961                  void* esi_1 = &var_18;
00595965                  int32_t i = 8;
0059596a                  bool cond:3_1 = false;
0059596a                  
0059596c                  while (i != 0)
0059596c                  {
0059596c                      char temp0_1 = *(uint8_t*)esi_1;
0059596c                      char const temp1_1 = *(uint8_t*)edi_1;
0059596c                      cond:3_1 = temp0_1 != temp1_1;
0059596c                      esi_1 += 1;
0059596c                      edi_1 = &edi_1[1];
0059596c                      i -= 1;
0059596c                      
0059596c                      if (temp0_1 != temp1_1)
0059596c                          break;
0059596c                  }
0059596c                  
0059596e                  if (!(cond:3_1))
00595992                      PackableHashTable<unsigned long,SpellBookPage>::remove(var_38, &var_34, &var_30);
0059594a              }
0059594a              
00595999              if (ebx == 0)
00595999                  break;
00595999              
00595912              esi = var_38;
00595916          }
00595906      }
00595906      
005958ea      var_4;
005958e0  }

005959a7                       90 90 90 90 90 90 90 90 90                                                         .........

005959b0  void __fastcall PackableHashTable<unsigned long,SpellBookPage>::~PackableHashTable<unsigned long,SpellBookPage>(class PackableHashTable<unsigned long,SpellBookPage>* this)

005959b0  {
005959b3      this->vtable = &PackableHashTable<unsigned long,class SpellBookPage>::`vftable';
005959b9      PackableHashTable<unsigned long,SpellBookPage>::EmptyContents(this);
005959be      class PackableHashData<unsigned long,SpellBookPage>** _buckets = this->_buckets;
005959be      
005959c3      if (_buckets != 0)
005959c3      {
005959c6          operator delete[](_buckets);
005959ce          this->_buckets = nullptr;
005959c3      }
005959c3      
005959d5      this->_table_size = 0;
005959dc      this->vtable = 0x79285c;
005959b0  }

005959e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005959f0  int32_t __thiscall PackableHashTable<unsigned long,SpellBookPage>::UnPack(class PackableHashTable<unsigned long,SpellBookPage>* this, void** arg2, uint32_t arg3)

005959f0  {
00595a04      if (arg3 >= 4)
00595a04      {
00595a14          void* eax_2 = *(uint32_t*)arg2;
00595a20          PackableHashTable<unsigned long,SpellBookPage>::EmptyContents(this);
00595a25          class PackableHashData<unsigned long,SpellBookPage>** _buckets = this->_buckets;
00595a25          
00595a2a          if (_buckets != 0)
00595a2a          {
00595a2d              operator delete[](_buckets);
00595a35              this->_buckets = nullptr;
00595a2a          }
00595a2a          
00595a3c          this->_table_size = 0;
00595a43          void* ecx_1 = *(uint32_t*)arg2;
00595a45          int32_t eax_3 = *(uint32_t*)ecx_1;
00595a4a          *(uint32_t*)arg2 = ((char*)ecx_1 + 4);
00595a4e          uint32_t result = (eax_3 >> 0x10);
00595a51          int32_t eax_4 = (eax_3 & 0xffff);
00595a5b          this->_table_size = result;
00595a5b          
00595a62          if (result == 0)
00595a62          {
00595a66              result = eax_4 == 0;
00595a71              return result;
00595a62          }
00595a62          
00595a81          if (((result <= 0x10000 && eax_4 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
00595a81          {
00595a98              int32_t var_10 = 0x7e4394;
00595aa0              int32_t var_c_1 = 0;
00595aa8              int32_t var_24_1 = 0;
00595aa8              
00595ab0              if (eax_4 > 0)
00595ab0              {
00595b0c                  bool cond:3_1;
00595b0c                  
00595b0c                  do
00595b0c                  {
00595ab5                      if ((arg3 - 4) < 4)
00595a0e                          return 0;
00595a0e                      
00595abb                      int32_t* eax_8 = *(uint32_t*)arg2;
00595abd                      uint32_t edx_1 = *(uint32_t*)eax_8;
00595ac3                      *(uint32_t*)arg2 = &eax_8[1];
00595ac5                      int32_t eax_10 = var_10;
00595ace                      uint32_t var_1c = edx_1;
00595ace                      
00595ad7                      if (*(uint32_t*)(eax_10 + 0x10)(arg2, (arg3 - 4)) == 0)
00595a0e                          return 0;
00595a0e                      
00595af7                      if ((PackableHashTable<unsigned long,SpellBookPage>::add(this, &var_1c, &var_10) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
00595a0e                          return 0;
00595a0e                      
00595b06                      cond:3_1 = (var_24_1 + 1) < eax_4;
00595b08                      var_24_1 += 1;
00595b0c                  } while (cond:3_1);
00595ab0              }
00595ab0              
00595b18              void* eax_17 = (*(uint32_t*)arg2 - eax_2);
00595b25              return (((char*)eax_17 - eax_17) + 1);
00595a81          }
00595a04      }
00595a04      
00595a0e      return 0;
005959f0  }

00595b28                          90 90 90 90 90 90 90 90                                                          ........

00595b30  void* __thiscall PackableHashTable<unsigned long,SpellBookPage>::`scalar deleting destructor'(class PackableHashTable<unsigned long,SpellBookPage>* this, uint32_t arg2)

00595b30  {
00595b33      this->vtable = &PackableHashTable<unsigned long,class SpellBookPage>::`vftable';
00595b39      PackableHashTable<unsigned long,SpellBookPage>::EmptyContents(this);
00595b3e      class PackableHashData<unsigned long,SpellBookPage>** _buckets = this->_buckets;
00595b3e      
00595b43      if (_buckets != 0)
00595b43      {
00595b46          operator delete[](_buckets);
00595b4e          this->_buckets = nullptr;
00595b43      }
00595b43      
00595b5a      this->_table_size = 0;
00595b61      this->vtable = 0x79285c;
00595b61      
00595b67      if ((arg2 & 1) != 0)
00595b6a          operator delete(this);
00595b6a      
00595b75      return this;
00595b30  }

00595b78                                                                          90 90 90 90 90 90 90 90                          ........

00595b80  void __fastcall CSpellBook::CSpellBook(class CSpellBook* this)

00595b80  {
00595b86      this->vtable = 0x7e471c;
00595b83      this->_spellbook.vtable = &PackableHashTable<unsigned long,class SpellBookPage>::`vftable';
00595b83      this->_spellbook.m_fThrowawayDuplicateKeysOnUnPack = 0;
00595b83      this->_spellbook._buckets = nullptr;
00595b83      this->_spellbook._table_size = 0x40;
00595b83      this->_spellbook._currNum = 0;
00595ba4      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_spellbook);
00595b80  }

00595bad                                         90 90 90                                                               ...

00595bb0  int32_t __thiscall CSpellBook::UnPack(class CSpellBook* this, void** arg2, uint32_t arg3)

00595bb0  {
00595bb0      class CSpellBook* this_1 = this;
00595bba      PackableHashTable<unsigned long,SpellBookPage>::EmptyContents(&this->_spellbook);
00595bca      this_1 = nullptr;
00595bca      
00595bdb      if (arg3 < this->_spellbook.vtable->Pack(&this_1, 0))
00595be2          return 0;
00595be2      
00595bef      int32_t result = this->_spellbook.vtable->UnPack(arg2, arg3);
00595bf6      CSpellBook::Prune(this);
00595c00      return result;
00595bb0  }

00595c03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00595c10  void* __thiscall CSpellBook::`scalar deleting destructor'(class CSpellBook* this, uint32_t arg2)

00595c10  {
00595c16      PackableHashTable<unsigned long,SpellBookPage>::~PackableHashTable<unsigned long,SpellBookPage>(&this->_spellbook);
00595c20      this->vtable = 0x79285c;
00595c20      
00595c26      if ((arg2 & 1) != 0)
00595c29          operator delete(this);
00595c29      
00595c34      return this;
00595c10  }

00595c37                                                                       90 90 90 90 90 90 90 90 90                         .........

00595c40  void __fastcall CBaseQualities::Clear(class CBaseQualities* this)

00595c40  {
00595c43      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
00595c43      
00595c4b      if (_intStatsTable != 0)
00595c4b      {
00595c4d          _intStatsTable->vtable->__vecDelDtor(1);
00595c53          this->_intStatsTable = nullptr;
00595c4b      }
00595c4b      
00595c56      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
00595c56      
00595c5b      if (_int64StatsTable != 0)
00595c5b      {
00595c5d          _int64StatsTable->vtable->__vecDelDtor(1);
00595c63          this->_int64StatsTable = nullptr;
00595c5b      }
00595c5b      
00595c66      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
00595c66      
00595c6b      if (_boolStatsTable != 0)
00595c6b      {
00595c6d          _boolStatsTable->vtable->__vecDelDtor(1);
00595c73          this->_boolStatsTable = nullptr;
00595c6b      }
00595c6b      
00595c76      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00595c76      
00595c7b      if (_floatStatsTable != 0)
00595c7b      {
00595c7d          _floatStatsTable->vtable->__vecDelDtor(1);
00595c83          this->_floatStatsTable = nullptr;
00595c7b      }
00595c7b      
00595c86      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
00595c86      
00595c8b      if (_strStatsTable != 0)
00595c8b      {
00595c8d          _strStatsTable->vtable->__vecDelDtor(1);
00595c93          this->_strStatsTable = nullptr;
00595c8b      }
00595c8b      
00595c96      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
00595c96      
00595c9b      if (_didStatsTable != 0)
00595c9b      {
00595c9d          _didStatsTable->vtable->__vecDelDtor(1);
00595ca3          this->_didStatsTable = nullptr;
00595c9b      }
00595c9b      
00595ca6      class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
00595ca6      
00595cab      if (_iidStatsTable != 0)
00595cab      {
00595cad          _iidStatsTable->vtable->__vecDelDtor(1);
00595cb3          this->_iidStatsTable = nullptr;
00595cab      }
00595cab      
00595cb6      class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
00595cb6      
00595cbb      if (_posStatsTable != 0)
00595cbb      {
00595cbd          _posStatsTable->vtable->__vecDelDtor(1);
00595cc3          this->_posStatsTable = nullptr;
00595cbb      }
00595c40  }

00595cc9                             90 90 90 90 90 90 90                                                           .......

00595cd0  void __thiscall CBaseQualities::SetPackHeader(class CBaseQualities* this, uint32_t* arg2)

00595cd0  {
00595cd9      if (this->_intStatsTable != 0)
00595cdb          *(uint32_t*)arg2 |= 1;
00595cdb      
00595ce3      if (this->_int64StatsTable != 0)
00595ce5          *(uint32_t*)arg2 |= 0x80;
00595ce5      
00595cf0      if (this->_boolStatsTable != 0)
00595cf2          *(uint32_t*)arg2 |= 2;
00595cf2      
00595cfa      if (this->_floatStatsTable != 0)
00595cfc          *(uint32_t*)arg2 |= 4;
00595cfc      
00595d04      if (this->_strStatsTable != 0)
00595d06          *(uint32_t*)arg2 |= 0x10;
00595d06      
00595d0e      if (this->_didStatsTable != 0)
00595d10          *(uint32_t*)arg2 |= 8;
00595d10      
00595d18      if (this->_iidStatsTable != 0)
00595d1a          *(uint32_t*)arg2 |= 0x40;
00595d1a      
00595d22      if (this->_posStatsTable != 0)
00595d24          *(uint32_t*)arg2 |= 0x20;
00595cd0  }

00595d2a                                90 90 90 90 90 90                                                            ......

00595d30  uint32_t __fastcall CBaseQualities::GetPackSize(class CBaseQualities* this)

00595d30  {
00595d30      class CBaseQualities* this_1 = this;
00595d35      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
00595d3a      int32_t result = 8;
00595d3f      this_1 = nullptr;
00595d3f      
00595d47      if (_intStatsTable != 0)
00595d57          result = (_intStatsTable->vtable->Pack(&this_1, 0) + 8);
00595d57      
00595d5a      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
00595d5a      
00595d5f      if (_int64StatsTable != 0)
00595d6d          result += _int64StatsTable->vtable->Pack(&this_1, 0);
00595d6d      
00595d6f      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
00595d6f      
00595d74      if (_boolStatsTable != 0)
00595d82          result += _boolStatsTable->vtable->Pack(&this_1, 0);
00595d82      
00595d84      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00595d84      
00595d89      if (_floatStatsTable != 0)
00595d97          result += _floatStatsTable->vtable->Pack(&this_1, 0);
00595d97      
00595d99      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
00595d99      
00595d9e      if (_strStatsTable != 0)
00595dac          result += _strStatsTable->vtable->Pack(&this_1, 0);
00595dac      
00595dae      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
00595dae      
00595db3      if (_didStatsTable != 0)
00595dc1          result += _didStatsTable->vtable->Pack(&this_1, 0);
00595dc1      
00595dc3      class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
00595dc3      
00595dc8      if (_iidStatsTable != 0)
00595dd6          result += _iidStatsTable->vtable->Pack(&this_1, 0);
00595dd6      
00595dd8      class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
00595dd8      
00595ddd      if (_posStatsTable == 0)
00595df2          return result;
00595df2      
00595deb      return (result + _posStatsTable->vtable->Pack(&this_1, 0));
00595d30  }

00595df3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00595e00  void __fastcall CBaseQualities::CBaseQualities(class CBaseQualities* this, class IDClass<_tagDataID,32,0> arg2)

00595e00  {
00595e04      this->vtable = 0x7e4768;
00595e0a      __builtin_memset(&this->_weenie_type, 0, 0x24);
00595e00  }

00595e28                          90 90 90 90 90 90 90 90                                                          ........

00595e30  void __fastcall CBaseQualities::~CBaseQualities(class CBaseQualities* this)

00595e30  {
00595e30      this->vtable = 0x7e4768;
00595e36      /* tailcall */
00595e36      return CBaseQualities::Clear(this);
00595e30  }

00595e3b                                                                                   90 90 90 90 90                             .....

00595e40  uint32_t __thiscall CBaseQualities::Pack(class CBaseQualities* this, void** arg2, uint32_t arg3)

00595e40  {
00595e45      uint32_t result = CBaseQualities::GetPackSize(this);
00595e4a      uint32_t ebx = arg3;
00595e4a      
00595e52      if (ebx >= result)
00595e52      {
00595e60          arg3 = 0;
00595e68          CBaseQualities::SetPackHeader(this, &arg3);
00595e77          **(uint32_t**)arg2 = arg3;
00595e7b          void* edx_3 = (*(uint32_t*)arg2 + 4);
00595e7e          *(uint32_t*)arg2 = edx_3;
00595e85          *(uint32_t*)edx_3 = this->_weenie_type;
00595e87          *(uint32_t*)arg2 += 4;
00595e8a          class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
00595e8a          
00595e8f          if (_intStatsTable != 0)
00595e91              _intStatsTable->vtable->Pack(arg2, ebx);
00595e91          
00595e98          class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
00595e98          
00595e9d          if (_int64StatsTable != 0)
00595e9f              _int64StatsTable->vtable->Pack(arg2, ebx);
00595e9f          
00595ea6          class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
00595ea6          
00595eab          if (_boolStatsTable != 0)
00595ead              _boolStatsTable->vtable->Pack(arg2, ebx);
00595ead          
00595eb4          class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00595eb4          
00595eb9          if (_floatStatsTable != 0)
00595ebb              _floatStatsTable->vtable->Pack(arg2, ebx);
00595ebb          
00595ec2          class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
00595ec2          
00595ec7          if (_strStatsTable != 0)
00595ec9              _strStatsTable->vtable->Pack(arg2, ebx);
00595ec9          
00595ed0          class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
00595ed0          
00595ed5          if (_didStatsTable != 0)
00595ed7              _didStatsTable->vtable->Pack(arg2, ebx);
00595ed7          
00595ede          class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
00595ede          
00595ee3          if (_iidStatsTable != 0)
00595ee5              _iidStatsTable->vtable->Pack(arg2, ebx);
00595ee5          
00595eec          class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
00595eec          
00595ef1          if (_posStatsTable != 0)
00595ef3              _posStatsTable->vtable->Pack(arg2, ebx);
00595e52      }
00595e52      
00595f00      return result;
00595e40  }

00595f03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00595f10  int32_t __thiscall CBaseQualities::UnPack(class CBaseQualities* this, void** arg2, uint32_t arg3)

00595f10  {
00595f10      class CBaseQualities* this_1 = this;
00595f16      void* eax = *(uint32_t*)arg2;
00595f16      
00595f2b      if (arg3 >= 4)
00595f2b      {
00595f2d          void** ecx = *(uint32_t*)eax;
00595f3c          *(uint32_t*)arg2 = ((char*)eax + 4);
00595f3c          
00595f3e          if ((arg3 - 4) >= 4)
00595f3e          {
00595f42              this->_weenie_type = *(uint32_t*)((char*)eax + 4);
00595f53              *(uint32_t*)arg2 += 4;
00595f55              uint32_t eax_2;
00595f55              
00595f55              if ((ecx & 1) == 0)
00595f55              {
00595f98                  class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
00595f98                  
00595f9d                  if (_intStatsTable != 0)
00595f9d                  {
00595f9f                      _intStatsTable->vtable->__vecDelDtor(1);
00595fa5                      this->_intStatsTable = nullptr;
00595f9d                  }
00595f55              }
00595f55              else
00595f55              {
00595f5a                  if (this->_intStatsTable == 0)
00595f5a                  {
00595f5e                      void* eax_3 = operator new(0x14);
00595f68                      class PackableHashTable<unsigned long,long>* eax_4;
00595f68                      
00595f68                      if (eax_3 == 0)
00595f7d                          eax_4 = nullptr;
00595f68                      else
00595f6d                          eax_4 = PackableHashTable<unsigned long,long>::PackableHashTable<unsigned long,long>(eax_3, 0);
00595f6d                      
00595f7f                      this->_intStatsTable = eax_4;
00595f5a                  }
00595f5a                  
00595f89                  eax_2 = this->_intStatsTable->vtable->UnPack(arg2, (arg3 - 8));
00595f89                  
00595f8e                  if (eax_2 == 0)
00595f95                      return eax_2;
00595f55              }
00595f55              
00595fa8              eax_2 = ecx;
00595fa8              
00595fae              if (eax_2 >= 0)
00595fae              {
00595fe8                  class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
00595fe8                  
00595fed                  if (_int64StatsTable != 0)
00595fed                  {
00595fef                      _int64StatsTable->vtable->__vecDelDtor(1);
00595ff5                      this->_int64StatsTable = nullptr;
00595fed                  }
00595fae              }
00595fae              else
00595fae              {
00595fb3                  if (this->_int64StatsTable == 0)
00595fb3                  {
00595fb7                      void* eax_7 = operator new(0x14);
00595fc1                      class PackableHashTable<unsigned long,__int64>* eax_8;
00595fc1                      
00595fc1                      if (eax_7 == 0)
00595fcd                          eax_8 = nullptr;
00595fc1                      else
00595fc6                          eax_8 = PackableHashTable<unsigned long,__int64>::PackableHashTable<unsigned long,__int64>(eax_7, 0);
00595fc6                      
00595fcf                      this->_int64StatsTable = eax_8;
00595fb3                  }
00595fb3                  
00595fd9                  int32_t eax_9 = this->_int64StatsTable->vtable->UnPack(arg2, (arg3 - 8));
00595fd9                  
00595fde                  if (eax_9 == 0)
00595fe5                      return eax_9;
00595fae              }
00595fae              
00595ffd              if ((ecx & 2) == 0)
00595ffd              {
00596037                  class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
00596037                  
0059603c                  if (_boolStatsTable != 0)
0059603c                  {
0059603e                      _boolStatsTable->vtable->__vecDelDtor(1);
00596044                      this->_boolStatsTable = nullptr;
0059603c                  }
00595ffd              }
00595ffd              else
00595ffd              {
00596002                  if (this->_boolStatsTable == 0)
00596002                  {
00596006                      void* eax_11 = operator new(0x14);
00596010                      class PackableHashTable<unsigned long,int>* eax_12;
00596010                      
00596010                      if (eax_11 == 0)
0059601c                          eax_12 = nullptr;
00596010                      else
00596015                          eax_12 = PackableHashTable<unsigned long,int>::PackableHashTable<unsigned long,int>(eax_11, 0);
00596015                      
0059601e                      this->_boolStatsTable = eax_12;
00596002                  }
00596002                  
00596028                  int32_t eax_13 = this->_boolStatsTable->vtable->UnPack(arg2, (arg3 - 8));
00596028                  
0059602d                  if (eax_13 == 0)
00596034                      return eax_13;
00595ffd              }
00595ffd              
0059604c              if ((ecx & 4) == 0)
0059604c              {
00596086                  class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
00596086                  
0059608b                  if (_floatStatsTable != 0)
0059608b                  {
0059608d                      _floatStatsTable->vtable->__vecDelDtor(1);
00596093                      this->_floatStatsTable = nullptr;
0059608b                  }
0059604c              }
0059604c              else
0059604c              {
00596051                  if (this->_floatStatsTable == 0)
00596051                  {
00596055                      void* eax_15 = operator new(0x14);
0059605f                      class PackableHashTable<unsigned long,double>* eax_16;
0059605f                      
0059605f                      if (eax_15 == 0)
0059606b                          eax_16 = nullptr;
0059605f                      else
00596064                          eax_16 = PackableHashTable<unsigned long,double>::PackableHashTable<unsigned long,double>(eax_15, 0);
00596064                      
0059606d                      this->_floatStatsTable = eax_16;
00596051                  }
00596051                  
00596077                  int32_t eax_17 = this->_floatStatsTable->vtable->UnPack(arg2, (arg3 - 8));
00596077                  
0059607c                  if (eax_17 == 0)
00596083                      return eax_17;
0059604c              }
0059604c              
0059609b              if ((ecx & 0x10) == 0)
0059609b              {
005960d5                  class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
005960d5                  
005960da                  if (_strStatsTable != 0)
005960da                  {
005960dc                      _strStatsTable->vtable->__vecDelDtor(1);
005960e2                      this->_strStatsTable = nullptr;
005960da                  }
0059609b              }
0059609b              else
0059609b              {
005960a0                  if (this->_strStatsTable == 0)
005960a0                  {
005960a4                      void* eax_19 = operator new(0x14);
005960ae                      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* eax_20;
005960ae                      
005960ae                      if (eax_19 == 0)
005960ba                          eax_20 = nullptr;
005960ae                      else
005960b3                          eax_20 = PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >(eax_19, 0);
005960b3                      
005960bc                      this->_strStatsTable = eax_20;
005960a0                  }
005960a0                  
005960c6                  int32_t eax_21 = this->_strStatsTable->vtable->UnPack(arg2, (arg3 - 8));
005960c6                  
005960cb                  if (eax_21 == 0)
005960d2                      return eax_21;
0059609b              }
0059609b              
005960ea              if ((ecx & 8) == 0)
005960ea              {
00596124                  class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
00596124                  
00596129                  if (_didStatsTable != 0)
00596129                  {
0059612b                      _didStatsTable->vtable->__vecDelDtor(1);
00596131                      this->_didStatsTable = nullptr;
00596129                  }
005960ea              }
005960ea              else
005960ea              {
005960ef                  if (this->_didStatsTable == 0)
005960ef                  {
005960f3                      void* eax_23 = operator new(0x14);
005960fd                      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* eax_24;
005960fd                      
005960fd                      if (eax_23 == 0)
00596109                          eax_24 = nullptr;
005960fd                      else
00596102                          eax_24 = PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >::PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >(eax_23, 0);
00596102                      
0059610b                      this->_didStatsTable = eax_24;
005960ef                  }
005960ef                  
00596115                  int32_t eax_25 = this->_didStatsTable->vtable->UnPack(arg2, (arg3 - 8));
00596115                  
0059611a                  if (eax_25 == 0)
00596121                      return eax_25;
005960ea              }
005960ea              
00596139              if ((ecx & 0x40) == 0)
00596139              {
00596173                  class PackableHashTable<unsigned long,unsigned long>* _iidStatsTable = this->_iidStatsTable;
00596173                  
00596178                  if (_iidStatsTable != 0)
00596178                  {
0059617a                      _iidStatsTable->vtable->__vecDelDtor(1);
00596180                      this->_iidStatsTable = nullptr;
00596178                  }
00596139              }
00596139              else
00596139              {
0059613e                  if (this->_iidStatsTable == 0)
0059613e                  {
00596142                      class PackableHashTable<unsigned long,unsigned long>* eax_27 = operator new(0x14);
0059614c                      class PackableHashTable<unsigned long,unsigned long>* eax_28;
0059614c                      
0059614c                      if (eax_27 == 0)
00596158                          eax_28 = nullptr;
0059614c                      else
00596151                          eax_28 = PackableHashTable<unsigned long,unsigned long>::PackableHashTable<unsigned long,unsigned long>(eax_27, 0);
00596151                      
0059615a                      this->_iidStatsTable = eax_28;
0059613e                  }
0059613e                  
00596164                  int32_t eax_29 = this->_iidStatsTable->vtable->UnPack(arg2, (arg3 - 8));
00596164                  
00596169                  if (eax_29 == 0)
00596170                      return eax_29;
00596139              }
00596139              
00596188              if ((ecx & 0x20) == 0)
00596188              {
005961c2                  class PackableHashTable<unsigned long,Position>* _posStatsTable = this->_posStatsTable;
005961c2                  
005961c7                  if (_posStatsTable != 0)
005961c7                  {
005961c9                      _posStatsTable->vtable->__vecDelDtor(1);
005961cf                      this->_posStatsTable = nullptr;
005961c7                  }
00596188              }
00596188              else
00596188              {
0059618d                  if (this->_posStatsTable == 0)
0059618d                  {
00596191                      class PackableHashTable<unsigned long,Position>* eax_31 = operator new(0x14);
0059619b                      class PackableHashTable<unsigned long,Position>* eax_32;
0059619b                      
0059619b                      if (eax_31 == 0)
005961a7                          eax_32 = nullptr;
0059619b                      else
005961a0                          eax_32 = PackableHashTable<unsigned long,Position>::PackableHashTable<unsigned long,Position>(eax_31, 0);
005961a0                      
005961a9                      this->_posStatsTable = eax_32;
0059618d                  }
0059618d                  
005961b3                  int32_t eax_33 = this->_posStatsTable->vtable->UnPack(arg2, (arg3 - 8));
005961b3                  
005961b8                  if (eax_33 == 0)
005961bf                      return eax_33;
00596188              }
00596188              
005961ec              return PackObj::VERIFY_ADDR(*(uint32_t*)arg2, eax, arg3);
00595f3e          }
00595f2b      }
00595f2b      
00595f7a      return 0;
00595f10  }

005961ef                                               90                                                                 .

005961f0  class PackableHashTable<unsigned long,CContractTracker>* __thiscall PackableHashTable<unsigned long,double>::operator=(class PackableHashTable<unsigned long,double>* arg1, void* arg2)

005961f0  {
005961f6      class PackableHashTable<unsigned long,CContractTracker>* result = arg1;
005961f6      
005961fa      if (result != arg2)
005961fa      {
005961fd          PackableHashTable<unsigned long,double>::EmptyContents(arg1);
00596202          void* _buckets = result->_buckets;
00596205          int32_t i = 0;
00596205          
00596209          if (_buckets != 0)
00596209          {
0059620c              operator delete[](_buckets);
00596214              result->_buckets = nullptr;
00596209          }
00596209          
00596217          result->_table_size = 0;
0059621f          result->_table_size = *(uint32_t*)((char*)arg2 + 0xc);
00596222          PackableHashTable<unsigned long,CContractTracker>::Init(result);
00596222          
0059622a          if (*(uint32_t*)((char*)arg2 + 0xc) > 0)
0059622a          {
0059625b              do
0059625b              {
00596233                  uint32_t* j_1 = *(uint32_t*)(*(uint32_t*)((char*)arg2 + 8) + (i << 2));
00596233                  
00596238                  if (j_1 != 0)
00596238                  {
00596253                      uint32_t* j;
00596253                      
00596253                      do
00596253                      {
00596240                          j = j_1[4];
0059624a                          PackableHashTable<unsigned long,double>::add(result, j_1, &j_1[2]);
00596251                          j_1 = j;
00596253                      } while (j != 0);
00596238                  }
00596238                  
00596258                  i += 1;
0059625b              } while (i < *(uint32_t*)((char*)arg2 + 0xc));
0059622a          }
005961fa      }
005961fa      
00596263      return result;
005961f0  }

00596266                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00596270  class PackableHashTable<unsigned long,CContractTracker>* __thiscall PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::operator=(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* arg1, void* arg2)

00596270  {
00596276      class PackableHashTable<unsigned long,CContractTracker>* result = arg1;
00596276      
0059627a      if (result != arg2)
0059627a      {
0059627d          PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::EmptyContents(arg1);
00596282          void* _buckets = result->_buckets;
00596285          int32_t i = 0;
00596285          
00596289          if (_buckets != 0)
00596289          {
0059628c              operator delete[](_buckets);
00596294              result->_buckets = nullptr;
00596289          }
00596289          
00596297          result->_table_size = 0;
0059629f          result->_table_size = *(uint32_t*)((char*)arg2 + 0xc);
005962a2          PackableHashTable<unsigned long,CContractTracker>::Init(result);
005962a2          
005962aa          if (*(uint32_t*)((char*)arg2 + 0xc) > 0)
005962aa          {
005962db              do
005962db              {
005962b3                  uint32_t* j_1 = *(uint32_t*)(*(uint32_t*)((char*)arg2 + 8) + (i << 2));
005962b3                  
005962b8                  if (j_1 != 0)
005962b8                  {
005962d3                      uint32_t* j;
005962d3                      
005962d3                      do
005962d3                      {
005962c0                          j = j_1[2];
005962ca                          PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::add(result, j_1, &j_1[1]);
005962d1                          j_1 = j;
005962d3                      } while (j != 0);
005962b8                  }
005962b8                  
005962d8                  i += 1;
005962db              } while (i < *(uint32_t*)((char*)arg2 + 0xc));
005962aa          }
0059627a      }
0059627a      
005962e3      return result;
00596270  }

005962e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005962f0  uint32_t __thiscall PackableList<Emote>::InsertTail(class PackableList<Emote>* this, class Emote const* arg2)

005962f0  {
005962fe      void* edi = operator new(0x130);
005962fe      
00596305      if (edi == 0)
00596329          edi = nullptr;
00596305      else
00596305      {
0059630e          Emote::Emote(edi, arg2);
00596313          *(uint32_t*)((char*)edi + 0x128) = 0;
0059631d          *(uint32_t*)((char*)edi + 0x12c) = 0;
00596305      }
00596305      
00596330      if (this->head == 0)
00596330      {
00596332          uint32_t curNum = this->curNum;
00596335          this->head = edi;
00596338          this->tail = edi;
0059633d          this->curNum = (curNum + 1);
00596341          return (curNum + 1);
00596330      }
00596330      
00596344      class PackableLLNode<Emote>* tail = this->tail;
00596347      tail->next = edi;
0059634d      *(uint32_t*)((char*)edi + 0x12c) = tail;
00596353      uint32_t curNum_1 = this->curNum;
00596356      this->tail = edi;
0059635b      this->curNum = (curNum_1 + 1);
0059635f      return (curNum_1 + 1);
005962f0  }

00596362        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00596370  uint32_t __thiscall PackableList<Emote>::Pack(class PackableList<Emote>* this, void** arg2, uint32_t arg3)

00596370  {
00596375      uint32_t result = PackableList<Emote>::pack_size(this);
00596375      
00596382      if (arg3 >= result)
00596382      {
0059638c          if (arg3 >= 4)
0059638c          {
00596393              **(uint32_t**)arg2 = this->curNum;
00596395              *(uint32_t*)arg2 += 4;
0059638c          }
0059638c          
0059639d          for (class PackableLLNode<Emote>* i = this->head; i != 0; i = i->next)
005963a0              i->data.vtable->Pack(arg2, arg3);
00596382      }
00596382      
005963b9      return result;
00596370  }

005963bc                                                                                      90 90 90 90                              ....

005963c0  uint32_t __fastcall PackableList<Emote>::pack_size(class PackableList<Emote>* this)

005963c0  {
005963c0      class PackableList<Emote>* this_1 = this;
005963c2      class PackableLLNode<Emote>* i = this->head;
005963c8      int32_t result = 4;
005963cd      this_1 = nullptr;
005963cd      
005963d5      while (i != 0)
005963d5      {
005963e2          int32_t eax_2 = i->data.vtable->Pack(&this_1, 0);
005963e5          i = i->next;
005963eb          result += eax_2;
005963d5      }
005963d5      
005963f6      return result;
005963c0  }

005963f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00596400  uint32_t __fastcall EmoteSet::pack_size(class EmoteSet* this)

00596400  {
00596400      class EmoteSet* this_1 = this;
00596408      void* eax_1 = (this->category - 1);
0059640c      this_1 = nullptr;
00596414      int32_t esi = 8;
00596414      
00596422      switch (eax_1)
00596422      {
0059643f          case nullptr:
0059643f          case 1:
0059643f          case 5:
0059643f          {
0059643f              esi = 0xc;
0059643f              break;
0059643f          }
00596446          case 4:
00596446          case 0xe:
00596446          {
00596446              esi = 0x10;
00596446              break;
00596446          }
0059643a          case 0xb:
0059643a          case 0xc:
0059643a          case 0x15:
0059643a          case 0x16:
0059643a          case 0x1a:
0059643a          case 0x1b:
0059643a          case 0x1c:
0059643a          case 0x1d:
0059643a          case 0x1e:
0059643a          case 0x1f:
0059643a          case 0x20:
0059643a          case 0x21:
0059643a          case 0x22:
0059643a          case 0x23:
0059643a          case 0x24:
0059643a          case 0x25:
0059643a          {
0059643a              esi = (AC1Legacy::PStringBase<char>::Pack(&this->quest, &this_1, 0) + 8);
0059643a              break;
0059643a          }
00596422      }
00596422      
00596460      return (this->emotes.vtable->Pack(&this_1, 0) + esi);
00596400  }

00596461     8d 49 00                                                                                       .I.
00596464  uint32_t jump_table_596464[0x4] = 
00596464  {
00596464      [0x0] =  0x0059643f
00596468      [0x1] =  0x00596446
0059646c      [0x2] =  0x00596429
00596470      [0x3] =  0x0059644b
00596474  }
00596474  uint8_t lookup_table_596474[0x26] = 
00596474  {
00596474      [0x00] =  0x00
00596475      [0x01] =  0x00
00596476      [0x02] =  0x03
00596477      [0x03] =  0x03
00596478      [0x04] =  0x01
00596479      [0x05] =  0x00
0059647a      [0x06] =  0x03
0059647b      [0x07] =  0x03
0059647c      [0x08] =  0x03
0059647d      [0x09] =  0x03
0059647e      [0x0a] =  0x03
0059647f      [0x0b] =  0x02
00596480      [0x0c] =  0x02
00596481      [0x0d] =  0x03
00596482      [0x0e] =  0x01
00596483      [0x0f] =  0x03
00596484      [0x10] =  0x03
00596485      [0x11] =  0x03
00596486      [0x12] =  0x03
00596487      [0x13] =  0x03
00596488      [0x14] =  0x03
00596489      [0x15] =  0x02
0059648a      [0x16] =  0x02
0059648b      [0x17] =  0x03
0059648c      [0x18] =  0x03
0059648d      [0x19] =  0x03
0059648e      [0x1a] =  0x02
0059648f      [0x1b] =  0x02
00596490      [0x1c] =  0x02
00596491      [0x1d] =  0x02
00596492      [0x1e] =  0x02
00596493      [0x1f] =  0x02
00596494      [0x20] =  0x02
00596495      [0x21] =  0x02
00596496      [0x22] =  0x02
00596497      [0x23] =  0x02
00596498      [0x24] =  0x02
00596499      [0x25] =  0x02
0059649a  }

0059649a                                                                                90 90 90 90 90 90                            ......

005964a0  uint32_t __thiscall EmoteSet::Pack(class EmoteSet* this, void** arg2, uint32_t arg3)

005964a0  {
005964a5      uint32_t result = EmoteSet::pack_size(this);
005964a5      
005964b2      if (arg3 >= result)
005964b2      {
005964c2          **(uint32_t**)arg2 = this->category;
005964c6          void* ecx_2 = (*(uint32_t*)arg2 + 4);
005964c9          *(uint32_t*)arg2 = ecx_2;
005964d0          *(uint32_t*)ecx_2 = ((float)((long double)this->probability));
005964d4          void* eax_3 = (*(uint32_t*)arg2 + 4);
005964d7          *(uint32_t*)arg2 = eax_3;
005964d7          
005964e9          switch ((this->category - 1))
005964e9          {
005964f3              case nullptr:
005964f3              case 5:
005964f3              {
005964f3                  *(uint32_t*)eax_3 = this->classID.id;
00596544                  *(uint32_t*)arg2 += 4;
005964f3                  break;
005964f3              }
0059652d              case 1:
0059652d              {
0059652d                  *(uint32_t*)eax_3 = this->vendorType;
00596544                  *(uint32_t*)arg2 += 4;
0059652d                  break;
0059652d              }
005964fa              case 4:
005964fa              {
005964fa                  *(uint32_t*)eax_3 = this->style;
005964fe                  void* ecx_7 = (*(uint32_t*)arg2 + 4);
00596501                  *(uint32_t*)arg2 = ecx_7;
00596508                  *(uint32_t*)ecx_7 = this->substyle;
00596544                  *(uint32_t*)arg2 += 4;
005964fa                  break;
005964fa              }
00596511              case 0xb:
00596511              case 0xc:
00596511              case 0x15:
00596511              case 0x16:
00596511              case 0x1a:
00596511              case 0x1b:
00596511              case 0x1c:
00596511              case 0x1d:
00596511              case 0x1e:
00596511              case 0x1f:
00596511              case 0x20:
00596511              case 0x21:
00596511              case 0x22:
00596511              case 0x23:
00596511              case 0x24:
00596511              case 0x25:
00596511              {
00596511                  AC1Legacy::PStringBase<char>::Pack(&this->quest, arg2, arg3);
00596516                  this->emotes.vtable->Pack(arg2, arg3);
00596527                  return result;
00596511                  break;
00596511              }
00596534              case 0xe:
00596534              {
00596534                  *(uint32_t*)eax_3 = ((float)((long double)this->minhealth));
00596538                  void* ecx_12 = (*(uint32_t*)arg2 + 4);
0059653b                  *(uint32_t*)arg2 = ecx_12;
00596542                  *(uint32_t*)ecx_12 = ((float)((long double)this->maxhealth));
00596544                  *(uint32_t*)arg2 += 4;
00596534                  break;
00596534              }
005964e9          }
005964e9          
00596547          this->emotes.vtable->Pack(arg2, arg3);
005964b2      }
005964b2      
00596558      return result;
005964a0  }

0059655b                                                                                   90                                         .
0059655c  uint32_t jump_table_59655c[0x6] = 
0059655c  {
0059655c      [0x0] =  0x005964f0
00596560      [0x1] =  0x0059652a
00596564      [0x2] =  0x005964f7
00596568      [0x3] =  0x0059650c
0059656c      [0x4] =  0x00596531
00596570      [0x5] =  0x00596547
00596574  }
00596574  uint8_t lookup_table_596574[0x26] = 
00596574  {
00596574      [0x00] =  0x00
00596575      [0x01] =  0x01
00596576      [0x02] =  0x05
00596577      [0x03] =  0x05
00596578      [0x04] =  0x02
00596579      [0x05] =  0x00
0059657a      [0x06] =  0x05
0059657b      [0x07] =  0x05
0059657c      [0x08] =  0x05
0059657d      [0x09] =  0x05
0059657e      [0x0a] =  0x05
0059657f      [0x0b] =  0x03
00596580      [0x0c] =  0x03
00596581      [0x0d] =  0x05
00596582      [0x0e] =  0x04
00596583      [0x0f] =  0x05
00596584      [0x10] =  0x05
00596585      [0x11] =  0x05
00596586      [0x12] =  0x05
00596587      [0x13] =  0x05
00596588      [0x14] =  0x05
00596589      [0x15] =  0x03
0059658a      [0x16] =  0x03
0059658b      [0x17] =  0x05
0059658c      [0x18] =  0x05
0059658d      [0x19] =  0x05
0059658e      [0x1a] =  0x03
0059658f      [0x1b] =  0x03
00596590      [0x1c] =  0x03
00596591      [0x1d] =  0x03
00596592      [0x1e] =  0x03
00596593      [0x1f] =  0x03
00596594      [0x20] =  0x03
00596595      [0x21] =  0x03
00596596      [0x22] =  0x03
00596597      [0x23] =  0x03
00596598      [0x24] =  0x03
00596599      [0x25] =  0x03
0059659a  }

0059659a                                                                                90 90 90 90 90 90                            ......

005965a0  void __fastcall PackableList<Emote>::Flush(class PackableList<Emote>* this)

005965a0  {
005965ae      void var_128;
005965ae      Emote::Emote(&var_128);
005965ae      
005965ba      while (this->head != 0)
005965ba      {
005965c0          class PackableLLNode<Emote>* head = this->head;
005965c0          
005965c5          if (head != 0)
005965c5          {
005965c7              class PackableLLNode<Emote>* next = head->next;
005965cf              this->head = next;
005965cf              
005965d2              if (next == 0)
005965dc                  this->tail = nullptr;
005965d2              else
005965d4                  next->prev = nullptr;
005965d4              
005965e4              Emote::operator=(&var_128, head);
005965e4              
005965eb              if (head != 0)
005965eb              {
005965ef                  Emote::~Emote(head);
005965f5                  operator delete(head);
005965eb              }
005965eb              
005965fd              this->curNum -= 1;
005965c5          }
005965ba      }
005965ba      
0059660a      Emote::~Emote(&var_128);
005965a0  }

00596618                                                                          90 90 90 90 90 90 90 90                          ........

00596620  int32_t __thiscall EmoteSet::UnPack(class EmoteSet* this, void** arg2, uint32_t arg3)

00596620  {
0059662b      if (arg3 < 8)
00596631          return 0;
00596631      
0059663d      this->category = **(uint32_t**)arg2;
00596642      void* ecx_2 = (*(uint32_t*)arg2 + 4);
00596645      *(uint32_t*)arg2 = ecx_2;
0059664b      this->probability = *(uint32_t*)ecx_2;
00596650      void* eax_4 = (*(uint32_t*)arg2 + 4);
00596653      *(uint32_t*)arg2 = eax_4;
00596653      
00596665      switch ((this->category - 1))
00596665      {
0059666f          case nullptr:
0059666f          case 5:
0059666f          {
0059666f              if (arg3 < 0xc)
00596676                  return 0;
00596676              
00596679              class IDClass<_tagDataID,32,0> ecx_6 = *(uint32_t*)eax_4;
0059667e              *(uint32_t*)arg2 = ((char*)eax_4 + 4);
00596680              this->classID.id = ecx_6;
0059666f              break;
0059666f          }
005966ae          case 1:
005966ae          {
005966ae              if (arg3 < 0xc)
00596676                  return 0;
00596676              
005966b2              this->vendorType = *(uint32_t*)eax_4;
005966cf              *(uint32_t*)arg2 += 4;
005966ae              break;
005966ae          }
00596688          case 4:
00596688          {
00596688              if (arg3 < 0x10)
00596676                  return 0;
00596676              
0059668c              this->style = *(uint32_t*)eax_4;
00596691              void* ecx_8 = (*(uint32_t*)arg2 + 4);
00596694              *(uint32_t*)arg2 = ecx_8;
0059669a              this->substyle = *(uint32_t*)ecx_8;
005966cf              *(uint32_t*)arg2 += 4;
00596688              break;
00596688          }
005966a4          case 0xb:
005966a4          case 0xc:
005966a4          case 0x15:
005966a4          case 0x16:
005966a4          case 0x1a:
005966a4          case 0x1b:
005966a4          case 0x1c:
005966a4          case 0x1d:
005966a4          case 0x1e:
005966a4          case 0x1f:
005966a4          case 0x20:
005966a4          case 0x21:
005966a4          case 0x22:
005966a4          case 0x23:
005966a4          case 0x24:
005966a4          case 0x25:
005966a4          {
005966a4              AC1Legacy::PStringBase<char>::UnPack(&this->quest, arg2, arg3);
005966a4              break;
005966a4          }
005966ba          case 0xe:
005966ba          {
005966ba              if (arg3 < 0x10)
00596676                  return 0;
00596676              
005966be              this->minhealth = *(uint32_t*)eax_4;
005966c3              void* ecx_12 = (*(uint32_t*)arg2 + 4);
005966c6              *(uint32_t*)arg2 = ecx_12;
005966cc              this->maxhealth = *(uint32_t*)ecx_12;
005966cf              *(uint32_t*)arg2 += 4;
005966ba              break;
005966ba          }
00596665      }
00596665      
005966da      int32_t eax_11 = this->emotes.vtable->UnPack(arg2, arg3);
005966dd      int32_t eax_12 = -(eax_11);
005966e6      return -((eax_12 - eax_12));
00596620  }

005966e9                             8d 49 00                                                                       .I.
005966ec  uint32_t jump_table_5966ec[0x6] = 
005966ec  {
005966ec      [0x0] =  0x0059666c
005966f0      [0x1] =  0x005966ab
005966f4      [0x2] =  0x00596685
005966f8      [0x3] =  0x0059669f
005966fc      [0x4] =  0x005966b7
00596700      [0x5] =  0x005966d2
00596704  }
00596704  uint8_t lookup_table_596704[0x26] = 
00596704  {
00596704      [0x00] =  0x00
00596705      [0x01] =  0x01
00596706      [0x02] =  0x05
00596707      [0x03] =  0x05
00596708      [0x04] =  0x02
00596709      [0x05] =  0x00
0059670a      [0x06] =  0x05
0059670b      [0x07] =  0x05
0059670c      [0x08] =  0x05
0059670d      [0x09] =  0x05
0059670e      [0x0a] =  0x05
0059670f      [0x0b] =  0x03
00596710      [0x0c] =  0x03
00596711      [0x0d] =  0x05
00596712      [0x0e] =  0x04
00596713      [0x0f] =  0x05
00596714      [0x10] =  0x05
00596715      [0x11] =  0x05
00596716      [0x12] =  0x05
00596717      [0x13] =  0x05
00596718      [0x14] =  0x05
00596719      [0x15] =  0x03
0059671a      [0x16] =  0x03
0059671b      [0x17] =  0x05
0059671c      [0x18] =  0x05
0059671d      [0x19] =  0x05
0059671e      [0x1a] =  0x03
0059671f      [0x1b] =  0x03
00596720      [0x1c] =  0x03
00596721      [0x1d] =  0x03
00596722      [0x1e] =  0x03
00596723      [0x1f] =  0x03
00596724      [0x20] =  0x03
00596725      [0x21] =  0x03
00596726      [0x22] =  0x03
00596727      [0x23] =  0x03
00596728      [0x24] =  0x03
00596729      [0x25] =  0x03
0059672a  }

0059672a                                90 90 90 90 90 90                                                            ......

00596730  class PackableList<Emote>* __thiscall PackableList<Emote>::operator=(class PackableList<Emote>* arg1, void* arg2)

00596730  {
00596734      PackableList<Emote>::Flush(arg1);
00596734      
00596742      for (class Emote* i = *(uint32_t*)((char*)arg2 + 4); i != 0; i = *(int32_t*)((char*)i + 0x128))
00596742      {
00596747          PackableList<Emote>::InsertTail(arg1, i);
00596747          
0059674e          if (i == 0)
0059674e              break;
00596742      }
00596742      
0059675e      return arg1;
00596730  }

00596761     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00596770  int32_t __thiscall PackableList<Emote>::UnPack(class PackableList<Emote>* this, void** arg2, uint32_t arg3)

00596770  {
00596779      PackableList<Emote>::Flush(this);
00596779      
00596786      if (arg3 < 4)
005967fd          return 0;
005967fd      
00596790      void* eax = *(uint32_t*)arg2;
00596794      int32_t edi = *(uint32_t*)eax;
0059679d      *(uint32_t*)arg2 = ((char*)eax + 4);
0059679f      int32_t var_128;
0059679f      Emote::Emote(&var_128);
005967a4      int32_t esi = 0;
005967a4      
005967a8      if (edi > 0)
005967a8      {
005967d7          do
005967d7          {
005967c6              if (*(uint32_t*)(var_128 + 0x10)(arg2, arg3) == 0)
005967c6              {
00596804                  Emote::~Emote(&var_128);
00596815                  return 0;
005967c6              }
005967c6              
005967cf              PackableList<Emote>::InsertTail(this, &var_128);
005967d4              esi += 1;
005967d7          } while (esi < edi);
005967a8      }
005967a8      
005967dd      Emote::~Emote(&var_128);
005967f1      return 1;
00596770  }

00596818                                                                          90 90 90 90 90 90 90 90                          ........

00596820  void* __thiscall PackableList<Emote>::`scalar deleting destructor'(class PackableList<Emote>* this, uint32_t arg2)

00596820  {
00596823      this->vtable = &PackableList<class Emote>::`vftable';
00596829      PackableList<Emote>::Flush(this);
00596833      this->vtable = 0x79285c;
00596833      
00596839      if ((arg2 & 1) != 0)
0059683c          operator delete(this);
0059683c      
00596847      return this;
00596820  }

0059684a                                90 90 90 90 90 90                                                            ......

00596850  void __fastcall EmoteSet::EmoteSet(class EmoteSet* this)

00596850  {
00596854      this->vtable = 0x7e47e4;
0059685a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00596865      this->quest.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0059686b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00596873      this->emotes.vtable = &PackableList<class Emote>::`vftable';
0059687a      this->emotes.head = nullptr;
0059687d      this->emotes.tail = nullptr;
00596880      this->emotes.curNum = 0;
00596883      this->category = 0;
00596886      this->probability = 0f;
00596896      this->classID.id = INVALID_DID.id;
00596899      this->style = 0;
0059689c      this->substyle = 0;
0059689f      this->vendorType = 0;
005968a2      AC1Legacy::PStringBase<char>::set(&this->quest.m_buffer, &data_7928af);
005968a7      this->minhealth = 0f;
005968aa      this->maxhealth = 0f;
00596850  }

005968b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005968c0  void __fastcall EmoteSet::~EmoteSet(class EmoteSet* this)

005968c0  {
005968c7      this->vtable = 0x7e47e4;
005968c4      this->emotes.vtable = &PackableList<class Emote>::`vftable';
005968d5      PackableList<Emote>::Flush(&this->emotes);
005968c4      this->emotes.vtable = 0x79285c;
005968e0      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->quest.m_buffer;
005968e0      
005968f3      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005968f5          m_buffer->vtable->__vecDelDtor(1);
005968f5      
005968fe      this->vtable = 0x79285c;
005968c0  }

00596906                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00596910  class EmoteSet& __thiscall EmoteSet::operator=(class EmoteSet* this, class EmoteSet const& arg2)

00596910  {
0059691a      if (this != arg2)
0059691a      {
0059691f          this->category = arg2->category;
00596925          this->probability = arg2->probability;
0059692b          this->classID.id = arg2->classID.id;
00596931          this->style = arg2->style;
00596937          this->substyle = arg2->substyle;
00596945          this->vendorType = arg2->vendorType;
00596948          PackableList<Emote>::operator=(&this->emotes, &arg2->emotes);
0059694d          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->quest.m_buffer;
0059694d          
00596953          if (m_buffer_1 != arg2->quest.m_buffer)
00596953          {
00596965              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00596967                  m_buffer_1->vtable->__vecDelDtor(1);
00596967              
0059696f              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->quest.m_buffer;
00596972              this->quest.m_buffer = m_buffer;
00596979              InterlockedIncrement(&m_buffer->m_cRef);
00596953          }
00596953          
00596982          this->minhealth = arg2->minhealth;
00596988          this->maxhealth = arg2->maxhealth;
0059691a      }
0059691a      
00596990      return this;
00596910  }

00596993                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005969a0  void* __thiscall EmoteSet::`scalar deleting destructor'(class EmoteSet* this, uint32_t arg2)

005969a0  {
005969a7      this->vtable = 0x7e47e4;
005969a4      this->emotes.vtable = &PackableList<class Emote>::`vftable';
005969b5      PackableList<Emote>::Flush(&this->emotes);
005969a4      this->emotes.vtable = 0x79285c;
005969c0      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->quest.m_buffer;
005969c0      
005969d3      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005969d5          m_buffer->vtable->__vecDelDtor(1);
005969d5      
005969e2      this->vtable = 0x79285c;
005969e2      
005969e8      if ((arg2 & 1) != 0)
005969eb          operator delete(this);
005969eb      
005969f7      return this;
005969a0  }

005969fa                                                                                90 90 90 90 90 90                            ......

00596a00  void __thiscall EmoteSet::EmoteSet(class EmoteSet* this, class EmoteSet const* arg2)

00596a00  {
00596a03      this->vtable = 0x7e47e4;
00596a09      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00596a14      this->quest.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00596a17      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00596a26      this->emotes.vtable = &PackableList<class Emote>::`vftable';
00596a2d      this->emotes.head = nullptr;
00596a30      this->emotes.tail = nullptr;
00596a33      this->emotes.curNum = 0;
00596a36      EmoteSet::operator=(this, arg2);
00596a00  }

00596a41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00596a50  uint32_t __fastcall CSpellBase::InqSkillForSpell(class CSpellBase const* this)

00596a50  {
00596a53      int32_t eax = (this->_school - 1);
00596a53      
00596a59      if (eax > 4)
00596a82          return 0;
00596a82      
00596a5b      switch (eax)
00596a5b      {
00596a6d          case 0:
00596a6d          {
00596a6d              return 0x22;
00596a6d              break;
00596a6d          }
00596a73          case 1:
00596a73          {
00596a73              return 0x21;
00596a73              break;
00596a73          }
00596a79          case 2:
00596a79          {
00596a79              return 0x20;
00596a79              break;
00596a79          }
00596a7f          case 3:
00596a7f          {
00596a7f              return 0x1f;
00596a7f              break;
00596a7f          }
00596a67          case 4:
00596a67          {
00596a67              return 0x2b;
00596a67              break;
00596a67          }
00596a5b      }
00596a50  }

00596a83           90                                                                                         .
00596a84  uint32_t jump_table_596a84[0x5] = 
00596a84  {
00596a84      [0x0] =  0x00596a68
00596a88      [0x1] =  0x00596a6e
00596a8c      [0x2] =  0x00596a74
00596a90      [0x3] =  0x00596a7a
00596a94      [0x4] =  0x00596a62
00596a98  }

00596a98                                                                          90 90 90 90 90 90 90 90                          ........

00596aa0  int32_t __fastcall CSpellBase::InqDuration(class CSpellBase const* this)

00596aa0  {
00596aa9      int32_t result = WaveformPropertyValue::HasValidData(&this->_meta_spell);
00596aa9      
00596ab0      if (result == 0)
00596ac1          return result;
00596ac1      
00596ab5      /* tailcall */
00596ab5      return MetaSpell::InqDuration(&this->_meta_spell);
00596aa0  }

00596ac2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00596ad0  class CSpellBase& __thiscall CSpellBase::operator=(class CSpellBase* this, class CSpellBase const& arg2)

00596ad0  {
00596ae3      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->_name.m_buffer;
00596ae3      
00596ae8      if (m_buffer_2 != arg2->_name.m_buffer)
00596ae8      {
00596afa          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
00596afc              m_buffer_2->vtable->__vecDelDtor(1);
00596afc          
00596b04          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
00596b07          this->_name.m_buffer = m_buffer;
00596b0e          InterlockedIncrement(&m_buffer->m_cRef);
00596ae8      }
00596ae8      
00596b10      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->_desc.m_buffer;
00596b10      
00596b16      if (m_buffer_3 != arg2->_desc.m_buffer)
00596b16      {
00596b28          if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
00596b2a              m_buffer_3->vtable->__vecDelDtor(1);
00596b2a          
00596b32          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->_desc.m_buffer;
00596b35          this->_desc.m_buffer = m_buffer_1;
00596b3c          InterlockedIncrement(&m_buffer_1->m_cRef);
00596b16      }
00596b16      
00596b41      this->_school = arg2->_school;
00596b47      this->_iconID.id = arg2->_iconID.id;
00596b4d      this->_category = arg2->_category;
00596b53      this->_bitfield = arg2->_bitfield;
00596b59      this->_base_mana = arg2->_base_mana;
00596b5f      this->_base_range_constant = ((float)((long double)arg2->_base_range_constant));
00596b6b      this->_base_range_mod = ((float)((long double)arg2->_base_range_mod));
00596b71      this->_power = arg2->_power;
00596b77      this->_spell_economy_mod = ((float)((long double)arg2->_spell_economy_mod));
00596b7d      this->_formula_version = arg2->_formula_version;
00596b83      this->_component_loss = ((float)((long double)arg2->_component_loss));
00596b89      this->_formula._comps[0] = arg2->_formula._comps[0];
00596b8f      this->_formula._comps[1] = arg2->_formula._comps[1];
00596b95      this->_formula._comps[2] = arg2->_formula._comps[2];
00596b9b      this->_formula._comps[3] = arg2->_formula._comps[3];
00596ba1      this->_formula._comps[4] = arg2->_formula._comps[4];
00596ba7      this->_formula._comps[5] = arg2->_formula._comps[5];
00596bad      this->_formula._comps[6] = arg2->_formula._comps[6];
00596bb3      this->_formula._comps[7] = arg2->_formula._comps[7];
00596bb9      this->_caster_effect = arg2->_caster_effect;
00596bbf      this->_target_effect = arg2->_target_effect;
00596bc5      this->_fizzle_effect = arg2->_fizzle_effect;
00596bcb      this->_recovery_interval = ((double)((long double)arg2->_recovery_interval));
00596bd2      this->_recovery_amount = ((float)((long double)arg2->_recovery_amount));
00596bd8      this->_display_order = arg2->_display_order;
00596bde      this->_non_component_target_type = arg2->_non_component_target_type;
00596bed      this->_mana_mod = arg2->_mana_mod;
00596bf0      MetaSpell::operator=(&this->_meta_spell, &arg2->_meta_spell);
00596bfb      return this;
00596ad0  }

00596bfe                                                                                            90 90                                ..

00596c00  uint32_t __fastcall CSpellBase::packed_size(class CSpellBase* this)

00596c00  {
00596c00      class CSpellBase* this_1 = this;
00596c11      this_1 = nullptr;
00596c22      uint32_t eax = AC1Legacy::PStringBase<char>::Pack(&this->_desc, &this_1, 0);
00596c33      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(&this->_name, &this_1, 0);
00596c45      int32_t eax_2 = this->_formula.vtable->Pack(&this_1, 0);
00596c61      return ((this->_meta_spell.vtable->Pack(&this_1, 0) + ((eax + eax_1) + eax_2)) + 0x50);
00596c00  }

00596c62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00596c70  uint32_t __thiscall CSpellBase::Pack(class CSpellBase* this, void** arg2, uint32_t arg3)

00596c70  {
00596c75      uint32_t result = CSpellBase::packed_size(this);
00596c75      
00596c82      if (arg3 >= result)
00596c82      {
00596c92          AC1Legacy::PStringBase<char>::Pack(&this->_name, arg2, arg3);
00596c9c          AC1Legacy::PStringBase<char>::Pack(&this->_desc, arg2, arg3);
00596ca6          **(uint32_t**)arg2 = this->_school;
00596caa          void* edx_2 = (*(uint32_t*)arg2 + 4);
00596cad          *(uint32_t*)arg2 = edx_2;
00596cb4          *(uint32_t*)edx_2 = this->_iconID.id;
00596cb8          void* ecx_4 = (*(uint32_t*)arg2 + 4);
00596cbb          *(uint32_t*)arg2 = ecx_4;
00596cc2          *(uint32_t*)ecx_4 = this->_category;
00596cc6          void* eax_4 = (*(uint32_t*)arg2 + 4);
00596cc9          *(uint32_t*)arg2 = eax_4;
00596cce          *(uint32_t*)eax_4 = this->_bitfield;
00596cd2          void* edx_6 = (*(uint32_t*)arg2 + 4);
00596cd5          *(uint32_t*)arg2 = edx_6;
00596cdc          *(uint32_t*)edx_6 = this->_base_mana;
00596ce0          void* ecx_8 = (*(uint32_t*)arg2 + 4);
00596ce3          *(uint32_t*)arg2 = ecx_8;
00596cea          *(uint32_t*)ecx_8 = ((float)((long double)this->_base_range_constant));
00596cee          void* eax_8 = (*(uint32_t*)arg2 + 4);
00596cf1          *(uint32_t*)arg2 = eax_8;
00596cf6          *(uint32_t*)eax_8 = ((float)((long double)this->_base_range_mod));
00596cfa          void* edx_8 = (*(uint32_t*)arg2 + 4);
00596cfd          *(uint32_t*)arg2 = edx_8;
00596d04          *(uint32_t*)edx_8 = this->_power;
00596d08          void* ecx_10 = (*(uint32_t*)arg2 + 4);
00596d0b          *(uint32_t*)arg2 = ecx_10;
00596d12          *(uint32_t*)ecx_10 = ((float)((long double)this->_spell_economy_mod));
00596d16          void* eax_12 = (*(uint32_t*)arg2 + 4);
00596d19          *(uint32_t*)arg2 = eax_12;
00596d1e          *(uint32_t*)eax_12 = this->_formula_version;
00596d22          void* edx_11 = (*(uint32_t*)arg2 + 4);
00596d25          *(uint32_t*)arg2 = edx_11;
00596d2c          *(uint32_t*)edx_11 = ((float)((long double)this->_component_loss));
00596d2e          *(uint32_t*)arg2 += 4;
00596d31          this->_meta_spell.vtable->Pack(arg2, arg3);
00596d42          this->_formula.vtable->Pack(arg2, arg3);
00596d52          **(uint32_t**)arg2 = this->_caster_effect;
00596d56          void* ebx_2 = (*(uint32_t*)arg2 + 4);
00596d59          *(uint32_t*)arg2 = ebx_2;
00596d60          *(uint32_t*)ebx_2 = this->_target_effect;
00596d64          void* edx_15 = (*(uint32_t*)arg2 + 4);
00596d67          *(uint32_t*)arg2 = edx_15;
00596d6e          *(uint32_t*)edx_15 = this->_fizzle_effect;
00596d72          void* ecx_17 = (*(uint32_t*)arg2 + 4);
00596d75          *(uint32_t*)arg2 = ecx_17;
00596d7c          *(uint64_t*)ecx_17 = ((double)((long double)this->_recovery_interval));
00596d80          void* eax_19 = (*(uint32_t*)arg2 + 8);
00596d83          *(uint32_t*)arg2 = eax_19;
00596d88          *(uint32_t*)eax_19 = ((float)((long double)this->_recovery_amount));
00596d8c          void* ebx_4 = (*(uint32_t*)arg2 + 4);
00596d8f          *(uint32_t*)arg2 = ebx_4;
00596d96          *(uint32_t*)ebx_4 = this->_display_order;
00596d9a          void* edx_18 = (*(uint32_t*)arg2 + 4);
00596d9d          *(uint32_t*)arg2 = edx_18;
00596da7          *(uint32_t*)edx_18 = this->_non_component_target_type;
00596dab          void* ecx_20 = (*(uint32_t*)arg2 + 4);
00596dae          *(uint32_t*)arg2 = ecx_20;
00596db5          *(uint32_t*)ecx_20 = this->_mana_mod;
00596db7          *(uint32_t*)arg2 += 4;
00596c82      }
00596c82      
00596dc0      return result;
00596c70  }

00596dc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00596dd0  void __thiscall CSpellBase::CSpellBase(class CSpellBase* this, class CSpellBase const* arg2)

00596dd0  {
00596dd3      this->vtable = 0x7a3e94;
00596dd9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00596deb      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00596dee      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00596df0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00596dfc      this->_desc.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00596dff      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
00596e03      this->_formula.vtable = 0x7a3a8c;
00596e12      __builtin_memset(&this->_formula._comps, 0, 0x20);
00596e1a      MetaSpell::MetaSpell(&this->_meta_spell);
00596e26      CSpellBase::operator=(this, arg2);
00596dd0  }

00596e32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00596e40  class AC1Legacy::PStringBase<char>* __thiscall CSpellBase::InqDescription(class CSpellBase const* this, class AC1Legacy::PStringBase<char>* __return)

00596e40  {
00596e40      class CSpellBase* var_4 = this;
00596e41      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_desc.m_buffer;
00596e4d      var_4 = m_buffer;
00596e56      InterlockedIncrement(&m_buffer->m_cRef);
00596e5c      AC1Legacy::PStringBase<char>::break_reference(&var_4);
00596e61      class CSpellBase* esi = var_4;
00596e61      
00596e71      for (uint32_t* i = &esi->_category; i != ((esi->_desc.m_buffer + esi) + 0x13); i += 1)
00596e71      {
00596e73          class AC1Legacy::PSRefBuffer<char>* ecx_2;
00596e73          ecx_2 = ADJ(i)->_category;
00596e77          uint8_t edx_1 = (ecx_2 >> 4);
00596e7a          ecx_2 <<= 4;
00596e9d          ADJ(i)->_category = (edx_1 | ecx_2);
00596e71      }
00596e71      
00596e8e      __return->m_buffer = esi;
00596e90      InterlockedIncrement(&esi->_name);
00596e90      
00596e9b      if (InterlockedDecrement(&esi->_name) == 0)
00596e9d          esi->vtable->__vecDelDtor(1);
00596e9d      
00596eac      return __return;
00596e40  }

00596eaf                                               90                                                                 .

00596eb0  class SpellFormula* __thiscall CSpellBase::InqSpellFormula(class CSpellBase const* this, class SpellFormula* __return)

00596eb0  {
00596eb3      int32_t ebx;
00596eb3      int32_t var_34 = ebx;
00596eb6      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
00596eb9      int32_t esi;
00596eb9      int32_t var_38 = esi;
00596ec0      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = m_buffer;
00596ec4      int32_t edi;
00596ec4      int32_t var_3c = edi;
00596ec8      uint32_t* var_40 = &m_buffer->m_cRef;
00596ec9      InterlockedIncrement(var_40);
00596ecb      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_desc.m_buffer;
00596ece      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = m_buffer_1;
00596ed5      var_40 = &m_buffer_1->m_cRef;
00596ed6      InterlockedIncrement(var_40);
00596edc      AC1Legacy::PStringBase<char>::break_reference(&m_buffer_2);
00596ee1      class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = m_buffer_2;
00596ee8      char (* i)[0x1] = &m_buffer_5->m_data;
00596ee8      
00596ef1      for (void* esi_1 = ((m_buffer_5->m_len + m_buffer_5) + 0x13); i != esi_1; i = &i[1])
00596ef1      {
00596ef3          uint32_t ecx_1;
00596ef3          ecx_1 = ADJ(i)->m_data;
00596ef7          char edx_1[0x1] = (ecx_1 >> 4);
00596efa          ecx_1 <<= 4;
00596fe3          ADJ(i)->m_data = (edx_1 | ecx_1);
00596ef1      }
00596ef1      
00596f06      uint32_t* ebp;
00596f06      var_40 = ebp;
00596f0b      AC1Legacy::PStringBase<char>::break_reference(&m_buffer_3);
00596f10      class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = m_buffer_3;
00596f17      char (* i_1)[0x1] = &m_buffer_4->m_data;
00596f17      
00596f20      for (void* esi_2 = ((m_buffer_4->m_len + m_buffer_4) + 0x13); i_1 != esi_2; i_1 = &i_1[1])
00596f20      {
00596f22          uint32_t eax_2;
00596f22          eax_2 = ADJ(i_1)->m_data;
00596f26          char edx_2[0x1] = (eax_2 >> 4);
00596f29          eax_2 <<= 4;
00596fe3          ADJ(i_1)->m_data = (edx_2 | eax_2);
00596f20      }
00596f20      
00596f35      uint32_t m_hash = m_buffer_5->m_hash;
00596f35      
00596f3b      if (m_hash == 0xffffffff)
00596f3b      {
00596f41          m_hash = AC1Legacy::PStringBase<char>::compute_hash(&m_buffer_2);
00596f46          m_buffer_5->m_hash = m_hash;
00596f3b      }
00596f3b      
00596f4d      uint32_t m_hash_1 = m_buffer_4->m_hash;
00596f4d      
00596f53      if (m_hash_1 == 0xffffffff)
00596f53      {
00596f59          m_hash_1 = AC1Legacy::PStringBase<char>::compute_hash(&m_buffer_3);
00596f5e          m_buffer_4->m_hash = m_hash_1;
00596f53      }
00596f53      
00596f61      int32_t var_24 = 0x7a3a8c;
00596f75      void var_20;
00596f75      __builtin_memcpy(&var_20, &this->_formula._comps, 0x20);
00596f96      SpellFormula::Decrypt(&var_24, ((COMBINE(0, m_hash_1) % 0xbeadcf45) + (COMBINE(0, m_hash) % 0x12107680)));
00596fab      __builtin_memcpy(&__return->_comps, &var_20, 0x20);
00596fb7      __return->vtable = 0x7a3a8c;
00596fbd      var_24 = 0x79285c;
00596fbd      
00596fc9      if (InterlockedDecrement(&m_buffer_4->m_cRef) == 0)
00596fc9      {
00596fcb          struct AC1Legacy::PSRefBuffer<char>::VTable* vtable = m_buffer_4->vtable;
00596fce          var_40 = 1;
00596fd2          vtable->__vecDelDtor(var_40);
00596fc9      }
00596fc9      
00596fd4      class AC1Legacy::PSRefBuffer<char>* m_buffer_6 = m_buffer_3;
00596fdb      var_40 = &m_buffer_6->m_cRef;
00596fdb      
00596fe1      if (InterlockedDecrement(var_40) == 0)
00596fe3          m_buffer_6->vtable->__vecDelDtor(1);
00596fe3      
00596ff3      return __return;
00596eb0  }

00596ff6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00597000  class SpellFormula* __thiscall CSpellBase::InqCustomizedSpellFormula(class CSpellBase const* this, class SpellFormula* __return, class AC1Legacy::PStringBase<char> const* arg3)

00597000  {
0059700c      void __return_1;
0059700c      CSpellBase::InqSpellFormula(this, &__return_1);
0059701e      SpellFormula::RandomizeForName(&__return_1, arg3, this->_formula_version);
00597033      void var_20;
00597033      __builtin_memcpy(&__return->_comps, &var_20, 0x20);
00597036      __return->vtable = 0x7a3a8c;
00597040      return __return;
00597000  }

00597043           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00597050  class SpellFormula* __thiscall CSpellBase::InqScarabOnlyFormula(class CSpellBase const* this, class SpellFormula* __return)

00597050  {
0059705a      void __return_1;
0059705a      CSpellBase::InqSpellFormula(this, &__return_1);
0059706a      int32_t var_48 = 0x7a3a8c;
00597072      void s;
00597072      __builtin_memset(&s, 0, 0x20);
00597074      int32_t edi = 0;
00597076      int32_t i = 0;
00597076      
0059707a      while (i >= 0)
0059707a      {
0059707f          if (i >= 8)
0059707f              break;
0059707f          
00597081          void var_20;
00597081          uint32_t eax_1 = *(uint32_t*)(&var_20 + (i << 2));
00597081          
00597087          if (eax_1 == 0)
00597087              break;
00597087          
00597092          if ((eax_1 - 1) <= 0xc0)
00597092              switch (eax_1)
00597092              {
005970a8                  case 1:
005970a8                  case 2:
005970a8                  case 3:
005970a8                  case 4:
005970a8                  case 5:
005970a8                  case 6:
005970a8                  case 0x6e:
005970a8                  case 0x6f:
005970a8                  case 0x70:
005970a8                  case 0xc0:
005970a8                  case 0xc1:
005970a8                  {
005970a8                      SpellFormula::SetComponent(&var_48, edi, eax_1);
005970ad                      edi += 1;
005970a8                      break;
005970a8                  }
00597092              }
00597092          
005970ae          i += 1;
005970ae          
005970b2          if (i >= 8)
005970b2              break;
0059707a      }
0059707a      
005970b8      int32_t var_4c;
005970b8      int32_t* var_58_2 = &var_4c;
005970bd      var_4c = 0;
005970c5      SpellFormula::FindMostPowerfulPowerComponent(&var_48, var_58_2);
005970d2      int32_t i_3;
005970d2      
005970d2      if ((var_4c - 1) > 9)
005970fe          i_3 = 0;
005970d2      else
005970db          switch (var_4c)
005970db          {
005970e2              case 1:
005970e2              {
005970e2                  i_3 = 1;
005970e2                  break;
005970e2              }
005970e9              case 2:
005970e9              {
005970e9                  i_3 = 2;
005970e9                  break;
005970e9              }
005970f0              case 3:
005970f0              case 4:
005970f0              case 7:
005970f0              {
005970f0                  i_3 = 3;
005970f0                  break;
005970f0              }
005970f7              case 5:
005970f7              case 6:
005970f7              case 8:
005970f7              case 9:
005970f7              case 0xa:
005970f7              {
005970f7                  i_3 = 4;
005970f7                  break;
005970f7              }
005970db          }
005970db      
00597102      if (i_3 > 0)
00597102      {
00597104          int32_t i_2 = i_3;
00597117          int32_t i_1;
00597117          
00597117          do
00597117          {
00597110              SpellFormula::SetComponent(&var_48, edi, 0xbc);
00597115              edi += 1;
00597116              i_1 = i_2;
00597116              i_2 -= 1;
00597117          } while (i_1 != 1);
00597102      }
00597102      
00597129      __builtin_memcpy(&__return->_comps, &s, 0x20);
0059712c      __return->vtable = 0x7a3a8c;
00597136      return __return;
00597050  }

00597139                                                                             8d 49 00                                       .I.
0059713c  uint32_t jump_table_59713c[0x2] = 
0059713c  {
0059713c      [0x0] =  0x005970a2
00597140      [0x1] =  0x005970ae
00597144  }
00597144  uint8_t lookup_table_597144[0xc1] = 
00597144  {
00597144      [0x00] =  0x00
00597145      [0x01] =  0x00
00597146      [0x02] =  0x00
00597147      [0x03] =  0x00
00597148      [0x04] =  0x00
00597149      [0x05] =  0x00
0059714a      [0x06] =  0x01
0059714b      [0x07] =  0x01
0059714c      [0x08] =  0x01
0059714d      [0x09] =  0x01
0059714e      [0x0a] =  0x01
0059714f      [0x0b] =  0x01
00597150      [0x0c] =  0x01
00597151      [0x0d] =  0x01
00597152      [0x0e] =  0x01
00597153      [0x0f] =  0x01
00597154      [0x10] =  0x01
00597155      [0x11] =  0x01
00597156      [0x12] =  0x01
00597157      [0x13] =  0x01
00597158      [0x14] =  0x01
00597159      [0x15] =  0x01
0059715a      [0x16] =  0x01
0059715b      [0x17] =  0x01
0059715c      [0x18] =  0x01
0059715d      [0x19] =  0x01
0059715e      [0x1a] =  0x01
0059715f      [0x1b] =  0x01
00597160      [0x1c] =  0x01
00597161      [0x1d] =  0x01
00597162      [0x1e] =  0x01
00597163      [0x1f] =  0x01
00597164      [0x20] =  0x01
00597165      [0x21] =  0x01
00597166      [0x22] =  0x01
00597167      [0x23] =  0x01
00597168      [0x24] =  0x01
00597169      [0x25] =  0x01
0059716a      [0x26] =  0x01
0059716b      [0x27] =  0x01
0059716c      [0x28] =  0x01
0059716d      [0x29] =  0x01
0059716e      [0x2a] =  0x01
0059716f      [0x2b] =  0x01
00597170      [0x2c] =  0x01
00597171      [0x2d] =  0x01
00597172      [0x2e] =  0x01
00597173      [0x2f] =  0x01
00597174      [0x30] =  0x01
00597175      [0x31] =  0x01
00597176      [0x32] =  0x01
00597177      [0x33] =  0x01
00597178      [0x34] =  0x01
00597179      [0x35] =  0x01
0059717a      [0x36] =  0x01
0059717b      [0x37] =  0x01
0059717c      [0x38] =  0x01
0059717d      [0x39] =  0x01
0059717e      [0x3a] =  0x01
0059717f      [0x3b] =  0x01
00597180      [0x3c] =  0x01
00597181      [0x3d] =  0x01
00597182      [0x3e] =  0x01
00597183      [0x3f] =  0x01
00597184      [0x40] =  0x01
00597185      [0x41] =  0x01
00597186      [0x42] =  0x01
00597187      [0x43] =  0x01
00597188      [0x44] =  0x01
00597189      [0x45] =  0x01
0059718a      [0x46] =  0x01
0059718b      [0x47] =  0x01
0059718c      [0x48] =  0x01
0059718d      [0x49] =  0x01
0059718e      [0x4a] =  0x01
0059718f      [0x4b] =  0x01
00597190      [0x4c] =  0x01
00597191      [0x4d] =  0x01
00597192      [0x4e] =  0x01
00597193      [0x4f] =  0x01
00597194      [0x50] =  0x01
00597195      [0x51] =  0x01
00597196      [0x52] =  0x01
00597197      [0x53] =  0x01
00597198      [0x54] =  0x01
00597199      [0x55] =  0x01
0059719a      [0x56] =  0x01
0059719b      [0x57] =  0x01
0059719c      [0x58] =  0x01
0059719d      [0x59] =  0x01
0059719e      [0x5a] =  0x01
0059719f      [0x5b] =  0x01
005971a0      [0x5c] =  0x01
005971a1      [0x5d] =  0x01
005971a2      [0x5e] =  0x01
005971a3      [0x5f] =  0x01
005971a4      [0x60] =  0x01
005971a5      [0x61] =  0x01
005971a6      [0x62] =  0x01
005971a7      [0x63] =  0x01
005971a8      [0x64] =  0x01
005971a9      [0x65] =  0x01
005971aa      [0x66] =  0x01
005971ab      [0x67] =  0x01
005971ac      [0x68] =  0x01
005971ad      [0x69] =  0x01
005971ae      [0x6a] =  0x01
005971af      [0x6b] =  0x01
005971b0      [0x6c] =  0x01
005971b1      [0x6d] =  0x00
005971b2      [0x6e] =  0x00
005971b3      [0x6f] =  0x00
005971b4      [0x70] =  0x01
005971b5      [0x71] =  0x01
005971b6      [0x72] =  0x01
005971b7      [0x73] =  0x01
005971b8      [0x74] =  0x01
005971b9      [0x75] =  0x01
005971ba      [0x76] =  0x01
005971bb      [0x77] =  0x01
005971bc      [0x78] =  0x01
005971bd      [0x79] =  0x01
005971be      [0x7a] =  0x01
005971bf      [0x7b] =  0x01
005971c0      [0x7c] =  0x01
005971c1      [0x7d] =  0x01
005971c2      [0x7e] =  0x01
005971c3      [0x7f] =  0x01
005971c4      [0x80] =  0x01
005971c5      [0x81] =  0x01
005971c6      [0x82] =  0x01
005971c7      [0x83] =  0x01
005971c8      [0x84] =  0x01
005971c9      [0x85] =  0x01
005971ca      [0x86] =  0x01
005971cb      [0x87] =  0x01
005971cc      [0x88] =  0x01
005971cd      [0x89] =  0x01
005971ce      [0x8a] =  0x01
005971cf      [0x8b] =  0x01
005971d0      [0x8c] =  0x01
005971d1      [0x8d] =  0x01
005971d2      [0x8e] =  0x01
005971d3      [0x8f] =  0x01
005971d4      [0x90] =  0x01
005971d5      [0x91] =  0x01
005971d6      [0x92] =  0x01
005971d7      [0x93] =  0x01
005971d8      [0x94] =  0x01
005971d9      [0x95] =  0x01
005971da      [0x96] =  0x01
005971db      [0x97] =  0x01
005971dc      [0x98] =  0x01
005971dd      [0x99] =  0x01
005971de      [0x9a] =  0x01
005971df      [0x9b] =  0x01
005971e0      [0x9c] =  0x01
005971e1      [0x9d] =  0x01
005971e2      [0x9e] =  0x01
005971e3      [0x9f] =  0x01
005971e4      [0xa0] =  0x01
005971e5      [0xa1] =  0x01
005971e6      [0xa2] =  0x01
005971e7      [0xa3] =  0x01
005971e8      [0xa4] =  0x01
005971e9      [0xa5] =  0x01
005971ea      [0xa6] =  0x01
005971eb      [0xa7] =  0x01
005971ec      [0xa8] =  0x01
005971ed      [0xa9] =  0x01
005971ee      [0xaa] =  0x01
005971ef      [0xab] =  0x01
005971f0      [0xac] =  0x01
005971f1      [0xad] =  0x01
005971f2      [0xae] =  0x01
005971f3      [0xaf] =  0x01
005971f4      [0xb0] =  0x01
005971f5      [0xb1] =  0x01
005971f6      [0xb2] =  0x01
005971f7      [0xb3] =  0x01
005971f8      [0xb4] =  0x01
005971f9      [0xb5] =  0x01
005971fa      [0xb6] =  0x01
005971fb      [0xb7] =  0x01
005971fc      [0xb8] =  0x01
005971fd      [0xb9] =  0x01
005971fe      [0xba] =  0x01
005971ff      [0xbb] =  0x01
00597200      [0xbc] =  0x01
00597201      [0xbd] =  0x01
00597202      [0xbe] =  0x01
00597203      [0xbf] =  0x00
00597204      [0xc0] =  0x00
00597205  }

00597205                 8d 49 00                                                                               .I.
00597208  uint32_t jump_table_597208[0x4] = 
00597208  {
00597208      [0x0] =  0x005970e2
0059720c      [0x1] =  0x005970e9
00597210      [0x2] =  0x005970f0
00597214      [0x3] =  0x005970f7
00597218  }
00597218  uint8_t lookup_table_597218[0xa] = 
00597218  {
00597218      [0x0] =  0x00
00597219      [0x1] =  0x01
0059721a      [0x2] =  0x02
0059721b      [0x3] =  0x02
0059721c      [0x4] =  0x03
0059721d      [0x5] =  0x03
0059721e      [0x6] =  0x02
0059721f      [0x7] =  0x03
00597220      [0x8] =  0x03
00597221      [0x9] =  0x03
00597222  }

00597222        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00597230  uint32_t __fastcall CSpellBase::InqTargetType(class CSpellBase const* this)

00597230  {
00597238      void __return;
00597238      CSpellBase::InqSpellFormula(this, &__return);
00597241      int32_t result = SpellFormula::Complete(&__return);
00597241      
00597248      if (result != 0)
0059725a          return SpellFormula::GetTargetingType(&__return);
0059725a      
0059724d      return result;
00597230  }

0059725b                                                                                   90 90 90 90 90                             .....

00597260  uint32_t __fastcall CSpellBase::InqSpellLevelByRoughHeuristic(class CSpellBase const* this)

00597260  {
0059726f      void __return;
0059726f      uint32_t result = SpellFormula::GetPowerLevelOfPowerComponent(CSpellBase::InqSpellFormula(this, &__return));
0059726f      
00597277      if (result < 7)
00597289          return result;
00597289      
0059727c      if (result >= 9)
00597283          return (result - 2);
00597283      
00597282      return (result - 1);
00597260  }

0059728a                                90 90 90 90 90 90                                                            ......

00597290  int32_t __thiscall CSpellBase::UnPack(class CSpellBase* this, void** arg2, uint32_t arg3)

00597290  {
00597297      void* ebp = *(uint32_t*)arg2;
00597297      
005972a7      if (arg3 >= CSpellBase::packed_size(this))
005972a7      {
005972b2          AC1Legacy::PStringBase<char>::UnPack(&this->_name, arg2, arg3);
005972bc          AC1Legacy::PStringBase<char>::UnPack(&this->_desc, arg2, arg3);
005972c5          this->_school = **(uint32_t**)arg2;
005972ca          void* eax_3 = (*(uint32_t*)arg2 + 4);
005972cd          *(uint32_t*)arg2 = eax_3;
005972cf          class IDClass<_tagDataID,32,0> ecx_3 = *(uint32_t*)eax_3;
005972d4          *(uint32_t*)arg2 = ((char*)eax_3 + 4);
005972d6          this->_iconID.id = ecx_3;
005972dd          this->_category = **(uint32_t**)arg2;
005972e2          void* edx_3 = (*(uint32_t*)arg2 + 4);
005972e5          *(uint32_t*)arg2 = edx_3;
005972eb          this->_bitfield = *(uint32_t*)edx_3;
005972f0          void* ecx_6 = (*(uint32_t*)arg2 + 4);
005972f3          *(uint32_t*)arg2 = ecx_6;
005972f9          this->_base_mana = *(uint32_t*)ecx_6;
005972fe          void* eax_9 = (*(uint32_t*)arg2 + 4);
00597301          *(uint32_t*)arg2 = eax_9;
00597305          this->_base_range_constant = *(uint32_t*)eax_9;
0059730a          void* edx_6 = (*(uint32_t*)arg2 + 4);
0059730d          *(uint32_t*)arg2 = edx_6;
00597313          this->_base_range_mod = *(uint32_t*)edx_6;
00597318          void* ecx_9 = (*(uint32_t*)arg2 + 4);
0059731b          *(uint32_t*)arg2 = ecx_9;
00597321          this->_power = *(uint32_t*)ecx_9;
00597326          void* eax_14 = (*(uint32_t*)arg2 + 4);
00597329          *(uint32_t*)arg2 = eax_14;
0059732d          this->_spell_economy_mod = *(uint32_t*)eax_14;
00597332          void* edx_9 = (*(uint32_t*)arg2 + 4);
00597335          *(uint32_t*)arg2 = edx_9;
0059733b          this->_formula_version = *(uint32_t*)edx_9;
00597340          void* ecx_12 = (*(uint32_t*)arg2 + 4);
00597343          *(uint32_t*)arg2 = ecx_12;
00597349          this->_component_loss = *(uint32_t*)ecx_12;
00597358          *(uint32_t*)arg2 += 4;
00597351          this->_meta_spell.vtable->UnPack(arg2, arg3);
00597360          this->_formula.vtable->UnPack(arg2, arg3);
0059736f          this->_caster_effect = **(uint32_t**)arg2;
00597374          void* eax_23 = (*(uint32_t*)arg2 + 4);
00597377          *(uint32_t*)arg2 = eax_23;
0059737b          this->_target_effect = *(uint32_t*)eax_23;
00597380          void* edx_14 = (*(uint32_t*)arg2 + 4);
00597383          *(uint32_t*)arg2 = edx_14;
00597389          this->_fizzle_effect = *(uint32_t*)edx_14;
0059738e          void* ecx_17 = (*(uint32_t*)arg2 + 4);
00597391          *(uint32_t*)arg2 = ecx_17;
00597397          this->_recovery_interval = *(uint32_t*)ecx_17;
0059739d          *(uint32_t*)((char*)this->_recovery_interval)[4] = *(uint32_t*)((char*)ecx_17 + 4);
005973a2          void* eax_28 = (*(uint32_t*)arg2 + 8);
005973a5          *(uint32_t*)arg2 = eax_28;
005973a9          this->_recovery_amount = *(uint32_t*)eax_28;
005973ae          void* edx_17 = (*(uint32_t*)arg2 + 4);
005973b1          *(uint32_t*)arg2 = edx_17;
005973b7          this->_display_order = *(uint32_t*)edx_17;
005973bc          void* ecx_21 = (*(uint32_t*)arg2 + 4);
005973bf          *(uint32_t*)arg2 = ecx_21;
005973c5          this->_non_component_target_type = *(uint32_t*)ecx_21;
005973cd          void* eax_33 = (*(uint32_t*)arg2 + 4);
005973d0          *(uint32_t*)arg2 = eax_33;
005973d4          this->_mana_mod = *(uint32_t*)eax_33;
005973d9          void* edi_2 = (*(uint32_t*)arg2 + 4);
005973e2          *(uint32_t*)arg2 = edi_2;
005973e2          
005973e4          if (arg3 >= ((char*)edi_2 - ebp))
005973fa              return 1;
005973fa          
005973e6          *(uint32_t*)arg2 = ebp;
005972a7      }
005972a7      
005973ee      return 0;
00597290  }

005973fd                                                                                         90 90 90                               ...

00597400  class AC1Legacy::PStringBase<char>* __convention("regparm") CSpellBase::SchoolEnumToName(class AC1Legacy::PStringBase<char>* __return, uint32_t const arg2)

00597400  {
00597400      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00597400      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00597401      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059740f      AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00597418      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00597422      char const* const var_18_1;
00597422      
00597422      if ((arg2 - 1) > 4)
0059744e          var_18_1 = "None";
00597422      else
00597424          switch (arg2)
00597424          {
00597432              case 1:
00597432              {
00597432                  var_18_1 = "War Magic";
00597432                  break;
00597432              }
00597439              case 2:
00597439              {
00597439                  var_18_1 = "Life Magic";
00597439                  break;
00597439              }
00597440              case 3:
00597440              {
00597440                  var_18_1 = "Item Enchantment";
00597440                  break;
00597440              }
00597447              case 4:
00597447              {
00597447                  var_18_1 = "Creature Enchantment";
00597447                  break;
00597447              }
0059742b              case 5:
0059742b              {
0059742b                  var_18_1 = "Void Magic";
0059742b                  break;
0059742b              }
00597424          }
00597424      
00597457      AC1Legacy::PStringBase<char>::set(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, var_18_1);
0059745c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00597468      __return->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0059746a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
0059746a      
00597479      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
0059747b          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
0059747b      
0059748a      return __return;
00597400  }

0059748b                                   90                                                                         .
0059748c  uint32_t jump_table_59748c[0x5] = 
0059748c  {
0059748c      [0x0] =  0x00597432
00597490      [0x1] =  0x00597439
00597494      [0x2] =  0x00597440
00597498      [0x3] =  0x00597447
0059749c      [0x4] =  0x0059742b
005974a0  }

005974a0  int32_t __fastcall CSpellBase::IsUntargeted(class CSpellBase const* this)

005974a0  {
005974a8      void __return;
005974a8      CSpellBase::InqSpellFormula(this, &__return);
005974b1      uint32_t eax = SpellFormula::GetTargetingType(&__return);
005974b6      int32_t eax_1 = -(eax);
005974be      return ((eax_1 - eax_1) + 1);
005974a0  }

005974bf                                                                                               90                                 .

005974c0  void* __thiscall PackableHashIterator<unsigned long,CSpellBase>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,CSpellBase>* this, uint32_t arg2)

005974c0  {
005974c8      this->vtable = 0x7e4858;
005974c8      
005974ce      if ((arg2 & 1) != 0)
005974d1          operator delete(this);
005974d1      
005974dc      return this;
005974c0  }

005974df                                                                                               90                                 .

005974e0  uint32_t __thiscall CSpellTable::Pack(class CSpellTable* this, void** arg2, uint32_t arg3)

005974e0  {
005974e0      class CSpellTable* this_1 = this;
005974e6      class HashTableData<unsigned long,SpellSet>* eax = this->m_SpellSetHash.m_intrusiveTable.m_aInplaceBuckets[0xf];
005974f9      this_1 = nullptr;
0059751b      int32_t result = (eax->m_data.m_countTiers.vtable(&this_1, 0) + *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(&this_1, 0));
0059751b      
0059751f      if (arg3 >= result)
0059751f      {
0059752e          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(arg2, arg3);
00597531          this->m_SpellSetHash.m_intrusiveTable.m_aInplaceBuckets[0xf]->m_data.m_countTiers.vtable(arg2, arg3);
0059751f      }
0059751f      
00597549      return result;
005974e0  }

0059754c                                      90 90 90 90                                                              ....

00597550  int32_t __thiscall CSpellTable::UnPack(class CSpellTable* this, void** arg2, uint32_t arg3)

00597550  {
00597550      class CSpellTable* this_1 = this;
00597555      void** edi = arg2;
00597559      void* ebp = *(uint32_t*)edi;
0059755d      int32_t eax = this->m_bLoaded*(int32_t*)((char*)this + 8);
0059756a      arg2 = nullptr;
0059756a      
00597599      if (arg3 >= (*(uint32_t*)(eax + 0xc)(&arg2, 0) + this->m_SpellSetHash.m_intrusiveTable.m_aInplaceBuckets[0xf]->m_data.m_countTiers.vtable(&arg2, 0)))
00597599      {
005975a3          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0x10)(edi, arg3);
005975a6          this->m_SpellSetHash.m_intrusiveTable.m_aInplaceBuckets[0xf]->m_data.m_countTiers._head(edi, arg3);
005975a6          
005975bd          if (arg3 >= (*(uint32_t*)edi - ebp))
005975d5              return 1;
005975d5          
005975bf          *(uint32_t*)edi = ebp;
00597599      }
00597599      
005975c8      return 0;
00597550  }

005975d8                                                                          90 90 90 90 90 90 90 90                          ........

005975e0  class PackableHashIterator<unsigned long,CSpellBase>* __thiscall PackableHashTable<unsigned long,CSpellBase>::begin(class PackableHashTable<unsigned long,CSpellBase> const* this, class PackableHashIterator<unsigned long,CSpellBase>* __return)

005975e0  {
005975e0      uint32_t _table_size = this->_table_size;
005975e4      int32_t eax = 0;
005975e4      
005975e9      if (_table_size > 0)
005975e9      {
005975eb          class PackableHashData<unsigned long,CSpellBase>** _buckets_1 = this->_buckets;
005975ee          class PackableHashData<unsigned long,CSpellBase>** _buckets_2 = _buckets_1;
005975ee          
005975fb          do
005975fb          {
005975f3              if (*(uint32_t*)_buckets_2 != 0)
005975f3              {
0059761c                  int32_t ecx = _buckets_1[eax];
0059761f                  int32_t* __return_1 = __return;
00597623                  __return_1[2] = _buckets_1;
00597628                  __return_1[1] = ecx;
0059762b                  *(uint32_t*)__return_1 = 0x7e4858;
00597631                  __return_1[3] = _table_size;
00597634                  return __return_1;
005975f3              }
005975f3              
005975f5              eax += 1;
005975f6              _buckets_2 = &_buckets_2[1];
005975fb          } while (eax < _table_size);
005975e9      }
005975e9      
005975fd      class PackableHashData<unsigned long,CSpellBase>** _buckets = this->_buckets;
00597606      __return->_current = nullptr;
0059760d      __return->_buckets = _buckets;
00597610      __return->vtable = 0x7e4858;
00597616      __return->_table_size = _table_size;
00597619      return __return;
005975e0  }

00597637                                                                       90 90 90 90 90 90 90 90 90                         .........

00597640  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>* this, uint32_t arg2)

00597640  {
00597643      class HashTableData<unsigned long,SpellSet>** m_buckets = this->m_buckets;
0059764b      this->vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class SpellSet>*,0>::`vftable';
0059764b      
00597651      if (m_buckets != &this->m_aInplaceBuckets)
00597654          operator delete[](m_buckets);
00597654      
0059765e      this->m_buckets = nullptr;
00597661      this->m_firstInterestingBucket = nullptr;
00597664      this->m_numBuckets = 0;
00597667      this->m_numElements = 0;
00597667      
0059766f      if ((arg2 & 1) != 0)
00597672          operator delete(this);
00597672      
0059767d      return this;
00597640  }


00597680  uint32_t __thiscall PackableHashTable<unsigned long,CSpellBase>::Pack(class PackableHashTable<unsigned long,CSpellBase>* this, void** arg2, uint32_t arg3)

00597680  {
00597680      class PackableHashTable<unsigned long,CSpellBase>* this_1 = this;
00597685      uint32_t result = PackableHashTable<unsigned long,CSpellBase>::pack_size(this);
0059768a      uint32_t ebx = arg3;
00597690      uint32_t result_1 = result;
00597690      
00597694      if (ebx >= result)
00597694      {
005976a9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005976ab          *(uint32_t*)arg2 += 4;
005976b1          uint32_t i = 0;
005976b5          arg3 = 0;
005976b5          
005976b9          if (this->_table_size > 0)
005976b9          {
00597705              do
00597705              {
005976c3                  int32_t* j = this->_buckets[i];
005976c3                  
005976c8                  if (j != 0)
005976c8                  {
005976f1                      do
005976f1                      {
005976d3                          if (ebx >= 4)
005976d3                          {
005976d9                              **(uint32_t**)arg2 = *(uint32_t*)j;
005976db                              *(uint32_t*)arg2 += 4;
005976d3                          }
005976d3                          
005976e6                          *(uint32_t*)(j[2] + 0xc)(arg2, ebx);
005976e9                          j = j[0x26];
005976f1                      } while (j != 0);
005976f1                      
005976f3                      result = result_1;
005976f7                      i = arg3;
005976c8                  }
005976c8                  
005976fe                  i += 1;
00597701                  arg3 = i;
00597705              } while (i < this->_table_size);
005976b9          }
00597694      }
00597694      
0059770c      return result;
00597680  }

005976bd                                                                                         8d 49 00                               .I.
0059770f                                               90                                                                 .

00597710  uint32_t __fastcall PackableHashTable<unsigned long,CSpellBase>::pack_size(class PackableHashTable<unsigned long,CSpellBase>* this)

00597710  {
00597710      class PackableHashTable<unsigned long,CSpellBase>* this_1 = this;
00597718      int32_t i = 0;
0059771a      bool cond:0 = this->_table_size <= 0;
0059771d      int32_t result = 4;
00597722      this_1 = nullptr;
00597722      
00597726      if (!(cond:0))
00597726      {
00597764          do
00597764          {
00597733              void* j = this->_buckets[i];
00597733              
00597738              while (j != 0)
00597738              {
0059774d                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 8) + 0xc)(&this_1, 0);
00597750                  j = *(uint32_t*)((char*)j + 0x98);
00597758                  result = ((result + eax_2) + 4);
00597738              }
00597738              
00597761              i += 1;
00597764          } while (i < this->_table_size);
00597726      }
00597726      
0059776d      return result;
00597710  }

0059776e                                            90 90                                                                ..

00597770  void __thiscall CSpellTable::GetSubDataIDs(class CSpellTable const* this, class QualifiedDataIDArray* arg2)

00597770  {
0059777c      void __return;
0059777c      PackableHashTable<unsigned long,CSpellBase>::begin(&this->_spellBaseHash, &__return);
00597787      void* i_1;
00597787      void* const i_2;
00597787      
00597787      for (void* const i = i_1; i != 0; i = i_2)
00597787      {
005977ac          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, *(uint32_t*)((char*)i + 0x18), 0), 8);
005977b1          i_2 = *(uint32_t*)((char*)i + 0x98);
005977b1          
005977b9          if (i_2 == 0)
005977b9          {
005977c1              int32_t eax_4 = (*(uint32_t*)((char*)i + 0x9c) + 1);
005977c4              int32_t var_4;
005977c4              
005977c4              if (eax_4 >= var_4)
005977c4              {
005977d1              label_5977d1:
005977d1                  i_2 = nullptr;
005977c4              }
005977c4              else
005977c4              {
005977ca                  int32_t var_8;
005977ca                  
005977ca                  while (*(uint32_t*)(var_8 + (eax_4 << 2)) == 0)
005977ca                  {
005977cc                      eax_4 += 1;
005977cc                      
005977cf                      if (eax_4 >= var_4)
005977cf                          goto label_5977d1;
005977ca                  }
005977ca                  
005977e3                  i_2 = *(uint32_t*)(var_8 + (eax_4 << 2));
005977c4              }
005977b9          }
00597787      }
00597770  }

005977e8                          90 90 90 90 90 90 90 90                                                          ........

005977f0  void __fastcall PackableHashTable<unsigned long,CSpellBase>::EmptyContents(class PackableHashTable<unsigned long,CSpellBase>* this)

005977f0  {
005977f8      class PackableHashTable<unsigned long,CSpellBase>* this_1 = this;
005977f8      
005977fc      if (this->_buckets != 0)
005977fc      {
00597805          int32_t i = 0;
00597809          int32_t i_1 = 0;
00597809          
0059780d          if (this->_table_size > 0)
0059780d          {
00597813              void* j;
00597813              void* j_1 = j;
00597813              
005978ac              do
005978ac              {
00597823                  void* j_2 = this->_buckets[i];
00597823                  
00597828                  if (j_2 != 0)
00597828                  {
0059788e                      do
0059788e                      {
00597830                          j = *(uint32_t*)((char*)j_2 + 0x98);
0059783c                          MetaSpell::~MetaSpell(((char*)j_2 + 0x8c));
00597841                          int32_t* edi_1 = *(uint32_t*)((char*)j_2 + 0x10);
00597848                          *(uint32_t*)((char*)j_2 + 0x44) = 0x79285c;
00597848                          
00597857                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0059785f                              **(uint32_t**)edi_1(1);
0059785f                          
00597861                          int32_t* edi_2 = *(uint32_t*)((char*)j_2 + 0xc);
00597861                          
00597870                          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00597878                              **(uint32_t**)edi_2(1);
00597878                          
0059787b                          *(uint32_t*)((char*)j_2 + 8) = 0x79285c;
00597882                          operator delete(j_2);
0059788c                          j_2 = j;
0059788e                      } while (j != 0);
0059788e                      
00597890                      i = i_1;
00597894                      this = this_1;
00597828                  }
00597828                  
00597898                  this->_buckets[i] = 0;
005978a5                  i += 1;
005978a8                  i_1 = i;
005978ac              } while (i < this->_table_size);
0059780d          }
005977fc      }
005977fc      
005978b6      this->_currNum = 0;
005977f0  }

005978c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005978d0  uint32_t IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::nice_num_buckets(uint32_t arg1)

005978d0  {
005978d5      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005978db      arg1 = arg1;
005978f2      uint32_t* eax_1 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg1, ((int8_t)arg1), nullptr);
005978f2      
005978fd      if (eax_1 == bucketSizesEnd_1)
005978ff          eax_1 -= 4;
005978ff      
00597904      return *(uint32_t*)eax_1;
005978d0  }

00597905                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00597910  int32_t __thiscall PackableHashTable<unsigned long,CSpellBase>::UnPack(class PackableHashTable<unsigned long,CSpellBase>* this, void** arg2, uint32_t arg3)

00597910  {
00597924      if (arg3 < 4)
00597930          return 0;
00597930      
0059793c      void* eax_1 = *(uint32_t*)arg2;
00597948      PackableHashTable<unsigned long,CSpellBase>::EmptyContents(this);
0059794d      class PackableHashData<unsigned long,CSpellBase>** _buckets = this->_buckets;
0059794d      
00597954      if (_buckets != 0)
00597954      {
00597957          operator delete[](_buckets);
0059795f          this->_buckets = nullptr;
00597954      }
00597954      
00597962      this->_table_size = 0;
00597965      void* ecx_1 = *(uint32_t*)arg2;
00597967      int32_t eax_2 = *(uint32_t*)ecx_1;
0059796c      *(uint32_t*)arg2 = ((char*)ecx_1 + 4);
00597970      uint32_t ecx_4 = (eax_2 >> 0x10);
00597973      int32_t eax_3 = (eax_2 & 0xffff);
0059797d      this->_table_size = ecx_4;
0059797d      
00597982      if (ecx_4 == 0)
00597982      {
0059798b          int32_t result;
0059798b          result = eax_3 == 0;
00597995          return result;
00597982      }
00597982      
005979aa      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
005979aa      {
005979c3          int32_t var_90;
005979c3          CSpellBase::CSpellBase(&var_90);
005979ca          int32_t var_a0_1 = 0;
005979d2          int32_t* ecx_10;
005979d2          
005979d2          if (eax_3 <= 0)
005979d2          {
00597a2e          label_597a2e:
00597a2e              ecx_10 = &var_90;
00597a2e              
00597a32              if (arg3 >= (*(uint32_t*)arg2 - eax_1))
00597a32              {
00597a34                  CSpellBase::~CSpellBase(ecx_10);
00597a48                  return 1;
00597a32              }
005979d2          }
005979d2          else
005979d2          {
005979d7              while (true)
005979d7              {
005979d7                  if ((arg3 - 4) >= 4)
005979d7                  {
005979d9                      int32_t* eax_5 = *(uint32_t*)arg2;
005979dd                      int32_t edx_1 = var_90;
005979e2                      uint32_t var_94 = *(uint32_t*)eax_5;
005979ee                      *(uint32_t*)arg2 = &eax_5[1];
005979ee                      
005979f5                      if ((*(uint32_t*)(edx_1 + 0x10)(arg2, (arg3 - 4)) != 0 && (PackableHashTable<unsigned long,CSpellBase>::add(this, &var_94, &var_90) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
005979f5                      {
00597a18                          bool cond:5_1 = (var_a0_1 + 1) < eax_3;
00597a1a                          var_a0_1 += 1;
00597a1a                          
00597a1e                          if (!(cond:5_1))
00597a1e                              goto label_597a2e;
00597a1e                          
00597a1e                          continue;
005979f5                      }
005979d7                  }
005979d7                  
00597a4b                  ecx_10 = &var_90;
00597a4b                  break;
005979d7              }
005979d2          }
005979d2          
00597a4f          CSpellBase::~CSpellBase(ecx_10);
005979aa      }
005979aa      
00597a60      return 0;
00597910  }

00597a63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00597a70  int32_t __thiscall PackableHashTable<unsigned long,CSpellBase>::add(class PackableHashTable<unsigned long,CSpellBase>* this, uint32_t const* arg2, class CSpellBase const* arg3)

00597a70  {
00597a7a      uint32_t _table_size_1 = this->_table_size;
00597a7a      
00597a7f      if (_table_size_1 == 0)
00597a7f      {
00597ab4      label_597ab4:
00597ab4          void* eax_4 = operator new(0xa0);
00597ab4          
00597ac0          if (eax_4 != 0)
00597ac0          {
00597ac9              uint32_t _table_size = this->_table_size;
00597ad0              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
00597ad2              CSpellBase::CSpellBase(((char*)eax_4 + 8), arg3);
00597ad7              *(uint32_t*)((char*)eax_4 + 0x98) = 0;
00597ae6              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
00597ae8              *(uint32_t*)((char*)eax_4 + 0x9c) = temp1_2;
00597af6              *(uint32_t*)((char*)eax_4 + 0x98) = this->_buckets[temp1_2];
00597afc              this->_buckets[temp1_2] = eax_4;
00597b02              this->_currNum += 1;
00597b0e              return 1;
00597ac0          }
00597a7f      }
00597a7f      else
00597a7f      {
00597a81          class PackableHashData<unsigned long,CSpellBase>** _buckets = this->_buckets;
00597a81          
00597a86          if (_buckets == 0)
00597a86              goto label_597ab4;
00597a86          
00597a88          uint32_t const i = *(uint32_t*)arg2;
00597a91          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
00597a91          
00597a96          if (edx_3 == 0)
00597a96              goto label_597ab4;
00597a96          
00597a9a          while (i != *(uint32_t*)edx_3)
00597a9a          {
00597a9c              edx_3 = edx_3[0x26];
00597a9c              
00597aa4              if (edx_3 == 0)
00597aa4                  goto label_597ab4;
00597a9a          }
00597a9a          
00597aad          if (edx_3 == 0xfffffff8)
00597aad              goto label_597ab4;
00597a7f      }
00597a7f      
00597b17      return 0;
00597a70  }

00597b1a                                                                                90 90 90 90 90 90                            ......

00597b20  void* __thiscall PackableHashTable<unsigned long,CSpellBase>::`scalar deleting destructor'(class PackableHashTable<unsigned long,CSpellBase>* this, uint32_t arg2)

00597b20  {
00597b23      this->vtable = &PackableHashTable<unsigned long,class CSpellBase>::`vftable';
00597b29      PackableHashTable<unsigned long,CSpellBase>::EmptyContents(this);
00597b2e      class PackableHashData<unsigned long,CSpellBase>** _buckets = this->_buckets;
00597b2e      
00597b33      if (_buckets != 0)
00597b33      {
00597b36          operator delete[](_buckets);
00597b3e          this->_buckets = nullptr;
00597b33      }
00597b33      
00597b4a      this->_table_size = 0;
00597b51      this->vtable = 0x79285c;
00597b51      
00597b57      if ((arg2 & 1) != 0)
00597b5a          operator delete(this);
00597b5a      
00597b65      return this;
00597b20  }

00597b68                          90 90 90 90 90 90 90 90                                                          ........

00597b70  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>* this, uint32_t arg2)

00597b70  {
00597b7b      arg2 = arg2;
00597b7f      uint8_t edx = ((int8_t)arg2);
00597b83      this->m_buckets = nullptr;
00597b86      this->m_firstInterestingBucket = nullptr;
00597b89      this->m_numBuckets = 0;
00597b8c      this->m_numElements = 0;
00597b90      this->vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class SpellSet>*,0>::`vftable';
00597b96      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00597ba9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00597ba9      
00597bb3      if (eax == bucketSizesEnd_1)
00597bb5          eax -= 4;
00597bb5      
00597bb8      uint32_t eax_1 = *(uint32_t*)eax;
00597bbd      this->m_numBuckets = eax_1;
00597bbd      
00597bc0      if (eax_1 > 0x17)
00597bd6          this->m_buckets = operator new[]((eax_1 << 2));
00597bc0      else
00597bc5          this->m_buckets = &this->m_aInplaceBuckets;
00597bc5      
00597bdc      class HashTableData<unsigned long,SpellSet>** m_buckets = this->m_buckets;
00597bdf      uint32_t ecx_3 = (this->m_numBuckets << 2);
00597be5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00597bf6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00597b70  }

00597bff                                                                                               90                                 .

00597c00  void* __thiscall SpellSetTierList::`scalar deleting destructor'(class SpellSetTierList* this, uint32_t arg2)

00597c00  {
00597c03      this->m_SpellList.vtable = &PList<unsigned long>::`vftable';
00597c03      this->m_SpellList.vtable = &PackObj::`vftable';
00597c03      this->m_SpellList.vtable = 0x7a4110;
00597c1a      List<StringTableMetaLanguage::Node const *>::flush(&this->m_SpellList);
00597c24      this->vtable = 0x79285c;
00597c24      
00597c2a      if ((arg2 & 1) != 0)
00597c2d          operator delete(this);
00597c2d      
00597c38      return this;
00597c00  }

00597c3b                                                                                   90 90 90 90 90                             .....

00597c40  int32_t __thiscall AC1Legacy::List<SpellSetTierList>::pop_front(class AC1Legacy::List<SpellSetTierList>* this, class SpellSetTierList* arg2)

00597c40  {
00597c44      class AC1Legacy::ListNode<SpellSetTierList>* _head = this->_head;
00597c44      
00597c49      if (_head == 0)
00597c4f          return 0;
00597c4f      
00597c52      class AC1Legacy::ListNode<SpellSetTierList>* next = _head->next;
00597c57      this->_head = next;
00597c57      
00597c5a      if (next == 0)
00597c65          this->_tail = nullptr;
00597c5a      else
00597c5c          next->prev = nullptr;
00597c5c      
00597c71      CharacterTitleTable::operator=(arg2, _head);
00597c71      
00597c78      if (_head != 0)
00597c78      {
00597c7a          _head->data.m_SpellList.vtable = &PList<unsigned long>::`vftable';
00597c7a          _head->data.m_SpellList.vtable = &PackObj::`vftable';
00597c7a          _head->data.m_SpellList.vtable = 0x7a4110;
00597c91          List<StringTableMetaLanguage::Node const *>::flush(&_head->data.m_SpellList);
00597c97          _head->data.vtable = 0x79285c;
00597c9d          operator delete(_head);
00597c78      }
00597c78      
00597ca5      this->_num_elements -= 1;
00597caf      return 1;
00597c40  }

00597cb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00597cc0  void __fastcall AC1Legacy::List<SpellSetTierList>::flush(class AC1Legacy::List<SpellSetTierList>* this)

00597cc0  {
00597cd3      while (this->_head != 0)
00597cd3      {
00597ce0          int32_t var_1c = 0x7e4878;
00597ce8          int32_t var_18_1 = 0;
00597cec          void* i_1 = nullptr;
00597cf0          int32_t var_c_1 = 0;
00597cf4          int32_t var_8_1 = 0;
00597cf8          int32_t var_14_1 = 0x7a7388;
00597d00          int32_t var_4_1 = 0x7a4114;
00597d08          AC1Legacy::List<SpellSetTierList>::pop_front(this, &var_1c);
00597d0d          void* i = i_1;
00597d11          int32_t var_4_2 = 0x79285c;
00597d15          int32_t var_14_2 = 0x7a4110;
00597d15          
00597d22          while (i != 0)
00597d22          {
00597d24              void* i_3 = i;
00597d26              i = *(uint32_t*)((char*)i + 4);
00597d2b              void* i_2 = i;
00597d2b              
00597d2f              if (i == 0)
00597d3a                  int32_t var_c_2 = 0;
00597d2f              else
00597d2f              {
00597d31                  *(uint32_t*)((char*)i + 8) = 0;
00597d34                  i = i_2;
00597d2f              }
00597d2f              
00597d40              if (i_3 != 0)
00597d40              {
00597d43                  operator delete(i_3);
00597d48                  i = i_2;
00597d40              }
00597d40              
00597d4f              var_8_1 -= 1;
00597d22          }
00597d22          
00597d55          var_1c = 0x79285c;
00597cd3      }
00597cc0  }

00597d65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00597d70  void* __thiscall PList<SpellSetTierList>::`vector deleting destructor'(class PList<SpellSetTierList>* this, uint32_t arg2)

00597d70  {
00597d73      /* tailcall */
00597d73      return PList<SpellSetTierList>::`scalar deleting destructor'(((char*)this - 0x10), arg2);
00597d70  }

00597d78                                                                          cc cc cc cc cc cc cc cc                          ........

00597d80  uint32_t __thiscall PList<SpellSetTierList>::Pack(class PList<SpellSetTierList>* this, void** arg2, uint32_t arg3)

00597d80  {
00597d87      int32_t result = this->vtable->GetPackSize();
00597d87      
00597d92      if (arg3 >= result)
00597d92      {
00597d9e          **(uint32_t**)arg2 = this->vtable;
00597da0          *(uint32_t*)arg2 += 4;
00597da0          
00597da8          for (int32_t* i = *(int32_t*)((char*)this + -0xc); i != 0; i = i[7])
00597db6              *(uint32_t*)(*(uint32_t*)i + 0xc)(arg2, arg3);
00597d92      }
00597d92      
00597dc6      return result;
00597d80  }

00597dc9                             90 90 90 90 90 90 90                                                           .......

00597dd0  uint32_t __fastcall PList<SpellSetTierList>::GetPackSize(class PList<SpellSetTierList>* this)

00597dd0  {
00597dd0      class PList<SpellSetTierList>* this_1 = this;
00597dd2      int32_t* i = *(int32_t*)((char*)this + -0xc);
00597dd8      int32_t result = 4;
00597ddd      this_1 = nullptr;
00597ddd      
00597de5      while (i != 0)
00597de5      {
00597df2          int32_t eax_2 = *(uint32_t*)(*(uint32_t*)i + 0xc)(&this_1, 0);
00597df5          i = i[7];
00597df8          result += eax_2;
00597de5      }
00597de5      
00597e03      return result;
00597dd0  }

00597e04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00597e10  int32_t __thiscall PList<SpellSetTierList>::UnPack(class PList<SpellSetTierList>* this, void** arg2, uint32_t arg3)

00597e10  {
00597e1a      if (arg3 < 4)
00597e21          return 0;
00597e21      
00597e27      void** esi = arg2;
00597e2b      void* ebx = *(uint32_t*)esi;
00597e33      AC1Legacy::List<SpellSetTierList>::flush(&this[0]);
00597e38      void* eax_1 = *(uint32_t*)esi;
00597e3a      int32_t edi = *(uint32_t*)eax_1;
00597e3c      void* ecx_1 = nullptr;
00597e43      *(uint32_t*)esi = ((char*)eax_1 + 4);
00597e45      int32_t var_1c = 0x7e4878;
00597e4d      int32_t var_18 = 0;
00597e51      int32_t var_10 = 0;
00597e55      int32_t var_c = 0;
00597e59      int32_t var_8 = 0;
00597e5d      int32_t var_14 = 0x7a7388;
00597e65      int32_t var_4 = 0x7a4114;
00597e6d      arg2 = nullptr;
00597e6d      
00597e71      if (edi > 0)
00597e71      {
00597ea6          while (true)
00597ea6          {
00597ea6              void* eax_5 = (*(uint32_t*)esi - ebx);
00597ea6              
00597eaa              if (arg3 > eax_5)
00597eae                  ecx_1 = (arg3 - eax_5);
00597eae              
00597eba              int32_t eax_7 = *(uint32_t*)(var_1c + 0x10)(esi, ecx_1);
00597ebf              int32_t eax_8;
00597ebf              
00597ebf              if (eax_7 != 0)
00597ec8                  eax_8 = AC1Legacy::List<SpellSetTierList>::push_back(&this[0], &var_1c);
00597ec8              
00597ecf              if ((eax_7 == 0 || eax_8 == 0))
00597ecf              {
00597ee4                  int32_t var_4_2 = 0x79285c;
00597eec                  var_14 = 0x7a4110;
00597ef4                  List<StringTableMetaLanguage::Node const *>::flush(&var_14);
00597f02                  return 0;
00597ecf              }
00597ecf              
00597ed6              bool cond:1_1 = ((char*)arg2 + 1) < edi;
00597ed8              arg2 += 1;
00597ed8              
00597edc              if (!(cond:1_1))
00597edc                  break;
00597edc              
00597e9d              ecx_1 = nullptr;
00597ea6          }
00597e71      }
00597e71      
00597e77      int32_t var_4_1 = 0x79285c;
00597e7f      var_14 = 0x7a4110;
00597e87      List<StringTableMetaLanguage::Node const *>::flush(&var_14);
00597e98      return 1;
00597e10  }

00597f05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00597f10  int32_t __thiscall AC1Legacy::List<SpellSetTierList>::push_back(class AC1Legacy::List<SpellSetTierList>* this, class SpellSetTierList const* arg2)

00597f10  {
00597f16      void* eax = operator new(0x24);
00597f16      
00597f22      if (eax == 0)
00597f60          return 0;
00597f60      
00597f2b      SpellSetTierList::SpellSetTierList(eax, arg2);
00597f30      *(uint32_t*)((char*)eax + 0x1c) = 0;
00597f37      *(uint32_t*)((char*)eax + 0x20) = 0;
00597f37      
00597f43      if (this->_head == 0)
00597f43      {
00597f48          uint32_t eax_4 = (this->_num_elements + 1);
00597f49          this->_head = eax;
00597f4c          this->_tail = eax;
00597f4f          this->_num_elements = eax_4;
00597f59          return 1;
00597f43      }
00597f43      
00597f63      class AC1Legacy::ListNode<SpellSetTierList>* _tail = this->_tail;
00597f66      _tail->next = eax;
00597f69      *(uint32_t*)((char*)eax + 0x20) = _tail;
00597f6f      uint32_t eax_8 = (this->_num_elements + 1);
00597f70      this->_tail = eax;
00597f73      this->_num_elements = eax_8;
00597f7d      return 1;
00597f10  }


00597f80  void* __thiscall AC1Legacy::List<SpellSetTierList>::`scalar deleting destructor'(class AC1Legacy::List<SpellSetTierList>* this, uint32_t arg2)

00597f80  {
00597f83      this->vtable = 0x7e485c;
00597f89      AC1Legacy::List<SpellSetTierList>::flush(this);
00597f89      
00597f93      if ((arg2 & 1) != 0)
00597f96          operator delete(this);
00597f96      
00597fa1      return this;
00597f80  }

00597fa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00597fb0  void* __thiscall PList<SpellSetTierList>::`scalar deleting destructor'(class PList<SpellSetTierList>* this, uint32_t arg2)

00597fb0  {
00597fb3      this->vtable = &PList<class SpellSetTierList>::`vftable';
00597fba      this->vtable = &PackObj::`vftable';
00597fc1      this->vtable = 0x7e485c;
00597fc7      AC1Legacy::List<SpellSetTierList>::flush(this);
00597fc7      
00597fd1      if ((arg2 & 1) != 0)
00597fd4          operator delete(this);
00597fd4      
00597fdf      return this;
00597fb0  }

00597fe2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00597ff0  void __fastcall SpellSet::SpellSet(class SpellSet* this)

00597ff0  {
00597ff2      this->vtable = 0x7e48a8;
00597ffa      this->m_countTiers._head = nullptr;
00597ffd      this->m_countTiers._tail = nullptr;
00598000      this->m_countTiers._num_elements = 0;
00598003      this->m_countTiers.vtable = &PackObj::`vftable';
0059800a      this->m_countTiers.vtable = 0x7e48a4;
00598011      this->m_countTiers.vtable = &PList<class SpellSetTierList>::`vftable';
00597ff0  }

00598019                                                                             90 90 90 90 90 90 90                           .......

00598020  void* __thiscall SpellSet::`scalar deleting destructor'(class SpellSet* this, uint32_t arg2)

00598020  {
00598023      this->m_countTiers.vtable = &PList<class SpellSetTierList>::`vftable';
00598023      this->m_countTiers.vtable = &PackObj::`vftable';
00598023      this->m_countTiers.vtable = 0x7e485c;
0059803a      AC1Legacy::List<SpellSetTierList>::flush(&this->m_countTiers);
00598044      this->vtable = 0x79285c;
00598044      
0059804a      if ((arg2 & 1) != 0)
0059804d          operator delete(this);
0059804d      
00598058      return this;
00598020  }

0059805b                                                                                   90 90 90 90 90                             .....

00598060  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>* this)

00598060  {
00598068      while (this->m_numElements != 0)
00598068      {
0059807b          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00598081          int32_t* m_firstInterestingBucket_2;
00598081          void* esi_1;
00598081          
00598081          if (this->m_firstInterestingBucket == ecx_1)
00598081          {
00598095          label_598095:
00598095              m_firstInterestingBucket_2 = nullptr;
00598097              esi_1 = nullptr;
00598081          }
00598081          else
00598081          {
00598083              while (true)
00598083              {
00598083                  class HashTableData<unsigned long,SpellSet>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00598083                  
00598089                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00598089                  {
0059809b                      int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0059809e                      esi_1 = *(uint32_t*)m_firstInterestingBucket_1;
005980a0                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
005980a0                      break;
00598089                  }
00598089                  
00598090                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00598090                  
00598093                  if (&m_firstInterestingBucket[1] == ecx_1)
00598093                      goto label_598095;
00598083              }
00598081          }
00598081          
005980a2          void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
005980a2          
005980a6          if (eax_3 == esi_1)
005980b8              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
005980a6          else
005980a6          {
005980af              void* ecx_2;
005980af              
005980af              do
005980af              {
005980a8                  ecx_2 = eax_3;
005980aa                  eax_3 = *(uint32_t*)((char*)eax_3 + 4);
005980af              } while (eax_3 != esi_1);
005980af              
005980b3              if (ecx_2 != 0)
005980bf                  *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
005980b3              else
005980b8                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
005980a6          }
005980a6          
005980c8          this->m_numElements -= 1;
005980c8          
005980cb          if (esi_1 != 0)
005980cb          {
005980d0              *(int32_t*)((char*)((char*)esi_1 + 0xc) + 0x10) = &PList<class SpellSetTierList>::`vftable';
005980d7              *(int32_t*)((char*)((char*)esi_1 + 0xc) + 0x10) = 0x79285c;
005980cd              ((char*)esi_1 + 0xc)->vtable = 0x7e485c;
005980e0              AC1Legacy::List<SpellSetTierList>::flush(((char*)esi_1 + 0xc));
005980e6              *(uint32_t*)((char*)esi_1 + 8) = 0x79285c;
005980e9              operator delete(esi_1);
005980cb          }
00598068      }
00598060  }


00598100  void* __thiscall HashTable<unsigned long,SpellSet,0>::`scalar deleting destructor'(class HashTable<unsigned long,SpellSet,0>* this, uint32_t arg2)

00598100  {
00598109      this->vtable = 0x7e488c;
0059810f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>::delete_contents(&this->m_intrusiveTable);
00598114      class HashTableData<unsigned long,SpellSet>** m_buckets = this->m_intrusiveTable.m_buckets;
00598104      this->m_intrusiveTable.vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class SpellSet>*,0>::`vftable';
00598104      
00598122      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00598125          operator delete[](m_buckets);
00598125      
00598104      this->m_intrusiveTable.m_buckets = nullptr;
00598104      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00598104      this->m_intrusiveTable.m_numBuckets = 0;
00598104      this->m_intrusiveTable.m_numElements = 0;
00598104      
00598140      if ((arg2 & 1) != 0)
00598143          operator delete(this);
00598143      
0059814f      return this;
00598100  }

00598152                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00598160  void* __thiscall PHashTable<unsigned long,SpellSet>::`vector deleting destructor'(class PHashTable<unsigned long,SpellSet>* this, uint32_t arg2)

00598160  {
00598163      /* tailcall */
00598163      return PHashTable<unsigned long,SpellSet>::`scalar deleting destructor'(((char*)this - 0x74), arg2);
00598160  }

00598168                          cc cc cc cc cc cc cc cc                                                          ........

00598170  int32_t __thiscall PHashTable<unsigned long,SpellSet>::StreamPack(class PHashTable<unsigned long,SpellSet>* this, enum STREAMTYPE arg2, void** arg3, uint32_t* arg4)

00598170  {
00598176      enum STREAMTYPE esi = arg2;
00598176      
00598180      if (esi != STREAM_UNPACK)
00598180      {
00598186          enum STREAMTYPE vtable = this->vtable;
0059818f          arg2 = vtable;
0059818f          
00598193          if (vtable <= STREAM_PACK | STREAM_UNPACK | 0xfffffc)
00598193          {
0059819c              int32_t var_3c_1 = *(int32_t*)((char*)this + -8);
005981b6              arg2 = (vtable | (((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::get_bucket_size_pointer(this) - g_bucketSizesBegin) >> 2) << 0x18));
005981b6              
005981d0              if (STREAMPACK(esi, &arg2, arg3, arg4) != 0)
005981d0              {
005981e2                  int32_t var_24 = 0;
005981e6                  int32_t var_20_1 = 0;
005981ea                  int32_t var_1c_1 = 0;
005981f8                  int32_t var_18;
005981f8                  void __return;
005981f8                  HashIterator<unsigned long,BaseProperty,1>::HashIterator<unsigned long,BaseProperty,1>(&var_18, IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(((char*)this - 0x70), &__return));
00598209                  var_24 = var_18;
00598211                  int32_t var_14;
00598211                  int32_t var_20_2 = var_14;
00598211                  
00598226                  while (true)
00598226                  {
00598226                      HashIterator<unsigned long,BaseProperty,1>::HashIterator<unsigned long,BaseProperty,1>(&var_18, IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::end(((char*)this - 0x70), &__return));
00598233                      uint32_t* var_10;
00598233                      
00598233                      if (var_10 == var_10)
00598359                          return 1;
00598359                      
00598247                      if (STREAMPACK(esi, var_10, arg3, arg4) == 0)
00598365                          return 0;
00598365                      
00598262                      if (STREAMPACK(esi, &var_10[2], arg3, arg4) == 0)
00598365                          return 0;
00598365                      
0059826c                      IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::operator++(&var_24);
00598226                  }
005981d0              }
00598193          }
00598193          
00598365          return 0;
00598180      }
00598180      
0059827c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>::delete_contents(((char*)this - 0x70));
0059827c      
0059829c      if (STREAMPACK(STREAM_UNPACK, &arg2, arg3, arg4) == 0)
00598365          return 0;
00598365      
005982ac      uint32_t eax_16 = (arg2 >> 0x18);
005982ac      
005982b1      if (eax_16 >= 0x17)
005982b3          eax_16 = 0x16;
005982b3      
005982cb      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::resize_internal(((char*)this - 0x70), IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::nice_num_buckets(g_bucketSizesBegin[eax_16]));
005982d4      int32_t edi_4 = (arg2 & STREAM_PACK | STREAM_UNPACK | 0xfffffc);
005982da      void* ebx_3 = nullptr;
005982df      int32_t ebp_2 = 0;
005982df      
005982e1      if (edi_4 > 0)
005982e1      {
005982ea          while (true)
005982ea          {
005982ea              void* esi_1 = operator new(0x20);
005982ea              
005982f1              if (esi_1 == 0)
00598304                  esi_1 = nullptr;
005982f1              else
005982f1              {
005982f6                  *(uint32_t*)((char*)esi_1 + 4) = 0;
005982fd                  SpellSet::SpellSet(((char*)esi_1 + 8));
005982f1              }
005982f1              
0059831d              if (STREAMPACK(STREAM_UNPACK, esi_1, arg3, arg4) == 0)
00598365                  return 0;
00598365              
00598339              if (STREAMPACK(STREAM_UNPACK, ((char*)esi_1 + 8), arg3, arg4) == 0)
00598365                  return 0;
00598365              
00598341              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(((char*)this - 0x70), esi_1, ebx_3);
00598346              ebp_2 += 1;
00598349              ebx_3 = esi_1;
00598349              
0059834b              if (ebp_2 >= edi_4)
00598359                  return 1;
005982ea          }
005982e1      }
005982e1      
00598359      return 1;
00598170  }

00598368                          90 90 90 90 90 90 90 90                                                          ........

00598370  int32_t STREAMPACK(enum STREAMTYPE arg1, class SpellSet* arg2, void** arg3, uint32_t* arg4)

00598370  {
00598378      if (arg1 == STREAM_GETPACKSIZE)
00598378      {
005983cf          int32_t eax_9 = arg2->vtable->GetPackSize();
005983d6          *(uint32_t*)arg4 -= eax_9;
005983de          return 1;
00598378      }
00598378      
0059837b      if (arg1 == 1)
0059837b      {
005983bd          int32_t eax_7 = arg2->vtable->Pack(arg3, *(uint32_t*)arg4);
005983c0          *(uint32_t*)arg4 -= eax_7;
005983c8          return 1;
0059837b      }
0059837b      
0059837e      if (arg1 != 2)
00598383          return 0;
00598383      
00598396      void* esi = *(uint32_t*)arg3;
0059839a      int32_t result = arg2->vtable->UnPack(arg3, *(uint32_t*)arg4);
005983a6      *(uint32_t*)arg4 += ((char*)esi - *(uint32_t*)arg3);
005983aa      return result;
00598370  }

005983df                                                                                               90                                 .

005983e0  void* __thiscall PHashTable<unsigned long,SpellSet>::`scalar deleting destructor'(class PHashTable<unsigned long,SpellSet>* this, uint32_t arg2)

005983e0  {
005983e4      this->vtable = &PHashTable<unsigned long,class SpellSet>::`vftable';
005983ee      this->vtable = &PackObj::`vftable';
005983f7      this->vtable = 0x7e488c;
005983fd      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>::delete_contents(&this->m_intrusiveTable);
00598402      class HashTableData<unsigned long,SpellSet>** m_buckets = this->m_intrusiveTable.m_buckets;
005983eb      this->m_intrusiveTable.vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class SpellSet>*,0>::`vftable';
005983eb      
00598410      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00598413          operator delete[](m_buckets);
00598413      
005983eb      this->m_intrusiveTable.m_buckets = nullptr;
005983eb      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
005983eb      this->m_intrusiveTable.m_numBuckets = 0;
005983eb      this->m_intrusiveTable.m_numElements = 0;
005983eb      
0059842e      if ((arg2 & 1) != 0)
00598431          operator delete(this);
00598431      
0059843d      return this;
005983e0  }


00598440  void __thiscall CSpellTable::CSpellTable(class CSpellTable* this, class IDClass<_tagDataID,32,0> arg2)

00598440  {
00598448      DBObj::DBObj(this, arg2);
0059844d      this->vtable = &PackObj::`vftable';
00598457      this->vtable = 0x7e48f0;
0059845d      this->vtable = &CSpellTable::`vftable';
00598454      this->_spellBaseHash.vtable = &PackableHashTable<unsigned long,class CSpellBase>::`vftable';
00598454      this->_spellBaseHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
00598454      this->_spellBaseHash._buckets = nullptr;
00598454      this->_spellBaseHash._table_size = 0x2000;
00598454      this->_spellBaseHash._currNum = 0;
0059847c      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_spellBaseHash);
00598486      this->m_SpellSetHash.vtable = 0x7e488c;
0059848d      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>(&this->m_SpellSetHash.m_intrusiveTable, 0x17);
00598492      this->m_SpellSetHash.vtable = &StreamPackObj::`vftable';
0059849c      this->m_SpellSetHash.vtable = 0x7e48d4;
005984a3      this->m_SpellSetHash.vtable = &PHashTable<unsigned long,class SpellSet>::`vftable';
00598440  }

005984b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005984c0  void* __thiscall CSpellTable::`vector deleting destructor'(class CSpellTable* this, uint32_t arg2)

005984c0  {
005984c3      /* tailcall */
005984c3      return CSpellTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005984c0  }

005984c8                          cc cc cc cc cc cc cc cc                                                          ........

005984d0  void* __thiscall CSpellTable::`scalar deleting destructor'(class CSpellTable* this, uint32_t arg2)

005984d0  {
005984d3      CSpellTable::~CSpellTable(this);
005984d3      
005984dd      if ((arg2 & 1) != 0)
005984e0          operator delete(this);
005984e0      
005984eb      return this;
005984d0  }

005984ee                                            90 90                                                                ..

005984f0  void __fastcall CSpellTable::~CSpellTable(class CSpellTable* this)

005984f0  {
005984f5      this->vtable = 0x7e48f0;
005984fb      this->vtable = &CSpellTable::`vftable';
00598502      this->m_SpellSetHash.vtable = &PHashTable<unsigned long,class SpellSet>::`vftable';
0059850f      this->m_SpellSetHash.vtable = &PackObj::`vftable';
0059851b      this->m_SpellSetHash.vtable = 0x7e488c;
00598522      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,SpellSet> *,0>::delete_contents(&this->m_SpellSetHash.m_intrusiveTable);
00598527      class HashTableData<unsigned long,SpellSet>** m_buckets = this->m_SpellSetHash.m_intrusiveTable.m_buckets;
0059850c      this->m_SpellSetHash.m_intrusiveTable.vtable = &IntrusiveHashTable<unsigned long,class HashTableData<unsigned long,class SpellSet>*,0>::`vftable';
0059850c      
00598535      if (m_buckets != &this->m_SpellSetHash.m_intrusiveTable.m_aInplaceBuckets)
00598538          operator delete[](m_buckets);
00598538      
0059850c      this->m_SpellSetHash.m_intrusiveTable.m_buckets = nullptr;
0059850c      this->m_SpellSetHash.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0059850c      this->m_SpellSetHash.m_intrusiveTable.m_numBuckets = 0;
0059850c      this->m_SpellSetHash.m_intrusiveTable.m_numElements = 0;
0059854e      this->_spellBaseHash.vtable = &PackableHashTable<unsigned long,class CSpellBase>::`vftable';
00598559      PackableHashTable<unsigned long,CSpellBase>::EmptyContents(&this->_spellBaseHash);
0059855e      class PackableHashData<unsigned long,CSpellBase>** _buckets = this->_spellBaseHash._buckets;
0059855e      
00598563      if (_buckets != 0)
00598563      {
00598566          operator delete[](_buckets);
0059854e          this->_spellBaseHash._buckets = nullptr;
00598563      }
00598563      
0059854e      this->_spellBaseHash._table_size = 0;
0059854e      this->_spellBaseHash.vtable = 0x79285c;
0059857a      this->vtable = &PackObj::`vftable';
00598586      /* tailcall */
00598586      return DBObj::~DBObj(this);
005984f0  }

0059858b                                   90 90 90 90 90                                                             .....

00598590  class DBObj* CSpellTable::Allocate(class CSpellTable const* this @ ecx)

00598590  {
00598590      /* tailcall */
00598590      return CSpellTable::Allocator();
00598590  }

00598595                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005985a0  class Spell* Spell::BuildSpell(enum SpellType const arg1)

005985a0  {
005985a8      if ((arg1 - 1) <= 0xe)
005985ae          switch (arg1)
005985ae          {
005985b7              case Enchantment_SpellType:
005985b7              {
005985b7                  void* eax_1 = operator new(0x58);
005985b7                  
005985c1                  if (eax_1 != 0)
005985c9                      /* tailcall */
005985c9                      return EnchantmentSpell::EnchantmentSpell(eax_1);
005985b7                  break;
005985b7              }
005985d0              case Projectile_SpellType:
005985d0              {
005985d0                  void* eax_3 = operator new(8);
005985d0                  
005985da                  if (eax_3 != 0)
005985e2                      /* tailcall */
005985e2                      return ProjectileSpell::ProjectileSpell(eax_3);
005985d0                  break;
005985d0              }
005985e9              case Boost_SpellType:
005985e9              {
005985e9                  void* eax_5 = operator new(8);
005985e9                  
005985f3                  if (eax_5 != 0)
005985fb                      /* tailcall */
005985fb                      return BoostSpell::BoostSpell(eax_5);
005985e9                  break;
005985e9              }
00598602              case Transfer_SpellType:
00598602              {
00598602                  void* eax_7 = operator new(8);
00598602                  
0059860c                  if (eax_7 != 0)
00598614                      /* tailcall */
00598614                      return TransferSpell::TransferSpell(eax_7);
00598602                  break;
00598602              }
0059861b              case PortalLink_SpellType:
0059861b              {
0059861b                  void* eax_9 = operator new(8);
0059861b                  
00598625                  if (eax_9 != 0)
0059862d                      /* tailcall */
0059862d                      return PortalLinkSpell::PortalLinkSpell(eax_9);
0059861b                  break;
0059861b              }
00598634              case PortalRecall_SpellType:
00598634              {
00598634                  void* eax_11 = operator new(8);
00598634                  
0059863e                  if (eax_11 != 0)
00598646                      /* tailcall */
00598646                      return PortalLinkSpell::PortalLinkSpell(eax_11);
00598634                  break;
00598634              }
0059864d              case PortalSummon_SpellType:
0059864d              {
0059864d                  void* eax_13 = operator new(0x10);
0059864d                  
00598657                  if (eax_13 != 0)
0059865f                      /* tailcall */
0059865f                      return PortalSummonSpell::PortalSummonSpell(eax_13);
0059864d                  break;
0059864d              }
00598666              case PortalSending_SpellType:
00598666              {
00598666                  void* eax_15 = operator new(8);
00598666                  
00598670                  if (eax_15 != 0)
00598678                      /* tailcall */
00598678                      return PortalLinkSpell::PortalLinkSpell(eax_15);
00598666                  break;
00598666              }
0059867f              case Dispel_SpellType:
0059867f              {
0059867f                  void* eax_17 = operator new(8);
0059867f                  
00598689                  if (eax_17 != 0)
00598691                      /* tailcall */
00598691                      return DispelSpell::DispelSpell(eax_17);
0059867f                  break;
0059867f              }
00598698              case LifeProjectile_SpellType:
00598698              {
00598698                  void* eax_19 = operator new(8);
00598698                  
005986a2                  if (eax_19 != 0)
005986a6                      /* tailcall */
005986a6                      return ProjectileLifeSpell::ProjectileLifeSpell(eax_19);
00598698                  break;
00598698              }
005986c2              case FellowBoost_SpellType:
005986c2              {
005986c2                  void* eax_23 = operator new(8);
005986c2                  
005986cc                  if (eax_23 != 0)
005986d0                      /* tailcall */
005986d0                      return FellowshipBoostSpell::FellowshipBoostSpell(eax_23);
005986c2                  break;
005986c2              }
005986d7              case FellowEnchantment_SpellType:
005986d7              {
005986d7                  void* eax_25 = operator new(0x58);
005986d7                  
005986e1                  if (eax_25 != 0)
005986e5                      /* tailcall */
005986e5                      return FellowshipEnchantmentSpell::FellowshipEnchantmentSpell(eax_25);
005986d7                  break;
005986d7              }
005986ec              case FellowPortalSending_SpellType:
005986ec              {
005986ec                  void* eax_27 = operator new(8);
005986ec                  
005986f6                  if (eax_27 != 0)
005986fa                      /* tailcall */
005986fa                      return FellowshipPortalSendingSpell::FellowshipPortalSendingSpell(eax_27);
005986ec                  break;
005986ec              }
00598701              case FellowDispel_SpellType:
00598701              {
00598701                  void* eax_29 = operator new(8);
00598701                  
0059870b                  if (eax_29 != 0)
0059870f                      /* tailcall */
0059870f                      return FellowshipDispelSpell::FellowshipDispelSpell(eax_29);
00598701                  break;
00598701              }
005986ad              case EnchantmentProjectile_SpellType:
005986ad              {
005986ad                  void* eax_21 = operator new(8);
005986ad                  
005986b7                  if (eax_21 != 0)
005986bb                      /* tailcall */
005986bb                      return ProjectileEnchantmentSpell::ProjectileEnchantmentSpell(eax_21);
005986ad                  break;
005986ad              }
005985ae          }
005985ae      
00598716      return 0;
005985a0  }

00598717                                                                       90                                                 .
00598718  uint32_t jump_table_598718[0xf] = 
00598718  {
00598718      [0x0] =  0x005985b5
0059871c      [0x1] =  0x005985ce
00598720      [0x2] =  0x005985e7
00598724      [0x3] =  0x00598600
00598728      [0x4] =  0x00598619
0059872c      [0x5] =  0x00598632
00598730      [0x6] =  0x0059864b
00598734      [0x7] =  0x00598664
00598738      [0x8] =  0x0059867d
0059873c      [0x9] =  0x00598696
00598740      [0xa] =  0x005986c0
00598744      [0xb] =  0x005986d5
00598748      [0xc] =  0x005986ea
0059874c      [0xd] =  0x005986ff
00598750      [0xe] =  0x005986ab
00598754  }

00598754                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00598760  class Spell& __thiscall Spell::operator=(class Spell* this, class Spell const& arg2)

00598760  {
00598769      this->_spell_id = arg2->_spell_id;
0059876c      return this;
00598760  }

0059876f                                               90                                                                 .

00598770  void __fastcall MetaSpell::MetaSpell(class MetaSpell* this)

00598770  {
00598774      this->vtable = 0x7e4988;
0059877a      this->_sp_type = Undef_SpellType;
0059877d      this->_spell = nullptr;
00598770  }

00598781     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00598790  void __thiscall MetaSpell::InqDuration(class MetaSpell const* this)

00598790  {
00598790      class Spell* _spell = this->_spell;
00598790      
00598795      if (_spell == 0)
005987a2          return;
005987a2      
00598799      /* jump -> _spell->vtable->InqDuration */
00598790  }

005987a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005987b0  uint32_t __thiscall MetaSpell::Pack(class MetaSpell* this, void** arg2, uint32_t arg3)

005987b0  {
005987b0      class MetaSpell* this_1 = this;
005987b5      class Spell* _spell = this->_spell;
005987ba      this_1 = nullptr;
005987c2      int32_t eax_1;
005987c2      
005987c2      if (_spell == 0)
005987d2          eax_1 = 0;
005987c2      else
005987cd          eax_1 = _spell->vtable->Pack(&this_1, 0);
005987cd      
005987dd      if (arg3 >= (eax_1 + 4))
005987dd      {
005987e9          **(uint32_t**)arg2 = this->_sp_type;
005987eb          *(uint32_t*)arg2 += 4;
005987ee          class Spell* _spell_1 = this->_spell;
005987ee          
005987f4          if (_spell_1 != 0)
005987f6              _spell_1->vtable->Pack(arg2, arg3);
005987dd      }
005987dd      
00598802      return (eax_1 + 4);
005987b0  }

00598805                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00598810  int32_t __thiscall MetaSpell::UnPack(class MetaSpell* this, void** arg2, uint32_t arg3)

00598810  {
0059881b      if (arg3 < 4)
00598821          return 0;
00598821      
00598824      class Spell* _spell = this->_spell;
00598824      
00598829      if (_spell != 0)
00598829      {
0059882b          _spell->vtable->__vecDelDtor(1);
00598831          this->_spell = nullptr;
00598829      }
00598829      
00598838      this->_sp_type = Undef_SpellType;
00598848      this->_sp_type = **(uint32_t**)arg2;
0059884b      *(uint32_t*)arg2 += 4;
00598852      class Spell* result = Spell::BuildSpell(this->_sp_type);
0059885c      this->_spell = result;
0059885c      
0059885f      if (result != 0)
00598876          return result->vtable->UnPack(arg2, (arg3 - 4));
00598876      
00598864      return result;
00598810  }

00598879                                                                             90 90 90 90 90 90 90                           .......

00598880  void __fastcall Spell::Spell(class Spell* this)

00598880  {
00598882      this->vtable = 0x7e49a0;
00598888      this->_spell_id = 0;
00598880  }


00598890  double Spell::InqDuration(class Spell const* this @ ecx) __pure

00598890  {
00598896      return ((int64_t)((long double)-1.0));
00598890  }

00598897                                                                       90 90 90 90 90 90 90 90 90                         .........

005988a0  uint32_t __thiscall Spell::Pack(class Spell* this, void** arg2, uint32_t arg3)

005988a0  {
005988a5      int32_t result = this->vtable->pack_size();
005988a5      
005988ac      if (arg3 >= result)
005988ac      {
005988b7          **(uint32_t**)arg2 = this->_spell_id;
005988b9          *(uint32_t*)arg2 += 4;
005988ac      }
005988ac      
005988bd      return result;
005988a0  }


005988c0  int32_t __thiscall Spell::UnPack(class Spell* this, void** arg2, uint32_t arg3)

005988c0  {
005988cc      if (arg3 < this->vtable->pack_size())
005988d1          return 0;
005988d1      
005988dc      this->_spell_id = **(uint32_t**)arg2;
005988df      *(uint32_t*)arg2 += 4;
005988e8      return 1;
005988c0  }

005988eb                                   90 90 90 90 90                                                             .....

005988f0  void __fastcall MetaSpell::~MetaSpell(class MetaSpell* this)

005988f0  {
005988f3      class Spell* _spell = this->_spell;
005988f8      this->vtable = 0x7e4988;
005988f8      
005988fe      if (_spell != 0)
005988fe      {
00598900          _spell->vtable->__vecDelDtor(1);
00598906          this->_spell = nullptr;
005988fe      }
005988fe      
0059890d      this->_sp_type = Undef_SpellType;
00598914      this->vtable = 0x79285c;
005988f0  }

0059891c                                                                                      90 90 90 90                              ....

00598920  class MetaSpell& __thiscall MetaSpell::operator=(class MetaSpell* this, class MetaSpell const& arg2)

00598920  {
00598923      class Spell* _spell = this->_spell;
00598923      
00598929      if (_spell != 0)
00598929      {
0059892b          _spell->vtable->__vecDelDtor(1);
00598931          this->_spell = nullptr;
00598929      }
00598929      
0059893c      this->_sp_type = Undef_SpellType;
00598943      enum SpellType _sp_type = arg2->_sp_type;
00598948      this->_sp_type = _sp_type;
00598948      
0059894b      if (_sp_type == Undef_SpellType)
0059894b      {
0059896d          this->_spell = nullptr;
00598977          return this;
0059894b      }
0059894b      
0059894e      class Spell* eax_2 = Spell::BuildSpell(_sp_type);
00598953      this->_spell = eax_2;
00598959      eax_2->vtable->SetEqual(eax_2, arg2->_spell);
00598969      return this;
00598920  }

0059897a                                                                                90 90 90 90 90 90                            ......

00598980  void* __thiscall MetaSpell::`scalar deleting destructor'(class MetaSpell* this, uint32_t arg2)

00598980  {
00598983      class Spell* _spell = this->_spell;
00598988      this->vtable = 0x7e4988;
00598988      
0059898e      if (_spell != 0)
0059898e      {
00598990          _spell->vtable->__vecDelDtor(1);
00598996          this->_spell = nullptr;
0059898e      }
0059898e      
005989a2      this->_sp_type = Undef_SpellType;
005989a9      this->vtable = 0x79285c;
005989a9      
005989af      if ((arg2 & 1) != 0)
005989b2          operator delete(this);
005989b2      
005989bd      return this;
00598980  }


005989c0  uint32_t ProjectileLifeSpell::pack_size(class ProjectileLifeSpell* this @ ecx)

005989c0  {
005989c0      /* tailcall */
005989c0      return FileNodeName_Float::GetType(this);
005989c0  }

005989c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005989d0  uint32_t __thiscall ProjectileSpell::Pack(class ProjectileSpell* this, void** arg2, uint32_t arg3)

005989d0  {
005989d6      int32_t result = this->vtable->pack_size();
005989d6      
005989e1      if (arg3 >= result)
005989eb          Spell::Pack(this, arg2, arg3);
005989eb      
005989f4      return result;
005989d0  }

005989f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00598a00  int32_t __thiscall DispelSpell::UnPack(class DispelSpell* this, void** arg2, uint32_t arg3)

00598a00  {
00598a0e      if (arg3 < this->vtable->pack_size())
00598a13          return 0;
00598a13      
00598a1e      int32_t eax_3 = Spell::UnPack(this, arg2, arg3);
00598a23      int32_t eax_4 = -(eax_3);
00598a2a      return -((eax_4 - eax_4));
00598a00  }

00598a2d                                         90 90 90                                                               ...

00598a30  void __fastcall DispelSpell::DispelSpell(class DispelSpell* this)

00598a30  {
00598a33      Spell::Spell(this);
00598a38      this->vtable = 0x7e49f8;
00598a30  }

00598a42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00598a50  void __stdcall DispelSpell::SetEqual(class DispelSpell* this @ ecx, class Spell const* arg2, class Spell const* arg3)

00598a50  {
00598a59      Spell::operator=(arg2, arg3);
00598a50  }

00598a61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00598a70  void __fastcall FellowshipDispelSpell::FellowshipDispelSpell(class FellowshipDispelSpell* this)

00598a70  {
00598a73      Spell::Spell(this);
00598a78      this->vtable = 0x7e4a48;
00598a70  }

00598a82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00598a90  int32_t __thiscall ProjectileSpell::UnPack(class ProjectileSpell* this, void** arg2, uint32_t arg3)

00598a90  {
00598a9e      if (arg3 < this->vtable->pack_size())
00598aa3          return 0;
00598aa3      
00598aac      void* ebx = *(uint32_t*)arg2;
00598ab2      int32_t result = Spell::UnPack(this, arg2, arg3);
00598ab2      
00598ab9      if (result != 0)
00598acb          return 1;
00598acb      
00598abb      *(uint32_t*)arg2 = ebx;
00598ac0      return result;
00598a90  }

00598ace                                            90 90                                                                ..

00598ad0  void __fastcall PortalLinkSpell::PortalLinkSpell(class PortalLinkSpell* this)

00598ad0  {
00598ad3      Spell::Spell(this);
00598ad8      this->vtable = 0x7e4e00;
00598ad0  }

00598ae2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00598af0  void __fastcall FellowshipPortalSendingSpell::FellowshipPortalSendingSpell(class FellowshipPortalSendingSpell* this)

00598af0  {
00598af3      Spell::Spell(this);
00598af8      this->vtable = 0x7e4ad8;
00598af0  }

00598b02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00598b10  class EnchantmentSpell& __thiscall EnchantmentSpell::operator=(class EnchantmentSpell* this, class EnchantmentSpell const& arg2)

00598b10  {
00598b19      Spell::operator=(this, arg2);
00598b21      this->_duration = arg2->_duration;
00598b27      *(uint32_t*)((char*)this->_duration)[4] = *(uint32_t*)((char*)arg2->_duration)[4];
00598b2d      this->_degrade_modifier = arg2->_degrade_modifier;
00598b33      this->_degrade_limit = arg2->_degrade_limit;
00598b39      this->_etype = arg2->_etype;
00598b3f      this->_uImbuedEffect = arg2->_uImbuedEffect;
00598b45      this->_SlayerCreatureType = arg2->_SlayerCreatureType;
00598b4b      this->_SlayerDamageBonus = arg2->_SlayerDamageBonus;
00598b51      this->_critical_frequency = arg2->_critical_frequency;
00598b57      *(uint32_t*)((char*)this->_critical_frequency)[4] = *(uint32_t*)((char*)arg2->_critical_frequency)[4];
00598b5d      this->_critical_multiplier = arg2->_critical_multiplier;
00598b63      *(uint32_t*)((char*)this->_critical_multiplier)[4] = *(uint32_t*)((char*)arg2->_critical_multiplier)[4];
00598b69      this->_ignore_magic_resist = arg2->_ignore_magic_resist;
00598b6f      this->_resistanceModifier = arg2->_resistanceModifier;
00598b75      *(uint32_t*)((char*)this->_resistanceModifier)[4] = *(uint32_t*)((char*)arg2->_resistanceModifier)[4];
00598b7b      this->_ElementalModifier = arg2->_ElementalModifier;
00598b81      *(uint32_t*)((char*)this->_ElementalModifier)[4] = *(uint32_t*)((char*)arg2->_ElementalModifier)[4];
00598b87      this->_weapon_is_loot = arg2->_weapon_is_loot;
00598b8d      this->_damage_over_time = arg2->_damage_over_time;
00598b94      return this;
00598b10  }

00598b97                                                                       90 90 90 90 90 90 90 90 90                         .........

00598ba0  int32_t __thiscall EnchantmentSpell::BuildEnchantment(class EnchantmentSpell const* this, class Enchantment* arg2)

00598ba0  {
00598ba7      arg2->_id = 0;
00598bb3      arg2->_id |= this->_spell_id;
00598bb9      arg2->_degrade_modifier = ((float)((long double)this->_degrade_modifier));
00598bc0      arg2->_degrade_limit = ((float)((long double)this->_degrade_limit));
00598bc6      arg2->_duration = ((double)((long double)this->_duration));
00598bce      return 1;
00598ba0  }

00598bd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00598be0  uint32_t __fastcall EnchantmentSpell::pack_size(class EnchantmentSpell* this)

00598be0  {
00598be0      FileNodeName_Float::GetType(this);
00598be8      return 0x14;
00598be0  }

00598be9                             90 90 90 90 90 90 90                                                           .......

00598bf0  void __fastcall EnchantmentSpell::EnchantmentSpell(class EnchantmentSpell* this)

00598bf0  {
00598bf3      Spell::Spell(this);
00598c09      this->_duration = 0f;
00598c0c      this->vtable = 0x7e4b38;
00598c12      *(uint32_t*)((char*)this->_duration)[4] = 0xbff00000;
00598c15      this->_degrade_modifier = 0f;
00598c1c      this->_degrade_limit = -666f;
00598bf0  }

00598c23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00598c30  double __fastcall EnchantmentSpell::InqDuration(class EnchantmentSpell const* this)

00598c30  {
00598c33      return ((int64_t)((long double)this->_duration));
00598c30  }

00598c34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00598c40  int32_t __thiscall EnchantmentSpell::SetDuration(class EnchantmentSpell* this, double const arg2)

00598c40  {
00598c48      this->_duration = arg2;
00598c4b      *(uint32_t*)((char*)this->_duration)[4] = *(uint32_t*)((char*)arg2)[4];
00598c53      return 1;
00598c40  }

00598c56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00598c60  void __stdcall EnchantmentSpell::SetEqual(class EnchantmentSpell* this @ ecx, class Spell const* arg2, class Spell const* arg3)

00598c60  {
00598c69      EnchantmentSpell::operator=(arg2, arg3);
00598c60  }

00598c71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00598c80  uint32_t __thiscall EnchantmentSpell::Pack(class EnchantmentSpell* this, void** arg2, uint32_t arg3)

00598c80  {
00598c86      int32_t result = this->vtable->pack_size();
00598c86      
00598c91      if (arg3 >= result)
00598c91      {
00598c9c          Spell::Pack(this, arg2, arg3);
00598ca6          **(uint64_t**)arg2 = ((double)((long double)this->_duration));
00598caa          void* edx_2 = (*(uint32_t*)arg2 + 8);
00598cad          *(uint32_t*)arg2 = edx_2;
00598cb4          *(uint32_t*)edx_2 = ((float)((long double)this->_degrade_modifier));
00598cb8          void* ecx_3 = (*(uint32_t*)arg2 + 4);
00598cbb          *(uint32_t*)arg2 = ecx_3;
00598cc2          *(uint32_t*)ecx_3 = ((float)((long double)this->_degrade_limit));
00598cc4          *(uint32_t*)arg2 += 4;
00598c91      }
00598c91      
00598ccc      return result;
00598c80  }

00598ccf                                               90                                                                 .

00598cd0  int32_t __thiscall EnchantmentSpell::UnPack(class EnchantmentSpell* this, void** arg2, uint32_t arg3)

00598cd0  {
00598ce4      this->_duration = 0f;
00598ce7      struct EnchantmentSpell::VTable* vtable = this->vtable;
00598ce9      *(uint32_t*)((char*)this->_duration)[4] = 0xbff00000;
00598cee      this->_degrade_modifier = 0f;
00598cf5      this->_degrade_limit = -666f;
00598cf5      
00598d01      if (arg3 < vtable->pack_size())
00598d06          return 0;
00598d06      
00598d0f      void* ebx = *(uint32_t*)arg2;
00598d15      int32_t result = Spell::UnPack(this, arg2, arg3);
00598d15      
00598d1c      if (result == 0)
00598d1c      {
00598d1e          *(uint32_t*)arg2 = ebx;
00598d23          return result;
00598d1c      }
00598d1c      
00598d26      void* ecx_3 = *(uint32_t*)arg2;
00598d2a      this->_duration = *(uint32_t*)ecx_3;
00598d30      *(uint32_t*)((char*)this->_duration)[4] = *(uint32_t*)((char*)ecx_3 + 4);
00598d35      void* edx_2 = (*(uint32_t*)arg2 + 8);
00598d38      *(uint32_t*)arg2 = edx_2;
00598d3e      this->_degrade_modifier = *(uint32_t*)edx_2;
00598d43      float* ecx_6 = (*(uint32_t*)arg2 + 4);
00598d46      *(uint32_t*)arg2 = ecx_6;
00598d4c      this->_degrade_limit = *(uint32_t*)ecx_6;
00598d4f      *(uint32_t*)arg2 += 4;
00598d5a      return 1;
00598cd0  }

00598d5d                                                                                         90 90 90                               ...

00598d60  void __fastcall FellowshipEnchantmentSpell::FellowshipEnchantmentSpell(class FellowshipEnchantmentSpell* this)

00598d60  {
00598d63      Spell::Spell(this);
00598d79      this->_duration = 0f;
00598d7c      *(uint32_t*)((char*)this->_duration)[4] = 0xbff00000;
00598d7f      this->_degrade_modifier = 0f;
00598d86      this->_degrade_limit = -666f;
00598d89      this->vtable = 0x7e4b88;
00598d60  }

00598d93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00598da0  void __fastcall BoostSpell::BoostSpell(class BoostSpell* this)

00598da0  {
00598da3      Spell::Spell(this);
00598da8      this->vtable = 0x7e4be0;
00598da0  }

00598db2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00598dc0  void __fastcall FellowshipBoostSpell::FellowshipBoostSpell(class FellowshipBoostSpell* this)

00598dc0  {
00598dc3      Spell::Spell(this);
00598dc8      this->vtable = 0x7e4c38;
00598dc0  }

00598dd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00598de0  uint32_t __thiscall ProjectileEnchantmentSpell::Pack(class ProjectileEnchantmentSpell* this, void** arg2, uint32_t arg3)

00598de0  {
00598de7      int32_t result = this->vtable->pack_size();
00598de7      
00598df2      if ((arg3 >= result && arg3 >= this->vtable->pack_size()))
00598e07          Spell::Pack(this, arg2, arg3);
00598e07      
00598e11      return result;
00598de0  }

00598e14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00598e20  void __stdcall ProjectileLifeSpell::SetEqual(class ProjectileLifeSpell* this @ ecx, class Spell const* arg2, class Spell const* arg3)

00598e20  {
00598e2b      *(int32_t*)((char*)arg2->vtable + 0x54)(arg3);
00598e20  }

00598e31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00598e40  int32_t __thiscall ProjectileLifeSpell::UnPack(class ProjectileLifeSpell* this, void** arg2, uint32_t arg3)

00598e40  {
00598e49      uint32_t ebx = arg3;
00598e49      
00598e4f      if (ebx < this->vtable->pack_size())
00598e55          return 0;
00598e55      
00598e62      arg3 = *(uint32_t*)arg2;
00598e62      
00598e6d      if (ebx >= this->vtable->pack_size())
00598e6d      {
00598e6f          void* ebp_1 = *(uint32_t*)arg2;
00598e6f          
00598e7c          if (Spell::UnPack(this, arg2, ebx) != 0)
00598e98              return 1;
00598e98          
00598e7e          *(uint32_t*)arg2 = ebp_1;
00598e6d      }
00598e6d      
00598e84      *(uint32_t*)arg2 = arg3;
00598e8c      return 0;
00598e40  }

00598e9b                                                                                   90 90 90 90 90                             .....

00598ea0  int32_t __thiscall ProjectileEnchantmentSpell::BuildEnchantment(class ProjectileEnchantmentSpell const* this, class Enchantment* arg2)

00598ea0  {
00598ea7      arg2->_id = 0;
00598ead      arg2->_id |= this->_spell_id;
00598eb5      return 1;
00598ea0  }

00598eb8                                                                          90 90 90 90 90 90 90 90                          ........

00598ec0  void __fastcall ProjectileSpell::ProjectileSpell(class ProjectileSpell* this)

00598ec0  {
00598ec3      Spell::Spell(this);
00598ec8      this->vtable = 0x7e4c98;
00598ec0  }

00598ed2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00598ee0  void __fastcall ProjectileLifeSpell::ProjectileLifeSpell(class ProjectileLifeSpell* this)

00598ee0  {
00598ee3      Spell::Spell(this);
00598ee8      this->vtable = 0x7e4cf0;
00598ee0  }

00598ef2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00598f00  void __fastcall ProjectileEnchantmentSpell::ProjectileEnchantmentSpell(class ProjectileEnchantmentSpell* this)

00598f00  {
00598f03      Spell::Spell(this);
00598f08      this->vtable = 0x7e4d48;
00598f00  }

00598f12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00598f20  uint32_t __fastcall PortalSummonSpell::pack_size(class PortalSummonSpell* this)

00598f20  {
00598f20      FileNodeName_Float::GetType(this);
00598f28      return 0xc;
00598f20  }

00598f29                             90 90 90 90 90 90 90                                                           .......

00598f30  void __fastcall PortalSummonSpell::PortalSummonSpell(class PortalSummonSpell* this)

00598f30  {
00598f33      Spell::Spell(this);
00598f43      this->_portal_lifetime = 0f;
00598f46      this->vtable = 0x7e4da8;
00598f4c      *(uint32_t*)((char*)this->_portal_lifetime)[4] = 0xbff00000;
00598f30  }

00598f53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00598f60  void __stdcall PortalSummonSpell::SetEqual(class PortalSummonSpell* this @ ecx, class Spell const* arg2, class Spell const* arg3)

00598f60  {
00598f70      if ((arg2 != 0 && arg3 != 0))
00598f70      {
00598f75          Spell::operator=(arg2, arg3);
00598f7d          *(int32_t*)((char*)arg2 + 8) = *(int32_t*)((char*)arg3 + 8);
00598f83          *(int32_t*)((char*)arg2 + 0xc) = *(int32_t*)((char*)arg3 + 0xc);
00598f70      }
00598f60  }

00598f8b                                   90 90 90 90 90                                                             .....

00598f90  uint32_t __thiscall PortalSummonSpell::Pack(class PortalSummonSpell* this, void** arg2, uint32_t arg3)

00598f90  {
00598f96      int32_t result = this->vtable->pack_size();
00598f96      
00598fa1      if (arg3 >= result)
00598fa1      {
00598fac          Spell::Pack(this, arg2, arg3);
00598fb6          **(uint64_t**)arg2 = ((double)((long double)this->_portal_lifetime));
00598fb8          *(uint32_t*)arg2 += 8;
00598fa1      }
00598fa1      
00598fc0      return result;
00598f90  }

00598fc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00598fd0  int32_t __thiscall PortalSummonSpell::UnPack(class PortalSummonSpell* this, void** arg2, uint32_t arg3)

00598fd0  {
00598fde      if (arg3 < this->vtable->pack_size())
00598fe3          return 0;
00598fe3      
00598fec      void* ebx = *(uint32_t*)arg2;
00598ff2      int32_t result = Spell::UnPack(this, arg2, arg3);
00598ff2      
00598ff9      if (result == 0)
00598ff9      {
00598ffb          *(uint32_t*)arg2 = ebx;
00599000          return result;
00598ff9      }
00598ff9      
00599003      void* ecx_2 = *(uint32_t*)arg2;
00599007      this->_portal_lifetime = *(uint32_t*)ecx_2;
0059900d      *(uint32_t*)((char*)this->_portal_lifetime)[4] = *(uint32_t*)((char*)ecx_2 + 4);
00599010      *(uint32_t*)arg2 += 8;
0059901b      return 1;
00598fd0  }

0059901e                                                                                            90 90                                ..

00599020  void __stdcall PortalLinkSpell::SetEqual(class PortalLinkSpell* this @ ecx, class Spell const* arg2, class Spell const* arg3)

00599020  {
0059902e      if ((arg2 != 0 && arg3 != 0))
00599031          Spell::operator=(arg2, arg3);
00599020  }

00599039                                                                             90 90 90 90 90 90 90                           .......

00599040  void __stdcall ProjectileSpell::SetEqual(class ProjectileSpell* this @ ecx, class Spell const* arg2, class Spell const* arg3)

00599040  {
0059904b      *(int32_t*)((char*)arg2->vtable + 0x50)(arg3);
00599040  }

00599051                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00599060  class ProjectileSpell& __thiscall ProjectileSpell::operator=(class ProjectileSpell* this, class ProjectileSpell const& arg2)

00599060  {
00599068      Spell::operator=(this, arg2);
00599070      return this;
00599060  }

00599073                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00599080  void __fastcall TransferSpell::TransferSpell(class TransferSpell* this)

00599080  {
00599083      Spell::Spell(this);
00599088      this->vtable = 0x7e4e60;
00599080  }

00599092                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005990a0  void __fastcall CAllegianceData::CAllegianceData(class CAllegianceData* this)

005990a0  {
005990a3      AllegianceData::AllegianceData(this);
005990a8      this->vtable = 0x7e4eb4;
005990a0  }

005990b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005990c0  void* __thiscall CAllegianceData::`scalar deleting destructor'(class CAllegianceData* this, uint32_t arg2)

005990c0  {
005990c3      AllegianceData::~AllegianceData(this);
005990c3      
005990cd      if ((arg2 & 1) != 0)
005990d0          operator delete(this);
005990d0      
005990db      return this;
005990c0  }

005990de                                                                                            90 90                                ..

005990e0  void __fastcall CAllegianceProfile::CAllegianceProfile(class CAllegianceProfile* this)

005990e0  {
005990e3      AllegianceProfile::AllegianceProfile(this);
005990e8      this->vtable = 0x7e4f00;
005990e0  }

005990f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00599100  void* __thiscall CAllegianceProfile::`scalar deleting destructor'(class CAllegianceProfile* this, uint32_t arg2)

00599100  {
00599103      AllegianceProfile::~AllegianceProfile(this);
00599103      
0059910d      if ((arg2 & 1) != 0)
00599110          operator delete(this);
00599110      
0059911b      return this;
00599100  }

0059911e                                                                                            90 90                                ..

00599120  class CContractTracker& __thiscall CContractTracker::operator=(class CContractTracker* this, class CContractTracker const& arg2)

00599120  {
00599129      this->_version = arg2->_version;
0059912f      this->_contract_id = arg2->_contract_id;
00599135      this->_contract_stage = arg2->_contract_stage;
0059913b      this->_time_when_done = arg2->_time_when_done;
00599141      *(uint32_t*)((char*)this->_time_when_done)[4] = *(uint32_t*)((char*)arg2->_time_when_done)[4];
00599147      this->_time_when_repeats = arg2->_time_when_repeats;
0059914d      *(uint32_t*)((char*)this->_time_when_repeats)[4] = *(uint32_t*)((char*)arg2->_time_when_repeats)[4];
00599153      this->_time_of_server_update = arg2->_time_of_server_update;
00599159      *(uint32_t*)((char*)this->_time_of_server_update)[4] = *(uint32_t*)((char*)arg2->_time_of_server_update)[4];
0059915c      return this;
00599120  }

0059915f                                                                                               90                                 .

00599160  void __fastcall CContractTracker::CContractTracker(class CContractTracker* this)

00599160  {
00599164      this->vtable = 0x7e4f4c;
0059916a      __builtin_memset(&this->_version, 0, 0x24);
00599160  }

00599186                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00599190  void __thiscall CContractTracker::CContractTracker(class CContractTracker* this, class CContractTracker const* arg2)

00599190  {
00599196      this->vtable = 0x7e4f4c;
0059919f      this->_version = arg2->_version;
005991a5      this->_contract_id = arg2->_contract_id;
005991ab      this->_contract_stage = arg2->_contract_stage;
005991b1      this->_time_when_done = arg2->_time_when_done;
005991b7      *(uint32_t*)((char*)this->_time_when_done)[4] = *(uint32_t*)((char*)arg2->_time_when_done)[4];
005991bd      this->_time_when_repeats = arg2->_time_when_repeats;
005991c3      *(uint32_t*)((char*)this->_time_when_repeats)[4] = *(uint32_t*)((char*)arg2->_time_when_repeats)[4];
005991c9      this->_time_of_server_update = arg2->_time_of_server_update;
005991cf      *(uint32_t*)((char*)this->_time_of_server_update)[4] = *(uint32_t*)((char*)arg2->_time_of_server_update)[4];
00599190  }

005991d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005991e0  uint32_t __thiscall CContractTracker::Pack(class CContractTracker* this, void** arg2, uint32_t arg3)

005991e0  {
005991e5      if (arg3 >= 0x1c)
005991e5      {
005991ed          **(uint32_t**)arg2 = 0;
005991f6          void* esi_2 = (*(uint32_t*)arg2 + 4);
005991f9          *(uint32_t*)arg2 = esi_2;
00599200          *(uint32_t*)esi_2 = this->_contract_id;
00599204          void* edx_4 = (*(uint32_t*)arg2 + 4);
00599207          *(uint32_t*)arg2 = edx_4;
0059920c          *(uint32_t*)edx_4 = this->_contract_stage;
00599210          void* esi_6 = (*(uint32_t*)arg2 + 4);
00599213          *(uint32_t*)arg2 = esi_6;
0059921a          *(uint64_t*)esi_6 = ((double)((long double)this->_time_when_done));
0059921e          void* edx_7 = (*(uint32_t*)arg2 + 8);
00599221          *(uint32_t*)arg2 = edx_7;
00599226          *(uint64_t*)edx_7 = ((double)((long double)this->_time_when_repeats));
00599228          *(uint32_t*)arg2 += 8;
005991e5      }
005991e5      
00599231      return 0x1c;
005991e0  }

00599234                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00599240  int32_t __thiscall CContractTracker::UnPack(class CContractTracker* this, void** arg2, uint32_t arg3)

00599240  {
00599245      if (arg3 < 0x1c)
00599249          return 0;
00599249      
00599254      this->_version = **(uint32_t**)arg2;
0059925a      void* esi_1 = (*(uint32_t*)arg2 + 4);
0059925d      *(uint32_t*)arg2 = esi_1;
00599263      this->_contract_id = *(uint32_t*)esi_1;
00599268      void* edx_5 = (*(uint32_t*)arg2 + 4);
0059926b      *(uint32_t*)arg2 = edx_5;
0059926f      this->_contract_stage = *(uint32_t*)edx_5;
00599274      void* esi_3 = (*(uint32_t*)arg2 + 4);
00599277      *(uint32_t*)arg2 = esi_3;
0059927d      this->_time_when_done = *(uint32_t*)esi_3;
00599283      *(uint32_t*)((char*)this->_time_when_done)[4] = *(uint32_t*)((char*)esi_3 + 4);
00599288      void* edx_10 = (*(uint32_t*)arg2 + 8);
0059928b      *(uint32_t*)arg2 = edx_10;
0059928f      this->_time_when_repeats = *(uint32_t*)edx_10;
00599295      *(uint32_t*)((char*)this->_time_when_repeats)[4] = *(uint32_t*)((char*)edx_10 + 4);
00599298      *(uint32_t*)arg2 += 8;
005992a1      return 1;
00599240  }

005992a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005992b0  void __fastcall CContractTrackerTable::CContractTrackerTable(class CContractTrackerTable* this)

005992b0  {
005992b6      this->vtable = 0x7cc8f0;
005992b3      this->_contractTrackerHash.vtable = 0x7a6930;
005992b3      this->_contractTrackerHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
005992b3      this->_contractTrackerHash._buckets = nullptr;
005992b3      this->_contractTrackerHash._table_size = 0x20;
005992b3      this->_contractTrackerHash._currNum = 0;
005992d4      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_contractTrackerHash);
005992b0  }

005992dd                                                                                         90 90 90                               ...

005992e0  void __fastcall QuestDef::~QuestDef(class QuestDef* this)

005992e0  {
005992e4      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_fullname.m_buffer;
005992e4      
005992f7      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005992f9          m_buffer->vtable->__vecDelDtor(1);
005992f9      
00599301      this->vtable = 0x79285c;
005992e0  }

0059930a                                90 90 90 90 90 90                                                            ......

00599310  void __fastcall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::EmptyContents(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this)

00599310  {
00599318      class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this_1 = this;
00599318      
0059931c      if (this->_buckets != 0)
0059931c      {
00599325          int32_t i = 0;
00599329          int32_t i_1 = 0;
00599329          
0059932d          if (this->_table_size > 0)
0059932d          {
00599333              int32_t* j;
00599333              int32_t* j_1 = j;
00599333              
005993b6              do
005993b6              {
00599343                  int32_t* j_2 = this->_buckets[i];
00599343                  
00599348                  if (j_2 != 0)
00599348                  {
00599398                      do
00599398                      {
00599350                          int32_t* edi_1 = j_2[2];
00599353                          j = j_2[5];
00599353                          
00599362                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
0059936a                              **(uint32_t**)edi_1(1);
0059936a                          
0059936c                          j_2[1] = 0x79285c;
00599373                          int32_t* edi_2 = *(uint32_t*)j_2;
00599373                          
00599381                          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
00599389                              **(uint32_t**)edi_2(1);
00599389                          
0059938c                          operator delete(j_2);
00599396                          j_2 = j;
00599398                      } while (j != 0);
00599398                      
0059939a                      i = i_1;
0059939e                      this = this_1;
00599348                  }
00599348                  
005993a2                  this->_buckets[i] = 0;
005993af                  i += 1;
005993b2                  i_1 = i;
005993b6              } while (i < this->_table_size);
0059932d          }
0059931c      }
0059931c      
005993bc      this->_currNum = 0;
00599310  }

005993c7                       90 90 90 90 90 90 90 90 90                                                         .........

005993d0  void __fastcall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::~PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this)

005993d0  {
005993d3      this->vtable = 0x7e4f98;
005993d9      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::EmptyContents(this);
005993de      class PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>** _buckets = this->_buckets;
005993de      
005993e3      if (_buckets != 0)
005993e3      {
005993e6          operator delete[](_buckets);
005993ee          this->_buckets = nullptr;
005993e3      }
005993e3      
005993f5      this->_table_size = 0;
005993fc      this->vtable = 0x79285c;
005993d0  }

00599404              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00599410  uint32_t __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::Pack(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this, void** arg2, uint32_t arg3)

00599410  {
00599410      class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this_1 = this;
00599415      uint32_t result = PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::pack_size(this);
0059941a      uint32_t ebx = arg3;
00599420      uint32_t result_1 = result;
00599420      
00599424      if (ebx >= result)
00599424      {
00599439          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
0059943b          *(uint32_t*)arg2 += 4;
00599441          uint32_t i = 0;
00599445          arg3 = 0;
00599445          
00599449          if (this->_table_size > 0)
00599449          {
0059948d              do
0059948d              {
00599453                  class AC1Legacy::PStringBase<char>* j = this->_buckets[i];
00599453                  
00599458                  if (j != 0)
00599458                  {
00599479                      do
00599479                      {
00599464                          AC1Legacy::PStringBase<char>::Pack(j, arg2, ebx);
00599471                          *(uint32_t*)(*(int32_t*)((char*)j + 4) + 0xc)(arg2, ebx);
00599474                          j = *(int32_t*)((char*)j + 0x14);
00599479                      } while (j != 0);
00599479                      
0059947b                      result = result_1;
0059947f                      i = arg3;
00599458                  }
00599458                  
00599486                  i += 1;
00599489                  arg3 = i;
0059948d              } while (i < this->_table_size);
00599449          }
00599424      }
00599424      
00599494      return result;
00599410  }

0059944d                                         8d 49 00                                                               .I.
00599497                                                                       90 90 90 90 90 90 90 90 90                         .........

005994a0  uint32_t __fastcall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::pack_size(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this)

005994a0  {
005994a0      class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this_1 = this;
005994a8      int32_t i = 0;
005994aa      bool cond:0 = this->_table_size <= 0;
005994ad      int32_t result = 4;
005994b2      this_1 = nullptr;
005994b2      
005994b6      if (!(cond:0))
005994b6      {
005994ff          do
005994ff          {
005994c3              class AC1Legacy::PStringBase<char>* j = this->_buckets[i];
005994c3              
005994c8              while (j != 0)
005994c8              {
005994d9                  uint32_t eax_2 = AC1Legacy::PStringBase<char>::Pack(j, &this_1, 0);
005994ed                  int32_t eax_3 = *(uint32_t*)(*(int32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
005994f0                  j = *(int32_t*)((char*)j + 0x14);
005994f3                  result = ((result + eax_2) + eax_3);
005994c8              }
005994c8              
005994fc              i += 1;
005994ff          } while (i < this->_table_size);
005994b6      }
005994b6      
00599508      return result;
005994a0  }

00599509                             90 90 90 90 90 90 90                                                           .......

00599510  int32_t __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::UnPack(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this, void** arg2, uint32_t arg3)

00599510  {
00599514      uint32_t ebx = arg3;
00599514      
0059951e      if (ebx < 4)
00599527          return 0;
00599527      
0059952c      void** edi = arg2;
00599530      void* eax_1 = *(uint32_t*)edi;
0059953c      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::EmptyContents(this);
00599541      class PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>** _buckets = this->_buckets;
00599541      
00599548      if (_buckets != 0)
00599548      {
0059954b          operator delete[](_buckets);
00599553          this->_buckets = nullptr;
00599548      }
00599548      
00599556      this->_table_size = 0;
00599559      void* ecx_1 = *(uint32_t*)edi;
0059955b      int32_t eax_2 = *(uint32_t*)ecx_1;
00599560      *(uint32_t*)edi = ((char*)ecx_1 + 4);
00599564      uint32_t ecx_4 = (eax_2 >> 0x10);
00599567      int32_t eax_3 = (eax_2 & 0xffff);
00599571      this->_table_size = ecx_4;
00599571      
00599576      if (ecx_4 == 0)
00599576      {
0059957f          int32_t result;
0059957f          result = eax_3 == 0;
00599586          return result;
00599576      }
00599576      
0059959b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
0059959b      {
005995b4          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3);
005995bd          int32_t var_10;
005995bd          QuestDef::QuestDef(&var_10);
005995c4          arg2 = nullptr;
005995cc          int32_t* ecx_11;
005995cc          
005995cc          if (eax_3 <= 0)
005995cc          {
00599627          label_599627:
00599627              ecx_11 = &var_10;
00599627              
0059962b              if (ebx >= (*(uint32_t*)edi - eax_1))
0059962b              {
0059962d                  QuestDef::~QuestDef(ecx_11);
00599636                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
00599647                  return 1;
0059962b              }
005995cc          }
005995cc          else
005995cc          {
005995d6              while (true)
005995d6              {
005995dd                  if (((AC1Legacy::PStringBase<char>::UnPack(&arg3, edi, (ebx - 4)) != 0 && *(uint32_t*)(var_10 + 0x10)(edi, (ebx - 4)) != 0) && (PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::add(this, &arg3, &var_10) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
005995dd                  {
00599611                      bool cond:5_1 = ((char*)arg2 + 1) < eax_3;
00599613                      arg2 += 1;
00599613                      
00599617                      if (!(cond:5_1))
00599617                          goto label_599627;
00599617                      
00599617                      continue;
005995dd                  }
005995dd                  
0059964a                  ecx_11 = &var_10;
0059964a                  break;
005995d6              }
005995cc          }
005995cc          
0059964e          QuestDef::~QuestDef(ecx_11);
00599657          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg3);
0059959b      }
0059959b      
00599665      return 0;
00599510  }

00599668                          90 90 90 90 90 90 90 90                                                          ........

00599670  int32_t __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::add(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this, class AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> > const* arg2, class QuestDef const* arg3)

00599670  {
00599680      if (PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::lookup(this, arg2) == 0)
00599680      {
00599684          void* eax_1 = operator new(0x1c);
00599684          
0059968e          if (eax_1 != 0)
0059968e          {
0059969c              void* eax_2 = PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>(eax_1, arg2, arg3, this->_table_size);
0059969c              
005996a3              if (eax_2 != 0)
005996a3              {
005996ac                  int32_t ecx_2 = *(uint32_t*)((char*)eax_2 + 0x18);
005996b5                  *(uint32_t*)((char*)eax_2 + 0x14) = this->_buckets[ecx_2];
005996b8                  this->_buckets[ecx_2] = eax_2;
005996be                  this->_currNum += 1;
005996c8                  return 1;
005996a3              }
0059968e          }
00599680      }
00599680      
005996a9      return 0;
00599670  }

005996cb                                   90 90 90 90 90                                                             .....

005996d0  void __thiscall PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>(class PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this, class AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> > const* arg2, class QuestDef const* arg3, int32_t arg4)

005996d0  {
005996d6      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
005996da      this->_key.m_buffer = m_buffer;
005996e0      InterlockedIncrement(&m_buffer->m_cRef);
005996ee      QuestDef::QuestDef(&this->_data, arg3);
005996f5      this->_next = nullptr;
0059970a      this->_hashVal = (COMBINE(0, AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >::case_insensitive_hash(arg2)) % arg4);
005996d0  }

00599711                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00599720  void __thiscall QuestDef::QuestDef(class QuestDef* this, class QuestDef const* arg2)

00599720  {
00599728      this->vtable = 0x7e4fac;
0059972e      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_fullname.m_buffer;
00599731      this->_fullname.m_buffer = m_buffer;
00599738      InterlockedIncrement(&m_buffer->m_cRef);
00599741      this->_mindelta = arg2->_mindelta;
00599748      this->_maxsolves = arg2->_maxsolves;
00599720  }

00599751                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00599760  void* __thiscall QuestDef::`scalar deleting destructor'(class QuestDef* this, uint32_t arg2)

00599760  {
00599764      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_fullname.m_buffer;
00599764      
00599777      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00599779          m_buffer->vtable->__vecDelDtor(1);
00599779      
00599786      this->vtable = 0x79285c;
00599786      
0059978c      if ((arg2 & 1) != 0)
0059978f          operator delete(this);
0059978f      
0059979b      return this;
00599760  }

0059979e                                                                                            90 90                                ..

005997a0  class QuestDef* __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::lookup(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef> const* this, class AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> > const* arg2)

005997a0  {
005997a5      uint32_t _table_size = this->_table_size;
005997a5      
005997b1      if ((_table_size != 0 && this->_buckets != 0))
005997b1      {
005997ca          for (class AC1Legacy::PStringBase<char>* i = this->_buckets[(COMBINE(0, AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >::case_insensitive_hash(arg2)) % _table_size)]; i != 0; i = *(int32_t*)((char*)i + 0x14))
005997ca          {
005997dc              if (AC1Legacy::PStringBase<char>::eq(arg2, i, 0) != 0)
005997f3                  return &i[1];
005997ca          }
005997b1      }
005997b1      
005997ea      return 0;
005997a0  }

005997f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00599800  void* __thiscall PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::`scalar deleting destructor'(class PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>* this, uint32_t arg2)

00599800  {
00599803      this->vtable = 0x7e4f98;
00599809      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::EmptyContents(this);
0059980e      class PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>** _buckets = this->_buckets;
0059980e      
00599813      if (_buckets != 0)
00599813      {
00599816          operator delete[](_buckets);
0059981e          this->_buckets = nullptr;
00599813      }
00599813      
0059982a      this->_table_size = 0;
00599831      this->vtable = 0x79285c;
00599831      
00599837      if ((arg2 & 1) != 0)
0059983a          operator delete(this);
0059983a      
00599845      return this;
00599800  }

00599848                          90 90 90 90 90 90 90 90                                                          ........

00599850  void __fastcall QuestDefDB::~QuestDefDB(class QuestDefDB* this)

00599850  {
00599854      this->_defs.vtable = 0x7e4f98;
0059985f      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::EmptyContents(&this->_defs);
00599864      class PackableHashData<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>** _buckets = this->_defs._buckets;
00599864      
00599869      if (_buckets != 0)
00599869      {
0059986c          operator delete[](_buckets);
00599854          this->_defs._buckets = nullptr;
00599869      }
00599869      
00599854      this->_defs._table_size = 0;
00599854      this->_defs.vtable = 0x79285c;
00599854      
0059988a      if (this != 0)
0059988a      {
0059988c          this->vtable = &PackObj::`vftable';
00599899          /* tailcall */
00599899          return DBObj::~DBObj(this);
0059988a      }
0059988a      
005998a3      *nullptr = 0x79285c;
005998aa      /* tailcall */
005998aa      return DBObj::~DBObj(this);
00599850  }

005998af                                               90                                                                 .

005998b0  void* __thiscall CQuestDefDB::`vector deleting destructor'(class CQuestDefDB* this, uint32_t arg2)

005998b0  {
005998b3      /* tailcall */
005998b3      return CQuestDefDB::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005998b0  }

005998b8                                                                          cc cc cc cc cc cc cc cc                          ........

005998c0  void __fastcall CQuestDefDB::CQuestDefDB(class CQuestDefDB* this)

005998c0  {
005998c9      QuestDefDB::QuestDefDB(this, INVALID_DID.id);
005998ce      this->vtable = 0x7e4fd8;
005998d4      this->vtable = &CQuestDefDB::`vftable';
005998c0  }

005998df                                                                                               90                                 .

005998e0  void* __thiscall CQuestDefDB::`scalar deleting destructor'(class CQuestDefDB* this, uint32_t arg2)

005998e0  {
005998e3      QuestDefDB::~QuestDefDB(this);
005998e3      
005998ed      if ((arg2 & 1) != 0)
005998f0          operator delete(this);
005998f0      
005998fb      return this;
005998e0  }

005998fe                                                                                            90 90                                ..

00599900  class DBObj* CQuestDefDB::Allocate(class CQuestDefDB const* this @ ecx)

00599900  {
00599900      /* tailcall */
00599900      return CQuestDefDB::Allocator();
00599900  }

00599905                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00599910  void* __thiscall PackableHashIterator<unsigned long,CContract>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,CContract>* this, uint32_t arg2)

00599910  {
00599918      this->vtable = 0x7e5068;
00599918      
0059991e      if ((arg2 & 1) != 0)
00599921          operator delete(this);
00599921      
0059992c      return this;
00599910  }

0059992f                                               90                                                                 .

00599930  class PackableHashIterator<unsigned long,CContract>* __thiscall PackableHashTable<unsigned long,CContract>::begin(class PackableHashTable<unsigned long,CContract> const* this, class PackableHashIterator<unsigned long,CContract>* __return)

00599930  {
00599930      uint32_t _table_size = this->_table_size;
00599934      int32_t eax = 0;
00599934      
00599939      if (_table_size > 0)
00599939      {
0059993b          class PackableHashData<unsigned long,CContract>** _buckets_1 = this->_buckets;
0059993e          class PackableHashData<unsigned long,CContract>** _buckets_2 = _buckets_1;
0059993e          
0059994b          do
0059994b          {
00599943              if (*(uint32_t*)_buckets_2 != 0)
00599943              {
0059996c                  int32_t ecx = _buckets_1[eax];
0059996f                  int32_t* __return_1 = __return;
00599973                  __return_1[2] = _buckets_1;
00599978                  __return_1[1] = ecx;
0059997b                  *(uint32_t*)__return_1 = 0x7e5068;
00599981                  __return_1[3] = _table_size;
00599984                  return __return_1;
00599943              }
00599943              
00599945              eax += 1;
00599946              _buckets_2 = &_buckets_2[1];
0059994b          } while (eax < _table_size);
00599939      }
00599939      
0059994d      class PackableHashData<unsigned long,CContract>** _buckets = this->_buckets;
00599956      __return->_current = nullptr;
0059995d      __return->_buckets = _buckets;
00599960      __return->vtable = 0x7e5068;
00599966      __return->_table_size = _table_size;
00599969      return __return;
00599930  }

00599987                       90 90 90 90 90 90 90 90 90                                                         .........

00599990  uint32_t __thiscall PackableHashTable<unsigned long,CContract>::Pack(class PackableHashTable<unsigned long,CContract>* this, void** arg2, uint32_t arg3)

00599990  {
00599990      class PackableHashTable<unsigned long,CContract>* this_1 = this;
00599995      uint32_t result = PackableHashTable<unsigned long,CContract>::pack_size(this);
0059999a      uint32_t ebx = arg3;
005999a0      uint32_t result_1 = result;
005999a0      
005999a4      if (ebx >= result)
005999a4      {
005999b9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005999bb          *(uint32_t*)arg2 += 4;
005999c1          uint32_t i = 0;
005999c5          arg3 = 0;
005999c5          
005999c9          if (this->_table_size > 0)
005999c9          {
00599a15              do
00599a15              {
005999d3                  int32_t* j = this->_buckets[i];
005999d3                  
005999d8                  if (j != 0)
005999d8                  {
00599a01                      do
00599a01                      {
005999e3                          if (ebx >= 4)
005999e3                          {
005999e9                              **(uint32_t**)arg2 = *(uint32_t*)j;
005999eb                              *(uint32_t*)arg2 += 4;
005999e3                          }
005999e3                          
005999f6                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
005999f9                          j = j[0x45];
00599a01                      } while (j != 0);
00599a01                      
00599a03                      result = result_1;
00599a07                      i = arg3;
005999d8                  }
005999d8                  
00599a0e                  i += 1;
00599a11                  arg3 = i;
00599a15              } while (i < this->_table_size);
005999c9          }
005999a4      }
005999a4      
00599a1c      return result;
00599990  }

005999cd                                         8d 49 00                                                               .I.
00599a1f                                                                                               90                                 .

00599a20  uint32_t __fastcall PackableHashTable<unsigned long,CContract>::pack_size(class PackableHashTable<unsigned long,CContract>* this)

00599a20  {
00599a20      class PackableHashTable<unsigned long,CContract>* this_1 = this;
00599a28      int32_t i = 0;
00599a2a      bool cond:0 = this->_table_size <= 0;
00599a2d      int32_t result = 4;
00599a32      this_1 = nullptr;
00599a32      
00599a36      if (!(cond:0))
00599a36      {
00599a74          do
00599a74          {
00599a43              void* j = this->_buckets[i];
00599a43              
00599a48              while (j != 0)
00599a48              {
00599a5d                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
00599a60                  j = *(uint32_t*)((char*)j + 0x114);
00599a68                  result = ((result + eax_2) + 4);
00599a48              }
00599a48              
00599a71              i += 1;
00599a74          } while (i < this->_table_size);
00599a36      }
00599a36      
00599a7d      return result;
00599a20  }

00599a7e                                                                                            90 90                                ..

00599a80  void __fastcall CContract::~CContract(class CContract* this)

00599a80  {
00599a8b      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_questflag_repeat_time.m_buffer;
00599a92      this->_location_quest_area.vtable = 0x79285c;
00599a9c      this->_location_npc_end.vtable = 0x79285c;
00599aa6      this->_location_npc_start.vtable = 0x79285c;
00599aa6      
00599ab5      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00599ab7          m_buffer->vtable->__vecDelDtor(1);
00599ab7      
00599abf      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_questflag_timer.m_buffer;
00599abf      
00599ace      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00599ad0          m_buffer_1->vtable->__vecDelDtor(1);
00599ad0      
00599ad8      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->_questflag_progress.m_buffer;
00599ad8      
00599ae7      if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
00599ae9          m_buffer_2->vtable->__vecDelDtor(1);
00599ae9      
00599af1      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->_questflag_finished.m_buffer;
00599af1      
00599b00      if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
00599b02          m_buffer_3->vtable->__vecDelDtor(1);
00599b02      
00599b0a      class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = this->_questflag_started.m_buffer;
00599b0a      
00599b19      if ((InterlockedDecrement(&m_buffer_4->m_cRef) == 0 && m_buffer_4 != 0))
00599b1b          m_buffer_4->vtable->__vecDelDtor(1);
00599b1b      
00599b23      class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = this->_questflag_stamped.m_buffer;
00599b23      
00599b32      if ((InterlockedDecrement(&m_buffer_5->m_cRef) == 0 && m_buffer_5 != 0))
00599b34          m_buffer_5->vtable->__vecDelDtor(1);
00599b34      
00599b3c      class AC1Legacy::PSRefBuffer<char>* m_buffer_6 = this->_name_npc_end.m_buffer;
00599b3c      
00599b4b      if ((InterlockedDecrement(&m_buffer_6->m_cRef) == 0 && m_buffer_6 != 0))
00599b4d          m_buffer_6->vtable->__vecDelDtor(1);
00599b4d      
00599b55      class AC1Legacy::PSRefBuffer<char>* m_buffer_7 = this->_name_npc_start.m_buffer;
00599b55      
00599b64      if ((InterlockedDecrement(&m_buffer_7->m_cRef) == 0 && m_buffer_7 != 0))
00599b66          m_buffer_7->vtable->__vecDelDtor(1);
00599b66      
00599b6e      class AC1Legacy::PSRefBuffer<char>* m_buffer_8 = this->_description_progress.m_buffer;
00599b6e      
00599b7d      if ((InterlockedDecrement(&m_buffer_8->m_cRef) == 0 && m_buffer_8 != 0))
00599b7f          m_buffer_8->vtable->__vecDelDtor(1);
00599b7f      
00599b87      class AC1Legacy::PSRefBuffer<char>* m_buffer_9 = this->_description.m_buffer;
00599b87      
00599b96      if ((InterlockedDecrement(&m_buffer_9->m_cRef) == 0 && m_buffer_9 != 0))
00599b98          m_buffer_9->vtable->__vecDelDtor(1);
00599b98      
00599ba0      class AC1Legacy::PSRefBuffer<char>* m_buffer_10 = this->_contract_name.m_buffer;
00599ba0      
00599baf      if ((InterlockedDecrement(&m_buffer_10->m_cRef) == 0 && m_buffer_10 != 0))
00599bb1          m_buffer_10->vtable->__vecDelDtor(1);
00599bb1      
00599bba      this->vtable = 0x79285c;
00599a80  }

00599bc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00599bd0  void __fastcall CContractTable::GetSubDataIDs(class CContractTable const* this, class QualifiedDataIDArray* arg2)

00599bd0  {
00599bdb      void __return;
00599bdb      PackableHashTable<unsigned long,CContract>::begin(&this->_contractHash, &__return);
00599be0      void* i_1;
00599be0      void* const i = i_1;
00599be0      
00599be6      while (i != 0)
00599be6      {
00599bf1          void* i_2 = *(uint32_t*)((char*)i + 0x114);
00599bf1          
00599bf9          if (i_2 == 0)
00599bf9          {
00599c05              int32_t eax_1 = (*(uint32_t*)((char*)i + 0x118) + 1);
00599c08              int32_t var_4;
00599c08              
00599c08              if (eax_1 >= var_4)
00599c08              {
00599c1b              label_599c1b:
00599c1b                  i = nullptr;
00599c08              }
00599c08              else
00599c08              {
00599c14                  int32_t var_8;
00599c14                  
00599c14                  while (*(uint32_t*)(var_8 + (eax_1 << 2)) == 0)
00599c14                  {
00599c16                      eax_1 += 1;
00599c16                      
00599c19                      if (eax_1 >= var_4)
00599c19                          goto label_599c1b;
00599c14                  }
00599c14                  
00599c28                  i = *(uint32_t*)(var_8 + (eax_1 << 2));
00599c08              }
00599bf9          }
00599bf9          else
00599bfb              i = i_2;
00599be6      }
00599bd0  }

00599c2d                                         90 90 90                                                               ...

00599c30  void __fastcall PackableHashTable<unsigned long,CContract>::EmptyContents(class PackableHashTable<unsigned long,CContract>* this)

00599c30  {
00599c39      if (this->_buckets != 0)
00599c39      {
00599c3e          int32_t i = 0;
00599c3e          
00599c42          if (this->_table_size > 0)
00599c42          {
00599c7d              do
00599c7d              {
00599c49                  void* j_1 = this->_buckets[i];
00599c49                  
00599c4e                  if (j_1 != 0)
00599c4e                  {
00599c6b                      void* j;
00599c6b                      
00599c6b                      do
00599c6b                      {
00599c50                          j = *(uint32_t*)((char*)j_1 + 0x114);
00599c59                          CContract::~CContract(((char*)j_1 + 4));
00599c5f                          operator delete(j_1);
00599c69                          j_1 = j;
00599c6b                      } while (j != 0);
00599c4e                  }
00599c4e                  
00599c6d                  this->_buckets[i] = 0;
00599c7a                  i += 1;
00599c7d              } while (i < this->_table_size);
00599c42          }
00599c39      }
00599c39      
00599c82      this->_currNum = 0;
00599c30  }

00599c8b                                   90 90 90 90 90                                                             .....

00599c90  void __fastcall PackableHashTable<unsigned long,CContract>::~PackableHashTable<unsigned long,CContract>(class PackableHashTable<unsigned long,CContract>* this)

00599c90  {
00599c93      this->vtable = 0x7e506c;
00599c99      PackableHashTable<unsigned long,CContract>::EmptyContents(this);
00599c9e      class PackableHashData<unsigned long,CContract>** _buckets = this->_buckets;
00599c9e      
00599ca3      if (_buckets != 0)
00599ca3      {
00599ca6          operator delete[](_buckets);
00599cae          this->_buckets = nullptr;
00599ca3      }
00599ca3      
00599cb5      this->_table_size = 0;
00599cbc      this->vtable = 0x79285c;
00599c90  }

00599cc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00599cd0  int32_t __thiscall PackableHashTable<unsigned long,CContract>::UnPack(class PackableHashTable<unsigned long,CContract>* this, void** arg2, uint32_t arg3)

00599cd0  {
00599ce4      if (arg3 < 4)
00599cf0          return 0;
00599cf0      
00599cfc      void* eax_1 = *(uint32_t*)arg2;
00599d08      PackableHashTable<unsigned long,CContract>::EmptyContents(this);
00599d0d      class PackableHashData<unsigned long,CContract>** _buckets = this->_buckets;
00599d0d      
00599d14      if (_buckets != 0)
00599d14      {
00599d17          operator delete[](_buckets);
00599d1f          this->_buckets = nullptr;
00599d14      }
00599d14      
00599d22      this->_table_size = 0;
00599d25      void* ecx_1 = *(uint32_t*)arg2;
00599d27      int32_t eax_2 = *(uint32_t*)ecx_1;
00599d2c      *(uint32_t*)arg2 = ((char*)ecx_1 + 4);
00599d30      uint32_t ecx_4 = (eax_2 >> 0x10);
00599d33      int32_t eax_3 = (eax_2 & 0xffff);
00599d3d      this->_table_size = ecx_4;
00599d3d      
00599d42      if (ecx_4 == 0)
00599d42      {
00599d4b          int32_t result;
00599d4b          result = eax_3 == 0;
00599d55          return result;
00599d42      }
00599d42      
00599d6a      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
00599d6a      {
00599d83          int32_t var_110;
00599d83          CContract::CContract(&var_110);
00599d8a          int32_t var_120_1 = 0;
00599d92          int32_t* ecx_10;
00599d92          
00599d92          if (eax_3 <= 0)
00599d92          {
00599dee          label_599dee:
00599dee              ecx_10 = &var_110;
00599dee              
00599df2              if (arg3 >= (*(uint32_t*)arg2 - eax_1))
00599df2              {
00599df4                  CContract::~CContract(ecx_10);
00599e08                  return 1;
00599df2              }
00599d92          }
00599d92          else
00599d92          {
00599d97              while (true)
00599d97              {
00599d97                  if ((arg3 - 4) >= 4)
00599d97                  {
00599d99                      int32_t* eax_5 = *(uint32_t*)arg2;
00599d9d                      int32_t edx_1 = var_110;
00599da2                      uint32_t var_114 = *(uint32_t*)eax_5;
00599dae                      *(uint32_t*)arg2 = &eax_5[1];
00599dae                      
00599db5                      if ((*(uint32_t*)(edx_1 + 0x10)(arg2, (arg3 - 4)) != 0 && (PackableHashTable<unsigned long,CContract>::add(this, &var_114, &var_110) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
00599db5                      {
00599dd8                          bool cond:5_1 = (var_120_1 + 1) < eax_3;
00599dda                          var_120_1 += 1;
00599dda                          
00599dde                          if (!(cond:5_1))
00599dde                              goto label_599dee;
00599dde                          
00599dde                          continue;
00599db5                      }
00599d97                  }
00599d97                  
00599e0b                  ecx_10 = &var_110;
00599e0b                  break;
00599d97              }
00599d92          }
00599d92          
00599e0f          CContract::~CContract(ecx_10);
00599d6a      }
00599d6a      
00599e20      return 0;
00599cd0  }

00599e23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00599e30  int32_t __thiscall PackableHashTable<unsigned long,CContract>::add(class PackableHashTable<unsigned long,CContract>* this, uint32_t const* arg2, class CContract const* arg3)

00599e30  {
00599e3a      uint32_t _table_size_1 = this->_table_size;
00599e3a      
00599e3f      if (_table_size_1 == 0)
00599e3f      {
00599e74      label_599e74:
00599e74          void* eax_4 = operator new(0x11c);
00599e74          
00599e80          if (eax_4 != 0)
00599e80          {
00599e89              uint32_t _table_size = this->_table_size;
00599e90              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
00599e92              CContract::CContract(((char*)eax_4 + 4), arg3);
00599e97              *(uint32_t*)((char*)eax_4 + 0x114) = 0;
00599ea6              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
00599ea8              *(uint32_t*)((char*)eax_4 + 0x118) = temp1_2;
00599eb6              *(uint32_t*)((char*)eax_4 + 0x114) = this->_buckets[temp1_2];
00599ebc              this->_buckets[temp1_2] = eax_4;
00599ec2              this->_currNum += 1;
00599ece              return 1;
00599e80          }
00599e3f      }
00599e3f      else
00599e3f      {
00599e41          class PackableHashData<unsigned long,CContract>** _buckets = this->_buckets;
00599e41          
00599e46          if (_buckets == 0)
00599e46              goto label_599e74;
00599e46          
00599e48          uint32_t const i = *(uint32_t*)arg2;
00599e51          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
00599e51          
00599e56          if (edx_3 == 0)
00599e56              goto label_599e74;
00599e56          
00599e5a          while (i != *(uint32_t*)edx_3)
00599e5a          {
00599e5c              edx_3 = edx_3[0x45];
00599e5c              
00599e64              if (edx_3 == 0)
00599e64                  goto label_599e74;
00599e5a          }
00599e5a          
00599e6d          if (edx_3 == 0xfffffffc)
00599e6d              goto label_599e74;
00599e3f      }
00599e3f      
00599ed7      return 0;
00599e30  }

00599eda                                                                                90 90 90 90 90 90                            ......

00599ee0  void* __thiscall PackableHashTable<unsigned long,CContract>::`scalar deleting destructor'(class PackableHashTable<unsigned long,CContract>* this, uint32_t arg2)

00599ee0  {
00599ee3      this->vtable = 0x7e506c;
00599ee9      PackableHashTable<unsigned long,CContract>::EmptyContents(this);
00599eee      class PackableHashData<unsigned long,CContract>** _buckets = this->_buckets;
00599eee      
00599ef3      if (_buckets != 0)
00599ef3      {
00599ef6          operator delete[](_buckets);
00599efe          this->_buckets = nullptr;
00599ef3      }
00599ef3      
00599f0a      this->_table_size = 0;
00599f11      this->vtable = 0x79285c;
00599f11      
00599f17      if ((arg2 & 1) != 0)
00599f1a          operator delete(this);
00599f1a      
00599f25      return this;
00599ee0  }

00599f28                          90 90 90 90 90 90 90 90                                                          ........

00599f30  void __thiscall CContractTable::CContractTable(class CContractTable* this, class IDClass<_tagDataID,32,0> arg2)

00599f30  {
00599f38      DBObj::DBObj(this, arg2);
00599f3d      this->vtable = &PackObj::`vftable';
00599f47      this->vtable = 0x7e5098;
00599f4d      this->vtable = &CContractTable::`vftable';
00599f44      this->_contractHash.vtable = 0x7e506c;
00599f44      this->_contractHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
00599f44      this->_contractHash._buckets = nullptr;
00599f44      this->_contractHash._table_size = 0x1000;
00599f44      this->_contractHash._currNum = 0;
00599f6c      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_contractHash);
00599f30  }

00599f77                                                                       90 90 90 90 90 90 90 90 90                         .........

00599f80  void* __thiscall CContractTable::`vector deleting destructor'(class CContractTable* this, uint32_t arg2)

00599f80  {
00599f83      /* tailcall */
00599f83      return CContractTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00599f80  }

00599f88                          cc cc cc cc cc cc cc cc                                                          ........

00599f90  void* __thiscall CContractTable::`scalar deleting destructor'(class CContractTable* this, uint32_t arg2)

00599f90  {
00599f96      this->vtable = 0x7e5098;
00599f9c      this->vtable = &CContractTable::`vftable';
00599fa3      PackableHashTable<unsigned long,CContract>::~PackableHashTable<unsigned long,CContract>(&this->_contractHash);
00599faa      SerializeUsingPackDBObj::~SerializeUsingPackDBObj(this);
00599faa      
00599fb4      if ((arg2 & 1) != 0)
00599fb7          operator delete(this);
00599fb7      
00599fc2      return this;
00599f90  }

00599fc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00599fd0  class DBObj* CContractTable::Allocate(class CContractTable const* this @ ecx)

00599fd0  {
00599fd0      /* tailcall */
00599fd0      return CContractTable::Allocator();
00599fd0  }

00599fd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00599fe0  void __fastcall CContract::CContract(class CContract* this)

00599fe0  {
00599fed      this->vtable = 0x7e5128;
00599ff3      this->_version = 0;
00599ff6      this->_contract_id = 0;
00599ff9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a004      this->_contract_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0059a007      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
0059a009      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a015      this->_description.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
0059a018      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_8->m_cRef);
0059a01a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a026      this->_description_progress.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
0059a029      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef);
0059a02b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a036      this->_name_npc_start.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
0059a039      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
0059a03b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a047      this->_name_npc_end.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_9;
0059a04a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_9->m_cRef);
0059a04c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a058      this->_questflag_stamped.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
0059a05b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef);
0059a05d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a068      this->_questflag_started.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
0059a06b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
0059a06d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a079      this->_questflag_finished.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_10;
0059a07c      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_10->m_cRef);
0059a07e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a08a      this->_questflag_progress.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
0059a08d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_7->m_cRef);
0059a08f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a09a      this->_questflag_timer.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0059a09d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
0059a09f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0059a0ab      this->_questflag_repeat_time.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_11;
0059a0ae      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_11->m_cRef);
0059a0b8      this->_location_npc_start.vtable = 0x796910;
0059a0bb      this->_location_npc_start.objcell_id = 0;
0059a0b5      this->_location_npc_start.frame.qw = 0x3f800000;
0059a0b5      this->_location_npc_start.frame.qx = 0f;
0059a0b5      this->_location_npc_start.frame.qy = 0f;
0059a0b5      this->_location_npc_start.frame.qz = 0f;
0059a0b5      this->_location_npc_start.frame.m_fOrigin.x = 0;
0059a0b5      this->_location_npc_start.frame.m_fOrigin.y = 0f;
0059a0b5      this->_location_npc_start.frame.m_fOrigin.z = 0f;
0059a0d6      Frame::cache(&this->_location_npc_start.frame);
0059a0e1      this->_location_npc_end.vtable = 0x796910;
0059a0e7      this->_location_npc_end.objcell_id = 0;
0059a0db      this->_location_npc_end.frame.qw = 0x3f800000;
0059a0db      this->_location_npc_end.frame.qx = 0f;
0059a0db      this->_location_npc_end.frame.qy = 0f;
0059a0db      this->_location_npc_end.frame.qz = 0f;
0059a0db      this->_location_npc_end.frame.m_fOrigin.x = 0;
0059a0db      this->_location_npc_end.frame.m_fOrigin.y = 0f;
0059a0db      this->_location_npc_end.frame.m_fOrigin.z = 0f;
0059a105      Frame::cache(&this->_location_npc_end.frame);
0059a110      this->_location_quest_area.vtable = 0x796910;
0059a116      this->_location_quest_area.objcell_id = 0;
0059a10a      this->_location_quest_area.frame.qw = 0x3f800000;
0059a10a      this->_location_quest_area.frame.qx = 0f;
0059a10a      this->_location_quest_area.frame.qy = 0f;
0059a10a      this->_location_quest_area.frame.qz = 0f;
0059a10a      this->_location_quest_area.frame.m_fOrigin.x = 0;
0059a10a      this->_location_quest_area.frame.m_fOrigin.y = 0f;
0059a10a      this->_location_quest_area.frame.m_fOrigin.z = 0f;
0059a134      Frame::cache(&this->_location_quest_area.frame);
00599fe0  }

0059a13f                                                                                               90                                 .

0059a140  void __thiscall CContract::CContract(class CContract* this, class CContract const* arg2)

0059a140  {
0059a14f      this->vtable = 0x7e5128;
0059a158      this->_version = arg2->_version;
0059a15e      this->_contract_id = arg2->_contract_id;
0059a161      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_contract_name.m_buffer;
0059a164      this->_contract_name.m_buffer = m_buffer;
0059a16b      InterlockedIncrement(&m_buffer->m_cRef);
0059a16d      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->_description.m_buffer;
0059a170      this->_description.m_buffer = m_buffer_1;
0059a177      InterlockedIncrement(&m_buffer_1->m_cRef);
0059a179      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg2->_description_progress.m_buffer;
0059a17c      this->_description_progress.m_buffer = m_buffer_2;
0059a183      InterlockedIncrement(&m_buffer_2->m_cRef);
0059a185      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = arg2->_name_npc_start.m_buffer;
0059a188      this->_name_npc_start.m_buffer = m_buffer_3;
0059a18f      InterlockedIncrement(&m_buffer_3->m_cRef);
0059a191      class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = arg2->_name_npc_end.m_buffer;
0059a194      this->_name_npc_end.m_buffer = m_buffer_4;
0059a19b      InterlockedIncrement(&m_buffer_4->m_cRef);
0059a19d      class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = arg2->_questflag_stamped.m_buffer;
0059a1a0      this->_questflag_stamped.m_buffer = m_buffer_5;
0059a1a7      InterlockedIncrement(&m_buffer_5->m_cRef);
0059a1a9      class AC1Legacy::PSRefBuffer<char>* m_buffer_6 = arg2->_questflag_started.m_buffer;
0059a1ac      this->_questflag_started.m_buffer = m_buffer_6;
0059a1b3      InterlockedIncrement(&m_buffer_6->m_cRef);
0059a1b5      class AC1Legacy::PSRefBuffer<char>* m_buffer_7 = arg2->_questflag_finished.m_buffer;
0059a1b8      this->_questflag_finished.m_buffer = m_buffer_7;
0059a1bf      InterlockedIncrement(&m_buffer_7->m_cRef);
0059a1c1      class AC1Legacy::PSRefBuffer<char>* m_buffer_8 = arg2->_questflag_progress.m_buffer;
0059a1c4      this->_questflag_progress.m_buffer = m_buffer_8;
0059a1cb      InterlockedIncrement(&m_buffer_8->m_cRef);
0059a1cd      class AC1Legacy::PSRefBuffer<char>* m_buffer_9 = arg2->_questflag_timer.m_buffer;
0059a1d0      this->_questflag_timer.m_buffer = m_buffer_9;
0059a1d7      InterlockedIncrement(&m_buffer_9->m_cRef);
0059a1d9      class AC1Legacy::PSRefBuffer<char>* m_buffer_10 = arg2->_questflag_repeat_time.m_buffer;
0059a1dc      this->_questflag_repeat_time.m_buffer = m_buffer_10;
0059a1e3      InterlockedIncrement(&m_buffer_10->m_cRef);
0059a1ea      this->_location_npc_start.vtable = 0x796910;
0059a1f7      this->_location_npc_start.objcell_id = arg2->_location_npc_start.objcell_id;
0059a1fa      Frame::operator=(&this->_location_npc_start.frame, &arg2->_location_npc_start.frame);
0059a1ff      this->_location_npc_end.vtable = 0x796910;
0059a211      this->_location_npc_end.objcell_id = arg2->_location_npc_end.objcell_id;
0059a21e      Frame::operator=(&this->_location_npc_end.frame, &arg2->_location_npc_end.frame);
0059a223      this->_location_quest_area.vtable = 0x796910;
0059a23c      this->_location_quest_area.objcell_id = arg2->_location_quest_area.objcell_id;
0059a242      Frame::operator=(&this->_location_quest_area.frame, &arg2->_location_quest_area.frame);
0059a140  }

0059a24f                                               90                                                                 .

0059a250  void* __thiscall CContract::`scalar deleting destructor'(class CContract* this, uint32_t arg2)

0059a250  {
0059a253      CContract::~CContract(this);
0059a253      
0059a25d      if ((arg2 & 1) != 0)
0059a260          operator delete(this);
0059a260      
0059a26b      return this;
0059a250  }

0059a26e                                            90 90                                                                ..

0059a270  uint32_t __fastcall CContract::GetPackSize(class CContract* this, uint32_t const arg2)

0059a270  {
0059a286      void* var_8 = nullptr;
0059a2e0      uint32_t ebp_3 = (((AC1Legacy::PStringBase<char>::Pack(&this->_questflag_repeat_time, &var_8, 0) + AC1Legacy::PStringBase<char>::Pack(&this->_questflag_timer, &var_8, 0)) + AC1Legacy::PStringBase<char>::Pack(&this->_questflag_progress, &var_8, 0)) + AC1Legacy::PStringBase<char>::Pack(&this->_questflag_finished, &var_8, 0));
0059a31a      uint32_t ebp_7 = ((((ebp_3 + AC1Legacy::PStringBase<char>::Pack(&this->_questflag_started, &var_8, 0)) + AC1Legacy::PStringBase<char>::Pack(&this->_questflag_stamped, &var_8, 0)) + AC1Legacy::PStringBase<char>::Pack(&this->_name_npc_end, &var_8, 0)) + AC1Legacy::PStringBase<char>::Pack(&this->_name_npc_start, &var_8, 0));
0059a353      uint32_t ebp_10 = (((ebp_7 + AC1Legacy::PStringBase<char>::Pack(&this->_description_progress, &var_8, 0)) + AC1Legacy::PStringBase<char>::Pack(&this->_description, &var_8, 0)) + AC1Legacy::PStringBase<char>::Pack(&this->_contract_name, &var_8, 0));
0059a35a      int32_t eax_13 = this->_location_npc_end.vtable->Pack(&var_8, 0);
0059a36c      int32_t eax_14 = this->_location_npc_start.vtable->Pack(&var_8, 0);
0059a38a      return ((this->_location_quest_area.vtable->Pack(&var_8, 0) + ((ebp_10 + eax_13) + eax_14)) + 8);
0059a270  }

0059a38d                                         90 90 90                                                               ...

0059a390  uint32_t __thiscall CContract::Pack(class CContract* this, void** arg2, uint32_t arg3)

0059a390  {
0059a393      int32_t __saved_esi = 0;
0059a397      uint32_t edx;
0059a397      uint32_t result = CContract::GetPackSize(this, edx);
0059a397      
0059a3a4      if (arg3 >= result)
0059a3a4      {
0059a3b1          **(uint32_t**)arg2 = 0;
0059a3b9          void* eax_2 = (*(uint32_t*)arg2 + 4);
0059a3bc          *(uint32_t*)arg2 = eax_2;
0059a3c1          *(uint32_t*)eax_2 = this->_contract_id;
0059a3cd          *(uint32_t*)arg2 += 4;
0059a3cf          AC1Legacy::PStringBase<char>::Pack(&this->_contract_name, arg2, arg3);
0059a3d9          AC1Legacy::PStringBase<char>::Pack(&this->_description, arg2, arg3);
0059a3e3          AC1Legacy::PStringBase<char>::Pack(&this->_description_progress, arg2, arg3);
0059a3ed          AC1Legacy::PStringBase<char>::Pack(&this->_name_npc_start, arg2, arg3);
0059a3f7          AC1Legacy::PStringBase<char>::Pack(&this->_name_npc_end, arg2, arg3);
0059a401          AC1Legacy::PStringBase<char>::Pack(&this->_questflag_stamped, arg2, arg3);
0059a40b          AC1Legacy::PStringBase<char>::Pack(&this->_questflag_started, arg2, arg3);
0059a415          AC1Legacy::PStringBase<char>::Pack(&this->_questflag_finished, arg2, arg3);
0059a41f          AC1Legacy::PStringBase<char>::Pack(&this->_questflag_progress, arg2, arg3);
0059a429          AC1Legacy::PStringBase<char>::Pack(&this->_questflag_timer, arg2, arg3);
0059a433          AC1Legacy::PStringBase<char>::Pack(&this->_questflag_repeat_time, arg2, arg3);
0059a438          this->_location_npc_start.vtable->Pack(arg2, arg3);
0059a443          this->_location_npc_end.vtable->Pack(arg2, arg3);
0059a454          this->_location_quest_area.vtable->Pack(arg2, arg3);
0059a3a4      }
0059a3a4      
0059a46b      return result;
0059a390  }

0059a46e                                            90 90                                                                ..

0059a470  int32_t __thiscall CContract::UnPack(class CContract* this, void** arg2, uint32_t arg3)

0059a470  {
0059a472      int32_t __saved_ebx = 0;
0059a481      uint32_t edx;
0059a481      
0059a481      if (arg3 < CContract::GetPackSize(this, edx))
0059a487          return 0;
0059a487      
0059a494      this->_version = **(uint32_t**)arg2;
0059a499      void* ecx_2 = (*(uint32_t*)arg2 + 4);
0059a49c      *(uint32_t*)arg2 = ecx_2;
0059a4a2      this->_contract_id = *(uint32_t*)ecx_2;
0059a4af      *(uint32_t*)arg2 += 4;
0059a4e2      int32_t ebx_4 = ((((AC1Legacy::PStringBase<char>::UnPack(&this->_contract_name, arg2, arg3) & 1) & AC1Legacy::PStringBase<char>::UnPack(&this->_description, arg2, arg3)) & AC1Legacy::PStringBase<char>::UnPack(&this->_description_progress, arg2, arg3)) & AC1Legacy::PStringBase<char>::UnPack(&this->_name_npc_start, arg2, arg3));
0059a512      int32_t ebx_8 = ((((ebx_4 & AC1Legacy::PStringBase<char>::UnPack(&this->_name_npc_end, arg2, arg3)) & AC1Legacy::PStringBase<char>::UnPack(&this->_questflag_stamped, arg2, arg3)) & AC1Legacy::PStringBase<char>::UnPack(&this->_questflag_started, arg2, arg3)) & AC1Legacy::PStringBase<char>::UnPack(&this->_questflag_finished, arg2, arg3));
0059a557      int32_t ebx_13 = (((((ebx_8 & AC1Legacy::PStringBase<char>::UnPack(&this->_questflag_progress, arg2, arg3)) & AC1Legacy::PStringBase<char>::UnPack(&this->_questflag_timer, arg2, arg3)) & AC1Legacy::PStringBase<char>::UnPack(&this->_questflag_repeat_time, arg2, arg3)) & this->_location_npc_start.vtable->UnPack(arg2, arg3)) & this->_location_npc_end.vtable->UnPack(arg2, arg3));
0059a565      return (this->_location_quest_area.vtable->UnPack(arg2, arg3) & ebx_13);
0059a470  }

0059a568                          90 90 90 90 90 90 90 90                                                          ........

0059a570  void __fastcall CFellowship::CFellowship(class CFellowship* this)

0059a570  {
0059a573      Fellowship::Fellowship(this);
0059a578      this->vtable = 0x7cec6c;
0059a570  }

0059a582        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0059a590  void* __thiscall Fellowship::`scalar deleting destructor'(class Fellowship* this, uint32_t arg2)

0059a590  {
0059a593      Fellowship::~Fellowship(this);
0059a593      
0059a59d      if ((arg2 & 1) != 0)
0059a5a0          operator delete(this);
0059a5a0      
0059a5ab      return this;
0059a590  }

0059a5ae                                            90 90                                                                ..

0059a5b0  void __thiscall CShortCutData::CShortCutData(class CShortCutData* this, int32_t arg2, uint32_t arg3, uint32_t arg4)

0059a5b0  {
0059a5c4      ShortCutData::ShortCutData(this, arg2, arg3, arg4);
0059a5c9      this->vtable = 0x7e8a7c;
0059a5b0  }

0059a5d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0059a5e0  void __fastcall CPlayerModule::~CPlayerModule(class CPlayerModule* this)

0059a5e0  {
0059a5e3      int32_t eax = -(((char*)this - 4));
0059a5e9      *(uint32_t*)((char*)this - 4) = 0x7e5338;
0059a5f0      this->vtable = 0x7e531c;
0059a5f8      /* tailcall */
0059a5f8      return PlayerModule::~PlayerModule(((eax - eax) & this));
0059a5e0  }

0059a5fd                                                                                         90 90 90                               ...

0059a600  uint8_t __stdcall CPlayerModule::IsAutoSaveOption(class CPlayerModule* this @ ecx, enum PlayerOption arg2)

0059a600  {
0059a607      enum PlayerOption eax;
0059a607      
0059a607      switch (arg2)
0059a607      {
0059a617          case 0:
0059a617          case 1:
0059a617          case 2:
0059a617          case 0xf:
0059a617          case 0x10:
0059a617          case 0x11:
0059a617          case 0x12:
0059a617          case 0x19:
0059a617          case 0x1b:
0059a617          case 0x23:
0059a617          case 0x24:
0059a617          case 0x25:
0059a617          case 0x26:
0059a617          case 0x27:
0059a617          case 0x2a:
0059a617          case 0x2b:
0059a617          case 0x2e:
0059a617          case 0x2f:
0059a617          case 0x31:
0059a617          case 0x32:
0059a617          case 0x33:
0059a617          {
0059a617              eax = 1;
0059a619              return 1;
0059a617              break;
0059a617          }
0059a607      }
0059a607      
0059a61c      eax = 0;
0059a61e      return 0;
0059a600  }

0059a621     8d 49 00                                                                                       .I.
0059a624  uint32_t jump_table_59a624[0x2] = 
0059a624  {
0059a624      [0x0] =  0x0059a617
0059a628      [0x1] =  0x0059a61c
0059a62c  }
0059a62c  uint8_t lookup_table_59a62c[0x34] = 
0059a62c  {
0059a62c      [0x00] =  0x00
0059a62d      [0x01] =  0x00
0059a62e      [0x02] =  0x00
0059a62f      [0x03] =  0x01
0059a630      [0x04] =  0x01
0059a631      [0x05] =  0x01
0059a632      [0x06] =  0x01
0059a633      [0x07] =  0x01
0059a634      [0x08] =  0x01
0059a635      [0x09] =  0x01
0059a636      [0x0a] =  0x01
0059a637      [0x0b] =  0x01
0059a638      [0x0c] =  0x01
0059a639      [0x0d] =  0x01
0059a63a      [0x0e] =  0x01
0059a63b      [0x0f] =  0x00
0059a63c      [0x10] =  0x00
0059a63d      [0x11] =  0x00
0059a63e      [0x12] =  0x00
0059a63f      [0x13] =  0x01
0059a640      [0x14] =  0x01
0059a641      [0x15] =  0x01
0059a642      [0x16] =  0x01
0059a643      [0x17] =  0x01
0059a644      [0x18] =  0x01
0059a645      [0x19] =  0x00
0059a646      [0x1a] =  0x01
0059a647      [0x1b] =  0x00
0059a648      [0x1c] =  0x01
0059a649      [0x1d] =  0x01
0059a64a      [0x1e] =  0x01
0059a64b      [0x1f] =  0x01
0059a64c      [0x20] =  0x01
0059a64d      [0x21] =  0x01
0059a64e      [0x22] =  0x01
0059a64f      [0x23] =  0x00
0059a650      [0x24] =  0x00
0059a651      [0x25] =  0x00
0059a652      [0x26] =  0x00
0059a653      [0x27] =  0x00
0059a654      [0x28] =  0x01
0059a655      [0x29] =  0x01
0059a656      [0x2a] =  0x00
0059a657      [0x2b] =  0x00
0059a658      [0x2c] =  0x01
0059a659      [0x2d] =  0x01
0059a65a      [0x2e] =  0x00
0059a65b      [0x2f] =  0x00
0059a65c      [0x30] =  0x01
0059a65d      [0x31] =  0x00
0059a65e      [0x32] =  0x00
0059a65f      [0x33] =  0x00
0059a660  }

0059a660  void __thiscall CPlayerModule::SaveToServer(class CPlayerModule* this, uint8_t arg2)

0059a660  {
0059a673      if ((this->m_bDirty != 0 || arg2 != 0))
0059a679          CM_Character::Event_CharacterOptionsEvent(&this->vtable);
0059a679      
0059a681      this->m_bDirty = 0;
0059a660  }

0059a68c                                      90 90 90 90                                                              ....

0059a690  void __fastcall CPlayerModule::OnInitialize(class CPlayerModule* this)

0059a690  {
0059a696      this->m_bDirty = 0;
0059a69c      this->m_timeFirstDirtied = 0f;
0059a6a2      *(uint32_t*)((char*)this->m_timeFirstDirtied)[4] = 0xbff00000;
0059a6b8      LScape::SetDay(((uint32_t)PlayerModule::PersistentAtDay(&this->vtable)));
0059a6c2      uint8_t eax_2 = PlayerModule::DisableDistanceFog(&this->vtable);
0059a6c7      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0059a6cd      uint8_t temp0 = eax_2;
0059a6cd      eax_2 = -(eax_2);
0059a6d5      LScape::m_fFogEnabled = ((eax_2 - eax_2) + 1);
0059a6da      int32_t eax_3 = PlayerModule::DisableMostWeatherEffects(&this->vtable);
0059a6df      char temp1 = eax_3;
0059a6df      eax_3 = -(eax_3);
0059a6e7      SmartBox::EnableWeather(SmartBox::smartbox_1, ((eax_3 - eax_3) + 1));
0059a6ee      uint8_t eax_6 = PlayerModule::ViewCombatTarget(&this->vtable);
0059a6fb      ClientCombatSystem::TrackTarget(ClientCombatSystem::GetCombatSystem(), eax_6);
0059a690  }

0059a703           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0059a710  void __fastcall CPlayerModule::UseTime(class CPlayerModule* this)

0059a710  {
0059a71b      if (this->m_bDirty != 0)
0059a71b      {
0059a729          ((((long double)480.0) + ((long double)this->m_timeFirstDirtied)) - ((long double)Timer::cur_time));
0059a731          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0059a731          
0059a734          if (!(p_1))
0059a734          {
0059a73a              CM_Character::Event_CharacterOptionsEvent(&this->vtable);
0059a742              this->m_bDirty = 0;
0059a734          }
0059a71b      }
0059a710  }

0059a74b                                   90 90 90 90 90                                                             .....

0059a750  void __fastcall CPlayerModule::CPlayerModule(class CPlayerModule* this)

0059a750  {
0059a759      PlayerModule::PlayerModule(&this->vtable);
0059a754      this->vtable = &CPlayerModule::`vftable';
0059a766      this->m_bDirty = 0;
0059a76c      this->m_timeFirstDirtied = 0f;
0059a773      this->vtable = 0x7e5338;
0059a779      *(uint32_t*)((char*)this->m_timeFirstDirtied)[4] = 0xbff00000;
0059a750  }

0059a787                       90 90 90 90 90 90 90 90 90                                                         .........

0059a790  void* __thiscall CPlayerModule::`scalar deleting destructor'(class CPlayerModule* this, uint32_t arg2)

0059a790  {
0059a793      int32_t eax = -(((char*)this - 4));
0059a79d      this->vtable = 0x7e531c;
0059a798      this->vtable = 0x7e5338;
0059a7ab      PlayerModule::~PlayerModule(((eax - eax) & this));
0059a7ab      
0059a7b5      if ((arg2 & 1) != 0)
0059a7b8          operator delete(((char*)this - 4));
0059a7b8      
0059a7c3      return ((char*)this - 4);
0059a790  }

0059a7c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0059a7d0  class TResult* __thiscall CPlayerModule::QueryInterface(class CPlayerModule* this, class TResult* __return, struct Turbine_GUID const* arg3, void** arg4)

0059a7d0  {
0059a7e3      int32_t* key;
0059a7e3      
0059a7e3      if ((1 & (*(uint8_t*)$S124)) != 0)
0059a821          key = Offsets[0].key;
0059a7e3      else
0059a7e3      {
0059a7ed          key = &CPlayerModule_InterfaceType;
0059a7f2          $S124 |= 1;
0059a7f8          Offsets[0].key = 0x7e5140;
0059a7fd          Offsets[0].ofs = 0;
0059a803          Offsets[1].key = 0x7e5308;
0059a80d          Offsets[1].ofs = 0;
0059a813          Offsets[2].key = 0;
0059a819          Offsets[2].ofs = 0;
0059a7e3      }
0059a7e3      
0059a828      void* edx_3 = &Offsets;
0059a828      
0059a82d      while (key != 0)
0059a82d      {
0059a84f          if ((*(uint32_t*)key == arg3->m_data1 && (key[1] == arg3->m_data2*(int32_t*)((char*)arg3 + 4) && (key[2] == arg3->m_data4[0] && key[3] == arg3->m_data4[4]))))
0059a84f          {
0059a872              if (arg4 != 0)
0059a872              {
0059a874                  int32_t* esi_2 = *(uint32_t*)((char*)edx_3 + 4);
0059a87e                  *(uint32_t*)(*(uint32_t*)((char*)esi_2 + this) + 0x10)();
0059a881                  *(uint32_t*)arg4 = ((char*)esi_2 + this);
0059a872              }
0059a872              
0059a88a              __return->m_val = 0;
0059a88d              return __return;
0059a84f          }
0059a84f          
0059a851          key = *(uint32_t*)((char*)edx_3 + 8);
0059a854          edx_3 += 8;
0059a82d      }
0059a82d      
0059a862      __return->m_val = 0x80004002;
0059a869      return __return;
0059a7d0  }


0059a890  void __thiscall CPlayerModule::OnChanged(class CPlayerModule* this, class BaseProperty const* arg2, uint32_t arg3)

0059a890  {
0059a89d      CM_UI::SendNotice_GameplayOptionChanged(arg2, arg3);
0059a89d      
0059a8ad      if (this->m_TimeStampFormat.m_buffer == 0)
0059a8ad      {
0059a8af          this->m_TimeStampFormat.m_buffer = 1;
0059a8bc          int32_t eax_1 = *(int32_t*)((char*)Timer::cur_time + 4);
0059a8c1          *(int32_t*)((char*)this + 0x1ac) = (*(uint32_t*)Timer::cur_time);
0059a8c7          this->m_timeFirstDirtied = eax_1;
0059a8ad      }
0059a890  }

0059a8d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0059a8e0  void __thiscall CPlayerModule::OnChanged(class CPlayerModule* this, enum PlayerOption arg2)

0059a8e0  {
0059a8e9      CM_UI::SendNotice_PlayerOptionChanged(arg2);
0059a8e9      
0059a8f7      if ((arg2 - 2) <= 0x2e)
0059a904          switch (arg2)
0059a904          {
0059a96a              case 2:
0059a96a              {
0059a971                  if (PlayerModule::IgnoreFellowshipRequests(this) != 0)
0059a977                      PlayerModule::SetFellowshipAutoAcceptRequests(this, 0);
0059a96a                  break;
0059a96a              }
0059a921              case 4:
0059a921              {
0059a921                  class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0059a929                  int32_t eax_3 = PlayerModule::DisableMostWeatherEffects(this);
0059a92e                  char temp1_1 = eax_3;
0059a92e                  eax_3 = -(eax_3);
0059a936                  SmartBox::EnableWeather(SmartBox::smartbox_1, ((eax_3 - eax_3) + 1));
0059a921                  break;
0059a921              }
0059a916              case 5:
0059a916              {
0059a916                  LScape::SetDay(((uint32_t)PlayerModule::PersistentAtDay(this)));
0059a916                  break;
0059a916              }
0059a954              case 7:
0059a954              {
0059a954                  uint8_t eax_7 = PlayerModule::ViewCombatTarget(this);
0059a961                  ClientCombatSystem::TrackTarget(ClientCombatSystem::GetCombatSystem(), eax_7);
0059a954                  break;
0059a954              }
0059a980              case 0x12:
0059a980              {
0059a987                  if (PlayerModule::FellowshipAutoAcceptRequests(this) != 0)
0059a98d                      PlayerModule::SetIgnoreFellowshipRequests(this, 0);
0059a980                  break;
0059a980              }
0059a940              case 0x30:
0059a940              {
0059a940                  uint8_t eax_6 = PlayerModule::DisableDistanceFog(this);
0059a945                  uint8_t temp2_1 = eax_6;
0059a945                  eax_6 = -(eax_6);
0059a94b                  LScape::m_fFogEnabled = ((eax_6 - eax_6) + 1);
0059a940                  break;
0059a940              }
0059a904          }
0059a904      
0059a99d      if (CPlayerModule::IsAutoSaveOption(((char*)this - 4), arg2) != 0)
0059a99d      {
0059a9ac          CM_Character::Event_PlayerOptionChangedEvent(arg2, ((uint32_t)PlayerModule::GetOption(this, arg2)));
0059a9b6          return;
0059a99d      }
0059a99d      
0059a9c1      if (this->m_TimeStampFormat*(int32_t*)((char*)this + 0x1a4) == 0)
0059a9c1      {
0059a992          this->m_TimeStampFormat*(int32_t*)((char*)this + 0x1a4) = 1;
0059a9cf          int32_t edx_2 = *(int32_t*)((char*)Timer::cur_time + 4);
0059a9d5          *(int32_t*)((char*)this + 0x1ac) = (*(uint32_t*)Timer::cur_time);
0059a992          this->m_timeFirstDirtied = edx_2;
0059a9c1      }
0059a8e0  }

0059a9e6                    8b ff                                                                                ..
0059a9e8  uint32_t jump_table_59a9e8[0x7] = 
0059a9e8  {
0059a9e8      [0x0] =  0x0059a968
0059a9ec      [0x1] =  0x0059a920
0059a9f0      [0x2] =  0x0059a90b
0059a9f4      [0x3] =  0x0059a952
0059a9f8      [0x4] =  0x0059a97e
0059a9fc      [0x5] =  0x0059a93e
0059aa00      [0x6] =  0x0059a992
0059aa04  }
0059aa04  uint8_t lookup_table_59aa04[0x2f] = 
0059aa04  {
0059aa04      [0x00] =  0x00
0059aa05      [0x01] =  0x06
0059aa06      [0x02] =  0x01
0059aa07      [0x03] =  0x02
0059aa08      [0x04] =  0x06
0059aa09      [0x05] =  0x03
0059aa0a      [0x06] =  0x06
0059aa0b      [0x07] =  0x06
0059aa0c      [0x08] =  0x06
0059aa0d      [0x09] =  0x06
0059aa0e      [0x0a] =  0x06
0059aa0f      [0x0b] =  0x06
0059aa10      [0x0c] =  0x06
0059aa11      [0x0d] =  0x06
0059aa12      [0x0e] =  0x06
0059aa13      [0x0f] =  0x06
0059aa14      [0x10] =  0x04
0059aa15      [0x11] =  0x06
0059aa16      [0x12] =  0x06
0059aa17      [0x13] =  0x06
0059aa18      [0x14] =  0x06
0059aa19      [0x15] =  0x06
0059aa1a      [0x16] =  0x06
0059aa1b      [0x17] =  0x06
0059aa1c      [0x18] =  0x06
0059aa1d      [0x19] =  0x06
0059aa1e      [0x1a] =  0x06
0059aa1f      [0x1b] =  0x06
0059aa20      [0x1c] =  0x06
0059aa21      [0x1d] =  0x06
0059aa22      [0x1e] =  0x06
0059aa23      [0x1f] =  0x06
0059aa24      [0x20] =  0x06
0059aa25      [0x21] =  0x06
0059aa26      [0x22] =  0x06
0059aa27      [0x23] =  0x06
0059aa28      [0x24] =  0x06
0059aa29      [0x25] =  0x06
0059aa2a      [0x26] =  0x06
0059aa2b      [0x27] =  0x06
0059aa2c      [0x28] =  0x06
0059aa2d      [0x29] =  0x06
0059aa2e      [0x2a] =  0x06
0059aa2f      [0x2b] =  0x06
0059aa30      [0x2c] =  0x06
0059aa31      [0x2d] =  0x06
0059aa32      [0x2e] =  0x05
0059aa33  }

0059aa33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0059aa40  void PrimD3DRender::ScreenToViewTransform(class AC1Legacy::Vector3* arg1, float arg2, float arg3)

0059aa40  {
0059aa46      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059aa4c      uint32_t m_viewportWidth = RenderDevice::render_device_1->m_viewportWidth;
0059aa53      uint32_t m_viewportHeight = RenderDevice::render_device_1->m_viewportHeight;
0059aa6a      float var_80;
0059aa6a      __builtin_memcpy(&var_80, &RenderDevice::render_device_1->m_GState.ViewToClipMatrix, 0x40);
0059aa86      void var_40;
0059aa86      __builtin_memcpy(&var_40, &RenderDevice::render_device_1->m_GState.WorldToViewMatrix, 0x40);
0059aa8f      float var_c0;
0059aa8f      _D3DXMatrixInverse@12(&var_c0, 0, &var_40);
0059aa96      long double x87_r7 = ((long double)arg2);
0059aaa3      long double x87_r6 = ((long double)m_viewportWidth);
0059aaa3      
0059aaa7      if (m_viewportWidth < 0)
0059aaa9          x87_r6 = (x87_r6 + ((long double)4.2949673e+09f));
0059aaa9      
0059aabd      long double x87_r7_4 = ((((x87_r7 + x87_r7) / x87_r6) - ((long double)1f)) / ((long double)var_80));
0059aac1      long double x87_r6_1 = ((long double)arg3);
0059aaca      long double x87_r5 = ((long double)m_viewportHeight);
0059aaca      
0059aace      if (m_viewportHeight < 0)
0059aad0          x87_r5 = (x87_r5 + ((long double)4.2949673e+09f));
0059aad0      
0059aaf3      float var_6c;
0059aaf3      long double x87_r6_5 = ((((x87_r6_1 + x87_r6_1) / x87_r5) - ((long double)1f)) * (((long double)-1f) / ((long double)var_6c)));
0059ab07      float var_b0;
0059ab07      float var_a0;
0059ab07      arg1->x = ((float)(((((long double)var_b0) * x87_r6_5) + (((long double)var_c0) * x87_r7_4)) + ((long double)var_a0)));
0059ab1b      float var_bc;
0059ab1b      float var_ac;
0059ab1b      float var_9c;
0059ab1b      arg1->z = ((float)(((((long double)var_ac) * x87_r6_5) + (((long double)var_bc) * x87_r7_4)) + ((long double)var_9c)));
0059ab30      float var_b8;
0059ab30      float var_a8;
0059ab30      float var_98;
0059ab30      arg1->y = ((float)(((((long double)var_a8) * x87_r6_5) + (((long double)var_b8) * x87_r7_4)) + ((long double)var_98)));
0059aa40  }

0059ab3e                                                                                            90 90                                ..

0059ab40  void __thiscall PrimD3DRender::SetFOVInternal(class PrimD3DRender* this, float arg2)

0059ab40  {
0059ab49      Render::SetFOVInternal(this, arg2);
0059ab53      float Render::znear_1 = Render::znear;
0059ab67      float Render::znear_2 = Render::znear_1;
0059ab71      void var_40;
0059ab71      _D3DXMatrixPerspectiveFovLH@20(&var_40, arg2, ((float)((long double)RenderDevice::render_device->m_ViewportAspectRatio)), Render::znear_1, Render::zfar);
0059ab81      RenderDeviceD3D::SetViewToClipMatrix(RenderDevice::render_device, &var_40);
0059ab40  }

0059ab8d                                         90 90 90                                                               ...

0059ab90  class AC1Legacy::Vector3* __thiscall LIGHTINFO::GetDirection(class LIGHTINFO const* this, class AC1Legacy::Vector3* __return)

0059ab90  {
0059ab90      int32_t type = this->type;
0059ab90      
0059ab9a      if ((type == 1 || type == 2))
0059ab9a      {
0059abb6          Frame::get_vector_heading(&this->offset, __return);
0059abbe          return __return;
0059ab9a      }
0059ab9a      
0059aba2      __return->x = 0;
0059aba4      __return->y = 0f;
0059aba7      __return->z = 0f;
0059abaa      return __return;
0059ab90  }

0059abc1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0059abd0  void PrimD3DRender::CleanupInternal(class PrimD3DRender* this @ ecx)

0059abd0  {
0059abd0      struct _D3DLIGHT9* PrimD3DRender::pD3DSunlight_1 = PrimD3DRender::pD3DSunlight;
0059abd0      
0059abd7      if (PrimD3DRender::pD3DSunlight_1 != 0)
0059abd7      {
0059abda          operator delete(PrimD3DRender::pD3DSunlight_1);
0059abe2          PrimD3DRender::pD3DSunlight = nullptr;
0059abd7      }
0059abd0  }

0059abed                                         90 90 90                                                               ...

0059abf0  HRESULT PrimD3DRender::InitializeLights()

0059abf0  {
0059abf9      int32_t var_c = 0;
0059abfd      int32_t var_4 = 0;
0059ac01      Render::world_lights.ambient_color.r = 0;
0059ac07      Render::world_lights.ambient_color.g = 0f;
0059ac0d      Render::world_lights.ambient_color.b = 0f;
0059ac13      int32_t var_c_1 = 0;
0059ac17      Render::world_lights.sunlight.x = 0;
0059ac1d      Render::world_lights.sunlight.y = 0f;
0059ac2f      int32_t var_8 = 0;
0059ac3f      int32_t var_8_1 = 0;
0059ac43      Render::world_lights.sunlight.z = -1f;
0059ac49      Render::world_lights.sunlight_color.r = 0x3f800000;
0059ac67      Render::world_lights.m_Sunlight.d3dLight.Type = 3;
0059ac71      Render::world_lights.m_Sunlight.d3dLight.Ambient.r = 0;
0059ac7b      Render::world_lights.m_Sunlight.d3dLight.Ambient.g = 0f;
0059ac85      Render::world_lights.m_Sunlight.d3dLight.Ambient.b = 0f;
0059ac8f      Render::world_lights.m_Sunlight.d3dLight.Ambient.a = 1f;
0059ac99      Render::world_lights.m_Sunlight.d3dLight.Diffuse.r = 0x3f800000;
0059aca3      Render::world_lights.m_Sunlight.d3dLight.Diffuse.g = 1f;
0059acad      Render::world_lights.m_Sunlight.d3dLight.Diffuse.b = 1f;
0059acb7      Render::world_lights.m_Sunlight.d3dLight.Diffuse.a = 1f;
0059acc1      Render::world_lights.m_Sunlight.d3dLight.Specular.r = 0x3f800000;
0059accb      Render::world_lights.m_Sunlight.d3dLight.Specular.g = 1f;
0059acd5      Render::world_lights.m_Sunlight.d3dLight.Specular.b = 1f;
0059acdf      Render::world_lights.m_Sunlight.d3dLight.Specular.a = 1f;
0059ace9      Render::world_lights.m_Sunlight.d3dLight.Direction.x = 0;
0059acf3      Render::world_lights.m_Sunlight.d3dLight.Direction.y = -1f;
0059acfd      Render::world_lights.m_Sunlight.d3dLight.Direction.z = 0f;
0059ad07      Render::world_lights.m_Sunlight.d3dLightIndex = 0;
0059ad0c      Render::world_lights.sunlight_color.g = 1f;
0059ad12      Render::world_lights.sunlight_color.b = 1f;
0059ad18      Render::world_lights.m_bSunlightValid = 0;
0059ad1d      Render::reset_active_lights_state();
0059ad22      Render::reset_active_lights_state();
0059ad2c      return 0;
0059abf0  }

0059ad2d                                         90 90 90                                                               ...

0059ad30  int32_t PrimD3DRender::config_hardware_light(int32_t arg1, struct _D3DLIGHT9* arg2, uint32_t arg3, class LIGHTINFO* arg4)

0059ad30  {
0059ad43      if (*(int32_t*)((char*)RenderDevice::render_device + 0x468) == 0)
0059aec1          return 0;
0059aec1      
0059ad58      long double x87_r7_1 = (((long double)arg4->color.r) * ((long double)arg4->intensity));
0059ad60      int32_t __return_5 = 0;
0059ad64      arg2->Diffuse.r = ((float)x87_r7_1);
0059ad67      int32_t var_c = 0;
0059ad6e      int32_t var_8 = 0;
0059ad72      long double x87_r7_3 = (((long double)arg4->color.g) * ((long double)arg4->intensity));
0059ad75      int32_t var_4 = 0;
0059ad79      __return_5 = 0;
0059ad7d      int32_t var_c_1 = 0;
0059ad81      arg2->Diffuse.g = ((float)x87_r7_3);
0059ad84      int32_t var_8_1 = 0;
0059ad8b      int32_t var_4_1 = 0;
0059ad5d      arg2->Specular.r = 0;
0059ad5d      arg2->Specular.g = 0f;
0059ad5d      arg2->Specular.b = 0f;
0059ad5d      arg2->Specular.a = 0f;
0059ad9d      arg2->Diffuse.b = ((float)(((long double)arg4->color.b) * ((long double)arg4->intensity)));
0059ada0      arg2->Ambient.r = 0;
0059ada0      arg2->Ambient.g = 0f;
0059ada0      arg2->Ambient.b = 0f;
0059ada0      arg2->Ambient.a = 0f;
0059adae      int32_t type = arg4->type;
0059adae      
0059adb2      if (type == 0)
0059adb2      {
0059ae77          arg2->Type = 1;
0059ae7d          arg2->Falloff = 1f;
0059ae8d          arg2->Range = ((float)(((long double)arg4->falloff) * ((long double)rangeAdjust)));
0059ae93          arg2->Position.x = arg4->offset.m_fOrigin.x;
0059ae99          arg2->Position.y = arg4->offset.m_fOrigin.z;
0059ae9f          arg2->Position.z = arg4->offset.m_fOrigin.y;
0059aea2      label_59aea2:
0059aea2          arg2->Attenuation0 = 0f;
0059aea5          arg2->Attenuation1 = 1f;
0059aeac          arg2->Attenuation2 = 0f;
0059adb2      }
0059adb2      else
0059adb2      {
0059adb9          if (type == 1)
0059adb9          {
0059ae37              arg2->Type = 3;
0059ae48              void __return_3;
0059ae48              arg2->Direction.x = LIGHTINFO::GetDirection(arg4, &__return_3)->x;
0059ae5d              void __return_4;
0059ae5d              arg2->Direction.y = LIGHTINFO::GetDirection(arg4, &__return_4)->z;
0059ae69              arg2->Direction.z = LIGHTINFO::GetDirection(arg4, &__return_5)->y;
0059ae76              return 1;
0059adb9          }
0059adb9          
0059adbc          if (type == 2)
0059adbc          {
0059adc2              arg2->Type = 2;
0059adc8              arg2->Falloff = 1f;
0059add8              arg2->Range = ((float)(((long double)arg4->falloff) * ((long double)rangeAdjust)));
0059adde              arg2->Theta = arg4->cone_angle;
0059ade4              arg2->Phi = arg4->cone_angle;
0059adea              arg2->Position.x = arg4->offset.m_fOrigin.x;
0059adf0              arg2->Position.y = arg4->offset.m_fOrigin.z;
0059adfd              arg2->Position.z = arg4->offset.m_fOrigin.y;
0059ae0b              void __return;
0059ae0b              arg2->Direction.x = LIGHTINFO::GetDirection(arg4, &__return)->x;
0059ae20              void __return_1;
0059ae20              arg2->Direction.y = LIGHTINFO::GetDirection(arg4, &__return_1)->z;
0059ae2b              void __return_2;
0059ae2b              arg2->Direction.z = LIGHTINFO::GetDirection(arg4, &__return_2)->y;
0059ae2e              goto label_59aea2;
0059adbc          }
0059adb2      }
0059adb2      
0059aeba      return 1;
0059ad30  }

0059aec2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0059aed0  void PrimD3DRender::UpdateLightsInternal(class PrimD3DRender const* this @ ecx)

0059aed0  {
0059aee2      float __return = ((float)(((long double)Render::world_lights.ambient_color.r) * ((long double)ambientBoostFactor)));
0059aef2      float var_54 = ((float)(((long double)Render::world_lights.ambient_color.g) * ((long double)ambientBoostFactor)));
0059af02      float var_50 = ((float)(((long double)ambientBoostFactor) * ((long double)Render::world_lights.ambient_color.b)));
0059af06      long double x87_r7_6 = ((long double)__return);
0059af0a      long double temp1 = ((long double)1f);
0059af0a      (x87_r7_6 - temp1);
0059af10      int32_t eax;
0059af10      eax = ((((x87_r7_6 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp1) ? 1 : 0) << 0xe) | 0))));
0059af15      int32_t esi;
0059af15      
0059af15      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
0059af15      {
0059af1e          long double x87_r7_7 = ((long double)__return);
0059af22          long double temp2_1 = ((long double)0f);
0059af22          (x87_r7_7 - temp2_1);
0059af28          eax = ((((x87_r7_7 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0059af2a          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0059af2a          
0059af2d          if (p_1)
0059af48              esi = _ftol2();
0059af2d          else
0059af2f              esi = 0;
0059af15      }
0059af15      else
0059af17          esi = 0xff;
0059af17      
0059af4a      long double x87_r7_11 = ((long double)var_54);
0059af4e      long double temp3 = ((long double)1f);
0059af4e      (x87_r7_11 - temp3);
0059af54      eax = ((((x87_r7_11 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp3) ? 1 : 0) << 0xe) | 0))));
0059af59      int32_t edi;
0059af59      
0059af59      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
0059af59      {
0059af62          long double x87_r7_12 = ((long double)var_54);
0059af66          long double temp4_1 = ((long double)0f);
0059af66          (x87_r7_12 - temp4_1);
0059af6c          eax = ((((x87_r7_12 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0059af6e          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0059af6e          
0059af71          if (p_2)
0059af8c              edi = _ftol2();
0059af71          else
0059af73              edi = 0;
0059af59      }
0059af59      else
0059af5b          edi = 0xff;
0059af5b      
0059af8e      long double x87_r7_16 = ((long double)var_50);
0059af92      long double temp5 = ((long double)1f);
0059af92      (x87_r7_16 - temp5);
0059af98      eax = ((((x87_r7_16 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_16, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7_16 == temp5) ? 1 : 0) << 0xe) | 0))));
0059af9d      int32_t eax_1;
0059af9d      
0059af9d      if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
0059af9d      {
0059afa6          long double x87_r7_17 = ((long double)var_50);
0059afaa          long double temp6_1 = ((long double)0f);
0059afaa          (x87_r7_17 - temp6_1);
0059afb0          eax = ((((x87_r7_17 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp6_1) ? 1 : 0) << 0xe) | 0))));
0059afb2          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
0059afb2          
0059afb5          if (p_3)
0059afcb              eax_1 = _ftol2();
0059afb5          else
0059afb7              eax_1 = 0;
0059af9d      }
0059af9d      else
0059af9f          eax_1 = 0xff;
0059af9f      
0059afde      int32_t esi_5 = (((((esi | 0xffffff00) << 8) | edi) << 8) | eax_1);
0059b007      __return = ((float)(((long double)((uint32_t)((int8_t)(esi_5 >> 0x10)))) * ((long double)0.00392156886f)));
0059b01c      float var_54_1 = ((float)(((long double)((uint32_t)((int8_t)(esi_5 >> 8)))) * ((long double)0.00392156886f)));
0059b02e      float var_50_1 = ((float)(((long double)((uint32_t)esi_5)) * ((long double)0.00392156886f)));
0059b03c      float var_4c = ((float)(((long double)(esi_5 >> 0x18)) * ((long double)0.00392156886f)));
0059b040      long double x87_r7_29 = ((long double)__return);
0059b044      long double temp7 = ((long double)1f);
0059b044      (x87_r7_29 - temp7);
0059b04a      uint32_t eax_3;
0059b04a      eax_3 = ((((x87_r7_29 < temp7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_29, temp7))) ? 1 : 0) << 0xa) | ((((x87_r7_29 == temp7) ? 1 : 0) << 0xe) | 0))));
0059b04f      uint32_t ebx;
0059b04f      
0059b04f      if ((*(uint8_t*)((char*)eax_3)[1] & 1) != 0)
0059b04f      {
0059b058          long double x87_r7_30 = ((long double)__return);
0059b05c          long double temp8_1 = ((long double)0f);
0059b05c          (x87_r7_30 - temp8_1);
0059b062          eax_3 = ((((x87_r7_30 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_30, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_30 == temp8_1) ? 1 : 0) << 0xe) | 0))));
0059b064          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
0059b064          
0059b067          if (p_4)
0059b082              ebx = _ftol2();
0059b067          else
0059b069              ebx = 0;
0059b04f      }
0059b04f      else
0059b051          ebx = 0xff;
0059b051      
0059b084      long double x87_r7_34 = ((long double)var_54_1);
0059b088      long double temp9 = ((long double)1f);
0059b088      (x87_r7_34 - temp9);
0059b08e      eax_3 = ((((x87_r7_34 < temp9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_34, temp9))) ? 1 : 0) << 0xa) | ((((x87_r7_34 == temp9) ? 1 : 0) << 0xe) | 0))));
0059b093      uint32_t edi_1;
0059b093      
0059b093      if ((*(uint8_t*)((char*)eax_3)[1] & 1) != 0)
0059b093      {
0059b09c          long double x87_r7_35 = ((long double)var_54_1);
0059b0a0          long double temp10_1 = ((long double)0f);
0059b0a0          (x87_r7_35 - temp10_1);
0059b0a6          eax_3 = ((((x87_r7_35 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_35, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_35 == temp10_1) ? 1 : 0) << 0xe) | 0))));
0059b0a8          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
0059b0a8          
0059b0ab          if (p_5)
0059b0c6              edi_1 = _ftol2();
0059b0ab          else
0059b0ad              edi_1 = 0;
0059b093      }
0059b093      else
0059b095          edi_1 = 0xff;
0059b095      
0059b0c8      long double x87_r7_39 = ((long double)var_50_1);
0059b0cc      long double temp11 = ((long double)1f);
0059b0cc      (x87_r7_39 - temp11);
0059b0d2      eax_3 = ((((x87_r7_39 < temp11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_39, temp11))) ? 1 : 0) << 0xa) | ((((x87_r7_39 == temp11) ? 1 : 0) << 0xe) | 0))));
0059b0d7      uint32_t esi_6;
0059b0d7      
0059b0d7      if ((*(uint8_t*)((char*)eax_3)[1] & 1) != 0)
0059b0d7      {
0059b0e0          long double x87_r7_40 = ((long double)var_50_1);
0059b0e4          long double temp12_1 = ((long double)0f);
0059b0e4          (x87_r7_40 - temp12_1);
0059b0ea          eax_3 = ((((x87_r7_40 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_40, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7_40 == temp12_1) ? 1 : 0) << 0xe) | 0))));
0059b0ec          bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x41} */;
0059b0ec          
0059b0ef          if (p_6)
0059b10a              esi_6 = _ftol2();
0059b0ef          else
0059b0f1              esi_6 = 0;
0059b0d7      }
0059b0d7      else
0059b0d9          esi_6 = 0xff;
0059b0d9      
0059b10c      long double x87_r7_44 = ((long double)var_4c);
0059b110      long double temp13 = ((long double)1f);
0059b110      (x87_r7_44 - temp13);
0059b116      eax_3 = ((((x87_r7_44 < temp13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_44, temp13))) ? 1 : 0) << 0xa) | ((((x87_r7_44 == temp13) ? 1 : 0) << 0xe) | 0))));
0059b11b      int32_t eax_4;
0059b11b      
0059b11b      if ((*(uint8_t*)((char*)eax_3)[1] & 1) != 0)
0059b11b      {
0059b124          long double x87_r7_45 = ((long double)var_4c);
0059b128          long double temp14_1 = ((long double)0f);
0059b128          (x87_r7_45 - temp14_1);
0059b12e          eax_3 = ((((x87_r7_45 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_45, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r7_45 == temp14_1) ? 1 : 0) << 0xe) | 0))));
0059b130          bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x41} */;
0059b130          
0059b133          if (p_7)
0059b149              eax_4 = _ftol2();
0059b133          else
0059b135              eax_4 = 0;
0059b11b      }
0059b11b      else
0059b11d          eax_4 = 0xff;
0059b11d      
0059b165      RenderDeviceD3D::SetFFAmbientColor32(RenderDevice::render_device, ((((((eax_4 << 8) | ebx) << 8) | edi_1) << 8) | esi_6));
0059b16f      int32_t edi_2 = 0;
0059b17d      int32_t var_64;
0059b17d      int32_t var_48;
0059b17d      
0059b17d      if (Render::world_lights.num_static_lights > 0)
0059b17d      {
0059b183          var_64 = 0;
0059b187          int32_t var_60_1 = 0;
0059b18b          int32_t var_5c_1 = 0;
0059b327          bool cond:2_1;
0059b327          
0059b327          do
0059b327          {
0059b190              void* esi_7 = Render::world_lights.sorted_static_lights[edi_2];
0059b19a              int32_t var_44_1 = *(uint32_t*)((char*)esi_7 + 0x6c);
0059b1ac              int32_t var_c_1 = *(uint32_t*)((char*)esi_7 + 0xa8);
0059b1b3              int32_t var_8_1 = *(uint32_t*)((char*)esi_7 + 0xac);
0059b1ba              int32_t var_4_1 = *(uint32_t*)((char*)esi_7 + 0xb0);
0059b1c1              int32_t var_40_1 = *(uint32_t*)((char*)esi_7 + 0x74);
0059b1cb              int32_t var_3c_1 = *(uint32_t*)((char*)esi_7 + 0x78);
0059b1d5              int32_t var_38_1 = *(uint32_t*)((char*)esi_7 + 0x7c);
0059b1df              int32_t var_34_1 = *(uint32_t*)((char*)esi_7 + 0x80);
0059b1e9              int32_t var_30_1 = *(uint32_t*)((char*)esi_7 + 0x84);
0059b1f3              int32_t var_2c_1 = *(uint32_t*)((char*)esi_7 + 0x88);
0059b1fd              int32_t var_28_1 = *(uint32_t*)((char*)esi_7 + 0x8c);
0059b207              int32_t var_24_1 = *(uint32_t*)((char*)esi_7 + 0x90);
0059b211              int32_t var_20_1 = *(uint32_t*)((char*)esi_7 + 0x94);
0059b21b              int32_t var_1c_1 = *(uint32_t*)((char*)esi_7 + 0x98);
0059b225              int32_t var_18_1 = *(uint32_t*)((char*)esi_7 + 0x9c);
0059b22d              int32_t var_14_1 = *(uint32_t*)((char*)esi_7 + 0xa0);
0059b232              int32_t var_10_1 = *(uint32_t*)((char*)esi_7 + 0xa4);
0059b245              var_48 = 0x796910;
0059b24d              class AC1Legacy::Vector3* eax_18 = Position::localtolocal(&Render::viewer_pos, &__return, &var_48, &var_64);
0059b25a              *(uint32_t*)((char*)esi_7 + 0xb4) = eax_18->x;
0059b25f              *(uint32_t*)((char*)esi_7 + 0xb8) = eax_18->y;
0059b265              *(uint32_t*)((char*)esi_7 + 0xbc) = eax_18->z;
0059b26e              void* eax_19 = Render::world_lights.sorted_static_lights[edi_2];
0059b295              long double x87_r7_52 = (((((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[6]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xbc))) + (((long double)Render::viewer_pos.frame.m_fl2gv[0]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xb4)))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[3]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xb8))));
0059b2c3              long double x87_r6_8 = (((((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[4]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xb8))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[7]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xbc)))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[1]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xb4))));
0059b2c5              long double x87_r6_9 = (x87_r6_8 + ((long double)Render::viewer_pos.frame.m_fOrigin.y));
0059b2f1              long double x87_r5_8 = (((((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[5]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xb8))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[2]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xb4)))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[8]) * ((long double)*(uint32_t*)((char*)eax_19 + 0xbc))));
0059b2f3              long double x87_r5_9 = (x87_r5_8 + ((long double)Render::viewer_pos.frame.m_fOrigin.z));
0059b2fb              edi_2 += 1;
0059b2fc              *(uint32_t*)((char*)eax_19 + 0x34) = ((float)(x87_r7_52 + ((long double)Render::viewer_pos.frame.m_fOrigin.x)));
0059b308              *(uint32_t*)(&*(uint13200_t*)Render::world_lights.static_lights[0x3b].distancesq[edi_2] + 0x38) = ((float)x87_r5_9);
0059b30b              void* ecx_13 = &*(uint13200_t*)Render::world_lights.static_lights[0x3b].distancesq[edi_2];
0059b312              var_48 = 0x79285c;
0059b316              *(uint32_t*)((char*)ecx_13 + 0x3c) = ((float)x87_r6_9);
0059b31e              cond:2_1 = edi_2 < Render::world_lights.num_static_lights;
0059b320              *(uint32_t*)((edi_2 << 2) + &data_8460c4) = 1;
0059b327          } while (cond:2_1);
0059b17d      }
0059b17d      
0059b332      int32_t edi_3 = 0;
0059b332      
0059b336      if (Render::world_lights.num_dynamic_lights > 0)
0059b336      {
0059b33c          var_64 = 0;
0059b340          int32_t var_60_2 = 0;
0059b344          int32_t var_5c_2 = 0;
0059b4e7          bool cond:3_1;
0059b4e7          
0059b4e7          do
0059b4e7          {
0059b350              void* esi_9 = Render::world_lights.sorted_dynamic_lights[edi_3];
0059b35a              int32_t var_44_2 = *(uint32_t*)((char*)esi_9 + 0x6c);
0059b36c              int32_t var_c_2 = *(uint32_t*)((char*)esi_9 + 0xa8);
0059b373              int32_t var_8_2 = *(uint32_t*)((char*)esi_9 + 0xac);
0059b37a              int32_t var_4_2 = *(uint32_t*)((char*)esi_9 + 0xb0);
0059b381              int32_t var_40_2 = *(uint32_t*)((char*)esi_9 + 0x74);
0059b38b              int32_t var_3c_2 = *(uint32_t*)((char*)esi_9 + 0x78);
0059b395              int32_t var_38_2 = *(uint32_t*)((char*)esi_9 + 0x7c);
0059b39f              int32_t var_34_2 = *(uint32_t*)((char*)esi_9 + 0x80);
0059b3a9              int32_t var_30_2 = *(uint32_t*)((char*)esi_9 + 0x84);
0059b3b3              int32_t var_2c_2 = *(uint32_t*)((char*)esi_9 + 0x88);
0059b3bd              int32_t var_28_2 = *(uint32_t*)((char*)esi_9 + 0x8c);
0059b3c7              int32_t var_24_2 = *(uint32_t*)((char*)esi_9 + 0x90);
0059b3d1              int32_t var_20_2 = *(uint32_t*)((char*)esi_9 + 0x94);
0059b3db              int32_t var_1c_2 = *(uint32_t*)((char*)esi_9 + 0x98);
0059b3e5              int32_t var_18_2 = *(uint32_t*)((char*)esi_9 + 0x9c);
0059b3ed              int32_t var_14_2 = *(uint32_t*)((char*)esi_9 + 0xa0);
0059b3f2              int32_t var_10_2 = *(uint32_t*)((char*)esi_9 + 0xa4);
0059b405              var_48 = 0x796910;
0059b40d              class AC1Legacy::Vector3* eax_28 = Position::localtolocal(&Render::viewer_pos, &__return, &var_48, &var_64);
0059b41a              *(uint32_t*)((char*)esi_9 + 0xb4) = eax_28->x;
0059b41f              *(uint32_t*)((char*)esi_9 + 0xb8) = eax_28->y;
0059b425              *(uint32_t*)((char*)esi_9 + 0xbc) = eax_28->z;
0059b42e              void* eax_29 = Render::world_lights.sorted_dynamic_lights[edi_3];
0059b455              long double x87_r7_59 = (((((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[3]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xb8))) + (((long double)Render::viewer_pos.frame.m_fl2gv[0]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xb4)))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[6]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xbc))));
0059b483              long double x87_r6_18 = (((((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[4]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xb8))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[1]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xb4)))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[7]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xbc))));
0059b485              long double x87_r6_19 = (x87_r6_18 + ((long double)Render::viewer_pos.frame.m_fOrigin.y));
0059b4b1              long double x87_r5_18 = (((((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[5]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xb8))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[2]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xb4)))) + (((long double)*(uint36_t*)Render::viewer_pos.frame.m_fl2gv[8]) * ((long double)*(uint32_t*)((char*)eax_29 + 0xbc))));
0059b4b3              long double x87_r5_19 = (x87_r5_18 + ((long double)Render::viewer_pos.frame.m_fOrigin.z));
0059b4bb              edi_3 += 1;
0059b4bc              *(uint32_t*)((char*)eax_29 + 0x34) = ((float)(x87_r7_59 + ((long double)Render::viewer_pos.frame.m_fOrigin.x)));
0059b4c8              *(uint32_t*)(&*(uint2200_t*)Render::world_lights.dynamic_lights[9].distancesq[edi_3] + 0x38) = ((float)x87_r5_19);
0059b4cb              void* ecx_21 = &*(uint2200_t*)Render::world_lights.dynamic_lights[9].distancesq[edi_3];
0059b4d2              var_48 = 0x79285c;
0059b4d6              *(uint32_t*)((char*)ecx_21 + 0x3c) = ((float)x87_r6_19);
0059b4de              cond:3_1 = edi_3 < Render::world_lights.num_dynamic_lights;
0059b4e0              degmulhist[(0x1d + edi_3)] = 1;
0059b4e7          } while (cond:3_1);
0059b336      }
0059b336      
0059b4ed      int32_t eax_31;
0059b4ed      eax_31 = Render::world_lights.m_bSunlightValid;
0059b4ed      
0059b4f5      if (eax_31 == 0)
0059b4f5      {
0059b501          long double x87_r7_64 = fabsl(((long double)Render::world_lights.sunlight.x));
0059b503          long double x87_r6_21 = ((long double)0.000199999995f);
0059b509          (x87_r6_21 - x87_r7_64);
0059b50b          eax_31 = ((((x87_r6_21 < x87_r7_64) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_21, x87_r7_64))) ? 1 : 0) << 0xa) | ((((x87_r6_21 == x87_r7_64) ? 1 : 0) << 0xe) | 0))));
0059b50b          
0059b510          if ((*(uint8_t*)((char*)eax_31)[1] & 0x41) != 0)
0059b510          {
0059b544          label_59b544:
0059b54a              Render::world_lights.m_Sunlight.d3dLight.Diffuse.a = 1f;
0059b554              long double x87_r7_70 = (((long double)Render::world_lights.sunlight.y) * ((long double)Render::world_lights.sunlight.y));
0059b55a              Render::world_lights.m_bSunlightValid = 1;
0059b57c              long double x87_r7_73 = sqrtl(((x87_r7_70 + (((long double)Render::world_lights.sunlight.z) * ((long double)Render::world_lights.sunlight.z))) + (((long double)Render::world_lights.sunlight.x) * ((long double)Render::world_lights.sunlight.x))));
0059b586              Render::world_lights.m_Sunlight.d3dLight.Diffuse.r = ((float)(((long double)Render::world_lights.sunlight_color.r) * x87_r7_73));
0059b594              Render::world_lights.m_Sunlight.d3dLight.Diffuse.g = ((float)(((long double)Render::world_lights.sunlight_color.g) * x87_r7_73));
0059b5a2              Render::world_lights.m_Sunlight.d3dLight.Diffuse.b = ((float)(((long double)Render::world_lights.sunlight_color.b) * x87_r7_73));
0059b5b2              Render::world_lights.m_Sunlight.d3dLight.Direction.x = ((float)-(((long double)Render::world_lights.sunlight.x)));
0059b5c0              Render::world_lights.m_Sunlight.d3dLight.Direction.y = ((float)-(((long double)Render::world_lights.sunlight.z)));
0059b5ce              Render::world_lights.m_Sunlight.d3dLight.Direction.z = ((float)-(((long double)Render::world_lights.sunlight.y)));
0059b510          }
0059b510          else
0059b510          {
0059b518              long double x87_r7_66 = fabsl(((long double)Render::world_lights.sunlight.y));
0059b51a              long double x87_r6_22 = ((long double)0.000199999995f);
0059b520              (x87_r6_22 - x87_r7_66);
0059b522              eax_31 = ((((x87_r6_22 < x87_r7_66) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_22, x87_r7_66))) ? 1 : 0) << 0xa) | ((((x87_r6_22 == x87_r7_66) ? 1 : 0) << 0xe) | 0))));
0059b522              
0059b527              if ((*(uint8_t*)((char*)eax_31)[1] & 0x41) != 0)
0059b527                  goto label_59b544;
0059b527              
0059b52f              long double x87_r7_68 = fabsl(((long double)Render::world_lights.sunlight.z));
0059b531              long double x87_r6_23 = ((long double)0.000199999995f);
0059b537              (x87_r6_23 - x87_r7_68);
0059b539              eax_31 = ((((x87_r6_23 < x87_r7_68) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_23, x87_r7_68))) ? 1 : 0) << 0xa) | ((((x87_r6_23 == x87_r7_68) ? 1 : 0) << 0xe) | 0))));
0059b539              
0059b53e              if ((*(uint8_t*)((char*)eax_31)[1] & 0x41) != 0)
0059b53e                  goto label_59b544;
0059b510          }
0059b4f5      }
0059aed0  }

0059b34a                                8d 9b 00 00 00 00                                                            ......
0059b5db                                                                                   90 90 90 90 90                             .....

0059b5e0  void __stdcall PrimD3DRender::positionPushInternal(class PrimD3DRender const* this @ ecx, int32_t const arg2, class Position* arg3)

0059b5e0  {
0059b5e4      int32_t ebx;
0059b5e4      ebx = arg2;
0059b5e4      
0059b5eb      if ((ebx & 1) != 0)
0059b5eb      {
0059b5ed          int32_t Render::FramePushCount_1 = Render::FramePushCount;
0059b5f7          Render::FramePushCount = (Render::FramePushCount_1 + 1);
0059b5fc          class Frame* var_20_1;
0059b5fc          class Frame* ecx_1;
0059b5fc          
0059b5fc          if (Render::FramePushCount_1 != 0)
0059b5fc          {
0059b629              struct frameContext* eax_5 = &Render::FrameCurrent[1];
0059b62e              Render::FrameCurrent = eax_5;
0059b63c              var_20_1 = &arg3->frame;
0059b636              eax_5->position.objcell_id = arg3->objcell_id;
0059b640              ecx_1 = &eax_5->position.frame.qw;
0059b5fc          }
0059b5fc          else
0059b5fc          {
0059b602              Render::FrameCurrent = &Render::FrameStack;
0059b612              Render::FrameStack[0].position.objcell_id = arg3->objcell_id;
0059b618              var_20_1 = &arg3->frame;
0059b619              ecx_1 = &Render::FrameStack[0].position.frame;
0059b5fc          }
0059b5fc          
0059b643          Frame::operator=(ecx_1, var_20_1);
0059b5eb      }
0059b5eb      
0059b64c      if ((ebx & 2) != 0)
0059b64c      {
0059b66b          float __return = 0f;
0059b673          float var_14_1 = 0f;
0059b67b          float var_10_1 = 0f;
0059b683          void __return_1;
0059b683          class AC1Legacy::Vector3* eax_7 = Position::localtolocal(&Render::FrameCurrent->position, &__return_1, &Render::viewer_pos, &__return);
0059b68a          int32_t* Render::FrameCurrent_2 = Render::FrameCurrent;
0059b690          *(uint32_t*)Render::FrameCurrent_2 = eax_7->x;
0059b695          Render::FrameCurrent_2[1] = eax_7->y;
0059b69b          Render::FrameCurrent_2[2] = eax_7->z;
0059b69e          struct frameContext* Render::FrameCurrent_1 = Render::FrameCurrent;
0059b6ab          Render::FrameCurrent_1->viewer.viewpoint.x = ((float)(((long double)Render::FrameCurrent_1->viewer.viewpoint.x) / ((long double)Render::object_scale_vec.x)));
0059b6b6          Render::FrameCurrent_1->viewer.viewpoint.y = ((float)(((long double)Render::FrameCurrent_1->viewer.viewpoint.y) / ((long double)Render::object_scale_vec.y)));
0059b6c2          Render::FrameCurrent_1->viewer.viewpoint.z = ((float)(((long double)Render::FrameCurrent_1->viewer.viewpoint.z) / ((long double)Render::object_scale_vec.z)));
0059b6d1          class Vector3* ecx_9 = &Render::FrameCurrent->object_scale_vec;
0059b6d4          ecx_9->x = Render::object_scale_vec.x;
0059b6db          ecx_9->y = Render::object_scale_vec.y;
0059b6e4          ecx_9->z = Render::object_scale_vec.z;
0059b6ed          Render::FrameCurrent->object_scale = ((float)((long double)Render::object_scale));
0059b6f5          struct frameContext* Render::FrameCurrent_4 = Render::FrameCurrent;
0059b70b          LandDefs::get_block_offset(&__return, Render::viewer_pos.objcell_id, Render::FrameCurrent_4->position.objcell_id);
0059b72b          float var_4_1 = ((float)(((long double)var_10_1) + ((long double)Render::FrameCurrent_4->position.frame.m_fOrigin.z)));
0059b733          long double x87_r7_10 = (((long double)var_14_1) + ((long double)Render::FrameCurrent_4->position.frame.m_fOrigin.y));
0059b735          float var_10_2 = var_4_1;
0059b739          __return = ((float)(((long double)__return) + ((long double)Render::FrameCurrent_4->position.frame.m_fOrigin.x)));
0059b717          Render::FrameCurrent_4->object_offset.x = __return;
0059b717          Render::FrameCurrent_4->object_offset.y = ((float)x87_r7_10);
0059b717          Render::FrameCurrent_4->object_offset.z = var_4_1;
0059b751          int32_t Render::FrameEraNext_1 = Render::FrameEraNext;
0059b756          struct frameContext* Render::FrameCurrent_3 = Render::FrameCurrent;
0059b75c          Render::FrameEra = Render::FrameEraNext_1;
0059b761          Render::FrameCurrent_3->era = Render::FrameEraNext_1;
0059b767          Render::FrameEraNext += 1;
0059b64c      }
0059b5e0  }

0059b774                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0059b780  int32_t PrimD3DRender::positionPopInternal(class PrimD3DRender const* this @ ecx)

0059b780  {
0059b780      int32_t Render::FramePushCount_1 = Render::FramePushCount;
0059b789      Render::FramePushCount = (Render::FramePushCount_1 - 1);
0059b789      
0059b78e      if (Render::FramePushCount_1 == 1)
0059b78e      {
0059b7db          Render::FrameCurrent = nullptr;
0059b7e0          Render::FrameEra = 0;
0059b809          Render::object_scale_vec.z = 1f;
0059b80e          Render::object_scale = 1f;
0059b818          Render::object_scale_vec.x = 0x3f800000;
0059b81e          Render::object_scale_vec.y = 1f;
0059b829          return 0;
0059b78e      }
0059b78e      
0059b795      void* __offset(frameContext, -0x168) eax_2 = (Render::FrameCurrent - 0x168);
0059b79a      Render::FrameCurrent = eax_2;
0059b7a5      Render::FrameEra = *(int32_t*)((char*)ADJ(eax_2) + -8);
0059b7b1      Render::object_scale = *(int32_t*)((char*)ADJ(eax_2) + -0xf8);
0059b7b9      Render::object_scale_vec.x = *(int32_t*)((char*)((char*)eax_2 + 0x168) + -0xf4);
0059b7c2      Render::object_scale_vec.y = *(int32_t*)((char*)((char*)eax_2 + 0x168) + -0xf0);
0059b7cb      Render::object_scale_vec.z = *(int32_t*)((char*)((char*)eax_2 + 0x168) + -0xec);
0059b7d8      return 1;
0059b780  }

0059b82a                                90 90 90 90 90 90                                                            ......

0059b830  void PrimD3DRender::CalcObjectMatrixInternal(class PrimD3DRender* this @ ecx)

0059b830  {
0059b830      struct frameContext* Render::FrameCurrent_1 = Render::FrameCurrent;
0059b830      
0059b83a      if (Render::FrameCurrent_1 == 0)
0059b83a      {
0059b961          class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0059b96c          Render::CachedMatrixFrameEra = 0xffffffff;
0059b976          RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device_2, &Matrix4_IdentityMatrix__);
0059b83a      }
0059b83a      else if (Render::CachedMatrixFrameEra != Render::FrameCurrent_1->era)
0059b84c      {
0059b852          long double x87_r7 = ((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[1]);
0059b85b          float ecx_1 = Render::FrameCurrent_1->position.frame.m_fl2gv[3];
0059b85e          float var_44 = ((float)((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[2]));
0059b869          float edx_1 = Render::FrameCurrent_1->position.frame.m_fl2gv[6];
0059b86c          float var_60 = ((float)((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[4]));
0059b877          float y = Render::FrameCurrent_1->object_scale_vec.y;
0059b87a          float var_5c = ((float)((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[5]));
0059b885          float z = Render::FrameCurrent_1->object_scale_vec.z;
0059b888          float var_54 = ((float)((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[7]));
0059b893          float var_50 = ((float)((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[8]));
0059b897          long double x87_r6_5 = ((long double)Render::FrameCurrent_1->object_offset.x);
0059b89e          Render::FrameCurrent_1->object_offset;
0059b8a1          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059b8a7          long double x87_r4 = ((long double)Render::FrameCurrent_1->object_offset.z);
0059b8aa          long double x87_r3 = ((long double)Render::FrameCurrent_1->object_scale_vec.x);
0059b8b8          int32_t var_34 = 0;
0059b8c0          int32_t var_24 = 0;
0059b8c8          int32_t var_14 = 0;
0059b8d0          float var_40 = ((float)(((long double)Render::FrameCurrent_1->position.frame.m_fl2gv[0]) * x87_r3));
0059b8d4          int32_t var_4 = 0x3f800000;
0059b8e4          float var_30 = ((float)(((long double)ecx_1) * ((long double)y)));
0059b8f0          float var_20 = ((float)(((long double)edx_1) * ((long double)z)));
0059b8f6          float var_10 = ((float)x87_r6_5);
0059b900          float var_3c = ((float)(((long double)var_44) * x87_r3));
0059b90c          float var_2c = ((float)(((long double)var_5c) * ((long double)y)));
0059b918          float var_1c = ((float)(((long double)var_50) * ((long double)z)));
0059b91c          float var_c = ((float)x87_r4);
0059b924          float var_38 = ((float)(x87_r7 * x87_r3));
0059b932          float var_28 = ((float)(((long double)var_60) * ((long double)y)));
0059b93e          float var_18 = ((float)(((long double)var_54) * ((long double)z)));
0059b942          float var_8 = ((float)x87_r3);
0059b946          RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device_1, &var_40);
0059b957          Render::CachedMatrixFrameEra = Render::FrameCurrent->era;
0059b84c      }
0059b830  }

0059b97f                                                                                               90                                 .

0059b980  int32_t PrimD3DRender::InitInternal(class PrimD3DRender* this @ ecx)

0059b980  {
0059b980      PrimD3DRender::InitializeLights();
0059b98a      return 1;
0059b980  }

0059b98b                                   90 90 90 90 90                                                             .....

0059b990  struct Vec2Dscreen* PrimD3DRender::xformStart(class AC1Legacy::Vector3* arg1, int32_t arg2)

0059b990  {
0059b9a3      if ((1 & (*(uint8_t*)$S204)) == 0)
0059b9a5          $S204 |= 1;
0059b9a5      
0059b9ac      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059b9c4      void var_80;
0059b9c4      _D3DXMatrixMultiply@12(&var_80, Render::GetObjectMatrix(), &RenderDevice::render_device_1->m_GState.WorldToViewMatrix);
0059b9da      void var_40;
0059b9da      _D3DXMatrixMultiply@12(&var_40, &var_80, &RenderDevice::render_device_1->m_GState.ViewToClipMatrix);
0059b9e8      void* eax_1 = &var_40;
0059b9e8      
0059b9ec      if (arg2 == 0)
0059b9ee          eax_1 = &var_80;
0059b9ee      
0059ba00      float var_90;
0059ba00      _D3DXVec3Transform@12(&var_90, arg1, eax_1);
0059ba05      int32_t pt_to_use_1 = pt_to_use;
0059ba19      pt_to_use = (pt_to_use_1 + 1);
0059ba19      
0059ba1f      if (pt_to_use_1 == 0x63)
0059ba21          pt_to_use = 0;
0059ba21      
0059ba2e      float var_84;
0059ba2e      float var_8c;
0059ba2e      
0059ba2e      if (arg2 == 0)
0059ba2e      {
0059ba81          *(uint32_t*)((pt_to_use_1 << 4) + 0x871360) = var_90;
0059ba83          *(uint32_t*)((pt_to_use_1 << 4) + 0x871364) = var_8c;
0059ba2e      }
0059ba2e      else
0059ba2e      {
0059ba30          long double x87_r7_1 = ((long double)var_84);
0059ba54          *(uint32_t*)((pt_to_use_1 << 4) + 0x871360) = ((float)(((((long double)Render::bw) * x87_r7_1) * ((long double)0.5)) + ((((long double)var_90) * ((long double)Render::bw)) * ((long double)0.5))));
0059ba74          *(uint32_t*)((pt_to_use_1 << 4) + 0x871364) = ((float)(((x87_r7_1 * ((long double)Render::bh)) * ((long double)0.5)) - ((((long double)var_8c) * ((long double)Render::bh)) * ((long double)0.5))));
0059ba2e      }
0059ba8e      int32_t var_88;
0059ba8e      *(uint32_t*)((pt_to_use_1 << 4) + 0x871368) = var_88;
0059ba91      *(uint32_t*)((pt_to_use_1 << 4) + 0x87136c) = var_84;
0059ba9a      return ((pt_to_use_1 << 4) + 0x871360);
0059b990  }

0059ba9b                                                                                   90 90 90 90 90                             .....

0059baa0  enum BoundingType __stdcall PrimD3DRender::xformPointInternal(class PrimD3DRender const* this @ ecx, class AC1Legacy::Vector3 const* arg2, class Vec2D* arg3)

0059baa0  {
0059baa9      struct Vec2Dscreen* eax = PrimD3DRender::xformStart(arg2, 1);
0059bab0      eax->w;
0059babc      eax->__inner0;
0059badd      arg3->x = ((float)(((long double)_ftol2()) * ((long double)0.0078125f)));
0059badf      eax->__inner0;
0059baff      arg3->y = ((float)(((long double)_ftol2()) * ((long double)0.0078125f)));
0059bb03      long double x87_r7_4 = ((long double)eax->w);
0059bb07      long double temp1 = ((long double)0.000199999995f);
0059bb07      (x87_r7_4 - temp1);
0059bb0d      class AC1Legacy::Vector3* eax_2;
0059bb0d      eax_2 = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0))));
0059bb0f      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0059bb0f      
0059bb12      if (p)
0059bb1e          return 1;
0059bb1e      
0059bb16      return 0;
0059baa0  }

0059bb21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0059bb30  void __fastcall RenderStateCacheType::RenderStateCacheType(class RenderStateCacheType* this)

0059bb30  {
0059bb3d      this->BlendOp = BLENDOP_INVALID;
0059bb40      this->DestBlend = BLEND_INVALID;
0059bb43      this->AlphaBlendEnable = 0;
0059bb46      this->AlphaTestEnable = 0;
0059bb49      int32_t i_2 = 8;
0059bb4e      this->AlphaTestFunction = ALPHATESTFUNC_ALWAYS;
0059bb51      this->AlphaTestRef = 0;
0059bb54      this->ColorWriteEnable = 0;
0059bb57      this->DepthBias = 0f;
0059bb5a      this->DepthBufferEnable = 0;
0059bb5d      this->DepthTestFunction = DEPTHTEST_ALWAYS;
0059bb60      this->DepthWriteEnable = 0;
0059bb63      this->FFAmbientColor32 = 0;
0059bb66      this->FFAmbientColorSource = FromMaterial;
0059bb69      this->FFDiffuseColorSource = FromMaterial;
0059bb71      this->CullMode = CULLMODE_NONE;
0059bb7a      this->FFFogColor.r = RGBAColor_White.r;
0059bb7a      this->FFFogColor.g = RGBAColor_White.g;
0059bb7a      this->FFFogColor.b = RGBAColor_White.b;
0059bb7a      this->FFFogColor.a = RGBAColor_White.a;
0059bb9a      this->FillMode = FILLMODE_INVALID;
0059bb9d      this->SourceBlend = BLEND_INVALID;
0059bba0      this->FFFogEnable = 0;
0059bba3      this->FFFogSystemDisabled = 0;
0059bba6      this->FFFogUserDisabled = 0;
0059bba9      this->FFFogAlphaDisabled = 0;
0059bbac      this->FFFogFarDistance = 0f;
0059bbaf      this->FFFogNearDistance = 0f;
0059bbb2      this->FFLighting = 0;
0059bbb5      this->FFEmissiveColorSource = FromMaterial;
0059bbb8      this->FFSpecularColorSource = FromMaterial;
0059bbbb      this->FFSpecularEnable = 0;
0059bbbe      this->FFTextureFactor32 = 0;
0059bbc1      this->MultiSampleAntialias = 0;
0059bbc4      this->pVertexBuffer = nullptr;
0059bbc7      class RenderStateCacheType::SamplerType (* ecx)[0x10] = &this->Samplers;
0059bbcd      int32_t i_3 = 0x10;
0059bbec      int32_t i;
0059bbec      
0059bbec      do
0059bbec      {
0059bbd7          __builtin_memcpy(ecx, "\x03\x00\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00", 0x14);
0059bc21          ADJ(ecx)->Samplers[0].MipmapLODBias = 0f;
0059bbe8          ecx = &*(uint384_t*)ecx[1];
0059bbeb          i = i_3;
0059bbeb          i_3 -= 1;
0059bbec      } while (i != 1);
0059bbee      class RenderStateCacheType::StageType (* ecx_1)[0x8] = &this->Stages;
0059bc1e      int32_t i_1;
0059bc1e      
0059bc1e      do
0059bc1e      {
0059bc21          ADJ(ecx_1)->Stages[0].pTexture = 0;
0059bc02          __builtin_memcpy(((char*)ecx_1 + 4), "\x02\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00", 0x18);
0059bc21          ADJ(ecx_1)->Stages[0].FFTexCoordIndex = 0;
0059bc21          ADJ(ecx_1)->Stages[0].FFTextureTransformFlags = 0;
0059bc1a          ecx_1 = &*(uint288_t*)ecx_1[1];
0059bc1d          i_1 = i_2;
0059bc1d          i_2 -= 1;
0059bc1e      } while (i_1 != 1);
0059bc21      this->FFLightEnable[0] = 0;
0059bc21      this->FFLightEnable[1] = 0;
0059bc21      this->FFLightEnable[2] = 0;
0059bc21      this->FFLightEnable[3] = 0;
0059bc21      this->FFLightEnable[4] = 0;
0059bc21      this->FFLightEnable[5] = 0;
0059bc21      this->FFLightEnable[6] = 0;
0059bc21      this->FFLightEnable[7] = 0;
0059bb30  }

0059bc2f                                               90                                                                 .

0059bc30  void* __thiscall RenderVertexStreamD3D::`scalar deleting destructor'(class RenderVertexStreamD3D* this, uint32_t arg2)

0059bc30  {
0059bc33      this->vtable = 0x7e5438;
0059bc39      RenderVertexStreamD3D::End(this);
0059bc40      GraphicsResource::~GraphicsResource(this);
0059bc40      
0059bc4a      if ((arg2 & 1) != 0)
0059bc4d          operator delete(this);
0059bc4d      
0059bc58      return this;
0059bc30  }

0059bc5b                                                                                   90 90 90 90 90                             .....

0059bc60  int32_t __fastcall D3DPolyRender::InitInternal(class D3DPolyRender* this)

0059bc60  {
0059bc60      PrimD3DRender::InitInternal(this);
0059bc6c      D3DPolyRender::alphaedMeshCountClip = 0;
0059bc72      D3DPolyRender::alphaedMeshCountAlpha = 0;
0059bc7d      return 1;
0059bc60  }

0059bc7e                                                                                            90 90                                ..

0059bc80  void D3DPolyRender::CleanupInternal(class D3DPolyRender* this @ ecx)

0059bc80  {
0059bc80      /* tailcall */
0059bc80      return PrimD3DRender::CleanupInternal(this);
0059bc80  }

0059bc85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0059bc90  void D3DPolyRender::DrawPortalPolyInternal(class CPolygon* arg1, uint8_t arg2)

0059bc90  {
0059bc97      Render::CalcObjectMatrix();
0059bca2      int32_t edi = maxZ1;
0059bca2      
0059bca8      if (arg2 == 0)
0059bcaa          edi = maxZ2;
0059bcaa      
0059bcb7      int32_t ebx;
0059bcb7      ebx = 1;
0059bcb9      int32_t i = 0;
0059bcbd      char var_7 = 1;
0059bcc1      char var_6 = 1;
0059bcc5      char var_5 = 1;
0059bcc5      
0059bcc9      if (arg1->num_pts > 0)
0059bcc9      {
0059bd3e          do
0059bd3e          {
0059bcd3              float* ecx_1 = arg1->vertices[i];
0059bcd6              long double x87_r7_1 = ((long double)*(uint32_t*)ecx_1);
0059bcd8              long double temp0_1 = ((long double)12.0);
0059bcd8              (x87_r7_1 - temp0_1);
0059bcde              class CVertex** eax_1;
0059bcde              eax_1 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
0059bce0              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0059bce0              
0059bce3              if (p_1)
0059bce5                  ebx = 0;
0059bce5              
0059bce7              long double x87_r7_2 = ((long double)*(uint32_t*)ecx_1);
0059bce9              long double temp1_1 = ((long double)-12.0);
0059bce9              (x87_r7_2 - temp1_1);
0059bcef              eax_1 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0059bcf1              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0059bcf1              
0059bcf4              if (p_2)
0059bcf6                  var_7 = 0;
0059bcf6              
0059bcfb              long double x87_r7_3 = ((long double)ecx_1[1]);
0059bcfe              long double temp2_1 = ((long double)12.0);
0059bcfe              (x87_r7_3 - temp2_1);
0059bd04              eax_1 = ((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0059bd06              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
0059bd06              
0059bd09              if (p_3)
0059bd0b                  var_5 = 0;
0059bd0b              
0059bd10              long double x87_r7_4 = ((long double)ecx_1[1]);
0059bd13              long double temp3_1 = ((long double)-12.0);
0059bd13              (x87_r7_4 - temp3_1);
0059bd19              eax_1 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0059bd1b              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
0059bd1b              
0059bd1e              if (p_4)
0059bd20                  var_6 = 0;
0059bd20              
0059bd2d              scrBuf[i] = PrimD3DRender::xformStart(ecx_1, 1);
0059bd3b              i += 1;
0059bd3e          } while (i < ((uint32_t)arg1->num_pts));
0059bd3e          
0059bd42          if (ebx == 0)
0059bd42          {
0059bd48              struct Vec2Dscreen* eax_2;
0059bd48              eax_2 = var_7;
0059bd48              
0059bd4e              if (eax_2 == 0)
0059bd4e              {
0059bd54                  eax_2 = var_6;
0059bd54                  
0059bd5a                  if (eax_2 == 0)
0059bd5a                  {
0059bd60                      eax_2 = var_5;
0059bd60                      
0059bd66                      if (eax_2 == 0)
0059bd66                      {
0059bd6c                          eax_2 = arg2;
0059bd6c                          
0059bd72                          if (eax_2 == 0)
0059bd74                              D3DPolyRender::portalsDrawnCount += 1;
0059bd74                          
0059bd7b                          uint32_t num_pts = ((uint32_t)arg1->num_pts);
0059bd92                          int32_t var_4 = 0;
0059bd96                          Render::PolyCurrent = nullptr;
0059bd9c                          Render::PolyCurrentMod = 1f;
0059bda6                          Render::PolyCurrentPos = 1;
0059bdb0                          ACRender::polyClipFinish(&scrBuf, num_pts, &scrBufclipped, &var_4, 0);
0059bdb0                          
0059bdbf                          if (var_4 >= 3)
0059bdbf                          {
0059bdcd                              RenderDeviceD3D::SetStageTexture(RenderDevice::render_device, 0, nullptr);
0059bdd9                              RenderDeviceD3D::SetAlphaTestEnable(RenderDevice::render_device, 0);
0059bdea                              RenderDeviceD3D::SetBlendFunction(RenderDevice::render_device, BLEND_SRCALPHA, BLEND_INVSRCALPHA, BLENDOP_ADD);
0059be02                              RenderDeviceD3D::SetDepthBufferMode(RenderDevice::render_device, DEPTHTEST_ALWAYS, (((int8_t)(edi >> 2)) & 1));
0059be0d                              int32_t* eax_7 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0059be1b                              *(uint32_t*)(*(uint32_t*)eax_7 + 0x164)(eax_7, 0x144);
0059be29                              RenderDeviceD3D::SetCullMode(RenderDevice::render_device, CULLMODE_NONE);
0059be33                              int32_t eax_9 = (colorSel + 1);
0059be37                              colorSel = eax_9;
0059be3c                              int16_t portalColorVal_1;
0059be3c                              
0059be3c                              if (eax_9 > 7)
0059beac                                  portalColorVal_1 = ((int16_t)portalColorVal);
0059be3c                              else
0059be3e                                  switch (eax_9)
0059be3e                                  {
0059be45                                      case 0:
0059be45                                      {
0059be45                                          portalColorVal_1 = -1;
0059be4a                                          portalColorVal = 0xffffff;
0059be45                                          break;
0059be45                                      }
0059be51                                      case 1:
0059be51                                      {
0059be51                                          portalColorVal_1 = 0;
0059be56                                          portalColorVal = 0xff0000;
0059be51                                          break;
0059be51                                      }
0059be5d                                      case 2:
0059be5d                                      {
0059be5d                                          portalColorVal_1 = -0x100;
0059be62                                          portalColorVal = 0xff00;
0059be5d                                          break;
0059be5d                                      }
0059be69                                      case 3:
0059be69                                      {
0059be69                                          portalColorVal_1 = 0xff;
0059be6e                                          portalColorVal = 0xff;
0059be69                                          break;
0059be69                                      }
0059be75                                      case 4:
0059be75                                      {
0059be75                                          portalColorVal_1 = -0x100;
0059be7a                                          portalColorVal = 0xffff00;
0059be75                                          break;
0059be75                                      }
0059be81                                      case 5:
0059be81                                      {
0059be81                                          portalColorVal_1 = -1;
0059be86                                          portalColorVal = 0xffff;
0059be81                                          break;
0059be81                                      }
0059be8d                                      case 6:
0059be8d                                      {
0059be8d                                          portalColorVal_1 = 0xff;
0059be92                                          portalColorVal = 0xff00ff;
0059be8d                                          break;
0059be8d                                      }
0059be99                                      case 7:
0059be99                                      {
0059be99                                          portalColorVal_1 = 0;
0059be9b                                          portalColorVal = 0;
0059bea0                                          colorSel = 0xffffffff;
0059be99                                          break;
0059be99                                      }
0059be3e                                  }
0059be3e                              
0059beb1                              int32_t ecx_9 = var_4;
0059beb5                              int32_t edx_2 = 0;
0059beb5                              
0059beb9                              if (ecx_9 > 0)
0059beb9                              {
0059bebf                                  class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059bec7                                  int32_t ecx_10;
0059bec7                                  *(uint8_t*)((char*)ecx_10)[1] = *(int32_t*)((char*)portalColorVal + 2);
0059bedd                                  ecx_10 = *(uint8_t*)((char*)portalColorVal_1)[1];
0059beed                                  void* eax_11 = &v[0].y;
0059beed                                  
0059bf75                                  do
0059bf75                                  {
0059bf00                                      float* ecx_13 = scrBufclipped[edx_2];
0059bf14                                      long double x87_r6_1 = ((long double)RenderDevice::render_device_1->m_viewportX);
0059bf14                                      
0059bf1a                                      if (RenderDevice::render_device_1->m_viewportX < 0)
0059bf1c                                          x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
0059bf1c                                      
0059bf24                                      *(uint32_t*)((char*)eax_11 - 4) = ((float)((((long double)*(uint32_t*)ecx_13) / ((long double)ecx_13[3])) + x87_r6_1));
0059bf35                                      long double x87_r6_2 = ((long double)RenderDevice::render_device_1->m_viewportY);
0059bf35                                      
0059bf3b                                      if (RenderDevice::render_device_1->m_viewportY < 0)
0059bf3d                                          x87_r6_2 = (x87_r6_2 + ((long double)4.2949673e+09f));
0059bf3d                                      
0059bf47                                      *(uint32_t*)eax_11 = ((float)((((long double)ecx_13[1]) / ((long double)ecx_13[3])) + x87_r6_2));
0059bf49                                      long double x87_r7_11;
0059bf49                                      
0059bf49                                      if ((edi & 1) == 0)
0059bf56                                          x87_r7_11 = (((long double)ecx_13[2]) / ((long double)ecx_13[3]));
0059bf49                                      else
0059bf4b                                          x87_r7_11 = ((long double)0.999998987f);
0059bf4b                                      
0059bf59                                      *(uint32_t*)((char*)eax_11 + 4) = ((float)x87_r7_11);
0059bf5c                                      edx_2 += 1;
0059bf63                                      eax_11 += 0x1c;
0059bf66                                      long double x87_r7_14 = (((long double)1f) / ((long double)ecx_13[3]));
0059bf69                                      ecx_9 = var_4;
0059bf6f                                      *(uint32_t*)((char*)eax_11 - 0x10) = (((ecx_10 << 8) | (!((edi << 0x1e)) & 0x80000000)) | ((uint32_t)portalColorVal_1));
0059bf72                                      *(uint32_t*)((char*)eax_11 - 0x14) = ((float)x87_r7_14);
0059bf75                                  } while (edx_2 < ecx_9);
0059beb9                              }
0059beb9                              
0059bf84                              RenderDeviceD3D::DrawPrimitiveUP(D3DPT_TRIANGLEFAN, (ecx_9 - 2), &v, 0x1c);
0059bdbf                          }
0059bd66                      }
0059bd5a                  }
0059bd4e              }
0059bd42          }
0059bcc9      }
0059bc90  }

0059bef4                                                              8d a4 24 00 00 00 00 eb 03 8d 49 00                      ..$.......I.
0059bf94  uint32_t jump_table_59bf94[0x8] = 
0059bf94  {
0059bf94      [0x0] =  0x0059be45
0059bf98      [0x1] =  0x0059be51
0059bf9c      [0x2] =  0x0059be5d
0059bfa0      [0x3] =  0x0059be69
0059bfa4      [0x4] =  0x0059be75
0059bfa8      [0x5] =  0x0059be81
0059bfac      [0x6] =  0x0059be8d
0059bfb0      [0x7] =  0x0059be99
0059bfb4  }

0059bfb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0059bfc0  uint8_t __fastcall D3DPolyRender::SelectBestAdapter(class D3DPolyRender* this)

0059bfc0  {
0059bfcc      struct IDirect3D9* m_pDirect3D = this->m_pDirect3D;
0059bfd1      uint32_t esi = 0;
0059bfd4      int32_t ebx;
0059bfd4      ebx = 0;
0059bfd6      uint32_t var_580 = 0;
0059bfda      int32_t eax = m_pDirect3D->vtable->GetAdapterCount(m_pDirect3D);
0059bfdf      uint32_t DisplayAdapter = Render::m_RenderPrefs.DisplayAdapter;
0059bfe6      uint32_t var_584 = 0xffffffff;
0059bfee      char var_585 = 0;
0059bfee      
0059bff7      if ((DisplayAdapter != 0 && DisplayAdapter <= eax))
0059bffa          var_584 = (DisplayAdapter - 1);
0059bffa      
0059c000      if (eax > 0)
0059c000      {
0059c047          do
0059c047          {
0059c002              struct IDirect3D9* m_pDirect3D_1 = this->m_pDirect3D;
0059c018              void var_44c;
0059c018              
0059c018              if (m_pDirect3D_1->vtable->GetAdapterIdentifier(m_pDirect3D_1, esi, 0, &var_44c) == 0)
0059c018              {
0059c01a                  struct IDirect3D9* m_pDirect3D_2 = this->m_pDirect3D;
0059c02d                  void var_57c;
0059c02d                  
0059c02d                  if (m_pDirect3D_2->vtable->GetDeviceCaps(m_pDirect3D_2, esi, 1, &var_57c) == 0)
0059c02d                  {
0059c031                      if (ebx == 0)
0059c031                      {
0059c033                          var_580 = esi;
0059c037                          ebx = 1;
0059c031                      }
0059c031                      
0059c03d                      if (var_584 == esi)
0059c03f                          var_585 = 1;
0059c02d                  }
0059c018              }
0059c018              
0059c044              esi += 1;
0059c047          } while (esi < eax);
0059c047          
0059c04b          if (ebx != 0)
0059c04b          {
0059c04d              DisplayAdapter = var_585;
0059c053              uint32_t eax_1 = var_584;
0059c053              
0059c057              if (DisplayAdapter == 0)
0059c059                  eax_1 = var_580;
0059c059              
0059c05d              this->m_nDisplayAdapter = eax_1;
0059c063              eax_1 = 1;
0059c06c              return 1;
0059c04b          }
0059c000      }
0059c000      
0059c070      DisplayAdapter = 0;
0059c079      return 0;
0059bfc0  }

0059c07a                                                                                90 90 90 90 90 90                            ......

0059c080  void __convention("regparm") copyVert(void* arg1, int32_t arg2, class CSWVertex* arg3, char arg4, int32_t arg5, float arg6, float arg7, uint8_t arg8, uint32_t arg9)

0059c080  {
0059c082      long double x87_r7 = ((long double)arg2);
0059c093      int32_t eax;
0059c093      eax = arg6 == 0x252;
0059c0a7      void* ecx;
0059c0a7      void* esi_1 = ((char*)ecx + (((eax << 3) + 0x24) * arg1));
0059c0a9      int32_t* edi;
0059c0a9      *(uint32_t*)esi_1 = *(uint32_t*)edi;
0059c0ae      *(uint32_t*)((char*)esi_1 + 4) = edi[1];
0059c0b4      *(uint32_t*)((char*)esi_1 + 8) = edi[2];
0059c0ba      *(uint32_t*)((char*)esi_1 + 0xc) = ((float)(x87_r7 * ((long double)edi[5])));
0059c0c2      *(uint32_t*)((char*)esi_1 + 0x10) = ((float)(x87_r7 * ((long double)edi[6])));
0059c0c8      *(uint32_t*)((char*)esi_1 + 0x14) = ((float)(x87_r7 * ((long double)edi[7])));
0059c0ec      *(uint32_t*)((char*)esi_1 + 0x18) = ((_ftol2() << 0x18) | 0xffffff);
0059c0ef      char ebx;
0059c0ef      
0059c0ef      if (ebx < 0)
0059c0ef      {
0059c138      label_59c138:
0059c138          *(uint32_t*)((char*)esi_1 + 0x1c) = 0;
0059c13b          *(uint32_t*)((char*)esi_1 + 0x20) = 0;
0059c13b          
0059c13e          if (arg6 == 0x252)
0059c13e          {
0059c140              *(uint32_t*)((char*)esi_1 + 0x24) = 0;
0059c143              *(uint32_t*)((char*)esi_1 + 0x28) = 0;
0059c13e          }
0059c13e          
0059c13e          return;
0059c0ef      }
0059c0ef      
0059c0f5      int32_t eax_7 = ((int32_t)ebx);
0059c0f5      
0059c0fa      if (eax_7 >= ((uint32_t)*(uint16_t*)((char*)edi + 0xe)))
0059c0fa          goto label_59c138;
0059c0fa      
0059c0fc      int32_t ecx_3 = edi[4];
0059c0fc      
0059c101      if (ecx_3 == 0)
0059c101          goto label_59c138;
0059c101      
0059c10c      *(uint32_t*)((char*)esi_1 + 0x1c) = *(uint32_t*)(ecx_3 + (eax_7 << 3));
0059c116      *(uint32_t*)((char*)esi_1 + 0x20) = *(uint32_t*)((edi[4] + (eax_7 << 3)) + 4);
0059c116      
0059c119      if (arg6 == 0x252)
0059c119      {
0059c122          *(uint32_t*)((char*)esi_1 + 0x24) = ((float)(((long double)arg3) * ((long double)*(uint32_t*)((char*)esi_1 + 0x1c))));
0059c12c          *(uint32_t*)((char*)esi_1 + 0x28) = ((float)(((long double)arg3) * ((long double)*(uint32_t*)((char*)esi_1 + 0x20))));
0059c119      }
0059c080  }

0059c149                             90 90 90 90 90 90 90                                                           .......

0059c150  uint8_t D3DPolyRender::SetDetailTiling(class MeshBuffer* arg1, float arg2)

0059c150  {
0059c151      class MeshBuffer* ebx = arg1;
0059c151      
0059c15c      if (ebx->meshFVF != 0x252)
0059c15c      {
0059c15e          int32_t eax;
0059c15e          eax = 0;
0059c161          return 0;
0059c15c      }
0059c15c      
0059c163      struct ID3DXMesh* pMesh = ebx->pMesh;
0059c169      int32_t i_2 = pMesh->vtable->GetNumVertices(pMesh);
0059c169      
0059c17d      if (pMesh->vtable->LockVertexBuffer(pMesh, 0, &arg1) < 0)
0059c17d      {
0059c181          int32_t eax_2;
0059c181          eax_2 = 0;
0059c184          return 0;
0059c17d      }
0059c17d      
0059c187      if (i_2 > 0)
0059c187      {
0059c18b          int32_t i_1 = i_2;
0059c18d          int32_t ecx_1 = 0;
0059c1af          int32_t i;
0059c1af          
0059c1af          do
0059c1af          {
0059c190              class MeshBuffer* eax_3 = arg1;
0059c198              long double x87_r7_2 = (((long double)arg2) * ((long double)*(uint32_t*)(&*(uint32_t*)((char*)eax_3->m_vUVDelta)[4] + ecx_1)));
0059c19c              void* eax_4 = ((char*)eax_3 + ecx_1);
0059c19e              ecx_1 += 0x2c;
0059c1a1              i = i_1;
0059c1a1              i_1 -= 1;
0059c1a2              *(uint32_t*)((char*)eax_4 + 0x24) = ((float)x87_r7_2);
0059c1ac              *(uint32_t*)((char*)eax_4 + 0x28) = ((float)(((long double)arg2) * ((long double)*(uint32_t*)((char*)eax_4 + 0x20))));
0059c1af          } while (i != 1);
0059c187      }
0059c187      
0059c1b1      pMesh->vtable->UnlockVertexBuffer(pMesh);
0059c1bd      ebx->detailTilingFactorSet = arg2;
0059c1c0      int32_t eax_5;
0059c1c0      eax_5 = 1;
0059c1c3      return 1;
0059c150  }

0059c1c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0059c1d0  uint8_t D3DPolyRender::DestroyMesh(class MeshBuffer** arg1)

0059c1d0  {
0059c1d6      class MeshBuffer* esi = *(uint32_t*)arg1;
0059c1d6      
0059c1da      if (esi != 0)
0059c1da      {
0059c1dc          struct ID3DXMesh* pMesh = esi->pMesh;
0059c1dc          
0059c1e0          if (pMesh != 0)
0059c1e0          {
0059c1e2              pMesh->vtable->Release(pMesh);
0059c1e8              esi->pMesh = 0;
0059c1e0          }
0059c1e0          
0059c1ee          class RenderMesh* pRenderMesh = esi->pRenderMesh;
0059c1ee          
0059c1f3          if (pRenderMesh != 0)
0059c1f3          {
0059c1f5              pRenderMesh->vtable->Release();
0059c1fa              esi->pRenderMesh = nullptr;
0059c1f3          }
0059c1f3          
0059c205          operator delete[](esi->isStippledOrAlphaedMask);
0059c20b          esi->isStippledOrAlphaedMask = nullptr;
0059c212          operator delete(esi);
0059c1da      }
0059c1da      
0059c21b      *(uint32_t*)arg1 = nullptr;
0059c221      int32_t eax;
0059c221      eax = 1;
0059c224      return 1;
0059c1d0  }

0059c225                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0059c230  uint8_t D3DPolyRender::AddMeshToAlphaList(class MeshBuffer* arg1, int32_t arg2, class CSurface* arg3, uint8_t arg4, uint8_t arg5, uint8_t arg6)

0059c230  {
0059c238      uint16_t edx;
0059c238      
0059c238      if (arg6 == 0)
0059c238      {
0059c2cd          edx = D3DPolyRender::alphaedMeshCountAlpha;
0059c2cd          
0059c2d9          if (edx < 0xbb8)
0059c2d9          {
0059c2e2              class Matrix4* eax_4 = (((uint32_t)edx) * 0x54);
0059c2e5              *(int32_t*)((char*)eax_4 + 0x8af370) = arg1;
0059c2ef              *(int32_t*)((char*)eax_4 + 0x8af374) = arg2;
0059c2f9              *(int32_t*)((char*)eax_4 + 0x8af378) = arg3;
0059c2ff              class CSurface* ecx_6;
0059c2ff              ecx_6 = arg5;
0059c303              *(int32_t*)((char*)eax_4 + 0x8af3c1) = ecx_6;
0059c309              ecx_6 = arg4;
0059c30f              *(int32_t*)((char*)eax_4 + 0x8af3c0) = ecx_6;
0059c30f              
0059c315              if (ecx_6 != 0)
0059c315              {
0059c323                  *(int32_t*)((char*)eax_4 + 0x8af37c) = *(int32_t*)((char*)RenderDevice::render_device + 0x7e4);
0059c329                  eax_4 = Render::GetObjectMatrix();
0059c32e                  edx = D3DPolyRender::alphaedMeshCountAlpha;
0059c348                  __builtin_memcpy(((((uint32_t)edx) * 0x54) + 0x8af380), eax_4, 0x40);
0059c315              }
0059c315              
0059c34d              D3DPolyRender::alphaedMeshCountAlpha = (edx + 1);
0059c354              eax_4 = 1;
0059c357              return 1;
0059c2d9          }
0059c238      }
0059c238      else
0059c238      {
0059c23e          edx = D3DPolyRender::alphaedMeshCountClip;
0059c23e          
0059c24a          if (edx < 0xbb8)
0059c24a          {
0059c257              class Matrix4* eax_2 = (((uint32_t)edx) * 0x54);
0059c25a              *(int32_t*)((char*)eax_2 + 0x871b10) = arg1;
0059c264              *(int32_t*)((char*)eax_2 + 0x871b14) = arg2;
0059c26e              *(int32_t*)((char*)eax_2 + 0x871b18) = arg3;
0059c274              class CSurface* ecx_2;
0059c274              ecx_2 = arg5;
0059c278              *(int32_t*)((char*)eax_2 + 0x871b61) = ecx_2;
0059c27e              ecx_2 = arg4;
0059c284              *(int32_t*)((char*)eax_2 + 0x871b60) = ecx_2;
0059c284              
0059c28a              if (ecx_2 != 0)
0059c28a              {
0059c298                  *(int32_t*)((char*)eax_2 + 0x871b1c) = *(int32_t*)((char*)RenderDevice::render_device + 0x7e4);
0059c29e                  eax_2 = Render::GetObjectMatrix();
0059c2a3                  edx = D3DPolyRender::alphaedMeshCountClip;
0059c2bd                  __builtin_memcpy(((((uint32_t)edx) * 0x54) + 0x871b20), eax_2, 0x40);
0059c28a              }
0059c28a              
0059c2c2              D3DPolyRender::alphaedMeshCountClip = (edx + 1);
0059c2c9              eax_2 = 1;
0059c2cc              return 1;
0059c24a          }
0059c238      }
0059c35c      return 0;
0059c230  }

0059c35d                                                                                         90 90 90                               ...

0059c360  class RenderIndexStreamD3D* __fastcall D3DPolyRender::ReferenceDynamicIndexStream(class D3DPolyRender* this)

0059c360  {
0059c36b      if (this->m_pDynamicIndexStream == 0)
0059c36b      {
0059c36f          void* eax_1 = operator new(0x48);
0059c379          class RenderIndexStreamD3D* eax_2;
0059c379          
0059c379          if (eax_1 == 0)
0059c384              eax_2 = nullptr;
0059c379          else
0059c37d              eax_2 = RenderIndexStreamD3D::RenderIndexStreamD3D(eax_1);
0059c37d          
0059c388          this->m_pDynamicIndexStream = eax_2;
0059c388          
0059c38e          if (eax_2 == 0)
0059c3bf              return 0;
0059c3bf          
0059c3a0          if (RenderIndexStreamD3D::Init(eax_2, 0xffff, 1) == 0)
0059c3a0          {
0059c3a2              class RenderIndexStreamD3D* m_pDynamicIndexStream = this->m_pDynamicIndexStream;
0059c3a2              
0059c3aa              if (m_pDynamicIndexStream != 0)
0059c3ac                  m_pDynamicIndexStream->vtable->__vecDelDtor(1);
0059c3ac              
0059c3b2              this->m_pDynamicIndexStream = nullptr;
0059c3bf              return 0;
0059c3a0          }
0059c36b      }
0059c36b      
0059c3c7      return this->m_pDynamicIndexStream;
0059c360  }

0059c3c8                          90 90 90 90 90 90 90 90                                                          ........

0059c3d0  void LIGHTINFO::convert_to_local(class LIGHTINFO* arg1, class LIGHTINFO* arg2, class Frame const* arg3)

0059c3d0  {
0059c3d8      int32_t type = arg2->type;
0059c3df      arg1->type = type;
0059c3df      
0059c3e4      if (type == 0)
0059c3e4      {
0059c3f9      label_59c3f9:
0059c3f9          void __return_2;
0059c3f9          class AC1Legacy::Vector3* eax_3 = Frame::globaltolocal(arg3, &__return_2, &arg2->offset.m_fOrigin);
0059c400          arg1->offset.m_fOrigin.x = eax_3->x;
0059c400          arg1->offset.m_fOrigin.y = eax_3->y;
0059c400          arg1->offset.m_fOrigin.z = eax_3->z;
0059c3e4      }
0059c3e4      else if (type == 1)
0059c3e7      {
0059c456          void __return;
0059c456          void __return_1;
0059c456          int32_t* eax_9 = Frame::globaltolocalvec(arg3, &__return_1, Frame::get_vector_heading(&arg2->offset, &__return));
0059c45d          arg1->offset.m_fOrigin.x = *(uint32_t*)eax_9;
0059c45d          arg1->offset.m_fOrigin.y = eax_9[1];
0059c45d          arg1->offset.m_fOrigin.z = eax_9[2];
0059c3e7      }
0059c3e7      else if (type == 2)
0059c3ea          goto label_59c3f9;
0059c3ea      
0059c416      arg1->color.r = arg2->color.r;
0059c416      arg1->color.g = arg2->color.g;
0059c416      arg1->color.b = arg2->color.b;
0059c42a      arg1->intensity = arg2->intensity;
0059c430      arg1->falloff = arg2->falloff;
0059c436      arg1->cone_angle = arg2->cone_angle;
0059c3d0  }


0059c470  class ImgTex* __fastcall CSurface::GetTextureMap(class CSurface* this)

0059c470  {
0059c47f      if (((((int8_t)this->type) & 6) != 0 && this->base1map == 0))
0059c47f      {
0059c481          class ImgTex* eax_1;
0059c481          eax_1 = this->m_bIsLost;
0059c481          
0059c486          if ((eax_1 != 0 && CSurface::RestoreLostSurface(this) != 0))
0059c494              GraphicsResource::MarkResourceAsNotLost(&this->vtable);
0059c47f      }
0059c47f      
0059c4a4      this->m_TimeUsed = (*(uint32_t*)Timer::local_time);
0059c4a7      *(uint32_t*)((char*)this->m_TimeUsed)[4] = *(int32_t*)((char*)Timer::local_time + 4);
0059c4aa      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059c4aa      
0059c4b1      if (RenderDevice::render_device_1 != 0)
0059c4b9          this->m_FrameUsed = RenderDevice::render_device_1->m_nFrameStamp;
0059c4b9      
0059c4c0      return this->base1map;
0059c470  }

0059c4c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0059c4d0  int32_t D3DPolyRender::SetSurface(class CSurface* arg1, uint8_t arg2, uint8_t arg3, uint8_t arg4)

0059c4d0  {
0059c4d7      Render::curr_surface = arg1;
0059c4e1      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059c4ed      Render::curr_surface_type = (arg1->type | 0x10000000);
0059c4f9      class ImgTex* edi = CSurface::GetTextureMap(arg1);
0059c4fb      class ImgTex* eax_2;
0059c4fb      eax_2 = arg3;
0059c501      int32_t ecx_1;
0059c501      ecx_1 = edi != 0;
0059c512      Render::curr_texture_is_set = ecx_1;
0059c51a      uint32_t var_20;
0059c51a      
0059c51a      if (eax_2 == 0)
0059c51a      {
0059c583          RenderDeviceD3D::SetStageFFColorSource(RenderDevice::render_device_1, 0, TEXOP_MODULATE, 2, 0);
0059c592          RenderDeviceD3D::SetStageFFAlphaSource(RenderDevice::render_device_1, 0, TEXOP_MODULATE, 2, 0);
0059c5a1          RenderDeviceD3D::SetStageFFColorSource(RenderDevice::render_device_1, 1, TEXOP_DISABLE, 2, 1);
0059c5a6          int32_t __saved_ebx_1 = 1;
0059c5a8          int32_t __saved_ebp_1 = 2;
0059c5aa          int32_t var_1c_1 = 1;
0059c5ac          var_20 = 1;
0059c51a      }
0059c51a      else
0059c51a      {
0059c51c          RenderDeviceD3D::SetStageFFColorSource(RenderDevice::render_device_1, 0, TEXOP_MODULATE, 2, 0);
0059c52b          RenderDeviceD3D::SetStageFFAlphaSource(RenderDevice::render_device_1, 0, TEXOP_PREMODULATE, 0, 0);
0059c53a          RenderDeviceD3D::SetStageFFColorSource(RenderDevice::render_device_1, 1, TEXOP_BLENDCURRENTALPHA, 2, 1);
0059c549          RenderDeviceD3D::SetStageFFAlphaSource(RenderDevice::render_device_1, 1, TEXOP_MODULATE, 2, 1);
0059c556          RenderDeviceD3D::SetSamplerAddressMode(RenderDevice::render_device_1, 1, TEXADDRESS_WRAP, TEXADDRESS_WRAP);
0059c565          RenderDeviceD3D::SetSamplerFilterMode(RenderDevice::render_device_1, 1, TEXFILTER_LINEAR, TEXFILTER_LINEAR, TEXFILTER_LINEAR);
0059c574          RenderDeviceD3D::SetStageFFColorSource(RenderDevice::render_device_1, 2, TEXOP_DISABLE, 2, 1);
0059c579          int32_t __saved_ebx = 1;
0059c57b          int32_t __saved_ebp = 2;
0059c57d          int32_t var_1c = 1;
0059c57f          var_20 = 2;
0059c51a      }
0059c51a      
0059c5b0      RenderDeviceD3D::SetStageFFAlphaSource(RenderDevice::render_device_1, var_20, TEXOP_DISABLE, 2, 1);
0059c5b7      struct IDirect3DTexture9* var_4_1;
0059c5b7      struct IDirect3DTexture9* eax_5;
0059c5b7      
0059c5b7      if (edi != 0)
0059c5b7      {
0059c5bf          enum TexAddress eax_4;
0059c5bf          
0059c5bf          if (arg2 == 0)
0059c5d2              eax_4 = TEXADDRESS_CLAMP;
0059c5bf          else
0059c5bf          {
0059c5c1              Render::curr_surface_type |= 0x40000000;
0059c5cb              eax_4 = TEXADDRESS_WRAP;
0059c5bf          }
0059c5bf          
0059c5dd          RenderDeviceD3D::SetSamplerAddressMode(RenderDevice::render_device_1, 0, eax_4, eax_4);
0059c5ec          RenderDeviceD3D::SetSamplerFilterMode(RenderDevice::render_device_1, 0, TEXFILTER_LINEAR, TEXFILTER_LINEAR, TEXFILTER_LINEAR);
0059c5f3          eax_5 = ImgTex::GetD3DTexture(edi);
0059c5fa          var_4_1 = eax_5;
0059c5b7      }
0059c5b7      
0059c5fe      if ((edi == 0 || eax_5 == 0))
0059c5fe      {
0059c600          class CSurface* Render::curr_surface_1 = Render::curr_surface;
0059c60b          uint32_t color_value = Render::curr_surface_1->color_value;
0059c60e          curr_color = color_value;
0059c614          Render::curr_surface_1->translucency;
0059c61d          int32_t eax_6 = _ftol2();
0059c622          curr_alpha = eax_6;
0059c637          RenderDeviceD3D::SetSolidColorTextureColor(RenderDevice::render_device_1, ((eax_6 << 0x18) | (color_value & 0xffffff)), 0);
0059c642          var_4_1 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7ec);
0059c5fe      }
0059c5fe      
0059c646      class CSurface* Render::curr_surface_2 = Render::curr_surface;
0059c64c      long double x87_r7_4 = ((long double)Render::curr_surface_2->luminosity);
0059c654      bool cond:3 = Render::useSunlight == 0;
0059c656      Render::luminosity.b = ((float)x87_r7_4);
0059c65c      Render::luminosity.g = ((float)x87_r7_4);
0059c662      Render::luminosity.r = ((float)x87_r7_4);
0059c662      
0059c668      if (cond:3)
0059c668      {
0059c699          long double x87_r7_11 = ((long double)Render::curr_surface_2->diffuse);
0059c69c          Render::diffuse.b = ((float)x87_r7_11);
0059c6a2          Render::diffuse.g = ((float)x87_r7_11);
0059c6a8          Render::diffuse.r = ((float)x87_r7_11);
0059c668      }
0059c668      else
0059c668      {
0059c673          Render::diffuse.r = ((float)(((long double)Render::viewer_lights.sunlight_color.r) * ((long double)Render::curr_surface_2->diffuse)));
0059c682          Render::diffuse.g = ((float)(((long double)Render::viewer_lights.sunlight_color.g) * ((long double)Render::curr_surface_2->diffuse)));
0059c691          Render::diffuse.b = ((float)(((long double)Render::viewer_lights.sunlight_color.b) * ((long double)Render::curr_surface_2->diffuse)));
0059c668      }
0059c668      
0059c6ae      uint32_t Render::curr_surface_type_1 = Render::curr_surface_type;
0059c6bc      arg3 = 0;
0059c6c5      class Palette* ebx;
0059c6c5      enum BlendMode ebp;
0059c6c5      enum BlendMode edi_2;
0059c6c5      
0059c6c5      if (((*(uint8_t*)((char*)Render::curr_surface_type_1)[1] & 1) != 0 || arg4 != 0))
0059c6c5      {
0059c702          edi_2 = BLEND_SRCALPHA;
0059c707          ebp = BLEND_ONE;
0059c707          
0059c70c          if ((Render::curr_surface_type_1 & 0x10000) == 0)
0059c70e              ebp = BLEND_INVSRCALPHA;
0059c70e          
0059c713          ebx = 1;
0059c715          arg3 = 0;
0059c6c5      }
0059c6c5      else if ((*(uint8_t*)((char*)Render::curr_surface_type_1)[1] & 2) == 0)
0059c6ca      {
0059c6e9          edi_2 = BLEND_ONE;
0059c6e9          
0059c6ee          if ((Render::curr_surface_type_1 & 0x10000) == 0)
0059c6ee          {
0059c6f4              ebp = BLEND_ZERO;
0059c6f9              ebx = 0;
0059c6ee          }
0059c6ee          else
0059c6ee          {
0059c6f0              ebp = BLEND_ONE;
0059c713              ebx = 1;
0059c715              arg3 = 0;
0059c6ee          }
0059c6ca      }
0059c6ca      else
0059c6ca      {
0059c6d1          edi_2 = BLEND_INVSRCALPHA;
0059c6d6          ebp = BLEND_ONE;
0059c6d6          
0059c6db          if ((Render::curr_surface_type_1 & 0x10000) == 0)
0059c6dd              ebp = BLEND_SRCALPHA;
0059c6dd          
0059c713          ebx = 1;
0059c715          arg3 = 0;
0059c6ca      }
0059c6ca      
0059c71c      arg1 = ebx;
0059c71c      
0059c724      if (((Render::curr_surface_type_1 & 4) != 0 && arg4 == 0))
0059c724      {
0059c728          if (ebx == 0)
0059c728          {
0059c72a              edi_2 = BLEND_ONE;
0059c72f              ebp = BLEND_INVSRCALPHA;
0059c728          }
0059c728          
0059c73c          int32_t ecx_19;
0059c73c          
0059c73c          if (Render::curr_texture_is_set != 0)
0059c747              ecx_19 = D3DPolyRender::s_256AlphaTestRef;
0059c747          
0059c74d          if ((Render::curr_texture_is_set == 0 || edi->m_pPalette == 0))
0059c74f              ecx_19 = D3DPolyRender::s_ddsAlphaTestRef;
0059c74f          
0059c755          ebx = 1;
0059c757          testRef = ecx_19;
0059c75d          arg1 = 1;
0059c761          arg3 = 1;
0059c724      }
0059c724      
0059c767      if ((Render::curr_surface_type_1 & 0x10) == 0)
0059c7ad          curr_alpha = 0xff;
0059c767      else
0059c767      {
0059c77b          if (((skipChk != 0 || ebx == 0) || arg3 == 1))
0059c77b          {
0059c77d              ebx = 1;
0059c77f              edi_2 = BLEND_SRCALPHA;
0059c784              ebp = BLEND_INVSRCALPHA;
0059c789              arg1 = 1;
0059c78d              arg3 = 0;
0059c77b          }
0059c77b          
0059c798          Render::curr_surface_2->translucency;
0059c7a6          curr_alpha = _ftol2();
0059c767      }
0059c767      
0059c7b7      void* eax_12 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e4);
0059c7d1      class ImgTex* var_8;
0059c7d1      
0059c7d1      if (((eax_12 == 0 || *(uint32_t*)((char*)eax_12 + 8) == 0) || (ebx != 0 && arg3 != 1)))
0059c7d1      {
0059c7ee          eax_12 = arg3;
0059c7ee          
0059c7f8          if ((eax_12 != 0 || ebx == 0))
0059c801              var_8 = 1;
0059c7f8          else
0059c7fa              var_8 = 0;
0059c7d1      }
0059c7d1      else
0059c7d1      {
0059c7d3          edi_2 = BLEND_SRCALPHA;
0059c7d8          ebp = BLEND_INVSRCALPHA;
0059c7dd          arg1 = 1;
0059c7e2          arg3 = 0;
0059c7e7          var_8 = 0;
0059c7d1      }
0059c7d1      
0059c80a      enum DepthTestMode zfuncVal_1 = zfuncVal;
0059c815      RenderDeviceD3D::SetStageTexture(RenderDevice::render_device_1, 0, var_4_1);
0059c821      RenderDeviceD3D::SetAlphaTestEnable(RenderDevice::render_device_1, arg3);
0059c82f      RenderDeviceD3D::SetAlphaTestRef(RenderDevice::render_device_1, testRef);
0059c838      RenderDeviceD3D::SetAlphaTestFunction(RenderDevice::render_device_1, ALPHATESTFUNC_GREATEREQUAL);
0059c843      RenderDeviceD3D::SetBlendFunction(RenderDevice::render_device_1, edi_2, ebp, BLENDOP_ADD);
0059c84f      RenderDeviceD3D::SetAlphaBlendEnable(RenderDevice::render_device_1, arg1);
0059c84f      
0059c85c      if (*(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e0) == 0)
0059c866          RenderDeviceD3D::SetDepthBufferMode(RenderDevice::render_device_1, zfuncVal_1, var_8);
0059c866      
0059c882      if ((RenderDeviceD3D::GetFFFogEnable(RenderDevice::render_device_1) == 0 || (Render::curr_surface_type & 0x10000) != 0))
0059c882      {
0059c89c          RenderDeviceD3D::SetFFFogAlphaDisabled(RenderDevice::render_device_1, 1);
0059c8ab          return curr_alpha;
0059c882      }
0059c882      
0059c888      RenderDeviceD3D::SetFFFogAlphaDisabled(RenderDevice::render_device_1, 0);
0059c897      return curr_alpha;
0059c4d0  }

0059c8ac                                      90 90 90 90                                                              ....

0059c8b0  void calc_point_light(struct CUSTOM_D3D_VERTEX2* arg1, float* arg2, float* arg3, float* arg4, class LIGHTINFO const* arg5)

0059c8b0  {
0059c8b3      struct CUSTOM_D3D_VERTEX2* edx = arg1;
0059c8bd      long double x87_r6 = ((long double)edx->y);
0059c8cc      float var_18 = ((float)(((long double)arg5->offset.m_fOrigin.x) - ((long double)edx->x)));
0059c8d0      arg5->offset;
0059c8dc      long double x87_r6_2 = (((long double)arg5->offset.m_fOrigin.z) - ((long double)((float)((long double)edx->z))));
0059c8f2      long double x87_r5_8 = (((x87_r6_2 * x87_r6_2) + (x87_r6 * x87_r6)) + (((long double)var_18) * ((long double)var_18)));
0059c8fa      arg1 = ((float)sqrtl(x87_r5_8));
0059c907      float var_1c = ((float)(((long double)arg5->falloff) * ((long double)static_light_factor)));
0059c90f      (((long double)arg1) - ((long double)var_1c));
0059c915      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0059c915      
0059c918      if (!(p))
0059c918      {
0059c927          long double x87_r2_1 = ((long double)0.75f);
0059c92d          long double x87_r2_2 = (x87_r2_1 + x87_r2_1);
0059c94d          (((((x87_r2_2 - ((long double)1f)) * ((long double)arg1)) + (((long double)edx->nz) * x87_r6_2)) + (((long double)edx->ny) * x87_r6)) + (((long double)edx->nx) * ((long double)var_18)));
0059c961          long double temp2_1 = ((long double)0f);
0059c961          (x87_r2_2 - temp2_1);
0059c961          
0059c96c          if ((*(uint8_t*)((char*)((((x87_r2_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r2_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r2_2 == temp2_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0059c96c          {
0059c972              long double x87_r6_4 = ((long double)((float)x87_r5_8));
0059c976              long double temp3 = ((long double)1f);
0059c976              (x87_r6_4 - temp3);
0059c981              long double x87_r7_3;
0059c981              
0059c981              if ((*(uint8_t*)((char*)((((x87_r6_4 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, temp3))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == temp3) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) != 0)
0059c98d                  x87_r7_3 = (x87_r6_4 / ((long double)arg1));
0059c981              else
0059c987                  x87_r7_3 = (x87_r2_2 / (x87_r6_4 * ((long double)arg1)));
0059c987              
0059c9a2              long double x87_r7_5 = (x87_r7_3 * ((((long double)1f) - (((long double)arg1) / ((long double)var_1c))) * ((long double)arg5->intensity)));
0059c9a6              long double x87_r6_11 = (x87_r7_5 * ((long double)arg5->color.r));
0059c9a9              long double temp4 = ((long double)arg5->color.r);
0059c9a9              (x87_r6_11 - temp4);
0059c9a9              
0059c9b1              if ((*(uint8_t*)((char*)((((x87_r6_11 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp4))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp4) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
0059c9b1              {
0059c9b3                  x87_r7_5 = x87_r6_11;
0059c9b5                  x87_r6_11 = ((long double)arg5->color.r);
0059c9b1              }
0059c9b1              
0059c9be              *(uint32_t*)arg2 = ((float)(x87_r6_11 + ((long double)*(uint32_t*)arg2)));
0059c9c2              long double x87_r6_14 = (x87_r7_5 * ((long double)arg5->color.g));
0059c9c5              long double temp5 = ((long double)arg5->color.g);
0059c9c5              (x87_r6_14 - temp5);
0059c9c8              float* eax_1;
0059c9c8              eax_1 = ((((x87_r6_14 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_14, temp5))) ? 1 : 0) << 0xa) | ((((x87_r6_14 == temp5) ? 1 : 0) << 0xe) | 0x3000))));
0059c9c8              
0059c9cd              if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
0059c9cd              {
0059c9cf                  x87_r7_5 = x87_r6_14;
0059c9d1                  x87_r6_14 = ((long double)arg5->color.g);
0059c9cd              }
0059c9cd              
0059c9da              *(uint32_t*)arg3 = ((float)(x87_r6_14 + ((long double)*(uint32_t*)arg3)));
0059c9dc              long double x87_r7_6 = (x87_r7_5 * ((long double)arg5->color.b));
0059c9df              long double temp6 = ((long double)arg5->color.b);
0059c9df              (x87_r7_6 - temp6);
0059c9e2              float* eax_2;
0059c9e2              eax_2 = ((((x87_r7_6 < temp6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp6))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp6) ? 1 : 0) << 0xe) | 0x3800))));
0059c9e2              
0059c9e7              if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
0059c9eb                  x87_r7_6 = ((long double)arg5->color.b);
0059c9eb              
0059c9f4              *(uint32_t*)arg4 = ((float)(x87_r7_6 + ((long double)*(uint32_t*)arg4)));
0059c96c          }
0059c918      }
0059c8b0  }

0059ca02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0059ca10  uint8_t D3DPolyRender::RenderMeshSubset(int32_t arg1, class CSurface* arg2, uint8_t arg3, uint8_t arg4, class MeshBuffer* arg5)

0059ca10  {
0059ca13      class RenderDevice* RenderDevice::render_device_3 = RenderDevice::render_device;
0059ca1b      class MeshBuffer* ebp = arg5;
0059ca1f      long double x87_r7 = ((long double)ebp->detailTilingFactorSet);
0059ca23      long double temp0 = ((long double)0f);
0059ca23      (x87_r7 - temp0);
0059ca2a      class RenderDevice* RenderDevice::render_device_6 = RenderDevice::render_device_3;
0059ca2e      class MeshBuffer* var_54 = 1;
0059ca36      int32_t eax;
0059ca36      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
0059ca38      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
0059ca38      
0059ca3b      if (!(p))
0059ca3d          var_54 = nullptr;
0059ca3d      
0059ca4c      int32_t esi;
0059ca4c      
0059ca4c      if (trysinglepass == 0)
0059ca4c      {
0059ca70          arg5 = nullptr;
0059ca78          esi = 0;
0059ca4c      }
0059ca4c      else
0059ca4c      {
0059ca4e          int32_t eax_1;
0059ca4e          eax_1 = RenderDevice::render_device_3->m_caps.bCanDoSinglePassDetailing;
0059ca4e          
0059ca53          if (eax_1 == 0)
0059ca53          {
0059ca70              arg5 = nullptr;
0059ca78              esi = 0;
0059ca53          }
0059ca53          else
0059ca53          {
0059ca55              eax_1 = arg3;
0059ca55              
0059ca63              if ((eax_1 == 0 || var_54 == 0))
0059ca63              {
0059ca70                  arg5 = nullptr;
0059ca78                  esi = 0;
0059ca63              }
0059ca63              else
0059ca63              {
0059ca65                  esi = 1;
0059ca6a                  arg5 = 1;
0059ca63              }
0059ca53          }
0059ca4c      }
0059ca4c      
0059ca83      char* edi = arg1;
0059ca87      class CSurface* ebx = arg2;
0059ca8e      RenderDevice::render_device_3 = esi != 0;
0059ca9e      D3DPolyRender::SetSurface(ebx, (*(uint8_t*)(edi + ebp->isStippledOrAlphaedMask) & 1), RenderDevice::render_device_3, arg4);
0059ca9e      
0059caa8      if (esi != 0)
0059caa8      {
0059caac          ACRender::SetDetailSurfaceInternal(1);
0059cab1          long double x87_r7_1 = ((long double)ebp->detailTilingFactorSet);
0059cab4          long double temp1_1 = ((long double)Render::curr_detail_tiling);
0059cab4          (x87_r7_1 - temp1_1);
0059cabd          int32_t eax_6;
0059cabd          eax_6 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0059cabf          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
0059cabf          
0059cac2          if (p_1)
0059cacc              D3DPolyRender::SetDetailTiling(ebp, Render::curr_detail_tiling);
0059caa8      }
0059caa8      
0059cae1      int32_t edx_1;
0059cae1      edx_1 = override_cull_state == 0;
0059cae8      RenderDeviceD3D::SetCullMode(RenderDevice::render_device_6, (edx_1 + 1));
0059cb03      uint8_t var_6c_3;
0059cb03      
0059cb03      if ((override_light_state == 0 || *(int32_t*)((char*)RenderDevice::render_device + 0x7e0) != 0))
0059cb09          var_6c_3 = 1;
0059cb03      else
0059cb05          var_6c_3 = 0;
0059cb05      
0059cb0d      RenderDeviceD3D::SetFFLighting(RenderDevice::render_device_6, var_6c_3);
0059cb12      class RenderDevice* RenderDevice::render_device_1;
0059cb12      RenderDevice::render_device_1 = ebp->burnedInStaticLights;
0059cb12      
0059cb17      if (RenderDevice::render_device_1 >= 0)
0059cb17      {
0059cbce          long double x87_r7_2 = ((long double)ebx->luminosity);
0059cbd1          long double temp2_1 = ((long double)0f);
0059cbd1          (x87_r7_2 - temp2_1);
0059cbd7          RenderDevice::render_device_1 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0059cbd7          
0059cbdc          if ((*(uint8_t*)((char*)RenderDevice::render_device_1)[1] & 0x41) == 0)
0059cbdc          {
0059cbe2              class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0059cbe7              void* ecx_10 = *(int32_t*)((char*)RenderDevice::render_device_2 + 0x7e4);
0059cbe7              
0059cbf7              if (ecx_10 != 0)
0059cbf7              {
0059cc43                  tmpmaterial.Emissive.r = *(uint32_t*)((char*)ecx_10 + 0x3c);
0059cc4c                  tmpmaterial.Emissive.g = *(uint32_t*)((char*)ecx_10 + 0x40);
0059cc55                  tmpmaterial.Emissive.b = *(uint32_t*)((char*)ecx_10 + 0x44);
0059cc5e                  tmpmaterial.Emissive.a = *(uint32_t*)((char*)ecx_10 + 0x48);
0059cc64                  float luminosity_1 = ebx->luminosity;
0059cc67                  *(uint32_t*)((char*)ecx_10 + 0x3c) = luminosity_1;
0059cc69                  *(uint32_t*)((char*)ecx_10 + 0x40) = luminosity_1;
0059cc6c                  *(uint32_t*)((char*)ecx_10 + 0x44) = luminosity_1;
0059cc6f                  float luminosity_3 = luminosity_1;
0059cc73                  float luminosity_5 = luminosity_1;
0059cc77                  float luminosity_7 = luminosity_1;
0059cc7f                  *(uint32_t*)((char*)ecx_10 + 0x48) = 0x3f800000;
0059cc87                  int32_t* eax_14 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0059cc94                  *(uint32_t*)(*(uint32_t*)eax_14 + 0xc4)(eax_14, ((char*)ecx_10 + 0xc));
0059cbf7              }
0059cbf7              else
0059cbf7              {
0059cbf9                  float luminosity = ebx->luminosity;
0059cbfe                  tmpmaterial.Emissive.g = luminosity;
0059cc04                  float luminosity_2 = luminosity;
0059cc08                  float luminosity_6 = luminosity;
0059cc10                  tmpmaterial.Emissive.r = luminosity;
0059cc16                  tmpmaterial.Emissive.b = luminosity;
0059cc1c                  tmpmaterial.Emissive.a = 1f;
0059cc22                  int32_t* eax_11 = *(int32_t*)((char*)RenderDevice::render_device_2 + 0x468);
0059cc2d                  float luminosity_4 = luminosity;
0059cc34                  *(uint32_t*)(*(uint32_t*)eax_11 + 0xc4)(eax_11, 0x8ed018);
0059cbf7              }
0059cbdc          }
0059cb17      }
0059cb17      else
0059cb17      {
0059cb21          RenderDeviceD3D::SetFFEmissiveColorSource(RenderDevice::render_device_6, FromVertex);
0059cb26          RenderDevice::render_device_1 = RenderDevice::render_device;
0059cb26          
0059cb33          if (*(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e4) == 0)
0059cb33          {
0059cb39              float diffuseVal_1 = diffuseVal;
0059cb41              float diffuseVal_2 = diffuseVal_1;
0059cb45              float diffuseVal_6 = diffuseVal_1;
0059cb49              tmpmaterial.Ambient.g = diffuseVal_1;
0059cb5b              tmpmaterial.Ambient.a = 1f;
0059cb63              tmpmaterial.Ambient.r = diffuseVal_1;
0059cb69              tmpmaterial.Ambient.b = diffuseVal_1;
0059cb6f              tmpmaterial.Diffuse.g = diffuseVal_1;
0059cb75              float diffuseVal_4 = diffuseVal_1;
0059cb79              float diffuseVal_3 = diffuseVal_1;
0059cb7d              float diffuseVal_7 = diffuseVal_1;
0059cb8d              tmpmaterial.Diffuse.r = diffuseVal_1;
0059cb93              tmpmaterial.Diffuse.b = diffuseVal_1;
0059cb99              tmpmaterial.Diffuse.a = 1f;
0059cb9f              int32_t* eax_10 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x468);
0059cbaa              float diffuseVal_5 = diffuseVal_1;
0059cbb1              *(uint32_t*)(*(uint32_t*)eax_10 + 0xc4)(eax_10, 0x8ed018);
0059cbbb              RenderDeviceD3D::SetFFDiffuseColorSource(RenderDevice::render_device_6, FromMaterial);
0059cbc4              RenderDeviceD3D::SetFFAmbientColorSource(RenderDevice::render_device_6, FromMaterial);
0059cb33          }
0059cb17      }
0059cb17      
0059cc9a      RenderDevice::render_device_1 = ebp->m_bUseUVAnimation;
0059cc9f      uint32_t var_6c_6;
0059cc9f      
0059cc9f      if (RenderDevice::render_device_1 == 0)
0059cd43          var_6c_6 = 0;
0059cc9f      else
0059cc9f      {
0059cca5          float u = ebp->m_vUVDelta.u;
0059cca8          float v = ebp->m_vUVDelta.v;
0059ccab          class RenderDevice* RenderDevice::render_device_5 = RenderDevice::render_device;
0059ccb1          int32_t var_34_1 = 0;
0059ccb9          int32_t var_38_1 = 0;
0059ccc1          int32_t var_3c_1 = 0;
0059ccc9          int32_t var_24_1 = 0;
0059ccd1          int32_t var_28_1 = 0;
0059ccd9          int32_t var_30_1 = 0;
0059cce1          int32_t var_14_1 = 0;
0059cce9          int32_t var_8_1 = 0;
0059ccf1          int32_t var_c_1 = 0;
0059ccf9          int32_t var_10_1 = 0;
0059cd01          int32_t var_4_1 = 0x3f800000;
0059cd09          int32_t var_18_1 = 0x3f800000;
0059cd11          int32_t var_2c_1 = 0x3f800000;
0059cd19          int32_t var_40 = 0x3f800000;
0059cd21          float u_1 = u;
0059cd25          float v_1 = v;
0059cd29          int32_t* eax_15 = *(int32_t*)((char*)RenderDevice::render_device_5 + 0x468);
0059cd39          *(uint32_t*)(*(uint32_t*)eax_15 + 0xb0)(eax_15, 0x10, &var_40);
0059cd3f          var_6c_6 = 3;
0059cc9f      }
0059cc9f      
0059cd4d      RenderDeviceD3D::SetStageFFTextureTransformFlags(RenderDevice::render_device, 0, var_6c_6);
0059cd52      struct ID3DXMesh* pMesh = ebp->pMesh;
0059cd57      class MeshBuffer* eax_16;
0059cd57      
0059cd57      if (pMesh == 0)
0059cd57      {
0059ce3d          class RenderMesh* pRenderMesh = ebp->pRenderMesh;
0059ce3d          
0059ce42          if (pRenderMesh != 0)
0059ce49              RenderMesh::DrawSubset(pRenderMesh, edi);
0059cd57      }
0059cd57      else
0059cd57      {
0059cd61          ebx = 1;
0059cd63          int32_t ecx_16;
0059cd63          eax_16 = pMesh->vtable->DrawSubset(pMesh, edi);
0059cd63          
0059cd6b          if (eax_16 == 0x8876017c)
0059cd6b          {
0059cd72              while (ebx != 0)
0059cd72              {
0059cd85                  ebx = GraphicsResource::DiscardResourceBytes(0xffff);
0059cd85                  
0059cd8f                  if (pMesh->vtable->DrawSubset(pMesh, edi) != 0x8876017c)
0059cd8f                      break;
0059cd72              }
0059cd6b          }
0059cd6b          
0059cd91          ebx = arg2;
0059cd57      }
0059cd57      
0059cd95      eax_16 = arg3;
0059cdb3      class RenderDevice* RenderDevice::render_device_7;
0059cdb3      
0059cdb3      if (((eax_16 == 0 || arg5 != 0) || var_54 == 0))
0059ce71          RenderDevice::render_device_7 = RenderDevice::render_device_6;
0059cdb3      else
0059cdb3      {
0059cdbb          ACRender::SetDetailSurfaceInternal(0);
0059cdcb          RenderDeviceD3D::SetStageFFTexCoordIndex(RenderDevice::render_device_6, 0, 1);
0059cdd0          long double x87_r7_3 = ((long double)ebp->detailTilingFactorSet);
0059cdd3          long double temp4_1 = ((long double)Render::curr_detail_tiling);
0059cdd3          (x87_r7_3 - temp4_1);
0059cdd9          int32_t eax_19;
0059cdd9          eax_19 = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0059cddb          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
0059cddb          
0059cdde          if (p_2)
0059cde8              D3DPolyRender::SetDetailTiling(ebp, Render::curr_detail_tiling);
0059cde8          
0059cdf0          struct ID3DXMesh* pMesh_1 = ebp->pMesh;
0059cdf0          
0059cdf5          if (pMesh_1 == 0)
0059cdf5          {
0059ce53              class RenderMesh* pRenderMesh_1 = ebp->pRenderMesh;
0059ce53              
0059ce58              if (pRenderMesh_1 == 0)
0059ce58              {
0059ce2c                  RenderDevice::render_device_7 = RenderDevice::render_device_6;
0059ce36                  RenderDeviceD3D::SetStageFFTexCoordIndex(RenderDevice::render_device_7, 0, 0);
0059ce58              }
0059ce58              else
0059ce58              {
0059ce5b                  RenderMesh::DrawSubset(pRenderMesh_1, edi);
0059ce60                  RenderDevice::render_device_7 = RenderDevice::render_device_6;
0059ce6a                  RenderDeviceD3D::SetStageFFTexCoordIndex(RenderDevice::render_device_7, 0, 0);
0059ce58              }
0059cdf5          }
0059cdf5          else
0059cdf5          {
0059cdfb              ebx = 1;
0059cdfb              
0059ce05              if (pMesh_1->vtable->DrawSubset(pMesh_1, edi) == 0x8876017c)
0059ce05              {
0059ce09                  while (ebx != 0)
0059ce09                  {
0059ce1c                      ebx = GraphicsResource::DiscardResourceBytes(0xffff);
0059ce1c                      
0059ce26                      if (pMesh_1->vtable->DrawSubset(pMesh_1, edi) != 0x8876017c)
0059ce26                          break;
0059ce09                  }
0059ce05              }
0059ce05              
0059ce28              ebx = arg2;
0059ce2c              RenderDevice::render_device_7 = RenderDevice::render_device_6;
0059ce36              RenderDeviceD3D::SetStageFFTexCoordIndex(RenderDevice::render_device_7, 0, 0);
0059cdf5          }
0059cdb3      }
0059cdb3      
0059ce75      eax_16 = ebp->burnedInStaticLights;
0059ce75      
0059ce7a      if (eax_16 >= 0)
0059ce7a      {
0059ceb8          long double x87_r7_4 = ((long double)ebx->luminosity);
0059cebb          long double temp3_1 = ((long double)0.0);
0059cebb          (x87_r7_4 - temp3_1);
0059cec1          eax_16 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0059cec1          
0059cec6          if ((*(uint8_t*)((char*)eax_16)[1] & 0x41) == 0)
0059cec6          {
0059cec8              class RenderDeviceD3D* RenderDevice::render_device_4 = RenderDevice::render_device;
0059cece              class CMaterial* m_pCurrMaterial = RenderDevice::render_device_4->m_pCurrMaterial;
0059cece              
0059ced6              if (m_pCurrMaterial != 0)
0059ced6              {
0059cee8                  m_pCurrMaterial->d3d_material.Emissive.r = tmpmaterial.Emissive.r;
0059cef3                  *(uint32_t*)((char*)m_pCurrMaterial->d3d_material.Emissive.r)[4] = tmpmaterial.Emissive.g;
0059cefc                  *(uint32_t*)((char*)m_pCurrMaterial->d3d_material.Emissive.r)[8] = tmpmaterial.Emissive.b;
0059cf05                  *(uint32_t*)((char*)m_pCurrMaterial->d3d_material.Emissive.r)[0xc] = tmpmaterial.Emissive.a;
0059ced6              }
0059ced6              else
0059cedb                  RenderDeviceD3D::SetCurrentMaterial(RenderDevice::render_device_4, m_pCurrMaterial, 1);
0059cec6          }
0059ce7a      }
0059ce7a      else
0059ce7a      {
0059ce80          RenderDeviceD3D::SetFFEmissiveColorSource(RenderDevice::render_device_7, FromMaterial);
0059ce80          
0059ce93          if (*(int32_t*)((char*)RenderDevice::render_device + 0x7e4) == 0)
0059ce93          {
0059ce99              RenderDeviceD3D::SetFFDiffuseColorSource(RenderDevice::render_device_7, FromVertex);
0059cea2              RenderDeviceD3D::SetFFAmbientColorSource(RenderDevice::render_device_7, FromVertex);
0059ceb1              RenderDeviceD3D::SetCurrentMaterial(RenderDevice::render_device, nullptr, 1);
0059ce93          }
0059ce7a      }
0059ce7a      
0059cf08      eax_16 = ebp->m_bUseUVAnimation;
0059cf08      
0059cf11      if (eax_16 != 0)
0059cf1d          RenderDeviceD3D::SetStageFFTextureTransformFlags(RenderDevice::render_device, 0, 0);
0059cf1d      
0059cf22      eax_16 = 1;
0059cf27      return 1;
0059ca10  }

0059cf28                          90 90 90 90 90 90 90 90                                                          ........

0059cf30  uint8_t __thiscall SmartArray<_D3DXATTRIBUTERANGE,0>::grow(class SmartArray<_D3DXATTRIBUTERANGE,0>* this, uint32_t arg2)

0059cf30  {
0059cf38      uint32_t esi = arg2;
0059cf3e      uint32_t eax;
0059cf3e      
0059cf3e      if (esi >= this->m_num)
0059cf3e      {
0059cf4e          if (esi <= (this->m_sizeAndDeallocate & 0x7fffffff))
0059cf4e          {
0059cfd2              eax = 1;
0059cfd5              return 1;
0059cf4e          }
0059cf4e          
0059cf56          if (esi == 0)
0059cf56          {
0059cf58              SmartArray<unsigned char,0>::Reset(this);
0059cf5f              int32_t eax_2;
0059cf5f              eax_2 = 1;
0059cf62              return 1;
0059cf56          }
0059cf56          
0059cf71          uint32_t ebp_1 = operator new[]((esi * 0x14));
0059cf71          
0059cf78          if (ebp_1 != 0)
0059cf78          {
0059cf7d              if (this->m_data != 0)
0059cf7d              {
0059cf7f                  uint32_t m_num = this->m_num;
0059cf7f                  
0059cf83                  if ((m_num - 1) >= 0)
0059cf83                  {
0059cf88                      eax = ((m_num - 1) * 0x14);
0059cf8b                      int32_t edx_1 = m_num;
0059cfa2                      int32_t i;
0059cfa2                      
0059cfa2                      do
0059cfa2                      {
0059cf92                          void* esi_2 = (this->m_data + eax);
0059cf94                          uint32_t edi_1 = (eax + ebp_1);
0059cf9c                          eax -= 0x14;
0059cf9f                          i = edx_1;
0059cf9f                          edx_1 -= 1;
0059cfa0                          __builtin_memcpy(edi_1, esi_2, 0x14);
0059cfa2                      } while (i != 1);
0059cfa4                      esi = arg2;
0059cf83                  }
0059cf83                  
0059cfb8                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0059cfbd                      operator delete[](this->m_data);
0059cf7d              }
0059cf7d              
0059cfcb              this->m_data = ebp_1;
0059cfcd              this->m_sizeAndDeallocate = (esi | 0x80000000);
0059cfd2              eax = 1;
0059cfd5              return 1;
0059cf78          }
0059cf3e      }
0059cf3e      
0059cfda      eax = 0;
0059cfdd      return 0;
0059cf30  }


0059cfe0  void D3DPolyRender::SetStaticLightingVertexColors(class MeshBuffer* arg1, class Position* arg2)

0059cfe0  {
0059cfe7      class MeshBuffer* edi = arg1;
0059cfe7      
0059cff5      if (edi->meshFVF != 0x252)
0059cff5      {
0059cff7          int32_t eax;
0059cff7          eax = 0;
0059d000          return;
0059cff5      }
0059cff5      
0059d008      if (onlyOnce != 0)
0059d008      {
0059d00c          int32_t eax_2;
0059d00c          eax_2 = edi->burnedInStaticLights;
0059d00c          
0059d01e          if ((eax_2 >= 0 || (eax_2 & 0x7f) == Render::world_lights.num_static_lights))
0059d01e          {
0059d020              eax_2 = 1;
0059d029              return;
0059d01e          }
0059d008      }
0059d008      
0059d02c      struct ID3DXMesh* pMesh = edi->pMesh;
0059d035      int32_t eax_4 = pMesh->vtable->GetNumVertices(pMesh);
0059d049      int32_t var_74;
0059d049      
0059d049      if (pMesh->vtable->LockVertexBuffer(pMesh, 0, &var_74) < 0)
0059d049      {
0059d04d          int32_t eax_5;
0059d04d          eax_5 = 0;
0059d056          return;
0059d049      }
0059d049      
0059d059      if (eax_4 > 0)
0059d059      {
0059d05f          void* edi_1 = nullptr;
0059d061          int32_t var_70_1 = eax_4;
0059d2a4          bool cond:1_1;
0059d2a4          
0059d2a4          do
0059d2a4          {
0059d06b              int32_t i = 0;
0059d06d              bool cond:0_1 = Render::world_lights.num_static_lights <= 0;
0059d06f              float var_80 = 0f;
0059d077              float var_7c = 0f;
0059d07f              float var_78 = 0f;
0059d087              int32_t esi_2;
0059d087              
0059d087              if (cond:0_1)
0059d247                  esi_2 = var_74;
0059d087              else
0059d087              {
0059d181                  do
0059d181                  {
0059d0ae                      int32_t var_64 = 0x3f800000;
0059d0b6                      int32_t var_60_1 = 0;
0059d0be                      int32_t var_5c_1 = 0;
0059d0c6                      int32_t var_58_1 = 0;
0059d0ce                      float var_30_1 = 0f;
0059d0d6                      float var_2c_1 = 0f;
0059d0de                      float var_28_1 = 0f;
0059d0e6                      Frame::cache(&var_64);
0059d0f2                      int32_t var_68;
0059d0f2                      LIGHTINFO::convert_to_local(&var_68, &Render::world_lights.sorted_static_lights[i]->info.type, &arg2->frame);
0059d0f7                      int32_t eax_7 = var_68;
0059d0fb                      esi_2 = var_74;
0059d0fb                      
0059d105                      if (eax_7 == 0)
0059d1ba                          calc_point_light(((char*)edi_1 + esi_2), &var_80, &var_7c, &var_78, &var_68);
0059d105                      else if (eax_7 == 1)
0059d10c                      {
0059d116                          long double x87_r5_1 = ((long double)*(uint32_t*)(((char*)edi_1 + esi_2) + 0x14));
0059d12e                          (((((long double)var_28_1) * x87_r5_1) + (((long double)var_30_1) * ((long double)*(uint32_t*)(((char*)edi_1 + esi_2) + 0xc)))) + (((long double)var_2c_1) * ((long double)*(uint32_t*)(((char*)edi_1 + esi_2) + 0x10))));
0059d136                          long double temp3_1 = ((long double)0f);
0059d136                          (x87_r5_1 - temp3_1);
0059d136                          
0059d141                          if ((*(uint8_t*)((char*)((((x87_r5_1 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == temp3_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
0059d141                          {
0059d143                              float var_c;
0059d143                              long double x87_r7_2 = (x87_r5_1 * ((long double)var_c));
0059d154                              float var_18;
0059d154                              var_80 = ((float)((((long double)var_18) * x87_r7_2) + ((long double)var_80)));
0059d162                              float var_14;
0059d162                              var_7c = ((float)((((long double)var_14) * x87_r7_2) + ((long double)var_7c)));
0059d173                              float var_10;
0059d173                              var_78 = ((float)((((long double)var_10) * x87_r7_2) + ((long double)var_78)));
0059d141                          }
0059d10c                      }
0059d10c                      
0059d17e                      i += 1;
0059d181                  } while (i < Render::world_lights.num_static_lights);
0059d181                  
0059d187                  long double x87_r7_3 = ((long double)var_80);
0059d18b                  long double temp4_1 = ((long double)0f);
0059d18b                  (x87_r7_3 - temp4_1);
0059d191                  int32_t eax_10;
0059d191                  eax_10 = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0059d193                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0059d193                  
0059d196                  if (p_1)
0059d196                  {
0059d1c4                      long double x87_r7_4 = ((long double)var_80);
0059d1c8                      long double temp5_1 = ((long double)1f);
0059d1c8                      (x87_r7_4 - temp5_1);
0059d1ce                      eax_10 = ((((x87_r7_4 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp5_1) ? 1 : 0) << 0xe) | 0))));
0059d1ce                      
0059d1d3                      if ((*(uint8_t*)((char*)eax_10)[1] & 0x41) == 0)
0059d1d5                          var_80 = 1f;
0059d196                  }
0059d196                  else
0059d198                      var_80 = 0f;
0059d198                  
0059d1dd                  long double x87_r7_5 = ((long double)var_7c);
0059d1e1                  long double temp6_1 = ((long double)0f);
0059d1e1                  (x87_r7_5 - temp6_1);
0059d1e7                  eax_10 = ((((x87_r7_5 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp6_1) ? 1 : 0) << 0xe) | 0))));
0059d1e9                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0059d1e9                  
0059d1ec                  if (p_2)
0059d1ec                  {
0059d1f8                      long double x87_r7_6 = ((long double)var_7c);
0059d1fc                      long double temp7_1 = ((long double)1f);
0059d1fc                      (x87_r7_6 - temp7_1);
0059d202                      eax_10 = ((((x87_r7_6 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp7_1) ? 1 : 0) << 0xe) | 0))));
0059d202                      
0059d207                      if ((*(uint8_t*)((char*)eax_10)[1] & 0x41) == 0)
0059d209                          var_7c = 1f;
0059d1ec                  }
0059d1ec                  else
0059d1ee                      var_7c = 0f;
0059d1ee                  
0059d211                  long double x87_r7_7 = ((long double)var_78);
0059d215                  long double temp8_1 = ((long double)0f);
0059d215                  (x87_r7_7 - temp8_1);
0059d21b                  eax_10 = ((((x87_r7_7 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp8_1) ? 1 : 0) << 0xe) | 0))));
0059d21d                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0059d21d                  
0059d220                  if (p_3)
0059d220                  {
0059d22c                      long double x87_r7_8 = ((long double)var_78);
0059d230                      long double temp9_1 = ((long double)1f);
0059d230                      (x87_r7_8 - temp9_1);
0059d236                      eax_10 = ((((x87_r7_8 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp9_1) ? 1 : 0) << 0xe) | 0))));
0059d236                      
0059d23b                      if ((*(uint8_t*)((char*)eax_10)[1] & 0x41) == 0)
0059d23d                          var_78 = 1f;
0059d220                  }
0059d220                  else
0059d222                      var_78 = 0f;
0059d087              }
0059d087              
0059d298              *(uint32_t*)(((char*)edi_1 + esi_2) + 0x18) = (((((_ftol2() | 0xffffff00) << 8) | ((uint32_t)_ftol2())) << 8) | ((uint32_t)_ftol2()));
0059d29c              edi_1 += 0x2c;
0059d29f              cond:1_1 = var_70_1 != 1;
0059d2a0              var_70_1 -= 1;
0059d2a4          } while (cond:1_1);
0059d2aa          edi = arg1;
0059d059      }
0059d059      
0059d2b6      pMesh->vtable->UnlockVertexBuffer(pMesh);
0059d2ca      edi->burnedInStaticLights = ((Render::world_lights.num_static_lights & 0x7f) - 0x80);
0059d2cd      int32_t eax_19;
0059d2cd      eax_19 = 1;
0059cfe0  }

0059d099                                                                             8d a4 24 00 00 00 00                           ..$....
0059d2d7                                                                       90 90 90 90 90 90 90 90 90                         .........

0059d2e0  uint8_t D3DPolyRender::FlushAlphaList(float arg1)

0059d2e0  {
0059d2e3      uint16_t D3DPolyRender::alphaedMeshCountClip_1 = D3DPolyRender::alphaedMeshCountClip;
0059d2f0      uint32_t D3DPolyRender::alphaedMeshCountClip_2 = ((uint32_t)D3DPolyRender::alphaedMeshCountClip_1);
0059d2f7      int32_t ebx;
0059d2f7      ebx = 1;
0059d2f7      
0059d2fd      if (maxAlphaMeshCountClip < D3DPolyRender::alphaedMeshCountClip_2)
0059d2ff          maxAlphaMeshCountClip = D3DPolyRender::alphaedMeshCountClip_2;
0059d2ff      
0059d305      int32_t ebp;
0059d305      ebp = D3DPolyRender::alphaedMeshCountAlpha;
0059d312      uint32_t eax_1 = ((uint32_t)ebp);
0059d317      uint32_t var_44 = eax_1;
0059d317      
0059d31b      if (maxAlphaMeshCountAlpha < eax_1)
0059d31d          maxAlphaMeshCountAlpha = eax_1;
0059d31d      
0059d326      long double x87_r7_1 = (((long double)arg1) * ((long double)3000f));
0059d32c      long double x87_r6 = ((long double)D3DPolyRender::alphaedMeshCountClip_2);
0059d330      (x87_r6 - x87_r7_1);
0059d332      eax_1 = ((((x87_r6 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_1) ? 1 : 0) << 0xe) | 0x3800))));
0059d334      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0059d334      
0059d337      if (!(p))
0059d337      {
0059d339          long double x87_r6_1 = ((long double)var_44);
0059d33d          (x87_r6_1 - x87_r7_1);
0059d33f          eax_1 = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0x3800))));
0059d343          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0059d343          
0059d346          if (!(p_1))
0059d346          {
0059d34a              eax_1 = 0;
0059d350              return 0;
0059d346          }
0059d337      }
0059d337      
0059d357      void var_40;
0059d357      
0059d357      if (D3DPolyRender::alphaedMeshCountClip_1 != 0)
0059d357      {
0059d372          __builtin_memcpy(&var_40, &RenderDevice::render_device->m_GState, 0x40);
0059d374          int32_t i = 0;
0059d374          
0059d378          if (D3DPolyRender::alphaedMeshCountClip_2 > 0)
0059d378          {
0059d37a              class Matrix4* esi_3 = &D3DPolyRender::alphaedMeshListClip[0].worldMatrix;
0059d37a              
0059d3cf              do
0059d3cf              {
0059d380                  eax_1 = *(int32_t*)((char*)esi_3 + 0x40);
0059d380                  
0059d385                  if (eax_1 != 0)
0059d385                  {
0059d38e                      RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device, esi_3);
0059d39f                      RenderDeviceD3D::SetCurrentMaterial(RenderDevice::render_device, esi_3->_11, 0);
0059d385                  }
0059d385                  
0059d3c7                  ebx &= D3DPolyRender::RenderMeshSubset(*(int32_t*)((char*)esi_3 + -0xc), *(int32_t*)((char*)esi_3 + -8), 0, *(int32_t*)((char*)esi_3 + 0x41), *(int32_t*)((char*)esi_3 + -0x10));
0059d3c9                  i += 1;
0059d3ca                  esi_3 += 0x54;
0059d3cf              } while (i < ((uint32_t)D3DPolyRender::alphaedMeshCountClip));
0059d378          }
0059d378          
0059d3dc          RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device, &var_40);
0059d3e1          ebp = D3DPolyRender::alphaedMeshCountAlpha;
0059d357      }
0059d357      
0059d3eb      D3DPolyRender::alphaedMeshCountClip = 0;
0059d3eb      
0059d3f4      if (ebp != 0)
0059d3f4      {
0059d40f          __builtin_memcpy(&var_40, &RenderDevice::render_device->m_GState, 0x40);
0059d411          int32_t i_1 = 0;
0059d411          
0059d416          if (ebp > 0)
0059d416          {
0059d418              class Matrix4* esi_6 = &D3DPolyRender::alphaedMeshListAlpha[0].worldMatrix;
0059d418              
0059d46f              do
0059d46f              {
0059d420                  eax_1 = *(int32_t*)((char*)esi_6 + 0x40);
0059d420                  
0059d425                  if (eax_1 != 0)
0059d425                  {
0059d42e                      RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device, esi_6);
0059d43f                      RenderDeviceD3D::SetCurrentMaterial(RenderDevice::render_device, esi_6->_11, 0);
0059d425                  }
0059d425                  
0059d45d                  ebx &= D3DPolyRender::RenderMeshSubset(*(int32_t*)((char*)esi_6 + -0xc), *(int32_t*)((char*)esi_6 + -8), 0, *(int32_t*)((char*)esi_6 + 0x41), *(int32_t*)((char*)esi_6 + -0x10));
0059d469                  i_1 += 1;
0059d46a                  esi_6 += 0x54;
0059d46f              } while (i_1 < ((uint32_t)D3DPolyRender::alphaedMeshCountAlpha));
0059d416          }
0059d416          
0059d47c          RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device, &var_40);
0059d3f4      }
0059d3f4      
0059d484      eax_1 = ebx;
0059d486      D3DPolyRender::alphaedMeshCountAlpha = 0;
0059d493      return eax_1;
0059d2e0  }

0059d494                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0059d4a0  uint8_t D3DPolyRender::DrawMesh(int32_t arg1, class CSurface** arg2, class MeshBuffer* arg3, uint8_t arg4)

0059d4a0  {
0059d4a8      int32_t* eax_1 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0059d4b3      class MeshBuffer* edi = arg3;
0059d4bc      *(uint32_t*)(*(uint32_t*)eax_1 + 0x164)(eax_1, edi->meshFVF);
0059d4c6      int32_t ebx;
0059d4c6      ebx = 1;
0059d4c8      char* esi = nullptr;
0059d4cc      arg3 = 1;
0059d4d0      char var_c = 1;
0059d4d0      
0059d4d4      if (arg1 > 0)
0059d4d4      {
0059d595          do
0059d595          {
0059d4f1              if ((skipNoTexture == 0 || (arg2[esi]->type & 6) != 0))
0059d4e7                  goto label_59d516;
0059d4e7              
0059d4fa              if (RenderDeviceD3D::ObjBuildingOrBuildingPart == 0)
0059d4fa              {
0059d500                  int32_t eax_3;
0059d500                  eax_3 = arg4;
0059d500                  
0059d506                  if (eax_3 == 0)
0059d506                  {
0059d50c                      skipNoTexture = 1;
0059d516                  label_59d516:
0059d516                      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059d51c                      eax_3 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e0);
0059d51c                      
0059d524                      if (eax_3 != 0)
0059d524                          goto label_59d56a;
0059d524                      
0059d526                      uint32_t D3DPolyRender::s_AlphaDelayMask_1 = D3DPolyRender::s_AlphaDelayMask;
0059d526                      
0059d537                      if ((D3DPolyRender::s_AlphaDelayMask_1 == 0 || Render::curr_detail_surface != 0))
0059d52e                          goto label_59d56a;
0059d52e                      
0059d539                      class CSurface* eax_4;
0059d539                      eax_4 = Render::m_RenderPrefs.MultiPassAlpha;
0059d539                      
0059d549                      if ((eax_4 == 0 || (*(uint8_t*)(esi + edi->isStippledOrAlphaedMask) & 8) == 0))
0059d549                      {
0059d5a8                          uint8_t* eax_9;
0059d5a8                          eax_9 = *(uint8_t*)(esi + edi->isStippledOrAlphaedMask);
0059d5a8                          
0059d5ad                          if ((D3DPolyRender::s_AlphaDelayMask_1 & eax_9) == 0)
0059d5ad                          {
0059d602                              if ((D3DPolyRender::s_AlphaDelayMask_1 & 4) == 0)
0059d602                                  goto label_59d56a;
0059d602                              
0059d608                              void* eax_12 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e4);
0059d608                              
0059d61b                              if ((eax_12 == 0 || *(uint32_t*)((char*)eax_12 + 8) == 0))
0059d610                                  goto label_59d56a;
0059d610                              
0059d631                              uint8_t eax_8 = D3DPolyRender::AddMeshToAlphaList(edi, esi, arg2[esi], var_c, 0, 0);
0059d639                              var_c = 0;
0059d58c                              ebx &= eax_8;
0059d5ad                          }
0059d5ad                          else
0059d5ad                          {
0059d5af                              eax_9 u>>= 3;
0059d5b2                              eax_9 &= 1;
0059d5b4                              uint8_t var_4_1 = eax_9;
0059d5b8                              char var_8_1;
0059d5b8                              
0059d5b8                              if (eax_9 == 0)
0059d5b8                              {
0059d5c4                                  RenderDevice::render_device_1 = var_c;
0059d5c8                                  var_8_1 = RenderDevice::render_device_1;
0059d5b8                              }
0059d5b8                              else
0059d5b8                              {
0059d5ba                                  D3DPolyRender::s_AlphaDelayMask_1 = arg3;
0059d5be                                  var_8_1 = D3DPolyRender::s_AlphaDelayMask_1;
0059d5b8                              }
0059d5b8                              
0059d5e4                              ebx &= D3DPolyRender::AddMeshToAlphaList(edi, esi, arg2[esi], var_8_1, 0, var_4_1);
0059d5e4                              
0059d5ef                              if (var_4_1 == 0)
0059d5f8                                  var_c = 0;
0059d5ef                              else
0059d5f1                                  arg3 = 0;
0059d5ad                          }
0059d549                      }
0059d549                      else
0059d549                      {
0059d563                          ebx &= D3DPolyRender::AddMeshToAlphaList(edi, esi, arg2[esi], arg3, 1, 1);
0059d565                          arg3 = 0;
0059d56a                      label_59d56a:
0059d56a                          Render::CalcObjectMatrix();
0059d58c                          ebx &= D3DPolyRender::RenderMeshSubset(esi, arg2[esi], ((int8_t)Render::curr_detail_surface != 0), 0, edi);
0059d549                      }
0059d506                  }
0059d4fa              }
0059d4fa              
0059d592              esi = &esi[1];
0059d595          } while (esi < arg1);
0059d4d4      }
0059d4d4      
0059d59e      int32_t eax_2;
0059d59e      eax_2 = ebx;
0059d5a4      return eax_2;
0059d4a0  }

0059d643           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0059d650  int32_t D3DPolyRender::SetSurface(class CPolygon* arg1, enum Sidedness arg2, int32_t arg3)

0059d650  {
0059d654      int32_t edx = 0;
0059d65d      int32_t ebx;
0059d65d      ebx = arg1->stippling;
0059d660      char* eax_1;
0059d660      uint32_t ecx;
0059d660      
0059d660      if (arg2 != POSITIVE)
0059d660      {
0059d678          ecx = ((uint32_t)arg1->neg_surface);
0059d678          
0059d67c          if ((ebx & 2) != 0)
0059d67e              edx = 1;
0059d67e          
0059d683          eax_1 = arg1->neg_uv_indices;
0059d660      }
0059d660      else
0059d660      {
0059d665          ecx = ((uint32_t)arg1->pos_surface);
0059d665          
0059d669          if ((ebx & 1) != 0)
0059d66b              edx = 1;
0059d66b          
0059d670          eax_1 = arg1->pos_uv_indices;
0059d660      }
0059d660      
0059d686      Render::UVIndexTbl = eax_1;
0059d691      int32_t eax_2;
0059d691      eax_2 = arg3 != 0;
0059d696      edx = edx != 0;
0059d6af      return D3DPolyRender::SetSurface(Render::curr_surfaces[ecx], edx, eax_2, 0);
0059d650  }


0059d6b0  uint8_t __stdcall D3DPolyRender::CreateDxDiagReportFile(class D3DPolyRender* this @ ecx, class PStringBase<char>* arg2)

0059d6b0  {
0059d6c3      void lpBuffer;
0059d6c3      GetTempPathA(0x104, &lpBuffer);
0059d6d0      char const* const var_26c_1 = "dxdiag.txt";
0059d6d9      void* var_270_1 = &lpBuffer;
0059d6e0      PStringBase<char>::sprintf(arg2, "%s%s");
0059d6fa      void var_104;
0059d6fa      _snprintf(&var_104, 0x104, "dxdiag.exe %hs", arg2->m_charbuffer);
0059d70e      int32_t s;
0059d70e      __builtin_memset(&s, 0, 0x44);
0059d712      HANDLE var_25c = nullptr;
0059d71a      int32_t* lpProcessInformation = &var_25c;
0059d71b      HANDLE hObject = nullptr;
0059d71f      int32_t var_254 = 0;
0059d727      struct STARTUPINFOA* lpStartupInfo = &s;
0059d728      PSTR lpCurrentDirectory = nullptr;
0059d729      void* lpEnvironment = nullptr;
0059d72a      enum PROCESS_CREATION_FLAGS dwCreationFlags = NORMAL_PRIORITY_CLASS | CREATE_DEFAULT_ERROR_MODE;
0059d72f      BOOL bInheritHandles = 0;
0059d730      struct SECURITY_ATTRIBUTES* lpThreadAttributes = nullptr;
0059d731      struct SECURITY_ATTRIBUTES* lpProcessAttributes = nullptr;
0059d732      int32_t var_250 = 0;
0059d73d      PSTR lpCommandLine = &var_104;
0059d73e      PSTR lpApplicationName = nullptr;
0059d740      int32_t ebx;
0059d740      ebx = 0;
0059d742      s = 0x44;
0059d742      
0059d752      if (CreateProcessA(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation) != 0)
0059d752      {
0059d766          if (WaitForSingleObject(var_25c, 0xea60) == 0)
0059d768              ebx = 1;
0059d768          
0059d775          CloseHandle(var_25c);
0059d77c          CloseHandle(hObject);
0059d752      }
0059d752      
0059d780      BOOL eax;
0059d780      eax = ebx;
0059d789      return eax;
0059d6b0  }

0059d78c                                      90 90 90 90                                                              ....

0059d790  uint8_t D3DPolyRender::DrawMesh(class CGfxObj* arg1, class MeshBuffer* arg2)

0059d790  {
0059d797      if (gfxobjs != 0)
0059d7ba          return D3DPolyRender::DrawMesh(arg1->num_surfaces, Render::curr_surfaces, arg2, 0);
0059d7ba      
0059d799      int32_t eax;
0059d799      eax = 1;
0059d79b      return 1;
0059d790  }

0059d7bb                                                                                   90 90 90 90 90                             .....

0059d7c0  void D3DPolyRender::DrawPolyInternal(class CPolygon* arg1)

0059d7c0  {
0059d7e7      if ((skipPolys == 0 && (((int8_t)Render::curr_surfaces[((uint32_t)arg1->pos_surface)]->type) & 6) != 0))
0059d7e7      {
0059d7ed          Render::CalcObjectMatrix();
0059d7f9          int32_t eax_3;
0059d7f9          
0059d7f9          if (trysinglepass != 0)
0059d801              eax_3 = RenderDevice::render_device->m_caps.bCanDoSinglePassDetailing;
0059d801          
0059d818          int32_t edi_1;
0059d818          
0059d818          if ((((trysinglepass == 0 || eax_3 == 0) || Render::curr_detail_surface == 0) || trydetailing == 0))
0059d821              edi_1 = 0;
0059d818          else
0059d81a              edi_1 = 1;
0059d81a          
0059d823          class RenderDevice* edx_1;
0059d823          edx_1 = arg1->stippling;
0059d826          uint32_t pos_surface = ((uint32_t)arg1->pos_surface);
0059d82a          int32_t eax_6 = 0;
0059d82a          
0059d82f          if ((edx_1 & 1) != 0)
0059d831              eax_6 = 1;
0059d831          
0059d839          Render::UVIndexTbl = arg1->pos_uv_indices;
0059d841          char* edx_2;
0059d841          edx_2 = edi_1 != 0;
0059d846          eax_6 = eax_6 != 0;
0059d85c          int32_t esi_1 = D3DPolyRender::SetSurface(Render::curr_surfaces[pos_surface], eax_6, edx_2, 0);
0059d86e          enum CullModeType var_14_1;
0059d86e          
0059d86e          if ((override_cull_state != 0 || arg1->sides_type == 1))
0059d874              var_14_1 = CULLMODE_NONE;
0059d86e          else
0059d870              var_14_1 = CULLMODE_CW;
0059d870          
0059d87c          RenderDeviceD3D::SetCullMode(RenderDevice::render_device, var_14_1);
0059d888          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059d88e          int32_t eax_10;
0059d88e          
0059d88e          if (override_light_state != 0)
0059d890              eax_10 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e0);
0059d890          
0059d898          uint8_t var_14_2;
0059d898          
0059d898          if ((override_light_state == 0 || eax_10 != 0))
0059d89e              var_14_2 = 1;
0059d898          else
0059d89a              var_14_2 = 0;
0059d89a          
0059d8a0          RenderDeviceD3D::SetFFLighting(RenderDevice::render_device_1, var_14_2);
0059d8a0          
0059d8a7          if (edi_1 != 0)
0059d8a7          {
0059d8af              ACRender::SetDetailSurfaceInternal(1);
0059d8ba              int32_t* eax_11 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0059d8cb              *(uint32_t*)(*(uint32_t*)eax_11 + 0x164)(eax_11, 0x252);
0059d8d4              int32_t i = 0;
0059d8d4              
0059d8d8              if (arg1->num_pts > 0)
0059d8d8              {
0059d8de                  char* Render::UVIndexTbl_1 = Render::UVIndexTbl;
0059d8e4                  int32_t* esi_2 = &v[0].y;
0059d8e4                  
0059d9a3                  do
0059d9a3                  {
0059d8f3                      int32_t* edi_2 = arg1->vertices[i];
0059d8f8                      esi_2[-1] = *(uint32_t*)edi_2;
0059d8fe                      *(uint32_t*)esi_2 = edi_2[1];
0059d903                      esi_2[1] = edi_2[2];
0059d909                      esi_2[2] = edi_2[5];
0059d90f                      esi_2[3] = edi_2[6];
0059d915                      int32_t noFadeDetail_1 = noFadeDetail;
0059d91b                      esi_2[4] = edi_2[7];
0059d91e                      int32_t eax_16;
0059d91e                      eax_16 = 0xff;
0059d91e                      
0059d922                      if (noFadeDetail_1 == 0)
0059d922                      {
0059d930                          eax_16 = ACRender::get_alpha_for_z(*(uint32_t*)((char*)PrimD3DRender::xformStart(edi_2, 0)->__inner0 + 8));
0059d935                          Render::UVIndexTbl_1 = Render::UVIndexTbl;
0059d922                      }
0059d922                      
0059d94f                      bool cond:2_1 = Render::curr_texture_is_set == 0;
0059d951                      esi_2[5] = ((((uint32_t)eax_16) << 0x18) | 0xffffff);
0059d951                      
0059d954                      if (!(cond:2_1))
0059d954                      {
0059d956                          int32_t eax_19 = edi_2[4];
0059d956                          
0059d95b                          if (eax_19 != 0)
0059d95b                          {
0059d96a                              esi_2[6] = ((float)(((long double)Render::TextureUSize) * ((long double)*(uint32_t*)(eax_19 + (((int32_t)Render::UVIndexTbl_1[i]) << 3)))));
0059d97e                              esi_2[7] = ((float)(((long double)Render::TextureVSize) * ((long double)*(uint32_t*)((edi_2[4] + (((int32_t)Render::UVIndexTbl_1[i]) << 3)) + 4))));
0059d98a                              esi_2[8] = ((float)(((long double)Render::curr_detail_tiling) * ((long double)esi_2[6])));
0059d996                              esi_2[9] = ((float)(((long double)Render::curr_detail_tiling) * ((long double)esi_2[7])));
0059d95b                          }
0059d954                      }
0059d954                      
0059d99d                      i += 1;
0059d99e                      esi_2 = &esi_2[0xb];
0059d9a3                  } while (i < ((uint32_t)arg1->num_pts));
0059d8d8              }
0059d8d8              
0059d9ba              RenderDeviceD3D::DrawPrimitiveUP(D3DPT_TRIANGLEFAN, (((uint32_t)arg1->num_pts) - 2), &v, 0x2c);
0059d9c6              return;
0059d8a7          }
0059d8a7          
0059d9cd          int32_t* eax_22 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0059d9db          *(uint32_t*)(*(uint32_t*)eax_22 + 0x164)(eax_22, 0x152);
0059d9e4          int32_t i_1 = 0;
0059d9e4          
0059d9e8          if (arg1->num_pts > 0)
0059d9e8          {
0059d9ee              char* Render::UVIndexTbl_2 = Render::UVIndexTbl;
0059d9f4              int32_t* eax_24 = &v[0].y;
0059d9f4              
0059da98              do
0059da98              {
0059da03                  int32_t* ecx_9 = arg1->vertices[i_1];
0059da08                  eax_24[-1] = *(uint32_t*)ecx_9;
0059da0e                  *(uint32_t*)eax_24 = ecx_9[1];
0059da13                  eax_24[1] = ecx_9[2];
0059da19                  eax_24[2] = ecx_9[5];
0059da1f                  eax_24[3] = ecx_9[6];
0059da25                  eax_24[4] = ecx_9[7];
0059da33                  eax_24[5] = ((esi_1 << 0x18) | 0xffffff);
0059da33                  
0059da50                  if ((Render::curr_detail_surface != 0 && (trydetailing != 0 && esi_1 != 0xff)))
0059da52                      esi_1 = 0xff;
0059da52                  
0059da5f                  if (Render::curr_texture_is_set != 0)
0059da5f                  {
0059da6e                      long double x87_r7_10 = (((long double)Render::TextureUSize) * ((long double)*(uint32_t*)(ecx_9[4] + (((int32_t)Render::UVIndexTbl_2[i_1]) << 3))));
0059da71                      Render::UVIndexTbl_2 = Render::UVIndexTbl;
0059da77                      eax_24[6] = ((float)x87_r7_10);
0059da8b                      eax_24[7] = ((float)(((long double)Render::TextureVSize) * ((long double)*(uint32_t*)((ecx_9[4] + (((int32_t)Render::UVIndexTbl_2[i_1]) << 3)) + 4))));
0059da5f                  }
0059da5f                  
0059da92                  i_1 += 1;
0059da93                  eax_24 = &eax_24[9];
0059da98              } while (i_1 < ((uint32_t)arg1->num_pts));
0059d9e8          }
0059d9e8          
0059daaf          RenderDeviceD3D::DrawPrimitiveUP(D3DPT_TRIANGLEFAN, (((uint32_t)arg1->num_pts) - 2), &v, 0x24);
0059dac9          int32_t eax_27;
0059dac9          
0059dac9          if ((trydetailing == 0 || (Render::curr_surface->type & 4) != 0))
0059dad2              eax_27 = 0;
0059dac9          else
0059dacb              eax_27 = 1;
0059dacb          
0059dae4          if ((Render::curr_detail_surface != 0 && eax_27 != 0))
0059dae4          {
0059daec              ACRender::SetDetailSurfaceInternal(0);
0059daf1              int32_t eax_28;
0059daf1              eax_28 = arg1->num_pts;
0059daf7              int32_t ebx_15 = 0;
0059daf9              int32_t i_2 = 0;
0059daf9              
0059dafd              if (eax_28 > 0)
0059dafd              {
0059db03                  float* esi_3 = &v[0].tu;
0059db03                  
0059db7c                  do
0059db7c                  {
0059db1c                      eax_28 = 0xff;
0059db1c                      
0059db20                      if (noFadeDetail == 0)
0059db2e                          eax_28 = ACRender::get_alpha_for_z(*(uint32_t*)((char*)PrimD3DRender::xformStart(arg1->vertices[i_2], 0)->__inner0 + 8));
0059db2e                      
0059db38                      if ((noFadeDetail != 0 || eax_28 > 0))
0059db3a                          ebx_15 = 1;
0059db3a                      
0059db50                      esi_3[-1] = ((((uint32_t)eax_28) << 0x18) | (esi_3[-1] & 0xffffff));
0059db50                      
0059db5a                      if (Render::curr_texture_is_set != 0)
0059db5a                      {
0059db64                          *(uint32_t*)esi_3 = ((float)(((long double)Render::curr_detail_tiling) * ((long double)*(uint32_t*)esi_3)));
0059db6f                          esi_3[1] = ((float)(((long double)Render::curr_detail_tiling) * ((long double)esi_3[1])));
0059db5a                      }
0059db5a                      
0059db76                      i_2 += 1;
0059db77                      esi_3 = &esi_3[9];
0059db7c                  } while (i_2 < ((uint32_t)arg1->num_pts));
0059db7c                  
0059db80                  if (ebx_15 != 0)
0059db93                      RenderDeviceD3D::DrawPrimitiveUP(D3DPT_TRIANGLEFAN, (((uint32_t)arg1->num_pts) - 2), &v, 0x24);
0059dafd              }
0059dae4          }
0059d7e7      }
0059d7c0  }

0059db0a                                8d 9b 00 00 00 00                                                            ......

0059dba0  void D3DPolyRender::polyListFinishInternal(class D3DPolyRender const* this @ ecx)

0059dba0  {
0059dba6      int32_t* i = &Render::PolyList;
0059dba6      
0059dbad      if (Render::PolyNext > 0x8461b8)
0059dbad      {
0059dbc5          do
0059dbc5          {
0059dbb3              D3DPolyRender::DrawPolyInternal(*(uint32_t*)i);
0059dbbd              i = &i[2];
0059dbc5          } while (i < Render::PolyNext);
0059dbad      }
0059dba0  }

0059dbc9                             90 90 90 90 90 90 90                                                           .......

0059dbd0  uint8_t __fastcall D3DPolyRender::ResetDynamicBuffers(class D3DPolyRender* this)

0059dbd0  {
0059dbd6      class HashTableData<unsigned long,float>* edi;
0059dbd6      class HashTableData<unsigned long,float>* var_2c = edi;
0059dbe3      void __return;
0059dbe3      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_DynamicVertexStreamHash.m_intrusiveTable, &__return);
0059dbe8      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
0059dbed      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0059dbef      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0059dbf2      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
0059dbf6      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
0059dbf6      
0059dbfa      if (i_1 != 0)
0059dbfa      {
0059dc00          while (true)
0059dc00          {
0059dc00              class DBOCache* m_data = i_1->m_data;
0059dc00              
0059dc05              if (m_data != 0)
0059dc05              {
0059dc07                  edi = m_data->m_fidelityTable.m_intrusiveTable.m_aInplaceBuckets[0xa];
0059dc13                  class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>* ecx_1 = m_data->m_ObjTable.m_intrusiveTable.m_aInplaceBuckets[8];
0059dc13                  
0059dc16                  if (edi > 0xffff)
0059dc18                      edi = 0xffff;
0059dc18                  
0059dc1f                  if (edi > ecx_1)
0059dc1f                  {
0059dc21                      class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>* ebp_1 = m_data->m_ObjTable.m_intrusiveTable.m_aInplaceBuckets[9];
0059dc26                      void* eax_2 = ((char*)edi - ecx_1);
0059dc2c                      void* eax_3 = ((char*)eax_2 + (eax_2 >> 1));
0059dc2c                      
0059dc33                      if (eax_3 < 0x1000)
0059dc35                          eax_3 = 0x1000;
0059dc35                      
0059dc3a                      edi += eax_3;
0059dc3a                      
0059dc42                      if (edi > 0xffff)
0059dc44                          edi = 0xffff;
0059dc44                      
0059dc49                      m_data->vtable->Release();
0059dc49                      
0059dc5d                      if (m_data->vtable->SetCollection(edi, ebp_1, 1) == 0)
0059dcc1                          return 0;
0059dc1f                  }
0059dc1f                  
0059dc61                  RenderVertexStreamD3D::ResetVertexIndices(m_data);
0059dc66                  m_currHashTable = m_currHashTable_1;
0059dc6a                  m_currBucket = m_currBucket_1;
0059dc05              }
0059dc05              
0059dc6e              i_1 = i_1->m_hashNext;
0059dc6e              
0059dc73              if (i_1 == 0)
0059dc73              {
0059dc8f                  class HashTableData<unsigned long,DBOCache *>* i;
0059dc8f                  
0059dc8f                  do
0059dc8f                  {
0059dc80                      m_currBucket = &m_currBucket[1];
0059dc85                      m_currBucket_1 = m_currBucket;
0059dc85                      
0059dc89                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0059dc89                          goto label_59dc9f;
0059dc89                      
0059dc8b                      i = *(uint32_t*)m_currBucket;
0059dc8f                  } while (i == 0);
0059dc8f                  
0059dc91                  i_1 = i;
0059dc91                  
0059dc95                  if (i_1 == 0)
0059dc95                      break;
0059dc73              }
0059dc00          }
0059dbfa      }
0059dbfa      
0059dc9f  label_59dc9f:
0059dc9f      class RenderIndexStreamD3D* m_pDynamicIndexStream = this->m_pDynamicIndexStream;
0059dc9f      
0059dca7      if (m_pDynamicIndexStream != 0)
0059dca9          RenderIndexStreamD3D::NotifyFrameChanged(m_pDynamicIndexStream);
0059dca9      
0059dcb1      eax = 1;
0059dcb7      return 1;
0059dbd0  }

0059dcc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0059dcd0  void __fastcall RenderDevice::RenderDevice(class RenderDevice* this)

0059dcd0  {
0059dcd5      this->vtable = 0x7e5488;
0059dcdb      this->m_presentation.hRenderWindow = 0;
0059dcde      this->m_presentation.Width = 0x320;
0059dce5      this->m_presentation.Height = 0x258;
0059dcec      this->m_presentation.FullScreen = 0;
0059dcef      this->m_presentation.FSRefreshRate = 0;
0059dcf2      this->m_presentation.FSBitsPerPixel = 0x20;
0059dcf9      this->m_presentation.FSTripleBuffering = 0;
0059dcfc      this->m_presentation.FSSyncToDisplayRefresh = 0;
0059dcff      this->m_presentation.Antialiasing = 0;
0059dd02      this->m_config.hFocusWindow = 0;
0059dd05      this->m_config.bSoftwareVertexProcessing = 0;
0059dd0a      this->m_config.bUseStencilBuffer = 1;
0059dd0d      this->m_config.bUsePureDevice = 1;
0059dd10      __builtin_memset(&this->m_caps, 0, 0x2e);
0059dd61      this->m_displayInfo.bStencilBuffer = 0;
0059dd64      this->m_displayInfo.bTextureRenderTargets = 0;
0059dd67      this->m_displayInfo.bMultiSampling = 0;
0059dd6a      this->m_displayInfo.bMultiSample_2_Samples = 0;
0059dd6d      this->m_displayInfo.bMultiSample_4_Samples = 0;
0059dd70      __builtin_memset(&this->m_displayInfo.pfRenderTargets, 0, 0x2c);
0059dd9a      RenderDevice::GraphicsStatesType::GraphicsStatesType(&this->m_GState);
0059dda1      RenderDevice::Begin(this);
0059dcd0  }

0059ddaa                                90 90 90 90 90 90                                                            ......

0059ddb0  uint8_t __fastcall RenderDevice::IsResetPossible(class RenderDevice* this)

0059ddb0  {
0059ddbd      return this->m_bDeviceLost == 0;
0059ddb0  }

0059ddbe                                                                                            90 90                                ..

0059ddc0  void __fastcall RenderDevice::~RenderDevice(class RenderDevice* this)

0059ddc0  {
0059ddc3      this->vtable = 0x7e5488;
0059ddc9      RenderDevice::End(this);
0059ddc9      
0059ddde      if ((this->m_GState.FFLightSources.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0059ddde      {
0059dde0          class RenderLight* m_data = this->m_GState.FFLightSources.m_data;
0059dde0          
0059dde8          if (m_data != 0)
0059ddee              operator delete[](((char*)m_data - 4));
0059ddde      }
0059ddc0  }

0059ddf8                                                                          90 90 90 90 90 90 90 90                          ........

0059de00  void* __thiscall RenderDevice::`scalar deleting destructor'(class RenderDevice* this, uint32_t arg2)

0059de00  {
0059de03      this->vtable = 0x7e5488;
0059de09      RenderDevice::End(this);
0059de09      
0059de1e      if ((this->m_GState.FFLightSources.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0059de1e      {
0059de20          class RenderLight* m_data = this->m_GState.FFLightSources.m_data;
0059de20          
0059de28          if (m_data != 0)
0059de2e              operator delete[](((char*)m_data - 4));
0059de1e      }
0059de1e      
0059de3b      if ((arg2 & 1) != 0)
0059de3e          operator delete(this);
0059de3e      
0059de49      return this;
0059de00  }

0059de4c                                      90 90 90 90                                                              ....

0059de50  void* __thiscall RenderDeviceD3D::`scalar deleting destructor'(class RenderDeviceD3D* this, uint32_t arg2)

0059de50  {
0059de53      this->vtable = 0x7e5500;
0059de59      RenderDeviceD3D::End(this);
0059de64      SmartArray<unsigned long,1>::~SmartArray<unsigned long,1>(&this->m_DefaultSamplerMappings);
0059de6b      RenderDevice::~RenderDevice(this);
0059de6b      
0059de75      if ((arg2 & 1) != 0)
0059de78          operator delete(this);
0059de78      
0059de83      return this;
0059de50  }

0059de86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0059de90  uint8_t __fastcall D3DPolyRender::DetectDisplayModes(class D3DPolyRender* this)

0059de90  {
0059de99      struct IDirect3D9* m_pDirect3D = this->m_pDirect3D;
0059dea8      int32_t ebp = m_pDirect3D->vtable->GetAdapterModeCount(m_pDirect3D, this->m_nDisplayAdapter, 0x16);
0059deaa      int32_t ebx = 0;
0059deaa      
0059deae      if (ebp > 0)
0059deae      {
0059df82          do
0059df82          {
0059deba              struct IDirect3D9* m_pDirect3D_1 = this->m_pDirect3D;
0059decc              int32_t var_48;
0059dec0              m_pDirect3D_1->vtable->EnumAdapterModes(m_pDirect3D_1, this->m_nDisplayAdapter, 0x16, ebx, &var_48);
0059dedc              int32_t eax_2 = (this->m_DisplayModes.m_sizeAndDeallocate & 0x7fffffff);
0059dee3              uint8_t eax_7;
0059dee3              
0059dee3              if (this->m_DisplayModes.m_num >= eax_2)
0059dee3              {
0059dee5                  uint32_t edx_2 = (eax_2 + 1);
0059dee5                  
0059deeb                  if (edx_2 <= 8)
0059deed                      edx_2 = 8;
0059deeb                  else if (edx_2 <= 0x4000)
0059defa                  {
0059df19                      int32_t eflags_1;
0059df19                      char eax_6;
0059df19                      eax_6 = __bsr_gprv_memv(edx_2);
0059df25                      int32_t edi_1 = (1 << eax_6);
0059df25                      
0059df29                      if (edx_2 > edi_1)
0059df2b                          edx_2 = (edi_1 * 2);
0059defa                  }
0059defa                  else
0059defa                  {
0059defe                      int32_t eax_4 = (edx_2 & 0x3fff);
0059defe                      
0059df03                      if (eax_4 != 0)
0059df0c                          edx_2 += (0x4000 - eax_4);
0059defa                  }
0059defa                  
0059df31                  eax_7 = SmartArray<PrefDisplayModeType,1>::grow(&this->m_DisplayModes, edx_2);
0059dee3              }
0059dee3              
0059df38              if ((this->m_DisplayModes.m_num < eax_2 || eax_7 != 0))
0059ded9                  this->m_DisplayModes.m_num += 1;
0059ded9              
0059df4e              void* esi_3 = &this[0].m_DisplayModes.m_data[this->m_DisplayModes.m_num];
0059df52              *(uint32_t*)esi_3 = var_48;
0059df58              int32_t var_44;
0059df58              *(uint32_t*)((char*)esi_3 + 4) = var_44;
0059df5f              int32_t var_3c;
0059df5f              *(uint32_t*)((char*)esi_3 + 8) = var_3c;
0059df66              int32_t var_40;
0059df66              *(uint32_t*)((char*)esi_3 + 0xc) = var_40;
0059df6d              void var_38;
0059df6d              AvailableProperty::AvailableProperty(&var_38);
0059df7a              PixelFormatDesc::SetFormat(&var_38, *(uint32_t*)((char*)esi_3 + 8));
0059df7f              ebx += 1;
0059df82          } while (ebx < ebp);
0059deae      }
0059deae      
0059df8b      int32_t eax;
0059df8b      eax = 1;
0059df91      return 1;
0059de90  }

0059df92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0059dfa0  uint8_t D3DPolyRender::ConstructMesh(int32_t arg1, class CSurface** arg2, class CVertexArray* arg3, int32_t arg4, class CPolygon* arg5, float arg6, uint8_t arg7, class MeshBuffer** arg8)

0059dfa0  {
0059dfa9      void* s = operator new(0x24);
0059dfae      uint32_t ebp = 0;
0059dfb5      void* s_2;
0059dfb5      
0059dfb5      if (s == 0)
0059dfd4          s_2 = nullptr;
0059dfb5      else
0059dfb5      {
0059dfb7          __builtin_memset(s, 0, 0x16);
0059dfcd          *(uint32_t*)((char*)s + 0x20) = 0;
0059dfd0          s_2 = s;
0059dfb5      }
0059dfb5      
0059dfdb      void* s_3 = s_2;
0059dfe4      *(uint32_t*)((char*)s_2 + 0x10) = operator new[](arg1);
0059dfe7      void* eax_1;
0059dfe7      eax_1 = arg7;
0059dffc      uint32_t edi = 1;
0059e001      uint32_t var_48 = 0;
0059e005      uint32_t var_18 = 0;
0059e009      uint32_t var_50 = 1;
0059e013      *(uint8_t*)((char*)s_2 + 0x14) = (eax_1 == 0 - 1);
0059e016      uint32_t num_vertices = arg3->num_vertices;
0059e016      
0059e01f      if (num_vertices > 0)
0059e01f      {
0059e024          void* __offset(CVertex, 0xe) eax_4 = (&arg3->vertices->reserve4 + 2);
0059e027          uint32_t edx_1 = num_vertices;
0059e03d          uint32_t i;
0059e03d          
0059e03d          do
0059e03d          {
0059e030              uint32_t ecx_2 = ((uint32_t)*(uint16_t*)((char*)ADJ(eax_4)->reserve4)[2]);
0059e030              
0059e035              if (ecx_2 > edi)
0059e037                  edi = ecx_2;
0059e037              
0059e039              eax_4 += 0x20;
0059e03c              i = edx_1;
0059e03c              edx_1 -= 1;
0059e03d          } while (i != 1);
0059e03f          var_50 = edi;
0059e01f      }
0059e01f      
0059e046      int32_t esi_1 = ((num_vertices * edi) << 3);
0059e04a      void* s_1 = operator new[](esi_1);
0059e066      __builtin_memset(__builtin_memset(s_1, 0xffffffff, ((esi_1 >> 2) << 2)), 0xff, (esi_1 & 3));
0059e066      
0059e074      if (((*(uint8_t*)$S214) & 1) == 0)
0059e074      {
0059e084          $S214 |= 1;
0059e08a          s_MeshBatches.m_data = 0;
0059e090          s_MeshBatches.m_sizeAndDeallocate = 0;
0059e096          s_MeshBatches.m_num = 0;
0059e09c          atexit($E215);
0059e074      }
0059e074      
0059e0a9      int32_t i_5 = arg1;
0059e0b4      uint8_t eax_8;
0059e0b4      
0059e0b4      if ((s_MeshBatches.m_sizeAndDeallocate & 0x7fffffff) < i_5)
0059e0bc          eax_8 = SmartArray<_D3DXATTRIBUTERANGE,0>::grow(&s_MeshBatches, i_5);
0059e0bc      
0059e0c3      if (((s_MeshBatches.m_sizeAndDeallocate & 0x7fffffff) >= i_5 || eax_8 != 0))
0059e0c5          s_MeshBatches.m_num = i_5;
0059e0c5      
0059e0cb      char* ecx_7 = nullptr;
0059e0cb      
0059e0cf      if (i_5 > 0)
0059e0cf      {
0059e0d1          int32_t edx_5 = 0;
0059e0d1          
0059e12a          do
0059e12a          {
0059e0d8              void* eax_10 = (s_MeshBatches.m_data + edx_5);
0059e0da              *(uint32_t*)((char*)eax_10 + 4) = 0;
0059e0dd              *(uint32_t*)((char*)eax_10 + 8) = 0;
0059e0e0              *(uint32_t*)eax_10 = 0;
0059e0e2              *(uint32_t*)((char*)eax_10 + 0xc) = 0xffffffff;
0059e0e9              *(uint32_t*)((char*)eax_10 + 0x10) = 0;
0059e0f3              int32_t type = arg2[ecx_7]->type;
0059e0f3              
0059e0fb              if ((type & 0x10300) != 0)
0059e100                  ecx_7[*(uint32_t*)((char*)s_2 + 0x10)] = 2;
0059e0fb              else if ((type & 4) == 0)
0059e108              {
0059e115                  int32_t eax_15 = *(uint32_t*)((char*)s_2 + 0x10);
0059e115                  
0059e118                  if ((type & 0x10) == 0)
0059e120                      ecx_7[eax_15] = 0;
0059e118                  else
0059e11a                      ecx_7[eax_15] = 4;
0059e108              }
0059e108              else
0059e10d                  ecx_7[*(uint32_t*)((char*)s_2 + 0x10)] = 8;
0059e10d              
0059e124              ecx_7 = &ecx_7[1];
0059e125              edx_5 += 0x14;
0059e12a          } while (ecx_7 < i_5);
0059e0cf      }
0059e0cf      
0059e132      if (arg4 > 0)
0059e132      {
0059e13f          int32_t* ecx_9 = &arg5->sides_type;
0059e142          int32_t var_3c_1 = arg4;
0059e2d5          bool cond:5_1;
0059e2d5          
0059e2d5          do
0059e2d5          {
0059e146              uint32_t num_pts = ((uint32_t)ADJ(ecx_9)->num_pts);
0059e14a              int32_t sides_type = ADJ(ecx_9)->sides_type;
0059e156              int32_t edx_6 = (num_pts - 2);
0059e156              
0059e15d              if ((sides_type == 2 || sides_type == 1))
0059e15f                  edx_6 = ((num_pts - 2) * 2);
0059e15f              
0059e16b              var_48 += edx_6;
0059e16f              int32_t sides_type_3 = 1;
0059e16f              
0059e174              if (sides_type == 2)
0059e176                  sides_type_3 = sides_type;
0059e176              
0059e17c              if (sides_type_3 > 0)
0059e17c              {
0059e17e                  int32_t edi_5 = 0;
0059e17e                  
0059e1b1                  do
0059e1b1                  {
0059e182                      if (edi_5 != 0)
0059e18a                          sides_type = ADJ(ecx_9)->neg_surface;
0059e182                      else
0059e184                          sides_type = ADJ(ecx_9)->pos_surface;
0059e184                      
0059e199                      sides_type = &s_MeshBatches.m_data[((uint32_t)sides_type)];
0059e19f                      int32_t edx_9 = (*(uint32_t*)(sides_type + 4) + (num_pts - 2));
0059e1a1                      *(uint32_t*)(sides_type + 4) = edx_9;
0059e1a1                      
0059e1a7                      if (ADJ(ecx_9)->sides_type == 1)
0059e1ab                          *(uint32_t*)(sides_type + 4) = (edx_9 + (num_pts - 2));
0059e1ab                      
0059e1ae                      edi_5 += 1;
0059e1b1                  } while (edi_5 < sides_type_3);
0059e17c              }
0059e17c              
0059e1b3              uint32_t pos_surface = ((uint32_t)ADJ(ecx_9)->pos_surface);
0059e1bb              char* eax_20 = *(uint32_t*)((char*)s_3 + 0x10);
0059e1be              sides_type_3 = eax_20[pos_surface];
0059e1c1              char* eax_21 = &eax_20[pos_surface];
0059e1c3              pos_surface = ADJ(ecx_9)->stippling;
0059e1c8              pos_surface = pos_surface > 0;
0059e1cb              sides_type_3 |= pos_surface;
0059e1cd              *(uint8_t*)eax_21 = sides_type_3;
0059e1d3              int32_t edx_11 = 0;
0059e1d3              
0059e1d7              if (num_pts > 0)
0059e1d7              {
0059e2c3                  do
0059e2c3                  {
0059e1e0                      char* pos_uv_indices = ADJ(ecx_9)->pos_uv_indices;
0059e1e5                      int32_t eax_23;
0059e1e5                      
0059e1e5                      if (pos_uv_indices == 0)
0059e1ed                          eax_23 = 0;
0059e1e5                      else
0059e1e7                          eax_23 = ((int32_t)pos_uv_indices[edx_11]);
0059e1e7                      
0059e1f7                      uint32_t esi_4 = ((uint32_t)ADJ(ecx_9)->vertex_ids[edx_11]);
0059e1f7                      
0059e205                      if (*(uint32_t*)((char*)s_1 + (((eax_23 * num_vertices) + esi_4) << 2)) == 0xffffffff)
0059e205                      {
0059e209                          int32_t eax_26;
0059e209                          
0059e209                          if (pos_uv_indices == 0)
0059e211                              eax_26 = 0;
0059e209                          else
0059e20b                              eax_26 = ((int32_t)pos_uv_indices[edx_11]);
0059e20b                          
0059e21a                          *(uint32_t*)((char*)s_1 + (((eax_26 * num_vertices) + esi_4) << 2)) = ebp;
0059e21d                          ebp += 1;
0059e205                      }
0059e205                      
0059e221                      if (ADJ(ecx_9)->sides_type == 1)
0059e221                      {
0059e223                          char* pos_uv_indices_1 = ADJ(ecx_9)->pos_uv_indices;
0059e228                          int32_t esi_5;
0059e228                          
0059e228                          if (pos_uv_indices_1 == 0)
0059e230                              esi_5 = 0;
0059e228                          else
0059e22a                              esi_5 = ((int32_t)pos_uv_indices_1[edx_11]);
0059e22a                          
0059e239                          uint32_t eax_30 = ((uint32_t)ADJ(ecx_9)->vertex_ids[edx_11]);
0059e239                          
0059e24e                          if (*(uint32_t*)((char*)s_1 + ((((esi_5 + var_50) * num_vertices) + eax_30) << 2)) == 0xffffffff)
0059e24e                          {
0059e252                              int32_t esi_9;
0059e252                              
0059e252                              if (pos_uv_indices_1 == 0)
0059e25a                                  esi_9 = 0;
0059e252                              else
0059e254                                  esi_9 = ((int32_t)pos_uv_indices_1[edx_11]);
0059e254                              
0059e269                              *(uint32_t*)((char*)s_1 + ((((esi_9 + var_50) * num_vertices) + eax_30) << 2)) = ebp;
0059e26c                              ebp += 1;
0059e24e                          }
0059e221                      }
0059e221                      
0059e270                      if (ADJ(ecx_9)->sides_type == 2)
0059e270                      {
0059e272                          char* neg_uv_indices = ADJ(ecx_9)->neg_uv_indices;
0059e277                          int32_t esi_13;
0059e277                          
0059e277                          if (neg_uv_indices == 0)
0059e27f                              esi_13 = 0;
0059e277                          else
0059e279                              esi_13 = ((int32_t)neg_uv_indices[edx_11]);
0059e279                          
0059e288                          uint32_t eax_32 = ((uint32_t)ADJ(ecx_9)->vertex_ids[edx_11]);
0059e288                          
0059e29d                          if (*(uint32_t*)((char*)s_1 + ((((esi_13 + var_50) * num_vertices) + eax_32) << 2)) == 0xffffffff)
0059e29d                          {
0059e2a1                              int32_t esi_17;
0059e2a1                              
0059e2a1                              if (neg_uv_indices == 0)
0059e2a9                                  esi_17 = 0;
0059e2a1                              else
0059e2a3                                  esi_17 = ((int32_t)neg_uv_indices[edx_11]);
0059e2a3                              
0059e2b8                              *(uint32_t*)((char*)s_1 + ((((esi_17 + var_50) * num_vertices) + eax_32) << 2)) = ebp;
0059e2bb                              ebp += 1;
0059e29d                          }
0059e270                      }
0059e270                      
0059e2c0                      edx_11 += 1;
0059e2c3                  } while (edx_11 < num_pts);
0059e1d7              }
0059e1d7              
0059e2cd              ecx_9 = &ecx_9[0xc];
0059e2d0              cond:5_1 = var_3c_1 != 1;
0059e2d1              var_3c_1 -= 1;
0059e2d5          } while (cond:5_1);
0059e2db          s_2 = s_3;
0059e2df          i_5 = arg1;
0059e2e3          var_18 = ebp;
0059e132      }
0059e132      
0059e2e9      int32_t eax_36 = 0;
0059e2e9      
0059e2ed      if (i_5 > 0)
0059e2ed      {
0059e2ef          int32_t edx_12 = 0;
0059e302          int32_t i_1;
0059e302          
0059e302          do
0059e302          {
0059e2f7              void* ecx_11 = (s_MeshBatches.m_data + edx_12);
0059e2f9              *(uint32_t*)ecx_11 = eax_36;
0059e2fb              eax_36 += *(uint32_t*)((char*)ecx_11 + 4);
0059e2fe              edx_12 += 0x14;
0059e301              i_1 = i_5;
0059e301              i_5 -= 1;
0059e302          } while (i_1 != 1);
0059e2ed      }
0059e2ed      
0059e304      long double x87_r7 = ((long double)arg6);
0059e30b      long double temp1 = ((long double)0f);
0059e30b      (x87_r7 - temp1);
0059e311      eax_36 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
0059e316      unsigned long eax_37 = 0x252;
0059e316      
0059e31b      if ((*(uint8_t*)((char*)eax_36)[1] & 0x41) != 0)
0059e31d          eax_37 = 0x152;
0059e31d      
0059e329      int32_t edx_13;
0059e329      edx_13 = eax_37 == 0x252;
0059e32c      *(uint32_t*)((char*)s_2 + 8) = eax_37;
0059e32f      unsigned long ecx_12 = 0x220;
0059e33f      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
0059e33f      
0059e349      if (RenderDevice::render_device_1->m_caps.bHardwareVertexProcessing == 0)
0059e34b          ecx_12 = 0x18220;
0059e34b      
0059e36b      int32_t* var_5c;
0059e36b      
0059e36b      if (_D3DXCreateMeshFVF@24(var_48, ebp, ecx_12, eax_37, *(int32_t*)((char*)RenderDevice::render_device_1 + 0x468), &var_5c) < 0)
0059e36b      {
0059e36d          int32_t* eax_40 = *(uint32_t*)s_2;
0059e36d          
0059e371          if (eax_40 != 0)
0059e371          {
0059e376              *(uint32_t*)(*(uint32_t*)eax_40 + 8)(eax_40);
0059e379              *(uint32_t*)s_2 = 0;
0059e371          }
0059e371          
0059e37b          int32_t* ecx_14 = *(uint32_t*)((char*)s_2 + 4);
0059e37b          
0059e380          if (ecx_14 != 0)
0059e380          {
0059e384              *(uint32_t*)(*(uint32_t*)ecx_14 + 0x14)();
0059e387              *(uint32_t*)((char*)s_2 + 4) = 0;
0059e380          }
0059e380          
0059e38e          operator delete[](*(uint32_t*)((char*)s_2 + 0x10));
0059e394          *(uint32_t*)((char*)s_2 + 0x10) = 0;
0059e397          operator delete(s_2);
0059e3a2          int32_t eax_42;
0059e3a2          eax_42 = 0;
0059e3a8          return 0;
0059e36b      }
0059e36b      
0059e3a9      int32_t* eax_43 = var_5c;
0059e3bb      class CSWVertex* var_30;
0059e3bb      int32_t* eax_47;
0059e3bb      
0059e3bb      if (*(uint32_t*)(*(uint32_t*)eax_43 + 0x3c)(eax_43, 0, &var_30) >= 0)
0059e3bb      {
0059e40b          int32_t* eax_49 = var_5c;
0059e41b          int32_t var_34;
0059e41b          bool cond:6_1 = *(uint32_t*)(*(uint32_t*)eax_49 + 0x44)(eax_49, 0, &var_34) >= 0;
0059e41d          int32_t* eax_51 = var_5c;
0059e421          int32_t edx_19 = *(uint32_t*)eax_51;
0059e423          int32_t var_2c;
0059e423          
0059e423          if (cond:6_1)
0059e423          {
0059e483              if (*(uint32_t*)(edx_19 + 0x60)(eax_51, 0, &var_2c) >= 0)
0059e483              {
0059e4ed                  if (arg4 > 0)
0059e4ed                  {
0059e4fa                      int32_t* ebp_2 = &arg5->sides_type;
0059e4fd                      int32_t var_1c_1 = arg4;
0059e747                      bool cond:12_1;
0059e747                      
0059e747                      do
0059e747                      {
0059e505                          int32_t eax_63 = (((uint32_t)ADJ(ebp_2)->num_pts) - 2);
0059e50c                          int32_t sides_type_1 = ADJ(ebp_2)->sides_type;
0059e512                          int32_t sides_type_2 = 1;
0059e517                          int32_t sides_type_4 = 1;
0059e51b                          int32_t var_38_2 = 1;
0059e51b                          
0059e51f                          if (sides_type_1 == 2)
0059e51f                          {
0059e521                              sides_type_2 = sides_type_1;
0059e523                              sides_type_4 = sides_type_2;
0059e51f                          }
0059e51f                          
0059e52a                          if (sides_type_1 == 1)
0059e52c                              var_38_2 = 2;
0059e52c                          
0059e536                          arg1 = 0;
0059e536                          
0059e53e                          if (sides_type_2 > 0)
0059e53e                          {
0059e735                              bool cond:15_1;
0059e735                              
0059e735                              do
0059e735                              {
0059e54a                                  int32_t eax_64;
0059e54a                                  
0059e54a                                  if (arg1 != 0)
0059e552                                      eax_64 = ADJ(ebp_2)->neg_surface;
0059e54a                                  else
0059e54c                                      eax_64 = ADJ(ebp_2)->pos_surface;
0059e54c                                  
0059e55a                                  uint32_t ecx_25 = ((uint32_t)eax_64);
0059e55d                                  void* eax_65 = arg2[ecx_25];
0059e568                                  float var_28_1;
0059e568                                  
0059e568                                  if ((*(uint8_t*)((char*)eax_65 + 0x58) & 0x10) == 0)
0059e573                                      var_28_1 = 0f;
0059e568                                  else
0059e56d                                      var_28_1 = *(uint32_t*)((char*)eax_65 + 0x74);
0059e56d                                  
0059e584                                  void* eax_67 = &s_MeshBatches.m_data[ecx_25];
0059e591                                  arg4 = 0;
0059e591                                  
0059e599                                  if (var_38_2 > 0)
0059e599                                  {
0059e720                                      bool cond:17_1;
0059e720                                      
0059e720                                      do
0059e720                                      {
0059e5a6                                          char* var_44_1;
0059e5a6                                          
0059e5a6                                          if (arg1 != 0)
0059e5b4                                              var_44_1 = ADJ(ebp_2)->neg_uv_indices;
0059e5a6                                          else
0059e5ab                                              var_44_1 = ADJ(ebp_2)->pos_uv_indices;
0059e5ab                                          
0059e5be                                          int32_t var_3c_2 = 0;
0059e5be                                          
0059e5c6                                          if (eax_63 > 0)
0059e5c6                                          {
0059e70b                                              bool cond:20_1;
0059e70b                                              
0059e70b                                              do
0059e70b                                              {
0059e5e9                                                  int32_t eax_75 = (*(uint32_t*)eax_67 + *(uint32_t*)((char*)eax_67 + 8));
0059e5e9                                                  
0059e6d8                                                  for (void* i_2 = nullptr; i_2 < 3; i_2 += 1)
0059e6d8                                                  {
0059e5fa                                                      void* edx_29;
0059e5fa                                                      
0059e5fa                                                      if (i_2 != 0)
0059e604                                                          edx_29 = ((char*)i_2 + var_3c_2);
0059e5fa                                                      else
0059e5fc                                                          edx_29 = nullptr;
0059e5fc                                                      
0059e60d                                                      int32_t eax_78;
0059e60d                                                      
0059e60d                                                      if (var_44_1 == 0)
0059e615                                                          eax_78 = 0;
0059e60d                                                      else
0059e60f                                                          eax_78 = ((int32_t)*(uint8_t*)((char*)edx_29 + var_44_1));
0059e60f                                                      
0059e635                                                      void* eax_81;
0059e635                                                      eax_81 = *(uint16_t*)((char*)s_1 + ((((((arg4 + arg1) * var_50) + eax_78) * num_vertices) + ((uint32_t)ADJ(ebp_2)->vertex_ids[edx_29])) << 2));
0059e639                                                      void* i_4;
0059e639                                                      
0059e639                                                      if (arg4 == 0)
0059e644                                                          i_4 = i_2;
0059e639                                                      else
0059e640                                                          i_4 = (2 - i_2);
0059e640                                                      
0059e650                                                      *(uint16_t*)(var_34 + (((eax_75 * 3) + i_4) << 1)) = eax_81;
0059e65b                                                      uint32_t eax_82 = ((uint32_t)eax_81);
0059e65b                                                      
0059e660                                                      if (eax_82 < *(uint32_t*)((char*)eax_67 + 0xc))
0059e662                                                          *(uint32_t*)((char*)eax_67 + 0xc) = eax_82;
0059e662                                                      
0059e668                                                      if (eax_82 > *(uint32_t*)((char*)eax_67 + 0x10))
0059e66a                                                          *(uint32_t*)((char*)eax_67 + 0x10) = eax_82;
0059e66a                                                      
0059e677                                                      int32_t ecx_37;
0059e677                                                      
0059e677                                                      if ((arg4 != 0 || arg1 != 0))
0059e680                                                          ecx_37 = 0xffffffff;
0059e677                                                      else
0059e679                                                          ecx_37 = 1;
0059e679                                                      
0059e689                                                      if (var_44_1 != 0)
0059e68b                                                          *(uint8_t*)((char*)edx_29 + var_44_1);
0059e68b                                                      
0059e6b8                                                      int32_t edx_30 = arg3;
0059e6bf                                                      *(uint32_t*)(edx_30 + 0x24);
0059e6e6                                                      ADJ(ebp_2)->vertex_ids[edx_29];
0059e6cc                                                      copyVert(eax_82, edx_30, var_30, eax_82, ecx_37, arg6, var_28_1, arg7, *(uint32_t*)((char*)s_3 + 8));
0059e6d8                                                  }
0059e6d8                                                  
0059e6de                                                  int32_t eax_83 = var_2c;
0059e6de                                                  
0059e6e4                                                  if (eax_83 != 0)
0059e6ee                                                      *(uint32_t*)(eax_83 + (eax_75 << 2)) = ecx_25;
0059e6ee                                                  
0059e6fd                                                  *(uint32_t*)((char*)eax_67 + 8) += 1;
0059e705                                                  cond:20_1 = (var_3c_2 + 1) < eax_63;
0059e707                                                  var_3c_2 += 1;
0059e70b                                              } while (cond:20_1);
0059e5c6                                          }
0059e5c6                                          
0059e71a                                          cond:17_1 = (arg4 + 1) < var_38_2;
0059e71c                                          arg4 += 1;
0059e720                                      } while (cond:17_1);
0059e599                                  }
0059e599                                  
0059e72f                                  cond:15_1 = (arg1 + 1) < sides_type_4;
0059e731                                  arg1 += 1;
0059e735                              } while (cond:15_1);
0059e53e                          }
0059e53e                          
0059e73f                          ebp_2 = &ebp_2[0xc];
0059e742                          cond:12_1 = var_1c_1 != 1;
0059e743                          var_1c_1 -= 1;
0059e747                      } while (cond:12_1);
0059e4ed                  }
0059e4ed                  
0059e752                  operator delete[](s_1);
0059e757                  int32_t* eax_94 = var_5c;
0059e761                  *(uint32_t*)(*(uint32_t*)eax_94 + 0x40)(eax_94);
0059e764                  int32_t* eax_95 = var_5c;
0059e76b                  *(uint32_t*)(*(uint32_t*)eax_95 + 0x48)(eax_95);
0059e76e                  int32_t* eax_96 = var_5c;
0059e775                  *(uint32_t*)(*(uint32_t*)eax_96 + 0x64)(eax_96);
0059e775                  
0059e77f                  if (((*(uint8_t*)$S214) & 2) == 0)
0059e77f                  {
0059e791                      $S214 |= 2;
0059e797                      s_D3DXAttributeRanges.m_data = 0;
0059e79c                      s_D3DXAttributeRanges.m_sizeAndDeallocate = 0;
0059e7a1                      s_D3DXAttributeRanges.m_num = 0;
0059e7a6                      atexit($E216);
0059e77f                  }
0059e77f                  
0059e7b7                  int32_t i_3 = 0;
0059e7b9                  bool cond:8_1 = s_MeshBatches.m_num <= 0;
0059e7bb                  s_D3DXAttributeRanges.m_num = 0;
0059e7c1                  uint32_t m_num;
0059e7c1                  
0059e7c1                  if (!(cond:8_1))
0059e7c1                  {
0059e7c7                      int32_t esi_23 = 0;
0059e7c9                      arg1 = 0;
0059e7cd                      m_num = 0;
0059e7cd                      
0059e89c                      do
0059e89c                      {
0059e7d0                          struct MeshBatchType* m_data = s_MeshBatches.m_data;
0059e7da                          void* esi_24 = (esi_23 + m_data);
0059e7da                          
0059e7de                          if (*(uint32_t*)(&m_data->m_NumTriangles + esi_23) > 0)
0059e7de                          {
0059e7e9                              int32_t eax_100 = (s_D3DXAttributeRanges.m_sizeAndDeallocate & 0x7fffffff);
0059e7e9                              
0059e7f2                              if (m_num < eax_100)
0059e855                                  s_D3DXAttributeRanges.m_num = (m_num + 1);
0059e7f2                              else
0059e7f2                              {
0059e7f4                                  uint32_t edx_35 = (eax_100 + 1);
0059e7f4                                  
0059e7fa                                  if (edx_35 <= 8)
0059e7fc                                      edx_35 = 8;
0059e7fa                                  else if (edx_35 <= 0x4000)
0059e809                                  {
0059e828                                      int32_t eflags_1;
0059e828                                      char eax_104;
0059e828                                      eax_104 = __bsr_gprv_memv(edx_35);
0059e834                                      int32_t edi_18 = (1 << eax_104);
0059e834                                      
0059e838                                      if (edx_35 > edi_18)
0059e83a                                          edx_35 = (edi_18 * 2);
0059e809                                  }
0059e809                                  else
0059e809                                  {
0059e80d                                      int32_t eax_102 = (edx_35 & 0x3fff);
0059e80d                                      
0059e812                                      if (eax_102 != 0)
0059e81b                                          edx_35 += (0x4000 - eax_102);
0059e809                                  }
0059e809                                  
0059e84c                                  if (SmartArray<_D3DXATTRIBUTERANGE,0>::grow(&s_D3DXAttributeRanges, edx_35) != 0)
0059e855                                      s_D3DXAttributeRanges.m_num += 1;
0059e7f2                              }
0059e7f2                              
0059e863                              void* eax_107 = &s_D3DXAttributeRanges.m_data[m_num];
0059e866                              *(uint32_t*)eax_107 = i_3;
0059e86a                              *(uint32_t*)((char*)eax_107 + 4) = *(uint32_t*)esi_24;
0059e870                              *(uint32_t*)((char*)eax_107 + 8) = *(uint32_t*)((char*)esi_24 + 4);
0059e876                              *(uint32_t*)((char*)eax_107 + 0xc) = *(uint32_t*)((char*)esi_24 + 0xc);
0059e880                              *(uint32_t*)((char*)eax_107 + 0x10) = ((*(uint32_t*)((char*)esi_24 + 0x10) - *(uint32_t*)((char*)esi_24 + 0xc)) + 1);
0059e883                              m_num = s_D3DXAttributeRanges.m_num;
0059e7de                          }
0059e7de                          
0059e892                          i_3 += 1;
0059e893                          esi_23 = (arg1 + 0x14);
0059e898                          arg1 = esi_23;
0059e89c                      } while (i_3 < s_MeshBatches.m_num);
0059e7c1                  }
0059e7c1                  
0059e8a4                  void* var_70_29;
0059e8a4                  void* s_5;
0059e8a4                  
0059e8a4                  if ((!(cond:8_1) && m_num != 0))
0059e8a4                  {
0059e8df                      int32_t* eax_112 = var_5c;
0059e8df                      
0059e8f3                      if (*(uint32_t*)(*(uint32_t*)eax_112 + 0x70)(eax_112, s_D3DXAttributeRanges.m_data, m_num) == 0)
0059e8f3                      {
0059e962                          int32_t** s_4 = s_3;
0059e969                          s_4[8] = (((((edx_13 << 3) + 0x24) * var_18) + (s_D3DXAttributeRanges.m_num * 0x14)) + (var_48 * 6));
0059e978                          *(uint32_t*)s_4 = var_5c;
0059e982                          s_4[3] = arg6;
0059e986                          *(uint32_t*)arg8 = s_4;
0059e988                          s_4 = 1;
0059e98e                          return 1;
0059e8f3                      }
0059e8f3                      
0059e8f5                      int32_t* eax_114 = var_5c;
0059e8f5                      
0059e8fb                      if (eax_114 != 0)
0059e8fb                      {
0059e900                          *(uint32_t*)(*(uint32_t*)eax_114 + 8)(eax_114);
0059e903                          var_5c = nullptr;
0059e8fb                      }
0059e8fb                      
0059e907                      s_5 = s_3;
0059e90b                      int32_t* eax_115 = *(uint32_t*)s_5;
0059e90b                      
0059e90f                      if (eax_115 != 0)
0059e90f                      {
0059e914                          *(uint32_t*)(*(uint32_t*)eax_115 + 8)(eax_115);
0059e917                          *(uint32_t*)s_5 = 0;
0059e90f                      }
0059e90f                      
0059e919                      int32_t* ecx_57 = *(uint32_t*)((char*)s_5 + 4);
0059e919                      
0059e91e                      if (ecx_57 != 0)
0059e91e                      {
0059e922                          *(uint32_t*)(*(uint32_t*)ecx_57 + 0x14)();
0059e925                          *(uint32_t*)((char*)s_5 + 4) = 0;
0059e91e                      }
0059e91e                      
0059e92b                      var_70_29 = *(uint32_t*)((char*)s_5 + 0x10);
0059e8a4                  }
0059e8a4                  else
0059e8a4                  {
0059e8a6                      int32_t* eax_109 = var_5c;
0059e8a6                      
0059e8ac                      if (eax_109 != 0)
0059e8ac                      {
0059e8b1                          *(uint32_t*)(*(uint32_t*)eax_109 + 8)(eax_109);
0059e8b4                          var_5c = nullptr;
0059e8ac                      }
0059e8ac                      
0059e8b8                      s_5 = s_3;
0059e8bc                      int32_t* eax_110 = *(uint32_t*)s_5;
0059e8bc                      
0059e8c0                      if (eax_110 != 0)
0059e8c0                      {
0059e8c5                          *(uint32_t*)(*(uint32_t*)eax_110 + 8)(eax_110);
0059e8c8                          *(uint32_t*)s_5 = 0;
0059e8c0                      }
0059e8c0                      
0059e8ca                      int32_t* ecx_53 = *(uint32_t*)((char*)s_5 + 4);
0059e8ca                      
0059e8cf                      if (ecx_53 != 0)
0059e8cf                      {
0059e8d3                          *(uint32_t*)(*(uint32_t*)ecx_53 + 0x14)();
0059e8d6                          *(uint32_t*)((char*)s_5 + 4) = 0;
0059e8cf                      }
0059e8cf                      
0059e8dc                      var_70_29 = *(uint32_t*)((char*)s_5 + 0x10);
0059e8a4                  }
0059e8a4                  
0059e92c                  operator delete[](var_70_29);
0059e932                  *(uint32_t*)((char*)s_5 + 0x10) = 0;
0059e935                  operator delete(s_5);
0059e483              }
0059e483              else
0059e483              {
0059e485                  int32_t* eax_56 = var_5c;
0059e48c                  *(uint32_t*)(*(uint32_t*)eax_56 + 0x40)(eax_56);
0059e48f                  int32_t* eax_57 = var_5c;
0059e496                  *(uint32_t*)(*(uint32_t*)eax_57 + 0x48)(eax_57);
0059e499                  int32_t* eax_58 = *(uint32_t*)s_2;
0059e499                  
0059e49d                  if (eax_58 != 0)
0059e49d                  {
0059e4a2                      *(uint32_t*)(*(uint32_t*)eax_58 + 8)(eax_58);
0059e4a5                      *(uint32_t*)s_2 = 0;
0059e49d                  }
0059e49d                  
0059e4a7                  int32_t* ecx_23 = *(uint32_t*)((char*)s_2 + 4);
0059e4a7                  
0059e4ac                  if (ecx_23 != 0)
0059e4ac                  {
0059e4b0                      *(uint32_t*)(*(uint32_t*)ecx_23 + 0x14)();
0059e4b3                      *(uint32_t*)((char*)s_2 + 4) = 0;
0059e4ac                  }
0059e4ac                  
0059e4ba                  operator delete[](*(uint32_t*)((char*)s_2 + 0x10));
0059e4c0                  *(uint32_t*)((char*)s_2 + 0x10) = 0;
0059e4c3                  operator delete(s_2);
0059e4c8                  eax_47 = var_5c;
0059e4c8                  
0059e4d1                  if (eax_47 != 0)
0059e4d1                  {
0059e4da                      *(uint32_t*)(*(uint32_t*)eax_47 + 8)(eax_47);
0059e4e0                      int32_t eax_60;
0059e4e0                      eax_60 = 0;
0059e4e6                      return 0;
0059e4d1                  }
0059e483              }
0059e423          }
0059e423          else
0059e423          {
0059e426              *(uint32_t*)(edx_19 + 0x40)(eax_51);
0059e429              int32_t* eax_52 = *(uint32_t*)s_2;
0059e429              
0059e42d              if (eax_52 != 0)
0059e42d              {
0059e432                  *(uint32_t*)(*(uint32_t*)eax_52 + 8)(eax_52);
0059e435                  *(uint32_t*)s_2 = 0;
0059e42d              }
0059e42d              
0059e437              int32_t* ecx_20 = *(uint32_t*)((char*)s_2 + 4);
0059e437              
0059e43c              if (ecx_20 != 0)
0059e43c              {
0059e440                  *(uint32_t*)(*(uint32_t*)ecx_20 + 0x14)();
0059e443                  *(uint32_t*)((char*)s_2 + 4) = 0;
0059e43c              }
0059e43c              
0059e44a              operator delete[](*(uint32_t*)((char*)s_2 + 0x10));
0059e450              *(uint32_t*)((char*)s_2 + 0x10) = 0;
0059e453              operator delete(s_2);
0059e458              eax_47 = var_5c;
0059e458              
0059e461              if (eax_47 != 0)
0059e461              {
0059e46a                  *(uint32_t*)(*(uint32_t*)eax_47 + 8)(eax_47);
0059e470                  int32_t eax_54;
0059e470                  eax_54 = 0;
0059e476                  return 0;
0059e461              }
0059e423          }
0059e3bb      }
0059e3bb      else
0059e3bb      {
0059e3bd          int32_t* eax_45 = *(uint32_t*)s_2;
0059e3bd          
0059e3c1          if (eax_45 != 0)
0059e3c1          {
0059e3c6              *(uint32_t*)(*(uint32_t*)eax_45 + 8)(eax_45);
0059e3c9              *(uint32_t*)s_2 = 0;
0059e3c1          }
0059e3c1          
0059e3cb          int32_t* ecx_17 = *(uint32_t*)((char*)s_2 + 4);
0059e3cb          
0059e3d0          if (ecx_17 != 0)
0059e3d0          {
0059e3d4              *(uint32_t*)(*(uint32_t*)ecx_17 + 0x14)();
0059e3d7              *(uint32_t*)((char*)s_2 + 4) = 0;
0059e3d0          }
0059e3d0          
0059e3de          operator delete[](*(uint32_t*)((char*)s_2 + 0x10));
0059e3e4          *(uint32_t*)((char*)s_2 + 0x10) = 0;
0059e3e7          operator delete(s_2);
0059e3ec          eax_47 = var_5c;
0059e3ec          
0059e3f5          if (eax_47 != 0)
0059e3f5          {
0059e3fe              *(uint32_t*)(*(uint32_t*)eax_47 + 8)(eax_47);
0059e404              int32_t eax_48;
0059e404              eax_48 = 0;
0059e40a              return 0;
0059e3f5          }
0059e3bb      }
0059e3bb      
0059e940      eax_47 = 0;
0059e946      return 0;
0059dfa0  }

0059e98f                                               90                                                                 .

0059e990  class RenderDevice* D3DPolyRender::CreateRenderDevice(class D3DPolyRender* this @ ecx)

0059e990  {
0059e996      void* result = operator new(0x818);
0059e996      
0059e9a2      if (result == 0)
0059e9e8          return 0;
0059e9e8      
0059e9a6      RenderDevice::RenderDevice(result);
0059e9b1      *(uint32_t*)result = 0x7e5500;
0059e9b7      RenderStateCacheType::RenderStateCacheType(((char*)result + 0x474));
0059e9be      *(uint32_t*)((char*)result + 0x7fc) = 0;
0059e9c8      *(uint32_t*)((char*)result + 0x800) = 0;
0059e9d2      *(uint32_t*)((char*)result + 0x804) = 0;
0059e9dc      RenderDeviceD3D::Begin(result);
0059e9e4      return result;
0059e990  }

0059e9e9                             90 90 90 90 90 90 90                                                           .......

0059e9f0  uint8_t __thiscall D3DPolyRender::Startup(class D3DPolyRender* this, class RenderConfig const* arg2)

0059e9f0  {
0059e9ff      if (Render::Startup(this, arg2) != 0)
0059e9ff      {
0059ea06          HINSTANCE eax_1;
0059ea06          HINSTANCE ecx;
0059ea06          eax_1 = LoadLibraryA("d3d9.dll");
0059ea0e          this->m_hD3D9DLL = eax_1;
0059ea11          HINSTANCE var_c;
0059ea11          
0059ea11          if (eax_1 == 0)
0059ea11          {
0059ea2e          label_59ea2e:
0059ea2e              int32_t var_8_4 = 0;
0059ea30              var_c = ecx;
0059ea33              uint16_t* var_10 = &data_794320;
0059ea3d              var_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_c, var_10);
0059ea40              uint16_t* var_14 = &data_794320;
0059ea4a              var_14 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, var_14);
0059ea52              uint16_t eax_4;
0059ea52              class PStringBase<unsigned short> ecx_6;
0059ea52              class PStringBase<unsigned short> edx_1;
0059ea52              eax_4 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, &data_794320);
0059ea59              PlatformString::DisplayString(eax_4, edx_1, ecx_6, 0x69, var_14);
0059ea11          }
0059ea11          else
0059ea11          {
0059ea13              char const* const var_8_2 = "Direct3DCreate9";
0059ea18              var_c = eax_1;
0059ea19              int32_t eax_2;
0059ea19              eax_2 = kernel32_GetProcAddress_Ptr(var_c, var_8_2);
0059ea19              
0059ea21              if (eax_2 == 0)
0059ea21                  goto label_59ea2e;
0059ea21              
0059ea25              struct IDirect3D9* eax_3;
0059ea25              eax_3 = eax_2(0x20);
0059ea29              this->m_pDirect3D = eax_3;
0059ea29              
0059ea2c              if (eax_3 == 0)
0059ea2c                  goto label_59ea2e;
0059ea2c              
0059ea69              this->m_nDisplayAdapter = 0;
0059ea69              
0059ea77              if (D3DPolyRender::SelectBestAdapter(this) != 0)
0059ea86                  return D3DPolyRender::DetectDisplayModes(this) != 0;
0059ea11          }
0059e9ff      }
0059e9ff      
0059ea64      return 0;
0059e9f0  }

0059ea89                             90 90 90 90 90 90 90                                                           .......

0059ea90  uint8_t D3DPolyRender::ConstructMesh(class CGfxObj* arg1, class MeshBuffer** arg2)

0059ea90  {
0059eac2      return D3DPolyRender::ConstructMesh(arg1->num_surfaces, arg1->m_rgSurfaces, &arg1->vertex_array, arg1->num_polygons, arg1->polygons, 1f, 0, arg2);
0059ea90  }

0059eac3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0059ead0  void __fastcall D3DPolyRender::Begin(class D3DPolyRender* this)

0059ead0  {
0059ead9      this->m_hD3D9DLL = nullptr;
0059eae0      this->m_pDirect3D = nullptr;
0059eae7      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_DynamicVertexStreamHash.m_intrusiveTable);
0059eaec      this->m_pDynamicIndexStream = nullptr;
0059eaf6      this->m_GlobalMipmapLODBias = 0f;
0059eb0b      class PStringBase<char> var_4;
0059eb0b      PStringBase<char>::PStringBase<char>(&var_4, "Texture sampler mipmap LOD bias");
0059eb19      class PStringBase<char> var_8;
0059eb19      PStringBase<char>::PStringBase<char>(&var_8, "RenderD3D.MipmapLODBias");
0059eb19      
0059eb20      if (this != 0xffffff68)
0059eb37          GlobalRegistry::RegisterVariableInternal(&this->m_GlobalMipmapLODBias, GRVDataType_Float32, &var_8, &var_4, nullptr, 0, nullptr, nullptr);
0059eb37      
0059eb4a      int32_t* esi_3 = (var_8 - 0x14);
0059eb4a      
0059eb59      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0059eb61          **(uint32_t**)esi_3(1);
0059eb61      
0059eb67      int32_t* esi_5 = (var_4 - 0x14);
0059eb67      
0059eb76      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0059eb7e          **(uint32_t**)esi_5(1);
0059eb7e      
0059eb89      PStringBase<char>::PStringBase<char>(&var_8, "Mask for what mesh types will ge…");
0059eb97      PStringBase<char>::PStringBase<char>(&var_4, "RenderD3D.AlphaDelayMask");
0059ebb5      GlobalRegistry::RegisterVariableInternal(&D3DPolyRender::s_AlphaDelayMask, GRVDataType_UInt32, &var_4, &var_8, nullptr, 0, nullptr, nullptr);
0059ebbe      int32_t* esi_7 = (var_4 - 0x14);
0059ebbe      
0059ebd0      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
0059ebd8          **(uint32_t**)esi_7(1);
0059ebd8      
0059ebde      int32_t* esi_9 = (var_8 - 0x14);
0059ebde      
0059ebed      if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
0059ebf5          **(uint32_t**)esi_9(1);
0059ebf5      
0059ec00      PStringBase<char>::PStringBase<char>(&var_8, "Z-Buffer test ref value (for DDS…");
0059ec0e      PStringBase<char>::PStringBase<char>(&var_4, "RenderD3D.DDSAlphaTestRef");
0059ec2c      GlobalRegistry::RegisterVariableInternal(&D3DPolyRender::s_ddsAlphaTestRef, GRVDataType_Int32, &var_4, &var_8, nullptr, 0, nullptr, nullptr);
0059ec35      int32_t* esi_11 = (var_4 - 0x14);
0059ec35      
0059ec47      if ((InterlockedDecrement(&esi_11[1]) == 0 && esi_11 != 0))
0059ec4f          **(uint32_t**)esi_11(1);
0059ec4f      
0059ec55      int32_t* esi_13 = (var_8 - 0x14);
0059ec55      
0059ec64      if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
0059ec6c          **(uint32_t**)esi_13(1);
0059ec6c      
0059ec77      PStringBase<char>::PStringBase<char>(&var_8, "Z-Buffer test ref value (for pal…");
0059ec85      PStringBase<char>::PStringBase<char>(&var_4, "RenderD3D.256AlphaTestRef");
0059eca3      GlobalRegistry::RegisterVariableInternal(&D3DPolyRender::s_256AlphaTestRef, GRVDataType_Int32, &var_4, &var_8, nullptr, 0, nullptr, nullptr);
0059ecac      int32_t* esi_15 = (var_4 - 0x14);
0059ecac      
0059ecbe      if ((InterlockedDecrement(&esi_15[1]) == 0 && esi_15 != 0))
0059ecc6          **(uint32_t**)esi_15(1);
0059ecc6      
0059eccc      int32_t* esi_17 = (var_8 - 0x14);
0059eccc      
0059ecdc      if ((InterlockedDecrement(&esi_17[1]) == 0 && esi_17 != 0))
0059ece4          **(uint32_t**)esi_17(1);
0059ead0  }

0059eceb                                   90 90 90 90 90                                                             .....

0059ecf0  void __fastcall D3DPolyRender::End(class D3DPolyRender* this)

0059ecf0  {
0059ed01      void* var_1c;
0059ed01      PStringBase<char>::PStringBase<char>(&var_1c, "RenderD3D.MipmapLODBias");
0059ed0b      GlobalRegistry::UnregisterVariable(&var_1c);
0059ed1a      int32_t* esi_1 = ((char*)var_1c - 0x14);
0059ed1a      
0059ed2c      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0059ed34          **(uint32_t**)esi_1(1);
0059ed34      
0059ed3f      PStringBase<char>::PStringBase<char>(&var_1c, "RenderD3D.AlphaDelayMask");
0059ed49      GlobalRegistry::UnregisterVariable(&var_1c);
0059ed52      int32_t* esi_3 = ((char*)var_1c - 0x14);
0059ed52      
0059ed64      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0059ed6c          **(uint32_t**)esi_3(1);
0059ed6c      
0059ed77      PStringBase<char>::PStringBase<char>(&var_1c, "RenderD3D.DDSAlphaTestRef");
0059ed81      GlobalRegistry::UnregisterVariable(&var_1c);
0059ed8a      void* esi_5 = ((char*)var_1c - 0x14);
0059ed8a      
0059ed9c      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0059eda4          **(uint32_t**)esi_5(1);
0059eda4      
0059edaf      PStringBase<char>::PStringBase<char>(&var_1c, "RenderD3D.256AlphaTestRef");
0059edb9      GlobalRegistry::UnregisterVariable(&var_1c);
0059edc2      void* esi_7 = ((char*)var_1c - 0x14);
0059edc2      
0059edd4      if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0059eddc          **(uint32_t**)esi_7(1);
0059eddc      
0059edde      class RenderIndexStreamD3D* m_pDynamicIndexStream = this->m_pDynamicIndexStream;
0059edde      
0059ede6      if (m_pDynamicIndexStream != 0)
0059ede8          m_pDynamicIndexStream->vtable->__vecDelDtor(1);
0059ede8      
0059edf9      this->m_pDynamicIndexStream = nullptr;
0059ee03      void __return;
0059ee03      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_5 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_DynamicVertexStreamHash.m_intrusiveTable, &__return);
0059ee08      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_5->m_currElement;
0059ee0d      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_5->m_currHashTable;
0059ee0f      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_5->m_currBucket;
0059ee12      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
0059ee12      
0059ee16      if (i_1 != 0)
0059ee16      {
0059ee18          while (true)
0059ee18          {
0059ee18              class DBOCache* m_data = i_1->m_data;
0059ee18              
0059ee1d              if (m_data != 0)
0059ee1d              {
0059ee1f                  m_data->vtable->__vecDelDtor(1);
0059ee25                  m_currHashTable = m_currHashTable_1;
0059ee1d              }
0059ee1d              
0059ee29              i_1 = i_1->m_hashNext;
0059ee29              
0059ee2e              if (i_1 == 0)
0059ee2e              {
0059ee4b                  class HashTableData<unsigned long,DBOCache *>* i;
0059ee4b                  
0059ee4b                  do
0059ee4b                  {
0059ee40                      m_currBucket = &m_currBucket[1];
0059ee40                      
0059ee45                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0059ee45                          goto label_59ee55;
0059ee45                      
0059ee47                      i = *(uint32_t*)m_currBucket;
0059ee4b                  } while (i == 0);
0059ee4b                  
0059ee4d                  i_1 = i;
0059ee4d                  
0059ee51                  if (i_1 == 0)
0059ee51                      break;
0059ee2e              }
0059ee18          }
0059ee16      }
0059ee16      
0059ee55  label_59ee55:
0059ee55      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_DynamicVertexStreamHash.m_intrusiveTable);
0059ee5a      struct IDirect3D9* m_pDirect3D = this->m_pDirect3D;
0059ee5a      
0059ee62      if (m_pDirect3D != 0)
0059ee62      {
0059ee64          m_pDirect3D->vtable->Release(m_pDirect3D);
0059ee6a          this->m_pDirect3D = nullptr;
0059ee62      }
0059ee62      
0059ee6d      struct HINSTANCE__* m_hD3D9DLL = this->m_hD3D9DLL;
0059ee6d      
0059ee72      if (m_hD3D9DLL != 0)
0059ee72      {
0059ee75          FreeLibrary(m_hD3D9DLL);
0059ee7b          this->m_hD3D9DLL = nullptr;
0059ee72      }
0059ecf0  }

0059ee85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0059ee90  void __fastcall D3DPolyRender::Shutdown(class D3DPolyRender* this)

0059ee90  {
0059ee93      D3DPolyRender::End(this);
0059ee9a      Render::Shutdown(this);
0059eea2      /* tailcall */
0059eea2      return D3DPolyRender::Begin(this);
0059ee90  }

0059eea7                       90 90 90 90 90 90 90 90 90                                                         .........

0059eeb0  class RenderVertexStreamD3D* __thiscall D3DPolyRender::ReferenceVertexStream(class D3DPolyRender* this, uint32_t const arg2, uint32_t const arg3)

0059eeb0  {
0059eeb0      class D3DPolyRender* var_4 = this;
0059eeb4      uint32_t const edi = arg2;
0059eeb4      
0059eed1      for (int32_t* i = this->m_DynamicVertexStreamHash.m_intrusiveTable.m_buckets[(COMBINE(0, edi) % this->m_DynamicVertexStreamHash.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0059eed1      {
0059eed5          if (*(uint32_t*)i == edi)
0059eed5          {
0059ef3a              if (i != 0)
0059ef45                  return i[2];
0059ef45              
0059ef3a              break;
0059eed5          }
0059eed1      }
0059eed1      
0059eee3      void* result = operator new(0xb8);
0059eee3      
0059eeef      if (result != 0)
0059eeef      {
0059eef3          GraphicsResource::GraphicsResource(result);
0059eefa          *(uint32_t*)result = 0x7e5438;
0059ef00          RenderVertexStreamD3D::Begin(result);
0059ef09          uint32_t const eax_3 = 0x2000;
0059ef10          var_4 = result;
0059ef10          
0059ef14          if (arg3 > 0x2000)
0059ef16              eax_3 = arg3;
0059ef16          
0059ef25          if (*(uint32_t*)(*(uint32_t*)result + 0x10)(eax_3, edi, 1) != 0)
0059ef25          {
0059ef55              HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_DynamicVertexStreamHash.vtable, &arg2, &var_4);
0059ef60              return result;
0059ef25          }
0059ef25          
0059ef2d          **(uint32_t**)result(1);
0059eeef      }
0059eeef      
0059ef35      return 0;
0059eeb0  }

0059ef63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0059ef70  void* __thiscall RenderIndexBufferD3D::`scalar deleting destructor'(class RenderIndexBufferD3D* this, uint32_t arg2)

0059ef70  {
0059ef73      this->vtable = 0x7e57a0;
0059ef79      RenderIndexBufferD3D::End(this);
0059ef80      this->vtable = 0x79b26c;
0059ef86      RenderIndexBuffer::End(this);
0059ef86      
0059ef90      if ((arg2 & 1) != 0)
0059ef93          operator delete(this);
0059ef93      
0059ef9e      return this;
0059ef70  }

0059efa1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0059efb0  int32_t __fastcall RenderDeviceD3D::Init(class RenderDeviceD3D* this)

0059efb0  {
0059efb6      void* eax = operator new(0x7c);
0059efb6      
0059efc2      if (eax == 0)
0059efc2      {
0059effb          RenderDeviceD3D::indoor_pview = nullptr;
0059f004          return 0;
0059efc2      }
0059efc2      
0059efc8      class PView* eax_1 = PView::PView(eax, 1);
0059efcf      RenderDeviceD3D::indoor_pview = eax_1;
0059efcf      
0059efd4      if (eax_1 != 0)
0059efd4      {
0059efd8          void* eax_2 = operator new(0x7c);
0059efd8          
0059efe2          if (eax_2 == 0)
0059efe2          {
0059f006              RenderDeviceD3D::outdoor_pview = nullptr;
0059f00f              return 0;
0059efe2          }
0059efe2          
0059efe7          class PView* eax_3 = PView::PView(eax_2, 0);
0059efee          RenderDeviceD3D::outdoor_pview = eax_3;
0059efee          
0059eff3          if (eax_3 != 0)
0059eff3          {
0059f015              this->m_pSolidColorTexture = nullptr;
0059f01b              this->m_pCurrMaterial = nullptr;
0059f021              this->m_bMaterialAlphaMode = 0;
0059f027              this->m_ParticleState = 0;
0059f033              this->m_primitiveVbuf = nullptr;
0059f039              this->m_gammaBrightnessVal = 0f;
0059f03f              __builtin_memcpy(&this->m_defaultMaterial, "\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f", 0x20);
0059f087              __builtin_memset(&this->m_defaultMaterial.Specular, 0, 0x25);
0059f0a5              this->m_currentSolidColor = 0xff000000;
0059f0b6              return 1;
0059eff3          }
0059efd4      }
0059efd4      
0059eff9      return 0;
0059efb0  }

0059f0b7                                                                       90 90 90 90 90 90 90 90 90                         .........

0059f0c0  void __stdcall RenderDeviceD3D::SetLandscape(class RenderDeviceD3D const* this @ ecx, class LScape* arg2)

0059f0c0  {
0059f0c4      RenderDeviceD3D::indoor_pview->lscape = arg2;
0059f0c0  }


0059f0d0  void __stdcall RenderDeviceD3D::DrawInside(class RenderDeviceD3D const* this @ ecx, class CEnvCell* arg2)

0059f0d0  {
0059f0d6      /* tailcall */
0059f0d6      return PView::DrawInside(RenderDeviceD3D::indoor_pview, arg2);
0059f0d0  }

0059f0db                                                                                   90 90 90 90 90                             .....

0059f0e0  void __stdcall RenderDeviceD3D::DrawPortal(class RenderDeviceD3D const* this @ ecx, class CPortalPoly* arg2, int32_t arg3, int32_t arg4)

0059f0e0  {
0059f0ee      class PView* RenderDeviceD3D::outdoor_pview_1 = RenderDeviceD3D::outdoor_pview;
0059f0f4      RenderDeviceD3D::backup_building_view = RenderDeviceD3D::building_view;
0059f0ff      RenderDeviceD3D::building_view = 0xffffffff;
0059f109      PView::DrawPortal(RenderDeviceD3D::outdoor_pview_1, arg2, arg3, arg4);
0059f114      RenderDeviceD3D::building_view = RenderDeviceD3D::backup_building_view;
0059f0e0  }

0059f11d                                                                                         90 90 90                               ...

0059f120  void __stdcall RenderDeviceD3D::DrawLandCell(class RenderDeviceD3D const* this @ ecx, class CLandCell* arg2)

0059f120  {
0059f12d      ACRender::landPolysDraw(arg2->polygons, 2);
0059f120  }

0059f138                                                                          90 90 90 90 90 90 90 90                          ........

0059f140  void __thiscall RenderDeviceD3D::DrawSortCell(class RenderDeviceD3D const* this, class CSortCell* arg2)

0059f140  {
0059f146      class CBuildingObj* building = arg2->building;
0059f146      
0059f150      if (building != 0)
0059f152          this->vtable->DrawBuilding(building);
0059f152      
0059f158      this->vtable->DrawObjCell(arg2);
0059f140  }

0059f165                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0059f170  void __stdcall RenderDeviceD3D::DrawEnvCell(class RenderDeviceD3D const* this @ ecx, class CEnvCell* arg2)

0059f170  {
0059f17e      if (CEnvCell::GetDrawnThisFrame(arg2) == 0)
0059f17e      {
0059f186          CEnvCell::SetDrawnThisFrame(arg2);
0059f18b          Render::obj_view_set();
0059f18b          
0059f197          if (skipMinimStep == 0)
0059f1af              Render::minimize_envcell_lighting(&arg2->pos, BSPTREE::GetSphere(arg2->structure->drawing_bsp)->radius);
0059f1af          
0059f1bc          float Render::environment_detail_tiling_1 = Render::environment_detail_tiling;
0059f1c2          Render::curr_detail_surface = Render::environment_detail_surface;
0059f1c7          Render::curr_detail_tiling = Render::environment_detail_tiling_1;
0059f1cd          Render::curr_detail_src_blend = 9;
0059f1d7          Render::curr_detail_dst_blend = 6;
0059f1d7          
0059f1e9          if (arg2->use_built_mesh != 0)
0059f1e9          {
0059f1f6              D3DPolyRender::SetStaticLightingVertexColors(arg2->constructed_mesh, &arg2->pos);
0059f212              D3DPolyRender::DrawMesh(arg2->num_surfaces, arg2->surfaces, arg2->constructed_mesh, 1);
0059f21a              Render::curr_detail_surface = nullptr;
0059f225              return;
0059f1e9          }
0059f1e9          
0059f228          class CCellStruct* structure = arg2->structure;
0059f231          int32_t i = 0;
0059f231          
0059f235          if (structure->num_polygons > 0)
0059f235          {
0059f237              int32_t edx_5 = 0;
0059f239              int32_t ebx;
0059f239              int32_t var_8_3 = ebx;
0059f239              
0059f26f              do
0059f26f              {
0059f243                  Render::PolyNext->poly = (structure->polygons + edx_5);
0059f24d                  Render::PolyNext->planeMask = 0xffffffff;
0059f259                  Render::PolyNext = &Render::PolyNext[1];
0059f260                  structure = arg2->structure;
0059f269                  i += 1;
0059f26a                  edx_5 += 0x30;
0059f26f              } while (i < structure->num_polygons);
0059f235          }
0059f235          
0059f272          Render::m_pRenderer->vtable->polyListFinishInternal();
0059f27d          Render::PolyNext = &Render::PolyList;
0059f287          Render::curr_detail_surface = nullptr;
0059f17e      }
0059f170  }

0059f295                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0059f2a0  void __stdcall RenderDeviceD3D::DrawBuilding(class RenderDeviceD3D const* this @ ecx, class CBuildingObj* arg2)

0059f2a0  {
0059f2a0      RenderDeviceD3D::outdoor_pview->outdoor_portal_list = arg2->portals;
0059f2bc      CPhysicsPart::UpdateViewerDistance(*(uint32_t*)arg2->part_array->parts);
0059f2c7      class CPhysicsPart* eax_2 = *(uint32_t*)arg2->part_array->parts;
0059f2c7      
0059f2d3      if (eax_2->gfxobj[eax_2->deg_level] != 0)
0059f2d3      {
0059f2d5          class CSurface* Render::building_detail_surface_1 = Render::building_detail_surface;
0059f2db          float Render::building_detail_tiling_1 = Render::building_detail_tiling;
0059f2e6          CBuildingObj::curr_pos = &arg2->m_position;
0059f2eb          Render::curr_detail_surface = Render::building_detail_surface_1;
0059f2f1          Render::curr_detail_tiling = Render::building_detail_tiling_1;
0059f2f7          Render::curr_detail_src_blend = 9;
0059f301          Render::curr_detail_dst_blend = 6;
0059f30b          D3DPolyRender::FlushAlphaList(0f);
0059f31d          CPhysicsPart::Draw(*(uint32_t*)arg2->part_array->parts, 1);
0059f322          RenderDeviceD3D::ObjBuildingOrBuildingPart = 1;
0059f336          CPhysicsPart::Draw(*(uint32_t*)arg2->part_array->parts, 0);
0059f33b          RenderDeviceD3D::ObjBuildingOrBuildingPart = 0;
0059f345          Render::curr_detail_surface = nullptr;
0059f2d3      }
0059f2a0  }

0059f353                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0059f360  void __stdcall RenderDeviceD3D::DrawMeshInternal(class RenderDeviceD3D const* this @ ecx, class CGfxObj* arg2, uint8_t arg3, enum BoundingType arg4)

0059f360  {
0059f361      int32_t ebx;
0059f361      ebx = arg3;
0059f368      class CPhysicsPart* RenderDeviceD3D::s_current_physics_part_1 = RenderDeviceD3D::s_current_physics_part;
0059f368      
0059f372      if ((ebx != 0 || RenderDeviceD3D::s_current_physics_part_1 == 0))
0059f36e          goto label_59f398;
0059f36e      
0059f37d      if (CPhysicsPart::IsPartOfPlayerObj(RenderDeviceD3D::s_current_physics_part_1) != 0)
0059f37d          goto label_59f398;
0059f37d      
0059f388      if (CPhysicsPart::GetDrawnThisFrame(RenderDeviceD3D::s_current_physics_part_1) == 0)
0059f388      {
0059f38c          CPhysicsPart::SetDrawnThisFrame(RenderDeviceD3D::s_current_physics_part_1);
0059f398      label_59f398:
0059f398          
0059f398          if (Render::useSunlight == 0)
0059f39a              Render::minimize_object_lighting();
0059f39a          
0059f3a8          if (arg2->use_built_mesh != 0)
0059f3a8          {
0059f3ac              if (ebx != 0)
0059f3ac              {
0059f3af                  Render::obj_view_set();
0059f3b9                  int32_t RenderDeviceD3D::building_view_1 = RenderDeviceD3D::building_view;
0059f3bf                  RenderDeviceD3D::building_view = Render::portal_view_num;
0059f3cc                  BSPTREE::build_draw_portals_only(arg2->drawing_bsp, 1);
0059f3d9                  BSPTREE::build_draw_portals_only(arg2->drawing_bsp, 2);
0059f3de                  RenderDeviceD3D::building_view = RenderDeviceD3D::building_view_1;
0059f3ec                  return;
0059f3ac              }
0059f3ac              
0059f3f4              D3DPolyRender::DrawMesh(arg2, arg2->constructed_mesh);
0059f3a8          }
0059f388      }
0059f360  }

0059f406                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0059f410  class RenderSurface* RenderDeviceD3D::CreateSurface(class RenderDeviceD3D const* this @ ecx)

0059f410  {
0059f415      void* eax = operator new(0x130);
0059f415      
0059f41f      if (eax != 0)
0059f41f      {
0059f423          int32_t result = RenderSurfaceD3D::RenderSurfaceD3D(eax);
0059f423          
0059f42a          if (result != 0)
0059f42e              return result;
0059f41f      }
0059f41f      
0059f42c      return 0;
0059f410  }

0059f42f                                               90                                                                 .

0059f430  class RenderTexture* RenderDeviceD3D::CreateTexture(class RenderDeviceD3D const* this @ ecx)

0059f430  {
0059f435      void* eax = operator new(0xb0);
0059f435      
0059f43f      if (eax != 0)
0059f43f      {
0059f443          int32_t result = RenderTextureD3D::RenderTextureD3D(eax);
0059f443          
0059f44a          if (result != 0)
0059f44e              return result;
0059f43f      }
0059f43f      
0059f44c      return 0;
0059f430  }

0059f44f                                               90                                                                 .

0059f450  class RenderIndexBuffer* RenderDeviceD3D::CreateIndexBuffer(class RenderDeviceD3D const* this @ ecx)

0059f450  {
0059f453      void* result = operator new(0x2c);
0059f453      
0059f45f      if (result == 0)
0059f482          return 0;
0059f482      
0059f463      *(uint32_t*)result = 0x79b26c;
0059f469      RenderIndexBuffer::Begin(result);
0059f470      *(uint32_t*)result = 0x7e57a0;
0059f476      RenderIndexBufferD3D::Begin(result);
0059f47e      return result;
0059f450  }

0059f483           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0059f490  void __thiscall RenderDeviceD3D::SetVertexStream(class RenderDeviceD3D* this, uint32_t const arg2, class RenderVertexStreamD3D* arg3)

0059f490  {
0059f49a      struct IDirect3DVertexBuffer9* eax = RenderVertexStreamD3D::GetD3DVertexBuffer(arg3);
0059f49a      
0059f4a1      if (eax != 0)
0059f4a1      {
0059f4a3          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
0059f4ac          m_pDirect3DDevice->vtable->SetStreamSource(m_pDirect3DDevice, arg2, eax, 0, arg3->m_VertexFormatInfo.size);
0059f4a1      }
0059f490  }

0059f4c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0059f4d0  uint8_t __fastcall RenderDeviceD3D::IsResetPossible(class RenderDeviceD3D* this)

0059f4d0  {
0059f4d3      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
0059f4e4      int32_t eax;
0059f4e4      
0059f4e4      if (m_pDirect3DDevice->vtable->TestCooperativeLevel(m_pDirect3DDevice) != 0x88760868)
0059f4e4      {
0059f4f1          eax = 1;
0059f4f4          return 1;
0059f4e4      }
0059f4e4      
0059f4e6      this->m_bDeviceLost = 1;
0059f4ed      eax = 0;
0059f4f0      return 0;
0059f4d0  }

0059f4f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0059f500  void __stdcall RenderDeviceD3D::ApplyVertexFormat(class RenderDeviceD3D* this @ ecx, class VertexFormatInfo const* arg2)

0059f500  {
0059f50b      int32_t* eax_1 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0059f515      *(uint32_t*)(*(uint32_t*)eax_1 + 0x164)(eax_1, arg2->format);
0059f500  }

0059f51e                                                                                            90 90                                ..

0059f520  uint8_t __fastcall RenderDeviceD3D::DetectDeviceCaps(class RenderDeviceD3D* this)

0059f520  {
0059f525      int32_t* eax = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
0059f544      void var_44c;
0059f544      *(uint32_t*)(*(uint32_t*)eax + 0x14)(eax, this->m_AdapterID, 0, &var_44c);
0059f54c      int32_t* eax_2 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
0059f567      *(uint32_t*)(*(uint32_t*)eax_2 + 0x38)(eax_2, this->m_AdapterID, this->m_D3DDeviceType, &this->m_D3DCaps);
0059f576      uint32_t MaxSimultaneousTextures = this->m_D3DCaps.MaxSimultaneousTextures;
0059f57c      uint32_t MaxTextureBlendStages = this->m_D3DCaps.MaxTextureBlendStages;
0059f588      this->m_caps.MaxTextureWidth = this->m_D3DCaps.MaxTextureWidth;
0059f58b      uint32_t MaxActiveLights = this->m_D3DCaps.MaxActiveLights;
0059f594      this->m_caps.MaxTextureHeight = this->m_D3DCaps.MaxTextureHeight;
0059f59d      this->m_caps.MaxSimultaneousTextures = MaxSimultaneousTextures;
0059f5a0      this->m_caps.MaxTextureBlendStages = MaxTextureBlendStages;
0059f5a3      this->m_caps.MaxSimultaneousRenderTargets = this->m_D3DCaps.NumSimultaneousRTs;
0059f5a6      this->m_caps.MaxActiveLights = MaxActiveLights;
0059f5a9      this->m_caps.MaxUserClipPlanes = this->m_D3DCaps.MaxUserClipPlanes;
0059f5a9      
0059f5ac      if (MaxActiveLights > 8)
0059f5ae          this->m_caps.MaxActiveLights = 8;
0059f5ae      
0059f5b5      uint32_t TextureOpCaps = this->m_D3DCaps.TextureOpCaps;
0059f5c7      this->m_caps.bTexOpDotProduct3 = (((int8_t)(TextureOpCaps >> 0x17)) & 1);
0059f5d5      this->m_caps.bTexOpBumpEnvMap = (((int8_t)(TextureOpCaps >> 0x15)) & 1);
0059f5e2      uint8_t eax_6;
0059f5e2      
0059f5e2      if (((this->m_D3DCaps.Caps3 & 0x20) == 0 || this->m_D3DCaps.PrimitiveMiscCaps >= 0))
0059f5eb          eax_6 = 0;
0059f5e2      else
0059f5e4          eax_6 = 1;
0059f5e4      
0059f5ed      this->m_caps.bDestinationAlpha = eax_6;
0059f5f0      long double x87_r7 = ((long double)this->m_D3DCaps.MaxPointSize);
0059f5f6      uint32_t TextureCaps = this->m_D3DCaps.TextureCaps;
0059f5fc      long double temp0 = ((long double)64f);
0059f5fc      (x87_r7 - temp0);
0059f60a      this->m_caps.bSquareTexturesOnly = (((int8_t)(TextureCaps >> 5)) & 1);
0059f61a      this->m_caps.bCubeTextures = (((int8_t)(TextureCaps >> 0xb)) & 1);
0059f61d      this->m_caps.b3DTextures = (((int8_t)(TextureCaps >> 0xd)) & 1);
0059f620      uint32_t PrimitiveMiscCaps = this->m_D3DCaps.PrimitiveMiscCaps;
0059f62b      uint16_t eax_9;
0059f62b      eax_9 = (((int16_t)(PrimitiveMiscCaps >> 7)) & 1);
0059f62d      this->m_caps.bColorWriteControl = eax_9;
0059f630      eax_9 = *(uint8_t*)((char*)this->m_D3DCaps.DevCaps)[2];
0059f636      eax_9 &= 1;
0059f638      this->m_caps.bHardwareVertexProcessing = eax_9;
0059f63d      this->m_caps.bSimpleNonPowerOfTwoTextures = 0;
0059f644      uint8_t eax_10;
0059f644      
0059f644      if ((*(uint8_t*)((char*)((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
0059f64d          eax_10 = 0;
0059f644      else
0059f646          eax_10 = 1;
0059f646      
0059f64f      this->m_caps.bPointSprites = eax_10;
0059f652      uint32_t Caps2 = this->m_D3DCaps.Caps2;
0059f663      this->m_caps.bDynamicTextures = (((int8_t)(Caps2 >> 0x1d)) & 1);
0059f672      this->m_caps.bBlendOp = (((int8_t)(PrimitiveMiscCaps >> 0xb)) & 1);
0059f686      this->m_caps.bSlopeScaleDepthBias = (((int8_t)(this->m_D3DCaps.RasterCaps >> 0x19)) & 1);
0059f698      this->m_caps.bAutoGenMipMaps = (((int8_t)(Caps2 >> 0x1e)) & 1);
0059f69b      this->m_caps.bTwoSidedStencil = (((int8_t)(this->m_D3DCaps.StencilCaps >> 8)) & 1);
0059f6aa      uint32_t var_24;
0059f6aa      uint32_t eax_14;
0059f6aa      
0059f6aa      if ((var_24 != 0x10de || (*(uint8_t*)((char*)this->m_D3DCaps.PixelShaderVersion)[1] & 0xf) != 0))
0059f6b0          eax_14 = 0;
0059f6aa      else
0059f6ac          eax_14 = 1;
0059f6ac      
0059f6c6      if ((((MaxSimultaneousTextures < 2 || MaxTextureBlendStages < 2) || *(uint8_t*)((char*)TextureOpCaps)[1] >= 0) || (TextureOpCaps & 0x10000) == 0))
0059f6db          eax_14 = 1;
0059f6c6      else
0059f6c6      {
0059f6c8          bool cond:3_1 = eax_14 != 0;
0059f6ca          eax_14 = 1;
0059f6ca          
0059f6cc          if (!(cond:3_1))
0059f6cc          {
0059f6cf              this->m_caps.bCanDoSinglePassDetailing = 1;
0059f6da              return 1;
0059f6cc          }
0059f6c6      }
0059f6c6      
0059f6e6      return eax_14;
0059f520  }

0059f6e7                       90 90 90 90 90 90 90 90 90                                                         .........

0059f6f0  void __thiscall RenderDeviceD3D::SetViewport(class RenderDeviceD3D* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint8_t arg6)

0059f6f0  {
0059f711      RenderDevice::SetViewport(this, arg2, arg3, arg4, arg5, arg6);
0059f722      uint32_t m_viewportY = this->m_viewportY;
0059f728      uint32_t m_viewportWidth = this->m_viewportWidth;
0059f72c      uint32_t m_viewportX = this->m_viewportX;
0059f736      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
0059f741      uint32_t m_viewportY_1 = m_viewportY;
0059f745      uint32_t m_viewportHeight = this->m_viewportHeight;
0059f749      int32_t var_8 = 0;
0059f751      int32_t var_4 = 0x3f800000;
0059f759      m_pDirect3DDevice->vtable->SetViewport(m_pDirect3DDevice, &m_viewportX);
0059f6f0  }

0059f769                             90 90 90 90 90 90 90                                                           .......

0059f770  enum PixelFormatID __thiscall RenderDeviceD3D::SelectPixelFormat(class RenderDeviceD3D* this, enum PixelFormatID const arg2, uint32_t const arg3, enum _D3DRESOURCETYPE const arg4, uint8_t const arg5, uint8_t const* arg6, uint32_t const arg7)

0059f770  {
0059f777      int32_t ebp = 0;
0059f777      
0059f77e      if (arg7 > 0)
0059f77e      {
0059f784          int32_t ebx;
0059f784          ebx = arg5;
0059f784          
0059f830          do
0059f830          {
0059f7a1              int32_t result;
0059f7a1              
0059f7a1              switch (((uint32_t)arg6[ebp]))
0059f7a1              {
0059f7aa                  case 0:
0059f7aa                  {
0059f7aa                      if (ebx != 0)
0059f7aa                      {
0059f7ac                          result = 0x14;
0059f7b1                          goto label_59f7fe;
0059f7aa                      }
0059f7aa                      break;
0059f7aa                  }
0059f7b5                  case 1:
0059f7b5                  {
0059f7b5                      if (ebx != 0)
0059f7b5                      {
0059f7b7                          result = 0x15;
0059f7bc                          goto label_59f7fe;
0059f7b5                      }
0059f7b5                      break;
0059f7b5                  }
0059f7c0                  case 2:
0059f7c0                  {
0059f7c0                      if (ebx != 0)
0059f7c0                      {
0059f7c2                          result = 0x16;
0059f7c7                          goto label_59f7fe;
0059f7c0                      }
0059f7c0                      break;
0059f7c0                  }
0059f7c9                  case 3:
0059f7c9                  {
0059f7c9                      result = 0x17;
0059f7fe                  label_59f7fe:
0059f7fe                      int32_t* eax_2 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
0059f7fe                      
0059f827                      if (*(uint32_t*)(*(uint32_t*)eax_2 + 0x28)(eax_2, this->m_AdapterID, this->m_D3DDeviceType, arg2, arg3, arg4, result) == 0)
0059f845                          return result;
0059f7c9                      break;
0059f7c9                  }
0059f7d0                  case 4:
0059f7d0                  {
0059f7d0                      result = 0x18;
0059f7d5                      goto label_59f7fe;
0059f7d0                  }
0059f7d7                  case 5:
0059f7d7                  {
0059f7d7                      result = 0x19;
0059f7dc                      goto label_59f7fe;
0059f7d7                  }
0059f7de                  case 6:
0059f7de                  {
0059f7de                      result = 0x1a;
0059f7e3                      goto label_59f7fe;
0059f7de                  }
0059f7e5                  case 7:
0059f7e5                  {
0059f7e5                      result = 0x1e;
0059f7ea                      goto label_59f7fe;
0059f7e5                  }
0059f7ec                  case 8:
0059f7ec                  {
0059f7ec                      result = 0x1d;
0059f7f1                      goto label_59f7fe;
0059f7ec                  }
0059f7f3                  case 9:
0059f7f3                  {
0059f7f3                      result = 0x1c;
0059f7f3                      goto label_59f7fe;
0059f7f3                  }
0059f7a1              }
0059f7a1              
0059f82d              ebp += 1;
0059f830          } while (ebp < arg7);
0059f77e      }
0059f77e      
0059f83c      return 0;
0059f770  }

0059f78a                                8d 9b 00 00 00 00                                                            ......
0059f848  uint32_t jump_table_59f848[0xa] = 
0059f848  {
0059f848      [0x0] =  0x0059f7a8
0059f84c      [0x1] =  0x0059f7b3
0059f850      [0x2] =  0x0059f7be
0059f854      [0x3] =  0x0059f7c9
0059f858      [0x4] =  0x0059f7d0
0059f85c      [0x5] =  0x0059f7d7
0059f860      [0x6] =  0x0059f7de
0059f864      [0x7] =  0x0059f7e5
0059f868      [0x8] =  0x0059f7ec
0059f86c      [0x9] =  0x0059f7f3
0059f870  }

0059f870  uint8_t __thiscall RenderDeviceD3D::ChoosePixelFormats(class RenderDeviceD3D* this, enum PixelFormatID const arg2)

0059f870  {
0059f883      char var_7c = 8;
0059f887      char var_8e = 8;
0059f88b      char var_76 = 8;
0059f8a0      char var_7e = 6;
0059f8a4      char var_8f = 6;
0059f8a8      char var_75 = 6;
0059f8af      char var_84 = 0;
0059f8b4      char var_83 = 2;
0059f8b9      char var_82 = 1;
0059f8be      char var_81 = 3;
0059f8c3      char var_80 = 4;
0059f8c8      char var_7f = 5;
0059f8cd      char var_7d = 7;
0059f8d1      uint8_t var_90 = 1;
0059f8d6      char var_8d = 5;
0059f8db      char var_8c = 0;
0059f8e0      char var_8b = 2;
0059f8e5      char var_8a = 3;
0059f8ea      char var_89 = 4;
0059f8ef      char var_88 = 7;
0059f8f3      char var_78 = 9;
0059f8f8      char var_77 = 1;
0059f8fd      char var_74 = 5;
0059f917      this->m_displayInfo.pfRenderTargets = RenderDeviceD3D::SelectPixelFormat(this, arg2, 1, D3DRTYPE_TEXTURE, 1, &var_84, 9);
0059f92f      this->m_displayInfo.pfRGBTextures = RenderDeviceD3D::SelectPixelFormat(this, arg2, 0, D3DRTYPE_TEXTURE, 1, &var_84, 9);
0059f93b      this->m_displayInfo.pfARGBTextures = RenderDeviceD3D::SelectPixelFormat(this, arg2, 0, D3DRTYPE_TEXTURE, 1, &var_90, 9);
0059f93e      int32_t var_70;
0059f93e      AvailableProperty::AvailableProperty(&var_70);
0059f947      int32_t var_38;
0059f947      AvailableProperty::AvailableProperty(&var_38);
0059f954      PixelFormatDesc::SetFormat(&var_70, this->m_displayInfo.pfRGBTextures);
0059f961      PixelFormatDesc::SetFormat(&var_38, this->m_displayInfo.pfARGBTextures);
0059f985      uint8_t var_64;
0059f985      char var_50;
0059f985      char var_4f;
0059f985      uint8_t var_4e;
0059f985      char var_2c;
0059f985      uint8_t var_18;
0059f985      char var_17;
0059f985      char var_16;
0059f985      
0059f985      if ((var_70 != var_38 && (var_64 == var_2c && var_50 == var_18)))
0059f985      {
0059f987          int32_t edx;
0059f987          edx = var_4f;
0059f987          
0059f99f          if ((edx == var_17 && var_4e == var_16))
0059f9a4              this->m_displayInfo.pfRGBTextures = this->m_displayInfo.pfARGBTextures;
0059f985      }
0059f985      
0059f9b7      enum PixelFormatID eax_5 = RenderDeviceD3D::SelectPixelFormat(this, arg2, 0, D3DRTYPE_TEXTURE, 1, &var_78, 5);
0059f9c4      this->m_displayInfo.pfAlphaTextures = eax_5;
0059f9c7      this->m_displayInfo.pfAlphaSurfaces = eax_5;
0059f9d5      this->m_displayInfo.pfRGBSurfaces = this->m_displayInfo.pfRGBTextures;
0059f9db      this->m_displayInfo.pfARGBSurfaces = this->m_displayInfo.pfARGBTextures;
0059f9f3      this->m_displayInfo.pfLowRGBSurfaces = RenderDeviceD3D::SelectPixelFormat(this, arg2, 0, D3DRTYPE_TEXTURE, 0, &var_84, 9);
0059fa02      this->m_displayInfo.pfLowARGBSurfaces = RenderDeviceD3D::SelectPixelFormat(this, arg2, 0, D3DRTYPE_TEXTURE, 0, &var_90, 9);
0059fa08      AvailableProperty::AvailableProperty(&var_38);
0059fa11      AvailableProperty::AvailableProperty(&var_70);
0059fa21      PixelFormatDesc::SetFormat(&var_38, this->m_displayInfo.pfLowRGBSurfaces);
0059fa31      PixelFormatDesc::SetFormat(&var_70, this->m_displayInfo.pfLowARGBSurfaces);
0059fa31      
0059fa55      if ((var_38 != var_70 && (var_2c == var_64 && var_18 == var_50)))
0059fa55      {
0059fa57          int32_t ecx_18;
0059fa57          ecx_18 = var_17;
0059fa57          
0059fa6f          if ((ecx_18 == var_4f && var_16 == var_4e))
0059fa77              this->m_displayInfo.pfLowRGBSurfaces = this->m_displayInfo.pfLowARGBSurfaces;
0059fa55      }
0059fa55      
0059fa92      this->m_displayInfo.pfLowAlphaSurfaces = RenderDeviceD3D::SelectPixelFormat(this, arg2, 0, D3DRTYPE_TEXTURE, 0, &var_90, 9);
0059fa99      enum PixelFormatID eax_11;
0059fa99      eax_11 = 1;
0059faa2      return 1;
0059f870  }

0059faa5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0059fab0  uint8_t __thiscall RenderDeviceD3D::CheckDisplayModes(class RenderDeviceD3D* this, enum PixelFormatID const arg2, uint32_t const arg3, uint32_t* arg4)

0059fab0  {
0059fab8      int32_t* eax_1 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
0059fabd      enum PixelFormatID ebp = arg2;
0059fad0      int32_t eax_2 = *(uint32_t*)(*(uint32_t*)eax_1 + 0x18)(eax_1, this->m_AdapterID, ebp);
0059fad3      int32_t ebx;
0059fad3      ebx = this->m_presentation.FullScreen;
0059fad6      bool cond:0 = ebx == 0;
0059fadf      int32_t edi = 0;
0059fae7      arg2 = cond:0;
0059faeb      *(uint32_t*)arg4 = 0;
0059faeb      
0059faf1      if (eax_2 <= 0)
0059faf1      {
0059fb5d          eax_2 = cond:0;
0059fb63          return eax_2;
0059faf1      }
0059faf1      
0059fb4a      do
0059fb4a      {
0059faf8          int32_t* eax_4 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
0059fb0c          int32_t var_10;
0059fb0c          *(uint32_t*)(*(uint32_t*)eax_4 + 0x1c)(eax_4, this->m_AdapterID, ebp, edi, &var_10);
0059fb2c          int32_t var_c;
0059fb2c          int32_t var_4;
0059fb2c          
0059fb2c          if ((var_4 == ebp && (this->m_presentation.FullScreen != 0 && (var_10 == this->m_presentation.Width && var_c == this->m_presentation.Height))))
0059fb2c          {
0059fb34              arg2 = 1;
0059fb3f              uint32_t var_8;
0059fb3f              
0059fb3f              if ((var_8 > *(uint32_t*)arg4 && var_8 <= arg3))
0059fb41                  *(uint32_t*)arg4 = var_8;
0059fb2c          }
0059fb2c          
0059fb47          edi += 1;
0059fb4a      } while (edi < eax_2);
0059fb4a      
0059fb4c      int32_t eax_8;
0059fb4c      eax_8 = arg2;
0059fb57      return eax_8;
0059fab0  }

0059fb66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0059fb70  void __fastcall RenderDeviceD3D::ReleaseD3DResources(class RenderDeviceD3D* this)

0059fb70  {
0059fb73      RenderDevice::ReleaseSurfaceResources(this);
0059fb78      struct IDirect3DVertexBuffer9* m_primitiveVbuf = this->m_primitiveVbuf;
0059fb78      
0059fb80      if (m_primitiveVbuf != 0)
0059fb80      {
0059fb82          m_primitiveVbuf->vtable->Release(m_primitiveVbuf);
0059fb88          this->m_primitiveVbuf = nullptr;
0059fb80      }
0059fb80      
0059fb92      struct IDirect3DSwapChain9* m_pPrimarySwapChain = this->m_pPrimarySwapChain;
0059fb92      
0059fb9a      if (m_pPrimarySwapChain != 0)
0059fb9a      {
0059fb9c          m_pPrimarySwapChain->vtable->Release(m_pPrimarySwapChain);
0059fba2          this->m_pPrimarySwapChain = nullptr;
0059fb9a      }
0059fb9a      
0059fbac      struct IDirect3DTexture9* m_pSolidColorTexture = this->m_pSolidColorTexture;
0059fbac      
0059fbb4      if (m_pSolidColorTexture != 0)
0059fbb4      {
0059fbb6          m_pSolidColorTexture->vtable->Release(m_pSolidColorTexture);
0059fbbc          this->m_pSolidColorTexture = nullptr;
0059fbb4      }
0059fb70  }

0059fbc8                          90 90 90 90 90 90 90 90                                                          ........

0059fbd0  void __fastcall RenderDeviceD3D::SetupDisplayAspectRatio(class RenderDeviceD3D* this)

0059fbd0  {
0059fbd0      uint32_t AspectRatio = Render::m_RenderPrefs.AspectRatio;
0059fbd0      
0059fbdc      if (AspectRatio == 1)
0059fbdc      {
0059fc33          this->m_DisplayAspectRatio = 1.33333337f;
0059fc41          return;
0059fbdc      }
0059fbdc      
0059fbdf      if (AspectRatio == 2)
0059fbdf      {
0059fc24          this->m_DisplayAspectRatio = 1.77777779f;
0059fc32          return;
0059fbdf      }
0059fbdf      
0059fbe1      uint32_t eax_2 = RenderDevice::GetDisplayWidth(this);
0059fbec      long double x87_r7 = ((long double)eax_2);
0059fbec      
0059fbf0      if (eax_2 < 0)
0059fbf2          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
0059fbf2      
0059fbfe      uint32_t eax_3 = RenderDevice::GetDisplayHeight(this);
0059fc09      long double x87_r7_1 = ((long double)eax_3);
0059fc09      
0059fc0d      if (eax_3 < 0)
0059fc0f          x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0059fc0f      
0059fc19      this->m_DisplayAspectRatio = ((float)(((long double)((float)x87_r7)) / x87_r7_1));
0059fbd0  }

0059fc42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0059fc50  void __thiscall RenderDeviceD3D::SetMipmapLODBiasForAllSamplers(class RenderDeviceD3D* this, float const arg2)

0059fc50  {
0059fc59      uint32_t esi = 0xf;
0059fc6a      uint32_t temp1_1;
0059fc6a      
0059fc6a      do
0059fc6a      {
0059fc64          RenderDeviceD3D::SetSamplerMipmapLODBias(this, esi, arg2);
0059fc69          temp1_1 = esi;
0059fc69          esi -= 1;
0059fc6a      } while ((temp1_1 - 1) >= 0);
0059fc50  }

0059fc72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0059fc80  void __fastcall RenderDeviceD3D::BeginScene(class RenderDeviceD3D* this)

0059fc80  {
0059fc80      class RenderDeviceD3D* this_1 = this;
0059fc80      
0059fc8c      if (this->m_bOpenScene == 0)
0059fc8c      {
0059fc8e          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
0059fc94          m_pDirect3DDevice->vtable->BeginScene(m_pDirect3DDevice);
0059fc9d          int32_t edx_1;
0059fc9d          edx_1 = this->m_WireframeMode;
0059fca3          char temp0_1 = edx_1;
0059fca3          edx_1 = -(edx_1);
0059fca7          this->m_bOpenScene = 1;
0059fcb4          RenderDeviceD3D::SetFillMode(this, ((edx_1 - edx_1) + 3));
0059fcb4          
0059fcc0          if (Render::m_RenderPrefs.TextureFiltering != 2)
0059fcd7              this_1 = *(int32_t*)((char*)Render::m_pRenderer + 0x98);
0059fcc0          else
0059fcc2              this_1 = 0xbfb33333;
0059fcc2          
0059fce1          uint32_t edi_1 = 0xf;
0059fcf0          uint32_t temp1_1;
0059fcf0          
0059fcf0          do
0059fcf0          {
0059fcea              RenderDeviceD3D::SetSamplerMipmapLODBias(this, edi_1, this_1);
0059fcef              temp1_1 = edi_1;
0059fcef              edi_1 -= 1;
0059fcf0          } while ((temp1_1 - 1) >= 0);
0059fc8c      }
0059fc80  }

0059fcf7                                                                       90 90 90 90 90 90 90 90 90                         .........

0059fd00  void __fastcall RenderDeviceD3D::EndScene(class RenderDeviceD3D* this)

0059fd00  {
0059fd0b      if (this->m_bOpenScene != 0)
0059fd0b      {
0059fd0d          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
0059fd13          m_pDirect3DDevice->vtable->EndScene(m_pDirect3DDevice);
0059fd1c          this->m_bOpenScene = 0;
0059fd0b      }
0059fd00  }

0059fd25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0059fd30  void __thiscall RenderDeviceD3D::Clear(class RenderDeviceD3D* this, uint32_t arg2, class RGBAColor const* arg3, float const arg4)

0059fd30  {
0059fd36      uint32_t m_viewportX = this->m_viewportX;
0059fd3c      uint32_t m_viewportY = this->m_viewportY;
0059fd42      uint32_t m_viewportWidth = this->m_viewportWidth;
0059fd4d      uint32_t m_viewportHeight = this->m_viewportHeight;
0059fd53      int32_t edi = 0;
0059fd6b      this->vtable->SetViewport(0, 0, this->m_presentation.Width, this->m_presentation.Height, 0);
0059fd79      arg3->g;
0059fd83      float b = arg3->b;
0059fd87      float eax_2;
0059fd87      eax_2 = arg2;
0059fd94      float a = arg3->a;
0059fd94      
0059fd98      if ((eax_2 & 1) != 0)
0059fd9a          edi = 1;
0059fd9a      
0059fda1      if ((eax_2 & 2) != 0)
0059fda1      {
0059fda3          float ecx_3;
0059fda3          ecx_3 = this->m_displayInfo.bStencilBuffer;
0059fda3          
0059fda8          if (ecx_3 != 0)
0059fdaa              edi |= 4;
0059fda1      }
0059fda1      
0059fdaf      if ((eax_2 & 4) != 0)
0059fdb1          edi |= 2;
0059fdb1      
0059fdb6      if (edi != 0)
0059fdb6      {
0059fd77          arg3->r;
0059fdcd          struct IDirect3DDevice9::VTable* vtable = this->m_pDirect3DDevice->vtable;
0059fe06          int32_t ebp_6 = (((((_ftol2() | 0x6600) << 8) | _ftol2()) << 8) | _ftol2());
0059fe15          vtable->Clear(this->m_pDirect3DDevice, 0, 0, edi, ebp_6, arg4, 0);
0059fdb6      }
0059fdb6      
0059fe25      this->vtable->SetViewport(m_viewportX, m_viewportY, m_viewportWidth, m_viewportHeight, 0);
0059fd30  }

0059fe42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0059fe50  void __fastcall RenderDeviceD3D::Flip(class RenderDeviceD3D* this)

0059fe50  {
0059fe58      struct tagRECT* edi = nullptr;
0059fe5a      struct tagRECT* ebx = nullptr;
0059fe5a      
0059fe5e      if (this->m_presentation.FullScreen == 0)
0059fe5e      {
0059fe60          edi = &this->m_PresentSourceRect;
0059fe66          ebx = &this->m_PresentDestRect;
0059fe5e      }
0059fe5e      
0059fe8e      int32_t i;
0059fe8e      
0059fe8e      do
0059fe8e      {
0059fe76          struct IDirect3DSwapChain9* m_pPrimarySwapChain = this->m_pPrimarySwapChain;
0059fe86          i = m_pPrimarySwapChain->vtable->Present(m_pPrimarySwapChain, edi, ebx, this->m_hPresentWindow, 0, 1);
0059fe8e      } while (i == 0x8876021c);
0059fe8e      
0059fe95      if (i == 0x88760868)
0059fe97          this->m_bDeviceLost = 1;
0059fe97      
0059feae      for (uint32_t i_1 = 0; i_1 < 8; i_1 += 1)
0059fea5          RenderDeviceD3D::SetStageTexture(this, i_1, nullptr);
0059fea5      
0059feb6      D3DPolyRender::ResetDynamicBuffers(Render::m_pRenderer);
0059febb      Profiler::ResetFrameStats();
0059fec8      this->m_nFrameStamp += 1;
0059fe50  }

0059fed1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0059fee0  void __thiscall RenderDeviceD3D::SetCurrentMaterial(class RenderDeviceD3D* this, class CMaterial const* arg2, uint8_t arg3)

0059fee0  {
0059fef0      class CMaterial* eax;
0059fef0      
0059fef0      if (arg2 == this->m_pCurrMaterial)
0059fef2          eax = arg3;
0059fef2      
0059fef8      if ((arg2 != this->m_pCurrMaterial || eax != 0))
0059fef8      {
0059fefc          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
0059ff02          this->m_pCurrMaterial = arg2;
0059ff08          struct IDirect3DDevice9::VTable* vtable = m_pDirect3DDevice->vtable;
0059ff08          
0059ff0a          if (arg2 != 0)
0059ff0a          {
0059ff11              vtable->SetMaterial(m_pDirect3DDevice, &arg2->d3d_material);
0059ff23              this->m_bMaterialAlphaMode = arg2->has_alpha != 0;
0059ff29              RenderDeviceD3D::SetFFDiffuseColorSource(this, FromMaterial);
0059ff32              RenderDeviceD3D::SetFFAmbientColorSource(this, FromMaterial);
0059ff39              return;
0059ff0a          }
0059ff0a          
0059ff44          vtable->SetMaterial(m_pDirect3DDevice, &this->m_defaultMaterial);
0059ff4e          this->m_bMaterialAlphaMode = 0;
0059ff55          RenderDeviceD3D::SetFFDiffuseColorSource(this, FromVertex);
0059ff5e          RenderDeviceD3D::SetFFAmbientColorSource(this, FromVertex);
0059fef8      }
0059fee0  }

0059ff68                          90 90 90 90 90 90 90 90                                                          ........

0059ff70  uint8_t __thiscall RenderDeviceD3D::SetSolidColorTextureColor(class RenderDeviceD3D* this, uint32_t arg2, uint8_t arg3)

0059ff70  {
0059ff83      uint32_t eax;
0059ff83      
0059ff83      if (this->m_currentSolidColor == arg2)
0059ff85          eax = arg3;
0059ff85      
0059ff8b      if ((this->m_currentSolidColor != arg2 || eax != 0))
0059ff8b      {
0059ff8d          struct IDirect3DTexture9* m_pSolidColorTexture = this->m_pSolidColorTexture;
0059ff8d          
0059ff95          if (m_pSolidColorTexture == 0)
0059ff95          {
0059ffad              m_pSolidColorTexture = 0;
0059ffb3              return 0;
0059ff95          }
0059ff95          
0059ffaa          void var_8;
0059ffaa          
0059ffaa          if (m_pSolidColorTexture->vtable->LockRect(m_pSolidColorTexture, 0, &var_8, 0, 0) < 0)
0059ffaa          {
0059ffad              m_pSolidColorTexture = 0;
0059ffb3              return 0;
0059ffaa          }
0059ffaa          
0059ffba          uint32_t* var_4;
0059ffba          *(uint32_t*)var_4 = arg2;
0059ffbc          this->m_currentSolidColor = arg2;
0059ffc2          struct IDirect3DTexture9* m_pSolidColorTexture_1 = this->m_pSolidColorTexture;
0059ffc8          m_pSolidColorTexture_1->vtable->UnlockRect(m_pSolidColorTexture_1, 0);
0059ff8b      }
0059ff8b      
0059ffd1      eax = 1;
0059ffd7      return 1;
0059ff70  }

0059ffda                                                                                90 90 90 90 90 90                            ......

0059ffe0  uint8_t __fastcall RenderDeviceD3D::SetDefaultDeviceStates(class RenderDeviceD3D* this)

0059ffe0  {
0059ffe8      this->m_bForceStates = 1;
0059ffef      RenderDeviceD3D::SetAlphaBlendEnable(this, 0);
0059fff7      RenderDeviceD3D::SetAlphaTestEnable(this, 0);
005a0000      RenderDeviceD3D::SetAlphaTestFunction(this, ALPHATESTFUNC_GREATEREQUAL);
005a0009      RenderDeviceD3D::SetAlphaTestRef(this, 1);
005a0016      RenderDeviceD3D::SetBlendFunction(this, BLEND_ONE, BLEND_ZERO, BLENDOP_ADD);
005a001f      RenderDeviceD3D::SetCullMode(this, CULLMODE_NONE);
005a0027      RenderDeviceD3D::SetDepthBias(this, 0f);
005a002f      RenderDeviceD3D::SetDepthBufferEnable(this, 0);
005a0039      RenderDeviceD3D::SetDepthBufferMode(this, DEPTHTEST_ALWAYS, 0);
005a0041      RenderDeviceD3D::SetFFAmbientColor32(this, 0);
005a004a      RenderDeviceD3D::SetFFDiffuseColorSource(this, FromVertex);
005a0053      RenderDeviceD3D::SetFFSpecularColorSource(this, FromVertex);
005a005b      RenderDeviceD3D::SetFFFogEnable(this, 0);
005a006d      RenderDeviceD3D::SetFFFogProperties(this, &RGBAColor_White, 0f, 1000f);
005a0075      RenderDeviceD3D::SetFFLighting(this, 0);
005a0075      
005a008d      for (uint32_t i = 0; i < 8; i += 1)
005a0084          RenderDeviceD3D::SetFFLightEnable(this, i, 0);
005a0084      
005a0092      RenderDeviceD3D::SetFFSpecularEnable(this, 0);
005a009a      RenderDeviceD3D::SetFFTextureFactor32(this, 0);
005a00a3      RenderDeviceD3D::SetFillMode(this, FILLMODE_SOLID);
005a00ac      RenderDeviceD3D::SetMultiSampleAntialias(this, 1);
005a00ac      
005a00d1      for (uint32_t i_1 = 0; i_1 < 0x10; i_1 += 1)
005a00d1      {
005a00ba          RenderDeviceD3D::SetSamplerAddressMode(this, i_1, TEXADDRESS_WRAP, TEXADDRESS_WRAP);
005a00c8          RenderDeviceD3D::SetSamplerFilterMode(this, i_1, TEXFILTER_LINEAR, TEXFILTER_LINEAR, TEXFILTER_POINT);
005a00d1      }
005a00d1      
005a010c      for (uint32_t i_2 = 0; i_2 < 8; i_2 += 1)
005a010c      {
005a00dc          RenderDeviceD3D::SetStageFFAlphaSource(this, i_2, TEXOP_DISABLE, 0, 0);
005a00e8          RenderDeviceD3D::SetStageFFColorSource(this, i_2, TEXOP_DISABLE, 0, 0);
005a00f1          RenderDeviceD3D::SetStageFFTexCoordIndex(this, i_2, i_2);
005a00fa          RenderDeviceD3D::SetStageFFTextureTransformFlags(this, i_2, 0);
005a0103          RenderDeviceD3D::SetStageTexture(this, i_2, nullptr);
005a010c      }
005a010c      
005a010e      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a0114      m_pDirect3DDevice->vtable->SetMaterial(m_pDirect3DDevice, &this->m_defaultMaterial);
005a0125      this->m_bMaterialAlphaMode = 0;
005a012b      this->m_ParticleState = 0;
005a0131      this->m_bForceStates = 0;
005a0137      this->m_State.pVertexBuffer = nullptr;
005a013e      int32_t eax;
005a013e      eax = 1;
005a0141      return 1;
0059ffe0  }

005a0142        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005a0150  void __thiscall RenderDeviceD3D::SetRenderTarget(class RenderDeviceD3D* this, uint32_t const arg2, class RenderSurface* arg3, class RenderSurface* arg4)

005a0150  {
005a015a      struct IDirect3DDevice9::VTable* vtable_1 = this->m_pDirect3DDevice->vtable;
005a0163      struct IDirect3DSurface9* eax_1 = RenderSurfaceD3D::GetDirect3DSurface(arg3);
005a0175      vtable_1->SetRenderTarget(this->m_pDirect3DDevice, arg2, eax_1);
005a0181      struct IDirect3DSurface9* eax_2;
005a0181      
005a0181      if (arg4 != 0)
005a0189          eax_2 = RenderSurfaceD3D::GetDirect3DSurface(arg4);
005a0181      else
005a0183          eax_2 = nullptr;
005a0183      
005a018e      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a0194      m_pDirect3DDevice->vtable->SetDepthStencilSurface(m_pDirect3DDevice, eax_2);
005a019e      arg3->vtable->AddRef();
005a019e      
005a01a7      if (arg4 != 0)
005a01a9          arg4->vtable->AddRef();
005a01a9      
005a01b0      class RenderSurface* m_pRenderTarget = this->m_pRenderTarget;
005a01b0      
005a01b8      if (m_pRenderTarget != 0)
005a01ba          m_pRenderTarget->vtable->Release();
005a01ba      
005a01bf      class RenderSurface* m_pDepthStencilTarget = this->m_pDepthStencilTarget;
005a01bf      
005a01c7      if (m_pDepthStencilTarget != 0)
005a01c9          m_pDepthStencilTarget->vtable->Release();
005a01c9      
005a01ce      struct RenderDeviceD3D::VTable* vtable = this->vtable;
005a01d0      this->m_pRenderTarget = arg3;
005a01d6      this->m_pDepthStencilTarget = arg4;
005a01dc      uint32_t width = arg3->width;
005a01e4      this->m_RenderTargetWidth = width;
005a01ea      uint32_t height = arg3->height;
005a01f8      this->m_RenderTargetHeight = height;
005a01fe      vtable->SetViewport(0, 0, width, height, 0);
005a0150  }

005a0207                       90 90 90 90 90 90 90 90 90                                                         .........

005a0210  class RenderSurface* __fastcall RenderDeviceD3D::GenerateSurfaceFromFrontBuffer(class RenderDeviceD3D* this)

005a0210  {
005a0216      int32_t* result = this->vtable->CreateSurface();
005a0216      
005a021d      if ((result != 0 && *(uint32_t*)(*(uint32_t*)result + 0x58)(this->m_nFrontBufferWidth, this->m_nFrontBufferHeight, 0x15, 0) != 0))
005a021d      {
005a0243          struct IDirect3DDevice9::VTable* vtable = this->m_pDirect3DDevice->vtable;
005a0247          struct IDirect3DSurface9* eax_4 = RenderSurfaceD3D::GetDirect3DSurface(result);
005a0256          int32_t eax_5 = vtable->GetFrontBufferData(this->m_pDirect3DDevice, 0, eax_4);
005a0256          
005a0266          if ((eax_5 == 0 || eax_5 != 0x88760868))
005a0278              return result;
005a0278          
005a0268          this->m_bDeviceLost = 1;
005a021d      }
005a021d      
005a0273      return 0;
005a0210  }

005a0279                                                                             90 90 90 90 90 90 90                           .......

005a0280  void __fastcall RenderDeviceD3D::EndRenderingDebugText(class RenderDeviceD3D* this)

005a0280  {
005a0280      class TextureBasedFont* m_pDebugFont = this->m_pDebugFont;
005a0280      
005a0288      if (m_pDebugFont == 0)
005a028f          return;
005a028f      
005a028a      /* tailcall */
005a028a      return TextureBasedFont::EndRenderingText(m_pDebugFont);
005a0280  }


005a0290  void __thiscall RenderDeviceD3D::RenderDebugText(class RenderDeviceD3D* this, int32_t const arg2, int32_t const arg3, char const* arg4, uint32_t const arg5)

005a0290  {
005a0290      class TextureBasedFont* m_pDebugFont = this->m_pDebugFont;
005a0290      
005a0298      if (m_pDebugFont != 0)
005a02b0          TextureBasedFont::RenderText(m_pDebugFont, arg2, arg3, arg4, arg5, 1);
005a0290  }

005a02b8                                                                          90 90 90 90 90 90 90 90                          ........

005a02c0  uint8_t __stdcall RenderDeviceD3D::RenderPrimitivesInHardware(class RenderDeviceD3D* this @ ecx, enum PrimType const arg2, uint32_t const arg3, class RenderVertexStreamD3D* arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7)

005a02c0  {
005a02d1      if (arg4->m_nStreamFrameID != arg5)
005a02d1      {
005a0342          uint32_t eax;
005a0342          eax = 0;
005a0345          return 0;
005a02d1      }
005a02d1      
005a02d4      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
005a02dc      struct IDirect3DVertexBuffer9* eax_1 = RenderVertexStreamD3D::GetD3DVertexBuffer(arg4);
005a02dc      
005a02e3      if (eax_1 != 0)
005a02e3      {
005a02e5          int32_t* ecx_1 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x468);
005a02f7          *(uint32_t*)(*(uint32_t*)ecx_1 + 0x190)(ecx_1, 0, eax_1, 0, arg4->m_VertexFormatInfo.size);
005a02e3      }
005a02e3      
005a0305      int32_t* eax_3 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
005a030f      *(uint32_t*)(*(uint32_t*)eax_3 + 0x164)(eax_3, arg4->m_VertexFormatInfo.format);
005a031e      int32_t* eax_5 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
005a0332      int32_t eax_6 = *(uint32_t*)(*(uint32_t*)eax_5 + 0x144)(eax_5, arg2, arg6, arg3);
005a0338      int32_t eax_7 = -(eax_6);
005a033f      return (((int8_t)(eax_7 - eax_7)) + 1);
005a02c0  }

005a0348                          90 90 90 90 90 90 90 90                                                          ........

005a0350  uint8_t __thiscall RenderDeviceD3D::RenderDynamicPrimitives(class RenderDeviceD3D* this, enum PrimType const arg2, uint32_t const arg3, void const* arg4, uint32_t const arg5)

005a0350  {
005a0350      class RenderDeviceD3D* this_1 = this;
005a0356      uint32_t const ebp = arg3;
005a035b      uint32_t esi = 0;
005a035b      
005a0366      if ((arg2 - 1) <= 5)
005a0368          switch (arg2)
005a0368          {
005a036f              case PRIMTYPE_POINTLIST:
005a036f              {
005a036f                  esi = ebp;
005a036f                  break;
005a036f              }
005a0373              case PRIMTYPE_LINELIST:
005a0373              {
005a0373                  esi = (ebp * 2);
005a0373                  break;
005a0373              }
005a0379              case PRIMTYPE_LINESTRIP:
005a0379              {
005a0379                  esi = (ebp + 1);
005a0379                  break;
005a0379              }
005a037e              case PRIMTYPE_TRIANGLELIST:
005a037e              {
005a037e                  esi = (ebp * 3);
005a037e                  break;
005a037e              }
005a0384              case PRIMTYPE_TRIANGLESTRIP:
005a0384              case PRIMTYPE_TRIANGLEFAN:
005a0384              {
005a0384                  esi = (ebp + 2);
005a0384                  break;
005a0384              }
005a0368          }
005a0368      
005a0398      class RenderVertexStreamD3D* edi = D3DPolyRender::ReferenceVertexStream(Render::m_pRenderer, arg5, esi);
005a0398      
005a039c      if (edi != 0)
005a039c      {
005a03b4          int32_t ebx;
005a03b4          ebx = 1;
005a03b4          
005a03bd          if (RenderVertexStreamD3D::FillData(edi, 0, esi, arg4, &edi->m_VertexFormatInfo, 0, &arg3) == 0)
005a03bf              ebx = 0;
005a03bf          
005a03ca          if (ebx != 0)
005a03f5              return RenderDeviceD3D::RenderPrimitivesInHardware(this, arg2, ebp, edi, edi->m_nStreamFrameID, arg3, esi) != 0;
005a039c      }
005a039c      
005a03ce      class RenderVertexStreamD3D* eax_3;
005a03ce      eax_3 = 0;
005a03d2      return 0;
005a0350  }

005a03f8  uint32_t jump_table_5a03f8[0x6] = 
005a03f8  {
005a03f8      [0x0] =  0x005a036f
005a03fc      [0x1] =  0x005a0373
005a0400      [0x2] =  0x005a0379
005a0404      [0x3] =  0x005a037e
005a0408      [0x4] =  0x005a0384
005a040c      [0x5] =  0x005a0384
005a0410  }

005a0410  HRESULT RenderDeviceD3D::DrawPrimitiveUP(enum _D3DPRIMITIVETYPE arg1, uint32_t arg2, void const* arg3, uint32_t arg4)

005a0410  {
005a0417      if (RenderDeviceD3D::s_bAllowDrawPrimitiveUP == 0)
005a0447          return 1;
005a0447      
005a0422      int32_t* eax_2 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
005a0441      return *(uint32_t*)(*(uint32_t*)eax_2 + 0x14c)(eax_2, arg1, arg2, arg3, arg4);
005a0410  }

005a0448                          90 90 90 90 90 90 90 90                                                          ........

005a0450  uint8_t __fastcall RenderDeviceD3D::GetFFFogEnable(class RenderDeviceD3D* this)

005a0450  {
005a0456      return this->m_State.FFFogEnable;
005a0450  }

005a0457                                                                       90 90 90 90 90 90 90 90 90                         .........

005a0460  uint8_t __fastcall RenderDeviceD3D::IsAvailableVideoMemoryLow(class RenderDeviceD3D* this)

005a0460  {
005a046d      int32_t eax;
005a046d      
005a046d      if (this->m_TotalVideoMemoryInBytes >= 0xc00000)
005a046d      {
005a046f          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a0478          eax = m_pDirect3DDevice->vtable->GetAvailableTextureMem(m_pDirect3DDevice);
005a0478          
005a0480          if (eax >= 0x1800000)
005a0496              return ((int8_t)-((eax - eax)));
005a046d      }
005a046d      
005a0482      eax = 1;
005a0485      return 1;
005a0460  }

005a0497                                                                       90 90 90 90 90 90 90 90 90                         .........

005a04a0  void __thiscall RenderDeviceD3D::InvalidateCachedTexturePointer(class RenderDeviceD3D* this, void* arg2)

005a04a0  {
005a04a4      int32_t* eax = &this->m_State.Stages;
005a04aa      int32_t i_1 = 8;
005a04be      int32_t i;
005a04be      
005a04be      do
005a04be      {
005a04b2          if (*(uint32_t*)eax == arg2)
005a04b4              *(uint32_t*)eax = 0;
005a04b4          
005a04ba          eax = &eax[9];
005a04bd          i = i_1;
005a04bd          i_1 -= 1;
005a04be      } while (i != 1);
005a04a0  }

005a04c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005a04d0  void __thiscall RenderDeviceD3D::InvalidateCachedVertexBufferPointer(class RenderDeviceD3D* this, void* arg2)

005a04d0  {
005a04da      if (this->m_State.pVertexBuffer == arg2)
005a04dc          this->m_State.pVertexBuffer = nullptr;
005a04d0  }

005a04e9                             90 90 90 90 90 90 90                                                           .......

005a04f0  void ACRender::backup_curr_state()

005a04f0  {
005a04f8      class CSurface** Render::curr_surfaces_1 = Render::curr_surfaces;
005a04fe      float Render::object_scale_1 = Render::object_scale;
005a0504      ACRender::back_curr_material = Render::curr_material;
005a0509      float x = Render::object_scale_vec.x;
005a050e      ACRender::back_curr_surfaces = Render::curr_surfaces_1;
005a0514      float y = Render::object_scale_vec.y;
005a051a      ACRender::back_object_scale = Render::object_scale_1;
005a0520      float z = Render::object_scale_vec.z;
005a0526      float x_1 = x;
005a052a      float y_1 = y;
005a052e      float z_1 = z;
005a0532      ACRender::back_object_scale_vec.x = x;
005a0537      enum Render::LightingType Render::lighting_type_1 = Render::lighting_type;
005a053c      ACRender::back_object_scale_vec.y = y;
005a0542      struct portal_view_type* Render::PortalList_1 = Render::PortalList;
005a0548      ACRender::back_object_scale_vec.z = z;
005a054e      struct view_type* Render::portal_view_1 = Render::portal_view;
005a0554      ACRender::back_lighting_type = Render::lighting_type_1;
005a0559      int32_t Render::portal_view_num_1 = Render::portal_view_num;
005a055e      ACRender::BackupList = Render::PortalList_1;
005a0564      class CSurface* Render::curr_detail_surface_1 = Render::curr_detail_surface;
005a056a      ACRender::backup_view = Render::portal_view_1;
005a0570      float Render::curr_detail_tiling_1 = Render::curr_detail_tiling;
005a0576      ACRender::backup_view_num = Render::portal_view_num_1;
005a057b      ACRender::backup_detail_surface = Render::curr_detail_surface_1;
005a0581      ACRender::backup_detail_tiling = Render::curr_detail_tiling_1;
005a04f0  }

005a058b                                   90 90 90 90 90                                                             .....

005a0590  void ACRender::restore_curr_state()

005a0590  {
005a0590      int32_t esi;
005a0590      int32_t var_4 = esi;
005a0591      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
005a0597      int32_t eax = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e4);
005a059d      int32_t edi;
005a059d      int32_t var_8 = edi;
005a059d      int32_t* esp_1 = &var_8;
005a059e      class CMaterial* ACRender::back_curr_material_1 = ACRender::back_curr_material;
005a059e      
005a05a6      if (ACRender::back_curr_material_1 != eax)
005a05a6      {
005a05aa          int32_t* eax_1 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x468);
005a05b0          *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e4) = ACRender::back_curr_material_1;
005a05b6          int32_t ecx_1 = *(uint32_t*)eax_1;
005a05b8          enum ColorSource var_10_3;
005a05b8          struct _D3DMATERIAL9* var_c;
005a05b8          
005a05b8          if (ACRender::back_curr_material_1 == 0)
005a05b8          {
005a05e6              var_c = ((char*)RenderDevice::render_device_1 + 0x79c);
005a05e8              *(uint32_t*)(ecx_1 + 0xc4)(eax_1);
005a05ee              int32_t var_10_5 = 1;
005a05f2              *(int32_t*)((char*)RenderDevice::render_device_1 + 0x794) = 0;
005a05f9              RenderDeviceD3D::SetFFDiffuseColorSource(RenderDevice::render_device_1, FromVertex);
005a05fe              var_10_3 = FromVertex;
005a05b8          }
005a05b8          else
005a05b8          {
005a05bd              var_c = &ACRender::back_curr_material_1->d3d_material;
005a05bf              *(uint32_t*)(ecx_1 + 0xc4)(eax_1);
005a05cd              int32_t var_10_2 = 0;
005a05d1              *(int32_t*)((char*)RenderDevice::render_device_1 + 0x794) = ACRender::back_curr_material_1->has_alpha != 0;
005a05d7              RenderDeviceD3D::SetFFDiffuseColorSource(RenderDevice::render_device_1, FromMaterial);
005a05dc              var_10_3 = FromMaterial;
005a05b8          }
005a05b8          
005a0602          RenderDeviceD3D::SetFFAmbientColorSource(RenderDevice::render_device_1, var_10_3);
005a0602          esp_1 = &var_c;
005a05a6      }
005a05a6      
005a0613      class CSurface** ACRender::back_curr_surfaces_1 = ACRender::back_curr_surfaces;
005a0618      Render::object_scale = ACRender::back_object_scale;
005a061e      float z = ACRender::back_object_scale_vec.z;
005a0624      Render::object_scale_vec.x = ACRender::back_object_scale_vec.x;
005a062a      enum Render::LightingType ACRender::back_lighting_type_1 = ACRender::back_lighting_type;
005a0630      Render::curr_surfaces = ACRender::back_curr_surfaces_1;
005a0635      float y = ACRender::back_object_scale_vec.y;
005a063a      Render::object_scale_vec.z = z;
005a0640      int32_t ACRender::backup_view_num_1 = ACRender::backup_view_num;
005a0646      Render::lighting_type = ACRender::back_lighting_type_1;
005a064c      struct view_type* ACRender::backup_view_1 = ACRender::backup_view;
005a0652      Render::object_scale_vec.y = y;
005a0657      struct portal_view_type* ACRender::BackupList_1 = ACRender::BackupList;
005a065c      *(uint32_t*)((char*)esp_1 - 4) = ACRender::backup_view_num_1;
005a065d      *(uint32_t*)((char*)esp_1 - 8) = ACRender::backup_view_1;
005a065e      Render::PortalList = ACRender::BackupList_1;
005a0663      Render::set_view();
005a066d      float ACRender::backup_detail_tiling_1 = ACRender::backup_detail_tiling;
005a0676      *(uint32_t*)esp_1;
005a0677      Render::curr_detail_surface = ACRender::backup_detail_surface;
005a067c      Render::curr_detail_tiling = ACRender::backup_detail_tiling_1;
005a065c      esp_1[1];
005a0590  }

005a0684              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005a0690  void __stdcall RenderDeviceD3D::UpdateObjCell(class RenderDeviceD3D const* this @ ecx, class CObjCell* arg2)

005a0690  {
005a0694      class CObjCell* esi = arg2;
005a0694      
005a06a0      if (esi->num_shadow_objects > 0)
005a06a0      {
005a06b0          float var_c;
005a06a6          esi->vtable->GetViewerDistance(&var_c);
005a06b3          long double x87_r0;
005a06b3          arg2 = ((float)x87_r0);
005a06b7          long double temp1_1 = ((long double)50f);
005a06b7          (x87_r0 - temp1_1);
005a06bd          int32_t i = 0;
005a06c4          uint32_t num_shadow_objects = esi->num_shadow_objects;
005a06c4          
005a06ca          if ((*(uint8_t*)((char*)((((x87_r0 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r0 == temp1_1) ? 1 : 0) << 0xe) | 0x800)))))[1] & 0x41) == 0)
005a06ca          {
005a06d4              long double x87_r0_2 = (((long double)1f) / ((long double)arg2));
005a06de              var_c = ((float)(((long double)var_c) * x87_r0_2));
005a06e8              float var_8;
005a06e8              float var_8_1 = ((float)(((long double)var_8) * x87_r0_2));
005a06f0              float var_4;
005a06f0              float var_4_1 = ((float)(x87_r0_2 * ((long double)var_4)));
005a06f0              
005a06f4              if (num_shadow_objects > 0)
005a06f4              {
005a0720                  do
005a0720                  {
005a0712                      CPhysicsObj::UpdateViewerDistance(esi->shadow_object_list.data[i]->physobj, arg2, &var_c);
005a071d                      i += 1;
005a0720                  } while (i < esi->num_shadow_objects);
005a06f4              }
005a06ca          }
005a06ca          else if (num_shadow_objects > 0)
005a072d          {
005a074a              do
005a074a              {
005a073c                  CPhysicsObj::UpdateViewerDistance(esi->shadow_object_list.data[i]->physobj);
005a0747                  i += 1;
005a074a              } while (i < esi->num_shadow_objects);
005a072d          }
005a06a0      }
005a0690  }

005a06fd                                                                                         8d 49 00                               .I.
005a0754                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a0760  void __thiscall RenderDeviceD3D::DrawObjCellForDummies(class RenderDeviceD3D const* this, class CObjCell* arg2)

005a0760  {
005a0769      RenderDeviceD3D::UpdateObjCell(this, arg2);
005a0770      struct CPartCell::VTable** eax;
005a0770      
005a0770      if (arg2 == 0)
005a0777          eax = nullptr;
005a0770      else
005a0772          eax = &arg2->vtable;
005a0772      
005a0779      uint32_t num_shadow_parts = ADJ(eax)->num_shadow_parts;
005a0779      
005a077f      if (num_shadow_parts > 1)
005a0786          CShadowPart::insertion_sort(&eax[2], num_shadow_parts);
005a0786      
005a078e      this->vtable->DrawObjCell(arg2);
005a0760  }

005a079b                                                                                   90 90 90 90 90                             .....

005a07a0  void __stdcall RenderDeviceD3D::DrawPartCell(class RenderDeviceD3D const* this @ ecx, uint32_t arg2, class CPartCell* arg3, uint32_t arg4)

005a07a0  {
005a07a6      Render::curr_detail_surface = nullptr;
005a07b3      int32_t i = 0;
005a07b3      
005a07b7      if (arg3->num_shadow_parts > 0)
005a07b7      {
005a07d6          do
005a07d6          {
005a07c3              class CShadowPart* ecx = arg3->shadow_part_list.data[i];
005a07c3              
005a07c8              if (ecx != 0)
005a07c8              {
005a07ca                  uint32_t var_10_1 = arg4;
005a07cb                  uint32_t edx = CShadowPart::draw(ecx, edx);
005a07c8              }
005a07c8              
005a07d3              i += 1;
005a07d6          } while (i < arg3->num_shadow_parts);
005a07b7      }
005a07a0  }

005a07de                                                                                            90 90                                ..

005a07e0  void __thiscall RenderDeviceD3D::DrawBuildingLeaf(class RenderDeviceD3D const* this, uint32_t arg2)

005a07e0  {
005a07ea      void* eax = CBuildingObj::curr_leaf_cells[arg2];
005a07ea      
005a07f9      if ((eax != 0 && *(uint32_t*)((char*)eax + 4) > 0))
005a07f9      {
005a07fb          Render::m_pRenderer->vtable->polyListFinishInternal();
005a0806          Render::PolyNext = &Render::PolyList;
005a0810          ACRender::backup_curr_state();
005a0815          class CPartCell** CBuildingObj::curr_leaf_cells_1 = CBuildingObj::curr_leaf_cells;
005a081a          class Position* CBuildingObj::curr_pos_1 = CBuildingObj::curr_pos;
005a0820          Render::pushLevelOffset = 1;
005a0835          RenderDeviceD3D::DrawPartCell(this, CBuildingObj::curr_pos_1->objcell_id, CBuildingObj::curr_leaf_cells_1[arg2], arg2);
005a083a          Render::pushLevelOffset = 0;
005a0844          ACRender::restore_curr_state();
005a0849          Render::obj_view_set();
005a07f9      }
005a07e0  }

005a0853                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005a0860  enum ObjectDrawStatus __thiscall RenderDeviceD3D::DrawMesh(class RenderDeviceD3D const* this, class CGfxObj* arg2, class Position const* arg3, uint8_t arg4)

005a0860  {
005a086b      int32_t result = 0;
005a086e      bool cond:0 = Render::PortalList == 0;
005a087b      Render::lighting_type = FULL_LIGHTING;
005a087b      
005a0887      if (cond:0)
005a0887      {
005a0994          Render::positionPush(1, arg3);
005a09a4          enum BoundingType eax_8;
005a09a4          int80_t st0_1;
005a09a4          st0_1 = Render::viewconeCheck(arg2->drawing_sphere);
005a09a4          
005a09b0          if (eax_8 != OUTSIDE)
005a09b0          {
005a09b5              Render::positionPush(2, nullptr);
005a09bb              Render::GfxObjUnderSelectionRay(arg2);
005a09cc              RenderDeviceD3D::DrawMeshInternal(this, arg2, arg4, eax_8);
005a09d7              Render::framePop();
005a09e5              return 2;
005a09b0          }
005a09b0          
005a09ee          if (arg4 != 0)
005a09ee          {
005a09f4              Render::positionPush(2, nullptr);
005a0a04              RenderDeviceD3D::DrawMeshInternal(this, arg2, arg4, OUTSIDE);
005a0a13              Render::framePop();
005a0a21              return 2;
005a09ee          }
005a09ee          
005a097e          result = 1;
005a0887      }
005a0887      else
005a0887      {
005a088d          int32_t var_8_1 = 0;
005a0891          Render::positionPush(1, arg3);
005a0896          struct portal_view_type* Render::PortalList_1 = Render::PortalList;
005a089f          int32_t i = 0;
005a08a6          arg3 = nullptr;
005a08aa          int32_t i_1 = 0;
005a08aa          
005a08ae          if (Render::PortalList_1->view_count > 0)
005a08ae          {
005a096f              do
005a096f              {
005a08c0                  int32_t RenderDeviceD3D::building_view_1 = RenderDeviceD3D::building_view;
005a08c0                  
005a08cd                  if ((RenderDeviceD3D::building_view_1 == 0xffffffff || RenderDeviceD3D::building_view_1 == i))
005a08cd                  {
005a08d8                      Render::set_view(&Render::PortalList_1->view, i);
005a08e4                      enum BoundingType eax_3 = Render::viewconeCheck(arg2->drawing_sphere);
005a08e4                      /* unimplemented  {call Render::viewconeCheck} */;
005a08f0                      int16_t top;
005a08f0                      
005a08f0                      if (eax_3 == OUTSIDE)
005a08f0                      {
005a092a                          if (arg4 != 0)
005a092a                          {
005a0930                              Render::positionPush(2, nullptr);
005a0940                              RenderDeviceD3D::DrawMeshInternal(this, arg2, arg4, OUTSIDE);
005a0940                              top -= 1;
005a0940                              /* unimplemented  {call RenderDeviceD3D::DrawMeshInternal} */;
005a0940                              
005a0947                              if (2 > result)
005a0949                                  result = 2;
005a092a                          }
005a092a                          else if (result < 1)
005a0952                              result = 1;
005a0952                          
005a0957                          arg3 = (&arg3->vtable + 1);
005a08f0                      }
005a08f0                      else
005a08f0                      {
005a08f8                          if (var_8_1 == 0)
005a08f8                          {
005a08fe                              Render::positionPush(2, nullptr);
005a0904                              Render::GfxObjUnderSelectionRay(arg2);
005a0904                              /* unimplemented  {call Render::GfxObjUnderSelectionRay} */;
005a090c                              var_8_1 = 1;
005a08f8                          }
005a08f8                          
005a091b                          RenderDeviceD3D::DrawMeshInternal(this, arg2, arg4, eax_3);
005a091b                          top -= 1;
005a091b                          /* unimplemented  {call RenderDeviceD3D::DrawMeshInternal} */;
005a091b                          
005a0922                          if (2 > result)
005a0924                              result = 2;
005a08f0                      }
005a08cd                  }
005a08cd                  
005a095f                  Render::PortalList_1 = Render::PortalList;
005a0968                  i = (i_1 + 1);
005a096b                  i_1 = i;
005a096f              } while (i < Render::PortalList_1->view_count);
005a08ae          }
005a08ae          
005a097c          if (arg3 == Render::PortalList_1->view_count)
005a097e              result = 1;
005a0887      }
005a0887      
005a0983      Render::framePop();
005a0991      return result;
005a0860  }

005a0a24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005a0a30  uint8_t __fastcall RenderDeviceD3D::GetD3DResources(class RenderDeviceD3D* this)

005a0a30  {
005a0a3a      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a0a46      int32_t var_8;
005a0a40      m_pDirect3DDevice->vtable->GetRenderTarget(m_pDirect3DDevice, 0, &var_8);
005a0a50      class RenderSurface* eax_1 = this->vtable->CreateSurface();
005a0a53      int32_t ecx_2 = var_8;
005a0a5b      this->m_pFrameBufferSurface = eax_1;
005a0a5b      
005a0a6b      if (*(int32_t*)((char*)eax_1->vtable + 0x70)(ecx_2, 0, 1) != 0)
005a0a6b      {
005a0a6d          class RenderSurface* m_pFrameBufferSurface = this->m_pFrameBufferSurface;
005a0a75          struct GraphicsResource::VTable** eax_3;
005a0a75          
005a0a75          if (m_pFrameBufferSurface == 0)
005a0a7c              eax_3 = nullptr;
005a0a75          else
005a0a77              eax_3 = &m_pFrameBufferSurface->vtable;
005a0a77          
005a0a7f          GraphicsResource::UnlinkResource(eax_3);
005a0a84          class RenderSurface* m_pFrameBufferSurface_1 = this->m_pFrameBufferSurface;
005a0a8a          this->m_pRenderTarget = m_pFrameBufferSurface_1;
005a0a90          m_pFrameBufferSurface_1->vtable->AddRef();
005a0a98          class RenderSurface* m_pRenderTarget = this->m_pRenderTarget;
005a0aa4          this->m_RenderTargetWidth = m_pRenderTarget->width;
005a0ab0          struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a0ab6          this->m_RenderTargetHeight = m_pRenderTarget->height;
005a0ac4          int32_t var_4;
005a0abc          m_pDirect3DDevice_1->vtable->GetDepthStencilSurface(m_pDirect3DDevice_1, &var_4);
005a0ace          class RenderSurface* eax_5 = this->vtable->CreateSurface();
005a0ad1          int32_t ecx_7 = var_4;
005a0ad9          this->m_pDepthStencilSurface = eax_5;
005a0ad9          
005a0ae9          if (*(int32_t*)((char*)eax_5->vtable + 0x70)(ecx_7, 0, 1) != 0)
005a0ae9          {
005a0af2              class RenderSurface* m_pDepthStencilSurface = this->m_pDepthStencilSurface;
005a0afa              struct GraphicsResource::VTable** eax_6;
005a0afa              
005a0afa              if (m_pDepthStencilSurface == 0)
005a0b01                  eax_6 = nullptr;
005a0afa              else
005a0afc                  eax_6 = &m_pDepthStencilSurface->vtable;
005a0afc              
005a0b04              GraphicsResource::UnlinkResource(eax_6);
005a0b09              class RenderSurface* m_pDepthStencilSurface_1 = this->m_pDepthStencilSurface;
005a0b0f              this->m_pDepthStencilTarget = m_pDepthStencilSurface_1;
005a0b15              m_pDepthStencilSurface_1->vtable->AddRef();
005a0b1d              struct IDirect3DDevice9* m_pDirect3DDevice_2 = this->m_pDirect3DDevice;
005a0b23              m_pDirect3DDevice_2->vtable->GetSwapChain(m_pDirect3DDevice_2, 0, &this->m_pPrimarySwapChain);
005a0b32              struct IDirect3DDevice9* m_pDirect3DDevice_3 = this->m_pDirect3DDevice;
005a0b38              m_pDirect3DDevice_3->vtable->CreateTexture(m_pDirect3DDevice_3, 1, 1, 1, 0, 0x15, 1, &this->m_pSolidColorTexture, 0);
005a0b5c              RenderDeviceD3D::SetSolidColorTextureColor(this, 0xff000000, 1);
005a0b61              int32_t eax_7;
005a0b61              eax_7 = 1;
005a0b67              return 1;
005a0ae9          }
005a0a6b      }
005a0a6b      
005a0af1      return 0;
005a0a30  }

005a0b68                          90 90 90 90 90 90 90 90                                                          ........

005a0b70  void __thiscall RenderDeviceD3D::SetGamma(class RenderDeviceD3D* this, float const arg2, uint8_t const arg3)

005a0b70  {
005a0b70      long double x87_r7 = ((long double)arg2);
005a0b7a      long double x87_r6 = ((long double)arg2);
005a0b82      long double temp1 = ((long double)1f);
005a0b82      (x87_r6 - temp1);
005a0b82      
005a0b90      if ((*(uint8_t*)((char*)((((x87_r6 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
005a0b90      {
005a0ba3          (((long double)arg2) - ((long double)-0.200000003f));
005a0bab          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a0bab          
005a0bae          if (!(p_1))
005a0bb2              x87_r7 = ((long double)-0.200000003f);
005a0b90      }
005a0b90      else
005a0b94          x87_r7 = ((long double)1f);
005a0b94      
005a0bb9      this->m_gammaBrightnessVal = ((float)x87_r7);
005a0bbf      int32_t edi = 0;
005a0bc1      int32_t var_604 = 0;
005a0c1e      void var_600;
005a0c1e      int32_t ecx_1;
005a0c1e      
005a0c1e      for (int32_t i = 0; i < 0x100; )
005a0c1e      {
005a0bdc          int32_t eax_1 = _ftol2();
005a0be3          ecx_1 = (edi - eax_1);
005a0be3          
005a0be5          if ((edi - eax_1) < 0)
005a0be7              ecx_1 = 0;
005a0be5          else if (ecx_1 > 0xffff)
005a0bf3              ecx_1 = 0xffff;
005a0bf3          
005a0bf8          void var_200;
005a0bf8          *(uint16_t*)(&var_200 + (i << 1)) = ecx_1;
005a0c00          void var_400;
005a0c00          *(uint16_t*)(&var_400 + (i << 1)) = ecx_1;
005a0c08          edi += 0xff;
005a0c0e          *(uint16_t*)(&var_600 + (i << 1)) = ecx_1;
005a0c13          i += 1;
005a0c1a          var_604 = edi;
005a0c1e      }
005a0c1e      
005a0c39      if (((((int8_t)(this->m_D3DCaps.Caps2 >> 0x14)) & 1) == 0 || arg3 == 0))
005a0c3f          ecx_1 = 0;
005a0c39      else
005a0c3b          ecx_1 = 1;
005a0c3b      
005a0c41      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a0c4d      int32_t ebx_1;
005a0c4d      ebx_1 = ecx_1 != 0;
005a0c47      m_pDirect3DDevice->vtable->SetGammaRamp(m_pDirect3DDevice, 0, ebx_1, &var_600);
005a0b70  }

005a0bc9                             8d a4 24 00 00 00 00                                                           ..$....
005a0c67                       90 90 90 90 90 90 90 90 90                                                         .........

005a0c70  void __thiscall RenderDeviceD3D::SetupState(class RenderDeviceD3D* this, class MaterialLayer const* arg2, class MaterialLayer const* arg3, uint32_t const arg4, class RGBAColor const* arg5, class RGBAColor const* arg6, uint8_t const arg7)

005a0c70  {
005a0c7e      class MaterialLayer* edi = arg3;
005a0c82      uint32_t m_num_1 = edi->m_Stages.m_num;
005a0c85      class RenderDeviceD3D* this_1 = this;
005a0c87      class RenderDeviceD3D* this_2 = this_1;
005a0c87      
005a0c8f      if (((*(uint8_t*)$S225) & 1) == 0)
005a0c91          $S225 |= 1;
005a0c91      
005a0ca0      MGStates.AmbientLight.r = this_1->m_GState.AmbientLight.r;
005a0caf      MGStates.AmbientLight.g = this_1->m_GState.AmbientLight.g;
005a0cb8      MGStates.AmbientLight.b = this_1->m_GState.AmbientLight.b;
005a0cc1      float* eax_1 = arg6;
005a0cc5      MGStates.AmbientLight.a = this_1->m_GState.AmbientLight.a;
005a0cd2      MGStates.AmbientLight.r = ((float)(((long double)MGStates.AmbientLight.r) + ((long double)*(uint32_t*)eax_1)));
005a0ce1      MGStates.AmbientLight.g = ((float)(((long double)MGStates.AmbientLight.g) + ((long double)eax_1[1])));
005a0cf0      MGStates.AmbientLight.b = ((float)(((long double)MGStates.AmbientLight.b) + ((long double)eax_1[2])));
005a0cf6      RGBAColor::CapHigh(&MGStates.AmbientLight);
005a0d06      int32_t var_68 = *(int32_t*)((char*)Timer::local_time + 4);
005a0d0e      Waveform::GetValue(&edi->m_wSpecularPower, (*(uint32_t*)Timer::local_time));
005a0d13      long double x87_r0;
005a0d13      MGStates.MaterialSpecularPower = ((float)x87_r0);
005a0d24      int32_t var_68_1 = *(int32_t*)((char*)Timer::local_time + 4);
005a0d29      Waveform::GetValue(&edi->m_AlphaTestRef, (*(uint32_t*)Timer::local_time));
005a0d39      MGStates.MaterialAlphaTestRef = _ftol2();
005a0d43      MGStates.MaterialDiffuseColor.r = edi->m_cDiffuse.r;
005a0d52      MGStates.MaterialDiffuseColor.g = edi->m_cDiffuse.g;
005a0d5a      MGStates.MaterialDiffuseColor.b = edi->m_cDiffuse.b;
005a0d63      float* ecx_6 = arg5;
005a0d67      MGStates.MaterialDiffuseColor.a = edi->m_cDiffuse.a;
005a0d6e      MGStates.MaterialDiffuseColor.r = ((float)(((long double)MGStates.MaterialDiffuseColor.r) * ((long double)*(uint32_t*)ecx_6)));
005a0d7d      MGStates.MaterialDiffuseColor.g = ((float)(((long double)MGStates.MaterialDiffuseColor.g) * ((long double)ecx_6[1])));
005a0d8c      MGStates.MaterialDiffuseColor.b = ((float)(((long double)MGStates.MaterialDiffuseColor.b) * ((long double)ecx_6[2])));
005a0d9b      MGStates.MaterialDiffuseColor.a = ((float)(((long double)MGStates.MaterialDiffuseColor.a) * ((long double)ecx_6[3])));
005a0da7      (((long double)MGStates.MaterialSpecularPower) - ((long double)0.5f));
005a0daf      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005a0db2      class RGBAColor* eax_7 = &RGBAColor_Black;
005a0db2      
005a0db7      if (p)
005a0db9          eax_7 = &edi->m_cSpecular;
005a0db9      
005a0dc1      MGStates.MaterialSpecularColor.r = eax_7->r;
005a0dd0      MGStates.MaterialSpecularColor.g = eax_7->g;
005a0dd9      MGStates.MaterialSpecularColor.b = eax_7->b;
005a0de2      MGStates.MaterialSpecularColor.a = eax_7->a;
005a0de9      MGStates.MaterialSpecularColor.r = ((float)(((long double)MGStates.MaterialSpecularColor.r) * ((long double)*(uint32_t*)ecx_6)));
005a0df8      MGStates.MaterialSpecularColor.g = ((float)(((long double)MGStates.MaterialSpecularColor.g) * ((long double)ecx_6[1])));
005a0e07      MGStates.MaterialSpecularColor.b = ((float)(((long double)MGStates.MaterialSpecularColor.b) * ((long double)ecx_6[2])));
005a0e1c      MGStates.MaterialSpecularColor.a = ((float)(((long double)MGStates.MaterialSpecularColor.a) * ((long double)ecx_6[3])));
005a0e24      MGStates.MaterialDyeColor.r = edi->m_cDye.r;
005a0e2d      MGStates.MaterialDyeColor.g = edi->m_cDye.g;
005a0e35      MGStates.MaterialDyeColor.b = edi->m_cDye.b;
005a0e3e      MGStates.MaterialDyeColor.a = edi->m_cDye.a;
005a0e4b      float eax_10;
005a0e4b      eax_10 = (((int8_t)edi->m_Options) & 2) == 2;
005a0e4e      MGStates.WantFFLighting = eax_10;
005a0e5e      MGStates.WantFFDyeColorInTFactor = (((int8_t)edi->m_Options) & 4) == 4;
005a0e6f      MGStates.WantFFVertexDiffuse = (((int8_t)edi->m_Options) & 0x20) == 0x20;
005a0e80      MGStates.WantFFVertexSpecular = (((int8_t)edi->m_Options) & 0x40) == 0x40;
005a0e86      MGStates.WantFFDistanceFog = 1;
005a0e86      
005a0e94      if (((edi->m_Options & 8) == 0 || eax_10 == 0))
005a0eb0          MGStates.WantFFSpecularLighting = 0;
005a0e94      else
005a0e94      {
005a0e96          long double x87_r1_19 = ((long double)MGStates.MaterialSpecularPower);
005a0e9c          MGStates.WantFFSpecularLighting = 1;
005a0ea3          long double temp2_1 = ((long double)0f);
005a0ea3          (x87_r1_19 - temp2_1);
005a0ea9          eax_10 = ((((x87_r1_19 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_19, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r1_19 == temp2_1) ? 1 : 0) << 0xe) | 0x1000))));
005a0ea9          
005a0eae          if ((*(uint8_t*)((char*)eax_10)[1] & 0x41) != 0)
005a0eb0              MGStates.WantFFSpecularLighting = 0;
005a0e94      }
005a0e94      
005a0ebd      int32_t* eax_11 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
005a0ec8      *(uint32_t*)(*(uint32_t*)eax_11 + 0x170)(eax_11, 0);
005a0ed9      RenderDeviceD3D::SetFFFogEnable(this_1, MGStates.WantFFDistanceFog);
005a0ee8      RenderDeviceD3D::SetFFLighting(this_1, MGStates.WantFFLighting);
005a0ef4      uint32_t ebx;
005a0ef4      
005a0ef4      if ((m_num_1 - 1) >= 0)
005a0ef4      {
005a0efa          ebx = (m_num_1 - 1);
005a1122          uint32_t temp5_1;
005a1122          
005a1122          do
005a1122          {
005a0f03              void* eax_13 = edi->m_Stages.m_data[ebx];
005a0f06              int32_t esi_1 = *(uint32_t*)((char*)eax_13 + 0x40);
005a0f0f              int32_t eax_15 = (esi_1 & 0xff00);
005a0f14              uint32_t esi_2 = (esi_1 & 0xffff00ff);
005a0f1c              arg3 = 0;
005a0f21              arg5 = nullptr;
005a0f21              
005a0f29              if (eax_15 == 0)
005a0f29                  goto label_5a1193;
005a0f29              
005a0f34              int32_t var_34_1 = 0;
005a0f3c              int32_t var_38_1 = 0;
005a0f44              int32_t var_3c_1 = 0;
005a0f4c              int32_t var_24_1 = 0;
005a0f54              int32_t var_28_1 = 0;
005a0f5c              int32_t var_30_1 = 0;
005a0f64              int32_t var_14_1 = 0;
005a0f6c              int32_t var_1c_1 = 0;
005a0f74              int32_t var_20_1 = 0;
005a0f7c              int32_t var_8_1 = 0;
005a0f84              int32_t var_c_1 = 0;
005a0f8c              int32_t var_10_1 = 0;
005a0f94              int32_t var_4_1 = 0x3f800000;
005a0f9c              int32_t var_18_1 = 0x3f800000;
005a0fa4              int32_t var_2c_1 = 0x3f800000;
005a0fac              int32_t var_40 = 0x3f800000;
005a0fb4              arg3 = 1;
005a0fb9              esi_2 = ebx;
005a0fb9              
005a0fbb              if (eax_15 > 0x400)
005a0fbb              {
005a1178                  if (eax_15 != 0x500)
005a1178                  {
005a117f                      if (eax_15 != 0x600)
005a117f                          goto label_5a1193;
005a117f                      
005a1183                  label_5a1183:
005a1183                      esi_2 = (ebx | 0x10000);
005a1189                      goto label_5a1193;
005a1178                  }
005a1178                  
005a118d              label_5a118d:
005a118d                  esi_2 = (ebx | 0x30000);
005a1193              label_5a1193:
005a1193                  
005a1198                  if (eax_15 != 0x500)
005a1198                  {
005a11d3                      if (eax_15 != 0x600)
005a11d3                          goto label_5a0fee;
005a11d3                      
005a11d9                      int32_t var_34_3 = 0;
005a11e1                      int32_t var_38_3 = 0;
005a11e9                      int32_t var_3c_3 = 0;
005a11f1                      int32_t var_24_3 = 0;
005a11f9                      int32_t var_28_3 = 0;
005a1201                      int32_t var_30_3 = 0;
005a1209                      int32_t var_14_3 = 0;
005a1211                      int32_t var_1c_3 = 0;
005a1219                      int32_t var_20_3 = 0;
005a1221                      int32_t var_8_3 = 0;
005a1229                      int32_t var_c_3 = 0;
005a1231                      int32_t var_10_3 = 0;
005a1239                      int32_t var_4_3 = 0x3f800000;
005a1241                      int32_t var_18_3 = 0x3f800000;
005a1249                      int32_t var_2c_3 = 0x3f800000;
005a1251                      var_40 = 0x3f800000;
005a1259                      goto label_5a10d0;
005a1198                  }
005a1198                  
005a11a5                  Matrix4::Inverse(&var_40, &this_1->m_GState.WorldToViewMatrix);
005a11bd                  float x = Vector3_ZeroVector__.x;
005a11c1                  float y = Vector3_ZeroVector__.y;
005a11c5                  float z = Vector3_ZeroVector__.z;
005a10d0              label_5a10d0:
005a10d0                  int32_t* eax_20 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
005a10e2                  *(uint32_t*)(*(uint32_t*)eax_20 + 0xb0)(eax_20, (ebx + 0x10), &var_40);
005a10f1                  arg5 = 3;
005a10f1                  
005a10f9                  if (*(uint8_t*)((char*)eax_13 + 0x44) != 0)
005a10fb                      arg5 = 0x103;
005a0fbb              }
005a0fbb              else
005a0fbb              {
005a0fc1                  if (eax_15 != 0x400)
005a0fc1                  {
005a0fcc                      if (eax_15 == 0x100)
005a0fcc                          goto label_5a118d;
005a0fcc                      
005a0fd7                      if (eax_15 == 0x200)
005a0fd7                          goto label_5a1183;
005a0fd7                      
005a0fe2                      if (eax_15 != 0x300)
005a0fe2                          goto label_5a1193;
005a0fe2                      
005a0fe8                      esi_2 |= 0x20000;
005a0fe8                      goto label_5a0fee;
005a0fc1                  }
005a0fc1                  
005a1168                  esi_2 = (ebx | 0x40000);
005a0fee              label_5a0fee:
005a0fee                  uint32_t m_num = edi->m_FFModifiers.m_num;
005a0fee                  
005a0ff7                  if (m_num > 0)
005a0ff7                  {
005a0ffd                      int32_t var_34_2 = 0;
005a1005                      int32_t var_38_2 = 0;
005a100d                      int32_t var_3c_2 = 0;
005a1015                      int32_t var_24_2 = 0;
005a101d                      int32_t var_28_2 = 0;
005a1025                      int32_t var_30_2 = 0;
005a102d                      int32_t var_14_2 = 0;
005a1035                      int32_t var_1c_2 = 0;
005a103d                      int32_t var_20_2 = 0;
005a1045                      int32_t var_8_2 = 0;
005a104d                      int32_t var_c_2 = 0;
005a1055                      int32_t var_10_2 = 0;
005a105d                      int32_t var_4_2 = 0x3f800000;
005a1065                      int32_t var_18_2 = 0x3f800000;
005a106d                      int32_t var_2c_2 = 0x3f800000;
005a1075                      var_40 = 0x3f800000;
005a107d                      arg6 = nullptr;
005a107d                      
005a10bc                      do
005a10bc                      {
005a108c                          int32_t* ebp = edi->m_FFModifiers.m_data[arg6];
005a108c                          
005a1099                          if (*(uint32_t*)(*(uint32_t*)ebp + 4)() == ebx)
005a1099                          {
005a10a5                              arg3 = 1;
005a10aa                              *(uint32_t*)(*(uint32_t*)ebp + 0x18)(&var_40);
005a1099                          }
005a1099                          
005a10b8                          arg6 = (&arg6->r + 1);
005a10bc                      } while ((&arg6->r + 1) < m_num);
005a10bc                      
005a10be                      this_1 = this_2;
005a0ff7                  }
005a0ff7                  
005a10c2                  m_num = arg3;
005a10c2                  
005a10c8                  if (m_num != 0)
005a10c8                      goto label_5a10d0;
005a0fbb              }
005a0fbb              
005a110b              RenderDeviceD3D::SetStageFFTexCoordIndex(RenderDevice::render_device, ebx, esi_2);
005a111c              RenderDeviceD3D::SetStageFFTextureTransformFlags(RenderDevice::render_device, ebx, arg5);
005a1121              temp5_1 = ebx;
005a1121              ebx -= 1;
005a1122          } while ((temp5_1 - 1) >= 0);
005a0ef4      }
005a0ef4      
005a112b      ebx = edi->m_AlphaTest;
005a1130      enum BlendMode m_SourceBlend = edi->m_SourceBlend;
005a1133      enum BlendMode m_DestBlend = edi->m_DestBlend;
005a1139      arg5 = edi->m_DepthTest;
005a113d      enum DepthTestMode eax_22;
005a113d      eax_22 = edi->m_DepthWrite;
005a1140      arg3 = eax_22;
005a1140      
005a1156      if ((ebx != 0 || (m_SourceBlend == BLEND_SRCALPHA && (this_1->m_State.ColorWriteEnable & 8) == 0)))
005a1156      {
005a1260          arg6 = 1;
005a1260          
005a1265          if (ebx != 0)
005a1265          {
005a1267              long double x87_r1_21 = ((long double)MGStates.MaterialDiffuseColor.a);
005a126d              long double temp3_1 = ((long double)0.899999976f);
005a126d              (x87_r1_21 - temp3_1);
005a1273              eax_22 = ((((x87_r1_21 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_21, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r1_21 == temp3_1) ? 1 : 0) << 0xe) | 0x1000))));
005a1275              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a1275              
005a1278              if (!(p_1))
005a127a                  ebx = 0;
005a1265          }
005a1156      }
005a1156      else
005a115c          arg6 = 0;
005a115c      
005a127c      eax_22 = arg7;
005a127c      
005a1287      if ((eax_22 != 0 && m_DestBlend != BLEND_ONE))
005a1287      {
005a1289          ebx = 0;
005a128b          arg3 = 0;
005a1287      }
005a1287      
005a128f      eax_22 = this_1->m_caps.bDestinationAlpha;
005a128f      
005a1294      if (eax_22 == 0)
005a1294      {
005a1299          if (m_SourceBlend == BLEND_DSTALPHA)
005a129b              m_SourceBlend = BLEND_SRCALPHA;
005a1299          else if (m_SourceBlend == BLEND_INVDSTALPHA)
005a12a7              m_SourceBlend = BLEND_INVSRCALPHA;
005a12a7          
005a12af          if (m_DestBlend == BLEND_DSTALPHA)
005a12b1              m_DestBlend = BLEND_SRCALPHA;
005a12af          else if (m_DestBlend == BLEND_INVDSTALPHA)
005a12bd              m_DestBlend = BLEND_INVSRCALPHA;
005a1294      }
005a1294      
005a12c7      RenderDeviceD3D::SetBlendFunction(this_1, m_SourceBlend, m_DestBlend, edi->m_BlendOp);
005a12d8      RenderDeviceD3D::SetDepthBufferMode(this_1, arg5, arg3);
005a12e4      RenderDeviceD3D::SetAlphaTestEnable(this_1, arg6);
005a12ed      RenderDeviceD3D::SetAlphaTestFunction(this_1, ALPHATESTFUNC_GREATER);
005a12f8      char temp4 = ebx;
005a12f8      ebx = -(ebx);
005a1301      RenderDeviceD3D::SetAlphaTestRef(this_1, ((ebx - ebx) & MGStates.MaterialAlphaTestRef));
005a130e      enum CullModeType m_CullMode = edi->m_CullMode;
005a130e      
005a1311      if (this_1->m_ReverseCulling != 0)
005a1311      {
005a1316          if (m_CullMode == CULLMODE_CW)
005a1318              m_CullMode = CULLMODE_CCW;
005a1316          else if (m_CullMode == CULLMODE_CCW)
005a1324              m_CullMode = CULLMODE_CW;
005a1311      }
005a1311      
005a132c      RenderDeviceD3D::SetCullMode(this_1, m_CullMode);
005a133c      RenderDeviceD3D::SetFFSpecularEnable(this_1, MGStates.WantFFSpecularLighting);
005a1348      int32_t eax_28;
005a1348      int32_t esi_11;
005a1348      
005a1348      if (MGStates.WantFFDyeColorInTFactor != 0)
005a1348      {
005a134a          MGStates.MaterialDyeColor;
005a1356          int32_t eax_26 = _ftol2();
005a135b          MGStates.MaterialDyeColor;
005a136c          int32_t eax_27 = _ftol2();
005a1371          MGStates.MaterialDyeColor;
005a137f          esi_11 = (((eax_26 << 8) | eax_27) << 8);
005a1382          eax_28 = _ftol2();
005a1387          MGStates.MaterialDyeColor;
005a1348      }
005a1348      else if (MGStates.WantFFLighting == 0)
005a1399      {
005a13e0          MGStates.MaterialDiffuseColor;
005a13ec          int32_t eax_31 = _ftol2();
005a13f1          MGStates.MaterialDiffuseColor;
005a1402          int32_t eax_32 = _ftol2();
005a1407          MGStates.MaterialDiffuseColor;
005a1415          esi_11 = (((eax_31 << 8) | eax_32) << 8);
005a1418          eax_28 = _ftol2();
005a141d          MGStates.MaterialDiffuseColor;
005a1399      }
005a1399      else
005a1399      {
005a139b          MGStates.MaterialSpecularColor;
005a13a7          int32_t eax_29 = _ftol2();
005a13ac          MGStates.MaterialSpecularColor;
005a13bd          int32_t eax_30 = _ftol2();
005a13c2          MGStates.MaterialSpecularColor;
005a13d0          esi_11 = (((eax_29 << 8) | eax_30) << 8);
005a13d3          eax_28 = _ftol2();
005a13d8          MGStates.MaterialSpecularColor;
005a1399      }
005a1399      
005a1438      RenderDeviceD3D::SetFFTextureFactor32(this_1, (((esi_11 | eax_28) << 8) | _ftol2()));
005a143d      uint32_t ebx_3 = (m_num_1 - 1);
005a143d      
005a1443      if (ebx_3 >= 0)
005a1443      {
005a1474          uint32_t temp6_1;
005a1474          
005a1474          do
005a1474          {
005a1448              void* esi_21 = edi->m_Stages.m_data[ebx_3];
005a145a              RenderDeviceD3D::SetStageFFColorSource(this_1, ebx_3, *(uint32_t*)((char*)esi_21 + 0x28), *(uint32_t*)((char*)esi_21 + 0x2c), *(uint32_t*)((char*)esi_21 + 0x30));
005a146e              RenderDeviceD3D::SetStageFFAlphaSource(this_1, ebx_3, *(uint32_t*)((char*)esi_21 + 0x34), *(uint32_t*)((char*)esi_21 + 0x38), *(uint32_t*)((char*)esi_21 + 0x3c));
005a1473              temp6_1 = ebx_3;
005a1473              ebx_3 -= 1;
005a1474          } while ((temp6_1 - 1) >= 0);
005a1443      }
005a1443      
005a147d      if (m_num_1 < 8)
005a147d      {
005a1488          RenderDeviceD3D::SetStageFFColorSource(this_1, m_num_1, TEXOP_DISABLE, 2, 1);
005a1496          RenderDeviceD3D::SetStageFFAlphaSource(this_1, m_num_1, TEXOP_DISABLE, 2, 1);
005a147d      }
005a147d      
005a149b      uint32_t eax_36 = (m_num_1 - 1);
005a14a1      arg7 = eax_36;
005a14a1      
005a14a5      if (eax_36 >= 0)
005a14a5      {
005a14fd          uint32_t temp7_1;
005a14fd          
005a14fd          do
005a14fd          {
005a14b6              uint32_t ebx_4 = this_1->m_DefaultSamplerMappings.m_data[eax_36];
005a14b6              
005a14bc              if (ebx_4 != 0xffffffff)
005a14bc              {
005a14c1                  void* esi_23 = edi->m_Stages.m_data[ebx_4];
005a14cb                  RenderDeviceD3D::SetStageTexture(this_1, ebx_4, *(uint32_t*)((char*)esi_23 + 0xc));
005a14db                  RenderDeviceD3D::SetSamplerAddressMode(this_1, ebx_4, *(uint32_t*)((char*)esi_23 + 0x14), *(uint32_t*)((char*)esi_23 + 0x18));
005a14ef                  RenderDeviceD3D::SetSamplerFilterMode(this_1, ebx_4, *(uint32_t*)((char*)esi_23 + 0x1c), *(uint32_t*)((char*)esi_23 + 0x20), *(uint32_t*)((char*)esi_23 + 0x24));
005a14f4                  eax_36 = arg7;
005a14bc              }
005a14bc              
005a14f8              temp7_1 = eax_36;
005a14f8              eax_36 -= 1;
005a14f9              arg7 = eax_36;
005a14fd          } while ((temp7_1 - 1) >= 0);
005a14a5      }
005a0c70  }

005a14a9                             8d a4 24 00 00 00 00                                                           ..$....
005a1509                             90 90 90 90 90 90 90                                                           .......

005a1510  uint8_t __fastcall RenderDeviceD3D::InitDebugFont(class RenderDeviceD3D* this)

005a1510  {
005a1510      class RenderDeviceD3D* __return = this;
005a1515      class TextureBasedFont* m_pDebugFont_1 = this->m_pDebugFont;
005a1515      
005a1523      if (m_pDebugFont_1 != 0)
005a1523      {
005a1525          uint32_t m_cRef = m_pDebugFont_1->m_cRef;
005a1525          m_pDebugFont_1->m_cRef -= 1;
005a1525          
005a1528          if (m_cRef == 1)
005a152a              m_pDebugFont_1->vtable->__vecDelDtor(1);
005a152a          
005a151d          this->m_pDebugFont = nullptr;
005a1523      }
005a1523      
005a154a      class TextureBasedFont* m_pDebugFont;
005a154a      
005a154a      if (TextureBasedFont::CreateFromFont(&__return, 8, &this->m_pDebugFont)->vtable >= 0)
005a154a      {
005a154c          m_pDebugFont = this->m_pDebugFont;
005a154c          
005a1550          if (m_pDebugFont != 0)
005a1550          {
005a1552              m_pDebugFont->m_HorizontalSpacing = 8;
005a151d              this->m_pDebugFont->m_VerticalSpacing = 0xe;
005a1562              class TextureBasedFont* m_pDebugFont_2 = this->m_pDebugFont;
005a1567              this->m_DebugFontWidth = m_pDebugFont_2->m_HorizontalSpacing;
005a1570              this->m_DebugFontHeight = m_pDebugFont_2->m_VerticalSpacing;
005a1577              uint32_t eax_2;
005a1577              eax_2 = 1;
005a157b              return 1;
005a1550          }
005a154a      }
005a154a      
005a157d      m_pDebugFont = 0;
005a1581      return 0;
005a1510  }

005a1582        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005a1590  void __fastcall RenderDeviceD3D::BeginRenderingDebugText(class RenderDeviceD3D* this)

005a1590  {
005a159b      if ((this->m_pDebugFont == 0 && RenderDeviceD3D::InitDebugFont(this) == 0))
005a15b3          return;
005a15b3      
005a15ad      /* tailcall */
005a15ad      return TextureBasedFont::BeginRenderingText(this->m_pDebugFont);
005a1590  }

005a15b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a15c0  void __thiscall RenderDeviceD3D::RenderDynamicPrimitivesUsingMaterial(class RenderDeviceD3D* this, enum PrimType const arg2, uint32_t const arg3, void const* arg4, uint32_t const arg5, class RenderMaterial const* arg6, class RenderMaterial const* arg7, class RGBAColor const* arg8)

005a15c0  {
005a15d0      if (arg8->a == 0)
005a15d0      {
005a15d2          class RGBAColor* eax;
005a15d2          eax = 0;
005a15d7          return;
005a15d0      }
005a15d0      
005a15ee      char var_9 = 0;
005a15f3      int32_t* var_8 = nullptr;
005a1678      int32_t* eax_3;
005a1678      bool cond:0_1;
005a1678      
005a1678      do
005a1678      {
005a1611          eax_3 = *(uint8_t*)((((SceneTool::m_CachedMaterialConditions + 0x38) * 3) + var_8) + arg7);
005a1611          
005a1616          if (eax_3 == 0xff)
005a1616              break;
005a1616          
005a161e          eax_3 = (((uint32_t)eax_3) << 2);
005a1621          class MaterialLayer* ecx_3 = *(uint32_t*)((char*)eax_3 + arg7->layers.m_data);
005a1621          
005a162c          if (ecx_3->m_cDiffuse.a == 0)
005a162c              break;
005a162c          
005a1649          RenderDeviceD3D::SetupState(RenderDevice::render_device, *(uint32_t*)(arg6->layers.m_data + eax_3), ecx_3, arg5, arg8, &RGBAColor_Black, 0);
005a1649          
005a1665          if (RenderDeviceD3D::RenderDynamicPrimitives(this, arg2, arg3, arg4, arg5) != 0)
005a1667              var_9 = 1;
005a1667          
005a1671          cond:0_1 = ((char*)var_8 + 1) < 3;
005a1674          var_8 += 1;
005a1678      } while (cond:0_1);
005a167a      eax_3 = var_9;
005a15c0  }

005a15fd                                                                                         8d 49 00                               .I.
005a1688                          90 90 90 90 90 90 90 90                                                          ........

005a1690  void __fastcall RenderVertexBufferD3D::RenderVertexBufferD3D(class RenderVertexBufferD3D* this)

005a1690  {
005a1694      this->m_cRef = 1;
005a169b      this->vtable = 0x79afe8;
005a16a3      this->m_InfluencedBoneIndexArray.m_data = 0;
005a16a9      this->m_InfluencedBoneIndexArray.m_sizeAndDeallocate = 0;
005a16af      this->m_InfluencedBoneIndexArray.m_num = 0;
005a16b5      VertexArray::Begin(this);
005a16bc      this->vtable = 0x79affc;
005a16c2      RenderVertexBuffer::Begin(this);
005a16c7      this->vtable = 0x7e57bc;
005a16cd      __builtin_memset(&this->m_saDirtyVertices, 0, 0x18);
005a16f3      RenderVertexBufferD3D::Begin(this);
005a1690  }

005a16fd                                                                                         90 90 90                               ...

005a1700  void* __thiscall RenderVertexBufferD3D::`scalar deleting destructor'(class RenderVertexBufferD3D* this, uint32_t arg2)

005a1700  {
005a1703      RenderVertexBufferD3D::~RenderVertexBufferD3D(this);
005a1703      
005a170d      if ((arg2 & 1) != 0)
005a1710          operator delete(this);
005a1710      
005a171b      return this;
005a1700  }

005a171e                                                                                            90 90                                ..

005a1720  void __fastcall RenderVertexBufferD3D::~RenderVertexBufferD3D(class RenderVertexBufferD3D* this)

005a1720  {
005a1723      this->vtable = 0x7e57bc;
005a1729      RenderVertexBufferD3D::End(this);
005a1729      
005a173e      if ((this->m_saVertexStreams.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005a1747          operator delete[](this->m_saVertexStreams.m_data);
005a1747      
005a1761      if ((this->m_saDirtyVertices.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005a176a          operator delete[](this->m_saDirtyVertices.m_data);
005a176a      
005a1774      this->vtable = 0x79affc;
005a177a      RenderVertexBuffer::End(this);
005a1781      this->vtable = 0x79afe8;
005a1787      VertexArray::End(this);
005a1787      
005a179e      if ((this->m_InfluencedBoneIndexArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005a17a7          operator delete[](this->m_InfluencedBoneIndexArray.m_data);
005a17a7      
005a17af      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
005a1720  }

005a17b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005a17c0  void __thiscall RenderDeviceD3D::DrawBlock(class RenderDeviceD3D const* this, class CLandBlock* arg2)

005a17c0  {
005a17c5      int32_t i = 0;
005a17ee      Render::object_scale_vec.y = 1f;
005a17f9      Render::object_scale_vec.x = 0x3f800000;
005a17fe      Render::object_scale_vec.z = 1f;
005a1804      Render::object_scale = 1f;
005a180e      int32_t var_48 = 0x796910;
005a1816      int32_t var_44 = 0;
005a181a      int32_t var_40 = 0x3f800000;
005a1822      int32_t var_3c = 0;
005a1826      int32_t var_38 = 0;
005a182a      int32_t var_34 = 0;
005a182e      int32_t var_c = 0;
005a1832      int32_t var_8 = 0;
005a1836      int32_t var_4 = 0;
005a183a      Frame::cache(&var_40);
005a184d      uint32_t id = arg2->m_DID.id;
005a1851      Render::positionPush(3, &var_48);
005a1859      ACRender::curLandBlockVertexLighting = arg2->vertex_lighting;
005a185f      int32_t side_cell_count = arg2->side_cell_count;
005a185f      
005a186c      if ((side_cell_count * side_cell_count) > 0)
005a186c      {
005a18b6          int32_t side_cell_count_1;
005a18b6          
005a18b6          do
005a18b6          {
005a1876              class CObjCell* esi_1 = arg2->draw_array[i];
005a1876              
005a188c              if ((esi_1->vtable->IsInView() != 0 && esi_1->num_shadow_objects != 0))
005a188c              {
005a1891                  RenderDeviceD3D::UpdateObjCell(this, esi_1);
005a1896                  uint32_t num_shadow_parts = esi_1->num_shadow_parts;
005a1896                  
005a189c                  if (num_shadow_parts > 1)
005a18a3                      CShadowPart::insertion_sort(&esi_1->shadow_part_list, num_shadow_parts);
005a188c              }
005a188c              
005a18ab              side_cell_count_1 = arg2->side_cell_count;
005a18b3              i += 1;
005a18b6          } while (i < (side_cell_count_1 * side_cell_count_1));
005a186c      }
005a186c      
005a18b8      int32_t side_cell_count_3 = arg2->side_cell_count;
005a18c0      class CLandBlock* edx_2;
005a18c0      edx_2 = side_cell_count_3 == 8;
005a18c8      int32_t i_1 = 0;
005a18c8      
005a18d0      if ((side_cell_count_3 * side_cell_count_3) > 0)
005a18d0      {
005a1a1a          int32_t side_cell_count_2;
005a1a1a          
005a1a1a          do
005a1a1a          {
005a18f0              class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
005a18f0              
005a18fe              if (*(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e4) != 0)
005a18fe              {
005a1900                  int32_t* eax_6 = *(int32_t*)((char*)RenderDevice::render_device_1 + 0x468);
005a190d                  *(int32_t*)((char*)RenderDevice::render_device_1 + 0x7e4) = 0;
005a191a                  *(uint32_t*)(*(uint32_t*)eax_6 + 0xc4)(eax_6, ((char*)RenderDevice::render_device_1 + 0x79c));
005a1924                  *(int32_t*)((char*)RenderDevice::render_device_1 + 0x794) = 0;
005a192b                  RenderDeviceD3D::SetFFDiffuseColorSource(RenderDevice::render_device_1, FromVertex);
005a1934                  RenderDeviceD3D::SetFFAmbientColorSource(RenderDevice::render_device_1, FromVertex);
005a18fe              }
005a18fe              
005a194b              Render::SetSurfaceArray(CommandList::GetHead(CRegionDesc::current_region->terrain_info)->hold_run);
005a195c              Render::object_scale_vec.x = 0x3f800000;
005a1962              Render::object_scale_vec.y = 1f;
005a1968              Render::object_scale_vec.z = 1f;
005a196d              Render::object_scale = 1f;
005a197d              int32_t* esi_3 = arg2->draw_array[i_1];
005a197d              
005a198c              if (*(uint32_t*)(*(uint32_t*)esi_3 + 0x68)() != 0)
005a198c              {
005a1994                  if (edx_2 != 0)
005a1994                  {
005a199b                      float Render::landscape_detail_tiling_1 = Render::landscape_detail_tiling;
005a19a1                      Render::curr_detail_surface = Render::landscape_detail_surface;
005a19a6                      Render::curr_detail_tiling = Render::landscape_detail_tiling_1;
005a19ac                      Render::curr_detail_src_blend = 5;
005a19b6                      Render::curr_detail_dst_blend = 6;
005a1994                  }
005a1994                  
005a19c0                  this->vtable->DrawLandCell(esi_3);
005a19c8                  Render::curr_detail_surface = nullptr;
005a198c              }
005a198c              
005a19d9              int32_t eax_14;
005a19d9              
005a19d9              if (alwaysDrawObjects == 0)
005a19df                  eax_14 = *(uint32_t*)(*(uint32_t*)esi_3 + 0x68)();
005a19df              
005a19e4              if ((alwaysDrawObjects != 0 || eax_14 != 0))
005a19e4              {
005a19e6                  this->vtable->DrawSortCell(esi_3);
005a19ee                  long double x87_r7_1 = ((long double)flush);
005a19f4                  long double temp1_1 = ((long double)1f);
005a19f4                  (x87_r7_1 - temp1_1);
005a19fa                  int32_t eax_15;
005a19fa                  eax_15 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005a19fc                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
005a19fc                  
005a19ff                  if (!(p_1))
005a1a07                      D3DPolyRender::FlushAlphaList(flush);
005a19e4              }
005a19e4              
005a1a0f              side_cell_count_2 = arg2->side_cell_count;
005a1a17              i_1 += 1;
005a1a1a          } while (i_1 < (side_cell_count_2 * side_cell_count_2));
005a18d0      }
005a18d0      
005a1a20      ACRender::curLandBlockVertexLighting = nullptr;
005a1a2a      Render::framePop();
005a17c0  }

005a1a39                                                                             90 90 90 90 90 90 90                           .......

005a1a40  void __thiscall RenderDeviceD3D::DrawObjCell(class RenderDeviceD3D const* this, class CObjCell* arg2)

005a1a40  {
005a1a46      if (arg2 != 0)
005a1a46      {
005a1a52          RenderDeviceD3D::DrawPartCell(this, arg2->m_DID.id, &arg2->vtable, 0);
005a1a57          return;
005a1a46      }
005a1a46      
005a1a62      RenderDeviceD3D::DrawPartCell(this, arg2->m_DID.id, nullptr, 0);
005a1a40  }

005a1a6a                                90 90 90 90 90 90                                                            ......

005a1a70  class RenderVertexBuffer* RenderDeviceD3D::CreateVertexBuffer(class RenderDeviceD3D const* this @ ecx)

005a1a70  {
005a1a75      void* eax = operator new(0x164);
005a1a75      
005a1a7f      if (eax != 0)
005a1a7f      {
005a1a83          int32_t result = RenderVertexBufferD3D::RenderVertexBufferD3D(eax);
005a1a83          
005a1a8a          if (result != 0)
005a1a8e              return result;
005a1a7f      }
005a1a7f      
005a1a8c      return 0;
005a1a70  }

005a1a8f                                               90                                                                 .

005a1a90  void __fastcall RenderDeviceD3D::OnDeviceDisplayModeChange(class RenderDeviceD3D* this)

005a1a90  {
005a1a98      RenderDeviceD3D::SetupDisplayAspectRatio(this);
005a1a9f      RenderDeviceD3D::SetDefaultD3DStates(this);
005a1aa6      RenderDeviceD3D::SetDefaultDeviceStates(this);
005a1ab1      this->vtable->SetViewport(0, 0, this->m_presentation.Width, this->m_presentation.Height, 0);
005a1ac0      RenderUI::RecalculateClampedPosition();
005a1ac0      
005a1aca      if (this->m_presentation.FullScreen != 0)
005a1aca      {
005a1acc          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a1ad2          m_pDirect3DDevice->vtable->SetDialogBoxMode(m_pDirect3DDevice, 1);
005a1ae5          RenderDeviceD3D::SetGamma(this, this->m_gammaBrightnessVal, 0);
005a1aca      }
005a1aca      
005a1af0      int32_t i_1 = 3;
005a1b34      int32_t i;
005a1b34      
005a1b34      do
005a1b34      {
005a1af5          struct RenderDeviceD3D::VTable* vtable = this->vtable;
005a1b05          int32_t var_10 = 0;
005a1b0d          int32_t var_c_1 = 0;
005a1b15          int32_t var_8_1 = 0;
005a1b1d          int32_t var_4_1 = 0x3f800000;
005a1b25          vtable->Clear(7, &var_10, 0x3f800000);
005a1b28          this->vtable->Flip();
005a1b31          Sleep(1);
005a1b33          i = i_1;
005a1b33          i_1 -= 1;
005a1b34      } while (i != 1);
005a1a90  }

005a1b3d                                                                                         90 90 90                               ...

005a1b40  void __fastcall RenderDeviceD3D::End(class RenderDeviceD3D* this)

005a1b40  {
005a1b40      class RenderDeviceD3D* this_1 = this;
005a1b45      class PView* RenderDeviceD3D::indoor_pview_1 = RenderDeviceD3D::indoor_pview;
005a1b45      
005a1b4d      if (RenderDeviceD3D::indoor_pview_1 != 0)
005a1b4d      {
005a1b51          PView::~PView(RenderDeviceD3D::indoor_pview_1);
005a1b57          operator delete(RenderDeviceD3D::indoor_pview_1);
005a1b5f          RenderDeviceD3D::indoor_pview = nullptr;
005a1b4d      }
005a1b4d      
005a1b69      class PView* RenderDeviceD3D::outdoor_pview_1 = RenderDeviceD3D::outdoor_pview;
005a1b69      
005a1b71      if (RenderDeviceD3D::outdoor_pview_1 != 0)
005a1b71      {
005a1b75          PView::~PView(RenderDeviceD3D::outdoor_pview_1);
005a1b7b          operator delete(RenderDeviceD3D::outdoor_pview_1);
005a1b83          RenderDeviceD3D::outdoor_pview = nullptr;
005a1b71      }
005a1b71      
005a1b8f      RenderDeviceD3D::ReleaseD3DResources(this);
005a1b9d      PStringBase<char>::PStringBase<char>(&this_1, "RenderDeviceD3D.AllowDrawPrimUP");
005a1ba7      GlobalRegistry::UnregisterVariable(&this_1);
005a1bb0      void* __offset(RenderDeviceD3D, -0x14) esi_4 = ((char*)this_1 - 0x14);
005a1bb0      
005a1bc6      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
005a1bce          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
005a1b40  }

005a1bd4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a1be0  uint8_t __thiscall RenderDeviceD3D::DetectDisplayFormats(class RenderDeviceD3D* this, enum PixelFormatID const arg2)

005a1be0  {
005a1be0      int32_t ebx;
005a1be0      int32_t var_4 = ebx;
005a1be7      enum PixelFormatID esi = arg2;
005a1bee      this->m_caps.bCompressedTextures = 1;
005a1bee      
005a1c4b      for (int32_t i = 0; i < 5; i += 1)
005a1c4b      {
005a1bf9          switch (i)
005a1bf9          {
005a1c00              case 0:
005a1c00              {
005a1c00                  esi = PFID_DXT1;
005a1c00                  break;
005a1c00              }
005a1c07              case 1:
005a1c07              {
005a1c07                  esi = PFID_DXT2;
005a1c07                  break;
005a1c07              }
005a1c0e              case 2:
005a1c0e              {
005a1c0e                  esi = PFID_DXT3;
005a1c0e                  break;
005a1c0e              }
005a1c15              case 3:
005a1c15              {
005a1c15                  esi = PFID_DXT4;
005a1c15                  break;
005a1c15              }
005a1c1c              case 4:
005a1c1c              {
005a1c1c                  esi = PFID_DXT5;
005a1c1c                  break;
005a1c1c              }
005a1bf9          }
005a1bf9          
005a1c2c          int32_t* eax_2 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
005a1c2c          
005a1c45          if (*(uint32_t*)(*(uint32_t*)eax_2 + 0x28)(eax_2, this->m_AdapterID, this->m_D3DDeviceType, arg2, 0, 3, esi) != 0)
005a1c45          {
005a1c4f              this->m_caps.bCompressedTextures = 0;
005a1c4f              break;
005a1c45          }
005a1c4b      }
005a1c4b      
005a1c56      uint8_t eax_4;
005a1c56      int32_t ecx_2;
005a1c56      eax_4 = RenderDeviceD3D::ChoosePixelFormats(this, arg2);
005a1c56      
005a1c5d      if (eax_4 != 0)
005a1cbc          return 1;
005a1cbc      
005a1c67      int32_t var_18 = ecx_2;
005a1c68      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
005a1c78      int32_t ecx_3 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8], PStringBase<unsigned short>::s_NullBuffer_1);
005a1c7a      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
005a1c80      int32_t var_18_2 = ecx_3;
005a1c8d      int32_t var_18_4 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8], PStringBase<unsigned short>::s_NullBuffer_3);
005a1c8e      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
005a1c9e      uint16_t eax_9;
005a1c9e      class PStringBase<unsigned short> ecx_5;
005a1c9e      class PStringBase<unsigned short> edx_5;
005a1c9e      eax_9 = InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10), PStringBase<unsigned short>::s_NullBuffer_2);
005a1ca5      PlatformString::DisplayString(eax_9, edx_5, ecx_5, 0x80, dsError);
005a1cad      int32_t eax_10;
005a1cad      eax_10 = 0;
005a1cb3      return 0;
005a1be0  }

005a1cbf                                                                                               90                                 .
005a1cc0  uint32_t jump_table_5a1cc0[0x5] = 
005a1cc0  {
005a1cc0      [0x0] =  0x005a1c00
005a1cc4      [0x1] =  0x005a1c07
005a1cc8      [0x2] =  0x005a1c0e
005a1ccc      [0x3] =  0x005a1c15
005a1cd0      [0x4] =  0x005a1c1c
005a1cd4  }

005a1cd4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a1ce0  uint8_t __thiscall RenderDeviceD3D::SetupDisplayInfo(class RenderDeviceD3D* this, enum PixelFormatID const arg2, enum PixelFormatID const arg3, enum PixelFormatID const arg4, uint8_t const arg5, uint8_t const arg6)

005a1ce0  {
005a1cef      this->m_displayInfo.bStencilBuffer = arg5;
005a1cf2      int32_t eax_1;
005a1cf2      void* esi_1;
005a1cf2      eax_1 = RenderDeviceD3D::DetectDisplayFormats(this, arg2);
005a1cf2      
005a1d0a      if ((eax_1 != 0 && *(int32_t*)((char*)Render::m_pRenderer + 0x1c) != 0))
005a1d0a      {
005a1d15          eax_1 = *(uint32_t*)((char*)esi_1 + 0x60) != 0;
005a1d1a          *(uint8_t*)((char*)esi_1 + 0x5a) = 0;
005a1d1e          *(uint8_t*)((char*)esi_1 + 0x59) = eax_1;
005a1d1e          
005a1d21          if (eax_1 != 0)
005a1d27              *(uint32_t*)((char*)esi_1 + 0x60) = arg3;
005a1d27          
005a1d2d          bool cond:1_1 = *(uint32_t*)((char*)esi_1 + 0x68) == 0;
005a1d2f          enum PixelFormatID ecx_2 = arg4;
005a1d33          *(uint32_t*)((char*)esi_1 + 0x64) = ecx_2;
005a1d33          
005a1d44          if ((!(cond:1_1) && (*(uint32_t*)((char*)esi_1 + 0x6c) != 0 && *(uint32_t*)((char*)esi_1 + 0x70) != 0)))
005a1d44          {
005a1d46              int32_t eax_6 = *(uint32_t*)((char*)esi_1 + 0x74);
005a1d46              
005a1d4b              if (eax_6 != 0)
005a1d4b              {
005a1d4d                  ecx_2 = *(uint32_t*)((char*)esi_1 + 0x78);
005a1d4d                  
005a1d52                  if (ecx_2 != PFID_UNKNOWN)
005a1d52                  {
005a1d54                      int32_t edx_3 = *(uint32_t*)((char*)esi_1 + 0x7c);
005a1d54                      
005a1d59                      if (edx_3 != 0)
005a1d59                      {
005a1d63                          if (*(uint32_t*)((char*)esi_1 + 0x80) == 0)
005a1d65                              *(uint32_t*)((char*)esi_1 + 0x80) = eax_6;
005a1d65                          
005a1d73                          if (*(uint32_t*)((char*)esi_1 + 0x84) == 0)
005a1d75                              *(uint32_t*)((char*)esi_1 + 0x84) = ecx_2;
005a1d75                          
005a1d83                          if (*(uint32_t*)((char*)esi_1 + 0x88) == 0)
005a1d85                              *(uint32_t*)((char*)esi_1 + 0x88) = edx_3;
005a1d85                          
005a1d8b                          int32_t eax_8;
005a1d8b                          eax_8 = *(uint8_t*)((char*)esi_1 + 0x24);
005a1d8b                          
005a1d90                          if (eax_8 == 0)
005a1d92                              *(uint8_t*)((char*)esi_1 + 0x58) = 0;
005a1d92                          
005a1d96                          eax_8 = 1;
005a1d9a                          return 1;
005a1d59                      }
005a1d52                  }
005a1d4b              }
005a1d44          }
005a1d44          
005a1d9d          int32_t var_c_1 = 0;
005a1d9f          enum PixelFormatID var_10 = ecx_2;
005a1da2          uint16_t* var_14 = &data_794320;
005a1dac          var_14 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, var_14);
005a1daf          uint16_t* var_18 = &data_794320;
005a1db9          var_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, var_18);
005a1dc1          uint16_t eax_9;
005a1dc1          class PStringBase<unsigned short> ecx_8;
005a1dc1          class PStringBase<unsigned short> edx_4;
005a1dc1          eax_9 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, &data_794320);
005a1dcb          PlatformString::DisplayString(eax_9, edx_4, ecx_8, 0x80, var_18);
005a1d0a      }
005a1d0a      
005a1dd4      eax_1 = 0;
005a1dd7      return 0;
005a1ce0  }

005a1dda                                                                                90 90 90 90 90 90                            ......

005a1de0  uint8_t __thiscall RenderDeviceD3D::SelectBufferFormats(class RenderDeviceD3D* this, class RenderDevicePresentation const* arg2, enum PixelFormatID* arg3, enum PixelFormatID* arg4, uint32_t* arg5)

005a1de0  {
005a1df9      enum PixelFormatID m_D3DDeviceType_5 = PFID_UNKNOWN;
005a1dfb      *(uint32_t*)arg3 = PFID_UNKNOWN;
005a1dfd      *(uint32_t*)arg4 = PFID_UNKNOWN;
005a1e08      char var_88 = 0;
005a1e0d      enum PixelFormatID m_D3DDeviceType_3 = PFID_UNKNOWN;
005a1e11      void var_38;
005a1e11      AvailableProperty::AvailableProperty(&var_38);
005a1e22      uint32_t FSBitsPerPixel;
005a1e22      enum PixelFormatID m_D3DDeviceType_2;
005a1e22      enum PixelFormatID m_D3DDeviceType_8;
005a1e22      uint32_t var_ac;
005a1e22      void var_70;
005a1e22      uint16_t eax_3;
005a1e22      class PStringBase<unsigned short> ecx_13;
005a1e22      class PStringBase<unsigned short> edx_4;
005a1e22      
005a1e22      if (arg2->FullScreen == 0)
005a1e22      {
005a1e57          int32_t* m_D3DDeviceType_11 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
005a1e5a          int32_t ecx_4 = *(uint32_t*)m_D3DDeviceType_11;
005a1e60          uint32_t var_80;
005a1e60          uint32_t* var_a8_1 = &var_80;
005a1e67          var_ac = this->m_AdapterID;
005a1e68          m_D3DDeviceType_8 = m_D3DDeviceType_11;
005a1e69          *(uint32_t*)(ecx_4 + 0x20)(m_D3DDeviceType_8, var_ac, var_a8_1);
005a1e6c          enum PixelFormatID m_D3DDeviceType_10;
005a1e6c          m_D3DDeviceType_5 = m_D3DDeviceType_10;
005a1e74          m_D3DDeviceType_3 = m_D3DDeviceType_5;
005a1e78          AvailableProperty::AvailableProperty(&var_70);
005a1e82          uint32_t ecx_7 = PixelFormatDesc::SetFormat(&var_70, m_D3DDeviceType_5);
005a1e96          uint8_t FSBitsPerPixel_1;
005a1e96          
005a1e96          if ((m_D3DDeviceType_5 == PFID_P8 || FSBitsPerPixel_1 < 0x10))
005a1e96          {
005a21a5              int32_t var_a8_12 = 0;
005a21a7              var_ac = ecx_7;
005a21aa              m_D3DDeviceType_8 = 0x794320;
005a21b4              m_D3DDeviceType_8 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_ac, m_D3DDeviceType_8);
005a21b7              m_D3DDeviceType_2 = 0x794320;
005a21c1              m_D3DDeviceType_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_D3DDeviceType_8, m_D3DDeviceType_2);
005a21c9              eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_D3DDeviceType_2, &data_794320);
005a21d0              PlatformString::DisplayString(eax_3, edx_4, ecx_13, 0x7c, m_D3DDeviceType_2);
005a1e96          }
005a1e96          else
005a1e96          {
005a1e9e              if (m_D3DDeviceType_5 != PFID_UNKNOWN)
005a1e9e              {
005a1ed7                  FSBitsPerPixel = ((uint32_t)FSBitsPerPixel_1);
005a1eda                  this->m_nFrontBufferWidth = var_80;
005a1ee0                  uint32_t var_7c;
005a1ee0                  this->m_nFrontBufferHeight = var_7c;
005a1ee0                  goto label_5a1ee6;
005a1e9e              }
005a1e9e              
005a1ea0              enum PixelFormatID m_D3DDeviceType_9 = m_D3DDeviceType_5;
005a1ea1              var_ac = ecx_7;
005a1ea4              m_D3DDeviceType_8 = 0x794320;
005a1eae              m_D3DDeviceType_8 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_ac, m_D3DDeviceType_8);
005a1eb1              m_D3DDeviceType_2 = 0x794320;
005a1ebb              m_D3DDeviceType_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_D3DDeviceType_8, m_D3DDeviceType_2);
005a1ec3              eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_D3DDeviceType_2, &data_794320);
005a21d0              PlatformString::DisplayString(eax_3, edx_4, ecx_13, 0x7e, m_D3DDeviceType_2);
005a1e96          }
005a1e22      }
005a1e22      else
005a1e22      {
005a1e24          FSBitsPerPixel = arg2->FSBitsPerPixel;
005a1e24          
005a1e34          if (((FSBitsPerPixel == 0x10 || FSBitsPerPixel == 0x18) || FSBitsPerPixel == 0x20))
005a1e34          {
005a1e3d              this->m_nFrontBufferWidth = arg2->Width;
005a1e46              this->m_nFrontBufferHeight = arg2->Height;
005a1ee6          label_5a1ee6:
005a1ee6              enum PixelFormatID ebp_1 = PFID_UNKNOWN;
005a1ee8              enum PixelFormatID m_D3DDeviceType_6 = PFID_UNKNOWN;
005a1eea              enum PixelFormatID m_D3DDeviceType_7 = PFID_UNKNOWN;
005a1eef              uint32_t var_8c_1 = 0;
005a1eef              
005a1ef3              if (FSBitsPerPixel == 0x10)
005a1ef3              {
005a1f21                  m_D3DDeviceType_6 = PFID_X1R5G5B5;
005a1f26                  m_D3DDeviceType_7 = PFID_R5G6B5;
005a1f2b                  ebp_1 = PFID_X1R5G5B5;
005a1f2d                  var_8c_1 = 0x17;
005a1ef3              }
005a1ef3              else if (FSBitsPerPixel == 0x18)
005a1ef8              {
005a1f12                  ebp_1 = PFID_R8G8B8;
005a1f17                  m_D3DDeviceType_6 = PFID_R8G8B8;
005a1f19                  m_D3DDeviceType_7 = PFID_R8G8B8;
005a1f1b                  var_8c_1 = 0x14;
005a1ef8              }
005a1ef8              else if (FSBitsPerPixel == 0x20)
005a1efd              {
005a1eff                  m_D3DDeviceType_6 = PFID_X8R8G8B8;
005a1f04                  ebp_1 = PFID_X8R8G8B8;
005a1f06                  m_D3DDeviceType_7 = PFID_X8R8G8B8;
005a1f08                  var_8c_1 = 0x15;
005a1efd              }
005a1efd              
005a1f38              uint32_t ecx_3;
005a1f38              ecx_3 = arg2->FullScreen;
005a1f38              
005a1f3d              if (ecx_3 == 0)
005a1f3d              {
005a1f3f                  m_D3DDeviceType_7 = m_D3DDeviceType_5;
005a1f41                  m_D3DDeviceType_6 = m_D3DDeviceType_5;
005a1f3d              }
005a1f3d              
005a1f49              int32_t* eax_5 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
005a1f4c              int32_t edx_7 = *(uint32_t*)eax_5;
005a1f52              int32_t ebx;
005a1f52              ebx = ecx_3 == 0;
005a1f5a              enum _D3DDEVTYPE m_D3DDeviceType = this->m_D3DDeviceType;
005a1f60              var_ac = ebp_1;
005a1f61              m_D3DDeviceType_8 = m_D3DDeviceType_6;
005a1f62              m_D3DDeviceType_2 = m_D3DDeviceType;
005a1f6b              int32_t eax_6;
005a1f6b              enum PixelFormatID* ecx_15;
005a1f6b              eax_6 = *(uint32_t*)(edx_7 + 0x24)(eax_5, this->m_AdapterID, m_D3DDeviceType_2, m_D3DDeviceType_8, var_ac, ebx);
005a1f6b              
005a1f70              if (eax_6 == 0)
005a1f70              {
005a1f79                  ecx_15 = arg2->FullScreen;
005a1f79                  
005a1f7e                  if (ecx_15 == 0)
005a1f7e                  {
005a1f98                  label_5a1f98:
005a1f98                      ecx_15 = arg3;
005a1f9f                      m_D3DDeviceType_3 = m_D3DDeviceType_6;
005a1fa3                      *(uint32_t*)ecx_15 = ebp_1;
005a1f7e                  }
005a1f7e                  else
005a1f7e                  {
005a1f8b                      var_ac = arg2->FSRefreshRate;
005a1f8c                      m_D3DDeviceType_8 = m_D3DDeviceType_6;
005a1f8f                      uint8_t eax_9;
005a1f8f                      eax_9 = RenderDeviceD3D::CheckDisplayModes(this, m_D3DDeviceType_8, var_ac, arg5);
005a1f8f                      
005a1f96                      if (eax_9 != 0)
005a1f96                          goto label_5a1f98;
005a1f7e                  }
005a1f70              }
005a1f70              
005a1faf              if (*(uint32_t*)arg3 == PFID_UNKNOWN)
005a1faf              {
005a1fbd                  int32_t* eax_11 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
005a1fc0                  int32_t ecx_17 = *(uint32_t*)eax_11;
005a1fcb                  int32_t edx_10;
005a1fcb                  edx_10 = arg2->FullScreen == 0;
005a1fcf                  enum _D3DDEVTYPE m_D3DDeviceType_1 = this->m_D3DDeviceType;
005a1fd5                  var_ac = var_8c_1;
005a1fd6                  m_D3DDeviceType_8 = m_D3DDeviceType_7;
005a1fd7                  m_D3DDeviceType_2 = m_D3DDeviceType_1;
005a1fd7                  
005a1fe5                  if (*(uint32_t*)(ecx_17 + 0x24)(eax_11, this->m_AdapterID, m_D3DDeviceType_2, m_D3DDeviceType_8, var_ac, edx_10) == 0)
005a1fe5                  {
005a1ff3                      if (arg2->FullScreen == 0)
005a1ff3                      {
005a2014                          m_D3DDeviceType_3 = m_D3DDeviceType_7;
005a2018                          *(uint32_t*)arg3 = var_8c_1;
005a1ff3                      }
005a1ff3                      else
005a1ff3                      {
005a2000                          var_ac = arg2->FSRefreshRate;
005a2001                          m_D3DDeviceType_8 = m_D3DDeviceType_7;
005a2001                          
005a200b                          if (RenderDeviceD3D::CheckDisplayModes(this, m_D3DDeviceType_8, var_ac, arg5) != 0)
005a200b                          {
005a2014                              m_D3DDeviceType_3 = m_D3DDeviceType_7;
005a2018                              *(uint32_t*)arg3 = var_8c_1;
005a200b                          }
005a1ff3                      }
005a1fe5                  }
005a1fe5                  
005a201a                  ecx_15 = arg3;
005a201a                  
005a2024                  if ((*(uint32_t*)ecx_15 == PFID_UNKNOWN || m_D3DDeviceType_3 == PFID_UNKNOWN))
005a2024                      goto label_5a2175;
005a2024                  
005a2024                  goto label_5a203b;
005a1faf              }
005a1faf              
005a2030              if (m_D3DDeviceType_3 == PFID_UNKNOWN)
005a2030              {
005a2175              label_5a2175:
005a2175                  int32_t var_a8_11 = 0;
005a2177                  var_ac = ecx_15;
005a217a                  m_D3DDeviceType_8 = 0x794320;
005a2184                  m_D3DDeviceType_8 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_ac, m_D3DDeviceType_8);
005a2187                  m_D3DDeviceType_2 = 0x794320;
005a2191                  m_D3DDeviceType_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_D3DDeviceType_8, m_D3DDeviceType_2);
005a2199                  eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&m_D3DDeviceType_2, &data_794320);
005a21d0                  PlatformString::DisplayString(eax_3, edx_4, ecx_13, 0x80, m_D3DDeviceType_2);
005a2030              }
005a2030              else
005a2030              {
005a203b              label_5a203b:
005a203b                  int32_t eax_17;
005a203b                  eax_17 = PixelFormatDesc::SetFormat(&var_38, m_D3DDeviceType_3);
005a2040                  char var_2c;
005a2040                  eax_17 = var_2c;
005a2040                  
005a20ef                  for (int32_t i = 0; i < 6; i += 1)
005a20ef                  {
005a2053                      char var_91_1 = 0;
005a205e                      enum PixelFormatID esi_3;
005a205e                      
005a205e                      switch (i)
005a205e                      {
005a2067                          case 0:
005a2067                          {
005a2067                              if (eax_17 > 0x10)
005a2067                              {
005a206d                                  eax_17 = this->m_config.bUseStencilBuffer;
005a206d                                  
005a2072                                  if (eax_17 == 0)
005a2072                                  {
005a208b                                  label_5a208b:
005a208b                                      esi_3 = PFID_D32;
005a2090                                      goto label_5a20c2;
005a2072                                  }
005a2072                                  
005a2074                              label_5a2074:
005a2074                                  esi_3 = PFID_D24S8;
005a2079                                  var_91_1 = 1;
005a207e                                  goto label_5a20c2;
005a2067                              }
005a2067                              break;
005a2067                          }
005a2082                          case 1:
005a2082                          {
005a2082                              if (eax_17 > 0x10)
005a2082                              {
005a2084                                  eax_17 = this->m_config.bUseStencilBuffer;
005a2084                                  
005a2089                                  if (eax_17 == 0)
005a2089                                      goto label_5a2074;
005a2089                                  
005a2089                                  goto label_5a208b;
005a2082                              }
005a2082                              break;
005a2082                          }
005a2094                          case 2:
005a2094                          {
005a2094                              if (eax_17 > 0x10)
005a2094                              {
005a2096                                  esi_3 = PFID_D24X8;
005a20c2                              label_5a20c2:
005a20c2                                  int32_t* eax_18 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
005a20c9                                  int32_t ecx_22 = *(uint32_t*)eax_18;
005a20cc                                  var_ac = 1;
005a20ce                                  m_D3DDeviceType_8 = 0x2;
005a20d0                                  m_D3DDeviceType_2 = m_D3DDeviceType_3;
005a20e0                                  eax_17 = *(uint32_t*)(ecx_22 + 0x28)(eax_18, this->m_AdapterID, this->m_D3DDeviceType, m_D3DDeviceType_2, m_D3DDeviceType_8, var_ac, esi_3);
005a20e0                                  
005a20e5                                  if (eax_17 == 0)
005a20e5                                  {
005a20fe                                      ecx_15 = var_91_1;
005a2102                                      *(uint32_t*)arg4 = esi_3;
005a2104                                      var_88 = ecx_15;
005a2104                                      break;
005a20e5                                  }
005a20e5                                  
005a20e7                                  eax_17 = var_2c;
005a2094                              }
005a2094                              break;
005a2094                          }
005a209f                          case 3:
005a209f                          {
005a209f                              if (eax_17 > 0x10)
005a209f                              {
005a20a1                                  esi_3 = PFID_D24X4S4;
005a20a6                                  goto label_5a20c2;
005a209f                              }
005a209f                              break;
005a209f                          }
005a20aa                          case 4:
005a20aa                          {
005a20aa                              if (eax_17 <= 0x10)
005a20aa                              {
005a20ac                                  esi_3 = PFID_D16;
005a20b1                                  goto label_5a20c2;
005a20aa                              }
005a20aa                              break;
005a20aa                          }
005a20b5                          case 5:
005a20b5                          {
005a20b5                              if (eax_17 <= 0x10)
005a20b5                              {
005a20b7                                  esi_3 = PFID_D15S1;
005a20b7                                  goto label_5a20c2;
005a20b5                              }
005a20b5                              break;
005a20b5                          }
005a205e                      }
005a20ef                  }
005a20ef                  
005a210f                  enum PixelFormatID m_D3DDeviceType_12 = *(uint32_t*)arg4;
005a210f                  
005a2113                  if (m_D3DDeviceType_12 == PFID_UNKNOWN)
005a2113                      goto label_5a2175;
005a2113                  
005a2125                  uint8_t FullScreen = arg2->FullScreen;
005a212d                  enum PixelFormatID m_D3DDeviceType_4 = *(uint32_t*)arg3;
005a212f                  var_ac = var_88;
005a2130                  m_D3DDeviceType_8 = m_D3DDeviceType_12;
005a2135                  m_D3DDeviceType_2 = m_D3DDeviceType_4;
005a2135                  
005a2140                  if (RenderDeviceD3D::SetupDisplayInfo(this, m_D3DDeviceType_3, m_D3DDeviceType_2, m_D3DDeviceType_8, var_ac, FullScreen) != 0)
005a2140                  {
005a214a                      AvailableProperty::AvailableProperty(&var_70);
005a2156                      PixelFormatDesc::SetFormat(&var_70, *(uint32_t*)arg3);
005a2160                      char var_6c;
005a2160                      
005a2160                      if ((var_6c & 2) == 0)
005a2162                          this->m_caps.bDestinationAlpha = 0;
005a2162                      
005a2166                      int32_t eax_21;
005a2166                      eax_21 = 1;
005a2172                      return 1;
005a2140                  }
005a2030              }
005a1e34          }
005a1e22      }
005a21db      FSBitsPerPixel = 0;
005a21e4      return 0;
005a1de0  }

005a2048                          8d a4 24 00 00 00 00 90                                                          ..$.....
005a21e7                       90                                                                                 .
005a21e8  uint32_t jump_table_5a21e8[0x6] = 
005a21e8  {
005a21e8      [0x0] =  0x005a2065
005a21ec      [0x1] =  0x005a2080
005a21f0      [0x2] =  0x005a2092
005a21f4      [0x3] =  0x005a209d
005a21f8      [0x4] =  0x005a20a8
005a21fc      [0x5] =  0x005a20b3
005a2200  }

005a2200  void __fastcall RenderDeviceD3D::Begin(class RenderDeviceD3D* this)

005a2200  {
005a220d      this->m_AdapterID = 0;
005a2217      this->m_D3DDeviceType = D3DDEVTYPE_HAL;
005a2235      __builtin_memset(&this->m_D3DCaps, 0, 0x130);
005a223d      this->m_PresentSourceRect.left = 0;
005a223d      this->m_PresentSourceRect.top = 0;
005a223d      this->m_PresentSourceRect.right = 0;
005a223d      this->m_PresentSourceRect.bottom = 0;
005a2252      this->m_PresentDestRect.left = 0;
005a2252      this->m_PresentDestRect.top = 0;
005a2252      this->m_PresentDestRect.right = 0;
005a2252      this->m_PresentDestRect.bottom = 0;
005a2267      this->m_hPresentWindow = nullptr;
005a2271      this->m_nFrontBufferWidth = 0;
005a227b      this->m_nFrontBufferHeight = 0;
005a2285      this->m_pDirect3DDevice = nullptr;
005a228f      this->m_pPrimarySwapChain = nullptr;
005a2299      this->m_bForceStates = 0;
005a22a3      void var_320;
005a22a3      int32_t eax_3 = RenderStateCacheType::RenderStateCacheType(&var_320);
005a22b9      __builtin_memcpy(&this->m_State, eax_3, 0x320);
005a22bf      RenderDeviceD3D::s_bAllowDrawPrimitiveUP = 1;
005a22c6      RenderDeviceD3D::Init(this);
005a22d5      SmartArray<unsigned long,1>::Reset(&this->m_DefaultSamplerMappings);
005a2363      uint32_t var_328;
005a2363      
005a2363      for (int32_t i = 0; i < 8; i += 1)
005a2363      {
005a22f6          int32_t eax_5 = (this->m_DefaultSamplerMappings.m_sizeAndDeallocate & 0x7fffffff);
005a22fd          uint8_t eax_10;
005a22fd          
005a22fd          if (this->m_DefaultSamplerMappings.m_num >= eax_5)
005a22fd          {
005a22ff              uint32_t edx_4 = (eax_5 + 1);
005a22ff              
005a2305              if (edx_4 <= 8)
005a2307                  edx_4 = 8;
005a2305              else if (edx_4 <= 0x4000)
005a2314              {
005a232a                  var_328 = edx_4;
005a2333                  int32_t eflags_1;
005a2333                  char eax_9;
005a2333                  eax_9 = __bsr_gprv_memv(var_328);
005a233f                  int32_t esi_1 = (1 << eax_9);
005a233f                  
005a2343                  if (edx_4 > esi_1)
005a2345                      edx_4 = (esi_1 * 2);
005a2314              }
005a2314              else
005a2314              {
005a2318                  int32_t eax_7 = (edx_4 & 0x3fff);
005a2318                  
005a231d                  if (eax_7 != 0)
005a2326                      edx_4 += (0x4000 - eax_7);
005a2314              }
005a2314              
005a234b              eax_10 = SmartArray<unsigned long,1>::grow(&this->m_DefaultSamplerMappings, edx_4);
005a22fd          }
005a22fd          
005a2352          if ((this->m_DefaultSamplerMappings.m_num < eax_5 || eax_10 != 0))
005a2352          {
005a22f0              this->m_DefaultSamplerMappings.m_data[this->m_DefaultSamplerMappings.m_num] = i;
005a22f0              this->m_DefaultSamplerMappings.m_num += 1;
005a2352          }
005a2363      }
005a2363      
005a236d      this->m_pDebugFont = nullptr;
005a2377      this->m_DebugFontWidth = 0;
005a238a      this->m_DebugFontHeight = 0;
005a2390      PStringBase<char>::PStringBase<char>(&var_328, "Toggle for rendering all the Dra…");
005a239e      class PStringBase<char> var_324;
005a239e      PStringBase<char>::PStringBase<char>(&var_324, "RenderDeviceD3D.AllowDrawPrimUP");
005a23b8      GlobalRegistry::RegisterVariableInternal(&RenderDeviceD3D::s_bAllowDrawPrimitiveUP, GRVDataType_Bool, &var_324, &var_328, nullptr, 0, nullptr, nullptr);
005a23c7      int32_t* esi_3 = (var_324 - 0x14);
005a23c7      
005a23d9      if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
005a23e1          **(uint32_t**)esi_3(1);
005a23e1      
005a23e7      int32_t* esi_5 = (var_328 - 0x14);
005a23e7      
005a23f6      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
005a23fe          **(uint32_t**)esi_5(1);
005a2200  }

005a240b                                   90 90 90 90 90                                                             .....

005a2410  void __fastcall RenderDeviceD3D::Shutdown(class RenderDeviceD3D* this)

005a2410  {
005a2413      RenderDeviceD3D::End(this);
005a241a      RenderDevice::Shutdown(this);
005a241f      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a241f      
005a2427      if (m_pDirect3DDevice != 0)
005a2427      {
005a2429          m_pDirect3DDevice->vtable->Release(m_pDirect3DDevice);
005a242f          this->m_pDirect3DDevice = nullptr;
005a2427      }
005a2427      
005a243c      /* tailcall */
005a243c      return RenderDeviceD3D::Begin(this);
005a2410  }

005a2441     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005a2450  uint8_t __thiscall RenderDeviceD3D::SetupPresentation(class RenderDeviceD3D* this, class RenderDevicePresentation const* arg2, struct _D3DPRESENT_PARAMETERS_* arg3)

005a2450  {
005a2454      class RenderDevicePresentation* ebx = arg2;
005a2461      int32_t var_8;
005a2461      int32_t* var_1c = &var_8;
005a2466      enum _D3DFORMAT var_4;
005a2466      int32_t* var_20 = &var_4;
005a2471      var_8 = 0;
005a2471      
005a247c      if (RenderDeviceD3D::SelectBufferFormats(this, ebx, &arg2, var_20, var_1c) != 0)
005a247c      {
005a2482          this->m_PresentDestRect.left = 0;
005a2488          this->m_PresentSourceRect.left = 0;
005a248e          this->m_PresentDestRect.top = 0;
005a2494          this->m_PresentSourceRect.top = 0;
005a249a          uint32_t Width = ebx->Width;
005a249d          struct _D3DPRESENT_PARAMETERS_* s = arg3;
005a24a1          this->m_PresentDestRect.right = Width;
005a24a7          this->m_PresentSourceRect.right = Width;
005a24ad          uint32_t Height = ebx->Height;
005a24b0          this->m_PresentDestRect.bottom = Height;
005a24b6          this->m_PresentSourceRect.bottom = Height;
005a24be          this->m_hPresentWindow = ebx->hRenderWindow;
005a24cd          __builtin_memset(s, 0, 0x38);
005a24d2          class RenderDevicePresentation* eax_2 = arg2;
005a24d6          s->BackBufferWidth = ebx->Width;
005a24dd          s->BackBufferHeight = ebx->Height;
005a24e0          s->BackBufferFormat = eax_2;
005a24e8          s->BackBufferCount = 1;
005a24eb          s->MultiSampleType = D3DMULTISAMPLE_NONE;
005a24ee          s->MultiSampleQuality = 0;
005a24f1          s->SwapEffect = D3DSWAPEFFECT_DISCARD;
005a24f6          s->hDeviceWindow = ebx->hRenderWindow;
005a24f9          struct HWND__* ecx_2;
005a24f9          ecx_2 = ebx->FullScreen;
005a2504          int32_t eax_3;
005a2504          eax_3 = ecx_2 == 0;
005a2507          s->AutoDepthStencilFormat = var_4;
005a250a          uint32_t ecx_4 = 0x80000000;
005a250f          s->EnableAutoDepthStencil = 1;
005a2512          s->Flags = 0;
005a2515          s->FullScreen_RefreshRateInHz = 0;
005a2518          s->PresentationInterval = 0x80000000;
005a251b          s->Windowed = eax_3;
005a251e          eax_3 = ebx->FullScreen;
005a251e          
005a2523          if (eax_3 != 0)
005a2523          {
005a2525              int32_t eax_4 = var_8;
005a252f              s->FullScreen_RefreshRateInHz = ((0 - 0) & eax_4);
005a2532              uint32_t PresentationIntervals = this->m_D3DCaps.PresentationIntervals;
005a2532              
005a253a              if ((PresentationIntervals & 8) != 0)
005a253c                  ecx_4 = 8;
005a253c              
005a2543              if ((PresentationIntervals & 4) != 0)
005a2545                  ecx_4 = 4;
005a2545              
005a254c              if ((PresentationIntervals & 2) != 0)
005a254e                  ecx_4 = 2;
005a254e              
005a2555              if ((PresentationIntervals & 1) != 0)
005a2557                  ecx_4 = 1;
005a2557              
005a2562              if ((ebx->FSSyncToDisplayRefresh == 0 && PresentationIntervals < 0))
005a2564                  ecx_4 = 0x80000000;
005a2564              
005a2569              s->PresentationInterval = ecx_4;
005a256c              PresentationIntervals = 1;
005a2575              return 1;
005a2523          }
005a2523          
005a257f          int32_t eax_5 = GetSystemMetrics(SM_CXSCREEN);
005a2585          int32_t eax_6 = GetSystemMetrics(SM_CYSCREEN);
005a2585          
005a258e          if ((eax_5 >= s->BackBufferWidth && eax_6 >= s->BackBufferHeight))
005a258e          {
005a2590              eax_6 = 1;
005a2599              return 1;
005a258e          }
005a258e          
005a259c          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
005a25a7          arg3 = PStringBase<unsigned short>::s_NullBuffer_1;
005a25af          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
005a25b1          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
005a25b6          arg2 = PStringBase<unsigned short>::s_NullBuffer_2;
005a25be          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
005a25c7          PStringBase<unsigned short>::append_uint32(&arg3, s->BackBufferWidth);
005a25d9          int32_t var_1c_7 = 0;
005a25da          var_20 = PStringBase<unsigned short>::append_uint32(&arg2, s->BackBufferHeight);
005a25e7          int32_t var_24_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_20, &data_794320);
005a25ee          class RenderDevicePresentation* var_24_2 = arg2;
005a25fa          int32_t var_28_2 = InterlockedIncrement(&arg2[0]);
005a25fb          struct _D3DPRESENT_PARAMETERS_* ecx_12 = arg3;
005a260b          uint16_t eax_10;
005a260b          class PStringBase<unsigned short> ecx_13;
005a260b          class PStringBase<unsigned short> edx_8;
005a260b          eax_10 = InterlockedIncrement(&arg3[0]);
005a260f          int32_t edi_4 = PlatformString::DisplayString(eax_10, edx_8, ecx_13, 0x6c, ecx_12);
005a261e          void* __offset(RenderDevicePresentation, -0x14) esi_2 = ((char*)arg2 - 0x14);
005a261e          
005a2630          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != edi_4))
005a2638              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
005a2638          
005a263e          void* __offset(_D3DPRESENT_PARAMETERS_, -0x14) esi_4 = ((char*)arg3 - 0x14);
005a263e          
005a264d          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != edi_4))
005a2655              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
005a247c      }
005a247c      
005a265a      int32_t eax;
005a265a      eax = 0;
005a2660      return 0;
005a2450  }

005a2663           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005a2670  uint8_t __thiscall RenderDeviceD3D::ResetDevice(class RenderDeviceD3D* this, class RenderDevicePresentation const* arg2)

005a2670  {
005a2682      KeyStone::Release();
005a2687      GraphicsResource::PurgeResources();
005a2699      __builtin_memcpy(&this->m_presentation, arg2, 0x1c);
005a2699      
005a26a0      if (this->m_presentation.FullScreen == 0)
005a26a0      {
005a26aa          int32_t eax_1 = GetSystemMetrics(SM_CXSCREEN);
005a26b0          int32_t eax_2 = GetSystemMetrics(SM_CYSCREEN);
005a26b0          
005a26ba          if ((eax_1 < this->m_presentation.Width || eax_2 < this->m_presentation.Height))
005a26ba          {
005a268f              this->m_presentation.Width = eax_1;
005a268f              this->m_presentation.Height = eax_2;
005a26ba          }
005a26a0      }
005a26a0      
005a26ca      void var_40;
005a26ca      void* var_64_3 = &var_40;
005a26cb      class RenderDevicePresentation* var_68 = &this->m_presentation;
005a26cb      
005a26d5      if (RenderDeviceD3D::SetupPresentation(this, var_68, var_64_3) != 0)
005a26d5      {
005a26dd          RenderDeviceD3D::ReleaseD3DResources(this);
005a26e2          class RenderDevicePresentation* ebx_1;
005a26e2          ebx_1 = 0;
005a26e4          int32_t var_50_1 = 0;
005a26e4          
005a26fd          while (true)
005a26fd          {
005a26fd              double var_48_1 = ((double)((long double)Timer::get_real_time()));
005a2707              int32_t eax_6;
005a2707              class RenderDevicePresentation* ecx_3;
005a2707              
005a2707              while (true)
005a2707              {
005a2707                  int32_t* eax_5 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
005a270d                  int32_t edx_1 = *(uint32_t*)eax_5;
005a2713                  void* var_64_4 = &var_40;
005a2714                  var_68 = eax_5;
005a2715                  eax_6 = *(uint32_t*)(edx_1 + 0x40)(var_68, var_64_4);
005a271a                  int32_t eax_7;
005a271a                  eax_7 = Timer::get_real_time();
005a2727                  long double x87_r7_3 = (((long double)eax_7) - ((long double)var_48_1));
005a272b                  long double temp1_1 = ((long double)10.0);
005a272b                  (x87_r7_3 - temp1_1);
005a2731                  eax_7 = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005a2731                  
005a2736                  if ((*(uint8_t*)((char*)eax_7)[1] & 0x41) == 0)
005a2738                      ebx_1 = 1;
005a2738                  
005a2740                  if (eax_6 != 0x88760868)
005a2740                      break;
005a2740                  
005a2744                  if (ebx_1 != 0)
005a2744                      goto label_5a275c;
005a2744                  
005a274b                  Sleep(0xc8);
005a2707              }
005a2707              
005a2755              if (eax_6 >= 0)
005a2755              {
005a27c0                  struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a27ce                  this->m_TotalVideoMemoryInBytes = m_pDirect3DDevice->vtable->GetAvailableTextureMem(m_pDirect3DDevice);
005a27d4                  this->m_bDeviceLost = 0;
005a27d4                  
005a27e2                  if (RenderDeviceD3D::GetD3DResources(this) == 0)
005a27e2                      break;
005a27e2                  
005a27e6                  RenderDeviceD3D::OnDeviceDisplayModeChange(this);
005a27eb                  KeyStone::Create();
005a27f2                  int32_t eax_13;
005a27f2                  eax_13 = 1;
005a27f8                  return 1;
005a2755              }
005a2755              
005a275c          label_5a275c:
005a275c              bool cond:0_1 = (var_50_1 + 1) < 2;
005a275f              var_50_1 += 1;
005a275f              
005a2763              if (!(cond:0_1))
005a2763              {
005a2765                  int32_t var_64_6 = 0;
005a2767                  var_68 = ecx_3;
005a276a                  class PStringBase<unsigned short> var_6c = 0x794320;
005a2774                  var_6c = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_68, var_6c);
005a2777                  enum PlatformString::DisplayStringMode var_70 = 0x794320;
005a2781                  var_70 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_6c, var_70);
005a2789                  uint16_t eax_10;
005a2789                  class PStringBase<unsigned short> ecx_9;
005a2789                  class PStringBase<unsigned short> edx_2;
005a2789                  eax_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_70, &data_794320);
005a2789                  
005a2794                  if (eax_6 != 0x8876017c)
005a2794                  {
005a27ad                      PlatformString::DisplayString(eax_10, edx_2, ecx_9, 0x69, var_70);
005a2794                      break;
005a2794                  }
005a2794                  
005a2798                  PlatformString::DisplayString(eax_10, edx_2, ecx_9, 0x79, var_70);
005a27a0                  int32_t eax_11;
005a27a0                  eax_11 = 0;
005a27a8                  return 0;
005a2763              }
005a26fd          }
005a26d5      }
005a26d5      
005a27bd      return 0;
005a2670  }

005a27fb                                                                                   90 90 90 90 90                             .....

005a2800  uint8_t __thiscall RenderDeviceD3D::Startup(class RenderDeviceD3D* this, uint32_t const arg2, class RenderDevicePresentation const* arg3, class RenderDeviceConfig const* arg4)

005a2800  {
005a2818      class RenderDevicePresentation* var_70 = arg3;
005a2819      uint32_t var_74 = arg2;
005a2819      
005a2823      if (RenderDevice::Startup(this, var_74, var_70, arg4) != 0)
005a2823      {
005a2827          this->m_AdapterID = arg2;
005a282d          uint8_t eax_2;
005a282d          class RenderDevicePresentation* ecx_3;
005a282d          eax_2 = RenderDeviceD3D::DetectDeviceCaps(this);
005a2834          uint16_t* hFocusWindow_1;
005a2834          
005a2834          if (eax_2 != 0)
005a2834          {
005a287f              if (this->m_presentation.FullScreen == 0)
005a287f              {
005a2883                  int32_t eax_4 = GetSystemMetrics(SM_CXSCREEN);
005a288d                  uint32_t eax_5 = GetSystemMetrics(SM_CYSCREEN);
005a288d                  
005a289b                  if ((eax_4 < this->m_presentation.Width || eax_5 < this->m_presentation.Height))
005a289b                  {
005a287c                      this->m_presentation.Width = eax_4;
005a287c                      this->m_presentation.Height = eax_5;
005a289b                  }
005a287f              }
005a287f              
005a28a7              void var_40;
005a28a7              void* var_6c_4 = &var_40;
005a28a8              var_70 = &this->m_presentation;
005a28ab              uint8_t eax_1;
005a28ab              class RenderDevicePresentation* ecx_11;
005a28ab              eax_1 = RenderDeviceD3D::SetupPresentation(this, var_70, var_6c_4);
005a28ab              
005a28b2              if (eax_1 != 0)
005a28b2              {
005a28b8                  int32_t i = 0;
005a28ba                  int32_t i_1 = 0;
005a28be                  int32_t var_4c;
005a28be                  int32_t edi_3 = var_4c;
005a29c6                  uint32_t ebx_2;
005a29c6                  
005a29c6                  do
005a29c6                  {
005a28c2                      ebx_2 = 0x20;
005a28c2                      
005a28c7                      if (i != 0)
005a28c7                      {
005a28e9                          if (i != 1)
005a28e9                          {
005a2900                              if (i == 2)
005a2902                                  ebx_2 = 0x20;
005a2902                              
005a2900                              goto label_5a290d;
005a28e9                          }
005a28e9                          
005a28eb                          ecx_11 = this->m_caps.bHardwareVertexProcessing;
005a28eb                          
005a28f0                          if (ecx_11 != 0)
005a28f0                          {
005a28f6                              ebx_2 = 0x40;
005a290d                          label_5a290d:
005a290d                              char var_55_1 = 0;
005a2912                              int32_t var_54_1 = 0;
005a291a                              ebx_2 |= 0x106;
005a291a                              
005a292d                              while (true)
005a292d                              {
005a292d                                  double var_48_1 = ((double)((long double)Timer::get_real_time()));
005a292d                                  
005a2936                                  while (true)
005a2936                                  {
005a2936                                      int32_t* eax_8 = *(int32_t*)((char*)Render::m_pRenderer + 0x1c);
005a2939                                      int32_t edx_2 = *(uint32_t*)eax_8;
005a2946                                      var_70 = &var_40;
005a2947                                      uint16_t* hFocusWindow = this->m_config.hFocusWindow;
005a294a                                      var_74 = ebx_2;
005a294b                                      hFocusWindow_1 = hFocusWindow;
005a295e                                      edi_3 = *(uint32_t*)(edx_2 + 0x40)(eax_8, this->m_AdapterID, this->m_D3DDeviceType, hFocusWindow_1, var_74, var_70, &this->m_pDirect3DDevice);
005a2960                                      int32_t eax_10;
005a2960                                      eax_10 = Timer::get_real_time();
005a296d                                      long double x87_r7_3 = (((long double)eax_10) - ((long double)var_48_1));
005a2971                                      long double temp1_1 = ((long double)10.0);
005a2971                                      (x87_r7_3 - temp1_1);
005a2977                                      eax_10 = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005a2977                                      
005a297c                                      if ((*(uint8_t*)((char*)eax_10)[1] & 0x41) == 0)
005a297e                                          var_55_1 = 1;
005a297e                                      
005a2989                                      if (edi_3 != 0x88760868)
005a2989                                          break;
005a2989                                      
005a298b                                      eax_10 = var_55_1;
005a298b                                      
005a2991                                      if (eax_10 != 0)
005a2991                                          goto label_5a29ad;
005a2991                                      
005a2998                                      Sleep(0xc8);
005a2936                                  }
005a2936                                  
005a29a2                                  if (edi_3 >= 0)
005a29a2                                      goto label_5a2a39;
005a29a2                                  
005a29ad                              label_5a29ad:
005a29ad                                  bool cond:4_1 = (var_54_1 + 1) < 2;
005a29b0                                  var_54_1 += 1;
005a29b0                                  
005a29b4                                  if (!(cond:4_1))
005a29b4                                  {
005a29ba                                      i = i_1;
005a29ba                                      break;
005a29b4                                  }
005a292d                              }
005a28f0                          }
005a28c7                      }
005a28c7                      else
005a28c7                      {
005a28c9                          ecx_11 = this->m_caps.bHardwareVertexProcessing;
005a28c9                          
005a28ce                          if (ecx_11 != 0)
005a28ce                          {
005a28d4                              ecx_11 = this->m_config.bUsePureDevice;
005a28d4                              
005a28d9                              if (ecx_11 != 0)
005a28d9                              {
005a28df                                  ebx_2 = 0x50;
005a28e4                                  goto label_5a290d;
005a28d9                              }
005a28ce                          }
005a28c7                      }
005a28c7                      
005a29be                      i += 1;
005a29c2                      i_1 = i;
005a29c6                  } while (i < 3);
005a29c6                  
005a29ce                  if (edi_3 < 0)
005a29ce                  {
005a29d0                      int32_t var_6c_7 = 0;
005a29d2                      var_70 = ecx_11;
005a29d5                      var_74 = 0x794320;
005a29df                      var_74 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_70, var_74);
005a29e2                      hFocusWindow_1 = &data_794320;
005a29ec                      hFocusWindow_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_74, hFocusWindow_1);
005a29f4                      uint16_t eax_13;
005a29f4                      class PStringBase<unsigned short> ecx_20;
005a29f4                      class PStringBase<unsigned short> edx_3;
005a29f4                      eax_13 = PStringBase<unsigned short>::PStringBase<unsigned short>(&hFocusWindow_1, &data_794320);
005a29f4                      
005a29ff                      if (edi_3 == 0x8876017c)
005a29ff                      {
005a2a03                          PlatformString::DisplayString(eax_13, edx_3, ecx_20, 0x79, hFocusWindow_1);
005a2a0f                          *(uint32_t*)0xc4831693();
005a2a12                          int32_t eax_14;
005a2a12                          eax_14 = 0;
005a2a1a                          return 0;
005a29ff                      }
005a29ff                      
005a2a1f                      PlatformString::DisplayString(eax_13, edx_3, ecx_20, 0x69, hFocusWindow_1);
005a2a2b                      *(uint32_t*)0xc4831693();
005a2a2e                      int32_t eax_15;
005a2a2e                      eax_15 = 0;
005a2a36                      return 0;
005a29ce                  }
005a29ce                  
005a2a39              label_5a2a39:
005a2a39                  struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2a48                  this->m_TotalVideoMemoryInBytes = m_pDirect3DDevice->vtable->GetAvailableTextureMem(m_pDirect3DDevice);
005a2a48                  
005a2a4e                  if ((ebx_2 & 0x20) != 0)
005a2a50                      this->m_caps.bHardwareVertexProcessing = 0;
005a2a50                  
005a2a5d                  if ((RenderDeviceD3D::GetD3DResources(this) != 0 && RenderDeviceD3D::InitDebugFont(this) != 0))
005a2a5d                  {
005a2a74                      int32_t eax_17;
005a2a74                      int80_t st0;
005a2a74                      eax_17 = RenderDeviceD3D::OnDeviceDisplayModeChange(this);
005a2a7b                      eax_17 = 1;
005a2a81                      return 1;
005a2a5d                  }
005a28b2              }
005a2834          }
005a2834          else
005a2834          {
005a2836              int32_t var_6c_1 = 0;
005a2838              var_70 = ecx_3;
005a283b              var_74 = 0x794320;
005a2845              var_74 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_70, var_74);
005a2848              hFocusWindow_1 = &data_794320;
005a2852              hFocusWindow_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_74, hFocusWindow_1);
005a285a              uint16_t eax_3;
005a285a              class PStringBase<unsigned short> ecx_9;
005a285a              class PStringBase<unsigned short> edx_1;
005a285a              eax_3 = PStringBase<unsigned short>::PStringBase<unsigned short>(&hFocusWindow_1, &data_794320);
005a2864              PlatformString::DisplayString(eax_3, edx_1, ecx_9, 0x80, hFocusWindow_1);
005a2834          }
005a2823      }
005a2823      
005a2874      return 0;
005a2800  }

005a2a84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005a2a90  void __thiscall RenderDeviceD3D::SetAlphaBlendEnable(class RenderDeviceD3D* this, uint8_t const arg2)

005a2a90  {
005a2a91      int32_t ebx;
005a2a91      ebx = arg2;
005a2a91      
005a2aa8      if ((this->m_bForceStates != 0 || this->m_State.AlphaBlendEnable != ebx))
005a2aa8      {
005a2aaa          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2ab0          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x1b, ((uint32_t)ebx));
005a2abf          this->m_State.AlphaBlendEnable = ebx;
005a2aa8      }
005a2a90  }

005a2aca                                90 90 90 90 90 90                                                            ......

005a2ad0  void __thiscall RenderDeviceD3D::SetAlphaTestEnable(class RenderDeviceD3D* this, uint8_t const arg2)

005a2ad0  {
005a2ad1      int32_t ebx;
005a2ad1      ebx = arg2;
005a2ad1      
005a2ae8      if ((this->m_bForceStates != 0 || this->m_State.AlphaTestEnable != ebx))
005a2ae8      {
005a2aea          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2af0          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0xf, ((uint32_t)ebx));
005a2aff          this->m_State.AlphaTestEnable = ebx;
005a2ae8      }
005a2ad0  }

005a2b0a                                90 90 90 90 90 90                                                            ......

005a2b10  void __thiscall RenderDeviceD3D::SetAlphaTestFunction(class RenderDeviceD3D* this, enum AlphaTestFunc const arg2)

005a2b10  {
005a2b1c      enum AlphaTestFunc edi = arg2;
005a2b1c      
005a2b28      if ((this->m_bForceStates != 0 || this->m_State.AlphaTestFunction != edi))
005a2b28      {
005a2b2a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2b30          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x19, edi);
005a2b3c          this->m_State.AlphaTestFunction = edi;
005a2b28      }
005a2b10  }

005a2b47                       90 90 90 90 90 90 90 90 90                                                         .........

005a2b50  void __thiscall RenderDeviceD3D::SetAlphaTestRef(class RenderDeviceD3D* this, uint32_t const arg2)

005a2b50  {
005a2b68      if ((this->m_bForceStates != 0 || this->m_State.AlphaTestRef != arg2))
005a2b68      {
005a2b6a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2b70          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x18, arg2);
005a2b7c          this->m_State.AlphaTestRef = arg2;
005a2b68      }
005a2b50  }

005a2b87                       90 90 90 90 90 90 90 90 90                                                         .........

005a2b90  void __thiscall RenderDeviceD3D::SetBlendFunction(class RenderDeviceD3D* this, enum BlendMode const arg2, enum BlendMode const arg3, enum BlendOpType const arg4)

005a2b90  {
005a2ba9      if ((this->m_bForceStates != 0 || this->m_State.SourceBlend != arg2))
005a2ba9      {
005a2bab          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2bb1          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x13, arg2);
005a2bbd          this->m_State.SourceBlend = arg2;
005a2ba9      }
005a2ba9      
005a2bd7      if ((this->m_bForceStates != 0 || this->m_State.DestBlend != arg3))
005a2bd7      {
005a2bd9          struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a2bdf          m_pDirect3DDevice_1->vtable->SetRenderState(m_pDirect3DDevice_1, 0x14, arg3);
005a2beb          this->m_State.DestBlend = arg3;
005a2bd7      }
005a2bd7      
005a2c06      if ((this->m_bForceStates != 0 || this->m_State.BlendOp != arg4))
005a2c06      {
005a2c0d          if (this->m_caps.bBlendOp != 0)
005a2c0d          {
005a2c0f              struct IDirect3DDevice9* m_pDirect3DDevice_2 = this->m_pDirect3DDevice;
005a2c15              m_pDirect3DDevice_2->vtable->SetRenderState(m_pDirect3DDevice_2, 0xab, arg4);
005a2c0d          }
005a2c0d          
005a2c24          this->m_State.BlendOp = arg4;
005a2c06      }
005a2c06      
005a2c33      enum BlendMode ebx;
005a2c33      
005a2c33      if ((arg2 != BLEND_ONE || arg3 != BLEND_ZERO))
005a2c39          ebx = 1;
005a2c33      else
005a2c35          ebx = 0;
005a2c35      
005a2c4b      if ((this->m_bForceStates != 0 || this->m_State.AlphaBlendEnable != ebx))
005a2c4b      {
005a2c4d          struct IDirect3DDevice9* m_pDirect3DDevice_3 = this->m_pDirect3DDevice;
005a2c53          m_pDirect3DDevice_3->vtable->SetRenderState(m_pDirect3DDevice_3, 0x1b, ((uint32_t)ebx));
005a2c62          this->m_State.AlphaBlendEnable = ebx;
005a2c4b      }
005a2b90  }

005a2c6e                                            90 90                                                                ..

005a2c70  void __thiscall RenderDeviceD3D::SetCullMode(class RenderDeviceD3D* this, enum CullModeType const arg2)

005a2c70  {
005a2c7c      enum CullModeType edi = arg2;
005a2c7c      
005a2c88      if ((this->m_bForceStates != 0 || this->m_State.CullMode != edi))
005a2c88      {
005a2c8a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2c90          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x16, edi);
005a2c9c          this->m_State.CullMode = edi;
005a2c88      }
005a2c70  }

005a2ca7                       90 90 90 90 90 90 90 90 90                                                         .........

005a2cb0  void __thiscall RenderDeviceD3D::SetDepthBias(class RenderDeviceD3D* this, float const arg2)

005a2cb0  {
005a2cb0      class RenderDeviceD3D* this_1 = this;
005a2cb0      
005a2cb9      if (this->m_caps.bSlopeScaleDepthBias != 0)
005a2cb9      {
005a2cc7          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2ccd          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0xaf, arg2);
005a2ce0          this->m_State.DepthBias = arg2;
005a2cb9      }
005a2cb0  }

005a2ceb                                   90 90 90 90 90                                                             .....

005a2cf0  void __thiscall RenderDeviceD3D::SetDepthBufferEnable(class RenderDeviceD3D* this, uint8_t const arg2)

005a2cf0  {
005a2cf5      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2cfb      m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 7, ((uint32_t)arg2));
005a2cf0  }

005a2d0a                                90 90 90 90 90 90                                                            ......

005a2d10  void __thiscall RenderDeviceD3D::SetDepthBufferMode(class RenderDeviceD3D* this, enum DepthTestMode const arg2, uint8_t const arg3)

005a2d10  {
005a2d28      if ((this->m_bForceStates != 0 || this->m_State.DepthTestFunction != arg2))
005a2d28      {
005a2d2a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2d30          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x17, arg2);
005a2d3c          this->m_State.DepthTestFunction = arg2;
005a2d28      }
005a2d28      
005a2d4b      int32_t ebx;
005a2d4b      ebx = arg3;
005a2d4b      
005a2d57      if ((this->m_bForceStates != 0 || this->m_State.DepthWriteEnable != ebx))
005a2d57      {
005a2d59          struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a2d5f          m_pDirect3DDevice_1->vtable->SetRenderState(m_pDirect3DDevice_1, 0xe, ((uint32_t)ebx));
005a2d6e          this->m_State.DepthWriteEnable = ebx;
005a2d57      }
005a2d57      
005a2d7d      uint8_t eax;
005a2d7d      
005a2d7d      if ((ebx == 1 || arg2 != DEPTHTEST_ALWAYS))
005a2d83          eax = 1;
005a2d7d      else
005a2d7f          eax = 0;
005a2d7f      
005a2d85      struct IDirect3DDevice9* m_pDirect3DDevice_2 = this->m_pDirect3DDevice;
005a2d8b      m_pDirect3DDevice_2->vtable->SetRenderState(m_pDirect3DDevice_2, 7, ((uint32_t)eax));
005a2d10  }

005a2d9f                                                                                               90                                 .

005a2da0  void __thiscall RenderDeviceD3D::SetFFAmbientColor32(class RenderDeviceD3D* this, uint32_t const arg2)

005a2da0  {
005a2db8      if ((this->m_bForceStates != 0 || this->m_State.FFAmbientColor32 != arg2))
005a2db8      {
005a2dba          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2dc0          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x8b, arg2);
005a2dcf          this->m_State.FFAmbientColor32 = arg2;
005a2db8      }
005a2da0  }

005a2dda                                                                                90 90 90 90 90 90                            ......

005a2de0  void __thiscall RenderDeviceD3D::SetFFDiffuseColorSource(class RenderDeviceD3D* this, enum ColorSource const arg2)

005a2de0  {
005a2dec      enum ColorSource edi = arg2;
005a2dec      
005a2df8      if ((this->m_bForceStates != 0 || this->m_State.FFDiffuseColorSource != edi))
005a2df8      {
005a2dfa          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2e07          int32_t edx_1;
005a2e07          edx_1 = edi == FromVertex;
005a2e00          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x91, edx_1);
005a2e17          this->m_State.FFDiffuseColorSource = edi;
005a2df8      }
005a2de0  }

005a2e22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005a2e30  void __thiscall RenderDeviceD3D::SetFFAmbientColorSource(class RenderDeviceD3D* this, enum ColorSource const arg2)

005a2e30  {
005a2e3c      enum ColorSource edi = arg2;
005a2e3c      
005a2e48      if ((this->m_bForceStates != 0 || this->m_State.FFAmbientColorSource != edi))
005a2e48      {
005a2e4a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2e57          int32_t edx_1;
005a2e57          edx_1 = edi == FromVertex;
005a2e50          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x93, edx_1);
005a2e67          this->m_State.FFAmbientColorSource = edi;
005a2e48      }
005a2e30  }

005a2e72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005a2e80  void __thiscall RenderDeviceD3D::SetFFFogEnable(class RenderDeviceD3D* this, uint8_t const arg2)

005a2e80  {
005a2e94      if ((this->m_bForceStates != 0 || this->m_State.FFFogEnable != arg2))
005a2e94      {
005a2e9d          int32_t ebx;
005a2e9d          ebx = this->m_State.FFFogSystemDisabled;
005a2eaa          ebx = ebx == 0;
005a2eaf          uint8_t eax = ((this->m_State.FFFogUserDisabled == 0 & ebx) & arg2);
005a2eb1          this->m_State.FFFogEnable = eax;
005a2eb7          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2ebd          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x1c, ((uint32_t)eax));
005a2e94      }
005a2e80  }


005a2ed0  void __thiscall RenderDeviceD3D::SetFFFogSystemDisabled(class RenderDeviceD3D* this, uint8_t const arg2)

005a2ed0  {
005a2ee4      if ((this->m_bForceStates != 0 || this->m_State.FFFogSystemDisabled != arg2))
005a2ee4      {
005a2ee8          this->m_State.FFFogSystemDisabled = arg2;
005a2ee8          
005a2eee          if (arg2 == 1)
005a2ef8              /* tailcall */
005a2ef8              return RenderDeviceD3D::SetFFFogEnable(this, 0);
005a2ee4      }
005a2ed0  }


005a2f00  void __thiscall RenderDeviceD3D::SetFFFogUserDisabled(class RenderDeviceD3D* this, uint8_t const arg2)

005a2f00  {
005a2f14      if ((this->m_bForceStates != 0 || this->m_State.FFFogUserDisabled != arg2))
005a2f14      {
005a2f18          this->m_State.FFFogUserDisabled = arg2;
005a2f18          
005a2f1e          if (arg2 == 1)
005a2f28              /* tailcall */
005a2f28              return RenderDeviceD3D::SetFFFogEnable(this, 0);
005a2f14      }
005a2f00  }


005a2f30  void __thiscall RenderDeviceD3D::SetFFFogAlphaDisabled(class RenderDeviceD3D* this, uint8_t const arg2)

005a2f30  {
005a2f44      if ((this->m_bForceStates != 0 || this->m_State.FFFogAlphaDisabled != arg2))
005a2f44      {
005a2f4b          int32_t ebx_1;
005a2f4b          ebx_1 = arg2 == 0;
005a2f4e          this->m_State.FFFogAlphaDisabled = arg2;
005a2f54          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a2f5a          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x1c, ebx_1);
005a2f44      }
005a2f30  }

005a2f6a                                90 90 90 90 90 90                                                            ......

005a2f70  void __thiscall RenderDeviceD3D::SetFFFogProperties(class RenderDeviceD3D* this, class RGBAColor const* arg2, float const arg3, float const arg4)

005a2f70  {
005a2f80      float* eax_1;
005a2f80      
005a2f80      if (this->m_bForceStates == 0)
005a2f89          eax_1 = RGBAColor::operator==(&this->m_State.FFFogColor, arg2);
005a2f89      
005a2f90      if ((this->m_bForceStates != 0 || eax_1 == 0))
005a2f90      {
005a2f96          arg2->a;
005a2fa6          struct IDirect3DDevice9::VTable* vtable = this->m_pDirect3DDevice->vtable;
005a2fa9          int32_t eax_3 = _ftol2();
005a2fae          arg2->r;
005a2fbb          int32_t eax_4 = _ftol2();
005a2fc0          arg2->g;
005a2fce          int32_t eax_5 = _ftol2();
005a2fd3          arg2->b;
005a2fe6          int32_t ebp_7 = ((((((eax_3 << 8) | eax_4) << 8) | eax_5) << 8) | _ftol2());
005a2ff2          vtable->SetRenderState(this->m_pDirect3DDevice, 0x22, ebp_7);
005a2ffa          this->m_State.FFFogColor.r = arg2->r;
005a2ffa          this->m_State.FFFogColor.g = arg2->g;
005a2ffa          this->m_State.FFFogColor.b = arg2->b;
005a2ffa          this->m_State.FFFogColor.a = arg2->a;
005a2f90      }
005a2f90      
005a3016      eax_1 = this->m_bForceStates;
005a3016      
005a301e      if (eax_1 != 0)
005a301e      {
005a303d      label_5a303d:
005a303d          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3043          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x24, arg3);
005a3053          this->m_State.FFFogNearDistance = arg3;
005a301e      }
005a301e      else
005a301e      {
005a3020          long double x87_r7_9 = ((long double)this->m_State.FFFogNearDistance);
005a3026          long double temp1_1 = ((long double)arg3);
005a3026          (x87_r7_9 - temp1_1);
005a302a          eax_1 = ((((x87_r7_9 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005a302c          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005a302c          
005a302f          if (p_1)
005a302f              goto label_5a303d;
005a301e      }
005a301e      
005a3059      eax_1 = this->m_bForceStates;
005a3059      
005a3061      if (eax_1 != 0)
005a3061      {
005a3078      label_5a3078:
005a3078          struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a3084          arg3 = arg4;
005a307e          m_pDirect3DDevice_1->vtable->SetRenderState(m_pDirect3DDevice_1, 0x25, arg4);
005a3092          this->m_State.FFFogFarDistance = arg4;
005a3061      }
005a3061      else
005a3061      {
005a3063          long double x87_r7_10 = ((long double)this->m_State.FFFogFarDistance);
005a3069          long double temp2_1 = ((long double)arg4);
005a3069          (x87_r7_10 - temp2_1);
005a306d          eax_1 = ((((x87_r7_10 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005a306f          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
005a306f          
005a3072          if (p_2)
005a3072              goto label_5a3078;
005a3061      }
005a2f70  }

005a309d                                                                                         90 90 90                               ...

005a30a0  void __thiscall RenderDeviceD3D::SetFFFogProperties(class RenderDeviceD3D* this, class RGBAUnion const* arg2, float const arg3, float const arg4)

005a30a0  {
005a30b1      void var_10;
005a30b1      RGBAColor::SetColor32(&var_10, arg2->__inner0);
005a30c7      RenderDeviceD3D::SetFFFogProperties(this, &var_10, arg3, arg4);
005a30a0  }

005a30d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005a30e0  void __thiscall RenderDeviceD3D::SetFFLighting(class RenderDeviceD3D* this, uint8_t const arg2)

005a30e0  {
005a30e1      int32_t ebx;
005a30e1      ebx = arg2;
005a30e1      
005a30f8      if ((this->m_bForceStates != 0 || this->m_State.FFLighting != ebx))
005a30f8      {
005a30fa          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3100          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x89, ((uint32_t)ebx));
005a3112          this->m_State.FFLighting = ebx;
005a30f8      }
005a30e0  }

005a311d                                                                                         90 90 90                               ...

005a3120  void __thiscall RenderDeviceD3D::SetFFLightEnable(class RenderDeviceD3D* this, uint32_t const arg2, uint8_t const arg3)

005a3120  {
005a3121      int32_t ebx;
005a3121      ebx = arg3;
005a3121      
005a313e      if ((this->m_bForceStates != 0 || *(uint64_t*)((char*)this->m_State)[0x55][arg2] != ebx))
005a313e      {
005a3140          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3146          m_pDirect3DDevice->vtable->LightEnable(m_pDirect3DDevice, arg2, ((uint32_t)ebx));
005a3154          *(uint64_t*)((char*)this->m_State)[0x55][arg2] = ebx;
005a313e      }
005a3120  }

005a3161     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005a3170  void __thiscall RenderDeviceD3D::SetFFSpecularColorSource(class RenderDeviceD3D* this, enum ColorSource const arg2)

005a3170  {
005a317c      enum ColorSource edi = arg2;
005a317c      
005a3188      if ((this->m_bForceStates != 0 || this->m_State.FFSpecularColorSource != edi))
005a3188      {
005a318a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3197          int32_t edx_1;
005a3197          edx_1 = edi != FromVertex;
005a3190          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x92, ((edx_1 - 1) & 2));
005a31ab          this->m_State.FFSpecularColorSource = edi;
005a3188      }
005a3170  }

005a31b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005a31c0  void __thiscall RenderDeviceD3D::SetFFSpecularEnable(class RenderDeviceD3D* this, uint8_t const arg2)

005a31c0  {
005a31c1      int32_t ebx;
005a31c1      ebx = arg2;
005a31c1      
005a31d8      if ((this->m_bForceStates != 0 || this->m_State.FFSpecularEnable != ebx))
005a31d8      {
005a31da          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a31e0          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x1d, ((uint32_t)ebx));
005a31ef          this->m_State.FFSpecularEnable = ebx;
005a31d8      }
005a31c0  }

005a31fa                                                                                90 90 90 90 90 90                            ......

005a3200  void __thiscall RenderDeviceD3D::SetFFEmissiveColorSource(class RenderDeviceD3D* this, enum ColorSource const arg2)

005a3200  {
005a320c      enum ColorSource edi = arg2;
005a320c      
005a3218      if ((this->m_bForceStates != 0 || this->m_State.FFEmissiveColorSource != edi))
005a3218      {
005a321a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3220          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x94, edi);
005a322f          this->m_State.FFEmissiveColorSource = edi;
005a3218      }
005a3200  }

005a323a                                                                                90 90 90 90 90 90                            ......

005a3240  void __thiscall RenderDeviceD3D::SetFFTextureFactor32(class RenderDeviceD3D* this, uint32_t const arg2)

005a3240  {
005a3258      if ((this->m_bForceStates != 0 || this->m_State.FFTextureFactor32 != arg2))
005a3258      {
005a325a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3260          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0x3c, arg2);
005a326c          this->m_State.FFTextureFactor32 = arg2;
005a3258      }
005a3240  }

005a3277                                                                       90 90 90 90 90 90 90 90 90                         .........

005a3280  void __thiscall RenderDeviceD3D::SetFillMode(class RenderDeviceD3D* this, enum FillModeType const arg2)

005a3280  {
005a328c      enum FillModeType edi = arg2;
005a328c      
005a3298      if ((this->m_bForceStates != 0 || this->m_State.FillMode != edi))
005a3298      {
005a329a          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a32a0          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 8, edi);
005a32ac          this->m_State.FillMode = edi;
005a3298      }
005a3280  }

005a32b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005a32c0  void __thiscall RenderDeviceD3D::SetMultiSampleAntialias(class RenderDeviceD3D* this, uint8_t const arg2)

005a32c0  {
005a32c1      int32_t ebx;
005a32c1      ebx = arg2;
005a32c1      
005a32e6      if (((this->m_bForceStates != 0 || this->m_State.MultiSampleAntialias != ebx) && (this->m_presentation.Antialiasing != 0 && this->m_displayInfo.bMultiSampling != 0)))
005a32e6      {
005a32e8          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a32ee          m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 0xa1, ((uint32_t)ebx));
005a3300          this->m_State.MultiSampleAntialias = ebx;
005a32e6      }
005a32c0  }

005a330b                                   90 90 90 90 90                                                             .....

005a3310  void __thiscall RenderDeviceD3D::SetSamplerAddressMode(class RenderDeviceD3D* this, uint32_t const arg2, enum TexAddress const arg3, enum TexAddress const arg4)

005a3310  {
005a331d      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3323      m_pDirect3DDevice->vtable->SetSamplerState(m_pDirect3DDevice, arg2, 1, arg3);
005a3333      struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a3339      m_pDirect3DDevice_1->vtable->SetSamplerState(m_pDirect3DDevice_1, arg2, 2, arg4);
005a3310  }

005a334b                                   90 90 90 90 90                                                             .....

005a3350  void __thiscall RenderDeviceD3D::SetSamplerFilterMode(class RenderDeviceD3D* this, uint32_t const arg2, enum TexFilterMode const arg3, enum TexFilterMode const arg4, enum TexFilterMode const arg5)

005a3350  {
005a3353      enum TexFilterMode ecx = arg4;
005a3353      
005a335b      if (ecx != TEXFILTER_LINEAR)
005a335b      {
005a3370          if (ecx == TEXFILTER_ANISOTROPIC)
005a3370              goto label_5a3378;
005a335b      }
005a335b      else if (Render::m_RenderPrefs.TextureFiltering == 3)
005a3364      {
005a3366          ecx = TEXFILTER_ANISOTROPIC;
005a3378      label_5a3378:
005a3378          
005a337b          if ((*(uint8_t*)((char*)((int16_t)this->m_D3DCaps.TextureFilterCaps))[1] & 4) == 0)
005a337d              ecx = TEXFILTER_LINEAR;
005a3364      }
005a3364      
005a3382      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a338c      m_pDirect3DDevice->vtable->SetSamplerState(m_pDirect3DDevice, arg2, 6, ecx);
005a3399      enum TexFilterMode ecx_1 = arg3;
005a3399      
005a33a0      if (ecx_1 != TEXFILTER_LINEAR)
005a33a0      {
005a33b5          if (ecx_1 == TEXFILTER_ANISOTROPIC)
005a33b5              goto label_5a33b7;
005a33a0      }
005a33a0      else if (Render::m_RenderPrefs.TextureFiltering == 3)
005a33a9      {
005a33ab          ecx_1 = TEXFILTER_ANISOTROPIC;
005a33b7      label_5a33b7:
005a33b7          
005a33c1          if ((this->m_D3DCaps.TextureFilterCaps & 0x4000000) == 0)
005a33c3              ecx_1 = TEXFILTER_LINEAR;
005a33a9      }
005a33a9      
005a33c8      struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a33ce      m_pDirect3DDevice_1->vtable->SetSamplerState(m_pDirect3DDevice_1, arg2, 5, ecx_1);
005a33db      enum TexFilterMode eax_2 = arg5;
005a33db      
005a33ec      if ((eax_2 == TEXFILTER_LINEAR && Render::m_RenderPrefs.TextureFiltering == 0))
005a33ee          eax_2 = TEXFILTER_POINT;
005a33ee      
005a33f3      struct IDirect3DDevice9* m_pDirect3DDevice_2 = this->m_pDirect3DDevice;
005a33f9      m_pDirect3DDevice_2->vtable->SetSamplerState(m_pDirect3DDevice_2, arg2, 7, eax_2);
005a3350  }

005a340b                                   90 90 90 90 90                                                             .....

005a3410  void __thiscall RenderDeviceD3D::SetSamplerMipmapLODBias(class RenderDeviceD3D* this, uint32_t const arg2, float const arg3)

005a3410  {
005a341c      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3422      m_pDirect3DDevice->vtable->SetSamplerState(m_pDirect3DDevice, arg2, 8, arg3);
005a3410  }

005a3436                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005a3440  void __thiscall RenderDeviceD3D::SetStageFFAlphaSource(class RenderDeviceD3D* this, uint32_t const arg2, enum TextureOp const arg3, uint32_t const arg4, uint32_t const arg5)

005a3440  {
005a3456      void* ebx_1;
005a3456      
005a3456      if (this->m_bForceStates == 0)
005a345b          ebx_1 = ((char*)this + (arg2 * 0x24));
005a345b      
005a3464      if ((this->m_bForceStates != 0 || *(uint32_t*)((char*)ebx_1 + 0x680) != arg3))
005a3464      {
005a3466          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a346c          m_pDirect3DDevice->vtable->SetTextureStageState(m_pDirect3DDevice, arg2, 4, arg3);
005a347c          ebx_1 = ((char*)this + (arg2 * 0x24));
005a347f          *(uint32_t*)((char*)ebx_1 + 0x680) = arg3;
005a3464      }
005a3464      
005a3485      uint32_t eax_1;
005a3485      eax_1 = this->m_bForceStates;
005a3485      
005a349d      if ((eax_1 != 0 || *(uint32_t*)((char*)this + (((arg2 * 9) + 0x19e) << 2)) != arg4))
005a349d      {
005a349f          struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a34a5          m_pDirect3DDevice_1->vtable->SetTextureStageState(m_pDirect3DDevice_1, arg2, 5, arg4);
005a34b9          *(uint32_t*)((char*)this + (((arg2 * 9) + 0x19e) << 2)) = arg4;
005a349d      }
005a349d      
005a34bc      int32_t eax_2;
005a34bc      eax_2 = this->m_bForceStates;
005a34bc      
005a34d0      if ((eax_2 != 0 || *(uint32_t*)((char*)ebx_1 + 0x67c) != arg5))
005a34d0      {
005a34d2          struct IDirect3DDevice9* m_pDirect3DDevice_2 = this->m_pDirect3DDevice;
005a34d8          m_pDirect3DDevice_2->vtable->SetTextureStageState(m_pDirect3DDevice_2, arg2, 6, arg5);
005a34e5          *(uint32_t*)((char*)ebx_1 + 0x67c) = arg5;
005a34d0      }
005a3440  }

005a34f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005a3500  void __thiscall RenderDeviceD3D::SetStageFFColorSource(class RenderDeviceD3D* this, uint32_t const arg2, enum TextureOp const arg3, uint32_t const arg4, uint32_t const arg5)

005a3500  {
005a3516      void* edi_1;
005a3516      
005a3516      if (this->m_bForceStates == 0)
005a351b          edi_1 = ((char*)this + (arg2 * 0x24));
005a351b      
005a3524      if ((this->m_bForceStates != 0 || *(uint32_t*)((char*)edi_1 + 0x68c) != arg3))
005a3524      {
005a3526          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a352c          m_pDirect3DDevice->vtable->SetTextureStageState(m_pDirect3DDevice, arg2, 1, arg3);
005a353c          edi_1 = ((char*)this + (arg2 * 0x24));
005a353f          *(uint32_t*)((char*)edi_1 + 0x68c) = arg3;
005a3524      }
005a3524      
005a3545      uint32_t eax_1;
005a3545      eax_1 = this->m_bForceStates;
005a3545      
005a3559      if ((eax_1 != 0 || *(uint32_t*)((char*)edi_1 + 0x684) != arg4))
005a3559      {
005a355b          struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a3561          m_pDirect3DDevice_1->vtable->SetTextureStageState(m_pDirect3DDevice_1, arg2, 2, arg4);
005a356e          *(uint32_t*)((char*)edi_1 + 0x684) = arg4;
005a3559      }
005a3559      
005a3574      eax_1 = this->m_bForceStates;
005a3574      
005a3588      if ((eax_1 != 0 || *(uint32_t*)((char*)edi_1 + 0x688) != arg5))
005a3588      {
005a358a          struct IDirect3DDevice9* m_pDirect3DDevice_2 = this->m_pDirect3DDevice;
005a3590          m_pDirect3DDevice_2->vtable->SetTextureStageState(m_pDirect3DDevice_2, arg2, 3, arg5);
005a359d          *(uint32_t*)((char*)edi_1 + 0x688) = arg5;
005a3588      }
005a3500  }

005a35aa                                90 90 90 90 90 90                                                            ......

005a35b0  void __thiscall RenderDeviceD3D::SetStageFFTexCoordIndex(class RenderDeviceD3D* this, uint32_t const arg2, uint32_t const arg3)

005a35b0  {
005a35d1      if ((this->m_bForceStates != 0 || &*(uint32_t*)((char*)*(uint288_t*)((char*)this->m_State)[0x200][0])[0x1c][(arg2 * 9)] != arg3))
005a35d1      {
005a35d3          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a35d9          m_pDirect3DDevice->vtable->SetTextureStageState(m_pDirect3DDevice, arg2, 0xb, arg3);
005a35e9          &*(uint32_t*)((char*)*(uint288_t*)((char*)this->m_State)[0x200][0])[0x1c][(arg2 * 9)] = arg3;
005a35d1      }
005a35b0  }

005a35f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005a3600  void __thiscall RenderDeviceD3D::SetStageFFTextureTransformFlags(class RenderDeviceD3D* this, uint32_t const arg2, uint32_t const arg3)

005a3600  {
005a3621      if ((this->m_bForceStates != 0 || &*(uint32_t*)((char*)*(uint288_t*)((char*)this->m_State)[0x200][0])[0x20][(arg2 * 9)] != arg3))
005a3621      {
005a3623          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3629          m_pDirect3DDevice->vtable->SetTextureStageState(m_pDirect3DDevice, arg2, 0x18, arg3);
005a3639          &*(uint32_t*)((char*)*(uint288_t*)((char*)this->m_State)[0x200][0])[0x20][(arg2 * 9)] = arg3;
005a3621      }
005a3600  }

005a3646                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005a3650  void __thiscall RenderDeviceD3D::SetStageTexture(class RenderDeviceD3D* this, uint32_t const arg2, class RenderTexture* arg3)

005a3650  {
005a3656      struct IDirect3DTexture9* ebx = nullptr;
005a365d      struct IDirect3DTexture9* eax;
005a365d      
005a365d      if (arg3 != 0)
005a365d      {
005a365f          eax = arg3->m_bIsLost;
005a365f          
005a3664          if (eax == 0)
005a3664          {
005a3676          label_5a3676:
005a3676              
005a3679              if (arg3->m_TextureType == TEXTURETYPE_2D)
005a3682                  ebx = RenderTextureD3D::Get2DTextureD3D(arg3);
005a3664          }
005a3664          else if (arg3->vtable->RestoreResource() != 0)
005a3671              goto label_5a3676;
005a365d      }
005a365d      
005a3684      eax = this->m_bForceStates;
005a3684      
005a369c      if ((eax != 0 || ebx != *(uint288_t*)((char*)this->m_State)[0x200][arg2].pTexture))
005a369c      {
005a369e          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a36a4          m_pDirect3DDevice->vtable->SetTexture(m_pDirect3DDevice, arg2, ebx);
005a36b2          *(uint288_t*)((char*)this->m_State)[0x200][arg2].pTexture = ebx;
005a369c      }
005a3650  }

005a36bf                                                                                               90                                 .

005a36c0  void __thiscall RenderDeviceD3D::SetStageTexture(class RenderDeviceD3D* this, uint32_t const arg2, struct IDirect3DTexture9* arg3)

005a36c0  {
005a36e1      if ((this->m_bForceStates != 0 || arg3 != *(uint288_t*)((char*)this->m_State)[0x200][arg2].pTexture))
005a36e1      {
005a36e3          struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a36e9          m_pDirect3DDevice->vtable->SetTexture(m_pDirect3DDevice, arg2, arg3);
005a36f7          *(uint288_t*)((char*)this->m_State)[0x200][arg2].pTexture = arg3;
005a36e1      }
005a36c0  }

005a3704              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005a3710  void __thiscall RenderDeviceD3D::SetModelToWorldMatrix(class RenderDeviceD3D* this, class Matrix4 const* arg2)

005a3710  {
005a371f      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a3731      __builtin_memcpy(&this->m_GState, arg2, 0x40);
005a3733      m_pDirect3DDevice->vtable->SetTransform(m_pDirect3DDevice, 0x100, arg2);
005a3710  }

005a3741     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005a3750  void __thiscall RenderDeviceD3D::SetWorldToViewMatrix(class RenderDeviceD3D* this, class Matrix4 const* arg2)

005a3750  {
005a375f      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a376e      __builtin_memcpy(&this->m_GState.WorldToViewMatrix, arg2, 0x40);
005a3770      m_pDirect3DDevice->vtable->SetTransform(m_pDirect3DDevice, 2, arg2);
005a3750  }

005a377e                                                                                            90 90                                ..

005a3780  void __thiscall RenderDeviceD3D::SetViewToClipMatrix(class RenderDeviceD3D* this, class Matrix4 const* arg2)

005a3780  {
005a378f      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a379e      __builtin_memcpy(&this->m_GState.ViewToClipMatrix, arg2, 0x40);
005a37a0      m_pDirect3DDevice->vtable->SetTransform(m_pDirect3DDevice, 3, arg2);
005a3780  }

005a37ae                                            90 90                                                                ..

005a37b0  void RenderDeviceD3D::TransformPixelToClipPoint(int32_t const arg1, int32_t const arg2, int32_t const arg3, int32_t const arg4, float* arg5, float* arg6)

005a37b0  {
005a37bc      long double x87_r7 = (((long double)1f) / ((long double)arg3));
005a37c6      long double x87_r6_1 = (((long double)1f) / ((long double)arg4));
005a37d0      long double x87_r5_1 = (((long double)arg1) * x87_r7);
005a37da      *(uint32_t*)arg5 = ((float)((x87_r5_1 + x87_r5_1) - ((long double)1f)));
005a37e0      long double x87_r5_5 = (((long double)arg2) * x87_r6_1);
005a37ec      *(uint32_t*)arg6 = ((float)-(((x87_r5_5 + x87_r5_5) - ((long double)1f))));
005a37f2      *(uint32_t*)arg5 = ((float)(((long double)*(uint32_t*)arg5) - x87_r7));
005a37f8      *(uint32_t*)arg6 = ((float)(((long double)*(uint32_t*)arg6) - x87_r6_1));
005a37b0  }

005a37ff                                                                                               90                                 .

005a3800  uint8_t __fastcall RenderDeviceD3D::SetDefaultD3DStates(class RenderDeviceD3D* this)

005a3800  {
005a3809      struct IDirect3DDevice9* m_pDirect3DDevice = this->m_pDirect3DDevice;
005a380f      m_pDirect3DDevice->vtable->SetRenderState(m_pDirect3DDevice, 7, 1);
005a381c      struct IDirect3DDevice9* m_pDirect3DDevice_1 = this->m_pDirect3DDevice;
005a3822      m_pDirect3DDevice_1->vtable->SetRenderState(m_pDirect3DDevice_1, 8, 3);
005a382f      struct IDirect3DDevice9* m_pDirect3DDevice_2 = this->m_pDirect3DDevice;
005a3835      m_pDirect3DDevice_2->vtable->SetRenderState(m_pDirect3DDevice_2, 9, 2);
005a3842      struct IDirect3DDevice9* m_pDirect3DDevice_3 = this->m_pDirect3DDevice;
005a3848      m_pDirect3DDevice_3->vtable->SetRenderState(m_pDirect3DDevice_3, 0xe, 1);
005a3855      struct IDirect3DDevice9* m_pDirect3DDevice_4 = this->m_pDirect3DDevice;
005a385b      m_pDirect3DDevice_4->vtable->SetRenderState(m_pDirect3DDevice_4, 0xf, 0);
005a3868      struct IDirect3DDevice9* m_pDirect3DDevice_5 = this->m_pDirect3DDevice;
005a386e      m_pDirect3DDevice_5->vtable->SetRenderState(m_pDirect3DDevice_5, 0x10, 1);
005a387b      struct IDirect3DDevice9* m_pDirect3DDevice_6 = this->m_pDirect3DDevice;
005a3881      m_pDirect3DDevice_6->vtable->SetRenderState(m_pDirect3DDevice_6, 0x13, 2);
005a388e      struct IDirect3DDevice9* m_pDirect3DDevice_7 = this->m_pDirect3DDevice;
005a3894      m_pDirect3DDevice_7->vtable->SetRenderState(m_pDirect3DDevice_7, 0x14, 1);
005a38a1      struct IDirect3DDevice9* m_pDirect3DDevice_8 = this->m_pDirect3DDevice;
005a38a7      m_pDirect3DDevice_8->vtable->SetRenderState(m_pDirect3DDevice_8, 0x16, 3);
005a38b4      struct IDirect3DDevice9* m_pDirect3DDevice_9 = this->m_pDirect3DDevice;
005a38ba      m_pDirect3DDevice_9->vtable->SetRenderState(m_pDirect3DDevice_9, 0x17, 4);
005a38c7      struct IDirect3DDevice9* m_pDirect3DDevice_10 = this->m_pDirect3DDevice;
005a38cd      m_pDirect3DDevice_10->vtable->SetRenderState(m_pDirect3DDevice_10, 0x18, 1);
005a38da      struct IDirect3DDevice9* m_pDirect3DDevice_11 = this->m_pDirect3DDevice;
005a38e0      m_pDirect3DDevice_11->vtable->SetRenderState(m_pDirect3DDevice_11, 0x19, 7);
005a38ed      struct IDirect3DDevice9* m_pDirect3DDevice_12 = this->m_pDirect3DDevice;
005a38f3      m_pDirect3DDevice_12->vtable->SetRenderState(m_pDirect3DDevice_12, 0x1a, 1);
005a3900      struct IDirect3DDevice9* m_pDirect3DDevice_13 = this->m_pDirect3DDevice;
005a3906      m_pDirect3DDevice_13->vtable->SetRenderState(m_pDirect3DDevice_13, 0x1b, 1);
005a3913      struct IDirect3DDevice9* m_pDirect3DDevice_14 = this->m_pDirect3DDevice;
005a3919      m_pDirect3DDevice_14->vtable->SetRenderState(m_pDirect3DDevice_14, 0x1c, 1);
005a3926      struct IDirect3DDevice9* m_pDirect3DDevice_15 = this->m_pDirect3DDevice;
005a392c      m_pDirect3DDevice_15->vtable->SetRenderState(m_pDirect3DDevice_15, 0x1d, 0);
005a3939      struct IDirect3DDevice9* m_pDirect3DDevice_16 = this->m_pDirect3DDevice;
005a393f      m_pDirect3DDevice_16->vtable->SetRenderState(m_pDirect3DDevice_16, 0x22, 0xaaaaaa);
005a394f      struct IDirect3DDevice9* m_pDirect3DDevice_17 = this->m_pDirect3DDevice;
005a3955      m_pDirect3DDevice_17->vtable->SetRenderState(m_pDirect3DDevice_17, 0x23, 0);
005a3962      struct IDirect3DDevice9* m_pDirect3DDevice_18 = this->m_pDirect3DDevice;
005a3968      m_pDirect3DDevice_18->vtable->SetRenderState(m_pDirect3DDevice_18, 0x24, 0x43c80000);
005a3980      struct IDirect3DDevice9* m_pDirect3DDevice_19 = this->m_pDirect3DDevice;
005a3986      m_pDirect3DDevice_19->vtable->SetRenderState(m_pDirect3DDevice_19, 0x25, 0x44fa0000);
005a399e      struct IDirect3DDevice9* m_pDirect3DDevice_20 = this->m_pDirect3DDevice;
005a39a4      m_pDirect3DDevice_20->vtable->SetRenderState(m_pDirect3DDevice_20, 0x26, 0x3e4ccccd);
005a39bc      struct IDirect3DDevice9* m_pDirect3DDevice_21 = this->m_pDirect3DDevice;
005a39c2      m_pDirect3DDevice_21->vtable->SetRenderState(m_pDirect3DDevice_21, 0x30, 1);
005a39cf      struct IDirect3DDevice9* m_pDirect3DDevice_22 = this->m_pDirect3DDevice;
005a39d5      m_pDirect3DDevice_22->vtable->SetRenderState(m_pDirect3DDevice_22, 0x34, 0);
005a39e2      struct IDirect3DDevice9* m_pDirect3DDevice_23 = this->m_pDirect3DDevice;
005a39e8      m_pDirect3DDevice_23->vtable->SetRenderState(m_pDirect3DDevice_23, 0x35, 1);
005a39f5      struct IDirect3DDevice9* m_pDirect3DDevice_24 = this->m_pDirect3DDevice;
005a39fb      m_pDirect3DDevice_24->vtable->SetRenderState(m_pDirect3DDevice_24, 0x36, 1);
005a3a08      struct IDirect3DDevice9* m_pDirect3DDevice_25 = this->m_pDirect3DDevice;
005a3a0e      m_pDirect3DDevice_25->vtable->SetRenderState(m_pDirect3DDevice_25, 0x37, 1);
005a3a1b      struct IDirect3DDevice9* m_pDirect3DDevice_26 = this->m_pDirect3DDevice;
005a3a21      m_pDirect3DDevice_26->vtable->SetRenderState(m_pDirect3DDevice_26, 0x38, 8);
005a3a2e      struct IDirect3DDevice9* m_pDirect3DDevice_27 = this->m_pDirect3DDevice;
005a3a34      m_pDirect3DDevice_27->vtable->SetRenderState(m_pDirect3DDevice_27, 0x39, 0);
005a3a41      struct IDirect3DDevice9* m_pDirect3DDevice_28 = this->m_pDirect3DDevice;
005a3a47      m_pDirect3DDevice_28->vtable->SetRenderState(m_pDirect3DDevice_28, 0x3a, 0xffffffff);
005a3a54      struct IDirect3DDevice9* m_pDirect3DDevice_29 = this->m_pDirect3DDevice;
005a3a5a      m_pDirect3DDevice_29->vtable->SetRenderState(m_pDirect3DDevice_29, 0x3b, 0xffffffff);
005a3a67      struct IDirect3DDevice9* m_pDirect3DDevice_30 = this->m_pDirect3DDevice;
005a3a6d      m_pDirect3DDevice_30->vtable->SetRenderState(m_pDirect3DDevice_30, 0x3c, 0xffffffff);
005a3a7a      struct IDirect3DDevice9* m_pDirect3DDevice_31 = this->m_pDirect3DDevice;
005a3a80      m_pDirect3DDevice_31->vtable->SetRenderState(m_pDirect3DDevice_31, 0x80, 0);
005a3a90      struct IDirect3DDevice9* m_pDirect3DDevice_32 = this->m_pDirect3DDevice;
005a3a96      m_pDirect3DDevice_32->vtable->SetRenderState(m_pDirect3DDevice_32, 0x81, 0);
005a3aa6      struct IDirect3DDevice9* m_pDirect3DDevice_33 = this->m_pDirect3DDevice;
005a3aac      m_pDirect3DDevice_33->vtable->SetRenderState(m_pDirect3DDevice_33, 0x82, 0);
005a3abc      struct IDirect3DDevice9* m_pDirect3DDevice_34 = this->m_pDirect3DDevice;
005a3ac2      m_pDirect3DDevice_34->vtable->SetRenderState(m_pDirect3DDevice_34, 0x83, 0);
005a3ad2      struct IDirect3DDevice9* m_pDirect3DDevice_35 = this->m_pDirect3DDevice;
005a3ad8      m_pDirect3DDevice_35->vtable->SetRenderState(m_pDirect3DDevice_35, 0x84, 0);
005a3ae8      struct IDirect3DDevice9* m_pDirect3DDevice_36 = this->m_pDirect3DDevice;
005a3aee      m_pDirect3DDevice_36->vtable->SetRenderState(m_pDirect3DDevice_36, 0x85, 0);
005a3afe      struct IDirect3DDevice9* m_pDirect3DDevice_37 = this->m_pDirect3DDevice;
005a3b04      m_pDirect3DDevice_37->vtable->SetRenderState(m_pDirect3DDevice_37, 0x86, 0);
005a3b14      struct IDirect3DDevice9* m_pDirect3DDevice_38 = this->m_pDirect3DDevice;
005a3b1a      m_pDirect3DDevice_38->vtable->SetRenderState(m_pDirect3DDevice_38, 0x87, 0);
005a3b2a      struct IDirect3DDevice9* m_pDirect3DDevice_39 = this->m_pDirect3DDevice;
005a3b30      m_pDirect3DDevice_39->vtable->SetRenderState(m_pDirect3DDevice_39, 0x88, 1);
005a3b40      struct IDirect3DDevice9* m_pDirect3DDevice_40 = this->m_pDirect3DDevice;
005a3b46      m_pDirect3DDevice_40->vtable->SetRenderState(m_pDirect3DDevice_40, 0x89, 0);
005a3b56      struct IDirect3DDevice9* m_pDirect3DDevice_41 = this->m_pDirect3DDevice;
005a3b5c      m_pDirect3DDevice_41->vtable->SetRenderState(m_pDirect3DDevice_41, 0x8b, 0);
005a3b6c      struct IDirect3DDevice9* m_pDirect3DDevice_42 = this->m_pDirect3DDevice;
005a3b72      m_pDirect3DDevice_42->vtable->SetRenderState(m_pDirect3DDevice_42, 0x8c, 3);
005a3b82      struct IDirect3DDevice9* m_pDirect3DDevice_43 = this->m_pDirect3DDevice;
005a3b88      m_pDirect3DDevice_43->vtable->SetRenderState(m_pDirect3DDevice_43, 0x8d, 1);
005a3b98      struct IDirect3DDevice9* m_pDirect3DDevice_44 = this->m_pDirect3DDevice;
005a3b9e      m_pDirect3DDevice_44->vtable->SetRenderState(m_pDirect3DDevice_44, 0x8e, 1);
005a3bae      struct IDirect3DDevice9* m_pDirect3DDevice_45 = this->m_pDirect3DDevice;
005a3bb4      m_pDirect3DDevice_45->vtable->SetRenderState(m_pDirect3DDevice_45, 0x8f, 1);
005a3bc4      struct IDirect3DDevice9* m_pDirect3DDevice_46 = this->m_pDirect3DDevice;
005a3bca      m_pDirect3DDevice_46->vtable->SetRenderState(m_pDirect3DDevice_46, 0x91, 0);
005a3bda      struct IDirect3DDevice9* m_pDirect3DDevice_47 = this->m_pDirect3DDevice;
005a3be0      m_pDirect3DDevice_47->vtable->SetRenderState(m_pDirect3DDevice_47, 0x92, 0);
005a3bf0      struct IDirect3DDevice9* m_pDirect3DDevice_48 = this->m_pDirect3DDevice;
005a3bf6      m_pDirect3DDevice_48->vtable->SetRenderState(m_pDirect3DDevice_48, 0x93, 0);
005a3c06      struct IDirect3DDevice9* m_pDirect3DDevice_49 = this->m_pDirect3DDevice;
005a3c0c      m_pDirect3DDevice_49->vtable->SetRenderState(m_pDirect3DDevice_49, 0x94, 0);
005a3c1c      struct IDirect3DDevice9* m_pDirect3DDevice_50 = this->m_pDirect3DDevice;
005a3c22      m_pDirect3DDevice_50->vtable->SetRenderState(m_pDirect3DDevice_50, 0x97, 0);
005a3c32      struct IDirect3DDevice9* m_pDirect3DDevice_51 = this->m_pDirect3DDevice;
005a3c38      m_pDirect3DDevice_51->vtable->SetRenderState(m_pDirect3DDevice_51, 0x98, 0);
005a3c54      struct IDirect3DDevice9* m_pDirect3DDevice_52 = this->m_pDirect3DDevice;
005a3c5a      m_pDirect3DDevice_52->vtable->SetRenderState(m_pDirect3DDevice_52, 0x9a, 0x3f800000);
005a3c69      struct IDirect3DDevice9* m_pDirect3DDevice_53 = this->m_pDirect3DDevice;
005a3c6f      m_pDirect3DDevice_53->vtable->SetRenderState(m_pDirect3DDevice_53, 0x9b, 0);
005a3c8a      struct IDirect3DDevice9* m_pDirect3DDevice_54 = this->m_pDirect3DDevice;
005a3c90      m_pDirect3DDevice_54->vtable->SetRenderState(m_pDirect3DDevice_54, 0x9c, 0);
005a3ca0      struct IDirect3DDevice9* m_pDirect3DDevice_55 = this->m_pDirect3DDevice;
005a3ca6      m_pDirect3DDevice_55->vtable->SetRenderState(m_pDirect3DDevice_55, 0x9d, 0);
005a3cb6      struct IDirect3DDevice9* m_pDirect3DDevice_56 = this->m_pDirect3DDevice;
005a3cbc      m_pDirect3DDevice_56->vtable->SetRenderState(m_pDirect3DDevice_56, 0x9e, 0);
005a3cd7      struct IDirect3DDevice9* m_pDirect3DDevice_57 = this->m_pDirect3DDevice;
005a3cdd      m_pDirect3DDevice_57->vtable->SetRenderState(m_pDirect3DDevice_57, 0x9f, 0);
005a3cf8      struct IDirect3DDevice9* m_pDirect3DDevice_58 = this->m_pDirect3DDevice;
005a3cfe      m_pDirect3DDevice_58->vtable->SetRenderState(m_pDirect3DDevice_58, 0xa0, 0x3f800000);
005a3d25      int32_t ecx_29;
005a3d25      
005a3d25      if ((this->m_displayInfo.bMultiSampling == 0 || this->m_presentation.Antialiasing == 0))
005a3d2e          ecx_29 = 0;
005a3d25      else
005a3d27          ecx_29 = 1;
005a3d27      
005a3d30      struct IDirect3DDevice9* m_pDirect3DDevice_59 = this->m_pDirect3DDevice;
005a3d36      m_pDirect3DDevice_59->vtable->SetRenderState(m_pDirect3DDevice_59, 0xa1, ecx_29);
005a3d45      struct IDirect3DDevice9* m_pDirect3DDevice_60 = this->m_pDirect3DDevice;
005a3d4b      m_pDirect3DDevice_60->vtable->SetRenderState(m_pDirect3DDevice_60, 0xa2, 0xffffffff);
005a3d5b      struct IDirect3DDevice9* m_pDirect3DDevice_61 = this->m_pDirect3DDevice;
005a3d61      m_pDirect3DDevice_61->vtable->SetRenderState(m_pDirect3DDevice_61, 0xa3, 0);
005a3d71      struct IDirect3DDevice9* m_pDirect3DDevice_62 = this->m_pDirect3DDevice;
005a3d77      m_pDirect3DDevice_62->vtable->SetRenderState(m_pDirect3DDevice_62, 0xa5, 0);
005a3d87      float MaxPointSize = this->m_D3DCaps.MaxPointSize;
005a3d8d      struct IDirect3DDevice9* m_pDirect3DDevice_63 = this->m_pDirect3DDevice;
005a3d9c      float MaxPointSize_1 = MaxPointSize;
005a3d93      m_pDirect3DDevice_63->vtable->SetRenderState(m_pDirect3DDevice_63, 0xa6, MaxPointSize);
005a3da6      struct IDirect3DDevice9* m_pDirect3DDevice_64 = this->m_pDirect3DDevice;
005a3dac      m_pDirect3DDevice_64->vtable->SetRenderState(m_pDirect3DDevice_64, 0xa7, 0);
005a3dbc      struct IDirect3DDevice9* m_pDirect3DDevice_65 = this->m_pDirect3DDevice;
005a3dc2      m_pDirect3DDevice_65->vtable->SetRenderState(m_pDirect3DDevice_65, 0xa8, 7);
005a3dd2      struct IDirect3DDevice9* m_pDirect3DDevice_66 = this->m_pDirect3DDevice;
005a3dd8      m_pDirect3DDevice_66->vtable->SetRenderState(m_pDirect3DDevice_66, 0xaa, 0);
005a3df3      struct IDirect3DDevice9* m_pDirect3DDevice_67 = this->m_pDirect3DDevice;
005a3df9      m_pDirect3DDevice_67->vtable->SetRenderState(m_pDirect3DDevice_67, 0xab, 1);
005a3e09      struct IDirect3DDevice9* m_pDirect3DDevice_68 = this->m_pDirect3DDevice;
005a3e0f      m_pDirect3DDevice_68->vtable->SetRenderState(m_pDirect3DDevice_68, 0xac, 3);
005a3e1f      struct IDirect3DDevice9* m_pDirect3DDevice_69 = this->m_pDirect3DDevice;
005a3e25      m_pDirect3DDevice_69->vtable->SetRenderState(m_pDirect3DDevice_69, 0xad, 1);
005a3e35      struct IDirect3DDevice9* m_pDirect3DDevice_70 = this->m_pDirect3DDevice;
005a3e3b      m_pDirect3DDevice_70->vtable->SetRenderState(m_pDirect3DDevice_70, 0xae, 0);
005a3e4b      struct IDirect3DDevice9* m_pDirect3DDevice_71 = this->m_pDirect3DDevice;
005a3e51      m_pDirect3DDevice_71->vtable->SetRenderState(m_pDirect3DDevice_71, 0xb0, 0);
005a3e61      struct IDirect3DDevice9* m_pDirect3DDevice_72 = this->m_pDirect3DDevice;
005a3e67      m_pDirect3DDevice_72->vtable->SetRenderState(m_pDirect3DDevice_72, 0xb2, 0x3f800000);
005a3e82      struct IDirect3DDevice9* m_pDirect3DDevice_73 = this->m_pDirect3DDevice;
005a3e88      m_pDirect3DDevice_73->vtable->SetRenderState(m_pDirect3DDevice_73, 0xb3, 0x3f800000);
005a3ea3      struct IDirect3DDevice9* m_pDirect3DDevice_74 = this->m_pDirect3DDevice;
005a3ea9      m_pDirect3DDevice_74->vtable->SetRenderState(m_pDirect3DDevice_74, 0xb4, 0);
005a3ec4      struct IDirect3DDevice9* m_pDirect3DDevice_75 = this->m_pDirect3DDevice;
005a3eca      m_pDirect3DDevice_75->vtable->SetRenderState(m_pDirect3DDevice_75, 0xb5, 0);
005a3ee5      struct IDirect3DDevice9* m_pDirect3DDevice_76 = this->m_pDirect3DDevice;
005a3eeb      m_pDirect3DDevice_76->vtable->SetRenderState(m_pDirect3DDevice_76, 0xb6, 0x3f800000);
005a3f06      struct IDirect3DDevice9* m_pDirect3DDevice_77 = this->m_pDirect3DDevice;
005a3f0c      m_pDirect3DDevice_77->vtable->SetRenderState(m_pDirect3DDevice_77, 0xb7, 0);
005a3f27      struct IDirect3DDevice9* m_pDirect3DDevice_78 = this->m_pDirect3DDevice;
005a3f2d      m_pDirect3DDevice_78->vtable->SetRenderState(m_pDirect3DDevice_78, 0xb8, 0);
005a3f48      struct IDirect3DDevice9* m_pDirect3DDevice_79 = this->m_pDirect3DDevice;
005a3f4e      m_pDirect3DDevice_79->vtable->SetRenderState(m_pDirect3DDevice_79, 0xba, 1);
005a3f5e      struct IDirect3DDevice9* m_pDirect3DDevice_80 = this->m_pDirect3DDevice;
005a3f64      m_pDirect3DDevice_80->vtable->SetRenderState(m_pDirect3DDevice_80, 0xbb, 1);
005a3f74      struct IDirect3DDevice9* m_pDirect3DDevice_81 = this->m_pDirect3DDevice;
005a3f7a      m_pDirect3DDevice_81->vtable->SetRenderState(m_pDirect3DDevice_81, 0xbc, 1);
005a3f8a      struct IDirect3DDevice9* m_pDirect3DDevice_82 = this->m_pDirect3DDevice;
005a3f90      m_pDirect3DDevice_82->vtable->SetRenderState(m_pDirect3DDevice_82, 0xbd, 8);
005a3fa0      struct IDirect3DDevice9* m_pDirect3DDevice_83 = this->m_pDirect3DDevice;
005a3fa6      m_pDirect3DDevice_83->vtable->SetRenderState(m_pDirect3DDevice_83, 0xc1, 0xffffffff);
005a3fb6      struct IDirect3DDevice9* m_pDirect3DDevice_84 = this->m_pDirect3DDevice;
005a3fbc      m_pDirect3DDevice_84->vtable->SetRenderState(m_pDirect3DDevice_84, 0xc2, 0);
005a3fcc      struct IDirect3DDevice9* m_pDirect3DDevice_85 = this->m_pDirect3DDevice;
005a3fd2      m_pDirect3DDevice_85->vtable->SetRenderState(m_pDirect3DDevice_85, 0xc3, 0);
005a3fe2      int32_t i = 0;
005a3fe4      int32_t var_18 = 0;
005a3fe8      int32_t var_14 = 0;
005a3fe8      
005a4161      do
005a4161      {
005a4000          struct IDirect3DDevice9* m_pDirect3DDevice_86 = this->m_pDirect3DDevice;
005a4006          m_pDirect3DDevice_86->vtable->SetTextureStageState(m_pDirect3DDevice_86, i, 1, 1);
005a4014          struct IDirect3DDevice9* m_pDirect3DDevice_87 = this->m_pDirect3DDevice;
005a401a          m_pDirect3DDevice_87->vtable->SetTextureStageState(m_pDirect3DDevice_87, i, 2, 2);
005a4028          struct IDirect3DDevice9* m_pDirect3DDevice_88 = this->m_pDirect3DDevice;
005a402e          m_pDirect3DDevice_88->vtable->SetTextureStageState(m_pDirect3DDevice_88, i, 3, 0);
005a403c          struct IDirect3DDevice9* m_pDirect3DDevice_89 = this->m_pDirect3DDevice;
005a4042          m_pDirect3DDevice_89->vtable->SetTextureStageState(m_pDirect3DDevice_89, i, 4, 1);
005a4050          struct IDirect3DDevice9* m_pDirect3DDevice_90 = this->m_pDirect3DDevice;
005a4056          m_pDirect3DDevice_90->vtable->SetTextureStageState(m_pDirect3DDevice_90, i, 5, 2);
005a4064          struct IDirect3DDevice9* m_pDirect3DDevice_91 = this->m_pDirect3DDevice;
005a406a          m_pDirect3DDevice_91->vtable->SetTextureStageState(m_pDirect3DDevice_91, i, 6, 0);
005a4078          struct IDirect3DDevice9* m_pDirect3DDevice_92 = this->m_pDirect3DDevice;
005a407e          m_pDirect3DDevice_92->vtable->SetTextureStageState(m_pDirect3DDevice_92, i, 7, 0);
005a408b          struct IDirect3DDevice9* m_pDirect3DDevice_93 = this->m_pDirect3DDevice;
005a4091          m_pDirect3DDevice_93->vtable->SetTextureStageState(m_pDirect3DDevice_93, i, 8, 0);
005a40a2          struct IDirect3DDevice9* m_pDirect3DDevice_94 = this->m_pDirect3DDevice;
005a40a8          m_pDirect3DDevice_94->vtable->SetTextureStageState(m_pDirect3DDevice_94, i, 9, 0);
005a40b9          struct IDirect3DDevice9* m_pDirect3DDevice_95 = this->m_pDirect3DDevice;
005a40bf          m_pDirect3DDevice_95->vtable->SetTextureStageState(m_pDirect3DDevice_95, i, 0xa, 0);
005a40cc          struct IDirect3DDevice9* m_pDirect3DDevice_96 = this->m_pDirect3DDevice;
005a40d2          m_pDirect3DDevice_96->vtable->SetTextureStageState(m_pDirect3DDevice_96, i, 0xb, i);
005a40df          struct IDirect3DDevice9* m_pDirect3DDevice_97 = this->m_pDirect3DDevice;
005a40e5          m_pDirect3DDevice_97->vtable->SetTextureStageState(m_pDirect3DDevice_97, i, 0x16, 0);
005a40fa          struct IDirect3DDevice9* m_pDirect3DDevice_98 = this->m_pDirect3DDevice;
005a4100          m_pDirect3DDevice_98->vtable->SetTextureStageState(m_pDirect3DDevice_98, i, 0x17, 0);
005a410d          struct IDirect3DDevice9* m_pDirect3DDevice_99 = this->m_pDirect3DDevice;
005a4113          m_pDirect3DDevice_99->vtable->SetTextureStageState(m_pDirect3DDevice_99, i, 0x18, 0);
005a4121          struct IDirect3DDevice9* m_pDirect3DDevice_100 = this->m_pDirect3DDevice;
005a4127          m_pDirect3DDevice_100->vtable->SetTextureStageState(m_pDirect3DDevice_100, i, 0x1a, 1);
005a4135          struct IDirect3DDevice9* m_pDirect3DDevice_101 = this->m_pDirect3DDevice;
005a413b          m_pDirect3DDevice_101->vtable->SetTextureStageState(m_pDirect3DDevice_101, i, 0x1b, 1);
005a4149          struct IDirect3DDevice9* m_pDirect3DDevice_102 = this->m_pDirect3DDevice;
005a414f          m_pDirect3DDevice_102->vtable->SetTextureStageState(m_pDirect3DDevice_102, i, 0x1c, 1);
005a415d          i += 1;
005a4161      } while (i < 8);
005a4161      
005a4280      for (int32_t i_1 = 0; i_1 < 0x10; i_1 += 1)
005a4280      {
005a4170          struct IDirect3DDevice9* m_pDirect3DDevice_103 = this->m_pDirect3DDevice;
005a4176          m_pDirect3DDevice_103->vtable->SetSamplerState(m_pDirect3DDevice_103, i_1, 1, 1);
005a4184          struct IDirect3DDevice9* m_pDirect3DDevice_104 = this->m_pDirect3DDevice;
005a418a          m_pDirect3DDevice_104->vtable->SetSamplerState(m_pDirect3DDevice_104, i_1, 2, 1);
005a4198          struct IDirect3DDevice9* m_pDirect3DDevice_105 = this->m_pDirect3DDevice;
005a419e          m_pDirect3DDevice_105->vtable->SetSamplerState(m_pDirect3DDevice_105, i_1, 3, 3);
005a41ac          struct IDirect3DDevice9* m_pDirect3DDevice_106 = this->m_pDirect3DDevice;
005a41b2          m_pDirect3DDevice_106->vtable->SetSamplerState(m_pDirect3DDevice_106, i_1, 4, 0);
005a41c0          struct IDirect3DDevice9* m_pDirect3DDevice_107 = this->m_pDirect3DDevice;
005a41c6          m_pDirect3DDevice_107->vtable->SetSamplerState(m_pDirect3DDevice_107, i_1, 5, 2);
005a41d4          struct IDirect3DDevice9* m_pDirect3DDevice_108 = this->m_pDirect3DDevice;
005a41da          m_pDirect3DDevice_108->vtable->SetSamplerState(m_pDirect3DDevice_108, i_1, 6, 2);
005a41e8          struct IDirect3DDevice9* m_pDirect3DDevice_109 = this->m_pDirect3DDevice;
005a41ee          m_pDirect3DDevice_109->vtable->SetSamplerState(m_pDirect3DDevice_109, i_1, 7, 1);
005a41fc          struct IDirect3DDevice9* m_pDirect3DDevice_110 = this->m_pDirect3DDevice;
005a4202          m_pDirect3DDevice_110->vtable->SetSamplerState(m_pDirect3DDevice_110, i_1, 8, 0);
005a4210          struct IDirect3DDevice9* m_pDirect3DDevice_111 = this->m_pDirect3DDevice;
005a4216          m_pDirect3DDevice_111->vtable->SetSamplerState(m_pDirect3DDevice_111, i_1, 9, 0);
005a422a          struct IDirect3DDevice9* m_pDirect3DDevice_112 = this->m_pDirect3DDevice;
005a4230          m_pDirect3DDevice_112->vtable->SetSamplerState(m_pDirect3DDevice_112, i_1, 0xa, this->m_D3DCaps.MaxAnisotropy);
005a423d          struct IDirect3DDevice9* m_pDirect3DDevice_113 = this->m_pDirect3DDevice;
005a4243          m_pDirect3DDevice_113->vtable->SetSamplerState(m_pDirect3DDevice_113, i_1, 0xb, 0);
005a4251          struct IDirect3DDevice9* m_pDirect3DDevice_114 = this->m_pDirect3DDevice;
005a4257          m_pDirect3DDevice_114->vtable->SetSamplerState(m_pDirect3DDevice_114, i_1, 0xc, 0);
005a4265          struct IDirect3DDevice9* m_pDirect3DDevice_115 = this->m_pDirect3DDevice;
005a426b          m_pDirect3DDevice_115->vtable->SetSamplerState(m_pDirect3DDevice_115, i_1, 0xd, 0x100);
005a4280      }
005a4280      
005a4286      struct IDirect3DDevice9* m_pDirect3DDevice_116 = this->m_pDirect3DDevice;
005a428c      m_pDirect3DDevice_116->vtable->SetRenderState(m_pDirect3DDevice_116, 0x8c, 3);
005a429c      struct IDirect3DDevice9* m_pDirect3DDevice_117 = this->m_pDirect3DDevice;
005a42a2      m_pDirect3DDevice_117->vtable->SetRenderState(m_pDirect3DDevice_117, 0x30, 1);
005a42b2      struct IDirect3DDevice9* m_pDirect3DDevice_118 = this->m_pDirect3DDevice;
005a42be      int32_t ecx_58;
005a42be      ecx_58 = this->m_caps.bHardwareVertexProcessing == 0;
005a42b8      m_pDirect3DDevice_118->vtable->SetSoftwareVertexProcessing(m_pDirect3DDevice_118, ecx_58);
005a42cc      int32_t eax_1;
005a42cc      eax_1 = 1;
005a42d2      return 1;
005a3800  }

005a42d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005a42e0  void __stdcall PView::remove_views(class PView* this @ ecx, uint16_t arg2, uint32_t* arg3)

005a42e0  {
005a42e8      if (arg2 > 0)
005a42e8      {
005a42eb          uint32_t* esi_1 = arg3;
005a42f0          uint32_t i_1 = ((uint32_t)arg2);
005a430c          uint32_t i;
005a430c          
005a430c          do
005a430c          {
005a42f6              class CEnvCell* eax_2 = CEnvCell::GetVisible(*(uint32_t*)esi_1);
005a42f6              
005a4300              if (eax_2 != 0)
005a4302                  eax_2->num_view -= 1;
005a4302              
005a4308              esi_1 = &esi_1[1];
005a430b              i = i_1;
005a430b              i_1 -= 1;
005a430c          } while (i != 1);
005a42e8      }
005a42e0  }

005a4313                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005a4320  void __stdcall PView::GetClip(class PView* this @ ecx, enum Sidedness arg2, class CPolygon* arg3, struct Vec2Dscreen** arg4, int32_t* arg5, int32_t arg6)

005a4320  {
005a4336      *(uint32_t*)arg5 = 0;
005a4341      int32_t i = 0;
005a4341      
005a4345      if (arg3->num_pts > 0)
005a4345      {
005a4364          do
005a4364          {
005a4354              arg3->screen[i] = PrimD3DRender::xformStart(arg3->vertices[i], 1);
005a4361              i += 1;
005a4364          } while (i < ((uint32_t)arg3->num_pts));
005a4345      }
005a4345      
005a4376      if (arg6 == 0)
005a4376      {
005a442a          uint32_t num_pts_2 = ((uint32_t)arg3->num_pts);
005a442e          *(uint32_t*)arg5 = num_pts_2;
005a442e          
005a4431          if (arg2 != POSITIVE)
005a4431          {
005a445d              int32_t i_1 = 0;
005a445d              
005a4461              if (num_pts_2 > 0)
005a4461              {
005a4486                  do
005a4486                  {
005a447d                      arg4[i_1] = arg3->screen[((((uint32_t)arg3->num_pts) - i_1) - 1)];
005a4483                      i_1 += 1;
005a4486                  } while (i_1 < *(uint32_t*)arg5);
005a4461              }
005a4431          }
005a4431          else
005a4431          {
005a4433              int32_t i_2 = 0;
005a4433              
005a4437              if (num_pts_2 > 0)
005a4437              {
005a444f                  do
005a444f                  {
005a4446                      arg4[i_2] = arg3->screen[i_2];
005a444c                      i_2 += 1;
005a444f                  } while (i_2 < *(uint32_t*)arg5);
005a4437              }
005a4431          }
005a4431          
005a4491          return;
005a4376      }
005a4376      
005a437e      if (arg2 == POSITIVE)
005a437e      {
005a4380          uint32_t num_pts = ((uint32_t)arg3->num_pts);
005a438b          struct Vec2Dscreen** screen = arg3->screen;
005a4394          Render::PolyCurrent = nullptr;
005a439e          Render::PolyCurrentMod = 1f;
005a43a8          Render::PolyCurrentPos = 1;
005a43b2          ACRender::polyClipFinish(screen, num_pts, arg4, arg5, 0);
005a43c3          return;
005a437e      }
005a437e      
005a43c6      uint32_t num_pts_1 = ((uint32_t)arg3->num_pts);
005a43ca      int32_t eax_6 = 0;
005a43ce      void var_80;
005a43ce      
005a43ce      if (num_pts_1 > 0)
005a43ce      {
005a43d3          void* edx_3 = &arg3->screen[(num_pts_1 - 1)];
005a43d3          
005a43e3          do
005a43e3          {
005a43d9              *(uint32_t*)(&var_80 + (eax_6 << 2)) = *(uint32_t*)edx_3;
005a43dd              eax_6 += 1;
005a43de              edx_3 -= 4;
005a43e3          } while (eax_6 < num_pts_1);
005a43ce      }
005a43ce      
005a43f6      Render::PolyCurrent = nullptr;
005a4400      Render::PolyCurrentMod = 1f;
005a440a      Render::PolyCurrentPos = 1;
005a4414      ACRender::polyClipFinish(&var_80, num_pts_1, arg4, arg5, 0);
005a4320  }

005a4494                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a44a0  void __thiscall DArray<portal_info>::grow(class DArray<portal_info>* this, uint32_t arg2)

005a44a0  {
005a44ab      if (arg2 <= this->sizeOf)
005a44ab      {
005a44ae          DArray<portal_info>::shrink(this, arg2);
005a44b5          return;
005a44ab      }
005a44ab      
005a44c1      void* eax_1 = operator new[]((arg2 << 3));
005a44ce      int32_t i = 0;
005a44ce      
005a44d2      if (this->sizeOf > 0)
005a44d2      {
005a44ea          do
005a44ea          {
005a44d4              struct portal_info* data = this->data;
005a44d9              *(uint32_t*)((char*)eax_1 + (i << 3)) = data[i].seen;
005a44e0              *(uint32_t*)(((char*)eax_1 + (i << 3)) + 4) = data[i].inflag;
005a44e7              i += 1;
005a44ea          } while (i < this->sizeOf);
005a44d2      }
005a44d2      
005a44ef      operator delete[](this->data);
005a44f7      this->data = eax_1;
005a44fa      this->sizeOf = arg2;
005a44a0  }

005a4502        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005a4510  void __thiscall DArray<CEnvCell *>::grow(class DArray<CEnvCell *>* this, uint32_t arg2)

005a4510  {
005a451b      if (arg2 <= this->sizeOf)
005a451b      {
005a451e          DArray<CEnvCell *>::shrink(this, arg2);
005a4525          return;
005a451b      }
005a451b      
005a4531      void* eax_1 = operator new[]((arg2 << 2));
005a453e      int32_t i = 0;
005a453e      
005a4542      if (this->sizeOf > 0)
005a4542      {
005a4552          do
005a4552          {
005a4549              *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
005a454f              i += 1;
005a4552          } while (i < this->sizeOf);
005a4542      }
005a4542      
005a4557      operator delete[](this->data);
005a455f      this->data = eax_1;
005a4562      this->sizeOf = arg2;
005a4510  }

005a456a                                90 90 90 90 90 90                                                            ......

005a4570  void __thiscall DArray<CellListType *>::grow(class DArray<CellListType *>* this, uint32_t arg2)

005a4570  {
005a457b      if (arg2 <= this->sizeOf)
005a457b      {
005a457e          DArray<CellListType *>::shrink(this, arg2);
005a4585          return;
005a457b      }
005a457b      
005a4591      void* eax_1 = operator new[]((arg2 << 2));
005a459e      int32_t i = 0;
005a459e      
005a45a2      if (this->sizeOf > 0)
005a45a2      {
005a45b2          do
005a45b2          {
005a45a9              *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
005a45af              i += 1;
005a45b2          } while (i < this->sizeOf);
005a45a2      }
005a45a2      
005a45b7      operator delete[](this->data);
005a45bf      this->data = eax_1;
005a45c2      this->sizeOf = arg2;
005a4570  }

005a45ca                                90 90 90 90 90 90                                                            ......

005a45d0  void __thiscall DArray<portal_view_type *>::grow(class DArray<portal_view_type *>* this, uint32_t arg2)

005a45d0  {
005a45db      if (arg2 <= this->sizeOf)
005a45db      {
005a45de          DArray<portal_view_type *>::shrink(this, arg2);
005a45e5          return;
005a45db      }
005a45db      
005a45f1      void* eax_1 = operator new[]((arg2 << 2));
005a45fe      int32_t i = 0;
005a45fe      
005a4602      if (this->sizeOf > 0)
005a4602      {
005a4612          do
005a4612          {
005a4609              *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
005a460f              i += 1;
005a4612          } while (i < this->sizeOf);
005a4602      }
005a4602      
005a4617      operator delete[](this->data);
005a461f      this->data = eax_1;
005a4622      this->sizeOf = arg2;
005a45d0  }

005a462a                                90 90 90 90 90 90                                                            ......

005a4630  void __thiscall DArray<portal_info>::shrink(class DArray<portal_info>* this, uint32_t arg2)

005a4630  {
005a463d      if (arg2 > this->sizeOf)
005a463d      {
005a4640          DArray<portal_info>::grow(this, arg2);
005a4647          return;
005a463d      }
005a463d      
005a464c      if (arg2 != 0)
005a464c      {
005a4669          void* eax_1 = operator new[]((arg2 << 3));
005a4673          int32_t i = 0;
005a4677          this->sizeOf = arg2;
005a4677          
005a467a          if (arg2 > 0)
005a467a          {
005a4696              do
005a4696              {
005a4680                  struct portal_info* data_1 = this->data;
005a4685                  *(uint32_t*)((char*)eax_1 + (i << 3)) = data_1[i].seen;
005a468c                  *(uint32_t*)(((char*)eax_1 + (i << 3)) + 4) = data_1[i].inflag;
005a4693                  i += 1;
005a4696              } while (i < this->sizeOf);
005a467a          }
005a467a          
005a469b          operator delete[](this->data);
005a46a3          this->data = eax_1;
005a464c      }
005a464c      else
005a464c      {
005a464e          struct portal_info* data = this->data;
005a4651          this->sizeOf = arg2;
005a4654          operator delete[](data);
005a465c          this->data = arg2;
005a464c      }
005a464c      
005a46a9      if (this->next_available > arg2)
005a46ab          this->next_available = arg2;
005a4630  }

005a46b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005a46c0  void __thiscall DArray<CEnvCell *>::shrink(class DArray<CEnvCell *>* this, uint32_t arg2)

005a46c0  {
005a46cd      if (arg2 > this->sizeOf)
005a46cd      {
005a46d0          DArray<CEnvCell *>::grow(this, arg2);
005a46d7          return;
005a46cd      }
005a46cd      
005a46dc      if (arg2 != 0)
005a46dc      {
005a46f9          void* eax_1 = operator new[]((arg2 << 2));
005a4703          int32_t i = 0;
005a4707          this->sizeOf = arg2;
005a4707          
005a470a          if (arg2 > 0)
005a470a          {
005a471e              do
005a471e              {
005a4715                  *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
005a471b                  i += 1;
005a471e              } while (i < this->sizeOf);
005a470a          }
005a470a          
005a4723          operator delete[](this->data);
005a472b          this->data = eax_1;
005a46dc      }
005a46dc      else
005a46dc      {
005a46de          class CEnvCell** data = this->data;
005a46e1          this->sizeOf = arg2;
005a46e4          operator delete[](data);
005a46ec          this->data = arg2;
005a46dc      }
005a46dc      
005a4731      if (this->next_available > arg2)
005a4733          this->next_available = arg2;
005a46c0  }

005a473b                                                                                   90 90 90 90 90                             .....

005a4740  void __thiscall DArray<CellListType *>::shrink(class DArray<CellListType *>* this, uint32_t arg2)

005a4740  {
005a474d      if (arg2 > this->sizeOf)
005a474d      {
005a4750          DArray<CellListType *>::grow(this, arg2);
005a4757          return;
005a474d      }
005a474d      
005a475c      if (arg2 != 0)
005a475c      {
005a4779          void* eax_1 = operator new[]((arg2 << 2));
005a4783          int32_t i = 0;
005a4787          this->sizeOf = arg2;
005a4787          
005a478a          if (arg2 > 0)
005a478a          {
005a479e              do
005a479e              {
005a4795                  *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
005a479b                  i += 1;
005a479e              } while (i < this->sizeOf);
005a478a          }
005a478a          
005a47a3          operator delete[](this->data);
005a47ab          this->data = eax_1;
005a475c      }
005a475c      else
005a475c      {
005a475e          class CellListType** data = this->data;
005a4761          this->sizeOf = arg2;
005a4764          operator delete[](data);
005a476c          this->data = arg2;
005a475c      }
005a475c      
005a47b1      if (this->next_available > arg2)
005a47b3          this->next_available = arg2;
005a4740  }

005a47bb                                                                                   90 90 90 90 90                             .....

005a47c0  void __thiscall DArray<portal_view_type *>::shrink(class DArray<portal_view_type *>* this, uint32_t arg2)

005a47c0  {
005a47cd      if (arg2 > this->sizeOf)
005a47cd      {
005a47d0          DArray<portal_view_type *>::grow(this, arg2);
005a47d7          return;
005a47cd      }
005a47cd      
005a47dc      if (arg2 != 0)
005a47dc      {
005a47f9          void* eax_1 = operator new[]((arg2 << 2));
005a4803          int32_t i = 0;
005a4807          this->sizeOf = arg2;
005a4807          
005a480a          if (arg2 > 0)
005a480a          {
005a481e              do
005a481e              {
005a4815                  *(uint32_t*)((char*)eax_1 + (i << 2)) = this->data[i];
005a481b                  i += 1;
005a481e              } while (i < this->sizeOf);
005a480a          }
005a480a          
005a4823          operator delete[](this->data);
005a482b          this->data = eax_1;
005a47dc      }
005a47dc      else
005a47dc      {
005a47de          struct portal_view_type** data = this->data;
005a47e1          this->sizeOf = arg2;
005a47e4          operator delete[](data);
005a47ec          this->data = arg2;
005a47dc      }
005a47dc      
005a4831      if (this->next_available > arg2)
005a4833          this->next_available = arg2;
005a47c0  }

005a483b                                                                                   90 90 90 90 90                             .....

005a4840  void __fastcall PView::DrawCells(class PView* this, int32_t arg2)

005a4840  {
005a4847      class PView* this_1 = this;
005a484e      class PView* this_2 = this_1;
005a484e      
005a4852      if (this_1->outside_view.view_count > 0)
005a4852      {
005a485a          Render::useSunlightSet(1);
005a485f          Render::PortalList = this_1;
005a486b          LScape::draw(this_1->lscape);
005a4872          D3DPolyRender::FlushAlphaList(0f);
005a4877          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
005a4886          RenderDevice::render_device_1->m_nFrameStamp += 1;
005a4893          bool cond:1_1;
005a4893          
005a4893          if (forceClear == 0)
005a4893          {
005a489c              cond:1_1 = ((uint32_t)D3DPolyRender::portalsDrawnCount) == 0;
005a489e              D3DPolyRender::portalsDrawnCount = 0;
005a4893          }
005a4893          
005a48a7          if ((forceClear != 0 || !(cond:1_1)))
005a48a9              RenderDevice::render_device->vtable->Clear(4, 0x820fc0, 0x3f800000);
005a48a9          
005a48c0          uint32_t cell_draw_num = this_1->cell_draw_num;
005a48c5          uint32_t cell_draw_num_3 = cell_draw_num;
005a48c5          
005a48c9          if (cell_draw_num > 0)
005a48c9          {
005a49eb              uint32_t i;
005a49eb              
005a49eb              do
005a49eb              {
005a48d3                  class CEnvCell* esi_1 = this_1->cell_draw_list.data[(cell_draw_num - 1)];
005a48d3                  
005a48e2                  if (esi_1->structure->drawing_bsp != 0)
005a48e2                  {
005a48f2                      RenderDeviceD3D::SetCurrentMaterial(RenderDevice::render_device, nullptr, 0);
005a48fe                      Render::SetSurfaceArray(esi_1->surfaces);
005a490f                      Render::object_scale_vec.x = 0x3f800000;
005a4933                      Render::object_scale_vec.y = 1f;
005a4939                      Render::object_scale_vec.z = 1f;
005a493e                      Render::object_scale = 1f;
005a4948                      Render::positionPush(3, &esi_1->pos.vtable);
005a494d                      uint32_t num_view = esi_1->num_view;
005a4958                      int16_t view_count;
005a4958                      
005a4958                      if (num_view != 0)
005a4958                      {
005a4969                          view_count = ((int16_t)esi_1->portal_view.data[(num_view - 1)]->view_count);
005a4969                          
005a496f                          if (view_count > 0)
005a496f                              goto label_5a4974;
005a4958                      }
005a4958                      else
005a4958                      {
005a495a                          view_count = -1;
005a4974                      label_5a4974:
005a4974                          uint32_t ebp_1 = 0;
005a4976                          uint32_t view_count_2 = ((uint32_t)view_count);
005a49db                          bool cond:4_1;
005a49db                          
005a49db                          do
005a49db                          {
005a4983                              CEnvCell::setup_view(esi_1, ebp_1);
005a498e                              int32_t j = 0;
005a498e                              
005a4992                              if (esi_1->num_portals > 0)
005a4992                              {
005a4994                                  int32_t edi = 0;
005a4994                                  
005a49cb                                  do
005a49cb                                  {
005a49a0                                      int32_t* portals = esi_1->portals;
005a49a0                                      
005a49af                                      if (*(uint32_t*)((char*)portals + edi) == 0xffffffff)
005a49b7                                          D3DPolyRender::DrawPortalPolyInternal(*(uint32_t*)(((char*)portals + edi) + 8), 0);
005a49b7                                      
005a49c5                                      j += 1;
005a49c6                                      edi += 0x18;
005a49cb                                  } while (j < esi_1->num_portals);
005a49cb                                  
005a49cd                                  this_1 = this_2;
005a4992                              }
005a4992                              
005a49d5                              ebp_1 += 1;
005a49d6                              cond:4_1 = view_count_2 != 1;
005a49d7                              view_count_2 -= 1;
005a49db                          } while (cond:4_1);
005a49dd                          cell_draw_num = cell_draw_num_3;
005a4958                      }
005a49e1                      Render::framePop();
005a48e2                  }
005a48e2                  
005a49e6                  i = cell_draw_num;
005a49e6                  cell_draw_num -= 1;
005a49e7                  cell_draw_num_3 = cell_draw_num;
005a49eb              } while (i != 1);
005a48c9          }
005a4852      }
005a4852      
005a49f3      Render::useSunlightSet(0);
005a49fb      Render::restore_all_lighting();
005a4a00      uint32_t cell_draw_num_1 = this_1->cell_draw_num;
005a4a00      
005a4a05      if (cell_draw_num_1 > 0)
005a4a05      {
005a4ad8          uint32_t i_1;
005a4ad8          
005a4ad8          do
005a4ad8          {
005a4a13              class CEnvCell* esi_2 = this_1->cell_draw_list.data[(cell_draw_num_1 - 1)];
005a4a13              
005a4a22              if (esi_2->structure->drawing_bsp != 0)
005a4a22              {
005a4a32                  RenderDeviceD3D::SetCurrentMaterial(RenderDevice::render_device, nullptr, 0);
005a4a3e                  Render::SetSurfaceArray(esi_2->surfaces);
005a4a4f                  Render::object_scale_vec.x = 0x3f800000;
005a4a73                  Render::object_scale_vec.y = 1f;
005a4a79                  Render::object_scale_vec.z = 1f;
005a4a7e                  Render::object_scale = 1f;
005a4a88                  Render::positionPush(3, &esi_2->pos.vtable);
005a4a8d                  uint32_t num_view_1 = esi_2->num_view;
005a4a98                  int16_t view_count_1;
005a4a98                  
005a4a98                  if (num_view_1 != 0)
005a4a98                  {
005a4aa9                      view_count_1 = ((int16_t)esi_2->portal_view.data[(num_view_1 - 1)]->view_count);
005a4aa9                      
005a4aaf                      if (view_count_1 > 0)
005a4aaf                          goto label_5a4ab1;
005a4a98                  }
005a4a98                  else
005a4a98                  {
005a4a9a                      view_count_1 = -1;
005a4ab1                  label_5a4ab1:
005a4ab1                      uint32_t edi_1 = 0;
005a4ab3                      uint32_t ebx_2 = ((uint32_t)view_count_1);
005a4acc                      uint32_t j_1;
005a4acc                      
005a4acc                      do
005a4acc                      {
005a4ab9                          CEnvCell::setup_view(esi_2, edi_1);
005a4abe                          RenderDevice::render_device->vtable->DrawEnvCell(esi_2);
005a4aca                          edi_1 += 1;
005a4acb                          j_1 = ebx_2;
005a4acb                          ebx_2 -= 1;
005a4acc                      } while (j_1 != 1);
005a4ace                      this_1 = this_2;
005a4a98                  }
005a4ad2                  Render::framePop();
005a4a22              }
005a4a22              
005a4ad7              i_1 = cell_draw_num_1;
005a4ad7              cell_draw_num_1 -= 1;
005a4ad8          } while (i_1 != 1);
005a4a05      }
005a4a05      
005a4ade      uint32_t cell_draw_num_2 = this_1->cell_draw_num;
005a4ade      
005a4ae3      if (cell_draw_num_2 > 0)
005a4ae3      {
005a4b1a          uint32_t i_2;
005a4b1a          
005a4b1a          do
005a4b1a          {
005a4af3              void* eax_17 = this_1->cell_draw_list.data[(cell_draw_num_2 - 1)];
005a4b07              Render::PortalList = *(uint32_t*)((*(uint32_t*)((char*)eax_17 + 0x138) + (*(uint32_t*)((char*)eax_17 + 0x134) << 2)) - 4);
005a4b0d              RenderDevice::render_device->vtable->DrawObjCellForDummies(eax_17);
005a4b19              i_2 = cell_draw_num_2;
005a4b19              cell_draw_num_2 -= 1;
005a4b1a          } while (i_2 != 1);
005a4ae3      }
005a4ae3      
005a4b42      Render::object_scale_vec.x = 0x3f800000;
005a4b47      Render::object_scale_vec.y = 1f;
005a4b4d      Render::object_scale_vec.z = 1f;
005a4b53      Render::object_scale = 1f;
005a4b5d      Render::useSunlightSet(1);
005a4840  }

005a4998                                                                          8d a4 24 00 00 00 00 90                          ..$.....
005a4a0d                                         8d 49 00                                                               .I.
005a4ae7                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
005a4b6f                                               90                                                                 .

005a4b70  void __stdcall PView::InitCell(class PView* this @ ecx, class CEnvCell* arg2, uint16_t arg3)

005a4b70  {
005a4b75      class CEnvCell* ebp = arg2;
005a4b86      int32_t* esi = ebp->portal_view.data[(ebp->num_view - 1)];
005a4b8d      int32_t i = 0;
005a4b8d      
005a4b91      if (esi[0xe] == 0)
005a4b9b          return;
005a4b9b      
005a4ba4      Render::positionPush(3, &ebp->pos);
005a4ba9      int32_t ecx_1 = esi[3];
005a4bac      esi[0xf] = 0;
005a4bb4      esi[0x10] = PView::master_timestamp;
005a4bb7      uint32_t num_portals = ebp->num_portals;
005a4bc2      arg2 = nullptr;
005a4bc2      
005a4bca      if (ecx_1 < num_portals)
005a4bcf          DArray<portal_info>::grow(esi, num_portals);
005a4bcf      
005a4bdb      int32_t var_4;
005a4bdb      
005a4bdb      if (ebp->num_portals > 0)
005a4bdb      {
005a4be1          int32_t edx_1 = 0;
005a4be3          int32_t var_8_1 = 0;
005a4be3          
005a4d0d          do
005a4d0d          {
005a4bfd              int32_t* ecx_4 = *(uint32_t*)(&ebp->portals->portal + edx_1);
005a4c01              int32_t eax_5;
005a4c01              
005a4c01              if (i == ((uint32_t)arg3))
005a4c03                  eax_5 = *(uint32_t*)esi;
005a4c03              
005a4c0f              if ((i != ((uint32_t)arg3) || *(uint32_t*)((eax_5 + (i << 3)) + 4) != 0))
005a4c0f              {
005a4c24                  *(uint32_t*)(*(uint32_t*)esi + (i << 3)) = 0;
005a4c2b                  float* Render::FrameCurrent_1 = Render::FrameCurrent;
005a4c45                  long double x87_r7_5 = ((((((long double)Render::FrameCurrent_1[2]) * ((long double)ecx_4[0xa])) + (((long double)Render::FrameCurrent_1[1]) * ((long double)ecx_4[9]))) + (((long double)ecx_4[8]) * ((long double)*(uint32_t*)Render::FrameCurrent_1))) + ((long double)ecx_4[0xb]));
005a4c48                  long double temp1_1 = ((long double)0.000199999995f);
005a4c48                  (x87_r7_5 - temp1_1);
005a4c4e                  Render::FrameCurrent_1 = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
005a4c53                  int32_t eax_9;
005a4c53                  
005a4c53                  if ((*(uint8_t*)((char*)Render::FrameCurrent_1)[1] & 0x41) != 0)
005a4c53                  {
005a4c63                      long double x87_r7_6 = -(((long double)0.000199999995f));
005a4c65                      (x87_r7_5 - x87_r7_6);
005a4c67                      Render::FrameCurrent_1 = ((((x87_r7_5 < x87_r7_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, x87_r7_6))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == x87_r7_6) ? 1 : 0) << 0xe) | 0))));
005a4c69                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a4c69                      
005a4c6c                      if (!(p_1))
005a4c6c                      {
005a4c6e                          eax_9 = 1;
005a4c6e                          goto label_5a4c79;
005a4c6c                      }
005a4c6c                      
005a4c8d                      *(uint32_t*)((*(uint32_t*)esi + (i << 3)) + 4) = 0;
005a4c95                      var_4 = 1;
005a4c53                  }
005a4c53                  else
005a4c53                  {
005a4c57                      eax_9 = 0;
005a4c79                  label_5a4c79:
005a4c79                      
005a4c7d                      if (eax_9 == *(uint32_t*)(&ebp->portals->portal_side + edx_1))
005a4c7d                      {
005a4c8d                          *(uint32_t*)((*(uint32_t*)esi + (i << 3)) + 4) = 0;
005a4c95                          var_4 = 1;
005a4c7d                      }
005a4c7d                      else
005a4c81                          *(uint32_t*)((*(uint32_t*)esi + (i << 3)) + 4) = 1;
005a4c53                  }
005a4c0f              }
005a4c0f              else
005a4c0f              {
005a4c11                  *(uint32_t*)((eax_5 + (i << 3)) + 4) = 1;
005a4c19                  *(uint32_t*)(*(uint32_t*)esi + (i << 3)) = 1;
005a4c0f              }
005a4c0f              
005a4ca4              if (*(uint32_t*)((*(uint32_t*)esi + (i << 3)) + 4) == 1)
005a4ca4              {
005a4ca6                  uint32_t j_3 = ((uint32_t)*(uint8_t*)((char*)ecx_4 + 0xe));
005a4ca6                  
005a4cac                  if (j_3 > 0)
005a4cac                  {
005a4cae                      struct frameContext* Render::FrameCurrent_2 = Render::FrameCurrent;
005a4cb4                      void** ecx_5 = *(uint32_t*)ecx_4;
005a4cb6                      uint32_t j_2 = j_3;
005a4cf7                      uint32_t j;
005a4cf7                      
005a4cf7                      do
005a4cf7                      {
005a4cb8                          float* eax_13 = *(uint32_t*)ecx_5;
005a4cbc                          (((long double)Render::FrameCurrent_2->viewer.viewpoint.x) - ((long double)*(uint32_t*)eax_13));
005a4cc1                          (((long double)Render::FrameCurrent_2->viewer.viewpoint.y) - ((long double)eax_13[1]));
005a4cc7                          long double x87_r5_2 = (((long double)Render::FrameCurrent_2->viewer.viewpoint.z) - ((long double)eax_13[2]));
005a4ce0                          long double temp2_1 = ((long double)arg2);
005a4ce0                          (x87_r5_2 - temp2_1);
005a4ce4                          eax_13 = ((((x87_r5_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r5_2 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
005a4ce4                          
005a4ce9                          if ((*(uint8_t*)((char*)eax_13)[1] & 0x41) == 0)
005a4ceb                              arg2 = ((float)x87_r5_2);
005a4ceb                          
005a4cf3                          ecx_5 = &ecx_5[1];
005a4cf6                          j = j_2;
005a4cf6                          j_2 -= 1;
005a4cf7                      } while (j != 1);
005a4cf9                      edx_1 = var_8_1;
005a4cac                  }
005a4ca4              }
005a4ca4              
005a4d03              i += 1;
005a4d04              edx_1 += 0x18;
005a4d09              var_8_1 = edx_1;
005a4d0d          } while (i < ebp->num_portals);
005a4bdb      }
005a4bdb      
005a4d1d      esi[0xd] = arg2;
005a4d1d      
005a4d29      if ((var_4 != 0 && esi[0xe] > 0))
005a4d29      {
005a4d2e          int32_t i_1 = 0;
005a4d2e          
005a4d6e          do
005a4d6e          {
005a4d32              Render::set_view(&esi[4], i_1);
005a4d40              int32_t j_1 = 0;
005a4d40              
005a4d44              if (ebp->num_portals > 0)
005a4d44              {
005a4d66                  do
005a4d66                  {
005a4d48                      int32_t* eax_18 = (*(uint32_t*)esi + (j_1 << 3));
005a4d48                      
005a4d55                      if ((eax_18[1] == 0 && *(uint32_t*)eax_18 == 0))
005a4d57                          *(uint32_t*)eax_18 = 1;
005a4d57                      
005a4d63                      j_1 += 1;
005a4d66                  } while (j_1 < ebp->num_portals);
005a4d44              }
005a4d44              
005a4d6b              i_1 += 1;
005a4d6e          } while (i_1 < esi[0xe]);
005a4d29      }
005a4d29      
005a4d73      esi[0x11] = esi[0xe];
005a4d76      Render::framePop();
005a4b70  }

005a4be9                             8d a4 24 00 00 00 00                                                           ..$....
005a4d8a                                90 90 90 90 90 90                                                            ......

005a4d90  void __stdcall PView::AddToCell(class PView* this @ ecx, class CEnvCell* arg2, uint16_t arg3)

005a4d90  {
005a4d9d      Render::positionPush(3, &arg2->pos);
005a4dae      int32_t* esi = arg2->portal_view.data[(arg2->num_view - 1)];
005a4dae      
005a4dbd      for (int32_t i = esi[0x11]; i < esi[0xe]; i += 1)
005a4dbd      {
005a4dc5          Render::set_view(&esi[4], i);
005a4dd3          int32_t j = 0;
005a4dd3          
005a4dd7          if (arg2->num_portals > 0)
005a4dd7          {
005a4e17              do
005a4e17              {
005a4de2                  if (j == ((uint32_t)arg3))
005a4de2                  {
005a4de4                      int32_t ecx_2 = *(uint32_t*)esi;
005a4de4                      
005a4def                      if (*(uint32_t*)((ecx_2 + (j << 3)) + 4) == 0)
005a4df1                          *(uint32_t*)((ecx_2 + (j << 3)) + 4) = 1;
005a4de2                  }
005a4de2                  
005a4df7                  int32_t ecx_4 = *(uint32_t*)esi;
005a4dfe                  int32_t* ecx_5 = (ecx_4 + (j << 3));
005a4dfe                  
005a4e06                  if ((*(uint32_t*)((ecx_4 + (j << 3)) + 4) == 0 && *(uint32_t*)ecx_5 == 0))
005a4e08                      *(uint32_t*)ecx_5 = 1;
005a4e08                  
005a4e14                  j += 1;
005a4e17              } while (j < arg2->num_portals);
005a4dd7          }
005a4dbd      }
005a4dbd      
005a4e22      Render::framePop();
005a4d90  }

005a4e2d                                         90 90 90                                                               ...

005a4e30  void __stdcall PView::SetOtherSeen(class PView* this @ ecx, class CEnvCell* arg2, uint32_t arg3)

005a4e30  {
005a4e42      void* ecx_1 = &arg2->portals[arg3];
005a4e45      void* eax_1 = *(uint32_t*)((char*)ecx_1 + 4);
005a4e48      int32_t ecx_2 = *(uint32_t*)((char*)ecx_1 + 0x10);
005a4e55      void* edx_1 = (*(uint32_t*)((char*)eax_1 + 0x10c) + (ecx_2 * 0x18));
005a4e6a      int32_t* eax_5 = (**(uint32_t**)((*(uint32_t*)((char*)eax_1 + 0x138) + (*(uint32_t*)((char*)eax_1 + 0x134) << 2)) - 4) + (ecx_2 << 3));
005a4e6a      
005a4e72      if (*(uint32_t*)((char*)edx_1 + 4) == 0)
005a4e74          *(uint32_t*)((char*)edx_1 + 4) = arg2;
005a4e74      
005a4e7e      if (eax_5[1] != 0)
005a4e80          *(uint32_t*)eax_5 = 1;
005a4e30  }

005a4e89                             90 90 90 90 90 90 90                                                           .......

005a4e90  int32_t __thiscall PView::AdjustDrawList(class PView* this, class CEnvCell* arg2, class CEnvCell* arg3)

005a4e90  {
005a4e90      class PView* this_1 = this;
005a4e99      int32_t i = 0;
005a4e99      
005a4e9e      if (this->cell_draw_num > 0)
005a4e9e      {
005a4ea4          uint32_t id_1 = arg3->m_DID.id;
005a4ea7          class CEnvCell** data_1 = this->cell_draw_list.data;
005a4eb1          this_1 = &this->cell_draw_list;
005a4eb5          class CEnvCell** data_2 = data_1;
005a4eb5          
005a4ece          do
005a4ece          {
005a4eb9              uint32_t id = *(uint32_t*)data_2->m_DID.id;
005a4eb9              
005a4ebe              if (id == id_1)
005a4ebe                  break;
005a4ebe              
005a4ec3              if (id == arg2->m_DID.id)
005a4ec3              {
005a4edd                  int32_t i_1 = i;
005a4edd                  
005a4edf                  if (i < this->cell_draw_num)
005a4edf                  {
005a4ee1                      void* eax_4 = &data_1[i];
005a4ee1                      
005a4ee9                      while (*(uint32_t*)(*(uint32_t*)eax_4 + 0x28) != id_1)
005a4ee9                      {
005a4eee                          i_1 += 1;
005a4eef                          eax_4 += 4;
005a4eef                          
005a4ef4                          if (i_1 >= this->cell_draw_num)
005a4ef4                              break;
005a4ee9                      }
005a4edf                  }
005a4edf                  
005a4ef6                  uint32_t cell_draw_num = this->cell_draw_num;
005a4ef6                  
005a4eff                  if (i_1 == cell_draw_num)
005a4eff                  {
005a4f04                      if (cell_draw_num >= this->cell_draw_list.sizeOf)
005a4f0c                          DArray<CEnvCell *>::grow(this_1, (cell_draw_num + 0x64));
005a4f0c                      
005a4f11                      this->cell_draw_num += 1;
005a4eff                  }
005a4eff                  
005a4f16                  int32_t i_2 = i_1;
005a4f16                  
005a4f18                  if (i_1 > i)
005a4f18                  {
005a4f2f                      do
005a4f2f                      {
005a4f20                          struct portal_info* data = this_1->outside_view.portal.data;
005a4f23                          int32_t edx_2 = *(uint32_t*)(((char*)data + (i_2 << 2)) - 4);
005a4f27                          void* ecx_5 = ((char*)data + (i_2 << 2));
005a4f2a                          i_2 -= 1;
005a4f2d                          *(uint32_t*)ecx_5 = edx_2;
005a4f2f                      } while (i_2 > i);
005a4f18                  }
005a4f18                  
005a4f39                  *(uint32_t*)(this_1->outside_view.portal.data + (i << 2)) = arg3;
005a4f45                  return 1;
005a4ec3              }
005a4ec3              
005a4ec8              i += 1;
005a4ec9              data_2 = &data_2[1];
005a4ece          } while (i < this->cell_draw_num);
005a4e9e      }
005a4e9e      
005a4ed7      return 0;
005a4e90  }

005a4f48                          90 90 90 90 90 90 90 90                                                          ........

005a4f50  void __thiscall PView::InsCellTodoList(class PView* this, class CEnvCell* arg2, float arg3)

005a4f50  {
005a4f54      uint32_t cell_todo_num = this->cell_todo_num;
005a4f54      
005a4f5b      if (cell_todo_num >= this->cell_todo_list.sizeOf)
005a4f5b      {
005a4f66          DArray<CellListType *>::grow(&this->cell_todo_list, (cell_todo_num + 0x1e));
005a4f66          
005a4f71          for (uint32_t cell_todo_num_1 = this->cell_todo_num; cell_todo_num_1 < this->cell_todo_list.sizeOf; cell_todo_num_1 += 1)
005a4f60              this->cell_todo_list.data[cell_todo_num_1] = 0;
005a4f5b      }
005a4f5b      
005a4f8e      if (this->cell_todo_list.data[this->cell_todo_num] == 0)
005a4f8e      {
005a4f92          void* eax_2 = operator new(8);
005a4f92          
005a4f9c          if (eax_2 == 0)
005a4fad              eax_2 = nullptr;
005a4f9c          else
005a4f9c          {
005a4f9e              *(uint32_t*)eax_2 = 0;
005a4fa4              *(uint32_t*)((char*)eax_2 + 4) = 0;
005a4f9c          }
005a4f9c          
005a4fb2          this->cell_todo_list.data[this->cell_todo_num] = eax_2;
005a4f8e      }
005a4f8e      
005a4fbe      class CEnvCell** ebx = this->cell_todo_list.data[this->cell_todo_num];
005a4fc9      *(uint32_t*)ebx = arg2;
005a4fcb      ebx[1] = arg3;
005a4fce      uint32_t cell_todo_num_2 = this->cell_todo_num;
005a4fce      
005a4fd3      if (cell_todo_num_2 > 0)
005a4fd3      {
005a4ff0          uint32_t i;
005a4ff0          
005a4ff0          do
005a4ff0          {
005a4fd5              class CellListType** data = this->cell_todo_list.data;
005a4fd8              long double x87_r7_1 = ((long double)arg3);
005a4fdc              void* edi_2 = data[(cell_todo_num_2 - 1)];
005a4fe0              long double temp1_1 = ((long double)*(uint32_t*)((char*)edi_2 + 4));
005a4fe0              (x87_r7_1 - temp1_1);
005a4fe3              void* edx_3 = &data[cell_todo_num_2];
005a4fe6              float eax_4;
005a4fe6              eax_4 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005a4fe8              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a4fe8              
005a4feb              if (!(p_1))
005a4feb                  break;
005a4feb              
005a4fed              i = cell_todo_num_2;
005a4fed              cell_todo_num_2 -= 1;
005a4fee              *(uint32_t*)edx_3 = edi_2;
005a4ff0          } while (i != 1);
005a4fd3      }
005a4fd3      
005a4ff2      this->cell_todo_list.data[cell_todo_num_2] = ebx;
005a4ffd      this->cell_todo_num += 1;
005a4f50  }

005a5005                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005a5010  void __thiscall PView::AdjustCellPlace(class PView* this, class CEnvCell* arg2, class CEnvCell* arg3)

005a5010  {
005a5024      class CEnvCell* edx = arg3->portal_view.data[(arg3->num_view - 1)];
005a5034      int32_t eax_2;
005a5034      int32_t ecx_2;
005a5034      eax_2 = PView::AdjustDrawList(this, arg2, arg3);
005a5034      
005a503b      if (eax_2 != 0)
005a503b      {
005a5044          int32_t i = 0;
005a5044          
005a5048          if (arg3->num_portals > 0)
005a5048          {
005a504b              int32_t ebx_1 = 0;
005a504b              
005a5086              do
005a5086              {
005a5054                  struct CEnvCell::VTable* vtable = edx->vtable;
005a5054                  
005a5065                  if ((*(uint32_t*)((char*)vtable + (i << 3)) == 1 && &vtable->IUnknown_AddRef[(i * 2)] == 1))
005a5075                      PView::AdjustCellPlace(this, arg3, *(uint32_t*)(&arg3->portals->other_cell_ptr + ebx_1));
005a5075                  
005a5080                  i += 1;
005a5081                  ebx_1 += 0x18;
005a5086              } while (i < arg3->num_portals);
005a5048          }
005a503b      }
005a5010  }

005a508f                                               90                                                                 .

005a5090  void __fastcall CEnvCell::curr_view_push(class CEnvCell* this)

005a5090  {
005a5093      uint32_t num_view = this->num_view;
005a5093      
005a50a4      if (num_view >= this->portal_view.sizeOf)
005a50a4      {
005a50b1          DArray<portal_view_type *>::grow(&this->portal_view, (num_view + 1));
005a50a8          this->portal_view.data[this->num_view] = 0;
005a50a4      }
005a50a4      
005a50d1      if (this->portal_view.data[this->num_view] == 0)
005a50d1      {
005a50d5          void* eax_3 = operator new(0x48);
005a50d5          
005a50df          if (eax_3 == 0)
005a510e              eax_3 = nullptr;
005a50df          else
005a50df          {
005a50e1              *(uint32_t*)eax_3 = 0;
005a50e3              *(uint32_t*)((char*)eax_3 + 0xc) = 0;
005a50e6              *(uint32_t*)((char*)eax_3 + 8) = 0;
005a50ee              *(uint32_t*)((char*)eax_3 + 4) = 0x80;
005a50f1              *(uint32_t*)((char*)eax_3 + 0x14) = 0;
005a50f4              *(uint32_t*)((char*)eax_3 + 0x20) = 0;
005a50f7              *(uint32_t*)((char*)eax_3 + 0x1c) = 0;
005a50fa              *(uint32_t*)((char*)eax_3 + 0x18) = 0x80;
005a50fd              *(uint32_t*)((char*)eax_3 + 0x24) = 0;
005a5100              *(uint32_t*)((char*)eax_3 + 0x30) = 0;
005a5103              *(uint32_t*)((char*)eax_3 + 0x2c) = 0;
005a5106              *(uint32_t*)((char*)eax_3 + 0x28) = 0x80;
005a5109              *(uint32_t*)((char*)eax_3 + 0x40) = 0;
005a50df          }
005a50df          
005a5116          this->portal_view.data[this->num_view] = eax_3;
005a50d1      }
005a50d1      
005a5125      this->portal_view.data[this->num_view]->view_count = 0;
005a5137      this->portal_view.data[this->num_view]->update_count = 0;
005a5149      this->portal_view.data[this->num_view]->view_timestamp = 0;
005a515d      this->num_view += 1;
005a5090  }

005a5165                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005a5170  void __fastcall PView::~PView(class PView* this)

005a5170  {
005a517a      int32_t i = 0;
005a517a      
005a517e      if (this->cell_todo_list.sizeOf > 0)
005a517e      {
005a519f          do
005a519f          {
005a5183              void* eax_2 = this->cell_todo_list.data[i];
005a5183              
005a5188              if (eax_2 != 0)
005a5188              {
005a518b                  operator delete(eax_2);
005a5190                  this->cell_todo_list.data[i] = 0;
005a5188              }
005a5188              
005a519c              i += 1;
005a519f          } while (i < this->cell_todo_list.sizeOf);
005a517e      }
005a517e      
005a51a5      operator delete[](this->cell_todo_list.data);
005a51aa      this->cell_todo_list.data = 0;
005a51b1      operator delete[](this->cell_draw_list.data);
005a51b6      this->cell_draw_list.data = 0;
005a51b9      struct view_vertex* data = this->outside_view.view.vertex.data;
005a51b9      
005a51c1      if (data != 0)
005a51c1      {
005a51c3          int32_t i_3 = *(uint32_t*)((char*)data->pt + -4);
005a51ce          void* edi = &data[i_3];
005a51ce          
005a51d1          if ((i_3 - 1) >= 0)
005a51d1          {
005a51d3              int32_t i_2 = i_3;
005a51e1              int32_t i_1;
005a51e1              
005a51e1              do
005a51e1              {
005a51d6                  edi -= 0x18;
005a51db                  IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(edi);
005a51e0                  i_1 = i_2;
005a51e0                  i_2 -= 1;
005a51e1              } while (i_1 != 1);
005a51d1          }
005a51d1          
005a51e6          operator delete[](((char*)data - 4));
005a51c1      }
005a51c1      
005a51ef      this->outside_view.view.vertex.data = 0;
005a51f6      operator delete[](this->outside_view.view.poly.data);
005a51fb      this->outside_view.view.poly.data = 0;
005a5201      operator delete[](this->outside_view.portal.data);
005a520a      this->outside_view.portal.data = 0;
005a5170  }

005a520f                                               90                                                                 .

005a5210  void __stdcall PView::add_views(class PView* this @ ecx, uint16_t arg2, uint32_t* arg3)

005a5210  {
005a5218      if (arg2 > 0)
005a5218      {
005a521b          uint32_t* esi_1 = arg3;
005a5220          uint32_t i_1 = ((uint32_t)arg2);
005a523d          uint32_t i;
005a523d          
005a523d          do
005a523d          {
005a5226              class CEnvCell* eax_2 = CEnvCell::GetVisible(*(uint32_t*)esi_1);
005a5226              
005a5230              if (eax_2 != 0)
005a5234                  CEnvCell::curr_view_push(eax_2);
005a5234              
005a5239              esi_1 = &esi_1[1];
005a523c              i = i_1;
005a523c              i_1 -= 1;
005a523d          } while (i != 1);
005a5218      }
005a5210  }

005a5244              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005a5250  void __thiscall PView::FixCellList(class PView* this, class CEnvCell* arg2, class CEnvCell* arg3)

005a5250  {
005a525e      PView::AdjustCellPlace(this, arg2, arg3);
005a5266      PView::AdjustCellView(this, arg2);
005a5250  }


005a5270  void __thiscall PView::PView(class PView* this, int32_t arg2)

005a5270  {
005a5274      this->outside_view.portal.data = 0;
005a5276      this->outside_view.portal.sizeOf = 0;
005a5279      this->outside_view.portal.next_available = 0;
005a5281      this->outside_view.portal.blocksize = 0x80;
005a5284      this->outside_view.view.poly.data = 0;
005a5287      this->outside_view.view.poly.sizeOf = 0;
005a528a      this->outside_view.view.poly.next_available = 0;
005a528d      this->outside_view.view.poly.blocksize = 0x80;
005a5290      this->outside_view.view.vertex.data = 0;
005a5293      this->outside_view.view.vertex.sizeOf = 0;
005a5296      this->outside_view.view.vertex.next_available = 0;
005a5299      this->outside_view.view.vertex.blocksize = 0x80;
005a529c      this->outside_view.view_timestamp = 0;
005a529f      this->cell_draw_list.data = 0;
005a52a2      this->cell_draw_list.sizeOf = 0;
005a52a5      this->cell_draw_list.next_available = 0;
005a52a8      this->cell_draw_list.blocksize = 0x80;
005a52ab      this->cell_todo_list.data = 0;
005a52ae      this->cell_todo_list.sizeOf = 0;
005a52b1      this->cell_todo_list.next_available = 0;
005a52b4      this->cell_todo_list.blocksize = 0x80;
005a52b7      this->cell_todo_num = 0;
005a52ba      this->lscape = nullptr;
005a52c1      this->draw_landscape = arg2;
005a5270  }

005a52c7                       90 90 90 90 90 90 90 90 90                                                         .........

005a52d0  void __thiscall PView::AddViewToPortals(class PView* this, class CEnvCell* arg2)

005a52d0  {
005a52d4      class CEnvCell* ebp = arg2;
005a52d8      class PView* this_1 = this;
005a52e0      uint32_t eax = 0;
005a52e4      class PView* this_2 = this_1;
005a52e8      uint32_t var_4 = 0;
005a52e8      
005a52ec      if (ebp->num_portals > 0)
005a52ec      {
005a52f5          arg2 = nullptr;
005a52f5          
005a531c          while (true)
005a531c          {
005a531c              void* ebx_2 = (ebp->portals + arg2);
005a531e              class CEnvCell* esi_2 = *(uint32_t*)((char*)ebx_2 + 4);
005a5323              int32_t* eax_1 = &ebp->portal_view.data[(ebp->num_view - 1)]->portal.data[eax];
005a5323              
005a5339              if ((esi_2 != 0 && (eax_1[1] != 1 && *(uint32_t*)eax_1 != 0)))
005a5339              {
005a533f                  uint32_t num_view = esi_2->num_view;
005a533f                  
005a5347                  if (num_view > 0)
005a5347                  {
005a5353                      void* edi_2 = esi_2->portal_view.data[(num_view - 1)];
005a5357                      int32_t eax_2 = *(uint32_t*)((char*)edi_2 + 0x38);
005a5357                      
005a535c                      if (eax_2 != 0)
005a535c                      {
005a535e                          int32_t ecx_5 = *(uint32_t*)((char*)edi_2 + 0x44);
005a535e                          
005a5363                          if (ecx_5 == 0)
005a5363                          {
005a536f                              int32_t eax_4 = PView::InitCell(this_1, esi_2, *(uint16_t*)((char*)ebx_2 + 0x10));
005a536f                              int16_t top = (top - 1);
005a536f                              /* unimplemented  {call PView::InitCell} */;
005a536f                              
005a5376                              if (eax_4 != 0)
005a5381                                  PView::InsCellTodoList(this_2, esi_2, *(uint32_t*)((char*)edi_2 + 0x34));
005a5381                              
005a53be                          label_5a53be:
005a53be                              
005a53c0                              if (*(uint32_t*)((char*)ebx_2 + 0x10) >= 0)
005a53cc                                  PView::SetOtherSeen(this_2, ebp, var_4);
005a5363                          }
005a5363                          else if (ecx_5 != eax_2)
005a538a                          {
005a5396                              PView::AddToCell(this_1, esi_2, *(uint16_t*)((char*)ebx_2 + 0x10));
005a5396                              
005a53a0                              if (*(uint32_t*)((char*)edi_2 + 0x3c) != 0)
005a53a0                              {
005a53b0                                  PView::FixCellList(this_2, esi_2, ebp);
005a53b8                                  *(uint32_t*)((char*)edi_2 + 0x44) = *(uint32_t*)((char*)edi_2 + 0x38);
005a53a0                              }
005a53a0                              else
005a53a5                                  *(uint32_t*)((char*)edi_2 + 0x44) = *(uint32_t*)((char*)edi_2 + 0x38);
005a53a5                              
005a53a0                              goto label_5a53be;
005a538a                          }
005a535c                      }
005a5347                  }
005a5339              }
005a5339              
005a53df              eax = (var_4 + 1);
005a53e5              var_4 = eax;
005a53e9              arg2 = &arg2->m_pNext;
005a53e9              
005a53ed              if (eax >= ebp->num_portals)
005a53ed                  break;
005a53ed              
005a52fb              this_1 = this_2;
005a531c          }
005a52ec      }
005a52d0  }

005a53fd                                                                                         90 90 90                               ...

005a5400  int80_t __thiscall PView::OtherPortalClip(class PView* this, class CCellPortal* arg2, struct Vec2Dscreen** arg3, int32_t* arg4)

005a5400  {
005a5400      class PView* this_1 = this;
005a5400      
005a5410      if (((*(uint8_t*)$S225) & 1) == 0)
005a5410      {
005a5425          $S225 |= 1;
005a542b          temp_view.portal.data = 0;
005a5431          temp_view.portal.sizeOf = 0;
005a5437          temp_view.portal.next_available = 0;
005a543d          temp_view.portal.blocksize = 0x80;
005a5442          temp_view.view.poly.data = 0;
005a5448          temp_view.view.poly.sizeOf = 0;
005a544e          temp_view.view.poly.next_available = 0;
005a5454          temp_view.view.poly.blocksize = 0x80;
005a5459          temp_view.view.vertex.data = 0;
005a545f          temp_view.view.vertex.sizeOf = 0;
005a5465          temp_view.view.vertex.next_available = 0;
005a546b          temp_view.view.vertex.blocksize = 0x80;
005a5470          temp_view.view_timestamp = 0;
005a5476          atexit($E226);
005a5410      }
005a5410      
005a5486      temp_view.view_count = 0;
005a5495      int32_t eax_2;
005a5495      int80_t result;
005a5495      result = Render::copy_view(&temp_view, arg3, *(uint32_t*)arg4);
005a5495      
005a549f      if (eax_2 == 0)
005a54a4          return result;
005a54a4      
005a54ab      class CEnvCell* other_cell_ptr = arg2->other_cell_ptr;
005a54b2      int32_t edx_3 = (arg2->other_portal_id * 3);
005a54b5      class CCellPortal* portals = other_cell_ptr->portals;
005a54c7      enum Sidedness edx_4;
005a54c7      edx_4 = &portals->portal_side[(edx_3 * 2)] == 0;
005a54d2      Render::positionPush(3, &other_cell_ptr->pos);
005a54dd      Render::set_view(&temp_view.view, 0);
005a54f6      PView::GetClip(this, edx_4, &portals->portal[(edx_3 * 2)], arg3, arg4, 1);
005a54fb      Render::framePop();
005a5509      int32_t eax_5;
005a5509      eax_5 = *(uint32_t*)arg4 != 0;
005a550e      return result;
005a5400  }

005a5511                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005a5520  int32_t __thiscall PView::ClipPortals(class PView* this, class CEnvCell* arg2, uint32_t arg3)

005a5520  {
005a5525      class CEnvCell* ebp = arg2;
005a5539      struct portal_view_type* eax_1 = ebp->portal_view.data[(ebp->num_view - 1)];
005a553e      Render::PortalList = eax_1;
005a5549      int32_t ebx = 0;
005a554c      int32_t edi = 0;
005a5550      arg2 = eax_1;
005a5554      int32_t var_c = 0;
005a5554      
005a5558      if (ebp->num_portals > 0)
005a5558      {
005a5560          while (true)
005a5560          {
005a5560              struct portal_info* data = eax_1->portal.data;
005a5560              
005a5570              if ((data[edi].seen != 0 && data[edi].inflag != 1))
005a5570              {
005a5572                  class CCellPortal* portals = ebp->portals;
005a557c                  void* esi_1 = ((char*)portals + ebx);
005a557c                  
005a5580                  if (*(uint32_t*)(&portals->other_cell_ptr + ebx) != 0)
005a5599                      var_c = 1;
005a5580                  else
005a5580                  {
005a5582                      uint32_t eax_4 = *(uint32_t*)esi_1;
005a5582                      
005a5587                      if (eax_4 == 0xffffffff)
005a5599                          var_c = 1;
005a5587                      else
005a5587                      {
005a558a                          class CEnvCell* eax_5 = CEnvCell::GetVisible(eax_4);
005a5594                          *(uint32_t*)((char*)esi_1 + 4) = eax_5;
005a5594                          
005a5597                          if (eax_5 != 0)
005a5599                              var_c = 1;
005a5587                      }
005a5580                  }
005a5570              }
005a5570              
005a55a7              edi += 1;
005a55a8              ebx += 0x18;
005a55a8              
005a55ad              if (edi >= ebp->num_portals)
005a55ad                  break;
005a55ad              
005a555c              eax_1 = arg2;
005a5560          }
005a5560          
005a55b5          if (var_c != 0)
005a55b5          {
005a55c9              Render::positionPush(3, &ebp->pos);
005a55d2              class CEnvCell* esi_2 = arg2;
005a55dc              bool cond:2 = arg3 >= esi_2->vtable;
005a55de              uint32_t i = arg3;
005a55e0              arg3 = i;
005a55e0              
005a55e4              if (!(cond:2))
005a55e4              {
005a574d                  do
005a574d                  {
005a55f5                      Render::set_view(&esi_2->m_timeStamp, i);
005a5600                      int32_t j = 0;
005a5607                      int32_t j_1 = 0;
005a5607                      
005a560b                      if (ebp->num_portals > 0)
005a560b                      {
005a5611                          int32_t var_c_1 = 0;
005a5611                          
005a5739                          do
005a5739                          {
005a5617                              void* eax_12 = (esi_2->vtable + (j << 3));
005a5617                              
005a5627                              if ((*(uint32_t*)eax_12 != 0 && *(uint32_t*)((char*)eax_12 + 4) != 1))
005a5627                              {
005a562d                                  class CCellPortal* portals_1 = ebp->portals;
005a5643                                  void* esi_3 = ((char*)portals_1 + var_c_1);
005a5655                                  uint32_t var_10;
005a5655                                  PView::GetClip(this, *(uint32_t*)(&portals_1->portal_side + var_c_1), *(uint32_t*)(&portals_1->portal + var_c_1), &clip_view, &var_10, 1);
005a565a                                  uint32_t ecx_8 = var_10;
005a565a                                  
005a5660                                  if (ecx_8 != 0)
005a5660                                  {
005a5669                                      void* edi_1 = *(uint32_t*)((char*)esi_3 + 4);
005a566c                                      class PView* this_1;
005a566c                                      struct Vec2Dscreen** var_28_3;
005a566c                                      uint32_t var_24_4;
005a566c                                      int16_t top;
005a566c                                      
005a566c                                      if (*(uint32_t*)esi_3 == 0xffffffff)
005a566c                                      {
005a566e                                          int32_t draw_landscape = this->draw_landscape;
005a566e                                          
005a5673                                          if (draw_landscape != 0)
005a5673                                          {
005a5681                                              if (cliplandscape != 0)
005a5681                                              {
005a5683                                                  var_24_4 = ecx_8;
005a5684                                                  var_28_3 = &clip_view;
005a5689                                                  this_1 = this;
005a5711                                              label_5a5711:
005a5711                                                  Render::copy_view(this_1, var_28_3, var_24_4);
005a5711                                                  top -= 1;
005a5711                                                  /* unimplemented  {call Render::copy_view} */;
005a5681                                              }
005a5681                                              else if (draw_landscape != 0)
005a5691                                              {
005a5697                                                  var_24_4 = 0;
005a5699                                                  var_28_3 = nullptr;
005a569b                                                  this_1 = this;
005a569c                                                  goto label_5a5711;
005a5691                                              }
005a5673                                          }
005a566c                                      }
005a566c                                      else if (edi_1 != 0)
005a56a0                                      {
005a56ae                                          if ((*(uint32_t*)((char*)esi_3 + 0x14) != 0 || *(uint32_t*)((char*)esi_3 + 0x10) < 0))
005a56a7                                              goto label_5a56f6;
005a56a7                                          
005a56bd                                          int32_t eax_16 = PView::OtherPortalClip(this, esi_3, &clip_view, &var_10);
005a56bd                                          top -= 1;
005a56bd                                          /* unimplemented  {call PView::OtherPortalClip} */;
005a56bd                                          
005a56c4                                          if (eax_16 != 0)
005a56c4                                          {
005a56ea                                              Render::set_view(&arg2->m_timeStamp, arg3);
005a56ef                                              ecx_8 = var_10;
005a56f6                                          label_5a56f6:
005a56f6                                              int32_t eax_22 = *(uint32_t*)((char*)edi_1 + 0x134);
005a56f6                                              
005a56fe                                              if (eax_22 > 0)
005a56fe                                              {
005a570a                                                  var_24_4 = ecx_8;
005a570b                                                  var_28_3 = &clip_view;
005a5710                                                  this_1 = *(uint32_t*)((*(uint32_t*)((char*)edi_1 + 0x138) + (eax_22 << 2)) - 4);
005a5710                                                  goto label_5a5711;
005a56fe                                              }
005a56c4                                          }
005a56c4                                          else
005a56d3                                              Render::set_view(&arg2->m_timeStamp, arg3);
005a56a0                                      }
005a5660                                  }
005a5627                              }
005a5627                              
005a5727                              esi_2 = arg2;
005a572b                              j = (j_1 + 1);
005a5731                              j_1 = j;
005a5735                              var_c_1 += 0x18;
005a5739                          } while (j < ebp->num_portals);
005a5739                          
005a573f                          i = arg3;
005a560b                      }
005a560b                      
005a5746                      i += 1;
005a5749                      arg3 = i;
005a574d                  } while (i < esi_2->vtable);
005a55e4              }
005a55e4              
005a5753              Render::framePop();
005a5764              return 1;
005a55b5          }
005a5558      }
005a5558      
005a55c0      return 0;
005a5520  }

005a5767                       90 90 90 90 90 90 90 90 90                                                         .........

005a5770  void __thiscall PView::AdjustCellView(class PView* this, class CEnvCell* arg2)

005a5770  {
005a5796      if (PView::ClipPortals(this, arg2, arg2->portal_view.data[(arg2->num_view - 1)]->update_count) != 0)
005a579b          PView::AddViewToPortals(this, arg2);
005a5770  }

005a57a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005a57b0  void __thiscall PView::ConstructView(class PView* this, class CEnvCell* arg2, uint16_t arg3)

005a57b0  {
005a57b3      this->outside_view.view_count = 0;
005a57ba      PView::master_timestamp += 1;
005a57cb      this->cell_todo_num = 0;
005a57d2      this->cell_draw_num = 0;
005a57d9      PView::InitCell(this, arg2, arg3);
005a57e3      PView::InsCellTodoList(this, arg2, 0f);
005a57e3      
005a57e8      while (true)
005a57e8      {
005a57e8          uint32_t cell_todo_num = this->cell_todo_num;
005a57ed          class CEnvCell* cell;
005a57ed          
005a57ed          if (cell_todo_num > 0)
005a57ed          {
005a57ef              class CellListType** data = this->cell_todo_list.data;
005a57f3              this->cell_todo_num = (cell_todo_num - 1);
005a57f9              cell = data[(cell_todo_num - 1)]->cell;
005a57ed          }
005a57ed          
005a57fd          if ((cell_todo_num <= 0 || cell == 0))
005a5853              return;
005a5853          
005a57ff          uint32_t cell_draw_num = this->cell_draw_num;
005a57ff          
005a5805          if (cell_draw_num >= this->cell_draw_list.sizeOf)
005a580e              DArray<CEnvCell *>::grow(&this->cell_draw_list, (cell_draw_num + 0x1e));
005a580e          
005a5813          uint32_t cell_draw_num_1 = this->cell_draw_num;
005a5816          class CEnvCell** data_1 = this->cell_draw_list.data;
005a581c          this->cell_draw_num = (cell_draw_num_1 + 1);
005a581f          data_1[cell_draw_num_1] = cell;
005a5822          cell->portal_view.data[(cell->num_view - 1)]->cell_view_done = 1;
005a5822          
005a5845          if (PView::ClipPortals(this, cell, 0) != 0)
005a584a              PView::AddViewToPortals(this, cell);
005a57e8      }
005a57b0  }

005a5856                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005a5860  void __thiscall PView::DrawInside(class PView* this, class CEnvCell* arg2)

005a5860  {
005a588f      Render::object_scale_vec.y = 1f;
005a5897      Render::object_scale_vec.x = 0x3f800000;
005a589c      Render::object_scale_vec.z = 1f;
005a58a2      Render::object_scale = 1f;
005a58ac      CEnvCell::curr_view_push(arg2);
005a58c4      PView::add_views(this, arg2->num_stabs, arg2->stab_list);
005a58cd      int32_t var_48 = 0x796910;
005a58d5      int32_t var_44 = 0;
005a58dd      int32_t var_40 = 0x3f800000;
005a58e5      int32_t var_3c = 0;
005a58ed      int32_t var_38 = 0;
005a58f5      int32_t var_34 = 0;
005a58fd      int32_t var_c = 0;
005a5905      int32_t var_8 = 0;
005a590d      int32_t var_4 = 0;
005a5915      Frame::cache(&var_40);
005a5924      uint32_t id = arg2->m_DID.id;
005a5928      Render::positionPush(3, &var_48);
005a5942      Render::copy_view(arg2->portal_view.data[(arg2->num_view - 1)], nullptr, 4);
005a5952      int32_t edx_2;
005a5952      int80_t st0_1;
005a5952      edx_2 = PView::ConstructView(this, arg2, 0xffff);
005a5957      int32_t var_60_2 = 0;
005a595b      PView::DrawCells(this, edx_2);
005a5960      Render::framePop();
005a5978      PView::remove_views(this, arg2->num_stabs, arg2->stab_list);
005a5985      arg2->num_view -= 1;
005a5860  }

005a5992                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005a59a0  int32_t __thiscall PView::ConstructView(class PView* this, class CBldPortal* arg2, class CPolygon* arg3, int32_t arg4, int32_t arg5)

005a59a0  {
005a59a0      struct frameContext* Render::FrameCurrent_1 = Render::FrameCurrent;
005a59aa      class CPolygon* esi = arg3;
005a59c1      long double x87_r7_3 = (((((long double)Render::FrameCurrent_1->viewer.viewpoint.z) * ((long double)esi->plane.N.z)) + (((long double)Render::FrameCurrent_1->viewer.viewpoint.y) * ((long double)esi->plane.N.y))) + (((long double)Render::FrameCurrent_1->viewer.viewpoint.x) * ((long double)esi->plane.N.x)));
005a59c3      long double x87_r7_4 = (x87_r7_3 + ((long double)esi->plane.d));
005a59c6      long double temp1 = ((long double)0.000199999995f);
005a59c6      (x87_r7_4 - temp1);
005a59cc      Render::FrameCurrent_1 = ((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
005a59d1      enum Sidedness eax;
005a59d1      
005a59d1      if ((*(uint8_t*)((char*)Render::FrameCurrent_1)[1] & 0x41) != 0)
005a59d1      {
005a59e3          (x87_r7_4 - -(((long double)0.000199999995f)));
005a59e7          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a59ea          eax = NEGATIVE;
005a59ea          
005a59ef          if (p_1)
005a59f1              eax = IN_PLANE;
005a59d1      }
005a59d1      else
005a59d5          eax = POSITIVE;
005a59d5      
005a59fd      if (arg2->portal_side != 0)
005a59fd      {
005a5a0e          if (eax == NEGATIVE)
005a5a0e          {
005a5a23          label_5a5a23:
005a5a23              PView::GetClip(this, eax, esi, &clip_view, &arg3, arg4);
005a5a23              
005a5a2e              if (arg3 != 0)
005a5a2e              {
005a5a34                  class CEnvCell* eax_4 = CEnvCell::GetVisible(arg2->other_cell_id);
005a5a34                  
005a5a40                  if (eax_4 != 0)
005a5a40                  {
005a5a5d                      int32_t eax_7;
005a5a5d                      int80_t st0_1;
005a5a5d                      st0_1 = Render::copy_view(eax_4->portal_view.data[(eax_4->num_view - 1)], &clip_view, arg3);
005a5a5d                      
005a5a67                      if (eax_7 != 0)
005a5a67                      {
005a5a71                          if (arg5 != 2)
005a5a71                          {
005a5a76                              eax_7 = arg5 == 1;
005a5a7b                              D3DPolyRender::DrawPortalPolyInternal(esi, eax_7);
005a5a71                          }
005a5a71                          
005a5a83                          Render::framePop();
005a5a83                          
005a5a8c                          if (arg5 != 1)
005a5a9c                              PView::ConstructView(this, eax_4, arg2->other_portal_id);
005a5a9c                          
005a5aa9                          return 1;
005a5a67                      }
005a5a40                  }
005a5a2e              }
005a5a0e          }
005a59fd      }
005a59fd      else if (eax == POSITIVE)
005a5a01          goto label_5a5a23;
005a5a01      
005a5a08      return 0;
005a59a0  }

005a5aac                                      90 90 90 90                                                              ....

005a5ab0  void __thiscall PView::DrawPortal(class PView* this, class CPortalPoly* arg2, int32_t arg3, int32_t arg4)

005a5ab0  {
005a5ab8      Render::m_pRenderer->vtable->polyListFinishInternal();
005a5ac4      Render::PolyNext = &Render::PolyList;
005a5ace      ACRender::backup_curr_state();
005a5ad3      Render::object_scale = 1f;
005a5ae9      Render::object_scale_vec.z = 1f;
005a5afe      Render::object_scale_vec.x = 0x3f800000;
005a5b10      Render::object_scale_vec.y = 1f;
005a5b1b      class CBldPortal* edi = this->outdoor_portal_list[arg2->portal_index];
005a5b1e      class CPolygon* portal = arg2->portal;
005a5b2e      PView::add_views(this, edi->num_stabs, edi->stab_list);
005a5b41      int32_t eax_3;
005a5b41      int32_t edx_2;
005a5b41      eax_3 = PView::ConstructView(this, edi, portal, arg3, arg4);
005a5b41      
005a5b48      if (eax_3 == 0)
005a5b48      {
005a5b77          if (arg4 == 3)
005a5b7c              D3DPolyRender::DrawPortalPolyInternal(portal, 0);
005a5b7c          
005a5b84          ACRender::restore_curr_state();
005a5b48      }
005a5b48      else
005a5b48      {
005a5b4d          if (arg4 != 1)
005a5b4d          {
005a5b4f              int32_t var_20_2 = 1;
005a5b53              PView::DrawCells(this, edx_2);
005a5b4d          }
005a5b4d          
005a5b58          ACRender::restore_curr_state();
005a5b65          Render::positionPush(3, CBuildingObj::curr_pos);
005a5b6d          Render::obj_view_set();
005a5b48      }
005a5b48      
005a5b96      PView::remove_views(this, edi->num_stabs, edi->stab_list);
005a5ab0  }

005a5ba5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005a5bb0  void __thiscall ObjectDesc::Place(class ObjectDesc* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, class AC1Legacy::Vector3* arg5)

005a5bb0  {
005a5bb6      class AC1Legacy::Vector3* esi = arg5;
005a5bc0      float* edx = esi;
005a5bc2      *(uint32_t*)edx = this->base_loc.m_fOrigin.x;
005a5bc7      edx[1] = this->base_loc.m_fOrigin.y;
005a5bd1      edx[2] = this->base_loc.m_fOrigin.z;
005a5bd4      long double x87_r7 = ((long double)this->displace_x);
005a5bd7      long double temp1 = ((long double)0f);
005a5bd7      (x87_r7 - temp1);
005a5be1      float eax_1;
005a5be1      eax_1 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
005a5be1      
005a5be6      if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) != 0)
005a5c3c          arg5 = esi->x;
005a5be6      else
005a5be6      {
005a5c14          class AC1Legacy::Vector3* ebp_5 = (((arg3 * 0x6c1ac587) - ((((arg2 * arg3) * 0x5111bfef) + 0x70892fb7) * (arg4 + 0xb2cd))) - (arg2 * 0x421be3bd));
005a5c1c          long double x87_r7_1 = ((long double)ebp_5);
005a5c1c          
005a5c20          if (ebp_5 < 0)
005a5c22              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
005a5c22          
005a5c34          arg5 = ((float)(((x87_r7_1 * ((long double)2.32830644e-10f)) * ((long double)this->displace_x)) + ((long double)esi->x)));
005a5be6      }
005a5be6      
005a5c40      long double x87_r7_5 = ((long double)this->displace_y);
005a5c43      long double temp2 = ((long double)0f);
005a5c43      (x87_r7_5 - temp2);
005a5c49      float eax_8;
005a5c49      eax_8 = ((((x87_r7_5 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp2) ? 1 : 0) << 0xe) | 0))));
005a5c4e      long double x87_r7_9;
005a5c4e      
005a5c4e      if ((*(uint8_t*)((char*)eax_8)[1] & 0x41) != 0)
005a5c9d          x87_r7_9 = ((long double)esi->y);
005a5c4e      else
005a5c4e      {
005a5c7b          uint32_t ebx_5 = (((arg3 * 0x6c1ac587) - ((((arg2 * arg3) * 0x5111bfef) + 0x70892fb7) * (arg4 + 0x11c0f))) - (arg2 * 0x421be3bd));
005a5c83          long double x87_r7_6 = ((long double)ebx_5);
005a5c83          
005a5c87          if (ebx_5 < 0)
005a5c89              x87_r7_6 = (x87_r7_6 + ((long double)4.2949673e+09f));
005a5c89          
005a5c98          x87_r7_9 = (((x87_r7_6 * ((long double)2.32830644e-10f)) * ((long double)this->displace_y)) + ((long double)esi->y));
005a5c4e      }
005a5c4e      
005a5cc5      long double x87_r6 = ((long double)(((arg3 * 0x6c1ac587) - (((arg3 * 0x6f7bd965) + 0x421be3bd) * arg2)) - 0x17fcedfd));
005a5cc5      
005a5cc9      if ((((arg3 * 0x6c1ac587) - (((arg3 * 0x6f7bd965) + 0x421be3bd) * arg2)) - 0x17fcedfd) < 0)
005a5ccb          x87_r6 = (x87_r6 + ((long double)4.2949673e+09f));
005a5ccb      
005a5cd1      long double x87_r6_1 = (x87_r6 * ((long double)2.32830644e-10f));
005a5cd7      long double temp3 = ((long double)0.25f);
005a5cd7      (x87_r6_1 - temp3);
005a5cdd      eax_8 = ((((x87_r6_1 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp3))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp3) ? 1 : 0) << 0xe) | 0x3000))));
005a5cdf      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005a5cdf      
005a5ce2      if (!(p))
005a5ce2      {
005a5ceb          esi->y = ((float)x87_r6_1);
005a5cee          esi->x = arg5;
005a5cf2          return;
005a5ce2      }
005a5ce2      
005a5cf5      long double temp4 = ((long double)0.5f);
005a5cf5      (x87_r6_1 - temp4);
005a5cfb      eax_8 = ((((x87_r6_1 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp4))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp4) ? 1 : 0) << 0xe) | 0x3000))));
005a5cfd      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a5cfd      
005a5d00      if (!(p_1))
005a5d00      {
005a5d0b          esi->x = ((float)-(x87_r6_1));
005a5d0d          esi->y = arg5;
005a5d12          return;
005a5d00      }
005a5d00      
005a5d15      long double temp5 = ((long double)0.75f);
005a5d15      (x87_r6_1 - temp5);
005a5d1b      eax_8 = ((((x87_r6_1 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp5))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp5) ? 1 : 0) << 0xe) | 0x3800))));
005a5d1d      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005a5d1d      
005a5d20      if (!(p_2))
005a5d20      {
005a5d29          esi->x = ((float)-(((long double)arg5)));
005a5d2d          esi->y = ((float)-(x87_r7_9));
005a5d32          return;
005a5d20      }
005a5d20      
005a5d35      esi->x = ((float)x87_r7_9);
005a5d3e      esi->y = ((float)-(((long double)arg5)));
005a5bb0  }

005a5d46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005a5d50  void __thiscall ObjectDesc::GetObjFrame(class ObjectDesc* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, class AC1Legacy::Vector3 const* arg5, class Frame* arg6)

005a5d50  {
005a5d5e      Frame::operator=(arg6, &this->base_loc);
005a5d69      arg6->m_fOrigin.x = arg5->x;
005a5d69      arg6->m_fOrigin.y = arg5->y;
005a5d69      arg6->m_fOrigin.z = arg5->z;
005a5d7a      long double x87_r7 = ((long double)this->max_rot);
005a5d7d      long double temp1 = ((long double)0f);
005a5d7d      (x87_r7 - temp1);
005a5d83      float eax_2;
005a5d83      eax_2 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
005a5d83      
005a5d88      if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) == 0)
005a5d88      {
005a5d94          int32_t ecx_3 = (arg2 * 0x421be3bd);
005a5dbf          class Frame* eax_6 = (((arg3 * 0x6c1ac587) - ((((arg2 * arg3) * 0x5111bfef) + 0x70892fb7) * (arg4 + 0xf697))) - ecx_3);
005a5dc7          long double x87_r7_1 = ((long double)eax_6);
005a5dc7          
005a5dcb          if (eax_6 < 0)
005a5dcd              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
005a5dcd          
005a5dd9          int32_t var_10_1 = ecx_3;
005a5de2          Frame::set_heading(arg6, ((float)((x87_r7_1 * ((long double)2.32830644e-10f)) * ((long double)this->max_rot))));
005a5d88      }
005a5d50  }

005a5ded                                         90 90 90                                                               ...

005a5df0  void __fastcall ObjectDesc::ObjectDesc(class ObjectDesc* this)

005a5df0  {
005a5df9      this->obj_id.id = 0;
005a5df3      this->base_loc.qw = 0x3f800000;
005a5df3      this->base_loc.qx = 0f;
005a5df3      this->base_loc.qy = 0f;
005a5df3      this->base_loc.qz = 0f;
005a5df3      this->base_loc.m_fOrigin.x = 0;
005a5df3      this->base_loc.m_fOrigin.y = 0f;
005a5df3      this->base_loc.m_fOrigin.z = 0f;
005a5e13      Frame::cache(&this->base_loc);
005a5e18      this->displace_x = 0f;
005a5e1b      this->displace_y = 0f;
005a5e1e      this->max_rot = 0f;
005a5e21      this->min_slope = 0f;
005a5e24      this->align = 0;
005a5e27      this->orient = 0;
005a5e2a      this->weenie_obj = 0;
005a5e2e      this->freq = 1f;
005a5e35      this->min_scale = 1f;
005a5e3c      this->max_scale = 1f;
005a5e43      this->max_slope = 90f;
005a5df0  }

005a5e4e                                            90 90                                                                ..

005a5e50  void __thiscall ObjectDesc::ObjAlign(class ObjectDesc* this, class Plane const* arg2, class AC1Legacy::Vector3 const* arg3, class Frame* arg4)

005a5e50  {
005a5e5e      Frame::operator=(arg4, &this->base_loc);
005a5e69      arg4->m_fOrigin.x = arg3->x;
005a5e69      arg4->m_fOrigin.y = arg3->y;
005a5e69      arg4->m_fOrigin.z = arg3->z;
005a5e86      float var_c = ((float)-(((long double)arg2->N.x)));
005a5e8f      float var_8 = ((float)-(((long double)arg2->N.y)));
005a5e98      float var_4 = ((float)-(((long double)arg2->N.z)));
005a5ea1      int32_t var_14_1 = AC1Legacy::Vector3::get_heading(&var_c);
005a5ea7      long double x87_r0;
005a5ea7      Frame::set_heading(arg4, ((float)x87_r0));
005a5e50  }

005a5eb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005a5ec0  void __thiscall Scene::Scene(class Scene* this, class IDClass<_tagDataID,32,0> arg2)

005a5ec0  {
005a5ec8      DBObj::DBObj(this, arg2);
005a5ecd      this->vtable = &PackObj::`vftable';
005a5ed6      this->num_objects = 0;
005a5ed9      this->objects = nullptr;
005a5edc      this->vtable = 0x7e5980;
005a5ee2      this->vtable = &Scene::`vftable';
005a5ec0  }

005a5eef                                               90                                                                 .

005a5ef0  uint32_t Scene::GetDBOType(class Scene const* this @ ecx) __pure

005a5ef0  {
005a5ef5      return 0x1b;
005a5ef0  }

005a5ef6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005a5f00  void* __thiscall Scene::`vector deleting destructor'(class Scene* this, uint32_t arg2)

005a5f00  {
005a5f03      /* tailcall */
005a5f03      return Scene::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005a5f00  }

005a5f08                          cc cc cc cc cc cc cc cc                                                          ........

005a5f10  void* __thiscall ObjectDesc::`vector deleting destructor'(class ObjectDesc* this, uint32_t arg2)

005a5f10  {
005a5f11      uint32_t ebx;
005a5f11      ebx = arg2;
005a5f11      
005a5f1b      if ((ebx & 2) == 0)
005a5f1b      {
005a5f9c          this->obj_id.id = INVALID_DID.id;
005a5f9e          this->freq = 1f;
005a5fa1          this->displace_x = 0f;
005a5fa4          this->displace_y = 0f;
005a5fa7          this->min_scale = 1f;
005a5faa          this->max_scale = 1f;
005a5fad          this->align = 0;
005a5fb0          this->max_rot = 0f;
005a5fb3          this->orient = 0;
005a5fb6          this->min_slope = 0f;
005a5fb9          this->max_slope = 90f;
005a5fc0          this->weenie_obj = 0;
005a5fc0          
005a5fc3          if ((ebx & 1) != 0)
005a5fc6              operator delete(this);
005a5fc6          
005a5fd2          return this;
005a5f1b      }
005a5f1b      
005a5f1d      int32_t obj_id = this->obj_id;
005a5f29      void* eax_2 = ((obj_id * 0x70) + this);
005a5f29      
005a5f2c      if ((obj_id - 1) >= 0)
005a5f2c      {
005a5f2e          int32_t esi_1 = obj_id;
005a5f71          int32_t i;
005a5f71          
005a5f71          do
005a5f71          {
005a5f46              eax_2 -= 0x70;
005a5f49              i = esi_1;
005a5f49              esi_1 -= 1;
005a5f4a              *(uint32_t*)eax_2 = INVALID_DID.id;
005a5f4c              *(uint32_t*)((char*)eax_2 + 0x44) = 0x3f800000;
005a5f4f              *(uint32_t*)((char*)eax_2 + 0x48) = 0;
005a5f52              *(uint32_t*)((char*)eax_2 + 0x4c) = 0;
005a5f55              *(uint32_t*)((char*)eax_2 + 0x50) = 0x3f800000;
005a5f58              *(uint32_t*)((char*)eax_2 + 0x54) = 0x3f800000;
005a5f5b              *(uint32_t*)((char*)eax_2 + 0x64) = 0;
005a5f5e              *(uint32_t*)((char*)eax_2 + 0x58) = 0;
005a5f61              *(uint32_t*)((char*)eax_2 + 0x68) = 0;
005a5f64              *(uint32_t*)((char*)eax_2 + 0x5c) = 0;
005a5f67              *(uint32_t*)((char*)eax_2 + 0x60) = 0x42b40000;
005a5f6e              *(uint32_t*)((char*)eax_2 + 0x6c) = 0;
005a5f71          } while (i != 1);
005a5f73          ebx = arg2;
005a5f2c      }
005a5f2c      
005a5f7a      if ((ebx & 1) != 0)
005a5f7d          operator delete[](((char*)this - 4));
005a5f7d      
005a5f8a      return ((char*)this - 4);
005a5f10  }

005a5f3a                                                                                8d 9b 00 00 00 00                            ......
005a5fd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005a5fe0  class DBObj* Scene::Allocate(class Scene const* this @ ecx)

005a5fe0  {
005a5fe0      /* tailcall */
005a5fe0      return Scene::Allocator();
005a5fe0  }

005a5fe5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005a5ff0  void __thiscall ObjectDesc::Pack(class ObjectDesc* this, void** arg2, uint32_t arg3)

005a5ff0  {
005a5ff7      uint32_t edi = arg3;
005a5ff7      
005a6000      if (edi >= 4)
005a6000      {
005a6006          **(uint32_t**)arg2 = this->obj_id.id;
005a6008          *(uint32_t*)arg2 += 4;
005a600b          edi -= 4;
005a6000      }
005a6000      
005a6013      Frame::Pack(&this->base_loc, arg2, edi);
005a6013      
005a601b      if (edi >= 4)
005a601b      {
005a6026          **(uint32_t**)arg2 = ((float)((long double)this->freq));
005a602a          void* eax_3 = (*(uint32_t*)arg2 + 4);
005a6033          *(uint32_t*)arg2 = eax_3;
005a6033          
005a6035          if ((edi - 4) >= 4)
005a6035          {
005a6041              *(uint32_t*)eax_3 = ((float)((long double)this->displace_x));
005a6045              void* eax_5 = (*(uint32_t*)arg2 + 4);
005a604b              *(uint32_t*)arg2 = eax_5;
005a604b              
005a604d              if ((edi - 8) >= 4)
005a604d              {
005a6059                  *(uint32_t*)eax_5 = ((float)((long double)this->displace_y));
005a605d                  void* eax_7 = (*(uint32_t*)arg2 + 4);
005a6063                  *(uint32_t*)arg2 = eax_7;
005a6063                  
005a6065                  if ((edi - 0xc) >= 4)
005a6065                  {
005a6071                      *(uint32_t*)eax_7 = ((float)((long double)this->min_scale));
005a6075                      void* eax_9 = (*(uint32_t*)arg2 + 4);
005a607b                      *(uint32_t*)arg2 = eax_9;
005a607b                      
005a607d                      if ((edi - 0x10) >= 4)
005a607d                      {
005a6089                          *(uint32_t*)eax_9 = ((float)((long double)this->max_scale));
005a608d                          void* eax_11 = (*(uint32_t*)arg2 + 4);
005a6093                          *(uint32_t*)arg2 = eax_11;
005a6093                          
005a6095                          if ((edi - 0x14) >= 4)
005a6095                          {
005a609d                              *(uint32_t*)eax_11 = ((float)((long double)this->max_rot));
005a60a1                              void* eax_13 = (*(uint32_t*)arg2 + 4);
005a60a7                              *(uint32_t*)arg2 = eax_13;
005a60a7                              
005a60a9                              if ((edi - 0x18) >= 4)
005a60a9                              {
005a60b1                                  *(uint32_t*)eax_13 = ((float)((long double)this->min_slope));
005a60b5                                  void* eax_15 = (*(uint32_t*)arg2 + 4);
005a60bb                                  *(uint32_t*)arg2 = eax_15;
005a60bb                                  
005a60bd                                  if ((edi - 0x1c) >= 4)
005a60bd                                  {
005a60c5                                      *(uint32_t*)eax_15 = ((float)((long double)this->max_slope));
005a60c9                                      void* eax_17 = (*(uint32_t*)arg2 + 4);
005a60cf                                      *(uint32_t*)arg2 = eax_17;
005a60cf                                      
005a60d1                                      if ((edi - 0x20) >= 4)
005a60d1                                      {
005a60d6                                          *(uint32_t*)eax_17 = this->align;
005a60da                                          void* eax_19 = (*(uint32_t*)arg2 + 4);
005a60e3                                          *(uint32_t*)arg2 = eax_19;
005a60e3                                          
005a60e5                                          if ((edi - 0x24) >= 4)
005a60e5                                          {
005a60ea                                              *(uint32_t*)eax_19 = this->orient;
005a60ee                                              void* eax_21 = (*(uint32_t*)arg2 + 4);
005a60f7                                              *(uint32_t*)arg2 = eax_21;
005a60f7                                              
005a60f9                                              if ((edi - 0x28) >= 4)
005a60f9                                              {
005a60fe                                                  *(uint32_t*)eax_21 = this->weenie_obj;
005a6100                                                  *(uint32_t*)arg2 += 4;
005a60f9                                              }
005a60e5                                          }
005a60d1                                      }
005a60bd                                  }
005a60a9                              }
005a6095                          }
005a607d                      }
005a6065                  }
005a604d              }
005a6035          }
005a601b      }
005a5ff0  }

005a6109                             90 90 90 90 90 90 90                                                           .......

005a6110  int32_t __thiscall ObjectDesc::UnPack(class ObjectDesc* this, void** arg2, uint32_t arg3)

005a6110  {
005a6117      uint32_t edi = arg3;
005a6117      
005a6120      if (edi >= 4)
005a6120      {
005a6122          void* eax_1 = *(uint32_t*)arg2;
005a6124          int32_t ecx = *(uint32_t*)eax_1;
005a6129          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
005a612b          edi -= 4;
005a612e          this->obj_id.id = ecx;
005a6120      }
005a6120      
005a6135      int32_t result = Frame::UnPack(&this->base_loc, arg2, edi);
005a6135      
005a613c      if (result == 0)
005a6141          return result;
005a6141      
005a6147      if (edi >= 4)
005a6147      {
005a6151          this->freq = **(uint32_t**)arg2;
005a6156          void* eax_5 = (*(uint32_t*)arg2 + 4);
005a615f          *(uint32_t*)arg2 = eax_5;
005a615f          
005a6161          if ((edi - 4) >= 4)
005a6161          {
005a6169              this->displace_x = *(uint32_t*)eax_5;
005a616e              void* eax_7 = (*(uint32_t*)arg2 + 4);
005a6177              *(uint32_t*)arg2 = eax_7;
005a6177              
005a6179              if ((edi - 8) >= 4)
005a6179              {
005a6181                  this->displace_y = *(uint32_t*)eax_7;
005a6186                  void* eax_10 = (*(uint32_t*)arg2 + 4);
005a618f                  *(uint32_t*)arg2 = eax_10;
005a618f                  
005a6191                  if ((edi - 0xc) >= 4)
005a6191                  {
005a6199                      this->min_scale = *(uint32_t*)eax_10;
005a619e                      void* eax_12 = (*(uint32_t*)arg2 + 4);
005a61a7                      *(uint32_t*)arg2 = eax_12;
005a61a7                      
005a61a9                      if ((edi - 0x10) >= 4)
005a61a9                      {
005a61b1                          this->max_scale = *(uint32_t*)eax_12;
005a61b6                          void* eax_14 = (*(uint32_t*)arg2 + 4);
005a61bf                          *(uint32_t*)arg2 = eax_14;
005a61bf                          
005a61c1                          if ((edi - 0x14) >= 4)
005a61c1                          {
005a61c5                              this->max_rot = *(uint32_t*)eax_14;
005a61ca                              void* eax_17 = (*(uint32_t*)arg2 + 4);
005a61d3                              *(uint32_t*)arg2 = eax_17;
005a61d3                              
005a61d5                              if ((edi - 0x18) >= 4)
005a61d5                              {
005a61d9                                  this->min_slope = *(uint32_t*)eax_17;
005a61de                                  void* eax_19 = (*(uint32_t*)arg2 + 4);
005a61e7                                  *(uint32_t*)arg2 = eax_19;
005a61e7                                  
005a61e9                                  if ((edi - 0x1c) >= 4)
005a61e9                                  {
005a61ed                                      this->max_slope = *(uint32_t*)eax_19;
005a61f2                                      void* eax_21 = (*(uint32_t*)arg2 + 4);
005a61fb                                      *(uint32_t*)arg2 = eax_21;
005a61fb                                      
005a61fd                                      if ((edi - 0x20) >= 4)
005a61fd                                      {
005a6201                                          this->align = *(uint32_t*)eax_21;
005a6206                                          void* eax_24 = (*(uint32_t*)arg2 + 4);
005a620f                                          *(uint32_t*)arg2 = eax_24;
005a620f                                          
005a6211                                          if ((edi - 0x24) >= 4)
005a6211                                          {
005a6215                                              this->orient = *(uint32_t*)eax_24;
005a621a                                              void* eax_26 = (*(uint32_t*)arg2 + 4);
005a6223                                              *(uint32_t*)arg2 = eax_26;
005a6223                                              
005a6225                                              if ((edi - 0x28) >= 4)
005a6225                                              {
005a6229                                                  this->weenie_obj = *(uint32_t*)eax_26;
005a622c                                                  *(uint32_t*)arg2 += 4;
005a6225                                              }
005a6211                                          }
005a61fd                                      }
005a61e9                                  }
005a61d5                              }
005a61c1                          }
005a61a9                      }
005a6191                  }
005a6179              }
005a6161          }
005a6147      }
005a6147      
005a6237      return 1;
005a6110  }

005a623a                                                                                90 90 90 90 90 90                            ......

005a6240  void __fastcall Scene::Destroy(class Scene* this)

005a6240  {
005a6243      class ObjectDesc* objects = this->objects;
005a6243      
005a6248      if (objects != 0)
005a6248      {
005a624c          ObjectDesc::`vector deleting destructor'(objects, 3);
005a6251          this->objects = nullptr;
005a6248      }
005a6248      
005a6258      this->num_objects = 0;
005a6240  }

005a6261     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005a6270  uint32_t __thiscall Scene::Pack(class Scene* this, void** arg2, uint32_t arg3)

005a6270  {
005a6270      class Scene* this_1 = this;
005a6275      int32_t eax = *(int32_t*)((char*)this + 0xc);
005a627a      int32_t ecx = 4;
005a6280      int32_t var_4 = 4;
005a6280      
005a6284      if (eax > 0)
005a6284      {
005a628b          var_4 = ((eax * 0x4c) + 4);
005a628f          ecx = ((eax * 0x4c) + 4);
005a6284      }
005a6284      
005a6291      uint32_t eax_3 = arg3;
005a6291      
005a6297      if (eax_3 >= ecx)
005a6297      {
005a62a0          if (eax_3 >= 4)
005a62a0          {
005a62a8              **(uint32_t**)arg2 = *(int32_t*)((char*)this + 0xc);
005a62b0              eax_3 -= 4;
005a62b3              *(uint32_t*)arg2 += 4;
005a62b6              arg3 = eax_3;
005a62a0          }
005a62a0          
005a62bd          int32_t edi_4 = 0;
005a62bd          
005a62c1          if (*(int32_t*)((char*)this + 0xc) > 0)
005a62c1          {
005a62c4              int32_t ebx = 0;
005a62c4              
005a62d7              while (true)
005a62d7              {
005a62d7                  ObjectDesc::Pack((this->m_timeStamp + ebx), arg2, eax_3);
005a62df                  edi_4 += 1;
005a62e0                  ebx += 0x70;
005a62e0                  
005a62e5                  if (edi_4 >= *(int32_t*)((char*)this + 0xc))
005a62e5                      break;
005a62e5                  
005a62c8                  eax_3 = arg3;
005a62d7              }
005a62d7              
005a62f0              return var_4;
005a62c1          }
005a6297      }
005a6297      
005a62f9      return ecx;
005a6270  }

005a62fc                                                                                      90 90 90 90                              ....

005a6300  int32_t __thiscall Scene::UnPack(class Scene* this, void** arg2, uint32_t arg3)

005a6300  {
005a6305      void* eax = *(uint32_t*)arg2;
005a6305      
005a6318      if (((char*)eax + arg3) <= ((char*)eax + 4))
005a631f          return 0;
005a631f      
005a6328      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x3c)();
005a6328      
005a632e      if (arg3 >= 4)
005a632e      {
005a6335          *(int32_t*)((char*)this + 0xc) = **(uint32_t**)arg2;
005a6341          *(uint32_t*)arg2 += 4;
005a6344          arg3 -= 4;
005a632e      }
005a632e      
005a6348      int32_t edi_2 = *(int32_t*)((char*)this + 0xc);
005a6355      void* eax_4 = operator new[](((edi_2 * 0x70) + 4));
005a635f      void* ebx;
005a635f      
005a635f      if (eax_4 == 0)
005a6376          ebx = nullptr;
005a635f      else
005a635f      {
005a6367          ebx = ((char*)eax_4 + 4);
005a636d          *(uint32_t*)eax_4 = edi_2;
005a636f          `vector constructor iterator'(ebx, 0x70, edi_2, ObjectDesc::ObjectDesc);
005a635f      }
005a635f      
005a637b      int32_t i = 0;
005a637f      this->m_timeStamp = ebx;
005a637f      
005a6382      if (*(int32_t*)((char*)this + 0xc) > 0)
005a6382      {
005a6384          int32_t ebx_1 = 0;
005a6384          
005a639f          do
005a639f          {
005a6391              ObjectDesc::UnPack((this->m_timeStamp + ebx_1), arg2, arg3);
005a6399              i += 1;
005a639a              ebx_1 += 0x70;
005a639f          } while (i < *(int32_t*)((char*)this + 0xc));
005a6382      }
005a6382      
005a63aa      return 1;
005a6300  }

005a63ad                                         90 90 90                                                               ...

005a63b0  void* __thiscall Scene::`scalar deleting destructor'(class Scene* this, uint32_t arg2)

005a63b0  {
005a63b3      class ObjectDesc* objects = this->objects;
005a63b8      this->vtable = 0x7e5980;
005a63be      this->vtable = &Scene::`vftable';
005a63be      
005a63c5      if (objects != 0)
005a63c5      {
005a63c9          ObjectDesc::`vector deleting destructor'(objects, 3);
005a63ce          this->objects = nullptr;
005a63c5      }
005a63c5      
005a63d5      this->num_objects = 0;
005a63de      this->vtable = &PackObj::`vftable';
005a63e5      DBObj::~DBObj(this);
005a63e5      
005a63ef      if ((arg2 & 1) != 0)
005a63f2          operator delete(this);
005a63f2      
005a63fd      return this;
005a63b0  }


005a6400  void __thiscall GameTime::CalcDayBegin(class GameTime* this, double arg2)

005a6400  {
005a6408      double* this_1 = this;
005a640a      long double x87_r7_1 = (((long double)arg2) + ((long double)*(uint64_t*)this_1));
005a6419      floor(((double)(x87_r7_1 / ((long double)this_1[8]))));
005a6421      int32_t eax = _ftol2();
005a642c      long double x87_r0;
005a642c      long double x87_r0_2 = (((long double)((double)x87_r7_1)) - (x87_r0 * ((long double)this_1[8])));
005a6430      *(uint32_t*)((char*)this_1 + 0x64) = (eax + this_1[1]);
005a6433      double var_8 = ((double)x87_r0_2);
005a6441      floor(((double)(((long double)var_8) / ((long double)*(uint32_t*)((char*)this_1 + 0xc)))));
005a644a      int32_t i = _ftol2();
005a6452      int32_t edx = 0;
005a6455      double var_10;
005a6455      var_10 = i;
005a6459      this_1[0xd] = i;
005a6459      
005a645c      if (*(uint32_t*)((char*)this_1 + 0x34) != 1)
005a645c      {
005a6461          int32_t* ecx_3 = (*(uint32_t*)((char*)this_1 + 0x2c) + 4);
005a6464          double var_1c_1;
005a6464          int32_t edi;
005a6464          *(uint32_t*)((char*)var_1c_1)[4] = edi;
005a6464          
005a646a          while (i >= *(uint32_t*)(*(uint32_t*)ecx_3 + 4))
005a646a          {
005a646f              edx += 1;
005a6470              ecx_3 = &ecx_3[1];
005a6470              
005a6476              if (edx >= (*(uint32_t*)((char*)this_1 + 0x34) - 1))
005a6476                  break;
005a646a          }
005a645c      }
005a645c      
005a647d      *(uint32_t*)((char*)this_1 + 0x6c) = edx;
005a648b      this_1[0xa] = ((double)(((long double)arg2) - (((long double)var_8) - (((long double)var_10) * ((long double)*(uint32_t*)((char*)this_1 + 0xc))))));
005a6400  }

005a6495                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005a64a0  void __thiscall GameTime::CalcTimeOfDay(class GameTime* this, double arg2)

005a64a0  {
005a64ab      long double x87_r7_1 = ((((long double)arg2) - ((long double)this->time_of_day_begin)) / ((long double)this->day_length));
005a64ae      int32_t edi = (this->times_of_day.m_num - 1);
005a64b1      int32_t i = 0;
005a64b1      
005a64b5      if (edi > 0)
005a64b5      {
005a64bb          void* esi_2 = &this->times_of_day.m_data[1];
005a64bb          
005a64da          do
005a64da          {
005a64c2              long double x87_r6_1 = ((long double)*(uint32_t*)(*(uint32_t*)esi_2 + 4));
005a64c7              (x87_r7_1 - x87_r6_1);
005a64c9              void* eax_1;
005a64c9              eax_1 = ((((x87_r7_1 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == x87_r6_1) ? 1 : 0) << 0xe) | 0x3800))));
005a64cb              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a64cb              
005a64ce              if (!(p_1))
005a64ce                  break;
005a64ce              
005a64d3              i += 1;
005a64d4              esi_2 += 4;
005a64da          } while (i < (this->times_of_day.m_num - 1));
005a64b5      }
005a64b5      
005a64dd      class TimeOfDay** m_data = this->times_of_day.m_data;
005a64e2      this->current_time_of_day = i;
005a64e2      
005a64e6      if (i == edi)
005a64e6      {
005a64ee          this->time_of_next_event = ((double)(((long double)this->day_length) + ((long double)this->time_of_day_begin)));
005a64f1          void* edx = m_data[i];
005a64ff          this->present_time_in_day_unit = ((float)((x87_r7_1 - ((long double)*(uint32_t*)((char*)edx + 4))) / (((long double)this->day_length) - ((long double)*(uint32_t*)((char*)edx + 4)))));
005a6502          return;
005a64e6      }
005a64e6      
005a6505      void* eax_4 = &m_data[i];
005a6514      this->time_of_next_event = ((double)((((long double)*(uint32_t*)(*(uint32_t*)((char*)eax_4 + 4) + 4)) * ((long double)this->day_length)) + ((long double)this->time_of_day_begin)));
005a6517      void* edx_2 = *(uint32_t*)eax_4;
005a6527      this->present_time_in_day_unit = ((float)((x87_r7_1 - ((long double)*(uint32_t*)((char*)edx_2 + 4))) / (((long double)*(uint32_t*)(*(uint32_t*)((char*)eax_4 + 4) + 4)) - ((long double)*(uint32_t*)((char*)edx_2 + 4)))));
005a64a0  }

005a652d                                         90 90 90                                                               ...

005a6530  void __thiscall GameTime::GetDateTimeString(class GameTime* this, char* arg2, char* arg3, int32_t const arg4, int32_t const arg5, int32_t const arg6, int32_t const arg7, int32_t const arg8)

005a6530  {
005a6544      char* ecx_2 = &this->times_of_day.m_data[arg8]->time_of_day_name.m_buffer->m_data;
005a6547      char* eax_1 = ecx_2;
005a6555      int32_t* edx;
005a6555      
005a6555      do
005a6555      {
005a6550          edx = *(uint8_t*)eax_1;
005a6552          eax_1 = &eax_1[1];
005a6555      } while (edx != 0);
005a6555      
005a655c      if ((eax_1 - &eax_1[1]) >= 0x1e)
005a6576          *(uint16_t*)arg3 = 0x20;
005a655c      else
005a655c      {
005a6562          char* eax_3 = ecx_2;
005a6564          void* edx_2 = (arg3 - ecx_2);
005a6564          
005a656e          do
005a656e          {
005a6566              ecx_2 = *(uint8_t*)eax_3;
005a6568              *(uint8_t*)((char*)edx_2 + eax_3) = ecx_2;
005a656b              eax_3 = &eax_3[1];
005a656e          } while (ecx_2 != 0);
005a655c      }
005a655c      
005a6582      int32_t* eax_5 = this->seasons.m_data[arg5];
005a6596      char* ebx_1 = (*(uint32_t*)eax_5 + 0x14);
005a65a5      void var_14;
005a65a5      sprintf(&var_14, &data_794344, ((arg7 - eax_5[1]) + 1));
005a65b6      void var_28;
005a65b6      sprintf(&var_28, &data_794344, arg4);
005a65b8      char* eax_7 = ebx_1;
005a65c5      char i;
005a65c5      
005a65c5      do
005a65c5      {
005a65c0          i = *(uint8_t*)eax_7;
005a65c2          eax_7 = &eax_7[1];
005a65c5      } while (i != 0);
005a65c5      
005a65cd      void* eax_9 = &var_14;
005a65cd      
005a65d9      do
005a65d9      {
005a65d4          i = *(uint8_t*)eax_9;
005a65d6          eax_9 += 1;
005a65d9      } while (i != 0);
005a65d9      
005a65e0      void* eax_11 = &var_28;
005a65e0      
005a65ec      do
005a65ec      {
005a65e7          i = *(uint8_t*)eax_11;
005a65e9          eax_11 += 1;
005a65ec      } while (i != 0);
005a65ec      
005a65f5      char (* ecx_7)[0x1] = &this->year_spec.m_buffer->m_data;
005a65f8      char (* eax_14)[0x1] = ecx_7;
005a6605      char m_data[0x1];
005a6605      
005a6605      do
005a6605      {
005a6600          m_data = ADJ(eax_14)->m_data;
005a6602          eax_14 = &eax_14[1];
005a6605      } while (m_data != 0);
005a6619      void var_27;
005a6619      void var_13;
005a6619      
005a6619      if ((((((eax_14 - &eax_14[1]) + ((char*)eax_11 - &var_27)) + ((char*)eax_9 - &var_13)) + (eax_7 - &eax_7[1])) + 9) < 0x3c)
005a6619      {
005a6631          sprintf(arg2, "%s %s, %s %s", ebx_1, &var_14, &var_28, ecx_7);
005a6640          return;
005a6619      }
005a6619      
005a6649      *(uint16_t*)arg2 = 0x20;
005a6530  }

005a6655                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005a6660  void __fastcall GameTime::GameTime(class GameTime* this)

005a6660  {
005a6666      __builtin_memset(this, 0, 0x38);
005a668f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005a669a      this->year_spec.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005a669d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005a66a3      this->year_length = 0f;
005a66a6      *(uint32_t*)((char*)this->year_length)[4] = 0;
005a66a9      this->present_time_of_day = 0f;
005a66ac      this->time_of_day_begin = 0f;
005a66af      this->time_of_next_event = 0f;
005a66b2      *(uint32_t*)((char*)this->time_of_next_event)[4] = 0;
005a66b5      __builtin_memset(&this->current_year, 0, 0x24);
005a66d7      *(uint32_t*)((char*)this->time_of_day_begin)[4] = 0xbff00000;
005a6660  }

005a66e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005a66f0  void __fastcall GameTime::UseTime(class GameTime* this)

005a66f0  {
005a6707      double var_8 = ((double)((((long double)Timer::cur_time) + ((long double)this->clock_offset)) + ((long double)this->time_zero_start_delta)));
005a670e      int32_t edi = *(uint32_t*)((char*)var_8)[4];
005a6712      (((long double)this->time_of_day_begin) - ((long double)0.0));
005a6718      int32_t ebx = var_8;
005a671e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005a671e      
005a6721      if (!(p))
005a6721      {
005a6723          int32_t var_18_1 = edi;
005a6725          GameTime::CalcDayBegin(this, ebx);
005a6721      }
005a6721      
005a6731      long double x87_r7_6 = ((((long double)var_8) - ((long double)this->time_of_day_begin)) / ((long double)this->day_length));
005a6734      this->present_time_of_day = ((float)x87_r7_6);
005a6737      long double x87_r6 = ((long double)var_8);
005a673b      long double temp1 = ((long double)this->time_of_next_event);
005a673b      (x87_r6 - temp1);
005a673b      
005a6743      if ((*(uint8_t*)((char*)((((x87_r6 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 1) != 0)
005a6792          return;
005a6792      
005a6745      long double temp2 = ((long double)1f);
005a6745      (x87_r7_6 - temp2);
005a6745      
005a6750      if ((*(uint8_t*)((char*)((((x87_r7_6 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp2) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
005a6750      {
005a6752          int32_t var_18_2 = edi;
005a6756          GameTime::CalcDayBegin(this, ebx);
005a6765          this->present_time_of_day = ((float)((((long double)var_8) - ((long double)this->time_of_day_begin)) / ((long double)this->day_length)));
005a6750      }
005a6750      
005a6768      int32_t var_18_3 = edi;
005a676c      GameTime::CalcTimeOfDay(this, ebx);
005a6780      GameTime::global_next_event = ((double)((((long double)this->time_of_next_event) - ((long double)this->clock_offset)) + ((long double)this->time_zero_start_delta)));
005a66f0  }

005a6793                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005a67a0  void __thiscall GameTime::GetDateTimeString(class GameTime* this, char* arg2, char* arg3)

005a67a0  {
005a67be      GameTime::GetDateTimeString(this, arg2, arg3, this->current_year, this->current_season, this->current_week_day, this->current_day, this->current_time_of_day);
005a67a0  }

005a67c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005a67d0  void __fastcall GameTime::Destroy(class GameTime* this)

005a67d0  {
005a67d0      class GameTime* this_1 = this;
005a67dc      int32_t i = 0;
005a67de      bool cond:0 = this->seasons.m_num <= 0;
005a67e0      __builtin_memset(this, 0, 0x14);
005a67eb      this->year_length = 0f;
005a67ee      *(uint32_t*)((char*)this->year_length)[4] = 0;
005a67f4      this->present_time_of_day = 0f;
005a67f7      this->time_of_day_begin = 0f;
005a67fa      *(uint32_t*)((char*)this->time_of_day_begin)[4] = 0xbff00000;
005a6801      this->time_of_next_event = 0f;
005a6804      *(uint32_t*)((char*)this->time_of_next_event)[4] = 0;
005a6807      __builtin_memset(&this->current_year, 0, 0x1c);
005a681c      int32_t i_3 = 0;
005a681c      
005a6820      if (!(cond:0))
005a6820      {
005a6860          do
005a6860          {
005a6825              int32_t* ebp_1 = this->seasons.m_data[i];
005a6825              
005a682a              if (ebp_1 != 0)
005a682a              {
005a682c                  int32_t* ebx_1 = *(uint32_t*)ebp_1;
005a682c                  
005a683f                  if ((InterlockedDecrement(&ebx_1[1]) == 0 && ebx_1 != 0))
005a6847                      **(uint32_t**)ebx_1(1);
005a6847                  
005a684a                  operator delete(ebp_1);
005a684f                  i = i_3;
005a682a              }
005a682a              
005a6859              i += 1;
005a685c              i_3 = i;
005a6860          } while (i < this->seasons.m_num);
005a6820      }
005a6820      
005a6866      this->seasons.m_num = 0;
005a6869      this->seasons.m_size = 0;
005a686c      operator delete[](this->seasons.m_data);
005a6871      this->seasons.m_data = 0;
005a6877      int32_t i_1 = 0;
005a687e      int32_t i_4 = 0;
005a687e      
005a6882      if (this->times_of_day.m_num > 0)
005a6882      {
005a68c2          do
005a68c2          {
005a6887              int32_t* ebp_2 = this->times_of_day.m_data[i_1];
005a6887              
005a688c              if (ebp_2 != 0)
005a688c              {
005a688e                  int32_t* ebx_2 = *(uint32_t*)ebp_2;
005a688e                  
005a68a1                  if ((InterlockedDecrement(&ebx_2[1]) == 0 && ebx_2 != 0))
005a68a9                      **(uint32_t**)ebx_2(1);
005a68a9                  
005a68ac                  operator delete(ebp_2);
005a68b1                  i_1 = i_4;
005a688c              }
005a688c              
005a68bb              i_1 += 1;
005a68be              i_4 = i_1;
005a68c2          } while (i_1 < this->times_of_day.m_num);
005a6882      }
005a6882      
005a68c8      this->times_of_day.m_num = 0;
005a68cb      this->times_of_day.m_size = 0;
005a68ce      operator delete[](this->times_of_day.m_data);
005a68d3      this->times_of_day.m_data = 0;
005a68d9      int32_t i_2 = 0;
005a68e0      int32_t i_5 = 0;
005a68e0      
005a68e4      if (this->days_of_the_week.m_num > 0)
005a68e4      {
005a6924          do
005a6924          {
005a68e9              int32_t* ebp_3 = this->days_of_the_week.m_data[i_2];
005a68e9              
005a68ee              if (ebp_3 != 0)
005a68ee              {
005a68f0                  int32_t* ebx_3 = *(uint32_t*)ebp_3;
005a68f0                  
005a6903                  if ((InterlockedDecrement(&ebx_3[1]) == 0 && ebx_3 != 0))
005a690b                      **(uint32_t**)ebx_3(1);
005a690b                  
005a690e                  operator delete(ebp_3);
005a6913                  i_2 = i_5;
005a68ee              }
005a68ee              
005a691d              i_2 += 1;
005a6920              i_5 = i_2;
005a6924          } while (i_2 < this->days_of_the_week.m_num);
005a68e4      }
005a68e4      
005a692a      this->days_of_the_week.m_num = 0;
005a692d      this->days_of_the_week.m_size = 0;
005a6930      operator delete[](this->days_of_the_week.m_data);
005a6938      this->days_of_the_week.m_data = 0;
005a67d0  }

005a6941     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005a6950  uint32_t __fastcall GameTime::pack_size(class GameTime* this)

005a6950  {
005a6956      int32_t eax_1 = (this->year_spec.m_buffer->m_len - 1);
005a6957      int32_t edx = 0;
005a6957      
005a695e      if (eax_1 >= 0xffff)
005a6960          edx = 4;
005a6960      
005a696e      int32_t eax_3 = (((edx + eax_1) + 2) & 3);
005a6972      int32_t edx_1;
005a6972      
005a6972      if (eax_3 == 0)
005a697d          edx_1 = 0;
005a6972      else
005a6979          edx_1 = (4 - eax_3);
005a6979      
005a6985      int32_t eax_5 = (((edx_1 + ((edx + eax_1) + 2)) + 0x14) & 3);
005a6988      int32_t edx_2;
005a6988      
005a6988      if (eax_5 == 0)
005a6993          edx_2 = 0;
005a6988      else
005a698f          edx_2 = (4 - eax_5);
005a698f      
005a6995      int32_t eax_6 = ((((edx_1 + ((edx + eax_1) + 2)) + 0x14) + edx_2) + 4);
005a6999      uint32_t m_num = this->times_of_day.m_num;
005a6999      
005a699e      if (m_num > 0)
005a699e      {
005a69a0          class TimeOfDay** m_data = this->times_of_day.m_data;
005a69a3          uint32_t ebp_1 = m_num;
005a69f0          uint32_t i;
005a69f0          
005a69f0          do
005a69f0          {
005a69ac              int32_t edx_6 = (*(uint32_t*)m_data->time_of_day_name.m_buffer->m_len - 1);
005a69ad              int32_t esi_2 = 0;
005a69ad              
005a69b5              if (edx_6 >= 0xffff)
005a69b7                  esi_2 = 4;
005a69b7              
005a69c2              int32_t edx_8 = (((esi_2 + edx_6) + 2) & 3);
005a69c5              int32_t esi_3;
005a69c5              
005a69c5              if (edx_8 == 0)
005a69d0                  esi_3 = 0;
005a69c5              else
005a69cc                  esi_3 = (4 - edx_8);
005a69cc              
005a69d8              int32_t edx_10 = (((esi_3 + ((esi_2 + edx_6) + 2)) + 8) & 3);
005a69db              int32_t esi_4;
005a69db              
005a69db              if (edx_10 == 0)
005a69e6                  esi_4 = 0;
005a69db              else
005a69e2                  esi_4 = (4 - edx_10);
005a69e2              
005a69ea              eax_6 += (esi_4 + ((esi_3 + ((esi_2 + edx_6) + 2)) + 8));
005a69ec              m_data = &m_data[1];
005a69ef              i = ebp_1;
005a69ef              ebp_1 -= 1;
005a69f0          } while (i != 1);
005a699e      }
005a699e      
005a69f2      uint32_t m_num_1 = this->days_of_the_week.m_num;
005a69f5      int32_t eax_7 = (eax_6 + 4);
005a69f5      
005a69fa      if (m_num_1 > 0)
005a69fa      {
005a69fc          class WeekDay** m_data_1 = this->days_of_the_week.m_data;
005a69ff          uint32_t ebp_2 = m_num_1;
005a6a4a          uint32_t i_1;
005a6a4a          
005a6a4a          do
005a6a4a          {
005a6a08              int32_t edx_14 = (*(uint32_t*)m_data_1->week_day_name.m_buffer->m_len - 1);
005a6a09              int32_t esi_6 = 0;
005a6a09              
005a6a11              if (edx_14 >= 0xffff)
005a6a13                  esi_6 = 4;
005a6a13              
005a6a1e              int32_t edx_16 = (((esi_6 + edx_14) + 2) & 3);
005a6a21              int32_t esi_7;
005a6a21              
005a6a21              if (edx_16 == 0)
005a6a2c                  esi_7 = 0;
005a6a21              else
005a6a28                  esi_7 = (4 - edx_16);
005a6a28              
005a6a2e              int32_t edi_4 = (((esi_6 + edx_14) + 2) + esi_7);
005a6a32              int32_t edx_18 = (edi_4 & 3);
005a6a35              int32_t esi_8;
005a6a35              
005a6a35              if (edx_18 == 0)
005a6a40                  esi_8 = 0;
005a6a35              else
005a6a3c                  esi_8 = (4 - edx_18);
005a6a3c              
005a6a44              eax_7 += (esi_8 + edi_4);
005a6a46              m_data_1 = &m_data_1[1];
005a6a49              i_1 = ebp_2;
005a6a49              ebp_2 -= 1;
005a6a4a          } while (i_1 != 1);
005a69fa      }
005a69fa      
005a6a4c      uint32_t m_num_2 = this->seasons.m_num;
005a6a4f      int32_t result = (eax_7 + 4);
005a6a4f      
005a6a54      if (m_num_2 > 0)
005a6a54      {
005a6a56          class Season** m_data_2 = this->seasons.m_data;
005a6a59          uint32_t ebx_1 = m_num_2;
005a6aab          uint32_t i_2;
005a6aab          
005a6aab          do
005a6aab          {
005a6a67              int32_t ecx_2 = (*(uint32_t*)m_data_2->season_name.m_buffer->m_len - 1);
005a6a68              int32_t edx_20 = 0;
005a6a68              
005a6a70              if (ecx_2 >= 0xffff)
005a6a72                  edx_20 = 4;
005a6a72              
005a6a7d              int32_t ecx_4 = (((edx_20 + ecx_2) + 2) & 3);
005a6a80              int32_t edx_21;
005a6a80              
005a6a80              if (ecx_4 == 0)
005a6a8b                  edx_21 = 0;
005a6a80              else
005a6a87                  edx_21 = (4 - ecx_4);
005a6a87              
005a6a93              int32_t ecx_6 = (((edx_21 + ((edx_20 + ecx_2) + 2)) + 4) & 3);
005a6a96              int32_t edx_22;
005a6a96              
005a6a96              if (ecx_6 == 0)
005a6aa1                  edx_22 = 0;
005a6a96              else
005a6a9d                  edx_22 = (4 - ecx_6);
005a6a9d              
005a6aa5              result += (edx_22 + ((edx_21 + ((edx_20 + ecx_2) + 2)) + 4));
005a6aa7              m_data_2 = &m_data_2[1];
005a6aaa              i_2 = ebx_1;
005a6aaa              ebx_1 -= 1;
005a6aab          } while (i_2 != 1);
005a6a54      }
005a6a54      
005a6ab1      return result;
005a6950  }

005a6a5d                                                                                         8d 49 00                               .I.
005a6ab2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005a6ac0  uint32_t __thiscall GameTime::Pack(class GameTime* this, void** arg2, uint32_t* arg3)

005a6ac0  {
005a6ac0      class GameTime* this_1 = this;
005a6ac0      
005a6ad6      if (*(uint32_t*)arg3 >= 8)
005a6ad6      {
005a6ada          void* eax_1 = *(uint32_t*)arg2;
005a6adc          *(uint32_t*)eax_1 = this->zero_time_of_year;
005a6ae1          *(uint32_t*)((char*)eax_1 + 4) = *(uint32_t*)((char*)this->zero_time_of_year)[4];
005a6ae4          *(uint32_t*)arg2 += 8;
005a6ae7          *(uint32_t*)arg3 -= 8;
005a6ad6      }
005a6ad6      
005a6aed      if (*(uint32_t*)arg3 >= 4)
005a6aed      {
005a6af4          **(uint32_t**)arg2 = this->zero_year;
005a6af6          *(uint32_t*)arg2 += 4;
005a6afb          uint32_t ecx_3 = (*(uint32_t*)arg3 - 4);
005a6b03          *(uint32_t*)arg3 = ecx_3;
005a6b03          
005a6b05          if (ecx_3 >= 4)
005a6b05          {
005a6b0c              **(uint32_t**)arg2 = ((float)((long double)this->day_length));
005a6b0e              *(uint32_t*)arg2 += 4;
005a6b13              uint32_t ecx_5 = (*(uint32_t*)arg3 - 4);
005a6b1b              *(uint32_t*)arg3 = ecx_5;
005a6b1b              
005a6b1d              if (ecx_5 >= 4)
005a6b1d              {
005a6b24                  **(uint32_t**)arg2 = this->days_per_year;
005a6b26                  *(uint32_t*)arg2 += 4;
005a6b29                  *(uint32_t*)arg3 -= 4;
005a6b1d              }
005a6b05          }
005a6aed      }
005a6aed      
005a6b33      uint32_t eax_6 = AC1Legacy::PStringBase<char>::Pack(&this->year_spec, arg2, *(uint32_t*)arg3);
005a6b3e      *(uint32_t*)arg3 -= eax_6;
005a6b40      PackObj::ALIGN_PTR(arg2, arg3);
005a6b47      uint32_t m_num = this->times_of_day.m_num;
005a6b47      
005a6b54      if (*(uint32_t*)arg3 >= 4)
005a6b54      {
005a6b58          **(uint32_t**)arg2 = m_num;
005a6b5a          *(uint32_t*)arg2 += 4;
005a6b5d          *(uint32_t*)arg3 -= 4;
005a6b54      }
005a6b54      
005a6b60      int32_t ebp = 0;
005a6b60      
005a6b64      if (m_num > 0)
005a6b64      {
005a6be7          do
005a6be7          {
005a6b76              class AC1Legacy::PStringBase<char>* ecx_12 = this->times_of_day.m_data[ebp];
005a6b76              
005a6b79              if (*(uint32_t*)arg3 >= 4)
005a6b79              {
005a6b80                  **(uint32_t**)arg2 = ((float)((long double)*(int32_t*)((char*)ecx_12 + 4)));
005a6b82                  *(uint32_t*)arg2 += 4;
005a6b87                  uint32_t edx_6 = (*(uint32_t*)arg3 - 4);
005a6b8f                  *(uint32_t*)arg3 = edx_6;
005a6b8f                  
005a6b91                  if (edx_6 >= 4)
005a6b91                  {
005a6b98                      **(uint32_t**)arg2 = *(int32_t*)((char*)ecx_12 + 8);
005a6b9a                      *(uint32_t*)arg2 += 4;
005a6b9d                      *(uint32_t*)arg3 -= 4;
005a6b91                  }
005a6b79              }
005a6b79              
005a6ba4              uint32_t eax_10 = AC1Legacy::PStringBase<char>::Pack(ecx_12, arg2, *(uint32_t*)arg3);
005a6bab              uint32_t ecx_14 = (*(uint32_t*)arg3 - eax_10);
005a6bad              *(uint32_t*)arg3 = ecx_14;
005a6bb1              void* edx_10 = (*(uint32_t*)arg2 & 0x80000003);
005a6bb1              bool cond:8_1 = edx_10 == 0;
005a6bb1              
005a6bb7              if (edx_10 < 0)
005a6bb7              {
005a6bba                  void* edx_12 = (((char*)edx_10 - 1) | 0xfffffffc);
005a6bbd                  edx_10 = ((char*)edx_12 + 1);
005a6bbd                  cond:8_1 = edx_12 == 0xffffffff;
005a6bb7              }
005a6bb7              
005a6bbe              if (!(cond:8_1))
005a6bbe              {
005a6bc5                  void* i_3 = (4 - edx_10);
005a6bc5                  
005a6bc9                  if (ecx_14 >= i_3)
005a6bc9                  {
005a6bcf                      *(uint32_t*)arg3 = (ecx_14 - i_3);
005a6bcf                      
005a6bd1                      if (i_3 > 0)
005a6bd1                      {
005a6bde                          void* i;
005a6bde                          
005a6bde                          do
005a6bde                          {
005a6bd5                              **(uint8_t**)arg2 = 0;
005a6bdb                              i = i_3;
005a6bdb                              i_3 -= 1;
005a6bdc                              *(uint32_t*)arg2 += 1;
005a6bde                          } while (i != 1);
005a6bd1                      }
005a6bc9                  }
005a6bbe              }
005a6bbe              
005a6be4              ebp += 1;
005a6be7          } while (ebp < m_num);
005a6b64      }
005a6b64      
005a6bec      uint32_t m_num_1 = this->days_of_the_week.m_num;
005a6bec      
005a6bef      if (*(uint32_t*)arg3 >= 4)
005a6bef      {
005a6bf3          **(uint32_t**)arg2 = m_num_1;
005a6bf5          *(uint32_t*)arg2 += 4;
005a6bf8          *(uint32_t*)arg3 -= 4;
005a6bef      }
005a6bef      
005a6bfb      int32_t ebx_1 = 0;
005a6bfb      
005a6bff      if (m_num_1 > 0)
005a6bff      {
005a6c50          do
005a6c50          {
005a6c0f              uint32_t eax_13 = AC1Legacy::PStringBase<char>::Pack(this->days_of_the_week.m_data[ebx_1], arg2, *(uint32_t*)arg3);
005a6c16              uint32_t ecx_20 = (*(uint32_t*)arg3 - eax_13);
005a6c18              *(uint32_t*)arg3 = ecx_20;
005a6c1c              void* eax_15 = (*(uint32_t*)arg2 & 0x80000003);
005a6c1c              bool cond:9_1 = eax_15 == 0;
005a6c1c              
005a6c23              if (eax_15 < 0)
005a6c23              {
005a6c26                  void* eax_17 = (((char*)eax_15 - 1) | 0xfffffffc);
005a6c29                  eax_15 = ((char*)eax_17 + 1);
005a6c29                  cond:9_1 = eax_17 == 0xffffffff;
005a6c23              }
005a6c23              
005a6c2a              if (!(cond:9_1))
005a6c2a              {
005a6c31                  void* i_5 = (4 - eax_15);
005a6c31                  
005a6c35                  if (ecx_20 >= i_5)
005a6c35                  {
005a6c3b                      *(uint32_t*)arg3 = (ecx_20 - i_5);
005a6c3b                      
005a6c3d                      if (i_5 > 0)
005a6c3d                      {
005a6c4b                          void* i_1;
005a6c4b                          
005a6c4b                          do
005a6c4b                          {
005a6c42                              **(uint8_t**)arg2 = 0;
005a6c48                              i_1 = i_5;
005a6c48                              i_5 -= 1;
005a6c49                              *(uint32_t*)arg2 += 1;
005a6c4b                          } while (i_1 != 1);
005a6c3d                      }
005a6c35                  }
005a6c2a              }
005a6c2a              
005a6c4d              ebx_1 += 1;
005a6c50          } while (ebx_1 < m_num_1);
005a6bff      }
005a6bff      
005a6c59      uint32_t m_num_2 = this->seasons.m_num;
005a6c59      
005a6c5c      if (*(uint32_t*)arg3 >= 4)
005a6c5c      {
005a6c60          **(uint32_t**)arg2 = m_num_2;
005a6c62          *(uint32_t*)arg2 += 4;
005a6c65          *(uint32_t*)arg3 -= 4;
005a6c5c      }
005a6c5c      
005a6c68      int32_t ebx_2 = 0;
005a6c68      
005a6c6c      if (m_num_2 > 0)
005a6c6c      {
005a6cd0          do
005a6cd0          {
005a6c7a              class AC1Legacy::PStringBase<char>* ecx_23 = this->seasons.m_data[ebx_2];
005a6c7a              
005a6c7d              if (*(uint32_t*)arg3 >= 4)
005a6c7d              {
005a6c84                  **(uint32_t**)arg2 = *(int32_t*)((char*)ecx_23 + 4);
005a6c86                  *(uint32_t*)arg2 += 4;
005a6c89                  *(uint32_t*)arg3 -= 4;
005a6c7d              }
005a6c7d              
005a6c90              uint32_t eax_21 = AC1Legacy::PStringBase<char>::Pack(ecx_23, arg2, *(uint32_t*)arg3);
005a6c97              uint32_t ecx_25 = (*(uint32_t*)arg3 - eax_21);
005a6c99              *(uint32_t*)arg3 = ecx_25;
005a6c9d              void* edx_25 = (*(uint32_t*)arg2 & 0x80000003);
005a6c9d              bool cond:14_1 = edx_25 == 0;
005a6c9d              
005a6ca3              if (edx_25 < 0)
005a6ca3              {
005a6ca6                  void* edx_27 = (((char*)edx_25 - 1) | 0xfffffffc);
005a6ca9                  edx_25 = ((char*)edx_27 + 1);
005a6ca9                  cond:14_1 = edx_27 == 0xffffffff;
005a6ca3              }
005a6ca3              
005a6caa              if (!(cond:14_1))
005a6caa              {
005a6cb1                  void* i_4 = (4 - edx_25);
005a6cb1                  
005a6cb5                  if (ecx_25 >= i_4)
005a6cb5                  {
005a6cbb                      *(uint32_t*)arg3 = (ecx_25 - i_4);
005a6cbb                      
005a6cbd                      if (i_4 > 0)
005a6cbd                      {
005a6ccb                          void* i_2;
005a6ccb                          
005a6ccb                          do
005a6ccb                          {
005a6cc2                              **(uint8_t**)arg2 = 0;
005a6cc8                              i_2 = i_4;
005a6cc8                              i_4 -= 1;
005a6cc9                              *(uint32_t*)arg2 += 1;
005a6ccb                          } while (i_2 != 1);
005a6cbd                      }
005a6cb5                  }
005a6caa              }
005a6caa              
005a6ccd              ebx_2 += 1;
005a6cd0          } while (ebx_2 < m_num_2);
005a6c6c      }
005a6c6c      
005a6cd9      return *(uint32_t*)arg3;
005a6ac0  }

005a6cdc                                                                                      90 90 90 90                              ....

005a6ce0  int32_t __thiscall Season::UnPack(class Season* this, void** arg2, uint32_t* arg3)

005a6ce0  {
005a6cf0      if (*(uint32_t*)arg3 >= 4)
005a6cf0      {
005a6cf6          this->begin = **(uint32_t**)arg2;
005a6cf9          *(uint32_t*)arg2 += 4;
005a6cfc          *(uint32_t*)arg3 -= 4;
005a6cf0      }
005a6cf0      
005a6d05      int32_t result = AC1Legacy::PStringBase<char>::UnPack(this, arg2, *(uint32_t*)arg3);
005a6d05      
005a6d0c      if (result == 0)
005a6d11          return result;
005a6d11      
005a6d19      int32_t eax_4 = (this->season_name.m_buffer->m_len - 1);
005a6d1a      int32_t ecx_2 = 0;
005a6d1a      
005a6d21      if (eax_4 >= 0xffff)
005a6d23          ecx_2 = 4;
005a6d23      
005a6d2e      int32_t ecx_4 = (((ecx_2 + eax_4) + 2) & 3);
005a6d31      int32_t eax_5;
005a6d31      
005a6d31      if (ecx_4 == 0)
005a6d3c          eax_5 = 0;
005a6d31      else
005a6d38          eax_5 = (4 - ecx_4);
005a6d38      
005a6d46      *(uint32_t*)arg3 -= (eax_5 + ((ecx_2 + eax_4) + 2));
005a6d48      int32_t eax_7 = PackObj::ALIGN_PTR(arg2, arg3);
005a6d5d      return -((eax_7 - eax_7));
005a6ce0  }


005a6d60  int32_t __thiscall WeekDay::UnPack(class WeekDay* this, void** arg2, uint32_t* arg3)

005a6d60  {
005a6d71      int32_t result = AC1Legacy::PStringBase<char>::UnPack(this, arg2, *(uint32_t*)arg3);
005a6d71      
005a6d78      if (result == 0)
005a6d7d          return result;
005a6d7d      
005a6d85      int32_t eax_2 = (this->week_day_name.m_buffer->m_len - 1);
005a6d86      int32_t ecx_1 = 0;
005a6d86      
005a6d8d      if (eax_2 >= 0xffff)
005a6d8f          ecx_1 = 4;
005a6d8f      
005a6d9a      int32_t ecx_3 = (((ecx_1 + eax_2) + 2) & 3);
005a6d9d      int32_t eax_3;
005a6d9d      
005a6d9d      if (ecx_3 == 0)
005a6da8          eax_3 = 0;
005a6d9d      else
005a6da4          eax_3 = (4 - ecx_3);
005a6da4      
005a6db2      *(uint32_t*)arg3 -= (eax_3 + ((ecx_1 + eax_2) + 2));
005a6db4      int32_t eax_5 = PackObj::ALIGN_PTR(arg2, arg3);
005a6dc9      return -((eax_5 - eax_5));
005a6d60  }

005a6dcc                                      90 90 90 90                                                              ....

005a6dd0  int32_t __thiscall TimeOfDay::UnPack(class TimeOfDay* this, void** arg2, uint32_t* arg3)

005a6dd0  {
005a6de0      if (*(uint32_t*)arg3 >= 4)
005a6de0      {
005a6de6          this->begin = **(uint32_t**)arg2;
005a6de9          *(uint32_t*)arg2 += 4;
005a6dee          uint32_t ecx_2 = (*(uint32_t*)arg3 - 4);
005a6df6          *(uint32_t*)arg3 = ecx_2;
005a6df6          
005a6df8          if (ecx_2 >= 4)
005a6df8          {
005a6dfe              this->is_night = **(uint32_t**)arg2;
005a6e01              *(uint32_t*)arg2 += 4;
005a6e04              *(uint32_t*)arg3 -= 4;
005a6df8          }
005a6de0      }
005a6de0      
005a6e0d      int32_t result = AC1Legacy::PStringBase<char>::UnPack(this, arg2, *(uint32_t*)arg3);
005a6e0d      
005a6e14      if (result == 0)
005a6e19          return result;
005a6e19      
005a6e21      int32_t eax_5 = (this->time_of_day_name.m_buffer->m_len - 1);
005a6e22      int32_t ecx_5 = 0;
005a6e22      
005a6e29      if (eax_5 >= 0xffff)
005a6e2b          ecx_5 = 4;
005a6e2b      
005a6e36      int32_t ecx_7 = (((ecx_5 + eax_5) + 2) & 3);
005a6e39      int32_t eax_6;
005a6e39      
005a6e39      if (ecx_7 == 0)
005a6e44          eax_6 = 0;
005a6e39      else
005a6e40          eax_6 = (4 - ecx_7);
005a6e40      
005a6e4e      *(uint32_t*)arg3 -= (eax_6 + ((ecx_5 + eax_5) + 2));
005a6e50      PackObj::ALIGN_PTR(arg2, arg3);
005a6e65      return -((0 - 0));
005a6dd0  }

005a6e68                          90 90 90 90 90 90 90 90                                                          ........

005a6e70  void __fastcall GameTime::~GameTime(class GameTime* this)

005a6e70  {
005a6e74      GameTime::Destroy(this);
005a6e79      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->year_spec.m_buffer;
005a6e79      
005a6e8c      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005a6e8e          m_buffer->vtable->__vecDelDtor(1);
005a6e8e      
005a6e9a      operator delete[](this->seasons.m_data);
005a6ea3      operator delete[](this->days_of_the_week.m_data);
005a6eac      operator delete[](this->times_of_day.m_data);
005a6e70  }

005a6eb7                                                                       90 90 90 90 90 90 90 90 90                         .........

005a6ec0  int32_t __thiscall GameTime::UnPack(class GameTime* this, void** arg2, uint32_t* arg3)

005a6ec0  {
005a6ec0      class GameTime* this_1 = this;
005a6ec2      void** ebx = arg2;
005a6ec8      uint32_t* esi = arg3;
005a6ec8      
005a6ed6      if (*(uint32_t*)esi >= 8)
005a6ed6      {
005a6ed8          void* eax_1 = *(uint32_t*)ebx;
005a6edc          this->zero_time_of_year = *(uint32_t*)eax_1;
005a6ee2          *(uint32_t*)((char*)this->zero_time_of_year)[4] = *(uint32_t*)((char*)eax_1 + 4);
005a6ee5          *(uint32_t*)ebx += 8;
005a6ee8          *(uint32_t*)esi -= 8;
005a6ed6      }
005a6ed6      
005a6eee      if (*(uint32_t*)esi >= 4)
005a6eee      {
005a6ef4          this->zero_year = **(uint32_t**)ebx;
005a6ef7          *(uint32_t*)ebx += 4;
005a6efc          uint32_t ecx_3 = (*(uint32_t*)esi - 4);
005a6f04          *(uint32_t*)esi = ecx_3;
005a6f04          
005a6f06          if (ecx_3 >= 4)
005a6f06          {
005a6f0c              this->day_length = **(uint32_t**)ebx;
005a6f0f              *(uint32_t*)ebx += 4;
005a6f14              uint32_t ecx_5 = (*(uint32_t*)esi - 4);
005a6f1c              *(uint32_t*)esi = ecx_5;
005a6f1c              
005a6f1e              if (ecx_5 >= 4)
005a6f1e              {
005a6f24                  this->days_per_year = **(uint32_t**)ebx;
005a6f27                  *(uint32_t*)ebx += 4;
005a6f2a                  *(uint32_t*)esi -= 4;
005a6f1e              }
005a6f06          }
005a6eee      }
005a6eee      
005a6f33      arg3 = this->days_per_year;
005a6f3e      this->year_length = ((double)(((long double)this->day_length) * ((long double)arg3)));
005a6f3e      
005a6f4e      if (AC1Legacy::PStringBase<char>::UnPack(&this->year_spec, ebx, *(uint32_t*)esi) != 0)
005a6f4e      {
005a6f59          int32_t eax_9 = (this->year_spec.m_buffer->m_len - 1);
005a6f5a          int32_t ecx_9 = 0;
005a6f5a          
005a6f61          if (eax_9 >= 0xffff)
005a6f63              ecx_9 = 4;
005a6f63          
005a6f6e          int32_t edx_6 = (((ecx_9 + eax_9) + 2) & 3);
005a6f71          int32_t ecx_10;
005a6f71          
005a6f71          if (edx_6 == 0)
005a6f7c              ecx_10 = 0;
005a6f71          else
005a6f78              ecx_10 = (4 - edx_6);
005a6f78          
005a6f86          *(uint32_t*)esi -= (ecx_10 + ((ecx_9 + eax_9) + 2));
005a6f88          PackObj::ALIGN_PTR(ebx, esi);
005a6f95          uint32_t* edi_1;
005a6f95          
005a6f95          if (*(uint32_t*)esi < 4)
005a6fad              edi_1 = arg3;
005a6f95          else
005a6f95          {
005a6f97              void* eax_14 = *(uint32_t*)ebx;
005a6f99              edi_1 = *(uint32_t*)eax_14;
005a6f9e              *(uint32_t*)ebx = ((char*)eax_14 + 4);
005a6fa5              arg3 = edi_1;
005a6fa9              *(uint32_t*)esi -= 4;
005a6f95          }
005a6f95          
005a6fb3          if (edi_1 <= *(uint32_t*)esi)
005a6fb3          {
005a6fbf              AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->times_of_day, edi_1);
005a6fc6              arg2 = nullptr;
005a6fc6              
005a6fce              if (edi_1 > 0)
005a6fce              {
005a704b                  bool cond:6_1;
005a704b                  
005a704b                  do
005a704b                  {
005a6fd7                      void* edi_2 = operator new(0xc);
005a6fd7                      
005a6fde                      if (edi_2 == 0)
005a6ffc                          edi_2 = nullptr;
005a6fde                      else
005a6fde                      {
005a6fe0                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005a6feb                          *(uint32_t*)edi_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005a6fed                          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005a6ff3                          *(uint32_t*)((char*)edi_2 + 4) = 0;
005a6fde                      }
005a6fde                      
005a7009                      if (TimeOfDay::UnPack(edi_2, ebx, esi) == 0)
005a71da                          return 0;
005a71da                      
005a700f                      uint32_t m_size = this->times_of_day.m_size;
005a7015                      int32_t eax_21;
005a7015                      
005a7015                      if (this->times_of_day.m_num >= m_size)
005a7015                      {
005a7019                          uint32_t eax_20;
005a7019                          
005a7019                          if (m_size <= 0)
005a701f                              eax_20 = 8;
005a7019                          else
005a701b                              eax_20 = (m_size * 2);
005a701b                          
005a7027                          eax_21 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->times_of_day, eax_20);
005a7015                      }
005a7015                      
005a702e                      if ((this->times_of_day.m_num < m_size || eax_21 != 0))
005a702e                      {
005a6fb9                          this->times_of_day.m_data[this->times_of_day.m_num] = edi_2;
005a6fb9                          this->times_of_day.m_num += 1;
005a702e                      }
005a702e                      
005a7045                      cond:6_1 = ((char*)arg2 + 1) < arg3;
005a7047                      arg2 += 1;
005a704b                  } while (cond:6_1);
005a704d                  edi_1 = arg3;
005a6fce              }
005a6fce              
005a7052              if (*(uint32_t*)esi >= 4)
005a7052              {
005a7054                  void* eax_25 = *(uint32_t*)ebx;
005a7056                  uint32_t* ecx_18 = *(uint32_t*)eax_25;
005a705b                  *(uint32_t*)ebx = ((char*)eax_25 + 4);
005a7062                  arg3 = ecx_18;
005a7066                  *(uint32_t*)esi -= 4;
005a7068                  edi_1 = ecx_18;
005a7052              }
005a7052              
005a706c              if (edi_1 <= *(uint32_t*)esi)
005a706c              {
005a707c                  AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->days_of_the_week, edi_1);
005a7083                  arg2 = nullptr;
005a7083                  
005a708b                  if (edi_1 > 0)
005a708b                  {
005a7105                      bool cond:7_1;
005a7105                      
005a7105                      do
005a7105                      {
005a7097                          void* edi_3 = operator new(4);
005a7097                          
005a709e                          if (edi_3 == 0)
005a70b6                              edi_3 = nullptr;
005a709e                          else
005a709e                          {
005a70a0                              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005a70ac                              *(uint32_t*)edi_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005a70ae                              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005a709e                          }
005a709e                          
005a70c3                          if (WeekDay::UnPack(edi_3, ebx, esi) == 0)
005a71da                              return 0;
005a71da                          
005a70c9                          uint32_t m_size_1 = this->days_of_the_week.m_size;
005a70cf                          int32_t eax_34;
005a70cf                          
005a70cf                          if (this->days_of_the_week.m_num >= m_size_1)
005a70cf                          {
005a70d3                              uint32_t eax_33;
005a70d3                              
005a70d3                              if (m_size_1 <= 0)
005a70d9                                  eax_33 = 8;
005a70d3                              else
005a70d5                                  eax_33 = (m_size_1 * 2);
005a70d5                              
005a70e1                              eax_34 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->days_of_the_week, eax_33);
005a70cf                          }
005a70cf                          
005a70e8                          if ((this->days_of_the_week.m_num < m_size_1 || eax_34 != 0))
005a70e8                          {
005a7076                              this->days_of_the_week.m_data[this->days_of_the_week.m_num] = edi_3;
005a7076                              this->days_of_the_week.m_num += 1;
005a70e8                          }
005a70e8                          
005a70ff                          cond:7_1 = ((char*)arg2 + 1) < arg3;
005a7101                          arg2 += 1;
005a7105                      } while (cond:7_1);
005a7107                      edi_1 = arg3;
005a708b                  }
005a708b                  
005a710c                  if (*(uint32_t*)esi >= 4)
005a710c                  {
005a710e                      void* eax_37 = *(uint32_t*)ebx;
005a7110                      uint32_t* ecx_26 = *(uint32_t*)eax_37;
005a7115                      *(uint32_t*)ebx = ((char*)eax_37 + 4);
005a711c                      arg3 = ecx_26;
005a7120                      *(uint32_t*)esi -= 4;
005a7122                      edi_1 = ecx_26;
005a710c                  }
005a710c                  
005a7126                  if (edi_1 <= *(uint32_t*)esi)
005a7126                  {
005a7136                      AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->seasons.m_data, edi_1);
005a713d                      arg2 = nullptr;
005a713d                      
005a7145                      if (edi_1 <= 0)
005a71d0                          return -((0 - 0));
005a71d0                      
005a714e                      while (true)
005a714e                      {
005a714e                          void* edi_4 = operator new(8);
005a714e                          
005a7155                          if (edi_4 == 0)
005a7174                              edi_4 = nullptr;
005a7155                          else
005a7155                          {
005a7157                              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005a7163                              *(uint32_t*)edi_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005a7165                              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
005a716b                              *(uint32_t*)((char*)edi_4 + 4) = 0;
005a7155                          }
005a7155                          
005a7181                          if (Season::UnPack(edi_4, ebx, esi) == 0)
005a71da                              return 0;
005a71da                          
005a7183                          uint32_t m_size_2 = this->seasons.m_size;
005a7189                          int32_t eax_46;
005a7189                          
005a7189                          if (this->seasons.m_num >= m_size_2)
005a7189                          {
005a718d                              uint32_t eax_45;
005a718d                              
005a718d                              if (m_size_2 <= 0)
005a7193                                  eax_45 = 8;
005a718d                              else
005a718f                                  eax_45 = (m_size_2 * 2);
005a718f                              
005a719b                              eax_46 = AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->seasons, eax_45);
005a7189                          }
005a7189                          
005a71a2                          if ((this->seasons.m_num < m_size_2 || eax_46 != 0))
005a71a2                          {
005a7130                              this->seasons.m_data[this->seasons.m_num] = edi_4;
005a7130                              this->seasons.m_num += 1;
005a71a2                          }
005a71a2                          
005a71b9                          bool cond:8_1 = ((char*)arg2 + 1) < arg3;
005a71bb                          arg2 += 1;
005a71bb                          
005a71bf                          if (!(cond:8_1))
005a71d0                              return -((0 - 0));
005a714e                      }
005a7126                  }
005a706c              }
005a6fb3          }
005a6f4e      }
005a6f4e      
005a71da      return 0;
005a6ec0  }

005a71dd                                                                                         90 90 90                               ...

005a71e0  void __thiscall CCliDatEvent::CCliDatEvent(class CCliDatEvent* this, uint8_t* arg2, int32_t arg3)

005a71e0  {
005a71f1      NetBlob::NetBlob(this, arg2, arg3, 5);
005a71f6      this->vtable = 0x7e5a28;
005a71fc      this->vtable = &*(int32_t*)((char*)CCliDatEvent::`vftable' + 4);
005a7203      this->vtable = &CCliDatEvent::`vftable';
005a71e0  }


005a7210  void* __thiscall CChatEvent::`vector deleting destructor'(class CChatEvent* this, uint32_t arg2)

005a7210  {
005a7213      /* tailcall */
005a7213      return CChatEvent::`scalar deleting destructor'(((char*)this - 8), arg2);
005a7210  }

005a7218                                                                          cc cc cc cc cc cc cc cc                          ........

005a7220  void* __thiscall CChatEvent::`vector deleting destructor'(class CChatEvent* this, uint32_t arg2)

005a7220  {
005a7223      /* tailcall */
005a7223      return CChatEvent::`scalar deleting destructor'(((char*)this - 0x10), arg2);
005a7220  }

005a7228                          cc cc cc cc cc cc cc cc                                                          ........

005a7230  uint32_t __thiscall ChatPoseTable::Pack(class ChatPoseTable* this, void** arg2, uint32_t arg3)

005a7230  {
005a7230      class ChatPoseTable* this_1 = this;
005a7236      class DBObj* m_pLast = this->m_pLast;
005a7243      this_1 = nullptr;
005a7265      int32_t result = (*(int32_t*)((char*)m_pLast + 0xc)(&this_1, 0) + *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(&this_1, 0));
005a7265      
005a7269      if (arg3 >= result)
005a7269      {
005a7278          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(arg2, arg3);
005a7283          *(int32_t*)((char*)this->m_pLast + 0xc)(arg2, arg3);
005a7269      }
005a7269      
005a728d      return result;
005a7230  }


005a7290  int32_t __thiscall ClothingTable::UnPack(class ClothingTable* this, void** arg2, uint32_t arg3)

005a7290  {
005a7290      class ClothingTable* this_1 = this;
005a7297      class DBObj* m_pLast = this->m_pLast;
005a72a4      this_1 = nullptr;
005a72a4      
005a72ca      if (arg3 >= (*(int32_t*)((char*)m_pLast + 0xc)(&this_1, 0) + *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(&this_1, 0)))
005a72ca      {
005a72d3          void* ebp_2 = *(uint32_t*)arg2;
005a72da          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0x10)(arg2, arg3);
005a72dd          this->m_pLast->m_timeStamp(arg2, arg3);
005a72dd          
005a72ee          if (arg3 >= (*(uint32_t*)arg2 - ebp_2))
005a7306              return 1;
005a7306          
005a72f0          *(uint32_t*)arg2 = ebp_2;
005a72ca      }
005a72ca      
005a72f9      return 0;
005a7290  }

005a7309                             90 90 90 90 90 90 90                                                           .......

005a7310  void* __thiscall PackableHashIterator<IDClass<_tagDataID,32,0>,ClothingBase>::`scalar deleting destructor'(class PackableHashIterator<IDClass<_tagDataID,32,0>,ClothingBase>* this, uint32_t arg2)

005a7310  {
005a7318      this->vtable = 0x7e5a2c;
005a7318      
005a731e      if ((arg2 & 1) != 0)
005a7321          operator delete(this);
005a7321      
005a732c      return this;
005a7310  }

005a732f                                               90                                                                 .

005a7330  void* __thiscall PackableHashIterator<unsigned long,CloPaletteTemplate>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,CloPaletteTemplate>* this, uint32_t arg2)

005a7330  {
005a7338      this->vtable = &PackableHashIterator<unsigned long,class CloPaletteTemplate>::`vftable';
005a7338      
005a733e      if ((arg2 & 1) != 0)
005a7341          operator delete(this);
005a7341      
005a734c      return this;
005a7330  }

005a734f                                               90                                                                 .

005a7350  class PackableHashIterator<IDClass<_tagDataID,32,0>,ClothingBase>* __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::begin(class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase> const* this, class PackableHashIterator<IDClass<_tagDataID,32,0>,ClothingBase>* __return)

005a7350  {
005a7350      uint32_t _table_size = this->_table_size;
005a7354      int32_t eax = 0;
005a7354      
005a7359      if (_table_size > 0)
005a7359      {
005a735b          class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets_1 = this->_buckets;
005a735e          class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets_2 = _buckets_1;
005a735e          
005a736b          do
005a736b          {
005a7363              if (*(uint32_t*)_buckets_2 != 0)
005a7363              {
005a738c                  int32_t ecx = _buckets_1[eax];
005a738f                  int32_t* __return_1 = __return;
005a7393                  __return_1[2] = _buckets_1;
005a7398                  __return_1[1] = ecx;
005a739b                  *(uint32_t*)__return_1 = 0x7e5a2c;
005a73a1                  __return_1[3] = _table_size;
005a73a4                  return __return_1;
005a7363              }
005a7363              
005a7365              eax += 1;
005a7366              _buckets_2 = &_buckets_2[1];
005a736b          } while (eax < _table_size);
005a7359      }
005a7359      
005a736d      class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets = this->_buckets;
005a7376      __return->_current = nullptr;
005a737d      __return->_buckets = _buckets;
005a7380      __return->vtable = 0x7e5a2c;
005a7386      __return->_table_size = _table_size;
005a7389      return __return;
005a7350  }

005a73a7                       90 90 90 90 90 90 90 90 90                                                         .........

005a73b0  class CloPaletteTemplate* __thiscall PackableHashTable<unsigned long,CloPaletteTemplate>::lookup(class PackableHashTable<unsigned long,CloPaletteTemplate> const* this, uint32_t const* arg2)

005a73b0  {
005a73b2      uint32_t _table_size = this->_table_size;
005a73b2      
005a73b7      if (_table_size != 0)
005a73b7      {
005a73b9          class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets = this->_buckets;
005a73b9          
005a73be          if (_buckets != 0)
005a73be          {
005a73c4              uint32_t const ecx = *(uint32_t*)arg2;
005a73c4              
005a73d1              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[5])
005a73d1              {
005a73d5                  if (ecx == *(uint32_t*)i)
005a73ea                      return &i[1];
005a73d1              }
005a73be          }
005a73b7      }
005a73b7      
005a73e2      return 0;
005a73b0  }

005a73ed                                         90 90 90                                                               ...

005a73f0  class PackableHashIterator<unsigned long,CloPaletteTemplate>* __thiscall PackableHashTable<unsigned long,CloPaletteTemplate>::begin(class PackableHashTable<unsigned long,CloPaletteTemplate> const* this, class PackableHashIterator<unsigned long,CloPaletteTemplate>* __return)

005a73f0  {
005a73f0      uint32_t _table_size = this->_table_size;
005a73f4      int32_t eax = 0;
005a73f4      
005a73f9      if (_table_size > 0)
005a73f9      {
005a73fb          class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets_1 = this->_buckets;
005a73fe          class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets_2 = _buckets_1;
005a73fe          
005a740b          do
005a740b          {
005a7403              if (*(uint32_t*)_buckets_2 != 0)
005a7403              {
005a742c                  int32_t ecx = _buckets_1[eax];
005a742f                  struct PackableHashIterator<unsigned long,CloPaletteTemplate>::VTable** __return_1 = __return;
005a7433                  __return_1[2] = _buckets_1;
005a7438                  __return_1[1] = ecx;
005a743b                  *(uint32_t*)__return_1 = &PackableHashIterator<unsigned long,class CloPaletteTemplate>::`vftable';
005a7441                  __return_1[3] = _table_size;
005a7444                  return __return_1;
005a7403              }
005a7403              
005a7405              eax += 1;
005a7406              _buckets_2 = &_buckets_2[1];
005a740b          } while (eax < _table_size);
005a73f9      }
005a73f9      
005a740d      class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets = this->_buckets;
005a7416      __return->_current = nullptr;
005a741d      __return->_buckets = _buckets;
005a7420      __return->vtable = &PackableHashIterator<unsigned long,class CloPaletteTemplate>::`vftable';
005a7426      __return->_table_size = _table_size;
005a7429      return __return;
005a73f0  }

005a7447                       90 90 90 90 90 90 90 90 90                                                         .........

005a7450  void __fastcall PackableHashTable<unsigned long,CloPaletteTemplate>::EmptyContents(class PackableHashTable<unsigned long,CloPaletteTemplate>* this)

005a7450  {
005a7459      if (this->_buckets != 0)
005a7459      {
005a745e          int32_t i = 0;
005a745e          
005a7462          if (this->_table_size > 0)
005a7462          {
005a749a              do
005a749a              {
005a7469                  void* j_1 = this->_buckets[i];
005a7469                  
005a746e                  if (j_1 != 0)
005a746e                  {
005a7488                      void* j;
005a7488                      
005a7488                      do
005a7488                      {
005a7470                          j = *(uint32_t*)((char*)j_1 + 0x14);
005a7476                          CloPaletteTemplate::~CloPaletteTemplate(((char*)j_1 + 4));
005a747c                          operator delete(j_1);
005a7486                          j_1 = j;
005a7488                      } while (j != 0);
005a746e                  }
005a746e                  
005a748a                  this->_buckets[i] = 0;
005a7497                  i += 1;
005a749a              } while (i < this->_table_size);
005a7462          }
005a7459      }
005a7459      
005a749f      this->_currNum = 0;
005a7450  }

005a74a8                          90 90 90 90 90 90 90 90                                                          ........

005a74b0  class CloPaletteTemplate* __thiscall ClothingTable::GetCloPaletteTemplate(class ClothingTable const* this, uint32_t const arg2)

005a74b0  {
005a74b1      uint32_t _table_size = this->_paletteTemplatesHash._table_size;
005a74b1      
005a74b7      if (_table_size != 0)
005a74b7      {
005a74b9          class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets = this->_paletteTemplatesHash._buckets;
005a74b9          
005a74be          if (_buckets != 0)
005a74be          {
005a74cf              for (int32_t* i = _buckets[(COMBINE(0, arg2) % _table_size)]; i != 0; i = i[5])
005a74cf              {
005a74d3                  if (arg2 == *(uint32_t*)i)
005a74e8                      return &i[1];
005a74cf              }
005a74be          }
005a74b7      }
005a74b7      
005a74e0      return 0;
005a74b0  }

005a74eb                                   90 90 90 90 90                                                             .....

005a74f0  class ClothingBase* __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::lookup(class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase> const* this, class IDClass<_tagDataID,32,0>* arg2)

005a74f0  {
005a74f2      uint32_t _table_size = this->_table_size;
005a74f2      
005a74f7      if (_table_size != 0)
005a74f7      {
005a74f9          class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets = this->_buckets;
005a74f9          
005a74fe          if (_buckets != 0)
005a74fe          {
005a7504              uint32_t id = arg2->id;
005a7504              
005a7511              for (int32_t* i = _buckets[(COMBINE(0, id) % _table_size)]; i != 0; i = i[4])
005a7511              {
005a7515                  if (id == *(uint32_t*)i)
005a752a                      return &i[1];
005a7511              }
005a74fe          }
005a74f7      }
005a74f7      
005a7522      return 0;
005a74f0  }

005a752d                                         90 90 90                                                               ...

005a7530  uint32_t __thiscall PackableHashTable<unsigned long,PackableList<EmoteSet> >::Pack(class PackableHashTable<unsigned long,PackableList<EmoteSet> >* this, void** arg2, uint32_t arg3)

005a7530  {
005a7530      class PackableHashTable<unsigned long,PackableList<EmoteSet> >* this_1 = this;
005a7535      uint32_t result = PackableHashTable<unsigned long,PackableList<EmoteSet> >::pack_size(this);
005a753a      uint32_t ebx = arg3;
005a7540      uint32_t result_1 = result;
005a7540      
005a7544      if (ebx >= result)
005a7544      {
005a7559          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005a755b          *(uint32_t*)arg2 += 4;
005a7561          uint32_t i = 0;
005a7565          arg3 = 0;
005a7565          
005a7569          if (this->_table_size > 0)
005a7569          {
005a75b2              do
005a75b2              {
005a7573                  int32_t* j = this->_buckets[i];
005a7573                  
005a7578                  if (j != 0)
005a7578                  {
005a759e                      do
005a759e                      {
005a7583                          if (ebx >= 4)
005a7583                          {
005a7589                              **(uint32_t**)arg2 = *(uint32_t*)j;
005a758b                              *(uint32_t*)arg2 += 4;
005a7583                          }
005a7583                          
005a7596                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
005a7599                          j = j[5];
005a759e                      } while (j != 0);
005a759e                      
005a75a0                      result = result_1;
005a75a4                      i = arg3;
005a7578                  }
005a7578                  
005a75ab                  i += 1;
005a75ae                  arg3 = i;
005a75b2              } while (i < this->_table_size);
005a7569          }
005a7544      }
005a7544      
005a75b9      return result;
005a7530  }

005a756d                                         8d 49 00                                                               .I.
005a75bc                                                                                      90 90 90 90                              ....

005a75c0  uint32_t __fastcall PackableHashTable<unsigned long,PackableList<EmoteSet> >::pack_size(class PackableHashTable<unsigned long,PackableList<EmoteSet> >* this)

005a75c0  {
005a75c0      class PackableHashTable<unsigned long,PackableList<EmoteSet> >* this_1 = this;
005a75c8      int32_t i = 0;
005a75ca      bool cond:0 = this->_table_size <= 0;
005a75cd      int32_t result = 4;
005a75d2      this_1 = nullptr;
005a75d2      
005a75d6      if (!(cond:0))
005a75d6      {
005a7611          do
005a7611          {
005a75e3              void* j = this->_buckets[i];
005a75e3              
005a75e8              while (j != 0)
005a75e8              {
005a75fd                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
005a7600                  j = *(uint32_t*)((char*)j + 0x14);
005a7605                  result = ((result + eax_2) + 4);
005a75e8              }
005a75e8              
005a760e              i += 1;
005a7611          } while (i < this->_table_size);
005a75d6      }
005a75d6      
005a761a      return result;
005a75c0  }

005a761b                                                                                   90 90 90 90 90                             .....

005a7620  void __fastcall PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::EmptyContents(class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>* this)

005a7620  {
005a7629      if (this->_buckets != 0)
005a7629      {
005a762e          int32_t i = 0;
005a762e          
005a7632          if (this->_table_size > 0)
005a7632          {
005a766a              do
005a766a              {
005a7639                  void* j_1 = this->_buckets[i];
005a7639                  
005a763e                  if (j_1 != 0)
005a763e                  {
005a7658                      void* j;
005a7658                      
005a7658                      do
005a7658                      {
005a7640                          j = *(uint32_t*)((char*)j_1 + 0x10);
005a7646                          ClothingBase::~ClothingBase(((char*)j_1 + 4));
005a764c                          operator delete(j_1);
005a7656                          j_1 = j;
005a7658                      } while (j != 0);
005a763e                  }
005a763e                  
005a765a                  this->_buckets[i] = 0;
005a7667                  i += 1;
005a766a              } while (i < this->_table_size);
005a7632          }
005a7629      }
005a7629      
005a766f      this->_currNum = 0;
005a7620  }

005a7678                                                                          90 90 90 90 90 90 90 90                          ........

005a7680  void __thiscall ClothingTable::GetSubDataIDs(class ClothingTable const* this, class QualifiedDataIDArray* arg2)

005a7680  {
005a768c      class ClothingTable* this_1 = this;
005a7696      class ClothingTable* this_2 = this_1;
005a769a      void __return;
005a769a      PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::begin(&this_1->_cloBaseHash, &__return);
005a76a3      void var_40;
005a76a3      ClothingBase::ClothingBase(&var_40);
005a76ac      int32_t var_34;
005a76ac      CloTextureEffect::CloTextureEffect(&var_34);
005a76b1      int32_t* var_24;
005a76b1      int32_t* ebx = var_24;
005a76b9      void var_60;
005a76b9      void var_50;
005a76b9      void var_48;
005a76b9      
005a76b9      if (ebx != 0)
005a76b9      {
005a76cd          while (true)
005a76cd          {
005a76cd              ClothingBase::operator=(&var_40, &ebx[1]);
005a76e5              void var_68;
005a76e5              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_68, *(uint32_t*)ebx, 0), 8);
005a76ee              int32_t var_70_1 = 0;
005a76f2              int32_t var_3c;
005a76f2              
005a76f2              if (var_3c > 0)
005a76f2              {
005a76f8                  void* var_74_1 = nullptr;
005a779f                  bool cond:2_1;
005a779f                  
005a779f                  do
005a779f                  {
005a7708                      int32_t var_38;
005a7708                      void* esi_1 = ((char*)var_74_1 + var_38);
005a7720                      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_60, *(uint32_t*)((char*)esi_1 + 8), 0), 8);
005a7728                      int32_t i = 0;
005a7728                      
005a772c                      if (*(uint32_t*)((char*)esi_1 + 0xc) > 0)
005a772c                      {
005a772e                          int32_t ebx_1 = 0;
005a772e                          
005a777f                          do
005a777f                          {
005a7730                              void* eax_7 = *(uint32_t*)((char*)esi_1 + 0x10);
005a7733                              class IDClass<_tagDataID,32,0> ecx_9 = *(uint32_t*)(((char*)eax_7 + ebx_1) + 4);
005a773b                              class IDClass<_tagDataID,32,0> var_30_1 = ecx_9;
005a773f                              class IDClass<_tagDataID,32,0> edx_2 = *(uint32_t*)(((char*)eax_7 + ebx_1) + 8);
005a7756                              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_50, ecx_9, 0), 8);
005a7771                              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_48, edx_2, 0), 8);
005a7779                              i += 1;
005a777a                              ebx_1 += 0xc;
005a777f                          } while (i < *(uint32_t*)((char*)esi_1 + 0xc));
005a777f                          
005a7781                          ebx = var_24;
005a772c                      }
005a772c                      
005a7795                      cond:2_1 = (var_70_1 + 1) < var_3c;
005a7797                      var_70_1 += 1;
005a779b                      var_74_1 += 0x14;
005a779f                  } while (cond:2_1);
005a77a5                  this_1 = this_2;
005a76f2              }
005a76f2              
005a77a9              int32_t* eax_17 = ebx[4];
005a77a9              
005a77b0              if (eax_17 == 0)
005a77b0              {
005a77b9                  int32_t eax_16 = (ebx[5] + 1);
005a77bc                  int32_t var_1c;
005a77bc                  
005a77bc                  if (eax_16 >= var_1c)
005a77bc                  {
005a77d2                  label_5a77d2:
005a77d2                      eax_17 = nullptr;
005a77bc                  }
005a77bc                  else
005a77bc                  {
005a77c7                      int32_t var_20;
005a77c7                      
005a77c7                      while (*(uint32_t*)(var_20 + (eax_16 << 2)) == 0)
005a77c7                      {
005a77cd                          eax_16 += 1;
005a77cd                          
005a77d0                          if (eax_16 >= var_1c)
005a77d0                              goto label_5a77d2;
005a77c7                      }
005a77c7                      
005a78da                      eax_17 = *(uint32_t*)(var_20 + (eax_16 << 2));
005a77bc                  }
005a77b0              }
005a77b0              
005a77d6              var_24 = eax_17;
005a77d6              
005a77da              if (eax_17 == 0)
005a77da                  break;
005a77da              
005a76c1              ebx = var_24;
005a76cd          }
005a76b9      }
005a76b9      
005a77e0      uint32_t _table_size = this_1->_paletteTemplatesHash._table_size;
005a77e3      int32_t ecx_16 = 0;
005a77e7      class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets_2;
005a77e7      void* const i_1;
005a77e7      class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets_4;
005a77e7      
005a77e7      if (_table_size <= 0)
005a77e7      {
005a7801      label_5a7801:
005a7801          class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets = this_1->_paletteTemplatesHash._buckets;
005a7804          i_1 = nullptr;
005a7806          _buckets_2 = _buckets;
005a780a          _buckets_4 = _buckets;
005a77e7      }
005a77e7      else
005a77e7      {
005a77e9          class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets_1 = this_1->_paletteTemplatesHash._buckets;
005a77ec          class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets_3 = _buckets_1;
005a77ec          
005a77f3          while (*(uint32_t*)_buckets_3 == 0)
005a77f3          {
005a77f9              ecx_16 += 1;
005a77fa              _buckets_3 = &_buckets_3[1];
005a77fa              
005a77ff              if (ecx_16 >= _table_size)
005a77ff                  goto label_5a7801;
005a77f3          }
005a77f3          
005a78e2          i_1 = _buckets_1[ecx_16];
005a78e5          _buckets_4 = _buckets_1;
005a78e7          _buckets_2 = _buckets_4;
005a77e7      }
005a77e7      
005a7814      void var_18;
005a7814      CloPaletteTemplate::CloPaletteTemplate(&var_18);
005a781b      void* const i_2;
005a781b      
005a781b      for (; i_1 != 0; i_1 = i_2)
005a781b      {
005a7829          CloPaletteTemplate::CloPaletteTemplate(&var_60, ((char*)i_1 + 4));
005a7844          class IDClass<_tagDataID,32,0> var_5c;
005a7844          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_48, var_5c, 0), 8);
005a784d          int32_t esi_2 = 0;
005a7851          int32_t var_58;
005a7851          
005a7851          if (var_58 > 0)
005a7851          {
005a7853              int32_t edi = 0;
005a7853              
005a787e              do
005a787e              {
005a786f                  int32_t var_54;
005a786f                  QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_50, *(uint32_t*)((edi + var_54) + 0x10), 0), 8);
005a7878                  esi_2 += 1;
005a7879                  edi += 0x14;
005a787e              } while (esi_2 < var_58);
005a787e              
005a7880              _buckets_4 = _buckets_2;
005a7851          }
005a7851          
005a7888          CloPaletteTemplate::~CloPaletteTemplate(&var_60);
005a788d          i_2 = *(uint32_t*)((char*)i_1 + 0x14);
005a788d          
005a7892          if (i_2 == 0)
005a7892          {
005a789b              int32_t eax_25 = (*(uint32_t*)((char*)i_1 + 0x18) + 1);
005a789b              
005a789e              if (eax_25 >= _table_size)
005a789e              {
005a78ab              label_5a78ab:
005a78ab                  i_2 = nullptr;
005a789e              }
005a789e              else
005a789e              {
005a78a4                  while (_buckets_4[eax_25] == 0)
005a78a4                  {
005a78a6                      eax_25 += 1;
005a78a6                      
005a78a9                      if (eax_25 >= _table_size)
005a78a9                          goto label_5a78ab;
005a78a4                  }
005a78a4                  
005a78f0                  i_2 = _buckets_4[eax_25];
005a789e              }
005a7892          }
005a781b      }
005a781b      
005a78bb      CloPaletteTemplate::~CloPaletteTemplate(&var_18);
005a78c4      var_34 = 0x79285c;
005a78cc      ClothingBase::~ClothingBase(&var_40);
005a7680  }

005a78f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005a7900  int32_t __thiscall ClothingTable::BuildObjDesc(class ClothingTable const* this, class IDClass<_tagDataID,32,0> arg2, uint32_t const arg3, class ShadePackage const* arg4, class ObjDesc* arg5)

005a7900  {
005a7906      class IDClass<_tagDataID,32,0> esi = arg2;
005a7910      uint32_t _table_size = this->_cloBaseHash._table_size;
005a7915      class ClothingBase* eax_3;
005a7915      
005a7915      if (_table_size != 0)
005a7915      {
005a7917          class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets = this->_cloBaseHash._buckets;
005a7917          
005a791c          if (_buckets != 0)
005a791c          {
005a7929              for (int32_t* i = _buckets[(COMBINE(0, esi) % _table_size)]; i != 0; i = i[4])
005a7929              {
005a7932                  if (esi == *(uint32_t*)i)
005a7932                  {
005a793d                      eax_3 = &i[1];
005a793d                      
005a7942                      if (eax_3 != 0)
005a7942                          goto label_5a7acb;
005a7942                      
005a7942                      goto label_5a7948;
005a7932                  }
005a7929              }
005a791c          }
005a7915      }
005a7915      
005a7948  label_5a7948:
005a7972      uint32_t id_2;
005a7972      
005a7972      if ((((esi == UMBRAEN_MALE_CROWN_SETUP.id || esi == UMBRAEN_MALE_CROWN_GEN_SETUP.id) || esi == UMBRAEN_MALE_NOCROWN_SETUP.id) || esi == UMBRAEN_MALE_VOID_SETUP.id))
005a7972      {
005a7a9d          id_2 = UMBRAEN_MALE_CLOTHING_DEFAULT.id;
005a7aa8      label_5a7aa8:
005a7aa8          arg2 = id_2;
005a7aa8          
005a7aac          if (id_2 != INVALID_DID.id)
005a7aac          {
005a7ab7              eax_3 = PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::lookup(&this->_cloBaseHash, &arg2);
005a7ab7              
005a7abe              if (eax_3 != 0)
005a7abe              {
005a7acb              label_5a7acb:
005a7acb                  
005a7ad2                  if (ClothingBase::ApplyPartAndTextureChanges(eax_3, arg5) == 0)
005a7bf1                      return 0;
005a7bf1                  
005a7ade                  if (arg3 != 0)
005a7ade                  {
005a7aec                      class CloPaletteTemplate* eax_6 = PackableHashTable<unsigned long,CloPaletteTemplate>::lookup(&this->_paletteTemplatesHash, &arg3);
005a7aec                      
005a7af5                      if (eax_6 == 0)
005a7bf1                          return 0;
005a7bf1                      
005a7afe                      int32_t ebp_1 = 0;
005a7afe                      
005a7b02                      if (eax_6->numSubpalEffects > 0)
005a7b02                      {
005a7b0a                          int32_t ebx_1 = 0;
005a7b0a                          
005a7b24                          while (true)
005a7b24                          {
005a7b24                              void var_20;
005a7b24                              class DBObj* eax_11 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_20, *(uint32_t*)(&eax_6->subpalEffects->palSet + ebx_1), 0x18));
005a7b24                              
005a7b32                              if (eax_11 == 0)
005a7bf1                                  return 0;
005a7bf1                              
005a7b3e                              uint32_t id = INVALID_DID.id;
005a7b47                              int32_t var_18 = 0x7c3674;
005a7b4f                              int32_t var_10_1 = 0;
005a7b53                              int32_t var_c_1 = 0;
005a7b57                              int32_t var_8_1 = 0;
005a7b5b                              int32_t var_4_1 = 0;
005a7b6b                              class IDClass<_tagDataID,32,0> var_38_1;
005a7b6b                              *(uint64_t*)((char*)var_38_1 + 0) = ((double)ShadePackage::GetVal(arg4, ebp_1));
005a7b78                              uint32_t id_1 = PalSet::GetPaletteID(eax_11, &arg3, var_38_1)->id;
005a7b7c                              eax_11->vtable->Release();
005a7b83                              class CloSubpalEffect* subpalEffects = eax_6->subpalEffects;
005a7b8a                              void* eax_14 = ((char*)subpalEffects + ebx_1);
005a7b8c                              int32_t i_1 = 0;
005a7b8c                              
005a7b90                              if (*(uint32_t*)(&subpalEffects->numRanges + ebx_1) > 0)
005a7b90                              {
005a7bc0                                  class CloSubpalEffect* subpalEffects_1;
005a7bc0                                  
005a7bc0                                  do
005a7bc0                                  {
005a7b98                                      int32_t var_10_2 = *(uint32_t*)(*(uint32_t*)((char*)eax_14 + 8) + (i_1 << 2));
005a7ba6                                      int32_t var_c_2 = *(uint32_t*)(*(uint32_t*)((char*)eax_14 + 0xc) + (i_1 << 2));
005a7baf                                      ObjDesc::AddSubpalette(arg5, &var_18);
005a7bb4                                      subpalEffects_1 = eax_6->subpalEffects;
005a7bbb                                      eax_14 = ((char*)subpalEffects_1 + ebx_1);
005a7bbd                                      i_1 += 1;
005a7bc0                                  } while (i_1 < *(uint32_t*)(&subpalEffects_1->numRanges + ebx_1));
005a7b90                              }
005a7b90                              
005a7bc5                              ebp_1 += 1;
005a7bc6                              ebx_1 += 0x14;
005a7bc9                              bool cond:1_1 = ebp_1 < eax_6->numSubpalEffects;
005a7bcb                              var_18 = 0x79285c;
005a7bcb                              
005a7bd3                              if (!(cond:1_1))
005a7be5                                  return 1;
005a7b24                          }
005a7b02                      }
005a7ade                  }
005a7abe              }
005a7aac          }
005a7972      }
005a7972      else
005a7972      {
005a79a2          if ((((esi == UMBRAEN_FEMALE_CROWN_SETUP.id || esi == UMBRAEN_FEMALE_CROWN_GEN_SETUP.id) || esi == UMBRAEN_FEMALE_NOCROWN_SETUP.id) || esi == UMBRAEN_FEMALE_VOID_SETUP.id))
005a79a2          {
005a7a96              id_2 = UMBRAEN_FEMALE_CLOTHING_DEFAULT.id;
005a7a9b              goto label_5a7aa8;
005a79a2          }
005a79a2          
005a79d2          if ((((esi == PENUMBRAEN_MALE_CROWN_SETUP.id || esi == PENUMBRAEN_MALE_CROWN_GEN_SETUP.id) || esi == PENUMBRAEN_MALE_NOCROWN_SETUP.id) || esi == PENUMBRAEN_MALE_VOID_SETUP.id))
005a79d2          {
005a7a8f              id_2 = PENUMBRAEN_MALE_CLOTHING_DEFAULT.id;
005a7a94              goto label_5a7aa8;
005a79d2          }
005a79d2          
005a7a02          if ((((esi == PENUMBRAEN_FEMALE_CROWN_SETUP.id || esi == PENUMBRAEN_FEMALE_CROWN_GEN_SETUP.id) || esi == PENUMBRAEN_FEMALE_NOCROWN_SETUP.id) || esi == PENUMBRAEN_FEMALE_VOID_SETUP.id))
005a7a02          {
005a7a88              id_2 = PENUMBRAEN_FEMALE_CLOTHING_DEFAULT.id;
005a7a8d              goto label_5a7aa8;
005a7a02          }
005a7a02          
005a7a2e          if (((((esi == UNDEAD_MALE_UNDEAD_GEN_SETUP.id || esi == UNDEAD_MALE_SKELETON_SETUP.id) || esi == UNDEAD_MALE_SKELETON_NOFLAME_SETUP.id) || esi == UNDEAD_MALE_ZOMBIE_SETUP.id) || esi == UNDEAD_MALE_ZOMBIE_NOFLAME_SETUP.id))
005a7a2e          {
005a7a81              id_2 = UNDEAD_MALE_CLOTHING_DEFAULT.id;
005a7a86              goto label_5a7aa8;
005a7a2e          }
005a7a2e          
005a7a56          if (((((esi == UNDEAD_FEMALE_UNDEAD_GEN_SETUP.id || esi == UNDEAD_FEMALE_SKELETON_SETUP.id) || esi == UNDEAD_FEMALE_SKELETON_NOFLAME_SETUP.id) || esi == UNDEAD_FEMALE_ZOMBIE_SETUP.id) || esi == UNDEAD_FEMALE_ZOMBIE_NOFLAME_SETUP.id))
005a7a56          {
005a7a7a              id_2 = UNDEAD_FEMALE_CLOTHING_DEFAULT.id;
005a7a7f              goto label_5a7aa8;
005a7a56          }
005a7a56          
005a7a5e          if (esi == ANAKSHAY_MALE_SETUP.id)
005a7a5e          {
005a7a60              id_2 = HUMAN_MALE_CLOTHING_DEFAULT.id;
005a7a65              goto label_5a7aa8;
005a7a5e          }
005a7a5e          
005a7a6d          if (esi == ANAKSHAY_FEMALE_SETUP.id)
005a7a6d          {
005a7a73              id_2 = HUMAN_FEMALE_CLOTHING_DEFAULT.id;
005a7a78              goto label_5a7aa8;
005a7a6d          }
005a7972      }
005a7be5      return 1;
005a7900  }

005a792d                                         8d 49 00                                                               .I.
005a7bf4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a7c00  uint32_t __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::Pack(class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>* this, void** arg2, uint32_t arg3)

005a7c00  {
005a7c00      class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>* this_1 = this;
005a7c05      uint32_t result = PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::pack_size(this);
005a7c0a      uint32_t ebx = arg3;
005a7c10      uint32_t result_1 = result;
005a7c10      
005a7c14      if (ebx >= result)
005a7c14      {
005a7c29          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005a7c2b          *(uint32_t*)arg2 += 4;
005a7c31          uint32_t i = 0;
005a7c35          arg3 = 0;
005a7c35          
005a7c39          if (this->_table_size > 0)
005a7c39          {
005a7c82              do
005a7c82              {
005a7c43                  int32_t* j = this->_buckets[i];
005a7c43                  
005a7c48                  if (j != 0)
005a7c48                  {
005a7c6e                      do
005a7c6e                      {
005a7c55                          if (ebx >= 4)
005a7c55                          {
005a7c59                              **(uint32_t**)arg2 = *(uint32_t*)j;
005a7c5b                              *(uint32_t*)arg2 += 4;
005a7c55                          }
005a7c55                          
005a7c66                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
005a7c69                          j = j[4];
005a7c6e                      } while (j != 0);
005a7c6e                      
005a7c70                      result = result_1;
005a7c74                      i = arg3;
005a7c48                  }
005a7c48                  
005a7c7b                  i += 1;
005a7c7e                  arg3 = i;
005a7c82              } while (i < this->_table_size);
005a7c39          }
005a7c14      }
005a7c14      
005a7c89      return result;
005a7c00  }

005a7c3d                                                                                         8d 49 00                               .I.
005a7c8c                                      90 90 90 90                                                              ....

005a7c90  uint32_t __fastcall PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::pack_size(class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>* this)

005a7c90  {
005a7c90      class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>* this_1 = this;
005a7c98      int32_t i = 0;
005a7c9a      bool cond:0 = this->_table_size <= 0;
005a7c9d      int32_t result = 4;
005a7ca2      this_1 = nullptr;
005a7ca2      
005a7ca6      if (!(cond:0))
005a7ca6      {
005a7ce1          do
005a7ce1          {
005a7cb3              void* j = this->_buckets[i];
005a7cb3              
005a7cb8              while (j != 0)
005a7cb8              {
005a7ccd                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
005a7cd0                  j = *(uint32_t*)((char*)j + 0x10);
005a7cd5                  result = ((result + eax_2) + 4);
005a7cb8              }
005a7cb8              
005a7cde              i += 1;
005a7ce1          } while (i < this->_table_size);
005a7ca6      }
005a7ca6      
005a7cea      return result;
005a7c90  }

005a7ceb                                   90 90 90 90 90                                                             .....

005a7cf0  int32_t __thiscall PackableHashTable<unsigned long,CloPaletteTemplate>::UnPack(class PackableHashTable<unsigned long,CloPaletteTemplate>* this, void** arg2, uint32_t arg3)

005a7cf0  {
005a7cfe      if (arg3 < 4)
005a7d07          return 0;
005a7d07      
005a7d0c      void** edi = arg2;
005a7d10      void* eax_1 = *(uint32_t*)edi;
005a7d18      uint32_t var_14 = arg3;
005a7d1c      PackableHashTable<unsigned long,CloPaletteTemplate>::EmptyContents(this);
005a7d21      class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets = this->_buckets;
005a7d21      
005a7d28      if (_buckets != 0)
005a7d28      {
005a7d2b          operator delete[](_buckets);
005a7d33          this->_buckets = nullptr;
005a7d28      }
005a7d28      
005a7d36      this->_table_size = 0;
005a7d39      void* ecx_1 = *(uint32_t*)edi;
005a7d3b      int32_t eax_2 = *(uint32_t*)ecx_1;
005a7d40      *(uint32_t*)edi = ((char*)ecx_1 + 4);
005a7d44      uint32_t ecx_4 = (eax_2 >> 0x10);
005a7d47      int32_t eax_3 = (eax_2 & 0xffff);
005a7d4c      int32_t ebx_1 = (arg3 - 4);
005a7d51      this->_table_size = ecx_4;
005a7d51      
005a7d56      if (ecx_4 == 0)
005a7d56      {
005a7d5f          int32_t result;
005a7d5f          result = eax_3 == 0;
005a7d66          return result;
005a7d56      }
005a7d56      
005a7d7b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
005a7d7b      {
005a7d94          int32_t var_10;
005a7d94          CloPaletteTemplate::CloPaletteTemplate(&var_10);
005a7d9b          arg3 = 0;
005a7da3          int32_t* ecx_10;
005a7da3          
005a7da3          if (eax_3 <= 0)
005a7da3          {
005a7dff          label_5a7dff:
005a7dff              ecx_10 = &var_10;
005a7dff              
005a7e03              if (var_14 >= (*(uint32_t*)edi - eax_1))
005a7e03              {
005a7e05                  CloPaletteTemplate::~CloPaletteTemplate(ecx_10);
005a7e16                  return 1;
005a7e03              }
005a7da3          }
005a7da3          else
005a7da3          {
005a7da8              while (true)
005a7da8              {
005a7da8                  if (ebx_1 >= 4)
005a7da8                  {
005a7daa                      int32_t* eax_5 = *(uint32_t*)edi;
005a7dae                      int32_t edx_1 = var_10;
005a7db3                      arg2 = *(uint32_t*)eax_5;
005a7dbf                      *(uint32_t*)edi = &eax_5[1];
005a7dbf                      
005a7dc6                      if ((*(uint32_t*)(edx_1 + 0x10)(edi, ebx_1) != 0 && (PackableHashTable<unsigned long,CloPaletteTemplate>::add(this, &arg2, &var_10) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
005a7dc6                      {
005a7de9                          bool cond:5_1 = (arg3 + 1) < eax_3;
005a7deb                          arg3 += 1;
005a7deb                          
005a7def                          if (!(cond:5_1))
005a7def                              goto label_5a7dff;
005a7def                          
005a7def                          continue;
005a7dc6                      }
005a7da8                  }
005a7da8                  
005a7e19                  ecx_10 = &var_10;
005a7e19                  break;
005a7da8              }
005a7da3          }
005a7da3          
005a7e1d          CloPaletteTemplate::~CloPaletteTemplate(ecx_10);
005a7d7b      }
005a7d7b      
005a7e2b      return 0;
005a7cf0  }

005a7e2e                                            90 90                                                                ..

005a7e30  int32_t __thiscall PackableHashTable<unsigned long,CloPaletteTemplate>::add(class PackableHashTable<unsigned long,CloPaletteTemplate>* this, uint32_t const* arg2, class CloPaletteTemplate const* arg3)

005a7e30  {
005a7e3a      uint32_t _table_size_1 = this->_table_size;
005a7e3a      
005a7e3f      if (_table_size_1 == 0)
005a7e3f      {
005a7e6e      label_5a7e6e:
005a7e6e          void* eax_4 = operator new(0x1c);
005a7e6e          
005a7e7a          if (eax_4 != 0)
005a7e7a          {
005a7e83              uint32_t _table_size = this->_table_size;
005a7e8a              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
005a7e8c              CloPaletteTemplate::CloPaletteTemplate(((char*)eax_4 + 4), arg3);
005a7e91              *(uint32_t*)((char*)eax_4 + 0x14) = 0;
005a7e9d              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
005a7e9f              *(uint32_t*)((char*)eax_4 + 0x18) = temp1_2;
005a7eaa              *(uint32_t*)((char*)eax_4 + 0x14) = this->_buckets[temp1_2];
005a7ead              this->_buckets[temp1_2] = eax_4;
005a7eb3              this->_currNum += 1;
005a7ebf              return 1;
005a7e7a          }
005a7e3f      }
005a7e3f      else
005a7e3f      {
005a7e41          class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets = this->_buckets;
005a7e41          
005a7e46          if (_buckets == 0)
005a7e46              goto label_5a7e6e;
005a7e46          
005a7e48          uint32_t const i = *(uint32_t*)arg2;
005a7e51          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
005a7e51          
005a7e56          if (edx_3 == 0)
005a7e56              goto label_5a7e6e;
005a7e56          
005a7e5a          while (i != *(uint32_t*)edx_3)
005a7e5a          {
005a7e5c              edx_3 = edx_3[5];
005a7e5c              
005a7e61              if (edx_3 == 0)
005a7e61                  goto label_5a7e6e;
005a7e5a          }
005a7e5a          
005a7e6a          if (edx_3 == 0xfffffffc)
005a7e6a              goto label_5a7e6e;
005a7e3f      }
005a7e3f      
005a7ec8      return 0;
005a7e30  }

005a7ecb                                   90 90 90 90 90                                                             .....

005a7ed0  void* __thiscall PackableHashTable<unsigned long,CloPaletteTemplate>::`scalar deleting destructor'(class PackableHashTable<unsigned long,CloPaletteTemplate>* this, uint32_t arg2)

005a7ed0  {
005a7ed3      this->vtable = 0x7e5a48;
005a7ed9      PackableHashTable<unsigned long,CloPaletteTemplate>::EmptyContents(this);
005a7ede      class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets = this->_buckets;
005a7ede      
005a7ee3      if (_buckets != 0)
005a7ee3      {
005a7ee6          operator delete[](_buckets);
005a7eee          this->_buckets = nullptr;
005a7ee3      }
005a7ee3      
005a7efa      this->_table_size = 0;
005a7f01      this->vtable = 0x79285c;
005a7f01      
005a7f07      if ((arg2 & 1) != 0)
005a7f0a          operator delete(this);
005a7f0a      
005a7f15      return this;
005a7ed0  }

005a7f18                                                                          90 90 90 90 90 90 90 90                          ........

005a7f20  int32_t __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::UnPack(class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>* this, void** arg2, uint32_t arg3)

005a7f20  {
005a7f2e      if (arg3 < 4)
005a7f37          return 0;
005a7f37      
005a7f3c      void** edi = arg2;
005a7f40      void* eax_1 = *(uint32_t*)edi;
005a7f48      uint32_t var_10 = arg3;
005a7f4c      PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::EmptyContents(this);
005a7f51      class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets = this->_buckets;
005a7f51      
005a7f58      if (_buckets != 0)
005a7f58      {
005a7f5b          operator delete[](_buckets);
005a7f63          this->_buckets = nullptr;
005a7f58      }
005a7f58      
005a7f66      this->_table_size = 0;
005a7f69      void* ecx_1 = *(uint32_t*)edi;
005a7f6b      int32_t eax_2 = *(uint32_t*)ecx_1;
005a7f70      *(uint32_t*)edi = ((char*)ecx_1 + 4);
005a7f74      uint32_t ecx_4 = (eax_2 >> 0x10);
005a7f77      int32_t eax_3 = (eax_2 & 0xffff);
005a7f7c      void** ebx_1 = (arg3 - 4);
005a7f81      this->_table_size = ecx_4;
005a7f81      
005a7f86      if (ecx_4 == 0)
005a7f86      {
005a7f8f          int32_t result;
005a7f8f          result = eax_3 == 0;
005a7f96          return result;
005a7f86      }
005a7f86      
005a7fab      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
005a7fab      {
005a7fc4          int32_t var_c;
005a7fc4          ClothingBase::ClothingBase(&var_c);
005a7fcb          arg3 = 0;
005a7fd3          int32_t* ecx_9;
005a7fd3          
005a7fd3          if (eax_3 <= 0)
005a7fd3          {
005a8040          label_5a8040:
005a8040              ecx_9 = &var_c;
005a8040              
005a8044              if (var_10 >= (*(uint32_t*)edi - eax_1))
005a8044              {
005a8046                  ClothingBase::~ClothingBase(ecx_9);
005a8057                  return 1;
005a8044              }
005a7fd3          }
005a7fd3          else
005a7fd3          {
005a7fe0              while (true)
005a7fe0              {
005a7fe0                  arg2 = ebx_1;
005a7fee                  uint32_t var_1c;
005a7fee                  
005a7fee                  if (PackObj::UNPACK_TYPE(&var_1c, edi, &arg2) != 0)
005a7fee                  {
005a7ff4                      int32_t edx_1 = var_c;
005a7ffe                      uint32_t var_18 = var_1c;
005a7ffe                      
005a8007                      if ((*(uint32_t*)(edx_1 + 0x10)(edi, ebx_1) != 0 && (PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::add(this, &var_18, &var_c) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
005a8007                      {
005a802a                          bool cond:5_1 = (arg3 + 1) < eax_3;
005a802c                          arg3 += 1;
005a802c                          
005a8030                          if (!(cond:5_1))
005a8030                              goto label_5a8040;
005a8030                          
005a8030                          continue;
005a8007                      }
005a7fee                  }
005a7fee                  
005a805a                  ecx_9 = &var_c;
005a805a                  break;
005a7fe0              }
005a7fd3          }
005a7fd3          
005a805e          ClothingBase::~ClothingBase(ecx_9);
005a7fab      }
005a7fab      
005a806c      return 0;
005a7f20  }

005a806f                                               90                                                                 .

005a8070  int32_t __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::add(class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>* this, class IDClass<_tagDataID,32,0>* arg2, class ClothingBase const* arg3)

005a8070  {
005a807a      uint32_t _table_size_1 = this->_table_size;
005a807a      
005a807f      if (_table_size_1 == 0)
005a807f      {
005a80ae      label_5a80ae:
005a80ae          void* eax_4 = operator new(0x18);
005a80ae          
005a80ba          if (eax_4 != 0)
005a80ba          {
005a80c3              uint32_t _table_size = this->_table_size;
005a80ca              *(uint32_t*)eax_4 = arg2->id;
005a80cc              ClothingBase::ClothingBase(((char*)eax_4 + 4), arg3);
005a80d1              *(uint32_t*)((char*)eax_4 + 0x10) = 0;
005a80dd              uint32_t temp1_2 = (COMBINE(0, arg2->id) % _table_size);
005a80df              *(uint32_t*)((char*)eax_4 + 0x14) = temp1_2;
005a80ea              *(uint32_t*)((char*)eax_4 + 0x10) = this->_buckets[temp1_2];
005a80ed              this->_buckets[temp1_2] = eax_4;
005a80f3              this->_currNum += 1;
005a80ff              return 1;
005a80ba          }
005a807f      }
005a807f      else
005a807f      {
005a8081          class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets = this->_buckets;
005a8081          
005a8086          if (_buckets == 0)
005a8086              goto label_5a80ae;
005a8086          
005a8088          uint32_t id = arg2->id;
005a8091          int32_t* edx_3 = _buckets[(COMBINE(0, id) % _table_size_1)];
005a8091          
005a8096          if (edx_3 == 0)
005a8096              goto label_5a80ae;
005a8096          
005a809a          while (id != *(uint32_t*)edx_3)
005a809a          {
005a809c              edx_3 = edx_3[4];
005a809c              
005a80a1              if (edx_3 == 0)
005a80a1                  goto label_5a80ae;
005a809a          }
005a809a          
005a80aa          if (edx_3 == 0xfffffffc)
005a80aa              goto label_5a80ae;
005a807f      }
005a807f      
005a8108      return 0;
005a8070  }

005a810b                                   90 90 90 90 90                                                             .....

005a8110  void* __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::`scalar deleting destructor'(class PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>* this, uint32_t arg2)

005a8110  {
005a8113      this->vtable = 0x7e5a34;
005a8119      PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::EmptyContents(this);
005a811e      class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets = this->_buckets;
005a811e      
005a8123      if (_buckets != 0)
005a8123      {
005a8126          operator delete[](_buckets);
005a812e          this->_buckets = nullptr;
005a8123      }
005a8123      
005a813a      this->_table_size = 0;
005a8141      this->vtable = 0x79285c;
005a8141      
005a8147      if ((arg2 & 1) != 0)
005a814a          operator delete(this);
005a814a      
005a8155      return this;
005a8110  }

005a8158                                                                          90 90 90 90 90 90 90 90                          ........

005a8160  void __thiscall ClothingTable::ClothingTable(class ClothingTable* this, class IDClass<_tagDataID,32,0> arg2)

005a8160  {
005a8169      DBObj::DBObj(this, arg2);
005a816e      this->vtable = &PackObj::`vftable';
005a8178      this->vtable = 0x7e5a70;
005a817e      this->vtable = &ClothingTable::`vftable';
005a8175      this->_cloBaseHash.vtable = 0x7e5a34;
005a8175      this->_cloBaseHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
005a8175      this->_cloBaseHash._buckets = nullptr;
005a8175      this->_cloBaseHash._table_size = 8;
005a8175      this->_cloBaseHash._currNum = 0;
005a819d      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_cloBaseHash);
005a81a2      this->_paletteTemplatesHash.vtable = 0x7e5a48;
005a81a2      this->_paletteTemplatesHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
005a81a2      this->_paletteTemplatesHash._buckets = nullptr;
005a81a2      this->_paletteTemplatesHash._table_size = 0x20;
005a81a2      this->_paletteTemplatesHash._currNum = 0;
005a81bb      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_paletteTemplatesHash);
005a8160  }

005a81c7                       90 90 90 90 90 90 90 90 90                                                         .........

005a81d0  void* __thiscall ClothingTable::`vector deleting destructor'(class ClothingTable* this, uint32_t arg2)

005a81d0  {
005a81d3      /* tailcall */
005a81d3      return ClothingTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005a81d0  }

005a81d8                                                                          cc cc cc cc cc cc cc cc                          ........

005a81e0  void* __thiscall ClothingTable::`scalar deleting destructor'(class ClothingTable* this, uint32_t arg2)

005a81e0  {
005a81e3      ClothingTable::~ClothingTable(this);
005a81e3      
005a81ed      if ((arg2 & 1) != 0)
005a81f0          operator delete(this);
005a81f0      
005a81fb      return this;
005a81e0  }

005a81fe                                                                                            90 90                                ..

005a8200  void __fastcall ClothingTable::~ClothingTable(class ClothingTable* this)

005a8200  {
005a8208      this->vtable = 0x7e5a70;
005a820e      this->vtable = &ClothingTable::`vftable';
005a8205      this->_paletteTemplatesHash.vtable = 0x7e5a48;
005a821d      PackableHashTable<unsigned long,CloPaletteTemplate>::EmptyContents(&this->_paletteTemplatesHash);
005a8222      class PackableHashData<unsigned long,CloPaletteTemplate>** _buckets = this->_paletteTemplatesHash._buckets;
005a8222      
005a8229      if (_buckets != 0)
005a8229      {
005a822c          operator delete[](_buckets);
005a8205          this->_paletteTemplatesHash._buckets = nullptr;
005a8229      }
005a8229      
005a8205      this->_paletteTemplatesHash._table_size = 0;
005a8205      this->_paletteTemplatesHash.vtable = 0x79285c;
005a8240      this->_cloBaseHash.vtable = 0x7e5a34;
005a824b      PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::EmptyContents(&this->_cloBaseHash);
005a8250      class PackableHashData<IDClass<_tagDataID,32,0>,ClothingBase>** _buckets_1 = this->_cloBaseHash._buckets;
005a8250      
005a8255      if (_buckets_1 != 0)
005a8255      {
005a8258          operator delete[](_buckets_1);
005a8240          this->_cloBaseHash._buckets = nullptr;
005a8255      }
005a8255      
005a8240      this->_cloBaseHash._table_size = 0;
005a8240      this->_cloBaseHash.vtable = 0x79285c;
005a826c      this->vtable = &PackObj::`vftable';
005a8278      /* tailcall */
005a8278      return DBObj::~DBObj(this);
005a8200  }

005a827d                                                                                         90 90 90                               ...

005a8280  class DBObj* ClothingTable::Allocate(class ClothingTable const* this @ ecx)

005a8280  {
005a8280      /* tailcall */
005a8280      return ClothingTable::Allocator();
005a8280  }

005a8285                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005a8290  void __thiscall ShadePackage::ShadePackage(class ShadePackage* this, double const arg2)

005a8290  {
005a829c      this->_val[0] = arg2;
005a82a8      *(uint32_t*)((char*)this->_val[0])[4] = *(uint32_t*)((char*)arg2)[4];
005a82ab      __builtin_memcpy(&this->_val[1], this, 0x18);
005a8290  }

005a82b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005a82c0  int32_t const __thiscall ShadePackage::GetVal(class ShadePackage const* this, int32_t const arg2)

005a82c0  {
005a82c7      if (arg2 < 4)
005a82c7      {
005a82c9          this->_val[arg2];
005a82cc          return arg2;
005a82c7      }
005a82c7      
005a82cf      this->_val[3];
005a82d2      return arg2;
005a82c0  }

005a82d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005a82e0  uint32_t __fastcall CloObjectEffect::pack_size(class CloObjectEffect* this)

005a82e0  {
005a82e0      class CloObjectEffect* this_1 = this;
005a82e9      int32_t ebx = 0;
005a82ec      int32_t i = 0;
005a82ee      bool cond:0 = this->numTextureEffects <= 0;
005a82f0      this_1 = nullptr;
005a82f4      int32_t result = 0xc;
005a82f4      
005a82f9      if (!(cond:0))
005a82f9      {
005a831e          do
005a831e          {
005a8313              result += *(uint32_t*)(*(uint32_t*)(this->textureEffects + ebx) + 0xc)(&this_1, 0);
005a8318              i += 1;
005a8319              ebx += 0xc;
005a831e          } while (i < this->numTextureEffects);
005a82f9      }
005a82f9      
005a8327      return result;
005a82e0  }

005a82fd                                                                                         8d 49 00                               .I.
005a8328                          90 90 90 90 90 90 90 90                                                          ........

005a8330  uint32_t __fastcall CloPaletteTemplate::pack_size(class CloPaletteTemplate* this)

005a8330  {
005a8330      class CloPaletteTemplate* this_1 = this;
005a8339      int32_t ebx = 0;
005a833c      int32_t i = 0;
005a833e      bool cond:0 = this->numSubpalEffects <= 0;
005a8340      this_1 = nullptr;
005a8344      int32_t result = 8;
005a8344      
005a8349      if (!(cond:0))
005a8349      {
005a836e          do
005a836e          {
005a8363              result += *(uint32_t*)(*(uint32_t*)(this->subpalEffects + ebx) + 0xc)(&this_1, 0);
005a8368              i += 1;
005a8369              ebx += 0x14;
005a836e          } while (i < this->numSubpalEffects);
005a8349      }
005a8349      
005a8377      return result;
005a8330  }

005a834d                                         8d 49 00                                                               .I.
005a8378                                                                          90 90 90 90 90 90 90 90                          ........

005a8380  void __fastcall CloObjectEffect::CloObjectEffect(class CloObjectEffect* this)

005a8380  {
005a8384      this->vtable = 0x7e5ac8;
005a838a      this->partNum = 0;
005a8393      this->objectID.id = INVALID_DID.id;
005a8396      this->numTextureEffects = 0;
005a8399      this->textureEffects = nullptr;
005a8380  }

005a839d                                                                                         90 90 90                               ...

005a83a0  void* __thiscall CloTextureEffect::`vector deleting destructor'(class CloTextureEffect* this, uint32_t arg2)

005a83a0  {
005a83a0      char edx = arg2;
005a83a0      
005a83aa      if ((edx & 2) == 0)
005a83aa      {
005a83e4          this->vtable = 0x79285c;
005a83e4          
005a83ea          if ((edx & 1) != 0)
005a83ed              operator delete(this);
005a83ed          
005a83f8          return this;
005a83aa      }
005a83aa      
005a83ac      int32_t vtable = this->vtable;
005a83b7      void* eax_1 = &this[vtable];
005a83b7      
005a83ba      if ((vtable - 1) >= 0)
005a83ba      {
005a83bd          int32_t ecx_2 = vtable;
005a83ca          int32_t i;
005a83ca          
005a83ca          do
005a83ca          {
005a83c0              eax_1 -= 0xc;
005a83c3              i = ecx_2;
005a83c3              ecx_2 -= 1;
005a83c4              *(uint32_t*)eax_1 = 0x79285c;
005a83ca          } while (i != 1);
005a83ba      }
005a83ba      
005a83cf      if ((edx & 1) != 0)
005a83d2          operator delete[](&this[0]);
005a83d2      
005a83de      return &this[0];
005a83a0  }

005a83fb                                                                                   90 90 90 90 90                             .....

005a8400  void __fastcall CloObjectEffect::~CloObjectEffect(class CloObjectEffect* this)

005a8400  {
005a8403      class CloTextureEffect* textureEffects = this->textureEffects;
005a8408      this->vtable = 0x7e5ac8;
005a8408      
005a840e      if (textureEffects != 0)
005a840e      {
005a8418          if (textureEffects->vtable != 0)
005a8418          {
005a841a              textureEffects->vtable->__vecDelDtor(3);
005a8420              this->textureEffects = nullptr;
005a8427              this->vtable = 0x79285c;
005a842e              return;
005a8418          }
005a8418          
005a8430          operator delete[](&textureEffects[0]);
005a8438          this->textureEffects = nullptr;
005a840e      }
005a840e      
005a843f      this->vtable = 0x79285c;
005a8400  }

005a8447                       90 90 90 90 90 90 90 90 90                                                         .........

005a8450  void __fastcall CloTextureEffect::CloTextureEffect(class CloTextureEffect* this)

005a8450  {
005a8452      this->vtable = 0x7e5adc;
005a845e      this->oldTexID.id = INVALID_DID.id;
005a8467      this->newTexID.id = INVALID_DID.id;
005a8450  }

005a846b                                   90 90 90 90 90                                                             .....

005a8470  void __fastcall CloPaletteTemplate::CloPaletteTemplate(class CloPaletteTemplate* this)

005a8470  {
005a8472      this->vtable = 0x7e5af0;
005a847e      this->iconID.id = INVALID_DID.id;
005a8483      this->numSubpalEffects = 0;
005a8486      this->subpalEffects = nullptr;
005a8470  }

005a848a                                90 90 90 90 90 90                                                            ......

005a8490  void __fastcall CloPaletteTemplate::~CloPaletteTemplate(class CloPaletteTemplate* this)

005a8490  {
005a8493      class CloSubpalEffect* subpalEffects = this->subpalEffects;
005a8498      this->vtable = 0x7e5af0;
005a84a3      this->iconID.id = INVALID_DID.id;
005a84a3      
005a84a6      if (subpalEffects != 0)
005a84a6      {
005a84b0          if (subpalEffects->vtable != 0)
005a84b0          {
005a84b2              subpalEffects->vtable->__vecDelDtor(3);
005a84b8              this->subpalEffects = nullptr;
005a84bf              this->vtable = 0x79285c;
005a84c6              return;
005a84b0          }
005a84b0          
005a84c8          operator delete[](((char*)subpalEffects - 4));
005a84d0          this->subpalEffects = nullptr;
005a84a6      }
005a84a6      
005a84d7      this->vtable = 0x79285c;
005a8490  }

005a84df                                                                                               90                                 .

005a84e0  void __fastcall CloSubpalEffect::CloSubpalEffect(class CloSubpalEffect* this)

005a84e0  {
005a84e4      this->vtable = 0x7e5b04;
005a84ea      this->numRanges = 0;
005a84ed      this->rangeStart = nullptr;
005a84f0      this->rangeLength = nullptr;
005a84f9      this->palSet.id = INVALID_DID.id;
005a84e0  }

005a84fd                                                                                         90 90 90                               ...

005a8500  class CloSubpalEffect& __thiscall CloSubpalEffect::operator=(class CloSubpalEffect* this, class CloSubpalEffect const& arg2)

005a8500  {
005a8503      uint32_t* rangeStart = this->rangeStart;
005a8503      
005a8509      if (rangeStart != 0)
005a8509      {
005a850c          operator delete[](rangeStart);
005a8514          this->rangeStart = nullptr;
005a8509      }
005a8509      
005a851b      uint32_t* rangeLength = this->rangeLength;
005a851b      
005a8520      if (rangeLength != 0)
005a8520      {
005a8523          operator delete[](rangeLength);
005a852b          this->rangeLength = nullptr;
005a8520      }
005a8520      
005a8536      uint32_t numRanges = arg2->numRanges;
005a8539      this->numRanges = numRanges;
005a8540      void* eax_1 = operator new[]((numRanges << 2));
005a8548      uint32_t ecx_1 = (this->numRanges << 2);
005a854c      this->rangeStart = eax_1;
005a854f      void* eax_2 = operator new[](ecx_1);
005a8554      uint32_t numRanges_1 = this->numRanges;
005a8557      this->rangeLength = eax_2;
005a855d      int32_t i = 0;
005a855d      
005a8561      if (numRanges_1 > 0)
005a8561      {
005a8581          do
005a8581          {
005a8569              this->rangeStart[i] = arg2->rangeStart[i];
005a8575              this->rangeLength[i] = arg2->rangeLength[i];
005a857e              i += 1;
005a8581          } while (i < this->numRanges);
005a8561      }
005a8561      
005a8587      this->palSet.id = arg2->palSet.id;
005a858d      return this;
005a8500  }


005a8590  class CloObjectEffect& __thiscall CloObjectEffect::operator=(class CloObjectEffect* this, class CloObjectEffect const& arg2)

005a8590  {
005a859a      if (this != arg2)
005a859a      {
005a85a0          class CloTextureEffect* textureEffects_1 = this->textureEffects;
005a85a4          void* ebx_1 = nullptr;
005a85a4          
005a85a9          if (textureEffects_1 != 0)
005a85a9          {
005a85b3              if (textureEffects_1->vtable == 0)
005a85be                  operator delete[](&textureEffects_1[0]);
005a85b3              else
005a85b5                  textureEffects_1->vtable->__vecDelDtor(3);
005a85b5              
005a85c6              this->textureEffects = nullptr;
005a85a9          }
005a85a9          
005a85cc          this->partNum = arg2->partNum;
005a85d2          this->objectID.id = arg2->objectID.id;
005a85d5          uint32_t numTextureEffects = arg2->numTextureEffects;
005a85da          this->numTextureEffects = numTextureEffects;
005a85da          
005a85dd          if (numTextureEffects > 0)
005a85dd          {
005a85ea              uint32_t* eax_4 = operator new[](((numTextureEffects * 0xc) + 4));
005a85ea              
005a85f4              if (eax_4 != 0)
005a85f4              {
005a85fc                  ebx_1 = &eax_4[1];
005a8602                  *(uint32_t*)eax_4 = numTextureEffects;
005a8604                  `vector constructor iterator'(ebx_1, 0xc, numTextureEffects, CloTextureEffect::CloTextureEffect);
005a85f4              }
005a85f4              
005a860c              int32_t i = 0;
005a860e              bool cond:3_1 = this->numTextureEffects <= 0;
005a8610              this->textureEffects = ebx_1;
005a8610              
005a8613              if (!(cond:3_1))
005a8613              {
005a8615                  int32_t edx_3 = 0;
005a8615                  
005a8640                  do
005a8640                  {
005a8620                      class CloTextureEffect* textureEffects = arg2->textureEffects;
005a862c                      void* ecx_3 = (this->textureEffects + edx_3);
005a862e                      *(uint32_t*)((char*)ecx_3 + 4) = *(uint32_t*)(&textureEffects->oldTexID + edx_3);
005a8634                      *(uint32_t*)((char*)ecx_3 + 8) = *(uint32_t*)(&textureEffects->newTexID + edx_3);
005a863a                      i += 1;
005a863b                      edx_3 += 0xc;
005a8640                  } while (i < this->numTextureEffects);
005a8613              }
005a85dd          }
005a859a      }
005a859a      
005a8648      return this;
005a8590  }

005a8619                                                                             8d a4 24 00 00 00 00                           ..$....
005a864b                                   90 90 90 90 90                                                             .....

005a8650  uint32_t __thiscall CloObjectEffect::Pack(class CloObjectEffect* this, void** arg2, uint32_t arg3)

005a8650  {
005a8650      class CloObjectEffect* this_1 = this;
005a8657      uint32_t result = CloObjectEffect::pack_size(this);
005a8666      void* ecx = *(uint32_t*)arg2;
005a8666      
005a8673      if (arg3 >= result)
005a8673      {
005a8678          *(uint32_t*)ecx = this->partNum;
005a867c          void* ebp_2 = (*(uint32_t*)arg2 + 4);
005a867f          *(uint32_t*)arg2 = ebp_2;
005a8686          *(uint32_t*)ebp_2 = this->objectID.id;
005a868a          void* ebx_2 = (*(uint32_t*)arg2 + 4);
005a868d          *(uint32_t*)arg2 = ebx_2;
005a8694          *(uint32_t*)ebx_2 = this->numTextureEffects;
005a8696          *(uint32_t*)arg2 += 4;
005a869c          int32_t i = 0;
005a869c          
005a86a0          if (this->numTextureEffects > 0)
005a86a0          {
005a86a2              int32_t ebp_3 = 0;
005a86a2              
005a86c1              do
005a86c1              {
005a86b5                  *(uint32_t*)(*(uint32_t*)(this->textureEffects + ebp_3) + 0xc)(arg2, (((char*)ecx + arg3) - *(uint32_t*)arg2));
005a86bb                  i += 1;
005a86bc                  ebp_3 += 0xc;
005a86c1              } while (i < this->numTextureEffects);
005a86a0          }
005a8673      }
005a8673      
005a86cc      return result;
005a8650  }

005a86cf                                               90                                                                 .

005a86d0  int32_t __thiscall CloObjectEffect::UnPack(class CloObjectEffect* this, void** arg2, uint32_t arg3)

005a86d0  {
005a86d0      class CloObjectEffect* this_1 = this;
005a86d0      
005a86df      if (arg3 < CloObjectEffect::pack_size(this))
005a86e5          return 0;
005a86e5      
005a86ea      void** esi = arg2;
005a86ee      void* ebp = *(uint32_t*)esi;
005a86f0      void* eax_2 = (arg3 + ebp);
005a86f3      class CloTextureEffect* textureEffects = this->textureEffects;
005a86f8      arg2 = ebp;
005a86f8      
005a8700      if (textureEffects != 0)
005a8700      {
005a870a          if (textureEffects->vtable == 0)
005a8715              operator delete[](&textureEffects[0]);
005a870a          else
005a870c              textureEffects->vtable->__vecDelDtor(3);
005a870c          
005a871d          this->textureEffects = nullptr;
005a8700      }
005a8700      
005a8728      this->partNum = **(uint32_t**)esi;
005a872d      void* edx_4 = (*(uint32_t*)esi + 4);
005a8730      *(uint32_t*)esi = edx_4;
005a8734      class IDClass<_tagDataID,32,0> ecx_3 = *(uint32_t*)edx_4;
005a8739      *(uint32_t*)esi = ((char*)edx_4 + 4);
005a873b      this->objectID.id = ecx_3;
005a8742      this->numTextureEffects = **(uint32_t**)esi;
005a874b      *(uint32_t*)esi += 4;
005a874d      uint32_t numTextureEffects = this->numTextureEffects;
005a874d      
005a8752      if (numTextureEffects > 0)
005a8752      {
005a875f          uint32_t* eax_8 = operator new[](((numTextureEffects * 0xc) + 4));
005a8769          void* eax_9;
005a8769          
005a8769          if (eax_8 == 0)
005a8786              eax_9 = nullptr;
005a8769          else
005a8769          {
005a8777              *(uint32_t*)eax_8 = numTextureEffects;
005a8779              `vector constructor iterator'(&eax_8[1], 0xc, numTextureEffects, CloTextureEffect::CloTextureEffect);
005a877e              eax_9 = &eax_8[1];
005a8780              ebp = arg2;
005a8769          }
005a8769          
005a8788          this->textureEffects = eax_9;
005a878e          int32_t i = 0;
005a878e          
005a8792          if (this->numTextureEffects > 0)
005a8792          {
005a8794              int32_t ebp_2 = 0;
005a8794              
005a87b3              do
005a87b3              {
005a87a7                  *(uint32_t*)(*(uint32_t*)(this->textureEffects + ebp_2) + 0x10)(esi, ((char*)eax_2 - *(uint32_t*)esi));
005a87ad                  i += 1;
005a87ae                  ebp_2 += 0xc;
005a87b3              } while (i < this->numTextureEffects);
005a87b3              
005a87b5              ebp = arg2;
005a8792          }
005a8752      }
005a8752      
005a87c4      if (arg3 >= (*(uint32_t*)esi - ebp))
005a87da          return 1;
005a87da      
005a87c6      *(uint32_t*)esi = ebp;
005a87ce      return 0;
005a86d0  }

005a87dd                                                                                         90 90 90                               ...

005a87e0  uint32_t __thiscall ContentProfile::Pack(class ContentProfile* this, void** arg2, uint32_t arg3)

005a87e0  {
005a87e5      if (arg3 >= 8)
005a87e5      {
005a87f1          **(uint32_t**)arg2 = this->m_iid;
005a87f5          void* edx_3 = (*(uint32_t*)arg2 + 4);
005a87f8          *(uint32_t*)arg2 = edx_3;
005a87fd          *(uint32_t*)edx_3 = this->m_uContainerProperties;
005a87ff          *(uint32_t*)arg2 += 4;
005a87e5      }
005a87e5      
005a8808      return 8;
005a87e0  }

005a880b                                   90 90 90 90 90                                                             .....

005a8810  int32_t __thiscall CloTextureEffect::UnPack(class CloTextureEffect* this, void** arg2, uint32_t arg3)

005a8810  {
005a8818      if (arg3 < 8)
005a881d          return 0;
005a881d      
005a8824      void* edx = *(uint32_t*)arg2;
005a882a      class IDClass<_tagDataID,32,0> edi = *(uint32_t*)edx;
005a882f      *(uint32_t*)arg2 = ((char*)edx + 4);
005a8831      this->oldTexID.id = edi;
005a8834      void* edx_2 = *(uint32_t*)arg2;
005a8836      class IDClass<_tagDataID,32,0> edi_1 = *(uint32_t*)edx_2;
005a883b      *(uint32_t*)arg2 = ((char*)edx_2 + 4);
005a883d      this->newTexID.id = edi_1;
005a883d      
005a8846      if (arg3 >= (*(uint32_t*)arg2 - edx))
005a885a          return 1;
005a885a      
005a8849      *(uint32_t*)arg2 = edx;
005a884f      return 0;
005a8810  }

005a885d                                                                                         90 90 90                               ...

005a8860  void* __thiscall CloPaletteTemplate::`scalar deleting destructor'(class CloPaletteTemplate* this, uint32_t arg2)

005a8860  {
005a8863      CloPaletteTemplate::~CloPaletteTemplate(this);
005a8863      
005a886d      if ((arg2 & 1) != 0)
005a8870          operator delete(this);
005a8870      
005a887b      return this;
005a8860  }

005a887e                                                                                            90 90                                ..

005a8880  class CloPaletteTemplate& __thiscall CloPaletteTemplate::operator=(class CloPaletteTemplate* this, class CloPaletteTemplate const& arg2)

005a8880  {
005a888a      if (this != arg2)
005a888a      {
005a8890          class CloSubpalEffect* subpalEffects = this->subpalEffects;
005a8899          void* ebx_1 = nullptr;
005a889e          this->iconID.id = INVALID_DID.id;
005a889e          
005a88a1          if (subpalEffects != 0)
005a88a1          {
005a88ab              if (subpalEffects->vtable == 0)
005a88b6                  operator delete[](((char*)subpalEffects - 4));
005a88ab              else
005a88ad                  subpalEffects->vtable->__vecDelDtor(3);
005a88ad              
005a88be              this->subpalEffects = nullptr;
005a88a1          }
005a88a1          
005a88c4          this->iconID.id = arg2->iconID.id;
005a88c7          uint32_t numSubpalEffects_1 = arg2->numSubpalEffects;
005a88cc          this->numSubpalEffects = numSubpalEffects_1;
005a88cc          
005a88cf          if (numSubpalEffects_1 > 0)
005a88cf          {
005a88dc              uint32_t* eax_4 = operator new[](((numSubpalEffects_1 * 0x14) + 4));
005a88dc              
005a88e6              if (eax_4 != 0)
005a88e6              {
005a88ee                  ebx_1 = &eax_4[1];
005a88f4                  *(uint32_t*)eax_4 = numSubpalEffects_1;
005a88f6                  `vector constructor iterator'(ebx_1, 0x14, numSubpalEffects_1, CloSubpalEffect::CloSubpalEffect);
005a88e6              }
005a88e6              
005a88fb              uint32_t numSubpalEffects = this->numSubpalEffects;
005a88fe              this->subpalEffects = ebx_1;
005a8901              int32_t i = 0;
005a8901              
005a8905              if (numSubpalEffects > 0)
005a8905              {
005a8907                  int32_t edi_1 = 0;
005a8907                  
005a8929                  do
005a8929                  {
005a891b                      CloSubpalEffect::operator=((this->subpalEffects + edi_1), (arg2->subpalEffects + edi_1));
005a8923                      i += 1;
005a8924                      edi_1 += 0x14;
005a8929                  } while (i < this->numSubpalEffects);
005a8905              }
005a88cf          }
005a888a      }
005a888a      
005a8931      return this;
005a8880  }

005a8934                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a8940  void* __thiscall CloSubpalEffect::`vector deleting destructor'(class CloSubpalEffect* this, uint32_t arg2)

005a8940  {
005a8949      if ((arg2 & 2) == 0)
005a8949      {
005a89b2          uint32_t* rangeStart = this->rangeStart;
005a89b9          this->vtable = 0x7e5b04;
005a89b9          
005a89bf          if (rangeStart != 0)
005a89bf          {
005a89c2              operator delete[](rangeStart);
005a89ca              this->rangeStart = nullptr;
005a89bf          }
005a89bf          
005a89cd          uint32_t* rangeLength = this->rangeLength;
005a89cd          
005a89d2          if (rangeLength != 0)
005a89d2          {
005a89d5              operator delete[](rangeLength);
005a89dd              this->rangeLength = nullptr;
005a89d2          }
005a89d2          
005a89e5          this->vtable = 0x79285c;
005a89e5          
005a89eb          if ((arg2 & 1) != 0)
005a89ee              operator delete(this);
005a89ee          
005a89fa          return this;
005a8949      }
005a8949      
005a894b      int32_t vtable = this->vtable;
005a8956      void* esi_1 = &this[vtable];
005a8956      
005a8959      if ((vtable - 1) >= 0)
005a8959      {
005a895c          int32_t ebp_1 = vtable;
005a8997          int32_t i;
005a8997          
005a8997          do
005a8997          {
005a8961              void* eax_1 = *(uint32_t*)((char*)esi_1 - 0xc);
005a8964              esi_1 -= 0x14;
005a8969              *(uint32_t*)esi_1 = 0x7e5b04;
005a8969              
005a896f              if (eax_1 != 0)
005a896f              {
005a8972                  operator delete[](eax_1);
005a897a                  *(uint32_t*)((char*)esi_1 + 8) = 0;
005a896f              }
005a896f              
005a897d              void* eax_2 = *(uint32_t*)((char*)esi_1 + 0xc);
005a897d              
005a8982              if (eax_2 != 0)
005a8982              {
005a8985                  operator delete[](eax_2);
005a898d                  *(uint32_t*)((char*)esi_1 + 0xc) = 0;
005a8982              }
005a8982              
005a8990              i = ebp_1;
005a8990              ebp_1 -= 1;
005a8991              *(uint32_t*)esi_1 = 0x79285c;
005a8997          } while (i != 1);
005a8959      }
005a8959      
005a899f      if ((arg2 & 1) != 0)
005a89a2          operator delete[](((char*)this - 4));
005a89a2      
005a89af      return ((char*)this - 4);
005a8940  }

005a89fd                                                                                         90 90 90                               ...

005a8a00  uint32_t __thiscall CloPaletteTemplate::Pack(class CloPaletteTemplate* this, void** arg2, uint32_t arg3)

005a8a00  {
005a8a00      class CloPaletteTemplate* this_1 = this;
005a8a06      uint32_t result = CloPaletteTemplate::pack_size(this);
005a8a06      
005a8a15      if (arg3 >= result)
005a8a15      {
005a8a1b          void* ecx = *(uint32_t*)arg2;
005a8a26          *(uint32_t*)ecx = this->iconID.id;
005a8a2a          void* ebx_2 = (*(uint32_t*)arg2 + 4);
005a8a2d          *(uint32_t*)arg2 = ebx_2;
005a8a34          *(uint32_t*)ebx_2 = this->numSubpalEffects;
005a8a36          *(uint32_t*)arg2 += 4;
005a8a3c          int32_t i = 0;
005a8a3c          
005a8a40          if (this->numSubpalEffects > 0)
005a8a40          {
005a8a43              int32_t ebp_1 = 0;
005a8a43              
005a8a62              do
005a8a62              {
005a8a56                  *(uint32_t*)(*(uint32_t*)(this->subpalEffects + ebp_1) + 0xc)(arg2, ((arg3 + ecx) - *(uint32_t*)arg2));
005a8a5c                  i += 1;
005a8a5d                  ebp_1 += 0x14;
005a8a62              } while (i < this->numSubpalEffects);
005a8a40          }
005a8a15      }
005a8a15      
005a8a6d      return result;
005a8a00  }


005a8a70  int32_t __thiscall CloPaletteTemplate::UnPack(class CloPaletteTemplate* this, void** arg2, uint32_t arg3)

005a8a70  {
005a8a70      class CloPaletteTemplate* this_1 = this;
005a8a70      
005a8a7f      if (arg3 < CloPaletteTemplate::pack_size(this))
005a8a85          return 0;
005a8a85      
005a8a8f      void* eax_2 = *(uint32_t*)arg2;
005a8a97      class CloSubpalEffect* subpalEffects = this->subpalEffects;
005a8aa3      void* ebp = nullptr;
005a8aa7      this->iconID.id = INVALID_DID.id;
005a8aa7      
005a8aaa      if (subpalEffects != 0)
005a8aaa      {
005a8ab4          if (subpalEffects->vtable == 0)
005a8abf              operator delete[](((char*)subpalEffects - 4));
005a8ab4          else
005a8ab6              subpalEffects->vtable->__vecDelDtor(3);
005a8ab6          
005a8ac7          this->subpalEffects = nullptr;
005a8aaa      }
005a8aaa      
005a8aca      void* eax_6 = *(uint32_t*)arg2;
005a8acc      class IDClass<_tagDataID,32,0> ecx_2 = *(uint32_t*)eax_6;
005a8ad1      *(uint32_t*)arg2 = ((char*)eax_6 + 4);
005a8ad3      this->iconID.id = ecx_2;
005a8ada      this->numSubpalEffects = **(uint32_t**)arg2;
005a8add      *(uint32_t*)arg2 += 4;
005a8ae0      uint32_t numSubpalEffects = this->numSubpalEffects;
005a8ae0      
005a8ae5      if (numSubpalEffects > 0)
005a8ae5      {
005a8af2          uint32_t* eax_10 = operator new[](((numSubpalEffects * 0x14) + 4));
005a8af2          
005a8afc          if (eax_10 != 0)
005a8afc          {
005a8b04              ebp = &eax_10[1];
005a8b0a              *(uint32_t*)eax_10 = numSubpalEffects;
005a8b0c              `vector constructor iterator'(ebp, 0x14, numSubpalEffects, CloSubpalEffect::CloSubpalEffect);
005a8afc          }
005a8afc          
005a8b14          int32_t i = 0;
005a8b16          bool cond:2_1 = this->numSubpalEffects <= 0;
005a8b18          this->subpalEffects = ebp;
005a8b18          
005a8b1b          if (!(cond:2_1))
005a8b1b          {
005a8b1d              int32_t ebp_1 = 0;
005a8b1d              
005a8b3c              do
005a8b3c              {
005a8b30                  *(uint32_t*)(*(uint32_t*)(this->subpalEffects + ebp_1) + 0x10)(arg2, (((char*)eax_2 + arg3) - *(uint32_t*)arg2));
005a8b36                  i += 1;
005a8b37                  ebp_1 += 0x14;
005a8b3c              } while (i < this->numSubpalEffects);
005a8b1b          }
005a8ae5      }
005a8ae5      
005a8b4c      if (arg3 >= (*(uint32_t*)arg2 - eax_2))
005a8b64          return 1;
005a8b64      
005a8b4e      *(uint32_t*)arg2 = eax_2;
005a8b57      return 0;
005a8a70  }

005a8b67                       90 90 90 90 90 90 90 90 90                                                         .........

005a8b70  uint32_t __thiscall CloSubpalEffect::Pack(class CloSubpalEffect* this, void** arg2, uint32_t arg3)

005a8b70  {
005a8b75      uint32_t numRanges = this->numRanges;
005a8b75      
005a8b81      if (arg3 >= ((numRanges << 3) + 8))
005a8b81      {
005a8b8b          **(uint32_t**)arg2 = numRanges;
005a8b8f          void* esi_1 = (*(uint32_t*)arg2 + 4);
005a8b92          *(uint32_t*)arg2 = esi_1;
005a8b97          void* edi_2 = esi_1;
005a8b99          int32_t i = 0;
005a8b99          
005a8b9d          if (this->numRanges > 0)
005a8b9d          {
005a8bc6              do
005a8bc6              {
005a8ba6                  *(uint32_t*)edi_2 = this->rangeStart[i];
005a8baa                  void* ebx_5 = (*(uint32_t*)arg2 + 4);
005a8bad                  *(uint32_t*)arg2 = ebx_5;
005a8bb7                  *(uint32_t*)ebx_5 = this->rangeLength[i];
005a8bbb                  edi_2 = (*(uint32_t*)arg2 + 4);
005a8bbe                  *(uint32_t*)arg2 = edi_2;
005a8bc3                  i += 1;
005a8bc6              } while (i < this->numRanges);
005a8b9d          }
005a8b9d          
005a8bcb          *(uint32_t*)edi_2 = this->palSet.id;
005a8bd3          *(uint32_t*)arg2 += 4;
005a8b81      }
005a8b81      
005a8bd7      return ((numRanges << 3) + 8);
005a8b70  }

005a8bda                                                                                90 90 90 90 90 90                            ......

005a8be0  int32_t __thiscall CloSubpalEffect::UnPack(class CloSubpalEffect* this, void** arg2, uint32_t arg3)

005a8be0  {
005a8bf4      if (arg3 < ((this->numRanges << 3) + 8))
005a8bfa          return 0;
005a8bfa      
005a8c03      void* eax_2 = *(uint32_t*)arg2;
005a8c07      this->numRanges = *(uint32_t*)eax_2;
005a8c11      *(uint32_t*)arg2 += 4;
005a8c1a      void* eax_5 = operator new[]((this->numRanges << 2));
005a8c22      uint32_t ecx_2 = (this->numRanges << 2);
005a8c26      this->rangeStart = eax_5;
005a8c29      void* eax_6 = operator new[](ecx_2);
005a8c2e      uint32_t numRanges = this->numRanges;
005a8c31      this->rangeLength = eax_6;
005a8c37      int32_t i = 0;
005a8c37      
005a8c3b      if (numRanges > 0)
005a8c3b      {
005a8c64          do
005a8c64          {
005a8c44              this->rangeStart[i] = **(uint32_t**)arg2;
005a8c4c              void* edx_6 = (*(uint32_t*)arg2 + 4);
005a8c4f              *(uint32_t*)arg2 = edx_6;
005a8c55              this->rangeLength[i] = *(uint32_t*)edx_6;
005a8c5b              *(uint32_t*)arg2 += 4;
005a8c61              i += 1;
005a8c64          } while (i < this->numRanges);
005a8c3b      }
005a8c3b      
005a8c66      void* eax_7 = *(uint32_t*)arg2;
005a8c68      class IDClass<_tagDataID,32,0> ecx_8 = *(uint32_t*)eax_7;
005a8c6d      *(uint32_t*)arg2 = ((char*)eax_7 + 4);
005a8c6f      this->palSet.id = ecx_8;
005a8c6f      
005a8c78      if (arg3 >= (*(uint32_t*)arg2 - eax_2))
005a8c8e          return 1;
005a8c8e      
005a8c7a      *(uint32_t*)arg2 = eax_2;
005a8c82      return 0;
005a8be0  }

005a8c91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005a8ca0  void __thiscall CloPaletteTemplate::CloPaletteTemplate(class CloPaletteTemplate* this, class CloPaletteTemplate const* arg2)

005a8ca0  {
005a8ca7      this->vtable = 0x7e5af0;
005a8cb2      this->iconID.id = INVALID_DID.id;
005a8cba      this->numSubpalEffects = 0;
005a8cbd      this->subpalEffects = nullptr;
005a8cc0      CloPaletteTemplate::operator=(this, arg2);
005a8ca0  }

005a8ccb                                   90 90 90 90 90                                                             .....

005a8cd0  uint32_t __fastcall ClothingBase::pack_size(class ClothingBase* this)

005a8cd0  {
005a8cd0      class ClothingBase* this_1 = this;
005a8cd9      int32_t ebx = 0;
005a8cdc      int32_t i = 0;
005a8cde      bool cond:0 = this->numObjectEffects <= 0;
005a8ce0      this_1 = nullptr;
005a8ce4      int32_t result = 4;
005a8ce4      
005a8ce9      if (!(cond:0))
005a8ce9      {
005a8d0e          do
005a8d0e          {
005a8d03              result += *(uint32_t*)(*(uint32_t*)(this->objectEffects + ebx) + 0xc)(&this_1, 0);
005a8d08              i += 1;
005a8d09              ebx += 0x14;
005a8d0e          } while (i < this->numObjectEffects);
005a8ce9      }
005a8ce9      
005a8d17      return result;
005a8cd0  }

005a8ced                                         8d 49 00                                                               .I.
005a8d18                                                                          90 90 90 90 90 90 90 90                          ........

005a8d20  void __fastcall ClothingBase::ClothingBase(class ClothingBase* this)

005a8d20  {
005a8d24      this->vtable = 0x7e5b2c;
005a8d2a      this->numObjectEffects = 0;
005a8d2d      this->objectEffects = nullptr;
005a8d20  }

005a8d31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005a8d40  void __fastcall ClothingBase::~ClothingBase(class ClothingBase* this)

005a8d40  {
005a8d43      class CloObjectEffect* objectEffects = this->objectEffects;
005a8d48      this->vtable = 0x7e5b2c;
005a8d48      
005a8d4e      if (objectEffects != 0)
005a8d4e      {
005a8d58          if (objectEffects->vtable != 0)
005a8d58          {
005a8d5a              objectEffects->vtable->__vecDelDtor(3);
005a8d60              this->objectEffects = nullptr;
005a8d67              this->vtable = 0x79285c;
005a8d6e              return;
005a8d58          }
005a8d58          
005a8d70          operator delete[](((char*)objectEffects - 4));
005a8d78          this->objectEffects = nullptr;
005a8d4e      }
005a8d4e      
005a8d7f      this->vtable = 0x79285c;
005a8d40  }

005a8d87                       90 90 90 90 90 90 90 90 90                                                         .........

005a8d90  class ClothingBase& __thiscall ClothingBase::operator=(class ClothingBase* this, class ClothingBase const& arg2)

005a8d90  {
005a8d9a      if (this != arg2)
005a8d9a      {
005a8da0          class CloObjectEffect* objectEffects = this->objectEffects;
005a8da4          void* ebx_1 = nullptr;
005a8da4          
005a8da9          if (objectEffects != 0)
005a8da9          {
005a8db3              if (objectEffects->vtable == 0)
005a8dbe                  operator delete[](((char*)objectEffects - 4));
005a8db3              else
005a8db5                  objectEffects->vtable->__vecDelDtor(3);
005a8db5              
005a8dc6              this->objectEffects = nullptr;
005a8da9          }
005a8da9          
005a8dc9          uint32_t numObjectEffects_1 = arg2->numObjectEffects;
005a8dce          this->numObjectEffects = numObjectEffects_1;
005a8dce          
005a8dd1          if (numObjectEffects_1 > 0)
005a8dd1          {
005a8dde              uint32_t* eax_3 = operator new[](((numObjectEffects_1 * 0x14) + 4));
005a8dde              
005a8de8              if (eax_3 != 0)
005a8de8              {
005a8df0                  ebx_1 = &eax_3[1];
005a8df6                  *(uint32_t*)eax_3 = numObjectEffects_1;
005a8df8                  `vector constructor iterator'(ebx_1, 0x14, numObjectEffects_1, CloObjectEffect::CloObjectEffect);
005a8de8              }
005a8de8              
005a8dfd              uint32_t numObjectEffects = this->numObjectEffects;
005a8e00              this->objectEffects = ebx_1;
005a8e03              int32_t i = 0;
005a8e03              
005a8e07              if (numObjectEffects > 0)
005a8e07              {
005a8e09                  int32_t edi_1 = 0;
005a8e09                  
005a8e29                  do
005a8e29                  {
005a8e1b                      CloObjectEffect::operator=((this->objectEffects + edi_1), (arg2->objectEffects + edi_1));
005a8e23                      i += 1;
005a8e24                      edi_1 += 0x14;
005a8e29                  } while (i < this->numObjectEffects);
005a8e07              }
005a8dd1          }
005a8d9a      }
005a8d9a      
005a8e31      return this;
005a8d90  }

005a8e0d                                         8d 49 00                                                               .I.
005a8e34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a8e40  void* __thiscall CloObjectEffect::`vector deleting destructor'(class CloObjectEffect* this, uint32_t arg2)

005a8e40  {
005a8e41      int32_t ebx;
005a8e41      ebx = arg2;
005a8e41      
005a8e4b      if ((ebx & 2) == 0)
005a8e4b      {
005a8e87          CloObjectEffect::~CloObjectEffect(this);
005a8e87          
005a8e8f          if ((ebx & 1) != 0)
005a8e92              operator delete(this);
005a8e92          
005a8e9e          return this;
005a8e4b      }
005a8e4b      
005a8e4d      int32_t vtable = this->vtable;
005a8e58      void* esi_1 = &this[vtable];
005a8e58      
005a8e5b      if ((vtable - 1) >= 0)
005a8e5b      {
005a8e5e          int32_t edi_1 = vtable;
005a8e6c          int32_t i;
005a8e6c          
005a8e6c          do
005a8e6c          {
005a8e61              esi_1 -= 0x14;
005a8e66              CloObjectEffect::~CloObjectEffect(esi_1);
005a8e6b              i = edi_1;
005a8e6b              edi_1 -= 1;
005a8e6c          } while (i != 1);
005a8e5b      }
005a8e5b      
005a8e72      if ((ebx & 1) != 0)
005a8e75          operator delete[](((char*)this - 4));
005a8e75      
005a8e82      return ((char*)this - 4);
005a8e40  }

005a8ea1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005a8eb0  int32_t __thiscall ClothingBase::ApplyPartAndTextureChanges(class ClothingBase const* this, class ObjDesc* arg2)

005a8eb0  {
005a8eb3      uint32_t id = INVALID_DID.id;
005a8ebf      int32_t edi = 0;
005a8ec1      bool cond:0 = this->numObjectEffects <= 0;
005a8ec3      uint32_t id_2 = id;
005a8ec7      uint32_t id_3 = id;
005a8ecb      uint32_t id_4 = id;
005a8ed4      int32_t var_2c = 0x7c881c;
005a8edc      int32_t var_28 = 0;
005a8ee0      int32_t var_20 = 0;
005a8ee4      int32_t var_1c = 0;
005a8ee8      int32_t var_18 = 0x7e5b18;
005a8ef0      int32_t var_14 = 0;
005a8ef4      int32_t var_8 = 0;
005a8ef8      int32_t var_4 = 0;
005a8efc      uint32_t var_30 = 1;
005a8f00      int32_t var_34 = 0;
005a8f00      
005a8f04      if (cond:0)
005a8fb4          return id;
005a8fb4      
005a8f0a      class CloObjectEffect* objectEffects = this->objectEffects;
005a8f0f      void* esi_1 = nullptr;
005a8fa3      bool cond:1_1;
005a8fa3      
005a8fa3      do
005a8fa3      {
005a8f15          int32_t var_28_1 = *(uint32_t*)(&objectEffects->partNum + esi_1);
005a8f21          int32_t var_24 = *(uint32_t*)(&objectEffects->objectID + esi_1);
005a8f2a          ObjDesc::AddAnimPartChange(arg2, &var_2c);
005a8f2f          objectEffects = this->objectEffects;
005a8f36          void* eax_1 = ((char*)esi_1 + objectEffects);
005a8f39          int32_t i = 0;
005a8f39          
005a8f3d          if (*(uint32_t*)(&objectEffects->numTextureEffects + esi_1) > 0)
005a8f3d          {
005a8f8e              do
005a8f8e              {
005a8f40                  void* ecx_3 = *(uint32_t*)((char*)eax_1 + 0x10);
005a8f43                  int32_t edx_2 = *(uint32_t*)(((char*)ecx_3 + edi) + 8);
005a8f4c                  int32_t ecx_5 = *(uint32_t*)(((char*)ecx_3 + edi) + 4);
005a8f4f                  int32_t var_14_1 = *(uint32_t*)((char*)eax_1 + 4);
005a8f53                  uint32_t id_1 = INVALID_DID.id;
005a8f5a                  int32_t var_10 = ecx_5;
005a8f5e                  int32_t var_c = edx_2;
005a8f5e                  
005a8f66                  if ((ecx_5 == id_1 || edx_2 == id_1))
005a8f68                      var_30 = 0;
005a8f68                  
005a8f79                  ObjDesc::AddTextureMapChange(arg2, &var_18);
005a8f7e                  objectEffects = this->objectEffects;
005a8f85                  eax_1 = ((char*)esi_1 + objectEffects);
005a8f88                  i += 1;
005a8f89                  edi += 0xc;
005a8f8e              } while (i < *(uint32_t*)(&objectEffects->numTextureEffects + esi_1));
005a8f8e              
005a8f90              edi = 0;
005a8f3d          }
005a8f3d          
005a8f9a          esi_1 += 0x14;
005a8f9d          cond:1_1 = (var_34 + 1) < this->numObjectEffects;
005a8f9f          var_34 += 1;
005a8fa3      } while (cond:1_1);
005a8fa9      return var_30;
005a8eb0  }

005a8fb7                                                                       90 90 90 90 90 90 90 90 90                         .........

005a8fc0  uint32_t __thiscall ClothingBase::Pack(class ClothingBase* this, void** arg2, uint32_t arg3)

005a8fc0  {
005a8fc0      class ClothingBase* this_1 = this;
005a8fc6      uint32_t result = ClothingBase::pack_size(this);
005a8fd5      void* ecx = *(uint32_t*)arg2;
005a8fd5      
005a8fe2      if (arg3 >= result)
005a8fe2      {
005a8fe7          *(uint32_t*)ecx = this->numObjectEffects;
005a8fe9          *(uint32_t*)arg2 += 4;
005a8fef          int32_t i = 0;
005a8fef          
005a8ff3          if (this->numObjectEffects > 0)
005a8ff3          {
005a8ff6              int32_t ebp_1 = 0;
005a8ff6              
005a901d              do
005a901d              {
005a9011                  *(uint32_t*)(*(uint32_t*)(this->objectEffects + ebp_1) + 0xc)(arg2, (((char*)ecx + arg3) - *(uint32_t*)arg2));
005a9017                  i += 1;
005a9018                  ebp_1 += 0x14;
005a901d              } while (i < this->numObjectEffects);
005a8ff3          }
005a8fe2      }
005a8fe2      
005a9028      return result;
005a8fc0  }

005a8ffa                                                                                8d 9b 00 00 00 00                            ......
005a902b                                   90 90 90 90 90                                                             .....

005a9030  int32_t __thiscall ClothingBase::UnPack(class ClothingBase* this, void** arg2, uint32_t arg3)

005a9030  {
005a9030      class ClothingBase* this_1 = this;
005a9030      
005a903f      if (arg3 < ClothingBase::pack_size(this))
005a9045          return 0;
005a9045      
005a904a      void** edi = arg2;
005a904e      void* ebp = *(uint32_t*)edi;
005a9050      void* eax_2 = (arg3 + ebp);
005a9053      class CloObjectEffect* objectEffects = this->objectEffects;
005a9058      arg2 = ebp;
005a9058      
005a9060      if (objectEffects != 0)
005a9060      {
005a906a          if (objectEffects->vtable == 0)
005a9075              operator delete[](((char*)objectEffects - 4));
005a906a          else
005a906c              objectEffects->vtable->__vecDelDtor(3);
005a906c          
005a907d          this->objectEffects = nullptr;
005a9060      }
005a9060      
005a9088      this->numObjectEffects = **(uint32_t**)edi;
005a9091      *(uint32_t*)edi += 4;
005a9093      uint32_t numObjectEffects = this->numObjectEffects;
005a9093      
005a9098      if (numObjectEffects > 0)
005a9098      {
005a90a5          uint32_t* eax_6 = operator new[](((numObjectEffects * 0x14) + 4));
005a90af          void* eax_7;
005a90af          
005a90af          if (eax_6 == 0)
005a90cc              eax_7 = nullptr;
005a90af          else
005a90af          {
005a90bd              *(uint32_t*)eax_6 = numObjectEffects;
005a90bf              `vector constructor iterator'(&eax_6[1], 0x14, numObjectEffects, CloObjectEffect::CloObjectEffect);
005a90c4              eax_7 = &eax_6[1];
005a90c6              ebp = arg2;
005a90af          }
005a90af          
005a90ce          this->objectEffects = eax_7;
005a90d4          int32_t i = 0;
005a90d4          
005a90d8          if (this->numObjectEffects > 0)
005a90d8          {
005a90da              int32_t ebp_2 = 0;
005a90da              
005a90fc              do
005a90fc              {
005a90f0                  *(uint32_t*)(*(uint32_t*)(this->objectEffects + ebp_2) + 0x10)(edi, ((char*)eax_2 - *(uint32_t*)edi));
005a90f6                  i += 1;
005a90f7                  ebp_2 += 0x14;
005a90fc              } while (i < this->numObjectEffects);
005a90fc              
005a90fe              ebp = arg2;
005a90d8          }
005a9098      }
005a9098      
005a910d      if (arg3 >= (*(uint32_t*)edi - ebp))
005a9123          return 1;
005a9123      
005a910f      *(uint32_t*)edi = ebp;
005a9117      return 0;
005a9030  }

005a9126                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005a9130  void* __thiscall ClothingBase::`scalar deleting destructor'(class ClothingBase* this, uint32_t arg2)

005a9130  {
005a9133      class CloObjectEffect* objectEffects = this->objectEffects;
005a9138      this->vtable = 0x7e5b2c;
005a9138      
005a913e      if (objectEffects != 0)
005a913e      {
005a9148          if (objectEffects->vtable == 0)
005a9153              operator delete[](((char*)objectEffects - 4));
005a9148          else
005a914a              objectEffects->vtable->__vecDelDtor(3);
005a914a          
005a915b          this->objectEffects = nullptr;
005a913e      }
005a913e      
005a9167      this->vtable = 0x79285c;
005a9167      
005a916d      if ((arg2 & 1) != 0)
005a9170          operator delete(this);
005a9170      
005a917b      return this;
005a9130  }

005a917e                                                                                            90 90                                ..

005a9180  void __thiscall ClothingBase::ClothingBase(class ClothingBase* this, class ClothingBase const* arg2)

005a9180  {
005a9185      this->numObjectEffects = 0;
005a9188      this->objectEffects = nullptr;
005a9190      this->vtable = 0x7e5b2c;
005a9196      ClothingBase::operator=(this, arg2);
005a9180  }

005a91a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005a91b0  class AC1Legacy::PStringBase<char>* __thiscall AC1Legacy::PStringBase<char>::substring(class AC1Legacy::PStringBase<char> const* this, class AC1Legacy::PStringBase<char>* __return, uint32_t arg3, uint32_t arg4)

005a91b0  {
005a91b0      class AC1Legacy::PStringBase<char>* var_4 = this;
005a91bb      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005a91c7      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005a91cb      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005a91cd      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
005a91d6      int32_t ecx_1 = (m_buffer->m_len - 1);
005a91d9      class AC1Legacy::PStringBase<char>* result;
005a91d9      
005a91d9      if (arg3 < ecx_1)
005a91d9      {
005a9205          uint32_t eax_3 = arg4;
005a9205          
005a920b          if (eax_3 >= ecx_1)
005a920d              eax_3 = (ecx_1 - 1);
005a920d          
005a921d          AC1Legacy::PStringBase<char>::append_n_chars(&var_4, &&m_buffer->m_data[arg3], ((eax_3 - arg3) + 1));
005a9222          class AC1Legacy::PStringBase<char>* edi = var_4;
005a9226          result = __return;
005a922e          result->m_buffer = edi;
005a9230          InterlockedIncrement(&edi[1]);
005a9230          
005a923f          if ((InterlockedDecrement(&edi[1]) == 0 && edi != 0))
005a9241              edi->m_buffer->vtable(1);
005a91d9      }
005a91d9      else
005a91d9      {
005a91db          result = __return;
005a91e0          result->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005a91e2          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005a91e2          
005a91f1          if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
005a91f3              AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
005a91d9      }
005a91d9      
005a9250      return result;
005a91b0  }

005a9253                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005a9260  int32_t __convention("regparm") EmapToDisplay::LowerCaseRemoveUnderscores(class AC1Legacy::PStringBase<char> const* arg1, class AC1Legacy::PStringBase<char>* arg2)

005a9260  {
005a9260      class AC1Legacy::PStringBase<char> ecx;
005a9260      class AC1Legacy::PStringBase<char> var_4 = ecx;
005a9262      class AC1Legacy::PStringBase<char>* ebp = arg1;
005a9266      class AC1Legacy::PSRefBuffer<char>* m_buffer = ebp->m_buffer;
005a9266      
005a926d      if (m_buffer->m_len == 1)
005a9273          return 0;
005a9273      
005a9281      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg2->m_buffer;
005a9281      
005a9285      if (m_buffer_2 != m_buffer)
005a9285      {
005a9293          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
005a9295              m_buffer_2->vtable->__vecDelDtor(1);
005a9295          
005a929d          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = ebp->m_buffer;
005a92a0          arg2->m_buffer = m_buffer_1;
005a92a6          InterlockedIncrement(&m_buffer_1->m_cRef);
005a9285      }
005a9285      
005a92b5      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_794500);
005a92c3      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_794098);
005a92d4      AC1Legacy::PStringBase<char>::replace(arg2, &var_4, &arg1);
005a92db      AC1Legacy::PStringBase<char>::break_reference(arg2);
005a92e6      _strlwr(&arg2->m_buffer->m_data);
005a92ec      class AC1Legacy::PStringBase<char>* esi = arg1;
005a92ec      
005a92ff      if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
005a9301          esi->m_buffer->vtable(1);
005a9301      
005a9309      class AC1Legacy::PStringBase<char> esi_1 = var_4;
005a9309      
005a9319      if ((InterlockedDecrement((esi_1 + 4)) == 0 && esi_1 != 0))
005a9321          **(uint32_t**)esi_1(1);
005a9321      
005a932d      return 1;
005a9260  }

005a932e                                            90 90                                                                ..

005a9330  uint32_t __thiscall Position::ToString(class Position const* this, char* arg2, uint32_t const arg3)

005a9330  {
005a933e      if (arg2 == 0)
005a9343          return arg2;
005a9343      
005a9349      float qx = this->frame.qx;
005a9358      float qw = this->frame.qw;
005a9399      int32_t eax_1 = _snprintf(arg2, arg3, "0x%08X [%f %f %f] %f %f %f %f", this->objcell_id, ((double)((long double)this->frame.m_fOrigin.x)), ((double)((long double)this->frame.m_fOrigin.y)), ((double)((long double)this->frame.m_fOrigin.z)), ((double)((long double)qw)), ((double)((long double)qx)), ((double)((long double)this->frame.qy)), ((double)((long double)this->frame.qz)), qx, qw);
005a93a5      return eax_1;
005a9330  }

005a93a8                          90 90 90 90 90 90 90 90                                                          ........

005a93b0  int32_t __thiscall Position::FromString(class Position* this, char const* arg2)

005a93b0  {
005a93b0      char const* eax_6 = arg2;
005a93b0      
005a93bc      if (eax_6 != 0)
005a93bc      {
005a93e8          float var_c;
005a93e8          float var_8;
005a93e8          float var_4;
005a93e8          int32_t eax = sscanf(eax_6, "0x%08X [%f %f %f] %f %f %f %f", &this->objcell_id, &this->frame.m_fOrigin, &this->frame.m_fOrigin.y, &this->frame.m_fOrigin.z, &arg2, &var_4, &var_8, &var_c);
005a93e8          
005a93f4          if (eax == 5)
005a93f4          {
005a943f              Frame::set_heading(&this->frame, arg2);
005a9446              Frame::cache(&this->frame);
005a9454              return 1;
005a93f4          }
005a93f4          
005a93f9          if (eax == 8)
005a93f9          {
005a941d              Frame::set_rotate(&this->frame, arg2, var_4, var_8, var_c);
005a9424              Frame::cache(&this->frame);
005a9432              return 1;
005a93f9          }
005a93bc      }
005a93bc      
005a9401      return 0;
005a93b0  }

005a9457                                                                       90 90 90 90 90 90 90 90 90                         .........

005a9460  uint32_t __fastcall Position::pack_size(class Position* this)

005a9460  {
005a9460      class Position* this_1 = this;
005a946b      this_1 = nullptr;
005a9473      Frame::Pack(&this->frame, &this_1, 0);
005a947c      return 0x20;
005a9460  }

005a947d                                                                                         90 90 90                               ...

005a9480  int32_t __fastcall Position::IsValid(class Position const* this)

005a9480  {
005a9487      int32_t result = LandDefs::inbound_valid_cellid(this->objcell_id);
005a9487      
005a9491      if (result == 0)
005a9494          return result;
005a9494      
005a9498      int32_t eax_1 = Frame::IsValid(&this->frame);
005a949d      int32_t eax_2 = -(eax_1);
005a94a4      return -((eax_2 - eax_2));
005a9480  }

005a94a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005a94b0  class AC1Legacy::Vector3* __thiscall Position::distance(class Position const* this, class Position const* arg2)

005a94b0  {
005a94bd      void __return;
005a94bd      class AC1Legacy::Vector3* result = Position::get_offset(this, &__return, arg2);
005a94c2      result->z;
005a94c5      result->y;
005a94c8      result->x;
005a94e5      return result;
005a94b0  }

005a94e8                          90 90 90 90 90 90 90 90                                                          ........

005a94f0  class AC1Legacy::Vector3* __thiscall Position::xy_distance(class Position const* this, class Position const* arg2)

005a94f0  {
005a9519      float __return;
005a9519      return Position::get_offset(this, &__return, arg2);
005a94f0  }

005a951c                                                                                      90 90 90 90                              ....

005a9520  int32_t __thiscall Position::heading(class Position const* this, class Position const* arg2)

005a9520  {
005a952d      float __return;
005a952d      Position::get_offset(this, &__return, arg2);
005a9536      int32_t var_4 = 0;
005a953e      int32_t result = AC1Legacy::Vector3::normalize_check_small(&__return);
005a953e      
005a9545      if (result != 0)
005a9550          return result;
005a9550      
005a9569      float var_8;
005a9569      arg2 = ((float)(((long double)450.0) - (__fpatan(((long double)__return), ((long double)var_8)) * ((long double)57.295779513082323))));
005a957b      return j__CIfmod();
005a9520  }

005a957e                                                                                            90 90                                ..

005a9580  uint32_t __thiscall Position::determine_quadrant(class Position const* this, float arg2, class Position const* arg3)

005a9580  {
005a9592      int32_t var_c = 0;
005a959a      int32_t var_8 = 0;
005a95a2      int32_t var_4 = 0;
005a95aa      float __return;
005a95aa      Position::localtolocal(this, &__return, arg3, &var_c);
005a95b3      (((long double)__return) - ((long double)0f));
005a95b9      int32_t ecx = 8;
005a95c0      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005a95c0      
005a95c3      if (p)
005a95c5          ecx = 0x10;
005a95c5      
005a95ce      float var_14;
005a95ce      (((long double)var_14) - ((long double)0f));
005a95d6      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a95d9      int32_t ecx_1;
005a95d9      
005a95d9      if (p_1)
005a95e0          ecx_1 = (ecx | 0x20);
005a95d9      else
005a95db          ecx_1 = (ecx | 0x40);
005a95db      
005a95e3      float var_10;
005a95e3      long double x87_r7_2 = ((long double)var_10);
005a95eb      long double x87_r6_1 = (((long double)arg2) * ((long double)0.33333333300000001));
005a95f1      (x87_r6_1 - x87_r7_2);
005a95f1      
005a95f8      if ((*(uint8_t*)((char*)((((x87_r6_1 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_2) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005a9602          return (ecx_1 | 4);
005a9602      
005a9605      long double x87_r7_3 = ((long double)var_10);
005a960d      long double x87_r6_3 = (((long double)arg2) * ((long double)0.66666667000000002));
005a9613      (x87_r6_3 - x87_r7_3);
005a9613      
005a961a      if ((*(uint8_t*)((char*)((((x87_r6_3 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_3) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
005a962f          return (ecx_1 | 1);
005a962f      
005a9624      return (ecx_1 | 2);
005a9580  }

005a9632                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005a9640  uint32_t __thiscall Position::Pack(class Position* this, void** arg2, uint32_t arg3)

005a9640  {
005a9640      class Position* this_1 = this;
005a9652      this_1 = nullptr;
005a965a      Frame::Pack(&this->frame, &this_1, 0);
005a965a      
005a966a      if (arg3 >= 0x20)
005a966a      {
005a9675          **(uint32_t**)arg2 = this->objcell_id;
005a9680          *(uint32_t*)arg2 += 4;
005a9682          Frame::Pack(&this->frame, arg2, arg3);
005a966a      }
005a966a      
005a968d      return 0x20;
005a9640  }


005a9690  int32_t __thiscall Position::UnPack(class Position* this, void** arg2, uint32_t arg3)

005a9690  {
005a9690      class Position* this_1 = this;
005a96a1      this_1 = nullptr;
005a96a9      Frame::Pack(&this->frame, &this_1, 0);
005a96a9      
005a96b7      if (arg3 < 0x20)
005a96be          return 0;
005a96be      
005a96c9      this->objcell_id = **(uint32_t**)arg2;
005a96d5      *(uint32_t*)arg2 += 4;
005a96df      return Frame::UnPack(&this->frame, arg2, arg3);
005a9690  }

005a96e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005a96f0  void __thiscall Position::Serialize(class Position* this, class Archive* arg2)

005a96f0  {
005a96fc      Archive::CheckAlignment(arg2, 4);
005a9705      uint8_t* eax = Archive::GetBytes(arg2, 4);
005a9705      
005a970c      if (eax != 0)
005a970c      {
005a9712          if ((arg2->m_flags & 1) != 0)
005a9712          {
005a9717              *(uint32_t*)eax = this->objcell_id;
005a971d              Frame::Serialize(&this->frame, arg2);
005a9724              return;
005a9712          }
005a9712          
005a9729          this->objcell_id = *(uint32_t*)eax;
005a970c      }
005a970c      
005a9730      Frame::Serialize(&this->frame, arg2);
005a96f0  }

005a973a                                                                                90 90 90 90 90 90                            ......

005a9740  uint32_t __thiscall Position::PackOrigin(class Position const* this, void** arg2, uint32_t arg3)

005a9740  {
005a9748      if (arg3 >= 0x10)
005a9748      {
005a9754          **(uint32_t**)arg2 = this->objcell_id;
005a9758          void* edx_3 = (*(uint32_t*)arg2 + 4);
005a975e          *(uint32_t*)arg2 = edx_3;
005a975e          
005a9761          if (arg3 >= 0xc)
005a9761          {
005a9766              *(uint32_t*)edx_3 = this->frame.m_fOrigin.x;
005a976a              void* esi_3 = (*(uint32_t*)arg2 + 4);
005a976d              *(uint32_t*)arg2 = esi_3;
005a9774              *(uint32_t*)esi_3 = ((float)((long double)this->frame.m_fOrigin.y));
005a9778              void* edx_6 = (*(uint32_t*)arg2 + 4);
005a977b              *(uint32_t*)arg2 = edx_6;
005a9780              *(uint32_t*)edx_6 = ((float)((long double)this->frame.m_fOrigin.z));
005a9782              *(uint32_t*)arg2 += 4;
005a9761          }
005a9748      }
005a9748      
005a978b      return 0x10;
005a9740  }

005a978e                                            90 90                                                                ..

005a9790  int32_t __thiscall Position::UnPackOrigin(class Position* this, void** arg2, uint32_t arg3)

005a9790  {
005a9798      if (arg3 >= 0x10)
005a9798      {
005a97a2          this->objcell_id = **(uint32_t**)arg2;
005a97a7          void* edx_4 = (*(uint32_t*)arg2 + 4);
005a97ad          *(uint32_t*)arg2 = edx_4;
005a97ad          
005a97af          if (arg3 >= 0xc)
005a97af          {
005a97b9              this->frame.m_fOrigin.x = *(uint32_t*)edx_4;
005a97be              void* esi_2 = (*(uint32_t*)arg2 + 4);
005a97c1              *(uint32_t*)arg2 = esi_2;
005a97c7              this->frame.m_fOrigin.y = *(uint32_t*)esi_2;
005a97cc              void* edx_9 = (*(uint32_t*)arg2 + 4);
005a97cf              *(uint32_t*)arg2 = edx_9;
005a97d3              this->frame.m_fOrigin.z = *(uint32_t*)edx_9;
005a97d6              *(uint32_t*)arg2 += 4;
005a97df              return 1;
005a97af          }
005a9798      }
005a9798      
005a97b4      return 0;
005a9790  }

005a97e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005a97f0  class AC1Legacy::Vector3* Position::cylinder_distance(float arg1, float arg2, class Position const* arg3, float arg4, float arg5, class Position const* arg6)

005a97f0  {
005a97f4      class Position* esi = arg6;
005a9805      void __return;
005a9805      class AC1Legacy::Vector3* result = Position::get_offset(arg3, &__return, esi);
005a980a      result->z;
005a980d      result->y;
005a9834      arg6 = ((float)(((long double)result->x) - (((long double)arg1) + ((long double)arg4))));
005a9838      long double x87_r7_3 = ((long double)arg3->frame.m_fOrigin.z);
005a983c      long double x87_r6_4 = ((long double)esi->frame.m_fOrigin.z);
005a9842      (x87_r7_3 - x87_r6_4);
005a9844      result = ((((x87_r7_3 < x87_r6_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, x87_r6_4))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == x87_r6_4) ? 1 : 0) << 0xe) | 0x3000))));
005a9849      long double x87_r6_5;
005a9849      
005a9849      if ((*(uint8_t*)((char*)result)[1] & 0x41) != 0)
005a9849      {
005a9851          long double x87_r6_6 = x87_r7_3;
005a9851          x87_r7_3 = x87_r6_4;
005a9853          x87_r6_5 = (x87_r6_6 + ((long double)arg2));
005a9849      }
005a9849      else
005a984b          x87_r6_5 = (x87_r6_4 + ((long double)arg5));
005a984b      
005a9857      long double x87_r7_7 = (x87_r7_3 - x87_r6_5);
005a9859      long double temp1 = ((long double)0f);
005a9859      (x87_r7_7 - temp1);
005a985f      long double x87_r6_7 = ((long double)arg6);
005a9863      result = ((((x87_r7_7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp1) ? 1 : 0) << 0xe) | 0x3000))));
005a9865      long double temp2 = ((long double)0f);
005a9865      (x87_r6_7 - temp2);
005a986e      result = ((((x87_r6_7 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_7, temp2))) ? 1 : 0) << 0xa) | ((((x87_r6_7 == temp2) ? 1 : 0) << 0xe) | 0x3800))));
005a98af      return result;
005a97f0  }


005a98b0  class AC1Legacy::Vector3* Position::cylinder_distance_no_z(float arg1, class Position const* arg2, float arg3, class Position const* arg4)

005a98b0  {
005a98c1      void __return;
005a98c1      class AC1Legacy::Vector3* result = Position::get_offset(arg2, &__return, arg4);
005a98c6      result->z;
005a98c9      result->y;
005a98cc      result->x;
005a98f3      return result;
005a98b0  }

005a98f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a9900  class PStringBase<char>* __thiscall Position::ToDisplayString(class Position const* this, class PStringBase<char>* __return)

005a9900  {
005a9900      class Position* this_1 = this;
005a9901      int32_t __saved_esi_1;
005a9901      int32_t __saved_esi = __saved_esi_1;
005a9904      int32_t __saved_edi_1;
005a9904      int32_t __saved_edi = __saved_edi_1;
005a9913      double var_14_1 = ((double)Frame::get_heading(&this->frame));
005a991e      double var_1c = ((double)((long double)this->frame.m_fOrigin.z));
005a9925      double var_24 = ((double)((long double)this->frame.m_fOrigin.y));
005a992c      double var_2c = ((double)((long double)this->frame.m_fOrigin.x));
005a992f      uint32_t objcell_id = this->objcell_id;
005a9930      char const* const var_34 = "0x%08X [%0.2f %0.2f %0.2f] %0.2f";
005a9935      int32_t var_38 = 0;
005a9938      PStringBase<char>::PStringBase<char>(&this_1, Formatted, "0x%08X [%0.2f %0.2f %0.2f] %0.2f");
005a993d      class Position* this_2 = this_1;
005a9945      __return->m_charbuffer = this_2;
005a994d      *(uint32_t*)((char*)var_14_1)[4] = &this_2[0];
005a994e      InterlockedIncrement();
005a9958      void* __offset(Position, -0x14) esi_2 = ((char*)this_1 - 0x14);
005a995e      *(uint32_t*)((char*)var_14_1)[4] = ((char*)esi_2 + 4);
005a995e      
005a996b      if ((InterlockedDecrement() == 0 && esi_2 != 0))
005a996b      {
005a996f          *(uint32_t*)((char*)var_14_1)[4] = 1;
005a9973          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)();
005a996b      }
005a996b      
005a997a      return __return;
005a9900  }

005a997d                                                                                         90 90 90                               ...

005a9980  void LandDefs::get_vars(int32_t* arg1, int32_t* arg2, float* arg3, int32_t* arg4, int32_t* arg5, float* arg6, float* arg7, float* arg8)

005a9980  {
005a9992      *(uint32_t*)arg1 = 0xff;
005a999c      *(uint32_t*)arg2 = 0xff;
005a99a2      *(uint32_t*)arg3 = ((float)((long double)24f));
005a99b2      *(uint32_t*)arg4 = 8;
005a99bc      *(uint32_t*)arg5 = 1;
005a99c2      *(uint32_t*)arg6 = ((float)((long double)200f));
005a99ce      *(uint32_t*)arg7 = ((float)((long double)1000f));
005a99d6      *(uint32_t*)arg8 = ((float)((long double)5f));
005a9980  }

005a99d9                                                                             90 90 90 90 90 90 90                           .......

005a99e0  int32_t LandDefs::set_height_table(float* arg1)

005a99e0  {
005a99e0      float* ecx = arg1;
005a99ea      int32_t i = 0;
005a99ec      int32_t* esi = (0x8eda28 - ecx);
005a99ec      
005a9a23      do
005a9a23      {
005a99f0          long double x87_r7_1 = ((long double)*(uint32_t*)ecx);
005a99f2          long double temp0_1 = ((long double)0f);
005a99f2          (x87_r7_1 - temp0_1);
005a99f8          float eax;
005a99f8          eax = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
005a99f8          
005a99fd          if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
005a9a2f              return 0;
005a9a2f          
005a9a05          long double x87_r7_3 = (((long double)1000f) - ((long double)200f));
005a9a0b          long double temp1_1 = ((long double)*(uint32_t*)ecx);
005a9a0b          (x87_r7_3 - temp1_1);
005a9a0d          eax = ((((x87_r7_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005a9a0d          
005a9a12          if ((*(uint8_t*)((char*)eax)[1] & 1) != 0)
005a9a2f              return 0;
005a9a2f          
005a9a16          *(uint32_t*)((char*)esi + ecx) = *(uint32_t*)ecx;
005a9a19          i += 1;
005a9a1a          ecx = &ecx[1];
005a9a23      } while (i < 0x100);
005a9a23      
005a9a2b      return 1;
005a99e0  }


005a9a30  int32_t LandDefs::heading(enum LandDefs::Direction arg1)

005a9a30  {
005a9a38      if ((arg1 - 1) <= 7)
005a9a3a          switch (arg1)
005a9a3a          {
005a9a78              case NORTH_OF_VIEWER:
005a9a78              {
005a9a78                  /* nop */
005a9a78                  break;
005a9a78              }
005a9a47              case SOUTH_OF_VIEWER:
005a9a47              {
005a9a47                  /* nop */
005a9a47                  break;
005a9a47              }
005a9a4e              case EAST_OF_VIEWER:
005a9a4e              {
005a9a4e                  /* nop */
005a9a4e                  break;
005a9a4e              }
005a9a55              case WEST_OF_VIEWER:
005a9a55              {
005a9a55                  /* nop */
005a9a55                  break;
005a9a55              }
005a9a71              case NORTHWEST_OF_VIEWER:
005a9a71              {
005a9a71                  /* nop */
005a9a71                  break;
005a9a71              }
005a9a6a              case SOUTHWEST_OF_VIEWER:
005a9a6a              {
005a9a6a                  /* nop */
005a9a6a                  break;
005a9a6a              }
005a9a5c              case NORTHEAST_OF_VIEWER:
005a9a5c              {
005a9a5c                  /* nop */
005a9a5c                  break;
005a9a5c              }
005a9a63              case SOUTHEAST_OF_VIEWER:
005a9a63              {
005a9a63                  /* nop */
005a9a63                  break;
005a9a63              }
005a9a3a          }
005a9a3a      
005a9a78      return (arg1 - 1);
005a9a30  }

005a9a79                                                                             8d 49 00                                       .I.
005a9a7c  uint32_t jump_table_5a9a7c[0x8] = 
005a9a7c  {
005a9a7c      [0x0] =  0x005a9a72
005a9a80      [0x1] =  0x005a9a41
005a9a84      [0x2] =  0x005a9a48
005a9a88      [0x3] =  0x005a9a4f
005a9a8c      [0x4] =  0x005a9a6b
005a9a90      [0x5] =  0x005a9a64
005a9a94      [0x6] =  0x005a9a56
005a9a98      [0x7] =  0x005a9a5d
005a9a9c  }

005a9a9c                                                                                      90 90 90 90                              ....

005a9aa0  enum LandDefs::Direction LandDefs::get_dir(int32_t arg1, int32_t arg2) __pure

005a9aa0  {
005a9aaa      if (arg1 < 0)
005a9aaa      {
005a9aae          if (arg2 >= 0)
005a9aae          {
005a9aba              int32_t ecx;
005a9aba              ecx = arg2 > 0;
005a9ac2              return (ecx + 4);
005a9aae          }
005a9aae          
005a9ab5          return 6;
005a9aaa      }
005a9aaa      
005a9ac3      if (arg1 <= 0)
005a9ac3      {
005a9ae2          if (arg2 < 0)
005a9ae9              return 2;
005a9ae9          
005a9aee          int32_t result;
005a9aee          result = arg2 > 0;
005a9af3          return result;
005a9ac3      }
005a9ac3      
005a9ac7      if (arg2 < 0)
005a9ace          return 8;
005a9ace      
005a9ad3      int32_t edx;
005a9ad3      edx = arg2 > 0;
005a9adf      return ((edx << 2) + 3);
005a9aa0  }

005a9af4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005a9b00  int32_t LandDefs::get_outside_lcoord(uint32_t arg1, class AC1Legacy::Vector3 const* arg2, int32_t* arg3, int32_t* arg4)

005a9b00  {
005a9b06      uint32_t eax_1 = ((uint32_t)arg1);
005a9b06      
005a9b28      if (((eax_1 < 1 || eax_1 > 0x40) && ((eax_1 < 0x100 || eax_1 > 0xfffd) && eax_1 != 0xffff)))
005a9bb1          return 0;
005a9bb1      
005a9b3c      LandDefs::blockid_to_lcoord(arg1, arg3, arg4);
005a9b50      int32_t* var_14;
005a9b50      var_14 = ((double)(((long double)arg2->x) / ((long double)24f)));
005a9b53      floor(var_14);
005a9b59      int32_t eax_2 = _ftol2();
005a9b62      *(uint32_t*)arg3 += eax_2;
005a9b6d      var_14 = ((double)(((long double)arg2->y) / ((long double)24f)));
005a9b70      floor(var_14);
005a9b79      int32_t eax_3 = _ftol2();
005a9b80      int32_t ecx_3 = (*(uint32_t*)arg4 + eax_3);
005a9b82      *(uint32_t*)arg4 = ecx_3;
005a9b84      int32_t edi_1 = *(uint32_t*)arg3;
005a9b84      
005a9b9e      if ((edi_1 >= 0 && (ecx_3 >= 0 && (edi_1 < 0x7f8 && ecx_3 < 0x7f8))))
005a9ba8          return 1;
005a9ba8      
005a9bae      return 0;
005a9b00  }

005a9bb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005a9bc0  int32_t __convention("regparm") LandDefs::adjust_to_outside(uint32_t* arg1, class AC1Legacy::Vector3* arg2)

005a9bc0  {
005a9bc0      int32_t ecx;
005a9bc0      int32_t var_4 = ecx;
005a9bc3      uint32_t* edi = arg1;
005a9bc9      uint32_t eax_1 = ((uint32_t)((int16_t)*(uint32_t*)edi));
005a9bc9      
005a9beb      if ((((eax_1 >= 1 && eax_1 <= 0x40) || (eax_1 >= 0x100 && eax_1 <= 0xfffd)) || eax_1 == 0xffff))
005a9beb      {
005a9bf7          long double x87_r7_2 = fabsl(((long double)arg2->x));
005a9bf9          long double x87_r6_1 = ((long double)0.000199999995f);
005a9bff          (x87_r6_1 - x87_r7_2);
005a9c01          eax_1 = ((((x87_r6_1 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_2) ? 1 : 0) << 0xe) | 0))));
005a9c01          
005a9c06          if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
005a9c08              arg2->x = 0;
005a9c08          
005a9c11          long double x87_r7_4 = fabsl(((long double)arg2->y));
005a9c13          long double x87_r6_2 = ((long double)0.000199999995f);
005a9c19          (x87_r6_2 - x87_r7_4);
005a9c1b          eax_1 = ((((x87_r6_2 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_4) ? 1 : 0) << 0xe) | 0))));
005a9c1b          
005a9c20          if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
005a9c22              arg2->y = 0f;
005a9c22          
005a9c41          if (LandDefs::get_outside_lcoord(*(uint32_t*)edi, arg2, &var_4, &arg1) != 0)
005a9c41          {
005a9c52              *(uint32_t*)edi = LandDefs::lcoord_to_gid(var_4, arg1);
005a9c5c              int32_t var_14_2;
005a9c5c              var_14_2 = ((double)(((long double)arg2->x) / ((long double)0f)));
005a9c5f              floor(var_14_2);
005a9c6d              long double x87_r0;
005a9c6d              arg2->x = ((float)(((long double)arg2->x) - (x87_r0 * ((long double)0f))));
005a9c78              var_14_2 = ((double)(((long double)arg2->y) / ((long double)0f)));
005a9c7b              floor(var_14_2);
005a9c93              long double x87_r1;
005a9c93              arg2->y = ((float)(((long double)arg2->y) - (x87_r1 * ((long double)0f))));
005a9c98              return 1;
005a9c41          }
005a9beb      }
005a9beb      
005a9c99      *(uint32_t*)edi = 0;
005a9ca4      return 0;
005a9bc0  }

005a9ca5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005a9cb0  class AC1Legacy::PStringBase<char>* LandDefs::CellidToCoordinateString(class AC1Legacy::PStringBase<char>* __return, uint32_t const arg2)

005a9cb0  {
005a9cb3      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005a9cc1      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005a9cca      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005a9cdb      int32_t var_8;
005a9cdb      int32_t var_4;
005a9cdb      LandDefs::gid_to_lcoord(arg2, &var_4, &var_8);
005a9ce4      int32_t ecx = var_4;
005a9ced      var_8 -= 0x400;
005a9cf1      long double x87_r7 = ((long double)var_8);
005a9cfb      var_4 = (ecx - 0x400);
005a9d08      long double x87_r7_2 = ((x87_r7 * ((long double)0.10000000000000001)) + ((long double)0.5));
005a9d18      long double x87_r6_2 = ((((long double)var_4) * ((long double)0.10000000000000001)) + ((long double)0.5));
005a9d1e      long double temp0 = ((long double)0.0);
005a9d1e      (x87_r6_2 - temp0);
005a9d24      int32_t eax_2;
005a9d24      eax_2 = ((((x87_r6_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == temp0) ? 1 : 0) << 0xe) | 0x3000))));
005a9d26      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005a9d29      void (__thiscall** const ecx_2)(class gmNoticeHandler* this, uint32_t, uint32_t);
005a9d29      
005a9d29      if (p)
005a9d29      {
005a9d32          long double temp1_1 = ((long double)0.0);
005a9d32          (x87_r6_2 - temp1_1);
005a9d38          ecx_2 = &gmHouseUI::`vftable'.RecvNotice_SkillAdvancementClassChanged;
005a9d3d          eax_2 = ((((x87_r6_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3000))));
005a9d3d          
005a9d42          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
005a9d44              ecx_2 = &data_7928af;
005a9d29      }
005a9d29      else
005a9d2b          ecx_2 = &gmHouseUI::`vftable'.RecvNotice_TradeFailure;
005a9d2b      
005a9d4b      long double temp2 = ((long double)0.0);
005a9d4b      (x87_r7_2 - temp2);
005a9d51      eax_2 = ((((x87_r7_2 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2) ? 1 : 0) << 0xe) | 0x3000))));
005a9d53      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a9d56      void (__thiscall** const eax_3)(class gmNoticeHandler* this, uint32_t);
005a9d56      
005a9d56      if (p_1)
005a9d56      {
005a9d61          long double temp3_1 = ((long double)0.0);
005a9d61          (x87_r7_2 - temp3_1);
005a9d67          eax_2 = ((((x87_r7_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3_1) ? 1 : 0) << 0xe) | 0x3000))));
005a9d6c          eax_3 = &data_799b78;
005a9d6c          
005a9d71          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
005a9d73              eax_3 = &data_7928af;
005a9d56      }
005a9d56      else
005a9d58          eax_3 = &gmHouseUI::`vftable'.RecvNotice_TradeAnItemForDummies;
005a9d58      
005a9d78      void (__thiscall** const var_20_2)(class gmNoticeHandler* this, uint32_t, uint32_t) = ecx_2;
005a9d7e      uint32_t const var_28;
005a9d7e      var_28 = ((double)fabsl(x87_r6_2));
005a9d81      void (__thiscall** const var_2c)(class gmNoticeHandler* this, uint32_t) = eax_3;
005a9d8b      double var_34 = ((double)fabsl(x87_r7_2));
005a9d94      AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "%.1f%s, %.1f%s");
005a9d99      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005a9da8      __return->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005a9daa      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
005a9daa      
005a9db9      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
005a9dbb          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
005a9dbb      
005a9dcc      return __return;
005a9cb0  }

005a9dcd                                         90 90 90                                                               ...

005a9dd0  uint32_t __thiscall Vec2D::Pack(class Vec2D* this, void** arg2, uint32_t arg3)

005a9dd0  {
005a9dd5      if (arg3 >= 8)
005a9dd5      {
005a9de0          **(uint32_t**)arg2 = this->x;
005a9de4          void* edx_3 = (*(uint32_t*)arg2 + 4);
005a9de7          *(uint32_t*)arg2 = edx_3;
005a9dec          *(uint32_t*)edx_3 = ((float)((long double)this->y));
005a9dee          *(uint32_t*)arg2 += 4;
005a9dd5      }
005a9dd5      
005a9df7      return 8;
005a9dd0  }

005a9dfa                                                                                90 90 90 90 90 90                            ......

005a9e00  int32_t __thiscall Vec2D::UnPack(class Vec2D* this, void** arg2, uint32_t arg3)

005a9e00  {
005a9e08      this->x = **(uint32_t**)arg2;
005a9e0c      void* edx_3 = (*(uint32_t*)arg2 + 4);
005a9e0f      *(uint32_t*)arg2 = edx_3;
005a9e13      this->y = *(uint32_t*)edx_3;
005a9e16      *(uint32_t*)arg2 += 4;
005a9e1e      return 1;
005a9e00  }

005a9e21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005a9e30  int32_t __fastcall AFrame::IsValid(class AFrame const* this)

005a9e30  {
005a9e36      class AFrame* this_1 = this;
005a9e4a      int32_t result = 1;
005a9e4a      
005a9e56      if (_isnan(((double)((long double)this->m_fOrigin.x))) != 0)
005a9ec4          result = 0;
005a9e56      else if (_isnan(((double)((long double)this->m_fOrigin.y))) != 0)
005a9ec4          result = 0;
005a9e68      else if (_isnan(((double)((long double)this->m_fOrigin.z))) != 0)
005a9ec4          result = 0;
005a9e7a      else if (_isnan(((double)((long double)this->qw))) != 0)
005a9ec4          result = 0;
005a9e8c      else if (_isnan(((double)((long double)this->qx))) != 0)
005a9ec4          result = 0;
005a9e9e      else if (_isnan(((double)((long double)this->qy))) != 0)
005a9ec4          result = 0;
005a9eb0      else if (_isnan(((double)((long double)this->qz))) != 0)
005a9ec4          result = 0;
005a9ec4      
005a9ec6      long double x87_r7_7 = ((long double)this->qz);
005a9ecc      long double x87_r6 = ((long double)this->qy);
005a9ecf      long double x87_r5 = ((long double)this->qx);
005a9ed2      long double x87_r4 = ((long double)this->qw);
005a9eeb      float var_c = ((float)((((x87_r7_7 * x87_r7_7) + (x87_r6 * x87_r6)) + (x87_r5 * x87_r5)) + (x87_r4 * x87_r4)));
005a9eeb      
005a9f05      if (_isnan(((double)((long double)var_c))) == 0)
005a9f05      {
005a9f11          long double x87_r7_12 = fabsl((((long double)var_c) - ((long double)1f)));
005a9f19          long double x87_r6_3 = (((long double)0.000199999995f) * ((long double)5f));
005a9f1f          (x87_r6_3 - x87_r7_12);
005a9f21          int32_t eax_7;
005a9f21          eax_7 = ((((x87_r6_3 < x87_r7_12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_12))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_12) ? 1 : 0) << 0xe) | 0))));
005a9f23          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005a9f23          
005a9f26          if (p_1)
005a9f39              return result;
005a9f05      }
005a9f05      
005a9f30      return 0;
005a9e30  }

005a9f3a                                                                                90 90 90 90 90 90                            ......

005a9f40  uint32_t __thiscall AFrame::Pack(class AFrame* this, void** arg2, uint32_t arg3)

005a9f40  {
005a9f47      if (arg3 >= 0x1c)
005a9f47      {
005a9f51          if (arg3 >= 0xc)
005a9f51          {
005a9f57              **(uint32_t**)arg2 = this->m_fOrigin.x;
005a9f5b              void* edx_3 = (*(uint32_t*)arg2 + 4);
005a9f5e              *(uint32_t*)arg2 = edx_3;
005a9f63              *(uint32_t*)edx_3 = ((float)((long double)this->m_fOrigin.y));
005a9f67              void* esi_3 = (*(uint32_t*)arg2 + 4);
005a9f6a              *(uint32_t*)arg2 = esi_3;
005a9f71              *(uint32_t*)esi_3 = ((float)((long double)this->m_fOrigin.z));
005a9f73              *(uint32_t*)arg2 += 4;
005a9f51          }
005a9f51          
005a9f7b          **(uint32_t**)arg2 = ((float)((long double)this->qw));
005a9f7f          void* edx_7 = (*(uint32_t*)arg2 + 4);
005a9f82          *(uint32_t*)arg2 = edx_7;
005a9f87          *(uint32_t*)edx_7 = ((float)((long double)this->qx));
005a9f8b          void* esi_5 = (*(uint32_t*)arg2 + 4);
005a9f8e          *(uint32_t*)arg2 = esi_5;
005a9f95          *(uint32_t*)esi_5 = ((float)((long double)this->qy));
005a9f99          void* edx_10 = (*(uint32_t*)arg2 + 4);
005a9f9c          *(uint32_t*)arg2 = edx_10;
005a9fa1          *(uint32_t*)edx_10 = ((float)((long double)this->qz));
005a9fa3          *(uint32_t*)arg2 += 4;
005a9f47      }
005a9f47      
005a9fac      return 0x1c;
005a9f40  }

005a9faf                                               90                                                                 .

005a9fb0  int32_t __thiscall AFrame::UnPack(class AFrame* this, void** arg2, uint32_t arg3)

005a9fb0  {
005a9fb9      if (arg3 >= 0xc)
005a9fb9      {
005a9fbf          this->m_fOrigin.x = **(uint32_t**)arg2;
005a9fc3          void* edx_4 = (*(uint32_t*)arg2 + 4);
005a9fc6          *(uint32_t*)arg2 = edx_4;
005a9fca          this->m_fOrigin.y = *(uint32_t*)edx_4;
005a9fcf          void* edx_7 = (*(uint32_t*)arg2 + 4);
005a9fd2          *(uint32_t*)arg2 = edx_7;
005a9fd6          this->m_fOrigin.z = *(uint32_t*)edx_7;
005a9fd9          *(uint32_t*)arg2 += 4;
005a9fb9      }
005a9fb9      
005a9fe0      this->qw = **(uint32_t**)arg2;
005a9fe5      void* edx_12 = (*(uint32_t*)arg2 + 4);
005a9fe8      *(uint32_t*)arg2 = edx_12;
005a9fec      this->qx = *(uint32_t*)edx_12;
005a9ff1      void* edx_15 = (*(uint32_t*)arg2 + 4);
005a9ff4      *(uint32_t*)arg2 = edx_15;
005a9ff8      this->qy = *(uint32_t*)edx_15;
005a9ffd      void* edx_18 = (*(uint32_t*)arg2 + 4);
005aa000      *(uint32_t*)arg2 = edx_18;
005aa004      this->qz = *(uint32_t*)edx_18;
005aa007      *(uint32_t*)arg2 += 4;
005aa00a      int32_t eax_1 = AFrame::IsValid(this);
005aa00f      int32_t eax_2 = -(eax_1);
005aa015      return -((eax_2 - eax_2));
005a9fb0  }

005aa018                                                                          90 90 90 90 90 90 90 90                          ........

005aa020  uint32_t __thiscall RGBColor::Pack(class RGBColor const* this, void** arg2, uint32_t arg3)

005aa020  {
005aa023      this->r;
005aa02c      int32_t eax = _ftol2();
005aa031      this->g;
005aa045      int32_t eax_1 = _ftol2();
005aa04a      this->b;
005aa065      **(uint32_t**)arg2 = (((((eax | 0xffffff00) << 8) | eax_1) << 8) | _ftol2());
005aa06d      *(uint32_t*)arg2 += 4;
005aa075      return 4;
005aa020  }

005aa078                                                                          90 90 90 90 90 90 90 90                          ........

005aa080  int32_t __thiscall RGBColor::UnPack(class RGBColor* this, void** arg2, uint32_t arg3)

005aa080  {
005aa084      void* eax = *(uint32_t*)arg2;
005aa087      uint32_t esi = *(uint32_t*)eax;
005aa08d      *(uint32_t*)arg2 = ((char*)eax + 4);
005aa08f      RGBColor::SetColor32(this, esi);
005aa09a      return 1;
005aa080  }

005aa09d                                                                                         90 90 90                               ...

005aa0a0  class Plane* Plane::localtoglobal(class Plane* __return, class Position const* arg2, class Position const* arg3, class Plane const* arg4)

005aa0a0  {
005aa0ae      long double x87_r7_1 = -(((long double)arg4->d));
005aa0b7      long double x87_r5_1 = (x87_r7_1 * ((long double)arg4->N.y));
005aa0c7      float var_10 = ((float)(x87_r7_1 * ((long double)arg4->N.z)));
005aa0cf      float var_18 = ((float)(x87_r7_1 * ((long double)arg4->N.x)));
005aa0d4      float var_14 = ((float)x87_r5_1);
005aa0eb      long double x87_r7_6 = (((((long double)arg3->frame.m_fl2gv[6]) * ((long double)arg4->N.z)) + (((long double)arg3->frame.m_fl2gv[3]) * ((long double)arg4->N.y))) + (((long double)arg3->frame.m_fl2gv[0]) * ((long double)arg4->N.x)));
005aa0ed      float var_24 = ((float)x87_r7_6);
005aa104      long double x87_r7_10 = (((((long double)arg3->frame.m_fl2gv[7]) * ((long double)arg4->N.z)) + (((long double)arg3->frame.m_fl2gv[4]) * ((long double)arg4->N.y))) + (((long double)arg3->frame.m_fl2gv[1]) * ((long double)arg4->N.x)));
005aa106      float var_20 = ((float)x87_r7_10);
005aa126      long double x87_r7_14 = (((((long double)arg3->frame.m_fl2gv[8]) * ((long double)arg4->N.z)) + (((long double)arg3->frame.m_fl2gv[5]) * ((long double)arg4->N.y))) + (((long double)arg3->frame.m_fl2gv[2]) * ((long double)arg4->N.x)));
005aa128      float var_1c_1 = ((float)x87_r7_14);
005aa12c      void __return_1;
005aa12c      class AC1Legacy::Vector3* eax_1 = Position::localtoglobal(arg2, &__return_1, arg3, &var_18);
005aa143      long double x87_r7_17 = ((((long double)var_1c_1) * ((long double)eax_1->z)) + (((long double)var_20) * ((long double)eax_1->y)));
005aa149      long double x87_r6_17 = (((long double)var_24) * ((long double)eax_1->x));
005aa14b      float* result = __return;
005aa151      *(uint32_t*)result = var_24;
005aa159      result[1] = var_20;
005aa162      result[2] = var_1c_1;
005aa165      result[3] = ((float)-((x87_r7_17 + x87_r6_17)));
005aa16b      return result;
005aa0a0  }

005aa16c                                      90 90 90 90                                                              ....

005aa170  void __thiscall Plane::intersect_box(class Plane const* this, class BBox const* arg2)

005aa170  {
005aa180      float* this_1 = this;
005aa195      long double x87_r7_3 = ((((((long double)arg2->m_vMin.z) * ((long double)this_1[2])) + (((long double)arg2->m_vMin.y) * ((long double)this_1[1]))) + (((long double)arg2->m_vMin.x) * ((long double)*(uint32_t*)this_1))) + ((long double)this_1[3]));
005aa198      long double temp1 = ((long double)0.000199999995f);
005aa198      (x87_r7_3 - temp1);
005aa1a3      int32_t ebx_1;
005aa1a3      
005aa1a3      if ((*(uint8_t*)((char*)((((x87_r7_3 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
005aa1a3      {
005aa1b5          (x87_r7_3 - -(((long double)0.000199999995f)));
005aa1b9          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005aa1b9          
005aa1bc          if (!(p_1))
005aa1bc          {
005aa1c2              ebx_1 = 1;
005aa1c2              goto label_5aa1ca;
005aa1bc          }
005aa1bc          
005aa1bc          return;
005aa1a3      }
005aa1a3      
005aa1a7      ebx_1 = 0;
005aa1ca  label_5aa1ca:
005aa1ca      float y_2 = arg2->m_vMax.y;
005aa1d3      float z_4 = arg2->m_vMax.z;
005aa1d6      float x = arg2->m_vMax.x;
005aa1df      float y_7 = y_2;
005aa1e6      float z_7 = z_4;
005aa1e6      
005aa1f1      if (ebx_1 == Plane::which_side(this_1, &x, 0.000199999995f))
005aa1f1      {
005aa1fa          float y_5 = arg2->m_vMin.y;
005aa1fd          float z = arg2->m_vMin.z;
005aa200          x = arg2->m_vMax.x;
005aa20c          float y_8 = y_5;
005aa210          float z_8 = z;
005aa210          
005aa21b          if (ebx_1 == Plane::which_side(this_1, &x, 0.000199999995f))
005aa21b          {
005aa223              float z_2 = arg2->m_vMin.z;
005aa226              float y = arg2->m_vMax.y;
005aa229              x = arg2->m_vMin.x;
005aa232              float z_9 = z_2;
005aa239              float y_9 = y;
005aa239              
005aa244              if (ebx_1 == Plane::which_side(this_1, &x, 0.000199999995f))
005aa244              {
005aa24c                  float y_3 = arg2->m_vMin.y;
005aa24f                  float z_5 = arg2->m_vMax.z;
005aa252                  x = arg2->m_vMin.x;
005aa25b                  float y_10 = y_3;
005aa262                  float z_10 = z_5;
005aa262                  
005aa26d                  if (ebx_1 == Plane::which_side(this_1, &x, 0.000199999995f))
005aa26d                  {
005aa272                      float y_6 = arg2->m_vMax.y;
005aa275                      float z_1 = arg2->m_vMin.z;
005aa278                      x = arg2->m_vMax.x;
005aa284                      float y_11 = y_6;
005aa288                      float z_11 = z_1;
005aa288                      
005aa293                      if (ebx_1 == Plane::which_side(this_1, &x, 0.000199999995f))
005aa293                      {
005aa298                          float z_3 = arg2->m_vMax.z;
005aa29b                          float y_1 = arg2->m_vMin.y;
005aa29e                          x = arg2->m_vMax.x;
005aa2a7                          float z_12 = z_3;
005aa2ae                          float y_12 = y_1;
005aa2ae                          
005aa2b9                          if (ebx_1 == Plane::which_side(this_1, &x, 0.000199999995f))
005aa2b9                          {
005aa2bd                              float y_4 = arg2->m_vMax.y;
005aa2c0                              float z_6 = arg2->m_vMax.z;
005aa2c3                              x = arg2->m_vMin.x;
005aa2cc                              float y_13 = y_4;
005aa2d3                              float z_13 = z_6;
005aa2d7                              Plane::which_side(this_1, &x, 0.000199999995f);
005aa2b9                          }
005aa293                      }
005aa26d                  }
005aa244              }
005aa21b          }
005aa1f1      }
005aa170  }

005aa2f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005aa300  uint8_t NetBlobIDUtils::IsEphemeralFlagSet(uint64_t arg1) __pure

005aa300  {
005aa30e      if ((0 | (*(uint32_t*)((char*)arg1)[4] & 0x80000000)) == 0)
005aa318          return 0;
005aa318      
005aa315      return 1;
005aa300  }

005aa319                                                                             90 90 90 90 90 90 90                           .......

005aa320  int32_t NetBlobIDUtils::GetOrderingType(uint64_t arg1) __pure

005aa320  {
005aa32c      return 0;
005aa320  }

005aa32d                                         90 90 90                                                               ...

005aa330  int32_t NetBlobIDUtils::GetSequenceID(uint64_t arg1) __pure

005aa330  {
005aa33e      return arg1;
005aa330  }

005aa33f                                                                                               90                                 .

005aa340  void NetBlobIDUtils::MakeInitialSequenceID(uint32_t arg1) __pure

005aa361  {
005aa361      return;
005aa361  }

005aa362        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005aa370  int32_t NetBlobIDUtils::MakeNetBlobID(uint64_t arg1, uint16_t arg2, uint64_t arg3) __pure

005aa370  {
005aa371      int32_t ebx = arg1;
005aa378      int32_t edi = *(uint32_t*)((char*)arg1)[4];
005aa378      
005aa38b      if ((0 != ebx || (edi & 0xff000000) != edi))
005aa38d          ebx = 0;
005aa38d      
005aa3c2      return ((0 | ebx) | arg3);
005aa370  }

005aa3c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005aa3d0  int32_t NetBlobIDUtils::NextNonEphemeralSequenceID(uint64_t arg1) __pure

005aa3f0  {
005aa3f0      return (arg1 + 1);
005aa3f0  }

005aa3f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005aa400  uint8_t NetBlobIDUtils::LHSNewerOrderingStamp(uint64_t arg1, uint64_t arg2) __pure

005aa400  {
005aa400      int16_t eax = *(uint16_t*)((char*)arg2)[4];
005aa405      int16_t ecx = *(uint16_t*)((char*)arg1)[4];
005aa405      
005aa40e      if (ecx == eax)
005aa40e      {
005aa416          int32_t eax_1;
005aa416          eax_1 = false;
005aa41a          return 0;
005aa40e      }
005aa40e      
005aa41d      int16_t edx_1 = (ecx - eax);
005aa422      int32_t esi = 1;
005aa422      
005aa427      if (ecx < eax)
005aa427      {
005aa42b          edx_1 = (eax - ecx);
005aa42d          esi = 0xffffffff;
005aa427      }
005aa427      
005aa435      if (edx_1 > 0x7fff)
005aa437          esi = -(esi);
005aa437      
005aa441      return esi > 0;
005aa400  }

005aa442        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005aa450  uint8_t NetUtils::GetSinAddr(char const* arg1, struct in_addr* arg2)

005aa450  {
005aa456      int32_t __saved_ecx;
005aa456      NetInitializer::NetInitializer(&__saved_ecx);
005aa460      int32_t eax = Ordinal_WSOCK32_10(arg1);
005aa460      
005aa469      if (eax != 0xffffffff)
005aa469      {
005aa46f          *(uint32_t*)arg2 = eax;
005aa475          NetInitializer::~NetInitializer(&__saved_ecx);
005aa47a          int32_t eax_1;
005aa47a          eax_1 = 1;
005aa47e          return 1;
005aa469      }
005aa469      
005aa480      int32_t eax_2 = Ordinal_WSOCK32_52(arg1);
005aa480      
005aa488      if (eax_2 == 0)
005aa488      {
005aa4b5          Ordinal_WSOCK32_111();
005aa4bf          NetInitializer::~NetInitializer(&__saved_ecx);
005aa4c4          int32_t eax_5;
005aa4c4          eax_5 = 0;
005aa4c8          return 0;
005aa488      }
005aa488      
005aa48a      int32_t ecx_3 = ((int32_t)*(uint16_t*)(eax_2 + 0xa));
005aa49d      int32_t esi_2;
005aa49d      int32_t edi_1;
005aa49d      edi_1 = __builtin_memcpy(arg2, **(uint32_t**)(eax_2 + 0xc), ((ecx_3 >> 2) << 2));
005aa4a4      __builtin_memcpy(edi_1, esi_2, (ecx_3 & 3));
005aa4aa      NetInitializer::~NetInitializer(&__saved_ecx);
005aa4b0      int32_t eax_4;
005aa4b0      eax_4 = 1;
005aa4b4      return 1;
005aa450  }

005aa4c9                             90 90 90 90 90 90 90                                                           .......

005aa4d0  void NetUtils::GetIPString(struct sockaddr_in const* arg1, class AC1Legacy::PStringBase<char>* arg2, uint8_t arg3)

005aa4d0  {
005aa4db      char var_1 = 0;
005aa4e0      char const* const edi = "%d.%d.%d.%d:%d";
005aa4e0      
005aa4e5      if (arg3 == 0)
005aa4e7          edi = "%d.%d.%d.%d - Port:%d";
005aa4e7      
005aa4f2      int32_t eax_1;
005aa4f2      eax_1 = arg1->sin_port;
005aa4f7      int16_t eax_2 = Ordinal_WSOCK32_15(eax_1);
005aa51d      void var_28;
005aa51d      _snprintf(&var_28, 0x27, edi, ((uint32_t)*(uint8_t*)((char*)arg1->sin_addr.S_un + 0)), ((uint32_t)*(uint8_t*)((char*)arg1->sin_addr.S_un + 1)), ((uint32_t)*(uint8_t*)((char*)arg1->sin_addr.S_un + 2)), ((uint32_t)*(uint8_t*)((char*)arg1->sin_addr.S_un + 3)), ((uint32_t)eax_2));
005aa52f      AC1Legacy::PStringBase<char>::set(arg2, &var_28);
005aa4d0  }

005aa53a                                                                                90 90 90 90 90 90                            ......

005aa540  void __fastcall CNetLayerPacket::CNetLayerPacket(class CNetLayerPacket* this)

005aa540  {
005aa544      this->m_cRef = 1;
005aa54b      this->next_ = nullptr;
005aa54e      this->numSpecialFrags_ = 0;
005aa554      this->numFrags_ = 0;
005aa55a      this->recipient_ = 0;
005aa561      __builtin_memset(&this->realPriority_, 0, 0x18);
005aa585      this->vtable = &CNetLayerPacket::`vftable';
005aa58b      __builtin_memset(&this->m_Hdr, 0, 0x14);
005aa5b9      this->m_Iter.m_dwCurOfs = 0;
005aa5bf      this->m_Iter.m_cbBufSize = 0xffcc;
005aa5cf      this->m_Iter.m_pBuf = &this->m_Data;
005aa5d5      this->m_bValid = 0;
005aa5db      this->m_pRecv = nullptr;
005aa5e1      this->m_pRecip = nullptr;
005aa5e7      this->m_CryptoKey = 0;
005aa540  }

005aa5ee                                            90 90                                                                ..

005aa5f0  class CNetLayerPacket* CNetLayerPacket::Create()

005aa5f0  {
005aa5f5      void* eax = operator new(0x10130);
005aa5f5      
005aa5ff      if (eax == 0)
005aa60a          return 0;
005aa60a      
005aa603      /* tailcall */
005aa603      return CNetLayerPacket::CNetLayerPacket(eax);
005aa5f0  }

005aa60b                                   90 90 90 90 90                                                             .....

005aa610  void __fastcall CNetLayerPacket::Clear(class CNetLayerPacket* this)

005aa610  {
005aa61d      int32_t i = 0;
005aa61f      bool cond:0 = this->numSpecialFrags_ <= 0;
005aa621      int32_t edi;
005aa621      int32_t var_10 = edi;
005aa622      this->m_bValid = 0;
005aa622      
005aa629      if (!(cond:0))
005aa629      {
005aa62b          class COptionalHeader* (* ebp_1)[0x20] = &this->specialFragList_;
005aa62b          
005aa666          do
005aa666          {
005aa630              class COptionalHeader* edi_2 = ADJ(ebp_1)->specialFragList_[0];
005aa630              
005aa635              if (edi_2 != 0)
005aa635              {
005aa647                  if ((InterlockedDecrement(&edi_2->m_cRef) == 0 && edi_2 != 0))
005aa649                      edi_2->vtable->__vecDelDtor(1);
005aa649                  
005aa699                  ADJ(ebp_1)->specialFragList_[0] = 0;
005aa635              }
005aa635              
005aa660              i += 1;
005aa661              ebp_1 = &*(uint128_t*)ebp_1[1];
005aa666          } while (i < this->numSpecialFrags_);
005aa629      }
005aa629      
005aa66e      int32_t i_1 = 0;
005aa670      bool cond:1 = this->numFrags_ <= 0;
005aa672      this->numSpecialFrags_ = 0;
005aa672      
005aa678      if (!(cond:1))
005aa678      {
005aa67a          class BlobFrag* (* ebp_2)[0x1d] = &this->fragList_;
005aa67a          
005aa6b6          do
005aa6b6          {
005aa680              class BlobFrag* edi_3 = ADJ(ebp_2)->fragList_[0];
005aa680              
005aa685              if (edi_3 != 0)
005aa685              {
005aa697                  if ((InterlockedDecrement(&edi_3->m_cRef) == 0 && edi_3 != 0))
005aa699                      edi_3->vtable->__vecDelDtor(1);
005aa699                  
005aa699                  ADJ(ebp_2)->fragList_[0] = 0;
005aa685              }
005aa685              
005aa6b0              i_1 += 1;
005aa6b1              ebp_2 = &*(uint116_t*)ebp_2[1];
005aa6b6          } while (i_1 < this->numFrags_);
005aa678      }
005aa678      
005aa6b9      this->numFrags_ = 0;
005aa6bf      this->seqNum_ = 0;
005aa6c5      this->size_ = 0;
005aa6cb      this->flags_ = 0;
005aa6d1      this->checksum_ = 0;
005aa6d7      this->m_pRecv = nullptr;
005aa6dd      this->m_pRecip = nullptr;
005aa6e3      this->m_CryptoKey = 0;
005aa610  }

005aa6ed                                         90 90 90                                                               ...

005aa6f0  void* __thiscall NetInitializer::AllSocketsCrashCleaner::`scalar deleting destructor'(class NetInitializer::AllSocketsCrashCleaner* this, uint32_t arg2)

005aa6f0  {
005aa6f3      CrashCleaner::~CrashCleaner(this);
005aa6f3      
005aa6fd      if ((arg2 & 1) != 0)
005aa700          operator delete(this);
005aa700      
005aa70b      return this;
005aa6f0  }

005aa70e                                            90 90                                                                ..

005aa710  void NetInitializer::NetInitializer(class NetInitializer* this @ ecx)

005aa710  {
005aa71b      uint32_t eax = (NetInitializer::s_RefCount + 1);
005aa722      NetInitializer::s_RefCount = eax;
005aa727      void var_190;
005aa727      
005aa727      if (eax == 1)
005aa733          Ordinal_WSOCK32_115(0x101, &var_190);
005aa710  }

005aa743           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005aa750  void __thiscall NetInitializer::~NetInitializer(class NetInitializer* this)

005aa750  {
005aa750      uint32_t NetInitializer::s_RefCount_1 = NetInitializer::s_RefCount;
005aa750      NetInitializer::s_RefCount -= 1;
005aa750      
005aa756      if (NetInitializer::s_RefCount_1 != 1)
005aa75e          return;
005aa75e      
005aa758      /* tailcall */
005aa758      return Ordinal_WSOCK32_116();
005aa750  }

005aa75f                                                                                               90                                 .

005aa760  void NetInitializer::AllSocketsCrashCleaner::CrashCleanup(class NetInitializer::AllSocketsCrashCleaner* this @ ecx)

005aa760  {
005aa76c      int32_t i;
005aa76c      
005aa76c      do
005aa767          i = Ordinal_WSOCK32_116();
005aa76c       while (i != 0xffffffff);
005aa760  }


005aa770  void COptionalHeaderFactory::RegisterOptionalHeaderType(uint32_t arg1, class COptionalHeader* (* arg2)(class CBufferIterator*))

005aa770  {
005aa770      int32_t COptionalHeaderFactory::s_nPlugins_1 = COptionalHeaderFactory::s_nPlugins;
005aa770      
005aa77c      if (COptionalHeaderFactory::s_nPlugins_1 > 0)
005aa77c      {
005aa77e          void* eax_1 = &(&NetInitializer::S_sockerCleaner)[COptionalHeaderFactory::s_nPlugins_1].m_pManager;
005aa77e          
005aa79b          do
005aa79b          {
005aa786              int32_t esi_1 = *(uint32_t*)eax_1;
005aa786              
005aa78a              if (esi_1 <= arg1)
005aa78a                  break;
005aa78a              
005aa78c              *(uint32_t*)((char*)eax_1 + 8) = esi_1;
005aa792              *(uint32_t*)((char*)eax_1 + 0xc) = *(uint32_t*)((char*)eax_1 + 4);
005aa795              COptionalHeaderFactory::s_nPlugins_1 -= 1;
005aa796              eax_1 -= 8;
005aa79b          } while (COptionalHeaderFactory::s_nPlugins_1 > 0);
005aa77c      }
005aa77c      
005aa7a2      COptionalHeaderFactory::s_FactoryPlugins[COptionalHeaderFactory::s_nPlugins_1].pAllocator = arg2;
005aa7af      COptionalHeaderFactory::s_FactoryPlugins[COptionalHeaderFactory::s_nPlugins_1].dwMask = arg1;
005aa7b6      COptionalHeaderFactory::s_nPlugins += 1;
005aa770  }

005aa7bc                                                                                      90 90 90 90                              ....

005aa7c0  bool __thiscall CBufferIterator::ReadPrimArray(class CBufferIterator* this, unsigned long* arg2, int32_t arg3)

005aa7c0  {
005aa7cb      uint32_t m_dwCurOfs = this->m_dwCurOfs;
005aa7ce      int32_t edx = (arg3 << 2);
005aa7d6      class CBufferIterator* eax;
005aa7d6      
005aa7d6      if ((m_dwCurOfs + edx) > this->m_cbBufSize)
005aa7d6      {
005aa802          eax = 0;
005aa805          return 0;
005aa7d6      }
005aa7d6      
005aa7e8      int32_t esi_3;
005aa7e8      int32_t edi_1;
005aa7e8      edi_1 = __builtin_memcpy(arg2, &this->m_pBuf[m_dwCurOfs], ((edx >> 2) << 2));
005aa7ef      __builtin_memcpy(edi_1, esi_3, (edx & 3));
005aa7f8      this->m_dwCurOfs += edx;
005aa7fb      eax = 1;
005aa7fe      return 1;
005aa7c0  }

005aa808                          90 90 90 90 90 90 90 90                                                          ........

005aa810  uint8_t COptionalHeaderFactory::AddOptionalHeadersToPacket(uint32_t arg1, class NetPacket* arg2, class CBufferIterator* arg3)

005aa810  {
005aa811      uint32_t ebx = arg1;
005aa818      int32_t i = 0;
005aa818      
005aa81c      if (ebx != 0)
005aa81c      {
005aa828          while (i < COptionalHeaderFactory::s_nPlugins)
005aa828          {
005aa82a              int32_t dwMask = COptionalHeaderFactory::s_FactoryPlugins[i].dwMask;
005aa82a              
005aa833              if ((ebx & dwMask) != 0)
005aa833              {
005aa838                  ebx &= !(dwMask);
005aa83a                  class COptionalHeader* eax_2 = COptionalHeaderFactory::s_FactoryPlugins[i].pAllocator(arg3);
005aa83a                  
005aa848                  if (eax_2 == 0)
005aa848                  {
005aa883                      eax_2 = 0;
005aa886                      return 0;
005aa848                  }
005aa848                  
005aa84f                  NetPacket::AddOptionalHeader(arg2, eax_2);
005aa84f                  
005aa860                  if (InterlockedDecrement(&eax_2->m_cRef) == 0)
005aa862                      eax_2->vtable->__vecDelDtor(1);
005aa833              }
005aa833              
005aa86a              i += 1;
005aa86a              
005aa86d              if (ebx == 0)
005aa86d                  break;
005aa828          }
005aa81c      }
005aa81c      
005aa871      int32_t eax_6 = (ebx & 0xffffff00);
005aa877      int32_t eax_7 = -(eax_6);
005aa87f      return (((int8_t)(eax_7 - eax_7)) + 1);
005aa810  }

005aa887                       90 90 90 90 90 90 90 90 90                                                         .........

005aa890  void __thiscall CPackObjHeader<NetError,1048576,7>::CPackObjHeader<NetError,1048576,7>(class CPackObjHeader<NetError,1048576,7>* this, class CBufferIterator* arg2)

005aa890  {
005aa892      class CBufferIterator* ebp = arg2;
005aa89b      this->m_pData = nullptr;
005aa89e      this->m_cbData = 0;
005aa8a1      this->m_pAdoptedData = nullptr;
005aa8a4      this->m_cbAdoptedData = 0;
005aa8a8      this->m_cRef = 1;
005aa8af      this->m_dwMask = 0x100000;
005aa8b6      this->m_Flags = 7;
005aa8bd      this->vtable = &CPackObjHeader<class NetError,1048576,7>::`vftable';
005aa8c3      this->m_Obj.vtable = 0x794878;
005aa8cc      uint32_t m_dwCurOfs = ebp->m_dwCurOfs;
005aa8d4      uint8_t* ebx = &ebp->m_pBuf[m_dwCurOfs];
005aa8da      uint32_t ecx_2 = (ebp->m_cbBufSize - m_dwCurOfs);
005aa8e4      arg2 = ebx;
005aa8ed      uint8_t const* eax;
005aa8ed      
005aa8ed      if (this->m_Obj.vtable->UnPack(&arg2, ecx_2) == 0)
005aa8ff          eax = 0;
005aa8ed      else
005aa8ed      {
005aa8f8          ebp->m_dwCurOfs = ((char*)arg2 - ebp->m_pBuf);
005aa8fb          eax = 1;
005aa8ed      }
005aa8ed      
005aa905      this->m_bObjValid = eax;
005aa90c      this->m_cbData = this->m_Obj.vtable->GetPackSize();
005aa90f      this->m_pData = ebx;
005aa890  }

005aa91a                                                                                90 90 90 90 90 90                            ......

005aa920  void __thiscall COnePrimHeader<512,7,sockaddr_in>::COnePrimHeader<512,7,sockaddr_in>(class COnePrimHeader<512,7,sockaddr_in>* this, struct sockaddr_in arg2)

005aa920  {
005aa920      int32_t edx_3;
005aa920      edx_3 = arg2.sin_family;
005aa920      *(uint16_t*)((char*)edx_3)[2] = arg2.sin_port;
005aa926      this->m_Prim.sin_family = edx_3;
005aa926      this->m_Prim.sin_port = *(uint16_t*)((char*)edx_3)[2];
005aa926      this->m_Prim.sin_addr.S_un = arg2.sin_addr.S_un;
005aa932      int32_t edx_1;
005aa932      edx_1 = arg2.sin_zero[0];
005aa932      *(uint8_t*)((char*)edx_1)[1] = arg2.sin_zero[1];
005aa932      *(uint8_t*)((char*)edx_1)[2] = arg2.sin_zero[2];
005aa932      *(uint8_t*)((char*)edx_1)[3] = arg2.sin_zero[3];
005aa926      this->m_Prim.sin_zero[0] = edx_1;
005aa926      this->m_Prim.sin_zero[1] = *(uint8_t*)((char*)edx_1)[1];
005aa926      this->m_Prim.sin_zero[2] = *(uint8_t*)((char*)edx_1)[2];
005aa926      this->m_Prim.sin_zero[3] = *(uint8_t*)((char*)edx_1)[3];
005aa939      int32_t edx_2;
005aa939      edx_2 = arg2.sin_zero[4];
005aa939      *(uint8_t*)((char*)edx_2)[1] = arg2.sin_zero[5];
005aa939      *(uint8_t*)((char*)edx_2)[2] = arg2.sin_zero[6];
005aa939      *(uint8_t*)((char*)edx_2)[3] = arg2.sin_zero[7];
005aa93d      this->m_cRef = 1;
005aa944      this->m_dwMask = 0x200;
005aa94b      this->m_Flags = 7;
005aa952      this->m_pData = &this->m_Prim;
005aa955      this->m_cbData = 0x10;
005aa95c      this->vtable = 0x7ca508;
005aa926      this->m_Prim.sin_zero[4] = edx_2;
005aa926      this->m_Prim.sin_zero[5] = *(uint8_t*)((char*)edx_2)[1];
005aa926      this->m_Prim.sin_zero[6] = *(uint8_t*)((char*)edx_2)[2];
005aa926      this->m_Prim.sin_zero[7] = *(uint8_t*)((char*)edx_2)[3];
005aa920  }

005aa968                          90 90 90 90 90 90 90 90                                                          ........

005aa970  void __thiscall CPackObjHeader<NetError,2097152,2>::CPackObjHeader<NetError,2097152,2>(class CPackObjHeader<NetError,2097152,2>* this, class CBufferIterator* arg2)

005aa970  {
005aa972      class CBufferIterator* ebp = arg2;
005aa97b      this->m_pData = nullptr;
005aa97e      this->m_cbData = 0;
005aa981      this->m_pAdoptedData = nullptr;
005aa984      this->m_cbAdoptedData = 0;
005aa988      this->m_cRef = 1;
005aa98f      this->m_dwMask = 0x200000;
005aa996      this->m_Flags = 2;
005aa99d      this->vtable = &CPackObjHeader<class NetError,2097152,2>::`vftable';
005aa9a3      this->m_Obj.vtable = 0x794878;
005aa9ac      uint32_t m_dwCurOfs = ebp->m_dwCurOfs;
005aa9b4      uint8_t* ebx = &ebp->m_pBuf[m_dwCurOfs];
005aa9ba      uint32_t ecx_2 = (ebp->m_cbBufSize - m_dwCurOfs);
005aa9c4      arg2 = ebx;
005aa9cd      uint8_t const* eax;
005aa9cd      
005aa9cd      if (this->m_Obj.vtable->UnPack(&arg2, ecx_2) == 0)
005aa9df          eax = 0;
005aa9cd      else
005aa9cd      {
005aa9d8          ebp->m_dwCurOfs = ((char*)arg2 - ebp->m_pBuf);
005aa9db          eax = 1;
005aa9cd      }
005aa9cd      
005aa9e5      this->m_bObjValid = eax;
005aa9ec      this->m_cbData = this->m_Obj.vtable->GetPackSize();
005aa9ef      this->m_pData = ebx;
005aa970  }

005aa9fa                                                                                90 90 90 90 90 90                            ......

005aaa00  class COptionalHeader* CTimeSyncHeader::CreateFromStream(class CBufferIterator* arg1)

005aaa00  {
005aaa04      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aaa04      
005aaa13      if ((m_dwCurOfs + 8) <= arg1->m_cbBufSize)
005aaa13      {
005aaa15          uint8_t const* m_pBuf = arg1->m_pBuf;
005aaa18          int32_t edi_1 = *(uint32_t*)(m_dwCurOfs + m_pBuf);
005aaa1b          int32_t ecx = *(uint32_t*)((m_dwCurOfs + m_pBuf) + 4);
005aaa29          arg1->m_dwCurOfs = (m_dwCurOfs + 8);
005aaa2c          void* result = operator new(0x20);
005aaa2c          
005aaa37          if (result != 0)
005aaa37          {
005aaa44              *(uint32_t*)((char*)result + 0x1c) = ecx;
005aaa47              *(uint32_t*)((char*)result + 4) = 1;
005aaa4e              *(uint32_t*)((char*)result + 8) = 0x1000000;
005aaa55              *(uint32_t*)((char*)result + 0xc) = 0x18;
005aaa5c              *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aaa5f              *(uint32_t*)((char*)result + 0x14) = 8;
005aaa66              *(uint32_t*)result = 0x7ca4ec;
005aaa6c              *(uint32_t*)((char*)result + 0x18) = edi_1;
005aaa72              return result;
005aaa37          }
005aaa13      }
005aaa13      
005aaa79      return 0;
005aaa00  }

005aaa7a                                                                                90 90 90 90 90 90                            ......

005aaa80  void __fastcall AC1Legacy::PStringBase<char>::~PStringBase<char>(class AC1Legacy::PStringBase<char>* this)

005aaa80  {
005aaa81      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_buffer;
005aaa81      
005aaa93      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005aaa95          m_buffer->vtable->__vecDelDtor(1);
005aaa80  }

005aaa9f                                                                                               90                                 .

005aaaa0  class COptionalHeader* CEchoRequestHeader::CreateFromStream(class CBufferIterator* arg1)

005aaaa0  {
005aaaa4      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aaaa4      
005aaab0      if ((m_dwCurOfs + 4) <= arg1->m_cbBufSize)
005aaab0      {
005aaab4          class CBufferIterator* ecx = *(uint32_t*)(m_dwCurOfs + arg1->m_pBuf);
005aaabd          arg1->m_dwCurOfs = (m_dwCurOfs + 4);
005aaac0          void* result = operator new(0x1c);
005aaac0          
005aaaca          if (result != 0)
005aaaca          {
005aaad3              *(uint32_t*)((char*)result + 0x18) = ((float)((long double)ecx));
005aaad5              *(uint32_t*)((char*)result + 4) = 1;
005aaadc              *(uint32_t*)((char*)result + 8) = 0x2000000;
005aaae3              *(uint32_t*)((char*)result + 0xc) = 0x18;
005aaaea              *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aaaed              *(uint32_t*)((char*)result + 0x14) = 4;
005aaaf4              *(uint32_t*)result = 0x7ca4f4;
005aaafb              return result;
005aaaca          }
005aaab0      }
005aaab0      
005aaaff      return 0;
005aaaa0  }


005aab00  class COptionalHeader* CEchoResponseHeader::CreateFromStream(class CBufferIterator* arg1)

005aab00  {
005aab05      void* result = operator new(0x28);
005aab05      
005aab11      if (result != 0)
005aab11      {
005aab1d          *(uint32_t*)((char*)result + 4) = 1;
005aab23          *(uint32_t*)((char*)result + 8) = 0x4000000;
005aab2a          *(uint32_t*)((char*)result + 0xc) = 0x18;
005aab31          *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aab34          *(uint32_t*)((char*)result + 0x14) = 8;
005aab3b          *(uint32_t*)result = 0x7ca078;
005aab41          uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aab41          
005aab4a          if ((m_dwCurOfs + 8) <= arg1->m_cbBufSize)
005aab4a          {
005aab4c              uint8_t const* m_pBuf = arg1->m_pBuf;
005aab51              *(uint32_t*)((char*)result + 0x18) = *(uint32_t*)(m_dwCurOfs + m_pBuf);
005aab57              *(uint32_t*)((char*)result + 0x1c) = *(uint32_t*)((m_dwCurOfs + m_pBuf) + 4);
005aab61              arg1->m_dwCurOfs += 8;
005aab68              return result;
005aab4a          }
005aab4a          
005aab72          if (InterlockedDecrement(((char*)result + 4)) == 0)
005aab7a              **(uint32_t**)result(1);
005aab11      }
005aab11      
005aab81      return 0;
005aab00  }

005aab82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005aab90  class COptionalHeader* CConnectHeader::CreateFromStream(class CBufferIterator* arg1)

005aab90  {
005aab92      void* result = operator new(0x38);
005aab92      
005aab9c      if (result == 0)
005aabf4          return 0;
005aabf4      
005aaba8      *(uint32_t*)((char*)result + 4) = 1;
005aabaf      *(uint32_t*)((char*)result + 8) = 0x40000;
005aabb6      *(uint32_t*)((char*)result + 0xc) = 0x20000007;
005aabbd      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aabc0      *(uint32_t*)((char*)result + 0x14) = 0x20;
005aabc7      *(uint32_t*)result = 0x7ca508;
005aabcd      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aabcd      
005aabd8      if ((m_dwCurOfs + 0x20) > arg1->m_cbBufSize)
005aabd8      {
005aabf7          ReferenceCountTemplate<1048576,0>::Release(result);
005aac01          return 0;
005aabd8      }
005aabd8      
005aabe3      __builtin_memcpy(((char*)result + 0x18), &arg1->m_pBuf[m_dwCurOfs], 0x20);
005aabed      arg1->m_dwCurOfs += 0x20;
005aabf1      return result;
005aab90  }

005aac02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005aac10  class COptionalHeader* COnePrimHeader<134217728,16,CFlowStruct>::CreateFromStream(class CBufferIterator* arg1)

005aac10  {
005aac14      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aac14      
005aac20      if ((m_dwCurOfs + 6) > arg1->m_cbBufSize)
005aac77          return 0;
005aac77      
005aac24      void* ecx = &arg1->m_pBuf[m_dwCurOfs];
005aac26      int32_t esi_2 = *(uint32_t*)ecx;
005aac29      int32_t edi;
005aac29      edi = *(uint16_t*)((char*)ecx + 4);
005aac2f      arg1->m_dwCurOfs = (m_dwCurOfs + 6);
005aac32      void* result = operator new(0x20);
005aac32      
005aac3c      if (result == 0)
005aac73          return 0;
005aac73      
005aac41      *(uint32_t*)((char*)result + 0x18) = esi_2;
005aac43      *(uint16_t*)((char*)result + 0x1c) = edi;
005aac48      *(uint32_t*)((char*)result + 4) = 1;
005aac4f      *(uint32_t*)((char*)result + 8) = 0x8000000;
005aac56      *(uint32_t*)((char*)result + 0xc) = 0x10;
005aac5d      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aac60      *(uint32_t*)((char*)result + 0x14) = 6;
005aac67      *(uint32_t*)result = 0x7ca508;
005aac6e      return result;
005aac10  }

005aac78                                                                          90 90 90 90 90 90 90 90                          ........

005aac80  class COptionalHeader* CPackObjHeader<NetError,1048576,7>::CreateFromStream(class CBufferIterator* arg1)

005aac80  {
005aac82      void* eax = operator new(0x30);
005aac8c      int32_t* result;
005aac8c      
005aac8c      if (eax == 0)
005aac9c          result = nullptr;
005aac8c      else
005aac95          result = CPackObjHeader<NetError,1048576,7>::CPackObjHeader<NetError,1048576,7>(eax, arg1);
005aac95      
005aaca3      if (result[0xb] != 0)
005aacaf          return result;
005aacaf      
005aacab      **(uint32_t**)result(1);
005aacad      return nullptr;
005aac80  }


005aacb0  class COptionalHeader* CSeqIDListHeader<4096,33>::CreateFromStream(class CBufferIterator* arg1)

005aacb0  {
005aacb8      void* result_1 = operator new(0x1e4);
005aacc2      void* result;
005aacc2      
005aacc2      if (result_1 == 0)
005aacf0          result = nullptr;
005aacc2      else
005aacc2      {
005aacc7          *(uint32_t*)((char*)result_1 + 4) = 1;
005aacce          *(uint32_t*)((char*)result_1 + 8) = 0x1000;
005aacd5          *(uint32_t*)((char*)result_1 + 0xc) = 0x21;
005aacdc          *(uint32_t*)((char*)result_1 + 0x10) = ((char*)result_1 + 0x18);
005aacdf          *(uint32_t*)((char*)result_1 + 0x14) = 0x1cc;
005aace6          *(uint32_t*)result_1 = 0x7ca508;
005aacec          result = result_1;
005aacc2      }
005aacc2      
005aacf6      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aacf9      uint32_t m_cbBufSize = arg1->m_cbBufSize;
005aad03      uint32_t ebp_1;
005aad03      
005aad03      if (m_dwCurOfs >= m_cbBufSize)
005aad0b          ebp_1 = 0;
005aad03      else
005aad07          ebp_1 = (m_cbBufSize - m_dwCurOfs);
005aad07      
005aad0f      if (result != 0 != 0)
005aad0f      {
005aad16          if ((m_dwCurOfs + 4) > m_cbBufSize)
005aad28              m_dwCurOfs = 0;
005aad16          else
005aad16          {
005aad1d              *(uint32_t*)((char*)result + 0x18) = *(uint32_t*)(m_dwCurOfs + arg1->m_pBuf);
005aad20              arg1->m_dwCurOfs += 4;
005aad24              m_dwCurOfs = 1;
005aad16          }
005aad16          
005aad2a          int32_t ecx_3 = *(uint32_t*)((char*)result + 0x18);
005aad38          m_dwCurOfs &= ((0x72 - 0x72) + 1);
005aad38          
005aad3a          if ((m_dwCurOfs != 0 && CBufferIterator::ReadPrimArray(arg1, ((char*)result + 0x1c), ecx_3) != 0))
005aad3a          {
005aad4c              uint32_t m_dwCurOfs_1 = arg1->m_dwCurOfs;
005aad4f              uint32_t m_cbBufSize_1 = arg1->m_cbBufSize;
005aad4f              
005aad54              if (m_dwCurOfs_1 < m_cbBufSize_1)
005aad54              {
005aad5a                  *(uint32_t*)((char*)result + 0x14) = (ebp_1 - (m_cbBufSize_1 - m_dwCurOfs_1));
005aad62                  return result;
005aad54              }
005aad54              
005aad67              *(uint32_t*)((char*)result + 0x14) = ebp_1;
005aad6f              return result;
005aad3a          }
005aad0f      }
005aad0f      
005aad72      if ((result != 0 && InterlockedDecrement(((char*)result + 4)) == 0))
005aad88          **(uint32_t**)result(1);
005aad88      
005aad8f      return 0;
005aacb0  }


005aad90  class COptionalHeader* COnePrimHeader<16384,1,unsigned long>::CreateFromStream(class CBufferIterator* arg1)

005aad90  {
005aad94      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aad94      
005aada0      if ((m_dwCurOfs + 4) <= arg1->m_cbBufSize)
005aada0      {
005aada4          int32_t esi_2 = *(uint32_t*)(m_dwCurOfs + arg1->m_pBuf);
005aada9          arg1->m_dwCurOfs = (m_dwCurOfs + 4);
005aadac          void* result = operator new(0x1c);
005aadac          
005aadb6          if (result != 0)
005aadb6          {
005aadbd              *(uint32_t*)((char*)result + 4) = 1;
005aadc0              *(uint32_t*)((char*)result + 0xc) = 1;
005aadc6              *(uint32_t*)((char*)result + 0x18) = esi_2;
005aadc8              *(uint32_t*)((char*)result + 8) = 0x4000;
005aadcf              *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aadd2              *(uint32_t*)((char*)result + 0x14) = 4;
005aadd9              *(uint32_t*)result = 0x7ca508;
005aade0              return result;
005aadb6          }
005aada0      }
005aada0      
005aade4      return 0;
005aad90  }

005aade5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005aadf0  class COptionalHeader* CSeqIDListHeader<8192,33>::CreateFromStream(class CBufferIterator* arg1)

005aadf0  {
005aadf8      void* result_1 = operator new(0x1e4);
005aae02      void* result;
005aae02      
005aae02      if (result_1 == 0)
005aae30          result = nullptr;
005aae02      else
005aae02      {
005aae07          *(uint32_t*)((char*)result_1 + 4) = 1;
005aae0e          *(uint32_t*)((char*)result_1 + 8) = 0x2000;
005aae15          *(uint32_t*)((char*)result_1 + 0xc) = 0x21;
005aae1c          *(uint32_t*)((char*)result_1 + 0x10) = ((char*)result_1 + 0x18);
005aae1f          *(uint32_t*)((char*)result_1 + 0x14) = 0x1cc;
005aae26          *(uint32_t*)result_1 = 0x7ca508;
005aae2c          result = result_1;
005aae02      }
005aae02      
005aae36      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aae39      uint32_t m_cbBufSize = arg1->m_cbBufSize;
005aae43      uint32_t ebp_1;
005aae43      
005aae43      if (m_dwCurOfs >= m_cbBufSize)
005aae4b          ebp_1 = 0;
005aae43      else
005aae47          ebp_1 = (m_cbBufSize - m_dwCurOfs);
005aae47      
005aae4f      if (result != 0 != 0)
005aae4f      {
005aae56          if ((m_dwCurOfs + 4) > m_cbBufSize)
005aae68              m_dwCurOfs = 0;
005aae56          else
005aae56          {
005aae5d              *(uint32_t*)((char*)result + 0x18) = *(uint32_t*)(m_dwCurOfs + arg1->m_pBuf);
005aae60              arg1->m_dwCurOfs += 4;
005aae64              m_dwCurOfs = 1;
005aae56          }
005aae56          
005aae6a          int32_t ecx_3 = *(uint32_t*)((char*)result + 0x18);
005aae78          m_dwCurOfs &= ((0x72 - 0x72) + 1);
005aae78          
005aae7a          if ((m_dwCurOfs != 0 && CBufferIterator::ReadPrimArray(arg1, ((char*)result + 0x1c), ecx_3) != 0))
005aae7a          {
005aae8c              uint32_t m_dwCurOfs_1 = arg1->m_dwCurOfs;
005aae8f              uint32_t m_cbBufSize_1 = arg1->m_cbBufSize;
005aae8f              
005aae94              if (m_dwCurOfs_1 < m_cbBufSize_1)
005aae94              {
005aae9a                  *(uint32_t*)((char*)result + 0x14) = (ebp_1 - (m_cbBufSize_1 - m_dwCurOfs_1));
005aaea2                  return result;
005aae94              }
005aae94              
005aaea7              *(uint32_t*)((char*)result + 0x14) = ebp_1;
005aaeaf              return result;
005aae7a          }
005aae4f      }
005aae4f      
005aaeb2      if ((result != 0 && InterlockedDecrement(((char*)result + 4)) == 0))
005aaec8          **(uint32_t**)result(1);
005aaec8      
005aaecf      return 0;
005aadf0  }


005aaed0  class COptionalHeader* COnePrimHeader<131072,7,unsigned __int64>::CreateFromStream(class CBufferIterator* arg1)

005aaed0  {
005aaed4      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aaed4      
005aaee0      if ((m_dwCurOfs + 8) > arg1->m_cbBufSize)
005aaf35          return 0;
005aaf35      
005aaee3      uint8_t const* m_pBuf = arg1->m_pBuf;
005aaee5      int32_t esi_1 = *(uint32_t*)(m_dwCurOfs + m_pBuf);
005aaee8      int32_t edi = *(uint32_t*)((m_dwCurOfs + m_pBuf) + 4);
005aaeee      arg1->m_dwCurOfs = (m_dwCurOfs + 8);
005aaef1      void* result = operator new(0x20);
005aaef1      
005aaefb      if (result == 0)
005aaf31          return 0;
005aaf31      
005aaf00      *(uint32_t*)((char*)result + 0x1c) = edi;
005aaf04      *(uint32_t*)((char*)result + 0x18) = esi_1;
005aaf06      *(uint32_t*)((char*)result + 4) = 1;
005aaf0d      *(uint32_t*)((char*)result + 8) = 0x20000;
005aaf14      *(uint32_t*)((char*)result + 0xc) = 7;
005aaf1b      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aaf1e      *(uint32_t*)((char*)result + 0x14) = 8;
005aaf25      *(uint32_t*)result = 0x7ca508;
005aaf2c      return result;
005aaed0  }

005aaf36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005aaf40  class COptionalHeader* CEmptyHeader<32768,3>::CreateFromStream(class CBufferIterator* arg1)

005aaf40  {
005aaf42      void* result = operator new(0x1c);
005aaf42      
005aaf4c      if (result == 0)
005aaf7f          return 0;
005aaf7f      
005aaf51      *(uint32_t*)((char*)result + 4) = 1;
005aaf58      *(uint32_t*)((char*)result + 8) = 0x8000;
005aaf5f      *(uint32_t*)((char*)result + 0xc) = 3;
005aaf66      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aaf69      *(uint32_t*)((char*)result + 0x14) = 0;
005aaf70      *(uint32_t*)result = 0x7ca508;
005aaf76      *(uint32_t*)((char*)result + 0x18) = 0;
005aaf7c      return result;
005aaf40  }


005aaf80  class COptionalHeader* CEmptyHeader<1024,7>::CreateFromStream(class CBufferIterator* arg1)

005aaf80  {
005aaf82      void* result = operator new(0x1c);
005aaf82      
005aaf8c      if (result == 0)
005aafbf          return 0;
005aafbf      
005aaf91      *(uint32_t*)((char*)result + 4) = 1;
005aaf98      *(uint32_t*)((char*)result + 8) = 0x400;
005aaf9f      *(uint32_t*)((char*)result + 0xc) = 7;
005aafa6      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005aafa9      *(uint32_t*)((char*)result + 0x14) = 0;
005aafb0      *(uint32_t*)result = 0x7ca508;
005aafb6      *(uint32_t*)((char*)result + 0x18) = 0;
005aafbc      return result;
005aaf80  }


005aafc0  class COptionalHeader* COnePrimHeader<524288,536870919,unsigned __int64>::CreateFromStream(class CBufferIterator* arg1)

005aafc0  {
005aafc4      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005aafc4      
005aafd0      if ((m_dwCurOfs + 8) > arg1->m_cbBufSize)
005ab025          return 0;
005ab025      
005aafd3      uint8_t const* m_pBuf = arg1->m_pBuf;
005aafd5      int32_t esi_1 = *(uint32_t*)(m_dwCurOfs + m_pBuf);
005aafd8      int32_t edi = *(uint32_t*)((m_dwCurOfs + m_pBuf) + 4);
005aafde      arg1->m_dwCurOfs = (m_dwCurOfs + 8);
005aafe1      void* result = operator new(0x20);
005aafe1      
005aafeb      if (result == 0)
005ab021          return 0;
005ab021      
005aaff0      *(uint32_t*)((char*)result + 0x1c) = edi;
005aaff4      *(uint32_t*)((char*)result + 0x18) = esi_1;
005aaff6      *(uint32_t*)((char*)result + 4) = 1;
005aaffd      *(uint32_t*)((char*)result + 8) = 0x80000;
005ab004      *(uint32_t*)((char*)result + 0xc) = 0x20000007;
005ab00b      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005ab00e      *(uint32_t*)((char*)result + 0x14) = 8;
005ab015      *(uint32_t*)result = 0x7ca508;
005ab01c      return result;
005aafc0  }

005ab026                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005ab030  class COptionalHeader* COnePrimHeader<256,96,CServerSwitchStruct>::CreateFromStream(class CBufferIterator* arg1)

005ab030  {
005ab034      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005ab034      
005ab040      if ((m_dwCurOfs + 8) > arg1->m_cbBufSize)
005ab095          return 0;
005ab095      
005ab043      uint8_t const* m_pBuf = arg1->m_pBuf;
005ab045      int32_t esi_1 = *(uint32_t*)(m_dwCurOfs + m_pBuf);
005ab048      int32_t edi = *(uint32_t*)((m_dwCurOfs + m_pBuf) + 4);
005ab04e      arg1->m_dwCurOfs = (m_dwCurOfs + 8);
005ab051      void* result = operator new(0x20);
005ab051      
005ab05b      if (result == 0)
005ab091          return 0;
005ab091      
005ab060      *(uint32_t*)((char*)result + 4) = 1;
005ab067      *(uint32_t*)((char*)result + 8) = 0x100;
005ab06e      *(uint32_t*)((char*)result + 0xc) = 0x60;
005ab075      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005ab078      *(uint32_t*)((char*)result + 0x14) = 8;
005ab07f      *(uint32_t*)result = 0x7ca508;
005ab085      *(uint32_t*)((char*)result + 0x1c) = edi;
005ab089      *(uint32_t*)((char*)result + 0x18) = esi_1;
005ab08c      return result;
005ab030  }

005ab096                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005ab0a0  class COptionalHeader* COnePrimHeader<512,7,sockaddr_in>::CreateFromStream(class CBufferIterator* arg1)

005ab0a0  {
005ab0a4      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005ab0a4      
005ab0b3      if ((m_dwCurOfs + 0x10) <= arg1->m_cbBufSize)
005ab0b3      {
005ab0b7          void* ecx = &arg1->m_pBuf[m_dwCurOfs];
005ab0b9          int32_t esi_2 = *(uint32_t*)ecx;
005ab0bb          int32_t edi_1 = *(uint32_t*)((char*)ecx + 4);
005ab0be          int32_t ebx_1 = *(uint32_t*)((char*)ecx + 8);
005ab0c1          int32_t ebp_1 = *(uint32_t*)((char*)ecx + 0xc);
005ab0c6          arg1->m_dwCurOfs = (m_dwCurOfs + 0x10);
005ab0c9          void* eax = operator new(0x28);
005ab0c9          
005ab0d3          if (eax != 0)
005ab0d3          {
005ab0dc              int32_t var_1c = edi_1;
005ab0df              int32_t var_18 = ebx_1;
005ab0e4              int32_t var_14 = ebp_1;
005ab0f0              return COnePrimHeader<512,7,sockaddr_in>::COnePrimHeader<512,7,sockaddr_in>(eax, esi_2);
005ab0d3          }
005ab0b3      }
005ab0b3      
005ab0f7      return 0;
005ab0a0  }

005ab0f8                                                                          90 90 90 90 90 90 90 90                          ........

005ab100  class COptionalHeader* COnePrimHeader<2048,1073741922,CReferralStruct>::CreateFromStream(class CBufferIterator* arg1)

005ab100  {
005ab104      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005ab104      
005ab113      if ((m_dwCurOfs + 0x20) > arg1->m_cbBufSize)
005ab17d          return 0;
005ab17d      
005ab123      void var_20;
005ab123      __builtin_memcpy(&var_20, &arg1->m_pBuf[m_dwCurOfs], 0x20);
005ab125      uint32_t var_2c = 0x38;
005ab127      arg1->m_dwCurOfs = (m_dwCurOfs + 0x20);
005ab12a      void* result = operator new(var_2c);
005ab12a      
005ab134      if (result == 0)
005ab176          return 0;
005ab176      
005ab139      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005ab145      __builtin_memcpy(((char*)result + 0x18), &var_20, 0x20);
005ab148      *(uint32_t*)((char*)result + 4) = 1;
005ab14f      *(uint32_t*)((char*)result + 8) = 0x800;
005ab156      *(uint32_t*)((char*)result + 0xc) = 0x40000062;
005ab15d      *(uint32_t*)((char*)result + 0x14) = 0x20;
005ab164      *(uint32_t*)result = 0x7ca508;
005ab16e      return result;
005ab100  }

005ab17e                                                                                            90 90                                ..

005ab180  class COptionalHeader* COnePrimHeader<4194304,7,CICMDCommandStruct>::CreateFromStream(class CBufferIterator* arg1)

005ab180  {
005ab184      uint32_t m_dwCurOfs = arg1->m_dwCurOfs;
005ab184      
005ab190      if ((m_dwCurOfs + 8) > arg1->m_cbBufSize)
005ab1e5          return 0;
005ab1e5      
005ab193      uint8_t const* m_pBuf = arg1->m_pBuf;
005ab195      int32_t esi_1 = *(uint32_t*)(m_dwCurOfs + m_pBuf);
005ab198      int32_t edi = *(uint32_t*)((m_dwCurOfs + m_pBuf) + 4);
005ab19e      arg1->m_dwCurOfs = (m_dwCurOfs + 8);
005ab1a1      void* result = operator new(0x20);
005ab1a1      
005ab1ab      if (result == 0)
005ab1e1          return 0;
005ab1e1      
005ab1b0      *(uint32_t*)((char*)result + 0x1c) = edi;
005ab1b4      *(uint32_t*)((char*)result + 0x18) = esi_1;
005ab1b6      *(uint32_t*)((char*)result + 4) = 1;
005ab1bd      *(uint32_t*)((char*)result + 8) = 0x400000;
005ab1c4      *(uint32_t*)((char*)result + 0xc) = 7;
005ab1cb      *(uint32_t*)((char*)result + 0x10) = ((char*)result + 0x18);
005ab1ce      *(uint32_t*)((char*)result + 0x14) = 8;
005ab1d5      *(uint32_t*)result = 0x7ca508;
005ab1dc      return result;
005ab180  }

005ab1e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005ab1f0  class COptionalHeader* CPackObjHeader<NetError,2097152,2>::CreateFromStream(class CBufferIterator* arg1)

005ab1f0  {
005ab1f2      void* eax = operator new(0x30);
005ab1fc      int32_t* result;
005ab1fc      
005ab1fc      if (eax == 0)
005ab20c          result = nullptr;
005ab1fc      else
005ab205          result = CPackObjHeader<NetError,2097152,2>::CPackObjHeader<NetError,2097152,2>(eax, arg1);
005ab205      
005ab213      if (result[0xb] != 0)
005ab21f          return result;
005ab21f      
005ab21b      **(uint32_t**)result(1);
005ab21d      return nullptr;
005ab1f0  }


005ab220  void __thiscall CLogonHeader::CLogonHeader(class CLogonHeader* this, uint32_t arg2)

005ab220  {
005ab22a      this->m_pData = &this->m_PackedData;
005ab22d      this->m_cRef = 1;
005ab234      this->m_dwMask = 0x10000;
005ab23b      this->m_Flags = 7;
005ab242      this->m_cbData = arg2;
005ab245      this->vtable = 0x7e6020;
005ab24b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005ab257      this->m_UnpackedData.ClientVersion.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005ab25a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005ab220  }

005ab266                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005ab270  void __thiscall CLogonHeader::CLogonHeader(class CLogonHeader* this, uint8_t const* arg2, uint32_t arg3)

005ab270  {
005ab27b      this->m_pData = arg2;
005ab27e      this->m_cRef = 1;
005ab285      this->m_dwMask = 0x10000;
005ab28c      this->m_Flags = 7;
005ab293      this->m_cbData = arg3;
005ab296      this->vtable = 0x7e6020;
005ab29c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005ab2a8      this->m_UnpackedData.ClientVersion.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005ab2ab      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005ab270  }

005ab2b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005ab2c0  void* __thiscall CLogonHeader::`scalar deleting destructor'(class CLogonHeader* this, uint32_t arg2)

005ab2c0  {
005ab2c6      AC1Legacy::PStringBase<char>::~PStringBase<char>(&this->m_UnpackedData);
005ab2d0      this->vtable = 0x7942f4;
005ab2d0      
005ab2d6      if ((arg2 & 1) != 0)
005ab2d9          operator delete(this);
005ab2d9      
005ab2e4      return this;
005ab2c0  }

005ab2e7                       90 90 90 90 90 90 90 90 90                                                         .........

005ab2f0  class COptionalHeader* CLogonHeader::CreateFromData(class AC1Legacy::PStringBase<char> const* arg1, class NetAuthenticator* arg2)

005ab2f0  {
005ab2f2      class NetAuthenticator* ebp = arg2;
005ab2fd      int32_t eax_1 = *(int32_t*)((char*)ebp->vtable + 4)();
005ab30b      int32_t eax_3 = (arg1->m_buffer->m_len - 1);
005ab30c      int32_t ecx_2 = 0;
005ab30c      
005ab313      if (eax_3 >= 0xffff)
005ab315          ecx_2 = 4;
005ab315      
005ab320      int32_t ecx_4 = (((ecx_2 + eax_3) + 2) & 3);
005ab323      int32_t eax_4;
005ab323      
005ab323      if (ecx_4 == 0)
005ab32e          eax_4 = 0;
005ab323      else
005ab32a          eax_4 = (4 - ecx_4);
005ab32a      
005ab33b      void* eax_6 = operator new(0x10000);
005ab345      void* const result;
005ab345      
005ab345      if (eax_6 == 0)
005ab353          result = nullptr;
005ab345      else
005ab34f          result = CLogonHeader::CLogonHeader(eax_6, (((eax_4 + ((ecx_2 + eax_3) + 2)) + eax_1) + 4));
005ab34f      
005ab35e      class AC1Legacy::PStringBase<char>* ecx_6 = arg1;
005ab362      arg2 = ((char*)result + 0x20);
005ab36b      uint32_t esi_1 = ((((eax_4 + ((ecx_2 + eax_3) + 2)) + eax_1) + 4) - AC1Legacy::PStringBase<char>::Pack(ecx_6, &arg2, (((eax_4 + ((ecx_2 + eax_3) + 2)) + eax_1) + 4)));
005ab36b      
005ab370      if (esi_1 >= 4)
005ab370      {
005ab372          arg2->vtable = eax_1;
005ab378          arg2 = &arg2->m_dwAuthType;
005ab37d          esi_1 -= 4;
005ab370      }
005ab370      
005ab384      bool cond:0 = arg2 != 0;
005ab386      arg1 = esi_1;
005ab386      
005ab38a      if (!(cond:0))
005ab38a      {
005ab38c          ebp->vtable->GetPackSize();
005ab39a          return result;
005ab38a      }
005ab38a      
005ab39b      ebp->vtable->StreamPack(1, &arg2, &arg1);
005ab3b5      return result;
005ab2f0  }

005ab3b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005ab3c0  class COptionalHeader* CLogonHeader::CreateFromStream(class CBufferIterator* arg1)

005ab3c0  {
005ab3c4      class CBufferIterator* ebx = arg1;
005ab3c8      uint32_t m_dwCurOfs = ebx->m_dwCurOfs;
005ab3cb      uint32_t m_cbBufSize = ebx->m_cbBufSize;
005ab3d3      uint32_t var_4;
005ab3d3      
005ab3d3      if (m_dwCurOfs >= m_cbBufSize)
005ab3dd          var_4 = 0;
005ab3d3      else
005ab3d7          var_4 = (m_cbBufSize - m_dwCurOfs);
005ab3d7      
005ab3e9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005ab3ee      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005ab3f6      int32_t* result = nullptr;
005ab3f8      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005ab409      uint32_t ecx_2 = (ebx->m_cbBufSize - ebx->m_dwCurOfs);
005ab417      void* var_8 = &ebx->m_pBuf[ebx->m_dwCurOfs];
005ab422      class CBufferIterator* edi_2;
005ab422      
005ab422      if (AC1Legacy::PStringBase<char>::UnPack(&arg1, &var_8, ecx_2) == 0)
005ab4f8          edi_2 = arg1;
005ab422      else
005ab422      {
005ab428          uint8_t const* m_pBuf = ebx->m_pBuf;
005ab42e          uint32_t m_cbBufSize_1 = ebx->m_cbBufSize;
005ab431          int32_t* edx_2 = ((char*)var_8 - m_pBuf);
005ab438          ebx->m_dwCurOfs = edx_2;
005ab438          
005ab43b          if (&edx_2[1] > m_cbBufSize_1)
005ab4f8              edi_2 = arg1;
005ab43b          else
005ab43b          {
005ab441              int32_t edi_1 = *(uint32_t*)((char*)edx_2 + m_pBuf);
005ab444              ebx->m_dwCurOfs = &edx_2[1];
005ab447              void* edx_4;
005ab447              
005ab447              if (&edx_2[1] >= m_cbBufSize_1)
005ab44f                  edx_4 = nullptr;
005ab447              else
005ab44b                  edx_4 = (m_cbBufSize_1 - &edx_2[1]);
005ab44b              
005ab45f              if ((edi_1 > edx_4 || edi_1 > 0xffe0))
005ab4f8                  edi_2 = arg1;
005ab45f              else
005ab45f              {
005ab467                  void* ebp;
005ab467                  
005ab467                  if (&edx_2[1] >= m_cbBufSize_1)
005ab46f                      ebp = nullptr;
005ab467                  else
005ab46b                      ebp = (m_cbBufSize_1 - &edx_2[1]);
005ab46b                  
005ab476                  class CLogonHeader* eax_5 = operator new(0x10000);
005ab476                  
005ab480                  if (eax_5 == 0)
005ab497                      result = nullptr;
005ab480                  else
005ab493                      result = CLogonHeader::CLogonHeader(eax_5, &ebx->m_pBuf[m_dwCurOfs], ((edi_1 - ebp) + var_4));
005ab493                  
005ab499                  result[7] = edi_1;
005ab49c                  int32_t* esi_2 = result[6];
005ab49f                  edi_2 = arg1;
005ab49f                  
005ab4a5                  if (esi_2 != edi_2)
005ab4a5                  {
005ab4b7                      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005ab4bf                          **(uint32_t**)esi_2(1);
005ab4bf                      
005ab4c5                      result[6] = edi_2;
005ab4c8                      InterlockedIncrement(&edi_2->m_dwCurOfs);
005ab4a5                  }
005ab4a5                  
005ab4ce                  int32_t eax_9 = result[7];
005ab4d1                  uint32_t m_dwCurOfs_1 = ebx->m_dwCurOfs;
005ab4d1                  
005ab4dc                  if ((m_dwCurOfs_1 + eax_9) > ebx->m_cbBufSize)
005ab4dc                  {
005ab52c                      if (InterlockedDecrement(&result[1]) == 0)
005ab535                          **(uint32_t**)result(1);
005ab535                      
005ab537                      result = nullptr;
005ab4dc                  }
005ab4dc                  else
005ab4dc                  {
005ab4ec                      int32_t esi_6;
005ab4ec                      int32_t edi_4;
005ab4ec                      edi_4 = __builtin_memcpy(&result[8], &ebx->m_pBuf[m_dwCurOfs_1], ((eax_9 >> 2) << 2));
005ab4f3                      __builtin_memcpy(edi_4, esi_6, (eax_9 & 3));
005ab4f5                      ebx->m_dwCurOfs += eax_9;
005ab4f8                      edi_2 = arg1;
005ab4dc                  }
005ab45f              }
005ab43b          }
005ab422      }
005ab422      
005ab50c      if ((InterlockedDecrement(&edi_2->m_dwCurOfs) == 0 && edi_2 != 0))
005ab514          *(uint32_t*)edi_2->m_pBuf(1);
005ab514      
005ab51f      return result;
005ab3c0  }

005ab53b                                                                                   90 90 90 90 90                             .....

005ab540  void __fastcall InterfaceEnumerator::InterfaceEnumerator(class InterfaceEnumerator* this)

005ab540  {
005ab54a      NetInitializer::NetInitializer(this);
005ab559      this->numInterfaces_ = 0;
005ab560      this->interfaces_ = nullptr;
005ab567      void var_100;
005ab567      Ordinal_WSOCK32_57(&var_100, 0x100);
005ab578      int32_t* edi = *(uint32_t*)(Ordinal_WSOCK32_52(&var_100) + 0xc);
005ab57b      this->numInterfaces_ = 0;
005ab582      int32_t* eax_1 = *(uint32_t*)edi;
005ab582      
005ab586      if (eax_1 != 0)
005ab586      {
005ab58b          while (*(uint32_t*)eax_1 != 0)
005ab58b          {
005ab590              int32_t edx_2 = (this->numInterfaces_ + 1);
005ab591              this->numInterfaces_ = edx_2;
005ab594              eax_1 = edi[edx_2];
005ab594              
005ab599              if (eax_1 == 0)
005ab599                  break;
005ab58b          }
005ab586      }
005ab586      
005ab5a2      void* eax_4 = operator new[]((this->numInterfaces_ << 2));
005ab5a7      int32_t numInterfaces_ = this->numInterfaces_;
005ab5aa      this->interfaces_ = eax_4;
005ab5b0      int32_t i = 0;
005ab5b0      
005ab5b4      if (numInterfaces_ > 0)
005ab5b4      {
005ab5c7          do
005ab5c7          {
005ab5bb              this->interfaces_[i].S_un = *(uint32_t*)edi[i];
005ab5c4              i += 1;
005ab5c7          } while (i < this->numInterfaces_);
005ab5b4      }
005ab540  }

005ab5d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005ab5e0  void __fastcall InterfaceEnumerator::~InterfaceEnumerator(class InterfaceEnumerator* this)

005ab5e0  {
005ab5e7      operator delete[](this->interfaces_);
005ab5f2      /* tailcall */
005ab5f2      return NetInitializer::~NetInitializer(this);
005ab5e0  }

005ab5f7                                                                       90 90 90 90 90 90 90 90 90                         .........

005ab600  class TextureMapChange* __thiscall ObjDesc::GetTextureMapChange(class ObjDesc const* this, int32_t arg2)

005ab600  {
005ab600      int32_t i_1 = arg2;
005ab600      
005ab60b      if ((i_1 >= this->num_texture_map_changes || i_1 < 0))
005ab61b          return nullptr;
005ab61b      
005ab60d      class TextureMapChange* result = this->firstTMChange;
005ab60d      
005ab610      if (i_1 <= 0)
005ab61d          return result;
005ab61d      
005ab616      int32_t i;
005ab616      
005ab616      do
005ab616      {
005ab612          i = i_1;
005ab612          i_1 -= 1;
005ab613          result = result->next;
005ab616      } while (i != 1);
005ab618      return result;
005ab600  }


005ab620  class AnimPartChange* __thiscall ObjDesc::GetAnimPartChange(class ObjDesc const* this, int32_t arg2)

005ab620  {
005ab620      int32_t i_1 = arg2;
005ab620      
005ab62b      if ((i_1 >= this->num_anim_part_changes || i_1 < 0))
005ab63b          return nullptr;
005ab63b      
005ab62d      class AnimPartChange* result = this->firstAPChange;
005ab62d      
005ab630      if (i_1 <= 0)
005ab63d          return result;
005ab63d      
005ab636      int32_t i;
005ab636      
005ab636      do
005ab636      {
005ab632          i = i_1;
005ab632          i_1 -= 1;
005ab633          result = result->next;
005ab636      } while (i != 1);
005ab638      return result;
005ab620  }


005ab640  void __thiscall ObjDesc::RemoveDuplicateSubpalette(class ObjDesc* this, class Subpalette* arg2)

005ab640  {
005ab644      class Subpalette* firstSubpal = this->firstSubpal;
005ab644      
005ab649      if (firstSubpal != 0)
005ab649      {
005ab699          class Subpalette* next_1;
005ab699          
005ab699          do
005ab699          {
005ab651              next_1 = firstSubpal->next;
005ab651              
005ab65e              if (Subpalette::replaces(arg2, firstSubpal) != 0)
005ab65e              {
005ab660                  class Subpalette* next = firstSubpal->next;
005ab660                  
005ab665                  if (next == 0)
005ab672                      this->lastSubpal = firstSubpal->prev;
005ab665                  else
005ab66a                      next->prev = firstSubpal->prev;
005ab66a                  
005ab675                  class Subpalette* prev = firstSubpal->prev;
005ab675                  
005ab67a                  if (prev == 0)
005ab687                      this->firstSubpal = firstSubpal->next;
005ab67a                  else
005ab67f                      prev->next = firstSubpal->next;
005ab67f                  
005ab68a                  firstSubpal->vtable->__vecDelDtor(1);
005ab692                  this->num_subpalettes -= 1;
005ab65e              }
005ab65e              
005ab697              firstSubpal = next_1;
005ab699          } while (next_1 != 0);
005ab649      }
005ab640  }

005ab6a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005ab6b0  void __thiscall ObjDesc::RemoveDuplicateTextureMapChange(class ObjDesc* this, class TextureMapChange* arg2)

005ab6b0  {
005ab6b4      class TextureMapChange* esi = this->firstTMChange;
005ab6b4      
005ab6b9      if (esi != 0)
005ab6b9      {
005ab6c3          while (TextureMapChange::replaces(arg2, esi) == 0)
005ab6c3          {
005ab6cc              esi = esi->next;
005ab6cc              
005ab6d1              if (esi == 0)
005ab6d6                  return;
005ab6c3          }
005ab6c3          
005ab6db          if (esi != 0)
005ab6db          {
005ab6dd              class TextureMapChange* next = esi->next;
005ab6dd              
005ab6e2              if (next == 0)
005ab6ef                  this->lastTMChange = esi->prev;
005ab6e2              else
005ab6e7                  next->prev = esi->prev;
005ab6e7              
005ab6f2              class TextureMapChange* prev = esi->prev;
005ab6f2              
005ab6f7              if (prev == 0)
005ab704                  this->firstTMChange = esi->next;
005ab6f7              else
005ab6fc                  prev->next = esi->next;
005ab6fc              
005ab707              esi->vtable->__vecDelDtor(1);
005ab70f              this->num_texture_map_changes -= 1;
005ab6db          }
005ab6b9      }
005ab6b0  }

005ab718                                                                          90 90 90 90 90 90 90 90                          ........

005ab720  void __thiscall ObjDesc::RemoveDuplicateAnimPartChange(class ObjDesc* this, class AnimPartChange* arg2)

005ab720  {
005ab724      class AnimPartChange* esi = this->firstAPChange;
005ab724      
005ab729      if (esi != 0)
005ab729      {
005ab733          while (ContentProfile::operator==(arg2, esi) == 0)
005ab733          {
005ab73c              esi = esi->next;
005ab73c              
005ab741              if (esi == 0)
005ab746                  return;
005ab733          }
005ab733          
005ab74b          if (esi != 0)
005ab74b          {
005ab74d              class AnimPartChange* next = esi->next;
005ab74d              
005ab752              if (next == 0)
005ab75f                  this->lastAPChange = esi->prev;
005ab752              else
005ab757                  next->prev = esi->prev;
005ab757              
005ab762              class AnimPartChange* prev = esi->prev;
005ab762              
005ab767              if (prev == 0)
005ab774                  this->firstAPChange = esi->next;
005ab767              else
005ab76c                  prev->next = esi->next;
005ab76c              
005ab777              esi->vtable->__vecDelDtor(1);
005ab77f              this->num_anim_part_changes -= 1;
005ab74b          }
005ab729      }
005ab720  }

005ab788                          90 90 90 90 90 90 90 90                                                          ........

005ab790  void __fastcall ObjDesc::Clear(class ObjDesc* this)

005ab790  {
005ab791      class ObjDesc* this_1 = this;
005ab791      
005ab79b      while (this_1->firstSubpal != 0)
005ab79b      {
005ab7a0          this = this_1->firstSubpal;
005ab7a8          this_1->firstSubpal = this->firstTMChange;
005ab7a8          
005ab7ab          if (this != 0)
005ab7ad              this->vtable->__vecDelDtor(1);
005ab79b      }
005ab79b      
005ab7bb      while (this_1->firstTMChange != 0)
005ab7bb      {
005ab7c0          this = this_1->firstTMChange;
005ab7c8          this_1->firstTMChange = this->firstTMChange;
005ab7c8          
005ab7cb          if (this != 0)
005ab7cd              this->vtable->__vecDelDtor(1);
005ab7bb      }
005ab7bb      
005ab7db      while (this_1->firstAPChange != 0)
005ab7db      {
005ab7e0          int32_t* firstAPChange = this_1->firstAPChange;
005ab7e8          this_1->firstAPChange = firstAPChange[4];
005ab7e8          
005ab7eb          if (firstAPChange != 0)
005ab7f1              **(uint32_t**)firstAPChange(1);
005ab7db      }
005ab7db      
005ab7fb      __builtin_memset(&this_1->firstSubpal, 0, 0x24);
005ab790  }

005ab816                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005ab820  void __fastcall ObjDesc::Wipe(class ObjDesc* this)

005ab820  {
005ab828      while (this->firstSubpal != 0)
005ab828      {
005ab830          class Subpalette* firstSubpal = this->firstSubpal;
005ab830          
005ab835          if (firstSubpal != 0)
005ab835          {
005ab837              class Subpalette* next = firstSubpal->next;
005ab837              
005ab83c              if (next == 0)
005ab849                  this->lastSubpal = firstSubpal->prev;
005ab83c              else
005ab841                  next->prev = firstSubpal->prev;
005ab841              
005ab84c              class Subpalette* prev = firstSubpal->prev;
005ab84c              
005ab851              if (prev == 0)
005ab85e                  this->firstSubpal = firstSubpal->next;
005ab851              else
005ab856                  prev->next = firstSubpal->next;
005ab856              
005ab861              firstSubpal->vtable->__vecDelDtor(1);
005ab867              this->num_subpalettes -= 1;
005ab835          }
005ab828      }
005ab828      
005ab876      while (this->firstTMChange != 0)
005ab876      {
005ab878          class TextureMapChange* firstTMChange = this->firstTMChange;
005ab878          
005ab87d          if (firstTMChange != 0)
005ab87d          {
005ab87f              class TextureMapChange* next_1 = firstTMChange->next;
005ab87f              
005ab884              if (next_1 == 0)
005ab891                  this->lastTMChange = firstTMChange->prev;
005ab884              else
005ab889                  next_1->prev = firstTMChange->prev;
005ab889              
005ab894              class TextureMapChange* prev_1 = firstTMChange->prev;
005ab894              
005ab899              if (prev_1 == 0)
005ab8a6                  this->firstTMChange = firstTMChange->next;
005ab899              else
005ab89e                  prev_1->next = firstTMChange->next;
005ab89e              
005ab8a9              firstTMChange->vtable->__vecDelDtor(1);
005ab8af              this->num_texture_map_changes -= 1;
005ab87d          }
005ab876      }
005ab876      
005ab8be      while (this->firstAPChange != 0)
005ab8be      {
005ab8c0          class AnimPartChange* firstAPChange = this->firstAPChange;
005ab8c0          
005ab8c5          if (firstAPChange != 0)
005ab8c5          {
005ab8c7              class AnimPartChange* next_2 = firstAPChange->next;
005ab8c7              
005ab8cc              if (next_2 == 0)
005ab8d9                  this->lastAPChange = firstAPChange->prev;
005ab8cc              else
005ab8d1                  next_2->prev = firstAPChange->prev;
005ab8d1              
005ab8dc              class AnimPartChange* prev_2 = firstAPChange->prev;
005ab8dc              
005ab8e1              if (prev_2 == 0)
005ab8ee                  this->firstAPChange = firstAPChange->next;
005ab8e1              else
005ab8e6                  prev_2->next = firstAPChange->next;
005ab8e6              
005ab8f1              firstAPChange->vtable->__vecDelDtor(1);
005ab8f7              this->num_anim_part_changes -= 1;
005ab8c5          }
005ab8be      }
005ab820  }

005ab903           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005ab910  void __fastcall ObjDesc::ObjDesc(class ObjDesc* this)

005ab910  {
005ab913      VisualDesc::VisualDesc(this);
005ab918      this->vtable = 0x7e6028;
005ab923      this->paletteID.id = INVALID_DID.id;
005ab928      __builtin_memset(&this->firstSubpal, 0, 0x24);
005ab910  }

005ab947                       90 90 90 90 90 90 90 90 90                                                         .........

005ab950  void __fastcall ObjDesc::~ObjDesc(class ObjDesc* this)

005ab950  {
005ab953      this->vtable = 0x7e6028;
005ab959      ObjDesc::Clear(this);
005ab961      /* tailcall */
005ab961      return SetPositionStruct::~SetPositionStruct(this);
005ab950  }

005ab966                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005ab970  int32_t __thiscall ObjDesc::AddSubpalette(class ObjDesc* this, class Subpalette* arg2)

005ab970  {
005ab97a      if (arg2 == 0)
005ab980          return 0;
005ab980      
005ab989      for (class Subpalette* i = this->firstSubpal; i != 0; i = i->next)
005ab989      {
005ab99a          if (Subpalette::supercedes(i, arg2) != 0)
005ab99a          {
005ab9c4              arg2->vtable->__vecDelDtor(1);
005ab9d4              return 1;
005ab99a          }
005ab989      }
005ab989      
005ab9a6      ObjDesc::RemoveDuplicateSubpalette(this, arg2);
005ab9a6      
005ab9b2      if (this->num_subpalettes == 0xff)
005ab9b2      {
005ab9b4          arg2->vtable->__vecDelDtor(1);
005ab9c1          return 0;
005ab9b2      }
005ab9b2      
005ab9d7      class Subpalette* lastSubpal = this->lastSubpal;
005ab9d7      
005ab9dc      if (lastSubpal == 0)
005ab9dc      {
005ab9e9          arg2->prev = nullptr;
005ab9f0          this->firstSubpal = arg2;
005ab9dc      }
005ab9dc      else
005ab9dc      {
005ab9de          arg2->prev = lastSubpal;
005ab9e1          this->lastSubpal->next = arg2;
005ab9dc      }
005ab9dc      
005ab9f3      arg2->next = nullptr;
005ab9fd      int32_t eax_8 = (this->num_subpalettes + 1);
005ab9ff      this->lastSubpal = arg2;
005aba02      this->num_subpalettes = eax_8;
005aba0c      return 1;
005ab970  }

005ab98d                                         8d 49 00                                                               .I.
005aba0f                                               90                                                                 .

005aba10  int32_t __thiscall ObjDesc::AddTextureMapChange(class ObjDesc* this, class TextureMapChange* arg2)

005aba10  {
005aba1a      if (arg2 != 0)
005aba1a      {
005aba1d          ObjDesc::RemoveDuplicateTextureMapChange(this, arg2);
005aba1d          
005aba29          if (this->num_texture_map_changes != 0xff)
005aba29          {
005aba3a              class TextureMapChange* lastTMChange = this->lastTMChange;
005aba3a              
005aba3f              if (lastTMChange == 0)
005aba3f              {
005aba4c                  arg2->prev = nullptr;
005aba53                  this->firstTMChange = arg2;
005aba3f              }
005aba3f              else
005aba3f              {
005aba41                  arg2->prev = lastTMChange;
005aba44                  this->lastTMChange->next = arg2;
005aba3f              }
005aba3f              
005aba56              arg2->next = nullptr;
005aba5d              int32_t num_texture_map_changes = this->num_texture_map_changes;
005aba60              this->lastTMChange = arg2;
005aba64              this->num_texture_map_changes = (num_texture_map_changes + 1);
005aba6e              return 1;
005aba29          }
005aba29          
005aba2b          arg2->vtable->__vecDelDtor(1);
005aba1a      }
005aba1a      
005aba37      return 0;
005aba10  }

005aba71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005aba80  int32_t __thiscall ObjDesc::AddAnimPartChange(class ObjDesc* this, class AnimPartChange* arg2)

005aba80  {
005aba8a      if (arg2 != 0)
005aba8a      {
005aba8d          ObjDesc::RemoveDuplicateAnimPartChange(this, arg2);
005aba8d          
005aba99          if (this->num_anim_part_changes != 0xff)
005aba99          {
005abaaa              class AnimPartChange* lastAPChange = this->lastAPChange;
005abaaa              
005abaaf              if (lastAPChange == 0)
005abaaf              {
005ababc                  arg2->prev = nullptr;
005abac3                  this->firstAPChange = arg2;
005abaaf              }
005abaaf              else
005abaaf              {
005abab1                  arg2->prev = lastAPChange;
005abab4                  this->lastAPChange->next = arg2;
005abaaf              }
005abaaf              
005abac6              arg2->next = nullptr;
005abacd              int32_t num_anim_part_changes = this->num_anim_part_changes;
005abad0              this->lastAPChange = arg2;
005abad4              this->num_anim_part_changes = (num_anim_part_changes + 1);
005abade              return 1;
005aba99          }
005aba99          
005aba9b          arg2->vtable->__vecDelDtor(1);
005aba8a      }
005aba8a      
005abaa7      return 0;
005aba80  }

005abae1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005abaf0  uint32_t __fastcall ObjDesc::pack_size(class ObjDesc* this)

005abaf0  {
005abaf0      class ObjDesc* this_1 = this;
005abaf9      int32_t i = 0;
005abafb      bool cond:0 = this->num_subpalettes <= 0;
005abafe      this_1 = nullptr;
005abb02      int32_t result = 4;
005abb02      
005abb07      if (!(cond:0))
005abb07      {
005abb18          uint32_t eax_1 = Pack_AsDataIDOfKnownType(0x4000000, this->paletteID.id, &this_1, 0);
005abb1d          class Subpalette* ebx_1 = this->firstSubpal;
005abb28          result = (eax_1 + 4);
005abb28          
005abb2d          if (this->num_subpalettes > 0)
005abb2d          {
005abb49              do
005abb49              {
005abb3b                  int32_t eax_3 = ebx_1->vtable->Pack(&this_1, 0);
005abb3e                  ebx_1 = ebx_1->next;
005abb41                  result += eax_3;
005abb46                  i += 1;
005abb49              } while (i < this->num_subpalettes);
005abb2d          }
005abb07      }
005abb07      
005abb4e      class TextureMapChange* ebx_2 = this->firstTMChange;
005abb51      int32_t i_1 = 0;
005abb51      
005abb55      if (this->num_texture_map_changes > 0)
005abb55      {
005abb70          do
005abb70          {
005abb62              int32_t eax_6 = ebx_2->vtable->Pack(&this_1, 0);
005abb65              ebx_2 = ebx_2->next;
005abb68              result += eax_6;
005abb6d              i_1 += 1;
005abb70          } while (i_1 < this->num_texture_map_changes);
005abb55      }
005abb55      
005abb75      class AnimPartChange* ebx_3 = this->firstAPChange;
005abb78      int32_t i_2 = 0;
005abb78      
005abb7c      if (this->num_anim_part_changes > 0)
005abb7c      {
005abb99          do
005abb99          {
005abb8b              int32_t eax_9 = ebx_3->vtable->Pack(&this_1, 0);
005abb8e              ebx_3 = ebx_3->next;
005abb91              result += eax_9;
005abb96              i_2 += 1;
005abb99          } while (i_2 < this->num_anim_part_changes);
005abb7c      }
005abb7c      
005abb9d      int32_t ecx_5 = (result & 3);
005abb9d      
005abba0      if (ecx_5 == 0)
005abbba          return result;
005abbba      
005abbb0      return ((4 - ecx_5) + result);
005abaf0  }

005abbbb                                                                                   90 90 90 90 90                             .....

005abbc0  uint32_t __thiscall ObjDesc::Pack(class ObjDesc* this, void** arg2, uint32_t arg3)

005abbc0  {
005abbc0      class ObjDesc* this_1 = this;
005abbc8      int32_t result = this->vtable->pack_size();
005abbd1      int32_t result_1 = result;
005abbd1      
005abbd5      if (arg3 >= result)
005abbd5      {
005abbe1          **(uint8_t**)arg2 = 0x11;
005abbe6          void* edx_2 = (*(uint32_t*)arg2 + 1);
005abbe7          *(uint32_t*)arg2 = edx_2;
005abbe9          void* ecx_1 = edx_2;
005abbeb          edx_2 = this->num_subpalettes;
005abbee          *(uint8_t*)ecx_1 = edx_2;
005abbf2          void* ecx_3 = (*(uint32_t*)arg2 + 1);
005abbf3          *(uint32_t*)arg2 = ecx_3;
005abbf5          edx_2 = this->num_texture_map_changes;
005abbf8          *(uint8_t*)ecx_3 = edx_2;
005abbfd          void* ebx_2 = (*(uint32_t*)arg2 + 1);
005abbfe          *(uint32_t*)arg2 = ebx_2;
005abc00          edx_2 = this->num_anim_part_changes;
005abc05          *(uint8_t*)ebx_2 = edx_2;
005abc07          *(uint32_t*)arg2 += 1;
005abc07          
005abc15          if ((this->num_subpalettes > 0 && this->firstSubpal != 0))
005abc15          {
005abc22              Pack_AsDataIDOfKnownType(0x4000000, this->paletteID.id, arg2, arg3);
005abc2a              class Subpalette* ebx_3 = this->firstSubpal;
005abc30              int32_t i = 0;
005abc30              
005abc34              if (this->num_subpalettes > 0)
005abc34              {
005abc4c                  do
005abc4c                  {
005abc3a                      ebx_3->vtable->Pack(arg2, arg3);
005abc46                      ebx_3 = ebx_3->next;
005abc49                      i += 1;
005abc4c                  } while (i < this->num_subpalettes);
005abc34              }
005abc34              
005abc4e              result = result_1;
005abc15          }
005abc15          
005abc52          int32_t num_texture_map_changes = this->num_texture_map_changes;
005abc52          
005abc57          if (num_texture_map_changes > 0)
005abc57          {
005abc59              class TextureMapChange* ebx_4 = this->firstTMChange;
005abc59              
005abc5e              if (ebx_4 != 0)
005abc5e              {
005abc60                  int32_t i_1 = 0;
005abc60                  
005abc64                  if (num_texture_map_changes > 0)
005abc64                  {
005abc7c                      do
005abc7c                      {
005abc6a                          ebx_4->vtable->Pack(arg2, arg3);
005abc76                          ebx_4 = ebx_4->next;
005abc79                          i_1 += 1;
005abc7c                      } while (i_1 < this->num_texture_map_changes);
005abc7c                      
005abc7e                      result = result_1;
005abc64                  }
005abc5e              }
005abc57          }
005abc57          
005abc82          int32_t num_anim_part_changes = this->num_anim_part_changes;
005abc82          
005abc87          if (num_anim_part_changes > 0)
005abc87          {
005abc89              class AnimPartChange* ebx_5 = this->firstAPChange;
005abc89              
005abc8e              if (ebx_5 != 0)
005abc8e              {
005abc90                  int32_t i_2 = 0;
005abc90                  
005abc94                  if (num_anim_part_changes > 0)
005abc94                  {
005abcac                      do
005abcac                      {
005abc9a                          ebx_5->vtable->Pack(arg2, arg3);
005abca6                          ebx_5 = ebx_5->next;
005abca9                          i_2 += 1;
005abcac                      } while (i_2 < this->num_anim_part_changes);
005abcac                      
005abcae                      result = result_1;
005abc94                  }
005abc8e              }
005abc87          }
005abc87          
005abcb4          void* edx_7 = (*(uint32_t*)arg2 & 0x80000003);
005abcb4          bool cond:2_1 = edx_7 == 0;
005abcb4          
005abcbb          if (edx_7 < 0)
005abcbb          {
005abcbe              void* edx_9 = (((char*)edx_7 - 1) | 0xfffffffc);
005abcc1              edx_7 = ((char*)edx_9 + 1);
005abcc1              cond:2_1 = edx_9 == 0xffffffff;
005abcbb          }
005abcbb          
005abccb          if ((!(cond:2_1) && 4 != edx_7))
005abccb          {
005abccd              void* i_4 = (4 - edx_7);
005abcdb              void* i_3;
005abcdb              
005abcdb              do
005abcdb              {
005abcd2                  **(uint8_t**)arg2 = 0;
005abcd8                  i_3 = i_4;
005abcd8                  i_4 -= 1;
005abcd9                  *(uint32_t*)arg2 += 1;
005abcdb              } while (i_3 != 1);
005abccb          }
005abbd5      }
005abbd5      
005abce1      return result;
005abbc0  }

005abce4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005abcf0  int32_t __thiscall ObjDesc::UnPack(class ObjDesc* this, void** arg2, uint32_t arg3)

005abcf0  {
005abcf7      ObjDesc::Wipe(this);
005abcfc      void** ebp = arg2;
005abd00      void* eax = *(uint32_t*)ebp;
005abd0a      uint32_t ecx;
005abd0a      ecx = *(uint8_t*)eax;
005abd10      arg2 = ((char*)eax + arg3);
005abd14      *(uint32_t*)ebp = ((char*)eax + 1);
005abd14      
005abd17      if (ecx != 0x11)
005abd20          return 0;
005abd20      
005abd23      ecx = *(uint8_t*)((char*)eax + 1);
005abd26      *(uint32_t*)ebp = ((char*)eax + 2);
005abd2a      uint32_t ebx = ((uint32_t)ecx);
005abd2d      ecx = *(uint8_t*)((char*)eax + 2);
005abd33      *(uint32_t*)ebp = ((char*)eax + 3);
005abd36      uint32_t var_8 = ((uint32_t)ecx);
005abd3a      uint32_t ecx_1;
005abd3a      ecx_1 = *(uint8_t*)((char*)eax + 3);
005abd3d      uint32_t edx_1 = ((uint32_t)ecx_1);
005abd41      void* esi = nullptr;
005abd45      *(uint32_t*)ebp = ((char*)eax + 4);
005abd45      
005abd4c      if (ebx > 0)
005abd4c      {
005abd58          Unpack_AsDataIDOfKnownType(0x4000000, &this->paletteID, ebp);
005abd62          arg3 = 0;
005abd62          
005abd66          if (ebx > 0)
005abd66          {
005abdc2              bool cond:4_1;
005abdc2              
005abdc2              do
005abdc2              {
005abd6a                  void* eax_7 = operator new(0x18);
005abd6a                  
005abd74                  if (eax_7 != 0)
005abd74                  {
005abd76                      *(uint32_t*)eax_7 = 0x7c3674;
005abd82                      *(uint32_t*)((char*)eax_7 + 8) = 0;
005abd85                      *(uint32_t*)((char*)eax_7 + 0xc) = 0;
005abd88                      *(uint32_t*)((char*)eax_7 + 0x10) = 0;
005abd8b                      *(uint32_t*)((char*)eax_7 + 0x14) = 0;
005abd8e                      *(uint32_t*)((char*)eax_7 + 4) = INVALID_DID.id;
005abd91                      esi = eax_7;
005abd74                  }
005abd74                  
005abda7                  if (*(uint32_t*)(*(uint32_t*)esi + 0x10)(ebp, ((char*)arg2 - *(uint32_t*)ebp)) == 0)
005abe3d                      return 0;
005abe3d                  
005abdb0                  ObjDesc::AddSubpalette(this, esi);
005abdba                  esi = nullptr;
005abdbc                  cond:4_1 = (arg3 + 1) < ebx;
005abdbe                  arg3 += 1;
005abdc2              } while (cond:4_1);
005abd66          }
005abd4c      }
005abd4c      
005abdc8      int32_t ebx_1 = 0;
005abdc8      
005abdcc      if (var_8 > 0)
005abdcc      {
005abe70          do
005abe70          {
005abdd4              void* eax_14 = operator new(0x18);
005abdd4              
005abdde              if (eax_14 != 0)
005abdde              {
005abde0                  *(uint32_t*)((char*)eax_14 + 4) = 0;
005abde3                  *(uint32_t*)eax_14 = 0x7e5b18;
005abdef                  *(uint32_t*)((char*)eax_14 + 8) = INVALID_DID.id;
005abdf8                  *(uint32_t*)((char*)eax_14 + 0x10) = 0;
005abdfb                  *(uint32_t*)((char*)eax_14 + 0x14) = 0;
005abdfe                  *(uint32_t*)((char*)eax_14 + 0xc) = INVALID_DID.id;
005abe01                  esi = eax_14;
005abdde              }
005abdde              
005abe17              if (*(uint32_t*)(*(uint32_t*)esi + 0x10)(ebp, ((char*)arg2 - *(uint32_t*)ebp)) == 0)
005abe3d                  return 0;
005abe3d              
005abe1c              ObjDesc::RemoveDuplicateTextureMapChange(this, esi);
005abe1c              
005abe28              if (this->num_texture_map_changes != 0xff)
005abe28              {
005abe40                  class TextureMapChange* lastTMChange = this->lastTMChange;
005abe40                  
005abe47                  if (lastTMChange == 0)
005abe47                  {
005abe54                      *(uint32_t*)((char*)esi + 0x10) = 0;
005abe57                      this->firstTMChange = esi;
005abe47                  }
005abe47                  else
005abe47                  {
005abe49                      *(uint32_t*)((char*)esi + 0x10) = lastTMChange;
005abe4c                      this->lastTMChange->next = esi;
005abe47                  }
005abe47                  
005abe5a                  *(uint32_t*)((char*)esi + 0x14) = 0;
005abe60                  int32_t eax_20 = (this->num_texture_map_changes + 1);
005abe61                  this->lastTMChange = esi;
005abe64                  this->num_texture_map_changes = eax_20;
005abe28              }
005abe28              else
005abe30                  **(uint32_t**)esi(1);
005abe30              
005abe6b              ebx_1 += 1;
005abe6c              esi = nullptr;
005abe70          } while (ebx_1 < var_8);
005abdcc      }
005abdcc      
005abe7a      int32_t ebx_2 = 0;
005abe7a      
005abe7e      if (edx_1 > 0)
005abe7e      {
005abe8a          while (true)
005abe8a          {
005abe8a              void* eax_23 = operator new(0x14);
005abe8a              
005abe94              if (eax_23 != 0)
005abe94              {
005abe96                  *(uint32_t*)((char*)eax_23 + 4) = 0;
005abe99                  *(uint32_t*)eax_23 = 0x7c881c;
005abea5                  *(uint32_t*)((char*)eax_23 + 0xc) = 0;
005abea8                  *(uint32_t*)((char*)eax_23 + 0x10) = 0;
005abeab                  *(uint32_t*)((char*)eax_23 + 8) = INVALID_DID.id;
005abeae                  esi = eax_23;
005abe94              }
005abe94              
005abec4              if (*(uint32_t*)(*(uint32_t*)esi + 0x10)(ebp, ((char*)arg2 - *(uint32_t*)ebp)) == 0)
005abe3d                  return 0;
005abe3d              
005abecd              ObjDesc::RemoveDuplicateAnimPartChange(this, esi);
005abecd              
005abed9              if (this->num_anim_part_changes != 0xff)
005abed9              {
005abee5                  class AnimPartChange* lastAPChange = this->lastAPChange;
005abee5                  
005abeec                  if (lastAPChange == 0)
005abeec                  {
005abef9                      *(uint32_t*)((char*)esi + 0xc) = 0;
005abefc                      this->firstAPChange = esi;
005abeec                  }
005abeec                  else
005abeec                  {
005abeee                      *(uint32_t*)((char*)esi + 0xc) = lastAPChange;
005abef1                      this->lastAPChange->next = esi;
005abeec                  }
005abeec                  
005abeff                  *(uint32_t*)((char*)esi + 0x10) = 0;
005abf05                  int32_t eax_29 = (this->num_anim_part_changes + 1);
005abf06                  this->lastAPChange = esi;
005abf09                  this->num_anim_part_changes = eax_29;
005abed9              }
005abed9              else
005abee1                  **(uint32_t**)esi(1);
005abee1              
005abf10              ebx_2 += 1;
005abf10              
005abf13              if (ebx_2 >= edx_1)
005abf13                  break;
005abf13              
005abe86              esi = nullptr;
005abe8a          }
005abe7e      }
005abe7e      
005abf1c      void* ecx_18 = (*(uint32_t*)ebp & 0x80000003);
005abf1c      bool cond:3 = ecx_18 == 0;
005abf1c      
005abf22      if (ecx_18 < 0)
005abf22      {
005abf25          void* ecx_20 = (((char*)ecx_18 - 1) | 0xfffffffc);
005abf28          ecx_18 = ((char*)ecx_20 + 1);
005abf28          cond:3 = ecx_20 == 0xffffffff;
005abf22      }
005abf22      
005abf29      if (!(cond:3))
005abf29      {
005abf30          void* i_1 = (4 - ecx_18);
005abf30          
005abf32          if (4 != ecx_18)
005abf32          {
005abf42              void* i;
005abf42              
005abf42              do
005abf42              {
005abf37                  **(uint8_t**)ebp = 0;
005abf3e                  i = i_1;
005abf3e                  i_1 -= 1;
005abf3f                  *(uint32_t*)ebp += 1;
005abf42              } while (i != 1);
005abf32          }
005abf29      }
005abf29      
005abf50      return 1;
005abcf0  }

005abf53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005abf60  void* __thiscall ObjDesc::`scalar deleting destructor'(class ObjDesc* this, uint32_t arg2)

005abf60  {
005abf63      this->vtable = 0x7e6028;
005abf69      ObjDesc::Clear(this);
005abf70      SetPositionStruct::~SetPositionStruct(this);
005abf70      
005abf7a      if ((arg2 & 1) != 0)
005abf7d          operator delete(this);
005abf7d      
005abf88      return this;
005abf60  }

005abf8b                                   90 90 90 90 90                                                             .....

005abf90  int32_t __thiscall ObjDesc::AddSubpalette(class ObjDesc* this, class Subpalette* arg2)

005abf90  {
005abf95      void* eax = operator new(0x18);
005abf95      
005abf9f      if (eax == 0)
005abfe0          return ObjDesc::AddSubpalette(this, nullptr);
005abfe0      
005abfa5      *(uint32_t*)eax = 0x7c3674;
005abfae      *(uint32_t*)((char*)eax + 4) = arg2->subID.id;
005abfb4      *(uint32_t*)((char*)eax + 8) = arg2->offset;
005abfba      *(uint32_t*)((char*)eax + 0xc) = arg2->numcolors;
005abfc0      *(uint32_t*)((char*)eax + 0x10) = arg2->prev;
005abfc6      *(uint32_t*)((char*)eax + 0x14) = arg2->next;
005abfd2      return ObjDesc::AddSubpalette(this, eax);
005abf90  }

005abfe3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005abff0  int32_t __thiscall ObjDesc::AddTextureMapChange(class ObjDesc* this, class TextureMapChange* arg2)

005abff0  {
005abff5      void* eax = operator new(0x18);
005abff5      
005abfff      if (eax == 0)
005ac040          return ObjDesc::AddTextureMapChange(this, nullptr);
005ac040      
005ac005      *(uint32_t*)eax = 0x7e5b18;
005ac00e      *(uint32_t*)((char*)eax + 4) = arg2->part_index;
005ac014      *(uint32_t*)((char*)eax + 8) = arg2->old_tex_id.id;
005ac01a      *(uint32_t*)((char*)eax + 0xc) = arg2->new_tex_id.id;
005ac020      *(uint32_t*)((char*)eax + 0x10) = arg2->prev;
005ac026      *(uint32_t*)((char*)eax + 0x14) = arg2->next;
005ac032      return ObjDesc::AddTextureMapChange(this, eax);
005abff0  }

005ac043           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005ac050  int32_t __thiscall ObjDesc::AddAnimPartChange(class ObjDesc* this, class AnimPartChange* arg2)

005ac050  {
005ac055      void* eax = operator new(0x14);
005ac055      
005ac05f      if (eax == 0)
005ac09a          return ObjDesc::AddAnimPartChange(this, nullptr);
005ac09a      
005ac065      *(uint32_t*)eax = 0x7c881c;
005ac06e      *(uint32_t*)((char*)eax + 4) = arg2->part_index;
005ac074      *(uint32_t*)((char*)eax + 8) = arg2->part_id.id;
005ac07a      *(uint32_t*)((char*)eax + 0xc) = arg2->prev;
005ac080      *(uint32_t*)((char*)eax + 0x10) = arg2->next;
005ac08c      return ObjDesc::AddAnimPartChange(this, eax);
005ac050  }

005ac09d                                                                                         90 90 90                               ...

005ac0a0  class ObjDesc* __thiscall ObjDesc::operator+=(class ObjDesc* this, class ObjDesc const* arg2)

005ac0a0  {
005ac0a2      class ObjDesc* ebp = arg2;
005ac0aa      class Subpalette* esi = ebp->firstSubpal;
005ac0ad      int32_t i = 0;
005ac0ad      
005ac0b4      if (ebp->num_subpalettes > 0)
005ac0b4      {
005ac0fd          do
005ac0fd          {
005ac0b8              void* eax_1 = operator new(0x18);
005ac0b8              
005ac0c2              if (eax_1 == 0)
005ac0ea                  eax_1 = nullptr;
005ac0c2              else
005ac0c2              {
005ac0c4                  *(uint32_t*)eax_1 = 0x7c3674;
005ac0cd                  *(uint32_t*)((char*)eax_1 + 4) = esi->subID.id;
005ac0d3                  *(uint32_t*)((char*)eax_1 + 8) = esi->offset;
005ac0d9                  *(uint32_t*)((char*)eax_1 + 0xc) = esi->numcolors;
005ac0df                  *(uint32_t*)((char*)eax_1 + 0x10) = esi->prev;
005ac0e5                  *(uint32_t*)((char*)eax_1 + 0x14) = esi->next;
005ac0c2              }
005ac0c2              
005ac0ef              ObjDesc::AddSubpalette(this, eax_1);
005ac0f7              esi = esi->next;
005ac0fa              i += 1;
005ac0fd          } while (i < ebp->num_subpalettes);
005ac0b4      }
005ac0b4      
005ac104      class TextureMapChange* ebx = ebp->firstTMChange;
005ac107      arg2 = nullptr;
005ac107      
005ac10f      if (ebp->num_texture_map_changes > 0)
005ac10f      {
005ac19c          do
005ac19c          {
005ac11c              class TextureMapChange* esi_1 = operator new(0x18);
005ac11c              
005ac123              if (esi_1 != 0)
005ac123              {
005ac125                  esi_1->vtable = 0x7e5b18;
005ac12e                  esi_1->part_index = ebx->part_index;
005ac134                  esi_1->old_tex_id.id = ebx->old_tex_id.id;
005ac13a                  esi_1->new_tex_id.id = ebx->new_tex_id.id;
005ac140                  esi_1->prev = ebx->prev;
005ac149                  esi_1->next = ebx->next;
005ac14c                  ObjDesc::RemoveDuplicateTextureMapChange(this, esi_1);
005ac14c                  
005ac158                  if (this->num_texture_map_changes != 0xff)
005ac158                  {
005ac164                      class TextureMapChange* lastTMChange = this->lastTMChange;
005ac164                      
005ac16b                      if (lastTMChange == 0)
005ac16b                      {
005ac178                          esi_1->prev = nullptr;
005ac17b                          this->firstTMChange = esi_1;
005ac16b                      }
005ac16b                      else
005ac16b                      {
005ac16d                          esi_1->prev = lastTMChange;
005ac170                          this->lastTMChange->next = esi_1;
005ac16b                      }
005ac16b                      
005ac17e                      esi_1->next = nullptr;
005ac184                      int32_t eax_9 = (this->num_texture_map_changes + 1);
005ac185                      this->lastTMChange = esi_1;
005ac188                      this->num_texture_map_changes = eax_9;
005ac158                  }
005ac158                  else
005ac15a                      esi_1->vtable->__vecDelDtor(1);
005ac123              }
005ac123              
005ac192              ebx = ebx->next;
005ac198              arg2 = (&arg2->vtable + 1);
005ac19c          } while ((&arg2->vtable + 1) < ebp->num_texture_map_changes);
005ac10f      }
005ac10f      
005ac1a7      class AnimPartChange* ebx_1 = ebp->firstAPChange;
005ac1aa      arg2 = nullptr;
005ac1aa      
005ac1b2      if (ebp->num_anim_part_changes > 0)
005ac1b2      {
005ac239          do
005ac239          {
005ac1bf              class AnimPartChange* esi_2 = operator new(0x14);
005ac1bf              
005ac1c6              if (esi_2 != 0)
005ac1c6              {
005ac1c8                  esi_2->vtable = 0x7c881c;
005ac1d1                  esi_2->part_index = ebx_1->part_index;
005ac1d7                  esi_2->part_id.id = ebx_1->part_id.id;
005ac1dd                  esi_2->prev = ebx_1->prev;
005ac1e3                  esi_2->next = ebx_1->next;
005ac1e9                  ObjDesc::RemoveDuplicateAnimPartChange(this, esi_2);
005ac1e9                  
005ac1f5                  if (this->num_anim_part_changes != 0xff)
005ac1f5                  {
005ac201                      class AnimPartChange* lastAPChange = this->lastAPChange;
005ac201                      
005ac208                      if (lastAPChange == 0)
005ac208                      {
005ac215                          esi_2->prev = nullptr;
005ac218                          this->firstAPChange = esi_2;
005ac208                      }
005ac208                      else
005ac208                      {
005ac20a                          esi_2->prev = lastAPChange;
005ac20d                          this->lastAPChange->next = esi_2;
005ac208                      }
005ac208                      
005ac21b                      esi_2->next = nullptr;
005ac221                      int32_t eax_17 = (this->num_anim_part_changes + 1);
005ac222                      this->lastAPChange = esi_2;
005ac225                      this->num_anim_part_changes = eax_17;
005ac1f5                  }
005ac1f5                  else
005ac1f7                      esi_2->vtable->__vecDelDtor(1);
005ac1c6              }
005ac1c6              
005ac22f              ebx_1 = ebx_1->next;
005ac235              arg2 = (&arg2->vtable + 1);
005ac239          } while ((&arg2->vtable + 1) < ebp->num_anim_part_changes);
005ac1b2      }
005ac1b2      
005ac245      return this;
005ac0a0  }

005ac248                          90 90 90 90 90 90 90 90                                                          ........

005ac250  class ObjDesc* __thiscall ObjDesc::operator=(class ObjDesc* this, class ObjDesc const* arg2)

005ac250  {
005ac256      ObjDesc::Clear(this);
005ac25b      class ObjDesc* ebp = arg2;
005ac262      this->paletteID.id = ebp->paletteID.id;
005ac268      class Subpalette* esi = ebp->firstSubpal;
005ac26b      int32_t i = 0;
005ac26b      
005ac26f      if (ebp->num_subpalettes > 0)
005ac26f      {
005ac2b8          do
005ac2b8          {
005ac273              void* eax_2 = operator new(0x18);
005ac273              
005ac27d              if (eax_2 == 0)
005ac2a5                  eax_2 = nullptr;
005ac27d              else
005ac27d              {
005ac27f                  *(uint32_t*)eax_2 = 0x7c3674;
005ac288                  *(uint32_t*)((char*)eax_2 + 4) = esi->subID.id;
005ac28e                  *(uint32_t*)((char*)eax_2 + 8) = esi->offset;
005ac294                  *(uint32_t*)((char*)eax_2 + 0xc) = esi->numcolors;
005ac29a                  *(uint32_t*)((char*)eax_2 + 0x10) = esi->prev;
005ac2a0                  *(uint32_t*)((char*)eax_2 + 0x14) = esi->next;
005ac27d              }
005ac27d              
005ac2aa              ObjDesc::AddSubpalette(this, eax_2);
005ac2b2              esi = esi->next;
005ac2b5              i += 1;
005ac2b8          } while (i < ebp->num_subpalettes);
005ac26f      }
005ac26f      
005ac2bf      class TextureMapChange* ebx = ebp->firstTMChange;
005ac2c2      arg2 = nullptr;
005ac2c2      
005ac2ca      if (ebp->num_texture_map_changes > 0)
005ac2ca      {
005ac357          do
005ac357          {
005ac2d7              class TextureMapChange* esi_1 = operator new(0x18);
005ac2d7              
005ac2de              if (esi_1 != 0)
005ac2de              {
005ac2e0                  esi_1->vtable = 0x7e5b18;
005ac2e9                  esi_1->part_index = ebx->part_index;
005ac2ef                  esi_1->old_tex_id.id = ebx->old_tex_id.id;
005ac2f5                  esi_1->new_tex_id.id = ebx->new_tex_id.id;
005ac2fb                  esi_1->prev = ebx->prev;
005ac304                  esi_1->next = ebx->next;
005ac307                  ObjDesc::RemoveDuplicateTextureMapChange(this, esi_1);
005ac307                  
005ac313                  if (this->num_texture_map_changes != 0xff)
005ac313                  {
005ac31f                      class TextureMapChange* lastTMChange = this->lastTMChange;
005ac31f                      
005ac326                      if (lastTMChange == 0)
005ac326                      {
005ac333                          esi_1->prev = nullptr;
005ac336                          this->firstTMChange = esi_1;
005ac326                      }
005ac326                      else
005ac326                      {
005ac328                          esi_1->prev = lastTMChange;
005ac32b                          this->lastTMChange->next = esi_1;
005ac326                      }
005ac326                      
005ac339                      esi_1->next = nullptr;
005ac33f                      int32_t eax_10 = (this->num_texture_map_changes + 1);
005ac340                      this->lastTMChange = esi_1;
005ac343                      this->num_texture_map_changes = eax_10;
005ac313                  }
005ac313                  else
005ac315                      esi_1->vtable->__vecDelDtor(1);
005ac2de              }
005ac2de              
005ac34d              ebx = ebx->next;
005ac353              arg2 = (&arg2->vtable + 1);
005ac357          } while ((&arg2->vtable + 1) < ebp->num_texture_map_changes);
005ac2ca      }
005ac2ca      
005ac362      class AnimPartChange* ebx_1 = ebp->firstAPChange;
005ac365      arg2 = nullptr;
005ac365      
005ac36d      if (ebp->num_anim_part_changes > 0)
005ac36d      {
005ac3f4          do
005ac3f4          {
005ac37a              class AnimPartChange* esi_2 = operator new(0x14);
005ac37a              
005ac381              if (esi_2 != 0)
005ac381              {
005ac383                  esi_2->vtable = 0x7c881c;
005ac38c                  esi_2->part_index = ebx_1->part_index;
005ac392                  esi_2->part_id.id = ebx_1->part_id.id;
005ac398                  esi_2->prev = ebx_1->prev;
005ac39e                  esi_2->next = ebx_1->next;
005ac3a4                  ObjDesc::RemoveDuplicateAnimPartChange(this, esi_2);
005ac3a4                  
005ac3b0                  if (this->num_anim_part_changes != 0xff)
005ac3b0                  {
005ac3bc                      class AnimPartChange* lastAPChange = this->lastAPChange;
005ac3bc                      
005ac3c3                      if (lastAPChange == 0)
005ac3c3                      {
005ac3d0                          esi_2->prev = nullptr;
005ac3d3                          this->firstAPChange = esi_2;
005ac3c3                      }
005ac3c3                      else
005ac3c3                      {
005ac3c5                          esi_2->prev = lastAPChange;
005ac3c8                          this->lastAPChange->next = esi_2;
005ac3c3                      }
005ac3c3                      
005ac3d6                      esi_2->next = nullptr;
005ac3dc                      int32_t eax_18 = (this->num_anim_part_changes + 1);
005ac3dd                      this->lastAPChange = esi_2;
005ac3e0                      this->num_anim_part_changes = eax_18;
005ac3b0                  }
005ac3b0                  else
005ac3b2                      esi_2->vtable->__vecDelDtor(1);
005ac381              }
005ac381              
005ac3ea              ebx_1 = ebx_1->next;
005ac3f0              arg2 = (&arg2->vtable + 1);
005ac3f4          } while ((&arg2->vtable + 1) < ebp->num_anim_part_changes);
005ac36d      }
005ac36d      
005ac400      return this;
005ac250  }

005ac403           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005ac410  void __thiscall ObjDesc::GetSubDataIDs(class ObjDesc const* this, class QualifiedDataIDArray* arg2)

005ac410  {
005ac435      void var_18;
005ac435      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, this->paletteID.id, 0), 0);
005ac435      
005ac43f      for (class Subpalette* i = this->firstSubpal; i != 0; i = i->next)
005ac455          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, i->subID.id, 0), 8);
005ac455      
005ac466      void var_10;
005ac466      
005ac466      for (class TextureMapChange* i_1 = this->firstTMChange; i_1 != 0; i_1 = i_1->next)
005ac466      {
005ac47c          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, i_1->old_tex_id.id, 0), 8);
005ac495          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, i_1->new_tex_id.id, 0), 8);
005ac466      }
005ac466      
005ac4a6      for (class AnimPartChange* i_2 = this->firstAPChange; i_2 != 0; i_2 = i_2->next)
005ac4bc          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, i_2->part_id.id, 0), 8);
005ac410  }

005ac4d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005ac4e0  void __thiscall ObjDesc::ObjDesc(class ObjDesc* this, class ObjDesc const* arg2)

005ac4e0  {
005ac4e3      VisualDesc::VisualDesc(this);
005ac4ec      this->vtable = 0x7e6028;
005ac4f5      this->paletteID.id = arg2->paletteID.id;
005ac4fd      __builtin_memset(&this->firstSubpal, 0, 0x24);
005ac518      ObjDesc::operator+=(this, arg2);
005ac4e0  }

005ac523           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005ac530  void __thiscall PalSet::PalSet(class PalSet* this, class IDClass<_tagDataID,32,0> arg2)

005ac530  {
005ac538      DBObj::DBObj(this, arg2);
005ac53d      this->vtable = &PackObj::`vftable';
005ac546      this->num_pals = 0;
005ac549      this->palette_IDs = nullptr;
005ac54c      this->vtable = 0x7e6058;
005ac552      this->vtable = &PalSet::`vftable';
005ac530  }

005ac55f                                                                                               90                                 .

005ac560  void* __thiscall PalSet::`vector deleting destructor'(class PalSet* this, uint32_t arg2)

005ac560  {
005ac563      /* tailcall */
005ac563      return PalSet::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005ac560  }

005ac568                          cc cc cc cc cc cc cc cc                                                          ........

005ac570  class IDClass<_tagDataID,32,0>* __thiscall PalSet::GetPaletteID(class PalSet const* this, class IDClass<_tagDataID,32,0>* __return, double arg3)

005ac570  {
005ac570      class PalSet* this_1 = this;
005ac570      
005ac577      if (this->num_pals != 0)
005ac577      {
005ac579          class IDClass<_tagDataID,32,0>* palette_IDs = this->palette_IDs;
005ac579          
005ac57e          if (palette_IDs != 0)
005ac57e          {
005ac584              (((long double)arg3) - ((long double)1.0));
005ac58c              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
005ac58c              
005ac58f              if (!(p_1))
005ac58f              {
005ac591                  long double x87_r7_2 = ((long double)arg3);
005ac595                  long double temp2_1 = ((long double)0.0);
005ac595                  (x87_r7_2 - temp2_1);
005ac595                  
005ac5a0                  if ((*(uint8_t*)((char*)((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) == 0)
005ac5a0                  {
005ac5ca                      __return->id = palette_IDs[_ftol2()].id;
005ac5ce                      return __return;
005ac5a0                  }
005ac58f              }
005ac57e          }
005ac577      }
005ac577      
005ac5db      __return->id = INVALID_DID.id;
005ac5df      return __return;
005ac570  }

005ac5e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005ac5f0  class IDClass<_tagDataID,32,0>* __thiscall PalSet::GetPaletteID_Integral(class PalSet const* this, class IDClass<_tagDataID,32,0>* __return, int32_t arg3)

005ac5f0  {
005ac5fb      if ((arg3 >= 0 && arg3 < this->num_pals))
005ac5fb      {
005ac5fd          class IDClass<_tagDataID,32,0>* palette_IDs = this->palette_IDs;
005ac5fd          
005ac602          if (palette_IDs != 0)
005ac602          {
005ac60b              __return->id = palette_IDs[arg3].id;
005ac60d              return __return;
005ac602          }
005ac5fb      }
005ac5fb      
005ac61a      __return->id = INVALID_DID.id;
005ac61c      return __return;
005ac5f0  }

005ac61f                                                                                               90                                 .

005ac620  class DBObj* PalSet::Allocate(class PalSet const* this @ ecx)

005ac620  {
005ac620      /* tailcall */
005ac620      return PalSet::Allocator();
005ac620  }

005ac625                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005ac630  uint32_t __thiscall PalSet::Pack(class PalSet* this, void** arg2, uint32_t arg3)

005ac630  {
005ac635      int32_t esi = this->m_bLoaded*(int32_t*)((char*)this + 8);
005ac635      
005ac641      if (arg3 >= ((esi << 2) + 4))
005ac641      {
005ac64b          **(uint32_t**)arg2 = esi;
005ac64f          void* esi_2 = (*(uint32_t*)arg2 + 4);
005ac652          *(uint32_t*)arg2 = esi_2;
005ac657          void* edi_2 = esi_2;
005ac659          int32_t i = 0;
005ac659          
005ac65d          if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
005ac65d          {
005ac675              do
005ac675              {
005ac666                  *(uint32_t*)edi_2 = *(uint32_t*)(*(int32_t*)((char*)this + 0xc) + (i << 2));
005ac66a                  edi_2 = (*(uint32_t*)arg2 + 4);
005ac66d                  *(uint32_t*)arg2 = edi_2;
005ac672                  i += 1;
005ac675              } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
005ac65d          }
005ac641      }
005ac641      
005ac67a      return ((esi << 2) + 4);
005ac630  }

005ac67d                                                                                         90 90 90                               ...

005ac680  int32_t __thiscall PalSet::UnPack(class PalSet* this, void** arg2, uint32_t arg3)

005ac680  {
005ac681      uint32_t ebp = arg3;
005ac68a      void** edi = arg2;
005ac68e      void* eax = *(uint32_t*)edi;
005ac694      arg2 = eax;
005ac694      
005ac698      if (ebp < 4)
005ac69f          return 0;
005ac69f      
005ac6a4      this->m_bLoaded*(int32_t*)((char*)this + 8) = *(uint32_t*)eax;
005ac6a8      *(uint32_t*)edi += 4;
005ac6a8      
005ac6b7      if (ebp < ((this->m_bLoaded*(int32_t*)((char*)this + 8) << 2) + 4))
005ac6b7      {
005ac6ba          *(uint32_t*)edi = eax;
005ac6c1          return 0;
005ac6b7      }
005ac6b7      
005ac6c4      void* eax_5 = *(int32_t*)((char*)this + 0xc);
005ac6c4      
005ac6c9      if (eax_5 != 0)
005ac6cf          operator delete[](((char*)eax_5 - 4));
005ac6cf      
005ac6d7      int32_t ebx = this->m_bLoaded*(int32_t*)((char*)this + 8);
005ac6dc      *(int32_t*)((char*)this + 0xc) = 0;
005ac6dc      
005ac6e3      if (ebx != 0)
005ac6e3      {
005ac6ed          void* eax_7 = operator new[](((ebx << 2) + 4));
005ac6f7          void* eax_8;
005ac6f7          
005ac6f7          if (eax_7 == 0)
005ac714              eax_8 = nullptr;
005ac6f7          else
005ac6f7          {
005ac705              *(uint32_t*)eax_7 = ebx;
005ac707              `vector constructor iterator'(((char*)eax_7 + 4), 4, ebx, Vector3::Vector3);
005ac70c              eax_8 = ((char*)eax_7 + 4);
005ac70e              ebp = arg3;
005ac6f7          }
005ac6f7          
005ac716          int32_t ecx_2 = this->m_bLoaded*(int32_t*)((char*)this + 8);
005ac719          *(int32_t*)((char*)this + 0xc) = eax_8;
005ac71c          int32_t i = 0;
005ac71c          
005ac720          if (ecx_2 > 0)
005ac720          {
005ac739              do
005ac739              {
005ac722                  void* ecx_3 = *(uint32_t*)edi;
005ac724                  int32_t ebx_1 = *(uint32_t*)ecx_3;
005ac72c                  int32_t* edx_2 = (*(int32_t*)((char*)this + 0xc) + (i << 2));
005ac72f                  *(uint32_t*)edi = ((char*)ecx_3 + 4);
005ac731                  *(uint32_t*)edx_2 = ebx_1;
005ac736                  i += 1;
005ac739              } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
005ac720          }
005ac6e3      }
005ac6e3      
005ac745      if (ebp >= (*(uint32_t*)edi - arg2))
005ac75b          return 1;
005ac75b      
005ac748      *(uint32_t*)edi = arg2;
005ac74f      return 0;
005ac680  }

005ac75e                                                                                            90 90                                ..

005ac760  void* __thiscall PalSet::`scalar deleting destructor'(class PalSet* this, uint32_t arg2)

005ac760  {
005ac763      class IDClass<_tagDataID,32,0>* palette_IDs = this->palette_IDs;
005ac768      this->vtable = 0x7e6058;
005ac76e      this->vtable = &PalSet::`vftable';
005ac76e      
005ac775      if (palette_IDs != 0)
005ac775      {
005ac77b          operator delete[](&palette_IDs[-1]);
005ac783          this->palette_IDs = nullptr;
005ac775      }
005ac775      
005ac78c      this->vtable = &PackObj::`vftable';
005ac793      DBObj::~DBObj(this);
005ac793      
005ac79d      if ((arg2 & 1) != 0)
005ac7a0          operator delete(this);
005ac7a0      
005ac7ab      return this;
005ac760  }

005ac7ae                                            90 90                                                                ..

005ac7b0  int32_t PublicWeenieDesc::IsTalkable(enum ITEM_TYPE const arg1) __pure

005ac7b0  {
005ac7b9      int32_t result;
005ac7b9      result = arg1 == TYPE_CREATURE;
005ac7bc      return result;
005ac7b0  }

005ac7bd                                                                                         90 90 90                               ...

005ac7c0  void __thiscall PublicWeenieDesc::SetPlayerKillerStatus(class PublicWeenieDesc* this, uint32_t arg2)

005ac7c0  {
005ac7c7      if (arg2 == 4)
005ac7c7      {
005ac7d4          this->_bitfield = ((this->_bitfield & 0xfddfffff) | 0x20);
005ac7d7          return;
005ac7c7      }
005ac7c7      
005ac7dd      if (arg2 == 0x40)
005ac7dd      {
005ac7ee          this->_bitfield = ((this->_bitfield & 0xffdfffdf) | 0x2000000);
005ac7f1          return;
005ac7dd      }
005ac7dd      
005ac7f7      if (arg2 == 0x20)
005ac7f7      {
005ac806          this->_bitfield = ((this->_bitfield & 0xfdffffdf) | 0x200000);
005ac809          return;
005ac7f7      }
005ac7f7      
005ac80c      this->_bitfield &= 0xfddfffdf;
005ac7c0  }

005ac816                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005ac820  void __thiscall PublicWeenieDesc::set_pack_header(class PublicWeenieDesc* this, uint32_t* arg2)

005ac820  {
005ac82b      if (this->_plural_name.m_buffer->m_len != 1)
005ac82d          *(uint32_t*)arg2 |= 1;
005ac82d      
005ac835      if (this->_valid_locations != 0)
005ac837          *(uint32_t*)arg2 |= 0x10000;
005ac837      
005ac842      if (this->_location != 0)
005ac844          *(uint32_t*)arg2 |= 0x20000;
005ac844      
005ac84f      if (this->_containerID != 0)
005ac851          *(uint32_t*)arg2 |= 0x4000;
005ac851      
005ac85c      if (this->_wielderID != 0)
005ac85e          *(uint32_t*)arg2 |= 0x8000;
005ac85e      
005ac869      if (this->_itemsCapacity != 0)
005ac86b          *(uint32_t*)arg2 |= 2;
005ac86b      
005ac873      if (this->_containersCapacity != 0)
005ac875          *(uint32_t*)arg2 |= 4;
005ac875      
005ac87d      if (this->_value != 0)
005ac87f          *(uint32_t*)arg2 |= 8;
005ac87f      
005ac887      if (this->_useability != USEABLE_UNDEF)
005ac889          *(uint32_t*)arg2 |= 0x10;
005ac889      
005ac88c      long double x87_r7 = ((long double)this->_useRadius);
005ac88f      long double temp1 = ((long double)0f);
005ac88f      (x87_r7 - temp1);
005ac895      enum ITEM_USEABLE eax_7;
005ac895      eax_7 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
005ac897      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
005ac897      
005ac89a      if (p)
005ac89c          *(uint32_t*)arg2 |= 0x20;
005ac89c      
005ac8a4      if (this->_targetType != TYPE_UNDEF)
005ac8a6          *(uint32_t*)arg2 |= 0x80000;
005ac8a6      
005ac8b1      if (this->_effects != 0)
005ac8b3          *(uint32_t*)arg2 |= 0x80;
005ac8b3      
005ac8be      if (this->_ammoType != AMMO_NONE)
005ac8c0          *(uint32_t*)arg2 |= 0x100;
005ac8c0      
005ac8cb      if (this->_combatUse != COMBAT_USE_NONE)
005ac8cd          *(uint32_t*)arg2 |= 0x200;
005ac8cd      
005ac8d8      if (this->_structure != 0)
005ac8da          *(uint32_t*)arg2 |= 0x400;
005ac8da      
005ac8e5      if (this->_maxStructure != 0)
005ac8e7          *(uint32_t*)arg2 |= 0x800;
005ac8e7      
005ac8f2      if (this->_stackSize != 0)
005ac8f4          *(uint32_t*)arg2 |= 0x1000;
005ac8f4      
005ac8ff      if (this->_maxStackSize != 0)
005ac901          *(uint32_t*)arg2 |= 0x2000;
005ac901      
005ac90c      if (this->_priority != 0)
005ac90e          *(uint32_t*)arg2 |= 0x40000;
005ac90e      
005ac919      if (this->_blipColor != 0)
005ac91b          *(uint32_t*)arg2 |= 0x100000;
005ac91b      
005ac926      if (this->_radar_enum != Undef_RadarEnum)
005ac928          *(uint32_t*)arg2 |= "activation type (%s) with '%s' b…";
005ac928      
005ac92e      long double x87_r7_1 = ((long double)this->_workmanship);
005ac934      long double temp2 = ((long double)0f);
005ac934      (x87_r7_1 - temp2);
005ac93a      enum RadarEnum eax_18;
005ac93a      eax_18 = ((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0))));
005ac93a      
005ac93f      if ((*(uint8_t*)((char*)eax_18)[1] & 0x41) == 0)
005ac941          *(uint32_t*)arg2 |= 0x1000000;
005ac941      
005ac94c      if (this->_burden > 0)
005ac94e          *(uint32_t*)arg2 |= 0x200000;
005ac94e      
005ac959      if (this->_spellID != 0)
005ac95b          *(uint32_t*)arg2 |= 0x400000;
005ac95b      
005ac966      if (this->_house_owner_iid != 0)
005ac968          *(uint32_t*)arg2 |= 0x2000000;
005ac968      
005ac976      if (this->_pscript != PS_Invalid)
005ac978          *(uint32_t*)arg2 |= 0x8000000;
005ac978      
005ac986      if (this->_db != 0)
005ac988          *(uint32_t*)arg2 |= 0x4000000;
005ac988      
005ac996      if (this->_hook_type != 0)
005ac998          *(uint32_t*)arg2 |= 0x10000000;
005ac998      
005ac9a6      if (this->_hook_item_types != TYPE_UNDEF)
005ac9a8          *(uint32_t*)arg2 |= 0x20000000;
005ac9a8      
005ac9b6      if (this->_monarch != 0)
005ac9b8          *(uint32_t*)arg2 |= 0x40;
005ac9b8      
005ac9c4      if (this->_iconOverlayID.id != INVALID_DID.id)
005ac9c6          *(uint32_t*)arg2 |= 0x40000000;
005ac9c6      
005ac9d4      if (this->_material_type != 0)
005ac9d6          *(uint32_t*)arg2 |= 0x80000000;
005ac820  }

005ac9df                                                                                               90                                 .

005ac9e0  void __fastcall PublicWeenieDesc::~PublicWeenieDesc(class PublicWeenieDesc* this)

005ac9e0  {
005ac9e3      class RestrictionDB* _db = this->_db;
005ac9ec      this->vtable = 0x7e60b8;
005ac9ec      
005ac9f2      if (_db != 0)
005ac9f2      {
005ac9f4          _db->vtable->__vecDelDtor(1);
005ac9fa          this->_db = nullptr;
005ac9f2      }
005ac9f2      
005aca04      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_plural_name.m_buffer;
005aca04      
005aca1a      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005aca1c          m_buffer->vtable->__vecDelDtor(1);
005aca1c      
005aca24      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_name.m_buffer;
005aca24      
005aca34      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005aca36          m_buffer_1->vtable->__vecDelDtor(1);
005aca36      
005aca42      /* tailcall */
005aca42      return SetPositionStruct::~SetPositionStruct(this);
005ac9e0  }

005aca47                       90 90 90 90 90 90 90 90 90                                                         .........

005aca50  void* __thiscall PublicWeenieDesc::`scalar deleting destructor'(class PublicWeenieDesc* this, uint32_t arg2)

005aca50  {
005aca53      PublicWeenieDesc::~PublicWeenieDesc(this);
005aca53      
005aca5d      if ((arg2 & 1) != 0)
005aca60          operator delete(this);
005aca60      
005aca6b      return this;
005aca50  }

005aca6e                                            90 90                                                                ..

005aca70  class PublicWeenieDesc& __thiscall PublicWeenieDesc::operator=(class PublicWeenieDesc* this, class PublicWeenieDesc const& arg2)

005aca70  {
005aca83      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->_name.m_buffer;
005aca83      
005aca88      if (m_buffer_2 != arg2->_name.m_buffer)
005aca88      {
005aca9a          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
005aca9c              m_buffer_2->vtable->__vecDelDtor(1);
005aca9c          
005acaa4          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
005acaa7          this->_name.m_buffer = m_buffer;
005acaae          InterlockedIncrement(&m_buffer->m_cRef);
005aca88      }
005aca88      
005acab0      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->_plural_name.m_buffer;
005acab0      
005acab6      if (m_buffer_3 != arg2->_plural_name.m_buffer)
005acab6      {
005acac8          if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
005acaca              m_buffer_3->vtable->__vecDelDtor(1);
005acaca          
005acad2          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->_plural_name.m_buffer;
005acad5          this->_plural_name.m_buffer = m_buffer_1;
005acadc          InterlockedIncrement(&m_buffer_1->m_cRef);
005acab6      }
005acab6      
005acae1      this->_wcid.id = arg2->_wcid.id;
005acae7      this->_iconID.id = arg2->_iconID.id;
005acaed      this->_iconOverlayID.id = arg2->_iconOverlayID.id;
005acaf3      this->_iconUnderlayID.id = arg2->_iconUnderlayID.id;
005acaf9      this->_itemsCapacity = arg2->_itemsCapacity;
005acaff      this->_containersCapacity = arg2->_containersCapacity;
005acb05      this->_type = arg2->_type;
005acb0b      this->_value = arg2->_value;
005acb11      this->_useability = arg2->_useability;
005acb17      this->_useRadius = ((float)((long double)arg2->_useRadius));
005acb1d      this->_targetType = arg2->_targetType;
005acb23      this->_effects = arg2->_effects;
005acb29      this->_ammoType = arg2->_ammoType;
005acb2f      this->_combatUse = arg2->_combatUse;
005acb35      this->_structure = arg2->_structure;
005acb3b      this->_maxStructure = arg2->_maxStructure;
005acb41      this->_stackSize = arg2->_stackSize;
005acb47      this->_maxStackSize = arg2->_maxStackSize;
005acb4d      this->_containerID = arg2->_containerID;
005acb53      this->_wielderID = arg2->_wielderID;
005acb59      this->_location = arg2->_location;
005acb5f      this->_valid_locations = arg2->_valid_locations;
005acb65      this->_priority = arg2->_priority;
005acb6b      this->_bitfield = arg2->_bitfield;
005acb71      this->_blipColor = arg2->_blipColor;
005acb77      this->_radar_enum = arg2->_radar_enum;
005acb80      this->_workmanship = ((float)((long double)arg2->_workmanship));
005acb89      this->_burden = arg2->_burden;
005acb8f      this->_spellID = arg2->_spellID;
005acb95      class RestrictionDB* _db_1 = this->_db;
005acb9d      this->_house_owner_iid = arg2->_house_owner_iid;
005acba6      this->_pscript = arg2->_pscript;
005acba6      
005acbac      if (_db_1 != 0)
005acbac      {
005acbae          class RestrictionDB* _db = arg2->_db;
005acbae          
005acbb6          if (_db != 0)
005acbcb              RestrictionDB::operator=(_db_1, _db);
005acbb6          else
005acbb6          {
005acbb8              _db_1->vtable->__vecDelDtor(1);
005acbbe              this->_db = nullptr;
005acbb6          }
005acbac      }
005acbac      else if (arg2->_db != 0)
005acbda      {
005acbe1          void* eax_21 = operator new(0x84);
005acbeb          class RestrictionDB* eax_22;
005acbeb          
005acbeb          if (eax_21 == 0)
005acbfd              eax_22 = nullptr;
005acbeb          else
005acbf6              eax_22 = RestrictionDB::RestrictionDB(eax_21, arg2->_db);
005acbf6          
005acbff          this->_db = eax_22;
005acbda      }
005acbda      
005acc0b      this->_hook_type = arg2->_hook_type;
005acc17      this->_hook_item_types = arg2->_hook_item_types;
005acc23      this->_monarch = arg2->_monarch;
005acc2f      this->_material_type = arg2->_material_type;
005acc3b      this->_cooldown_id = arg2->_cooldown_id;
005acc47      this->_cooldown_duration = ((double)((long double)arg2->_cooldown_duration));
005acc54      this->_pet_owner = arg2->_pet_owner;
005acc5f      return this;
005aca70  }

005acc62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005acc70  void __fastcall PublicWeenieDesc::Reset(class PublicWeenieDesc* this)

005acc70  {
005acc70      class PublicWeenieDesc* this_1 = this;
005acc80      AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, &data_7928af);
005acc85      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
005acc88      class PublicWeenieDesc* this_3 = this_1;
005acc88      
005acc90      if (m_buffer != this_3)
005acc90      {
005acca2          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005acca4              m_buffer->vtable->__vecDelDtor(1);
005acca4          
005accb0          this->_name.m_buffer = this_3;
005accb3          InterlockedIncrement(&this_3->_name);
005acc90      }
005acc90      
005accc9      if ((InterlockedDecrement(&this_3->_name) == 0 && this_3 != 0))
005acccb          this_3->vtable->__vecDelDtor(1);
005acccb      
005accdd      AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, &data_7928af);
005acce2      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_plural_name.m_buffer;
005acce5      class PublicWeenieDesc* this_2 = this_1;
005acce5      
005acceb      if (m_buffer_1 != this_2)
005acceb      {
005accfd          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005accff              m_buffer_1->vtable->__vecDelDtor(1);
005accff          
005acd0c          this->_plural_name.m_buffer = this_2;
005acd0f          InterlockedIncrement(&this_2->_name);
005acceb      }
005acceb      
005acd25      if ((InterlockedDecrement(&this_2->_name) == 0 && this_2 != 0))
005acd27          this_2->vtable->__vecDelDtor(1);
005acd27      
005acd34      this->_wcid.id = INVALID_DID.id;
005acd3d      this->_iconID.id = INVALID_DID.id;
005acd46      class RestrictionDB* _db = this->_db;
005acd4e      this->_iconOverlayID.id = INVALID_DID.id;
005acd56      this->_iconUnderlayID.id = INVALID_DID.id;
005acd83      __builtin_memset(&this->_containerID, 0, 0x64);
005acd9b      this->_workmanship = 0f;
005acdaa      this->_pscript = PS_Invalid;
005acdaa      
005acdb0      if (_db != 0)
005acdb0      {
005acdb2          _db->vtable->__vecDelDtor(1);
005acdb8          this->_db = nullptr;
005acdb0      }
005acdb0      
005acdbe      this->_hook_type = 0;
005acdc4      this->_hook_item_types = TYPE_UNDEF;
005acdca      this->_monarch = 0;
005acdd0      this->_material_type = 0;
005acdd6      this->_cooldown_id = 0;
005acddc      this->_cooldown_duration = 0f;
005acde2      *(uint32_t*)((char*)this->_cooldown_duration)[4] = 0;
005acde8      this->_pet_owner = 0;
005acc70  }

005acdf4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005ace00  uint32_t __fastcall PublicWeenieDesc::pack_size(class PublicWeenieDesc* this)

005ace00  {
005ace00      class PublicWeenieDesc* this_1 = this;
005ace0f      this_1 = nullptr;
005ace45      int32_t edi_2 = (((AC1Legacy::PStringBase<char>::Pack(&this->_name, &this_1, 0) + Pack_AsDataIDOfKnownType(0x6000000, this->_iconID.id, &this_1, 0)) + Pack_AsWClassIDCompressed(this->_wcid.id, &this_1, 0)) + 0xc);
005ace4e      int32_t eax_4 = (edi_2 & 3);
005ace51      int32_t ecx_2;
005ace51      
005ace51      if (eax_4 == 0)
005ace5c          ecx_2 = 0;
005ace51      else
005ace58          ecx_2 = (4 - eax_4);
005ace58      
005ace61      int32_t result = (edi_2 + ecx_2);
005ace61      
005ace68      if ((this->_bitfield & 0x4000000) != 0)
005ace6a          result += 4;
005ace6a      
005ace77      if (this->_plural_name.m_buffer->m_len != 1)
005ace85          result += AC1Legacy::PStringBase<char>::Pack(&this->_plural_name, &this_1, 0);
005ace85      
005ace8c      if (this->_itemsCapacity != 0)
005ace8e          result += 1;
005ace8e      
005ace94      if (this->_containersCapacity != 0)
005ace96          result += 1;
005ace96      
005ace9c      if (this->_ammoType != AMMO_NONE)
005ace9e          result += 2;
005ace9e      
005acea6      if (this->_value != 0)
005acea8          result += 4;
005acea8      
005aceb0      if (this->_useability != USEABLE_UNDEF)
005aceb2          result += 4;
005aceb2      
005aceb5      long double x87_r7 = ((long double)this->_useRadius);
005aceb8      long double temp0 = ((long double)0f);
005aceb8      (x87_r7 - temp0);
005acebe      enum ITEM_USEABLE eax_11;
005acebe      eax_11 = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
005acec0      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
005acec0      
005acec3      if (p)
005acec5          result += 4;
005acec5      
005acecd      if (this->_targetType != TYPE_UNDEF)
005acecf          result += 4;
005acecf      
005aced7      if (this->_effects != 0)
005aced9          result += 4;
005aced9      
005acee1      if (this->_combatUse != COMBAT_USE_NONE)
005acee3          result += 1;
005acee3      
005acee9      if (this->_structure != 0)
005aceeb          result += 2;
005aceeb      
005acef3      if (this->_maxStructure != 0)
005acef5          result += 2;
005acef5      
005acefd      if (this->_stackSize != 0)
005aceff          result += 2;
005aceff      
005acf07      if (this->_maxStackSize != 0)
005acf09          result += 2;
005acf09      
005acf11      if (this->_containerID != 0)
005acf13          result += 4;
005acf13      
005acf1b      if (this->_wielderID != 0)
005acf1d          result += 4;
005acf1d      
005acf25      if (this->_valid_locations != 0)
005acf27          result += 4;
005acf27      
005acf2f      if (this->_location != 0)
005acf31          result += 4;
005acf31      
005acf39      if (this->_priority != 0)
005acf3b          result += 4;
005acf3b      
005acf43      if (this->_blipColor != 0)
005acf45          result += 1;
005acf45      
005acf4b      if (this->_radar_enum != Undef_RadarEnum)
005acf4d          result += 1;
005acf4d      
005acf56      if (this->_pscript != PS_Invalid)
005acf58          result += 2;
005acf58      
005acf5b      long double x87_r7_1 = ((long double)this->_workmanship);
005acf61      long double temp1 = ((long double)0f);
005acf61      (x87_r7_1 - temp1);
005acf67      enum PScriptType eax_26;
005acf67      eax_26 = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
005acf67      
005acf6c      if ((*(uint8_t*)((char*)eax_26)[1] & 0x41) == 0)
005acf6e          result += 4;
005acf6e      
005acf76      if (this->_burden > 0)
005acf78          result += 2;
005acf78      
005acf80      if (this->_spellID != 0)
005acf82          result += 2;
005acf82      
005acf8a      if (this->_house_owner_iid != 0)
005acf8c          result += 4;
005acf8c      
005acf8f      class RestrictionDB* _db = this->_db;
005acf8f      
005acf97      if (_db != 0)
005acfa5          result += _db->vtable->Pack(&this_1, 0);
005acfa5      
005acfaf      if (this->_hook_item_types != TYPE_UNDEF)
005acfb1          result += 4;
005acfb1      
005acfbc      if (this->_monarch != 0)
005acfbe          result += 4;
005acfbe      
005acfc9      if (this->_hook_type != 0)
005acfcb          result += 2;
005acfcb      
005acfce      uint32_t id_1 = this->_iconOverlayID.id;
005acfce      
005acfd7      if (id_1 != INVALID_DID.id)
005acff0          result += Pack_AsDataIDOfKnownType(0x6000000, id_1, &this_1, 0);
005acff0      
005acff8      uint32_t id = this->_iconUnderlayID.id;
005acff8      
005acffd      if (id != INVALID_DID.id)
005ad014          result += Pack_AsDataIDOfKnownType(0x6000000, id, &this_1, 0);
005ad014      
005ad01e      if (this->_material_type != 0)
005ad020          result += 4;
005ad020      
005ad02b      if (this->_cooldown_id != 0)
005ad02d          result += 4;
005ad02d      
005ad030      long double x87_r7_2 = ((long double)this->_cooldown_duration);
005ad036      long double temp2 = ((long double)0.0);
005ad036      (x87_r7_2 - temp2);
005ad03c      int32_t eax_38;
005ad03c      eax_38 = ((((x87_r7_2 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2) ? 1 : 0) << 0xe) | 0))));
005ad03e      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005ad03e      
005ad041      if (p_1)
005ad043          result += 8;
005ad043      
005ad04e      if (this->_pet_owner != 0)
005ad050          result += 4;
005ad050      
005ad055      int32_t ecx_6 = (result & 3);
005ad055      
005ad058      if (ecx_6 == 0)
005ad06e          return result;
005ad06e      
005ad066      return ((4 - ecx_6) + result);
005ace00  }

005ad06f                                               90                                                                 .

005ad070  uint32_t __thiscall PublicWeenieDesc::Pack(class PublicWeenieDesc* this, void** arg2, uint32_t arg3)

005ad070  {
005ad085      uint32_t var_8 = 0;
005ad085      
005ad089      if (this->_iconUnderlayID.id != INVALID_DID.id)
005ad08b          var_8 = 1;
005ad08b      
005ad099      if (this->_cooldown_id != 0)
005ad09b          var_8 |= 2;
005ad09b      
005ad0a0      long double x87_r7 = ((long double)this->_cooldown_duration);
005ad0a6      long double temp1 = ((long double)0.0);
005ad0a6      (x87_r7 - temp1);
005ad0ac      uint32_t eax;
005ad0ac      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
005ad0ae      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
005ad0ae      
005ad0b1      if (p)
005ad0b3          var_8 |= 4;
005ad0b3      
005ad0be      if (this->_pet_owner != 0)
005ad0c0          var_8 |= 8;
005ad0c0      
005ad0c9      uint32_t _bitfield = this->_bitfield;
005ad0cc      uint32_t eax_1;
005ad0cc      
005ad0cc      if (var_8 == 0)
005ad0d5          eax_1 = (_bitfield & 0xfbffffff);
005ad0cc      else
005ad0ce          eax_1 = (_bitfield | 0x4000000);
005ad0ce      
005ad0da      struct PublicWeenieDesc::VTable* vtable = this->vtable;
005ad0de      this->_bitfield = eax_1;
005ad0e1      int32_t result = vtable->pack_size();
005ad0e4      uint32_t ebp = arg3;
005ad0e4      
005ad0ee      if (ebp < result)
005ad41a          return result;
005ad41a      
005ad0fc      arg3 = 0;
005ad100      PublicWeenieDesc::set_pack_header(this, &arg3);
005ad105      uint32_t** esi_1 = arg2;
005ad10b      uint32_t ebx_1 = arg3;
005ad10f      **(uint32_t**)esi_1 = ebx_1;
005ad11b      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad11d      AC1Legacy::PStringBase<char>::Pack(&this->_name, esi_1, ebp);
005ad128      Pack_AsWClassIDCompressed(this->_wcid.id, esi_1, ebp);
005ad138      Pack_AsDataIDOfKnownType(0x6000000, this->_iconID.id, esi_1, ebp);
005ad142      **(uint32_t**)esi_1 = this->_type;
005ad146      void* ecx_7 = &*(uint32_t*)esi_1[1];
005ad149      *(uint32_t*)esi_1 = ecx_7;
005ad150      *(uint32_t*)ecx_7 = this->_bitfield;
005ad158      *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad15a      uint32_t* ecx_9;
005ad15a      uint32_t* edx_4;
005ad15a      ecx_9 = PackObj::ALIGN_PTR(esi_1);
005ad15a      
005ad16a      if ((this->_bitfield & 0x4000000) != 0)
005ad16a      {
005ad172          **(uint32_t**)esi_1 = var_8;
005ad174          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad16a      }
005ad16a      
005ad17a      uint32_t eax_6;
005ad17a      
005ad17a      if ((ebx_1 & 1) != 0)
005ad181          eax_6 = AC1Legacy::PStringBase<char>::Pack(&this->_plural_name, esi_1, ebp);
005ad181      
005ad189      if ((ebx_1 & 2) != 0)
005ad189      {
005ad18d          edx_4 = this->_itemsCapacity;
005ad190          **(uint8_t**)esi_1 = edx_4;
005ad192          *(uint32_t*)esi_1 += 1;
005ad189      }
005ad189      
005ad197      if ((ebx_1 & 4) != 0)
005ad197      {
005ad19b          ecx_9 = this->_containersCapacity;
005ad19e          **(uint8_t**)esi_1 = ecx_9;
005ad1a0          *(uint32_t*)esi_1 += 1;
005ad197      }
005ad197      
005ad1a5      if ((*(uint8_t*)((char*)ebx_1)[1] & 1) != 0)
005ad1a5      {
005ad1a7          eax_6 = this->_ammoType;
005ad1ad          **(uint16_t**)esi_1 = eax_6;
005ad1b0          *(uint32_t*)esi_1 += 2;
005ad1a5      }
005ad1a5      
005ad1b6      if ((ebx_1 & 8) != 0)
005ad1b6      {
005ad1bd          **(uint32_t**)esi_1 = this->_value;
005ad1bf          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad1b6      }
005ad1b6      
005ad1c5      if ((ebx_1 & 0x10) != 0)
005ad1c5      {
005ad1cc          **(uint32_t**)esi_1 = this->_useability;
005ad1ce          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad1c5      }
005ad1c5      
005ad1d4      if ((ebx_1 & 0x20) != 0)
005ad1d4      {
005ad1db          **(uint32_t**)esi_1 = ((float)((long double)this->_useRadius));
005ad1dd          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad1d4      }
005ad1d4      
005ad1e6      if ((ebx_1 & 0x80000) != 0)
005ad1e6      {
005ad1ed          **(uint32_t**)esi_1 = this->_targetType;
005ad1ef          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad1e6      }
005ad1e6      
005ad1f4      if (ebx_1 < 0)
005ad1f4      {
005ad1fb          **(uint32_t**)esi_1 = this->_effects;
005ad1fd          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad1f4      }
005ad1f4      
005ad203      if ((*(uint8_t*)((char*)ebx_1)[1] & 2) != 0)
005ad203      {
005ad207          edx_4 = this->_combatUse;
005ad20a          **(uint8_t**)esi_1 = edx_4;
005ad20c          *(uint32_t*)esi_1 += 1;
005ad203      }
005ad203      
005ad211      if ((*(uint8_t*)((char*)ebx_1)[1] & 4) != 0)
005ad211      {
005ad215          ecx_9 = this->_structure;
005ad219          **(uint16_t**)esi_1 = ecx_9;
005ad21c          *(uint32_t*)esi_1 += 2;
005ad211      }
005ad211      
005ad222      if ((*(uint8_t*)((char*)ebx_1)[1] & 8) != 0)
005ad222      {
005ad224          eax_6 = this->_maxStructure;
005ad22a          **(uint16_t**)esi_1 = eax_6;
005ad22d          *(uint32_t*)esi_1 += 2;
005ad222      }
005ad222      
005ad233      if ((*(uint8_t*)((char*)ebx_1)[1] & 0x10) != 0)
005ad233      {
005ad237          edx_4 = this->_stackSize;
005ad23b          **(uint16_t**)esi_1 = edx_4;
005ad23e          *(uint32_t*)esi_1 += 2;
005ad233      }
005ad233      
005ad244      if ((*(uint8_t*)((char*)ebx_1)[1] & 0x20) != 0)
005ad244      {
005ad248          ecx_9 = this->_maxStackSize;
005ad24c          **(uint16_t**)esi_1 = ecx_9;
005ad24f          *(uint32_t*)esi_1 += 2;
005ad244      }
005ad244      
005ad255      if ((*(uint8_t*)((char*)ebx_1)[1] & 0x40) != 0)
005ad255      {
005ad25c          **(uint32_t**)esi_1 = this->_containerID;
005ad25e          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad255      }
005ad255      
005ad263      if (*(uint8_t*)((char*)ebx_1)[1] < 0)
005ad263      {
005ad26a          **(uint32_t**)esi_1 = this->_wielderID;
005ad26c          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad263      }
005ad263      
005ad275      if ((ebx_1 & 0x10000) != 0)
005ad275      {
005ad27c          **(uint32_t**)esi_1 = this->_valid_locations;
005ad27e          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad275      }
005ad275      
005ad287      if ((ebx_1 & 0x20000) != 0)
005ad287      {
005ad28e          **(uint32_t**)esi_1 = this->_location;
005ad290          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad287      }
005ad287      
005ad299      if ((ebx_1 & 0x40000) != 0)
005ad299      {
005ad2a0          **(uint32_t**)esi_1 = this->_priority;
005ad2a2          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad299      }
005ad299      
005ad2ab      if ((ebx_1 & 0x100000) != 0)
005ad2ab      {
005ad2af          ecx_9 = this->_blipColor;
005ad2b2          **(uint8_t**)esi_1 = ecx_9;
005ad2b4          *(uint32_t*)esi_1 += 1;
005ad2ab      }
005ad2ab      
005ad2bc      if ((ebx_1 & "activation type (%s) with '%s' b…") != 0)
005ad2bc      {
005ad2be          eax_6 = this->_radar_enum;
005ad2c3          **(uint8_t**)esi_1 = eax_6;
005ad2c5          *(uint32_t*)esi_1 += 1;
005ad2bc      }
005ad2bc      
005ad2cd      if ((ebx_1 & 0x8000000) != 0)
005ad2cd      {
005ad2d1          edx_4 = this->_pscript;
005ad2d8          **(uint16_t**)esi_1 = edx_4;
005ad2db          *(uint32_t*)esi_1 += 2;
005ad2cd      }
005ad2cd      
005ad2e4      if ((ebx_1 & 0x1000000) != 0)
005ad2e4      {
005ad2ee          **(uint32_t**)esi_1 = ((float)((long double)this->_workmanship));
005ad2f0          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad2e4      }
005ad2e4      
005ad2f9      if ((ebx_1 & 0x200000) != 0)
005ad2f9      {
005ad2fd          edx_4 = this->_burden;
005ad301          **(uint16_t**)esi_1 = edx_4;
005ad304          *(uint32_t*)esi_1 += 2;
005ad2f9      }
005ad2f9      
005ad30d      if ((ebx_1 & 0x400000) != 0)
005ad30d      {
005ad311          ecx_9 = this->_spellID;
005ad315          **(uint16_t**)esi_1 = ecx_9;
005ad318          *(uint32_t*)esi_1 += 2;
005ad30d      }
005ad30d      
005ad321      if ((ebx_1 & 0x2000000) != 0)
005ad321      {
005ad328          **(uint32_t**)esi_1 = this->_house_owner_iid;
005ad32a          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad321      }
005ad321      
005ad333      if ((ebx_1 & 0x4000000) != 0)
005ad33f          eax_6 = this->_db->vtable->Pack(esi_1, ebp);
005ad33f      
005ad348      if ((ebx_1 & 0x20000000) != 0)
005ad348      {
005ad352          **(uint32_t**)esi_1 = this->_hook_item_types;
005ad354          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad348      }
005ad348      
005ad35a      if ((ebx_1 & 0x40) != 0)
005ad35a      {
005ad364          **(uint32_t**)esi_1 = this->_monarch;
005ad366          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad35a      }
005ad35a      
005ad36f      if ((ebx_1 & 0x10000000) != 0)
005ad36f      {
005ad373          edx_4 = this->_hook_type;
005ad37a          **(uint16_t**)esi_1 = edx_4;
005ad37d          *(uint32_t*)esi_1 += 2;
005ad36f      }
005ad36f      
005ad386      if ((ebx_1 & 0x40000000) != 0)
005ad393          Pack_AsDataIDOfKnownType(0x6000000, this->_iconOverlayID.id, esi_1, ebp);
005ad393      
005ad3a0      if ((var_8 & 1) != 0)
005ad3ad          Pack_AsDataIDOfKnownType(0x6000000, this->_iconUnderlayID.id, esi_1, ebp);
005ad3ad      
005ad3b8      if (ebx_1 < 0)
005ad3b8      {
005ad3c2          **(uint32_t**)esi_1 = this->_material_type;
005ad3c4          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad3b8      }
005ad3b8      
005ad3c7      eax_6 = var_8;
005ad3c7      
005ad3cd      if ((eax_6 & 2) != 0)
005ad3cd      {
005ad3d7          **(uint32_t**)esi_1 = this->_cooldown_id;
005ad3d9          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad3cd      }
005ad3cd      
005ad3de      if ((eax_6 & 4) != 0)
005ad3de      {
005ad3e6          uint32_t* ecx_16 = *(uint32_t*)esi_1;
005ad3e8          *(uint32_t*)ecx_16 = this->_cooldown_duration;
005ad3f0          ecx_16[1] = *(uint32_t*)((char*)this->_cooldown_duration)[4];
005ad3f3          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[2];
005ad3de      }
005ad3de      
005ad3f8      if ((eax_6 & 8) != 0)
005ad3f8      {
005ad402          **(uint32_t**)esi_1 = this->_pet_owner;
005ad404          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005ad3f8      }
005ad3f8      
005ad408      PackObj::ALIGN_PTR(esi_1);
005ad40d      return result;
005ad070  }

005ad41d                                                                                         90 90 90                               ...

005ad420  void __fastcall PublicWeenieDesc::PublicWeenieDesc(class PublicWeenieDesc* this)

005ad420  {
005ad424      VisualDesc::VisualDesc(this);
005ad42f      this->vtable = 0x7e60b8;
005ad435      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005ad440      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005ad443      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005ad445      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005ad451      this->_plural_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005ad454      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005ad458      this->_db = nullptr;
005ad462      PublicWeenieDesc::Reset(this);
005ad420  }

005ad46c                                      90 90 90 90                                                              ....

005ad470  int32_t __thiscall PublicWeenieDesc::UnPack(class PublicWeenieDesc* this, void** arg2, uint32_t arg3)

005ad470  {
005ad470      class PublicWeenieDesc* this_1 = this;
005ad474      void** esi = arg2;
005ad478      void* eax = *(uint32_t*)esi;
005ad481      PublicWeenieDesc::Reset(this);
005ad493      arg2 = nullptr;
005ad493      
005ad4a5      if (arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->_name, &arg2, 0) + 0x10))
005ad4a5      {
005ad4ab          void* eax_3 = *(uint32_t*)esi;
005ad4ae          arg2 = nullptr;
005ad4b2          int32_t ebx_1 = *(uint32_t*)eax_3;
005ad4ba          *(uint32_t*)esi = ((char*)eax_3 + 4);
005ad4bc          AC1Legacy::PStringBase<char>::UnPack(&this->_name, esi, arg3);
005ad4c6          Unpack_AsWClassIDCompressed(&this->_wcid, esi);
005ad4d5          Unpack_AsDataIDOfKnownType(0x6000000, &this->_iconID, esi);
005ad4de          this->_type = **(uint32_t**)esi;
005ad4e3          void* eax_7 = (*(uint32_t*)esi + 4);
005ad4e6          *(uint32_t*)esi = eax_7;
005ad4ea          this->_bitfield = *(uint32_t*)eax_7;
005ad4f3          *(uint32_t*)esi += 4;
005ad4f5          PackObj::ALIGN_PTR(esi);
005ad4f5          
005ad505          if ((this->_bitfield & 0x4000000) != 0)
005ad505          {
005ad507              void* eax_10 = *(uint32_t*)esi;
005ad50e              arg2 = *(uint32_t*)eax_10;
005ad512              *(uint32_t*)esi = ((char*)eax_10 + 4);
005ad505          }
005ad505          
005ad51b          if ((ebx_1 & 1) != 0)
005ad522              AC1Legacy::PStringBase<char>::UnPack(&this->_plural_name.m_buffer, esi, arg3);
005ad522          
005ad52a          void** ecx_4;
005ad52a          
005ad52a          if ((ebx_1 & 2) != 0)
005ad52a          {
005ad52c              void* eax_11 = *(uint32_t*)esi;
005ad52e              ecx_4 = *(uint8_t*)eax_11;
005ad534              *(uint32_t*)esi = ((char*)eax_11 + 1);
005ad536              this->_itemsCapacity = ((int32_t)ecx_4);
005ad52a          }
005ad52a          
005ad53c          if ((ebx_1 & 4) != 0)
005ad53c          {
005ad53e              void* eax_12 = *(uint32_t*)esi;
005ad540              ecx_4 = *(uint8_t*)eax_12;
005ad543              *(uint32_t*)esi = ((char*)eax_12 + 1);
005ad548              this->_containersCapacity = ((int32_t)ecx_4);
005ad53c          }
005ad53c          
005ad54e          if ((*(uint8_t*)((char*)ebx_1)[1] & 1) != 0)
005ad54e          {
005ad550              void* eax_14 = *(uint32_t*)esi;
005ad552              ecx_4 = *(uint16_t*)eax_14;
005ad55b              *(uint32_t*)esi = ((char*)eax_14 + 2);
005ad55d              this->_ammoType = ((uint32_t)ecx_4);
005ad54e          }
005ad54e          
005ad563          if ((ebx_1 & 8) != 0)
005ad563          {
005ad569              this->_value = **(uint32_t**)esi;
005ad56c              *(uint32_t*)esi += 4;
005ad563          }
005ad563          
005ad572          if ((ebx_1 & 0x10) != 0)
005ad572          {
005ad578              this->_useability = **(uint32_t**)esi;
005ad57b              *(uint32_t*)esi += 4;
005ad572          }
005ad572          
005ad581          if ((ebx_1 & 0x20) != 0)
005ad581          {
005ad587              this->_useRadius = **(uint32_t**)esi;
005ad58a              *(uint32_t*)esi += 4;
005ad581          }
005ad581          
005ad593          if ((ebx_1 & 0x80000) != 0)
005ad593          {
005ad599              this->_targetType = **(uint32_t**)esi;
005ad59c              *(uint32_t*)esi += 4;
005ad593          }
005ad593          
005ad5a1          if (ebx_1 < 0)
005ad5a1          {
005ad5a7              this->_effects = **(uint32_t**)esi;
005ad5aa              *(uint32_t*)esi += 4;
005ad5a1          }
005ad5a1          
005ad5b0          if ((*(uint8_t*)((char*)ebx_1)[1] & 2) != 0)
005ad5b0          {
005ad5b2              void* eax_15 = *(uint32_t*)esi;
005ad5b4              ecx_4 = *(uint8_t*)eax_15;
005ad5b7              *(uint32_t*)esi = ((char*)eax_15 + 1);
005ad5bc              this->_combatUse = ((uint32_t)ecx_4);
005ad5b0          }
005ad5b0          
005ad5c2          if ((*(uint8_t*)((char*)ebx_1)[1] & 4) != 0)
005ad5c2          {
005ad5c4              void* eax_17 = *(uint32_t*)esi;
005ad5c6              ecx_4 = *(uint16_t*)eax_17;
005ad5cf              *(uint32_t*)esi = ((char*)eax_17 + 2);
005ad5d1              this->_structure = ((uint32_t)ecx_4);
005ad5c2          }
005ad5c2          
005ad5d7          if ((*(uint8_t*)((char*)ebx_1)[1] & 8) != 0)
005ad5d7          {
005ad5d9              void* eax_18 = *(uint32_t*)esi;
005ad5db              ecx_4 = *(uint16_t*)eax_18;
005ad5e4              *(uint32_t*)esi = ((char*)eax_18 + 2);
005ad5e6              this->_maxStructure = ((uint32_t)ecx_4);
005ad5d7          }
005ad5d7          
005ad5ec          if ((*(uint8_t*)((char*)ebx_1)[1] & 0x10) != 0)
005ad5ec          {
005ad5ee              void* eax_19 = *(uint32_t*)esi;
005ad5f0              ecx_4 = *(uint16_t*)eax_19;
005ad5f6              *(uint32_t*)esi = ((char*)eax_19 + 2);
005ad5fb              this->_stackSize = ((uint32_t)ecx_4);
005ad5ec          }
005ad5ec          
005ad601          if ((*(uint8_t*)((char*)ebx_1)[1] & 0x20) != 0)
005ad601          {
005ad603              void* eax_21 = *(uint32_t*)esi;
005ad605              ecx_4 = *(uint16_t*)eax_21;
005ad60e              *(uint32_t*)esi = ((char*)eax_21 + 2);
005ad610              this->_maxStackSize = ((uint32_t)ecx_4);
005ad601          }
005ad601          
005ad616          if ((*(uint8_t*)((char*)ebx_1)[1] & 0x40) != 0)
005ad616          {
005ad61c              this->_containerID = **(uint32_t**)esi;
005ad61f              *(uint32_t*)esi += 4;
005ad616          }
005ad616          
005ad624          if (*(uint8_t*)((char*)ebx_1)[1] < 0)
005ad624          {
005ad62a              this->_wielderID = **(uint32_t**)esi;
005ad62d              *(uint32_t*)esi += 4;
005ad624          }
005ad624          
005ad636          if ((ebx_1 & 0x10000) != 0)
005ad636          {
005ad63c              this->_valid_locations = **(uint32_t**)esi;
005ad63f              *(uint32_t*)esi += 4;
005ad636          }
005ad636          
005ad648          if ((ebx_1 & 0x20000) != 0)
005ad648          {
005ad64e              this->_location = **(uint32_t**)esi;
005ad651              *(uint32_t*)esi += 4;
005ad648          }
005ad648          
005ad65a          if ((ebx_1 & 0x40000) != 0)
005ad65a          {
005ad660              this->_priority = **(uint32_t**)esi;
005ad663              *(uint32_t*)esi += 4;
005ad65a          }
005ad65a          
005ad66c          if ((ebx_1 & 0x100000) != 0)
005ad66c          {
005ad66e              char* eax_22 = *(uint32_t*)esi;
005ad670              ecx_4 = *(uint8_t*)eax_22;
005ad673              *(uint32_t*)esi = &eax_22[1];
005ad678              this->_blipColor = ((uint32_t)ecx_4);
005ad66c          }
005ad66c          
005ad681          if ((ebx_1 & "activation type (%s) with '%s' b…") != 0)
005ad681          {
005ad683              char* eax_24 = *(uint32_t*)esi;
005ad685              ecx_4 = *(uint8_t*)eax_24;
005ad68b              *(uint32_t*)esi = &eax_24[1];
005ad68d              this->_radar_enum = ((uint32_t)ecx_4);
005ad681          }
005ad681          
005ad696          if ((ebx_1 & 0x8000000) != 0)
005ad696          {
005ad698              int16_t* eax_25 = *(uint32_t*)esi;
005ad69a              ecx_4 = *(uint16_t*)eax_25;
005ad6a3              *(uint32_t*)esi = &eax_25[1];
005ad6a5              this->_pscript = ((uint32_t)ecx_4);
005ad696          }
005ad696          
005ad6b1          if ((ebx_1 & 0x1000000) != 0)
005ad6b1          {
005ad6b7              this->_workmanship = **(uint32_t**)esi;
005ad6bd              *(uint32_t*)esi += 4;
005ad6b1          }
005ad6b1          
005ad6c6          if ((ebx_1 & 0x200000) != 0)
005ad6c6          {
005ad6c8              int16_t* eax_26 = *(uint32_t*)esi;
005ad6ca              ecx_4 = *(uint16_t*)eax_26;
005ad6d3              *(uint32_t*)esi = &eax_26[1];
005ad6d5              this->_burden = ((uint32_t)ecx_4);
005ad6c6          }
005ad6c6          
005ad6de          if ((ebx_1 & 0x400000) != 0)
005ad6de          {
005ad6e0              int16_t* eax_27 = *(uint32_t*)esi;
005ad6e2              ecx_4 = *(uint16_t*)eax_27;
005ad6e8              *(uint32_t*)esi = &eax_27[1];
005ad6ed              this->_spellID = ((uint32_t)ecx_4);
005ad6de          }
005ad6de          
005ad6f6          if ((ebx_1 & 0x2000000) != 0)
005ad6f6          {
005ad6fc              this->_house_owner_iid = **(uint32_t**)esi;
005ad6ff              *(uint32_t*)esi += 4;
005ad6f6          }
005ad6f6          
005ad708          uint32_t eax_9;
005ad708          
005ad708          if ((ebx_1 & 0x4000000) != 0)
005ad708          {
005ad70f              void* eax_29 = operator new(0x84);
005ad719              class RestrictionDB* eax_30;
005ad719              
005ad719              if (eax_29 == 0)
005ad724                  eax_30 = nullptr;
005ad719              else
005ad71d                  eax_30 = RestrictionDB::RestrictionDB(eax_29);
005ad71d              
005ad727              this->_db = eax_30;
005ad732              eax_9 = eax_30->vtable->UnPack(esi, arg3);
005ad708          }
005ad708          
005ad73b          if ((ebx_1 & 0x20000000) != 0)
005ad73b          {
005ad741              this->_hook_item_types = **(uint32_t**)esi;
005ad747              *(uint32_t*)esi += 4;
005ad73b          }
005ad73b          
005ad74d          if ((ebx_1 & 0x40) != 0)
005ad74d          {
005ad753              this->_monarch = **(uint32_t**)esi;
005ad759              *(uint32_t*)esi += 4;
005ad74d          }
005ad74d          
005ad762          if ((ebx_1 & 0x10000000) != 0)
005ad762          {
005ad764              int16_t* eax_31 = *(uint32_t*)esi;
005ad766              ecx_4 = *(uint16_t*)eax_31;
005ad76f              *(uint32_t*)esi = &eax_31[1];
005ad771              this->_hook_type = ((uint32_t)ecx_4);
005ad762          }
005ad762          
005ad77d          if ((ebx_1 & 0x40000000) != 0)
005ad789              Unpack_AsDataIDOfKnownType(0x6000000, &this->_iconOverlayID, esi);
005ad789          
005ad796          if ((arg2 & 1) != 0)
005ad7a2              Unpack_AsDataIDOfKnownType(0x6000000, &this->_iconUnderlayID, esi);
005ad7a2          
005ad7ac          if (ebx_1 < 0)
005ad7ac          {
005ad7b2              this->_material_type = **(uint32_t**)esi;
005ad7b8              *(uint32_t*)esi += 4;
005ad7ac          }
005ad7ac          
005ad7bb          eax_9 = arg2;
005ad7bb          
005ad7c1          if ((eax_9 & 2) != 0)
005ad7c1          {
005ad7c7              this->_cooldown_id = **(uint32_t**)esi;
005ad7cd              *(uint32_t*)esi += 4;
005ad7c1          }
005ad7c1          
005ad7d2          if ((eax_9 & 4) != 0)
005ad7d2          {
005ad7d4              void* ecx_10 = *(uint32_t*)esi;
005ad7d8              this->_cooldown_duration = *(uint32_t*)ecx_10;
005ad7e1              *(uint32_t*)((char*)this->_cooldown_duration)[4] = *(uint32_t*)((char*)ecx_10 + 4);
005ad7e7              *(uint32_t*)esi += 8;
005ad7d2          }
005ad7d2          
005ad7ec          if ((eax_9 & 8) != 0)
005ad7ec          {
005ad7f2              this->_pet_owner = **(uint32_t**)esi;
005ad7f8              *(uint32_t*)esi += 4;
005ad7ec          }
005ad7ec          
005ad7fc          PackObj::ALIGN_PTR(esi);
005ad7fc          
005ad80e          if (arg3 >= (*(uint32_t*)esi - eax))
005ad826              return 1;
005ad826          
005ad810          *(uint32_t*)esi = eax;
005ad4a5      }
005ad4a5      
005ad819      return 0;
005ad470  }

005ad829                             90 90 90 90 90 90 90                                                           .......

005ad830  int32_t __thiscall Subpalette::replaces(class Subpalette const* this, class Subpalette const* arg2)

005ad830  {
005ad834      uint32_t offset = this->offset;
005ad834      
005ad850      if (((offset != arg2->offset || this->numcolors != arg2->numcolors) && (offset != 0 || this->numcolors != 0x800)))
005ad85e          return 0;
005ad85e      
005ad858      return 1;
005ad830  }

005ad861     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005ad870  int32_t __thiscall Subpalette::supercedes(class Subpalette const* this, class Subpalette const* arg2)

005ad870  {
005ad891      if ((this->offset == 0 && (this->numcolors == 0x800 && (arg2->offset != 0 || arg2->numcolors != 0x800))))
005ad898          return 1;
005ad898      
005ad89d      return 0;
005ad870  }


005ad8a0  uint32_t __thiscall TextureMapChange::Pack(class TextureMapChange* this, void** arg2, uint32_t arg3)

005ad8a0  {
005ad8cd      uint32_t result = ((Pack_AsDataIDOfKnownType(0x5000000, this->new_tex_id.id, arg2, 0) + Pack_AsDataIDOfKnownType(0x5000000, this->old_tex_id.id, arg2, 0)) + 1);
005ad8cd      
005ad8da      if (arg3 < result)
005ad915          return result;
005ad915      
005ad8de      uint32_t eax_3;
005ad8de      eax_3 = this->part_index;
005ad8e1      **(uint8_t**)arg2 = eax_3;
005ad8e8      *(uint32_t*)arg2 += 1;
005ad8fc      uint32_t esi_2 = ((result - 1) - Pack_AsDataIDOfKnownType(0x5000000, this->old_tex_id.id, arg2, (result - 1)));
005ad90e      return (esi_2 - Pack_AsDataIDOfKnownType(0x5000000, this->new_tex_id.id, arg2, esi_2));
005ad8a0  }

005ad918                                                                          90 90 90 90 90 90 90 90                          ........

005ad920  int32_t __thiscall TextureMapChange::UnPack(class TextureMapChange* this, void** arg2, uint32_t arg3)

005ad920  {
005ad926      class TextureMapChange* this_1 = this;
005ad926      
005ad928      if (arg3 < 5)
005ad92d          return 0;
005ad92d      
005ad935      void* eax_1 = *(uint32_t*)arg2;
005ad937      this = *(uint8_t*)eax_1;
005ad93a      *(uint32_t*)arg2 = ((char*)eax_1 + 1);
005ad949      this_1->part_index = ((uint32_t)this);
005ad949      
005ad956      if (Unpack_AsDataIDOfKnownType(0x5000000, &this_1->old_tex_id, arg2) == 0)
005ad95c          return 0;
005ad95c      
005ad969      int32_t eax_6 = Unpack_AsDataIDOfKnownType(0x5000000, &this_1->new_tex_id, arg2);
005ad971      char temp1 = eax_6;
005ad971      eax_6 = -(eax_6);
005ad979      return -((eax_6 - eax_6));
005ad920  }

005ad97c                                                                                      90 90 90 90                              ....

005ad980  int32_t __thiscall TextureMapChange::replaces(class TextureMapChange const* this, class TextureMapChange const* arg2)

005ad980  {
005ad992      if ((this->part_index == arg2->part_index && this->old_tex_id.id == arg2->old_tex_id.id))
005ad999          return 1;
005ad999      
005ad99e      return 0;
005ad980  }

005ad9a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005ad9b0  uint32_t __thiscall AnimPartChange::Pack(class AnimPartChange* this, void** arg2, uint32_t arg3)

005ad9b0  {
005ad9d3      uint32_t result = (Pack_AsDataIDOfKnownType(0x1000000, this->part_id.id, arg2, 0) + 1);
005ad9d3      
005ad9d6      if (arg3 < result)
005ad9ff          return result;
005ad9ff      
005ad9dd      **(uint8_t**)arg2 = this->part_index;
005ad9e4      *(uint32_t*)arg2 += 1;
005ad9f8      return ((result - 1) - Pack_AsDataIDOfKnownType(0x1000000, this->part_id.id, arg2, (result - 1)));
005ad9b0  }

005ada02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005ada10  int32_t __thiscall AnimPartChange::UnPack(class AnimPartChange* this, void** arg2, uint32_t arg3)

005ada10  {
005ada16      class AnimPartChange* this_1 = this;
005ada16      
005ada18      if (arg3 < 3)
005ada1d          return 0;
005ada1d      
005ada24      void* edx = *(uint32_t*)arg2;
005ada26      this = *(uint8_t*)edx;
005ada2c      *(uint32_t*)arg2 = ((char*)edx + 1);
005ada2e      this_1->part_index = ((uint32_t)this);
005ada3b      int32_t eax_2 = Unpack_AsDataIDOfKnownType(0x1000000, &this_1->part_id, arg2);
005ada43      char temp1 = eax_2;
005ada43      eax_2 = -(eax_2);
005ada4a      return -((eax_2 - eax_2));
005ada10  }

005ada4d                                         90 90 90                                                               ...

005ada50  uint32_t __thiscall Subpalette::Pack(class Subpalette* this, void** arg2, uint32_t arg3)

005ada50  {
005ada70      int32_t result = (Pack_AsDataIDOfKnownType(0x4000000, this->subID.id, arg2, 0) + 2);
005ada70      
005ada78      if (arg3 >= result)
005ada78      {
005ada85          Pack_AsDataIDOfKnownType(0x4000000, this->subID.id, arg2, arg3);
005ada8f          uint32_t numcolors = this->numcolors;
005ada95          **(uint8_t**)arg2 = ((int8_t)(this->offset >> 3));
005ada9f          void* ecx_3 = (*(uint32_t*)arg2 + 1);
005adaa0          *(uint32_t*)arg2 = ecx_3;
005adaa2          *(uint8_t*)ecx_3 = ((int8_t)(numcolors >> 3));
005adaa4          *(uint32_t*)arg2 += 1;
005ada78      }
005ada78      
005adaab      return result;
005ada50  }

005adaae                                            90 90                                                                ..

005adab0  int32_t __thiscall Subpalette::UnPack(class Subpalette* this, void** arg2, uint32_t arg3)

005adab0  {
005adabe      void* ebx = *(uint32_t*)arg2;
005adabe      
005adac3      if ((arg3 >= 4 && Unpack_AsDataIDOfKnownType(0x4000000, &this->subID, arg2) != 0))
005adac3      {
005adadb          void* eax_3 = *(uint32_t*)arg2;
005adadb          
005adae4          if (((char*)eax_3 + 2) <= ((char*)ebx + arg3))
005adae4          {
005adaef              void* ecx;
005adaef              ecx = *(uint8_t*)eax_3;
005adaf2              *(uint32_t*)arg2 = ((char*)eax_3 + 1);
005adafa              this->offset = (((uint32_t)ecx) << 3);
005adafd              char* eax_6 = *(uint32_t*)arg2;
005adaff              ecx = *(uint8_t*)eax_6;
005adb02              *(uint32_t*)arg2 = &eax_6[1];
005adb04              uint32_t eax_8 = ((uint32_t)ecx);
005adb09              this->numcolors = eax_8;
005adb09              
005adb0c              if (eax_8 == 0)
005adb0e                  this->numcolors = 0x100;
005adb0e              
005adb1b              this->numcolors <<= 3;
005adb27              return 1;
005adae4          }
005adac3      }
005adac3      
005adaec      return 0;
005adab0  }

005adb2a                                90 90 90 90 90 90                                                            ......

005adb30  void __fastcall VisualDesc::VisualDesc(class VisualDesc* this)

005adb30  {
005adb32      this->vtable = 0x7e60d0;
005adb30  }

005adb39                                                                             90 90 90 90 90 90 90                           .......

005adb40  void __fastcall SetPositionStruct::~SetPositionStruct(class SetPositionStruct* this)

005adb40  {
005adb40      this->pos.vtable = 0x79285c;
005adb40  }

005adb47                       90 90 90 90 90 90 90 90 90                                                         .........

005adb50  void __thiscall IDList::Add(class IDList* this, uint32_t arg2)

005adb50  {
005adb55      void* eax = operator new(0xc);
005adb55      
005adb61      if (eax == 0)
005adb71          eax = nullptr;
005adb61      else
005adb61      {
005adb67          *(uint32_t*)eax = arg2;
005adb69          *(uint32_t*)((char*)eax + 4) = 0;
005adb6c          *(uint32_t*)((char*)eax + 8) = 0;
005adb61      }
005adb61      
005adb76      *(uint32_t*)((char*)eax + 4) = this->last;
005adb79      *(uint32_t*)((char*)eax + 8) = 0;
005adb7c      class IDListNode* last = this->last;
005adb7c      
005adb81      if (last != 0)
005adb81      {
005adb83          last->next = eax;
005adb86          this->last = eax;
005adb89          this->numIDs += 1;
005adb8d          return;
005adb81      }
005adb81      
005adb90      this->first = eax;
005adb93      this->last = eax;
005adb96      this->numIDs += 1;
005adb50  }

005adb9d                                                                                         90 90 90                               ...

005adba0  int32_t __thiscall IDList::GetPlaceInList(class IDList* this, uint32_t arg2)

005adba0  {
005adba0      class IDListNode* i = this->first;
005adba3      int32_t numIDs = this->numIDs;
005adba7      int32_t result = 0;
005adba7      
005adbab      if (numIDs > 0)
005adbab      {
005adbb3          while (i != 0)
005adbb3          {
005adbb7              if (i->id == arg2)
005adbc5                  return result;
005adbc5              
005adbb9              i = i->next;
005adbbc              result += 1;
005adbbc              
005adbbf              if (result >= numIDs)
005adbbf                  break;
005adbb3          }
005adbab      }
005adbab      
005adbc1      return 0xffffffff;
005adba0  }

005adbc8                          90 90 90 90 90 90 90 90                                                          ........

005adbd0  int32_t __thiscall IDList::IsInList(class IDList* this, uint32_t arg2)

005adbd0  {
005adbd0      class IDListNode* i = this->first;
005adbd3      int32_t numIDs = this->numIDs;
005adbd7      int32_t edx = 0;
005adbd7      
005adbdb      if (numIDs > 0)
005adbdb      {
005adbe3          while (i != 0)
005adbe3          {
005adbe7              if (i->id == arg2)
005adbfd                  return 1;
005adbfd              
005adbe9              i = i->next;
005adbec              edx += 1;
005adbec              
005adbef              if (edx >= numIDs)
005adbef                  break;
005adbe3          }
005adbdb      }
005adbdb      
005adbf4      return 0;
005adbd0  }


005adc00  int32_t __fastcall IDList::SetCurToNext(class IDList* this)

005adc00  {
005adc00      class IDListNode* curNode = this->curNode;
005adc00      
005adc05      if (curNode != 0)
005adc05      {
005adc07          class IDListNode* next = curNode->next;
005adc0c          this->curNode = next;
005adc0c          
005adc0f          if (next != 0)
005adc0f          {
005adc11              this->curNum += 1;
005adc19              return 1;
005adc0f          }
005adc0f          
005adc1a          this->curNum = 0xffffffff;
005adc05      }
005adc05      
005adc23      return 0;
005adc00  }

005adc24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005adc30  uint32_t __fastcall IDList::GetCurID(class IDList* this)

005adc30  {
005adc30      class IDListNode* curNode = this->curNode;
005adc30      
005adc35      if (curNode == 0)
005adc3c          return 0;
005adc3c      
005adc39      return curNode->id;
005adc30  }

005adc3d                                                                                         90 90 90                               ...

005adc40  class IDListNode* __thiscall IDList::GetNodeByNum(class IDList* this, int32_t arg2)

005adc40  {
005adc47      if (arg2 >= 0)
005adc47      {
005adc49          int32_t numIDs = this->numIDs;
005adc49          
005adc4e          if (arg2 < numIDs)
005adc4e          {
005adc56              class IDListNode* i;
005adc56              
005adc56              if (arg2 > (numIDs >> 1))
005adc56              {
005adc71                  i = this->last;
005adc74                  int32_t ecx_1 = (numIDs - 1);
005adc74                  
005adc79                  if (ecx_1 > arg2)
005adc79                  {
005adc82                      while (i != 0)
005adc82                      {
005adc84                          i = i->prev;
005adc87                          ecx_1 -= 1;
005adc87                          
005adc8a                          if (ecx_1 <= arg2)
005adc8d                              return i;
005adc82                      }
005adc79                  }
005adc56              }
005adc56              else
005adc56              {
005adc58                  i = this->first;
005adc5b                  int32_t ecx = 0;
005adc5b                  
005adc5f                  if (arg2 > 0)
005adc5f                  {
005adc63                      while (i != 0)
005adc63                      {
005adc65                          i = i->next;
005adc68                          ecx += 1;
005adc68                          
005adc6b                          if (ecx >= arg2)
005adc6e                              return i;
005adc63                      }
005adc5f                  }
005adc56              }
005adc56              
005adc93              return i;
005adc4e          }
005adc47      }
005adc47      
005adc90      return nullptr;
005adc40  }

005adc7d                                                                                         8d 49 00                               .I.
005adc96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005adca0  int32_t __thiscall IDList::RemoveNode(class IDList* this, class IDListNode* arg2)

005adca0  {
005adca9      if (arg2 == 0)
005adcac          return arg2;
005adcac      
005adcaf      class IDListNode* prev = arg2->prev;
005adcaf      
005adcb4      if (prev == 0)
005adcc1          this->first = arg2->next;
005adcb4      else
005adcb9          prev->next = arg2->next;
005adcb9      
005adcc4      class IDListNode* next = arg2->next;
005adcc4      
005adcc9      if (next == 0)
005adcd6          this->last = arg2->prev;
005adcc9      else
005adcce          next->prev = arg2->prev;
005adcce      
005adcda      operator delete(arg2);
005adce6      this->numIDs -= 1;
005adcef      return 1;
005adca0  }

005adcf2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005add00  void __fastcall IDList::IDList(class IDList* this)

005add00  {
005add04      this->vtable = 0x7e60e8;
005add0a      this->first = nullptr;
005add0d      this->last = nullptr;
005add10      this->curNode = nullptr;
005add13      this->numIDs = 0;
005add16      this->curNum = 0xffffffff;
005add00  }

005add1e                                                                                            90 90                                ..

005add20  int32_t __thiscall IDList::AddAtNum(class IDList* this, uint32_t arg2, int32_t arg3, int32_t arg4)

005add20  {
005add2a      class IDListNode* eax = IDList::GetNodeByNum(this, arg3);
005add2a      
005add38      if ((eax == 0 && arg3 != this->numIDs))
005add38      {
005add40          if (arg4 == 0)
005add5e              return 0;
005add5e          
005add49          IDList::Add(this, arg2);
005add56          return 1;
005add38      }
005add38      
005add63      class IDListNode* eax_5 = operator new(0xc);
005add63      
005add6d      if (eax_5 == 0)
005add85          eax_5 = nullptr;
005add6d      else
005add6d      {
005add73          eax_5->id = arg2;
005add75          eax_5->prev = nullptr;
005add7c          eax_5->next = nullptr;
005add6d      }
005add6d      
005add8a      if (arg3 != this->numIDs)
005add8a      {
005addb3          eax_5->prev = eax->prev;
005addb6          eax_5->next = eax;
005addb9          eax->prev = eax_5;
005addbc          class IDListNode* prev = eax_5->prev;
005addbc          
005addc1          if (prev == 0)
005addc8              this->first = eax_5;
005addc1          else
005addc3              prev->next = eax_5;
005add8a      }
005add8a      else
005add8a      {
005add8f          eax_5->prev = this->last;
005add92          eax_5->next = nullptr;
005add99          class IDListNode* last = this->last;
005add99          
005add9e          if (last == 0)
005add9e          {
005adda8              this->first = eax_5;
005addab              this->last = eax_5;
005add9e          }
005add9e          else
005add9e          {
005adda0              last->next = eax_5;
005adda3              this->last = eax_5;
005add9e          }
005add8a      }
005add8a      
005addd0      if (this->curNode != 0)
005addd0      {
005addd2          int32_t curNum = this->curNum;
005addd2          
005addd7          if (arg3 <= curNum)
005addda              this->curNum = (curNum + 1);
005addd0      }
005addd0      
005adde2      this->numIDs += 1;
005addec      return 1;
005add20  }

005addef                                               90                                                                 .

005addf0  int32_t __thiscall IDList::RemoveByID(class IDList* this, uint32_t arg2)

005addf0  {
005addf0      class IDListNode* i = this->first;
005addf7      int32_t edx = 0;
005addf7      
005addfb      if (this->numIDs > 0)
005addfb      {
005ade04          while (i != 0)
005ade04          {
005ade08              if (i->id == arg2)
005ade08                  break;
005ade08              
005ade0d              i = i->next;
005ade10              edx += 1;
005ade10              
005ade13              if (edx >= this->numIDs)
005ade13                  break;
005ade04          }
005addfb      }
005addfb      
005ade19      if (edx == this->curNum)
005ade19      {
005ade1b          this->curNum = 0xffffffff;
005ade22          this->curNode = nullptr;
005ade19      }
005ade19      
005ade29      int32_t curNum = this->curNum;
005ade29      
005ade2e      if (edx < curNum)
005ade31          this->curNum = (curNum - 1);
005ade31      
005ade39      /* tailcall */
005ade39      return IDList::RemoveNode(this, i);
005addf0  }

005ade3e                                                                                            90 90                                ..

005ade40  uint32_t __thiscall IDList::GetByNum(class IDList* this, int32_t arg2)

005ade40  {
005ade45      class IDListNode* eax = IDList::GetNodeByNum(this, arg2);
005ade45      
005ade4c      if (eax == 0)
005ade55          return 0;
005ade55      
005ade50      return eax->id;
005ade40  }

005ade58                                                                          90 90 90 90 90 90 90 90                          ........

005ade60  void __fastcall IDList::Clear(class IDList* this)

005ade60  {
005ade68      while (this->numIDs > 0)
005ade68      {
005ade70          int32_t numIDs = this->numIDs;
005ade75          void* i;
005ade75          
005ade75          if (numIDs <= 0)
005ade77              i = nullptr;
005ade75          else if ((numIDs & 0xfffffffe) < 0)
005ade81          {
005ade88              i = this->last;
005ade8b              int32_t ecx = (numIDs - 1);
005ade8b              
005ade8e              if (ecx > 0)
005ade8e              {
005ade92                  while (i != 0)
005ade92                  {
005ade94                      i = *(uint32_t*)((char*)i + 4);
005ade97                      ecx -= 1;
005ade97                      
005ade9a                      if (ecx <= 0)
005ade9a                          break;
005ade92                  }
005ade8e              }
005ade81          }
005ade81          else
005ade83              i = this->first;
005ade83          
005adea1          if (this->curNum == 0)
005adea1          {
005adea3              this->curNum = 0xffffffff;
005adeaa              this->curNode = nullptr;
005adea1          }
005adea1          
005adeb1          int32_t curNum = this->curNum;
005adeb1          
005adeb6          if (curNum > 0)
005adeb9              this->curNum = (curNum - 1);
005adeb9          
005adebe          if (i != 0)
005adebe          {
005adec0              void* ecx_3 = *(uint32_t*)((char*)i + 4);
005adec0              
005adec5              if (ecx_3 == 0)
005aded2                  this->first = *(uint32_t*)((char*)i + 8);
005adec5              else
005adeca                  *(uint32_t*)((char*)ecx_3 + 8) = *(uint32_t*)((char*)i + 8);
005adeca              
005aded5              void* ecx_5 = *(uint32_t*)((char*)i + 8);
005aded5              
005adeda              if (ecx_5 == 0)
005adee7                  this->last = *(uint32_t*)((char*)i + 4);
005adeda              else
005adedf                  *(uint32_t*)((char*)ecx_5 + 4) = *(uint32_t*)((char*)i + 4);
005adedf              
005adeeb              operator delete(i);
005adef7              this->numIDs -= 1;
005adebe          }
005ade68      }
005ade60  }

005adf07                       90 90 90 90 90 90 90 90 90                                                         .........

005adf10  int32_t __thiscall IDList::SetCurToNum(class IDList* this, int32_t arg2)

005adf10  {
005adf19      class IDListNode* eax = IDList::GetNodeByNum(this, arg2);
005adf20      this->curNode = eax;
005adf20      
005adf23      if (eax != 0)
005adf23      {
005adf25          this->curNum = arg2;
005adf2f          return 1;
005adf23      }
005adf23      
005adf33      this->curNum = 0xffffffff;
005adf3d      return 0;
005adf10  }


005adf40  uint32_t __thiscall IDList::Pack(class IDList* this, void** arg2, uint32_t arg3)

005adf40  {
005adf40      int32_t numIDs = this->numIDs;
005adf40      
005adf53      if (arg3 >= ((numIDs << 2) + 4))
005adf53      {
005adf5f          **(uint32_t**)arg2 = numIDs;
005adf61          *(uint32_t*)arg2 += 4;
005adf64          int32_t numIDs_1 = this->numIDs;
005adf69          class IDListNode* i;
005adf69          
005adf69          if (numIDs_1 <= 0)
005adf6b              i = nullptr;
005adf69          else if ((numIDs_1 & 0xfffffffe) < 0)
005adf75          {
005adf7c              i = this->last;
005adf7f              int32_t edi_2 = (numIDs_1 - 1);
005adf7f              
005adf84              if (edi_2 > 0)
005adf84              {
005adf88                  while (i != 0)
005adf88                  {
005adf8a                      i = i->prev;
005adf8d                      edi_2 -= 1;
005adf8d                      
005adf90                      if (edi_2 <= 0)
005adf90                          break;
005adf88                  }
005adf84              }
005adf75          }
005adf75          else
005adf77              i = this->first;
005adf77          
005adf92          int32_t i_1 = 0;
005adf96          this->curNode = i;
005adf96          
005adf99          if (i == 0)
005adfa0              this->curNum = 0xffffffff;
005adf99          else
005adf9b              this->curNum = 0;
005adf9b          
005adfa9          if (numIDs_1 > 0)
005adfa9          {
005adfe7              do
005adfe7              {
005adfb0                  class IDListNode* curNode = this->curNode;
005adfb5                  uint32_t id;
005adfb5                  
005adfb5                  if (curNode == 0)
005adfbb                      id = 0;
005adfb5                  else
005adfb7                      id = curNode->id;
005adfb7                  
005adfbf                  **(uint32_t**)arg2 = id;
005adfc1                  *(uint32_t*)arg2 += 4;
005adfc4                  class IDListNode* curNode_1 = this->curNode;
005adfc4                  
005adfc9                  if (curNode_1 != 0)
005adfc9                  {
005adfcb                      class IDListNode* next = curNode_1->next;
005adfd0                      this->curNode = next;
005adfd0                      
005adfd3                      if (next == 0)
005adfda                          this->curNum = 0xffffffff;
005adfd3                      else
005adfd5                          this->curNum += 1;
005adfc9                  }
005adfc9                  
005adfe4                  i_1 += 1;
005adfe7              } while (i_1 < this->numIDs);
005adfa9          }
005adf53      }
005adf53      
005adfec      return ((numIDs << 2) + 4);
005adf40  }

005adfad                                         8d 49 00                                                               .I.
005adfef                                               90                                                                 .

005adff0  int32_t __thiscall IDList::UnPack(class IDList* this, void** arg2, uint32_t arg3)

005adff0  {
005adff5      IDList::Clear(this);
005adffa      void** ebx = arg2;
005adffe      void* eax = *(uint32_t*)ebx;
005ae000      void** ecx = *(uint32_t*)eax;
005ae009      *(uint32_t*)ebx = ((char*)eax + 4);
005ae009      
005ae00b      if (ecx > 0)
005ae00b      {
005ae00d          arg2 = ecx;
005ae060          bool cond:1_1;
005ae060          
005ae060          do
005ae060          {
005ae012              int32_t* eax_2 = *(uint32_t*)ebx;
005ae014              int32_t edi_1 = *(uint32_t*)eax_2;
005ae01b              *(uint32_t*)ebx = &eax_2[1];
005ae01d              void* eax_4 = operator new(0xc);
005ae01d              
005ae027              if (eax_4 == 0)
005ae033                  eax_4 = nullptr;
005ae027              else
005ae027              {
005ae029                  *(uint32_t*)eax_4 = edi_1;
005ae02b                  *(uint32_t*)((char*)eax_4 + 4) = 0;
005ae02e                  *(uint32_t*)((char*)eax_4 + 8) = 0;
005ae027              }
005ae027              
005ae038              *(uint32_t*)((char*)eax_4 + 4) = this->last;
005ae03b              *(uint32_t*)((char*)eax_4 + 8) = 0;
005ae03e              class IDListNode* last = this->last;
005ae03e              
005ae043              if (last == 0)
005ae04a                  this->first = eax_4;
005ae043              else
005ae045                  last->next = eax_4;
005ae045              
005ae04d              int32_t numIDs = this->numIDs;
005ae050              this->last = eax_4;
005ae058              cond:1_1 = arg2 != 1;
005ae059              this->numIDs = (numIDs + 1);
005ae05c              arg2 -= 1;
005ae060          } while (cond:1_1);
005ae00b      }
005ae00b      
005ae06b      return 1;
005adff0  }

005ae06e                                            90 90                                                                ..

005ae070  void __fastcall IDList::~IDList(class IDList* this)

005ae070  {
005ae073      this->vtable = 0x7e60e8;
005ae079      IDList::Clear(this);
005ae07e      this->vtable = 0x79285c;
005ae070  }

005ae086                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005ae090  void __thiscall IDList::AddList(class IDList* this, class IDList* arg2)

005ae090  {
005ae096      int32_t numIDs = arg2->numIDs;
005ae099      int32_t i_1 = 0;
005ae0a0      class IDListNode* i;
005ae0a0      
005ae0a0      if (numIDs <= 0)
005ae0a2          i = nullptr;
005ae0a0      else if ((numIDs & 0xfffffffe) < 0)
005ae0ac      {
005ae0b3          i = arg2->last;
005ae0b3          
005ae0bb          if ((numIDs - 1) > 0)
005ae0bb          {
005ae0bd              int32_t ecx_1 = (numIDs - 1);
005ae0bd              
005ae0c2              while (i != 0)
005ae0c2              {
005ae0c4                  i = i->prev;
005ae0c7                  ecx_1 -= 1;
005ae0c7                  
005ae0ca                  if (ecx_1 <= 0)
005ae0ca                      break;
005ae0c2              }
005ae0bb          }
005ae0ac      }
005ae0ac      else
005ae0ae          i = arg2->first;
005ae0ae      
005ae0ce      arg2->curNode = i;
005ae0ce      
005ae0d1      if (i == 0)
005ae0d8          arg2->curNum = 0xffffffff;
005ae0d1      else
005ae0d3          arg2->curNum = 0;
005ae0d3      
005ae0e1      if (numIDs > 0)
005ae0e1      {
005ae121          do
005ae121          {
005ae0e3              class IDListNode* curNode = arg2->curNode;
005ae0e8              uint32_t id;
005ae0e8              
005ae0e8              if (curNode == 0)
005ae0ee                  id = 0;
005ae0e8              else
005ae0ea                  id = curNode->id;
005ae0ea              
005ae0f9              IDList::AddAtNum(this, id, this->numIDs, 1);
005ae0fe              class IDListNode* curNode_1 = arg2->curNode;
005ae0fe              
005ae103              if (curNode_1 != 0)
005ae103              {
005ae105                  class IDListNode* next = curNode_1->next;
005ae10a                  arg2->curNode = next;
005ae10a                  
005ae10d                  if (next == 0)
005ae114                      arg2->curNum = 0xffffffff;
005ae10d                  else
005ae10f                      arg2->curNum += 1;
005ae103              }
005ae103              
005ae11e              i_1 += 1;
005ae121          } while (i_1 < arg2->numIDs);
005ae0e1      }
005ae090  }

005ae129                             90 90 90 90 90 90 90                                                           .......

005ae130  void* __thiscall IDList::`scalar deleting destructor'(class IDList* this, uint32_t arg2)

005ae130  {
005ae133      this->vtable = 0x7e60e8;
005ae139      IDList::Clear(this);
005ae143      this->vtable = 0x79285c;
005ae143      
005ae149      if ((arg2 & 1) != 0)
005ae14c          operator delete(this);
005ae14c      
005ae157      return this;
005ae130  }

005ae15a                                                                                90 90 90 90 90 90                            ......

005ae160  void __thiscall IDList::IDList(class IDList* this, class IDList* arg2)

005ae160  {
005ae165      this->first = nullptr;
005ae168      this->last = nullptr;
005ae16b      this->curNode = nullptr;
005ae16e      this->numIDs = 0;
005ae176      this->vtable = 0x7e60e8;
005ae17c      this->curNum = 0xffffffff;
005ae183      IDList::AddList(this, arg2);
005ae160  }

005ae18e                                            90 90                                                                ..

005ae190  void __thiscall String::String(class String* this, class IDClass<_tagDataID,32,0> arg2)

005ae190  {
005ae198      DBObj::DBObj(this, arg2);
005ae19d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005ae1a9      this->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
005ae1ac      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
005ae1b2      this->vtable = 0x7e6110;
005ae190  }

005ae1be                                                                                            90 90                                ..

005ae1c0  uint32_t String::GetDBOType(class String const* this @ ecx) __pure

005ae1c0  {
005ae1c5      return 0x29;
005ae1c0  }

005ae1c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005ae1d0  class DBObj* String::Allocate(class String const* this @ ecx)

005ae1d0  {
005ae1d0      /* tailcall */
005ae1d0      return String::Allocator();
005ae1d0  }

005ae1d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005ae1e0  void* __thiscall String::`scalar deleting destructor'(class String* this, uint32_t arg2)

005ae1e0  {
005ae1e4      this->vtable = 0x7e6110;
005ae1ed      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_charbuffer - 0x14);
005ae1ed      
005ae200      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
005ae208          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
005ae208      
005ae20c      DBObj::~DBObj(this);
005ae20c      
005ae216      if ((arg2 & 1) != 0)
005ae219          operator delete(this);
005ae219      
005ae225      return this;
005ae1e0  }

005ae228                          90 90 90 90 90 90 90 90                                                          ........

005ae230  void __thiscall String::Serialize(class String* this, class Archive* arg2)

005ae230  {
005ae239      DBObj::Serialize(this, arg2);
005ae242      PStringBase<char>::Serialize(&this->m_charbuffer, arg2);
005ae230  }

005ae24c                                      90 90 90 90                                                              ....

005ae250  class OldHashData<unsigned long,unsigned long>* __fastcall OldHashIterator<unsigned long,unsigned long>::get_next_bucket_data(class OldHashIterator<unsigned long,unsigned long>* this)

005ae250  {
005ae253      class OldHashTable<unsigned long,unsigned long>* _table = this->_table;
005ae253      
005ae258      if (_table == 0)
005ae25d          return 0;
005ae25d      
005ae263      int32_t eax_2 = _table->vtable->hash(this->_current);
005ae266      class OldHashTable<unsigned long,unsigned long>* _table_1 = this->_table;
005ae269      uint32_t _num_buckets = _table_1->_num_buckets;
005ae26c      int32_t eax_3 = (eax_2 + 1);
005ae26c      
005ae26f      if (eax_3 < _num_buckets)
005ae26f      {
005ae271          class OldHashData<unsigned long,unsigned long>** _buckets = _table_1->_buckets;
005ae274          void* ecx = &_buckets[eax_3];
005ae274          
005ae282          do
005ae282          {
005ae27a              if (*(uint32_t*)ecx != 0)
005ae28c                  return _buckets[eax_3];
005ae28c              
005ae27c              eax_3 += 1;
005ae27d              ecx += 4;
005ae282          } while (eax_3 < _num_buckets);
005ae26f      }
005ae26f      
005ae287      return 0;
005ae250  }

005ae28d                                         90 90 90                                                               ...

005ae290  uint32_t* __thiscall OldHashTable<unsigned long,unsigned long>::find(class OldHashTable<unsigned long,unsigned long> const* this, uint32_t const* arg2)

005ae290  {
005ae2a1      if ((this->_num_buckets != 0 && this->_buckets != 0))
005ae2a1      {
005ae2b5          for (void* i = this->_buckets[this->vtable->hash(arg2)]; i != 0; i = *(uint32_t*)((char*)i + 8))
005ae2b5          {
005ae2c2              if (this->vtable->is_keys_equiv(arg2, i) != 0)
005ae2d9                  return ((char*)i + 4);
005ae2b5          }
005ae2a1      }
005ae2a1      
005ae2d0      return 0;
005ae290  }

005ae2dc                                                                                      90 90 90 90                              ....

005ae2e0  int32_t __fastcall OldHashTable<unsigned long,unsigned long>::verify_num_buckets(class OldHashTable<unsigned long,unsigned long>* this)

005ae2e0  {
005ae2e0      uint32_t _num_buckets = this->_num_buckets;
005ae2e0      
005ae2e5      if (_num_buckets != 0)
005ae2e5      {
005ae2e7          uint32_t eax_1 = 0x80000000;
005ae2e7          
005ae2ee          if (_num_buckets > 0x80000000)
005ae2ee          {
005ae30a              this->_num_buckets = eax_1;
005ae30f              return 0;
005ae2ee          }
005ae2ee          
005ae2f2          if ((0x80000000 & _num_buckets) == 0)
005ae2f2          {
005ae2fb              do
005ae2f7                  eax_1 u>>= 1;
005ae2fb               while ((eax_1 & _num_buckets) == 0);
005ae2f2          }
005ae2f2          
005ae300          if (eax_1 != _num_buckets)
005ae300          {
005ae30a              this->_num_buckets = (eax_1 * 2);
005ae30f              return 0;
005ae300          }
005ae2e5      }
005ae2e5      
005ae307      return 1;
005ae2e0  }


005ae310  void __thiscall RestrictionDB::SetOpenHouse(class RestrictionDB* this, int32_t arg2)

005ae310  {
005ae316      uint32_t _bitmask = this->_bitmask;
005ae316      
005ae319      if (arg2 != 0)
005ae319      {
005ae31e          this->_bitmask = (_bitmask | 1);
005ae321          return;
005ae319      }
005ae319      
005ae327      this->_bitmask = (_bitmask & 0xfffffffe);
005ae310  }

005ae32d                                         90 90 90                                                               ...

005ae330  uint32_t __thiscall RestrictionDB::Pack(class RestrictionDB* this, void** arg2, uint32_t arg3)

005ae330  {
005ae330      class RestrictionDB* this_1 = this;
005ae336      struct StreamPackObj::VTable* vtable = this->_table.vtable;
005ae34b      this_1 = nullptr;
005ae35c      int32_t result = (vtable->Pack(&this_1, 0) + 0xc);
005ae35c      
005ae361      if (arg3 >= result)
005ae361      {
005ae369          **(uint32_t**)arg2 = 0x10000002;
005ae371          void* ecx_3 = (*(uint32_t*)arg2 + 4);
005ae374          *(uint32_t*)arg2 = ecx_3;
005ae37a          *(uint32_t*)ecx_3 = this->_bitmask;
005ae37e          void* ebp_3 = (*(uint32_t*)arg2 + 4);
005ae381          *(uint32_t*)arg2 = ebp_3;
005ae388          *(uint32_t*)ebp_3 = this->_monarch_iid;
005ae38a          *(uint32_t*)arg2 += 4;
005ae342          this->_table.vtable->Pack(arg2, arg3);
005ae361      }
005ae361      
005ae39d      return result;
005ae330  }


005ae3a0  class OldHashIterator<unsigned long,unsigned long>* __thiscall OldHashTable<unsigned long,unsigned long>::begin(class OldHashTable<unsigned long,unsigned long> const* this, class OldHashIterator<unsigned long,unsigned long>* __return)

005ae3a0  {
005ae3a1      class OldHashData<unsigned long,unsigned long>** _buckets = this->_buckets;
005ae3a4      int32_t eax = 0;
005ae3a4      
005ae3a8      if (_buckets != 0)
005ae3a8      {
005ae3ab          uint32_t _num_buckets = this->_num_buckets;
005ae3ab          
005ae3b0          if (_num_buckets > 0)
005ae3b0          {
005ae3b2              class OldHashData<unsigned long,unsigned long>** _buckets_1 = _buckets;
005ae3b2              
005ae3bf              do
005ae3bf              {
005ae3b7                  if (*(uint32_t*)_buckets_1 != 0)
005ae3b7                  {
005ae3db                      __return->_current = _buckets[eax];
005ae3dd                      __return->_table = this;
005ae3e3                      return __return;
005ae3b7                  }
005ae3b7                  
005ae3b9                  eax += 1;
005ae3ba                  _buckets_1 = &_buckets_1[1];
005ae3bf              } while (eax < _num_buckets);
005ae3b0          }
005ae3a8      }
005ae3a8      
005ae3c8      __return->_current = 0;
005ae3ca      __return->_table = this;
005ae3d0      return __return;
005ae3a0  }

005ae3e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005ae3f0  int32_t __fastcall OldHashTable<unsigned long,unsigned long>::init(class OldHashTable<unsigned long,unsigned long>* this)

005ae3f0  {
005ae3f8      if (this->_buckets == 0)
005ae3f8      {
005ae3ff          if (this->_num_buckets == 0)
005ae448              return 1;
005ae448          
005ae401          OldHashTable<unsigned long,unsigned long>::verify_num_buckets(this);
005ae40d          void* eax_4 = operator new[]((this->_num_buckets << 2));
005ae417          this->_buckets = eax_4;
005ae417          
005ae41a          if (eax_4 != 0)
005ae41a          {
005ae423              int32_t i = 0;
005ae423              
005ae427              if (this->_num_buckets > 0)
005ae427              {
005ae440                  do
005ae440                  {
005ae430                      this->_buckets[i] = 0;
005ae43d                      i += 1;
005ae440                  } while (i < this->_num_buckets);
005ae427              }
005ae427              
005ae448              return 1;
005ae41a          }
005ae3f8      }
005ae3f8      
005ae41f      return 0;
005ae3f0  }

005ae449                             90 90 90 90 90 90 90                                                           .......

005ae450  int32_t __thiscall OldHashTable<unsigned long,unsigned long>::add(class OldHashTable<unsigned long,unsigned long>* this, uint32_t const* arg2, uint32_t const* arg3)

005ae450  {
005ae45a      if (this->_num_elements >= 0xffffff)
005ae45f          return 0;
005ae45f      
005ae472      if (OldHashTable<unsigned long,unsigned long>::find(this, arg2) == 0)
005ae472      {
005ae483          uint32_t* edi_1 = operator new(0xc);
005ae483          
005ae48a          if (edi_1 != 0)
005ae48a          {
005ae492              *(uint32_t*)edi_1 = *(uint32_t*)arg2;
005ae496              edi_1[1] = *(uint32_t*)arg3;
005ae499              edi_1[2] = 0;
005ae4a5              int32_t eax_6 = this->vtable->hash(arg2);
005ae4ae              edi_1[2] = this->_buckets[eax_6];
005ae4b1              this->_buckets[eax_6] = edi_1;
005ae4bc              this->_num_elements += 1;
005ae4c6              return 1;
005ae48a          }
005ae472      }
005ae472      
005ae479      return 0;
005ae450  }

005ae4c9                             90 90 90 90 90 90 90                                                           .......

005ae4d0  void __fastcall OldHashTable<unsigned long,unsigned long>::flush(class OldHashTable<unsigned long,unsigned long>* this)

005ae4d0  {
005ae4d9      if (this->_buckets != 0)
005ae4d9      {
005ae4de          int32_t i = 0;
005ae4de          
005ae4e2          if (this->_num_buckets > 0)
005ae4e2          {
005ae512              do
005ae512              {
005ae4e8                  void* j_1 = this->_buckets[i];
005ae4e8                  
005ae4ed                  if (j_1 != 0)
005ae4ed                  {
005ae500                      void* j;
005ae500                      
005ae500                      do
005ae500                      {
005ae4f0                          j = *(uint32_t*)((char*)j_1 + 8);
005ae4f4                          operator delete(j_1);
005ae4fe                          j_1 = j;
005ae500                      } while (j != 0);
005ae4ed                  }
005ae4ed                  
005ae502                  this->_buckets[i] = 0;
005ae50f                  i += 1;
005ae512              } while (i < this->_num_buckets);
005ae4e2          }
005ae4d9      }
005ae4d9      
005ae515      this->_num_elements = 0;
005ae4d0  }

005ae51f                                                                                               90                                 .

005ae520  uint32_t __thiscall OldHashTable<unsigned long,unsigned long>::hash(class OldHashTable<unsigned long,unsigned long> const* this, uint32_t const* arg2)

005ae520  {
005ae52d      return (COMBINE(0, *(uint32_t*)arg2) % this->_num_buckets);
005ae520  }


005ae530  int32_t __stdcall OldHashTable<unsigned long,unsigned long>::is_keys_equiv(class OldHashTable<unsigned long,unsigned long> const* this @ ecx, uint32_t const* arg2, uint32_t const* arg3)

005ae530  {
005ae53a      int32_t eax_1 = (*(uint32_t*)arg2 - *(uint32_t*)arg3);
005ae53c      int32_t eax_2 = -(eax_1);
005ae541      return ((eax_2 - eax_2) + 1);
005ae530  }

005ae544              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005ae550  void __fastcall OldPHashTable<unsigned long,unsigned long>::OldPHashTable<unsigned long,unsigned long>(class OldPHashTable<unsigned long,unsigned long>* this)

005ae550  {
005ae555      this->vtable = 0x7e6168;
005ae55b      this->_buckets = nullptr;
005ae55e      this->_num_buckets = 0x20;
005ae565      this->_num_elements = 0;
005ae568      OldHashTable<unsigned long,unsigned long>::init(this);
005ae56d      this->vtable = &PackObj::`vftable';
005ae574      this->vtable = 0x7e6188;
005ae57a      this->vtable = &OldPHashTable<unsigned long,unsigned long>::`vftable';
005ae550  }

005ae585                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005ae590  void* __thiscall OldPHashTable<unsigned long,unsigned long>::`vector deleting destructor'(class OldPHashTable<unsigned long,unsigned long>* this, uint32_t arg2)

005ae590  {
005ae593      /* tailcall */
005ae593      return OldPHashTable<unsigned long,unsigned long>::`scalar deleting destructor'(((char*)this - 0x10), arg2);
005ae590  }

005ae598                                                                          cc cc cc cc cc cc cc cc                          ........

005ae5a0  uint32_t __thiscall OldPHashTable<unsigned long,unsigned long>::Pack(class OldPHashTable<unsigned long,unsigned long>* this, void** arg2, uint32_t arg3)

005ae5a0  {
005ae5aa      uint32_t result = OldPHashTable<unsigned long,unsigned long>::pack_size(&this[0]);
005ae5aa      
005ae5b5      if (arg3 >= result)
005ae5b5      {
005ae5bb          uint32_t i = *(int32_t*)((char*)this + -8);
005ae5be          int32_t eax = 0;
005ae5be          
005ae5c2          while (i != 0)
005ae5c2          {
005ae5c4              i u>>= 1;
005ae5c6              eax += 1;
005ae5c2          }
005ae5c2          
005ae5d9          **(uint32_t**)arg2 = ((eax << 0x18) | this->vtable);
005ae5e1          *(uint32_t*)arg2 += 4;
005ae5e3          int32_t* edi_1 = *(int32_t*)((char*)this + -0xc);
005ae5e6          int32_t* i_1 = nullptr;
005ae5e6          
005ae5ea          if (edi_1 != 0)
005ae5ea          {
005ae5ec              int32_t edx_2 = *(int32_t*)((char*)this + -8);
005ae5ec              
005ae5f1              if (edx_2 <= 0)
005ae5f1              {
005ae602              label_5ae602:
005ae602                  i_1 = nullptr;
005ae5f1              }
005ae5f1              else
005ae5f1              {
005ae5f3                  int32_t* ecx_4 = edi_1;
005ae5f3                  
005ae5f8                  while (*(uint32_t*)ecx_4 == 0)
005ae5f8                  {
005ae5fa                      i_1 += 1;
005ae5fb                      ecx_4 = &ecx_4[1];
005ae5fb                      
005ae600                      if (i_1 >= edx_2)
005ae600                          goto label_5ae602;
005ae5f8                  }
005ae5f8                  
005ae635                  i_1 = edi_1[i_1];
005ae5f1              }
005ae5ea          }
005ae5ea          
005ae606          while (i_1 != 0)
005ae606          {
005ae60d              if (arg3 >= 4)
005ae60d              {
005ae613                  **(uint32_t**)arg2 = *(uint32_t*)i_1;
005ae617                  void* edx_5 = (*(uint32_t*)arg2 + 4);
005ae61a                  *(uint32_t*)arg2 = edx_5;
005ae621                  *(uint32_t*)edx_5 = i_1[1];
005ae623                  *(uint32_t*)arg2 += 4;
005ae60d              }
005ae60d              
005ae628              if (i_1 == 0)
005ae628                  break;
005ae628              
005ae62a              int32_t* i_2 = i_1[2];
005ae62a              
005ae62f              if (i_2 == 0)
005ae62f              {
005ae63f                  int32_t eax_3 = *(uint32_t*)(*(int32_t*)((char*)this + -0x10) + 4)(i_1);
005ae642                  int32_t edx_8 = *(int32_t*)((char*)this + -8);
005ae645                  int32_t eax_4 = (eax_3 + 1);
005ae645                  
005ae648                  if (eax_4 >= edx_8)
005ae648                  {
005ae65d                  label_5ae65d:
005ae65d                      i_1 = nullptr;
005ae648                  }
005ae648                  else
005ae648                  {
005ae64a                      int32_t edi_2 = *(int32_t*)((char*)this + -0xc);
005ae64d                      int32_t* ecx_8 = (edi_2 + (eax_4 << 2));
005ae64d                      
005ae653                      while (*(uint32_t*)ecx_8 == 0)
005ae653                      {
005ae655                          eax_4 += 1;
005ae656                          ecx_8 = &ecx_8[1];
005ae656                          
005ae65b                          if (eax_4 >= edx_8)
005ae65b                              goto label_5ae65d;
005ae653                      }
005ae653                      
005ae66c                      i_1 = *(uint32_t*)(edi_2 + (eax_4 << 2));
005ae648                  }
005ae62f              }
005ae62f              else
005ae631                  i_1 = i_2;
005ae606          }
005ae5b5      }
005ae5b5      
005ae669      return result;
005ae5a0  }

005ae671                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005ae680  uint32_t __fastcall OldPHashTable<unsigned long,unsigned long>::pack_size(class OldPHashTable<unsigned long,unsigned long>* this)

005ae680  {
005ae68b      int32_t result = 4;
005ae690      void* __return;
005ae690      OldHashTable<unsigned long,unsigned long>::begin(this, &__return);
005ae695      void* const i = __return;
005ae695      
005ae69b      while (i != 0)
005ae69b      {
005ae6a1          result += 8;
005ae6a1          
005ae6a6          if (i == 0)
005ae6a6              break;
005ae6a6          
005ae6a8          void* i_1 = *(uint32_t*)((char*)i + 8);
005ae6ad          int32_t* var_4;
005ae6ad          
005ae6ad          if (i_1 != 0)
005ae6af              i = i_1;
005ae6ad          else if (var_4 == 0)
005ae6b5          {
005ae6dd          label_5ae6dd:
005ae6dd              i = nullptr;
005ae6b5          }
005ae6b5          else
005ae6b5          {
005ae6bc              int32_t eax = *(uint32_t*)(*(uint32_t*)var_4 + 4)(i);
005ae6bf              int32_t edx_2 = var_4[2];
005ae6c2              int32_t eax_1 = (eax + 1);
005ae6c2              
005ae6c5              if (eax_1 >= edx_2)
005ae6c5              {
005ae6dd              label_5ae6dd_1:
005ae6dd                  i = nullptr;
005ae6c5              }
005ae6c5              else
005ae6c5              {
005ae6c7                  int32_t esi_1 = var_4[1];
005ae6cd                  int32_t* ecx_2 = (esi_1 + (eax_1 << 2));
005ae6cd                  
005ae6d3                  while (*(uint32_t*)ecx_2 == 0)
005ae6d3                  {
005ae6d5                      eax_1 += 1;
005ae6d6                      ecx_2 = &ecx_2[1];
005ae6d6                      
005ae6db                      if (eax_1 >= edx_2)
005ae6db                          goto label_5ae6dd_1;
005ae6d3                  }
005ae6d3                  
005ae6ec                  i = *(uint32_t*)(esi_1 + (eax_1 << 2));
005ae6c5              }
005ae6b5          }
005ae69b      }
005ae69b      
005ae6eb      return result;
005ae680  }

005ae6f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005ae700  uint32_t __fastcall OldPHashTable<unsigned long,unsigned long>::GetPackSize(class OldPHashTable<unsigned long,unsigned long>* this)

005ae700  {
005ae703      /* tailcall */
005ae703      return OldPHashTable<unsigned long,unsigned long>::pack_size(&this[0]);
005ae700  }

005ae708                          90 90 90 90 90 90 90 90                                                          ........

005ae710  void __fastcall OldPHashTable<unsigned long,unsigned long>::~OldPHashTable<unsigned long,unsigned long>(class OldPHashTable<unsigned long,unsigned long>* this)

005ae710  {
005ae713      this->vtable = &OldPHashTable<unsigned long,unsigned long>::`vftable';
005ae71a      this->vtable = &PackObj::`vftable';
005ae721      this->vtable = 0x7e6168;
005ae727      OldHashTable<unsigned long,unsigned long>::flush(this);
005ae72c      class OldHashData<unsigned long,unsigned long>** _buckets = this->_buckets;
005ae72c      
005ae731      if (_buckets != 0)
005ae731      {
005ae734          operator delete[](_buckets);
005ae73c          this->_buckets = nullptr;
005ae731      }
005ae731      
005ae743      this->_num_buckets = 0;
005ae710  }

005ae74c                                      90 90 90 90                                                              ....

005ae750  int32_t __thiscall OldPHashTable<unsigned long,unsigned long>::UnPack(class OldPHashTable<unsigned long,unsigned long>* this, void** arg2, uint32_t arg3)

005ae750  {
005ae750      class OldPHashTable<unsigned long,unsigned long>* this_1 = this;
005ae750      
005ae75c      if (arg3 < 4)
005ae763          return 0;
005ae763      
005ae76d      OldHashTable<unsigned long,unsigned long>::flush(&this[0]);
005ae772      void* eax_1 = *(int32_t*)((char*)this + -0xc);
005ae772      
005ae779      if (eax_1 != 0)
005ae779      {
005ae77c          operator delete[](eax_1);
005ae784          *(int32_t*)((char*)this + -0xc) = 0;
005ae779      }
005ae779      
005ae787      *(int32_t*)((char*)this + -8) = 0;
005ae78a      void** esi = arg2;
005ae78e      void* eax_2 = *(uint32_t*)esi;
005ae790      int32_t edx = *(uint32_t*)eax_2;
005ae795      *(uint32_t*)esi = ((char*)eax_2 + 4);
005ae79c      uint32_t eax_5 = (edx >> 0x18);
005ae79c      
005ae7a6      if (eax_5 <= 0x20)
005ae7a6      {
005ae7b4          if (eax_5 != 0)
005ae7c5              *(uint32_t*)((char*)this - 8) = (1 << (eax_5 - 1));
005ae7b4          else
005ae7b6              *(uint32_t*)((char*)this - 8) = eax_5;
005ae7b6          
005ae7cb          int32_t edx_1 = (edx & 0xffffff);
005ae7cb          
005ae7d5          if (*(int32_t*)((char*)this + -8) == 0)
005ae7d5          {
005ae7de              int32_t result;
005ae7de              result = edx_1 == 0;
005ae7e3              return result;
005ae7d5          }
005ae7d5          
005ae7ef          if (OldHashTable<unsigned long,unsigned long>::init(&this[0]) != 0)
005ae7ef          {
005ae7f1              int32_t ebx_1 = 0;
005ae7f1              
005ae7f5              if (edx_1 <= 0)
005ae83e                  return 1;
005ae83e              
005ae7fc              while (true)
005ae7fc              {
005ae7fc                  if ((arg3 - 4) < 4)
005ae7af                      return 0;
005ae7af                  
005ae7fe                  int32_t* eax_10 = *(uint32_t*)esi;
005ae800                  class OldPHashTable<unsigned long,unsigned long>* this_2 = *(uint32_t*)eax_10;
005ae805                  *(uint32_t*)esi = &eax_10[1];
005ae807                  this_1 = this_2;
005ae80b                  void** edx_2 = eax_10[1];
005ae810                  *(uint32_t*)esi = &eax_10[2];
005ae81e                  arg2 = edx_2;
005ae81e                  
005ae829                  if (OldHashTable<unsigned long,unsigned long>::add(&this[0], &this_1, &arg2) == 0)
005ae7af                      return 0;
005ae7af                  
005ae82f                  ebx_1 += 1;
005ae82f                  
005ae832                  if (ebx_1 >= edx_1)
005ae83e                      return 1;
005ae7fc              }
005ae7ef          }
005ae7a6      }
005ae7a6      
005ae7af      return 0;
005ae750  }

005ae841     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005ae850  void* __thiscall OldHashTable<unsigned long,unsigned long>::`scalar deleting destructor'(class OldHashTable<unsigned long,unsigned long>* this, uint32_t arg2)

005ae850  {
005ae853      this->vtable = 0x7e6168;
005ae859      OldHashTable<unsigned long,unsigned long>::flush(this);
005ae85e      class OldHashData<unsigned long,unsigned long>** _buckets = this->_buckets;
005ae85e      
005ae863      if (_buckets != 0)
005ae863      {
005ae866          operator delete[](_buckets);
005ae86e          this->_buckets = nullptr;
005ae863      }
005ae863      
005ae87a      this->_num_buckets = 0;
005ae87a      
005ae881      if ((arg2 & 1) != 0)
005ae884          operator delete(this);
005ae884      
005ae88f      return this;
005ae850  }

005ae892                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005ae8a0  void* __thiscall OldPHashTable<unsigned long,unsigned long>::`scalar deleting destructor'(class OldPHashTable<unsigned long,unsigned long>* this, uint32_t arg2)

005ae8a0  {
005ae8a3      this->vtable = &OldPHashTable<unsigned long,unsigned long>::`vftable';
005ae8aa      this->vtable = &PackObj::`vftable';
005ae8b1      this->vtable = 0x7e6168;
005ae8b7      OldHashTable<unsigned long,unsigned long>::flush(this);
005ae8bc      class OldHashData<unsigned long,unsigned long>** _buckets = this->_buckets;
005ae8bc      
005ae8c1      if (_buckets != 0)
005ae8c1      {
005ae8c4          operator delete[](_buckets);
005ae8cc          this->_buckets = nullptr;
005ae8c1      }
005ae8c1      
005ae8d8      this->_num_buckets = 0;
005ae8d8      
005ae8df      if ((arg2 & 1) != 0)
005ae8e2          operator delete(this);
005ae8e2      
005ae8ed      return this;
005ae8a0  }


005ae8f0  int32_t __thiscall RestrictionDB::IsAllowedIn(class RestrictionDB const* this, uint32_t arg2, uint32_t arg3)

005ae8f0  {
005ae8f4      if ((this->_bitmask & 1) == 0)
005ae8f4      {
005ae8f6          uint32_t _monarch_iid = this->_monarch_iid;
005ae8f6          
005ae901          if ((_monarch_iid == 0 || arg3 != _monarch_iid))
005ae901          {
005ae909              arg3 = arg2;
005ae909              
005ae90d              if (arg2 == 0)
005ae930                  return 0;
005ae930              
005ae917              class List<NoticeHandler *>** eax_2 = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&this->_table.vtable, &arg3);
005ae91c              int32_t eax_3 = -(eax_2);
005ae91c              
005ae924              if (-((eax_3 - eax_3)) == 0)
005ae930                  return 0;
005ae901          }
005ae8f4      }
005ae8f4      
005ae92b      return 1;
005ae8f0  }

005ae933                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005ae940  uint8_t __thiscall HashTable<unsigned long,unsigned long,0>::resize(class HashTable<unsigned long,unsigned long,0>* this, uint32_t arg2)

005ae940  {
005ae945      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005ae94c      arg2 = arg2;
005ae965      uint32_t* eax_1 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
005ae965      
005ae96f      if (eax_1 == bucketSizesEnd_1)
005ae971          eax_1 -= 4;
005ae971      
005ae981      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::resize_internal(&this->m_intrusiveTable, *(uint32_t*)eax_1);
005ae940  }

005ae984              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005ae990  int32_t __thiscall RestrictionDB::UnPack(class RestrictionDB* this, void** arg2, uint32_t arg3)

005ae990  {
005ae995      uint32_t edi = arg3;
005ae995      
005ae99e      if (edi < 4)
005ae9a7          return 0;
005ae9a7      
005ae9b0      void* ebp = *(uint32_t*)arg2;
005ae9b2      void** ecx = *(uint32_t*)ebp;
005ae9c2      *(uint32_t*)arg2 = ((char*)ebp + 4);
005ae9c4      int32_t ecx_1;
005ae9c4      
005ae9c4      if ((ecx & 0xffff0000) != 0)
005ae9c4      {
005ae9d7          arg3 = ecx;
005ae9d7          
005ae9db          if (ecx != 0)
005ae9e4              ecx_1 = 0xc;
005ae9db          else
005ae9dd              ecx_1 = 4;
005ae9c4      }
005ae9c4      else
005ae9c4      {
005ae9c6          arg3 = 0;
005ae9ce          ecx_1 = 4;
005ae9c4      }
005ae9c4      
005ae9eb      if (edi >= ecx_1)
005ae9eb      {
005ae9f5          if (arg3 >= 0x10000002)
005ae9f5          {
005aeaf5              this->_bitmask = *(uint32_t*)((char*)ebp + 4);
005aeafa              void* ecx_14 = (*(uint32_t*)arg2 + 4);
005aeafd              *(uint32_t*)arg2 = ecx_14;
005aeb03              this->_monarch_iid = *(uint32_t*)ecx_14;
005aeb08              void* eax_19 = (*(uint32_t*)arg2 + 4);
005aeb0b              *(uint32_t*)arg2 = eax_19;
005aeb0d              void* eax_20 = ((char*)eax_19 - ebp);
005aeb11              void* edi_2;
005aeb11              
005aeb11              if (edi <= eax_20)
005aeb17                  edi_2 = nullptr;
005aeb11              else
005aeb13                  edi_2 = (edi - eax_20);
005aeb13              
005aeb27              int32_t eax_21 = this->_table.vtable->UnPack(arg2, edi_2);
005aeb2b              int32_t eax_22 = -(eax_21);
005aeb37              return -((eax_22 - eax_22));
005ae9f5          }
005ae9f5          
005ae9ff          int32_t var_14;
005ae9ff          OldPHashTable<unsigned long,unsigned long>::OldPHashTable<unsigned long,unsigned long>(&var_14);
005aea0a          void* edi_1;
005aea0a          
005aea0a          if (arg3 != 0)
005aea0a          {
005aea4e              this->_bitmask = **(uint32_t**)arg2;
005aea53              void* ecx_8 = (*(uint32_t*)arg2 + 4);
005aea56              *(uint32_t*)arg2 = ecx_8;
005aea5c              this->_monarch_iid = *(uint32_t*)ecx_8;
005aea61              void* eax_11 = (*(uint32_t*)arg2 + 4);
005aea64              *(uint32_t*)arg2 = eax_11;
005aea66              void* eax_12 = ((char*)eax_11 - ebp);
005aea66              
005aea6a              if (edi <= eax_12)
005aea24                  edi_1 = nullptr;
005aea6a              else
005aea6c                  edi_1 = (edi - eax_12);
005aea0a          }
005aea0a          else
005aea0a          {
005aea13              RestrictionDB::SetOpenHouse(this, ecx);
005aea1a              void* eax_5 = (*(uint32_t*)arg2 - ebp);
005aea1a              
005aea1e              if (edi <= eax_5)
005aea24                  edi_1 = nullptr;
005aea1e              else
005aea20                  edi_1 = (edi - eax_5);
005aea0a          }
005aea0a          
005aea33          int32_t var_4;
005aea33          
005aea33          if (OldPHashTable<unsigned long,unsigned long>::UnPack(&var_4, arg2, edi_1) != 0)
005aea33          {
005aea79              class ControlSpecification* __return;
005aea79              OldHashTable<unsigned long,unsigned long>::begin(&var_14, &__return);
005aea7e              class ControlSpecification* i = __return;
005aea7e              
005aea84              while (i != 0)
005aea84              {
005aea97                  HashTable<ControlSpecification,enum ControlType,0>::add(&this->_table, i, &i[1]);
005aea97                  
005aea9e                  if (i == 0)
005aea9e                      break;
005aea9e                  
005aeaa0                  i = *(int32_t*)((char*)i + 8);
005aeaa0                  
005aeaa5                  if (i == 0)
005aeab0                      i = OldHashIterator<unsigned long,unsigned long>::get_next_bucket_data(&__return);
005aeab0                  
005aeab4                  __return = i;
005aea84              }
005aea84              
005aeabe              var_4 = 0x79285c;
005aeac6              var_14 = 0x7e6168;
005aeace              OldHashTable<unsigned long,unsigned long>::flush(&var_14);
005aead9              void* var_10;
005aead9              
005aead9              if (var_10 != 0)
005aeadc                  operator delete[](var_10);
005aeadc              
005aeaf0              return 1;
005aea33          }
005aea33          
005aea39          OldPHashTable<unsigned long,unsigned long>::~OldPHashTable<unsigned long,unsigned long>(&var_14);
005ae9eb      }
005ae9eb      
005aea47      return 0;
005ae990  }

005aeb3a                                                                                90 90 90 90 90 90                            ......

005aeb40  void* __thiscall HashTable<unsigned long,unsigned long,0>::operator=(void* arg1, uint32_t arg2)

005aeb40  {
005aeb45      uint32_t edi = arg2;
005aeb49      void* ebx = arg1;
005aeb4d      void* var_1c = ebx;
005aeb4d      
005aeb51      if (ebx != edi)
005aeb51      {
005aeb5e          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(((char*)ebx + 4));
005aeb66          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005aeb6c          arg2 = *(uint32_t*)(edi + 0x6c);
005aeb83          uint32_t* eax_3 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
005aeb83          
005aeb8d          if (eax_3 == bucketSizesEnd_1)
005aeb8f              eax_3 -= 4;
005aeb8f          
005aeb97          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::resize_internal(((char*)ebx + 4), *(uint32_t*)eax_3);
005aeba4          void* ebp_1 = nullptr;
005aeba6          void __return;
005aeba6          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin((edi + 4), &__return);
005aebab          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
005aebad          class HashTableData<unsigned long,DBOCache *>* esi_2 = eax_4->m_currElement;
005aebb9          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
005aebb9          
005aebbd          if (esi_2 != 0)
005aebbd          {
005aebd2              while (true)
005aebd2              {
005aebd2                  void* eax_5 = operator new(0xc);
005aebd7                  void* ecx_6 = nullptr;
005aebd7                  
005aebde                  if (eax_5 != 0)
005aebde                  {
005aebe0                      uint32_t m_hashKey = esi_2->m_hashKey;
005aebe2                      *(uint32_t*)((char*)eax_5 + 4) = 0;
005aebe5                      *(uint32_t*)eax_5 = m_hashKey;
005aebea                      *(uint32_t*)((char*)eax_5 + 8) = esi_2->m_data;
005aebed                      ecx_6 = eax_5;
005aebde                  }
005aebde                  
005aebf2                  int32_t ebx_1 = *(uint32_t*)((char*)ebx + 0x6c);
005aebf9                  uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)ecx_6) % ebx_1);
005aebf9                  
005aebff                  if (ebp_1 == 0)
005aebff                  {
005aec1f                  label_5aec1f:
005aec1f                      void** eax_12 = (*(uint32_t*)((char*)var_1c + 0x64) + (temp1_1 << 2));
005aec22                      *(uint32_t*)eax_12 = ecx_6;
005aec22                      
005aec24                      if (ebp_1 == 0)
005aec26                          *(uint32_t*)((char*)var_1c + 0x68) = eax_12;
005aec26                      
005aec34                      *(uint32_t*)((char*)var_1c + 0x70) += 1;
005aebff                  }
005aebff                  else
005aebff                  {
005aec06                      uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)ebp_1) % ebx_1);
005aec06                      
005aec0a                      if (temp1_1 == temp1_2)
005aec0a                      {
005aec0c                          *(uint32_t*)((char*)ebp_1 + 4) = ecx_6;
005aec34                          *(uint32_t*)((char*)var_1c + 0x70) += 1;
005aec0a                      }
005aec0a                      else if (temp1_1 > temp1_2)
005aec11                          goto label_5aec1f;
005aebff                  }
005aebff                  
005aec37                  esi_2 = esi_2->m_hashNext;
005aec3c                  ebp_1 = ecx_6;
005aec3c                  
005aec3e                  if (esi_2 == 0)
005aec3e                  {
005aec54                      while (true)
005aec54                      {
005aec54                          void* m_currBucket_1 = &m_currBucket[1];
005aec59                          m_currBucket = m_currBucket_1;
005aec59                          
005aec5d                          if (m_currBucket_1 != &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
005aec5d                          {
005aec5f                              class HashTableData<unsigned long,DBOCache *>* edx_10 = *(uint32_t*)m_currBucket_1;
005aec5f                              
005aec63                              if (edx_10 == 0)
005aec63                                  continue;
005aec63                              else
005aec63                              {
005aec65                                  esi_2 = edx_10;
005aec65                                  
005aec69                                  if (esi_2 != 0)
005aec69                                      break;
005aec63                              }
005aec5d                          }
005aec5d                          
005aec6f                          return var_1c;
005aec54                      }
005aec3e                  }
005aec3e                  
005aebc5                  ebx = var_1c;
005aebd2              }
005aebbd          }
005aeb51      }
005aeb51      
005aec7c      return ebx;
005aeb40  }

005aec7f                                                                                               90                                 .

005aec80  void* __thiscall PHashTable<unsigned long,unsigned long>::`vector deleting destructor'(class PHashTable<unsigned long,unsigned long>* this, uint32_t arg2)

005aec80  {
005aec83      /* tailcall */
005aec83      return PHashTable<unsigned long,unsigned long>::`scalar deleting destructor'(((char*)this - 0x74), arg2);
005aec80  }

005aec88                          cc cc cc cc cc cc cc cc                                                          ........

005aec90  int32_t __thiscall PHashTable<unsigned long,unsigned long>::StreamPack(class PHashTable<unsigned long,unsigned long>* this, enum STREAMTYPE arg2, void** arg3, uint32_t* arg4)

005aec90  {
005aec97      enum STREAMTYPE edi = arg2;
005aec97      
005aeca0      if (edi == STREAM_UNPACK)
005aeca0      {
005aed73          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(((char*)this - 0x70));
005aed73          
005aed93          if (STREAMPACK(STREAM_UNPACK, &arg2, arg3, arg4) != 0)
005aed93          {
005aeda3              uint32_t eax_14 = (arg2 >> 0x18);
005aeda3              
005aeda8              if (eax_14 >= 0x17)
005aedaa                  eax_14 = 0x16;
005aedaa              
005aedba              HashTable<unsigned long,unsigned long,0>::resize(((char*)this - 0x74), g_bucketSizesBegin[eax_14]);
005aedc3              int32_t edi_2 = (arg2 & STREAM_PACK | STREAM_UNPACK | 0xfffffc);
005aedc9              void* ebx_3 = nullptr;
005aedce              int32_t ebp_2 = 0;
005aedce              
005aedd0              if (edi_2 > 0)
005aedd0              {
005aedd4                  while (true)
005aedd4                  {
005aedd4                      void* eax_15 = operator new(0xc);
005aedd9                      void* esi_2 = nullptr;
005aedd9                      
005aede0                      if (eax_15 != 0)
005aede0                      {
005aede2                          *(uint32_t*)((char*)eax_15 + 4) = 0;
005aede5                          esi_2 = eax_15;
005aede0                      }
005aede0                      
005aedfe                      if (STREAMPACK(STREAM_UNPACK, esi_2, arg3, arg4) == 0)
005aee46                          return 0;
005aee46                      
005aee1a                      if (STREAMPACK(STREAM_UNPACK, ((char*)esi_2 + 8), arg3, arg4) == 0)
005aee46                          return 0;
005aee46                      
005aee22                      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(((char*)this - 0x70), esi_2, ebx_3);
005aee27                      ebp_2 += 1;
005aee2a                      ebx_3 = esi_2;
005aee2a                      
005aee2c                      if (ebp_2 >= edi_2)
005aee3a                          return 1;
005aedd4                  }
005aedd0              }
005aedd0              
005aee3a              return 1;
005aed93          }
005aeca0      }
005aeca0      else
005aeca0      {
005aeca6          enum STREAMTYPE vtable = this->vtable;
005aecaf          arg2 = vtable;
005aecaf          
005aecb3          if (vtable <= STREAM_PACK | STREAM_UNPACK | 0xfffffc)
005aecb3          {
005aecbc              int32_t var_24_1 = *(int32_t*)((char*)this + -8);
005aecd6              arg2 = (vtable | (((IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::get_bucket_size_pointer(this) - g_bucketSizesBegin) >> 2) << 0x18));
005aecd6              
005aecf0              if (STREAMPACK(edi, &arg2, arg3, arg4) != 0)
005aecf0              {
005aecfe                  class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable;
005aecfe                  class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_7 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(((char*)this - 0x70), &m_currHashTable);
005aed05                  class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_7->m_currBucket;
005aed08                  class HashTableData<unsigned long,DBOCache *>* m_currElement = eax_7->m_currElement;
005aed0d                  class HashTableData<unsigned long,DBOCache *>* m_currElement_1 = m_currElement;
005aed0f                  m_currHashTable = eax_7->m_currHashTable;
005aed13                  class HashTableData<unsigned long,DBOCache *>* m_currElement_2 = m_currElement_1;
005aed17                  class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
005aed17                  
005aed1b                  if (m_currElement == 0)
005aee3a                      return 1;
005aee3a                  
005aed25                  while (STREAMPACK(edi, m_currElement_1, arg3, arg4) != 0)
005aed25                  {
005aed46                      if (STREAMPACK(edi, &m_currElement_1->m_data, arg3, arg4) == 0)
005aed46                          break;
005aed46                      
005aed50                      HashIterator<unsigned long,BaseProperty,1>::operator++(&m_currHashTable);
005aed55                      m_currElement_1 = m_currElement_2;
005aed55                      
005aed5b                      if (m_currElement_1 == 0)
005aed69                          return 1;
005aed25                  }
005aecf0              }
005aecb3          }
005aeca0      }
005aeca0      
005aee46      return 0;
005aec90  }

005aee49                             90 90 90 90 90 90 90                                                           .......

005aee50  void* __thiscall PHashTable<unsigned long,unsigned long>::`scalar deleting destructor'(class PHashTable<unsigned long,unsigned long>* this, uint32_t arg2)

005aee50  {
005aee54      this->vtable = &PHashTable<unsigned long,unsigned long>::`vftable';
005aee5e      this->vtable = &PackObj::`vftable';
005aee67      this->vtable = 0x79c9ac;
005aee6d      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
005aee72      class HashTableData<unsigned long,unsigned long>** m_buckets = this->m_intrusiveTable.m_buckets;
005aee5b      this->m_intrusiveTable.vtable = 0x79c9a8;
005aee5b      
005aee80      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
005aee83          operator delete[](m_buckets);
005aee83      
005aee5b      this->m_intrusiveTable.m_buckets = nullptr;
005aee5b      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
005aee5b      this->m_intrusiveTable.m_numBuckets = 0;
005aee5b      this->m_intrusiveTable.m_numElements = 0;
005aee5b      
005aee9e      if ((arg2 & 1) != 0)
005aeea1          operator delete(this);
005aeea1      
005aeead      return this;
005aee50  }


005aeeb0  void __fastcall RestrictionDB::RestrictionDB(class RestrictionDB* this)

005aeeb0  {
005aeeb5      this->vtable = 0x7e61b0;
005aeebb      this->_bitmask = 0;
005aeebe      this->_monarch_iid = 0;
005aeec6      this->_table.vtable = 0x79c9ac;
005aeecd      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(&this->_table.m_intrusiveTable, 0x40);
005aeed2      this->_table.vtable = &StreamPackObj::`vftable';
005aeedc      this->_table.vtable = 0x7e61ac;
005aeee3      this->_table.vtable = &PHashTable<unsigned long,unsigned long>::`vftable';
005aeeb0  }

005aeef1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005aef00  class RestrictionDB& __thiscall RestrictionDB::operator=(class RestrictionDB* this, class RestrictionDB const& arg2)

005aef00  {
005aef09      if (this != arg2)
005aef09      {
005aef0e          this->_bitmask = arg2->_bitmask;
005aef1b          this->_monarch_iid = arg2->_monarch_iid;
005aef1e          HashTable<unsigned long,unsigned long,0>::operator=(&this->_table, &arg2->_table);
005aef09      }
005aef09      
005aef26      return this;
005aef00  }

005aef29                             90 90 90 90 90 90 90                                                           .......

005aef30  void __fastcall RestrictionDB::~RestrictionDB(class RestrictionDB* this)

005aef30  {
005aef34      this->vtable = 0x7e61b0;
005aef3a      this->_table.vtable = &PHashTable<unsigned long,unsigned long>::`vftable';
005aef47      this->_table.vtable = &PackObj::`vftable';
005aef53      this->_table.vtable = 0x79c9ac;
005aef5a      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->_table.m_intrusiveTable);
005aef5f      class HashTableData<unsigned long,unsigned long>** m_buckets = this->_table.m_intrusiveTable.m_buckets;
005aef44      this->_table.m_intrusiveTable.vtable = 0x79c9a8;
005aef44      
005aef6d      if (m_buckets != &this->_table.m_intrusiveTable.m_aInplaceBuckets)
005aef70          operator delete[](m_buckets);
005aef70      
005aef44      this->_table.m_intrusiveTable.m_buckets = nullptr;
005aef44      this->_table.m_intrusiveTable.m_firstInterestingBucket = nullptr;
005aef44      this->_table.m_intrusiveTable.m_numBuckets = 0;
005aef44      this->_table.m_intrusiveTable.m_numElements = 0;
005aef86      this->vtable = 0x79285c;
005aef30  }

005aef8f                                               90                                                                 .

005aef90  void* __thiscall RestrictionDB::`scalar deleting destructor'(class RestrictionDB* this, uint32_t arg2)

005aef90  {
005aef93      RestrictionDB::~RestrictionDB(this);
005aef93      
005aef9d      if ((arg2 & 1) != 0)
005aefa0          operator delete(this);
005aefa0      
005aefab      return this;
005aef90  }

005aefae                                            90 90                                                                ..

005aefb0  void __thiscall RestrictionDB::RestrictionDB(class RestrictionDB* this, class RestrictionDB const* arg2)

005aefb0  {
005aefb7      this->vtable = 0x7e61b0;
005aefb4      this->_table.vtable = 0x79c9ac;
005aefc8      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(&this->_table.m_intrusiveTable, 0x17);
005aefb4      this->_table.vtable = &StreamPackObj::`vftable';
005aefb4      this->_table.vtable = 0x7e61ac;
005aefb4      this->_table.vtable = &PHashTable<unsigned long,unsigned long>::`vftable';
005aefb4      
005aefe7      if (this != arg2)
005aefe7      {
005aefec          this->_bitmask = arg2->_bitmask;
005aeff8          this->_monarch_iid = arg2->_monarch_iid;
005aeffb          HashTable<unsigned long,unsigned long,0>::operator=(&this->_table, &arg2->_table.vtable);
005aefe7      }
005aefb0  }

005af007                       90 90 90 90 90 90 90 90 90                                                         .........

005af010  void* __thiscall PackableHashIterator<unsigned long,GuestInfo>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,GuestInfo>* this, uint32_t arg2)

005af010  {
005af018      this->vtable = 0x7e61c4;
005af018      
005af01e      if ((arg2 & 1) != 0)
005af021          operator delete(this);
005af021      
005af02c      return this;
005af010  }

005af02f                                               90                                                                 .

005af030  uint32_t __thiscall HAR::Pack(class HAR* this, void** arg2, uint32_t arg3)

005af030  {
005af030      class HAR* var_4 = this;
005af037      struct PackableHashTable<unsigned long,GuestInfo>::VTable* vtable = this->_guest_table.vtable;
005af046      var_4 = nullptr;
005af064      int32_t ecx_2 = ((vtable->Pack(&var_4, 0) + this->_roommate_list.vtable->Pack(&var_4, 0)) + 0xc);
005af06a      int32_t eax_3 = (ecx_2 & 3);
005af06d      void* const edx_1;
005af06d      
005af06d      if (eax_3 == 0)
005af078          edx_1 = nullptr;
005af06d      else
005af074          edx_1 = (4 - eax_3);
005af074      
005af07e      class HAR* result = ((char*)edx_1 + ecx_2);
005af087      var_4 = result;
005af087      
005af08b      if (arg3 >= result)
005af08b      {
005af08f          **(uint32_t**)arg2 = 0x10000002;
005af097          void* eax_5 = (*(uint32_t*)arg2 + 4);
005af09a          *(uint32_t*)arg2 = eax_5;
005af09f          *(uint32_t*)eax_5 = this->_bitmask;
005af0a3          void* edx_5 = (*(uint32_t*)arg2 + 4);
005af0a6          *(uint32_t*)arg2 = edx_5;
005af0ad          *(uint32_t*)edx_5 = this->_monarch_iid;
005af0b5          *(uint32_t*)arg2 += 4;
005af040          this->_guest_table.vtable->Pack(arg2, arg3);
005af04e          this->_roommate_list.vtable->Pack(arg2, arg3);
005af0cd          result = var_4;
005af08b      }
005af08b      
005af0d3      void* edx_9 = (*(uint32_t*)arg2 & 0x80000003);
005af0d3      bool cond:1 = edx_9 == 0;
005af0d3      
005af0d9      if (edx_9 < 0)
005af0d9      {
005af0dc          void* edx_11 = (((char*)edx_9 - 1) | 0xfffffffc);
005af0df          edx_9 = ((char*)edx_11 + 1);
005af0df          cond:1 = edx_11 == 0xffffffff;
005af0d9      }
005af0d9      
005af0e0      if (!(cond:1))
005af0e0      {
005af0e7          void* i_1 = (4 - edx_9);
005af0e7          
005af0e9          if (4 != edx_9)
005af0e9          {
005af0fb              void* i;
005af0fb              
005af0fb              do
005af0fb              {
005af0f2                  **(uint8_t**)arg2 = 0;
005af0f8                  i = i_1;
005af0f8                  i_1 -= 1;
005af0f9                  *(uint32_t*)arg2 += 1;
005af0fb              } while (i != 1);
005af0e9          }
005af0e0      }
005af0e0      
005af102      return result;
005af030  }

005af0ed                                         8d 49 00                                                               .I.
005af105                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005af110  class PackableHashIterator<unsigned long,GuestInfo>* __thiscall PackableHashTable<unsigned long,GuestInfo>::begin(class PackableHashTable<unsigned long,GuestInfo> const* this, class PackableHashIterator<unsigned long,GuestInfo>* __return)

005af110  {
005af110      uint32_t _table_size = this->_table_size;
005af114      int32_t eax = 0;
005af114      
005af119      if (_table_size > 0)
005af119      {
005af11b          class PackableHashData<unsigned long,GuestInfo>** _buckets_1 = this->_buckets;
005af11e          class PackableHashData<unsigned long,GuestInfo>** _buckets_2 = _buckets_1;
005af11e          
005af12b          do
005af12b          {
005af123              if (*(uint32_t*)_buckets_2 != 0)
005af123              {
005af14c                  int32_t ecx = _buckets_1[eax];
005af14f                  int32_t* __return_1 = __return;
005af153                  __return_1[2] = _buckets_1;
005af158                  __return_1[1] = ecx;
005af15b                  *(uint32_t*)__return_1 = 0x7e61c4;
005af161                  __return_1[3] = _table_size;
005af164                  return __return_1;
005af123              }
005af123              
005af125              eax += 1;
005af126              _buckets_2 = &_buckets_2[1];
005af12b          } while (eax < _table_size);
005af119      }
005af119      
005af12d      class PackableHashData<unsigned long,GuestInfo>** _buckets = this->_buckets;
005af136      __return->_current = nullptr;
005af13d      __return->_buckets = _buckets;
005af140      __return->vtable = 0x7e61c4;
005af146      __return->_table_size = _table_size;
005af149      return __return;
005af110  }

005af167                       90 90 90 90 90 90 90 90 90                                                         .........

005af170  void __fastcall GuestInfo::~GuestInfo(class GuestInfo* this)

005af170  {
005af174      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_char_name.m_buffer;
005af174      
005af187      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005af189          m_buffer->vtable->__vecDelDtor(1);
005af189      
005af191      this->vtable = 0x79285c;
005af170  }

005af19a                                                                                90 90 90 90 90 90                            ......

005af1a0  uint32_t __thiscall PackableHashTable<unsigned long,GuestInfo>::Pack(class PackableHashTable<unsigned long,GuestInfo>* this, void** arg2, uint32_t arg3)

005af1a0  {
005af1a0      class PackableHashTable<unsigned long,GuestInfo>* this_1 = this;
005af1a5      uint32_t result = PackableHashTable<IDClass<_tagDataID,32,0>,ClothingBase>::pack_size(this);
005af1aa      uint32_t ebx = arg3;
005af1b0      uint32_t result_1 = result;
005af1b0      
005af1b4      if (ebx >= result)
005af1b4      {
005af1c9          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005af1cb          *(uint32_t*)arg2 += 4;
005af1d1          uint32_t i = 0;
005af1d5          arg3 = 0;
005af1d5          
005af1d9          if (this->_table_size > 0)
005af1d9          {
005af222              do
005af222              {
005af1e3                  int32_t* j = this->_buckets[i];
005af1e3                  
005af1e8                  if (j != 0)
005af1e8                  {
005af20e                      do
005af20e                      {
005af1f3                          if (ebx >= 4)
005af1f3                          {
005af1f9                              **(uint32_t**)arg2 = *(uint32_t*)j;
005af1fb                              *(uint32_t*)arg2 += 4;
005af1f3                          }
005af1f3                          
005af206                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
005af209                          j = j[4];
005af20e                      } while (j != 0);
005af20e                      
005af210                      result = result_1;
005af214                      i = arg3;
005af1e8                  }
005af1e8                  
005af21b                  i += 1;
005af21e                  arg3 = i;
005af222              } while (i < this->_table_size);
005af1d9          }
005af1b4      }
005af1b4      
005af229      return result;
005af1a0  }

005af1dd                                                                                         8d 49 00                               .I.
005af22c                                      90 90 90 90                                                              ....

005af230  void* __thiscall GuestInfo::`scalar deleting destructor'(class GuestInfo* this, uint32_t arg2)

005af230  {
005af234      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_char_name.m_buffer;
005af234      
005af247      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005af249          m_buffer->vtable->__vecDelDtor(1);
005af249      
005af256      this->vtable = 0x79285c;
005af256      
005af25c      if ((arg2 & 1) != 0)
005af25f          operator delete(this);
005af25f      
005af26b      return this;
005af230  }

005af26e                                            90 90                                                                ..

005af270  class GuestInfo& __thiscall GuestInfo::operator=(class GuestInfo* this, class GuestInfo const& arg2)

005af270  {
005af27a      if (this != arg2)
005af27a      {
005af27f          this->_item_storage_permission = arg2->_item_storage_permission;
005af286          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_char_name.m_buffer;
005af286          
005af28b          if (m_buffer_1 != arg2->_char_name.m_buffer)
005af28b          {
005af29d              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005af29f                  m_buffer_1->vtable->__vecDelDtor(1);
005af29f              
005af2a7              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_char_name.m_buffer;
005af2aa              this->_char_name.m_buffer = m_buffer;
005af2b1              InterlockedIncrement(&m_buffer->m_cRef);
005af28b          }
005af27a      }
005af27a      
005af2bc      return this;
005af270  }

005af2bf                                                                                               90                                 .

005af2c0  void __fastcall GuestInfo::Clear(class GuestInfo* this)

005af2c0  {
005af2c4      this->_item_storage_permission = 0;
005af2cb      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_char_name.m_buffer;
005af2cb      
005af2d4      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
005af2d4      {
005af2e6          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005af2e8              m_buffer->vtable->__vecDelDtor(1);
005af2e8          
005af2f0          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005af2fb          this->_char_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005af2fe          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
005af2d4      }
005af2c0  }

005af307                       90 90 90 90 90 90 90 90 90                                                         .........

005af310  uint32_t __fastcall GuestInfo::GetPackSize(class GuestInfo* this)

005af310  {
005af310      class GuestInfo* this_1 = this;
005af31b      this_1 = nullptr;
005af32c      return (AC1Legacy::PStringBase<char>::Pack(&this->_char_name, &this_1, 0) + 4);
005af310  }

005af32d                                         90 90 90                                                               ...

005af330  uint32_t __thiscall GuestInfo::Pack(class GuestInfo* this, void** arg2, uint32_t arg3)

005af330  {
005af336      int32_t result = this->vtable->GetPackSize();
005af336      
005af341      if (arg3 >= result)
005af341      {
005af34d          **(uint32_t**)arg2 = this->_item_storage_permission;
005af359          *(uint32_t*)arg2 += 4;
005af35b          AC1Legacy::PStringBase<char>::Pack(&this->_char_name, arg2, arg3);
005af341      }
005af341      
005af365      return result;
005af330  }

005af368                          90 90 90 90 90 90 90 90                                                          ........

005af370  void __fastcall GuestInfo::GuestInfo(class GuestInfo* this)

005af370  {
005af37a      this->vtable = 0x7e61dc;
005af380      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005af38c      this->_char_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005af38f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005af391      this->_item_storage_permission = 0;
005af398      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_char_name.m_buffer;
005af398      
005af3a1      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
005af3a1      {
005af3b3          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005af3b5              m_buffer->vtable->__vecDelDtor(1);
005af3b5          
005af3bd          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005af3c9          this->_char_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005af3cc          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_2 + 4));
005af3a1      }
005af370  }

005af3d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005af3e0  int32_t __thiscall GuestInfo::UnPack(class GuestInfo* this, void** arg2, uint32_t arg3)

005af3e0  {
005af3eb      if (arg3 < 4)
005af3f1          return 0;
005af3f1      
005af3f6      GuestInfo::Clear(this);
005af3ff      void* edx = *(uint32_t*)arg2;
005af403      this->_item_storage_permission = *(uint32_t*)edx;
005af408      void* ecx_3 = (*(uint32_t*)arg2 + 4);
005af40b      *(uint32_t*)arg2 = ecx_3;
005af40d      void* ecx_4 = ((char*)ecx_3 - edx);
005af411      void* esi_1;
005af411      
005af411      if (arg3 <= ecx_4)
005af417          esi_1 = nullptr;
005af411      else
005af413          esi_1 = (arg3 - ecx_4);
005af413      
005af41e      int32_t eax_2 = AC1Legacy::PStringBase<char>::UnPack(&this->_char_name, arg2, esi_1);
005af423      int32_t eax_3 = -(eax_2);
005af42b      return -((eax_3 - eax_3));
005af3e0  }

005af42e                                            90 90                                                                ..

005af430  void __fastcall PackableHashTable<unsigned long,GuestInfo>::EmptyContents(class PackableHashTable<unsigned long,GuestInfo>* this)

005af430  {
005af430      class PackableHashTable<unsigned long,GuestInfo>* var_4 = this;
005af430      
005af439      if (this->_buckets != 0)
005af439      {
005af43e          class PackableHashTable<unsigned long,GuestInfo>* i = nullptr;
005af442          var_4 = nullptr;
005af442          
005af446          if (this->_table_size > 0)
005af446          {
005af448              void* j;
005af448              void* j_1 = j;
005af448              
005af4ae              do
005af4ae              {
005af453                  void* j_2 = this->_buckets[i];
005af453                  
005af458                  if (j_2 != 0)
005af458                  {
005af494                      do
005af494                      {
005af460                          int32_t* edi_1 = *(uint32_t*)((char*)j_2 + 0xc);
005af463                          j = *(uint32_t*)((char*)j_2 + 0x10);
005af463                          
005af476                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
005af47e                              **(uint32_t**)edi_1(1);
005af47e                          
005af481                          *(uint32_t*)((char*)j_2 + 4) = 0x79285c;
005af488                          operator delete(j_2);
005af492                          j_2 = j;
005af494                      } while (j != 0);
005af494                      
005af496                      i = var_4;
005af458                  }
005af458                  
005af49a                  this->_buckets[i] = 0;
005af4a7                  i = (&i->vtable + 1);
005af4aa                  var_4 = i;
005af4ae              } while (i < this->_table_size);
005af446          }
005af439      }
005af439      
005af4b3      this->_currNum = 0;
005af430  }

005af44d                                         8d 49 00                                                               .I.
005af4bd                                                                                         90 90 90                               ...

005af4c0  void __thiscall PackableHashData<unsigned long,GuestInfo>::PackableHashData<unsigned long,GuestInfo>(class PackableHashData<unsigned long,GuestInfo>* this, uint32_t const* arg2, class GuestInfo const* arg3, int32_t arg4)

005af4c0  {
005af4c8      uint32_t* this_1 = this;
005af4cb      *(uint32_t*)this_1 = *(uint32_t*)arg2;
005af4cd      this_1[1] = 0x7e61dc;
005af4d6      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005af4cd      this_1[3] = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005af4e5      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005af4f2      GuestInfo::operator=(&this_1[1], arg3);
005af4f7      this_1[4] = 0;
005af509      this_1[5] = (COMBINE(0, *(uint32_t*)arg2) % arg4);
005af4c0  }

005af511                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005af520  int32_t __fastcall GuestInfo::Dump(class GuestInfo const* this, class AC1Legacy::PStringBase<char>* arg2)

005af520  {
005af547      int32_t* __return;
005af547      int32_t* var_4;
005af547      class AC1Legacy::PSRefBuffer<char>* m_buffer = AC1Legacy::PStringBase<char>::operator+(AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, (&data_794338)), &__return, &this->_char_name)->m_buffer;
005af549      uint32_t m_len = m_buffer->m_len;
005af54f      class AC1Legacy::PStringBase<char>* ebp = arg2;
005af54f      
005af55b      if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af565          AC1Legacy::PStringBase<char>::append_n_chars(ebp, &m_buffer->m_data, (m_len - 1));
005af565      
005af56a      int32_t* __return_1 = __return;
005af56a      
005af580      if ((InterlockedDecrement(&__return_1[1]) == 0 && __return_1 != 0))
005af588          **(uint32_t**)__return_1(1);
005af588      
005af58a      int32_t* esi = var_4;
005af58a      
005af59a      if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
005af5a2          **(uint32_t**)esi(1);
005af5a2      
005af5a9      if (this->_item_storage_permission != 0)
005af5a9      {
005af5b4          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_7e61f0);
005af5b9          class AC1Legacy::PStringBase<char>* esi_1 = arg2;
005af5bd          int32_t eax_8 = *(int32_t*)((char*)esi_1 + 8);
005af5bd          
005af5cb          if ((eax_8 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af5d5              AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_1[5], (eax_8 - 1));
005af5d5          
005af5e2          if (InterlockedDecrement(&esi_1[1]) == 0)
005af5e4              esi_1->m_buffer->vtable(1);
005af5a9      }
005af5a9      
005af5f5      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794508);
005af5fa      class AC1Legacy::PStringBase<char>* esi_2 = arg2;
005af5fe      int32_t eax_12 = *(int32_t*)((char*)esi_2 + 8);
005af5fe      
005af60c      if ((eax_12 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af616          AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_2[5], (eax_12 - 1));
005af616      
005af623      if (InterlockedDecrement(&esi_2[1]) == 0)
005af625          esi_2->m_buffer->vtable(1);
005af625      
005af639      return 1;
005af520  }

005af63c                                                                                      90 90 90 90                              ....

005af640  int32_t __fastcall HAR::Dump(class HAR const* this, class AC1Legacy::PStringBase<char>* arg2, uint8_t arg3)

005af640  {
005af647      class HAR* this_1 = this;
005af652      class HAR* this_2 = this_1;
005af656      int32_t* var_14;
005af656      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_14, "Guests:\n");
005af65b      int32_t* esi = var_14;
005af65f      int32_t eax = esi[2];
005af665      class AC1Legacy::PStringBase<char>* ebp = arg2;
005af665      
005af671      if ((eax != 1 && esi != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af67b          AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi[5], (eax - 1));
005af67b      
005af68e      if (InterlockedDecrement(&esi[1]) == 0)
005af696          **(uint32_t**)esi(1);
005af696      
005af69d      class PackableHashIterator<unsigned long,GuestInfo>* i_3;
005af69d      
005af69d      if (this_1->_guest_table._currNum == 0)
005af69d      {
005af6f9          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, "  None\n");
005af6fe          class AC1Legacy::PStringBase<char>* esi_1 = arg2;
005af702          int32_t eax_7 = *(int32_t*)((char*)esi_1 + 8);
005af702          
005af710          if ((eax_7 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af71a              AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_1[5], (eax_7 - 1));
005af71a          
005af727          if (InterlockedDecrement(&esi_1[1]) == 0)
005af729              esi_1->m_buffer->vtable(1);
005af69d      }
005af69d      else
005af69d      {
005af6a7          void __return;
005af6a7          class AC1Legacy::PStringBase<char>* edx_2;
005af6a7          i_3 = PackableHashTable<unsigned long,GuestInfo>::begin(&this_1->_guest_table, &__return);
005af6b4          class PackableHashIterator<unsigned long,GuestInfo>* i_2;
005af6b4          class PackableHashIterator<unsigned long,GuestInfo>* i = i_2;
005af6b4          
005af6ba          while (i != 0)
005af6ba          {
005af6bc              class AC1Legacy::PStringBase<char>* var_2c_4 = ebp;
005af6c0              edx_2 = GuestInfo::Dump(&i->_current, edx_2);
005af6c5              i_3 = *(int32_t*)((char*)i + 0x10);
005af6c5              
005af6ca              if (i_3 == 0)
005af6ca              {
005af6d3                  int32_t eax_6 = (*(int32_t*)((char*)i + 0x14) + 1);
005af6d6                  int32_t var_4;
005af6d6                  
005af6d6                  if (eax_6 >= var_4)
005af6d6                  {
005af6e5                  label_5af6e5:
005af6e5                      i = nullptr;
005af6d6                  }
005af6d6                  else
005af6d6                  {
005af6dc                      int32_t var_8;
005af6dc                      
005af6dc                      while (*(uint32_t*)(var_8 + (eax_6 << 2)) == 0)
005af6dc                      {
005af6de                          eax_6 += 1;
005af6de                          
005af6e1                          if (eax_6 >= var_4)
005af6e1                              goto label_5af6e5;
005af6dc                      }
005af6dc                      
005af6ec                      i = *(uint32_t*)(var_8 + (eax_6 << 2));
005af6d6                  }
005af6ca              }
005af6ca              else
005af6cc                  i = i_3;
005af6ba          }
005af6ba          
005af739          this_1 = this_2;
005af69d      }
005af69d      
005af73d      i_3 = arg3;
005af73d      
005af743      if (i_3 != 0)
005af743      {
005af752          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, "Roommates:\n");
005af757          int32_t* esi_2 = arg3;
005af75b          int32_t eax_10 = esi_2[2];
005af75b          
005af769          if ((eax_10 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af773              AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_2[5], (eax_10 - 1));
005af773          
005af780          if (InterlockedDecrement(&esi_2[1]) == 0)
005af788              **(uint32_t**)esi_2(1);
005af788          
005af78a          class AC1Legacy::ListNode<unsigned long>* i_1 = this_1->_roommate_list._head;
005af78a          
005af78f          if (i_1 == 0)
005af78f          {
005af808              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, "  None\n");
005af80d              int32_t* esi_4 = arg3;
005af811              int32_t eax_19 = esi_4[2];
005af811              
005af81f              if ((eax_19 != 1 && esi_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af829                  AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_4[5], (eax_19 - 1));
005af829              
005af836              if (InterlockedDecrement(&esi_4[1]) == 0)
005af83e                  **(uint32_t**)esi_4(1);
005af78f          }
005af78f          else
005af78f          {
005af799              for (; i_1 != 0; i_1 = i_1->next)
005af799              {
005af79f                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005af7a4                  arg3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005af7ac                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005af7b0                  uint32_t data = i_1->data;
005af7bb                  AC1Legacy::PStringBase<char>::sprintf(&arg3, "  0x%08X\n");
005af7c0                  int32_t* esi_3 = arg3;
005af7c4                  int32_t eax_15 = esi_3[2];
005af7c4                  
005af7d5                  if ((eax_15 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af7df                      AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_3[5], (eax_15 - 1));
005af7df                  
005af7f0                  if (InterlockedDecrement(&esi_3[1]) == 0)
005af7f8                      **(uint32_t**)esi_3(1);
005af799              }
005af78f          }
005af78f          
005af848          this_1 = this_2;
005af743      }
005af743      
005af850      if ((this_1->_bitmask & 6) != 0)
005af850      {
005af85f          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, "Allegiance Permissions: ");
005af864          int32_t* esi_5 = arg3;
005af868          int32_t eax_23 = esi_5[2];
005af868          
005af876          if ((eax_23 != 1 && esi_5 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af880              AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_5[5], (eax_23 - 1));
005af880          
005af88d          if (InterlockedDecrement(&esi_5[1]) == 0)
005af895              **(uint32_t**)esi_5(1);
005af895          
005af89b          if ((this_1->_bitmask & 2) != 0)
005af89b          {
005af8a6              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, "guest access");
005af8ab              int32_t* esi_6 = arg3;
005af8af              int32_t eax_27 = esi_6[2];
005af8af              
005af8bd              if ((eax_27 != 1 && esi_6 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af8c7                  AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_6[5], (eax_27 - 1));
005af8c7              
005af8d4              if (InterlockedDecrement(&esi_6[1]) == 0)
005af8dc                  **(uint32_t**)esi_6(1);
005af89b          }
005af89b          
005af8e2          if ((this_1->_bitmask & 4) != 0)
005af8e2          {
005af8ed              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, "storage access");
005af8f2              int32_t* esi_7 = arg3;
005af8f6              int32_t eax_31 = esi_7[2];
005af8f6              
005af904              if ((eax_31 != 1 && esi_7 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af90e                  AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_7[5], (eax_31 - 1));
005af90e              
005af91b              if (InterlockedDecrement(&esi_7[1]) == 0)
005af923                  **(uint32_t**)esi_7(1);
005af8e2          }
005af8e2          
005af92e          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, &data_794508);
005af933          int32_t* esi_8 = arg3;
005af937          int32_t eax_35 = esi_8[2];
005af937          
005af945          if ((eax_35 != 1 && esi_8 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af94f              AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_8[5], (eax_35 - 1));
005af94f          
005af95c          if (InterlockedDecrement(&esi_8[1]) == 0)
005af964              **(uint32_t**)esi_8(1);
005af850      }
005af850      
005af96a      if ((this_1->_bitmask & 1) != 0)
005af96a      {
005af975          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg3, "[ open house ]\n");
005af97a          int32_t* esi_9 = arg3;
005af97e          int32_t eax_39 = esi_9[2];
005af97e          
005af98c          if ((eax_39 != 1 && esi_9 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005af996              AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_9[5], (eax_39 - 1));
005af996          
005af9a3          if (InterlockedDecrement(&esi_9[1]) == 0)
005af9ab              **(uint32_t**)esi_9(1);
005af96a      }
005af96a      
005af9b9      return 1;
005af640  }

005af9bc                                                                                      90 90 90 90                              ....

005af9c0  int32_t __thiscall HAR::UnPack(class HAR* this, void** arg2, uint32_t arg3)

005af9c0  {
005af9c0      class HAR* this_1 = this;
005af9c2      uint32_t ebx = arg3;
005af9c2      
005af9cc      if (ebx < 4)
005af9d3          return 0;
005af9d3      
005af9dc      void* ebp = *(uint32_t*)arg2;
005af9de      uint32_t eax_1 = *(uint32_t*)ebp;
005af9ed      *(uint32_t*)arg2 = ((char*)ebp + 4);
005af9ef      int32_t eax_2;
005af9ef      
005af9ef      if ((eax_1 & 0xffff0000) != 0)
005af9ef      {
005afa02          arg3 = eax_1;
005afa02          
005afa06          if (eax_1 != 0)
005afa0f              eax_2 = 0xc;
005afa06          else
005afa08              eax_2 = 4;
005af9ef      }
005af9ef      else
005af9ef      {
005af9f1          arg3 = 0;
005af9f9          eax_2 = 4;
005af9ef      }
005af9ef      
005afa16      if (ebx >= eax_2)
005afa16      {
005afa27          this->_bitmask = 0;
005afa2a          this->_monarch_iid = 0;
005afa31          PackableHashTable<unsigned long,GuestInfo>::EmptyContents(&this->_guest_table);
005afa39          List<StringTableMetaLanguage::Node const *>::flush(&this->_roommate_list);
005afa39          
005afa44          if (arg3 == 0)
005afa44          {
005afa4c              uint32_t _bitmask = this->_bitmask;
005afa4f              uint32_t eax_6;
005afa4f              
005afa4f              if (eax_1 == 0)
005afa56                  eax_6 = (_bitmask & 0xfffffffe);
005afa4f              else
005afa51                  eax_6 = (_bitmask | 1);
005afa51              
005afa59              this->_bitmask = eax_6;
005afa5e              void* eax_8 = (*(uint32_t*)arg2 - ebp);
005afa62              void* ebx_1;
005afa62              
005afa62              if (ebx <= eax_8)
005afa68                  ebx_1 = nullptr;
005afa62              else
005afa64                  ebx_1 = (ebx - eax_8);
005afa64              
005afa72              int32_t eax_9 = this->_guest_table.vtable->UnPack(arg2, ebx_1);
005afa76              int32_t eax_10 = -(eax_9);
005afa80              return -((eax_10 - eax_10));
005afa44          }
005afa44          
005afa87          this->_bitmask = **(uint32_t**)arg2;
005afa8c          void* ecx_9 = (*(uint32_t*)arg2 + 4);
005afa8f          *(uint32_t*)arg2 = ecx_9;
005afa95          this->_monarch_iid = *(uint32_t*)ecx_9;
005afa9a          void* eax_16 = (*(uint32_t*)arg2 + 4);
005afa9d          *(uint32_t*)arg2 = eax_16;
005afa9f          void* eax_17 = ((char*)eax_16 - ebp);
005afaa3          void* ecx_11;
005afaa3          
005afaa3          if (ebx <= eax_17)
005afaab              ecx_11 = nullptr;
005afaa3          else
005afaa7              ecx_11 = (ebx - eax_17);
005afaa7          
005afabc          if (this->_guest_table.vtable->UnPack(arg2, ecx_11) != 0)
005afabc          {
005afaca              if (arg3 < 0x10000002)
005afaca              {
005afaed                  PackObj::ALIGN_PTR(arg2);
005afaff                  return 1;
005afaca              }
005afaca              
005afae6              if (this->_roommate_list.vtable->UnPack(arg2, PackObj::GET_SIZE_LEFT(*(uint32_t*)arg2, ebp, ebx)) != 0)
005afae6              {
005afaed                  PackObj::ALIGN_PTR(arg2);
005afaff                  return 1;
005afae6              }
005afabc          }
005afa16      }
005afa16      
005afa1f      return 0;
005af9c0  }

005afb02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005afb10  int32_t __thiscall PackableHashTable<unsigned long,GuestInfo>::add(class PackableHashTable<unsigned long,GuestInfo>* this, uint32_t const* arg2, class GuestInfo const* arg3)

005afb10  {
005afb1a      uint32_t _table_size = this->_table_size;
005afb1a      
005afb1f      if (_table_size == 0)
005afb1f      {
005afb4e      label_5afb4e:
005afb4e          void* eax_4 = operator new(0x18);
005afb4e          
005afb58          if (eax_4 != 0)
005afb58          {
005afb66              void* eax_5 = PackableHashData<unsigned long,GuestInfo>::PackableHashData<unsigned long,GuestInfo>(eax_4, arg2, arg3, this->_table_size);
005afb66              
005afb6d              if (eax_5 != 0)
005afb6d              {
005afb78                  int32_t ecx_2 = *(uint32_t*)((char*)eax_5 + 0x14);
005afb81                  *(uint32_t*)((char*)eax_5 + 0x10) = this->_buckets[ecx_2];
005afb84                  this->_buckets[ecx_2] = eax_5;
005afb8f                  this->_currNum += 1;
005afb9a                  return 1;
005afb6d              }
005afb58          }
005afb1f      }
005afb1f      else
005afb1f      {
005afb21          class PackableHashData<unsigned long,GuestInfo>** _buckets = this->_buckets;
005afb21          
005afb26          if (_buckets == 0)
005afb26              goto label_5afb4e;
005afb26          
005afb28          uint32_t const i = *(uint32_t*)arg2;
005afb31          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size)];
005afb31          
005afb36          if (edx_3 == 0)
005afb36              goto label_5afb4e;
005afb36          
005afb3a          while (i != *(uint32_t*)edx_3)
005afb3a          {
005afb3c              edx_3 = edx_3[4];
005afb3c              
005afb41              if (edx_3 == 0)
005afb41                  goto label_5afb4e;
005afb3a          }
005afb3a          
005afb4a          if (edx_3 == 0xfffffffc)
005afb4a              goto label_5afb4e;
005afb1f      }
005afb1f      
005afb75      return 0;
005afb10  }

005afb9d                                                                                         90 90 90                               ...

005afba0  int32_t __thiscall PackableHashTable<unsigned long,GuestInfo>::UnPack(class PackableHashTable<unsigned long,GuestInfo>* this, void** arg2, uint32_t arg3)

005afba0  {
005afbae      if (arg3 < 4)
005afbb7          return 0;
005afbb7      
005afbbc      void** edi = arg2;
005afbc0      void* eax_1 = *(uint32_t*)edi;
005afbc8      uint32_t var_10 = arg3;
005afbcc      PackableHashTable<unsigned long,GuestInfo>::EmptyContents(this);
005afbd1      class PackableHashData<unsigned long,GuestInfo>** _buckets = this->_buckets;
005afbd1      
005afbd8      if (_buckets != 0)
005afbd8      {
005afbdb          operator delete[](_buckets);
005afbe3          this->_buckets = nullptr;
005afbd8      }
005afbd8      
005afbe6      this->_table_size = 0;
005afbe9      void* ecx_1 = *(uint32_t*)edi;
005afbeb      int32_t eax_2 = *(uint32_t*)ecx_1;
005afbf0      *(uint32_t*)edi = ((char*)ecx_1 + 4);
005afbf4      uint32_t ecx_4 = (eax_2 >> 0x10);
005afbf7      int32_t eax_3 = (eax_2 & 0xffff);
005afbfc      void** ebx_1 = (arg3 - 4);
005afc01      this->_table_size = ecx_4;
005afc01      
005afc06      if (ecx_4 == 0)
005afc06      {
005afc0f          int32_t result;
005afc0f          result = eax_3 == 0;
005afc16          return result;
005afc06      }
005afc06      
005afc2b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
005afc2b      {
005afc44          int32_t var_c;
005afc44          GuestInfo::GuestInfo(&var_c);
005afc4b          arg3 = 0;
005afc53          int32_t* ecx_9;
005afc53          
005afc53          if (eax_3 <= 0)
005afc53          {
005afcb8          label_5afcb8:
005afcb8              ecx_9 = &var_c;
005afcb8              
005afcbc              if (var_10 >= (*(uint32_t*)edi - eax_1))
005afcbc              {
005afcbe                  GuestInfo::~GuestInfo(ecx_9);
005afccf                  return 1;
005afcbc              }
005afc53          }
005afc53          else
005afc53          {
005afc60              while (true)
005afc60              {
005afc60                  arg2 = ebx_1;
005afc6e                  void var_18;
005afc6e                  
005afc6e                  if (((PackObj::UNPACK_TYPE(&var_18, edi, &arg2) != 0 && *(uint32_t*)(var_c + 0x10)(edi, ebx_1) != 0) && (PackableHashTable<unsigned long,GuestInfo>::add(this, &var_18, &var_c) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
005afc6e                  {
005afca2                      bool cond:5_1 = (arg3 + 1) < eax_3;
005afca4                      arg3 += 1;
005afca4                      
005afca8                      if (!(cond:5_1))
005afca8                          goto label_5afcb8;
005afca8                      
005afca8                      continue;
005afc6e                  }
005afc6e                  
005afcd2                  ecx_9 = &var_c;
005afcd2                  break;
005afc60              }
005afc53          }
005afc53          
005afcd6          GuestInfo::~GuestInfo(ecx_9);
005afc2b      }
005afc2b      
005afce4      return 0;
005afba0  }

005afce7                       90 90 90 90 90 90 90 90 90                                                         .........

005afcf0  void* __thiscall PackableHashTable<unsigned long,GuestInfo>::`scalar deleting destructor'(class PackableHashTable<unsigned long,GuestInfo>* this, uint32_t arg2)

005afcf0  {
005afcf3      this->vtable = 0x7e61c8;
005afcf9      PackableHashTable<unsigned long,GuestInfo>::EmptyContents(this);
005afcfe      class PackableHashData<unsigned long,GuestInfo>** _buckets = this->_buckets;
005afcfe      
005afd03      if (_buckets != 0)
005afd03      {
005afd06          operator delete[](_buckets);
005afd0e          this->_buckets = nullptr;
005afd03      }
005afd03      
005afd1a      this->_table_size = 0;
005afd21      this->vtable = 0x79285c;
005afd21      
005afd27      if ((arg2 & 1) != 0)
005afd2a          operator delete(this);
005afd2a      
005afd35      return this;
005afcf0  }

005afd38                                                                          90 90 90 90 90 90 90 90                          ........

005afd40  void __fastcall HAR::HAR(class HAR* this)

005afd40  {
005afd48      this->vtable = 0x7e626c;
005afd45      this->_guest_table.vtable = 0x7e61c8;
005afd45      this->_guest_table.m_fThrowawayDuplicateKeysOnUnPack = 0;
005afd45      this->_guest_table._buckets = nullptr;
005afd45      this->_guest_table._table_size = 0x40;
005afd45      this->_guest_table._currNum = 0;
005afd69      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_guest_table);
005afd6e      this->_roommate_list._head = nullptr;
005afd6e      this->_roommate_list._tail = nullptr;
005afd6e      this->_roommate_list._num_elements = 0;
005afd6e      this->_roommate_list.vtable = &PackObj::`vftable';
005afd6e      this->_roommate_list.vtable = 0x7a7388;
005afd6e      this->_roommate_list.vtable = &PList<unsigned long>::`vftable';
005afd90      this->_bitmask = 0;
005afd93      this->_monarch_iid = 0;
005afd96      PackableHashTable<unsigned long,GuestInfo>::EmptyContents(&this->_guest_table);
005afd9d      List<StringTableMetaLanguage::Node const *>::flush(&this->_roommate_list);
005afd40  }

005afda9                             90 90 90 90 90 90 90                                                           .......

005afdb0  void __fastcall HAR::~HAR(class HAR* this)

005afdb0  {
005afdbd      this->vtable = 0x7e626c;
005afdc3      this->_bitmask = 0;
005afdc6      this->_monarch_iid = 0;
005afdc9      PackableHashTable<unsigned long,GuestInfo>::EmptyContents(&this->_guest_table);
005afdd3      List<StringTableMetaLanguage::Node const *>::flush(&this->_roommate_list);
005afdce      this->_roommate_list.vtable = &PList<unsigned long>::`vftable';
005afdce      this->_roommate_list.vtable = &PackObj::`vftable';
005afdce      this->_roommate_list.vtable = 0x7a4110;
005afdee      List<StringTableMetaLanguage::Node const *>::flush(&this->_roommate_list);
005afdb8      this->_guest_table.vtable = 0x7e61c8;
005afdfb      PackableHashTable<unsigned long,GuestInfo>::EmptyContents(&this->_guest_table);
005afe00      class PackableHashData<unsigned long,GuestInfo>** _buckets = this->_guest_table._buckets;
005afe00      
005afe05      if (_buckets != 0)
005afe05      {
005afe08          operator delete[](_buckets);
005afdb8          this->_guest_table._buckets = nullptr;
005afe05      }
005afe05      
005afdb8      this->_guest_table._table_size = 0;
005afdb8      this->_guest_table.vtable = 0x79285c;
005afe1c      this->vtable = 0x79285c;
005afdb0  }

005afe27                       90 90 90 90 90 90 90 90 90                                                         .........

005afe30  void* __thiscall HAR::`scalar deleting destructor'(class HAR* this, uint32_t arg2)

005afe30  {
005afe33      HAR::~HAR(this);
005afe33      
005afe3d      if ((arg2 & 1) != 0)
005afe40          operator delete(this);
005afe40      
005afe4b      return this;
005afe30  }

005afe4e                                            90 90                                                                ..

005afe50  void __thiscall TSRecv::TSRecv(class TSRecv* this, enum TSRecvMode arg2, uint32_t arg3)

005afe50  {
005afe58      this->mode_ = arg2;
005afe5f      this->receivedFirstEntry_ = 0;
005afe61      this->overflowLimit_ = arg3;
005afe64      __builtin_memset(&this->highestStamp_, 0, 0x1c);
005afe50  }

005afe7c                                                                                      90 90 90 90                              ....

005afe80  int32_t __thiscall TSRecv::GetNextReadyEntry(class TSRecv* this, uint32_t* arg2, class ReferenceCountTemplate<1048576,0>** arg3)

005afe80  {
005afe93      *(uint32_t*)arg2 = this->highestStamp_;
005afe95      *(uint32_t*)arg3 = nullptr;
005afe97      class TSBlockedEntry* m_pNext_1 = this->head_.m_pNext;
005afe97      
005afe9c      if (m_pNext_1 != 0)
005afe9c      {
005afe9e          uint32_t m_stamp = m_pNext_1->m_stamp;
005afea1          uint32_t highestStamp_ = this->highestStamp_;
005afea1          
005afeab          if ((m_stamp == highestStamp_ || m_stamp == (highestStamp_ + 1)))
005afeab          {
005afed0              *(uint32_t*)arg2 = m_pNext_1->m_stamp;
005afed5              *(uint32_t*)arg3 = m_pNext_1->m_pObj;
005afed7              class TSBlockedEntry* m_pNext = m_pNext_1->m_pNext;
005afed9              m_pNext_1->m_pObj = nullptr;
005afedc              this->head_.m_pNext = m_pNext;
005afee2              this->highestStamp_ = m_pNext_1->m_stamp;
005afee5              class ReferenceCountTemplate<1048576,0>* m_pObj = m_pNext_1->m_pObj;
005afee5              
005afeea              if ((m_pObj != 0 && (InterlockedDecrement(&m_pObj->m_cRef) == 0 && m_pObj != 0)))
005afefe                  m_pObj->vtable->__vecDelDtor(1);
005afefe              
005aff07              operator delete(m_pNext_1);
005aff0c              int32_t numBlockedStamps_ = this->numBlockedStamps_;
005aff0c              
005aff14              if (numBlockedStamps_ != 0)
005aff14              {
005aff19                  this->numBlockedStamps_ = (numBlockedStamps_ - 1);
005aff19                  
005aff1c                  if ((numBlockedStamps_ - 1) < 0)
005aff1e                      this->numBlockedStamps_ = 0;
005aff14              }
005aff14              
005aff24              if (this->numBlockedStamps_ == 0)
005aff24              {
005aff26                  this->blockedSince_ = 0f;
005aff29                  *(uint32_t*)((char*)this->blockedSince_)[4] = 0;
005aff24              }
005aff24              
005aff35              return 1;
005afeab          }
005afeab          
005afeb0          if (this->numBlockedStamps_ != 0)
005afeb0          {
005afebe              this->blockedSince_ = (*(uint32_t*)Timer::cur_time);
005afec1              *(uint32_t*)((char*)this->blockedSince_)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005afeb0          }
005afe9c      }
005afe9c      
005afeca      return 0;
005afe80  }

005aff38                                                                          90 90 90 90 90 90 90 90                          ........

005aff40  void __fastcall TSRecv::~TSRecv(class TSRecv* this)

005aff40  {
005aff4f      while (this->head_.m_pNext != 0)
005aff4f      {
005aff53          class TSBlockedEntry* m_pNext = this->head_.m_pNext;
005aff58          this->head_.m_pNext = m_pNext->m_pNext;
005aff5b          class ReferenceCountTemplate<1048576,0>* m_pObj = m_pNext->m_pObj;
005aff5b          
005aff60          if ((m_pObj != 0 && (InterlockedDecrement(&m_pObj->m_cRef) == 0 && m_pObj != 0)))
005aff70              m_pObj->vtable->__vecDelDtor(1);
005aff70          
005aff79          operator delete(m_pNext);
005aff4f      }
005aff4f      
005aff8a      class ReferenceCountTemplate<1048576,0>* m_pObj_1 = this->head_.m_pObj;
005aff8a      
005aff8f      if ((m_pObj_1 != 0 && (InterlockedDecrement(&m_pObj_1->m_cRef) == 0 && m_pObj_1 != 0)))
005aff9f          m_pObj_1->vtable->__vecDelDtor(1);
005aff40  }

005affaa                                90 90 90 90 90 90                                                            ......

005affb0  int32_t __thiscall TSRecv::AddEntryLatest(class TSRecv* this, uint32_t arg2, class ReferenceCountTemplate<1048576,0>* arg3, uint32_t* arg4, class ReferenceCountTemplate<1048576,0>** arg5)

005affb0  {
005affb0      uint32_t highestStamp__1 = this->highestStamp_;
005affc1      this->receivedFirstEntry_ = 1;
005affc7      *(uint32_t*)arg4 = highestStamp__1;
005affca      *(uint32_t*)arg5 = nullptr;
005affd0      uint32_t highestStamp_ = this->highestStamp_;
005affd0      
005affd6      if (arg2 != highestStamp_)
005affd6      {
005affda          uint32_t esi_2 = (arg2 - highestStamp_);
005affdf          int32_t edi_1 = 1;
005affdf          
005affe4          if (arg2 < highestStamp_)
005affe4          {
005affe8              esi_2 = (highestStamp_ - arg2);
005affea              edi_1 = 0xffffffff;
005affe4          }
005affe4          
005afff3          if (esi_2 >= 0x7fffffff)
005afff5              edi_1 = -(edi_1);
005afff5          
005afff9          highestStamp_ = edi_1 > 0;
005afff9          
005b0002          if (((uint32_t)highestStamp_) != 0)
005b0002          {
005b0008              this->highestStamp_ = arg2;
005b000f              *(uint32_t*)arg4 = arg2;
005b0012              InterlockedIncrement(&arg3->m_cRef);
005b0018              *(uint32_t*)arg5 = arg3;
005b0022              return 1;
005b0002          }
005affd6      }
005affd6      
005b002d      return 3;
005affb0  }


005b0030  void __thiscall TSRecv::AddEntry(class TSRecv* this, uint32_t arg2, class ReferenceCountTemplate<1048576,0>* arg3, int32_t* arg4)

005b0030  {
005b0036      void* eax = operator new(0xc);
005b0036      
005b0042      if (eax == 0)
005b006c          arg2 = 0;
005b0042      else
005b0042      {
005b0048          *(uint32_t*)((char*)eax + 4) = arg2;
005b0051          *(uint32_t*)eax = 0;
005b0057          *(uint32_t*)((char*)eax + 8) = arg3;
005b0057          
005b005a          if (arg3 != 0)
005b0060              InterlockedIncrement(&arg3->m_cRef);
005b0060          
005b0066          arg2 = eax;
005b0042      }
005b0042      
005b0075      class TSBlockedEntry* m_pNext_1 = &this->head_;
005b0079      class TSBlockedEntry* m_pNext = m_pNext_1->m_pNext;
005b0079      
005b007d      if (m_pNext != 0)
005b007d      {
005b0083          int32_t esi_1 = *(uint32_t*)(arg2 + 4);
005b0083          
005b00bd          do
005b00bd          {
005b0086              uint32_t m_stamp = m_pNext->m_stamp;
005b0086              
005b008b              if (esi_1 == m_stamp)
005b008b                  break;
005b008b              
005b008f              int32_t ecx_2 = (esi_1 - m_stamp);
005b0093              int32_t edx_1 = 1;
005b0093              
005b0098              if (esi_1 < m_stamp)
005b0098              {
005b009c                  ecx_2 = (m_stamp - esi_1);
005b009e                  edx_1 = 0xffffffff;
005b0098              }
005b0098              
005b00a7              if (ecx_2 >= 0x7fffffff)
005b00a9                  edx_1 = -(edx_1);
005b00a9              
005b00ad              edx_1 = edx_1 > 0;
005b00ad              
005b00b5              if (((uint32_t)edx_1) == 0)
005b00b5                  break;
005b00b5              
005b00b7              m_pNext_1 = m_pNext;
005b00b9              m_pNext = m_pNext->m_pNext;
005b00bd          } while (m_pNext != 0);
005b007d      }
005b007d      
005b00bf      class TSBlockedEntry** eax_6 = arg2;
005b00c3      *(uint32_t*)eax_6 = m_pNext;
005b00c5      m_pNext_1->m_pNext = eax_6;
005b00c5      
005b00ce      if (this->numBlockedStamps_ < 0)
005b00d0          this->numBlockedStamps_ = 0;
005b00d0      
005b00dc      this->numBlockedStamps_ += 1;
005b0030  }

005b00e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005b00f0  int32_t __thiscall TSRecv::AddEntryBlocking(class TSRecv* this, uint32_t arg2, class ReferenceCountTemplate<1048576,0>* arg3, uint32_t* arg4, class ReferenceCountTemplate<1048576,0>** arg5)

005b00f0  {
005b00fd      uint32_t* edi = arg4;
005b0101      *(uint32_t*)edi = this->highestStamp_;
005b0103      *(uint32_t*)arg5 = nullptr;
005b0103      
005b0111      if (this->receivedFirstEntry_ == 0)
005b0111      {
005b0124          this->receivedFirstEntry_ = 1;
005b012a      label_5b012a:
005b012a          uint32_t highestStamp_ = this->highestStamp_;
005b012a          
005b013a          if ((arg2 == highestStamp_ || arg2 == (highestStamp_ + 1)))
005b013a          {
005b01f9              this->highestStamp_ = arg2;
005b01fc              class ReferenceCountTemplate<1048576,0>* esi_1 = arg3;
005b0202              *(uint32_t*)edi = arg2;
005b0202              
005b0204              if (esi_1 != 0)
005b020a                  InterlockedIncrement(&esi_1->m_cRef);
005b020a              
005b0211              *(uint32_t*)arg5 = esi_1;
005b021c              return 1;
005b013a          }
005b013a          
005b0140          class ReferenceCountTemplate<1048576,0>* edx_2 = arg3;
005b0144          *(uint32_t*)edi = highestStamp_;
005b014c          *(uint32_t*)arg5 = nullptr;
005b0153          int32_t numBlockedStamps_ = this->numBlockedStamps_;
005b0159          arg4 = nullptr;
005b0161          TSRecv::AddEntry(this, arg2, edx_2, &arg4);
005b0161          
005b016e          if (arg4 == 0)
005b016e          {
005b0178              if ((numBlockedStamps_ == 0 && this->numBlockedStamps_ == 1))
005b0178              {
005b0185                  this->blockedSince_ = (*(uint32_t*)Timer::cur_time);
005b0188                  *(uint32_t*)((char*)this->blockedSince_)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
005b0178              }
005b0178              
005b018f              if (this->numBlockedStamps_ >= 0x14)
005b018f              {
005b0191                  long double x87_r7_1 = ((long double)this->blockedSince_);
005b0194                  long double temp1_1 = ((long double)0.0);
005b0194                  (x87_r7_1 - temp1_1);
005b019a                  uint32_t* eax_3;
005b019a                  eax_3 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005b019c                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005b019c                  
005b019f                  if (p_1)
005b019f                  {
005b01a7                      long double x87_r7_3 = (((long double)Timer::cur_time) - ((long double)this->blockedSince_));
005b01aa                      long double temp2_1 = ((long double)300.0);
005b01aa                      (x87_r7_3 - temp2_1);
005b01b0                      eax_3 = ((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005b01b0                      
005b01b5                      if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
005b01b5                      {
005b01c5                          uint32_t eax_5 = (this->highestStamp_ + 1);
005b01c6                          arg4 = nullptr;
005b01ca                          arg3 = nullptr;
005b01d1                          TSRecv::AddEntryBlocking(this, eax_5, nullptr, &arg4, &arg3);
005b01da                          int32_t eax_6 = TSRecv::GetNextReadyEntry(this, edi, arg5);
005b01e0                          int32_t eax_7 = -(eax_6);
005b01ea                          return ((eax_7 - eax_7) + 2);
005b01b5                      }
005b019f                  }
005b018f              }
005b018f              
005b01f6              return 2;
005b016e          }
005b0111      }
005b0111      else if (arg2 > this->highestStamp_)
005b0116          goto label_5b012a;
005b0116      
005b0121      return 3;
005b00f0  }

005b021f                                                                                               90                                 .

005b0220  int32_t __thiscall TSRecv::AddAndCheck(class TSRecv* this, uint32_t arg2, class ReferenceCountTemplate<1048576,0>* arg3, uint32_t* arg4, class ReferenceCountTemplate<1048576,0>** arg5)

005b0220  {
005b0224      *(uint32_t*)arg5 = nullptr;
005b022a      enum TSRecvMode mode_ = this->mode_;
005b022a      
005b0230      if (mode_ == TSRECV_BLOCK)
005b0247          /* tailcall */
005b0247          return TSRecv::AddEntryBlocking(this, arg2, arg3, arg4, arg5);
005b0247      
005b0233      if (mode_ == 1)
005b023e          /* tailcall */
005b023e          return TSRecv::AddEntryLatest(this, arg2, arg3, arg4, arg5);
005b023e      
005b0237      return 0;
005b0220  }

005b024c                                      90 90 90 90                                                              ....

005b0250  int32_t __thiscall PortalDH::Init(class PortalDH* this, class AC1Legacy::vlong* arg2, class AC1Legacy::vlong* arg3)

005b0250  {
005b0258      AC1Legacy::vlong::operator=(this, arg2);
005b0265      AC1Legacy::vlong::operator=(&this->shared_prime_, arg3);
005b0270      return 1;
005b0250  }

005b0273                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005b0280  void __thiscall AC1Legacy::flex_unit::reserve(class AC1Legacy::flex_unit* this, uint32_t arg2)

005b0280  {
005b028b      if (arg2 > this->z)
005b028b      {
005b0296          void* eax_2 = operator new[]((arg2 << 2));
005b02a3          int32_t i = 0;
005b02a3          
005b02a7          if (this->n > 0)
005b02a7          {
005b02be              do
005b02be              {
005b02b5                  *(uint32_t*)((char*)eax_2 + (i << 2)) = this->a[i];
005b02bb                  i += 1;
005b02be              } while (i < this->n);
005b02a7          }
005b02a7          
005b02c3          operator delete[](this->a);
005b02cb          this->a = eax_2;
005b02cd          this->z = arg2;
005b028b      }
005b0280  }

005b02d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b02e0  void __thiscall AC1Legacy::flex_unit::set(class AC1Legacy::flex_unit* this, uint32_t arg2, uint32_t arg3)

005b02e0  {
005b02ed      if (arg2 < this->n)
005b02ed      {
005b02f5          this->a[arg2] = arg3;
005b02f5          
005b0301          if ((arg3 == 0 && this->n != 0))
005b0301          {
005b0303              uint32_t* a = this->a;
005b0303              
005b0305              while (true)
005b0305              {
005b0305                  uint32_t n = this->n;
005b0305                  
005b030e                  if (a[(n - 1)] != 0)
005b030e                      break;
005b030e                  
005b0313                  this->n = (n - 1);
005b0313                  
005b0316                  if (n == 1)
005b031a                      return;
005b0305              }
005b0301          }
005b02ed      }
005b02ed      else if (arg3 != 0)
005b0324      {
005b032d          AC1Legacy::flex_unit::reserve(this, (arg2 + 1));
005b032d          
005b0337          for (uint32_t n_1 = this->n; n_1 < arg2; n_1 += 1)
005b0340              this->a[n_1] = 0;
005b0340          
005b034e          this->a[arg2] = arg3;
005b0353          this->n = (arg2 + 1);
005b0324      }
005b02e0  }

005b035d                                                                                         90 90 90                               ...

005b0360  uint32_t do_inner(uint32_t arg1, uint32_t arg2, uint32_t* arg3, uint32_t* arg4)

005b0360  {
005b0363      int32_t ecx;
005b0363      int32_t var_8 = ecx;
005b0366      int32_t result = 0;
005b036d      uint32_t* edi = arg3;
005b0370      uint32_t* esi = arg4;
005b038f      uint32_t i;
005b038f      
005b038f      do
005b038f      {
005b0375          int32_t eax_2;
005b0375          int32_t edx_1;
005b0375          edx_1 = HIGHD((*(uint32_t*)esi * arg2));
005b0375          eax_2 = LOWD((*(uint32_t*)esi * arg2));
005b0378          esi = &esi[1];
005b037b          int32_t eax_3 = (eax_2 + result);
005b0381          uint32_t temp2_1 = *(uint32_t*)edi;
005b0381          *(uint32_t*)edi += eax_3;
005b0386          edi = &edi[1];
005b0389          result = ((edx_1 + 0) + 0);
005b038c          i = arg1;
005b038c          arg1 -= 1;
005b038f      } while (i != 1);
005b0399      return result;
005b0360  }

005b039a                                                                                cc cc cc cc cc cc                            ......

005b03a0  void __thiscall AC1Legacy::flex_unit::fast_mul(class AC1Legacy::flex_unit* this, class AC1Legacy::flex_unit* arg2, class AC1Legacy::flex_unit* arg3, uint32_t arg4)

005b03a0  {
005b03a0      class AC1Legacy::flex_unit* this_1 = this;
005b03a3      uint32_t esi = arg4;
005b03ab      uint32_t n_2 = ((esi + 0x1f) >> 5);
005b03b1      AC1Legacy::flex_unit::reserve(this, n_2);
005b03b6      int32_t eax = 0;
005b03b6      
005b03ba      if (n_2 > 0)
005b03ba      {
005b03cc          do
005b03cc          {
005b03c0              this->a[eax] = 0;
005b03c9              eax += 1;
005b03cc          } while (eax < n_2);
005b03ba      }
005b03ba      
005b03d2      uint32_t n = arg2->n;
005b03d7      uint32_t n_1 = n;
005b03d7      
005b03db      if (n > n_2)
005b03db      {
005b03dd          n_1 = n_2;
005b03e1          n = n_2;
005b03db      }
005b03db      
005b03e4      int32_t ebp = 0;
005b03e4      
005b03e8      if (n > 0)
005b03e8      {
005b0455          do
005b0455          {
005b03f6              int32_t* eax_1 = (ebp << 2);
005b0407              uint32_t n_3 = (arg3->n + ebp);
005b0407              
005b040b              if (n_3 > n_2)
005b040d                  n_3 = n_2;
005b040d              
005b041d              uint32_t eax_4 = do_inner((n_3 - ebp), *(uint32_t*)((char*)eax_1 + arg2->a), (this->a + eax_1), arg3->a);
005b041d              
005b0427              if (eax_4 != 0)
005b0427              {
005b0432                  while (n_3 < n_2)
005b0432                  {
005b0434                      uint32_t* a_1 = this->a;
005b0439                      a_1[n_3] += eax_4;
005b0447                      eax_4 = -((eax_4 - eax_4));
005b0449                      n_3 += 1;
005b0449                      
005b044c                      if (eax_4 == 0)
005b044c                          break;
005b0432                  }
005b0427              }
005b0427              
005b0452              ebp += 1;
005b0455          } while (ebp < n_1);
005b0455          
005b0457          esi = arg4;
005b03e8      }
005b03e8      
005b045b      int32_t esi_2 = (esi & 0x1f);
005b045b      
005b045f      if (esi_2 != 0)
005b045f      {
005b0461          uint32_t* a = this->a;
005b0470          a[(n_2 - 1)] &= ((1 << esi_2) - 1);
005b045f      }
005b045f      
005b047b      if (n_2 != 0)
005b047b      {
005b047f          void* eax_9 = &this[0].a[n_2];
005b047f          
005b0486          while (*(uint32_t*)eax_9 == 0)
005b0486          {
005b0488              n_2 -= 1;
005b0489              eax_9 -= 4;
005b0489              
005b048e              if (n_2 == 0)
005b048e                  break;
005b0486          }
005b047b      }
005b047b      
005b0490      this->n = n_2;
005b03a0  }

005b049a                                                                                90 90 90 90 90 90                            ......

005b04a0  uint32_t __fastcall AC1Legacy::vlong_value::bits(class AC1Legacy::vlong_value const* this)

005b04a0  {
005b04a0      uint32_t n = this->n;
005b04a0      
005b04a5      if (n == 0)
005b04e2          return n;
005b04e2      
005b04ad      uint32_t esi_1;
005b04ad      
005b04ad      if ((n - 1) < n)
005b04b5          esi_1 = this->a[(n - 1)];
005b04ad      else
005b04af          esi_1 = 0;
005b04af      
005b04bb      int32_t eax_1 = ((n - 1) << 5);
005b04bb      
005b04d6      for (uint32_t i = 0x20; i > 8; )
005b04d6      {
005b04c2          i u>>= 1;
005b04c2          
005b04cd          if (esi_1 >= (1 << i))
005b04cd          {
005b04cf              eax_1 += i;
005b04d1              esi_1 u>>= i;
005b04cd          }
005b04d6      }
005b04d6      
005b04df      return (eax_1 + ((uint32_t)*(uint8_t*)(esi_1 + 0x821360)));
005b04a0  }

005b04e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005b04f0  int32_t __thiscall AC1Legacy::vlong_value::cf(class AC1Legacy::vlong_value const* this, class AC1Legacy::vlong_value* arg2)

005b04f0  {
005b04f6      uint32_t n = arg2->n;
005b04fa      uint32_t n_1 = this->n;
005b04fa      
005b04ff      if (n_1 > n)
005b0509          return 1;
005b0509      
005b050c      if (n_1 < n)
005b0514          return 0xffffffff;
005b0514      
005b0517      uint32_t i = n_1;
005b0517      
005b051c      while (i != 0)
005b051c      {
005b0520          i -= 1;
005b0523          int32_t esi_1;
005b0523          
005b0523          if (i < n_1)
005b052b              esi_1 = this->a[i];
005b0523          else
005b0525              esi_1 = 0;
005b0525          
005b0530          int32_t edx_2;
005b0530          
005b0530          if (i < n)
005b0538              edx_2 = arg2->a[i];
005b0530          else
005b0532              edx_2 = 0;
005b0532          
005b053d          if (esi_1 > edx_2)
005b056d              return 1;
005b056d          
005b0541          int32_t edx_4;
005b0541          
005b0541          if (i < n_1)
005b0549              edx_4 = this->a[i];
005b0541          else
005b0543              edx_4 = 0;
005b0543          
005b0555          if ((i < n && edx_4 < arg2->a[i]))
005b0577              return 0xffffffff;
005b051c      }
005b051c      
005b0561      return 0;
005b04f0  }

005b057a                                                                                90 90 90 90 90 90                            ......

005b0580  void __thiscall AC1Legacy::vlong_value::add(class AC1Legacy::vlong_value* this, class AC1Legacy::vlong_value* arg2)

005b0580  {
005b0584      uint32_t n = arg2->n;
005b058d      uint32_t n_1 = this->n;
005b0590      int32_t ebx = 0;
005b0590      
005b0594      if (n_1 < n)
005b0596          n_1 = n;
005b0596      
005b059b      AC1Legacy::flex_unit::reserve(this, n_1);
005b05a0      uint32_t i = 0;
005b05a0      
005b05a5      if ((n_1 + 1) > 0)
005b05a5      {
005b05e7          do
005b05e7          {
005b05aa              int32_t eax;
005b05aa              
005b05aa              if (i < this->n)
005b05b2                  eax = this->a[i];
005b05aa              else
005b05ac                  eax = 0;
005b05ac              
005b05bc              int32_t eax_1 = (eax + ebx);
005b05c6              int32_t ecx_3;
005b05c6              
005b05c6              if (i < arg2->n)
005b05ce                  ecx_3 = arg2->a[i];
005b05c6              else
005b05c8                  ecx_3 = 0;
005b05c8              
005b05d1              uint32_t eax_2 = (eax_1 + ecx_3);
005b05da              ebx = (-((ebx - ebx)) + -((ecx_3 - ecx_3)));
005b05df              AC1Legacy::flex_unit::set(this, i, eax_2);
005b05e4              i += 1;
005b05e7          } while (i < (n_1 + 1));
005b05a5      }
005b0580  }


005b05f0  void __thiscall AC1Legacy::vlong_value::subtract(class AC1Legacy::vlong_value* this, class AC1Legacy::vlong_value* arg2)

005b05f0  {
005b05f5      uint32_t n = this->n;
005b05f9      int32_t esi = 0;
005b05fb      uint32_t edi = 0;
005b05fb      
005b05ff      if (n > 0)
005b05ff      {
005b063d          do
005b063d          {
005b0608              int32_t edx_1;
005b0608              
005b0608              if (edi < arg2->n)
005b0610                  edx_1 = arg2->a[edi];
005b0608              else
005b060a                  edx_1 = 0;
005b060a              
005b0613              int32_t edx_2 = (edx_1 + esi);
005b0613              
005b0617              if (edx_2 >= esi)
005b0617              {
005b061c                  int32_t ecx;
005b061c                  
005b061c                  if (edi < this->n)
005b0624                      ecx = this->a[edi];
005b061c                  else
005b061e                      ecx = 0;
005b061e                  
005b0629                  uint32_t eax_4 = (ecx - edx_2);
005b0633                  esi = -((esi - esi));
005b0635                  AC1Legacy::flex_unit::set(this, edi, eax_4);
005b0617              }
005b0617              
005b063a              edi += 1;
005b063d          } while (edi < n);
005b05ff      }
005b05f0  }

005b0646                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005b0650  void __thiscall AC1Legacy::vlong_value::copy(class AC1Legacy::vlong_value* this, class AC1Legacy::vlong_value* arg2)

005b0650  {
005b0659      this->n = 0;
005b0660      uint32_t n = arg2->n;
005b0660      
005b0665      while (n > 0)
005b0665      {
005b066a          n -= 1;
005b066d          uint32_t eax_2;
005b066d          
005b066d          if (n < arg2->n)
005b0675              eax_2 = arg2->a[n];
005b066d          else
005b066f              eax_2 = 0;
005b066f          
005b067c          AC1Legacy::flex_unit::set(this, n, eax_2);
005b0665      }
005b0650  }

005b068b                                   90 90 90 90 90                                                             .....

005b0690  void __thiscall AC1Legacy::vlong::store(class AC1Legacy::vlong const* this, uint32_t* arg2, uint32_t arg3)

005b0690  {
005b0695      int32_t eax = 0;
005b0695      
005b0699      if (arg3 > 0)
005b0699      {
005b06b7          do
005b06b7          {
005b06a0              class AC1Legacy::vlong_value* value = this->value;
005b06a6              int32_t edx_1;
005b06a6              
005b06a6              if (eax < value->n)
005b06ae                  edx_1 = value->a[eax];
005b06a6              else
005b06a8                  edx_1 = 0;
005b06a8              
005b06b1              arg2[eax] = edx_1;
005b06b4              eax += 1;
005b06b7          } while (eax < arg3);
005b0699      }
005b0690  }

005b06be                                                                                            90 90                                ..

005b06c0  void __fastcall AC1Legacy::vlong::docopy(class AC1Legacy::vlong* this)

005b06c0  {
005b06c4      class AC1Legacy::vlong_value* value = this->value;
005b06c7      uint32_t share = value->share;
005b06ca      class AC1Legacy::vlong_value* esi = nullptr;
005b06ca      
005b06ce      if (share != 0)
005b06ce      {
005b06d3          value->share = (share - 1);
005b06d6          void* eax = operator new(0x10);
005b06d6          
005b06e0          if (eax != 0)
005b06e0          {
005b06e2              *(uint32_t*)((char*)eax + 4) = 0;
005b06e5              *(uint32_t*)eax = 0;
005b06e7              *(uint32_t*)((char*)eax + 8) = 0;
005b06ea              *(uint32_t*)((char*)eax + 0xc) = 0;
005b06ed              esi = eax;
005b06e0          }
005b06e0          
005b06f5          AC1Legacy::vlong_value::copy(esi, this->value);
005b06fa          this->value = esi;
005b06ce      }
005b06c0  }


005b0700  uint32_t __thiscall AC1Legacy::vlong::bit(class AC1Legacy::vlong const* this, uint32_t arg2)

005b0700  {
005b0700      class AC1Legacy::vlong_value* value = this->value;
005b070d      uint32_t eax_1 = (arg2 >> 5);
005b0713      int32_t edx;
005b0713      
005b0713      if (eax_1 < value->n)
005b071b          edx = value->a[eax_1];
005b0713      else
005b0715          edx = 0;
005b0715      
005b0728      int32_t eax_3 = ((1 << (arg2 & 0x1f)) & edx);
005b072a      int32_t eax_4 = -(eax_3);
005b0730      return -((eax_4 - eax_4));
005b0700  }

005b0733                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005b0740  void __thiscall AC1Legacy::vlong::setbit(class AC1Legacy::vlong* this, uint32_t arg2)

005b0740  {
005b0743      class AC1Legacy::vlong_value* value = this->value;
005b0746      uint32_t share = value->share;
005b0746      
005b074c      if (share != 0)
005b074c      {
005b0751          value->share = (share - 1);
005b0754          void* eax = operator new(0x10);
005b075e          class AC1Legacy::vlong_value* edi_1;
005b075e          
005b075e          if (eax == 0)
005b077f              edi_1 = nullptr;
005b075e          else
005b075e          {
005b0760              *(uint32_t*)((char*)eax + 4) = 0;
005b0767              *(uint32_t*)eax = 0;
005b076d              *(uint32_t*)((char*)eax + 8) = 0;
005b0774              *(uint32_t*)((char*)eax + 0xc) = 0;
005b077b              edi_1 = eax;
005b075e          }
005b075e          
005b0787          AC1Legacy::vlong_value::copy(edi_1, this->value);
005b078c          this->value = edi_1;
005b074c      }
005b074c      
005b0793      class AC1Legacy::vlong_value* value_1 = this->value;
005b079b      uint32_t eax_3 = (arg2 >> 5);
005b07a0      int32_t esi_2;
005b07a0      
005b07a0      if (eax_3 < value_1->n)
005b07a8          esi_2 = value_1->a[eax_3];
005b07a0      else
005b07a2          esi_2 = 0;
005b07a2      
005b07bb      AC1Legacy::flex_unit::set(value_1, eax_3, ((1 << (arg2 & 0x1f)) | esi_2));
005b0740  }

005b07c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005b07d0  uint32_t __fastcall AC1Legacy::vlong::GetPackSize(class AC1Legacy::vlong* this)

005b07d0  {
005b07dd      return ((this->value->n << 2) + 4);
005b07d0  }

005b07de                                                                                            90 90                                ..

005b07e0  void __thiscall AC1Legacy::vlong::load(class AC1Legacy::vlong* this, uint32_t* arg2, uint32_t arg3)

005b07e0  {
005b07e5      class AC1Legacy::vlong_value* value = this->value;
005b07e8      uint32_t share = value->share;
005b07eb      uint32_t esi = 0;
005b07eb      
005b07ef      if (share != 0)
005b07ef      {
005b07f4          value->share = (share - 1);
005b07f7          void* eax = operator new(0x10);
005b0801          class AC1Legacy::vlong_value* ebx_1;
005b0801          
005b0801          if (eax == 0)
005b0812              ebx_1 = nullptr;
005b0801          else
005b0801          {
005b0803              *(uint32_t*)((char*)eax + 4) = 0;
005b0806              *(uint32_t*)eax = 0;
005b0808              *(uint32_t*)((char*)eax + 8) = 0;
005b080b              *(uint32_t*)((char*)eax + 0xc) = 0;
005b080e              ebx_1 = eax;
005b0801          }
005b0801          
005b081a          AC1Legacy::vlong_value::copy(ebx_1, this->value);
005b081f          this->value = ebx_1;
005b07ef      }
005b07ef      
005b0828      this->value->n = 0;
005b0828      
005b082e      if (arg3 > 0)
005b082e      {
005b0846          do
005b0846          {
005b083e              AC1Legacy::flex_unit::set(this->value, esi, arg2[esi]);
005b0843              esi += 1;
005b0846          } while (esi < arg3);
005b082e      }
005b07e0  }

005b084f                                               90                                                                 .

005b0850  void __thiscall AC1Legacy::vlong::vlong(class AC1Legacy::vlong* this, uint32_t arg2)

005b0850  {
005b0855      this->vtable = 0x7e6280;
005b085b      class AC1Legacy::vlong_value* eax = operator new(0x10);
005b085b      
005b0867      if (eax == 0)
005b0876          eax = nullptr;
005b0867      else
005b0867      {
005b0869          eax->z = 0;
005b086c          eax->a = 0;
005b086e          eax->n = 0;
005b0871          eax->share = 0;
005b0867      }
005b0867      
005b087c      this->negative = 0;
005b0880      this->value = eax;
005b0883      eax->n = 0;
005b0889      AC1Legacy::flex_unit::set(eax, 0, arg2);
005b0850  }

005b0894                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b08a0  void __thiscall AC1Legacy::vlong::vlong(class AC1Legacy::vlong* this, class AC1Legacy::vlong const* arg2)

005b08a0  {
005b08a6      this->vtable = 0x7e6280;
005b08af      this->negative = arg2->negative;
005b08b2      class AC1Legacy::vlong_value* value = arg2->value;
005b08b5      this->value = value;
005b08b8      value->share += 1;
005b08a0  }

005b08be                                                                                            90 90                                ..

005b08c0  class AC1Legacy::vlong* __thiscall AC1Legacy::vlong::operator=(class AC1Legacy::vlong* this, class AC1Legacy::vlong const* arg2)

005b08c0  {
005b08c4      class AC1Legacy::vlong_value* value_1 = this->value;
005b08c7      uint32_t share = value_1->share;
005b08c7      
005b08cc      if (share != 0)
005b08cf          value_1->share = (share - 1);
005b08cc      else if (value_1 != 0)
005b08d6      {
005b08d8          uint32_t z = value_1->z;
005b08d8          
005b08dd          if (z != 0)
005b08dd          {
005b08ea              uint32_t i;
005b08ea              
005b08ea              do
005b08ea              {
005b08e2                  i = z;
005b08e2                  z -= 1;
005b08e0                  value_1->a[z] = 0;
005b08ea              } while (i != 1);
005b08dd          }
005b08dd          
005b08ef          operator delete[](value_1->a);
005b08f5          operator delete(value_1);
005b08d6      }
005b08d6      
005b0901      class AC1Legacy::vlong_value* value = arg2->value;
005b0904      this->value = value;
005b0907      value->share += 1;
005b090d      this->negative = arg2->negative;
005b0914      return this;
005b08c0  }

005b0917                                                                       90 90 90 90 90 90 90 90 90                         .........

005b0920  void __fastcall AC1Legacy::vlong::~vlong(class AC1Legacy::vlong* this)

005b0920  {
005b0924      class AC1Legacy::vlong_value* value = this->value;
005b0927      this->vtable = 0x7e6280;
005b092d      uint32_t share = value->share;
005b092d      
005b0932      if (share != 0)
005b0932      {
005b0935          value->share = (share - 1);
005b0938          this->vtable = 0x79285c;
005b0940          return;
005b0932      }
005b0932      
005b0943      if (value != 0)
005b0943      {
005b0945          uint32_t z = value->z;
005b0945          
005b094a          if (z != 0)
005b094a          {
005b095a              uint32_t i;
005b095a              
005b095a              do
005b095a              {
005b0952                  i = z;
005b0952                  z -= 1;
005b0950                  value->a[z] = 0;
005b095a              } while (i != 1);
005b094a          }
005b094a          
005b095f          operator delete[](value->a);
005b0965          operator delete(value);
005b0943      }
005b0943      
005b096d      this->vtable = 0x79285c;
005b0920  }

005b0976                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b0980  class AC1Legacy::vlong* __thiscall AC1Legacy::vlong::operator+=(class AC1Legacy::vlong* this, class AC1Legacy::vlong const* arg2)

005b0980  {
005b098f      int32_t negative = this->negative;
005b098f      
005b0994      if (negative != arg2->negative)
005b0994      {
005b09e9          class AC1Legacy::vlong_value* value_1 = this->value;
005b09e9          
005b09f4          if (AC1Legacy::vlong_value::cf(value_1, arg2->value) >= 0)
005b09f4          {
005b09f8              AC1Legacy::vlong::docopy(this);
005b0a04              AC1Legacy::vlong_value::subtract(this->value, arg2->value);
005b0a11              return this;
005b09f4          }
005b09f4          
005b0a16          int32_t var_c = 0x7e6280;
005b0a1e          int32_t negative_1 = negative;
005b0a22          class AC1Legacy::vlong_value* value_2 = value_1;
005b0a2d          value_1->share += 1;
005b0a30          AC1Legacy::vlong::operator=(this, arg2);
005b0a3c          AC1Legacy::vlong::operator+=(this, &var_c);
005b0a45          AC1Legacy::vlong::~vlong(&var_c);
005b0a52          return this;
005b0994      }
005b0994      
005b0996      class AC1Legacy::vlong_value* value = this->value;
005b0999      uint32_t share = value->share;
005b099c      class AC1Legacy::vlong_value* edi = nullptr;
005b099c      
005b09a0      if (share != 0)
005b09a0      {
005b09a5          value->share = (share - 1);
005b09a8          void* eax_1 = operator new(0x10);
005b09a8          
005b09b2          if (eax_1 != 0)
005b09b2          {
005b09b4              *(uint32_t*)((char*)eax_1 + 4) = 0;
005b09b7              *(uint32_t*)eax_1 = 0;
005b09b9              *(uint32_t*)((char*)eax_1 + 8) = 0;
005b09bc              *(uint32_t*)((char*)eax_1 + 0xc) = 0;
005b09bf              edi = eax_1;
005b09b2          }
005b09b2          
005b09c7          AC1Legacy::vlong_value::copy(edi, this->value);
005b09cc          this->value = edi;
005b09a0      }
005b09a0      
005b09d6      AC1Legacy::vlong_value::add(this->value, arg2->value);
005b09e3      return this;
005b0980  }

005b0a55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005b0a60  class AC1Legacy::vlong* __thiscall AC1Legacy::vlong::operator*(class AC1Legacy::vlong* this, class AC1Legacy::vlong* __return, class AC1Legacy::vlong const* arg3)

005b0a60  {
005b0a6f      int32_t var_c = 0x7e6280;
005b0a77      void* eax = operator new(0x10);
005b0a83      void* esi;
005b0a83      
005b0a83      if (eax == 0)
005b0a94          esi = nullptr;
005b0a83      else
005b0a83      {
005b0a85          *(uint32_t*)((char*)eax + 4) = 0;
005b0a88          *(uint32_t*)eax = 0;
005b0a8a          *(uint32_t*)((char*)eax + 8) = 0;
005b0a8d          *(uint32_t*)((char*)eax + 0xc) = 0;
005b0a90          esi = eax;
005b0a83      }
005b0a83      
005b0a9a      *(uint32_t*)((char*)esi + 8) = 0;
005b0a9d      class AC1Legacy::vlong_value* value = this->value;
005b0aa0      class AC1Legacy::vlong_value* value_1 = arg3->value;
005b0aa5      void* var_8 = esi;
005b0abe      AC1Legacy::flex_unit::fast_mul(esi, value, value_1, (AC1Legacy::vlong_value::bits(value) + AC1Legacy::vlong_value::bits(value_1)));
005b0ad1      int32_t* result = __return;
005b0ad5      int32_t eax_5 = (arg3->negative ^ this->negative);
005b0ad7      result[2] = eax_5;
005b0ada      int32_t var_4 = eax_5;
005b0ade      *(uint32_t*)result = 0x7e6280;
005b0ae4      result[1] = esi;
005b0aef      *(uint32_t*)((char*)esi + 0xc) += 1;
005b0af2      AC1Legacy::vlong::~vlong(&var_c);
005b0b00      return result;
005b0a60  }

005b0b03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005b0b10  int32_t __thiscall AC1Legacy::vlong::read_from_hex_string(class AC1Legacy::vlong* this, char const* arg2)

005b0b10  {
005b0b15      class AC1Legacy::vlong* this_1 = this;
005b0b19      class AC1Legacy::vlong* this_2 = this_1;
005b0b1d      int32_t var_3c = 0x7e6280;
005b0b25      void* eax = operator new(0x10);
005b0b25      
005b0b31      if (eax == 0)
005b0b40          eax = nullptr;
005b0b31      else
005b0b31      {
005b0b33          *(uint32_t*)((char*)eax + 4) = 0;
005b0b36          *(uint32_t*)eax = 0;
005b0b38          *(uint32_t*)((char*)eax + 8) = 0;
005b0b3b          *(uint32_t*)((char*)eax + 0xc) = 0;
005b0b31      }
005b0b31      
005b0b42      void* var_38 = eax;
005b0b46      *(uint32_t*)((char*)eax + 8) = 0;
005b0b50      int32_t var_34 = 0;
005b0b54      AC1Legacy::vlong::operator=(this_1, &var_3c);
005b0b5d      AC1Legacy::vlong::~vlong(&var_3c);
005b0b68      char var_4b = 0;
005b0b68      
005b0b6c      if (*(uint8_t*)arg2 != 0)
005b0b6c      {
005b0b74          int32_t var_28_1 = 0;
005b0b78          int32_t var_1c_1 = 0;
005b0b78          
005b0b92          while (true)
005b0b92          {
005b0b92              int32_t var_30 = 0x7e6280;
005b0b9a              void* eax_1 = operator new(0x10);
005b0ba4              void* esi_1;
005b0ba4              
005b0ba4              if (eax_1 == 0)
005b0bb5                  esi_1 = nullptr;
005b0ba4              else
005b0ba4              {
005b0ba6                  *(uint32_t*)((char*)eax_1 + 4) = 0;
005b0ba9                  *(uint32_t*)eax_1 = 0;
005b0bab                  *(uint32_t*)((char*)eax_1 + 8) = 0;
005b0bae                  *(uint32_t*)((char*)eax_1 + 0xc) = 0;
005b0bb1                  esi_1 = eax_1;
005b0ba4              }
005b0ba4              
005b0bbb              void* var_2c_1 = esi_1;
005b0bbf              *(uint32_t*)((char*)esi_1 + 8) = 0;
005b0bc2              AC1Legacy::flex_unit::reserve(esi_1, 1);
005b0bd3              **(uint32_t**)esi_1 = 0x10;
005b0bdb              *(uint32_t*)((char*)esi_1 + 8) = 1;
005b0be2              int32_t __return;
005b0be2              class AC1Legacy::vlong* eax_2 = AC1Legacy::vlong::operator*(this_1, &__return, &var_30);
005b0be7              class AC1Legacy::vlong_value* value_3 = this_1->value;
005b0bec              uint32_t share = value_3->share;
005b0bec              
005b0bf1              if (share != 0)
005b0bf4                  value_3->share = (share - 1);
005b0bf1              else if (value_3 != 0)
005b0bfb              {
005b0bfd                  uint32_t z = value_3->z;
005b0bfd                  
005b0c02                  if (z != 0)
005b0c02                  {
005b0c0a                      uint32_t i;
005b0c0a                      
005b0c0a                      do
005b0c0a                      {
005b0c06                          i = z;
005b0c06                          z -= 1;
005b0c04                          value_3->a[z] = 0;
005b0c0a                      } while (i != 1);
005b0c02                  }
005b0c02                  
005b0c0f                  operator delete[](value_3->a);
005b0c15                  operator delete(value_3);
005b0bfb              }
005b0bfb              
005b0c1d              class AC1Legacy::vlong_value* value = eax_2->value;
005b0c24              this_2->value = value;
005b0c27              value->share += 1;
005b0c36              this_2->negative = eax_2->negative;
005b0c39              __return = 0x7e6280;
005b0c3d              int32_t* var_14;
005b0c3d              int32_t ecx_6 = var_14[3];
005b0c3d              
005b0c42              if (ecx_6 == 0)
005b0c42              {
005b0c4c                  int32_t i_7 = var_14[1];
005b0c4c                  
005b0c51                  if (i_7 != 0)
005b0c51                  {
005b0c59                      int32_t i_1;
005b0c59                      
005b0c59                      do
005b0c59                      {
005b0c55                          i_1 = i_7;
005b0c55                          i_7 -= 1;
005b0c56                          *(uint32_t*)(*(uint32_t*)var_14 + (i_7 << 2)) = 0;
005b0c59                      } while (i_1 != 1);
005b0c51                  }
005b0c51                  
005b0c5e                  operator delete[](*(uint32_t*)var_14);
005b0c64                  operator delete(var_14);
005b0c42              }
005b0c42              else
005b0c45                  var_14[3] = (ecx_6 - 1);
005b0c45              
005b0c71              __return = 0x79285c;
005b0c75              int32_t eax_6 = *(uint32_t*)((char*)esi_1 + 0xc);
005b0c75              
005b0c7a              if (eax_6 == 0)
005b0c7a              {
005b0c82                  int32_t i_8 = *(uint32_t*)((char*)esi_1 + 4);
005b0c82                  
005b0c87                  if (i_8 != 0)
005b0c87                  {
005b0c96                      int32_t i_2;
005b0c96                      
005b0c96                      do
005b0c96                      {
005b0c92                          i_2 = i_8;
005b0c92                          i_8 -= 1;
005b0c93                          *(uint32_t*)(*(uint32_t*)esi_1 + (i_8 << 2)) = 0;
005b0c96                      } while (i_2 != 1);
005b0c87                  }
005b0c87                  
005b0c9b                  operator delete[](*(uint32_t*)esi_1);
005b0ca1                  operator delete(esi_1);
005b0c7a              }
005b0c7a              else
005b0c7d                  *(uint32_t*)((char*)esi_1 + 0xc) = (eax_6 - 1);
005b0c7d              
005b0cad              int32_t ecx_7;
005b0cad              ecx_7 = *(uint8_t*)arg2;
005b0cbe              var_30 = 0x79285c;
005b0cc2              uint32_t var_44 = 0;
005b0cc6              char var_4c = ecx_7;
005b0cca              sscanf(&var_4c, &data_7e6294, &var_44);
005b0cd0              uint32_t esi_2 = var_44;
005b0cd6              int32_t var_24 = 0x7e6280;
005b0cda              void* eax_9 = operator new(0x10);
005b0ce4              void* edi_1;
005b0ce4              
005b0ce4              if (eax_9 == 0)
005b0cf5                  edi_1 = nullptr;
005b0ce4              else
005b0ce4              {
005b0ce6                  *(uint32_t*)((char*)eax_9 + 4) = 0;
005b0ce9                  *(uint32_t*)eax_9 = 0;
005b0ceb                  *(uint32_t*)((char*)eax_9 + 8) = 0;
005b0cee                  *(uint32_t*)((char*)eax_9 + 0xc) = 0;
005b0cf1                  edi_1 = eax_9;
005b0ce4              }
005b0ce4              
005b0cfb              void* var_20_1 = edi_1;
005b0cff              *(uint32_t*)((char*)edi_1 + 8) = 0;
005b0d02              AC1Legacy::flex_unit::set(edi_1, 0, esi_2);
005b0d07              var_3c = 0x7e6280;
005b0d0f              int32_t negative = this_2->negative;
005b0d12              class AC1Legacy::vlong_value* value_1 = this_2->value;
005b0d25              value_1->share += 1;
005b0d2d              AC1Legacy::vlong::operator+=(&var_3c, &var_24);
005b0d3e              uint32_t share_2 = value_1->share;
005b0d45              value_1->share = (share_2 + 1);
005b0d53              var_3c = 0x7e6280;
005b0d53              
005b0d5e              if (share_2 == 0xffffffff)
005b0d5e              {
005b0d68                  uint32_t z_1 = value_1->z;
005b0d68                  
005b0d6d                  if (z_1 != 0)
005b0d6d                  {
005b0d76                      uint32_t i_3;
005b0d76                      
005b0d76                      do
005b0d76                      {
005b0d72                          i_3 = z_1;
005b0d72                          z_1 -= 1;
005b0d70                          value_1->a[z_1] = 0;
005b0d76                      } while (i_3 != 1);
005b0d6d                  }
005b0d6d                  
005b0d7b                  operator delete[](value_1->a);
005b0d81                  operator delete(value_1);
005b0d5e              }
005b0d5e              else
005b0d61                  value_1->share -= 1;
005b0d61              
005b0d89              class AC1Legacy::vlong_value* value_2 = this_2->value;
005b0d8c              var_3c = 0x79285c;
005b0d94              uint32_t share_1 = value_2->share;
005b0d94              
005b0d99              if (share_1 != 0)
005b0d9c                  value_2->share = (share_1 - 1);
005b0d99              else if (value_2 != 0)
005b0da3              {
005b0da5                  uint32_t z_2 = value_2->z;
005b0da5                  
005b0daa                  if (z_2 != 0)
005b0daa                  {
005b0db6                      uint32_t i_4;
005b0db6                      
005b0db6                      do
005b0db6                      {
005b0db2                          i_4 = z_2;
005b0db2                          z_2 -= 1;
005b0db0                          value_2->a[z_2] = 0;
005b0db6                      } while (i_4 != 1);
005b0daa                  }
005b0daa                  
005b0dbb                  operator delete[](value_2->a);
005b0dc1                  operator delete(value_2);
005b0da3              }
005b0da3              
005b0dd1              this_2->value = value_1;
005b0dd4              uint32_t share_3 = value_1->share;
005b0d45              value_1->share += 1;
005b0dda              this_2->negative = negative;
005b0dda              
005b0ddf              if (share_3 == 0xffffffff)
005b0ddf              {
005b0de6                  uint32_t z_3 = value_1->z;
005b0de6                  
005b0deb                  if (z_3 != 0)
005b0deb                  {
005b0df6                      uint32_t i_5;
005b0df6                      
005b0df6                      do
005b0df6                      {
005b0df2                          i_5 = z_3;
005b0df2                          z_3 -= 1;
005b0df0                          value_1->a[z_3] = 0;
005b0df6                      } while (i_5 != 1);
005b0deb                  }
005b0deb                  
005b0dfb                  operator delete[](value_1->a);
005b0e01                  operator delete(value_1);
005b0ddf              }
005b0ddf              else
005b0d45                  value_1->share -= 1;
005b0d45              
005b0e09              int32_t eax_17 = *(uint32_t*)((char*)edi_1 + 0xc);
005b0e09              
005b0e0e              if (eax_17 == 0)
005b0e0e              {
005b0e16                  int32_t i_9 = *(uint32_t*)((char*)edi_1 + 4);
005b0e16                  
005b0e1b                  if (i_9 != 0)
005b0e1b                  {
005b0e26                      int32_t i_6;
005b0e26                      
005b0e26                      do
005b0e26                      {
005b0e22                          i_6 = i_9;
005b0e22                          i_9 -= 1;
005b0e23                          *(uint32_t*)(*(uint32_t*)edi_1 + (i_9 << 2)) = 0;
005b0e26                      } while (i_6 != 1);
005b0e1b                  }
005b0e1b                  
005b0e2b                  operator delete[](*(uint32_t*)edi_1);
005b0e31                  operator delete(edi_1);
005b0e0e              }
005b0e0e              else
005b0e11                  *(uint32_t*)((char*)edi_1 + 0xc) = (eax_17 - 1);
005b0e11              
005b0e3d              uint32_t ecx_21;
005b0e3d              ecx_21 = arg2[1];
005b0e43              var_24 = 0x79285c;
005b0e4b              arg2 = &arg2[1];
005b0e4b              
005b0e4f              if (ecx_21 == 0)
005b0e4f                  break;
005b0e4f              
005b0b7e              this_1 = this_2;
005b0b92          }
005b0b6c      }
005b0b6c      
005b0e61      return 1;
005b0b10  }

005b0b84              8d a4 24 00 00 00 00 eb 03 8d 49 00                                                      ..$.......I.
005b0e64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005b0e70  uint32_t __thiscall AC1Legacy::vlong::Pack(class AC1Legacy::vlong* this, void** arg2, uint32_t arg3)

005b0e70  {
005b0e76      int32_t result = this->vtable->GetPackSize();
005b0e76      
005b0e7f      if (arg3 >= result)
005b0e7f      {
005b0e8c          uint32_t n = this->value->n;
005b0e8f          **(uint32_t**)arg2 = n;
005b0e93          void* edx_3 = (*(uint32_t*)arg2 + 4);
005b0e9c          *(uint32_t*)arg2 = edx_3;
005b0e9e          AC1Legacy::vlong::store(this, edx_3, n);
005b0eaf          *(uint32_t*)arg2 += (n << 2);
005b0e7f      }
005b0e7f      
005b0eb6      return result;
005b0e70  }

005b0eb9                                                                             90 90 90 90 90 90 90                           .......

005b0ec0  int32_t __thiscall AC1Legacy::vlong::UnPack(class AC1Legacy::vlong* this, void** arg2, uint32_t arg3)

005b0ec0  {
005b0ec8      if (arg3 < 4)
005b0ecd          return 0;
005b0ecd      
005b0ed7      void* eax_1 = *(uint32_t*)arg2;
005b0ed9      uint32_t edx = *(uint32_t*)eax_1;
005b0edb      int32_t ebx = (edx << 2);
005b0eea      *(uint32_t*)arg2 = ((char*)eax_1 + 4);
005b0eea      
005b0eec      if ((arg3 - 4) < ebx)
005b0ef4          return 0;
005b0ef4      
005b0ef9      AC1Legacy::vlong::load(this, ((char*)eax_1 + 4), edx);
005b0f00      *(uint32_t*)arg2 = (ebx + ((char*)eax_1 + 4));
005b0f0b      return 1;
005b0ec0  }

005b0f0e                                            90 90                                                                ..

005b0f10  void* __thiscall AC1Legacy::vlong::`scalar deleting destructor'(class AC1Legacy::vlong* this, uint32_t arg2)

005b0f10  {
005b0f13      AC1Legacy::vlong::~vlong(this);
005b0f13      
005b0f1d      if ((arg2 & 1) != 0)
005b0f20          operator delete(this);
005b0f20      
005b0f2b      return this;
005b0f10  }

005b0f2e                                            90 90                                                                ..

005b0f30  void __fastcall Waveform::SetDefaults(class Waveform* this)

005b0f30  {
005b0f37      this->type = 1;
005b0f3d      this->base = 0f;
005b0f40      this->amplitude = 1f;
005b0f43      this->phase = 0f;
005b0f46      this->frequency = 1f;
005b0f49      this->roughness = 0f;
005b0f4c      this->base_vel = 0f;
005b0f4f      this->amplitude_vel = 0f;
005b0f52      this->phase_vel = 0f;
005b0f55      this->frequency_vel = 0f;
005b0f58      this->roughness_vel = 0f;
005b0f30  }

005b0f5c                                                                                      90 90 90 90                              ....

005b0f60  enum WaveformType __thiscall Waveform::GetValueForPhase(class Waveform const* this, float const arg2, double const arg3)

005b0f60  {
005b0f69      enum WaveformType type = this->type;
005b0f69      
005b0f6f      if (type == WAVEFORM_NONE)
005b0f6f      {
005b0f71          this->base;
005b0f78          return type;
005b0f6f      }
005b0f6f      
005b0f7e      int32_t eax = (type - 2);
005b0f8a      float var_1c = ((float)((((long double)this->amplitude_vel) * ((long double)arg3)) + ((long double)this->amplitude)));
005b0fa2      float var_14 = ((float)(((((long double)arg2) + ((long double)this->phase)) * ((long double)3.1415926535897931)) + (((long double)this->phase_vel) * ((long double)arg3))));
005b0faf      float var_18 = ((float)((((long double)this->frequency_vel) * ((long double)arg3)) + ((long double)this->frequency)));
005b0fc9      float var_10 = ((float)((((long double)this->base_vel) * ((long double)arg3)) + ((long double)this->base)));
005b0fc9      
005b0fd3      switch (eax)
005b0fd3      {
005b0ffa          case 1:
005b0ffa          {
005b0ffa              int32_t eax_1;
005b0ffa              long double st0_1;
005b0ffa              eax_1 = Random::RollDice(-1f, 1f);
005b100e              return eax_1;
005b0ffa              break;
005b0ffa          }
005b101c          case 2:
005b101c          {
005b101c              long double st0_2;
005b101c              bool c2_1;
005b101c              st0_2 = __fsin(((((long double)var_18) * ((long double)arg3)) + ((long double)var_14)));
005b101c              break;
005b101c          }
005b1036          case 3:
005b1036          {
005b1036              long double st0_3;
005b1036              bool c2_2;
005b1036              st0_3 = __fsin(((((long double)var_18) * ((long double)arg3)) + ((long double)var_14)));
005b1038              long double temp1_1 = ((long double)0f);
005b1038              (st0_3 - temp1_1);
005b1042              eax = ((((st0_3 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_3, temp1_1))) ? 1 : 0) << 0xa) | ((((st0_3 == temp1_1) ? 1 : 0) << 0xe) | 0x3000))));
005b1036              break;
005b1036          }
005b1063          case 4:
005b1063          {
005b1063              long double st0_4;
005b1063              bool c2_4;
005b1063              st0_4 = __fsin(((((long double)var_18) * ((long double)arg3)) + ((long double)var_14)));
005b1063              break;
005b1063          }
005b1089          case 5:
005b1089          {
005b1089              int32_t var_28;
005b1089              var_28 = ((double)((((long double)var_18) * ((long double)arg3)) + ((long double)var_14)));
005b108c              uint32_t eax_2;
005b108c              long double st0_5;
005b108c              eax_2 = PerlinNoise::Noise(&Waveform::perlinNoise, var_28);
005b109d              return eax_2;
005b1089              break;
005b1089          }
005b10a2          case 6:
005b10a2          {
005b10a2              int32_t var_24 = 0x40180000;
005b10b3              int32_t var_2c = 0x40000000;
005b10e5              return PerlinNoise::fBm1(&Waveform::perlinNoise, ((double)((((long double)var_18) * ((long double)arg3)) + ((long double)var_14))), ((double)(((long double)1f) - ((long double)((float)((((long double)this->roughness_vel) * ((long double)arg3)) + ((long double)this->roughness)))))), 0f, 0f);
005b10a2              break;
005b10a2          }
005b10ec          case 7:
005b10ec          {
005b10ec              int32_t eax_4 = _ftol2();
005b10fb              eax = _ftol2();
005b10fb              
005b110a              if ((eax_4 > 0 && eax > 0))
005b110a              {
005b1121                  _ftol2();
005b1137                  eax = _ftol2();
005b110a              }
005b10ec              break;
005b10ec          }
005b0fd3      }
005b0fd3      
005b1152      return eax;
005b0f60  }

005b1155                                                                 8d 49 00                                               .I.
005b1158  uint32_t jump_table_5b1158[0x8] = 
005b1158  {
005b1158      [0x0] =  0x005b0fda
005b115c      [0x1] =  0x005b0fee
005b1160      [0x2] =  0x005b1011
005b1164      [0x3] =  0x005b102b
005b1168      [0x4] =  0x005b1058
005b116c      [0x5] =  0x005b1074
005b1170      [0x6] =  0x005b10a0
005b1174      [0x7] =  0x005b10e8
005b1178  }

005b1178                                                                          90 90 90 90 90 90 90 90                          ........

005b1180  enum WaveformType __thiscall Waveform::GetValue(class Waveform const* this, double const arg2)

005b1180  {
005b1188      int32_t var_4 = *(uint32_t*)((char*)arg2)[4];
005b1191      return Waveform::GetValueForPhase(this, 0f, arg2);
005b1180  }

005b1194                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b11a0  void __fastcall Waveform::Waveform(class Waveform* this)

005b11a0  {
005b11a9      this->type = 1;
005b11af      this->base = 0f;
005b11b2      this->amplitude = 1f;
005b11b5      this->phase = 0f;
005b11b8      this->frequency = 1f;
005b11bb      this->roughness = 0f;
005b11be      this->base_vel = 0f;
005b11c1      this->amplitude_vel = 0f;
005b11c4      this->phase_vel = 0f;
005b11c7      this->frequency_vel = 0f;
005b11ca      this->roughness_vel = 0f;
005b11a0  }

005b11ce                                            90 90                                                                ..

005b11d0  void __thiscall Waveform::Waveform(class Waveform* this, float const arg2)

005b11d0  {
005b11d9      this->phase = 0f;
005b11dc      this->roughness = 0f;
005b11df      this->base_vel = 0f;
005b11e2      this->amplitude_vel = 0f;
005b11e5      this->phase_vel = 0f;
005b11e8      this->frequency_vel = 0f;
005b11eb      this->roughness_vel = 0f;
005b11f2      this->type = 1;
005b11f8      this->amplitude = 1f;
005b11fb      this->frequency = 1f;
005b11fe      this->base = arg2;
005b11d0  }

005b1204              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005b1210  void __thiscall Waveform::Serialize(class Waveform* this, class Archive* arg2)

005b1210  {
005b121c      uint8_t* eax = Archive::GetBytes(arg2, 0x2c);
005b121c      
005b1223      if (eax != 0)
005b1223      {
005b122e          if ((arg2->m_flags & 1) != 0)
005b122e          {
005b1234              __builtin_memcpy(eax, this, 0x2c);
005b1238              return;
005b122e          }
005b122e          
005b123d          __builtin_memcpy(this, eax, 0x2c);
005b1223      }
005b1210  }

005b1244              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005b1250  uint8_t __thiscall Waveform::Parse(class Waveform* this, class PFileNode const* arg2)

005b1250  {
005b1257      class PFileNode* m_charbuffer_13 = arg2;
005b1257      
005b125f      if (m_charbuffer_13 != 0)
005b125f      {
005b1265          this->amplitude = 1f;
005b1273          this->phase = 0f;
005b1281          this->frequency = 1f;
005b128f          this->roughness = 0f;
005b129d          this->base_vel = 0f;
005b12aa          this->amplitude_vel = 0f;
005b12b7          this->phase_vel = 0f;
005b12c4          this->frequency_vel = 0f;
005b12d7          class PStringBase<char> m_charbuffer = m_charbuffer_13;
005b12dc          arg2 = 1;
005b12e1          this->type = 1;
005b12d4          this->base = 0f;
005b12d1          this->roughness_vel = 0f;
005b12f8          void var_c;
005b12f8          PFileNodeIter::PFileNodeIter(&var_c, m_charbuffer);
005b1301          class PFileNode* eax_10 = PFileNodeIter::Curr(&var_c);
005b1301          
005b130a          if (eax_10 == 0)
005b130a          {
005b130c              m_charbuffer = &this->base;
005b130f              this->type = 1;
005b1315              uint8_t eax_11;
005b1315              class PStringBase<char> m_charbuffer_1;
005b1315              eax_11 = PFileNode::GetNameAsFloat(m_charbuffer_13, m_charbuffer);
005b1315              
005b131c              if (eax_11 != 0)
005b131c              {
005b1353                  PFileNodeIter::~PFileNodeIter(&var_c);
005b1358                  int32_t eax_13;
005b1358                  eax_13 = 1;
005b1361                  return 1;
005b131c              }
005b131c              
005b131e              m_charbuffer = m_charbuffer_1;
005b1326              PStringBase<char>::PStringBase<char>(&m_charbuffer, "Error parsing waveform base valu…");
005b132c              PFileNode::ReportError(m_charbuffer_13, m_charbuffer);
005b133a              PFileNodeIter::~PFileNodeIter(&var_c);
005b133f              int32_t eax_12;
005b133f              eax_12 = 0;
005b1348              return 0;
005b130a          }
005b130a          
005b1364          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005b1369          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005b1370          m_charbuffer = &PStringBase<char>::s_NullBuffer_1[-1];
005b1371          InterlockedIncrement(m_charbuffer);
005b137b          m_charbuffer = &PStringBase<char>::s_NullBuffer_2;
005b137e          PFileNode::GetNameAsPString(m_charbuffer_13, m_charbuffer);
005b1389          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_2;
005b138d          m_charbuffer = waveform_Speed.m_charbuffer;
005b138d          
005b139a          if (_stricmp(PStringBase<char>::s_NullBuffer_8, m_charbuffer) != 0)
005b139a          {
005b13ac              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_2;
005b13b0              m_charbuffer = waveform_Noise.m_charbuffer;
005b13b0              
005b13bd              if (_stricmp(PStringBase<char>::s_NullBuffer_5, m_charbuffer) != 0)
005b13bd              {
005b13d0                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
005b13d4                  m_charbuffer = waveform_Sine.m_charbuffer;
005b13d4                  
005b13e1                  if (_stricmp(PStringBase<char>::s_NullBuffer_3, m_charbuffer) != 0)
005b13e1                  {
005b13f4                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_2;
005b13f8                      m_charbuffer = waveform_Square.m_charbuffer;
005b13f8                      
005b1405                      if (_stricmp(PStringBase<char>::s_NullBuffer_9, m_charbuffer) != 0)
005b1405                      {
005b1417                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_2;
005b141b                          m_charbuffer = waveform_Bounce.m_charbuffer;
005b141b                          
005b1428                          if (_stricmp(PStringBase<char>::s_NullBuffer_6, m_charbuffer) != 0)
005b1428                          {
005b143b                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
005b143f                              m_charbuffer = waveform_Perlin.m_charbuffer;
005b143f                              
005b144c                              if (_stricmp(PStringBase<char>::s_NullBuffer_4, m_charbuffer) != 0)
005b144c                              {
005b145c                                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_2;
005b1460                                  m_charbuffer = waveform_Fractal.m_charbuffer;
005b1460                                  
005b146d                                  if (_stricmp(PStringBase<char>::s_NullBuffer_10, m_charbuffer) != 0)
005b146d                                  {
005b147c                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_2;
005b1480                                      m_charbuffer = waveform_FrameLoop.m_charbuffer;
005b1482                                      int32_t eax_25;
005b1482                                      class PStringBase<char> m_charbuffer_2;
005b1482                                      eax_25 = _stricmp(PStringBase<char>::s_NullBuffer_7, m_charbuffer);
005b1482                                      
005b148d                                      if (eax_25 != 0)
005b148d                                      {
005b1497                                          m_charbuffer = m_charbuffer_2;
005b149f                                          PStringBase<char>::PStringBase<char>(&m_charbuffer, "Unknown wave type");
005b14a5                                          PFileNode::ReportError(m_charbuffer_13, m_charbuffer);
005b14ad                                          this->type = 1;
005b14b3                                          arg2 = 0;
005b148d                                      }
005b148d                                      else
005b148f                                          this->type = 9;
005b146d                                  }
005b146d                                  else
005b146f                                      this->type = 8;
005b144c                              }
005b144c                              else
005b144e                                  this->type = 7;
005b1428                          }
005b1428                          else
005b142a                              this->type = 6;
005b1405                      }
005b1405                      else
005b1407                          this->type = 5;
005b13e1                  }
005b13e1                  else
005b13e3                      this->type = 4;
005b13bd              }
005b13bd              else
005b13bf                  this->type = 3;
005b139a          }
005b139a          else
005b139c              this->type = 2;
005b139c          
005b14b8          m_charbuffer = &this->base;
005b14bb          uint8_t eax_26;
005b14bb          class PStringBase<char> m_charbuffer_3;
005b14bb          eax_26 = PFileNode::GetNameAsFloat(eax_10, m_charbuffer);
005b14bb          
005b14c2          if (eax_26 != 0)
005b14c2          {
005b1511              class PFileNode* esi_3 = PFileNodeIter::Next(&var_c);
005b1511              
005b1515              if (esi_3 == 0)
005b1515              {
005b16d2              label_5b16d2:
005b16d2                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2);
005b16db                  PFileNodeIter::~PFileNodeIter(&var_c);
005b16eb                  return arg2;
005b1515              }
005b1515              
005b151f              m_charbuffer = &this->amplitude;
005b1522              uint8_t eax_30;
005b1522              class PStringBase<char> m_charbuffer_4;
005b1522              eax_30 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b1529              char* var_4c_12;
005b1529              class PStringBase<char>* ecx_17;
005b1529              
005b1529              if (eax_30 != 0)
005b1529              {
005b1541                  esi_3 = PFileNodeIter::Next(&var_c);
005b1541                  
005b1545                  if (esi_3 == 0)
005b1545                      goto label_5b16d2;
005b1545                  
005b154f                  m_charbuffer = &this->phase;
005b1552                  uint8_t eax_32;
005b1552                  class PStringBase<char> m_charbuffer_5;
005b1552                  eax_32 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b1552                  
005b1559                  if (eax_32 != 0)
005b1559                  {
005b1571                      esi_3 = PFileNodeIter::Next(&var_c);
005b1571                      
005b1575                      if (esi_3 == 0)
005b1575                          goto label_5b16d2;
005b1575                      
005b157f                      m_charbuffer = &this->frequency;
005b1582                      uint8_t eax_35;
005b1582                      class PStringBase<char> m_charbuffer_6;
005b1582                      eax_35 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b1582                      
005b1589                      if (eax_35 != 0)
005b1589                      {
005b15a1                          esi_3 = PFileNodeIter::Next(&var_c);
005b15a1                          
005b15a5                          if (esi_3 == 0)
005b15a5                              goto label_5b16d2;
005b15a5                          
005b15af                          m_charbuffer = &this->roughness;
005b15b2                          uint8_t eax_37;
005b15b2                          class PStringBase<char> m_charbuffer_7;
005b15b2                          eax_37 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b15b2                          
005b15b9                          if (eax_37 != 0)
005b15b9                          {
005b15d1                              esi_3 = PFileNodeIter::Next(&var_c);
005b15d1                              
005b15d5                              if (esi_3 == 0)
005b15d5                                  goto label_5b16d2;
005b15d5                              
005b15df                              m_charbuffer = &this->base_vel;
005b15e2                              uint8_t eax_39;
005b15e2                              class PStringBase<char> m_charbuffer_8;
005b15e2                              eax_39 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b15e2                              
005b15e9                              if (eax_39 != 0)
005b15e9                              {
005b1601                                  esi_3 = PFileNodeIter::Next(&var_c);
005b1601                                  
005b1605                                  if (esi_3 == 0)
005b1605                                      goto label_5b16d2;
005b1605                                  
005b160f                                  m_charbuffer = &this->amplitude_vel;
005b1612                                  uint8_t eax_42;
005b1612                                  class PStringBase<char> m_charbuffer_9;
005b1612                                  eax_42 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b1612                                  
005b1619                                  if (eax_42 != 0)
005b1619                                  {
005b162e                                      esi_3 = PFileNodeIter::Next(&var_c);
005b162e                                      
005b1632                                      if (esi_3 == 0)
005b1632                                          goto label_5b16d2;
005b1632                                      
005b163c                                      m_charbuffer = &this->phase_vel;
005b163f                                      uint8_t eax_44;
005b163f                                      class PStringBase<char> m_charbuffer_10;
005b163f                                      eax_44 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b163f                                      
005b1646                                      if (eax_44 != 0)
005b1646                                      {
005b165b                                          esi_3 = PFileNodeIter::Next(&var_c);
005b165b                                          
005b165f                                          if (esi_3 == 0)
005b165f                                              goto label_5b16d2;
005b165f                                          
005b1665                                          m_charbuffer = &this->frequency_vel;
005b1668                                          uint8_t eax_46;
005b1668                                          class PStringBase<char> m_charbuffer_11;
005b1668                                          eax_46 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b1668                                          
005b166f                                          if (eax_46 != 0)
005b166f                                          {
005b1684                                              esi_3 = PFileNodeIter::Next(&var_c);
005b1684                                              
005b1688                                              if (esi_3 == 0)
005b1688                                                  goto label_5b16d2;
005b1688                                              
005b168e                                              m_charbuffer = &this->roughness_vel;
005b1691                                              uint8_t eax_49;
005b1691                                              class PStringBase<char> m_charbuffer_12;
005b1691                                              eax_49 = PFileNode::GetNameAsFloat(esi_3, m_charbuffer);
005b1691                                              
005b1698                                              if (eax_49 != 0)
005b1698                                                  goto label_5b16d2;
005b1698                                              
005b169a                                              m_charbuffer = m_charbuffer_12;
005b169b                                              ecx_17 = &m_charbuffer;
005b169d                                              var_4c_12 = "Error parsing waveform roughness…";
005b166f                                          }
005b166f                                          else
005b166f                                          {
005b1671                                              m_charbuffer = m_charbuffer_11;
005b1672                                              ecx_17 = &m_charbuffer;
005b1674                                              var_4c_12 = "Error parsing waveform frequency…";
005b166f                                          }
005b1646                                      }
005b1646                                      else
005b1646                                      {
005b1648                                          m_charbuffer = m_charbuffer_10;
005b1649                                          ecx_17 = &m_charbuffer;
005b164b                                          var_4c_12 = "Error parsing waveform phase vel…";
005b1646                                      }
005b1619                                  }
005b1619                                  else
005b1619                                  {
005b161b                                      m_charbuffer = m_charbuffer_9;
005b161c                                      ecx_17 = &m_charbuffer;
005b161e                                      var_4c_12 = "Error parsing waveform amplitude…";
005b1619                                  }
005b15e9                              }
005b15e9                              else
005b15e9                              {
005b15eb                                  m_charbuffer = m_charbuffer_8;
005b15ec                                  ecx_17 = &m_charbuffer;
005b15ee                                  var_4c_12 = "Error parsing waveform base velo…";
005b15e9                              }
005b15b9                          }
005b15b9                          else
005b15b9                          {
005b15bb                              m_charbuffer = m_charbuffer_7;
005b15bc                              ecx_17 = &m_charbuffer;
005b15be                              var_4c_12 = "Error parsing waveform roughness…";
005b15b9                          }
005b1589                      }
005b1589                      else
005b1589                      {
005b158b                          m_charbuffer = m_charbuffer_6;
005b158c                          ecx_17 = &m_charbuffer;
005b158e                          var_4c_12 = "Error parsing waveform frequency…";
005b1589                      }
005b1559                  }
005b1559                  else
005b1559                  {
005b155b                      m_charbuffer = m_charbuffer_5;
005b155c                      ecx_17 = &m_charbuffer;
005b155e                      var_4c_12 = "Error parsing waveform phase val…";
005b1559                  }
005b1529              }
005b1529              else
005b1529              {
005b152b                  m_charbuffer = m_charbuffer_4;
005b152c                  ecx_17 = &m_charbuffer;
005b152e                  var_4c_12 = "Error parsing waveform amplitude…";
005b1529              }
005b1529              
005b16a2              PStringBase<char>::PStringBase<char>(ecx_17, var_4c_12);
005b16a8              PFileNode::ReportError(esi_3, m_charbuffer);
005b16b4              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2);
005b14c2          }
005b14c2          else
005b14c2          {
005b14c4              m_charbuffer = m_charbuffer_3;
005b14cc              PStringBase<char>::PStringBase<char>(&m_charbuffer, "Error parsing waveform base valu…");
005b14d2              PFileNode::ReportError(eax_10, m_charbuffer);
005b14db              void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
005b14e4              m_charbuffer = ((char*)esi_2 + 4);
005b14e4              
005b14f5              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_2 != 0))
005b14f5              {
005b14fb                  int32_t eax_28 = *(int32_t*)((char*)ADJ(esi_2) + -0x14);
005b14fd                  m_charbuffer = 1;
005b1501                  *(uint32_t*)eax_28(m_charbuffer);
005b14f5              }
005b14c2          }
005b14c2          
005b16bd          PFileNodeIter::~PFileNodeIter(&var_c);
005b125f      }
005b125f      
005b16c2      int32_t eax;
005b16c2      eax = 0;
005b16cb      return 0;
005b1250  }

005b16ee                                            90 90                                                                ..

005b16f0  void __thiscall Waveform::GetTypeString(class Waveform const* this, class PStringBase<char>* arg2)

005b16f0  {
005b16f6      switch (this->type)
005b16f6      {
005b16f2          case WAVEFORM_NONE:
005b16f2          {
005b16fc              class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
005b16fc              
005b1704              if (m_charbuffer != waveform_None.m_charbuffer)
005b1704              {
005b171e                  if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005b1726                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005b1726                  
005b172d                  arg2->m_charbuffer = waveform_None.m_charbuffer;
005b173a                  arg2 = &waveform_None.m_charbuffer[-1];
005b173e                  /* tailcall */
005b173e                  return InterlockedIncrement();
005b1704              }
005b1704              
005b1704              return;
005b16f2              break;
005b16f2          }
005b1744          case WAVEFORM_SPEED:
005b1744          {
005b1752              PStringBase<unsigned short>::operator=(arg2, &waveform_Speed);
005b1758              return;
005b1744              break;
005b1744          }
005b175b          case WAVEFORM_NOISE:
005b175b          {
005b1765              PStringBase<unsigned short>::operator=(arg2, &waveform_Noise);
005b176b              return;
005b175b              break;
005b175b          }
005b176e          case WAVEFORM_SINE:
005b176e          {
005b1778              PStringBase<unsigned short>::operator=(arg2, &waveform_Sine);
005b177e              return;
005b176e              break;
005b176e          }
005b1781          case WAVEFORM_SQUARE:
005b1781          {
005b178b              PStringBase<unsigned short>::operator=(arg2, &waveform_Square);
005b1791              return;
005b1781              break;
005b1781          }
005b1794          case WAVEFORM_BOUNCE:
005b1794          {
005b179e              PStringBase<unsigned short>::operator=(arg2, &waveform_Bounce);
005b17a4              return;
005b1794              break;
005b1794          }
005b17a7          case WAVEFORM_PERLIN:
005b17a7          {
005b17b1              PStringBase<unsigned short>::operator=(arg2, &waveform_Perlin);
005b17b7              return;
005b17a7              break;
005b17a7          }
005b17ba          case WAVEFORM_FRACTAL:
005b17ba          {
005b17c4              PStringBase<unsigned short>::operator=(arg2, &waveform_Fractal);
005b17ca              return;
005b17ba              break;
005b17ba          }
005b17cd          case WAVEFORM_FRAMELOOP:
005b17cd          {
005b17d7              PStringBase<unsigned short>::operator=(arg2, &waveform_FrameLoop);
005b17dd              return;
005b17cd              break;
005b17cd          }
005b16f6      }
005b16f6      
005b17e5      PStringBase<char>::set(arg2, "Unknown");
005b16f0  }

005b17ee                                            90 90                                                                ..

005b17f0  void __thiscall Waveform::Output(class Waveform const* this, class PFileNode* arg2)

005b17f0  {
005b17f0      class Waveform* this_1 = this;
005b17fd      int32_t* eax_1 = *(int32_t*)((char*)arg2->vtable + 4)();
005b17fd      
005b1805      if (this->type == WAVEFORM_NONE)
005b1805      {
005b1807          float base = this->base;
005b180e          int32_t* ecx_1 = eax_1[2];
005b180e          
005b1815          if (ecx_1 != 0)
005b181b              **(uint32_t**)ecx_1(1);
005b181b          
005b181f          eax_1[2] = 0;
005b1822          void* eax_2 = operator new(8);
005b1822          
005b182c          if (eax_2 == 0)
005b182c          {
005b1848              eax_1[2] = 0;
005b1850              return;
005b182c          }
005b182c          
005b1832          *(uint32_t*)eax_2 = 0x7970d0;
005b1838          *(uint32_t*)((char*)eax_2 + 4) = base;
005b183b          eax_1[2] = eax_2;
005b1843          return;
005b1805      }
005b1805      
005b1853      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005b185e      arg2 = PStringBase<char>::s_NullBuffer_1;
005b1866      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005b186f      Waveform::GetTypeString(this, &arg2);
005b1874      class PFileNode* ebp = arg2;
005b1882      int32_t var_18_3 = InterlockedIncrement(&ebp[0]);
005b1885      class PFileNode* var_18_4 = ebp;
005b1890      PFileNode::SetNameAsPString(eax_1, InterlockedIncrement(&ebp[0]));
005b1890      
005b18aa      if ((InterlockedDecrement(&ebp[0]) == 0 && ebp != 0x14))
005b18b3          *(uint32_t*)*(int32_t*)((char*)ebp + -0x14)(1);
005b18b3      
005b18b9      void* eax_8 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b18bc      float base_1 = this->base;
005b18c5      int32_t* ecx_11 = *(uint32_t*)((char*)eax_8 + 8);
005b18c5      
005b18ca      if (ecx_11 != 0)
005b18d0          **(uint32_t**)ecx_11(1);
005b18d0      
005b18d4      *(uint32_t*)((char*)eax_8 + 8) = 0;
005b18d7      void* eax_9 = operator new(8);
005b18d7      
005b18e1      if (eax_9 == 0)
005b18f2          eax_9 = nullptr;
005b18e1      else
005b18e1      {
005b18e7          *(uint32_t*)eax_9 = 0x7970d0;
005b18ed          *(uint32_t*)((char*)eax_9 + 4) = base_1;
005b18e1      }
005b18e1      
005b18f4      *(uint32_t*)((char*)eax_8 + 8) = eax_9;
005b18fb      void* eax_10 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b1900      int32_t* ecx_14 = *(uint32_t*)((char*)eax_10 + 8);
005b1905      float amplitude = this->amplitude;
005b1905      
005b190c      if (ecx_14 != 0)
005b1912          **(uint32_t**)ecx_14(1);
005b1912      
005b1916      *(uint32_t*)((char*)eax_10 + 8) = 0;
005b1919      int32_t* eax_11 = operator new(8);
005b1919      
005b1923      if (eax_11 == 0)
005b1934          eax_11 = nullptr;
005b1923      else
005b1923      {
005b1929          *(uint32_t*)eax_11 = 0x7970d0;
005b192f          eax_11[1] = amplitude;
005b1923      }
005b1923      
005b1936      *(uint32_t*)((char*)eax_10 + 8) = eax_11;
005b193d      void* eax_12 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b1942      int32_t* ecx_17 = *(uint32_t*)((char*)eax_12 + 8);
005b1947      float phase = this->phase;
005b1947      
005b194e      if (ecx_17 != 0)
005b1954          **(uint32_t**)ecx_17(1);
005b1954      
005b1958      *(uint32_t*)((char*)eax_12 + 8) = 0;
005b195b      int32_t* eax_13 = operator new(8);
005b195b      
005b1965      if (eax_13 == 0)
005b1976          eax_13 = nullptr;
005b1965      else
005b1965      {
005b196b          *(uint32_t*)eax_13 = 0x7970d0;
005b1971          eax_13[1] = phase;
005b1965      }
005b1965      
005b1978      *(uint32_t*)((char*)eax_12 + 8) = eax_13;
005b197f      void* eax_14 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b1984      int32_t* ecx_20 = *(uint32_t*)((char*)eax_14 + 8);
005b1989      float frequency = this->frequency;
005b1989      
005b1990      if (ecx_20 != 0)
005b1996          **(uint32_t**)ecx_20(1);
005b1996      
005b199a      *(uint32_t*)((char*)eax_14 + 8) = 0;
005b199d      int32_t* eax_15 = operator new(8);
005b199d      
005b19a7      if (eax_15 == 0)
005b19b8          eax_15 = nullptr;
005b19a7      else
005b19a7      {
005b19ad          *(uint32_t*)eax_15 = 0x7970d0;
005b19b3          eax_15[1] = frequency;
005b19a7      }
005b19a7      
005b19ba      *(uint32_t*)((char*)eax_14 + 8) = eax_15;
005b19c1      void* eax_16 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b19c6      int32_t* ecx_23 = *(uint32_t*)((char*)eax_16 + 8);
005b19cb      float roughness = this->roughness;
005b19cb      
005b19d2      if (ecx_23 != 0)
005b19d8          **(uint32_t**)ecx_23(1);
005b19d8      
005b19dc      *(uint32_t*)((char*)eax_16 + 8) = 0;
005b19df      int32_t* eax_17 = operator new(8);
005b19df      
005b19e9      if (eax_17 == 0)
005b19fa          eax_17 = nullptr;
005b19e9      else
005b19e9      {
005b19ef          *(uint32_t*)eax_17 = 0x7970d0;
005b19f5          eax_17[1] = roughness;
005b19e9      }
005b19e9      
005b19fc      *(uint32_t*)((char*)eax_16 + 8) = eax_17;
005b1a03      void* eax_18 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b1a08      int32_t* ecx_26 = *(uint32_t*)((char*)eax_18 + 8);
005b1a0d      float base_vel = this->base_vel;
005b1a0d      
005b1a14      if (ecx_26 != 0)
005b1a1a          **(uint32_t**)ecx_26(1);
005b1a1a      
005b1a1e      *(uint32_t*)((char*)eax_18 + 8) = 0;
005b1a21      int32_t* eax_19 = operator new(8);
005b1a21      
005b1a2b      if (eax_19 == 0)
005b1a3c          eax_19 = nullptr;
005b1a2b      else
005b1a2b      {
005b1a31          *(uint32_t*)eax_19 = 0x7970d0;
005b1a37          eax_19[1] = base_vel;
005b1a2b      }
005b1a2b      
005b1a3e      *(uint32_t*)((char*)eax_18 + 8) = eax_19;
005b1a45      void* eax_20 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b1a4a      int32_t* ecx_29 = *(uint32_t*)((char*)eax_20 + 8);
005b1a4f      float amplitude_vel = this->amplitude_vel;
005b1a4f      
005b1a56      if (ecx_29 != 0)
005b1a5c          **(uint32_t**)ecx_29(1);
005b1a5c      
005b1a60      *(uint32_t*)((char*)eax_20 + 8) = 0;
005b1a63      int32_t* eax_21 = operator new(8);
005b1a63      
005b1a6d      if (eax_21 == 0)
005b1a7e          eax_21 = nullptr;
005b1a6d      else
005b1a6d      {
005b1a73          *(uint32_t*)eax_21 = 0x7970d0;
005b1a79          eax_21[1] = amplitude_vel;
005b1a6d      }
005b1a6d      
005b1a80      *(uint32_t*)((char*)eax_20 + 8) = eax_21;
005b1a87      void* eax_22 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b1a8c      int32_t* ecx_32 = *(uint32_t*)((char*)eax_22 + 8);
005b1a91      float phase_vel = this->phase_vel;
005b1a91      
005b1a98      if (ecx_32 != 0)
005b1a9e          **(uint32_t**)ecx_32(1);
005b1a9e      
005b1aa2      *(uint32_t*)((char*)eax_22 + 8) = 0;
005b1aa5      int32_t* eax_23 = operator new(8);
005b1aa5      
005b1aaf      if (eax_23 == 0)
005b1ac0          eax_23 = nullptr;
005b1aaf      else
005b1aaf      {
005b1ab5          *(uint32_t*)eax_23 = 0x7970d0;
005b1abb          eax_23[1] = phase_vel;
005b1aaf      }
005b1aaf      
005b1ac2      *(uint32_t*)((char*)eax_22 + 8) = eax_23;
005b1ac9      void* eax_24 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b1ace      int32_t* ecx_35 = *(uint32_t*)((char*)eax_24 + 8);
005b1ad3      float frequency_vel = this->frequency_vel;
005b1ad3      
005b1ada      if (ecx_35 != 0)
005b1ae0          **(uint32_t**)ecx_35(1);
005b1ae0      
005b1ae4      *(uint32_t*)((char*)eax_24 + 8) = 0;
005b1ae7      int32_t* eax_25 = operator new(8);
005b1ae7      
005b1af1      if (eax_25 == 0)
005b1b02          eax_25 = nullptr;
005b1af1      else
005b1af1      {
005b1af7          *(uint32_t*)eax_25 = 0x7970d0;
005b1afd          eax_25[1] = frequency_vel;
005b1af1      }
005b1af1      
005b1b04      *(uint32_t*)((char*)eax_24 + 8) = eax_25;
005b1b0b      void* eax_26 = *(uint32_t*)(*(uint32_t*)eax_1 + 4)();
005b1b10      int32_t* ecx_38 = *(uint32_t*)((char*)eax_26 + 8);
005b1b15      float roughness_vel = this->roughness_vel;
005b1b15      
005b1b1c      if (ecx_38 != 0)
005b1b22          **(uint32_t**)ecx_38(1);
005b1b22      
005b1b26      *(uint32_t*)((char*)eax_26 + 8) = 0;
005b1b29      int32_t* eax_27 = operator new(8);
005b1b29      
005b1b33      if (eax_27 == 0)
005b1b44          eax_27 = nullptr;
005b1b33      else
005b1b33      {
005b1b39          *(uint32_t*)eax_27 = 0x7970d0;
005b1b3f          eax_27[1] = roughness_vel;
005b1b33      }
005b1b33      
005b1b46      *(uint32_t*)((char*)eax_26 + 8) = eax_27;
005b1b4d      void* __offset(PFileNode, -0x14) esi_3 = ((char*)arg2 - 0x14);
005b1b4d      
005b1b60      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
005b1b68          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
005b17f0  }

005b1b72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005b1b80  class PStringBase<char>* __thiscall Waveform::ToString(class Waveform const* this, class PStringBase<char>* __return)

005b1b80  {
005b1b80      int32_t __saved_ebp_1;
005b1b80      int32_t __saved_ebp = __saved_ebp_1;
005b1b89      int32_t ebx;
005b1b89      int32_t var_18 = ebx;
005b1b8a      int32_t esi;
005b1b8a      int32_t var_1c = esi;
005b1b8b      int32_t edi;
005b1b8b      int32_t var_20 = edi;
005b1b8e      int32_t var_24 = 0x7928af;
005b1b97      class PStringBase<char> var_10;
005b1b97      PStringBase<char>::PStringBase<char>(&var_10);
005b1b9c      enum WaveformType type = this->type;
005b1ba5      double var_28_1;
005b1ba5      
005b1ba5      if (type == WAVEFORM_NONE)
005b1ba5      {
005b1c46          var_28_1 = ((double)((long double)this->base));
005b1c4d          char const* const var_2c_1 = "%.3f";
005b1c53          PStringBase<char>::sprintf(&var_10, "%.3f");
005b1ba5      }
005b1ba5      else
005b1ba5      {
005b1bac          int32_t var_30;
005b1bac          
005b1bac          if (type == 2)
005b1bac          {
005b1c22              var_28_1 = ((double)((long double)this->frequency));
005b1c2d              var_30 = ((double)((long double)this->base));
005b1c30              char const* const var_34_1 = "[Speed] Base:%.3f, Velocity:%.3f";
005b1c36              PStringBase<char>::sprintf(&var_10, "[Speed] Base:%.3f, Velocity:%.3f");
005b1bac          }
005b1bac          else
005b1bac          {
005b1bae              int32_t var_24_1 = 0x7928af;
005b1bb7              void* var_c;
005b1bb7              PStringBase<char>::PStringBase<char>(&var_c);
005b1bc0              int32_t* var_24_2 = &var_c;
005b1bc3              Waveform::GetTypeString(this);
005b1bd2              var_28_1 = ((double)((long double)this->frequency));
005b1bdd              var_30 = ((double)((long double)this->phase));
005b1be4              int32_t var_38;
005b1be4              var_38 = ((double)((long double)this->amplitude));
005b1beb              double var_40_1 = ((double)((long double)this->base));
005b1bee              void* var_44_1 = var_c;
005b1bef              char const* const var_48_1 = "[%s] Base:%.3f, Amp:%.3f, Phase:…";
005b1bf5              PStringBase<char>::sprintf(&var_10, "[%s] Base:%.3f, Amp:%.3f, Phase:…");
005b1bfe              int32_t* esi_3 = ((char*)var_c - 0x14);
005b1c07              void* var_24_3 = &esi_3[1];
005b1c07              
005b1c10              if ((InterlockedDecrement() == 0 && esi_3 != 0))
005b1c10              {
005b1c14                  int32_t var_24_4 = 1;
005b1c18                  **(uint32_t**)esi_3();
005b1c10              }
005b1bac          }
005b1ba5      }
005b1ba5      
005b1c5b      class PStringBase<char> eax_4 = var_10;
005b1c62      __return->m_charbuffer = eax_4;
005b1c67      int32_t var_24_5 = (eax_4 - 0x10);
005b1c68      InterlockedIncrement();
005b1c78      void* var_14;
005b1c78      var_28_1 = ((char*)var_14 - 0x10);
005b1c78      
005b1c81      if ((InterlockedDecrement(var_28_1) == 0 && var_14 != 0x14))
005b1c81      {
005b1c85          var_28_1 = 1;
005b1c89          **(uint32_t**)((char*)var_14 - 0x14)(1);
005b1c81      }
005b1c81      
005b1c93      return __return;
005b1b80  }

005b1c96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b1ca0  uint8_t IsFloatValid(float const arg1)

005b1ca0  {
005b1cb5      if ((_isnan(((double)((long double)arg1))) == 0 && _finite(((double)((long double)arg1))) != 0))
005b1cd3          return 1;
005b1cd3      
005b1cd6      return 0;
005b1ca0  }

005b1cd7                                                                       90 90 90 90 90 90 90 90 90                         .........

005b1ce0  uint8_t Vector3Math::IsValid(class Vector3 const* arg1)

005b1ce0  {
005b1ce0      int32_t __saved_ebx_1;
005b1ce0      int32_t __saved_ebx = __saved_ebx_1;
005b1ce1      int32_t __saved_esi_1;
005b1ce1      int32_t __saved_esi = __saved_esi_1;
005b1ce2      class Vector3* esi = arg1;
005b1ce8      int32_t __saved_edi_1;
005b1ce8      int32_t __saved_edi = __saved_edi_1;
005b1cef      arg1 = esi->x;
005b1cef      
005b1d04      if ((_isnan(((double)((long double)arg1))) == 0 && _finite(((double)((long double)arg1))) != 0))
005b1d04      {
005b1d22          arg1 = esi->y;
005b1d22          
005b1d37          if ((_isnan(((double)((long double)arg1))) == 0 && _finite(((double)((long double)arg1))) != 0))
005b1d37          {
005b1d4f              double var_14_4;
005b1d4f              *(uint32_t*)((char*)var_14_4)[4] = esi->z;
005b1d4f              
005b1d5a              if (IsFloatValid() != 0)
005b1d64                  return 1;
005b1d37          }
005b1d04      }
005b1d04      
005b1d6a      return 0;
005b1ce0  }

005b1d6b                                   90 90 90 90 90                                                             .....

005b1d70  void __thiscall BBox::BuildBoundingBox(class BBox const* this, class BBox* arg2)

005b1d70  {
005b1d70      long double x87_r7 = ((long double)this->m_vMin.x);
005b1d76      long double temp1 = ((long double)arg2->m_vMin.x);
005b1d76      (x87_r7 - temp1);
005b1d78      float eax;
005b1d78      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
005b1d7a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005b1d7a      
005b1d7d      if (!(p))
005b1d81          arg2->m_vMin.x = this->m_vMin.x;
005b1d81      
005b1d83      long double x87_r7_1 = ((long double)this->m_vMin.y);
005b1d86      long double temp2 = ((long double)arg2->m_vMin.y);
005b1d86      (x87_r7_1 - temp2);
005b1d89      eax = ((((x87_r7_1 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2) ? 1 : 0) << 0xe) | 0))));
005b1d8b      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005b1d8b      
005b1d8e      if (!(p_1))
005b1d93          arg2->m_vMin.y = this->m_vMin.y;
005b1d93      
005b1d96      long double x87_r7_2 = ((long double)this->m_vMin.z);
005b1d99      long double temp3 = ((long double)arg2->m_vMin.z);
005b1d99      (x87_r7_2 - temp3);
005b1d9c      eax = ((((x87_r7_2 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp3) ? 1 : 0) << 0xe) | 0))));
005b1d9e      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005b1d9e      
005b1da1      if (!(p_2))
005b1da6          arg2->m_vMin.z = this->m_vMin.z;
005b1da6      
005b1da9      long double x87_r7_3 = ((long double)this->m_vMax.x);
005b1dac      long double temp4 = ((long double)arg2->m_vMax.x);
005b1dac      (x87_r7_3 - temp4);
005b1daf      eax = ((((x87_r7_3 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4) ? 1 : 0) << 0xe) | 0))));
005b1daf      
005b1db4      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005b1db9          arg2->m_vMax.x = this->m_vMax.x;
005b1db9      
005b1dbc      long double x87_r7_4 = ((long double)this->m_vMax.y);
005b1dbf      long double temp5 = ((long double)arg2->m_vMax.y);
005b1dbf      (x87_r7_4 - temp5);
005b1dc2      eax = ((((x87_r7_4 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp5) ? 1 : 0) << 0xe) | 0))));
005b1dc2      
005b1dc7      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005b1dcc          arg2->m_vMax.y = this->m_vMax.y;
005b1dcc      
005b1dcf      long double x87_r7_5 = ((long double)this->m_vMax.z);
005b1dd2      long double temp6 = ((long double)arg2->m_vMax.z);
005b1dd2      (x87_r7_5 - temp6);
005b1dd5      eax = ((((x87_r7_5 < temp6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp6))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp6) ? 1 : 0) << 0xe) | 0))));
005b1dd5      
005b1dda      if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005b1ddf          arg2->m_vMax.z = this->m_vMax.z;
005b1d70  }

005b1de5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005b1df0  void __fastcall BBox::InitForAdjustment(class BBox* this)

005b1df0  {
005b1e01      this->m_vMin.x = 0x7f7fffff;
005b1e0f      this->m_vMin.y = 3.40282347e+38f;
005b1e1e      this->m_vMin.z = 3.40282347e+38f;
005b1e2d      this->m_vMax.x = 0xff7fffff;
005b1e2d      this->m_vMax.y = -3.40282347e+38f;
005b1e2d      this->m_vMax.z = -3.40282347e+38f;
005b1df0  }

005b1e54                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b1e60  void __thiscall BBox::LocalToLocal(class BBox* this, class BBox const* arg2, class Position const* arg3, class Position const* arg4)

005b1e60  {
005b1e74      float z_5 = arg2->m_vMin.z;
005b1e7a      float y = arg2->m_vMin.y;
005b1e7d      float x = arg2->m_vMin.x;
005b1e86      float y_2 = y;
005b1e92      float z_8 = z_5;
005b1e96      float x_1;
005b1e96      Position::localtolocal(arg4, &x_1, arg3, &x);
005b1ea7      x = x_1;
005b1eaf      float x_2 = x;
005b1ebd      this->m_vMin.x = x_2;
005b1ebf      float var_14;
005b1ebf      this->m_vMin.y = var_14;
005b1ec6      float var_10;
005b1ec6      this->m_vMin.z = var_10;
005b1ec9      this->m_vMax.x = x_2;
005b1ec9      this->m_vMax.y = var_14;
005b1ec9      this->m_vMax.z = var_10;
005b1edb      float y_1 = arg2->m_vMax.y;
005b1ede      float z = arg2->m_vMax.z;
005b1ee1      x_1 = arg2->m_vMax.x;
005b1ef6      float z_15 = z;
005b1efa      float __return;
005b1efa      Position::localtolocal(arg4, &__return, arg3, &x_1);
005b1f0b      x = __return;
005b1f13      int32_t var_8;
005b1f13      int32_t var_20_1 = var_8;
005b1f1a      int32_t var_4;
005b1f1a      int32_t var_1c_1 = var_4;
005b1f1e      BBox::AdjustBBox(this, &x);
005b1f26      float z_3 = arg2->m_vMin.z;
005b1f29      long double x87_r6 = ((long double)arg2->m_vMax.y);
005b1f34      __return = ((float)((long double)arg2->m_vMax.x));
005b1f3d      float var_8_1 = ((float)x87_r6);
005b1f49      float z_16 = z_3;
005b1f4d      Position::localtolocal(arg4, &x_1, arg3, &__return);
005b1f5a      x = x_1;
005b1f66      float z_9 = z_3;
005b1f6d      float y_3 = y_1;
005b1f71      BBox::AdjustBBox(this, &x);
005b1f79      float z_1 = arg2->m_vMax.z;
005b1f7c      long double x87_r6_2 = ((long double)arg2->m_vMin.y);
005b1f87      __return = ((float)((long double)arg2->m_vMax.x));
005b1f90      float var_8_2 = ((float)x87_r6_2);
005b1f99      float z_17 = z_1;
005b1fa0      Position::localtolocal(arg4, &x_1, arg3, &__return);
005b1fb1      x = x_1;
005b1fbc      float y_4 = y_1;
005b1fc0      float z_10 = z_1;
005b1fc4      BBox::AdjustBBox(this, &x);
005b1fcb      float z_6 = arg2->m_vMax.z;
005b1fce      long double x87_r6_4 = ((long double)arg2->m_vMax.y);
005b1fd8      __return = ((float)((long double)arg2->m_vMin.x));
005b1fe2      float var_8_3 = ((float)x87_r6_4);
005b1fee      float z_18 = z_6;
005b1ff2      Position::localtolocal(arg4, &x_1, arg3, &__return);
005b2003      x = x_1;
005b200b      float y_5 = y_1;
005b2012      float z_11 = z_6;
005b2016      BBox::AdjustBBox(this, &x);
005b201d      float z_4 = arg2->m_vMin.z;
005b2020      long double x87_r6_6 = ((long double)arg2->m_vMax.y);
005b202b      __return = ((float)((long double)arg2->m_vMin.x));
005b2034      float var_8_4 = ((float)x87_r6_6);
005b2040      float z_19 = z_4;
005b2044      Position::localtolocal(arg4, &x_1, arg3, &__return);
005b2055      x = x_1;
005b2059      float y_6 = y_1;
005b205d      float z_12 = z_4;
005b2068      BBox::AdjustBBox(this, &x);
005b2070      float z_2 = arg2->m_vMin.z;
005b2073      long double x87_r6_8 = ((long double)arg2->m_vMin.y);
005b207e      __return = ((float)((long double)arg2->m_vMax.x));
005b2087      float var_8_5 = ((float)x87_r6_8);
005b2090      float z_20 = z_2;
005b2097      Position::localtolocal(arg4, &x_1, arg3, &__return);
005b20a8      x = x_1;
005b20b3      float y_7 = y_1;
005b20b7      float z_13 = z_2;
005b20bb      BBox::AdjustBBox(this, &x);
005b20c2      float z_7 = arg2->m_vMax.z;
005b20c5      long double x87_r6_10 = ((long double)arg2->m_vMin.y);
005b20cf      __return = ((float)((long double)arg2->m_vMin.x));
005b20d9      float var_8_6 = ((float)x87_r6_10);
005b20e5      float z_21 = z_7;
005b20e9      Position::localtolocal(arg4, &x_1, arg3, &__return);
005b20fa      x = x_1;
005b2102      float y_8 = y_1;
005b2109      float z_14 = z_7;
005b210d      BBox::AdjustBBox(this, &x);
005b1e60  }

005b211c                                                                                      90 90 90 90                              ....

005b2120  void __thiscall BBox::LocalToGlobal(class BBox* this, class BBox const* arg2, class Position const* arg3, class Position const* arg4)

005b2120  {
005b2134      float z_5 = arg2->m_vMin.z;
005b213a      float y = arg2->m_vMin.y;
005b213d      float x = arg2->m_vMin.x;
005b2146      float y_2 = y;
005b2152      float z_8 = z_5;
005b2156      float x_1;
005b2156      Position::localtoglobal(arg4, &x_1, arg3, &x);
005b2167      x = x_1;
005b216f      float x_2 = x;
005b217d      this->m_vMin.x = x_2;
005b217f      float var_14;
005b217f      this->m_vMin.y = var_14;
005b2186      float var_10;
005b2186      this->m_vMin.z = var_10;
005b2189      this->m_vMax.x = x_2;
005b2189      this->m_vMax.y = var_14;
005b2189      this->m_vMax.z = var_10;
005b219b      float y_1 = arg2->m_vMax.y;
005b219e      float z = arg2->m_vMax.z;
005b21a1      x_1 = arg2->m_vMax.x;
005b21b6      float z_15 = z;
005b21ba      float __return;
005b21ba      Position::localtoglobal(arg4, &__return, arg3, &x_1);
005b21cb      x = __return;
005b21d3      int32_t var_8;
005b21d3      int32_t var_20_1 = var_8;
005b21da      int32_t var_4;
005b21da      int32_t var_1c_1 = var_4;
005b21de      BBox::AdjustBBox(this, &x);
005b21e6      float z_3 = arg2->m_vMin.z;
005b21e9      long double x87_r6 = ((long double)arg2->m_vMax.y);
005b21f4      __return = ((float)((long double)arg2->m_vMax.x));
005b21fd      float var_8_1 = ((float)x87_r6);
005b2209      float z_16 = z_3;
005b220d      Position::localtoglobal(arg4, &x_1, arg3, &__return);
005b221a      x = x_1;
005b2226      float z_9 = z_3;
005b222d      float y_3 = y_1;
005b2231      BBox::AdjustBBox(this, &x);
005b2239      float z_1 = arg2->m_vMax.z;
005b223c      long double x87_r6_2 = ((long double)arg2->m_vMin.y);
005b2247      __return = ((float)((long double)arg2->m_vMax.x));
005b2250      float var_8_2 = ((float)x87_r6_2);
005b2259      float z_17 = z_1;
005b2260      Position::localtoglobal(arg4, &x_1, arg3, &__return);
005b2271      x = x_1;
005b227c      float y_4 = y_1;
005b2280      float z_10 = z_1;
005b2284      BBox::AdjustBBox(this, &x);
005b228b      float z_6 = arg2->m_vMax.z;
005b228e      long double x87_r6_4 = ((long double)arg2->m_vMax.y);
005b2298      __return = ((float)((long double)arg2->m_vMin.x));
005b22a2      float var_8_3 = ((float)x87_r6_4);
005b22ae      float z_18 = z_6;
005b22b2      Position::localtoglobal(arg4, &x_1, arg3, &__return);
005b22c3      x = x_1;
005b22cb      float y_5 = y_1;
005b22d2      float z_11 = z_6;
005b22d6      BBox::AdjustBBox(this, &x);
005b22dd      float z_4 = arg2->m_vMin.z;
005b22e0      long double x87_r6_6 = ((long double)arg2->m_vMax.y);
005b22eb      __return = ((float)((long double)arg2->m_vMin.x));
005b22f4      float var_8_4 = ((float)x87_r6_6);
005b2300      float z_19 = z_4;
005b2304      Position::localtoglobal(arg4, &x_1, arg3, &__return);
005b2315      x = x_1;
005b2319      float y_6 = y_1;
005b231d      float z_12 = z_4;
005b2328      BBox::AdjustBBox(this, &x);
005b2330      float z_2 = arg2->m_vMin.z;
005b2333      long double x87_r6_8 = ((long double)arg2->m_vMin.y);
005b233e      __return = ((float)((long double)arg2->m_vMax.x));
005b2347      float var_8_5 = ((float)x87_r6_8);
005b2350      float z_20 = z_2;
005b2357      Position::localtoglobal(arg4, &x_1, arg3, &__return);
005b2368      x = x_1;
005b2373      float y_7 = y_1;
005b2377      float z_13 = z_2;
005b237b      BBox::AdjustBBox(this, &x);
005b2382      float z_7 = arg2->m_vMax.z;
005b2385      long double x87_r6_10 = ((long double)arg2->m_vMin.y);
005b238f      __return = ((float)((long double)arg2->m_vMin.x));
005b2399      float var_8_6 = ((float)x87_r6_10);
005b23a5      float z_21 = z_7;
005b23a9      Position::localtoglobal(arg4, &x_1, arg3, &__return);
005b23ba      x = x_1;
005b23c2      float y_8 = y_1;
005b23c9      float z_14 = z_7;
005b23cd      BBox::AdjustBBox(this, &x);
005b2120  }

005b23dc                                                                                      90 90 90 90                              ....

005b23e0  void __thiscall BBox::ConvertToGlobal(class BBox* this, class Position const* arg2)

005b23e0  {
005b23ec      long double x87_r7 = ((long double)this->m_vMax.y);
005b23ef      float x = this->m_vMin.x;
005b23f1      float var_14 = ((float)x87_r7);
005b23f5      float y = this->m_vMin.y;
005b23f8      long double x87_r6 = ((long double)this->m_vMin.x);
005b23fa      float z_1 = this->m_vMin.z;
005b23fd      long double x87_r5 = ((long double)this->m_vMin.y);
005b2404      long double x87_r4 = ((long double)this->m_vMin.z);
005b2407      float x_1 = this->m_vMax.x;
005b2413      float z = this->m_vMax.z;
005b2435      float var_30 = ((float)((((x87_r5 * ((long double)arg2->frame.m_fl2gv[3])) + (x87_r4 * ((long double)arg2->frame.m_fl2gv[6]))) + (x87_r6 * ((long double)arg2->frame.m_fl2gv[0]))) + ((long double)arg2->frame.m_fOrigin.x)));
005b2439      float eax = var_30;
005b2453      float var_2c = ((float)((((x87_r5 * ((long double)arg2->frame.m_fl2gv[4])) + (x87_r4 * ((long double)arg2->frame.m_fl2gv[7]))) + (x87_r6 * ((long double)arg2->frame.m_fl2gv[1]))) + ((long double)arg2->frame.m_fOrigin.y)));
005b2471      this->m_vMin.x = eax;
005b2473      this->m_vMax.x = eax;
005b2476      this->m_vMin.y = var_2c;
005b2479      this->m_vMax.y = var_2c;
005b247c      float var_28 = ((float)((((x87_r5 * ((long double)arg2->frame.m_fl2gv[5])) + (x87_r4 * ((long double)arg2->frame.m_fl2gv[8]))) + (x87_r6 * ((long double)arg2->frame.m_fl2gv[2]))) + ((long double)arg2->frame.m_fOrigin.z)));
005b2484      long double x87_r6_4 = ((long double)z_1);
005b248a      this->m_vMin.z = var_28;
005b248d      this->m_vMax.z = var_28;
005b24a3      long double x87_r5_10 = ((((x87_r6_4 * ((long double)arg2->frame.m_fl2gv[6])) + (x87_r7 * ((long double)arg2->frame.m_fl2gv[3]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[0]))) + ((long double)arg2->frame.m_fOrigin.x));
005b24bf      long double x87_r5_15 = ((((x87_r6_4 * ((long double)arg2->frame.m_fl2gv[7])) + (x87_r7 * ((long double)arg2->frame.m_fl2gv[4]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[1]))) + ((long double)arg2->frame.m_fOrigin.y));
005b24c6      var_30 = ((float)x87_r5_10);
005b24dc      float var_2c_1 = ((float)x87_r5_15);
005b24ee      long double x87_r7_4 = ((((x87_r6_4 * ((long double)arg2->frame.m_fl2gv[8])) + (x87_r7 * ((long double)arg2->frame.m_fl2gv[5]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[2]))) + ((long double)arg2->frame.m_fOrigin.z));
005b24f9      float var_28_1 = ((float)x87_r7_4);
005b24ff      BBox::AdjustBBox(this, &var_30);
005b2504      long double x87_r7_5 = ((long double)y);
005b2508      long double x87_r6_10 = ((long double)z);
005b2521      long double x87_r5_20 = ((((x87_r6_10 * ((long double)arg2->frame.m_fl2gv[6])) + (x87_r7_5 * ((long double)arg2->frame.m_fl2gv[3]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[0]))) + ((long double)arg2->frame.m_fOrigin.x));
005b252c      var_30 = ((float)x87_r5_20);
005b254a      long double x87_r5_25 = ((((x87_r6_10 * ((long double)arg2->frame.m_fl2gv[7])) + (x87_r7_5 * ((long double)arg2->frame.m_fl2gv[4]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[1]))) + ((long double)arg2->frame.m_fOrigin.y));
005b2558      float var_2c_2 = ((float)x87_r5_25);
005b256e      long double x87_r7_9 = ((((x87_r6_10 * ((long double)arg2->frame.m_fl2gv[8])) + (x87_r7_5 * ((long double)arg2->frame.m_fl2gv[5]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[2]))) + ((long double)arg2->frame.m_fOrigin.z));
005b2579      float var_28_2 = ((float)x87_r7_9);
005b257d      BBox::AdjustBBox(this, &var_30);
005b2582      long double x87_r7_10 = ((long double)var_14);
005b2586      long double x87_r6_16 = ((long double)z);
005b259f      long double x87_r5_30 = ((((x87_r6_16 * ((long double)arg2->frame.m_fl2gv[6])) + (x87_r7_10 * ((long double)arg2->frame.m_fl2gv[3]))) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[0]))) + ((long double)arg2->frame.m_fOrigin.x));
005b25a8      long double x87_r5_32 = (x87_r6_16 * ((long double)arg2->frame.m_fl2gv[7]));
005b25ad      long double x87_r4_26 = (x87_r7_10 * ((long double)arg2->frame.m_fl2gv[4]));
005b25b4      var_30 = ((float)x87_r5_30);
005b25d8      float var_2c_3 = ((float)(((x87_r5_32 + x87_r4_26) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[1]))) + ((long double)arg2->frame.m_fOrigin.y)));
005b25ec      long double x87_r7_14 = ((((x87_r6_16 * ((long double)arg2->frame.m_fl2gv[8])) + (x87_r7_10 * ((long double)arg2->frame.m_fl2gv[5]))) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[2]))) + ((long double)arg2->frame.m_fOrigin.z));
005b25f7      float var_28_3 = ((float)x87_r7_14);
005b25fb      BBox::AdjustBBox(this, &var_30);
005b2600      long double x87_r7_15 = ((long double)var_14);
005b2604      long double x87_r6_22 = ((long double)z_1);
005b261d      long double x87_r5_40 = ((((x87_r6_22 * ((long double)arg2->frame.m_fl2gv[6])) + (x87_r7_15 * ((long double)arg2->frame.m_fl2gv[3]))) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[0]))) + ((long double)arg2->frame.m_fOrigin.x));
005b2628      var_30 = ((float)x87_r5_40);
005b2646      long double x87_r5_45 = ((((x87_r6_22 * ((long double)arg2->frame.m_fl2gv[7])) + (x87_r7_15 * ((long double)arg2->frame.m_fl2gv[4]))) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[1]))) + ((long double)arg2->frame.m_fOrigin.y));
005b2654      float var_2c_4 = ((float)x87_r5_45);
005b2668      long double x87_r7_19 = ((((x87_r6_22 * ((long double)arg2->frame.m_fl2gv[8])) + (x87_r7_15 * ((long double)arg2->frame.m_fl2gv[5]))) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[2]))) + ((long double)arg2->frame.m_fOrigin.z));
005b2673      float var_28_4 = ((float)x87_r7_19);
005b2679      BBox::AdjustBBox(this, &var_30);
005b267e      long double x87_r7_20 = ((long double)y);
005b2682      long double x87_r6_28 = ((long double)z_1);
005b269b      long double x87_r5_50 = ((((x87_r6_28 * ((long double)arg2->frame.m_fl2gv[6])) + (x87_r7_20 * ((long double)arg2->frame.m_fl2gv[3]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[0]))) + ((long double)arg2->frame.m_fOrigin.x));
005b26a6      var_30 = ((float)x87_r5_50);
005b26c4      long double x87_r5_55 = ((((x87_r6_28 * ((long double)arg2->frame.m_fl2gv[7])) + (x87_r7_20 * ((long double)arg2->frame.m_fl2gv[4]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[1]))) + ((long double)arg2->frame.m_fOrigin.y));
005b26d2      float var_2c_5 = ((float)x87_r5_55);
005b26e8      long double x87_r7_24 = ((((x87_r6_28 * ((long double)arg2->frame.m_fl2gv[8])) + (x87_r7_20 * ((long double)arg2->frame.m_fl2gv[5]))) + (((long double)x_1) * ((long double)arg2->frame.m_fl2gv[2]))) + ((long double)arg2->frame.m_fOrigin.z));
005b26f3      float var_28_5 = ((float)x87_r7_24);
005b26f7      BBox::AdjustBBox(this, &var_30);
005b26fc      long double x87_r7_25 = ((long double)y);
005b2700      long double x87_r6_34 = ((long double)z);
005b2719      long double x87_r5_60 = ((((x87_r6_34 * ((long double)arg2->frame.m_fl2gv[6])) + (x87_r7_25 * ((long double)arg2->frame.m_fl2gv[3]))) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[0]))) + ((long double)arg2->frame.m_fOrigin.x));
005b2724      var_30 = ((float)x87_r5_60);
005b2744      long double x87_r5_65 = ((((x87_r6_34 * ((long double)arg2->frame.m_fl2gv[7])) + (x87_r7_25 * ((long double)arg2->frame.m_fl2gv[4]))) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[1]))) + ((long double)arg2->frame.m_fOrigin.y));
005b2752      float var_2c_6 = ((float)x87_r5_65);
005b2766      long double x87_r7_29 = ((((x87_r6_34 * ((long double)arg2->frame.m_fl2gv[8])) + (x87_r7_25 * ((long double)arg2->frame.m_fl2gv[5]))) + (((long double)x) * ((long double)arg2->frame.m_fl2gv[2]))) + ((long double)arg2->frame.m_fOrigin.z));
005b2771      float var_28_6 = ((float)x87_r7_29);
005b2775      BBox::AdjustBBox(this, &var_30);
005b23e0  }

005b2783           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005b2790  class Vector3* __thiscall BBox::GetCenter(class BBox const* this, class Vector3* __return)

005b2790  {
005b279a      long double x87_r7_1 = ((((long double)this->m_vMax.z) + ((long double)this->m_vMin.z)) * ((long double)0.5f));
005b27a6      long double x87_r6_2 = ((((long double)this->m_vMax.y) + ((long double)this->m_vMin.y)) * ((long double)0.5f));
005b27b7      __return->x = ((float)((((long double)this->m_vMax.x) + ((long double)this->m_vMin.x)) * ((long double)0.5f)));
005b27b9      __return->y = ((float)x87_r6_2);
005b27bc      __return->z = ((float)x87_r7_1);
005b27bf      return __return;
005b2790  }

005b27c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005b27d0  void Serializer::SerializeObject(class Vector3* arg1, class Archive* arg2)

005b27d0  {
005b27d9      Archive::CheckAlignment(arg2, 0xc);
005b27e2      uint8_t* eax = Archive::GetBytes(arg2, 0xc);
005b27e2      
005b27e9      if (eax != 0)
005b27e9      {
005b27ef          if ((arg2->m_flags & 1) != 0)
005b27ef          {
005b27f7              *(uint32_t*)eax = arg1->x;
005b27fc              *(uint32_t*)(eax + 4) = arg1->y;
005b2802              *(uint32_t*)(eax + 8) = arg1->z;
005b2806              return;
005b27ef          }
005b27ef          
005b280d          arg1->x = *(uint32_t*)eax;
005b2812          arg1->y = *(uint32_t*)(eax + 4);
005b2818          arg1->z = *(uint32_t*)(eax + 8);
005b27e9      }
005b27d0  }

005b281d                                                                                         90 90 90                               ...

005b2820  void PerlinNoise::Init(class PerlinNoise* this @ ecx)

005b2820  {
005b2820      class PerlinNoise* this_1 = this;
005b2826      srand(0);
005b286f      int32_t i;
005b286f      
005b286f      for (i = 0; i < 0x100; )
005b286f      {
005b2837          p[i] = i;
005b2840          int32_t eax_2 = (rand() & 0x800001ff);
005b2840          
005b2845          if (eax_2 < 0)
005b284d              eax_2 = (((eax_2 - 1) | 0xfffffe00) + 1);
005b284d          
005b285b          i += 1;
005b2868          *(uint32_t*)((i << 2) + &data_8ee1cc) = ((float)(((long double)(eax_2 - 0x100)) * ((long double)0.00390625f)));
005b286f      }
005b286f      
005b2871      int32_t i_2 = (i - 1);
005b2871      
005b2872      if (i != 1)
005b2872      {
005b28a1          int32_t i_1;
005b28a1          
005b28a1          do
005b28a1          {
005b2874              int32_t edi_1 = p[i_2];
005b287d              int32_t eax_7 = (rand() & 0x800000ff);
005b287d              
005b2882              if (eax_7 < 0)
005b288a                  eax_7 = (((eax_7 - 1) | 0xffffff00) + 1);
005b288a              
005b288b              i_1 = i_2;
005b288b              i_2 -= 1;
005b2893              p[(1 + i_2)] = p[eax_7];
005b289a              p[eax_7] = edi_1;
005b28a1          } while (i_1 != 1);
005b2872      }
005b2872      
005b28b2      __builtin_memcpy(0x8ee5d0, 0x8ee1d0, 0x408);
005b28c3      __builtin_memcpy(0x8eedd8, 0x8ee9d8, 0x408);
005b2820  }

005b28ca                                90 90 90 90 90 90                                                            ......

005b28d0  uint32_t __thiscall PerlinNoise::Noise(class PerlinNoise* this, double arg2)

005b28d0  {
005b28db      arg2 = ((float)((long double)arg2));
005b28db      
005b28df      if (start != 0)
005b28df      {
005b28e1          start = 0;
005b28eb          PerlinNoise::Init(this);
005b28df      }
005b28df      
005b28f4      long double x87_r7_2 = (((long double)arg2) + ((long double)10000f));
005b28fc      int32_t eax = _ftol2();
005b2901      arg2 = eax;
005b2909      int32_t eax_1 = (eax & 0xff);
005b2916      uint32_t result = ((uint32_t)(eax_1 + 1));
005b292b      arg2 = ((float)((x87_r7_2 - ((long double)arg2)) * ((long double)g1[p[eax_1]])));
005b2937      g1[p[result]];
005b295c      return result;
005b28d0  }

005b295f                                                                                               90                                 .

005b2960  uint32_t __thiscall PerlinNoise::fBm1(class PerlinNoise* this, double arg2, double arg3, double arg4, double arg5)

005b2960  {
005b2969      int32_t eax;
005b2969      eax = first;
005b2974      int32_t var_18;
005b2974      int16_t top_1;
005b2974      
005b2974      if (eax != 0)
005b2974      {
005b2986      label_5b2986:
005b2986          long double x87_r7_2 = ((long double)0.0);
005b298f          long double temp1_1 = ((long double)arg5);
005b298f          (x87_r7_2 - temp1_1);
005b298f          top_1 = 0;
005b2995          (*(uint32_t*)lastH) = arg3;
005b299a          int32_t esi_1 = 0;
005b299c          *(int32_t*)((char*)lastH + 4) = *(uint32_t*)((char*)arg3)[4];
005b29a2          eax = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005b29a4          var_18 = 0;
005b29ac          int32_t var_14_1 = 0x3ff00000;
005b29b4          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
005b29b4          
005b29b7          if (!(p_2))
005b29b7          {
005b29be              double var_10_1 = ((double)-(((long double)arg3)));
005b29be              top_1 = 0;
005b29f2              bool p_3;
005b29f2              
005b29f2              do
005b29f2              {
005b29c2                  /* unimplemented  {fld st0, qword [esp+0x10]} */;
005b29c6                  /* unimplemented  {fld st0, qword [esp+0x18]} */;
005b29ca                  j__CIpow();
005b29cf                  exponent_array[esi_1] = ((double)/* exponent_array[esi_1] = fconvert.d(unimplemented  {fstp qword [esi*8+0x8ef1e8], st0}) */);
005b29cf                  /* unimplemented  {fstp qword [esi*8+0x8ef1e8], st0} */;
005b29d6                  /* unimplemented  {fld st0, qword [esp+0x10]} */;
005b29da                  esi_1 += 1;
005b29db                  /* unimplemented  {fmul st0, qword [ebp+0x18]} */;
005b29de                  int32_t var_1c_1 = esi_1;
005b29e2                  var_18 = ((double)/* var_18.q = fconvert.d(unimplemented  {fstp qword [esp+0x10], st0}) */);
005b29e2                  /* unimplemented  {fstp qword [esp+0x10], st0} */;
005b29e6                  /* unimplemented  {fild st0, dword [esp+0xc]} */;
005b29ea                  long double temp4_1 = ((long double)arg5);
005b29ea                  (/* unimplemented  {fcomp st0, qword [ebp+0x20]} f- temp4_1 */ - temp4_1);
005b29ea                  bool c0_3 = /* bool c0_3 = unimplemented  {fcomp st0, qword [ebp+0x20]} f< temp4_1 */ < temp4_1;
005b29ea                  bool c2_3 = (FCMP_UO(/* bool c2_3 = is_unordered.t(unimplemented  {fcomp st0, qword [ebp+0x20]}, temp4_1) */, temp4_1));
005b29ea                  bool c3_3 = /* bool c3_3 = unimplemented  {fcomp st0, qword [ebp+0x20]} f== temp4_1 */ == temp4_1;
005b29ea                  /* unimplemented  {fcomp st0, qword [ebp+0x20]} */;
005b29ea                  top_1 -= 1;
005b29ed                  eax = ((((c0_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_3) ? 1 : 0) << 0xa) | ((((c3_3) ? 1 : 0) << 0xe) | ((top_1 & 7) << 0xb)))));
005b29ef                  p_3 = /* p_3 = unimplemented  {test ah, 0x41} */;
005b29f2              } while (!(p_3));
005b29b7          }
005b29b7          
005b29f4          first = 0;
005b2974      }
005b2974      else
005b2974      {
005b2976          long double x87_r7_1 = ((long double)arg3);
005b2979          long double temp2_1 = ((long double)lastH);
005b2979          (x87_r7_1 - temp2_1);
005b2979          top_1 = 0;
005b297f          eax = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005b2981          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005b2981          
005b2984          if (p_1)
005b2984              goto label_5b2986;
005b2974      }
005b2974      
005b29fb      /* unimplemented  {fld st0, qword [&data_794610]} */;
005b2a01      int32_t esi_2 = 0;
005b2a03      var_18 = ((double)/* var_18.q = fconvert.d(unimplemented  {fst qword [esp+0x10], st0}) */);
005b2a07      /* unimplemented  {fld st0, qword [&data_794610]} */;
005b2a0d      long double temp3 = ((long double)arg5);
005b2a0d      (/* unimplemented  {fcomp st0, qword [ebp+0x20]} f- temp3 */ - temp3);
005b2a0d      bool c0_4 = /* bool c0_4 = unimplemented  {fcomp st0, qword [ebp+0x20]} f< temp3 */ < temp3;
005b2a0d      bool c2_4 = (FCMP_UO(/* bool c2_4 = is_unordered.t(unimplemented  {fcomp st0, qword [ebp+0x20]}, temp3) */, temp3));
005b2a0d      bool c3_4 = /* bool c3_4 = unimplemented  {fcomp st0, qword [ebp+0x20]} f== temp3 */ == temp3;
005b2a0d      /* unimplemented  {fcomp st0, qword [ebp+0x20]} */;
005b2a0d      int16_t top_10 = (top_1 - 1);
005b2a10      eax = ((((c0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_4) ? 1 : 0) << 0xa) | ((((c3_4) ? 1 : 0) << 0xe) | ((top_10 & 7) << 0xb)))));
005b2a12      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005b2a12      
005b2a15      if (!(p_4))
005b2a15      {
005b2a51          bool p_5;
005b2a51          
005b2a51          do
005b2a51          {
005b2a1a              /* unimplemented  {fstp st0, st0} */;
005b2a1a              /* unimplemented  {fstp st0, st0} */;
005b2a1f              int32_t var_2c_1 = *(uint32_t*)((char*)arg2)[4];
005b2a23              PerlinNoise::Noise(this, arg2);
005b2a23              /* unimplemented  {call PerlinNoise::Noise} */;
005b2a28              /* unimplemented  {fmul st0, qword [esi*8+0x8ef1e8]} */;
005b2a2f              esi_2 += 1;
005b2a30              int32_t var_1c_2 = esi_2;
005b2a34              /* unimplemented  {fadd qword [esp+0x10]} */;
005b2a38              var_18 = ((double)/* var_18.q = fconvert.d(unimplemented  {fst qword [esp+0x10], st0}) */);
005b2a3c              /* unimplemented  {fld st0, qword [ebp+0x8]} */;
005b2a3f              /* unimplemented  {fmul st0, qword [ebp+0x18]} */;
005b2a42              arg2 = ((double)/* arg2 = fconvert.d(unimplemented  {fstp qword [ebp+0x8], st0}) */);
005b2a42              /* unimplemented  {fstp qword [ebp+0x8], st0} */;
005b2a45              /* unimplemented  {fild st0, dword [esp+0xc]} */;
005b2a49              long double temp6_1 = ((long double)arg5);
005b2a49              (/* unimplemented  {fcomp st0, qword [ebp+0x20]} f- temp6_1 */ - temp6_1);
005b2a49              bool c0_5 = /* bool c0_5 = unimplemented  {fcomp st0, qword [ebp+0x20]} f< temp6_1 */ < temp6_1;
005b2a49              bool c2_5 = (FCMP_UO(/* bool c2_5 = is_unordered.t(unimplemented  {fcomp st0, qword [ebp+0x20]}, temp6_1) */, temp6_1));
005b2a49              bool c3_5 = /* bool c3_5 = unimplemented  {fcomp st0, qword [ebp+0x20]} f== temp6_1 */ == temp6_1;
005b2a49              /* unimplemented  {fcomp st0, qword [ebp+0x20]} */;
005b2a49              top_10 += 1;
005b2a4c              uint32_t eax_2;
005b2a4c              eax_2 = ((((c0_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_5) ? 1 : 0) << 0xa) | ((((c3_5) ? 1 : 0) << 0xe) | ((top_10 & 7) << 0xb)))));
005b2a4e              p_5 = /* p_5 = unimplemented  {test ah, 0x5} */;
005b2a51          } while (!(p_5));
005b2a15      }
005b2a15      
005b2a53      /* unimplemented  {fld st0, qword [ebp+0x20]} */;
005b2a5b      uint32_t var_1c_3 = _ftol2();
005b2a5f      /* unimplemented  {fild st0, dword [esp+0xc]} */;
005b2a63      /* unimplemented  {fsubr st0, qword [ebp+0x20]} */;
005b2a66      double var_10_2 = ((double)/* double var_10_2 = fconvert.d(unimplemented  {fst qword [esp+0x18], st0}) */);
005b2a6a      long double temp5 = ((long double)0.0);
005b2a6a      (/* unimplemented  {fcomp st0, qword [&data_794610]} f- temp5 */ - temp5);
005b2a6a      bool c0_6 = /* bool c0_6 = unimplemented  {fcomp st0, qword [&data_794610]} f< temp5 */ < temp5;
005b2a6a      bool c2_6 = (FCMP_UO(/* bool c2_6 = is_unordered.t(unimplemented  {fcomp st0, qword [&data_794610]}, temp5) */, temp5));
005b2a6a      bool c3_6 = /* bool c3_6 = unimplemented  {fcomp st0, qword [&data_794610]} f== temp5 */ == temp5;
005b2a6a      /* unimplemented  {fcomp st0, qword [&data_794610]} */;
005b2a70      uint32_t result;
005b2a70      result = ((((c0_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_6) ? 1 : 0) << 0xa) | ((((c3_6) ? 1 : 0) << 0xe) | ((top_10 & 7) << 0xb)))));
005b2a72      bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x44} */;
005b2a72      
005b2a75      if (p_6)
005b2a75      {
005b2a7a          /* unimplemented  {fstp st0, st0} */;
005b2a7a          /* unimplemented  {fstp st0, st0} */;
005b2a7f          int32_t var_2c_2 = *(uint32_t*)((char*)arg2)[4];
005b2a83          result = PerlinNoise::Noise(this, arg2);
005b2a83          /* unimplemented  {call PerlinNoise::Noise} */;
005b2a88          /* unimplemented  {fmul st0, qword [esi*8+0x8ef1e8]} */;
005b2a8f          /* unimplemented  {fmul st0, qword [esp+0x18]} */;
005b2a93          /* unimplemented  {fadd qword [esp+0x10]} */;
005b2a75      }
005b2a75      
005b2a9c      return result;
005b2960  }

005b2a9f                                                                                               90                                 .

005b2aa0  class PFileNode* __thiscall PFileNode::MakeSubNodeAsFloat(class PFileNode* this, float arg2)

005b2aa0  {
005b2aa3      void* result = *(int32_t*)((char*)this->vtable + 4)();
005b2aa3      
005b2aaa      if (result == 0)
005b2aad          return result;
005b2aad      
005b2ab0      int32_t* ecx = *(uint32_t*)((char*)result + 8);
005b2ab0      
005b2ab5      if (ecx != 0)
005b2abb          **(uint32_t**)ecx(1);
005b2abb      
005b2abf      *(uint32_t*)((char*)result + 8) = 0;
005b2ac6      void* eax = operator new(8);
005b2ac6      
005b2ad0      if (eax == 0)
005b2ad0      {
005b2aea          *(uint32_t*)((char*)result + 8) = 0;
005b2af0          return result;
005b2ad0      }
005b2ad0      
005b2ad6      *(uint32_t*)eax = 0x7970d0;
005b2adc      *(uint32_t*)((char*)eax + 4) = arg2;
005b2adf      *(uint32_t*)((char*)result + 8) = eax;
005b2ae5      return result;
005b2aa0  }

005b2af3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005b2b00  void __fastcall AppraisalProfile::Clear(class AppraisalProfile* this)

005b2b00  {
005b2b03      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
005b2b03      
005b2b0b      if (_intStatsTable != 0)
005b2b0d          _intStatsTable->vtable->__vecDelDtor(1);
005b2b0d      
005b2b13      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
005b2b18      this->_intStatsTable = nullptr;
005b2b18      
005b2b1b      if (_int64StatsTable != 0)
005b2b1d          _int64StatsTable->vtable->__vecDelDtor(1);
005b2b1d      
005b2b23      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
005b2b28      this->_int64StatsTable = nullptr;
005b2b28      
005b2b2b      if (_boolStatsTable != 0)
005b2b2d          _boolStatsTable->vtable->__vecDelDtor(1);
005b2b2d      
005b2b33      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
005b2b38      this->_boolStatsTable = nullptr;
005b2b38      
005b2b3b      if (_floatStatsTable != 0)
005b2b3d          _floatStatsTable->vtable->__vecDelDtor(1);
005b2b3d      
005b2b43      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
005b2b48      this->_floatStatsTable = nullptr;
005b2b48      
005b2b4b      if (_strStatsTable != 0)
005b2b4d          _strStatsTable->vtable->__vecDelDtor(1);
005b2b4d      
005b2b53      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
005b2b58      this->_strStatsTable = nullptr;
005b2b58      
005b2b5b      if (_didStatsTable != 0)
005b2b5d          _didStatsTable->vtable->__vecDelDtor(1);
005b2b5d      
005b2b63      class PSmartArray<unsigned long>* _spellBook = this->_spellBook;
005b2b68      this->_didStatsTable = nullptr;
005b2b68      
005b2b6b      if (_spellBook != 0)
005b2b6d          _spellBook->vtable->__vecDelDtor(1);
005b2b6d      
005b2b73      class CreatureAppraisalProfile* creature_profile = this->creature_profile;
005b2b78      this->_spellBook = nullptr;
005b2b78      
005b2b7b      if (creature_profile != 0)
005b2b7d          creature_profile->vtable->__vecDelDtor(1);
005b2b7d      
005b2b83      class WeaponProfile* weapon_profile = this->weapon_profile;
005b2b88      this->creature_profile = nullptr;
005b2b88      
005b2b8b      if (weapon_profile != 0)
005b2b8d          weapon_profile->vtable->__vecDelDtor(1);
005b2b8d      
005b2b93      class ArmorProfile* armor_profile = this->armor_profile;
005b2b98      this->weapon_profile = nullptr;
005b2b98      
005b2b9b      if (armor_profile != 0)
005b2b9d          armor_profile->vtable->__vecDelDtor(1);
005b2b9d      
005b2ba3      class HookAppraisalProfile* hook_profile = this->hook_profile;
005b2ba8      this->armor_profile = nullptr;
005b2ba8      
005b2bab      if (hook_profile != 0)
005b2bad          hook_profile->vtable->__vecDelDtor(1);
005b2bad      
005b2bb3      this->hook_profile = nullptr;
005b2bb6      __builtin_memset(&this->armor_ench_bitfield, 0, 0x30);
005b2bdb      this->success_flag = 1;
005b2b00  }

005b2be4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005b2bf0  int32_t __thiscall AppraisalProfile::InqCreature(class AppraisalProfile const* this, class CreatureAppraisalProfile* arg2)

005b2bf0  {
005b2bf0      class CreatureAppraisalProfile* creature_profile = this->creature_profile;
005b2bf0      
005b2bf5      if (creature_profile == 0)
005b2bf7          return creature_profile;
005b2bf7      
005b2bff      CreatureAppraisalProfile::operator=(arg2, creature_profile);
005b2c09      return 1;
005b2bf0  }

005b2c0c                                      90 90 90 90                                                              ....

005b2c10  int32_t __thiscall AppraisalProfile::InqIntEnchantmentMod(class AppraisalProfile const* this, uint32_t arg2, int32_t* arg3)

005b2c10  {
005b2c1c      *(uint32_t*)arg3 = 0;
005b2c22      uint32_t eax;
005b2c22      int32_t ecx;
005b2c22      int32_t edx_1;
005b2c22      
005b2c22      if (arg2 == 0x1c)
005b2c22      {
005b2c4c          eax = this->armor_ench_bitfield;
005b2c4f          edx_1 = 1;
005b2c54          ecx = 0x10000;
005b2c59      label_5b2c59:
005b2c59          
005b2c5b          if ((edx_1 & eax) != 0)
005b2c5b          {
005b2c5f              *(uint32_t*)arg3 = (eax & ecx);
005b2c67              return 1;
005b2c5b          }
005b2c22      }
005b2c22      else
005b2c22      {
005b2c27          if (arg2 == 0x2c)
005b2c27          {
005b2c3d              eax = this->weapon_ench_bitfield;
005b2c40              edx_1 = 8;
005b2c45              ecx = 0x80000;
005b2c4a              goto label_5b2c59;
005b2c27          }
005b2c27          
005b2c2c          if (arg2 == 0x31)
005b2c2c          {
005b2c2e              eax = this->weapon_ench_bitfield;
005b2c31              edx_1 = 4;
005b2c36              ecx = 0x40000;
005b2c3b              goto label_5b2c59;
005b2c2c          }
005b2c22      }
005b2c6d      return 0;
005b2c10  }


005b2c70  int32_t __thiscall AppraisalProfile::InqFloatEnchantmentMod(class AppraisalProfile const* this, uint32_t arg2, int32_t* arg3)

005b2c70  {
005b2c81      *(uint32_t*)arg3 = 0;
005b2c87      uint32_t eax_2;
005b2c87      char const* const ecx;
005b2c87      int32_t edx_1;
005b2c87      
005b2c87      if ((arg2 - 0xd) <= 0x99)
005b2c94          switch (arg2)
005b2c94          {
005b2c9b              case 0xd:
005b2c9b              {
005b2c9b                  eax_2 = this->armor_ench_bitfield;
005b2c9e                  edx_1 = 2;
005b2ca3                  ecx = 0x20000;
005b2e64              label_5b2e64:
005b2e64                  
005b2e66                  if ((edx_1 & eax_2) != 0)
005b2e66                  {
005b2e6a                      *(uint32_t*)arg3 = (eax_2 & ecx);
005b2e72                      return 1;
005b2e66                  }
005b2c9b                  break;
005b2c9b              }
005b2cad              case 0xe:
005b2cad              {
005b2cad                  eax_2 = this->armor_ench_bitfield;
005b2cb0                  edx_1 = 4;
005b2cb5                  ecx = 0x40000;
005b2cba                  goto label_5b2e64;
005b2cad              }
005b2cbf              case 0xf:
005b2cbf              {
005b2cbf                  eax_2 = this->armor_ench_bitfield;
005b2cc2                  edx_1 = 8;
005b2cc7                  ecx = 0x80000;
005b2ccc                  goto label_5b2e64;
005b2cbf              }
005b2cd1              case 0x10:
005b2cd1              {
005b2cd1                  eax_2 = this->armor_ench_bitfield;
005b2cd4                  edx_1 = 0x10;
005b2cd9                  ecx = 0x100000;
005b2cde                  goto label_5b2e64;
005b2cd1              }
005b2ce3              case 0x11:
005b2ce3              {
005b2ce3                  eax_2 = this->armor_ench_bitfield;
005b2ce6                  edx_1 = 0x20;
005b2ceb                  ecx = 0x200000;
005b2cf0                  goto label_5b2e64;
005b2ce3              }
005b2cf5              case 0x12:
005b2cf5              {
005b2cf5                  eax_2 = this->armor_ench_bitfield;
005b2cf8                  edx_1 = 0x40;
005b2cfd                  ecx = &IID_ISeekingPassThru;
005b2d02                  goto label_5b2e64;
005b2cf5              }
005b2d07              case 0x13:
005b2d07              {
005b2d07                  eax_2 = this->armor_ench_bitfield;
005b2d0a                  edx_1 = 0x80;
005b2d0f                  ecx = "activation type (%s) with '%s' b…";
005b2d14                  goto label_5b2e64;
005b2d07              }
005b2d4f              case 0x16:
005b2d4f              {
005b2d4f                  eax_2 = this->weapon_ench_bitfield;
005b2d52                  edx_1 = 0x10;
005b2d57                  ecx = 0x100000;
005b2d5c                  goto label_5b2e64;
005b2d4f              }
005b2d3d              case 0x1d:
005b2d3d              {
005b2d3d                  eax_2 = this->weapon_ench_bitfield;
005b2d40                  edx_1 = 2;
005b2d45                  ecx = 0x20000;
005b2d4a                  goto label_5b2e64;
005b2d3d              }
005b2d2b              case 0x3e:
005b2d2b              {
005b2d2b                  eax_2 = this->weapon_ench_bitfield;
005b2d2e                  edx_1 = 1;
005b2d33                  ecx = 0x10000;
005b2d38                  goto label_5b2e64;
005b2d2b              }
005b2d61              case 0x3f:
005b2d61              {
005b2d61                  eax_2 = this->weapon_ench_bitfield;
005b2d64                  edx_1 = 0x20;
005b2d69                  ecx = 0x200000;
005b2d6e                  goto label_5b2e64;
005b2d61              }
005b2d73              case 0x40:
005b2d73              {
005b2d73                  eax_2 = this->resist_ench_bitfield;
005b2d76                  edx_1 = 1;
005b2d7b                  ecx = 0x10000;
005b2d80                  goto label_5b2e64;
005b2d73              }
005b2d85              case 0x41:
005b2d85              {
005b2d85                  eax_2 = this->resist_ench_bitfield;
005b2d88                  edx_1 = 2;
005b2d8d                  ecx = 0x20000;
005b2d92                  goto label_5b2e64;
005b2d85              }
005b2d97              case 0x42:
005b2d97              {
005b2d97                  eax_2 = this->resist_ench_bitfield;
005b2d9a                  edx_1 = 4;
005b2d9f                  ecx = 0x40000;
005b2da4                  goto label_5b2e64;
005b2d97              }
005b2da9              case 0x43:
005b2da9              {
005b2da9                  eax_2 = this->resist_ench_bitfield;
005b2dac                  edx_1 = 8;
005b2db1                  ecx = 0x80000;
005b2db6                  goto label_5b2e64;
005b2da9              }
005b2dbb              case 0x44:
005b2dbb              {
005b2dbb                  eax_2 = this->resist_ench_bitfield;
005b2dbe                  edx_1 = 0x10;
005b2dc3                  ecx = 0x100000;
005b2dc8                  goto label_5b2e64;
005b2dbb              }
005b2dcd              case 0x45:
005b2dcd              {
005b2dcd                  eax_2 = this->resist_ench_bitfield;
005b2dd0                  edx_1 = 0x20;
005b2dd5                  ecx = 0x200000;
005b2dda                  goto label_5b2e64;
005b2dcd              }
005b2ddf              case 0x46:
005b2ddf              {
005b2ddf                  eax_2 = this->resist_ench_bitfield;
005b2de2                  edx_1 = 0x40;
005b2de7                  ecx = &IID_ISeekingPassThru;
005b2dec                  goto label_5b2e64;
005b2ddf              }
005b2dfd              case 0x47:
005b2dfd              {
005b2dfd                  eax_2 = this->resist_ench_bitfield;
005b2e00                  edx_1 = 0x80;
005b2e05                  ecx = "activation type (%s) with '%s' b…";
005b2e0a                  goto label_5b2e64;
005b2dfd              }
005b2e0c              case 0x48:
005b2e0c              {
005b2e0c                  eax_2 = this->resist_ench_bitfield;
005b2e0f                  edx_1 = 0x100;
005b2e14                  ecx = 0x1000000;
005b2e19                  goto label_5b2e64;
005b2e0c              }
005b2e1b              case 0x49:
005b2e1b              {
005b2e1b                  eax_2 = this->resist_ench_bitfield;
005b2e1e                  edx_1 = 0x200;
005b2e23                  ecx = 0x2000000;
005b2e28                  goto label_5b2e64;
005b2e1b              }
005b2e2a              case 0x4a:
005b2e2a              {
005b2e2a                  eax_2 = this->resist_ench_bitfield;
005b2e2d                  edx_1 = 0x400;
005b2e32                  ecx = 0x4000000;
005b2e37                  goto label_5b2e64;
005b2e2a              }
005b2e39              case 0x4b:
005b2e39              {
005b2e39                  eax_2 = this->resist_ench_bitfield;
005b2e3c                  edx_1 = 0x800;
005b2e41                  ecx = 0x8000000;
005b2e46                  goto label_5b2e64;
005b2e39              }
005b2e48              case 0x90:
005b2e48              {
005b2e48                  eax_2 = this->resist_ench_bitfield;
005b2e4b                  edx_1 = 0x1000;
005b2e50                  ecx = 0x10000000;
005b2e55                  goto label_5b2e64;
005b2e48              }
005b2e57              case 0x98:
005b2e57              {
005b2e57                  eax_2 = this->resist_ench_bitfield;
005b2e5a                  edx_1 = 0x2000;
005b2e5f                  ecx = 0x20000000;
005b2e5f                  goto label_5b2e64;
005b2e57              }
005b2d19              case 0xa5:
005b2d19              {
005b2d19                  eax_2 = this->armor_ench_bitfield;
005b2d1c                  edx_1 = 0x100;
005b2d21                  ecx = 0x1000000;
005b2d26                  goto label_5b2e64;
005b2d19              }
005b2dee              case 0xa6:
005b2dee              {
005b2dee                  eax_2 = this->resist_ench_bitfield;
005b2df1                  edx_1 = 0x4000;
005b2df6                  ecx = 0x40000000;
005b2dfb                  goto label_5b2e64;
005b2dee              }
005b2c94          }
005b2e78      return 0;
005b2c70  }

005b2e7b                                                                                   90                                         .
005b2e7c  uint32_t jump_table_5b2e7c[0x1c] = 
005b2e7c  {
005b2e7c      [0x00] =  0x005b2c9b
005b2e80      [0x01] =  0x005b2cad
005b2e84      [0x02] =  0x005b2cbf
005b2e88      [0x03] =  0x005b2cd1
005b2e8c      [0x04] =  0x005b2ce3
005b2e90      [0x05] =  0x005b2cf5
005b2e94      [0x06] =  0x005b2d07
005b2e98      [0x07] =  0x005b2d4f
005b2e9c      [0x08] =  0x005b2d3d
005b2ea0      [0x09] =  0x005b2d2b
005b2ea4      [0x0a] =  0x005b2d61
005b2ea8      [0x0b] =  0x005b2d73
005b2eac      [0x0c] =  0x005b2d85
005b2eb0      [0x0d] =  0x005b2d97
005b2eb4      [0x0e] =  0x005b2da9
005b2eb8      [0x0f] =  0x005b2dbb
005b2ebc      [0x10] =  0x005b2dcd
005b2ec0      [0x11] =  0x005b2ddf
005b2ec4      [0x12] =  0x005b2dfd
005b2ec8      [0x13] =  0x005b2e0c
005b2ecc      [0x14] =  0x005b2e1b
005b2ed0      [0x15] =  0x005b2e2a
005b2ed4      [0x16] =  0x005b2e39
005b2ed8      [0x17] =  0x005b2e48
005b2edc      [0x18] =  0x005b2e57
005b2ee0      [0x19] =  0x005b2d19
005b2ee4      [0x1a] =  0x005b2dee
005b2ee8      [0x1b] =  0x005b2e75
005b2eec  }
005b2eec  uint8_t lookup_table_5b2eec[0x9a] = 
005b2eec  {
005b2eec      [0x00] =  0x00
005b2eed      [0x01] =  0x01
005b2eee      [0x02] =  0x02
005b2eef      [0x03] =  0x03
005b2ef0      [0x04] =  0x04
005b2ef1      [0x05] =  0x05
005b2ef2      [0x06] =  0x06
005b2ef3      [0x07] =  0x1b
005b2ef4      [0x08] =  0x1b
005b2ef5      [0x09] =  0x07
005b2ef6      [0x0a] =  0x1b
005b2ef7      [0x0b] =  0x1b
005b2ef8      [0x0c] =  0x1b
005b2ef9      [0x0d] =  0x1b
005b2efa      [0x0e] =  0x1b
005b2efb      [0x0f] =  0x1b
005b2efc      [0x10] =  0x08
005b2efd      [0x11] =  0x1b
005b2efe      [0x12] =  0x1b
005b2eff      [0x13] =  0x1b
005b2f00      [0x14] =  0x1b
005b2f01      [0x15] =  0x1b
005b2f02      [0x16] =  0x1b
005b2f03      [0x17] =  0x1b
005b2f04      [0x18] =  0x1b
005b2f05      [0x19] =  0x1b
005b2f06      [0x1a] =  0x1b
005b2f07      [0x1b] =  0x1b
005b2f08      [0x1c] =  0x1b
005b2f09      [0x1d] =  0x1b
005b2f0a      [0x1e] =  0x1b
005b2f0b      [0x1f] =  0x1b
005b2f0c      [0x20] =  0x1b
005b2f0d      [0x21] =  0x1b
005b2f0e      [0x22] =  0x1b
005b2f0f      [0x23] =  0x1b
005b2f10      [0x24] =  0x1b
005b2f11      [0x25] =  0x1b
005b2f12      [0x26] =  0x1b
005b2f13      [0x27] =  0x1b
005b2f14      [0x28] =  0x1b
005b2f15      [0x29] =  0x1b
005b2f16      [0x2a] =  0x1b
005b2f17      [0x2b] =  0x1b
005b2f18      [0x2c] =  0x1b
005b2f19      [0x2d] =  0x1b
005b2f1a      [0x2e] =  0x1b
005b2f1b      [0x2f] =  0x1b
005b2f1c      [0x30] =  0x1b
005b2f1d      [0x31] =  0x09
005b2f1e      [0x32] =  0x0a
005b2f1f      [0x33] =  0x0b
005b2f20      [0x34] =  0x0c
005b2f21      [0x35] =  0x0d
005b2f22      [0x36] =  0x0e
005b2f23      [0x37] =  0x0f
005b2f24      [0x38] =  0x10
005b2f25      [0x39] =  0x11
005b2f26      [0x3a] =  0x12
005b2f27      [0x3b] =  0x13
005b2f28      [0x3c] =  0x14
005b2f29      [0x3d] =  0x15
005b2f2a      [0x3e] =  0x16
005b2f2b      [0x3f] =  0x1b
005b2f2c      [0x40] =  0x1b
005b2f2d      [0x41] =  0x1b
005b2f2e      [0x42] =  0x1b
005b2f2f      [0x43] =  0x1b
005b2f30      [0x44] =  0x1b
005b2f31      [0x45] =  0x1b
005b2f32      [0x46] =  0x1b
005b2f33      [0x47] =  0x1b
005b2f34      [0x48] =  0x1b
005b2f35      [0x49] =  0x1b
005b2f36      [0x4a] =  0x1b
005b2f37      [0x4b] =  0x1b
005b2f38      [0x4c] =  0x1b
005b2f39      [0x4d] =  0x1b
005b2f3a      [0x4e] =  0x1b
005b2f3b      [0x4f] =  0x1b
005b2f3c      [0x50] =  0x1b
005b2f3d      [0x51] =  0x1b
005b2f3e      [0x52] =  0x1b
005b2f3f      [0x53] =  0x1b
005b2f40      [0x54] =  0x1b
005b2f41      [0x55] =  0x1b
005b2f42      [0x56] =  0x1b
005b2f43      [0x57] =  0x1b
005b2f44      [0x58] =  0x1b
005b2f45      [0x59] =  0x1b
005b2f46      [0x5a] =  0x1b
005b2f47      [0x5b] =  0x1b
005b2f48      [0x5c] =  0x1b
005b2f49      [0x5d] =  0x1b
005b2f4a      [0x5e] =  0x1b
005b2f4b      [0x5f] =  0x1b
005b2f4c      [0x60] =  0x1b
005b2f4d      [0x61] =  0x1b
005b2f4e      [0x62] =  0x1b
005b2f4f      [0x63] =  0x1b
005b2f50      [0x64] =  0x1b
005b2f51      [0x65] =  0x1b
005b2f52      [0x66] =  0x1b
005b2f53      [0x67] =  0x1b
005b2f54      [0x68] =  0x1b
005b2f55      [0x69] =  0x1b
005b2f56      [0x6a] =  0x1b
005b2f57      [0x6b] =  0x1b
005b2f58      [0x6c] =  0x1b
005b2f59      [0x6d] =  0x1b
005b2f5a      [0x6e] =  0x1b
005b2f5b      [0x6f] =  0x1b
005b2f5c      [0x70] =  0x1b
005b2f5d      [0x71] =  0x1b
005b2f5e      [0x72] =  0x1b
005b2f5f      [0x73] =  0x1b
005b2f60      [0x74] =  0x1b
005b2f61      [0x75] =  0x1b
005b2f62      [0x76] =  0x1b
005b2f63      [0x77] =  0x1b
005b2f64      [0x78] =  0x1b
005b2f65      [0x79] =  0x1b
005b2f66      [0x7a] =  0x1b
005b2f67      [0x7b] =  0x1b
005b2f68      [0x7c] =  0x1b
005b2f69      [0x7d] =  0x1b
005b2f6a      [0x7e] =  0x1b
005b2f6b      [0x7f] =  0x1b
005b2f6c      [0x80] =  0x1b
005b2f6d      [0x81] =  0x1b
005b2f6e      [0x82] =  0x1b
005b2f6f      [0x83] =  0x17
005b2f70      [0x84] =  0x1b
005b2f71      [0x85] =  0x1b
005b2f72      [0x86] =  0x1b
005b2f73      [0x87] =  0x1b
005b2f74      [0x88] =  0x1b
005b2f75      [0x89] =  0x1b
005b2f76      [0x8a] =  0x1b
005b2f77      [0x8b] =  0x18
005b2f78      [0x8c] =  0x1b
005b2f79      [0x8d] =  0x1b
005b2f7a      [0x8e] =  0x1b
005b2f7b      [0x8f] =  0x1b
005b2f7c      [0x90] =  0x1b
005b2f7d      [0x91] =  0x1b
005b2f7e      [0x92] =  0x1b
005b2f7f      [0x93] =  0x1b
005b2f80      [0x94] =  0x1b
005b2f81      [0x95] =  0x1b
005b2f82      [0x96] =  0x1b
005b2f83      [0x97] =  0x1b
005b2f84      [0x98] =  0x19
005b2f85      [0x99] =  0x1a
005b2f86  }

005b2f86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005b2f90  int32_t __fastcall AppraisalProfile::IsHookedItemInscribable(class AppraisalProfile const* this)

005b2f90  {
005b2f90      class HookAppraisalProfile* hook_profile = this->hook_profile;
005b2f90      
005b2f95      if (hook_profile == 0)
005b2f9e          return 0;
005b2f9e      
005b2f97      /* tailcall */
005b2f97      return HookAppraisalProfile::IsInscribable(hook_profile);
005b2f90  }

005b2f9f                                                                                               90                                 .

005b2fa0  int32_t __fastcall AppraisalProfile::IsHookedItemHealer(class AppraisalProfile const* this)

005b2fa0  {
005b2fa0      class HookAppraisalProfile* hook_profile = this->hook_profile;
005b2fa0      
005b2fa5      if (hook_profile == 0)
005b2fae          return 0;
005b2fae      
005b2fa7      /* tailcall */
005b2fa7      return HookAppraisalProfile::IsHealer(hook_profile);
005b2fa0  }

005b2faf                                               90                                                                 .

005b2fb0  int32_t __fastcall AppraisalProfile::IsHookedItemLockpick(class AppraisalProfile const* this)

005b2fb0  {
005b2fb0      class HookAppraisalProfile* hook_profile = this->hook_profile;
005b2fb0      
005b2fb5      if (hook_profile == 0)
005b2fbe          return 0;
005b2fbe      
005b2fb7      /* tailcall */
005b2fb7      return HookAppraisalProfile::IsLockpick(hook_profile);
005b2fb0  }

005b2fbf                                                                                               90                                 .

005b2fc0  uint32_t __fastcall AppraisalProfile::GetHookedItemValidLocations(class AppraisalProfile const* this)

005b2fc0  {
005b2fc0      class HookAppraisalProfile* hook_profile = this->hook_profile;
005b2fc0      
005b2fc5      if (hook_profile == 0)
005b2fce          return 0;
005b2fce      
005b2fc7      /* tailcall */
005b2fc7      return CInputManager::GetMouseY(hook_profile);
005b2fc0  }

005b2fcf                                               90                                                                 .

005b2fd0  enum AMMO_TYPE __fastcall AppraisalProfile::GetHookedItemAmmoType(class AppraisalProfile const* this)

005b2fd0  {
005b2fd0      class HookAppraisalProfile* hook_profile = this->hook_profile;
005b2fd0      
005b2fd5      if (hook_profile == 0)
005b2fde          return 0;
005b2fde      
005b2fd7      /* tailcall */
005b2fd7      return DiskConBase::GetSubset(hook_profile);
005b2fd0  }

005b2fdf                                                                                               90                                 .

005b2fe0  void __thiscall AppraisalProfile::SetPackHeader(class AppraisalProfile* this, uint32_t* arg2)

005b2fe0  {
005b2fe9      if (this->_intStatsTable != 0)
005b2feb          *(uint32_t*)arg2 |= 1;
005b2feb      
005b2ff3      if (this->_int64StatsTable != 0)
005b2ff5          *(uint32_t*)arg2 |= 0x2000;
005b2ff5      
005b3000      if (this->_boolStatsTable != 0)
005b3002          *(uint32_t*)arg2 |= 2;
005b3002      
005b300a      if (this->_floatStatsTable != 0)
005b300c          *(uint32_t*)arg2 |= 4;
005b300c      
005b3014      if (this->_strStatsTable != 0)
005b3016          *(uint32_t*)arg2 |= 8;
005b3016      
005b301e      if (this->_didStatsTable != 0)
005b3020          *(uint32_t*)arg2 |= 0x1000;
005b3020      
005b302b      if (this->_spellBook != 0)
005b302d          *(uint32_t*)arg2 |= 0x10;
005b302d      
005b3035      if (this->creature_profile != 0)
005b3037          *(uint32_t*)arg2 |= 0x100;
005b3037      
005b3042      if (this->hook_profile != 0)
005b3044          *(uint32_t*)arg2 |= 0x40;
005b3044      
005b304c      if (this->weapon_profile != 0)
005b304e          *(uint32_t*)arg2 |= 0x20;
005b304e      
005b3056      if (this->armor_profile != 0)
005b3058          *(uint32_t*)arg2 |= 0x80;
005b3058      
005b3063      if (this->armor_ench_bitfield > 0)
005b3065          *(uint32_t*)arg2 |= 0x200;
005b3065      
005b3070      if (this->weapon_ench_bitfield > 0)
005b3072          *(uint32_t*)arg2 |= 0x800;
005b3072      
005b307d      if (this->resist_ench_bitfield > 0)
005b307f          *(uint32_t*)arg2 |= 0x400;
005b307f      
005b30c2      if (((((((((this->base_armor_head > 0 || this->base_armor_chest > 0) || this->base_armor_groin > 0) || this->base_armor_bicep > 0) || this->base_armor_wrist > 0) || this->base_armor_hand > 0) || this->base_armor_thigh > 0) || this->base_armor_shin > 0) || this->base_armor_foot > 0))
005b30c4          *(uint32_t*)arg2 |= 0x4000;
005b2fe0  }

005b30cd                                         90 90 90                                                               ...

005b30d0  uint32_t __fastcall AppraisalProfile::pack_size(class AppraisalProfile* this)

005b30d0  {
005b30d0      class AppraisalProfile* this_1 = this;
005b30d4      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
005b30da      this_1 = nullptr;
005b30e2      int32_t result = 8;
005b30e2      
005b30e7      if (_intStatsTable != 0)
005b30f7          result = (_intStatsTable->vtable->Pack(&this_1, 0) + 8);
005b30f7      
005b30fa      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
005b30fa      
005b30ff      if (_int64StatsTable != 0)
005b310d          result += _int64StatsTable->vtable->Pack(&this_1, 0);
005b310d      
005b310f      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
005b310f      
005b3114      if (_boolStatsTable != 0)
005b3122          result += _boolStatsTable->vtable->Pack(&this_1, 0);
005b3122      
005b3124      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
005b3124      
005b3129      if (_floatStatsTable != 0)
005b3137          result += _floatStatsTable->vtable->Pack(&this_1, 0);
005b3137      
005b3139      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
005b3139      
005b313e      if (_strStatsTable != 0)
005b314c          result += _strStatsTable->vtable->Pack(&this_1, 0);
005b314c      
005b314e      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
005b314e      
005b3153      if (_didStatsTable != 0)
005b3161          result += _didStatsTable->vtable->Pack(&this_1, 0);
005b3161      
005b3163      class PSmartArray<unsigned long>* _spellBook = this->_spellBook;
005b3163      
005b3168      if (_spellBook != 0)
005b3176          result += _spellBook->vtable->Pack(&this_1, 0);
005b3176      
005b3178      class CreatureAppraisalProfile* creature_profile = this->creature_profile;
005b3178      
005b317d      if (creature_profile != 0)
005b318b          result += creature_profile->vtable->Pack(&this_1, 0);
005b318b      
005b318d      class HookAppraisalProfile* hook_profile = this->hook_profile;
005b318d      
005b3192      if (hook_profile != 0)
005b31a0          result += hook_profile->vtable->Pack(&this_1, 0);
005b31a0      
005b31a2      class WeaponProfile* weapon_profile = this->weapon_profile;
005b31a2      
005b31a7      if (weapon_profile != 0)
005b31b5          result += weapon_profile->vtable->Pack(&this_1, 0);
005b31b5      
005b31b7      class ArmorProfile* armor_profile = this->armor_profile;
005b31b7      
005b31bc      if (armor_profile != 0)
005b31ca          result += armor_profile->vtable->Pack(&this_1, 0);
005b31ca      
005b31d1      if (this->armor_ench_bitfield > 0)
005b31d3          result += 4;
005b31d3      
005b31db      if (this->weapon_ench_bitfield > 0)
005b31dd          result += 4;
005b31dd      
005b31e5      if (this->resist_ench_bitfield > 0)
005b31e7          result += 4;
005b31e7      
005b3227      if ((this->base_armor_head <= 0 && (this->base_armor_chest <= 0 && (this->base_armor_groin <= 0 && (this->base_armor_bicep <= 0 && (this->base_armor_wrist <= 0 && (this->base_armor_hand <= 0 && (this->base_armor_thigh <= 0 && (this->base_armor_shin <= 0 && this->base_armor_foot <= 0)))))))))
005b3231          return result;
005b3231      
005b3229      return (result + 0x24);
005b30d0  }

005b3232                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005b3240  void CopyTheFucker(class CreatureAppraisalProfile** arg1, class CreatureAppraisalProfile const* arg2)

005b3240  {
005b324c      if (arg2 != 0)
005b324c      {
005b3262          if (*(uint32_t*)arg1 == 0)
005b3262          {
005b3266              void* eax_2 = operator new(0x38);
005b3266              
005b3270              if (eax_2 != 0)
005b3270              {
005b3274                  class CreatureAppraisalProfile* eax_3 = CreatureAppraisalProfile::CreatureAppraisalProfile(eax_2);
005b327c                  *(uint32_t*)arg1 = eax_3;
005b327e                  CreatureAppraisalProfile::operator=(eax_3, arg2);
005b3285                  return;
005b3270              }
005b3270              
005b3288              *(uint32_t*)arg1 = nullptr;
005b3262          }
005b3262          
005b328d          CreatureAppraisalProfile::operator=(*(uint32_t*)arg1, arg2);
005b324c      }
005b324c      else
005b324c      {
005b324e          class CreatureAppraisalProfile* ecx = *(uint32_t*)arg1;
005b324e          
005b3252          if (ecx != 0)
005b3252          {
005b3254              ecx->vtable->__vecDelDtor(1);
005b325a              *(uint32_t*)arg1 = arg2;
005b3252          }
005b324c      }
005b3240  }

005b3295                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005b32a0  void __fastcall AppraisalProfile::AppraisalProfile(class AppraisalProfile* this)

005b32a0  {
005b32a5      this->vtable = 0x7e6590;
005b32ab      __builtin_memset(&this->creature_profile, 0, 0x2c);
005b32cc      AppraisalProfile::Clear(this);
005b32a0  }

005b32d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005b32e0  void __fastcall AppraisalProfile::~AppraisalProfile(class AppraisalProfile* this)

005b32e0  {
005b32e3      this->vtable = 0x7e6590;
005b32e9      AppraisalProfile::Clear(this);
005b32ee      this->vtable = 0x79285c;
005b32e0  }

005b32f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b3300  class WeaponProfile& __thiscall WeaponProfile::operator=(class WeaponProfile* this, class WeaponProfile const& arg2)

005b3300  {
005b3309      this->damage_type = arg2->damage_type;
005b330f      this->weapon_skill = arg2->weapon_skill;
005b3315      this->weapon_time = arg2->weapon_time;
005b331b      this->weapon_damage = arg2->weapon_damage;
005b3321      this->damage_variance = arg2->damage_variance;
005b3327      *(uint32_t*)((char*)this->damage_variance)[4] = *(uint32_t*)((char*)arg2->damage_variance)[4];
005b332d      this->damage_mod = arg2->damage_mod;
005b3333      *(uint32_t*)((char*)this->damage_mod)[4] = *(uint32_t*)((char*)arg2->damage_mod)[4];
005b3339      this->weapon_length = arg2->weapon_length;
005b333f      *(uint32_t*)((char*)this->weapon_length)[4] = *(uint32_t*)((char*)arg2->weapon_length)[4];
005b3345      this->max_velocity = arg2->max_velocity;
005b334b      *(uint32_t*)((char*)this->max_velocity)[4] = *(uint32_t*)((char*)arg2->max_velocity)[4];
005b3351      this->weapon_offense = arg2->weapon_offense;
005b3357      *(uint32_t*)((char*)this->weapon_offense)[4] = *(uint32_t*)((char*)arg2->weapon_offense)[4];
005b335d      this->max_velocity_estimated = arg2->max_velocity_estimated;
005b3360      return this;
005b3300  }

005b3363           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005b3370  int32_t __thiscall AppraisalProfile::InqArmor(class AppraisalProfile const* this, class ArmorProfile* arg2)

005b3370  {
005b3370      class ArmorProfile* armor_profile = this->armor_profile;
005b3370      
005b3375      if (armor_profile == 0)
005b3377          return armor_profile;
005b3377      
005b3381      arg2->mod_vs_slash = armor_profile->mod_vs_slash;
005b3387      arg2->mod_vs_pierce = armor_profile->mod_vs_pierce;
005b338d      arg2->mod_vs_bludgeon = armor_profile->mod_vs_bludgeon;
005b3393      arg2->mod_vs_cold = armor_profile->mod_vs_cold;
005b3399      arg2->mod_vs_fire = armor_profile->mod_vs_fire;
005b339f      arg2->mod_vs_acid = armor_profile->mod_vs_acid;
005b33a5      arg2->mod_vs_electric = armor_profile->mod_vs_electric;
005b33ab      arg2->mod_vs_nether = armor_profile->mod_vs_nether;
005b33b3      return 1;
005b3370  }

005b33b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b33c0  uint32_t __thiscall AppraisalProfile::Pack(class AppraisalProfile* this, void** arg2, uint32_t arg3)

005b33c0  {
005b33c0      class AppraisalProfile* this_1 = this;
005b33c2      void** esi = arg2;
005b33c2      
005b33cc      if (*(uint32_t*)esi == 0)
005b33d6          return AppraisalProfile::pack_size(this);
005b33d6      
005b33da      uint32_t result = AppraisalProfile::pack_size(this);
005b33da      
005b33e9      if (arg3 >= result)
005b33e9      {
005b33f7          arg2 = nullptr;
005b33ff          AppraisalProfile::SetPackHeader(this, &arg2);
005b3406          void** ebx_1 = arg2;
005b340a          **(uint32_t**)esi = ebx_1;
005b340e          void* edx_2 = (*(uint32_t*)esi + 4);
005b3411          *(uint32_t*)esi = edx_2;
005b3418          *(uint32_t*)edx_2 = this->success_flag;
005b341a          *(uint32_t*)esi += 4;
005b341d          class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
005b341d          
005b3422          if (_intStatsTable != 0)
005b3424              _intStatsTable->vtable->Pack(esi, arg3);
005b3424          
005b342b          class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
005b342b          
005b3430          if (_int64StatsTable != 0)
005b3432              _int64StatsTable->vtable->Pack(esi, arg3);
005b3432          
005b3439          class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
005b3439          
005b343e          if (_boolStatsTable != 0)
005b3440              _boolStatsTable->vtable->Pack(esi, arg3);
005b3440          
005b3447          class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
005b3447          
005b344c          if (_floatStatsTable != 0)
005b344e              _floatStatsTable->vtable->Pack(esi, arg3);
005b344e          
005b3455          class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
005b3455          
005b345a          if (_strStatsTable != 0)
005b345c              _strStatsTable->vtable->Pack(esi, arg3);
005b345c          
005b3463          class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
005b3463          
005b3468          if (_didStatsTable != 0)
005b346a              _didStatsTable->vtable->Pack(esi, arg3);
005b346a          
005b3471          class PSmartArray<unsigned long>* _spellBook = this->_spellBook;
005b3471          
005b3476          if (_spellBook != 0)
005b3478              _spellBook->vtable->Pack(esi, arg3);
005b3478          
005b3481          if (ebx_1 < 0)
005b3483              this->armor_profile->vtable->Pack(esi, arg3);
005b3483          
005b3490          if ((*(uint8_t*)((char*)ebx_1)[1] & 1) != 0)
005b3492              this->creature_profile->vtable->Pack(esi, arg3);
005b3492          
005b349f          if ((ebx_1 & 0x20) != 0)
005b34a1              this->weapon_profile->vtable->Pack(esi, arg3);
005b34a1          
005b34ae          if ((ebx_1 & 0x40) != 0)
005b34b0              this->hook_profile->vtable->Pack(esi, arg3);
005b34b0          
005b34bd          if ((*(uint8_t*)((char*)ebx_1)[1] & 2) != 0)
005b34bd          {
005b34c4              **(uint32_t**)esi = this->armor_ench_bitfield;
005b34c6              *(uint32_t*)esi += 4;
005b34bd          }
005b34bd          
005b34cc          if ((*(uint8_t*)((char*)ebx_1)[1] & 8) != 0)
005b34cc          {
005b34d3              **(uint32_t**)esi = this->weapon_ench_bitfield;
005b34d5              *(uint32_t*)esi += 4;
005b34cc          }
005b34cc          
005b34db          if ((*(uint8_t*)((char*)ebx_1)[1] & 4) != 0)
005b34db          {
005b34e2              **(uint32_t**)esi = this->resist_ench_bitfield;
005b34e4              *(uint32_t*)esi += 4;
005b34db          }
005b34db          
005b34ea          if ((*(uint8_t*)((char*)ebx_1)[1] & 0x40) != 0)
005b34ea          {
005b34f1              **(uint32_t**)esi = this->base_armor_head;
005b34f5              void* ebx_3 = (*(uint32_t*)esi + 4);
005b34f8              *(uint32_t*)esi = ebx_3;
005b34ff              *(uint32_t*)ebx_3 = this->base_armor_chest;
005b3503              void* edx_13 = (*(uint32_t*)esi + 4);
005b3506              *(uint32_t*)esi = edx_13;
005b350d              *(uint32_t*)edx_13 = this->base_armor_groin;
005b3511              void* ecx_12 = (*(uint32_t*)esi + 4);
005b3514              *(uint32_t*)esi = ecx_12;
005b351b              *(uint32_t*)ecx_12 = this->base_armor_bicep;
005b351f              void* eax_14 = (*(uint32_t*)esi + 4);
005b3522              *(uint32_t*)esi = eax_14;
005b3527              *(uint32_t*)eax_14 = this->base_armor_wrist;
005b352b              void* ebp_2 = (*(uint32_t*)esi + 4);
005b352e              *(uint32_t*)esi = ebp_2;
005b3535              *(uint32_t*)ebp_2 = this->base_armor_hand;
005b3539              void* ebx_5 = (*(uint32_t*)esi + 4);
005b353c              *(uint32_t*)esi = ebx_5;
005b3543              *(uint32_t*)ebx_5 = this->base_armor_thigh;
005b3547              void* edx_18 = (*(uint32_t*)esi + 4);
005b354a              *(uint32_t*)esi = edx_18;
005b3551              *(uint32_t*)edx_18 = this->base_armor_shin;
005b3555              void* ecx_17 = (*(uint32_t*)esi + 4);
005b3558              *(uint32_t*)esi = ecx_17;
005b355f              *(uint32_t*)ecx_17 = this->base_armor_foot;
005b3561              *(uint32_t*)esi += 4;
005b34ea          }
005b33e9      }
005b33e9      
005b356d      return result;
005b33c0  }


005b3570  void CopyTheFucker(class WeaponProfile** arg1, class WeaponProfile* arg2)

005b3570  {
005b357c      if (arg2 != 0)
005b357c      {
005b3592          if (*(uint32_t*)arg1 == 0)
005b3592          {
005b3596              void* eax_2 = operator new(0x48);
005b3596              
005b35a0              if (eax_2 != 0)
005b35a0              {
005b35a4                  class WeaponProfile* eax_3 = WeaponProfile::WeaponProfile(eax_2);
005b35ac                  *(uint32_t*)arg1 = eax_3;
005b35ae                  WeaponProfile::operator=(eax_3, arg2);
005b35b5                  return;
005b35a0              }
005b35a0              
005b35b8              *(uint32_t*)arg1 = nullptr;
005b3592          }
005b3592          
005b35bd          WeaponProfile::operator=(*(uint32_t*)arg1, arg2);
005b357c      }
005b357c      else
005b357c      {
005b357e          class WeaponProfile* ecx = *(uint32_t*)arg1;
005b357e          
005b3582          if (ecx != 0)
005b3582          {
005b3584              ecx->vtable->__vecDelDtor(1);
005b358a              *(uint32_t*)arg1 = arg2;
005b3582          }
005b357c      }
005b3570  }

005b35c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005b35d0  void CopyTheFucker(class ArmorProfile** arg1, class ArmorProfile* arg2)

005b35d0  {
005b35d7      if (arg2 == 0)
005b35d7      {
005b35dd          class ArmorProfile* ecx = *(uint32_t*)arg1;
005b35dd          
005b35e1          if (ecx != 0)
005b35e1          {
005b35e7              ecx->vtable->__vecDelDtor(1);
005b35ed              *(uint32_t*)arg1 = nullptr;
005b35e1          }
005b35e1          
005b35e1          return;
005b35d7      }
005b35d7      
005b35fd      if (*(uint32_t*)arg1 == 0)
005b35fd      {
005b3601          class ArmorProfile* eax_2 = operator new(0x24);
005b3601          
005b360b          if (eax_2 == 0)
005b3632              eax_2 = nullptr;
005b360b          else
005b360b          {
005b3612              eax_2->vtable = 0x7af2fc;
005b3618              eax_2->mod_vs_slash = 1f;
005b361b              eax_2->mod_vs_pierce = 1f;
005b361e              eax_2->mod_vs_bludgeon = 1f;
005b3621              eax_2->mod_vs_cold = 1f;
005b3624              eax_2->mod_vs_fire = 1f;
005b3627              eax_2->mod_vs_acid = 1f;
005b362a              eax_2->mod_vs_electric = 1f;
005b362d              eax_2->mod_vs_nether = 1f;
005b360b          }
005b360b          
005b3634          *(uint32_t*)arg1 = eax_2;
005b35fd      }
005b35fd      
005b3636      class ArmorProfile* eax_3 = *(uint32_t*)arg1;
005b363b      eax_3->mod_vs_slash = arg2->mod_vs_slash;
005b3641      eax_3->mod_vs_pierce = arg2->mod_vs_pierce;
005b3647      eax_3->mod_vs_bludgeon = arg2->mod_vs_bludgeon;
005b364d      eax_3->mod_vs_cold = arg2->mod_vs_cold;
005b3653      eax_3->mod_vs_fire = arg2->mod_vs_fire;
005b3659      eax_3->mod_vs_acid = arg2->mod_vs_acid;
005b365f      eax_3->mod_vs_electric = arg2->mod_vs_electric;
005b3665      eax_3->mod_vs_nether = arg2->mod_vs_nether;
005b35d0  }

005b366b                                   90 90 90 90 90                                                             .....

005b3670  void CopyTheFucker(class HookAppraisalProfile** arg1, class HookAppraisalProfile* arg2)

005b3670  {
005b3678      if (arg2 == 0)
005b3678      {
005b367e          class HookAppraisalProfile* ecx = *(uint32_t*)arg1;
005b367e          
005b3682          if (ecx != 0)
005b3682          {
005b3684              ecx->vtable->__vecDelDtor(1);
005b368a              *(uint32_t*)arg1 = arg2;
005b3682          }
005b3682          
005b3682          return;
005b3678      }
005b3678      
005b3690      class GeneratorQueueNode** edi_1 = arg1;
005b3690      
005b3697      if (*(uint32_t*)edi_1 == 0)
005b3697      {
005b36a0          class GeneratorQueueNode* esi_2 = operator new(0x10);
005b36a0          
005b36a7          if (esi_2 != 0)
005b36a7          {
005b36ab              esi_2->vtable = 0x7e657c;
005b36b1              HookAppraisalProfile::Clear(esi_2);
005b36b9              *(uint32_t*)edi_1 = esi_2;
005b36bb              GeneratorQueueNode::operator=(esi_2, arg2);
005b36c3              return;
005b36a7          }
005b36a7          
005b36c6          *(uint32_t*)edi_1 = nullptr;
005b3697      }
005b3697      
005b36cb      GeneratorQueueNode::operator=(*(uint32_t*)edi_1, arg2);
005b3670  }

005b36d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b36e0  int32_t* __thiscall AC1Legacy::SmartArray<unsigned long>::operator=(int32_t* arg1, int32_t* arg2)

005b36e0  {
005b36ee      if (arg1[1] >= arg2[1])
005b36ee      {
005b3706      label_5b3706:
005b3706          int32_t* eax_3 = *(uint32_t*)arg2;
005b370b          void* edx_1 = &eax_3[arg2[2]];
005b3710          int32_t* ecx_2 = *(uint32_t*)arg1;
005b3710          
005b3712          while (eax_3 < edx_1)
005b3712          {
005b3717              *(uint32_t*)ecx_2 = *(uint32_t*)eax_3;
005b3719              eax_3 = &eax_3[1];
005b371c              ecx_2 = &ecx_2[1];
005b3712          }
005b3712          
005b3727          arg1[2] = arg2[2];
005b36ee      }
005b36ee      else
005b36ee      {
005b36f0          arg1[2] = 0;
005b36f0          
005b3704          if (AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(arg1, arg2[1]) != 0)
005b3704              goto label_5b3706;
005b36ee      }
005b36ee      
005b372e      return arg1;
005b36e0  }

005b3731                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005b3740  int32_t __thiscall PSmartArray<unsigned long>::StreamPack(class PSmartArray<unsigned long>* this, enum STREAMTYPE arg2, void** arg3, uint32_t* arg4)

005b3740  {
005b3740      class PSmartArray<unsigned long>* m_num = this;
005b3747      uint32_t* ebp = arg4;
005b375e      m_num = this->m_num;
005b375e      
005b376c      if (STREAMPACK(arg2, &m_num, arg3, ebp) != 0)
005b376c      {
005b3771          if (arg2 != STREAM_UNPACK)
005b3771              goto label_5b3799;
005b3771          
005b3773          class PSmartArray<unsigned long>* m_num_1 = m_num;
005b377d          this->m_num = 0;
005b377d          
005b378d          if (AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(&this->m_data, m_num_1) != 0)
005b378d          {
005b3777              this->m_num = m_num_1;
005b3792              ebp = arg4;
005b3799          label_5b3799:
005b3799              int32_t edi_2 = 0;
005b3799              
005b379d              if (this->m_num <= 0)
005b37cc                  return 1;
005b37cc              
005b37ae              while (true)
005b37ae              {
005b37b8                  if (STREAMPACK(arg2, &this->m_data[edi_2], arg3, ebp) == 0)
005b37d6                      return 0;
005b37d6                  
005b37bd                  edi_2 += 1;
005b37bd                  
005b37c0                  if (edi_2 >= this->m_num)
005b37cc                      return 1;
005b37ae              }
005b378d          }
005b376c      }
005b376c      
005b37d6      return 0;
005b3740  }

005b37d9                                                                             90 90 90 90 90 90 90                           .......

005b37e0  void* __thiscall AppraisalProfile::`scalar deleting destructor'(class AppraisalProfile* this, uint32_t arg2)

005b37e0  {
005b37e3      this->vtable = 0x7e6590;
005b37e9      AppraisalProfile::Clear(this);
005b37f3      this->vtable = 0x79285c;
005b37f3      
005b37f9      if ((arg2 & 1) != 0)
005b37fc          operator delete(this);
005b37fc      
005b3807      return this;
005b37e0  }

005b380a                                90 90 90 90 90 90                                                            ......

005b3810  int32_t __thiscall AppraisalProfile::InqWeapon(class AppraisalProfile const* this, class WeaponProfile* arg2)

005b3810  {
005b3810      class WeaponProfile* weapon_profile = this->weapon_profile;
005b3810      
005b3815      if (weapon_profile == 0)
005b3817          return weapon_profile;
005b3817      
005b381f      WeaponProfile::operator=(arg2, weapon_profile);
005b3829      return 1;
005b3810  }

005b382c                                      90 90 90 90                                                              ....

005b3830  int32_t __thiscall AppraisalProfile::InqInt(class AppraisalProfile const* this, uint32_t arg2, int32_t* arg3)

005b3830  {
005b3830      class PackableHashTable<unsigned long,long>* _intStatsTable = this->_intStatsTable;
005b3830      
005b3835      if (_intStatsTable != 0)
005b3835      {
005b383c          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_intStatsTable, &arg2);
005b383c          
005b3843          if (eax_1 != 0)
005b3843          {
005b384b              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
005b3852              return 1;
005b3843          }
005b3835      }
005b3835      
005b3857      return 0;
005b3830  }

005b385a                                                                                90 90 90 90 90 90                            ......

005b3860  int32_t __thiscall AppraisalProfile::InqInt64(class AppraisalProfile const* this, uint32_t arg2, int64_t* arg3)

005b3860  {
005b3860      class PackableHashTable<unsigned long,__int64>* _int64StatsTable = this->_int64StatsTable;
005b3860      
005b3865      if (_int64StatsTable != 0)
005b3865      {
005b386c          double* eax_1 = PackableHashTable<unsigned long,double>::lookup(_int64StatsTable, &arg2);
005b386c          
005b3873          if (eax_1 != 0)
005b3873          {
005b387b              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
005b3880              *(uint32_t*)((char*)arg3 + 4) = *(uint32_t*)((char*)eax_1 + 4);
005b3888              return 1;
005b3873          }
005b3865      }
005b3865      
005b388d      return 0;
005b3860  }


005b3890  int32_t __thiscall AppraisalProfile::InqBool(class AppraisalProfile const* this, uint32_t arg2, int32_t* arg3)

005b3890  {
005b3890      class PackableHashTable<unsigned long,int>* _boolStatsTable = this->_boolStatsTable;
005b3890      
005b3895      if (_boolStatsTable != 0)
005b3895      {
005b389c          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_boolStatsTable, &arg2);
005b389c          
005b38a3          if (eax_1 != 0)
005b38a3          {
005b38ab              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
005b38b2              return 1;
005b38a3          }
005b3895      }
005b3895      
005b38b7      return 0;
005b3890  }

005b38ba                                                                                90 90 90 90 90 90                            ......

005b38c0  int32_t __thiscall AppraisalProfile::InqFloat(class AppraisalProfile const* this, uint32_t arg2, double* arg3)

005b38c0  {
005b38c0      class PackableHashTable<unsigned long,double>* _floatStatsTable = this->_floatStatsTable;
005b38c0      
005b38c5      if (_floatStatsTable != 0)
005b38c5      {
005b38cc          double* eax_1 = PackableHashTable<unsigned long,double>::lookup(_floatStatsTable, &arg2);
005b38cc          
005b38d3          if (eax_1 != 0)
005b38d3          {
005b38db              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
005b38e0              *(uint32_t*)((char*)arg3 + 4) = *(uint32_t*)((char*)eax_1 + 4);
005b38e8              return 1;
005b38d3          }
005b38c5      }
005b38c5      
005b38ed      return 0;
005b38c0  }


005b38f0  int32_t __thiscall AppraisalProfile::InqDataID(class AppraisalProfile const* this, uint32_t arg2, class IDClass<_tagDataID,32,0>* arg3)

005b38f0  {
005b38f0      class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* _didStatsTable = this->_didStatsTable;
005b38f0      
005b38f5      if (_didStatsTable != 0)
005b38f5      {
005b38fc          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_didStatsTable, &arg2);
005b38fc          
005b3903          if (eax_1 != 0)
005b3903          {
005b390b              *(uint32_t*)arg3 = *(uint32_t*)eax_1;
005b3912              return 1;
005b3903          }
005b38f5      }
005b38f5      
005b3917      return 0;
005b38f0  }

005b391a                                                                                90 90 90 90 90 90                            ......

005b3920  void* __thiscall PSmartArray<unsigned long>::`scalar deleting destructor'(class PSmartArray<unsigned long>* this, uint32_t arg2)

005b3920  {
005b3923      this->vtable = 0x79285c;
005b392d      operator delete[](this->m_data);
005b392d      
005b393b      if ((arg2 & 1) != 0)
005b393e          operator delete(this);
005b393e      
005b3949      return this;
005b3920  }

005b394c                                      90 90 90 90                                                              ....

005b3950  int32_t __thiscall AppraisalProfile::InqString(class AppraisalProfile const* this, uint32_t arg2, class AC1Legacy::PStringBase<char>* arg3)

005b3950  {
005b3950      class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* _strStatsTable = this->_strStatsTable;
005b3950      
005b3955      if (_strStatsTable != 0)
005b3955      {
005b395c          uint32_t* eax_1 = PackableHashTable<unsigned long,unsigned long>::lookup(_strStatsTable, &arg2);
005b395c          
005b3963          if (eax_1 != 0)
005b3963          {
005b396a              AC1Legacy::PStringBase<char>::operator=(arg3, eax_1);
005b3974              return 1;
005b3963          }
005b3955      }
005b3955      
005b3979      return 0;
005b3950  }

005b397c                                                                                      90 90 90 90                              ....

005b3980  int32_t __thiscall AppraisalProfile::UnPack(class AppraisalProfile* this, void** arg2, uint32_t arg3)

005b3980  {
005b3980      class AppraisalProfile* this_1 = this;
005b3987      AppraisalProfile::Clear(this);
005b398c      void** esi = arg2;
005b3990      void* eax = *(uint32_t*)esi;
005b3992      void** ecx = *(uint32_t*)eax;
005b399b      *(uint32_t*)esi = ((char*)eax + 4);
005b399f      this->success_flag = *(uint32_t*)((char*)eax + 4);
005b39ac      arg2 = ecx;
005b39b0      *(uint32_t*)esi += 4;
005b39b0      
005b39b2      if ((ecx & 1) != 0)
005b39b2      {
005b39b6          void* eax_3 = operator new(0x14);
005b39c2          void* ecx_2;
005b39c2          
005b39c2          if (eax_3 == 0)
005b39e6              ecx_2 = nullptr;
005b39c2          else
005b39c2          {
005b39c6              *(uint32_t*)eax_3 = 0x7cec44;
005b39cd              *(uint32_t*)((char*)eax_3 + 4) = 0;
005b39d0              *(uint32_t*)((char*)eax_3 + 8) = 0;
005b39d3              *(uint32_t*)((char*)eax_3 + 0xc) = 0x10;
005b39da              *(uint32_t*)((char*)eax_3 + 0x10) = 0;
005b39dd              PackableHashTable<unsigned long,CContractTracker>::Init(eax_3);
005b39e2              ecx_2 = eax_3;
005b39c2          }
005b39c2          
005b39ed          this->_intStatsTable = ecx_2;
005b39f3          *(uint32_t*)(*(uint32_t*)ecx_2 + 0x10)(esi, arg3);
005b39f6          ecx = arg2;
005b39b2      }
005b39b2      
005b39fd      if ((*(uint8_t*)((char*)ecx)[1] & 0x20) != 0)
005b39fd      {
005b3a01          void* eax_5 = operator new(0x14);
005b3a0d          void* ecx_4;
005b3a0d          
005b3a0d          if (eax_5 == 0)
005b3a31              ecx_4 = nullptr;
005b3a0d          else
005b3a0d          {
005b3a11              *(uint32_t*)eax_5 = 0x7e441c;
005b3a18              *(uint32_t*)((char*)eax_5 + 4) = 0;
005b3a1b              *(uint32_t*)((char*)eax_5 + 8) = 0;
005b3a1e              *(uint32_t*)((char*)eax_5 + 0xc) = 8;
005b3a25              *(uint32_t*)((char*)eax_5 + 0x10) = 0;
005b3a28              PackableHashTable<unsigned long,CContractTracker>::Init(eax_5);
005b3a2d              ecx_4 = eax_5;
005b3a0d          }
005b3a0d          
005b3a38          this->_int64StatsTable = ecx_4;
005b3a3e          *(uint32_t*)(*(uint32_t*)ecx_4 + 0x10)(esi, arg3);
005b3a41          ecx = arg2;
005b39fd      }
005b39fd      
005b3a48      if ((ecx & 2) != 0)
005b3a48      {
005b3a4c          void* eax_7 = operator new(0x14);
005b3a58          void* ecx_6;
005b3a58          
005b3a58          if (eax_7 == 0)
005b3a7c              ecx_6 = nullptr;
005b3a58          else
005b3a58          {
005b3a5c              *(uint32_t*)eax_7 = 0x7e4430;
005b3a63              *(uint32_t*)((char*)eax_7 + 4) = 0;
005b3a66              *(uint32_t*)((char*)eax_7 + 8) = 0;
005b3a69              *(uint32_t*)((char*)eax_7 + 0xc) = 8;
005b3a70              *(uint32_t*)((char*)eax_7 + 0x10) = 0;
005b3a73              PackableHashTable<unsigned long,CContractTracker>::Init(eax_7);
005b3a78              ecx_6 = eax_7;
005b3a58          }
005b3a58          
005b3a83          this->_boolStatsTable = ecx_6;
005b3a89          *(uint32_t*)(*(uint32_t*)ecx_6 + 0x10)(esi, arg3);
005b3a8c          ecx = arg2;
005b3a48      }
005b3a48      
005b3a93      if ((ecx & 4) != 0)
005b3a93      {
005b3a97          void* eax_9 = operator new(0x14);
005b3aa3          void* ecx_8;
005b3aa3          
005b3aa3          if (eax_9 == 0)
005b3ac7              ecx_8 = nullptr;
005b3aa3          else
005b3aa3          {
005b3aa7              *(uint32_t*)eax_9 = 0x7e4444;
005b3aae              *(uint32_t*)((char*)eax_9 + 4) = 0;
005b3ab1              *(uint32_t*)((char*)eax_9 + 8) = 0;
005b3ab4              *(uint32_t*)((char*)eax_9 + 0xc) = 8;
005b3abb              *(uint32_t*)((char*)eax_9 + 0x10) = 0;
005b3abe              PackableHashTable<unsigned long,CContractTracker>::Init(eax_9);
005b3ac3              ecx_8 = eax_9;
005b3aa3          }
005b3aa3          
005b3ace          this->_floatStatsTable = ecx_8;
005b3ad4          *(uint32_t*)(*(uint32_t*)ecx_8 + 0x10)(esi, arg3);
005b3ad7          ecx = arg2;
005b3a93      }
005b3a93      
005b3ade      if ((ecx & 8) != 0)
005b3ade      {
005b3ae2          void* eax_11 = operator new(0x14);
005b3aee          void* ecx_10;
005b3aee          
005b3aee          if (eax_11 == 0)
005b3b12              ecx_10 = nullptr;
005b3aee          else
005b3aee          {
005b3af2              *(uint32_t*)eax_11 = 0x7e446c;
005b3af9              *(uint32_t*)((char*)eax_11 + 4) = 0;
005b3afc              *(uint32_t*)((char*)eax_11 + 8) = 0;
005b3aff              *(uint32_t*)((char*)eax_11 + 0xc) = 8;
005b3b06              *(uint32_t*)((char*)eax_11 + 0x10) = 0;
005b3b09              PackableHashTable<unsigned long,CContractTracker>::Init(eax_11);
005b3b0e              ecx_10 = eax_11;
005b3aee          }
005b3aee          
005b3b19          this->_strStatsTable = ecx_10;
005b3b1f          *(uint32_t*)(*(uint32_t*)ecx_10 + 0x10)(esi, arg3);
005b3b22          ecx = arg2;
005b3ade      }
005b3ade      
005b3b29      if ((*(uint8_t*)((char*)ecx)[1] & 0x10) != 0)
005b3b29      {
005b3b2d          void* eax_13 = operator new(0x14);
005b3b39          void* ecx_12;
005b3b39          
005b3b39          if (eax_13 == 0)
005b3b5d              ecx_12 = nullptr;
005b3b39          else
005b3b39          {
005b3b3d              *(uint32_t*)eax_13 = 0x7e4458;
005b3b44              *(uint32_t*)((char*)eax_13 + 4) = 0;
005b3b47              *(uint32_t*)((char*)eax_13 + 8) = 0;
005b3b4a              *(uint32_t*)((char*)eax_13 + 0xc) = 8;
005b3b51              *(uint32_t*)((char*)eax_13 + 0x10) = 0;
005b3b54              PackableHashTable<unsigned long,CContractTracker>::Init(eax_13);
005b3b59              ecx_12 = eax_13;
005b3b39          }
005b3b39          
005b3b64          this->_didStatsTable = ecx_12;
005b3b6a          *(uint32_t*)(*(uint32_t*)ecx_12 + 0x10)(esi, arg3);
005b3b6d          ecx = arg2;
005b3b29      }
005b3b29      
005b3b74      if ((ecx & 0x10) != 0)
005b3b74      {
005b3b78          void* eax_15 = operator new(0x10);
005b3b84          void* ecx_14;
005b3b84          
005b3b84          if (eax_15 == 0)
005b3ba3              ecx_14 = nullptr;
005b3b84          else
005b3b84          {
005b3b8b              *(uint32_t*)((char*)eax_15 + 4) = 0;
005b3b8d              *(uint32_t*)((char*)eax_15 + 8) = 0;
005b3b90              *(uint32_t*)((char*)eax_15 + 0xc) = 0;
005b3b93              AC1Legacy::SmartArray<TChessPiece<CBasePiece> *>::grow(((char*)eax_15 + 4), 8);
005b3b98              *(uint32_t*)eax_15 = &PSmartArray<unsigned long>::`vftable';
005b3b9f              ecx_14 = eax_15;
005b3b84          }
005b3b84          
005b3baa          this->_spellBook = ecx_14;
005b3bb0          *(uint32_t*)(*(uint32_t*)ecx_14 + 0x10)(esi, arg3);
005b3bb3          ecx = arg2;
005b3b74      }
005b3b74      
005b3bb9      uint32_t ebp_8;
005b3bb9      
005b3bb9      if (ecx >= 0)
005b3c06          ebp_8 = arg3;
005b3bb9      else
005b3bb9      {
005b3bbd          void* eax_17 = operator new(0x24);
005b3bbd          
005b3bc7          if (eax_17 == 0)
005b3bee              eax_17 = nullptr;
005b3bc7          else
005b3bc7          {
005b3bce              *(uint32_t*)eax_17 = 0x7af2fc;
005b3bd4              *(uint32_t*)((char*)eax_17 + 4) = 0x3f800000;
005b3bd7              *(uint32_t*)((char*)eax_17 + 8) = 0x3f800000;
005b3bda              *(uint32_t*)((char*)eax_17 + 0xc) = 0x3f800000;
005b3bdd              *(uint32_t*)((char*)eax_17 + 0x10) = 0x3f800000;
005b3be0              *(uint32_t*)((char*)eax_17 + 0x14) = 0x3f800000;
005b3be3              *(uint32_t*)((char*)eax_17 + 0x18) = 0x3f800000;
005b3be6              *(uint32_t*)((char*)eax_17 + 0x1c) = 0x3f800000;
005b3be9              *(uint32_t*)((char*)eax_17 + 0x20) = 0x3f800000;
005b3bc7          }
005b3bc7          
005b3bf0          ebp_8 = arg3;
005b3bf5          this->armor_profile = eax_17;
005b3bfd          *(uint32_t*)(*(uint32_t*)eax_17 + 0x10)(esi, ebp_8);
005b3c00          ecx = arg2;
005b3bb9      }
005b3bb9      
005b3c0d      if ((*(uint8_t*)((char*)ecx)[1] & 1) != 0)
005b3c0d      {
005b3c11          void* eax_18 = operator new(0x38);
005b3c1b          class CreatureAppraisalProfile* eax_19;
005b3c1b          
005b3c1b          if (eax_18 == 0)
005b3c26              eax_19 = nullptr;
005b3c1b          else
005b3c1f              eax_19 = CreatureAppraisalProfile::CreatureAppraisalProfile(eax_18);
005b3c1f          
005b3c29          this->creature_profile = eax_19;
005b3c2c          eax_19->vtable->UnPack(esi, ebp_8);
005b3c34          ecx = arg2;
005b3c0d      }
005b3c0d      
005b3c3b      if ((ecx & 0x20) != 0)
005b3c3b      {
005b3c3f          void* eax_20 = operator new(0x48);
005b3c49          class WeaponProfile* eax_21;
005b3c49          
005b3c49          if (eax_20 == 0)
005b3c54              eax_21 = nullptr;
005b3c49          else
005b3c4d              eax_21 = WeaponProfile::WeaponProfile(eax_20);
005b3c4d          
005b3c57          this->weapon_profile = eax_21;
005b3c5a          eax_21->vtable->UnPack(esi, ebp_8);
005b3c62          ecx = arg2;
005b3c3b      }
005b3c3b      
005b3c69      if ((ecx & 0x40) != 0)
005b3c69      {
005b3c6d          void* eax_22 = operator new(0x10);
005b3c79          void* ecx_21;
005b3c79          
005b3c79          if (eax_22 == 0)
005b3c8d              ecx_21 = nullptr;
005b3c79          else
005b3c79          {
005b3c7d              *(uint32_t*)eax_22 = 0x7e657c;
005b3c84              HookAppraisalProfile::Clear(eax_22);
005b3c89              ecx_21 = eax_22;
005b3c79          }
005b3c79          
005b3c94          this->hook_profile = ecx_21;
005b3c9a          *(uint32_t*)(*(uint32_t*)ecx_21 + 0x10)(esi, arg3);
005b3c9d          ecx = arg2;
005b3c69      }
005b3c69      
005b3ca4      if ((*(uint8_t*)((char*)ecx)[1] & 2) != 0)
005b3ca4      {
005b3caa          this->armor_ench_bitfield = **(uint32_t**)esi;
005b3cad          *(uint32_t*)esi += 4;
005b3ca4      }
005b3ca4      
005b3cb3      if ((*(uint8_t*)((char*)ecx)[1] & 8) != 0)
005b3cb3      {
005b3cb9          this->weapon_ench_bitfield = **(uint32_t**)esi;
005b3cbc          *(uint32_t*)esi += 4;
005b3cb3      }
005b3cb3      
005b3cc2      if ((*(uint8_t*)((char*)ecx)[1] & 4) != 0)
005b3cc2      {
005b3cc8          this->resist_ench_bitfield = **(uint32_t**)esi;
005b3ccb          *(uint32_t*)esi += 4;
005b3cc2      }
005b3cc2      
005b3cd1      if ((*(uint8_t*)((char*)ecx)[1] & 0x40) != 0)
005b3cd1      {
005b3cd7          this->base_armor_head = **(uint32_t**)esi;
005b3cdc          void* ebx_2 = (*(uint32_t*)esi + 4);
005b3cdf          *(uint32_t*)esi = ebx_2;
005b3ce5          this->base_armor_chest = *(uint32_t*)ebx_2;
005b3cea          void* edx_18 = (*(uint32_t*)esi + 4);
005b3ced          *(uint32_t*)esi = edx_18;
005b3cf3          this->base_armor_groin = *(uint32_t*)edx_18;
005b3cf8          void* ecx_24 = (*(uint32_t*)esi + 4);
005b3cfb          *(uint32_t*)esi = ecx_24;
005b3d01          this->base_armor_bicep = *(uint32_t*)ecx_24;
005b3d06          void* eax_33 = (*(uint32_t*)esi + 4);
005b3d09          *(uint32_t*)esi = eax_33;
005b3d0d          this->base_armor_wrist = *(uint32_t*)eax_33;
005b3d12          void* ebp_11 = (*(uint32_t*)esi + 4);
005b3d15          *(uint32_t*)esi = ebp_11;
005b3d1b          this->base_armor_hand = *(uint32_t*)ebp_11;
005b3d20          void* ebx_4 = (*(uint32_t*)esi + 4);
005b3d23          *(uint32_t*)esi = ebx_4;
005b3d29          this->base_armor_thigh = *(uint32_t*)ebx_4;
005b3d2e          void* edx_21 = (*(uint32_t*)esi + 4);
005b3d31          *(uint32_t*)esi = edx_21;
005b3d37          this->base_armor_shin = *(uint32_t*)edx_21;
005b3d3c          void* ecx_28 = (*(uint32_t*)esi + 4);
005b3d3f          *(uint32_t*)esi = ecx_28;
005b3d45          this->base_armor_foot = *(uint32_t*)ecx_28;
005b3d48          *(uint32_t*)esi += 4;
005b3cd1      }
005b3cd1      
005b3d59      if (arg3 >= (*(uint32_t*)esi - eax))
005b3d71          return 1;
005b3d71      
005b3d5c      *(uint32_t*)esi = eax;
005b3d64      return 0;
005b3980  }

005b3d74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b3d80  void CopyTheFucker(class PackableHashTable<unsigned long,long>** arg1, class PackableHashTable<unsigned long,long>* arg2)

005b3d80  {
005b3d88      if (arg2 == 0)
005b3d88      {
005b3d8e          class PackableHashTable<unsigned long,long>* ecx = *(uint32_t*)arg1;
005b3d8e          
005b3d92          if (ecx != 0)
005b3d92          {
005b3d94              ecx->vtable->__vecDelDtor(1);
005b3d9a              *(uint32_t*)arg1 = arg2;
005b3d92          }
005b3d92          
005b3d92          return;
005b3d88      }
005b3d88      
005b3da0      class PackableHashTable<IDClass<_tagDataID,32,0>,int>** ebx_1 = arg1;
005b3da0      
005b3da7      if (*(uint32_t*)ebx_1 == 0)
005b3da7      {
005b3db0          class PackableHashTable<IDClass<_tagDataID,32,0>,int>* esi_2 = operator new(0x14);
005b3db0          
005b3db7          if (esi_2 != 0)
005b3db7          {
005b3dbb              esi_2->vtable = 0x7cec44;
005b3dc1              esi_2->m_fThrowawayDuplicateKeysOnUnPack = 0;
005b3dc8              esi_2->_buckets = nullptr;
005b3dcf              esi_2->_table_size = 0x20;
005b3dd6              esi_2->_currNum = 0;
005b3ddd              PackableHashTable<unsigned long,CContractTracker>::Init(esi_2);
005b3de5              *(uint32_t*)ebx_1 = esi_2;
005b3de7              PackableHashTable<unsigned long,long>::operator=(esi_2, arg2);
005b3def              return;
005b3db7          }
005b3db7          
005b3df2          *(uint32_t*)ebx_1 = nullptr;
005b3da7      }
005b3da7      
005b3df7      PackableHashTable<unsigned long,long>::operator=(*(uint32_t*)ebx_1, arg2);
005b3d80  }


005b3e00  void CopyTheFucker(class PackableHashTable<unsigned long,__int64>** arg1, class PackableHashTable<unsigned long,__int64>* arg2)

005b3e00  {
005b3e08      if (arg2 == 0)
005b3e08      {
005b3e0e          class PackableHashTable<unsigned long,__int64>* ecx = *(uint32_t*)arg1;
005b3e0e          
005b3e12          if (ecx != 0)
005b3e12          {
005b3e14              ecx->vtable->__vecDelDtor(1);
005b3e1a              *(uint32_t*)arg1 = arg2;
005b3e12          }
005b3e12          
005b3e12          return;
005b3e08      }
005b3e08      
005b3e20      class PackableHashTable<unsigned long,double>** ebx_1 = arg1;
005b3e20      
005b3e27      if (*(uint32_t*)ebx_1 == 0)
005b3e27      {
005b3e30          class PackableHashTable<unsigned long,double>* esi_2 = operator new(0x14);
005b3e30          
005b3e37          if (esi_2 != 0)
005b3e37          {
005b3e3b              esi_2->vtable = 0x7e441c;
005b3e41              esi_2->m_fThrowawayDuplicateKeysOnUnPack = 0;
005b3e48              esi_2->_buckets = nullptr;
005b3e4f              esi_2->_table_size = 0x20;
005b3e56              esi_2->_currNum = 0;
005b3e5d              PackableHashTable<unsigned long,CContractTracker>::Init(esi_2);
005b3e65              *(uint32_t*)ebx_1 = esi_2;
005b3e67              PackableHashTable<unsigned long,double>::operator=(esi_2, arg2);
005b3e6f              return;
005b3e37          }
005b3e37          
005b3e72          *(uint32_t*)ebx_1 = nullptr;
005b3e27      }
005b3e27      
005b3e77      PackableHashTable<unsigned long,double>::operator=(*(uint32_t*)ebx_1, arg2);
005b3e00  }


005b3e80  void CopyTheFucker(class PackableHashTable<unsigned long,int>** arg1, class PackableHashTable<unsigned long,int>* arg2)

005b3e80  {
005b3e88      if (arg2 == 0)
005b3e88      {
005b3e8e          class PackableHashTable<unsigned long,int>* ecx = *(uint32_t*)arg1;
005b3e8e          
005b3e92          if (ecx != 0)
005b3e92          {
005b3e94              ecx->vtable->__vecDelDtor(1);
005b3e9a              *(uint32_t*)arg1 = arg2;
005b3e92          }
005b3e92          
005b3e92          return;
005b3e88      }
005b3e88      
005b3ea0      class PackableHashTable<IDClass<_tagDataID,32,0>,int>** ebx_1 = arg1;
005b3ea0      
005b3ea7      if (*(uint32_t*)ebx_1 == 0)
005b3ea7      {
005b3eb0          class PackableHashTable<IDClass<_tagDataID,32,0>,int>* esi_2 = operator new(0x14);
005b3eb0          
005b3eb7          if (esi_2 != 0)
005b3eb7          {
005b3ebb              esi_2->vtable = 0x7e4430;
005b3ec1              esi_2->m_fThrowawayDuplicateKeysOnUnPack = 0;
005b3ec8              esi_2->_buckets = nullptr;
005b3ecf              esi_2->_table_size = 0x20;
005b3ed6              esi_2->_currNum = 0;
005b3edd              PackableHashTable<unsigned long,CContractTracker>::Init(esi_2);
005b3ee5              *(uint32_t*)ebx_1 = esi_2;
005b3ee7              PackableHashTable<unsigned long,long>::operator=(esi_2, arg2);
005b3eef              return;
005b3eb7          }
005b3eb7          
005b3ef2          *(uint32_t*)ebx_1 = nullptr;
005b3ea7      }
005b3ea7      
005b3ef7      PackableHashTable<unsigned long,long>::operator=(*(uint32_t*)ebx_1, arg2);
005b3e80  }


005b3f00  void CopyTheFucker(class PackableHashTable<unsigned long,double>** arg1, class PackableHashTable<unsigned long,double>* arg2)

005b3f00  {
005b3f08      if (arg2 == 0)
005b3f08      {
005b3f0e          class PackableHashTable<unsigned long,double>* ecx = *(uint32_t*)arg1;
005b3f0e          
005b3f12          if (ecx != 0)
005b3f12          {
005b3f14              ecx->vtable->__vecDelDtor(1);
005b3f1a              *(uint32_t*)arg1 = arg2;
005b3f12          }
005b3f12          
005b3f12          return;
005b3f08      }
005b3f08      
005b3f27      if (*(uint32_t*)arg1 == 0)
005b3f27      {
005b3f30          class PackableHashTable<unsigned long,double>* esi_2 = operator new(0x14);
005b3f30          
005b3f37          if (esi_2 != 0)
005b3f37          {
005b3f3b              esi_2->vtable = 0x7e4444;
005b3f41              esi_2->m_fThrowawayDuplicateKeysOnUnPack = 0;
005b3f48              esi_2->_buckets = nullptr;
005b3f4f              esi_2->_table_size = 0x20;
005b3f56              esi_2->_currNum = 0;
005b3f5d              PackableHashTable<unsigned long,CContractTracker>::Init(esi_2);
005b3f65              *(uint32_t*)arg1 = esi_2;
005b3f67              PackableHashTable<unsigned long,double>::operator=(esi_2, arg2);
005b3f6f              return;
005b3f37          }
005b3f37          
005b3f72          *(uint32_t*)arg1 = nullptr;
005b3f27      }
005b3f27      
005b3f77      PackableHashTable<unsigned long,double>::operator=(*(uint32_t*)arg1, arg2);
005b3f00  }


005b3f80  void CopyTheFucker(class PSmartArray<unsigned long>** arg1, class PSmartArray<unsigned long>* arg2)

005b3f80  {
005b3f8c      if (arg2 == 0)
005b3f8c      {
005b3f8e          class PSmartArray<unsigned long>* ecx = *(uint32_t*)arg1;
005b3f8e          
005b3f92          if (ecx != 0)
005b3f92          {
005b3f94              ecx->vtable->__vecDelDtor(1);
005b3f9a              *(uint32_t*)arg1 = arg2;
005b3f92          }
005b3f92          
005b3f92          return;
005b3f8c      }
005b3f8c      
005b3fa2      if (*(uint32_t*)arg1 == 0)
005b3fa2      {
005b3fa6          class PSmartArray<unsigned long>* eax_2 = operator new(0x10);
005b3fa6          
005b3fb0          if (eax_2 != 0)
005b3fb0          {
005b3fb2              eax_2->m_data = nullptr;
005b3fb9              eax_2->m_size = 0;
005b3fc0              eax_2->m_num = 0;
005b3fca              eax_2->vtable = &PSmartArray<unsigned long>::`vftable';
005b3fd4              *(uint32_t*)arg1 = eax_2;
005b3fd6              AC1Legacy::SmartArray<unsigned long>::operator=(&eax_2->m_data, &arg2->m_data);
005b3fdd              return;
005b3fb0          }
005b3fb0          
005b3fe0          *(uint32_t*)arg1 = nullptr;
005b3fa2      }
005b3fa2      
005b3feb      AC1Legacy::SmartArray<unsigned long>::operator=(&*(uint32_t*)arg1->m_data, &arg2->m_data);
005b3f80  }

005b3ff3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005b4000  void CopyTheFucker(class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >** arg1, class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* arg2)

005b4000  {
005b4008      if (arg2 == 0)
005b4008      {
005b400e          class PackableHashTable<unsigned long,IDClass<_tagDataID,32,0> >* ecx = *(uint32_t*)arg1;
005b400e          
005b4012          if (ecx != 0)
005b4012          {
005b4014              ecx->vtable->__vecDelDtor(1);
005b401a              *(uint32_t*)arg1 = arg2;
005b4012          }
005b4012          
005b4012          return;
005b4008      }
005b4008      
005b4020      class PackableHashTable<IDClass<_tagDataID,32,0>,int>** ebx_1 = arg1;
005b4020      
005b4027      if (*(uint32_t*)ebx_1 == 0)
005b4027      {
005b4030          class PackableHashTable<IDClass<_tagDataID,32,0>,int>* esi_2 = operator new(0x14);
005b4030          
005b4037          if (esi_2 != 0)
005b4037          {
005b403b              esi_2->vtable = 0x7e4458;
005b4041              esi_2->m_fThrowawayDuplicateKeysOnUnPack = 0;
005b4048              esi_2->_buckets = nullptr;
005b404f              esi_2->_table_size = 0x20;
005b4056              esi_2->_currNum = 0;
005b405d              PackableHashTable<unsigned long,CContractTracker>::Init(esi_2);
005b4065              *(uint32_t*)ebx_1 = esi_2;
005b4067              PackableHashTable<unsigned long,long>::operator=(esi_2, arg2);
005b406f              return;
005b4037          }
005b4037          
005b4072          *(uint32_t*)ebx_1 = nullptr;
005b4027      }
005b4027      
005b4077      PackableHashTable<unsigned long,long>::operator=(*(uint32_t*)ebx_1, arg2);
005b4000  }


005b4080  void CopyTheFucker(class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >** arg1, class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* arg2)

005b4080  {
005b4088      if (arg2 == 0)
005b4088      {
005b408e          class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* ecx = *(uint32_t*)arg1;
005b408e          
005b4092          if (ecx != 0)
005b4092          {
005b4094              ecx->vtable->__vecDelDtor(1);
005b409a              *(uint32_t*)arg1 = arg2;
005b4092          }
005b4092          
005b4092          return;
005b4088      }
005b4088      
005b40a7      if (*(uint32_t*)arg1 == 0)
005b40a7      {
005b40b0          class PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >* esi_2 = operator new(0x14);
005b40b0          
005b40b7          if (esi_2 != 0)
005b40b7          {
005b40bb              esi_2->vtable = 0x7e446c;
005b40c1              esi_2->m_fThrowawayDuplicateKeysOnUnPack = 0;
005b40c8              esi_2->_buckets = nullptr;
005b40cf              esi_2->_table_size = 0x20;
005b40d6              esi_2->_currNum = 0;
005b40dd              PackableHashTable<unsigned long,CContractTracker>::Init(esi_2);
005b40e5              *(uint32_t*)arg1 = esi_2;
005b40e7              PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::operator=(esi_2, arg2);
005b40ef              return;
005b40b7          }
005b40b7          
005b40f2          *(uint32_t*)arg1 = nullptr;
005b40a7      }
005b40a7      
005b40f7      PackableHashTable<unsigned long,AC1Legacy::PStringBase<char> >::operator=(*(uint32_t*)arg1, arg2);
005b4080  }


005b4100  class AppraisalProfile& __thiscall AppraisalProfile::operator=(class AppraisalProfile* this, class AppraisalProfile const& arg2)

005b4100  {
005b410a      if (this != arg2)
005b410a      {
005b4118          CopyTheFucker(&this->_intStatsTable, arg2->_intStatsTable);
005b4125          CopyTheFucker(&this->_int64StatsTable, arg2->_int64StatsTable);
005b4132          CopyTheFucker(&this->_boolStatsTable, arg2->_boolStatsTable);
005b413f          CopyTheFucker(&this->_floatStatsTable, arg2->_floatStatsTable);
005b414c          CopyTheFucker(&this->_strStatsTable, arg2->_strStatsTable);
005b4159          CopyTheFucker(&this->_didStatsTable, arg2->_didStatsTable);
005b4166          CopyTheFucker(&this->_spellBook, arg2->_spellBook);
005b4173          CopyTheFucker(&this->creature_profile, arg2->creature_profile);
005b4183          CopyTheFucker(&this->weapon_profile, arg2->weapon_profile);
005b4190          CopyTheFucker(&this->armor_profile, arg2->armor_profile);
005b419d          CopyTheFucker(&this->hook_profile, arg2->hook_profile);
005b41a5          this->success_flag = arg2->success_flag;
005b41ab          this->armor_ench_bitfield = arg2->armor_ench_bitfield;
005b41b1          this->weapon_ench_bitfield = arg2->weapon_ench_bitfield;
005b41b7          this->resist_ench_bitfield = arg2->resist_ench_bitfield;
005b41bd          this->base_armor_head = arg2->base_armor_head;
005b41c3          this->base_armor_chest = arg2->base_armor_chest;
005b41c9          this->base_armor_groin = arg2->base_armor_groin;
005b41cf          this->base_armor_bicep = arg2->base_armor_bicep;
005b41d5          this->base_armor_wrist = arg2->base_armor_wrist;
005b41db          this->base_armor_hand = arg2->base_armor_hand;
005b41e1          this->base_armor_thigh = arg2->base_armor_thigh;
005b41ea          this->base_armor_shin = arg2->base_armor_shin;
005b41f0          this->base_armor_foot = arg2->base_armor_foot;
005b410a      }
005b410a      
005b41f7      return this;
005b4100  }

005b41fa                                                                                90 90 90 90 90 90                            ......

005b4200  uint32_t AppraisalSystem::DamageTypeToString(enum DAMAGE_TYPE const arg1, char* arg2, uint32_t const arg3)

005b4200  {
005b420e      char* result = 1;
005b4213      int32_t ecx = 0;
005b4217      int32_t esi_1 = (arg1 & SLASH_DAMAGE_TYPE);
005b421a      *(uint8_t*)arg2 = 0;
005b421a      
005b421d      if (esi_1 != 0)
005b421d      {
005b421f          ecx = 1;
005b4221          result = 9;
005b421d      }
005b421d      
005b4228      enum DAMAGE_TYPE edi_1 = (arg1 & PIERCE_DAMAGE_TYPE);
005b4228      
005b422f      if (edi_1 != UNDEF_DAMAGE_TYPE)
005b422f      {
005b4233          if (ecx != 0)
005b423f              result = &result[9];
005b4233          else
005b4233          {
005b4235              ecx = 1;
005b423a              result = &result[8];
005b4233          }
005b422f      }
005b422f      
005b4244      int32_t ebx_1 = (arg1 & BLUDGEON_DAMAGE_TYPE);
005b4244      
005b4247      if (ebx_1 != 0)
005b4247      {
005b424b          if (ecx != 0)
005b4257              result = &result[0xc];
005b424b          else
005b424b          {
005b424d              ecx = 1;
005b4252              result = &result[0xb];
005b424b          }
005b4247      }
005b4247      
005b425c      int32_t edi_3 = (arg1 & COLD_DAMAGE_TYPE);
005b425c      
005b4263      if (edi_3 != 0)
005b4263      {
005b4267          if (ecx != 0)
005b4273              result = &result[5];
005b4267          else
005b4267          {
005b4269              ecx = 1;
005b426e              result = &result[4];
005b4267          }
005b4263      }
005b4263      
005b4278      int32_t edi_5 = (arg1 & FIRE_DAMAGE_TYPE);
005b4278      
005b427f      if (edi_5 != 0)
005b427f      {
005b4283          if (ecx != 0)
005b428f              result = &result[5];
005b4283          else
005b4283          {
005b4285              ecx = 1;
005b428a              result = &result[4];
005b4283          }
005b427f      }
005b427f      
005b4294      int32_t edi_7 = (arg1 & ACID_DAMAGE_TYPE);
005b4294      
005b429b      if (edi_7 != 0)
005b429b      {
005b429f          if (ecx != 0)
005b42ab              result = &result[5];
005b429f          else
005b429f          {
005b42a1              ecx = 1;
005b42a6              result = &result[4];
005b429f          }
005b429b      }
005b429b      
005b42b0      int32_t edi_9 = (arg1 & ELECTRIC_DAMAGE_TYPE);
005b42b0      
005b42b7      if (edi_9 != 0)
005b42b7      {
005b42bb          if (ecx != 0)
005b42c7              result = &result[0xb];
005b42bb          else
005b42bb          {
005b42bd              ecx = 1;
005b42c2              result = &result[0xa];
005b42bb          }
005b42b7      }
005b42b7      
005b42cc      int32_t edi_11 = (arg1 & NETHER_DAMAGE_TYPE);
005b42cc      
005b42d6      if (edi_11 != 0)
005b42d6      {
005b42da          if (ecx != 0)
005b42e6              result = &result[7];
005b42da          else
005b42da          {
005b42dc              ecx = 1;
005b42e1              result = &result[6];
005b42da          }
005b42d6      }
005b42d6      
005b42e9      int32_t edx = (arg1 & BASE_DAMAGE_TYPE);
005b42e9      
005b42f3      if (edx != 0)
005b42f3      {
005b42f7          if (ecx != 0)
005b42fe              result = &result[0xa];
005b42f7          else
005b42f9              result = &result[9];
005b42f3      }
005b42f3      
005b4305      if (arg3 >= result)
005b4305      {
005b430b          int32_t edx_1 = 0;
005b430b          
005b430f          if (esi_1 != 0)
005b430f          {
005b4319              __builtin_strncpy(arg2, "Slashing", 9);
005b4334              edx_1 = 1;
005b430f          }
005b430f          
005b433f          enum DAMAGE_TYPE ecx_2;
005b433f          
005b433f          if (edi_1 != UNDEF_DAMAGE_TYPE)
005b433f          {
005b4343              if (edx_1 != 0)
005b4343              {
005b4371                  void* edi_13 = (arg2 - 1);
005b4371                  
005b4378                  do
005b4378                  {
005b4372                      ecx_2 = *(uint8_t*)((char*)edi_13 + 1);
005b4375                      edi_13 += 1;
005b4378                  } while (ecx_2 != 0);
005b4378                  
005b4380                  __builtin_strcpy(edi_13, "/Piercing");
005b438b                  ecx_2 = 0x67;
005b4343              }
005b4343              else
005b4343              {
005b434d                  __builtin_strncpy(arg2, "Piercing", 9);
005b4368                  edx_1 = 1;
005b4343              }
005b433f          }
005b433f          
005b4398          if (ebx_1 != 0)
005b4398          {
005b439c              if (edx_1 != 0)
005b439c              {
005b43c3                  void* edi_15 = (arg2 - 1);
005b43c3                  
005b43ca                  do
005b43ca                  {
005b43c4                      ecx_2 = *(uint8_t*)((char*)edi_15 + 1);
005b43c7                      edi_15 += 1;
005b43ca                  } while (ecx_2 != 0);
005b43ca                  
005b43d2                  __builtin_strncpy(edi_15, "/Bludgeoning", 0xd);
005b439c              }
005b439c              else
005b439c              {
005b43a6                  __builtin_strcpy(arg2, "Bludgeoning");
005b43b7                  edx_1 = 1;
005b439c              }
005b4398          }
005b4398          
005b43f5          if (edi_3 != 0)
005b43f5          {
005b43f9              if (edx_1 != 0)
005b43f9              {
005b4417                  void* edi_17 = (arg2 - 1);
005b441e                  int32_t ecx_4;
005b441e                  
005b441e                  do
005b441e                  {
005b4418                      ecx_4 = *(uint8_t*)((char*)edi_17 + 1);
005b441b                      edi_17 += 1;
005b441e                  } while (ecx_4 != 0);
005b4426                  __builtin_strcpy(edi_17, "/Cold");
005b43f9              }
005b43f9              else
005b43f9              {
005b4403                  __builtin_strncpy(arg2, "Cold", 5);
005b440b                  edx_1 = 1;
005b43f9              }
005b43f5          }
005b43f5          
005b4439          if (edi_5 != 0)
005b4439          {
005b443d              if (edx_1 != 0)
005b443d              {
005b445b                  void* edi_19 = (arg2 - 1);
005b4466                  int32_t ecx_6;
005b4466                  
005b4466                  do
005b4466                  {
005b4460                      ecx_6 = *(uint8_t*)((char*)edi_19 + 1);
005b4463                      edi_19 += 1;
005b4466                  } while (ecx_6 != 0);
005b446e                  __builtin_strcpy(edi_19, "/Fire");
005b443d              }
005b443d              else
005b443d              {
005b4447                  __builtin_strncpy(arg2, "Fire", 5);
005b444f                  edx_1 = 1;
005b443d              }
005b4439          }
005b4439          
005b4481          if (edi_7 != 0)
005b4481          {
005b4485              if (edx_1 != 0)
005b4485              {
005b44a3                  void* edi_21 = (arg2 - 1);
005b44aa                  int32_t ecx_8;
005b44aa                  
005b44aa                  do
005b44aa                  {
005b44a4                      ecx_8 = *(uint8_t*)((char*)edi_21 + 1);
005b44a7                      edi_21 += 1;
005b44aa                  } while (ecx_8 != 0);
005b44b2                  __builtin_strcpy(edi_21, "/Acid");
005b4485              }
005b4485              else
005b4485              {
005b448f                  __builtin_strncpy(arg2, "Acid", 5);
005b4497                  edx_1 = 1;
005b4485              }
005b4481          }
005b4481          
005b44c5          if (edi_9 != 0)
005b44c5          {
005b44c9              if (edx_1 != 0)
005b44c9              {
005b44fb                  void* edi_23 = (arg2 - 1);
005b4506                  int32_t ecx_10;
005b4506                  
005b4506                  do
005b4506                  {
005b4500                      ecx_10 = *(uint8_t*)((char*)edi_23 + 1);
005b4503                      edi_23 += 1;
005b4506                  } while (ecx_10 != 0);
005b450e                  __builtin_strncpy(edi_23, "/Electri", 8);
005b451f                  *(uint32_t*)((char*)edi_23 + 8) = &data_6c6163;
005b44c9              }
005b44c9              else
005b44c9              {
005b44d3                  __builtin_strncpy(arg2, "Electrical", 0xb);
005b44ef                  edx_1 = 1;
005b44c9              }
005b44c5          }
005b44c5          
005b4528          if (edi_11 != 0)
005b4528          {
005b452c              if (edx_1 != 0)
005b452c              {
005b4555                  void* edi_25 = (arg2 - 1);
005b455c                  int32_t ecx_12;
005b455c                  
005b455c                  do
005b455c                  {
005b4556                      ecx_12 = *(uint8_t*)((char*)edi_25 + 1);
005b4559                      edi_25 += 1;
005b455c                  } while (ecx_12 != 0);
005b4564                  __builtin_strcpy(edi_25, "/Nether");
005b452c              }
005b452c              else
005b452c              {
005b4536                  __builtin_strncpy(arg2, "Nether", 7);
005b4549                  edx_1 = 1;
005b452c              }
005b4528          }
005b4528          
005b4575          if (edx != 0)
005b4575          {
005b4579              if (edx_1 == 0)
005b4579              {
005b4581                  __builtin_strcpy(arg2, "Prismatic");
005b459f                  return result;
005b4579              }
005b4579              
005b45a1              void* edi_26 = (arg2 - 1);
005b45a9              int32_t ecx_14;
005b45a9              
005b45a9              do
005b45a9              {
005b45a3                  ecx_14 = *(uint8_t*)((char*)edi_26 + 1);
005b45a6                  edi_26 += 1;
005b45a9              } while (ecx_14 != 0);
005b45b1              __builtin_strncpy(edi_26, "/Prismatic", 0xb);
005b4575          }
005b4305      }
005b4305      
005b45d7      return result;
005b4200  }

005b45d8                                                                          90 90 90 90 90 90 90 90                          ........

005b45e0  int32_t AppraisalSystem::InqMaterialName(uint32_t arg1, class PStringBase<char>* arg2)

005b45e0  {
005b45f5      return ((uint32_t)MaterialTypeEnumMapper::MaterialTypeToString(arg1, arg2));
005b45e0  }

005b45f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b4600  int32_t AppraisalSystem::LockpickSuccessPercentToString(int32_t const arg1, class AC1Legacy::PStringBase<char>* arg2)

005b4600  {
005b4606      if (arg1 < 0)
005b460a          return 0;
005b460a      
005b460b      if (arg1 == 0)
005b460b      {
005b4616          AC1Legacy::PStringBase<char>::set(arg2, "impossible");
005b4620          return 1;
005b460b      }
005b460b      
005b4623      if (arg1 > 0)
005b4623      {
005b4628          if (arg1 >= 5)
005b4628              goto label_5b4643;
005b4628          
005b4633          AC1Legacy::PStringBase<char>::set(arg2, "ridiculously difficult");
005b463d          return 1;
005b4623      }
005b4623      
005b4641      if (arg1 >= 5)
005b4641      {
005b4643      label_5b4643:
005b4643          
005b4646          if (arg1 >= 0xf)
005b4646              goto label_5b4661;
005b4646          
005b4651          AC1Legacy::PStringBase<char>::set(arg2, "extremely difficult");
005b465b          return 1;
005b4641      }
005b4641      
005b465f      if (arg1 >= 0xf)
005b465f      {
005b4661      label_5b4661:
005b4661          
005b4664          if (arg1 >= 0x23)
005b4664              goto label_5b467f;
005b4664          
005b466f          AC1Legacy::PStringBase<char>::set(arg2, "quite difficult");
005b4679          return 1;
005b465f      }
005b465f      
005b467d      if (arg1 >= 0x23)
005b467d      {
005b467f      label_5b467f:
005b467f          
005b4682          if (arg1 >= 0x32)
005b4682              goto label_5b469d;
005b4682          
005b468d          AC1Legacy::PStringBase<char>::set(arg2, "difficult");
005b4697          return 1;
005b467d      }
005b467d      
005b469b      if (arg1 >= 0x32)
005b469b      {
005b469d      label_5b469d:
005b469d          
005b46a0          if (arg1 >= 0x46)
005b46a0              goto label_5b46bb;
005b46a0          
005b46ab          AC1Legacy::PStringBase<char>::set(arg2, "challenging");
005b46b5          return 1;
005b469b      }
005b469b      
005b46b9      if (arg1 >= 0x46)
005b46b9      {
005b46bb      label_5b46bb:
005b46bb          
005b46be          if (arg1 >= 0x55)
005b46be              goto label_5b46d9;
005b46be          
005b46c9          AC1Legacy::PStringBase<char>::set(arg2, "mildly challenging");
005b46d3          return 1;
005b46b9      }
005b46b9      
005b46d7      if (arg1 >= 0x55)
005b46d7      {
005b46d9      label_5b46d9:
005b46d9          
005b46dc          if (arg1 < 0x5f)
005b46dc          {
005b46e7              AC1Legacy::PStringBase<char>::set(arg2, "easy");
005b46f1              return 1;
005b46dc          }
005b46dc          
005b4700          AC1Legacy::PStringBase<char>::set(arg2, "trivial");
005b46d7      }
005b46d7      else if (arg1 >= 0x5f)
005b4700          AC1Legacy::PStringBase<char>::set(arg2, "trivial");
005b4700      
005b470a      return 1;
005b4600  }

005b470b                                   90 90 90 90 90                                                             .....

005b4710  int32_t AppraisalSystem::InqHeritageGroupDisplayName(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b4710  {
005b4711      uint32_t esi = arg1;
005b4711      
005b4718      if (esi == 2)
005b4718      {
005b4723          AC1Legacy::PStringBase<char>::set(arg2, "Gharu'ndim");
005b472e          return 1;
005b4718      }
005b4718      
005b4732      if (esi == 5)
005b4732      {
005b473d          AC1Legacy::PStringBase<char>::set(arg2, "Umbraen");
005b4748          return 1;
005b4732      }
005b4732      
005b474c      if (esi == 0xd)
005b474c      {
005b4757          AC1Legacy::PStringBase<char>::set(arg2, "Olthoi");
005b4762          return 1;
005b474c      }
005b474c      
005b4763      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005b4768      arg1 = PStringBase<char>::s_NullBuffer_1;
005b4770      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005b4770      
005b478b      if (EnumMapper::GetString(0x10000002, esi, &arg1) == 0)
005b478b      {
005b4791          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg1);
005b4799          return 0;
005b478b      }
005b478b      
005b47a3      AC1Legacy::PStringBase<char>::set(arg2, arg1);
005b47ac      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg1);
005b47b7      return 1;
005b4710  }

005b47b8                                                                          90 90 90 90 90 90 90 90                          ........

005b47c0  int32_t __convention("regparm") AppraisalSystem::InqGenderDisplayName(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b47c0  {
005b47c0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
005b47c0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
005b47c1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005b47c6      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005b47cf      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005b47cf      
005b47ee      if (EnumMapper::GetString(0x10000001, arg1, &PStringBase<char>::s_NullBuffer_2) == 0)
005b47ee      {
005b47f4          void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
005b47f4          
005b4807          if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
005b480f              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
005b480f          
005b4815          return 0;
005b47ee      }
005b47ee      
005b481f      AC1Legacy::PStringBase<char>::set(arg2, PStringBase<char>::s_NullBuffer_2);
005b4828      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
005b4828      
005b483b      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
005b4843          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
005b4843      
005b484c      return 1;
005b47c0  }

005b484d                                         90 90 90                                                               ...

005b4850  int32_t AppraisalSystem::AttunedStatusToString(enum AttunedStatusEnum arg1, class AC1Legacy::PStringBase<char>* arg2)

005b4850  {
005b485b      if ((arg1 <= Normal_AttunedStatus || arg1 > Sticky_AttunedStatus))
005b4873          return 0;
005b4873      
005b4866      AC1Legacy::PStringBase<char>::set(arg2, "Attuned");
005b4870      return 1;
005b4850  }

005b4874                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b4880  int32_t AppraisalSystem::BondedStatusToString(enum BondedStatusEnum arg1, class AC1Legacy::PStringBase<char>* arg2)

005b4880  {
005b4887      if (arg1 == ~Bonded_BondedStatus)
005b4887      {
005b48c7          AC1Legacy::PStringBase<char>::set(arg2, "Destroyed on Death");
005b48d1          return 1;
005b4887      }
005b4887      
005b488c      if (arg1 == ~Normal_BondedStatus)
005b488c      {
005b48b3          AC1Legacy::PStringBase<char>::set(arg2, "Dropped on Death");
005b48bd          return 1;
005b488c      }
005b488c      
005b4891      if (arg1 != Bonded_BondedStatus)
005b4895          return 0;
005b4895      
005b489f      AC1Legacy::PStringBase<char>::set(arg2, "Bonded");
005b48a9      return 1;
005b4880  }

005b48d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005b48e0  int32_t AppraisalSystem::InqWorkmanshipAdjective(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2, int32_t arg3)

005b48e0  {
005b48e1      uint32_t esi = arg1;
005b48e1      
005b48e9      if (esi >= 0xb)
005b48eb          esi = 0xa;
005b48eb      
005b48fe      AC1Legacy::PStringBase<char>::set(arg2, rgWorkmanshipStrings[esi]);
005b48fe      
005b4906      if (esi <= 4)
005b4906      {
005b490e          void* const eax_2 = &data_7e67d0;
005b490e          
005b4913          if (arg3 == 0)
005b4915              eax_2 = "crafted";
005b4915          
005b491f          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, eax_2);
005b4924          uint32_t esi_1 = arg1;
005b4928          int32_t eax_3 = *(uint32_t*)(esi_1 + 8);
005b4928          
005b4936          if ((eax_3 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b4940              AC1Legacy::PStringBase<char>::append_n_chars(arg2, (esi_1 + 0x14), (eax_3 - 1));
005b4940          
005b4951          if (InterlockedDecrement((esi_1 + 4)) == 0)
005b4959              **(uint32_t**)esi_1(1);
005b4906      }
005b4906      
005b4962      return 1;
005b48e0  }

005b4963           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005b4970  void AppraisalSystem::WeaponTimeToString(int32_t const arg1, class AC1Legacy::PStringBase<char>* arg2)

005b4970  {
005b4970      int32_t const eax_6 = arg1;
005b4978      char const* const var_8;
005b4978      
005b4978      if (eax_6 < 0xb)
005b497a          var_8 = "Very Fast";
005b4978      else if (eax_6 >= 0x1f)
005b49c6      {
005b49d2          if (eax_6 >= 0x32)
005b49d2          {
005b49de              int32_t const* ecx_4 = &arg1;
005b49de              
005b49e2              if (eax_6 < 0x50)
005b49e2              {
005b49e9                  AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_4, "Slow");
005b49f7                  AC1Legacy::PStringBase<char>::operator+=(arg2, &arg1);
005b4a01                  /* tailcall */
005b4a01                  return AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005b49e2              }
005b49e2              
005b4a0b              AC1Legacy::PStringBase<char>::PStringBase<char>(ecx_4, "Very Slow");
005b4a19              AC1Legacy::PStringBase<char>::operator+=(arg2, &arg1);
005b4a23              /* tailcall */
005b4a23              return AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005b49d2          }
005b49d2          
005b49d4          var_8 = "Average";
005b49c6      }
005b49c6      else
005b49c8          var_8 = "Fast";
005b49c8      
005b4983      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, var_8);
005b4988      int32_t const esi = arg1;
005b498c      int32_t eax = *(uint32_t*)(esi + 8);
005b498c      
005b499a      if ((eax != 1 && esi != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b49a6          AC1Legacy::PStringBase<char>::append_n_chars(arg2, (esi + 0x14), (eax - 1));
005b49a6      
005b49b7      if (InterlockedDecrement((esi + 4)) == 0)
005b49bf          **(uint32_t**)esi(1);
005b4970  }

005b4a28                          90 90 90 90 90 90 90 90                                                          ........

005b4a30  int32_t AppraisalSystem::SkillToString(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b4a30  {
005b4a38      uint32_t* var_4;
005b4a38      char const* const var_4_1;
005b4a38      
005b4a38      if ((arg1 - 1) <= 0x35)
005b4a3e          switch (arg1)
005b4a3e          {
005b4a4e              case 1:
005b4a4e              {
005b4a4e                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_7e6a68);
005b4a57                  var_4 = &arg1;
005b4e39              label_5b4e39:
005b4e39                  AC1Legacy::PStringBase<char>::operator+=(arg2, var_4);
005b4e42                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005b4e4c                  return 1;
005b4a4e                  break;
005b4a4e              }
005b4a5d              case 2:
005b4a5d              {
005b4a5d                  var_4_1 = &data_7e6a64;
005b4e2b              label_5b4e2b:
005b4e2b                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, var_4_1);
005b4e34                  var_4 = &arg1;
005b4e34                  goto label_5b4e39;
005b4a5d              }
005b4a70              case 3:
005b4a70              {
005b4a70                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Crossbow");
005b4a79                  var_4 = &arg1;
005b4a7a                  goto label_5b4e39;
005b4a70              }
005b4a88              case 4:
005b4a88              {
005b4a88                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Dagger");
005b4a91                  var_4 = &arg1;
005b4a92                  goto label_5b4e39;
005b4a88              }
005b4a97              case 5:
005b4a97              {
005b4a97                  var_4_1 = "Mace";
005b4a9c                  goto label_5b4e2b;
005b4a97              }
005b4b36              case 6:
005b4b36              {
005b4b36                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Melee Defense");
005b4b3f                  var_4 = &arg1;
005b4b40                  goto label_5b4e39;
005b4b36              }
005b4b45              case 7:
005b4b45              {
005b4b45                  var_4_1 = "Missile Defense";
005b4b4a                  goto label_5b4e2b;
005b4b45              }
005b4aaa              case 8:
005b4aaa              {
005b4aaa                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Sling");
005b4ab3                  var_4 = &arg1;
005b4ab4                  goto label_5b4e39;
005b4aaa              }
005b4ac2              case 9:
005b4ac2              {
005b4ac2                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Spear");
005b4acb                  var_4 = &arg1;
005b4acc                  goto label_5b4e39;
005b4ac2              }
005b4ad1              case 0xa:
005b4ad1              {
005b4ad1                  var_4_1 = "Staff";
005b4ad6                  goto label_5b4e2b;
005b4ad1              }
005b4ae4              case 0xb:
005b4ae4              {
005b4ae4                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Sword");
005b4aed                  var_4 = &arg1;
005b4aee                  goto label_5b4e39;
005b4ae4              }
005b4afc              case 0xc:
005b4afc              {
005b4afc                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Thrown Weapon");
005b4b05                  var_4 = &arg1;
005b4b06                  goto label_5b4e39;
005b4afc              }
005b4b0b              case 0xd:
005b4b0b              {
005b4b0b                  var_4_1 = "Unarmed Combat";
005b4b10                  goto label_5b4e2b;
005b4b0b              }
005b4b58              case 0xe:
005b4b58              {
005b4b58                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Arcane Lore");
005b4b61                  var_4 = &arg1;
005b4b62                  goto label_5b4e39;
005b4b58              }
005b4b70              case 0xf:
005b4b70              {
005b4b70                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Magic Defense");
005b4b79                  var_4 = &arg1;
005b4b7a                  goto label_5b4e39;
005b4b70              }
005b4b7f              case 0x10:
005b4b7f              {
005b4b7f                  var_4_1 = "Mana Conversion";
005b4b84                  goto label_5b4e2b;
005b4b7f              }
005b4b92              case 0x11:
005b4b92              {
005b4b92                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Spellcraft");
005b4b9b                  var_4 = &arg1;
005b4b9c                  goto label_5b4e39;
005b4b92              }
005b4baa              case 0x12:
005b4baa              {
005b4baa                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Item Tinkering");
005b4bb3                  var_4 = &arg1;
005b4bb4                  goto label_5b4e39;
005b4baa              }
005b4bb9              case 0x13:
005b4bb9              {
005b4bb9                  var_4_1 = "Person Appraisal";
005b4bbe                  goto label_5b4e2b;
005b4bb9              }
005b4bcc              case 0x14:
005b4bcc              {
005b4bcc                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Deception");
005b4bd5                  var_4 = &arg1;
005b4bd6                  goto label_5b4e39;
005b4bcc              }
005b4be4              case 0x15:
005b4be4              {
005b4be4                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Healing");
005b4bed                  var_4 = &arg1;
005b4bee                  goto label_5b4e39;
005b4be4              }
005b4bf3              case 0x16:
005b4bf3              {
005b4bf3                  var_4_1 = "Jump";
005b4bf8                  goto label_5b4e2b;
005b4bf3              }
005b4c06              case 0x17:
005b4c06              {
005b4c06                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Lockpick");
005b4c0f                  var_4 = &arg1;
005b4c10                  goto label_5b4e39;
005b4c06              }
005b4c1e              case 0x18:
005b4c1e              {
005b4c1e                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_7e694c);
005b4c27                  var_4 = &arg1;
005b4c28                  goto label_5b4e39;
005b4c1e              }
005b4c2d              case 0x19:
005b4c2d              {
005b4c2d                  var_4_1 = "Awareness";
005b4c32                  goto label_5b4e2b;
005b4c2d              }
005b4c40              case 0x1a:
005b4c40              {
005b4c40                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Armor Repair");
005b4c49                  var_4 = &arg1;
005b4c4a                  goto label_5b4e39;
005b4c40              }
005b4c58              case 0x1b:
005b4c58              {
005b4c58                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Creature Appraisal");
005b4c61                  var_4 = &arg1;
005b4c62                  goto label_5b4e39;
005b4c58              }
005b4c67              case 0x1c:
005b4c67              {
005b4c67                  var_4_1 = "Weapon Tinkering";
005b4c6c                  goto label_5b4e2b;
005b4c67              }
005b4c7a              case 0x1d:
005b4c7a              {
005b4c7a                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Armor Tinkering");
005b4c83                  var_4 = &arg1;
005b4c84                  goto label_5b4e39;
005b4c7a              }
005b4c92              case 0x1e:
005b4c92              {
005b4c92                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Magic Item Tinkering");
005b4c9b                  var_4 = &arg1;
005b4c9c                  goto label_5b4e39;
005b4c92              }
005b4ca1              case 0x1f:
005b4ca1              {
005b4ca1                  var_4_1 = "Creature Enchantment";
005b4ca6                  goto label_5b4e2b;
005b4ca1              }
005b4cb4              case 0x20:
005b4cb4              {
005b4cb4                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Item Enchantment");
005b4cbd                  var_4 = &arg1;
005b4cbe                  goto label_5b4e39;
005b4cb4              }
005b4ccc              case 0x21:
005b4ccc              {
005b4ccc                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Life Magic");
005b4cd5                  var_4 = &arg1;
005b4cd6                  goto label_5b4e39;
005b4ccc              }
005b4cdb              case 0x22:
005b4cdb              {
005b4cdb                  var_4_1 = "War Magic";
005b4ce0                  goto label_5b4e2b;
005b4cdb              }
005b4d06              case 0x23:
005b4d06              {
005b4d06                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Leadership");
005b4d0f                  var_4 = &arg1;
005b4d10                  goto label_5b4e39;
005b4d06              }
005b4d15              case 0x24:
005b4d15              {
005b4d15                  var_4_1 = "Loyalty";
005b4d1a                  goto label_5b4e2b;
005b4d15              }
005b4d28              case 0x25:
005b4d28              {
005b4d28                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Fletching");
005b4d31                  var_4 = &arg1;
005b4d32                  goto label_5b4e39;
005b4d28              }
005b4d40              case 0x26:
005b4d40              {
005b4d40                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Alchemy");
005b4d49                  var_4 = &arg1;
005b4d4a                  goto label_5b4e39;
005b4d40              }
005b4d4f              case 0x27:
005b4d4f              {
005b4d4f                  var_4_1 = "Cooking";
005b4d54                  goto label_5b4e2b;
005b4d4f              }
005b4d62              case 0x28:
005b4d62              {
005b4d62                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Salvaging");
005b4d6b                  var_4 = &arg1;
005b4d6c                  goto label_5b4e39;
005b4d62              }
005b4b1e              case 0x29:
005b4b1e              {
005b4b1e                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Two Handed Combat");
005b4b27                  var_4 = &arg1;
005b4b28                  goto label_5b4e39;
005b4b1e              }
005b4d7a              case 0x2a:
005b4d7a              {
005b4d7a                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Gearcraft");
005b4d83                  var_4 = &arg1;
005b4d84                  goto label_5b4e39;
005b4d7a              }
005b4cee              case 0x2b:
005b4cee              {
005b4cee                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Void Magic");
005b4cf7                  var_4 = &arg1;
005b4cf8                  goto label_5b4e39;
005b4cee              }
005b4d89              case 0x2c:
005b4d89              {
005b4d89                  var_4_1 = "Heavy Weapons";
005b4d8e                  goto label_5b4e2b;
005b4d89              }
005b4d9c              case 0x2d:
005b4d9c              {
005b4d9c                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Light Weapons");
005b4da5                  var_4 = &arg1;
005b4da6                  goto label_5b4e39;
005b4d9c              }
005b4db4              case 0x2e:
005b4db4              {
005b4db4                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Finesse Weapons");
005b4dbd                  var_4 = &arg1;
005b4dbe                  goto label_5b4e39;
005b4db4              }
005b4dc0              case 0x2f:
005b4dc0              {
005b4dc0                  var_4_1 = "Missile Weapons";
005b4dc5                  goto label_5b4e2b;
005b4dc0              }
005b4dd0              case 0x31:
005b4dd0              {
005b4dd0                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Dual Wield");
005b4dd9                  var_4 = &arg1;
005b4dda                  goto label_5b4e39;
005b4dd0              }
005b4de5              case 0x32:
005b4de5              {
005b4de5                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Recklessness");
005b4dee                  var_4 = &arg1;
005b4def                  goto label_5b4e39;
005b4de5              }
005b4df1              case 0x33:
005b4df1              {
005b4df1                  var_4_1 = "Sneak Attack";
005b4df6                  goto label_5b4e2b;
005b4df1              }
005b4e01              case 0x34:
005b4e01              {
005b4e01                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Dirty Fighting");
005b4e0a                  var_4 = &arg1;
005b4e0b                  goto label_5b4e39;
005b4e01              }
005b4e16              case 0x35:
005b4e16              {
005b4e16                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Challenge");
005b4e1f                  var_4 = &arg1;
005b4e20                  goto label_5b4e39;
005b4e16              }
005b4e22              case 0x36:
005b4e22              {
005b4e22                  var_4_1 = "Summoning";
005b4e22                  goto label_5b4e2b;
005b4e22              }
005b4a3e          }
005b4e4f      return 0;
005b4a30  }

005b4e50  uint32_t jump_table_5b4e50[0x36] = 
005b4e50  {
005b4e50      [0x00] =  0x005b4a45
005b4e54      [0x01] =  0x005b4a5d
005b4e58      [0x02] =  0x005b4a67
005b4e5c      [0x03] =  0x005b4a7f
005b4e60      [0x04] =  0x005b4a97
005b4e64      [0x05] =  0x005b4b2d
005b4e68      [0x06] =  0x005b4b45
005b4e6c      [0x07] =  0x005b4aa1
005b4e70      [0x08] =  0x005b4ab9
005b4e74      [0x09] =  0x005b4ad1
005b4e78      [0x0a] =  0x005b4adb
005b4e7c      [0x0b] =  0x005b4af3
005b4e80      [0x0c] =  0x005b4b0b
005b4e84      [0x0d] =  0x005b4b4f
005b4e88      [0x0e] =  0x005b4b67
005b4e8c      [0x0f] =  0x005b4b7f
005b4e90      [0x10] =  0x005b4b89
005b4e94      [0x11] =  0x005b4ba1
005b4e98      [0x12] =  0x005b4bb9
005b4e9c      [0x13] =  0x005b4bc3
005b4ea0      [0x14] =  0x005b4bdb
005b4ea4      [0x15] =  0x005b4bf3
005b4ea8      [0x16] =  0x005b4bfd
005b4eac      [0x17] =  0x005b4c15
005b4eb0      [0x18] =  0x005b4c2d
005b4eb4      [0x19] =  0x005b4c37
005b4eb8      [0x1a] =  0x005b4c4f
005b4ebc      [0x1b] =  0x005b4c67
005b4ec0      [0x1c] =  0x005b4c71
005b4ec4      [0x1d] =  0x005b4c89
005b4ec8      [0x1e] =  0x005b4ca1
005b4ecc      [0x1f] =  0x005b4cab
005b4ed0      [0x20] =  0x005b4cc3
005b4ed4      [0x21] =  0x005b4cdb
005b4ed8      [0x22] =  0x005b4cfd
005b4edc      [0x23] =  0x005b4d15
005b4ee0      [0x24] =  0x005b4d1f
005b4ee4      [0x25] =  0x005b4d37
005b4ee8      [0x26] =  0x005b4d4f
005b4eec      [0x27] =  0x005b4d59
005b4ef0      [0x28] =  0x005b4b15
005b4ef4      [0x29] =  0x005b4d71
005b4ef8      [0x2a] =  0x005b4ce5
005b4efc      [0x2b] =  0x005b4d89
005b4f00      [0x2c] =  0x005b4d93
005b4f04      [0x2d] =  0x005b4dab
005b4f08      [0x2e] =  0x005b4dc0
005b4f0c      [0x2f] =  0x005b4e4d
005b4f10      [0x30] =  0x005b4dc7
005b4f14      [0x31] =  0x005b4ddc
005b4f18      [0x32] =  0x005b4df1
005b4f1c      [0x33] =  0x005b4df8
005b4f20      [0x34] =  0x005b4e0d
005b4f24      [0x35] =  0x005b4e22
005b4f28  }

005b4f28                          90 90 90 90 90 90 90 90                                                          ........

005b4f30  int32_t __convention("regparm") AppraisalSystem::ClothingPriorityToString(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b4f30  {
005b4f30      int32_t* ecx;
005b4f30      int32_t* var_4 = ecx;
005b4f40      AC1Legacy::PStringBase<char>::set(arg2, "Covers ");
005b4f4f      int32_t result = 0;
005b4f4f      
005b4f54      if ((*(uint8_t*)((char*)((int16_t)arg1))[1] & 0x40) != 0)
005b4f54      {
005b4f5f          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "Head");
005b4f64          int32_t* esi_1 = var_4;
005b4f68          int32_t eax_1 = esi_1[2];
005b4f68          
005b4f76          if ((eax_1 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b4f80              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_1[5], (eax_1 - 1));
005b4f80          
005b4f8d          if (InterlockedDecrement(&esi_1[1]) == 0)
005b4f95              **(uint32_t**)esi_1(1);
005b4f95          
005b4f97          result = 1;
005b4f54      }
005b4f54      
005b4f9c      uint16_t eax_5 = ((int16_t)arg1);
005b4f9c      
005b4fa7      if (((eax_5 & 8) != 0 || (*(uint8_t*)((char*)eax_5)[1] & 4) != 0))
005b4fa7      {
005b4faf          if (result == 0)
005b4ff4              result = 1;
005b4faf          else
005b4faf          {
005b4fba              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_794334);
005b4fbf              int32_t* esi_2 = var_4;
005b4fc3              int32_t eax_6 = esi_2[2];
005b4fc3              
005b4fd1              if ((eax_6 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b4fdb                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_2[5], (eax_6 - 1));
005b4fdb              
005b4fe8              if (InterlockedDecrement(&esi_2[1]) == 0)
005b4ff0                  **(uint32_t**)esi_2(1);
005b4faf          }
005b4faf          
005b5002          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "Chest");
005b5007          int32_t* esi_3 = var_4;
005b500b          int32_t eax_10 = esi_3[2];
005b500b          
005b5019          if ((eax_10 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5023              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_3[5], (eax_10 - 1));
005b5023          
005b5030          if (InterlockedDecrement(&esi_3[1]) == 0)
005b5038              **(uint32_t**)esi_3(1);
005b4fa7      }
005b4fa7      
005b503a      uint16_t eax_14 = ((int16_t)arg1);
005b503a      
005b5045      if (((eax_14 & 0x10) != 0 || (*(uint8_t*)((char*)eax_14)[1] & 8) != 0))
005b5045      {
005b504d          if (result == 0)
005b5092              result = 1;
005b504d          else
005b504d          {
005b5058              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_794334);
005b505d              int32_t* esi_4 = var_4;
005b5061              int32_t eax_15 = esi_4[2];
005b5061              
005b506f              if ((eax_15 != 1 && esi_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5079                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_4[5], (eax_15 - 1));
005b5079              
005b5086              if (InterlockedDecrement(&esi_4[1]) == 0)
005b508e                  **(uint32_t**)esi_4(1);
005b504d          }
005b504d          
005b50a0          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "Abdomen");
005b50a5          int32_t* esi_5 = var_4;
005b50a9          int32_t eax_19 = esi_5[2];
005b50a9          
005b50b7          if ((eax_19 != 1 && esi_5 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b50c1              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_5[5], (eax_19 - 1));
005b50c1          
005b50ce          if (InterlockedDecrement(&esi_5[1]) == 0)
005b50d6              **(uint32_t**)esi_5(1);
005b5045      }
005b5045      
005b50d8      uint16_t eax_23 = ((int16_t)arg1);
005b50d8      
005b50e3      if (((eax_23 & 0x20) != 0 || (*(uint8_t*)((char*)eax_23)[1] & 0x10) != 0))
005b50e3      {
005b50eb          if (result == 0)
005b5130              result = 1;
005b50eb          else
005b50eb          {
005b50f6              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_794334);
005b50fb              int32_t* esi_6 = var_4;
005b50ff              int32_t eax_24 = esi_6[2];
005b50ff              
005b510d              if ((eax_24 != 1 && esi_6 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5117                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_6[5], (eax_24 - 1));
005b5117              
005b5124              if (InterlockedDecrement(&esi_6[1]) == 0)
005b512c                  **(uint32_t**)esi_6(1);
005b50eb          }
005b50eb          
005b513e          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "Upper Arms");
005b5143          int32_t* esi_7 = var_4;
005b5147          int32_t eax_28 = esi_7[2];
005b5147          
005b5155          if ((eax_28 != 1 && esi_7 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b515f              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_7[5], (eax_28 - 1));
005b515f          
005b516c          if (InterlockedDecrement(&esi_7[1]) == 0)
005b5174              **(uint32_t**)esi_7(1);
005b50e3      }
005b50e3      
005b5176      uint16_t eax_32 = ((int16_t)arg1);
005b5176      
005b5181      if (((eax_32 & 0x40) != 0 || (*(uint8_t*)((char*)eax_32)[1] & 0x20) != 0))
005b5181      {
005b5189          if (result == 0)
005b51ce              result = 1;
005b5189          else
005b5189          {
005b5194              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_794334);
005b5199              int32_t* esi_8 = var_4;
005b519d              int32_t eax_33 = esi_8[2];
005b519d              
005b51ab              if ((eax_33 != 1 && esi_8 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b51b5                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_8[5], (eax_33 - 1));
005b51b5              
005b51c2              if (InterlockedDecrement(&esi_8[1]) == 0)
005b51ca                  **(uint32_t**)esi_8(1);
005b5189          }
005b5189          
005b51dc          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "Lower Arms");
005b51e1          int32_t* esi_9 = var_4;
005b51e5          int32_t eax_37 = esi_9[2];
005b51e5          
005b51f3          if ((eax_37 != 1 && esi_9 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b51fd              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_9[5], (eax_37 - 1));
005b51fd          
005b520a          if (InterlockedDecrement(&esi_9[1]) == 0)
005b5212              **(uint32_t**)esi_9(1);
005b5181      }
005b5181      
005b521a      if (*(uint8_t*)((char*)((int16_t)arg1))[1] < 0)
005b521a      {
005b5222          if (result == 0)
005b5267              result = 1;
005b5222          else
005b5222          {
005b522d              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_794334);
005b5232              int32_t* esi_10 = var_4;
005b5236              int32_t eax_42 = esi_10[2];
005b5236              
005b5244              if ((eax_42 != 1 && esi_10 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b524e                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_10[5], (eax_42 - 1));
005b524e              
005b525b              if (InterlockedDecrement(&esi_10[1]) == 0)
005b5263                  **(uint32_t**)esi_10(1);
005b5222          }
005b5222          
005b5275          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "Hands");
005b527a          int32_t* esi_11 = var_4;
005b527e          int32_t eax_46 = esi_11[2];
005b527e          
005b528c          if ((eax_46 != 1 && esi_11 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5296              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_11[5], (eax_46 - 1));
005b5296          
005b52a3          if (InterlockedDecrement(&esi_11[1]) == 0)
005b52ab              **(uint32_t**)esi_11(1);
005b521a      }
005b521a      
005b52ad      uint16_t eax_50 = ((int16_t)arg1);
005b52ad      
005b52b8      if (((eax_50 & 2) != 0 || (*(uint8_t*)((char*)eax_50)[1] & 1) != 0))
005b52b8      {
005b52c0          if (result == 0)
005b5305              result = 1;
005b52c0          else
005b52c0          {
005b52cb              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_794334);
005b52d0              int32_t* esi_12 = var_4;
005b52d4              int32_t eax_51 = esi_12[2];
005b52d4              
005b52e2              if ((eax_51 != 1 && esi_12 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b52ec                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_12[5], (eax_51 - 1));
005b52ec              
005b52f9              if (InterlockedDecrement(&esi_12[1]) == 0)
005b5301                  **(uint32_t**)esi_12(1);
005b52c0          }
005b52c0          
005b5313          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "Upper Legs");
005b5318          int32_t* esi_13 = var_4;
005b531c          int32_t eax_55 = esi_13[2];
005b531c          
005b532a          if ((eax_55 != 1 && esi_13 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5334              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_13[5], (eax_55 - 1));
005b5334          
005b5341          if (InterlockedDecrement(&esi_13[1]) == 0)
005b5349              **(uint32_t**)esi_13(1);
005b52b8      }
005b52b8      
005b534b      uint16_t eax_59 = ((int16_t)arg1);
005b534b      
005b5356      if (((eax_59 & 4) != 0 || (*(uint8_t*)((char*)eax_59)[1] & 2) != 0))
005b5356      {
005b535e          if (result == 0)
005b53a3              result = 1;
005b535e          else
005b535e          {
005b5369              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_794334);
005b536e              int32_t* esi_14 = var_4;
005b5372              int32_t eax_60 = esi_14[2];
005b5372              
005b5380              if ((eax_60 != 1 && esi_14 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b538a                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_14[5], (eax_60 - 1));
005b538a              
005b5397              if (InterlockedDecrement(&esi_14[1]) == 0)
005b539f                  **(uint32_t**)esi_14(1);
005b535e          }
005b535e          
005b53b1          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "Lower Legs");
005b53b6          int32_t* esi_15 = var_4;
005b53ba          int32_t eax_64 = esi_15[2];
005b53ba          
005b53c8          if ((eax_64 != 1 && esi_15 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b53d2              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_15[5], (eax_64 - 1));
005b53d2          
005b53df          if (InterlockedDecrement(&esi_15[1]) == 0)
005b53e7              **(uint32_t**)esi_15(1);
005b5356      }
005b5356      
005b53f1      if ((arg1 & 0x10000) != 0)
005b53f1      {
005b53f9          if (result == 0)
005b543e              result = 1;
005b53f9          else
005b53f9          {
005b5404              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_794334);
005b5409              uint32_t esi_16 = arg1;
005b540d              int32_t eax_68 = *(uint32_t*)(esi_16 + 8);
005b540d              
005b541b              if ((eax_68 != 1 && esi_16 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5425                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, (esi_16 + 0x14), (eax_68 - 1));
005b5425              
005b5432              if (InterlockedDecrement((esi_16 + 4)) == 0)
005b543a                  **(uint32_t**)esi_16(1);
005b53f9          }
005b53f9          
005b544c          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Feet");
005b5451          uint32_t esi_17 = arg1;
005b5455          int32_t eax_72 = *(uint32_t*)(esi_17 + 8);
005b5455          
005b5463          if ((eax_72 != 1 && esi_17 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b546d              AC1Legacy::PStringBase<char>::append_n_chars(arg2, (esi_17 + 0x14), (eax_72 - 1));
005b546d          
005b547a          if (InterlockedDecrement((esi_17 + 4)) == 0)
005b5482              **(uint32_t**)esi_17(1);
005b53f1      }
005b53f1      
005b548b      return result;
005b4f30  }

005b548c                                      90 90 90 90                                                              ....

005b5490  int32_t AppraisalSystem::DamageResistanceToString(enum DAMAGE_TYPE const arg1, int32_t const arg2, float arg3, class AC1Legacy::PStringBase<char>* arg4)

005b5490  {
005b5491      enum DAMAGE_TYPE ebx = arg1;
005b5499      char const* const __saved_ebp;
005b5499      
005b5499      if (ebx > FIRE_DAMAGE_TYPE)
005b5499      {
005b54d2          if (ebx != ACID_DAMAGE_TYPE)
005b54d2          {
005b54d7              if (ebx == ELECTRIC_DAMAGE_TYPE)
005b54d7              {
005b54ed                  __saved_ebp = "Electric: ";
005b54f2                  goto label_5b54ff;
005b54d7              }
005b54d7              
005b54df              if (ebx == NETHER_DAMAGE_TYPE)
005b54df              {
005b54e6                  __saved_ebp = "Nether: ";
005b54eb                  goto label_5b54ff;
005b54df              }
005b54df              
005b54e5              return 0;
005b54d2          }
005b54d2          
005b54f4          __saved_ebp = "Acid: ";
005b54ff      label_5b54ff:
005b54ff          AC1Legacy::PStringBase<char>::set(arg4, __saved_ebp);
005b550a          long double x87_r7_1 = -(((long double)0.000199999995f));
005b550d          long double temp0 = ((long double)arg3);
005b550d          (x87_r7_1 - temp0);
005b5518          int32_t eax_3;
005b5518          eax_3 = ((((x87_r7_1 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0) ? 1 : 0) << 0xe) | 0))));
005b551d          char* var_14_1;
005b551d          
005b551d          if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
005b551d          {
005b556d              long double x87_r7_3 = fabsl(((long double)arg3));
005b556f              long double x87_r6_1 = ((long double)0.000199999995f);
005b5575              (x87_r6_1 - x87_r7_3);
005b5577              eax_3 = ((((x87_r6_1 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_3) ? 1 : 0) << 0xe) | 0))));
005b5577              
005b557c              if ((*(uint8_t*)((char*)eax_3)[1] & 1) == 0)
005b557c              {
005b557e                  var_14_1 = &data_798afc;
005b5583                  goto label_5b5528;
005b557c              }
005b557c              
005b5585              long double x87_r7_4 = ((long double)arg3);
005b5589              long double temp1_1 = ((long double)0.0);
005b5589              (x87_r7_4 - temp1_1);
005b558f              eax_3 = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005b558f              
005b5594              if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
005b5594              {
005b55bf              label_5b55bf:
005b55bf                  long double x87_r7_6 = ((long double)arg3);
005b55c3                  long double temp2_1 = ((long double)0.40000000000000002);
005b55c3                  (x87_r7_6 - temp2_1);
005b55c9                  eax_3 = ((((x87_r7_6 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005b55c9                  
005b55ce                  if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
005b55ce                  {
005b55f9                  label_5b55f9:
005b55f9                      long double x87_r7_8 = ((long double)arg3);
005b55fd                      long double temp4_1 = ((long double)0.80000000000000004);
005b55fd                      (x87_r7_8 - temp4_1);
005b5603                      eax_3 = ((((x87_r7_8 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005b5608                      char const* const var_14_5;
005b5608                      
005b5608                      if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
005b5608                      {
005b5625                      label_5b5625:
005b5625                          long double x87_r7_10 = ((long double)arg3);
005b5629                          long double temp7_1 = ((long double)1.2);
005b5629                          (x87_r7_10 - temp7_1);
005b562f                          eax_3 = ((((x87_r7_10 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp7_1) ? 1 : 0) << 0xe) | 0))));
005b562f                          
005b5634                          if ((*(uint8_t*)((char*)eax_3)[1] & 1) != 0)
005b5634                          {
005b565c                          label_5b565c:
005b565c                              long double x87_r7_12 = ((long double)arg3);
005b5660                              long double temp9_1 = ((long double)1.6000000000000001);
005b5660                              (x87_r7_12 - temp9_1);
005b5666                              eax_3 = ((((x87_r7_12 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp9_1) ? 1 : 0) << 0xe) | 0))));
005b5666                              
005b566b                              if ((*(uint8_t*)((char*)eax_3)[1] & 1) != 0)
005b566b                              {
005b5693                              label_5b5693:
005b5693                                  long double x87_r7_14 = ((long double)arg3);
005b5697                                  long double temp11_1 = ((long double)2.0);
005b5697                                  (x87_r7_14 - temp11_1);
005b569d                                  eax_3 = ((((x87_r7_14 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_14, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r7_14 == temp11_1) ? 1 : 0) << 0xe) | 0))));
005b569d                                  
005b56a2                                  if ((*(uint8_t*)((char*)eax_3)[1] & 1) == 0)
005b56a2                                  {
005b56a4                                      arg3 = 2f;
005b56ac                                      var_14_5 = "Unparalleled";
005b56ac                                      goto label_5b56b5;
005b56a2                                  }
005b566b                              }
005b566b                              else
005b566b                              {
005b566d                                  long double x87_r7_13 = ((long double)arg3);
005b5671                                  long double temp12_1 = ((long double)2.0);
005b5671                                  (x87_r7_13 - temp12_1);
005b5677                                  eax_3 = ((((x87_r7_13 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_13, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7_13 == temp12_1) ? 1 : 0) << 0xe) | 0))));
005b5679                                  bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005b5679                                  
005b567c                                  if (p_5)
005b567c                                      goto label_5b5693;
005b567c                                  
005b5687                                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Excellent");
005b56c1                                  AC1Legacy::PStringBase<char>::operator+=(arg4, &arg1);
005b56ca                                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005b566b                              }
005b5634                          }
005b5634                          else
005b5634                          {
005b5636                              long double x87_r7_11 = ((long double)arg3);
005b563a                              long double temp10_1 = ((long double)1.6000000000000001);
005b563a                              (x87_r7_11 - temp10_1);
005b5640                              eax_3 = ((((x87_r7_11 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp10_1) ? 1 : 0) << 0xe) | 0))));
005b5642                              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005b5642                              
005b5645                              if (p_4)
005b5645                                  goto label_5b565c;
005b5645                              
005b5650                              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Above Average");
005b56c1                              AC1Legacy::PStringBase<char>::operator+=(arg4, &arg1);
005b56ca                              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005b5634                          }
005b5608                      }
005b5608                      else
005b5608                      {
005b560a                          long double x87_r7_9 = ((long double)arg3);
005b560e                          long double temp8_1 = ((long double)1.2);
005b560e                          (x87_r7_9 - temp8_1);
005b5614                          eax_3 = ((((x87_r7_9 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp8_1) ? 1 : 0) << 0xe) | 0))));
005b5616                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005b5616                          
005b5619                          if (p_3)
005b5619                              goto label_5b5625;
005b5619                          
005b561b                          var_14_5 = "Average";
005b56b5                      label_5b56b5:
005b56b5                          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, var_14_5);
005b56c1                          AC1Legacy::PStringBase<char>::operator+=(arg4, &arg1);
005b56ca                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005b5608                      }
005b55ce                  }
005b55ce                  else
005b55ce                  {
005b55d0                      long double x87_r7_7 = ((long double)arg3);
005b55d4                      long double temp5_1 = ((long double)0.80000000000000004);
005b55d4                      (x87_r7_7 - temp5_1);
005b55da                      eax_3 = ((((x87_r7_7 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp5_1) ? 1 : 0) << 0xe) | 0))));
005b55dc                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
005b55dc                      
005b55df                      if (p_2)
005b55df                          goto label_5b55f9;
005b55df                      
005b55ea                      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "Below Average");
005b56c1                      AC1Legacy::PStringBase<char>::operator+=(arg4, &arg1);
005b56ca                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005b55ce                  }
005b5594              }
005b5594              else
005b5594              {
005b5596                  long double x87_r7_5 = ((long double)arg3);
005b559a                  long double temp3_1 = ((long double)0.40000000000000002);
005b559a                  (x87_r7_5 - temp3_1);
005b55a0                  eax_3 = ((((x87_r7_5 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005b55a2                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
005b55a2                  
005b55a5                  if (p_1)
005b55a5                      goto label_5b55bf;
005b55a5                  
005b55b0                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &gmCharacterInfoUI::`vftable'.RecvNotice_BeginEnterWorld);
005b56c1                  AC1Legacy::PStringBase<char>::operator+=(arg4, &arg1);
005b56ca                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005b5594              }
005b551d          }
005b551d          else
005b551d          {
005b551f              var_14_1 = &data_7928af;
005b5528          label_5b5528:
005b5528              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, var_14_1);
005b552d              enum DAMAGE_TYPE esi_1 = arg1;
005b5531              int32_t eax_4 = *(uint32_t*)(esi_1 + 8);
005b5531              
005b553f              if ((eax_4 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5549                  AC1Legacy::PStringBase<char>::append_n_chars(arg4, (esi_1 + 0x14), (eax_4 - 1));
005b5549              
005b5556              if (InterlockedDecrement((esi_1 + 4)) == 0)
005b5562                  **(uint32_t**)esi_1(1);
005b551d          }
005b56d5          long double x87_r7_16 = -(((long double)0.000199999995f));
005b56d7          long double temp6 = ((long double)arg3);
005b56d7          (x87_r7_16 - temp6);
005b56db          eax_3 = ((((x87_r7_16 < temp6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_16, temp6))) ? 1 : 0) << 0xa) | ((((x87_r7_16 == temp6) ? 1 : 0) << 0xe) | 0))));
005b56db          
005b56e0          if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
005b56e0          {
005b56e5              if (ebx > FIRE_DAMAGE_TYPE)
005b56e5              {
005b571e                  if (ebx == ACID_DAMAGE_TYPE)
005b5749                      AC1Legacy::PStringBase<char>::set(arg4, "Your armor itches and burns your…");
005b571e                  else if (ebx == ELECTRIC_DAMAGE_TYPE)
005b5749                      AC1Legacy::PStringBase<char>::set(arg4, "Your armor is extremely conducti…");
005b5723                  else
005b5723                  {
005b572b                      if (ebx != NETHER_DAMAGE_TYPE)
005b5733                          return 0;
005b5733                      
005b5749                      AC1Legacy::PStringBase<char>::set(arg4, "Your armor is infused with shado…");
005b5723                  }
005b56e5              }
005b56e5              else if (ebx == FIRE_DAMAGE_TYPE)
005b5749                  AC1Legacy::PStringBase<char>::set(arg4, "Your armor is flammable.");
005b56e7              else
005b56e7              {
005b56ef                  if ((ebx - 1) > 7)
005b5733                      return 0;
005b5733                  
005b56ef                  switch (ebx)
005b56ef                  {
005b56f8                      case SLASH_DAMAGE_TYPE:
005b56f8                      {
005b5749                          AC1Legacy::PStringBase<char>::set(arg4, "Your armor will rend and slash y…");
005b56f8                          break;
005b56f8                      }
005b56ff                      case PIERCE_DAMAGE_TYPE:
005b56ff                      {
005b5749                          AC1Legacy::PStringBase<char>::set(arg4, "Your armor will cave in and pier…");
005b56ff                          break;
005b56ff                      }
005b5733                      case 0x3:
005b5733                      case 0x5:
005b5733                      case 0x6:
005b5733                      case 0x7:
005b5733                      {
005b5733                          return 0;
005b5733                          break;
005b5733                      }
005b5706                      case BLUDGEON_DAMAGE_TYPE:
005b5706                      {
005b5749                          AC1Legacy::PStringBase<char>::set(arg4, "Your armor will shatter and brui…");
005b5706                          break;
005b5706                      }
005b570d                      case COLD_DAMAGE_TYPE:
005b570d                      {
005b5749                          AC1Legacy::PStringBase<char>::set(arg4, "Your armor is unnaturally cold.");
005b570d                          break;
005b570d                      }
005b56ef                  }
005b56e7              }
005b56e0          }
005b56e0          
005b574e          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b5753          arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b575b          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b5770          char* var_18;
005b5770          var_18 = ((double)(((long double)arg2) * ((long double)arg3)));
005b5779          AC1Legacy::PStringBase<char>::sprintf(&arg1, "  (%.0f)");
005b577e          enum DAMAGE_TYPE esi_2 = arg1;
005b5782          int32_t eax_10 = *(uint32_t*)(esi_2 + 8);
005b5782          
005b5793          if ((eax_10 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b579d              AC1Legacy::PStringBase<char>::append_n_chars(arg4, (esi_2 + 0x14), (eax_10 - 1));
005b579d          
005b57aa          if (InterlockedDecrement((esi_2 + 4)) == 0)
005b57b2              **(uint32_t**)esi_2(1);
005b57b2          
005b57bd          return 1;
005b5499      }
005b5499      
005b549b      if (ebx == FIRE_DAMAGE_TYPE)
005b549b      {
005b54c8          __saved_ebp = "Fire: ";
005b54cd          goto label_5b54ff;
005b549b      }
005b549b      
005b54a3      if ((ebx - 1) > 7)
005b54e5          return 0;
005b54e5      
005b54a3      switch (ebx)
005b54a3      {
005b54ac          case SLASH_DAMAGE_TYPE:
005b54ac          {
005b54ac              __saved_ebp = "Slashing: ";
005b54b1              goto label_5b54ff;
005b54ac          }
005b54b3          case PIERCE_DAMAGE_TYPE:
005b54b3          {
005b54b3              __saved_ebp = "Piercing: ";
005b54b8              goto label_5b54ff;
005b54b3          }
005b54e5          case 0x3:
005b54e5          case 0x5:
005b54e5          case 0x6:
005b54e5          case 0x7:
005b54e5          {
005b54e5              return 0;
005b54e5              break;
005b54e5          }
005b54ba          case BLUDGEON_DAMAGE_TYPE:
005b54ba          {
005b54ba              __saved_ebp = "Bludgeoning: ";
005b54bf              goto label_5b54ff;
005b54ba          }
005b54c1          case COLD_DAMAGE_TYPE:
005b54c1          {
005b54c1              __saved_ebp = "Cold: ";
005b54c6              goto label_5b54ff;
005b54c1          }
005b54a3      }
005b5490  }

005b57be                                                                                            8b ff                                ..
005b57c0  uint32_t jump_table_5b57c0[0x8] = 
005b57c0  {
005b57c0      [0x0] =  0x005b54ac
005b57c4      [0x1] =  0x005b54b3
005b57c8      [0x2] =  0x005b54e1
005b57cc      [0x3] =  0x005b54ba
005b57d0      [0x4] =  0x005b54e1
005b57d4      [0x5] =  0x005b54e1
005b57d8      [0x6] =  0x005b54e1
005b57dc      [0x7] =  0x005b54c1
005b57e0  }
005b57e0  uint32_t jump_table_5b57e0[0x8] = 
005b57e0  {
005b57e0      [0x0] =  0x005b56f8
005b57e4      [0x1] =  0x005b56ff
005b57e8      [0x2] =  0x005b572d
005b57ec      [0x3] =  0x005b5706
005b57f0      [0x4] =  0x005b572d
005b57f4      [0x5] =  0x005b572d
005b57f8      [0x6] =  0x005b572d
005b57fc      [0x7] =  0x005b570d
005b5800  }

005b5800  int32_t AppraisalSystem::InqPluralizedGemName(uint32_t arg1, class PStringBase<char>* arg2)

005b5800  {
005b5804      uint32_t esi = arg1;
005b5804      
005b580b      if (esi == 0x26)
005b580b      {
005b5816          PStringBase<char>::set(arg2, "Rubies");
005b5824          return 1;
005b580b      }
005b580b      
005b5825      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005b5831      arg1 = PStringBase<char>::s_NullBuffer_1;
005b5839      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005b5841      MaterialTypeEnumMapper::MaterialTypeToString(esi, &arg1);
005b589d      void* var_8;
005b589d      class PStringBase<char> __return;
005b589d      
005b589d      if ((((((((((esi == 0xb || esi == 0x18) || esi == 0x1b) || esi == 0x1d) || esi == 0x20) || esi == 0x25) || esi == 0x28) || esi == 0x2e) || esi == 0x24) || esi == 0x2d))
005b589d      {
005b5939          class PStringBase<char>* eax_4 = PStringBase<char>::operator+(PStringBase<char>::PStringBase<char>(&var_8, "pieces of "), &__return, &arg1);
005b5944          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
005b5944          
005b5948          if (m_charbuffer != eax_4->m_charbuffer)
005b5948          {
005b595d              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005b5965                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005b5965              
005b5967              class PSRefBufferCharData<char>* m_charbuffer_1 = eax_4->m_charbuffer;
005b5969              arg2->m_charbuffer = m_charbuffer_1;
005b596f              InterlockedIncrement(&m_charbuffer_1[-1]);
005b5948          }
005b5948          
005b597b          int32_t* esi_3 = (__return - 0x14);
005b597b          
005b598a          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
005b5992              **(uint32_t**)esi_3(1);
005b5992          
005b5998          int32_t* esi_5 = ((char*)var_8 - 0x14);
005b5998          
005b59a9          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
005b59b1              **(uint32_t**)esi_5(1);
005b589d      }
005b589d      else
005b589d      {
005b58a7          class PStringBase<char>* __saved_edi_1;
005b58a7          int32_t* __saved_ebx_3;
005b58a7          
005b58a7          if ((esi == 0x1a || esi == 0x31))
005b58a7          {
005b590c              PStringBase<char>::PStringBase<char>(&var_8, &data_7e3fe8);
005b5915              __saved_ebx_3 = &var_8;
005b591a              __saved_edi_1 = &__return;
005b58e7          label_5b58e7:
005b58e7              PStringBase<unsigned short>::operator=(arg2, PStringBase<char>::operator+(&arg1, __saved_edi_1, __saved_ebx_3));
005b58f0              PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005b58f9              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_8);
005b58a7          }
005b58a7          else
005b58a7          {
005b58ac              if (esi != 0x1c)
005b58ac              {
005b58ca                  PStringBase<char>::PStringBase<char>(&var_8, &data_794520);
005b58d3                  __saved_ebx_3 = &var_8;
005b58d8                  __saved_edi_1 = &__return;
005b58d8                  goto label_5b58e7;
005b58ac              }
005b58ac              
005b58b7              PStringBase<unsigned short>::operator=(arg2, &arg1);
005b58a7          }
005b589d      }
005b59b7      int32_t* esi_7 = (arg1 - 0x14);
005b59b7      
005b59cb      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
005b59d3          **(uint32_t**)esi_7(1);
005b59d3      
005b59de      return 1;
005b5800  }

005b59df                                                                                               90                                 .

005b59e0  int32_t AppraisalSystem::InqCreatureDisplayName(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b59e0  {
005b59e3      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005b59e8      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005b59ec      char* esi;
005b59ec      char* var_10 = esi;
005b59f1      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005b59f1      
005b5a10      if (EnumMapper::GetString(0x10000005, __return_addr, &var_10) == 0)
005b5a10      {
005b5a16          int32_t* esi_2 = &var_10[0xffffffec];
005b5a16          
005b5a29          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005b5a31              **(uint32_t**)esi_2(1);
005b5a31          
005b5a39          return 0;
005b5a10      }
005b5a10      
005b5a42      int32_t edi;
005b5a42      int32_t var_18_2 = edi;
005b5a46      AC1Legacy::PStringBase<char>::set(arg1, var_10);
005b5a54      class AC1Legacy::PStringBase<char> var_8;
005b5a54      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_8, &data_794098);
005b5a62      AC1Legacy::PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_2, &data_794500);
005b5a73      AC1Legacy::PStringBase<char>::replace(arg1, &PStringBase<char>::s_NullBuffer_2, &var_8);
005b5a78      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
005b5a78      
005b5a8e      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_3->m_data[4]) == 0 && PStringBase<char>::s_NullBuffer_3 != 0))
005b5a8e      {
005b5a90          int32_t edx_1;
005b5a90          edx_1 = PStringBase<char>::s_NullBuffer_3->m_data[0];
005b5a90          *(uint8_t*)((char*)edx_1)[1] = PStringBase<char>::s_NullBuffer_3->m_data[1];
005b5a90          *(uint8_t*)((char*)edx_1)[2] = PStringBase<char>::s_NullBuffer_3->m_data[2];
005b5a90          *(uint8_t*)((char*)edx_1)[3] = PStringBase<char>::s_NullBuffer_3->m_data[3];
005b5a96          *(uint32_t*)edx_1(1);
005b5a8e      }
005b5a8e      
005b5aa8      int32_t* var_4;
005b5aa8      
005b5aa8      if ((InterlockedDecrement(&var_4[1]) == 0 && var_4 != 0))
005b5ab0          **(uint32_t**)var_4(1);
005b5ab0      
005b5ab6      int32_t* esi_7 = (var_8 - 0x14);
005b5ab6      
005b5ac6      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
005b5ac6      {
005b5ac8          int32_t edx_3 = *(uint32_t*)esi_7;
005b5aca          PStringBase<char>::s_NullBuffer_2 = 1;
005b5ace          *(uint32_t*)edx_3(PStringBase<char>::s_NullBuffer_2);
005b5ac6      }
005b5ac6      
005b5ad9      return 1;
005b59e0  }

005b5ada                                                                                90 90 90 90 90 90                            ......

005b5ae0  int32_t AppraisalSystem::InqGenderHeritageDisplay(uint32_t arg1, uint32_t arg2, uint32_t arg3, class AC1Legacy::PStringBase<char>* arg4)

005b5ae0  {
005b5ae0      int32_t ecx;
005b5ae0      int32_t var_4_1 = ecx;
005b5ae7      class AC1Legacy::PStringBase<char>* ebx = arg4;
005b5aed      class AC1Legacy::PSRefBuffer<char>* m_buffer = ebx->m_buffer;
005b5af8      int32_t var_4 = 1;
005b5af8      
005b5b00      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
005b5b00      {
005b5b12          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005b5b14              m_buffer->vtable->__vecDelDtor(1);
005b5b14          
005b5b1c          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b5b27          ebx->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b5b29          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b5b00      }
005b5b00      
005b5b2f      int32_t ebp = 0;
005b5b2f      
005b5b33      if (arg1 != 0)
005b5b33      {
005b5b35          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b5b3a          arg4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005b5b42          int32_t eax_4;
005b5b42          class AC1Legacy::PStringBase<char>* edx_2;
005b5b42          eax_4 = InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005b5b48          class AC1Legacy::PStringBase<char>** var_18_4 = &arg4;
005b5b49          uint32_t var_1c_1 = arg1;
005b5b4a          int32_t eax_5 = AppraisalSystem::InqGenderDisplayName(eax_4, edx_2);
005b5b4f          class AC1Legacy::PStringBase<char>* esi_1 = arg4;
005b5b4f          
005b5b58          if (eax_5 == 0)
005b5b6c              var_4 = 0;
005b5b58          else
005b5b58          {
005b5b60              AC1Legacy::PStringBase<char>::set(ebx, &esi_1[5]);
005b5b65              ebp = 1;
005b5b58          }
005b5b58          
005b5b84          if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
005b5b86              esi_1->m_buffer->vtable(1);
005b5b33      }
005b5b33      
005b5b94      int32_t esi_6;
005b5b94      class AC1Legacy::PStringBase<char>* edi;
005b5b94      void* __offset(AC1Legacy::PStringBase<char>, 0x4) var_18_13;
005b5b94      class AC1Legacy::PStringBase<char>* esi_4;
005b5b94      
005b5b94      if (arg2 == 0)
005b5b94      {
005b5c50          if (arg3 == 0)
005b5d15              return var_4;
005b5d15          
005b5c56          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b5c5b          arg4 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
005b5c63          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
005b5c6b          int32_t eax_18 = AppraisalSystem::InqCreatureDisplayName(arg3, &arg4);
005b5c70          edi = arg4;
005b5c70          
005b5c79          if (eax_18 != 0)
005b5c79          {
005b5c7d              if (ebp != 0)
005b5c7d              {
005b5c88                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg4, &data_794098);
005b5c94                  AC1Legacy::PStringBase<char>::operator+=(ebx, &arg4);
005b5c9d                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg4);
005b5c7d              }
005b5c7d              
005b5caa              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg4, &edi[5]);
005b5caf              esi_4 = arg4;
005b5cb3              int32_t eax_19 = *(int32_t*)((char*)esi_4 + 8);
005b5cb3              
005b5cc1              if ((eax_19 != 1 && esi_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5ccb                  AC1Legacy::PStringBase<char>::append_n_chars(ebx, &esi_4[5], (eax_19 - 1));
005b5ccb              
005b5cd3              var_18_13 = &esi_4[1];
005b5cb9              goto label_5b5cd4;
005b5c79          }
005b5c79          
005b5c43          esi_6 = 0;
005b5b94      }
005b5b94      else
005b5b94      {
005b5b9a          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b5b9f          arg4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005b5ba7          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
005b5baf          int32_t eax_9 = AppraisalSystem::InqHeritageGroupDisplayName(arg2, &arg4);
005b5bb4          edi = arg4;
005b5bb4          
005b5bbd          if (eax_9 == 0)
005b5c43              esi_6 = 0;
005b5bbd          else
005b5bbd          {
005b5bc5              if (ebp != 0)
005b5bc5              {
005b5bd0                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg4, &data_794098);
005b5bd5                  class AC1Legacy::PStringBase<char>* esi_3 = arg4;
005b5bd9                  int32_t eax_10 = *(int32_t*)((char*)esi_3 + 8);
005b5bd9                  
005b5be7                  if ((eax_10 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5bf1                      AC1Legacy::PStringBase<char>::append_n_chars(ebx, &esi_3[5], (eax_10 - 1));
005b5bf1                  
005b5c02                  if (InterlockedDecrement(&esi_3[1]) == 0)
005b5c04                      esi_3->m_buffer->vtable(1);
005b5bc5              }
005b5bc5              
005b5c14              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg4, &edi[5]);
005b5c19              esi_4 = arg4;
005b5c1d              int32_t eax_14 = *(int32_t*)((char*)esi_4 + 8);
005b5c1d              
005b5c2b              if ((eax_14 != 1 && esi_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b5c35                  AC1Legacy::PStringBase<char>::append_n_chars(ebx, &esi_4[5], (eax_14 - 1));
005b5c35              
005b5c3d              var_18_13 = &esi_4[1];
005b5cd4          label_5b5cd4:
005b5cd4              
005b5cdc              if (InterlockedDecrement(var_18_13) == 0)
005b5cde                  esi_4->m_buffer->vtable(1);
005b5cde              
005b5ce6              esi_6 = var_4;
005b5bbd          }
005b5b94      }
005b5b94      
005b5cfa      if ((InterlockedDecrement(&edi[1]) == 0 && edi != 0))
005b5cfc          edi->m_buffer->vtable(1);
005b5cfc      
005b5d0b      return esi_6;
005b5ae0  }

005b5d16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b5d20  class CreatureAppraisalProfile& __thiscall CreatureAppraisalProfile::operator=(class CreatureAppraisalProfile* this, class CreatureAppraisalProfile const& arg2)

005b5d20  {
005b5d28      if (this != arg2)
005b5d28      {
005b5d2d          this->strength = arg2->strength;
005b5d33          this->endurance = arg2->endurance;
005b5d39          this->quickness = arg2->quickness;
005b5d3f          this->coordination = arg2->coordination;
005b5d45          this->focus = arg2->focus;
005b5d4b          this->self = arg2->self;
005b5d51          this->health = arg2->health;
005b5d57          this->stamina = arg2->stamina;
005b5d5d          this->mana = arg2->mana;
005b5d63          this->max_health = arg2->max_health;
005b5d69          this->max_stamina = arg2->max_stamina;
005b5d6f          this->max_mana = arg2->max_mana;
005b5d75          this->enchantment_bitfield = arg2->enchantment_bitfield;
005b5d28      }
005b5d28      
005b5d78      return this;
005b5d20  }

005b5d7b                                                                                   90 90 90 90 90                             .....

005b5d80  int32_t __thiscall CreatureAppraisalProfile::InqAttribute(class CreatureAppraisalProfile const* this, uint32_t arg2, uint32_t* arg3)

005b5d80  {
005b5d88      if ((arg2 - 1) > 5)
005b5df7          return 0;
005b5df7      
005b5d8a      uint32_t edx_1;
005b5d8a      
005b5d8a      switch (arg2)
005b5d8a      {
005b5d98          case 1:
005b5d98          {
005b5d98              *(uint32_t*)arg3 = this->strength;
005b5da0              int32_t ecx_1;
005b5da0              ecx_1 = *(uint32_t*)arg3 != 0;
005b5da5              return ecx_1;
005b5d98              break;
005b5d98          }
005b5da8          case 2:
005b5da8          {
005b5da8              edx_1 = this->endurance;
005b5deb          label_5b5deb:
005b5deb              int32_t ecx_6;
005b5deb              ecx_6 = edx_1 != 0;
005b5dee              *(uint32_t*)arg3 = edx_1;
005b5df2              return ecx_6;
005b5da8              break;
005b5da8          }
005b5db4          case 3:
005b5db4          {
005b5db4              *(uint32_t*)arg3 = this->quickness;
005b5dbc              int32_t ecx_3;
005b5dbc              ecx_3 = *(uint32_t*)arg3 != 0;
005b5dc1              return ecx_3;
005b5db4              break;
005b5db4          }
005b5dc4          case 4:
005b5dc4          {
005b5dc4              edx_1 = this->coordination;
005b5dc7              goto label_5b5deb;
005b5dc4          }
005b5dd0          case 5:
005b5dd0          {
005b5dd0              *(uint32_t*)arg3 = this->focus;
005b5dd8              int32_t ecx_5;
005b5dd8              ecx_5 = *(uint32_t*)arg3 != 0;
005b5ddd              return ecx_5;
005b5dd0              break;
005b5dd0          }
005b5de0          case 6:
005b5de0          {
005b5de0              edx_1 = this->self;
005b5de0              goto label_5b5deb;
005b5de0          }
005b5d8a      }
005b5d80  }

005b5dfa                                                                                8b ff                                        ..
005b5dfc  uint32_t jump_table_5b5dfc[0x6] = 
005b5dfc  {
005b5dfc      [0x0] =  0x005b5d91
005b5e00      [0x1] =  0x005b5da8
005b5e04      [0x2] =  0x005b5dad
005b5e08      [0x3] =  0x005b5dc4
005b5e0c      [0x4] =  0x005b5dc9
005b5e10      [0x5] =  0x005b5de0
005b5e14  }

005b5e14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b5e20  int32_t __thiscall CreatureAppraisalProfile::InqAttribute2nd(class CreatureAppraisalProfile const* this, uint32_t arg2, uint32_t* arg3)

005b5e20  {
005b5e28      if ((arg2 - 1) > 5)
005b5e97          return 0;
005b5e97      
005b5e2a      uint32_t edx_1;
005b5e2a      
005b5e2a      switch (arg2)
005b5e2a      {
005b5e64          case 1:
005b5e64          {
005b5e64              edx_1 = this->max_health;
005b5e67              goto label_5b5e8b;
005b5e64          }
005b5e38          case 2:
005b5e38          {
005b5e38              *(uint32_t*)arg3 = this->health;
005b5e40              int32_t ecx_1;
005b5e40              ecx_1 = *(uint32_t*)arg3 != 0;
005b5e45              return ecx_1;
005b5e38              break;
005b5e38          }
005b5e70          case 3:
005b5e70          {
005b5e70              *(uint32_t*)arg3 = this->max_stamina;
005b5e78              int32_t ecx_5;
005b5e78              ecx_5 = *(uint32_t*)arg3 != 0;
005b5e7d              return ecx_5;
005b5e70              break;
005b5e70          }
005b5e48          case 4:
005b5e48          {
005b5e48              edx_1 = this->stamina;
005b5e8b          label_5b5e8b:
005b5e8b              int32_t ecx_6;
005b5e8b              ecx_6 = edx_1 != 0;
005b5e8e              *(uint32_t*)arg3 = edx_1;
005b5e92              return ecx_6;
005b5e48              break;
005b5e48          }
005b5e80          case 5:
005b5e80          {
005b5e80              edx_1 = this->max_mana;
005b5e80              goto label_5b5e8b;
005b5e80          }
005b5e54          case 6:
005b5e54          {
005b5e54              *(uint32_t*)arg3 = this->mana;
005b5e5c              int32_t ecx_3;
005b5e5c              ecx_3 = *(uint32_t*)arg3 != 0;
005b5e61              return ecx_3;
005b5e54              break;
005b5e54          }
005b5e2a      }
005b5e20  }

005b5e9a                                                                                8b ff                                        ..
005b5e9c  uint32_t jump_table_5b5e9c[0x6] = 
005b5e9c  {
005b5e9c      [0x0] =  0x005b5e64
005b5ea0      [0x1] =  0x005b5e31
005b5ea4      [0x2] =  0x005b5e69
005b5ea8      [0x3] =  0x005b5e48
005b5eac      [0x4] =  0x005b5e80
005b5eb0      [0x5] =  0x005b5e4d
005b5eb4  }

005b5eb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b5ec0  int32_t __thiscall CreatureAppraisalProfile::InqAttributeEnchantmentMod(class CreatureAppraisalProfile const* this, uint32_t arg2, int32_t* arg3)

005b5ec0  {
005b5ec8      if ((arg2 - 1) <= 5)
005b5ece          switch (arg2)
005b5ece          {
005b5ed5              case 1:
005b5ed5              {
005b5ed5                  uint32_t enchantment_bitfield = this->enchantment_bitfield;
005b5ed5                  
005b5eda                  if ((enchantment_bitfield & 1) != 0)
005b5eda                  {
005b5eeb                      *(uint32_t*)arg3 = (enchantment_bitfield & 0x10000);
005b5ef2                      return 1;
005b5eda                  }
005b5ed5                  break;
005b5ed5              }
005b5ef5              case 2:
005b5ef5              {
005b5ef5                  uint32_t enchantment_bitfield_1 = this->enchantment_bitfield;
005b5ef5                  
005b5efa                  if ((enchantment_bitfield_1 & 2) != 0)
005b5efa                  {
005b5f0b                      *(uint32_t*)arg3 = (enchantment_bitfield_1 & 0x20000);
005b5f12                      return 1;
005b5efa                  }
005b5ef5                  break;
005b5ef5              }
005b5f15              case 3:
005b5f15              {
005b5f15                  uint32_t enchantment_bitfield_2 = this->enchantment_bitfield;
005b5f15                  
005b5f1a                  if ((enchantment_bitfield_2 & 4) != 0)
005b5f1a                  {
005b5f27                      *(uint32_t*)arg3 = (enchantment_bitfield_2 & 0x40000);
005b5f2e                      return 1;
005b5f1a                  }
005b5f15                  break;
005b5f15              }
005b5f31              case 4:
005b5f31              {
005b5f31                  uint32_t enchantment_bitfield_3 = this->enchantment_bitfield;
005b5f31                  
005b5f36                  if ((enchantment_bitfield_3 & 8) != 0)
005b5f36                  {
005b5f43                      *(uint32_t*)arg3 = (enchantment_bitfield_3 & 0x80000);
005b5f4a                      return 1;
005b5f36                  }
005b5f31                  break;
005b5f31              }
005b5f4d              case 5:
005b5f4d              {
005b5f4d                  uint32_t enchantment_bitfield_4 = this->enchantment_bitfield;
005b5f4d                  
005b5f52                  if ((enchantment_bitfield_4 & 0x10) != 0)
005b5f52                  {
005b5f5f                      *(uint32_t*)arg3 = (enchantment_bitfield_4 & 0x100000);
005b5f66                      return 1;
005b5f52                  }
005b5f4d                  break;
005b5f4d              }
005b5f69              case 6:
005b5f69              {
005b5f69                  uint32_t enchantment_bitfield_5 = this->enchantment_bitfield;
005b5f69                  
005b5f6e                  if ((enchantment_bitfield_5 & 0x20) != 0)
005b5f6e                  {
005b5f7b                      *(uint32_t*)arg3 = (enchantment_bitfield_5 & 0x200000);
005b5f82                      return 1;
005b5f6e                  }
005b5f69                  break;
005b5f69              }
005b5ece          }
005b5ece      
005b5f87      return 0;
005b5ec0  }

005b5f8a                                8b ff                                                                        ..
005b5f8c  uint32_t jump_table_5b5f8c[0x6] = 
005b5f8c  {
005b5f8c      [0x0] =  0x005b5ed5
005b5f90      [0x1] =  0x005b5ef5
005b5f94      [0x2] =  0x005b5f15
005b5f98      [0x3] =  0x005b5f31
005b5f9c      [0x4] =  0x005b5f4d
005b5fa0      [0x5] =  0x005b5f69
005b5fa4  }

005b5fa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005b5fb0  int32_t __thiscall CreatureAppraisalProfile::InqAttribute2ndEnchantmentMod(class CreatureAppraisalProfile const* this, uint32_t arg2, int32_t* arg3)

005b5fb0  {
005b5fb5      if (arg2 == 1)
005b5fb5      {
005b5ffa          uint32_t enchantment_bitfield_2 = this->enchantment_bitfield;
005b5ffa          
005b5fff          if ((enchantment_bitfield_2 & 0x40) != 0)
005b5fff          {
005b600c              *(uint32_t*)arg3 = (enchantment_bitfield_2 & 0x400000);
005b6013              return 1;
005b5fff          }
005b5fb5      }
005b5fb5      else if (arg2 == 3)
005b5fba      {
005b5fde          uint32_t enchantment_bitfield_1 = this->enchantment_bitfield;
005b5fde          
005b5fe3          if (enchantment_bitfield_1 < 0)
005b5fe3          {
005b5ff0              *(uint32_t*)arg3 = (enchantment_bitfield_1 & "activation type (%s) with '%s' b…");
005b5ff7              return 1;
005b5fe3          }
005b5fba      }
005b5fba      else if (arg2 == 5)
005b5fbf      {
005b5fc1          uint32_t enchantment_bitfield = this->enchantment_bitfield;
005b5fc1          
005b5fc7          if ((*(uint8_t*)((char*)enchantment_bitfield)[1] & 1) != 0)
005b5fc7          {
005b5fd4              *(uint32_t*)arg3 = (enchantment_bitfield & 0x1000000);
005b5fdb              return 1;
005b5fc7          }
005b5fbf      }
005b5fbf      
005b6018      return 0;
005b5fb0  }

005b601b                                                                                   90 90 90 90 90                             .....

005b6020  void __fastcall CreatureAppraisalProfile::CreatureAppraisalProfile(class CreatureAppraisalProfile* this)

005b6020  {
005b6024      this->vtable = 0x7e6cc4;
005b602a      __builtin_memset(&this->strength, 0, 0x34);
005b6020  }

005b6052                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005b6060  uint32_t __thiscall CreatureAppraisalProfile::Pack(class CreatureAppraisalProfile* this, void** arg2, uint32_t arg3)

005b6060  {
005b6065      void* edi = *(uint32_t*)arg2;
005b6069      int32_t result = 0xc;
005b6069      
005b606e      if (edi != 0)
005b606e      {
005b6091          uint32_t enchantment_bitfield = this->enchantment_bitfield;
005b6091          
005b6096          if (enchantment_bitfield != 0)
005b6098              result = 0x10;
005b6098          
005b609d          uint32_t max_stamina = this->max_stamina;
005b609d          
005b60a2          if (max_stamina != 0)
005b60a4              result += 0x28;
005b60a4          
005b60ab          if (arg3 >= result)
005b60ab          {
005b60b1              int32_t ebx_1 = 0;
005b60b1              
005b60b5              if (enchantment_bitfield != 0)
005b60b7                  ebx_1 = 1;
005b60b7              
005b60be              if (max_stamina != 0)
005b60c0                  ebx_1 |= 8;
005b60c0              
005b60c3              *(uint32_t*)edi = ebx_1;
005b60c7              void* edi_2 = (*(uint32_t*)arg2 + 4);
005b60ca              *(uint32_t*)arg2 = edi_2;
005b60d1              *(uint32_t*)edi_2 = this->health;
005b60d5              void* esi_3 = (*(uint32_t*)arg2 + 4);
005b60d8              *(uint32_t*)arg2 = esi_3;
005b60dd              *(uint32_t*)esi_3 = this->max_health;
005b60e1              void* ebp_2 = (*(uint32_t*)arg2 + 4);
005b60e7              *(uint32_t*)arg2 = ebp_2;
005b60e9              void* esi_4 = ebp_2;
005b60e9              
005b60eb              if ((ebx_1 & 8) != 0)
005b60eb              {
005b60f4                  *(uint32_t*)esi_4 = this->strength;
005b60f8                  void* esi_6 = (*(uint32_t*)arg2 + 4);
005b60fb                  *(uint32_t*)arg2 = esi_6;
005b6100                  *(uint32_t*)esi_6 = this->endurance;
005b6104                  void* ebp_4 = (*(uint32_t*)arg2 + 4);
005b6107                  *(uint32_t*)arg2 = ebp_4;
005b610e                  *(uint32_t*)ebp_4 = this->quickness;
005b6112                  void* edi_9 = (*(uint32_t*)arg2 + 4);
005b6115                  *(uint32_t*)arg2 = edi_9;
005b611c                  *(uint32_t*)edi_9 = this->coordination;
005b6120                  void* esi_10 = (*(uint32_t*)arg2 + 4);
005b6123                  *(uint32_t*)arg2 = esi_10;
005b6128                  *(uint32_t*)esi_10 = this->focus;
005b612c                  void* ebp_6 = (*(uint32_t*)arg2 + 4);
005b612f                  *(uint32_t*)arg2 = ebp_6;
005b6136                  *(uint32_t*)ebp_6 = this->self;
005b613a                  void* edi_14 = (*(uint32_t*)arg2 + 4);
005b613d                  *(uint32_t*)arg2 = edi_14;
005b6144                  *(uint32_t*)edi_14 = this->stamina;
005b6148                  void* esi_14 = (*(uint32_t*)arg2 + 4);
005b614b                  *(uint32_t*)arg2 = esi_14;
005b6150                  *(uint32_t*)esi_14 = this->mana;
005b6154                  void* ebp_8 = (*(uint32_t*)arg2 + 4);
005b6157                  *(uint32_t*)arg2 = ebp_8;
005b615e                  *(uint32_t*)ebp_8 = this->max_stamina;
005b6162                  void* edi_19 = (*(uint32_t*)arg2 + 4);
005b6165                  *(uint32_t*)arg2 = edi_19;
005b616c                  *(uint32_t*)edi_19 = this->max_mana;
005b6170                  esi_4 = (*(uint32_t*)arg2 + 4);
005b6173                  *(uint32_t*)arg2 = esi_4;
005b60eb              }
005b60eb              
005b6178              if ((ebx_1 & 1) != 0)
005b6178              {
005b617d                  *(uint32_t*)esi_4 = this->enchantment_bitfield;
005b617f                  *(uint32_t*)arg2 += 4;
005b6178              }
005b60ab          }
005b606e      }
005b606e      else
005b606e      {
005b6075          if (this->enchantment_bitfield != 0)
005b6077              result = 0x10;
005b6077          
005b6081          if (this->max_stamina != 0)
005b608b              return (result + 0x28);
005b606e      }
005b606e      
005b6186      return result;
005b6060  }

005b6189                             90 90 90 90 90 90 90                                                           .......

005b6190  int32_t __thiscall CreatureAppraisalProfile::UnPack(class CreatureAppraisalProfile* this, void** arg2, uint32_t arg3)

005b6190  {
005b6198      int32_t eax = 0xc;
005b6198      
005b619d      if (this->enchantment_bitfield != 0)
005b619f          eax = 0x10;
005b619f      
005b61a7      if (this->max_stamina != 0)
005b61a9          eax += 0x28;
005b61a9      
005b61b0      if (arg3 < eax)
005b61b5          return 0;
005b61b5      
005b61bf      void* edi = *(uint32_t*)arg2;
005b61c1      char ebx = ((int8_t)*(uint32_t*)edi);
005b61c6      *(uint32_t*)arg2 = ((char*)edi + 4);
005b61ca      this->health = *(uint32_t*)((char*)edi + 4);
005b61cf      void* edx_3 = (*(uint32_t*)arg2 + 4);
005b61d2      *(uint32_t*)arg2 = edx_3;
005b61d6      this->max_health = *(uint32_t*)edx_3;
005b61db      void* esi_1 = (*(uint32_t*)arg2 + 4);
005b61e1      *(uint32_t*)arg2 = esi_1;
005b61e1      
005b61e3      if ((ebx & 8) == 0)
005b61e3      {
005b6269          this->strength = 0;
005b626c          this->endurance = 0;
005b626f          this->quickness = 0;
005b6272          this->coordination = 0;
005b6275          this->focus = 0;
005b6278          this->self = 0;
005b627b          this->stamina = 0;
005b627e          this->mana = 0;
005b6281          this->max_stamina = 0;
005b6284          this->max_mana = 0;
005b61e3      }
005b61e3      else
005b61e3      {
005b61eb          this->strength = *(uint32_t*)esi_1;
005b61f0          void* esi_3 = (*(uint32_t*)arg2 + 4);
005b61f3          *(uint32_t*)arg2 = esi_3;
005b61f9          this->endurance = *(uint32_t*)esi_3;
005b61fe          void* edx_9 = (*(uint32_t*)arg2 + 4);
005b6201          *(uint32_t*)arg2 = edx_9;
005b6205          this->quickness = *(uint32_t*)edx_9;
005b620a          void* esi_5 = (*(uint32_t*)arg2 + 4);
005b620d          *(uint32_t*)arg2 = esi_5;
005b6213          this->coordination = *(uint32_t*)esi_5;
005b6218          void* edx_14 = (*(uint32_t*)arg2 + 4);
005b621b          *(uint32_t*)arg2 = edx_14;
005b621f          this->focus = *(uint32_t*)edx_14;
005b6224          void* esi_7 = (*(uint32_t*)arg2 + 4);
005b6227          *(uint32_t*)arg2 = esi_7;
005b622d          this->self = *(uint32_t*)esi_7;
005b6232          void* edx_19 = (*(uint32_t*)arg2 + 4);
005b6235          *(uint32_t*)arg2 = edx_19;
005b6239          this->stamina = *(uint32_t*)edx_19;
005b623e          void* esi_9 = (*(uint32_t*)arg2 + 4);
005b6241          *(uint32_t*)arg2 = esi_9;
005b6247          this->mana = *(uint32_t*)esi_9;
005b624c          void* edx_24 = (*(uint32_t*)arg2 + 4);
005b624f          *(uint32_t*)arg2 = edx_24;
005b6253          this->max_stamina = *(uint32_t*)edx_24;
005b6258          void* esi_11 = (*(uint32_t*)arg2 + 4);
005b625b          *(uint32_t*)arg2 = esi_11;
005b6261          this->max_mana = *(uint32_t*)esi_11;
005b6264          *(uint32_t*)arg2 += 4;
005b61e3      }
005b61e3      
005b628a      if ((ebx & 1) == 0)
005b6298          this->enchantment_bitfield = 0;
005b628a      else
005b628a      {
005b6290          this->enchantment_bitfield = **(uint32_t**)arg2;
005b6293          *(uint32_t*)arg2 += 4;
005b628a      }
005b628a      
005b62a5      if (arg3 >= (*(uint32_t*)arg2 - edi))
005b62bb          return 1;
005b62bb      
005b62a7      *(uint32_t*)arg2 = edi;
005b62af      return 0;
005b6190  }

005b62be                                                                                            90 90                                ..

005b62c0  void __fastcall WeaponProfile::WeaponProfile(class WeaponProfile* this)

005b62c0  {
005b62c9      this->vtable = 0x7e6cdc;
005b62cf      this->damage_type = UNDEF_DAMAGE_TYPE;
005b62d2      this->weapon_skill = 0;
005b62d5      this->weapon_time = 0;
005b62d8      this->weapon_damage = 0;
005b62db      this->damage_variance = 0f;
005b62de      *(uint32_t*)((char*)this->damage_variance)[4] = 0x3fd00000;
005b62e5      this->damage_mod = 0f;
005b62e8      *(uint32_t*)((char*)this->damage_mod)[4] = 0x3ff00000;
005b62eb      __builtin_memset(&this->weapon_length, 0, 0x14);
005b62fa      *(uint32_t*)((char*)this->weapon_offense)[4] = 0x3ff00000;
005b62fd      this->max_velocity_estimated = 0;
005b62c0  }

005b6301     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005b6310  uint32_t __thiscall WeaponProfile::Pack(class WeaponProfile* this, void** arg2, uint32_t arg3)

005b6310  {
005b6319      if (arg3 >= 0x3c)
005b6319      {
005b6325          **(uint32_t**)arg2 = this->damage_type;
005b6329          void* edx_3 = (*(uint32_t*)arg2 + 4);
005b632c          *(uint32_t*)arg2 = edx_3;
005b6331          *(uint32_t*)edx_3 = this->weapon_time;
005b6335          void* esi_4 = (*(uint32_t*)arg2 + 4);
005b6338          *(uint32_t*)arg2 = esi_4;
005b633f          *(uint32_t*)esi_4 = this->weapon_skill;
005b6343          void* edx_6 = (*(uint32_t*)arg2 + 4);
005b6346          *(uint32_t*)arg2 = edx_6;
005b634b          *(uint32_t*)edx_6 = this->weapon_damage;
005b634f          void* esi_8 = (*(uint32_t*)arg2 + 4);
005b6352          *(uint32_t*)arg2 = esi_8;
005b6359          *(uint64_t*)esi_8 = ((double)((long double)this->damage_variance));
005b635d          void* edx_9 = (*(uint32_t*)arg2 + 8);
005b6360          *(uint32_t*)arg2 = edx_9;
005b6365          *(uint64_t*)edx_9 = ((double)((long double)this->damage_mod));
005b6369          void* esi_10 = (*(uint32_t*)arg2 + 8);
005b636c          *(uint32_t*)arg2 = esi_10;
005b6373          *(uint64_t*)esi_10 = ((double)((long double)this->weapon_length));
005b6377          void* edx_12 = (*(uint32_t*)arg2 + 8);
005b637a          *(uint32_t*)arg2 = edx_12;
005b637f          *(uint64_t*)edx_12 = ((double)((long double)this->max_velocity));
005b6383          void* esi_12 = (*(uint32_t*)arg2 + 8);
005b6386          *(uint32_t*)arg2 = esi_12;
005b638d          *(uint64_t*)esi_12 = ((double)((long double)this->weapon_offense));
005b6391          void* edx_15 = (*(uint32_t*)arg2 + 8);
005b6394          *(uint32_t*)arg2 = edx_15;
005b6399          *(uint32_t*)edx_15 = this->max_velocity_estimated;
005b639b          *(uint32_t*)arg2 += 4;
005b6319      }
005b6319      
005b63a5      PackObj::ALIGN_PTR(arg2, &arg3);
005b63b2      return 0x3c;
005b6310  }

005b63b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005b63c0  int32_t __thiscall WeaponProfile::UnPack(class WeaponProfile* this, void** arg2, uint32_t arg3)

005b63c0  {
005b63c5      if (arg3 < 0x3c)
005b63c9          return 0;
005b63c9      
005b63d4      this->damage_type = **(uint32_t**)arg2;
005b63d9      void* edx_3 = (*(uint32_t*)arg2 + 4);
005b63dc      *(uint32_t*)arg2 = edx_3;
005b63e0      this->weapon_time = *(uint32_t*)edx_3;
005b63e6      void* esi_1 = (*(uint32_t*)arg2 + 4);
005b63e9      *(uint32_t*)arg2 = esi_1;
005b63ef      this->weapon_skill = *(uint32_t*)esi_1;
005b63f4      void* edx_8 = (*(uint32_t*)arg2 + 4);
005b63f7      *(uint32_t*)arg2 = edx_8;
005b63fb      this->weapon_damage = *(uint32_t*)edx_8;
005b6400      void* esi_3 = (*(uint32_t*)arg2 + 4);
005b6403      *(uint32_t*)arg2 = esi_3;
005b6409      this->damage_variance = *(uint32_t*)esi_3;
005b640f      *(uint32_t*)((char*)this->damage_variance)[4] = *(uint32_t*)((char*)esi_3 + 4);
005b6414      void* edx_13 = (*(uint32_t*)arg2 + 8);
005b6417      *(uint32_t*)arg2 = edx_13;
005b641b      this->damage_mod = *(uint32_t*)edx_13;
005b6421      *(uint32_t*)((char*)this->damage_mod)[4] = *(uint32_t*)((char*)edx_13 + 4);
005b6426      void* esi_7 = (*(uint32_t*)arg2 + 8);
005b6429      *(uint32_t*)arg2 = esi_7;
005b642f      this->weapon_length = *(uint32_t*)esi_7;
005b6435      *(uint32_t*)((char*)this->weapon_length)[4] = *(uint32_t*)((char*)esi_7 + 4);
005b643a      void* edx_18 = (*(uint32_t*)arg2 + 8);
005b643d      *(uint32_t*)arg2 = edx_18;
005b6441      this->max_velocity = *(uint32_t*)edx_18;
005b6447      *(uint32_t*)((char*)this->max_velocity)[4] = *(uint32_t*)((char*)edx_18 + 4);
005b644c      void* esi_11 = (*(uint32_t*)arg2 + 8);
005b644f      *(uint32_t*)arg2 = esi_11;
005b6455      this->weapon_offense = *(uint32_t*)esi_11;
005b645b      *(uint32_t*)((char*)this->weapon_offense)[4] = *(uint32_t*)((char*)esi_11 + 4);
005b6460      void* edx_23 = (*(uint32_t*)arg2 + 8);
005b6463      *(uint32_t*)arg2 = edx_23;
005b6467      this->max_velocity_estimated = *(uint32_t*)edx_23;
005b6475      *(uint32_t*)arg2 += 4;
005b6477      PackObj::ALIGN_PTR(arg2, &arg3);
005b6485      return 1;
005b63c0  }

005b6488                          90 90 90 90 90 90 90 90                                                          ........

005b6490  class GeneratorQueueNode& __thiscall GeneratorQueueNode::operator=(class GeneratorQueueNode* this, class GeneratorQueueNode const& arg2)

005b6490  {
005b6498      if (this != arg2)
005b6498      {
005b649d          this->slot = arg2->slot;
005b64a3          this->when = arg2->when;
005b64a9          *(uint32_t*)((char*)this->when)[4] = *(uint32_t*)((char*)arg2->when)[4];
005b6498      }
005b6498      
005b64ac      return this;
005b6490  }

005b64af                                               90                                                                 .

005b64b0  void __fastcall HookAppraisalProfile::Clear(class HookAppraisalProfile* this)

005b64b0  {
005b64b2      this->mBitfield = 0;
005b64b5      this->mValidLocations = 0;
005b64b8      this->mAmmoType = AMMO_NONE;
005b64b0  }

005b64bc                                                                                      90 90 90 90                              ....

005b64c0  int32_t __fastcall HookAppraisalProfile::IsInscribable(class HookAppraisalProfile const* this)

005b64c0  {
005b64c6      return (this->mBitfield & 1);
005b64c0  }

005b64c7                       90 90 90 90 90 90 90 90 90                                                         .........

005b64d0  int32_t __fastcall HookAppraisalProfile::IsHealer(class HookAppraisalProfile const* this)

005b64d0  {
005b64d6      return (this->mBitfield & 2);
005b64d0  }

005b64d7                                                                       90 90 90 90 90 90 90 90 90                         .........

005b64e0  int32_t __fastcall HookAppraisalProfile::IsLockpick(class HookAppraisalProfile const* this)

005b64e0  {
005b64e6      return (this->mBitfield & 8);
005b64e0  }

005b64e7                       90 90 90 90 90 90 90 90 90                                                         .........

005b64f0  uint32_t __thiscall HookAppraisalProfile::Pack(class HookAppraisalProfile* this, void** arg2, uint32_t arg3)

005b64f0  {
005b64f4      void* edx = *(uint32_t*)arg2;
005b64f4      
005b6500      if ((edx != 0 && arg3 >= 0xc))
005b6500      {
005b6505          *(uint32_t*)edx = this->mBitfield;
005b6509          void* esi_3 = (*(uint32_t*)arg2 + 4);
005b650c          *(uint32_t*)arg2 = esi_3;
005b6513          *(uint32_t*)esi_3 = this->mValidLocations;
005b6517          void* edx_3 = (*(uint32_t*)arg2 + 4);
005b651a          *(uint32_t*)arg2 = edx_3;
005b651f          *(uint32_t*)edx_3 = this->mAmmoType;
005b6521          *(uint32_t*)arg2 += 4;
005b6500      }
005b6500      
005b652a      return 0xc;
005b64f0  }

005b652d                                         90 90 90                                                               ...

005b6530  int32_t __thiscall AllegianceData::GetTitle(class AllegianceData const* this, class AC1Legacy::PStringBase<char>* arg2)

005b6530  {
005b6549      return AllegianceSystem::GetTitle(this->_rank, this->_hg, this->_gender, arg2);
005b6530  }

005b654c                                      90 90 90 90                                                              ....

005b6550  int32_t __fastcall AllegianceData::IsLoggedIn(class AllegianceData const* this)

005b6550  {
005b6556      return (this->_bitfield & 1);
005b6550  }

005b6557                                                                       90 90 90 90 90 90 90 90 90                         .........

005b6560  void __thiscall AllegianceData::SetMayPassupExperience(class AllegianceData* this, int32_t arg2)

005b6560  {
005b6566      uint32_t _bitfield = this->_bitfield;
005b6566      
005b6569      if (arg2 != 0)
005b6569      {
005b656e          this->_bitfield = (_bitfield | 0x10);
005b6571          return;
005b6569      }
005b6569      
005b6577      this->_bitfield = (_bitfield & 0xffffffef);
005b6560  }

005b657d                                                                                         90 90 90                               ...

005b6580  void __fastcall AllegianceData::AllegianceData(class AllegianceData* this)

005b6580  {
005b6584      this->vtable = 0x7e6cf0;
005b658c      this->_id = 0;
005b658f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b659a      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b659d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b65a3      __builtin_memset(&this->_gender, 0, 0x2c);
005b6580  }

005b65c9                             90 90 90 90 90 90 90                                                           .......

005b65d0  void __fastcall AllegianceData::~AllegianceData(class AllegianceData* this)

005b65d0  {
005b65d4      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
005b65db      this->vtable = 0x7e6cf0;
005b65db      
005b65ed      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005b65ef          m_buffer->vtable->__vecDelDtor(1);
005b65ef      
005b65f8      this->vtable = 0x79285c;
005b65d0  }


005b6600  void* __thiscall AllegianceData::`scalar deleting destructor'(class AllegianceData* this, uint32_t arg2)

005b6600  {
005b6604      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
005b660b      this->vtable = 0x7e6cf0;
005b660b      
005b661d      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005b661f          m_buffer->vtable->__vecDelDtor(1);
005b661f      
005b662c      this->vtable = 0x79285c;
005b662c      
005b6632      if ((arg2 & 1) != 0)
005b6635          operator delete(this);
005b6635      
005b6641      return this;
005b6600  }

005b6644              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005b6650  class AllegianceData& __thiscall AllegianceData::operator=(class AllegianceData* this, class AllegianceData const& arg2)

005b6650  {
005b665a      if (this != arg2)
005b665a      {
005b665f          this->_id = arg2->_id;
005b6666          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_name.m_buffer;
005b6666          
005b666b          if (m_buffer_1 != arg2->_name.m_buffer)
005b666b          {
005b667d              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005b667f                  m_buffer_1->vtable->__vecDelDtor(1);
005b667f              
005b6687              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
005b668a              this->_name.m_buffer = m_buffer;
005b6691              InterlockedIncrement(&m_buffer->m_cRef);
005b666b          }
005b666b          
005b669a          this->_cp_cached = arg2->_cp_cached;
005b66a0          this->_cp_tithed = arg2->_cp_tithed;
005b66a6          this->_gender = arg2->_gender;
005b66ac          this->_hg = arg2->_hg;
005b66b2          this->_rank = arg2->_rank;
005b66b8          this->_level = arg2->_level;
005b66be          this->_bitfield = arg2->_bitfield;
005b66c4          this->_loyalty = arg2->_loyalty;
005b66ca          this->_leadership = arg2->_leadership;
005b66d0          this->_time_online = arg2->_time_online;
005b66d6          this->_allegiance_age = arg2->_allegiance_age;
005b665a      }
005b665a      
005b66de      return this;
005b6650  }

005b66e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005b66f0  uint32_t __fastcall AllegianceData::GetPackSize(class AllegianceData* this)

005b66f0  {
005b66f0      class AllegianceData* this_1 = this;
005b66fb      this_1 = nullptr;
005b670c      return (AC1Legacy::PStringBase<char>::Pack(&this->_name, &this_1, 0) + 0x24);
005b66f0  }

005b670d                                         90 90 90                                                               ...

005b6710  uint32_t __thiscall AllegianceData::Pack(class AllegianceData* this, void** arg2, uint32_t arg3)

005b6710  {
005b6717      int32_t result = this->vtable->GetPackSize();
005b6728      this->_bitfield |= 0xc;
005b6728      
005b672b      if (arg3 >= result)
005b672b      {
005b673a          **(uint32_t**)arg2 = this->_id;
005b673e          void* edx_3 = (*(uint32_t*)arg2 + 4);
005b6741          *(uint32_t*)arg2 = edx_3;
005b6748          *(uint32_t*)edx_3 = this->_cp_cached;
005b674c          void* ecx_5 = (*(uint32_t*)arg2 + 4);
005b674f          *(uint32_t*)arg2 = ecx_5;
005b6754          *(uint32_t*)ecx_5 = this->_cp_tithed;
005b6758          void* edx_7 = (*(uint32_t*)arg2 + 4);
005b675b          *(uint32_t*)arg2 = edx_7;
005b6762          *(uint32_t*)edx_7 = this->_bitfield;
005b6766          char* ecx_8 = (*(uint32_t*)arg2 + 4);
005b6769          *(uint32_t*)arg2 = ecx_8;
005b676b          uint32_t edx_8;
005b676b          edx_8 = this->_gender;
005b676e          *(uint8_t*)ecx_8 = edx_8;
005b6772          void* edx_10 = (*(uint32_t*)arg2 + 1);
005b6773          *(uint32_t*)arg2 = edx_10;
005b6775          void* ecx_9 = edx_10;
005b6777          edx_10 = this->_hg;
005b677a          *(uint8_t*)ecx_9 = edx_10;
005b677e          int16_t* ecx_11 = (*(uint32_t*)arg2 + 1);
005b677f          *(uint32_t*)arg2 = ecx_11;
005b6781          edx_10 = this->_rank;
005b6785          *(uint16_t*)ecx_11 = edx_10;
005b678a          void* edx_12 = (*(uint32_t*)arg2 + 2);
005b678d          *(uint32_t*)arg2 = edx_12;
005b6794          *(uint32_t*)edx_12 = this->_level;
005b6798          int16_t* ecx_14 = (*(uint32_t*)arg2 + 4);
005b679b          *(uint32_t*)arg2 = ecx_14;
005b679d          uint32_t edx_13;
005b679d          edx_13 = this->_loyalty;
005b67a1          *(uint16_t*)ecx_14 = edx_13;
005b67a6          void* edx_15 = (*(uint32_t*)arg2 + 2);
005b67a9          *(uint32_t*)arg2 = edx_15;
005b67ab          int16_t* ecx_15 = edx_15;
005b67ad          edx_15 = this->_leadership;
005b67b1          *(uint16_t*)ecx_15 = edx_15;
005b67b6          void* ecx_17 = (*(uint32_t*)arg2 + 2);
005b67b9          *(uint32_t*)arg2 = ecx_17;
005b67be          *(uint32_t*)ecx_17 = this->_time_online;
005b67c2          void* edx_18 = (*(uint32_t*)arg2 + 4);
005b67c5          *(uint32_t*)arg2 = edx_18;
005b67cc          *(uint32_t*)edx_18 = this->_allegiance_age;
005b67d4          *(uint32_t*)arg2 += 4;
005b67da          AC1Legacy::PStringBase<char>::Pack(&this->_name, arg2, arg3);
005b672b      }
005b672b      
005b67e4      return result;
005b6710  }

005b67e7                       90 90 90 90 90 90 90 90 90                                                         .........

005b67f0  void __thiscall AllegianceData::AllegianceData(class AllegianceData* this, class AllegianceData const* arg2)

005b67f0  {
005b67f4      this->vtable = 0x7e6cf0;
005b67fc      this->_id = 0;
005b67ff      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b680a      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b680d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b681a      __builtin_memset(&this->_gender, 0, 0x2c);
005b683b      AllegianceData::operator=(this, arg2);
005b67f0  }

005b6847                       90 90 90 90 90 90 90 90 90                                                         .........

005b6850  int32_t __thiscall AllegianceData::UnPack(class AllegianceData* this, void** arg2, uint32_t arg3)

005b6850  {
005b685b      if (arg3 < 0x20)
005b6861          return 0;
005b6861      
005b686d      this->_id = **(uint32_t**)arg2;
005b6872      void* edx_1 = (*(uint32_t*)arg2 + 4);
005b6875      *(uint32_t*)arg2 = edx_1;
005b687b      this->_cp_cached = *(uint32_t*)edx_1;
005b6880      void* ecx_2 = (*(uint32_t*)arg2 + 4);
005b6883      *(uint32_t*)arg2 = ecx_2;
005b6889      this->_cp_tithed = *(uint32_t*)ecx_2;
005b688e      void* eax_6 = (*(uint32_t*)arg2 + 4);
005b6891      *(uint32_t*)arg2 = eax_6;
005b6895      this->_bitfield = *(uint32_t*)eax_6;
005b689a      void* edx_4 = (*(uint32_t*)arg2 + 4);
005b689d      *(uint32_t*)arg2 = edx_4;
005b68a1      uint32_t ecx_3;
005b68a1      ecx_3 = *(uint8_t*)edx_4;
005b68a4      *(uint32_t*)arg2 = ((char*)edx_4 + 1);
005b68a9      this->_gender = ((uint32_t)ecx_3);
005b68ac      void* eax_9 = *(uint32_t*)arg2;
005b68ae      ecx_3 = *(uint8_t*)eax_9;
005b68b1      *(uint32_t*)arg2 = ((char*)eax_9 + 1);
005b68b6      this->_hg = ((uint32_t)ecx_3);
005b68b9      void* eax_12 = *(uint32_t*)arg2;
005b68bb      ecx_3 = *(uint16_t*)eax_12;
005b68c1      *(uint32_t*)arg2 = ((char*)eax_12 + 2);
005b68c3      uint32_t _bitfield = this->_bitfield;
005b68cb      this->_rank = ((uint32_t)ecx_3);
005b68cb      
005b68ce      if ((_bitfield & 8) == 0)
005b68df          this->_bitfield = (_bitfield | 0x10);
005b68ce      else
005b68ce      {
005b68d4          this->_level = **(uint32_t**)arg2;
005b68d7          *(uint32_t*)arg2 += 4;
005b68ce      }
005b68ce      
005b68e2      void* eax_16 = *(uint32_t*)arg2;
005b68e4      uint32_t ecx_4;
005b68e4      ecx_4 = *(uint16_t*)eax_16;
005b68ea      *(uint32_t*)arg2 = ((char*)eax_16 + 2);
005b68ef      this->_loyalty = ((uint32_t)ecx_4);
005b68f2      void* eax_18 = *(uint32_t*)arg2;
005b68f4      uint32_t ecx_5;
005b68f4      ecx_5 = *(uint16_t*)eax_18;
005b68fa      *(uint32_t*)arg2 = ((char*)eax_18 + 2);
005b68fc      void* eax_19;
005b68fc      eax_19 = this->_bitfield;
005b6902      this->_leadership = ((uint32_t)ecx_5);
005b6907      void* eax_20 = *(uint32_t*)arg2;
005b6907      
005b6909      if ((eax_19 & 4) != 0)
005b6909      {
005b6925          this->_time_online = *(uint32_t*)eax_20;
005b692a          void* ecx_8 = (*(uint32_t*)arg2 + 4);
005b692d          *(uint32_t*)arg2 = ecx_8;
005b6933          this->_allegiance_age = *(uint32_t*)ecx_8;
005b6936          *(uint32_t*)arg2 += 4;
005b6909      }
005b6909      else
005b6909      {
005b690b          *(uint64_t*)eax_20;
005b6910          *(uint32_t*)arg2 = ((char*)eax_20 + 8);
005b6917          this->_time_online = _ftol2();
005b691a          this->_allegiance_age = 0;
005b6909      }
005b6909      
005b693e      AC1Legacy::PStringBase<char>::UnPack(&this->_name, arg2, arg3);
005b694b      return 1;
005b6850  }

005b694e                                            90 90                                                                ..

005b6950  int32_t __thiscall AllegianceData::GetFullName(class AllegianceData const* this, class AC1Legacy::PStringBase<char>* arg2)

005b6950  {
005b6951      class AC1Legacy::PStringBase<char>* ebx = arg2;
005b6951      
005b6970      if (AllegianceSystem::GetTitle(this->_rank, this->_hg, this->_gender, ebx) == 0)
005b6970      {
005b6972          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = ebx->m_buffer;
005b6972          
005b6977          if (m_buffer_1 != this->_name.m_buffer)
005b6977          {
005b6989              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005b698b                  m_buffer_1->vtable->__vecDelDtor(1);
005b698b              
005b6993              class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->_name.m_buffer;
005b6996              ebx->m_buffer = m_buffer_2;
005b699c              InterlockedIncrement(&m_buffer_2->m_cRef);
005b6977          }
005b6977          
005b69a7          return 0;
005b6970      }
005b6970      
005b69b3      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794098);
005b69b8      class AC1Legacy::PStringBase<char>* esi = arg2;
005b69bc      int32_t eax_5 = *(int32_t*)((char*)esi + 8);
005b69bc      
005b69ca      if ((eax_5 != 1 && esi != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b69d4          AC1Legacy::PStringBase<char>::append_n_chars(ebx, &esi[5], (eax_5 - 1));
005b69d4      
005b69e5      if (InterlockedDecrement(&esi[1]) == 0)
005b69e7          esi->m_buffer->vtable(1);
005b69e7      
005b69ef      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
005b69f2      uint32_t m_len = m_buffer->m_len;
005b69f2      
005b6a00      if ((m_len != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
005b6a0a          AC1Legacy::PStringBase<char>::append_n_chars(ebx, &m_buffer->m_data, (m_len - 1));
005b6a0a      
005b6a17      return 1;
005b6950  }

005b6a1a                                                                                90 90 90 90 90 90                            ......

005b6a20  class AllegianceProfile& __thiscall AllegianceProfile::operator=(class AllegianceProfile* this, class AllegianceProfile const& arg2)

005b6a20  {
005b6a29      if (this != arg2)
005b6a29      {
005b6a31          this->_total_members = arg2->_total_members;
005b6a44          this->_total_vassals = arg2->_total_vassals;
005b6a4a          AllegianceHierarchy::operator=(&this->_allegiance, &arg2->_allegiance);
005b6a29      }
005b6a29      
005b6a52      return this;
005b6a20  }

005b6a55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005b6a60  void __fastcall AllegianceProfile::Clear(class AllegianceProfile* this)

005b6a60  {
005b6a62      this->_total_members = 0;
005b6a68      this->_total_vassals = 0;
005b6a71      /* tailcall */
005b6a71      return AllegianceHierarchy::Clear(&this->_allegiance);
005b6a60  }

005b6a76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b6a80  uint32_t __thiscall AllegianceProfile::GetMonarch(class AllegianceProfile const* this, class AllegianceData* arg2)

005b6a80  {
005b6a87      uint32_t result = AllegianceHierarchy::GetMonarchID(&this->_allegiance);
005b6a87      
005b6a90      if (result != 0)
005b6a9a          AllegianceHierarchy::LookUp(&this->_allegiance, result, arg2);
005b6a9a      
005b6aa3      return result;
005b6a80  }

005b6aa6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005b6ab0  uint32_t __thiscall AllegianceProfile::GetPatron(class AllegianceProfile const* this, uint32_t arg2, class AllegianceData* arg3)

005b6ab0  {
005b6ab3      /* tailcall */
005b6ab3      return AllegianceHierarchy::GetPatron(&this->_allegiance, arg2, arg3);
005b6ab0  }

005b6ab8                                                                          90 90 90 90 90 90 90 90                          ........

005b6ac0  uint32_t __thiscall AllegianceProfile::GetFirstVassal(class AllegianceProfile const* this, uint32_t arg2, class AllegianceData* arg3)

005b6ac0  {
005b6ac3      /* tailcall */
005b6ac3      return AllegianceHierarchy::GetFirstVassal(&this->_allegiance, arg2, arg3);
005b6ac0  }

005b6ac8                          90 90 90 90 90 90 90 90                                                          ........

005b6ad0  uint32_t __thiscall AllegianceProfile::GetNextVassal(class AllegianceProfile const* this, uint32_t arg2, class AllegianceData* arg3)

005b6ad0  {
005b6ad3      /* tailcall */
005b6ad3      return AllegianceHierarchy::GetNextVassal(&this->_allegiance, arg2, arg3);
005b6ad0  }

005b6ad8                                                                          90 90 90 90 90 90 90 90                          ........

005b6ae0  int32_t __thiscall AllegianceProfile::GetData(class AllegianceProfile const* this, uint32_t arg2, class AllegianceData* arg3)

005b6ae0  {
005b6ae3      /* tailcall */
005b6ae3      return AllegianceHierarchy::LookUp(&this->_allegiance, arg2, arg3);
005b6ae0  }

005b6ae8                          90 90 90 90 90 90 90 90                                                          ........

005b6af0  uint32_t __fastcall AllegianceProfile::GetPackSize(class AllegianceProfile* this)

005b6af0  {
005b6af0      class AllegianceProfile* this_1 = this;
005b6af1      struct AllegianceHierarchy::VTable* vtable = this->_allegiance.vtable;
005b6afe      this_1 = nullptr;
005b6b0d      return (vtable->Pack(&this_1, 0) + 8);
005b6af0  }

005b6b0e                                            90 90                                                                ..

005b6b10  void __fastcall AllegianceProfile::AllegianceProfile(class AllegianceProfile* this)

005b6b10  {
005b6b16      this->vtable = 0x7e6d3c;
005b6b1c      AllegianceHierarchy::AllegianceHierarchy(&this->_allegiance);
005b6b23      this->_total_members = 0;
005b6b29      this->_total_vassals = 0;
005b6b10  }

005b6b33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005b6b40  uint32_t __thiscall AllegianceProfile::Pack(class AllegianceProfile* this, void** arg2, uint32_t arg3)

005b6b40  {
005b6b46      int32_t result = this->vtable->GetPackSize();
005b6b46      
005b6b51      if (arg3 >= result)
005b6b51      {
005b6b60          **(uint32_t**)arg2 = this->_total_members;
005b6b64          void* ebx_3 = (*(uint32_t*)arg2 + 4);
005b6b67          *(uint32_t*)arg2 = ebx_3;
005b6b71          *(uint32_t*)ebx_3 = this->_total_vassals;
005b6b73          *(uint32_t*)arg2 += 4;
005b6b76          this->_allegiance.vtable->Pack(arg2, arg3);
005b6b51      }
005b6b51      
005b6b85      return result;
005b6b40  }

005b6b88                          90 90 90 90 90 90 90 90                                                          ........

005b6b90  int32_t __thiscall AllegianceProfile::UnPack(class AllegianceProfile* this, void** arg2, uint32_t arg3)

005b6b90  {
005b6ba8      if (arg3 < (this->_allegiance.vtable->GetMinPackSize() + 8))
005b6bae          return 0;
005b6bae      
005b6bb9      this->_total_members = **(uint32_t**)arg2;
005b6bc1      void* ecx_4 = (*(uint32_t*)arg2 + 4);
005b6bc4      *(uint32_t*)arg2 = ecx_4;
005b6bc8      this->_total_vassals = *(uint32_t*)ecx_4;
005b6bd4      *(uint32_t*)arg2 += 4;
005b6be0      return this->_allegiance.vtable->UnPack(arg2, arg3);
005b6b90  }

005b6be3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005b6bf0  void* __thiscall AllegianceProfile::`scalar deleting destructor'(class AllegianceProfile* this, uint32_t arg2)

005b6bf0  {
005b6bf6      AllegianceHierarchy::~AllegianceHierarchy(&this->_allegiance);
005b6c00      this->vtable = 0x79285c;
005b6c00      
005b6c06      if ((arg2 & 1) != 0)
005b6c09          operator delete(this);
005b6c09      
005b6c14      return this;
005b6bf0  }

005b6c17                                                                       90 90 90 90 90 90 90 90 90                         .........

005b6c20  void __thiscall AllegianceHierarchy::Clear(class AllegianceHierarchy* this, class AllegianceNode** arg2)

005b6c20  {
005b6c21      class AllegianceNode** ebx = arg2;
005b6c25      class AllegianceNode* eax = *(uint32_t*)ebx;
005b6c25      
005b6c2c      if (eax != 0)
005b6c2c      {
005b6c2e          class AllegianceNode* _vassal = eax->_vassal;
005b6c33          arg2 = _vassal;
005b6c33          
005b6c37          if (_vassal != 0)
005b6c37          {
005b6c57              class AllegianceNode* _peer;
005b6c57              
005b6c57              do
005b6c57              {
005b6c40                  _peer = _vassal->_peer;
005b6c4a                  AllegianceHierarchy::Clear(this, &arg2);
005b6c51                  _vassal = _peer;
005b6c53                  arg2 = _vassal;
005b6c57              } while (_peer != 0);
005b6c37          }
005b6c37          
005b6c5a          class AllegianceNode* ecx_1 = *(uint32_t*)ebx;
005b6c5a          
005b6c5e          if (ecx_1 != 0)
005b6c60              ecx_1->vtable->__vecDelDtor(1);
005b6c60          
005b6c66          *(uint32_t*)ebx = nullptr;
005b6c2c      }
005b6c20  }

005b6c71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005b6c80  uint32_t __thiscall AllegianceHierarchy::GetNodePackSize(class AllegianceHierarchy* this, class AllegianceNode* arg2)

005b6c80  {
005b6c81      class AllegianceNode* ebx = arg2;
005b6c81      
005b6c8a      if (ebx == 0)
005b6c90          return 0;
005b6c90      
005b6c93      struct AllegianceNode::VTable* vtable = ebx->vtable;
005b6c96      class AllegianceNode* _patron = ebx->_patron;
005b6ca3      arg2 = nullptr;
005b6cae      int32_t esi = -(_patron);
005b6cb7      int32_t result = (vtable->Pack(&arg2, 0) + ((esi - esi) & 4));
005b6cb9      class AllegianceNode* i = ebx->_vassal;
005b6cb9      
005b6cbe      while (i != 0)
005b6cbe      {
005b6cc3          uint32_t eax_2 = AllegianceHierarchy::GetNodePackSize(this, i);
005b6cc8          i = i->_peer;
005b6ccb          result += eax_2;
005b6cbe      }
005b6cbe      
005b6cd7      return result;
005b6c80  }

005b6cda                                                                                90 90 90 90 90 90                            ......

005b6ce0  class AllegianceNode* __thiscall AllegianceHierarchy::Search(class AllegianceHierarchy* this, uint32_t const arg2, class AllegianceNode* arg3)

005b6ce0  {
005b6ce9      if (arg3 == 0)
005b6cec          return arg3;
005b6cec      
005b6cfa      if (arg2 == arg3->_data._id)
005b6d1c          return arg3;
005b6d1c      
005b6cfc      class AllegianceNode* esi_1 = arg3->_vassal;
005b6cfc      
005b6d01      if (esi_1 == 0)
005b6d17          return nullptr;
005b6d17      
005b6d07      while (true)
005b6d07      {
005b6d07          class AllegianceNode* eax = AllegianceHierarchy::Search(this, arg2, esi_1);
005b6d07          
005b6d0e          if (eax != 0)
005b6d1c              return eax;
005b6d1c          
005b6d10          esi_1 = esi_1->_peer;
005b6d10          
005b6d15          if (esi_1 == 0)
005b6d17              return nullptr;
005b6d07      }
005b6ce0  }

005b6d1f                                                                                               90                                 .

005b6d20  uint32_t __fastcall AllegianceHierarchy::GetMonarchID(class AllegianceHierarchy const* this)

005b6d20  {
005b6d20      class AllegianceNode* m_pMonarch = this->m_pMonarch;
005b6d20      
005b6d25      if (m_pMonarch == 0)
005b6d2d          return 0;
005b6d2d      
005b6d2a      return m_pMonarch->_data._id;
005b6d20  }

005b6d2e                                            90 90                                                                ..

005b6d30  uint32_t __thiscall AllegianceHierarchy::PackNode(class AllegianceHierarchy* this, class AllegianceNode* arg2, void** arg3, uint32_t arg4)

005b6d30  {
005b6d30      class AllegianceHierarchy* this_1 = this;
005b6d30      
005b6d3c      if (arg2 == 0)
005b6d42          return 0;
005b6d42      
005b6d45      class AllegianceNode* _patron = arg2->_patron;
005b6d51      int32_t ebx;
005b6d51      
005b6d51      if (_patron == 0)
005b6d64          ebx = 0;
005b6d51      else
005b6d51      {
005b6d58          **(uint32_t**)arg3 = _patron->_data._id;
005b6d5a          *(uint32_t*)arg3 += 4;
005b6d5d          ebx = 4;
005b6d51      }
005b6d51      
005b6d70      int32_t eax_2 = arg2->vtable->Pack(arg3, arg4);
005b6d73      class AllegianceNode* i = arg2->_vassal;
005b6d76      int32_t result = (ebx + eax_2);
005b6d76      
005b6d7a      while (i != 0)
005b6d7a      {
005b6d87          uint32_t eax_3 = AllegianceHierarchy::PackNode(this, i, arg3, arg4);
005b6d8c          i = i->_peer;
005b6d8f          result += eax_3;
005b6d7a      }
005b6d7a      
005b6d9c      return result;
005b6d30  }

005b6d9f                                                                                               90                                 .

005b6da0  int32_t __thiscall AllegianceHierarchy::LookUp(class AllegianceHierarchy const* this, uint32_t const arg2, class AllegianceData* arg3)

005b6da0  {
005b6da6      if (arg2 != 0)
005b6da6      {
005b6dad          class AllegianceNode* eax = AllegianceHierarchy::Search(this, arg2, this->m_pMonarch);
005b6dad          
005b6db4          if (eax != 0)
005b6db4          {
005b6dbe              AllegianceData::operator=(arg3, &eax->_data);
005b6dc8              return 1;
005b6db4          }
005b6da6      }
005b6da6      
005b6dcd      return 0;
005b6da0  }


005b6dd0  uint32_t __thiscall AllegianceHierarchy::GetPatron(class AllegianceHierarchy const* this, uint32_t const arg2, class AllegianceData* arg3)

005b6dd0  {
005b6dd6      if (arg2 != 0)
005b6dd6      {
005b6ddd          class AllegianceNode* eax = AllegianceHierarchy::Search(this, arg2, this->m_pMonarch);
005b6ddd          
005b6de4          if (eax != 0)
005b6de4          {
005b6de6              class AllegianceNode* _patron = eax->_patron;
005b6de6              
005b6deb              if (_patron != 0)
005b6deb              {
005b6df8                  AllegianceData::operator=(arg3, &_patron->_data);
005b6e01                  return arg3->_id;
005b6deb              }
005b6de4          }
005b6dd6      }
005b6dd6      
005b6e06      return 0;
005b6dd0  }

005b6e09                             90 90 90 90 90 90 90                                                           .......

005b6e10  uint32_t __thiscall AllegianceHierarchy::GetFirstVassal(class AllegianceHierarchy const* this, uint32_t arg2, class AllegianceData* arg3)

005b6e10  {
005b6e16      if (arg2 != 0)
005b6e16      {
005b6e1d          class AllegianceNode* eax = AllegianceHierarchy::Search(this, arg2, this->m_pMonarch);
005b6e1d          
005b6e24          if (eax != 0)
005b6e24          {
005b6e26              class AllegianceNode* _vassal = eax->_vassal;
005b6e26              
005b6e2b              if (_vassal != 0)
005b6e2b              {
005b6e38                  AllegianceData::operator=(arg3, &_vassal->_data);
005b6e41                  return arg3->_id;
005b6e2b              }
005b6e24          }
005b6e16      }
005b6e16      
005b6e46      return 0;
005b6e10  }

005b6e49                             90 90 90 90 90 90 90                                                           .......

005b6e50  uint32_t __thiscall AllegianceHierarchy::GetNextVassal(class AllegianceHierarchy const* this, uint32_t arg2, class AllegianceData* arg3)

005b6e50  {
005b6e56      if (arg2 != 0)
005b6e56      {
005b6e5d          class AllegianceNode* eax = AllegianceHierarchy::Search(this, arg2, this->m_pMonarch);
005b6e5d          
005b6e64          if (eax != 0)
005b6e64          {
005b6e66              class AllegianceNode* _peer = eax->_peer;
005b6e66              
005b6e6b              if (_peer != 0)
005b6e6b              {
005b6e78                  AllegianceData::operator=(arg3, &_peer->_data);
005b6e81                  return arg3->_id;
005b6e6b              }
005b6e64          }
005b6e56      }
005b6e56      
005b6e86      return 0;
005b6e50  }

005b6e89                             90 90 90 90 90 90 90                                                           .......

005b6e90  int32_t __thiscall AllegianceHierarchy::Add(class AllegianceHierarchy* this, uint32_t const arg2, class AllegianceData const* arg3)

005b6e90  {
005b6e96      uint32_t _id = arg3->_id;
005b6e96      
005b6e9e      if (_id != 0)
005b6e9e      {
005b6ea0          class AllegianceNode* m_pMonarch = this->m_pMonarch;
005b6ea0          
005b6ea5          if (m_pMonarch != 0)
005b6ea5          {
005b6ee5              class AllegianceNode* esi;
005b6ee5              
005b6ee5              if (arg2 != 0)
005b6ee5              {
005b6eef                  class AllegianceNode* eax_6;
005b6eef                  eax_6 = AllegianceHierarchy::Search(this, arg2, m_pMonarch);
005b6ef4                  esi = eax_6;
005b6ee5              }
005b6ee5              else
005b6ee7                  esi = nullptr;
005b6ee7              
005b6efd              if (((esi != 0 && esi->_data._id != _id) && AllegianceHierarchy::Search(this, _id, m_pMonarch) == 0))
005b6efd              {
005b6f15                  class AllegianceNode* _vassal = esi->_vassal;
005b6f1a                  class AllegianceNode* eax_9 = operator new(0x48);
005b6f1a                  
005b6f24                  if (eax_9 != 0)
005b6f24                  {
005b6f29                      class AllegianceNode* eax_10 = AllegianceNode::AllegianceNode(eax_9, arg3);
005b6f29                      
005b6f30                      if (eax_10 != 0)
005b6f30                      {
005b6f32                          eax_10->_patron = esi;
005b6f35                          eax_10->_peer = _vassal;
005b6f38                          esi->_vassal = eax_10;
005b6f40                          this->m_total += 1;
005b6f4b                          return 1;
005b6f30                      }
005b6f24                  }
005b6efd              }
005b6efd              
005b6f12              return 0;
005b6ea5          }
005b6ea5          
005b6ea9          void* eax_1 = operator new(0x48);
005b6eb3          class AllegianceNode* eax_2;
005b6eb3          
005b6eb3          if (eax_1 == 0)
005b6ebf              eax_2 = nullptr;
005b6eb3          else
005b6eb8              eax_2 = AllegianceNode::AllegianceNode(eax_1, arg3);
005b6eb8          
005b6ec3          this->m_pMonarch = eax_2;
005b6ec3          
005b6ec6          if (eax_2 != 0)
005b6ec6          {
005b6ed0              this->m_total += 1;
005b6edb              return 1;
005b6ec6          }
005b6e9e      }
005b6e9e      
005b6ecd      return 0;
005b6e90  }

005b6f4e                                            90 90                                                                ..

005b6f50  int32_t __thiscall AllegianceHierarchy::Copy(class AllegianceHierarchy* this, class AllegianceNode* arg2, int32_t arg3)

005b6f50  {
005b6f5a      if (arg2 == 0)
005b6f63          return 1;
005b6f63      
005b6f6d      int32_t result = 1;
005b6f6d      
005b6f72      if (arg3 != 0)
005b6f72      {
005b6f74          class AllegianceNode* _patron = arg2->_patron;
005b6f79          uint32_t _id;
005b6f79          
005b6f79          if (_patron == 0)
005b6f80              _id = 0;
005b6f79          else
005b6f7b              _id = _patron->_data._id;
005b6f7b          
005b6f8e          result = AllegianceHierarchy::Add(this, _id, &arg2->_data);
005b6f72      }
005b6f72      
005b6f90      class AllegianceNode* i = arg2->_vassal;
005b6f90      
005b6f95      while (i != 0)
005b6f95      {
005b6f9c          int32_t eax_3 = AllegianceHierarchy::Copy(this, i, 1);
005b6fa1          i = i->_peer;
005b6fa4          result &= eax_3;
005b6f95      }
005b6f95      
005b6faf      return result;
005b6f50  }

005b6fb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005b6fc0  uint32_t __fastcall AllegianceHierarchy::GetPackSize(class AllegianceHierarchy* this)

005b6fc0  {
005b6fc0      class AllegianceHierarchy* this_1 = this;
005b6fc7      int32_t eax_1 = this->vtable->GetMinPackSize();
005b6fd6      this_1 = nullptr;
005b7028      int32_t edi_4 = ((((eax_1 + AC1Legacy::PStringBase<char>::Pack(&this->m_motd, &this_1, 0)) + AC1Legacy::PStringBase<char>::Pack(&this->m_motdSetBy, &this_1, 0)) + this->m_AllegianceOfficers.vtable->Pack(&this_1, 0)) + this->m_OfficerTitles.vtable->Pack(&this_1, 0));
005b7030      int32_t edi_5 = (edi_4 + this->m_BindPoint.vtable->Pack(&this_1, 0));
005b703c      uint32_t eax_10 = AC1Legacy::PStringBase<char>::Pack(&this->m_AllegianceName, &this_1, 0);
005b7053      return (AllegianceHierarchy::GetNodePackSize(this, this->m_pMonarch) + (edi_5 + eax_10));
005b6fc0  }

005b7054                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b7060  uint32_t __thiscall AllegianceHierarchy::Pack(class AllegianceHierarchy* this, void** arg2, uint32_t arg3)

005b7060  {
005b7067      int32_t result = this->vtable->GetPackSize();
005b7067      
005b7072      if (arg3 >= result)
005b7072      {
005b708e          **(uint32_t**)arg2 = (((uint32_t)((int16_t)this->m_total)) | 0xb0000);
005b709c          *(uint32_t*)arg2 += 4;
005b7095          this->m_AllegianceOfficers.vtable->Pack(arg2, arg3);
005b70a4          this->m_OfficerTitles.vtable->Pack(arg2, arg3);
005b70ba          **(uint32_t**)arg2 = this->m_monarchBroadcastTime;
005b70be          void* eax_6 = (*(uint32_t*)arg2 + 4);
005b70c1          *(uint32_t*)arg2 = eax_6;
005b70c6          *(uint32_t*)eax_6 = this->m_monarchBroadcastsToday;
005b70ca          void* edx_5 = (*(uint32_t*)arg2 + 4);
005b70cd          *(uint32_t*)arg2 = edx_5;
005b70d4          *(uint32_t*)edx_5 = this->m_spokesBroadcastTime;
005b70d8          void* ecx_8 = (*(uint32_t*)arg2 + 4);
005b70db          *(uint32_t*)arg2 = ecx_8;
005b70e2          *(uint32_t*)ecx_8 = this->m_spokesBroadcastsToday;
005b70ee          *(uint32_t*)arg2 += 4;
005b70f0          AC1Legacy::PStringBase<char>::Pack(&this->m_motd, arg2, arg3);
005b70fa          AC1Legacy::PStringBase<char>::Pack(&this->m_motdSetBy, arg2, arg3);
005b7104          **(uint32_t**)arg2 = this->m_chatRoomID;
005b7106          *(uint32_t*)arg2 += 4;
005b7109          this->m_BindPoint.vtable->Pack(arg2, arg3);
005b711f          AC1Legacy::PStringBase<char>::Pack(&this->m_AllegianceName, arg2, arg3);
005b7129          **(uint32_t**)arg2 = this->m_NameLastSetTime;
005b712d          void* edx_9 = (*(uint32_t*)arg2 + 4);
005b7130          *(uint32_t*)arg2 = edx_9;
005b713a          *(uint32_t*)edx_9 = this->m_isLocked;
005b713e          void* ecx_16 = (*(uint32_t*)arg2 + 4);
005b7141          *(uint32_t*)arg2 = ecx_16;
005b714b          *(uint32_t*)ecx_16 = this->m_ApprovedVassal;
005b7153          *(uint32_t*)arg2 += 4;
005b715c          AllegianceHierarchy::PackNode(this, this->m_pMonarch, arg2, arg3);
005b7072      }
005b7072      
005b7167      return result;
005b7060  }

005b716a                                90 90 90 90 90 90                                                            ......

005b7170  void* __thiscall PSmartArray<AC1Legacy::PStringBase<char> >::`scalar deleting destructor'(class PSmartArray<AC1Legacy::PStringBase<char> >* this, uint32_t arg2)

005b7170  {
005b7173      this->vtable = 0x79285c;
005b7179      class AC1Legacy::PStringBase<char>* m_data = this->m_data;
005b7179      
005b717e      if (m_data != 0)
005b7182          AC1Legacy::PStringBase<char>::`vector deleting destructor'(m_data, 3);
005b7182      
005b718c      if ((arg2 & 1) != 0)
005b718f          operator delete(this);
005b718f      
005b719a      return this;
005b7170  }

005b719d                                                                                         90 90 90                               ...

005b71a0  int32_t __thiscall AC1Legacy::SmartArray<AC1Legacy::PStringBase<char> >::grow(class AC1Legacy::SmartArray<AC1Legacy::PStringBase<char> >* this, uint32_t arg2)

005b71a0  {
005b71ad      if (arg2 >= this->m_num)
005b71ad      {
005b71b6          if (arg2 <= this->m_size)
005b7257              return 1;
005b7257          
005b71bc          int32_t i = 0;
005b71bc          
005b71c0          if (arg2 == 0)
005b71c0          {
005b71c2              class AC1Legacy::PStringBase<char>* m_data = this->m_data;
005b71c6              this->m_num = 0;
005b71c9              this->m_size = 0;
005b71c9              
005b71cc              if (m_data != 0)
005b71d0                  AC1Legacy::PStringBase<char>::`vector deleting destructor'(m_data, 3);
005b71d0              
005b71d5              this->m_data = 0;
005b71e0              return 1;
005b71c0          }
005b71c0          
005b71eb          void* eax_3 = operator new[](((arg2 << 2) + 4));
005b71eb          
005b71f5          if (eax_3 != 0)
005b71f5          {
005b7203              *(uint32_t*)eax_3 = arg2;
005b7205              `vector constructor iterator'(((char*)eax_3 + 4), 4, arg2, AC1Legacy::PStringBase<char>::PStringBase<char>);
005b7205              
005b720c              if (eax_3 != 0xfffffffc)
005b720c              {
005b7210                  if (this->m_data != 0)
005b7210                  {
005b7217                      if (this->m_num > 0)
005b7217                      {
005b723a                          do
005b723a                          {
005b7222                              int32_t eax_5 = (i << 2);
005b722f                              AC1Legacy::PStringBase<char>::operator=((eax_5 + ((char*)eax_3 + 4)), (this->m_data + eax_5));
005b7237                              i += 1;
005b723a                          } while (i < this->m_num);
005b7217                      }
005b7217                      
005b723c                      class AC1Legacy::PStringBase<char>* m_data_1 = this->m_data;
005b723c                      
005b7240                      if (m_data_1 != 0)
005b7244                          AC1Legacy::PStringBase<char>::`vector deleting destructor'(m_data_1, 3);
005b7210                  }
005b7210                  
005b7249                  this->m_data = ((char*)eax_3 + 4);
005b724b                  this->m_size = arg2;
005b7257                  return 1;
005b720c              }
005b71f5          }
005b71ad      }
005b71ad      
005b7260      return 0;
005b71a0  }

005b7263           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005b7270  int32_t* __thiscall AC1Legacy::SmartArray<AC1Legacy::PStringBase<char> >::operator=(void* arg1, int32_t* arg2)

005b7270  {
005b7270      void* var_4 = arg1;
005b7273      int32_t* edi = arg2;
005b7277      int32_t* result = arg1;
005b727f      int32_t eax_2;
005b727f      
005b727f      if (result[1] < edi[1])
005b727f      {
005b7281          result[2] = 0;
005b728e          eax_2 = AC1Legacy::SmartArray<AC1Legacy::PStringBase<char> >::grow(result, edi[1]);
005b727f      }
005b727f      
005b7295      if ((result[1] >= edi[1] || eax_2 != 0))
005b7295      {
005b729b          int32_t* ebx_1 = *(uint32_t*)result;
005b729f          int32_t* esi_1 = *(uint32_t*)edi;
005b72a1          void* eax_3 = &esi_1[edi[2]];
005b72a6          var_4 = eax_3;
005b72a6          
005b72aa          if (esi_1 < eax_3)
005b72aa          {
005b72ea              do
005b72ea              {
005b72b0                  int32_t* edi_1 = *(uint32_t*)ebx_1;
005b72b0                  
005b72b4                  if (edi_1 != *(uint32_t*)esi_1)
005b72b4                  {
005b72c6                      if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
005b72ce                          **(uint32_t**)edi_1(1);
005b72ce                      
005b72d0                      int32_t eax_6 = *(uint32_t*)esi_1;
005b72d2                      *(uint32_t*)ebx_1 = eax_6;
005b72d8                      InterlockedIncrement((eax_6 + 4));
005b72de                      eax_3 = var_4;
005b72b4                  }
005b72b4                  
005b72e2                  esi_1 = &esi_1[1];
005b72e5                  ebx_1 = &ebx_1[1];
005b72ea              } while (esi_1 < eax_3);
005b72ea              
005b72ec              edi = arg2;
005b72aa          }
005b72aa          
005b72f4          result[2] = edi[2];
005b7295      }
005b7295      
005b72fd      return result;
005b7270  }


005b7300  int32_t __thiscall PSmartArray<AC1Legacy::PStringBase<char> >::StreamPack(class PSmartArray<AC1Legacy::PStringBase<char> >* this, enum STREAMTYPE arg2, void** arg3, uint32_t* arg4)

005b7300  {
005b7300      class PSmartArray<AC1Legacy::PStringBase<char> >* m_num = this;
005b7307      uint32_t* ebp = arg4;
005b731e      m_num = this->m_num;
005b731e      
005b732c      if (STREAMPACK(arg2, &m_num, arg3, ebp) != 0)
005b732c      {
005b7331          if (arg2 != STREAM_UNPACK)
005b7331              goto label_5b7359;
005b7331          
005b7333          class PSmartArray<AC1Legacy::PStringBase<char> >* m_num_1 = m_num;
005b733d          this->m_num = 0;
005b733d          
005b734d          if (AC1Legacy::SmartArray<AC1Legacy::PStringBase<char> >::grow(&this->m_data, m_num_1) != 0)
005b734d          {
005b7337              this->m_num = m_num_1;
005b7352              ebp = arg4;
005b7359          label_5b7359:
005b7359              int32_t edi_2 = 0;
005b7359              
005b735d              if (this->m_num <= 0)
005b738c                  return 1;
005b738c              
005b736e              while (true)
005b736e              {
005b7378                  if (STREAMPACK(arg2, &this->m_data[edi_2], arg3, ebp) == 0)
005b7396                      return 0;
005b7396                  
005b737d                  edi_2 += 1;
005b737d                  
005b7380                  if (edi_2 >= this->m_num)
005b738c                      return 1;
005b736e              }
005b734d          }
005b732c      }
005b732c      
005b7396      return 0;
005b7300  }

005b7399                                                                             90 90 90 90 90 90 90                           .......

005b73a0  int32_t STREAMPACK(enum STREAMTYPE arg1, class AC1Legacy::PStringBase<char>* arg2, void** arg3, uint32_t* arg4)

005b73a0  {
005b73a8      if (arg1 == STREAM_GETPACKSIZE)
005b73a8      {
005b73fd          uint32_t eax_9 = AC1Legacy::PStringBase<char>::GetPackSize(arg2);
005b7402          int32_t* ecx_5 = arg4;
005b7406          *(uint32_t*)ecx_5 -= eax_9;
005b740e          return 1;
005b73a8      }
005b73a8      
005b73ab      if (arg1 == 1)
005b73ab      {
005b73eb          uint32_t eax_7 = AC1Legacy::PStringBase<char>::Pack(arg2, arg3, *(uint32_t*)arg4);
005b73f0          *(uint32_t*)arg4 -= eax_7;
005b73f8          return 1;
005b73ab      }
005b73ab      
005b73ae      if (arg1 != 2)
005b73b3          return 0;
005b73b3      
005b73c4      void* esi = *(uint32_t*)arg3;
005b73c8      int32_t result = AC1Legacy::PStringBase<char>::UnPack(arg2, arg3, *(uint32_t*)arg4);
005b73d6      *(uint32_t*)arg4 += ((char*)esi - *(uint32_t*)arg3);
005b73da      return result;
005b73a0  }

005b740f                                               90                                                                 .

005b7410  void __fastcall AllegianceHierarchy::Clear(class AllegianceHierarchy* this)

005b7410  {
005b741a      AllegianceHierarchy::Clear(this, &this->m_pMonarch);
005b7427      __builtin_memset(&this->m_total, 0, 0x14);
005b7436      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_motd.m_buffer;
005b7436      
005b743f      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
005b743f      {
005b7451          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005b7453              m_buffer->vtable->__vecDelDtor(1);
005b7453          
005b745b          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b7466          this->m_motd.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b7469          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b743f      }
005b743f      
005b746b      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_motdSetBy.m_buffer;
005b746b      
005b7474      if (m_buffer_1 != AC1Legacy::PStringBase<char>::s_NullBuffer)
005b7474      {
005b7486          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005b7488              m_buffer_1->vtable->__vecDelDtor(1);
005b7488          
005b7490          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b749c          this->m_motdSetBy.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005b749f          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
005b7474      }
005b7474      
005b74a4      this->m_chatRoomID = 0;
005b74a7      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_AllegianceOfficers.m_intrusiveTable);
005b74ac      class AC1Legacy::PStringBase<char>* m_data = this->m_OfficerTitles.m_data;
005b74b4      this->m_OfficerTitles.m_num = 0;
005b74ba      this->m_OfficerTitles.m_size = 0;
005b74ba      
005b74c0      if (m_data != 0)
005b74c4          AC1Legacy::PStringBase<char>::`vector deleting destructor'(m_data, 3);
005b74c4      
005b74c9      this->m_OfficerTitles.m_data = nullptr;
005b74cf      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->m_AllegianceName.m_buffer;
005b74cf      
005b74d8      if (m_buffer_2 != AC1Legacy::PStringBase<char>::s_NullBuffer)
005b74d8      {
005b74ea          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
005b74ec              m_buffer_2->vtable->__vecDelDtor(1);
005b74ec          
005b74f4          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b74ff          this->m_AllegianceName.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005b7502          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_2 + 4));
005b74d8      }
005b74d8      
005b7505      this->m_NameLastSetTime = 0;
005b7508      this->m_isLocked = 0;
005b750e      this->m_ApprovedVassal = 0;
005b7410  }

005b7518                                                                          90 90 90 90 90 90 90 90                          ........

005b7520  int32_t __thiscall AllegianceHierarchy::UnPack(class AllegianceHierarchy* this, void** arg2, uint32_t arg3)

005b7520  {
005b7525      uint32_t ebp = arg3;
005b7525      
005b7530      if (ebp >= 4)
005b7530      {
005b7532          AllegianceHierarchy::Clear(this);
005b7537          void** esi_1 = arg2;
005b753b          void* eax_1 = *(uint32_t*)esi_1;
005b753d          int32_t ecx = *(uint32_t*)eax_1;
005b7544          *(uint32_t*)esi_1 = ((char*)eax_1 + 4);
005b7546          int16_t i = ecx;
005b754d          uint32_t ecx_1 = (ecx >> 0x10);
005b7550          this->m_oldVersion = ecx_1;
005b7553          void* edx_1 = *(uint32_t*)esi_1;
005b755b          int32_t eax_5 = ((char*)edx_1 - eax_1);
005b7563          int32_t ebx_3;
005b7563          
005b7563          if (ebp <= eax_5)
005b756b              ebx_3 = 0;
005b7563          else
005b7567              ebx_3 = (ebp - eax_5);
005b7567          
005b7570          if (ecx_1 < 6)
005b7570          {
005b759b              if ((ecx_1 >= 1 && ebx_3 >= 4))
005b75a0                  *(uint32_t*)esi_1 = ((char*)edx_1 + 4);
005b75a0              
005b759b              goto label_5b75a4;
005b7570          }
005b7570          
005b7585          if (this->m_AllegianceOfficers.vtable->UnPack(esi_1, ebx_3) != 0)
005b7585          {
005b75a4          label_5b75a4:
005b75a4              int32_t eax_10 = (*(uint32_t*)esi_1 - eax_1);
005b75aa              uint32_t ebx_5;
005b75aa              
005b75aa              if (ebp <= eax_10)
005b75b2                  ebx_5 = 0;
005b75aa              else
005b75ae                  ebx_5 = (ebp - eax_10);
005b75ae              
005b75b4              bool cond:2_1 = this->m_oldVersion < OfficersTitlesAdded_AllegianceVersion;
005b75b8              arg2 = ebx_5;
005b75b8              
005b75bc              if (cond:2_1)
005b75bc                  goto label_5b75e0;
005b75bc              
005b75d1              if (this->m_OfficerTitles.vtable->UnPack(esi_1, ebx_5) != 0)
005b75d1              {
005b75d3                  ebp = arg3;
005b75e0              label_5b75e0:
005b75e0                  
005b75e0                  if ((this->m_oldVersion >= PoolsAdded_AllegianceVersion && ebx_5 >= 4))
005b75e0                  {
005b75e6                      this->m_monarchBroadcastTime = **(uint32_t**)esi_1;
005b75eb                      void* edx_5 = (*(uint32_t*)esi_1 + 4);
005b75ee                      ebx_5 -= 4;
005b75f4                      *(uint32_t*)esi_1 = edx_5;
005b75f8                      arg2 = ebx_5;
005b75f8                      
005b75fc                      if (ebx_5 >= 4)
005b75fc                      {
005b7600                          this->m_monarchBroadcastsToday = *(uint32_t*)edx_5;
005b7605                          ebx_5 -= 4;
005b7608                          void* eax_15 = (*(uint32_t*)esi_1 + 4);
005b760e                          *(uint32_t*)esi_1 = eax_15;
005b7610                          arg2 = ebx_5;
005b7610                          
005b7614                          if (ebx_5 >= 4)
005b7614                          {
005b7618                              this->m_spokesBroadcastTime = *(uint32_t*)eax_15;
005b761d                              ebx_5 -= 4;
005b7620                              void* eax_18 = (*(uint32_t*)esi_1 + 4);
005b7626                              *(uint32_t*)esi_1 = eax_18;
005b7628                              arg2 = ebx_5;
005b7628                              
005b762c                              if (ebx_5 >= 4)
005b762c                              {
005b7630                                  this->m_spokesBroadcastsToday = *(uint32_t*)eax_18;
005b7638                                  ebx_5 -= 4;
005b763b                                  *(uint32_t*)esi_1 += 4;
005b763d                                  arg2 = ebx_5;
005b762c                              }
005b7614                          }
005b75fc                      }
005b75e0                  }
005b75e0                  
005b7645                  if (this->m_oldVersion < MotdAdded_AllegianceVersion)
005b7645                      goto label_5b7696;
005b7645                  
005b7653                  if (AC1Legacy::PStringBase<char>::UnPack(&this->m_motd, esi_1, ebx_5) != 0)
005b7653                  {
005b765f                      void* eax_21 = (*(uint32_t*)esi_1 - eax_1);
005b7663                      void* ecx_10;
005b7663                      
005b7663                      if (ebp <= eax_21)
005b766b                          ecx_10 = nullptr;
005b7663                      else
005b7667                          ecx_10 = (ebp - eax_21);
005b7667                      
005b7679                      if (AC1Legacy::PStringBase<char>::UnPack(&this->m_motdSetBy, esi_1, ecx_10) != 0)
005b7679                      {
005b7689                          ebx_5 = PackObj::GET_SIZE_LEFT(*(uint32_t*)esi_1, eax_1, ebp);
005b768e                          arg2 = ebx_5;
005b7696                      label_5b7696:
005b7696                          
005b7696                          if (this->m_oldVersion >= ChatRoomIDAdded_AllegianceVersion)
005b7696                          {
005b76a2                              PackObj::UNPACK_TYPE(&this->m_chatRoomID, esi_1, &arg2);
005b76a7                              ebx_5 = arg2;
005b7696                          }
005b7696                          
005b76b2                          int32_t eax_24;
005b76b2                          
005b76b2                          if (this->m_oldVersion >= Bindstones_AllegianceVersion)
005b76c2                              eax_24 = this->m_BindPoint.vtable->UnPack(esi_1, ebx_5);
005b76c2                          
005b76c7                          if ((this->m_oldVersion < Bindstones_AllegianceVersion || eax_24 != 0))
005b76c7                          {
005b76d1                              if (this->m_oldVersion < AllegianceName_AllegianceVersion)
005b76d1                                  goto label_5b770d;
005b76d1                              
005b76df                              if (AC1Legacy::PStringBase<char>::UnPack(&this->m_AllegianceName, esi_1, ebx_5) != 0)
005b76df                              {
005b76f8                                  arg2 = PackObj::GET_SIZE_LEFT(*(uint32_t*)esi_1, eax_1, ebp);
005b7701                                  PackObj::UNPACK_TYPE(&this->m_NameLastSetTime, esi_1, &arg2);
005b770d                              label_5b770d:
005b770d                                  
005b770d                                  if (this->m_oldVersion >= LockedState_AllegianceVersion)
005b771c                                      PackObj::UNPACK_TYPE(&this->m_isLocked, esi_1, &arg2);
005b771c                                  
005b7728                                  if (this->m_oldVersion >= ApprovedVassal_AllegianceVersion)
005b7737                                      PackObj::UNPACK_TYPE(&this->m_ApprovedVassal, esi_1, &arg2);
005b7737                                  
005b7743                                  uint32_t ebx_7 = 0;
005b7745                                  void var_38;
005b7745                                  AllegianceData::AllegianceData(&var_38);
005b774a                                  int32_t ebp_1 = 0;
005b774a                                  
005b7751                                  if (i > 0)
005b7751                                  {
005b77a5                                      do
005b77a5                                      {
005b7753                                          void* edx_10 = *(uint32_t*)esi_1;
005b775b                                          void* eax_30 = ((char*)edx_10 - eax_1);
005b7763                                          void* ecx_20;
005b7763                                          
005b7763                                          if (arg3 <= eax_30)
005b7769                                              ecx_20 = nullptr;
005b7763                                          else
005b7765                                              ecx_20 = (arg3 - eax_30);
005b7765                                          
005b776e                                          if (ebp_1 != 0)
005b776e                                          {
005b7773                                              if (ecx_20 < 4)
005b7773                                              {
005b77d4                                                  AllegianceData::~AllegianceData(&var_38);
005b77e2                                                  return 0;
005b7773                                              }
005b7773                                              
005b7775                                              ebx_7 = *(uint32_t*)edx_10;
005b777a                                              *(uint32_t*)esi_1 = ((char*)edx_10 + 4);
005b777c                                              ecx_20 -= 4;
005b776e                                          }
005b776e                                          
005b778c                                          if (AllegianceData::UnPack(&var_38, esi_1, ecx_20) == 0)
005b778c                                          {
005b77d4                                              AllegianceData::~AllegianceData(&var_38);
005b77e2                                              return 0;
005b778c                                          }
005b778c                                          
005b779d                                          if (AllegianceHierarchy::Add(this, ebx_7, &var_38) == 0)
005b779d                                          {
005b77d4                                              AllegianceData::~AllegianceData(&var_38);
005b77e2                                              return 0;
005b779d                                          }
005b779d                                          
005b779f                                          ebp_1 += 1;
005b77a5                                      } while (ebp_1 < i);
005b7751                                  }
005b7751                                  
005b77a7                                  class AllegianceNode* m_pMonarch = this->m_pMonarch;
005b77a7                                  
005b77ac                                  if (m_pMonarch != 0)
005b77b3                                      AllegianceData::SetMayPassupExperience(&m_pMonarch->_data, 0);
005b77b3                                  
005b77bc                                  AllegianceData::~AllegianceData(&var_38);
005b77cd                                  return 1;
005b76df                              }
005b76c7                          }
005b7679                      }
005b7653                  }
005b75d1              }
005b7585          }
005b7530      }
005b7530      
005b7590      return 0;
005b7520  }

005b77e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005b77f0  void __fastcall AllegianceHierarchy::AllegianceHierarchy(class AllegianceHierarchy* this)

005b77f0  {
005b77fe      this->vtable = 0x7e6da0;
005b7804      __builtin_memset(&this->m_oldVersion, 0, 0x1c);
005b7819      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b7824      this->m_motd.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b7827      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b7829      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b7835      this->m_motdSetBy.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
005b7838      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef);
005b783a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b7846      this->m_AllegianceName.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
005b7849      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
005b784b      this->m_NameLastSetTime = 0;
005b784e      this->m_chatRoomID = 0;
005b7856      this->m_AllegianceOfficers.vtable = 0x79c9ac;
005b785d      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(&this->m_AllegianceOfficers.m_intrusiveTable, 0x17);
005b7862      this->m_AllegianceOfficers.vtable = &StreamPackObj::`vftable';
005b786c      this->m_AllegianceOfficers.vtable = 0x7e61ac;
005b7873      this->m_AllegianceOfficers.vtable = &PHashTable<unsigned long,unsigned long>::`vftable';
005b787d      this->m_OfficerTitles.m_data = nullptr;
005b7883      this->m_OfficerTitles.m_size = 0;
005b7889      this->m_OfficerTitles.m_num = 0;
005b788f      this->m_OfficerTitles.vtable = &PSmartArray<class AC1Legacy::PStringBase<char> >::`vftable';
005b789f      this->m_BindPoint.vtable = 0x796910;
005b78a9      this->m_BindPoint.objcell_id = 0;
005b7899      this->m_BindPoint.frame.qw = 0x3f800000;
005b7899      this->m_BindPoint.frame.qx = 0f;
005b7899      this->m_BindPoint.frame.qy = 0f;
005b7899      this->m_BindPoint.frame.qz = 0f;
005b7899      this->m_BindPoint.frame.m_fOrigin.x = 0;
005b7899      this->m_BindPoint.frame.m_fOrigin.y = 0f;
005b7899      this->m_BindPoint.frame.m_fOrigin.z = 0f;
005b78c7      Frame::cache(&this->m_BindPoint.frame);
005b78cc      this->m_isLocked = 0;
005b78d2      this->m_ApprovedVassal = 0;
005b78d8      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_motd.m_buffer;
005b78d8      
005b78e1      if (m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer)
005b78e1      {
005b78f3          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005b78f5              m_buffer->vtable->__vecDelDtor(1);
005b78f5          
005b78fe          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b7909          this->m_motd.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005b790c          InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005b78e1      }
005b78e1      
005b790e      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_motdSetBy.m_buffer;
005b790e      
005b7917      if (m_buffer_1 != AC1Legacy::PStringBase<char>::s_NullBuffer)
005b7917      {
005b7929          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005b792b              m_buffer_1->vtable->__vecDelDtor(1);
005b792b          
005b7934          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b7940          this->m_motdSetBy.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
005b7943          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_5 + 4));
005b7917      }
005b7917      
005b7945      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->m_AllegianceName.m_buffer;
005b7945      
005b794e      if (m_buffer_2 != AC1Legacy::PStringBase<char>::s_NullBuffer)
005b794e      {
005b7960          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
005b7962              m_buffer_2->vtable->__vecDelDtor(1);
005b7962          
005b796b          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b7976          this->m_AllegianceName.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005b7979          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_3 + 4));
005b794e      }
005b77f0  }

005b7982        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005b7990  class AllegianceHierarchy& __thiscall AllegianceHierarchy::operator=(class AllegianceHierarchy* this, class AllegianceHierarchy const& arg2)

005b7990  {
005b799a      if (this != arg2)
005b799a      {
005b79a2          AllegianceHierarchy::Clear(this);
005b79b0          this->m_monarchBroadcastTime = arg2->m_monarchBroadcastTime;
005b79b6          this->m_spokesBroadcastTime = arg2->m_spokesBroadcastTime;
005b79bc          this->m_monarchBroadcastsToday = arg2->m_monarchBroadcastsToday;
005b79c2          this->m_spokesBroadcastsToday = arg2->m_spokesBroadcastsToday;
005b79c5          class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->m_motd.m_buffer;
005b79c5          
005b79cb          if (m_buffer_3 != arg2->m_motd.m_buffer)
005b79cb          {
005b79dd              if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
005b79df                  m_buffer_3->vtable->__vecDelDtor(1);
005b79df              
005b79e7              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_motd.m_buffer;
005b79ea              this->m_motd.m_buffer = m_buffer;
005b79f1              InterlockedIncrement(&m_buffer->m_cRef);
005b79cb          }
005b79cb          
005b79f3          class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = this->m_motdSetBy.m_buffer;
005b79f3          
005b79f9          if (m_buffer_4 != arg2->m_motdSetBy.m_buffer)
005b79f9          {
005b7a0b              if ((InterlockedDecrement(&m_buffer_4->m_cRef) == 0 && m_buffer_4 != 0))
005b7a0d                  m_buffer_4->vtable->__vecDelDtor(1);
005b7a0d              
005b7a15              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->m_motdSetBy.m_buffer;
005b7a18              this->m_motdSetBy.m_buffer = m_buffer_1;
005b7a1f              InterlockedIncrement(&m_buffer_1->m_cRef);
005b79f9          }
005b79f9          
005b7a24          this->m_chatRoomID = arg2->m_chatRoomID;
005b7a2e          HashTable<unsigned long,unsigned long,0>::operator=(&this->m_AllegianceOfficers, &arg2->m_AllegianceOfficers);
005b7a3b          class AC1Legacy::PStringBase<char>** eax_11;
005b7a3b          
005b7a3b          if (arg2 == 0xffffff54)
005b7a42              eax_11 = nullptr;
005b7a3b          else
005b7a3d              eax_11 = &arg2->m_OfficerTitles.m_data;
005b7a3d          
005b7a4b          AC1Legacy::SmartArray<AC1Legacy::PStringBase<char> >::operator=(&this->m_OfficerTitles.m_data, eax_11);
005b7a50          class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = this->m_AllegianceName.m_buffer;
005b7a50          
005b7a56          if (m_buffer_5 != arg2->m_AllegianceName.m_buffer)
005b7a56          {
005b7a68              if ((InterlockedDecrement(&m_buffer_5->m_cRef) == 0 && m_buffer_5 != 0))
005b7a6a                  m_buffer_5->vtable->__vecDelDtor(1);
005b7a6a              
005b7a72              class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg2->m_AllegianceName.m_buffer;
005b7a75              this->m_AllegianceName.m_buffer = m_buffer_2;
005b7a7c              InterlockedIncrement(&m_buffer_2->m_cRef);
005b7a56          }
005b7a56          
005b7a81          this->m_NameLastSetTime = arg2->m_NameLastSetTime;
005b7a8a          this->m_isLocked = arg2->m_isLocked;
005b7a96          this->m_ApprovedVassal = arg2->m_ApprovedVassal;
005b7aa4          AllegianceHierarchy::Copy(this, arg2->m_pMonarch, 1);
005b799a      }
005b799a      
005b7aaf      return this;
005b7990  }

005b7ab2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005b7ac0  void __fastcall AllegianceHierarchy::~AllegianceHierarchy(class AllegianceHierarchy* this)

005b7ac0  {
005b7ac5      this->vtable = 0x7e6da0;
005b7acb      AllegianceHierarchy::Clear(this);
005b7ad5      this->m_BindPoint.vtable = 0x79285c;
005b7adb      this->m_OfficerTitles.vtable = 0x79285c;
005b7ae1      class AC1Legacy::PStringBase<char>* m_data = this->m_OfficerTitles.m_data;
005b7ae1      
005b7aeb      if (m_data != 0)
005b7aef          AC1Legacy::PStringBase<char>::`vector deleting destructor'(m_data, 3);
005b7aef      
005b7af4      this->m_AllegianceOfficers.vtable = &PHashTable<unsigned long,unsigned long>::`vftable';
005b7afe      this->m_AllegianceOfficers.vtable = &PackObj::`vftable';
005b7b09      this->m_AllegianceOfficers.vtable = 0x79c9ac;
005b7b10      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_AllegianceOfficers.m_intrusiveTable);
005b7b15      class HashTableData<unsigned long,unsigned long>** m_buckets = this->m_AllegianceOfficers.m_intrusiveTable.m_buckets;
005b7b04      this->m_AllegianceOfficers.m_intrusiveTable.vtable = 0x79c9a8;
005b7b04      
005b7b23      if (m_buckets != &this->m_AllegianceOfficers.m_intrusiveTable.m_aInplaceBuckets)
005b7b26          operator delete[](m_buckets);
005b7b26      
005b7b04      this->m_AllegianceOfficers.m_intrusiveTable.m_buckets = nullptr;
005b7b04      this->m_AllegianceOfficers.m_intrusiveTable.m_firstInterestingBucket = nullptr;
005b7b04      this->m_AllegianceOfficers.m_intrusiveTable.m_numBuckets = 0;
005b7b04      this->m_AllegianceOfficers.m_intrusiveTable.m_numElements = 0;
005b7b3a      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_AllegianceName.m_buffer;
005b7b3a      
005b7b50      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005b7b52          m_buffer->vtable->__vecDelDtor(1);
005b7b52      
005b7b5a      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_motdSetBy.m_buffer;
005b7b5a      
005b7b69      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005b7b6b          m_buffer_1->vtable->__vecDelDtor(1);
005b7b6b      
005b7b73      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->m_motd.m_buffer;
005b7b73      
005b7b83      if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
005b7b85          m_buffer_2->vtable->__vecDelDtor(1);
005b7b85      
005b7b8e      this->vtable = 0x79285c;
005b7ac0  }

005b7b97                                                                       90 90 90 90 90 90 90 90 90                         .........

005b7ba0  void* __thiscall AllegianceHierarchy::`scalar deleting destructor'(class AllegianceHierarchy* this, uint32_t arg2)

005b7ba0  {
005b7ba3      AllegianceHierarchy::~AllegianceHierarchy(this);
005b7ba3      
005b7bad      if ((arg2 & 1) != 0)
005b7bb0          operator delete(this);
005b7bb0      
005b7bbb      return this;
005b7ba0  }

005b7bbe                                                                                            90 90                                ..

005b7bc0  int32_t AllegianceSystem::GetAluvianMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b7bc0  {
005b7bc8      if ((arg1 - 1) > 9)
005b7c9f          return 0;
005b7c9f      
005b7bce      switch (arg1)
005b7bce      {
005b7bde          case 1:
005b7bde          {
005b7bde              AC1Legacy::PStringBase<char>::set(arg2, "Yeoman");
005b7be8              return 1;
005b7bde              break;
005b7bde          }
005b7bf2          case 2:
005b7bf2          {
005b7bf2              AC1Legacy::PStringBase<char>::set(arg2, "Baronet");
005b7bfc              return 1;
005b7bf2              break;
005b7bf2          }
005b7c06          case 3:
005b7c06          {
005b7c06              AC1Legacy::PStringBase<char>::set(arg2, "Baron");
005b7c10              return 1;
005b7c06              break;
005b7c06          }
005b7c1a          case 4:
005b7c1a          {
005b7c1a              AC1Legacy::PStringBase<char>::set(arg2, "Reeve");
005b7c24              return 1;
005b7c1a              break;
005b7c1a          }
005b7c2e          case 5:
005b7c2e          {
005b7c2e              AC1Legacy::PStringBase<char>::set(arg2, "Thane");
005b7c38              return 1;
005b7c2e              break;
005b7c2e          }
005b7c42          case 6:
005b7c42          {
005b7c42              AC1Legacy::PStringBase<char>::set(arg2, "Ealdor");
005b7c4c              return 1;
005b7c42              break;
005b7c42          }
005b7c56          case 7:
005b7c56          {
005b7c56              AC1Legacy::PStringBase<char>::set(arg2, "Duke");
005b7c60              return 1;
005b7c56              break;
005b7c56          }
005b7c6a          case 8:
005b7c6a          {
005b7c6a              AC1Legacy::PStringBase<char>::set(arg2, "Aetheling");
005b7c74              return 1;
005b7c6a              break;
005b7c6a          }
005b7c7e          case 9:
005b7c7e          {
005b7c7e              AC1Legacy::PStringBase<char>::set(arg2, "King");
005b7c88              return 1;
005b7c7e              break;
005b7c7e          }
005b7c92          case 0xa:
005b7c92          {
005b7c92              AC1Legacy::PStringBase<char>::set(arg2, "High King");
005b7c9c              return 1;
005b7c92              break;
005b7c92          }
005b7bce      }
005b7bc0  }

005b7ca0  uint32_t jump_table_5b7ca0[0xa] = 
005b7ca0  {
005b7ca0      [0x0] =  0x005b7bd5
005b7ca4      [0x1] =  0x005b7be9
005b7ca8      [0x2] =  0x005b7bfd
005b7cac      [0x3] =  0x005b7c11
005b7cb0      [0x4] =  0x005b7c25
005b7cb4      [0x5] =  0x005b7c39
005b7cb8      [0x6] =  0x005b7c4d
005b7cbc      [0x7] =  0x005b7c61
005b7cc0      [0x8] =  0x005b7c75
005b7cc4      [0x9] =  0x005b7c89
005b7cc8  }

005b7cc8                          90 90 90 90 90 90 90 90                                                          ........

005b7cd0  int32_t AllegianceSystem::GetAluvianFemaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b7cd0  {
005b7cd8      if ((arg1 - 1) > 9)
005b7daf          return 0;
005b7daf      
005b7cde      switch (arg1)
005b7cde      {
005b7cee          case 1:
005b7cee          {
005b7cee              AC1Legacy::PStringBase<char>::set(arg2, "Yeoman");
005b7cf8              return 1;
005b7cee              break;
005b7cee          }
005b7d02          case 2:
005b7d02          {
005b7d02              AC1Legacy::PStringBase<char>::set(arg2, "Baronet");
005b7d0c              return 1;
005b7d02              break;
005b7d02          }
005b7d16          case 3:
005b7d16          {
005b7d16              AC1Legacy::PStringBase<char>::set(arg2, "Baroness");
005b7d20              return 1;
005b7d16              break;
005b7d16          }
005b7d2a          case 4:
005b7d2a          {
005b7d2a              AC1Legacy::PStringBase<char>::set(arg2, "Reeve");
005b7d34              return 1;
005b7d2a              break;
005b7d2a          }
005b7d3e          case 5:
005b7d3e          {
005b7d3e              AC1Legacy::PStringBase<char>::set(arg2, "Thane");
005b7d48              return 1;
005b7d3e              break;
005b7d3e          }
005b7d52          case 6:
005b7d52          {
005b7d52              AC1Legacy::PStringBase<char>::set(arg2, "Ealdor");
005b7d5c              return 1;
005b7d52              break;
005b7d52          }
005b7d66          case 7:
005b7d66          {
005b7d66              AC1Legacy::PStringBase<char>::set(arg2, "Duchess");
005b7d70              return 1;
005b7d66              break;
005b7d66          }
005b7d7a          case 8:
005b7d7a          {
005b7d7a              AC1Legacy::PStringBase<char>::set(arg2, "Aetheling");
005b7d84              return 1;
005b7d7a              break;
005b7d7a          }
005b7d8e          case 9:
005b7d8e          {
005b7d8e              AC1Legacy::PStringBase<char>::set(arg2, "Queen");
005b7d98              return 1;
005b7d8e              break;
005b7d8e          }
005b7da2          case 0xa:
005b7da2          {
005b7da2              AC1Legacy::PStringBase<char>::set(arg2, "High Queen");
005b7dac              return 1;
005b7da2              break;
005b7da2          }
005b7cde      }
005b7cd0  }

005b7db0  uint32_t jump_table_5b7db0[0xa] = 
005b7db0  {
005b7db0      [0x0] =  0x005b7ce5
005b7db4      [0x1] =  0x005b7cf9
005b7db8      [0x2] =  0x005b7d0d
005b7dbc      [0x3] =  0x005b7d21
005b7dc0      [0x4] =  0x005b7d35
005b7dc4      [0x5] =  0x005b7d49
005b7dc8      [0x6] =  0x005b7d5d
005b7dcc      [0x7] =  0x005b7d71
005b7dd0      [0x8] =  0x005b7d85
005b7dd4      [0x9] =  0x005b7d99
005b7dd8  }

005b7dd8                                                                          90 90 90 90 90 90 90 90                          ........

005b7de0  int32_t AllegianceSystem::GetGharundimMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b7de0  {
005b7de8      if ((arg1 - 1) > 9)
005b7ebf          return 0;
005b7ebf      
005b7dee      switch (arg1)
005b7dee      {
005b7dfe          case 1:
005b7dfe          {
005b7dfe              AC1Legacy::PStringBase<char>::set(arg2, "Sayyid");
005b7e08              return 1;
005b7dfe              break;
005b7dfe          }
005b7e12          case 2:
005b7e12          {
005b7e12              AC1Legacy::PStringBase<char>::set(arg2, "Shayk");
005b7e1c              return 1;
005b7e12              break;
005b7e12          }
005b7e26          case 3:
005b7e26          {
005b7e26              AC1Legacy::PStringBase<char>::set(arg2, "Maulan");
005b7e30              return 1;
005b7e26              break;
005b7e26          }
005b7e3a          case 4:
005b7e3a          {
005b7e3a              AC1Legacy::PStringBase<char>::set(arg2, "Mu'allim");
005b7e44              return 1;
005b7e3a              break;
005b7e3a          }
005b7e4e          case 5:
005b7e4e          {
005b7e4e              AC1Legacy::PStringBase<char>::set(arg2, "Naquib");
005b7e58              return 1;
005b7e4e              break;
005b7e4e          }
005b7e62          case 6:
005b7e62          {
005b7e62              AC1Legacy::PStringBase<char>::set(arg2, "Qadi");
005b7e6c              return 1;
005b7e62              break;
005b7e62          }
005b7e76          case 7:
005b7e76          {
005b7e76              AC1Legacy::PStringBase<char>::set(arg2, "Mushir");
005b7e80              return 1;
005b7e76              break;
005b7e76          }
005b7e8a          case 8:
005b7e8a          {
005b7e8a              AC1Legacy::PStringBase<char>::set(arg2, "Amir");
005b7e94              return 1;
005b7e8a              break;
005b7e8a          }
005b7e9e          case 9:
005b7e9e          {
005b7e9e              AC1Legacy::PStringBase<char>::set(arg2, "Malik");
005b7ea8              return 1;
005b7e9e              break;
005b7e9e          }
005b7eb2          case 0xa:
005b7eb2          {
005b7eb2              AC1Legacy::PStringBase<char>::set(arg2, "Sultan");
005b7ebc              return 1;
005b7eb2              break;
005b7eb2          }
005b7dee      }
005b7de0  }

005b7ec0  uint32_t jump_table_5b7ec0[0xa] = 
005b7ec0  {
005b7ec0      [0x0] =  0x005b7df5
005b7ec4      [0x1] =  0x005b7e09
005b7ec8      [0x2] =  0x005b7e1d
005b7ecc      [0x3] =  0x005b7e31
005b7ed0      [0x4] =  0x005b7e45
005b7ed4      [0x5] =  0x005b7e59
005b7ed8      [0x6] =  0x005b7e6d
005b7edc      [0x7] =  0x005b7e81
005b7ee0      [0x8] =  0x005b7e95
005b7ee4      [0x9] =  0x005b7ea9
005b7ee8  }

005b7ee8                          90 90 90 90 90 90 90 90                                                          ........

005b7ef0  int32_t AllegianceSystem::GetGharundimFemaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b7ef0  {
005b7ef8      if ((arg1 - 1) > 9)
005b7fcf          return 0;
005b7fcf      
005b7efe      switch (arg1)
005b7efe      {
005b7f0e          case 1:
005b7f0e          {
005b7f0e              AC1Legacy::PStringBase<char>::set(arg2, "Sayyida");
005b7f18              return 1;
005b7f0e              break;
005b7f0e          }
005b7f22          case 2:
005b7f22          {
005b7f22              AC1Legacy::PStringBase<char>::set(arg2, "Shayka");
005b7f2c              return 1;
005b7f22              break;
005b7f22          }
005b7f36          case 3:
005b7f36          {
005b7f36              AC1Legacy::PStringBase<char>::set(arg2, "Maulana");
005b7f40              return 1;
005b7f36              break;
005b7f36          }
005b7f4a          case 4:
005b7f4a          {
005b7f4a              AC1Legacy::PStringBase<char>::set(arg2, "Mu'allima");
005b7f54              return 1;
005b7f4a              break;
005b7f4a          }
005b7f5e          case 5:
005b7f5e          {
005b7f5e              AC1Legacy::PStringBase<char>::set(arg2, "Naquiba");
005b7f68              return 1;
005b7f5e              break;
005b7f5e          }
005b7f72          case 6:
005b7f72          {
005b7f72              AC1Legacy::PStringBase<char>::set(arg2, "Qadiya");
005b7f7c              return 1;
005b7f72              break;
005b7f72          }
005b7f86          case 7:
005b7f86          {
005b7f86              AC1Legacy::PStringBase<char>::set(arg2, "Mushira");
005b7f90              return 1;
005b7f86              break;
005b7f86          }
005b7f9a          case 8:
005b7f9a          {
005b7f9a              AC1Legacy::PStringBase<char>::set(arg2, "Amira");
005b7fa4              return 1;
005b7f9a              break;
005b7f9a          }
005b7fae          case 9:
005b7fae          {
005b7fae              AC1Legacy::PStringBase<char>::set(arg2, "Malika");
005b7fb8              return 1;
005b7fae              break;
005b7fae          }
005b7fc2          case 0xa:
005b7fc2          {
005b7fc2              AC1Legacy::PStringBase<char>::set(arg2, "Sultana");
005b7fcc              return 1;
005b7fc2              break;
005b7fc2          }
005b7efe      }
005b7ef0  }

005b7fd0  uint32_t jump_table_5b7fd0[0xa] = 
005b7fd0  {
005b7fd0      [0x0] =  0x005b7f05
005b7fd4      [0x1] =  0x005b7f19
005b7fd8      [0x2] =  0x005b7f2d
005b7fdc      [0x3] =  0x005b7f41
005b7fe0      [0x4] =  0x005b7f55
005b7fe4      [0x5] =  0x005b7f69
005b7fe8      [0x6] =  0x005b7f7d
005b7fec      [0x7] =  0x005b7f91
005b7ff0      [0x8] =  0x005b7fa5
005b7ff4      [0x9] =  0x005b7fb9
005b7ff8  }

005b7ff8                                                                          90 90 90 90 90 90 90 90                          ........

005b8000  int32_t AllegianceSystem::GetShoMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8000  {
005b8008      if ((arg1 - 1) > 9)
005b80df          return 0;
005b80df      
005b800e      switch (arg1)
005b800e      {
005b801e          case 1:
005b801e          {
005b801e              AC1Legacy::PStringBase<char>::set(arg2, "Jinin");
005b8028              return 1;
005b801e              break;
005b801e          }
005b8032          case 2:
005b8032          {
005b8032              AC1Legacy::PStringBase<char>::set(arg2, "Jo-chueh");
005b803c              return 1;
005b8032              break;
005b8032          }
005b8046          case 3:
005b8046          {
005b8046              AC1Legacy::PStringBase<char>::set(arg2, "Nan-chueh");
005b8050              return 1;
005b8046              break;
005b8046          }
005b805a          case 4:
005b805a          {
005b805a              AC1Legacy::PStringBase<char>::set(arg2, "Shi-chueh");
005b8064              return 1;
005b805a              break;
005b805a          }
005b806e          case 5:
005b806e          {
005b806e              AC1Legacy::PStringBase<char>::set(arg2, "Ta-chueh");
005b8078              return 1;
005b806e              break;
005b806e          }
005b8082          case 6:
005b8082          {
005b8082              AC1Legacy::PStringBase<char>::set(arg2, "Kun-chueh");
005b808c              return 1;
005b8082              break;
005b8082          }
005b8096          case 7:
005b8096          {
005b8096              AC1Legacy::PStringBase<char>::set(arg2, &data_7e6ef8);
005b80a0              return 1;
005b8096              break;
005b8096          }
005b80aa          case 8:
005b80aa          {
005b80aa              AC1Legacy::PStringBase<char>::set(arg2, "Taikou");
005b80b4              return 1;
005b80aa              break;
005b80aa          }
005b80be          case 9:
005b80be          {
005b80be              AC1Legacy::PStringBase<char>::set(arg2, &data_7e6eec);
005b80c8              return 1;
005b80be              break;
005b80be          }
005b80d2          case 0xa:
005b80d2          {
005b80d2              AC1Legacy::PStringBase<char>::set(arg2, "Koutei");
005b80dc              return 1;
005b80d2              break;
005b80d2          }
005b800e      }
005b8000  }

005b80e0  uint32_t jump_table_5b80e0[0xa] = 
005b80e0  {
005b80e0      [0x0] =  0x005b8015
005b80e4      [0x1] =  0x005b8029
005b80e8      [0x2] =  0x005b803d
005b80ec      [0x3] =  0x005b8051
005b80f0      [0x4] =  0x005b8065
005b80f4      [0x5] =  0x005b8079
005b80f8      [0x6] =  0x005b808d
005b80fc      [0x7] =  0x005b80a1
005b8100      [0x8] =  0x005b80b5
005b8104      [0x9] =  0x005b80c9
005b8108  }

005b8108                          90 90 90 90 90 90 90 90                                                          ........

005b8110  int32_t AllegianceSystem::GetShoFemaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8110  {
005b8118      if ((arg1 - 1) > 9)
005b81ef          return 0;
005b81ef      
005b811e      switch (arg1)
005b811e      {
005b812e          case 1:
005b812e          {
005b812e              AC1Legacy::PStringBase<char>::set(arg2, "Jinin");
005b8138              return 1;
005b812e              break;
005b812e          }
005b8142          case 2:
005b8142          {
005b8142              AC1Legacy::PStringBase<char>::set(arg2, "Jo-chueh");
005b814c              return 1;
005b8142              break;
005b8142          }
005b8156          case 3:
005b8156          {
005b8156              AC1Legacy::PStringBase<char>::set(arg2, "Nan-chueh");
005b8160              return 1;
005b8156              break;
005b8156          }
005b816a          case 4:
005b816a          {
005b816a              AC1Legacy::PStringBase<char>::set(arg2, "Shi-chueh");
005b8174              return 1;
005b816a              break;
005b816a          }
005b817e          case 5:
005b817e          {
005b817e              AC1Legacy::PStringBase<char>::set(arg2, "Ta-chueh");
005b8188              return 1;
005b817e              break;
005b817e          }
005b8192          case 6:
005b8192          {
005b8192              AC1Legacy::PStringBase<char>::set(arg2, "Kun-chueh");
005b819c              return 1;
005b8192              break;
005b8192          }
005b81a6          case 7:
005b81a6          {
005b81a6              AC1Legacy::PStringBase<char>::set(arg2, &data_7e6ef8);
005b81b0              return 1;
005b81a6              break;
005b81a6          }
005b81ba          case 8:
005b81ba          {
005b81ba              AC1Legacy::PStringBase<char>::set(arg2, "Taikou");
005b81c4              return 1;
005b81ba              break;
005b81ba          }
005b81ce          case 9:
005b81ce          {
005b81ce              AC1Legacy::PStringBase<char>::set(arg2, "Jo-ou");
005b81d8              return 1;
005b81ce              break;
005b81ce          }
005b81e2          case 0xa:
005b81e2          {
005b81e2              AC1Legacy::PStringBase<char>::set(arg2, "Koutei");
005b81ec              return 1;
005b81e2              break;
005b81e2          }
005b811e      }
005b8110  }

005b81f0  uint32_t jump_table_5b81f0[0xa] = 
005b81f0  {
005b81f0      [0x0] =  0x005b8125
005b81f4      [0x1] =  0x005b8139
005b81f8      [0x2] =  0x005b814d
005b81fc      [0x3] =  0x005b8161
005b8200      [0x4] =  0x005b8175
005b8204      [0x5] =  0x005b8189
005b8208      [0x6] =  0x005b819d
005b820c      [0x7] =  0x005b81b1
005b8210      [0x8] =  0x005b81c5
005b8214      [0x9] =  0x005b81d9
005b8218  }

005b8218                                                                          90 90 90 90 90 90 90 90                          ........

005b8220  int32_t AllegianceSystem::GetViamontianMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8220  {
005b8228      if ((arg1 - 1) > 9)
005b82ff          return 0;
005b82ff      
005b822e      switch (arg1)
005b822e      {
005b823e          case 1:
005b823e          {
005b823e              AC1Legacy::PStringBase<char>::set(arg2, "Squire");
005b8248              return 1;
005b823e              break;
005b823e          }
005b8252          case 2:
005b8252          {
005b8252              AC1Legacy::PStringBase<char>::set(arg2, "Banner");
005b825c              return 1;
005b8252              break;
005b8252          }
005b8266          case 3:
005b8266          {
005b8266              AC1Legacy::PStringBase<char>::set(arg2, "Baron");
005b8270              return 1;
005b8266              break;
005b8266          }
005b827a          case 4:
005b827a          {
005b827a              AC1Legacy::PStringBase<char>::set(arg2, "Viscount");
005b8284              return 1;
005b827a              break;
005b827a          }
005b828e          case 5:
005b828e          {
005b828e              AC1Legacy::PStringBase<char>::set(arg2, "Count");
005b8298              return 1;
005b828e              break;
005b828e          }
005b82a2          case 6:
005b82a2          {
005b82a2              AC1Legacy::PStringBase<char>::set(arg2, "Marquis");
005b82ac              return 1;
005b82a2              break;
005b82a2          }
005b82b6          case 7:
005b82b6          {
005b82b6              AC1Legacy::PStringBase<char>::set(arg2, "Duke");
005b82c0              return 1;
005b82b6              break;
005b82b6          }
005b82ca          case 8:
005b82ca          {
005b82ca              AC1Legacy::PStringBase<char>::set(arg2, "Grand Duke");
005b82d4              return 1;
005b82ca              break;
005b82ca          }
005b82de          case 9:
005b82de          {
005b82de              AC1Legacy::PStringBase<char>::set(arg2, "King");
005b82e8              return 1;
005b82de              break;
005b82de          }
005b82f2          case 0xa:
005b82f2          {
005b82f2              AC1Legacy::PStringBase<char>::set(arg2, "High King");
005b82fc              return 1;
005b82f2              break;
005b82f2          }
005b822e      }
005b8220  }

005b8300  uint32_t jump_table_5b8300[0xa] = 
005b8300  {
005b8300      [0x0] =  0x005b8235
005b8304      [0x1] =  0x005b8249
005b8308      [0x2] =  0x005b825d
005b830c      [0x3] =  0x005b8271
005b8310      [0x4] =  0x005b8285
005b8314      [0x5] =  0x005b8299
005b8318      [0x6] =  0x005b82ad
005b831c      [0x7] =  0x005b82c1
005b8320      [0x8] =  0x005b82d5
005b8324      [0x9] =  0x005b82e9
005b8328  }

005b8328                          90 90 90 90 90 90 90 90                                                          ........

005b8330  int32_t AllegianceSystem::GetViamontianFemaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8330  {
005b8338      if ((arg1 - 1) > 9)
005b840f          return 0;
005b840f      
005b833e      switch (arg1)
005b833e      {
005b834e          case 1:
005b834e          {
005b834e              AC1Legacy::PStringBase<char>::set(arg2, "Dame");
005b8358              return 1;
005b834e              break;
005b834e          }
005b8362          case 2:
005b8362          {
005b8362              AC1Legacy::PStringBase<char>::set(arg2, "Banner");
005b836c              return 1;
005b8362              break;
005b8362          }
005b8376          case 3:
005b8376          {
005b8376              AC1Legacy::PStringBase<char>::set(arg2, "Baroness");
005b8380              return 1;
005b8376              break;
005b8376          }
005b838a          case 4:
005b838a          {
005b838a              AC1Legacy::PStringBase<char>::set(arg2, "Viscountess");
005b8394              return 1;
005b838a              break;
005b838a          }
005b839e          case 5:
005b839e          {
005b839e              AC1Legacy::PStringBase<char>::set(arg2, "Countess");
005b83a8              return 1;
005b839e              break;
005b839e          }
005b83b2          case 6:
005b83b2          {
005b83b2              AC1Legacy::PStringBase<char>::set(arg2, "Marquise");
005b83bc              return 1;
005b83b2              break;
005b83b2          }
005b83c6          case 7:
005b83c6          {
005b83c6              AC1Legacy::PStringBase<char>::set(arg2, "Duchess");
005b83d0              return 1;
005b83c6              break;
005b83c6          }
005b83da          case 8:
005b83da          {
005b83da              AC1Legacy::PStringBase<char>::set(arg2, "Grand Duchess");
005b83e4              return 1;
005b83da              break;
005b83da          }
005b83ee          case 9:
005b83ee          {
005b83ee              AC1Legacy::PStringBase<char>::set(arg2, "Queen");
005b83f8              return 1;
005b83ee              break;
005b83ee          }
005b8402          case 0xa:
005b8402          {
005b8402              AC1Legacy::PStringBase<char>::set(arg2, "High Queen");
005b840c              return 1;
005b8402              break;
005b8402          }
005b833e      }
005b8330  }

005b8410  uint32_t jump_table_5b8410[0xa] = 
005b8410  {
005b8410      [0x0] =  0x005b8345
005b8414      [0x1] =  0x005b8359
005b8418      [0x2] =  0x005b836d
005b841c      [0x3] =  0x005b8381
005b8420      [0x4] =  0x005b8395
005b8424      [0x5] =  0x005b83a9
005b8428      [0x6] =  0x005b83bd
005b842c      [0x7] =  0x005b83d1
005b8430      [0x8] =  0x005b83e5
005b8434      [0x9] =  0x005b83f9
005b8438  }

005b8438                                                                          90 90 90 90 90 90 90 90                          ........

005b8440  int32_t AllegianceSystem::GetShadowboundMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8440  {
005b8448      if ((arg1 - 1) > 9)
005b851f          return 0;
005b851f      
005b844e      switch (arg1)
005b844e      {
005b845e          case 1:
005b845e          {
005b845e              AC1Legacy::PStringBase<char>::set(arg2, "Tenebrous");
005b8468              return 1;
005b845e              break;
005b845e          }
005b8472          case 2:
005b8472          {
005b8472              AC1Legacy::PStringBase<char>::set(arg2, "Shade");
005b847c              return 1;
005b8472              break;
005b8472          }
005b8486          case 3:
005b8486          {
005b8486              AC1Legacy::PStringBase<char>::set(arg2, "Squire");
005b8490              return 1;
005b8486              break;
005b8486          }
005b849a          case 4:
005b849a          {
005b849a              AC1Legacy::PStringBase<char>::set(arg2, "Knight");
005b84a4              return 1;
005b849a              break;
005b849a          }
005b84ae          case 5:
005b84ae          {
005b84ae              AC1Legacy::PStringBase<char>::set(arg2, "Void Knight");
005b84b8              return 1;
005b84ae              break;
005b84ae          }
005b84c2          case 6:
005b84c2          {
005b84c2              AC1Legacy::PStringBase<char>::set(arg2, "Void Lord");
005b84cc              return 1;
005b84c2              break;
005b84c2          }
005b84d6          case 7:
005b84d6          {
005b84d6              AC1Legacy::PStringBase<char>::set(arg2, "Duke");
005b84e0              return 1;
005b84d6              break;
005b84d6          }
005b84ea          case 8:
005b84ea          {
005b84ea              AC1Legacy::PStringBase<char>::set(arg2, "Archduke");
005b84f4              return 1;
005b84ea              break;
005b84ea          }
005b84fe          case 9:
005b84fe          {
005b84fe              AC1Legacy::PStringBase<char>::set(arg2, "Highborn");
005b8508              return 1;
005b84fe              break;
005b84fe          }
005b8512          case 0xa:
005b8512          {
005b8512              AC1Legacy::PStringBase<char>::set(arg2, "King");
005b851c              return 1;
005b8512              break;
005b8512          }
005b844e      }
005b8440  }

005b8520  uint32_t jump_table_5b8520[0xa] = 
005b8520  {
005b8520      [0x0] =  0x005b8455
005b8524      [0x1] =  0x005b8469
005b8528      [0x2] =  0x005b847d
005b852c      [0x3] =  0x005b8491
005b8530      [0x4] =  0x005b84a5
005b8534      [0x5] =  0x005b84b9
005b8538      [0x6] =  0x005b84cd
005b853c      [0x7] =  0x005b84e1
005b8540      [0x8] =  0x005b84f5
005b8544      [0x9] =  0x005b8509
005b8548  }

005b8548                          90 90 90 90 90 90 90 90                                                          ........

005b8550  int32_t AllegianceSystem::GetShadowboundFemaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8550  {
005b8558      if ((arg1 - 1) > 9)
005b862f          return 0;
005b862f      
005b855e      switch (arg1)
005b855e      {
005b856e          case 1:
005b856e          {
005b856e              AC1Legacy::PStringBase<char>::set(arg2, "Tenebrous");
005b8578              return 1;
005b856e              break;
005b856e          }
005b8582          case 2:
005b8582          {
005b8582              AC1Legacy::PStringBase<char>::set(arg2, "Shade");
005b858c              return 1;
005b8582              break;
005b8582          }
005b8596          case 3:
005b8596          {
005b8596              AC1Legacy::PStringBase<char>::set(arg2, "Squire");
005b85a0              return 1;
005b8596              break;
005b8596          }
005b85aa          case 4:
005b85aa          {
005b85aa              AC1Legacy::PStringBase<char>::set(arg2, "Knight");
005b85b4              return 1;
005b85aa              break;
005b85aa          }
005b85be          case 5:
005b85be          {
005b85be              AC1Legacy::PStringBase<char>::set(arg2, "Void Knight");
005b85c8              return 1;
005b85be              break;
005b85be          }
005b85d2          case 6:
005b85d2          {
005b85d2              AC1Legacy::PStringBase<char>::set(arg2, "Void Lady");
005b85dc              return 1;
005b85d2              break;
005b85d2          }
005b85e6          case 7:
005b85e6          {
005b85e6              AC1Legacy::PStringBase<char>::set(arg2, "Duchess");
005b85f0              return 1;
005b85e6              break;
005b85e6          }
005b85fa          case 8:
005b85fa          {
005b85fa              AC1Legacy::PStringBase<char>::set(arg2, "Archduchess");
005b8604              return 1;
005b85fa              break;
005b85fa          }
005b860e          case 9:
005b860e          {
005b860e              AC1Legacy::PStringBase<char>::set(arg2, "Highborn");
005b8618              return 1;
005b860e              break;
005b860e          }
005b8622          case 0xa:
005b8622          {
005b8622              AC1Legacy::PStringBase<char>::set(arg2, "Queen");
005b862c              return 1;
005b8622              break;
005b8622          }
005b855e      }
005b8550  }

005b8630  uint32_t jump_table_5b8630[0xa] = 
005b8630  {
005b8630      [0x0] =  0x005b8565
005b8634      [0x1] =  0x005b8579
005b8638      [0x2] =  0x005b858d
005b863c      [0x3] =  0x005b85a1
005b8640      [0x4] =  0x005b85b5
005b8644      [0x5] =  0x005b85c9
005b8648      [0x6] =  0x005b85dd
005b864c      [0x7] =  0x005b85f1
005b8650      [0x8] =  0x005b8605
005b8654      [0x9] =  0x005b8619
005b8658  }

005b8658                                                                          90 90 90 90 90 90 90 90                          ........

005b8660  int32_t AllegianceSystem::GetGearknightMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8660  {
005b8668      if ((arg1 - 1) > 9)
005b873f          return 0;
005b873f      
005b866e      switch (arg1)
005b866e      {
005b867e          case 1:
005b867e          {
005b867e              AC1Legacy::PStringBase<char>::set(arg2, "Tribunus");
005b8688              return 1;
005b867e              break;
005b867e          }
005b8692          case 2:
005b8692          {
005b8692              AC1Legacy::PStringBase<char>::set(arg2, "Praefectus");
005b869c              return 1;
005b8692              break;
005b8692          }
005b86a6          case 3:
005b86a6          {
005b86a6              AC1Legacy::PStringBase<char>::set(arg2, "Optio");
005b86b0              return 1;
005b86a6              break;
005b86a6          }
005b86ba          case 4:
005b86ba          {
005b86ba              AC1Legacy::PStringBase<char>::set(arg2, "Centurion");
005b86c4              return 1;
005b86ba              break;
005b86ba          }
005b86ce          case 5:
005b86ce          {
005b86ce              AC1Legacy::PStringBase<char>::set(arg2, "Principes");
005b86d8              return 1;
005b86ce              break;
005b86ce          }
005b86e2          case 6:
005b86e2          {
005b86e2              AC1Legacy::PStringBase<char>::set(arg2, "Legatus");
005b86ec              return 1;
005b86e2              break;
005b86e2          }
005b86f6          case 7:
005b86f6          {
005b86f6              AC1Legacy::PStringBase<char>::set(arg2, "Consul");
005b8700              return 1;
005b86f6              break;
005b86f6          }
005b870a          case 8:
005b870a          {
005b870a              AC1Legacy::PStringBase<char>::set(arg2, &data_7e7034);
005b8714              return 1;
005b870a              break;
005b870a          }
005b871e          case 9:
005b871e          {
005b871e              AC1Legacy::PStringBase<char>::set(arg2, "Secondus");
005b8728              return 1;
005b871e              break;
005b871e          }
005b8732          case 0xa:
005b8732          {
005b8732              AC1Legacy::PStringBase<char>::set(arg2, "Primus");
005b873c              return 1;
005b8732              break;
005b8732          }
005b866e      }
005b8660  }

005b8740  uint32_t jump_table_5b8740[0xa] = 
005b8740  {
005b8740      [0x0] =  0x005b8675
005b8744      [0x1] =  0x005b8689
005b8748      [0x2] =  0x005b869d
005b874c      [0x3] =  0x005b86b1
005b8750      [0x4] =  0x005b86c5
005b8754      [0x5] =  0x005b86d9
005b8758      [0x6] =  0x005b86ed
005b875c      [0x7] =  0x005b8701
005b8760      [0x8] =  0x005b8715
005b8764      [0x9] =  0x005b8729
005b8768  }

005b8768                          90 90 90 90 90 90 90 90                                                          ........

005b8770  int32_t AllegianceSystem::GetTumerokMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8770  {
005b8778      if ((arg1 - 1) > 9)
005b884f          return 0;
005b884f      
005b877e      switch (arg1)
005b877e      {
005b878e          case 1:
005b878e          {
005b878e              AC1Legacy::PStringBase<char>::set(arg2, "Xutua");
005b8798              return 1;
005b878e              break;
005b878e          }
005b87a2          case 2:
005b87a2          {
005b87a2              AC1Legacy::PStringBase<char>::set(arg2, "Tuona");
005b87ac              return 1;
005b87a2              break;
005b87a2          }
005b87b6          case 3:
005b87b6          {
005b87b6              AC1Legacy::PStringBase<char>::set(arg2, &data_7e70b0);
005b87c0              return 1;
005b87b6              break;
005b87b6          }
005b87ca          case 4:
005b87ca          {
005b87ca              AC1Legacy::PStringBase<char>::set(arg2, "Nuona");
005b87d4              return 1;
005b87ca              break;
005b87ca          }
005b87de          case 5:
005b87de          {
005b87de              AC1Legacy::PStringBase<char>::set(arg2, "Turea");
005b87e8              return 1;
005b87de              break;
005b87de          }
005b87f2          case 6:
005b87f2          {
005b87f2              AC1Legacy::PStringBase<char>::set(arg2, &data_7e709c);
005b87fc              return 1;
005b87f2              break;
005b87f2          }
005b8806          case 7:
005b8806          {
005b8806              AC1Legacy::PStringBase<char>::set(arg2, "Nurea");
005b8810              return 1;
005b8806              break;
005b8806          }
005b881a          case 8:
005b881a          {
005b881a              AC1Legacy::PStringBase<char>::set(arg2, "Kauh");
005b8824              return 1;
005b881a              break;
005b881a          }
005b882e          case 9:
005b882e          {
005b882e              AC1Legacy::PStringBase<char>::set(arg2, "Sutah");
005b8838              return 1;
005b882e              break;
005b882e          }
005b8842          case 0xa:
005b8842          {
005b8842              AC1Legacy::PStringBase<char>::set(arg2, &data_7e7080);
005b884c              return 1;
005b8842              break;
005b8842          }
005b877e      }
005b8770  }

005b8850  uint32_t jump_table_5b8850[0xa] = 
005b8850  {
005b8850      [0x0] =  0x005b8785
005b8854      [0x1] =  0x005b8799
005b8858      [0x2] =  0x005b87ad
005b885c      [0x3] =  0x005b87c1
005b8860      [0x4] =  0x005b87d5
005b8864      [0x5] =  0x005b87e9
005b8868      [0x6] =  0x005b87fd
005b886c      [0x7] =  0x005b8811
005b8870      [0x8] =  0x005b8825
005b8874      [0x9] =  0x005b8839
005b8878  }

005b8878                                                                          90 90 90 90 90 90 90 90                          ........

005b8880  int32_t AllegianceSystem::GetLugianFemaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8880  {
005b8888      if ((arg1 - 1) > 9)
005b895f          return 0;
005b895f      
005b888e      switch (arg1)
005b888e      {
005b889e          case 1:
005b889e          {
005b889e              AC1Legacy::PStringBase<char>::set(arg2, "Laigus");
005b88a8              return 1;
005b889e              break;
005b889e          }
005b88b2          case 2:
005b88b2          {
005b88b2              AC1Legacy::PStringBase<char>::set(arg2, "Raigus");
005b88bc              return 1;
005b88b2              break;
005b88b2          }
005b88c6          case 3:
005b88c6          {
005b88c6              AC1Legacy::PStringBase<char>::set(arg2, "Amploth");
005b88d0              return 1;
005b88c6              break;
005b88c6          }
005b88da          case 4:
005b88da          {
005b88da              AC1Legacy::PStringBase<char>::set(arg2, "Arintoth");
005b88e4              return 1;
005b88da              break;
005b88da          }
005b88ee          case 5:
005b88ee          {
005b88ee              AC1Legacy::PStringBase<char>::set(arg2, "Obeloth");
005b88f8              return 1;
005b88ee              break;
005b88ee          }
005b8902          case 6:
005b8902          {
005b8902              AC1Legacy::PStringBase<char>::set(arg2, "Lithos");
005b890c              return 1;
005b8902              break;
005b8902          }
005b8916          case 7:
005b8916          {
005b8916              AC1Legacy::PStringBase<char>::set(arg2, "Kantos");
005b8920              return 1;
005b8916              break;
005b8916          }
005b892a          case 8:
005b892a          {
005b892a              AC1Legacy::PStringBase<char>::set(arg2, "Gigas");
005b8934              return 1;
005b892a              break;
005b892a          }
005b893e          case 9:
005b893e          {
005b893e              AC1Legacy::PStringBase<char>::set(arg2, "Extas");
005b8948              return 1;
005b893e              break;
005b893e          }
005b8952          case 0xa:
005b8952          {
005b8952              AC1Legacy::PStringBase<char>::set(arg2, "Tiatus");
005b895c              return 1;
005b8952              break;
005b8952          }
005b888e      }
005b8880  }

005b8960  uint32_t jump_table_5b8960[0xa] = 
005b8960  {
005b8960      [0x0] =  0x005b8895
005b8964      [0x1] =  0x005b88a9
005b8968      [0x2] =  0x005b88bd
005b896c      [0x3] =  0x005b88d1
005b8970      [0x4] =  0x005b88e5
005b8974      [0x5] =  0x005b88f9
005b8978      [0x6] =  0x005b890d
005b897c      [0x7] =  0x005b8921
005b8980      [0x8] =  0x005b8935
005b8984      [0x9] =  0x005b8949
005b8988  }

005b8988                          90 90 90 90 90 90 90 90                                                          ........

005b8990  int32_t AllegianceSystem::GetEmpyreanMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8990  {
005b8998      if ((arg1 - 1) > 9)
005b8a6f          return 0;
005b8a6f      
005b899e      switch (arg1)
005b899e      {
005b89ae          case 1:
005b89ae          {
005b89ae              AC1Legacy::PStringBase<char>::set(arg2, "Ensign");
005b89b8              return 1;
005b89ae              break;
005b89ae          }
005b89c2          case 2:
005b89c2          {
005b89c2              AC1Legacy::PStringBase<char>::set(arg2, "Corporal");
005b89cc              return 1;
005b89c2              break;
005b89c2          }
005b89d6          case 3:
005b89d6          {
005b89d6              AC1Legacy::PStringBase<char>::set(arg2, "Lieutenant");
005b89e0              return 1;
005b89d6              break;
005b89d6          }
005b89ea          case 4:
005b89ea          {
005b89ea              AC1Legacy::PStringBase<char>::set(arg2, "Commander");
005b89f4              return 1;
005b89ea              break;
005b89ea          }
005b89fe          case 5:
005b89fe          {
005b89fe              AC1Legacy::PStringBase<char>::set(arg2, "Captain");
005b8a08              return 1;
005b89fe              break;
005b89fe          }
005b8a12          case 6:
005b8a12          {
005b8a12              AC1Legacy::PStringBase<char>::set(arg2, "Commodore");
005b8a1c              return 1;
005b8a12              break;
005b8a12          }
005b8a26          case 7:
005b8a26          {
005b8a26              AC1Legacy::PStringBase<char>::set(arg2, "Admiral");
005b8a30              return 1;
005b8a26              break;
005b8a26          }
005b8a3a          case 8:
005b8a3a          {
005b8a3a              AC1Legacy::PStringBase<char>::set(arg2, "Warlord");
005b8a44              return 1;
005b8a3a              break;
005b8a3a          }
005b8a4e          case 9:
005b8a4e          {
005b8a4e              AC1Legacy::PStringBase<char>::set(arg2, "Ipharsin");
005b8a58              return 1;
005b8a4e              break;
005b8a4e          }
005b8a62          case 0xa:
005b8a62          {
005b8a62              AC1Legacy::PStringBase<char>::set(arg2, "Aulin");
005b8a6c              return 1;
005b8a62              break;
005b8a62          }
005b899e      }
005b8990  }

005b8a70  uint32_t jump_table_5b8a70[0xa] = 
005b8a70  {
005b8a70      [0x0] =  0x005b89a5
005b8a74      [0x1] =  0x005b89b9
005b8a78      [0x2] =  0x005b89cd
005b8a7c      [0x3] =  0x005b89e1
005b8a80      [0x4] =  0x005b89f5
005b8a84      [0x5] =  0x005b8a09
005b8a88      [0x6] =  0x005b8a1d
005b8a8c      [0x7] =  0x005b8a31
005b8a90      [0x8] =  0x005b8a45
005b8a94      [0x9] =  0x005b8a59
005b8a98  }

005b8a98                                                                          90 90 90 90 90 90 90 90                          ........

005b8aa0  int32_t AllegianceSystem::GetEmpyreanFemaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8aa0  {
005b8aa8      if ((arg1 - 1) > 9)
005b8b7f          return 0;
005b8b7f      
005b8aae      switch (arg1)
005b8aae      {
005b8abe          case 1:
005b8abe          {
005b8abe              AC1Legacy::PStringBase<char>::set(arg2, "Ensign");
005b8ac8              return 1;
005b8abe              break;
005b8abe          }
005b8ad2          case 2:
005b8ad2          {
005b8ad2              AC1Legacy::PStringBase<char>::set(arg2, "Corporal");
005b8adc              return 1;
005b8ad2              break;
005b8ad2          }
005b8ae6          case 3:
005b8ae6          {
005b8ae6              AC1Legacy::PStringBase<char>::set(arg2, "Lieutenant");
005b8af0              return 1;
005b8ae6              break;
005b8ae6          }
005b8afa          case 4:
005b8afa          {
005b8afa              AC1Legacy::PStringBase<char>::set(arg2, "Commander");
005b8b04              return 1;
005b8afa              break;
005b8afa          }
005b8b0e          case 5:
005b8b0e          {
005b8b0e              AC1Legacy::PStringBase<char>::set(arg2, "Captain");
005b8b18              return 1;
005b8b0e              break;
005b8b0e          }
005b8b22          case 6:
005b8b22          {
005b8b22              AC1Legacy::PStringBase<char>::set(arg2, "Commodore");
005b8b2c              return 1;
005b8b22              break;
005b8b22          }
005b8b36          case 7:
005b8b36          {
005b8b36              AC1Legacy::PStringBase<char>::set(arg2, "Admiral");
005b8b40              return 1;
005b8b36              break;
005b8b36          }
005b8b4a          case 8:
005b8b4a          {
005b8b4a              AC1Legacy::PStringBase<char>::set(arg2, "Warlord");
005b8b54              return 1;
005b8b4a              break;
005b8b4a          }
005b8b5e          case 9:
005b8b5e          {
005b8b5e              AC1Legacy::PStringBase<char>::set(arg2, "Ipharsia");
005b8b68              return 1;
005b8b5e              break;
005b8b5e          }
005b8b72          case 0xa:
005b8b72          {
005b8b72              AC1Legacy::PStringBase<char>::set(arg2, "Aulia");
005b8b7c              return 1;
005b8b72              break;
005b8b72          }
005b8aae      }
005b8aa0  }

005b8b80  uint32_t jump_table_5b8b80[0xa] = 
005b8b80  {
005b8b80      [0x0] =  0x005b8ab5
005b8b84      [0x1] =  0x005b8ac9
005b8b88      [0x2] =  0x005b8add
005b8b8c      [0x3] =  0x005b8af1
005b8b90      [0x4] =  0x005b8b05
005b8b94      [0x5] =  0x005b8b19
005b8b98      [0x6] =  0x005b8b2d
005b8b9c      [0x7] =  0x005b8b41
005b8ba0      [0x8] =  0x005b8b55
005b8ba4      [0x9] =  0x005b8b69
005b8ba8  }

005b8ba8                          90 90 90 90 90 90 90 90                                                          ........

005b8bb0  int32_t AllegianceSystem::GetUndeadMaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8bb0  {
005b8bb8      if ((arg1 - 1) > 9)
005b8c8f          return 0;
005b8c8f      
005b8bbe      switch (arg1)
005b8bbe      {
005b8bce          case 1:
005b8bce          {
005b8bce              AC1Legacy::PStringBase<char>::set(arg2, "Neophyte");
005b8bd8              return 1;
005b8bce              break;
005b8bce          }
005b8be2          case 2:
005b8be2          {
005b8be2              AC1Legacy::PStringBase<char>::set(arg2, "Acolyte");
005b8bec              return 1;
005b8be2              break;
005b8be2          }
005b8bf6          case 3:
005b8bf6          {
005b8bf6              AC1Legacy::PStringBase<char>::set(arg2, "Adept");
005b8c00              return 1;
005b8bf6              break;
005b8bf6          }
005b8c0a          case 4:
005b8c0a          {
005b8c0a              AC1Legacy::PStringBase<char>::set(arg2, "Esquire");
005b8c14              return 1;
005b8c0a              break;
005b8c0a          }
005b8c1e          case 5:
005b8c1e          {
005b8c1e              AC1Legacy::PStringBase<char>::set(arg2, "Squire");
005b8c28              return 1;
005b8c1e              break;
005b8c1e          }
005b8c32          case 6:
005b8c32          {
005b8c32              AC1Legacy::PStringBase<char>::set(arg2, "Knight");
005b8c3c              return 1;
005b8c32              break;
005b8c32          }
005b8c46          case 7:
005b8c46          {
005b8c46              AC1Legacy::PStringBase<char>::set(arg2, "Count");
005b8c50              return 1;
005b8c46              break;
005b8c46          }
005b8c5a          case 8:
005b8c5a          {
005b8c5a              AC1Legacy::PStringBase<char>::set(arg2, "Viscount");
005b8c64              return 1;
005b8c5a              break;
005b8c5a          }
005b8c6e          case 9:
005b8c6e          {
005b8c6e              AC1Legacy::PStringBase<char>::set(arg2, "Highness");
005b8c78              return 1;
005b8c6e              break;
005b8c6e          }
005b8c82          case 0xa:
005b8c82          {
005b8c82              AC1Legacy::PStringBase<char>::set(arg2, "Annointed");
005b8c8c              return 1;
005b8c82              break;
005b8c82          }
005b8bbe      }
005b8bb0  }

005b8c90  uint32_t jump_table_5b8c90[0xa] = 
005b8c90  {
005b8c90      [0x0] =  0x005b8bc5
005b8c94      [0x1] =  0x005b8bd9
005b8c98      [0x2] =  0x005b8bed
005b8c9c      [0x3] =  0x005b8c01
005b8ca0      [0x4] =  0x005b8c15
005b8ca4      [0x5] =  0x005b8c29
005b8ca8      [0x6] =  0x005b8c3d
005b8cac      [0x7] =  0x005b8c51
005b8cb0      [0x8] =  0x005b8c65
005b8cb4      [0x9] =  0x005b8c79
005b8cb8  }

005b8cb8                                                                          90 90 90 90 90 90 90 90                          ........

005b8cc0  int32_t AllegianceSystem::GetUndeadFemaleTitle(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005b8cc0  {
005b8cc8      if ((arg1 - 1) > 9)
005b8d9f          return 0;
005b8d9f      
005b8cce      switch (arg1)
005b8cce      {
005b8cde          case 1:
005b8cde          {
005b8cde              AC1Legacy::PStringBase<char>::set(arg2, "Neophyte");
005b8ce8              return 1;
005b8cde              break;
005b8cde          }
005b8cf2          case 2:
005b8cf2          {
005b8cf2              AC1Legacy::PStringBase<char>::set(arg2, "Acolyte");
005b8cfc              return 1;
005b8cf2              break;
005b8cf2          }
005b8d06          case 3:
005b8d06          {
005b8d06              AC1Legacy::PStringBase<char>::set(arg2, "Adept");
005b8d10              return 1;
005b8d06              break;
005b8d06          }
005b8d1a          case 4:
005b8d1a          {
005b8d1a              AC1Legacy::PStringBase<char>::set(arg2, "Esquire");
005b8d24              return 1;
005b8d1a              break;
005b8d1a          }
005b8d2e          case 5:
005b8d2e          {
005b8d2e              AC1Legacy::PStringBase<char>::set(arg2, "Squire");
005b8d38              return 1;
005b8d2e              break;
005b8d2e          }
005b8d42          case 6:
005b8d42          {
005b8d42              AC1Legacy::PStringBase<char>::set(arg2, "Knight");
005b8d4c              return 1;
005b8d42              break;
005b8d42          }
005b8d56          case 7:
005b8d56          {
005b8d56              AC1Legacy::PStringBase<char>::set(arg2, "Countess");
005b8d60              return 1;
005b8d56              break;
005b8d56          }
005b8d6a          case 8:
005b8d6a          {
005b8d6a              AC1Legacy::PStringBase<char>::set(arg2, "Viscountess");
005b8d74              return 1;
005b8d6a              break;
005b8d6a          }
005b8d7e          case 9:
005b8d7e          {
005b8d7e              AC1Legacy::PStringBase<char>::set(arg2, "Highness");
005b8d88              return 1;
005b8d7e              break;
005b8d7e          }
005b8d92          case 0xa:
005b8d92          {
005b8d92              AC1Legacy::PStringBase<char>::set(arg2, "Annointed");
005b8d9c              return 1;
005b8d92              break;
005b8d92          }
005b8cce      }
005b8cc0  }

005b8da0  uint32_t jump_table_5b8da0[0xa] = 
005b8da0  {
005b8da0      [0x0] =  0x005b8cd5
005b8da4      [0x1] =  0x005b8ce9
005b8da8      [0x2] =  0x005b8cfd
005b8dac      [0x3] =  0x005b8d11
005b8db0      [0x4] =  0x005b8d25
005b8db4      [0x5] =  0x005b8d39
005b8db8      [0x6] =  0x005b8d4d
005b8dbc      [0x7] =  0x005b8d61
005b8dc0      [0x8] =  0x005b8d75
005b8dc4      [0x9] =  0x005b8d89
005b8dc8  }

005b8dc8                          90 90 90 90 90 90 90 90                                                          ........

005b8dd0  int32_t AllegianceSystem::GetTitle(uint32_t arg1, uint32_t arg2, uint32_t arg3, class AC1Legacy::PStringBase<char>* arg4)

005b8dd0  {
005b8dd5      if (arg3 == 1)
005b8dd5      {
005b8ebd          if ((arg2 - 1) <= 0xa)
005b8ec3              switch (arg2)
005b8ec3              {
005b8edc                  case 1:
005b8edc                  {
005b8edc                      return AllegianceSystem::GetAluvianMaleTitle(arg1, arg4);
005b8edc                      break;
005b8edc                  }
005b8eef                  case 2:
005b8eef                  {
005b8eef                      return AllegianceSystem::GetGharundimMaleTitle(arg1, arg4);
005b8eef                      break;
005b8eef                  }
005b8f02                  case 3:
005b8f02                  {
005b8f02                      return AllegianceSystem::GetShoMaleTitle(arg1, arg4);
005b8f02                      break;
005b8f02                  }
005b8f15                  case 4:
005b8f15                  {
005b8f15                      return AllegianceSystem::GetViamontianMaleTitle(arg1, arg4);
005b8f15                      break;
005b8f15                  }
005b8f28                  case 5:
005b8f28                  case 0xa:
005b8f28                  {
005b8f28                      return AllegianceSystem::GetShadowboundMaleTitle(arg1, arg4);
005b8f28                      break;
005b8f28                  }
005b8f3b                  case 6:
005b8f3b                  {
005b8f3b                      return AllegianceSystem::GetGearknightMaleTitle(arg1, arg4);
005b8f3b                      break;
005b8f3b                  }
005b8f4e                  case 7:
005b8f4e                  {
005b8f4e                      return AllegianceSystem::GetTumerokMaleTitle(arg1, arg4);
005b8f4e                      break;
005b8f4e                  }
005b8f61                  case 8:
005b8f61                  {
005b8f61                      return AllegianceSystem::GetLugianFemaleTitle(arg1, arg4);
005b8f61                      break;
005b8f61                  }
005b8f74                  case 9:
005b8f74                  {
005b8f74                      return AllegianceSystem::GetEmpyreanMaleTitle(arg1, arg4);
005b8f74                      break;
005b8f74                  }
005b8f87                  case 0xb:
005b8f87                  {
005b8f87                      return AllegianceSystem::GetUndeadMaleTitle(arg1, arg4);
005b8f87                      break;
005b8f87                  }
005b8ec3              }
005b8dd5      }
005b8dd5      else if ((arg3 == 2 && (arg2 - 1) <= 0xa))
005b8df0          switch (arg2)
005b8df0          {
005b8e09              case 1:
005b8e09              {
005b8e09                  return AllegianceSystem::GetAluvianFemaleTitle(arg1, arg4);
005b8e09                  break;
005b8e09              }
005b8e1c              case 2:
005b8e1c              {
005b8e1c                  return AllegianceSystem::GetGharundimFemaleTitle(arg1, arg4);
005b8e1c                  break;
005b8e1c              }
005b8e2f              case 3:
005b8e2f              {
005b8e2f                  return AllegianceSystem::GetShoFemaleTitle(arg1, arg4);
005b8e2f                  break;
005b8e2f              }
005b8e42              case 4:
005b8e42              {
005b8e42                  return AllegianceSystem::GetViamontianFemaleTitle(arg1, arg4);
005b8e42                  break;
005b8e42              }
005b8e55              case 5:
005b8e55              case 0xa:
005b8e55              {
005b8e55                  return AllegianceSystem::GetShadowboundFemaleTitle(arg1, arg4);
005b8e55                  break;
005b8e55              }
005b8e7b              case 6:
005b8e7b              {
005b8e7b                  return AllegianceSystem::GetGearknightMaleTitle(arg1, arg4);
005b8e7b                  break;
005b8e7b              }
005b8e68              case 7:
005b8e68              {
005b8e68                  return AllegianceSystem::GetTumerokMaleTitle(arg1, arg4);
005b8e68                  break;
005b8e68              }
005b8e8e              case 8:
005b8e8e              {
005b8e8e                  return AllegianceSystem::GetLugianFemaleTitle(arg1, arg4);
005b8e8e                  break;
005b8e8e              }
005b8ea1              case 9:
005b8ea1              {
005b8ea1                  return AllegianceSystem::GetEmpyreanFemaleTitle(arg1, arg4);
005b8ea1                  break;
005b8ea1              }
005b8eb4              case 0xb:
005b8eb4              {
005b8eb4                  return AllegianceSystem::GetUndeadFemaleTitle(arg1, arg4);
005b8eb4                  break;
005b8eb4              }
005b8df0          }
005b8df0      
005b8f8a      return 0;
005b8dd0  }

005b8f8b                                   90                                                                         .
005b8f8c  uint32_t jump_table_5b8f8c[0xb] = 
005b8f8c  {
005b8f8c      [0x0] =  0x005b8df7
005b8f90      [0x1] =  0x005b8e0a
005b8f94      [0x2] =  0x005b8e1d
005b8f98      [0x3] =  0x005b8e30
005b8f9c      [0x4] =  0x005b8e43
005b8fa0      [0x5] =  0x005b8e69
005b8fa4      [0x6] =  0x005b8e56
005b8fa8      [0x7] =  0x005b8e7c
005b8fac      [0x8] =  0x005b8e8f
005b8fb0      [0x9] =  0x005b8e43
005b8fb4      [0xa] =  0x005b8ea2
005b8fb8  }
005b8fb8  uint32_t jump_table_5b8fb8[0xb] = 
005b8fb8  {
005b8fb8      [0x0] =  0x005b8eca
005b8fbc      [0x1] =  0x005b8edd
005b8fc0      [0x2] =  0x005b8ef0
005b8fc4      [0x3] =  0x005b8f03
005b8fc8      [0x4] =  0x005b8f16
005b8fcc      [0x5] =  0x005b8f29
005b8fd0      [0x6] =  0x005b8f3c
005b8fd4      [0x7] =  0x005b8f4f
005b8fd8      [0x8] =  0x005b8f62
005b8fdc      [0x9] =  0x005b8f16
005b8fe0      [0xa] =  0x005b8f75
005b8fe4  }

005b8fe4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005b8ff0  uint32_t __thiscall AllegianceNode::Pack(class AllegianceNode* this, void** arg2, uint32_t arg3)

005b8ff0  {
005b8ff5      /* jump -> this->_data.vtable->Pack */
005b8ff0  }

005b8ff8                                                                          90 90 90 90 90 90 90 90                          ........

005b9000  int32_t __thiscall AllegianceNode::UnPack(class AllegianceNode* this, void** arg2, uint32_t arg3)

005b9000  {
005b9005      /* jump -> this->_data.vtable->UnPack */
005b9000  }

005b9008                          90 90 90 90 90 90 90 90                                                          ........

005b9010  void __thiscall AllegianceNode::AllegianceNode(class AllegianceNode* this, class AllegianceData const* arg2)

005b9010  {
005b9015      this->_patron = nullptr;
005b9018      this->_peer = nullptr;
005b901b      this->_vassal = nullptr;
005b9026      this->vtable = 0x7e71cc;
005b902c      AllegianceData::AllegianceData(&this->_data, arg2);
005b9010  }

005b9037                                                                       90 90 90 90 90 90 90 90 90                         .........

005b9040  void* __thiscall AllegianceNode::`scalar deleting destructor'(class AllegianceNode* this, uint32_t arg2)

005b9040  {
005b9046      this->vtable = 0x7e71cc;
005b904c      AllegianceData::~AllegianceData(&this->_data);
005b9056      this->vtable = 0x79285c;
005b9056      
005b905c      if ((arg2 & 1) != 0)
005b905f          operator delete(this);
005b905f      
005b906a      return this;
005b9040  }

005b906d                                         90 90 90                                                               ...

005b9070  int32_t __convention("regparm") Fellowship::IsFull(class Fellowship const* this @ ecx)

005b9070  {
005b9077      int32_t eax;
005b9077      return ((eax - eax) + 1);
005b9070  }

005b9078                                                                          90 90 90 90 90 90 90 90                          ........

005b9080  int32_t __thiscall Fellowship::IsFellow(class Fellowship const* this, uint32_t arg2)

005b9080  {
005b9081      uint32_t _table_size = this->_fellowship_table._table_size;
005b9081      
005b9087      if (_table_size != 0)
005b9087      {
005b9089          class PackableHashData<unsigned long,Fellow>** _buckets = this->_fellowship_table._buckets;
005b9089          
005b908e          if (_buckets != 0)
005b908e          {
005b909f              for (int32_t* i = _buckets[(COMBINE(0, arg2) % _table_size)]; i != 0; i = i[0xd])
005b909f              {
005b90a3                  if (arg2 == *(uint32_t*)i)
005b90a3                  {
005b90c3                      int32_t result;
005b90c3                      result = i != 0xfffffffc;
005b90ca                      return result;
005b90a3                  }
005b909f              }
005b908e          }
005b9087      }
005b9087      
005b90b9      return 0;
005b9080  }

005b90cd                                         90 90 90                                                               ...

005b90d0  int32_t __thiscall Fellowship::InqFellow(class Fellowship const* this, uint32_t arg2, class Fellow* arg3)

005b90d0  {
005b90d1      uint32_t _table_size = this->_fellowship_table._table_size;
005b90d1      
005b90d7      if (_table_size != 0)
005b90d7      {
005b90d9          class PackableHashData<unsigned long,Fellow>** _buckets = this->_fellowship_table._buckets;
005b90d9          
005b90de          if (_buckets != 0)
005b90de          {
005b90ea              int32_t* edx_3 = _buckets[(COMBINE(0, arg2) % _table_size)];
005b90ea              
005b90ef              if (edx_3 != 0)
005b90ef              {
005b90f3                  while (arg2 != *(uint32_t*)edx_3)
005b90f3                  {
005b90f5                      edx_3 = edx_3[0xd];
005b90f5                      
005b90fa                      if (edx_3 == 0)
005b9100                          return 0;
005b90f3                  }
005b90f3                  
005b9108                  if (edx_3 != 0xfffffffc)
005b9108                  {
005b9116                      Fellow::operator=(arg3, &edx_3[1]);
005b9122                      return 1;
005b9108                  }
005b90ef              }
005b90de          }
005b90d7      }
005b90d7      
005b910e      return 0;
005b90d0  }

005b9125                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005b9130  uint32_t __fastcall Fellowship::CalculateExperienceProportionSum(class Fellowship* this)

005b9130  {
005b9138      if (this->_share_xp == 0)
005b913f          return 0;
005b913f      
005b914c      int32_t result = 0;
005b914e      void __return;
005b914e      PackableHashTable<unsigned long,Fellow>::begin(&this->_fellowship_table, &__return);
005b915b      void* i_1;
005b915b      void* const i = i_1;
005b915b      
005b9162      while (i != 0)
005b9162      {
005b916d          result += FellowshipSystem::GetExperienceProportion(*(uint32_t*)((char*)i + 0xc));
005b916f          void* i_2 = *(uint32_t*)((char*)i + 0x34);
005b916f          
005b9177          if (i_2 == 0)
005b9177          {
005b9180              int32_t eax_4 = (*(uint32_t*)((char*)i + 0x38) + 1);
005b9183              int32_t var_4;
005b9183              
005b9183              if (eax_4 >= var_4)
005b9183              {
005b9192              label_5b9192:
005b9192                  i = nullptr;
005b9183              }
005b9183              else
005b9183              {
005b9189                  int32_t var_8;
005b9189                  
005b9189                  while (*(uint32_t*)(var_8 + (eax_4 << 2)) == 0)
005b9189                  {
005b918b                      eax_4 += 1;
005b918b                      
005b918e                      if (eax_4 >= var_4)
005b918e                          goto label_5b9192;
005b9189                  }
005b9189                  
005b9199                  i = *(uint32_t*)(var_8 + (eax_4 << 2));
005b9183              }
005b9177          }
005b9177          else
005b9179              i = i_2;
005b9162      }
005b9162      
005b91a6      return result;
005b9130  }

005b91a7                       90 90 90 90 90 90 90 90 90                                                         .........

005b91b0  uint32_t __fastcall Fellowship::GetLeadersLevel(class Fellowship* this)

005b91b0  {
005b91b1      uint32_t _table_size = this->_fellowship_table._table_size;
005b91b7      uint32_t _leader = this->_leader;
005b91b7      
005b91ba      if (_table_size != 0)
005b91ba      {
005b91bc          class PackableHashData<unsigned long,Fellow>** _buckets = this->_fellowship_table._buckets;
005b91bc          
005b91c1          if (_buckets != 0)
005b91c1          {
005b91c9              int32_t* edx_3 = _buckets[(COMBINE(0, _leader) % _table_size)];
005b91c9              
005b91ce              if (edx_3 != 0)
005b91ce              {
005b91d2                  while (_leader != *(uint32_t*)edx_3)
005b91d2                  {
005b91d4                      edx_3 = edx_3[0xd];
005b91d4                      
005b91d9                      if (edx_3 == 0)
005b91e0                          return 0xffffffff;
005b91d2                  }
005b91d2                  
005b91e6                  if (edx_3 != 0xfffffffc)
005b91f3                      return edx_3[3];
005b91ce              }
005b91c1          }
005b91ba      }
005b91ba      
005b91ed      return 0xffffffff;
005b91b0  }

005b91f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b9200  uint32_t __fastcall Fellowship::GetNonLeaderFellowID(class Fellowship const* this)

005b9200  {
005b920f      void __return;
005b920f      PackableHashTable<unsigned long,Fellow>::begin(&this->_fellowship_table, &__return);
005b921c      int32_t* var_c;
005b921c      int32_t* eax = var_c;
005b921c      
005b9222      while (true)
005b9222      {
005b9222          if (eax == 0)
005b9263              return 0;
005b9263          
005b9229          if (this->_leader != *(uint32_t*)eax)
005b9229              break;
005b9229          
005b922b          int32_t* ecx_2 = eax[0xd];
005b922b          
005b9230          if (ecx_2 == 0)
005b9230          {
005b9239              int32_t eax_2 = (eax[0xe] + 1);
005b923c              int32_t var_4;
005b923c              
005b923c              if (eax_2 >= var_4)
005b923c              {
005b924b              label_5b924b:
005b924b                  eax = nullptr;
005b923c              }
005b923c              else
005b923c              {
005b9244                  int32_t var_8;
005b9244                  
005b9244                  while (*(uint32_t*)(var_8 + (eax_2 << 2)) == 0)
005b9244                  {
005b9246                      eax_2 += 1;
005b9246                      
005b9249                      if (eax_2 >= var_4)
005b9249                          goto label_5b924b;
005b9244                  }
005b9244                  
005b924f                  eax = *(uint32_t*)(var_8 + (eax_2 << 2));
005b923c              }
005b9230          }
005b9230          else
005b9232              eax = ecx_2;
005b9222      }
005b9222      
005b925b      return *(uint32_t*)eax;
005b9200  }

005b9264              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005b9270  void __fastcall Fellowship::HandleLockedRemoveFellow(class Fellowship* this, uint32_t arg2)

005b9270  {
005b9270      class Fellowship* this_1 = this;
005b9270      
005b9276      if (this->_locked != 0)
005b9276      {
005b928a          if (PackableHashTable<unsigned long,unsigned long>::lookup(&this->_fellows_departed.vtable, &arg2) == 0)
005b928a          {
005b929d              this_1 = Timer::get_real_time();
005b92a1              PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(&this->_fellows_departed, &arg2, &this_1);
005b92a8              return;
005b928a          }
005b928a          
005b92b7          PackableHashTable<unsigned long,int>::remove(&this->_fellows_departed.vtable, &arg2, &this_1);
005b92c5          this_1 = Timer::get_real_time();
005b92d1          PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(&this->_fellows_departed.vtable, &arg2, &this_1);
005b9276      }
005b9270  }

005b92db                                                                                   90 90 90 90 90                             .....

005b92e0  void __fastcall Fellowship::RecalculateEvenXPSplitting(class Fellowship* this)

005b92e0  {
005b92eb      if (this->_share_xp != 0)
005b92eb      {
005b92f4          uint32_t eax_1 = Fellowship::GetLeadersLevel(this);
005b9303          int32_t edi_1 = 0x186a0;
005b9308          int32_t var_14_1 = 0;
005b9310          void __return;
005b9310          PackableHashTable<unsigned long,Fellow>::begin(&this->_fellowship_table, &__return);
005b931d          void* i_1;
005b931d          void* const i = i_1;
005b931d          
005b9323          while (i != 0)
005b9323          {
005b9325              int32_t ecx_1 = *(uint32_t*)((char*)i + 0xc);
005b9325              
005b932a              if (ecx_1 < edi_1)
005b932c                  edi_1 = ecx_1;
005b932c              
005b9332              if (ecx_1 > var_14_1)
005b9334                  var_14_1 = ecx_1;
005b9334              
005b9338              void* i_2 = *(uint32_t*)((char*)i + 0x34);
005b9338              
005b933d              if (i_2 == 0)
005b933d              {
005b9346                  int32_t eax_3 = (*(uint32_t*)((char*)i + 0x38) + 1);
005b9349                  int32_t var_4;
005b9349                  
005b9349                  if (eax_3 >= var_4)
005b9349                  {
005b935b                  label_5b935b:
005b935b                      i = nullptr;
005b9349                  }
005b9349                  else
005b9349                  {
005b9354                      int32_t var_8;
005b9354                      
005b9354                      while (*(uint32_t*)(var_8 + (eax_3 << 2)) == 0)
005b9354                      {
005b9356                          eax_3 += 1;
005b9356                          
005b9359                          if (eax_3 >= var_4)
005b9359                              goto label_5b935b;
005b9354                      }
005b9354                      
005b935f                      i = *(uint32_t*)(var_8 + (eax_3 << 2));
005b9349                  }
005b933d              }
005b933d              else
005b933f                  i = i_2;
005b9323          }
005b9323          
005b9367          this->_even_xp_split = 1;
005b9367          
005b936e          if (edi_1 < 0x32)
005b936e          {
005b9379              if (var_14_1 > (eax_1 + 5))
005b937b                  this->_even_xp_split = 0;
005b937b              
005b9387              if ((edi_1 + 5) < eax_1)
005b9389                  this->_even_xp_split = 0;
005b936e          }
005b92eb      }
005b92e0  }

005b934d                                         8d 49 00                                                               .I.
005b9398                                                                          90 90 90 90 90 90 90 90                          ........

005b93a0  uint32_t __fastcall Fellowship::GetPackSize(class Fellowship* this)

005b93a0  {
005b93a0      class Fellowship* this_1 = this;
005b93b4      this_1 = nullptr;
005b93e9      return (((AC1Legacy::PStringBase<char>::Pack(&this->_name, &this_1, 0) + this->_fellows_departed.vtable->Pack(&this_1, 0)) + this->_fellowship_table.vtable->Pack(&this_1, 0)) + 0x14);
005b93a0  }

005b93ea                                90 90 90 90 90 90                                                            ......

005b93f0  uint32_t __thiscall Fellowship::Pack(class Fellowship* this, void** arg2, uint32_t arg3)

005b93f0  {
005b93f7      int32_t result = this->vtable->GetPackSize();
005b93f7      
005b9402      if (arg3 >= result)
005b9402      {
005b9404          this->_fellowship_table.vtable->Pack(arg2, arg3);
005b9419          AC1Legacy::PStringBase<char>::Pack(&this->_name, arg2, arg3);
005b9423          **(uint32_t**)arg2 = this->_leader;
005b9427          void* ecx_4 = (*(uint32_t*)arg2 + 4);
005b942a          *(uint32_t*)arg2 = ecx_4;
005b9431          *(uint32_t*)ecx_4 = this->_share_xp;
005b9435          void* eax_4 = (*(uint32_t*)arg2 + 4);
005b9438          *(uint32_t*)arg2 = eax_4;
005b943d          *(uint32_t*)eax_4 = this->_even_xp_split;
005b9441          void* edx_4 = (*(uint32_t*)arg2 + 4);
005b9444          *(uint32_t*)arg2 = edx_4;
005b944b          *(uint32_t*)edx_4 = this->_open_fellow;
005b944f          void* ecx_7 = (*(uint32_t*)arg2 + 4);
005b9452          *(uint32_t*)arg2 = ecx_7;
005b9459          *(uint32_t*)ecx_7 = this->_locked;
005b9464          *(uint32_t*)arg2 += 4;
005b9460          this->_fellows_departed.vtable->Pack(arg2, arg3);
005b9402      }
005b9402      
005b9472      return result;
005b93f0  }

005b9475                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005b9480  int32_t __thiscall Fellowship::AddFellow(class Fellowship* this, uint32_t arg2, class Fellow const* arg3)

005b9480  {
005b9480      class Fellowship* this_1 = this;
005b9488      this_1 = arg2;
005b9488      
005b9492      if (this->_locked == 0)
005b9492      {
005b94c2      label_5b94c2:
005b94c2          
005b94c9          if (PackableHashTable<unsigned long,Fellow>::add(&this->_fellowship_table, &arg2, arg3) != 0)
005b94c9          {
005b94d5              Fellowship::RecalculateEvenXPSplitting(this);
005b94e2              return 1;
005b94c9          }
005b9492      }
005b9492      else
005b9492      {
005b949c          uint32_t* eax_2 = PackableHashTable<unsigned long,unsigned long>::lookup(&this->_fellows_departed, &this_1);
005b949c          
005b94a5          if ((eax_2 != 0 && (Timer::get_real_time() - *(uint32_t*)eax_2) <= 0x384))
005b94b3              goto label_5b94c2;
005b9492      }
005b9492      
005b94d0      return 0;
005b9480  }

005b94e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005b94f0  int32_t __thiscall Fellowship::UnPack(class Fellowship* this, void** arg2, uint32_t arg3)

005b94f0  {
005b94f0      int32_t ebx;
005b94f0      int32_t var_4 = ebx;
005b94f5      int32_t edi;
005b94f5      int32_t var_8 = edi;
005b94f5      
005b94ff      if (arg3 < this->vtable->GetPackSize())
005b9505          return 0;
005b9505      
005b950b      int32_t ebp;
005b950b      int32_t var_c = ebp;
005b950c      int32_t esi;
005b950c      int32_t var_10 = esi;
005b9511      void* ebp_1 = *(uint32_t*)arg2;
005b9511      
005b951d      if (this->_fellowship_table.vtable->UnPack(arg2, arg3) != 0)
005b951d      {
005b952a          int32_t eax_6 = (*(uint32_t*)arg2 - ebp_1);
005b952e          uint32_t ecx_2;
005b952e          
005b952e          if (arg3 <= eax_6)
005b9536              ecx_2 = 0;
005b952e          else
005b9532              ecx_2 = (arg3 - eax_6);
005b9532          
005b9544          if (AC1Legacy::PStringBase<char>::UnPack(&this->_name, arg2, ecx_2) != 0)
005b9544          {
005b9546              void* ecx_4 = *(uint32_t*)arg2;
005b954a              void* eax_9 = ((char*)ecx_4 - ebp_1);
005b954a              
005b954e              if (arg3 > eax_9)
005b954e              {
005b9550                  void* edi_4 = (arg3 - eax_9);
005b9550                  
005b9555                  if (edi_4 >= 4)
005b9555                  {
005b9559                      this->_leader = *(uint32_t*)ecx_4;
005b956e                      *(uint32_t*)arg2 += 4;
005b9570                      arg_10 = ((char*)edi_4 - 4);
005b9570                      
005b957e                      if ((((PackObj::UNPACK_TYPE(&this->_share_xp, arg2, &arg_10) != 0 && PackObj::UNPACK_TYPE(&this->_even_xp_split, arg2, &arg_10) != 0) && PackObj::UNPACK_TYPE(&this->_open_fellow, arg2, &arg_10) != 0) && PackObj::UNPACK_TYPE(&this->_locked, arg2, &arg_10) != 0))
005b957e                      {
005b95d6                          int32_t eax_19 = this->_fellows_departed.vtable->UnPack(arg2, arg_10);
005b95da                          int32_t eax_20 = -(eax_19);
005b95e3                          return -((eax_20 - eax_20));
005b957e                      }
005b9555                  }
005b954e              }
005b9544          }
005b951d      }
005b951d      
005b9525      return 0;
005b94f0  }

005b95e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005b95f0  int32_t __thiscall PackableHashTable<unsigned long,Fellow>::remove(class PackableHashTable<unsigned long,Fellow>* this, uint32_t const* arg2, class Fellow* arg3)

005b95f0  {
005b95f6      uint32_t _table_size = this->_table_size;
005b95f6      
005b95fb      if (_table_size != 0)
005b95fb      {
005b95fd          class PackableHashData<unsigned long,Fellow>** _buckets = this->_buckets;
005b95fd          
005b9602          if (_buckets != 0)
005b9602          {
005b9608              uint32_t const ecx = *(uint32_t*)arg2;
005b9611              int32_t* i_1 = nullptr;
005b9611              
005b9618              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[0xd])
005b9618              {
005b9622                  if (*(uint32_t*)i == ecx)
005b9622                  {
005b963e                      Fellow::operator=(arg3, &i[1]);
005b9645                      int32_t ecx_2 = i[0xd];
005b9645                      
005b9648                      if (i_1 == 0)
005b9657                          this->_buckets[(COMBINE(0, *(uint32_t*)arg2) % this->_table_size)] = ecx_2;
005b9648                      else
005b964a                          i_1[0xd] = ecx_2;
005b964a                      
005b9661                      PackableHashData<unsigned long,Fellow>::`scalar deleting destructor'(i, 1);
005b966c                      this->_currNum -= 1;
005b9676                      return 1;
005b9622                  }
005b9622                  
005b9624                  i_1 = i;
005b9618              }
005b9602          }
005b95fb      }
005b95fb      
005b9633      return 0;
005b95f0  }

005b9679                                                                             90 90 90 90 90 90 90                           .......

005b9680  int32_t __thiscall Fellowship::RemoveFellow(class Fellowship* this, uint32_t arg2)

005b9680  {
005b9685      uint32_t edi = arg2;
005b9689      uint32_t var_3c = edi;
005b968c      uint32_t edx;
005b968c      Fellowship::HandleLockedRemoveFellow(this, edx);
005b9695      int32_t var_30;
005b9695      uint32_t edx_1 = Fellow::Fellow(&var_30);
005b969a      uint32_t var_3c_1 = edi;
005b969d      arg2 = edi;
005b96a1      Fellowship::HandleLockedRemoveFellow(this, edx_1);
005b96ba      int32_t* var_2c;
005b96ba      
005b96ba      if (PackableHashTable<unsigned long,Fellow>::remove(&this->_fellowship_table, &arg2, &var_30) == 0)
005b96ba      {
005b96c4          var_30 = 0x7a515c;
005b96c4          
005b96d8          if ((InterlockedDecrement(&var_2c[1]) == 0 && var_2c != 0))
005b96e0              **(uint32_t**)var_2c(1);
005b96e0          
005b96e9          return 0;
005b96ba      }
005b96ba      
005b96ee      Fellowship::RecalculateEvenXPSplitting(this);
005b96fb      var_30 = 0x7a515c;
005b96fb      
005b970f      if ((InterlockedDecrement(&var_2c[1]) == 0 && var_2c != 0))
005b9717          **(uint32_t**)var_2c(1);
005b9717      
005b9723      return 1;
005b9680  }

005b9726                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005b9730  int32_t __thiscall Fellowship::UpdateFellow(class Fellowship* this, uint32_t arg2, class Fellow const* arg3)

005b9730  {
005b9739      uint32_t _table_size = this->_fellowship_table._table_size;
005b9739      
005b973e      if (_table_size != 0)
005b973e      {
005b9740          class PackableHashData<unsigned long,Fellow>** _buckets = this->_fellowship_table._buckets;
005b9740          
005b9745          if (_buckets != 0)
005b9745          {
005b9752              for (int32_t* i = _buckets[(COMBINE(0, arg2) % _table_size)]; i != 0; i = i[0xd])
005b9752              {
005b9756                  if (arg2 == *(uint32_t*)i)
005b9756                  {
005b9777                      if (i == 0xfffffffc)
005b9777                          break;
005b9777                      
005b977e                      Fellow::operator=(&i[1], arg3);
005b9785                      Fellowship::RecalculateEvenXPSplitting(this);
005b9792                      return 1;
005b9756                  }
005b9752              }
005b9745          }
005b973e      }
005b973e      
005b976f      return Fellowship::AddFellow(this, arg2, arg3);
005b9730  }

005b9795                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005b97a0  void __fastcall Fellowship::Fellowship(class Fellowship* this)

005b97a0  {
005b97a6      this->vtable = 0x7cec6c;
005b97a3      this->_fellowship_table.vtable = 0x7cec58;
005b97a3      this->_fellowship_table.m_fThrowawayDuplicateKeysOnUnPack = 0;
005b97a3      this->_fellowship_table._buckets = nullptr;
005b97a3      this->_fellowship_table._table_size = 0x10;
005b97a3      this->_fellowship_table._currNum = 0;
005b97c5      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_fellowship_table);
005b97ca      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b97d5      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b97d8      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b97e1      this->_leader = 0;
005b97e4      this->_share_xp = 1;
005b97eb      this->_even_xp_split = 0;
005b97ee      this->_open_fellow = 0;
005b97f1      this->_locked = 0;
005b97de      this->_fellows_departed.vtable = 0x7cec44;
005b97de      this->_fellows_departed.m_fThrowawayDuplicateKeysOnUnPack = 0;
005b97de      this->_fellows_departed._buckets = nullptr;
005b97de      this->_fellows_departed._table_size = 0x20;
005b97de      this->_fellows_departed._currNum = 0;
005b980a      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_fellows_departed);
005b97a0  }

005b9814                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b9820  class Fellowship& __thiscall Fellowship::operator=(class Fellowship* this, class Fellowship const& arg2)

005b9820  {
005b982a      if (this != arg2)
005b982a      {
005b9834          PackableHashTable<unsigned long,Fellow>::operator=(&this->_fellowship_table, &arg2->_fellowship_table);
005b9839          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_name.m_buffer;
005b9839          
005b983f          if (m_buffer_1 != arg2->_name.m_buffer)
005b983f          {
005b9851              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005b9853                  m_buffer_1->vtable->__vecDelDtor(1);
005b9853              
005b985b              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
005b985e              this->_name.m_buffer = m_buffer;
005b9865              InterlockedIncrement(&m_buffer->m_cRef);
005b983f          }
005b983f          
005b986e          this->_leader = arg2->_leader;
005b9874          this->_share_xp = arg2->_share_xp;
005b987a          this->_even_xp_split = arg2->_even_xp_split;
005b9880          this->_open_fellow = arg2->_open_fellow;
005b9889          this->_locked = arg2->_locked;
005b9890          PackableHashTable<unsigned long,long>::operator=(&this->_fellows_departed, &arg2->_fellows_departed);
005b982a      }
005b982a      
005b989a      return this;
005b9820  }

005b989d                                                                                         90 90 90                               ...

005b98a0  void __fastcall Fellow::Fellow(class Fellow* this)

005b98a0  {
005b98a3      this->vtable = 0x7a515c;
005b98a9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b98b4      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b98b7      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b98bf      __builtin_memset(&this->_level, 0, 0x28);
005b98a0  }

005b98e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005b98f0  void __thiscall Fellow::Fellow(class Fellow* this, class Fellow const* arg2)

005b98f0  {
005b98f8      this->vtable = 0x7a515c;
005b98fe      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
005b9901      this->_name.m_buffer = m_buffer;
005b9908      InterlockedIncrement(&m_buffer->m_cRef);
005b9911      this->_level = arg2->_level;
005b9917      this->_cp_cache = arg2->_cp_cache;
005b991d      this->_lum_cache = arg2->_lum_cache;
005b9923      this->_share_loot = arg2->_share_loot;
005b9929      this->_max_health = arg2->_max_health;
005b992f      this->_max_stamina = arg2->_max_stamina;
005b9935      this->_max_mana = arg2->_max_mana;
005b993b      this->_current_health = arg2->_current_health;
005b9941      this->_current_stamina = arg2->_current_stamina;
005b9947      this->_current_mana = arg2->_current_mana;
005b98f0  }

005b9951                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005b9960  class Fellow& __thiscall Fellow::operator=(class Fellow* this, class Fellow const& arg2)

005b9960  {
005b996a      if (this != arg2)
005b996a      {
005b9970          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_name.m_buffer;
005b9970          
005b9975          if (m_buffer_1 != arg2->_name.m_buffer)
005b9975          {
005b9987              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005b9989                  m_buffer_1->vtable->__vecDelDtor(1);
005b9989              
005b9991              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
005b9994              this->_name.m_buffer = m_buffer;
005b999b              InterlockedIncrement(&m_buffer->m_cRef);
005b9975          }
005b9975          
005b99a4          this->_level = arg2->_level;
005b99aa          this->_cp_cache = arg2->_cp_cache;
005b99b0          this->_lum_cache = arg2->_lum_cache;
005b99b6          this->_share_loot = arg2->_share_loot;
005b99bc          this->_max_health = arg2->_max_health;
005b99c2          this->_max_stamina = arg2->_max_stamina;
005b99c8          this->_max_mana = arg2->_max_mana;
005b99ce          this->_current_health = arg2->_current_health;
005b99d4          this->_current_stamina = arg2->_current_stamina;
005b99da          this->_current_mana = arg2->_current_mana;
005b996a      }
005b996a      
005b99e2      return this;
005b9960  }

005b99e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005b99f0  uint32_t __fastcall Fellow::GetPackSize(class Fellow* this)

005b99f0  {
005b99f0      class Fellow* this_1 = this;
005b99fb      this_1 = nullptr;
005b9a0c      return (AC1Legacy::PStringBase<char>::Pack(&this->_name, &this_1, 0) + 0x28);
005b99f0  }

005b9a0d                                         90 90 90                                                               ...

005b9a10  uint32_t __thiscall Fellow::Pack(class Fellow* this, void** arg2, uint32_t arg3)

005b9a10  {
005b9a16      int32_t result = this->vtable->GetPackSize();
005b9a16      
005b9a21      if (arg3 >= result)
005b9a21      {
005b9a31          **(uint32_t**)arg2 = this->_cp_cache;
005b9a35          void* ebx_3 = (*(uint32_t*)arg2 + 4);
005b9a38          *(uint32_t*)arg2 = ebx_3;
005b9a3f          *(uint32_t*)ebx_3 = this->_lum_cache;
005b9a43          void* ecx_3 = (*(uint32_t*)arg2 + 4);
005b9a46          *(uint32_t*)arg2 = ecx_3;
005b9a4b          *(uint32_t*)ecx_3 = this->_level;
005b9a4f          void* ebx_7 = (*(uint32_t*)arg2 + 4);
005b9a52          *(uint32_t*)arg2 = ebx_7;
005b9a59          *(uint32_t*)ebx_7 = this->_max_health;
005b9a5d          void* ecx_6 = (*(uint32_t*)arg2 + 4);
005b9a60          *(uint32_t*)arg2 = ecx_6;
005b9a65          *(uint32_t*)ecx_6 = this->_max_stamina;
005b9a69          void* ebx_11 = (*(uint32_t*)arg2 + 4);
005b9a6c          *(uint32_t*)arg2 = ebx_11;
005b9a73          *(uint32_t*)ebx_11 = this->_max_mana;
005b9a77          void* ecx_9 = (*(uint32_t*)arg2 + 4);
005b9a7a          *(uint32_t*)arg2 = ecx_9;
005b9a7f          *(uint32_t*)ecx_9 = this->_current_health;
005b9a83          void* ebx_15 = (*(uint32_t*)arg2 + 4);
005b9a86          *(uint32_t*)arg2 = ebx_15;
005b9a8d          *(uint32_t*)ebx_15 = this->_current_stamina;
005b9a91          void* ecx_12 = (*(uint32_t*)arg2 + 4);
005b9a94          *(uint32_t*)arg2 = ecx_12;
005b9a99          *(uint32_t*)ecx_12 = this->_current_mana;
005b9a9d          void* ebx_19 = (*(uint32_t*)arg2 + 4);
005b9aa0          *(uint32_t*)arg2 = ebx_19;
005b9aa7          *(uint32_t*)ebx_19 = this->_share_loot;
005b9aaf          *(uint32_t*)arg2 += 4;
005b9ab5          AC1Legacy::PStringBase<char>::Pack(&this->_name, arg2, arg3);
005b9a21      }
005b9a21      
005b9abf      return result;
005b9a10  }

005b9ac2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005b9ad0  int32_t __thiscall Fellow::UnPack(class Fellow* this, void** arg2, uint32_t arg3)

005b9ad0  {
005b9ad8      if (arg3 < 0x28)
005b9add          return 0;
005b9add      
005b9ae6      void* edx_1 = (*(uint32_t*)arg2 + 4);
005b9aea      uint32_t esi = *(uint32_t*)((char*)edx_1 - 4);
005b9aed      *(uint32_t*)arg2 = edx_1;
005b9aef      this->_cp_cache = esi;
005b9af2      void* edx_2 = *(uint32_t*)arg2;
005b9af4      uint32_t esi_1 = *(uint32_t*)edx_2;
005b9af9      *(uint32_t*)arg2 = ((char*)edx_2 + 4);
005b9afb      this->_lum_cache = esi_1;
005b9afe      void* edx_4 = *(uint32_t*)arg2;
005b9b00      uint32_t esi_2 = *(uint32_t*)edx_4;
005b9b05      *(uint32_t*)arg2 = ((char*)edx_4 + 4);
005b9b07      this->_level = esi_2;
005b9b0e      this->_max_health = **(uint32_t**)arg2;
005b9b13      void* edx_9 = (*(uint32_t*)arg2 + 4);
005b9b16      *(uint32_t*)arg2 = edx_9;
005b9b1a      this->_max_stamina = *(uint32_t*)edx_9;
005b9b1f      void* esi_4 = (*(uint32_t*)arg2 + 4);
005b9b22      *(uint32_t*)arg2 = esi_4;
005b9b28      this->_max_mana = *(uint32_t*)esi_4;
005b9b2d      void* edx_14 = (*(uint32_t*)arg2 + 4);
005b9b30      *(uint32_t*)arg2 = edx_14;
005b9b34      this->_current_health = *(uint32_t*)edx_14;
005b9b39      void* esi_6 = (*(uint32_t*)arg2 + 4);
005b9b3c      *(uint32_t*)arg2 = esi_6;
005b9b42      this->_current_stamina = *(uint32_t*)esi_6;
005b9b47      void* edx_19 = (*(uint32_t*)arg2 + 4);
005b9b4a      *(uint32_t*)arg2 = edx_19;
005b9b4e      this->_current_mana = *(uint32_t*)edx_19;
005b9b53      void* esi_8 = (*(uint32_t*)arg2 + 4);
005b9b56      *(uint32_t*)arg2 = esi_8;
005b9b5c      this->_share_loot = *(uint32_t*)esi_8;
005b9b69      *(uint32_t*)arg2 += 4;
005b9b72      return AC1Legacy::PStringBase<char>::UnPack(&this->_name, arg2, arg3);
005b9ad0  }

005b9b75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005b9b80  uint32_t FellowshipSystem::GetExperienceProportion(uint32_t arg1)

005b9b80  {
005b9b91      return ExperienceSystem::ExperienceToRaiseLevel(arg1, (arg1 + 1));
005b9b80  }

005b9b92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005b9ba0  int32_t FellowshipSystem::GetEvenSplitXPPctg(uint32_t arg1)

005b9ba0  {
005b9ba8      if ((arg1 - 1) > 9)
005b9bfd          return (arg1 - 1);
005b9bfd      
005b9baa      switch (arg1)
005b9baa      {
005b9bb7          case 1:
005b9bb7          {
005b9bb7              return (arg1 - 1);
005b9bb7              break;
005b9bb7          }
005b9bbe          case 2:
005b9bbe          {
005b9bbe              return (arg1 - 1);
005b9bbe              break;
005b9bbe          }
005b9bc5          case 3:
005b9bc5          {
005b9bc5              return (arg1 - 1);
005b9bc5              break;
005b9bc5          }
005b9bcc          case 4:
005b9bcc          {
005b9bcc              return (arg1 - 1);
005b9bcc              break;
005b9bcc          }
005b9bd3          case 5:
005b9bd3          {
005b9bd3              return (arg1 - 1);
005b9bd3              break;
005b9bd3          }
005b9bda          case 6:
005b9bda          {
005b9bda              return (arg1 - 1);
005b9bda              break;
005b9bda          }
005b9be1          case 7:
005b9be1          {
005b9be1              return (arg1 - 1);
005b9be1              break;
005b9be1          }
005b9be8          case 8:
005b9be8          {
005b9be8              return (arg1 - 1);
005b9be8              break;
005b9be8          }
005b9bef          case 9:
005b9bef          {
005b9bef              return (arg1 - 1);
005b9bef              break;
005b9bef          }
005b9bf6          case 0xa:
005b9bf6          {
005b9bf6              return (arg1 - 1);
005b9bf6              break;
005b9bf6          }
005b9baa      }
005b9ba0  }

005b9bfe                                                                                            8b ff                                ..
005b9c00  uint32_t jump_table_5b9c00[0xa] = 
005b9c00  {
005b9c00      [0x0] =  0x005b9bb1
005b9c04      [0x1] =  0x005b9bb8
005b9c08      [0x2] =  0x005b9bbf
005b9c0c      [0x3] =  0x005b9bc6
005b9c10      [0x4] =  0x005b9bcd
005b9c14      [0x5] =  0x005b9bd4
005b9c18      [0x6] =  0x005b9bdb
005b9c1c      [0x7] =  0x005b9be2
005b9c20      [0x8] =  0x005b9be9
005b9c24      [0x9] =  0x005b9bf0
005b9c28  }

005b9c28                          90 90 90 90 90 90 90 90                                                          ........

005b9c30  int32_t __thiscall FriendData::operator==(class FriendData const* this, class FriendData const* arg2)

005b9c30  {
005b9c3a      if ((this->m_id == arg2->m_id && AC1Legacy::PStringBase<char>::operator==(&this->m_name, &arg2->m_name) != 0))
005b9c51          return 1;
005b9c51      
005b9c56      return 0;
005b9c30  }

005b9c59                                                                             90 90 90 90 90 90 90                           .......

005b9c60  uint32_t __fastcall FriendData::GetPackSize(class FriendData* this)

005b9c60  {
005b9c60      class FriendData* this_1 = this;
005b9c74      this_1 = nullptr;
005b9ca9      return (((AC1Legacy::PStringBase<char>::Pack(&this->m_name, &this_1, 0) + this->m_friendOfList.vtable->Pack(&this_1, 0)) + this->m_friendsList.vtable->Pack(&this_1, 0)) + 0xc);
005b9c60  }

005b9caa                                90 90 90 90 90 90                                                            ......

005b9cb0  uint32_t __thiscall FriendData::Pack(class FriendData* this, void** arg2, uint32_t arg3)

005b9cb0  {
005b9cb7      int32_t result = this->vtable->GetPackSize();
005b9cb7      
005b9cc2      if (arg3 >= result)
005b9cc2      {
005b9cce          **(uint32_t**)arg2 = this->m_id;
005b9cd2          void* ecx_2 = (*(uint32_t*)arg2 + 4);
005b9cd5          *(uint32_t*)arg2 = ecx_2;
005b9cdc          *(uint32_t*)ecx_2 = this->m_online;
005b9ce0          void* eax_3 = (*(uint32_t*)arg2 + 4);
005b9ce3          *(uint32_t*)arg2 = eax_3;
005b9ce8          *(uint32_t*)eax_3 = this->m_appearOffline;
005b9cf4          *(uint32_t*)arg2 += 4;
005b9cf6          AC1Legacy::PStringBase<char>::Pack(&this->m_name, arg2, arg3);
005b9cfb          this->m_friendsList.vtable->Pack(arg2, arg3);
005b9d06          this->m_friendOfList.vtable->Pack(arg2, arg3);
005b9cc2      }
005b9cc2      
005b9d17      return result;
005b9cb0  }

005b9d1a                                                                                90 90 90 90 90 90                            ......

005b9d20  int32_t __thiscall FriendData::UnPack(class FriendData* this, void** arg2, uint32_t arg3)

005b9d20  {
005b9d2b      if (arg3 < 0xc)
005b9d31          return 0;
005b9d31      
005b9d3d      this->m_id = **(uint32_t**)arg2;
005b9d42      void* edx_1 = (*(uint32_t*)arg2 + 4);
005b9d45      *(uint32_t*)arg2 = edx_1;
005b9d4b      this->m_online = *(uint32_t*)edx_1;
005b9d50      void* ecx_2 = (*(uint32_t*)arg2 + 4);
005b9d53      *(uint32_t*)arg2 = ecx_2;
005b9d59      this->m_appearOffline = *(uint32_t*)ecx_2;
005b9d66      *(uint32_t*)arg2 += 4;
005b9d68      AC1Legacy::PStringBase<char>::UnPack(&this->m_name, arg2, arg3);
005b9d6d      this->m_friendsList.vtable->UnPack(arg2, arg3);
005b9d78      this->m_friendOfList.vtable->UnPack(arg2, arg3);
005b9d8b      return 1;
005b9d20  }

005b9d8e                                            90 90                                                                ..

005b9d90  void __fastcall FriendData::FriendData(class FriendData* this)

005b9d90  {
005b9d94      this->vtable = 0x7a4128;
005b9d9c      this->m_id = 0;
005b9d9f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b9daa      this->m_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b9dad      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b9db3      this->m_online = 0;
005b9db6      this->m_appearOffline = 0;
005b9db9      this->m_friendsList._head = nullptr;
005b9dbc      this->m_friendsList._tail = nullptr;
005b9dbf      this->m_friendsList._num_elements = 0;
005b9dc7      this->m_friendsList.vtable = &PackObj::`vftable';
005b9dcf      this->m_friendsList.vtable = &PList<unsigned long>::`vftable';
005b9dd7      this->m_friendsList.vtable = 0x7a7388;
005b9dda      this->m_friendOfList._head = nullptr;
005b9ddd      this->m_friendOfList._tail = nullptr;
005b9de0      this->m_friendOfList._num_elements = 0;
005b9de3      this->m_friendOfList.vtable = &PackObj::`vftable';
005b9de6      this->m_friendOfList.vtable = &PList<unsigned long>::`vftable';
005b9dea      this->m_friendOfList.vtable = 0x7a7388;
005b9d90  }

005b9df1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005b9e00  class FriendData& __thiscall FriendData::operator=(class FriendData* this, class FriendData const& arg2)

005b9e00  {
005b9e0a      if (this != arg2)
005b9e0a      {
005b9e0f          this->m_id = arg2->m_id;
005b9e16          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->m_name.m_buffer;
005b9e16          
005b9e1b          if (m_buffer_1 != arg2->m_name.m_buffer)
005b9e1b          {
005b9e2d              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005b9e2f                  m_buffer_1->vtable->__vecDelDtor(1);
005b9e2f              
005b9e37              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_name.m_buffer;
005b9e3a              this->m_name.m_buffer = m_buffer;
005b9e41              InterlockedIncrement(&m_buffer->m_cRef);
005b9e1b          }
005b9e1b          
005b9e4a          this->m_online = arg2->m_online;
005b9e53          this->m_appearOffline = arg2->m_appearOffline;
005b9e5a          List<unsigned long>::operator=(&this->m_friendsList.vtable, &arg2->m_friendsList);
005b9e66          List<unsigned long>::operator=(&this->m_friendOfList, &arg2->m_friendOfList);
005b9e0a      }
005b9e0a      
005b9e70      return this;
005b9e00  }

005b9e73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005b9e80  void __thiscall FriendData::FriendData(class FriendData* this, class FriendData const* arg2)

005b9e80  {
005b9e84      this->vtable = 0x7a4128;
005b9e8c      this->m_id = 0;
005b9e8f      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005b9e9a      this->m_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005b9e9d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005b9ea3      this->m_online = 0;
005b9ea6      this->m_appearOffline = 0;
005b9ea9      this->m_friendsList._head = nullptr;
005b9eac      this->m_friendsList._tail = nullptr;
005b9eaf      this->m_friendsList._num_elements = 0;
005b9eb7      this->m_friendsList.vtable = &PackObj::`vftable';
005b9ebf      this->m_friendsList.vtable = 0x7a7388;
005b9ec7      this->m_friendsList.vtable = &PList<unsigned long>::`vftable';
005b9eca      this->m_friendOfList._head = nullptr;
005b9ecd      this->m_friendOfList._tail = nullptr;
005b9ed0      this->m_friendOfList._num_elements = 0;
005b9ed3      this->m_friendOfList.vtable = &PackObj::`vftable';
005b9eda      this->m_friendOfList.vtable = 0x7a7388;
005b9ee0      this->m_friendOfList.vtable = &PList<unsigned long>::`vftable';
005b9ee3      FriendData::operator=(this, arg2);
005b9e80  }

005b9eef                                               90                                                                 .

005b9ef0  int32_t __thiscall Trade::Register(class Trade* this, uint32_t arg2, double arg3)

005b9ef0  {
005b9ef6      if (arg2 == 0)
005b9f1a          return 0;
005b9f1a      
005b9efc      this->_partner = arg2;
005b9f03      this->_stamp = arg3;
005b9f06      *(uint32_t*)((char*)this->_stamp)[4] = *(uint32_t*)((char*)arg3)[4];
005b9f09      this->_status = 2;
005b9f15      return 1;
005b9ef0  }

005b9f1d                                                                                         90 90 90                               ...

005b9f20  uint32_t __fastcall Trade::GetPackSize(class Trade* this)

005b9f20  {
005b9f20      class Trade* this_1 = this;
005b9f21      struct PackableList<ContentProfile>::VTable* vtable = this->_self_list.vtable;
005b9f33      this_1 = nullptr;
005b9f55      return ((vtable->Pack(&this_1, 0) + this->_partner_list.vtable->Pack(&this_1, 0)) + 0x1c);
005b9f20  }

005b9f56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005b9f60  int32_t __thiscall PackableList<ContentProfile>::Search(class PackableList<ContentProfile> const* this, class ContentProfile const* arg2)

005b9f60  {
005b9f67      for (class PackableLLNode<ContentProfile>* i = this->head; i != 0; i = i->next)
005b9f67      {
005b9f7a          if (ContentProfile::operator==(i, arg2) != 0)
005b9f91              return 1;
005b9f67      }
005b9f67      
005b9f87      return 0;
005b9f60  }

005b9f94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005b9fa0  int32_t __thiscall Trade::IsPartnerTradingItem(class Trade const* this, uint32_t arg2)

005b9fa0  {
005b9faf      void var_c;
005b9faf      ContentProfile::ContentProfile(&var_c, arg2);
005b9faf      
005b9fb9      for (class PackableLLNode<ContentProfile>* i = this->_partner_list.head; i != 0; i = i->next)
005b9fb9      {
005b9fce          if (ContentProfile::operator==(i, &var_c) != 0)
005b9fe9              return 1;
005b9fb9      }
005b9fb9      
005b9fdd      return 0;
005b9fa0  }

005b9fbd                                                                                         8d 49 00                               .I.
005b9fec                                      90 90 90 90                                                              ....

005b9ff0  uint32_t __thiscall Trade::Pack(class Trade* this, void** arg2, uint32_t arg3)

005b9ff0  {
005b9ff7      int32_t result = this->vtable->GetPackSize();
005b9ff7      
005ba002      if (arg3 >= result)
005ba002      {
005ba00e          **(uint32_t**)arg2 = this->_partner;
005ba012          void* edx_3 = (*(uint32_t*)arg2 + 4);
005ba015          *(uint32_t*)arg2 = edx_3;
005ba01c          *(uint64_t*)edx_3 = ((double)((long double)this->_stamp));
005ba020          void* ecx_2 = (*(uint32_t*)arg2 + 8);
005ba023          *(uint32_t*)arg2 = ecx_2;
005ba02a          *(uint32_t*)ecx_2 = this->_status;
005ba02e          void* eax_4 = (*(uint32_t*)arg2 + 4);
005ba031          *(uint32_t*)arg2 = eax_4;
005ba036          *(uint32_t*)eax_4 = this->_initiator;
005ba03a          void* edx_6 = (*(uint32_t*)arg2 + 4);
005ba03d          *(uint32_t*)arg2 = edx_6;
005ba044          *(uint32_t*)edx_6 = this->_accepted;
005ba048          void* ecx_6 = (*(uint32_t*)arg2 + 4);
005ba04b          *(uint32_t*)arg2 = ecx_6;
005ba052          *(uint32_t*)ecx_6 = this->_p_accepted;
005ba05d          *(uint32_t*)arg2 += 4;
005ba059          this->_self_list.vtable->Pack(arg2, arg3);
005ba065          this->_partner_list.vtable->Pack(arg2, arg3);
005ba002      }
005ba002      
005ba076      return result;
005b9ff0  }

005ba079                                                                             90 90 90 90 90 90 90                           .......

005ba080  uint32_t __fastcall Trade::GetNumItems(class Trade const* this)

005ba080  {
005ba080      class PackableLLNode<ContentProfile>* i = this->_self_list.head;
005ba083      int32_t result = 0;
005ba083      
005ba087      for (; i != 0; i = i->next)
005ba087      {
005ba095          if (i->data.m_uContainerProperties == 0)
005ba097              result += 1;
005ba087      }
005ba087      
005ba09f      return result;
005ba080  }


005ba0a0  uint32_t __fastcall Trade::GetNumContainers(class Trade const* this)

005ba0a0  {
005ba0a0      class PackableLLNode<ContentProfile>* i = this->_self_list.head;
005ba0a3      int32_t result = 0;
005ba0a3      
005ba0a7      for (; i != 0; i = i->next)
005ba0a7      {
005ba0b5          if (i->data.m_uContainerProperties != 0)
005ba0b7              result += 1;
005ba0a7      }
005ba0a7      
005ba0bf      return result;
005ba0a0  }


005ba0c0  uint32_t __fastcall Trade::GetNumPartnerItems(class Trade const* this)

005ba0c0  {
005ba0c0      class PackableLLNode<ContentProfile>* i = this->_partner_list.head;
005ba0c3      int32_t result = 0;
005ba0c3      
005ba0c7      for (; i != 0; i = i->next)
005ba0c7      {
005ba0d5          if (i->data.m_uContainerProperties == 0)
005ba0d7              result += 1;
005ba0c7      }
005ba0c7      
005ba0df      return result;
005ba0c0  }


005ba0e0  uint32_t __fastcall Trade::GetNumPartnerContainers(class Trade const* this)

005ba0e0  {
005ba0e0      class PackableLLNode<ContentProfile>* i = this->_partner_list.head;
005ba0e3      int32_t result = 0;
005ba0e3      
005ba0e7      for (; i != 0; i = i->next)
005ba0e7      {
005ba0f5          if (i->data.m_uContainerProperties != 0)
005ba0f7              result += 1;
005ba0e7      }
005ba0e7      
005ba0ff      return result;
005ba0e0  }


005ba100  uint32_t __thiscall PackableList<ContentProfile>::InsertPos(class PackableList<ContentProfile>* this, uint32_t const arg2, class ContentProfile const* arg3)

005ba100  {
005ba10b      uint32_t const i_1 = arg2;
005ba10d      void* eax = operator new(0x14);
005ba10d      
005ba117      if (eax == 0)
005ba13f          eax = nullptr;
005ba117      else
005ba117      {
005ba11d          *(uint32_t*)eax = 0x7cc40c;
005ba126          *(uint32_t*)((char*)eax + 4) = arg3->m_iid;
005ba12c          *(uint32_t*)((char*)eax + 8) = arg3->m_uContainerProperties;
005ba12f          *(uint32_t*)((char*)eax + 0xc) = 0;
005ba136          *(uint32_t*)((char*)eax + 0x10) = 0;
005ba117      }
005ba117      
005ba141      class PackableLLNode<ContentProfile>* ecx_2 = this->head;
005ba141      
005ba146      if (ecx_2 == 0)
005ba146      {
005ba148          this->head = eax;
005ba14b          this->tail = eax;
005ba14e          this->curNum += 1;
005ba156          return 0;
005ba146      }
005ba146      
005ba15b      if (arg2 != 0)
005ba15b      {
005ba168          uint32_t const i;
005ba168          
005ba168          do
005ba168          {
005ba162              if (ecx_2 == 0)
005ba162                  goto label_5ba16e;
005ba162              
005ba164              i = i_1;
005ba164              i_1 -= 1;
005ba165              ecx_2 = ecx_2->next;
005ba168          } while (i != 1);
005ba15b      }
005ba15b      
005ba16c      if (ecx_2 == 0)
005ba16c      {
005ba16e      label_5ba16e:
005ba16e          class PackableLLNode<ContentProfile>* tail = this->tail;
005ba171          tail->next = eax;
005ba174          *(uint32_t*)((char*)eax + 0x10) = tail;
005ba177          this->tail = eax;
005ba17a          uint32_t curNum = this->curNum;
005ba180          this->curNum = (curNum + 1);
005ba186          return curNum;
005ba16c      }
005ba16c      
005ba189      class PackableLLNode<ContentProfile>* prev = ecx_2->prev;
005ba189      
005ba18e      if (prev == 0)
005ba195          this->head = eax;
005ba18e      else
005ba190          prev->next = eax;
005ba190      
005ba19b      *(uint32_t*)((char*)eax + 0x10) = ecx_2->prev;
005ba19e      *(uint32_t*)((char*)eax + 0xc) = ecx_2;
005ba1a1      ecx_2->prev = eax;
005ba1a4      this->curNum += 1;
005ba1ac      return arg2;
005ba100  }

005ba1af                                               90                                                                 .

005ba1b0  int32_t __stdcall Trade::AddItem(class Trade* this @ ecx, uint32_t arg2, class PackableList<ContentProfile>* arg3, uint32_t arg4)

005ba1b0  {
005ba1bb      if (arg2 != 0)
005ba1bb      {
005ba1c2          void var_c;
005ba1c2          ContentProfile::ContentProfile(&var_c, arg2);
005ba1c2          
005ba1e2          if ((PackableList<ContentProfile>::Search(arg3, &var_c) == 0 && arg3->curNum < 0x1a0a))
005ba1e2          {
005ba1e9              ContentProfile::ContentProfile(&var_c, arg2);
005ba1fa              PackableList<ContentProfile>::InsertPos(arg3, arg4, &var_c);
005ba209              return 1;
005ba1e2          }
005ba1bb      }
005ba1bb      
005ba213      return 0;
005ba1b0  }

005ba216                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005ba220  int32_t __thiscall PackableList<ContentProfile>::Remove(class PackableList<ContentProfile>* this, class ContentProfile* arg2)

005ba220  {
005ba223      class PackableLLNode<ContentProfile>* head_1 = this->head;
005ba223      
005ba228      if (head_1 == 0)
005ba22d          return 0;
005ba22d      
005ba237      class PackableLLNode<ContentProfile>* next_3 = head_1;
005ba237      
005ba240      if (ContentProfile::operator==(head_1, arg2) != 0)
005ba240      {
005ba242          class PackableLLNode<ContentProfile>* head = this->head;
005ba248          arg2->m_iid = head->data.m_iid;
005ba24e          arg2->m_uContainerProperties = head->data.m_uContainerProperties;
005ba254          class PackableLLNode<ContentProfile>* next = this->head->next;
005ba259          this->head = next;
005ba259          
005ba25c          if (next == 0)
005ba267              this->tail = nullptr;
005ba25c          else
005ba25e              next->prev = nullptr;
005ba25e          
005ba270          if (next_3 != 0)
005ba270          {
005ba273              next_3->data.vtable = 0x79285c;
005ba279              operator delete(next_3);
005ba270          }
005ba270          
005ba286          this->curNum -= 1;
005ba290          return 1;
005ba240      }
005ba240      
005ba298      while (next_3->next != 0)
005ba298      {
005ba2ab          if (ContentProfile::operator==(next_3->next, arg2) != 0)
005ba2ab          {
005ba2bf              class PackableLLNode<ContentProfile>* next_1 = next_3->next;
005ba2c5              arg2->m_iid = next_1->data.m_iid;
005ba2cb              arg2->m_uContainerProperties = next_1->data.m_uContainerProperties;
005ba2ce              int32_t* next_2 = next_3->next;
005ba2d1              class PackableLLNode<ContentProfile>* eax_10 = next_2[3];
005ba2d6              next_3->next = eax_10;
005ba2d6              
005ba2d9              if (eax_10 == 0)
005ba2e0                  this->tail = next_3;
005ba2d9              else
005ba2db                  eax_10->prev = next_3;
005ba2db              
005ba2e4              *(uint32_t*)next_2 = 0x79285c;
005ba2ea              operator delete(next_2);
005ba2f7              this->curNum -= 1;
005ba301              return 1;
005ba2ab          }
005ba2ab          
005ba2ad          next_3 = next_3->next;
005ba298      }
005ba298      
005ba2bc      return 0;
005ba220  }

005ba304              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005ba310  int32_t __thiscall Trade::AddItem(class Trade* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

005ba310  {
005ba31c      if (arg3 == 1)
005ba31c      {
005ba360          int32_t var_c;
005ba360          ContentProfile::ContentProfile(&var_c, arg2);
005ba372          bool cond:1_1 = PackableList<ContentProfile>::Search(&this->_partner_list, &var_c) != 0;
005ba374          var_c = 0x79285c;
005ba374          
005ba37c          if (!(cond:1_1))
005ba394              return Trade::AddItem(this, arg2, &this->_self_list, arg4);
005ba31c      }
005ba31c      else if (arg3 == 2)
005ba31f      {
005ba334          int32_t var_18;
005ba334          ContentProfile::ContentProfile(&var_18, arg2);
005ba346          bool cond:2_1 = PackableList<ContentProfile>::Search(&this->_self_list, &var_18) != 0;
005ba348          var_18 = 0x79285c;
005ba348          
005ba350          if (!(cond:2_1))
005ba394              return Trade::AddItem(this, arg2, &this->_partner_list, arg4);
005ba31f      }
005ba31f      
005ba328      return 0;
005ba310  }

005ba397                                                                       90 90 90 90 90 90 90 90 90                         .........

005ba3a0  int32_t __thiscall Trade::RemoveItem(class Trade* this, uint32_t arg2, uint32_t arg3)

005ba3a0  {
005ba3ac      if (arg2 != 0)
005ba3ac      {
005ba3b3          int32_t var_24;
005ba3b3          
005ba3b3          if (arg3 == 1)
005ba3b3          {
005ba3f3              void var_c;
005ba3f3              ContentProfile::ContentProfile(&var_c, arg2);
005ba404              int32_t var_4;
005ba404              int32_t var_1c_1 = var_4;
005ba40c              var_24 = 0x7cc40c;
005ba414              int32_t var_8;
005ba414              int32_t var_20_1 = var_8;
005ba421              return PackableList<ContentProfile>::Remove(&this->_self_list, &var_24);
005ba3b3          }
005ba3b3          
005ba3b6          if (arg3 == 2)
005ba3b6          {
005ba3bd              void var_18;
005ba3bd              ContentProfile::ContentProfile(&var_18, arg2);
005ba3ce              int32_t var_10;
005ba3ce              int32_t var_1c = var_10;
005ba3d6              var_24 = 0x7cc40c;
005ba3de              int32_t var_14;
005ba3de              int32_t var_20 = var_14;
005ba3eb              return PackableList<ContentProfile>::Remove(&this->_partner_list, &var_24);
005ba3b6          }
005ba3ac      }
005ba3ac      
005ba42a      return 0;
005ba3a0  }

005ba42d                                         90 90 90                                                               ...

005ba430  int32_t __fastcall Trade::Reset(class Trade* this)

005ba430  {
005ba436      PackableList<ContentProfile>::Flush(&this->_self_list);
005ba43e      PackableList<ContentProfile>::Flush(&this->_partner_list);
005ba445      this->_accepted = 0;
005ba448      this->_p_accepted = 0;
005ba451      return 1;
005ba430  }

005ba452                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005ba460  int32_t __thiscall Trade::UnPack(class Trade* this, void** arg2, uint32_t arg3)

005ba460  {
005ba460      class Trade* this_1 = this;
005ba460      
005ba469      if (arg3 < 0x1c)
005ba46f          return 0;
005ba46f      
005ba47a      PackableList<ContentProfile>::Flush(&this->_self_list);
005ba486      PackableList<ContentProfile>::Flush(&this->_partner_list);
005ba48b      int32_t** esi = arg2;
005ba49a      this->_stamp = 0f;
005ba49d      *(uint32_t*)((char*)this->_stamp)[4] = 0xbff00000;
005ba4a0      int32_t ecx_3 = 0;
005ba4a2      this->_partner = 0;
005ba4a5      this->_status = 0;
005ba4a8      this->_initiator = 0;
005ba4ab      this->_accepted = 0;
005ba4ae      this->_p_accepted = 0;
005ba4b1      int32_t* ebx = *(uint32_t*)esi;
005ba4b5      this->_partner = *(uint32_t*)ebx;
005ba4ba      void* edx_1 = &*(uint32_t*)esi[1];
005ba4bd      *(uint32_t*)esi = edx_1;
005ba4c3      this->_stamp = *(uint32_t*)edx_1;
005ba4c9      *(uint32_t*)((char*)this->_stamp)[4] = *(uint32_t*)((char*)edx_1 + 4);
005ba4ce      void* eax_5 = &*(uint32_t*)esi[2];
005ba4d1      *(uint32_t*)esi = eax_5;
005ba4d5      this->_status = *(uint32_t*)eax_5;
005ba4da      void* edx_5 = &*(uint32_t*)esi[1];
005ba4dd      *(uint32_t*)esi = edx_5;
005ba4e3      this->_initiator = *(uint32_t*)edx_5;
005ba4e8      void* eax_9 = &*(uint32_t*)esi[1];
005ba4eb      *(uint32_t*)esi = eax_9;
005ba4ef      this->_accepted = *(uint32_t*)eax_9;
005ba4f4      int32_t* edx_8 = &*(uint32_t*)esi[1];
005ba4f7      *(uint32_t*)esi = edx_8;
005ba4fd      this->_p_accepted = *(uint32_t*)edx_8;
005ba506      void* eax_13 = &*(uint32_t*)esi[1];
005ba509      *(uint32_t*)esi = eax_13;
005ba50b      int32_t eax_14 = ((char*)eax_13 - ebx);
005ba50b      
005ba50f      if (arg3 > eax_14)
005ba513          ecx_3 = (arg3 - eax_14);
005ba513      
005ba51c      int32_t result = this->_self_list.vtable->UnPack(esi, ecx_3);
005ba51c      
005ba521      if (result == 0)
005ba528          return result;
005ba528      
005ba52d      void* eax_16 = (*(uint32_t*)esi - ebx);
005ba531      void* edi_2;
005ba531      
005ba531      if (arg3 <= eax_16)
005ba537          edi_2 = nullptr;
005ba531      else
005ba533          edi_2 = (arg3 - eax_16);
005ba533      
005ba541      int32_t eax_18 = this->_partner_list.vtable->UnPack(esi, edi_2);
005ba545      int32_t eax_19 = -(eax_18);
005ba54f      return -((eax_19 - eax_19));
005ba460  }

005ba552                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005ba560  void __fastcall Trade::Trade(class Trade* this)

005ba560  {
005ba564      this->vtable = 0x7e72d0;
005ba56a      this->_self_list.head = nullptr;
005ba56d      this->_self_list.tail = nullptr;
005ba570      this->_self_list.curNum = 0;
005ba578      this->_self_list.vtable = 0x7cc3f8;
005ba57b      this->_partner_list.vtable = 0x7cc3f8;
005ba584      __builtin_memset(&this->_partner_list.head, 0, 0x14);
005ba594      *(uint32_t*)((char*)this->_stamp)[4] = 0xbff00000;
005ba59d      this->_status = 0;
005ba5a0      this->_initiator = 0;
005ba5a3      this->_accepted = 0;
005ba5a6      this->_p_accepted = 0;
005ba560  }

005ba5ab                                   90 90 90 90 90                                                             .....

005ba5b0  void* __thiscall Trade::`scalar deleting destructor'(class Trade* this, uint32_t arg2)

005ba5b0  {
005ba5b6      PackableList<ContentProfile>::~PackableList<ContentProfile>(&this->_partner_list);
005ba5be      PackableList<ContentProfile>::~PackableList<ContentProfile>(&this->_self_list);
005ba5c8      this->vtable = 0x79285c;
005ba5c8      
005ba5ce      if ((arg2 & 1) != 0)
005ba5d1          operator delete(this);
005ba5d1      
005ba5dc      return this;
005ba5b0  }

005ba5df                                                                                               90                                 .

005ba5e0  int32_t __thiscall HousePayment::PayWithTradeNote(class HousePayment* this, int32_t const arg2, int32_t const arg3)

005ba5e0  {
005ba5e2      class HousePayment* this_1 = this;
005ba5e4      this = (*(uint8_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard');
005ba5f2      uint32_t id = this_1->wcid.id;
005ba5f2      
005ba5f5      if ((1 & this) == 0)
005ba5f5      {
005ba60b          (*(uint32_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard') |= 1;
005ba611          DBObj::GetDIDByEnum(&WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack, 0x10000002, 0xc);
005ba61b          atexit(`WClassIDHelper::IsCoinstack'::`2'::didCoinstack);
005ba5f5      }
005ba5f5      
005ba639      if ((id == (*(uint32_t*)WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack) && (arg2 > 0 && arg3 > 0)))
005ba639      {
005ba63b          int32_t paid = this_1->paid;
005ba63e          int32_t num = this_1->num;
005ba63e          
005ba643          if (paid < num)
005ba643          {
005ba645              int32_t eax_1 = (num - paid);
005ba645              
005ba64d              if ((eax_1 > 0 && eax_1 >= arg3))
005ba64d              {
005ba650                  int32_t const result = (((int64_t)eax_1) / arg3);
005ba650                  
005ba654                  if (result > 0)
005ba654                  {
005ba658                      if (result > arg2)
005ba65a                          result = arg2;
005ba65a                      
005ba664                      this_1->paid = ((result * arg3) + paid);
005ba669                      return result;
005ba654                  }
005ba64d              }
005ba643          }
005ba639      }
005ba639      
005ba671      return 0;
005ba5e0  }

005ba674                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005ba680  int32_t __fastcall HousePaymentList::ClearPayment(class HousePaymentList* this)

005ba680  {
005ba687      for (class PackableLLNode<HousePayment>* i = this->head; i != 0; i = i->next)
005ba690          i->data.paid = 0;
005ba690      
005ba69f      return 1;
005ba680  }


005ba6a0  int32_t __fastcall HousePaymentList::IsPaidInFull(class HousePaymentList const* this)

005ba6a0  {
005ba6a5      for (class PackableLLNode<HousePayment>* i = this->head; i != 0; i = i->next)
005ba6a5      {
005ba6ad          if (i->data.paid < i->data.num)
005ba6be              return 0;
005ba6a5      }
005ba6a5      
005ba6bb      return 1;
005ba6a0  }

005ba6bf                                                                                               90                                 .

005ba6c0  int32_t __thiscall HousePaymentList::RemovePayment(class HousePaymentList* this, class HousePayment const* arg2)

005ba6c0  {
005ba6c2      class PackableLLNode<HousePayment>* esi = this->head;
005ba6c7      int32_t edi;
005ba6c7      int32_t var_c = edi;
005ba6c7      
005ba6c8      if (esi != 0)
005ba6c8      {
005ba6ca          class HousePayment* ebx_1 = arg2;
005ba6ca          
005ba6d7          while (true)
005ba6d7          {
005ba6d7              uint32_t id = esi->data.wcid.id;
005ba6d7              
005ba6da              if (((*(uint8_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard') & 1) == 0)
005ba6da              {
005ba6f0                  (*(uint32_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard') |= 1;
005ba6f5                  DBObj::GetDIDByEnum(&WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack, 0x10000002, 0xc);
005ba6ff                  atexit(`WClassIDHelper::IsCoinstack'::`2'::didCoinstack);
005ba6da              }
005ba6da              
005ba70d              uint8_t eax_3;
005ba70d              
005ba70d              if (id == (*(uint32_t*)WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack))
005ba718                  eax_3 = HouseSystem::IsTradeNote(&ebx_1->wcid, &arg2);
005ba718              
005ba722              int32_t num_1;
005ba722              
005ba722              if ((id == (*(uint32_t*)WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack) && eax_3 != 0))
005ba722              {
005ba73b                  int32_t num = ebx_1->num;
005ba73b                  
005ba740                  if (num <= 0)
005ba740                      break;
005ba740                  
005ba742                  class HousePayment* ecx_1 = arg2;
005ba742                  
005ba748                  if (ecx_1 <= 0)
005ba748                      break;
005ba748                  
005ba74d                  num_1 = (num * ecx_1);
005ba722              }
005ba722              else if (ebx_1->wcid.id == esi->data.wcid.id)
005ba751                  num_1 = ebx_1->num;
005ba72a              else
005ba72a              {
005ba72c                  esi = esi->next;
005ba72c                  
005ba731                  if (esi == 0)
005ba731                      break;
005ba731                  
005ba731                  continue;
005ba72a              }
005ba72a              
005ba756              if (num_1 <= 0)
005ba756                  break;
005ba756              
005ba758              int32_t paid = esi->data.paid;
005ba758              
005ba75d              if (num_1 > paid)
005ba75d              {
005ba760                  esi->data.paid = 0;
005ba76e                  return 1;
005ba75d              }
005ba75d              
005ba774              esi->data.paid = (paid - num_1);
005ba77e              return 1;
005ba6d7          }
005ba6c8      }
005ba6c8      
005ba738      return 0;
005ba6c0  }

005ba781     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005ba790  int32_t __fastcall HousePaymentList::NeedsMore(class HousePaymentList const* this, class IDClass<_tagDataID,32,0> arg2)

005ba790  {
005ba790      class HousePaymentList* this_1 = this;
005ba790      
005ba798      for (class PackableLLNode<HousePayment>* i = this->head; i != 0; i = i->next)
005ba798      {
005ba7a7          uint32_t id = i->data.wcid.id;
005ba7a7          
005ba7aa          if (((*(uint8_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard') & 1) == 0)
005ba7aa          {
005ba7c0              (*(uint32_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard') |= 1;
005ba7c5              DBObj::GetDIDByEnum(&WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack, 0x10000002, 0xc);
005ba7cf              atexit(`WClassIDHelper::IsCoinstack'::`2'::didCoinstack);
005ba7aa          }
005ba7aa          
005ba7dd          if (id == (*(uint32_t*)WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack))
005ba7dd          {
005ba7e9              this_1 = nullptr;
005ba7e9              
005ba7fb              if (HouseSystem::IsTradeNote(&arg2, &this_1) != 0)
005ba7fb              {
005ba815                  int32_t paid = i->data.paid;
005ba818                  int32_t num = i->data.num;
005ba818                  
005ba81d                  if (paid < num)
005ba82d                      return ((paid - paid) + 1);
005ba82d                  
005ba81d                  break;
005ba7fb              }
005ba7dd          }
005ba7dd          
005ba804          if (i->data.wcid.id == arg2)
005ba804          {
005ba83a              int32_t result;
005ba83a              result = i->data.paid < i->data.num;
005ba842              return result;
005ba804          }
005ba798      }
005ba798      
005ba812      return 0;
005ba790  }

005ba845                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005ba850  int32_t __thiscall HousePaymentList::AttemptToPay(class HousePaymentList* this, class IDClass<_tagDataID,32,0> arg2, int32_t const arg3)

005ba850  {
005ba850      class HousePaymentList* this_1 = this;
005ba850      
005ba859      for (class PackableLLNode<HousePayment>* i = this->head; i != 0; i = i->next)
005ba859      {
005ba866          uint32_t id = i->data.wcid.id;
005ba866          
005ba869          if (((*(uint8_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard') & 1) == 0)
005ba869          {
005ba87e              (*(uint32_t*)WClassIDHelper::IsCoinstack::`local static guard'::~`local static guard') |= 1;
005ba883              DBObj::GetDIDByEnum(&WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack, 0x10000002, 0xc);
005ba88d              atexit(`WClassIDHelper::IsCoinstack'::`2'::didCoinstack);
005ba869          }
005ba869          
005ba89b          if ((id == (*(uint32_t*)WClassIDHelper::IsCoinstack::didCoinstack::~didCoinstack) && HouseSystem::IsTradeNote(&arg2, &this_1) != 0))
005ba8e1              return HousePayment::PayWithTradeNote(i, arg3, this_1);
005ba8e1          
005ba8ba          if (arg2 == i->data.wcid.id)
005ba8ba          {
005ba8ea              if (arg3 > 0)
005ba8ea              {
005ba8ec                  int32_t paid = i->data.paid;
005ba8ef                  int32_t num = i->data.num;
005ba8ef                  
005ba8f4                  if (paid < num)
005ba8f4                  {
005ba8f6                      int32_t edi_1 = (paid + arg3);
005ba8f6                      
005ba8fb                      if (edi_1 > num)
005ba8fb                      {
005ba900                          i->data.paid = num;
005ba90a                          return (num - paid);
005ba8fb                      }
005ba8fb                      
005ba90d                      i->data.paid = edi_1;
005ba916                      return arg3;
005ba8f4                  }
005ba8ea              }
005ba8ea              
005ba8ea              break;
005ba8ba          }
005ba859      }
005ba859      
005ba8c9      return 0;
005ba850  }

005ba919                                                                             90 90 90 90 90 90 90                           .......

005ba920  class HousePayment& __thiscall HousePayment::operator=(class HousePayment* this, class HousePayment const& arg2)

005ba920  {
005ba92a      if (this != arg2)
005ba92a      {
005ba92f          this->num = arg2->num;
005ba935          this->paid = arg2->paid;
005ba93c          this->wcid.id = arg2->wcid.id;
005ba93f          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->name.m_buffer;
005ba93f          
005ba94c          if (m_buffer_1 != arg2->name.m_buffer)
005ba94c          {
005ba95e              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005ba960                  m_buffer_1->vtable->__vecDelDtor(1);
005ba960              
005ba968              class AC1Legacy::PStringBase<char> m_buffer = arg2->name.m_buffer;
005ba96b              this->name.m_buffer = m_buffer;
005ba972              InterlockedIncrement((m_buffer + 4));
005ba94c          }
005ba94c          
005ba974          class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->pname.m_buffer;
005ba974          
005ba97a          if (m_buffer_2 != arg2->pname.m_buffer)
005ba97a          {
005ba98c              if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
005ba98e                  m_buffer_2->vtable->__vecDelDtor(1);
005ba98e              
005ba996              class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = arg2->pname.m_buffer;
005ba999              this->pname.m_buffer = m_buffer_3;
005ba9a0              InterlockedIncrement(&m_buffer_3->m_cRef);
005ba97a          }
005ba92a      }
005ba92a      
005ba9a8      return this;
005ba920  }

005ba9ab                                   90 90 90 90 90                                                             .....

005ba9b0  uint32_t __fastcall HousePayment::GetPackSize(class HousePayment* this)

005ba9b0  {
005ba9b0      class HousePayment* this_1 = this;
005ba9bf      this_1 = nullptr;
005ba9e4      return ((AC1Legacy::PStringBase<char>::Pack(&this->pname, &this_1, 0) + AC1Legacy::PStringBase<char>::Pack(&this->name, &this_1, 0)) + 0xc);
005ba9b0  }

005ba9e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005ba9f0  uint32_t __thiscall HousePayment::Pack(class HousePayment* this, void** arg2, uint32_t arg3)

005ba9f0  {
005ba9f7      int32_t result = this->vtable->GetPackSize();
005ba9f7      
005baa02      if (arg3 >= result)
005baa02      {
005baa0e          **(uint32_t**)arg2 = this->num;
005baa12          void* eax_2 = (*(uint32_t*)arg2 + 4);
005baa15          *(uint32_t*)arg2 = eax_2;
005baa1a          *(uint32_t*)eax_2 = this->paid;
005baa1e          void* edx_3 = (*(uint32_t*)arg2 + 4);
005baa21          *(uint32_t*)arg2 = edx_3;
005baa28          *(uint32_t*)edx_3 = this->wcid.id;
005baa30          *(uint32_t*)arg2 += 4;
005baa36          AC1Legacy::PStringBase<char>::Pack(&this->name, arg2, arg3);
005baa40          AC1Legacy::PStringBase<char>::Pack(&this->pname, arg2, arg3);
005baa02      }
005baa02      
005baa4b      return result;
005ba9f0  }

005baa4e                                            90 90                                                                ..

005baa50  int32_t __thiscall HousePaymentList::Pay(class HousePaymentList* this, class HousePayment const* arg2)

005baa50  {
005baa5c      int32_t eax_1 = HousePaymentList::AttemptToPay(this, arg2->wcid.id, arg2->num);
005baa61      int32_t eax_2 = -(eax_1);
005baa67      return -((eax_2 - eax_2));
005baa50  }

005baa6a                                90 90 90 90 90 90                                                            ......

005baa70  void __thiscall HousePayment::HousePayment(class HousePayment* this, class HousePayment const* arg2)

005baa70  {
005baa73      this->vtable = 0x7ab648;
005baa79      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005baa8b      this->name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005baa8e      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005baa90      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005baa9c      this->pname.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005baa9f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005baaa8      HousePayment::operator=(this, arg2);
005baa70  }

005baab4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005baac0  int32_t __thiscall HousePayment::UnPack(class HousePayment* this, void** arg2, uint32_t arg3)

005baac0  {
005baacb      if (arg3 < 0xc)
005baad1          return 0;
005baad1      
005baada      void* ebx = *(uint32_t*)arg2;
005baade      this->num = *(uint32_t*)ebx;
005baae3      void* ecx_1 = (*(uint32_t*)arg2 + 4);
005baae6      *(uint32_t*)arg2 = ecx_1;
005baaec      this->paid = *(uint32_t*)ecx_1;
005baaf1      void* eax_4 = (*(uint32_t*)arg2 + 4);
005baaf4      *(uint32_t*)arg2 = eax_4;
005baaf6      class IDClass<_tagDataID,32,0> ecx_3 = *(uint32_t*)eax_4;
005baafb      *(uint32_t*)arg2 = ((char*)eax_4 + 4);
005baafd      this->wcid.id = ecx_3;
005bab02      int32_t eax_7 = (*(uint32_t*)arg2 - ebx);
005bab06      uint32_t ecx_5;
005bab06      
005bab06      if (arg3 <= eax_7)
005bab0e          ecx_5 = 0;
005bab06      else
005bab0a          ecx_5 = (arg3 - eax_7);
005bab0a      
005bab15      int32_t result = AC1Legacy::PStringBase<char>::UnPack(&this->name, arg2, ecx_5);
005bab15      
005bab1c      if (result == 0)
005bab22          return result;
005bab22      
005bab27      void* eax_9 = (*(uint32_t*)arg2 - ebx);
005bab2b      void* ebp_1;
005bab2b      
005bab2b      if (arg3 <= eax_9)
005bab31          ebp_1 = nullptr;
005bab2b      else
005bab2d          ebp_1 = (arg3 - eax_9);
005bab2d      
005bab38      int32_t eax_10 = AC1Legacy::PStringBase<char>::UnPack(&this->pname, arg2, ebp_1);
005bab3e      int32_t eax_11 = -(eax_10);
005bab47      return -((eax_11 - eax_11));
005baac0  }

005bab4a                                90 90 90 90 90 90                                                            ......

005bab50  int32_t __thiscall HousePayment::GetName(class HousePayment const* this, class AC1Legacy::PStringBase<char>* arg2)

005bab50  {
005bab57      if (this->num != 1)
005bab57      {
005bab8c          class AC1Legacy::PSRefBuffer<char>* m_buffer = this->pname.m_buffer;
005bab8c          
005bab93          if (m_buffer->m_len == 1)
005bab93          {
005babc7              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->name.m_buffer;
005babca              uint32_t m_len_3 = m_buffer_1->m_len;
005babd1              class AC1Legacy::PStringBase<char>* edi_1 = arg2;
005babd1              
005babdd              if ((m_len_3 != 1 && m_buffer_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005babe7                  AC1Legacy::PStringBase<char>::append_n_chars(edi_1, &m_buffer_1->m_data, (m_len_3 - 1));
005babe7              
005babec              class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->name.m_buffer;
005babef              uint32_t m_len_2 = m_buffer_3->m_len;
005babf7              void* eax_5 = ((m_len_2 + m_buffer_3) + 0x13);
005babf7              
005babfb              if ((m_len_2 - 1) < m_len_2)
005babfd                  eax_5 = &&m_buffer_3->m_data[(m_len_2 - 1)];
005babfd              
005bac01              eax_5 = *(uint8_t*)eax_5;
005bac01              
005bac09              if ((eax_5 != 0x73 && eax_5 != 0x78))
005bac09              {
005bac14                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794520);
005bac20                  AC1Legacy::PStringBase<char>::operator+=(edi_1, &arg2);
005bac29                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
005bac35                  return 1;
005bac09              }
005bac09              
005bac41              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_7e3fe8);
005bac46              class AC1Legacy::PStringBase<char>* esi_4 = arg2;
005bac4a              int32_t eax_7 = *(int32_t*)((char*)esi_4 + 8);
005bac4a              
005bac58              if ((eax_7 != 1 && esi_4 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bac62                  AC1Legacy::PStringBase<char>::append_n_chars(edi_1, &esi_4[5], (eax_7 - 1));
005bac62              
005bac73              if (InterlockedDecrement(&esi_4[1]) == 0)
005bac75                  esi_4->m_buffer->vtable(1);
005bab93          }
005bab93          else
005bab93          {
005bab97              uint32_t m_len_1 = m_buffer->m_len;
005bab97              
005baba9              if ((m_len_1 != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
005babb9                  AC1Legacy::PStringBase<char>::append_n_chars(arg2, &m_buffer->m_data, (m_len_1 - 1));
005bab93          }
005bab57      }
005bab57      else
005bab57      {
005bab59          class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->name.m_buffer;
005bab5c          uint32_t m_len = m_buffer_2->m_len;
005bab5c          
005bab6e          if ((m_len != 1 && m_buffer_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bab7e              AC1Legacy::PStringBase<char>::append_n_chars(arg2, &m_buffer_2->m_data, (m_len - 1));
005bab57      }
005bab57      
005bac84      return 1;
005bab50  }

005bac87                       90 90 90 90 90 90 90 90 90                                                         .........

005bac90  int32_t __thiscall PackableList<HousePayment>::UnPack(class PackableList<HousePayment>* this, void** arg2, uint32_t arg3)

005bac90  {
005bac93      int32_t __saved_ebx_1;
005bac93      int32_t __saved_ebx = __saved_ebx_1;
005bac96      PackableList<HousePayment>::Flush(this);
005bac96      
005baca0      if (arg_c < 4)
005bad7e          return 0;
005bad7e      
005bacaa      int32_t* eax = *(uint32_t*)arg3;
005bacb5      int32_t esi = *(uint32_t*)eax;
005bacba      *(uint32_t*)arg3 = &eax[1];
005bacc1      uint32_t id = INVALID_DID.id;
005bacc5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bacd8      int32_t var_14 = 0x7ab648;
005bace0      int32_t var_c = 0;
005bace4      int32_t var_8 = 0;
005bace8      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005bacea      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bacef      __return_addr = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005bacf7      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005bacfb      int32_t var_1c = 0;
005bacfb      
005bacff      if (esi > 0)
005bacff      {
005badaf          bool cond:1_1;
005badaf          
005badaf          do
005badaf          {
005bad27              if (*(uint32_t*)(var_14 + 0x10)(arg3, arg_c) == 0)
005bad27              {
005bae14                  if ((InterlockedDecrement(((char*)__return_addr + 4)) == 0 && __return_addr != 0))
005bae1c                      **(uint32_t**)__return_addr(1);
005bae1c                  
005bae2e                  if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
005bae30                      AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
005bae30                  
005bae41                  return 0;
005bad27              }
005bad27              
005bad34              void* esi_1 = operator new(0x20);
005bad34              
005bad3b              if (esi_1 == 0)
005bad81                  esi_1 = nullptr;
005bad3b              else
005bad3b              {
005bad3d                  *(uint32_t*)esi_1 = 0x7ab648;
005bad43                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bad4f                  *(uint32_t*)((char*)esi_1 + 0x10) = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
005bad52                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
005bad54                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bad5f                  *(uint32_t*)((char*)esi_1 + 0x14) = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005bad62                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
005bad6b                  HousePayment::operator=(esi_1, &var_14);
005bad70                  *(uint32_t*)((char*)esi_1 + 0x18) = 0;
005bad73                  *(uint32_t*)((char*)esi_1 + 0x1c) = 0;
005bad3b              }
005bad3b              
005bad86              if (this->head != 0)
005bad86              {
005bad8d                  class PackableLLNode<HousePayment>* tail = this->tail;
005bad90                  tail->next = esi_1;
005bad93                  *(uint32_t*)((char*)esi_1 + 0x1c) = tail;
005bad86              }
005bad86              else
005bad88                  this->head = esi_1;
005bad88              
005bad9e              this->tail = esi_1;
005bada6              cond:1_1 = (var_1c + 1) < esi;
005bada8              this->curNum += 1;
005badab              var_1c += 1;
005badaf          } while (cond:1_1);
005bacff      }
005bacff      
005badcb      if ((InterlockedDecrement(((char*)__return_addr + 4)) == 0 && __return_addr != 0))
005badd3          **(uint32_t**)__return_addr(1);
005badd3      
005bade5      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
005bade7          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
005bade7      
005badfb      return 1;
005bac90  }

005bad07                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
005bae44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005bae50  void* __thiscall HousePaymentList::`scalar deleting destructor'(class HousePaymentList* this, uint32_t arg2)

005bae50  {
005bae53      this->vtable = 0x7e72e4;
005bae59      PackableList<HousePayment>::Flush(this);
005bae63      this->vtable = 0x79285c;
005bae63      
005bae69      if ((arg2 & 1) != 0)
005bae6c          operator delete(this);
005bae6c      
005bae77      return this;
005bae50  }

005bae7a                                                                                90 90 90 90 90 90                            ......

005bae80  void __fastcall HousePaymentList::~HousePaymentList(class HousePaymentList* this)

005bae80  {
005bae83      this->vtable = 0x7e72e4;
005bae89      PackableList<HousePayment>::Flush(this);
005bae8e      this->vtable = 0x79285c;
005bae80  }

005bae96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005baea0  int32_t __fastcall HousePayment::ComposeText(class HousePayment const* this, class AC1Legacy::PStringBase<char>* arg2)

005baea0  {
005baea0      class HousePayment* this_1 = this;
005baea1      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005baea6      class AC1Legacy::PStringBase<char> ebx;
005baea6      class AC1Legacy::PStringBase<char> var_8 = ebx;
005baea7      int32_t esi;
005baea7      int32_t var_c = esi;
005baea8      int32_t edi;
005baea8      int32_t var_10 = edi;
005baea9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005baeb2      int32_t num = this->num;
005baeb6      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005baec1      AC1Legacy::PStringBase<char>::operator=(&var_8, num);
005baec6      class AC1Legacy::PStringBase<char> esi_1 = var_8;
005baeca      int32_t eax_1 = *(uint32_t*)(esi_1 + 8);
005baeca      
005baedc      if ((eax_1 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005baee6          AC1Legacy::PStringBase<char>::append_n_chars(__return_addr, (esi_1 + 0x14), (eax_1 - 1));
005baee6      
005baeeb      int32_t ebp;
005baeeb      int32_t var_18_2 = ebp;
005baeeb      
005baefa      if (InterlockedDecrement((esi_1 + 4)) == 0)
005baf02          **(uint32_t**)esi_1(1);
005baf02      
005baf0d      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794098);
005baf12      class AC1Legacy::PStringBase<char>* esi_2 = arg2;
005baf16      int32_t eax_5 = *(int32_t*)((char*)esi_2 + 8);
005baf16      
005baf24      if ((eax_5 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005baf2e          AC1Legacy::PStringBase<char>::append_n_chars(__return_addr, &esi_2[5], (eax_5 - 1));
005baf2e      
005baf3c      if (InterlockedDecrement(&esi_2[1]) == 0)
005baf3e          esi_2->m_buffer->vtable(1);
005baf3e      
005baf49      HousePayment::GetName(this, __return_addr);
005baf52      return 1;
005baea0  }

005baf55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005baf60  int32_t __fastcall HousePayment::ComposeText2(class HousePayment const* this, class AC1Legacy::PStringBase<char>* arg2)

005baf60  {
005baf60      class HousePayment* var_4 = this;
005baf61      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005baf70      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005baf79      int32_t paid = this->paid;
005baf7d      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005baf84      AC1Legacy::PStringBase<char>::operator=(&var_4, paid);
005baf89      class HousePayment* esi = var_4;
005baf8d      int32_t num = esi->num;
005baf93      class AC1Legacy::PStringBase<char>* ebp = arg2;
005baf93      
005baf9f      if ((num != 1 && esi != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bafa9          AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi->pname, (num - 1));
005bafa9      
005bafba      if (InterlockedDecrement(&esi->wcid) == 0)
005bafbc          esi->vtable->__vecDelDtor(1);
005bafbc      
005bafcd      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_7944ac);
005bafd2      class AC1Legacy::PStringBase<char>* esi_1 = arg2;
005bafd6      int32_t eax_4 = *(int32_t*)((char*)esi_1 + 8);
005bafd6      
005bafe4      if ((eax_4 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bafee          AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_1[5], (eax_4 - 1));
005bafee      
005bafff      if (InterlockedDecrement(&esi_1[1]) == 0)
005bb001          esi_1->m_buffer->vtable(1);
005bb001      
005bb009      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bb00e      int32_t num_1 = this->num;
005bb011      arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005bb019      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005bb020      AC1Legacy::PStringBase<char>::operator=(&arg2, num_1);
005bb025      class AC1Legacy::PStringBase<char>* esi_2 = arg2;
005bb029      int32_t eax_9 = *(int32_t*)((char*)esi_2 + 8);
005bb029      
005bb037      if ((eax_9 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bb041          AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_2[5], (eax_9 - 1));
005bb041      
005bb054      if (InterlockedDecrement(&esi_2[1]) == 0)
005bb056          esi_2->m_buffer->vtable(1);
005bb056      
005bb067      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794098);
005bb06c      class AC1Legacy::PStringBase<char>* esi_3 = arg2;
005bb070      int32_t eax_13 = *(int32_t*)((char*)esi_3 + 8);
005bb070      
005bb07e      if ((eax_13 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bb088          AC1Legacy::PStringBase<char>::append_n_chars(ebp, &esi_3[5], (eax_13 - 1));
005bb088      
005bb095      if (InterlockedDecrement(&esi_3[1]) == 0)
005bb097          esi_3->m_buffer->vtable(1);
005bb097      
005bb0a2      HousePayment::GetName(this, ebp);
005bb0ac      return 1;
005baf60  }

005bb0af                                               90                                                                 .

005bb0b0  int32_t __thiscall HousePaymentList::ComposeText(class HousePaymentList const* this, class AC1Legacy::PStringBase<char>* arg2)

005bb0b0  {
005bb0b1      class AC1Legacy::PStringBase<char>* this_2 = arg2;
005bb0bd      uint32_t this_1;
005bb0bd      void* edi;
005bb0bd      
005bb0bd      for (class PackableLLNode<HousePayment>* head = this->head; head != 0; head = *(uint32_t*)((char*)edi + 0x18))
005bb0bd      {
005bb0c5          this_1 = this_2;
005bb0c8          class AC1Legacy::PStringBase<char>* edx;
005bb0c8          int32_t ebp_2;
005bb0c8          ebp_2 = HousePayment::ComposeText(head, edx);
005bb0cd          this_1 = &data_794334;
005bb0d6          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, this_1);
005bb0db          class AC1Legacy::PStringBase<char>* esi_1 = arg2;
005bb0df          int32_t eax_1 = *(int32_t*)((char*)esi_1 + 8);
005bb0df          
005bb0ed          if ((eax_1 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bb0ed          {
005bb0f0              this_1 = (eax_1 - 1);
005bb0f7              AC1Legacy::PStringBase<char>::append_n_chars(this_2, &esi_1[5], this_1);
005bb0ed          }
005bb0ed          
005bb0ff          this_1 = &esi_1[1];
005bb100          int32_t eax_4;
005bb100          eax_4 = ebp_2(this_1);
005bb100          
005bb104          if (eax_4 == 0)
005bb104          {
005bb106              class AC1Legacy::PSRefBuffer<char>* m_buffer = esi_1->m_buffer;
005bb108              this_1 = 1;
005bb10c              edx = m_buffer->vtable(this_1);
005bb104          }
005bb104          
005bb110          if (edi == 0)
005bb110              break;
005bb0bd      }
005bb0bd      
005bb119      this_1 = this;
005bb121      AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, &data_794334);
005bb12c      AC1Legacy::PStringBase<char>::trim(this_2, 0, 1, this_1);
005bb137      return 0;
005bb0b0  }

005bb13a                                                                                90 90 90 90 90 90                            ......

005bb140  int32_t __thiscall HousePaymentList::ComposeText2(class HousePaymentList const* this, class AC1Legacy::PStringBase<char>* arg2)

005bb140  {
005bb141      class AC1Legacy::PStringBase<char>* this_2 = arg2;
005bb14d      uint32_t this_1;
005bb14d      
005bb14d      for (class PackableLLNode<HousePayment>* i = this->head; i != 0; i = i->next)
005bb14d      {
005bb155          this_1 = this_2;
005bb158          class AC1Legacy::PStringBase<char>* edx;
005bb158          HousePayment::ComposeText2(i, edx);
005bb15d          this_1 = &data_794334;
005bb166          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, this_1);
005bb16b          class AC1Legacy::PStringBase<char>* esi_1 = arg2;
005bb16f          int32_t eax_1 = *(int32_t*)((char*)esi_1 + 8);
005bb16f          
005bb17d          if ((eax_1 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bb17d          {
005bb180              this_1 = (eax_1 - 1);
005bb187              AC1Legacy::PStringBase<char>::append_n_chars(this_2, &esi_1[5], this_1);
005bb17d          }
005bb17d          
005bb18f          this_1 = &esi_1[1];
005bb190          int32_t eax_4;
005bb190          eax_4 = InterlockedDecrement(this_1);
005bb190          
005bb194          if (eax_4 == 0)
005bb194          {
005bb196              class AC1Legacy::PSRefBuffer<char>* m_buffer = esi_1->m_buffer;
005bb198              this_1 = 1;
005bb19c              edx = m_buffer->vtable(this_1);
005bb194          }
005bb194          
005bb1a0          if (i == 0)
005bb1a0              break;
005bb14d      }
005bb14d      
005bb1a9      this_1 = this;
005bb1b1      AC1Legacy::PStringBase<char>::PStringBase<char>(&this_1, &data_794334);
005bb1bc      AC1Legacy::PStringBase<char>::trim(this_2, 0, 1, this_1);
005bb1c7      return 0;
005bb140  }

005bb1ca                                90 90 90 90 90 90                                                            ......

005bb1d0  int32_t HouseSystem::HasPurchaseWaitPeriodExpired(int32_t arg1)

005bb1d0  {
005bb1e0      int32_t result;
005bb1e0      result = (Timer::get_real_time() - arg1) > 0x278d00;
005bb1e5      return result;
005bb1d0  }

005bb1e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005bb1f0  uint32_t const* HouseSystem::GetRentPeriod(uint32_t const* arg1)

005bb1f0  {
005bb1f4      *(uint32_t*)arg1;
005bb1ff      return arg1;
005bb1f0  }

005bb207                       90 90 90 90 90 90 90 90 90                                                         .........

005bb210  uint8_t HouseSystem::IsTradeNote(class IDClass<_tagDataID,32,0>* arg1, uint32_t* arg2)

005bb210  {
005bb217      int32_t var_10 = 0x28;
005bb219      int32_t var_14 = 0x10000001;
005bb21e      int32_t var_18 = 0xa;
005bb220      int32_t ebx;
005bb220      ebx = 0;
005bb222      *(uint32_t*)arg2 = 0;
005bb228      int32_t eax;
005bb228      uint32_t ecx;
005bb228      int32_t edx;
005bb228      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005bb228      
005bb234      if (eax_1 != 0)
005bb234      {
005bb249          ebx = DualEnumIDMap::DIDToEnum(eax_1, arg1->id, arg2);
005bb245          eax_1->vtable->Release();
005bb234      }
005bb234      
005bb250      eax_1 = ebx;
005bb253      return eax_1;
005bb210  }

005bb254                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bb260  int32_t HouseSystem::ConvertTime(int32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005bb260  {
005bb26d      char const* const var_20c;
005bb26d      
005bb26d      if (arg1 != 0)
005bb26d      {
005bb27e          int32_t eax = localtime(&arg1);
005bb27e          
005bb289          if (eax == 0)
005bb304              return 0;
005bb304          
005bb29b          void var_200;
005bb29b          strftime(&var_200, 0x200, &data_7ab7ec, eax);
005bb2a8          var_20c = &var_200;
005bb26d      }
005bb26d      else
005bb26f          var_20c = "N/A";
005bb26f      
005bb2ad      class AC1Legacy::PStringBase<char> var_204;
005bb2ad      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_204, var_20c);
005bb2b2      class AC1Legacy::PStringBase<char> esi = var_204;
005bb2b6      int32_t eax_1 = *(uint32_t*)(esi + 8);
005bb2b6      
005bb2c4      if ((eax_1 != 1 && esi != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bb2d3          AC1Legacy::PStringBase<char>::append_n_chars(arg2, (esi + 0x14), (eax_1 - 1));
005bb2d3      
005bb2e4      if (InterlockedDecrement((esi + 4)) == 0)
005bb2ec          **(uint32_t**)esi(1);
005bb2ec      
005bb2fa      return 1;
005bb260  }

005bb305                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005bb310  int32_t __convention("regparm") HouseSystem::ConstructRentWarningMessage(uint32_t const* arg1, class AC1Legacy::PStringBase<char>* arg2)

005bb310  {
005bb310      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4;
005bb310      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
005bb315      *(uint32_t*)arg1;
005bb331      int32_t eax_1 = _ftol2();
005bb33e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bb343      AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005bb34b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005bb352      AC1Legacy::PStringBase<char>::operator=(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, eax_1);
005bb362      AC1Legacy::PStringBase<char>::set(arg2, "Warning!  You have not paid your…");
005bb367      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bb36c      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005bb374      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005bb37b      AC1Legacy::PStringBase<char>::operator=(&arg1, eax_1);
005bb380      uint32_t const* esi_1 = arg1;
005bb384      int32_t eax_4 = esi_1[2];
005bb384      
005bb392      if ((eax_4 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bb39c          AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_1[5], (eax_4 - 1));
005bb39c      
005bb3af      if (InterlockedDecrement(&esi_1[1]) == 0)
005bb3b7          **(uint32_t**)esi_1(1);
005bb3b7      
005bb3c2      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, " day maintenance period.  Please…");
005bb3c7      uint32_t const* esi_2 = arg1;
005bb3cb      int32_t eax_8 = esi_2[2];
005bb3cb      
005bb3d9      if ((eax_8 != 1 && esi_2 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bb3e3          AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_2[5], (eax_8 - 1));
005bb3e3      
005bb3f0      if (InterlockedDecrement(&esi_2[1]) == 0)
005bb3f8          **(uint32_t**)esi_2(1);
005bb3f8      
005bb403      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, " or you will lose your house, an…");
005bb408      uint32_t const* esi_3 = arg1;
005bb40c      int32_t eax_12 = esi_3[2];
005bb40c      
005bb41a      if ((eax_12 != 1 && esi_3 != AC1Legacy::PStringBase<char>::s_NullBuffer))
005bb424          AC1Legacy::PStringBase<char>::append_n_chars(arg2, &esi_3[5], (eax_12 - 1));
005bb424      
005bb431      if (InterlockedDecrement(&esi_3[1]) == 0)
005bb439          **(uint32_t**)esi_3(1);
005bb439      
005bb43b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005bb43b      
005bb44b      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
005bb44d          AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
005bb44d      
005bb45e      return 1;
005bb310  }

005bb45f                                                                                               90                                 .

005bb460  uint32_t __fastcall HouseData::GetPackSize(class HouseData* this)

005bb460  {
005bb460      class HouseData* this_1 = this;
005bb478      this_1 = nullptr;
005bb4ab      return (((this->m_rent.vtable->Pack(&this_1, 0) + this->m_buy.vtable->Pack(&this_1, 0)) + this->m_pos.vtable->Pack(&this_1, 0)) + 0x10);
005bb460  }

005bb4ac                                      90 90 90 90                                                              ....

005bb4b0  uint32_t __thiscall HouseData::Pack(class HouseData* this, void** arg2, uint32_t arg3)

005bb4b0  {
005bb4b7      int32_t result = this->vtable->GetPackSize();
005bb4b7      
005bb4c2      if (arg3 >= result)
005bb4c2      {
005bb4ce          **(uint32_t**)arg2 = this->m_buy_time;
005bb4d2          void* ecx_2 = (*(uint32_t*)arg2 + 4);
005bb4d5          *(uint32_t*)arg2 = ecx_2;
005bb4dc          *(uint32_t*)ecx_2 = this->m_rent_time;
005bb4e0          void* eax_3 = (*(uint32_t*)arg2 + 4);
005bb4e3          *(uint32_t*)arg2 = eax_3;
005bb4e8          *(uint32_t*)eax_3 = this->m_type;
005bb4ec          void* edx_4 = (*(uint32_t*)arg2 + 4);
005bb4ef          *(uint32_t*)arg2 = edx_4;
005bb4f6          *(uint32_t*)edx_4 = this->m_maintenance_free;
005bb4f8          *(uint32_t*)arg2 += 4;
005bb4fb          this->m_buy.vtable->Pack(arg2, arg3);
005bb506          this->m_rent.vtable->Pack(arg2, arg3);
005bb511          this->m_pos.vtable->Pack(arg2, arg3);
005bb4c2      }
005bb4c2      
005bb522      return result;
005bb4b0  }

005bb525                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005bb530  int32_t __thiscall HouseData::UnPack(class HouseData* this, void** arg2, uint32_t arg3)

005bb530  {
005bb53b      if (arg3 < 0x10)
005bb541          return 0;
005bb541      
005bb54a      void* ebx = *(uint32_t*)arg2;
005bb54e      this->m_buy_time = *(uint32_t*)ebx;
005bb553      void* eax_3 = (*(uint32_t*)arg2 + 4);
005bb556      *(uint32_t*)arg2 = eax_3;
005bb55a      this->m_rent_time = *(uint32_t*)eax_3;
005bb55f      void* edx_1 = (*(uint32_t*)arg2 + 4);
005bb562      *(uint32_t*)arg2 = edx_1;
005bb568      this->m_type = *(uint32_t*)edx_1;
005bb56d      void* ecx_2 = (*(uint32_t*)arg2 + 4);
005bb570      *(uint32_t*)arg2 = ecx_2;
005bb576      this->m_maintenance_free = *(uint32_t*)ecx_2;
005bb57b      void* eax_8 = (*(uint32_t*)arg2 + 4);
005bb57e      *(uint32_t*)arg2 = eax_8;
005bb580      int32_t eax_9 = ((char*)eax_8 - ebx);
005bb584      int32_t edx_4;
005bb584      
005bb584      if (arg3 <= eax_9)
005bb58c          edx_4 = 0;
005bb584      else
005bb588          edx_4 = (arg3 - eax_9);
005bb588      
005bb59b      if (this->m_buy.vtable->UnPack(arg2, edx_4) != 0)
005bb59b      {
005bb5a8          int32_t eax_14 = (*(uint32_t*)arg2 - ebx);
005bb5ac          int32_t edx_6;
005bb5ac          
005bb5ac          if (arg3 <= eax_14)
005bb5b4              edx_6 = 0;
005bb5ac          else
005bb5b0              edx_6 = (arg3 - eax_14);
005bb5b0          
005bb5c3          if (this->m_rent.vtable->UnPack(arg2, edx_6) != 0)
005bb5c3          {
005bb5c7              void* eax_18 = (*(uint32_t*)arg2 - ebx);
005bb5cb              void* ebp_1;
005bb5cb              
005bb5cb              if (arg3 <= eax_18)
005bb5d1                  ebp_1 = nullptr;
005bb5cb              else
005bb5cd                  ebp_1 = (arg3 - eax_18);
005bb5cd              
005bb5db              int32_t eax_19 = this->m_pos.vtable->UnPack(arg2, ebp_1);
005bb5df              int32_t eax_20 = -(eax_19);
005bb5e8              return -((eax_20 - eax_20));
005bb5c3          }
005bb59b      }
005bb59b      
005bb5a3      return 0;
005bb530  }

005bb5eb                                   90 90 90 90 90                                                             .....

005bb5f0  void __fastcall HouseData::HouseData(class HouseData* this)

005bb5f0  {
005bb5f3      this->vtable = 0x7e741c;
005bb5ff      this->m_buy_time = 0;
005bb602      this->m_rent_time = 0;
005bb605      this->m_buy.head = nullptr;
005bb608      this->m_buy.tail = nullptr;
005bb60b      this->m_buy.curNum = 0;
005bb613      this->m_buy.vtable = 0x7e72e4;
005bb616      this->m_rent.head = nullptr;
005bb619      this->m_rent.tail = nullptr;
005bb61c      this->m_rent.curNum = 0;
005bb61f      this->m_rent.vtable = 0x7e72e4;
005bb622      this->m_pos.vtable = 0x796910;
005bb629      this->m_pos.objcell_id = 0;
005bb5f9      this->m_pos.frame.qw = 0x3f800000;
005bb5f9      this->m_pos.frame.qx = 0f;
005bb5f9      this->m_pos.frame.qy = 0f;
005bb5f9      this->m_pos.frame.qz = 0f;
005bb5f9      this->m_pos.frame.m_fOrigin.x = 0;
005bb5f9      this->m_pos.frame.m_fOrigin.y = 0f;
005bb5f9      this->m_pos.frame.m_fOrigin.z = 0f;
005bb644      Frame::cache(&this->m_pos.frame);
005bb649      this->m_type = 0;
005bb64c      this->m_maintenance_free = 0;
005bb5f0  }

005bb654                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bb660  void* __thiscall HouseData::`scalar deleting destructor'(class HouseData* this, uint32_t arg2)

005bb660  {
005bb666      this->m_pos.vtable = 0x79285c;
005bb66d      HousePaymentList::~HousePaymentList(&this->m_rent);
005bb675      HousePaymentList::~HousePaymentList(&this->m_buy);
005bb67f      this->vtable = 0x79285c;
005bb67f      
005bb685      if ((arg2 & 1) != 0)
005bb688          operator delete(this);
005bb688      
005bb693      return this;
005bb660  }

005bb696                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005bb6a0  class HouseData& __thiscall HouseData::operator=(class HouseData* this, class HouseData const& arg2)

005bb6a0  {
005bb6aa      if (this != arg2)
005bb6aa      {
005bb6af          this->m_buy_time = arg2->m_buy_time;
005bb6b8          this->m_rent_time = arg2->m_rent_time;
005bb6bf          PackableList<HousePayment>::operator=(&this->m_buy.vtable, &arg2->m_buy);
005bb6cb          PackableList<HousePayment>::operator=(&this->m_rent.vtable, &arg2->m_rent);
005bb6d6          this->m_pos.objcell_id = arg2->m_pos.objcell_id;
005bb6dd          Frame::operator=(&this->m_pos.frame, &arg2->m_pos.frame);
005bb6e5          this->m_type = arg2->m_type;
005bb6eb          this->m_maintenance_free = arg2->m_maintenance_free;
005bb6aa      }
005bb6aa      
005bb6f2      return this;
005bb6a0  }

005bb6f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005bb700  void __thiscall HouseData::HouseData(class HouseData* this, class HouseData const* arg2)

005bb700  {
005bb705      this->vtable = 0x7e741c;
005bb70b      this->m_buy.head = nullptr;
005bb70e      this->m_buy.tail = nullptr;
005bb711      this->m_buy.curNum = 0;
005bb719      this->m_buy.vtable = 0x7e72e4;
005bb71c      this->m_rent.vtable = 0x7e72e4;
005bb71f      this->m_rent.head = nullptr;
005bb722      this->m_rent.tail = nullptr;
005bb725      this->m_rent.curNum = 0;
005bb72b      this->m_pos.vtable = 0x796910;
005bb732      this->m_pos.objcell_id = 0;
005bb728      this->m_pos.frame.qw = 0x3f800000;
005bb728      this->m_pos.frame.qx = 0f;
005bb728      this->m_pos.frame.qy = 0f;
005bb728      this->m_pos.frame.qz = 0f;
005bb728      this->m_pos.frame.m_fOrigin.x = 0;
005bb728      this->m_pos.frame.m_fOrigin.y = 0f;
005bb728      this->m_pos.frame.m_fOrigin.z = 0f;
005bb74d      Frame::cache(&this->m_pos.frame);
005bb759      HouseData::operator=(this, arg2);
005bb700  }

005bb764              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005bb770  int32_t __thiscall HouseProfile::IsPaidInFull(class HouseProfile const* this, enum HouseOp arg2)

005bb770  {
005bb775      class HousePaymentList* ecx;
005bb775      
005bb775      if (arg2 == Buy_House)
005bb775      {
005bb77f          ecx = &this->_buy;
005bb782      label_5bb782:
005bb782          
005bb784          if (ecx != 0)
005bb78b              return HousePaymentList::IsPaidInFull(ecx);
005bb775      }
005bb775      else if (arg2 == 2)
005bb778      {
005bb77a          ecx = &this->_rent;
005bb77d          goto label_5bb782;
005bb778      }
005bb790      return 0;
005bb770  }

005bb793                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005bb7a0  int32_t __thiscall HouseProfile::Pay(class HouseProfile* this, enum HouseOp arg2, class HousePayment const* arg3)

005bb7a0  {
005bb7a5      class HousePaymentList* ecx;
005bb7a5      
005bb7a5      if (arg2 == Buy_House)
005bb7a5      {
005bb7af          ecx = &this->_buy;
005bb7b2      label_5bb7b2:
005bb7b2          
005bb7b4          if (ecx != 0)
005bb7c0              return HousePaymentList::Pay(ecx, arg3);
005bb7a5      }
005bb7a5      else if (arg2 == 2)
005bb7a8      {
005bb7aa          ecx = &this->_rent;
005bb7ad          goto label_5bb7b2;
005bb7a8      }
005bb7c5      return 0;
005bb7a0  }

005bb7c8                          90 90 90 90 90 90 90 90                                                          ........

005bb7d0  int32_t __thiscall HouseProfile::RemovePayment(class HouseProfile* this, enum HouseOp arg2, class HousePayment const* arg3)

005bb7d0  {
005bb7d5      class HousePaymentList* ecx;
005bb7d5      
005bb7d5      if (arg2 == Buy_House)
005bb7d5      {
005bb7df          ecx = &this->_buy;
005bb7e2      label_5bb7e2:
005bb7e2          
005bb7e4          if (ecx != 0)
005bb7f0              return HousePaymentList::RemovePayment(ecx, arg3);
005bb7d5      }
005bb7d5      else if (arg2 == 2)
005bb7d8      {
005bb7da          ecx = &this->_rent;
005bb7dd          goto label_5bb7e2;
005bb7d8      }
005bb7f5      return 0;
005bb7d0  }

005bb7f8                                                                          90 90 90 90 90 90 90 90                          ........

005bb800  int32_t __thiscall HouseProfile::ComposeText(class HouseProfile const* this, enum HouseOp arg2, class AC1Legacy::PStringBase<char>* arg3)

005bb800  {
005bb805      class HousePaymentList* ecx;
005bb805      
005bb805      if (arg2 == Buy_House)
005bb805      {
005bb80f          ecx = &this->_buy;
005bb812      label_5bb812:
005bb812          
005bb814          if (ecx != 0)
005bb81b              HousePaymentList::ComposeText(ecx, arg3);
005bb805      }
005bb805      else if (arg2 == 2)
005bb808      {
005bb80a          ecx = &this->_rent;
005bb80d          goto label_5bb812;
005bb808      }
005bb825      return 0;
005bb800  }

005bb828                          90 90 90 90 90 90 90 90                                                          ........

005bb830  int32_t __thiscall HouseProfile::ComposeText2(class HouseProfile const* this, enum HouseOp arg2, class AC1Legacy::PStringBase<char>* arg3)

005bb830  {
005bb835      class HousePaymentList* ecx;
005bb835      
005bb835      if (arg2 == Buy_House)
005bb835      {
005bb83f          ecx = &this->_buy;
005bb842      label_5bb842:
005bb842          
005bb844          if (ecx != 0)
005bb84b              HousePaymentList::ComposeText2(ecx, arg3);
005bb835      }
005bb835      else if (arg2 == 2)
005bb838      {
005bb83a          ecx = &this->_rent;
005bb83d          goto label_5bb842;
005bb838      }
005bb855      return 0;
005bb830  }

005bb858                                                                          90 90 90 90 90 90 90 90                          ........

005bb860  int32_t __thiscall HouseProfile::NeedsMore(class HouseProfile const* this, enum HouseOp arg2, class IDClass<_tagDataID,32,0> arg3)

005bb860  {
005bb865      class HousePaymentList* ecx;
005bb865      
005bb865      if (arg2 == Buy_House)
005bb865      {
005bb86f          ecx = &this->_buy;
005bb872      label_5bb872:
005bb872          
005bb874          if (ecx != 0)
005bb874          {
005bb87a              class IDClass<_tagDataID,32,0> var_4 = arg3;
005bb880              class IDClass<_tagDataID,32,0> edx;
005bb880              return HousePaymentList::NeedsMore(ecx, edx);
005bb874          }
005bb865      }
005bb865      else if (arg2 == 2)
005bb868      {
005bb86a          ecx = &this->_rent;
005bb86d          goto label_5bb872;
005bb868      }
005bb885      return 0;
005bb860  }

005bb888                          90 90 90 90 90 90 90 90                                                          ........

005bb890  uint32_t __thiscall HouseProfile::Pack(class HouseProfile* this, void** arg2, uint32_t arg3)

005bb890  {
005bb8a6      void* var_c = nullptr;
005bb8df      void* eax_3 = (((AC1Legacy::PStringBase<char>::Pack(&this->_name, &var_c, 0) + this->_buy.vtable->Pack(&var_c, 0)) + this->_rent.vtable->Pack(&var_c, 0)) + 0x24);
005bb8e9      var_c = eax_3;
005bb8e9      
005bb8ed      if (arg3 < eax_3)
005bb99a          return eax_3;
005bb99a      
005bb8fc      **(uint32_t**)arg2 = this->_id;
005bb900      void* ecx_5 = (*(uint32_t*)arg2 + 4);
005bb903      *(uint32_t*)arg2 = ecx_5;
005bb90a      *(uint32_t*)ecx_5 = this->_owner;
005bb90e      void* eax_6 = (*(uint32_t*)arg2 + 4);
005bb911      *(uint32_t*)arg2 = eax_6;
005bb916      *(uint32_t*)eax_6 = this->_bitmask;
005bb91a      void* edx_5 = (*(uint32_t*)arg2 + 4);
005bb91d      *(uint32_t*)arg2 = edx_5;
005bb924      *(uint32_t*)edx_5 = this->_min_level;
005bb928      void* ecx_9 = (*(uint32_t*)arg2 + 4);
005bb92b      *(uint32_t*)arg2 = ecx_9;
005bb932      *(uint32_t*)ecx_9 = this->_max_level;
005bb936      void* eax_10 = (*(uint32_t*)arg2 + 4);
005bb939      *(uint32_t*)arg2 = eax_10;
005bb93e      *(uint32_t*)eax_10 = this->_min_alleg_rank;
005bb942      void* edx_8 = (*(uint32_t*)arg2 + 4);
005bb945      *(uint32_t*)arg2 = edx_8;
005bb94c      *(uint32_t*)edx_8 = this->_max_alleg_rank;
005bb950      void* ecx_12 = (*(uint32_t*)arg2 + 4);
005bb953      *(uint32_t*)arg2 = ecx_12;
005bb95a      *(uint32_t*)ecx_12 = this->_maintenance_free;
005bb962      uint32_t* eax_14 = (*(uint32_t*)arg2 + 4);
005bb965      *(uint32_t*)arg2 = eax_14;
005bb96a      *(uint32_t*)eax_14 = this->_type;
005bb973      *(uint32_t*)arg2 += 4;
005bb975      AC1Legacy::PStringBase<char>::Pack(&this->_name, arg2, arg3);
005bb8a2      this->_buy.vtable->Pack(arg2, arg3);
005bb8ae      this->_rent.vtable->Pack(arg2, arg3);
005bb98f      return var_c;
005bb890  }

005bb99d                                                                                         90 90 90                               ...

005bb9a0  class HouseProfile& __thiscall HouseProfile::operator=(class HouseProfile* this, class HouseProfile const& arg2)

005bb9a0  {
005bb9aa      if (this != arg2)
005bb9aa      {
005bb9b3          this->_id = arg2->_id;
005bb9b9          this->_owner = arg2->_owner;
005bb9bf          this->_bitmask = arg2->_bitmask;
005bb9c6          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->_name.m_buffer;
005bb9c6          
005bb9cb          if (m_buffer_1 != arg2->_name.m_buffer)
005bb9cb          {
005bb9dd              if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005bb9df                  m_buffer_1->vtable->__vecDelDtor(1);
005bb9df              
005bb9e7              class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
005bb9ea              this->_name.m_buffer = m_buffer;
005bb9f1              InterlockedIncrement(&m_buffer->m_cRef);
005bb9cb          }
005bb9cb          
005bb9fe          PackableList<HousePayment>::operator=(&this->_buy.vtable, &arg2->_buy);
005bba0a          PackableList<HousePayment>::operator=(&this->_rent.vtable, &arg2->_rent);
005bba12          this->_min_level = arg2->_min_level;
005bba18          this->_max_level = arg2->_max_level;
005bba1e          this->_min_alleg_rank = arg2->_min_alleg_rank;
005bba24          this->_max_alleg_rank = arg2->_max_alleg_rank;
005bba2a          this->_maintenance_free = arg2->_maintenance_free;
005bba30          this->_type = arg2->_type;
005bb9aa      }
005bb9aa      
005bba38      return this;
005bb9a0  }

005bba3b                                                                                   90 90 90 90 90                             .....

005bba40  int32_t __thiscall HouseProfile::UnPack(class HouseProfile* this, uint32_t arg2, void** arg3, uint32_t arg4)

005bba40  {
005bba4d      int32_t eax = 0x14;
005bba4d      
005bba52      if (arg2 >= 1)
005bba54          eax = 0x1c;
005bba54      
005bba5c      if (arg2 >= 2)
005bba5e          eax += 4;
005bba5e      
005bba64      if (arg2 >= 3)
005bba66          eax += 4;
005bba66      
005bba6d      if (arg4 < eax)
005bba75          return 0;
005bba75      
005bba8a      this->_id = 0;
005bba8d      this->_owner = 0;
005bba90      this->_bitmask = 0;
005bba93      this->_min_level = 0xffffffff;
005bba96      this->_max_level = 0xffffffff;
005bba99      this->_min_alleg_rank = 0xffffffff;
005bba9c      this->_max_alleg_rank = 0xffffffff;
005bba9f      AC1Legacy::PStringBase<char>::set(&this->_name, &data_7928af);
005bbaa7      this->_maintenance_free = 0;
005bbaaa      this->_type = 0;
005bbab1      PackableList<HousePayment>::Flush(&this->_buy);
005bbabd      PackableList<HousePayment>::Flush(&this->_rent);
005bbac2      uint32_t** esi = arg3;
005bbac6      uint32_t* ebx = *(uint32_t*)esi;
005bbaca      this->_id = *(uint32_t*)ebx;
005bbacf      void* ecx_5 = &*(uint32_t*)esi[1];
005bbad2      *(uint32_t*)esi = ecx_5;
005bbad8      this->_owner = *(uint32_t*)ecx_5;
005bbadd      void* eax_5 = &*(uint32_t*)esi[1];
005bbae0      *(uint32_t*)esi = eax_5;
005bbae4      this->_bitmask = *(uint32_t*)eax_5;
005bbae9      void* edx_2 = &*(uint32_t*)esi[1];
005bbaec      *(uint32_t*)esi = edx_2;
005bbaf2      this->_min_level = *(uint32_t*)edx_2;
005bbaf7      void* ecx_8 = &*(uint32_t*)esi[1];
005bbafa      *(uint32_t*)esi = ecx_8;
005bbb00      this->_max_level = *(uint32_t*)ecx_8;
005bbb09      uint32_t* eax_10 = &*(uint32_t*)esi[1];
005bbb0f      *(uint32_t*)esi = eax_10;
005bbb0f      
005bbb11      if (arg2 >= 1)
005bbb11      {
005bbb15          this->_min_alleg_rank = *(uint32_t*)eax_10;
005bbb1a          void* edx_5 = &*(uint32_t*)esi[1];
005bbb1d          *(uint32_t*)esi = edx_5;
005bbb23          this->_max_alleg_rank = *(uint32_t*)edx_5;
005bbb28          eax_10 = &*(uint32_t*)esi[1];
005bbb2b          *(uint32_t*)esi = eax_10;
005bbb11      }
005bbb11      
005bbb30      if (arg2 >= 2)
005bbb30      {
005bbb34          this->_maintenance_free = *(uint32_t*)eax_10;
005bbb39          eax_10 = &*(uint32_t*)esi[1];
005bbb3c          *(uint32_t*)esi = eax_10;
005bbb30      }
005bbb30      
005bbb41      if (arg2 >= 3)
005bbb41      {
005bbb45          this->_type = *(uint32_t*)eax_10;
005bbb4a          eax_10 = &*(uint32_t*)esi[1];
005bbb4d          *(uint32_t*)esi = eax_10;
005bbb41      }
005bbb41      
005bbb53      int32_t eax_17 = ((char*)eax_10 - ebx);
005bbb57      uint32_t ecx_12;
005bbb57      
005bbb57      if (arg4 <= eax_17)
005bbb5f          ecx_12 = 0;
005bbb57      else
005bbb5b          ecx_12 = (arg4 - eax_17);
005bbb5b      
005bbb6c      if (AC1Legacy::PStringBase<char>::UnPack(&this->_name, esi, ecx_12) != 0)
005bbb6c      {
005bbb7c          void* eax_21 = (*(uint32_t*)esi - ebx);
005bbb80          void* edx_8;
005bbb80          
005bbb80          if (arg4 <= eax_21)
005bbb88              edx_8 = nullptr;
005bbb80          else
005bbb84              edx_8 = (arg4 - eax_21);
005bbb84          
005bbb97          if (this->_buy.vtable->UnPack(esi, edx_8) != 0)
005bbb97          {
005bbb9b              void* eax_25 = (*(uint32_t*)esi - ebx);
005bbb9f              void* edi_2;
005bbb9f              
005bbb9f              if (arg4 <= eax_25)
005bbba5                  edi_2 = nullptr;
005bbb9f              else
005bbba1                  edi_2 = (arg4 - eax_25);
005bbba1              
005bbbaf              int32_t eax_26 = this->_rent.vtable->UnPack(esi, edi_2);
005bbbb3              int32_t eax_27 = -(eax_26);
005bbbbf              return -((eax_27 - eax_27));
005bbb97          }
005bbb6c      }
005bbb6c      
005bbb77      return 0;
005bba40  }

005bbbc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005bbbd0  void __fastcall HouseProfile::HouseProfile(class HouseProfile* this)

005bbbd0  {
005bbbd6      this->vtable = 0x7e7468;
005bbbdc      this->_id = 0;
005bbbdf      this->_owner = 0;
005bbbe2      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bbbed      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005bbbf0      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005bbbf6      this->_bitmask = 0;
005bbbf9      this->_buy.head = nullptr;
005bbbfc      this->_buy.tail = nullptr;
005bbbff      this->_buy.curNum = 0;
005bbc07      this->_buy.vtable = 0x7e72e4;
005bbc0a      this->_rent.vtable = 0x7e72e4;
005bbc0d      this->_rent.head = nullptr;
005bbc10      this->_rent.tail = nullptr;
005bbc13      this->_rent.curNum = 0;
005bbc19      this->_maintenance_free = 0;
005bbc1c      this->_type = 0;
005bbc1f      this->_min_level = 0xffffffff;
005bbc22      this->_max_level = 0xffffffff;
005bbc25      this->_min_alleg_rank = 0xffffffff;
005bbc28      this->_max_alleg_rank = 0xffffffff;
005bbbd0  }


005bbc30  void* __thiscall HouseProfile::`scalar deleting destructor'(class HouseProfile* this, uint32_t arg2)

005bbc30  {
005bbc33      HouseProfile::~HouseProfile(this);
005bbc33      
005bbc3d      if ((arg2 & 1) != 0)
005bbc40          operator delete(this);
005bbc40      
005bbc4b      return this;
005bbc30  }

005bbc4e                                            90 90                                                                ..

005bbc50  void __fastcall HouseProfile::~HouseProfile(class HouseProfile* this)

005bbc50  {
005bbc54      this->_rent.vtable = 0x7e72e4;
005bbc5f      PackableList<HousePayment>::Flush(&this->_rent);
005bbc54      this->_rent.vtable = 0x79285c;
005bbc6a      this->_buy.vtable = 0x7e72e4;
005bbc75      PackableList<HousePayment>::Flush(&this->_buy);
005bbc6a      this->_buy.vtable = 0x79285c;
005bbc80      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
005bbc80      
005bbc93      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005bbc95          m_buffer->vtable->__vecDelDtor(1);
005bbc95      
005bbc9e      this->vtable = 0x79285c;
005bbc50  }

005bbca6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005bbcb0  void __thiscall HouseProfile::HouseProfile(class HouseProfile* this, class HouseProfile const* arg2)

005bbcb0  {
005bbcb3      this->vtable = 0x7e7468;
005bbcb9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005bbcc4      this->_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005bbcc7      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005bbcd3      this->_buy.head = nullptr;
005bbcd6      this->_buy.tail = nullptr;
005bbcd9      this->_buy.curNum = 0;
005bbce1      this->_buy.vtable = 0x7e72e4;
005bbce4      this->_rent.vtable = 0x7e72e4;
005bbcea      this->_rent.head = nullptr;
005bbced      this->_rent.tail = nullptr;
005bbcf0      this->_rent.curNum = 0;
005bbcf3      HouseProfile::operator=(this, arg2);
005bbcb0  }

005bbcfe                                                                                            90 90                                ..

005bbd00  int32_t __thiscall HouseProfile::UnPack(class HouseProfile* this, void** arg2, uint32_t arg3)

005bbd00  {
005bbd11      return HouseProfile::UnPack(this, 3, arg2, arg3);
005bbd00  }

005bbd14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bbd20  uint32_t __thiscall SpellComponentBase::Pack(class SpellComponentBase* this, void** arg2, uint32_t arg3)

005bbd20  {
005bbd20      class SpellComponentBase* this_1 = this;
005bbd31      this_1 = nullptr;
005bbd51      int32_t result = ((AC1Legacy::PStringBase<char>::Pack(&this->_name, &this_1, 0) + AC1Legacy::PStringBase<char>::Pack(&this->_text, &this_1, 0)) + 0x18);
005bbd51      
005bbd5b      if (arg3 >= result)
005bbd5b      {
005bbd66          AC1Legacy::PStringBase<char>::Pack(&this->_name, arg2, arg3);
005bbd70          **(uint32_t**)arg2 = this->_category;
005bbd74          void* ecx_4 = (*(uint32_t*)arg2 + 4);
005bbd77          *(uint32_t*)arg2 = ecx_4;
005bbd7e          *(uint32_t*)ecx_4 = this->_iconID.id;
005bbd82          void* eax_5 = (*(uint32_t*)arg2 + 4);
005bbd85          *(uint32_t*)arg2 = eax_5;
005bbd8a          *(uint32_t*)eax_5 = this->_type;
005bbd8e          void* edx_4 = (*(uint32_t*)arg2 + 4);
005bbd91          *(uint32_t*)arg2 = edx_4;
005bbd98          *(uint32_t*)edx_4 = this->_gesture;
005bbd9c          void* ecx_8 = (*(uint32_t*)arg2 + 4);
005bbd9f          *(uint32_t*)arg2 = ecx_8;
005bbda6          *(uint32_t*)ecx_8 = ((float)((long double)this->_time));
005bbdb2          *(uint32_t*)arg2 += 4;
005bbdb4          AC1Legacy::PStringBase<char>::Pack(&this->_text, arg2, arg3);
005bbdbe          **(uint32_t**)arg2 = ((float)((long double)this->_CDM));
005bbdc0          *(uint32_t*)arg2 += 4;
005bbd5b      }
005bbd5b      
005bbdca      return result;
005bbd20  }

005bbdcd                                         90 90 90                                                               ...

005bbdd0  void __fastcall SpellComponentBase::Init(class SpellComponentBase* this)

005bbdd0  {
005bbddc      AC1Legacy::PStringBase<char>::set(&this->_name, &data_7928af);
005bbde1      this->_category = Undef_SpellComponentCategory;
005bbdf7      this->_iconID.id = INVALID_DID.id;
005bbdfa      this->_type = Undef_SpellComponentType;
005bbdfd      this->_gesture = 0;
005bbe00      this->_time = 0f;
005bbe03      AC1Legacy::PStringBase<char>::set(&this->_text, &data_7928af);
005bbe08      this->_CDM = 0f;
005bbdd0  }

005bbe0e                                            90 90                                                                ..

005bbe10  int32_t __thiscall SpellComponentBase::UnPack(class SpellComponentBase* this, void** arg2, uint32_t arg3)

005bbe10  {
005bbe10      class SpellComponentBase* this_1 = this;
005bbe14      void** esi = arg2;
005bbe18      void* eax = *(uint32_t*)esi;
005bbe2b      arg2 = nullptr;
005bbe2b      
005bbe55      if (arg3 >= ((AC1Legacy::PStringBase<char>::Pack(&this->_name, &arg2, 0) + AC1Legacy::PStringBase<char>::Pack(&this->_text, &arg2, 0)) + 0x18))
005bbe55      {
005bbe5c          AC1Legacy::PStringBase<char>::UnPack(&this->_name, esi, arg3);
005bbe65          this->_category = **(uint32_t**)esi;
005bbe6a          void* edx_3 = (*(uint32_t*)esi + 4);
005bbe6d          *(uint32_t*)esi = edx_3;
005bbe71          class IDClass<_tagDataID,32,0> ecx_4 = *(uint32_t*)edx_3;
005bbe76          *(uint32_t*)esi = ((char*)edx_3 + 4);
005bbe78          this->_iconID.id = ecx_4;
005bbe7f          this->_type = **(uint32_t**)esi;
005bbe84          void* ecx_7 = (*(uint32_t*)esi + 4);
005bbe87          *(uint32_t*)esi = ecx_7;
005bbe8d          this->_gesture = *(uint32_t*)ecx_7;
005bbe92          void* eax_9 = (*(uint32_t*)esi + 4);
005bbe95          *(uint32_t*)esi = eax_9;
005bbe99          this->_time = *(uint32_t*)eax_9;
005bbea5          *(uint32_t*)esi += 4;
005bbea7          AC1Legacy::PStringBase<char>::UnPack(&this->_text, esi, arg3);
005bbeb4          this->_CDM = **(uint32_t**)esi;
005bbeb9          void* ebp_2 = (*(uint32_t*)esi + 4);
005bbec2          *(uint32_t*)esi = ebp_2;
005bbec2          
005bbec4          if (arg3 >= ((char*)ebp_2 - eax))
005bbedc              return 1;
005bbedc          
005bbec6          *(uint32_t*)esi = eax;
005bbe55      }
005bbe55      
005bbecf      return 0;
005bbe10  }

005bbedf                                                                                               90                                 .

005bbee0  class AC1Legacy::PStringBase<char>* __thiscall CSpellBase::InqName(class CSpellBase const* this, class AC1Legacy::PStringBase<char>* __return)

005bbee0  {
005bbee0      class CSpellBase* var_4 = this;
005bbee1      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_name.m_buffer;
005bbeed      var_4 = m_buffer;
005bbef6      InterlockedIncrement(&m_buffer->m_cRef);
005bbefc      AC1Legacy::PStringBase<char>::break_reference(&var_4);
005bbf01      class CSpellBase* esi = var_4;
005bbf01      
005bbf11      for (uint32_t* i = &esi->_category; i != ((esi->_desc.m_buffer + esi) + 0x13); i += 1)
005bbf11      {
005bbf13          class AC1Legacy::PSRefBuffer<char>* ecx_2;
005bbf13          ecx_2 = ADJ(i)->_category;
005bbf17          uint8_t edx_1 = (ecx_2 >> 4);
005bbf1a          ecx_2 <<= 4;
005bbf3d          ADJ(i)->_category = (edx_1 | ecx_2);
005bbf11      }
005bbf11      
005bbf2e      __return->m_buffer = esi;
005bbf30      InterlockedIncrement(&esi->_name);
005bbf30      
005bbf3b      if (InterlockedDecrement(&esi->_name) == 0)
005bbf3d          esi->vtable->__vecDelDtor(1);
005bbf3d      
005bbf4c      return __return;
005bbee0  }

005bbf4f                                               90                                                                 .

005bbf50  uint32_t SpellComponentTable::GetTargetTypeFromComponentID(uint32_t const arg1)

005bbf50  {
005bbf5c      if ((arg1 - 0x31) <= 0x8d)
005bbf65          switch (arg1)
005bbf65          {
005bbf71              case 0x31:
005bbf71              case 0x32:
005bbf71              case 0x33:
005bbf71              case 0x34:
005bbf71              case 0x35:
005bbf71              case 0x36:
005bbf71              case 0x37:
005bbf71              case 0x38:
005bbf71              case 0x3c:
005bbf71              case 0x3d:
005bbf71              case 0x3e:
005bbf71              case 0xbe:
005bbf71              {
005bbf71                  return 0x10;
005bbf71                  break;
005bbf71              }
005bbf77              case 0x39:
005bbf77              {
005bbf77                  return 0x88b8f;
005bbf77                  break;
005bbf77              }
005bbf7d              case 0x3b:
005bbf7d              {
005bbf7d                  return 0x10010000;
005bbf7d                  break;
005bbf7d              }
005bbf65          }
005bbf65      
005bbf80      return 0;
005bbf50  }

005bbf81     8d 49 00                                                                                       .I.
005bbf84  uint32_t jump_table_5bbf84[0x4] = 
005bbf84  {
005bbf84      [0x0] =  0x005bbf6c
005bbf88      [0x1] =  0x005bbf72
005bbf8c      [0x2] =  0x005bbf78
005bbf90      [0x3] =  0x005bbf7e
005bbf94  }
005bbf94  uint8_t lookup_table_5bbf94[0x8e] = 
005bbf94  {
005bbf94      [0x00] =  0x00
005bbf95      [0x01] =  0x00
005bbf96      [0x02] =  0x00
005bbf97      [0x03] =  0x00
005bbf98      [0x04] =  0x00
005bbf99      [0x05] =  0x00
005bbf9a      [0x06] =  0x00
005bbf9b      [0x07] =  0x00
005bbf9c      [0x08] =  0x01
005bbf9d      [0x09] =  0x03
005bbf9e      [0x0a] =  0x02
005bbf9f      [0x0b] =  0x00
005bbfa0      [0x0c] =  0x00
005bbfa1      [0x0d] =  0x00
005bbfa2      [0x0e] =  0x03
005bbfa3      [0x0f] =  0x03
005bbfa4      [0x10] =  0x03
005bbfa5      [0x11] =  0x03
005bbfa6      [0x12] =  0x03
005bbfa7      [0x13] =  0x03
005bbfa8      [0x14] =  0x03
005bbfa9      [0x15] =  0x03
005bbfaa      [0x16] =  0x03
005bbfab      [0x17] =  0x03
005bbfac      [0x18] =  0x03
005bbfad      [0x19] =  0x03
005bbfae      [0x1a] =  0x03
005bbfaf      [0x1b] =  0x03
005bbfb0      [0x1c] =  0x03
005bbfb1      [0x1d] =  0x03
005bbfb2      [0x1e] =  0x03
005bbfb3      [0x1f] =  0x03
005bbfb4      [0x20] =  0x03
005bbfb5      [0x21] =  0x03
005bbfb6      [0x22] =  0x03
005bbfb7      [0x23] =  0x03
005bbfb8      [0x24] =  0x03
005bbfb9      [0x25] =  0x03
005bbfba      [0x26] =  0x03
005bbfbb      [0x27] =  0x03
005bbfbc      [0x28] =  0x03
005bbfbd      [0x29] =  0x03
005bbfbe      [0x2a] =  0x03
005bbfbf      [0x2b] =  0x03
005bbfc0      [0x2c] =  0x03
005bbfc1      [0x2d] =  0x03
005bbfc2      [0x2e] =  0x03
005bbfc3      [0x2f] =  0x03
005bbfc4      [0x30] =  0x03
005bbfc5      [0x31] =  0x03
005bbfc6      [0x32] =  0x03
005bbfc7      [0x33] =  0x03
005bbfc8      [0x34] =  0x03
005bbfc9      [0x35] =  0x03
005bbfca      [0x36] =  0x03
005bbfcb      [0x37] =  0x03
005bbfcc      [0x38] =  0x03
005bbfcd      [0x39] =  0x03
005bbfce      [0x3a] =  0x03
005bbfcf      [0x3b] =  0x03
005bbfd0      [0x3c] =  0x03
005bbfd1      [0x3d] =  0x03
005bbfd2      [0x3e] =  0x03
005bbfd3      [0x3f] =  0x03
005bbfd4      [0x40] =  0x03
005bbfd5      [0x41] =  0x03
005bbfd6      [0x42] =  0x03
005bbfd7      [0x43] =  0x03
005bbfd8      [0x44] =  0x03
005bbfd9      [0x45] =  0x03
005bbfda      [0x46] =  0x03
005bbfdb      [0x47] =  0x03
005bbfdc      [0x48] =  0x03
005bbfdd      [0x49] =  0x03
005bbfde      [0x4a] =  0x03
005bbfdf      [0x4b] =  0x03
005bbfe0      [0x4c] =  0x03
005bbfe1      [0x4d] =  0x03
005bbfe2      [0x4e] =  0x03
005bbfe3      [0x4f] =  0x03
005bbfe4      [0x50] =  0x03
005bbfe5      [0x51] =  0x03
005bbfe6      [0x52] =  0x03
005bbfe7      [0x53] =  0x03
005bbfe8      [0x54] =  0x03
005bbfe9      [0x55] =  0x03
005bbfea      [0x56] =  0x03
005bbfeb      [0x57] =  0x03
005bbfec      [0x58] =  0x03
005bbfed      [0x59] =  0x03
005bbfee      [0x5a] =  0x03
005bbfef      [0x5b] =  0x03
005bbff0      [0x5c] =  0x03
005bbff1      [0x5d] =  0x03
005bbff2      [0x5e] =  0x03
005bbff3      [0x5f] =  0x03
005bbff4      [0x60] =  0x03
005bbff5      [0x61] =  0x03
005bbff6      [0x62] =  0x03
005bbff7      [0x63] =  0x03
005bbff8      [0x64] =  0x03
005bbff9      [0x65] =  0x03
005bbffa      [0x66] =  0x03
005bbffb      [0x67] =  0x03
005bbffc      [0x68] =  0x03
005bbffd      [0x69] =  0x03
005bbffe      [0x6a] =  0x03
005bbfff      [0x6b] =  0x03
005bc000      [0x6c] =  0x03
005bc001      [0x6d] =  0x03
005bc002      [0x6e] =  0x03
005bc003      [0x6f] =  0x03
005bc004      [0x70] =  0x03
005bc005      [0x71] =  0x03
005bc006      [0x72] =  0x03
005bc007      [0x73] =  0x03
005bc008      [0x74] =  0x03
005bc009      [0x75] =  0x03
005bc00a      [0x76] =  0x03
005bc00b      [0x77] =  0x03
005bc00c      [0x78] =  0x03
005bc00d      [0x79] =  0x03
005bc00e      [0x7a] =  0x03
005bc00f      [0x7b] =  0x03
005bc010      [0x7c] =  0x03
005bc011      [0x7d] =  0x03
005bc012      [0x7e] =  0x03
005bc013      [0x7f] =  0x03
005bc014      [0x80] =  0x03
005bc015      [0x81] =  0x03
005bc016      [0x82] =  0x03
005bc017      [0x83] =  0x03
005bc018      [0x84] =  0x03
005bc019      [0x85] =  0x03
005bc01a      [0x86] =  0x03
005bc01b      [0x87] =  0x03
005bc01c      [0x88] =  0x03
005bc01d      [0x89] =  0x03
005bc01e      [0x8a] =  0x03
005bc01f      [0x8b] =  0x03
005bc020      [0x8c] =  0x03
005bc021      [0x8d] =  0x00
005bc022  }

005bc022        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005bc030  void* __thiscall PackableHashIterator<unsigned long,SpellComponentBase>::`scalar deleting destructor'(class PackableHashIterator<unsigned long,SpellComponentBase>* this, uint32_t arg2)

005bc030  {
005bc038      this->vtable = 0x7e74c0;
005bc038      
005bc03e      if ((arg2 & 1) != 0)
005bc041          operator delete(this);
005bc041      
005bc04c      return this;
005bc030  }

005bc04f                                               90                                                                 .

005bc050  int32_t __fastcall PackableHashTable<unsigned long,CContractTracker>::Init(class PackableHashTable<unsigned long,CContractTracker>* this)

005bc050  {
005bc058      if (this->_buckets == 0)
005bc058      {
005bc05a          uint32_t _table_size = this->_table_size;
005bc05a          
005bc05f          if (_table_size == 0)
005bc099              return 1;
005bc099          
005bc065          void* eax_2 = operator new[]((_table_size << 2));
005bc06f          this->_buckets = eax_2;
005bc06f          
005bc072          if (eax_2 != 0)
005bc072          {
005bc07b              int32_t i = 0;
005bc07b              
005bc07f              if (this->_table_size > 0)
005bc07f              {
005bc091                  do
005bc091                  {
005bc081                      this->_buckets[i] = 0;
005bc08e                      i += 1;
005bc091                  } while (i < this->_table_size);
005bc07f              }
005bc07f              
005bc099              return 1;
005bc072          }
005bc058      }
005bc058      
005bc077      return 0;
005bc050  }

005bc09a                                                                                90 90 90 90 90 90                            ......

005bc0a0  class PackableHashIterator<unsigned long,SpellComponentBase>* __thiscall PackableHashTable<unsigned long,SpellComponentBase>::begin(class PackableHashTable<unsigned long,SpellComponentBase> const* this, class PackableHashIterator<unsigned long,SpellComponentBase>* __return)

005bc0a0  {
005bc0a0      uint32_t _table_size = this->_table_size;
005bc0a4      int32_t eax = 0;
005bc0a4      
005bc0a9      if (_table_size > 0)
005bc0a9      {
005bc0ab          class PackableHashData<unsigned long,SpellComponentBase>** _buckets_1 = this->_buckets;
005bc0ae          class PackableHashData<unsigned long,SpellComponentBase>** _buckets_2 = _buckets_1;
005bc0ae          
005bc0bb          do
005bc0bb          {
005bc0b3              if (*(uint32_t*)_buckets_2 != 0)
005bc0b3              {
005bc0dc                  int32_t ecx = _buckets_1[eax];
005bc0df                  int32_t* __return_1 = __return;
005bc0e3                  __return_1[2] = _buckets_1;
005bc0e8                  __return_1[1] = ecx;
005bc0eb                  *(uint32_t*)__return_1 = 0x7e74c0;
005bc0f1                  __return_1[3] = _table_size;
005bc0f4                  return __return_1;
005bc0b3              }
005bc0b3              
005bc0b5              eax += 1;
005bc0b6              _buckets_2 = &_buckets_2[1];
005bc0bb          } while (eax < _table_size);
005bc0a9      }
005bc0a9      
005bc0bd      class PackableHashData<unsigned long,SpellComponentBase>** _buckets = this->_buckets;
005bc0c6      __return->_current = nullptr;
005bc0cd      __return->_buckets = _buckets;
005bc0d0      __return->vtable = 0x7e74c0;
005bc0d6      __return->_table_size = _table_size;
005bc0d9      return __return;
005bc0a0  }

005bc0f7                                                                       90 90 90 90 90 90 90 90 90                         .........

005bc100  uint32_t __thiscall PackableHashTable<unsigned long,SpellComponentBase>::Pack(class PackableHashTable<unsigned long,SpellComponentBase>* this, void** arg2, uint32_t arg3)

005bc100  {
005bc100      class PackableHashTable<unsigned long,SpellComponentBase>* this_1 = this;
005bc105      uint32_t result = PackableHashTable<unsigned long,SpellComponentBase>::pack_size(this);
005bc10a      uint32_t ebx = arg3;
005bc110      uint32_t result_1 = result;
005bc110      
005bc114      if (ebx >= result)
005bc114      {
005bc129          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005bc12b          *(uint32_t*)arg2 += 4;
005bc131          uint32_t i = 0;
005bc135          arg3 = 0;
005bc135          
005bc139          if (this->_table_size > 0)
005bc139          {
005bc182              do
005bc182              {
005bc143                  int32_t* j = this->_buckets[i];
005bc143                  
005bc148                  if (j != 0)
005bc148                  {
005bc16e                      do
005bc16e                      {
005bc153                          if (ebx >= 4)
005bc153                          {
005bc159                              **(uint32_t**)arg2 = *(uint32_t*)j;
005bc15b                              *(uint32_t*)arg2 += 4;
005bc153                          }
005bc153                          
005bc166                          *(uint32_t*)(j[1] + 0xc)(arg2, ebx);
005bc169                          j = j[0xa];
005bc16e                      } while (j != 0);
005bc16e                      
005bc170                      result = result_1;
005bc174                      i = arg3;
005bc148                  }
005bc148                  
005bc17b                  i += 1;
005bc17e                  arg3 = i;
005bc182              } while (i < this->_table_size);
005bc139          }
005bc114      }
005bc114      
005bc189      return result;
005bc100  }

005bc13d                                                                                         8d 49 00                               .I.
005bc18c                                      90 90 90 90                                                              ....

005bc190  uint32_t __fastcall PackableHashTable<unsigned long,SpellComponentBase>::pack_size(class PackableHashTable<unsigned long,SpellComponentBase>* this)

005bc190  {
005bc190      class PackableHashTable<unsigned long,SpellComponentBase>* this_1 = this;
005bc198      int32_t i = 0;
005bc19a      bool cond:0 = this->_table_size <= 0;
005bc19d      int32_t result = 4;
005bc1a2      this_1 = nullptr;
005bc1a2      
005bc1a6      if (!(cond:0))
005bc1a6      {
005bc1e1          do
005bc1e1          {
005bc1b3              void* j = this->_buckets[i];
005bc1b3              
005bc1b8              while (j != 0)
005bc1b8              {
005bc1cd                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 4) + 0xc)(&this_1, 0);
005bc1d0                  j = *(uint32_t*)((char*)j + 0x28);
005bc1d5                  result = ((result + eax_2) + 4);
005bc1b8              }
005bc1b8              
005bc1de              i += 1;
005bc1e1          } while (i < this->_table_size);
005bc1a6      }
005bc1a6      
005bc1ea      return result;
005bc190  }

005bc1eb                                   90 90 90 90 90                                                             .....

005bc1f0  class IDClass<_tagDataID,32,0>* __convention("regparm") SpellComponentTable::SchoolOfMagic2WCID(class IDClass<_tagDataID,32,0>* __return, uint32_t arg2)

005bc1f0  {
005bc1f0      uint32_t id_1;
005bc1f0      uint32_t id = id_1;
005bc1f3      int32_t var_10 = 0x28;
005bc1f5      int32_t var_14 = 0x10000001;
005bc1fa      int32_t var_18 = 4;
005bc1fc      int32_t eax;
005bc1fc      int32_t edx;
005bc1fc      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, id_1);
005bc20d      id = INVALID_DID.id;
005bc20d      
005bc211      if (eax_1 != 0)
005bc21f          EnumIDMap::EnumToDID(eax_1, arg2, &id);
005bc21f      
005bc22e      __return->id = id;
005bc22e      
005bc230      if (eax_1 != 0)
005bc232          eax_1->vtable->Release();
005bc232      
005bc23e      return __return;
005bc1f0  }

005bc23f                                                                                               90                                 .

005bc240  uint32_t __convention("regparm") SpellComponentTable::WCIDtoSCID(class IDClass<_tagDataID,32,0> arg1)

005bc240  {
005bc240      uint32_t result_2;
005bc240      uint32_t result_1 = result_2;
005bc243      int32_t var_10 = 0x28;
005bc245      int32_t var_14 = 0x10000001;
005bc24a      int32_t var_18 = 3;
005bc24c      int32_t eax;
005bc24c      int32_t edx;
005bc24c      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, result_2);
005bc262      result_1 = 0;
005bc26a      DualEnumIDMap::DIDToEnum(eax_1, arg1, &result_1);
005bc271      uint32_t result = result_1;
005bc271      
005bc275      if (eax_1 != 0)
005bc277          eax_1->vtable->Release();
005bc277      
005bc283      return result;
005bc240  }

005bc284              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005bc290  void __thiscall SpellComponentBase::SpellComponentBase(class SpellComponentBase* this, class SpellComponentBase const* arg2)

005bc290  {
005bc29f      this->vtable = 0x7a33cc;
005bc2a5      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_name.m_buffer;
005bc2a8      this->_name.m_buffer = m_buffer;
005bc2af      InterlockedIncrement(&m_buffer->m_cRef);
005bc2b4      this->_category = arg2->_category;
005bc2ba      this->_iconID.id = arg2->_iconID.id;
005bc2c0      this->_type = arg2->_type;
005bc2c6      this->_gesture = arg2->_gesture;
005bc2cc      this->_time = arg2->_time;
005bc2cf      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->_text.m_buffer;
005bc2d2      this->_text.m_buffer = m_buffer_1;
005bc2d9      InterlockedIncrement(&m_buffer_1->m_cRef);
005bc2df      this->_CDM = arg2->_CDM;
005bc290  }

005bc2e9                             90 90 90 90 90 90 90                                                           .......

005bc2f0  class IDClass<_tagDataID,32,0>* __convention("regparm") SpellComponentTable::SCIDtoWCID(class IDClass<_tagDataID,32,0>* __return, uint32_t const arg2)

005bc2f0  {
005bc2f0      uint32_t id_1;
005bc2f0      uint32_t id = id_1;
005bc2f3      int32_t var_10 = 0x28;
005bc2f5      int32_t var_14 = 0x10000001;
005bc2fa      int32_t var_18 = 3;
005bc2fc      int32_t eax;
005bc2fc      int32_t edx;
005bc2fc      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, id_1);
005bc317      id = INVALID_DID.id;
005bc31b      EnumIDMap::EnumToDID(eax_1, arg2, &id);
005bc322      uint32_t* result = __return;
005bc32a      *(uint32_t*)result = id;
005bc32a      
005bc32c      if (eax_1 != 0)
005bc32e          eax_1->vtable->Release();
005bc32e      
005bc33a      return result;
005bc2f0  }

005bc33b                                                                                   90 90 90 90 90                             .....

005bc340  void __thiscall SpellComponentTable::GetSubDataIDs(class SpellComponentTable const* this, class QualifiedDataIDArray* arg2)

005bc340  {
005bc34c      void __return;
005bc34c      PackableHashTable<unsigned long,SpellComponentBase>::begin(&this->_spellComponentBaseHash, &__return);
005bc357      void* i_1;
005bc357      void* const i_2;
005bc357      
005bc357      for (void* const i = i_1; i != 0; i = i_2)
005bc357      {
005bc37c          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, *(uint32_t*)((char*)i + 0x10), 0), 8);
005bc381          i_2 = *(uint32_t*)((char*)i + 0x28);
005bc381          
005bc386          if (i_2 == 0)
005bc386          {
005bc38b              int32_t eax_4 = (*(uint32_t*)((char*)i + 0x2c) + 1);
005bc38e              int32_t var_4;
005bc38e              
005bc38e              if (eax_4 >= var_4)
005bc38e              {
005bc39b              label_5bc39b:
005bc39b                  i_2 = nullptr;
005bc38e              }
005bc38e              else
005bc38e              {
005bc394                  int32_t var_8;
005bc394                  
005bc394                  while (*(uint32_t*)(var_8 + (eax_4 << 2)) == 0)
005bc394                  {
005bc396                      eax_4 += 1;
005bc396                      
005bc399                      if (eax_4 >= var_4)
005bc399                          goto label_5bc39b;
005bc394                  }
005bc394                  
005bc3ad                  i_2 = *(uint32_t*)(var_8 + (eax_4 << 2));
005bc38e              }
005bc386          }
005bc357      }
005bc340  }

005bc3b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005bc3c0  void __fastcall PackableHashTable<unsigned long,SpellComponentBase>::EmptyContents(class PackableHashTable<unsigned long,SpellComponentBase>* this)

005bc3c0  {
005bc3c8      class PackableHashTable<unsigned long,SpellComponentBase>* this_1 = this;
005bc3c8      
005bc3cc      if (this->_buckets != 0)
005bc3cc      {
005bc3d5          int32_t i = 0;
005bc3d9          int32_t i_1 = 0;
005bc3d9          
005bc3dd          if (this->_table_size > 0)
005bc3dd          {
005bc3e3              void* j;
005bc3e3              void* j_1 = j;
005bc3e3              
005bc467              do
005bc467              {
005bc3f3                  void* j_2 = this->_buckets[i];
005bc3f3                  
005bc3f8                  if (j_2 != 0)
005bc3f8                  {
005bc449                      do
005bc449                      {
005bc400                          int32_t* edi_1 = *(uint32_t*)((char*)j_2 + 0x20);
005bc403                          j = *(uint32_t*)((char*)j_2 + 0x28);
005bc403                          
005bc412                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
005bc41a                              **(uint32_t**)edi_1(1);
005bc41a                          
005bc41c                          int32_t* edi_2 = *(uint32_t*)((char*)j_2 + 8);
005bc41c                          
005bc42b                          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
005bc433                              **(uint32_t**)edi_2(1);
005bc433                          
005bc436                          *(uint32_t*)((char*)j_2 + 4) = 0x79285c;
005bc43d                          operator delete(j_2);
005bc447                          j_2 = j;
005bc449                      } while (j != 0);
005bc449                      
005bc44b                      i = i_1;
005bc44f                      this = this_1;
005bc3f8                  }
005bc3f8                  
005bc453                  this->_buckets[i] = 0;
005bc460                  i += 1;
005bc463                  i_1 = i;
005bc467              } while (i < this->_table_size);
005bc3dd          }
005bc3cc      }
005bc3cc      
005bc46d      this->_currNum = 0;
005bc3c0  }

005bc478                                                                          90 90 90 90 90 90 90 90                          ........

005bc480  int32_t __thiscall PackableHashTable<unsigned long,SpellComponentBase>::add(class PackableHashTable<unsigned long,SpellComponentBase>* this, uint32_t const* arg2, class SpellComponentBase const* arg3)

005bc480  {
005bc48a      uint32_t _table_size_1 = this->_table_size;
005bc48a      
005bc48f      if (_table_size_1 == 0)
005bc48f      {
005bc4be      label_5bc4be:
005bc4be          void* eax_4 = operator new(0x30);
005bc4be          
005bc4ca          if (eax_4 != 0)
005bc4ca          {
005bc4d3              uint32_t _table_size = this->_table_size;
005bc4da              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
005bc4dc              SpellComponentBase::SpellComponentBase(((char*)eax_4 + 4), arg3);
005bc4e1              *(uint32_t*)((char*)eax_4 + 0x28) = 0;
005bc4ed              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
005bc4ef              *(uint32_t*)((char*)eax_4 + 0x2c) = temp1_2;
005bc4fa              *(uint32_t*)((char*)eax_4 + 0x28) = this->_buckets[temp1_2];
005bc4fd              this->_buckets[temp1_2] = eax_4;
005bc503              this->_currNum += 1;
005bc50f              return 1;
005bc4ca          }
005bc48f      }
005bc48f      else
005bc48f      {
005bc491          class PackableHashData<unsigned long,SpellComponentBase>** _buckets = this->_buckets;
005bc491          
005bc496          if (_buckets == 0)
005bc496              goto label_5bc4be;
005bc496          
005bc498          uint32_t const i = *(uint32_t*)arg2;
005bc4a1          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
005bc4a1          
005bc4a6          if (edx_3 == 0)
005bc4a6              goto label_5bc4be;
005bc4a6          
005bc4aa          while (i != *(uint32_t*)edx_3)
005bc4aa          {
005bc4ac              edx_3 = edx_3[0xa];
005bc4ac              
005bc4b1              if (edx_3 == 0)
005bc4b1                  goto label_5bc4be;
005bc4aa          }
005bc4aa          
005bc4ba          if (edx_3 == 0xfffffffc)
005bc4ba              goto label_5bc4be;
005bc48f      }
005bc48f      
005bc518      return 0;
005bc480  }

005bc51b                                                                                   90 90 90 90 90                             .....

005bc520  class PackableHashTable<unsigned long,CContractTracker>* __thiscall PackableHashTable<unsigned long,SpellComponentBase>::operator=(class PackableHashTable<unsigned long,SpellComponentBase>* arg1, void* arg2)

005bc520  {
005bc526      class PackableHashTable<unsigned long,CContractTracker>* result = arg1;
005bc526      
005bc52a      if (result != arg2)
005bc52a      {
005bc52d          PackableHashTable<unsigned long,SpellComponentBase>::EmptyContents(arg1);
005bc532          void* _buckets = result->_buckets;
005bc535          int32_t i = 0;
005bc535          
005bc539          if (_buckets != 0)
005bc539          {
005bc53c              operator delete[](_buckets);
005bc544              result->_buckets = nullptr;
005bc539          }
005bc539          
005bc547          result->_table_size = 0;
005bc54f          result->_table_size = *(uint32_t*)((char*)arg2 + 0xc);
005bc552          PackableHashTable<unsigned long,CContractTracker>::Init(result);
005bc552          
005bc55a          if (*(uint32_t*)((char*)arg2 + 0xc) > 0)
005bc55a          {
005bc58b              do
005bc58b              {
005bc563                  uint32_t* j_1 = *(uint32_t*)(*(uint32_t*)((char*)arg2 + 8) + (i << 2));
005bc563                  
005bc568                  if (j_1 != 0)
005bc568                  {
005bc583                      uint32_t* j;
005bc583                      
005bc583                      do
005bc583                      {
005bc570                          j = j_1[0xa];
005bc57a                          PackableHashTable<unsigned long,SpellComponentBase>::add(result, j_1, &j_1[1]);
005bc581                          j_1 = j;
005bc583                      } while (j != 0);
005bc568                  }
005bc568                  
005bc588                  i += 1;
005bc58b              } while (i < *(uint32_t*)((char*)arg2 + 0xc));
005bc55a          }
005bc52a      }
005bc52a      
005bc593      return result;
005bc520  }

005bc596                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005bc5a0  void __fastcall PackableHashTable<unsigned long,SpellComponentBase>::~PackableHashTable<unsigned long,SpellComponentBase>(class PackableHashTable<unsigned long,SpellComponentBase>* this)

005bc5a0  {
005bc5a3      this->vtable = 0x7e74c4;
005bc5a9      PackableHashTable<unsigned long,SpellComponentBase>::EmptyContents(this);
005bc5ae      class PackableHashData<unsigned long,SpellComponentBase>** _buckets = this->_buckets;
005bc5ae      
005bc5b3      if (_buckets != 0)
005bc5b3      {
005bc5b6          operator delete[](_buckets);
005bc5be          this->_buckets = nullptr;
005bc5b3      }
005bc5b3      
005bc5c5      this->_table_size = 0;
005bc5cc      this->vtable = 0x79285c;
005bc5a0  }

005bc5d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bc5e0  int32_t __thiscall PackableHashTable<unsigned long,SpellComponentBase>::UnPack(class PackableHashTable<unsigned long,SpellComponentBase>* this, void** arg2, uint32_t arg3)

005bc5e0  {
005bc5ee      if (arg3 < 4)
005bc5f7          return 0;
005bc5f7      
005bc5fc      void** edi = arg2;
005bc600      void* eax_1 = *(uint32_t*)edi;
005bc608      uint32_t var_28 = arg3;
005bc60c      PackableHashTable<unsigned long,SpellComponentBase>::EmptyContents(this);
005bc611      class PackableHashData<unsigned long,SpellComponentBase>** _buckets = this->_buckets;
005bc611      
005bc618      if (_buckets != 0)
005bc618      {
005bc61b          operator delete[](_buckets);
005bc623          this->_buckets = nullptr;
005bc618      }
005bc618      
005bc626      this->_table_size = 0;
005bc629      void* ecx_1 = *(uint32_t*)edi;
005bc62b      int32_t eax_2 = *(uint32_t*)ecx_1;
005bc630      *(uint32_t*)edi = ((char*)ecx_1 + 4);
005bc634      uint32_t ecx_4 = (eax_2 >> 0x10);
005bc637      int32_t eax_3 = (eax_2 & 0xffff);
005bc63c      int32_t ebx_1 = (arg3 - 4);
005bc641      this->_table_size = ecx_4;
005bc641      
005bc646      if (ecx_4 == 0)
005bc646      {
005bc64f          int32_t result;
005bc64f          result = eax_3 == 0;
005bc656          return result;
005bc646      }
005bc646      
005bc66b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
005bc66b      {
005bc684          int32_t var_24;
005bc684          SpellComponentBase::SpellComponentBase(&var_24);
005bc68b          arg3 = 0;
005bc693          int32_t* ecx_10;
005bc693          
005bc693          if (eax_3 <= 0)
005bc693          {
005bc6ef          label_5bc6ef:
005bc6ef              ecx_10 = &var_24;
005bc6ef              
005bc6f3              if (var_28 >= (*(uint32_t*)edi - eax_1))
005bc6f3              {
005bc6f5                  SpellComponentBase::~SpellComponentBase(ecx_10);
005bc706                  return 1;
005bc6f3              }
005bc693          }
005bc693          else
005bc693          {
005bc698              while (true)
005bc698              {
005bc698                  if (ebx_1 >= 4)
005bc698                  {
005bc69a                      int32_t* eax_5 = *(uint32_t*)edi;
005bc69e                      int32_t edx_1 = var_24;
005bc6a3                      arg2 = *(uint32_t*)eax_5;
005bc6af                      *(uint32_t*)edi = &eax_5[1];
005bc6af                      
005bc6b6                      if ((*(uint32_t*)(edx_1 + 0x10)(edi, ebx_1) != 0 && (PackableHashTable<unsigned long,SpellComponentBase>::add(this, &arg2, &var_24) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
005bc6b6                      {
005bc6d9                          bool cond:5_1 = (arg3 + 1) < eax_3;
005bc6db                          arg3 += 1;
005bc6db                          
005bc6df                          if (!(cond:5_1))
005bc6df                              goto label_5bc6ef;
005bc6df                          
005bc6df                          continue;
005bc6b6                      }
005bc698                  }
005bc698                  
005bc709                  ecx_10 = &var_24;
005bc709                  break;
005bc698              }
005bc693          }
005bc693          
005bc70d          SpellComponentBase::~SpellComponentBase(ecx_10);
005bc66b      }
005bc66b      
005bc71b      return 0;
005bc5e0  }

005bc71e                                                                                            90 90                                ..

005bc720  void* __thiscall PackableHashTable<unsigned long,SpellComponentBase>::`scalar deleting destructor'(class PackableHashTable<unsigned long,SpellComponentBase>* this, uint32_t arg2)

005bc720  {
005bc723      this->vtable = 0x7e74c4;
005bc729      PackableHashTable<unsigned long,SpellComponentBase>::EmptyContents(this);
005bc72e      class PackableHashData<unsigned long,SpellComponentBase>** _buckets = this->_buckets;
005bc72e      
005bc733      if (_buckets != 0)
005bc733      {
005bc736          operator delete[](_buckets);
005bc73e          this->_buckets = nullptr;
005bc733      }
005bc733      
005bc74a      this->_table_size = 0;
005bc751      this->vtable = 0x79285c;
005bc751      
005bc757      if ((arg2 & 1) != 0)
005bc75a          operator delete(this);
005bc75a      
005bc765      return this;
005bc720  }

005bc768                          90 90 90 90 90 90 90 90                                                          ........

005bc770  void __thiscall SpellComponentTable::SpellComponentTable(class SpellComponentTable* this, class IDClass<_tagDataID,32,0> arg2)

005bc770  {
005bc77d      DBObj::DBObj(this, arg2);
005bc782      this->vtable = &PackObj::`vftable';
005bc78c      this->vtable = 0x7e74f0;
005bc792      this->vtable = &SpellComponentTable::`vftable';
005bc789      this->_spellComponentBaseHash.vtable = 0x7e74c4;
005bc789      this->_spellComponentBaseHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
005bc789      this->_spellComponentBaseHash._buckets = nullptr;
005bc789      this->_spellComponentBaseHash._table_size = 0x20;
005bc789      this->_spellComponentBaseHash._currNum = 0;
005bc7b3      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_spellComponentBaseHash);
005bc7bc      int32_t var_14 = 0x7e74c4;
005bc7c4      int32_t var_10 = 0;
005bc7c8      void* var_c = nullptr;
005bc7cc      int32_t var_8 = 0x100;
005bc7d4      int32_t var_4 = 0;
005bc7d8      PackableHashTable<unsigned long,CContractTracker>::Init(&var_14);
005bc7e4      PackableHashTable<unsigned long,SpellComponentBase>::operator=(&this->_spellComponentBaseHash, &var_14);
005bc7ed      var_14 = 0x7e74c4;
005bc7f5      PackableHashTable<unsigned long,SpellComponentBase>::EmptyContents(&var_14);
005bc7f5      
005bc800      if (var_c != 0)
005bc803          operator delete[](var_c);
005bc770  }

005bc816                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005bc820  void* __thiscall SpellComponentTable::`vector deleting destructor'(class SpellComponentTable* this, uint32_t arg2)

005bc820  {
005bc823      /* tailcall */
005bc823      return SpellComponentTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005bc820  }

005bc828                          cc cc cc cc cc cc cc cc                                                          ........

005bc830  void* __thiscall SpellComponentTable::`scalar deleting destructor'(class SpellComponentTable* this, uint32_t arg2)

005bc830  {
005bc836      this->vtable = 0x7e74f0;
005bc83c      this->vtable = &SpellComponentTable::`vftable';
005bc843      PackableHashTable<unsigned long,SpellComponentBase>::~PackableHashTable<unsigned long,SpellComponentBase>(&this->_spellComponentBaseHash);
005bc84a      SerializeUsingPackDBObj::~SerializeUsingPackDBObj(this);
005bc84a      
005bc854      if ((arg2 & 1) != 0)
005bc857          operator delete(this);
005bc857      
005bc862      return this;
005bc830  }

005bc865                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005bc870  class DBObj* SpellComponentTable::Allocate(class SpellComponentTable const* this @ ecx)

005bc870  {
005bc870      /* tailcall */
005bc870      return SpellComponentTable::Allocator();
005bc870  }

005bc875                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005bc880  int32_t __fastcall SpellFormula::Complete(class SpellFormula const* this)

005bc880  {
005bc880      int32_t i = 0;
005bc882      uint32_t (* ecx)[0x8] = &this->_comps;
005bc882      
005bc891      do
005bc891      {
005bc888          if (ADJ(ecx)->_comps[0] == 0)
005bc89b              return 0;
005bc89b          
005bc88a          i += 1;
005bc88b          ecx = &*(uint32_t*)ecx[1];
005bc891      } while (i < 5);
005bc891      
005bc898      return 1;
005bc880  }

005bc89c                                                                                      90 90 90 90                              ....

005bc8a0  int32_t __thiscall SpellFormula::SetComponent(class SpellFormula* this, int32_t const arg2, uint32_t const arg3)

005bc8a0  {
005bc8a7      if (arg2 >= 8)
005bc8ab          return 0;
005bc8ab      
005bc8b2      this->_comps[arg2] = arg3;
005bc8bb      return 1;
005bc8a0  }

005bc8be                                                                                            90 90                                ..

005bc8c0  int32_t __fastcall SpellFormula::GetNumSpellComponents(class SpellFormula const* this)

005bc8c0  {
005bc8c3      int32_t result = 0;
005bc8c3      
005bc8c7      if (this->_comps[0] != 0)
005bc8c9          result = 1;
005bc8c9      
005bc8d3      if (this->_comps[1] != 0)
005bc8d5          result += 1;
005bc8d5      
005bc8db      if (this->_comps[2] != 0)
005bc8dd          result += 1;
005bc8dd      
005bc8e3      if (this->_comps[3] != 0)
005bc8e5          result += 1;
005bc8e5      
005bc8eb      if (this->_comps[4] != 0)
005bc8ed          result += 1;
005bc8ed      
005bc8f3      if (this->_comps[5] != 0)
005bc8f5          result += 1;
005bc8f5      
005bc8fb      if (this->_comps[6] != 0)
005bc8fd          result += 1;
005bc8fd      
005bc903      if (this->_comps[7] == 0)
005bc906          return result;
005bc906      
005bc905      return (result + 1);
005bc8c0  }

005bc907                       90 90 90 90 90 90 90 90 90                                                         .........

005bc910  uint32_t __fastcall SpellFormula::GetTargetingType(class SpellFormula const* this)

005bc910  {
005bc910      int32_t eax = 5;
005bc915      uint32_t* edx = &this->_comps[5];
005bc915      
005bc91b      while (ADJ(edx)->_comps[5] != 0)
005bc91b      {
005bc91d          eax += 1;
005bc91e          edx = &edx[1];
005bc91e          
005bc924          if (eax >= 8)
005bc924              break;
005bc91b      }
005bc91b      
005bc932      return SpellComponentTable::GetTargetTypeFromComponentID(*(uint32_t*)((char*)this + (eax << 2)));
005bc910  }

005bc933                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005bc940  uint32_t __fastcall SpellFormula::GetPowerLevelOfPowerComponent(class SpellFormula const* this)

005bc940  {
005bc94c      return MagicSystem::DeterminePowerLevelOfComponent(this->_comps[0]);
005bc940  }

005bc94d                                         90 90 90                                                               ...

005bc950  uint32_t __thiscall SpellFormula::FindMostPowerfulPowerComponent(class SpellFormula const* this, uint32_t* arg2)

005bc950  {
005bc955      uint32_t (* esi)[0x8] = &this->_comps;
005bc959      uint32_t result = 0;
005bc95b      uint32_t edi = 0;
005bc95d      int32_t i_2 = 0;
005bc95d      
005bc961      if (this->_comps[0] != 0)
005bc963          i_2 = 1;
005bc963      
005bc96d      if (this->_comps[1] != 0)
005bc96f          i_2 += 1;
005bc96f      
005bc975      if (this->_comps[2] != 0)
005bc977          i_2 += 1;
005bc977      
005bc97d      if (this->_comps[3] != 0)
005bc97f          i_2 += 1;
005bc97f      
005bc985      if (this->_comps[4] != 0)
005bc987          i_2 += 1;
005bc987      
005bc98d      if (this->_comps[5] != 0)
005bc98f          i_2 += 1;
005bc98f      
005bc995      if (this->_comps[6] != 0)
005bc997          i_2 += 1;
005bc997      
005bc99d      if (this->_comps[7] != 0)
005bc99f          i_2 += 1;
005bc99f      
005bc9a2      if (i_2 <= 0)
005bc9a2      {
005bc9d7          *(uint32_t*)arg2 = 0;
005bc9de          return 0;
005bc9a2      }
005bc9a2      
005bc9a5      int32_t i_1 = i_2;
005bc9c2      int32_t i;
005bc9c2      
005bc9c2      do
005bc9c2      {
005bc9a7          uint32_t eax = ADJ(esi)->_comps[0];
005bc9a7          
005bc9ab          if (eax != 0)
005bc9ab          {
005bc9ae              uint32_t eax_1 = MagicSystem::DeterminePowerLevelOfComponent(eax);
005bc9ae              
005bc9b8              if (eax_1 > edi)
005bc9b8              {
005bc9ba                  result = ADJ(esi)->_comps[0];
005bc9bc                  edi = eax_1;
005bc9b8              }
005bc9ab          }
005bc9ab          
005bc9be          esi = &*(uint32_t*)esi[1];
005bc9c1          i = i_1;
005bc9c1          i_1 -= 1;
005bc9c2      } while (i != 1);
005bc9c9      *(uint32_t*)arg2 = edi;
005bc9d0      return result;
005bc950  }

005bc9e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005bc9f0  int32_t __thiscall SpellFormula::Decrypt(class SpellFormula* this, uint32_t const arg2)

005bc9f0  {
005bc9f0      uint32_t eax_16 = this->_comps[0];
005bc9f0      
005bc9f9      if (eax_16 != 0)
005bc9fd          this->_comps[0] = (eax_16 - arg2);
005bc9fd      
005bca00      uint32_t eax_1 = this->_comps[1];
005bca00      
005bca05      if (eax_1 != 0)
005bca09          this->_comps[1] = (eax_1 - arg2);
005bca09      
005bca0c      uint32_t eax_3 = this->_comps[2];
005bca0c      
005bca11      if (eax_3 != 0)
005bca15          this->_comps[2] = (eax_3 - arg2);
005bca15      
005bca18      uint32_t eax_5 = this->_comps[3];
005bca18      
005bca1d      if (eax_5 != 0)
005bca21          this->_comps[3] = (eax_5 - arg2);
005bca21      
005bca24      uint32_t eax_7 = this->_comps[4];
005bca24      
005bca29      if (eax_7 != 0)
005bca2d          this->_comps[4] = (eax_7 - arg2);
005bca2d      
005bca30      uint32_t eax_9 = this->_comps[5];
005bca30      
005bca35      if (eax_9 != 0)
005bca39          this->_comps[5] = (eax_9 - arg2);
005bca39      
005bca3c      uint32_t eax_11 = this->_comps[6];
005bca3c      
005bca41      if (eax_11 != 0)
005bca45          this->_comps[6] = (eax_11 - arg2);
005bca45      
005bca48      uint32_t eax_13 = this->_comps[7];
005bca48      
005bca4d      if (eax_13 != 0)
005bca51          this->_comps[7] = (eax_13 - arg2);
005bca51      
005bca59      return 1;
005bc9f0  }

005bca5c                                                                                      90 90 90 90                              ....

005bca60  uint32_t __thiscall SpellFormula::Pack(class SpellFormula* this, void** arg2, uint32_t arg3)

005bca60  {
005bca65      if (arg3 >= 0x20)
005bca65      {
005bca71          **(uint32_t**)arg2 = this->_comps[0];
005bca75          void* edx_3 = (*(uint32_t*)arg2 + 4);
005bca78          *(uint32_t*)arg2 = edx_3;
005bca7d          *(uint32_t*)edx_3 = this->_comps[1];
005bca81          void* esi_4 = (*(uint32_t*)arg2 + 4);
005bca84          *(uint32_t*)arg2 = esi_4;
005bca8b          *(uint32_t*)esi_4 = this->_comps[2];
005bca8f          void* edx_6 = (*(uint32_t*)arg2 + 4);
005bca92          *(uint32_t*)arg2 = edx_6;
005bca97          *(uint32_t*)edx_6 = this->_comps[3];
005bca9b          void* esi_8 = (*(uint32_t*)arg2 + 4);
005bca9e          *(uint32_t*)arg2 = esi_8;
005bcaa5          *(uint32_t*)esi_8 = this->_comps[4];
005bcaa9          void* edx_9 = (*(uint32_t*)arg2 + 4);
005bcaac          *(uint32_t*)arg2 = edx_9;
005bcab1          *(uint32_t*)edx_9 = this->_comps[5];
005bcab5          void* esi_12 = (*(uint32_t*)arg2 + 4);
005bcab8          *(uint32_t*)arg2 = esi_12;
005bcabf          *(uint32_t*)esi_12 = this->_comps[6];
005bcac3          void* edx_12 = (*(uint32_t*)arg2 + 4);
005bcac6          *(uint32_t*)arg2 = edx_12;
005bcacb          *(uint32_t*)edx_12 = this->_comps[7];
005bcacd          *(uint32_t*)arg2 += 4;
005bca65      }
005bca65      
005bcad6      return 0x20;
005bca60  }

005bcad9                                                                             90 90 90 90 90 90 90                           .......

005bcae0  int32_t __thiscall SpellFormula::UnPack(class SpellFormula* this, void** arg2, uint32_t arg3)

005bcae0  {
005bcae4      void* edx = *(uint32_t*)arg2;
005bcae4      
005bcaec      if (arg3 < 0x20)
005bcaf1          return 0;
005bcaf1      
005bcaf6      this->_comps[0] = *(uint32_t*)edx;
005bcafb      void* esi_2 = (*(uint32_t*)arg2 + 4);
005bcafe      *(uint32_t*)arg2 = esi_2;
005bcb02      this->_comps[1] = *(uint32_t*)esi_2;
005bcb07      void* esi_5 = (*(uint32_t*)arg2 + 4);
005bcb0a      *(uint32_t*)arg2 = esi_5;
005bcb0e      this->_comps[2] = *(uint32_t*)esi_5;
005bcb13      void* esi_8 = (*(uint32_t*)arg2 + 4);
005bcb16      *(uint32_t*)arg2 = esi_8;
005bcb1a      this->_comps[3] = *(uint32_t*)esi_8;
005bcb1f      void* esi_11 = (*(uint32_t*)arg2 + 4);
005bcb22      *(uint32_t*)arg2 = esi_11;
005bcb26      this->_comps[4] = *(uint32_t*)esi_11;
005bcb2b      void* esi_14 = (*(uint32_t*)arg2 + 4);
005bcb2e      *(uint32_t*)arg2 = esi_14;
005bcb32      this->_comps[5] = *(uint32_t*)esi_14;
005bcb37      void* esi_17 = (*(uint32_t*)arg2 + 4);
005bcb3a      *(uint32_t*)arg2 = esi_17;
005bcb3e      this->_comps[6] = *(uint32_t*)esi_17;
005bcb43      void* esi_20 = (*(uint32_t*)arg2 + 4);
005bcb46      *(uint32_t*)arg2 = esi_20;
005bcb4a      this->_comps[7] = *(uint32_t*)esi_20;
005bcb4f      void* esi_23 = (*(uint32_t*)arg2 + 4);
005bcb52      *(uint32_t*)arg2 = esi_23;
005bcb5b      int32_t eax_4 = -((((char*)esi_23 - edx) - 0x20));
005bcb61      return ((eax_4 - eax_4) + 1);
005bcae0  }

005bcb64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005bcb70  int32_t __thiscall SpellFormula::RandomizeVersion1(class SpellFormula* this, class AC1Legacy::PStringBase<char> const* arg2)

005bcb70  {
005bcb7c      void* ebp = nullptr;
005bcb7e      int32_t edi = 0;
005bcb7e      
005bcb82      if (this->_comps[0] != 0)
005bcb84          edi = 1;
005bcb84      
005bcb8c      if (this->_comps[1] != 0)
005bcb8e          edi += 1;
005bcb8e      
005bcb92      if (this->_comps[2] != 0)
005bcb94          edi += 1;
005bcb94      
005bcb98      if (this->_comps[3] != 0)
005bcb9a          edi += 1;
005bcb9a      
005bcb9e      if (this->_comps[4] != 0)
005bcba0          edi += 1;
005bcba0      
005bcba4      if (this->_comps[5] != 0)
005bcba6          edi += 1;
005bcba6      
005bcbaa      if (this->_comps[6] != 0)
005bcbac          edi += 1;
005bcbac      
005bcbb0      if (this->_comps[7] != 0)
005bcbb2          edi += 1;
005bcbb2      
005bcbb7      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
005bcbb9      uint32_t m_hash = m_buffer->m_hash;
005bcbbf      int32_t var_8 = 0;
005bcbc3      int32_t var_c = 0;
005bcbc7      int32_t var_10 = 0;
005bcbc7      
005bcbcb      if (m_hash == 0xffffffff)
005bcbcb      {
005bcbcd          m_hash = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bcbd2          m_buffer->m_hash = m_hash;
005bcbcb      }
005bcbcb      
005bcbdc      uint32_t temp1 = (COMBINE(0, m_hash) % 0x13d573);
005bcbe1      uint32_t esi = this->_comps[0];
005bcbe9      int32_t eax_1 = 1;
005bcbe9      
005bcbef      if (edi > 5)
005bcbef      {
005bcbf1          eax_1 = 2;
005bcbf6          var_10 = 1;
005bcbef      }
005bcbef      
005bcbfa      int32_t edx_2 = this->_comps[eax_1];
005bcbfe      int32_t eax_2 = (eax_1 + 1);
005bcbfe      
005bcc06      if (edi > 6)
005bcc06      {
005bcc08          eax_2 += 1;
005bcc09          var_c = 1;
005bcc06      }
005bcc06      
005bcc14      if ((eax_2 < 0 || eax_2 >= 8))
005bcc20          arg2 = nullptr;
005bcc14      else
005bcc1a          arg2 = this->_comps[eax_2];
005bcc1a      
005bcc2a      if (((eax_2 + 1) >= 0 && (eax_2 + 1) < 8))
005bcc2c          ebp = this->_comps[(eax_2 + 1)];
005bcc2c      
005bcc30      int32_t eax_4 = (eax_2 + 2);
005bcc34      void* var_18 = ebp;
005bcc34      
005bcc38      if (edi > 7)
005bcc38      {
005bcc3a          eax_4 += 1;
005bcc3b          var_8 = 1;
005bcc38      }
005bcc38      
005bcc4a      int32_t edi_1;
005bcc4a      
005bcc4a      if ((eax_4 < 0 || eax_4 >= 8))
005bcc52          edi_1 = 0;
005bcc4a      else
005bcc4c          edi_1 = this->_comps[eax_4];
005bcc4c      
005bcc5a      if (var_10 != 0)
005bcc5a      {
005bcc60          if ((edx_2 + esi) == 0)
005bcc62              esi = 1;
005bcc62          
005bcc67          MagicSystem::GetLowestTaperID();
005bcc7b          void* eax_9 = ((((edi_1 + (edx_2 << 1)) + ebp) + arg2) + esi);
005bcc86          ebp = var_18;
005bcc8c          this->_comps[1] = (0x3f + (COMBINE(0, eax_9) % 0xc));
005bcc5a      }
005bcc5a      
005bcc95      if (var_c != 0)
005bcc95      {
005bcc9b          void* ebp_1 = ((char*)ebp + arg2);
005bcc9b          
005bcca6          if ((esi + ebp_1) == 0)
005bcca8              esi = 1;
005bcca8          
005bccad          MagicSystem::GetLowestTaperID();
005bccdb          this->_comps[3] = (0x3f + (COMBINE(0, ((COMBINE(0, temp1) / ((char*)ebp_1 + esi)) * (((edi_1 + (ebp_1 << 1)) + edx_2) + esi))) % 0xc));
005bcc95      }
005bcc95      
005bcce4      if (var_8 != 0)
005bcce4      {
005bcceb          if ((edi_1 + esi) == 0)
005bcced              esi = 1;
005bcced          
005bccf2          MagicSystem::GetLowestTaperID();
005bcd25          this->_comps[6] = (0x3f + (COMBINE(0, ((COMBINE(0, temp1) / (edi_1 + esi)) * (((((char*)var_18 + (edi_1 << 1)) + arg2) + edx_2) + esi))) % 0xc));
005bcce4      }
005bcce4      
005bcd34      return 1;
005bcb70  }

005bcd37                                                                       90 90 90 90 90 90 90 90 90                         .........

005bcd40  int32_t __thiscall SpellFormula::RandomizeVersion2(class SpellFormula* this, class AC1Legacy::PStringBase<char> const* arg2)

005bcd40  {
005bcd4d      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
005bcd4f      uint32_t m_hash = m_buffer->m_hash;
005bcd4f      
005bcd55      if (m_hash == 0xffffffff)
005bcd55      {
005bcd57          m_hash = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bcd5c          m_buffer->m_hash = m_hash;
005bcd55      }
005bcd55      
005bcd5f      uint32_t ebx = this->_comps[0];
005bcd62      uint32_t ecx_1 = this->_comps[5];
005bcd68      uint32_t ebp = this->_comps[1];
005bcd6b      uint32_t edi = this->_comps[2];
005bcd72      uint32_t eax = this->_comps[4];
005bcd81      arg2 = this->_comps[7];
005bcd85      MagicSystem::GetLowestTaperID();
005bcdb0      this->_comps[3] = (0x3f + (COMBINE(0, (((((ebx * 3) + arg2) + ((ecx_1 * eax) << 1)) + edi) + ebp)) % 0xc));
005bcdb3      MagicSystem::GetLowestTaperID();
005bce08      this->_comps[6] = (0x3f + (COMBINE(0, ((COMBINE(0, (COMBINE(0, m_hash) % 0x13d573)) / ((arg2 * ebp) + (eax << 1))) * (((((edi * ebx) * 3) + arg2) + (ecx_1 << 1)) + eax))) % 0xc));
005bce11      return 1;
005bcd40  }

005bce14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bce20  int32_t __thiscall SpellFormula::RandomizeVersion3(class SpellFormula* this, class AC1Legacy::PStringBase<char> const* arg2)

005bce20  {
005bce2b      class AC1Legacy::PSRefBuffer<char>* m_buffer_6 = arg2->m_buffer;
005bce2d      uint32_t m_hash = m_buffer_6->m_hash;
005bce2d      
005bce39      if (m_hash == 0xffffffff)
005bce39      {
005bce3d          m_hash = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bce42          m_buffer_6->m_hash = m_hash;
005bce39      }
005bce39      
005bce4e      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
005bce50      uint32_t m_hash_1 = m_buffer->m_hash;
005bce50      
005bce5a      if (m_hash_1 == 0xffffffff)
005bce5a      {
005bce5e          m_hash_1 = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bce63          m_buffer->m_hash = m_hash_1;
005bce5a      }
005bce5a      
005bce6f      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->m_buffer;
005bce71      uint32_t m_hash_2 = m_buffer_1->m_hash;
005bce71      
005bce7b      if (m_hash_2 == 0xffffffff)
005bce7b      {
005bce7f          m_hash_2 = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bce84          m_buffer_1->m_hash = m_hash_2;
005bce7b      }
005bce7b      
005bce90      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg2->m_buffer;
005bce92      uint32_t m_hash_3 = m_buffer_2->m_hash;
005bce92      
005bce9c      if (m_hash_3 == 0xffffffff)
005bce9c      {
005bcea0          m_hash_3 = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bcea5          m_buffer_2->m_hash = m_hash_3;
005bce9c      }
005bce9c      
005bceb1      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = arg2->m_buffer;
005bceb3      uint32_t m_hash_4 = m_buffer_3->m_hash;
005bceb3      
005bcebb      if (m_hash_4 == 0xffffffff)
005bcebb      {
005bcebf          m_hash_4 = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bcec4          m_buffer_3->m_hash = m_hash_4;
005bcebb      }
005bcebb      
005bced0      class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = arg2->m_buffer;
005bced2      uint32_t m_hash_5 = m_buffer_4->m_hash;
005bced2      
005bcedc      if (m_hash_5 == 0xffffffff)
005bcedc      {
005bcee0          m_hash_5 = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bcee5          m_buffer_4->m_hash = m_hash_5;
005bcedc      }
005bcedc      
005bcef1      class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = arg2->m_buffer;
005bcef3      uint32_t m_hash_6 = m_buffer_5->m_hash;
005bcef3      
005bcefd      if (m_hash_6 == 0xffffffff)
005bcefd      {
005bcf01          m_hash_6 = AC1Legacy::PStringBase<char>::compute_hash(arg2);
005bcf06          m_buffer_5->m_hash = m_hash_6;
005bcefd      }
005bcefd      
005bcf1d      uint32_t temp1_6 = (COMBINE(0, (this->_comps[0] + (COMBINE(0, m_hash) % 0x13d573))) % 0xc);
005bcf33      uint32_t temp1_7 = (COMBINE(0, (this->_comps[1] + (COMBINE(0, m_hash_1) % 0x4aefd))) % 0xc);
005bcf47      uint32_t temp1_8 = (COMBINE(0, (this->_comps[2] + (COMBINE(0, m_hash_2) % 0x96a7f))) % 0xc);
005bcf57      void* esi_3 = (temp1_7 * temp1_6);
005bcf5e      uint32_t temp1_9 = (COMBINE(0, (this->_comps[4] + (COMBINE(0, m_hash_3) % 0x100a03))) % 0xc);
005bcf81      arg2 = (COMBINE(0, (this->_comps[5] + (COMBINE(0, m_hash_4) % 0xeb2ef))) % 0xc);
005bcf87      uint32_t temp1_11 = (COMBINE(0, (this->_comps[7] + (COMBINE(0, m_hash_5) % 0x121e7d))) % 0xc);
005bcf8d      int32_t edi_3 = (arg2 * temp1_8);
005bcf94      MagicSystem::GetLowestTaperID();
005bcfca      this->_comps[3] = (0x3f + (COMBINE(0, (((((((((temp1_9 + 1) * temp1_11) + esi_3) + edi_3) + arg2) + temp1_9) + temp1_8) + temp1_7) + temp1_6)) % 0xc));
005bcfcd      MagicSystem::GetLowestTaperID();
005bd024      void* eax_29 = ((edi_3 * 0xb) + (((esi_3 * 5) + arg2) + (((((((edi_3 * temp1_7) * temp1_6) + 7) * temp1_9) + 1) * temp1_11) + (COMBINE(0, (COMBINE(0, m_hash_6) % 0x65039)) % 0xc))));
005bd047      this->_comps[6] = (0x3f + (COMBINE(0, (((((char*)eax_29 + temp1_9) + temp1_8) + temp1_7) + temp1_6)) % 0xc));
005bd04d      return 1;
005bce20  }


005bd050  int32_t __thiscall SpellFormula::RandomizeForName(class SpellFormula* this, class AC1Legacy::PStringBase<char> const* arg2, int32_t const arg3)

005bd050  {
005bd055      if (arg3 == 1)
005bd055      {
005bd081          SpellFormula::RandomizeVersion1(this, arg2);
005bd086          return 1;
005bd055      }
005bd055      
005bd058      if (arg3 == 2)
005bd058      {
005bd074          SpellFormula::RandomizeVersion2(this, arg2);
005bd079          return 1;
005bd058      }
005bd058      
005bd05b      if (arg3 != 3)
005bd05f          return 0;
005bd05f      
005bd067      SpellFormula::RandomizeVersion3(this, arg2);
005bd06c      return 1;
005bd050  }

005bd089                             90 90 90 90 90 90 90                                                           .......

005bd090  uint32_t __thiscall StatMod::Pack(class StatMod* this, void** arg2, uint32_t arg3)

005bd090  {
005bd095      if (arg3 >= 0xc)
005bd095      {
005bd0a1          **(uint32_t**)arg2 = this->type;
005bd0a5          void* esi_3 = (*(uint32_t*)arg2 + 4);
005bd0a8          *(uint32_t*)arg2 = esi_3;
005bd0af          *(uint32_t*)esi_3 = this->key;
005bd0b3          void* edx_4 = (*(uint32_t*)arg2 + 4);
005bd0b6          *(uint32_t*)arg2 = edx_4;
005bd0bb          *(uint32_t*)edx_4 = ((float)((long double)this->val));
005bd0bd          *(uint32_t*)arg2 += 4;
005bd095      }
005bd095      
005bd0c6      return 0xc;
005bd090  }

005bd0c9                             90 90 90 90 90 90 90                                                           .......

005bd0d0  uint32_t __fastcall SpellSetTierList::GetPackSize(class SpellSetTierList* this)

005bd0d0  {
005bd0d0      class SpellSetTierList* this_1 = this;
005bd0d1      struct PackObj::VTable* vtable = this->m_SpellList.vtable;
005bd0de      this_1 = nullptr;
005bd0ed      return (vtable->Pack(&this_1, 0) + 4);
005bd0d0  }

005bd0ee                                            90 90                                                                ..

005bd0f0  uint32_t __thiscall SpellSetTierList::Pack(class SpellSetTierList* this, void** arg2, uint32_t arg3)

005bd0f0  {
005bd0f6      int32_t result = this->vtable->GetPackSize();
005bd0f6      
005bd101      if (arg3 >= result)
005bd101      {
005bd10d          **(uint32_t**)arg2 = this->m_PieceCount;
005bd10f          *(uint32_t*)arg2 += 4;
005bd112          this->m_SpellList.vtable->Pack(arg2, arg3);
005bd101      }
005bd101      
005bd121      return result;
005bd0f0  }

005bd124              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005bd130  int32_t __thiscall SpellSetTierList::UnPack(class SpellSetTierList* this, void** arg2, uint32_t arg3)

005bd130  {
005bd13e      if (arg3 < this->vtable->GetPackSize())
005bd143          return 0;
005bd143      
005bd14e      this->m_PieceCount = **(uint32_t**)arg2;
005bd151      *(uint32_t*)arg2 += 4;
005bd154      this->m_SpellList.vtable->UnPack(arg2, arg3);
005bd164      return 1;
005bd130  }

005bd167                       90 90 90 90 90 90 90 90 90                                                         .........

005bd170  uint32_t __fastcall SpellSet::GetPackSize(class SpellSet* this)

005bd170  {
005bd170      class SpellSet* this_1 = this;
005bd171      struct PackObj::VTable* vtable = this->m_countTiers.vtable;
005bd17e      this_1 = nullptr;
005bd18a      return vtable->Pack(&this_1, 0);
005bd170  }

005bd18b                                   90 90 90 90 90                                                             .....

005bd190  uint32_t __thiscall SpellSet::Pack(class SpellSet* this, void** arg2, uint32_t arg3)

005bd190  {
005bd196      int32_t result = this->vtable->GetPackSize();
005bd196      
005bd1a1      if (arg3 >= result)
005bd1a3          this->m_countTiers.vtable->Pack(arg2, arg3);
005bd1a3      
005bd1b6      return result;
005bd190  }

005bd1b9                                                                             90 90 90 90 90 90 90                           .......

005bd1c0  int32_t __thiscall SpellSet::UnPack(class SpellSet* this, void** arg2, uint32_t arg3)

005bd1c0  {
005bd1ce      if (arg3 < this->vtable->GetPackSize())
005bd1d3          return 0;
005bd1d3      
005bd1d6      this->m_countTiers.vtable->UnPack(arg2, arg3);
005bd1eb      return 1;
005bd1c0  }

005bd1ee                                            90 90                                                                ..

005bd1f0  void __thiscall SpellSetTierList::SpellSetTierList(class SpellSetTierList* this, class SpellSetTierList const* arg2)

005bd1f0  {
005bd1f3      this->vtable = 0x7e4878;
005bd1f9      this->m_SpellList._head = nullptr;
005bd1f9      this->m_SpellList._tail = nullptr;
005bd1f9      this->m_SpellList._num_elements = 0;
005bd1f9      this->m_SpellList.vtable = &PackObj::`vftable';
005bd1f9      this->m_SpellList.vtable = 0x7a7388;
005bd1f9      this->m_SpellList.vtable = &PList<unsigned long>::`vftable';
005bd226      this->m_PieceCount = arg2->m_PieceCount;
005bd229      List<unsigned long>::operator=(&this->m_SpellList, &arg2->m_SpellList);
005bd1f0  }

005bd234                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bd240  uint32_t MagicSystem::DeterminePowerLevelOfComponent(uint32_t const arg1)

005bd240  {
005bd24d      if ((arg1 - 1) <= 0xc0)
005bd256          switch (arg1)
005bd256          {
005bd262              case 1:
005bd262              {
005bd262                  return 1;
005bd262                  break;
005bd262              }
005bd268              case 2:
005bd268              {
005bd268                  return 2;
005bd268                  break;
005bd268              }
005bd26e              case 3:
005bd26e              {
005bd26e                  return 3;
005bd26e                  break;
005bd26e              }
005bd274              case 4:
005bd274              {
005bd274                  return 4;
005bd274                  break;
005bd274              }
005bd27a              case 5:
005bd27a              {
005bd27a                  return 5;
005bd27a                  break;
005bd27a              }
005bd280              case 6:
005bd280              {
005bd280                  return 6;
005bd280                  break;
005bd280              }
005bd286              case 0x6e:
005bd286              {
005bd286                  return 7;
005bd286                  break;
005bd286              }
005bd28c              case 0x70:
005bd28c              {
005bd28c                  return 8;
005bd28c                  break;
005bd28c              }
005bd292              case 0xc0:
005bd292              {
005bd292                  return 9;
005bd292                  break;
005bd292              }
005bd293              case 0xc1:
005bd293              {
005bd293                  return 0xa;
005bd293                  break;
005bd293              }
005bd256          }
005bd256      
005bd298      return 0;
005bd240  }

005bd299                                                                             8d 49 00                                       .I.
005bd29c  uint32_t jump_table_5bd29c[0xb] = 
005bd29c  {
005bd29c      [0x0] =  0x005bd25d
005bd2a0      [0x1] =  0x005bd263
005bd2a4      [0x2] =  0x005bd269
005bd2a8      [0x3] =  0x005bd26f
005bd2ac      [0x4] =  0x005bd275
005bd2b0      [0x5] =  0x005bd27b
005bd2b4      [0x6] =  0x005bd281
005bd2b8      [0x7] =  0x005bd287
005bd2bc      [0x8] =  0x005bd28d
005bd2c0      [0x9] =  0x005bd293
005bd2c4      [0xa] =  0x005bd298
005bd2c8  }
005bd2c8  uint8_t lookup_table_5bd2c8[0xc1] = 
005bd2c8  {
005bd2c8      [0x00] =  0x00
005bd2c9      [0x01] =  0x01
005bd2ca      [0x02] =  0x02
005bd2cb      [0x03] =  0x03
005bd2cc      [0x04] =  0x04
005bd2cd      [0x05] =  0x05
005bd2ce      [0x06] =  0x0a
005bd2cf      [0x07] =  0x0a
005bd2d0      [0x08] =  0x0a
005bd2d1      [0x09] =  0x0a
005bd2d2      [0x0a] =  0x0a
005bd2d3      [0x0b] =  0x0a
005bd2d4      [0x0c] =  0x0a
005bd2d5      [0x0d] =  0x0a
005bd2d6      [0x0e] =  0x0a
005bd2d7      [0x0f] =  0x0a
005bd2d8      [0x10] =  0x0a
005bd2d9      [0x11] =  0x0a
005bd2da      [0x12] =  0x0a
005bd2db      [0x13] =  0x0a
005bd2dc      [0x14] =  0x0a
005bd2dd      [0x15] =  0x0a
005bd2de      [0x16] =  0x0a
005bd2df      [0x17] =  0x0a
005bd2e0      [0x18] =  0x0a
005bd2e1      [0x19] =  0x0a
005bd2e2      [0x1a] =  0x0a
005bd2e3      [0x1b] =  0x0a
005bd2e4      [0x1c] =  0x0a
005bd2e5      [0x1d] =  0x0a
005bd2e6      [0x1e] =  0x0a
005bd2e7      [0x1f] =  0x0a
005bd2e8      [0x20] =  0x0a
005bd2e9      [0x21] =  0x0a
005bd2ea      [0x22] =  0x0a
005bd2eb      [0x23] =  0x0a
005bd2ec      [0x24] =  0x0a
005bd2ed      [0x25] =  0x0a
005bd2ee      [0x26] =  0x0a
005bd2ef      [0x27] =  0x0a
005bd2f0      [0x28] =  0x0a
005bd2f1      [0x29] =  0x0a
005bd2f2      [0x2a] =  0x0a
005bd2f3      [0x2b] =  0x0a
005bd2f4      [0x2c] =  0x0a
005bd2f5      [0x2d] =  0x0a
005bd2f6      [0x2e] =  0x0a
005bd2f7      [0x2f] =  0x0a
005bd2f8      [0x30] =  0x0a
005bd2f9      [0x31] =  0x0a
005bd2fa      [0x32] =  0x0a
005bd2fb      [0x33] =  0x0a
005bd2fc      [0x34] =  0x0a
005bd2fd      [0x35] =  0x0a
005bd2fe      [0x36] =  0x0a
005bd2ff      [0x37] =  0x0a
005bd300      [0x38] =  0x0a
005bd301      [0x39] =  0x0a
005bd302      [0x3a] =  0x0a
005bd303      [0x3b] =  0x0a
005bd304      [0x3c] =  0x0a
005bd305      [0x3d] =  0x0a
005bd306      [0x3e] =  0x0a
005bd307      [0x3f] =  0x0a
005bd308      [0x40] =  0x0a
005bd309      [0x41] =  0x0a
005bd30a      [0x42] =  0x0a
005bd30b      [0x43] =  0x0a
005bd30c      [0x44] =  0x0a
005bd30d      [0x45] =  0x0a
005bd30e      [0x46] =  0x0a
005bd30f      [0x47] =  0x0a
005bd310      [0x48] =  0x0a
005bd311      [0x49] =  0x0a
005bd312      [0x4a] =  0x0a
005bd313      [0x4b] =  0x0a
005bd314      [0x4c] =  0x0a
005bd315      [0x4d] =  0x0a
005bd316      [0x4e] =  0x0a
005bd317      [0x4f] =  0x0a
005bd318      [0x50] =  0x0a
005bd319      [0x51] =  0x0a
005bd31a      [0x52] =  0x0a
005bd31b      [0x53] =  0x0a
005bd31c      [0x54] =  0x0a
005bd31d      [0x55] =  0x0a
005bd31e      [0x56] =  0x0a
005bd31f      [0x57] =  0x0a
005bd320      [0x58] =  0x0a
005bd321      [0x59] =  0x0a
005bd322      [0x5a] =  0x0a
005bd323      [0x5b] =  0x0a
005bd324      [0x5c] =  0x0a
005bd325      [0x5d] =  0x0a
005bd326      [0x5e] =  0x0a
005bd327      [0x5f] =  0x0a
005bd328      [0x60] =  0x0a
005bd329      [0x61] =  0x0a
005bd32a      [0x62] =  0x0a
005bd32b      [0x63] =  0x0a
005bd32c      [0x64] =  0x0a
005bd32d      [0x65] =  0x0a
005bd32e      [0x66] =  0x0a
005bd32f      [0x67] =  0x0a
005bd330      [0x68] =  0x0a
005bd331      [0x69] =  0x0a
005bd332      [0x6a] =  0x0a
005bd333      [0x6b] =  0x0a
005bd334      [0x6c] =  0x0a
005bd335      [0x6d] =  0x06
005bd336      [0x6e] =  0x0a
005bd337      [0x6f] =  0x07
005bd338      [0x70] =  0x0a
005bd339      [0x71] =  0x0a
005bd33a      [0x72] =  0x0a
005bd33b      [0x73] =  0x0a
005bd33c      [0x74] =  0x0a
005bd33d      [0x75] =  0x0a
005bd33e      [0x76] =  0x0a
005bd33f      [0x77] =  0x0a
005bd340      [0x78] =  0x0a
005bd341      [0x79] =  0x0a
005bd342      [0x7a] =  0x0a
005bd343      [0x7b] =  0x0a
005bd344      [0x7c] =  0x0a
005bd345      [0x7d] =  0x0a
005bd346      [0x7e] =  0x0a
005bd347      [0x7f] =  0x0a
005bd348      [0x80] =  0x0a
005bd349      [0x81] =  0x0a
005bd34a      [0x82] =  0x0a
005bd34b      [0x83] =  0x0a
005bd34c      [0x84] =  0x0a
005bd34d      [0x85] =  0x0a
005bd34e      [0x86] =  0x0a
005bd34f      [0x87] =  0x0a
005bd350      [0x88] =  0x0a
005bd351      [0x89] =  0x0a
005bd352      [0x8a] =  0x0a
005bd353      [0x8b] =  0x0a
005bd354      [0x8c] =  0x0a
005bd355      [0x8d] =  0x0a
005bd356      [0x8e] =  0x0a
005bd357      [0x8f] =  0x0a
005bd358      [0x90] =  0x0a
005bd359      [0x91] =  0x0a
005bd35a      [0x92] =  0x0a
005bd35b      [0x93] =  0x0a
005bd35c      [0x94] =  0x0a
005bd35d      [0x95] =  0x0a
005bd35e      [0x96] =  0x0a
005bd35f      [0x97] =  0x0a
005bd360      [0x98] =  0x0a
005bd361      [0x99] =  0x0a
005bd362      [0x9a] =  0x0a
005bd363      [0x9b] =  0x0a
005bd364      [0x9c] =  0x0a
005bd365      [0x9d] =  0x0a
005bd366      [0x9e] =  0x0a
005bd367      [0x9f] =  0x0a
005bd368      [0xa0] =  0x0a
005bd369      [0xa1] =  0x0a
005bd36a      [0xa2] =  0x0a
005bd36b      [0xa3] =  0x0a
005bd36c      [0xa4] =  0x0a
005bd36d      [0xa5] =  0x0a
005bd36e      [0xa6] =  0x0a
005bd36f      [0xa7] =  0x0a
005bd370      [0xa8] =  0x0a
005bd371      [0xa9] =  0x0a
005bd372      [0xaa] =  0x0a
005bd373      [0xab] =  0x0a
005bd374      [0xac] =  0x0a
005bd375      [0xad] =  0x0a
005bd376      [0xae] =  0x0a
005bd377      [0xaf] =  0x0a
005bd378      [0xb0] =  0x0a
005bd379      [0xb1] =  0x0a
005bd37a      [0xb2] =  0x0a
005bd37b      [0xb3] =  0x0a
005bd37c      [0xb4] =  0x0a
005bd37d      [0xb5] =  0x0a
005bd37e      [0xb6] =  0x0a
005bd37f      [0xb7] =  0x0a
005bd380      [0xb8] =  0x0a
005bd381      [0xb9] =  0x0a
005bd382      [0xba] =  0x0a
005bd383      [0xbb] =  0x0a
005bd384      [0xbc] =  0x0a
005bd385      [0xbd] =  0x0a
005bd386      [0xbe] =  0x0a
005bd387      [0xbf] =  0x08
005bd388      [0xc0] =  0x09
005bd389  }

005bd389                             90 90 90 90 90 90 90                                                           .......

005bd390  uint32_t MagicSystem::GetLowestTaperID() __pure

005bd390  {
005bd395      return 0x3f;
005bd390  }

005bd396                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005bd3a0  void __fastcall ACWTimeStamper::ACWTimeStamper(class ACWTimeStamper* this)

005bd3a0  {
005bd3a3      WTimeStamper::WTimeStamper(this);
005bd3a8      this->vtable = 0x7e75e8;
005bd3a0  }

005bd3b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005bd3c0  void* __thiscall ACWTimeStamper::`scalar deleting destructor'(class ACWTimeStamper* this, uint32_t arg2)

005bd3c0  {
005bd3c3      this->vtable = 0x7e75e8;
005bd3c9      WTimeStamper::~WTimeStamper(this);
005bd3c9      
005bd3d3      if ((arg2 & 1) != 0)
005bd3d6          operator delete(this);
005bd3d6      
005bd3e1      return this;
005bd3c0  }

005bd3e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005bd3f0  void* __thiscall CharGenData::`scalar deleting destructor'(class CharGenData* this, uint32_t arg2)

005bd3f0  {
005bd3f3      this->vtable = 0x7e7648;
005bd3f9      DBObj::~DBObj(this);
005bd3f9      
005bd403      if ((arg2 & 1) != 0)
005bd406          operator delete(this);
005bd406      
005bd411      return this;
005bd3f0  }

005bd414                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bd420  void __fastcall Skill_CG::Skill_CG(class Skill_CG* this)

005bd420  {
005bd424      this->vtable = 0x79fa7c;
005bd42a      this->skillNum = 0;
005bd42d      this->normalCost = 0;
005bd430      this->primaryCost = 0;
005bd420  }

005bd434                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bd440  void __convention("regparm") SB_AsPackObj<1>::Serialize(class Sex_CG** arg1, class ObjDesc* arg2, class Archive* arg3)

005bd440  {
005bd440      uint8_t* ecx;
005bd440      uint8_t* var_4 = ecx;
005bd443      class Archive* esi = arg3;
005bd453      arg3 = Archive::IsWordAligned(esi);
005bd457      Archive::SetWordAligned(esi, 1);
005bd460      Archive::CheckAlignment(esi, 4);
005bd46c      Archive::SetWordAligned(esi, ((int8_t)arg3));
005bd46c      
005bd475      if ((esi->m_flags & 1) == 0)
005bd475      {
005bd4b7          uint32_t eax_4 = Archive::GetSizeLeft(esi);
005bd4c9          uint8_t* eax_6 = Archive::PeekBytes(esi, Archive::GetCurrentPosition(esi), eax_4);
005bd4d2          struct ObjDesc::VTable* vtable_1 = arg2->vtable;
005bd4dc          arg3 = eax_6;
005bd4dc          
005bd4e5          if (vtable_1->UnPack(&arg3, eax_4) != 0)
005bd4e5          {
005bd4f0              Archive::GetBytes(esi, ((char*)arg3 - eax_6));
005bd4f9              return;
005bd4e5          }
005bd4e5          
005bd4fc          Archive::RaiseError(esi);
005bd475      }
005bd475      else
005bd475      {
005bd47b          struct ObjDesc::VTable* vtable = arg2->vtable;
005bd486          arg3 = nullptr;
005bd48e          uint32_t eax_2 = vtable->Pack(&arg3, 0);
005bd496          uint8_t* eax_3 = Archive::GetBytes(esi, eax_2);
005bd49d          var_4 = eax_3;
005bd49d          
005bd4a1          if (eax_3 != 0)
005bd4a3              arg2->vtable->Pack(&var_4, eax_2);
005bd475      }
005bd440  }

005bd506                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005bd510  class EyesStrip_CG& __thiscall EyesStrip_CG::operator=(class EyesStrip_CG* this, class EyesStrip_CG const& arg2)

005bd510  {
005bd51b      this->iconImage.id = arg2->iconImage.id;
005bd524      this->iconImage_Bald.id = arg2->iconImage_Bald.id;
005bd52b      ObjDesc::operator=(&this->objDesc, &arg2->objDesc);
005bd537      ObjDesc::operator=(&this->objDesc_Bald, &arg2->objDesc_Bald);
005bd540      return this;
005bd510  }

005bd543           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005bd550  void __fastcall SmartArray<Skill_CG,1>::Reset(class SmartArray<Skill_CG,1>* this)

005bd550  {
005bd553      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005bd567      this->m_num = 0;
005bd567      
005bd56a      if ((m_sizeAndDeallocate & 0x80000000) != 0x80000000)
005bd56a      {
005bd5a4          if (this->m_data != 0)
005bd5a4          {
005bd5a6              int32_t i_3 = (m_sizeAndDeallocate & 0x7fffffff);
005bd5a6              
005bd5ac              if ((i_3 - 1) >= 0)
005bd5ac              {
005bd5b0                  int32_t ecx_5 = ((i_3 - 1) << 4);
005bd5b3                  int32_t i_2 = i_3;
005bd5c7                  int32_t i;
005bd5c7                  
005bd5c7                  do
005bd5c7                  {
005bd5b8                      void* eax_5 = (this->m_data + ecx_5);
005bd5ba                      ecx_5 -= 0x10;
005bd5bd                      i = i_2;
005bd5bd                      i_2 -= 1;
005bd5be                      *(uint32_t*)((char*)eax_5 + 4) = 0;
005bd5c1                      *(uint32_t*)((char*)eax_5 + 8) = 0;
005bd5c4                      *(uint32_t*)((char*)eax_5 + 0xc) = 0;
005bd5c7                  } while (i != 1);
005bd5ac              }
005bd5a4          }
005bd5a4          
005bd5cb          return;
005bd56a      }
005bd56a      
005bd56c      class Skill_CG* m_data = this->m_data;
005bd56c      
005bd570      if (m_data != 0)
005bd570      {
005bd572          int32_t vtable = m_data->vtable;
005bd57e          void* eax_2 = &m_data[vtable];
005bd57e          
005bd581          if ((vtable - 1) >= 0)
005bd581          {
005bd583              int32_t ecx_3 = vtable;
005bd58e              int32_t i_1;
005bd58e              
005bd58e              do
005bd58e              {
005bd584                  eax_2 -= 0x10;
005bd587                  i_1 = ecx_3;
005bd587                  ecx_3 -= 1;
005bd588                  *(uint32_t*)eax_2 = 0x79fa7c;
005bd58e              } while (i_1 != 1);
005bd581          }
005bd581          
005bd591          operator delete[](((char*)m_data - 4));
005bd570      }
005bd570      
005bd59a      this->m_data = 0;
005bd59c      this->m_sizeAndDeallocate = 0;
005bd550  }

005bd5cc                                      90 90 90 90                                                              ....

005bd5d0  void ACCharGenData::FormatName(char* arg1)

005bd5d0  {
005bd5e0      int32_t ebp = 0;
005bd5e2      char* eax = arg1;
005bd5e4      int32_t edi;
005bd5e4      int32_t var_a0 = edi;
005bd5e5      int32_t var_90 = 0;
005bd5f5      char i;
005bd5f5      
005bd5f5      do
005bd5f5      {
005bd5f0          i = *(uint8_t*)eax;
005bd5f2          eax = &eax[1];
005bd5f5      } while (i != 0);
005bd5f5      
005bd5f9      void* eax_2 = ((eax - &eax[1]) - 1);
005bd5f9      
005bd5fc      if (eax_2 >= 0)
005bd5fc      {
005bd604          while (*(uint8_t*)((char*)eax_2 + arg1) == 0x20)
005bd604          {
005bd606              void* temp0_1 = eax_2;
005bd606              eax_2 -= 1;
005bd607              *(uint8_t*)(((char*)eax_2 + arg1) + 1) = 0;
005bd607              
005bd60c              if (((char*)temp0_1 - 1) < 0)
005bd60c                  break;
005bd604          }
005bd5fc      }
005bd5fc      
005bd60e      char* eax_3 = arg1;
005bd610      void* var_8c = 0x20;
005bd610      
005bd625      do
005bd625      {
005bd620          i = *(uint8_t*)eax_3;
005bd622          eax_3 = &eax_3[1];
005bd625      } while (i != 0);
005bd625      
005bd627      void* eax_4 = (eax_3 - &eax_3[1]);
005bd629      void* var_88 = eax_4;
005bd630      void** eax_5 = &var_8c;
005bd630      
005bd634      if (eax_4 <= 0x20)
005bd636          eax_5 = &var_88;
005bd636      
005bd63a      void* eax_6 = *(uint32_t*)eax_5;
005bd63c      i = 0;
005bd63e      char* ebx = nullptr;
005bd642      var_8c = eax_6;
005bd642      
005bd646      if (eax_6 > 0)
005bd646      {
005bd73b          do
005bd73b          {
005bd657              eax_6 = i;
005bd659              i = *(uint8_t*)(ebx + arg1);
005bd65c              void* edx_3;
005bd65c              
005bd65c              if (ebx >= ((char*)var_8c - 1))
005bd664                  edx_3 = 0;
005bd65c              else
005bd65e                  edx_3 = *(uint8_t*)((ebx + arg1) + 1);
005bd65e              
005bd669              int32_t edi_2 = 1;
005bd669              
005bd673              if ((i < 0x61 || i > 0x7a))
005bd673              {
005bd678                  if (i >= 0x41)
005bd678                  {
005bd682                      if ((i <= 0x5a || i == 0x27))
005bd67d                          goto label_5bd690;
005bd67d                      
005bd684                  label_5bd684:
005bd684                      
005bd687                      if (i == 0x20)
005bd687                          goto label_5bd69b;
005bd687                      
005bd68c                      if (i != 0x2d)
005bd68e                          edi_2 = 0;
005bd678                  }
005bd678                  else if (i != 0x27)
005bd682                      goto label_5bd684;
005bd673              }
005bd673              
005bd690          label_5bd690:
005bd690              
005bd693              if (i == 0x20)
005bd693              {
005bd69b              label_5bd69b:
005bd69b                  
005bd69b                  if ((eax_6 == 0x20 || eax_6 == 0))
005bd69d                      edi_2 = 0;
005bd69d                  
005bd6a1                  if (edx_3 == 0)
005bd6a3                      edi_2 = 0;
005bd693              }
005bd693              
005bd6a8              if (i != 0x27)
005bd6a8              {
005bd6ec                  if (i != 0x2d)
005bd6ec                  {
005bd72c                  label_5bd72c:
005bd72c                      
005bd72e                      if (edi_2 != 0)
005bd72e                      {
005bd730                          arg1[ebp] = i;
005bd733                          ebp += 1;
005bd72e                      }
005bd6ec                  }
005bd6ec                  else if (eax_6 == i)
005bd6f0                  {
005bd6f2                      edi_2 = 0;
005bd70e                  label_5bd70e:
005bd70e                      
005bd72a                      if (((((edx_3 >= 0x61 && edx_3 <= 0x7a) || (edx_3 >= 0x41 && edx_3 <= 0x5a)) || edx_3 >= 0x80) || edx_3 == 0x2d))
005bd711                          goto label_5bd72c;
005bd6f0                  }
005bd6f0                  else if (eax_6 != 0)
005bd6f8                  {
005bd700                      if ((eax_6 >= 0x61 && eax_6 <= 0x7a))
005bd6fc                          goto label_5bd70e;
005bd6fc                      
005bd704                      if (eax_6 < 0x41)
005bd704                      {
005bd70c                          if (eax_6 >= 0x80)
005bd70c                              goto label_5bd70e;
005bd704                      }
005bd704                      else if ((eax_6 <= 0x5a || eax_6 >= 0x80))
005bd708                          goto label_5bd70e;
005bd6f8                  }
005bd6a8              }
005bd6a8              else if (eax_6 != i)
005bd6ac              {
005bd6b4                  if (eax_6 == 0)
005bd6b4                  {
005bd6b6                      edi_2 = 0;
005bd6b8                      goto label_5bd6ce;
005bd6b4                  }
005bd6b4                  
005bd6c0                  if ((eax_6 >= 0x61 && eax_6 <= 0x7a))
005bd6bc                      goto label_5bd72c;
005bd6bc                  
005bd6c4                  if (eax_6 < 0x41)
005bd6c4                  {
005bd6e5                      if ((eax_6 >= 0x80 || (((edx_3 >= 0x61 && edx_3 <= 0x7a) || (edx_3 >= 0x41 && edx_3 <= 0x5a)) || edx_3 >= 0x80)))
005bd6cc                          goto label_5bd72c;
005bd6c4                  }
005bd6c4                  else if (((eax_6 <= 0x5a || eax_6 >= 0x80) || (((edx_3 >= 0x61 && edx_3 <= 0x7a) || (edx_3 >= 0x41 && edx_3 <= 0x5a)) || edx_3 >= 0x80)))
005bd6c8                      goto label_5bd72c;
005bd6ac              }
005bd6ac              else
005bd6ac              {
005bd6ae                  edi_2 = 0;
005bd6ce              label_5bd6ce:
005bd6ce                  
005bd6e5                  if ((((edx_3 >= 0x61 && edx_3 <= 0x7a) || (edx_3 >= 0x41 && edx_3 <= 0x5a)) || edx_3 >= 0x80))
005bd6d1                      goto label_5bd72c;
005bd6ac              }
005bd6ac              
005bd738              ebx = &ebx[1];
005bd73b          } while (ebx < var_8c);
005bd73b          
005bd741          var_90 = ebp;
005bd646      }
005bd646      
005bd748      arg1[ebp] = 0;
005bd74c      int32_t var_84 = 0;
005bd754      void var_80;
005bd754      int32_t ecx_1;
005bd754      int32_t edi_3;
005bd754      
005bd754      if (ebp > 1)
005bd762          edi_3 = __memfill_u32(&var_80, 1, (ebp - 1));
005bd767      char* i_1 = 0xffffffff;
005bd767      
005bd76d      if ((ebp - 1) > 0xffffffff)
005bd76d      {
005bd89c          do
005bd89c          {
005bd783              if (i_1 == 0xffffffff)
005bd783                  goto label_5bd7b8;
005bd783              
005bd78c              char* eax_8;
005bd78c              eax_8 = *(uint8_t*)(i_1 + arg1);
005bd78c              
005bd799              if (((eax_8 == 0x2d || eax_8 == 0x27) || eax_8 == 0x20))
005bd799              {
005bd7a2                  if (i_1 <= 0xffffffff)
005bd7a2                      goto label_5bd7b8;
005bd7a2                  
005bd7a4                  *(uint32_t*)(&var_80 + (i_1 << 2)) = 2;
005bd7b8              label_5bd7b8:
005bd7cb                  void* const var_a8_1;
005bd7cb                  void var_78;
005bd7cb                  void var_74;
005bd7cb                  
005bd7cb                  switch ((((int32_t)*(uint8_t*)((i_1 + arg1) + 1)) - 0x44))
005bd7cb                  {
005bd843                      case nullptr:
005bd843                      case 0x20:
005bd843                      {
005bd84a                          if (_strnicmp(((i_1 + arg1) + 1), &data_7e76b4, 2) == 0)
005bd84c                              *(uint32_t*)(&var_78 + (i_1 << 2)) = 2;
005bd84c                          
005bd85e                          if (_strnicmp(((i_1 + arg1) + 1), &data_7e76b0, 2) == 0)
005bd860                              *(uint32_t*)(&var_78 + (i_1 << 2)) = 2;
005bd860                          
005bd864                          int32_t var_a4_2 = 2;
005bd865                          var_a8_1 = &data_7e76ac;
005bd85e                          goto label_5bd887;
005bd843                      }
005bd7fa                      case 2:
005bd7fa                      case 0x22:
005bd7fa                      {
005bd801                          void var_70;
005bd801                          
005bd801                          if (_strnicmp(((i_1 + arg1) + 1), "Fitz", 4) == 0)
005bd807                              *(uint32_t*)(&var_70 + (i_1 << 2)) = 2;
005bd7fa                          break;
005bd7fa                      }
005bd873                      case 8:
005bd873                      case 0x28:
005bd873                      {
005bd87a                          if (_strnicmp(((i_1 + arg1) + 1), &data_7e76a8, 2) == 0)
005bd87c                              *(uint32_t*)(&var_78 + (i_1 << 2)) = 2;
005bd87c                          
005bd880                          int32_t var_a4_3 = 2;
005bd881                          var_a8_1 = &data_7e76a4;
005bd881                          goto label_5bd887;
005bd873                      }
005bd7da                      case 9:
005bd7da                      case 0x29:
005bd7da                      {
005bd7e1                          if (_strnicmp(((i_1 + arg1) + 1), &data_7e76cc, 3) == 0)
005bd7e3                              *(uint32_t*)(&var_74 + (i_1 << 2)) = 2;
005bd7e3                          
005bd7e7                          int32_t var_a4_1 = 2;
005bd7e8                          var_a8_1 = &data_7e76c8;
005bd887                      label_5bd887:
005bd887                          
005bd88e                          if (_strnicmp(((i_1 + arg1) + 1), var_a8_1, 2) == 0)
005bd890                              *(uint32_t*)(&var_78 + (i_1 << 2)) = 2;
005bd7da                          break;
005bd7da                      }
005bd818                      case 0x12:
005bd818                      case 0x32:
005bd818                      {
005bd81f                          if (_strnicmp(((i_1 + arg1) + 1), &data_7e76bc, 3) == 0)
005bd821                              *(uint32_t*)(&var_74 + (i_1 << 2)) = 2;
005bd821                          
005bd834                          if (_strnicmp(((i_1 + arg1) + 1), &data_7e76b8, 3) == 0)
005bd836                              *(uint32_t*)(&var_74 + (i_1 << 2)) = 2;
005bd818                          break;
005bd818                      }
005bd7cb                  }
005bd799              }
005bd799              
005bd898              i_1 = &i_1[1];
005bd89c          } while (i_1 < (var_90 - 1));
005bd76d      }
005bd76d      
005bd8a6      char* edx_5 = 0xffffffff;
005bd8a9      char* ecx_3 = 0xffffffff;
005bd8ac      char* esi_2 = nullptr;
005bd8b0      int32_t edi_4 = 1;
005bd8b5      int32_t eax_21;
005bd8b5      
005bd8b5      if (var_90 > 0)
005bd8b5      {
005bd91b          do
005bd91b          {
005bd8c0              eax_21 = *(uint8_t*)(esi_2 + arg1);
005bd8c0              
005bd8c9              if ((eax_21 < 0x61 || eax_21 > 0x7a))
005bd8c9              {
005bd8cd                  if (eax_21 < 0x41)
005bd8cd                  {
005bd8d5                      if (eax_21 < 0x80)
005bd8d5                          goto label_5bd900;
005bd8d5                      
005bd8d5                      goto label_5bd8da;
005bd8cd                  }
005bd8cd                  
005bd8d5                  if ((eax_21 <= 0x5a || eax_21 >= 0x80))
005bd8d1                      goto label_5bd8da;
005bd8d1                  
005bd900              label_5bd900:
005bd900                  
005bd900                  if ((edx_5 != 0xffffffff && (edi_4 != 0 && edx_5 <= ecx_3)))
005bd90b                      __builtin_memset(&&var_a0[&edx_5[7]], 0, (((ecx_3 - edx_5) + 1) << 2));
005bd90b                  
005bd90d                  ecx_3 = 0xffffffff;
005bd910                  edi_4 = 1;
005bd915                  edx_5 = 0xffffffff;
005bd8c9              }
005bd8c9              else
005bd8c9              {
005bd8da              label_5bd8da:
005bd8da                  
005bd8da                  if (edx_5 == 0xffffffff)
005bd8dc                      edx_5 = esi_2;
005bd8dc                  
005bd8e0                  ecx_3 = esi_2;
005bd8e0                  
005bd8ea                  if ((eax_21 != 0x49 && (eax_21 != 0x56 && eax_21 != 0x58)))
005bd8ec                      edi_4 = 0;
005bd8ec                  
005bd8f3                  if (esi_2 == (var_90 - 1))
005bd8f3                      goto label_5bd900;
005bd8c9              }
005bd8c9              
005bd918              esi_2 = &esi_2[1];
005bd91b          } while (esi_2 < var_90);
005bd8b5      }
005bd8b5      
005bd921      char* ecx_6 = nullptr;
005bd921      
005bd925      if (var_90 > 0)
005bd925      {
005bd960          do
005bd960          {
005bd930              int32_t edx_6 = &var_84[ecx_6];
005bd930              
005bd937              if (edx_6 == 1)
005bd937              {
005bd939                  eax_21 = *(uint8_t*)(ecx_6 + arg1);
005bd939                  
005bd942                  if ((eax_21 >= 0x41 && eax_21 <= 0x5a))
005bd942                  {
005bd944                      eax_21 += 0x20;
005bd946                      *(uint8_t*)(ecx_6 + arg1) = eax_21;
005bd942                  }
005bd937              }
005bd937              
005bd94b              if (edx_6 == 0)
005bd94b              {
005bd94d                  eax_21 = *(uint8_t*)(ecx_6 + arg1);
005bd94d                  
005bd956                  if ((eax_21 >= 0x61 && eax_21 <= 0x7a))
005bd956                  {
005bd958                      eax_21 -= 0x20;
005bd95a                      *(uint8_t*)(ecx_6 + arg1) = eax_21;
005bd956                  }
005bd94b              }
005bd94b              
005bd95d              ecx_6 = &ecx_6[1];
005bd960          } while (ecx_6 < var_90);
005bd925      }
005bd5d0  }

005bd61d                                                                                         8d 49 00                               .I.
005bd96d                                         8d 49 00                                                               .I.
005bd970  uint32_t jump_table_5bd970[0x6] = 
005bd970  {
005bd970      [0x0] =  0x005bd83c
005bd974      [0x1] =  0x005bd7f2
005bd978      [0x2] =  0x005bd86c
005bd97c      [0x3] =  0x005bd7d2
005bd980      [0x4] =  0x005bd810
005bd984      [0x5] =  0x005bd894
005bd988  }
005bd988  uint8_t lookup_table_5bd988[0x33] = 
005bd988  {
005bd988      [0x00] =  0x00
005bd989      [0x01] =  0x05
005bd98a      [0x02] =  0x01
005bd98b      [0x03] =  0x05
005bd98c      [0x04] =  0x05
005bd98d      [0x05] =  0x05
005bd98e      [0x06] =  0x05
005bd98f      [0x07] =  0x05
005bd990      [0x08] =  0x02
005bd991      [0x09] =  0x03
005bd992      [0x0a] =  0x05
005bd993      [0x0b] =  0x05
005bd994      [0x0c] =  0x05
005bd995      [0x0d] =  0x05
005bd996      [0x0e] =  0x05
005bd997      [0x0f] =  0x05
005bd998      [0x10] =  0x05
005bd999      [0x11] =  0x05
005bd99a      [0x12] =  0x04
005bd99b      [0x13] =  0x05
005bd99c      [0x14] =  0x05
005bd99d      [0x15] =  0x05
005bd99e      [0x16] =  0x05
005bd99f      [0x17] =  0x05
005bd9a0      [0x18] =  0x05
005bd9a1      [0x19] =  0x05
005bd9a2      [0x1a] =  0x05
005bd9a3      [0x1b] =  0x05
005bd9a4      [0x1c] =  0x05
005bd9a5      [0x1d] =  0x05
005bd9a6      [0x1e] =  0x05
005bd9a7      [0x1f] =  0x05
005bd9a8      [0x20] =  0x00
005bd9a9      [0x21] =  0x05
005bd9aa      [0x22] =  0x01
005bd9ab      [0x23] =  0x05
005bd9ac      [0x24] =  0x05
005bd9ad      [0x25] =  0x05
005bd9ae      [0x26] =  0x05
005bd9af      [0x27] =  0x05
005bd9b0      [0x28] =  0x02
005bd9b1      [0x29] =  0x03
005bd9b2      [0x2a] =  0x05
005bd9b3      [0x2b] =  0x05
005bd9b4      [0x2c] =  0x05
005bd9b5      [0x2d] =  0x05
005bd9b6      [0x2e] =  0x05
005bd9b7      [0x2f] =  0x05
005bd9b8      [0x30] =  0x05
005bd9b9      [0x31] =  0x05
005bd9ba      [0x32] =  0x04
005bd9bb  }

005bd9bb                                                                                   90 90 90 90 90                             .....

005bd9c0  void __thiscall Skill_CG::Serialize(class Skill_CG* this, class Archive* arg2)

005bd9c0  {
005bd9cc      Archive::CheckAlignment(arg2, 4);
005bd9d5      uint8_t* eax = Archive::GetBytes(arg2, 4);
005bd9d5      
005bd9dc      if (eax != 0)
005bd9dc      {
005bd9e2          if ((arg2->m_flags & 1) == 0)
005bd9ed              this->skillNum = *(uint32_t*)eax;
005bd9e2          else
005bd9e7              *(uint32_t*)eax = this->skillNum;
005bd9dc      }
005bd9dc      
005bd9f4      Archive::CheckAlignment(arg2, 4);
005bd9fd      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
005bd9fd      
005bda04      if (eax_1 != 0)
005bda04      {
005bda0a          if ((arg2->m_flags & 1) == 0)
005bda15              this->normalCost = *(uint32_t*)eax_1;
005bda0a          else
005bda0f              *(uint32_t*)eax_1 = this->normalCost;
005bda04      }
005bda04      
005bda1c      Archive::CheckAlignment(arg2, 4);
005bda25      int32_t* eax_2 = Archive::GetBytes(arg2, 4);
005bda25      
005bda2c      if (eax_2 != 0)
005bda2c      {
005bda32          if ((arg2->m_flags & 1) != 0)
005bda32          {
005bda38              *(uint32_t*)eax_2 = this->primaryCost;
005bda3b              return;
005bda32          }
005bda32          
005bda40          this->primaryCost = *(uint32_t*)eax_2;
005bda2c      }
005bd9c0  }

005bda48                          90 90 90 90 90 90 90 90                                                          ........

005bda50  void __fastcall HairStyle_CG::HairStyle_CG(class HairStyle_CG* this)

005bda50  {
005bda53      this->vtable = 0x79fa80;
005bda5e      this->iconImage.id = INVALID_DID.id;
005bda61      this->bald = 0;
005bda6b      this->alternateSetup.id = INVALID_DID.id;
005bda71      ObjDesc::ObjDesc(&this->objDesc);
005bda50  }

005bda7a                                                                                90 90 90 90 90 90                            ......

005bda80  void __thiscall HairStyle_CG::Serialize(class HairStyle_CG* this, class Archive* arg2)

005bda80  {
005bda81      class Archive* esi = arg2;
005bda8c      Archive::CheckAlignment(esi, 4);
005bda95      uint8_t* eax = Archive::GetBytes(esi, 4);
005bda95      
005bda9c      if (eax != 0)
005bda9c      {
005bdaa2          if ((esi->m_flags & 1) == 0)
005bdaad              this->iconImage.id = *(uint32_t*)eax;
005bdaa2          else
005bdaa7              *(uint32_t*)eax = this->iconImage.id;
005bda9c      }
005bda9c      
005bdab5      Serializer::SerializeObject(&this->bald, esi);
005bdac1      Archive::CheckAlignment(esi, 4);
005bdaca      uint32_t* eax_2;
005bdaca      uint32_t id;
005bdaca      uint32_t edx_2;
005bdaca      eax_2 = Archive::GetBytes(esi, 4);
005bdaca      
005bdad1      if (eax_2 != 0)
005bdad1      {
005bdad7          if ((esi->m_flags & 1) == 0)
005bdad7          {
005bdae0              edx_2 = *(uint32_t*)eax_2;
005bdae2              this->alternateSetup.id = edx_2;
005bdad7          }
005bdad7          else
005bdad7          {
005bdad9              id = this->alternateSetup.id;
005bdadc              *(uint32_t*)eax_2 = id;
005bdad7          }
005bdad1      }
005bdad1      
005bdae5      class Archive* var_c_1 = esi;
005bdaed      class ObjDesc* var_10_1 = &this->objDesc;
005bdaee      class Archive** var_14 = &arg2;
005bdaef      SB_AsPackObj<1>::Serialize(eax_2, edx_2, id);
005bda80  }

005bdafc                                                                                      90 90 90 90                              ....

005bdb00  void __fastcall EyesStrip_CG::EyesStrip_CG(class EyesStrip_CG* this)

005bdb00  {
005bdb03      this->vtable = 0x79fa84;
005bdb0e      this->iconImage.id = INVALID_DID.id;
005bdb17      this->iconImage_Bald.id = INVALID_DID.id;
005bdb1d      ObjDesc::ObjDesc(&this->objDesc);
005bdb25      ObjDesc::ObjDesc(&this->objDesc_Bald);
005bdb00  }

005bdb2e                                            90 90                                                                ..

005bdb30  void __thiscall EyesStrip_CG::Serialize(class EyesStrip_CG* this, class Archive* arg2)

005bdb30  {
005bdb31      class Archive* esi = arg2;
005bdb3c      Archive::CheckAlignment(esi, 4);
005bdb45      uint8_t* eax = Archive::GetBytes(esi, 4);
005bdb45      
005bdb4c      if (eax != 0)
005bdb4c      {
005bdb52          if ((esi->m_flags & 1) == 0)
005bdb5d              this->iconImage.id = *(uint32_t*)eax;
005bdb52          else
005bdb57              *(uint32_t*)eax = this->iconImage.id;
005bdb4c      }
005bdb4c      
005bdb64      Archive::CheckAlignment(esi, 4);
005bdb6d      uint32_t* eax_1;
005bdb6d      uint32_t id;
005bdb6d      uint32_t edx_2;
005bdb6d      eax_1 = Archive::GetBytes(esi, 4);
005bdb6d      
005bdb74      if (eax_1 != 0)
005bdb74      {
005bdb7a          if ((esi->m_flags & 1) == 0)
005bdb7a          {
005bdb83              edx_2 = *(uint32_t*)eax_1;
005bdb85              this->iconImage_Bald.id = edx_2;
005bdb7a          }
005bdb7a          else
005bdb7a          {
005bdb7c              id = this->iconImage_Bald.id;
005bdb7f              *(uint32_t*)eax_1 = id;
005bdb7a          }
005bdb74      }
005bdb74      
005bdb88      class Archive* var_c = esi;
005bdb8c      class Sex_CG** var_10 = &this->objDesc.vtable;
005bdb91      class Archive** var_14 = &arg2;
005bdb92      class Sex_CG** eax_3;
005bdb92      class Archive* ecx_5;
005bdb92      class ObjDesc* edx_3;
005bdb92      eax_3 = SB_AsPackObj<1>::Serialize(&this->objDesc.vtable, edx_2, id);
005bdb97      class Archive* var_18 = esi;
005bdb9f      class ObjDesc* var_1c = &this->objDesc_Bald;
005bdba0      class Archive** var_20 = &arg2;
005bdba1      SB_AsPackObj<1>::Serialize(eax_3, edx_3, ecx_5);
005bdb30  }

005bdbae                                            90 90                                                                ..

005bdbb0  void __fastcall FaceStrip_CG::FaceStrip_CG(class FaceStrip_CG* this)

005bdbb0  {
005bdbb3      this->vtable = 0x79fa88;
005bdbc1      this->iconImage.id = INVALID_DID.id;
005bdbc4      ObjDesc::ObjDesc(&this->objDesc);
005bdbb0  }

005bdbcd                                         90 90 90                                                               ...

005bdbd0  void __thiscall FaceStrip_CG::Serialize(class FaceStrip_CG* this, class Archive* arg2)

005bdbd0  {
005bdbd2      class Archive* edi = arg2;
005bdbdc      Archive::CheckAlignment(edi, 4);
005bdbe5      uint32_t* eax;
005bdbe5      uint32_t id;
005bdbe5      uint32_t edx;
005bdbe5      eax = Archive::GetBytes(edi, 4);
005bdbe5      
005bdbec      if (eax != 0)
005bdbec      {
005bdbf2          if ((edi->m_flags & 1) == 0)
005bdbf2          {
005bdbfb              edx = *(uint32_t*)eax;
005bdbfd              this->iconImage.id = edx;
005bdbf2          }
005bdbf2          else
005bdbf2          {
005bdbf4              id = this->iconImage.id;
005bdbf7              *(uint32_t*)eax = id;
005bdbf2          }
005bdbec      }
005bdbec      
005bdc00      class Archive* var_c = edi;
005bdc08      class ObjDesc* var_10 = &this->objDesc;
005bdc09      class Archive** var_14 = &arg2;
005bdc0a      SB_AsPackObj<1>::Serialize(eax, edx, id);
005bdbd0  }

005bdc17                                                                       90 90 90 90 90 90 90 90 90                         .........

005bdc20  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>* this, uint32_t arg2)

005bdc20  {
005bdc23      class HashTableData<unsigned long,HeritageGroup_CG>** m_buckets = this->m_buckets;
005bdc2b      this->vtable = 0x7e76d0;
005bdc2b      
005bdc31      if (m_buckets != &this->m_aInplaceBuckets)
005bdc34          operator delete[](m_buckets);
005bdc34      
005bdc3e      this->m_buckets = nullptr;
005bdc41      this->m_firstInterestingBucket = nullptr;
005bdc44      this->m_numBuckets = 0;
005bdc47      this->m_numElements = 0;
005bdc47      
005bdc4f      if ((arg2 & 1) != 0)
005bdc52          operator delete(this);
005bdc52      
005bdc5d      return this;
005bdc20  }


005bdc60  class Style_CG& __thiscall Style_CG::operator=(class Style_CG* this, class Style_CG const& arg2)

005bdc60  {
005bdc68      class PSRefBufferCharData<char>* m_charbuffer = this->name.m_charbuffer;
005bdc68      
005bdc6e      if (m_charbuffer != arg2->name.m_charbuffer)
005bdc6e      {
005bdc84          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005bdc8c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005bdc8c          
005bdc8e          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->name.m_charbuffer;
005bdc91          this->name.m_charbuffer = m_charbuffer_1;
005bdc98          InterlockedIncrement(&m_charbuffer_1[-1]);
005bdc6e      }
005bdc6e      
005bdca2      this->clothingTable.id = arg2->clothingTable.id;
005bdca9      this->weenieDefault.id = arg2->weenieDefault.id;
005bdcaf      return this;
005bdc60  }

005bdcb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005bdcc0  uint8_t __fastcall SmartArray<Position,1>::shrink(class SmartArray<Position,1>* this)

005bdcc0  {
005bdcc0      class SmartArray<Position,1>* this_1 = this;
005bdcc8      uint32_t m_num_1 = this->m_num;
005bdcd2      class Frame* eax_1;
005bdcd2      
005bdcd2      if (m_num_1 == (this->m_sizeAndDeallocate & 0x7fffffff))
005bdcd2      {
005bdcd5          eax_1 = 0;
005bdcd9          return 0;
005bdcd2      }
005bdcd2      
005bdcdd      if (m_num_1 <= 0)
005bdd58          this_1 = nullptr;
005bdcdd      else
005bdcdd      {
005bdcea          uint32_t* eax_2 = operator new[](((m_num_1 * 0x48) + 4));
005bdcf4          void* this_2;
005bdcf4          
005bdcf4          if (eax_2 != 0)
005bdcf4          {
005bdcfc              this_2 = &eax_2[1];
005bdd02              *(uint32_t*)eax_2 = m_num_1;
005bdd04              `vector constructor iterator'(this_2, 0x48, m_num_1, Position::Position);
005bdd0d              this_1 = this_2;
005bdcf4          }
005bdcf4          
005bdd11          if ((eax_2 == 0 || this_2 == 0))
005bdd11          {
005bdd53              eax_2 = 0;
005bdd57              return 0;
005bdd11          }
005bdd11          
005bdd13          uint32_t m_num = this->m_num;
005bdd13          
005bdd17          if ((m_num - 1) >= 0)
005bdd17          {
005bdd22              void* esi = (((char*)this_2 + ((m_num - 1) * 0x48)) + 8);
005bdd28              void* __offset(Frame, 0x1) ebp_1 = m_num;
005bdd4c              void* __offset(Frame, 0x1) i;
005bdd4c              
005bdd4c              do
005bdd4c              {
005bdd35                  void* eax_4 = (((0xfffffff8 - this_2) + esi) + this->m_data);
005bdd3d                  *(uint32_t*)((char*)esi - 4) = *(uint32_t*)((char*)eax_4 + 4);
005bdd43                  Frame::operator=(esi, ((char*)eax_4 + 8));
005bdd48                  esi -= 0x48;
005bdd4b                  i = ebp_1;
005bdd4b                  ebp_1 -= 1;
005bdd4c              } while (i != 1);
005bdd17          }
005bdcdd      }
005bdcdd      
005bdd6f      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bdd6f      {
005bdd71          class Position* m_data = this->m_data;
005bdd71          
005bdd75          if (m_data != 0)
005bdd75          {
005bdd7f              if (m_data->vtable == 0)
005bdd8a                  operator delete[](((char*)m_data - 4));
005bdd7f              else
005bdd81                  m_data->vtable->__vecDelDtor(3);
005bdd75          }
005bdd6f      }
005bdd6f      
005bdd99      uint32_t edx_7 = (this->m_num | 0x80000000);
005bdda0      this->m_data = this_1;
005bdda2      this->m_sizeAndDeallocate = edx_7;
005bdda6      eax_1 = 1;
005bddaa      return 1;
005bdcc0  }

005bdd2d                                         8d 49 00                                                               .I.
005bddab                                   90 90 90 90 90                                                             .....

005bddb0  uint8_t __thiscall SmartArray<Skill_CG,1>::grow(class SmartArray<Skill_CG,1>* this, uint32_t arg2)

005bddb0  {
005bddb8      uint32_t edi = arg2;
005bddbe      uint32_t eax;
005bddbe      
005bddbe      if (edi >= this->m_num)
005bddbe      {
005bddce          if (edi <= (this->m_sizeAndDeallocate & 0x7fffffff))
005bddce          {
005bdea5              eax = 1;
005bdea8              return 1;
005bddce          }
005bddce          
005bddd6          if (edi == 0)
005bddd6          {
005bddd8              SmartArray<Skill_CG,1>::Reset(this);
005bdddf              int32_t eax_2;
005bdddf              eax_2 = 1;
005bdde2              return 1;
005bddd6          }
005bddd6          
005bddee          eax = operator new[](((edi << 4) + 4));
005bddee          
005bddf8          if (eax != 0)
005bddf8          {
005bde04              void* ebx_1 = (eax + 4);
005bde0a              *(uint32_t*)eax = edi;
005bde0c              `vector constructor iterator'(ebx_1, 0x10, edi, Skill_CG::Skill_CG);
005bde0c              
005bde13              if (ebx_1 != 0)
005bde13              {
005bde1c                  if (this->m_data != 0)
005bde1c                  {
005bde1e                      uint32_t m_num = this->m_num;
005bde1e                      
005bde23                      if ((m_num - 1) >= 0)
005bde23                      {
005bde2a                          void* ecx_3 = ((((m_num - 1) << 4) + ebx_1) + 8);
005bde35                          int32_t edi_1 = m_num;
005bde54                          int32_t i;
005bde54                          
005bde54                          do
005bde54                          {
005bde3d                              void* eax_4 = (((0xfffffff8 - ebx_1) + ecx_3) + this->m_data);
005bde42                              *(uint32_t*)((char*)ecx_3 - 4) = *(uint32_t*)((char*)eax_4 + 4);
005bde48                              *(uint32_t*)ecx_3 = *(uint32_t*)((char*)eax_4 + 8);
005bde4d                              *(uint32_t*)((char*)ecx_3 + 4) = *(uint32_t*)((char*)eax_4 + 0xc);
005bde50                              ecx_3 -= 0x10;
005bde53                              i = edi_1;
005bde53                              edi_1 -= 1;
005bde54                          } while (i != 1);
005bde56                          edi = arg2;
005bde23                      }
005bde23                      
005bde69                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bde69                      {
005bde6b                          class Skill_CG* m_data = this->m_data;
005bde6b                          
005bde6f                          if (m_data != 0)
005bde6f                          {
005bde71                              int32_t vtable = m_data->vtable;
005bde7c                              void* eax_7 = &m_data[vtable];
005bde7c                              
005bde7f                              if ((vtable - 1) >= 0)
005bde7f                              {
005bde81                                  int32_t ecx_7 = vtable;
005bde8c                                  int32_t i_1;
005bde8c                                  
005bde8c                                  do
005bde8c                                  {
005bde82                                      eax_7 -= 0x10;
005bde85                                      i_1 = ecx_7;
005bde85                                      ecx_7 -= 1;
005bde86                                      *(uint32_t*)eax_7 = 0x79fa7c;
005bde8c                                  } while (i_1 != 1);
005bde7f                              }
005bde7f                              
005bde8f                              operator delete[](((char*)m_data - 4));
005bde6f                          }
005bde69                      }
005bde1c                  }
005bde1c                  
005bde9e                  this->m_data = ebx_1;
005bdea0                  this->m_sizeAndDeallocate = (edi | 0x80000000);
005bdea5                  eax = 1;
005bdea8                  return 1;
005bde13              }
005bddf8          }
005bddbe      }
005bddbe      
005bdead      eax = 0;
005bdeb0      return 0;
005bddb0  }

005bdeb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005bdec0  uint8_t __fastcall SmartArray<Skill_CG,1>::shrink(class SmartArray<Skill_CG,1>* this)

005bdec0  {
005bdec7      uint32_t m_num_2 = this->m_num;
005bded1      int32_t eax_1;
005bded1      
005bded1      if (m_num_2 == (this->m_sizeAndDeallocate & 0x7fffffff))
005bded1      {
005bded4          eax_1 = 0;
005bded7          return 0;
005bded1      }
005bded1      
005bdedb      void* edi_1;
005bdedb      
005bdedb      if (m_num_2 <= 0)
005bdf4a          edi_1 = nullptr;
005bdedb      else
005bdedb      {
005bdee6          uint32_t* eax_2 = operator new[](((m_num_2 << 4) + 4));
005bdee6          
005bdef0          if (eax_2 != 0)
005bdef0          {
005bdef8              edi_1 = &eax_2[1];
005bdefe              *(uint32_t*)eax_2 = m_num_2;
005bdf00              `vector constructor iterator'(edi_1, 0x10, m_num_2, Skill_CG::Skill_CG);
005bdef0          }
005bdef0          
005bdf07          if ((eax_2 == 0 || edi_1 == 0))
005bdf07          {
005bdf46              eax_2 = 0;
005bdf49              return 0;
005bdf07          }
005bdf07          
005bdf09          uint32_t m_num = this->m_num;
005bdf09          
005bdf0d          if ((m_num - 1) >= 0)
005bdf0d          {
005bdf14              void* ecx_3 = ((((m_num - 1) << 4) + edi_1) + 8);
005bdf1f              int32_t esi = m_num;
005bdf3f              int32_t i;
005bdf3f              
005bdf3f              do
005bdf3f              {
005bdf28                  void* eax_4 = (((0xfffffff8 - edi_1) + ecx_3) + this->m_data);
005bdf2d                  *(uint32_t*)((char*)ecx_3 - 4) = *(uint32_t*)((char*)eax_4 + 4);
005bdf33                  *(uint32_t*)ecx_3 = *(uint32_t*)((char*)eax_4 + 8);
005bdf38                  *(uint32_t*)((char*)ecx_3 + 4) = *(uint32_t*)((char*)eax_4 + 0xc);
005bdf3b                  ecx_3 -= 0x10;
005bdf3e                  i = esi;
005bdf3e                  esi -= 1;
005bdf3f              } while (i != 1);
005bdf0d          }
005bdedb      }
005bdedb      
005bdf5b      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bdf5b      {
005bdf5d          class Skill_CG* m_data = this->m_data;
005bdf5d          
005bdf61          if (m_data != 0)
005bdf61          {
005bdf63              int32_t vtable = m_data->vtable;
005bdf6e              void* eax_7 = &m_data[vtable];
005bdf6e              
005bdf71              if ((vtable - 1) >= 0)
005bdf71              {
005bdf73                  int32_t ecx_7 = vtable;
005bdf7e                  int32_t i_1;
005bdf7e                  
005bdf7e                  do
005bdf7e                  {
005bdf74                      eax_7 -= 0x10;
005bdf77                      i_1 = ecx_7;
005bdf77                      ecx_7 -= 1;
005bdf78                      *(uint32_t*)eax_7 = 0x79fa7c;
005bdf7e                  } while (i_1 != 1);
005bdf71              }
005bdf71              
005bdf81              operator delete[](((char*)m_data - 4));
005bdf61          }
005bdf5b      }
005bdf5b      
005bdf89      uint32_t m_num_1 = this->m_num;
005bdf8c      this->m_data = edi_1;
005bdf96      this->m_sizeAndDeallocate = (m_num_1 | 0x80000000);
005bdf99      eax_1 = 1;
005bdf9c      return 1;
005bdec0  }

005bdf9d                                                                                         90 90 90                               ...

005bdfa0  uint8_t __fastcall SmartArray<IDClass<_tagDataID,32,0>,1>::shrink(class SmartArray<IDClass<_tagDataID,32,0>,1>* this)

005bdfa0  {
005bdfa7      uint32_t m_num_2 = this->m_num;
005bdfb1      uint32_t* eax_1;
005bdfb1      
005bdfb1      if (m_num_2 != (this->m_sizeAndDeallocate & 0x7fffffff))
005bdfb1      {
005bdfb5          void* edi;
005bdfb5          
005bdfb5          if (m_num_2 <= 0)
005bdfb5          {
005be004              edi = nullptr;
005be015          label_5be015:
005be015              
005be015              if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be015              {
005be017                  class IDClass<_tagDataID,32,0>* m_data = this->m_data;
005be017                  
005be01b                  if (m_data != 0)
005be021                      operator delete[](&m_data[-1]);
005be015              }
005be015              
005be029              uint32_t m_num_1 = this->m_num;
005be02c              this->m_data = edi;
005be033              this->m_sizeAndDeallocate = (m_num_1 | 0x80000000);
005be037              uint32_t eax_4;
005be037              eax_4 = 1;
005be03a              return 1;
005bdfb5          }
005bdfb5          
005bdfbf          eax_1 = operator new[](((m_num_2 << 2) + 4));
005bdfbf          
005bdfc9          if (eax_1 != 0)
005bdfc9          {
005bdfd8              *(uint32_t*)eax_1 = m_num_2;
005bdfda              `vector constructor iterator'(&eax_1[1], 4, m_num_2, Vector3::Vector3);
005bdfdf              edi = &eax_1[1];
005bdfdf              
005bdfe4              if (edi != 0)
005bdfe4              {
005bdfe6                  uint32_t m_num = this->m_num;
005bdfe9                  int32_t eax_2 = (m_num - 1);
005bdfe9                  
005bdfea                  if ((m_num - 1) >= 0)
005bdfea                  {
005bdffb                      int32_t temp1_1;
005bdffb                      
005bdffb                      do
005bdffb                      {
005bdff0                          temp1_1 = eax_2;
005bdff0                          eax_2 -= 1;
005bdff7                          *(uint32_t*)(((char*)edi + (eax_2 << 2)) + 4) = this->m_data[(eax_2 + 1)].id;
005bdffb                      } while ((temp1_1 - 1) >= 0);
005bdfea                  }
005bdfea                  
005bdfea                  goto label_5be015;
005bdfe4              }
005bdfc9          }
005bdfb1      }
005bdfb1      
005be000      eax_1 = 0;
005be003      return 0;
005bdfa0  }

005be03b                                                                                   90 90 90 90 90                             .....

005be040  uint8_t __fastcall SmartArray<HairStyle_CG,1>::shrink(class SmartArray<HairStyle_CG,1>* this)

005be040  {
005be040      class SmartArray<HairStyle_CG,1>* this_1 = this;
005be048      uint32_t m_num_1 = this->m_num;
005be048      
005be052      if (m_num_1 == (this->m_sizeAndDeallocate & 0x7fffffff))
005be052      {
005be055          int32_t eax_1;
005be055          eax_1 = 0;
005be059          return 0;
005be052      }
005be052      
005be05e      class SmartArray<HairStyle_CG,1>* this_2;
005be05e      
005be05e      if (m_num_1 <= 0)
005be05e      {
005be0e5          this_1 = nullptr;
005be0ed          this_2 = this_1;
005be05e      }
005be05e      else
005be05e      {
005be06d          this_2 = operator new[](((m_num_1 * 0x3c) + 4));
005be06d          
005be077          if (this_2 == 0)
005be077          {
005be0e0              this_2 = 0;
005be0e4              return 0;
005be077          }
005be077          
005be085          this_2->m_data = m_num_1;
005be087          `vector constructor iterator'(&this_2->m_sizeAndDeallocate, 0x3c, m_num_1, HairStyle_CG::HairStyle_CG);
005be08c          this_2 = &this_2->m_sizeAndDeallocate;
005be090          this_1 = this_2;
005be090          
005be094          if (this_2 == 0)
005be094          {
005be0e0              this_2 = 0;
005be0e4              return 0;
005be094          }
005be094          
005be096          uint32_t m_num = this->m_num;
005be096          
005be09a          if ((m_num - 1) >= 0)
005be09a          {
005be0a8              void* esi = &this_2[((m_num - 1) * 5)].m_num;
005be0ac              int32_t ebx_2 = m_num;
005be0d9              int32_t i;
005be0d9              
005be0d9              do
005be0d9              {
005be0b6                  void* eax_3 = (((0xfffffff8 - this_2) + esi) + this->m_data);
005be0bb                  *(uint32_t*)((char*)esi - 4) = *(uint32_t*)((char*)eax_3 + 4);
005be0be                  int32_t edx_2;
005be0be                  edx_2 = *(uint8_t*)((char*)eax_3 + 8);
005be0c1                  *(uint8_t*)esi = edx_2;
005be0c9                  *(uint32_t*)((char*)esi + 4) = *(uint32_t*)((char*)eax_3 + 0xc);
005be0d0                  ObjDesc::operator=(((char*)esi + 8), ((char*)eax_3 + 0x10));
005be0d5                  esi -= 0x3c;
005be0d8                  i = ebx_2;
005be0d8                  ebx_2 -= 1;
005be0d9              } while (i != 1);
005be0ed              this_2 = this_1;
005be09a          }
005be05e      }
005be05e      
005be100      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be100      {
005be102          class HairStyle_CG* m_data = this->m_data;
005be102          
005be107          if (m_data != 0)
005be107          {
005be109              int32_t vtable = m_data->vtable;
005be114              void* esi_3 = ((vtable * 0x3c) + m_data);
005be114              
005be117              if ((vtable - 1) >= 0)
005be117              {
005be119                  int32_t edi_3 = vtable;
005be132                  int32_t i_1;
005be132                  
005be132                  do
005be132                  {
005be120                      esi_3 -= 0x3c;
005be126                      *(uint32_t*)esi_3 = 0x79fa80;
005be12c                      ObjDesc::~ObjDesc(((char*)esi_3 + 0x10));
005be131                      i_1 = edi_3;
005be131                      edi_3 -= 1;
005be132                  } while (i_1 != 1);
005be117              }
005be117              
005be135              operator delete[](((char*)m_data - 4));
005be13a              this_2 = this_1;
005be107          }
005be100      }
005be100      
005be141      this->m_data = this_2;
005be14e      this->m_sizeAndDeallocate = (this->m_num | 0x80000000);
005be152      uint32_t eax_7;
005be152      eax_7 = 1;
005be156      return 1;
005be040  }

005be157                                                                       90 90 90 90 90 90 90 90 90                         .........

005be160  uint8_t __fastcall SmartArray<EyesStrip_CG,1>::shrink(class SmartArray<EyesStrip_CG,1>* this)

005be160  {
005be16a      uint32_t m_num_1 = this->m_num;
005be16a      
005be178      if (m_num_1 == (this->m_sizeAndDeallocate & 0x7fffffff))
005be178      {
005be17b          int32_t eax_1;
005be17b          eax_1 = 0;
005be181          return 0;
005be178      }
005be178      
005be186      uint32_t* var_8_1;
005be186      uint32_t* eax_2;
005be186      
005be186      if (m_num_1 <= 0)
005be186      {
005be21a          var_8_1 = nullptr;
005be222          eax_2 = var_8_1;
005be186      }
005be186      else
005be186      {
005be195          eax_2 = operator new[](((m_num_1 * 0x64) + 4));
005be195          
005be19f          if (eax_2 == 0)
005be19f          {
005be213              eax_2 = 0;
005be219              return 0;
005be19f          }
005be19f          
005be1ad          *(uint32_t*)eax_2 = m_num_1;
005be1af          `vector constructor iterator'(&eax_2[1], 0x64, m_num_1, EyesStrip_CG::EyesStrip_CG);
005be1b4          eax_2 = &eax_2[1];
005be1b8          var_8_1 = eax_2;
005be1b8          
005be1bc          if (eax_2 == 0)
005be1bc          {
005be213              eax_2 = 0;
005be219              return 0;
005be1bc          }
005be1bc          
005be1be          uint32_t m_num = this->m_num;
005be1be          
005be1c2          if ((m_num - 1) >= 0)
005be1c2          {
005be1d0              void* edi_2 = &eax_2[(((m_num - 1) * 0x19) + 2)];
005be1d4              int32_t ebp_2 = m_num;
005be208              int32_t i;
005be208              
005be208              do
005be208              {
005be1d9                  class EyesStrip_CG* m_data_1 = this->m_data;
005be1db                  void* esi = ((0xfffffff8 - eax_2) + edi_2);
005be1e2                  void* esi_1 = ((char*)esi + m_data_1);
005be1e4                  *(uint32_t*)((char*)edi_2 - 4) = *(uint32_t*)(&m_data_1->iconImage + esi);
005be1f1                  *(uint32_t*)edi_2 = *(uint32_t*)((char*)esi_1 + 8);
005be1f3                  ObjDesc::operator=(((char*)edi_2 + 4), ((char*)esi_1 + 0xc));
005be1ff                  ObjDesc::operator=(((char*)edi_2 + 0x30), ((char*)esi_1 + 0x38));
005be204                  edi_2 -= 0x64;
005be207                  i = ebp_2;
005be207                  ebp_2 -= 1;
005be208              } while (i != 1);
005be222              eax_2 = var_8_1;
005be1c2          }
005be186      }
005be186      
005be235      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be235      {
005be237          class EyesStrip_CG* m_data = this->m_data;
005be237          
005be23b          if (m_data != 0)
005be23b          {
005be23d              int32_t vtable = m_data->vtable;
005be248              void* esi_5 = ((vtable * 0x64) + m_data);
005be248              
005be24b              if ((vtable - 1) >= 0)
005be24b              {
005be24d                  int32_t edi_3 = vtable;
005be26a                  int32_t i_1;
005be26a                  
005be26a                  do
005be26a                  {
005be250                      esi_5 -= 0x64;
005be256                      *(uint32_t*)esi_5 = 0x79fa84;
005be25c                      ObjDesc::~ObjDesc(((char*)esi_5 + 0x38));
005be264                      ObjDesc::~ObjDesc(((char*)esi_5 + 0xc));
005be269                      i_1 = edi_3;
005be269                      edi_3 -= 1;
005be26a                  } while (i_1 != 1);
005be24b              }
005be24b              
005be26d              operator delete[](((char*)m_data - 4));
005be272              eax_2 = var_8_1;
005be23b          }
005be235      }
005be235      
005be27e      uint32_t edx_5 = (this->m_num | 0x80000000);
005be284      this->m_data = eax_2;
005be287      this->m_sizeAndDeallocate = edx_5;
005be28a      eax_2 = 1;
005be290      return 1;
005be160  }

005be291                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005be2a0  uint8_t __fastcall SmartArray<FaceStrip_CG,1>::shrink(class SmartArray<FaceStrip_CG,1>* this)

005be2a0  {
005be2a0      class SmartArray<FaceStrip_CG,1>* this_1 = this;
005be2a8      uint32_t m_num_1 = this->m_num;
005be2a8      
005be2b2      if (m_num_1 == (this->m_sizeAndDeallocate & 0x7fffffff))
005be2b2      {
005be2b5          int32_t eax_1;
005be2b5          eax_1 = 0;
005be2b9          return 0;
005be2b2      }
005be2b2      
005be2be      class SmartArray<FaceStrip_CG,1>* this_2;
005be2be      
005be2be      if (m_num_1 <= 0)
005be2be      {
005be339          this_1 = nullptr;
005be341          this_2 = this_1;
005be2be      }
005be2be      else
005be2be      {
005be2c9          this_2 = operator new[](((m_num_1 * 0x34) + 4));
005be2c9          
005be2d3          if (this_2 == 0)
005be2d3          {
005be334              this_2 = 0;
005be338              return 0;
005be2d3          }
005be2d3          
005be2e1          this_2->m_data = m_num_1;
005be2e3          `vector constructor iterator'(&this_2->m_sizeAndDeallocate, 0x34, m_num_1, FaceStrip_CG::FaceStrip_CG);
005be2e8          this_2 = &this_2->m_sizeAndDeallocate;
005be2ec          this_1 = this_2;
005be2ec          
005be2f0          if (this_2 == 0)
005be2f0          {
005be334              this_2 = 0;
005be338              return 0;
005be2f0          }
005be2f0          
005be2f2          uint32_t m_num = this->m_num;
005be2f2          
005be2f6          if ((m_num - 1) >= 0)
005be2f6          {
005be304              void* esi = &&this_2->m_num[((m_num - 1) * 0xd)];
005be308              int32_t ebx_2 = m_num;
005be32d              int32_t i;
005be32d              
005be32d              do
005be32d              {
005be316                  void* eax_3 = (((0xfffffff8 - this_2) + esi) + this->m_data);
005be31e                  *(uint32_t*)((char*)esi - 4) = *(uint32_t*)((char*)eax_3 + 4);
005be324                  ObjDesc::operator=(esi, ((char*)eax_3 + 8));
005be329                  esi -= 0x34;
005be32c                  i = ebx_2;
005be32c                  ebx_2 -= 1;
005be32d              } while (i != 1);
005be341              this_2 = this_1;
005be2f6          }
005be2be      }
005be2be      
005be354      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be354      {
005be356          class FaceStrip_CG* m_data = this->m_data;
005be356          
005be35b          if (m_data != 0)
005be35b          {
005be35d              int32_t vtable = m_data->vtable;
005be368              void* esi_3 = ((vtable * 0x34) + m_data);
005be368              
005be36b              if ((vtable - 1) >= 0)
005be36b              {
005be36d                  int32_t edi_3 = vtable;
005be382                  int32_t i_1;
005be382                  
005be382                  do
005be382                  {
005be370                      esi_3 -= 0x34;
005be376                      *(uint32_t*)esi_3 = 0x79fa88;
005be37c                      ObjDesc::~ObjDesc(((char*)esi_3 + 8));
005be381                      i_1 = edi_3;
005be381                      edi_3 -= 1;
005be382                  } while (i_1 != 1);
005be36b              }
005be36b              
005be385              operator delete[](((char*)m_data - 4));
005be38a              this_2 = this_1;
005be35b          }
005be354      }
005be354      
005be391      this->m_data = this_2;
005be39e      this->m_sizeAndDeallocate = (this->m_num | 0x80000000);
005be3a2      uint32_t eax_7;
005be3a2      eax_7 = 1;
005be3a6      return 1;
005be2a0  }

005be3a7                       90 90 90 90 90 90 90 90 90                                                         .........

005be3b0  uint8_t __fastcall SmartArray<MediaDesc *,1>::shrink(class SmartArray<MediaDesc *,1>* this)

005be3b0  {
005be3b6      uint32_t m_num = this->m_num;
005be3b6      
005be3c1      if (m_num == (this->m_sizeAndDeallocate & 0x7fffffff))
005be3c1      {
005be3c3          m_num = 0;
005be3c6          return 0;
005be3c1      }
005be3c1      
005be3ca      void* edi;
005be3ca      
005be3ca      if (m_num <= 0)
005be3fc          edi = nullptr;
005be3ca      else
005be3ca      {
005be3d9          edi = operator new[]((m_num << 2));
005be3d9          
005be3e0          if (edi == 0)
005be3e0          {
005be3f8              void* eax;
005be3f8              eax = 0;
005be3fb              return 0;
005be3e0          }
005be3e0          
005be3e2          uint32_t m_num_1 = this->m_num;
005be3e5          int32_t eax_1 = (m_num_1 - 1);
005be3e5          
005be3e6          if ((m_num_1 - 1) >= 0)
005be3e6          {
005be3f3              int32_t temp1_1;
005be3f3              
005be3f3              do
005be3f3              {
005be3e8                  temp1_1 = eax_1;
005be3e8                  eax_1 -= 1;
005be3ef                  *(uint32_t*)(((char*)edi + (eax_1 << 2)) + 4) = this->m_data[(eax_1 + 1)];
005be3f3              } while ((temp1_1 - 1) >= 0);
005be3e6          }
005be3ca      }
005be3ca      
005be40b      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be410          operator delete[](this->m_data);
005be410      
005be418      uint32_t m_num_2 = this->m_num;
005be41b      this->m_data = edi;
005be424      this->m_sizeAndDeallocate = (m_num_2 | 0x80000000);
005be427      int32_t eax_3;
005be427      eax_3 = 1;
005be42a      return 1;
005be3b0  }

005be42b                                   90 90 90 90 90                                                             .....

005be430  void SB_As32Bit_Compressed::Serialize(int32_t const* arg1, uint32_t* arg2, class Archive* arg3)

005be430  {
005be435      class Archive* esi = arg3;
005be439      char eax = esi->m_flags;
005be43e      uint8_t var_8;
005be43e      int32_t ebx;
005be43e      
005be43e      if ((eax & 1) != 0)
005be43e      {
005be448          uint32_t eax_1 = *(uint32_t*)arg2;
005be448          
005be44d          if (eax_1 > 0x7f)
005be44d          {
005be483              if (eax_1 > 0x3fff)
005be483              {
005be4b9                  uint32_t var_4 = eax_1;
005be4c8                  arg3 = (((int8_t)(eax_1 >> 0x18)) | 0xc0);
005be4cc                  var_8 = ((int8_t)(eax_1 >> 0x10));
005be4d0                  Serializer::SerializeObject(&arg3, esi);
005be4db                  Serializer::SerializeObject(&var_8, esi);
005be4e6                  Serializer::SerializeObject(&var_4, esi);
005be4f3                  return;
005be483              }
005be483              
005be485              eax_1 = *(uint8_t*)((char*)arg2 + 1);
005be488              uint32_t* ecx_1;
005be488              ecx_1 = *(uint8_t*)arg2;
005be48e              eax_1 |= 0x80;
005be491              arg3 = eax_1;
005be495              var_8 = ecx_1;
005be499              Serializer::SerializeObject(&arg3, esi);
005be4a4              Serializer::SerializeObject(&var_8, esi);
005be4b1              return;
005be44d          }
005be44d          
005be453          ebx = eax_1;
005be455          Archive::CheckAlignment(esi, 1);
005be45e          uint8_t* eax_2 = Archive::GetBytes(esi, 1);
005be45e          
005be46f          if ((eax_2 != 0 && (esi->m_flags & 1) != 0))
005be476              *(uint8_t*)eax_2 = ebx;
005be43e      }
005be43e      else if ((!(eax) & 1) != 0)
005be4f8      {
005be502          Archive::CheckAlignment(esi, 1);
005be50b          uint8_t* eax_3 = Archive::GetBytes(esi, 1);
005be50b          
005be512          if (eax_3 == 0)
005be526              ebx = arg3;
005be512          else if ((esi->m_flags & 1) == 0)
005be522              ebx = *(uint8_t*)eax_3;
005be518          else
005be518          {
005be51a              ebx = arg3;
005be51e              *(uint8_t*)eax_3 = ebx;
005be518          }
005be518          
005be52c          if (ebx < 0)
005be52c          {
005be534              Serializer::SerializeObject(&arg3, esi);
005be534              
005be53f              if ((ebx & 0x40) == 0)
005be53f              {
005be584                  *(uint32_t*)arg2 = (((ebx & 0x7f) << 8) | ((uint32_t)arg3));
005be58a                  return;
005be53f              }
005be53f              
005be547              Serializer::SerializeObject(&var_8, esi);
005be56b              *(uint32_t*)arg2 = (((((ebx & 0x3f) << 8) | ((uint32_t)arg3)) << 0x10) | ((uint32_t)var_8));
005be571              return;
005be52c          }
005be52c          
005be592          *(uint32_t*)arg2 = ((uint32_t)ebx);
005be4f8      }
005be430  }

005be59a                                                                                90 90 90 90 90 90                            ......

005be5a0  void* __thiscall Position::`vector deleting destructor'(class Position* this, uint32_t arg2)

005be5a0  {
005be5a0      char edx = arg2;
005be5a0      
005be5aa      if ((edx & 2) == 0)
005be5aa      {
005be5e4          this->vtable = 0x79285c;
005be5e4          
005be5ea          if ((edx & 1) != 0)
005be5ed              operator delete(this);
005be5ed          
005be5f8          return this;
005be5aa      }
005be5aa      
005be5ac      int32_t vtable = this->vtable;
005be5b7      void* eax_1 = &this[vtable];
005be5b7      
005be5ba      if ((vtable - 1) >= 0)
005be5ba      {
005be5bd          int32_t ecx_2 = vtable;
005be5ca          int32_t i;
005be5ca          
005be5ca          do
005be5ca          {
005be5c0              eax_1 -= 0x48;
005be5c3              i = ecx_2;
005be5c3              ecx_2 -= 1;
005be5c4              *(uint32_t*)eax_1 = 0x79285c;
005be5ca          } while (i != 1);
005be5ba      }
005be5ba      
005be5cf      if ((edx & 1) != 0)
005be5d2          operator delete[](((char*)this - 4));
005be5d2      
005be5de      return ((char*)this - 4);
005be5a0  }

005be5fb                                                                                   90 90 90 90 90                             .....

005be600  void __fastcall SmartArray<Position,1>::Reset(class SmartArray<Position,1>* this)

005be600  {
005be607      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005be61a      this->m_num = 0;
005be61a      
005be61d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be61d      {
005be61f          class Position* m_data = this->m_data;
005be61f          
005be623          if (m_data != 0)
005be623          {
005be62d              if (m_data->vtable != 0)
005be62d              {
005be62f                  m_data->vtable->__vecDelDtor(3);
005be635                  this->m_data = 0;
005be637                  this->m_sizeAndDeallocate = 0;
005be63f                  return;
005be62d              }
005be62d              
005be641              operator delete[](((char*)m_data - 4));
005be623          }
005be623          
005be649          this->m_data = 0;
005be64b          this->m_sizeAndDeallocate = 0;
005be653          return;
005be61d      }
005be61d      
005be656      if (this->m_data != 0)
005be656      {
005be65c          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
005be65c          
005be662          if ((i_2 - 1) >= 0)
005be662          {
005be66c              int32_t esi_2 = ((i_2 - 1) * 0x48);
005be66f              int32_t i_1 = i_2;
005be6e7              int32_t i;
005be6e7              
005be6e7              do
005be6e7              {
005be676                  int32_t var_48_1 = 0x796910;
005be686                  int32_t var_40 = 0x3f800000;
005be68e                  int32_t var_3c_1 = 0;
005be696                  int32_t var_38_1 = 0;
005be69e                  int32_t var_34_1 = 0;
005be6a6                  int32_t var_c_1 = 0;
005be6ae                  int32_t var_8_1 = 0;
005be6b6                  int32_t var_4_1 = 0;
005be6be                  Frame::cache(&var_40);
005be6c9                  void* eax_3 = (this->m_data + esi_2);
005be6cf                  *(uint32_t*)((char*)eax_3 + 4) = 0;
005be6d6                  Frame::operator=(((char*)eax_3 + 8), &var_40);
005be6db                  esi_2 -= 0x48;
005be6de                  i = i_1;
005be6de                  i_1 -= 1;
005be6df                  int32_t var_48_2 = 0x79285c;
005be6e7              } while (i != 1);
005be662          }
005be656      }
005be600  }


005be6f0  void __fastcall SmartArray<HairStyle_CG,1>::Reset(class SmartArray<HairStyle_CG,1>* this)

005be6f0  {
005be6f8      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005be709      this->m_num = 0;
005be709      
005be710      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be710      {
005be712          class HairStyle_CG* m_data = this->m_data;
005be712          
005be716          if (m_data != 0)
005be716          {
005be718              int32_t vtable = m_data->vtable;
005be723              void* esi_3 = ((vtable * 0x3c) + m_data);
005be723              
005be72a              if ((vtable - 1) >= 0)
005be72a              {
005be72c                  int32_t ebp_1 = vtable;
005be742                  int32_t i;
005be742                  
005be742                  do
005be742                  {
005be730                      esi_3 -= 0x3c;
005be736                      *(uint32_t*)esi_3 = 0x79fa80;
005be73c                      ObjDesc::~ObjDesc(((char*)esi_3 + 0x10));
005be741                      i = ebp_1;
005be741                      ebp_1 -= 1;
005be742                  } while (i != 1);
005be72a              }
005be72a              
005be749              operator delete[](((char*)m_data - 4));
005be716          }
005be716          
005be751          this->m_data = 0;
005be757          this->m_sizeAndDeallocate = 0;
005be764          return;
005be710      }
005be710      
005be768      if (this->m_data != 0)
005be768      {
005be76a          int32_t i_3 = (m_sizeAndDeallocate & 0x7fffffff);
005be76a          
005be770          if ((i_3 - 1) >= 0)
005be770          {
005be774              int32_t esi_5 = ((i_3 - 1) * 0x3c);
005be777              int32_t i_2 = i_3;
005be7de              int32_t i_1;
005be7de              
005be7de              do
005be7de              {
005be780                  uint32_t id = INVALID_DID.id;
005be789                  int32_t var_3c_1 = 0x79fa80;
005be79e                  void var_2c;
005be79e                  ObjDesc::ObjDesc(&var_2c);
005be7a9                  void* eax_3 = (this->m_data + esi_5);
005be7ab                  *(uint32_t*)((char*)eax_3 + 4) = id;
005be7b2                  *(uint8_t*)((char*)eax_3 + 8) = 0;
005be7c1                  *(uint32_t*)((char*)eax_3 + 0xc) = id;
005be7c4                  ObjDesc::operator=(((char*)eax_3 + 0x10), &var_2c);
005be7cd                  int32_t var_3c_2 = 0x79fa80;
005be7d5                  ObjDesc::~ObjDesc(&var_2c);
005be7da                  esi_5 -= 0x3c;
005be7dd                  i_1 = i_2;
005be7dd                  i_2 -= 1;
005be7de              } while (i_1 != 1);
005be770          }
005be768      }
005be6f0  }

005be7e7                       90 90 90 90 90 90 90 90 90                                                         .........

005be7f0  void __fastcall SmartArray<EyesStrip_CG,1>::Reset(class SmartArray<EyesStrip_CG,1>* this)

005be7f0  {
005be7f6      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005be80a      this->m_num = 0;
005be80a      
005be811      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be811      {
005be813          class EyesStrip_CG* m_data = this->m_data;
005be813          
005be817          if (m_data != 0)
005be817          {
005be819              int32_t vtable = m_data->vtable;
005be824              void* esi_3 = ((vtable * 0x64) + m_data);
005be824              
005be827              if ((vtable - 1) >= 0)
005be827              {
005be829                  int32_t edi_1 = vtable;
005be84a                  int32_t i;
005be84a                  
005be84a                  do
005be84a                  {
005be830                      esi_3 -= 0x64;
005be836                      *(uint32_t*)esi_3 = 0x79fa84;
005be83c                      ObjDesc::~ObjDesc(((char*)esi_3 + 0x38));
005be844                      ObjDesc::~ObjDesc(((char*)esi_3 + 0xc));
005be849                      i = edi_1;
005be849                      edi_1 -= 1;
005be84a                  } while (i != 1);
005be827              }
005be827              
005be84d              operator delete[](((char*)m_data - 4));
005be817          }
005be817          
005be858          this->m_data = 0;
005be85e          this->m_sizeAndDeallocate = 0;
005be869          return;
005be811      }
005be811      
005be86d      if (this->m_data != 0)
005be86d      {
005be873          int32_t i_3 = (m_sizeAndDeallocate & 0x7fffffff);
005be873          
005be879          if ((i_3 - 1) >= 0)
005be879          {
005be87d              int32_t edi_3 = ((i_3 - 1) * 0x64);
005be880              int32_t i_2 = i_3;
005be8f4              int32_t i_1;
005be8f4              
005be8f4              do
005be8f4              {
005be883                  uint32_t id = INVALID_DID.id;
005be88c                  int32_t var_64_1 = 0x79fa84;
005be89c                  void var_58;
005be89c                  ObjDesc::ObjDesc(&var_58);
005be8a5                  void var_2c;
005be8a5                  ObjDesc::ObjDesc(&var_2c);
005be8b0                  void* esi_5 = (this->m_data + edi_3);
005be8b6                  *(uint32_t*)((char*)esi_5 + 4) = id;
005be8c1                  *(uint32_t*)((char*)esi_5 + 8) = id;
005be8c4                  ObjDesc::operator=(((char*)esi_5 + 0xc), &var_58);
005be8d1                  ObjDesc::operator=(((char*)esi_5 + 0x38), &var_2c);
005be8da                  int32_t var_64_2 = 0x79fa84;
005be8e2                  ObjDesc::~ObjDesc(&var_2c);
005be8eb                  ObjDesc::~ObjDesc(&var_58);
005be8f0                  edi_3 -= 0x64;
005be8f3                  i_1 = i_2;
005be8f3                  i_2 -= 1;
005be8f4              } while (i_1 != 1);
005be879          }
005be86d      }
005be7f0  }

005be8fe                                                                                            90 90                                ..

005be900  void __fastcall SmartArray<FaceStrip_CG,1>::Reset(class SmartArray<FaceStrip_CG,1>* this)

005be900  {
005be908      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005be919      this->m_num = 0;
005be919      
005be920      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005be920      {
005be922          class FaceStrip_CG* m_data = this->m_data;
005be922          
005be926          if (m_data != 0)
005be926          {
005be928              int32_t vtable = m_data->vtable;
005be933              void* esi_3 = ((vtable * 0x34) + m_data);
005be933              
005be93a              if ((vtable - 1) >= 0)
005be93a              {
005be93c                  int32_t ebx_1 = vtable;
005be952                  int32_t i;
005be952                  
005be952                  do
005be952                  {
005be940                      esi_3 -= 0x34;
005be946                      *(uint32_t*)esi_3 = 0x79fa88;
005be94c                      ObjDesc::~ObjDesc(((char*)esi_3 + 8));
005be951                      i = ebx_1;
005be951                      ebx_1 -= 1;
005be952                  } while (i != 1);
005be93a              }
005be93a              
005be959              operator delete[](((char*)m_data - 4));
005be926          }
005be926          
005be961          this->m_data = 0;
005be967          this->m_sizeAndDeallocate = 0;
005be974          return;
005be920      }
005be920      
005be978      if (this->m_data != 0)
005be978      {
005be97a          int32_t i_3 = (m_sizeAndDeallocate & 0x7fffffff);
005be97a          
005be980          if ((i_3 - 1) >= 0)
005be980          {
005be984              int32_t esi_5 = ((i_3 - 1) * 0x34);
005be98a              int32_t i_2 = i_3;
005be9d8              int32_t i_1;
005be9d8              
005be9d8              do
005be9d8              {
005be99a                  int32_t var_34_1 = 0x79fa88;
005be9a6                  void var_2c;
005be9a6                  ObjDesc::ObjDesc(&var_2c);
005be9b1                  void* eax_3 = (this->m_data + esi_5);
005be9b7                  *(uint32_t*)((char*)eax_3 + 4) = INVALID_DID.id;
005be9be                  ObjDesc::operator=(((char*)eax_3 + 8), &var_2c);
005be9c7                  int32_t var_34_2 = 0x79fa88;
005be9cf                  ObjDesc::~ObjDesc(&var_2c);
005be9d4                  esi_5 -= 0x34;
005be9d7                  i_1 = i_2;
005be9d7                  i_2 -= 1;
005be9d8              } while (i_1 != 1);
005be980          }
005be978      }
005be900  }

005be9e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005be9f0  void __fastcall ACCharGenStartArea::ACCharGenStartArea(class ACCharGenStartArea* this)

005be9f0  {
005be9f3      this->vtable = 0x7e76d4;
005be9f9      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005bea04      this->name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
005bea07      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
005bea0f      this->mPositionList.m_data = 0;
005bea12      this->mPositionList.m_sizeAndDeallocate = 0;
005bea15      this->mPositionList.m_num = 0;
005be9f0  }

005bea1c                                                                                      90 90 90 90                              ....

005bea20  void __fastcall ACCharGenStartArea::~ACCharGenStartArea(class ACCharGenStartArea* this)

005bea20  {
005bea23      this->vtable = 0x7e76d4;
005bea23      
005bea36      if ((this->mPositionList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bea36      {
005bea38          class Position* m_data = this->mPositionList.m_data;
005bea38          
005bea3d          if (m_data != 0)
005bea3d          {
005bea47              if (m_data->vtable == 0)
005bea52                  operator delete[](((char*)m_data - 4));
005bea47              else
005bea49                  m_data->vtable->__vecDelDtor(3);
005bea3d          }
005bea36      }
005bea36      
005bea5d      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = (this->name.m_charbuffer - 0x14);
005bea5d      
005bea70      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005bea78          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
005bea20  }

005bea7c                                                                                      90 90 90 90                              ....

005bea80  void __fastcall Style_CG::Style_CG(class Style_CG* this)

005bea80  {
005bea83      this->vtable = 0x79fe70;
005bea89      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005bea94      this->name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
005bea97      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
005beaa3      this->clothingTable.id = INVALID_DID.id;
005beaab      this->weenieDefault.id = INVALID_DID.id;
005bea80  }

005beab2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005beac0  void __fastcall Style_CG::Style_CG(class Style_CG* this, class Style_CG* arg2)

005beac0  {
005beac0      int32_t ebp;
005beac0      int32_t var_4 = ebp;
005beac7      int32_t esi;
005beac7      int32_t var_8 = esi;
005beaca      this->vtable = 0x79fe70;
005bead0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005bead7      void* edi;
005bead7      void* var_c = edi;
005beadb      void* __offset(PSRefBufferCharData<char>, -0x10) var_10 = ((char*)PStringBase<char>::s_NullBuffer_1 - 0x10);
005beadb      void* __offset(PSRefBufferCharData<char>, -0x10)* esp = &var_10;
005beadc      this->name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
005beadf      InterlockedIncrement(var_10);
005beae8      this->clothingTable.id = *(uint32_t*)((char*)__return_addr + 8);
005beaee      this->weenieDefault.id = *(uint32_t*)((char*)__return_addr + 0xc);
005beaf1      class PSRefBufferCharData<char>* m_charbuffer = this->name.m_charbuffer;
005beaf1      
005beaf7      if (m_charbuffer != *(uint32_t*)((char*)__return_addr + 4))
005beaf7      {
005beaf9          int32_t ebx;
005beaf9          int32_t var_14_1 = ebx;
005beaf9          
005beb0d          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005beb0d          {
005beb0f              int32_t edx_1 = *(int32_t*)((char*)m_charbuffer + -0x14);
005beb11              var_10 = 1;
005beb15              *(uint32_t*)edx_1(var_10);
005beb0d          }
005beb0d          
005beb17          class PStringBase<char> edi_2 = *(uint32_t*)((char*)__return_addr + 4);
005beb1a          this->name.m_charbuffer = edi_2;
005beb20          var_10 = (edi_2 - 0x10);
005beb21          InterlockedIncrement(var_10);
005beb23          esp = &var_c;
005beaf7      }
005beaf7      
005beb24      *(uint32_t*)esp;
005beb24      esp[1];
005beb24      esp[2];
005beac0  }

005beb2c                                      90 90 90 90                                                              ....

005beb30  void __fastcall Template_CG::Template_CG(class Template_CG* this)

005beb30  {
005beb33      this->vtable = 0x79fe78;
005beb39      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005beb44      this->name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
005beb47      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
005beb55      __builtin_memset(&this->titleID, 0, 0x1c);
005beb6a      this->iconImage.id = INVALID_DID.id;
005beb6d      __builtin_memset(&this->mNormalSkillsList, 0, 0x18);
005beb30  }

005beb83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005beb90  int32_t* __thiscall SmartArray<Skill_CG,1>::operator=(int32_t* arg1, int32_t* arg2)

005beb90  {
005bebae      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
005bebae      {
005bebcb      label_5bebcb:
005bebcb          void* eax_3 = *(uint32_t*)arg2;
005bebd2          void* ecx_5 = ((arg2[2] << 4) + eax_3);
005bebd2          
005bebd6          if (eax_3 < ecx_5)
005bebd6          {
005bebd8              void* edx_4 = (*(uint32_t*)arg1 + 8);
005bebd8              
005bebf9              do
005bebf9              {
005bebe3                  *(uint32_t*)((char*)edx_4 - 4) = *(uint32_t*)((char*)eax_3 + 4);
005bebe9                  *(uint32_t*)edx_4 = *(uint32_t*)((char*)eax_3 + 8);
005bebee                  *(uint32_t*)((char*)edx_4 + 4) = *(uint32_t*)((char*)eax_3 + 0xc);
005bebf1                  eax_3 += 0x10;
005bebf4                  edx_4 += 0x10;
005bebf9              } while (eax_3 < ecx_5);
005bebd6          }
005bebd6          
005bebfc          int32_t i = arg2[2];
005bebfc          
005bec02          if (i < arg1[2])
005bec02          {
005bec06              int32_t edx_6 = (i << 4);
005bec06              
005bec26              do
005bec26              {
005bec12                  void* eax_5 = (*(uint32_t*)arg1 + edx_6);
005bec14                  *(uint32_t*)((char*)eax_5 + 4) = 0;
005bec17                  *(uint32_t*)((char*)eax_5 + 8) = 0;
005bec1a                  *(uint32_t*)((char*)eax_5 + 0xc) = 0;
005bec20                  i += 1;
005bec21                  edx_6 += 0x10;
005bec26              } while (i < arg1[2]);
005bec02          }
005bec02          
005bec2b          arg1[2] = arg2[2];
005bebae      }
005bebae      else
005bebae      {
005bebb0          arg1[2] = 0;
005bebb0          
005bebc6          if (SmartArray<Skill_CG,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
005bebc6              goto label_5bebcb;
005bebae      }
005bebae      
005bec33      return arg1;
005beb90  }

005bec36                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005bec40  int32_t* __thiscall SmartArray<IDClass<_tagDataID,32,0>,1>::operator=(int32_t* arg1, int32_t* arg2)

005bec40  {
005bec5b      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
005bec5b      {
005bec79      label_5bec79:
005bec79          int32_t* eax_3 = *(uint32_t*)arg2;
005bec7e          void* edx_3 = &eax_3[arg2[2]];
005bec83          int32_t* ecx_4 = *(uint32_t*)arg1;
005bec83          
005bec85          while (eax_3 < edx_3)
005bec85          {
005bec8a              *(uint32_t*)ecx_4 = *(uint32_t*)eax_3;
005bec8c              eax_3 = &eax_3[1];
005bec8f              ecx_4 = &ecx_4[1];
005bec85          }
005bec85          
005bec9d          for (int32_t i = arg2[2]; i < arg1[2]; i += 1)
005beca5              *(uint32_t*)(*(uint32_t*)arg1 + (i << 2)) = arg2;
005beca5          
005becb3          arg1[2] = arg2[2];
005bec5b      }
005bec5b      else
005bec5b      {
005bec5d          arg1[2] = 0;
005bec5d          
005bec77          if (SmartArray<IDClass<_tagDataID,32,0>,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
005bec77              goto label_5bec79;
005bec5b      }
005bec5b      
005becba      return arg1;
005bec40  }

005becbd                                                                                         90 90 90                               ...

005becc0  void* __thiscall ACCharGenStartArea::`vector deleting destructor'(class ACCharGenStartArea* this, uint32_t arg2)

005becc0  {
005becc0      class ACCharGenStartArea* var_4 = this;
005becc0      
005becc9      if ((arg2 & 2) == 0)
005becc9      {
005bed6a          ACCharGenStartArea::~ACCharGenStartArea(this);
005bed6a          
005bed74          if ((arg2 & 1) != 0)
005bed77              operator delete(this);
005bed77          
005bed83          return this;
005becc9      }
005becc9      
005beccf      int32_t vtable = this->vtable;
005becdb      void* edi = &this[vtable];
005becdb      
005becde      if ((vtable - 1) >= 0)
005becde      {
005bece8          var_4 = vtable;
005bed4c          class ACCharGenStartArea* i;
005bed4c          
005bed4c          do
005bed4c          {
005becf0              edi -= 0x14;
005becf3              *(uint32_t*)edi = 0x7e76d4;
005becf3              
005bed08              if ((*(uint32_t*)((char*)edi + 0xc) & 0x80000000) == 0x80000000)
005bed08              {
005bed0a                  int32_t* ecx_1 = *(uint32_t*)((char*)edi + 8);
005bed0a                  
005bed0f                  if (ecx_1 != 0)
005bed0f                  {
005bed19                      if (ecx_1[-1] == 0)
005bed24                          operator delete[](&ecx_1[-1]);
005bed19                      else
005bed1f                          **(uint32_t**)ecx_1(3);
005bed0f                  }
005bed08              }
005bed08              
005bed2f              int32_t* esi_2 = (*(uint32_t*)((char*)edi + 4) - 0x14);
005bed2f              
005bed3e              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005bed46                  **(uint32_t**)esi_2(1);
005bed46              
005bed48              i = var_4;
005bed48              var_4 -= 1;
005bed4c          } while (i != 1);
005becde      }
005becde      
005bed54      if ((arg2 & 1) != 0)
005bed57          operator delete[](((char*)this - 4));
005bed57      
005bed65      return ((char*)this - 4);
005becc0  }

005bed86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005bed90  uint8_t __thiscall SmartArray<Position,1>::grow(class SmartArray<Position,1>* this, uint32_t arg2)

005bed90  {
005bed90      class SmartArray<Position,1>* this_1 = this;
005bed92      uint32_t ebp = arg2;
005bed9d      uint32_t* eax;
005bed9d      
005bed9d      if (ebp >= this->m_num)
005bed9d      {
005bedad          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
005bedad          {
005beea2              eax = 1;
005beea6              return 1;
005bedad          }
005bedad          
005bedb5          if (ebp == 0)
005bedb5          {
005bedb7              SmartArray<Position,1>::Reset(this);
005bedbe              int32_t eax_2;
005bedbe              eax_2 = 1;
005bedc2              return 1;
005bedb5          }
005bedb5          
005bedd1          eax = operator new[](((ebp * 0x48) + 4));
005bedd1          
005beddb          if (eax != 0)
005beddb          {
005bede7              void* this_2 = &eax[1];
005beded              *(uint32_t*)eax = ebp;
005bedef              this_1 = this_2;
005bedf3              `vector constructor iterator'(this_2, 0x48, ebp, Position::Position);
005bedf3              
005bedfa              if (this_2 != 0)
005bedfa              {
005bee03                  if (this->m_data != 0)
005bee03                  {
005bee09                      uint32_t m_num = this->m_num;
005bee09                      
005bee0d                      if ((m_num - 1) >= 0)
005bee0d                      {
005bee13                          void* esi_1 = (((char*)this_2 + ((m_num - 1) * 0x48)) + 8);
005bee23                          arg2 = m_num;
005bee4c                          bool cond:0_1;
005bee4c                          
005bee4c                          do
005bee4c                          {
005bee27                              class Position* m_data = this->m_data;
005bee29                              void* eax_5 = ((0xfffffff8 - this_1) + esi_1);
005bee38                              *(uint32_t*)((char*)esi_1 - 4) = *(uint32_t*)(&m_data->objcell_id + eax_5);
005bee3b                              Frame::operator=(esi_1, (&m_data->frame + eax_5));
005bee44                              esi_1 -= 0x48;
005bee47                              cond:0_1 = arg2 != 1;
005bee48                              arg2 -= 1;
005bee4c                          } while (cond:0_1);
005bee4e                          this_2 = this_1;
005bee0d                      }
005bee0d                      
005bee60                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bee60                      {
005bee62                          class Position* m_data_1 = this->m_data;
005bee62                          
005bee66                          if (m_data_1 != 0)
005bee66                          {
005bee70                              if (m_data_1->vtable != 0)
005bee70                              {
005bee72                                  m_data_1->vtable->__vecDelDtor(3);
005bee7e                                  this->m_data = this_2;
005bee80                                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
005bee85                                  int32_t eax_12;
005bee85                                  eax_12 = 1;
005bee89                                  return 1;
005bee70                              }
005bee70                              
005bee8d                              operator delete[](((char*)m_data_1 - 4));
005bee66                          }
005bee60                      }
005bee03                  }
005bee03                  
005bee9b                  this->m_data = this_2;
005bee9d                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
005beea2                  eax = 1;
005beea6                  return 1;
005bedfa              }
005beddb          }
005bed9d      }
005bed9d      
005beeab      eax = 0;
005beeaf      return 0;
005bed90  }

005beeb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005beec0  uint8_t __thiscall SmartArray<HairStyle_CG,1>::grow(class SmartArray<HairStyle_CG,1>* this, uint32_t arg2)

005beec0  {
005beec0      class SmartArray<HairStyle_CG,1>* this_1 = this;
005beec9      uint32_t edi = arg2;
005beecf      uint32_t eax;
005beecf      
005beecf      if (edi >= this->m_num)
005beecf      {
005beedf          if (edi <= (this->m_sizeAndDeallocate & 0x7fffffff))
005beedf          {
005befe6              eax = 1;
005befea              return 1;
005beedf          }
005beedf          
005beee7          if (edi == 0)
005beee7          {
005beee9              SmartArray<HairStyle_CG,1>::Reset(this);
005beef0              int32_t eax_2;
005beef0              eax_2 = 1;
005beef4              return 1;
005beee7          }
005beee7          
005bef00          eax = operator new[](((edi * 0x3c) + 4));
005bef00          
005bef0a          if (eax != 0)
005bef0a          {
005bef16              void* ebp_1 = (eax + 4);
005bef1c              *(uint32_t*)eax = edi;
005bef22              `vector constructor iterator'(ebp_1, 0x3c, edi, HairStyle_CG::HairStyle_CG);
005bef22              
005bef29              if (ebp_1 != 0)
005bef29              {
005bef32                  if (this->m_data != 0)
005bef32                  {
005bef38                      uint32_t m_num = this->m_num;
005bef38                      
005bef3d                      if ((m_num - 1) >= 0)
005bef3d                      {
005bef49                          void* esi_1 = ((((m_num - 1) * 0x3c) + ebp_1) + 8);
005bef4f                          int32_t ebp_2 = m_num;
005bef7a                          int32_t i;
005bef7a                          
005bef7a                          do
005bef7a                          {
005bef57                              void* eax_4 = (((0xfffffff8 - ebp_1) + esi_1) + this->m_data);
005bef5c                              *(uint32_t*)((char*)esi_1 - 4) = *(uint32_t*)((char*)eax_4 + 4);
005bef5f                              int32_t edx_2;
005bef5f                              edx_2 = *(uint8_t*)((char*)eax_4 + 8);
005bef62                              *(uint8_t*)esi_1 = edx_2;
005bef6a                              *(uint32_t*)((char*)esi_1 + 4) = *(uint32_t*)((char*)eax_4 + 0xc);
005bef71                              eax = ObjDesc::operator=(((char*)esi_1 + 8), ((char*)eax_4 + 0x10));
005bef76                              esi_1 -= 0x3c;
005bef79                              i = ebp_2;
005bef79                              ebp_2 -= 1;
005bef7a                          } while (i != 1);
005bef7c                          edi = arg2;
005bef3d                      }
005bef3d                      
005bef93                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bef93                      {
005bef95                          class HairStyle_CG* m_data = this->m_data;
005bef95                          
005bef99                          if (m_data != 0)
005bef99                          {
005bef9b                              int32_t vtable = m_data->vtable;
005befa6                              void* esi_4 = ((vtable * 0x3c) + m_data);
005befa6                              
005befad                              if ((vtable - 1) >= 0)
005befad                              {
005befb0                                  arg2 = vtable;
005befc9                                  uint32_t i_1;
005befc9                                  
005befc9                                  do
005befc9                                  {
005befb4                                      esi_4 -= 0x3c;
005befba                                      *(uint32_t*)esi_4 = 0x79fa80;
005befc0                                      ObjDesc::~ObjDesc(((char*)esi_4 + 0x10));
005befc5                                      i_1 = arg2;
005befc5                                      arg2 -= 1;
005befc9                                  } while (i_1 != 1);
005befad                              }
005befad                              
005befd0                              operator delete[](((char*)m_data - 4));
005bef99                          }
005bef93                      }
005bef32                  }
005bef32                  
005befdf                  this->m_data = ebp_1;
005befe1                  this->m_sizeAndDeallocate = (edi | 0x80000000);
005befe6                  eax = 1;
005befea                  return 1;
005bef29              }
005bef0a          }
005beecf      }
005beecf      
005befef      eax = 0;
005beff3      return 0;
005beec0  }

005beff6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005bf000  uint8_t __thiscall SmartArray<EyesStrip_CG,1>::grow(class SmartArray<EyesStrip_CG,1>* this, uint32_t arg2)

005bf000  {
005bf002      uint32_t ebp = arg2;
005bf00c      uint32_t* eax;
005bf00c      
005bf00c      if (ebp >= this->m_num)
005bf00c      {
005bf01c          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
005bf01c          {
005bf0ba              eax = 1;
005bf0bd              return 1;
005bf01c          }
005bf01c          
005bf024          if (ebp == 0)
005bf024          {
005bf026              SmartArray<EyesStrip_CG,1>::Reset(this);
005bf02d              int32_t eax_2;
005bf02d              eax_2 = 1;
005bf030              return 1;
005bf024          }
005bf024          
005bf03c          eax = operator new[](((ebp * 0x64) + 4));
005bf03c          
005bf046          if (eax != 0)
005bf046          {
005bf04e              void* ebx_1 = &eax[1];
005bf054              *(uint32_t*)eax = ebp;
005bf056              `vector constructor iterator'(ebx_1, 0x64, ebp, EyesStrip_CG::EyesStrip_CG);
005bf056              
005bf05d              if (ebx_1 != 0)
005bf05d              {
005bf062                  if (this->m_data != 0)
005bf062                  {
005bf064                      uint32_t m_num = this->m_num;
005bf064                      
005bf068                      if ((m_num - 1) >= 0)
005bf068                      {
005bf06d                          void* esi_2 = ((m_num - 1) * 0x64);
005bf071                          arg2 = m_num;
005bf08e                          bool cond:0_1;
005bf08e                          
005bf08e                          do
005bf08e                          {
005bf07d                              EyesStrip_CG::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
005bf086                              esi_2 -= 0x64;
005bf089                              cond:0_1 = arg2 != 1;
005bf08a                              arg2 -= 1;
005bf08e                          } while (cond:0_1);
005bf068                      }
005bf068                      
005bf09e                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bf09e                      {
005bf0a0                          class EyesStrip_CG* m_data = this->m_data;
005bf0a0                          
005bf0a4                          if (m_data != 0)
005bf0a8                              EyesStrip_CG::`vector deleting destructor'(m_data, 3);
005bf09e                      }
005bf062                  }
005bf062                  
005bf0b3                  this->m_data = ebx_1;
005bf0b5                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
005bf0ba                  eax = 1;
005bf0bd                  return 1;
005bf05d              }
005bf046          }
005bf00c      }
005bf00c      
005bf0c2      eax = 0;
005bf0c5      return 0;
005bf000  }

005bf0c8                          90 90 90 90 90 90 90 90                                                          ........

005bf0d0  uint8_t __thiscall SmartArray<FaceStrip_CG,1>::grow(class SmartArray<FaceStrip_CG,1>* this, uint32_t arg2)

005bf0d0  {
005bf0d0      class SmartArray<FaceStrip_CG,1>* this_1 = this;
005bf0d9      uint32_t edi = arg2;
005bf0df      uint32_t eax;
005bf0df      
005bf0df      if (edi >= this->m_num)
005bf0df      {
005bf0ef          if (edi <= (this->m_sizeAndDeallocate & 0x7fffffff))
005bf0ef          {
005bf1f2              eax = 1;
005bf1f6              return 1;
005bf0ef          }
005bf0ef          
005bf0f7          if (edi == 0)
005bf0f7          {
005bf0f9              SmartArray<FaceStrip_CG,1>::Reset(this);
005bf100              int32_t eax_2;
005bf100              eax_2 = 1;
005bf104              return 1;
005bf0f7          }
005bf0f7          
005bf110          eax = operator new[](((edi * 0x34) + 4));
005bf110          
005bf11a          if (eax != 0)
005bf11a          {
005bf126              void* ebp_1 = (eax + 4);
005bf12c              *(uint32_t*)eax = edi;
005bf132              `vector constructor iterator'(ebp_1, 0x34, edi, FaceStrip_CG::FaceStrip_CG);
005bf132              
005bf139              if (ebp_1 != 0)
005bf139              {
005bf142                  if (this->m_data != 0)
005bf142                  {
005bf148                      uint32_t m_num = this->m_num;
005bf148                      
005bf14d                      if ((m_num - 1) >= 0)
005bf14d                      {
005bf159                          void* esi_1 = ((((m_num - 1) * 0x34) + ebp_1) + 8);
005bf15f                          int32_t ebp_2 = m_num;
005bf17e                          int32_t i;
005bf17e                          
005bf17e                          do
005bf17e                          {
005bf167                              void* eax_4 = (((0xfffffff8 - ebp_1) + esi_1) + this->m_data);
005bf16f                              *(uint32_t*)((char*)esi_1 - 4) = *(uint32_t*)((char*)eax_4 + 4);
005bf175                              ObjDesc::operator=(esi_1, ((char*)eax_4 + 8));
005bf17a                              esi_1 -= 0x34;
005bf17d                              i = ebp_2;
005bf17d                              ebp_2 -= 1;
005bf17e                          } while (i != 1);
005bf180                          edi = arg2;
005bf14d                      }
005bf14d                      
005bf197                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bf197                      {
005bf199                          class FaceStrip_CG* m_data = this->m_data;
005bf199                          
005bf19d                          if (m_data != 0)
005bf19d                          {
005bf19f                              int32_t vtable = m_data->vtable;
005bf1aa                              void* esi_4 = ((vtable * 0x34) + m_data);
005bf1aa                              
005bf1b1                              if ((vtable - 1) >= 0)
005bf1b1                              {
005bf1b4                                  arg2 = vtable;
005bf1d5                                  uint32_t i_1;
005bf1d5                                  
005bf1d5                                  do
005bf1d5                                  {
005bf1c0                                      esi_4 -= 0x34;
005bf1c6                                      *(uint32_t*)esi_4 = 0x79fa88;
005bf1cc                                      ObjDesc::~ObjDesc(((char*)esi_4 + 8));
005bf1d1                                      i_1 = arg2;
005bf1d1                                      arg2 -= 1;
005bf1d5                                  } while (i_1 != 1);
005bf1b1                              }
005bf1b1                              
005bf1dc                              operator delete[](((char*)m_data - 4));
005bf19d                          }
005bf197                      }
005bf142                  }
005bf142                  
005bf1eb                  this->m_data = ebp_1;
005bf1ed                  this->m_sizeAndDeallocate = (edi | 0x80000000);
005bf1f2                  eax = 1;
005bf1f6                  return 1;
005bf139              }
005bf11a          }
005bf0df      }
005bf0df      
005bf1fb      eax = 0;
005bf1ff      return 0;
005bf0d0  }

005bf1ba                                                                                8d 9b 00 00 00 00                            ......
005bf202        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005bf210  uint8_t __fastcall SmartArray<Style_CG,1>::shrink(class SmartArray<Style_CG,1>* this)

005bf210  {
005bf217      uint32_t m_num_2 = this->m_num;
005bf217      
005bf221      if (m_num_2 == (this->m_sizeAndDeallocate & 0x7fffffff))
005bf221      {
005bf224          int32_t eax_1;
005bf224          eax_1 = 0;
005bf227          return 0;
005bf221      }
005bf221      
005bf22b      void* ebx_1;
005bf22b      
005bf22b      if (m_num_2 <= 0)
005bf284          ebx_1 = nullptr;
005bf22b      else
005bf22b      {
005bf236          uint32_t* eax_2 = operator new[](((m_num_2 << 4) + 4));
005bf236          
005bf240          if (eax_2 != 0)
005bf240          {
005bf248              ebx_1 = &eax_2[1];
005bf24e              *(uint32_t*)eax_2 = m_num_2;
005bf250              `vector constructor iterator'(ebx_1, 0x10, m_num_2, Style_CG::Style_CG);
005bf240          }
005bf240          
005bf257          if ((eax_2 == 0 || ebx_1 == 0))
005bf257          {
005bf280              eax_2 = 0;
005bf283              return 0;
005bf257          }
005bf257          
005bf259          uint32_t m_num = this->m_num;
005bf259          
005bf25d          if ((m_num - 1) >= 0)
005bf25d          {
005bf262              void* esi_1 = ((m_num - 1) << 4);
005bf265              int32_t ebp_1 = m_num;
005bf279              int32_t i;
005bf279              
005bf279              do
005bf279              {
005bf270                  Style_CG::operator=(((char*)esi_1 + ebx_1), (this->m_data + esi_1));
005bf275                  esi_1 -= 0x10;
005bf278                  i = ebp_1;
005bf278                  ebp_1 -= 1;
005bf279              } while (i != 1);
005bf25d          }
005bf22b      }
005bf22b      
005bf293      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bf293      {
005bf295          class Style_CG* m_data = this->m_data;
005bf295          
005bf299          if (m_data != 0)
005bf29d              Style_CG::`vector deleting destructor'(m_data, 3);
005bf293      }
005bf293      
005bf2a2      uint32_t m_num_1 = this->m_num;
005bf2a5      this->m_data = ebx_1;
005bf2ae      this->m_sizeAndDeallocate = (m_num_1 | 0x80000000);
005bf2b2      void* eax_5;
005bf2b2      eax_5 = 1;
005bf2b5      return 1;
005bf210  }

005bf2b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005bf2c0  void __fastcall SmartArray<Style_CG,1>::Reset(class SmartArray<Style_CG,1>* this)

005bf2c0  {
005bf2c6      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005bf2da      this->m_num = 0;
005bf2da      
005bf2dd      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005bf2dd      {
005bf2df          class Style_CG* m_data = this->m_data;
005bf2df          
005bf2e3          if (m_data != 0)
005bf2e7              Style_CG::`vector deleting destructor'(m_data, 3);
005bf2e7          
005bf2ec          this->m_data = 0;
005bf2ee          this->m_sizeAndDeallocate = 0;
005bf2f6          return;
005bf2dd      }
005bf2dd      
005bf2f9      if (this->m_data != 0)
005bf2f9      {
005bf2ff          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
005bf2ff          
005bf305          if ((eax - 1) >= 0)
005bf305          {
005bf315              int32_t edi_2 = ((eax - 1) << 4);
005bf319              int32_t var_10 = 0x79fe70;
005bf321              int32_t var_14_1 = eax;
005bf38f              bool cond:1_1;
005bf38f              
005bf38f              do
005bf38f              {
005bf330                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005bf33d                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005bf33f                  uint32_t id = INVALID_DID.id;
005bf34d                  uint32_t id_1 = id;
005bf351                  uint32_t id_2 = id;
005bf355                  Style_CG::operator=((this->m_data + edi_2), &var_10);
005bf365                  var_10 = 0x79fe70;
005bf365                  
005bf379                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
005bf381                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
005bf381                  
005bf387                  edi_2 -= 0x10;
005bf38a                  cond:1_1 = var_14_1 != 1;
005bf38b                  var_14_1 -= 1;
005bf38f              } while (cond:1_1);
005bf305          }
005bf2f9      }
005bf2c0  }

005bf327                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
005bf399                                                                             90 90 90 90 90 90 90                           .......

005bf3a0  void __thiscall Sex_CG::GetSubDataIDs(class Sex_CG const* this, class QualifiedDataIDArray* arg2)

005bf3a0  {
005bf3c5      int32_t var_20;
005bf3c5      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->setup.id, 0), 8);
005bf3de      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->soundTable.id, 0), 8);
005bf3f7      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->iconImage.id, 0), 8);
005bf410      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->basePalette.id, 0), 8);
005bf429      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->skinPalSet.id, 0), 8);
005bf442      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->physicsTable.id, 0), 8);
005bf45b      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->motionTable.id, 0), 8);
005bf474      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->combatTable.id, 0), 8);
005bf47d      ObjDesc::GetSubDataIDs(&this->objDesc, arg2);
005bf482      int32_t i = 0;
005bf482      
005bf48b      if (this->mHairColorList.m_num > 0)
005bf48b      {
005bf4b2          do
005bf4b2          {
005bf4a5              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->mHairColorList.m_data[i].id, 0), 0);
005bf4ad              i += 1;
005bf4b2          } while (i < this->mHairColorList.m_num);
005bf48b      }
005bf48b      
005bf4b7      int32_t i_1 = 0;
005bf4b7      
005bf4bb      if (this->mEyeColorList.m_num > 0)
005bf4bb      {
005bf4e2          do
005bf4e2          {
005bf4d5              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_20, this->mEyeColorList.m_data[i_1].id, 0), 0);
005bf4dd              i_1 += 1;
005bf4e2          } while (i_1 < this->mEyeColorList.m_num);
005bf4bb      }
005bf4bb      
005bf4e4      bool cond:0 = this->mHairStyleList.m_num <= 0;
005bf4e7      var_20 = 0;
005bf4eb      void var_18;
005bf4eb      
005bf4eb      if (!(cond:0))
005bf4eb      {
005bf4ed          int32_t var_24_1 = 0;
005bf535          bool cond:3_1;
005bf535          
005bf535          do
005bf535          {
005bf4fa              void* ebx_1 = (this->mHairStyleList.m_data + var_24_1);
005bf50e              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, *(uint32_t*)((char*)ebx_1 + 4), 0), 8);
005bf517              ObjDesc::GetSubDataIDs(((char*)ebx_1 + 0x10), arg2);
005bf52b              cond:3_1 = (var_20 + 1) < this->mHairStyleList.m_num;
005bf52d              var_20 += 1;
005bf531              var_24_1 += 0x3c;
005bf535          } while (cond:3_1);
005bf4eb      }
005bf4eb      
005bf539      bool cond:1 = this->mEyeStripList.m_num <= 0;
005bf53f      var_20 = 0;
005bf543      void var_10;
005bf543      
005bf543      if (!(cond:1))
005bf543      {
005bf545          int32_t var_24_2 = 0;
005bf5ba          bool cond:5_1;
005bf5ba          
005bf5ba          do
005bf5ba          {
005bf550              class EyesStrip_CG* m_data = this->mEyeStripList.m_data;
005bf55d              void* ebx_2 = ((char*)m_data + var_24_2);
005bf56e              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, *(uint32_t*)(&m_data->iconImage + var_24_2), 0), 8);
005bf587              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)((char*)ebx_2 + 8), 0), 8);
005bf590              ObjDesc::GetSubDataIDs(((char*)ebx_2 + 0xc), arg2);
005bf599              ObjDesc::GetSubDataIDs(((char*)ebx_2 + 0x38), arg2);
005bf5b0              cond:5_1 = (var_20 + 1) < this->mEyeStripList.m_num;
005bf5b2              var_20 += 1;
005bf5b6              var_24_2 += 0x64;
005bf5ba          } while (cond:5_1);
005bf543      }
005bf543      
005bf5be      bool cond:2 = this->mNoseStripList.m_num <= 0;
005bf5c4      var_20 = 0;
005bf5c4      
005bf5c8      if (!(cond:2))
005bf5c8      {
005bf5ca          int32_t var_24_3 = 0;
005bf61a          bool cond:7_1;
005bf61a          
005bf61a          do
005bf61a          {
005bf5dc              void* ebx_4 = (this->mNoseStripList.m_data + var_24_3);
005bf5f0              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)((char*)ebx_4 + 4), 0), 8);
005bf5f9              ObjDesc::GetSubDataIDs(((char*)ebx_4 + 8), arg2);
005bf610              cond:7_1 = (var_20 + 1) < this->mNoseStripList.m_num;
005bf612              var_20 += 1;
005bf616              var_24_3 += 0x34;
005bf61a          } while (cond:7_1);
005bf5c8      }
005bf5c8      
005bf61e      bool cond:4 = this->mMouthStripList.m_num <= 0;
005bf624      var_20 = 0;
005bf624      
005bf628      if (!(cond:4))
005bf628      {
005bf62a          int32_t var_24_4 = 0;
005bf67a          bool cond:9_1;
005bf67a          
005bf67a          do
005bf67a          {
005bf63c              void* ebx_6 = (this->mMouthStripList.m_data + var_24_4);
005bf650              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)((char*)ebx_6 + 4), 0), 8);
005bf659              ObjDesc::GetSubDataIDs(((char*)ebx_6 + 8), arg2);
005bf670              cond:9_1 = (var_20 + 1) < this->mMouthStripList.m_num;
005bf672              var_20 += 1;
005bf676              var_24_4 += 0x34;
005bf67a          } while (cond:9_1);
005bf628      }
005bf628      
005bf67e      bool cond:6 = this->mHeadgearList.m_num <= 0;
005bf684      var_20 = 0;
005bf684      
005bf688      if (!(cond:6))
005bf688      {
005bf68a          int32_t var_24_5 = 0;
005bf6eb          bool cond:11_1;
005bf6eb          
005bf6eb          do
005bf6eb          {
005bf690              class Style_CG* m_data_1 = this->mHeadgearList.m_data;
005bf6b1              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)(&m_data_1->clothingTable + var_24_5), 0), 8);
005bf6ca              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, *(uint32_t*)(&m_data_1->weenieDefault + var_24_5), 0), 8);
005bf6e1              cond:11_1 = (var_20 + 1) < this->mHeadgearList.m_num;
005bf6e3              var_20 += 1;
005bf6e7              var_24_5 += 0x10;
005bf6eb          } while (cond:11_1);
005bf688      }
005bf688      
005bf6ef      bool cond:8 = this->mShirtList.m_num <= 0;
005bf6f5      var_20 = 0;
005bf6f5      
005bf6f9      if (!(cond:8))
005bf6f9      {
005bf6fb          int32_t var_24_6 = 0;
005bf75b          bool cond:13_1;
005bf75b          
005bf75b          do
005bf75b          {
005bf700              class Style_CG* m_data_2 = this->mShirtList.m_data;
005bf721              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)(&m_data_2->clothingTable + var_24_6), 0), 8);
005bf73a              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, *(uint32_t*)(&m_data_2->weenieDefault + var_24_6), 0), 8);
005bf751              cond:13_1 = (var_20 + 1) < this->mShirtList.m_num;
005bf753              var_20 += 1;
005bf757              var_24_6 += 0x10;
005bf75b          } while (cond:13_1);
005bf6f9      }
005bf6f9      
005bf75f      bool cond:10 = this->mPantsList.m_num <= 0;
005bf765      var_20 = 0;
005bf765      
005bf769      if (!(cond:10))
005bf769      {
005bf76b          int32_t var_24_7 = 0;
005bf7cb          bool cond:14_1;
005bf7cb          
005bf7cb          do
005bf7cb          {
005bf770              class Style_CG* m_data_3 = this->mPantsList.m_data;
005bf791              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)(&m_data_3->clothingTable + var_24_7), 0), 8);
005bf7aa              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, *(uint32_t*)(&m_data_3->weenieDefault + var_24_7), 0), 8);
005bf7c1              cond:14_1 = (var_20 + 1) < this->mPantsList.m_num;
005bf7c3              var_20 += 1;
005bf7c7              var_24_7 += 0x10;
005bf7cb          } while (cond:14_1);
005bf769      }
005bf769      
005bf7cf      bool cond:12 = this->mFootwearList.m_num <= 0;
005bf7d5      var_20 = 0;
005bf7d5      
005bf7d9      if (!(cond:12))
005bf7d9      {
005bf7db          int32_t var_24_8 = 0;
005bf83b          bool cond:15_1;
005bf83b          
005bf83b          do
005bf83b          {
005bf7e0              class Style_CG* m_data_4 = this->mFootwearList.m_data;
005bf801              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_10, *(uint32_t*)(&m_data_4->clothingTable + var_24_8), 0), 8);
005bf81a              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_18, *(uint32_t*)(&m_data_4->weenieDefault + var_24_8), 0), 8);
005bf831              cond:15_1 = (var_20 + 1) < this->mFootwearList.m_num;
005bf833              var_20 += 1;
005bf837              var_24_8 += 0x10;
005bf83b          } while (cond:15_1);
005bf7d9      }
005bf3a0  }

005bf846                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005bf850  int32_t* __thiscall SmartArray<HairStyle_CG,1>::operator=(int32_t* arg1, int32_t* arg2)

005bf850  {
005bf854      int32_t* ebx = arg2;
005bf86e      uint8_t eax_2;
005bf86e      int32_t ecx_1;
005bf86e      
005bf86e      if ((arg1[1] & 0x7fffffff) < (ebx[1] & 0x7fffffff))
005bf86e      {
005bf870          arg1[2] = 0;
005bf883          eax_2 = SmartArray<HairStyle_CG,1>::grow(arg1, (ebx[1] & 0x7fffffff));
005bf86e      }
005bf86e      
005bf88a      if (((arg1[1] & 0x7fffffff) >= (ebx[1] & 0x7fffffff) || eax_2 != 0))
005bf88a      {
005bf89a          void* esi_1 = *(uint32_t*)ebx;
005bf89c          void* ebp_3 = ((ebx[2] * 0x3c) + esi_1);
005bf89c          
005bf8a0          if (esi_1 < ebp_3)
005bf8a0          {
005bf8a2              void* ebx_1 = (*(uint32_t*)arg1 + 8);
005bf8a2              
005bf8ca              do
005bf8ca              {
005bf8a8                  *(uint32_t*)((char*)ebx_1 - 4) = *(uint32_t*)((char*)esi_1 + 4);
005bf8ab                  ecx_1 = *(uint8_t*)((char*)esi_1 + 8);
005bf8ae                  *(uint8_t*)ebx_1 = ecx_1;
005bf8ba                  *(uint32_t*)((char*)ebx_1 + 4) = *(uint32_t*)((char*)esi_1 + 0xc);
005bf8bd                  ObjDesc::operator=(((char*)ebx_1 + 8), ((char*)esi_1 + 0x10));
005bf8c2                  esi_1 += 0x3c;
005bf8c5                  ebx_1 += 0x3c;
005bf8ca              } while (esi_1 < ebp_3);
005bf8ca              
005bf8cc              ebx = arg2;
005bf8a0          }
005bf8a0          
005bf8d0          int32_t i = ebx[2];
005bf8d0          
005bf8d6          if (i < arg1[2])
005bf8d6          {
005bf8da              int32_t ebp_5 = (i * 0x3c);
005bf8da              
005bf93d              do
005bf93d              {
005bf8e2                  uint32_t id = INVALID_DID.id;
005bf8eb                  int32_t var_3c_1 = 0x79fa80;
005bf8fc                  void var_2c;
005bf8fc                  ObjDesc::ObjDesc(&var_2c);
005bf907                  void* eax_7 = (*(uint32_t*)arg1 + ebp_5);
005bf909                  *(uint32_t*)((char*)eax_7 + 4) = id;
005bf910                  *(uint8_t*)((char*)eax_7 + 8) = 0;
005bf91b                  *(uint32_t*)((char*)eax_7 + 0xc) = id;
005bf922                  ObjDesc::operator=(((char*)eax_7 + 0x10), &var_2c);
005bf92b                  int32_t var_3c_2 = 0x79fa80;
005bf92f                  ObjDesc::~ObjDesc(&var_2c);
005bf937                  i += 1;
005bf938                  ebp_5 += 0x3c;
005bf93d              } while (i < arg1[2]);
005bf93d              
005bf93f              ebx = arg2;
005bf8d6          }
005bf8d6          
005bf947          arg1[2] = ebx[2];
005bf88a      }
005bf88a      
005bf952      return arg1;
005bf850  }

005bf955                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005bf960  int32_t* __thiscall SmartArray<EyesStrip_CG,1>::operator=(int32_t* arg1, int32_t* arg2)

005bf960  {
005bf964      int32_t* ebp = arg2;
005bf97e      uint8_t eax_2;
005bf97e      
005bf97e      if ((arg1[1] & 0x7fffffff) < (ebp[1] & 0x7fffffff))
005bf97e      {
005bf980          arg1[2] = 0;
005bf993          eax_2 = SmartArray<EyesStrip_CG,1>::grow(arg1, (ebp[1] & 0x7fffffff));
005bf97e      }
005bf97e      
005bf99a      if (((arg1[1] & 0x7fffffff) >= (ebp[1] & 0x7fffffff) || eax_2 != 0))
005bf99a      {
005bf9aa          void* esi_1 = *(uint32_t*)ebp;
005bf9ad          void* ebx_3 = ((ebp[2] * 0x64) + esi_1);
005bf9ad          
005bf9b1          if (esi_1 < ebx_3)
005bf9b1          {
005bf9b3              void* ebp_1 = (*(uint32_t*)arg1 + 8);
005bf9b3              
005bf9e2              do
005bf9e2              {
005bf9b9                  *(uint32_t*)((char*)ebp_1 - 4) = *(uint32_t*)((char*)esi_1 + 4);
005bf9c2                  *(uint32_t*)ebp_1 = *(uint32_t*)((char*)esi_1 + 8);
005bf9c9                  ObjDesc::operator=(((char*)ebp_1 + 4), ((char*)esi_1 + 0xc));
005bf9d5                  ObjDesc::operator=(((char*)ebp_1 + 0x30), ((char*)esi_1 + 0x38));
005bf9da                  esi_1 += 0x64;
005bf9dd                  ebp_1 += 0x64;
005bf9e2              } while (esi_1 < ebx_3);
005bf9e2              
005bf9e4              ebp = arg2;
005bf9b1          }
005bf9b1          
005bf9e8          int32_t i = ebp[2];
005bf9e8          
005bf9ee          if (i < arg1[2])
005bf9ee          {
005bf9f6              int32_t ebp_3 = (i * 0x64);
005bf9f6              
005bfa76              do
005bfa76              {
005bfa00                  uint32_t id = INVALID_DID.id;
005bfa09                  int32_t var_64_1 = 0x79fa84;
005bfa19                  void var_58;
005bfa19                  ObjDesc::ObjDesc(&var_58);
005bfa22                  void var_2c;
005bfa22                  ObjDesc::ObjDesc(&var_2c);
005bfa2d                  void* esi_3 = (*(uint32_t*)arg1 + ebp_3);
005bfa2f                  *(uint32_t*)((char*)esi_3 + 4) = id;
005bfa3e                  *(uint32_t*)((char*)esi_3 + 8) = id;
005bfa41                  ObjDesc::operator=(((char*)esi_3 + 0xc), &var_58);
005bfa4e                  ObjDesc::operator=(((char*)esi_3 + 0x38), &var_2c);
005bfa57                  int32_t var_64_2 = 0x79fa84;
005bfa5f                  ObjDesc::~ObjDesc(&var_2c);
005bfa68                  ObjDesc::~ObjDesc(&var_58);
005bfa70                  i += 1;
005bfa71                  ebp_3 += 0x64;
005bfa76              } while (i < arg1[2]);
005bfa76              
005bfa78              ebp = arg2;
005bf9ee          }
005bf9ee          
005bfa80          arg1[2] = ebp[2];
005bf99a      }
005bf99a      
005bfa8b      return arg1;
005bf960  }

005bfa8e                                            90 90                                                                ..

005bfa90  int32_t* __thiscall SmartArray<FaceStrip_CG,1>::operator=(int32_t* arg1, int32_t* arg2)

005bfa90  {
005bfa94      int32_t* ebp = arg2;
005bfaae      uint8_t eax_2;
005bfaae      
005bfaae      if ((arg1[1] & 0x7fffffff) < (ebp[1] & 0x7fffffff))
005bfaae      {
005bfab0          arg1[2] = 0;
005bfac3          eax_2 = SmartArray<FaceStrip_CG,1>::grow(arg1, (ebp[1] & 0x7fffffff));
005bfaae      }
005bfaae      
005bfaca      if (((arg1[1] & 0x7fffffff) >= (ebp[1] & 0x7fffffff) || eax_2 != 0))
005bfaca      {
005bfada          void* esi_1 = *(uint32_t*)ebp;
005bfadd          void* ebx_3 = ((ebp[2] * 0x34) + esi_1);
005bfadd          
005bfae1          if (esi_1 < ebx_3)
005bfae1          {
005bfae3              void* ebp_1 = (*(uint32_t*)arg1 + 8);
005bfae3              
005bfaff              do
005bfaff              {
005bfaef                  *(uint32_t*)((char*)ebp_1 - 4) = *(uint32_t*)((char*)esi_1 + 4);
005bfaf2                  ObjDesc::operator=(ebp_1, ((char*)esi_1 + 8));
005bfaf7                  esi_1 += 0x34;
005bfafa                  ebp_1 += 0x34;
005bfaff              } while (esi_1 < ebx_3);
005bfaff              
005bfb01              ebp = arg2;
005bfae1          }
005bfae1          
005bfb05          int32_t i = ebp[2];
005bfb05          
005bfb0b          if (i < arg1[2])
005bfb0b          {
005bfb0f              int32_t ebx_5 = (i * 0x34);
005bfb0f              
005bfb5f              do
005bfb5f              {
005bfb1c                  int32_t var_34_1 = 0x79fa88;
005bfb28                  void var_2c;
005bfb28                  ObjDesc::ObjDesc(&var_2c);
005bfb33                  void* eax_6 = (*(uint32_t*)arg1 + ebx_5);
005bfb39                  *(uint32_t*)((char*)eax_6 + 4) = INVALID_DID.id;
005bfb40                  ObjDesc::operator=(((char*)eax_6 + 8), &var_2c);
005bfb49                  int32_t var_34_2 = 0x79fa88;
005bfb51                  ObjDesc::~ObjDesc(&var_2c);
005bfb59                  i += 1;
005bfb5a                  ebx_5 += 0x34;
005bfb5f              } while (i < arg1[2]);
005bfb0b          }
005bfb0b          
005bfb65          arg1[2] = ebp[2];
005bfaca      }
005bfaca      
005bfb70      return arg1;
005bfa90  }

005bfb73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005bfb80  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class Template_CG** arg1, class SmartArray<int,1>* arg2, class Archive* arg3)

005bfb80  {
005bfb8c      class SmartArray<int,1>* edi = arg2;
005bfb9a      arg2 = edi->m_num;
005bfb9e      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005bfbab      int32_t ebx;
005bfbab      ebx = 0;
005bfbab      
005bfbaf      if ((!(arg3->m_flags) & 1) != 0)
005bfbaf      {
005bfbb3          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005bfbb8          class SmartArray<int,1>* ebp_1 = arg2;
005bfbb8          
005bfbbe          if (ebp_1 > eax_2)
005bfbc6              /* tailcall */
005bfbc6              return Archive::RaiseError(arg3);
005bfbc6          
005bfbcb          uint32_t m_num = edi->m_num;
005bfbcb          
005bfbd0          if (ebp_1 > m_num)
005bfbd0          {
005bfbd5              SmartArray<unsigned long,1>::grow(edi, ebp_1);
005bfbda              edi->m_num = ebp_1;
005bfbd0          }
005bfbd0          else if (ebp_1 < m_num)
005bfbdf          {
005bfbe3              edi->m_num = ebp_1;
005bfbe6              SmartArray<MediaDesc *,1>::shrink(edi);
005bfbdf          }
005bfbdf          
005bfbeb          ebx = 1;
005bfbaf      }
005bfbaf      
005bfbed      int32_t* m_data = edi->m_data;
005bfbed      
005bfbf8      if (m_data != &m_data[edi->m_num])
005bfbf8      {
005bfc3f          do
005bfc3f          {
005bfc04              Archive::CheckAlignment(arg3, 4);
005bfc0d              int32_t* eax_3 = Archive::GetBytes(arg3, 4);
005bfc0d              
005bfc14              if (eax_3 != 0)
005bfc14              {
005bfc1a                  if ((arg3->m_flags & 1) == 0)
005bfc25                      *(uint32_t*)m_data = *(uint32_t*)eax_3;
005bfc1a                  else
005bfc1f                      *(uint32_t*)eax_3 = *(uint32_t*)m_data;
005bfc14              }
005bfc14              
005bfc30              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005bfc30              {
005bfc4f                  if ((ebx == 0 || edi->m_num <= 0))
005bfc4f                      break;
005bfc4f                  
005bfc51                  edi->m_num = 0;
005bfc5e                  /* tailcall */
005bfc5e                  return SmartArray<MediaDesc *,1>::shrink(edi);
005bfc30              }
005bfc30              
005bfc37              m_data = &m_data[1];
005bfc3f          } while (m_data != &edi->m_data[edi->m_num]);
005bfbf8      }
005bfb80  }

005bfc63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005bfc70  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class HeritageGroup_CG** arg1, class SmartArray<Skill_CG,1>* arg2, class Archive* arg3)

005bfc70  {
005bfc7b      class SmartArray<Skill_CG,1>* esi = arg2;
005bfc8a      arg2 = esi->m_num;
005bfc8e      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005bfc9b      int32_t ebx;
005bfc9b      ebx = 0;
005bfc9b      
005bfc9f      if ((!(arg3->m_flags) & 1) != 0)
005bfc9f      {
005bfca3          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005bfca8          class SmartArray<Skill_CG,1>* edi_1 = arg2;
005bfca8          
005bfcae          if (edi_1 > eax_2)
005bfcb6              /* tailcall */
005bfcb6              return Archive::RaiseError(arg3);
005bfcb6          
005bfcbb          uint32_t m_num = esi->m_num;
005bfcbb          
005bfcc0          if (edi_1 > m_num)
005bfcc0          {
005bfcc5              SmartArray<Skill_CG,1>::grow(esi, edi_1);
005bfcca              esi->m_num = edi_1;
005bfcc0          }
005bfcc0          else if (edi_1 < m_num)
005bfccf          {
005bfcd3              esi->m_num = edi_1;
005bfcd6              SmartArray<Skill_CG,1>::shrink(esi);
005bfccf          }
005bfccf          
005bfcdb          ebx = 1;
005bfc9f      }
005bfc9f      
005bfce0      class Skill_CG* m_data = esi->m_data;
005bfce0      
005bfce9      if (m_data != &m_data[esi->m_num])
005bfce9      {
005bfd10          do
005bfd10          {
005bfcf0              m_data->vtable->Serialize(arg3);
005bfcf0              
005bfcff              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005bfcff              {
005bfd20                  if ((ebx == 0 || esi->m_num <= 0))
005bfd20                      break;
005bfd20                  
005bfd23                  esi->m_num = 0;
005bfd2f                  /* tailcall */
005bfd2f                  return SmartArray<Skill_CG,1>::shrink(esi);
005bfcff              }
005bfcff              
005bfd09              m_data = &m_data[1];
005bfd10          } while (m_data != &esi->m_data[esi->m_num]);
005bfce9      }
005bfc70  }

005bfced                                         8d 49 00                                                               .I.
005bfd34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005bfd40  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class Sex_CG** arg1, class SmartArray<IDClass<_tagDataID,32,0>,1>* arg2, class Archive* arg3)

005bfd40  {
005bfd4c      class SmartArray<IDClass<_tagDataID,32,0>,1>* edi = arg2;
005bfd5a      arg2 = edi->m_num;
005bfd5e      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005bfd6b      int32_t ebx;
005bfd6b      ebx = 0;
005bfd6b      
005bfd6f      if ((!(arg3->m_flags) & 1) != 0)
005bfd6f      {
005bfd73          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005bfd78          class SmartArray<IDClass<_tagDataID,32,0>,1>* ebp_1 = arg2;
005bfd78          
005bfd7e          if (ebp_1 > eax_2)
005bfd86              /* tailcall */
005bfd86              return Archive::RaiseError(arg3);
005bfd86          
005bfd8b          uint32_t m_num = edi->m_num;
005bfd8b          
005bfd90          if (ebp_1 > m_num)
005bfd90          {
005bfd95              SmartArray<IDClass<_tagDataID,32,0>,1>::grow(edi, ebp_1);
005bfd9a              edi->m_num = ebp_1;
005bfd90          }
005bfd90          else if (ebp_1 < m_num)
005bfd9f          {
005bfda3              edi->m_num = ebp_1;
005bfda6              SmartArray<IDClass<_tagDataID,32,0>,1>::shrink(edi);
005bfd9f          }
005bfd9f          
005bfdab          ebx = 1;
005bfd6f      }
005bfd6f      
005bfdad      class IDClass<_tagDataID,32,0>* m_data = edi->m_data;
005bfdad      
005bfdb8      if (m_data != &m_data[edi->m_num])
005bfdb8      {
005bfdff          do
005bfdff          {
005bfdc4              Archive::CheckAlignment(arg3, 4);
005bfdcd              uint32_t* eax_3 = Archive::GetBytes(arg3, 4);
005bfdcd              
005bfdd4              if (eax_3 != 0)
005bfdd4              {
005bfdda                  if ((arg3->m_flags & 1) == 0)
005bfde5                      m_data->id = *(uint32_t*)eax_3;
005bfdda                  else
005bfddf                      *(uint32_t*)eax_3 = m_data->id;
005bfdd4              }
005bfdd4              
005bfdf0              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005bfdf0              {
005bfe0f                  if ((ebx == 0 || edi->m_num <= 0))
005bfe0f                      break;
005bfe0f                  
005bfe11                  edi->m_num = 0;
005bfe1e                  /* tailcall */
005bfe1e                  return SmartArray<IDClass<_tagDataID,32,0>,1>::shrink(edi);
005bfdf0              }
005bfdf0              
005bfdf7              m_data = &m_data[1];
005bfdff          } while (m_data != &edi->m_data[edi->m_num]);
005bfdb8      }
005bfd40  }

005bfe23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005bfe30  class Template_CG& __thiscall Template_CG::operator=(class Template_CG* this, class Template_CG const& arg2)

005bfe30  {
005bfe38      class PSRefBufferCharData<char>* m_charbuffer = this->name.m_charbuffer;
005bfe38      
005bfe3e      if (m_charbuffer != arg2->name.m_charbuffer)
005bfe3e      {
005bfe54          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005bfe5c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005bfe5c          
005bfe5e          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->name.m_charbuffer;
005bfe61          this->name.m_charbuffer = m_charbuffer_1;
005bfe68          InterlockedIncrement(&m_charbuffer_1[-1]);
005bfe3e      }
005bfe3e      
005bfe72      this->iconImage.id = arg2->iconImage.id;
005bfe78      this->titleID = arg2->titleID;
005bfe7e      this->strength = arg2->strength;
005bfe84      this->endurance = arg2->endurance;
005bfe8a      this->coordination = arg2->coordination;
005bfe90      this->quickness = arg2->quickness;
005bfe96      this->focus = arg2->focus;
005bfe9f      this->self = arg2->self;
005bfea6      SmartArray<unsigned long,1>::operator=(&this->mNormalSkillsList.m_data, &arg2->mNormalSkillsList);
005bfeb2      SmartArray<unsigned long,1>::operator=(&this->mPrimarySkillsList, &arg2->mPrimarySkillsList.m_data);
005bfebb      return this;
005bfe30  }

005bfebe                                                                                            90 90                                ..

005bfec0  int32_t* __thiscall SmartArray<Position,1>::operator=(int32_t* arg1, int32_t* arg2)

005bfec0  {
005bfec4      int32_t* ebp = arg2;
005bfede      uint8_t eax_2;
005bfede      
005bfede      if ((arg1[1] & 0x7fffffff) < (ebp[1] & 0x7fffffff))
005bfede      {
005bfee0          arg1[2] = 0;
005bfef3          eax_2 = SmartArray<Position,1>::grow(arg1, (ebp[1] & 0x7fffffff));
005bfede      }
005bfede      
005bfefa      if (((arg1[1] & 0x7fffffff) >= (ebp[1] & 0x7fffffff) || eax_2 != 0))
005bfefa      {
005bff03          void* eax_3 = *(uint32_t*)ebp;
005bff09          void* edx_3 = ((char*)eax_3 + (ebp[2] * 0x48));
005bff09          
005bff12          if (eax_3 < edx_3)
005bff12          {
005bff1a              void* esi_1 = (*(uint32_t*)arg1 + 0xc);
005bff1d              int32_t* ecx_6 = ((char*)eax_3 + 0xc);
005bff2b              int32_t i_2 = (((((char*)edx_3 - eax_3) - 1) / 0x48) + 1);
005bff9f              int32_t i;
005bff9f              
005bff9f              do
005bff9f              {
005bff33                  *(uint32_t*)((char*)esi_1 - 8) = ecx_6[-2];
005bff3e                  *(uint32_t*)((char*)esi_1 + 0x30) = ecx_6[0xc];
005bff43                  *(uint32_t*)((char*)esi_1 + 0x34) = ecx_6[0xd];
005bff49                  *(uint32_t*)((char*)esi_1 + 0x38) = ecx_6[0xe];
005bff4f                  *(uint32_t*)((char*)esi_1 - 4) = ecx_6[-1];
005bff54                  *(uint32_t*)esi_1 = *(uint32_t*)ecx_6;
005bff59                  *(uint32_t*)((char*)esi_1 + 4) = ecx_6[1];
005bff5f                  *(uint32_t*)((char*)esi_1 + 8) = ecx_6[2];
005bff65                  *(uint32_t*)((char*)esi_1 + 0xc) = ecx_6[3];
005bff6b                  *(uint32_t*)((char*)esi_1 + 0x10) = ecx_6[4];
005bff71                  *(uint32_t*)((char*)esi_1 + 0x14) = ecx_6[5];
005bff77                  *(uint32_t*)((char*)esi_1 + 0x18) = ecx_6[6];
005bff7d                  *(uint32_t*)((char*)esi_1 + 0x1c) = ecx_6[7];
005bff83                  *(uint32_t*)((char*)esi_1 + 0x20) = ecx_6[8];
005bff89                  *(uint32_t*)((char*)esi_1 + 0x24) = ecx_6[9];
005bff8f                  *(uint32_t*)((char*)esi_1 + 0x28) = ecx_6[0xa];
005bff95                  *(uint32_t*)((char*)esi_1 + 0x2c) = ecx_6[0xb];
005bff98                  ecx_6 = &ecx_6[0x12];
005bff9b                  esi_1 += 0x48;
005bff9e                  i = i_2;
005bff9e                  i_2 -= 1;
005bff9f              } while (i != 1);
005bffa1              ebp = arg2;
005bff12          }
005bff12          
005bffa5          int32_t i_1 = ebp[2];
005bffa5          
005bffab          if (i_1 < arg1[2])
005bffab          {
005bffb4              int32_t ebx_3 = (i_1 * 0x48);
005bffb4              
005c00a0              do
005c00a0              {
005bffc4                  int32_t var_48_1 = 0x796910;
005bffd4                  int32_t var_40 = 0x3f800000;
005bffdc                  int32_t var_3c_1 = 0;
005bffe4                  int32_t var_38_1 = 0;
005bffec                  int32_t var_34_1 = 0;
005bfff4                  int32_t var_c_1 = 0;
005bfffc                  int32_t var_8_1 = 0;
005c0004                  int32_t var_4_1 = 0;
005c000c                  Frame::cache(&var_40);
005c0011                  void* eax_21 = *(uint32_t*)arg1;
005c0017                  *(uint32_t*)(((char*)eax_21 + ebx_3) + 4) = 0;
005c001f                  void* eax_22 = ((char*)eax_21 + ebx_3);
005c0024                  *(uint32_t*)((char*)eax_22 + 0x3c) = var_c_1;
005c002a                  *(uint32_t*)((char*)eax_22 + 0x40) = var_8_1;
005c0031                  *(uint32_t*)((char*)eax_22 + 0x44) = var_4_1;
005c0038                  *(uint32_t*)((char*)eax_22 + 8) = var_40;
005c003f                  *(uint32_t*)((char*)eax_22 + 0xc) = var_3c_1;
005c0046                  *(uint32_t*)((char*)eax_22 + 0x10) = var_38_1;
005c004d                  *(uint32_t*)((char*)eax_22 + 0x14) = var_34_1;
005c0054                  int32_t var_30;
005c0054                  *(uint32_t*)((char*)eax_22 + 0x18) = var_30;
005c005b                  int32_t var_2c;
005c005b                  *(uint32_t*)((char*)eax_22 + 0x1c) = var_2c;
005c0062                  int32_t var_28;
005c0062                  *(uint32_t*)((char*)eax_22 + 0x20) = var_28;
005c0069                  int32_t var_24;
005c0069                  *(uint32_t*)((char*)eax_22 + 0x24) = var_24;
005c0070                  int32_t var_20;
005c0070                  *(uint32_t*)((char*)eax_22 + 0x28) = var_20;
005c0077                  int32_t var_1c;
005c0077                  *(uint32_t*)((char*)eax_22 + 0x2c) = var_1c;
005c007e                  int32_t var_18;
005c007e                  *(uint32_t*)((char*)eax_22 + 0x30) = var_18;
005c0085                  int32_t var_14;
005c0085                  *(uint32_t*)((char*)eax_22 + 0x34) = var_14;
005c008c                  int32_t var_10;
005c008c                  *(uint32_t*)((char*)eax_22 + 0x38) = var_10;
005c0092                  i_1 += 1;
005c0093                  ebx_3 += 0x48;
005c0098                  int32_t var_48_2 = 0x79285c;
005c00a0              } while (i_1 < arg1[2]);
005bffab          }
005bffab          
005c00aa          arg1[2] = ebp[2];
005bfefa      }
005bfefa      
005c00b5      return arg1;
005bfec0  }

005bffb9                                                                             8d a4 24 00 00 00 00                           ..$....
005c00b8                                                                          90 90 90 90 90 90 90 90                          ........

005c00c0  uint8_t __fastcall SmartArray<Template_CG,1>::shrink(class SmartArray<Template_CG,1>* this)

005c00c0  {
005c00c7      uint32_t m_num_2 = this->m_num;
005c00c7      
005c00d1      if (m_num_2 == (this->m_sizeAndDeallocate & 0x7fffffff))
005c00d1      {
005c00d4          int32_t eax_1;
005c00d4          eax_1 = 0;
005c00d7          return 0;
005c00d1      }
005c00d1      
005c00db      void* ebx_1;
005c00db      
005c00db      if (m_num_2 <= 0)
005c0134          ebx_1 = nullptr;
005c00db      else
005c00db      {
005c00e6          uint32_t* eax_2 = operator new[](((m_num_2 << 6) + 4));
005c00e6          
005c00f0          if (eax_2 != 0)
005c00f0          {
005c00f8              ebx_1 = &eax_2[1];
005c00fe              *(uint32_t*)eax_2 = m_num_2;
005c0100              `vector constructor iterator'(ebx_1, 0x40, m_num_2, Template_CG::Template_CG);
005c00f0          }
005c00f0          
005c0107          if ((eax_2 == 0 || ebx_1 == 0))
005c0107          {
005c0130              eax_2 = 0;
005c0133              return 0;
005c0107          }
005c0107          
005c0109          uint32_t m_num = this->m_num;
005c0109          
005c010d          if ((m_num - 1) >= 0)
005c010d          {
005c0112              void* esi_1 = ((m_num - 1) << 6);
005c0115              int32_t ebp_1 = m_num;
005c0129              int32_t i;
005c0129              
005c0129              do
005c0129              {
005c0120                  Template_CG::operator=(((char*)esi_1 + ebx_1), (this->m_data + esi_1));
005c0125                  esi_1 -= 0x40;
005c0128                  i = ebp_1;
005c0128                  ebp_1 -= 1;
005c0129              } while (i != 1);
005c010d          }
005c00db      }
005c00db      
005c0143      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005c0143      {
005c0145          class Template_CG* m_data = this->m_data;
005c0145          
005c0149          if (m_data != 0)
005c014d              Template_CG::`vector deleting destructor'(m_data, 3);
005c0143      }
005c0143      
005c0152      uint32_t m_num_1 = this->m_num;
005c0155      this->m_data = ebx_1;
005c015e      this->m_sizeAndDeallocate = (m_num_1 | 0x80000000);
005c0162      void* eax_5;
005c0162      eax_5 = 1;
005c0165      return 1;
005c00c0  }

005c0166                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005c0170  uint8_t __thiscall SmartArray<Style_CG,1>::grow(class SmartArray<Style_CG,1>* this, uint32_t arg2)

005c0170  {
005c0172      uint32_t ebp = arg2;
005c017c      uint32_t* eax;
005c017c      
005c017c      if (ebp >= this->m_num)
005c017c      {
005c018c          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
005c018c          {
005c022a              eax = 1;
005c022d              return 1;
005c018c          }
005c018c          
005c0194          if (ebp == 0)
005c0194          {
005c0196              SmartArray<Style_CG,1>::Reset(this);
005c019d              int32_t eax_2;
005c019d              eax_2 = 1;
005c01a0              return 1;
005c0194          }
005c0194          
005c01ac          eax = operator new[](((ebp << 4) + 4));
005c01ac          
005c01b6          if (eax != 0)
005c01b6          {
005c01be              void* ebx_1 = &eax[1];
005c01c4              *(uint32_t*)eax = ebp;
005c01c6              `vector constructor iterator'(ebx_1, 0x10, ebp, Style_CG::Style_CG);
005c01c6              
005c01cd              if (ebx_1 != 0)
005c01cd              {
005c01d2                  if (this->m_data != 0)
005c01d2                  {
005c01d4                      uint32_t m_num = this->m_num;
005c01d4                      
005c01d8                      if ((m_num - 1) >= 0)
005c01d8                      {
005c01dd                          void* esi_2 = ((m_num - 1) << 4);
005c01e1                          arg2 = m_num;
005c01fe                          bool cond:0_1;
005c01fe                          
005c01fe                          do
005c01fe                          {
005c01ed                              Style_CG::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
005c01f6                              esi_2 -= 0x10;
005c01f9                              cond:0_1 = arg2 != 1;
005c01fa                              arg2 -= 1;
005c01fe                          } while (cond:0_1);
005c01d8                      }
005c01d8                      
005c020e                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005c020e                      {
005c0210                          class Style_CG* m_data = this->m_data;
005c0210                          
005c0214                          if (m_data != 0)
005c0218                              Style_CG::`vector deleting destructor'(m_data, 3);
005c020e                      }
005c01d2                  }
005c01d2                  
005c0223                  this->m_data = ebx_1;
005c0225                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
005c022a                  eax = 1;
005c022d                  return 1;
005c01cd              }
005c01b6          }
005c017c      }
005c017c      
005c0232      eax = 0;
005c0235      return 0;
005c0170  }

005c0238                                                                          90 90 90 90 90 90 90 90                          ........

005c0240  void __fastcall SmartArray<Template_CG,1>::Reset(class SmartArray<Template_CG,1>* this)

005c0240  {
005c0246      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005c025a      this->m_num = 0;
005c025a      
005c025d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005c025d      {
005c025f          class Template_CG* m_data = this->m_data;
005c025f          
005c0263          if (m_data != 0)
005c0267              Template_CG::`vector deleting destructor'(m_data, 3);
005c0267          
005c026c          this->m_data = 0;
005c026e          this->m_sizeAndDeallocate = 0;
005c0276          return;
005c025d      }
005c025d      
005c0279      if (this->m_data != 0)
005c0279      {
005c027b          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
005c027b          
005c0281          if ((i_2 - 1) >= 0)
005c0281          {
005c0286              int32_t edi_2 = ((i_2 - 1) << 6);
005c0289              int32_t i_1 = i_2;
005c02b0              int32_t i;
005c02b0              
005c02b0              do
005c02b0              {
005c0294                  void var_40;
005c0294                  class Template_CG* eax_1 = Template_CG::Template_CG(&var_40);
005c029e                  Template_CG::operator=((this->m_data + edi_2), eax_1);
005c02a7                  Template_CG::~Template_CG(&var_40);
005c02ac                  edi_2 -= 0x40;
005c02af                  i = i_1;
005c02af                  i_1 -= 1;
005c02b0              } while (i != 1);
005c0281          }
005c0279      }
005c0240  }

005c02b9                                                                             90 90 90 90 90 90 90                           .......

005c02c0  void __fastcall Sex_CG::Sex_CG(class Sex_CG* this)

005c02c0  {
005c02c3      this->vtable = 0x79fe7c;
005c02c9      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005c02d5      this->name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
005c02d8      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
005c02e0      this->scaling = 0;
005c02e9      this->setup.id = INVALID_DID.id;
005c02f1      this->soundTable.id = INVALID_DID.id;
005c02fa      this->iconImage.id = INVALID_DID.id;
005c0300      ObjDesc::ObjDesc(&this->objDesc);
005c030b      this->physicsTable.id = INVALID_DID.id;
005c0313      this->motionTable.id = INVALID_DID.id;
005c031c      this->combatTable.id = INVALID_DID.id;
005c0325      this->basePalette.id = INVALID_DID.id;
005c032d      this->skinPalSet.id = INVALID_DID.id;
005c0330      __builtin_memset(&this->mHairColorList, 0, 0x84);
005c02c0  }

005c03dd                                                                                         90 90 90                               ...

005c03e0  void __thiscall Style_CG::Serialize(class Style_CG* this, class Archive* arg2)

005c03e0  {
005c03ec      PStringBase<char>::Serialize(&this->name, arg2);
005c03f5      Archive::CheckAlignment(arg2, 4);
005c03fe      uint8_t* eax = Archive::GetBytes(arg2, 4);
005c03fe      
005c0405      if (eax != 0)
005c0405      {
005c040b          if ((arg2->m_flags & 1) == 0)
005c0416              this->clothingTable.id = *(uint32_t*)eax;
005c040b          else
005c0410              *(uint32_t*)eax = this->clothingTable.id;
005c0405      }
005c0405      
005c041d      Archive::CheckAlignment(arg2, 4);
005c0426      uint32_t* eax_1 = Archive::GetBytes(arg2, 4);
005c0426      
005c042d      if (eax_1 != 0)
005c042d      {
005c0433          if ((arg2->m_flags & 1) != 0)
005c0433          {
005c0439              *(uint32_t*)eax_1 = this->weenieDefault.id;
005c043c              return;
005c0433          }
005c0433          
005c0441          this->weenieDefault.id = *(uint32_t*)eax_1;
005c042d      }
005c03e0  }

005c0449                             90 90 90 90 90 90 90                                                           .......

005c0450  void __thiscall Template_CG::Serialize(class Template_CG* this, class Archive* arg2)

005c0450  {
005c0452      class Archive* esi = arg2;
005c045d      PStringBase<char>::Serialize(&this->name, esi);
005c0466      Archive::CheckAlignment(esi, 4);
005c046f      uint8_t* eax = Archive::GetBytes(esi, 4);
005c046f      
005c0478      if (eax != 0)
005c0478      {
005c047d          if ((esi->m_flags & 1) == 0)
005c0488              this->iconImage.id = *(uint32_t*)eax;
005c047d          else
005c0482              *(uint32_t*)eax = this->iconImage.id;
005c0478      }
005c0478      
005c048f      Archive::CheckAlignment(esi, 4);
005c0498      uint8_t* eax_1 = Archive::GetBytes(esi, 4);
005c0498      
005c049f      if (eax_1 != 0)
005c049f      {
005c04a4          if ((esi->m_flags & 1) == 0)
005c04af              this->titleID = *(uint32_t*)eax_1;
005c04a4          else
005c04a9              *(uint32_t*)eax_1 = this->titleID;
005c049f      }
005c049f      
005c04b6      Archive::CheckAlignment(esi, 4);
005c04bf      uint8_t* eax_2 = Archive::GetBytes(esi, 4);
005c04bf      
005c04c6      if (eax_2 != 0)
005c04c6      {
005c04cb          if ((esi->m_flags & 1) == 0)
005c04d6              this->strength = *(uint32_t*)eax_2;
005c04cb          else
005c04d0              *(uint32_t*)eax_2 = this->strength;
005c04c6      }
005c04c6      
005c04dd      Archive::CheckAlignment(esi, 4);
005c04e6      uint8_t* eax_3 = Archive::GetBytes(esi, 4);
005c04e6      
005c04ed      if (eax_3 != 0)
005c04ed      {
005c04f2          if ((esi->m_flags & 1) == 0)
005c04fd              this->endurance = *(uint32_t*)eax_3;
005c04f2          else
005c04f7              *(uint32_t*)eax_3 = this->endurance;
005c04ed      }
005c04ed      
005c0504      Archive::CheckAlignment(esi, 4);
005c050d      uint8_t* eax_4 = Archive::GetBytes(esi, 4);
005c050d      
005c0514      if (eax_4 != 0)
005c0514      {
005c0519          if ((esi->m_flags & 1) == 0)
005c0524              this->coordination = *(uint32_t*)eax_4;
005c0519          else
005c051e              *(uint32_t*)eax_4 = this->coordination;
005c0514      }
005c0514      
005c052b      Archive::CheckAlignment(esi, 4);
005c0534      uint8_t* eax_5 = Archive::GetBytes(esi, 4);
005c0534      
005c053b      if (eax_5 != 0)
005c053b      {
005c0540          if ((esi->m_flags & 1) == 0)
005c054b              this->quickness = *(uint32_t*)eax_5;
005c0540          else
005c0545              *(uint32_t*)eax_5 = this->quickness;
005c053b      }
005c053b      
005c0552      Archive::CheckAlignment(esi, 4);
005c055b      uint8_t* eax_6 = Archive::GetBytes(esi, 4);
005c055b      
005c0562      if (eax_6 != 0)
005c0562      {
005c0567          if ((esi->m_flags & 1) == 0)
005c0572              this->focus = *(uint32_t*)eax_6;
005c0567          else
005c056c              *(uint32_t*)eax_6 = this->focus;
005c0562      }
005c0562      
005c0579      Archive::CheckAlignment(esi, 4);
005c0582      int32_t* eax_7 = Archive::GetBytes(esi, 4);
005c0582      
005c0589      if (eax_7 != 0)
005c0589      {
005c058e          if ((esi->m_flags & 1) == 0)
005c0599              this->self = *(uint32_t*)eax_7;
005c058e          else
005c0593              *(uint32_t*)eax_7 = this->self;
005c0589      }
005c0589      
005c05a6      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mNormalSkillsList, esi);
005c05b5      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mPrimarySkillsList, esi);
005c0450  }

005c05c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005c05d0  void __thiscall HeritageGroup_CG::GetSubDataIDs(class HeritageGroup_CG const* this, class QualifiedDataIDArray* arg2)

005c05d0  {
005c05f1      void var_8;
005c05f1      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->iconImage.id, 0), 8);
005c060a      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->setupID.id, 0), 8);
005c0623      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->environmentSetupID.id, 0), 8);
005c062b      int32_t i = 0;
005c062b      
005c062f      if (this->mTemplateList.m_num > 0)
005c062f      {
005c0631          int32_t ebx_1 = 0;
005c0631          
005c0659          do
005c0659          {
005c064b              QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, *(uint32_t*)(&this->mTemplateList.m_data->iconImage + ebx_1), 0), 8);
005c0653              i += 1;
005c0654              ebx_1 += 0x40;
005c0659          } while (i < this->mTemplateList.m_num);
005c062f      }
005c062f      
005c066d      void* ecx_9 = &this->mGenderList.m_intrusiveTable.m_buckets[this->mGenderList.m_intrusiveTable.m_numBuckets];
005c0672      int32_t* m_firstInterestingBucket_1;
005c0672      void* i_2;
005c0672      
005c0672      if (this->mGenderList.m_intrusiveTable.m_firstInterestingBucket == ecx_9)
005c0672      {
005c068c      label_5c068c:
005c068c          m_firstInterestingBucket_1 = nullptr;
005c068e          i_2 = nullptr;
005c0672      }
005c0672      else
005c0672      {
005c0674          while (true)
005c0674          {
005c0674              class HashTableData<unsigned long,Sex_CG>** m_firstInterestingBucket = this->mGenderList.m_intrusiveTable.m_firstInterestingBucket;
005c0674              
005c067d              if (*(uint32_t*)m_firstInterestingBucket != 0)
005c067d              {
005c0692                  m_firstInterestingBucket_1 = this->mGenderList.m_intrusiveTable.m_firstInterestingBucket;
005c0698                  i_2 = *(uint32_t*)m_firstInterestingBucket_1;
005c0698                  break;
005c067d              }
005c067d              
005c0684              this->mGenderList.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
005c0684              
005c068a              if (&m_firstInterestingBucket[1] == ecx_9)
005c068a                  goto label_5c068c;
005c0674          }
005c0672      }
005c0672      
005c069c      int32_t* m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
005c069c      
005c069e      if (i_2 != 0)
005c069e      {
005c06a4          while (true)
005c06a4          {
005c06a4              Sex_CG::GetSubDataIDs(((char*)i_2 + 8), arg2);
005c06a9              i_2 = *(uint32_t*)((char*)i_2 + 4);
005c06a9              
005c06ae              if (i_2 == 0)
005c06ae              {
005c06cb                  void* i_1;
005c06cb                  
005c06cb                  do
005c06cb                  {
005c06c0                      m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
005c06c0                      
005c06c5                      if (m_firstInterestingBucket_2 == &this->mGenderList.m_intrusiveTable.m_buckets[this->mGenderList.m_intrusiveTable.m_numBuckets])
005c06da                          return;
005c06da                      
005c06c7                      i_1 = *(uint32_t*)m_firstInterestingBucket_2;
005c06cb                  } while (i_1 == 0);
005c06cb                  
005c06cd                  i_2 = i_1;
005c06cd                  
005c06d1                  if (i_2 == 0)
005c06d1                      break;
005c06ae              }
005c06a4          }
005c069e      }
005c05d0  }

005c06dd                                                                                         90 90 90                               ...

005c06e0  int32_t* __thiscall SmartArray<Style_CG,1>::operator=(int32_t* arg1, int32_t* arg2)

005c06e0  {
005c06e4      int32_t* ebx = arg2;
005c06e9      int32_t* result = arg1;
005c06fe      int32_t* result_1 = result;
005c0702      uint8_t eax_2;
005c0702      
005c0702      if ((result[1] & 0x7fffffff) < (ebx[1] & 0x7fffffff))
005c0702      {
005c0704          result[2] = 0;
005c0717          eax_2 = SmartArray<Style_CG,1>::grow(result, (ebx[1] & 0x7fffffff));
005c0702      }
005c0702      
005c071e      if (((result[1] & 0x7fffffff) >= (ebx[1] & 0x7fffffff) || eax_2 != 0))
005c071e      {
005c0728          void* esi_1 = *(uint32_t*)ebx;
005c0731          void* edi_3 = ((ebx[2] << 4) + esi_1);
005c0731          
005c0735          if (esi_1 < edi_3)
005c0735          {
005c073a              int32_t* ebx_2 = (*(uint32_t*)result + 4);
005c073a              
005c078d              do
005c078d              {
005c0740                  void* eax_4 = *(uint32_t*)ebx_2;
005c0740                  
005c0745                  if (eax_4 != *(uint32_t*)((char*)esi_1 + 4))
005c0745                  {
005c0762                      if ((InterlockedDecrement(((char*)eax_4 - 0x10)) == 0 && eax_4 != 0x14))
005c0768                          **(uint32_t**)((char*)eax_4 - 0x14)(1);
005c0768                      
005c076a                      int32_t eax_9 = *(uint32_t*)((char*)esi_1 + 4);
005c076d                      *(uint32_t*)ebx_2 = eax_9;
005c0773                      InterlockedIncrement((eax_9 - 0x10));
005c0745                  }
005c0745                  
005c077c                  ebx_2[1] = *(uint32_t*)((char*)esi_1 + 8);
005c0782                  ebx_2[2] = *(uint32_t*)((char*)esi_1 + 0xc);
005c0785                  esi_1 += 0x10;
005c0788                  ebx_2 = &ebx_2[4];
005c078d              } while (esi_1 < edi_3);
005c078d              
005c078f              ebx = arg2;
005c0735          }
005c0735          
005c0793          int32_t eax_11 = ebx[2];
005c0799          int32_t var_18_2 = eax_11;
005c0799          
005c079d          if (eax_11 < result[2])
005c079d          {
005c07a6              int32_t var_1c_1 = (eax_11 << 4);
005c084b              bool cond:2_1;
005c084b              
005c084b              do
005c084b              {
005c07b0                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005c07ba                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005c07c0                  uint32_t id = INVALID_DID.id;
005c07c8                  void* esi_3 = (*(uint32_t*)result + var_1c_1);
005c07d4                  void* eax_13 = *(uint32_t*)((char*)esi_3 + 4);
005c07d4                  
005c07d9                  if (eax_13 != PStringBase<char>::s_NullBuffer_1)
005c07d9                  {
005c07ee                      if ((InterlockedDecrement(((char*)eax_13 - 0x10)) == 0 && eax_13 != 0x14))
005c07f7                          **(uint32_t**)((char*)eax_13 - 0x14)(1);
005c07f7                      
005c07fa                      *(uint32_t*)((char*)esi_3 + 4) = PStringBase<char>::s_NullBuffer_1;
005c07fd                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005c0803                      result = result_1;
005c07d9                  }
005c07d9                  
005c080f                  *(uint32_t*)((char*)esi_3 + 8) = id;
005c0812                  *(uint32_t*)((char*)esi_3 + 0xc) = id;
005c0812                  
005c0828                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
005c0830                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
005c0830                  
005c0841                  cond:2_1 = (var_18_2 + 1) < result[2];
005c0843                  var_18_2 += 1;
005c0847                  var_1c_1 += 0x10;
005c084b              } while (cond:2_1);
005c0851              ebx = arg2;
005c079d          }
005c079d          
005c0859          result[2] = ebx[2];
005c071e      }
005c071e      
005c0864      return result;
005c06e0  }

005c0867                       90 90 90 90 90 90 90 90 90                                                         .........

005c0870  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class ACCharGenStartArea** arg1, class SmartArray<Position,1>* arg2, class Archive* arg3)

005c0870  {
005c087b      class SmartArray<Position,1>* esi = arg2;
005c088a      arg2 = esi->m_num;
005c088e      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005c089b      int32_t ebx;
005c089b      ebx = 0;
005c089b      
005c089f      if ((!(arg3->m_flags) & 1) != 0)
005c089f      {
005c08a3          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005c08a8          class SmartArray<Position,1>* edi_1 = arg2;
005c08a8          
005c08ae          if (edi_1 > eax_2)
005c08b6              /* tailcall */
005c08b6              return Archive::RaiseError(arg3);
005c08b6          
005c08bb          uint32_t m_num = esi->m_num;
005c08bb          
005c08c0          if (edi_1 > m_num)
005c08c0          {
005c08c5              SmartArray<Position,1>::grow(esi, edi_1);
005c08ca              esi->m_num = edi_1;
005c08c0          }
005c08c0          else if (edi_1 < m_num)
005c08cf          {
005c08d3              esi->m_num = edi_1;
005c08d6              SmartArray<Position,1>::shrink(esi);
005c08cf          }
005c08cf          
005c08db          ebx = 1;
005c089f      }
005c089f      
005c08e0      class Position* m_data = esi->m_data;
005c08e0      
005c08ea      if (m_data != &m_data[esi->m_num])
005c08ea      {
005c0912          do
005c0912          {
005c08f3              Position::Serialize(m_data, arg3);
005c08f3              
005c0900              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005c0900              {
005c0922                  if ((ebx == 0 || esi->m_num <= 0))
005c0922                      break;
005c0922                  
005c0925                  esi->m_num = 0;
005c0931                  /* tailcall */
005c0931                  return SmartArray<Position,1>::shrink(esi);
005c0900              }
005c0900              
005c090a              m_data = &m_data[1];
005c0912          } while (m_data != &esi->m_data[esi->m_num]);
005c08ea      }
005c0870  }

005c0936                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005c0940  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class Sex_CG** arg1, class SmartArray<HairStyle_CG,1>* arg2, class Archive* arg3)

005c0940  {
005c094b      class SmartArray<HairStyle_CG,1>* esi = arg2;
005c095a      arg2 = esi->m_num;
005c095e      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005c096b      int32_t ebx;
005c096b      ebx = 0;
005c096b      
005c096f      if ((!(arg3->m_flags) & 1) != 0)
005c096f      {
005c0973          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005c0978          class SmartArray<HairStyle_CG,1>* edi_1 = arg2;
005c0978          
005c097e          if (edi_1 > eax_2)
005c0986              /* tailcall */
005c0986              return Archive::RaiseError(arg3);
005c0986          
005c098b          uint32_t m_num = esi->m_num;
005c098b          
005c0990          if (edi_1 > m_num)
005c0990          {
005c0995              SmartArray<HairStyle_CG,1>::grow(esi, edi_1);
005c099a              esi->m_num = edi_1;
005c0990          }
005c0990          else if (edi_1 < m_num)
005c099f          {
005c09a3              esi->m_num = edi_1;
005c09a6              SmartArray<HairStyle_CG,1>::shrink(esi);
005c099f          }
005c099f          
005c09ab          ebx = 1;
005c096f      }
005c096f      
005c09b0      class HairStyle_CG* m_data = esi->m_data;
005c09b0      
005c09b9      if (m_data != ((esi->m_num * 0x3c) + m_data))
005c09b9      {
005c09e0          do
005c09e0          {
005c09c0              m_data->vtable->Serialize(arg3);
005c09c0              
005c09cf              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005c09cf              {
005c09f0                  if ((ebx == 0 || esi->m_num <= 0))
005c09f0                      break;
005c09f0                  
005c09f3                  esi->m_num = 0;
005c09ff                  /* tailcall */
005c09ff                  return SmartArray<HairStyle_CG,1>::shrink(esi);
005c09cf              }
005c09cf              
005c09d9              m_data = &m_data[1];
005c09e0          } while (m_data != ((esi->m_num * 0x3c) + esi->m_data));
005c09b9      }
005c0940  }

005c09bd                                                                                         8d 49 00                               .I.
005c0a04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c0a10  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class Sex_CG** arg1, class SmartArray<EyesStrip_CG,1>* arg2, class Archive* arg3)

005c0a10  {
005c0a1b      class SmartArray<EyesStrip_CG,1>* esi = arg2;
005c0a2a      arg2 = esi->m_num;
005c0a2e      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005c0a3b      int32_t ebx;
005c0a3b      ebx = 0;
005c0a3b      
005c0a3f      if ((!(arg3->m_flags) & 1) != 0)
005c0a3f      {
005c0a43          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005c0a48          class SmartArray<EyesStrip_CG,1>* edi_1 = arg2;
005c0a48          
005c0a4e          if (edi_1 > eax_2)
005c0a56              /* tailcall */
005c0a56              return Archive::RaiseError(arg3);
005c0a56          
005c0a5b          uint32_t m_num = esi->m_num;
005c0a5b          
005c0a60          if (edi_1 > m_num)
005c0a60          {
005c0a65              SmartArray<EyesStrip_CG,1>::grow(esi, edi_1);
005c0a6a              esi->m_num = edi_1;
005c0a60          }
005c0a60          else if (edi_1 < m_num)
005c0a6f          {
005c0a73              esi->m_num = edi_1;
005c0a76              SmartArray<EyesStrip_CG,1>::shrink(esi);
005c0a6f          }
005c0a6f          
005c0a7b          ebx = 1;
005c0a3f      }
005c0a3f      
005c0a80      class EyesStrip_CG* m_data = esi->m_data;
005c0a80      
005c0a89      if (m_data != ((esi->m_num * 0x64) + m_data))
005c0a89      {
005c0ab0          do
005c0ab0          {
005c0a90              m_data->vtable->Serialize(arg3);
005c0a90              
005c0a9f              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005c0a9f              {
005c0ac0                  if ((ebx == 0 || esi->m_num <= 0))
005c0ac0                      break;
005c0ac0                  
005c0ac3                  esi->m_num = 0;
005c0acf                  /* tailcall */
005c0acf                  return SmartArray<EyesStrip_CG,1>::shrink(esi);
005c0a9f              }
005c0a9f              
005c0aa9              m_data = &m_data[1];
005c0ab0          } while (m_data != ((esi->m_num * 0x64) + esi->m_data));
005c0a89      }
005c0a10  }

005c0a8d                                         8d 49 00                                                               .I.
005c0ad4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c0ae0  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class Sex_CG** arg1, class SmartArray<FaceStrip_CG,1>* arg2, class Archive* arg3)

005c0ae0  {
005c0aeb      class SmartArray<FaceStrip_CG,1>* esi = arg2;
005c0afa      arg2 = esi->m_num;
005c0afe      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005c0b0b      int32_t ebx;
005c0b0b      ebx = 0;
005c0b0b      
005c0b0f      if ((!(arg3->m_flags) & 1) != 0)
005c0b0f      {
005c0b13          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005c0b18          class SmartArray<FaceStrip_CG,1>* edi_1 = arg2;
005c0b18          
005c0b1e          if (edi_1 > eax_2)
005c0b26              /* tailcall */
005c0b26              return Archive::RaiseError(arg3);
005c0b26          
005c0b2b          uint32_t m_num = esi->m_num;
005c0b2b          
005c0b30          if (edi_1 > m_num)
005c0b30          {
005c0b35              SmartArray<FaceStrip_CG,1>::grow(esi, edi_1);
005c0b3a              esi->m_num = edi_1;
005c0b30          }
005c0b30          else if (edi_1 < m_num)
005c0b3f          {
005c0b43              esi->m_num = edi_1;
005c0b46              SmartArray<FaceStrip_CG,1>::shrink(esi);
005c0b3f          }
005c0b3f          
005c0b4b          ebx = 1;
005c0b0f      }
005c0b0f      
005c0b50      class FaceStrip_CG* m_data = esi->m_data;
005c0b50      
005c0b59      if (m_data != ((esi->m_num * 0x34) + m_data))
005c0b59      {
005c0b80          do
005c0b80          {
005c0b60              m_data->vtable->Serialize(arg3);
005c0b60              
005c0b6f              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005c0b6f              {
005c0b90                  if ((ebx == 0 || esi->m_num <= 0))
005c0b90                      break;
005c0b90                  
005c0b93                  esi->m_num = 0;
005c0b9f                  /* tailcall */
005c0b9f                  return SmartArray<FaceStrip_CG,1>::shrink(esi);
005c0b6f              }
005c0b6f              
005c0b79              m_data = &m_data[1];
005c0b80          } while (m_data != ((esi->m_num * 0x34) + esi->m_data));
005c0b59      }
005c0ae0  }

005c0b5d                                                                                         8d 49 00                               .I.
005c0ba4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c0bb0  class ACCharGenStartArea& __thiscall ACCharGenStartArea::operator=(class ACCharGenStartArea* this, class ACCharGenStartArea const& arg2)

005c0bb0  {
005c0bb8      class PSRefBufferCharData<char>* m_charbuffer = this->name.m_charbuffer;
005c0bb8      
005c0bbe      if (m_charbuffer != arg2->name.m_charbuffer)
005c0bbe      {
005c0bd4          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005c0bdc              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005c0bdc          
005c0bde          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->name.m_charbuffer;
005c0be1          this->name.m_charbuffer = m_charbuffer_1;
005c0be8          InterlockedIncrement(&m_charbuffer_1[-1]);
005c0bbe      }
005c0bbe      
005c0bf6      SmartArray<Position,1>::operator=(&this->mPositionList, &arg2->mPositionList.m_data);
005c0bff      return this;
005c0bb0  }

005c0c02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005c0c10  uint8_t __fastcall SmartArray<ACCharGenStartArea,1>::shrink(class SmartArray<ACCharGenStartArea,1>* this)

005c0c10  {
005c0c17      uint32_t m_num_2 = this->m_num;
005c0c21      class ACCharGenStartArea* eax_1;
005c0c21      
005c0c21      if (m_num_2 == (this->m_sizeAndDeallocate & 0x7fffffff))
005c0c21      {
005c0c24          eax_1 = 0;
005c0c27          return 0;
005c0c21      }
005c0c21      
005c0c2b      void* ebx_1;
005c0c2b      
005c0c2b      if (m_num_2 <= 0)
005c0c8c          ebx_1 = nullptr;
005c0c2b      else
005c0c2b      {
005c0c38          uint32_t* eax_2 = operator new[](((m_num_2 * 0x14) + 4));
005c0c38          
005c0c42          if (eax_2 != 0)
005c0c42          {
005c0c4a              ebx_1 = &eax_2[1];
005c0c50              *(uint32_t*)eax_2 = m_num_2;
005c0c52              `vector constructor iterator'(ebx_1, 0x14, m_num_2, ACCharGenStartArea::ACCharGenStartArea);
005c0c42          }
005c0c42          
005c0c59          if ((eax_2 == 0 || ebx_1 == 0))
005c0c59          {
005c0c88              eax_2 = 0;
005c0c8b              return 0;
005c0c59          }
005c0c59          
005c0c5b          uint32_t m_num = this->m_num;
005c0c5b          
005c0c5f          if ((m_num - 1) >= 0)
005c0c5f          {
005c0c65              void* esi_1 = ((m_num - 1) * 0x14);
005c0c68              void* __offset(ACCharGenStartArea, 0x1) ebp_1 = m_num;
005c0c81              void* __offset(ACCharGenStartArea, 0x1) i;
005c0c81              
005c0c81              do
005c0c81              {
005c0c78                  ACCharGenStartArea::operator=(((char*)esi_1 + ebx_1), (this->m_data + esi_1));
005c0c7d                  esi_1 -= 0x14;
005c0c80                  i = ebp_1;
005c0c80                  ebp_1 -= 1;
005c0c81              } while (i != 1);
005c0c5f          }
005c0c2b      }
005c0c2b      
005c0c9d      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005c0c9d      {
005c0c9f          class ACCharGenStartArea* m_data = this->m_data;
005c0c9f          
005c0ca3          if (m_data != 0)
005c0ca7              ACCharGenStartArea::`vector deleting destructor'(m_data, 3);
005c0c9d      }
005c0c9d      
005c0cac      uint32_t m_num_1 = this->m_num;
005c0caf      this->m_data = ebx_1;
005c0cb8      this->m_sizeAndDeallocate = (m_num_1 | 0x80000000);
005c0cbc      eax_1 = 1;
005c0cbf      return 1;
005c0c10  }

005c0c6d                                         8d 49 00                                                               .I.

005c0cc0  uint8_t __thiscall SmartArray<Template_CG,1>::grow(class SmartArray<Template_CG,1>* this, uint32_t arg2)

005c0cc0  {
005c0cc2      uint32_t ebp = arg2;
005c0ccc      uint32_t* eax;
005c0ccc      
005c0ccc      if (ebp >= this->m_num)
005c0ccc      {
005c0cdc          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
005c0cdc          {
005c0d7a              eax = 1;
005c0d7d              return 1;
005c0cdc          }
005c0cdc          
005c0ce4          if (ebp == 0)
005c0ce4          {
005c0ce6              SmartArray<Template_CG,1>::Reset(this);
005c0ced              int32_t eax_2;
005c0ced              eax_2 = 1;
005c0cf0              return 1;
005c0ce4          }
005c0ce4          
005c0cfc          eax = operator new[](((ebp << 6) + 4));
005c0cfc          
005c0d06          if (eax != 0)
005c0d06          {
005c0d0e              void* ebx_1 = &eax[1];
005c0d14              *(uint32_t*)eax = ebp;
005c0d16              `vector constructor iterator'(ebx_1, 0x40, ebp, Template_CG::Template_CG);
005c0d16              
005c0d1d              if (ebx_1 != 0)
005c0d1d              {
005c0d22                  if (this->m_data != 0)
005c0d22                  {
005c0d24                      uint32_t m_num = this->m_num;
005c0d24                      
005c0d28                      if ((m_num - 1) >= 0)
005c0d28                      {
005c0d2d                          void* esi_2 = ((m_num - 1) << 6);
005c0d31                          arg2 = m_num;
005c0d4e                          bool cond:0_1;
005c0d4e                          
005c0d4e                          do
005c0d4e                          {
005c0d3d                              Template_CG::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
005c0d46                              esi_2 -= 0x40;
005c0d49                              cond:0_1 = arg2 != 1;
005c0d4a                              arg2 -= 1;
005c0d4e                          } while (cond:0_1);
005c0d28                      }
005c0d28                      
005c0d5e                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005c0d5e                      {
005c0d60                          class Template_CG* m_data = this->m_data;
005c0d60                          
005c0d64                          if (m_data != 0)
005c0d68                              Template_CG::`vector deleting destructor'(m_data, 3);
005c0d5e                      }
005c0d22                  }
005c0d22                  
005c0d73                  this->m_data = ebx_1;
005c0d75                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
005c0d7a                  eax = 1;
005c0d7d                  return 1;
005c0d1d              }
005c0d06          }
005c0ccc      }
005c0ccc      
005c0d82      eax = 0;
005c0d85      return 0;
005c0cc0  }

005c0d88                          90 90 90 90 90 90 90 90                                                          ........

005c0d90  void __fastcall SmartArray<ACCharGenStartArea,1>::Reset(class SmartArray<ACCharGenStartArea,1>* this)

005c0d90  {
005c0d97      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005c0daa      this->m_num = 0;
005c0daa      
005c0dad      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005c0dad      {
005c0daf          class ACCharGenStartArea* m_data = this->m_data;
005c0daf          
005c0db3          if (m_data != 0)
005c0db7              ACCharGenStartArea::`vector deleting destructor'(m_data, 3);
005c0db7          
005c0dbc          this->m_data = 0;
005c0dbe          this->m_sizeAndDeallocate = 0;
005c0dc6          return;
005c0dad      }
005c0dad      
005c0dc9      if (this->m_data != 0)
005c0dc9      {
005c0dcb          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
005c0dcb          
005c0dd1          if ((i_2 - 1) >= 0)
005c0dd1          {
005c0dd8              int32_t esi_2 = ((i_2 - 1) * 0x14);
005c0ddb              int32_t i_1 = i_2;
005c0e22              int32_t i;
005c0e22              
005c0e22              do
005c0e22              {
005c0de0                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005c0de5                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005c0ded                  int32_t var_14 = 0x7e76d4;
005c0df5                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005c0e04                  int32_t var_c_1 = 0;
005c0e08                  int32_t var_8_1 = 0;
005c0e0c                  int32_t var_4_1 = 0;
005c0e10                  ACCharGenStartArea::operator=((this->m_data + esi_2), &var_14);
005c0e19                  ACCharGenStartArea::~ACCharGenStartArea(&var_14);
005c0e1e                  esi_2 -= 0x14;
005c0e21                  i = i_1;
005c0e21                  i_1 -= 1;
005c0e22              } while (i != 1);
005c0dd1          }
005c0dc9      }
005c0d90  }

005c0e2c                                      90 90 90 90                                                              ....

005c0e30  void __thiscall ACCharGenStartArea::ACCharGenStartArea(class ACCharGenStartArea* this, class ACCharGenStartArea const* arg2)

005c0e30  {
005c0e38      this->vtable = 0x7e76d4;
005c0e3e      class PSRefBufferCharData<char>* m_charbuffer = arg2->name.m_charbuffer;
005c0e41      this->name.m_charbuffer = m_charbuffer;
005c0e48      InterlockedIncrement(&m_charbuffer[-1]);
005c0e4e      this->mPositionList.m_data = 0;
005c0e4e      this->mPositionList.m_sizeAndDeallocate = 0;
005c0e4e      this->mPositionList.m_num = 0;
005c0e5f      SmartArray<Position,1>::operator=(&this->mPositionList, &arg2->mPositionList.m_data);
005c0e30  }

005c0e6b                                   90 90 90 90 90                                                             .....

005c0e70  void __thiscall ACCharGenStartArea::Serialize(class ACCharGenStartArea* this, class Archive* arg2)

005c0e70  {
005c0e72      class Archive* edi = arg2;
005c0e7c      PStringBase<char>::Serialize(&this->name, edi);
005c0e8b      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mPositionList, edi);
005c0e70  }

005c0e98                                                                          90 90 90 90 90 90 90 90                          ........

005c0ea0  void __thiscall ACCharGenData::GetSubDataIDs(class ACCharGenData const* this, class QualifiedDataIDArray* arg2)

005c0ea0  {
005c0eae      void __return;
005c0eae      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->mHeritageGroupList.m_intrusiveTable, &__return);
005c0eb3      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
005c0eb8      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
005c0eba      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
005c0eba      
005c0ebd      if (i_1 != 0)
005c0ebd      {
005c0ec8          while (true)
005c0ec8          {
005c0ec8              HeritageGroup_CG::GetSubDataIDs(&i_1->m_data, arg2);
005c0ecd              i_1 = i_1->m_hashNext;
005c0ecd              
005c0ed2              if (i_1 == 0)
005c0ed2              {
005c0eeb                  class HashTableData<unsigned long,DBOCache *>* i;
005c0eeb                  
005c0eeb                  do
005c0eeb                  {
005c0ee0                      m_currBucket = &m_currBucket[1];
005c0ee0                      
005c0ee5                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
005c0efa                          return;
005c0efa                      
005c0ee7                      i = *(uint32_t*)m_currBucket;
005c0eeb                  } while (i == 0);
005c0eeb                  
005c0eed                  i_1 = i;
005c0eed                  
005c0ef1                  if (i_1 == 0)
005c0ef1                      break;
005c0ed2              }
005c0ec8          }
005c0ebd      }
005c0ea0  }

005c0efd                                                                                         90 90 90                               ...

005c0f00  class Sex_CG& __thiscall Sex_CG::operator=(class Sex_CG* this, class Sex_CG const& arg2)

005c0f00  {
005c0f08      class PSRefBufferCharData<char>* m_charbuffer = this->name.m_charbuffer;
005c0f08      
005c0f0e      if (m_charbuffer != arg2->name.m_charbuffer)
005c0f0e      {
005c0f24          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005c0f2c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005c0f2c          
005c0f2e          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->name.m_charbuffer;
005c0f31          this->name.m_charbuffer = m_charbuffer_1;
005c0f38          InterlockedIncrement(&m_charbuffer_1[-1]);
005c0f0e      }
005c0f0e      
005c0f42      this->scaling = arg2->scaling;
005c0f48      this->setup.id = arg2->setup.id;
005c0f51      this->soundTable.id = arg2->soundTable.id;
005c0f5b      this->iconImage.id = arg2->iconImage.id;
005c0f5e      ObjDesc::operator=(&this->objDesc, &arg2->objDesc);
005c0f66      this->physicsTable.id = arg2->physicsTable.id;
005c0f6c      this->motionTable.id = arg2->motionTable.id;
005c0f72      this->combatTable.id = arg2->combatTable.id;
005c0f7b      this->basePalette.id = arg2->basePalette.id;
005c0f85      this->skinPalSet.id = arg2->skinPalSet.id;
005c0f88      SmartArray<IDClass<_tagDataID,32,0>,1>::operator=(&this->mHairColorList.m_data, &arg2->mHairColorList);
005c0f94      SmartArray<HairStyle_CG,1>::operator=(&this->mHairStyleList.m_data, &arg2->mHairStyleList);
005c0fa0      SmartArray<IDClass<_tagDataID,32,0>,1>::operator=(&this->mEyeColorList.m_data, &arg2->mEyeColorList);
005c0fac      SmartArray<EyesStrip_CG,1>::operator=(&this->mEyeStripList.m_data, &arg2->mEyeStripList);
005c0fbe      SmartArray<FaceStrip_CG,1>::operator=(&this->mNoseStripList.m_data, &arg2->mNoseStripList);
005c0fd0      SmartArray<FaceStrip_CG,1>::operator=(&this->mMouthStripList.m_data, &arg2->mMouthStripList);
005c0fe2      SmartArray<Style_CG,1>::operator=(&this->mHeadgearList.m_data, &arg2->mHeadgearList);
005c0ff4      SmartArray<Style_CG,1>::operator=(&this->mShirtList.m_data, &arg2->mShirtList);
005c1006      SmartArray<Style_CG,1>::operator=(&this->mPantsList.m_data, &arg2->mPantsList);
005c1018      SmartArray<Style_CG,1>::operator=(&this->mFootwearList.m_data, &arg2->mFootwearList);
005c102a      SmartArray<unsigned long,1>::operator=(&this->mClothingColorsList, &arg2->mClothingColorsList.m_data);
005c1033      return this;
005c0f00  }

005c1036                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005c1040  int32_t* __thiscall SmartArray<Template_CG,1>::operator=(int32_t* arg1, int32_t* arg2)

005c1040  {
005c1061      if ((arg1[1] & 0x7fffffff) >= (arg2[1] & 0x7fffffff))
005c1061      {
005c1083      label_5c1083:
005c1083          class Template_CG* edi_1 = *(uint32_t*)arg2;
005c108b          void* ebx_3 = &edi_1[arg2[2]];
005c108f          class Template_CG* var_44_1 = *(uint32_t*)arg1;
005c108f          
005c1093          while (edi_1 < ebx_3)
005c1093          {
005c109a              Template_CG::operator=(var_44_1, edi_1);
005c10a3              edi_1 = &edi_1[1];
005c10ab              var_44_1 = &var_44_1[1];
005c1093          }
005c1093          
005c10b5          int32_t ebx_4 = arg2[2];
005c10bb          int32_t var_44_2 = ebx_4;
005c10bb          
005c10bf          if (ebx_4 < arg1[2])
005c10bf          {
005c10c5              int32_t var_40 = 0x79fe78;
005c10cd              int32_t ebx_5 = (ebx_4 << 6);
005c11a6              bool cond:3_1;
005c11a6              
005c11a6              do
005c11a6              {
005c10d0                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005c10dd                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005c10f1                  class Template_CG* ecx_8 = (*(uint32_t*)arg1 + ebx_5);
005c10f3                  uint32_t id = INVALID_DID.id;
005c10f7                  int32_t s;
005c10f7                  __builtin_memset(&s, 0, 0x34);
005c112b                  Template_CG::operator=(ecx_8, &var_40);
005c1140                  var_40 = 0x79fe78;
005c1148                  int32_t var_8;
005c1148                  void* var_c;
005c1148                  
005c1148                  if ((var_8 & 0x80000000) == 0x80000000)
005c114f                      operator delete[](var_c);
005c1165                  int32_t var_14;
005c1165                  void* var_18;
005c1165                  
005c1165                  if ((var_14 & 0x80000000) == 0x80000000)
005c116c                      operator delete[](var_18);
005c116c                  
005c118b                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
005c1193                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
005c1193                  
005c119d                  ebx_5 += 0x40;
005c11a0                  cond:3_1 = (var_44_2 + 1) < arg1[2];
005c11a2                  var_44_2 += 1;
005c11a6              } while (cond:3_1);
005c10bf          }
005c10bf          
005c11b3          arg1[2] = arg2[2];
005c1061      }
005c1061      else
005c1061      {
005c1063          arg1[2] = 0;
005c1063          
005c1079          if (SmartArray<Template_CG,1>::grow(arg1, (arg2[1] & 0x7fffffff)) != 0)
005c1079              goto label_5c1083;
005c1061      }
005c1061      
005c11bf      return arg1;
005c1040  }

005c11c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005c11d0  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class Sex_CG** arg1, class SmartArray<Style_CG,1>* arg2, class Archive* arg3)

005c11d0  {
005c11db      class SmartArray<Style_CG,1>* esi = arg2;
005c11ea      arg2 = esi->m_num;
005c11ee      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005c11fb      int32_t ebx;
005c11fb      ebx = 0;
005c11fb      
005c11ff      if ((!(arg3->m_flags) & 1) != 0)
005c11ff      {
005c1203          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005c1208          class SmartArray<Style_CG,1>* edi_1 = arg2;
005c1208          
005c120e          if (edi_1 > eax_2)
005c1216              /* tailcall */
005c1216              return Archive::RaiseError(arg3);
005c1216          
005c121b          uint32_t m_num = esi->m_num;
005c121b          
005c1220          if (edi_1 > m_num)
005c1220          {
005c1225              SmartArray<Style_CG,1>::grow(esi, edi_1);
005c122a              esi->m_num = edi_1;
005c1220          }
005c1220          else if (edi_1 < m_num)
005c122f          {
005c1233              esi->m_num = edi_1;
005c1236              SmartArray<Style_CG,1>::shrink(esi);
005c122f          }
005c122f          
005c123b          ebx = 1;
005c11ff      }
005c11ff      
005c1240      class Style_CG* m_data = esi->m_data;
005c1240      
005c1249      if (m_data != &m_data[esi->m_num])
005c1249      {
005c1270          do
005c1270          {
005c1250              m_data->vtable->Serialize(arg3);
005c1250              
005c125f              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005c125f              {
005c1280                  if ((ebx == 0 || esi->m_num <= 0))
005c1280                      break;
005c1280                  
005c1283                  esi->m_num = 0;
005c128f                  /* tailcall */
005c128f                  return SmartArray<Style_CG,1>::shrink(esi);
005c125f              }
005c125f              
005c1269              m_data = &m_data[1];
005c1270          } while (m_data != &esi->m_data[esi->m_num]);
005c1249      }
005c11d0  }

005c124d                                         8d 49 00                                                               .I.
005c1294                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c12a0  uint8_t __thiscall SmartArray<ACCharGenStartArea,1>::grow(class SmartArray<ACCharGenStartArea,1>* this, uint32_t arg2)

005c12a0  {
005c12a2      uint32_t ebp = arg2;
005c12ac      uint32_t* eax;
005c12ac      
005c12ac      if (ebp >= this->m_num)
005c12ac      {
005c12bc          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
005c12bc          {
005c1367              eax = 1;
005c136a              return 1;
005c12bc          }
005c12bc          
005c12c4          if (ebp == 0)
005c12c4          {
005c12c6              SmartArray<ACCharGenStartArea,1>::Reset(this);
005c12cd              int32_t eax_2;
005c12cd              eax_2 = 1;
005c12d0              return 1;
005c12c4          }
005c12c4          
005c12df          eax = operator new[](((ebp * 0x14) + 4));
005c12df          
005c12e9          if (eax != 0)
005c12e9          {
005c12f5              void* ebx_1 = &eax[1];
005c12fb              *(uint32_t*)eax = ebp;
005c12fd              int32_t ecx_1;
005c12fd              eax = `vector constructor iterator'(ebx_1, 0x14, ebp, ACCharGenStartArea::ACCharGenStartArea);
005c12fd              
005c1304              if (ebx_1 != 0)
005c1304              {
005c1309                  if (this->m_data != 0)
005c1309                  {
005c130b                      uint32_t m_num = this->m_num;
005c130b                      
005c130f                      if ((m_num - 1) >= 0)
005c130f                      {
005c1315                          void* esi_2 = ((m_num - 1) * 0x14);
005c1319                          arg2 = m_num;
005c1339                          bool cond:0_1;
005c1339                          
005c1339                          do
005c1339                          {
005c1328                              ACCharGenStartArea::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
005c1331                              esi_2 -= 0x14;
005c1334                              cond:0_1 = arg2 != 1;
005c1335                              arg2 -= 1;
005c1339                          } while (cond:0_1);
005c130f                      }
005c130f                      
005c134b                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005c134b                      {
005c134d                          class ACCharGenStartArea* m_data = this->m_data;
005c134d                          
005c1351                          if (m_data != 0)
005c1355                              ACCharGenStartArea::`vector deleting destructor'(m_data, 3);
005c134b                      }
005c1309                  }
005c1309                  
005c1360                  this->m_data = ebx_1;
005c1362                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
005c1367                  eax = 1;
005c136a                  return 1;
005c1304              }
005c12e9          }
005c12ac      }
005c12ac      
005c136f      eax = 0;
005c1372      return 0;
005c12a0  }

005c1375                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005c1380  int32_t __thiscall ACCharGenData::GetStartingPosition(class ACCharGenData const* this, class CharGenResult const* arg2, class Position* arg3)

005c1380  {
005c1394      if ((arg2->vtable->IsAdmin() != 0 && arg2->vtable->IsEnvoy() != 0))
005c1394      {
005c13a5          arg3->objcell_id = 0xf4e6001a;
005c13bd          arg3->frame.m_fOrigin.x = ((float)(((long double)arg3->frame.m_fOrigin.x) + ((long double)92f)));
005c13c9          arg3->frame.m_fOrigin.y = ((float)(((long double)arg3->frame.m_fOrigin.y) + ((long double)35f)));
005c13d5          arg3->frame.m_fOrigin.z = ((float)(((long double)arg3->frame.m_fOrigin.z) + ((long double)10f)));
005c13d8          Frame::set_heading(&arg3->frame, 90f);
005c13e7          return 1;
005c1394      }
005c1394      
005c13ea      arg2->vtable->GetStartArea();
005c13ea      
005c13ff      if (arg2->vtable->GetStartArea() < this->mStartAreaList.m_num)
005c13ff      {
005c1416          void var_14;
005c1416          ACCharGenStartArea::ACCharGenStartArea(&var_14, &this->mStartAreaList.m_data[arg2->vtable->GetStartArea()]);
005c1421          int32_t var_4;
005c1421          
005c1421          if (var_4 > 0)
005c1421          {
005c1439              int32_t eax_12 = Random::RollDice(1, var_4);
005c1456              int32_t var_c;
005c1456              arg3->objcell_id = *(uint32_t*)((var_c + (eax_12 * 0x48)) - 0x44);
005c145d              Frame::operator=(&arg3->frame, ((var_c + (eax_12 * 0x48)) - 0x40));
005c1466              ACCharGenStartArea::~ACCharGenStartArea(&var_14);
005c1475              return 1;
005c1421          }
005c1421          
005c1427          ACCharGenStartArea::~ACCharGenStartArea(&var_14);
005c13ff      }
005c13ff      
005c1433      return 0;
005c1380  }

005c1478                                                                          90 90 90 90 90 90 90 90                          ........

005c1480  void __thiscall Sex_CG::Sex_CG(class Sex_CG* this, class Sex_CG const* arg2)

005c1480  {
005c1489      this->vtable = 0x79fe7c;
005c148f      class PSRefBufferCharData<char>* m_charbuffer = arg2->name.m_charbuffer;
005c1492      this->name.m_charbuffer = m_charbuffer;
005c1499      InterlockedIncrement(&m_charbuffer[-1]);
005c14a2      this->scaling = arg2->scaling;
005c14a8      this->setup.id = arg2->setup.id;
005c14b1      this->soundTable.id = arg2->soundTable.id;
005c14bb      this->iconImage.id = arg2->iconImage.id;
005c14be      ObjDesc::ObjDesc(&this->objDesc, &arg2->objDesc);
005c14c6      this->physicsTable.id = arg2->physicsTable.id;
005c14cc      this->motionTable.id = arg2->motionTable.id;
005c14d2      this->combatTable.id = arg2->combatTable.id;
005c14d8      this->basePalette.id = arg2->basePalette.id;
005c14e1      this->skinPalSet.id = arg2->skinPalSet.id;
005c14de      this->mHairColorList.m_data = 0;
005c14de      this->mHairColorList.m_sizeAndDeallocate = 0;
005c14de      this->mHairColorList.m_num = 0;
005c14f2      SmartArray<IDClass<_tagDataID,32,0>,1>::operator=(&this->mHairColorList, &arg2->mHairColorList.m_data);
005c14f7      this->mHairStyleList.m_data = 0;
005c14f7      this->mHairStyleList.m_sizeAndDeallocate = 0;
005c14f7      this->mHairStyleList.m_num = 0;
005c1506      SmartArray<HairStyle_CG,1>::operator=(&this->mHairStyleList, &arg2->mHairStyleList.m_data);
005c150b      this->mEyeColorList.m_data = 0;
005c150b      this->mEyeColorList.m_sizeAndDeallocate = 0;
005c150b      this->mEyeColorList.m_num = 0;
005c151a      SmartArray<IDClass<_tagDataID,32,0>,1>::operator=(&this->mEyeColorList, &arg2->mEyeColorList.m_data);
005c151f      this->mEyeStripList.m_data = 0;
005c151f      this->mEyeStripList.m_sizeAndDeallocate = 0;
005c151f      this->mEyeStripList.m_num = 0;
005c152e      SmartArray<EyesStrip_CG,1>::operator=(&this->mEyeStripList, &arg2->mEyeStripList.m_data);
005c1533      this->mNoseStripList.m_data = 0;
005c1533      this->mNoseStripList.m_sizeAndDeallocate = 0;
005c1533      this->mNoseStripList.m_num = 0;
005c1548      SmartArray<FaceStrip_CG,1>::operator=(&this->mNoseStripList, &arg2->mNoseStripList.m_data);
005c154d      this->mMouthStripList.m_data = 0;
005c154d      this->mMouthStripList.m_sizeAndDeallocate = 0;
005c154d      this->mMouthStripList.m_num = 0;
005c1562      SmartArray<FaceStrip_CG,1>::operator=(&this->mMouthStripList, &arg2->mMouthStripList.m_data);
005c1567      this->mHeadgearList.m_data = 0;
005c1567      this->mHeadgearList.m_sizeAndDeallocate = 0;
005c1567      this->mHeadgearList.m_num = 0;
005c157c      SmartArray<Style_CG,1>::operator=(&this->mHeadgearList, &arg2->mHeadgearList.m_data);
005c1581      this->mShirtList.m_data = 0;
005c1581      this->mShirtList.m_sizeAndDeallocate = 0;
005c1581      this->mShirtList.m_num = 0;
005c1596      SmartArray<Style_CG,1>::operator=(&this->mShirtList, &arg2->mShirtList.m_data);
005c159b      this->mPantsList.m_data = 0;
005c159b      this->mPantsList.m_sizeAndDeallocate = 0;
005c159b      this->mPantsList.m_num = 0;
005c15b0      SmartArray<Style_CG,1>::operator=(&this->mPantsList, &arg2->mPantsList.m_data);
005c15b5      this->mFootwearList.m_data = 0;
005c15b5      this->mFootwearList.m_sizeAndDeallocate = 0;
005c15b5      this->mFootwearList.m_num = 0;
005c15ca      SmartArray<Style_CG,1>::operator=(&this->mFootwearList, &arg2->mFootwearList.m_data);
005c15cf      this->mClothingColorsList.m_data = 0;
005c15cf      this->mClothingColorsList.m_sizeAndDeallocate = 0;
005c15cf      this->mClothingColorsList.m_num = 0;
005c15e4      SmartArray<unsigned long,1>::operator=(&this->mClothingColorsList, &arg2->mClothingColorsList.m_data);
005c1480  }

005c15f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005c1600  void __thiscall Sex_CG::Serialize(class Sex_CG* this, class Archive* arg2)

005c1600  {
005c1602      class Archive* esi = arg2;
005c160d      PStringBase<char>::Serialize(&this->name, esi);
005c1616      Archive::CheckAlignment(esi, 4);
005c161f      uint8_t* eax = Archive::GetBytes(esi, 4);
005c161f      
005c1628      if (eax != 0)
005c1628      {
005c162d          if ((esi->m_flags & 1) == 0)
005c1638              this->scaling = *(uint32_t*)eax;
005c162d          else
005c1632              *(uint32_t*)eax = this->scaling;
005c1628      }
005c1628      
005c163f      Archive::CheckAlignment(esi, 4);
005c1648      uint8_t* eax_1 = Archive::GetBytes(esi, 4);
005c1648      
005c164f      if (eax_1 != 0)
005c164f      {
005c1654          if ((esi->m_flags & 1) == 0)
005c165f              this->setup.id = *(uint32_t*)eax_1;
005c1654          else
005c1659              *(uint32_t*)eax_1 = this->setup.id;
005c164f      }
005c164f      
005c1666      Archive::CheckAlignment(esi, 4);
005c166f      uint8_t* eax_2 = Archive::GetBytes(esi, 4);
005c166f      
005c1676      if (eax_2 != 0)
005c1676      {
005c167b          if ((esi->m_flags & 1) == 0)
005c1686              this->soundTable.id = *(uint32_t*)eax_2;
005c167b          else
005c1680              *(uint32_t*)eax_2 = this->soundTable.id;
005c1676      }
005c1676      
005c168d      Archive::CheckAlignment(esi, 4);
005c1696      uint8_t* eax_3 = Archive::GetBytes(esi, 4);
005c1696      
005c169d      if (eax_3 != 0)
005c169d      {
005c16a2          if ((esi->m_flags & 1) == 0)
005c16ad              this->iconImage.id = *(uint32_t*)eax_3;
005c16a2          else
005c16a7              *(uint32_t*)eax_3 = this->iconImage.id;
005c169d      }
005c169d      
005c16b4      Archive::CheckAlignment(esi, 4);
005c16bd      uint8_t* eax_4 = Archive::GetBytes(esi, 4);
005c16bd      
005c16c4      if (eax_4 != 0)
005c16c4      {
005c16c9          if ((esi->m_flags & 1) == 0)
005c16d4              this->basePalette.id = *(uint32_t*)eax_4;
005c16c9          else
005c16ce              *(uint32_t*)eax_4 = this->basePalette.id;
005c16c4      }
005c16c4      
005c16db      Archive::CheckAlignment(esi, 4);
005c16e4      uint8_t* eax_5 = Archive::GetBytes(esi, 4);
005c16e4      
005c16eb      if (eax_5 != 0)
005c16eb      {
005c16f0          if ((esi->m_flags & 1) == 0)
005c16fb              this->skinPalSet.id = *(uint32_t*)eax_5;
005c16f0          else
005c16f5              *(uint32_t*)eax_5 = this->skinPalSet.id;
005c16eb      }
005c16eb      
005c1702      Archive::CheckAlignment(esi, 4);
005c170b      uint8_t* eax_6 = Archive::GetBytes(esi, 4);
005c170b      
005c1712      if (eax_6 != 0)
005c1712      {
005c1717          if ((esi->m_flags & 1) == 0)
005c1722              this->physicsTable.id = *(uint32_t*)eax_6;
005c1717          else
005c171c              *(uint32_t*)eax_6 = this->physicsTable.id;
005c1712      }
005c1712      
005c1729      Archive::CheckAlignment(esi, 4);
005c1732      uint8_t* eax_7 = Archive::GetBytes(esi, 4);
005c1732      
005c1739      if (eax_7 != 0)
005c1739      {
005c173e          if ((esi->m_flags & 1) == 0)
005c1749              this->motionTable.id = *(uint32_t*)eax_7;
005c173e          else
005c1743              *(uint32_t*)eax_7 = this->motionTable.id;
005c1739      }
005c1739      
005c1750      Archive::CheckAlignment(esi, 4);
005c1759      uint32_t* eax_8;
005c1759      uint32_t id;
005c1759      uint32_t edx_9;
005c1759      eax_8 = Archive::GetBytes(esi, 4);
005c1759      
005c1760      if (eax_8 != 0)
005c1760      {
005c1765          if ((esi->m_flags & 1) == 0)
005c1765          {
005c176e              edx_9 = *(uint32_t*)eax_8;
005c1770              this->combatTable.id = edx_9;
005c1765          }
005c1765          else
005c1765          {
005c1767              id = this->combatTable.id;
005c176a              *(uint32_t*)eax_8 = id;
005c1765          }
005c1760      }
005c1760      
005c1773      class Archive* var_10_1 = esi;
005c1777      class Sex_CG** var_14 = &this->objDesc.vtable;
005c177c      class Archive** var_18 = &arg2;
005c177d      SB_AsPackObj<1>::Serialize(&this->objDesc.vtable, edx_9, id);
005c178c      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mHairColorList, esi);
005c179b      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mHairStyleList, esi);
005c17aa      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mEyeColorList, esi);
005c17b9      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mEyeStripList, esi);
005c17cb      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mNoseStripList, esi);
005c17e0      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mMouthStripList, esi);
005c17f2      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mHeadgearList, esi);
005c1804      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mShirtList, esi);
005c1816      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mPantsList, esi);
005c1828      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mFootwearList, esi);
005c183a      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mClothingColorsList, esi);
005c1600  }

005c1848                          90 90 90 90 90 90 90 90                                                          ........

005c1850  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>* this, uint32_t arg2)

005c1850  {
005c185b      arg2 = arg2;
005c185f      uint8_t edx = ((int8_t)arg2);
005c1863      this->m_buckets = nullptr;
005c1866      this->m_firstInterestingBucket = nullptr;
005c1869      this->m_numBuckets = 0;
005c186c      this->m_numElements = 0;
005c1870      this->vtable = 0x7e76d0;
005c1876      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005c1889      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
005c1889      
005c1893      if (eax == bucketSizesEnd_1)
005c1895          eax -= 4;
005c1895      
005c1898      uint32_t eax_1 = *(uint32_t*)eax;
005c189d      this->m_numBuckets = eax_1;
005c189d      
005c18a0      if (eax_1 > 0x17)
005c18b6          this->m_buckets = operator new[]((eax_1 << 2));
005c18a0      else
005c18a5          this->m_buckets = &this->m_aInplaceBuckets;
005c18a5      
005c18bc      class HashTableData<unsigned long,HeritageGroup_CG>** m_buckets = this->m_buckets;
005c18bf      uint32_t ecx_3 = (this->m_numBuckets << 2);
005c18c5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
005c18d6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
005c1850  }

005c18df                                                                                               90                                 .

005c18e0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>* this, uint32_t arg2)

005c18e0  {
005c18eb      arg2 = arg2;
005c18ef      uint8_t edx = ((int8_t)arg2);
005c18f3      this->m_buckets = nullptr;
005c18f6      this->m_firstInterestingBucket = nullptr;
005c18f9      this->m_numBuckets = 0;
005c18fc      this->m_numElements = 0;
005c1900      this->vtable = 0x79fe74;
005c1906      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005c1919      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
005c1919      
005c1923      if (eax == bucketSizesEnd_1)
005c1925          eax -= 4;
005c1925      
005c1928      uint32_t eax_1 = *(uint32_t*)eax;
005c192d      this->m_numBuckets = eax_1;
005c192d      
005c1930      if (eax_1 > 0x17)
005c1946          this->m_buckets = operator new[]((eax_1 << 2));
005c1930      else
005c1935          this->m_buckets = &this->m_aInplaceBuckets;
005c1935      
005c194c      class HashTableData<unsigned long,Sex_CG>** m_buckets = this->m_buckets;
005c194f      uint32_t ecx_3 = (this->m_numBuckets << 2);
005c1955      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
005c1966      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
005c18e0  }

005c196f                                               90                                                                 .

005c1970  uint8_t __thiscall SmartArray<ACCharGenStartArea,1>::SetNElements(class SmartArray<ACCharGenStartArea,1>* this, uint32_t const arg2, uint8_t arg3)

005c1970  {
005c197a      uint32_t const esi = arg2;
005c1985      uint32_t eax_1;
005c1985      
005c1985      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= esi)
005c1985      {
005c19b6          uint32_t const var_1c_1 = esi;
005c19b6          
005c19ba          if (esi < this->m_num)
005c19ba          {
005c19c7              arg3 = (esi * 0x14);
005c1a66              bool cond:1_1;
005c1a66              
005c1a66              do
005c1a66              {
005c19d0                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005c19da                  int32_t var_14 = 0x7e76d4;
005c19e2                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005c19e6                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005c19f5                  void* esi_2 = (this->m_data + arg3);
005c19f7                  int32_t var_c = 0;
005c19fb                  int32_t var_8_1 = 0;
005c19ff                  int32_t var_4_1 = 0;
005c1a03                  void* eax_5 = *(uint32_t*)((char*)esi_2 + 4);
005c1a03                  
005c1a08                  if (eax_5 != PStringBase<char>::s_NullBuffer_1)
005c1a08                  {
005c1a25                      if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
005c1a2b                          **(uint32_t**)((char*)eax_5 - 0x14)(1);
005c1a2b                      
005c1a2e                      *(uint32_t*)((char*)esi_2 + 4) = PStringBase<char>::s_NullBuffer_1;
005c1a31                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005c1a08                  }
005c1a08                  
005c1a3f                  SmartArray<Position,1>::operator=(((char*)esi_2 + 8), &var_c);
005c1a48                  ACCharGenStartArea::~ACCharGenStartArea(&var_14);
005c1a5c                  cond:1_1 = (var_1c_1 + 1) < this->m_num;
005c1a5e                  var_1c_1 += 1;
005c1a62                  arg3 += 0x14;
005c1a66              } while (cond:1_1);
005c1a6c              esi = arg2;
005c19ba          }
005c1985      }
005c1985      else
005c1985      {
005c1987          eax_1 = arg3;
005c198d          uint32_t const eax_2;
005c198d          
005c198d          if (eax_1 == 0)
005c1996              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, esi);
005c198d          else
005c198f              eax_2 = esi;
005c198f          
005c199e          eax_1 = SmartArray<ACCharGenStartArea,1>::grow(this, eax_2);
005c199e          
005c19a5          if (eax_1 == 0)
005c19b0              return eax_1;
005c1985      }
005c1985      
005c1a72      this->m_num = esi;
005c1a76      eax_1 = 1;
005c1a7c      return 1;
005c1970  }

005c1a7f                                                                                               90                                 .

005c1a80  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class HeritageGroup_CG** arg1, class SmartArray<Template_CG,1>* arg2, class Archive* arg3)

005c1a80  {
005c1a8b      class SmartArray<Template_CG,1>* esi = arg2;
005c1a9a      arg2 = esi->m_num;
005c1a9e      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005c1aab      int32_t ebx;
005c1aab      ebx = 0;
005c1aab      
005c1aaf      if ((!(arg3->m_flags) & 1) != 0)
005c1aaf      {
005c1ab3          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005c1ab8          class SmartArray<Template_CG,1>* edi_1 = arg2;
005c1ab8          
005c1abe          if (edi_1 > eax_2)
005c1ac6              /* tailcall */
005c1ac6              return Archive::RaiseError(arg3);
005c1ac6          
005c1acb          uint32_t m_num = esi->m_num;
005c1acb          
005c1ad0          if (edi_1 > m_num)
005c1ad0          {
005c1ad5              SmartArray<Template_CG,1>::grow(esi, edi_1);
005c1ada              esi->m_num = edi_1;
005c1ad0          }
005c1ad0          else if (edi_1 < m_num)
005c1adf          {
005c1ae3              esi->m_num = edi_1;
005c1ae6              SmartArray<Template_CG,1>::shrink(esi);
005c1adf          }
005c1adf          
005c1aeb          ebx = 1;
005c1aaf      }
005c1aaf      
005c1af0      class Template_CG* m_data = esi->m_data;
005c1af0      
005c1af9      if (m_data != &m_data[esi->m_num])
005c1af9      {
005c1b20          do
005c1b20          {
005c1b00              m_data->vtable->Serialize(arg3);
005c1b00              
005c1b0f              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005c1b0f              {
005c1b30                  if ((ebx == 0 || esi->m_num <= 0))
005c1b30                      break;
005c1b30                  
005c1b33                  esi->m_num = 0;
005c1b3f                  /* tailcall */
005c1b3f                  return SmartArray<Template_CG,1>::shrink(esi);
005c1b0f              }
005c1b0f              
005c1b19              m_data = &m_data[1];
005c1b20          } while (m_data != &esi->m_data[esi->m_num]);
005c1af9      }
005c1a80  }

005c1afd                                                                                         8d 49 00                               .I.
005c1b44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c1b50  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>* this)

005c1b50  {
005c1b55      if (this->m_numElements != 0)
005c1b55      {
005c1b58          int32_t* m_firstInterestingBucket_2;
005c1b58          int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
005c1bba          uint32_t i;
005c1bba          
005c1bba          do
005c1bba          {
005c1b66              void* edx_2 = &this->m_buckets[this->m_numBuckets];
005c1b6c              class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >* edx_3;
005c1b6c              
005c1b6c              if (this->m_firstInterestingBucket == edx_2)
005c1b6c              {
005c1b82              label_5c1b82:
005c1b82                  m_firstInterestingBucket_2 = nullptr;
005c1b84                  edx_3 = nullptr;
005c1b6c              }
005c1b6c              else
005c1b6c              {
005c1b70                  while (true)
005c1b70                  {
005c1b70                      class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
005c1b70                      
005c1b76                      if (*(uint32_t*)m_firstInterestingBucket != 0)
005c1b76                      {
005c1b88                          class HashTableData<unsigned long,IDClass<_tagDataID,32,0> >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
005c1b8b                          edx_3 = *(uint32_t*)m_firstInterestingBucket_1;
005c1b8d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
005c1b8d                          break;
005c1b76                      }
005c1b76                      
005c1b7d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
005c1b7d                      
005c1b80                      if (&m_firstInterestingBucket[1] == edx_2)
005c1b80                          goto label_5c1b82;
005c1b70                  }
005c1b6c              }
005c1b6c              
005c1b8f              void* eax_2 = *(uint32_t*)m_firstInterestingBucket_2;
005c1b8f              
005c1b93              if (eax_2 == edx_3)
005c1ba5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_2 + 4);
005c1b93              else
005c1b93              {
005c1b9c                  void* esi_1;
005c1b9c                  
005c1b9c                  do
005c1b9c                  {
005c1b95                      esi_1 = eax_2;
005c1b97                      eax_2 = *(uint32_t*)((char*)eax_2 + 4);
005c1b9c                  } while (eax_2 != edx_3);
005c1b9c                  
005c1ba0                  if (esi_1 != 0)
005c1bac                      *(uint32_t*)((char*)esi_1 + 4) = *(uint32_t*)((char*)eax_2 + 4);
005c1ba0                  else
005c1ba5                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_2 + 4);
005c1b93              }
005c1b93              
005c1bb2              i = (this->m_numElements - 1);
005c1bb7              this->m_numElements = i;
005c1bba          } while (i != 0);
005c1b55      }
005c1b50  }

005c1bbf                                                                                               90                                 .

005c1bc0  class Sex_CG const* __thiscall HeritageGroup_CG::GetSX(class HeritageGroup_CG const* this, class Sex_CG const* __return, uint32_t arg3)

005c1bc0  {
005c1bcd      void var_dc;
005c1bcd      Sex_CG::Sex_CG(&var_dc);
005c1bcd      
005c1bf0      for (int32_t* i = this->mGenderList.m_intrusiveTable.m_buckets[(COMBINE(0, arg3) % this->mGenderList.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
005c1bf0      {
005c1bf4          if (*(uint32_t*)i == arg3)
005c1bf4          {
005c1c01              if (i != 0)
005c1c0b                  Sex_CG::operator=(&var_dc, &i[2]);
005c1c0b              
005c1c01              break;
005c1bf4          }
005c1bf0      }
005c1bf0      
005c1c1e      Sex_CG::Sex_CG(__return, &var_dc);
005c1c27      Sex_CG::~Sex_CG(&var_dc);
005c1c35      return __return;
005c1bc0  }

005c1c38                                                                          90 90 90 90 90 90 90 90                          ........

005c1c40  void SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(class ACCharGenData** arg1, class SmartArray<ACCharGenStartArea,1>* arg2, class Archive* arg3)

005c1c40  {
005c1c4c      class SmartArray<ACCharGenStartArea,1>* edi = arg2;
005c1c5a      arg2 = edi->m_num;
005c1c5e      SB_As32Bit_Compressed::Serialize(arg1, &arg2, arg3);
005c1c6b      int32_t ebx;
005c1c6b      ebx = 0;
005c1c6b      
005c1c6f      if ((!(arg3->m_flags) & 1) != 0)
005c1c6f      {
005c1c73          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
005c1c78          class SmartArray<ACCharGenStartArea,1>* esi_1 = arg2;
005c1c78          
005c1c7e          if (esi_1 > eax_2)
005c1c86              /* tailcall */
005c1c86              return Archive::RaiseError(arg3);
005c1c86          
005c1c8b          uint32_t m_num = edi->m_num;
005c1c8b          
005c1c90          if (esi_1 > m_num)
005c1c90          {
005c1c95              SmartArray<ACCharGenStartArea,1>::grow(edi, esi_1);
005c1c9a              edi->m_num = esi_1;
005c1c90          }
005c1c90          else if (esi_1 < m_num)
005c1c9f          {
005c1ca3              edi->m_num = esi_1;
005c1ca6              SmartArray<ACCharGenStartArea,1>::shrink(edi);
005c1c9f          }
005c1c9f          
005c1cab          ebx = 1;
005c1c6f      }
005c1c6f      
005c1cb0      class ACCharGenStartArea* m_data = edi->m_data;
005c1cb0      
005c1cba      if (m_data != &m_data[edi->m_num])
005c1cba      {
005c1ce2          do
005c1ce2          {
005c1cc0              m_data->vtable->Serialize(arg3);
005c1cc0              
005c1cd0              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
005c1cd0              {
005c1cf2                  if ((ebx == 0 || edi->m_num <= 0))
005c1cf2                      break;
005c1cf2                  
005c1cf4                  edi->m_num = 0;
005c1d01                  /* tailcall */
005c1d01                  return SmartArray<ACCharGenStartArea,1>::shrink(edi);
005c1cd0              }
005c1cd0              
005c1cda              m_data = &m_data[1];
005c1ce2          } while (m_data != &edi->m_data[edi->m_num]);
005c1cba      }
005c1c40  }

005c1d06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005c1d10  void ?SerializeIntrusiveHashTable@?$@PAVHeritageGroup_CG@@V?$IntrusiveHashTable@KPAV?$HashTableData@KVSex_CG@@@@$0A@@@PAV?$HashTableData@KVSex_CG@@@@USB_HashData@?$SB_Hash@USB_Default@@U1@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABQAVHeritageGroup_CG@@AAV?$IntrusiveHashTable@KPAV?$HashTableData@KVSex_CG@@@@$0A@@@AAVArchive@@@Z(class HeritageGroup_CG** arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>* arg2, class Archive* arg3)

005c1d10  {
005c1d16      class Archive* esi = arg3;
005c1d16      
005c1d22      if ((!(esi->m_flags) & 1) != 0)
005c1d28          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
005c1d28      
005c1d36      int32_t ebx;
005c1d36      
005c1d36      if ((((int8_t)esi->m_flags) & 5) != 1)
005c1d75          ebx = arg3;
005c1d36      else
005c1d36      {
005c1d3f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005c1d45          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
005c1d4d          arg3 = arg2->m_numBuckets;
005c1d5d          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
005c1d5d          
005c1d67          if (eax_2 == bucketSizesEnd_1)
005c1d69              eax_2 -= 4;
005c1d69          
005c1d70          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
005c1d36      }
005c1d36      
005c1d7d      Archive::CheckAlignment(esi, 1);
005c1d86      char* eax_3 = Archive::GetBytes(esi, 1);
005c1d86      
005c1d8d      if (eax_3 != 0)
005c1d8d      {
005c1d93          if ((esi->m_flags & 1) == 0)
005c1d99              ebx = *(uint8_t*)eax_3;
005c1d93          else
005c1d95              *(uint8_t*)eax_3 = ebx;
005c1d8d      }
005c1d8d      
005c1d9f      if ((esi->m_flags & 5) == 0)
005c1d9f      {
005c1da7          uint32_t eax_4 = ((uint32_t)ebx);
005c1da7          
005c1dac          if (eax_4 < 0x17)
005c1dc5              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
005c1dac          else
005c1db0              Archive::RaiseError(esi);
005c1d9f      }
005c1d9f      
005c1dd1      if ((((int8_t)esi->m_flags) & 5) == 1)
005c1dda          arg3 = arg2->m_numElements;
005c1dda      
005c1de9      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
005c1de9      
005c1dfa      if ((((int8_t)esi->m_flags) & 5) == 1)
005c1dfa      {
005c1e05          void __return;
005c1e05          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
005c1e0a          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
005c1e0c          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
005c1e0f          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
005c1e0f          
005c1e14          while (i != 0)
005c1e14          {
005c1e4a              do
005c1e4a              {
005c1e1a                  Archive::CheckAlignment(esi, 4);
005c1e23                  uint8_t* eax_7 = Archive::GetBytes(esi, 4);
005c1e23                  
005c1e2a                  if (eax_7 != 0)
005c1e2a                  {
005c1e30                      if ((esi->m_flags & 1) == 0)
005c1e3a                          i->m_hashKey = *(uint32_t*)eax_7;
005c1e30                      else
005c1e34                          *(uint32_t*)eax_7 = i->m_hashKey;
005c1e2a                  }
005c1e2a                  
005c1e3c                  i->m_data->vtable(esi);
005c1e45                  i = i->m_hashNext;
005c1e4a              } while (i != 0);
005c1e4a              
005c1e55              while (true)
005c1e55              {
005c1e55                  m_currBucket = &m_currBucket[1];
005c1e55                  
005c1e5a                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
005c1e5a                      break;
005c1e5a                  
005c1e5c                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
005c1e5c                  
005c1e61                  if (i_1 != 0)
005c1e61                  {
005c1e63                      i = i_1;
005c1e65                      break;
005c1e61                  }
005c1e55              }
005c1e14          }
005c1dfa      }
005c1dfa      
005c1e6b      if ((esi->m_flags & 5) == 0)
005c1e6b      {
005c1e73          uint32_t eax_10 = Archive::GetSizeLeft(esi);
005c1e78          class Archive* ecx_17 = arg3;
005c1e78          
005c1e7e          if (ecx_17 > eax_10)
005c1f14              Archive::RaiseError(esi);
005c1e7e          else
005c1e7e          {
005c1e84              void* ebx_3 = nullptr;
005c1e86              int32_t ebp_1 = 0;
005c1e86              
005c1e8a              if (ecx_17 > 0)
005c1e8a              {
005c1e9a                  while (true)
005c1e9a                  {
005c1e9a                      void* edi_1 = operator new(0xe4);
005c1e9a                      
005c1ea1                      if (edi_1 == 0)
005c1eb4                          edi_1 = nullptr;
005c1ea1                      else
005c1ea1                      {
005c1ea6                          *(uint32_t*)((char*)edi_1 + 4) = 0;
005c1ead                          Sex_CG::Sex_CG(((char*)edi_1 + 8));
005c1ea1                      }
005c1ea1                      
005c1eba                      Archive::CheckAlignment(esi, 4);
005c1ec3                      uint8_t* eax_12 = Archive::GetBytes(esi, 4);
005c1ec3                      
005c1eca                      if (eax_12 != 0)
005c1eca                      {
005c1ed0                          if ((esi->m_flags & 1) == 0)
005c1eda                              *(uint32_t*)edi_1 = *(uint32_t*)eax_12;
005c1ed0                          else
005c1ed4                              *(uint32_t*)eax_12 = *(uint32_t*)edi_1;
005c1eca                      }
005c1eca                      
005c1ee3                      **(uint32_t**)((char*)edi_1 + 8)(esi);
005c1ee3                      
005c1eee                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
005c1f20                          return;
005c1f20                      
005c1efd                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebx_3) == 0)
005c1efd                          break;
005c1efd                      
005c1f03                      ebp_1 += 1;
005c1f06                      ebx_3 = edi_1;
005c1f06                      
005c1f08                      if (ebp_1 >= arg3)
005c1f11                          return;
005c1e9a                  }
005c1e9a                  
005c1f14                  Archive::RaiseError(esi);
005c1e8a              }
005c1e7e          }
005c1e6b      }
005c1d10  }

005c1f21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005c1f30  void* __thiscall HashTable<unsigned long,Sex_CG,0>::operator=(void* arg1, uint32_t arg2)

005c1f30  {
005c1f35      uint32_t edi = arg2;
005c1f39      void* ebx = arg1;
005c1f3d      void* var_1c = ebx;
005c1f3d      
005c1f41      if (ebx != edi)
005c1f41      {
005c1f4e          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::delete_contents(((char*)ebx + 4));
005c1f56          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005c1f5c          arg2 = *(uint32_t*)(edi + 0x6c);
005c1f73          uint32_t* eax_3 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
005c1f73          
005c1f7d          if (eax_3 == bucketSizesEnd_1)
005c1f7f              eax_3 -= 4;
005c1f7f          
005c1f87          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::resize_internal(((char*)ebx + 4), *(uint32_t*)eax_3);
005c1f94          void* ebp_1 = nullptr;
005c1f96          void __return;
005c1f96          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin((edi + 4), &__return);
005c1f9b          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
005c1f9d          class HashTableData<unsigned long,DBOCache *>* edi_1 = eax_4->m_currElement;
005c1fa9          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
005c1fa9          
005c1fad          if (edi_1 != 0)
005c1fad          {
005c1fca              while (true)
005c1fca              {
005c1fca                  void* esi_2 = operator new(0xe4);
005c1fca                  
005c1fd1                  if (esi_2 == 0)
005c1fec                      esi_2 = nullptr;
005c1fd1                  else
005c1fd1                  {
005c1fdc                      *(uint32_t*)esi_2 = edi_1->m_hashKey;
005c1fde                      *(uint32_t*)((char*)esi_2 + 4) = 0;
005c1fe5                      Sex_CG::Sex_CG(((char*)esi_2 + 8), &edi_1->m_data);
005c1fd1                  }
005c1fd1                  
005c1ff1                  int32_t ebx_1 = *(uint32_t*)((char*)ebx + 0x6c);
005c1ff8                  uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)esi_2) % ebx_1);
005c1ff8                  
005c1ffe                  if (ebp_1 == 0)
005c1ffe                  {
005c201e                  label_5c201e:
005c201e                      void** eax_13 = (*(uint32_t*)((char*)var_1c + 0x64) + (temp1_1 << 2));
005c2021                      *(uint32_t*)eax_13 = esi_2;
005c2021                      
005c2023                      if (ebp_1 == 0)
005c2025                          *(uint32_t*)((char*)var_1c + 0x68) = eax_13;
005c2025                      
005c2033                      *(uint32_t*)((char*)var_1c + 0x70) += 1;
005c1ffe                  }
005c1ffe                  else
005c1ffe                  {
005c2005                      uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)ebp_1) % ebx_1);
005c2005                      
005c2009                      if (temp1_1 == temp1_2)
005c2009                      {
005c200b                          *(uint32_t*)((char*)ebp_1 + 4) = esi_2;
005c2033                          *(uint32_t*)((char*)var_1c + 0x70) += 1;
005c2009                      }
005c2009                      else if (temp1_1 > temp1_2)
005c2010                          goto label_5c201e;
005c1ffe                  }
005c1ffe                  
005c2036                  edi_1 = edi_1->m_hashNext;
005c203b                  ebp_1 = esi_2;
005c203b                  
005c203d                  if (edi_1 == 0)
005c203d                  {
005c2054                      while (true)
005c2054                      {
005c2054                          void* m_currBucket_1 = &m_currBucket[1];
005c2059                          m_currBucket = m_currBucket_1;
005c2059                          
005c205d                          if (m_currBucket_1 != &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
005c205d                          {
005c205f                              class HashTableData<unsigned long,DBOCache *>* edx_9 = *(uint32_t*)m_currBucket_1;
005c205f                              
005c2063                              if (edx_9 == 0)
005c2063                                  continue;
005c2063                              else
005c2063                              {
005c2065                                  edi_1 = edx_9;
005c2065                                  
005c2069                                  if (edi_1 != 0)
005c2069                                      break;
005c2063                              }
005c205d                          }
005c205d                          
005c206f                          return var_1c;
005c2054                      }
005c203d                  }
005c203d                  
005c1fb5                  ebx = var_1c;
005c1fca              }
005c1fad          }
005c1f41      }
005c1f41      
005c207c      return ebx;
005c1f30  }

005c207f                                                                                               90                                 .

005c2080  void __fastcall HeritageGroup_CG::HeritageGroup_CG(class HeritageGroup_CG* this)

005c2080  {
005c2083      this->vtable = 0x79fe84;
005c2089      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005c2094      this->name.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
005c2097      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
005c20a3      this->iconImage.id = INVALID_DID.id;
005c20ab      this->setupID.id = INVALID_DID.id;
005c20b6      this->environmentSetupID.id = INVALID_DID.id;
005c20b9      __builtin_memset(&this->numAttributeCredits, 0, 0x38);
005c20e8      this->mGenderList.vtable = 0x79fe80;
005c20ef      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>(&this->mGenderList.m_intrusiveTable, 0x17);
005c2080  }

005c20f8                                                                          90 90 90 90 90 90 90 90                          ........

005c2100  void __thiscall HeritageGroup_CG::Serialize(class HeritageGroup_CG* this, class Archive* arg2)

005c2100  {
005c2102      class Archive* esi = arg2;
005c210d      PStringBase<char>::Serialize(&this->name, esi);
005c2116      Archive::CheckAlignment(esi, 4);
005c211f      uint8_t* eax = Archive::GetBytes(esi, 4);
005c211f      
005c2128      if (eax != 0)
005c2128      {
005c212d          if ((esi->m_flags & 1) == 0)
005c2138              this->iconImage.id = *(uint32_t*)eax;
005c212d          else
005c2132              *(uint32_t*)eax = this->iconImage.id;
005c2128      }
005c2128      
005c213f      Archive::CheckAlignment(esi, 4);
005c2148      uint8_t* eax_1 = Archive::GetBytes(esi, 4);
005c2148      
005c214f      if (eax_1 != 0)
005c214f      {
005c2154          if ((esi->m_flags & 1) == 0)
005c215f              this->setupID.id = *(uint32_t*)eax_1;
005c2154          else
005c2159              *(uint32_t*)eax_1 = this->setupID.id;
005c214f      }
005c214f      
005c2166      Archive::CheckAlignment(esi, 4);
005c216f      uint8_t* eax_2 = Archive::GetBytes(esi, 4);
005c216f      
005c2176      if (eax_2 != 0)
005c2176      {
005c217b          if ((esi->m_flags & 1) == 0)
005c2186              this->environmentSetupID.id = *(uint32_t*)eax_2;
005c217b          else
005c2180              *(uint32_t*)eax_2 = this->environmentSetupID.id;
005c2176      }
005c2176      
005c218d      Archive::CheckAlignment(esi, 4);
005c2196      uint8_t* eax_3 = Archive::GetBytes(esi, 4);
005c2196      
005c219d      if (eax_3 != 0)
005c219d      {
005c21a2          if ((esi->m_flags & 1) == 0)
005c21ad              this->numAttributeCredits = *(uint32_t*)eax_3;
005c21a2          else
005c21a7              *(uint32_t*)eax_3 = this->numAttributeCredits;
005c219d      }
005c219d      
005c21b4      Archive::CheckAlignment(esi, 4);
005c21bd      int32_t* eax_4 = Archive::GetBytes(esi, 4);
005c21bd      
005c21c4      if (eax_4 != 0)
005c21c4      {
005c21c9          if ((esi->m_flags & 1) == 0)
005c21d4              this->numSkillCredits = *(uint32_t*)eax_4;
005c21c9          else
005c21ce              *(uint32_t*)eax_4 = this->numSkillCredits;
005c21c4      }
005c21c4      
005c21e1      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mPrimaryStartAreaList.m_data, esi);
005c21f0      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mSecondaryStartAreaList.m_data, esi);
005c21ff      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mSkillList, esi);
005c220e      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize(&arg2, &this->mTemplateList, esi);
005c220e      
005c221d      if ((1 & !(esi->m_flags)) != 0)
005c2222          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::delete_contents(&this->mGenderList.m_intrusiveTable);
005c2222      
005c2231      ?SerializeIntrusiveHashTable@?$@PAVHeritageGroup_CG@@V?$IntrusiveHashTable@KPAV?$HashTableData@KVSex_CG@@@@$0A@@@PAV?$HashTableData@KVSex_CG@@@@USB_HashData@?$SB_Hash@USB_Default@@U1@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABQAVHeritageGroup_CG@@AAV?$IntrusiveHashTable@KPAV?$HashTableData@KVSex_CG@@@@$0A@@@AAVArchive@@@Z(&arg2, &this->mGenderList.m_intrusiveTable, esi);
005c2100  }

005c223f                                                                                               90                                 .

005c2240  class HeritageGroup_CG& __thiscall HeritageGroup_CG::operator=(class HeritageGroup_CG* this, class HeritageGroup_CG const& arg2)

005c2240  {
005c2248      class PSRefBufferCharData<char>* m_charbuffer = this->name.m_charbuffer;
005c2248      
005c224e      if (m_charbuffer != arg2->name.m_charbuffer)
005c224e      {
005c2264          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005c226c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005c226c          
005c226e          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->name.m_charbuffer;
005c2271          this->name.m_charbuffer = m_charbuffer_1;
005c2278          InterlockedIncrement(&m_charbuffer_1[-1]);
005c224e      }
005c224e      
005c2282      this->iconImage.id = arg2->iconImage.id;
005c2288      this->setupID.id = arg2->setupID.id;
005c228e      this->environmentSetupID.id = arg2->environmentSetupID.id;
005c2294      this->numAttributeCredits = arg2->numAttributeCredits;
005c229d      this->numSkillCredits = arg2->numSkillCredits;
005c22a4      SmartArray<unsigned long,1>::operator=(&this->mPrimaryStartAreaList.m_data, &arg2->mPrimaryStartAreaList);
005c22b0      SmartArray<unsigned long,1>::operator=(&this->mSecondaryStartAreaList.m_data, &arg2->mSecondaryStartAreaList);
005c22bc      SmartArray<Skill_CG,1>::operator=(&this->mSkillList.m_data, &arg2->mSkillList);
005c22c8      SmartArray<Template_CG,1>::operator=(&this->mTemplateList.m_data, &arg2->mTemplateList);
005c22d4      HashTable<unsigned long,Sex_CG,0>::operator=(&this->mGenderList, &arg2->mGenderList.vtable);
005c22dd      return this;
005c2240  }


005c22e0  void __thiscall HeritageGroup_CG::HeritageGroup_CG(class HeritageGroup_CG* this, class HeritageGroup_CG const* arg2)

005c22e0  {
005c22e9      this->vtable = 0x79fe84;
005c22ef      class PSRefBufferCharData<char>* m_charbuffer = arg2->name.m_charbuffer;
005c22f2      this->name.m_charbuffer = m_charbuffer;
005c22f9      InterlockedIncrement(&m_charbuffer[-1]);
005c2302      this->iconImage.id = arg2->iconImage.id;
005c2308      this->setupID.id = arg2->setupID.id;
005c230e      this->environmentSetupID.id = arg2->environmentSetupID.id;
005c2314      this->numAttributeCredits = arg2->numAttributeCredits;
005c231a      this->numSkillCredits = arg2->numSkillCredits;
005c231d      this->mPrimaryStartAreaList.m_data = 0;
005c231d      this->mPrimaryStartAreaList.m_sizeAndDeallocate = 0;
005c231d      this->mPrimaryStartAreaList.m_num = 0;
005c232e      SmartArray<unsigned long,1>::operator=(&this->mPrimaryStartAreaList, &arg2->mPrimaryStartAreaList.m_data);
005c2333      this->mSecondaryStartAreaList.m_data = 0;
005c2333      this->mSecondaryStartAreaList.m_sizeAndDeallocate = 0;
005c2333      this->mSecondaryStartAreaList.m_num = 0;
005c2342      SmartArray<unsigned long,1>::operator=(&this->mSecondaryStartAreaList, &arg2->mSecondaryStartAreaList.m_data);
005c2347      this->mSkillList.m_data = 0;
005c2347      this->mSkillList.m_sizeAndDeallocate = 0;
005c2347      this->mSkillList.m_num = 0;
005c2356      SmartArray<Skill_CG,1>::operator=(&this->mSkillList, &arg2->mSkillList.m_data);
005c235b      this->mTemplateList.m_data = 0;
005c235b      this->mTemplateList.m_sizeAndDeallocate = 0;
005c235b      this->mTemplateList.m_num = 0;
005c236a      SmartArray<Template_CG,1>::operator=(&this->mTemplateList, &arg2->mTemplateList.m_data);
005c2372      this->mGenderList.vtable = 0x79fe80;
005c2382      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,Sex_CG> *,0>(&this->mGenderList.m_intrusiveTable, arg2->mGenderList.m_intrusiveTable.m_numBuckets);
005c238a      HashTable<unsigned long,Sex_CG,0>::operator=(&this->mGenderList, &arg2->mGenderList.vtable);
005c22e0  }

005c2397                                                                       90 90 90 90 90 90 90 90 90                         .........

005c23a0  class HeritageGroup_CG const* __thiscall ACCharGenData::GetHG(class ACCharGenData const* this, class HeritageGroup_CG const* __return, uint32_t arg3)

005c23a0  {
005c23ad      void var_c0;
005c23ad      HeritageGroup_CG::HeritageGroup_CG(&var_c0);
005c23ad      
005c23d0      for (int32_t* i = this->mHeritageGroupList.m_intrusiveTable.m_buckets[(COMBINE(0, arg3) % this->mHeritageGroupList.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
005c23d0      {
005c23d4          if (*(uint32_t*)i == arg3)
005c23d4          {
005c23e1              if (i != 0)
005c23eb                  HeritageGroup_CG::operator=(&var_c0, &i[2]);
005c23eb              
005c23e1              break;
005c23d4          }
005c23d0      }
005c23d0      
005c23fe      HeritageGroup_CG::HeritageGroup_CG(__return, &var_c0);
005c2407      HeritageGroup_CG::~HeritageGroup_CG(&var_c0);
005c2415      return __return;
005c23a0  }

005c2418                                                                          90 90 90 90 90 90 90 90                          ........

005c2420  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>* this)

005c2420  {
005c2428      if (this->m_numElements != 0)
005c2428      {
005c242a          void* edi;
005c242a          void* var_8_1 = edi;
005c242a          
005c24a0          do
005c24a0          {
005c2436              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
005c243c              int32_t* m_firstInterestingBucket_2;
005c243c              
005c243c              if (this->m_firstInterestingBucket == ecx_1)
005c243c              {
005c2452              label_5c2452:
005c2452                  m_firstInterestingBucket_2 = nullptr;
005c2454                  edi = nullptr;
005c243c              }
005c243c              else
005c243c              {
005c2440                  while (true)
005c2440                  {
005c2440                      class HashTableData<unsigned long,HeritageGroup_CG>** m_firstInterestingBucket = this->m_firstInterestingBucket;
005c2440                      
005c2446                      if (*(uint32_t*)m_firstInterestingBucket != 0)
005c2446                      {
005c2458                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
005c245b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
005c245d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
005c245d                          break;
005c2446                      }
005c2446                      
005c244d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
005c244d                      
005c2450                      if (&m_firstInterestingBucket[1] == ecx_1)
005c2450                          goto label_5c2452;
005c2440                  }
005c243c              }
005c243c              
005c245f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
005c245f              
005c2463              if (eax_3 == edi)
005c2475                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
005c2463              else
005c2463              {
005c246c                  void* ecx_2;
005c246c                  
005c246c                  do
005c246c                  {
005c2465                      ecx_2 = eax_3;
005c2467                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
005c246c                  } while (eax_3 != edi);
005c246c                  
005c2470                  if (ecx_2 != 0)
005c247c                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
005c2470                  else
005c2475                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
005c2463              }
005c2463              
005c2485              this->m_numElements -= 1;
005c2485              
005c2488              if (edi != 0)
005c2488              {
005c248d                  HeritageGroup_CG::~HeritageGroup_CG(((char*)edi + 8));
005c2493                  operator delete(edi);
005c2488              }
005c24a0          } while (this->m_numElements != 0);
005c2428      }
005c2420  }

005c242d                                         8d 49 00                                                               .I.
005c24a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c24b0  void ?SerializeIntrusiveHashTable@?$@PAVACCharGenData@@V?$IntrusiveHashTable@KPAV?$HashTableData@KVHeritageGroup_CG@@@@$0A@@@PAV?$HashTableData@KVHeritageGroup_CG@@@@USB_HashData@?$SB_Hash@USB_Default@@U1@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABQAVACCharGenData@@AAV?$IntrusiveHashTable@KPAV?$HashTableData@KVHeritageGroup_CG@@@@$0A@@@AAVArchive@@@Z(class ACCharGenData** arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>* arg2, class Archive* arg3)

005c24b0  {
005c24b6      class Archive* esi = arg3;
005c24b6      
005c24c2      if ((!(esi->m_flags) & 1) != 0)
005c24c8          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
005c24c8      
005c24d6      int32_t ebx;
005c24d6      
005c24d6      if ((((int8_t)esi->m_flags) & 5) != 1)
005c2515          ebx = arg3;
005c24d6      else
005c24d6      {
005c24df          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005c24e5          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
005c24ed          arg3 = arg2->m_numBuckets;
005c24fd          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
005c24fd          
005c2507          if (eax_2 == bucketSizesEnd_1)
005c2509              eax_2 -= 4;
005c2509          
005c2510          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
005c24d6      }
005c24d6      
005c251d      Archive::CheckAlignment(esi, 1);
005c2526      char* eax_3 = Archive::GetBytes(esi, 1);
005c2526      
005c252d      if (eax_3 != 0)
005c252d      {
005c2533          if ((esi->m_flags & 1) == 0)
005c2539              ebx = *(uint8_t*)eax_3;
005c2533          else
005c2535              *(uint8_t*)eax_3 = ebx;
005c252d      }
005c252d      
005c253f      if ((esi->m_flags & 5) == 0)
005c253f      {
005c2547          uint32_t eax_4 = ((uint32_t)ebx);
005c2547          
005c254c          if (eax_4 < 0x17)
005c2565              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
005c254c          else
005c2550              Archive::RaiseError(esi);
005c253f      }
005c253f      
005c2571      if ((((int8_t)esi->m_flags) & 5) == 1)
005c257a          arg3 = arg2->m_numElements;
005c257a      
005c2589      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
005c2589      
005c259a      if ((((int8_t)esi->m_flags) & 5) == 1)
005c259a      {
005c25a5          void __return;
005c25a5          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
005c25aa          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
005c25ac          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
005c25af          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
005c25af          
005c25b4          while (i != 0)
005c25b4          {
005c25ea              do
005c25ea              {
005c25ba                  Archive::CheckAlignment(esi, 4);
005c25c3                  uint8_t* eax_7 = Archive::GetBytes(esi, 4);
005c25c3                  
005c25ca                  if (eax_7 != 0)
005c25ca                  {
005c25d0                      if ((esi->m_flags & 1) == 0)
005c25da                          i->m_hashKey = *(uint32_t*)eax_7;
005c25d0                      else
005c25d4                          *(uint32_t*)eax_7 = i->m_hashKey;
005c25ca                  }
005c25ca                  
005c25dc                  i->m_data->vtable(esi);
005c25e5                  i = i->m_hashNext;
005c25ea              } while (i != 0);
005c25ea              
005c25f5              while (true)
005c25f5              {
005c25f5                  m_currBucket = &m_currBucket[1];
005c25f5                  
005c25fa                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
005c25fa                      break;
005c25fa                  
005c25fc                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
005c25fc                  
005c2601                  if (i_1 != 0)
005c2601                  {
005c2603                      i = i_1;
005c2605                      break;
005c2601                  }
005c25f5              }
005c25b4          }
005c259a      }
005c259a      
005c260b      if ((esi->m_flags & 5) == 0)
005c260b      {
005c2613          uint32_t eax_10 = Archive::GetSizeLeft(esi);
005c2618          class Archive* ecx_17 = arg3;
005c2618          
005c261e          if (ecx_17 > eax_10)
005c26b4              Archive::RaiseError(esi);
005c261e          else
005c261e          {
005c2624              void* ebx_3 = nullptr;
005c2626              int32_t ebp_1 = 0;
005c2626              
005c262a              if (ecx_17 > 0)
005c262a              {
005c263a                  while (true)
005c263a                  {
005c263a                      void* edi_1 = operator new(0xc8);
005c263a                      
005c2641                      if (edi_1 == 0)
005c2654                          edi_1 = nullptr;
005c2641                      else
005c2641                      {
005c2646                          *(uint32_t*)((char*)edi_1 + 4) = 0;
005c264d                          HeritageGroup_CG::HeritageGroup_CG(((char*)edi_1 + 8));
005c2641                      }
005c2641                      
005c265a                      Archive::CheckAlignment(esi, 4);
005c2663                      uint8_t* eax_12 = Archive::GetBytes(esi, 4);
005c2663                      
005c266a                      if (eax_12 != 0)
005c266a                      {
005c2670                          if ((esi->m_flags & 1) == 0)
005c267a                              *(uint32_t*)edi_1 = *(uint32_t*)eax_12;
005c2670                          else
005c2674                              *(uint32_t*)eax_12 = *(uint32_t*)edi_1;
005c266a                      }
005c266a                      
005c2683                      **(uint32_t**)((char*)edi_1 + 8)(esi);
005c2683                      
005c268e                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
005c26c0                          return;
005c26c0                      
005c269d                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebx_3) == 0)
005c269d                          break;
005c269d                      
005c26a3                      ebp_1 += 1;
005c26a6                      ebx_3 = edi_1;
005c26a6                      
005c26a8                      if (ebp_1 >= arg3)
005c26b1                          return;
005c263a                  }
005c263a                  
005c26b4                  Archive::RaiseError(esi);
005c262a              }
005c261e          }
005c260b      }
005c24b0  }

005c26c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005c26d0  int32_t __thiscall ACCharGenData::GetSkillTrainedCost(class ACCharGenData const* this, int32_t arg2, uint32_t arg3, uint32_t arg4)

005c26d0  {
005c26e3      void __return;
005c26e3      ACCharGenData::GetHG(this, &__return, arg3);
005c26fc      void __return_1;
005c26fc      HeritageGroup_CG::GetSX(&__return, &__return_1, arg4);
005c270c      int32_t eax_1 = 0;
005c2710      int32_t var_160;
005c2710      int32_t result;
005c2710      
005c2710      if (var_160 <= 0)
005c2710      {
005c2735      label_5c2735:
005c2735          class DBObj* eax_2 = DBCache::GetFromEnumStatic(4, 2, 0x10000004);
005c2735          
005c2741          if (eax_2 == 0)
005c2741              goto label_5c2789;
005c2741          
005c2743          int32_t edi_1 = *(int32_t*)((char*)eax_2 + 0x44);
005c2743          
005c2748          if (edi_1 == 0)
005c2748          {
005c277f          label_5c277f:
005c277d              eax_2->vtable->Release();
005c2789          label_5c2789:
005c2789              Sex_CG::~Sex_CG(&__return_1);
005c2792              HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c27a3              return 0xffffffff;
005c2748          }
005c2748          
005c274a          int32_t esi_2 = *(int32_t*)((char*)eax_2 + 0x40);
005c274a          
005c274f          if (esi_2 == 0)
005c274f              goto label_5c277f;
005c274f          
005c2757          int32_t* edx_3 = *(uint32_t*)(esi_2 + ((COMBINE(0, arg2) % edi_1) << 2));
005c2757          
005c275c          if (edx_3 == 0)
005c275c              goto label_5c277f;
005c275c          
005c2762          while (arg2 != *(uint32_t*)edx_3)
005c2762          {
005c2764              edx_3 = edx_3[0x18];
005c2764              
005c2769              if (edx_3 == 0)
005c2769                  goto label_5c277f;
005c2762          }
005c2762          
005c277b          if (edx_3 == 0xfffffff8)
005c277b              goto label_5c277f;
005c277b          
005c27a6          result = edx_3[6];
005c2710      }
005c2710      else
005c2710      {
005c2716          void* var_168;
005c2716          int32_t* ecx_1 = ((char*)var_168 + 4);
005c2716          
005c2722          while (*(uint32_t*)ecx_1 != arg2)
005c2722          {
005c2724              eax_1 += 1;
005c2725              ecx_1 = &ecx_1[4];
005c2725              
005c272a              if (eax_1 >= var_160)
005c272a                  goto label_5c2735;
005c2722          }
005c2722          
005c2770          result = *(uint32_t*)(((eax_1 << 4) + var_168) + 8);
005c2710      }
005c2710      
005c27b0      Sex_CG::~Sex_CG(&__return_1);
005c27b9      HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c27c9      return result;
005c26d0  }

005c27cc                                      90 90 90 90                                                              ....

005c27d0  int32_t __thiscall ACCharGenData::GetSkillSpecializedCost(class ACCharGenData const* this, int32_t arg2, uint32_t arg3, uint32_t arg4)

005c27d0  {
005c27e3      void __return;
005c27e3      ACCharGenData::GetHG(this, &__return, arg3);
005c27fc      void __return_1;
005c27fc      HeritageGroup_CG::GetSX(&__return, &__return_1, arg4);
005c280c      int32_t eax_1 = 0;
005c2810      int32_t var_160;
005c2810      int32_t result;
005c2810      
005c2810      if (var_160 <= 0)
005c2810      {
005c2835      label_5c2835:
005c2835          class DBObj* eax_2 = DBCache::GetFromEnumStatic(4, 2, 0x10000004);
005c2835          
005c2841          if (eax_2 == 0)
005c2841              goto label_5c2889;
005c2841          
005c2843          int32_t edi_1 = *(int32_t*)((char*)eax_2 + 0x44);
005c2843          
005c2848          if (edi_1 == 0)
005c2848          {
005c287f          label_5c287f:
005c287d              eax_2->vtable->Release();
005c2889          label_5c2889:
005c2889              Sex_CG::~Sex_CG(&__return_1);
005c2892              HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c28a3              return 0xffffffff;
005c2848          }
005c2848          
005c284a          int32_t esi_2 = *(int32_t*)((char*)eax_2 + 0x40);
005c284a          
005c284f          if (esi_2 == 0)
005c284f              goto label_5c287f;
005c284f          
005c2857          int32_t* edx_3 = *(uint32_t*)(esi_2 + ((COMBINE(0, arg2) % edi_1) << 2));
005c2857          
005c285c          if (edx_3 == 0)
005c285c              goto label_5c287f;
005c285c          
005c2862          while (arg2 != *(uint32_t*)edx_3)
005c2862          {
005c2864              edx_3 = edx_3[0x18];
005c2864              
005c2869              if (edx_3 == 0)
005c2869                  goto label_5c287f;
005c2862          }
005c2862          
005c287b          if (edx_3 == 0xfffffff8)
005c287b              goto label_5c287f;
005c287b          
005c28a6          result = edx_3[7];
005c2810      }
005c2810      else
005c2810      {
005c2816          void* var_168;
005c2816          int32_t* ecx_1 = ((char*)var_168 + 4);
005c2816          
005c2822          while (*(uint32_t*)ecx_1 != arg2)
005c2822          {
005c2824              eax_1 += 1;
005c2825              ecx_1 = &ecx_1[4];
005c2825              
005c282a              if (eax_1 >= var_160)
005c282a                  goto label_5c2835;
005c2822          }
005c2822          
005c2870          result = *(uint32_t*)(((eax_1 << 4) + var_168) + 0xc);
005c2810      }
005c2810      
005c28b0      Sex_CG::~Sex_CG(&__return_1);
005c28b9      HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c28c9      return result;
005c27d0  }

005c28cc                                      90 90 90 90                                                              ....

005c28d0  int32_t __thiscall ACCharGenData::GenerateBaseAppearanceData(class ACCharGenData const* this, class ACCharGenResult const* arg2, class CharAppearanceData* arg3, class ObjDesc* arg4)

005c28d0  {
005c28d6      uint32_t id = INVALID_DID.id;
005c28ed      uint32_t id_4 = id;
005c28f1      uint32_t id_5 = id;
005c28f5      uint32_t id_3 = id;
005c28f9      uint32_t heritageGroup = arg2->heritageGroup;
005c28fc      int32_t var_2a8 = 0x7c3674;
005c2900      int32_t var_290 = 0x7c3674;
005c2904      int32_t var_2c0 = 0x7c3674;
005c2911      int32_t var_2a0 = 0;
005c2915      int32_t var_29c = 0;
005c2919      int32_t var_298 = 0;
005c291d      int32_t var_294 = 0;
005c2921      int32_t var_288 = 0;
005c2925      int32_t var_284 = 0;
005c2929      int32_t var_280 = 0;
005c292d      int32_t var_27c = 0;
005c2931      int32_t var_2b8 = 0;
005c2935      int32_t var_2b4 = 0;
005c2939      int32_t var_2b0 = 0;
005c293d      int32_t var_2ac = 0;
005c2941      void __return_2;
005c2941      ACCharGenData::GetHG(this, &__return_2, heritageGroup);
005c2959      void __return_1;
005c2959      HeritageGroup_CG::GetSX(&__return_2, &__return_1, arg2->gender);
005c297a      class IDClass<_tagDataID,32,0> var_14c;
005c297a      arg4->paletteID.id = var_14c;
005c2980      arg3->base_palette.id = var_14c;
005c2982      void var_184;
005c2982      ObjDesc::operator+=(arg4, &var_184);
005c2994      int32_t var_138;
005c2994      void* eax_4 = ((arg2->hairStyle * 0x3c) + var_138);
005c2996      int32_t var_23c = 0x79fa80;
005c29a4      int32_t var_238 = *(uint32_t*)((char*)eax_4 + 4);
005c29ab      int32_t edx;
005c29ab      edx = *(uint8_t*)((char*)eax_4 + 8);
005c29ae      char var_234 = edx;
005c29b5      int32_t ecx_3 = *(uint32_t*)((char*)eax_4 + 0xc);
005c29ca      void var_22c;
005c29ca      ObjDesc::ObjDesc(&var_22c, ((char*)eax_4 + 0x10));
005c29d9      ObjDesc::operator+=(arg4, &var_22c);
005c29e6      class AnimPartChange* eax_6 = ObjDesc::GetAnimPartChange(&var_22c, 0);
005c29e6      
005c29ed      if (eax_6 != 0)
005c29ed      {
005c29f3          if (arg2->heritageGroup == 6)
005c2a03              arg3->head_object.id = INVALID_DID.id;
005c29f3          else
005c29f8              arg3->head_object.id = eax_6->part_id.id;
005c29ed      }
005c29ed      
005c2a13      class IDClass<_tagDataID,32,0> __return = 0;
005c2a13      
005c2a1f      if ((ecx_3 == UNDEAD_MALE_SKELETON_SETUP.id || ecx_3 == UNDEAD_FEMALE_SKELETON_SETUP.id))
005c2a21          __return = 1;
005c2a21      
005c2a36      int32_t var_120;
005c2a36      void* edi_3 = ((arg2->eyesStrip * 0x64) + var_120);
005c2a38      int32_t var_200 = 0x79fa84;
005c2a49      int32_t var_1fc = *(uint32_t*)((char*)edi_3 + 4);
005c2a5b      int32_t var_1f8 = *(uint32_t*)((char*)edi_3 + 8);
005c2a62      void var_1f4;
005c2a62      ObjDesc::ObjDesc(&var_1f4, ((char*)edi_3 + 0xc));
005c2a72      void var_1c8;
005c2a72      ObjDesc::ObjDesc(&var_1c8, ((char*)edi_3 + 0x38));
005c2a80      class TextureMapChange* eax_11;
005c2a80      void* ecx_12;
005c2a80      
005c2a80      if (var_234 != 0)
005c2a80      {
005c2a8a          ObjDesc::operator+=(arg4, &var_1c8);
005c2a93          ecx_12 = &var_1c8;
005c2a93          
005c2a9a          if (__return == 0)
005c2a9a              goto label_5c2add;
005c2a9a          
005c2a9e          eax_11 = ObjDesc::GetTextureMapChange(ecx_12, 1);
005c2a9e          
005c2aa5          if (eax_11 != 0)
005c2aa5              goto label_5c2ae9;
005c2aa5          
005c2aa7          ecx_12 = &var_1c8;
005c2aae          goto label_5c2add;
005c2a80      }
005c2a80      
005c2ab8      ObjDesc::operator+=(arg4, &var_1f4);
005c2ac1      ecx_12 = &var_1f4;
005c2ac1      
005c2ac8      if (__return == 0)
005c2ac8          goto label_5c2add;
005c2ac8      
005c2acc      eax_11 = ObjDesc::GetTextureMapChange(ecx_12, 1);
005c2ad3      class CharAppearanceData* edi_5;
005c2ad3      
005c2ad3      if (eax_11 != 0)
005c2ad3      {
005c2ae9      label_5c2ae9:
005c2ae9          edi_5 = arg3;
005c2af0          edi_5->eyes_texture.id = eax_11->new_tex_id.id;
005c2af6          edi_5->default_eyes_texture.id = eax_11->old_tex_id.id;
005c2ad3      }
005c2ad3      else
005c2ad3      {
005c2ad5          ecx_12 = &var_1f4;
005c2add      label_5c2add:
005c2add          eax_11 = ObjDesc::GetTextureMapChange(ecx_12, 0);
005c2add          
005c2ae4          if (eax_11 != 0)
005c2ae4              goto label_5c2ae9;
005c2ae4          
005c2afb          edi_5 = arg3;
005c2ad3      }
005c2ad3      
005c2b0f      int32_t var_114;
005c2b0f      void* eax_14 = ((arg2->noseStrip * 0x34) + var_114);
005c2b11      int32_t var_278 = 0x79fa88;
005c2b1f      int32_t var_274 = *(uint32_t*)((char*)eax_14 + 4);
005c2b28      void var_270;
005c2b28      ObjDesc::ObjDesc(&var_270, ((char*)eax_14 + 8));
005c2b34      ObjDesc::operator+=(arg4, &var_270);
005c2b3d      void* ecx_18 = &var_270;
005c2b3d      
005c2b41      if (__return == 0)
005c2b41          goto label_5c2b53;
005c2b41      
005c2b45      class TextureMapChange* eax_16 = ObjDesc::GetTextureMapChange(ecx_18, 1);
005c2b45      
005c2b4c      if (eax_16 != 0)
005c2b4c      {
005c2b5f          edi_5->nose_texture.id = eax_16->new_tex_id.id;
005c2b65          edi_5->default_nose_texture.id = eax_16->old_tex_id.id;
005c2b4c      }
005c2b4c      else
005c2b4c      {
005c2b4e          ecx_18 = &var_270;
005c2b53      label_5c2b53:
005c2b53          eax_16 = ObjDesc::GetTextureMapChange(ecx_18, 0);
005c2b53          
005c2b5a          if (eax_16 != 0)
005c2b5a          {
005c2b5f              edi_5->nose_texture.id = eax_16->new_tex_id.id;
005c2b65              edi_5->default_nose_texture.id = eax_16->old_tex_id.id;
005c2b5a          }
005c2b4c      }
005c2b4c      
005c2b75      int32_t var_108;
005c2b75      void* eax_19 = ((arg2->mouthStrip * 0x34) + var_108);
005c2b7d      int32_t var_274_1 = *(uint32_t*)((char*)eax_19 + 4);
005c2b86      ObjDesc::operator=(&var_270, ((char*)eax_19 + 8));
005c2b92      ObjDesc::operator+=(arg4, &var_270);
005c2b9b      class ObjDesc* ecx_24 = &var_270;
005c2b9b      
005c2b9f      if (__return == 0)
005c2b9f          goto label_5c2bb1;
005c2b9f      
005c2ba3      class TextureMapChange* eax_21 = ObjDesc::GetTextureMapChange(ecx_24, 1);
005c2ba3      
005c2baa      if (eax_21 != 0)
005c2baa      {
005c2bbd          edi_5->mouth_texture.id = eax_21->new_tex_id.id;
005c2bc3          edi_5->default_mouth_texture.id = eax_21->old_tex_id.id;
005c2baa      }
005c2baa      else
005c2baa      {
005c2bac          ecx_24 = &var_270;
005c2bb1      label_5c2bb1:
005c2bb1          eax_21 = ObjDesc::GetTextureMapChange(ecx_24, 0);
005c2bb1          
005c2bb8          if (eax_21 != 0)
005c2bb8          {
005c2bbd              edi_5->mouth_texture.id = eax_21->new_tex_id.id;
005c2bc3              edi_5->default_mouth_texture.id = eax_21->old_tex_id.id;
005c2bb8          }
005c2baa      }
005c2baa      
005c2bdd      void var_244;
005c2bdd      class IDClass<_tagDataID,32,0> var_148;
005c2bdd      class DBObj* eax_24 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_244, var_148, 0x18));
005c2bdd      
005c2be9      if (eax_24 != 0)
005c2be9      {
005c2bf1          int32_t var_2d8_14 = *(uint32_t*)((char*)arg2->skinShade)[4];
005c2bff          uint32_t id_1 = PalSet::GetPaletteID(eax_24, &__return, arg2->skinShade)->id;
005c2c0c          int32_t var_2a0_1 = 0;
005c2c10          int32_t var_29c_1 = 0xc0;
005c2c18          ObjDesc::AddSubpalette(arg4, &var_2a8);
005c2c28          arg3->skin_palette.id = id_1;
005c2c2b          eax_24->vtable->Release();
005c2c4f          int32_t var_144;
005c2c4f          class DBObj* eax_30 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_244, *(uint32_t*)(var_144 + (arg2->hairColor << 2)), 0x18));
005c2c4f          
005c2c5b          if (eax_30 != 0)
005c2c5b          {
005c2cd5              int32_t var_2d8_17 = *(uint32_t*)((char*)arg2->hairShade)[4];
005c2ce3              uint32_t id_2 = PalSet::GetPaletteID(eax_30, &__return, arg2->hairShade)->id;
005c2cf0              int32_t var_288_1 = 0xc0;
005c2cf8              int32_t var_284_1 = 0x40;
005c2d00              ObjDesc::AddSubpalette(arg4, &var_290);
005c2d10              arg3->hair_palette.id = id_2;
005c2d13              eax_30->vtable->Release();
005c2d24              int32_t var_12c;
005c2d24              class IDClass<_tagDataID,32,0> edx_9 = *(uint32_t*)(var_12c + (arg2->eyeColor << 2));
005c2d32              int32_t var_2b8_1 = 0x100;
005c2d3a              int32_t var_2b4_1 = 0x40;
005c2d42              ObjDesc::AddSubpalette(arg4, &var_2c0);
005c2d4b              arg3->eyes_palette.id = edx_9;
005c2d52              int32_t var_278_2 = 0x79fa88;
005c2d5a              ObjDesc::~ObjDesc(&var_270);
005c2d66              int32_t var_200_2 = 0x79fa84;
005c2d71              ObjDesc::~ObjDesc(&var_1c8);
005c2d7d              ObjDesc::~ObjDesc(&var_1f4);
005c2d89              int32_t var_23c_2 = 0x79fa80;
005c2d94              ObjDesc::~ObjDesc(&var_22c);
005c2da0              Sex_CG::~Sex_CG(&__return_1);
005c2dac              HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
005c2dc0              return 1;
005c2c5b          }
005c2be9      }
005c2be9      
005c2c61      int32_t var_278_1 = 0x79fa88;
005c2c69      ObjDesc::~ObjDesc(&var_270);
005c2c75      int32_t var_200_1 = 0x79fa84;
005c2c80      ObjDesc::~ObjDesc(&var_1c8);
005c2c8c      ObjDesc::~ObjDesc(&var_1f4);
005c2c98      int32_t var_23c_1 = 0x79fa80;
005c2ca3      ObjDesc::~ObjDesc(&var_22c);
005c2caf      Sex_CG::~Sex_CG(&__return_1);
005c2cbb      HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
005c2ccc      return 0;
005c28d0  }

005c2dc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005c2dd0  uint32_t __thiscall ACCharGenData::GetHairIndexFromID(class ACCharGenData* this, uint32_t const arg2, uint32_t const arg3, class IDClass<_tagDataID,32,0> arg4, uint8_t const arg5)

005c2dd0  {
005c2de5      if (arg4 == INVALID_DID.id)
005c2df0          return 0;
005c2df0      
005c2e06      void __return_1;
005c2e06      ACCharGenData::GetHG(this, &__return_1, arg2);
005c2e1f      void __return;
005c2e1f      HeritageGroup_CG::GetSX(&__return_1, &__return, arg3);
005c2e2b      int32_t result = 0;
005c2e2f      int32_t var_130;
005c2e2f      
005c2e2f      if (var_130 > 0)
005c2e2f      {
005c2e31          int32_t esi_1 = 0;
005c2e31          
005c2ea8          do
005c2ea8          {
005c2e47              int32_t var_1d8_1 = 0x79fa80;
005c2e4f              int32_t var_138;
005c2e4f              int32_t var_1d4_1 = *(uint32_t*)((esi_1 + var_138) + 4);
005c2e53              void* ecx_1;
005c2e53              ecx_1 = *(uint8_t*)((esi_1 + var_138) + 8);
005c2e68              int32_t var_1cc_1 = *(uint32_t*)((esi_1 + var_138) + 0xc);
005c2e6c              void var_1c8;
005c2e6c              ObjDesc::ObjDesc(&var_1c8, ((esi_1 + var_138) + 0x10));
005c2e6c              
005c2e7f              if (arg4 == ObjDesc::GetAnimPartChange(&var_1c8, 0)->part_id.id)
005c2e7f              {
005c2e81                  class ObjDesc* ecx_3;
005c2e81                  ecx_3 = arg5;
005c2e81                  
005c2e8c                  if (ecx_1 == ecx_3)
005c2e8c                  {
005c2ed2                      int32_t var_1d8_3 = 0x79fa80;
005c2ed6                      ObjDesc::~ObjDesc(&var_1c8);
005c2edf                      Sex_CG::~Sex_CG(&__return);
005c2eeb                      HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c2efc                      return result;
005c2e8c                  }
005c2e7f              }
005c2e7f              
005c2e92              int32_t var_1d8_2 = 0x79fa80;
005c2e96              ObjDesc::~ObjDesc(&var_1c8);
005c2ea2              result += 1;
005c2ea3              esi_1 += 0x3c;
005c2ea8          } while (result < var_130);
005c2e2f      }
005c2e2f      
005c2eae      Sex_CG::~Sex_CG(&__return);
005c2eba      HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c2ecb      return 0;
005c2dd0  }

005c2e3a                                                                                8d 9b 00 00 00 00                            ......
005c2eff                                                                                               90                                 .

005c2f00  uint32_t __thiscall ACCharGenData::GetEyeStripIndexFromID(class ACCharGenData* this, uint32_t const arg2, uint32_t const arg3, class IDClass<_tagDataID,32,0> arg4, uint8_t const arg5, uint8_t const arg6)

005c2f00  {
005c2f12      if (arg4 == INVALID_DID.id)
005c2f1c          return 0;
005c2f1c      
005c2f33      void __return_1;
005c2f33      ACCharGenData::GetHG(this, &__return_1, arg2);
005c2f4c      void __return;
005c2f4c      HeritageGroup_CG::GetSX(&__return_1, &__return, arg3);
005c2f5c      int32_t eax_1;
005c2f5c      eax_1 = arg5 != 0;
005c2f5f      int32_t result = 0;
005c2f6e      int32_t var_118;
005c2f6e      
005c2f6e      if (var_118 > 0)
005c2f6e      {
005c2f74          void* edi_1 = nullptr;
005c2f74          
005c3009          do
005c3009          {
005c2f87              int32_t var_120;
005c2f87              void* esi_1 = ((char*)edi_1 + var_120);
005c2f8a              int32_t var_200_1 = 0x79fa84;
005c2f94              int32_t var_1fc_1 = *(uint32_t*)((char*)esi_1 + 4);
005c2fa0              int32_t var_1f8_1 = *(uint32_t*)((char*)esi_1 + 8);
005c2fa4              void var_1f4;
005c2fa4              ObjDesc::ObjDesc(&var_1f4, ((char*)esi_1 + 0xc));
005c2fb1              void var_1c8;
005c2fb1              ObjDesc::ObjDesc(&var_1c8, ((char*)esi_1 + 0x38));
005c2fbf              int32_t var_218_4;
005c2fbf              void* ecx_7;
005c2fbf              
005c2fbf              if (arg6 == 0)
005c2fbf              {
005c2fd0                  var_218_4 = eax_1;
005c2fd1                  ecx_7 = &var_1f4;
005c2fbf              }
005c2fbf              else
005c2fbf              {
005c2fc5                  var_218_4 = eax_1;
005c2fc6                  ecx_7 = &var_1c8;
005c2fbf              }
005c2fbf              
005c2fe4              int32_t var_200_2 = 0x79fa84;
005c2fe8              void* ecx_9 = &var_1c8;
005c2fe8              
005c2fec              if (arg4 == ObjDesc::GetTextureMapChange(ecx_7, var_218_4)->new_tex_id.id)
005c2fec              {
005c3033                  ObjDesc::~ObjDesc(ecx_9);
005c303c                  ObjDesc::~ObjDesc(&var_1f4);
005c3045                  Sex_CG::~Sex_CG(&__return);
005c3051                  HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c3062                  return result;
005c2fec              }
005c2fec              
005c2fee              ObjDesc::~ObjDesc(ecx_9);
005c2ff7              ObjDesc::~ObjDesc(&var_1f4);
005c3003              result += 1;
005c3004              edi_1 += 0x64;
005c3009          } while (result < var_118);
005c2f6e      }
005c2f6e      
005c3013      Sex_CG::~Sex_CG(&__return);
005c301f      HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c3030      return 0;
005c2f00  }

005c2f7d                                                                                         8d 49 00                               .I.
005c3065                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c3070  uint32_t __thiscall ACCharGenData::GetNoseStripIndexFromID(class ACCharGenData* this, uint32_t const arg2, uint32_t const arg3, class IDClass<_tagDataID,32,0> arg4, uint8_t const arg5)

005c3070  {
005c3082      if (arg4 == INVALID_DID.id)
005c308c          return 0;
005c308c      
005c30a3      void __return_1;
005c30a3      ACCharGenData::GetHG(this, &__return_1, arg2);
005c30bc      void __return;
005c30bc      HeritageGroup_CG::GetSX(&__return_1, &__return, arg3);
005c30d3      int32_t ebx;
005c30d3      ebx = arg5 != 0;
005c30d6      int32_t result = 0;
005c30da      int32_t var_10c;
005c30da      
005c30da      if (var_10c > 0)
005c30da      {
005c30dc          int32_t esi_1 = 0;
005c30dc          
005c3141          do
005c3141          {
005c30f7              int32_t var_1d0_1 = 0x79fa88;
005c3103              int32_t var_114;
005c3103              int32_t var_1cc_1 = *(uint32_t*)((esi_1 + var_114) + 4);
005c310c              void var_1c8;
005c310c              ObjDesc::ObjDesc(&var_1c8, ((esi_1 + var_114) + 8));
005c3125              int32_t var_1d0_2 = 0x79fa88;
005c3129              void* ecx_7 = &var_1c8;
005c3129              
005c312d              if (arg4 == ObjDesc::GetTextureMapChange(&var_1c8, ebx)->new_tex_id.id)
005c312d              {
005c3167                  ObjDesc::~ObjDesc(ecx_7);
005c3170                  Sex_CG::~Sex_CG(&__return);
005c317c                  HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c318d                  return result;
005c312d              }
005c312d              
005c312f              ObjDesc::~ObjDesc(ecx_7);
005c313b              result += 1;
005c313c              esi_1 += 0x34;
005c3141          } while (result < var_10c);
005c30da      }
005c30da      
005c3147      Sex_CG::~Sex_CG(&__return);
005c3153      HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c3164      return 0;
005c3070  }

005c30e5                 8d a4 24 00 00 00 00 8d 64 24 00                                                       ..$.....d$.

005c3190  uint32_t __thiscall ACCharGenData::GetMouthStripIndexFromID(class ACCharGenData* this, uint32_t const arg2, uint32_t const arg3, class IDClass<_tagDataID,32,0> arg4, uint8_t const arg5)

005c3190  {
005c31a2      if (arg4 == INVALID_DID.id)
005c31ac          return 0;
005c31ac      
005c31c3      void __return_1;
005c31c3      ACCharGenData::GetHG(this, &__return_1, arg2);
005c31dc      void __return;
005c31dc      HeritageGroup_CG::GetSX(&__return_1, &__return, arg3);
005c31f3      int32_t ebx;
005c31f3      ebx = arg5 != 0;
005c31f6      int32_t result = 0;
005c31fa      int32_t var_100;
005c31fa      
005c31fa      if (var_100 > 0)
005c31fa      {
005c31fc          int32_t esi_1 = 0;
005c31fc          
005c3261          do
005c3261          {
005c3217              int32_t var_1d0_1 = 0x79fa88;
005c3223              int32_t var_108;
005c3223              int32_t var_1cc_1 = *(uint32_t*)((esi_1 + var_108) + 4);
005c322c              void var_1c8;
005c322c              ObjDesc::ObjDesc(&var_1c8, ((esi_1 + var_108) + 8));
005c3245              int32_t var_1d0_2 = 0x79fa88;
005c3249              void* ecx_7 = &var_1c8;
005c3249              
005c324d              if (arg4 == ObjDesc::GetTextureMapChange(&var_1c8, ebx)->new_tex_id.id)
005c324d              {
005c3287                  ObjDesc::~ObjDesc(ecx_7);
005c3290                  Sex_CG::~Sex_CG(&__return);
005c329c                  HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c32ad                  return result;
005c324d              }
005c324d              
005c324f              ObjDesc::~ObjDesc(ecx_7);
005c325b              result += 1;
005c325c              esi_1 += 0x34;
005c3261          } while (result < var_100);
005c31fa      }
005c31fa      
005c3267      Sex_CG::~Sex_CG(&__return);
005c3273      HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c3284      return 0;
005c3190  }

005c3205                 8d a4 24 00 00 00 00 8d 64 24 00                                                       ..$.....d$.

005c32b0  void __thiscall ACCharGenData::GetSkinShadeFromID(class ACCharGenData* this, uint32_t const arg2, uint32_t const arg3, class IDClass<_tagDataID,32,0> arg4, double* arg5)

005c32b0  {
005c32c7      int32_t i = 0;
005c32c9      *(uint32_t*)arg5 = 0f;
005c32cc      *(uint32_t*)((char*)arg5 + 4) = 0;
005c32cc      
005c32d5      if (arg4 != INVALID_DID.id)
005c32d5      {
005c32e9          void __return_1;
005c32e9          ACCharGenData::GetHG(this, &__return_1, arg2);
005c3302          void __return_2;
005c3302          HeritageGroup_CG::GetSX(&__return_1, &__return_2, arg3);
005c331b          void var_1a4;
005c331b          class IDClass<_tagDataID,32,0> var_88;
005c331b          class DBObj* eax_4 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1a4, var_88, 0x18));
005c332a          class IDClass<_tagDataID,32,0> __return;
005c332a          
005c332a          if (*(int32_t*)((char*)eax_4 + 0x38) > 0)
005c332a          {
005c3349              do
005c3349              {
005c3338                  PalSet::GetPaletteID_Integral(eax_4, &__return, i);
005c3338                  
005c3341                  if (arg4 == __return)
005c3341                      break;
005c3341                  
005c3346                  i += 1;
005c3349              } while (i < *(int32_t*)((char*)eax_4 + 0x38));
005c332a          }
005c332a          
005c334e          __return = (i + 1);
005c3352          long double x87_r7_1 = ((long double)__return);
005c3352          
005c3356          if ((i + 1) < 0)
005c3358              x87_r7_1 = (x87_r7_1 + ((long double)4294967296.0));
005c3358          
005c3361          long double x87_r6_1 = ((long double)*(int32_t*)((char*)eax_4 + 0x38));
005c3361          
005c3366          if (*(int32_t*)((char*)eax_4 + 0x38) < 0)
005c3368              x87_r6_1 = (x87_r6_1 + ((long double)4294967296.0));
005c3368          
005c3372          *(uint64_t*)arg5 = ((double)(x87_r7_1 / x87_r6_1));
005c3375          eax_4->vtable->Release();
005c3381          Sex_CG::~Sex_CG(&__return_2);
005c338a          HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c32d5      }
005c32b0  }

005c339c                                                                                      90 90 90 90                              ....

005c33a0  void __thiscall ACCharGenData::GetHairColorFromID(class ACCharGenData* this, uint32_t const arg2, uint32_t const arg3, class IDClass<_tagDataID,32,0> arg4, uint32_t* arg5, double* arg6)

005c33a0  {
005c33b7      double* esi = arg6;
005c33be      *(uint32_t*)arg5 = 0;
005c33c4      *(uint32_t*)esi = 0f;
005c33ca      *(uint32_t*)((char*)esi + 4) = 0;
005c33ca      
005c33d7      if (arg4 != INVALID_DID.id)
005c33d7      {
005c33ee          void __return_2;
005c33ee          ACCharGenData::GetHG(this, &__return_2, arg2);
005c3407          void __return_1;
005c3407          HeritageGroup_CG::GetSX(&__return_2, &__return_1, arg3);
005c3415          *(uint32_t*)arg5 = 0;
005c341b          int32_t var_13c;
005c341b          
005c341b          if (var_13c <= 0)
005c341b          {
005c348b          label_5c348b:
005c348b              *(uint32_t*)arg5 = 0;
005c3491              *(uint32_t*)esi = 0f;
005c3497              *(uint32_t*)((char*)esi + 4) = 0;
005c341b          }
005c341b          else
005c341b          {
005c3436              while (true)
005c3436              {
005c3436                  void var_1a4;
005c3436                  int32_t var_144;
005c3436                  class DBObj* eax_7 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_1a4, *(uint32_t*)(var_144 + (*(uint32_t*)arg5 << 2)), 0x18));
005c3443                  int32_t edi_1 = 0;
005c3443                  
005c3447                  if (*(int32_t*)((char*)eax_7 + 0x38) > 0)
005c3447                  {
005c3458                      while (true)
005c3458                      {
005c3458                          int32_t __return;
005c3458                          PalSet::GetPaletteID_Integral(eax_7, &__return, edi_1);
005c3461                          edi_1 += 1;
005c3461                          
005c3464                          if (arg4 == __return)
005c3464                          {
005c34c6                              long double x87_r7_1 = ((long double)edi_1);
005c34c6                              
005c34ca                              if (edi_1 < 0)
005c34cc                                  x87_r7_1 = (x87_r7_1 + ((long double)4294967296.0));
005c34cc                              
005c34d5                              long double x87_r6_1 = ((long double)*(int32_t*)((char*)eax_7 + 0x38));
005c34d5                              
005c34da                              if (*(int32_t*)((char*)eax_7 + 0x38) < 0)
005c34dc                                  x87_r6_1 = (x87_r6_1 + ((long double)4294967296.0));
005c34dc                              
005c34ed                              *(uint64_t*)arg6 = ((double)(x87_r7_1 / x87_r6_1));
005c34ef                              eax_7->vtable->Release();
005c34da                              break;
005c3464                          }
005c3464                          
005c3469                          if (edi_1 >= *(int32_t*)((char*)eax_7 + 0x38))
005c3469                              goto label_5c346f;
005c3458                      }
005c3458                      
005c3464                      break;
005c3447                  }
005c3447                  
005c346f              label_5c346f:
005c346b                  eax_7->vtable->Release();
005c347b                  uint32_t edx_4 = (*(uint32_t*)arg5 + 1);
005c3480                  *(uint32_t*)arg5 = edx_4;
005c3480                  
005c3482                  if (edx_4 >= var_13c)
005c3482                  {
005c3484                      esi = arg6;
005c3484                      goto label_5c348b;
005c3482                  }
005c3436              }
005c341b          }
005c341b          
005c34a2          Sex_CG::~Sex_CG(&__return_1);
005c34ae          HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
005c33d7      }
005c33a0  }

005c34f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005c3500  void __thiscall ACCharGenData::GetEyeColorFromID(class ACCharGenData* this, uint32_t const arg2, uint32_t const arg3, class IDClass<_tagDataID,32,0> arg4, uint32_t* arg5)

005c3500  {
005c3516      *(uint32_t*)arg5 = 0;
005c3516      
005c3522      if (arg4 != INVALID_DID.id)
005c3522      {
005c3534          void __return_1;
005c3534          ACCharGenData::GetHG(this, &__return_1, arg2);
005c354d          void __return;
005c354d          HeritageGroup_CG::GetSX(&__return_1, &__return, arg3);
005c355b          *(uint32_t*)arg5 = 0;
005c3561          int32_t var_124;
005c3561          
005c3561          if (var_124 <= 0)
005c3561          {
005c3575          label_5c3575:
005c3575              *(uint32_t*)arg5 = 0;
005c3561          }
005c3561          else
005c3561          {
005c3567              while (true)
005c3567              {
005c3567                  uint32_t eax_3 = *(uint32_t*)arg5;
005c356c                  int32_t var_12c;
005c356c                  
005c356c                  if (arg4 == *(uint32_t*)(var_12c + (eax_3 << 2)))
005c356c                      break;
005c356c                  
005c3571                  *(uint32_t*)arg5 = (eax_3 + 1);
005c3571                  
005c3573                  if ((eax_3 + 1) >= var_124)
005c3573                      goto label_5c3575;
005c3567              }
005c3561          }
005c3561          
005c357f          Sex_CG::~Sex_CG(&__return);
005c358b          HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c3522      }
005c3500  }

005c359b                                                                                   90 90 90 90 90                             .....

005c35a0  void* __thiscall HashTable<unsigned long,HeritageGroup_CG,0>::`scalar deleting destructor'(class HashTable<unsigned long,HeritageGroup_CG,0>* this, uint32_t arg2)

005c35a0  {
005c35a9      this->vtable = 0x7e76e0;
005c35af      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>::delete_contents(&this->m_intrusiveTable);
005c35b4      class HashTableData<unsigned long,HeritageGroup_CG>** m_buckets = this->m_intrusiveTable.m_buckets;
005c35a4      this->m_intrusiveTable.vtable = 0x7e76d0;
005c35a4      
005c35c2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
005c35c5          operator delete[](m_buckets);
005c35c5      
005c35a4      this->m_intrusiveTable.m_buckets = nullptr;
005c35a4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
005c35a4      this->m_intrusiveTable.m_numBuckets = 0;
005c35a4      this->m_intrusiveTable.m_numElements = 0;
005c35a4      
005c35e0      if ((arg2 & 1) != 0)
005c35e3          operator delete(this);
005c35e3      
005c35ef      return this;
005c35a0  }

005c35f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005c3600  void __fastcall ACCharGenData::ACCharGenData(class ACCharGenData* this)

005c3600  {
005c3609      DBObj::DBObj(this, INVALID_DID.id);
005c360e      this->vtable = 0x7e76e8;
005c3616      this->mStartAreaList.m_data = 0;
005c3619      this->mStartAreaList.m_sizeAndDeallocate = 0;
005c361c      this->mStartAreaList.m_num = 0;
005c3624      this->mHeritageGroupList.vtable = 0x7e76e0;
005c362b      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>(&this->mHeritageGroupList.m_intrusiveTable, 0x17);
005c3600  }

005c3634                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c3640  void __fastcall ACCharGenData::~ACCharGenData(class ACCharGenData* this)

005c3640  {
005c3650      this->vtable = 0x7e76e8;
005c3656      SmartArray<ACCharGenStartArea,1>::SetNElements(&this->mStartAreaList, 0, 1);
005c365e      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>::delete_contents(&this->mHeritageGroupList.m_intrusiveTable);
005c3668      this->mHeritageGroupList.vtable = 0x7e76e0;
005c366f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>::delete_contents(&this->mHeritageGroupList.m_intrusiveTable);
005c3674      class HashTableData<unsigned long,HeritageGroup_CG>** m_buckets = this->mHeritageGroupList.m_intrusiveTable.m_buckets;
005c3663      this->mHeritageGroupList.m_intrusiveTable.vtable = 0x7e76d0;
005c3663      
005c3682      if (m_buckets != &this->mHeritageGroupList.m_intrusiveTable.m_aInplaceBuckets)
005c3685          operator delete[](m_buckets);
005c3685      
005c3663      this->mHeritageGroupList.m_intrusiveTable.m_buckets = nullptr;
005c3663      this->mHeritageGroupList.m_intrusiveTable.m_firstInterestingBucket = nullptr;
005c3663      this->mHeritageGroupList.m_intrusiveTable.m_numBuckets = 0;
005c3663      this->mHeritageGroupList.m_intrusiveTable.m_numElements = 0;
005c3663      
005c36a8      if ((this->mStartAreaList.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005c36a8      {
005c36aa          class ACCharGenStartArea* m_data = this->mStartAreaList.m_data;
005c36aa          
005c36ae          if (m_data != 0)
005c36b2              ACCharGenStartArea::`vector deleting destructor'(m_data, 3);
005c36a8      }
005c36a8      
005c36b7      this->vtable = 0x7e7648;
005c36c3      /* tailcall */
005c36c3      return DBObj::~DBObj(this);
005c3640  }

005c36c8                          90 90 90 90 90 90 90 90                                                          ........

005c36d0  void __thiscall ACCharGenData::Serialize(class ACCharGenData* this, class Archive* arg2)
// This function has unresolved stack usage. View graph of stack usage to resolve.

005c36d0  {
005c36d0      int32_t ebp;
005c36d0      int32_t var_4 = ebp;
005c36d1      int32_t esi;
005c36d1      int32_t var_8 = esi;
005c36d6      int32_t edi;
005c36d6      int32_t var_c = edi;
005c36d7      class Archive* id_2 = arg2;
005c36da      DBObj::Serialize(this, id_2);
005c36df      bool cond:0 = (arg2->m_flags & 1) == 0;
005c36e5      id_2 = 4;
005c36e7      int32_t* esp_1;
005c36e7      
005c36e7      if (cond:0)
005c36e7      {
005c3708          uint32_t id_1 = INVALID_DID.id;
005c370e          Archive::CheckAlignment(arg2, id_2);
005c3713          id_2 = 4;
005c3717          uint32_t* eax_1 = Archive::GetBytes(arg2, id_2);
005c3717          
005c371e          if (eax_1 != 0)
005c371e          {
005c3724              if ((arg2->m_flags & 1) == 0)
005c372a                  id_1 = *(uint32_t*)eax_1;
005c3724              else
005c3726                  *(uint32_t*)eax_1 = id_1;
005c371e          }
005c371e          
005c372c          struct ACCharGenData::VTable* vtable = this->vtable;
005c372e          id_2 = id_1;
005c372e          esp_1 = &id_2;
005c3731          vtable->SetDID(id_2);
005c36e7      }
005c36e7      else
005c36e7      {
005c36e9          uint32_t id = this->m_DID.id;
005c36ec          Archive::CheckAlignment(arg2, id_2);
005c36f1          id_2 = 4;
005c36f5          uint32_t* eax = Archive::GetBytes(arg2, id_2);
005c36f5          esp_1 = &var_c;
005c36f5          
005c3702          if ((eax != 0 && (arg2->m_flags & 1) != 0))
005c3704              *(uint32_t*)eax = id;
005c36e7      }
005c36e7      
005c3734      *(uint32_t*)((char*)esp_1 - 4) = arg2;
005c3738      *(uint32_t*)((char*)esp_1 - 8) = &this->mStartAreaList;
005c373d      *(uint32_t*)((char*)esp_1 - 0xc) = &esp_1[4];
005c373e      SB_Container<SB_Default,&SB_DEFAULT_ITEM_NAME>::Serialize();
005c373e      
005c374d      if ((!(arg2->m_flags) & 1) != 0)
005c3752          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HeritageGroup_CG> *,0>::delete_contents(&this->mHeritageGroupList.m_intrusiveTable);
005c3752      
005c3757      *(uint32_t*)((char*)esp_1 - 4) = arg2;
005c375f      *(uint32_t*)((char*)esp_1 - 8) = &this->mHeritageGroupList.m_intrusiveTable;
005c3760      *(uint32_t*)((char*)esp_1 - 0xc) = &esp_1[4];
005c3761      ?SerializeIntrusiveHashTable@?$@PAVACCharGenData@@V?$IntrusiveHashTable@KPAV?$HashTableData@KVHeritageGroup_CG@@@@$0A@@@PAV?$HashTableData@KVHeritageGroup_CG@@@@USB_HashData@?$SB_Hash@USB_Default@@U1@$1?SB_DEFAULT_ITEM_NAME@@3QBDB$1?SB_DEFAULT_KEY_NAME@@3QBDB$1?SB_DEFAULT_VALUE_NAME@@3QBDB@@@@YAXABQAVACCharGenData@@AAV?$IntrusiveHashTable@KPAV?$HashTableData@KVHeritageGroup_CG@@@@$0A@@@AAVArchive@@@Z();
005c3769      *(uint32_t*)esp_1;
005c3734      esp_1[1];
005c3734      esp_1[2];
005c36d0  }

005c376f                                               90                                                                 .

005c3770  class DBObj* ACCharGenData::Allocate(class ACCharGenData const* this @ ecx)

005c3770  {
005c3770      /* tailcall */
005c3770      return ACCharGenData::Allocator();
005c3770  }

005c3775                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005c3780  void* __thiscall ACCharGenData::`scalar deleting destructor'(class ACCharGenData* this, uint32_t arg2)

005c3780  {
005c3783      ACCharGenData::~ACCharGenData(this);
005c3783      
005c378d      if ((arg2 & 1) != 0)
005c3790          operator delete(this);
005c3790      
005c379b      return this;
005c3780  }

005c379e                                                                                            90 90                                ..

005c37a0  void __thiscall CharGenState::SetVerificationState(class CharGenState* this, enum CG_VERIFICATION_RESPONSE arg2)

005c37a0  {
005c37a4      this->verificationState = arg2;
005c37a0  }

005c37ad                                         90 90 90                                                               ...

005c37b0  enum CG_VERIFICATION_RESPONSE __fastcall CharGenState::GetVerificationState(class CharGenState* this)

005c37b0  {
005c37b6      return this->verificationState;
005c37b0  }

005c37b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005c37c0  void __fastcall CharGenState::UpdateRemainingSkillCredits(class CharGenState* this)

005c37c0  {
005c37cb      int32_t i = 1;
005c37d0      int32_t ebx = 0;
005c37d0      
005c37d4      if (this->totalNumSkills > 1)
005c37d4      {
005c3832          do
005c3832          {
005c37e6              int32_t eax_2 = this->skillLevels[i];
005c37e6              
005c37ec              if (eax_2 == 2)
005c3827                  ebx += ACCharGenData::GetSkillTrainedCost(this->charGenData, i, this->mHeritageGroup, this->mGender);
005c37ec              else if (eax_2 == 3)
005c3827                  ebx += ACCharGenData::GetSkillSpecializedCost(this->charGenData, i, this->mHeritageGroup, this->mGender);
005c3827              
005c382f              i += 1;
005c3832          } while (i < this->totalNumSkills);
005c37d4      }
005c37d4      
005c383d      this->remainingSkillCredits = (this->totalSkillCredits - ebx);
005c37c0  }

005c37d8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
005c3846                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005c3850  int32_t __thiscall CharGenState::SetSkinShade(class CharGenState* this, double arg2)

005c3850  {
005c385d      *(uint32_t*)((char*)this->skinShade)[4] = *(uint32_t*)((char*)arg2)[4];
005c3865      this->skinShade = arg2;
005c386b      int32_t result = this->vtable->UpdateTrueFacePal();
005c386d      this->skinShade;
005c3874      return result;
005c3850  }

005c3877                                                                       90 90 90 90 90 90 90 90 90                         .........

005c3880  int32_t __thiscall CharGenState::SetHairShade(class CharGenState* this, double arg2)

005c3880  {
005c388d      *(uint32_t*)((char*)this->hairShade)[4] = *(uint32_t*)((char*)arg2)[4];
005c3895      this->hairShade = arg2;
005c389b      int32_t result = this->vtable->UpdateTrueFacePal();
005c389d      this->hairShade;
005c38a4      return result;
005c3880  }

005c38a7                       90 90 90 90 90 90 90 90 90                                                         .........

005c38b0  int32_t __thiscall CharGenState::SetHairColor(class CharGenState* this, int32_t arg2)

005c38b0  {
005c38b7      struct CharGenState::VTable* vtable = this->vtable;
005c38b9      this->hairColor = arg2;
005c38bf      vtable->UpdateTrueFacePal();
005c38c8      return this->hairColor;
005c38b0  }

005c38cb                                   90 90 90 90 90                                                             .....

005c38d0  int32_t __thiscall CharGenState::SetEyeColor(class CharGenState* this, int32_t arg2)

005c38d0  {
005c38d7      struct CharGenState::VTable* vtable = this->vtable;
005c38d9      this->eyeColor = arg2;
005c38df      vtable->UpdateTrueFacePal();
005c38e8      return this->eyeColor;
005c38d0  }

005c38eb                                   90 90 90 90 90                                                             .....

005c38f0  uint32_t __thiscall CharGenState::GetHeadgearPaletteTemplateID(class CharGenState* this, int32_t arg2)

005c38f0  {
005c38fe      if ((arg2 < this->numHeadgearColors && arg2 >= 0))
005c3909          return this->headgearPaletteTemplateIDs[arg2];
005c3909      
005c390e      return 0;
005c38f0  }

005c3911                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005c3920  uint32_t __thiscall CharGenState::GetShirtPaletteTemplateID(class CharGenState* this, int32_t arg2)

005c3920  {
005c392e      if ((arg2 < this->numShirtColors && arg2 >= 0))
005c3939          return this->shirtPaletteTemplateIDs[arg2];
005c3939      
005c393e      return 0;
005c3920  }

005c3941     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005c3950  uint32_t __thiscall CharGenState::GetTrousersPaletteTemplateID(class CharGenState* this, int32_t arg2)

005c3950  {
005c395e      if ((arg2 < this->numTrousersColors && arg2 >= 0))
005c3969          return this->trousersPaletteTemplateIDs[arg2];
005c3969      
005c396e      return 0;
005c3950  }

005c3971                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005c3980  uint32_t __thiscall CharGenState::GetFootwearPaletteTemplateID(class CharGenState* this, int32_t arg2)

005c3980  {
005c398e      if ((arg2 < this->numFootwearColors && arg2 >= 0))
005c3999          return this->footwearPaletteTemplateIDs[arg2];
005c3999      
005c399e      return 0;
005c3980  }

005c39a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005c39b0  int32_t __thiscall CharGenState::GetAttribute(class CharGenState* this, uint32_t arg2)

005c39b0  {
005c39b8      if ((arg2 - 1) > 5)
005c39f9          return 0;
005c39f9      
005c39ba      switch (arg2)
005c39ba      {
005c39c7          case 1:
005c39c7          {
005c39c7              return this->strength;
005c39c7              break;
005c39c7          }
005c39d0          case 2:
005c39d0          {
005c39d0              return this->endurance;
005c39d0              break;
005c39d0          }
005c39d9          case 3:
005c39d9          {
005c39d9              return this->quickness;
005c39d9              break;
005c39d9          }
005c39e2          case 4:
005c39e2          {
005c39e2              return this->coordination;
005c39e2              break;
005c39e2          }
005c39eb          case 5:
005c39eb          {
005c39eb              return this->focus;
005c39eb              break;
005c39eb          }
005c39f4          case 6:
005c39f4          {
005c39f4              return this->self;
005c39f4              break;
005c39f4          }
005c39ba      }
005c39b0  }

005c39fc  uint32_t jump_table_5c39fc[0x6] = 
005c39fc  {
005c39fc      [0x0] =  0x005c39c1
005c3a00      [0x1] =  0x005c39ca
005c3a04      [0x2] =  0x005c39d3
005c3a08      [0x3] =  0x005c39dc
005c3a0c      [0x4] =  0x005c39e5
005c3a10      [0x5] =  0x005c39ee
005c3a14  }

005c3a14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c3a20  void __stdcall CharGenState::GetAttributeName(class CharGenState* this @ ecx, uint32_t arg2, char* arg3)

005c3a20  {
005c3a28      if ((arg2 - 1) > 5)
005c3a28      {
005c3af9          *(uint8_t*)arg3 = 0;
005c3afc          return;
005c3a28      }
005c3a28      
005c3a2e      switch (arg2)
005c3a2e      {
005c3a3f          case 1:
005c3a3f          {
005c3a3f              __builtin_strncpy(arg3, "Strength", 9);
005c3a53              return;
005c3a3f              break;
005c3a3f          }
005c3a5f          case 2:
005c3a5f          {
005c3a5f              __builtin_strcpy(arg3, "Endurance");
005c3a74              return;
005c3a5f              break;
005c3a5f          }
005c3a81          case 3:
005c3a81          {
005c3a81              __builtin_strcpy(arg3, "Quickness");
005c3a96              return;
005c3a81              break;
005c3a81          }
005c3aa3          case 4:
005c3aa3          {
005c3aa3              __builtin_strncpy(arg3, "Coordination", 0xd);
005c3ac0              return;
005c3aa3              break;
005c3aa3          }
005c3acd          case 5:
005c3acd          {
005c3acd              __builtin_strcpy(arg3, "Focus");
005c3ada              return;
005c3acd              break;
005c3acd          }
005c3ae7          case 6:
005c3ae7          {
005c3ae7              __builtin_strncpy(arg3, "Self", 5);
005c3af2              return;
005c3ae7              break;
005c3ae7          }
005c3a2e      }
005c3a20  }

005c3aff                                                                                               90                                 .
005c3b00  uint32_t jump_table_5c3b00[0x6] = 
005c3b00  {
005c3b00      [0x0] =  0x005c3a35
005c3b04      [0x1] =  0x005c3a56
005c3b08      [0x2] =  0x005c3a77
005c3b0c      [0x3] =  0x005c3a99
005c3b10      [0x4] =  0x005c3ac3
005c3b14      [0x5] =  0x005c3add
005c3b18  }

005c3b18                                                                          90 90 90 90 90 90 90 90                          ........

005c3b20  int32_t __thiscall CharGenState::GetAbsRemainingCredits(class CharGenState* this, uint32_t arg2)

005c3b20  {
005c3b20      int32_t totalAtrbCredits = this->totalAtrbCredits;
005c3b2e      int32_t i = 1;
005c3b33      int32_t* ebx = &this->bAttribLocked[1];
005c3b33      
005c3b94      do
005c3b94      {
005c3b43          int32_t edx_1 = 0xa;
005c3b43          
005c3b54          if (((ADJ(ebx)->bAttribLocked[1] == 1 || i == arg2) && (i - 1) <= 5))
005c3b54              switch (i)
005c3b54              {
005c3b5d                  case 1:
005c3b5d                  {
005c3b5d                      edx_1 = this->strength;
005c3b5d                      break;
005c3b5d                  }
005c3b65                  case 2:
005c3b65                  {
005c3b65                      edx_1 = this->endurance;
005c3b65                      break;
005c3b65                  }
005c3b6d                  case 3:
005c3b6d                  {
005c3b6d                      edx_1 = this->quickness;
005c3b6d                      break;
005c3b6d                  }
005c3b75                  case 4:
005c3b75                  {
005c3b75                      edx_1 = this->coordination;
005c3b75                      break;
005c3b75                  }
005c3b7d                  case 5:
005c3b7d                  {
005c3b7d                      edx_1 = this->focus;
005c3b7d                      break;
005c3b7d                  }
005c3b85                  case 6:
005c3b85                  {
005c3b85                      edx_1 = this->self;
005c3b85                      break;
005c3b85                  }
005c3b54              }
005c3b54          
005c3b8b          totalAtrbCredits -= edx_1;
005c3b8d          i += 1;
005c3b8e          ebx = &ebx[1];
005c3b94      } while (i < 7);
005c3b94      
005c3b9a      return totalAtrbCredits;
005c3b20  }

005c3b9d                                                                                         8d 49 00                               .I.
005c3ba0  uint32_t jump_table_5c3ba0[0x6] = 
005c3ba0  {
005c3ba0      [0x0] =  0x005c3b5d
005c3ba4      [0x1] =  0x005c3b65
005c3ba8      [0x2] =  0x005c3b6d
005c3bac      [0x3] =  0x005c3b75
005c3bb0      [0x4] =  0x005c3b7d
005c3bb4      [0x5] =  0x005c3b85
005c3bb8  }

005c3bb8                                                                          90 90 90 90 90 90 90 90                          ........

005c3bc0  void __fastcall CharGenState::ResetAttributeLock(class CharGenState* this)

005c3bc0  {
005c3bce      __builtin_memset(&this->bAttribLocked[1], 0, 0x18);
005c3bc0  }

005c3bd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005c3be0  void __thiscall CharGenState::LockAttribute(class CharGenState* this, uint32_t arg2, int32_t arg3)

005c3be0  {
005c3beb      if ((arg2 > 0 && arg2 < 7))
005c3bf1          this->bAttribLocked[arg2] = arg3;
005c3be0  }

005c3bfb                                                                                   90 90 90 90 90                             .....

005c3c00  enum SKILL_ADVANCEMENT_CLASS __thiscall CharGenState::GetSkillLevel(class CharGenState* this, uint32_t arg2)

005c3c00  {
005c3c0a      if (arg2 >= this->totalNumSkills)
005c3c1a          return 0;
005c3c1a      
005c3c15      return this->skillLevels[arg2];
005c3c00  }

005c3c1d                                                                                         90 90 90                               ...

005c3c20  int32_t __thiscall CharGenState::SetSkillLevel(class CharGenState* this, uint32_t arg2, enum SKILL_ADVANCEMENT_CLASS arg3)

005c3c20  {
005c3c46      if ((arg2 < this->totalNumSkills && (arg3 < NUM_SKILL_ADVANCEMENT_CLASSES && arg3 >= UNTRAINED_SKILL_ADVANCEMENT_CLASS)))
005c3c46      {
005c3c52          int32_t eax_2 = this->skillLevels[arg2];
005c3c58          int32_t remainingSkillCredits = this->remainingSkillCredits;
005c3c58          
005c3c5e          if (eax_2 == 2)
005c3c9b              remainingSkillCredits += ACCharGenData::GetSkillTrainedCost(this->charGenData, arg2, this->mHeritageGroup, this->mGender);
005c3c5e          else if (eax_2 == 3)
005c3c9b              remainingSkillCredits += ACCharGenData::GetSkillSpecializedCost(this->charGenData, arg2, this->mHeritageGroup, this->mGender);
005c3c9b          
005c3ca0          if (arg3 == TRAINED_SKILL_ADVANCEMENT_CLASS)
005c3cdd              remainingSkillCredits -= ACCharGenData::GetSkillTrainedCost(this->charGenData, arg2, this->mHeritageGroup, this->mGender);
005c3ca0          else if (arg3 == SPECIALIZED_SKILL_ADVANCEMENT_CLASS)
005c3cdd              remainingSkillCredits -= ACCharGenData::GetSkillSpecializedCost(this->charGenData, arg2, this->mHeritageGroup, this->mGender);
005c3cdd          
005c3ce1          if (remainingSkillCredits >= 0)
005c3ce1          {
005c3ce3              enum SKILL_ADVANCEMENT_CLASS* skillLevels = this->skillLevels;
005c3ce9              this->remainingSkillCredits = remainingSkillCredits;
005c3cf1              skillLevels[arg2] = arg3;
005c3cfb              return 1;
005c3ce1          }
005c3c46      }
005c3c46      
005c3d04      return 0;
005c3c20  }

005c3d07                       90 90 90 90 90 90 90 90 90                                                         .........

005c3d10  void __thiscall CharGenState::SetName(class CharGenState* this, char const* arg2)

005c3d10  {
005c3d10      char const* eax = arg2;
005c3d15      char const* edx = eax;
005c3d1a      int32_t ebx;
005c3d1a      int32_t var_8 = ebx;
005c3d1a      
005c3d25      do
005c3d25      {
005c3d20          ebx = *(uint8_t*)edx;
005c3d22          edx = &edx[1];
005c3d25      } while (ebx != 0);
005c3d25      
005c3d2d      if ((edx - &edx[1]) <= 0x20)
005c3d2d      {
005c3d2f          char (* esi_1)[0x21] = &this->name;
005c3d37          char* edx_3 = ((char*)esi_1 - eax);
005c3d37          
005c3d48          do
005c3d48          {
005c3d40              this = *(uint8_t*)eax;
005c3d42              *(uint8_t*)(edx_3 + eax) = this;
005c3d45              eax = &eax[1];
005c3d48          } while (this != 0);
005c3d48          
005c3d4b          ACCharGenData::FormatName(esi_1);
005c3d2d      }
005c3d10  }

005c3d1d                                                                                         8d 49 00                               .I.
005c3d57                                                                       90 90 90 90 90 90 90 90 90                         .........

005c3d60  void __thiscall CharGenState::SetSlot(class CharGenState* this, int32_t arg2)

005c3d60  {
005c3d64      this->slot = arg2;
005c3d60  }

005c3d6d                                         90 90 90                                                               ...

005c3d70  class IDClass<_tagDataID,32,0>* __thiscall CharGenState::GetHeadgearPalSetID(class CharGenState* this, class IDClass<_tagDataID,32,0>* __return, int32_t arg3)

005c3d70  {
005c3d81      __return->id = this->headgearPalSetIDs[arg3].id;
005c3d83      return __return;
005c3d70  }

005c3d86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005c3d90  class IDClass<_tagDataID,32,0>* __thiscall CharGenState::GetShirtPalSetID(class CharGenState* this, class IDClass<_tagDataID,32,0>* __return, int32_t arg3)

005c3d90  {
005c3da1      __return->id = this->shirtPalSetIDs[arg3].id;
005c3da3      return __return;
005c3d90  }

005c3da6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005c3db0  class IDClass<_tagDataID,32,0>* __thiscall CharGenState::GetTrousersPalSetID(class CharGenState* this, class IDClass<_tagDataID,32,0>* __return, int32_t arg3)

005c3db0  {
005c3dc1      __return->id = this->trousersPalSetIDs[arg3].id;
005c3dc3      return __return;
005c3db0  }

005c3dc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005c3dd0  class IDClass<_tagDataID,32,0>* __thiscall CharGenState::GetFootwearPalSetID(class CharGenState* this, class IDClass<_tagDataID,32,0>* __return, int32_t arg3)

005c3dd0  {
005c3de1      __return->id = this->footwearPalSetIDs[arg3].id;
005c3de3      return __return;
005c3dd0  }

005c3de6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005c3df0  void __thiscall CharGenState::BalanceAttributes(class CharGenState* this, uint32_t arg2)

005c3df0  {
005c3e24      int32_t eax_6 = ((((((this->focus - this->totalAtrbCredits) + this->quickness) + this->coordination) + this->endurance) + this->strength) + this->self);
005c3e24      
005c3e28      if (eax_6 > 0)
005c3e28      {
005c3e32          int32_t esi_2 = 0;
005c3e32          
005c3e3f          while (true)
005c3e3f          {
005c3e3f              if ((esi_2 != 0 || startAtrb == 1))
005c3e3f              {
005c3e41                  esi_2 = 1;
005c3e41                  
005c3e48                  if (arg2 != 1)
005c3e48                  {
005c3e4a                      int32_t strength = this->strength;
005c3e4a                      
005c3e5c                      if ((strength > 0xa && this->bAttribLocked[1] == 0))
005c3e5c                      {
005c3e5f                          eax_6 -= 1;
005c3e62                          this->strength = (strength - 1);
005c3e62                          
005c3e68                          if (eax_6 <= 0)
005c3e68                          {
005c3fb1                              startAtrb = 2;
005c3fbc                              return;
005c3e68                          }
005c3e5c                      }
005c3e48                  }
005c3e3f              }
005c3e3f              
005c3e79              if ((esi_2 != 0 || startAtrb == 2))
005c3e79              {
005c3e7e                  esi_2 = 1;
005c3e7e                  
005c3e83                  if (arg2 != 2)
005c3e83                  {
005c3e85                      int32_t endurance = this->endurance;
005c3e85                      
005c3e97                      if ((endurance > 0xa && this->bAttribLocked[2] == 0))
005c3e97                      {
005c3e9a                          eax_6 -= 1;
005c3e9d                          this->endurance = (endurance - 1);
005c3e9d                          
005c3ea3                          if (eax_6 <= 0)
005c3ea3                          {
005c3fc0                              startAtrb = 4;
005c3fcb                              return;
005c3ea3                          }
005c3e97                      }
005c3e83                  }
005c3e79              }
005c3e79              
005c3eb4              if ((esi_2 != 0 || startAtrb == 4))
005c3eb4              {
005c3eb9                  esi_2 = 1;
005c3eb9                  
005c3ebe                  if (arg2 != 4)
005c3ebe                  {
005c3ec0                      int32_t coordination = this->coordination;
005c3ec0                      
005c3ed2                      if ((coordination > 0xa && this->bAttribLocked[4] == 0))
005c3ed2                      {
005c3ed5                          eax_6 -= 1;
005c3ed8                          this->coordination = (coordination - 1);
005c3ed8                          
005c3ede                          if (eax_6 <= 0)
005c3ede                          {
005c3fcf                              startAtrb = 3;
005c3fda                              return;
005c3ede                          }
005c3ed2                      }
005c3ebe                  }
005c3eb4              }
005c3eb4              
005c3eef              if ((esi_2 != 0 || startAtrb == 3))
005c3eef              {
005c3ef4                  esi_2 = 1;
005c3ef4                  
005c3ef9                  if (arg2 != 3)
005c3ef9                  {
005c3efb                      int32_t quickness = this->quickness;
005c3efb                      
005c3f0d                      if ((quickness > 0xa && this->bAttribLocked[3] == 0))
005c3f0d                      {
005c3f10                          eax_6 -= 1;
005c3f13                          this->quickness = (quickness - 1);
005c3f13                          
005c3f19                          if (eax_6 <= 0)
005c3f19                          {
005c3fde                              startAtrb = 5;
005c3fe9                              return;
005c3f19                          }
005c3f0d                      }
005c3ef9                  }
005c3eef              }
005c3eef              
005c3f2a              if ((esi_2 != 0 || startAtrb == 5))
005c3f2a              {
005c3f2f                  esi_2 = 1;
005c3f2f                  
005c3f34                  if (arg2 != 5)
005c3f34                  {
005c3f36                      int32_t focus = this->focus;
005c3f36                      
005c3f48                      if ((focus > 0xa && this->bAttribLocked[5] == 0))
005c3f48                      {
005c3f4b                          eax_6 -= 1;
005c3f4e                          this->focus = (focus - 1);
005c3f4e                          
005c3f54                          if (eax_6 <= 0)
005c3f54                          {
005c3fed                              startAtrb = 6;
005c3ff8                              return;
005c3f54                          }
005c3f48                      }
005c3f34                  }
005c3f2a              }
005c3f2a              
005c3f65              if ((esi_2 == 0 && startAtrb != 6))
005c3f65                  continue;
005c3f65              
005c3f6e              esi_2 = 1;
005c3f6e              
005c3f73              if (arg2 != 6)
005c3f73              {
005c3f79                  int32_t self = this->self;
005c3f79                  
005c3f82                  if ((self > 0xa && this->bAttribLocked[6] == 0))
005c3f82                  {
005c3f96                      eax_6 -= 1;
005c3f99                      this->self = (self - 1);
005c3f99                      
005c3f9f                      if (eax_6 <= 0)
005c3f9f                          break;
005c3f82                  }
005c3f73              }
005c3e3f          }
005c3e3f          
005c3fa5          startAtrb = 1;
005c3e28      }
005c3df0  }

005c3ffb                                                                                   90 90 90 90 90                             .....

005c4000  void __thiscall CharGenState::SetStartArea(class CharGenState* this, int32_t arg2)

005c4000  {
005c4011      if ((arg2 < 0 || arg2 >= this->charGenData->mStartAreaList.m_num))
005c4011      {
005c401c          this->startArea = 0xffffffff;
005c4026          return;
005c4011      }
005c4011      
005c4013      this->startArea = arg2;
005c4000  }

005c4029                             90 90 90 90 90 90 90                                                           .......

005c4030  class ACCharGenResult* __fastcall CharGenState::GetCharGenResult(class CharGenState* this)

005c4030  {
005c4030      class CharGenState* __return = this;
005c4048      this->charGenResult.heritageGroup = this->mHeritageGroup;
005c4051      this->charGenResult.gender = this->mGender;
005c405a      this->charGenResult.noseStrip = this->noseStrip;
005c4063      this->charGenResult.mouthStrip = this->mouthStrip;
005c406c      this->charGenResult.eyesStrip = this->eyesStrip;
005c4075      this->charGenResult.eyeColor = this->eyeColor;
005c4078      int32_t headgearColor = this->headgearColor;
005c407e      this->charGenResult.hairStyle = this->hairStyle;
005c4087      this->charGenResult.hairColor = this->hairColor;
005c4091      this->charGenResult.headgearStyle = this->headgearStyle;
005c4098      uint32_t eax_3;
005c4098      
005c4098      if ((headgearColor >= this->numHeadgearColors || headgearColor < 0))
005c40a5          eax_3 = 0;
005c4098      else
005c40a0          eax_3 = this->headgearPaletteTemplateIDs[headgearColor];
005c40a0      
005c40b9      this->charGenResult.headgearColor = eax_3;
005c40bc      int32_t shirtColor = this->shirtColor;
005c40c4      this->charGenResult.headgearShade = ((double)((long double)this->headgearShade));
005c40c7      this->charGenResult.shirtStyle = this->shirtStyle;
005c40ce      uint32_t eax_4;
005c40ce      
005c40ce      if ((shirtColor >= this->numShirtColors || shirtColor < 0))
005c40db          eax_4 = 0;
005c40ce      else
005c40d6          eax_4 = this->shirtPaletteTemplateIDs[shirtColor];
005c40d6      
005c40ef      this->charGenResult.shirtColor = eax_4;
005c40f2      int32_t trousersColor = this->trousersColor;
005c40fa      this->charGenResult.shirtShade = ((double)((long double)this->shirtShade));
005c40fd      this->charGenResult.trousersStyle = this->trousersStyle;
005c4104      uint32_t eax_5;
005c4104      
005c4104      if ((trousersColor >= this->numTrousersColors || trousersColor < 0))
005c4111          eax_5 = 0;
005c4104      else
005c410c          eax_5 = this->trousersPaletteTemplateIDs[trousersColor];
005c410c      
005c4125      this->charGenResult.trousersColor = eax_5;
005c4128      int32_t footwearColor = this->footwearColor;
005c4130      this->charGenResult.trousersShade = ((double)((long double)this->trousersShade));
005c4133      this->charGenResult.footwearStyle = this->footwearStyle;
005c413a      uint32_t eax_6;
005c413a      
005c413a      if ((footwearColor >= this->numFootwearColors || footwearColor < 0))
005c4147          eax_6 = 0;
005c413a      else
005c4142          eax_6 = this->footwearPaletteTemplateIDs[footwearColor];
005c4142      
005c415b      this->charGenResult.footwearColor = eax_6;
005c4164      this->charGenResult.footwearShade = ((double)((long double)this->footwearShade));
005c416d      this->charGenResult.strength = this->strength;
005c4179      this->charGenResult.templateNum = this->template_;
005c4185      this->charGenResult.skinShade = ((double)((long double)this->skinShade));
005c418e      this->charGenResult.quickness = this->quickness;
005c4194      enum SKILL_ADVANCEMENT_CLASS* skillAdvancementClasses = this->charGenResult.skillAdvancementClasses;
005c419c      this->charGenResult.endurance = this->endurance;
005c41a8      this->charGenResult.coordination = this->coordination;
005c41b4      this->charGenResult.hairShade = ((double)((long double)this->hairShade));
005c41b7      this->charGenResult.focus = this->focus;
005c41bd      this->charGenResult.self = this->self;
005c41bd      
005c41c3      if (skillAdvancementClasses != 0)
005c41c3      {
005c41c6          operator delete[](skillAdvancementClasses);
005c41ce          this->charGenResult.skillAdvancementClasses = nullptr;
005c41c3      }
005c41c3      
005c41d8      int32_t totalNumSkills = this->totalNumSkills;
005c41e0      this->charGenResult.numSkills = totalNumSkills;
005c41e0      
005c41e6      if (totalNumSkills > 0)
005c41e6      {
005c41f7          this->charGenResult.skillAdvancementClasses = operator new[]((totalNumSkills << 2));
005c4200          int32_t i = 0;
005c4200          
005c4204          if (this->totalNumSkills > 0)
005c4204          {
005c422b              do
005c422b              {
005c4219                  this->charGenResult.skillAdvancementClasses[i] = this->skillLevels[i];
005c4228                  i += 1;
005c422b              } while (i < this->totalNumSkills);
005c4204          }
005c41e6      }
005c41e6      
005c4238      int32_t* eax_11 = AC1Legacy::PStringBase<char>::PStringBase<char>(&__return, &this->name);
005c423d      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->charGenResult.name.m_buffer;
005c423d      
005c424d      if (m_buffer != *(uint32_t*)eax_11)
005c424d      {
005c425b          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005c425d              m_buffer->vtable->__vecDelDtor(1);
005c425d          
005c4265          class AC1Legacy::PStringBase<char> ebx_1 = *(uint32_t*)eax_11;
005c4267          this->charGenResult.name.m_buffer = ebx_1;
005c4271          InterlockedIncrement((ebx_1 + 4));
005c424d      }
005c424d      
005c4277      class CharGenState* __return_1 = __return;
005c4277      
005c428c      if ((InterlockedDecrement(&*(int32_t*)((char*)__return_1 + 4)) == 0 && __return_1 != 0))
005c428e          __return_1->vtable->UpdateTrueFacePal(1);
005c428e      
005c42a1      this->charGenResult.startArea = this->startArea;
005c42a7      uint32_t heritageGroup = this->charGenResult.heritageGroup;
005c42ad      this->charGenResult.slot = this->slot;
005c42ad      
005c42b5      if (heritageGroup == 0xc)
005c42b5      {
005c42bf          if (this->createAsAdmin != 0)
005c42bf          {
005c42cb              DBObj::GetDIDByEnum(&__return, 0x10000092, 0xc);
005c42d4              this->charGenResult.classID.id = __return;
005c42bf              goto label_5c438b;
005c42bf          }
005c42bf          
005c42e9          DBObj::GetDIDByEnum(&__return, 0x10000090, 0xc);
005c42f6          this->charGenResult.classID.id = __return;
005c4303          return &this->charGenResult;
005c42b5      }
005c42b5      
005c4307      int32_t var_1c_1;
005c4307      
005c4307      if (heritageGroup == 0xd)
005c4307      {
005c4311          if (this->createAsAdmin != 0)
005c4311          {
005c4313              var_1c_1 = 0x10000093;
005c4311              goto label_5c4371;
005c4311          }
005c4311          
005c4324          DBObj::GetDIDByEnum(&__return, 0x10000091, 0xc);
005c4331          this->charGenResult.classID.id = __return;
005c433e          return &this->charGenResult;
005c4307      }
005c4307      
005c4349      DBObj::GetDIDByEnum(&__return, 0x10000003, 0xc);
005c435d      this->charGenResult.classID.id = __return;
005c435d      
005c4363      if (this->createAsAdmin != 0)
005c4363      {
005c4365          int32_t var_18_7 = 0xc;
005c4367          var_1c_1 = 0x10000004;
005c4371      label_5c4371:
005c4371          DBObj::GetDIDByEnum(&__return, var_1c_1, 0xc);
005c437a          this->charGenResult.classID.id = __return;
005c438b      label_5c438b:
005c438b          this->charGenResult.isAdmin = 1;
005c438b          
005c4391          if (this->createAsEnvoy != 0)
005c4393              this->charGenResult.isEnvoy = 1;
005c4363      }
005c4363      
005c43a1      return &this->charGenResult;
005c4030  }

005c4208                          8d a4 24 00 00 00 00 90                                                          ..$.....
005c43a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005c43b0  void __fastcall CharGenState::ResetSkillLevels(class CharGenState* this)

005c43b0  {
005c43b9      this->remainingSkillCredits = this->totalSkillCredits;
005c43b9      
005c43e2      if ((this->skillLevels != 0 && (this->mHeritageGroup != 0 && this->mGender != 0xffffffff)))
005c43e2      {
005c43f6          int32_t i = 1;
005c43fb          class PackableHashTable<unsigned long,SkillBase>* ebp_2 = &this->skillTable->_skillBaseHash;
005c43fb          
005c4400          if (this->totalNumSkills > 1)
005c4400          {
005c44c5              do
005c44c5              {
005c4410                  uint32_t _table_size = ebp_2->_table_size;
005c4410                  
005c4415                  if (_table_size != 0)
005c4415                  {
005c441b                      class PackableHashData<unsigned long,SkillBase>** _buckets = ebp_2->_buckets;
005c441b                      
005c4420                      if (_buckets != 0)
005c4420                      {
005c4431                          for (int32_t* j = _buckets[(COMBINE(0, i) % _table_size)]; j != 0; j = j[0x18])
005c4431                          {
005c4439                              if (i == *(uint32_t*)j)
005c4439                              {
005c4449                                  if (j != 0xfffffff8)
005c4449                                  {
005c4460                                      int32_t eax_8 = ACCharGenData::GetSkillTrainedCost(this->charGenData, i, this->mHeritageGroup, this->mGender);
005c447c                                      int32_t eax_10 = ACCharGenData::GetSkillSpecializedCost(this->charGenData, i, this->mHeritageGroup, this->mGender);
005c447c                                      
005c4487                                      if ((eax_8 >= 0 && eax_10 >= 0))
005c4487                                      {
005c448b                                          if (eax_8 > 0)
005c448d                                              this->skillLevels[i] = 1;
005c448b                                          else if (eax_10 <= 0)
005c44af                                              this->skillLevels[i] = 3;
005c449e                                          else
005c44a0                                              this->skillLevels[i] = 2;
005c4487                                      }
005c4449                                  }
005c4449                                  
005c4449                                  break;
005c4439                              }
005c4431                          }
005c4420                      }
005c4415                  }
005c4415                  
005c44c2                  i += 1;
005c44c5              } while (i < this->totalNumSkills);
005c4400          }
005c43e2      }
005c43b0  }

005c4409                             8d a4 24 00 00 00 00                                                           ..$....

005c44d0  void __stdcall CharGenState::StoreColorInformation(class CharGenState* this @ ecx, class IDClass<_tagDataID,32,0> arg2, int32_t* arg3, uint32_t** arg4, class IDClass<_tagDataID,32,0>** arg5, class Sex_CG* arg6)

005c44d0  {
005c44dd      *(uint32_t*)arg3 = 0;
005c44e4      uint32_t* eax = *(uint32_t*)arg4;
005c44e4      
005c44e8      if (eax != 0)
005c44eb          operator delete[](eax);
005c44eb      
005c44f3      *(uint32_t*)arg4 = nullptr;
005c44fd      class IDClass<_tagDataID,32,0>* eax_1 = *(uint32_t*)arg5;
005c44fd      
005c4501      if (eax_1 != 0)
005c4507          operator delete[](&eax_1[-1]);
005c4507      
005c451a      *(uint32_t*)arg5 = nullptr;
005c4526      void var_28;
005c4526      class DBObj* eax_5 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_28, arg2, 0x19));
005c4526      
005c4534      if (eax_5 != 0)
005c4534      {
005c453a          int32_t esi_2 = *(int32_t*)((char*)eax_5 + 0x5c);
005c453a          
005c4544          if (esi_2 > 0)
005c4544          {
005c4546              int32_t edi_1 = (esi_2 << 2);
005c455b              *(uint32_t*)arg4 = operator new[](edi_1);
005c455d              void* eax_7 = operator new[]((edi_1 + 4));
005c4567              void* edi_3;
005c4567              
005c4567              if (eax_7 == 0)
005c457e                  edi_3 = nullptr;
005c4567              else
005c4567              {
005c456f                  edi_3 = ((char*)eax_7 + 4);
005c4575                  *(uint32_t*)eax_7 = esi_2;
005c4577                  `vector constructor iterator'(edi_3, 4, esi_2, Vector3::Vector3);
005c4567              }
005c4567              
005c4584              *(uint32_t*)arg5 = edi_3;
005c4544          }
005c4544          
005c458d          void __return;
005c458d          PackableHashTable<unsigned long,CloPaletteTemplate>::begin(((char*)eax_5 + 0x4c), &__return);
005c4596          void var_20;
005c4596          CloPaletteTemplate::CloPaletteTemplate(&var_20);
005c45a1          int32_t* i_1;
005c45a1          int32_t* i_2;
005c45a1          
005c45a1          for (int32_t* i = i_1; i != 0; i = i_2)
005c45a1          {
005c45b8              CloPaletteTemplate::operator=(&var_20, &i[1]);
005c45c3              int32_t var_18;
005c45c3              
005c45c3              if (var_18 > 0)
005c45c3              {
005c45c9                  uint32_t m_num = arg6->mClothingColorsList.m_num;
005c45cf                  int32_t edi_4 = *(uint32_t*)i;
005c45d1                  int32_t eax_9 = 0;
005c45d1                  
005c45d5                  if (m_num > 0)
005c45d5                  {
005c45d7                      uint32_t* m_data = arg6->mClothingColorsList.m_data;
005c45d7                      
005c45ea                      do
005c45ea                      {
005c45e2                          if (*(uint32_t*)m_data == edi_4)
005c45e2                          {
005c45f1                              if (eax_9 != 0xffffffff)
005c45f1                              {
005c45fa                                  *(uint32_t*)arg4[*(uint32_t*)arg3] = edi_4;
005c460f                                  void* var_14;
005c460d                                  *(uint32_t*)arg5[*(uint32_t*)arg3].id = *(uint32_t*)((char*)var_14 + 0x10);
005c4612                                  *(uint32_t*)arg3 += 1;
005c45f1                              }
005c45f1                              
005c45f1                              break;
005c45e2                          }
005c45e2                          
005c45e4                          eax_9 += 1;
005c45e5                          m_data = &m_data[1];
005c45ea                      } while (eax_9 < m_num);
005c45d5                  }
005c45c3              }
005c45c3              
005c4615              i_2 = i[5];
005c4615              
005c461a              if (i_2 == 0)
005c461a              {
005c4623                  int32_t eax_13 = (i[6] + 1);
005c4626                  int32_t var_4;
005c4626                  
005c4626                  if (eax_13 >= var_4)
005c4626                  {
005c4633                  label_5c4633:
005c4633                      i_2 = nullptr;
005c4626                  }
005c4626                  else
005c4626                  {
005c462c                      int32_t var_8;
005c462c                      
005c462c                      while (*(uint32_t*)(var_8 + (eax_13 << 2)) == 0)
005c462c                      {
005c462e                          eax_13 += 1;
005c462e                          
005c4631                          if (eax_13 >= var_4)
005c4631                              goto label_5c4633;
005c462c                      }
005c462c                      
005c465b                      i_2 = *(uint32_t*)(var_8 + (eax_13 << 2));
005c4626                  }
005c461a              }
005c45a1          }
005c45a1          
005c4645          *(uint32_t*)(*(uint32_t*)eax_5 + 0x14)();
005c464c          CloPaletteTemplate::~CloPaletteTemplate(&var_20);
005c4534      }
005c44d0  }

005c45ad                                         8d 49 00                                                               .I.

005c4660  int32_t __thiscall CharGenState::SetStrength(class CharGenState* this, int32_t arg2, int32_t arg3)

005c4660  {
005c4661      int32_t strength_1 = this->strength;
005c4661      
005c466e      if ((arg2 > strength_1 && CharGenState::GetAbsRemainingCredits(this, 1) == 0))
005c467f          return strength_1;
005c467f      
005c4688      this->strength = arg2;
005c4688      
005c468e      if (arg3 != 0)
005c4692          CharGenState::BalanceAttributes(this, 1);
005c4692      
005c46a9      int32_t strength = this->strength;
005c46ce      this->remainingAtrbCredits = ((((((this->totalAtrbCredits - this->self) - this->focus) - this->quickness) - this->coordination) - this->endurance) - strength);
005c46d5      return strength;
005c4660  }

005c46d8                                                                          90 90 90 90 90 90 90 90                          ........

005c46e0  int32_t __thiscall CharGenState::SetEndurance(class CharGenState* this, int32_t arg2, int32_t arg3)

005c46e0  {
005c46e1      int32_t endurance_1 = this->endurance;
005c46e1      
005c46ee      if ((arg2 > endurance_1 && CharGenState::GetAbsRemainingCredits(this, 2) == 0))
005c46ff          return endurance_1;
005c46ff      
005c4708      this->endurance = arg2;
005c4708      
005c470e      if (arg3 != 0)
005c4712          CharGenState::BalanceAttributes(this, 2);
005c4712      
005c4729      int32_t endurance = this->endurance;
005c474e      this->remainingAtrbCredits = ((((((this->totalAtrbCredits - this->self) - this->focus) - this->quickness) - this->coordination) - this->strength) - endurance);
005c4755      return endurance;
005c46e0  }

005c4758                                                                          90 90 90 90 90 90 90 90                          ........

005c4760  int32_t __thiscall CharGenState::SetCoordination(class CharGenState* this, int32_t arg2, int32_t arg3)

005c4760  {
005c4761      int32_t coordination_1 = this->coordination;
005c4761      
005c476e      if ((arg2 > coordination_1 && CharGenState::GetAbsRemainingCredits(this, 4) == 0))
005c477f          return coordination_1;
005c477f      
005c4788      this->coordination = arg2;
005c4788      
005c478e      if (arg3 != 0)
005c4792          CharGenState::BalanceAttributes(this, 4);
005c4792      
005c47a9      int32_t coordination = this->coordination;
005c47ce      this->remainingAtrbCredits = ((((((this->totalAtrbCredits - this->self) - this->focus) - this->quickness) - this->endurance) - this->strength) - coordination);
005c47d5      return coordination;
005c4760  }

005c47d8                                                                          90 90 90 90 90 90 90 90                          ........

005c47e0  int32_t __thiscall CharGenState::SetQuickness(class CharGenState* this, int32_t arg2, int32_t arg3)

005c47e0  {
005c47e1      int32_t quickness_1 = this->quickness;
005c47e1      
005c47ee      if ((arg2 > quickness_1 && CharGenState::GetAbsRemainingCredits(this, 3) == 0))
005c47ff          return quickness_1;
005c47ff      
005c4808      this->quickness = arg2;
005c4808      
005c480e      if (arg3 != 0)
005c4812          CharGenState::BalanceAttributes(this, 3);
005c4812      
005c4829      int32_t quickness = this->quickness;
005c484e      this->remainingAtrbCredits = ((((((this->totalAtrbCredits - this->self) - this->focus) - this->coordination) - this->endurance) - this->strength) - quickness);
005c4855      return quickness;
005c47e0  }

005c4858                                                                          90 90 90 90 90 90 90 90                          ........

005c4860  int32_t __thiscall CharGenState::SetFocus(class CharGenState* this, int32_t arg2, int32_t arg3)

005c4860  {
005c4861      int32_t focus_1 = this->focus;
005c4861      
005c486e      if ((arg2 > focus_1 && CharGenState::GetAbsRemainingCredits(this, 5) == 0))
005c487f          return focus_1;
005c487f      
005c4888      this->focus = arg2;
005c4888      
005c488e      if (arg3 != 0)
005c4892          CharGenState::BalanceAttributes(this, 5);
005c4892      
005c48a9      int32_t focus = this->focus;
005c48ce      this->remainingAtrbCredits = ((((((this->totalAtrbCredits - this->self) - this->quickness) - this->coordination) - this->endurance) - this->strength) - focus);
005c48d5      return focus;
005c4860  }

005c48d8                                                                          90 90 90 90 90 90 90 90                          ........

005c48e0  int32_t __thiscall CharGenState::SetSelf(class CharGenState* this, int32_t arg2, int32_t arg3)

005c48e0  {
005c48e1      int32_t self_1 = this->self;
005c48e1      
005c48ee      if ((arg2 > self_1 && CharGenState::GetAbsRemainingCredits(this, 6) == 0))
005c48ff          return self_1;
005c48ff      
005c4908      this->self = arg2;
005c4908      
005c490e      if (arg3 != 0)
005c4912          CharGenState::BalanceAttributes(this, 6);
005c4912      
005c4929      int32_t self = this->self;
005c494e      this->remainingAtrbCredits = ((((((this->totalAtrbCredits - this->focus) - this->quickness) - this->coordination) - this->endurance) - this->strength) - self);
005c4955      return self;
005c48e0  }

005c4958                                                                          90 90 90 90 90 90 90 90                          ........

005c4960  class ListNode<SkillRecord *>* __thiscall List<SkillRecord *>::get_node(class List<SkillRecord *>* this, uint32_t arg2)

005c4960  {
005c4960      class ListNode<SkillRecord *>* i = this->_head;
005c4960      
005c496e      if ((i != 0 && arg2 < this->_num_elements))
005c496e      {
005c4970          int32_t ecx = 0;
005c4970          
005c4980          do
005c4980          {
005c4974              if (ecx == arg2)
005c4984                  return i;
005c4984              
005c4978              if (i != 0)
005c497a                  i = i->next;
005c497a              
005c497d              ecx += 1;
005c4980          } while (i != 0);
005c496e      }
005c496e      
005c4982      return nullptr;
005c4960  }

005c4987                       90 90 90 90 90 90 90 90 90                                                         .........

005c4990  void __fastcall CharGenState::ApplyDefaultTemplate(class CharGenState* this)

005c4990  {
005c499e      int32_t eax;
005c499e      
005c499e      if (this->strength < 0x32)
005c49a2          eax = CharGenState::GetAbsRemainingCredits(this, 1);
005c49a2      
005c49a9      if ((this->strength >= 0x32 || eax != 0))
005c49a9      {
005c49d1          int32_t eax_7 = ((((((this->totalAtrbCredits - this->self) - this->focus) - this->quickness) - this->coordination) - this->endurance) - 0x32);
005c49d3          this->strength = 0x32;
005c49d9          this->remainingAtrbCredits = eax_7;
005c49a9      }
005c49a9      
005c49e5      int32_t eax_8;
005c49e5      
005c49e5      if (this->endurance < 0x32)
005c49e9          eax_8 = CharGenState::GetAbsRemainingCredits(this, 2);
005c49e9      
005c49f0      if ((this->endurance >= 0x32 || eax_8 != 0))
005c49f0      {
005c4a18          int32_t edx_8 = ((((((this->totalAtrbCredits - this->self) - this->focus) - this->quickness) - this->coordination) - this->strength) - 0x32);
005c4a1a          this->endurance = 0x32;
005c4a20          this->remainingAtrbCredits = edx_8;
005c49f0      }
005c49f0      
005c4a2c      int32_t eax_10;
005c4a2c      
005c4a2c      if (this->coordination < 0x32)
005c4a30          eax_10 = CharGenState::GetAbsRemainingCredits(this, 4);
005c4a30      
005c4a37      if ((this->coordination >= 0x32 || eax_10 != 0))
005c4a37      {
005c4a5f          int32_t eax_17 = ((((((this->totalAtrbCredits - this->self) - this->focus) - this->quickness) - this->endurance) - this->strength) - 0x32);
005c4a61          this->coordination = 0x32;
005c4a67          this->remainingAtrbCredits = eax_17;
005c4a37      }
005c4a37      
005c4a73      int32_t eax_18;
005c4a73      
005c4a73      if (this->quickness < 0x32)
005c4a77          eax_18 = CharGenState::GetAbsRemainingCredits(this, 3);
005c4a77      
005c4a7e      if ((this->quickness >= 0x32 || eax_18 != 0))
005c4a7e      {
005c4aa6          int32_t edx_16 = ((((((this->totalAtrbCredits - this->self) - this->focus) - this->coordination) - this->endurance) - this->strength) - 0x32);
005c4aa8          this->quickness = 0x32;
005c4aae          this->remainingAtrbCredits = edx_16;
005c4a7e      }
005c4a7e      
005c4aba      int32_t eax_20;
005c4aba      
005c4aba      if (this->focus < 0x32)
005c4abe          eax_20 = CharGenState::GetAbsRemainingCredits(this, 5);
005c4abe      
005c4ac5      if ((this->focus >= 0x32 || eax_20 != 0))
005c4ac5      {
005c4aed          int32_t eax_27 = ((((((this->totalAtrbCredits - this->self) - this->quickness) - this->coordination) - this->endurance) - this->strength) - 0x32);
005c4aef          this->focus = 0x32;
005c4af5          this->remainingAtrbCredits = eax_27;
005c4ac5      }
005c4ac5      
005c4b01      int32_t eax_28;
005c4b01      
005c4b01      if (this->self < 0x32)
005c4b05          eax_28 = CharGenState::GetAbsRemainingCredits(this, 6);
005c4b05      
005c4b0c      if ((this->self >= 0x32 || eax_28 != 0))
005c4b0c      {
005c4b34          int32_t edx_24 = ((((((this->totalAtrbCredits - this->focus) - this->quickness) - this->coordination) - this->endurance) - this->strength) - 0x32);
005c4b36          this->self = 0x32;
005c4b3c          this->remainingAtrbCredits = edx_24;
005c4b0c      }
005c4b0c      
005c4b43      /* tailcall */
005c4b43      return CharGenState::ResetSkillLevels(this);
005c4990  }

005c4b48                          90 90 90 90 90 90 90 90                                                          ........

005c4b50  int32_t __thiscall CharGenState::GetSkillScore(class CharGenState* this, uint32_t arg2)

005c4b50  {
005c4b5b      void var_58;
005c4b5b      SkillBase::SkillBase(&var_58);
005c4b5b      
005c4b7a      if (SkillTable::InqSkillBase(this->skillTable, arg2, &var_58) != 0)
005c4b7a      {
005c4b8c          int32_t var_30;
005c4b8c          int32_t var_70_1 = var_30;
005c4b94          int32_t var_24;
005c4b94          int32_t var_64_1 = var_24;
005c4b98          bool cond:0_1 = arg2 >= this->totalNumSkills;
005c4b9e          int32_t var_2c;
005c4b9e          int32_t var_6c_1 = var_2c;
005c4ba6          int32_t var_28;
005c4ba6          int32_t var_68_1 = var_28;
005c4bae          int32_t var_74 = 0x7a016c;
005c4bb6          uint32_t var_20;
005c4bb6          uint32_t var_60_1 = var_20;
005c4bba          uint32_t var_1c;
005c4bba          uint32_t var_5c_1 = var_1c;
005c4bbe          int32_t edi_1;
005c4bbe          
005c4bbe          if (cond:0_1)
005c4bcb              edi_1 = 0;
005c4bbe          else
005c4bc6              edi_1 = this->skillLevels[arg2];
005c4bc6          
005c4bd1          int32_t var_38;
005c4bd1          
005c4bd1          if (edi_1 >= var_38)
005c4bd1          {
005c4bdb              uint32_t result = 0;
005c4be3              int32_t eax_3 = CharGenState::GetAttribute(this, var_1c);
005c4be3              
005c4bfb              if (SkillFormula::Calculate(&var_74, CharGenState::GetAttribute(this, var_20), eax_3, &result) != 0)
005c4bfb              {
005c4c00                  if (edi_1 == 2)
005c4c17                      result += 5;
005c4c00                  else if (edi_1 == 3)
005c4c17                      result += 0xa;
005c4c17                  
005c4c1f                  SkillBase::~SkillBase(&var_58);
005c4c2d                  return result;
005c4bfb              }
005c4bd1          }
005c4b7a      }
005c4b7a      
005c4c34      SkillBase::~SkillBase(&var_58);
005c4c40      return 0;
005c4b50  }

005c4c43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005c4c50  uint8_t __thiscall List<SkillRecord *>::push(class List<SkillRecord *>* this, uint32_t arg2, class SkillRecord** arg3)

005c4c50  {
005c4c5b      if (arg2 > this->_num_elements)
005c4c5b      {
005c4c5e          int32_t eax;
005c4c5e          eax = 0;
005c4c61          return 0;
005c4c5b      }
005c4c5b      
005c4c6c      void* edi = operator new(0xc);
005c4c6c      
005c4c73      if (edi != 0)
005c4c73      {
005c4c7b          *(uint32_t*)edi = *(uint32_t*)arg3;
005c4c7d          *(uint32_t*)((char*)edi + 4) = 0;
005c4c84          *(uint32_t*)((char*)edi + 8) = 0;
005c4c84          
005c4c90          if (this->_head != 0)
005c4c90          {
005c4cb6              class ListNode<SkillRecord *>* eax_4 = List<SkillRecord *>::get_node(this, arg2);
005c4cb6              
005c4cbd              if (eax_4 == 0)
005c4cbd              {
005c4cbf                  class ListNode<SkillRecord *>* _tail = this->_tail;
005c4cc2                  _tail->next = edi;
005c4cc5                  *(uint32_t*)((char*)edi + 8) = _tail;
005c4cc8                  uint32_t _num_elements_1 = this->_num_elements;
005c4ccb                  this->_tail = edi;
005c4cd0                  this->_num_elements = (_num_elements_1 + 1);
005c4cd4                  uint32_t eax_5;
005c4cd4                  eax_5 = 1;
005c4cd7                  return 1;
005c4cbd              }
005c4cbd              
005c4cda              class ListNode<SkillRecord *>* prev = eax_4->prev;
005c4cda              
005c4cdf              if (prev == 0)
005c4ce6                  this->_head = edi;
005c4cdf              else
005c4ce1                  prev->next = edi;
005c4ce1              
005c4ce9              class ListNode<SkillRecord *>* prev_1 = eax_4->prev;
005c4cec              *(uint32_t*)((char*)edi + 4) = eax_4;
005c4cef              *(uint32_t*)((char*)edi + 8) = prev_1;
005c4cf2              eax_4->prev = edi;
005c4cfa              this->_num_elements += 1;
005c4cfe              uint32_t eax_7;
005c4cfe              eax_7 = 1;
005c4d01              return 1;
005c4c90          }
005c4c90          
005c4c94          if (arg2 == 0)
005c4c94          {
005c4c96              uint32_t _num_elements = this->_num_elements;
005c4c99              this->_head = edi;
005c4c9c              this->_tail = edi;
005c4ca1              this->_num_elements = (_num_elements + 1);
005c4ca5              uint32_t eax_3;
005c4ca5              eax_3 = 1;
005c4ca8              return 1;
005c4c94          }
005c4c73      }
005c4c73      
005c4cad      void* eax_1;
005c4cad      eax_1 = 0;
005c4cb0      return 0;
005c4c50  }

005c4d04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c4d10  void __thiscall Template_CG::Template_CG(class Template_CG* this, class Template_CG const* arg2)

005c4d10  {
005c4d19      this->vtable = 0x79fe78;
005c4d1f      class PSRefBufferCharData<char>* m_charbuffer = arg2->name.m_charbuffer;
005c4d22      this->name.m_charbuffer = m_charbuffer;
005c4d29      InterlockedIncrement(&m_charbuffer[-1]);
005c4d32      this->iconImage.id = arg2->iconImage.id;
005c4d38      this->titleID = arg2->titleID;
005c4d3e      this->strength = arg2->strength;
005c4d44      this->endurance = arg2->endurance;
005c4d4a      this->coordination = arg2->coordination;
005c4d50      this->quickness = arg2->quickness;
005c4d56      this->focus = arg2->focus;
005c4d5c      this->self = arg2->self;
005c4d5f      this->mNormalSkillsList.m_data = 0;
005c4d5f      this->mNormalSkillsList.m_sizeAndDeallocate = 0;
005c4d5f      this->mNormalSkillsList.m_num = 0;
005c4d70      SmartArray<unsigned long,1>::operator=(&this->mNormalSkillsList, &arg2->mNormalSkillsList.m_data);
005c4d75      this->mPrimarySkillsList.m_data = 0;
005c4d75      this->mPrimarySkillsList.m_sizeAndDeallocate = 0;
005c4d75      this->mPrimarySkillsList.m_num = 0;
005c4d84      SmartArray<unsigned long,1>::operator=(&this->mPrimarySkillsList, &arg2->mPrimarySkillsList.m_data);
005c4d10  }

005c4d91                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005c4da0  void* __thiscall List<SkillRecord *>::`scalar deleting destructor'(class List<SkillRecord *>* this, uint32_t arg2)

005c4da0  {
005c4da3      this->vtable = 0x7e77f8;
005c4da9      List<StringTableMetaLanguage::Node const *>::flush(this);
005c4da9      
005c4db3      if ((arg2 & 1) != 0)
005c4db6          operator delete(this);
005c4db6      
005c4dc1      return this;
005c4da0  }

005c4dc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c4dd0  void __fastcall CharGenState::~CharGenState(class CharGenState* this)

005c4dd0  {
005c4dd4      enum SKILL_ADVANCEMENT_CLASS* skillLevels = this->skillLevels;
005c4ddf      this->vtable = &CharGenState::`vftable';
005c4ddf      
005c4de5      if (skillLevels != 0)
005c4de8          operator delete[](skillLevels);
005c4de8      
005c4df0      this->skillTable->vtable->Release();
005c4df0      
005c4e02      while (true)
005c4e02      {
005c4e02          class ListNode<SkillRecord *>* _head = this->skillRecordList._head;
005c4e02          
005c4e07          if (_head == 0)
005c4e07              break;
005c4e07          
005c4e09          class ListNode<SkillRecord *>* next = _head->next;
005c4dfb          this->skillRecordList._head = next;
005c4dfb          
005c4e11          if (next == 0)
005c4dfb              this->skillRecordList._tail = nullptr;
005c4e11          else
005c4e13              next->prev = nullptr;
005c4e13          
005c4e1b          class SkillRecord* data = _head->data;
005c4e1e          operator delete(_head);
005c4dfb          this->skillRecordList._num_elements -= 1;
005c4e2b          operator delete(data);
005c4e02      }
005c4e02      
005c4e35      uint32_t* headgearPaletteTemplateIDs = this->headgearPaletteTemplateIDs;
005c4e35      
005c4e3e      if (headgearPaletteTemplateIDs != 0)
005c4e41          operator delete[](headgearPaletteTemplateIDs);
005c4e41      
005c4e49      uint32_t* shirtPaletteTemplateIDs = this->shirtPaletteTemplateIDs;
005c4e49      
005c4e51      if (shirtPaletteTemplateIDs != 0)
005c4e54          operator delete[](shirtPaletteTemplateIDs);
005c4e54      
005c4e5c      uint32_t* trousersPaletteTemplateIDs = this->trousersPaletteTemplateIDs;
005c4e5c      
005c4e64      if (trousersPaletteTemplateIDs != 0)
005c4e67          operator delete[](trousersPaletteTemplateIDs);
005c4e67      
005c4e6f      uint32_t* footwearPaletteTemplateIDs = this->footwearPaletteTemplateIDs;
005c4e6f      
005c4e77      if (footwearPaletteTemplateIDs != 0)
005c4e7a          operator delete[](footwearPaletteTemplateIDs);
005c4e7a      
005c4e82      class IDClass<_tagDataID,32,0>* headgearPalSetIDs = this->headgearPalSetIDs;
005c4e82      
005c4e8a      if (headgearPalSetIDs != 0)
005c4e90          operator delete[](&headgearPalSetIDs[-1]);
005c4e90      
005c4e98      class IDClass<_tagDataID,32,0>* shirtPalSetIDs = this->shirtPalSetIDs;
005c4e98      
005c4ea0      if (shirtPalSetIDs != 0)
005c4ea6          operator delete[](&shirtPalSetIDs[-1]);
005c4ea6      
005c4eae      class IDClass<_tagDataID,32,0>* trousersPalSetIDs = this->trousersPalSetIDs;
005c4eae      
005c4eb6      if (trousersPalSetIDs != 0)
005c4ebc          operator delete[](&trousersPalSetIDs[-1]);
005c4ebc      
005c4ec4      class IDClass<_tagDataID,32,0>* footwearPalSetIDs = this->footwearPalSetIDs;
005c4ec4      
005c4ecc      if (footwearPalSetIDs != 0)
005c4ed2          operator delete[](&footwearPalSetIDs[-1]);
005c4ed2      
005c4eda      class ACCharGenData* charGenData = this->charGenData;
005c4eda      
005c4ee2      if (charGenData != 0)
005c4ee2      {
005c4ee4          charGenData->vtable->Release();
005c4ee9          this->charGenData = nullptr;
005c4ee2      }
005c4ee2      
005c4dfb      this->skillRecordList.vtable = 0x7e77f8;
005c4ef7      List<StringTableMetaLanguage::Node const *>::flush(&this->skillRecordList);
005c4f02      /* tailcall */
005c4f02      return ACCharGenResult::~ACCharGenResult(&this->charGenResult);
005c4dd0  }

005c4f07                       90 90 90 90 90 90 90 90 90                                                         .........

005c4f10  void __thiscall CharGenState::RandomizeAppearance(class CharGenState* this, int32_t arg2)

005c4f10  {
005c4f16      int32_t esi;
005c4f16      int32_t var_1a0 = esi;
005c4f16      int32_t* esp = &var_1a0;
005c4f19      uint32_t mHeritageGroup = this->mHeritageGroup;
005c4f19      
005c4f21      if (mHeritageGroup != 0)
005c4f21      {
005c4f27          uint32_t mGender = this->mGender;
005c4f27          
005c4f2f          if (mGender != 0)
005c4f2f          {
005c4f35              class ACCharGenData* charGenData = this->charGenData;
005c4f3b              uint32_t mGender_1 = mGender;
005c4f51              void __return;
005c4f51              void __return_1;
005c4f51              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(charGenData, &__return_1, mHeritageGroup), &__return, mGender_1);
005c4f51              esp = &var_1a0;
005c4f5d              HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c4f6b              int32_t var_118;
005c4f6b              
005c4f6b              if (var_118 != 0)
005c4f6b              {
005c4f73                  struct CharGenState::VTable* vtable_2 = this->vtable;
005c4f75                  mGender_1 = this->eyesStrip;
005c4f79                  esp = &var_1a0;
005c4f7c                  this->eyesStrip = *(int32_t*)((char*)vtable_2 + 4)(var_118, mGender_1);
005c4f6b              }
005c4f6b              
005c4f8b              int32_t var_10c;
005c4f8b              
005c4f8b              if (var_10c != 0)
005c4f8b              {
005c4f93                  struct CharGenState::VTable* vtable_3 = this->vtable;
005c4f95                  mGender_1 = this->noseStrip;
005c4f99                  esp = &var_1a0;
005c4f9c                  this->noseStrip = *(int32_t*)((char*)vtable_3 + 4)(var_10c, mGender_1);
005c4f8b              }
005c4f8b              
005c4fab              int32_t var_100;
005c4fab              
005c4fab              if (var_100 != 0)
005c4fab              {
005c4fb3                  struct CharGenState::VTable* vtable_4 = this->vtable;
005c4fb5                  mGender_1 = this->mouthStrip;
005c4fb9                  esp = &var_1a0;
005c4fbc                  this->mouthStrip = *(int32_t*)((char*)vtable_4 + 4)(var_100, mGender_1);
005c4fab              }
005c4fab              
005c4fc2              this->vtable->GetRandomReal();
005c4fc9              struct CharGenState::VTable* vtable = this->vtable;
005c4fcb              long double x87_r0;
005c4fcb              this->skinShade = ((double)x87_r0);
005c4fd3              vtable->UpdateTrueFacePal();
005c4fd5              this->vtable->GetRandomReal();
005c4fdc              struct CharGenState::VTable* vtable_1 = this->vtable;
005c4fde              long double x87_r1;
005c4fde              this->hairShade = ((double)x87_r1);
005c4fe6              vtable_1->UpdateTrueFacePal();
005c4fee              int32_t var_13c;
005c4fee              
005c4fee              if (var_13c != 0)
005c4fee              {
005c4ff6                  struct CharGenState::VTable* vtable_5 = this->vtable;
005c4ff8                  mGender_1 = this->hairColor;
005c4ffc                  int32_t eax_9 = *(int32_t*)((char*)vtable_5 + 4)(var_13c, mGender_1);
005c4ffc                  esp = &var_1a0;
005c4fff                  struct CharGenState::VTable* vtable_6 = this->vtable;
005c5003                  this->hairColor = eax_9;
005c5009                  vtable_6->UpdateTrueFacePal();
005c4fee              }
005c4fee              
005c5011              int32_t var_124;
005c5011              
005c5011              if (var_124 != 0)
005c5011              {
005c5019                  struct CharGenState::VTable* vtable_7 = this->vtable;
005c501b                  mGender_1 = this->eyeColor;
005c501f                  int32_t eax_11 = *(int32_t*)((char*)vtable_7 + 4)(var_124, mGender_1);
005c501f                  esp = &var_1a0;
005c5022                  struct CharGenState::VTable* vtable_8 = this->vtable;
005c5026                  this->eyeColor = eax_11;
005c502c                  vtable_8->UpdateTrueFacePal();
005c5011              }
005c5011              
005c5034              int32_t var_130;
005c5034              
005c5034              if (var_130 != 0)
005c5034              {
005c5045                  mGender_1 = this->hairStyle;
005c5048                  int32_t eax_14;
005c5048                  
005c5048                  if (arg2 == 0)
005c5048                  {
005c5056                      eax_14 = *(int32_t*)((char*)this->vtable + 4)(var_130);
005c5056                      esp = &mGender_1;
005c5048                  }
005c5048                  else
005c5048                  {
005c504e                      eax_14 = *(int32_t*)((char*)this->vtable + 4)(7);
005c504e                      esp = &mGender_1;
005c5048                  }
005c5048                  
005c5059                  this->hairStyle = eax_14;
005c5034              }
005c5034              
005c5063              Sex_CG::~Sex_CG(&esp[1]);
005c4f2f          }
005c4f21      }
005c4f21      
005c5068      *(uint32_t*)esp;
005c4f10  }

005c5072                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005c5080  void __fastcall CharGenState::ApplyTemplate(class CharGenState* this)

005c5080  {
005c5097      __builtin_memset(&this->bAttribLocked[1], 0, 0x18);
005c5099      uint32_t mHeritageGroup = this->mHeritageGroup;
005c5099      
005c50a7      if ((mHeritageGroup == 0xc || mHeritageGroup == 0xd))
005c50a9          this->template_ = 0;
005c50a9      
005c50c3      if ((mHeritageGroup != 0 && this->mGender != 0))
005c50c3      {
005c50c9          int32_t template_ = this->template_;
005c50c9          
005c50d2          if (template_ != 0xffffffff)
005c50d2          {
005c50fb              void var_100;
005c50fb              void __return;
005c50fb              Template_CG::Template_CG(&var_100, &ACCharGenData::GetHG(this->charGenData, &__return, mHeritageGroup)->mTemplateList.m_data[template_]);
005c5104              HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c5112              int32_t var_f0;
005c5112              CharGenState::SetStrength(this, var_f0, 0);
005c511e              int32_t var_ec;
005c511e              CharGenState::SetEndurance(this, var_ec, 0);
005c512a              int32_t var_e8;
005c512a              CharGenState::SetCoordination(this, var_e8, 0);
005c5138              int32_t var_e4;
005c5138              CharGenState::SetQuickness(this, var_e4, 0);
005c5144              int32_t var_e0;
005c5144              CharGenState::SetFocus(this, var_e0, 0);
005c5150              int32_t var_dc;
005c5150              CharGenState::SetSelf(this, var_dc, 0);
005c5155              CharGenState::ResetSkillLevels(this);
005c515e              int32_t edi_3 = 0;
005c5162              void* var_d8;
005c5162              int32_t var_d0;
005c5162              
005c5162              if (var_d0 > 0)
005c5162              {
005c5178                  do
005c5178                  {
005c5170                      CharGenState::SetSkillLevel(this, *(uint32_t*)((char*)var_d8 + (edi_3 << 2)), TRAINED_SKILL_ADVANCEMENT_CLASS);
005c5175                      edi_3 += 1;
005c5178                  } while (edi_3 < var_d0);
005c5162              }
005c5162              
005c517e              int32_t ebp_1 = 0;
005c5182              void* var_cc;
005c5182              int32_t var_c4;
005c5182              
005c5182              if (var_c4 > 0)
005c5182              {
005c522c                  do
005c522c                  {
005c5194                      int32_t edi_4 = *(uint32_t*)((char*)var_cc + (ebp_1 << 2));
005c5194                      
005c519d                      if (edi_4 < this->totalNumSkills)
005c519d                      {
005c51a9                          int32_t eax_6 = this->skillLevels[edi_4];
005c51af                          int32_t remainingSkillCredits = this->remainingSkillCredits;
005c51af                          
005c51b5                          if (eax_6 == 2)
005c51f2                              remainingSkillCredits += ACCharGenData::GetSkillTrainedCost(this->charGenData, edi_4, this->mHeritageGroup, this->mGender);
005c51b5                          else if (eax_6 == 3)
005c51f2                              remainingSkillCredits += ACCharGenData::GetSkillSpecializedCost(this->charGenData, edi_4, this->mHeritageGroup, this->mGender);
005c51f2                          
005c5209                          int32_t eax_11 = ACCharGenData::GetSkillSpecializedCost(this->charGenData, edi_4, this->mHeritageGroup, this->mGender);
005c5209                          
005c5210                          if ((remainingSkillCredits - eax_11) >= 0)
005c5210                          {
005c5212                              enum SKILL_ADVANCEMENT_CLASS* skillLevels = this->skillLevels;
005c5218                              this->remainingSkillCredits = (remainingSkillCredits - eax_11);
005c521e                              skillLevels[edi_4] = 3;
005c5210                          }
005c519d                      }
005c519d                      
005c5229                      ebp_1 += 1;
005c522c                  } while (ebp_1 < var_c4);
005c5182              }
005c5182              
005c5244              int32_t var_c8;
005c5244              
005c5244              if ((var_c8 & 0x80000000) == 0x80000000)
005c524b                  operator delete[](var_cc);
005c524b              
005c5263              int32_t var_d4;
005c5263              
005c5263              if ((var_d4 & 0x80000000) == 0x80000000)
005c526a                  operator delete[](var_d8);
005c526a              
005c5289              void* var_fc;
005c5289              
005c5289              if ((InterlockedDecrement(((char*)var_fc - 0x10)) == 0 && var_fc != 0x14))
005c5291                  **(uint32_t**)((char*)var_fc - 0x14)(1);
005c50d2          }
005c50c3      }
005c5080  }

005c518a                                8d 9b 00 00 00 00                                                            ......
005c529c                                                                                      90 90 90 90                              ....

005c52a0  int32_t __fastcall CharGenState::GetBaldState(class CharGenState* this)

005c52a0  {
005c52a9      uint32_t mHeritageGroup = this->mHeritageGroup;
005c52a9      
005c52b1      if (mHeritageGroup != 0)
005c52b1      {
005c52b7          uint32_t mGender = this->mGender;
005c52b7          
005c52bf          if (mGender != 0)
005c52bf          {
005c52e1              void __return;
005c52e1              void __return_1;
005c52e1              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c52ed              HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c52f2              int32_t hairStyle = this->hairStyle;
005c52f2              
005c52fb              if (hairStyle != 0xffffffff)
005c52fb              {
005c530e                  int32_t var_1d8;
005c530e                  int32_t var_138;
005c530e                  HairStyle_CG::HairStyle_CG(&var_1d8, ((hairStyle * 0x3c) + var_138));
005c531c                  var_1d8 = 0x79fa80;
005c5324                  void var_1c8;
005c5324                  ObjDesc::~ObjDesc(&var_1c8);
005c532d                  Sex_CG::~Sex_CG(&__return);
005c533b                  char var_1d0;
005c533b                  return ((uint32_t)var_1d0);
005c52fb              }
005c52fb              
005c5340              Sex_CG::~Sex_CG(&__return);
005c52bf          }
005c52b1      }
005c52b1      
005c534e      return 0;
005c52a0  }

005c534f                                               90                                                                 .

005c5350  int32_t __thiscall CharGenState::SetHeadgearStyle(class CharGenState* this, int32_t arg2)

005c5350  {
005c5359      uint32_t mHeritageGroup = this->mHeritageGroup;
005c5362      this->numHeadgearColors = 0;
005c5362      
005c536e      if (mHeritageGroup != 0)
005c536e      {
005c5374          uint32_t mGender = this->mGender;
005c5374          
005c537c          if (mGender != 0)
005c537c          {
005c539f              void __return;
005c539f              void __return_1;
005c539f              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c53ab              class Style_CG* edx_1 = HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c53ab              
005c53ba              if (arg2 != 0xffffffff)
005c53ba              {
005c53ce                  int32_t var_fc;
005c53ce                  int32_t var_1bc_1 = ((arg2 << 4) + var_fc);
005c53d3                  int32_t var_1ac;
005c53d3                  Style_CG::Style_CG(&var_1ac, edx_1);
005c53f3                  class IDClass<_tagDataID,32,0> var_1a4;
005c53f3                  CharGenState::StoreColorInformation(this, var_1a4, &this->numHeadgearColors, &this->headgearPaletteTemplateIDs, &this->headgearPalSetIDs, &__return);
005c53f3                  
005c5400                  if (this->headgearColor < 0)
005c5402                      this->headgearColor = 0;
005c5402                  
005c540c                  int32_t numHeadgearColors = this->numHeadgearColors;
005c540c                  
005c5414                  if (this->headgearColor >= numHeadgearColors)
005c5417                      this->headgearColor = (numHeadgearColors - 1);
005c5417                  
005c5428                  var_1ac = 0x79fe70;
005c543c                  void* var_1a8;
005c543c                  
005c543c                  if ((InterlockedDecrement(((char*)var_1a8 - 0x10)) == 0 && var_1a8 != 0x14))
005c5444                      **(uint32_t**)((char*)var_1a8 - 0x14)(1);
005c53ba              }
005c53ba              
005c544a              Sex_CG::~Sex_CG(&__return);
005c544f              this->headgearStyle = arg2;
005c5460              return arg2;
005c537c          }
005c536e      }
005c536e      
005c546b      this->headgearStyle = arg2;
005c5478      return arg2;
005c5350  }

005c547b                                                                                   90 90 90 90 90                             .....

005c5480  int32_t __thiscall CharGenState::SetShirtStyle(class CharGenState* this, int32_t arg2)

005c5480  {
005c5489      uint32_t mHeritageGroup = this->mHeritageGroup;
005c5492      this->numShirtColors = 0;
005c5492      
005c549e      if (mHeritageGroup != 0)
005c549e      {
005c54a4          uint32_t mGender = this->mGender;
005c54a4          
005c54ac          if (mGender != 0)
005c54ac          {
005c54cf              void __return;
005c54cf              void __return_1;
005c54cf              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c54db              class Style_CG* edx_1 = HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c54db              
005c54ea              if (arg2 != 0xffffffff)
005c54ea              {
005c54fa                  int32_t var_f0;
005c54fa                  int32_t var_1bc_1 = ((arg2 << 4) + var_f0);
005c54ff                  int32_t var_1ac;
005c54ff                  Style_CG::Style_CG(&var_1ac, edx_1);
005c551f                  class IDClass<_tagDataID,32,0> var_1a4;
005c551f                  CharGenState::StoreColorInformation(this, var_1a4, &this->numShirtColors, &this->shirtPaletteTemplateIDs, &this->shirtPalSetIDs, &__return);
005c5524                  int32_t numShirtColors = this->numShirtColors;
005c5524                  
005c552c                  if (this->shirtColor >= numShirtColors)
005c552f                      this->shirtColor = (numShirtColors - 1);
005c552f                  
005c5540                  var_1ac = 0x79fe70;
005c5554                  void* var_1a8;
005c5554                  
005c5554                  if ((InterlockedDecrement(((char*)var_1a8 - 0x10)) == 0 && var_1a8 != 0x14))
005c555c                      **(uint32_t**)((char*)var_1a8 - 0x14)(1);
005c54ea              }
005c54ea              
005c5562              Sex_CG::~Sex_CG(&__return);
005c5567              this->shirtStyle = arg2;
005c5578              return arg2;
005c54ac          }
005c549e      }
005c549e      
005c5583      this->shirtStyle = arg2;
005c5590      return arg2;
005c5480  }

005c5593                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005c55a0  int32_t __thiscall CharGenState::SetTrousersStyle(class CharGenState* this, int32_t arg2)

005c55a0  {
005c55a9      uint32_t mHeritageGroup = this->mHeritageGroup;
005c55b2      this->numTrousersColors = 0;
005c55b2      
005c55be      if (mHeritageGroup != 0)
005c55be      {
005c55c4          uint32_t mGender = this->mGender;
005c55c4          
005c55cc          if (mGender != 0)
005c55cc          {
005c55ef              void __return;
005c55ef              void __return_1;
005c55ef              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c55fb              class Style_CG* edx_1 = HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c55fb              
005c560a              if (arg2 != 0xffffffff)
005c560a              {
005c561a                  int32_t var_e4;
005c561a                  int32_t var_1bc_1 = ((arg2 << 4) + var_e4);
005c561f                  int32_t var_1ac;
005c561f                  Style_CG::Style_CG(&var_1ac, edx_1);
005c563f                  class IDClass<_tagDataID,32,0> var_1a4;
005c563f                  CharGenState::StoreColorInformation(this, var_1a4, &this->numTrousersColors, &this->trousersPaletteTemplateIDs, &this->trousersPalSetIDs, &__return);
005c5644                  int32_t numTrousersColors = this->numTrousersColors;
005c5644                  
005c564c                  if (this->trousersColor >= numTrousersColors)
005c564f                      this->trousersColor = (numTrousersColors - 1);
005c564f                  
005c5660                  var_1ac = 0x79fe70;
005c5674                  void* var_1a8;
005c5674                  
005c5674                  if ((InterlockedDecrement(((char*)var_1a8 - 0x10)) == 0 && var_1a8 != 0x14))
005c567c                      **(uint32_t**)((char*)var_1a8 - 0x14)(1);
005c560a              }
005c560a              
005c5682              Sex_CG::~Sex_CG(&__return);
005c5687              this->trousersStyle = arg2;
005c5698              return arg2;
005c55cc          }
005c55be      }
005c55be      
005c56a3      this->trousersStyle = arg2;
005c56b0      return arg2;
005c55a0  }

005c56b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005c56c0  int32_t __thiscall CharGenState::SetFootwearStyle(class CharGenState* this, int32_t arg2)

005c56c0  {
005c56c9      uint32_t mHeritageGroup = this->mHeritageGroup;
005c56d2      this->numFootwearColors = 0;
005c56d2      
005c56de      if (mHeritageGroup != 0)
005c56de      {
005c56e4          uint32_t mGender = this->mGender;
005c56e4          
005c56ec          if (mGender != 0)
005c56ec          {
005c570f              void __return;
005c570f              void __return_1;
005c570f              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c571b              class Style_CG* edx_1 = HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c571b              
005c572a              if (arg2 != 0xffffffff)
005c572a              {
005c573a                  int32_t var_d8;
005c573a                  int32_t var_1bc_1 = ((arg2 << 4) + var_d8);
005c573f                  int32_t var_1ac;
005c573f                  Style_CG::Style_CG(&var_1ac, edx_1);
005c575f                  class IDClass<_tagDataID,32,0> var_1a4;
005c575f                  CharGenState::StoreColorInformation(this, var_1a4, &this->numFootwearColors, &this->footwearPaletteTemplateIDs, &this->footwearPalSetIDs, &__return);
005c5764                  int32_t numFootwearColors = this->numFootwearColors;
005c5764                  
005c576c                  if (this->footwearColor >= numFootwearColors)
005c576f                      this->footwearColor = (numFootwearColors - 1);
005c576f                  
005c5780                  var_1ac = 0x79fe70;
005c5794                  void* var_1a8;
005c5794                  
005c5794                  if ((InterlockedDecrement(((char*)var_1a8 - 0x10)) == 0 && var_1a8 != 0x14))
005c579c                      **(uint32_t**)((char*)var_1a8 - 0x14)(1);
005c572a              }
005c572a              
005c57a2              Sex_CG::~Sex_CG(&__return);
005c57a7              this->footwearStyle = arg2;
005c57b8              return arg2;
005c56ec          }
005c56de      }
005c56de      
005c57c3      this->footwearStyle = arg2;
005c57d0      return arg2;
005c56c0  }

005c57d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005c57e0  void __fastcall CharGenState::RandomizeSkills(class CharGenState* this)

005c57e0  {
005c57e9      uint32_t mHeritageGroup = this->mHeritageGroup;
005c57e9      
005c57f1      if (mHeritageGroup != 0)
005c57f1      {
005c57f7          uint32_t mGender = this->mGender;
005c57f7          
005c57ff          if (mGender != 0)
005c57ff          {
005c5823              void __return;
005c5823              void __return_1;
005c5823              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return, mHeritageGroup), &__return_1, mGender);
005c582c              HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c5833              CharGenState::ResetSkillLevels(this);
005c5833              
005c5896              for (int32_t i = 0; i < 0x64; i += 1)
005c5896              {
005c5847                  int32_t eax_3 = RandInt(this->totalNumSkills);
005c584c                  int32_t totalNumSkills = this->totalNumSkills;
005c584c                  
005c5857                  if (eax_3 < totalNumSkills)
005c5857                  {
005c5863                      if (this->skillLevels[eax_3] != 1)
005c5863                      {
005c587c                          if ((eax_3 < totalNumSkills && this->skillLevels[eax_3] == 2))
005c5883                              CharGenState::SetSkillLevel(this, eax_3, SPECIALIZED_SKILL_ADVANCEMENT_CLASS);
005c5863                      }
005c5863                      else if ((i & 1) != 0)
005c5883                          CharGenState::SetSkillLevel(this, eax_3, TRAINED_SKILL_ADVANCEMENT_CLASS);
005c5857                  }
005c5857                  
005c5890                  if (this->remainingSkillCredits == 0)
005c5890                      break;
005c5896              }
005c5896              
005c5898              int32_t remainingSkillCredits = this->remainingSkillCredits;
005c5898              
005c58a0              if (remainingSkillCredits > 0)
005c58a0              {
005c58ac                  int32_t i_1 = 0;
005c58ac                  
005c58b0                  if (this->totalNumSkills > 0)
005c58b0                  {
005c59c3                      do
005c59c3                      {
005c58c0                          int32_t totalNumSkills_1 = this->totalNumSkills;
005c58c0                          
005c58c8                          if (i_1 < totalNumSkills_1)
005c58c8                          {
005c58d4                              int32_t eax_6 = this->skillLevels[i_1];
005c58d4                              
005c58da                              if (eax_6 == 1)
005c58da                              {
005c58df                                  if (eax_6 == 2)
005c591c                                      remainingSkillCredits += ACCharGenData::GetSkillTrainedCost(this->charGenData, i_1, this->mHeritageGroup, this->mGender);
005c58df                                  else if (eax_6 == 3)
005c591c                                      remainingSkillCredits += ACCharGenData::GetSkillSpecializedCost(this->charGenData, i_1, this->mHeritageGroup, this->mGender);
005c591c                                  
005c5933                                  int32_t eax_11 = ACCharGenData::GetSkillTrainedCost(this->charGenData, i_1, this->mHeritageGroup, this->mGender);
005c5933                                  
005c593a                                  if ((remainingSkillCredits - eax_11) >= 0)
005c593a                                  {
005c593c                                      enum SKILL_ADVANCEMENT_CLASS* skillLevels = this->skillLevels;
005c5942                                      this->remainingSkillCredits = (remainingSkillCredits - eax_11);
005c5948                                      skillLevels[i_1] = 2;
005c593a                                  }
005c58da                              }
005c58da                              else if ((i_1 < totalNumSkills_1 && this->skillLevels[i_1] == 2))
005c5961                              {
005c5989                                  int32_t ebx_2 = (remainingSkillCredits + ACCharGenData::GetSkillTrainedCost(this->charGenData, i_1, this->mHeritageGroup, this->mGender));
005c5994                                  int32_t eax_16 = ACCharGenData::GetSkillSpecializedCost(this->charGenData, i_1, this->mHeritageGroup, this->mGender);
005c5994                                  
005c599b                                  if ((ebx_2 - eax_16) >= 0)
005c599b                                  {
005c599d                                      enum SKILL_ADVANCEMENT_CLASS* skillLevels_1 = this->skillLevels;
005c59a3                                      this->remainingSkillCredits = (ebx_2 - eax_16);
005c59a9                                      skillLevels_1[i_1] = 3;
005c599b                                  }
005c5961                              }
005c58c8                          }
005c58c8                          
005c59b0                          remainingSkillCredits = this->remainingSkillCredits;
005c59b0                          
005c59b8                          if (remainingSkillCredits == 0)
005c59b8                              break;
005c59b8                          
005c59c0                          i_1 += 1;
005c59c3                      } while (i_1 < this->totalNumSkills);
005c58b0                  }
005c58a0              }
005c58a0              
005c59d0              Sex_CG::~Sex_CG(&__return_1);
005c57ff          }
005c57f1      }
005c57e0  }

005c58b8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
005c59df                                                                                               90                                 .

005c59e0  void __fastcall CharGenState::RandomizeStartArea(class CharGenState* this)

005c59e0  {
005c59e9      uint32_t mHeritageGroup = this->mHeritageGroup;
005c59e9      
005c59f1      if (mHeritageGroup != 0)
005c59f1      {
005c59ff          void __return;
005c59ff          ACCharGenData::GetHG(this->charGenData, &__return, mHeritageGroup);
005c5a0a          int32_t var_9c;
005c5a0a          
005c5a0a          if (var_9c > 0)
005c5a0a          {
005c5a18              int32_t var_a4;
005c5a18              int32_t eax_2 = *(uint32_t*)(var_a4 + (RandInt(var_9c, 0xffffffff) << 2));
005c5a18              
005c5a2b              if ((eax_2 >= 0 && eax_2 < this->charGenData->mStartAreaList.m_num))
005c5a2b              {
005c5a31                  this->startArea = eax_2;
005c5a37                  HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c5a43                  return;
005c5a2b              }
005c5a2b              
005c5a44              this->startArea = 0xffffffff;
005c5a0a          }
005c5a0a          
005c5a52          HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c59f1      }
005c59e0  }

005c5a5f                                                                                               90                                 .

005c5a60  int32_t __thiscall CharGenState::SetTemplate(class CharGenState* this, int32_t arg2, int32_t arg3)

005c5a60  {
005c5a6d      this->template_ = arg2;
005c5a6d      
005c5a78      if ((arg3 != 0 && arg2 != 0xffffffff))
005c5a7c          CharGenState::ApplyTemplate(this);
005c5a7c      
005c5a88      return this->template_;
005c5a60  }

005c5a8b                                   90 90 90 90 90                                                             .....

005c5a90  class IDClass<_tagDataID,32,0>* __thiscall CharGenState::GetSetupID(class CharGenState* this, class IDClass<_tagDataID,32,0>* __return)

005c5a90  {
005c5a99      uint32_t mHeritageGroup = this->mHeritageGroup;
005c5a99      
005c5aa1      if (mHeritageGroup != 0)
005c5aa1      {
005c5aa7          uint32_t mGender = this->mGender;
005c5aa7          
005c5aaf          if (mGender != 0)
005c5aaf          {
005c5ad1              void __return_1;
005c5ad1              void __return_2;
005c5ad1              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_2, mHeritageGroup), &__return_1, mGender);
005c5add              HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
005c5ae2              int32_t hairStyle = this->hairStyle;
005c5aeb              class IDClass<_tagDataID,32,0> var_190;
005c5aeb              
005c5aeb              if (hairStyle == 0xffffffff)
005c5aeb              {
005c5b4f                  __return->id = var_190;
005c5b55                  Sex_CG::~Sex_CG(&__return_1);
005c5b63                  return __return;
005c5aeb              }
005c5aeb              
005c5afe              int32_t var_1d8;
005c5afe              int32_t var_138;
005c5afe              HairStyle_CG::HairStyle_CG(&var_1d8, ((hairStyle * 0x3c) + var_138));
005c5b09              class IDClass<_tagDataID,32,0> var_1cc;
005c5b09              class IDClass<_tagDataID,32,0> eax_3 = var_1cc;
005c5b16              var_1d8 = 0x79fa80;
005c5b16              
005c5b22              if (eax_3 == INVALID_DID.id)
005c5b24                  eax_3 = var_190;
005c5b24              
005c5b28              __return->id = eax_3;
005c5b2a              void var_1c8;
005c5b2a              ObjDesc::~ObjDesc(&var_1c8);
005c5b33              Sex_CG::~Sex_CG(&__return_1);
005c5b41              return __return;
005c5aaf          }
005c5aa1      }
005c5aa1      
005c5b6c      uint32_t* __return_3 = __return;
005c5b73      *(uint32_t*)__return_3 = this->setupID.id;
005c5b7c      return __return_3;
005c5a90  }

005c5b7f                                                                                               90                                 .

005c5b80  void __fastcall CharGenState::ConstrainAllByGender(class CharGenState* this)

005c5b80  {
005c5b80      int32_t ebp;
005c5b80      int32_t var_4 = ebp;
005c5b91      uint32_t mHeritageGroup = this->mHeritageGroup;
005c5b91      
005c5ba8      if ((mHeritageGroup == 0 || this->mGender == 0))
005c5ba8      {
005c5d35          struct CharGenState::VTable* vtable = this->vtable;
005c5d41          this->eyesStrip = 0xffffffff;
005c5d47          this->noseStrip = 0xffffffff;
005c5d4d          this->mouthStrip = 0xffffffff;
005c5d53          this->skinShade = 0f;
005c5d59          *(uint32_t*)((char*)this->skinShade)[4] = 0xbff00000;
005c5d5f          vtable->UpdateTrueFacePal();
005c5d65          this->hairShade = 0f;
005c5d6b          *(uint32_t*)((char*)this->hairShade)[4] = 0xbff00000;
005c5d61          this->vtable->UpdateTrueFacePal();
005c5d73          struct CharGenState::VTable* vtable_1 = this->vtable;
005c5d77          this->hairColor = 0xffffffff;
005c5d7d          vtable_1->UpdateTrueFacePal();
005c5d7f          struct CharGenState::VTable* vtable_3 = this->vtable;
005c5d83          this->eyeColor = 0xffffffff;
005c5d89          vtable_3->UpdateTrueFacePal();
005c5d8b          int32_t var_1c = 0xffffffff;
005c5d8e          this->hairStyle = 0xffffffff;
005c5d94          CharGenState::SetHeadgearStyle(this, var_1c);
005c5d99          int32_t var_1c_1 = 0xffffffff;
005c5d9c          this->headgearColor = 0xffffffff;
005c5da2          this->headgearShade = 0f;
005c5da8          *(uint32_t*)((char*)this->headgearShade)[4] = 0xbff00000;
005c5dae          CharGenState::SetShirtStyle(this, var_1c_1);
005c5db3          int32_t var_1c_2 = 0xffffffff;
005c5db6          this->shirtColor = 0xffffffff;
005c5dbc          this->shirtShade = 0f;
005c5dc2          *(uint32_t*)((char*)this->shirtShade)[4] = 0xbff00000;
005c5dc8          CharGenState::SetTrousersStyle(this, var_1c_2);
005c5dcd          int32_t var_1c_3 = 0xffffffff;
005c5dd0          this->trousersColor = 0xffffffff;
005c5dd6          this->trousersShade = 0f;
005c5ddc          *(uint32_t*)((char*)this->trousersShade)[4] = 0xbff00000;
005c5de2          CharGenState::SetFootwearStyle(this, var_1c_3);
005c5de7          this->footwearColor = 0xffffffff;
005c5dee          this->footwearShade = 0f;
005c5df4          *(uint32_t*)((char*)this->footwearShade)[4] = 0xbff00000;
005c5dff          int32_t* var_10;
005c5dff          *(uint32_t*)var_10;
005c5e00          return;
005c5ba8      }
005c5ba8      
005c5bbd      void __return_1;
005c5bbd      ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup);
005c5bd5      void __return;
005c5bd5      HeritageGroup_CG::GetSX(&__return_1, &__return, this->mGender);
005c5be7      int32_t var_124;
005c5be7      
005c5be7      if (this->eyesStrip >= var_124)
005c5bea          this->eyesStrip = (var_124 - 1);
005c5bea      
005c5bfd      int32_t var_118;
005c5bfd      
005c5bfd      if (this->noseStrip >= var_118)
005c5c00          this->noseStrip = (var_118 - 1);
005c5c00      
005c5c13      int32_t var_10c;
005c5c13      
005c5c13      if (this->mouthStrip >= var_10c)
005c5c16          this->mouthStrip = (var_10c - 1);
005c5c16      
005c5c26      int32_t var_13c;
005c5c26      
005c5c26      if (this->hairStyle >= var_13c)
005c5c29          this->hairStyle = (var_13c - 1);
005c5c29      
005c5c3c      int32_t var_130;
005c5c3c      
005c5c3c      if (this->eyeColor >= var_130)
005c5c3c      {
005c5c3f          this->eyeColor = (var_130 - 1);
005c5c45          this->vtable->UpdateTrueFacePal();
005c5c3c      }
005c5c3c      
005c5c55      int32_t var_148;
005c5c55      
005c5c55      if (this->hairColor >= var_148)
005c5c55      {
005c5c57          struct CharGenState::VTable* vtable_2 = this->vtable;
005c5c5c          this->hairColor = (var_148 - 1);
005c5c62          vtable_2->UpdateTrueFacePal();
005c5c55      }
005c5c55      
005c5c71      int32_t var_100;
005c5c71      
005c5c71      if (this->headgearStyle >= var_100)
005c5c77          CharGenState::SetHeadgearStyle(this, (var_100 - 1));
005c5c77      
005c5c7c      int32_t numHeadgearColors = this->numHeadgearColors;
005c5c7c      
005c5c88      if (this->headgearColor >= numHeadgearColors)
005c5c8b          this->headgearColor = (numHeadgearColors - 1);
005c5c8b      
005c5c9e      int32_t var_f4;
005c5c9e      
005c5c9e      if (this->shirtStyle >= var_f4)
005c5ca4          CharGenState::SetShirtStyle(this, (var_f4 - 1));
005c5ca4      
005c5ca9      int32_t numShirtColors = this->numShirtColors;
005c5ca9      
005c5cb5      if (this->shirtColor >= numShirtColors)
005c5cb8          this->shirtColor = (numShirtColors - 1);
005c5cb8      
005c5ccb      int32_t var_e8;
005c5ccb      
005c5ccb      if (this->trousersStyle >= var_e8)
005c5cd1          CharGenState::SetTrousersStyle(this, (var_e8 - 1));
005c5cd1      
005c5cd6      int32_t numTrousersColors = this->numTrousersColors;
005c5cd6      
005c5ce2      if (this->trousersColor >= numTrousersColors)
005c5ce5          this->trousersColor = (numTrousersColors - 1);
005c5ce5      
005c5cf8      int32_t var_dc;
005c5cf8      
005c5cf8      if (this->footwearStyle >= var_dc)
005c5cfe          CharGenState::SetFootwearStyle(this, (var_dc - 1));
005c5cfe      
005c5d03      int32_t numFootwearColors = this->numFootwearColors;
005c5d03      
005c5d0f      if (this->footwearColor >= numFootwearColors)
005c5d12          this->footwearColor = (numFootwearColors - 1);
005c5d12      
005c5d1c      Sex_CG::~Sex_CG(&__return);
005c5d28      HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c5b8d      var_4;
005c5b80  }

005c5e01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005c5e10  void __thiscall CharGenState::RandomizeHeadgear(class CharGenState* this, int32_t arg2)

005c5e10  {
005c5e19      uint32_t mHeritageGroup = this->mHeritageGroup;
005c5e19      
005c5e21      if (mHeritageGroup != 0)
005c5e21      {
005c5e27          uint32_t mGender = this->mGender;
005c5e27          
005c5e2f          if (mGender != 0)
005c5e2f          {
005c5e51              void __return;
005c5e51              void __return_1;
005c5e51              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c5e5d              HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c5e6b              int32_t var_f4;
005c5e6b              
005c5e6b              if (var_f4 != 0)
005c5e6b              {
005c5e76                  int32_t eax_4;
005c5e76                  
005c5e76                  if (arg2 == 0)
005c5e8e                      eax_4 = RandInt((var_f4 + 1));
005c5e76                  else
005c5e82                      eax_4 = RandInt((var_f4 + 1), (this->headgearStyle + 1));
005c5e82                  
005c5e9a                  CharGenState::SetHeadgearStyle(this, (eax_4 - 1));
005c5e6b              }
005c5e6b              
005c5e9f              int32_t numHeadgearColors = this->numHeadgearColors;
005c5e9f              
005c5ea7              if (numHeadgearColors != 0)
005c5eb9                  this->headgearColor = RandInt(numHeadgearColors, this->headgearColor);
005c5eb9              
005c5ed7              this->headgearShade = ((double)(((long double)rand()) * ((long double)3.0518509475997192e-05)));
005c5edd              Sex_CG::~Sex_CG(&__return);
005c5e2f          }
005c5e21      }
005c5e10  }

005c5eec                                      90 90 90 90                                                              ....

005c5ef0  void __fastcall CharGenState::RandomizeShirt(class CharGenState* this)

005c5ef0  {
005c5ef9      uint32_t mHeritageGroup = this->mHeritageGroup;
005c5ef9      
005c5f01      if (mHeritageGroup != 0)
005c5f01      {
005c5f07          uint32_t mGender = this->mGender;
005c5f07          
005c5f0f          if (mGender != 0)
005c5f0f          {
005c5f31              void __return;
005c5f31              void __return_1;
005c5f31              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c5f3d              HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c5f4b              int32_t var_e8;
005c5f4b              
005c5f4b              if (var_e8 != 0)
005c5f60                  CharGenState::SetShirtStyle(this, RandInt(var_e8, this->shirtStyle));
005c5f60              
005c5f65              int32_t numShirtColors = this->numShirtColors;
005c5f65              
005c5f6d              if (numShirtColors != 0)
005c5f7f                  this->shirtColor = RandInt(numShirtColors, this->shirtColor);
005c5f7f              
005c5f9d              this->shirtShade = ((double)(((long double)rand()) * ((long double)3.0518509475997192e-05)));
005c5fa3              Sex_CG::~Sex_CG(&__return);
005c5f0f          }
005c5f01      }
005c5ef0  }


005c5fb0  void __fastcall CharGenState::RandomizeTrousers(class CharGenState* this)

005c5fb0  {
005c5fb9      uint32_t mHeritageGroup = this->mHeritageGroup;
005c5fb9      
005c5fc1      if (mHeritageGroup != 0)
005c5fc1      {
005c5fc7          uint32_t mGender = this->mGender;
005c5fc7          
005c5fcf          if (mGender != 0)
005c5fcf          {
005c5ff1              void __return;
005c5ff1              void __return_1;
005c5ff1              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c5ffd              HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c600b              int32_t var_dc;
005c600b              
005c600b              if (var_dc != 0)
005c6020                  CharGenState::SetTrousersStyle(this, RandInt(var_dc, this->trousersStyle));
005c6020              
005c6025              int32_t numTrousersColors = this->numTrousersColors;
005c6025              
005c602d              if (numTrousersColors != 0)
005c603f                  this->trousersColor = RandInt(numTrousersColors, this->trousersColor);
005c603f              
005c605d              this->trousersShade = ((double)(((long double)rand()) * ((long double)3.0518509475997192e-05)));
005c6063              Sex_CG::~Sex_CG(&__return);
005c5fcf          }
005c5fc1      }
005c5fb0  }


005c6070  void __fastcall CharGenState::RandomizeFootwear(class CharGenState* this)

005c6070  {
005c6079      uint32_t mHeritageGroup = this->mHeritageGroup;
005c6079      
005c6081      if (mHeritageGroup != 0)
005c6081      {
005c6087          uint32_t mGender = this->mGender;
005c6087          
005c608f          if (mGender != 0)
005c608f          {
005c60b1              void __return;
005c60b1              void __return_1;
005c60b1              HeritageGroup_CG::GetSX(ACCharGenData::GetHG(this->charGenData, &__return_1, mHeritageGroup), &__return, mGender);
005c60bd              HeritageGroup_CG::~HeritageGroup_CG(&__return_1);
005c60cb              int32_t var_d0;
005c60cb              
005c60cb              if (var_d0 != 0)
005c60e0                  CharGenState::SetFootwearStyle(this, RandInt(var_d0, this->footwearStyle));
005c60e0              
005c60e5              int32_t numFootwearColors = this->numFootwearColors;
005c60e5              
005c60ed              if (numFootwearColors != 0)
005c60ff                  this->footwearColor = RandInt(numFootwearColors, this->footwearColor);
005c60ff              
005c611d              this->footwearShade = ((double)(((long double)rand()) * ((long double)3.0518509475997192e-05)));
005c6123              Sex_CG::~Sex_CG(&__return);
005c608f          }
005c6081      }
005c6070  }


005c6130  void __fastcall CharGenState::FitTemplateToCharacter(class CharGenState* this)

005c6130  {
005c6130      int32_t ebp;
005c6130      int32_t var_4 = ebp;
005c6141      uint32_t mHeritageGroup = this->mHeritageGroup;
005c6147      int32_t ebx = 0xffffffff;
005c614d      int32_t var_1f4 = 0xffffffff;
005c6151      int32_t var_1f0 = 0;
005c6159      int32_t var_1ec = 0;
005c6159      
005c616f      if ((mHeritageGroup != 0 && this->mGender != 0))
005c616f      {
005c6181          void __return;
005c6181          ACCharGenData::GetHG(this->charGenData, &__return, mHeritageGroup);
005c619c          void __return_1;
005c619c          HeritageGroup_CG::GetSX(&__return, &__return_1, this->mGender);
005c61af          int32_t var_1fc_1 = 1;
005c61b3          int32_t var_160;
005c61b3          int16_t top;
005c61b3          
005c61b3          if (var_160 > 1)
005c61b3          {
005c61b9              void* var_1f8_1 = 0x40;
005c6455              bool cond:12_1;
005c6455              
005c6455              do
005c6455              {
005c61d3                  int32_t var_1e8;
005c61d3                  int32_t var_168;
005c61d3                  Template_CG::Template_CG(&var_1e8, ((char*)var_1f8_1 + var_168));
005c61d8                  int32_t strength = this->strength;
005c61de                  int32_t var_1d8;
005c61de                  int32_t ecx_8 = var_1d8;
005c61e2                  int32_t var_210 = strength;
005c61e8                  int32_t* eax_2 = &var_210;
005c61e8                  
005c61ec                  if (strength >= ecx_8)
005c61ee                      eax_2 = &var_1d8;
005c61ee                  
005c61f2                  int32_t var_1d4;
005c61f2                  int32_t edx_1 = var_1d4;
005c61f6                  int32_t endurance = this->endurance;
005c61fc                  int32_t eax_3 = *(uint32_t*)eax_2;
005c6202                  var_210 = endurance;
005c6206                  int32_t* edx_2 = &var_210;
005c6206                  
005c620a                  if (endurance >= edx_1)
005c620c                      edx_2 = &var_1d4;
005c620c                  
005c6212                  int32_t var_1d0;
005c6212                  int32_t edx_3 = var_1d0;
005c6216                  int32_t eax_4 = (eax_3 + *(uint32_t*)edx_2);
005c6218                  int32_t coordination = this->coordination;
005c6222                  var_210 = coordination;
005c6226                  int32_t* edx_4 = &var_210;
005c6226                  
005c622a                  if (coordination >= edx_3)
005c622c                      edx_4 = &var_1d0;
005c622c                  
005c6232                  int32_t var_1cc;
005c6232                  int32_t edx_5 = var_1cc;
005c6236                  int32_t eax_5 = (eax_4 + *(uint32_t*)edx_4);
005c6238                  int32_t quickness = this->quickness;
005c6242                  var_210 = quickness;
005c6246                  int32_t* edx_6 = &var_210;
005c6246                  
005c624a                  if (quickness >= edx_5)
005c624c                      edx_6 = &var_1cc;
005c624c                  
005c6252                  int32_t var_1c8;
005c6252                  int32_t edx_7 = var_1c8;
005c6256                  int32_t eax_6 = (eax_5 + *(uint32_t*)edx_6);
005c6258                  int32_t focus = this->focus;
005c6262                  var_210 = focus;
005c6266                  int32_t* edx_8 = &var_210;
005c6266                  
005c626a                  if (focus >= edx_7)
005c626c                      edx_8 = &var_1c8;
005c626c                  
005c6272                  int32_t var_1c4;
005c6272                  int32_t edx_9 = var_1c4;
005c6276                  int32_t eax_7 = (eax_6 + *(uint32_t*)edx_8);
005c6278                  int32_t self = this->self;
005c627e                  int32_t ecx_13 = (((((ecx_8 + edx_1) + edx_3) + edx_5) + edx_7) + edx_9);
005c6282                  var_210 = ecx_13;
005c6286                  int32_t self_1 = self;
005c628a                  int32_t* edx_10 = &self_1;
005c628a                  
005c628e                  if (self >= edx_9)
005c6290                      edx_10 = &var_1c4;
005c6290                  
005c6296                  int32_t var_208;
005c6296                  
005c6296                  if (ecx_13 <= 0)
005c6296                  {
005c62bf                      var_208 = 0;
005c62c7                      int32_t var_204_1 = 0x3fd00000;
005c6296                  }
005c6296                  else
005c6296                  {
005c629c                      self_1 = (*(uint32_t*)edx_10 + eax_7);
005c62a0                      /* unimplemented  {fild st0, dword [esp+0x14]} */;
005c62a4                      /* unimplemented  {fidiv st0, dword [esp+0x10]} */;
005c62a8                      /* unimplemented  {fld st0, qword [&TEMPLATE_WEIGHT_ATTRIBUTES]} */;
005c62ae                      j__CIpow();
005c62b3                      /* unimplemented  {fmul st0, qword [&data_7acf88]} */;  {  // {"UUUUU"}}
005c62b9                      var_208 = ((double)/* var_208.q = fconvert.d(unimplemented  {fstp qword [esp+0x18], st0}) */);
005c62b9                      /* unimplemented  {fstp qword [esp+0x18], st0} */;
005c62b9                      top -= 1;
005c6296                  }
005c6296                  
005c62d3                  int32_t self_2 = 0;
005c62d5                  int32_t ecx_14 = 0;
005c62d9                  self_1 = 0;
005c62dd                  void* var_1c0;
005c62dd                  int32_t var_1b8;
005c62dd                  
005c62dd                  if (var_1b8 > 0)
005c62dd                  {
005c6301                      do
005c6301                      {
005c62e9                          eax_7 = *(uint32_t*)((char*)var_1c0 + (ecx_14 << 2));
005c62e9                          
005c62fb                          if ((eax_7 < this->totalNumSkills && this->skillLevels[eax_7] >= 2))
005c62fd                              self_2 += 1;
005c62fd                          
005c62fe                          ecx_14 += 1;
005c6301                      } while (ecx_14 < var_1b8);
005c6301                      
005c6305                      self_1 = self_2;
005c62dd                  }
005c62dd                  
005c6309                  int16_t top_4;
005c6309                  
005c6309                  if ((var_1b8 <= 0 || var_1b8 <= 0))
005c6309                  {
005c632a                      top_4 = (top - 1);
005c632a                      /* unimplemented  {fld st0, qword [esp+0x18]} */;
005c632e                      /* unimplemented  {fadd qword [&data_7e7818]} */;  {  // {"33333"}}
005c6309                  }
005c6309                  else
005c6309                  {
005c630b                      /* unimplemented  {fild st0, dword [esp+0x14]} */;
005c630f                      /* unimplemented  {fidiv st0, dword [esp+0x68]} */;
005c6313                      top_4 = (top - 2);
005c6313                      /* unimplemented  {fld st0, qword [&TEMPLATE_WEIGHT_TRAINED_SKILLS]} */;
005c6319                      j__CIpow();
005c631e                      /* unimplemented  {fmul st0, qword [&data_7acf88]} */;  {  // {"UUUUU"}}
005c6324                      /* unimplemented  {fadd qword [esp+0x18]} */;
005c6309                  }
005c6309                  
005c6338                  var_208 = ((double)/* var_208.q = fconvert.d(unimplemented  {fstp qword [esp+0x18], st0}) */);
005c6338                  /* unimplemented  {fstp qword [esp+0x18], st0} */;
005c633c                  int32_t self_3 = 0;
005c633e                  int32_t ecx_15 = 0;
005c6342                  self_1 = 0;
005c6346                  void* var_1b4;
005c6346                  int32_t var_1ac;
005c6346                  bool cond:10_1;
005c6346                  
005c6346                  if (var_1ac > 0)
005c6346                  {
005c6348                      int32_t totalNumSkills = this->totalNumSkills;
005c6351                      var_210 = (var_1ac * 2);
005c6351                      
005c637d                      do
005c637d                      {
005c6359                          int32_t eax_11 = *(uint32_t*)((char*)var_1b4 + (ecx_15 << 2));
005c6359                          
005c635e                          if (eax_11 < totalNumSkills)
005c635e                          {
005c6366                              int32_t eax_12 = this->skillLevels[eax_11];
005c6366                              
005c636d                              if (eax_12 == 2)
005c636f                                  self_3 += 1;
005c636d                              else if (eax_12 == 3)
005c6377                                  self_3 += 2;
005c635e                          }
005c635e                          
005c637a                          ecx_15 += 1;
005c637d                      } while (ecx_15 < var_1ac);
005c637d                      
005c6383                      cond:10_1 = var_210 <= 0;
005c6385                      self_1 = self_3;
005c6346                  }
005c6346                  
005c6389                  int16_t top_7;
005c6389                  
005c6389                  if ((var_1ac <= 0 || cond:10_1))
005c6389                  {
005c63aa                      top_7 = top_4;
005c63aa                      /* unimplemented  {fld st0, qword [esp+0x18]} */;
005c63ae                      /* unimplemented  {fadd qword [&data_7e7810]} */;
005c6389                  }
005c6389                  else
005c6389                  {
005c638b                      /* unimplemented  {fild st0, dword [esp+0x14]} */;
005c638f                      /* unimplemented  {fidiv st0, dword [esp+0x10]} */;
005c6393                      top_7 = (top_4 - 1);
005c6393                      /* unimplemented  {fld st0, qword [&TEMPLATE_WEIGHT_SPECIALIZED_SKILLS]} */;
005c6399                      j__CIpow();
005c639e                      /* unimplemented  {fmul st0, qword [&data_7acf88]} */;  {  // {"UUUUU"}}
005c63a4                      /* unimplemented  {fadd qword [esp+0x18]} */;
005c6389                  }
005c6389                  
005c63b4                  long double temp1_1 = ((long double)var_1f0);
005c63b4                  (/* unimplemented  {fcom st0, qword [esp+0x30]} f- temp1_1 */ - temp1_1);
005c63b4                  bool c0_1 = /* bool c0_1 = unimplemented  {fcom st0, qword [esp+0x30]} f< temp1_1 */ < temp1_1;
005c63b4                  bool c2_1 = (FCMP_UO(/* bool c2_1 = is_unordered.t(unimplemented  {fcom st0, qword [esp+0x30]}, temp1_1) */, temp1_1));
005c63b4                  bool c3_1 = /* bool c3_1 = unimplemented  {fcom st0, qword [esp+0x30]} f== temp1_1 */ == temp1_1;
005c63b8                  eax_7 = ((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | ((top_7 & 7) << 0xb)))));
005c63b8                  
005c63bd                  if ((*(uint8_t*)((char*)eax_7)[1] & 0x41) != 0)
005c63bd                  {
005c63cd                      ebx = var_1f4;
005c63d1                      /* unimplemented  {fstp st0, st0} */;
005c63d1                      /* unimplemented  {fstp st0, st0} */;
005c63d1                      top = (top_7 + 1);
005c63bd                  }
005c63bd                  else
005c63bd                  {
005c63bf                      ebx = var_1fc_1;
005c63c3                      var_1f0 = ((double)/* var_1f0.q = fconvert.d(unimplemented  {fstp qword [esp+0x30], st0}) */);
005c63c3                      /* unimplemented  {fstp qword [esp+0x30], st0} */;
005c63c3                      top = (top_7 + 1);
005c63c7                      var_1f4 = ebx;
005c63bd                  }
005c63bd                  
005c63e3                  var_1e8 = 0x79fe78;
005c63eb                  int32_t var_1b0;
005c63eb                  
005c63eb                  if ((var_1b0 & 0x80000000) == 0x80000000)
005c63f2                      operator delete[](var_1b4);
005c63f2                  
005c6408                  int32_t var_1bc;
005c6408                  
005c6408                  if ((var_1bc & 0x80000000) == 0x80000000)
005c640f                      operator delete[](var_1c0);
005c640f                  
005c642e                  void* var_1e4;
005c642e                  
005c642e                  if ((InterlockedDecrement(((char*)var_1e4 - 0x10)) == 0 && var_1e4 != 0x14))
005c6436                      **(uint32_t**)((char*)var_1e4 - 0x14)(1);
005c6436                  
005c644b                  cond:12_1 = (var_1fc_1 + 1) < var_160;
005c644d                  var_1fc_1 += 1;
005c6451                  var_1f8_1 += 0x40;
005c6455              } while (cond:12_1);
005c61b3          }
005c61b3          
005c645b          /* unimplemented  {fld st0, qword [esp+0x30]} */;
005c645f          long double temp0_1 = ((long double)0.75);
005c645f          (/* unimplemented  {fcomp st0, qword [&TEMPLATE_SCORE_CUTOFF]} f- temp0_1 */ - temp0_1);
005c645f          bool c0_2 = /* bool c0_2 = unimplemented  {fcomp st0, qword [&TEMPLATE_SCORE_CUTOFF]} f< temp0_1 */ < temp0_1;
005c645f          bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcomp st0, qword [&TEMPLATE_SCORE_CUTOFF]}, temp0_1) */, temp0_1));
005c645f          bool c3_2 = /* bool c3_2 = unimplemented  {fcomp st0, qword [&TEMPLATE_SCORE_CUTOFF]} f== temp0_1 */ == temp0_1;
005c645f          /* unimplemented  {fcomp st0, qword [&TEMPLATE_SCORE_CUTOFF]} */;
005c6465          int32_t eax;
005c6465          eax = ((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top & 7) << 0xb)))));
005c6467          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005c6467          
005c646a          if (!(p_1))
005c646c              ebx = 0;
005c646c          
005c6474          if (ebx != this->template_)
005c6476              this->template_ = ebx;
005c6476          
005c6483          Sex_CG::~Sex_CG(&__return_1);
005c648c          HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c616f      }
005c616f      
005c613d      var_4;
005c6130  }

005c6499                                                                             90 90 90 90 90 90 90                           .......

005c64a0  void __thiscall CharGenState::SetGender(class CharGenState* this, uint32_t arg2)

005c64a0  {
005c64a7      this->mGender = arg2;
005c64ad      CharGenState::ConstrainAllByGender(this);
005c64b2      this->vtable->UpdateTrueFacePal();
005c64c1      CharGenState::SetHeadgearStyle(this, this->headgearStyle);
005c64cf      CharGenState::SetShirtStyle(this, this->shirtStyle);
005c64dd      CharGenState::SetTrousersStyle(this, this->trousersStyle);
005c64eb      CharGenState::SetFootwearStyle(this, this->footwearStyle);
005c64a0  }

005c64f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c6500  void __fastcall CharGenState::RandomizeTemplate(class CharGenState* this)

005c6500  {
005c6509      uint32_t mHeritageGroup = this->mHeritageGroup;
005c6509      
005c651b      if ((mHeritageGroup != 0 && this->mGender != 0))
005c651b      {
005c6525          if ((mHeritageGroup != 0xc && mHeritageGroup != 0xd))
005c6525          {
005c6533              void __return;
005c6533              ACCharGenData::GetHG(this->charGenData, &__return, mHeritageGroup);
005c653f              int32_t var_78;
005c653f              
005c653f              if (var_78 > 1)
005c653f              {
005c6553                  int32_t eax_3 = (RandInt((var_78 - 1), (this->template_ - 1)) + 1);
005c6557                  this->template_ = eax_3;
005c6557                  
005c655d                  if (eax_3 != 0xffffffff)
005c6561                      CharGenState::ApplyTemplate(this);
005c653f              }
005c653f              
005c656a              HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c6576              return;
005c6525          }
005c6525          
005c6579          this->template_ = 1;
005c6583          CharGenState::ApplyTemplate(this);
005c651b      }
005c6500  }


005c6590  void __fastcall CharGenState::ConstrainAllByHeritage(class CharGenState* this)

005c6590  {
005c6599      uint32_t mHeritageGroup = this->mHeritageGroup;
005c6599      
005c65a4      if (mHeritageGroup == 0)
005c65a4      {
005c6726          int32_t edx_20 = -((((((this->self + this->focus) + this->quickness) + this->coordination) + this->endurance) + this->strength));
005c672f          this->template_ = 0xffffffff;
005c6739          this->totalAtrbCredits = 0;
005c673f          this->remainingAtrbCredits = edx_20;
005c6745          this->totalSkillCredits = 0;
005c674b          this->remainingSkillCredits = 0;
005c6751          CharGenState::SetName(this, &data_7928af);
005c6758          this->startArea = 0xffffffff;
005c6762          CharGenState::ApplyDefaultTemplate(this);
005c676f          return;
005c65a4      }
005c65a4      
005c65b6      void __return;
005c65b6      ACCharGenData::GetHG(this->charGenData, &__return, mHeritageGroup);
005c65bd      CharGenState::ConstrainAllByGender(this);
005c65cc      int32_t var_78;
005c65cc      
005c65cc      if (this->template_ >= var_78)
005c65ce          this->template_ = 0xffffffff;
005c65ce      
005c65e2      int32_t var_ac;
005c65e2      
005c65e2      if (this->totalAtrbCredits > var_ac)
005c65e2      {
005c6617          int32_t eax_6 = -((((((this->self + this->focus) + this->quickness) + this->coordination) + this->endurance) + this->strength));
005c661c          this->totalAtrbCredits = 0;
005c6622          this->remainingAtrbCredits = eax_6;
005c6628          CharGenState::SetStrength(this, 0, 0);
005c6638          int32_t eax_7;
005c6638          int32_t edx_4;
005c6638          edx_4 = HIGHD((0x2aaaaaab * this->totalAtrbCredits));
005c6638          eax_7 = LOWD((0x2aaaaaab * this->totalAtrbCredits));
005c6645          CharGenState::SetEndurance(this, (edx_4 + (edx_4 >> 0x1f)), 0);
005c6655          int32_t eax_8;
005c6655          int32_t edx_6;
005c6655          edx_6 = HIGHD((0x2aaaaaab * this->totalAtrbCredits));
005c6655          eax_8 = LOWD((0x2aaaaaab * this->totalAtrbCredits));
005c6662          CharGenState::SetCoordination(this, (edx_6 + (edx_6 >> 0x1f)), 0);
005c6672          int32_t eax_11;
005c6672          int32_t edx_8;
005c6672          edx_8 = HIGHD((0x2aaaaaab * this->totalAtrbCredits));
005c6672          eax_11 = LOWD((0x2aaaaaab * this->totalAtrbCredits));
005c667f          CharGenState::SetQuickness(this, (edx_8 + (edx_8 >> 0x1f)), 0);
005c668f          int32_t eax_12;
005c668f          int32_t edx_10;
005c668f          edx_10 = HIGHD((0x2aaaaaab * this->totalAtrbCredits));
005c668f          eax_12 = LOWD((0x2aaaaaab * this->totalAtrbCredits));
005c669c          CharGenState::SetFocus(this, (edx_10 + (edx_10 >> 0x1f)), 0);
005c66ac          int32_t eax_15;
005c66ac          int32_t edx_12;
005c66ac          edx_12 = HIGHD((0x2aaaaaab * this->totalAtrbCredits));
005c66ac          eax_15 = LOWD((0x2aaaaaab * this->totalAtrbCredits));
005c66b9          CharGenState::SetSelf(this, (edx_12 + (edx_12 >> 0x1f)), 0);
005c65e2      }
005c65e2      
005c66c8      int32_t var_a8;
005c66c8      
005c66c8      if (this->totalSkillCredits > var_a8)
005c66ca          this->totalSkillCredits = var_a8;
005c66ca      
005c66d2      CharGenState::UpdateRemainingSkillCredits(this);
005c66d2      
005c66dd      if (this->remainingSkillCredits < 0)
005c66e1          CharGenState::ResetSkillLevels(this);
005c66e1      
005c66ea      HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c6590  }


005c6770  void __thiscall CharGenState::RandomizeClothing(class CharGenState* this, int32_t arg2)

005c6770  {
005c6778      CharGenState::RandomizeHeadgear(this, arg2);
005c677f      CharGenState::RandomizeShirt(this);
005c6786      CharGenState::RandomizeTrousers(this);
005c678d      CharGenState::RandomizeFootwear(this);
005c6770  }

005c6796                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005c67a0  void __thiscall CharGenState::SetHeritageGroup(class CharGenState* this, uint32_t arg2)

005c67a0  {
005c67af      this->mHeritageGroup = arg2;
005c67af      
005c67b5      if (arg2 != 0)
005c67b5      {
005c67c7          void __return;
005c67c7          ACCharGenData::GetHG(this->charGenData, &__return, arg2);
005c67d8          class IDClass<_tagDataID,32,0> var_b4;
005c67d8          
005c67d8          if (var_b4 != this->setupID.id)
005c67d8          {
005c67da              this->setupChanged = 1;
005c67e4              this->setupID.id = var_b4;
005c67d8          }
005c67d8          
005c67ee          int32_t self = this->self;
005c67f4          int32_t focus = this->focus;
005c67fa          int32_t var_ac;
005c67fa          this->totalAtrbCredits = var_ac;
005c6824          this->remainingAtrbCredits = ((((((var_ac - self) - focus) - this->quickness) - this->coordination) - this->endurance) - this->strength);
005c6830          int32_t var_a8;
005c6830          this->totalSkillCredits = var_a8;
005c6836          this->remainingSkillCredits = var_a8;
005c683c          CharGenState::ApplyTemplate(this);
005c6843          CharGenState::RandomizeStartArea(this);
005c684c          HeritageGroup_CG::~HeritageGroup_CG(&__return);
005c67b5      }
005c67b5      
005c6853      CharGenState::ConstrainAllByHeritage(this);
005c6858      this->vtable->UpdateTrueFacePal();
005c6867      CharGenState::SetHeadgearStyle(this, this->headgearStyle);
005c6875      CharGenState::SetShirtStyle(this, this->shirtStyle);
005c6883      CharGenState::SetTrousersStyle(this, this->trousersStyle);
005c6891      CharGenState::SetFootwearStyle(this, this->footwearStyle);
005c67a0  }


005c68a0  void __fastcall CharGenState::Reset(class CharGenState* this)

005c68a0  {
005c68aa      this->verificationState = UNDEF_CG_VERIFICATION_RESPONSE;
005c68b0      this->heritageGroupFrozen = 0;
005c68b6      this->sexFrozen = 0;
005c68bc      this->appearanceFrozen = 0;
005c68c2      this->clothingFrozen = 0;
005c68d3      __builtin_memset(&this->bAttribLocked[1], 0, 0x18);
005c68d8      CharGenState::SetHeritageGroup(this, 0);
005c68e0      CharGenState::SetGender(this, 0);
005c68e5      struct CharGenState::VTable* vtable = this->vtable;
005c68f1      this->eyesStrip = 0xffffffff;
005c68f7      this->noseStrip = 0xffffffff;
005c68fd      this->mouthStrip = 0xffffffff;
005c6903      this->skinShade = 0f;
005c6909      *(uint32_t*)((char*)this->skinShade)[4] = 0xbff00000;
005c690f      vtable->UpdateTrueFacePal();
005c6915      this->hairShade = 0f;
005c691b      *(uint32_t*)((char*)this->hairShade)[4] = 0xbff00000;
005c6911      this->vtable->UpdateTrueFacePal();
005c6923      struct CharGenState::VTable* vtable_1 = this->vtable;
005c6927      this->hairColor = 0xffffffff;
005c692d      vtable_1->UpdateTrueFacePal();
005c692f      struct CharGenState::VTable* vtable_2 = this->vtable;
005c6933      this->eyeColor = 0xffffffff;
005c6939      vtable_2->UpdateTrueFacePal();
005c693e      this->hairStyle = 0xffffffff;
005c6944      CharGenState::SetHeadgearStyle(this, 0xffffffff);
005c694c      this->headgearColor = 0xffffffff;
005c6952      this->headgearShade = 0f;
005c6958      *(uint32_t*)((char*)this->headgearShade)[4] = 0xbff00000;
005c695e      CharGenState::SetShirtStyle(this, 0xffffffff);
005c6966      this->shirtColor = 0xffffffff;
005c696c      this->shirtShade = 0f;
005c6972      *(uint32_t*)((char*)this->shirtShade)[4] = 0xbff00000;
005c6978      CharGenState::SetTrousersStyle(this, 0xffffffff);
005c6980      this->trousersColor = 0xffffffff;
005c6986      this->trousersShade = 0f;
005c698c      *(uint32_t*)((char*)this->trousersShade)[4] = 0xbff00000;
005c6992      CharGenState::SetFootwearStyle(this, 0xffffffff);
005c699e      this->footwearColor = 0xffffffff;
005c69a4      this->footwearShade = 0f;
005c69aa      *(uint32_t*)((char*)this->footwearShade)[4] = 0xbff00000;
005c69b0      this->template_ = 0xffffffff;
005c69b6      this->atrbMin = 0xa;
005c69c0      this->atrbMax = 0x64;
005c69ca      this->totalAtrbCredits = 0;
005c69d0      this->remainingAtrbCredits = 0;
005c69d6      this->totalSkillCredits = 0;
005c69dc      this->remainingSkillCredits = 0;
005c69e2      CharGenState::SetName(this, &data_7928af);
005c69e7      this->startArea = 0xffffffff;
005c69ed      this->createAsAdmin = 0;
005c69f5      this->createAsEnvoy = 0;
005c69fb      CharGenState::ApplyDefaultTemplate(this);
005c6a01      this->setupChanged = 0;
005c6a07      this->setupID.id = 0x2000054;
005c6a11      this->animID.id = 0x3000003;
005c68a0  }

005c6a1f                                                                                               90                                 .

005c6a20  void __thiscall CharGenState::RandomizeHeritageGroup(class CharGenState* this, uint8_t arg2)

005c6a20  {
005c6a29      int32_t var_8;
005c6a29      
005c6a29      if (arg2 != 0)
005c6a2f          var_8 = 4;
005c6a29      else
005c6a2b          var_8 = 3;
005c6a2b      
005c6a3e      CharGenState::SetHeritageGroup(this, Random::RollDice(1, var_8));
005c6a20  }

005c6a47                       90 90 90 90 90 90 90 90 90                                                         .........

005c6a50  void __fastcall CharGenState::CharGenState(class CharGenState* this)

005c6a50  {
005c6a5d      int32_t var_74 = 0;
005c6a61      this->vtable = &CharGenState::`vftable';
005c6a68      ACCharGenResult::ACCharGenResult(&this->charGenResult);
005c6a6d      this->beginRequest = 1;
005c6a77      __builtin_memset(&this->numHeadgearColors, 0, 0x30);
005c6abf      this->totalNumSkills = 0;
005c6ac5      this->skillLevels = nullptr;
005c6ad0      this->skillRecordList.vtable = 0x7e77f8;
005c6ada      this->skillRecordList._head = nullptr;
005c6ae0      this->skillRecordList._tail = nullptr;
005c6ae6      this->skillRecordList._num_elements = 0;
005c6af0      this->skillTable = nullptr;
005c6af6      this->enterChargen = ENTER_NEW;
005c6afc      this->charGenData = nullptr;
005c6b0c      this->charGenData = DBCache::GetFromEnumStatic(0xe, 2, 0x10000002);
005c6b12      this->slot = 0;
005c6b18      CharGenState::Reset(this);
005c6b1d      enum SKILL_ADVANCEMENT_CLASS* skillLevels = this->skillLevels;
005c6b1d      
005c6b25      if (skillLevels != 0)
005c6b25      {
005c6b28          operator delete[](skillLevels);
005c6b30          this->skillLevels = nullptr;
005c6b25      }
005c6b25      
005c6b40      class DBObj* eax_1 = DBCache::GetFromEnumStatic(4, 2, 0x10000004);
005c6b50      this->skillTable = eax_1;
005c6b56      void __return;
005c6b56      PackableHashTable<unsigned long,SkillBase>::begin(((char*)eax_1 + 0x38), &__return);
005c6b5f      void var_58;
005c6b5f      SkillBase::SkillBase(&var_58);
005c6b64      int32_t* var_64;
005c6b64      int32_t* edi = var_64;
005c6b6a      int32_t* var_50;
005c6b6a      
005c6b6a      if (edi != 0)
005c6b6a      {
005c6b7e          while (true)
005c6b7e          {
005c6b7e              SkillBase::operator=(&var_58, &edi[2]);
005c6b85              void* eax_2 = operator new(0x24);
005c6b91              class SkillRecord* var_70;
005c6b91              int32_t* var_6c;
005c6b91              
005c6b91              if (eax_2 == 0)
005c6bcf                  var_70 = nullptr;
005c6b91              else
005c6b91              {
005c6b9b                  var_6c = var_50;
005c6ba6                  var_74 |= 1;
005c6baa                  InterlockedIncrement(&var_50[1]);
005c6bb4                  int32_t edi_1 = *(uint32_t*)edi;
005c6bbd                  strncpy(eax_2, &var_50[5], 0x1e);
005c6bc6                  *(uint32_t*)((char*)eax_2 + 0x20) = edi_1;
005c6bc9                  var_70 = eax_2;
005c6b91              }
005c6b91              
005c6bd8              if ((var_74 & 1) != 0)
005c6bd8              {
005c6bda                  var_74 &= 0xfffffffe;
005c6bda                  
005c6bf3                  if ((InterlockedDecrement(&var_6c[1]) == 0 && var_6c != 0))
005c6bfb                      **(uint32_t**)var_6c(1);
005c6bd8              }
005c6bd8              
005c6bfd              uint32_t edi_2 = 0xffffffff;
005c6bfd              
005c6c00              while (true)
005c6c00              {
005c6c00                  class ListNode<SkillRecord *>* eax_8 = this->skillRecordList._head;
005c6c06                  edi_2 += 1;
005c6c06                  
005c6c09                  if (eax_8 == 0)
005c6c09                      break;
005c6c09                  
005c6c11                  if (edi_2 >= this->skillRecordList._num_elements)
005c6c11                      break;
005c6c11                  
005c6c13                  int32_t ecx_7 = 0;
005c6c13                  
005c6c17                  while (ecx_7 != edi_2)
005c6c17                  {
005c6c19                      eax_8 = eax_8->next;
005c6c1c                      ecx_7 += 1;
005c6c1c                      
005c6c1f                      if (eax_8 == 0)
005c6c1f                          goto label_5c6c6c;
005c6c17                  }
005c6c17                  
005c6c25                  if (eax_8 == 0)
005c6c25                      break;
005c6c25                  
005c6c27                  class SkillRecord* data = eax_8->data;
005c6c27                  
005c6c2b                  if (data == 0)
005c6c2b                      break;
005c6c2b                  
005c6c2d                  class SkillRecord* data_1 = data;
005c6c2f                  class SkillRecord* eax_9 = var_70;
005c6c33                  int32_t eax_11;
005c6c33                  
005c6c33                  while (true)
005c6c33                  {
005c6c33                      char edx_2 = eax_9->name[0];
005c6c35                      ecx_7 = edx_2;
005c6c37                      char temp0_1 = data_1->name[0];
005c6c37                      bool c_1 = edx_2 < temp0_1;
005c6c37                      
005c6c39                      if (edx_2 == temp0_1)
005c6c39                      {
005c6c3d                          if (ecx_7 == 0)
005c6c3d                          {
005c6c53                              eax_11 = 0;
005c6c55                              break;
005c6c3d                          }
005c6c3d                          
005c6c3f                          edx_2 = eax_9->name[1];
005c6c42                          ecx_7 = edx_2;
005c6c44                          char temp3_1 = data_1->name[1];
005c6c44                          c_1 = edx_2 < temp3_1;
005c6c44                          
005c6c47                          if (edx_2 == temp3_1)
005c6c47                          {
005c6c49                              eax_9 = &eax_9->name[2];
005c6c4c                              data_1 = &data_1->name[2];
005c6c4c                              
005c6c51                              if (ecx_7 != 0)
005c6c51                                  continue;
005c6c51                              
005c6c53                              eax_11 = 0;
005c6c55                              break;
005c6c47                          }
005c6c39                      }
005c6c39                      
005c6c57                      bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
005c6c59                      eax_11 = (((char*)eax_9 - eax_9) + 1);
005c6c59                      break;
005c6c33                  }
005c6c33                  
005c6c5e                  if (eax_11 <= 0)
005c6c5e                      break;
005c6c00              }
005c6c00              
005c6c6c          label_5c6c6c:
005c6c6c              List<SkillRecord *>::push(&this->skillRecordList, edi_2, &var_70);
005c6c7d              int32_t eax_13 = (*(uint32_t*)var_64 + 1);
005c6c7d              
005c6c80              if (eax_13 > this->totalNumSkills)
005c6c82                  this->totalNumSkills = eax_13;
005c6c82              
005c6c88              int32_t* eax_14 = var_64[0x18];
005c6c88              
005c6c8d              if (eax_14 == 0)
005c6c8d              {
005c6c96                  int32_t eax_16 = (var_64[0x19] + 1);
005c6c99                  int32_t var_5c;
005c6c99                  
005c6c99                  if (eax_16 >= var_5c)
005c6c99                  {
005c6cb2                  label_5c6cb2:
005c6cb2                      eax_14 = nullptr;
005c6c99                  }
005c6c99                  else
005c6c99                  {
005c6ca7                      int32_t var_60;
005c6ca7                      
005c6ca7                      while (*(uint32_t*)(var_60 + (eax_16 << 2)) == 0)
005c6ca7                      {
005c6cad                          eax_16 += 1;
005c6cad                          
005c6cb0                          if (eax_16 >= var_5c)
005c6cb0                              goto label_5c6cb2;
005c6ca7                      }
005c6ca7                      
005c6d6e                      eax_14 = *(uint32_t*)(var_60 + (eax_16 << 2));
005c6c99                  }
005c6c8d              }
005c6c8d              
005c6cb6              var_64 = eax_14;
005c6cb6              
005c6cba              if (eax_14 == 0)
005c6cba                  break;
005c6cba              
005c6b72              edi = var_64;
005c6b7e          }
005c6b6a      }
005c6b6a      
005c6cc0      int32_t totalNumSkills = this->totalNumSkills;
005c6cc0      
005c6cc8      if (totalNumSkills > 0)
005c6cc8      {
005c6cd2          void* eax_17 = operator new[]((totalNumSkills << 2));
005c6cd7          int32_t totalNumSkills_1 = this->totalNumSkills;
005c6cdd          this->skillLevels = eax_17;
005c6ce6          int32_t i = 0;
005c6ce6          
005c6cea          if (totalNumSkills_1 > 0)
005c6cea          {
005c6d02              do
005c6d02              {
005c6cf0                  this->skillLevels[i] = 0;
005c6cff                  i += 1;
005c6d02              } while (i < this->totalNumSkills);
005c6cea          }
005c6cc8      }
005c6cc8      
005c6d16      this->attribute2ndTable = DBCache::GetFromEnumStatic(1, 2, 0x10000003);
005c6d29      __builtin_memset(&this->bAttribLocked[1], 0, 0x18);
005c6d29      
005c6d40      if ((InterlockedDecrement(&var_50[1]) == 0 && var_50 != 0))
005c6d48          **(uint32_t**)var_50(1);
005c6d48      
005c6d5b      int32_t* var_54;
005c6d5b      
005c6d5b      if ((InterlockedDecrement(&var_54[1]) == 0 && var_54 != 0))
005c6d63          **(uint32_t**)var_54(1);
005c6a50  }

005c6c9d                                                                                         8d 49 00                               .I.
005c6d76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005c6d80  void __thiscall CharGenState::RandomizeCharacter(class CharGenState* this, uint8_t arg2)

005c6d80  {
005c6d83      CharGenState::Reset(this);
005c6d8e      int32_t var_8;
005c6d8e      
005c6d8e      if (arg2 != 0)
005c6d94          var_8 = 4;
005c6d8e      else
005c6d90          var_8 = 3;
005c6d90      
005c6da3      CharGenState::SetHeritageGroup(this, Random::RollDice(1, var_8));
005c6db7      CharGenState::SetGender(this, Random::RollDice(1, 2));
005c6dc0      CharGenState::RandomizeAppearance(this, 0);
005c6dc9      CharGenState::RandomizeHeadgear(this, 0);
005c6dd0      CharGenState::RandomizeShirt(this);
005c6dd7      CharGenState::RandomizeTrousers(this);
005c6dde      CharGenState::RandomizeFootwear(this);
005c6de5      CharGenState::RandomizeTemplate(this);
005c6dec      CharGenState::RandomizeStartArea(this);
005c6df1      this->heritageGroupFrozen = 1;
005c6dfb      this->sexFrozen = 1;
005c6e05      this->appearanceFrozen = 1;
005c6d80  }

005c6e13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005c6e20  uint32_t __fastcall CharacterTitleTable::GetPackSize(class CharacterTitleTable* this)

005c6e20  {
005c6e20      class CharacterTitleTable* this_1 = this;
005c6e21      struct PackObj::VTable* vtable = this->mTitleList.vtable;
005c6e2e      this_1 = nullptr;
005c6e3d      return (vtable->Pack(&this_1, 0) + 8);
005c6e20  }

005c6e3e                                                                                            90 90                                ..

005c6e40  uint32_t __thiscall CharacterTitleTable::Pack(class CharacterTitleTable* this, void** arg2, uint32_t arg3)

005c6e40  {
005c6e46      int32_t result = this->vtable->GetPackSize();
005c6e46      
005c6e51      if (arg3 >= result)
005c6e51      {
005c6e59          **(uint32_t**)arg2 = 1;
005c6e62          void* ebx_2 = (*(uint32_t*)arg2 + 4);
005c6e65          *(uint32_t*)arg2 = ebx_2;
005c6e6c          *(uint32_t*)ebx_2 = this->mDisplayTitle;
005c6e6e          *(uint32_t*)arg2 += 4;
005c6e71          this->mTitleList.vtable->Pack(arg2, arg3);
005c6e51      }
005c6e51      
005c6e80      return result;
005c6e40  }

005c6e83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005c6e90  int32_t __thiscall CharacterTitleTable::UnPack(class CharacterTitleTable* this, void** arg2, uint32_t arg3)

005c6e90  {
005c6e9e      if (arg3 < this->vtable->GetPackSize())
005c6ea3          return 0;
005c6ea3      
005c6eac      void* ecx_1 = (*(uint32_t*)arg2 + 4);
005c6eaf      *(uint32_t*)arg2 = ecx_1;
005c6eb3      this->mDisplayTitle = *(uint32_t*)ecx_1;
005c6eb6      *(uint32_t*)arg2 += 4;
005c6eb9      this->mTitleList.vtable->UnPack(arg2, arg3);
005c6ec9      return 1;
005c6e90  }

005c6ecc                                      90 90 90 90                                                              ....

005c6ed0  int32_t CharacterTitleTable::GetCharacterTitleFromID(uint32_t arg1, class PStringBase<unsigned short>* arg2)

005c6ed0  {
005c6ee0      if (arg1 != 0)
005c6ee0      {
005c6ee2          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005c6ee7          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005c6eef          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005c6eef          
005c6f0a          if (EnumMapper::GetString(0x10000006, arg1, &PStringBase<char>::s_NullBuffer_2) != 0)
005c6f0a          {
005c6f3b              void var_90;
005c6f3b              StringInfo::StringInfo(&var_90);
005c6f40              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
005c6f44              uint32_t eax_5 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -8);
005c6f44              
005c6f4a              if (eax_5 == 0xffffffff)
005c6f4a              {
005c6f4d                  eax_5 = compute_str_hash(PStringBase<char>::s_NullBuffer_3);
005c6f55                  *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_3 - 8) = eax_5;
005c6f4a              }
005c6f4a              
005c6f63              StringInfo::SetStringIDandTableEnum(&var_90, eax_5, 0x10000007);
005c6f80              void* __return;
005c6f80              PStringBase<unsigned short>::operator=(arg2, StringInfo::GetString(&var_90, &__return, 0));
005c6f8f              int32_t* esi_4 = ((char*)__return - 0x14);
005c6f8f              
005c6f9e              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
005c6fa6                  **(uint32_t**)esi_4(1);
005c6fa6              
005c6fac              StringInfo::~StringInfo(&var_90);
005c6fb5              void* __offset(PSRefBufferCharData<char>, -0x14) esi_6 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
005c6fb5              
005c6fc5              if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
005c6fcd                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
005c6fcd              
005c6fdb              return 1;
005c6f0a          }
005c6f0a          
005c6f10          void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
005c6f10          
005c6f23          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005c6f2b              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
005c6ee0      }
005c6ee0      
005c6f36      return 0;
005c6ed0  }

005c6fdc                                                                                      90 90 90 90                              ....

005c6fe0  void __fastcall CharacterTitleTable::CharacterTitleTable(class CharacterTitleTable* this)

005c6fe0  {
005c6fe2      this->vtable = 0x7a6f94;
005c6fea      this->mDisplayTitle = 0;
005c6fed      this->mTitleList._head = nullptr;
005c6ff0      this->mTitleList._tail = nullptr;
005c6ff3      this->mTitleList._num_elements = 0;
005c6ff6      this->mTitleList.vtable = &PackObj::`vftable';
005c6ffd      this->mTitleList.vtable = 0x7a7388;
005c7004      this->mTitleList.vtable = &PList<unsigned long>::`vftable';
005c6fe0  }

005c700c                                      90 90 90 90                                                              ....

005c7010  class CharacterTitleTable& __thiscall CharacterTitleTable::operator=(class CharacterTitleTable* this, class CharacterTitleTable const& arg2)

005c7010  {
005c701d      this->mDisplayTitle = arg2->mDisplayTitle;
005c7024      List<unsigned long>::operator=(&this->mTitleList, &arg2->mTitleList);
005c702c      return this;
005c7010  }

005c702f                                               90                                                                 .

005c7030  void __fastcall ACCharGenResult::ACCharGenResult(class ACCharGenResult* this)

005c7030  {
005c7036      this->vtable = 0x7e7868;
005c703c      __builtin_memset(&this->heritageGroup, 0, 0x40);
005c706c      __builtin_memset(&this->skinShade, 0, 0x54);
005c70c0      class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005c70cb      this->name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005c70d1      InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
005c70d7      this->slot = 0xffffffff;
005c70e7      this->startArea = 0;
005c70ed      this->isAdmin = 0;
005c70f3      this->isEnvoy = 0;
005c70fa      this->classID.id = INVALID_DID.id;
005c7030  }

005c7104              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c7110  class AC1Legacy::PStringBase<char> const* __fastcall ACCharGenResult::GetName(class ACCharGenResult const* this) __pure

005c7110  {
005c7116      return &this->name;
005c7110  }

005c7117                                                                       90 90 90 90 90 90 90 90 90                         .........

005c7120  int32_t __fastcall ACCharGenResult::GetSlot(class ACCharGenResult const* this)

005c7120  {
005c7126      return this->slot;
005c7120  }

005c7127                       90 90 90 90 90 90 90 90 90                                                         .........

005c7130  int32_t __fastcall ACCharGenResult::IsEnvoy(class ACCharGenResult const* this)

005c7130  {
005c7136      return this->isEnvoy;
005c7130  }

005c7137                                                                       90 90 90 90 90 90 90 90 90                         .........

005c7140  class UIElement* __fastcall UIElement::GetParent(class UIElement const* this)

005c7140  {
005c7146      return this->m_parent;
005c7140  }

005c7147                       90 90 90 90 90 90 90 90 90                                                         .........

005c7150  class IDClass<_tagDataID,32,0>* __thiscall ACCharGenResult::GetClassID(class ACCharGenResult const* this, class IDClass<_tagDataID,32,0>* __return)

005c7150  {
005c7156      uint32_t* result = __return;
005c715a      *(uint32_t*)result = this->classID.id;
005c715c      return result;
005c7150  }

005c715f                                                                                               90                                 .

005c7160  void __thiscall ACCharGenResult::SetName(class ACCharGenResult* this, class AC1Legacy::PStringBase<char> const* arg2)

005c7160  {
005c716b      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->name.m_buffer;
005c716b      
005c7173      if (m_buffer_1 == arg2->m_buffer)
005c71aa          return;
005c71aa      
005c7185      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005c7187          m_buffer_1->vtable->__vecDelDtor(1);
005c7187      
005c718f      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
005c7191      this->name.m_buffer = m_buffer;
005c719d      arg2 = &m_buffer->m_cRef;
005c71a1      /* tailcall */
005c71a1      return InterlockedIncrement();
005c7160  }

005c71ad                                         90 90 90                                                               ...

005c71b0  void __fastcall ACCharGenResult::~ACCharGenResult(class ACCharGenResult* this)

005c71b0  {
005c71b3      enum SKILL_ADVANCEMENT_CLASS* skillAdvancementClasses = this->skillAdvancementClasses;
005c71bc      this->vtable = 0x7e7868;
005c71bc      
005c71c2      if (skillAdvancementClasses != 0)
005c71c5          operator delete[](skillAdvancementClasses);
005c71c5      
005c71cd      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->name.m_buffer;
005c71cd      
005c71e3      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005c71e5          m_buffer->vtable->__vecDelDtor(1);
005c71e5      
005c71ee      this->vtable = 0x79285c;
005c71b0  }

005c71f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005c7200  void __thiscall ACCharGenResult::CG_Pack(class ACCharGenResult* this, void** arg2, uint8_t* arg3)

005c7200  {
005c7208      **(uint32_t**)arg2 = 1;
005c7210      void* eax_2 = (*(uint32_t*)arg2 + 4);
005c7213      *(uint32_t*)arg2 = eax_2;
005c721b      *(uint32_t*)eax_2 = this->heritageGroup;
005c721f      void* ebx_1 = (*(uint32_t*)arg2 + 4);
005c7222      *(uint32_t*)arg2 = ebx_1;
005c7229      uint32_t heritageGroup = this->heritageGroup;
005c722c      *(uint32_t*)ebx_1 = this->gender;
005c7230      void* edx_2 = (*(uint32_t*)arg2 + 4);
005c7233      *(uint32_t*)arg2 = edx_2;
005c723a      uint32_t ebx_2 = (heritageGroup + this->gender);
005c723f      *(uint32_t*)edx_2 = this->eyesStrip;
005c7243      void* edx_4 = (*(uint32_t*)arg2 + 4);
005c7246      *(uint32_t*)arg2 = edx_4;
005c7248      int32_t eyesStrip = this->eyesStrip;
005c7250      *(uint32_t*)edx_4 = this->noseStrip;
005c7254      void* edx_7 = (*(uint32_t*)arg2 + 4);
005c7257      *(uint32_t*)arg2 = edx_7;
005c7260      int32_t ebx_4 = ((ebx_2 + eyesStrip) + this->noseStrip);
005c7265      *(uint32_t*)edx_7 = this->mouthStrip;
005c7269      void* edx_9 = (*(uint32_t*)arg2 + 4);
005c726c      *(uint32_t*)arg2 = edx_9;
005c726e      int32_t mouthStrip = this->mouthStrip;
005c7276      *(uint32_t*)edx_9 = this->hairColor;
005c727a      void* edx_12 = (*(uint32_t*)arg2 + 4);
005c727d      *(uint32_t*)arg2 = edx_12;
005c7286      int32_t ebx_6 = ((ebx_4 + mouthStrip) + this->hairColor);
005c728b      *(uint32_t*)edx_12 = this->eyeColor;
005c728f      void* edx_14 = (*(uint32_t*)arg2 + 4);
005c7292      *(uint32_t*)arg2 = edx_14;
005c7294      int32_t eyeColor = this->eyeColor;
005c729c      *(uint32_t*)edx_14 = this->hairStyle;
005c72a0      void* edx_17 = (*(uint32_t*)arg2 + 4);
005c72a3      *(uint32_t*)arg2 = edx_17;
005c72ac      int32_t ebx_8 = ((ebx_6 + eyeColor) + this->hairStyle);
005c72b1      *(uint32_t*)edx_17 = this->headgearStyle;
005c72b5      void* edx_19 = (*(uint32_t*)arg2 + 4);
005c72b8      *(uint32_t*)arg2 = edx_19;
005c72bf      int32_t ebx_9 = (ebx_8 + this->headgearStyle);
005c72c4      *(uint32_t*)edx_19 = this->headgearColor;
005c72c8      void* eax_13 = (*(uint32_t*)arg2 + 4);
005c72cb      *(uint32_t*)arg2 = eax_13;
005c72d0      *(uint32_t*)eax_13 = this->shirtStyle;
005c72d4      void* edx_22 = (*(uint32_t*)arg2 + 4);
005c72d7      *(uint32_t*)arg2 = edx_22;
005c72d9      int32_t shirtStyle = this->shirtStyle;
005c72e1      *(uint32_t*)edx_22 = this->shirtColor;
005c72e5      void* eax_16 = (*(uint32_t*)arg2 + 4);
005c72e8      *(uint32_t*)arg2 = eax_16;
005c72ef      *(uint32_t*)eax_16 = this->trousersStyle;
005c72f3      void* edx_25 = (*(uint32_t*)arg2 + 4);
005c72f6      *(uint32_t*)arg2 = edx_25;
005c72f8      int32_t trousersStyle = this->trousersStyle;
005c7300      *(uint32_t*)edx_25 = this->trousersColor;
005c7304      void* eax_19 = (*(uint32_t*)arg2 + 4);
005c7307      *(uint32_t*)arg2 = eax_19;
005c730e      *(uint32_t*)eax_19 = this->footwearStyle;
005c7312      void* edx_28 = (*(uint32_t*)arg2 + 4);
005c7315      *(uint32_t*)arg2 = edx_28;
005c7317      int32_t footwearStyle = this->footwearStyle;
005c731f      *(uint32_t*)edx_28 = this->footwearColor;
005c7323      void* eax_22 = (*(uint32_t*)arg2 + 4);
005c7326      *(uint32_t*)arg2 = eax_22;
005c732b      *(uint64_t*)eax_22 = ((double)((long double)this->skinShade));
005c732f      void* edx_31 = (*(uint32_t*)arg2 + 8);
005c7332      *(uint32_t*)arg2 = edx_31;
005c733b      *(uint64_t*)edx_31 = ((double)((long double)this->hairShade));
005c733f      void* ecx_14 = (*(uint32_t*)arg2 + 8);
005c7342      *(uint32_t*)arg2 = ecx_14;
005c7349      *(uint64_t*)ecx_14 = ((double)((long double)this->headgearShade));
005c734d      void* eax_26 = (*(uint32_t*)arg2 + 8);
005c7350      *(uint32_t*)arg2 = eax_26;
005c7355      *(uint64_t*)eax_26 = ((double)((long double)this->shirtShade));
005c7359      void* edx_33 = (*(uint32_t*)arg2 + 8);
005c735c      *(uint32_t*)arg2 = edx_33;
005c7363      *(uint64_t*)edx_33 = ((double)((long double)this->trousersShade));
005c7367      void* ecx_16 = (*(uint32_t*)arg2 + 8);
005c736a      *(uint32_t*)arg2 = ecx_16;
005c7371      *(uint64_t*)ecx_16 = ((double)((long double)this->footwearShade));
005c7375      void* eax_30 = (*(uint32_t*)arg2 + 8);
005c7378      *(uint32_t*)arg2 = eax_30;
005c737d      *(uint32_t*)eax_30 = this->templateNum;
005c7381      void* edx_35 = (*(uint32_t*)arg2 + 4);
005c7384      *(uint32_t*)arg2 = edx_35;
005c7386      int32_t templateNum = this->templateNum;
005c738e      *(uint32_t*)edx_35 = this->strength;
005c7392      void* edx_38 = (*(uint32_t*)arg2 + 4);
005c7395      *(uint32_t*)arg2 = edx_38;
005c739e      int32_t ebx_14 = (((((ebx_9 + shirtStyle) + trousersStyle) + footwearStyle) + templateNum) + this->strength);
005c73a6      *(uint32_t*)edx_38 = this->endurance;
005c73aa      void* edx_40 = (*(uint32_t*)arg2 + 4);
005c73ad      *(uint32_t*)arg2 = edx_40;
005c73af      int32_t endurance = this->endurance;
005c73bd      *(uint32_t*)edx_40 = this->coordination;
005c73c1      void* edx_43 = (*(uint32_t*)arg2 + 4);
005c73c4      *(uint32_t*)arg2 = edx_43;
005c73d0      int32_t ebx_16 = ((ebx_14 + endurance) + this->coordination);
005c73d8      *(uint32_t*)edx_43 = this->quickness;
005c73dc      void* edx_45 = (*(uint32_t*)arg2 + 4);
005c73df      *(uint32_t*)arg2 = edx_45;
005c73e1      int32_t quickness = this->quickness;
005c73ef      *(uint32_t*)edx_45 = this->focus;
005c73f3      void* edx_48 = (*(uint32_t*)arg2 + 4);
005c73f6      *(uint32_t*)arg2 = edx_48;
005c7402      int32_t ebx_18 = ((ebx_16 + quickness) + this->focus);
005c740a      *(uint32_t*)edx_48 = this->self;
005c740e      void* edx_50 = (*(uint32_t*)arg2 + 4);
005c7411      *(uint32_t*)arg2 = edx_50;
005c7413      int32_t self = this->self;
005c7421      *(uint32_t*)edx_50 = this->slot;
005c7425      void* edx_53 = (*(uint32_t*)arg2 + 4);
005c7428      *(uint32_t*)arg2 = edx_53;
005c7434      *(uint32_t*)edx_53 = this->classID.id;
005c7438      void* ecx_26 = (*(uint32_t*)arg2 + 4);
005c743b      *(uint32_t*)arg2 = ecx_26;
005c7445      *(uint32_t*)ecx_26 = this->numSkills;
005c7449      void* eax_41 = (*(uint32_t*)arg2 + 4);
005c744c      *(uint32_t*)arg2 = eax_41;
005c7454      void* ecx_27 = eax_41;
005c7456      int32_t i = 0;
005c7456      
005c745a      if (this->numSkills > 0)
005c745a      {
005c747b          do
005c747b          {
005c7469              *(uint32_t*)ecx_27 = this->skillAdvancementClasses[i];
005c746d              ecx_27 = (*(uint32_t*)arg2 + 4);
005c7470              *(uint32_t*)arg2 = ecx_27;
005c7478              i += 1;
005c747b          } while (i < this->numSkills);
005c745a      }
005c745a      
005c748b      AC1Legacy::PStringBase<char>::Pack(&this->name, arg2, (arg3 - ecx_27));
005c7498      **(uint32_t**)arg2 = this->startArea;
005c749c      void* eax_45 = (*(uint32_t*)arg2 + 4);
005c749f      *(uint32_t*)arg2 = eax_45;
005c74a7      *(uint32_t*)eax_45 = this->isAdmin;
005c74ab      void* edx_61 = (*(uint32_t*)arg2 + 4);
005c74ae      *(uint32_t*)arg2 = edx_61;
005c74b8      *(uint32_t*)edx_61 = this->isEnvoy;
005c74bc      int32_t* ecx_33 = (*(uint32_t*)arg2 + 4);
005c74bf      *(uint32_t*)arg2 = ecx_33;
005c74c3      *(uint32_t*)ecx_33 = (ebx_18 + self);
005c74cb      *(uint32_t*)arg2 += 4;
005c7200  }

005c74d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005c74e0  uint32_t __fastcall ACCharGenResult::GetPackSize(class ACCharGenResult* this)

005c74e0  {
005c74e0      class ACCharGenResult* this_1 = this;
005c74e2      int32_t numSkills = this->numSkills;
005c74f5      this_1 = nullptr;
005c750f      return ((AC1Legacy::PStringBase<char>::Pack(&this->name, &this_1, 0) + ((numSkills << 2) + 0x9c)) + 0x10);
005c74e0  }


005c7510  void* __thiscall ACCharGenResult::`scalar deleting destructor'(class ACCharGenResult* this, uint32_t arg2)

005c7510  {
005c7513      enum SKILL_ADVANCEMENT_CLASS* skillAdvancementClasses = this->skillAdvancementClasses;
005c751b      this->vtable = 0x7e7868;
005c751b      
005c7521      if (skillAdvancementClasses != 0)
005c7524          operator delete[](skillAdvancementClasses);
005c7524      
005c752d      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->name.m_buffer;
005c752d      
005c7543      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005c7545          m_buffer->vtable->__vecDelDtor(1);
005c7545      
005c7552      this->vtable = 0x79285c;
005c7552      
005c7559      if ((arg2 & 1) != 0)
005c755c          operator delete(this);
005c755c      
005c7567      return this;
005c7510  }

005c756a                                90 90 90 90 90 90                                                            ......

005c7570  uint32_t __thiscall ACCharGenResult::Pack(class ACCharGenResult* this, void** arg2, uint32_t arg3)

005c7570  {
005c7570      class ACCharGenResult* this_1 = this;
005c7575      int32_t numSkills = this->numSkills;
005c7588      this_1 = nullptr;
005c759c      void* result = ((((numSkills << 2) + 0x9c) + AC1Legacy::PStringBase<char>::Pack(&this->name, &this_1, 0)) + 0x10);
005c759c      
005c75a6      if (arg3 >= result)
005c75b4          ACCharGenResult::CG_Pack(this, arg2, (*(uint32_t*)arg2 + arg3));
005c75b4      
005c75be      return result;
005c7570  }

005c75c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005c75d0  int32_t __thiscall ACCharGenResult::CG_UnPack(class ACCharGenResult* this, void** arg2, uint8_t* arg3)

005c75d0  {
005c75ef      uint32_t var_c = 0;
005c75f5      void* var_10 = nullptr;
005c760b      void* ebx_2 = ((*(uint32_t*)arg2 - arg3) + 1);
005c760c      void* var_14 = ((this->numSkills << 2) + 0x9c);
005c760c      
005c761f      if (((AC1Legacy::PStringBase<char>::Pack(&this->name, &var_10, 0) + var_14) + 0x10) <= ebx_2)
005c761f      {
005c7625          void* eax_1 = *(uint32_t*)arg2;
005c7627          int32_t ecx_3 = *(uint32_t*)eax_1;
005c762b          int32_t eax_2 = ((char*)eax_1 + 4);
005c7631          int32_t edx_3;
005c7631          edx_3 = ecx_3 <= 1;
005c7639          int32_t ebx_3;
005c7639          ebx_3 = ecx_3 >= 1;
005c763c          *(uint32_t*)arg2 = eax_2;
005c7644          var_10 = ((edx_3 & ebx_3) & 1);
005c7644          
005c7648          if (ecx_3 != 1)
005c7648          {
005c79ae              var_10 = nullptr;
005c79cc              return (((eax_2 - eax_2) + 1) & var_10);
005c7648          }
005c7648          
005c7650          this->heritageGroup = *(uint32_t*)eax_2;
005c7655          void* ebx_5 = (*(uint32_t*)arg2 + 4);
005c7658          *(uint32_t*)arg2 = ebx_5;
005c765e          uint32_t heritageGroup = this->heritageGroup;
005c7661          this->gender = *(uint32_t*)ebx_5;
005c7666          void* edx_7 = (*(uint32_t*)arg2 + 4);
005c7669          *(uint32_t*)arg2 = edx_7;
005c766b          uint32_t gender = this->gender;
005c7672          this->eyesStrip = *(uint32_t*)edx_7;
005c7677          void* edx_10 = (*(uint32_t*)arg2 + 4);
005c767a          *(uint32_t*)arg2 = edx_10;
005c7680          this->noseStrip = *(uint32_t*)edx_10;
005c7687          int32_t eyesStrip = this->eyesStrip;
005c768a          void* edx_12 = (*(uint32_t*)arg2 + 4);
005c768d          *(uint32_t*)arg2 = edx_12;
005c7696          int32_t ebx_8 = (((heritageGroup + gender) + eyesStrip) + this->noseStrip);
005c769a          this->mouthStrip = *(uint32_t*)edx_12;
005c769f          void* edx_14 = (*(uint32_t*)arg2 + 4);
005c76a2          *(uint32_t*)arg2 = edx_14;
005c76a4          int32_t mouthStrip = this->mouthStrip;
005c76ab          this->hairColor = *(uint32_t*)edx_14;
005c76b0          void* edx_17 = (*(uint32_t*)arg2 + 4);
005c76b3          *(uint32_t*)arg2 = edx_17;
005c76b9          this->eyeColor = *(uint32_t*)edx_17;
005c76c0          int32_t hairColor = this->hairColor;
005c76c3          void* edx_19 = (*(uint32_t*)arg2 + 4);
005c76c6          *(uint32_t*)arg2 = edx_19;
005c76cf          int32_t ebx_11 = (((ebx_8 + mouthStrip) + hairColor) + this->eyeColor);
005c76d3          this->hairStyle = *(uint32_t*)edx_19;
005c76d8          void* edx_21 = (*(uint32_t*)arg2 + 4);
005c76db          *(uint32_t*)arg2 = edx_21;
005c76dd          int32_t hairStyle = this->hairStyle;
005c76e4          this->headgearStyle = *(uint32_t*)edx_21;
005c76e9          void* edx_24 = (*(uint32_t*)arg2 + 4);
005c76ec          *(uint32_t*)arg2 = edx_24;
005c76f2          this->headgearColor = *(uint32_t*)edx_24;
005c76f9          int32_t headgearStyle = this->headgearStyle;
005c76fc          void* eax_17 = (*(uint32_t*)arg2 + 4);
005c76ff          *(uint32_t*)arg2 = eax_17;
005c7705          this->shirtStyle = *(uint32_t*)eax_17;
005c770a          void* edx_26 = (*(uint32_t*)arg2 + 4);
005c770d          *(uint32_t*)arg2 = edx_26;
005c770f          int32_t shirtStyle = this->shirtStyle;
005c7716          this->shirtColor = *(uint32_t*)edx_26;
005c771b          void* eax_20 = (*(uint32_t*)arg2 + 4);
005c771e          *(uint32_t*)arg2 = eax_20;
005c7722          this->trousersStyle = *(uint32_t*)eax_20;
005c7727          void* edx_29 = (*(uint32_t*)arg2 + 4);
005c772a          *(uint32_t*)arg2 = edx_29;
005c7733          int32_t ebx_15 = ((((ebx_11 + hairStyle) + headgearStyle) + shirtStyle) + this->trousersStyle);
005c7737          this->trousersColor = *(uint32_t*)edx_29;
005c773c          void* eax_24 = (*(uint32_t*)arg2 + 4);
005c773f          *(uint32_t*)arg2 = eax_24;
005c7743          this->footwearStyle = *(uint32_t*)eax_24;
005c7748          void* edx_32 = (*(uint32_t*)arg2 + 4);
005c774b          *(uint32_t*)arg2 = edx_32;
005c774d          int32_t footwearStyle = this->footwearStyle;
005c7754          this->footwearColor = *(uint32_t*)edx_32;
005c7759          void* eax_28 = (*(uint32_t*)arg2 + 4);
005c775c          *(uint32_t*)arg2 = eax_28;
005c7762          this->skinShade = *(uint32_t*)eax_28;
005c7768          *(uint32_t*)((char*)this->skinShade)[4] = *(uint32_t*)((char*)eax_28 + 4);
005c776d          void* edx_35 = (*(uint32_t*)arg2 + 8);
005c7770          *(uint32_t*)arg2 = edx_35;
005c7776          this->hairShade = *(uint32_t*)edx_35;
005c777c          *(uint32_t*)((char*)this->hairShade)[4] = *(uint32_t*)((char*)edx_35 + 4);
005c7781          void* ecx_16 = (*(uint32_t*)arg2 + 8);
005c7784          *(uint32_t*)arg2 = ecx_16;
005c778a          this->headgearShade = *(uint32_t*)ecx_16;
005c7790          *(uint32_t*)((char*)this->headgearShade)[4] = *(uint32_t*)((char*)ecx_16 + 4);
005c7795          void* eax_32 = (*(uint32_t*)arg2 + 8);
005c7798          *(uint32_t*)arg2 = eax_32;
005c779c          this->shirtShade = *(uint32_t*)eax_32;
005c77a2          *(uint32_t*)((char*)this->shirtShade)[4] = *(uint32_t*)((char*)eax_32 + 4);
005c77a7          void* edx_40 = (*(uint32_t*)arg2 + 8);
005c77aa          *(uint32_t*)arg2 = edx_40;
005c77b0          this->trousersShade = *(uint32_t*)edx_40;
005c77b6          *(uint32_t*)((char*)this->trousersShade)[4] = *(uint32_t*)((char*)edx_40 + 4);
005c77bb          void* ecx_21 = (*(uint32_t*)arg2 + 8);
005c77be          *(uint32_t*)arg2 = ecx_21;
005c77c4          this->footwearShade = *(uint32_t*)ecx_21;
005c77ca          *(uint32_t*)((char*)this->footwearShade)[4] = *(uint32_t*)((char*)ecx_21 + 4);
005c77cf          void* eax_36 = (*(uint32_t*)arg2 + 8);
005c77d2          *(uint32_t*)arg2 = eax_36;
005c77d6          this->templateNum = *(uint32_t*)eax_36;
005c77db          void* edx_44 = (*(uint32_t*)arg2 + 4);
005c77de          *(uint32_t*)arg2 = edx_44;
005c77e5          int32_t ebx_17 = ((ebx_15 + footwearStyle) + this->templateNum);
005c77e9          this->strength = *(uint32_t*)edx_44;
005c77ee          void* edx_46 = (*(uint32_t*)arg2 + 4);
005c77f1          *(uint32_t*)arg2 = edx_46;
005c77f3          int32_t strength = this->strength;
005c77fa          this->endurance = *(uint32_t*)edx_46;
005c7802          void* edx_49 = (*(uint32_t*)arg2 + 4);
005c7805          *(uint32_t*)arg2 = edx_49;
005c780b          this->coordination = *(uint32_t*)edx_49;
005c7815          int32_t endurance = this->endurance;
005c781b          void* edx_51 = (*(uint32_t*)arg2 + 4);
005c781e          *(uint32_t*)arg2 = edx_51;
005c782a          int32_t ebx_20 = (((ebx_17 + strength) + endurance) + this->coordination);
005c782e          this->quickness = *(uint32_t*)edx_51;
005c7836          void* edx_53 = (*(uint32_t*)arg2 + 4);
005c7839          *(uint32_t*)arg2 = edx_53;
005c783b          int32_t quickness = this->quickness;
005c7845          this->focus = *(uint32_t*)edx_53;
005c784d          void* edx_56 = (*(uint32_t*)arg2 + 4);
005c7850          *(uint32_t*)arg2 = edx_56;
005c7856          this->self = *(uint32_t*)edx_56;
005c7860          int32_t focus = this->focus;
005c7866          void* edx_58 = (*(uint32_t*)arg2 + 4);
005c7869          *(uint32_t*)arg2 = edx_58;
005c7875          int32_t ebx_23 = (((ebx_20 + quickness) + focus) + this->self);
005c7879          this->slot = *(uint32_t*)edx_58;
005c7881          void* eax_48 = (*(uint32_t*)arg2 + 4);
005c7884          *(uint32_t*)arg2 = eax_48;
005c7886          class IDClass<_tagDataID,32,0> ecx_29 = *(uint32_t*)eax_48;
005c788b          *(uint32_t*)arg2 = ((char*)eax_48 + 4);
005c788d          this->classID.id = ecx_29;
005c7897          this->numSkills = **(uint32_t**)arg2;
005c789d          *(uint32_t*)arg2 += 4;
005c78a0          enum SKILL_ADVANCEMENT_CLASS* skillAdvancementClasses = this->skillAdvancementClasses;
005c78a0          
005c78a8          if (skillAdvancementClasses != 0)
005c78a8          {
005c78ab              operator delete[](skillAdvancementClasses);
005c78b3              this->skillAdvancementClasses = nullptr;
005c78a8          }
005c78a8          
005c78c2          void* eax_52 = (arg3 - *(uint32_t*)arg2);
005c78c4          int32_t numSkills = this->numSkills;
005c78cc          var_14 = eax_52;
005c78cc          
005c78d0          if (numSkills > 0)
005c78d0          {
005c78d6              void* eax_53 = operator new[]((numSkills << 2));
005c78db              int32_t numSkills_1 = this->numSkills;
005c78e1              this->skillAdvancementClasses = eax_53;
005c78ea              int32_t i = 0;
005c78ea              
005c78ee              if (numSkills_1 > 0)
005c78ee              {
005c7923                  do
005c7923                  {
005c78f5                      if (var_14 < 4)
005c79a5                          return 0;
005c79a5                      
005c78ff                      this->skillAdvancementClasses[i] = **(uint32_t**)arg2;
005c790e                      void* ecx_34 = ((char*)var_14 - 4);
005c7914                      *(uint32_t*)arg2 += 4;
005c7916                      var_14 = ecx_34;
005c7920                      i += 1;
005c7923                  } while (i < this->numSkills);
005c78ee              }
005c78ee              
005c7925              eax_52 = var_14;
005c78d0          }
005c78d0          
005c7938          if (AC1Legacy::PStringBase<char>::UnPack(&this->name, arg2, eax_52) != 0)
005c7938          {
005c793a              void* ecx_37 = *(uint32_t*)arg2;
005c793f              int32_t eax_56 = (arg3 - ecx_37);
005c793f              
005c7944              if (eax_56 >= 4)
005c7944              {
005c7948                  this->startArea = *(uint32_t*)ecx_37;
005c7950                  void* ecx_40 = (*(uint32_t*)arg2 + 4);
005c7959                  *(uint32_t*)arg2 = ecx_40;
005c7959                  
005c795b                  if ((eax_56 - 4) >= 4)
005c795b                  {
005c795f                      this->isAdmin = *(uint32_t*)ecx_40;
005c7967                      void* ecx_42 = (*(uint32_t*)arg2 + 4);
005c7970                      *(uint32_t*)arg2 = ecx_42;
005c7970                      
005c7972                      if ((eax_56 - 8) >= 4)
005c7972                      {
005c7976                          this->isEnvoy = *(uint32_t*)ecx_42;
005c797c                          *(uint32_t*)arg2 += 4;
005c7987                          var_14 = (eax_56 - 0xc);
005c7991                          eax_2 = PackObj::UNPACK_TYPE(&var_c, arg2, &var_14);
005c7991                          
005c799b                          if (eax_2 != 0)
005c799b                          {
005c79ac                              if (var_c == ebx_23)
005c79cc                                  return (((eax_2 - eax_2) + 1) & var_10);
005c79cc                              
005c79ae                              var_10 = nullptr;
005c79cc                              return (((eax_2 - eax_2) + 1) & var_10);
005c799b                          }
005c7972                      }
005c795b                  }
005c7944              }
005c7938          }
005c761f      }
005c761f      
005c79a5      return 0;
005c75d0  }

005c79cf                                               90                                                                 .

005c79d0  int32_t __thiscall ACCharGenResult::UnPack(class ACCharGenResult* this, void** arg2, uint32_t arg3)

005c79d0  {
005c79dc      int32_t eax_2 = ACCharGenResult::CG_UnPack(this, arg2, (*(uint32_t*)arg2 + arg3));
005c79e1      int32_t eax_3 = -(eax_2);
005c79e7      return -((eax_3 - eax_3));
005c79d0  }

005c79ea                                90 90 90 90 90 90                                                            ......

005c79f0  int32_t ACCharGenResult::VerifyCharacterGenerationResult(class ACCharGenResult const* arg1, int32_t const arg2)

005c79f0  {
005c79f9      int32_t __saved_esi = 0x10000002;
005c79fe      int32_t var_1f0 = 2;
005c7a00      int32_t var_1f4 = 0xe;
005c7a02      int32_t eax;
005c7a02      uint32_t ecx;
005c7a02      int32_t edx;
005c7a02      class DBObj* result = DBObj::GetByEnum(eax, edx, ecx);
005c7a0e      class DBObj* result_1 = result;
005c7a0e      
005c7a12      if (result == 0)
005c7a1d          return result;
005c7a1d      
005c7a26      uint32_t heritageGroup = arg1->heritageGroup;
005c7a26      
005c7a37      if ((heritageGroup <= 0 || heritageGroup > *(int32_t*)((char*)result + 0xac)))
005c7a37      {
005c80be          result->vtable->Release();
005c80d1          return 0;
005c7a37      }
005c7a37      
005c7a48      void __return_2;
005c7a48      ACCharGenData::GetHG(result, &__return_2, heritageGroup);
005c7a48      
005c7a5c      if ((arg1->heritageGroup != 4 || arg2 != 0))
005c7a5c      {
005c7a62          uint32_t gender = arg1->gender;
005c7a62          
005c7a6d          if ((gender == 1 || gender == 2))
005c7a6d          {
005c7a80              void __return_1;
005c7a80              HeritageGroup_CG::GetSX(&__return_2, &__return_1, gender);
005c7a85              int32_t eyesStrip = arg1->eyesStrip;
005c7a97              int32_t var_150;
005c7a97              
005c7a97              if ((eyesStrip >= var_150 || eyesStrip < 0))
005c7a97              {
005c8099                  Sex_CG::~Sex_CG(&__return_1);
005c80a5                  HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
005c80aa                  result->vtable->Release();
005c80bd                  return 0;
005c7a97              }
005c7a97              
005c7a9d              int32_t noseStrip = arg1->noseStrip;
005c7aaf              int32_t var_144;
005c7aaf              
005c7aaf              if ((noseStrip < var_144 && noseStrip >= 0))
005c7aaf              {
005c7ab5                  int32_t mouthStrip = arg1->mouthStrip;
005c7ac7                  int32_t var_138;
005c7ac7                  
005c7ac7                  if ((mouthStrip < var_138 && mouthStrip >= 0))
005c7ac7                  {
005c7acd                      int32_t hairColor = arg1->hairColor;
005c7adc                      int32_t var_174;
005c7adc                      
005c7adc                      if ((hairColor < var_174 && hairColor >= 0))
005c7adc                      {
005c7ae2                          int32_t eyeColor = arg1->eyeColor;
005c7af4                          int32_t var_15c;
005c7af4                          
005c7af4                          if ((eyeColor < var_15c && eyeColor >= 0))
005c7af4                          {
005c7afa                              int32_t hairStyle = arg1->hairStyle;
005c7b0c                              int32_t var_168;
005c7b0c                              
005c7b0c                              if ((hairStyle < var_168 && hairStyle >= 0))
005c7b0c                              {
005c7b12                                  int32_t headgearStyle = arg1->headgearStyle;
005c7b25                                  int32_t var_12c;
005c7b25                                  
005c7b25                                  if ((headgearStyle < var_12c && headgearStyle >= 0xffffffff))
005c7b25                                  {
005c7b2b                                      if (headgearStyle <= 0xffffffff)
005c7b2b                                      {
005c7b5f                                      label_5c7b5f:
005c7b5f                                          int32_t shirtStyle = arg1->shirtStyle;
005c7b71                                          int32_t var_120;
005c7b71                                          
005c7b71                                          if ((shirtStyle < var_120 && shirtStyle >= 0))
005c7b71                                          {
005c7b86                                              int32_t var_128;
005c7b86                                              class ClothingTable* eax_8 = ClothingTable::Get(*(uint32_t*)(((shirtStyle << 4) + var_128) + 8));
005c7b86                                              
005c7b90                                              if ((eax_8 != 0 && ClothingTable::GetCloPaletteTemplate(eax_8, arg1->shirtColor) != 0))
005c7b90                                              {
005c7ba9                                                  int32_t trousersStyle = arg1->trousersStyle;
005c7bbb                                                  int32_t var_114;
005c7bbb                                                  
005c7bbb                                                  if ((trousersStyle < var_114 && trousersStyle >= 0))
005c7bbb                                                  {
005c7bd0                                                      int32_t var_11c;
005c7bd0                                                      class ClothingTable* eax_12 = ClothingTable::Get(*(uint32_t*)(((trousersStyle << 4) + var_11c) + 8));
005c7bd0                                                      
005c7bda                                                      if ((eax_12 != 0 && ClothingTable::GetCloPaletteTemplate(eax_12, arg1->trousersColor) != 0))
005c7bda                                                      {
005c7bf3                                                          int32_t footwearStyle = arg1->footwearStyle;
005c7c05                                                          int32_t var_108;
005c7c05                                                          
005c7c05                                                          if ((footwearStyle < var_108 && footwearStyle >= 0))
005c7c05                                                          {
005c7c1a                                                              int32_t var_110;
005c7c1a                                                              class ClothingTable* eax_16 = ClothingTable::Get(*(uint32_t*)(((footwearStyle << 4) + var_110) + 8));
005c7c1a                                                              
005c7c24                                                              if ((eax_16 != 0 && ClothingTable::GetCloPaletteTemplate(eax_16, arg1->footwearColor) != 0))
005c7c24                                                              {
005c7c3d                                                                  long double x87_r7_1 = ((long double)arg1->skinShade);
005c7c40                                                                  long double temp0_1 = ((long double)1.0);
005c7c40                                                                  (x87_r7_1 - temp0_1);
005c7c46                                                                  class CloPaletteTemplate* eax_17;
005c7c46                                                                  eax_17 = ((((x87_r7_1 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp0_1) ? 1 : 0) << 0xe) | 0))));
005c7c46                                                                  
005c7c4b                                                                  if ((*(uint8_t*)((char*)eax_17)[1] & 0x41) != 0)
005c7c4b                                                                  {
005c7c51                                                                      long double x87_r7_2 = ((long double)arg1->skinShade);
005c7c54                                                                      long double temp1_1 = ((long double)0.0);
005c7c54                                                                      (x87_r7_2 - temp1_1);
005c7c5a                                                                      eax_17 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005c7c5c                                                                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005c7c5c                                                                      
005c7c5f                                                                      if (p_1)
005c7c5f                                                                      {
005c7c65                                                                          long double x87_r7_3 = ((long double)arg1->hairShade);
005c7c68                                                                          long double temp2_1 = ((long double)1.0);
005c7c68                                                                          (x87_r7_3 - temp2_1);
005c7c6e                                                                          eax_17 = ((((x87_r7_3 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005c7c6e                                                                          
005c7c73                                                                          if ((*(uint8_t*)((char*)eax_17)[1] & 0x41) != 0)
005c7c73                                                                          {
005c7c79                                                                              long double x87_r7_4 = ((long double)arg1->hairShade);
005c7c7c                                                                              long double temp3_1 = ((long double)0.0);
005c7c7c                                                                              (x87_r7_4 - temp3_1);
005c7c82                                                                              eax_17 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005c7c84                                                                              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005c7c84                                                                              
005c7c87                                                                              if (p_2)
005c7c87                                                                              {
005c7c8d                                                                                  long double x87_r7_5 = ((long double)arg1->headgearShade);
005c7c90                                                                                  long double temp4_1 = ((long double)1.0);
005c7c90                                                                                  (x87_r7_5 - temp4_1);
005c7c96                                                                                  eax_17 = ((((x87_r7_5 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005c7c96                                                                                  
005c7c9b                                                                                  if ((*(uint8_t*)((char*)eax_17)[1] & 0x41) != 0)
005c7c9b                                                                                  {
005c7ca1                                                                                      long double x87_r7_6 = ((long double)arg1->headgearShade);
005c7ca4                                                                                      long double temp5_1 = ((long double)0.0);
005c7ca4                                                                                      (x87_r7_6 - temp5_1);
005c7caa                                                                                      eax_17 = ((((x87_r7_6 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp5_1) ? 1 : 0) << 0xe) | 0))));
005c7cac                                                                                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005c7cac                                                                                      
005c7caf                                                                                      if (p_3)
005c7caf                                                                                      {
005c7cb5                                                                                          long double x87_r7_7 = ((long double)arg1->shirtShade);
005c7cb8                                                                                          long double temp6_1 = ((long double)1.0);
005c7cb8                                                                                          (x87_r7_7 - temp6_1);
005c7cbe                                                                                          eax_17 = ((((x87_r7_7 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp6_1) ? 1 : 0) << 0xe) | 0))));
005c7cbe                                                                                          
005c7cc3                                                                                          if ((*(uint8_t*)((char*)eax_17)[1] & 0x41) != 0)
005c7cc3                                                                                          {
005c7cc9                                                                                              long double x87_r7_8 = ((long double)arg1->shirtShade);
005c7ccc                                                                                              long double temp7_1 = ((long double)0.0);
005c7ccc                                                                                              (x87_r7_8 - temp7_1);
005c7cd2                                                                                              eax_17 = ((((x87_r7_8 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp7_1) ? 1 : 0) << 0xe) | 0))));
005c7cd4                                                                                              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005c7cd4                                                                                              
005c7cd7                                                                                              if (p_4)
005c7cd7                                                                                              {
005c7cdd                                                                                                  long double x87_r7_9 = ((long double)arg1->trousersShade);
005c7ce0                                                                                                  long double temp8_1 = ((long double)1.0);
005c7ce0                                                                                                  (x87_r7_9 - temp8_1);
005c7ce6                                                                                                  eax_17 = ((((x87_r7_9 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp8_1) ? 1 : 0) << 0xe) | 0))));
005c7ce6                                                                                                  
005c7ceb                                                                                                  if ((*(uint8_t*)((char*)eax_17)[1] & 0x41) != 0)
005c7ceb                                                                                                  {
005c7cf1                                                                                                      long double x87_r7_10 = ((long double)arg1->trousersShade);
005c7cf4                                                                                                      long double temp9_1 = ((long double)0.0);
005c7cf4                                                                                                      (x87_r7_10 - temp9_1);
005c7cfa                                                                                                      eax_17 = ((((x87_r7_10 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp9_1) ? 1 : 0) << 0xe) | 0))));
005c7cfc                                                                                                      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005c7cfc                                                                                                      
005c7cff                                                                                                      if (p_5)
005c7cff                                                                                                      {
005c7d05                                                                                                          long double x87_r7_11 = ((long double)arg1->footwearShade);
005c7d08                                                                                                          long double temp10_1 = ((long double)1.0);
005c7d08                                                                                                          (x87_r7_11 - temp10_1);
005c7d0e                                                                                                          eax_17 = ((((x87_r7_11 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp10_1) ? 1 : 0) << 0xe) | 0))));
005c7d0e                                                                                                          
005c7d13                                                                                                          if ((*(uint8_t*)((char*)eax_17)[1] & 0x41) != 0)
005c7d13                                                                                                          {
005c7d19                                                                                                              long double x87_r7_12 = ((long double)arg1->footwearShade);
005c7d1c                                                                                                              long double temp11_1 = ((long double)0.0);
005c7d1c                                                                                                              (x87_r7_12 - temp11_1);
005c7d22                                                                                                              eax_17 = ((((x87_r7_12 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp11_1) ? 1 : 0) << 0xe) | 0))));
005c7d24                                                                                                              bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
005c7d24                                                                                                              
005c7d27                                                                                                              if (p_6)
005c7d27                                                                                                              {
005c7d2d                                                                                                                  int32_t strength = arg1->strength;
005c7d2d                                                                                                                  
005c7d3c                                                                                                                  if ((strength >= 0xa && strength <= 0x64))
005c7d3c                                                                                                                  {
005c7d42                                                                                                                      int32_t endurance = arg1->endurance;
005c7d42                                                                                                                      
005c7d54                                                                                                                      if ((endurance >= 0xa && endurance <= 0x64))
005c7d54                                                                                                                      {
005c7d5a                                                                                                                          int32_t coordination = arg1->coordination;
005c7d5a                                                                                                                          
005c7d6c                                                                                                                          if ((coordination >= 0xa && coordination <= 0x64))
005c7d6c                                                                                                                          {
005c7d72                                                                                                                              int32_t quickness = arg1->quickness;
005c7d72                                                                                                                              
005c7d84                                                                                                                              if ((quickness >= 0xa && quickness <= 0x64))
005c7d84                                                                                                                              {
005c7d8a                                                                                                                                  int32_t focus = arg1->focus;
005c7d8a                                                                                                                                  
005c7d9c                                                                                                                                  if ((focus >= 0xa && focus <= 0x64))
005c7d9c                                                                                                                                  {
005c7da2                                                                                                                                      int32_t self = arg1->self;
005c7dcd                                                                                                                                      int32_t var_e4;
005c7dcd                                                                                                                                      
005c7dcd                                                                                                                                      if ((self >= 0xa && (self <= 0x64 && (((((quickness + coordination) + endurance) + strength) + self) + focus) <= var_e4)))
005c7dcd                                                                                                                                      {
005c7ddc                                                                                                                                          class DBObj* eax_19 = DBCache::GetFromEnumStatic(4, 2, 0x10000004);
005c7ddc                                                                                                                                          
005c7de8                                                                                                                                          if (eax_19 != 0)
005c7de8                                                                                                                                          {
005c7dee                                                                                                                                              int32_t numSkills = arg1->numSkills;
005c7df4                                                                                                                                              int32_t ebx_1 = 0;
005c7df6                                                                                                                                              int32_t ecx_11 = 0;
005c7df6                                                                                                                                              
005c7dfa                                                                                                                                              if (numSkills > 0)
005c7dfa                                                                                                                                              {
005c7dfc                                                                                                                                                  enum SKILL_ADVANCEMENT_CLASS* skillAdvancementClasses = arg1->skillAdvancementClasses;
005c7dfc                                                                                                                                                  
005c7e16                                                                                                                                                  do
005c7e16                                                                                                                                                  {
005c7e02                                                                                                                                                      enum SKILL_ADVANCEMENT_CLASS eax_20 = *(uint32_t*)skillAdvancementClasses;
005c7e02                                                                                                                                                      
005c7e06                                                                                                                                                      if (eax_20 != UNDEF_SKILL_ADVANCEMENT_CLASS)
005c7e06                                                                                                                                                      {
005c7e0d                                                                                                                                                          if ((eax_20 <= UNDEF_SKILL_ADVANCEMENT_CLASS || eax_20 > SPECIALIZED_SKILL_ADVANCEMENT_CLASS))
005c7e0d                                                                                                                                                          {
005c7e55                                                                                                                                                              eax_19->vtable->Release();
005c7e5d                                                                                                                                                              goto label_5c7e93;
005c7e0d                                                                                                                                                          }
005c7e0d                                                                                                                                                          
005c7e0f                                                                                                                                                          ebx_1 += 1;
005c7e06                                                                                                                                                      }
005c7e06                                                                                                                                                      
005c7e10                                                                                                                                                      ecx_11 += 1;
005c7e11                                                                                                                                                      skillAdvancementClasses = &skillAdvancementClasses[1];
005c7e16                                                                                                                                                  } while (ecx_11 < numSkills);
005c7dfa                                                                                                                                              }
005c7dfa                                                                                                                                              
005c7e1b                                                                                                                                              int32_t ebx_2;
005c7e1b                                                                                                                                              
005c7e1b                                                                                                                                              if (ebx_1 == *(int32_t*)((char*)eax_19 + 0x48))
005c7e1b                                                                                                                                              {
005c7e1d                                                                                                                                                  ebx_2 = 0;
005c7e1f                                                                                                                                                  int32_t i = 0;
005c7e1f                                                                                                                                                  
005c7e23                                                                                                                                                  if (numSkills > 0)
005c7e23                                                                                                                                                  {
005c7e7c                                                                                                                                                      do
005c7e7c                                                                                                                                                      {
005c7e36                                                                                                                                                          int32_t eax_21 = arg1->skillAdvancementClasses[i];
005c7e36                                                                                                                                                          
005c7e3c                                                                                                                                                          if (eax_21 == 2)
005c7e71                                                                                                                                                              ebx_2 += ACCharGenData::GetSkillTrainedCost(result_1, i, arg1->heritageGroup, arg1->gender);
005c7e3c                                                                                                                                                          else if (eax_21 == 3)
005c7e71                                                                                                                                                              ebx_2 += ACCharGenData::GetSkillSpecializedCost(result_1, i, arg1->heritageGroup, arg1->gender);
005c7e71                                                                                                                                                          
005c7e79                                                                                                                                                          i += 1;
005c7e7c                                                                                                                                                      } while (i < arg1->numSkills);
005c7e23                                                                                                                                                  }
005c7e1b                                                                                                                                              }
005c7e1b                                                                                                                                              
005c7e85                                                                                                                                              int32_t var_e0;
005c7e85                                                                                                                                              
005c7e85                                                                                                                                              if ((ebx_1 == *(int32_t*)((char*)eax_19 + 0x48) && (numSkills <= 0 || ebx_2 <= var_e0)))
005c7e85                                                                                                                                              {
005c7eba                                                                                                                                                  eax_19->vtable->Release();
005c7ec2                                                                                                                                                  class AC1Legacy::PSRefBuffer<char>* m_buffer = arg1->name.m_buffer;
005c7ec8                                                                                                                                                  uint32_t m_len = m_buffer->m_len;
005c7ec8                                                                                                                                                  
005c7ed1                                                                                                                                                  if ((m_len != 1 && (m_len - 1) <= 0x20))
005c7ed1                                                                                                                                                  {
005c7ed3                                                                                                                                                      char (* eax_29)[0x1] = &m_buffer->m_data;
005c7edd                                                                                                                                                      void var_24;
005c7edd                                                                                                                                                      int32_t edx_14 = (&var_24 - eax_29);
005c7ee8                                                                                                                                                      int32_t ecx_22;
005c7ee8                                                                                                                                                      
005c7ee8                                                                                                                                                      do
005c7ee8                                                                                                                                                      {
005c7ee0                                                                                                                                                          ecx_22 = ADJ(eax_29)->m_data;
005c7ee2                                                                                                                                                          eax_29[edx_14] = ecx_22;
005c7ee5                                                                                                                                                          eax_29 = &eax_29[1];
005c7ee8                                                                                                                                                      } while (ecx_22 != 0);
005c7ef2                                                                                                                                                      ACCharGenData::FormatName(&var_24);
005c7f00                                                                                                                                                      char (* eax_31)[0x1] = &arg1->name.m_buffer->m_data;
005c7f03                                                                                                                                                      void* edi_1 = &var_24;
005c7f10                                                                                                                                                      int32_t eax_33;
005c7f10                                                                                                                                                      char m_data[0x1];
005c7f10                                                                                                                                                      
005c7f10                                                                                                                                                      while (true)
005c7f10                                                                                                                                                      {
005c7f10                                                                                                                                                          char edx_15 = *(uint8_t*)edi_1;
005c7f12                                                                                                                                                          m_data = ADJ(eax_31)->m_data;
005c7f16                                                                                                                                                          bool c_1 = edx_15 < m_data;
005c7f16                                                                                                                                                          
005c7f18                                                                                                                                                          if (edx_15 == m_data)
005c7f18                                                                                                                                                          {
005c7f1c                                                                                                                                                              if (edx_15 == 0)
005c7f1c                                                                                                                                                              {
005c7f34                                                                                                                                                                  eax_33 = 0;
005c7f36                                                                                                                                                                  break;
005c7f1c                                                                                                                                                              }
005c7f1c                                                                                                                                                              
005c7f1e                                                                                                                                                              edx_15 = *(uint8_t*)((char*)edi_1 + 1);
005c7f21                                                                                                                                                              m_data = *(int8_t*)((char*)ADJ(eax_31) + 0x15);
005c7f26                                                                                                                                                              c_1 = edx_15 < m_data;
005c7f26                                                                                                                                                              
005c7f28                                                                                                                                                              if (edx_15 == m_data)
005c7f28                                                                                                                                                              {
005c7f2a                                                                                                                                                                  edi_1 += 2;
005c7f2d                                                                                                                                                                  eax_31 = &eax_31[2];
005c7f2d                                                                                                                                                                  
005c7f32                                                                                                                                                                  if (edx_15 != 0)
005c7f32                                                                                                                                                                      continue;
005c7f32                                                                                                                                                                  
005c7f34                                                                                                                                                                  eax_33 = 0;
005c7f36                                                                                                                                                                  break;
005c7f28                                                                                                                                                              }
005c7f18                                                                                                                                                          }
005c7f18                                                                                                                                                          
005c7f38                                                                                                                                                          bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
005c7f3a                                                                                                                                                          eax_33 = ((eax_31 - eax_31) + 1);
005c7f3a                                                                                                                                                          break;
005c7f10                                                                                                                                                      }
005c7f10                                                                                                                                                      
005c7f3f                                                                                                                                                      if (eax_33 == 0)
005c7f3f                                                                                                                                                      {
005c7f45                                                                                                                                                          int32_t templateNum = arg1->templateNum;
005c7f5c                                                                                                                                                          int32_t var_b0;
005c7f5c                                                                                                                                                          
005c7f5c                                                                                                                                                          if ((templateNum < var_b0 && (templateNum >= 0 || templateNum == 0xffffffff)))
005c7f5c                                                                                                                                                          {
005c7f62                                                                                                                                                              class DBObj* result_2 = result_1;
005c7f62                                                                                                                                                              
005c7f6f                                                                                                                                                              if (arg1->startArea < *(int32_t*)((char*)result_2 + 0x38))
005c7f6f                                                                                                                                                              {
005c7f7e                                                                                                                                                                  void __return;
005c7f7e                                                                                                                                                                  PStringBase<char>::PStringBase<char>(&__return, "Sanamar");
005c7f7e                                                                                                                                                                  
005c7faa                                                                                                                                                                  if ((PStringBase<char>::operator==(((*(int32_t*)((char*)result_2 + 0x30) + (arg1->startArea * 0x14)) + 4), &__return) == 0 || arg2 != 0))
005c7fb0                                                                                                                                                                      m_data = 0;
005c7faa                                                                                                                                                                  else
005c7fac                                                                                                                                                                      m_data = 1;
005c7fac                                                                                                                                                                  
005c7fb6                                                                                                                                                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005c7fb6                                                                                                                                                                  
005c7fbd                                                                                                                                                                  if (m_data == 0)
005c7fbd                                                                                                                                                                  {
005c7fc7                                                                                                                                                                      int32_t eax_39 = arg1->vtable->IsEnvoy();
005c7fcc                                                                                                                                                                      int32_t eax_41;
005c7fcc                                                                                                                                                                      
005c7fcc                                                                                                                                                                      if (eax_39 != 0)
005c7fd2                                                                                                                                                                          eax_41 = arg1->vtable->IsAdmin();
005c7fd2                                                                                                                                                                      
005c7fd7                                                                                                                                                                      if ((eax_39 == 0 || eax_41 != 0))
005c7fd7                                                                                                                                                                      {
005c7fe6                                                                                                                                                                          if (arg1->vtable->IsAdmin() == 0)
005c7fe6                                                                                                                                                                          {
005c806b                                                                                                                                                                          label_5c806b:
005c806b                                                                                                                                                                              Sex_CG::~Sex_CG(&__return_1);
005c8077                                                                                                                                                                              HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
005c8080                                                                                                                                                                              MasterPropertyGrabber::~MasterPropertyGrabber(&result_1);
005c8094                                                                                                                                                                              return 1;
005c7fe6                                                                                                                                                                          }
005c7fe6                                                                                                                                                                          
005c7ff7                                                                                                                                                                          uint32_t id = WClassIDToDataID(&__return, 0x10000004)->id;
005c800d                                                                                                                                                                          void var_2c;
005c800d                                                                                                                                                                          
005c800d                                                                                                                                                                          if (*(uint32_t*)arg1->vtable->GetClassID(&var_2c) == id)
005c800d                                                                                                                                                                              goto label_5c806b;
005c800d                                                                                                                                                                          
005c8021                                                                                                                                                                          void __return_4;
005c8021                                                                                                                                                                          uint32_t id_1 = WClassIDToDataID(&__return_4, 0x10000092)->id;
005c8037                                                                                                                                                                          void var_38;
005c8037                                                                                                                                                                          
005c8037                                                                                                                                                                          if (*(uint32_t*)arg1->vtable->GetClassID(&var_38) == id_1)
005c8037                                                                                                                                                                              goto label_5c806b;
005c8037                                                                                                                                                                          
005c804b                                                                                                                                                                          void __return_3;
005c804b                                                                                                                                                                          uint32_t id_2 = WClassIDToDataID(&__return_3, 0x10000093)->id;
005c8061                                                                                                                                                                          void var_34;
005c8061                                                                                                                                                                          
005c8061                                                                                                                                                                          if (*(uint32_t*)arg1->vtable->GetClassID(&var_34) == id_2)
005c8061                                                                                                                                                                              goto label_5c806b;
005c7fd7                                                                                                                                                                      }
005c7fbd                                                                                                                                                                  }
005c7f6f                                                                                                                                                              }
005c7f5c                                                                                                                                                          }
005c7f3f                                                                                                                                                      }
005c7ed1                                                                                                                                                  }
005c7e85                                                                                                                                              }
005c7e85                                                                                                                                              else
005c7e87                                                                                                                                                  eax_19->vtable->Release();
005c7de8                                                                                                                                          }
005c7dcd                                                                                                                                      }
005c7d9c                                                                                                                                  }
005c7d84                                                                                                                              }
005c7d6c                                                                                                                          }
005c7d54                                                                                                                      }
005c7d3c                                                                                                                  }
005c7d27                                                                                                              }
005c7d13                                                                                                          }
005c7cff                                                                                                      }
005c7ceb                                                                                                  }
005c7cd7                                                                                              }
005c7cc3                                                                                          }
005c7caf                                                                                      }
005c7c9b                                                                                  }
005c7c87                                                                              }
005c7c73                                                                          }
005c7c5f                                                                      }
005c7c4b                                                                  }
005c7c24                                                              }
005c7c05                                                          }
005c7bda                                                      }
005c7bbb                                                  }
005c7b90                                              }
005c7b71                                          }
005c7b2b                                      }
005c7b2b                                      else
005c7b2b                                      {
005c7b3c                                          int32_t var_134;
005c7b3c                                          class ClothingTable* eax_4 = ClothingTable::Get(*(uint32_t*)(((headgearStyle << 4) + var_134) + 8));
005c7b3c                                          
005c7b46                                          if ((eax_4 != 0 && ClothingTable::GetCloPaletteTemplate(eax_4, arg1->headgearColor) != 0))
005c7b59                                              goto label_5c7b5f;
005c7b2b                                      }
005c7b25                                  }
005c7b0c                              }
005c7af4                          }
005c7adc                      }
005c7ac7                  }
005c7aaf              }
005c7aaf              
005c7e93          label_5c7e93:
005c7e93              Sex_CG::~Sex_CG(&__return_1);
005c7a6d          }
005c7a5c      }
005c7a5c      
005c7e9f      HeritageGroup_CG::~HeritageGroup_CG(&__return_2);
005c7ea8      MasterPropertyGrabber::~MasterPropertyGrabber(&result_1);
005c7eb9      return 0;
005c79f0  }

005c80d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005c80e0  int32_t __thiscall ACCharGenResult::VerifyCharacterGenerationResult(class ACCharGenResult* this, int32_t const arg2)

005c80e0  {
005c80ee      return ACCharGenResult::VerifyCharacterGenerationResult(this, arg2);
005c80e0  }

005c80f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005c8100  int32_t ExperienceSystem::ItemLevelToTotalXP(int32_t arg1, uint64_t arg2, int32_t arg3, int32_t arg4)

005c8100  {
005c8101      int32_t ebp = arg1;
005c8107      int32_t result = 0;
005c8107      
005c810e      if (ebp < 1)
005c8117          return 0;
005c8117      
005c811e      if (ebp > arg3)
005c8120          ebp = arg3;
005c8120      
005c8129      if (arg4 == 1)
005c8129      {
005c812f          int32_t __saved_ebx = *(uint32_t*)((char*)arg2)[4];
005c8136          int32_t eax_4;
005c8136          int32_t edx_2;
005c8136          edx_2 = HIGHD(((int64_t)ebp));
005c8136          eax_4 = LOWD(((int64_t)ebp));
005c8137          int32_t var_14_1 = arg2;
005c8138          int32_t var_18_1 = edx_2;
005c8139          int32_t var_1c_1 = eax_4;
005c8146          return _allmul();
005c8129      }
005c8129      
005c814b      int32_t edi;
005c814b      
005c814b      if (arg4 == 2)
005c814b      {
005c8150          int32_t result_1 = arg2;
005c8154          int32_t edx_3 = *(uint32_t*)((char*)arg2)[4];
005c8158          result = result_1;
005c815a          edi = edx_3;
005c815a          
005c815c          if (ebp > 1)
005c815c          {
005c815e              int32_t i_2 = (ebp - 1);
005c8171              int32_t i;
005c8171              
005c8171              do
005c8171              {
005c8161                  int32_t var_14_2 = 0;
005c8163                  int32_t var_18_2 = 2;
005c8165                  int32_t var_1c_2 = edx_3;
005c8166                  int32_t result_5 = result_1;
005c8167                  result_1 = _allmul();
005c816c                  int32_t result_3 = result;
005c816c                  result += result_1;
005c816e                  edi = (edi + edx_3);
005c8170                  i = i_2;
005c8170                  i_2 -= 1;
005c8171              } while (i != 1);
005c815c          }
005c814b      }
005c814b      else if (arg4 == 3)
005c817f      {
005c8184          int32_t result_2 = arg2;
005c8188          int32_t ebx_1 = *(uint32_t*)((char*)arg2)[4];
005c818c          result = result_2;
005c818e          edi = ebx_1;
005c8190          int32_t result_6 = result_2;
005c8192          int32_t ecx_3 = ebx_1;
005c8192          
005c8194          if (ebp > 1)
005c8194          {
005c8196              int32_t i_3 = (ebp - 1);
005c81a0              int32_t i_1;
005c81a0              
005c81a0              do
005c81a0              {
005c8197                  int32_t result_7 = result_6;
005c8197                  result_6 += result_2;
005c8199                  ecx_3 = (ecx_3 + ebx_1);
005c819b                  int32_t result_4 = result;
005c819b                  result += result_6;
005c819d                  edi = (edi + ecx_3);
005c819f                  i_1 = i_3;
005c819f                  i_3 -= 1;
005c81a0              } while (i_1 != 1);
005c8194          }
005c817f      }
005c81aa      return result;
005c8100  }

005c81ab                                   90 90 90 90 90                                                             .....

005c81b0  int32_t ExperienceSystem::ItemTotalXPToLevel(uint64_t arg1, uint64_t arg2, int32_t arg3, int32_t arg4)

005c81b0  {
005c81b8      int32_t esi = 0;
005c81b8      
005c81bd      if (arg4 == 1)
005c81bd      {
005c81c3          int32_t eax = *(uint32_t*)((char*)arg1)[4];
005c81d6          int32_t var_4_1 = (eax & 0x7fffffff);
005c81de          int32_t eax_2 = *(uint32_t*)((char*)arg2)[4];
005c81e8          int32_t var_4_2 = (eax & 0x80000000);
005c8201          int32_t var_4_3 = (eax_2 & 0x7fffffff);
005c8211          int32_t var_4_4 = (eax_2 & 0x80000000);
005c8226          int32_t __saved_ebp;
005c8226          __saved_ebp = ((double)((((long double)arg1) + -(((long double)0))) / (((long double)arg2) + -(((long double)0)))));
005c8229          floor(__saved_ebp);
005c8237          esi = _ftol2();
005c81bd      }
005c81bd      else if (arg4 == 2)
005c8241      {
005c8243          int32_t edx_2 = *(uint32_t*)((char*)arg2)[4];
005c8247          int32_t edi_1 = *(uint32_t*)((char*)arg1)[4];
005c824d          int32_t eax_5 = arg2;
005c8251          int32_t ebx_1 = arg1;
005c8251          
005c825f          if ((edi_1 >= edx_2 && (edi_1 > edx_2 || ebx_1 >= eax_5)))
005c825f          {
005c8261              while (true)
005c8261              {
005c8261                  int32_t var_1c_1 = 0;
005c8263                  int32_t var_20_1 = 2;
005c8265                  int32_t var_24_1 = edx_2;
005c8266                  esi += 1;
005c8267                  int32_t temp0_1 = ebx_1;
005c8267                  ebx_1 -= eax_5;
005c8269                  int32_t var_28_1 = eax_5;
005c826a                  edi_1 = (edi_1 - edx_2);
005c826c                  eax_5 = _allmul();
005c826c                  
005c8273                  if (edi_1 <= edx_2)
005c8273                  {
005c8275                      if (edi_1 < edx_2)
005c8275                          break;
005c8275                      
005c8279                      if (ebx_1 < eax_5)
005c8279                          break;
005c8273                  }
005c8261              }
005c825f          }
005c8241      }
005c8241      else if (arg4 == 3)
005c8280      {
005c8282          int32_t edi_2 = *(uint32_t*)((char*)arg2)[4];
005c8286          int32_t edx_3 = *(uint32_t*)((char*)arg1)[4];
005c828c          int32_t ebp_2 = arg2;
005c8290          int32_t ebx_2 = arg1;
005c8294          int32_t ecx_7 = ebp_2;
005c8296          int32_t eax_6 = edi_2;
005c8296          
005c829e          if ((edx_3 >= edi_2 && (edx_3 > edi_2 || ebx_2 >= ebp_2)))
005c829e          {
005c82a0              while (true)
005c82a0              {
005c82a0                  esi += 1;
005c82a1                  int32_t temp1_1 = ebx_2;
005c82a1                  ebx_2 -= ecx_7;
005c82a3                  edx_3 = (edx_3 - eax_6);
005c82a5                  int32_t temp2_1 = ecx_7;
005c82a5                  ecx_7 += ebp_2;
005c82a7                  eax_6 = (eax_6 + edi_2);
005c82a7                  
005c82ab                  if (edx_3 <= eax_6)
005c82ab                  {
005c82ad                      if (edx_3 < eax_6)
005c82ad                          break;
005c82ad                      
005c82b1                      if (ebx_2 < ecx_7)
005c82b1                          break;
005c82ab                  }
005c82a0              }
005c829e          }
005c8280      }
005c8280      
005c82bc      if (esi > arg3)
005c82c4          return arg3;
005c82c4      
005c82be      return esi;
005c81b0  }

005c82c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c82d0  void ExperienceSystem::XPToString(uint64_t arg1, char* arg2)

005c82d0  {
005c82e7      int32_t lpFormat = 0;
005c8317      void lpValue;
005c8317      sprintf(&lpValue, "%I64d", arg1, *(uint32_t*)((char*)arg1)[4], lpFormat, 0, 3, &*U"mh,."[3], &*U"mh,."[2], 1);
005c8338      GetNumberFormatA(0x400, 0, &lpValue, &lpFormat, arg2, 0x20);
005c82d0  }

005c8342        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005c8350  uint32_t ExperienceSystem::ExperienceToAttributeLevel(uint32_t arg1)

005c8350  {
005c8351      int32_t __saved_edi = 0x10000009;
005c8356      int32_t var_c = 2;
005c8358      int32_t var_10 = 3;
005c835a      int32_t eax;
005c835a      uint32_t ecx;
005c835a      int32_t edx;
005c835a      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c835a      
005c8366      if (eax_1 == 0)
005c8369          return eax_1;
005c8369      
005c8372      uint32_t eax_3 = ExperienceTable::GetExperienceForAttributeLevel(eax_1, arg1);
005c8377      eax_1->vtable->Release();
005c8384      return eax_3;
005c8350  }

005c8385                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c8390  uint32_t ExperienceSystem::ExperienceToAttribute2ndLevel(uint32_t arg1)

005c8390  {
005c8391      int32_t __saved_edi = 0x10000009;
005c8396      int32_t var_c = 2;
005c8398      int32_t var_10 = 3;
005c839a      int32_t eax;
005c839a      uint32_t ecx;
005c839a      int32_t edx;
005c839a      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c839a      
005c83a6      if (eax_1 == 0)
005c83a9          return eax_1;
005c83a9      
005c83b2      uint32_t eax_3 = ExperienceTable::GetExperienceForAttribute2ndLevel(eax_1, arg1);
005c83b7      eax_1->vtable->Release();
005c83c4      return eax_3;
005c8390  }

005c83c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c83d0  uint32_t ExperienceSystem::ExperienceToSkillLevel(enum SKILL_ADVANCEMENT_CLASS arg1, uint32_t arg2)

005c83d0  {
005c83d1      int32_t __saved_edi = 0x10000009;
005c83d6      int32_t var_c = 2;
005c83d8      int32_t var_10 = 3;
005c83da      int32_t eax;
005c83da      uint32_t ecx;
005c83da      int32_t edx;
005c83da      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c83da      
005c83e6      if (eax_1 == 0)
005c83e9          return eax_1;
005c83e9      
005c83f2      if (arg1 == TRAINED_SKILL_ADVANCEMENT_CLASS)
005c83f2      {
005c8427          uint32_t eax_9 = ExperienceTable::GetExperienceForTrainedSkillLevel(eax_1, arg2);
005c842c          eax_1->vtable->Release();
005c8439          return eax_9;
005c83f2      }
005c83f2      
005c83f5      if (arg1 != 3)
005c83f5      {
005c83f7          eax_1->vtable->Release();
005c8405          return 0xffffffff;
005c83f5      }
005c83f5      
005c840d      uint32_t eax_7 = ExperienceTable::GetExperienceForSpecializedSkillLevel(eax_1, arg2);
005c8412      eax_1->vtable->Release();
005c841f      return eax_7;
005c83d0  }

005c843a                                                                                90 90 90 90 90 90                            ......

005c8440  uint32_t ExperienceSystem::SkillLevelFromExperience(enum SKILL_ADVANCEMENT_CLASS arg1, uint32_t arg2)

005c8440  {
005c8441      int32_t __saved_edi = 0x10000009;
005c8446      int32_t var_c = 2;
005c8448      int32_t var_10 = 3;
005c844a      int32_t eax;
005c844a      uint32_t ecx;
005c844a      int32_t edx;
005c844a      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c844a      
005c8456      if (eax_1 == 0)
005c8459          return eax_1;
005c8459      
005c8462      if (arg1 == TRAINED_SKILL_ADVANCEMENT_CLASS)
005c8462      {
005c8496          uint32_t eax_9 = ExperienceTable::GetTrainedSkillLevelForExperience(eax_1, arg2);
005c849b          eax_1->vtable->Release();
005c84a8          return eax_9;
005c8462      }
005c8462      
005c8465      if (arg1 != 3)
005c8465      {
005c8467          eax_1->vtable->Release();
005c8474          return 0;
005c8465      }
005c8465      
005c847c      uint32_t eax_7 = ExperienceTable::GetSpecializedSkillLevelForExperience(eax_1, arg2);
005c8481      eax_1->vtable->Release();
005c848e      return eax_7;
005c8440  }

005c84a9                             90 90 90 90 90 90 90                                                           .......

005c84b0  uint32_t ExperienceSystem::AttributeLevelFromExperience(uint32_t arg1)

005c84b0  {
005c84b1      int32_t __saved_edi = 0x10000009;
005c84b6      int32_t var_c = 2;
005c84b8      int32_t var_10 = 3;
005c84ba      int32_t eax;
005c84ba      uint32_t ecx;
005c84ba      int32_t edx;
005c84ba      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c84ba      
005c84c6      if (eax_1 == 0)
005c84c9          return eax_1;
005c84c9      
005c84d2      uint32_t eax_3 = ExperienceTable::GetAttributeLevelForExperience(eax_1, arg1);
005c84d7      eax_1->vtable->Release();
005c84e4      return eax_3;
005c84b0  }

005c84e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c84f0  uint32_t ExperienceSystem::Attribute2ndLevelFromExperience(uint32_t arg1)

005c84f0  {
005c84f1      int32_t __saved_edi = 0x10000009;
005c84f6      int32_t var_c = 2;
005c84f8      int32_t var_10 = 3;
005c84fa      int32_t eax;
005c84fa      uint32_t ecx;
005c84fa      int32_t edx;
005c84fa      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c84fa      
005c8506      if (eax_1 == 0)
005c8509          return eax_1;
005c8509      
005c8512      uint32_t eax_3 = ExperienceTable::GetAttribute2ndLevelForExperience(eax_1, arg1);
005c8517      eax_1->vtable->Release();
005c8524      return eax_3;
005c84f0  }

005c8525                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c8530  class DBObj* ExperienceSystem::ExperienceToLevel(uint32_t arg1)

005c8530  {
005c8531      int32_t __saved_ebx = 0x10000009;
005c8536      int32_t __saved_edi = 2;
005c8538      int32_t var_10 = 3;
005c853a      int32_t eax;
005c853a      uint32_t ecx;
005c853a      int32_t edx;
005c853a      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c853a      
005c8546      if (eax_1 == 0)
005c854b          return eax_1;
005c854b      
005c8555      int32_t eax_3;
005c8555      int32_t edx_2;
005c8555      eax_3 = ExperienceTable::GetExperienceForLevel(eax_1, arg1);
005c855c      eax_1->vtable->Release();
005c856c      return eax_3;
005c8530  }

005c856d                                         90 90 90                                                               ...

005c8570  uint32_t ExperienceSystem::GetMaxSpecializedSkillLevel()

005c8570  {
005c8570      int32_t __saved_esi = 0x10000009;
005c8575      int32_t var_8 = 2;
005c8577      int32_t var_c = 3;
005c8579      int32_t eax;
005c8579      uint32_t ecx;
005c8579      int32_t edx;
005c8579      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c8579      
005c8583      if (eax_1 == 0)
005c8585          return eax_1;
005c8585      
005c8589      int32_t esi = *(int32_t*)((char*)eax_1 + 0x50);
005c8586      eax_1->vtable->Release();
005c8594      return esi;
005c8570  }

005c8595                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005c85a0  uint32_t ExperienceSystem::GetMaxTrainedSkillLevel()

005c85a0  {
005c85a0      int32_t __saved_esi = 0x10000009;
005c85a5      int32_t var_8 = 2;
005c85a7      int32_t var_c = 3;
005c85a9      int32_t eax;
005c85a9      uint32_t ecx;
005c85a9      int32_t edx;
005c85a9      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c85a9      
005c85b3      if (eax_1 == 0)
005c85b5          return eax_1;
005c85b5      
005c85b9      int32_t esi = *(int32_t*)((char*)eax_1 + 0x48);
005c85b6      eax_1->vtable->Release();
005c85c4      return esi;
005c85a0  }

005c85c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c85d0  uint32_t ExperienceSystem::GetMaxAttributeLevel()

005c85d0  {
005c85d0      int32_t __saved_esi = 0x10000009;
005c85d5      int32_t var_8 = 2;
005c85d7      int32_t var_c = 3;
005c85d9      int32_t eax;
005c85d9      uint32_t ecx;
005c85d9      int32_t edx;
005c85d9      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c85d9      
005c85e3      if (eax_1 == 0)
005c85e5          return eax_1;
005c85e5      
005c85e9      int32_t esi = *(int32_t*)((char*)eax_1 + 0x38);
005c85e6      eax_1->vtable->Release();
005c85f4      return esi;
005c85d0  }

005c85f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005c8600  uint32_t ExperienceSystem::GetMaxAttribute2ndLevel()

005c8600  {
005c8600      int32_t __saved_esi = 0x10000009;
005c8605      int32_t var_8 = 2;
005c8607      int32_t var_c = 3;
005c8609      int32_t eax;
005c8609      uint32_t ecx;
005c8609      int32_t edx;
005c8609      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c8609      
005c8613      if (eax_1 == 0)
005c8615          return eax_1;
005c8615      
005c8619      int32_t esi = *(int32_t*)((char*)eax_1 + 0x40);
005c8616      eax_1->vtable->Release();
005c8624      return esi;
005c8600  }

005c8625                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c8630  int32_t ExperienceSystem::ExperienceToRaiseLevel(uint32_t arg1, uint32_t arg2)

005c8630  {
005c863e      if (arg2 <= arg1)
005c8648          return 0;
005c8648      
005c864c      int32_t var_1c = 0x10000009;
005c8651      int32_t var_20 = 2;
005c8653      int32_t var_24 = 3;
005c8655      class DBObj* eax_1;
005c8655      uint32_t ecx;
005c8655      uint32_t ecx_1;
005c8655      int32_t edx;
005c8655      int32_t edx_2;
005c8655      eax_1 = DBObj::GetByEnum(arg1, edx, ecx);
005c865a      class ExperienceTable* esi = eax_1;
005c865c      int32_t result = 0;
005c8663      int32_t var_4;
005c8663      
005c8663      if (esi != 0)
005c8663      {
005c866e          int32_t result_1;
005c866e          int32_t edx_3;
005c866e          result_1 = ExperienceTable::GetExperienceForLevel(esi, arg2);
005c867b          eax_1 = esi->vtable->Release();
005c867e          result = result_1;
005c8680          var_4 = edx_3;
005c8663      }
005c8663      else
005c8665          var_4 = 0;
005c8684      int32_t var_1c_2 = 0x10000009;
005c8689      int32_t var_20_1 = 2;
005c868b      int32_t var_24_1 = 3;
005c868d      class DBObj* eax_3 = DBObj::GetByEnum(eax_1, edx_2, ecx_1);
005c868d      
005c8699      if (eax_3 == 0)
005c86ae          return result;
005c86ae      
005c86b6      int32_t eax_6;
005c86b6      int32_t edx_6;
005c86b6      eax_6 = ExperienceTable::GetExperienceForLevel(eax_3, arg1);
005c86bd      eax_3->vtable->Release();
005c86db      return (result - eax_6);
005c8630  }

005c86dc                                                                                      90 90 90 90                              ....

005c86e0  uint8_t SkillSystem::InqSkillName(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005c86e0  {
005c86e7      int32_t eax;
005c86e7      
005c86e7      if (arg1 == 0)
005c86e7      {
005c86e9          eax = 0;
005c86ec          return 0;
005c86e7      }
005c86e7      
005c86ee      int32_t var_c = 0x10000004;
005c86f3      int32_t var_10 = 2;
005c86f5      int32_t var_14 = 4;
005c86f7      uint32_t ecx;
005c86f7      int32_t edx;
005c86f7      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c86f7      
005c8703      if (eax_1 != 0)
005c8703      {
005c8708          class SkillBase* eax_2 = SkillTable::GetSkillBase(eax_1, arg1);
005c8708          
005c870f          if (eax_2 != 0)
005c870f          {
005c871d              class AC1Legacy::PSRefBuffer<char>* m_buffer = eax_2->_name.m_buffer;
005c8720              int32_t edi;
005c8720              int32_t var_c_2 = edi;
005c8725              arg1 = m_buffer;
005c8729              InterlockedIncrement(&m_buffer->m_cRef);
005c8738              AC1Legacy::PStringBase<char>::operator=(arg_c, &arg2);
005c8738              
005c874b              if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005c874d                  m_buffer->vtable->__vecDelDtor(1);
005c874d              
005c8755              eax_1->vtable->Release();
005c875d              int32_t eax_6;
005c875d              eax_6 = 1;
005c8760              return 1;
005c870f          }
005c870f          
005c8711          eax_1->vtable->Release();
005c8703      }
005c8703      
005c8719      eax_1 = 0;
005c871c      return 0;
005c86e0  }

005c8761     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005c8770  uint8_t SkillSystem::InqSkillDescription(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005c8770  {
005c8777      int32_t eax;
005c8777      
005c8777      if (arg1 == 0)
005c8777      {
005c8779          eax = 0;
005c877c          return 0;
005c8777      }
005c8777      
005c877e      int32_t var_c = 0x10000004;
005c8783      int32_t var_10 = 2;
005c8785      int32_t var_14 = 4;
005c8787      uint32_t ecx;
005c8787      int32_t edx;
005c8787      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c8787      
005c8793      if (eax_1 != 0)
005c8793      {
005c8798          class SkillBase* eax_2 = SkillTable::GetSkillBase(eax_1, arg1);
005c8798          
005c879f          if (eax_2 != 0)
005c879f          {
005c87ad              class AC1Legacy::PSRefBuffer<char>* m_buffer = eax_2->_description.m_buffer;
005c87b0              int32_t edi;
005c87b0              int32_t var_c_2 = edi;
005c87b5              arg1 = m_buffer;
005c87b9              InterlockedIncrement(&m_buffer->m_cRef);
005c87c8              AC1Legacy::PStringBase<char>::operator=(arg_c, &arg2);
005c87c8              
005c87db              if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005c87dd                  m_buffer->vtable->__vecDelDtor(1);
005c87dd              
005c87e5              eax_1->vtable->Release();
005c87ed              int32_t eax_6;
005c87ed              eax_6 = 1;
005c87f0              return 1;
005c879f          }
005c879f          
005c87a1          eax_1->vtable->Release();
005c8793      }
005c8793      
005c87a9      eax_1 = 0;
005c87ac      return 0;
005c8770  }

005c87f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005c8800  uint8_t SkillSystem::InqAttributeName(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005c8800  {
005c8808      if ((arg1 - 1) > 5)
005c8808      {
005c8877          int32_t eax;
005c8877          eax = 0;
005c8879          return 0;
005c8808      }
005c8808      
005c880a      switch (arg1)
005c880a      {
005c881a          case 1:
005c881a          {
005c881a              AC1Legacy::PStringBase<char>::set(arg2, "Strength");
005c881f              int32_t eax_1;
005c881f              eax_1 = 1;
005c8821              return 1;
005c881a              break;
005c881a          }
005c882b          case 2:
005c882b          {
005c882b              AC1Legacy::PStringBase<char>::set(arg2, "Endurance");
005c8830              int32_t eax_2;
005c8830              eax_2 = 1;
005c8832              return 1;
005c882b              break;
005c882b          }
005c883c          case 3:
005c883c          {
005c883c              AC1Legacy::PStringBase<char>::set(arg2, "Quickness");
005c8841              int32_t eax_3;
005c8841              eax_3 = 1;
005c8843              return 1;
005c883c              break;
005c883c          }
005c884d          case 4:
005c884d          {
005c884d              AC1Legacy::PStringBase<char>::set(arg2, "Coordination");
005c8852              int32_t eax_4;
005c8852              eax_4 = 1;
005c8854              return 1;
005c884d              break;
005c884d          }
005c885e          case 5:
005c885e          {
005c885e              AC1Legacy::PStringBase<char>::set(arg2, "Focus");
005c8863              int32_t eax_5;
005c8863              eax_5 = 1;
005c8865              return 1;
005c885e              break;
005c885e          }
005c886f          case 6:
005c886f          {
005c886f              AC1Legacy::PStringBase<char>::set(arg2, "Self");
005c8874              int32_t eax_6;
005c8874              eax_6 = 1;
005c8876              return 1;
005c886f              break;
005c886f          }
005c880a      }
005c8800  }

005c887a                                                                                8b ff                                        ..
005c887c  uint32_t jump_table_5c887c[0x6] = 
005c887c  {
005c887c      [0x0] =  0x005c8811
005c8880      [0x1] =  0x005c8822
005c8884      [0x2] =  0x005c8833
005c8888      [0x3] =  0x005c8844
005c888c      [0x4] =  0x005c8855
005c8890      [0x5] =  0x005c8866
005c8894  }

005c8894                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c88a0  uint8_t SkillSystem::InqAttribute2ndName(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005c88a0  {
005c88a8      if ((arg1 - 1) > 5)
005c88a8      {
005c8917          int32_t eax;
005c8917          eax = 0;
005c8919          return 0;
005c88a8      }
005c88a8      
005c88aa      switch (arg1)
005c88aa      {
005c88ba          case 1:
005c88ba          {
005c88ba              AC1Legacy::PStringBase<char>::set(arg2, "Maximum Health");
005c88bf              int32_t eax_1;
005c88bf              eax_1 = 1;
005c88c1              return 1;
005c88ba              break;
005c88ba          }
005c88cb          case 2:
005c88cb          {
005c88cb              AC1Legacy::PStringBase<char>::set(arg2, "Health");
005c88d0              int32_t eax_2;
005c88d0              eax_2 = 1;
005c88d2              return 1;
005c88cb              break;
005c88cb          }
005c88dc          case 3:
005c88dc          {
005c88dc              AC1Legacy::PStringBase<char>::set(arg2, "Maximum Stamina");
005c88e1              int32_t eax_3;
005c88e1              eax_3 = 1;
005c88e3              return 1;
005c88dc              break;
005c88dc          }
005c88ed          case 4:
005c88ed          {
005c88ed              AC1Legacy::PStringBase<char>::set(arg2, "Stamina");
005c88f2              int32_t eax_4;
005c88f2              eax_4 = 1;
005c88f4              return 1;
005c88ed              break;
005c88ed          }
005c88fe          case 5:
005c88fe          {
005c88fe              AC1Legacy::PStringBase<char>::set(arg2, "Maximum Mana");
005c8903              int32_t eax_5;
005c8903              eax_5 = 1;
005c8905              return 1;
005c88fe              break;
005c88fe          }
005c890f          case 6:
005c890f          {
005c890f              AC1Legacy::PStringBase<char>::set(arg2, "Mana");
005c8914              int32_t eax_6;
005c8914              eax_6 = 1;
005c8916              return 1;
005c890f              break;
005c890f          }
005c88aa      }
005c88a0  }

005c891a                                                                                8b ff                                        ..
005c891c  uint32_t jump_table_5c891c[0x6] = 
005c891c  {
005c891c      [0x0] =  0x005c88b1
005c8920      [0x1] =  0x005c88c2
005c8924      [0x2] =  0x005c88d3
005c8928      [0x3] =  0x005c88e4
005c892c      [0x4] =  0x005c88f5
005c8930      [0x5] =  0x005c8906
005c8934  }

005c8934                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c8940  uint8_t __convention("regparm") SkillSystem::InqSkillName(uint32_t arg1, class PStringBase<unsigned short>* arg2)

005c8940  {
005c8940      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005c8940      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005c8941      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005c8947      AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005c8950      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005c8960      uint8_t eax_1 = SkillSystem::InqSkillName(arg1, &AC1Legacy::PStringBase<char>::s_NullBuffer_2);
005c8965      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005c8969      int32_t ebx;
005c8969      ebx = eax_1;
005c8969      
005c8970      if (ebx != 0)
005c8970      {
005c8979          char (* var_10_2)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data;
005c8980          PStringBase<unsigned short>::sprintf(arg2, &data_79f3f0);
005c8970      }
005c8970      
005c8998      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
005c899a          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
005c899a      
005c89a3      int32_t eax_3;
005c89a3      eax_3 = ebx;
005c89a7      return eax_3;
005c8940  }

005c89a8                          90 90 90 90 90 90 90 90                                                          ........

005c89b0  uint8_t SkillSystem::InqSkillFormula(uint32_t arg1, class AC1Legacy::PStringBase<char>* arg2)

005c89b0  {
005c89b4      uint32_t edi = arg1;
005c89ba      int32_t eax;
005c89ba      
005c89ba      if (edi == 0)
005c89ba      {
005c89bc          eax = 0;
005c89c2          return 0;
005c89ba      }
005c89ba      
005c89c6      int32_t var_40 = 0x10000004;
005c89cb      int32_t var_44 = 2;
005c89cd      int32_t var_48 = 4;
005c89cf      uint32_t ecx;
005c89cf      int32_t edx;
005c89cf      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005c89db      class DBObj* var_20 = eax_1;
005c89db      
005c89df      if (eax_1 != 0)
005c89df      {
005c89e4          class SkillBase* eax_2 = SkillTable::GetSkillBase(eax_1, edi);
005c89e4          
005c89eb          if (eax_2 != 0)
005c89eb          {
005c89fe              uint32_t _w = eax_2->_formula._w;
005c8a01              uint32_t _x = eax_2->_formula._x;
005c8a07              uint32_t _y = eax_2->_formula._y;
005c8a0e              uint32_t _z = eax_2->_formula._z;
005c8a15              uint32_t _attr1 = eax_2->_formula._attr1;
005c8a18              uint32_t _attr2 = eax_2->_formula._attr2;
005c8a2b              int32_t* var_24;
005c8a2b              int32_t* ebx;
005c8a2b              
005c8a2b              if ((_x < 1 || _attr1 == 0))
005c8a2b              {
005c8a38                  var_24 = nullptr;
005c8a40                  ebx = var_24;
005c8a2b              }
005c8a2b              else
005c8a2b              {
005c8a2d                  ebx = 1;
005c8a32                  var_24 = 1;
005c8a2b              }
005c8a2b              
005c8a4b              int32_t var_28;
005c8a4b              int32_t edi_1;
005c8a4b              
005c8a4b              if ((_y < 1 || _attr2 == 0))
005c8a4b              {
005c8a58                  var_28 = 0;
005c8a60                  edi_1 = 0;
005c8a4b              }
005c8a4b              else
005c8a4b              {
005c8a4d                  edi_1 = 1;
005c8a52                  var_28 = 1;
005c8a4b              }
005c8a4b              
005c8a6a              if ((ebx == 0 && edi_1 == 0))
005c8a6a              {
005c8a70                  MasterPropertyGrabber::~MasterPropertyGrabber(&var_20);
005c8a78                  int32_t eax_4;
005c8a78                  eax_4 = 0;
005c8a7e                  return 0;
005c8a6a              }
005c8a6a              
005c8a8a              AC1Legacy::PStringBase<char>::set(arg2, &data_7e7954);
005c8a8a              
005c8a95              if ((ebx != 0 && edi_1 != 0))
005c8a95              {
005c8aa0                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_7e7950);
005c8aac                  AC1Legacy::PStringBase<char>::operator+=(arg2, &arg1);
005c8ab5                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005c8a95              }
005c8a95              
005c8aba              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005c8aca              class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005c8ace              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005c8ad0              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005c8ad5              arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005c8add              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005c8adf              int32_t* ebx_1 = var_24;
005c8ae5              int32_t ebp;
005c8ae5              
005c8ae5              if (ebx_1 == 0)
005c8ae5              {
005c8b56                  ebp = var_28;
005c8b5a              label_5c8b5a:
005c8b5a                  
005c8b5c                  if (ebp != 0)
005c8b5c                  {
005c8b68                      SkillSystem::InqAttributeName(_attr2, &AC1Legacy::PStringBase<char>::s_NullBuffer_5);
005c8b68                      
005c8b77                      if (_y <= 1)
005c8b77                      {
005c8ba6                          AC1Legacy::PStringBase<char>::operator+=(arg2, &AC1Legacy::PStringBase<char>::s_NullBuffer_5);
005c8bab                          AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
005c8b77                      }
005c8b77                      else
005c8b77                      {
005c8b79                          AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
005c8b7d                          class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005c8b7e                          uint32_t _y_1 = _y;
005c8b89                          AC1Legacy::PStringBase<char>::sprintf(&arg1, "(%u x %s)");
005c8b98                          AC1Legacy::PStringBase<char>::operator+=(arg2, &arg1);
005c8b77                      }
005c8b5c                  }
005c8ae5              }
005c8ae5              else
005c8ae5              {
005c8af1                  SkillSystem::InqAttributeName(_attr1, &AC1Legacy::PStringBase<char>::s_NullBuffer_5);
005c8af6                  AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
005c8b00                  uint32_t* var_40_6;
005c8b00                  
005c8b00                  if (_x <= 1)
005c8b21                      var_40_6 = &AC1Legacy::PStringBase<char>::s_NullBuffer_5;
005c8b00                  else
005c8b00                  {
005c8b02                      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005c8b03                      uint32_t _x_1 = _x;
005c8b0e                      AC1Legacy::PStringBase<char>::sprintf(&arg1, "(%u x %s)");
005c8b1a                      var_40_6 = &arg1;
005c8b00                  }
005c8b00                  
005c8b24                  AC1Legacy::PStringBase<char>::operator+=(arg2, var_40_6);
005c8b29                  ebp = var_28;
005c8b29                  
005c8b2f                  if (ebp != 0)
005c8b2f                  {
005c8b3a                      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_24, &data_7e7940);
005c8b46                      AC1Legacy::PStringBase<char>::operator+=(arg2, &var_24);
005c8b4f                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_24);
005c8b54                      goto label_5c8b5a;
005c8b2f                  }
005c8ae5              }
005c8ae5              
005c8bb5              if ((ebx_1 != 0 && ebp != 0))
005c8bb5              {
005c8bc0                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_24, &data_797584);
005c8bcc                  AC1Legacy::PStringBase<char>::operator+=(arg2, &var_24);
005c8bd5                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_24);
005c8bb5              }
005c8bb5              
005c8be1              if (_z != 1)
005c8be1              {
005c8be3                  uint32_t _z_1 = _z;
005c8bee                  AC1Legacy::PStringBase<char>::sprintf(&arg1, " / %u");
005c8bfd                  AC1Legacy::PStringBase<char>::operator+=(arg2, &arg1);
005c8be1              }
005c8be1              
005c8c08              if (_w != 0)
005c8c08              {
005c8c0a                  uint32_t _w_1 = _w;
005c8c15                  AC1Legacy::PStringBase<char>::sprintf(&arg1, &data_7e7934);
005c8c24                  AC1Legacy::PStringBase<char>::operator+=(arg2, &arg1);
005c8c08              }
005c8c08              
005c8c32              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_24, &data_7e7930);
005c8c3e              AC1Legacy::PStringBase<char>::operator+=(arg2, &var_24);
005c8c43              int32_t* esi_2 = var_24;
005c8c43              
005c8c59              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005c8c61                  **(uint32_t**)esi_2(1);
005c8c61              
005c8c63              uint32_t esi_3 = arg1;
005c8c63              
005c8c73              if ((InterlockedDecrement((esi_3 + 4)) == 0 && esi_3 != 0))
005c8c7b                  **(uint32_t**)esi_3(1);
005c8c7b              
005c8c89              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_2 != 0))
005c8c8b                  AC1Legacy::PStringBase<char>::s_NullBuffer_2->vtable->__vecDelDtor(1);
005c8c8b              
005c8c93              var_20->vtable->Release();
005c8c9f              int32_t eax_17;
005c8c9f              eax_17 = 1;
005c8ca5              return 1;
005c89eb          }
005c89eb          
005c89ed          eax_1->vtable->Release();
005c89df      }
005c89df      
005c89f7      eax_1 = 0;
005c89fd      return 0;
005c89b0  }

005c8ca6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005c8cb0  uint8_t __convention("regparm") SkillSystem::InqSkillFormula(uint32_t arg1, class PStringBase<unsigned short>* arg2)

005c8cb0  {
005c8cb0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005c8cb0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005c8cb1      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005c8cb7      AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005c8cc0      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005c8cd0      uint8_t eax_1 = SkillSystem::InqSkillFormula(arg1, &AC1Legacy::PStringBase<char>::s_NullBuffer_2);
005c8cd5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005c8cd9      int32_t ebx;
005c8cd9      ebx = eax_1;
005c8cd9      
005c8ce0      if (ebx != 0)
005c8ce0      {
005c8ce9          char (* var_10_2)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data;
005c8cf0          PStringBase<unsigned short>::sprintf(arg2, &data_79f3f0);
005c8ce0      }
005c8ce0      
005c8d08      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
005c8d0a          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
005c8d0a      
005c8d13      int32_t eax_3;
005c8d13      eax_3 = ebx;
005c8d17      return eax_3;
005c8cb0  }

005c8d18                                                                          90 90 90 90 90 90 90 90                          ........

005c8d20  uint8_t __convention("regparm") SkillSystem::InqSkillDescription(uint32_t arg1, class PStringBase<unsigned short>* arg2)

005c8d20  {
005c8d20      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005c8d20      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005c8d21      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005c8d27      AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005c8d30      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005c8d40      uint8_t eax_1 = SkillSystem::InqSkillDescription(arg1, &AC1Legacy::PStringBase<char>::s_NullBuffer_2);
005c8d45      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005c8d49      int32_t ebx;
005c8d49      ebx = eax_1;
005c8d49      
005c8d50      if (ebx != 0)
005c8d50      {
005c8d59          char (* var_10_2)[0x1] = &AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_data;
005c8d60          PStringBase<unsigned short>::sprintf(arg2, &data_79f3f0);
005c8d50      }
005c8d50      
005c8d78      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
005c8d7a          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
005c8d7a      
005c8d83      int32_t eax_3;
005c8d83      eax_3 = ebx;
005c8d87      return eax_3;
005c8d20  }

005c8d88                          90 90 90 90 90 90 90 90                                                          ........

005c8d90  uint8_t SkillSystem::InqAttributeName(uint32_t arg1, class PStringBase<unsigned short>* arg2)

005c8d90  {
005c8d98      if ((arg1 - 1) > 5)
005c8d98      {
005c8e07          int32_t eax;
005c8e07          eax = 0;
005c8e09          return 0;
005c8d98      }
005c8d98      
005c8d9a      switch (arg1)
005c8d9a      {
005c8daa          case 1:
005c8daa          {
005c8daa              PStringBase<unsigned short>::set(arg2, u"Strength");
005c8daf              int32_t eax_1;
005c8daf              eax_1 = 1;
005c8db1              return 1;
005c8daa              break;
005c8daa          }
005c8dbb          case 2:
005c8dbb          {
005c8dbb              PStringBase<unsigned short>::set(arg2, u"Endurance");
005c8dc0              int32_t eax_2;
005c8dc0              eax_2 = 1;
005c8dc2              return 1;
005c8dbb              break;
005c8dbb          }
005c8dcc          case 3:
005c8dcc          {
005c8dcc              PStringBase<unsigned short>::set(arg2, u"Quickness");
005c8dd1              int32_t eax_3;
005c8dd1              eax_3 = 1;
005c8dd3              return 1;
005c8dcc              break;
005c8dcc          }
005c8ddd          case 4:
005c8ddd          {
005c8ddd              PStringBase<unsigned short>::set(arg2, u"Coordination");
005c8de2              int32_t eax_4;
005c8de2              eax_4 = 1;
005c8de4              return 1;
005c8ddd              break;
005c8ddd          }
005c8dee          case 5:
005c8dee          {
005c8dee              PStringBase<unsigned short>::set(arg2, u"Focus");
005c8df3              int32_t eax_5;
005c8df3              eax_5 = 1;
005c8df5              return 1;
005c8dee              break;
005c8dee          }
005c8dff          case 6:
005c8dff          {
005c8dff              PStringBase<unsigned short>::set(arg2, u"Self");
005c8e04              int32_t eax_6;
005c8e04              eax_6 = 1;
005c8e06              return 1;
005c8dff              break;
005c8dff          }
005c8d9a      }
005c8d90  }

005c8e0a                                8b ff                                                                        ..
005c8e0c  uint32_t jump_table_5c8e0c[0x6] = 
005c8e0c  {
005c8e0c      [0x0] =  0x005c8da1
005c8e10      [0x1] =  0x005c8db2
005c8e14      [0x2] =  0x005c8dc3
005c8e18      [0x3] =  0x005c8dd4
005c8e1c      [0x4] =  0x005c8de5
005c8e20      [0x5] =  0x005c8df6
005c8e24  }

005c8e24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c8e30  uint8_t SkillSystem::InqAttributeDescription(uint32_t arg1, class PStringBase<unsigned short>* arg2)

005c8e30  {
005c8e38      if ((arg1 - 1) > 5)
005c8e38      {
005c8ea7          int32_t eax;
005c8ea7          eax = 0;
005c8ea9          return 0;
005c8e38      }
005c8e38      
005c8e3a      switch (arg1)
005c8e3a      {
005c8e4a          case 1:
005c8e4a          {
005c8e4a              PStringBase<unsigned short>::set(arg2, u"Measures your character's muscul…");
005c8e4f              int32_t eax_1;
005c8e4f              eax_1 = 1;
005c8e51              return 1;
005c8e4a              break;
005c8e4a          }
005c8e5b          case 2:
005c8e5b          {
005c8e5b              PStringBase<unsigned short>::set(arg2, u"Measures how healthy your charac…");
005c8e60              int32_t eax_2;
005c8e60              eax_2 = 1;
005c8e62              return 1;
005c8e5b              break;
005c8e5b          }
005c8e6c          case 3:
005c8e6c          {
005c8e6c              PStringBase<unsigned short>::set(arg2, u"Measures how fast your character…");
005c8e71              int32_t eax_3;
005c8e71              eax_3 = 1;
005c8e73              return 1;
005c8e6c              break;
005c8e6c          }
005c8e7d          case 4:
005c8e7d          {
005c8e7d              PStringBase<unsigned short>::set(arg2, u"Measures your character's reflex…");
005c8e82              int32_t eax_4;
005c8e82              eax_4 = 1;
005c8e84              return 1;
005c8e7d              break;
005c8e7d          }
005c8e8e          case 5:
005c8e8e          {
005c8e8e              PStringBase<unsigned short>::set(arg2, u"Measures your character's mind a…");
005c8e93              int32_t eax_5;
005c8e93              eax_5 = 1;
005c8e95              return 1;
005c8e8e              break;
005c8e8e          }
005c8e9f          case 6:
005c8e9f          {
005c8e9f              PStringBase<unsigned short>::set(arg2, u"Measures your character's willpo…");
005c8ea4              int32_t eax_6;
005c8ea4              eax_6 = 1;
005c8ea6              return 1;
005c8e9f              break;
005c8e9f          }
005c8e3a      }
005c8e30  }

005c8eaa                                8b ff                                                                        ..
005c8eac  uint32_t jump_table_5c8eac[0x6] = 
005c8eac  {
005c8eac      [0x0] =  0x005c8e41
005c8eb0      [0x1] =  0x005c8e52
005c8eb4      [0x2] =  0x005c8e63
005c8eb8      [0x3] =  0x005c8e74
005c8ebc      [0x4] =  0x005c8e85
005c8ec0      [0x5] =  0x005c8e96
005c8ec4  }

005c8ec4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c8ed0  uint8_t SkillSystem::InqAttribute2ndName(uint32_t arg1, class PStringBase<unsigned short>* arg2)

005c8ed0  {
005c8ed8      if ((arg1 - 1) > 5)
005c8ed8      {
005c8f47          int32_t eax;
005c8f47          eax = 0;
005c8f49          return 0;
005c8ed8      }
005c8ed8      
005c8eda      switch (arg1)
005c8eda      {
005c8eea          case 1:
005c8eea          {
005c8eea              PStringBase<unsigned short>::set(arg2, u"Maximum Health");
005c8eef              int32_t eax_1;
005c8eef              eax_1 = 1;
005c8ef1              return 1;
005c8eea              break;
005c8eea          }
005c8efb          case 2:
005c8efb          {
005c8efb              PStringBase<unsigned short>::set(arg2, u"Health");
005c8f00              int32_t eax_2;
005c8f00              eax_2 = 1;
005c8f02              return 1;
005c8efb              break;
005c8efb          }
005c8f0c          case 3:
005c8f0c          {
005c8f0c              PStringBase<unsigned short>::set(arg2, u"Maximum Stamina");
005c8f11              int32_t eax_3;
005c8f11              eax_3 = 1;
005c8f13              return 1;
005c8f0c              break;
005c8f0c          }
005c8f1d          case 4:
005c8f1d          {
005c8f1d              PStringBase<unsigned short>::set(arg2, u"Stamina");
005c8f22              int32_t eax_4;
005c8f22              eax_4 = 1;
005c8f24              return 1;
005c8f1d              break;
005c8f1d          }
005c8f2e          case 5:
005c8f2e          {
005c8f2e              PStringBase<unsigned short>::set(arg2, u"Maximum Mana");
005c8f33              int32_t eax_5;
005c8f33              eax_5 = 1;
005c8f35              return 1;
005c8f2e              break;
005c8f2e          }
005c8f3f          case 6:
005c8f3f          {
005c8f3f              PStringBase<unsigned short>::set(arg2, u"Mana");
005c8f44              int32_t eax_6;
005c8f44              eax_6 = 1;
005c8f46              return 1;
005c8f3f              break;
005c8f3f          }
005c8eda      }
005c8ed0  }

005c8f4a                                8b ff                                                                        ..
005c8f4c  uint32_t jump_table_5c8f4c[0x6] = 
005c8f4c  {
005c8f4c      [0x0] =  0x005c8ee1
005c8f50      [0x1] =  0x005c8ef2
005c8f54      [0x2] =  0x005c8f03
005c8f58      [0x3] =  0x005c8f14
005c8f5c      [0x4] =  0x005c8f25
005c8f60      [0x5] =  0x005c8f36
005c8f64  }

005c8f64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c8f70  uint8_t SkillSystem::InqAttribute2ndDescription(uint32_t arg1, class PStringBase<unsigned short>* arg2)

005c8f70  {
005c8f78      if ((arg1 - 1) > 5)
005c8f78      {
005c8fb4          int32_t eax;
005c8fb4          eax = 0;
005c8fb6          return 0;
005c8f78      }
005c8f78      
005c8f7a      switch (arg1)
005c8f7a      {
005c8f8a          case 1:
005c8f8a          case 2:
005c8f8a          {
005c8f8a              PStringBase<unsigned short>::set(arg2, u"(Endurance/2)\nIf you run out of…");
005c8f8f              int32_t eax_1;
005c8f8f              eax_1 = 1;
005c8f91              return 1;
005c8f8a              break;
005c8f8a          }
005c8f9b          case 3:
005c8f9b          case 4:
005c8f9b          {
005c8f9b              PStringBase<unsigned short>::set(arg2, u"(Endurance)\nAffects your action…");
005c8fa0              int32_t eax_2;
005c8fa0              eax_2 = 1;
005c8fa2              return 1;
005c8f9b              break;
005c8f9b          }
005c8fac          case 5:
005c8fac          case 6:
005c8fac          {
005c8fac              PStringBase<unsigned short>::set(arg2, u"(Self)\nAffects how much magic y…");
005c8fb1              int32_t eax_3;
005c8fb1              eax_3 = 1;
005c8fb3              return 1;
005c8fac              break;
005c8fac          }
005c8f7a      }
005c8f70  }

005c8fb7                                                                       90                                                 .
005c8fb8  uint32_t jump_table_5c8fb8[0x6] = 
005c8fb8  {
005c8fb8      [0x0] =  0x005c8f81
005c8fbc      [0x1] =  0x005c8f81
005c8fc0      [0x2] =  0x005c8f92
005c8fc4      [0x3] =  0x005c8f92
005c8fc8      [0x4] =  0x005c8fa3
005c8fcc      [0x5] =  0x005c8fa3
005c8fd0  }

005c8fd0  int80_t VitaeSystem::VitaeCPPoolThreshold(float arg1, uint32_t arg2)

005c8fd0  {
005c8fe8      j__CIpow();
005c9003      j__CIpow();
005c9010      /* tailcall */
005c9010      return _ftol2();
005c8fd0  }

005c9015                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005c9020  double CombatSystem::GetElementalModPKModifier(double const arg1)

005c9020  {
005c9036      return ((int64_t)(((((long double)arg1) - ((long double)1.0)) * ((long double)CombatSystem::ElementalModPKModifier)) + ((long double)1.0)));
005c9020  }

005c9037                                                                       90 90 90 90 90 90 90 90 90                         .........

005c9040  void CombatSystem::InqCombatHitAdjectives(enum DAMAGE_TYPE const arg1, double const arg2, class AC1Legacy::PStringBase<char>* arg3, class AC1Legacy::PStringBase<char>* arg4)

005c9040  {
005c9040      long double x87_r7 = ((long double)arg2);
005c9047      long double temp0 = ((long double)0.0);
005c9047      (x87_r7 - temp0);
005c904d      int32_t eax;
005c904d      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0x3800))));
005c904f      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005c904f      
005c9052      if (!(p))
005c905b          return;
005c905b      
005c9064      enum DAMAGE_TYPE eax_2;
005c9064      void* ecx_4;
005c9064      
005c9064      if (arg1 > FIRE_DAMAGE_TYPE)
005c9064      {
005c93af          if (arg1 > HEALTH_DAMAGE_TYPE)
005c93af          {
005c958d              if (arg1 != NETHER_DAMAGE_TYPE)
005c958d              {
005c959a              label_5c959a:
005c959a                  AC1Legacy::PStringBase<char>::set(arg3, &data_7e7d54);
005c95a8                  AC1Legacy::PStringBase<char>::set(arg4, "hits");
005c95b3                  return;
005c958d              }
005c958d              
005c95b4              long double temp2_1 = ((long double)0.10000000000000001);
005c95b4              (x87_r7 - temp2_1);
005c95ba              eax_2 = ((((x87_r7 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
005c95bc              bool p_25 = /* bool p_25 = unimplemented  {test ah, 0x41} */;
005c95bf              char const* const var_1c_12;
005c95bf              
005c95bf              if (p_25)
005c95bf              {
005c95ca                  long double temp5_1 = ((long double)0.25);
005c95ca                  (x87_r7 - temp5_1);
005c95d0                  eax_2 = ((((x87_r7 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005c95d2                  bool p_26 = /* bool p_26 = unimplemented  {test ah, 0x41} */;
005c95d2                  
005c95d5                  if (p_26)
005c95d5                  {
005c95e0                      long double temp13_1 = ((long double)0.5);
005c95e0                      (x87_r7 - temp13_1);
005c95e6                      eax_2 = ((((x87_r7 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp13_1) ? 1 : 0) << 0xe) | 0))));
005c95e8                      bool p_27 = /* bool p_27 = unimplemented  {test ah, 0x41} */;
005c95e8                      
005c95eb                      if (p_27)
005c95f4                          var_1c_12 = "eradicate";
005c95eb                      else
005c95ed                          var_1c_12 = "wither";
005c95d5                  }
005c95d5                  else
005c95d9                      var_1c_12 = "twist";
005c95bf              }
005c95bf              else
005c95c3                  var_1c_12 = "scar";
005c95c3              
005c95ff              AC1Legacy::PStringBase<char>::set(arg3, var_1c_12);
005c960d              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794520);
005c9628              void __return_4;
005c9628              AC1Legacy::PStringBase<char>::operator=(arg4, AC1Legacy::PStringBase<char>::operator+(arg3, &__return_4, &arg2));
005c962d              ecx_4 = &__return_4;
005c9631          label_5c9631:
005c9631              AC1Legacy::PStringBase<char>::~PStringBase<char>(ecx_4);
005c963a              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg2);
005c9648              return;
005c93af          }
005c93af          
005c93b5          if (arg1 == HEALTH_DAMAGE_TYPE)
005c93b5          {
005c9506              long double temp3_1 = ((long double)0.10000000000000001);
005c9506              (x87_r7 - temp3_1);
005c950c              eax_2 = ((((x87_r7 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
005c950e              bool p_22 = /* bool p_22 = unimplemented  {test ah, 0x41} */;
005c9511              char const* const var_1c_9;
005c9511              
005c9511              if (p_22)
005c9511              {
005c951c                  long double temp6_1 = ((long double)0.25);
005c951c                  (x87_r7 - temp6_1);
005c9522                  eax_2 = ((((x87_r7 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp6_1) ? 1 : 0) << 0xe) | 0x3800))));
005c9524                  bool p_23 = /* bool p_23 = unimplemented  {test ah, 0x41} */;
005c9524                  
005c9527                  if (p_23)
005c9527                  {
005c9532                      long double temp14_1 = ((long double)0.5);
005c9532                      (x87_r7 - temp14_1);
005c9538                      eax_2 = ((((x87_r7 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp14_1) ? 1 : 0) << 0xe) | 0))));
005c953a                      bool p_24 = /* bool p_24 = unimplemented  {test ah, 0x41} */;
005c953a                      
005c953d                      if (p_24)
005c9546                          var_1c_9 = "deplete";
005c953d                      else
005c953f                          var_1c_9 = "siphon";
005c9527                  }
005c9527                  else
005c952b                      var_1c_9 = "exhaust";
005c9511              }
005c9511              else
005c9515                  var_1c_9 = "drain";
005c9515              
005c9551              AC1Legacy::PStringBase<char>::set(arg3, var_1c_9);
005c955f              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794520);
005c957a              void __return_3;
005c957a              AC1Legacy::PStringBase<char>::operator=(arg4, AC1Legacy::PStringBase<char>::operator+(arg3, &__return_3, &arg2));
005c957f              ecx_4 = &__return_3;
005c9583              goto label_5c9631;
005c93b5          }
005c93b5          
005c93be          if (arg1 == ACID_DAMAGE_TYPE)
005c93be          {
005c9484              long double temp7_1 = ((long double)0.10000000000000001);
005c9484              (x87_r7 - temp7_1);
005c948a              eax_2 = ((((x87_r7 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp7_1) ? 1 : 0) << 0xe) | 0x3800))));
005c948c              bool p_19 = /* bool p_19 = unimplemented  {test ah, 0x41} */;
005c948f              char const* const var_1c_6;
005c948f              
005c948f              if (p_19)
005c948f              {
005c949a                  long double temp15_1 = ((long double)0.25);
005c949a                  (x87_r7 - temp15_1);
005c94a0                  eax_2 = ((((x87_r7 < temp15_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp15_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp15_1) ? 1 : 0) << 0xe) | 0x3800))));
005c94a2                  bool p_20 = /* bool p_20 = unimplemented  {test ah, 0x41} */;
005c94a2                  
005c94a5                  if (p_20)
005c94a5                  {
005c94b0                      long double temp21_1 = ((long double)0.5);
005c94b0                      (x87_r7 - temp21_1);
005c94b6                      eax_2 = ((((x87_r7 < temp21_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp21_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp21_1) ? 1 : 0) << 0xe) | 0))));
005c94b8                      bool p_21 = /* bool p_21 = unimplemented  {test ah, 0x41} */;
005c94b8                      
005c94bb                      if (p_21)
005c94c4                          var_1c_6 = "dissolve";
005c94bb                      else
005c94bd                          var_1c_6 = "corrode";
005c94a5                  }
005c94a5                  else
005c94a9                      var_1c_6 = "sear";
005c948f              }
005c948f              else
005c9493                  var_1c_6 = "blister";
005c9493              
005c94cf              AC1Legacy::PStringBase<char>::set(arg3, var_1c_6);
005c94dd              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794520);
005c94f8              void __return_2;
005c94f8              AC1Legacy::PStringBase<char>::operator=(arg4, AC1Legacy::PStringBase<char>::operator+(arg3, &__return_2, &arg2));
005c94fd              ecx_4 = &__return_2;
005c9501              goto label_5c9631;
005c93be          }
005c93be          
005c93c7          if (arg1 != ELECTRIC_DAMAGE_TYPE)
005c93c7              goto label_5c959a;
005c93c7          
005c93cd          long double temp16 = ((long double)0.10000000000000001);
005c93cd          (x87_r7 - temp16);
005c93d7          eax_2 = ((((x87_r7 < temp16) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp16))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp16) ? 1 : 0) << 0xe) | 0x3800))));
005c93d9          bool p_16 = /* bool p_16 = unimplemented  {test ah, 0x41} */;
005c93d9          
005c93dc          if (!(p_16))
005c93dc          {
005c93e5              AC1Legacy::PStringBase<char>::set(arg3, "spark");
005c93f3              AC1Legacy::PStringBase<char>::set(arg4, "sparks");
005c9401              return;
005c93dc          }
005c93dc          
005c9402          long double temp22 = ((long double)0.25);
005c9402          (x87_r7 - temp22);
005c9408          eax_2 = ((((x87_r7 < temp22) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp22))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp22) ? 1 : 0) << 0xe) | 0x3800))));
005c940a          bool p_17 = /* bool p_17 = unimplemented  {test ah, 0x41} */;
005c940a          
005c940d          if (!(p_17))
005c940d          {
005c9416              AC1Legacy::PStringBase<char>::set(arg3, "shock");
005c9424              AC1Legacy::PStringBase<char>::set(arg4, "shocks");
005c9432              return;
005c940d          }
005c940d          
005c9433          long double temp27 = ((long double)0.5);
005c9433          (x87_r7 - temp27);
005c9439          eax_2 = ((((x87_r7 < temp27) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp27))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp27) ? 1 : 0) << 0xe) | 0))));
005c943b          bool p_18 = /* bool p_18 = unimplemented  {test ah, 0x41} */;
005c943b          
005c943e          if (p_18)
005c943e          {
005c9467              AC1Legacy::PStringBase<char>::set(arg3, "blast");
005c9475              AC1Legacy::PStringBase<char>::set(arg4, "blasts");
005c9483              return;
005c943e          }
005c943e          
005c9445          AC1Legacy::PStringBase<char>::set(arg3, "jolt");
005c9453          AC1Legacy::PStringBase<char>::set(arg4, "jolts");
005c9461          return;
005c9064      }
005c9064      
005c906a      if (arg1 == FIRE_DAMAGE_TYPE)
005c906a      {
005c92f3          long double temp1 = ((long double)0.10000000000000001);
005c92f3          (x87_r7 - temp1);
005c92fd          eax_2 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
005c92ff          bool p_13 = /* bool p_13 = unimplemented  {test ah, 0x41} */;
005c92ff          
005c9302          if (!(p_13))
005c9302          {
005c930b              AC1Legacy::PStringBase<char>::set(arg3, "singe");
005c9319              AC1Legacy::PStringBase<char>::set(arg4, "singes");
005c9327              return;
005c9302          }
005c9302          
005c9328          long double temp4 = ((long double)0.25);
005c9328          (x87_r7 - temp4);
005c932e          eax_2 = ((((x87_r7 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp4))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp4) ? 1 : 0) << 0xe) | 0x3800))));
005c9330          bool p_14 = /* bool p_14 = unimplemented  {test ah, 0x41} */;
005c9330          
005c9333          if (!(p_14))
005c9333          {
005c933c              AC1Legacy::PStringBase<char>::set(arg3, "scorch");
005c934a              AC1Legacy::PStringBase<char>::set(arg4, "scorches");
005c9358              return;
005c9333          }
005c9333          
005c9359          long double temp8 = ((long double)0.5);
005c9359          (x87_r7 - temp8);
005c935f          eax_2 = ((((x87_r7 < temp8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp8))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp8) ? 1 : 0) << 0xe) | 0))));
005c9361          bool p_15 = /* bool p_15 = unimplemented  {test ah, 0x41} */;
005c9361          
005c9364          if (!(p_15))
005c9364          {
005c936b              AC1Legacy::PStringBase<char>::set(arg3, "burn");
005c9379              AC1Legacy::PStringBase<char>::set(arg4, "burns");
005c9387              return;
005c9364          }
005c9364          
005c938d          AC1Legacy::PStringBase<char>::set(arg3, "incinerate");
005c939b          AC1Legacy::PStringBase<char>::set(arg4, "incinerates");
005c93a9          return;
005c906a      }
005c906a      
005c9074      if ((arg1 - 1) > 7)
005c9074          goto label_5c959a;
005c9074      
005c93c7      int32_t eax_3;
005c93c7      
005c93c7      switch (arg1)
005c93c7      {
005c91ba          case SLASH_DAMAGE_TYPE:
005c91ba          {
005c91ba              long double temp11 = ((long double)0.10000000000000001);
005c91ba              (x87_r7 - temp11);
005c91c4              eax_3 = ((((x87_r7 < temp11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp11))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp11) ? 1 : 0) << 0xe) | 0x3800))));
005c91c6              bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x41} */;
005c91c6              
005c91c9              if (!(p_7))
005c91c9              {
005c91d2                  AC1Legacy::PStringBase<char>::set(arg3, "scratch");
005c91e0                  AC1Legacy::PStringBase<char>::set(arg4, "scratches");
005c91ee                  return;
005c91c9              }
005c91c9              
005c91ef              long double temp19 = ((long double)0.25);
005c91ef              (x87_r7 - temp19);
005c91f5              eax_3 = ((((x87_r7 < temp19) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp19))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp19) ? 1 : 0) << 0xe) | 0x3800))));
005c91f7              bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x41} */;
005c91f7              
005c91fa              if (!(p_8))
005c91fa              {
005c9203                  AC1Legacy::PStringBase<char>::set(arg3, &data_7e67d0);
005c9211                  AC1Legacy::PStringBase<char>::set(arg4, "cuts");
005c921f                  return;
005c91fa              }
005c91fa              
005c9220              long double temp25 = ((long double)0.5);
005c9220              (x87_r7 - temp25);
005c9226              eax_3 = ((((x87_r7 < temp25) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp25))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp25) ? 1 : 0) << 0xe) | 0))));
005c9228              bool p_9 = /* bool p_9 = unimplemented  {test ah, 0x41} */;
005c9228              
005c922b              if (!(p_9))
005c922b              {
005c9232                  AC1Legacy::PStringBase<char>::set(arg3, "slash");
005c9240                  AC1Legacy::PStringBase<char>::set(arg4, "slashes");
005c924e                  return;
005c922b              }
005c922b              
005c9254              AC1Legacy::PStringBase<char>::set(arg3, "mangle");
005c9262              AC1Legacy::PStringBase<char>::set(arg4, "mangles");
005c9270              return;
005c91ba              break;
005c91ba          }
005c9271          case PIERCE_DAMAGE_TYPE:
005c9271          {
005c9271              long double temp12_1 = ((long double)0.10000000000000001);
005c9271              (x87_r7 - temp12_1);
005c9277              eax_3 = ((((x87_r7 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp12_1) ? 1 : 0) << 0xe) | 0x3800))));
005c9279              bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x41} */;
005c927c              char const* const var_1c_3;
005c927c              
005c927c              if (p_10)
005c927c              {
005c9287                  long double temp20_1 = ((long double)0.25);
005c9287                  (x87_r7 - temp20_1);
005c928d                  eax_3 = ((((x87_r7 < temp20_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp20_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp20_1) ? 1 : 0) << 0xe) | 0x3800))));
005c928f                  bool p_11 = /* bool p_11 = unimplemented  {test ah, 0x41} */;
005c928f                  
005c9292                  if (p_11)
005c9292                  {
005c929d                      long double temp26_1 = ((long double)0.5);
005c929d                      (x87_r7 - temp26_1);
005c92a3                      eax_3 = ((((x87_r7 < temp26_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp26_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp26_1) ? 1 : 0) << 0xe) | 0))));
005c92a5                      bool p_12 = /* bool p_12 = unimplemented  {test ah, 0x41} */;
005c92a5                      
005c92a8                      if (p_12)
005c92b1                          var_1c_3 = "gore";
005c92a8                      else
005c92aa                          var_1c_3 = "impale";
005c9292                  }
005c9292                  else
005c9296                      var_1c_3 = "stab";
005c927c              }
005c927c              else
005c9280                  var_1c_3 = "nick";
005c9280              
005c92bc              AC1Legacy::PStringBase<char>::set(arg3, var_1c_3);
005c92ca              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794520);
005c92e5              void __return_1;
005c92e5              AC1Legacy::PStringBase<char>::operator=(arg4, AC1Legacy::PStringBase<char>::operator+(arg3, &__return_1, &arg2));
005c92ea              ecx_4 = &__return_1;
005c92ee              goto label_5c9631;
005c9271          }
005c907a          case 0x3:
005c907a          case 0x5:
005c907a          case 0x6:
005c907a          case 0x7:
005c907a          {
005c907a              goto label_5c959a;
005c907a          }
005c9103          case BLUDGEON_DAMAGE_TYPE:
005c9103          {
005c9103              long double temp10 = ((long double)0.10000000000000001);
005c9103              (x87_r7 - temp10);
005c910d              eax_3 = ((((x87_r7 < temp10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp10))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp10) ? 1 : 0) << 0xe) | 0x3800))));
005c910f              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
005c910f              
005c9112              if (!(p_4))
005c9112              {
005c911b                  AC1Legacy::PStringBase<char>::set(arg3, "graze");
005c9129                  AC1Legacy::PStringBase<char>::set(arg4, "grazes");
005c9137                  return;
005c9112              }
005c9112              
005c9138              long double temp18 = ((long double)0.25);
005c9138              (x87_r7 - temp18);
005c913e              eax_3 = ((((x87_r7 < temp18) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp18))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp18) ? 1 : 0) << 0xe) | 0x3800))));
005c9140              bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x41} */;
005c9140              
005c9143              if (!(p_5))
005c9143              {
005c914c                  AC1Legacy::PStringBase<char>::set(arg3, "bash");
005c915a                  AC1Legacy::PStringBase<char>::set(arg4, "bashes");
005c9168                  return;
005c9143              }
005c9143              
005c9169              long double temp24 = ((long double)0.5);
005c9169              (x87_r7 - temp24);
005c916f              eax_3 = ((((x87_r7 < temp24) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp24))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp24) ? 1 : 0) << 0xe) | 0))));
005c9171              bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x41} */;
005c9171              
005c9174              if (!(p_6))
005c9174              {
005c917b                  AC1Legacy::PStringBase<char>::set(arg3, "smash");
005c9189                  AC1Legacy::PStringBase<char>::set(arg4, "smashes");
005c9197                  return;
005c9174              }
005c9174              
005c919d              AC1Legacy::PStringBase<char>::set(arg3, "crush");
005c91ab              AC1Legacy::PStringBase<char>::set(arg4, "crushes");
005c91b9              return;
005c9103              break;
005c9103          }
005c9081          case COLD_DAMAGE_TYPE:
005c9081          {
005c9081              long double temp9_1 = ((long double)0.10000000000000001);
005c9081              (x87_r7 - temp9_1);
005c9087              eax_3 = ((((x87_r7 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp9_1) ? 1 : 0) << 0xe) | 0x3800))));
005c9089              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
005c908c              char const* const var_1c;
005c908c              
005c908c              if (p_1)
005c908c              {
005c9097                  long double temp17_1 = ((long double)0.25);
005c9097                  (x87_r7 - temp17_1);
005c909d                  eax_3 = ((((x87_r7 < temp17_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp17_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp17_1) ? 1 : 0) << 0xe) | 0x3800))));
005c909f                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
005c909f                  
005c90a2                  if (p_2)
005c90a2                  {
005c90ad                      long double temp23_1 = ((long double)0.5);
005c90ad                      (x87_r7 - temp23_1);
005c90b3                      eax_3 = ((((x87_r7 < temp23_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp23_1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp23_1) ? 1 : 0) << 0xe) | 0))));
005c90b5                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
005c90b5                      
005c90b8                      if (p_3)
005c90c1                          var_1c = "freeze";
005c90b8                      else
005c90ba                          var_1c = "frost";
005c90a2                  }
005c90a2                  else
005c90a6                      var_1c = "chill";
005c908c              }
005c908c              else
005c9090                  var_1c = "numb";
005c9090              
005c90cc              AC1Legacy::PStringBase<char>::set(arg3, var_1c);
005c90da              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg2, &data_794520);
005c90f5              void __return;
005c90f5              AC1Legacy::PStringBase<char>::operator=(arg4, AC1Legacy::PStringBase<char>::operator+(arg3, &__return, &arg2));
005c90fa              ecx_4 = &__return;
005c90fe              goto label_5c9631;
005c9081          }
005c93c7      }
005c9040  }

005c9649                             8d 49 00                                                                       .I.
005c964c  uint32_t jump_table_5c964c[0x8] = 
005c964c  {
005c964c      [0x0] =  0x005c91ba
005c9650      [0x1] =  0x005c9271
005c9654      [0x2] =  0x005c958f
005c9658      [0x3] =  0x005c9103
005c965c      [0x4] =  0x005c958f
005c9660      [0x5] =  0x005c958f
005c9664      [0x6] =  0x005c958f
005c9668      [0x7] =  0x005c9081
005c966c  }

005c966c                                      90 90 90 90                                                              ....

005c9670  int32_t TinkeringSystem::IsValidMaterialType(uint32_t arg1)

005c9670  {
005c9678      if ((arg1 - 1) <= 0x4c)
005c9681          switch (arg1)
005c9681          {
005c968d              case 1:
005c968d              case 2:
005c968d              case 4:
005c968d              case 5:
005c968d              case 6:
005c968d              case 7:
005c968d              case 8:
005c968d              case 0xa:
005c968d              case 0xb:
005c968d              case 0xc:
005c968d              case 0xd:
005c968d              case 0xe:
005c968d              case 0xf:
005c968d              case 0x10:
005c968d              case 0x11:
005c968d              case 0x12:
005c968d              case 0x13:
005c968d              case 0x14:
005c968d              case 0x15:
005c968d              case 0x16:
005c968d              case 0x17:
005c968d              case 0x18:
005c968d              case 0x19:
005c968d              case 0x1a:
005c968d              case 0x1b:
005c968d              case 0x1c:
005c968d              case 0x1d:
005c968d              case 0x1e:
005c968d              case 0x1f:
005c968d              case 0x20:
005c968d              case 0x21:
005c968d              case 0x22:
005c968d              case 0x23:
005c968d              case 0x24:
005c968d              case 0x25:
005c968d              case 0x26:
005c968d              case 0x27:
005c968d              case 0x28:
005c968d              case 0x29:
005c968d              case 0x2a:
005c968d              case 0x2b:
005c968d              case 0x2c:
005c968d              case 0x2d:
005c968d              case 0x2e:
005c968d              case 0x2f:
005c968d              case 0x30:
005c968d              case 0x31:
005c968d              case 0x32:
005c968d              case 0x33:
005c968d              case 0x34:
005c968d              case 0x35:
005c968d              case 0x36:
005c968d              case 0x37:
005c968d              case 0x39:
005c968d              case 0x3a:
005c968d              case 0x3b:
005c968d              case 0x3c:
005c968d              case 0x3d:
005c968d              case 0x3e:
005c968d              case 0x3f:
005c968d              case 0x40:
005c968d              case 0x42:
005c968d              case 0x43:
005c968d              case 0x44:
005c968d              case 0x45:
005c968d              case 0x46:
005c968d              case 0x47:
005c968d              case 0x49:
005c968d              case 0x4a:
005c968d              case 0x4b:
005c968d              case 0x4c:
005c968d              case 0x4d:
005c968d              {
005c968d                  return 1;
005c968d                  break;
005c968d              }
005c9681          }
005c9681      
005c9690      return 0;
005c9670  }

005c9691                                                     8d 49 00                                                       .I.
005c9694  uint32_t jump_table_5c9694[0x2] = 
005c9694  {
005c9694      [0x0] =  0x005c9688
005c9698      [0x1] =  0x005c968e
005c969c  }
005c969c  uint8_t lookup_table_5c969c[0x4d] = 
005c969c  {
005c969c      [0x00] =  0x00
005c969d      [0x01] =  0x00
005c969e      [0x02] =  0x01
005c969f      [0x03] =  0x00
005c96a0      [0x04] =  0x00
005c96a1      [0x05] =  0x00
005c96a2      [0x06] =  0x00
005c96a3      [0x07] =  0x00
005c96a4      [0x08] =  0x01
005c96a5      [0x09] =  0x00
005c96a6      [0x0a] =  0x00
005c96a7      [0x0b] =  0x00
005c96a8      [0x0c] =  0x00
005c96a9      [0x0d] =  0x00
005c96aa      [0x0e] =  0x00
005c96ab      [0x0f] =  0x00
005c96ac      [0x10] =  0x00
005c96ad      [0x11] =  0x00
005c96ae      [0x12] =  0x00
005c96af      [0x13] =  0x00
005c96b0      [0x14] =  0x00
005c96b1      [0x15] =  0x00
005c96b2      [0x16] =  0x00
005c96b3      [0x17] =  0x00
005c96b4      [0x18] =  0x00
005c96b5      [0x19] =  0x00
005c96b6      [0x1a] =  0x00
005c96b7      [0x1b] =  0x00
005c96b8      [0x1c] =  0x00
005c96b9      [0x1d] =  0x00
005c96ba      [0x1e] =  0x00
005c96bb      [0x1f] =  0x00
005c96bc      [0x20] =  0x00
005c96bd      [0x21] =  0x00
005c96be      [0x22] =  0x00
005c96bf      [0x23] =  0x00
005c96c0      [0x24] =  0x00
005c96c1      [0x25] =  0x00
005c96c2      [0x26] =  0x00
005c96c3      [0x27] =  0x00
005c96c4      [0x28] =  0x00
005c96c5      [0x29] =  0x00
005c96c6      [0x2a] =  0x00
005c96c7      [0x2b] =  0x00
005c96c8      [0x2c] =  0x00
005c96c9      [0x2d] =  0x00
005c96ca      [0x2e] =  0x00
005c96cb      [0x2f] =  0x00
005c96cc      [0x30] =  0x00
005c96cd      [0x31] =  0x00
005c96ce      [0x32] =  0x00
005c96cf      [0x33] =  0x00
005c96d0      [0x34] =  0x00
005c96d1      [0x35] =  0x00
005c96d2      [0x36] =  0x00
005c96d3      [0x37] =  0x01
005c96d4      [0x38] =  0x00
005c96d5      [0x39] =  0x00
005c96d6      [0x3a] =  0x00
005c96d7      [0x3b] =  0x00
005c96d8      [0x3c] =  0x00
005c96d9      [0x3d] =  0x00
005c96da      [0x3e] =  0x00
005c96db      [0x3f] =  0x00
005c96dc      [0x40] =  0x01
005c96dd      [0x41] =  0x00
005c96de      [0x42] =  0x00
005c96df      [0x43] =  0x00
005c96e0      [0x44] =  0x00
005c96e1      [0x45] =  0x00
005c96e2      [0x46] =  0x00
005c96e3      [0x47] =  0x01
005c96e4      [0x48] =  0x00
005c96e5      [0x49] =  0x00
005c96e6      [0x4a] =  0x00
005c96e7      [0x4b] =  0x00
005c96e8      [0x4c] =  0x00
005c96e9  }

005c96e9                             90 90 90 90 90 90 90                                                           .......

005c96f0  class PackableList<SalvageResult>* __fastcall SalvageOperationsResultData::GetSalvageResults(class SalvageOperationsResultData const* this) __pure

005c96f0  {
005c96f3      return &this->m_salvageResults;
005c96f0  }

005c96f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c9700  uint32_t __thiscall SalvageOperationsResultData::Pack(class SalvageOperationsResultData* this, void** arg2, uint32_t arg3)

005c9700  {
005c9700      class SalvageOperationsResultData* this_1 = this;
005c9707      struct PackableList<unsigned long>::VTable* vtable = this->m_notSalvagable.vtable;
005c9716      this_1 = nullptr;
005c9738      class SalvageOperationsResultData* this_2 = ((vtable->Pack(&this_1, 0) + this->m_salvageResults.vtable->Pack(&this_1, 0)) + 8);
005c973e      this_1 = this_2;
005c973e      
005c9742      if (arg3 < this_2)
005c9780          return this_2;
005c9780      
005c974d      **(uint32_t**)arg2 = this->m_skillUsed;
005c9755      *(uint32_t*)arg2 += 4;
005c9710      this->m_notSalvagable.vtable->Pack(arg2, arg3);
005c971e      this->m_salvageResults.vtable->Pack(arg2, arg3);
005c9772      **(uint32_t**)arg2 = this->m_augBonus;
005c9774      *(uint32_t*)arg2 += 4;
005c9777      return this_1;
005c9700  }

005c9783           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005c9790  int32_t __thiscall SalvageOperationsResultData::UnPack(class SalvageOperationsResultData* this, void** arg2, uint32_t arg3)

005c9790  {
005c9790      class SalvageOperationsResultData* this_1 = this;
005c9797      struct PackableList<unsigned long>::VTable* vtable = this->m_notSalvagable.vtable;
005c97a6      this_1 = nullptr;
005c97a6      
005c97cf      if (arg3 >= ((vtable->Pack(&this_1, 0) + this->m_salvageResults.vtable->Pack(&this_1, 0)) + 8))
005c97cf      {
005c97d9          this->m_skillUsed = **(uint32_t**)arg2;
005c97e2          *(uint32_t*)arg2 += 4;
005c97e2          
005c97ee          if ((this->m_notSalvagable.vtable->UnPack(arg2, arg3) != 0 && this->m_salvageResults.vtable->UnPack(arg2, arg3) != 0))
005c97ee          {
005c9810              this->m_augBonus = **(uint32_t**)arg2;
005c9819              *(uint32_t*)arg2 += 4;
005c9824              return 1;
005c97ee          }
005c97cf      }
005c97cf      
005c9809      return 0;
005c9790  }

005c9827                       90 90 90 90 90 90 90 90 90                                                         .........

005c9830  void* __thiscall PackObj::`scalar deleting destructor'(class PackObj* this, uint32_t arg2)

005c9830  {
005c9838      this->vtable = 0x79285c;
005c9838      
005c983e      if ((arg2 & 1) != 0)
005c9841          operator delete(this);
005c9841      
005c984c      return this;
005c9830  }

005c984f                                               90                                                                 .

005c9850  uint32_t __thiscall SalvageResult::Pack(class SalvageResult* this, void** arg2, uint32_t arg3)

005c9850  {
005c9855      if (arg3 >= 0x10)
005c9855      {
005c9861          **(uint32_t**)arg2 = this->m_material;
005c9865          void* esi_3 = (*(uint32_t*)arg2 + 4);
005c9868          *(uint32_t*)arg2 = esi_3;
005c986f          *(uint64_t*)esi_3 = ((double)((long double)this->m_workmanship));
005c9873          void* edx_4 = (*(uint32_t*)arg2 + 8);
005c9876          *(uint32_t*)arg2 = edx_4;
005c987b          *(uint32_t*)edx_4 = this->m_units;
005c987d          *(uint32_t*)arg2 += 4;
005c9855      }
005c9855      
005c9886      return 0x10;
005c9850  }

005c9889                             90 90 90 90 90 90 90                                                           .......

005c9890  int32_t __thiscall SalvageResult::UnPack(class SalvageResult* this, void** arg2, uint32_t arg3)

005c9890  {
005c9895      if (arg3 < 0x10)
005c9899          return 0;
005c9899      
005c98a4      this->m_material = **(uint32_t**)arg2;
005c98aa      void* esi_1 = (*(uint32_t*)arg2 + 4);
005c98ad      *(uint32_t*)arg2 = esi_1;
005c98b3      this->m_workmanship = *(uint32_t*)esi_1;
005c98b9      *(uint32_t*)((char*)this->m_workmanship)[4] = *(uint32_t*)((char*)esi_1 + 4);
005c98be      void* edx_5 = (*(uint32_t*)arg2 + 8);
005c98c1      *(uint32_t*)arg2 = edx_5;
005c98c5      this->m_units = *(uint32_t*)edx_5;
005c98c8      *(uint32_t*)arg2 += 4;
005c98d1      return 1;
005c9890  }

005c98d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005c98e0  uint32_t __thiscall PackableList<HousePayment>::Pack(class PackableList<HousePayment>* this, void** arg2, uint32_t arg3)

005c98e0  {
005c98e5      uint32_t result = PackableList<HousePayment>::pack_size(this);
005c98e5      
005c98f2      if (arg3 >= result)
005c98f2      {
005c98fc          if (arg3 >= 4)
005c98fc          {
005c9903              **(uint32_t**)arg2 = this->curNum;
005c9905              *(uint32_t*)arg2 += 4;
005c98fc          }
005c98fc          
005c990d          for (class PackableLLNode<HousePayment>* i = this->head; i != 0; i = i->next)
005c9910              i->data.vtable->Pack(arg2, arg3);
005c98f2      }
005c98f2      
005c9926      return result;
005c98e0  }

005c9929                             90 90 90 90 90 90 90                                                           .......

005c9930  uint32_t __fastcall PackableList<HousePayment>::pack_size(class PackableList<HousePayment>* this)

005c9930  {
005c9930      class PackableList<HousePayment>* this_1 = this;
005c9932      class PackableLLNode<HousePayment>* i = this->head;
005c9938      int32_t result = 4;
005c993d      this_1 = nullptr;
005c993d      
005c9945      while (i != 0)
005c9945      {
005c9952          int32_t eax_2 = i->data.vtable->Pack(&this_1, 0);
005c9955          i = i->next;
005c9958          result += eax_2;
005c9945      }
005c9945      
005c9963      return result;
005c9930  }

005c9964              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c9970  void __fastcall PackableList<SalvageResult>::Flush(class PackableList<SalvageResult>* this)

005c9970  {
005c997b      while (this->head != 0)
005c997b      {
005c9980          class PackableLLNode<SalvageResult>* head = this->head;
005c9980          
005c9985          if (head != 0)
005c9985          {
005c9987              class PackableLLNode<SalvageResult>* next = head->next;
005c998c              this->head = next;
005c998c              
005c998f              if (next == 0)
005c9996                  this->tail = nullptr;
005c998f              else
005c9991                  next->prev = nullptr;
005c9991              
005c999b              if (head != 0)
005c999b              {
005c999e                  head->data.vtable = 0x79285c;
005c99a4                  operator delete(head);
005c999b              }
005c999b              
005c99ac              this->curNum -= 1;
005c9985          }
005c997b      }
005c9970  }

005c99b7                                                                       90 90 90 90 90 90 90 90 90                         .........

005c99c0  void __fastcall PackableList<SalvageResult>::~PackableList<SalvageResult>(class PackableList<SalvageResult>* this)

005c99c0  {
005c99c3      this->vtable = 0x7e7f1c;
005c99c9      PackableList<SalvageResult>::Flush(this);
005c99ce      this->vtable = 0x79285c;
005c99c0  }

005c99d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005c99e0  int32_t __thiscall PackableList<SalvageResult>::UnPack(class PackableList<SalvageResult>* this, void** arg2, uint32_t arg3)

005c99e0  {
005c99e6      PackableList<SalvageResult>::Flush(this);
005c99e6      
005c99f0      if (arg3 < 4)
005c9a5b          return 0;
005c9a5b      
005c99f7      void* eax = *(uint32_t*)arg2;
005c99fa      int32_t esi = 0;
005c99fd      int32_t edi = *(uint32_t*)eax;
005c9a04      *(uint32_t*)arg2 = ((char*)eax + 4);
005c9a06      int32_t var_18 = 0x7e7f08;
005c9a0e      int32_t var_14 = 0;
005c9a12      int32_t var_10 = 0;
005c9a16      int32_t var_c = 0;
005c9a1a      int32_t var_8 = 0;
005c9a1a      
005c9a1e      if (edi > 0)
005c9a1e      {
005c9a44          do
005c9a44          {
005c9a33              if (*(uint32_t*)(var_18 + 0x10)(arg2, arg3) == 0)
005c9a67                  return 0;
005c9a67              
005c9a3c              PackableList<SalvageResult>::InsertTail(this, &var_18);
005c9a41              esi += 1;
005c9a44          } while (esi < edi);
005c9a1e      }
005c9a1e      
005c9a52      return 1;
005c99e0  }

005c9a6a                                90 90 90 90 90 90                                                            ......

005c9a70  uint32_t __thiscall PackableList<SalvageResult>::InsertTail(class PackableList<SalvageResult>* this, class SalvageResult const* arg2)

005c9a70  {
005c9a75      void* eax = operator new(0x20);
005c9a75      
005c9a81      if (eax == 0)
005c9aaf          eax = nullptr;
005c9a81      else
005c9a81      {
005c9a88          *(uint32_t*)eax = 0x7e7f08;
005c9a91          *(uint32_t*)((char*)eax + 4) = arg2->m_material;
005c9a97          *(uint32_t*)((char*)eax + 8) = arg2->m_workmanship;
005c9a9d          *(uint32_t*)((char*)eax + 0xc) = *(uint32_t*)((char*)arg2->m_workmanship)[4];
005c9aa3          *(uint32_t*)((char*)eax + 0x10) = arg2->m_units;
005c9aa6          *(uint32_t*)((char*)eax + 0x18) = 0;
005c9aa9          *(uint32_t*)((char*)eax + 0x1c) = 0;
005c9a81      }
005c9a81      
005c9ab4      if (this->head == 0)
005c9ab4      {
005c9ab6          this->head = eax;
005c9ab9          this->tail = eax;
005c9abf          uint32_t eax_2 = (this->curNum + 1);
005c9ac0          this->curNum = eax_2;
005c9ac4          return eax_2;
005c9ab4      }
005c9ab4      
005c9ac7      class PackableLLNode<SalvageResult>* tail = this->tail;
005c9aca      tail->next = eax;
005c9acd      *(uint32_t*)((char*)eax + 0x1c) = tail;
005c9ad0      this->tail = eax;
005c9ad6      uint32_t eax_4 = (this->curNum + 1);
005c9ad7      this->curNum = eax_4;
005c9adb      return eax_4;
005c9a70  }

005c9ade                                                                                            90 90                                ..

005c9ae0  void* __thiscall PackableList<SalvageResult>::`scalar deleting destructor'(class PackableList<SalvageResult>* this, uint32_t arg2)

005c9ae0  {
005c9ae3      this->vtable = 0x7e7f1c;
005c9ae9      PackableList<SalvageResult>::Flush(this);
005c9af3      this->vtable = 0x79285c;
005c9af3      
005c9af9      if ((arg2 & 1) != 0)
005c9afc          operator delete(this);
005c9afc      
005c9b07      return this;
005c9ae0  }

005c9b0a                                90 90 90 90 90 90                                                            ......

005c9b10  void __fastcall SalvageOperationsResultData::SalvageOperationsResultData(class SalvageOperationsResultData* this)

005c9b10  {
005c9b14      this->vtable = 0x7e7f30;
005c9b1a      this->m_skillUsed = 0;
005c9b1d      this->m_notSalvagable.vtable = 0x7a3e80;
005c9b24      this->m_notSalvagable.head = nullptr;
005c9b27      this->m_notSalvagable.tail = nullptr;
005c9b2a      this->m_notSalvagable.curNum = 0;
005c9b2d      this->m_salvageResults.vtable = 0x7e7f1c;
005c9b34      __builtin_memset(&this->m_salvageResults.head, 0, 0x18);
005c9b10  }

005c9b47                       90 90 90 90 90 90 90 90 90                                                         .........

005c9b50  void* __thiscall SalvageOperationsResultData::`scalar deleting destructor'(class SalvageOperationsResultData* this, uint32_t arg2)

005c9b50  {
005c9b56      PackableList<SalvageResult>::~PackableList<SalvageResult>(&this->m_salvageResults);
005c9b5e      PackableList<unsigned long>::~PackableList<unsigned long>(&this->m_notSalvagable);
005c9b68      this->vtable = 0x79285c;
005c9b68      
005c9b6e      if ((arg2 & 1) != 0)
005c9b71          operator delete(this);
005c9b71      
005c9b7c      return this;
005c9b50  }

005c9b7f                                                                                               90                                 .

005c9b80  class AC1Legacy::PStringBase<char>* CombatEnumMapper::CombatModeToString(class AC1Legacy::PStringBase<char>* __return, enum COMBAT_MODE const arg2)

005c9b80  {
005c9b89      if ((arg2 - 1) <= 7)
005c9b8b          switch (arg2)
005c9b8b          {
005c9b9d              case NONCOMBAT_COMBAT_MODE:
005c9b9d              {
005c9b9d                  AC1Legacy::PStringBase<char>::PStringBase<char>(__return, "peace");
005c9ba5                  return __return;
005c9b9d                  break;
005c9b9d              }
005c9bb1              case MELEE_COMBAT_MODE:
005c9bb1              {
005c9bb1                  AC1Legacy::PStringBase<char>::PStringBase<char>(__return, "melee");
005c9bb9                  return __return;
005c9bb1                  break;
005c9bb1              }
005c9bc5              case MISSILE_COMBAT_MODE:
005c9bc5              {
005c9bc5                  AC1Legacy::PStringBase<char>::PStringBase<char>(__return, "missile");
005c9bcd                  return __return;
005c9bc5                  break;
005c9bc5              }
005c9bd9              case MAGIC_COMBAT_MODE:
005c9bd9              {
005c9bd9                  AC1Legacy::PStringBase<char>::PStringBase<char>(__return, "magic");
005c9be1                  return __return;
005c9bd9                  break;
005c9bd9              }
005c9b8b          }
005c9b8b      
005c9bed      AC1Legacy::PStringBase<char>::PStringBase<char>(__return, "unknown");
005c9bf5      return __return;
005c9b80  }

005c9bf6                                                                    8b ff                                                ..
005c9bf8  uint32_t jump_table_5c9bf8[0x8] = 
005c9bf8  {
005c9bf8      [0x0] =  0x005c9b92
005c9bfc      [0x1] =  0x005c9ba6
005c9c00      [0x2] =  0x005c9be2
005c9c04      [0x3] =  0x005c9bba
005c9c08      [0x4] =  0x005c9be2
005c9c0c      [0x5] =  0x005c9be2
005c9c10      [0x6] =  0x005c9be2
005c9c14      [0x7] =  0x005c9bce
005c9c18  }

005c9c18                                                                          90 90 90 90 90 90 90 90                          ........

005c9c20  uint32_t __thiscall ExperienceTable::GetExperienceForTrainedSkillLevel(class ExperienceTable const* this, uint32_t arg2)

005c9c20  {
005c9c27      if (arg2 <= this->_max_trained_skill_level)
005c9c27      {
005c9c29          uint32_t* _trained_skill_table = this->_trained_skill_table;
005c9c29          
005c9c2e          if (_trained_skill_table != 0)
005c9c39              return _trained_skill_table[arg2];
005c9c27      }
005c9c27      
005c9c33      return 0xffffffff;
005c9c20  }

005c9c3c                                                                                      90 90 90 90                              ....

005c9c40  uint32_t __thiscall ExperienceTable::GetExperienceForSpecializedSkillLevel(class ExperienceTable const* this, uint32_t arg2)

005c9c40  {
005c9c47      if (arg2 <= this->_max_specialized_skill_level)
005c9c47      {
005c9c49          uint32_t* _specialized_skill_table = this->_specialized_skill_table;
005c9c49          
005c9c4e          if (_specialized_skill_table != 0)
005c9c59              return _specialized_skill_table[arg2];
005c9c47      }
005c9c47      
005c9c53      return 0xffffffff;
005c9c40  }

005c9c5c                                                                                      90 90 90 90                              ....

005c9c60  uint32_t __thiscall ExperienceTable::GetExperienceForAttributeLevel(class ExperienceTable const* this, uint32_t arg2)

005c9c60  {
005c9c67      if (arg2 <= this->_max_attribute_level)
005c9c67      {
005c9c69          uint32_t* _attribute_table = this->_attribute_table;
005c9c69          
005c9c6e          if (_attribute_table != 0)
005c9c79              return _attribute_table[arg2];
005c9c67      }
005c9c67      
005c9c73      return 0xffffffff;
005c9c60  }

005c9c7c                                                                                      90 90 90 90                              ....

005c9c80  uint32_t __thiscall ExperienceTable::GetExperienceForAttribute2ndLevel(class ExperienceTable const* this, uint32_t arg2)

005c9c80  {
005c9c87      if (arg2 <= this->_max_attribute2nd_level)
005c9c87      {
005c9c89          uint32_t* _attribute2nd_table = this->_attribute2nd_table;
005c9c89          
005c9c8e          if (_attribute2nd_table != 0)
005c9c99              return _attribute2nd_table[arg2];
005c9c87      }
005c9c87      
005c9c93      return 0xffffffff;
005c9c80  }

005c9c9c                                                                                      90 90 90 90                              ....

005c9ca0  int32_t __thiscall ExperienceTable::GetExperienceForLevel(class ExperienceTable const* this, uint32_t arg2)

005c9ca0  {
005c9ca0      uint32_t _max_level = this->_max_level;
005c9ca3      uint32_t _max_level_1 = arg2;
005c9ca3      
005c9ca9      if (_max_level_1 > _max_level)
005c9cab          _max_level_1 = _max_level;
005c9cab      
005c9cad      uint64_t* _level_table = this->_level_table;
005c9cad      
005c9cb2      if (_level_table == 0)
005c9cb8          return 0;
005c9cb8      
005c9cbe      *(uint32_t*)(&_level_table[_max_level_1] + 4);
005c9cc2      return _level_table[_max_level_1];
005c9ca0  }

005c9cc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005c9cd0  uint32_t __thiscall ExperienceTable::GetExperienceForLevel(class ExperienceTable const* this, enum ExperienceType arg2, uint32_t arg3)

005c9cd0  {
005c9cd8      uint32_t eax_1;
005c9cd8      uint32_t* ecx;
005c9cd8      
005c9cd8      if ((arg2 - 1) <= 3)
005c9cda          switch (arg2)
005c9cda          {
005c9ce1              case Attribute_ExperienceType:
005c9ce1              {
005c9ce1                  eax_1 = arg3;
005c9ce1                  
005c9ce8                  if (eax_1 <= this->_max_attribute_level)
005c9ce8                  {
005c9cea                      ecx = this->_attribute_table;
005c9ced                  label_5c9ced:
005c9ced                      
005c9cef                      if (ecx != 0)
005c9d26                          return *(uint32_t*)&ecx[eax_1];
005c9ce8                  }
005c9ce1                  break;
005c9ce1              }
005c9cf7              case Attribute2nd_ExperienceType:
005c9cf7              {
005c9cf7                  eax_1 = arg3;
005c9cf7                  
005c9cfe                  if (eax_1 <= this->_max_attribute2nd_level)
005c9cfe                  {
005c9d00                      ecx = this->_attribute2nd_table;
005c9d03                      goto label_5c9ced;
005c9cfe                  }
005c9cf7                  break;
005c9cf7              }
005c9d05              case TrainedSkill_ExperienceType:
005c9d05              {
005c9d05                  eax_1 = arg3;
005c9d05                  
005c9d0c                  if (eax_1 <= this->_max_trained_skill_level)
005c9d0c                  {
005c9d0e                      ecx = this->_trained_skill_table;
005c9d11                      goto label_5c9ced;
005c9d0c                  }
005c9d05                  break;
005c9d05              }
005c9d13              case SpecializedSkill_ExperienceType:
005c9d13              {
005c9d1a                  if (arg3 <= this->_max_specialized_skill_level)
005c9d1a                  {
005c9d1c                      ecx = this->_specialized_skill_table;
005c9d1c                      
005c9d21                      if (ecx != 0)
005c9d26                          return *(uint32_t*)&ecx[arg3];
005c9d1a                  }
005c9d13                  break;
005c9d13              }
005c9cda          }
005c9cf4      return 0xffffffff;
005c9cd0  }

005c9d29                             8d 49 00                                                                       .I.
005c9d2c  uint32_t jump_table_5c9d2c[0x4] = 
005c9d2c  {
005c9d2c      [0x0] =  0x005c9ce1
005c9d30      [0x1] =  0x005c9cf7
005c9d34      [0x2] =  0x005c9d05
005c9d38      [0x3] =  0x005c9d13
005c9d3c  }

005c9d3c                                                                                      90 90 90 90                              ....

005c9d40  uint32_t __thiscall ExperienceTable::GetLevelForExperience(class ExperienceTable const* this, enum ExperienceType arg2, uint32_t arg3)

005c9d40  {
005c9d53      if ((arg2 - 1) <= 4)
005c9d55          switch (arg2)
005c9d55          {
005c9d5c              case Attribute_ExperienceType:
005c9d5c              {
005c9d5c                  this->_max_attribute_level;
005c9d5c                  break;
005c9d5c              }
005c9d61              case Attribute2nd_ExperienceType:
005c9d61              {
005c9d61                  this->_max_attribute2nd_level;
005c9d61                  break;
005c9d61              }
005c9d66              case TrainedSkill_ExperienceType:
005c9d66              {
005c9d66                  this->_max_trained_skill_level;
005c9d66                  break;
005c9d66              }
005c9d6b              case SpecializedSkill_ExperienceType:
005c9d6b              {
005c9d6b                  this->_max_specialized_skill_level;
005c9d6b                  break;
005c9d6b              }
005c9d70              case Level_ExperienceType:
005c9d70              {
005c9d70                  this->_max_level;
005c9d70                  break;
005c9d70              }
005c9d55          }
005c9d55      
005c9d9a      uint32_t result = _ftol2();
005c9d9c      int32_t var_8_1 = 1;
005c9e3e      bool cond:5_1;
005c9e3e      
005c9e3e      do
005c9e3e      {
005c9dac          uint32_t eax_3 = ExperienceTable::GetExperienceForLevel(this, arg2, result);
005c9dac          
005c9dcc          if (arg3 <= (ExperienceTable::GetExperienceForLevel(this, arg2, (result + 1)) - 1))
005c9dcc          {
005c9e03              if (arg3 >= eax_3)
005c9e4d                  return result;
005c9e4d              
005c9e27              int32_t eax_10 = _ftol2();
005c9e27              
005c9e2e              if (eax_10 == 0)
005c9e2e                  break;
005c9e2e              
005c9e30              result -= eax_10;
005c9dcc          }
005c9dcc          else
005c9dcc          {
005c9df2              int32_t eax_7 = _ftol2();
005c9df2              
005c9df9              if (eax_7 == 0)
005c9df9                  break;
005c9df9              
005c9dfb              result += eax_7;
005c9dcc          }
005c9dcc          
005c9e37          cond:5_1 = (var_8_1 + 1) <= 0x10;
005c9e3a          var_8_1 += 1;
005c9e3e      } while (cond:5_1);
005c9e44      return result;
005c9d40  }

005c9e50  uint32_t jump_table_5c9e50[0x5] = 
005c9e50  {
005c9e50      [0x0] =  0x005c9d5c
005c9e54      [0x1] =  0x005c9d61
005c9e58      [0x2] =  0x005c9d66
005c9e5c      [0x3] =  0x005c9d6b
005c9e60      [0x4] =  0x005c9d70
005c9e64  }

005c9e64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005c9e70  uint32_t __thiscall ExperienceTable::GetTrainedSkillLevelForExperience(class ExperienceTable const* this, uint32_t arg2)

005c9e70  {
005c9e7c      return ExperienceTable::GetLevelForExperience(this, TrainedSkill_ExperienceType, arg2);
005c9e70  }

005c9e7f                                                                                               90                                 .

005c9e80  uint32_t __thiscall ExperienceTable::GetSpecializedSkillLevelForExperience(class ExperienceTable const* this, uint32_t arg2)

005c9e80  {
005c9e8c      return ExperienceTable::GetLevelForExperience(this, SpecializedSkill_ExperienceType, arg2);
005c9e80  }

005c9e8f                                               90                                                                 .

005c9e90  uint32_t __thiscall ExperienceTable::GetAttributeLevelForExperience(class ExperienceTable const* this, uint32_t arg2)

005c9e90  {
005c9e9c      return ExperienceTable::GetLevelForExperience(this, Attribute_ExperienceType, arg2);
005c9e90  }

005c9e9f                                                                                               90                                 .

005c9ea0  uint32_t __thiscall ExperienceTable::GetAttribute2ndLevelForExperience(class ExperienceTable const* this, uint32_t arg2)

005c9ea0  {
005c9eac      return ExperienceTable::GetLevelForExperience(this, Attribute2nd_ExperienceType, arg2);
005c9ea0  }

005c9eaf                                               90                                                                 .

005c9eb0  uint32_t __thiscall ExperienceTable::Pack(class ExperienceTable* this, void** arg2, uint32_t arg3)

005c9eb0  {
005c9eb0      uint32_t id = this->m_DID.id;
005c9eb7      int32_t ebx = this->m_bLoaded*(int32_t*)((char*)this + 8);
005c9ed0      int32_t result = ((((((&*(uint92_t*)((char*)*(uint112_t*)((char*)this->m_pMaintainer->m_ObjTable)[4])[4] + (id << 1)) + this->m_pNext) + this->m_timeStamp) + ebx) + id) << 2);
005c9ed0      
005c9ed6      if (arg3 >= result)
005c9ed6      {
005c9ee4          **(uint32_t**)arg2 = ebx;
005c9ee8          void* esi_3 = (*(uint32_t*)arg2 + 4);
005c9eeb          *(uint32_t*)arg2 = esi_3;
005c9ef0          *(uint32_t*)esi_3 = this->m_timeStamp;
005c9ef4          void* ebp_2 = (*(uint32_t*)arg2 + 4);
005c9ef7          *(uint32_t*)arg2 = ebp_2;
005c9efe          *(uint32_t*)ebp_2 = this->m_pNext;
005c9f02          void* ebx_2 = (*(uint32_t*)arg2 + 4);
005c9f05          *(uint32_t*)arg2 = ebx_2;
005c9f0c          *(uint32_t*)ebx_2 = this->m_pMaintainer;
005c9f10          void* edi_6 = (*(uint32_t*)arg2 + 4);
005c9f13          *(uint32_t*)arg2 = edi_6;
005c9f1a          *(uint32_t*)edi_6 = this->m_DID.id;
005c9f1e          void* esi_8 = (*(uint32_t*)arg2 + 4);
005c9f21          *(uint32_t*)arg2 = esi_8;
005c9f26          int32_t i = 0;
005c9f26          
005c9f29          if (this->m_bLoaded*(int32_t*)((char*)this + 8) != 0xffffffff)
005c9f29          {
005c9f5b              do
005c9f5b              {
005c9f33                  int32_t ebx_4;
005c9f33                  
005c9f33                  if (i <= this->m_bLoaded*(int32_t*)((char*)this + 8))
005c9f33                  {
005c9f3a                      int32_t ebx_5 = *(int32_t*)((char*)this + 0xc);
005c9f3a                      
005c9f3f                      if (ebx_5 != 0)
005c9f46                          ebx_4 = *(uint32_t*)(ebx_5 + (i << 2));
005c9f3f                      else
005c9f41                          ebx_4 = 0xffffffff;
005c9f33                  }
005c9f33                  else
005c9f35                      ebx_4 = 0xffffffff;
005c9f35                  
005c9f49                  *(uint32_t*)esi_8 = ebx_4;
005c9f4d                  void* ebp_4 = (*(uint32_t*)arg2 + 4);
005c9f50                  *(uint32_t*)arg2 = ebp_4;
005c9f55                  i += 1;
005c9f59                  esi_8 = ebp_4;
005c9f5b              } while (i < (this->m_bLoaded*(int32_t*)((char*)this + 8) + 1));
005c9f29          }
005c9f29          
005c9f60          int32_t i_1 = 0;
005c9f60          
005c9f63          if (this->m_timeStamp != 0xffffffff)
005c9f63          {
005c9f90              do
005c9f90              {
005c9f68                  int32_t ebx_9;
005c9f68                  
005c9f68                  if (i_1 <= this->m_timeStamp)
005c9f68                  {
005c9f6f                      int32_t ebx_10 = *(uint32_t*)((char*)this->m_timeStamp)[4];
005c9f6f                      
005c9f74                      if (ebx_10 != 0)
005c9f7b                          ebx_9 = *(uint32_t*)(ebx_10 + (i_1 << 2));
005c9f74                      else
005c9f76                          ebx_9 = 0xffffffff;
005c9f68                  }
005c9f68                  else
005c9f6a                      ebx_9 = 0xffffffff;
005c9f6a                  
005c9f7e                  *(uint32_t*)esi_8 = ebx_9;
005c9f82                  void* ebp_6 = (*(uint32_t*)arg2 + 4);
005c9f85                  *(uint32_t*)arg2 = ebp_6;
005c9f8a                  i_1 += 1;
005c9f8e                  esi_8 = ebp_6;
005c9f90              } while (i_1 < (this->m_timeStamp + 1));
005c9f63          }
005c9f63          
005c9f95          int32_t i_2 = 0;
005c9f95          
005c9f98          if (this->m_pNext != 0xffffffff)
005c9f98          {
005c9fcb              do
005c9fcb              {
005c9fa3                  int32_t ebx_14;
005c9fa3                  
005c9fa3                  if (i_2 <= this->m_pNext)
005c9fa3                  {
005c9faa                      class DBObj* m_pLast = this->m_pLast;
005c9faa                      
005c9faf                      if (m_pLast != 0)
005c9fb6                          ebx_14 = *(uint32_t*)((char*)m_pLast + (i_2 << 2));
005c9faf                      else
005c9fb1                          ebx_14 = 0xffffffff;
005c9fa3                  }
005c9fa3                  else
005c9fa5                      ebx_14 = 0xffffffff;
005c9fa5                  
005c9fb9                  *(uint32_t*)esi_8 = ebx_14;
005c9fbd                  void* ebp_8 = (*(uint32_t*)arg2 + 4);
005c9fc0                  *(uint32_t*)arg2 = ebp_8;
005c9fc5                  i_2 += 1;
005c9fc9                  esi_8 = ebp_8;
005c9fcb              } while (i_2 < (&this->m_pNext->vtable + 1));
005c9f98          }
005c9f98          
005c9fcd          class DBOCache* m_pMaintainer = this->m_pMaintainer;
005c9fd0          int32_t i_3 = 0;
005c9fd2          &m_pMaintainer->vtable;
005c9fd2          
005c9fd3          if (m_pMaintainer != 0xffffffff)
005c9fd3          {
005ca000              do
005ca000              {
005c9fd8                  int32_t ebx_18;
005c9fd8                  
005c9fd8                  if (i_3 <= this->m_pMaintainer)
005c9fd8                  {
005c9fdf                      int32_t m_numLinks = this->m_numLinks;
005c9fdf                      
005c9fe4                      if (m_numLinks != 0)
005c9feb                          ebx_18 = *(uint32_t*)(m_numLinks + (i_3 << 2));
005c9fe4                      else
005c9fe6                          ebx_18 = 0xffffffff;
005c9fd8                  }
005c9fd8                  else
005c9fda                      ebx_18 = 0xffffffff;
005c9fda                  
005c9fee                  *(uint32_t*)esi_8 = ebx_18;
005c9ff2                  void* ebp_10 = (*(uint32_t*)arg2 + 4);
005c9ff5                  *(uint32_t*)arg2 = ebp_10;
005c9ffa                  i_3 += 1;
005c9ffe                  esi_8 = ebp_10;
005ca000              } while (i_3 < (&this->m_pMaintainer->vtable + 1));
005c9fd3          }
005c9fd3          
005ca005          uint32_t i_4 = 0;
005ca005          
005ca008          if (this->m_DID.id != 0xffffffff)
005ca008          {
005ca03f              do
005ca03f              {
005ca010                  uint32_t id_1 = this->m_DID.id;
005ca015                  uint32_t ebp_11 = i_4;
005ca015                  
005ca017                  if (i_4 > id_1)
005ca019                      ebp_11 = id_1;
005ca019                  
005ca01b                  int32_t edi_10 = this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c);
005ca020                  int32_t ebx_21;
005ca020                  
005ca020                  if (edi_10 != 0)
005ca020                  {
005ca026                      ebx_21 = *(uint32_t*)(edi_10 + (ebp_11 << 3));
005ca029                      edi_10 = *(uint32_t*)((edi_10 + (ebp_11 << 3)) + 4);
005ca020                  }
005ca020                  else
005ca022                      ebx_21 = 0;
005ca022                  
005ca02d                  void* ebp_12 = *(uint32_t*)arg2;
005ca02f                  *(uint32_t*)ebp_12 = ebx_21;
005ca032                  *(uint32_t*)((char*)ebp_12 + 4) = edi_10;
005ca035                  *(uint32_t*)arg2 += 8;
005ca03b                  i_4 += 1;
005ca03f              } while (i_4 < (this->m_DID.id + 1));
005ca008          }
005ca008          
005ca044          uint32_t i_5 = 0;
005ca044          
005ca047          if (this->m_DID.id != 0xffffffff)
005ca047          {
005ca073              do
005ca073              {
005ca050                  uint32_t id_2 = this->m_DID.id;
005ca055                  uint32_t ebx_22 = i_5;
005ca055                  
005ca057                  if (i_5 > id_2)
005ca059                      ebx_22 = id_2;
005ca059                  
005ca05b                  struct PackObj::VTable* vtable = this->vtable;
005ca05b                  
005ca060                  if (vtable != 0)
005ca062                      vtable = *(uint32_t*)((char*)vtable + (ebx_22 << 2));
005ca062                  
005ca067                  **(uint32_t**)arg2 = vtable;
005ca069                  *(uint32_t*)arg2 += 4;
005ca06f                  i_5 += 1;
005ca073              } while (i_5 < (this->m_DID.id + 1));
005ca047          }
005c9ed6      }
005c9ed6      
005ca079      return result;
005c9eb0  }

005c9f2d                                         8d 49 00                                                               .I.
005ca07c                                                                                      90 90 90 90                              ....

005ca080  void __thiscall ExperienceTable::ExperienceTable(class ExperienceTable* this, class IDClass<_tagDataID,32,0> arg2)

005ca080  {
005ca088      DBObj::DBObj(this, arg2);
005ca08d      this->vtable = &PackObj::`vftable';
005ca096      __builtin_memset(&this->_max_attribute_level, 0, 0x2c);
005ca0b7      this->vtable = 0x7e7fc0;
005ca0bd      this->vtable = &ExperienceTable::`vftable';
005ca080  }

005ca0ca                                90 90 90 90 90 90                                                            ......

005ca0d0  void* __thiscall ExperienceTable::`vector deleting destructor'(class ExperienceTable* this, uint32_t arg2)

005ca0d0  {
005ca0d3      /* tailcall */
005ca0d3      return ExperienceTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005ca0d0  }

005ca0d8                                                                          cc cc cc cc cc cc cc cc                          ........

005ca0e0  void __fastcall ExperienceTable::Clear(class ExperienceTable* this)

005ca0e0  {
005ca0e3      uint32_t* _attribute_table = this->_attribute_table;
005ca0e3      
005ca0eb      if (_attribute_table != 0)
005ca0eb      {
005ca0ee          operator delete[](_attribute_table);
005ca0f6          this->_attribute_table = nullptr;
005ca0eb      }
005ca0eb      
005ca0f9      uint32_t* _attribute2nd_table = this->_attribute2nd_table;
005ca0f9      
005ca0fe      if (_attribute2nd_table != 0)
005ca0fe      {
005ca101          operator delete[](_attribute2nd_table);
005ca109          this->_attribute2nd_table = nullptr;
005ca0fe      }
005ca0fe      
005ca10c      uint32_t* _trained_skill_table = this->_trained_skill_table;
005ca10c      
005ca111      if (_trained_skill_table != 0)
005ca111      {
005ca114          operator delete[](_trained_skill_table);
005ca11c          this->_trained_skill_table = nullptr;
005ca111      }
005ca111      
005ca11f      uint32_t* _specialized_skill_table = this->_specialized_skill_table;
005ca11f      
005ca124      if (_specialized_skill_table != 0)
005ca124      {
005ca127          operator delete[](_specialized_skill_table);
005ca12f          this->_specialized_skill_table = nullptr;
005ca124      }
005ca124      
005ca132      uint64_t* _level_table = this->_level_table;
005ca132      
005ca137      if (_level_table != 0)
005ca137      {
005ca13a          operator delete[](_level_table);
005ca142          this->_level_table = nullptr;
005ca137      }
005ca137      
005ca145      uint32_t* _credit_table = this->_credit_table;
005ca145      
005ca14a      if (_credit_table != 0)
005ca14a      {
005ca14d          operator delete[](_credit_table);
005ca155          this->_credit_table = nullptr;
005ca14a      }
005ca0e0  }

005ca15b                                                                                   90 90 90 90 90                             .....

005ca160  int32_t __thiscall ExperienceTable::UnPack(class ExperienceTable* this, void** arg2, uint32_t arg3)

005ca160  {
005ca169      class ExperienceTable* this_1 = this;
005ca16b      class ExperienceTable* this_2 = this_1;
005ca16b      
005ca16f      if (arg3 < 0x14)
005ca177          return 0;
005ca177      
005ca17d      void* __offset(ExperienceTable, -0x30) esi = ((char*)this_1 - 0x30);
005ca182      ExperienceTable::Clear(esi);
005ca18f      this_1->m_bLoaded*(int32_t*)((char*)this_1 + 8) = **(uint32_t**)arg2;
005ca194      void* edx_1 = (*(uint32_t*)arg2 + 4);
005ca197      *(uint32_t*)arg2 = edx_1;
005ca19d      this_1->m_timeStamp = *(uint32_t*)edx_1;
005ca1a2      void* ecx_3 = (*(uint32_t*)arg2 + 4);
005ca1a5      *(uint32_t*)arg2 = ecx_3;
005ca1ab      this_1->m_pNext = *(uint32_t*)ecx_3;
005ca1b0      void* eax_6 = (*(uint32_t*)arg2 + 4);
005ca1b3      *(uint32_t*)arg2 = eax_6;
005ca1b7      this_1->m_pMaintainer = *(uint32_t*)eax_6;
005ca1bc      void* ebp_1 = (*(uint32_t*)arg2 + 4);
005ca1bf      *(uint32_t*)arg2 = ebp_1;
005ca1c5      this_1->m_DID.id = *(uint32_t*)ebp_1;
005ca1c8      *(uint32_t*)arg2 += 4;
005ca1ce      int32_t i = 0;
005ca1ce      
005ca1d1      if (this_1->m_bLoaded*(int32_t*)((char*)this_1 + 8) != 0xffffffff)
005ca1d1      {
005ca243          do
005ca243          {
005ca1d3              void* eax_10 = *(uint32_t*)arg2;
005ca1d5              class DBOCache* ecx_4 = *(uint32_t*)eax_10;
005ca1da              *(uint32_t*)arg2 = ((char*)eax_10 + 4);
005ca1dc              int32_t eax_12 = ADJ(esi)->m_bLoaded*(int32_t*)((char*)ADJ(esi) + 8);
005ca1e1              arg3 = ecx_4;
005ca1e1              
005ca1e5              if (i <= eax_12)
005ca1e5              {
005ca1ec                  if (*(int32_t*)((char*)ADJ(esi) + 0xc) != 0)
005ca1ec                  {
005ca225                  label_5ca225:
005ca225                      int32_t eax_13 = *(int32_t*)((char*)ADJ(esi) + 0xc);
005ca225                      
005ca230                      if (*(uint32_t*)(eax_13 + (i << 2)) == 0)
005ca236                          *(uint32_t*)(eax_13 + (i << 2)) = arg3;
005ca1ec                  }
005ca1ec                  else if (eax_12 != 0)
005ca1f0                  {
005ca1fa                      void* s;
005ca1fa                      s = operator new[](((eax_12 << 2) + 4));
005ca206                      *(int32_t*)((char*)ADJ(esi) + 0xc) = s;
005ca206                      
005ca209                      if (s != 0)
005ca209                      {
005ca20e                          void* ecx_6 = ((ADJ(esi)->m_bLoaded*(int32_t*)((char*)ADJ(esi) + 8) << 2) + 4);
005ca223                          __builtin_memset(__builtin_memset(s, 0, ((ecx_6 >> 2) << 2)), 0, (ecx_6 & 3));
005ca223                          goto label_5ca225;
005ca209                      }
005ca1f0                  }
005ca1e5              }
005ca1e5              
005ca238              this_1 = this_2;
005ca23f              i += 1;
005ca243          } while (i < (this_1->m_bLoaded*(int32_t*)((char*)this_1 + 8) + 1));
005ca1d1      }
005ca1d1      
005ca248      int32_t i_1 = 0;
005ca248      
005ca24b      if (this_1->m_timeStamp != 0xffffffff)
005ca24b      {
005ca2c0          do
005ca2c0          {
005ca250              void* eax_17 = *(uint32_t*)arg2;
005ca252              uint32_t ecx_11 = *(uint32_t*)eax_17;
005ca257              *(uint32_t*)arg2 = ((char*)eax_17 + 4);
005ca259              int32_t eax_19 = ADJ(esi)->m_timeStamp;
005ca259              
005ca262              if (i_1 <= eax_19)
005ca262              {
005ca269                  if (*(uint32_t*)((char*)ADJ(esi)->m_timeStamp)[4] != 0)
005ca269                  {
005ca2a2                  label_5ca2a2:
005ca2a2                      int32_t eax_20 = *(uint32_t*)((char*)ADJ(esi)->m_timeStamp)[4];
005ca2a2                      
005ca2ad                      if (*(uint32_t*)(eax_20 + (i_1 << 2)) == 0)
005ca2b3                          *(uint32_t*)(eax_20 + (i_1 << 2)) = ecx_11;
005ca269                  }
005ca269                  else if (eax_19 != 0)
005ca26d                  {
005ca277                      void* s_1 = operator new[](((eax_19 << 2) + 4));
005ca283                      *(uint32_t*)((char*)ADJ(esi)->m_timeStamp)[4] = s_1;
005ca283                      
005ca286                      if (s_1 != 0)
005ca286                      {
005ca28b                          void* ecx_14 = ((ADJ(esi)->m_timeStamp << 2) + 4);
005ca2a0                          __builtin_memset(__builtin_memset(s_1, 0, ((ecx_14 >> 2) << 2)), 0, (ecx_14 & 3));
005ca2a0                          goto label_5ca2a2;
005ca286                      }
005ca26d                  }
005ca262              }
005ca262              
005ca2b5              this_1 = this_2;
005ca2bc              i_1 += 1;
005ca2c0          } while (i_1 < (this_1->m_timeStamp + 1));
005ca24b      }
005ca24b      
005ca2c5      int32_t i_2 = 0;
005ca2c5      
005ca2c8      if (this_1->m_pNext != 0xffffffff)
005ca2c8      {
005ca340          do
005ca340          {
005ca2d0              void* eax_24 = *(uint32_t*)arg2;
005ca2d2              uint32_t ecx_20 = *(uint32_t*)eax_24;
005ca2d7              *(uint32_t*)arg2 = ((char*)eax_24 + 4);
005ca2d9              class DBObj* m_pNext = ADJ(esi)->m_pNext;
005ca2d9              
005ca2e2              if (i_2 <= m_pNext)
005ca2e2              {
005ca2e9                  if (ADJ(esi)->m_pLast != 0)
005ca2e9                  {
005ca322                  label_5ca322:
005ca322                      class DBObj* m_pLast = ADJ(esi)->m_pLast;
005ca322                      
005ca32d                      if (*(uint32_t*)((char*)m_pLast + (i_2 << 2)) == 0)
005ca333                          *(uint32_t*)((char*)m_pLast + (i_2 << 2)) = ecx_20;
005ca2e9                  }
005ca2e9                  else if (m_pNext != 0)
005ca2ed                  {
005ca2f7                      void* s_2 = operator new[](((m_pNext << 2) + 4));
005ca427                      ADJ(esi)->m_pLast = s_2;
005ca427                      
005ca306                      if (s_2 != 0)
005ca306                      {
005ca30b                          void* ecx_23 = ((ADJ(esi)->m_pNext << 2) + 4);
005ca320                          __builtin_memset(__builtin_memset(s_2, 0, ((ecx_23 >> 2) << 2)), 0, (ecx_23 & 3));
005ca320                          goto label_5ca322;
005ca306                      }
005ca2ed                  }
005ca2e2              }
005ca2e2              
005ca335              this_1 = this_2;
005ca33c              i_2 += 1;
005ca340          } while (i_2 < (&this_1->m_pNext->vtable + 1));
005ca2c8      }
005ca2c8      
005ca345      int32_t i_3 = 0;
005ca345      
005ca348      if (this_1->m_pMaintainer != 0xffffffff)
005ca348      {
005ca3c0          do
005ca3c0          {
005ca350              int32_t* eax_29 = *(uint32_t*)arg2;
005ca352              uint32_t ecx_29 = *(uint32_t*)eax_29;
005ca357              *(uint32_t*)arg2 = &eax_29[1];
005ca359              class DBOCache* m_pMaintainer = ADJ(esi)->m_pMaintainer;
005ca359              
005ca362              if (i_3 <= m_pMaintainer)
005ca362              {
005ca369                  if (ADJ(esi)->m_numLinks != 0)
005ca369                  {
005ca3a2                  label_5ca3a2:
005ca3a2                      int32_t m_numLinks = ADJ(esi)->m_numLinks;
005ca3a2                      
005ca3ad                      if (*(uint32_t*)(m_numLinks + (i_3 << 2)) == 0)
005ca3b3                          *(uint32_t*)(m_numLinks + (i_3 << 2)) = ecx_29;
005ca369                  }
005ca369                  else if (m_pMaintainer != 0)
005ca36d                  {
005ca377                      void* s_3 = operator new[](((m_pMaintainer << 2) + 4));
005ca427                      ADJ(esi)->m_numLinks = s_3;
005ca427                      
005ca386                      if (s_3 != 0)
005ca386                      {
005ca38b                          void* ecx_32 = ((ADJ(esi)->m_pMaintainer << 2) + 4);
005ca3a0                          __builtin_memset(__builtin_memset(s_3, 0, ((ecx_32 >> 2) << 2)), 0, (ecx_32 & 3));
005ca3a0                          goto label_5ca3a2;
005ca386                      }
005ca36d                  }
005ca362              }
005ca362              
005ca3b5              this_1 = this_2;
005ca3bc              i_3 += 1;
005ca3c0          } while (i_3 < (&this_1->m_pMaintainer->vtable + 1));
005ca348      }
005ca348      
005ca3c5      int32_t i_4 = 0;
005ca3c5      
005ca3c8      if (this_1->m_DID.id != 0xffffffff)
005ca3c8      {
005ca452          do
005ca452          {
005ca3d0              int32_t* eax_34 = *(uint32_t*)arg2;
005ca3d2              int32_t ecx_38 = *(uint32_t*)eax_34;
005ca3d4              int32_t edx_20 = eax_34[1];
005ca3da              *(uint32_t*)arg2 = &eax_34[2];
005ca3dc              uint32_t id = ADJ(esi)->m_DID.id;
005ca3dc              
005ca3e9              if (i_4 <= id)
005ca3e9              {
005ca3f0                  if (ADJ(esi)->m_AllowedInFreeList*(int32_t*)((char*)ADJ(esi) + 0x2c) != 0)
005ca3f0                  {
005ca429                  label_5ca429:
005ca429                      int32_t eax_37 = ADJ(esi)->m_AllowedInFreeList*(int32_t*)((char*)ADJ(esi) + 0x2c);
005ca435                      int32_t* eax_38 = (eax_37 + (i_4 << 3));
005ca435                      
005ca438                      if ((*(uint32_t*)(eax_37 + (i_4 << 3)) | *(uint32_t*)((eax_37 + (i_4 << 3)) + 4)) == 0)
005ca438                      {
005ca442                          *(uint32_t*)eax_38 = ecx_38;
005ca444                          eax_38[1] = edx_20;
005ca438                      }
005ca3f0                  }
005ca3f0                  else if (id != 0)
005ca3f4                  {
005ca3fe                      void* s_4 = operator new[](((id << 3) + 8));
005ca427                      ADJ(esi)->m_AllowedInFreeList*(int32_t*)((char*)ADJ(esi) + 0x2c) = s_4;
005ca427                      
005ca40d                      if (s_4 != 0)
005ca40d                      {
005ca412                          void* ecx_41 = ((ADJ(esi)->m_DID.id << 3) + 8);
005ca427                          __builtin_memset(__builtin_memset(s_4, 0, ((ecx_41 >> 2) << 2)), 0, (ecx_41 & 3));
005ca427                          goto label_5ca429;
005ca40d                      }
005ca3f4                  }
005ca3e9              }
005ca3e9              
005ca447              this_1 = this_2;
005ca44e              i_4 += 1;
005ca452          } while (i_4 < (this_1->m_DID.id + 1));
005ca3c8      }
005ca3c8      
005ca45b      int32_t i_5 = 0;
005ca45b      
005ca45e      if (this_1->m_DID.id != 0xffffffff)
005ca45e      {
005ca4d0          do
005ca4d0          {
005ca460              int32_t* eax_41 = *(uint32_t*)arg2;
005ca462              uint32_t ecx_48 = *(uint32_t*)eax_41;
005ca467              *(uint32_t*)arg2 = &eax_41[1];
005ca469              uint32_t id_1 = ADJ(esi)->m_DID.id;
005ca469              
005ca472              if (i_5 <= id_1)
005ca472              {
005ca479                  if (ADJ(esi)->vtable != 0)
005ca479                  {
005ca4b2                  label_5ca4b2:
005ca4b2                      struct PackObj::VTable* vtable = ADJ(esi)->vtable;
005ca4b2                      
005ca4bd                      if (*(uint32_t*)((char*)vtable + (i_5 << 2)) == 0)
005ca4c3                          *(uint32_t*)((char*)vtable + (i_5 << 2)) = ecx_48;
005ca479                  }
005ca479                  else if (id_1 != 0)
005ca47d                  {
005ca487                      void* s_5 = operator new[](((id_1 << 2) + 4));
005ca427                      ADJ(esi)->vtable = s_5;
005ca427                      
005ca496                      if (s_5 != 0)
005ca496                      {
005ca49b                          void* ecx_51 = ((ADJ(esi)->m_DID.id << 2) + 4);
005ca4b0                          __builtin_memset(__builtin_memset(s_5, 0, ((ecx_51 >> 2) << 2)), 0, (ecx_51 & 3));
005ca4b0                          goto label_5ca4b2;
005ca496                      }
005ca47d                  }
005ca472              }
005ca472              
005ca4cc              i_5 += 1;
005ca4d0          } while (i_5 < (this_2->m_DID.id + 1));
005ca45e      }
005ca45e      
005ca4de      return 1;
005ca160  }

005ca4e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005ca4f0  class DBObj* ExperienceTable::Allocate(class ExperienceTable const* this @ ecx)

005ca4f0  {
005ca4f0      /* tailcall */
005ca4f0      return ExperienceTable::Allocator();
005ca4f0  }

005ca4f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005ca500  void* __thiscall ExperienceTable::`scalar deleting destructor'(class ExperienceTable* this, uint32_t arg2)

005ca500  {
005ca503      this->vtable = 0x7e7fc0;
005ca509      this->vtable = &ExperienceTable::`vftable';
005ca510      ExperienceTable::Clear(this);
005ca517      this->vtable = &PackObj::`vftable';
005ca51e      DBObj::~DBObj(this);
005ca51e      
005ca528      if ((arg2 & 1) != 0)
005ca52b          operator delete(this);
005ca52b      
005ca536      return this;
005ca500  }

005ca539                                                                             90 90 90 90 90 90 90                           .......

005ca540  void __fastcall CombatManeuver::CombatManeuver(class CombatManeuver* this)

005ca540  {
005ca544      this->vtable = 0x7e8038;
005ca54a      __builtin_memset(&this->style, 0, 0x14);
005ca540  }

005ca55a                                                                                90 90 90 90 90 90                            ......

005ca560  void __fastcall CombatManeuverTable::~CombatManeuverTable(class CombatManeuverTable* this)

005ca560  {
005ca563      class CombatManeuver* _cmt = this->_cmt;
005ca568      this->vtable = 0x7e8060;
005ca56e      this->vtable = &CombatManeuverTable::`vftable';
005ca56e      
005ca575      if (_cmt != 0)
005ca575      {
005ca57f          if (_cmt->vtable == 0)
005ca58a              operator delete[](((char*)_cmt - 4));
005ca57f          else
005ca581              _cmt->vtable->__vecDelDtor(3);
005ca581          
005ca592          this->_cmt = nullptr;
005ca599          this->_num_combat_maneuvers = 0;
005ca575      }
005ca575      
005ca5a0      this->vtable = &PackObj::`vftable';
005ca5aa      /* tailcall */
005ca5aa      return DBObj::~DBObj(this);
005ca560  }

005ca5af                                               90                                                                 .

005ca5b0  uint32_t __thiscall CombatManeuverTable::Pack(class CombatManeuverTable* this, void** arg2, uint32_t arg3)

005ca5b0  {
005ca5b0      class CombatManeuverTable* this_1 = this;
005ca5b9      int32_t ecx = this->m_bLoaded*(int32_t*)((char*)this + 8);
005ca5bf      void* result = ((ecx * 0x14) + 4);
005ca5bf      
005ca5cd      if (arg3 >= result)
005ca5cd      {
005ca5d6          **(uint32_t**)arg2 = ecx;
005ca5d8          *(uint32_t*)arg2 += 4;
005ca5df          int32_t i = 0;
005ca5df          
005ca5e3          if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
005ca5e3          {
005ca5e6              int32_t* ebx_1 = nullptr;
005ca5e6              
005ca60b              do
005ca60b              {
005ca5ff                  *(uint32_t*)(*(uint32_t*)((char*)ebx_1 + *(int32_t*)((char*)this + 0xc)) + 0xc)(arg2, arg3);
005ca605                  i += 1;
005ca606                  ebx_1 = &ebx_1[6];
005ca60b              } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
005ca5e3          }
005ca5cd      }
005ca5cd      
005ca616      return result;
005ca5b0  }

005ca5ea                                8d 9b 00 00 00 00                                                            ......
005ca619                                                                             90 90 90 90 90 90 90                           .......

005ca620  void* __thiscall CombatManeuverTable::`vector deleting destructor'(class CombatManeuverTable* this, uint32_t arg2)

005ca620  {
005ca623      /* tailcall */
005ca623      return CombatManeuverTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005ca620  }

005ca628                          cc cc cc cc cc cc cc cc                                                          ........

005ca630  int32_t __thiscall CombatManeuverTable::Init(class CombatManeuverTable* this, uint32_t arg2)

005ca630  {
005ca634      class CombatManeuver* _cmt = this->_cmt;
005ca634      
005ca639      if (_cmt != 0)
005ca639      {
005ca643          if (_cmt->vtable == 0)
005ca64e              operator delete[](((char*)_cmt - 4));
005ca643          else
005ca645              _cmt->vtable->__vecDelDtor(3);
005ca645          
005ca656          this->_cmt = nullptr;
005ca65d          this->_num_combat_maneuvers = 0;
005ca639      }
005ca639      
005ca66a      this->_num_combat_maneuvers = arg2;
005ca66a      
005ca66d      if (arg2 <= 0)
005ca66d      {
005ca6c9          int32_t eax_7;
005ca6c9          eax_7 = this->_cmt == 0;
005ca6cd          return eax_7;
005ca66d      }
005ca66d      
005ca67a      int32_t* eax_3 = operator new[](((arg2 * 0x18) + 4));
005ca67a      
005ca684      if (eax_3 == 0)
005ca684      {
005ca6b7          this->_cmt = nullptr;
005ca6be          return 0;
005ca684      }
005ca684      
005ca693      *(uint32_t*)eax_3 = arg2;
005ca695      `vector constructor iterator'(&eax_3[1], 0x18, arg2, CombatManeuver::CombatManeuver);
005ca6a0      int32_t ecx_1;
005ca6a0      ecx_1 = eax_3 != 0xfffffffc;
005ca6a4      this->_cmt = &eax_3[1];
005ca6ab      return ecx_1;
005ca630  }


005ca6d0  void __thiscall CombatManeuverTable::CombatManeuverTable(class CombatManeuverTable* this, class IDClass<_tagDataID,32,0> arg2)

005ca6d0  {
005ca6d8      DBObj::DBObj(this, arg2);
005ca6dd      this->vtable = &PackObj::`vftable';
005ca6e6      this->_num_combat_maneuvers = 0;
005ca6e9      this->_cmt = nullptr;
005ca6ec      this->vtable = 0x7e8060;
005ca6f2      this->vtable = &CombatManeuverTable::`vftable';
005ca6d0  }

005ca6ff                                                                                               90                                 .

005ca700  void* __thiscall CombatManeuverTable::`scalar deleting destructor'(class CombatManeuverTable* this, uint32_t arg2)

005ca700  {
005ca703      CombatManeuverTable::~CombatManeuverTable(this);
005ca703      
005ca70d      if ((arg2 & 1) != 0)
005ca710          operator delete(this);
005ca710      
005ca71b      return this;
005ca700  }

005ca71e                                                                                            90 90                                ..

005ca720  int32_t __thiscall CombatManeuverTable::UnPack(class CombatManeuverTable* this, void** arg2, uint32_t arg3)

005ca720  {
005ca734      if (arg3 < ((this->m_bLoaded*(int32_t*)((char*)this + 8) * 0x14) + 4))
005ca739          return 0;
005ca739      
005ca741      void* eax_3 = *(uint32_t*)arg2;
005ca744      uint32_t ecx_1 = *(uint32_t*)eax_3;
005ca74d      *(uint32_t*)arg2 = ((char*)eax_3 + 4);
005ca750      int32_t result = CombatManeuverTable::Init(((char*)this - 0x30), ecx_1);
005ca750      
005ca757      if (result == 0)
005ca75b          return result;
005ca75b      
005ca762      int32_t i = 0;
005ca762      
005ca766      if (this->m_bLoaded*(int32_t*)((char*)this + 8) > 0)
005ca766      {
005ca769          int32_t ebx_1 = 0;
005ca769          
005ca78b          do
005ca78b          {
005ca77f              *(uint32_t*)(*(uint32_t*)(*(int32_t*)((char*)this + 0xc) + ebx_1) + 0x10)(arg2, arg3);
005ca785              i += 1;
005ca786              ebx_1 += 0x18;
005ca78b          } while (i < this->m_bLoaded*(int32_t*)((char*)this + 8));
005ca766      }
005ca766      
005ca796      return 1;
005ca720  }

005ca76d                                         8d 49 00                                                               .I.
005ca799                                                                             90 90 90 90 90 90 90                           .......

005ca7a0  class DBObj* CombatManeuverTable::Allocate(class CombatManeuverTable const* this @ ecx)

005ca7a0  {
005ca7a0      /* tailcall */
005ca7a0      return CombatManeuverTable::Allocator();
005ca7a0  }

005ca7a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005ca7b0  uint32_t __thiscall CombatManeuver::Pack(class CombatManeuver* this, void** arg2, uint32_t arg3)

005ca7b0  {
005ca7b5      if (arg3 >= 0x14)
005ca7b5      {
005ca7c1          **(uint32_t**)arg2 = this->style;
005ca7c5          void* esi_3 = (*(uint32_t*)arg2 + 4);
005ca7c8          *(uint32_t*)arg2 = esi_3;
005ca7cf          *(uint32_t*)esi_3 = this->attack_height;
005ca7d3          void* edx_4 = (*(uint32_t*)arg2 + 4);
005ca7d6          *(uint32_t*)arg2 = edx_4;
005ca7db          *(uint32_t*)edx_4 = this->attack_type;
005ca7df          void* esi_7 = (*(uint32_t*)arg2 + 4);
005ca7e2          *(uint32_t*)arg2 = esi_7;
005ca7e9          *(uint32_t*)esi_7 = this->min_skill_level;
005ca7ed          void* edx_7 = (*(uint32_t*)arg2 + 4);
005ca7f0          *(uint32_t*)arg2 = edx_7;
005ca7f5          *(uint32_t*)edx_7 = this->motion;
005ca7f7          *(uint32_t*)arg2 += 4;
005ca7b5      }
005ca7b5      
005ca800      return 0x14;
005ca7b0  }

005ca803           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005ca810  int32_t __thiscall CombatManeuver::UnPack(class CombatManeuver* this, void** arg2, uint32_t arg3)

005ca810  {
005ca815      if (arg3 < 0x14)
005ca819          return 0;
005ca819      
005ca824      this->style = **(uint32_t**)arg2;
005ca829      void* edx_3 = (*(uint32_t*)arg2 + 4);
005ca82c      *(uint32_t*)arg2 = edx_3;
005ca830      this->attack_height = *(uint32_t*)edx_3;
005ca835      void* edx_6 = (*(uint32_t*)arg2 + 4);
005ca838      *(uint32_t*)arg2 = edx_6;
005ca83c      this->attack_type = *(uint32_t*)edx_6;
005ca841      void* edx_9 = (*(uint32_t*)arg2 + 4);
005ca844      *(uint32_t*)arg2 = edx_9;
005ca848      this->min_skill_level = *(uint32_t*)edx_9;
005ca84d      void* edx_12 = (*(uint32_t*)arg2 + 4);
005ca850      *(uint32_t*)arg2 = edx_12;
005ca854      this->motion = *(uint32_t*)edx_12;
005ca857      *(uint32_t*)arg2 += 4;
005ca85f      return 1;
005ca810  }

005ca862        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005ca870  uint32_t __thiscall SkillFormula::Pack(class SkillFormula* this, void** arg2, uint32_t arg3)

005ca870  {
005ca875      if (arg3 >= 0x18)
005ca875      {
005ca881          **(uint32_t**)arg2 = this->_w;
005ca885          void* edx_3 = (*(uint32_t*)arg2 + 4);
005ca888          *(uint32_t*)arg2 = edx_3;
005ca88d          *(uint32_t*)edx_3 = this->_x;
005ca891          void* esi_4 = (*(uint32_t*)arg2 + 4);
005ca894          *(uint32_t*)arg2 = esi_4;
005ca89b          *(uint32_t*)esi_4 = this->_y;
005ca89f          void* edx_6 = (*(uint32_t*)arg2 + 4);
005ca8a2          *(uint32_t*)arg2 = edx_6;
005ca8a7          *(uint32_t*)edx_6 = this->_z;
005ca8ab          void* esi_8 = (*(uint32_t*)arg2 + 4);
005ca8ae          *(uint32_t*)arg2 = esi_8;
005ca8b5          *(uint32_t*)esi_8 = this->_attr1;
005ca8b9          void* edx_9 = (*(uint32_t*)arg2 + 4);
005ca8bc          *(uint32_t*)arg2 = edx_9;
005ca8c1          *(uint32_t*)edx_9 = this->_attr2;
005ca8c3          *(uint32_t*)arg2 += 4;
005ca875      }
005ca875      
005ca8cc      return 0x18;
005ca870  }

005ca8cf                                               90                                                                 .

005ca8d0  int32_t __thiscall SkillFormula::UnPack(class SkillFormula* this, void** arg2, uint32_t arg3)

005ca8d0  {
005ca8d4      void* edx = *(uint32_t*)arg2;
005ca8d4      
005ca8dc      if (arg3 < 0x18)
005ca8e1          return 0;
005ca8e1      
005ca8e6      this->_w = *(uint32_t*)edx;
005ca8eb      void* esi_2 = (*(uint32_t*)arg2 + 4);
005ca8ee      *(uint32_t*)arg2 = esi_2;
005ca8f2      this->_x = *(uint32_t*)esi_2;
005ca8f7      void* esi_5 = (*(uint32_t*)arg2 + 4);
005ca8fa      *(uint32_t*)arg2 = esi_5;
005ca8fe      this->_y = *(uint32_t*)esi_5;
005ca903      void* esi_8 = (*(uint32_t*)arg2 + 4);
005ca906      *(uint32_t*)arg2 = esi_8;
005ca90a      this->_z = *(uint32_t*)esi_8;
005ca90f      void* esi_11 = (*(uint32_t*)arg2 + 4);
005ca912      *(uint32_t*)arg2 = esi_11;
005ca916      this->_attr1 = *(uint32_t*)esi_11;
005ca91b      void* esi_14 = (*(uint32_t*)arg2 + 4);
005ca91e      *(uint32_t*)arg2 = esi_14;
005ca922      this->_attr2 = *(uint32_t*)esi_14;
005ca927      void* esi_17 = (*(uint32_t*)arg2 + 4);
005ca92a      *(uint32_t*)arg2 = esi_17;
005ca933      int32_t eax_4 = -((((char*)esi_17 - edx) - 0x18));
005ca939      return ((eax_4 - eax_4) + 1);
005ca8d0  }

005ca93c                                                                                      90 90 90 90                              ....

005ca940  void __thiscall Skill::SetSkillAdvancementClass(class Skill* this, enum SKILL_ADVANCEMENT_CLASS arg2)

005ca940  {
005ca947      uint32_t _pp = this->_pp;
005ca94c      this->_sac = arg2;
005ca957      this->_level_from_pp = ExperienceSystem::SkillLevelFromExperience(arg2, _pp);
005ca940  }

005ca95e                                                                                            90 90                                ..

005ca960  int32_t __thiscall Skill::AdjPP(class Skill* this, uint32_t* arg2)

005ca960  {
005ca96c      uint32_t eax_1 = (this->_pp + *(uint32_t*)arg2);
005ca96e      uint32_t _pp = this->_pp;
005ca974      uint32_t _level_from_pp = this->_level_from_pp;
005ca977      enum SKILL_ADVANCEMENT_CLASS _sac_2;
005ca977      uint32_t var_c;
005ca977      
005ca977      if (eax_1 >= _pp)
005ca977      {
005ca98f          enum SKILL_ADVANCEMENT_CLASS _sac_1 = this->_sac;
005ca992          var_c = eax_1;
005ca993          this->_pp = eax_1;
005ca996          _sac_2 = _sac_1;
005ca977      }
005ca977      else
005ca977      {
005ca97e          *(uint32_t*)arg2 = (0xffffffff - _pp);
005ca980          enum SKILL_ADVANCEMENT_CLASS _sac = this->_sac;
005ca983          var_c = 0xffffffff;
005ca985          this->_pp = 0xffffffff;
005ca98c          _sac_2 = _sac;
005ca977      }
005ca977      
005ca99c      this->_level_from_pp = ExperienceSystem::SkillLevelFromExperience(_sac_2, var_c);
005ca9aa      int32_t result;
005ca9aa      result = _level_from_pp != this->_level_from_pp;
005ca9ae      return result;
005ca960  }

005ca9b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005ca9c0  int32_t __fastcall Skill::SanityCheck(class Skill* this)

005ca9c0  {
005ca9c3      enum SKILL_ADVANCEMENT_CLASS _sac = this->_sac;
005ca9c7      int32_t result = 1;
005ca9c7      
005ca9d8      if ((_sac != UNTRAINED_SKILL_ADVANCEMENT_CLASS && (_sac != TRAINED_SKILL_ADVANCEMENT_CLASS && _sac != SPECIALIZED_SKILL_ADVANCEMENT_CLASS)))
005ca9d8      {
005ca9da          uint32_t _pp = this->_pp;
005ca9df          this->_sac = UNTRAINED_SKILL_ADVANCEMENT_CLASS;
005ca9ea          this->_level_from_pp = ExperienceSystem::SkillLevelFromExperience(UNTRAINED_SKILL_ADVANCEMENT_CLASS, _pp);
005ca9ed          result = 0;
005ca9d8      }
005ca9d8      
005ca9f7      uint32_t eax_1 = ExperienceSystem::SkillLevelFromExperience(this->_sac, this->_pp);
005ca9f7      
005caa04      if (eax_1 == this->_level_from_pp)
005caa12          return result;
005caa12      
005caa06      this->_level_from_pp = eax_1;
005caa0d      return 0;
005ca9c0  }

005caa13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005caa20  uint32_t __thiscall Skill::Pack(class Skill* this, void** arg2, uint32_t arg3)

005caa20  {
005caa2d      if (arg3 >= 0x1c)
005caa2d      {
005caa47          **(uint32_t**)arg2 = (((uint32_t)((int16_t)this->_level_from_pp)) | 0x10000);
005caa4b          void* eax_4 = (*(uint32_t*)arg2 + 4);
005caa4e          *(uint32_t*)arg2 = eax_4;
005caa53          *(uint32_t*)eax_4 = this->_sac;
005caa57          void* edx_3 = (*(uint32_t*)arg2 + 4);
005caa5a          *(uint32_t*)arg2 = edx_3;
005caa61          *(uint32_t*)edx_3 = this->_pp;
005caa65          void* ecx_3 = (*(uint32_t*)arg2 + 4);
005caa68          *(uint32_t*)arg2 = ecx_3;
005caa6f          *(uint32_t*)ecx_3 = this->_init_level;
005caa73          void* eax_8 = (*(uint32_t*)arg2 + 4);
005caa76          *(uint32_t*)arg2 = eax_8;
005caa7b          *(uint32_t*)eax_8 = this->_resistance_of_last_check;
005caa7d          *(uint32_t*)arg2 += 4;
005caa88          int32_t var_4_1 = 0;
005caa97          long double x87_r7_2;
005caa97          
005caa97          if (DBCache::IsRunTime() == 0)
005caaa4              x87_r7_2 = ((long double)0);
005caa97          else
005caa9f              x87_r7_2 = (((long double)Timer::cur_time) - ((long double)this->_last_used_time));
005caa9f          
005caaaa          **(uint64_t**)arg2 = ((double)x87_r7_2);
005caab1          *(uint32_t*)arg2 += 8;
005caa2d      }
005caa2d      
005caabd      return 0x1c;
005caa20  }


005caac0  void __thiscall Skill::UnPack(class Skill* this, void** arg2, uint32_t arg3)

005caac0  {
005caac5      void* eax = *(uint32_t*)arg2;
005caac5      
005caad3      if (arg3 >= 0x1c)
005caad3      {
005caadd          int32_t ebx_1 = *(uint32_t*)eax;
005caae0          *(uint32_t*)arg2 = ((char*)eax + 4);
005caae9          this->_level_from_pp = ((uint32_t)ebx_1);
005caaf0          this->_sac = **(uint32_t**)arg2;
005caaf5          void* edx_3 = (*(uint32_t*)arg2 + 4);
005caaf8          *(uint32_t*)arg2 = edx_3;
005caafe          this->_pp = *(uint32_t*)edx_3;
005cab03          void* ecx_2 = (*(uint32_t*)arg2 + 4);
005cab06          *(uint32_t*)arg2 = ecx_2;
005cab0c          this->_init_level = *(uint32_t*)ecx_2;
005cab15          void* eax_8 = (*(uint32_t*)arg2 + 4);
005cab18          *(uint32_t*)arg2 = eax_8;
005cab1c          this->_resistance_of_last_check = *(uint32_t*)eax_8;
005cab21          void* edx_6 = (*(uint32_t*)arg2 + 4);
005cab24          *(uint32_t*)arg2 = edx_6;
005cab28          long double x87_r7_1 = ((long double)*(uint64_t*)edx_6);
005cab2d          *(uint32_t*)arg2 = ((char*)edx_6 + 8);
005cab39          this->_last_used_time = ((double)(((long double)Timer::cur_time) - x87_r7_1));
005cab3e          Skill::SanityCheck(this);
005cab3e          
005cab4f          if ((ebx_1 & 0xffff0000) < 0x10000)
005cab4f          {
005cab55              if (this->_init_level > 0)
005cab5a                  Skill::AdjPP(this, &this->_init_level);
005cab5a              
005cab12              this->_init_level = 0;
005cab4f          }
005cab4f          
005cab76          if (arg3 >= (*(uint32_t*)arg2 - eax))
005cab88              return;
005cab88          
005cab78          *(uint32_t*)arg2 = eax;
005caad3      }
005caac0  }

005cab8b                                   90 90 90 90 90                                                             .....

005cab90  uint32_t __stdcall Attribute::LevelFromExperience(class Attribute const* this @ ecx, uint32_t arg2)

005cab90  {
005cab9d      return ExperienceSystem::AttributeLevelFromExperience(arg2);
005cab90  }


005caba0  uint32_t __stdcall Attribute::ExperienceToLevel(class Attribute const* this @ ecx, uint32_t arg2)

005caba0  {
005cabad      return ExperienceSystem::ExperienceToAttributeLevel(arg2);
005caba0  }


005cabb0  uint32_t __thiscall InventoryPlacement::Pack(class InventoryPlacement* this, void** arg2, uint32_t arg3)

005cabb0  {
005cabb5      if (arg3 >= 0xc)
005cabb5      {
005cabc1          **(uint32_t**)arg2 = this->iid_;
005cabc5          void* esi_3 = (*(uint32_t*)arg2 + 4);
005cabc8          *(uint32_t*)arg2 = esi_3;
005cabcf          *(uint32_t*)esi_3 = this->loc_;
005cabd3          void* edx_4 = (*(uint32_t*)arg2 + 4);
005cabd6          *(uint32_t*)arg2 = edx_4;
005cabdb          *(uint32_t*)edx_4 = this->priority_;
005cabdd          *(uint32_t*)arg2 += 4;
005cabb5      }
005cabb5      
005cabe6      return 0xc;
005cabb0  }

005cabe9                             90 90 90 90 90 90 90                                                           .......

005cabf0  int32_t __thiscall Attribute::UnPack(class Attribute* this, void** arg2, uint32_t arg3)

005cabf0  {
005cabf4      void* edx = *(uint32_t*)arg2;
005cabf4      
005cabfe      if (arg3 >= 0xc)
005cabfe      {
005cac03          this->_level_from_cp = *(uint32_t*)edx;
005cac08          void* esi_3 = (*(uint32_t*)arg2 + 4);
005cac0b          *(uint32_t*)arg2 = esi_3;
005cac0f          this->_init_level = *(uint32_t*)esi_3;
005cac14          void* esi_6 = (*(uint32_t*)arg2 + 4);
005cac17          *(uint32_t*)arg2 = esi_6;
005cac1b          this->_cp_spent = *(uint32_t*)esi_6;
005cac20          void* ecx_1 = (*(uint32_t*)arg2 + 4);
005cac23          *(uint32_t*)arg2 = ecx_1;
005cac23          
005cac2a          if (arg3 >= ((char*)ecx_1 - edx))
005cac3a              return 1;
005cac3a          
005cac2c          *(uint32_t*)arg2 = edx;
005cabfe      }
005cabfe      
005cac31      return 0;
005cabf0  }

005cac3d                                                                                         90 90 90                               ...

005cac40  uint32_t __stdcall SecondaryAttribute::LevelFromExperience(class SecondaryAttribute const* this @ ecx, uint32_t arg2)

005cac40  {
005cac4d      return ExperienceSystem::Attribute2ndLevelFromExperience(arg2);
005cac40  }


005cac50  uint32_t __stdcall SecondaryAttribute::ExperienceToLevel(class SecondaryAttribute const* this @ ecx, uint32_t arg2)

005cac50  {
005cac5d      return ExperienceSystem::ExperienceToAttribute2ndLevel(arg2);
005cac50  }


005cac60  uint32_t __thiscall SecondaryAttribute::Pack(class SecondaryAttribute* this, void** arg2, uint32_t arg3)

005cac60  {
005cac6a      if (arg3 >= 0x10)
005cac6a      {
005cac73          InventoryPlacement::Pack(this, arg2, arg3);
005cac7d          **(uint32_t**)arg2 = this->_current_level;
005cac7f          *(uint32_t*)arg2 += 4;
005cac6a      }
005cac6a      
005cac89      return 0x10;
005cac60  }

005cac8c                                      90 90 90 90                                                              ....

005cac90  int32_t __thiscall SecondaryAttribute::UnPack(class SecondaryAttribute* this, void** arg2, uint32_t arg3)

005cac90  {
005cac9e      void* ebp = *(uint32_t*)arg2;
005cac9e      
005caca3      if (arg3 >= 0x10)
005caca3      {
005caca7          Attribute::UnPack(this, arg2, arg3);
005cacb0          this->_current_level = **(uint32_t**)arg2;
005cacb5          void* edi_2 = (*(uint32_t*)arg2 + 4);
005cacbe          *(uint32_t*)arg2 = edi_2;
005cacbe          
005cacc0          if (arg3 >= ((char*)edi_2 - ebp))
005cacd6              return 1;
005cacd6          
005cacc2          *(uint32_t*)arg2 = ebp;
005caca3      }
005caca3      
005cacca      return 0;
005cac90  }

005cacd9                                                                             90 90 90 90 90 90 90                           .......

005cace0  int32_t __thiscall Enchantment::Duel(class Enchantment const* this, class Enchantment const* arg2)

005cace0  {
005cace0      int32_t _power_level_1 = this->_power_level;
005cace8      int32_t _power_level = arg2->_power_level;
005cace8      
005caced      if (_power_level_1 <= _power_level)
005caced      {
005cacef          if (_power_level_1 != _power_level)
005cad0c              return 0;
005cad0c          
005cacf1          long double x87_r7_1 = ((long double)this->_start_time);
005cacf4          long double x87_r6_1 = ((long double)arg2->_start_time);
005cacf7          (x87_r6_1 - x87_r7_1);
005cacf9          _power_level = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
005cacfb          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005cacfb          
005cacfe          if (p_1)
005cad0c              return 0;
005caced      }
005caced      
005cad06      return 1;
005cace0  }

005cad0f                                               90                                                                 .

005cad10  int32_t __thiscall Enchantment::Enchant(class Enchantment* this, float* arg2)

005cad10  {
005cad10      uint16_t type = ((int16_t)this->_smod.type);
005cad10      
005cad15      if (*(uint8_t*)((char*)type)[1] < 0)
005cad15      {
005cad20          *(uint32_t*)arg2 = ((float)(((long double)this->_smod.val) + ((long double)*(uint32_t*)arg2)));
005cad27          return 1;
005cad15      }
005cad15      
005cad2d      if ((*(uint8_t*)((char*)type)[1] & 0x40) == 0)
005cad44          return 0;
005cad44      
005cad38      *(uint32_t*)arg2 = ((float)(((long double)this->_smod.val) * ((long double)*(uint32_t*)arg2)));
005cad3f      return 1;
005cad10  }

005cad47                       90 90 90 90 90 90 90 90 90                                                         .........

005cad50  int32_t __thiscall Enchantment::Enchant(class Enchantment* this, struct EnchantedQualityDetails* arg2)

005cad50  {
005cad50      long double x87_r7_4 = ((long double)this->_smod.val);
005cad53      uint16_t type = ((int16_t)this->_smod.type);
005cad53      
005cad58      if (*(uint8_t*)((char*)type)[1] < 0)
005cad58      {
005cad5a          long double temp1 = ((long double)0f);
005cad5a          (x87_r7_4 - temp1);
005cad5a          
005cad69          if ((*(uint8_t*)((char*)((((x87_r7_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
005cad69          {
005cad7c              arg2->rValueDecreasingAdditive = ((double)(x87_r7_4 + ((long double)arg2->rValueDecreasingAdditive)));
005cad84              return 1;
005cad69          }
005cad69          
005cad6e          arg2->rValueIncreasingAdditive = ((double)(x87_r7_4 + ((long double)arg2->rValueIncreasingAdditive)));
005cad76          return 1;
005cad58      }
005cad58      
005cad8a      if ((*(uint8_t*)((char*)type)[1] & 0x40) == 0)
005cadbd          return 0;
005cadbd      
005cad8c      long double temp2 = ((long double)1f);
005cad8c      (x87_r7_4 - temp2);
005cad8c      
005cad9b      if ((*(uint8_t*)((char*)((((x87_r7_4 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
005cad9b      {
005cadae          arg2->rValueDecreasingMultiplier = ((double)(x87_r7_4 * ((long double)arg2->rValueDecreasingMultiplier)));
005cadb6          return 1;
005cad9b      }
005cad9b      
005cada0      arg2->rValueIncreasingMultiplier = ((double)(x87_r7_4 * ((long double)arg2->rValueIncreasingMultiplier)));
005cada8      return 1;
005cad50  }


005cadc0  uint32_t __fastcall Enchantment::GetPackSize(class Enchantment* this)

005cadc0  {
005cadc0      class Enchantment* this_1 = this;
005cadc1      struct StatMod::VTable* vtable = this->_smod.vtable;
005cadce      this_1 = nullptr;
005caddd      return (vtable->Pack(&this_1, 0) + 0x34);
005cadc0  }

005cadde                                                                                            90 90                                ..

005cade0  int32_t __thiscall Enchantment::AffectsAttackSkills(class Enchantment const* this, uint32_t arg2)

005cade0  {
005cadf0      if (((*(uint8_t*)((char*)this->_smod.type)[2] & 1) != 0 && (arg2 - 0x21) <= 0x10))
005cadf9          switch (arg2)
005cadf9          {
005cae05              case 0x21:
005cae05              case 0x22:
005cae05              case 0x29:
005cae05              case 0x2b:
005cae05              case 0x2c:
005cae05              case 0x2d:
005cae05              case 0x2e:
005cae05              case 0x2f:
005cae05              case 0x31:
005cae05              {
005cae05                  return 1;
005cae05                  break;
005cae05              }
005cadf9          }
005cadf9      
005cae0a      return 0;
005cade0  }

005cae0d                                         8d 49 00                                                               .I.
005cae10  uint32_t jump_table_5cae10[0x2] = 
005cae10  {
005cae10      [0x0] =  0x005cae00
005cae14      [0x1] =  0x005cae08
005cae18  }
005cae18  uint8_t lookup_table_5cae18[0x11] = 
005cae18  {
005cae18      [0x00] =  0x00
005cae19      [0x01] =  0x00
005cae1a      [0x02] =  0x01
005cae1b      [0x03] =  0x01
005cae1c      [0x04] =  0x01
005cae1d      [0x05] =  0x01
005cae1e      [0x06] =  0x01
005cae1f      [0x07] =  0x01
005cae20      [0x08] =  0x00
005cae21      [0x09] =  0x01
005cae22      [0x0a] =  0x00
005cae23      [0x0b] =  0x00
005cae24      [0x0c] =  0x00
005cae25      [0x0d] =  0x00
005cae26      [0x0e] =  0x00
005cae27      [0x0f] =  0x01
005cae28      [0x10] =  0x00
005cae29  }

005cae29                             90 90 90 90 90 90 90                                                           .......

005cae30  int32_t __thiscall Enchantment::AffectsDefenseSkills(class Enchantment const* this, uint32_t arg2)

005cae30  {
005cae43      if (((this->_smod.type & 0x20000) != 0 && (arg2 - 6) <= 0x2a))
005cae4c          switch (arg2)
005cae4c          {
005cae58              case 6:
005cae58              case 7:
005cae58              case 0xf:
005cae58              case 0x30:
005cae58              {
005cae58                  return 1;
005cae58                  break;
005cae58              }
005cae4c          }
005cae4c      
005cae5d      return 0;
005cae30  }

005cae60  uint32_t jump_table_5cae60[0x2] = 
005cae60  {
005cae60      [0x0] =  0x005cae53
005cae64      [0x1] =  0x005cae5b
005cae68  }
005cae68  uint8_t lookup_table_5cae68[0x2b] = 
005cae68  {
005cae68      [0x00] =  0x00
005cae69      [0x01] =  0x00
005cae6a      [0x02] =  0x01
005cae6b      [0x03] =  0x01
005cae6c      [0x04] =  0x01
005cae6d      [0x05] =  0x01
005cae6e      [0x06] =  0x01
005cae6f      [0x07] =  0x01
005cae70      [0x08] =  0x01
005cae71      [0x09] =  0x00
005cae72      [0x0a] =  0x01
005cae73      [0x0b] =  0x01
005cae74      [0x0c] =  0x01
005cae75      [0x0d] =  0x01
005cae76      [0x0e] =  0x01
005cae77      [0x0f] =  0x01
005cae78      [0x10] =  0x01
005cae79      [0x11] =  0x01
005cae7a      [0x12] =  0x01
005cae7b      [0x13] =  0x01
005cae7c      [0x14] =  0x01
005cae7d      [0x15] =  0x01
005cae7e      [0x16] =  0x01
005cae7f      [0x17] =  0x01
005cae80      [0x18] =  0x01
005cae81      [0x19] =  0x01
005cae82      [0x1a] =  0x01
005cae83      [0x1b] =  0x01
005cae84      [0x1c] =  0x01
005cae85      [0x1d] =  0x01
005cae86      [0x1e] =  0x01
005cae87      [0x1f] =  0x01
005cae88      [0x20] =  0x01
005cae89      [0x21] =  0x01
005cae8a      [0x22] =  0x01
005cae8b      [0x23] =  0x01
005cae8c      [0x24] =  0x01
005cae8d      [0x25] =  0x01
005cae8e      [0x26] =  0x01
005cae8f      [0x27] =  0x01
005cae90      [0x28] =  0x01
005cae91      [0x29] =  0x01
005cae92      [0x2a] =  0x00
005cae93  }

005cae93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005caea0  void __fastcall Enchantment::Enchantment(class Enchantment* this)

005caea0  {
005caea8      this->_start_time = 0f;
005caeab      this->_duration = 0f;
005caeb6      this->_degrade_limit = -666f;
005caec6      *(uint32_t*)((char*)this->_start_time)[4] = 0xbff00000;
005caec9      *(uint32_t*)((char*)this->_duration)[4] = 0xbff00000;
005caecc      *(uint32_t*)((char*)this->_last_time_degraded)[4] = 0xbff00000;
005caecf      this->vtable = &Enchantment::`vftable';
005caed5      this->_id = 0;
005caed8      this->m_SpellSetID = 0;
005caedb      this->_spell_category = 0;
005caede      this->_power_level = 0;
005caee1      this->_caster = 0;
005caee4      this->_degrade_modifier = 0f;
005caee7      this->_last_time_degraded = 0f;
005caeea      this->_smod.vtable = 0x7b19b8;
005caef1      this->_smod.type = 0;
005caef4      this->_smod.key = 0;
005caef7      this->_smod.val = 0f;
005caea0  }

005caefc                                                                                      90 90 90 90                              ....

005caf00  void __thiscall Enchantment::Enchantment(class Enchantment* this, uint32_t const arg2)

005caf00  {
005caf0c      this->_start_time = 0f;
005caf0f      this->_duration = 0f;
005caf18      this->_id = arg2;
005caf1d      this->_degrade_limit = -666f;
005caf2d      *(uint32_t*)((char*)this->_start_time)[4] = 0xbff00000;
005caf30      *(uint32_t*)((char*)this->_duration)[4] = 0xbff00000;
005caf33      *(uint32_t*)((char*)this->_last_time_degraded)[4] = 0xbff00000;
005caf36      this->vtable = &Enchantment::`vftable';
005caf3c      this->m_SpellSetID = 0;
005caf3f      this->_spell_category = 0;
005caf42      this->_power_level = 0;
005caf45      this->_caster = 0;
005caf48      this->_degrade_modifier = 0f;
005caf4b      this->_last_time_degraded = 0f;
005caf4e      this->_smod.vtable = 0x7b19b8;
005caf55      this->_smod.type = 0;
005caf58      this->_smod.key = 0;
005caf5b      this->_smod.val = 0f;
005caf00  }

005caf62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005caf70  uint32_t __thiscall Enchantment::Pack(class Enchantment* this, void** arg2, uint32_t arg3)

005caf70  {
005caf76      int32_t result = this->vtable->GetPackSize();
005caf76      
005caf81      if (arg3 >= result)
005caf81      {
005caf91          **(uint32_t**)arg2 = this->_id;
005caf95          void* eax_3 = (*(uint32_t*)arg2 + 4);
005caf98          *(uint32_t*)arg2 = eax_3;
005cafa9          *(uint32_t*)eax_3 = (((uint32_t)((int16_t)this->_spell_category)) | 0x10000);
005cafad          void* ecx_5 = (*(uint32_t*)arg2 + 4);
005cafb0          *(uint32_t*)arg2 = ecx_5;
005cafb7          *(uint32_t*)ecx_5 = this->_power_level;
005cafbb          void* eax_6 = (*(uint32_t*)arg2 + 4);
005cafbe          *(uint32_t*)arg2 = eax_6;
005cafcb          *(uint64_t*)eax_6 = ((double)(((long double)this->_start_time) - ((long double)Timer::cur_time)));
005cafcf          void* ecx_8 = (*(uint32_t*)arg2 + 8);
005cafd2          *(uint32_t*)arg2 = ecx_8;
005cafd9          *(uint64_t*)ecx_8 = ((double)((long double)this->_duration));
005cafdd          void* eax_9 = (*(uint32_t*)arg2 + 8);
005cafe0          *(uint32_t*)arg2 = eax_9;
005cafe5          *(uint32_t*)eax_9 = this->_caster;
005cafe9          void* ecx_11 = (*(uint32_t*)arg2 + 4);
005cafec          *(uint32_t*)arg2 = ecx_11;
005caff3          *(uint32_t*)ecx_11 = ((float)((long double)this->_degrade_modifier));
005caff7          void* eax_12 = (*(uint32_t*)arg2 + 4);
005caffa          *(uint32_t*)arg2 = eax_12;
005cafff          *(uint32_t*)eax_12 = ((float)((long double)this->_degrade_limit));
005cb003          void* ecx_13 = (*(uint32_t*)arg2 + 4);
005cb006          *(uint32_t*)arg2 = ecx_13;
005cb016          *(uint64_t*)ecx_13 = ((double)(((long double)this->_last_time_degraded) - ((long double)Timer::cur_time)));
005cb018          *(uint32_t*)arg2 += 8;
005cb013          this->_smod.vtable->Pack(arg2, arg3);
005cb025          **(uint32_t**)arg2 = this->m_SpellSetID;
005cb027          *(uint32_t*)arg2 += 4;
005caf81      }
005caf81      
005cb02f      return result;
005caf70  }

005cb032                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005cb040  int32_t __thiscall Enchantment::UnPack(class Enchantment* this, void** arg2, uint32_t arg3)

005cb040  {
005cb04a      if (arg3 < 0x30)
005cb04f          return 0;
005cb04f      
005cb05c      this->_id = **(uint32_t**)arg2;
005cb061      void* ebx_1 = (*(uint32_t*)arg2 + 4);
005cb064      *(uint32_t*)arg2 = ebx_1;
005cb068      int32_t ebx_2 = *(uint32_t*)ebx_1;
005cb06d      *(uint32_t*)arg2 = ((char*)ebx_1 + 4);
005cb076      this->_spell_category = ((uint32_t)ebx_2);
005cb07d      this->_power_level = **(uint32_t**)arg2;
005cb082      void* eax_8 = (*(uint32_t*)arg2 + 4);
005cb085      *(uint32_t*)arg2 = eax_8;
005cb089      this->_start_time = *(uint32_t*)eax_8;
005cb08f      *(uint32_t*)((char*)this->_start_time)[4] = *(uint32_t*)((char*)eax_8 + 4);
005cb097      *(uint32_t*)arg2 += 8;
005cb0a4      this->_start_time = ((double)(((long double)Timer::cur_time) + ((long double)this->_start_time)));
005cb0a7      void* ecx_5 = *(uint32_t*)arg2;
005cb0ab      this->_duration = *(uint32_t*)ecx_5;
005cb0b1      *(uint32_t*)((char*)this->_duration)[4] = *(uint32_t*)((char*)ecx_5 + 4);
005cb0b6      void* eax_12 = (*(uint32_t*)arg2 + 8);
005cb0b9      *(uint32_t*)arg2 = eax_12;
005cb0bd      this->_caster = *(uint32_t*)eax_12;
005cb0c2      void* ecx_8 = (*(uint32_t*)arg2 + 4);
005cb0c5      *(uint32_t*)arg2 = ecx_8;
005cb0cb      this->_degrade_modifier = *(uint32_t*)ecx_8;
005cb0d0      void* eax_16 = (*(uint32_t*)arg2 + 4);
005cb0d3      *(uint32_t*)arg2 = eax_16;
005cb0d7      this->_degrade_limit = *(uint32_t*)eax_16;
005cb0dc      void* ecx_11 = (*(uint32_t*)arg2 + 4);
005cb0df      *(uint32_t*)arg2 = ecx_11;
005cb0e5      this->_last_time_degraded = *(uint32_t*)ecx_11;
005cb0eb      *(uint32_t*)((char*)this->_last_time_degraded)[4] = *(uint32_t*)((char*)ecx_11 + 4);
005cb0f3      *(uint32_t*)arg2 += 8;
005cb101      this->_last_time_degraded = ((double)(((long double)Timer::cur_time) + ((long double)this->_last_time_degraded)));
005cb106      int32_t result = this->_smod.vtable->UnPack(arg2, arg3);
005cb106      
005cb10b      if (result == 0)
005cb110          return result;
005cb110      
005cb119      if ((ebx_2 >> 0x10) >= 1)
005cb119      {
005cb11f          this->m_SpellSetID = **(uint32_t**)arg2;
005cb122          *(uint32_t*)arg2 += 4;
005cb119      }
005cb119      
005cb12d      return 1;
005cb040  }


005cb130  int32_t __thiscall CContractTrackerTable::UnPack(class CContractTrackerTable* this, void** arg2, uint32_t arg3)

005cb130  {
005cb130      struct PackableHashTable<unsigned long,CContractTracker>::VTable* vtable = this->_contractTrackerHash.vtable;
005cb137      void** edi = arg2;
005cb13b      void* ebp = *(uint32_t*)edi;
005cb149      arg2 = nullptr;
005cb149      
005cb15a      if (arg3 >= vtable->Pack(&arg2, 0))
005cb15a      {
005cb13d          this->_contractTrackerHash.vtable->UnPack(edi, arg3);
005cb13d          
005cb16b          if (arg3 >= (*(uint32_t*)edi - ebp))
005cb181              return 1;
005cb181          
005cb16d          *(uint32_t*)edi = ebp;
005cb15a      }
005cb15a      
005cb175      return 0;
005cb130  }

005cb184              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005cb190  uint32_t __thiscall SkillBase::Pack(class SkillBase* this, void** arg2, uint32_t arg3)

005cb190  {
005cb190      class SkillBase* this_1 = this;
005cb1a1      this_1 = nullptr;
005cb1d5      class SkillBase* this_2 = (((AC1Legacy::PStringBase<char>::Pack(&this->_description, &this_1, 0) + AC1Legacy::PStringBase<char>::Pack(&this->_name, &this_1, 0)) + this->_formula.vtable->Pack(&this_1, 0)) + 0x30);
005cb1df      this_1 = this_2;
005cb1df      
005cb1e3      if (arg3 < this_2)
005cb286          return this_2;
005cb286      
005cb1f2      AC1Legacy::PStringBase<char>::Pack(&this->_description, arg2, arg3);
005cb1fc      AC1Legacy::PStringBase<char>::Pack(&this->_name, arg2, arg3);
005cb206      **(uint32_t**)arg2 = this->_iconID.id;
005cb20a      void* eax_4 = (*(uint32_t*)arg2 + 4);
005cb20d      *(uint32_t*)arg2 = eax_4;
005cb212      *(uint32_t*)eax_4 = this->_trained_cost;
005cb216      void* edx_3 = (*(uint32_t*)arg2 + 4);
005cb219      *(uint32_t*)arg2 = edx_3;
005cb220      *(uint32_t*)edx_3 = this->_specialized_cost;
005cb224      void* ecx_8 = (*(uint32_t*)arg2 + 4);
005cb227      *(uint32_t*)arg2 = ecx_8;
005cb22e      *(uint32_t*)ecx_8 = this->_category;
005cb232      void* eax_8 = (*(uint32_t*)arg2 + 4);
005cb235      *(uint32_t*)arg2 = eax_8;
005cb23a      *(uint32_t*)eax_8 = this->_chargen_use;
005cb23e      void* edx_7 = (*(uint32_t*)arg2 + 4);
005cb241      *(uint32_t*)arg2 = edx_7;
005cb248      *(uint32_t*)edx_7 = this->_min_level;
005cb24a      *(uint32_t*)arg2 += 4;
005cb1ac      this->_formula.vtable->Pack(arg2, arg3);
005cb25c      **(uint64_t**)arg2 = ((double)((long double)this->_upper_bound));
005cb260      void* edx_10 = (*(uint32_t*)arg2 + 8);
005cb263      *(uint32_t*)arg2 = edx_10;
005cb26a      *(uint64_t*)edx_10 = ((double)((long double)this->_lower_bound));
005cb26e      void* ecx_13 = (*(uint32_t*)arg2 + 8);
005cb271      *(uint32_t*)arg2 = ecx_13;
005cb278      *(uint64_t*)ecx_13 = ((double)((long double)this->_learn_mod));
005cb27a      *(uint32_t*)arg2 += 8;
005cb27d      return this_1;
005cb190  }

005cb289                             90 90 90 90 90 90 90                                                           .......

005cb290  int32_t __thiscall SkillBase::UnPack(class SkillBase* this, void** arg2, uint32_t arg3)

005cb290  {
005cb296      void** esi = arg2;
005cb29a      void* eax = *(uint32_t*)esi;
005cb2ad      arg2 = nullptr;
005cb2ad      
005cb2f9      if (arg3 >= (((AC1Legacy::PStringBase<char>::Pack(&this->_description, &arg2, 0) + AC1Legacy::PStringBase<char>::Pack(&this->_name, &arg2, 0)) + this->_formula.vtable->Pack(&arg2, 0)) + 0x30))
005cb2f9      {
005cb304          AC1Legacy::PStringBase<char>::UnPack(&this->_description, esi, arg3);
005cb30e          AC1Legacy::PStringBase<char>::UnPack(&this->_name, esi, arg3);
005cb313          void* eax_4 = *(uint32_t*)esi;
005cb315          class IDClass<_tagDataID,32,0> ecx_9 = *(uint32_t*)eax_4;
005cb31a          *(uint32_t*)esi = ((char*)eax_4 + 4);
005cb31c          this->_iconID.id = ecx_9;
005cb323          this->_trained_cost = **(uint32_t**)esi;
005cb328          void* eax_8 = (*(uint32_t*)esi + 4);
005cb32b          *(uint32_t*)esi = eax_8;
005cb32f          this->_specialized_cost = *(uint32_t*)eax_8;
005cb334          void* edx_3 = (*(uint32_t*)esi + 4);
005cb337          *(uint32_t*)esi = edx_3;
005cb33d          this->_category = *(uint32_t*)edx_3;
005cb342          void* ecx_12 = (*(uint32_t*)esi + 4);
005cb345          *(uint32_t*)esi = ecx_12;
005cb34b          this->_chargen_use = *(uint32_t*)ecx_12;
005cb350          void* eax_13 = (*(uint32_t*)esi + 4);
005cb353          *(uint32_t*)esi = eax_13;
005cb357          this->_min_level = *(uint32_t*)eax_13;
005cb360          *(uint32_t*)esi += 4;
005cb2b8          this->_formula.vtable->UnPack(esi, arg3);
005cb36b          void* eax_14 = *(uint32_t*)esi;
005cb36f          this->_upper_bound = *(uint32_t*)eax_14;
005cb375          *(uint32_t*)((char*)this->_upper_bound)[4] = *(uint32_t*)((char*)eax_14 + 4);
005cb37a          void* ecx_17 = (*(uint32_t*)esi + 8);
005cb37d          *(uint32_t*)esi = ecx_17;
005cb383          this->_lower_bound = *(uint32_t*)ecx_17;
005cb389          *(uint32_t*)((char*)this->_lower_bound)[4] = *(uint32_t*)((char*)ecx_17 + 4);
005cb38e          void* eax_17 = (*(uint32_t*)esi + 8);
005cb391          *(uint32_t*)esi = eax_17;
005cb395          this->_learn_mod = *(uint32_t*)eax_17;
005cb39f          *(uint32_t*)((char*)this->_learn_mod)[4] = *(uint32_t*)((char*)eax_17 + 4);
005cb3a4          void* ebp_2 = (*(uint32_t*)esi + 8);
005cb3ad          *(uint32_t*)esi = ebp_2;
005cb3ad          
005cb3af          if (arg3 >= ((char*)ebp_2 - eax))
005cb3cb              return 1;
005cb3cb          
005cb3b1          *(uint32_t*)esi = eax;
005cb2f9      }
005cb2f9      
005cb3bc      return 0;
005cb290  }

005cb3ce                                            90 90                                                                ..

005cb3d0  uint32_t __thiscall Attribute2ndTable::Pack(class Attribute2ndTable* this, void** arg2, uint32_t arg3)

005cb3d0  {
005cb3d0      class Attribute2ndTable* this_1 = this;
005cb3d6      int32_t eax = this->m_bLoaded*(int32_t*)((char*)this + 8);
005cb3e4      this_1 = nullptr;
005cb41a      int32_t result = ((*(uint32_t*)(eax + 0xc)(&this_1, 0) + *(uint32_t*)(this->_max_health._formula._y + 0xc)(&this_1, 0)) + *(uint32_t*)(this->m_DID.id + 0xc)(&this_1, 0));
005cb41a      
005cb41e      if (arg3 >= result)
005cb41e      {
005cb42c          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(arg2, arg3);
005cb437          *(uint32_t*)(this->m_DID.id + 0xc)(arg2, arg3);
005cb442          *(uint32_t*)(this->_max_health._formula._y + 0xc)(arg2, arg3);
005cb41e      }
005cb41e      
005cb44c      return result;
005cb3d0  }

005cb44f                                               90                                                                 .

005cb450  int32_t __thiscall Attribute2ndTable::UnPack(class Attribute2ndTable* this, void** arg2, uint32_t arg3)

005cb450  {
005cb457      void** edi = arg2;
005cb45b      void* eax = *(uint32_t*)edi;
005cb45f      uint32_t id = this->m_DID.id;
005cb470      arg2 = nullptr;
005cb470      
005cb4b8      if (arg3 >= ((*(uint32_t*)(id + 0xc)(&arg2, 0) + *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0xc)(&arg2, 0)) + *(uint32_t*)(this->_max_health._formula._y + 0xc)(&arg2, 0)))
005cb4b8      {
005cb4c2          *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0x10)(edi, arg3);
005cb4cd          *(uint32_t*)(this->m_DID.id + 0x10)(edi, arg3);
005cb4d8          *(uint32_t*)(this->_max_health._formula._y + 0x10)(edi, arg3);
005cb4d8          
005cb4e5          if (arg3 >= (*(uint32_t*)edi - eax))
005cb501              return 1;
005cb501          
005cb4e7          *(uint32_t*)edi = eax;
005cb4b8      }
005cb4b8      
005cb4f2      return 0;
005cb450  }

005cb504              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005cb510  void __thiscall Attribute2ndTable::Attribute2ndTable(class Attribute2ndTable* this, class IDClass<_tagDataID,32,0> arg2)

005cb510  {
005cb518      DBObj::DBObj(this, arg2);
005cb51d      this->vtable = &PackObj::`vftable';
005cb524      this->vtable = 0x7e8168;
005cb52a      this->vtable = &Attribute2ndTable::`vftable';
005cb531      this->_max_health.vtable = 0x7c3fdc;
005cb53a      this->_max_health._formula._w = 0;
005cb53d      this->_max_health._formula._x = 0;
005cb540      this->_max_health._formula._y = 0;
005cb543      this->_max_health._formula._attr1 = 0;
005cb546      this->_max_health._formula._attr2 = 0;
005cb54e      this->_max_health._formula.vtable = 0x7a016c;
005cb556      this->_max_health._formula._z = 1;
005cb559      this->_max_stamina.vtable = 0x7c3fdc;
005cb560      this->_max_stamina._formula._w = 0;
005cb563      this->_max_stamina._formula._x = 0;
005cb566      this->_max_stamina._formula._y = 0;
005cb569      this->_max_stamina._formula._attr1 = 0;
005cb56c      this->_max_stamina._formula._attr2 = 0;
005cb56f      this->_max_stamina._formula.vtable = 0x7a016c;
005cb572      this->_max_stamina._formula._z = 1;
005cb575      this->_max_mana.vtable = 0x7c3fdc;
005cb57c      this->_max_mana._formula._w = 0;
005cb582      this->_max_mana._formula._x = 0;
005cb588      this->_max_mana._formula._y = 0;
005cb58e      this->_max_mana._formula._attr1 = 0;
005cb594      this->_max_mana._formula._attr2 = 0;
005cb59a      this->_max_mana._formula.vtable = 0x7a016c;
005cb59d      this->_max_mana._formula._z = 1;
005cb510  }

005cb5a9                             90 90 90 90 90 90 90                                                           .......

005cb5b0  void* __thiscall Attribute2ndTable::`vector deleting destructor'(class Attribute2ndTable* this, uint32_t arg2)

005cb5b0  {
005cb5b3      /* tailcall */
005cb5b3      return Attribute2ndTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005cb5b0  }

005cb5b8                                                                          cc cc cc cc cc cc cc cc                          ........

005cb5c0  void* __thiscall Attribute2ndTable::`scalar deleting destructor'(class Attribute2ndTable* this, uint32_t arg2)

005cb5c0  {
005cb5c3      Attribute2ndTable::~Attribute2ndTable(this);
005cb5c3      
005cb5cd      if ((arg2 & 1) != 0)
005cb5d0          operator delete(this);
005cb5d0      
005cb5db      return this;
005cb5c0  }

005cb5de                                                                                            90 90                                ..

005cb5e0  void __fastcall Attribute2ndTable::~Attribute2ndTable(class Attribute2ndTable* this)

005cb5e0  {
005cb5e5      this->vtable = 0x7e8168;
005cb5eb      this->vtable = &Attribute2ndTable::`vftable';
005cb5f2      this->_max_mana._formula.vtable = 0x79285c;
005cb5f5      this->_max_mana.vtable = 0x79285c;
005cb5f8      this->_max_stamina._formula.vtable = 0x79285c;
005cb5fb      this->_max_stamina.vtable = 0x79285c;
005cb5fe      this->_max_health._formula.vtable = 0x79285c;
005cb601      this->_max_health.vtable = 0x79285c;
005cb604      this->vtable = &PackObj::`vftable';
005cb607      /* tailcall */
005cb607      return DBObj::~DBObj(this);
005cb5e0  }

005cb60c                                      90 90 90 90                                                              ....

005cb610  class DBObj* Attribute2ndTable::Allocate(class Attribute2ndTable const* this @ ecx)

005cb610  {
005cb610      /* tailcall */
005cb610      return Attribute2ndTable::Allocator();
005cb610  }

005cb615                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005cb620  uint32_t __thiscall PackableHashTable<unsigned long,SkillBase>::Pack(class PackableHashTable<unsigned long,SkillBase>* this, void** arg2, uint32_t arg3)

005cb620  {
005cb620      class PackableHashTable<unsigned long,SkillBase>* this_1 = this;
005cb625      uint32_t result = PackableHashTable<unsigned long,SkillBase>::pack_size(this);
005cb62a      uint32_t ebx = arg3;
005cb630      uint32_t result_1 = result;
005cb630      
005cb634      if (ebx >= result)
005cb634      {
005cb649          **(uint32_t**)arg2 = ((this->_table_size << 0x10) | this->_currNum);
005cb64b          *(uint32_t*)arg2 += 4;
005cb651          uint32_t i = 0;
005cb655          arg3 = 0;
005cb655          
005cb659          if (this->_table_size > 0)
005cb659          {
005cb6a2              do
005cb6a2              {
005cb663                  int32_t* j = this->_buckets[i];
005cb663                  
005cb668                  if (j != 0)
005cb668                  {
005cb68e                      do
005cb68e                      {
005cb673                          if (ebx >= 4)
005cb673                          {
005cb679                              **(uint32_t**)arg2 = *(uint32_t*)j;
005cb67b                              *(uint32_t*)arg2 += 4;
005cb673                          }
005cb673                          
005cb686                          *(uint32_t*)(j[2] + 0xc)(arg2, ebx);
005cb689                          j = j[0x18];
005cb68e                      } while (j != 0);
005cb68e                      
005cb690                      result = result_1;
005cb694                      i = arg3;
005cb668                  }
005cb668                  
005cb69b                  i += 1;
005cb69e                  arg3 = i;
005cb6a2              } while (i < this->_table_size);
005cb659          }
005cb634      }
005cb634      
005cb6a9      return result;
005cb620  }

005cb65d                                                                                         8d 49 00                               .I.
005cb6ac                                      90 90 90 90                                                              ....

005cb6b0  uint32_t __fastcall PackableHashTable<unsigned long,SkillBase>::pack_size(class PackableHashTable<unsigned long,SkillBase>* this)

005cb6b0  {
005cb6b0      class PackableHashTable<unsigned long,SkillBase>* this_1 = this;
005cb6b8      int32_t i = 0;
005cb6ba      bool cond:0 = this->_table_size <= 0;
005cb6bd      int32_t result = 4;
005cb6c2      this_1 = nullptr;
005cb6c2      
005cb6c6      if (!(cond:0))
005cb6c6      {
005cb701          do
005cb701          {
005cb6d3              void* j = this->_buckets[i];
005cb6d3              
005cb6d8              while (j != 0)
005cb6d8              {
005cb6ed                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 8) + 0xc)(&this_1, 0);
005cb6f0                  j = *(uint32_t*)((char*)j + 0x60);
005cb6f5                  result = ((result + eax_2) + 4);
005cb6d8              }
005cb6d8              
005cb6fe              i += 1;
005cb701          } while (i < this->_table_size);
005cb6c6      }
005cb6c6      
005cb70a      return result;
005cb6b0  }

005cb70b                                   90 90 90 90 90                                                             .....

005cb710  void __thiscall SkillTable::GetSubDataIDs(class SkillTable const* this, class QualifiedDataIDArray* arg2)

005cb710  {
005cb71c      void __return;
005cb71c      PackableHashTable<unsigned long,SkillBase>::begin(&this->_skillBaseHash, &__return);
005cb727      void* i_1;
005cb727      void* const i_2;
005cb727      
005cb727      for (void* const i = i_1; i != 0; i = i_2)
005cb727      {
005cb74c          QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, *(uint32_t*)((char*)i + 0x14), 0), 8);
005cb751          i_2 = *(uint32_t*)((char*)i + 0x60);
005cb751          
005cb756          if (i_2 == 0)
005cb756          {
005cb75b              int32_t eax_4 = (*(uint32_t*)((char*)i + 0x64) + 1);
005cb75e              int32_t var_4;
005cb75e              
005cb75e              if (eax_4 >= var_4)
005cb75e              {
005cb76b              label_5cb76b:
005cb76b                  i_2 = nullptr;
005cb75e              }
005cb75e              else
005cb75e              {
005cb764                  int32_t var_8;
005cb764                  
005cb764                  while (*(uint32_t*)(var_8 + (eax_4 << 2)) == 0)
005cb764                  {
005cb766                      eax_4 += 1;
005cb766                      
005cb769                      if (eax_4 >= var_4)
005cb769                          goto label_5cb76b;
005cb764                  }
005cb764                  
005cb77d                  i_2 = *(uint32_t*)(var_8 + (eax_4 << 2));
005cb75e              }
005cb756          }
005cb727      }
005cb710  }

005cb782        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005cb790  void __fastcall PackableHashTable<unsigned long,SkillBase>::EmptyContents(class PackableHashTable<unsigned long,SkillBase>* this)

005cb790  {
005cb798      class PackableHashTable<unsigned long,SkillBase>* this_1 = this;
005cb798      
005cb79c      if (this->_buckets != 0)
005cb79c      {
005cb7a5          int32_t i = 0;
005cb7a9          int32_t i_1 = 0;
005cb7a9          
005cb7ad          if (this->_table_size > 0)
005cb7ad          {
005cb7b3              void* j;
005cb7b3              void* j_1 = j;
005cb7b3              
005cb83e              do
005cb83e              {
005cb7c3                  void* j_2 = this->_buckets[i];
005cb7c3                  
005cb7c8                  if (j_2 != 0)
005cb7c8                  {
005cb820                      do
005cb820                      {
005cb7d0                          int32_t* edi_1 = *(uint32_t*)((char*)j_2 + 0x10);
005cb7d3                          j = *(uint32_t*)((char*)j_2 + 0x60);
005cb7da                          *(uint32_t*)((char*)j_2 + 0x2c) = 0x79285c;
005cb7da                          
005cb7e9                          if ((InterlockedDecrement(&edi_1[1]) == 0 && edi_1 != 0))
005cb7f1                              **(uint32_t**)edi_1(1);
005cb7f1                          
005cb7f3                          int32_t* edi_2 = *(uint32_t*)((char*)j_2 + 0xc);
005cb7f3                          
005cb802                          if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
005cb80a                              **(uint32_t**)edi_2(1);
005cb80a                          
005cb80d                          *(uint32_t*)((char*)j_2 + 8) = 0x79285c;
005cb814                          operator delete(j_2);
005cb81e                          j_2 = j;
005cb820                      } while (j != 0);
005cb820                      
005cb822                      i = i_1;
005cb826                      this = this_1;
005cb7c8                  }
005cb7c8                  
005cb82a                  this->_buckets[i] = 0;
005cb837                  i += 1;
005cb83a                  i_1 = i;
005cb83e              } while (i < this->_table_size);
005cb7ad          }
005cb79c      }
005cb79c      
005cb844      this->_currNum = 0;
005cb790  }

005cb84f                                               90                                                                 .

005cb850  void __fastcall PackableHashTable<unsigned long,SkillBase>::~PackableHashTable<unsigned long,SkillBase>(class PackableHashTable<unsigned long,SkillBase>* this)

005cb850  {
005cb853      this->vtable = 0x7e81c0;
005cb859      PackableHashTable<unsigned long,SkillBase>::EmptyContents(this);
005cb85e      class PackableHashData<unsigned long,SkillBase>** _buckets = this->_buckets;
005cb85e      
005cb863      if (_buckets != 0)
005cb863      {
005cb866          operator delete[](_buckets);
005cb86e          this->_buckets = nullptr;
005cb863      }
005cb863      
005cb875      this->_table_size = 0;
005cb87c      this->vtable = 0x79285c;
005cb850  }

005cb884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005cb890  int32_t __thiscall PackableHashTable<unsigned long,SkillBase>::UnPack(class PackableHashTable<unsigned long,SkillBase>* this, void** arg2, uint32_t arg3)

005cb890  {
005cb89e      if (arg3 < 4)
005cb8a7          return 0;
005cb8a7      
005cb8ac      void** edi = arg2;
005cb8b0      void* eax_1 = *(uint32_t*)edi;
005cb8b8      uint32_t var_5c = arg3;
005cb8bc      PackableHashTable<unsigned long,SkillBase>::EmptyContents(this);
005cb8c1      class PackableHashData<unsigned long,SkillBase>** _buckets = this->_buckets;
005cb8c1      
005cb8c8      if (_buckets != 0)
005cb8c8      {
005cb8cb          operator delete[](_buckets);
005cb8d3          this->_buckets = nullptr;
005cb8c8      }
005cb8c8      
005cb8d6      this->_table_size = 0;
005cb8d9      void* ecx_1 = *(uint32_t*)edi;
005cb8db      int32_t eax_2 = *(uint32_t*)ecx_1;
005cb8e0      *(uint32_t*)edi = ((char*)ecx_1 + 4);
005cb8e4      uint32_t ecx_4 = (eax_2 >> 0x10);
005cb8e7      int32_t eax_3 = (eax_2 & 0xffff);
005cb8ec      int32_t ebx_1 = (arg3 - 4);
005cb8f1      this->_table_size = ecx_4;
005cb8f1      
005cb8f6      if (ecx_4 == 0)
005cb8f6      {
005cb8ff          int32_t result;
005cb8ff          result = eax_3 == 0;
005cb906          return result;
005cb8f6      }
005cb8f6      
005cb91b      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
005cb91b      {
005cb934          int32_t var_58;
005cb934          SkillBase::SkillBase(&var_58);
005cb93b          arg3 = 0;
005cb943          int32_t* ecx_10;
005cb943          
005cb943          if (eax_3 <= 0)
005cb943          {
005cb99f          label_5cb99f:
005cb99f              ecx_10 = &var_58;
005cb99f              
005cb9a3              if (var_5c >= (*(uint32_t*)edi - eax_1))
005cb9a3              {
005cb9a5                  SkillBase::~SkillBase(ecx_10);
005cb9b6                  return 1;
005cb9a3              }
005cb943          }
005cb943          else
005cb943          {
005cb948              while (true)
005cb948              {
005cb948                  if (ebx_1 >= 4)
005cb948                  {
005cb94a                      int32_t* eax_5 = *(uint32_t*)edi;
005cb94e                      int32_t edx_1 = var_58;
005cb953                      arg2 = *(uint32_t*)eax_5;
005cb95f                      *(uint32_t*)edi = &eax_5[1];
005cb95f                      
005cb966                      if ((*(uint32_t*)(edx_1 + 0x10)(edi, ebx_1) != 0 && (PackableHashTable<unsigned long,SkillBase>::add(this, &arg2, &var_58) != 0 || this->m_fThrowawayDuplicateKeysOnUnPack != 0)))
005cb966                      {
005cb989                          bool cond:5_1 = (arg3 + 1) < eax_3;
005cb98b                          arg3 += 1;
005cb98b                          
005cb98f                          if (!(cond:5_1))
005cb98f                              goto label_5cb99f;
005cb98f                          
005cb98f                          continue;
005cb966                      }
005cb948                  }
005cb948                  
005cb9b9                  ecx_10 = &var_58;
005cb9b9                  break;
005cb948              }
005cb943          }
005cb943          
005cb9bd          SkillBase::~SkillBase(ecx_10);
005cb91b      }
005cb91b      
005cb9cb      return 0;
005cb890  }

005cb9ce                                            90 90                                                                ..

005cb9d0  int32_t __thiscall PackableHashTable<unsigned long,SkillBase>::add(class PackableHashTable<unsigned long,SkillBase>* this, uint32_t const* arg2, class SkillBase const* arg3)

005cb9d0  {
005cb9da      uint32_t _table_size_1 = this->_table_size;
005cb9da      
005cb9df      if (_table_size_1 == 0)
005cb9df      {
005cba0e      label_5cba0e:
005cba0e          void* eax_4 = operator new(0x68);
005cba0e          
005cba1a          if (eax_4 != 0)
005cba1a          {
005cba23              uint32_t _table_size = this->_table_size;
005cba2a              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
005cba2c              SkillBase::SkillBase(((char*)eax_4 + 8), arg3);
005cba31              *(uint32_t*)((char*)eax_4 + 0x60) = 0;
005cba3d              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
005cba3f              *(uint32_t*)((char*)eax_4 + 0x64) = temp1_2;
005cba4a              *(uint32_t*)((char*)eax_4 + 0x60) = this->_buckets[temp1_2];
005cba4d              this->_buckets[temp1_2] = eax_4;
005cba53              this->_currNum += 1;
005cba5f              return 1;
005cba1a          }
005cb9df      }
005cb9df      else
005cb9df      {
005cb9e1          class PackableHashData<unsigned long,SkillBase>** _buckets = this->_buckets;
005cb9e1          
005cb9e6          if (_buckets == 0)
005cb9e6              goto label_5cba0e;
005cb9e6          
005cb9e8          uint32_t const i = *(uint32_t*)arg2;
005cb9f1          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
005cb9f1          
005cb9f6          if (edx_3 == 0)
005cb9f6              goto label_5cba0e;
005cb9f6          
005cb9fa          while (i != *(uint32_t*)edx_3)
005cb9fa          {
005cb9fc              edx_3 = edx_3[0x18];
005cb9fc              
005cba01              if (edx_3 == 0)
005cba01                  goto label_5cba0e;
005cb9fa          }
005cb9fa          
005cba0a          if (edx_3 == 0xfffffff8)
005cba0a              goto label_5cba0e;
005cb9df      }
005cb9df      
005cba68      return 0;
005cb9d0  }

005cba6b                                   90 90 90 90 90                                                             .....

005cba70  void __thiscall SkillBase::SkillBase(class SkillBase* this, class SkillBase const* arg2)

005cba70  {
005cba7f      this->vtable = 0x7c4020;
005cba85      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->_description.m_buffer;
005cba88      this->_description.m_buffer = m_buffer;
005cba8f      InterlockedIncrement(&m_buffer->m_cRef);
005cba91      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->_name.m_buffer;
005cba94      this->_name.m_buffer = m_buffer_1;
005cba9b      InterlockedIncrement(&m_buffer_1->m_cRef);
005cbaa0      this->_iconID.id = arg2->_iconID.id;
005cbaa6      this->_trained_cost = arg2->_trained_cost;
005cbaac      this->_specialized_cost = arg2->_specialized_cost;
005cbab2      this->_category = arg2->_category;
005cbab8      this->_chargen_use = arg2->_chargen_use;
005cbac5      this->_min_level = arg2->_min_level;
005cbac8      SkillFormula::SkillFormula(&this->_formula, &arg2->_formula);
005cbad0      this->_upper_bound = arg2->_upper_bound;
005cbad6      *(uint32_t*)((char*)this->_upper_bound)[4] = *(uint32_t*)((char*)arg2->_upper_bound)[4];
005cbadc      this->_lower_bound = arg2->_lower_bound;
005cbae2      *(uint32_t*)((char*)this->_lower_bound)[4] = *(uint32_t*)((char*)arg2->_lower_bound)[4];
005cbae8      this->_learn_mod = arg2->_learn_mod;
005cbaee      *(uint32_t*)((char*)this->_learn_mod)[4] = *(uint32_t*)((char*)arg2->_learn_mod)[4];
005cba70  }

005cbaf9                                                                             90 90 90 90 90 90 90                           .......

005cbb00  void* __thiscall PackableHashTable<unsigned long,SkillBase>::`scalar deleting destructor'(class PackableHashTable<unsigned long,SkillBase>* this, uint32_t arg2)

005cbb00  {
005cbb03      this->vtable = 0x7e81c0;
005cbb09      PackableHashTable<unsigned long,SkillBase>::EmptyContents(this);
005cbb0e      class PackableHashData<unsigned long,SkillBase>** _buckets = this->_buckets;
005cbb0e      
005cbb13      if (_buckets != 0)
005cbb13      {
005cbb16          operator delete[](_buckets);
005cbb1e          this->_buckets = nullptr;
005cbb13      }
005cbb13      
005cbb2a      this->_table_size = 0;
005cbb31      this->vtable = 0x79285c;
005cbb31      
005cbb37      if ((arg2 & 1) != 0)
005cbb3a          operator delete(this);
005cbb3a      
005cbb45      return this;
005cbb00  }

005cbb48                          90 90 90 90 90 90 90 90                                                          ........

005cbb50  void __thiscall SkillTable::SkillTable(class SkillTable* this, class IDClass<_tagDataID,32,0> arg2)

005cbb50  {
005cbb58      DBObj::DBObj(this, arg2);
005cbb5d      this->vtable = &PackObj::`vftable';
005cbb67      this->vtable = 0x7e81e8;
005cbb6d      this->vtable = &SkillTable::`vftable';
005cbb64      this->_skillBaseHash.vtable = 0x7e81c0;
005cbb64      this->_skillBaseHash.m_fThrowawayDuplicateKeysOnUnPack = 0;
005cbb64      this->_skillBaseHash._buckets = nullptr;
005cbb64      this->_skillBaseHash._table_size = 0x20;
005cbb64      this->_skillBaseHash._currNum = 0;
005cbb8c      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_skillBaseHash);
005cbb50  }

005cbb97                                                                       90 90 90 90 90 90 90 90 90                         .........

005cbba0  void* __thiscall SkillTable::`vector deleting destructor'(class SkillTable* this, uint32_t arg2)

005cbba0  {
005cbba3      /* tailcall */
005cbba3      return SkillTable::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005cbba0  }

005cbba8                          cc cc cc cc cc cc cc cc                                                          ........

005cbbb0  void* __thiscall SkillTable::`scalar deleting destructor'(class SkillTable* this, uint32_t arg2)

005cbbb0  {
005cbbb6      this->vtable = 0x7e81e8;
005cbbbc      this->vtable = &SkillTable::`vftable';
005cbbc3      PackableHashTable<unsigned long,SkillBase>::~PackableHashTable<unsigned long,SkillBase>(&this->_skillBaseHash);
005cbbca      SerializeUsingPackDBObj::~SerializeUsingPackDBObj(this);
005cbbca      
005cbbd4      if ((arg2 & 1) != 0)
005cbbd7          operator delete(this);
005cbbd7      
005cbbe2      return this;
005cbbb0  }

005cbbe5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005cbbf0  class DBObj* SkillTable::Allocate(class SkillTable const* this @ ecx)

005cbbf0  {
005cbbf0      /* tailcall */
005cbbf0      return SkillTable::Allocator();
005cbbf0  }

005cbbf5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005cbc00  int32_t __thiscall ACQualityFilter::SetAttribute(class ACQualityFilter* this, uint32_t arg2, int32_t const arg3)

005cbc00  {
005cbc0f      if (arg2 < this->vtable->GetNumAttributeStats())
005cbc0f      {
005cbc16          if (this->_attribute_stat_filter != 0)
005cbc16          {
005cbc53              this->_attribute_stat_filter[arg2] = arg3;
005cbc64              return 1;
005cbc16          }
005cbc16          
005cbc23          void* eax_5 = operator new[]((this->vtable->GetNumAttributeStats() << 2));
005cbc2d          this->_attribute_stat_filter = eax_5;
005cbc2d          
005cbc30          if (eax_5 != 0)
005cbc30          {
005cbc3f              int32_t ecx_3 = (this->vtable->GetNumAttributeStats() << 2);
005cbc50              __builtin_memset(__builtin_memset(this->_attribute_stat_filter, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
005cbc53              this->_attribute_stat_filter[arg2] = arg3;
005cbc64              return 1;
005cbc30          }
005cbc0f      }
005cbc0f      
005cbc6b      return 0;
005cbc00  }

005cbc6e                                            90 90                                                                ..

005cbc70  int32_t __thiscall ACQualityFilter::QueryAttribute2nd(class ACQualityFilter const* this, uint32_t arg2)

005cbc70  {
005cbc81      if (arg2 < this->vtable->GetNumAttribute2ndStats())
005cbc81      {
005cbc83          int32_t* _attribute2nd_stat_filter = this->_attribute2nd_stat_filter;
005cbc83          
005cbc88          if (_attribute2nd_stat_filter != 0)
005cbc8e              return _attribute2nd_stat_filter[arg2];
005cbc81      }
005cbc81      
005cbc94      return 0;
005cbc70  }

005cbc97                                                                       90 90 90 90 90 90 90 90 90                         .........

005cbca0  int32_t __thiscall ACQualityFilter::SetAttribute2nd(class ACQualityFilter* this, uint32_t arg2, int32_t const arg3)

005cbca0  {
005cbcb2      if (arg2 < this->vtable->GetNumAttribute2ndStats())
005cbcb2      {
005cbcb9          if (this->_attribute2nd_stat_filter != 0)
005cbcb9          {
005cbcfc              this->_attribute2nd_stat_filter[arg2] = arg3;
005cbd0d              return 1;
005cbcb9          }
005cbcb9          
005cbcc9          void* eax_5 = operator new[]((this->vtable->GetNumAttribute2ndStats() << 2));
005cbcd3          this->_attribute2nd_stat_filter = eax_5;
005cbcd3          
005cbcd6          if (eax_5 != 0)
005cbcd6          {
005cbce8              int32_t ecx_3 = (this->vtable->GetNumAttribute2ndStats() << 2);
005cbcf9              __builtin_memset(__builtin_memset(this->_attribute2nd_stat_filter, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
005cbcfc              this->_attribute2nd_stat_filter[arg2] = arg3;
005cbd0d              return 1;
005cbcd6          }
005cbcb2      }
005cbcb2      
005cbd14      return 0;
005cbca0  }

005cbd17                                                                       90 90 90 90 90 90 90 90 90                         .........

005cbd20  void __fastcall ACQualityFilter::Clear(class ACQualityFilter* this)

005cbd20  {
005cbd23      QualityFilter::Clear(this);
005cbd28      int32_t* _attribute_stat_filter = this->_attribute_stat_filter;
005cbd28      
005cbd2d      if (_attribute_stat_filter != 0)
005cbd2d      {
005cbd30          operator delete[](_attribute_stat_filter);
005cbd38          this->_attribute_stat_filter = nullptr;
005cbd2d      }
005cbd2d      
005cbd3f      int32_t* _attribute2nd_stat_filter = this->_attribute2nd_stat_filter;
005cbd3f      
005cbd44      if (_attribute2nd_stat_filter != 0)
005cbd44      {
005cbd47          operator delete[](_attribute2nd_stat_filter);
005cbd4f          this->_attribute2nd_stat_filter = nullptr;
005cbd44      }
005cbd44      
005cbd56      int32_t* _skill_stat_filter = this->_skill_stat_filter;
005cbd56      
005cbd5b      if (_skill_stat_filter != 0)
005cbd5b      {
005cbd5e          operator delete[](_skill_stat_filter);
005cbd66          this->_skill_stat_filter = nullptr;
005cbd5b      }
005cbd20  }

005cbd6f                                               90                                                                 .

005cbd70  uint32_t ACQualityFilter::GetNumFloatStats(class ACQualityFilter const* this @ ecx) __pure

005cbd70  {
005cbd75      return 0x200;
005cbd70  }

005cbd76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005cbd80  uint32_t ACQualityFilter::GetNumBoolStats(class ACQualityFilter const* this @ ecx) __pure

005cbd80  {
005cbd85      return 0x100;
005cbd80  }

005cbd86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005cbd90  uint32_t ACQualityFilter::GetNumDIDStats(class ACQualityFilter const* this @ ecx) __pure

005cbd90  {
005cbd95      return 0x40;
005cbd90  }

005cbd96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005cbda0  uint32_t __thiscall ACQualityFilter::pack_size(class ACQualityFilter* this, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4, uint32_t* arg5, uint32_t* arg6, uint32_t* arg7, uint32_t* arg8, uint32_t* arg9, uint32_t* arg10, uint32_t* arg11, uint32_t* arg12)

005cbda0  {
005cbdd0      uint32_t eax_2 = QualityFilter::pack_size(this, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
005cbde3      *(uint32_t*)arg2 = 0;
005cbdea      *(uint32_t*)arg3 = 0;
005cbdf0      *(uint32_t*)arg12 = 0;
005cbdfa      int32_t ebx_1 = (eax_2 + 4);
005cbdfd      int32_t edi = 0;
005cbdfd      
005cbe04      if (this->vtable->GetNumAttributeStats() > 0)
005cbe04      {
005cbe32          int32_t eax_9;
005cbe32          
005cbe32          do
005cbe32          {
005cbe0f              if (edi < this->vtable->GetNumAttributeStats())
005cbe0f              {
005cbe11                  int32_t* _attribute_stat_filter = this->_attribute_stat_filter;
005cbe11                  
005cbe1c                  if ((_attribute_stat_filter != 0 && _attribute_stat_filter[edi] != 0))
005cbe1c                  {
005cbe21                      ebx_1 += 4;
005cbe25                      *(uint32_t*)arg2 += 1;
005cbe1c                  }
005cbe0f              }
005cbe0f              
005cbe2c              edi += 1;
005cbe2d              eax_9 = this->vtable->GetNumAttributeStats();
005cbe32          } while (edi < eax_9);
005cbe04      }
005cbe04      
005cbe38      int32_t ebx_2 = (ebx_1 + 4);
005cbe3b      int32_t edi_1 = 0;
005cbe3b      
005cbe45      if (this->vtable->GetNumAttribute2ndStats() > 0)
005cbe45      {
005cbe84          int32_t eax_15;
005cbe84          
005cbe84          do
005cbe84          {
005cbe5c              if (edi_1 < this->vtable->GetNumAttribute2ndStats())
005cbe5c              {
005cbe5e                  int32_t* _attribute2nd_stat_filter = this->_attribute2nd_stat_filter;
005cbe5e                  
005cbe69                  if ((_attribute2nd_stat_filter != 0 && _attribute2nd_stat_filter[edi_1] != 0))
005cbe69                  {
005cbe71                      ebx_2 += 4;
005cbe75                      *(uint32_t*)arg3 += 1;
005cbe69                  }
005cbe5c              }
005cbe5c              
005cbe7b              edi_1 += 1;
005cbe7c              eax_15 = this->vtable->GetNumAttribute2ndStats();
005cbe84          } while (edi_1 < eax_15);
005cbe45      }
005cbe45      
005cbe8a      int32_t result = (ebx_2 + 4);
005cbe8d      int32_t edi_2 = 0;
005cbe8d      
005cbe97      if (this->vtable->GetNumSkillStats() > 0)
005cbe97      {
005cbed4          int32_t eax_20;
005cbed4          
005cbed4          do
005cbed4          {
005cbeac              if (edi_2 < this->vtable->GetNumSkillStats())
005cbeac              {
005cbeae                  int32_t* _skill_stat_filter = this->_skill_stat_filter;
005cbeae                  
005cbeb9                  if ((_skill_stat_filter != 0 && _skill_stat_filter[edi_2] != 0))
005cbeb9                  {
005cbec1                      result += 4;
005cbec5                      *(uint32_t*)arg12 += 1;
005cbeb9                  }
005cbeac              }
005cbeac              
005cbecb              edi_2 += 1;
005cbecc              eax_20 = this->vtable->GetNumSkillStats();
005cbed4          } while (edi_2 < eax_20);
005cbe97      }
005cbe97      
005cbedc      return result;
005cbda0  }

005cbe49                             8d a4 24 00 00 00 00                                                           ..$....
005cbedf                                                                                               90                                 .

005cbee0  void __thiscall ACQualityFilter::ACQualityFilter(class ACQualityFilter* this, class IDClass<_tagDataID,32,0> arg2)

005cbee0  {
005cbee8      QualityFilter::QualityFilter(this, arg2);
005cbeef      this->_attribute_stat_filter = nullptr;
005cbef2      this->_attribute2nd_stat_filter = nullptr;
005cbef5      this->_skill_stat_filter = nullptr;
005cbef8      this->vtable = 0x7e8258;
005cbefe      this->vtable = &ACQualityFilter::`vftable';
005cbee0  }

005cbf0b                                   90 90 90 90 90                                                             .....

005cbf10  void* __thiscall ACQualityFilter::`vector deleting destructor'(class ACQualityFilter* this, uint32_t arg2)

005cbf10  {
005cbf13      /* tailcall */
005cbf13      return ACQualityFilter::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005cbf10  }

005cbf18                                                                          cc cc cc cc cc cc cc cc                          ........

005cbf20  uint32_t __thiscall ACQualityFilter::Pack(class ACQualityFilter* this, void** arg2, uint32_t arg3)

005cbf20  {
005cbf65      uint32_t var_2c;
005cbf65      uint32_t var_28;
005cbf65      int32_t var_24;
005cbf65      void var_20;
005cbf65      void var_1c;
005cbf65      void var_18;
005cbf65      void var_14;
005cbf65      void var_10;
005cbf65      void var_c;
005cbf65      void var_8;
005cbf65      void var_4;
005cbf65      uint32_t result = ACQualityFilter::pack_size(((char*)this - 0x30), &var_2c, &var_28, &var_4, &var_8, &var_c, &var_10, &var_14, &var_18, &var_1c, &var_20, &var_24);
005cbf65      
005cbf72      if (arg3 >= result)
005cbf72      {
005cbf78          uint32_t** esi_1 = arg2;
005cbf80          QualityFilter::Pack(this, esi_1, arg3);
005cbf8b          uint32_t ecx_2 = var_28;
005cbf8f          **(uint32_t**)esi_1 = var_2c;
005cbf93          int32_t edx_2 = var_24;
005cbf97          void* eax_3 = &*(uint32_t*)esi_1[1];
005cbf9a          *(uint32_t*)esi_1 = eax_3;
005cbf9c          *(uint32_t*)eax_3 = ecx_2;
005cbfa0          void* ebx_2 = &*(uint32_t*)esi_1[1];
005cbfa3          *(uint32_t*)esi_1 = ebx_2;
005cbfa7          *(uint32_t*)ebx_2 = edx_2;
005cbfa9          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005cbfb0          uint32_t ebx_3 = 0;
005cbfb0          
005cbfb7          if (*(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x7c)() > 0)
005cbfb7          {
005cbfe9              int32_t eax_9;
005cbfe9              
005cbfe9              do
005cbfe9              {
005cbfc9                  if (ebx_3 < *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x7c)())
005cbfc9                  {
005cbfcb                      uint32_t id = this->m_DID.id;
005cbfcb                      
005cbfd6                      if ((id != 0 && *(uint32_t*)(id + (ebx_3 << 2)) != 0))
005cbfd6                      {
005cbfda                          **(uint32_t**)esi_1 = ebx_3;
005cbfdc                          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005cbfd6                      }
005cbfc9                  }
005cbfc9                  
005cbfe3                  ebx_3 += 1;
005cbfe4                  eax_9 = *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x7c)();
005cbfe9              } while (ebx_3 < eax_9);
005cbfb7          }
005cbfb7          
005cbfef          uint32_t ebx_4 = 0;
005cbfef          
005cbff9          if (*(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x80)() > 0)
005cbff9          {
005cc02f              int32_t eax_15;
005cc02f              
005cc02f              do
005cc02f              {
005cc00c                  if (ebx_4 < *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x80)())
005cc00c                  {
005cc00e                      int32_t eax_13 = this->m_AllowedInFreeList*(int32_t*)((char*)this + 0x2c);
005cc00e                      
005cc019                      if ((eax_13 != 0 && *(uint32_t*)(eax_13 + (ebx_4 << 2)) != 0))
005cc019                      {
005cc01d                          **(uint32_t**)esi_1 = ebx_4;
005cc01f                          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005cc019                      }
005cc00c                  }
005cc00c                  
005cc026                  ebx_4 += 1;
005cc027                  eax_15 = *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x80)();
005cc02f              } while (ebx_4 < eax_15);
005cbff9          }
005cbff9          
005cc035          uint32_t ebx_5 = 0;
005cc035          
005cc03f          if (*(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x84)() > 0)
005cc03f          {
005cc070              int32_t eax_20;
005cc070              
005cc070              do
005cc070              {
005cc04d                  if (ebx_5 < *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x84)())
005cc04d                  {
005cc04f                      struct PackObj::VTable* vtable = this->vtable;
005cc04f                      
005cc05a                      if ((vtable != 0 && *(uint32_t*)((char*)vtable + (ebx_5 << 2)) != 0))
005cc05a                      {
005cc05e                          **(uint32_t**)esi_1 = ebx_5;
005cc060                          *(uint32_t*)esi_1 = &*(uint32_t*)esi_1[1];
005cc05a                      }
005cc04d                  }
005cc04d                  
005cc067                  ebx_5 += 1;
005cc068                  eax_20 = *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x84)();
005cc070              } while (ebx_5 < eax_20);
005cc03f          }
005cbf72      }
005cbf72      
005cc07b      return result;
005cbf20  }

005cbffd                                                                                         8d 49 00                               .I.
005cc07e                                                                                            90 90                                ..

005cc080  int32_t __thiscall ACQualityFilter::UnPack(class ACQualityFilter* this, void** arg2, uint32_t arg3)

005cc080  {
005cc080      class ACQualityFilter* this_1 = this;
005cc08b      TChessPiece<CBasePiece>::GetPackSize(((char*)this - 0x30));
005cc08b      
005cc099      if (arg3 < 0x28)
005cc0a1          return 0;
005cc0a1      
005cc0a7      void** esi = arg2;
005cc0ab      void* eax_1 = *(uint32_t*)esi;
005cc0b3      *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x58)();
005cc0ba      QualityFilter::UnPack(this, esi, arg3);
005cc0bf      void* eax_2 = *(uint32_t*)esi;
005cc0c1      int32_t i_5 = *(uint32_t*)eax_2;
005cc0c6      *(uint32_t*)esi = ((char*)eax_2 + 4);
005cc0c8      int32_t i_6 = *(uint32_t*)((char*)eax_2 + 4);
005cc0cd      *(uint32_t*)esi = ((char*)eax_2 + 8);
005cc0cf      void** vtable_1 = *(uint32_t*)((char*)eax_2 + 8);
005cc0da      *(uint32_t*)esi = ((char*)eax_2 + 0xc);
005cc0da      
005cc0dc      if (i_5 > 0)
005cc0dc      {
005cc0de          int32_t i_3 = i_5;
005cc0f4          int32_t i;
005cc0f4          
005cc0f4          do
005cc0f4          {
005cc0e0              void* eax_6 = *(uint32_t*)esi;
005cc0e2              uint32_t ecx_4 = *(uint32_t*)eax_6;
005cc0ec              *(uint32_t*)esi = ((char*)eax_6 + 4);
005cc0ee              ACQualityFilter::SetAttribute(((char*)this - 0x30), ecx_4, 1);
005cc0f3              i = i_3;
005cc0f3              i_3 -= 1;
005cc0f4          } while (i != 1);
005cc0dc      }
005cc0dc      
005cc0f8      if (i_6 > 0)
005cc0f8      {
005cc0fa          int32_t i_4 = i_6;
005cc114          int32_t i_1;
005cc114          
005cc114          do
005cc114          {
005cc100              void* eax_8 = *(uint32_t*)esi;
005cc102              uint32_t ecx_6 = *(uint32_t*)eax_8;
005cc10c              *(uint32_t*)esi = ((char*)eax_8 + 4);
005cc10e              ACQualityFilter::SetAttribute2nd(((char*)this - 0x30), ecx_6, 1);
005cc113              i_1 = i_4;
005cc113              i_4 -= 1;
005cc114          } while (i_1 != 1);
005cc0f8      }
005cc0f8      
005cc116      void** vtable = vtable_1;
005cc116      
005cc11c      if (vtable > 0)
005cc11c      {
005cc11e          arg2 = vtable;
005cc18d          void** i_2;
005cc18d          
005cc18d          do
005cc18d          {
005cc122              int32_t* eax_10 = *(uint32_t*)esi;
005cc124              int32_t ebp_1 = *(uint32_t*)eax_10;
005cc129              *(uint32_t*)esi = &eax_10[1];
005cc12f              vtable = *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x84)();
005cc12f              
005cc137              if (ebp_1 < vtable)
005cc137              {
005cc13e                  if (this->vtable != 0)
005cc13e                  {
005cc17f                      vtable = this->vtable;
005cc182                      vtable[ebp_1] = 1;
005cc13e                  }
005cc13e                  else
005cc13e                  {
005cc14e                      vtable = operator new[]((*(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x84)() << 2));
005cc086                      this->vtable = vtable;
005cc086                      
005cc15b                      if (vtable != 0)
005cc15b                      {
005cc16c                          int32_t ecx_12 = (*(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x84)() << 2);
005cc17d                          __builtin_memset(__builtin_memset(this->vtable, 0, ((ecx_12 >> 2) << 2)), 0, (ecx_12 & 3));
005cc17f                          vtable = this->vtable;
005cc182                          vtable[ebp_1] = 1;
005cc15b                      }
005cc13e                  }
005cc137              }
005cc137              
005cc189              i_2 = arg2;
005cc189              arg2 -= 1;
005cc18d          } while (i_2 != 1);
005cc11c      }
005cc11c      
005cc1a5      return (((char*)vtable - vtable) + 1);
005cc080  }

005cc1a8                          90 90 90 90 90 90 90 90                                                          ........

005cc1b0  class DBObj* ACQualityFilter::Allocate(class ACQualityFilter const* this @ ecx)

005cc1b0  {
005cc1b0      /* tailcall */
005cc1b0      return ACQualityFilter::Allocator();
005cc1b0  }

005cc1b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005cc1c0  void* __thiscall ACQualityFilter::`scalar deleting destructor'(class ACQualityFilter* this, uint32_t arg2)

005cc1c0  {
005cc1c3      this->vtable = 0x7e8258;
005cc1c9      this->vtable = &ACQualityFilter::`vftable';
005cc1d0      ACQualityFilter::Clear(this);
005cc1d7      QualityFilter::~QualityFilter(this);
005cc1d7      
005cc1e1      if ((arg2 & 1) != 0)
005cc1e4          operator delete(this);
005cc1e4      
005cc1ef      return this;
005cc1c0  }

005cc1f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005cc200  void* __thiscall QualityFilter::`scalar deleting destructor'(class QualityFilter* this, uint32_t arg2)

005cc200  {
005cc203      QualityFilter::~QualityFilter(this);
005cc203      
005cc20d      if ((arg2 & 1) != 0)
005cc210          operator delete(this);
005cc210      
005cc21b      return this;
005cc200  }

005cc21e                                                                                            90 90                                ..

005cc220  void* __thiscall QualityFilter::`vector deleting destructor'(class QualityFilter* this, uint32_t arg2)

005cc220  {
005cc223      /* tailcall */
005cc223      return QualityFilter::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005cc220  }

005cc228                          cc cc cc cc cc cc cc cc                                                          ........

005cc230  uint32_t __thiscall SpellBookPage::Pack(class SpellBookPage* this, void** arg2, uint32_t arg3)

005cc230  {
005cc235      if (arg3 >= 4)
005cc235      {
005cc246          **(uint32_t**)arg2 = ((float)(((long double)this->_casting_likelihood) + ((long double)2f)));
005cc248          *(uint32_t*)arg2 += 4;
005cc235      }
005cc235      
005cc250      return 4;
005cc230  }

005cc253                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005cc260  int32_t __thiscall SpellBookPage::UnPack(class SpellBookPage* this, void** arg2, uint32_t arg3)

005cc260  {
005cc265      if (arg3 < 4)
005cc269          return 0;
005cc269      
005cc270      void* eax_1 = *(uint32_t*)arg2;
005cc272      long double x87_r7 = ((long double)*(uint32_t*)eax_1);
005cc275      long double temp1 = ((long double)2.0);
005cc275      (x87_r7 - temp1);
005cc27b      void* esi = ((char*)eax_1 + 4);
005cc27e      *(uint32_t*)arg2 = esi;
005cc280      eax_1 = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
005cc280      
005cc285      if ((*(uint8_t*)((char*)eax_1)[1] & 1) == 0)
005cc285      {
005cc293          this->_casting_likelihood = ((float)(x87_r7 - ((long double)2f)));
005cc296          return 1;
005cc285      }
005cc285      
005cc29e      *(uint32_t*)arg2 = ((char*)esi + 4);
005cc2a2      this->_casting_likelihood = *(uint32_t*)((char*)esi + 4);
005cc2a5      *(uint32_t*)arg2 += 4;
005cc2ae      return 1;
005cc260  }

005cc2b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005cc2c0  class CreationProfile& __thiscall CreationProfile::operator=(class CreationProfile* this, class CreationProfile const& arg2)

005cc2c0  {
005cc2c8      if (this != arg2)
005cc2c8      {
005cc2cd          this->wcid.id = arg2->wcid.id;
005cc2d3          this->palette = arg2->palette;
005cc2d9          this->__inner3 = arg2->__inner3;
005cc2df          this->__inner4 = arg2->__inner4;
005cc2e5          this->__inner5 = arg2->__inner5;
005cc2eb          this->try_to_bond = arg2->try_to_bond;
005cc2c8      }
005cc2c8      
005cc2ee      return this;
005cc2c0  }

005cc2f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005cc300  void __fastcall CreationProfile::CreationProfile(class CreationProfile* this)

005cc300  {
005cc302      this->vtable = 0x7e83ac;
005cc30e      this->wcid.id = INVALID_DID.id;
005cc313      __builtin_memset(&this->try_to_bond, 0, 0x14);
005cc300  }

005cc323           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005cc330  void __thiscall CreationProfile::CreationProfile(class CreationProfile* this, class CreationProfile const* arg2)

005cc330  {
005cc338      this->vtable = 0x7e83ac;
005cc338      
005cc33e      if (this != arg2)
005cc33e      {
005cc343          this->wcid.id = arg2->wcid.id;
005cc349          this->palette = arg2->palette;
005cc34f          this->__inner3 = arg2->__inner3;
005cc355          this->__inner4 = arg2->__inner4;
005cc35b          this->__inner5 = arg2->__inner5;
005cc361          this->try_to_bond = arg2->try_to_bond;
005cc33e      }
005cc330  }

005cc367                       90 90 90 90 90 90 90 90 90                                                         .........

005cc370  uint32_t __thiscall CreationProfile::Pack(class CreationProfile* this, void** arg2, uint32_t arg3)

005cc370  {
005cc375      if (arg3 >= 0x18)
005cc375      {
005cc381          **(uint32_t**)arg2 = this->wcid.id;
005cc385          void* edx_3 = (*(uint32_t*)arg2 + 4);
005cc388          *(uint32_t*)arg2 = edx_3;
005cc38d          *(uint32_t*)edx_3 = this->palette;
005cc391          void* esi_4 = (*(uint32_t*)arg2 + 4);
005cc394          *(uint32_t*)arg2 = esi_4;
005cc39b          *(uint32_t*)esi_4 = ((float)((long double)this->__inner3));
005cc39f          void* edx_6 = (*(uint32_t*)arg2 + 4);
005cc3a2          *(uint32_t*)arg2 = edx_6;
005cc3a7          *(uint32_t*)edx_6 = this->__inner4;
005cc3ab          void* esi_7 = (*(uint32_t*)arg2 + 4);
005cc3ae          *(uint32_t*)arg2 = esi_7;
005cc3b5          *(uint32_t*)esi_7 = this->__inner5;
005cc3b9          void* edx_9 = (*(uint32_t*)arg2 + 4);
005cc3bc          *(uint32_t*)arg2 = edx_9;
005cc3c1          *(uint32_t*)edx_9 = this->try_to_bond;
005cc3c3          *(uint32_t*)arg2 += 4;
005cc375      }
005cc375      
005cc3cc      return 0x18;
005cc370  }

005cc3cf                                               90                                                                 .

005cc3d0  int32_t __thiscall CreationProfile::UnPack(class CreationProfile* this, void** arg2, uint32_t arg3)

005cc3d0  {
005cc3d5      if (arg3 < 0x18)
005cc3d9          return 0;
005cc3d9      
005cc3e2      void* edx_1 = (*(uint32_t*)arg2 + 4);
005cc3e6      class IDClass<_tagDataID,32,0> esi = *(uint32_t*)((char*)edx_1 - 4);
005cc3e9      *(uint32_t*)arg2 = edx_1;
005cc3eb      this->wcid.id = esi;
005cc3f2      this->palette = **(uint32_t**)arg2;
005cc3f7      void* esi_2 = (*(uint32_t*)arg2 + 4);
005cc3fa      *(uint32_t*)arg2 = esi_2;
005cc400      this->__inner3 = *(uint32_t*)esi_2;
005cc405      void* edx_7 = (*(uint32_t*)arg2 + 4);
005cc408      *(uint32_t*)arg2 = edx_7;
005cc40c      this->__inner4 = *(uint32_t*)edx_7;
005cc411      void* esi_4 = (*(uint32_t*)arg2 + 4);
005cc414      *(uint32_t*)arg2 = esi_4;
005cc41a      this->__inner5 = *(uint32_t*)esi_4;
005cc41f      void* edx_12 = (*(uint32_t*)arg2 + 4);
005cc422      *(uint32_t*)arg2 = edx_12;
005cc426      this->try_to_bond = *(uint32_t*)edx_12;
005cc429      *(uint32_t*)arg2 += 4;
005cc432      return 1;
005cc3d0  }

005cc435                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005cc440  void __fastcall AttributeCache::CleanUp(class AttributeCache* this)

005cc440  {
005cc443      class Attribute* _strength = this->_strength;
005cc443      
005cc44b      if (_strength != 0)
005cc44b      {
005cc44d          _strength->vtable->__vecDelDtor(1);
005cc453          this->_strength = nullptr;
005cc44b      }
005cc44b      
005cc456      class Attribute* _endurance = this->_endurance;
005cc456      
005cc45b      if (_endurance != 0)
005cc45b      {
005cc45d          _endurance->vtable->__vecDelDtor(1);
005cc463          this->_endurance = nullptr;
005cc45b      }
005cc45b      
005cc466      class Attribute* _quickness = this->_quickness;
005cc466      
005cc46b      if (_quickness != 0)
005cc46b      {
005cc46d          _quickness->vtable->__vecDelDtor(1);
005cc473          this->_quickness = nullptr;
005cc46b      }
005cc46b      
005cc476      class Attribute* _coordination = this->_coordination;
005cc476      
005cc47b      if (_coordination != 0)
005cc47b      {
005cc47d          _coordination->vtable->__vecDelDtor(1);
005cc483          this->_coordination = nullptr;
005cc47b      }
005cc47b      
005cc486      class Attribute* _focus = this->_focus;
005cc486      
005cc48b      if (_focus != 0)
005cc48b      {
005cc48d          _focus->vtable->__vecDelDtor(1);
005cc493          this->_focus = nullptr;
005cc48b      }
005cc48b      
005cc496      class Attribute* _self = this->_self;
005cc496      
005cc49b      if (_self != 0)
005cc49b      {
005cc49d          _self->vtable->__vecDelDtor(1);
005cc4a3          this->_self = nullptr;
005cc49b      }
005cc49b      
005cc4a6      class SecondaryAttribute* _health = this->_health;
005cc4a6      
005cc4ab      if (_health != 0)
005cc4ab      {
005cc4ad          _health->vtable->__vecDelDtor(1);
005cc4b3          this->_health = nullptr;
005cc4ab      }
005cc4ab      
005cc4b6      class SecondaryAttribute* _stamina = this->_stamina;
005cc4b6      
005cc4bb      if (_stamina != 0)
005cc4bb      {
005cc4bd          _stamina->vtable->__vecDelDtor(1);
005cc4c3          this->_stamina = nullptr;
005cc4bb      }
005cc4bb      
005cc4c6      class SecondaryAttribute* _mana = this->_mana;
005cc4c6      
005cc4cb      if (_mana != 0)
005cc4cb      {
005cc4cd          _mana->vtable->__vecDelDtor(1);
005cc4d3          this->_mana = nullptr;
005cc4cb      }
005cc440  }

005cc4d9                                                                             90 90 90 90 90 90 90                           .......

005cc4e0  int32_t __thiscall AttributeCache::InqAttribute(class AttributeCache const* this, uint32_t arg2, uint32_t* arg3)

005cc4e0  {
005cc4e8      if ((arg2 - 1) <= 5)
005cc4ee          switch (arg2)
005cc4ee          {
005cc4f5              case 1:
005cc4f5              {
005cc4f5                  class Attribute* _strength = this->_strength;
005cc4f5                  
005cc4fa                  if (_strength != 0)
005cc4fa                  {
005cc50c                      *(uint32_t*)arg3 = (_strength->_init_level + _strength->_level_from_cp);
005cc513                      return 1;
005cc4fa                  }
005cc4f5                  break;
005cc4f5              }
005cc516              case 2:
005cc516              {
005cc516                  class Attribute* _endurance = this->_endurance;
005cc516                  
005cc51b                  if (_endurance != 0)
005cc51b                  {
005cc52d                      *(uint32_t*)arg3 = (_endurance->_init_level + _endurance->_level_from_cp);
005cc534                      return 1;
005cc51b                  }
005cc516                  break;
005cc516              }
005cc537              case 3:
005cc537              {
005cc537                  class Attribute* _quickness = this->_quickness;
005cc537                  
005cc53c                  if (_quickness != 0)
005cc53c                  {
005cc54a                      *(uint32_t*)arg3 = (_quickness->_init_level + _quickness->_level_from_cp);
005cc551                      return 1;
005cc53c                  }
005cc537                  break;
005cc537              }
005cc554              case 4:
005cc554              {
005cc554                  class Attribute* _coordination = this->_coordination;
005cc554                  
005cc559                  if (_coordination != 0)
005cc559                  {
005cc567                      *(uint32_t*)arg3 = (_coordination->_init_level + _coordination->_level_from_cp);
005cc56e                      return 1;
005cc559                  }
005cc554                  break;
005cc554              }
005cc571              case 5:
005cc571              {
005cc571                  class Attribute* _focus = this->_focus;
005cc571                  
005cc576                  if (_focus != 0)
005cc576                  {
005cc584                      *(uint32_t*)arg3 = (_focus->_init_level + _focus->_level_from_cp);
005cc58b                      return 1;
005cc576                  }
005cc571                  break;
005cc571              }
005cc58e              case 6:
005cc58e              {
005cc58e                  class Attribute* _self = this->_self;
005cc58e                  
005cc593                  if (_self != 0)
005cc593                  {
005cc5a1                      *(uint32_t*)arg3 = (_self->_init_level + _self->_level_from_cp);
005cc5a8                      return 1;
005cc593                  }
005cc58e                  break;
005cc58e              }
005cc4ee          }
005cc4ee      
005cc5ad      return 0;
005cc4e0  }

005cc5b0  uint32_t jump_table_5cc5b0[0x6] = 
005cc5b0  {
005cc5b0      [0x0] =  0x005cc4f5
005cc5b4      [0x1] =  0x005cc516
005cc5b8      [0x2] =  0x005cc537
005cc5bc      [0x3] =  0x005cc554
005cc5c0      [0x4] =  0x005cc571
005cc5c4      [0x5] =  0x005cc58e
005cc5c8  }

005cc5c8                          90 90 90 90 90 90 90 90                                                          ........

005cc5d0  int32_t __thiscall AttributeCache::InqAttribute2nd(class AttributeCache const* this, uint32_t arg2, uint32_t* arg3)

005cc5d0  {
005cc5d8      class SecondaryAttribute* ecx_1;
005cc5d8      
005cc5d8      if ((arg2 - 1) <= 5)
005cc5de          switch (arg2)
005cc5de          {
005cc5e5              case 1:
005cc5e5              {
005cc5e5                  class SecondaryAttribute* _health = this->_health;
005cc5e5                  
005cc5ea                  if (_health != 0)
005cc5ea                  {
005cc5fc                      *(uint32_t*)arg3 = (_health->_init_level + _health->_level_from_cp);
005cc603                      return 1;
005cc5ea                  }
005cc5e5                  break;
005cc5e5              }
005cc606              case 2:
005cc606              {
005cc606                  ecx_1 = this->_health;
005cc609              label_5cc609:
005cc609                  
005cc60b                  if (ecx_1 != 0)
005cc60b                  {
005cc614                      *(uint32_t*)arg3 = ecx_1->_current_level;
005cc61b                      return 1;
005cc60b                  }
005cc606                  break;
005cc606              }
005cc61e              case 3:
005cc61e              {
005cc61e                  class SecondaryAttribute* _stamina = this->_stamina;
005cc61e                  
005cc623                  if (_stamina != 0)
005cc623                  {
005cc631                      *(uint32_t*)arg3 = (_stamina->_init_level + _stamina->_level_from_cp);
005cc638                      return 1;
005cc623                  }
005cc61e                  break;
005cc61e              }
005cc63b              case 4:
005cc63b              {
005cc63b                  class SecondaryAttribute* _stamina_1 = this->_stamina;
005cc63b                  
005cc640                  if (_stamina_1 != 0)
005cc640                  {
005cc649                      *(uint32_t*)arg3 = _stamina_1->_current_level;
005cc650                      return 1;
005cc640                  }
005cc63b                  break;
005cc63b              }
005cc653              case 5:
005cc653              {
005cc653                  class SecondaryAttribute* _mana = this->_mana;
005cc653                  
005cc658                  if (_mana != 0)
005cc658                  {
005cc666                      *(uint32_t*)arg3 = (_mana->_init_level + _mana->_level_from_cp);
005cc66d                      return 1;
005cc658                  }
005cc653                  break;
005cc653              }
005cc670              case 6:
005cc670              {
005cc670                  ecx_1 = this->_mana;
005cc673                  goto label_5cc609;
005cc670              }
005cc5de          }
005cc677      return 0;
005cc5d0  }

005cc67a                                                                                8b ff                                        ..
005cc67c  uint32_t jump_table_5cc67c[0x6] = 
005cc67c  {
005cc67c      [0x0] =  0x005cc5e5
005cc680      [0x1] =  0x005cc606
005cc684      [0x2] =  0x005cc61e
005cc688      [0x3] =  0x005cc63b
005cc68c      [0x4] =  0x005cc653
005cc690      [0x5] =  0x005cc670
005cc694  }

005cc694                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005cc6a0  void __fastcall AttributeCache::AttributeCache(class AttributeCache* this)

005cc6a0  {
005cc6a4      this->vtable = 0x7e83c0;
005cc6aa      __builtin_memset(&this->_strength, 0, 0x24);
005cc6a0  }

005cc6c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005cc6d0  int32_t __thiscall AttributeCache::InqAttribute(class AttributeCache const* this, uint32_t arg2, class Attribute* arg3)

005cc6d0  {
005cc6d8      if ((arg2 - 1) <= 5)
005cc6d8      {
005cc6da          class Attribute* ecx;
005cc6da          
005cc6da          switch (arg2)
005cc6da          {
005cc6e1              case 1:
005cc6e1              {
005cc6e1                  ecx = this->_strength;
005cc6e1                  break;
005cc6e1              }
005cc706              case 2:
005cc706              {
005cc706                  ecx = this->_endurance;
005cc706                  break;
005cc706              }
005cc70b              case 3:
005cc70b              {
005cc70b                  ecx = this->_quickness;
005cc70b                  break;
005cc70b              }
005cc710              case 4:
005cc710              {
005cc710                  ecx = this->_coordination;
005cc710                  break;
005cc710              }
005cc715              case 5:
005cc715              {
005cc715                  ecx = this->_focus;
005cc715                  break;
005cc715              }
005cc71a              case 6:
005cc71a              {
005cc71a                  ecx = this->_self;
005cc71a                  break;
005cc71a              }
005cc6da          }
005cc6da          
005cc6e6          if (ecx != 0)
005cc6e6          {
005cc6ef              arg3->_level_from_cp = ecx->_level_from_cp;
005cc6f5              arg3->_init_level = ecx->_init_level;
005cc6fb              arg3->_cp_spent = ecx->_cp_spent;
005cc703              return 1;
005cc6e6          }
005cc6d8      }
005cc6d8      
005cc721      return 0;
005cc6d0  }

005cc724  uint32_t jump_table_5cc724[0x6] = 
005cc724  {
005cc724      [0x0] =  0x005cc6e1
005cc728      [0x1] =  0x005cc706
005cc72c      [0x2] =  0x005cc70b
005cc730      [0x3] =  0x005cc710
005cc734      [0x4] =  0x005cc715
005cc738      [0x5] =  0x005cc71a
005cc73c  }

005cc73c                                                                                      90 90 90 90                              ....

005cc740  int32_t __thiscall AttributeCache::SetAttribute(class AttributeCache* this, uint32_t arg2, class Attribute const* arg3)

005cc740  {
005cc74b      if ((arg2 - 1) > 5)
005cc8e8          return 0;
005cc8e8      
005cc751      class Attribute* eax_1;
005cc751      
005cc751      switch (arg2)
005cc751      {
005cc758          case 1:
005cc758          {
005cc758              eax_1 = this->_strength;
005cc758              
005cc75d              if (eax_1 == 0)
005cc75d              {
005cc761                  void* eax_2 = operator new(0x10);
005cc761                  
005cc76b                  if (eax_2 != 0)
005cc76b                  {
005cc779                      this->_strength = Attribute::Attribute(eax_2, arg3);
005cc782                      return 1;
005cc76b                  }
005cc76b                  
005cc787                  this->_strength = nullptr;
005cc790                  return 1;
005cc75d              }
005cc758              break;
005cc758          }
005cc7b2          case 2:
005cc7b2          {
005cc7b2              eax_1 = this->_endurance;
005cc7b2              
005cc7b7              if (eax_1 == 0)
005cc7b7              {
005cc7bb                  void* eax_7 = operator new(0x10);
005cc7bb                  
005cc7c5                  if (eax_7 != 0)
005cc7c5                  {
005cc7d3                      this->_endurance = Attribute::Attribute(eax_7, arg3);
005cc7dc                      return 1;
005cc7c5                  }
005cc7c5                  
005cc7e1                  this->_endurance = nullptr;
005cc7ea                  return 1;
005cc7b7              }
005cc7b2              break;
005cc7b2          }
005cc7ed          case 3:
005cc7ed          {
005cc7ed              eax_1 = this->_quickness;
005cc7ed              
005cc7f2              if (eax_1 == 0)
005cc7f2              {
005cc7f6                  void* eax_11 = operator new(0x10);
005cc7f6                  
005cc800                  if (eax_11 != 0)
005cc800                  {
005cc80e                      this->_quickness = Attribute::Attribute(eax_11, arg3);
005cc817                      return 1;
005cc800                  }
005cc800                  
005cc81c                  this->_quickness = nullptr;
005cc825                  return 1;
005cc7f2              }
005cc7ed              break;
005cc7ed          }
005cc828          case 4:
005cc828          {
005cc828              eax_1 = this->_coordination;
005cc828              
005cc82d              if (eax_1 == 0)
005cc82d              {
005cc835                  void* eax_15 = operator new(0x10);
005cc835                  
005cc83f                  if (eax_15 != 0)
005cc83f                  {
005cc84d                      this->_coordination = Attribute::Attribute(eax_15, arg3);
005cc856                      return 1;
005cc83f                  }
005cc83f                  
005cc85b                  this->_coordination = nullptr;
005cc864                  return 1;
005cc82d              }
005cc828              break;
005cc828          }
005cc867          case 5:
005cc867          {
005cc867              eax_1 = this->_focus;
005cc867              
005cc86c              if (eax_1 == 0)
005cc86c              {
005cc874                  void* eax_19 = operator new(0x10);
005cc874                  
005cc87e                  if (eax_19 != 0)
005cc87e                  {
005cc88c                      this->_focus = Attribute::Attribute(eax_19, arg3);
005cc895                      return 1;
005cc87e                  }
005cc87e                  
005cc89a                  this->_focus = nullptr;
005cc8a3                  return 1;
005cc86c              }
005cc867              break;
005cc867          }
005cc8a6          case 6:
005cc8a6          {
005cc8a6              eax_1 = this->_self;
005cc8a6              
005cc8ab              if (eax_1 == 0)
005cc8ab              {
005cc8b3                  void* eax_23 = operator new(0x10);
005cc8b3                  
005cc8bd                  if (eax_23 != 0)
005cc8bd                  {
005cc8cb                      this->_self = Attribute::Attribute(eax_23, arg3);
005cc8d4                      return 1;
005cc8bd                  }
005cc8bd                  
005cc8d9                  this->_self = nullptr;
005cc8e2                  return 1;
005cc8ab              }
005cc8a6              break;
005cc8a6          }
005cc751      }
005cc751      
005cc79a      eax_1->_level_from_cp = arg3->_level_from_cp;
005cc7a0      eax_1->_init_level = arg3->_init_level;
005cc7a6      eax_1->_cp_spent = arg3->_cp_spent;
005cc7af      return 1;
005cc740  }

005cc8eb                                   90                                                                         .
005cc8ec  uint32_t jump_table_5cc8ec[0x6] = 
005cc8ec  {
005cc8ec      [0x0] =  0x005cc758
005cc8f0      [0x1] =  0x005cc7b2
005cc8f4      [0x2] =  0x005cc7ed
005cc8f8      [0x3] =  0x005cc828
005cc8fc      [0x4] =  0x005cc867
005cc900      [0x5] =  0x005cc8a6
005cc904  }

005cc904              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005cc910  int32_t __thiscall AttributeCache::SetAttribute(class AttributeCache* this, uint32_t arg2, uint32_t const arg3)

005cc910  {
005cc91c      if ((arg2 - 1) > 5)
005ccab3          return 0;
005ccab3      
005cc922      switch (arg2)
005cc922      {
005cc930          case 1:
005cc930          {
005cc930              if (this->_strength == 0)
005cc930              {
005cc934                  class Attribute* eax_2 = operator new(0x10);
005cc934                  
005cc93e                  if (eax_2 == 0)
005cc951                      eax_2 = nullptr;
005cc93e                  else
005cc93e                  {
005cc940                      eax_2->vtable = 0x7a7b14;
005cc946                      eax_2->_level_from_cp = 0;
005cc949                      eax_2->_init_level = 0;
005cc94c                      eax_2->_cp_spent = 0;
005cc93e                  }
005cc93e                  
005cc953                  this->_strength = eax_2;
005cc930              }
005cc930              
005cc956              this->_strength->_init_level = arg3;
005cc967              return 1;
005cc930              break;
005cc930          }
005cc971          case 2:
005cc971          {
005cc971              if (this->_endurance == 0)
005cc971              {
005cc975                  class Attribute* eax_6 = operator new(0x10);
005cc975                  
005cc97f                  if (eax_6 == 0)
005cc992                      eax_6 = nullptr;
005cc97f                  else
005cc97f                  {
005cc981                      eax_6->vtable = 0x7a7b14;
005cc987                      eax_6->_level_from_cp = 0;
005cc98a                      eax_6->_init_level = 0;
005cc98d                      eax_6->_cp_spent = 0;
005cc97f                  }
005cc97f                  
005cc994                  this->_endurance = eax_6;
005cc971              }
005cc971              
005cc997              this->_endurance->_init_level = arg3;
005cc9a8              return 1;
005cc971              break;
005cc971          }
005cc9b2          case 3:
005cc9b2          {
005cc9b2              if (this->_quickness == 0)
005cc9b2              {
005cc9b6                  class Attribute* eax_10 = operator new(0x10);
005cc9b6                  
005cc9c0                  if (eax_10 == 0)
005cc9d3                      eax_10 = nullptr;
005cc9c0                  else
005cc9c0                  {
005cc9c2                      eax_10->vtable = 0x7a7b14;
005cc9c8                      eax_10->_level_from_cp = 0;
005cc9cb                      eax_10->_init_level = 0;
005cc9ce                      eax_10->_cp_spent = 0;
005cc9c0                  }
005cc9c0                  
005cc9d5                  this->_quickness = eax_10;
005cc9b2              }
005cc9b2              
005cc9d8              this->_quickness->_init_level = arg3;
005cc9e9              return 1;
005cc9b2              break;
005cc9b2          }
005cc9f3          case 4:
005cc9f3          {
005cc9f3              if (this->_coordination == 0)
005cc9f3              {
005cc9f7                  class Attribute* eax_13 = operator new(0x10);
005cc9f7                  
005cca01                  if (eax_13 == 0)
005cca14                      eax_13 = nullptr;
005cca01                  else
005cca01                  {
005cca03                      eax_13->vtable = 0x7a7b14;
005cca09                      eax_13->_level_from_cp = 0;
005cca0c                      eax_13->_init_level = 0;
005cca0f                      eax_13->_cp_spent = 0;
005cca01                  }
005cca01                  
005cca16                  this->_coordination = eax_13;
005cc9f3              }
005cc9f3              
005cca19              this->_coordination->_init_level = arg3;
005cca2a              return 1;
005cc9f3              break;
005cc9f3          }
005cca34          case 5:
005cca34          {
005cca34              if (this->_focus == 0)
005cca34              {
005cca38                  class Attribute* eax_17 = operator new(0x10);
005cca38                  
005cca42                  if (eax_17 == 0)
005cca55                      eax_17 = nullptr;
005cca42                  else
005cca42                  {
005cca44                      eax_17->vtable = 0x7a7b14;
005cca4a                      eax_17->_level_from_cp = 0;
005cca4d                      eax_17->_init_level = 0;
005cca50                      eax_17->_cp_spent = 0;
005cca42                  }
005cca42                  
005cca57                  this->_focus = eax_17;
005cca34              }
005cca34              
005cca5a              this->_focus->_init_level = arg3;
005cca6b              return 1;
005cca34              break;
005cca34          }
005cca75          case 6:
005cca75          {
005cca75              if (this->_self == 0)
005cca75              {
005cca79                  class Attribute* eax_21 = operator new(0x10);
005cca79                  
005cca83                  if (eax_21 == 0)
005cca96                      eax_21 = nullptr;
005cca83                  else
005cca83                  {
005cca85                      eax_21->vtable = 0x7a7b14;
005cca8b                      eax_21->_level_from_cp = 0;
005cca8e                      eax_21->_init_level = 0;
005cca91                      eax_21->_cp_spent = 0;
005cca83                  }
005cca83                  
005cca98                  this->_self = eax_21;
005cca75              }
005cca75              
005cca9b              this->_self->_init_level = arg3;
005ccaac              return 1;
005cca75              break;
005cca75          }
005cc922      }
005cc910  }

005ccab6                                                                    8b ff                                                ..
005ccab8  uint32_t jump_table_5ccab8[0x6] = 
005ccab8  {
005ccab8      [0x0] =  0x005cc929
005ccabc      [0x1] =  0x005cc96a
005ccac0      [0x2] =  0x005cc9ab
005ccac4      [0x3] =  0x005cc9ec
005ccac8      [0x4] =  0x005cca2d
005ccacc      [0x5] =  0x005cca6e
005ccad0  }

005ccad0  int32_t __thiscall AttributeCache::InqAttribute2nd(class AttributeCache const* this, uint32_t arg2, class SecondaryAttribute* arg3)

005ccad0  {
005ccad8      if ((arg2 - 1) <= 5)
005ccad8      {
005ccada          class SecondaryAttribute* eax_1;
005ccada          
005ccada          switch (arg2)
005ccada          {
005ccae1              case 1:
005ccae1              case 2:
005ccae1              {
005ccae1                  eax_1 = this->_health;
005ccae1                  break;
005ccae1              }
005ccb0c              case 3:
005ccb0c              case 4:
005ccb0c              {
005ccb0c                  eax_1 = this->_stamina;
005ccb0c                  break;
005ccb0c              }
005ccb11              case 5:
005ccb11              case 6:
005ccb11              {
005ccb11                  eax_1 = this->_mana;
005ccb11                  break;
005ccb11              }
005ccada          }
005ccada          
005ccae6          if (eax_1 != 0)
005ccae6          {
005ccaef              arg3->_level_from_cp = eax_1->_level_from_cp;
005ccaf5              arg3->_init_level = eax_1->_init_level;
005ccafb              arg3->_cp_spent = eax_1->_cp_spent;
005ccb01              arg3->_current_level = eax_1->_current_level;
005ccb09              return 1;
005ccae6          }
005ccad8      }
005ccad8      
005ccb18      return 0;
005ccad0  }

005ccb1b                                                                                   90                                         .
005ccb1c  uint32_t jump_table_5ccb1c[0x6] = 
005ccb1c  {
005ccb1c      [0x0] =  0x005ccae1
005ccb20      [0x1] =  0x005ccae1
005ccb24      [0x2] =  0x005ccb0c
005ccb28      [0x3] =  0x005ccb0c
005ccb2c      [0x4] =  0x005ccb11
005ccb30      [0x5] =  0x005ccb11
005ccb34  }

005ccb34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005ccb40  int32_t __thiscall AttributeCache::SetAttribute2nd(class AttributeCache* this, uint32_t arg2, class SecondaryAttribute const* arg3)

005ccb40  {
005ccb4b      if ((arg2 - 1) > 5)
005ccc31          return 0;
005ccc31      
005ccb51      class SecondaryAttribute* eax_1;
005ccb51      
005ccb51      switch (arg2)
005ccb51      {
005ccb58          case 1:
005ccb58          case 2:
005ccb58          {
005ccb58              eax_1 = this->_health;
005ccb58              
005ccb5d              if (eax_1 == 0)
005ccb5d              {
005ccb61                  void* eax_2 = operator new(0x14);
005ccb61                  
005ccb6b                  if (eax_2 != 0)
005ccb6b                  {
005ccb79                      this->_health = SecondaryAttribute::SecondaryAttribute(eax_2, arg3);
005ccb82                      return 1;
005ccb6b                  }
005ccb6b                  
005ccb87                  this->_health = nullptr;
005ccb90                  return 1;
005ccb5d              }
005ccb58              break;
005ccb58          }
005ccbb8          case 3:
005ccbb8          case 4:
005ccbb8          {
005ccbb8              eax_1 = this->_stamina;
005ccbb8              
005ccbbd              if (eax_1 == 0)
005ccbbd              {
005ccbc1                  void* eax_7 = operator new(0x14);
005ccbc1                  
005ccbcb                  if (eax_7 != 0)
005ccbcb                  {
005ccbd9                      this->_stamina = SecondaryAttribute::SecondaryAttribute(eax_7, arg3);
005ccbe2                      return 1;
005ccbcb                  }
005ccbcb                  
005ccbe7                  this->_stamina = nullptr;
005ccbf0                  return 1;
005ccbbd              }
005ccbb8              break;
005ccbb8          }
005ccbf3          case 5:
005ccbf3          case 6:
005ccbf3          {
005ccbf3              eax_1 = this->_mana;
005ccbf3              
005ccbf8              if (eax_1 == 0)
005ccbf8              {
005ccbfc                  void* eax_11 = operator new(0x14);
005ccbfc                  
005ccc06                  if (eax_11 != 0)
005ccc06                  {
005ccc14                      this->_mana = SecondaryAttribute::SecondaryAttribute(eax_11, arg3);
005ccc1d                      return 1;
005ccc06                  }
005ccc06                  
005ccc22                  this->_mana = nullptr;
005ccc2b                  return 1;
005ccbf8              }
005ccbf3              break;
005ccbf3          }
005ccb51      }
005ccb51      
005ccb9a      eax_1->_level_from_cp = arg3->_level_from_cp;
005ccba0      eax_1->_init_level = arg3->_init_level;
005ccba6      eax_1->_cp_spent = arg3->_cp_spent;
005ccbac      eax_1->_current_level = arg3->_current_level;
005ccbb5      return 1;
005ccb40  }

005ccc34  uint32_t jump_table_5ccc34[0x6] = 
005ccc34  {
005ccc34      [0x0] =  0x005ccb58
005ccc38      [0x1] =  0x005ccb58
005ccc3c      [0x2] =  0x005ccbb8
005ccc40      [0x3] =  0x005ccbb8
005ccc44      [0x4] =  0x005ccbf3
005ccc48      [0x5] =  0x005ccbf3
005ccc4c  }

005ccc4c                                      90 90 90 90                                                              ....

005ccc50  int32_t __thiscall AttributeCache::SetAttribute2nd(class AttributeCache* this, uint32_t arg2, uint32_t const arg3)

005ccc50  {
005ccc5c      if ((arg2 - 1) > 5)
005cce05          return 0;
005cce05      
005ccc62      switch (arg2)
005ccc62      {
005ccc70          case 1:
005ccc70          {
005ccc70              if (this->_health == 0)
005ccc70              {
005ccc74                  class SecondaryAttribute* eax_2 = operator new(0x14);
005ccc74                  
005ccc7e                  if (eax_2 == 0)
005ccc94                      eax_2 = nullptr;
005ccc7e                  else
005ccc7e                  {
005ccc80                      eax_2->_level_from_cp = 0;
005ccc83                      eax_2->_init_level = 0;
005ccc86                      eax_2->_cp_spent = 0;
005ccc89                      eax_2->vtable = 0x7a7b30;
005ccc8f                      eax_2->_current_level = 0;
005ccc7e                  }
005ccc7e                  
005ccc96                  this->_health = eax_2;
005ccc70              }
005ccc70              
005ccc99              this->_health->_init_level = arg3;
005cccaa              return 1;
005ccc70              break;
005ccc70          }
005cccb4          case 2:
005cccb4          {
005cccb4              if (this->_health == 0)
005cccb4              {
005cccb8                  class SecondaryAttribute* eax_6 = operator new(0x14);
005cccb8                  
005cccc2                  if (eax_6 == 0)
005cccd8                      eax_6 = nullptr;
005cccc2                  else
005cccc2                  {
005cccc4                      eax_6->_level_from_cp = 0;
005cccc7                      eax_6->_init_level = 0;
005cccca                      eax_6->_cp_spent = 0;
005ccccd                      eax_6->vtable = 0x7a7b30;
005cccd3                      eax_6->_current_level = 0;
005cccc2                  }
005cccc2                  
005cccda                  this->_health = eax_6;
005cccb4              }
005cccb4              
005cccdd              this->_health->_current_level = arg3;
005cccee              return 1;
005cccb4              break;
005cccb4          }
005cccf8          case 3:
005cccf8          {
005cccf8              if (this->_stamina == 0)
005cccf8              {
005cccfc                  class SecondaryAttribute* eax_10 = operator new(0x14);
005cccfc                  
005ccd06                  if (eax_10 == 0)
005ccd1c                      eax_10 = nullptr;
005ccd06                  else
005ccd06                  {
005ccd08                      eax_10->_level_from_cp = 0;
005ccd0b                      eax_10->_init_level = 0;
005ccd0e                      eax_10->_cp_spent = 0;
005ccd11                      eax_10->vtable = 0x7a7b30;
005ccd17                      eax_10->_current_level = 0;
005ccd06                  }
005ccd06                  
005ccd1e                  this->_stamina = eax_10;
005cccf8              }
005cccf8              
005ccd21              this->_stamina->_init_level = arg3;
005ccd32              return 1;
005cccf8              break;
005cccf8          }
005ccd3c          case 4:
005ccd3c          {
005ccd3c              if (this->_stamina == 0)
005ccd3c              {
005ccd40                  class SecondaryAttribute* eax_13 = operator new(0x14);
005ccd40                  
005ccd4a                  if (eax_13 == 0)
005ccd60                      eax_13 = nullptr;
005ccd4a                  else
005ccd4a                  {
005ccd4c                      eax_13->_level_from_cp = 0;
005ccd4f                      eax_13->_init_level = 0;
005ccd52                      eax_13->_cp_spent = 0;
005ccd55                      eax_13->vtable = 0x7a7b30;
005ccd5b                      eax_13->_current_level = 0;
005ccd4a                  }
005ccd4a                  
005ccd62                  this->_stamina = eax_13;
005ccd3c              }
005ccd3c              
005ccd65              this->_stamina->_current_level = arg3;
005ccd76              return 1;
005ccd3c              break;
005ccd3c          }
005ccd80          case 5:
005ccd80          {
005ccd80              if (this->_mana == 0)
005ccd80              {
005ccd84                  class SecondaryAttribute* eax_17 = operator new(0x14);
005ccd84                  
005ccd8e                  if (eax_17 == 0)
005ccda4                      eax_17 = nullptr;
005ccd8e                  else
005ccd8e                  {
005ccd90                      eax_17->_level_from_cp = 0;
005ccd93                      eax_17->_init_level = 0;
005ccd96                      eax_17->_cp_spent = 0;
005ccd99                      eax_17->vtable = 0x7a7b30;
005ccd9f                      eax_17->_current_level = 0;
005ccd8e                  }
005ccd8e                  
005ccda6                  this->_mana = eax_17;
005ccd80              }
005ccd80              
005ccda9              this->_mana->_init_level = arg3;
005ccdba              return 1;
005ccd80              break;
005ccd80          }
005ccdc4          case 6:
005ccdc4          {
005ccdc4              if (this->_mana == 0)
005ccdc4              {
005ccdc8                  class SecondaryAttribute* eax_21 = operator new(0x14);
005ccdc8                  
005ccdd2                  if (eax_21 == 0)
005ccde8                      eax_21 = nullptr;
005ccdd2                  else
005ccdd2                  {
005ccdd4                      eax_21->_level_from_cp = 0;
005ccdd7                      eax_21->_init_level = 0;
005ccdda                      eax_21->_cp_spent = 0;
005ccddd                      eax_21->vtable = 0x7a7b30;
005ccde3                      eax_21->_current_level = 0;
005ccdd2                  }
005ccdd2                  
005ccdea                  this->_mana = eax_21;
005ccdc4              }
005ccdc4              
005ccded              this->_mana->_current_level = arg3;
005ccdfe              return 1;
005ccdc4              break;
005ccdc4          }
005ccc62      }
005ccc50  }

005cce08  uint32_t jump_table_5cce08[0x6] = 
005cce08  {
005cce08      [0x0] =  0x005ccc69
005cce0c      [0x1] =  0x005cccad
005cce10      [0x2] =  0x005cccf1
005cce14      [0x3] =  0x005ccd35
005cce18      [0x4] =  0x005ccd79
005cce1c      [0x5] =  0x005ccdbd
005cce20  }

005cce20  uint32_t __thiscall AttributeCache::Pack(class AttributeCache* this, void** arg2, uint32_t arg3)

005cce20  {
005cce29      class Attribute* _strength = this->_strength;
005cce2d      int32_t edi = 0;
005cce31      int32_t result = 4;
005cce31      
005cce36      if (_strength != 0)
005cce36      {
005cce41          result = (_strength->vtable->Pack(arg2, 0) + 4);
005cce44          edi = 1;
005cce36      }
005cce36      
005cce49      class Attribute* _endurance = this->_endurance;
005cce49      
005cce4e      if (_endurance != 0)
005cce4e      {
005cce58          result += _endurance->vtable->Pack(arg2, 0);
005cce5a          edi |= 2;
005cce4e      }
005cce4e      
005cce5d      class Attribute* _quickness = this->_quickness;
005cce5d      
005cce62      if (_quickness != 0)
005cce62      {
005cce6c          result += _quickness->vtable->Pack(arg2, 0);
005cce6e          edi |= 4;
005cce62      }
005cce62      
005cce71      class Attribute* _coordination = this->_coordination;
005cce71      
005cce76      if (_coordination != 0)
005cce76      {
005cce80          result += _coordination->vtable->Pack(arg2, 0);
005cce82          edi |= 8;
005cce76      }
005cce76      
005cce85      class Attribute* _focus = this->_focus;
005cce85      
005cce8a      if (_focus != 0)
005cce8a      {
005cce94          result += _focus->vtable->Pack(arg2, 0);
005cce96          edi |= 0x10;
005cce8a      }
005cce8a      
005cce99      class Attribute* _self = this->_self;
005cce99      
005cce9e      if (_self != 0)
005cce9e      {
005ccea8          result += _self->vtable->Pack(arg2, 0);
005cceaa          edi |= 0x20;
005cce9e      }
005cce9e      
005ccead      class SecondaryAttribute* _health = this->_health;
005ccead      
005cceb2      if (_health != 0)
005cceb2      {
005ccebc          result += _health->vtable->Pack(arg2, 0);
005ccebe          edi |= 0x40;
005cceb2      }
005cceb2      
005ccec1      class SecondaryAttribute* _stamina = this->_stamina;
005ccec1      
005ccec6      if (_stamina != 0)
005ccec6      {
005cced0          result += _stamina->vtable->Pack(arg2, 0);
005cced2          edi |= 0x80;
005ccec6      }
005ccec6      
005cced8      class SecondaryAttribute* _mana = this->_mana;
005cced8      
005ccedd      if (_mana != 0)
005ccedd      {
005ccee7          result += _mana->vtable->Pack(arg2, 0);
005ccee9          edi |= 0x100;
005ccedd      }
005ccedd      
005cceef      uint32_t eax_15 = arg3;
005cceef      
005ccef5      if (eax_15 >= result)
005ccef5      {
005ccefd          **(uint32_t**)arg2 = edi;
005cceff          *(uint32_t*)arg2 += 4;
005ccf02          class Attribute* _strength_1 = this->_strength;
005ccf02          
005ccf07          if (_strength_1 != 0)
005ccf07          {
005ccf09              _strength_1->vtable->Pack(arg2, eax_15);
005ccf10              eax_15 = arg3;
005ccf07          }
005ccf07          
005ccf14          class Attribute* _endurance_1 = this->_endurance;
005ccf14          
005ccf19          if (_endurance_1 != 0)
005ccf19          {
005ccf1b              _endurance_1->vtable->Pack(arg2, eax_15);
005ccf22              eax_15 = arg3;
005ccf19          }
005ccf19          
005ccf26          class Attribute* _quickness_1 = this->_quickness;
005ccf26          
005ccf2b          if (_quickness_1 != 0)
005ccf2b          {
005ccf2d              _quickness_1->vtable->Pack(arg2, eax_15);
005ccf34              eax_15 = arg3;
005ccf2b          }
005ccf2b          
005ccf38          class Attribute* _coordination_1 = this->_coordination;
005ccf38          
005ccf3d          if (_coordination_1 != 0)
005ccf3d          {
005ccf3f              _coordination_1->vtable->Pack(arg2, eax_15);
005ccf46              eax_15 = arg3;
005ccf3d          }
005ccf3d          
005ccf4a          class Attribute* _focus_1 = this->_focus;
005ccf4a          
005ccf4f          if (_focus_1 != 0)
005ccf4f          {
005ccf51              _focus_1->vtable->Pack(arg2, eax_15);
005ccf58              eax_15 = arg3;
005ccf4f          }
005ccf4f          
005ccf5c          class Attribute* _self_1 = this->_self;
005ccf5c          
005ccf61          if (_self_1 != 0)
005ccf61          {
005ccf63              _self_1->vtable->Pack(arg2, eax_15);
005ccf6a              eax_15 = arg3;
005ccf61          }
005ccf61          
005ccf6e          class SecondaryAttribute* _health_1 = this->_health;
005ccf6e          
005ccf73          if (_health_1 != 0)
005ccf73          {
005ccf75              _health_1->vtable->Pack(arg2, eax_15);
005ccf7c              eax_15 = arg3;
005ccf73          }
005ccf73          
005ccf80          class SecondaryAttribute* _stamina_1 = this->_stamina;
005ccf80          
005ccf85          if (_stamina_1 != 0)
005ccf85          {
005ccf87              _stamina_1->vtable->Pack(arg2, eax_15);
005ccf8e              eax_15 = arg3;
005ccf85          }
005ccf85          
005ccf92          class SecondaryAttribute* _mana_1 = this->_mana;
005ccf92          
005ccf97          if (_mana_1 != 0)
005ccf99              _mana_1->vtable->Pack(arg2, eax_15);
005ccef5      }
005ccef5      
005ccfa8      return result;
005cce20  }

005ccfab                                   90 90 90 90 90                                                             .....

005ccfb0  int32_t __thiscall AttributeCache::UnPack(class AttributeCache* this, void** arg2, uint32_t arg3)

005ccfb0  {
005ccfb8      void** ebx = arg2;
005ccfc0      void* ecx = *(uint32_t*)ebx;
005ccfc2      int32_t ebp = 4;
005ccfc2      
005ccfcd      if (arg3 < 4)
005ccfd7          return 0;
005ccfd7      
005ccfda      void** eax_2 = *(uint32_t*)ecx;
005ccfe0      *(uint32_t*)ebx = ((char*)ecx + 4);
005ccfe2      class Attribute* _strength = this->_strength;
005ccfed      void* var_24;
005ccfed      
005ccfed      if (_strength != 0)
005ccfed      {
005cd02c          void* eax_6 = (eax_2 & 1);
005cd02f          var_24 = eax_6;
005cd02f          
005cd033          if (eax_6 == 0)
005cd033          {
005cd043              _strength->vtable->__vecDelDtor(1);
005cd049              this->_strength = nullptr;
005cd033          }
005cd033          else
005cd03e              ebp = (_strength->vtable->Pack(ebx, 0) + 4);
005ccfed      }
005ccfed      else
005ccfed      {
005ccfef          void* eax_3 = (eax_2 & 1);
005ccff2          var_24 = eax_3;
005ccff2          
005ccff6          if (eax_3 != 0)
005ccff6          {
005ccffa              void* eax_4 = operator new(0x10);
005ccffa              
005cd004              if (eax_4 == 0)
005cd017                  eax_4 = nullptr;
005cd004              else
005cd004              {
005cd006                  *(uint32_t*)eax_4 = 0x7a7b14;
005cd00c                  *(uint32_t*)((char*)eax_4 + 4) = 0;
005cd00f                  *(uint32_t*)((char*)eax_4 + 8) = 0;
005cd012                  *(uint32_t*)((char*)eax_4 + 0xc) = 0;
005cd004              }
005cd004              
005cd01a              this->_strength = eax_4;
005cd027              ebp = (*(uint32_t*)(*(uint32_t*)eax_4 + 0xc)(ebx, 0) + 4);
005ccff6          }
005ccfed      }
005ccfed      
005cd04c      class Attribute* _endurance = this->_endurance;
005cd055      void* var_20;
005cd055      
005cd055      if (_endurance != 0)
005cd055      {
005cd09f          void* eax_14 = (eax_2 & 2);
005cd0a2          var_20 = eax_14;
005cd0a2          
005cd0a6          if (eax_14 == 0)
005cd0a6          {
005cd0b3              _endurance->vtable->__vecDelDtor(1);
005cd0b9              this->_endurance = nullptr;
005cd0a6          }
005cd0a6          else
005cd0af              ebp += _endurance->vtable->Pack(ebx, 0);
005cd055      }
005cd055      else
005cd055      {
005cd057          void* eax_10 = (eax_2 & 2);
005cd05a          var_20 = eax_10;
005cd05a          
005cd05e          if (eax_10 != 0)
005cd05e          {
005cd062              void* eax_11 = operator new(0x10);
005cd062              
005cd06c              if (eax_11 == 0)
005cd06c              {
005cd090                  this->_endurance = nullptr;
005cd09b                  ebp += *(uint32_t*)(*nullptr + 0xc)(ebx, 0);
005cd06c              }
005cd06c              else
005cd06c              {
005cd06e                  *(uint32_t*)eax_11 = 0x7a7b14;
005cd074                  *(uint32_t*)((char*)eax_11 + 4) = 0;
005cd077                  *(uint32_t*)((char*)eax_11 + 8) = 0;
005cd07a                  *(uint32_t*)((char*)eax_11 + 0xc) = 0;
005cd07e                  this->_endurance = eax_11;
005cd089                  ebp += *(uint32_t*)(*(uint32_t*)eax_11 + 0xc)(ebx, 0);
005cd06c              }
005cd05e          }
005cd055      }
005cd055      
005cd0bc      class Attribute* _quickness = this->_quickness;
005cd0c5      void* var_1c;
005cd0c5      
005cd0c5      if (_quickness != 0)
005cd0c5      {
005cd10f          void* eax_22 = (eax_2 & 4);
005cd112          var_1c = eax_22;
005cd112          
005cd116          if (eax_22 == 0)
005cd116          {
005cd123              _quickness->vtable->__vecDelDtor(1);
005cd129              this->_quickness = nullptr;
005cd116          }
005cd116          else
005cd11f              ebp += _quickness->vtable->Pack(ebx, 0);
005cd0c5      }
005cd0c5      else
005cd0c5      {
005cd0c7          void* eax_18 = (eax_2 & 4);
005cd0ca          var_1c = eax_18;
005cd0ca          
005cd0ce          if (eax_18 != 0)
005cd0ce          {
005cd0d2              void* eax_19 = operator new(0x10);
005cd0d2              
005cd0dc              if (eax_19 == 0)
005cd0dc              {
005cd100                  this->_quickness = nullptr;
005cd10b                  ebp += *(uint32_t*)(*nullptr + 0xc)(ebx, 0);
005cd0dc              }
005cd0dc              else
005cd0dc              {
005cd0de                  *(uint32_t*)eax_19 = 0x7a7b14;
005cd0e4                  *(uint32_t*)((char*)eax_19 + 4) = 0;
005cd0e7                  *(uint32_t*)((char*)eax_19 + 8) = 0;
005cd0ea                  *(uint32_t*)((char*)eax_19 + 0xc) = 0;
005cd0ee                  this->_quickness = eax_19;
005cd0f9                  ebp += *(uint32_t*)(*(uint32_t*)eax_19 + 0xc)(ebx, 0);
005cd0dc              }
005cd0ce          }
005cd0c5      }
005cd0c5      
005cd12c      class Attribute* _coordination = this->_coordination;
005cd135      void* var_18;
005cd135      
005cd135      if (_coordination != 0)
005cd135      {
005cd17f          void* eax_30 = (eax_2 & 8);
005cd182          var_18 = eax_30;
005cd182          
005cd186          if (eax_30 == 0)
005cd186          {
005cd193              _coordination->vtable->__vecDelDtor(1);
005cd199              this->_coordination = nullptr;
005cd186          }
005cd186          else
005cd18f              ebp += _coordination->vtable->Pack(ebx, 0);
005cd135      }
005cd135      else
005cd135      {
005cd137          void* eax_26 = (eax_2 & 8);
005cd13a          var_18 = eax_26;
005cd13a          
005cd13e          if (eax_26 != 0)
005cd13e          {
005cd142              void* eax_27 = operator new(0x10);
005cd142              
005cd14c              if (eax_27 == 0)
005cd14c              {
005cd170                  this->_coordination = nullptr;
005cd17b                  ebp += *(uint32_t*)(*nullptr + 0xc)(ebx, 0);
005cd14c              }
005cd14c              else
005cd14c              {
005cd14e                  *(uint32_t*)eax_27 = 0x7a7b14;
005cd154                  *(uint32_t*)((char*)eax_27 + 4) = 0;
005cd157                  *(uint32_t*)((char*)eax_27 + 8) = 0;
005cd15a                  *(uint32_t*)((char*)eax_27 + 0xc) = 0;
005cd15e                  this->_coordination = eax_27;
005cd169                  ebp += *(uint32_t*)(*(uint32_t*)eax_27 + 0xc)(ebx, 0);
005cd14c              }
005cd13e          }
005cd135      }
005cd135      
005cd19c      class Attribute* _focus = this->_focus;
005cd1a5      void* var_14;
005cd1a5      
005cd1a5      if (_focus != 0)
005cd1a5      {
005cd1ef          void* eax_38 = (eax_2 & 0x10);
005cd1f2          var_14 = eax_38;
005cd1f2          
005cd1f6          if (eax_38 == 0)
005cd1f6          {
005cd203              _focus->vtable->__vecDelDtor(1);
005cd209              this->_focus = nullptr;
005cd1f6          }
005cd1f6          else
005cd1ff              ebp += _focus->vtable->Pack(ebx, 0);
005cd1a5      }
005cd1a5      else
005cd1a5      {
005cd1a7          void* eax_34 = (eax_2 & 0x10);
005cd1aa          var_14 = eax_34;
005cd1aa          
005cd1ae          if (eax_34 != 0)
005cd1ae          {
005cd1b2              void* eax_35 = operator new(0x10);
005cd1b2              
005cd1bc              if (eax_35 == 0)
005cd1bc              {
005cd1e0                  this->_focus = nullptr;
005cd1eb                  ebp += *(uint32_t*)(*nullptr + 0xc)(ebx, 0);
005cd1bc              }
005cd1bc              else
005cd1bc              {
005cd1be                  *(uint32_t*)eax_35 = 0x7a7b14;
005cd1c4                  *(uint32_t*)((char*)eax_35 + 4) = 0;
005cd1c7                  *(uint32_t*)((char*)eax_35 + 8) = 0;
005cd1ca                  *(uint32_t*)((char*)eax_35 + 0xc) = 0;
005cd1ce                  this->_focus = eax_35;
005cd1d9                  ebp += *(uint32_t*)(*(uint32_t*)eax_35 + 0xc)(ebx, 0);
005cd1bc              }
005cd1ae          }
005cd1a5      }
005cd1a5      
005cd20c      class Attribute* _self = this->_self;
005cd215      void* var_10;
005cd215      
005cd215      if (_self != 0)
005cd215      {
005cd25f          void* eax_46 = (eax_2 & 0x20);
005cd262          var_10 = eax_46;
005cd262          
005cd266          if (eax_46 == 0)
005cd266          {
005cd273              _self->vtable->__vecDelDtor(1);
005cd279              this->_self = nullptr;
005cd266          }
005cd266          else
005cd26f              ebp += _self->vtable->Pack(ebx, 0);
005cd215      }
005cd215      else
005cd215      {
005cd217          void* eax_42 = (eax_2 & 0x20);
005cd21a          var_10 = eax_42;
005cd21a          
005cd21e          if (eax_42 != 0)
005cd21e          {
005cd222              void* eax_43 = operator new(0x10);
005cd222              
005cd22c              if (eax_43 == 0)
005cd22c              {
005cd250                  this->_self = nullptr;
005cd25b                  ebp += *(uint32_t*)(*nullptr + 0xc)(ebx, 0);
005cd22c              }
005cd22c              else
005cd22c              {
005cd22e                  *(uint32_t*)eax_43 = 0x7a7b14;
005cd234                  *(uint32_t*)((char*)eax_43 + 4) = 0;
005cd237                  *(uint32_t*)((char*)eax_43 + 8) = 0;
005cd23a                  *(uint32_t*)((char*)eax_43 + 0xc) = 0;
005cd23e                  this->_self = eax_43;
005cd249                  ebp += *(uint32_t*)(*(uint32_t*)eax_43 + 0xc)(ebx, 0);
005cd22c              }
005cd21e          }
005cd215      }
005cd215      
005cd27c      class SecondaryAttribute* _health = this->_health;
005cd285      void* var_c;
005cd285      
005cd285      if (_health != 0)
005cd285      {
005cd2d2          void* eax_54 = (eax_2 & 0x40);
005cd2d5          var_c = eax_54;
005cd2d5          
005cd2d9          if (eax_54 == 0)
005cd2d9          {
005cd2e6              _health->vtable->__vecDelDtor(1);
005cd2ec              this->_health = nullptr;
005cd2d9          }
005cd2d9          else
005cd2e2              ebp += _health->vtable->Pack(ebx, 0);
005cd285      }
005cd285      else
005cd285      {
005cd287          void* eax_50 = (eax_2 & 0x40);
005cd28a          var_c = eax_50;
005cd28a          
005cd28e          if (eax_50 != 0)
005cd28e          {
005cd292              void* eax_51 = operator new(0x14);
005cd292              
005cd29c              if (eax_51 == 0)
005cd29c              {
005cd2c3                  this->_health = nullptr;
005cd2ce                  ebp += *(uint32_t*)(*nullptr + 0xc)(ebx, 0);
005cd29c              }
005cd29c              else
005cd29c              {
005cd29e                  *(uint32_t*)((char*)eax_51 + 4) = 0;
005cd2a1                  *(uint32_t*)((char*)eax_51 + 8) = 0;
005cd2a4                  *(uint32_t*)((char*)eax_51 + 0xc) = 0;
005cd2a7                  *(uint32_t*)eax_51 = 0x7a7b30;
005cd2ad                  *(uint32_t*)((char*)eax_51 + 0x10) = 0;
005cd2b1                  this->_health = eax_51;
005cd2bc                  ebp += *(uint32_t*)(*(uint32_t*)eax_51 + 0xc)(ebx, 0);
005cd29c              }
005cd28e          }
005cd285      }
005cd285      
005cd2ef      class SecondaryAttribute* _stamina = this->_stamina;
005cd2f8      void* var_8;
005cd2f8      
005cd2f8      if (_stamina != 0)
005cd2f8      {
005cd347          void* eax_62 = (eax_2 & 0x80);
005cd34c          var_8 = eax_62;
005cd34c          
005cd350          if (eax_62 == 0)
005cd350          {
005cd35d              _stamina->vtable->__vecDelDtor(1);
005cd363              this->_stamina = nullptr;
005cd350          }
005cd350          else
005cd359              ebp += _stamina->vtable->Pack(ebx, 0);
005cd2f8      }
005cd2f8      else
005cd2f8      {
005cd2fa          void* eax_58 = (eax_2 & 0x80);
005cd2ff          var_8 = eax_58;
005cd2ff          
005cd303          if (eax_58 != 0)
005cd303          {
005cd307              void* eax_59 = operator new(0x14);
005cd307              
005cd311              if (eax_59 == 0)
005cd311              {
005cd338                  this->_stamina = nullptr;
005cd343                  ebp += *(uint32_t*)(*nullptr + 0xc)(ebx, 0);
005cd311              }
005cd311              else
005cd311              {
005cd313                  *(uint32_t*)((char*)eax_59 + 4) = 0;
005cd316                  *(uint32_t*)((char*)eax_59 + 8) = 0;
005cd319                  *(uint32_t*)((char*)eax_59 + 0xc) = 0;
005cd31c                  *(uint32_t*)eax_59 = 0x7a7b30;
005cd322                  *(uint32_t*)((char*)eax_59 + 0x10) = 0;
005cd326                  this->_stamina = eax_59;
005cd331                  ebp += *(uint32_t*)(*(uint32_t*)eax_59 + 0xc)(ebx, 0);
005cd311              }
005cd303          }
005cd2f8      }
005cd2f8      
005cd366      class SecondaryAttribute* _mana = this->_mana;
005cd366      
005cd36f      if (_mana != 0)
005cd36f      {
005cd3be          void* eax_70 = (eax_2 & 0x100);
005cd3c3          arg2 = eax_70;
005cd3c3          
005cd3c7          if (eax_70 == 0)
005cd3c7          {
005cd3d4              _mana->vtable->__vecDelDtor(1);
005cd3da              this->_mana = nullptr;
005cd3c7          }
005cd3c7          else
005cd3d0              ebp += _mana->vtable->Pack(ebx, 0);
005cd36f      }
005cd36f      else
005cd36f      {
005cd371          void* eax_66 = (eax_2 & 0x100);
005cd376          arg2 = eax_66;
005cd376          
005cd37a          if (eax_66 != 0)
005cd37a          {
005cd37e              void* eax_67 = operator new(0x14);
005cd37e              
005cd388              if (eax_67 == 0)
005cd388              {
005cd3af                  this->_mana = nullptr;
005cd3ba                  ebp += *(uint32_t*)(*nullptr + 0xc)(ebx, 0);
005cd388              }
005cd388              else
005cd388              {
005cd38a                  *(uint32_t*)((char*)eax_67 + 4) = 0;
005cd38d                  *(uint32_t*)((char*)eax_67 + 8) = 0;
005cd390                  *(uint32_t*)((char*)eax_67 + 0xc) = 0;
005cd393                  *(uint32_t*)eax_67 = 0x7a7b30;
005cd399                  *(uint32_t*)((char*)eax_67 + 0x10) = 0;
005cd39d                  this->_mana = eax_67;
005cd3a8                  ebp += *(uint32_t*)(*(uint32_t*)eax_67 + 0xc)(ebx, 0);
005cd388              }
005cd37a          }
005cd36f      }
005cd36f      
005cd3e1      void* eax_73;
005cd3e1      
005cd3e1      if (arg3 >= ebp)
005cd3e1      {
005cd3f9          if (var_24 != 0)
005cd3ff              this->_strength->vtable->UnPack(ebx, arg3);
005cd3ff          
005cd40d          if (var_20 != 0)
005cd413              this->_endurance->vtable->UnPack(ebx, arg3);
005cd413          
005cd421          if (var_1c != 0)
005cd427              this->_quickness->vtable->UnPack(ebx, arg3);
005cd427          
005cd435          if (var_18 != 0)
005cd43b              this->_coordination->vtable->UnPack(ebx, arg3);
005cd43b          
005cd449          if (var_14 != 0)
005cd44f              this->_focus->vtable->UnPack(ebx, arg3);
005cd44f          
005cd45d          if (var_10 != 0)
005cd463              this->_self->vtable->UnPack(ebx, arg3);
005cd463          
005cd471          if (var_c != 0)
005cd477              this->_health->vtable->UnPack(ebx, arg3);
005cd477          
005cd485          if (var_8 != 0)
005cd48b              this->_stamina->vtable->UnPack(ebx, arg3);
005cd48b          
005cd499          if (arg2 != 0)
005cd49f              this->_mana->vtable->UnPack(ebx, arg3);
005cd49f          
005cd4ad          eax_73 = ecx;
005cd4ad          
005cd4b9          if (arg3 >= (*(uint32_t*)ebx - eax_73))
005cd4cb              return 1;
005cd3e1      }
005cd3e1      else
005cd3e3          eax_73 = ecx;
005cd3e3      
005cd3e9      *(uint32_t*)ebx = eax_73;
005cd3f2      return 0;
005ccfb0  }

005cd4ce                                            90 90                                                                ..

005cd4d0  void* __thiscall AttributeCache::`scalar deleting destructor'(class AttributeCache* this, uint32_t arg2)

005cd4d0  {
005cd4d3      this->vtable = 0x7e83c0;
005cd4d9      AttributeCache::CleanUp(this);
005cd4e3      this->vtable = 0x79285c;
005cd4e3      
005cd4e9      if ((arg2 & 1) != 0)
005cd4ec          operator delete(this);
005cd4ec      
005cd4f7      return this;
005cd4d0  }

005cd4fa                                                                                90 90 90 90 90 90                            ......

005cd500  uint8_t MaterialTypeEnumMapper::MaterialTypeToString(uint32_t arg1, class PStringBase<char>* arg2)

005cd500  {
005cd505      int32_t var_14 = 0x28;
005cd507      int32_t var_18 = 0x10000001;
005cd50c      int32_t var_1c = 1;
005cd50e      int32_t eax;
005cd50e      uint32_t ecx;
005cd50e      int32_t edx;
005cd50e      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
005cd50e      
005cd51a      if (eax_1 != 0)
005cd51a      {
005cd533          if (EnumIDMap::GetName(eax_1, arg1, arg2) != 0)
005cd533          {
005cd535              int32_t ebx;
005cd535              int32_t var_14_2 = ebx;
005cd53f              void var_4;
005cd53f              PStringBase<char>::PStringBase<char>(&var_4, &data_794098);
005cd54d              class PStringBase<char> var_8;
005cd54d              PStringBase<char>::PStringBase<char>(&var_8, &data_794500);
005cd55e              PStringBase<char>::replace(arg2, &var_8, &var_4);
005cd56d              int32_t* esi_3 = (var_8 - 0x14);
005cd56d              
005cd57c              if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
005cd584                  **(uint32_t**)esi_3(1);
005cd584              
005cd58a              int32_t* esi_5 = (var_8 - 0x14);
005cd58a              
005cd59a              if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
005cd5a2                  **(uint32_t**)esi_5(1);
005cd5a2              
005cd5a4              eax_1->vtable->Release();
005cd5ac              int32_t eax_9;
005cd5ac              eax_9 = 1;
005cd5b2              return 1;
005cd533          }
005cd533          
005cd5b3          eax_1->vtable->Release();
005cd51a      }
005cd51a      
005cd5bb      eax_1 = 0;
005cd5c1      return 0;
005cd500  }

005cd5c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005cd5d0  void __fastcall ChatRoomTracker::ChatRoomTracker(class ChatRoomTracker* this)

005cd5d0  {
005cd5d4      this->vtable = 0x7e83d4;
005cd5da      __builtin_memset(&this->m_allegianceRoomID, 0, 0x28);
005cd5d0  }

005cd5f9                                                                             90 90 90 90 90 90 90                           .......

005cd600  class ChatRoomTracker& __thiscall ChatRoomTracker::operator=(class ChatRoomTracker* this, class ChatRoomTracker const& arg2)

005cd600  {
005cd609      this->m_allegianceRoomID = arg2->m_allegianceRoomID;
005cd60f      this->mGeneralChatRoomID = arg2->mGeneralChatRoomID;
005cd615      this->mTradeChatRoomID = arg2->mTradeChatRoomID;
005cd61b      this->mLFGChatRoomID = arg2->mLFGChatRoomID;
005cd621      this->mRoleplayChatRoomID = arg2->mRoleplayChatRoomID;
005cd627      this->mOlthoiChatRoomID = arg2->mOlthoiChatRoomID;
005cd62d      this->mSocietyChatRoomID = arg2->mSocietyChatRoomID;
005cd633      this->mSocietyCelHanChatRoomID = arg2->mSocietyCelHanChatRoomID;
005cd639      this->mSocietyEldWebChatRoomID = arg2->mSocietyEldWebChatRoomID;
005cd63f      this->mSocietyRadBloChatRoomID = arg2->mSocietyRadBloChatRoomID;
005cd642      return this;
005cd600  }

005cd645                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005cd650  uint32_t __thiscall ChatRoomTracker::Pack(class ChatRoomTracker* this, void** arg2, uint32_t arg3)

005cd650  {
005cd655      int32_t result = this->vtable->GetPackSize();
005cd655      
005cd65c      if (arg3 >= result)
005cd65c      {
005cd66c          **(uint32_t**)arg2 = this->m_allegianceRoomID;
005cd670          void* edi_3 = (*(uint32_t*)arg2 + 4);
005cd673          *(uint32_t*)arg2 = edi_3;
005cd67a          *(uint32_t*)edi_3 = this->mGeneralChatRoomID;
005cd67e          void* edx_4 = (*(uint32_t*)arg2 + 4);
005cd681          *(uint32_t*)arg2 = edx_4;
005cd686          *(uint32_t*)edx_4 = this->mTradeChatRoomID;
005cd68a          void* edi_7 = (*(uint32_t*)arg2 + 4);
005cd68d          *(uint32_t*)arg2 = edi_7;
005cd694          *(uint32_t*)edi_7 = this->mLFGChatRoomID;
005cd698          void* edx_7 = (*(uint32_t*)arg2 + 4);
005cd69b          *(uint32_t*)arg2 = edx_7;
005cd6a0          *(uint32_t*)edx_7 = this->mRoleplayChatRoomID;
005cd6a4          void* edi_11 = (*(uint32_t*)arg2 + 4);
005cd6a7          *(uint32_t*)arg2 = edi_11;
005cd6ae          *(uint32_t*)edi_11 = this->mOlthoiChatRoomID;
005cd6b2          void* edx_10 = (*(uint32_t*)arg2 + 4);
005cd6b5          *(uint32_t*)arg2 = edx_10;
005cd6ba          *(uint32_t*)edx_10 = this->mSocietyChatRoomID;
005cd6be          void* edi_15 = (*(uint32_t*)arg2 + 4);
005cd6c1          *(uint32_t*)arg2 = edi_15;
005cd6c8          *(uint32_t*)edi_15 = this->mSocietyCelHanChatRoomID;
005cd6cc          void* edx_13 = (*(uint32_t*)arg2 + 4);
005cd6cf          *(uint32_t*)arg2 = edx_13;
005cd6d4          *(uint32_t*)edx_13 = this->mSocietyEldWebChatRoomID;
005cd6d8          void* edi_19 = (*(uint32_t*)arg2 + 4);
005cd6db          *(uint32_t*)arg2 = edi_19;
005cd6e2          *(uint32_t*)edi_19 = this->mSocietyRadBloChatRoomID;
005cd6e4          *(uint32_t*)arg2 += 4;
005cd65c      }
005cd65c      
005cd6e9      return result;
005cd650  }

005cd6ec                                      90 90 90 90                                                              ....

005cd6f0  int32_t __thiscall ChatRoomTracker::UnPack(class ChatRoomTracker* this, void** arg2, uint32_t arg3)

005cd6f0  {
005cd6fc      if (arg3 < this->vtable->GetPackSize())
005cd701          return 0;
005cd701      
005cd70c      this->m_allegianceRoomID = **(uint32_t**)arg2;
005cd711      void* edx_2 = (*(uint32_t*)arg2 + 4);
005cd714      *(uint32_t*)arg2 = edx_2;
005cd71a      this->mGeneralChatRoomID = *(uint32_t*)edx_2;
005cd71f      void* ecx_4 = (*(uint32_t*)arg2 + 4);
005cd722      *(uint32_t*)arg2 = ecx_4;
005cd726      this->mTradeChatRoomID = *(uint32_t*)ecx_4;
005cd72b      void* edx_5 = (*(uint32_t*)arg2 + 4);
005cd72e      *(uint32_t*)arg2 = edx_5;
005cd734      this->mLFGChatRoomID = *(uint32_t*)edx_5;
005cd739      void* ecx_8 = (*(uint32_t*)arg2 + 4);
005cd73c      *(uint32_t*)arg2 = ecx_8;
005cd740      this->mRoleplayChatRoomID = *(uint32_t*)ecx_8;
005cd745      void* edx_8 = (*(uint32_t*)arg2 + 4);
005cd748      *(uint32_t*)arg2 = edx_8;
005cd74e      this->mOlthoiChatRoomID = *(uint32_t*)edx_8;
005cd753      void* ecx_12 = (*(uint32_t*)arg2 + 4);
005cd756      *(uint32_t*)arg2 = ecx_12;
005cd75a      this->mSocietyChatRoomID = *(uint32_t*)ecx_12;
005cd75f      void* edx_11 = (*(uint32_t*)arg2 + 4);
005cd762      *(uint32_t*)arg2 = edx_11;
005cd768      this->mSocietyCelHanChatRoomID = *(uint32_t*)edx_11;
005cd76d      void* ecx_16 = (*(uint32_t*)arg2 + 4);
005cd770      *(uint32_t*)arg2 = ecx_16;
005cd774      this->mSocietyEldWebChatRoomID = *(uint32_t*)ecx_16;
005cd779      void* edx_14 = (*(uint32_t*)arg2 + 4);
005cd77c      *(uint32_t*)arg2 = edx_14;
005cd782      this->mSocietyRadBloChatRoomID = *(uint32_t*)edx_14;
005cd785      *(uint32_t*)arg2 += 4;
005cd78e      return 1;
005cd6f0  }

005cd791                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005cd7a0  class AC1Legacy::PStringBase<char>* __thiscall ChatDisplayInfo::GetDisplayText(class ChatDisplayInfo* this, class AC1Legacy::PStringBase<char>* __return)

005cd7a0  {
005cd7a0      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_display.m_buffer;
005cd7a8      __return->m_buffer = m_buffer;
005cd7ae      InterlockedIncrement(&m_buffer->m_cRef);
005cd7b7      return __return;
005cd7a0  }

005cd7ba                                                                                90 90 90 90 90 90                            ......

005cd7c0  class ChatDisplayInfo* __thiscall ChatRoomTracker::GetChatFormat(class ChatRoomTracker* this, class ChatDisplayInfo* __return, uint32_t arg3, class AC1Legacy::PStringBase<unsigned short> arg4, class AC1Legacy::PStringBase<unsigned short> arg5)

005cd7c0  {
005cd7c7      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005cd7d3      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005cd7d7      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005cd7dd      class AC1Legacy::PSRefBuffer<unsigned short>* ebp = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer;
005cd7e7      int32_t ebx = 0;
005cd7e9      class AC1Legacy::PSRefBuffer<unsigned short>* var_8 = ebp;
005cd7ed      InterlockedIncrement(&ebp->m_cRef);
005cd7fa      int32_t esi_1;
005cd7fa      
005cd7fa      if (arg3 == this->m_allegianceRoomID)
005cd7fa      {
005cd806          ebx = 0x12;
005cd806          
005cd80b          if (ebp != ChannelSystem::Allegiance_GlobalChannelName.m_buffer)
005cd80b          {
005cd81d              if ((InterlockedDecrement(&ebp->m_cRef) == 0 && ebp != 0))
005cd81f                  ebp->vtable->__vecDelDtor(1);
005cd81f              
005cd828              ebp = ChannelSystem::Allegiance_GlobalChannelName.m_buffer;
005cd832              InterlockedIncrement(&ebp->m_cRef);
005cd80b          }
005cd80b          
005cd838          esi_1 = 1;
005cd838          goto label_5cd84b;
005cd7fa      }
005cd7fa      
005cd938      class AC1Legacy::PStringBase<char>* var_1c_14;
005cd938      
005cd938      if (arg3 != this->mGeneralChatRoomID)
005cd938      {
005cd949          if (arg3 == this->mTradeChatRoomID)
005cd949          {
005cd94b              ebx = 0x1c;
005cd950              var_1c_14 = &ChannelSystem::Trade_GlobalChannelName;
005cd955              goto label_5cd9c1;
005cd949          }
005cd949          
005cd95a          if (arg3 == this->mLFGChatRoomID)
005cd95a          {
005cd95c              ebx = 0x1d;
005cd961              var_1c_14 = &ChannelSystem::LFG_GlobalChannelName;
005cd966              goto label_5cd9c1;
005cd95a          }
005cd95a          
005cd96b          if (arg3 == this->mRoleplayChatRoomID)
005cd96b          {
005cd96d              ebx = 0x1e;
005cd972              var_1c_14 = &ChannelSystem::Roleplay_GlobalChannelName;
005cd977              goto label_5cd9c1;
005cd96b          }
005cd96b          
005cd97c          if (arg3 == this->mOlthoiChatRoomID)
005cd97c          {
005cd97e              ebx = 0x12;
005cd983              var_1c_14 = &ChannelSystem::Olthoi_GlobalChannelName;
005cd988              goto label_5cd9c1;
005cd97c          }
005cd97c          
005cd98d          if (arg3 == this->mSocietyChatRoomID)
005cd98d          {
005cd98f              var_1c_14 = &ChannelSystem::Society_GlobalChannelName;
005cd9b8              ebx = 0x20;
005cd9b8              goto label_5cd9c1;
005cd98d          }
005cd98d          
005cd999          if (arg3 == this->mSocietyCelHanChatRoomID)
005cd999          {
005cd99b              var_1c_14 = &ChannelSystem::SocietyCelHan_GlobalChannelName;
005cd9b8              ebx = 0x20;
005cd9b8              goto label_5cd9c1;
005cd999          }
005cd999          
005cd9a5          if (arg3 == this->mSocietyEldWebChatRoomID)
005cd9a5          {
005cd9a7              var_1c_14 = &ChannelSystem::SocietyEldWeb_GlobalChannelName;
005cd9b8              ebx = 0x20;
005cd9b8              goto label_5cd9c1;
005cd9a5          }
005cd9a5          
005cd9b1          if (arg3 == this->mSocietyRadBloChatRoomID)
005cd9b1          {
005cd9b3              var_1c_14 = &ChannelSystem::SocietyRadBlo_GlobalChannelName;
005cd9b8              ebx = 0x20;
005cd9b8              goto label_5cd9c1;
005cd9b1          }
005cd9b1          
005cd9d4          esi_1 = 0;
005cd938      }
005cd938      else
005cd938      {
005cd93a          ebx = 0x1b;
005cd93f          var_1c_14 = &ChannelSystem::General_GlobalChannelName;
005cd9c1      label_5cd9c1:
005cd9c1          AC1Legacy::PStringBase<char>::operator=(&var_8, var_1c_14);
005cd9c6          ebp = var_8;
005cd9ca          esi_1 = 1;
005cd84b      label_5cd84b:
005cd84b          int32_t var_1c_4 = (arg5 + 0x14);
005cd84c          int32_t var_20_1 = (arg4 + 0x14);
005cd84d          int32_t var_24_1 = (arg4 + 0x14);
005cd851          uint16_t (* var_28_1)[0x1] = &ebp->m_data;
005cd85c          AC1Legacy::PStringBase<char>::sprintf(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, "[%ws] <Tell:IIDString:0:%ws>%ws<…");
005cd861          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005cd938      }
005cd86c      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005cd876      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005cd876      
005cd88c      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
005cd88e          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
005cd88e      
005cd89a      __return->m_ltt = ebx;
005cd8a0      __return->m_display.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005cd8a3      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005cd8ad      __return->m_doDisplayText = esi_1;
005cd8ad      
005cd8bf      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
005cd8c1          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
005cd8c1      
005cd8d5      if ((InterlockedDecrement(&ebp->m_cRef) == 0 && ebp != 0))
005cd8d7          ebp->vtable->__vecDelDtor(1);
005cd8d7      
005cd8e9      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
005cd8eb          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
005cd8eb      
005cd903      if ((InterlockedDecrement((arg4 + 4)) == 0 && arg4 != 0))
005cd90b          **(uint32_t**)arg4(1);
005cd90b      
005cd91d      if ((InterlockedDecrement((arg5 + 4)) == 0 && arg5 != 0))
005cd925          **(uint32_t**)arg5(1);
005cd925      
005cd932      return __return;
005cd7c0  }

005cd9db                                                                                   90 90 90 90 90                             .....

005cd9e0  struct tagBLOB* __thiscall TurbineChatBlob::GetBlob(class TurbineChatBlob* this, struct tagBLOB* __return)

005cd9e0  {
005cd9e9      __return->cbSize = 0xc;
005cd9eb      __return->pBlobData = this;
005cd9ee      return __return;
005cd9e0  }

005cd9f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005cda00  int32_t __fastcall Emote::IsValid(class Emote const* this)

005cda00  {
005cda00      long double x87_r7 = ((long double)this->delay);
005cda04      long double temp0 = ((long double)0f);
005cda04      (x87_r7 - temp0);
005cda0a      int32_t eax;
005cda0a      eax = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
005cda0c      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005cda0c      
005cda0f      if (!(p))
005cda14          return 0;
005cda14      
005cda2e      uint32_t eax_3;
005cda2e      bool cond:2_1;
005cda2e      
005cda2e      switch (this->type)
005cda2e      {
005cda35          case 1:
005cda35          case 0xa:
005cda35          case 0xd:
005cda35          case 0x10:
005cda35          case 0x12:
005cda35          case 0x14:
005cda35          case 0x15:
005cda35          case 0x16:
005cda35          case 0x17:
005cda35          case 0x18:
005cda35          case 0x19:
005cda35          case 0x1a:
005cda35          case 0x1f:
005cda35          case 0x20:
005cda35          case 0x21:
005cda35          case 0x23:
005cda35          case 0x24:
005cda35          case 0x25:
005cda35          case 0x26:
005cda35          case 0x27:
005cda35          case 0x28:
005cda35          case 0x29:
005cda35          case 0x2a:
005cda35          case 0x2b:
005cda35          case 0x2c:
005cda35          case 0x2d:
005cda35          case 0x2e:
005cda35          case 0x33:
005cda35          case 0x3a:
005cda35          case 0x3c:
005cda35          case 0x3d:
005cda35          case 0x40:
005cda35          case 0x41:
005cda35          case 0x43:
005cda35          case 0x44:
005cda35          case 0x46:
005cda35          case 0x4b:
005cda35          case 0x4f:
005cda35          case 0x50:
005cda35          case 0x51:
005cda35          case 0x53:
005cda35          case 0x54:
005cda35          case 0x55:
005cda35          case 0x56:
005cda35          case 0x58:
005cda35          case 0x6a:
005cda35          case 0x6b:
005cda35          case 0x6c:
005cda35          case 0x6d:
005cda35          case 0x72:
005cda35          {
005cda35              long double x87_r7_1 = ((long double)this->extent);
005cda38              long double temp1_1 = ((long double)0f);
005cda38              (x87_r7_1 - temp1_1);
005cda3e              eax_3 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005cda40              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005cda40              
005cda43              if (p_1)
005cda43              {
005cdb0a              label_5cdb0a:
005cdb0a                  
005cdb0d                  if (this->msg.m_buffer->m_len != 1)
005cdcbf                      return 1;
005cda43              }
005cda35              break;
005cda35          }
005cda60          case 2:
005cda60          {
005cda60              if (((this->amount64 | *(uint32_t*)((char*)this->amount64)[4]) == 0 && (this->heroxp64 | *(uint32_t*)((char*)this->heroxp64)[4]) == 0))
005cda6a                  return 0;
005cda6a              
005cdcbf              return 1;
005cda60              break;
005cda60          }
005cdab9          case 3:
005cdab9          {
005cdab9              if (this->cprof.wcid.id == INVALID_DID.id)
005cdac3                  return 0;
005cdac3              
005cdcbf              return 1;
005cdab9              break;
005cdab9          }
005cdb82          case 4:
005cdb82          case 0xb:
005cdb82          {
005cdb82              long double x87_r7_3 = ((long double)this->frame.m_fOrigin.x);
005cdb88              long double temp3_1 = ((long double)0f);
005cdb88              (x87_r7_3 - temp3_1);
005cdb8e              eax_3 = ((((x87_r7_3 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005cdb90              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
005cdb90              
005cdb93              if (!(p_3))
005cdb93              {
005cdb99                  long double x87_r7_4 = ((long double)this->frame.m_fOrigin.y);
005cdb9f                  long double temp7_1 = ((long double)0f);
005cdb9f                  (x87_r7_4 - temp7_1);
005cdba5                  eax_3 = ((((x87_r7_4 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp7_1) ? 1 : 0) << 0xe) | 0))));
005cdba7                  bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
005cdba7                  
005cdbaa                  if (!(p_4))
005cdbaa                  {
005cdbb0                      long double x87_r7_5 = ((long double)this->frame.m_fOrigin.z);
005cdbb6                      long double temp10_1 = ((long double)0f);
005cdbb6                      (x87_r7_5 - temp10_1);
005cdbbc                      eax_3 = ((((x87_r7_5 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp10_1) ? 1 : 0) << 0xe) | 0))));
005cdbbe                      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x44} */;
005cdbbe                      
005cdbc1                      if (p_5)
005cdbcb                          return 0;
005cdbcb                      
005cdcbf                      return 1;
005cdbaa                  }
005cdb93              }
005cdb82              break;
005cdb82          }
005cdb5e          case 5:
005cdb5e          case 0x34:
005cdb5e          {
005cdb5e              long double x87_r7_2 = ((long double)this->extent);
005cdb61              long double temp2_1 = ((long double)0f);
005cdb61              (x87_r7_2 - temp2_1);
005cdb67              eax_3 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005cdb69              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005cdb69              
005cdb6c              if (p_2)
005cdb6c              {
005cdb77                  if (this->motion == 0)
005cdb81                      return 0;
005cdb81                  
005cdcbf                  return 1;
005cdb6c              }
005cdb5e              break;
005cdb5e          }
005cdcbf          case 6:
005cdcbf          case 0xc:
005cdcbf          case 0xf:
005cdcbf          case 0x39:
005cdcbf          case 0x3f:
005cdcbf          case 0x42:
005cdcbf          case 0x48:
005cdcbf          case 0x4d:
005cdcbf          case 0x4e:
005cdcbf          case 0x57:
005cdcbf          case 0x5a:
005cdcbf          case 0x63:
005cdcbf          case 0x64:
005cdcbf          case 0x65:
005cdcbf          case 0x74:
005cdcbf          case 0x75:
005cdcbf          {
005cdcbf              return 1;
005cdcbf              break;
005cdcbf          }
005cdbcc          case 7:
005cdbcc          {
005cdbcc              long double x87_r7_6 = ((long double)this->extent);
005cdbcf              long double temp4_1 = ((long double)0f);
005cdbcf              (x87_r7_6 - temp4_1);
005cdbd5              eax_3 = ((((x87_r7_6 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005cdbd7              bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
005cdbd7              
005cdbda              if (p_6)
005cdbda              {
005cdbdc                  long double x87_r7_7 = ((long double)this->extent);
005cdbdf                  long double temp8_1 = ((long double)1f);
005cdbdf                  (x87_r7_7 - temp8_1);
005cdbe5                  eax_3 = ((((x87_r7_7 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp8_1) ? 1 : 0) << 0xe) | 0))));
005cdbe5                  
005cdbea                  if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
005cdbea                  {
005cdbf1                      if (this->pscript == PS_Invalid)
005cdbfb                          return 0;
005cdbfb                      
005cdcbf                      return 1;
005cdbea                  }
005cdbda              }
005cdbcc              break;
005cdbcc          }
005cdbfc          case 8:
005cdbfc          case 0x11:
005cdbfc          {
005cdbfc              long double x87_r7_8 = ((long double)this->extent);
005cdbff              long double temp5_1 = ((long double)0.0);
005cdbff              (x87_r7_8 - temp5_1);
005cdc05              eax_3 = ((((x87_r7_8 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp5_1) ? 1 : 0) << 0xe) | 0))));
005cdc07              bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
005cdc07              
005cdc0a              if (!(p_7))
005cdc14                  return 0;
005cdc14              
005cdcbf              return 1;
005cdbfc              break;
005cdbfc          }
005cdc15          case 9:
005cdc15          {
005cdc15              long double x87_r7_9 = ((long double)this->extent);
005cdc18              long double temp6_1 = ((long double)0f);
005cdc18              (x87_r7_9 - temp6_1);
005cdc1e              eax_3 = ((((x87_r7_9 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp6_1) ? 1 : 0) << 0xe) | 0))));
005cdc20              bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x41} */;
005cdc20              
005cdc23              if (p_8)
005cdc23              {
005cdc25                  long double x87_r7_10 = ((long double)this->extent);
005cdc28                  long double temp9_1 = ((long double)1f);
005cdc28                  (x87_r7_10 - temp9_1);
005cdc2e                  eax_3 = ((((x87_r7_10 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp9_1) ? 1 : 0) << 0xe) | 0))));
005cdc2e                  
005cdc33                  if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) != 0)
005cdc33                  {
005cdc3a                      if (this->sound == Sound_Invalid)
005cdc40                          return 0;
005cdc40                      
005cdcbf                      return 1;
005cdc33                  }
005cdc23              }
005cdc15              break;
005cdc15          }
005cdaa5          case 0xe:
005cdaa5          case 0x13:
005cdaa5          case 0x1b:
005cdaa5          case 0x49:
005cdaa5          {
005cdaa5              if (this->spellid == 0)
005cdaaf                  return 0;
005cdaaf              
005cdcbf              return 1;
005cdaa5              break;
005cdaa5          }
005cdc46          case 0x1c:
005cdc46          case 0x1d:
005cdc46          case 0x36:
005cdc46          case 0x37:
005cdc46          {
005cdc46              if (this->amount != 0)
005cdc46                  goto label_5cdc4b;
005cdc46              break;
005cdc46          }
005cdca6          case 0x1e:
005cdca6          case 0x3b:
005cdca6          case 0x47:
005cdca6          case 0x52:
005cdca6          {
005cdca6              if (this->msg.m_buffer->m_len != 1)
005cdca6              {
005cdcab                  cond:2_1 = this->min <= this->max;
005cdcae                  goto label_5cdc57;
005cdca6              }
005cdca6              break;
005cdca6          }
005cda92          case 0x22:
005cda92          case 0x2f:
005cda92          case 0x30:
005cda92          case 0x77:
005cda92          case 0x78:
005cda92          {
005cda92              if (this->amount == 0)
005cda9c                  return 0;
005cda9c              
005cdcbf              return 1;
005cda92              break;
005cda92          }
005cdc5e          case 0x31:
005cdc5e          {
005cdc5e              int32_t edx_7 = *(uint32_t*)((char*)this->min64)[4];
005cdc63              int32_t esi_1 = this->min64;
005cdc63              
005cdc6a              if ((edx_7 <= 0 && esi_1 <= 0))
005cdcbf                  return 1;
005cdcbf              
005cdc6c              int32_t eax_33 = this->max64;
005cdc6f              int32_t ecx_2 = *(uint32_t*)((char*)this->max64)[4];
005cdc6f              
005cdc74              if (ecx_2 > 0)
005cdc74              {
005cdc7c                  if (edx_7 < ecx_2)
005cdcbf                      return 1;
005cdc74              }
005cdc74              else if ((eax_33 <= 0 || edx_7 < ecx_2))
005cdcbf                  return 1;
005cdcbf              
005cdc7e              if (edx_7 <= ecx_2)
005cdc7e              {
005cdc80                  cond:2_1 = esi_1 <= eax_33;
005cdc82                  goto label_5cdc57;
005cdc7e              }
005cdc5e              break;
005cdc5e          }
005cdc89          case 0x32:
005cdc89          {
005cdc89              if (this->stat != 0)
005cdc89              {
005cdc8b                  uint32_t min = this->min;
005cdc8b                  
005cdc90                  if (min <= 0)
005cdcbf                      return 1;
005cdcbf                  
005cdc92                  uint32_t max = this->max;
005cdc92                  
005cdc97                  if (max <= 0)
005cdcbf                      return 1;
005cdcbf                  
005cdc99                  cond:2_1 = min <= max;
005cdc9b                  goto label_5cdc57;
005cdc89              }
005cdc89              break;
005cdc89          }
005cdc4b          case 0x35:
005cdc4b          case 0x45:
005cdc4b          case 0x5b:
005cdc4b          case 0x5c:
005cdc4b          case 0x5d:
005cdc4b          case 0x5e:
005cdc4b          case 0x5f:
005cdc4b          case 0x60:
005cdc4b          case 0x61:
005cdc4b          case 0x62:
005cdc4b          case 0x6e:
005cdc4b          case 0x73:
005cdc4b          case 0x76:
005cdc4b          {
005cdc4b          label_5cdc4b:
005cdc4b              
005cdc4d              if (this->stat != 0)
005cdcbf                  return 1;
005cdc4b              break;
005cdc4b          }
005cdb3c          case 0x38:
005cdb3c          {
005cdb3c              if (this->wealth_rating <= 8)
005cdb3c              {
005cdb42                  int32_t treasure_type = this->treasure_type;
005cdb42                  
005cdb4a                  if (treasure_type >= 0)
005cdb4a                  {
005cdb53                      if (treasure_type > 3)
005cdb5d                          return 0;
005cdb5d                      
005cdcbf                      return 1;
005cdb4a                  }
005cdb3c              }
005cdb3c              break;
005cdb3c          }
005cda71          case 0x3e:
005cda71          {
005cda71              if ((this->amount64 | *(uint32_t*)((char*)this->amount64)[4]) == 0)
005cda7b                  return 0;
005cda7b              
005cdcbf              return 1;
005cda71              break;
005cda71          }
005cdacd          case 0x4a:
005cdacd          {
005cdacd              if (this->cprof.wcid.id != INVALID_DID.id)
005cdacd              {
005cdad3                  union __inner5 = this->cprof.__inner5;
005cdad3                  
005cdad8                  if (__inner5 != 0)
005cdad8                  {
005cdae1                      if (__inner5 < 0xffffffff)
005cdaeb                          return 0;
005cdaeb                      
005cdcbf                      return 1;
005cdad8                  }
005cdacd              }
005cdacd              break;
005cdacd          }
005cdafe          case 0x4c:
005cdafe          {
005cdafe              if ((this->cprof.wcid.id != INVALID_DID.id && this->cprof.__inner5 >= 1))
005cdafe                  goto label_5cdb0a;
005cdafe              break;
005cdafe          }
005cdb1b          case 0x59:
005cdb1b          {
005cdb1b              if (this->amount >= 1)
005cdb1b              {
005cdb2a                  if (this->msg.m_buffer->m_len == 1)
005cdb34                      return 0;
005cdb34                  
005cdcbf                  return 1;
005cdb1b              }
005cdb1b              break;
005cdb1b          }
005cdcb9          case 0x66:
005cdcb9          case 0x67:
005cdcb9          case 0x68:
005cdcb9          case 0x69:
005cdcb9          case 0x79:
005cdcb9          {
005cdcb9              if (this->msg.m_buffer->m_len != 1)
005cdcbf                  return 1;
005cdcb9              break;
005cdcb9          }
005cdc54          case 0x6f:
005cdc54          {
005cdc54              cond:2_1 = this->amount <= 1;
005cdc57          label_5cdc57:
005cdc57              
005cdc57              if (cond:2_1)
005cdcbf                  return 1;
005cdc54              break;
005cdc54          }
005cda82          case 0x70:
005cda82          case 0x71:
005cda82          {
005cda82              if ((this->amount64 | *(uint32_t*)((char*)this->amount64)[4]) == 0)
005cda8c                  return 0;
005cda8c              
005cdcbf              return 1;
005cda82              break;
005cda82          }
005cda2e      }
005cda2e      
005cdc5d      return 0;
005cda00  }

005cdcc0  uint32_t jump_table_5cdcc0[0x19] = 
005cdcc0  {
005cdcc0      [0x00] =  0x005cdc59
005cdcc4      [0x01] =  0x005cda35
005cdcc8      [0x02] =  0x005cda4e
005cdccc      [0x03] =  0x005cdab0
005cdcd0      [0x04] =  0x005cdb82
005cdcd4      [0x05] =  0x005cdb5e
005cdcd8      [0x06] =  0x005cdcbb
005cdcdc      [0x07] =  0x005cdbcc
005cdce0      [0x08] =  0x005cdbfc
005cdce4      [0x09] =  0x005cdc15
005cdce8      [0x0a] =  0x005cda9d
005cdcec      [0x0b] =  0x005cdc41
005cdcf0      [0x0c] =  0x005cdc9d
005cdcf4      [0x0d] =  0x005cda8d
005cdcf8      [0x0e] =  0x005cdc5e
005cdcfc      [0x0f] =  0x005cdc84
005cdd00      [0x10] =  0x005cdc48
005cdd04      [0x11] =  0x005cdb35
005cdd08      [0x12] =  0x005cda6b
005cdd0c      [0x13] =  0x005cdac4
005cdd10      [0x14] =  0x005cdaec
005cdd14      [0x15] =  0x005cdb18
005cdd18      [0x16] =  0x005cdcb0
005cdd1c      [0x17] =  0x005cdc54
005cdd20      [0x18] =  0x005cda7c
005cdd24  }
005cdd24  uint8_t lookup_table_5cdd24[0x7a] = 
005cdd24  {
005cdd24      [0x00] =  0x00
005cdd25      [0x01] =  0x01
005cdd26      [0x02] =  0x02
005cdd27      [0x03] =  0x03
005cdd28      [0x04] =  0x04
005cdd29      [0x05] =  0x05
005cdd2a      [0x06] =  0x06
005cdd2b      [0x07] =  0x07
005cdd2c      [0x08] =  0x08
005cdd2d      [0x09] =  0x09
005cdd2e      [0x0a] =  0x01
005cdd2f      [0x0b] =  0x04
005cdd30      [0x0c] =  0x06
005cdd31      [0x0d] =  0x01
005cdd32      [0x0e] =  0x0a
005cdd33      [0x0f] =  0x06
005cdd34      [0x10] =  0x01
005cdd35      [0x11] =  0x08
005cdd36      [0x12] =  0x01
005cdd37      [0x13] =  0x0a
005cdd38      [0x14] =  0x01
005cdd39      [0x15] =  0x01
005cdd3a      [0x16] =  0x01
005cdd3b      [0x17] =  0x01
005cdd3c      [0x18] =  0x01
005cdd3d      [0x19] =  0x01
005cdd3e      [0x1a] =  0x01
005cdd3f      [0x1b] =  0x0a
005cdd40      [0x1c] =  0x0b
005cdd41      [0x1d] =  0x0b
005cdd42      [0x1e] =  0x0c
005cdd43      [0x1f] =  0x01
005cdd44      [0x20] =  0x01
005cdd45      [0x21] =  0x01
005cdd46      [0x22] =  0x0d
005cdd47      [0x23] =  0x01
005cdd48      [0x24] =  0x01
005cdd49      [0x25] =  0x01
005cdd4a      [0x26] =  0x01
005cdd4b      [0x27] =  0x01
005cdd4c      [0x28] =  0x01
005cdd4d      [0x29] =  0x01
005cdd4e      [0x2a] =  0x01
005cdd4f      [0x2b] =  0x01
005cdd50      [0x2c] =  0x01
005cdd51      [0x2d] =  0x01
005cdd52      [0x2e] =  0x01
005cdd53      [0x2f] =  0x0d
005cdd54      [0x30] =  0x0d
005cdd55      [0x31] =  0x0e
005cdd56      [0x32] =  0x0f
005cdd57      [0x33] =  0x01
005cdd58      [0x34] =  0x05
005cdd59      [0x35] =  0x10
005cdd5a      [0x36] =  0x0b
005cdd5b      [0x37] =  0x0b
005cdd5c      [0x38] =  0x11
005cdd5d      [0x39] =  0x06
005cdd5e      [0x3a] =  0x01
005cdd5f      [0x3b] =  0x0c
005cdd60      [0x3c] =  0x01
005cdd61      [0x3d] =  0x01
005cdd62      [0x3e] =  0x12
005cdd63      [0x3f] =  0x06
005cdd64      [0x40] =  0x01
005cdd65      [0x41] =  0x01
005cdd66      [0x42] =  0x06
005cdd67      [0x43] =  0x01
005cdd68      [0x44] =  0x01
005cdd69      [0x45] =  0x10
005cdd6a      [0x46] =  0x01
005cdd6b      [0x47] =  0x0c
005cdd6c      [0x48] =  0x06
005cdd6d      [0x49] =  0x0a
005cdd6e      [0x4a] =  0x13
005cdd6f      [0x4b] =  0x01
005cdd70      [0x4c] =  0x14
005cdd71      [0x4d] =  0x06
005cdd72      [0x4e] =  0x06
005cdd73      [0x4f] =  0x01
005cdd74      [0x50] =  0x01
005cdd75      [0x51] =  0x01
005cdd76      [0x52] =  0x0c
005cdd77      [0x53] =  0x01
005cdd78      [0x54] =  0x01
005cdd79      [0x55] =  0x01
005cdd7a      [0x56] =  0x01
005cdd7b      [0x57] =  0x06
005cdd7c      [0x58] =  0x01
005cdd7d      [0x59] =  0x15
005cdd7e      [0x5a] =  0x06
005cdd7f      [0x5b] =  0x10
005cdd80      [0x5c] =  0x10
005cdd81      [0x5d] =  0x10
005cdd82      [0x5e] =  0x10
005cdd83      [0x5f] =  0x10
005cdd84      [0x60] =  0x10
005cdd85      [0x61] =  0x10
005cdd86      [0x62] =  0x10
005cdd87      [0x63] =  0x06
005cdd88      [0x64] =  0x06
005cdd89      [0x65] =  0x06
005cdd8a      [0x66] =  0x16
005cdd8b      [0x67] =  0x16
005cdd8c      [0x68] =  0x16
005cdd8d      [0x69] =  0x16
005cdd8e      [0x6a] =  0x01
005cdd8f      [0x6b] =  0x01
005cdd90      [0x6c] =  0x01
005cdd91      [0x6d] =  0x01
005cdd92      [0x6e] =  0x10
005cdd93      [0x6f] =  0x17
005cdd94      [0x70] =  0x18
005cdd95      [0x71] =  0x18
005cdd96      [0x72] =  0x01
005cdd97      [0x73] =  0x10
005cdd98      [0x74] =  0x06
005cdd99      [0x75] =  0x06
005cdd9a      [0x76] =  0x10
005cdd9b      [0x77] =  0x0d
005cdd9c      [0x78] =  0x0d
005cdd9d      [0x79] =  0x16
005cdd9e  }

005cdd9e                                                                                            90 90                                ..

005cdda0  void __fastcall Emote::Emote(class Emote* this)

005cdda0  {
005cdda8      this->vtable = 0x7e8454;
005cddae      CreationProfile::CreationProfile(&this->cprof);
005cddb3      this->frame.qw = 0x3f800000;
005cddb3      this->frame.qx = 0f;
005cddb3      this->frame.qy = 0f;
005cddb3      this->frame.qz = 0f;
005cddb3      this->frame.m_fOrigin.x = 0;
005cddb3      this->frame.m_fOrigin.y = 0f;
005cddb3      this->frame.m_fOrigin.z = 0f;
005cddd0      Frame::cache(&this->frame);
005cddd5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005cdde6      this->teststring.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005cddec      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005cddee      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005cddfa      this->msg.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005cde00      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005cde08      this->mPosition.vtable = 0x796910;
005cde12      this->mPosition.objcell_id = 0;
005cde02      this->mPosition.frame.qw = 0x3f800000;
005cde02      this->mPosition.frame.qx = 0f;
005cde02      this->mPosition.frame.qy = 0f;
005cde02      this->mPosition.frame.qz = 0f;
005cde02      this->mPosition.frame.m_fOrigin.x = 0;
005cde02      this->mPosition.frame.m_fOrigin.y = 0f;
005cde02      this->mPosition.frame.m_fOrigin.z = 0f;
005cde30      Frame::cache(&this->mPosition.frame);
005cde35      this->type = 0;
005cde38      this->delay = 0f;
005cde3b      this->amount = 0;
005cde3e      __builtin_memset(&this->amount64, 0, 0x48);
005cde74      this->spellid = 0;
005cde7a      __builtin_memset(&this->percent, 0, 0x18);
005cde9f      this->extent = 1f;
005cdda0  }

005cdeab                                   90 90 90 90 90                                                             .....

005cdeb0  void __fastcall Emote::~Emote(class Emote* this)

005cdeb0  {
005cdebc      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->msg.m_buffer;
005cdecb      this->vtable = 0x7e8454;
005cded1      this->mPosition.vtable = 0x79285c;
005cded1      
005cdedf      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005cdee1          m_buffer->vtable->__vecDelDtor(1);
005cdee1      
005cdee9      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->teststring.m_buffer;
005cdee9      
005cdefb      if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
005cdefd          m_buffer_1->vtable->__vecDelDtor(1);
005cdefd      
005cdf06      this->cprof.vtable = 0x79285c;
005cdf09      this->vtable = 0x79285c;
005cdeb0  }

005cdf0f                                               90                                                                 .

005cdf10  void* __thiscall Emote::`scalar deleting destructor'(class Emote* this, uint32_t arg2)

005cdf10  {
005cdf13      Emote::~Emote(this);
005cdf13      
005cdf1d      if ((arg2 & 1) != 0)
005cdf20          operator delete(this);
005cdf20      
005cdf2b      return this;
005cdf10  }

005cdf2e                                            90 90                                                                ..

005cdf30  class Emote& __thiscall Emote::operator=(class Emote* this, class Emote const& arg2)

005cdf30  {
005cdf3a      if (this != arg2)
005cdf3a      {
005cdf43          this->type = arg2->type;
005cdf49          this->delay = arg2->delay;
005cdf4f          this->extent = arg2->extent;
005cdf55          this->amount = arg2->amount;
005cdf5b          this->amount64 = arg2->amount64;
005cdf61          *(uint32_t*)((char*)this->amount64)[4] = *(uint32_t*)((char*)arg2->amount64)[4];
005cdf67          this->heroxp64 = arg2->heroxp64;
005cdf6d          *(uint32_t*)((char*)this->heroxp64)[4] = *(uint32_t*)((char*)arg2->heroxp64)[4];
005cdf73          this->min = arg2->min;
005cdf79          this->max = arg2->max;
005cdf7f          this->min64 = arg2->min64;
005cdf85          *(uint32_t*)((char*)this->min64)[4] = *(uint32_t*)((char*)arg2->min64)[4];
005cdf8b          this->max64 = arg2->max64;
005cdf91          *(uint32_t*)((char*)this->max64)[4] = *(uint32_t*)((char*)arg2->max64)[4];
005cdf97          this->fmin = arg2->fmin;
005cdf9d          *(uint32_t*)((char*)this->fmin)[4] = *(uint32_t*)((char*)arg2->fmin)[4];
005cdfa3          this->fmax = arg2->fmax;
005cdfa9          *(uint32_t*)((char*)this->fmax)[4] = *(uint32_t*)((char*)arg2->fmax)[4];
005cdfaf          this->stat = arg2->stat;
005cdfb5          this->motion = arg2->motion;
005cdfc0          this->pscript = arg2->pscript;
005cdfca          this->sound = arg2->sound;
005cdfcd          CreationProfile::operator=(&this->cprof, &arg2->cprof);
005cdfd9          Frame::operator=(&this->frame, &arg2->frame);
005cdfea          this->spellid = arg2->spellid;
005cdff0          class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->teststring.m_buffer;
005cdff0          
005cdffc          if (m_buffer_2 != arg2->teststring.m_buffer)
005cdffc          {
005ce00e              if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
005ce010                  m_buffer_2->vtable->__vecDelDtor(1);
005ce010              
005ce018              class AC1Legacy::PStringBase<char> m_buffer = arg2->teststring.m_buffer;
005ce01e              this->teststring.m_buffer = m_buffer;
005ce028              InterlockedIncrement((m_buffer + 4));
005cdffc          }
005cdffc          
005ce02a          class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->msg.m_buffer;
005ce02a          
005ce036          if (m_buffer_3 != arg2->msg.m_buffer)
005ce036          {
005ce048              if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
005ce04a                  m_buffer_3->vtable->__vecDelDtor(1);
005ce04a              
005ce052              class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->msg.m_buffer;
005ce058              this->msg.m_buffer = m_buffer_1;
005ce062              InterlockedIncrement(&m_buffer_1->m_cRef);
005ce036          }
005ce036          
005ce06a          this->percent = arg2->percent;
005ce076          *(uint32_t*)((char*)this->percent)[4] = *(uint32_t*)((char*)arg2->percent)[4];
005ce082          this->display = arg2->display;
005ce08e          this->wealth_rating = arg2->wealth_rating;
005ce09a          this->treasure_class = arg2->treasure_class;
005ce0a6          this->treasure_type = arg2->treasure_type;
005ce0bf          this->mPosition.objcell_id = arg2->mPosition.objcell_id;
005ce0c5          Frame::operator=(&this->mPosition.frame, &arg2->mPosition.frame);
005cdf3a      }
005cdf3a      
005ce0d0      return this;
005cdf30  }

005ce0d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005ce0e0  uint32_t __fastcall Emote::pack_size(class Emote* this)

005ce0e0  {
005ce0e0      class Emote* this_1 = this;
005ce0e7      void* ecx_1 = (this->type - 1);
005ce0ec      this_1 = nullptr;
005ce0ec      
005ce106      switch (ecx_1)
005ce106      {
005ce125          case nullptr:
005ce125          case 7:
005ce125          case 9:
005ce125          case 0xc:
005ce125          case 0xf:
005ce125          case 0x10:
005ce125          case 0x11:
005ce125          case 0x13:
005ce125          case 0x14:
005ce125          case 0x15:
005ce125          case 0x16:
005ce125          case 0x17:
005ce125          case 0x18:
005ce125          case 0x19:
005ce125          case 0x1e:
005ce125          case 0x32:
005ce125          case 0x39:
005ce125          case 0x3b:
005ce125          case 0x3c:
005ce125          case 0x3f:
005ce125          case 0x40:
005ce125          case 0x42:
005ce125          case 0x43:
005ce125          case 0x4e:
005ce125          case 0x4f:
005ce125          case 0x50:
005ce125          case 0x52:
005ce125          case 0x57:
005ce125          {
005ce125              return (AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0xc);
005ce125              break;
005ce125          }
005ce147          case 1:
005ce147          case 0x3d:
005ce147          {
005ce147              return 0x1c;
005ce147              break;
005ce147          }
005ce15e          case 2:
005ce15e          case 0x49:
005ce15e          {
005ce15e              return (this->cprof.vtable->Pack(&this_1, 0) + 0xc);
005ce15e              break;
005ce15e          }
005ce1b8          case 3:
005ce1b8          case 5:
005ce1b8          case 0xa:
005ce1b8          case 0x56:
005ce1b8          {
005ce1b8              Frame::Pack(&this->frame, &this_1, 0);
005ce1c3              return 0x28;
005ce1b8              break;
005ce1b8          }
005ce1d5          case 4:
005ce1d5          case 6:
005ce1d5          case 8:
005ce1d5          case 0xd:
005ce1d5          case 0x12:
005ce1d5          case 0x1a:
005ce1d5          case 0x21:
005ce1d5          case 0x2e:
005ce1d5          case 0x2f:
005ce1d5          case 0x33:
005ce1d5          case 0x48:
005ce1d5          case 0x59:
005ce1d5          case 0x6d:
005ce1d5          case 0x6e:
005ce1d5          case 0x76:
005ce1d5          case 0x77:
005ce1d5          {
005ce1d5              return 0x10;
005ce1d5              break;
005ce1d5          }
005ce1cc          case 0x1b:
005ce1cc          case 0x1c:
005ce1cc          case 0x34:
005ce1cc          case 0x35:
005ce1cc          case 0x36:
005ce1cc          case 0x44:
005ce1cc          case 0x6f:
005ce1cc          case 0x70:
005ce1cc          {
005ce1cc              return 0x14;
005ce1cc              break;
005ce1cc          }
005ce13e          case 0x1d:
005ce13e          case 0x3a:
005ce13e          case 0x46:
005ce13e          case 0x51:
005ce13e          {
005ce13e              return (AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0x14);
005ce13e              break;
005ce13e          }
005ce1ee          case 0x1f:
005ce1ee          case 0x20:
005ce1ee          case 0x22:
005ce1ee          case 0x2c:
005ce1ee          case 0x2d:
005ce1ee          case 0x45:
005ce1ee          case 0x53:
005ce1ee          case 0x54:
005ce1ee          case 0x55:
005ce1ee          case 0x65:
005ce1ee          case 0x66:
005ce1ee          case 0x67:
005ce1ee          case 0x68:
005ce1ee          case 0x69:
005ce1ee          case 0x6a:
005ce1ee          case 0x6b:
005ce1ee          case 0x6c:
005ce1ee          {
005ce1ee              return (AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0x10);
005ce1ee              break;
005ce1ee          }
005ce238          case 0x23:
005ce238          case 0x26:
005ce238          case 0x27:
005ce238          case 0x28:
005ce238          case 0x29:
005ce238          case 0x2a:
005ce238          case 0x2b:
005ce238          {
005ce238              return (AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0x18);
005ce238              break;
005ce238          }
005ce283          case 0x24:
005ce283          {
005ce283              return (AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0x20);
005ce283              break;
005ce283          }
005ce21f          case 0x25:
005ce21f          case 0x4a:
005ce21f          {
005ce21f              return (((AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0xc) + AC1Legacy::PStringBase<char>::Pack(&this->teststring, &this_1, 0)) + 4);
005ce21f              break;
005ce21f          }
005ce28c          case 0x30:
005ce28c          {
005ce28c              return 0x28;
005ce28c              break;
005ce28c          }
005ce295          case 0x31:
005ce295          {
005ce295              return 0x24;
005ce295              break;
005ce295          }
005ce1ad          case 0x37:
005ce1ad          case 0x72:
005ce1ad          case 0x75:
005ce1ad          {
005ce1ad              return 0x18;
005ce1ad              break;
005ce1ad          }
005ce2ac          case 0x3e:
005ce2ac          case 0x62:
005ce2ac          case 0x63:
005ce2ac          {
005ce2ac              return (this->mPosition.vtable->Pack(&this_1, 0) + 0xc);
005ce2ac              break;
005ce2ac          }
005ce18b          case 0x4b:
005ce18b          {
005ce18b              return ((AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + this->cprof.vtable->Pack(&this_1, 0)) + 0xc);
005ce18b              break;
005ce18b          }
005ce1a4          case 0x58:
005ce1a4          {
005ce1a4              return (AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0x10);
005ce1a4              break;
005ce1a4          }
005ce26a          case 0x71:
005ce26a          {
005ce26a              return (AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0x20);
005ce26a              break;
005ce26a          }
005ce251          case 0x78:
005ce251          {
005ce251              return (AC1Legacy::PStringBase<char>::Pack(&this->msg, &this_1, 0) + 0xc);
005ce251              break;
005ce251          }
005ce106      }
005ce106      
005ce2b2      return 0xc;
005ce0e0  }

005ce2b3                                                           90                                                         .
005ce2b4  uint32_t jump_table_5ce2b4[0x14] = 
005ce2b4  {
005ce2b4      [0x00] =  0x005ce10d
005ce2b8      [0x01] =  0x005ce13f
005ce2bc      [0x02] =  0x005ce148
005ce2c0      [0x03] =  0x005ce1ae
005ce2c4      [0x04] =  0x005ce1cd
005ce2c8      [0x05] =  0x005ce1c4
005ce2cc      [0x06] =  0x005ce126
005ce2d0      [0x07] =  0x005ce1d6
005ce2d4      [0x08] =  0x005ce220
005ce2d8      [0x09] =  0x005ce26b
005ce2dc      [0x0a] =  0x005ce1ef
005ce2e0      [0x0b] =  0x005ce284
005ce2e4      [0x0c] =  0x005ce28d
005ce2e8      [0x0d] =  0x005ce1a5
005ce2ec      [0x0e] =  0x005ce296
005ce2f0      [0x0f] =  0x005ce15f
005ce2f4      [0x10] =  0x005ce18c
005ce2f8      [0x11] =  0x005ce252
005ce2fc      [0x12] =  0x005ce239
005ce300      [0x13] =  0x005ce2af
005ce304  }
005ce304  uint8_t lookup_table_5ce304[0x79] = 
005ce304  {
005ce304      [0x00] =  0x00
005ce305      [0x01] =  0x01
005ce306      [0x02] =  0x02
005ce307      [0x03] =  0x03
005ce308      [0x04] =  0x04
005ce309      [0x05] =  0x03
005ce30a      [0x06] =  0x04
005ce30b      [0x07] =  0x00
005ce30c      [0x08] =  0x04
005ce30d      [0x09] =  0x00
005ce30e      [0x0a] =  0x03
005ce30f      [0x0b] =  0x13
005ce310      [0x0c] =  0x00
005ce311      [0x0d] =  0x04
005ce312      [0x0e] =  0x13
005ce313      [0x0f] =  0x00
005ce314      [0x10] =  0x00
005ce315      [0x11] =  0x00
005ce316      [0x12] =  0x04
005ce317      [0x13] =  0x00
005ce318      [0x14] =  0x00
005ce319      [0x15] =  0x00
005ce31a      [0x16] =  0x00
005ce31b      [0x17] =  0x00
005ce31c      [0x18] =  0x00
005ce31d      [0x19] =  0x00
005ce31e      [0x1a] =  0x04
005ce31f      [0x1b] =  0x05
005ce320      [0x1c] =  0x05
005ce321      [0x1d] =  0x06
005ce322      [0x1e] =  0x00
005ce323      [0x1f] =  0x07
005ce324      [0x20] =  0x07
005ce325      [0x21] =  0x04
005ce326      [0x22] =  0x07
005ce327      [0x23] =  0x08
005ce328      [0x24] =  0x09
005ce329      [0x25] =  0x0a
005ce32a      [0x26] =  0x08
005ce32b      [0x27] =  0x08
005ce32c      [0x28] =  0x08
005ce32d      [0x29] =  0x08
005ce32e      [0x2a] =  0x08
005ce32f      [0x2b] =  0x08
005ce330      [0x2c] =  0x07
005ce331      [0x2d] =  0x07
005ce332      [0x2e] =  0x04
005ce333      [0x2f] =  0x04
005ce334      [0x30] =  0x0b
005ce335      [0x31] =  0x0c
005ce336      [0x32] =  0x00
005ce337      [0x33] =  0x04
005ce338      [0x34] =  0x05
005ce339      [0x35] =  0x05
005ce33a      [0x36] =  0x05
005ce33b      [0x37] =  0x0d
005ce33c      [0x38] =  0x13
005ce33d      [0x39] =  0x00
005ce33e      [0x3a] =  0x06
005ce33f      [0x3b] =  0x00
005ce340      [0x3c] =  0x00
005ce341      [0x3d] =  0x01
005ce342      [0x3e] =  0x0e
005ce343      [0x3f] =  0x00
005ce344      [0x40] =  0x00
005ce345      [0x41] =  0x13
005ce346      [0x42] =  0x00
005ce347      [0x43] =  0x00
005ce348      [0x44] =  0x05
005ce349      [0x45] =  0x07
005ce34a      [0x46] =  0x06
005ce34b      [0x47] =  0x13
005ce34c      [0x48] =  0x04
005ce34d      [0x49] =  0x02
005ce34e      [0x4a] =  0x0a
005ce34f      [0x4b] =  0x0f
005ce350      [0x4c] =  0x13
005ce351      [0x4d] =  0x13
005ce352      [0x4e] =  0x00
005ce353      [0x4f] =  0x00
005ce354      [0x50] =  0x00
005ce355      [0x51] =  0x06
005ce356      [0x52] =  0x00
005ce357      [0x53] =  0x07
005ce358      [0x54] =  0x07
005ce359      [0x55] =  0x07
005ce35a      [0x56] =  0x03
005ce35b      [0x57] =  0x00
005ce35c      [0x58] =  0x10
005ce35d      [0x59] =  0x04
005ce35e      [0x5a] =  0x13
005ce35f      [0x5b] =  0x13
005ce360      [0x5c] =  0x13
005ce361      [0x5d] =  0x13
005ce362      [0x5e] =  0x13
005ce363      [0x5f] =  0x13
005ce364      [0x60] =  0x13
005ce365      [0x61] =  0x13
005ce366      [0x62] =  0x0e
005ce367      [0x63] =  0x0e
005ce368      [0x64] =  0x13
005ce369      [0x65] =  0x07
005ce36a      [0x66] =  0x07
005ce36b      [0x67] =  0x07
005ce36c      [0x68] =  0x07
005ce36d      [0x69] =  0x07
005ce36e      [0x6a] =  0x07
005ce36f      [0x6b] =  0x07
005ce370      [0x6c] =  0x07
005ce371      [0x6d] =  0x04
005ce372      [0x6e] =  0x04
005ce373      [0x6f] =  0x05
005ce374      [0x70] =  0x05
005ce375      [0x71] =  0x11
005ce376      [0x72] =  0x0d
005ce377      [0x73] =  0x13
005ce378      [0x74] =  0x13
005ce379      [0x75] =  0x0d
005ce37a      [0x76] =  0x04
005ce37b      [0x77] =  0x04
005ce37c      [0x78] =  0x12
005ce37d  }

005ce37d                                                                                         90 90 90                               ...

005ce380  uint32_t __thiscall Emote::Pack(class Emote* this, void** arg2, uint32_t arg3)

005ce380  {
005ce385      uint32_t result = Emote::pack_size(this);
005ce385      
005ce392      if (arg3 >= result)
005ce392      {
005ce3a2          **(uint32_t**)arg2 = this->type;
005ce3a6          void* edx_2 = (*(uint32_t*)arg2 + 4);
005ce3a9          *(uint32_t*)arg2 = edx_2;
005ce3b0          *(uint32_t*)edx_2 = ((float)((long double)this->delay));
005ce3b4          void* ecx_2 = (*(uint32_t*)arg2 + 4);
005ce3b7          *(uint32_t*)arg2 = ecx_2;
005ce3be          *(uint32_t*)ecx_2 = ((float)((long double)this->extent));
005ce3c2          void* eax_4 = (*(uint32_t*)arg2 + 4);
005ce3c5          *(uint32_t*)arg2 = eax_4;
005ce3db          void* ecx_63;
005ce3db          
005ce3db          switch ((this->type - 1))
005ce3db          {
005ce3ea              case nullptr:
005ce3ea              case 7:
005ce3ea              case 9:
005ce3ea              case 0xc:
005ce3ea              case 0xf:
005ce3ea              case 0x10:
005ce3ea              case 0x11:
005ce3ea              case 0x13:
005ce3ea              case 0x14:
005ce3ea              case 0x15:
005ce3ea              case 0x16:
005ce3ea              case 0x17:
005ce3ea              case 0x18:
005ce3ea              case 0x19:
005ce3ea              case 0x1e:
005ce3ea              case 0x32:
005ce3ea              case 0x39:
005ce3ea              case 0x3b:
005ce3ea              case 0x3c:
005ce3ea              case 0x3f:
005ce3ea              case 0x40:
005ce3ea              case 0x42:
005ce3ea              case 0x43:
005ce3ea              case 0x4e:
005ce3ea              case 0x4f:
005ce3ea              case 0x50:
005ce3ea              case 0x52:
005ce3ea              case 0x57:
005ce3ea              case 0x78:
005ce3ea              {
005ce3ea                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce3ea                  break;
005ce3ea              }
005ce4af              case 1:
005ce4af              case 0x3d:
005ce4af              {
005ce4af                  *(uint32_t*)eax_4 = this->amount64;
005ce4b4                  *(uint32_t*)((char*)eax_4 + 4) = *(uint32_t*)((char*)this->amount64)[4];
005ce4b9                  void* ecx_23 = (*(uint32_t*)arg2 + 8);
005ce4bc                  *(uint32_t*)arg2 = ecx_23;
005ce4c3                  *(uint32_t*)ecx_23 = this->heroxp64;
005ce4c8                  *(uint32_t*)((char*)ecx_23 + 4) = *(uint32_t*)((char*)this->heroxp64)[4];
005ce4cb                  *(uint32_t*)arg2 += 8;
005ce4af                  break;
005ce4af              }
005ce51b              case 2:
005ce51b              case 0x49:
005ce51b              {
005ce513                  this->cprof.vtable->Pack(arg2, arg3);
005ce51b                  break;
005ce51b              }
005ce5b4              case 3:
005ce5b4              case 5:
005ce5b4              case 0xa:
005ce5b4              case 0x56:
005ce5b4              {
005ce5b4                  Frame::Pack(&this->frame, arg2, arg3);
005ce5b4                  break;
005ce5b4              }
005ce5a1              case 4:
005ce5a1              case 0x33:
005ce5a1              {
005ce5a1                  *(uint32_t*)eax_4 = this->motion;
005ce5a3                  *(uint32_t*)arg2 += 4;
005ce5a1                  break;
005ce5a1              }
005ce5c5              case 6:
005ce5c5              {
005ce5c5                  *(uint32_t*)eax_4 = this->pscript;
005ce5c7                  *(uint32_t*)arg2 += 4;
005ce5c5                  break;
005ce5c5              }
005ce5d6              case 8:
005ce5d6              {
005ce5d6                  *(uint32_t*)eax_4 = this->sound;
005ce5d8                  *(uint32_t*)arg2 += 4;
005ce5d6                  break;
005ce5d6              }
005ce505              case 0xd:
005ce505              case 0x12:
005ce505              case 0x1a:
005ce505              case 0x48:
005ce505              {
005ce505                  *(uint32_t*)eax_4 = this->spellid;
005ce507                  *(uint32_t*)arg2 += 4;
005ce505                  break;
005ce505              }
005ce5e7              case 0x1b:
005ce5e7              case 0x1c:
005ce5e7              {
005ce5e7                  *(uint32_t*)eax_4 = this->amount;
005ce5eb                  void* ecx_40 = (*(uint32_t*)arg2 + 4);
005ce5ee                  *(uint32_t*)arg2 = ecx_40;
005ce5f5                  *(uint32_t*)ecx_40 = this->stat;
005ce5f7                  *(uint32_t*)arg2 += 4;
005ce5e7                  break;
005ce5e7              }
005ce486              case 0x1d:
005ce486              case 0x3a:
005ce486              case 0x46:
005ce486              case 0x51:
005ce486              {
005ce486                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce490                  **(uint32_t**)arg2 = this->min;
005ce494                  void* ecx_19 = (*(uint32_t*)arg2 + 4);
005ce497                  *(uint32_t*)arg2 = ecx_19;
005ce49e                  *(uint32_t*)ecx_19 = this->max;
005ce4a0                  *(uint32_t*)arg2 += 4;
005ce486                  break;
005ce486              }
005ce400              case 0x1f:
005ce400              case 0x20:
005ce400              case 0x45:
005ce400              case 0x53:
005ce400              case 0x54:
005ce400              case 0x55:
005ce400              case 0x65:
005ce400              case 0x66:
005ce400              case 0x67:
005ce400              case 0x68:
005ce400              case 0x69:
005ce400              case 0x6a:
005ce400              case 0x6b:
005ce400              case 0x6c:
005ce400              {
005ce400                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce40a                  **(uint32_t**)arg2 = this->amount;
005ce40c                  *(uint32_t*)arg2 += 4;
005ce400                  break;
005ce400              }
005ce4f1              case 0x21:
005ce4f1              case 0x2e:
005ce4f1              case 0x2f:
005ce4f1              case 0x59:
005ce4f1              case 0x6e:
005ce4f1              case 0x76:
005ce4f1              case 0x77:
005ce4f1              {
005ce4f1                  *(uint32_t*)eax_4 = this->amount;
005ce4f3                  *(uint32_t*)arg2 += 4;
005ce4f1                  break;
005ce4f1              }
005ce60b              case 0x22:
005ce60b              case 0x2c:
005ce60b              case 0x2d:
005ce60b              {
005ce60b                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce610                  eax_4 = *(uint32_t*)arg2;
005ce615              label_5ce615:
005ce615                  *(uint32_t*)eax_4 = this->stat;
005ce617                  *(uint32_t*)arg2 += 4;
005ce60b                  break;
005ce60b              }
005ce658              case 0x23:
005ce658              case 0x26:
005ce658              case 0x27:
005ce658              case 0x28:
005ce658              case 0x29:
005ce658              case 0x2a:
005ce658              case 0x2b:
005ce658              {
005ce658                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce662                  **(uint32_t**)arg2 = this->min;
005ce666                  void* edx_23 = (*(uint32_t*)arg2 + 4);
005ce669                  *(uint32_t*)arg2 = edx_23;
005ce670                  *(uint32_t*)edx_23 = this->max;
005ce674                  void* ecx_49 = (*(uint32_t*)arg2 + 4);
005ce677                  *(uint32_t*)arg2 = ecx_49;
005ce67e                  *(uint32_t*)ecx_49 = this->stat;
005ce680                  *(uint32_t*)arg2 += 4;
005ce658                  break;
005ce658              }
005ce6dc              case 0x24:
005ce6dc              {
005ce6dc                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce6e6                  **(uint64_t**)arg2 = ((double)((long double)this->fmin));
005ce6ea                  void* edx_31 = (*(uint32_t*)arg2 + 8);
005ce6ed                  *(uint32_t*)arg2 = edx_31;
005ce6f4                  *(uint64_t*)edx_31 = ((double)((long double)this->fmax));
005ce6f8                  void* ecx_58 = (*(uint32_t*)arg2 + 8);
005ce6fb                  *(uint32_t*)arg2 = ecx_58;
005ce702                  *(uint32_t*)ecx_58 = this->stat;
005ce704                  *(uint32_t*)arg2 += 4;
005ce6dc                  break;
005ce6dc              }
005ce62b              case 0x25:
005ce62b              case 0x4a:
005ce62b              {
005ce62b                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce638                  AC1Legacy::PStringBase<char>::Pack(&this->teststring, arg2, arg3);
005ce642                  **(uint32_t**)arg2 = this->stat;
005ce644                  *(uint32_t*)arg2 += 4;
005ce62b                  break;
005ce62b              }
005ce716              case 0x30:
005ce716              {
005ce716                  *(uint64_t*)eax_4 = ((double)((long double)this->percent));
005ce71a                  void* ebx_2 = (*(uint32_t*)arg2 + 8);
005ce71d                  *(uint32_t*)arg2 = ebx_2;
005ce724                  *(uint32_t*)ebx_2 = this->min64;
005ce729                  *(uint32_t*)((char*)ebx_2 + 4) = *(uint32_t*)((char*)this->min64)[4];
005ce72e                  void* edx_34 = (*(uint32_t*)arg2 + 8);
005ce731                  *(uint32_t*)arg2 = edx_34;
005ce738                  *(uint32_t*)edx_34 = this->max64;
005ce73d                  *(uint32_t*)((char*)edx_34 + 4) = *(uint32_t*)((char*)this->max64)[4];
005ce742                  ecx_63 = (*(uint32_t*)arg2 + 8);
005ce77c              label_5ce77c:
005ce77c                  *(uint32_t*)arg2 = ecx_63;
005ce786                  *(uint32_t*)ecx_63 = this->display;
005ce788                  *(uint32_t*)arg2 += 4;
005ce716                  break;
005ce716              }
005ce74a              case 0x31:
005ce74a              {
005ce74a                  *(uint32_t*)eax_4 = this->stat;
005ce74e                  void* eax_51 = (*(uint32_t*)arg2 + 4);
005ce751                  *(uint32_t*)arg2 = eax_51;
005ce759                  *(uint64_t*)eax_51 = ((double)((long double)this->percent));
005ce75d                  void* ebx_4 = (*(uint32_t*)arg2 + 8);
005ce760                  *(uint32_t*)arg2 = ebx_4;
005ce767                  *(uint32_t*)ebx_4 = this->min;
005ce76b                  void* edx_38 = (*(uint32_t*)arg2 + 4);
005ce76e                  *(uint32_t*)arg2 = edx_38;
005ce775                  *(uint32_t*)edx_38 = this->max;
005ce779                  ecx_63 = (*(uint32_t*)arg2 + 4);
005ce779                  goto label_5ce77c;
005ce74a              }
005ce41b              case 0x34:
005ce41b              case 0x35:
005ce41b              case 0x36:
005ce41b              case 0x44:
005ce41b              {
005ce41b                  *(uint32_t*)eax_4 = this->stat;
005ce41f                  void* ecx_9 = (*(uint32_t*)arg2 + 4);
005ce422                  *(uint32_t*)arg2 = ecx_9;
005ce429                  *(uint32_t*)ecx_9 = this->amount;
005ce42b                  *(uint32_t*)arg2 += 4;
005ce41b                  break;
005ce41b              }
005ce56e              case 0x37:
005ce56e              {
005ce56e                  *(uint32_t*)eax_4 = this->wealth_rating;
005ce572                  void* edx_15 = (*(uint32_t*)arg2 + 4);
005ce575                  *(uint32_t*)arg2 = edx_15;
005ce57f                  *(uint32_t*)edx_15 = this->treasure_class;
005ce583                  void* ecx_34 = (*(uint32_t*)arg2 + 4);
005ce586                  *(uint32_t*)arg2 = ecx_34;
005ce590                  *(uint32_t*)ecx_34 = this->treasure_type;
005ce592                  *(uint32_t*)arg2 += 4;
005ce56e                  break;
005ce56e              }
005ce7a2              case 0x3e:
005ce7a2              {
005ce794                  this->mPosition.vtable->Pack(arg2, arg3);
005ce7a2                  break;
005ce7a2              }
005ce52f              case 0x4b:
005ce52f              {
005ce52f                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce534                  this->cprof.vtable->Pack(arg2, arg3);
005ce52f                  break;
005ce52f              }
005ce550              case 0x58:
005ce550              {
005ce550                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce55a                  **(uint32_t**)arg2 = this->amount;
005ce55c                  *(uint32_t*)arg2 += 4;
005ce550                  break;
005ce550              }
005ce7bc              case 0x62:
005ce7bc              case 0x63:
005ce7bc              {
005ce7ae                  this->mPosition.vtable->Pack(arg2, arg3);
005ce7bc                  break;
005ce7bc              }
005ce3db              case 0x6d:
005ce3db              {
005ce3db                  goto label_5ce615;
005ce3db              }
005ce4da              case 0x6f:
005ce4da              case 0x70:
005ce4da              {
005ce4da                  *(uint32_t*)eax_4 = this->amount64;
005ce4df                  *(uint32_t*)((char*)eax_4 + 4) = *(uint32_t*)((char*)this->amount64)[4];
005ce4e2                  *(uint32_t*)arg2 += 8;
005ce4da                  break;
005ce4da              }
005ce694              case 0x71:
005ce694              {
005ce694                  AC1Legacy::PStringBase<char>::Pack(&this->msg, arg2, arg3);
005ce69c                  void* eax_41 = *(uint32_t*)arg2;
005ce69e                  *(uint32_t*)eax_41 = this->min64;
005ce6a3                  *(uint32_t*)((char*)eax_41 + 4) = *(uint32_t*)((char*)this->min64)[4];
005ce6a8                  void* edx_27 = (*(uint32_t*)arg2 + 8);
005ce6ab                  *(uint32_t*)arg2 = edx_27;
005ce6b2                  *(uint32_t*)edx_27 = this->max64;
005ce6b7                  *(uint32_t*)((char*)edx_27 + 4) = *(uint32_t*)((char*)this->max64)[4];
005ce6bc                  void* ecx_54 = (*(uint32_t*)arg2 + 8);
005ce6bf                  *(uint32_t*)arg2 = ecx_54;
005ce6c6                  *(uint32_t*)ecx_54 = this->stat;
005ce6c8                  *(uint32_t*)arg2 += 4;
005ce694                  break;
005ce694              }
005ce43a              case 0x72:
005ce43a              {
005ce43a                  *(uint32_t*)eax_4 = this->stat;
005ce43e                  void* ecx_12 = (*(uint32_t*)arg2 + 4);
005ce441                  *(uint32_t*)arg2 = ecx_12;
005ce448                  *(uint32_t*)ecx_12 = this->amount64;
005ce44d                  *(uint32_t*)((char*)ecx_12 + 4) = *(uint32_t*)((char*)this->amount64)[4];
005ce450                  *(uint32_t*)arg2 += 8;
005ce43a                  break;
005ce43a              }
005ce45f              case 0x75:
005ce45f              {
005ce45f                  *(uint32_t*)eax_4 = this->stat;
005ce463                  void* ecx_16 = (*(uint32_t*)arg2 + 4);
005ce466                  *(uint32_t*)arg2 = ecx_16;
005ce470                  *(uint64_t*)ecx_16 = ((double)((long double)this->percent));
005ce472                  *(uint32_t*)arg2 += 8;
005ce45f                  break;
005ce45f              }
005ce3db          }
005ce392      }
005ce392      
005ce7c5      return result;
005ce380  }

005ce7c8  uint32_t jump_table_5ce7c8[0x1e] = 
005ce7c8  {
005ce7c8      [0x00] =  0x005ce3e2
005ce7cc      [0x01] =  0x005ce4ac
005ce7d0      [0x02] =  0x005ce513
005ce7d4      [0x03] =  0x005ce5af
005ce7d8      [0x04] =  0x005ce59e
005ce7dc      [0x05] =  0x005ce5c2
005ce7e0      [0x06] =  0x005ce5d3
005ce7e4      [0x07] =  0x005ce4ff
005ce7e8      [0x08] =  0x005ce5e4
005ce7ec      [0x09] =  0x005ce47e
005ce7f0      [0x0a] =  0x005ce3f8
005ce7f4      [0x0b] =  0x005ce4ee
005ce7f8      [0x0c] =  0x005ce603
005ce7fc      [0x0d] =  0x005ce650
005ce800      [0x0e] =  0x005ce6d4
005ce804      [0x0f] =  0x005ce623
005ce808      [0x10] =  0x005ce710
005ce80c      [0x11] =  0x005ce747
005ce810      [0x12] =  0x005ce418
005ce814      [0x13] =  0x005ce568
005ce818      [0x14] =  0x005ce794
005ce81c      [0x15] =  0x005ce527
005ce820      [0x16] =  0x005ce548
005ce824      [0x17] =  0x005ce7ae
005ce828      [0x18] =  0x005ce612
005ce82c      [0x19] =  0x005ce4d7
005ce830      [0x1a] =  0x005ce68c
005ce834      [0x1b] =  0x005ce437
005ce838      [0x1c] =  0x005ce45c
005ce83c      [0x1d] =  0x005ce7bf
005ce840  }
005ce840  uint8_t lookup_table_5ce840[0x79] = 
005ce840  {
005ce840      [0x00] =  0x00
005ce841      [0x01] =  0x01
005ce842      [0x02] =  0x02
005ce843      [0x03] =  0x03
005ce844      [0x04] =  0x04
005ce845      [0x05] =  0x03
005ce846      [0x06] =  0x05
005ce847      [0x07] =  0x00
005ce848      [0x08] =  0x06
005ce849      [0x09] =  0x00
005ce84a      [0x0a] =  0x03
005ce84b      [0x0b] =  0x1d
005ce84c      [0x0c] =  0x00
005ce84d      [0x0d] =  0x07
005ce84e      [0x0e] =  0x1d
005ce84f      [0x0f] =  0x00
005ce850      [0x10] =  0x00
005ce851      [0x11] =  0x00
005ce852      [0x12] =  0x07
005ce853      [0x13] =  0x00
005ce854      [0x14] =  0x00
005ce855      [0x15] =  0x00
005ce856      [0x16] =  0x00
005ce857      [0x17] =  0x00
005ce858      [0x18] =  0x00
005ce859      [0x19] =  0x00
005ce85a      [0x1a] =  0x07
005ce85b      [0x1b] =  0x08
005ce85c      [0x1c] =  0x08
005ce85d      [0x1d] =  0x09
005ce85e      [0x1e] =  0x00
005ce85f      [0x1f] =  0x0a
005ce860      [0x20] =  0x0a
005ce861      [0x21] =  0x0b
005ce862      [0x22] =  0x0c
005ce863      [0x23] =  0x0d
005ce864      [0x24] =  0x0e
005ce865      [0x25] =  0x0f
005ce866      [0x26] =  0x0d
005ce867      [0x27] =  0x0d
005ce868      [0x28] =  0x0d
005ce869      [0x29] =  0x0d
005ce86a      [0x2a] =  0x0d
005ce86b      [0x2b] =  0x0d
005ce86c      [0x2c] =  0x0c
005ce86d      [0x2d] =  0x0c
005ce86e      [0x2e] =  0x0b
005ce86f      [0x2f] =  0x0b
005ce870      [0x30] =  0x10
005ce871      [0x31] =  0x11
005ce872      [0x32] =  0x00
005ce873      [0x33] =  0x04
005ce874      [0x34] =  0x12
005ce875      [0x35] =  0x12
005ce876      [0x36] =  0x12
005ce877      [0x37] =  0x13
005ce878      [0x38] =  0x1d
005ce879      [0x39] =  0x00
005ce87a      [0x3a] =  0x09
005ce87b      [0x3b] =  0x00
005ce87c      [0x3c] =  0x00
005ce87d      [0x3d] =  0x01
005ce87e      [0x3e] =  0x14
005ce87f      [0x3f] =  0x00
005ce880      [0x40] =  0x00
005ce881      [0x41] =  0x1d
005ce882      [0x42] =  0x00
005ce883      [0x43] =  0x00
005ce884      [0x44] =  0x12
005ce885      [0x45] =  0x0a
005ce886      [0x46] =  0x09
005ce887      [0x47] =  0x1d
005ce888      [0x48] =  0x07
005ce889      [0x49] =  0x02
005ce88a      [0x4a] =  0x0f
005ce88b      [0x4b] =  0x15
005ce88c      [0x4c] =  0x1d
005ce88d      [0x4d] =  0x1d
005ce88e      [0x4e] =  0x00
005ce88f      [0x4f] =  0x00
005ce890      [0x50] =  0x00
005ce891      [0x51] =  0x09
005ce892      [0x52] =  0x00
005ce893      [0x53] =  0x0a
005ce894      [0x54] =  0x0a
005ce895      [0x55] =  0x0a
005ce896      [0x56] =  0x03
005ce897      [0x57] =  0x00
005ce898      [0x58] =  0x16
005ce899      [0x59] =  0x0b
005ce89a      [0x5a] =  0x1d
005ce89b      [0x5b] =  0x1d
005ce89c      [0x5c] =  0x1d
005ce89d      [0x5d] =  0x1d
005ce89e      [0x5e] =  0x1d
005ce89f      [0x5f] =  0x1d
005ce8a0      [0x60] =  0x1d
005ce8a1      [0x61] =  0x1d
005ce8a2      [0x62] =  0x17
005ce8a3      [0x63] =  0x17
005ce8a4      [0x64] =  0x1d
005ce8a5      [0x65] =  0x0a
005ce8a6      [0x66] =  0x0a
005ce8a7      [0x67] =  0x0a
005ce8a8      [0x68] =  0x0a
005ce8a9      [0x69] =  0x0a
005ce8aa      [0x6a] =  0x0a
005ce8ab      [0x6b] =  0x0a
005ce8ac      [0x6c] =  0x0a
005ce8ad      [0x6d] =  0x18
005ce8ae      [0x6e] =  0x0b
005ce8af      [0x6f] =  0x19
005ce8b0      [0x70] =  0x19
005ce8b1      [0x71] =  0x1a
005ce8b2      [0x72] =  0x1b
005ce8b3      [0x73] =  0x1d
005ce8b4      [0x74] =  0x1d
005ce8b5      [0x75] =  0x1c
005ce8b6      [0x76] =  0x0b
005ce8b7      [0x77] =  0x0b
005ce8b8      [0x78] =  0x00
005ce8b9  }

005ce8b9                                                                             90 90 90 90 90 90 90                           .......

005ce8c0  void __thiscall Emote::Emote(class Emote* this, class Emote const* arg2)

005ce8c0  {
005ce8c8      this->vtable = 0x7e8454;
005ce8ce      CreationProfile::CreationProfile(&this->cprof);
005ce8d3      this->frame.qw = 0x3f800000;
005ce8d3      this->frame.qx = 0f;
005ce8d3      this->frame.qy = 0f;
005ce8d3      this->frame.qz = 0f;
005ce8d3      this->frame.m_fOrigin.x = 0;
005ce8d3      this->frame.m_fOrigin.y = 0f;
005ce8d3      this->frame.m_fOrigin.z = 0f;
005ce8f0      Frame::cache(&this->frame);
005ce8f5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005ce906      this->teststring.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005ce90c      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005ce90e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005ce91a      this->msg.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005ce920      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005ce928      this->mPosition.vtable = 0x796910;
005ce932      this->mPosition.objcell_id = 0;
005ce922      this->mPosition.frame.qw = 0x3f800000;
005ce922      this->mPosition.frame.qx = 0f;
005ce922      this->mPosition.frame.qy = 0f;
005ce922      this->mPosition.frame.qz = 0f;
005ce922      this->mPosition.frame.m_fOrigin.x = 0;
005ce922      this->mPosition.frame.m_fOrigin.y = 0f;
005ce922      this->mPosition.frame.m_fOrigin.z = 0f;
005ce950      Frame::cache(&this->mPosition.frame);
005ce95c      Emote::operator=(this, arg2);
005ce8c0  }

005ce969                             90 90 90 90 90 90 90                                                           .......

005ce970  int32_t __thiscall Emote::UnPack(class Emote* this, void** arg2, uint32_t arg3)

005ce970  {
005ce984      void* var_10 = nullptr;
005ce984      
005ce98c      if (arg3 >= 0xc)
005ce98c      {
005ce999          this->type = **(uint32_t**)arg2;
005ce99e          void* edx_2 = (*(uint32_t*)arg2 + 4);
005ce9a1          *(uint32_t*)arg2 = edx_2;
005ce9a7          this->delay = *(uint32_t*)edx_2;
005ce9ac          void* ecx_2 = (*(uint32_t*)arg2 + 4);
005ce9af          *(uint32_t*)arg2 = ecx_2;
005ce9b5          this->extent = *(uint32_t*)ecx_2;
005ce9ba          void* eax_6 = (*(uint32_t*)arg2 + 4);
005ce9bd          *(uint32_t*)arg2 = eax_6;
005ce9d2          int32_t eax_9;
005ce9d2          int32_t eax_49;
005ce9d2          class Position* ecx_38;
005ce9d2          void* ecx_94;
005ce9d2          
005ce9d2          switch (this->type)
005ce9d2          {
005cf0f4              case 0:
005cf0f4              case 0xc:
005cf0f4              case 0xf:
005cf0f4              case 0x39:
005cf0f4              case 0x42:
005cf0f4              case 0x48:
005cf0f4              case 0x4d:
005cf0f4              case 0x4e:
005cf0f4              case 0x65:
005cf0f4              case 0x74:
005cf0f4              case 0x75:
005cf0f4              {
005cf0f4                  return Emote::IsValid(this);
005cf0f4                  break;
005cf0f4              }
005ce9eb              case 1:
005ce9eb              case 8:
005ce9eb              case 0xa:
005ce9eb              case 0xd:
005ce9eb              case 0x10:
005ce9eb              case 0x11:
005ce9eb              case 0x12:
005ce9eb              case 0x14:
005ce9eb              case 0x15:
005ce9eb              case 0x16:
005ce9eb              case 0x17:
005ce9eb              case 0x18:
005ce9eb              case 0x19:
005ce9eb              case 0x1a:
005ce9eb              case 0x1f:
005ce9eb              case 0x33:
005ce9eb              case 0x3a:
005ce9eb              case 0x3c:
005ce9eb              case 0x3d:
005ce9eb              case 0x40:
005ce9eb              case 0x41:
005ce9eb              case 0x43:
005ce9eb              case 0x44:
005ce9eb              case 0x4f:
005ce9eb              case 0x50:
005ce9eb              case 0x51:
005ce9eb              case 0x53:
005ce9eb              case 0x58:
005ce9eb              case 0x79:
005ce9eb              {
005ce9f0                  if (arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0xc))
005ce9f0                  {
005ce9fe                      eax_9 = AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3);
005cebf5                  label_5cebf5:
005cebf5                      
005cebf7                      if (eax_9 != 0)
005cf0f4                          return Emote::IsValid(this);
005ce9f0                  }
005ce9eb                  break;
005ce9eb              }
005ceb49              case 2:
005ceb49              case 0x3e:
005ceb49              {
005ceb49                  if (arg3 >= 0x1c)
005ceb49                  {
005ceb51                      this->amount64 = *(uint32_t*)eax_6;
005ceb57                      *(uint32_t*)((char*)this->amount64)[4] = *(uint32_t*)((char*)eax_6 + 4);
005ceb5c                      void* ecx_31 = (*(uint32_t*)arg2 + 8);
005ceb5f                      *(uint32_t*)arg2 = ecx_31;
005ceb65                      this->heroxp64 = *(uint32_t*)ecx_31;
005ceb6b                      *(uint32_t*)((char*)this->heroxp64)[4] = *(uint32_t*)((char*)ecx_31 + 4);
005ceb75                      *(uint32_t*)arg2 += 8;
005ceb82                      return Emote::IsValid(this);
005ceb49                  }
005ceb49                  break;
005ceb49              }
005cebe4              case 3:
005cebe4              case 0x4a:
005cebe4              {
005cebe4                  eax_49 = (this->cprof.vtable->Pack(&var_10, 0) + 0xc);
005cebe7              label_5cebe7:
005cebe7                  
005cebe9                  if (arg3 >= eax_49)
005cebe9                  {
005cebeb                      ecx_38 = &this->cprof;
005cebeb                      goto label_5cebf2;
005cebe9                  }
005cebe4                  break;
005cebe4              }
005cecbc              case 4:
005cecbc              case 6:
005cecbc              case 0xb:
005cecbc              case 0x57:
005cecbc              {
005cecbc                  Frame::Pack(&this->frame, &var_10, 0);
005cecbc                  
005cecc6                  if (arg3 >= 0x28)
005cecc6                  {
005cecd1                      Frame::UnPack(&this->frame, arg2, arg3);
005cece3                      return Emote::IsValid(this);
005cecc6                  }
005cecbc                  break;
005cecbc              }
005cec90              case 5:
005cec90              case 0x34:
005cec90              {
005cec90                  if (arg3 >= 0x10)
005cec90                  {
005cec98                      this->motion = *(uint32_t*)eax_6;
005ceca2                      *(uint32_t*)arg2 += 4;
005cecaf                      return Emote::IsValid(this);
005cec90                  }
005cec90                  break;
005cec90              }
005cece9              case 7:
005cece9              {
005cece9                  if (arg3 >= 0x10)
005cece9                  {
005cecf1                      this->pscript = *(uint32_t*)eax_6;
005cecfb                      *(uint32_t*)arg2 += 4;
005ced08                      return Emote::IsValid(this);
005cece9                  }
005cece9                  break;
005cece9              }
005ced0e              case 9:
005ced0e              {
005ced0e                  if (arg3 >= 0x10)
005ced0e                  {
005ced16                      this->sound = *(uint32_t*)eax_6;
005ced20                      *(uint32_t*)arg2 += 4;
005ced2d                      return Emote::IsValid(this);
005ced0e                  }
005ced0e                  break;
005ced0e              }
005cebb3              case 0xe:
005cebb3              case 0x13:
005cebb3              case 0x1b:
005cebb3              case 0x49:
005cebb3              {
005cebb3                  if (arg3 >= 0x10)
005cebb3                  {
005cebb7                      this->spellid = *(uint32_t*)eax_6;
005cebc4                      *(uint32_t*)arg2 += 4;
005cebd1                      return Emote::IsValid(this);
005cebb3                  }
005cebb3                  break;
005cebb3              }
005ced33              case 0x1c:
005ced33              case 0x1d:
005ced33              {
005ced33                  if (arg3 >= 0x14)
005ced33                  {
005ced3b                      this->amount = *(uint32_t*)eax_6;
005ced40                      void* ecx_54 = (*(uint32_t*)arg2 + 4);
005ced43                      *(uint32_t*)arg2 = ecx_54;
005ced49                      this->stat = *(uint32_t*)ecx_54;
005ced53                      *(uint32_t*)arg2 += 4;
005ced60                      return Emote::IsValid(this);
005ced33                  }
005ced33                  break;
005ced33              }
005ceafa              case 0x1e:
005ceafa              case 0x3b:
005ceafa              case 0x47:
005ceafa              case 0x52:
005ceafa              {
005ceaff                  if ((arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0x14) && AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3) != 0))
005ceaff                  {
005ceb1e                      this->min = **(uint32_t**)arg2;
005ceb23                      void* ecx_27 = (*(uint32_t*)arg2 + 4);
005ceb26                      *(uint32_t*)arg2 = ecx_27;
005ceb2c                      this->max = *(uint32_t*)ecx_27;
005ceb36                      *(uint32_t*)arg2 += 4;
005ceb43                      return Emote::IsValid(this);
005ceaff                  }
005ceafa                  break;
005ceafa              }
005cea1a              case 0x20:
005cea1a              case 0x21:
005cea1a              case 0x46:
005cea1a              case 0x54:
005cea1a              case 0x55:
005cea1a              case 0x56:
005cea1a              case 0x59:
005cea1a              case 0x66:
005cea1a              case 0x67:
005cea1a              case 0x68:
005cea1a              case 0x69:
005cea1a              case 0x6a:
005cea1a              case 0x6b:
005cea1a              case 0x6c:
005cea1a              case 0x6d:
005cea1a              {
005cea1f                  if ((arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0xc) && AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3) != 0))
005cea1f                  {
005cea3e                      this->amount = **(uint32_t**)arg2;
005cea48                      *(uint32_t*)arg2 += 4;
005cea55                      return Emote::IsValid(this);
005cea1f                  }
005cea1a                  break;
005cea1a              }
005ceb92              case 0x22:
005ceb92              case 0x2f:
005ceb92              case 0x30:
005ceb92              case 0x5a:
005ceb92              case 0x77:
005ceb92              case 0x78:
005ceb92              {
005ceb92                  if (arg3 >= 0x10)
005ceb92                  {
005ceb96                      this->amount = *(uint32_t*)eax_6;
005ceba0                      *(uint32_t*)arg2 += 4;
005cebad                      return Emote::IsValid(this);
005ceb92                  }
005ceb92                  break;
005ceb92              }
005cedbf              case 0x23:
005cedbf              case 0x2d:
005cedbf              case 0x2e:
005cedbf              {
005cedc4                  if ((arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0xc) && AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3) != 0))
005cedc4                  {
005cede3                      this->stat = **(uint32_t**)arg2;
005ceded                      *(uint32_t*)arg2 += 4;
005cedfa                      return Emote::IsValid(this);
005cedc4                  }
005cedbf                  break;
005cedbf              }
005cee96              case 0x24:
005cee96              case 0x27:
005cee96              case 0x28:
005cee96              case 0x29:
005cee96              case 0x2a:
005cee96              case 0x2b:
005cee96              case 0x2c:
005cee96              {
005cee9b                  if ((arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0xc) && AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3) != 0))
005cee9b                  {
005ceeba                      this->min = **(uint32_t**)arg2;
005ceebf                      void* edx_22 = (*(uint32_t*)arg2 + 4);
005ceec2                      *(uint32_t*)arg2 = edx_22;
005ceec8                      this->max = *(uint32_t*)edx_22;
005ceecd                      void* ecx_73 = (*(uint32_t*)arg2 + 4);
005ceed0                      *(uint32_t*)arg2 = ecx_73;
005ceed6                      this->stat = *(uint32_t*)ecx_73;
005ceee0                      *(uint32_t*)arg2 += 4;
005ceeed                      return Emote::IsValid(this);
005cee9b                  }
005cee96                  break;
005cee96              }
005cef7a              case 0x25:
005cef7a              {
005cef7f                  if ((arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0xc) && AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3) != 0))
005cef7f                  {
005cef9a                      void* eax_122 = *(uint32_t*)arg2;
005cef9e                      this->fmin = *(uint32_t*)eax_122;
005cefa4                      *(uint32_t*)((char*)this->fmin)[4] = *(uint32_t*)((char*)eax_122 + 4);
005cefa9                      void* edx_29 = (*(uint32_t*)arg2 + 8);
005cefac                      *(uint32_t*)arg2 = edx_29;
005cefb2                      this->fmax = *(uint32_t*)edx_29;
005cefb8                      *(uint32_t*)((char*)this->fmax)[4] = *(uint32_t*)((char*)edx_29 + 4);
005cefbd                      void* ecx_88 = (*(uint32_t*)arg2 + 8);
005cefc0                      *(uint32_t*)arg2 = ecx_88;
005cefc6                      this->stat = *(uint32_t*)ecx_88;
005cefd0                      *(uint32_t*)arg2 += 4;
005cefdd                      return Emote::IsValid(this);
005cef7f                  }
005cef7a                  break;
005cef7a              }
005cee0f              case 0x26:
005cee0f              case 0x4b:
005cee0f              {
005cee0f                  int32_t eax_91 = (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0xc);
005cee0f                  
005cee18                  if ((((arg3 >= eax_91 && AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3) != 0) && arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->teststring, &var_10, 0) + eax_91)) && AC1Legacy::PStringBase<char>::UnPack(&this->teststring, arg2, arg3) != 0))
005cee18                  {
005cee6a                      this->stat = **(uint32_t**)arg2;
005cee74                      *(uint32_t*)arg2 += 4;
005cee81                      return Emote::IsValid(this);
005cee18                  }
005cee0f                  break;
005cee0f              }
005cefe2              case 0x31:
005cefe2              {
005cefe2                  this->percent = *(uint32_t*)eax_6;
005cefeb                  *(uint32_t*)((char*)this->percent)[4] = *(uint32_t*)((char*)eax_6 + 4);
005ceff3                  void* ebx_2 = (*(uint32_t*)arg2 + 8);
005ceff6                  *(uint32_t*)arg2 = ebx_2;
005ceffc                  this->min64 = *(uint32_t*)ebx_2;
005cf002                  *(uint32_t*)((char*)this->min64)[4] = *(uint32_t*)((char*)ebx_2 + 4);
005cf007                  void* edx_34 = (*(uint32_t*)arg2 + 8);
005cf00a                  *(uint32_t*)arg2 = edx_34;
005cf010                  this->max64 = *(uint32_t*)edx_34;
005cf016                  *(uint32_t*)((char*)this->max64)[4] = *(uint32_t*)((char*)edx_34 + 4);
005cf01b                  ecx_94 = (*(uint32_t*)arg2 + 8);
005cf05e              label_5cf05e:
005cf05e                  *(uint32_t*)arg2 = ecx_94;
005cf064                  this->display = *(uint32_t*)ecx_94;
005cf071                  *(uint32_t*)arg2 += 4;
005cf07e                  return Emote::IsValid(this);
005cefe2                  break;
005cefe2              }
005cf022              case 0x32:
005cf022              {
005cf022                  this->stat = *(uint32_t*)eax_6;
005cf027                  void* eax_132 = (*(uint32_t*)arg2 + 4);
005cf02a                  *(uint32_t*)arg2 = eax_132;
005cf02e                  this->percent = *(uint32_t*)eax_132;
005cf037                  *(uint32_t*)((char*)this->percent)[4] = *(uint32_t*)((char*)eax_132 + 4);
005cf03f                  void* ebx_4 = (*(uint32_t*)arg2 + 8);
005cf042                  *(uint32_t*)arg2 = ebx_4;
005cf048                  this->min = *(uint32_t*)ebx_4;
005cf04d                  void* edx_38 = (*(uint32_t*)arg2 + 4);
005cf050                  *(uint32_t*)arg2 = edx_38;
005cf056                  this->max = *(uint32_t*)edx_38;
005cf05b                  ecx_94 = (*(uint32_t*)arg2 + 4);
005cf05b                  goto label_5cf05e;
005cf022              }
005cea5a              case 0x35:
005cea5a              case 0x36:
005cea5a              case 0x37:
005cea5a              case 0x45:
005cea5a              {
005cea5a                  this->stat = *(uint32_t*)eax_6;
005cea5f                  void* ecx_12 = (*(uint32_t*)arg2 + 4);
005cea62                  *(uint32_t*)arg2 = ecx_12;
005cea68                  this->amount = *(uint32_t*)ecx_12;
005cea72                  *(uint32_t*)arg2 += 4;
005cea7f                  return Emote::IsValid(this);
005cea5a                  break;
005cea5a              }
005cec4e              case 0x38:
005cec4e              {
005cec4e                  this->wealth_rating = *(uint32_t*)eax_6;
005cec56                  void* edx_15 = (*(uint32_t*)arg2 + 4);
005cec59                  *(uint32_t*)arg2 = edx_15;
005cec5f                  this->treasure_class = *(uint32_t*)edx_15;
005cec67                  void* ecx_44 = (*(uint32_t*)arg2 + 4);
005cec6a                  *(uint32_t*)arg2 = ecx_44;
005cec70                  this->treasure_type = *(uint32_t*)ecx_44;
005cec7d                  *(uint32_t*)arg2 += 4;
005cec8a                  return Emote::IsValid(this);
005cec4e                  break;
005cec4e              }
005cf097              case 0x3f:
005cf097              {
005cf09c                  if (arg3 >= (this->mPosition.vtable->Pack(&var_10, 0) + 0xc))
005cf09c                  {
005cf0a2                      ecx_38 = &this->mPosition;
005cebf2                  label_5cebf2:
005cebf2                      eax_9 = ecx_38->vtable->UnPack(arg2, arg3);
005cebf2                      goto label_5cebf5;
005cf09c                  }
005cf097                  break;
005cf097              }
005cec1a              case 0x4c:
005cec1a              {
005cec1a                  int32_t eax_52 = (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0xc);
005cec1a                  
005cec23                  if ((arg3 >= eax_52 && AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3) != 0))
005cec23                  {
005cec46                      eax_49 = (this->cprof.vtable->Pack(&var_10, 0) + eax_52);
005cec4a                      goto label_5cebe7;
005cec23                  }
005cec1a                  break;
005cec1a              }
005cf0c3              case 0x63:
005cf0c3              case 0x64:
005cf0c3              {
005cf0c8                  if ((arg3 >= (this->mPosition.vtable->Pack(&var_10, 0) + 0xc) && this->mPosition.vtable->UnPack(arg2, arg3) != 0))
005cf0f4                      return Emote::IsValid(this);
005cf0c3                  break;
005cf0c3              }
005ced66              case 0x6e:
005ced66              {
005ced66                  if (arg3 >= 0x10)
005ced66                  {
005ced6e                      this->stat = *(uint32_t*)eax_6;
005ced78                      *(uint32_t*)arg2 += 4;
005ced85                      return Emote::IsValid(this);
005ced66                  }
005ced66                  break;
005ced66              }
005ced8b              case 0x6f:
005ced8b              {
005ced8b                  if (arg3 >= 0x10)
005ced8b                  {
005ced93                      this->amount = *(uint32_t*)eax_6;
005ced9d                      *(uint32_t*)arg2 += 4;
005cedaa                      return Emote::IsValid(this);
005ced8b                  }
005ced8b                  break;
005ced8b              }
005ceb88              case 0x70:
005ceb88              case 0x71:
005ceb88              {
005ceb88                  if (arg3 >= 0x14)
005ceb88                      goto label_5cea92;
005ceb88                  break;
005ceb88              }
005cef02              case 0x72:
005cef02              {
005cef07                  if ((arg3 >= (AC1Legacy::PStringBase<char>::Pack(&this->msg, &var_10, 0) + 0xc) && AC1Legacy::PStringBase<char>::UnPack(&this->msg, arg2, arg3) != 0))
005cef07                  {
005cef22                      void* eax_112 = *(uint32_t*)arg2;
005cef26                      this->min64 = *(uint32_t*)eax_112;
005cef2c                      *(uint32_t*)((char*)this->min64)[4] = *(uint32_t*)((char*)eax_112 + 4);
005cef31                      void* edx_25 = (*(uint32_t*)arg2 + 8);
005cef34                      *(uint32_t*)arg2 = edx_25;
005cef3a                      this->max64 = *(uint32_t*)edx_25;
005cef40                      *(uint32_t*)((char*)this->max64)[4] = *(uint32_t*)((char*)edx_25 + 4);
005cef45                      void* ecx_81 = (*(uint32_t*)arg2 + 8);
005cef48                      *(uint32_t*)arg2 = ecx_81;
005cef4e                      this->stat = *(uint32_t*)ecx_81;
005cef58                      *(uint32_t*)arg2 += 4;
005cef65                      return Emote::IsValid(this);
005cef07                  }
005cef02                  break;
005cef02              }
005cea84              case 0x73:
005cea84              {
005cea84                  this->stat = *(uint32_t*)eax_6;
005cea89                  void* ecx_16 = (*(uint32_t*)arg2 + 4);
005cea8c                  *(uint32_t*)arg2 = ecx_16;
005cea8e                  eax_6 = ecx_16;
005cea92              label_5cea92:
005cea92                  this->amount64 = *(uint32_t*)eax_6;
005cea98                  *(uint32_t*)((char*)this->amount64)[4] = *(uint32_t*)((char*)eax_6 + 4);
005ceaa2                  *(uint32_t*)arg2 += 8;
005ceaaf                  return Emote::IsValid(this);
005cea84                  break;
005cea84              }
005ceab4              case 0x76:
005ceab4              {
005ceab4                  this->stat = *(uint32_t*)eax_6;
005ceab9                  void* ecx_20 = (*(uint32_t*)arg2 + 4);
005ceabc                  *(uint32_t*)arg2 = ecx_20;
005ceac2                  this->percent = *(uint32_t*)ecx_20;
005ceacb                  *(uint32_t*)((char*)this->percent)[4] = *(uint32_t*)((char*)ecx_20 + 4);
005cead8                  *(uint32_t*)arg2 += 8;
005ceae5                  return Emote::IsValid(this);
005ceab4                  break;
005ceab4              }
005ce9d2          }
005ce98c      }
005ce98c      
005cec05      return 0;
005ce970  }

005cf0f7                                                                       90                                                 .
005cf0f8  uint32_t jump_table_5cf0f8[0x1f] = 
005cf0f8  {
005cf0f8      [0x00] =  0x005cf0e7
005cf0fc      [0x01] =  0x005ce9d9
005cf100      [0x02] =  0x005ceb46
005cf104      [0x03] =  0x005cebd4
005cf108      [0x04] =  0x005cecb2
005cf10c      [0x05] =  0x005cec8d
005cf110      [0x06] =  0x005cece6
005cf114      [0x07] =  0x005ced0b
005cf118      [0x08] =  0x005cebb0
005cf11c      [0x09] =  0x005ced30
005cf120      [0x0a] =  0x005ceae8
005cf124      [0x0b] =  0x005cea08
005cf128      [0x0c] =  0x005ceb8f
005cf12c      [0x0d] =  0x005cedad
005cf130      [0x0e] =  0x005cee84
005cf134      [0x0f] =  0x005cef68
005cf138      [0x10] =  0x005cedfd
005cf13c      [0x11] =  0x005cefe0
005cf140      [0x12] =  0x005cf020
005cf144      [0x13] =  0x005cea58
005cf148      [0x14] =  0x005cec4c
005cf14c      [0x15] =  0x005cf081
005cf150      [0x16] =  0x005cec08
005cf154      [0x17] =  0x005cf0ad
005cf158      [0x18] =  0x005ced63
005cf15c      [0x19] =  0x005ced88
005cf160      [0x1a] =  0x005ceb85
005cf164      [0x1b] =  0x005ceef0
005cf168      [0x1c] =  0x005cea82
005cf16c      [0x1d] =  0x005ceab2
005cf170      [0x1e] =  0x005cebfd
005cf174  }
005cf174  uint8_t lookup_table_5cf174[0x7a] = 
005cf174  {
005cf174      [0x00] =  0x00
005cf175      [0x01] =  0x01
005cf176      [0x02] =  0x02
005cf177      [0x03] =  0x03
005cf178      [0x04] =  0x04
005cf179      [0x05] =  0x05
005cf17a      [0x06] =  0x04
005cf17b      [0x07] =  0x06
005cf17c      [0x08] =  0x01
005cf17d      [0x09] =  0x07
005cf17e      [0x0a] =  0x01
005cf17f      [0x0b] =  0x04
005cf180      [0x0c] =  0x00
005cf181      [0x0d] =  0x01
005cf182      [0x0e] =  0x08
005cf183      [0x0f] =  0x00
005cf184      [0x10] =  0x01
005cf185      [0x11] =  0x01
005cf186      [0x12] =  0x01
005cf187      [0x13] =  0x08
005cf188      [0x14] =  0x01
005cf189      [0x15] =  0x01
005cf18a      [0x16] =  0x01
005cf18b      [0x17] =  0x01
005cf18c      [0x18] =  0x01
005cf18d      [0x19] =  0x01
005cf18e      [0x1a] =  0x01
005cf18f      [0x1b] =  0x08
005cf190      [0x1c] =  0x09
005cf191      [0x1d] =  0x09
005cf192      [0x1e] =  0x0a
005cf193      [0x1f] =  0x01
005cf194      [0x20] =  0x0b
005cf195      [0x21] =  0x0b
005cf196      [0x22] =  0x0c
005cf197      [0x23] =  0x0d
005cf198      [0x24] =  0x0e
005cf199      [0x25] =  0x0f
005cf19a      [0x26] =  0x10
005cf19b      [0x27] =  0x0e
005cf19c      [0x28] =  0x0e
005cf19d      [0x29] =  0x0e
005cf19e      [0x2a] =  0x0e
005cf19f      [0x2b] =  0x0e
005cf1a0      [0x2c] =  0x0e
005cf1a1      [0x2d] =  0x0d
005cf1a2      [0x2e] =  0x0d
005cf1a3      [0x2f] =  0x0c
005cf1a4      [0x30] =  0x0c
005cf1a5      [0x31] =  0x11
005cf1a6      [0x32] =  0x12
005cf1a7      [0x33] =  0x01
005cf1a8      [0x34] =  0x05
005cf1a9      [0x35] =  0x13
005cf1aa      [0x36] =  0x13
005cf1ab      [0x37] =  0x13
005cf1ac      [0x38] =  0x14
005cf1ad      [0x39] =  0x00
005cf1ae      [0x3a] =  0x01
005cf1af      [0x3b] =  0x0a
005cf1b0      [0x3c] =  0x01
005cf1b1      [0x3d] =  0x01
005cf1b2      [0x3e] =  0x02
005cf1b3      [0x3f] =  0x15
005cf1b4      [0x40] =  0x01
005cf1b5      [0x41] =  0x01
005cf1b6      [0x42] =  0x00
005cf1b7      [0x43] =  0x01
005cf1b8      [0x44] =  0x01
005cf1b9      [0x45] =  0x13
005cf1ba      [0x46] =  0x0b
005cf1bb      [0x47] =  0x0a
005cf1bc      [0x48] =  0x00
005cf1bd      [0x49] =  0x08
005cf1be      [0x4a] =  0x03
005cf1bf      [0x4b] =  0x10
005cf1c0      [0x4c] =  0x16
005cf1c1      [0x4d] =  0x00
005cf1c2      [0x4e] =  0x00
005cf1c3      [0x4f] =  0x01
005cf1c4      [0x50] =  0x01
005cf1c5      [0x51] =  0x01
005cf1c6      [0x52] =  0x0a
005cf1c7      [0x53] =  0x01
005cf1c8      [0x54] =  0x0b
005cf1c9      [0x55] =  0x0b
005cf1ca      [0x56] =  0x0b
005cf1cb      [0x57] =  0x04
005cf1cc      [0x58] =  0x01
005cf1cd      [0x59] =  0x0b
005cf1ce      [0x5a] =  0x0c
005cf1cf      [0x5b] =  0x1e
005cf1d0      [0x5c] =  0x1e
005cf1d1      [0x5d] =  0x1e
005cf1d2      [0x5e] =  0x1e
005cf1d3      [0x5f] =  0x1e
005cf1d4      [0x60] =  0x1e
005cf1d5      [0x61] =  0x1e
005cf1d6      [0x62] =  0x1e
005cf1d7      [0x63] =  0x17
005cf1d8      [0x64] =  0x17
005cf1d9      [0x65] =  0x00
005cf1da      [0x66] =  0x0b
005cf1db      [0x67] =  0x0b
005cf1dc      [0x68] =  0x0b
005cf1dd      [0x69] =  0x0b
005cf1de      [0x6a] =  0x0b
005cf1df      [0x6b] =  0x0b
005cf1e0      [0x6c] =  0x0b
005cf1e1      [0x6d] =  0x0b
005cf1e2      [0x6e] =  0x18
005cf1e3      [0x6f] =  0x19
005cf1e4      [0x70] =  0x1a
005cf1e5      [0x71] =  0x1a
005cf1e6      [0x72] =  0x1b
005cf1e7      [0x73] =  0x1c
005cf1e8      [0x74] =  0x00
005cf1e9      [0x75] =  0x00
005cf1ea      [0x76] =  0x1d
005cf1eb      [0x77] =  0x0c
005cf1ec      [0x78] =  0x0c
005cf1ed      [0x79] =  0x01
005cf1ee  }

005cf1ee                                            90 90                                                                ..

005cf1f0  uint32_t __fastcall ChannelSystem::GetChannelID(class AC1Legacy::PStringBase<char> const* arg1)

005cf1f0  {
005cf1f0      int32_t* ecx;
005cf1f0      int32_t* var_4 = ecx;
005cf1f2      class AC1Legacy::PStringBase<char>* esi = arg1;
005cf1f2      
005cf1fc      if (esi->m_buffer->m_len == 1)
005cf202          return 0;
005cf202      
005cf203      int32_t ebx;
005cf203      int32_t var_c = ebx;
005cf20f      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "allegiance");
005cf20f      
005cf22f      if (_stricmp(&esi->m_buffer->m_data, &arg1[5]) == 0)
005cf2c5          ebx = 1;
005cf22f      else
005cf22f      {
005cf23e          AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &*U"fvpca"[4]);
005cf243          int32_t* ebp_1 = var_4;
005cf251          int32_t eax_7 = _stricmp(&esi->m_buffer->m_data, &ebp_1[5]);
005cf258          ebx = -(eax_7);
005cf25d          ebx = (ebx - ebx);
005cf260          ebx += 1;
005cf260          
005cf26e          if ((InterlockedDecrement(&ebp_1[1]) == 0 && ebp_1 != 0))
005cf277              **(uint32_t**)ebp_1(1);
005cf277          
005cf27b          if (ebx != 0)
005cf2c5              ebx = 1;
005cf27b          else
005cf27b          {
005cf286              AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_7e1904);
005cf28b              int32_t* ebp_2 = var_4;
005cf299              int32_t eax_12 = _stricmp(&esi->m_buffer->m_data, &ebp_2[5]);
005cf2a0              ebx = -(eax_12);
005cf2a5              ebx = (ebx - ebx);
005cf2a8              ebx += 1;
005cf2a8              
005cf2b6              if ((InterlockedDecrement(&ebp_2[1]) == 0 && ebp_2 != 0))
005cf2bf                  **(uint32_t**)ebp_2(1);
005cf2bf              
005cf2c3              if (ebx != 0)
005cf2c5                  ebx = 1;
005cf27b          }
005cf22f      }
005cf22f      
005cf2c7      class AC1Legacy::PStringBase<char>* ebp_3 = arg1;
005cf2c7      
005cf2db      if ((InterlockedDecrement(&ebp_3[1]) == 0 && ebp_3 != 0))
005cf2dd          ebp_3->m_buffer->vtable(1);
005cf2dd      
005cf2e8      if (ebx != 0)
005cf2f4          return 0x2000000;
005cf2f4      
005cf2fe      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "co-vassals");
005cf2fe      
005cf318      if (_stricmp(&esi->m_buffer->m_data, &var_4[5]) == 0)
005cf3ca          ebx = 1;
005cf318      else
005cf318      {
005cf327          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "covassals");
005cf32c          class AC1Legacy::PStringBase<char>* ebp_4 = arg1;
005cf33a          int32_t eax_22 = _stricmp(&esi->m_buffer->m_data, &ebp_4[5]);
005cf341          ebx = -(eax_22);
005cf346          ebx = (ebx - ebx);
005cf349          ebx += 1;
005cf349          
005cf357          if ((InterlockedDecrement(&ebp_4[1]) == 0 && ebp_4 != 0))
005cf359              ebp_4->m_buffer->vtable(1);
005cf359          
005cf364          if (ebx != 0)
005cf3ca              ebx = 1;
005cf364          else
005cf364          {
005cf36f              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "covassal");
005cf382              int32_t eax_27 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf38d              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf38d              
005cf394              if (eax_27 == 0)
005cf3ca                  ebx = 1;
005cf394              else
005cf394              {
005cf39f                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &*U"fvpca"[3]);
005cf3b2                  int32_t eax_30 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf3bd                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf3bd                  
005cf3c4                  if (eax_30 == 0)
005cf3ca                      ebx = 1;
005cf3c4                  else
005cf3c6                      ebx = 0;
005cf394              }
005cf364          }
005cf318      }
005cf318      
005cf3cc      int32_t* ebp_5 = var_4;
005cf3cc      
005cf3e0      if ((InterlockedDecrement(&ebp_5[1]) == 0 && ebp_5 != 0))
005cf3e9          **(uint32_t**)ebp_5(1);
005cf3e9      
005cf3ed      if (ebx != 0)
005cf3f9          return 0x1000000;
005cf3f9      
005cf403      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "monarch");
005cf408      class AC1Legacy::PStringBase<char>* ebp_6 = arg1;
005cf416      int32_t eax_36 = _stricmp(&esi->m_buffer->m_data, &ebp_6[5]);
005cf41d      int32_t eax_39;
005cf41d      
005cf41d      if (eax_36 != 0)
005cf41d      {
005cf428          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, U"mh,.");
005cf43b          eax_39 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf446          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf41d      }
005cf41d      
005cf44d      if ((eax_36 == 0 || eax_39 == 0))
005cf453          ebx = 1;
005cf44d      else
005cf44f          ebx = 0;
005cf44f      
005cf465      if ((InterlockedDecrement(&ebp_6[1]) == 0 && ebp_6 != 0))
005cf467          ebp_6->m_buffer->vtable(1);
005cf467      
005cf472      if (ebx != 0)
005cf47e          return 0x4000;
005cf47e      
005cf488      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "patron");
005cf49b      int32_t eax_45 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cf4a2      int32_t eax_48;
005cf4a2      
005cf4a2      if (eax_45 != 0)
005cf4a2      {
005cf4ad          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &*U"fvpca"[2]);
005cf4c0          eax_48 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf4cb          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf4a2      }
005cf4a2      
005cf4d2      if ((eax_45 == 0 || eax_48 == 0))
005cf4d8          ebx = 1;
005cf4d2      else
005cf4d4          ebx = 0;
005cf4d4      
005cf4de      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cf4de      
005cf4e5      if (ebx != 0)
005cf4f1          return 0x2000;
005cf4f1      
005cf4fb      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "vassals");
005cf4fb      
005cf515      if (_stricmp(&esi->m_buffer->m_data, &var_4[5]) == 0)
005cf57b          ebx = 1;
005cf515      else
005cf515      {
005cf520          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "vassal");
005cf533          int32_t eax_55 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf53e          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf53e          
005cf545          if (eax_55 == 0)
005cf57b              ebx = 1;
005cf545          else
005cf545          {
005cf550              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &*U"fvpca"[1]);
005cf563              int32_t eax_58 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf56e              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf56e              
005cf575              if (eax_58 == 0)
005cf57b                  ebx = 1;
005cf575              else
005cf577                  ebx = 0;
005cf545          }
005cf515      }
005cf515      
005cf581      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cf581      
005cf588      if (ebx != 0)
005cf594          return 0x1000;
005cf594      
005cf59e      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "fellowship");
005cf59e      
005cf5b8      if (_stricmp(&esi->m_buffer->m_data, &var_4[5]) == 0)
005cf6ee          ebx = 1;
005cf5b8      else
005cf5b8      {
005cf5c7          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "fellows");
005cf5da          int32_t eax_65 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf5e5          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf5e5          
005cf5ec          if (eax_65 == 0)
005cf6ee              ebx = 1;
005cf5ec          else
005cf5ec          {
005cf5fb              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "fellow");
005cf60e              int32_t eax_68 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf619              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf619              
005cf620              if (eax_68 == 0)
005cf6ee                  ebx = 1;
005cf620              else
005cf620              {
005cf62f                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, U"fvpca");
005cf642                  int32_t eax_71 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf64d                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf64d                  
005cf654                  if (eax_71 == 0)
005cf6ee                      ebx = 1;
005cf654                  else
005cf654                  {
005cf663                      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "group");
005cf676                      int32_t eax_74 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf681                      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf681                      
005cf688                      if (eax_74 == 0)
005cf6ee                          ebx = 1;
005cf688                      else
005cf688                      {
005cf693                          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_7e189c);
005cf6a6                          int32_t eax_77 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf6b1                          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf6b1                          
005cf6b8                          if (eax_77 == 0)
005cf6ee                              ebx = 1;
005cf6b8                          else
005cf6b8                          {
005cf6c3                              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "party");
005cf6d6                              int32_t eax_80 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf6e1                              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf6e1                              
005cf6e8                              if (eax_80 == 0)
005cf6ee                                  ebx = 1;
005cf6e8                              else
005cf6ea                                  ebx = 0;
005cf6b8                          }
005cf688                      }
005cf654                  }
005cf620              }
005cf5ec          }
005cf5b8      }
005cf5b8      
005cf6f4      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cf6f4      
005cf6fb      if (ebx != 0)
005cf707          return 0x800;
005cf707      
005cf711      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_7e8520);
005cf711      
005cf72b      if (_stricmp(&esi->m_buffer->m_data, &var_4[5]) == 0)
005cf7c5          ebx = 1;
005cf72b      else
005cf72b      {
005cf73a          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_7e851c);
005cf74d          int32_t eax_87 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf758          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf758          
005cf75f          if (eax_87 == 0)
005cf7c5              ebx = 1;
005cf75f          else
005cf75f          {
005cf76a              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "advocate");
005cf77d              int32_t eax_90 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf788              AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf788              
005cf78f              if (eax_90 == 0)
005cf7c5                  ebx = 1;
005cf78f              else
005cf78f              {
005cf79a                  AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "advocate1");
005cf7ad                  int32_t eax_93 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf7b8                  AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf7b8                  
005cf7bf                  if (eax_93 == 0)
005cf7c5                      ebx = 1;
005cf7bf                  else
005cf7c1                      ebx = 0;
005cf78f              }
005cf75f          }
005cf72b      }
005cf72b      
005cf7cb      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cf7cb      
005cf7d2      if (ebx != 0)
005cf7de          return 8;
005cf7de      
005cf7e8      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_7e8500);
005cf7fb      int32_t eax_97 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cf802      int32_t eax_100;
005cf802      
005cf802      if (eax_97 != 0)
005cf802      {
005cf80d          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "advocate2");
005cf820          eax_100 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf82b          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf802      }
005cf802      
005cf832      if ((eax_97 == 0 || eax_100 == 0))
005cf838          ebx = 1;
005cf832      else
005cf834          ebx = 0;
005cf834      
005cf83e      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cf83e      
005cf845      if (ebx != 0)
005cf851          return 0x10;
005cf851      
005cf85b      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_7e84f0);
005cf86e      int32_t eax_104 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cf875      int32_t eax_107;
005cf875      
005cf875      if (eax_104 != 0)
005cf875      {
005cf880          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "advocate3");
005cf893          eax_107 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf89e          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf875      }
005cf875      
005cf8a5      if ((eax_104 == 0 || eax_107 == 0))
005cf8ab          ebx = 1;
005cf8a5      else
005cf8a7          ebx = 0;
005cf8a7      
005cf8b1      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cf8b1      
005cf8b8      if (ebx != 0)
005cf8c4          return 0x20;
005cf8c4      
005cf8ce      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "abuse");
005cf8e1      int32_t eax_111 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf8ec      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf8ec      
005cf8f3      if (eax_111 == 0)
005cf8ff          return 1;
005cf8ff      
005cf909      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_7e84d8);
005cf91c      int32_t eax_115 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cf923      int32_t eax_118;
005cf923      
005cf923      if (eax_115 != 0)
005cf923      {
005cf92e          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "admin");
005cf941          eax_118 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf94c          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf923      }
005cf923      
005cf953      int32_t ebx_13;
005cf953      
005cf953      if ((eax_115 == 0 || eax_118 == 0))
005cf959          ebx_13 = 1;
005cf953      else
005cf955          ebx_13 = 0;
005cf955      
005cf95f      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cf95f      
005cf966      if (ebx_13 != 0)
005cf972          return 2;
005cf972      
005cf97c      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, &data_7e84cc);
005cf98f      int32_t eax_122 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cf996      int32_t eax_125;
005cf996      
005cf996      if (eax_122 != 0)
005cf996      {
005cf9a1          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "audit");
005cf9b4          eax_125 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cf9bf          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cf996      }
005cf996      
005cf9c6      if ((eax_122 == 0 || eax_125 == 0))
005cf9cc          ebx_13 = 1;
005cf9c6      else
005cf9c8          ebx_13 = 0;
005cf9c8      
005cf9d2      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cf9d2      
005cf9d9      if (ebx_13 != 0)
005cf9e5          return 4;
005cf9e5      
005cf9ef      AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "help");
005cfa02      int32_t eax_129 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cfa0d      AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cfa0d      
005cfa14      if (eax_129 == 0)
005cfa20          return 0x400;
005cfa20      
005cfa2a      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "sent");
005cfa3d      int32_t eax_133 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cfa44      int32_t eax_136;
005cfa44      
005cfa44      if (eax_133 != 0)
005cfa44      {
005cfa4f          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "sentinel");
005cfa62          eax_136 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cfa6d          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cfa44      }
005cfa44      
005cfa74      int32_t ebx_17;
005cfa74      
005cfa74      if ((eax_133 == 0 || eax_136 == 0))
005cfa7a          ebx_17 = 1;
005cfa74      else
005cfa76          ebx_17 = 0;
005cfa76      
005cfa80      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cfa80      
005cfa87      if (ebx_17 != 0)
005cfa93          return 0x200;
005cfa93      
005cfa9d      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "celestialhand");
005cfab0      int32_t eax_140 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cfab7      int32_t eax_143;
005cfab7      
005cfab7      if (eax_140 != 0)
005cfab7      {
005cfac2          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "celhan");
005cfad5          eax_143 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cfae0          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cfab7      }
005cfab7      
005cfae7      if ((eax_140 == 0 || eax_143 == 0))
005cfaed          ebx_17 = 1;
005cfae7      else
005cfae9          ebx_17 = 0;
005cfae9      
005cfaf3      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cfaf3      
005cfafa      if (ebx_17 != 0)
005cfb06          return 0x8000000;
005cfb06      
005cfb10      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "eldrytchweb");
005cfb23      int32_t eax_147 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cfb2a      int32_t eax_150;
005cfb2a      
005cfb2a      if (eax_147 != 0)
005cfb2a      {
005cfb35          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "eldweb");
005cfb48          eax_150 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cfb53          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cfb2a      }
005cfb2a      
005cfb5a      if ((eax_147 == 0 || eax_150 == 0))
005cfb60          ebx_17 = 1;
005cfb5a      else
005cfb5c          ebx_17 = 0;
005cfb5c      
005cfb66      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cfb66      
005cfb6d      if (ebx_17 != 0)
005cfb79          return 0x10000000;
005cfb79      
005cfb83      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "radiantblood");
005cfb96      int32_t eax_154 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cfb9d      int32_t eax_157;
005cfb9d      
005cfb9d      if (eax_154 != 0)
005cfb9d      {
005cfba8          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, "radblo");
005cfbbb          eax_157 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cfbc6          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cfb9d      }
005cfb9d      
005cfbcd      if ((eax_154 == 0 || eax_157 == 0))
005cfbd3          ebx_17 = 1;
005cfbcd      else
005cfbcf          ebx_17 = 0;
005cfbcf      
005cfbd9      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cfbd9      
005cfbe0      if (ebx_17 != 0)
005cfbec          return 0x20000000;
005cfbec      
005cfbf6      AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "olthoi");
005cfc09      int32_t eax_161 = _stricmp(&esi->m_buffer->m_data, &var_4[5]);
005cfc10      int32_t eax_162;
005cfc10      
005cfc10      if (eax_161 != 0)
005cfc10      {
005cfc1b          AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &data_7e8468);
005cfc2e          eax_162 = _stricmp(&esi->m_buffer->m_data, &arg1[5]);
005cfc39          AC1Legacy::PStringBase<char>::~PStringBase<char>(&arg1);
005cfc10      }
005cfc10      
005cfc40      if ((eax_161 == 0 || eax_162 == 0))
005cfc46          ebx_17 = 1;
005cfc40      else
005cfc42          ebx_17 = 0;
005cfc42      
005cfc4c      AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
005cfc51      char temp3 = ebx_17;
005cfc51      ebx_17 = -(ebx_17);
005cfc62      return ((ebx_17 - ebx_17) & 0x40000000);
005cf1f0  }

005cfc63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005cfc70  int32_t ChannelSystem::GetGlobalChannelName(enum ChatTypeEnum arg1, class AC1Legacy::PStringBase<unsigned short>* arg2)

005cfc70  {
005cfc78      if ((arg1 - 1) > 9)
005cfd4f          return 0;
005cfd4f      
005cfc7e      switch (arg1)
005cfc7e      {
005cfc8e          case Allegiance_ChatTypeEnum:
005cfc8e          {
005cfc8e              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::Allegiance_GlobalChannelName);
005cfc98              return 1;
005cfc8e              break;
005cfc8e          }
005cfca2          case General_ChatTypeEnum:
005cfca2          {
005cfca2              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::General_GlobalChannelName);
005cfcac              return 1;
005cfca2              break;
005cfca2          }
005cfcb6          case Trade_ChatTypeEnum:
005cfcb6          {
005cfcb6              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::Trade_GlobalChannelName);
005cfcc0              return 1;
005cfcb6              break;
005cfcb6          }
005cfcca          case LFG_ChatTypeEnum:
005cfcca          {
005cfcca              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::LFG_GlobalChannelName);
005cfcd4              return 1;
005cfcca              break;
005cfcca          }
005cfcde          case Roleplay_ChatTypeEnum:
005cfcde          {
005cfcde              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::Roleplay_GlobalChannelName);
005cfce8              return 1;
005cfcde              break;
005cfcde          }
005cfcf2          case Society_ChatTypeEnum:
005cfcf2          {
005cfcf2              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::Society_GlobalChannelName);
005cfcfc              return 1;
005cfcf2              break;
005cfcf2          }
005cfd06          case SocietyCelHan_ChatTypeEnum:
005cfd06          {
005cfd06              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::SocietyCelHan_GlobalChannelName);
005cfd10              return 1;
005cfd06              break;
005cfd06          }
005cfd1a          case SocietyEldWeb_ChatTypeEnum:
005cfd1a          {
005cfd1a              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::SocietyEldWeb_GlobalChannelName);
005cfd24              return 1;
005cfd1a              break;
005cfd1a          }
005cfd2e          case SocietyRadBlo_ChatTypeEnum:
005cfd2e          {
005cfd2e              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::SocietyRadBlo_GlobalChannelName);
005cfd38              return 1;
005cfd2e              break;
005cfd2e          }
005cfd42          case Olthoi_ChatTypeEnum:
005cfd42          {
005cfd42              AC1Legacy::PStringBase<char>::operator=(arg2, &ChannelSystem::Olthoi_GlobalChannelName);
005cfd4c              return 1;
005cfd42              break;
005cfd42          }
005cfc7e      }
005cfc70  }

005cfd50  uint32_t jump_table_5cfd50[0xa] = 
005cfd50  {
005cfd50      [0x0] =  0x005cfc85
005cfd54      [0x1] =  0x005cfc99
005cfd58      [0x2] =  0x005cfcad
005cfd5c      [0x3] =  0x005cfcc1
005cfd60      [0x4] =  0x005cfcd5
005cfd64      [0x5] =  0x005cfce9
005cfd68      [0x6] =  0x005cfcfd
005cfd6c      [0x7] =  0x005cfd11
005cfd70      [0x8] =  0x005cfd25
005cfd74      [0x9] =  0x005cfd39
005cfd78  }

005cfd78                                                                          90 90 90 90 90 90 90 90                          ........

005cfd80  int32_t ChannelSystem::GetChannelName(uint32_t const arg1, class AC1Legacy::PStringBase<char>* arg2)

005cfd80  {
005cfd8f      if (arg1 == 0x1000)
005cfd8f      {
005cfe8e          AC1Legacy::PStringBase<char>::set(arg2, "Vassals");
005cfe98          return 1;
005cfd8f      }
005cfd8f      
005cfd98      if (arg1 <= 0x10)
005cfd98      {
005cfd9a          if (arg1 == 0x10)
005cfd9a          {
005cfe06              AC1Legacy::PStringBase<char>::set(arg2, "Advocate 2");
005cfe10              return 1;
005cfd9a          }
005cfd9a          
005cfda0          if ((arg1 - 1) <= 7)
005cfe24              switch (arg1)
005cfe24              {
005cfdb6                  case 1:
005cfdb6                  {
005cfdb6                      AC1Legacy::PStringBase<char>::set(arg2, "Abuse");
005cfdc0                      return 1;
005cfdb6                      break;
005cfdb6                  }
005cfdde                  case 2:
005cfdde                  {
005cfdde                      AC1Legacy::PStringBase<char>::set(arg2, "Admin");
005cfde8                      return 1;
005cfdde                      break;
005cfdde                  }
005cfdca                  case 4:
005cfdca                  {
005cfdca                      AC1Legacy::PStringBase<char>::set(arg2, "Audit");
005cfdd4                      return 1;
005cfdca                      break;
005cfdca                  }
005cfdf2                  case 8:
005cfdf2                  {
005cfdf2                      AC1Legacy::PStringBase<char>::set(arg2, "Advocate 1");
005cfdfc                      return 1;
005cfdf2                      break;
005cfdf2                  }
005cfe24              }
005cfd98      }
005cfd98      else
005cfd98      {
005cfe18          if (arg1 == 0x400)
005cfe18          {
005cfe5b              AC1Legacy::PStringBase<char>::set(arg2, "Help");
005cfe65              return 1;
005cfe18          }
005cfe18          
005cfe1d          if (arg1 == 0x20)
005cfe1d          {
005cfe47              AC1Legacy::PStringBase<char>::set(arg2, "Advocate 3");
005cfe51              return 1;
005cfe1d          }
005cfe1d          
005cfe24          if (arg1 == 0x200)
005cfe24          {
005cfe33              AC1Legacy::PStringBase<char>::set(arg2, "Sentinel");
005cfe3d              return 1;
005cfe24          }
005cfe24          
005cfe6b          if (arg1 == 0x800)
005cfe6b          {
005cfe7a              AC1Legacy::PStringBase<char>::set(arg2, "Fellowship");
005cfe84              return 1;
005cfe6b          }
005cfd98      }
005cfd98      
005cfea4      switch (arg1)
005cfea4      {
005cfeaf          case 0x2000:
005cfeaf          {
005cfede              AC1Legacy::PStringBase<char>::set(arg2, "Patron");
005cfee8              return 1;
005cfeaf              break;
005cfeaf          }
005cfeb6          case 0x4000:
005cfeb6          {
005cfeca              AC1Legacy::PStringBase<char>::set(arg2, "Monarch");
005cfed4              return 1;
005cfeb6              break;
005cfeb6          }
005cfea6          case 0x1000000:
005cfea6          {
005cfef2              AC1Legacy::PStringBase<char>::set(arg2, "Co-vassals");
005cfefc              return 1;
005cfea6              break;
005cfea6          }
005cfefd          case 0x2000000:
005cfefd          {
005cff11              AC1Legacy::PStringBase<char>::set(arg2, &ClientCommunicationSystem::`vftable'.RecvNotice_FellowQuit);
005cff1b              return 1;
005cfefd              break;
005cfefd          }
005cfe99          case 0x4000000:
005cfe99          {
005cff25              AC1Legacy::PStringBase<char>::set(arg2, "FellowBroadcast");
005cff2f              return 1;
005cfe99              break;
005cfe99          }
005cff39          case 0x8000000:
005cff39          {
005cff64              AC1Legacy::PStringBase<char>::set(arg2, "Celestial Hand");
005cff6e              return 1;
005cff39              break;
005cff39          }
005cff40          case 0x10000000:
005cff40          {
005cff50              AC1Legacy::PStringBase<char>::set(arg2, "Eldrytch Web");
005cff5a              return 1;
005cff40              break;
005cff40          }
005cff30          case 0x20000000:
005cff30          {
005cff78              AC1Legacy::PStringBase<char>::set(arg2, "Radiant Blood");
005cff82              return 1;
005cff30              break;
005cff30          }
005cff83          case 0x40000000:
005cff83          {
005cff96              AC1Legacy::PStringBase<char>::set(arg2, "Olthoi");
005cffa0              return 1;
005cff83              break;
005cff83          }
005cfea4      }
005cfea4      
005cff8c      return 0;
005cfd80  }

005cffa1     8d 49 00                                                                                       .I.
005cffa4  uint32_t jump_table_5cffa4[0x8] = 
005cffa4  {
005cffa4      [0x0] =  0x005cfdad
005cffa8      [0x1] =  0x005cfdd5
005cffac      [0x2] =  0x005cff8a
005cffb0      [0x3] =  0x005cfdc1
005cffb4      [0x4] =  0x005cff8a
005cffb8      [0x5] =  0x005cff8a
005cffbc      [0x6] =  0x005cff8a
005cffc0      [0x7] =  0x005cfde9
005cffc4  }

005cffc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005cffd0  int32_t ChannelSystem::GetGlobalChannelName(enum ChatTypeEnum arg1, class AC1Legacy::PStringBase<char>* arg2)

005cffd0  {
005cffd3      class AC1Legacy::PSRefBuffer<unsigned short>* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer;
005cffe1      class AC1Legacy::PSRefBuffer<unsigned short>* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1;
005cffea      InterlockedIncrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_1->m_cRef);
005cfff6      int32_t result = ChannelSystem::GetGlobalChannelName(arg1, &AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2);
005d000d      class AC1Legacy::PStringBase<char> __return;
005d000d      AC1Legacy::PStringBase<unsigned short>::to_spstring(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2, &__return, 0);
005d0016      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
005d0019      class AC1Legacy::PStringBase<char> __return_1 = __return;
005d0019      
005d001f      if (m_buffer != __return_1)
005d001f      {
005d0031          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005d0033              m_buffer->vtable->__vecDelDtor(1);
005d0033          
005d003f          arg2->m_buffer = __return_1;
005d0042          InterlockedIncrement((__return_1 + 4));
005d001f      }
005d001f      
005d0056      if ((InterlockedDecrement((__return_1 + 4)) == 0 && __return_1 != 0))
005d005e          **(uint32_t**)__return_1(1);
005d005e      
005d0060      class AC1Legacy::PSRefBuffer<unsigned short>* AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3 = AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_2;
005d0060      
005d0070      if ((InterlockedDecrement(&AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3 != 0))
005d0072          AC1Legacy::PStringBase<unsigned short>::s_NullBuffer_3->vtable->__vecDelDtor(1);
005d0072      
005d0085      return result;
005cffd0  }

005d0086                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005d0090  void __thiscall PackableLLNode<GeneratorProfile>::PackableLLNode<GeneratorProfile>(class PackableLLNode<GeneratorProfile>* this, class GeneratorProfile const* arg2)

005d0090  {
005d0093      this->data.vtable = 0x7e86ac;
005d009c      this->data.pos_val.vtable = 0x796910;
005d00a6      this->data.pos_val.objcell_id = 0;
005d0099      this->data.pos_val.frame.qw = 0x3f800000;
005d0099      this->data.pos_val.frame.qx = 0f;
005d0099      this->data.pos_val.frame.qy = 0f;
005d0099      this->data.pos_val.frame.qz = 0f;
005d0099      this->data.pos_val.frame.m_fOrigin.x = 0;
005d0099      this->data.pos_val.frame.m_fOrigin.y = 0f;
005d0099      this->data.pos_val.frame.m_fOrigin.z = 0f;
005d00c1      Frame::cache(&this->data.pos_val.frame);
005d00cd      GeneratorProfile::operator=(this, arg2);
005d00d2      this->next = nullptr;
005d00d8      this->prev = nullptr;
005d0090  }

005d00e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005d00f0  void* __thiscall GeneratorProfile::`scalar deleting destructor'(class GeneratorProfile* this, uint32_t arg2)

005d00f0  {
005d00f8      this->pos_val.vtable = 0x79285c;
005d00ff      this->vtable = 0x79285c;
005d00ff      
005d0105      if ((arg2 & 1) != 0)
005d0108          operator delete(this);
005d0108      
005d0113      return this;
005d00f0  }

005d0116                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005d0120  uint32_t __thiscall PackableList<GeneratorProfile>::InsertTail(class PackableList<GeneratorProfile>* this, class GeneratorProfile const* arg2)

005d0120  {
005d0128      void* eax = operator new(0x88);
005d0132      class PackableLLNode<GeneratorProfile>* eax_1;
005d0132      
005d0132      if (eax == 0)
005d0142          eax_1 = nullptr;
005d0132      else
005d013b          eax_1 = PackableLLNode<GeneratorProfile>::PackableLLNode<GeneratorProfile>(eax, arg2);
005d013b      
005d0149      if (this->head == 0)
005d0149      {
005d014b          this->head = eax_1;
005d014e          this->tail = eax_1;
005d0154          uint32_t eax_3 = (this->curNum + 1);
005d0155          this->curNum = eax_3;
005d0159          return eax_3;
005d0149      }
005d0149      
005d015c      class PackableLLNode<GeneratorProfile>* tail = this->tail;
005d015f      tail->next = eax_1;
005d0165      eax_1->prev = tail;
005d016b      this->tail = eax_1;
005d0171      uint32_t eax_5 = (this->curNum + 1);
005d0172      this->curNum = eax_5;
005d0176      return eax_5;
005d0120  }

005d0179                                                                             90 90 90 90 90 90 90                           .......

005d0180  uint32_t __thiscall PackableList<GeneratorProfile>::Pack(class PackableList<GeneratorProfile>* this, void** arg2, uint32_t arg3)

005d0180  {
005d0185      uint32_t result = PackableList<GeneratorProfile>::pack_size(this);
005d0185      
005d0192      if (arg3 >= result)
005d0192      {
005d019c          if (arg3 >= 4)
005d019c          {
005d01a3              **(uint32_t**)arg2 = this->curNum;
005d01a5              *(uint32_t*)arg2 += 4;
005d019c          }
005d019c          
005d01ad          for (class PackableLLNode<GeneratorProfile>* i = this->head; i != 0; i = i->next)
005d01b0              i->data.vtable->Pack(arg2, arg3);
005d0192      }
005d0192      
005d01c9      return result;
005d0180  }

005d01cc                                      90 90 90 90                                                              ....

005d01d0  uint32_t __fastcall PackableList<GeneratorProfile>::pack_size(class PackableList<GeneratorProfile>* this)

005d01d0  {
005d01d0      class PackableList<GeneratorProfile>* this_1 = this;
005d01d2      class PackableLLNode<GeneratorProfile>* i = this->head;
005d01d8      int32_t result = 4;
005d01dd      this_1 = nullptr;
005d01dd      
005d01e5      while (i != 0)
005d01e5      {
005d01f2          int32_t eax_2 = i->data.vtable->Pack(&this_1, 0);
005d01f5          i = i->next;
005d01fb          result += eax_2;
005d01e5      }
005d01e5      
005d0206      return result;
005d01d0  }

005d0207                       90 90 90 90 90 90 90 90 90                                                         .........

005d0210  void __fastcall PackableList<GeneratorProfile>::Flush(class PackableList<GeneratorProfile>* this)

005d0210  {
005d021e      void var_80;
005d021e      GeneratorProfile::GeneratorProfile(&var_80);
005d021e      
005d022a      while (this->head != 0)
005d022a      {
005d0230          class PackableLLNode<GeneratorProfile>* head = this->head;
005d0230          
005d0235          if (head != 0)
005d0235          {
005d0237              class PackableLLNode<GeneratorProfile>* next = head->next;
005d023f              this->head = next;
005d023f              
005d0242              if (next == 0)
005d024c                  this->tail = nullptr;
005d0242              else
005d0244                  next->prev = nullptr;
005d0244              
005d0254              GeneratorProfile::operator=(&var_80, head);
005d0254              
005d025b              if (head != 0)
005d025b              {
005d025e                  head->data.pos_val.vtable = 0x79285c;
005d0265                  head->data.vtable = 0x79285c;
005d026b                  operator delete(head);
005d025b              }
005d025b              
005d0273              this->curNum -= 1;
005d0235          }
005d022a      }
005d0210  }

005d0285                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005d0290  int32_t __thiscall PackableList<GeneratorProfile>::UnPack(class PackableList<GeneratorProfile>* this, void** arg2, uint32_t arg3)

005d0290  {
005d0299      PackableList<GeneratorProfile>::Flush(this);
005d0299      
005d02a6      if (arg3 < 4)
005d0314          return 0;
005d0314      
005d02b0      void* eax = *(uint32_t*)arg2;
005d02b4      int32_t edi = *(uint32_t*)eax;
005d02bd      *(uint32_t*)arg2 = ((char*)eax + 4);
005d02bf      int32_t var_80;
005d02bf      GeneratorProfile::GeneratorProfile(&var_80);
005d02c4      int32_t esi = 0;
005d02c4      
005d02c8      if (edi > 0)
005d02c8      {
005d02f7          do
005d02f7          {
005d02e6              if (*(uint32_t*)(var_80 + 0x10)(arg2, arg3) == 0)
005d0323                  return 0;
005d0323              
005d02ef              PackableList<GeneratorProfile>::InsertTail(this, &var_80);
005d02f4              esi += 1;
005d02f7          } while (esi < edi);
005d02c8      }
005d02c8      
005d0308      return 1;
005d0290  }

005d0326                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005d0330  void* __thiscall PackableList<GeneratorProfile>::`scalar deleting destructor'(class PackableList<GeneratorProfile>* this, uint32_t arg2)

005d0330  {
005d0333      this->vtable = 0x7e86c0;
005d0339      PackableList<GeneratorProfile>::Flush(this);
005d0343      this->vtable = 0x79285c;
005d0343      
005d0349      if ((arg2 & 1) != 0)
005d034c          operator delete(this);
005d034c      
005d0357      return this;
005d0330  }

005d035a                                                                                90 90 90 90 90 90                            ......

005d0360  void __fastcall GeneratorTable::GeneratorTable(class GeneratorTable* this)

005d0360  {
005d0362      this->vtable = 0x7e86d4;
005d036a      this->_profile_list.vtable = 0x7e86c0;
005d0371      this->_profile_list.head = nullptr;
005d0374      this->_profile_list.tail = nullptr;
005d0377      this->_profile_list.curNum = 0;
005d0360  }

005d037b                                                                                   90 90 90 90 90                             .....

005d0380  void* __thiscall GeneratorTable::`scalar deleting destructor'(class GeneratorTable* this, uint32_t arg2)

005d0380  {
005d0387      this->vtable = 0x7e86d4;
005d0384      this->_profile_list.vtable = 0x7e86c0;
005d0395      PackableList<GeneratorProfile>::Flush(&this->_profile_list);
005d0384      this->_profile_list.vtable = 0x79285c;
005d03a5      this->vtable = 0x79285c;
005d03a5      
005d03ab      if ((arg2 & 1) != 0)
005d03ae          operator delete(this);
005d03ae      
005d03ba      return this;
005d0380  }

005d03bd                                                                                         90 90 90                               ...

005d03c0  int32_t __thiscall PackableHashTable<unsigned long,GeneratorRegistryNode>::add(class PackableHashTable<unsigned long,GeneratorRegistryNode>* this, uint32_t const* arg2, class GeneratorRegistryNode const* arg3)

005d03c0  {
005d03ca      uint32_t _table_size_1 = this->_table_size;
005d03ca      
005d03cf      if (_table_size_1 == 0)
005d03cf      {
005d03fe      label_5d03fe:
005d03fe          void* eax_4 = operator new(0x38);
005d03fe          
005d040a          if (eax_4 != 0)
005d040a          {
005d0413              uint32_t _table_size = this->_table_size;
005d041a              *(uint32_t*)eax_4 = *(uint32_t*)arg2;
005d041c              GeneratorRegistryNode::GeneratorRegistryNode(((char*)eax_4 + 8), arg3);
005d0421              *(uint32_t*)((char*)eax_4 + 0x30) = 0;
005d042d              uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)arg2) % _table_size);
005d042f              *(uint32_t*)((char*)eax_4 + 0x34) = temp1_2;
005d043a              *(uint32_t*)((char*)eax_4 + 0x30) = this->_buckets[temp1_2];
005d043d              this->_buckets[temp1_2] = eax_4;
005d0443              this->_currNum += 1;
005d044f              return 1;
005d040a          }
005d03cf      }
005d03cf      else
005d03cf      {
005d03d1          class PackableHashData<unsigned long,GeneratorRegistryNode>** _buckets = this->_buckets;
005d03d1          
005d03d6          if (_buckets == 0)
005d03d6              goto label_5d03fe;
005d03d6          
005d03d8          uint32_t const i = *(uint32_t*)arg2;
005d03e1          int32_t* edx_3 = _buckets[(COMBINE(0, i) % _table_size_1)];
005d03e1          
005d03e6          if (edx_3 == 0)
005d03e6              goto label_5d03fe;
005d03e6          
005d03ea          while (i != *(uint32_t*)edx_3)
005d03ea          {
005d03ec              edx_3 = edx_3[0xc];
005d03ec              
005d03f1              if (edx_3 == 0)
005d03f1                  goto label_5d03fe;
005d03ea          }
005d03ea          
005d03fa          if (edx_3 == 0xfffffff8)
005d03fa              goto label_5d03fe;
005d03cf      }
005d03cf      
005d0458      return 0;
005d03c0  }

005d045b                                                                                   90 90 90 90 90                             .....

005d0460  uint32_t __fastcall PackableHashTable<unsigned long,CContractTracker>::pack_size(class PackableHashTable<unsigned long,CContractTracker>* this)

005d0460  {
005d0460      class PackableHashTable<unsigned long,CContractTracker>* this_1 = this;
005d0468      int32_t i = 0;
005d046a      bool cond:0 = this->_table_size <= 0;
005d046d      int32_t result = 4;
005d0472      this_1 = nullptr;
005d0472      
005d0476      if (!(cond:0))
005d0476      {
005d04b1          do
005d04b1          {
005d0483              void* j = this->_buckets[i];
005d0483              
005d0488              while (j != 0)
005d0488              {
005d049d                  int32_t eax_2 = *(uint32_t*)(*(uint32_t*)((char*)j + 8) + 0xc)(&this_1, 0);
005d04a0                  j = *(uint32_t*)((char*)j + 0x30);
005d04a5                  result = ((result + eax_2) + 4);
005d0488              }
005d0488              
005d04ae              i += 1;
005d04b1          } while (i < this->_table_size);
005d0476      }
005d0476      
005d04ba      return result;
005d0460  }

005d04bb                                                                                   90 90 90 90 90                             .....

005d04c0  int32_t __thiscall PackableHashTable<unsigned long,GeneratorRegistryNode>::UnPack(class PackableHashTable<unsigned long,GeneratorRegistryNode>* this, void** arg2, uint32_t arg3)

005d04c0  {
005d04ce      if (arg3 < 4)
005d04d7          return 0;
005d04d7      
005d04dc      void** edi = arg2;
005d04e0      void* eax_1 = *(uint32_t*)edi;
005d04e8      uint32_t var_2c = arg3;
005d04ec      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(this);
005d04f1      class PackableHashData<unsigned long,GeneratorRegistryNode>** _buckets = this->_buckets;
005d04f1      
005d04f8      if (_buckets != 0)
005d04f8      {
005d04fb          operator delete[](_buckets);
005d0503          this->_buckets = nullptr;
005d04f8      }
005d04f8      
005d0506      this->_table_size = 0;
005d0509      void* ecx_1 = *(uint32_t*)edi;
005d050b      int32_t eax_2 = *(uint32_t*)ecx_1;
005d0510      *(uint32_t*)edi = ((char*)ecx_1 + 4);
005d0514      uint32_t ecx_4 = (eax_2 >> 0x10);
005d0517      int32_t eax_3 = (eax_2 & 0xffff);
005d051c      int32_t ebx_1 = (arg3 - 4);
005d0521      this->_table_size = ecx_4;
005d0521      
005d0526      if (ecx_4 == 0)
005d0526      {
005d052f          int32_t result;
005d052f          result = eax_3 == 0;
005d0536          return result;
005d0526      }
005d0526      
005d0553      if (((ecx_4 <= 0x10000 && eax_3 <= 0x10000) && PackableHashTable<unsigned long,CContractTracker>::Init(this) != 0))
005d0553      {
005d0564          int32_t var_28;
005d0564          uint32_t eax_6 = GeneratorRegistryNode::GeneratorRegistryNode(&var_28);
005d056b          arg3 = 0;
005d056b          
005d0573          if (eax_3 <= 0)
005d05d9              return ((eax_6 - eax_6) + 1);
005d05d9          
005d0578          while (true)
005d0578          {
005d0578              if (ebx_1 < 4)
005d054a                  return 0;
005d054a              
005d057a              int32_t* eax_7 = *(uint32_t*)edi;
005d057e              int32_t edx_1 = var_28;
005d0583              arg2 = *(uint32_t*)eax_7;
005d058f              *(uint32_t*)edi = &eax_7[1];
005d058f              
005d0596              if (*(uint32_t*)(edx_1 + 0x10)(edi, ebx_1) == 0)
005d054a                  return 0;
005d054a              
005d05b2              if ((PackableHashTable<unsigned long,GeneratorRegistryNode>::add(this, &arg2, &var_28) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
005d054a                  return 0;
005d054a              
005d05b8              eax_6 = (arg3 + 1);
005d05bb              arg3 = eax_6;
005d05bb              
005d05bf              if (eax_6 >= eax_3)
005d05d9                  return ((eax_6 - eax_6) + 1);
005d0578          }
005d0553      }
005d0553      
005d054a      return 0;
005d04c0  }

005d05dc                                                                                      90 90 90 90                              ....

005d05e0  void* __thiscall PackableHashTable<unsigned long,GeneratorRegistryNode>::`scalar deleting destructor'(class PackableHashTable<unsigned long,GeneratorRegistryNode>* this, uint32_t arg2)

005d05e0  {
005d05e3      this->vtable = 0x7e8720;
005d05e9      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(this);
005d05ee      class PackableHashData<unsigned long,GeneratorRegistryNode>** _buckets = this->_buckets;
005d05ee      
005d05f3      if (_buckets != 0)
005d05f3      {
005d05f6          operator delete[](_buckets);
005d05fe          this->_buckets = nullptr;
005d05f3      }
005d05f3      
005d060a      this->_table_size = 0;
005d0611      this->vtable = 0x79285c;
005d0611      
005d0617      if ((arg2 & 1) != 0)
005d061a          operator delete(this);
005d061a      
005d0625      return this;
005d05e0  }

005d0628                          90 90 90 90 90 90 90 90                                                          ........

005d0630  void __fastcall GeneratorRegistry::GeneratorRegistry(class GeneratorRegistry* this)

005d0630  {
005d0636      this->vtable = 0x7e8734;
005d0633      this->_registry.vtable = 0x7e8720;
005d0633      this->_registry.m_fThrowawayDuplicateKeysOnUnPack = 0;
005d0633      this->_registry._buckets = nullptr;
005d0633      this->_registry._table_size = 0x20;
005d0633      this->_registry._currNum = 0;
005d0654      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_registry);
005d0630  }

005d065d                                                                                         90 90 90                               ...

005d0660  void* __thiscall GeneratorRegistry::`scalar deleting destructor'(class GeneratorRegistry* this, uint32_t arg2)

005d0660  {
005d0667      this->vtable = 0x7e8734;
005d0664      this->_registry.vtable = 0x7e8720;
005d0675      PackableHashTable<unsigned long,CContractTracker>::EmptyContents(&this->_registry);
005d067a      class PackableHashData<unsigned long,GeneratorRegistryNode>** _buckets = this->_registry._buckets;
005d067a      
005d067f      if (_buckets != 0)
005d067f      {
005d0682          operator delete[](_buckets);
005d0664          this->_registry._buckets = nullptr;
005d067f      }
005d067f      
005d0664      this->_registry._table_size = 0;
005d0664      this->_registry.vtable = 0x79285c;
005d06a3      this->vtable = 0x79285c;
005d06a3      
005d06a9      if ((arg2 & 1) != 0)
005d06ac          operator delete(this);
005d06ac      
005d06b8      return this;
005d0660  }

005d06bb                                                                                   90 90 90 90 90                             .....

005d06c0  int32_t __thiscall GeneratorTable::UnPack(class GeneratorTable* this, void** arg2, uint32_t arg3)

005d06c0  {
005d06c0      class GeneratorTable* this_1 = this;
005d06c1      struct PackableList<GeneratorProfile>::VTable* vtable = this->_profile_list.vtable;
005d06d1      this_1 = nullptr;
005d06d1      
005d06e2      if (arg3 >= vtable->Pack(&this_1, 0))
005d06fa          return this->_profile_list.vtable->UnPack(arg2, arg3);
005d06fa      
005d06e8      return 0;
005d06c0  }

005d06fd                                                                                         90 90 90                               ...

005d0700  uint32_t __thiscall PackableList<GeneratorQueueNode>::InsertTail(class PackableList<GeneratorQueueNode>* this, class GeneratorQueueNode const* arg2)

005d0700  {
005d070b      void* edi = operator new(0x18);
005d070b      
005d0712      if (edi == 0)
005d0730          edi = nullptr;
005d0712      else
005d0712      {
005d071b          GeneratorQueueNode::GeneratorQueueNode(edi, arg2);
005d0720          *(uint32_t*)((char*)edi + 0x10) = 0;
005d0727          *(uint32_t*)((char*)edi + 0x14) = 0;
005d0712      }
005d0712      
005d0737      if (this->head == 0)
005d0737      {
005d0739          uint32_t curNum = this->curNum;
005d073c          this->head = edi;
005d073f          this->tail = edi;
005d0744          this->curNum = (curNum + 1);
005d0748          return (curNum + 1);
005d0737      }
005d0737      
005d074b      class PackableLLNode<GeneratorQueueNode>* tail = this->tail;
005d074e      tail->next = edi;
005d0751      *(uint32_t*)((char*)edi + 0x14) = tail;
005d0754      uint32_t curNum_1 = this->curNum;
005d0757      this->tail = edi;
005d075c      this->curNum = (curNum_1 + 1);
005d0760      return (curNum_1 + 1);
005d0700  }

005d0763           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005d0770  void __fastcall PackableList<GeneratorQueueNode>::Flush(class PackableList<GeneratorQueueNode>* this)

005d0770  {
005d077b      void var_10;
005d077b      GeneratorQueueNode::GeneratorQueueNode(&var_10);
005d077b      
005d0787      while (this->head != 0)
005d0787      {
005d0790          class PackableLLNode<GeneratorQueueNode>* head = this->head;
005d0790          
005d0795          if (head != 0)
005d0795          {
005d0797              class PackableLLNode<GeneratorQueueNode>* next = head->next;
005d079c              this->head = next;
005d079c              
005d079f              if (next == 0)
005d07a6                  this->tail = nullptr;
005d079f              else
005d07a1                  next->prev = nullptr;
005d07a1              
005d07ae              GeneratorQueueNode::operator=(&var_10, head);
005d07ae              
005d07b5              if (head != 0)
005d07b5              {
005d07b8                  head->data.vtable = 0x79285c;
005d07be                  operator delete(head);
005d07b5              }
005d07b5              
005d07c6              this->curNum -= 1;
005d0795          }
005d0787      }
005d0770  }

005d07d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d07e0  int32_t __thiscall PackableList<GeneratorQueueNode>::UnPack(class PackableList<GeneratorQueueNode>* this, void** arg2, uint32_t arg3)

005d07e0  {
005d07e6      PackableList<GeneratorQueueNode>::Flush(this);
005d07e6      
005d07f0      if (arg3 < 4)
005d084c          return 0;
005d084c      
005d07f7      void* eax = *(uint32_t*)arg2;
005d07fb      int32_t edi = *(uint32_t*)eax;
005d0804      *(uint32_t*)arg2 = ((char*)eax + 4);
005d0806      int32_t var_10;
005d0806      GeneratorQueueNode::GeneratorQueueNode(&var_10);
005d080b      int32_t esi = 0;
005d080b      
005d080f      if (edi > 0)
005d080f      {
005d0835          do
005d0835          {
005d0824              if (*(uint32_t*)(var_10 + 0x10)(arg2, arg3) == 0)
005d0858                  return 0;
005d0858              
005d082d              PackableList<GeneratorQueueNode>::InsertTail(this, &var_10);
005d0832              esi += 1;
005d0835          } while (esi < edi);
005d080f      }
005d080f      
005d0843      return 1;
005d07e0  }

005d085b                                                                                   90 90 90 90 90                             .....

005d0860  void* __thiscall PackableList<GeneratorQueueNode>::`scalar deleting destructor'(class PackableList<GeneratorQueueNode>* this, uint32_t arg2)

005d0860  {
005d0863      this->vtable = 0x7e8780;
005d0869      PackableList<GeneratorQueueNode>::Flush(this);
005d0873      this->vtable = 0x79285c;
005d0873      
005d0879      if ((arg2 & 1) != 0)
005d087c          operator delete(this);
005d087c      
005d0887      return this;
005d0860  }

005d088a                                90 90 90 90 90 90                                                            ......

005d0890  void __fastcall GeneratorQueue::GeneratorQueue(class GeneratorQueue* this)

005d0890  {
005d0892      this->vtable = 0x7e8794;
005d089a      this->_queue.vtable = 0x7e8780;
005d08a1      this->_queue.head = nullptr;
005d08a4      this->_queue.tail = nullptr;
005d08a7      this->_queue.curNum = 0;
005d0890  }

005d08ab                                   90 90 90 90 90                                                             .....

005d08b0  void* __thiscall GeneratorQueue::`scalar deleting destructor'(class GeneratorQueue* this, uint32_t arg2)

005d08b0  {
005d08b7      this->vtable = 0x7e8794;
005d08b4      this->_queue.vtable = 0x7e8780;
005d08c5      PackableList<GeneratorQueueNode>::Flush(&this->_queue);
005d08b4      this->_queue.vtable = 0x79285c;
005d08d5      this->vtable = 0x79285c;
005d08d5      
005d08db      if ((arg2 & 1) != 0)
005d08de          operator delete(this);
005d08de      
005d08ea      return this;
005d08b0  }

005d08ed                                         90 90 90                                                               ...

005d08f0  void __fastcall GeneratorProfile::GeneratorProfile(class GeneratorProfile* this)

005d08f0  {
005d08f3      this->vtable = 0x7e86ac;
005d08fc      this->probability = 0f;
005d0904      this->type.id = INVALID_DID.id;
005d0907      this->delay = 0f;
005d090a      *(uint32_t*)((char*)this->delay)[4] = 0x4082c000;
005d0911      this->whereCreate = Scatter_RegenLocationType;
005d0918      this->ptid = 0;
005d091b      this->shade = 0f;
005d0923      this->initCreate = 1;
005d0926      this->whenCreate = Destruction_RegenerationType;
005d092f      this->maxNum = 0xffffffff;
005d0932      this->stackSize = 0xffffffff;
005d0935      this->pos_val.vtable = 0x796910;
005d093c      this->pos_val.objcell_id = 0;
005d0929      this->pos_val.frame.qw = 0x3f800000;
005d0929      this->pos_val.frame.qx = 0f;
005d0929      this->pos_val.frame.qy = 0f;
005d0929      this->pos_val.frame.qz = 0f;
005d0929      this->pos_val.frame.m_fOrigin.x = 0;
005d0929      this->pos_val.frame.m_fOrigin.y = 0f;
005d0929      this->pos_val.frame.m_fOrigin.z = 0f;
005d0957      Frame::cache(&this->pos_val.frame);
005d095c      this->slot = 0;
005d08f0  }

005d0964              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005d0970  int32_t __thiscall GeneratorProfile::UnPack(class GeneratorProfile* this, void** arg2, uint32_t arg3)

005d0970  {
005d0979      Position::pack_size(&this->pos_val);
005d0979      
005d0987      if (arg3 < 0x50)
005d0990          return 1;
005d0990      
005d099c      this->probability = **(uint32_t**)arg2;
005d09a1      void* edx_2 = (*(uint32_t*)arg2 + 4);
005d09a4      *(uint32_t*)arg2 = edx_2;
005d09aa      this->type.id = *(uint32_t*)edx_2;
005d09af      void* eax_5 = (*(uint32_t*)arg2 + 4);
005d09b2      *(uint32_t*)arg2 = eax_5;
005d09b6      this->delay = *(uint32_t*)eax_5;
005d09bc      *(uint32_t*)((char*)this->delay)[4] = *(uint32_t*)((char*)eax_5 + 4);
005d09c1      void* edx_5 = (*(uint32_t*)arg2 + 8);
005d09c4      *(uint32_t*)arg2 = edx_5;
005d09ca      this->initCreate = *(uint32_t*)edx_5;
005d09cf      void* eax_9 = (*(uint32_t*)arg2 + 4);
005d09d2      *(uint32_t*)arg2 = eax_9;
005d09d6      this->maxNum = *(uint32_t*)eax_9;
005d09db      void* edx_8 = (*(uint32_t*)arg2 + 4);
005d09de      *(uint32_t*)arg2 = edx_8;
005d09e4      this->whenCreate = *(uint32_t*)edx_8;
005d09e9      void* eax_13 = (*(uint32_t*)arg2 + 4);
005d09ec      *(uint32_t*)arg2 = eax_13;
005d09f0      this->whereCreate = *(uint32_t*)eax_13;
005d09f5      void* edx_11 = (*(uint32_t*)arg2 + 4);
005d09f8      *(uint32_t*)arg2 = edx_11;
005d09fe      this->stackSize = *(uint32_t*)edx_11;
005d0a03      void* eax_17 = (*(uint32_t*)arg2 + 4);
005d0a06      *(uint32_t*)arg2 = eax_17;
005d0a0a      this->ptid = *(uint32_t*)eax_17;
005d0a0f      void* edx_14 = (*(uint32_t*)arg2 + 4);
005d0a12      *(uint32_t*)arg2 = edx_14;
005d0a18      this->shade = *(uint32_t*)edx_14;
005d0a21      *(uint32_t*)arg2 += 4;
005d0a28      int32_t result = this->pos_val.vtable->UnPack(arg2, arg3);
005d0a28      
005d0a2d      if (result == 0)
005d0a32          return result;
005d0a32      
005d0a39      this->slot = **(uint32_t**)arg2;
005d0a3c      *(uint32_t*)arg2 += 4;
005d0a47      return 1;
005d0970  }

005d0a4a                                90 90 90 90 90 90                                                            ......

005d0a50  class GeneratorProfile& __thiscall GeneratorProfile::operator=(class GeneratorProfile* this, class GeneratorProfile const& arg2)

005d0a50  {
005d0a5a      if (this != arg2)
005d0a5a      {
005d0a5f          this->probability = arg2->probability;
005d0a65          this->type.id = arg2->type.id;
005d0a6b          this->delay = arg2->delay;
005d0a71          *(uint32_t*)((char*)this->delay)[4] = *(uint32_t*)((char*)arg2->delay)[4];
005d0a77          this->initCreate = arg2->initCreate;
005d0a7d          this->maxNum = arg2->maxNum;
005d0a83          this->whenCreate = arg2->whenCreate;
005d0a89          this->whereCreate = arg2->whereCreate;
005d0a8f          this->stackSize = arg2->stackSize;
005d0a95          this->ptid = arg2->ptid;
005d0a9b          this->shade = arg2->shade;
005d0aa8          this->pos_val.objcell_id = arg2->pos_val.objcell_id;
005d0aab          Frame::operator=(&this->pos_val.frame, &arg2->pos_val.frame);
005d0ab3          this->slot = arg2->slot;
005d0a5a      }
005d0a5a      
005d0aba      return this;
005d0a50  }

005d0abd                                                                                         90 90 90                               ...

005d0ac0  uint32_t __thiscall GeneratorProfile::Pack(class GeneratorProfile* this, void** arg2, uint32_t arg3)

005d0ac0  {
005d0aca      Position::pack_size(&this->pos_val);
005d0aca      
005d0ada      if (arg3 >= 0x50)
005d0ada      {
005d0aea          **(uint32_t**)arg2 = ((float)((long double)this->probability));
005d0aee          void* edx_2 = (*(uint32_t*)arg2 + 4);
005d0af1          *(uint32_t*)arg2 = edx_2;
005d0af8          *(uint32_t*)edx_2 = this->type.id;
005d0afc          void* eax_4 = (*(uint32_t*)arg2 + 4);
005d0aff          *(uint32_t*)arg2 = eax_4;
005d0b04          *(uint64_t*)eax_4 = ((double)((long double)this->delay));
005d0b08          void* edx_5 = (*(uint32_t*)arg2 + 8);
005d0b0b          *(uint32_t*)arg2 = edx_5;
005d0b12          *(uint32_t*)edx_5 = this->initCreate;
005d0b16          void* eax_7 = (*(uint32_t*)arg2 + 4);
005d0b19          *(uint32_t*)arg2 = eax_7;
005d0b1e          *(uint32_t*)eax_7 = this->maxNum;
005d0b22          void* edx_9 = (*(uint32_t*)arg2 + 4);
005d0b25          *(uint32_t*)arg2 = edx_9;
005d0b2c          *(uint32_t*)edx_9 = this->whenCreate;
005d0b30          void* eax_10 = (*(uint32_t*)arg2 + 4);
005d0b33          *(uint32_t*)arg2 = eax_10;
005d0b38          *(uint32_t*)eax_10 = this->whereCreate;
005d0b3c          void* edx_13 = (*(uint32_t*)arg2 + 4);
005d0b3f          *(uint32_t*)arg2 = edx_13;
005d0b46          *(uint32_t*)edx_13 = this->stackSize;
005d0b4a          void* eax_13 = (*(uint32_t*)arg2 + 4);
005d0b4d          *(uint32_t*)arg2 = eax_13;
005d0b52          *(uint32_t*)eax_13 = this->ptid;
005d0b56          void* edx_17 = (*(uint32_t*)arg2 + 4);
005d0b59          *(uint32_t*)arg2 = edx_17;
005d0b60          *(uint32_t*)edx_17 = ((float)((long double)this->shade));
005d0b68          *(uint32_t*)arg2 += 4;
005d0ac5          this->pos_val.vtable->Pack(arg2, arg3);
005d0b77          **(uint32_t**)arg2 = this->slot;
005d0b79          *(uint32_t*)arg2 += 4;
005d0ada      }
005d0ada      
005d0b82      return 0x50;
005d0ac0  }

005d0b85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005d0b90  void __fastcall GeneratorRegistryNode::GeneratorRegistryNode(class GeneratorRegistryNode* this)

005d0b90  {
005d0b92      this->vtable = 0x7e87e0;
005d0b9e      this->m_wcidOrTtype.id = INVALID_DID.id;
005d0ba3      __builtin_memset(&this->ts, 0, 0x1c);
005d0b90  }

005d0bb9                                                                             90 90 90 90 90 90 90                           .......

005d0bc0  void __thiscall GeneratorRegistryNode::GeneratorRegistryNode(class GeneratorRegistryNode* this, class GeneratorRegistryNode const* arg2)

005d0bc0  {
005d0bc8      this->vtable = 0x7e87e0;
005d0bc8      
005d0bce      if (this != arg2)
005d0bce      {
005d0bd3          this->m_wcidOrTtype.id = arg2->m_wcidOrTtype.id;
005d0bd9          this->ts = arg2->ts;
005d0bdf          *(uint32_t*)((char*)this->ts)[4] = *(uint32_t*)((char*)arg2->ts)[4];
005d0be5          this->m_bTreasureType = arg2->m_bTreasureType;
005d0beb          this->slot = arg2->slot;
005d0bf1          this->checkpointed = arg2->checkpointed;
005d0bf7          this->shop = arg2->shop;
005d0bfd          this->amount = arg2->amount;
005d0bce      }
005d0bc0  }

005d0c03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005d0c10  uint32_t __thiscall GeneratorRegistryNode::Pack(class GeneratorRegistryNode* this, void** arg2, uint32_t arg3)

005d0c10  {
005d0c15      if (arg3 >= 0x20)
005d0c15      {
005d0c21          **(uint32_t**)arg2 = this->m_wcidOrTtype.id;
005d0c25          void* esi_3 = (*(uint32_t*)arg2 + 4);
005d0c28          *(uint32_t*)arg2 = esi_3;
005d0c2f          *(uint64_t*)esi_3 = ((double)((long double)this->ts));
005d0c33          void* edx_4 = (*(uint32_t*)arg2 + 8);
005d0c36          *(uint32_t*)arg2 = edx_4;
005d0c3b          *(uint32_t*)edx_4 = this->m_bTreasureType;
005d0c3f          void* esi_6 = (*(uint32_t*)arg2 + 4);
005d0c42          *(uint32_t*)arg2 = esi_6;
005d0c49          *(uint32_t*)esi_6 = this->slot;
005d0c4d          void* edx_7 = (*(uint32_t*)arg2 + 4);
005d0c50          *(uint32_t*)arg2 = edx_7;
005d0c55          *(uint32_t*)edx_7 = this->checkpointed;
005d0c59          void* esi_10 = (*(uint32_t*)arg2 + 4);
005d0c5c          *(uint32_t*)arg2 = esi_10;
005d0c63          *(uint32_t*)esi_10 = this->shop;
005d0c67          void* edx_10 = (*(uint32_t*)arg2 + 4);
005d0c6a          *(uint32_t*)arg2 = edx_10;
005d0c6f          *(uint32_t*)edx_10 = this->amount;
005d0c71          *(uint32_t*)arg2 += 4;
005d0c15      }
005d0c15      
005d0c7a      return 0x20;
005d0c10  }

005d0c7d                                                                                         90 90 90                               ...

005d0c80  int32_t __thiscall GeneratorRegistryNode::UnPack(class GeneratorRegistryNode* this, void** arg2, uint32_t arg3)

005d0c80  {
005d0c85      if (arg3 < 0x20)
005d0c89          return 0;
005d0c89      
005d0c92      void* edx_1 = (*(uint32_t*)arg2 + 4);
005d0c96      class IDClass<_tagDataID,32,0> esi = *(uint32_t*)((char*)edx_1 - 4);
005d0c99      *(uint32_t*)arg2 = edx_1;
005d0c9b      this->m_wcidOrTtype.id = esi;
005d0c9e      void* edx_2 = *(uint32_t*)arg2;
005d0ca2      this->ts = *(uint32_t*)edx_2;
005d0ca8      *(uint32_t*)((char*)this->ts)[4] = *(uint32_t*)((char*)edx_2 + 4);
005d0cad      void* edx_5 = (*(uint32_t*)arg2 + 8);
005d0cb0      *(uint32_t*)arg2 = edx_5;
005d0cb4      this->m_bTreasureType = *(uint32_t*)edx_5;
005d0cb9      void* esi_3 = (*(uint32_t*)arg2 + 4);
005d0cbc      *(uint32_t*)arg2 = esi_3;
005d0cc2      this->slot = *(uint32_t*)esi_3;
005d0cc7      void* edx_10 = (*(uint32_t*)arg2 + 4);
005d0cca      *(uint32_t*)arg2 = edx_10;
005d0cce      this->checkpointed = *(uint32_t*)edx_10;
005d0cd3      void* esi_5 = (*(uint32_t*)arg2 + 4);
005d0cd6      *(uint32_t*)arg2 = esi_5;
005d0cdc      this->shop = *(uint32_t*)esi_5;
005d0ce1      void* edx_15 = (*(uint32_t*)arg2 + 4);
005d0ce4      *(uint32_t*)arg2 = edx_15;
005d0ce8      this->amount = *(uint32_t*)edx_15;
005d0ceb      *(uint32_t*)arg2 += 4;
005d0cf4      return 1;
005d0c80  }

005d0cf7                                                                       90 90 90 90 90 90 90 90 90                         .........

005d0d00  void __fastcall GeneratorQueueNode::GeneratorQueueNode(class GeneratorQueueNode* this)

005d0d00  {
005d0d04      this->vtable = 0x7e87f4;
005d0d0a      this->slot = 0;
005d0d0d      this->when = 0f;
005d0d10      *(uint32_t*)((char*)this->when)[4] = 0;
005d0d00  }

005d0d14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005d0d20  void __thiscall GeneratorQueueNode::GeneratorQueueNode(class GeneratorQueueNode* this, class GeneratorQueueNode const* arg2)

005d0d20  {
005d0d28      this->vtable = 0x7e87f4;
005d0d28      
005d0d2e      if (this != arg2)
005d0d2e      {
005d0d33          this->slot = arg2->slot;
005d0d39          this->when = arg2->when;
005d0d3f          *(uint32_t*)((char*)this->when)[4] = *(uint32_t*)((char*)arg2->when)[4];
005d0d2e      }
005d0d20  }

005d0d45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005d0d50  uint32_t __thiscall GeneratorQueueNode::Pack(class GeneratorQueueNode* this, void** arg2, uint32_t arg3)

005d0d50  {
005d0d55      if (arg3 >= 0xc)
005d0d55      {
005d0d61          **(uint32_t**)arg2 = this->slot;
005d0d65          void* edx_3 = (*(uint32_t*)arg2 + 4);
005d0d68          *(uint32_t*)arg2 = edx_3;
005d0d6d          *(uint64_t*)edx_3 = ((double)((long double)this->when));
005d0d6f          *(uint32_t*)arg2 += 8;
005d0d55      }
005d0d55      
005d0d78      return 0xc;
005d0d50  }

005d0d7b                                                                                   90 90 90 90 90                             .....

005d0d80  int32_t __thiscall GeneratorQueueNode::UnPack(class GeneratorQueueNode* this, void** arg2, uint32_t arg3)

005d0d80  {
005d0d85      if (arg3 < 0xc)
005d0d89          return 0;
005d0d89      
005d0d94      this->slot = **(uint32_t**)arg2;
005d0d99      void* edx_3 = (*(uint32_t*)arg2 + 4);
005d0d9c      *(uint32_t*)arg2 = edx_3;
005d0da1      this->when = *(uint32_t*)edx_3;
005d0da7      *(uint32_t*)((char*)this->when)[4] = *(uint32_t*)((char*)edx_3 + 4);
005d0daa      *(uint32_t*)arg2 += 8;
005d0db3      return 1;
005d0d80  }

005d0db6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005d0dc0  uint32_t __thiscall ArmorProfile::Pack(class ArmorProfile* this, void** arg2, uint32_t arg3)

005d0dc0  {
005d0dc5      if (arg3 >= 0x20)
005d0dc5      {
005d0dd0          **(uint32_t**)arg2 = ((float)((long double)this->mod_vs_slash));
005d0dd4          void* edx_3 = (*(uint32_t*)arg2 + 4);
005d0dd7          *(uint32_t*)arg2 = edx_3;
005d0ddc          *(uint32_t*)edx_3 = ((float)((long double)this->mod_vs_pierce));
005d0de0          void* edx_5 = (*(uint32_t*)arg2 + 4);
005d0de3          *(uint32_t*)arg2 = edx_5;
005d0de8          *(uint32_t*)edx_5 = ((float)((long double)this->mod_vs_bludgeon));
005d0dec          void* edx_7 = (*(uint32_t*)arg2 + 4);
005d0def          *(uint32_t*)arg2 = edx_7;
005d0df4          *(uint32_t*)edx_7 = ((float)((long double)this->mod_vs_cold));
005d0df8          void* edx_9 = (*(uint32_t*)arg2 + 4);
005d0dfb          *(uint32_t*)arg2 = edx_9;
005d0e00          *(uint32_t*)edx_9 = ((float)((long double)this->mod_vs_fire));
005d0e04          void* edx_11 = (*(uint32_t*)arg2 + 4);
005d0e07          *(uint32_t*)arg2 = edx_11;
005d0e0c          *(uint32_t*)edx_11 = ((float)((long double)this->mod_vs_acid));
005d0e10          void* edx_13 = (*(uint32_t*)arg2 + 4);
005d0e13          *(uint32_t*)arg2 = edx_13;
005d0e18          *(uint32_t*)edx_13 = ((float)((long double)this->mod_vs_nether));
005d0e1c          void* edx_15 = (*(uint32_t*)arg2 + 4);
005d0e1f          *(uint32_t*)arg2 = edx_15;
005d0e24          *(uint32_t*)edx_15 = ((float)((long double)this->mod_vs_electric));
005d0e26          *(uint32_t*)arg2 += 4;
005d0dc5      }
005d0dc5      
005d0e2e      return 0x20;
005d0dc0  }

005d0e31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005d0e40  int32_t __thiscall ArmorProfile::UnPack(class ArmorProfile* this, void** arg2, uint32_t arg3)

005d0e40  {
005d0e45      if (arg3 < 0x20)
005d0e49          return 0;
005d0e49      
005d0e54      this->mod_vs_slash = **(uint32_t**)arg2;
005d0e59      void* edx_3 = (*(uint32_t*)arg2 + 4);
005d0e5c      *(uint32_t*)arg2 = edx_3;
005d0e60      this->mod_vs_pierce = *(uint32_t*)edx_3;
005d0e65      void* edx_6 = (*(uint32_t*)arg2 + 4);
005d0e68      *(uint32_t*)arg2 = edx_6;
005d0e6c      this->mod_vs_bludgeon = *(uint32_t*)edx_6;
005d0e71      void* edx_9 = (*(uint32_t*)arg2 + 4);
005d0e74      *(uint32_t*)arg2 = edx_9;
005d0e78      this->mod_vs_cold = *(uint32_t*)edx_9;
005d0e7d      void* edx_12 = (*(uint32_t*)arg2 + 4);
005d0e80      *(uint32_t*)arg2 = edx_12;
005d0e84      this->mod_vs_fire = *(uint32_t*)edx_12;
005d0e89      void* edx_15 = (*(uint32_t*)arg2 + 4);
005d0e8c      *(uint32_t*)arg2 = edx_15;
005d0e90      this->mod_vs_acid = *(uint32_t*)edx_15;
005d0e95      void* edx_18 = (*(uint32_t*)arg2 + 4);
005d0e98      *(uint32_t*)arg2 = edx_18;
005d0e9c      this->mod_vs_nether = *(uint32_t*)edx_18;
005d0ea1      void* edx_21 = (*(uint32_t*)arg2 + 4);
005d0ea4      *(uint32_t*)arg2 = edx_21;
005d0ea8      this->mod_vs_electric = *(uint32_t*)edx_21;
005d0eab      *(uint32_t*)arg2 += 4;
005d0eb3      return 1;
005d0e40  }

005d0eb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005d0ec0  uint32_t BodyPartEnumMapper::BodyPartToString(int32_t const arg1, char* arg2, uint32_t const arg3)

005d0ec0  {
005d0ec8      char const* const ecx;
005d0ec8      
005d0ec8      if ((arg1 + 1) > 0x1c)
005d0fad          ecx = "Unknown";
005d0ec8      else
005d0ece          switch (arg1)
005d0ece          {
005d0edf              case 0:
005d0edf              {
005d0edf                  ecx = "HEAD";
005d0edf                  break;
005d0edf              }
005d0ee9              case 1:
005d0ee9              {
005d0ee9                  ecx = "CHEST";
005d0ee9                  break;
005d0ee9              }
005d0ef3              case 2:
005d0ef3              {
005d0ef3                  ecx = "ABDOMEN";
005d0ef3                  break;
005d0ef3              }
005d0efd              case 3:
005d0efd              {
005d0efd                  ecx = "UPPER_ARM";
005d0efd                  break;
005d0efd              }
005d0f07              case 4:
005d0f07              {
005d0f07                  ecx = "LOWER_ARM";
005d0f07                  break;
005d0f07              }
005d0f11              case 5:
005d0f11              {
005d0f11                  ecx = "HAND";
005d0f11                  break;
005d0f11              }
005d0f1b              case 6:
005d0f1b              {
005d0f1b                  ecx = "UPPER_LEG";
005d0f1b                  break;
005d0f1b              }
005d0f25              case 7:
005d0f25              {
005d0f25                  ecx = "LOWER_LEG";
005d0f25                  break;
005d0f25              }
005d0f2f              case 8:
005d0f2f              {
005d0f2f                  ecx = "FOOT";
005d0f2f                  break;
005d0f2f              }
005d0f36              case 9:
005d0f36              {
005d0f36                  ecx = "HORN";
005d0f36                  break;
005d0f36              }
005d0f3d              case 0xa:
005d0f3d              {
005d0f3d                  ecx = "FRONT_LEG";
005d0f3d                  break;
005d0f3d              }
005d0fad              case 0xb:
005d0fad              case 0xe:
005d0fad              {
005d0fad                  ecx = "Unknown";
005d0fad                  break;
005d0fad              }
005d0f44              case 0xc:
005d0f44              {
005d0f44                  ecx = "FRONT_FOOT";
005d0f44                  break;
005d0f44              }
005d0f4b              case 0xd:
005d0f4b              {
005d0f4b                  ecx = "REAR_LEG";
005d0f4b                  break;
005d0f4b              }
005d0f52              case 0xf:
005d0f52              {
005d0f52                  ecx = "REAR_FOOT";
005d0f52                  break;
005d0f52              }
005d0f59              case 0x10:
005d0f59              {
005d0f59                  ecx = "TORSO";
005d0f59                  break;
005d0f59              }
005d0f60              case 0x11:
005d0f60              {
005d0f60                  ecx = "TAIL";
005d0f60                  break;
005d0f60              }
005d0f67              case 0x12:
005d0f67              {
005d0f67                  ecx = &data_7e8860;
005d0f67                  break;
005d0f67              }
005d0f6e              case 0x13:
005d0f6e              {
005d0f6e                  ecx = &data_7e885c;
005d0f6e                  break;
005d0f6e              }
005d0f75              case 0x14:
005d0f75              {
005d0f75                  ecx = "CLAW";
005d0f75                  break;
005d0f75              }
005d0f7c              case 0x15:
005d0f7c              {
005d0f7c                  ecx = "WINGS";
005d0f7c                  break;
005d0f7c              }
005d0f83              case 0x16:
005d0f83              {
005d0f83                  ecx = "BREATH";
005d0f83                  break;
005d0f83              }
005d0f8a              case 0x17:
005d0f8a              {
005d0f8a                  ecx = "TENTACLE";
005d0f8a                  break;
005d0f8a              }
005d0f91              case 0x18:
005d0f91              {
005d0f91                  ecx = "UPPER_TENTACLE";
005d0f91                  break;
005d0f91              }
005d0f98              case 0x19:
005d0f98              {
005d0f98                  ecx = "LOWER_TENTACLE";
005d0f98                  break;
005d0f98              }
005d0f9f              case 0x1a:
005d0f9f              {
005d0f9f                  ecx = "CLOAK";
005d0f9f                  break;
005d0f9f              }
005d0fa6              case 0x1b:
005d0fa6              {
005d0fa6                  ecx = "NUM";
005d0fa6                  break;
005d0fa6              }
005d0ed5              case 0xffffffff:
005d0ed5              {
005d0ed5                  ecx = "UNDEFINED";
005d0ed5                  break;
005d0ed5              }
005d0ece          }
005d0ece      
005d0fb2      char const* const eax_1 = ecx;
005d0fbd      char const i;
005d0fbd      
005d0fbd      do
005d0fbd      {
005d0fb8          i = *(uint8_t*)eax_1;
005d0fba          eax_1 = &eax_1[1];
005d0fbd      } while (i != 0);
005d0fc5      void* result = ((eax_1 - &eax_1[1]) + 1);
005d0fc5      
005d0fc9      if (arg3 < result)
005d0fdf          return result;
005d0fdf      
005d0fcf      char const* const eax_3 = ecx;
005d0fd1      char* edx_2 = (arg2 - ecx);
005d0fd1      
005d0fdb      do
005d0fdb      {
005d0fd3          ecx = *(uint8_t*)eax_3;
005d0fd5          *(uint8_t*)(edx_2 + eax_3) = ecx;
005d0fd8          eax_3 = &eax_3[1];
005d0fdb      } while (ecx != 0);
005d0fdb      
005d0fdd      return nullptr;
005d0ec0  }

005d0fe0  uint32_t jump_table_5d0fe0[0x1d] = 
005d0fe0  {
005d0fe0      [0x00] =  0x005d0ed5
005d0fe4      [0x01] =  0x005d0edf
005d0fe8      [0x02] =  0x005d0ee9
005d0fec      [0x03] =  0x005d0ef3
005d0ff0      [0x04] =  0x005d0efd
005d0ff4      [0x05] =  0x005d0f07
005d0ff8      [0x06] =  0x005d0f11
005d0ffc      [0x07] =  0x005d0f1b
005d1000      [0x08] =  0x005d0f25
005d1004      [0x09] =  0x005d0f2f
005d1008      [0x0a] =  0x005d0f36
005d100c      [0x0b] =  0x005d0f3d
005d1010      [0x0c] =  0x005d0fad
005d1014      [0x0d] =  0x005d0f44
005d1018      [0x0e] =  0x005d0f4b
005d101c      [0x0f] =  0x005d0fad
005d1020      [0x10] =  0x005d0f52
005d1024      [0x11] =  0x005d0f59
005d1028      [0x12] =  0x005d0f60
005d102c      [0x13] =  0x005d0f67
005d1030      [0x14] =  0x005d0f6e
005d1034      [0x15] =  0x005d0f75
005d1038      [0x16] =  0x005d0f7c
005d103c      [0x17] =  0x005d0f83
005d1040      [0x18] =  0x005d0f8a
005d1044      [0x19] =  0x005d0f91
005d1048      [0x1a] =  0x005d0f98
005d104c      [0x1b] =  0x005d0f9f
005d1050      [0x1c] =  0x005d0fa6
005d1054  }

005d1054                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005d1060  uint32_t __thiscall CSpellBook::Pack(class CSpellBook* this, void** arg2, uint32_t arg3)

005d1060  {
005d1060      class CSpellBook* this_1 = this;
005d1061      struct PackableHashTable<unsigned long,SpellBookPage>::VTable* vtable = this->_spellbook.vtable;
005d1072      this_1 = nullptr;
005d107a      int32_t result = vtable->Pack(&this_1, 0);
005d107a      
005d1085      if (arg3 >= result)
005d1066          this->_spellbook.vtable->Pack(arg2, arg3);
005d1066      
005d1099      return result;
005d1060  }

005d109c                                                                                      90 90 90 90                              ....

005d10a0  uint32_t __fastcall BodyPart::GetPackSize(class BodyPart* this)

005d10a0  {
005d10a0      class BodyPart* this_1 = this;
005d10a5      struct ArmorCache::VTable* vtable = this->_acache.vtable;
005d10b2      this_1 = nullptr;
005d10ba      int32_t eax = vtable->Pack(&this_1, 0);
005d10bd      class BodyPartSelectionData* _bpsd = this->_bpsd;
005d10c2      int32_t result = (eax + 0x14);
005d10c2      
005d10c7      if (_bpsd == 0)
005d10e4          return result;
005d10e4      
005d10cf      this_1 = nullptr;
005d10dd      return (result + _bpsd->vtable->Pack(&this_1, 0));
005d10a0  }

005d10e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005d10f0  void __fastcall BodyPartSelectionData::BodyPartSelectionData(class BodyPartSelectionData* this)

005d10f0  {
005d10f4      this->vtable = 0x7e8948;
005d10fa      __builtin_memset(&this->HLF, 0, 0x30);
005d10f0  }

005d111f                                                                                               90                                 .

005d1120  void __thiscall BodyPartSelectionData::BodyPartSelectionData(class BodyPartSelectionData* this, class BodyPartSelectionData const* arg2)

005d1120  {
005d1126      this->vtable = 0x7e8948;
005d112f      this->HLF = arg2->HLF;
005d1135      this->MLF = arg2->MLF;
005d113b      this->LLF = arg2->LLF;
005d1141      this->HRF = arg2->HRF;
005d1147      this->MRF = arg2->MRF;
005d114d      this->LRF = arg2->LRF;
005d1153      this->HLB = arg2->HLB;
005d1159      this->MLB = arg2->MLB;
005d115f      this->LLB = arg2->LLB;
005d1165      this->HRB = arg2->HRB;
005d116b      this->MRB = arg2->MRB;
005d1171      this->LRB = arg2->LRB;
005d1120  }

005d1177                                                                       90 90 90 90 90 90 90 90 90                         .........

005d1180  void __fastcall BodyPart::~BodyPart(class BodyPart* this)

005d1180  {
005d1183      class BodyPartSelectionData* _bpsd = this->_bpsd;
005d1188      this->vtable = 0x7e4380;
005d1188      
005d118e      if (_bpsd != 0)
005d118e      {
005d1190          _bpsd->vtable->__vecDelDtor(1);
005d1196          this->_bpsd = nullptr;
005d118e      }
005d118e      
005d119d      this->_acache.vtable = 0x79285c;
005d11a4      this->vtable = 0x79285c;
005d1180  }

005d11ac                                      90 90 90 90                                                              ....

005d11b0  class BodyPartSelectionData& __thiscall BodyPartSelectionData::operator=(class BodyPartSelectionData* this, class BodyPartSelectionData const& arg2)

005d11b0  {
005d11b9      this->HLF = arg2->HLF;
005d11bf      this->MLF = arg2->MLF;
005d11c5      this->LLF = arg2->LLF;
005d11cb      this->HRF = arg2->HRF;
005d11d1      this->MRF = arg2->MRF;
005d11d7      this->LRF = arg2->LRF;
005d11dd      this->HLB = arg2->HLB;
005d11e3      this->MLB = arg2->MLB;
005d11e9      this->LLB = arg2->LLB;
005d11ef      this->HRB = arg2->HRB;
005d11f5      this->MRB = arg2->MRB;
005d11fb      this->LRB = arg2->LRB;
005d11fe      return this;
005d11b0  }

005d1201     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005d1210  uint32_t __thiscall BodyPart::Pack(class BodyPart* this, void** arg2, uint32_t arg3)

005d1210  {
005d1218      int32_t result = this->vtable->GetPackSize();
005d1218      
005d1223      if (arg3 >= result)
005d1223      {
005d1232          int32_t ecx;
005d1232          ecx = this->_bpsd != 0;
005d1237          **(uint32_t**)arg2 = ecx;
005d123b          void* eax_2 = (*(uint32_t*)arg2 + 4);
005d123e          *(uint32_t*)arg2 = eax_2;
005d1243          *(uint32_t*)eax_2 = this->_dtype;
005d1247          void* edx_4 = (*(uint32_t*)arg2 + 4);
005d124a          *(uint32_t*)arg2 = edx_4;
005d1251          *(uint32_t*)edx_4 = this->_dval;
005d1255          void* ecx_3 = (*(uint32_t*)arg2 + 4);
005d1258          *(uint32_t*)arg2 = ecx_3;
005d125f          *(uint32_t*)ecx_3 = ((float)((long double)this->_dvar));
005d1269          *(uint32_t*)arg2 += 4;
005d1266          this->_acache.vtable->Pack(arg2, arg3);
005d1275          **(uint32_t**)arg2 = this->_bh;
005d1277          *(uint32_t*)arg2 += 4;
005d127a          class BodyPartSelectionData* _bpsd = this->_bpsd;
005d127a          
005d127f          if (_bpsd != 0)
005d1281              _bpsd->vtable->Pack(arg2, arg3);
005d1223      }
005d1223      
005d128e      return result;
005d1210  }

005d1291                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005d12a0  int32_t __thiscall BodyPart::UnPack(class BodyPart* this, void** arg2, uint32_t arg3)

005d12a0  {
005d12a0      class BodyPart* this_1 = this;
005d12a3      void** esi = arg2;
005d12a7      void* eax = *(uint32_t*)esi;
005d12ac      struct ArmorCache::VTable* vtable = this->_acache.vtable;
005d12bf      arg2 = nullptr;
005d12bf      
005d12d3      if (arg3 >= (vtable->Pack(&arg2, 0) + 0x14))
005d12d3      {
005d12db          void* eax_4 = (*(uint32_t*)esi + 4);
005d12df          int32_t ebp_1 = *(uint32_t*)((char*)eax_4 - 4);
005d12e2          *(uint32_t*)esi = eax_4;
005d12e6          this->_dtype = *(uint32_t*)eax_4;
005d12eb          void* eax_6 = (*(uint32_t*)esi + 4);
005d12ee          *(uint32_t*)esi = eax_6;
005d12f2          this->_dval = *(uint32_t*)eax_6;
005d12f7          void* edx_2 = (*(uint32_t*)esi + 4);
005d12fa          *(uint32_t*)esi = edx_2;
005d1300          this->_dvar = *(uint32_t*)edx_2;
005d1309          *(uint32_t*)esi += 4;
005d12b3          this->_acache.vtable->UnPack(esi, arg3);
005d1317          this->_bh = **(uint32_t**)esi;
005d1321          *(uint32_t*)esi += 4;
005d1321          
005d1324          if (ebp_1 == 0)
005d1324          {
005d135b              class BodyPartSelectionData* _bpsd = this->_bpsd;
005d135b              
005d1360              if (_bpsd != 0)
005d1360              {
005d1362                  _bpsd->vtable->__vecDelDtor(1);
005d1368                  this->_bpsd = nullptr;
005d1360              }
005d1324          }
005d1324          else
005d1324          {
005d132b              if (this->_bpsd == 0)
005d132b              {
005d132f                  void* eax_13 = operator new(0x34);
005d1339                  class BodyPartSelectionData* eax_14;
005d1339                  
005d1339                  if (eax_13 == 0)
005d1344                      eax_14 = nullptr;
005d1339                  else
005d133d                      eax_14 = BodyPartSelectionData::BodyPartSelectionData(eax_13);
005d133d                  
005d1346                  this->_bpsd = eax_14;
005d132b              }
005d132b              
005d134d              this->_bpsd->vtable->UnPack(esi, arg3);
005d1324          }
005d1324          
005d137d          if (arg3 >= (*(uint32_t*)esi - eax))
005d1393              return 1;
005d1393          
005d137f          *(uint32_t*)esi = eax;
005d12d3      }
005d12d3      
005d1387      return 0;
005d12a0  }

005d1396                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005d13a0  class BodyPart& __thiscall BodyPart::operator=(class BodyPart* this, class BodyPart const& arg2)

005d13a0  {
005d13aa      if (arg2 != this)
005d13aa      {
005d13b3          this->_dtype = arg2->_dtype;
005d13b9          this->_dval = arg2->_dval;
005d13bf          this->_dvar = arg2->_dvar;
005d13c5          this->_acache._base_armor = arg2->_acache._base_armor;
005d13cb          this->_acache._armor_vs_slash = arg2->_acache._armor_vs_slash;
005d13d1          this->_acache._armor_vs_pierce = arg2->_acache._armor_vs_pierce;
005d13d7          this->_acache._armor_vs_bludgeon = arg2->_acache._armor_vs_bludgeon;
005d13dd          this->_acache._armor_vs_cold = arg2->_acache._armor_vs_cold;
005d13e3          this->_acache._armor_vs_fire = arg2->_acache._armor_vs_fire;
005d13e9          this->_acache._armor_vs_acid = arg2->_acache._armor_vs_acid;
005d13ef          this->_acache._armor_vs_electric = arg2->_acache._armor_vs_electric;
005d13f5          this->_acache._armor_vs_nether = arg2->_acache._armor_vs_nether;
005d13fb          class BodyPartSelectionData* _bpsd_1 = this->_bpsd;
005d13fe          this->_bh = arg2->_bh;
005d1401          class BodyPartSelectionData* _bpsd = arg2->_bpsd;
005d1401          
005d1406          if (_bpsd != 0)
005d1406          {
005d140a              if (_bpsd_1 != 0)
005d140a              {
005d143c                  BodyPartSelectionData::operator=(_bpsd_1, _bpsd);
005d1445                  return this;
005d140a              }
005d140a              
005d140e              void* eax_6 = operator new(0x34);
005d140e              
005d1418              if (eax_6 != 0)
005d1418              {
005d1425                  this->_bpsd = BodyPartSelectionData::BodyPartSelectionData(eax_6, arg2->_bpsd);
005d142c                  return this;
005d1418              }
005d1418              
005d1431              this->_bpsd = nullptr;
005d1438              return this;
005d1406          }
005d1406          
005d144a          if (_bpsd_1 != 0)
005d144a          {
005d144c              _bpsd_1->vtable->__vecDelDtor(1);
005d1452              this->_bpsd = nullptr;
005d144a          }
005d13aa      }
005d13aa      
005d145d      return this;
005d13a0  }


005d1460  void __thiscall BodyPart::BodyPart(class BodyPart* this, class BodyPart const* arg2)

005d1460  {
005d1465      this->_dtype = UNDEF_DAMAGE_TYPE;
005d1468      this->_dval = 0;
005d146b      this->_dvar = 0f;
005d146e      this->vtable = 0x7e4380;
005d1474      __builtin_memset(&this->_acache._base_armor, 0, 0x2c);
005d148f      this->_acache.vtable = 0x7e436c;
005d14a1      BodyPart::operator=(this, arg2);
005d1460  }

005d14ac                                      90 90 90 90                                                              ....

005d14b0  uint32_t __thiscall ArmorCache::Pack(class ArmorCache* this, void** arg2, uint32_t arg3)

005d14b0  {
005d14b5      if (arg3 >= 0x24)
005d14b5      {
005d14c1          **(uint32_t**)arg2 = this->_base_armor;
005d14c5          void* esi_3 = (*(uint32_t*)arg2 + 4);
005d14c8          *(uint32_t*)arg2 = esi_3;
005d14cf          *(uint32_t*)esi_3 = this->_armor_vs_slash;
005d14d3          void* edx_4 = (*(uint32_t*)arg2 + 4);
005d14d6          *(uint32_t*)arg2 = edx_4;
005d14db          *(uint32_t*)edx_4 = this->_armor_vs_pierce;
005d14df          void* esi_7 = (*(uint32_t*)arg2 + 4);
005d14e2          *(uint32_t*)arg2 = esi_7;
005d14e9          *(uint32_t*)esi_7 = this->_armor_vs_bludgeon;
005d14ed          void* edx_7 = (*(uint32_t*)arg2 + 4);
005d14f0          *(uint32_t*)arg2 = edx_7;
005d14f5          *(uint32_t*)edx_7 = this->_armor_vs_cold;
005d14f9          void* esi_11 = (*(uint32_t*)arg2 + 4);
005d14fc          *(uint32_t*)arg2 = esi_11;
005d1503          *(uint32_t*)esi_11 = this->_armor_vs_fire;
005d1507          void* edx_10 = (*(uint32_t*)arg2 + 4);
005d150a          *(uint32_t*)arg2 = edx_10;
005d150f          *(uint32_t*)edx_10 = this->_armor_vs_acid;
005d1513          void* esi_15 = (*(uint32_t*)arg2 + 4);
005d1516          *(uint32_t*)arg2 = esi_15;
005d151d          *(uint32_t*)esi_15 = this->_armor_vs_electric;
005d1521          void* edx_13 = (*(uint32_t*)arg2 + 4);
005d1524          *(uint32_t*)arg2 = edx_13;
005d1529          *(uint32_t*)edx_13 = this->_armor_vs_nether;
005d152b          *(uint32_t*)arg2 += 4;
005d14b5      }
005d14b5      
005d1534      return 0x24;
005d14b0  }

005d1537                                                                       90 90 90 90 90 90 90 90 90                         .........

005d1540  int32_t __thiscall ArmorCache::UnPack(class ArmorCache* this, void** arg2, uint32_t arg3)

005d1540  {
005d1544      void* edx = *(uint32_t*)arg2;
005d1544      
005d154e      if (arg3 >= 0x24)
005d154e      {
005d1553          this->_base_armor = *(uint32_t*)edx;
005d1558          void* esi_3 = (*(uint32_t*)arg2 + 4);
005d155b          *(uint32_t*)arg2 = esi_3;
005d155f          this->_armor_vs_slash = *(uint32_t*)esi_3;
005d1564          void* esi_6 = (*(uint32_t*)arg2 + 4);
005d1567          *(uint32_t*)arg2 = esi_6;
005d156b          this->_armor_vs_pierce = *(uint32_t*)esi_6;
005d1570          void* esi_9 = (*(uint32_t*)arg2 + 4);
005d1573          *(uint32_t*)arg2 = esi_9;
005d1577          this->_armor_vs_bludgeon = *(uint32_t*)esi_9;
005d157c          void* esi_12 = (*(uint32_t*)arg2 + 4);
005d157f          *(uint32_t*)arg2 = esi_12;
005d1583          this->_armor_vs_cold = *(uint32_t*)esi_12;
005d1588          void* esi_15 = (*(uint32_t*)arg2 + 4);
005d158b          *(uint32_t*)arg2 = esi_15;
005d158f          this->_armor_vs_fire = *(uint32_t*)esi_15;
005d1594          void* esi_18 = (*(uint32_t*)arg2 + 4);
005d1597          *(uint32_t*)arg2 = esi_18;
005d159b          this->_armor_vs_acid = *(uint32_t*)esi_18;
005d15a0          void* esi_21 = (*(uint32_t*)arg2 + 4);
005d15a3          *(uint32_t*)arg2 = esi_21;
005d15a7          this->_armor_vs_electric = *(uint32_t*)esi_21;
005d15ac          void* esi_24 = (*(uint32_t*)arg2 + 4);
005d15af          *(uint32_t*)arg2 = esi_24;
005d15b3          this->_armor_vs_nether = *(uint32_t*)esi_24;
005d15b8          void* ecx_1 = (*(uint32_t*)arg2 + 4);
005d15bb          *(uint32_t*)arg2 = ecx_1;
005d15bb          
005d15c2          if (arg3 >= ((char*)ecx_1 - edx))
005d15d2              return 1;
005d15d2          
005d15c4          *(uint32_t*)arg2 = edx;
005d154e      }
005d154e      
005d15c9      return 0;
005d1540  }

005d15d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d15e0  uint32_t __thiscall BodyPartSelectionData::Pack(class BodyPartSelectionData* this, void** arg2, uint32_t arg3)

005d15e0  {
005d15e5      int32_t result = this->vtable->GetPackSize();
005d15e5      
005d15ec      if (arg3 >= result)
005d15ec      {
005d15fb          **(uint32_t**)arg2 = ((float)((long double)this->HLF));
005d15ff          void* edx_3 = (*(uint32_t*)arg2 + 4);
005d1602          *(uint32_t*)arg2 = edx_3;
005d1607          *(uint32_t*)edx_3 = ((float)((long double)this->MLF));
005d160b          void* edx_5 = (*(uint32_t*)arg2 + 4);
005d160e          *(uint32_t*)arg2 = edx_5;
005d1613          *(uint32_t*)edx_5 = ((float)((long double)this->LLF));
005d1617          void* edx_7 = (*(uint32_t*)arg2 + 4);
005d161a          *(uint32_t*)arg2 = edx_7;
005d161f          *(uint32_t*)edx_7 = ((float)((long double)this->HRF));
005d1623          void* edx_9 = (*(uint32_t*)arg2 + 4);
005d1626          *(uint32_t*)arg2 = edx_9;
005d162b          *(uint32_t*)edx_9 = ((float)((long double)this->MRF));
005d162f          void* edx_11 = (*(uint32_t*)arg2 + 4);
005d1632          *(uint32_t*)arg2 = edx_11;
005d1637          *(uint32_t*)edx_11 = ((float)((long double)this->LRF));
005d163b          void* edx_13 = (*(uint32_t*)arg2 + 4);
005d163e          *(uint32_t*)arg2 = edx_13;
005d1643          *(uint32_t*)edx_13 = ((float)((long double)this->HLB));
005d1647          void* edx_15 = (*(uint32_t*)arg2 + 4);
005d164a          *(uint32_t*)arg2 = edx_15;
005d164f          *(uint32_t*)edx_15 = ((float)((long double)this->MLB));
005d1653          void* edx_17 = (*(uint32_t*)arg2 + 4);
005d1656          *(uint32_t*)arg2 = edx_17;
005d165b          *(uint32_t*)edx_17 = ((float)((long double)this->LLB));
005d165f          void* edx_19 = (*(uint32_t*)arg2 + 4);
005d1662          *(uint32_t*)arg2 = edx_19;
005d1667          *(uint32_t*)edx_19 = ((float)((long double)this->HRB));
005d166b          void* edx_21 = (*(uint32_t*)arg2 + 4);
005d166e          *(uint32_t*)arg2 = edx_21;
005d1673          *(uint32_t*)edx_21 = ((float)((long double)this->MRB));
005d1677          float* edx_23 = (*(uint32_t*)arg2 + 4);
005d167a          *(uint32_t*)arg2 = edx_23;
005d167f          *(uint32_t*)edx_23 = ((float)((long double)this->LRB));
005d1681          *(uint32_t*)arg2 += 4;
005d15ec      }
005d15ec      
005d1685      return result;
005d15e0  }

005d1688                          90 90 90 90 90 90 90 90                                                          ........

005d1690  int32_t __thiscall BodyPartSelectionData::UnPack(class BodyPartSelectionData* this, void** arg2, uint32_t arg3)

005d1690  {
005d169c      if (arg3 < this->vtable->GetPackSize())
005d16a1          return 0;
005d16a1      
005d16ac      this->HLF = **(uint32_t**)arg2;
005d16b1      void* edx_2 = (*(uint32_t*)arg2 + 4);
005d16b4      *(uint32_t*)arg2 = edx_2;
005d16ba      this->MLF = *(uint32_t*)edx_2;
005d16bf      void* ecx_4 = (*(uint32_t*)arg2 + 4);
005d16c2      *(uint32_t*)arg2 = ecx_4;
005d16c6      this->LLF = *(uint32_t*)ecx_4;
005d16cb      void* edx_5 = (*(uint32_t*)arg2 + 4);
005d16ce      *(uint32_t*)arg2 = edx_5;
005d16d4      this->HRF = *(uint32_t*)edx_5;
005d16d9      void* ecx_8 = (*(uint32_t*)arg2 + 4);
005d16dc      *(uint32_t*)arg2 = ecx_8;
005d16e0      this->MRF = *(uint32_t*)ecx_8;
005d16e5      void* edx_8 = (*(uint32_t*)arg2 + 4);
005d16e8      *(uint32_t*)arg2 = edx_8;
005d16ee      this->LRF = *(uint32_t*)edx_8;
005d16f3      void* ecx_12 = (*(uint32_t*)arg2 + 4);
005d16f6      *(uint32_t*)arg2 = ecx_12;
005d16fa      this->HLB = *(uint32_t*)ecx_12;
005d16ff      void* edx_11 = (*(uint32_t*)arg2 + 4);
005d1702      *(uint32_t*)arg2 = edx_11;
005d1708      this->MLB = *(uint32_t*)edx_11;
005d170d      void* ecx_16 = (*(uint32_t*)arg2 + 4);
005d1710      *(uint32_t*)arg2 = ecx_16;
005d1714      this->LLB = *(uint32_t*)ecx_16;
005d1719      void* edx_14 = (*(uint32_t*)arg2 + 4);
005d171c      *(uint32_t*)arg2 = edx_14;
005d1722      this->HRB = *(uint32_t*)edx_14;
005d1727      void* ecx_20 = (*(uint32_t*)arg2 + 4);
005d172a      *(uint32_t*)arg2 = ecx_20;
005d172e      this->MRB = *(uint32_t*)ecx_20;
005d1733      void* edx_17 = (*(uint32_t*)arg2 + 4);
005d1736      *(uint32_t*)arg2 = edx_17;
005d173c      this->LRB = *(uint32_t*)edx_17;
005d173f      *(uint32_t*)arg2 += 4;
005d1748      return 1;
005d1690  }

005d174b                                   90 90 90 90 90                                                             .....

005d1750  void __fastcall ItemProfile::Clear(class ItemProfile* this)

005d1750  {
005d1753      class PublicWeenieDesc* pwd = this->pwd;
005d1753      
005d1758      if (pwd != 0)
005d1758      {
005d175a          pwd->vtable->__vecDelDtor(1);
005d1760          this->pwd = nullptr;
005d1758      }
005d1750  }

005d1769                             90 90 90 90 90 90 90                                                           .......

005d1770  class ItemProfile& __thiscall ItemProfile::operator=(class ItemProfile* this, class ItemProfile const& arg2)

005d1770  {
005d177a      if (this != arg2)
005d177a      {
005d177f          this->amount = arg2->amount;
005d1785          this->iid = arg2->iid;
005d1788          class PublicWeenieDesc* pwd = this->pwd;
005d1788          
005d178d          if (pwd != 0)
005d178d          {
005d178f              class PublicWeenieDesc* pwd_1 = arg2->pwd;
005d178f              
005d1794              if (pwd_1 != 0)
005d1794              {
005d1797                  PublicWeenieDesc::operator=(pwd, pwd_1);
005d17a0                  return this;
005d1794              }
005d1794              
005d17a3              pwd->vtable->__vecDelDtor(1);
005d17aa              this->pwd = nullptr;
005d17b4              return this;
005d178d          }
005d178d          
005d17bc          if (arg2->pwd != 0)
005d17bc          {
005d17c3              void* eax_5 = operator new(0xb0);
005d17cd              class PublicWeenieDesc* eax_6;
005d17cd              
005d17cd              if (eax_5 == 0)
005d17d8                  eax_6 = nullptr;
005d17cd              else
005d17d1                  eax_6 = PublicWeenieDesc::PublicWeenieDesc(eax_5);
005d17d1              
005d17da              this->pwd = eax_6;
005d17e3              PublicWeenieDesc::operator=(eax_6, arg2->pwd);
005d17bc          }
005d177a      }
005d177a      
005d17ec      return this;
005d1770  }

005d17ef                                               90                                                                 .

005d17f0  int32_t __thiscall ItemProfile::operator==(class ItemProfile* this, class ItemProfile const* arg2)

005d17f0  {
005d17f7      uint32_t eax = (this->iid - arg2->iid);
005d17fa      int32_t eax_1 = -(eax);
005d17ff      return ((eax_1 - eax_1) + 1);
005d17f0  }

005d1802        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005d1810  void __fastcall ItemProfile::ItemProfile(class ItemProfile* this)

005d1810  {
005d1814      this->vtable = 0x7e895c;
005d181a      this->amount = 0;
005d181d      this->iid = 0;
005d1820      this->pwd = nullptr;
005d1810  }

005d1824              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005d1830  void __fastcall ItemProfile::~ItemProfile(class ItemProfile* this)

005d1830  {
005d1833      class PublicWeenieDesc* pwd = this->pwd;
005d1838      this->vtable = 0x7e895c;
005d1838      
005d183e      if (pwd != 0)
005d183e      {
005d1840          pwd->vtable->__vecDelDtor(1);
005d1846          this->pwd = nullptr;
005d183e      }
005d183e      
005d184d      this->vtable = 0x79285c;
005d1830  }

005d1855                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d1860  void __thiscall ItemProfile::ItemProfile(class ItemProfile* this, class ItemProfile const* arg2)

005d1860  {
005d1865      this->amount = 0;
005d1868      this->iid = 0;
005d186b      this->pwd = nullptr;
005d1873      this->vtable = 0x7e895c;
005d1879      ItemProfile::operator=(this, arg2);
005d1860  }

005d1884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005d1890  uint32_t __thiscall ItemProfile::Pack(class ItemProfile* this, void** arg2, uint32_t arg3)

005d1890  {
005d1890      class ItemProfile* this_1 = this;
005d1894      class PublicWeenieDesc* pwd = this->pwd;
005d189a      int32_t result = 8;
005d189a      
005d189f      if (pwd != 0)
005d189f      {
005d18a7          this_1 = nullptr;
005d18b7          result = (pwd->vtable->Pack(&this_1, 0) + 8);
005d189f      }
005d189f      
005d18c0      if (arg3 >= result)
005d18c0      {
005d18c5          int32_t eax_3 = 0;
005d18c5          
005d18c9          if (this->pwd != 0)
005d18cb              eax_3 = 0xffffffff;
005d18cb          
005d18e3          **(uint32_t**)arg2 = ((this->amount & 0xffffff) | (eax_3 << 0x18));
005d18e7          void* ecx_5 = (*(uint32_t*)arg2 + 4);
005d18ea          *(uint32_t*)arg2 = ecx_5;
005d18ef          *(uint32_t*)ecx_5 = this->iid;
005d18f1          *(uint32_t*)arg2 += 4;
005d18f4          class PublicWeenieDesc* pwd_1 = this->pwd;
005d18f4          
005d18fa          if (pwd_1 != 0)
005d18fc              pwd_1->vtable->Pack(arg2, arg3);
005d18c0      }
005d18c0      
005d1908      return result;
005d1890  }

005d190b                                   90 90 90 90 90                                                             .....

005d1910  int32_t __thiscall ItemProfile::UnPack(class ItemProfile* this, void** arg2, uint32_t arg3)

005d1910  {
005d191a      class PublicWeenieDesc* pwd = this->pwd;
005d191f      int32_t eax = 8;
005d191f      
005d1924      if (pwd != 0)
005d1924      {
005d192c          int32_t var_9c = 0;
005d193a          eax = (pwd->vtable->Pack(&var_9c, 0) + 8);
005d1924      }
005d1924      
005d1946      if (arg3 < eax)
005d1952          return 0;
005d1952      
005d195d      void* eax_4 = *(uint32_t*)arg2;
005d195f      int32_t ecx = *(uint32_t*)eax_4;
005d1964      *(uint32_t*)arg2 = ((char*)eax_4 + 4);
005d1968      int32_t eax_7 = (ecx & 0xffffff);
005d1972      this->amount = eax_7;
005d1972      
005d1975      if ((eax_7 & "activation type (%s) with '%s' b…") != 0)
005d197c          this->amount = (eax_7 | 0xff000000);
005d197c      
005d1983      this->iid = **(uint32_t**)arg2;
005d198b      int32_t ecx_1 = (ecx >> 0x18);
005d1991      *(uint32_t*)arg2 += 4;
005d1991      
005d1993      if (ecx_1 == 0xffffffff)
005d1993      {
005d1a0a          if (this->pwd == 0)
005d1a0a          {
005d1a11              void* eax_16 = operator new(0xb0);
005d1a1b              class PublicWeenieDesc* eax_17;
005d1a1b              
005d1a1b              if (eax_16 == 0)
005d1a26                  eax_17 = nullptr;
005d1a1b              else
005d1a1f                  eax_17 = PublicWeenieDesc::PublicWeenieDesc(eax_16);
005d1a1f              
005d1a28              this->pwd = eax_17;
005d1a0a          }
005d1a0a          
005d1a2b          this->pwd->vtable->UnPack(arg2, arg3);
005d1993      }
005d1993      else
005d1993      {
005d1998          if (ecx_1 == 1)
005d1998          {
005d19c7              void var_98;
005d19c7              OldPublicWeenieDesc::OldPublicWeenieDesc(&var_98);
005d19d2              OldPublicWeenieDesc::UnPack(&var_98, arg2, arg3);
005d19d7              class PublicWeenieDesc* pwd_2 = this->pwd;
005d19d7              
005d19dc              if (pwd_2 != 0)
005d19dc              {
005d19de                  pwd_2->vtable->__vecDelDtor(1);
005d19e4                  this->pwd = nullptr;
005d19dc              }
005d19dc              
005d19ef              OldPublicWeenieDesc::~OldPublicWeenieDesc(&var_98);
005d1a02              return 1;
005d1998          }
005d1998          
005d199a          class PublicWeenieDesc* pwd_1 = this->pwd;
005d199a          
005d199f          if (pwd_1 != 0)
005d199f          {
005d19a5              pwd_1->vtable->__vecDelDtor(1);
005d19ac              this->pwd = nullptr;
005d199f          }
005d1993      }
005d1993      
005d1a43      return 1;
005d1910  }

005d1a46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005d1a50  void* __thiscall ItemProfile::`scalar deleting destructor'(class ItemProfile* this, uint32_t arg2)

005d1a50  {
005d1a53      class PublicWeenieDesc* pwd = this->pwd;
005d1a58      this->vtable = 0x7e895c;
005d1a58      
005d1a5e      if (pwd != 0)
005d1a5e      {
005d1a60          pwd->vtable->__vecDelDtor(1);
005d1a66          this->pwd = nullptr;
005d1a5e      }
005d1a5e      
005d1a72      this->vtable = 0x79285c;
005d1a72      
005d1a78      if ((arg2 & 1) != 0)
005d1a7b          operator delete(this);
005d1a7b      
005d1a86      return this;
005d1a50  }

005d1a89                             90 90 90 90 90 90 90                                                           .......

005d1a90  uint32_t __thiscall VendorProfile::InqAcceptability(class VendorProfile* this, class PublicWeenieDesc* arg2)

005d1a90  {
005d1a94      uint32_t item_types = this->item_types;
005d1a98      enum ITEM_TYPE _type = arg2->_type;
005d1a98      
005d1aa7      if (((_type & item_types) == 0 || (*(uint8_t*)((char*)arg2->_bitfield)[3] & 1) != 0))
005d1af8          return item_types;
005d1af8      
005d1aa9      uint32_t _value = arg2->_value;
005d1aad      uint32_t _stackSize = arg2->_stackSize;
005d1aad      
005d1ab2      if (_stackSize > 0)
005d1ab6          _value = (COMBINE(0, _value) / _stackSize);
005d1ab6      
005d1abb      if (_value == 0)
005d1ac3          return 2;
005d1ac3      
005d1ac6      int32_t max_value = this->max_value;
005d1ac6      
005d1ad0      if ((max_value != 0xffffffff && _value > max_value))
005d1add          return (!((_type >> 0x10)) & 4);
005d1add      
005d1ae0      int32_t min_value = this->min_value;
005d1ae0      
005d1aea      if ((min_value != 0xffffffff && _value < min_value))
005d1af2          return 3;
005d1af2      
005d1af5      return 0;
005d1a90  }

005d1afb                                                                                   90 90 90 90 90                             .....

005d1b00  int32_t __thiscall VendorProfile::VendorSellPrice(class VendorProfile* this, class PublicWeenieDesc* arg2, uint32_t arg3)

005d1b00  {
005d1b04      enum ITEM_TYPE _type = arg2->_type;
005d1b07      float sell_price = this->sell_price;
005d1b0b      uint32_t _stackSize = arg2->_stackSize;
005d1b10      uint32_t _value = arg2->_value;
005d1b10      
005d1b13      if (_stackSize <= 0)
005d1b40          return ShopSystem::SellPrice(_value, _type, sell_price, arg3);
005d1b40      
005d1b2c      return ShopSystem::SellPrice((COMBINE(0, _value) / _stackSize), _type, sell_price, arg3);
005d1b00  }

005d1b43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005d1b50  int32_t __thiscall VendorProfile::IsAcceptable(class VendorProfile* this, class PublicWeenieDesc* arg2)

005d1b50  {
005d1b55      uint32_t eax = VendorProfile::InqAcceptability(this, arg2);
005d1b5a      int32_t eax_1 = -(eax);
005d1b5f      return ((eax_1 - eax_1) + 1);
005d1b50  }

005d1b62        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005d1b70  int32_t __thiscall VendorProfile::VendorBuyPrice(class VendorProfile* this, class PublicWeenieDesc* arg2, class PublicWeenieDesc* arg3)

005d1b70  {
005d1b80      if (VendorProfile::InqAcceptability(this, arg3) != 0)
005d1b86          return 0;
005d1b86      
005d1b89      uint32_t _stackSize = arg3->_stackSize;
005d1b89      
005d1b8e      if (_stackSize <= 0)
005d1bc6          return ShopSystem::BuyPrice(arg3->_value, arg3->_type, this->buy_price, 1);
005d1bc6      
005d1bab      return ShopSystem::BuyPrice((COMBINE(0, arg3->_value) / _stackSize), arg3->_type, this->buy_price, _stackSize);
005d1b70  }

005d1bc9                             90 90 90 90 90 90 90                                                           .......

005d1bd0  class IDClass<_tagDataID,32,0>* __thiscall VendorProfile::VendorTradeCurrency(class VendorProfile* this, class IDClass<_tagDataID,32,0>* __return)

005d1bd0  {
005d1bd3      uint32_t* result = __return;
005d1bd7      *(uint32_t*)result = this->trade_id.id;
005d1bd9      return result;
005d1bd0  }

005d1bdc                                                                                      90 90 90 90                              ....

005d1be0  void __fastcall VendorProfile::VendorProfile(class VendorProfile* this)

005d1be0  {
005d1be5      this->item_types = 0;
005d1beb      this->magic = 0;
005d1bee      this->vtable = 0x7e8970;
005d1bf4      this->min_value = 0xffffffff;
005d1bf7      this->max_value = 0xffffffff;
005d1bfa      __builtin_strncpy(&this->buy_price, "fff?", 4);
005d1c01      this->sell_price = 1.10000002f;
005d1c0e      this->trade_num = 0;
005d1c11      this->trade_id.id = INVALID_DID.id;
005d1c14      class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d1c20      this->trade_name.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005d1c23      InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
005d1be0  }

005d1c2d                                         90 90 90                                                               ...

005d1c30  void* __thiscall VendorProfile::`scalar deleting destructor'(class VendorProfile* this, uint32_t arg2)

005d1c30  {
005d1c36      AC1Legacy::PStringBase<char>::~PStringBase<char>(&this->trade_name);
005d1c40      this->vtable = 0x79285c;
005d1c40      
005d1c46      if ((arg2 & 1) != 0)
005d1c49          operator delete(this);
005d1c49      
005d1c54      return this;
005d1c30  }

005d1c57                                                                       90 90 90 90 90 90 90 90 90                         .........

005d1c60  uint32_t __fastcall VendorProfile::GetPackSize(class VendorProfile* this)

005d1c60  {
005d1c60      class VendorProfile* this_1 = this;
005d1c6b      this_1 = nullptr;
005d1c7c      return (AC1Legacy::PStringBase<char>::Pack(&this->trade_name, &this_1, 0) + 0x20);
005d1c60  }

005d1c7d                                                                                         90 90 90                               ...

005d1c80  uint32_t __thiscall VendorProfile::Pack(class VendorProfile* this, void** arg2, uint32_t arg3)

005d1c80  {
005d1c86      int32_t result = this->vtable->GetPackSize();
005d1c86      
005d1c91      if (arg3 >= result)
005d1c91      {
005d1c9d          **(uint32_t**)arg2 = this->item_types;
005d1ca1          void* ebx_3 = (*(uint32_t*)arg2 + 4);
005d1ca4          *(uint32_t*)arg2 = ebx_3;
005d1cab          *(uint32_t*)ebx_3 = this->min_value;
005d1caf          void* ecx_3 = (*(uint32_t*)arg2 + 4);
005d1cb2          *(uint32_t*)arg2 = ecx_3;
005d1cb7          *(uint32_t*)ecx_3 = this->max_value;
005d1cbb          void* ebx_7 = (*(uint32_t*)arg2 + 4);
005d1cbe          *(uint32_t*)arg2 = ebx_7;
005d1cc5          *(uint32_t*)ebx_7 = this->magic;
005d1cc9          void* ecx_6 = (*(uint32_t*)arg2 + 4);
005d1ccc          *(uint32_t*)arg2 = ecx_6;
005d1cd1          *(uint32_t*)ecx_6 = ((float)((long double)this->buy_price));
005d1cd5          void* ebx_10 = (*(uint32_t*)arg2 + 4);
005d1cd8          *(uint32_t*)arg2 = ebx_10;
005d1cdf          *(uint32_t*)ebx_10 = ((float)((long double)this->sell_price));
005d1ce3          void* ecx_9 = (*(uint32_t*)arg2 + 4);
005d1ce6          *(uint32_t*)arg2 = ecx_9;
005d1ceb          *(uint32_t*)ecx_9 = this->trade_id.id;
005d1cef          void* ebx_13 = (*(uint32_t*)arg2 + 4);
005d1cf2          *(uint32_t*)arg2 = ebx_13;
005d1cf9          *(uint32_t*)ebx_13 = this->trade_num;
005d1d01          *(uint32_t*)arg2 += 4;
005d1d07          AC1Legacy::PStringBase<char>::Pack(&this->trade_name, arg2, arg3);
005d1c91      }
005d1c91      
005d1d11      return result;
005d1c80  }

005d1d14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005d1d20  int32_t __thiscall VendorProfile::UnPack(class VendorProfile* this, void** arg2, uint32_t arg3)

005d1d20  {
005d1d2f      if (arg3 < this->vtable->GetPackSize())
005d1d35          return 0;
005d1d35      
005d1d40      this->item_types = **(uint32_t**)arg2;
005d1d45      void* ecx_2 = (*(uint32_t*)arg2 + 4);
005d1d48      *(uint32_t*)arg2 = ecx_2;
005d1d4c      this->min_value = *(uint32_t*)ecx_2;
005d1d51      void* edx_2 = (*(uint32_t*)arg2 + 4);
005d1d54      *(uint32_t*)arg2 = edx_2;
005d1d5a      this->max_value = *(uint32_t*)edx_2;
005d1d5f      void* ecx_6 = (*(uint32_t*)arg2 + 4);
005d1d62      *(uint32_t*)arg2 = ecx_6;
005d1d66      this->magic = *(uint32_t*)ecx_6;
005d1d6b      void* edx_5 = (*(uint32_t*)arg2 + 4);
005d1d6e      *(uint32_t*)arg2 = edx_5;
005d1d74      this->buy_price = *(uint32_t*)edx_5;
005d1d79      void* ecx_10 = (*(uint32_t*)arg2 + 4);
005d1d7c      *(uint32_t*)arg2 = ecx_10;
005d1d80      this->sell_price = *(uint32_t*)ecx_10;
005d1d85      void* edx_8 = (*(uint32_t*)arg2 + 4);
005d1d88      *(uint32_t*)arg2 = edx_8;
005d1d8c      class IDClass<_tagDataID,32,0> edx_9 = *(uint32_t*)edx_8;
005d1d91      *(uint32_t*)arg2 = ((char*)edx_8 + 4);
005d1d93      this->trade_id.id = edx_9;
005d1d9a      this->trade_num = **(uint32_t**)arg2;
005d1da3      *(uint32_t*)arg2 += 4;
005d1da9      AC1Legacy::PStringBase<char>::UnPack(&this->trade_name, arg2, arg3);
005d1db5      return 1;
005d1d20  }

005d1db8                                                                          90 90 90 90 90 90 90 90                          ........

005d1dc0  class PageData* __thiscall PageDataList::Get(class PageDataList* this, int32_t arg2)

005d1dc0  {
005d1dcb      if ((arg2 < this->numPages && arg2 >= 0))
005d1dcb      {
005d1dcd          class PageData* i = this->first;
005d1dd0          int32_t ecx = 0;
005d1dd0          
005d1dd4          if (arg2 <= 0)
005d1de7              return i;
005d1de7          
005d1dd8          while (i != 0)
005d1dd8          {
005d1dda              i = i->next;
005d1ddd              ecx += 1;
005d1ddd              
005d1de0              if (ecx >= arg2)
005d1de2                  return i;
005d1dd8          }
005d1dcb      }
005d1dcb      
005d1de5      return nullptr;
005d1dc0  }

005d1dea                                90 90 90 90 90 90                                                            ......

005d1df0  void __fastcall PageDataList::PageDataList(class PageDataList* this)

005d1df0  {
005d1df4      this->vtable = 0x7e8984;
005d1dfa      __builtin_memset(&this->first, 0, 0x14);
005d1e09      this->packWithText = 1;
005d1df0  }

005d1e11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005d1e20  void __thiscall PageDataList::Insert(class PageDataList* this, class PageData* arg2, int32_t arg3)

005d1e20  {
005d1e26      if (arg3 == 0)
005d1e26      {
005d1e2c          arg2->prev = arg3;
005d1e32          arg2->next = this->first;
005d1e35          class PageData* first = this->first;
005d1e35          
005d1e3a          if (first == 0)
005d1e3a          {
005d1e48              this->last = arg2;
005d1e4b              this->first = arg2;
005d1e4e              this->numPages += 1;
005d1e51              return;
005d1e3a          }
005d1e3a          
005d1e3c          first->prev = arg2;
005d1e3f          this->first = arg2;
005d1e42          this->numPages += 1;
005d1e45          return;
005d1e26      }
005d1e26      
005d1e57      if (arg3 >= this->numPages)
005d1e57      {
005d1e60          arg2->prev = this->last;
005d1e63          arg2->next = nullptr;
005d1e6a          class PageData* last = this->last;
005d1e6a          
005d1e6f          if (last == 0)
005d1e6f          {
005d1e7d              this->first = arg2;
005d1e80              this->last = arg2;
005d1e83              this->numPages += 1;
005d1e86              return;
005d1e6f          }
005d1e6f          
005d1e71          last->next = arg2;
005d1e74          this->last = arg2;
005d1e77          this->numPages += 1;
005d1e7a          return;
005d1e57      }
005d1e57      
005d1e8c      class PageData* i;
005d1e8c      
005d1e8c      if (arg3 < 0)
005d1ea5          i = nullptr;
005d1e8c      else
005d1e8c      {
005d1e8e          i = this->first;
005d1e91          int32_t esi_1 = 0;
005d1e91          
005d1e95          if (arg3 > 0)
005d1e95          {
005d1e99              while (i != 0)
005d1e99              {
005d1e9b                  i = i->next;
005d1e9e                  esi_1 += 1;
005d1e9e                  
005d1ea1                  if (esi_1 >= arg3)
005d1ea1                      goto label_5d1eae;
005d1e99              }
005d1e99              
005d1ea5              i = nullptr;
005d1e95          }
005d1e8c      }
005d1e8c      
005d1eae  label_5d1eae:
005d1eae      arg2->prev = i->prev;
005d1eb1      arg2->next = i;
005d1eb4      i->prev->next = arg2;
005d1eba      i->prev = arg2;
005d1ec2      this->numPages += 1;
005d1e20  }

005d1ec8                          90 90 90 90 90 90 90 90                                                          ........

005d1ed0  class PageData* __thiscall PageDataList::Remove(class PageDataList* this, int32_t arg2)

005d1ed0  {
005d1ede      if ((arg2 >= this->numPages || arg2 < 0))
005d1f12          return 0;
005d1f12      
005d1ee0      class PageData* result = this->first;
005d1ee3      int32_t edx_1 = 0;
005d1ee3      
005d1ee7      if (arg2 > 0)
005d1ee7      {
005d1efa          do
005d1efa          {
005d1ef2              if (result == 0)
005d1f12                  return 0;
005d1f12              
005d1ef4              result = result->next;
005d1ef7              edx_1 += 1;
005d1efa          } while (edx_1 < arg2);
005d1ee7      }
005d1ee7      
005d1efe      if (result != 0)
005d1efe      {
005d1f00          class PageData* prev = result->prev;
005d1f00          
005d1f05          if (prev == 0)
005d1f18              this->first = result->next;
005d1f05          else
005d1f0a              prev->next = result->next;
005d1f0a          
005d1f1b          class PageData* next = result->next;
005d1f1b          
005d1f20          if (next != 0)
005d1f20          {
005d1f25              next->prev = result->prev;
005d1f28              this->numPages -= 1;
005d1f2c              return result;
005d1f20          }
005d1f20          
005d1f32          this->last = result->prev;
005d1f35          this->numPages -= 1;
005d1efe      }
005d1efe      
005d1f39      return result;
005d1ed0  }

005d1f3c                                                                                      90 90 90 90                              ....

005d1f40  void __thiscall PageDataList::Delete(class PageDataList* this, int32_t arg2)

005d1f40  {
005d1f45      class PageData* eax = PageDataList::Remove(this, arg2);
005d1f45      
005d1f4c      if (eax == 0)
005d1f5c          return;
005d1f5c      
005d1f50      arg2 = 1;
005d1f5a      /* jump -> eax->vtable->__vecDelDtor */
005d1f40  }

005d1f5f                                                                                               90                                 .

005d1f60  void __fastcall PageDataList::Flush(class PageDataList* this)

005d1f60  {
005d1f68      while (this->first != 0)
005d1f68      {
005d1f75          if (this->numPages > 0)
005d1f75          {
005d1f77              class PageData* first = this->first;
005d1f77              
005d1f7c              if (first != 0)
005d1f7c              {
005d1f7e                  class PageData* prev = first->prev;
005d1f7e                  
005d1f83                  if (prev == 0)
005d1f90                      this->first = first->next;
005d1f83                  else
005d1f88                      prev->next = first->next;
005d1f88                  
005d1f93                  class PageData* next = first->next;
005d1f93                  
005d1f98                  if (next == 0)
005d1fa5                      this->last = first->prev;
005d1f98                  else
005d1f9d                      next->prev = first->prev;
005d1f9d                  
005d1fa8                  this->numPages -= 1;
005d1fab                  first->vtable->__vecDelDtor(1);
005d1f7c              }
005d1f75          }
005d1f68      }
005d1f60  }

005d1fba                                                                                90 90 90 90 90 90                            ......

005d1fc0  void __fastcall PageData::PageData(class PageData* this)

005d1fc0  {
005d1fc4      this->vtable = 0x7cc420;
005d1fcc      this->authorID = 0;
005d1fcf      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d1fe1      this->authorName.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005d1fe4      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005d1fe6      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d1ff2      this->authorAccount.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005d1ff5      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
005d1ff7      this->textIncluded = 1;
005d1ffe      this->ignoreAuthor = 0;
005d2001      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d200d      this->pageText.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005d2010      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005d2013      this->prev = nullptr;
005d2016      this->next = nullptr;
005d1fc0  }

005d201e                                                                                            90 90                                ..

005d2020  void __thiscall PageData::PageData(class PageData* this, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3, class AC1Legacy::PStringBase<char> const* arg4, class AC1Legacy::PStringBase<char> const* arg5, int32_t const arg6)

005d2020  {
005d202b      this->authorID = arg2;
005d202e      this->vtable = 0x7cc420;
005d2034      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg3->m_buffer;
005d203d      this->authorName.m_buffer = m_buffer;
005d2044      InterlockedIncrement(&m_buffer->m_cRef);
005d204a      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg4->m_buffer;
005d204c      this->authorAccount.m_buffer = m_buffer_1;
005d2053      InterlockedIncrement(&m_buffer_1->m_cRef);
005d205d      this->ignoreAuthor = arg6;
005d2060      this->textIncluded = 1;
005d2067      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg5->m_buffer;
005d2069      this->pageText.m_buffer = m_buffer_2;
005d2070      InterlockedIncrement(&m_buffer_2->m_cRef);
005d2074      this->prev = nullptr;
005d2077      this->next = nullptr;
005d2020  }

005d2081     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005d2090  void __fastcall PageDataList::~PageDataList(class PageDataList* this)

005d2090  {
005d2093      this->vtable = 0x7e8984;
005d2099      PageDataList::Flush(this);
005d209e      this->vtable = 0x79285c;
005d2090  }

005d20a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005d20b0  int32_t __thiscall PageDataList::UnPack(class PageDataList* this, void** arg2, uint32_t arg3)

005d20b0  {
005d20b7      void** edi = arg2;
005d20c1      arg3 += *(uint32_t*)edi;
005d20c5      PageDataList::Flush(this);
005d20ce      this->maxNumPages = **(uint32_t**)edi;
005d20d3      void* edx_1 = (*(uint32_t*)edi + 4);
005d20d6      *(uint32_t*)edi = edx_1;
005d20dc      this->maxNumCharsPerPage = *(uint32_t*)edx_1;
005d20e1      void* ecx_2 = (*(uint32_t*)edi + 4);
005d20e6      *(uint32_t*)edi = ecx_2;
005d20e8      void** ecx_3 = *(uint32_t*)ecx_2;
005d20ef      *(uint32_t*)edi = ((char*)ecx_2 + 4);
005d20ef      
005d20f1      if (ecx_3 > 0)
005d20f1      {
005d20fe          arg2 = ecx_3;
005d21ab          bool cond:1_1;
005d21ab          
005d21ab          do
005d21ab          {
005d2109              void* esi_1 = operator new(0x24);
005d2109              
005d2110              if (esi_1 == 0)
005d2169                  esi_1 = nullptr;
005d2110              else
005d2110              {
005d2112                  *(uint32_t*)esi_1 = 0x7cc420;
005d2118                  *(uint32_t*)((char*)esi_1 + 4) = 0;
005d211f                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d212a                  *(uint32_t*)((char*)esi_1 + 8) = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005d212d                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005d212f                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d213b                  *(uint32_t*)((char*)esi_1 + 0xc) = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005d213e                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
005d2140                  *(uint32_t*)((char*)esi_1 + 0x10) = 1;
005d2147                  *(uint32_t*)((char*)esi_1 + 0x14) = 0;
005d214e                  class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d215a                  *(uint32_t*)((char*)esi_1 + 0x18) = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005d215d                  InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
005d2161                  *(uint32_t*)((char*)esi_1 + 0x1c) = 0;
005d2164                  *(uint32_t*)((char*)esi_1 + 0x20) = 0;
005d2110              }
005d2110              
005d2179              *(uint32_t*)(*(uint32_t*)esi_1 + 0x10)(edi, (arg3 - *(uint32_t*)edi));
005d217f              *(uint32_t*)((char*)esi_1 + 0x1c) = this->last;
005d2182              *(uint32_t*)((char*)esi_1 + 0x20) = 0;
005d2189              class PageData* last = this->last;
005d2189              
005d218e              if (last == 0)
005d2195                  this->first = esi_1;
005d218e              else
005d2190                  last->next = esi_1;
005d2190              
005d219f              int32_t ecx_10 = (this->numPages + 1);
005d21a0              cond:1_1 = arg2 != 1;
005d21a1              this->last = esi_1;
005d21a4              this->numPages = ecx_10;
005d21a7              arg2 -= 1;
005d21ab          } while (cond:1_1);
005d20f1      }
005d20f1      
005d21ba      return 1;
005d20b0  }

005d21bd                                                                                         90 90 90                               ...

005d21c0  class PageData& __thiscall PageData::operator=(class PageData* this, class PageData const& arg2)

005d21c0  {
005d21d3      this->authorID = arg2->authorID;
005d21d6      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = this->authorName.m_buffer;
005d21d6      
005d21dc      if (m_buffer_3 != arg2->authorName.m_buffer)
005d21dc      {
005d21ee          if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
005d21f0              m_buffer_3->vtable->__vecDelDtor(1);
005d21f0          
005d21f8          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->authorName.m_buffer;
005d21fb          this->authorName.m_buffer = m_buffer;
005d2202          InterlockedIncrement(&m_buffer->m_cRef);
005d21dc      }
005d21dc      
005d2204      class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = this->authorAccount.m_buffer;
005d2204      
005d220a      if (m_buffer_4 != arg2->authorAccount.m_buffer)
005d220a      {
005d221c          if ((InterlockedDecrement(&m_buffer_4->m_cRef) == 0 && m_buffer_4 != 0))
005d221e              m_buffer_4->vtable->__vecDelDtor(1);
005d221e          
005d2226          class AC1Legacy::PStringBase<char> m_buffer_1 = arg2->authorAccount.m_buffer;
005d2229          this->authorAccount.m_buffer = m_buffer_1;
005d2230          InterlockedIncrement((m_buffer_1 + 4));
005d220a      }
005d220a      
005d2232      class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = this->pageText.m_buffer;
005d2232      
005d2238      if (m_buffer_5 != arg2->pageText.m_buffer)
005d2238      {
005d224a          if ((InterlockedDecrement(&m_buffer_5->m_cRef) == 0 && m_buffer_5 != 0))
005d224c              m_buffer_5->vtable->__vecDelDtor(1);
005d224c          
005d2254          class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg2->pageText.m_buffer;
005d2257          this->pageText.m_buffer = m_buffer_2;
005d225e          InterlockedIncrement(&m_buffer_2->m_cRef);
005d2238      }
005d2238      
005d2263      this->ignoreAuthor = arg2->ignoreAuthor;
005d2266      int32_t textIncluded = arg2->textIncluded;
005d226c      this->next = nullptr;
005d226f      this->prev = nullptr;
005d2272      this->textIncluded = textIncluded;
005d227a      return this;
005d21c0  }

005d227d                                                                                         90 90 90                               ...

005d2280  void* __thiscall PageDataList::`scalar deleting destructor'(class PageDataList* this, uint32_t arg2)

005d2280  {
005d2283      this->vtable = 0x7e8984;
005d2289      PageDataList::Flush(this);
005d2293      this->vtable = 0x79285c;
005d2293      
005d2299      if ((arg2 & 1) != 0)
005d229c          operator delete(this);
005d229c      
005d22a7      return this;
005d2280  }

005d22aa                                90 90 90 90 90 90                                                            ......

005d22b0  void __thiscall PageData::PageData(class PageData* this, class PageData* arg2, int32_t arg3)

005d22b0  {
005d22c0      this->vtable = 0x7cc420;
005d22c9      this->authorID = arg2->authorID;
005d22cc      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->authorName.m_buffer;
005d22cf      this->authorName.m_buffer = m_buffer;
005d22d6      InterlockedIncrement(&m_buffer->m_cRef);
005d22d8      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->authorAccount.m_buffer;
005d22db      this->authorAccount.m_buffer = m_buffer_1;
005d22e2      InterlockedIncrement(&m_buffer_1->m_cRef);
005d22f1      int32_t eax_5;
005d22f1      
005d22f1      if ((arg2->textIncluded == 0 || arg3 == 0))
005d22fa          eax_5 = 0;
005d22f1      else
005d22f3          eax_5 = 1;
005d22f3      
005d22fc      this->textIncluded = eax_5;
005d2302      this->ignoreAuthor = arg2->ignoreAuthor;
005d2305      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d2310      this->pageText.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005d2316      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005d2320      this->prev = nullptr;
005d2323      this->next = nullptr;
005d2323      
005d2326      if (arg3 == 0)
005d2326      {
005d236a          AC1Legacy::PStringBase<char>::set(&this->pageText.m_buffer, &data_7928af);
005d236a          return;
005d2326      }
005d2326      
005d2328      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = this->pageText.m_buffer;
005d232d      arg3 = m_buffer_2;
005d232d      
005d2331      if (m_buffer_2 != arg2->pageText.m_buffer)
005d2331      {
005d2347          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && arg3 != 0))
005d234d              **(uint32_t**)arg3(1);
005d234d          
005d234f          class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = arg2->pageText.m_buffer;
005d2310          this->pageText.m_buffer = m_buffer_3;
005d2358          InterlockedIncrement(&m_buffer_3->m_cRef);
005d2331      }
005d22b0  }

005d2378                                                                          90 90 90 90 90 90 90 90                          ........

005d2380  uint32_t __thiscall PageData::Pack(class PageData* this, void** arg2, uint32_t arg3)

005d2380  {
005d2396      void* var_8 = nullptr;
005d23c3      uint32_t ebp_1 = (AC1Legacy::PStringBase<char>::Pack(&this->authorName, &var_8, 0) + AC1Legacy::PStringBase<char>::Pack(&this->authorAccount, &var_8, 0));
005d23c5      uint32_t eax_2 = AC1Legacy::PStringBase<char>::Pack(&this->pageText, &var_8, 0);
005d23ce      void* edi_1 = *(uint32_t*)arg2;
005d23d0      void* eax_3 = ((eax_2 + ebp_1) + 0x10);
005d23da      var_8 = eax_3;
005d23da      
005d23de      if (arg3 < eax_3)
005d2455          return eax_3;
005d2455      
005d23e3      *(uint32_t*)edi_1 = this->authorID;
005d23e7      void* eax_6 = (*(uint32_t*)arg2 + 4);
005d23f5      *(uint32_t*)arg2 = eax_6;
005d23f7      AC1Legacy::PStringBase<char>::Pack(&this->authorName, arg2, (((char*)edi_1 - eax_6) + arg3));
005d2409      AC1Legacy::PStringBase<char>::Pack(&this->authorAccount, arg2, (((char*)edi_1 - *(uint32_t*)arg2) + arg3));
005d2410      **(uint32_t**)arg2 = 0xffff0002;
005d2418      void* edx_5 = (*(uint32_t*)arg2 + 4);
005d241b      *(uint32_t*)arg2 = edx_5;
005d2422      *(uint32_t*)edx_5 = this->textIncluded;
005d2426      void* ecx_11 = (*(uint32_t*)arg2 + 4);
005d2429      *(uint32_t*)arg2 = ecx_11;
005d2434      *(uint32_t*)ecx_11 = this->ignoreAuthor;
005d2438      void* eax_11 = (*(uint32_t*)arg2 + 4);
005d2443      *(uint32_t*)arg2 = eax_11;
005d2445      AC1Legacy::PStringBase<char>::Pack(&this->pageText, arg2, (((char*)edi_1 - eax_11) + arg3));
005d244a      return var_8;
005d2380  }

005d2458                                                                          90 90 90 90 90 90 90 90                          ........

005d2460  int32_t __thiscall PageData::UnPack(class PageData* this, void** arg2, uint32_t arg3)

005d2460  {
005d2466      void* eax = *(uint32_t*)arg2;
005d2471      void* ebx = ((char*)eax + arg3);
005d2474      this->authorID = *(uint32_t*)eax;
005d2479      void* eax_2 = (*(uint32_t*)arg2 + 4);
005d2485      *(uint32_t*)arg2 = eax_2;
005d2487      AC1Legacy::PStringBase<char>::UnPack(&this->authorName, arg2, ((char*)ebx - eax_2));
005d2497      AC1Legacy::PStringBase<char>::UnPack(&this->authorAccount, arg2, ((char*)ebx - *(uint32_t*)arg2));
005d249c      void* eax_4 = *(uint32_t*)arg2;
005d249e      int32_t ecx_5 = *(uint32_t*)eax_4;
005d24ae      *(uint32_t*)arg2 = ((char*)eax_4 + 4);
005d24ae      
005d24b0      if ((ecx_5 >> 0x10) != 0xffff)
005d24b0      {
005d24d2          this->textIncluded = ecx_5;
005d24d5          this->ignoreAuthor = 0;
005d24b0      }
005d24b0      else if (((uint32_t)ecx_5) == 2)
005d24b8      {
005d24bc          this->textIncluded = *(uint32_t*)((char*)eax_4 + 4);
005d24c1          void* ecx_9 = (*(uint32_t*)arg2 + 4);
005d24c4          *(uint32_t*)arg2 = ecx_9;
005d24ca          this->ignoreAuthor = *(uint32_t*)ecx_9;
005d24cd          *(uint32_t*)arg2 += 4;
005d24b8      }
005d24b8      
005d24e4      if (this->textIncluded != 0)
005d24e4      {
005d24ea          AC1Legacy::PStringBase<char>::UnPack(&this->pageText, arg2, ((char*)ebx - *(uint32_t*)arg2));
005d24f7          return 1;
005d24e4      }
005d24e4      
005d24ff      AC1Legacy::PStringBase<char>::set(&this->pageText, &data_7928af);
005d250c      return 1;
005d2460  }

005d250f                                               90                                                                 .

005d2510  uint32_t __thiscall PageData::PackNoText(class PageData* this, void** arg2, uint32_t arg3)

005d2510  {
005d2510      class PageData* this_1 = this;
005d2521      this_1 = nullptr;
005d2549      class PageData* this_2 = ((AC1Legacy::PStringBase<char>::Pack(&this->authorName, &this_1, 0) + AC1Legacy::PStringBase<char>::Pack(&this->authorAccount, &this_1, 0)) + 0x10);
005d254f      void* edi_1 = *(uint32_t*)arg2;
005d2551      this_1 = this_2;
005d2551      
005d2555      if (arg3 < this_2)
005d25b2          return this_2;
005d25b2      
005d255a      *(uint32_t*)edi_1 = this->authorID;
005d255e      void* eax_3 = (*(uint32_t*)arg2 + 4);
005d256c      *(uint32_t*)arg2 = eax_3;
005d256e      AC1Legacy::PStringBase<char>::Pack(&this->authorName, arg2, (((char*)edi_1 - eax_3) + arg3));
005d257c      AC1Legacy::PStringBase<char>::Pack(&this->authorAccount, arg2, (((char*)edi_1 - *(uint32_t*)arg2) + arg3));
005d2583      **(uint32_t**)arg2 = 0xffff0002;
005d258b      void* edx_4 = (*(uint32_t*)arg2 + 4);
005d258e      *(uint32_t*)arg2 = edx_4;
005d2592      *(uint32_t*)edx_4 = 0;
005d259a      void* ecx_8 = (*(uint32_t*)arg2 + 4);
005d259d      *(uint32_t*)arg2 = ecx_8;
005d25a4      *(uint32_t*)ecx_8 = this->ignoreAuthor;
005d25a6      *(uint32_t*)arg2 += 4;
005d25a9      return this_1;
005d2510  }

005d25b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d25c0  class PageDataList& __thiscall PageDataList::operator=(class PageDataList* this, class PageDataList const& arg2)

005d25c0  {
005d25ca      this->first = nullptr;
005d25cd      this->last = nullptr;
005d25d0      this->numPages = 0;
005d25d6      this->maxNumPages = arg2->maxNumPages;
005d25dc      this->maxNumCharsPerPage = arg2->maxNumCharsPerPage;
005d25e3      this->packWithText = arg2->packWithText;
005d25e3      
005d25eb      for (class PageData* i = arg2->first; i != 0; i = i->next)
005d25eb      {
005d25f2          void* eax = operator new(0x24);
005d25fc          class PageData* eax_1;
005d25fc          
005d25fc          if (eax == 0)
005d260a              eax_1 = nullptr;
005d25fc          else
005d2603              eax_1 = PageData::PageData(eax, i, 1);
005d2603          
005d260f          eax_1->prev = this->last;
005d2612          eax_1->next = nullptr;
005d2615          class PageData* last = this->last;
005d2615          
005d261a          if (last == 0)
005d2621              this->first = eax_1;
005d261a          else
005d261c              last->next = eax_1;
005d261c          
005d2627          int32_t ecx_5 = (this->numPages + 1);
005d2628          this->last = eax_1;
005d262b          this->numPages = ecx_5;
005d25eb      }
005d25eb      
005d263a      return this;
005d25c0  }

005d263d                                                                                         90 90 90                               ...

005d2640  uint32_t __fastcall PageDataList::pack_size(class PageDataList* this)

005d2640  {
005d2640      class PageDataList* this_1 = this;
005d2645      class PageData* i = this->first;
005d264b      this_1 = nullptr;
005d2653      int32_t result = 0xc;
005d2653      
005d2658      while (i != 0)
005d2658      {
005d266c          uint32_t eax_4;
005d266c          
005d266c          if ((this->packWithText == 0 || i->textIncluded == 0))
005d2687              eax_4 = PageData::PackNoText(i, &this_1, 0);
005d266c          else
005d2679              eax_4 = i->vtable->Pack(&this_1, 0);
005d2679          
005d268c          i = i->next;
005d268f          result += eax_4;
005d2658      }
005d2658      
005d269b      return result;
005d2640  }

005d269c                                                                                      90 90 90 90                              ....

005d26a0  uint32_t __thiscall PageDataList::Pack(class PageDataList* this, void** arg2, uint32_t arg3)

005d26a0  {
005d26a0      class PageDataList* this_1 = this;
005d26a7      uint32_t result = PageDataList::pack_size(this);
005d26ac      uint32_t edx = arg3;
005d26b6      void* ebp = *(uint32_t*)arg2;
005d26b6      
005d26bc      if (edx >= result)
005d26bc      {
005d26c1          *(uint32_t*)ebp = this->maxNumPages;
005d26c6          void* edi_2 = (*(uint32_t*)arg2 + 4);
005d26c9          *(uint32_t*)arg2 = edi_2;
005d26d0          *(uint32_t*)edi_2 = this->maxNumCharsPerPage;
005d26d4          void* ecx_3 = (*(uint32_t*)arg2 + 4);
005d26d7          *(uint32_t*)arg2 = ecx_3;
005d26dc          *(uint32_t*)ecx_3 = this->numPages;
005d26de          *(uint32_t*)arg2 += 4;
005d26e1          class PageData* first = this->first;
005d26e1          
005d26e6          if (first != 0)
005d26e6          {
005d26fc              while (true)
005d26fc              {
005d26fc                  if ((this->packWithText == 0 || first->textIncluded == 0))
005d271b                      PageData::PackNoText(first, arg2, (((char*)ebp - *(uint32_t*)arg2) + edx));
005d26fc                  else
005d26fe                      first->vtable->Pack(arg2, (((char*)ebp - *(uint32_t*)arg2) + edx));
005d26fe                  
005d2720                  class PageData* next = first->next;
005d2720                  
005d2725                  if (next == 0)
005d2725                      break;
005d2725                  
005d26ea                  edx = arg3;
005d26ee                  first = next;
005d26fc              }
005d26e6          }
005d26bc      }
005d26bc      
005d2730      return result;
005d26a0  }

005d2733                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005d2740  uint32_t __thiscall QuestDef::Pack(class QuestDef* this, void** arg2, uint32_t arg3)

005d2740  {
005d2740      class QuestDef* this_1 = this;
005d2752      this_1 = nullptr;
005d2765      int32_t result = (AC1Legacy::PStringBase<char>::Pack(&this->_fullname, &this_1, 0) + 8);
005d2765      
005d276a      if (arg3 >= result)
005d276a      {
005d2776          **(uint32_t**)arg2 = this->_mindelta;
005d277a          int32_t* ecx_3 = (*(uint32_t*)arg2 + 4);
005d277d          *(uint32_t*)arg2 = ecx_3;
005d2782          *(uint32_t*)ecx_3 = this->_maxsolves;
005d278d          *(uint32_t*)arg2 += 4;
005d278f          AC1Legacy::PStringBase<char>::Pack(&this->_fullname, arg2, arg3);
005d276a      }
005d276a      
005d279b      return result;
005d2740  }

005d279e                                                                                            90 90                                ..

005d27a0  void __fastcall QuestDef::QuestDef(class QuestDef* this)

005d27a0  {
005d27a4      this->vtable = 0x7e4fac;
005d27aa      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d27b4      this->_fullname.m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005d27ba      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005d27c7      this->_mindelta = 0;
005d27ce      this->_maxsolves = 0xffffffff;
005d27d5      AC1Legacy::PStringBase<char>::set(&this->_fullname.m_buffer, &data_7928af);
005d27dc      AC1Legacy::PStringBase<char>::break_reference(&this->_fullname.m_buffer);
005d27e1      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->_fullname.m_buffer;
005d27e6      char* i = &m_buffer->m_data;
005d27e6      
005d27ef      for (void* esi_1 = ((m_buffer->m_len + m_buffer) + 0x13); i != esi_1; i = &i[1])
005d27ef      {
005d27f1          char ecx_4 = *(uint8_t*)i;
005d27f3          uint32_t edx;
005d27f3          edx = ecx_4;
005d27f5          edx u>>= 4;
005d27fb          edx |= (ecx_4 << 4);
005d27fd          *(uint8_t*)i = edx;
005d27ef      }
005d27a0  }

005d2809                             90 90 90 90 90 90 90                                                           .......

005d2810  int32_t __thiscall QuestDef::UnPack(class QuestDef* this, void** arg2, uint32_t arg3)

005d2810  {
005d2810      class QuestDef* this_1 = this;
005d2821      this_1 = nullptr;
005d2821      
005d2837      if (arg3 < (AC1Legacy::PStringBase<char>::Pack(&this->_fullname, &this_1, 0) + 8))
005d283e          return 0;
005d283e      
005d2849      this->_mindelta = **(uint32_t**)arg2;
005d284e      void* ecx_5 = (*(uint32_t*)arg2 + 4);
005d2851      *(uint32_t*)arg2 = ecx_5;
005d2855      this->_maxsolves = *(uint32_t*)ecx_5;
005d285e      *(uint32_t*)arg2 += 4;
005d286e      return (AC1Legacy::PStringBase<char>::UnPack(&this->_fullname, arg2, arg3) & 1);
005d2810  }

005d2871                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005d2880  int32_t __thiscall QuestDefDB::UnPack(class QuestDefDB* this, void** arg2, uint32_t arg3)

005d2880  {
005d2884      void** edi = arg2;
005d2888      void* ebp = *(uint32_t*)edi;
005d288c      int32_t eax = this->m_bLoaded*(int32_t*)((char*)this + 8);
005d2899      arg2 = nullptr;
005d2899      
005d28aa      if ((arg3 >= *(uint32_t*)(eax + 0xc)(&arg2, 0) && *(uint32_t*)(this->m_bLoaded*(int32_t*)((char*)this + 8) + 0x10)(edi, arg3) != 0))
005d28aa      {
005d28c1          if (arg3 >= (*(uint32_t*)edi - ebp))
005d28d7              return 1;
005d28d7          
005d28c3          *(uint32_t*)edi = ebp;
005d28aa      }
005d28aa      
005d28cb      return 0;
005d2880  }

005d28da                                                                                90 90 90 90 90 90                            ......

005d28e0  void __thiscall QuestDefDB::QuestDefDB(class QuestDefDB* this, class IDClass<_tagDataID,32,0> arg2)

005d28e0  {
005d28e8      DBObj::DBObj(this, arg2);
005d28ed      this->vtable = &PackObj::`vftable';
005d28f7      this->vtable = 0x7e89b0;
005d28fd      this->vtable = &QuestDefDB::`vftable';
005d28f4      this->_defs.vtable = 0x7e4f98;
005d28f4      this->_defs.m_fThrowawayDuplicateKeysOnUnPack = 0;
005d28f4      this->_defs._buckets = nullptr;
005d28f4      this->_defs._table_size = 0x20;
005d28f4      this->_defs._currNum = 0;
005d291c      PackableHashTable<unsigned long,CContractTracker>::Init(&this->_defs);
005d28e0  }

005d2927                       90 90 90 90 90 90 90 90 90                                                         .........

005d2930  void* __thiscall QuestDefDB::`vector deleting destructor'(class QuestDefDB* this, uint32_t arg2)

005d2930  {
005d2933      /* tailcall */
005d2933      return QuestDefDB::`scalar deleting destructor'(((char*)this - 0x30), arg2);
005d2930  }

005d2938                                                                          cc cc cc cc cc cc cc cc                          ........

005d2940  class DBObj* QuestDefDB::Allocate(class QuestDefDB const* this @ ecx)

005d2940  {
005d2940      /* tailcall */
005d2940      return QuestDefDB::Allocator();
005d2940  }

005d2945                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005d2950  class DBObj* QuestDefDB::Allocator()

005d2950  {
005d2952      void* eax = operator new(0x50);
005d2952      
005d295c      if (eax == 0)
005d296f          return 0;
005d296f      
005d296c      return QuestDefDB::QuestDefDB(eax, INVALID_DID.id);
005d2950  }


005d2970  void* __thiscall QuestDefDB::`scalar deleting destructor'(class QuestDefDB* this, uint32_t arg2)

005d2970  {
005d2976      PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>::~PackableHashTable<AC1Legacy::CaseInsensitiveStringBase<AC1Legacy::PStringBase<char> >,QuestDef>(&this->_defs);
005d297d      SerializeUsingPackDBObj::~SerializeUsingPackDBObj(this);
005d297d      
005d2987      if ((arg2 & 1) != 0)
005d298a          operator delete(this);
005d298a      
005d2995      return this;
005d2970  }

005d2998                                                                          90 90 90 90 90 90 90 90                          ........

005d29a0  uint8_t __thiscall PlayerModule::AddShortCut(class PlayerModule* this, class ShortCutData const* arg2)

005d29a0  {
005d29a8      if (this->shortcuts_ == 0)
005d29a8      {
005d29ac          void* eax_1 = operator new(0x4c);
005d29b6          class ShortCutManager* eax_2;
005d29b6          
005d29b6          if (eax_1 == 0)
005d29c1              eax_2 = nullptr;
005d29b6          else
005d29ba              eax_2 = ShortCutManager::ShortCutManager(eax_1);
005d29ba          
005d29c3          this->shortcuts_ = eax_2;
005d29a8      }
005d29a8      
005d29d5      int32_t eax_4;
005d29d5      eax_4 = ShortCutManager::AddShortCut(this->shortcuts_, arg2) != 0;
005d29d9      return eax_4;
005d29a0  }

005d29dc                                                                                      90 90 90 90                              ....

005d29e0  void __thiscall PlayerModule::RemoveShortCut(class PlayerModule* this, int32_t const arg2)

005d29e0  {
005d29e0      class ShortCutManager* shortcuts_ = this->shortcuts_;
005d29e0      
005d29e5      if (shortcuts_ == 0)
005d29ec          return;
005d29ec      
005d29e7      /* tailcall */
005d29e7      return ShortCutManager::RemoveShortCut(shortcuts_, arg2);
005d29e0  }

005d29ef                                               90                                                                 .

005d29f0  class PackableList<unsigned long>* __thiscall PlayerModule::GetFavoriteSpellsList(class PlayerModule* this, int32_t const arg2) __pure

005d29f0  {
005d29fb      return &this->favorite_spells_[arg2];
005d29f0  }

005d29fe                                                                                            90 90                                ..

005d2a00  void __fastcall PlayerModule::ClearDesiredCompList(class PlayerModule* this)

005d2a00  {
005d2a03      class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d2a03      
005d2a0b      if (desired_comps_ != 0)
005d2a0d          desired_comps_->vtable->__vecDelDtor(1);
005d2a0d      
005d2a13      this->desired_comps_ = nullptr;
005d2a00  }

005d2a1f                                                                                               90                                 .

005d2a20  uint8_t __fastcall PlayerModule::AllowGive(class PlayerModule const* this)

005d2a20  {
005d2a2c      return (((int8_t)(this->options_ >> 6)) & 1);
005d2a20  }

005d2a2d                                         90 90 90                                                               ...

005d2a30  uint8_t __stdcall PlayerModule::GetDefaultOptionValue(class PlayerModule const* this @ ecx, enum PlayerOption arg2)

005d2a30  {
005d2a37      enum PlayerOption eax;
005d2a37      
005d2a37      switch (arg2)
005d2a37      {
005d2a47          case 0:
005d2a47          case 2:
005d2a47          case 6:
005d2a47          case 8:
005d2a47          case 0xa:
005d2a47          case 0xd:
005d2a47          case 0xe:
005d2a47          case 0xf:
005d2a47          case 0x14:
005d2a47          case 0x15:
005d2a47          case 0x19:
005d2a47          case 0x1b:
005d2a47          case 0x23:
005d2a47          case 0x24:
005d2a47          case 0x25:
005d2a47          case 0x2a:
005d2a47          {
005d2a47              eax = 1;
005d2a49              return 1;
005d2a47              break;
005d2a47          }
005d2a37      }
005d2a37      
005d2a4c      eax = 0;
005d2a4e      return 0;
005d2a30  }

005d2a51                                                     8d 49 00                                                       .I.
005d2a54  uint32_t jump_table_5d2a54[0x2] = 
005d2a54  {
005d2a54      [0x0] =  0x005d2a47
005d2a58      [0x1] =  0x005d2a4c
005d2a5c  }
005d2a5c  uint8_t lookup_table_5d2a5c[0x2b] = 
005d2a5c  {
005d2a5c      [0x00] =  0x00
005d2a5d      [0x01] =  0x01
005d2a5e      [0x02] =  0x00
005d2a5f      [0x03] =  0x01
005d2a60      [0x04] =  0x01
005d2a61      [0x05] =  0x01
005d2a62      [0x06] =  0x00
005d2a63      [0x07] =  0x01
005d2a64      [0x08] =  0x00
005d2a65      [0x09] =  0x01
005d2a66      [0x0a] =  0x00
005d2a67      [0x0b] =  0x01
005d2a68      [0x0c] =  0x01
005d2a69      [0x0d] =  0x00
005d2a6a      [0x0e] =  0x00
005d2a6b      [0x0f] =  0x00
005d2a6c      [0x10] =  0x01
005d2a6d      [0x11] =  0x01
005d2a6e      [0x12] =  0x01
005d2a6f      [0x13] =  0x01
005d2a70      [0x14] =  0x00
005d2a71      [0x15] =  0x00
005d2a72      [0x16] =  0x01
005d2a73      [0x17] =  0x01
005d2a74      [0x18] =  0x01
005d2a75      [0x19] =  0x00
005d2a76      [0x1a] =  0x01
005d2a77      [0x1b] =  0x00
005d2a78      [0x1c] =  0x01
005d2a79      [0x1d] =  0x01
005d2a7a      [0x1e] =  0x01
005d2a7b      [0x1f] =  0x01
005d2a7c      [0x20] =  0x01
005d2a7d      [0x21] =  0x01
005d2a7e      [0x22] =  0x01
005d2a7f      [0x23] =  0x00
005d2a80      [0x24] =  0x00
005d2a81      [0x25] =  0x00
005d2a82      [0x26] =  0x01
005d2a83      [0x27] =  0x01
005d2a84      [0x28] =  0x01
005d2a85      [0x29] =  0x01
005d2a86      [0x2a] =  0x00
005d2a87  }

005d2a87                       90 90 90 90 90 90 90 90 90                                                         .........

005d2a90  uint8_t __fastcall PlayerModule::AutoRepeatAttack(class PlayerModule const* this)

005d2a90  {
005d2a9b      return (((int8_t)(this->options_ >> 1)) & 1);
005d2a90  }

005d2a9c                                                                                      90 90 90 90                              ....

005d2aa0  void __thiscall PlayerModule::SetAutoRepeatAttack(class PlayerModule* this, uint8_t const arg2)

005d2aa0  {
005d2ab1      if ((((int8_t)(this->options_ >> 1)) & 1) == arg2)
005d2ad8          return;
005d2ad8      
005d2ab5      uint32_t options_ = this->options_;
005d2abb      uint32_t eax_1;
005d2abb      
005d2abb      if (arg2 == 0)
005d2ac2          eax_1 = (options_ & 0xfffffffd);
005d2abb      else
005d2abd          eax_1 = (options_ | 2);
005d2abd      
005d2ac5      this->options_ = eax_1;
005d2acd      arg2 = 0;
005d2ad5      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2aa0  }

005d2adb                                                                                   90 90 90 90 90                             .....

005d2ae0  uint8_t __fastcall PlayerModule::IgnoreAllegianceRequests(class PlayerModule const* this)

005d2ae0  {
005d2aec      return (((int8_t)(this->options_ >> 2)) & 1);
005d2ae0  }

005d2aed                                         90 90 90                                                               ...

005d2af0  void __thiscall PlayerModule::SetIgnoreAllegianceRequests(class PlayerModule* this, uint8_t const arg2)

005d2af0  {
005d2b02      if ((((int8_t)(this->options_ >> 2)) & 1) == arg2)
005d2b29          return;
005d2b29      
005d2b06      uint32_t options_ = this->options_;
005d2b0c      uint32_t eax_1;
005d2b0c      
005d2b0c      if (arg2 == 0)
005d2b13          eax_1 = (options_ & 0xfffffffb);
005d2b0c      else
005d2b0e          eax_1 = (options_ | 4);
005d2b0e      
005d2b16      this->options_ = eax_1;
005d2b1e      arg2 = 1;
005d2b26      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2af0  }

005d2b2c                                      90 90 90 90                                                              ....

005d2b30  uint8_t __fastcall PlayerModule::IgnoreFellowshipRequests(class PlayerModule const* this)

005d2b30  {
005d2b3c      return (((int8_t)(this->options_ >> 3)) & 1);
005d2b30  }

005d2b3d                                                                                         90 90 90                               ...

005d2b40  void __thiscall PlayerModule::SetIgnoreFellowshipRequests(class PlayerModule* this, uint8_t const arg2)

005d2b40  {
005d2b52      if ((((int8_t)(this->options_ >> 3)) & 1) == arg2)
005d2b79          return;
005d2b79      
005d2b56      uint32_t options_ = this->options_;
005d2b5c      uint32_t eax_1;
005d2b5c      
005d2b5c      if (arg2 == 0)
005d2b63          eax_1 = (options_ & 0xfffffff7);
005d2b5c      else
005d2b5e          eax_1 = (options_ | 8);
005d2b5e      
005d2b66      this->options_ = eax_1;
005d2b6e      arg2 = 2;
005d2b76      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2b40  }

005d2b7c                                                                                      90 90 90 90                              ....

005d2b80  uint8_t __fastcall PlayerModule::IgnoreTradeRequests(class PlayerModule const* this)

005d2b80  {
005d2b8c      return (((int8_t)(this->options_ >> 0x11)) & 1);
005d2b80  }

005d2b8d                                         90 90 90                                                               ...

005d2b90  void __thiscall PlayerModule::SetIgnoreTradeRequests(class PlayerModule* this, uint8_t arg2)

005d2b90  {
005d2ba2      if ((((int8_t)(this->options_ >> 0x11)) & 1) == arg2)
005d2bcd          return;
005d2bcd      
005d2ba6      uint32_t options_ = this->options_;
005d2bac      uint32_t eax_1;
005d2bac      
005d2bac      if (arg2 == 0)
005d2bb5          eax_1 = (options_ & 0xfffdffff);
005d2bac      else
005d2bae          eax_1 = (options_ | 0x20000);
005d2bae      
005d2bba      this->options_ = eax_1;
005d2bc2      arg2 = 3;
005d2bca      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2b90  }


005d2bd0  uint8_t __fastcall PlayerModule::DisableMostWeatherEffects(class PlayerModule const* this)

005d2bd0  {
005d2bdb      return (*(uint8_t*)((char*)this->options_)[2] & 1);
005d2bd0  }

005d2bdc                                                                                      90 90 90 90                              ....

005d2be0  void __thiscall PlayerModule::SetDisableMostWeatherEffects(class PlayerModule* this, uint8_t const arg2)

005d2be0  {
005d2bef      if ((*(uint8_t*)((char*)this->options_)[2] & 1) == arg2)
005d2c1a          return;
005d2c1a      
005d2bf3      uint32_t options_ = this->options_;
005d2bf9      uint32_t eax_1;
005d2bf9      
005d2bf9      if (arg2 == 0)
005d2c02          eax_1 = (options_ & 0xfffeffff);
005d2bf9      else
005d2bfb          eax_1 = (options_ | 0x10000);
005d2bfb      
005d2c07      this->options_ = eax_1;
005d2c0f      arg2 = 4;
005d2c17      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2be0  }

005d2c1d                                                                                         90 90 90                               ...

005d2c20  uint8_t __fastcall PlayerModule::PersistentAtDay(class PlayerModule const* this)

005d2c20  {
005d2c29      return (((int8_t)this->options2_) & 1);
005d2c20  }

005d2c2a                                90 90 90 90 90 90                                                            ......

005d2c30  void __thiscall PlayerModule::SetPersistentAtDay(class PlayerModule* this, uint8_t const arg2)

005d2c30  {
005d2c3f      if ((this->options2_ & 1) == arg2)
005d2c66          return;
005d2c66      
005d2c43      uint32_t options2_ = this->options2_;
005d2c49      uint32_t eax_1;
005d2c49      
005d2c49      if (arg2 == 0)
005d2c50          eax_1 = (options2_ & 0xfffffffe);
005d2c49      else
005d2c4b          eax_1 = (options2_ | 1);
005d2c4b      
005d2c53      this->options2_ = eax_1;
005d2c5b      arg2 = 5;
005d2c63      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2c30  }

005d2c69                             90 90 90 90 90 90 90                                                           .......

005d2c70  void __thiscall PlayerModule::SetAllowGive(class PlayerModule* this, uint8_t const arg2)

005d2c70  {
005d2c82      if ((((int8_t)(this->options_ >> 6)) & 1) == arg2)
005d2ca9          return;
005d2ca9      
005d2c86      uint32_t options_ = this->options_;
005d2c8c      uint32_t eax_1;
005d2c8c      
005d2c8c      if (arg2 == 0)
005d2c93          eax_1 = (options_ & 0xffffffbf);
005d2c8c      else
005d2c8e          eax_1 = (options_ | 0x40);
005d2c8e      
005d2c96      this->options_ = eax_1;
005d2c9e      arg2 = 6;
005d2ca6      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2c70  }

005d2cac                                      90 90 90 90                                                              ....

005d2cb0  uint8_t __fastcall PlayerModule::ViewCombatTarget(class PlayerModule const* this)

005d2cb0  {
005d2cbc      return (((int8_t)(this->options_ >> 7)) & 1);
005d2cb0  }

005d2cbd                                                                                         90 90 90                               ...

005d2cc0  void __thiscall PlayerModule::SetViewCombatTarget(class PlayerModule* this, uint8_t const arg2)

005d2cc0  {
005d2cd2      if ((((int8_t)(this->options_ >> 7)) & 1) == arg2)
005d2cfd          return;
005d2cfd      
005d2cd6      uint32_t options_ = this->options_;
005d2cdc      uint32_t eax_1;
005d2cdc      
005d2cdc      if (arg2 == 0)
005d2ce5          eax_1 = (options_ & 0xffffff7f);
005d2cdc      else
005d2cde          eax_1 = (options_ | 0x80);
005d2cde      
005d2cea      this->options_ = eax_1;
005d2cf2      arg2 = 7;
005d2cfa      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2cc0  }


005d2d00  uint8_t __fastcall PlayerModule::ShowTooltips(class PlayerModule const* this)

005d2d00  {
005d2d0c      return (((int8_t)(this->options_ >> 8)) & 1);
005d2d00  }

005d2d0d                                         90 90 90                                                               ...

005d2d10  void __thiscall PlayerModule::SetShowTooltips(class PlayerModule* this, uint8_t const arg2)

005d2d10  {
005d2d22      if ((((int8_t)(this->options_ >> 8)) & 1) == arg2)
005d2d4d          return;
005d2d4d      
005d2d26      uint32_t options_ = this->options_;
005d2d2c      uint32_t eax_1;
005d2d2c      
005d2d2c      if (arg2 == 0)
005d2d35          eax_1 = (options_ & 0xfffffeff);
005d2d2c      else
005d2d2e          eax_1 = (options_ | 0x100);
005d2d2e      
005d2d3a      this->options_ = eax_1;
005d2d42      arg2 = 8;
005d2d4a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2d10  }


005d2d50  uint8_t __fastcall PlayerModule::UseDeception(class PlayerModule const* this)

005d2d50  {
005d2d5c      return (((int8_t)(this->options_ >> 9)) & 1);
005d2d50  }

005d2d5d                                                                                         90 90 90                               ...

005d2d60  void __thiscall PlayerModule::SetUseDeception(class PlayerModule* this, uint8_t const arg2)

005d2d60  {
005d2d72      if ((((int8_t)(this->options_ >> 9)) & 1) == arg2)
005d2d9d          return;
005d2d9d      
005d2d76      uint32_t options_ = this->options_;
005d2d7c      uint32_t eax_1;
005d2d7c      
005d2d7c      if (arg2 == 0)
005d2d85          eax_1 = (options_ & 0xfffffdff);
005d2d7c      else
005d2d7e          eax_1 = (options_ | 0x200);
005d2d7e      
005d2d8a      this->options_ = eax_1;
005d2d92      arg2 = 9;
005d2d9a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2d60  }


005d2da0  uint8_t __fastcall PlayerModule::ToggleRun(class PlayerModule const* this)

005d2da0  {
005d2dac      return (((int8_t)(this->options_ >> 0xa)) & 1);
005d2da0  }

005d2dad                                         90 90 90                                                               ...

005d2db0  void __thiscall PlayerModule::SetToggleRun(class PlayerModule* this, uint8_t const arg2)

005d2db0  {
005d2dc2      if ((((int8_t)(this->options_ >> 0xa)) & 1) == arg2)
005d2ded          return;
005d2ded      
005d2dc6      uint32_t options_ = this->options_;
005d2dcc      uint32_t eax_1;
005d2dcc      
005d2dcc      if (arg2 == 0)
005d2dd5          eax_1 = (options_ & 0xfffffbff);
005d2dcc      else
005d2dce          eax_1 = (options_ | 0x400);
005d2dce      
005d2dda      this->options_ = eax_1;
005d2de2      arg2 = 0xa;
005d2dea      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2db0  }


005d2df0  uint8_t __fastcall PlayerModule::StayInChatMode(class PlayerModule const* this)

005d2df0  {
005d2dfc      return (((int8_t)(this->options_ >> 0xb)) & 1);
005d2df0  }

005d2dfd                                                                                         90 90 90                               ...

005d2e00  void __thiscall PlayerModule::SetStayInChatMode(class PlayerModule* this, uint8_t const arg2)

005d2e00  {
005d2e12      if ((((int8_t)(this->options_ >> 0xb)) & 1) == arg2)
005d2e3d          return;
005d2e3d      
005d2e16      uint32_t options_ = this->options_;
005d2e1c      uint32_t eax_1;
005d2e1c      
005d2e1c      if (arg2 == 0)
005d2e25          eax_1 = (options_ & 0xfffff7ff);
005d2e1c      else
005d2e1e          eax_1 = (options_ | 0x800);
005d2e1e      
005d2e2a      this->options_ = eax_1;
005d2e32      arg2 = 0xb;
005d2e3a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2e00  }


005d2e40  uint8_t __fastcall PlayerModule::AdvancedCombatUI(class PlayerModule const* this)

005d2e40  {
005d2e4c      return (((int8_t)(this->options_ >> 0xc)) & 1);
005d2e40  }

005d2e4d                                         90 90 90                                                               ...

005d2e50  void __thiscall PlayerModule::SetAdvancedCombatUI(class PlayerModule* this, uint8_t const arg2)

005d2e50  {
005d2e62      if ((((int8_t)(this->options_ >> 0xc)) & 1) == arg2)
005d2e8d          return;
005d2e8d      
005d2e66      uint32_t options_ = this->options_;
005d2e6c      uint32_t eax_1;
005d2e6c      
005d2e6c      if (arg2 == 0)
005d2e75          eax_1 = (options_ & 0xffffefff);
005d2e6c      else
005d2e6e          eax_1 = (options_ | 0x1000);
005d2e6e      
005d2e7a      this->options_ = eax_1;
005d2e82      arg2 = 0xc;
005d2e8a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2e50  }


005d2e90  uint8_t __fastcall PlayerModule::AutoTarget(class PlayerModule const* this)

005d2e90  {
005d2e9c      return (((int8_t)(this->options_ >> 0xd)) & 1);
005d2e90  }

005d2e9d                                                                                         90 90 90                               ...

005d2ea0  void __thiscall PlayerModule::SetAutoTarget(class PlayerModule* this, uint8_t const arg2)

005d2ea0  {
005d2eb2      if ((((int8_t)(this->options_ >> 0xd)) & 1) == arg2)
005d2edd          return;
005d2edd      
005d2eb6      uint32_t options_ = this->options_;
005d2ebc      uint32_t eax_1;
005d2ebc      
005d2ebc      if (arg2 == 0)
005d2ec5          eax_1 = (options_ & 0xffffdfff);
005d2ebc      else
005d2ebe          eax_1 = (options_ | 0x2000);
005d2ebe      
005d2eca      this->options_ = eax_1;
005d2ed2      arg2 = 0xd;
005d2eda      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2ea0  }


005d2ee0  uint8_t __fastcall PlayerModule::VividTargetingIndicator(class PlayerModule const* this)

005d2ee0  {
005d2eec      return (((int8_t)(this->options_ >> 0xf)) & 1);
005d2ee0  }

005d2eed                                         90 90 90                                                               ...

005d2ef0  void __thiscall PlayerModule::SetVividTargetingIndicator(class PlayerModule* this, uint8_t const arg2)

005d2ef0  {
005d2f02      if ((((int8_t)(this->options_ >> 0xf)) & 1) == arg2)
005d2f2d          return;
005d2f2d      
005d2f06      uint32_t options_ = this->options_;
005d2f0c      uint32_t eax_1;
005d2f0c      
005d2f0c      if (arg2 == 0)
005d2f15          eax_1 = (options_ & 0xffff7fff);
005d2f0c      else
005d2f0e          eax_1 = (options_ | 0x8000);
005d2f0e      
005d2f1a      this->options_ = eax_1;
005d2f22      arg2 = 0xe;
005d2f2a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2ef0  }


005d2f30  uint8_t __fastcall PlayerModule::FellowshipShareXP(class PlayerModule const* this)

005d2f30  {
005d2f3c      return (((int8_t)(this->options_ >> 0x12)) & 1);
005d2f30  }

005d2f3d                                                                                         90 90 90                               ...

005d2f40  void __thiscall PlayerModule::SetFellowshipShareXP(class PlayerModule* this, uint8_t const arg2)

005d2f40  {
005d2f52      if ((((int8_t)(this->options_ >> 0x12)) & 1) == arg2)
005d2f7d          return;
005d2f7d      
005d2f56      uint32_t options_ = this->options_;
005d2f5c      uint32_t eax_1;
005d2f5c      
005d2f5c      if (arg2 == 0)
005d2f65          eax_1 = (options_ & 0xfffbffff);
005d2f5c      else
005d2f5e          eax_1 = (options_ | 0x40000);
005d2f5e      
005d2f6a      this->options_ = eax_1;
005d2f72      arg2 = 0xf;
005d2f7a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2f40  }


005d2f80  uint8_t __fastcall PlayerModule::AcceptLootPermits(class PlayerModule const* this)

005d2f80  {
005d2f8c      return (((int8_t)(this->options_ >> 0x13)) & 1);
005d2f80  }

005d2f8d                                         90 90 90                                                               ...

005d2f90  void __thiscall PlayerModule::SetAcceptLootPermits(class PlayerModule* this, uint8_t const arg2)

005d2f90  {
005d2fa2      if ((((int8_t)(this->options_ >> 0x13)) & 1) == arg2)
005d2fcd          return;
005d2fcd      
005d2fa6      uint32_t options_ = this->options_;
005d2fac      uint32_t eax_1;
005d2fac      
005d2fac      if (arg2 == 0)
005d2fb5          eax_1 = (options_ & 0xfff7ffff);
005d2fac      else
005d2fae          eax_1 = (options_ | 0x80000);
005d2fae      
005d2fba      this->options_ = eax_1;
005d2fc2      arg2 = 0x10;
005d2fca      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2f90  }


005d2fd0  uint8_t __fastcall PlayerModule::FellowshipShareLoot(class PlayerModule const* this)

005d2fd0  {
005d2fdc      return (((int8_t)(this->options_ >> 0x14)) & 1);
005d2fd0  }

005d2fdd                                                                                         90 90 90                               ...

005d2fe0  void __thiscall PlayerModule::SetFellowshipShareLoot(class PlayerModule* this, uint8_t const arg2)

005d2fe0  {
005d2ff2      if ((((int8_t)(this->options_ >> 0x14)) & 1) == arg2)
005d301d          return;
005d301d      
005d2ff6      uint32_t options_ = this->options_;
005d2ffc      uint32_t eax_1;
005d2ffc      
005d2ffc      if (arg2 == 0)
005d3005          eax_1 = (options_ & 0xffefffff);
005d2ffc      else
005d2ffe          eax_1 = (options_ | 0x100000);
005d2ffe      
005d300a      this->options_ = eax_1;
005d3012      arg2 = 0x11;
005d301a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d2fe0  }


005d3020  uint8_t __fastcall PlayerModule::FellowshipAutoAcceptRequests(class PlayerModule const* this)

005d3020  {
005d302c      return (((int8_t)(this->options_ >> 0x1d)) & 1);
005d3020  }

005d302d                                         90 90 90                                                               ...

005d3030  void __thiscall PlayerModule::SetFellowshipAutoAcceptRequests(class PlayerModule* this, uint8_t const arg2)

005d3030  {
005d3042      if ((((int8_t)(this->options_ >> 0x1d)) & 1) == arg2)
005d306d          return;
005d306d      
005d3046      uint32_t options_ = this->options_;
005d304c      uint32_t eax_1;
005d304c      
005d304c      if (arg2 == 0)
005d3055          eax_1 = (options_ & 0xdfffffff);
005d304c      else
005d304e          eax_1 = (options_ | 0x20000000);
005d304e      
005d305a      this->options_ = eax_1;
005d3062      arg2 = 0x12;
005d306a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3030  }


005d3070  uint8_t __fastcall PlayerModule::SideBySideVitals(class PlayerModule const* this)

005d3070  {
005d307c      return (((int8_t)(this->options_ >> 0x15)) & 1);
005d3070  }

005d307d                                                                                         90 90 90                               ...

005d3080  void __thiscall PlayerModule::SetSideBySideVitals(class PlayerModule* this, uint8_t const arg2)

005d3080  {
005d3092      if ((((int8_t)(this->options_ >> 0x15)) & 1) == arg2)
005d30bd          return;
005d30bd      
005d3096      uint32_t options_ = this->options_;
005d309c      uint32_t eax_1;
005d309c      
005d309c      if (arg2 == 0)
005d30a5          eax_1 = (options_ & 0xffdfffff);
005d309c      else
005d309e          eax_1 = (options_ | 0x200000);
005d309e      
005d30aa      this->options_ = eax_1;
005d30b2      arg2 = 0x13;
005d30ba      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3080  }


005d30c0  uint8_t __fastcall PlayerModule::CoordinatesOnRadar(class PlayerModule const* this)

005d30c0  {
005d30cc      return (((int8_t)(this->options_ >> 0x16)) & 1);
005d30c0  }

005d30cd                                         90 90 90                                                               ...

005d30d0  void __thiscall PlayerModule::SetCoordinatesOnRadar(class PlayerModule* this, uint8_t const arg2)

005d30d0  {
005d30e2      if ((((int8_t)(this->options_ >> 0x16)) & 1) == arg2)
005d310d          return;
005d310d      
005d30e6      uint32_t options_ = this->options_;
005d30ec      uint32_t eax_1;
005d30ec      
005d30ec      if (arg2 == 0)
005d30f5          eax_1 = (options_ & 0xffbfffff);
005d30ec      else
005d30ee          eax_1 = (options_ | 0x400000);
005d30ee      
005d30fa      this->options_ = eax_1;
005d3102      arg2 = 0x14;
005d310a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d30d0  }


005d3110  uint8_t __fastcall PlayerModule::SpellDuration(class PlayerModule const* this)

005d3110  {
005d311c      return (((int8_t)(this->options_ >> 0x17)) & 1);
005d3110  }

005d311d                                                                                         90 90 90                               ...

005d3120  void __thiscall PlayerModule::SetSpellDuration(class PlayerModule* this, uint8_t const arg2)

005d3120  {
005d3132      if ((((int8_t)(this->options_ >> 0x17)) & 1) == arg2)
005d315d          return;
005d315d      
005d3136      uint32_t options_ = this->options_;
005d313c      uint32_t eax_1;
005d313c      
005d313c      if (arg2 == 0)
005d3145          eax_1 = (options_ & 0xff7fffff);
005d313c      else
005d313e          eax_1 = (options_ | "activation type (%s) with '%s' b…");
005d313e      
005d314a      this->options_ = eax_1;
005d3152      arg2 = 0x15;
005d315a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3120  }


005d3160  uint8_t __fastcall PlayerModule::DisableHouseRestrictionEffects(class PlayerModule const* this)

005d3160  {
005d316c      return (((int8_t)(this->options_ >> 0x19)) & 1);
005d3160  }

005d316d                                         90 90 90                                                               ...

005d3170  void __thiscall PlayerModule::SetDisableHouseRestrictionEffects(class PlayerModule* this, uint8_t const arg2)

005d3170  {
005d3182      if ((((int8_t)(this->options_ >> 0x19)) & 1) == arg2)
005d31ad          return;
005d31ad      
005d3186      uint32_t options_ = this->options_;
005d318c      uint32_t eax_1;
005d318c      
005d318c      if (arg2 == 0)
005d3195          eax_1 = (options_ & 0xfdffffff);
005d318c      else
005d318e          eax_1 = (options_ | 0x2000000);
005d318e      
005d319a      this->options_ = eax_1;
005d31a2      arg2 = 0x16;
005d31aa      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3170  }


005d31b0  uint8_t __fastcall PlayerModule::DragItemOnPlayerOpensSecureTrade(class PlayerModule const* this)

005d31b0  {
005d31bc      return (((int8_t)(this->options_ >> 0x1a)) & 1);
005d31b0  }

005d31bd                                                                                         90 90 90                               ...

005d31c0  void __thiscall PlayerModule::SetDragItemOnPlayerOpensSecureTrade(class PlayerModule* this, uint8_t const arg2)

005d31c0  {
005d31d2      if ((((int8_t)(this->options_ >> 0x1a)) & 1) == arg2)
005d31fd          return;
005d31fd      
005d31d6      uint32_t options_ = this->options_;
005d31dc      uint32_t eax_1;
005d31dc      
005d31dc      if (arg2 == 0)
005d31e5          eax_1 = (options_ & 0xfbffffff);
005d31dc      else
005d31de          eax_1 = (options_ | 0x4000000);
005d31de      
005d31ea      this->options_ = eax_1;
005d31f2      arg2 = 0x17;
005d31fa      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d31c0  }


005d3200  uint8_t __fastcall PlayerModule::DisplayAllegianceLogonNotifications(class PlayerModule const* this)

005d3200  {
005d320c      return (((int8_t)(this->options_ >> 0x1b)) & 1);
005d3200  }

005d320d                                         90 90 90                                                               ...

005d3210  void __thiscall PlayerModule::SetDisplayAllegianceLogonNotifications(class PlayerModule* this, uint8_t const arg2)

005d3210  {
005d3222      if ((((int8_t)(this->options_ >> 0x1b)) & 1) == arg2)
005d324d          return;
005d324d      
005d3226      uint32_t options_ = this->options_;
005d322c      uint32_t eax_1;
005d322c      
005d322c      if (arg2 == 0)
005d3235          eax_1 = (options_ & 0xf7ffffff);
005d322c      else
005d322e          eax_1 = (options_ | 0x8000000);
005d322e      
005d323a      this->options_ = eax_1;
005d3242      arg2 = 0x18;
005d324a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3210  }


005d3250  uint8_t __fastcall PlayerModule::UseChargeAttack(class PlayerModule const* this)

005d3250  {
005d325c      return (((int8_t)(this->options_ >> 0x1c)) & 1);
005d3250  }

005d325d                                                                                         90 90 90                               ...

005d3260  void __thiscall PlayerModule::SetUseChargeAttack(class PlayerModule* this, uint8_t const arg2)

005d3260  {
005d3272      if ((((int8_t)(this->options_ >> 0x1c)) & 1) == arg2)
005d329d          return;
005d329d      
005d3276      uint32_t options_ = this->options_;
005d327c      uint32_t eax_1;
005d327c      
005d327c      if (arg2 == 0)
005d3285          eax_1 = (options_ & 0xefffffff);
005d327c      else
005d327e          eax_1 = (options_ | 0x10000000);
005d327e      
005d328a      this->options_ = eax_1;
005d3292      arg2 = 0x19;
005d329a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3260  }


005d32a0  uint8_t __fastcall PlayerModule::ShowHelm(class PlayerModule const* this)

005d32a0  {
005d32ac      return (((int8_t)(this->options2_ >> 0x14)) & 1);
005d32a0  }

005d32ad                                         90 90 90                                                               ...

005d32b0  void __thiscall PlayerModule::SetShowHelm(class PlayerModule* this, uint8_t const arg2)

005d32b0  {
005d32c2      if ((((int8_t)(this->options2_ >> 0x14)) & 1) == arg2)
005d32ed          return;
005d32ed      
005d32c6      uint32_t options2_ = this->options2_;
005d32cc      uint32_t eax_1;
005d32cc      
005d32cc      if (arg2 == 0)
005d32d5          eax_1 = (options2_ & 0xffefffff);
005d32cc      else
005d32ce          eax_1 = (options2_ | 0x100000);
005d32ce      
005d32da      this->options2_ = eax_1;
005d32e2      arg2 = 0x2f;
005d32ea      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d32b0  }


005d32f0  void __thiscall PlayerModule::SetShowCloak(class PlayerModule* this, uint8_t const arg2)

005d32f0  {
005d3302      if ((((int8_t)(this->options2_ >> 0x17)) & 1) == arg2)
005d332d          return;
005d332d      
005d3306      uint32_t options2_ = this->options2_;
005d330c      uint32_t eax_1;
005d330c      
005d330c      if (arg2 == 0)
005d3315          eax_1 = (options2_ & 0xff7fffff);
005d330c      else
005d330e          eax_1 = (options2_ | "activation type (%s) with '%s' b…");
005d330e      
005d331a      this->options2_ = eax_1;
005d3322      arg2 = 0x32;
005d332a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d32f0  }


005d3330  uint8_t __fastcall PlayerModule::LockUI(class PlayerModule const* this)

005d3330  {
005d333b      return (*(uint8_t*)((char*)this->options2_)[3] & 1);
005d3330  }

005d333c                                                                                      90 90 90 90                              ....

005d3340  void __thiscall PlayerModule::SetLockUI(class PlayerModule* this, uint8_t const arg2)

005d3340  {
005d334f      if ((*(uint8_t*)((char*)this->options2_)[3] & 1) == arg2)
005d337a          return;
005d337a      
005d3353      uint32_t options2_ = this->options2_;
005d3359      uint32_t eax_1;
005d3359      
005d3359      if (arg2 == 0)
005d3362          eax_1 = (options2_ & 0xfeffffff);
005d3359      else
005d335b          eax_1 = (options2_ | 0x1000000);
005d335b      
005d3367      this->options2_ = eax_1;
005d336f      arg2 = 0x33;
005d3377      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3340  }

005d337d                                                                                         90 90 90                               ...

005d3380  uint8_t __fastcall PlayerModule::UseMouseTurning(class PlayerModule const* this)

005d3380  {
005d338c      return (((int8_t)(this->options2_ >> 0x16)) & 1);
005d3380  }

005d338d                                         90 90 90                                                               ...

005d3390  void __thiscall PlayerModule::SetUseMouseTurning(class PlayerModule* this, uint8_t const arg2)

005d3390  {
005d33a2      if ((((int8_t)(this->options2_ >> 0x16)) & 1) == arg2)
005d33cd          return;
005d33cd      
005d33a6      uint32_t options2_ = this->options2_;
005d33ac      uint32_t eax_1;
005d33ac      
005d33ac      if (arg2 == 0)
005d33b5          eax_1 = (options2_ & 0xffbfffff);
005d33ac      else
005d33ae          eax_1 = (options2_ | 0x400000);
005d33ae      
005d33ba      this->options2_ = eax_1;
005d33c2      arg2 = 0x31;
005d33ca      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3390  }


005d33d0  uint8_t __fastcall PlayerModule::DisableDistanceFog(class PlayerModule const* this)

005d33d0  {
005d33dc      return (((int8_t)(this->options2_ >> 0x15)) & 1);
005d33d0  }

005d33dd                                                                                         90 90 90                               ...

005d33e0  void __thiscall PlayerModule::SetDisableDistanceFog(class PlayerModule* this, uint8_t const arg2)

005d33e0  {
005d33f2      if ((((int8_t)(this->options2_ >> 0x15)) & 1) == arg2)
005d341d          return;
005d341d      
005d33f6      uint32_t options2_ = this->options2_;
005d33fc      uint32_t eax_1;
005d33fc      
005d33fc      if (arg2 == 0)
005d3405          eax_1 = (options2_ & 0xffdfffff);
005d33fc      else
005d33fe          eax_1 = (options2_ | 0x200000);
005d33fe      
005d340a      this->options2_ = eax_1;
005d3412      arg2 = 0x30;
005d341a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d33e0  }


005d3420  uint8_t __fastcall PlayerModule::LeadMissileTargets(class PlayerModule const* this)

005d3420  {
005d342c      return (((int8_t)(this->options2_ >> 0xf)) & 1);
005d3420  }

005d342d                                         90 90 90                                                               ...

005d3430  void __thiscall PlayerModule::SetLeadMissileTargets(class PlayerModule* this, uint8_t const arg2)

005d3430  {
005d3442      if ((((int8_t)(this->options2_ >> 0xf)) & 1) == arg2)
005d346d          return;
005d346d      
005d3446      uint32_t options2_ = this->options2_;
005d344c      uint32_t eax_1;
005d344c      
005d344c      if (arg2 == 0)
005d3455          eax_1 = (options2_ & 0xffff7fff);
005d344c      else
005d344e          eax_1 = (options2_ | 0x8000);
005d344e      
005d345a      this->options2_ = eax_1;
005d3462      arg2 = 0x2a;
005d346a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3430  }


005d3470  uint8_t __fastcall PlayerModule::UseFastMissiles(class PlayerModule const* this)

005d3470  {
005d347b      return (*(uint8_t*)((char*)this->options2_)[2] & 1);
005d3470  }

005d347c                                                                                      90 90 90 90                              ....

005d3480  void __thiscall PlayerModule::SetUseFastMissiles(class PlayerModule* this, uint8_t const arg2)

005d3480  {
005d348f      if ((*(uint8_t*)((char*)this->options2_)[2] & 1) == arg2)
005d34ba          return;
005d34ba      
005d3493      uint32_t options2_ = this->options2_;
005d3499      uint32_t eax_1;
005d3499      
005d3499      if (arg2 == 0)
005d34a2          eax_1 = (options2_ & 0xfffeffff);
005d3499      else
005d349b          eax_1 = (options2_ | 0x10000);
005d349b      
005d34a7      this->options2_ = eax_1;
005d34af      arg2 = 0x2b;
005d34b7      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3480  }

005d34bd                                                                                         90 90 90                               ...

005d34c0  uint8_t __fastcall PlayerModule::UseCraftSuccessDialog(class PlayerModule const* this)

005d34c0  {
005d34c9      return ((int8_t)(this->options_ >> 0x1f));
005d34c0  }

005d34ca                                90 90 90 90 90 90                                                            ......

005d34d0  void __thiscall PlayerModule::SetUseCraftSuccessDialog(class PlayerModule* this, uint8_t const arg2)

005d34d0  {
005d34e2      if ((((int8_t)(this->options_ >> 0x1f)) & 1) == arg2)
005d350d          return;
005d350d      
005d34e6      uint32_t options_ = this->options_;
005d34ec      uint32_t eax_1;
005d34ec      
005d34ec      if (arg2 == 0)
005d34f5          eax_1 = (options_ & 0x7fffffff);
005d34ec      else
005d34ee          eax_1 = (options_ | 0x80000000);
005d34ee      
005d34fa      this->options_ = eax_1;
005d3502      arg2 = 0x1a;
005d350a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d34d0  }


005d3510  uint8_t __fastcall PlayerModule::ConfirmVolatileRareUse(class PlayerModule const* this)

005d3510  {
005d351c      return (((int8_t)(this->options2_ >> 0x12)) & 1);
005d3510  }

005d351d                                                                                         90 90 90                               ...

005d3520  void __thiscall PlayerModule::SetConfirmVolatileRareUse(class PlayerModule* this, uint8_t const arg2)

005d3520  {
005d3532      if ((((int8_t)(this->options2_ >> 0x12)) & 1) == arg2)
005d355d          return;
005d355d      
005d3536      uint32_t options2_ = this->options2_;
005d353c      uint32_t eax_1;
005d353c      
005d353c      if (arg2 == 0)
005d3545          eax_1 = (options2_ & 0xfffbffff);
005d353c      else
005d353e          eax_1 = (options2_ | 0x40000);
005d353e      
005d354a      this->options2_ = eax_1;
005d3552      arg2 = 0x2d;
005d355a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3520  }


005d3560  uint8_t __fastcall PlayerModule::HearAllegianceChat(class PlayerModule const* this)

005d3560  {
005d356c      return (((int8_t)(this->options_ >> 0x1e)) & 1);
005d3560  }

005d356d                                         90 90 90                                                               ...

005d3570  void __thiscall PlayerModule::SetHearAllegianceChat(class PlayerModule* this, uint8_t const arg2)

005d3570  {
005d3582      if ((((int8_t)(this->options_ >> 0x1e)) & 1) == arg2)
005d35ad          return;
005d35ad      
005d3586      uint32_t options_ = this->options_;
005d358c      uint32_t eax_1;
005d358c      
005d358c      if (arg2 == 0)
005d3595          eax_1 = (options_ & 0xbfffffff);
005d358c      else
005d358e          eax_1 = (options_ | 0x40000000);
005d358e      
005d359a      this->options_ = eax_1;
005d35a2      arg2 = 0x1b;
005d35aa      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3570  }


005d35b0  uint8_t __fastcall PlayerModule::HearGeneralChat(class PlayerModule const* this)

005d35b0  {
005d35bc      return (((int8_t)(this->options2_ >> 8)) & 1);
005d35b0  }

005d35bd                                                                                         90 90 90                               ...

005d35c0  void __thiscall PlayerModule::SetHearGeneralChat(class PlayerModule* this, uint8_t const arg2)

005d35c0  {
005d35d2      if ((((int8_t)(this->options2_ >> 8)) & 1) == arg2)
005d35fd          return;
005d35fd      
005d35d6      uint32_t options2_ = this->options2_;
005d35dc      uint32_t eax_1;
005d35dc      
005d35dc      if (arg2 == 0)
005d35e5          eax_1 = (options2_ & 0xfffffeff);
005d35dc      else
005d35de          eax_1 = (options2_ | 0x100);
005d35de      
005d35ea      this->options2_ = eax_1;
005d35f2      arg2 = 0x23;
005d35fa      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d35c0  }


005d3600  uint8_t __fastcall PlayerModule::HearTradeChat(class PlayerModule const* this)

005d3600  {
005d360c      return (((int8_t)(this->options2_ >> 9)) & 1);
005d3600  }

005d360d                                         90 90 90                                                               ...

005d3610  void __thiscall PlayerModule::SetHearTradeChat(class PlayerModule* this, uint8_t const arg2)

005d3610  {
005d3622      if ((((int8_t)(this->options2_ >> 9)) & 1) == arg2)
005d364d          return;
005d364d      
005d3626      uint32_t options2_ = this->options2_;
005d362c      uint32_t eax_1;
005d362c      
005d362c      if (arg2 == 0)
005d3635          eax_1 = (options2_ & 0xfffffdff);
005d362c      else
005d362e          eax_1 = (options2_ | 0x200);
005d362e      
005d363a      this->options2_ = eax_1;
005d3642      arg2 = 0x24;
005d364a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3610  }


005d3650  uint8_t __fastcall PlayerModule::HearLFGChat(class PlayerModule const* this)

005d3650  {
005d365c      return (((int8_t)(this->options2_ >> 0xa)) & 1);
005d3650  }

005d365d                                                                                         90 90 90                               ...

005d3660  void __thiscall PlayerModule::SetHearLFGChat(class PlayerModule* this, uint8_t const arg2)

005d3660  {
005d3672      if ((((int8_t)(this->options2_ >> 0xa)) & 1) == arg2)
005d369d          return;
005d369d      
005d3676      uint32_t options2_ = this->options2_;
005d367c      uint32_t eax_1;
005d367c      
005d367c      if (arg2 == 0)
005d3685          eax_1 = (options2_ & 0xfffffbff);
005d367c      else
005d367e          eax_1 = (options2_ | 0x400);
005d367e      
005d368a      this->options2_ = eax_1;
005d3692      arg2 = 0x25;
005d369a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3660  }


005d36a0  uint8_t __fastcall PlayerModule::HearRoleplayChat(class PlayerModule const* this)

005d36a0  {
005d36ac      return (((int8_t)(this->options2_ >> 0xb)) & 1);
005d36a0  }

005d36ad                                         90 90 90                                                               ...

005d36b0  void __thiscall PlayerModule::SetHearRoleplayChat(class PlayerModule* this, uint8_t const arg2)

005d36b0  {
005d36c2      if ((((int8_t)(this->options2_ >> 0xb)) & 1) == arg2)
005d36ed          return;
005d36ed      
005d36c6      uint32_t options2_ = this->options2_;
005d36cc      uint32_t eax_1;
005d36cc      
005d36cc      if (arg2 == 0)
005d36d5          eax_1 = (options2_ & 0xfffff7ff);
005d36cc      else
005d36ce          eax_1 = (options2_ | 0x800);
005d36ce      
005d36da      this->options2_ = eax_1;
005d36e2      arg2 = 0x26;
005d36ea      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d36b0  }


005d36f0  uint8_t __fastcall PlayerModule::HearSocietyChat(class PlayerModule const* this)

005d36f0  {
005d36fc      return (((int8_t)(this->options2_ >> 0x13)) & 1);
005d36f0  }

005d36fd                                                                                         90 90 90                               ...

005d3700  void __thiscall PlayerModule::SetHearSocietyChat(class PlayerModule* this, uint8_t const arg2)

005d3700  {
005d3712      if ((((int8_t)(this->options2_ >> 0x13)) & 1) == arg2)
005d373d          return;
005d373d      
005d3716      uint32_t options2_ = this->options2_;
005d371c      uint32_t eax_1;
005d371c      
005d371c      if (arg2 == 0)
005d3725          eax_1 = (options2_ & 0xfff7ffff);
005d371c      else
005d371e          eax_1 = (options2_ | 0x80000);
005d371e      
005d372a      this->options2_ = eax_1;
005d3732      arg2 = 0x2e;
005d373a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3700  }


005d3740  void __thiscall PlayerModule::SetAppearOffline(class PlayerModule* this, uint8_t const arg2)

005d3740  {
005d3752      if ((((int8_t)(this->options2_ >> 0xc)) & 1) == arg2)
005d377d          return;
005d377d      
005d3756      uint32_t options2_ = this->options2_;
005d375c      uint32_t eax_1;
005d375c      
005d375c      if (arg2 == 0)
005d3765          eax_1 = (options2_ & 0xffffefff);
005d375c      else
005d375e          eax_1 = (options2_ | 0x1000);
005d375e      
005d376a      this->options2_ = eax_1;
005d3772      arg2 = 0x27;
005d377a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3740  }


005d3780  uint8_t __fastcall PlayerModule::DisplayDateOfBirth(class PlayerModule const* this)

005d3780  {
005d378b      return (((int8_t)(this->options2_ >> 1)) & 1);
005d3780  }

005d378c                                      90 90 90 90                                                              ....

005d3790  void __thiscall PlayerModule::SetDisplayDateOfBirth(class PlayerModule* this, uint8_t const arg2)

005d3790  {
005d37a1      if ((((int8_t)(this->options2_ >> 1)) & 1) == arg2)
005d37c8          return;
005d37c8      
005d37a5      uint32_t options2_ = this->options2_;
005d37ab      uint32_t eax_1;
005d37ab      
005d37ab      if (arg2 == 0)
005d37b2          eax_1 = (options2_ & 0xfffffffd);
005d37ab      else
005d37ad          eax_1 = (options2_ | 2);
005d37ad      
005d37b5      this->options2_ = eax_1;
005d37bd      arg2 = 0x1c;
005d37c5      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3790  }

005d37cb                                   90 90 90 90 90                                                             .....

005d37d0  uint8_t __fastcall PlayerModule::DisplayAge(class PlayerModule const* this)

005d37d0  {
005d37dc      return (((int8_t)(this->options2_ >> 5)) & 1);
005d37d0  }

005d37dd                                                                                         90 90 90                               ...

005d37e0  void __thiscall PlayerModule::SetDisplayAge(class PlayerModule* this, uint8_t const arg2)

005d37e0  {
005d37f2      if ((((int8_t)(this->options2_ >> 5)) & 1) == arg2)
005d3819          return;
005d3819      
005d37f6      uint32_t options2_ = this->options2_;
005d37fc      uint32_t eax_1;
005d37fc      
005d37fc      if (arg2 == 0)
005d3803          eax_1 = (options2_ & 0xffffffdf);
005d37fc      else
005d37fe          eax_1 = (options2_ | 0x20);
005d37fe      
005d3806      this->options2_ = eax_1;
005d380e      arg2 = 0x1d;
005d3816      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d37e0  }

005d381c                                                                                      90 90 90 90                              ....

005d3820  uint8_t __fastcall PlayerModule::DisplayChessRank(class PlayerModule const* this)

005d3820  {
005d382c      return (((int8_t)(this->options2_ >> 2)) & 1);
005d3820  }

005d382d                                         90 90 90                                                               ...

005d3830  void __thiscall PlayerModule::SetDisplayChessRank(class PlayerModule* this, uint8_t const arg2)

005d3830  {
005d3842      if ((((int8_t)(this->options2_ >> 2)) & 1) == arg2)
005d3869          return;
005d3869      
005d3846      uint32_t options2_ = this->options2_;
005d384c      uint32_t eax_1;
005d384c      
005d384c      if (arg2 == 0)
005d3853          eax_1 = (options2_ & 0xfffffffb);
005d384c      else
005d384e          eax_1 = (options2_ | 4);
005d384e      
005d3856      this->options2_ = eax_1;
005d385e      arg2 = 0x1e;
005d3866      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3830  }

005d386c                                      90 90 90 90                                                              ....

005d3870  uint8_t __fastcall PlayerModule::DisplayFishingSkill(class PlayerModule const* this)

005d3870  {
005d387c      return (((int8_t)(this->options2_ >> 3)) & 1);
005d3870  }

005d387d                                                                                         90 90 90                               ...

005d3880  void __thiscall PlayerModule::SetDisplayFishingSkill(class PlayerModule* this, uint8_t const arg2)

005d3880  {
005d3892      if ((((int8_t)(this->options2_ >> 3)) & 1) == arg2)
005d38b9          return;
005d38b9      
005d3896      uint32_t options2_ = this->options2_;
005d389c      uint32_t eax_1;
005d389c      
005d389c      if (arg2 == 0)
005d38a3          eax_1 = (options2_ & 0xfffffff7);
005d389c      else
005d389e          eax_1 = (options2_ | 8);
005d389e      
005d38a6      this->options2_ = eax_1;
005d38ae      arg2 = 0x1f;
005d38b6      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3880  }

005d38bc                                                                                      90 90 90 90                              ....

005d38c0  uint8_t __fastcall PlayerModule::DisplayNumberDeaths(class PlayerModule const* this)

005d38c0  {
005d38cc      return (((int8_t)(this->options2_ >> 4)) & 1);
005d38c0  }

005d38cd                                         90 90 90                                                               ...

005d38d0  void __thiscall PlayerModule::SetDisplayNumberDeaths(class PlayerModule* this, uint8_t const arg2)

005d38d0  {
005d38e2      if ((((int8_t)(this->options2_ >> 4)) & 1) == arg2)
005d3909          return;
005d3909      
005d38e6      uint32_t options2_ = this->options2_;
005d38ec      uint32_t eax_1;
005d38ec      
005d38ec      if (arg2 == 0)
005d38f3          eax_1 = (options2_ & 0xffffffef);
005d38ec      else
005d38ee          eax_1 = (options2_ | 0x10);
005d38ee      
005d38f6      this->options2_ = eax_1;
005d38fe      arg2 = 0x20;
005d3906      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d38d0  }

005d390c                                      90 90 90 90                                                              ....

005d3910  uint8_t __fastcall PlayerModule::DisplayNumberCharacterTitles(class PlayerModule const* this)

005d3910  {
005d391c      return (((int8_t)(this->options2_ >> 0xd)) & 1);
005d3910  }

005d391d                                                                                         90 90 90                               ...

005d3920  void __thiscall PlayerModule::SetDisplayNumberCharacterTitles(class PlayerModule* this, uint8_t const arg2)

005d3920  {
005d3932      if ((((int8_t)(this->options2_ >> 0xd)) & 1) == arg2)
005d395d          return;
005d395d      
005d3936      uint32_t options2_ = this->options2_;
005d393c      uint32_t eax_1;
005d393c      
005d393c      if (arg2 == 0)
005d3945          eax_1 = (options2_ & 0xffffdfff);
005d393c      else
005d393e          eax_1 = (options2_ | 0x2000);
005d393e      
005d394a      this->options2_ = eax_1;
005d3952      arg2 = 0x28;
005d395a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3920  }


005d3960  uint8_t __fastcall PlayerModule::FilterLanguage(class PlayerModule const* this)

005d3960  {
005d396c      return (((int8_t)(this->options2_ >> 0x11)) & 1);
005d3960  }

005d396d                                         90 90 90                                                               ...

005d3970  void __thiscall PlayerModule::SetFilterLanguage(class PlayerModule* this, uint8_t const arg2)

005d3970  {
005d3982      if ((((int8_t)(this->options2_ >> 0x11)) & 1) == arg2)
005d39ad          return;
005d39ad      
005d3986      uint32_t options2_ = this->options2_;
005d398c      uint32_t eax_1;
005d398c      
005d398c      if (arg2 == 0)
005d3995          eax_1 = (options2_ & 0xfffdffff);
005d398c      else
005d398e          eax_1 = (options2_ | 0x20000);
005d398e      
005d399a      this->options2_ = eax_1;
005d39a2      arg2 = 0x2c;
005d39aa      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3970  }


005d39b0  uint8_t __fastcall PlayerModule::DisplayTimeStamps(class PlayerModule const* this)

005d39b0  {
005d39bc      return (((int8_t)(this->options2_ >> 6)) & 1);
005d39b0  }

005d39bd                                                                                         90 90 90                               ...

005d39c0  void __thiscall PlayerModule::SetDisplayTimeStamps(class PlayerModule* this, uint8_t const arg2)

005d39c0  {
005d39d2      if ((((int8_t)(this->options2_ >> 6)) & 1) == arg2)
005d39f9          return;
005d39f9      
005d39d6      uint32_t options2_ = this->options2_;
005d39dc      uint32_t eax_1;
005d39dc      
005d39dc      if (arg2 == 0)
005d39e3          eax_1 = (options2_ & 0xffffffbf);
005d39dc      else
005d39de          eax_1 = (options2_ | 0x40);
005d39de      
005d39e6      this->options2_ = eax_1;
005d39ee      arg2 = 0x21;
005d39f6      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d39c0  }

005d39fc                                                                                      90 90 90 90                              ....

005d3a00  uint8_t __fastcall PlayerModule::SalvageMultiple(class PlayerModule const* this)

005d3a00  {
005d3a0c      return (((int8_t)(this->options2_ >> 7)) & 1);
005d3a00  }

005d3a0d                                         90 90 90                                                               ...

005d3a10  void __thiscall PlayerModule::SetSalvageMultiple(class PlayerModule* this, uint8_t const arg2)

005d3a10  {
005d3a22      if ((((int8_t)(this->options2_ >> 7)) & 1) == arg2)
005d3a4d          return;
005d3a4d      
005d3a26      uint32_t options2_ = this->options2_;
005d3a2c      uint32_t eax_1;
005d3a2c      
005d3a2c      if (arg2 == 0)
005d3a35          eax_1 = (options2_ & 0xffffff7f);
005d3a2c      else
005d3a2e          eax_1 = (options2_ | 0x80);
005d3a2e      
005d3a3a      this->options2_ = eax_1;
005d3a42      arg2 = 0x22;
005d3a4a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3a10  }


005d3a50  uint8_t __fastcall PlayerModule::MainPackPreferred(class PlayerModule const* this)

005d3a50  {
005d3a5c      return (((int8_t)(this->options2_ >> 0xe)) & 1);
005d3a50  }

005d3a5d                                                                                         90 90 90                               ...

005d3a60  void __thiscall PlayerModule::SetMainPackPreferred(class PlayerModule* this, uint8_t const arg2)

005d3a60  {
005d3a72      if ((((int8_t)(this->options2_ >> 0xe)) & 1) == arg2)
005d3a9d          return;
005d3a9d      
005d3a76      uint32_t options2_ = this->options2_;
005d3a7c      uint32_t eax_1;
005d3a7c      
005d3a7c      if (arg2 == 0)
005d3a85          eax_1 = (options2_ & 0xffffbfff);
005d3a7c      else
005d3a7e          eax_1 = (options2_ | 0x4000);
005d3a7e      
005d3a8a      this->options2_ = eax_1;
005d3a92      arg2 = 0x29;
005d3a9a      /* jump -> *(int32_t*)((char*)this->vtable + 0x14) */
005d3a60  }


005d3aa0  uint8_t __thiscall PlayerModule::GetOption(class PlayerModule const* this, enum PlayerOption arg2)

005d3aa0  {
005d3aa6      switch (arg2)
005d3aa6      {
005d3aa4          case AutoRepeatAttack_PlayerOption:
005d3aa4          {
005d3ab3              return (((int8_t)(this->options_ >> 1)) & 1);
005d3aa4              break;
005d3aa4          }
005d3ab6          case IgnoreAllegianceRequests_PlayerOption:
005d3ab6          {
005d3ac7              return (((int8_t)(this->options_ >> 2)) & 1);
005d3ab6              break;
005d3ab6          }
005d3aca          case IgnoreFellowshipRequests_PlayerOption:
005d3aca          {
005d3adb              return (((int8_t)(this->options_ >> 3)) & 1);
005d3aca              break;
005d3aca          }
005d3ade          case IgnoreTradeRequests_PlayerOption:
005d3ade          {
005d3aef              return (((int8_t)(this->options_ >> 0x11)) & 1);
005d3ade              break;
005d3ade          }
005d3af2          case DisableMostWeatherEffects_PlayerOption:
005d3af2          {
005d3b02              return (*(uint8_t*)((char*)this->options_)[2] & 1);
005d3af2              break;
005d3af2          }
005d3b05          case PersistentAtDay_PlayerOption:
005d3b05          {
005d3b13              return (((int8_t)this->options2_) & 1);
005d3b05              break;
005d3b05          }
005d3b16          case AllowGive_PlayerOption:
005d3b16          {
005d3b27              return (((int8_t)(this->options_ >> 6)) & 1);
005d3b16              break;
005d3b16          }
005d3b2a          case ViewCombatTarget_PlayerOption:
005d3b2a          {
005d3b3b              return (((int8_t)(this->options_ >> 7)) & 1);
005d3b2a              break;
005d3b2a          }
005d3b3e          case ShowTooltips_PlayerOption:
005d3b3e          {
005d3b4f              return (((int8_t)(this->options_ >> 8)) & 1);
005d3b3e              break;
005d3b3e          }
005d3b52          case UseDeception_PlayerOption:
005d3b52          {
005d3b63              return (((int8_t)(this->options_ >> 9)) & 1);
005d3b52              break;
005d3b52          }
005d3b66          case ToggleRun_PlayerOption:
005d3b66          {
005d3b77              return (((int8_t)(this->options_ >> 0xa)) & 1);
005d3b66              break;
005d3b66          }
005d3b7a          case StayInChatMode_PlayerOption:
005d3b7a          {
005d3b8b              return (((int8_t)(this->options_ >> 0xb)) & 1);
005d3b7a              break;
005d3b7a          }
005d3b8e          case AdvancedCombatUI_PlayerOption:
005d3b8e          {
005d3b9f              return (((int8_t)(this->options_ >> 0xc)) & 1);
005d3b8e              break;
005d3b8e          }
005d3ba2          case AutoTarget_PlayerOption:
005d3ba2          {
005d3bb3              return (((int8_t)(this->options_ >> 0xd)) & 1);
005d3ba2              break;
005d3ba2          }
005d3bb6          case VividTargetingIndicator_PlayerOption:
005d3bb6          {
005d3bc7              return (((int8_t)(this->options_ >> 0xf)) & 1);
005d3bb6              break;
005d3bb6          }
005d3bca          case FellowshipShareXP_PlayerOption:
005d3bca          {
005d3bdb              return (((int8_t)(this->options_ >> 0x12)) & 1);
005d3bca              break;
005d3bca          }
005d3bde          case AcceptLootPermits_PlayerOption:
005d3bde          {
005d3bef              return (((int8_t)(this->options_ >> 0x13)) & 1);
005d3bde              break;
005d3bde          }
005d3bf2          case FellowshipShareLoot_PlayerOption:
005d3bf2          {
005d3c03              return (((int8_t)(this->options_ >> 0x14)) & 1);
005d3bf2              break;
005d3bf2          }
005d3c06          case FellowshipAutoAcceptRequests_PlayerOption:
005d3c06          {
005d3c17              return (((int8_t)(this->options_ >> 0x1d)) & 1);
005d3c06              break;
005d3c06          }
005d3c1a          case SideBySideVitals_PlayerOption:
005d3c1a          {
005d3c2b              return (((int8_t)(this->options_ >> 0x15)) & 1);
005d3c1a              break;
005d3c1a          }
005d3c2e          case CoordinatesOnRadar_PlayerOption:
005d3c2e          {
005d3c3f              return (((int8_t)(this->options_ >> 0x16)) & 1);
005d3c2e              break;
005d3c2e          }
005d3c42          case SpellDuration_PlayerOption:
005d3c42          {
005d3c53              return (((int8_t)(this->options_ >> 0x17)) & 1);
005d3c42              break;
005d3c42          }
005d3c56          case DisableHouseRestrictionEffects_PlayerOption:
005d3c56          {
005d3c67              return (((int8_t)(this->options_ >> 0x19)) & 1);
005d3c56              break;
005d3c56          }
005d3c6a          case DragItemOnPlayerOpensSecureTrade_PlayerOption:
005d3c6a          {
005d3c7b              return (((int8_t)(this->options_ >> 0x1a)) & 1);
005d3c6a              break;
005d3c6a          }
005d3c7e          case DisplayAllegianceLogonNotifications_PlayerOption:
005d3c7e          {
005d3c8f              return (((int8_t)(this->options_ >> 0x1b)) & 1);
005d3c7e              break;
005d3c7e          }
005d3c92          case UseChargeAttack_PlayerOption:
005d3c92          {
005d3ca3              return (((int8_t)(this->options_ >> 0x1c)) & 1);
005d3c92              break;
005d3c92          }
005d3ccd          case UseCraftSuccessDialog_PlayerOption:
005d3ccd          {
005d3cdb              return ((int8_t)(this->options_ >> 0x1f));
005d3ccd              break;
005d3ccd          }
005d3cf2          case HearAllegianceChat_PlayerOption:
005d3cf2          {
005d3d03              return (((int8_t)(this->options_ >> 0x1e)) & 1);
005d3cf2              break;
005d3cf2          }
005d3d6a          case DisplayDateOfBirth_PlayerOption:
005d3d6a          {
005d3d7a              return (((int8_t)(this->options2_ >> 1)) & 1);
005d3d6a              break;
005d3d6a          }
005d3d7d          case DisplayAge_PlayerOption:
005d3d7d          {
005d3d8e              return (((int8_t)(this->options2_ >> 5)) & 1);
005d3d7d              break;
005d3d7d          }
005d3d91          case DisplayChessRank_PlayerOption:
005d3d91          {
005d3da2              return (((int8_t)(this->options2_ >> 2)) & 1);
005d3d91              break;
005d3d91          }
005d3da5          case DisplayFishingSkill_PlayerOption:
005d3da5          {
005d3db6              return (((int8_t)(this->options2_ >> 3)) & 1);
005d3da5              break;
005d3da5          }
005d3db9          case DisplayNumberDeaths_PlayerOption:
005d3db9          {
005d3dca              return (((int8_t)(this->options2_ >> 4)) & 1);
005d3db9              break;
005d3db9          }
005d3de1          case DisplayTimeStamps_PlayerOption:
005d3de1          {
005d3df2              return (((int8_t)(this->options2_ >> 6)) & 1);
005d3de1              break;
005d3de1          }
005d3e09          case SalvageMultiple_PlayerOption:
005d3e09          {
005d3e1a              return (((int8_t)(this->options2_ >> 7)) & 1);
005d3e09              break;
005d3e09          }
005d3d06          case HearGeneralChat_PlayerOption:
005d3d06          {
005d3d17              return (((int8_t)(this->options2_ >> 8)) & 1);
005d3d06              break;
005d3d06          }
005d3d1a          case HearTradeChat_PlayerOption:
005d3d1a          {
005d3d2b              return (((int8_t)(this->options2_ >> 9)) & 1);
005d3d1a              break;
005d3d1a          }
005d3d2e          case HearLFGChat_PlayerOption:
005d3d2e          {
005d3d3f              return (((int8_t)(this->options2_ >> 0xa)) & 1);
005d3d2e              break;
005d3d2e          }
005d3d42          case HearRoleplayChat_PlayerOption:
005d3d42          {
005d3d53              return (((int8_t)(this->options2_ >> 0xb)) & 1);
005d3d42              break;
005d3d42          }
005d3d56          case AppearOffline_PlayerOption:
005d3d56          {
005d3d67              return (((int8_t)(this->options2_ >> 0xc)) & 1);
005d3d56              break;
005d3d56          }
005d3dcd          case DisplayNumberCharacterTitles_PlayerOption:
005d3dcd          {
005d3dde              return (((int8_t)(this->options2_ >> 0xd)) & 1);
005d3dcd              break;
005d3dcd          }
005d3e1d          case MainPackPreferred_PlayerOption:
005d3e1d          {
005d3e2e              return (((int8_t)(this->options2_ >> 0xe)) & 1);
005d3e1d              break;
005d3e1d          }
005d3ca6          case LeadMissileTargets_PlayerOption:
005d3ca6          {
005d3cb7              return (((int8_t)(this->options2_ >> 0xf)) & 1);
005d3ca6              break;
005d3ca6          }
005d3cba          case UseFastMissiles_PlayerOption:
005d3cba          {
005d3cca              return (*(uint8_t*)((char*)this->options2_)[2] & 1);
005d3cba              break;
005d3cba          }
005d3df5          case FilterLanguage_PlayerOption:
005d3df5          {
005d3e06              return (((int8_t)(this->options2_ >> 0x11)) & 1);
005d3df5              break;
005d3df5          }
005d3cde          case ConfirmVolatileRareUse_PlayerOption:
005d3cde          {
005d3cef              return (((int8_t)(this->options2_ >> 0x12)) & 1);
005d3cde              break;
005d3cde          }
005d3e31          case HearSocietyChat_PlayerOption:
005d3e31          {
005d3e42              return (((int8_t)(this->options2_ >> 0x13)) & 1);
005d3e31              break;
005d3e31          }
005d3e45          case ShowHelm_PlayerOption:
005d3e45          {
005d3e56              return (((int8_t)(this->options2_ >> 0x14)) & 1);
005d3e45              break;
005d3e45          }
005d3e59          case DisableDistanceFog_PlayerOption:
005d3e59          {
005d3e6a              return (((int8_t)(this->options2_ >> 0x15)) & 1);
005d3e59              break;
005d3e59          }
005d3e6d          case UseMouseTurning_PlayerOption:
005d3e6d          {
005d3e7e              return (((int8_t)(this->options2_ >> 0x16)) & 1);
005d3e6d              break;
005d3e6d          }
005d3e81          case ShowCloak_PlayerOption:
005d3e81          {
005d3e92              return (((int8_t)(this->options2_ >> 0x17)) & 1);
005d3e81              break;
005d3e81          }
005d3e95          case LockUI_PlayerOption:
005d3e95          {
005d3ea5              return (*(uint8_t*)((char*)this->options2_)[3] & 1);
005d3e95              break;
005d3e95          }
005d3aa6      }
005d3aa6      
005d3ea8      enum PlayerOption eax_151;
005d3ea8      eax_151 = 0;
005d3eaa      return 0;
005d3aa0  }

005d3ead                                         90 90 90                                                               ...

005d3eb0  void __thiscall PlayerModule::SetOption(class PlayerModule* this, enum PlayerOption arg2, uint8_t arg3)

005d3eb0  {
005d3eb6      switch (arg2)
005d3eb6      {
005d3eb4          case AutoRepeatAttack_PlayerOption:
005d3eb4          {
005d3ebe              enum PlayerOption eax;
005d3ebe              eax = arg3;
005d3ebe              
005d3ec9              if ((((int8_t)(this->options_ >> 1)) & 1) != eax)
005d3ec9              {
005d3ed1                  uint32_t options_ = this->options_;
005d3ed1                  
005d3ed7                  if (eax != 0)
005d3ed7                  {
005d3edc                      this->options_ = (options_ | 2);
005d3ee6                      *(int32_t*)((char*)this->vtable + 0x14)(0);
005d3ee9                      return;
005d3ed7                  }
005d3ed7                  
005d3eef                  this->options_ = (options_ & 0xfffffffd);
005d3ef9                  *(int32_t*)((char*)this->vtable + 0x14)(0);
005d3ec9              }
005d3eb4              break;
005d3eb4          }
005d3eff          case IgnoreAllegianceRequests_PlayerOption:
005d3eff          {
005d3f09              PlayerModule::SetIgnoreAllegianceRequests(this, arg3);
005d3eff              break;
005d3eff          }
005d3f11          case IgnoreFellowshipRequests_PlayerOption:
005d3f11          {
005d3f1b              PlayerModule::SetIgnoreFellowshipRequests(this, arg3);
005d3f11              break;
005d3f11          }
005d3f23          case IgnoreTradeRequests_PlayerOption:
005d3f23          {
005d3f2d              PlayerModule::SetIgnoreTradeRequests(this, arg3);
005d3f23              break;
005d3f23          }
005d3f35          case DisableMostWeatherEffects_PlayerOption:
005d3f35          {
005d3f3f              PlayerModule::SetDisableMostWeatherEffects(this, arg3);
005d3f35              break;
005d3f35          }
005d3f47          case PersistentAtDay_PlayerOption:
005d3f47          {
005d3f51              PlayerModule::SetPersistentAtDay(this, arg3);
005d3f47              break;
005d3f47          }
005d3f59          case AllowGive_PlayerOption:
005d3f59          {
005d3f63              PlayerModule::SetAllowGive(this, arg3);
005d3f59              break;
005d3f59          }
005d3f6b          case ViewCombatTarget_PlayerOption:
005d3f6b          {
005d3f75              PlayerModule::SetViewCombatTarget(this, arg3);
005d3f6b              break;
005d3f6b          }
005d3f7d          case ShowTooltips_PlayerOption:
005d3f7d          {
005d3f87              PlayerModule::SetShowTooltips(this, arg3);
005d3f7d              break;
005d3f7d          }
005d3f8f          case UseDeception_PlayerOption:
005d3f8f          {
005d3f99              PlayerModule::SetUseDeception(this, arg3);
005d3f8f              break;
005d3f8f          }
005d3fa1          case ToggleRun_PlayerOption:
005d3fa1          {
005d3fab              PlayerModule::SetToggleRun(this, arg3);
005d3fa1              break;
005d3fa1          }
005d3fb3          case StayInChatMode_PlayerOption:
005d3fb3          {
005d3fbd              PlayerModule::SetStayInChatMode(this, arg3);
005d3fb3              break;
005d3fb3          }
005d3fc5          case AdvancedCombatUI_PlayerOption:
005d3fc5          {
005d3fcf              PlayerModule::SetAdvancedCombatUI(this, arg3);
005d3fc5              break;
005d3fc5          }
005d3fd7          case AutoTarget_PlayerOption:
005d3fd7          {
005d3fe1              PlayerModule::SetAutoTarget(this, arg3);
005d3fd7              break;
005d3fd7          }
005d3fe9          case VividTargetingIndicator_PlayerOption:
005d3fe9          {
005d3ff3              PlayerModule::SetVividTargetingIndicator(this, arg3);
005d3fe9              break;
005d3fe9          }
005d3ffb          case FellowshipShareXP_PlayerOption:
005d3ffb          {
005d4005              PlayerModule::SetFellowshipShareXP(this, arg3);
005d3ffb              break;
005d3ffb          }
005d400d          case AcceptLootPermits_PlayerOption:
005d400d          {
005d4017              PlayerModule::SetAcceptLootPermits(this, arg3);
005d400d              break;
005d400d          }
005d401f          case FellowshipShareLoot_PlayerOption:
005d401f          {
005d4029              PlayerModule::SetFellowshipShareLoot(this, arg3);
005d401f              break;
005d401f          }
005d4031          case FellowshipAutoAcceptRequests_PlayerOption:
005d4031          {
005d403b              PlayerModule::SetFellowshipAutoAcceptRequests(this, arg3);
005d4031              break;
005d4031          }
005d4043          case SideBySideVitals_PlayerOption:
005d4043          {
005d404d              PlayerModule::SetSideBySideVitals(this, arg3);
005d4043              break;
005d4043          }
005d4055          case CoordinatesOnRadar_PlayerOption:
005d4055          {
005d405f              PlayerModule::SetCoordinatesOnRadar(this, arg3);
005d4055              break;
005d4055          }
005d4067          case SpellDuration_PlayerOption:
005d4067          {
005d4071              PlayerModule::SetSpellDuration(this, arg3);
005d4067              break;
005d4067          }
005d4079          case DisableHouseRestrictionEffects_PlayerOption:
005d4079          {
005d4083              PlayerModule::SetDisableHouseRestrictionEffects(this, arg3);
005d4079              break;
005d4079          }
005d408b          case DragItemOnPlayerOpensSecureTrade_PlayerOption:
005d408b          {
005d4095              PlayerModule::SetDragItemOnPlayerOpensSecureTrade(this, arg3);
005d408b              break;
005d408b          }
005d409d          case DisplayAllegianceLogonNotifications_PlayerOption:
005d409d          {
005d40a7              PlayerModule::SetDisplayAllegianceLogonNotifications(this, arg3);
005d409d              break;
005d409d          }
005d40af          case UseChargeAttack_PlayerOption:
005d40af          {
005d40b9              PlayerModule::SetUseChargeAttack(this, arg3);
005d40af              break;
005d40af          }
005d40e5          case UseCraftSuccessDialog_PlayerOption:
005d40e5          {
005d40ef              PlayerModule::SetUseCraftSuccessDialog(this, arg3);
005d40e5              break;
005d40e5          }
005d4109          case HearAllegianceChat_PlayerOption:
005d4109          {
005d4113              PlayerModule::SetHearAllegianceChat(this, arg3);
005d4109              break;
005d4109          }
005d4175          case DisplayDateOfBirth_PlayerOption:
005d4175          {
005d417f              PlayerModule::SetDisplayDateOfBirth(this, arg3);
005d4175              break;
005d4175          }
005d4187          case DisplayAge_PlayerOption:
005d4187          {
005d4191              PlayerModule::SetDisplayAge(this, arg3);
005d4187              break;
005d4187          }
005d4199          case DisplayChessRank_PlayerOption:
005d4199          {
005d41a3              PlayerModule::SetDisplayChessRank(this, arg3);
005d4199              break;
005d4199          }
005d41ab          case DisplayFishingSkill_PlayerOption:
005d41ab          {
005d41b5              PlayerModule::SetDisplayFishingSkill(this, arg3);
005d41ab              break;
005d41ab          }
005d41bd          case DisplayNumberDeaths_PlayerOption:
005d41bd          {
005d41c7              PlayerModule::SetDisplayNumberDeaths(this, arg3);
005d41bd              break;
005d41bd          }
005d41e1          case DisplayTimeStamps_PlayerOption:
005d41e1          {
005d41eb              PlayerModule::SetDisplayTimeStamps(this, arg3);
005d41e1              break;
005d41e1          }
005d4205          case SalvageMultiple_PlayerOption:
005d4205          {
005d420f              PlayerModule::SetSalvageMultiple(this, arg3);
005d4205              break;
005d4205          }
005d411b          case HearGeneralChat_PlayerOption:
005d411b          {
005d4125              PlayerModule::SetHearGeneralChat(this, arg3);
005d411b              break;
005d411b          }
005d412d          case HearTradeChat_PlayerOption:
005d412d          {
005d4137              PlayerModule::SetHearTradeChat(this, arg3);
005d412d              break;
005d412d          }
005d413f          case HearLFGChat_PlayerOption:
005d413f          {
005d4149              PlayerModule::SetHearLFGChat(this, arg3);
005d413f              break;
005d413f          }
005d4151          case HearRoleplayChat_PlayerOption:
005d4151          {
005d415b              PlayerModule::SetHearRoleplayChat(this, arg3);
005d4151              break;
005d4151          }
005d4163          case AppearOffline_PlayerOption:
005d4163          {
005d416d              PlayerModule::SetAppearOffline(this, arg3);
005d4163              break;
005d4163          }
005d41cf          case DisplayNumberCharacterTitles_PlayerOption:
005d41cf          {
005d41d9              PlayerModule::SetDisplayNumberCharacterTitles(this, arg3);
005d41cf              break;
005d41cf          }
005d4217          case MainPackPreferred_PlayerOption:
005d4217          {
005d4221              PlayerModule::SetMainPackPreferred(this, arg3);
005d4217              break;
005d4217          }
005d40c1          case LeadMissileTargets_PlayerOption:
005d40c1          {
005d40cb              PlayerModule::SetLeadMissileTargets(this, arg3);
005d40c1              break;
005d40c1          }
005d40d3          case UseFastMissiles_PlayerOption:
005d40d3          {
005d40dd              PlayerModule::SetUseFastMissiles(this, arg3);
005d40d3              break;
005d40d3          }
005d41f3          case FilterLanguage_PlayerOption:
005d41f3          {
005d41fd              PlayerModule::SetFilterLanguage(this, arg3);
005d41f3              break;
005d41f3          }
005d40f7          case ConfirmVolatileRareUse_PlayerOption:
005d40f7          {
005d4101              PlayerModule::SetConfirmVolatileRareUse(this, arg3);
005d40f7              break;
005d40f7          }
005d4229          case HearSocietyChat_PlayerOption:
005d4229          {
005d4233              PlayerModule::SetHearSocietyChat(this, arg3);
005d4229              break;
005d4229          }
005d423b          case ShowHelm_PlayerOption:
005d423b          {
005d4245              PlayerModule::SetShowHelm(this, arg3);
005d423b              break;
005d423b          }
005d424d          case DisableDistanceFog_PlayerOption:
005d424d          {
005d4257              PlayerModule::SetDisableDistanceFog(this, arg3);
005d424d              break;
005d424d          }
005d425f          case UseMouseTurning_PlayerOption:
005d425f          {
005d4269              PlayerModule::SetUseMouseTurning(this, arg3);
005d425f              break;
005d425f          }
005d4271          case ShowCloak_PlayerOption:
005d4271          {
005d427b              PlayerModule::SetShowCloak(this, arg3);
005d4271              break;
005d4271          }
005d4283          case LockUI_PlayerOption:
005d4283          {
005d428d              PlayerModule::SetLockUI(this, arg3);
005d4283              break;
005d4283          }
005d3eb6      }
005d3eb0  }

005d4295                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d42a0  uint32_t __thiscall PackableList<unsigned long>::InsertPos(class PackableList<unsigned long>* this, uint32_t const arg2, uint32_t const* arg3)

005d42a0  {
005d42ab      uint32_t const i_1 = arg2;
005d42ad      void* eax = operator new(0xc);
005d42b7      void* ecx_1;
005d42b7      
005d42b7      if (eax == 0)
005d42d3          ecx_1 = nullptr;
005d42b7      else
005d42b7      {
005d42bf          *(uint32_t*)eax = *(uint32_t*)arg3;
005d42c1          *(uint32_t*)((char*)eax + 4) = 0;
005d42c8          *(uint32_t*)((char*)eax + 8) = 0;
005d42cf          ecx_1 = eax;
005d42b7      }
005d42b7      
005d42d5      class PackableLLNode<unsigned long>* eax_1 = this->head;
005d42d5      
005d42da      if (eax_1 == 0)
005d42da      {
005d42e1          this->curNum += 1;
005d42e4          this->head = ecx_1;
005d42e7          this->tail = ecx_1;
005d42ee          return 0;
005d42da      }
005d42da      
005d42f3      if (arg2 != 0)
005d42f3      {
005d42fd          uint32_t const i;
005d42fd          
005d42fd          do
005d42fd          {
005d42f7              if (eax_1 == 0)
005d42f7                  goto label_5d4303;
005d42f7              
005d42f9              i = i_1;
005d42f9              i_1 -= 1;
005d42fa              eax_1 = eax_1->next;
005d42fd          } while (i != 1);
005d42f3      }
005d42f3      
005d4301      if (eax_1 == 0)
005d4301      {
005d4303      label_5d4303:
005d4303          class PackableLLNode<unsigned long>* tail = this->tail;
005d4306          tail->next = ecx_1;
005d4309          *(uint32_t*)((char*)ecx_1 + 8) = tail;
005d430c          uint32_t curNum = this->curNum;
005d430f          this->tail = ecx_1;
005d4316          this->curNum = (curNum + 1);
005d431b          return curNum;
005d4301      }
005d4301      
005d431e      class PackableLLNode<unsigned long>* prev = eax_1->prev;
005d431e      
005d4323      if (prev == 0)
005d432a          this->head = ecx_1;
005d4323      else
005d4325          prev->next = ecx_1;
005d4325      
005d432d      class PackableLLNode<unsigned long>* prev_1 = eax_1->prev;
005d4330      *(uint32_t*)((char*)ecx_1 + 4) = eax_1;
005d4333      *(uint32_t*)((char*)ecx_1 + 8) = prev_1;
005d4336      eax_1->prev = ecx_1;
005d433e      this->curNum += 1;
005d4345      return arg2;
005d42a0  }

005d4348                          90 90 90 90 90 90 90 90                                                          ........

005d4350  void __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,long>::PackableHashTable<IDClass<_tagDataID,32,0>,long>(class PackableHashTable<IDClass<_tagDataID,32,0>,long>* this, uint32_t const arg2)

005d4350  {
005d4359      this->_table_size = arg2;
005d435e      this->vtable = &PackableHashTable<class IDClass<struct _tagDataID,32,0>,long>::`vftable';
005d4364      this->m_fThrowawayDuplicateKeysOnUnPack = 0;
005d4367      this->_buckets = nullptr;
005d436a      this->_currNum = 0;
005d436d      PackableHashTable<unsigned long,CContractTracker>::Init(this);
005d4350  }

005d4378                                                                          90 90 90 90 90 90 90 90                          ........

005d4380  class PackableHashIterator<IDClass<_tagDataID,32,0>,long>* __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,long>::begin(class PackableHashTable<IDClass<_tagDataID,32,0>,long> const* this, class PackableHashIterator<IDClass<_tagDataID,32,0>,long>* __return)

005d4380  {
005d4380      uint32_t _table_size = this->_table_size;
005d4384      int32_t eax = 0;
005d4384      
005d4389      if (_table_size > 0)
005d4389      {
005d438b          class PackableHashData<IDClass<_tagDataID,32,0>,long>** _buckets_1 = this->_buckets;
005d438e          class PackableHashData<IDClass<_tagDataID,32,0>,long>** _buckets_2 = _buckets_1;
005d438e          
005d439b          do
005d439b          {
005d4393              if (*(uint32_t*)_buckets_2 != 0)
005d4393              {
005d43bc                  int32_t ecx = _buckets_1[eax];
005d43bf                  int32_t* __return_1 = __return;
005d43c3                  __return_1[2] = _buckets_1;
005d43c8                  __return_1[1] = ecx;
005d43cb                  *(uint32_t*)__return_1 = 0x7b4fbc;
005d43d1                  __return_1[3] = _table_size;
005d43d4                  return __return_1;
005d4393              }
005d4393              
005d4395              eax += 1;
005d4396              _buckets_2 = &_buckets_2[1];
005d439b          } while (eax < _table_size);
005d4389      }
005d4389      
005d439d      class PackableHashData<IDClass<_tagDataID,32,0>,long>** _buckets = this->_buckets;
005d43a6      __return->_current = nullptr;
005d43ad      __return->_buckets = _buckets;
005d43b0      __return->vtable = 0x7b4fbc;
005d43b6      __return->_table_size = _table_size;
005d43b9      return __return;
005d4380  }

005d43d7                                                                       90 90 90 90 90 90 90 90 90                         .........

005d43e0  void __thiscall PlayerModule::AddSpellFavorite(class PlayerModule* this, uint32_t const arg2, int32_t const arg3, int32_t const arg4)

005d43e0  {
005d43eb      if ((arg4 >= 0 && arg4 < 8))
005d43fe          PackableList<unsigned long>::InsertPos(&this->favorite_spells_[arg4], arg3, &arg2);
005d43e0  }

005d4406                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005d4410  class PackableHashIterator<IDClass<_tagDataID,32,0>,long>* __thiscall PlayerModule::GetDesiredCompHashStart(class PlayerModule* this, class PackableHashIterator<IDClass<_tagDataID,32,0>,long>* __return)

005d4410  {
005d4410      class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d4410      
005d441a      if (desired_comps_ != 0)
005d441a      {
005d4438          PackableHashTable<IDClass<_tagDataID,32,0>,long>::begin(desired_comps_, __return);
005d4440          return __return;
005d441a      }
005d441a      
005d4420      __return->vtable = 0x7b4fbc;
005d4426      __return->_current = nullptr;
005d4429      __return->_buckets = nullptr;
005d442c      __return->_table_size = 0;
005d442f      return __return;
005d4410  }

005d4443           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005d4450  class PackableHashIterator<IDClass<_tagDataID,32,0>,long>* __thiscall PlayerModule::GetDesiredCompHashEnd(class PlayerModule* this, class PackableHashIterator<IDClass<_tagDataID,32,0>,long>* __return)

005d4450  {
005d4450      class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d4450      
005d445b      if (desired_comps_ == 0)
005d445b      {
005d4461          __return->_buckets = nullptr;
005d4464          __return->_table_size = 0;
005d4467          __return->_current = nullptr;
005d446a          __return->vtable = 0x7b4fbc;
005d4471          return __return;
005d445b      }
005d445b      
005d4474      uint32_t _table_size = desired_comps_->_table_size;
005d4477      class PackableHashData<IDClass<_tagDataID,32,0>,long>** _buckets = desired_comps_->_buckets;
005d447e      __return->_current = nullptr;
005d4481      __return->_buckets = _buckets;
005d4484      __return->_table_size = _table_size;
005d4487      __return->vtable = 0x7b4fbc;
005d448e      return __return;
005d4450  }

005d4491                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005d44a0  void __thiscall PlayerModule::SetPackHeader(class PlayerModule* this, uint32_t* arg2)

005d44a0  {
005d44a9      if (this->shortcuts_ != 0)
005d44ab          *(uint32_t*)arg2 |= 1;
005d44ab      
005d44b0      uint32_t edx_1 = (*(uint32_t*)arg2 | 0x400);
005d44b7      *(uint32_t*)arg2 = edx_1;
005d44b7      
005d44c1      if (this->desired_comps_ != 0)
005d44c6          *(uint32_t*)arg2 = (edx_1 | 8);
005d44c6      
005d44ca      uint32_t edx_4 = (*(uint32_t*)arg2 | 0x60);
005d44cd      *(uint32_t*)arg2 = edx_4;
005d44cd      
005d44d8      if (this->m_pPlayerOptionsData != 0)
005d44e0          *(uint32_t*)arg2 = (edx_4 | 0x100);
005d44e0      
005d44ea      if (this->m_colGameplayOptions.m_hashProperties.m_intrusiveTable.m_numElements != 0)
005d44ec          *(uint32_t*)arg2 |= 0x200;
005d44a0  }

005d44f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d4500  uint32_t __fastcall PlayerModule::GetPackSize(class PlayerModule* this)

005d4500  {
005d4500      class PlayerModule* this_1 = this;
005d4504      class ShortCutManager* shortcuts_ = this->shortcuts_;
005d450a      int32_t result = 0x10;
005d450f      this_1 = nullptr;
005d450f      
005d4517      if (shortcuts_ != 0)
005d4527          result = (shortcuts_->vtable->Pack(&this_1, 0) + 0x10);
005d4527      
005d452c      class PackableList<unsigned long> (* edi)[0x8] = &this->favorite_spells_;
005d452f      int32_t i_1 = 8;
005d4548      int32_t i;
005d4548      
005d4548      do
005d4548      {
005d4542          result += ADJ(edi)->favorite_spells_[0].vtable->Pack(&this_1, 0);
005d4544          edi = &*(uint128_t*)edi[1];
005d4547          i = i_1;
005d4547          i_1 -= 1;
005d4548      } while (i != 1);
005d454a      class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d454a      
005d4554      if (desired_comps_ != 0)
005d4562          result += desired_comps_->vtable->Pack(&this_1, 0);
005d4562      
005d4564      class GenericQualitiesData* m_pPlayerOptionsData = this->m_pPlayerOptionsData;
005d4564      
005d456c      if (m_pPlayerOptionsData != 0)
005d457a          result += m_pPlayerOptionsData->vtable->Pack(&this_1, 0);
005d457a      
005d4584      if (this->m_colGameplayOptions.m_hashProperties.m_intrusiveTable.m_numElements != 0)
005d459c          result += this->m_colGameplayOptions.vtable->Pack(&this_1, 0);
005d459c      
005d45a0      int32_t ecx_3 = (result & 3);
005d45a0      
005d45a3      if (ecx_3 == 0)
005d45b9          return result;
005d45b9      
005d45b1      return ((4 - ecx_3) + result);
005d4500  }

005d45ba                                                                                90 90 90 90 90 90                            ......

005d45c0  uint32_t __thiscall PlayerModule::Pack(class PlayerModule* this, void** arg2, uint32_t arg3)

005d45c0  {
005d45c0      class PlayerModule* this_1 = this;
005d45c7      int32_t result = this->vtable->GetPackSize();
005d45ca      uint32_t ebp = arg3;
005d45ca      
005d45d4      if (ebp < result)
005d46d5          return result;
005d46d5      
005d45e2      arg3 = 0;
005d45ea      PlayerModule::SetPackHeader(this, &arg3);
005d45f9      **(uint32_t**)arg2 = arg3;
005d45fd      void* edx_3 = (*(uint32_t*)arg2 + 4);
005d4600      *(uint32_t*)arg2 = edx_3;
005d460a      *(uint32_t*)edx_3 = this->options_;
005d460c      *(uint32_t*)arg2 += 4;
005d460f      class ShortCutManager* shortcuts_ = this->shortcuts_;
005d460f      
005d4614      if (shortcuts_ != 0)
005d4616          shortcuts_->vtable->Pack(arg2, ebp);
005d4616      
005d461e      class PackableList<unsigned long> (* ebx_1)[0x8] = &this->favorite_spells_;
005d4621      arg3 = 8;
005d4645      uint32_t i;
005d4645      
005d4645      do
005d4645      {
005d46c0          ADJ(ebx_1)->favorite_spells_[0].vtable->Pack(arg2, ebp);
005d4639          i = arg3;
005d463d          ebx_1 = &*(uint128_t*)ebx_1[1];
005d4641          arg3 = (i - 1);
005d4645      } while (i != 1);
005d4647      class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d4647      
005d4650      if (desired_comps_ != 0)
005d4652          desired_comps_->vtable->Pack(arg2, ebp);
005d4652      
005d4661      **(uint32_t**)arg2 = this->spell_filters_;
005d4665      void* edx_7 = (*(uint32_t*)arg2 + 4);
005d4668      *(uint32_t*)arg2 = edx_7;
005d4672      *(uint32_t*)edx_7 = this->options2_;
005d4674      *(uint32_t*)arg2 += 4;
005d4677      class GenericQualitiesData* m_pPlayerOptionsData = this->m_pPlayerOptionsData;
005d4677      
005d467f      if (m_pPlayerOptionsData != 0)
005d4681          m_pPlayerOptionsData->vtable->Pack(arg2, ebp);
005d4681      
005d4690      if (this->m_colGameplayOptions.m_hashProperties.m_intrusiveTable.m_numElements != 0)
005d4692          this->m_colGameplayOptions.vtable->Pack(arg2, ebp);
005d4692      
005d46a5      void* ecx_6 = (*(uint32_t*)arg2 & 0x80000003);
005d46a5      bool cond:3_1 = ecx_6 == 0;
005d46a5      
005d46ab      if (ecx_6 < 0)
005d46ab      {
005d46ae          void* ecx_8 = (((char*)ecx_6 - 1) | 0xfffffffc);
005d46b1          ecx_6 = ((char*)ecx_8 + 1);
005d46b1          cond:3_1 = ecx_8 == 0xffffffff;
005d46ab      }
005d46ab      
005d46b2      if (!(cond:3_1))
005d46b2      {
005d46b9          void* i_2 = (4 - ecx_6);
005d46b9          
005d46bb          if (4 != ecx_6)
005d46bb          {
005d46cb              void* i_1;
005d46cb              
005d46cb              do
005d46cb              {
005d46c2                  **(uint8_t**)arg2 = 0;
005d46c8                  i_1 = i_2;
005d46c8                  i_2 -= 1;
005d46c9                  *(uint32_t*)arg2 += 1;
005d46cb              } while (i_1 != 1);
005d46bb          }
005d46b2      }
005d46b2      
005d46cd      return result;
005d45c0  }

005d46d8                                                                          90 90 90 90 90 90 90 90                          ........

005d46e0  uint32_t* __thiscall PackableHashTable<unsigned long,unsigned long>::lookup(class PackableHashTable<unsigned long,unsigned long> const* this, uint32_t const* arg2)

005d46e0  {
005d46e2      uint32_t _table_size = this->_table_size;
005d46e2      
005d46e7      if (_table_size != 0)
005d46e7      {
005d46e9          class PackableHashData<unsigned long,unsigned long>** _buckets = this->_buckets;
005d46e9          
005d46ee          if (_buckets != 0)
005d46ee          {
005d46f4              uint32_t const ecx = *(uint32_t*)arg2;
005d46f4              
005d4701              for (int32_t* i = _buckets[(COMBINE(0, ecx) % _table_size)]; i != 0; i = i[2])
005d4701              {
005d4705                  if (ecx == *(uint32_t*)i)
005d471a                      return &i[1];
005d4701              }
005d46ee          }
005d46e7      }
005d46e7      
005d4712      return 0;
005d46e0  }

005d471d                                                                                         90 90 90                               ...

005d4720  int32_t __thiscall PackableList<unsigned long>::Remove(class PackableList<unsigned long>* this, uint32_t* arg2)

005d4720  {
005d4723      class PackableLLNode<unsigned long>* head = this->head;
005d4723      
005d4728      if (head == 0)
005d472b          return head;
005d472b      
005d472e      uint32_t data = head->data;
005d4735      uint32_t edx = *(uint32_t*)arg2;
005d4735      
005d4739      if (data == edx)
005d4739      {
005d473b          *(uint32_t*)arg2 = data;
005d4740          class PackableLLNode<unsigned long>* next = this->head->next;
005d4745          this->head = next;
005d4745          
005d4748          if (next == 0)
005d4753              this->tail = nullptr;
005d4748          else
005d474a              next->prev = nullptr;
005d474a          
005d475c          if (head != 0)
005d475f              operator delete(head);
005d475f          
005d476c          this->curNum -= 1;
005d4775          return 1;
005d4739      }
005d4739      
005d477d      while (head->next != 0)
005d477d      {
005d4780          int32_t* next_1 = head->next;
005d4780          
005d4785          if (*(uint32_t*)next_1 == edx)
005d4785          {
005d479c              *(uint32_t*)arg2 = *(uint32_t*)head->next;
005d479e              void* next_2 = head->next;
005d47a1              class PackableLLNode<unsigned long>* ecx_4 = *(uint32_t*)((char*)next_2 + 4);
005d47a6              head->next = ecx_4;
005d47a6              
005d47a9              if (ecx_4 == 0)
005d47b0                  this->tail = head;
005d47a9              else
005d47ab                  ecx_4->prev = head;
005d47ab              
005d47b4              operator delete(next_2);
005d47c1              this->curNum -= 1;
005d47ca              return 1;
005d4785          }
005d4785          
005d4787          head = next_1;
005d477d      }
005d477d      
005d4794      return 0;
005d4720  }

005d47cd                                         90 90 90                                                               ...

005d47d0  int32_t __fastcall PlayerModule::GetDesiredCompLevel(class PlayerModule* this, class IDClass<_tagDataID,32,0> arg2)

005d47d0  {
005d47d0      class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d47d0      
005d47d8      if (desired_comps_ != 0)
005d47d8      {
005d47e4          uint32_t* eax_2 = PackableHashTable<unsigned long,unsigned long>::lookup(desired_comps_, &arg2);
005d47e4          
005d47eb          if (eax_2 != 0)
005d47ef              return *(uint32_t*)eax_2;
005d47d8      }
005d47d8      
005d47dc      return 0;
005d47d0  }

005d47f2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005d4800  void __fastcall PlayerModule::SetTimeStampFormat(class PlayerModule* this, class AC1Legacy::PStringBase<char> arg2)

005d4800  {
005d4805      class GenericQualitiesData* m_pPlayerOptionsData = this->m_pPlayerOptionsData;
005d480b      bool cond:0 = m_pPlayerOptionsData == 0;
005d480b      
005d480d      if (m_pPlayerOptionsData == 0)
005d480d      {
005d4811          void* eax = operator new(0x14);
005d481b          class GenericQualitiesData* eax_1;
005d481b          
005d481b          if (eax == 0)
005d4826              eax_1 = nullptr;
005d481b          else
005d481f              eax_1 = GenericQualitiesData::GenericQualitiesData(eax);
005d481f          
005d4828          this->m_pPlayerOptionsData = eax_1;
005d482e          cond:0 = eax_1 == 0;
005d480d      }
005d480d      
005d4836      if (!(cond:0))
005d4836      {
005d4838          class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_TimeStampFormat.m_buffer;
005d4838          
005d4842          if (m_buffer != arg2)
005d4842          {
005d4850              if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005d4852                  m_buffer->vtable->__vecDelDtor(1);
005d4852              
005d485a              class AC1Legacy::PStringBase<char> eax_4 = arg2;
005d485e              this->m_TimeStampFormat.m_buffer = eax_4;
005d4868              InterlockedIncrement((eax_4 + 4));
005d4842          }
005d4842          
005d487b          GenericQualitiesData::SetString(this->m_pPlayerOptionsData, 1, &arg2);
005d4836      }
005d4836      
005d4880      class AC1Legacy::PStringBase<char> esi_1 = arg2;
005d4880      
005d4890      if ((InterlockedDecrement((esi_1 + 4)) == 0 && esi_1 != 0))
005d4898          **(uint32_t**)esi_1(1);
005d4800  }


005d48a0  void __thiscall PlayerModule::Clear(class PlayerModule* this)

005d48a0  {
005d48ae      AC1Legacy::PStringBase<char>::set(&this->m_TimeStampFormat, "%#H:%M:%S ");
005d48b3      class ShortCutManager* shortcuts_ = this->shortcuts_;
005d48b3      
005d48b8      if (shortcuts_ != 0)
005d48b8      {
005d48ba          shortcuts_->vtable->__vecDelDtor(1);
005d48c0          this->shortcuts_ = nullptr;
005d48b8      }
005d48b8      
005d48c7      class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d48c7      
005d48cf      if (desired_comps_ != 0)
005d48cf      {
005d48d1          desired_comps_->vtable->__vecDelDtor(1);
005d48d7          this->desired_comps_ = nullptr;
005d48cf      }
005d48cf      
005d48e1      class GenericQualitiesData* m_pPlayerOptionsData = this->m_pPlayerOptionsData;
005d48e1      
005d48e9      if (m_pPlayerOptionsData != 0)
005d48e9      {
005d48eb          m_pPlayerOptionsData->vtable->__vecDelDtor(1);
005d48f1          this->m_pPlayerOptionsData = nullptr;
005d48e9      }
005d48e9      
005d4908      /* jump -> this->m_colGameplayOptions.vtable->Destroy */
005d48a0  }

005d490b                                   90 90 90 90 90                                                             .....

005d4910  void __thiscall PlayerModule::RemoveSpellFavorite(class PlayerModule* this, uint32_t const arg2, int32_t const arg3)

005d4910  {
005d4910      int32_t const eax_1 = arg3;
005d4910      
005d491b      if ((eax_1 >= 0 && eax_1 < 8))
005d491b      {
005d4921          arg3 = arg2;
005d4931          PackableList<unsigned long>::Remove(&this->favorite_spells_[eax_1], &arg3);
005d491b      }
005d4910  }

005d4939                                                                             90 90 90 90 90 90 90                           .......

005d4940  uint8_t __thiscall PlayerModule::SetDesiredCompLevel(class PlayerModule* this, class IDClass<_tagDataID,32,0> arg2, int32_t const arg3)

005d4940  {
005d4942      int32_t const edi = arg3;
005d4952      class PackableHashTable<IDClass<_tagDataID,32,0>,long>* eax;
005d4952      
005d4952      if ((edi >= 0 && edi <= 0x1388))
005d4952      {
005d495c          if (this->desired_comps_ == 0)
005d495c          {
005d4960              void* eax_2 = operator new(0x14);
005d4960              
005d496a              if (eax_2 == 0)
005d497a                  eax = nullptr;
005d496a              else
005d4973                  eax = PackableHashTable<IDClass<_tagDataID,32,0>,long>::PackableHashTable<IDClass<_tagDataID,32,0>,long>(eax_2, 0x100);
005d4973              
005d497e              this->desired_comps_ = eax;
005d495c          }
005d495c          
005d4984          if ((this->desired_comps_ != 0 || eax != 0))
005d4984          {
005d4986              class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d4993              int32_t* eax_3 = PackableHashTable<unsigned long,unsigned long>::lookup(desired_comps_, &arg2);
005d4993              
005d499a              if (eax_3 == 0)
005d499a              {
005d49b0                  int32_t eax_4;
005d49b0                  eax_4 = PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(desired_comps_, &arg2, &arg3) != 0;
005d49b4                  return eax_4;
005d499a              }
005d499a              
005d49b7              *(uint32_t*)eax_3 = edi;
005d49ba              eax_3 = 1;
005d49bd              return 1;
005d4984          }
005d4952      }
005d4952      
005d49c1      eax = 0;
005d49c4      return 0;
005d4940  }

005d49c7                       90 90 90 90 90 90 90 90 90                                                         .........

005d49d0  int32_t __thiscall PlayerModule::UnPack(class PlayerModule* this, void** arg2, uint32_t arg3)

005d49d0  {
005d49d4      uint32_t ebx = arg3;
005d49d4      
005d49e0      if (ebx >= 8)
005d49e0      {
005d49ea          void* eax_1 = *(uint32_t*)arg2;
005d49ec          void** ecx = *(uint32_t*)eax_1;
005d49f5          *(uint32_t*)arg2 = ((char*)eax_1 + 4);
005d49f9          this->options_ = *(uint32_t*)((char*)eax_1 + 4);
005d4a0b          *(uint32_t*)arg2 += 4;
005d4a0b          
005d4a0d          if ((ecx & 1) == 0)
005d4a0d          {
005d4a4a              class ShortCutManager* shortcuts_ = this->shortcuts_;
005d4a4a              
005d4a4f              if (shortcuts_ != 0)
005d4a4f              {
005d4a51                  shortcuts_->vtable->__vecDelDtor(1);
005d4a57                  this->shortcuts_ = nullptr;
005d4a4f              }
005d4a0d          }
005d4a0d          else if (this->shortcuts_ != 0)
005d4a3e              this->shortcuts_->vtable->UnPack(arg2, ebx);
005d4a14          else
005d4a14          {
005d4a18              void* eax_5 = operator new(0x4c);
005d4a18              
005d4a22              if (eax_5 == 0)
005d4a22              {
005d4a3b                  this->shortcuts_ = nullptr;
005d4a3e                  this->shortcuts_->vtable->UnPack(arg2, ebx);
005d4a22              }
005d4a22              else
005d4a22              {
005d4a26                  class ShortCutManager* eax_6 = ShortCutManager::ShortCutManager(eax_5);
005d4a2e                  this->shortcuts_ = eax_6;
005d4a34                  *(uint32_t*)(*(uint32_t*)eax_6 + 0x10)(arg2, ebx);
005d4a22              }
005d4a14          }
005d4a14          
005d4a5e          this->favorite_spells_[0].vtable->UnPack(arg2, ebx);
005d4a69          int16_t eax_8 = ecx;
005d4a69          
005d4a6f          if ((eax_8 & 4) != 0)
005d4a6f          {
005d4a71              class PackableList<unsigned long>* ebp_1 = &this->favorite_spells_[1];
005d4a74              int32_t i_5 = 4;
005d4a92              int32_t i;
005d4a92              
005d4a92              do
005d4a92              {
005d4a84                  ebp_1->vtable->UnPack(arg2, arg3);
005d4a8e                  ebp_1 = &ebp_1[1];
005d4a91                  i = i_5;
005d4a91                  i_5 -= 1;
005d4a92              } while (i != 1);
005d4ad9              ebx = arg3;
005d4a6f          }
005d4a6f          else if ((eax_8 & 0x10) != 0)
005d4a98          {
005d4a9a              class PackableList<unsigned long>* ebp_2 = &this->favorite_spells_[1];
005d4a9d              int32_t i_6 = 6;
005d4ab4              int32_t i_1;
005d4ab4              
005d4ab4              do
005d4ab4              {
005d4aa6                  ebp_2->vtable->UnPack(arg2, arg3);
005d4ab0                  ebp_2 = &ebp_2[1];
005d4ab3                  i_1 = i_6;
005d4ab3                  i_6 -= 1;
005d4ab4              } while (i_1 != 1);
005d4ad9              ebx = arg3;
005d4a98          }
005d4a98          else if ((*(uint8_t*)((char*)eax_8)[1] & 4) != 0)
005d4abb          {
005d4abd              class PackableList<unsigned long>* ebp_3 = &this->favorite_spells_[1];
005d4ac0              int32_t i_7 = 7;
005d4ad7              int32_t i_2;
005d4ad7              
005d4ad7              do
005d4ad7              {
005d4ac9                  ebp_3->vtable->UnPack(arg2, arg3);
005d4ad3                  ebp_3 = &ebp_3[1];
005d4ad6                  i_2 = i_7;
005d4ad6                  i_7 -= 1;
005d4ad7              } while (i_2 != 1);
005d4ad9              ebx = arg3;
005d4abb          }
005d4abb          
005d4ae2          if ((ecx & 8) == 0)
005d4ae2          {
005d4b33              class PackableHashTable<IDClass<_tagDataID,32,0>,long>* desired_comps_ = this->desired_comps_;
005d4b33              
005d4b3b              if (desired_comps_ != 0)
005d4b3b              {
005d4b3d                  desired_comps_->vtable->__vecDelDtor(1);
005d4b43                  this->desired_comps_ = nullptr;
005d4b3b              }
005d4ae2          }
005d4ae2          else
005d4ae2          {
005d4aec              if (this->desired_comps_ == 0)
005d4aec              {
005d4af5                  void* ebp_4 = operator new(0x14);
005d4af5                  
005d4afe                  if (ebp_4 == 0)
005d4b1c                      ebp_4 = nullptr;
005d4afe                  else
005d4afe                  {
005d4b02                      *(uint32_t*)ebp_4 = &PackableHashTable<class IDClass<struct _tagDataID,32,0>,long>::`vftable';
005d4b09                      *(uint32_t*)((char*)ebp_4 + 4) = 0;
005d4b0c                      *(uint32_t*)((char*)ebp_4 + 8) = 0;
005d4b0f                      *(uint32_t*)((char*)ebp_4 + 0xc) = 0;
005d4b12                      *(uint32_t*)((char*)ebp_4 + 0x10) = 0;
005d4b15                      PackableHashTable<unsigned long,CContractTracker>::Init(ebp_4);
005d4afe                  }
005d4afe                  
005d4b1e                  this->desired_comps_ = ebp_4;
005d4aec              }
005d4aec              
005d4b24              this->desired_comps_->vtable->UnPack(arg2, ebx);
005d4ae2          }
005d4ae2          
005d4b4d          eax_8 = ecx;
005d4b4d          
005d4b53          if ((eax_8 & 0x20) == 0)
005d4b64              this->spell_filters_ = 0x3fff;
005d4b53          else
005d4b53          {
005d4b59              this->spell_filters_ = **(uint32_t**)arg2;
005d4b5f              *(uint32_t*)arg2 += 4;
005d4b53          }
005d4b53          
005d4b70          if ((eax_8 & 0x40) == 0)
005d4b81              this->options2_ = 0x948700;
005d4b70          else
005d4b70          {
005d4b76              this->options2_ = **(uint32_t**)arg2;
005d4b7c              *(uint32_t*)arg2 += 4;
005d4b70          }
005d4b70          
005d4b8d          if (eax_8 < 0)
005d4b8d          {
005d4b8f              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
005d4b94              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
005d4b9c              InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
005d4ba8              AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, arg2, ebx);
005d4bad              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005d4bb1              class AC1Legacy::PSRefBuffer<char>** var_1c_10 = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
005d4bb8              class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
005d4bc2              PlayerModule::SetTimeStampFormat(this, InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef));
005d4bc2              
005d4bd4              if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
005d4bd6                  AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
005d4bd6              
005d4bde              ebx = arg3;
005d4b8d          }
005d4b8d          
005d4be9          if ((*(uint8_t*)((char*)ecx)[1] & 1) == 0)
005d4be9          {
005d4c3b              class GenericQualitiesData* m_pPlayerOptionsData_1 = this->m_pPlayerOptionsData;
005d4c3b              
005d4c43              if (m_pPlayerOptionsData_1 != 0)
005d4c43              {
005d4c45                  m_pPlayerOptionsData_1->vtable->__vecDelDtor(1);
005d4c4b                  this->m_pPlayerOptionsData = nullptr;
005d4c43              }
005d4be9          }
005d4be9          else
005d4be9          {
005d4bf3              if (this->m_pPlayerOptionsData == 0)
005d4bf3              {
005d4bf7                  void* eax_20 = operator new(0x14);
005d4c01                  class GenericQualitiesData* eax_21;
005d4c01                  
005d4c01                  if (eax_20 == 0)
005d4c0c                      eax_21 = nullptr;
005d4c01                  else
005d4c05                      eax_21 = GenericQualitiesData::GenericQualitiesData(eax_20);
005d4c05                  
005d4c0e                  this->m_pPlayerOptionsData = eax_21;
005d4bf3              }
005d4bf3              
005d4c14              class GenericQualitiesData* m_pPlayerOptionsData = this->m_pPlayerOptionsData;
005d4c14              
005d4c1c              if (m_pPlayerOptionsData != 0)
005d4c1e                  m_pPlayerOptionsData->vtable->UnPack(arg2, ebx);
005d4c1e              
005d4c34              GenericQualitiesData::InqString(this->m_pPlayerOptionsData, 1, &this->m_TimeStampFormat);
005d4be9          }
005d4be9          
005d4c5c          if ((*(uint8_t*)((char*)ecx)[1] & 2) != 0)
005d4c5c          {
005d4c64              &this->m_colGameplayOptions;
005d4c5e              this->m_colGameplayOptions.vtable->UnPack(arg2, ebx);
005d4c5c          }
005d4c5c          
005d4c73          void* ecx_20 = (*(uint32_t*)arg2 & 0x80000003);
005d4c73          bool cond:2_1 = ecx_20 == 0;
005d4c73          
005d4c79          if (ecx_20 < 0)
005d4c79          {
005d4c7c              void* ecx_22 = (((char*)ecx_20 - 1) | 0xfffffffc);
005d4c7f              ecx_20 = ((char*)ecx_22 + 1);
005d4c7f              cond:2_1 = ecx_22 == 0xffffffff;
005d4c79          }
005d4c79          
005d4c80          if (!(cond:2_1))
005d4c80          {
005d4c87              void* i_4 = (4 - ecx_20);
005d4c87              
005d4c89              if (4 != ecx_20)
005d4c89              {
005d4c9b                  void* i_3;
005d4c9b                  
005d4c9b                  do
005d4c9b                  {
005d4c92                      **(uint8_t**)arg2 = 0;
005d4c98                      i_3 = i_4;
005d4c98                      i_4 -= 1;
005d4c99                      *(uint32_t*)arg2 += 1;
005d4c9b                  } while (i_3 != 1);
005d4c89              }
005d4c80          }
005d4c80          
005d4ca7          if (ebx >= (*(uint32_t*)arg2 - eax_1))
005d4cc3              return 1;
005d4cc3          
005d4ca9          *(uint32_t*)arg2 = eax_1;
005d49e0      }
005d49e0      
005d4cb4      return 0;
005d49d0  }

005d4c8d                                         8d 49 00                                                               .I.
005d4cc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005d4cd0  uint8_t __thiscall PlayerModule::InqOption(class PlayerModule const* this, uint32_t arg2, class BaseProperty* arg3)

005d4cd0  {
005d4cd8      arg2 = arg2;
005d4ced      return HashTable<unsigned long,BaseProperty,1>::find(&this->m_colGameplayOptions.m_hashProperties.vtable, &arg2, arg3);
005d4cd0  }


005d4cf0  int32_t __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,long>::UnPack(class PackableHashTable<IDClass<_tagDataID,32,0>,long>* this, void** arg2, uint32_t arg3)

005d4cf0  {
005d4cfe      if (arg3 < 4)
005d4d07          return 0;
005d4d07      
005d4d0c      void** edi = arg2;
005d4d10      void* eax_1 = *(uint32_t*)edi;
005d4d18      uint32_t var_4 = arg3;
005d4d1c      PackableHashTable<IDClass<_tagDataID,32,0>,int>::EmptyContents(this);
005d4d21      class PackableHashData<IDClass<_tagDataID,32,0>,long>** _buckets = this->_buckets;
005d4d21      
005d4d28      if (_buckets != 0)
005d4d28      {
005d4d2b          operator delete[](_buckets);
005d4d33          this->_buckets = nullptr;
005d4d28      }
005d4d28      
005d4d36      this->_table_size = 0;
005d4d39      void* ecx_1 = *(uint32_t*)edi;
005d4d3b      int32_t eax_2 = *(uint32_t*)ecx_1;
005d4d40      *(uint32_t*)edi = ((char*)ecx_1 + 4);
005d4d44      uint32_t ecx_4 = (eax_2 >> 0x10);
005d4d47      int32_t eax_3 = (eax_2 & 0xffff);
005d4d4c      void** ebx_1 = (arg3 - 4);
005d4d51      this->_table_size = ecx_4;
005d4d51      
005d4d56      if (ecx_4 == 0)
005d4d56      {
005d4d5f          int32_t result;
005d4d5f          result = eax_3 == 0;
005d4d66          return result;
005d4d56      }
005d4d56      
005d4d83      if ((ecx_4 <= 0x10000 && eax_3 <= 0x10000))
005d4d83      {
005d4d87          int32_t eax_5 = PackableHashTable<unsigned long,CContractTracker>::Init(this);
005d4d87          
005d4d8e          if (eax_5 != 0)
005d4d8e          {
005d4d92              arg3 = 0;
005d4d92              
005d4d9a              if (eax_3 <= 0)
005d4e16                  return ((eax_5 - eax_5) + 1);
005d4e16              
005d4dab              while (true)
005d4dab              {
005d4dab                  arg2 = ebx_1;
005d4db9                  uint32_t var_10;
005d4db9                  
005d4db9                  if (PackObj::UNPACK_TYPE(&var_10, edi, &arg2) == 0)
005d4d7a                      return 0;
005d4d7a                  
005d4dc2                  uint32_t var_c = var_10;
005d4dc2                  
005d4dc6                  if (ebx_1 < 4)
005d4d7a                      return 0;
005d4d7a                  
005d4dc8                  int32_t* eax_8 = *(uint32_t*)edi;
005d4dca                  void** ecx_6 = *(uint32_t*)eax_8;
005d4dd3                  *(uint32_t*)edi = &eax_8[1];
005d4dda                  arg2 = ecx_6;
005d4dda                  
005d4def                  if ((PackableHashTable<IDClass<_tagDataID,32,0>,int>::add(this, &var_c, &arg2) == 0 && this->m_fThrowawayDuplicateKeysOnUnPack == 0))
005d4d7a                      return 0;
005d4d7a                  
005d4df5                  eax_5 = (arg3 + 1);
005d4df8                  arg3 = eax_5;
005d4df8                  
005d4dfc                  if (eax_5 >= eax_3)
005d4e16                      return ((eax_5 - eax_5) + 1);
005d4dab              }
005d4d8e          }
005d4d83      }
005d4d83      
005d4d7a      return 0;
005d4cf0  }

005d4e19                                                                             90 90 90 90 90 90 90                           .......

005d4e20  void* __thiscall PackableHashTable<IDClass<_tagDataID,32,0>,long>::`scalar deleting destructor'(class PackableHashTable<IDClass<_tagDataID,32,0>,long>* this, uint32_t arg2)

005d4e20  {
005d4e23      this->vtable = &PackableHashTable<class IDClass<struct _tagDataID,32,0>,long>::`vftable';
005d4e29      PackableHashTable<unsigned long,unsigned long>::Destroy(this);
005d4e33      this->vtable = 0x79285c;
005d4e33      
005d4e39      if ((arg2 & 1) != 0)
005d4e3c          operator delete(this);
005d4e3c      
005d4e47      return this;
005d4e20  }

005d4e4a                                90 90 90 90 90 90                                                            ......

005d4e50  uint32_t __thiscall PackUsingSerialize<PackObj>::Pack(class PackUsingSerialize<PackObj>* this, void** arg2, uint32_t arg3)

005d4e50  {
005d4e5a      int32_t result = this->vtable->GetPackSize();
005d4e5a      
005d4e66      if (*(uint32_t*)arg2 != 0)
005d4e66      {
005d4e6d          void __return;
005d4e6d          
005d4e6d          if (result <= arg3)
005d4e6d          {
005d4e77              Archive::GetSerializedBuffer(&this->m_ar, &__return);
005d4e80              uint8_t* eax_1 = SmartBuffer::GetBuffer(&__return);
005d4e94              int32_t esi_2;
005d4e94              int32_t edi_2;
005d4e94              edi_2 = __builtin_memcpy(*(uint32_t*)arg2, eax_1, ((result >> 2) << 2));
005d4e9b              __builtin_memcpy(edi_2, esi_2, (result & 3));
005d4e9d              *(uint32_t*)arg2 += result;
005d4ea3              SmartBuffer::~SmartBuffer(&__return);
005d4e6d          }
005d4e6d          
005d4eab          &this->m_ar;
005d4ea8          this->m_ar.vtable->InitForPacking(SmartBuffer::SmartBuffer(&__return));
005d4ec1          SmartBuffer::~SmartBuffer(&__return);
005d4ec6          this->m_fArchiveValid = 0;
005d4e66      }
005d4e66      
005d4ed3      return result;
005d4e50  }

005d4ed6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005d4ee0  uint32_t __fastcall PackUsingSerialize<PackObj>::GetPackSize(class PackUsingSerialize<PackObj>* this)

005d4ee0  {
005d4eeb      if (this->m_fArchiveValid == 0)
005d4eeb      {
005d4f01          void var_c;
005d4eee          this->m_ar.vtable->InitForPacking(SmartBuffer::SmartBuffer(&var_c));
005d4f08          SmartBuffer::~SmartBuffer(&var_c);
005d4f0d          this->vtable->Serialize(&this->m_ar);
005d4f17          AutoStoreVersionArchive::OnSerializingDone(&this->m_ar);
005d4f1d          this->m_fArchiveValid = 1;
005d4eeb      }
005d4eeb      
005d4f2e      return Archive::GetCurrentPosition(&this->m_ar);
005d4ee0  }

005d4f2f                                               90                                                                 .

005d4f30  void* __thiscall PackUsingSerialize<PackObj>::`scalar deleting destructor'(class PackUsingSerialize<PackObj>* this, uint32_t arg2)

005d4f30  {
005d4f34      this->m_ar.vtable = &AutoStoreVersionArchive::`vftable';
005d4f34      
005d4f4a      if ((this->m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005d4f50          operator delete[](this->m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_data);
005d4f50      
005d4f5a      Archive::~Archive(&this->m_ar);
005d4f64      this->vtable = 0x79285c;
005d4f64      
005d4f6a      if ((arg2 & 1) != 0)
005d4f6d          operator delete(this);
005d4f6d      
005d4f79      return this;
005d4f30  }

005d4f7c                                                                                      90 90 90 90                              ....

005d4f80  void __thiscall PackObjPropertyCollection::Serialize(class PackObjPropertyCollection* this, class Archive* arg2)

005d4f80  {
005d4f86      /* tailcall */
005d4f86      return PropertyCollection::Serialize(&this->vtable, arg2);
005d4f80  }

005d4f8b                                   90 90 90 90 90                                                             .....

005d4f90  void* __thiscall PackObjPropertyCollection::`vector deleting destructor'(class PackObjPropertyCollection* this, uint32_t arg2)

005d4f90  {
005d4f96      /* tailcall */
005d4f96      return PackObjPropertyCollection::`scalar deleting destructor'(((char*)this - 0x8c), arg2);
005d4f90  }

005d4f9b                                                                                   cc cc cc cc cc                             .....

005d4fa0  void* __thiscall PackObjPropertyCollection::`scalar deleting destructor'(class PackObjPropertyCollection* this, uint32_t arg2)

005d4fa0  {
005d4fa5      struct PropertyCollection::VTable** ecx;
005d4fa5      
005d4fa5      if (this == 0)
005d4faf          ecx = nullptr;
005d4fa5      else
005d4fa7          ecx = &this->vtable;
005d4fa7      
005d4fb2      PropertyCollection::~PropertyCollection(ecx);
005d4fb7      this->m_ar.vtable = &AutoStoreVersionArchive::`vftable';
005d4fb7      
005d4fd3      if (BitUtils::AllAreOn(this->m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_sizeAndDeallocate, 0x80000000) != 0)
005d4fd9          operator delete[](this->m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_data);
005d4fd9      
005d4fe3      Archive::~Archive(&this->m_ar);
005d4fed      this->vtable = 0x79285c;
005d4fed      
005d4ff4      if ((arg2 & 1) != 0)
005d4ff7          operator delete(this);
005d4ff7      
005d5002      return this;
005d4fa0  }

005d5005                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005d5010  void __fastcall PlayerModule::~PlayerModule(class PlayerModule* this)

005d5010  {
005d5015      this->vtable = 0x7e8a60;
005d501b      PlayerModule::Clear(this);
005d5020      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->m_TimeStampFormat.m_buffer;
005d5020      
005d5036      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
005d5038          m_buffer->vtable->__vecDelDtor(1);
005d5038      
005d5048      struct PropertyCollection::VTable** ecx_1;
005d5048      
005d5048      if (this == 0xffffff64)
005d5052          ecx_1 = nullptr;
005d5048      else
005d504a          ecx_1 = &this->m_colGameplayOptions.vtable;
005d504a      
005d5054      PropertyCollection::~PropertyCollection(ecx_1);
005d5040      this->m_colGameplayOptions.m_ar.vtable = &AutoStoreVersionArchive::`vftable';
005d5040      
005d5075      if (BitUtils::AllAreOn(this->m_colGameplayOptions.m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_sizeAndDeallocate, 0x80000000) != 0)
005d507b          operator delete[](this->m_colGameplayOptions.m_ar.m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_data);
005d507b      
005d5085      Archive::~Archive(&this->m_colGameplayOptions.m_ar);
005d5040      this->m_colGameplayOptions.vtable = 0x79285c;
005d5090      class PackableHashTable<IDClass<_tagDataID,32,0>,long>** esi_1 = &this->desired_comps_;
005d5096      int32_t i_1 = 8;
005d50b7      int32_t i;
005d50b7      
005d50b7      do
005d50b7      {
005d50a0          esi_1 -= 0x10;
005d50bb          ADJ(esi_1)->desired_comps_ = &PackableList<unsigned long>::`vftable';
005d50ab          PackableList<unsigned long>::Flush(esi_1);
005d50b0          i = i_1;
005d50b0          i_1 -= 1;
005d50bb          ADJ(esi_1)->desired_comps_ = &PackObj::`vftable';
005d50b7      } while (i != 1);
005d50bb      this->vtable = 0x79285c;
005d5010  }

005d509d                                                                                         8d 49 00                               .I.
005d50c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005d50d0  int32_t __thiscall PackUsingSerialize<PackObj>::UnPack(class PackUsingSerialize<PackObj>* this, void** arg2, uint32_t arg3)

005d50d0  {
005d50f2      struct AutoStoreVersionArchive::VTable* const var_84;
005d50f2      AutoStoreVersionArchive::AutoStoreVersionArchive(&var_84, Unpacking, *(uint32_t*)arg2, arg3);
005d50f7      this->vtable->Serialize(&var_84);
005d5107      AutoStoreVersionArchive::OnSerializingDone(&var_84);
005d5110      uint32_t eax_1 = Archive::GetCurrentPosition(&var_84);
005d511d      *(uint32_t*)arg2 += eax_1;
005d5126      int32_t var_80;
005d5126      uint32_t ecx_8;
005d5126      ecx_8 = !((var_80 >> 2));
005d512e      var_84 = &AutoStoreVersionArchive::`vftable';
005d5141      int32_t var_4c;
005d5141      void* var_50;
005d5141      
005d5141      if ((var_4c & 0x80000000) == 0x80000000)
005d5148          operator delete[](var_50);
005d5154      Archive::~Archive(&var_84);
005d5163      return (ecx_8 & 1);
005d50d0  }

005d5166                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005d5170  void __thiscall AutoStoreVersionArchive::AutoStoreVersionArchive(class AutoStoreVersionArchive* this, enum Archive::tagUnpacking arg2, void* arg3, uint32_t arg4)

005d5170  {
005d5179      this->vtable = 0x792b3c;
005d517f      this->m_flags = 0;
005d5185      this->m_hrError.m_val = 0;
005d5188      SmartBuffer::SmartBuffer(&this->m_buffer);
005d5195      this->m_currOffset = 0;
005d5198      this->m_pcUserDataHash = nullptr;
005d519b      this->m_pVersionStack = nullptr;
005d519e      this->vtable = &AutoStoreVersionArchive::`vftable';
005d51a4      this->m_SerializeVersionRow.vtable = 0x799a90;
005d51ab      this->m_SerializeVersionRow.m_rowInitialData.vtable = 0x794430;
005d51b6      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_data = &this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_aPrimitiveInplaceMemory;
005d51b9      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_sizeAndDeallocate = 8;
005d51c0      this->m_SerializeVersionRow.m_rowInitialData.m_aVersions.m_num = 0;
005d51c8      this->m_bOnSerializingDoneCalled = 1;
005d51d7      void var_c;
005d51d7      AutoStoreVersionArchive::InitForUnpacking(this, SmartBuffer::SmartBuffer(&var_c, arg3, arg4));
005d51e0      SmartBuffer::~SmartBuffer(&var_c);
005d5170  }

005d51ef                                               90                                                                 .

005d51f0  void __fastcall PlayerModule::PlayerModule(class PlayerModule* this)

005d51f0  {
005d51f6      this->vtable = 0x7e8a60;
005d51fc      this->shortcuts_ = nullptr;
005d51ff      class PackableList<unsigned long> (* eax)[0x8] = &this->favorite_spells_;
005d5202      int32_t i_1 = 8;
005d5223      int32_t i;
005d5223      
005d5223      do
005d5223      {
005d5225          ADJ(eax)->favorite_spells_[0].vtable = 0x7a3e80;
005d5225          ADJ(eax)->favorite_spells_[0].head = nullptr;
005d5225          ADJ(eax)->favorite_spells_[0].tail = nullptr;
005d5225          ADJ(eax)->favorite_spells_[0].curNum = 0;
005d521f          eax = &*(uint128_t*)eax[1];
005d5222          i = i_1;
005d5222          i_1 -= 1;
005d5223      } while (i != 1);
005d5225      this->desired_comps_ = nullptr;
005d522b      this->m_pPlayerOptionsData = nullptr;
005d5231      this->options_ = 0x50c4a54a;
005d523b      this->options2_ = 0x948700;
005d5245      this->spell_filters_ = 0x3fff;
005d524f      this->m_colGameplayOptions.m_fArchiveValid = 0;
005d525b      this->m_colGameplayOptions.vtable = &PackUsingSerialize<class PackObj>::`vftable';
005d5265      AutoStoreVersionArchive::AutoStoreVersionArchive(&this->m_colGameplayOptions.m_ar);
005d5272      PropertyCollection::PropertyCollection(&this->m_colGameplayOptions.vtable);
005d5282      this->m_colGameplayOptions.vtable = 0x7e8a40;
005d526a      this->m_colGameplayOptions.vtable = &PackObjPropertyCollection::`vftable';
005d5292      AC1Legacy::PStringBase<char>::PStringBase<char>(&this->m_TimeStampFormat, "%#H:%M:%S ");
005d51f0  }

005d5209                             8d a4 24 00 00 00 00                                                           ..$....
005d529c                                                                                      90 90 90 90                              ....

005d52a0  void* __thiscall PlayerModule::`scalar deleting destructor'(class PlayerModule* this, uint32_t arg2)

005d52a0  {
005d52a3      PlayerModule::~PlayerModule(this);
005d52a3      
005d52ad      if ((arg2 & 1) != 0)
005d52b0          operator delete(this);
005d52b0      
005d52bb      return this;
005d52a0  }

005d52be                                                                                            90 90                                ..

005d52c0  void __thiscall PlayerModule::SetOption(class PlayerModule* this, class BaseProperty const* arg2)

005d52c0  {
005d52c2      class BaseProperty* edi = arg2;
005d52cf      arg2 = BaseProperty::GetPropertyName(edi);
005d52df      HashTable<unsigned long,BaseProperty,1>::set(&this->m_colGameplayOptions.m_hashProperties.vtable, &arg2, edi);
005d52e4      this->vtable->OnChanged(edi, 0);
005d52c0  }

005d52f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005d5300  class BaseProperty* __thiscall PlayerModule::GetChatOptionStructure(class PlayerModule* this, uint32_t arg2)

005d5300  {
005d5321      int32_t ebp_1 = (arg2 - 1);
005d5326      int32_t* eax_3 = this->m_colGameplayOptions.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0x1000008c) % this->m_colGameplayOptions.m_hashProperties.m_intrusiveTable.m_numBuckets)];
005d532a      void* eax_4;
005d532a      
005d532a      if (eax_3 == 0)
005d532a      {
005d5343      label_5d5343_1:
005d5343          eax_4 = nullptr;
005d532a      }
005d532a      else
005d532a      {
005d5336          while (*(uint32_t*)eax_3 != 0x1000008c)
005d5336          {
005d533c              eax_3 = eax_3[1];
005d533c              
005d5341              if (eax_3 == 0)
005d5341                  goto label_5d5343;
005d5336          }
005d5336          
005d5408          if (eax_3 == 0)
005d5408          {
005d5343          label_5d5343:
005d5343              eax_4 = nullptr;
005d5408          }
005d5408          else
005d540e              eax_4 = &eax_3[2];
005d532a      }
005d532a      
005d5347      void* edi = eax_4;
005d5349      uint32_t var_10;
005d5349      
005d5349      if (eax_4 != 0)
005d5349      {
005d5461      label_5d5461:
005d5461          void* eax_20 = *(uint32_t*)edi;
005d5461          
005d5473          if ((eax_20 != 0 && (*(uint32_t*)((char*)eax_20 + 0xc) == 0x11 && ebp_1 < *(uint32_t*)((char*)eax_20 + 0xc0))))
005d5473          {
005d5475              arg2 = 0;
005d5479              int32_t* ecx_7 = *(uint32_t*)((char*)edi + 4);
005d5479              
005d547e              if (ecx_7 != 0)
005d5487                  *(uint32_t*)(*(uint32_t*)ecx_7 + 0xf0)(&arg2);
005d5487              
005d5491              if ((ecx_7 == 0 || arg2 <= ebp_1))
005d5491              {
005d54a0                  var_10 = 0;
005d54a4                  int32_t* var_c_1 = nullptr;
005d54a8                  BaseProperty::SetPropertyName(&var_10, 0x1000008b);
005d54a8                  
005d54b3                  for (uint32_t i = arg2; i <= ebp_1; i += 1)
005d54b3                  {
005d54b8                      if (*(uint32_t*)((char*)edi + 4) != 0)
005d54b8                      {
005d54bc                          BaseProperty::CheckCopyOnWrite(edi);
005d54cc                          *(uint32_t*)(**(uint32_t**)((char*)edi + 4) + 0xf8)(i, &var_10);
005d54b8                      }
005d54b3                  }
005d54b3                  
005d54d7                  uint32_t eax_21 = var_10;
005d54d7                  
005d54dd                  if (eax_21 != 0)
005d54dd                  {
005d54e7                      int32_t esi_10 = (*(uint32_t*)(eax_21 + 4) - 1);
005d54ec                      *(uint32_t*)(eax_21 + 4) = esi_10;
005d54ec                      
005d54ee                      if (esi_10 == 0)
005d54f4                          **(uint32_t**)eax_21(1);
005d54f4                      
005d54f6                      var_10 = 0;
005d54dd                  }
005d54dd                  
005d5500                  if (var_c_1 != 0)
005d5500                  {
005d550a                      int32_t esi_12 = (var_c_1[1] - 1);
005d5507                      var_c_1[1] = esi_12;
005d5507                      
005d5511                      if (esi_12 == 0)
005d5517                          **(uint32_t**)var_c_1(1);
005d5500                  }
005d5491              }
005d5491              
005d551b              BaseProperty::CheckCopyOnWrite(edi);
005d5520              int32_t* ecx_14 = *(uint32_t*)((char*)edi + 4);
005d5520              
005d5525              if (ecx_14 != 0)
005d553b                  return *(uint32_t*)(*(uint32_t*)ecx_14 + 0x10c)(ebp_1);
005d5473          }
005d5349      }
005d5349      else
005d5349      {
005d5358          int32_t* var_8 = nullptr;
005d535c          int32_t* var_4_1 = nullptr;
005d5360          BaseProperty::SetPropertyName(&var_8, 0x1000008c);
005d537e          var_10 = BaseProperty::GetPropertyName(&var_8);
005d5382          HashTable<unsigned long,BaseProperty,1>::add(&this->m_colGameplayOptions.m_hashProperties, &var_10, &var_8);
005d539d          int32_t* eax_9 = this->m_colGameplayOptions.m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, 0x1000008c) % this->m_colGameplayOptions.m_hashProperties.m_intrusiveTable.m_numBuckets)];
005d539d          
005d53a1          if (eax_9 == 0)
005d53a1          {
005d53b2          label_5d53b2:
005d53b2              edi = nullptr;
005d53a1          }
005d53a1          else
005d53a1          {
005d53a9              while (*(uint32_t*)eax_9 != 0x1000008c)
005d53a9              {
005d53ab                  eax_9 = eax_9[1];
005d53ab                  
005d53b0                  if (eax_9 == 0)
005d53b0                      goto label_5d53b2_1;
005d53a9              }
005d53a9              
005d5418              if (eax_9 == 0)
005d5418              {
005d53b2              label_5d53b2_1:
005d53b2                  edi = nullptr;
005d5418              }
005d5418              else
005d541a                  edi = &eax_9[2];
005d53a1          }
005d53a1          
005d53b6          int32_t* eax_10 = var_8;
005d53b6          
005d53ba          if (edi != 0)
005d53ba          {
005d5421              if (eax_10 != 0)
005d5421              {
005d542b                  int32_t esi_6 = (eax_10[1] - 1);
005d5428                  eax_10[1] = esi_6;
005d5428                  
005d5432                  if (esi_6 == 0)
005d5438                      **(uint32_t**)eax_10(1);
005d5438                  
005d543a                  var_8 = nullptr;
005d5421              }
005d5421              
005d5444              if (var_4_1 != 0)
005d5444              {
005d544e                  int32_t esi_8 = (var_4_1[1] - 1);
005d544b                  var_4_1[1] = esi_8;
005d544b                  
005d5455                  if (esi_8 == 0)
005d545b                      **(uint32_t**)var_4_1(1);
005d545b                  
005d545d                  int32_t var_4_2 = 0;
005d5444              }
005d5444              
005d5444              goto label_5d5461;
005d53ba          }
005d53ba          
005d53be          if (eax_10 != 0)
005d53be          {
005d53c8              int32_t esi_2 = (eax_10[1] - 1);
005d53c5              eax_10[1] = esi_2;
005d53c5              
005d53cf              if (esi_2 == 0)
005d53d5                  **(uint32_t**)eax_10(1);
005d53d5              
005d53d7              var_8 = nullptr;
005d53be          }
005d53be          
005d53e1          if (var_4_1 != 0)
005d53e1          {
005d53eb              int32_t esi_4 = (var_4_1[1] - 1);
005d53e8              var_4_1[1] = esi_4;
005d53e8              
005d53f2              if (esi_4 == 0)
005d53f8                  **(uint32_t**)var_4_1(1);
005d53e1          }
005d5349      }
005d5403      return 0;
005d5300  }

005d553e                                                                                            90 90                                ..

005d5540  uint8_t __thiscall PlayerModule::InqChatWindowOption(class PlayerModule* this, uint32_t arg2, uint32_t arg3, class BaseProperty* arg4)

005d5540  {
005d5545      class BaseProperty* eax = PlayerModule::GetChatOptionStructure(this, arg2);
005d5545      
005d554c      if (eax != 0)
005d554c      {
005d554e          class BasePropertyValue* m_pcPropertyValue = eax->m_pcPropertyValue;
005d554e          
005d5553          if (m_pcPropertyValue != 0)
005d5567              return m_pcPropertyValue->vtable->InqStructElement(arg3, arg4);
005d554c      }
005d554c      
005d556a      eax = 0;
005d556c      return 0;
005d5540  }

005d556f                                               90                                                                 .

005d5570  uint8_t __thiscall PlayerModule::SetChatWindowOption(class PlayerModule* this, uint32_t arg2, class BaseProperty const* arg3)

005d5570  {
005d557b      uint32_t ebx;
005d557b      ebx = 0;
005d557d      class BaseProperty* eax = PlayerModule::GetChatOptionStructure(this, arg2);
005d557d      
005d5586      if (eax != 0)
005d5586      {
005d558e          uint32_t eax_1 = BaseProperty::GetPropertyName(arg3);
005d558e          
005d559a          if (eax->m_pcPropertyValue == 0)
005d559a          {
005d55cf              class BasePropertyValue* eax_2;
005d55cf              eax_2 = 0;
005d55d2              return 0;
005d559a          }
005d559a          
005d559e          BaseProperty::CheckCopyOnWrite(eax);
005d55b0          ebx = eax->m_pcPropertyValue->vtable->SetStructElement(eax_1, arg3);
005d55b0          
005d55b4          if (ebx != 0)
005d55ba              this->vtable->OnChanged(arg3, arg2);
005d5586      }
005d5586      
005d55c6      eax = ebx;
005d55c9      return eax;
005d5570  }

005d55d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d55e0  void __thiscall ShortCutData::ShortCutData(class ShortCutData* this, int32_t arg2, uint32_t arg3, uint32_t arg4)

005d55e0  {
005d55ea      this->index_ = arg2;
005d55f1      this->vtable = 0x7e8a7c;
005d55f7      this->objectID_ = arg3;
005d55fa      this->spellID_ = arg4;
005d55e0  }


005d5600  void __fastcall ShortCutData::ShortCutData(class ShortCutData* this)

005d5600  {
005d5604      this->vtable = 0x7e8a7c;
005d560a      this->index_ = 0;
005d560d      this->objectID_ = 0;
005d5610      this->spellID_ = 0;
005d5600  }

005d5614                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005d5620  int32_t __thiscall HookAppraisalProfile::UnPack(class HookAppraisalProfile* this, void** arg2, uint32_t arg3)

005d5620  {
005d5625      if (arg3 < 0xc)
005d5629          return 0;
005d5629      
005d5634      this->mBitfield = **(uint32_t**)arg2;
005d5639      void* edx_3 = (*(uint32_t*)arg2 + 4);
005d563c      *(uint32_t*)arg2 = edx_3;
005d5640      this->mValidLocations = *(uint32_t*)edx_3;
005d5645      void* edx_6 = (*(uint32_t*)arg2 + 4);
005d5648      *(uint32_t*)arg2 = edx_6;
005d564c      this->mAmmoType = *(uint32_t*)edx_6;
005d564f      *(uint32_t*)arg2 += 4;
005d5657      return 1;
005d5620  }

005d565a                                                                                90 90 90 90 90 90                            ......

005d5660  void __fastcall ShortCutManager::Destroy(class ShortCutManager* this)

005d5660  {
005d5662      class ShortCutData* (* esi)[0x12] = &this->shortCuts_;
005d5665      int32_t i_1 = 0x12;
005d5686      int32_t i;
005d5686      
005d5686      do
005d5686      {
005d5670          class ShortCutData* ecx = ADJ(esi)->shortCuts_[0];
005d5670          
005d5674          if (ecx != 0)
005d5674          {
005d5676              ecx->vtable->__vecDelDtor(1);
005d568a              ADJ(esi)->shortCuts_[0] = 0;
005d5674          }
005d5674          
005d5682          esi = &*(uint72_t*)esi[1];
005d5685          i = i_1;
005d5685          i_1 -= 1;
005d5686      } while (i != 1);
005d5660  }

005d568b                                   90 90 90 90 90                                                             .....

005d5690  void __thiscall ShortCutManager::RemoveShortCut(class ShortCutManager* this, int32_t const arg2)

005d5690  {
005d569f      if ((arg2 >= 0 && arg2 < 0x12))
005d569f      {
005d56a1          int32_t* ecx = this->shortCuts_[arg2];
005d56a1          
005d56a7          if (ecx != 0)
005d56a7          {
005d56ad              **(uint32_t**)ecx(1);
005d56af              this->shortCuts_[arg2] = 0;
005d56a7          }
005d569f      }
005d5690  }

005d56bc                                                                                      90 90 90 90                              ....

005d56c0  uint32_t __fastcall ShortCutManager::pack_size(class ShortCutManager* this)

005d56c0  {
005d56c0      class ShortCutManager* this_1 = this;
005d56c4      int32_t result = 4;
005d56c9      this_1 = nullptr;
005d56d1      class ShortCutData* (* esi)[0x12] = &this->shortCuts_;
005d56d4      int32_t i_1 = 0x12;
005d56f8      int32_t i;
005d56f8      
005d56f8      do
005d56f8      {
005d56e0          class ShortCutData* ecx = ADJ(esi)->shortCuts_[0];
005d56e0          
005d56e4          if (ecx != 0)
005d56f2              result += ecx->vtable->Pack(&this_1, 0);
005d56f2          
005d56f4          esi = &*(uint72_t*)esi[1];
005d56f7          i = i_1;
005d56f7          i_1 -= 1;
005d56f8      } while (i != 1);
005d5700      return result;
005d56c0  }

005d5701     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005d5710  uint32_t __thiscall ShortCutManager::Pack(class ShortCutManager* this, void** arg2, uint32_t arg3)

005d5710  {
005d5710      class ShortCutManager* this_1 = this;
005d5714      uint32_t result = ShortCutManager::pack_size(this);
005d571d      uint32_t result_1 = result;
005d571d      
005d5721      if (arg3 >= result)
005d5721      {
005d5726          void** esi_1 = arg2;
005d572a          void* ebp_1 = *(uint32_t*)esi_1;
005d572f          int32_t ebx_1 = 0;
005d5731          *(uint32_t*)esi_1 = ((char*)ebp_1 + 4);
005d5736          arg2 = 0x12;
005d573e          class ShortCutData* (* edi_2)[0x12] = &this->shortCuts_;
005d5762          bool cond:1_1;
005d5762          
005d5762          do
005d5762          {
005d5740              class ShortCutData* ecx_1 = ADJ(edi_2)->shortCuts_[0];
005d5740              
005d5744              if (ecx_1 != 0)
005d5744              {
005d574a                  ecx_1->vtable->Pack(esi_1, arg3);
005d5751                  result = result_1;
005d5755                  ebx_1 += 1;
005d5744              }
005d5744              
005d575a              edi_2 = &*(uint72_t*)edi_2[1];
005d575d              cond:1_1 = arg2 != 1;
005d575e              arg2 -= 1;
005d5762          } while (cond:1_1);
005d5765          *(uint32_t*)ebp_1 = ebx_1;
005d5721      }
005d5721      
005d576c      return result;
005d5710  }

005d576f                                               90                                                                 .

005d5770  void __fastcall ShortCutManager::ShortCutManager(class ShortCutManager* this)

005d5770  {
005d577d      this->vtable = 0x7e8a90;
005d5783      __builtin_memset(&this->shortCuts_, 0, 0x48);
005d5770  }

005d5789                             90 90 90 90 90 90 90                                                           .......

005d5790  int32_t __thiscall ShortCutManager::AddShortCut(class ShortCutManager* this, class ShortCutData const* arg2)

005d5790  {
005d5797      int32_t index_ = arg2->index_;
005d5797      
005d57a3      if ((index_ < 0 || index_ >= 0x12))
005d5812          return 0;
005d5812      
005d57a5      void* eax = this->shortCuts_[index_];
005d57a5      
005d57ab      if (eax != 0)
005d57ab      {
005d57f3          *(uint32_t*)((char*)eax + 4) = index_;
005d57f9          *(uint32_t*)((char*)eax + 8) = arg2->objectID_;
005d5801          *(uint32_t*)((char*)eax + 0xc) = arg2->spellID_;
005d580a          return 1;
005d57ab      }
005d57ab      
005d57af      void* eax_1 = operator new(0x10);
005d57af      
005d57b9      if (eax_1 == 0)
005d57b9      {
005d57e4          this->shortCuts_[index_] = 0;
005d57f0          return 1;
005d57b9      }
005d57b9      
005d57bb      *(uint32_t*)eax_1 = 0x7e8a7c;
005d57c4      *(uint32_t*)((char*)eax_1 + 4) = arg2->index_;
005d57ca      *(uint32_t*)((char*)eax_1 + 8) = arg2->objectID_;
005d57d0      *(uint32_t*)((char*)eax_1 + 0xc) = arg2->spellID_;
005d57d3      this->shortCuts_[index_] = eax_1;
005d57df      return 1;
005d5790  }

005d5815                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d5820  int32_t __thiscall ShortCutManager::UnPack(class ShortCutManager* this, void** arg2, uint32_t arg3)

005d5820  {
005d5828      ShortCutManager::Destroy(this);
005d5831      void* eax = *(uint32_t*)arg2;
005d5833      int32_t i_1 = *(uint32_t*)eax;
005d583c      *(uint32_t*)arg2 = ((char*)eax + 4);
005d583e      void var_10;
005d583e      ShortCutData::ShortCutData(&var_10);
005d583e      
005d5845      if (i_1 > 0)
005d5845      {
005d5868          int32_t i;
005d5868          
005d5868          do
005d5868          {
005d5856              HookAppraisalProfile::UnPack(&var_10, arg2, arg3);
005d5862              ShortCutManager::AddShortCut(this, &var_10);
005d5867              i = i_1;
005d5867              i_1 -= 1;
005d5868          } while (i != 1);
005d5845      }
005d5845      
005d5876      return 1;
005d5820  }

005d5879                                                                             90 90 90 90 90 90 90                           .......

005d5880  void* __thiscall ShortCutManager::`scalar deleting destructor'(class ShortCutManager* this, uint32_t arg2)

005d5880  {
005d5883      this->vtable = 0x7e8a90;
005d5889      ShortCutManager::Destroy(this);
005d5893      this->vtable = 0x79285c;
005d5893      
005d5899      if ((arg2 & 1) != 0)
005d589c          operator delete(this);
005d589c      
005d58a7      return this;
005d5880  }

005d58aa                                90 90 90 90 90 90                                                            ......

005d58b0  int32_t __stdcall DiskSpace::GetDriveFreeBytes(class DiskSpace* this @ ecx, char* arg2, uint64_t* arg3)

005d58b0  {
005d58cd      int32_t var_18;
005d58cd      int32_t var_10;
005d58cd      int32_t var_8;
005d58cd      
005d58cd      if (kernel32_GetProcAddress_Ptr(GetModuleHandleA("kernel32.dll"), "GetDiskFreeSpaceExA") != 0)
005d58cd      {
005d5953          if (GetDiskFreeSpaceExA(arg2, &var_18, &var_10, &var_8) == 0)
005d5953          {
005d5957              *(uint32_t*)arg3 = 0;
005d5959              *(uint32_t*)((char*)arg3 + 4) = 0;
005d5966              return GetLastError();
005d5953          }
005d5953          
005d5971          *(uint32_t*)arg3 = var_8;
005d5973          int32_t var_4;
005d5973          *(uint32_t*)((char*)arg3 + 4) = var_4;
005d597c          return 0;
005d58cd      }
005d58cd      
005d58ea      var_10 = 0;
005d58ee      var_18 = 0;
005d58f2      int32_t lpNumberOfFreeClusters = 0;
005d58f6      var_8 = 0;
005d5900      bool cond:1 = GetDiskFreeSpaceA(arg2, &var_10, &var_18, &lpNumberOfFreeClusters, &var_8) == 0;
005d5906      *(uint32_t*)((char*)arg3 + 4) = 0;
005d5906      
005d5909      if (!(cond:1))
005d5909      {
005d5919          *(uint32_t*)arg3 = ((lpNumberOfFreeClusters * var_18) * var_10);
005d5921          return 0;
005d5909      }
005d5909      
005d5924      *(uint32_t*)arg3 = 0;
005d5930      return GetLastError();
005d58b0  }

005d597f                                                                                               90                                 .

005d5980  uint32_t __thiscall gmMasterDBMap::DivineType_Internal(class gmMasterDBMap const* this, class IDClass<_tagDataID,32,0> arg2)

005d5980  {
005d5989      if (arg2 <= 0xe000018)
005d5989      {
005d598f          if (arg2 >= 0xe000018)
005d5996              return 0x10000009;
005d5996          
005d599e          if (arg2 <= 0xe000004)
005d599e          {
005d59a0              if (arg2 >= 0xe000004)
005d59a7                  return 0x10000004;
005d59a7              
005d59af              if (arg2 <= 0xe000002)
005d59af              {
005d59b1                  if (arg2 >= 0xe000002)
005d59b8                      return 0x10000002;
005d59b8                  
005d59c9                  if ((arg2 <= 0xffff && arg2 >= 1))
005d59d4                      return 0x10000001;
005d59af              }
005d59af              else if ((arg2 <= 0xe000003 && arg2 >= 0xe000003))
005d59ed                  return 0x10000003;
005d599e          }
005d599e          else if (arg2 <= 0xe00000f)
005d59f5          {
005d59f7              if (arg2 >= 0xe00000f)
005d59fe                  return 0x10000006;
005d59fe              
005d5a0c              if ((arg2 <= 0xe00000e && arg2 >= 0xe00000e))
005d5a17                  return 0x10000005;
005d59f5          }
005d59f5          else if ((arg2 <= 0xe000011 && arg2 >= 0xe000011))
005d5a30              return 0x10000007;
005d5989      }
005d5989      else if (arg2 <= 0xe00001d)
005d5a38      {
005d5a3a          if (arg2 >= 0xe00001d)
005d5a41              return 0x10000010;
005d5a41          
005d5a49          if (arg2 <= 0xe00001b)
005d5a49          {
005d5a4b              if (arg2 >= 0xe00001b)
005d5a52                  return 0x1000000a;
005d5a52              
005d5a5c              if ((arg2 <= 0xe000019 && arg2 >= 0xe000019))
005d5a63                  return 0x10000008;
005d5a49          }
005d5a49          else if ((arg2 <= 0xe00001c && arg2 >= 0xe00001c))
005d5a74              return 0x1000000b;
005d5a38      }
005d5a38      else if (arg2 <= 0x3000ffff)
005d5a7c      {
005d5a83          if (arg2 >= 0x30000000)
005d5a8a              return 0x1000000d;
005d5a8a          
005d5a99          if ((arg2 <= 0xe01ffff && arg2 >= 0xe010000))
005d5aa0              return 0x1000000c;
005d5a7c      }
005d5a7c      else if ((arg2 <= 0x3800ffff && arg2 >= 0x38000000))
005d5ab6          return 0x1000000e;
005d5ab6      
005d5abd      /* tailcall */
005d5abd      return MasterDBMap::DivineType_Internal(this, arg2);
005d5980  }

005d5ac2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005d5ad0  uint32_t __thiscall gmMasterDBMap::DivineType_Internal(class gmMasterDBMap const* this, class PStringBase<char> const* arg2)

005d5ad0  {
005d5ae5      class PStringBase<char> __return;
005d5ae5      PSUtils::get_extension(&__return, arg2);
005d5af1      PStringBase<char>::break_reference(&__return);
005d5afb      _strlwr(__return);
005d5b01      class PStringBase<char> __return_1 = __return;
005d5b05      uint32_t eax_1 = *(uint32_t*)(__return_1 - 8);
005d5b05      
005d5b0e      if (eax_1 == 0xffffffff)
005d5b0e      {
005d5b11          eax_1 = compute_str_hash(__return_1);
005d5b19          *(uint32_t*)(__return_1 - 8) = eax_1;
005d5b0e      }
005d5b0e      
005d5b27      if (eax_1 > 0x35d42)
005d5b27      {
005d5fcd          if (eax_1 == 0x35eb3)
005d5fcd          {
005d602b              void* var_8;
005d602b              PStringBase<char>::PStringBase<char>(&var_8, ".wts");
005d603a              int32_t eax_49 = _stricmp(__return, var_8);
005d6049              char ebx_6 = ((int8_t)-(eax_49));
005d604d              int32_t* esi_18 = ((char*)var_8 - 0x14);
005d604d              
005d605e              if ((InterlockedDecrement(&esi_18[1]) == 0 && esi_18 != 0))
005d6066                  **(uint32_t**)esi_18(1);
005d6066              
005d606a              if ((ebx_6 - ebx_6) != 0xff)
005d606a              {
005d6070                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d6081                  return 0x10000007;
005d606a              }
005d5fcd          }
005d5fcd          else if (eax_1 == 0x35f74)
005d5fd4          {
005d5fe3              int32_t var_c;
005d5fe3              PStringBase<char>::PStringBase<char>(&var_c, ".xpt");
005d5ff2              int32_t eax_46 = _stricmp(__return, var_c);
005d6001              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
005d6001              
005d6008              if (eax_46 == 0)
005d6008              {
005d600e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d601f                  return 0x10000009;
005d6008              }
005d5fd4          }
005d5fd4          
005d5e5d          if (eax_1 == 0x35e9b)
005d5e5d          {
005d5f6b              void* var_10;
005d5f6b              PStringBase<char>::PStringBase<char>(&var_10, ".wsk");
005d5f7a              int32_t eax_42 = _stricmp(__return, var_10);
005d5f89              char ebx_4 = ((int8_t)-(eax_42));
005d5f8d              int32_t* esi_15 = ((char*)var_10 - 0x14);
005d5f8d              
005d5f9e              if ((InterlockedDecrement(&esi_15[1]) == 0 && esi_15 != 0))
005d5fa6                  **(uint32_t**)esi_15(1);
005d5fa6              
005d5faa              if ((ebx_4 - ebx_4) != 0xff)
005d5faa              {
005d5fb4                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5fc5                  return 0x10000004;
005d5faa              }
005d5e5d          }
005d5e5d          else if (eax_1 == 0x35da4)
005d5e68          {
005d5f1f              int32_t var_14;
005d5f1f              PStringBase<char>::PStringBase<char>(&var_14, ".wct");
005d5f2e              int32_t eax_39 = _stricmp(__return, var_14);
005d5f3d              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14);
005d5f3d              
005d5f44              if (eax_39 == 0)
005d5f44              {
005d5f4e                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5f5f                  return 0x1000000d;
005d5f44              }
005d5e68          }
005d5e68          else if (eax_1 == 0x35da6)
005d5e71          {
005d5ed3              int32_t var_18;
005d5ed3              PStringBase<char>::PStringBase<char>(&var_18, ".wdf");
005d5ee2              int32_t eax_37 = _stricmp(__return, var_18);
005d5ef1              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
005d5ef1              
005d5ef8              if (eax_37 == 0)
005d5ef8              {
005d5f02                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5f13                  return 0x10000001;
005d5ef8              }
005d5e71          }
005d5e71          else if (eax_1 == 0x35e76)
005d5e78          {
005d5e87              int32_t var_1c;
005d5e87              PStringBase<char>::PStringBase<char>(&var_1c, ".wqf");
005d5e96              int32_t eax_34 = _stricmp(__return, var_1c);
005d5ea5              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
005d5ea5              
005d5eac              if (eax_34 == 0)
005d5eac              {
005d5eb6                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5ec7                  return 0x1000000c;
005d5eac              }
005d5e78          }
005d5b27      }
005d5b27      else if (eax_1 == 0x35d42)
005d5b2d      {
005d5de1          void* var_20;
005d5de1          PStringBase<char>::PStringBase<char>(&var_20, ".wa2");
005d5df0          int32_t eax_24 = _stricmp(__return, var_20);
005d5dff          char ebx_2 = ((int8_t)-(eax_24));
005d5e03          int32_t* esi_8 = ((char*)var_20 - 0x14);
005d5e03          
005d5e14          if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
005d5e1c              **(uint32_t**)esi_8(1);
005d5e1c          
005d5e20          if ((ebx_2 - ebx_2) != 0xff)
005d5e20          {
005d5e2a              int32_t* esi_10 = (__return - 0x14);
005d5e2a              
005d5e39              if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
005d5e41                  **(uint32_t**)esi_10(1);
005d5e41              
005d5e4f              return 0x10000003;
005d5e20          }
005d5b2d      }
005d5b2d      else
005d5b2d      {
005d5cdc          if (eax_1 == 0x357a4)
005d5cdc          {
005d5d95              int32_t var_24;
005d5d95              PStringBase<char>::PStringBase<char>(&var_24, ".qdd");
005d5da4              int32_t eax_22 = _stricmp(__return, var_24);
005d5db3              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_24);
005d5db3              
005d5dba              if (eax_22 == 0)
005d5dba              {
005d5dc4                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5dd5                  return 0x1000000a;
005d5dba              }
005d5cdc          }
005d5cdc          else if (eax_1 == 0x359a4)
005d5ce7          {
005d5d49              int32_t var_28;
005d5d49              PStringBase<char>::PStringBase<char>(&var_28, ".sct");
005d5d58              int32_t eax_19 = _stricmp(__return, var_28);
005d5d67              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_28);
005d5d67              
005d5d6e              if (eax_19 == 0)
005d5d6e              {
005d5d78                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5d89                  return 0x10000006;
005d5d6e              }
005d5ce7          }
005d5ce7          else if (eax_1 == 0x35a74)
005d5cee          {
005d5cfd              int32_t var_2c;
005d5cfd              PStringBase<char>::PStringBase<char>(&var_2c, ".spt");
005d5d0c              int32_t eax_16 = _stricmp(__return, var_2c);
005d5d1b              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2c);
005d5d1b              
005d5d22              if (eax_16 == 0)
005d5d22              {
005d5d2c                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5d3d                  return 0x10000005;
005d5d22              }
005d5cee          }
005d5cee          
005d5b3e          if (eax_1 == 0x35036)
005d5b3e          {
005d5c94              int32_t var_30;
005d5c94              PStringBase<char>::PStringBase<char>(&var_30, ".imf");
005d5ca3              int32_t eax_14 = _stricmp(__return, var_30);
005d5cb2              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30);
005d5cb2              
005d5cb9              if (eax_14 == 0)
005d5cb9              {
005d5cc3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5cd4                  return 0x1000000e;
005d5cb9              }
005d5b3e          }
005d5b3e          else if (eax_1 == 0x34793)
005d5b49          {
005d5c48              int32_t var_34;
005d5c48              PStringBase<char>::PStringBase<char>(&var_34, ".acc");
005d5c57              int32_t eax_11 = _stricmp(__return, var_34);
005d5c66              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_34);
005d5c66              
005d5c6d              if (eax_11 == 0)
005d5c6d              {
005d5c77                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5c88                  return 0x10000010;
005d5c6d              }
005d5b49          }
005d5b49          else if (eax_1 == 0x349d4)
005d5b54          {
005d5bb6              int32_t var_3c;
005d5bb6              PStringBase<char>::PStringBase<char>(&var_3c, ".cgd");
005d5bcb              int32_t eax_6 = _stricmp(__return, var_3c);
005d5bd6              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c);
005d5bd6              
005d5bdd              if (eax_6 == 0)
005d5bdd              {
005d5be3                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5bf4                  return 0x10000002;
005d5bdd              }
005d5bdd              
005d5c00              int32_t var_38;
005d5c00              PStringBase<char>::PStringBase<char>(&var_38, ".cft");
005d5c0f              int32_t eax_8 = _stricmp(__return, var_38);
005d5c1a              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_38);
005d5c1a              
005d5c21              if (eax_8 == 0)
005d5c21              {
005d5c2b                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5c3c                  return 0x10000008;
005d5c21              }
005d5b54          }
005d5b54          else if (eax_1 == 0x34db4)
005d5b5b          {
005d5b6a              int32_t var_40;
005d5b6a              PStringBase<char>::PStringBase<char>(&var_40, ".ged");
005d5b79              int32_t eax_3 = _stricmp(__return, var_40);
005d5b88              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_40);
005d5b88              
005d5b8f              if (eax_3 == 0)
005d5b8f              {
005d5b99                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
005d5baa                  return 0x1000000b;
005d5b8f              }
005d5b5b          }
005d5b2d      }
005d5b2d      
005d608d      uint32_t result = MasterDBMap::DivineType_Internal(this, arg2);
005d6096      int32_t* esi_20 = (__return - 0x14);
005d6096      
005d60a7      if ((InterlockedDecrement(&esi_20[1]) == 0 && esi_20 != 0))
005d60af          **(uint32_t**)esi_20(1);
005d60af      
005d60ba      return result;
005d5ad0  }

005d60bd                                                                                         90 90 90                               ...

005d60c0  uint8_t __thiscall gmMasterDBMap::InqTypeByString_Internal(class gmMasterDBMap const* this, class PStringBase<char> const* arg2, uint32_t* arg3)

005d60c0  {
005d60c7      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
005d60c9      int32_t ebx;
005d60c9      int32_t var_44 = ebx;
005d60cc      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
005d60d9      InterlockedIncrement(&m_charbuffer[-1]);
005d60e3      PStringBase<char>::break_reference(&m_charbuffer_1);
005d60ed      _strlwr(m_charbuffer_1);
005d60f3      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
005d60f7      uint32_t eax_2 = *(int32_t*)((char*)m_charbuffer_2 + -8);
005d60f7      
005d6100      if (eax_2 == 0xffffffff)
005d6100      {
005d6103          eax_2 = compute_str_hash(m_charbuffer_2);
005d610b          *(uint32_t*)((char*)m_charbuffer_2 - 8) = eax_2;
005d6100      }
005d6100      
005d6113      uint32_t* edi = arg3;
005d6113      
005d611d      if (eax_2 > 0x78631b2)
005d611d      {
005d64cf          if (eax_2 == 0xb4c8f32)
005d64cf          {
005d6567              void* var_8;
005d6567              PStringBase<char>::PStringBase<char>(&var_8, "QUEST_DEF_DB");
005d6576              int32_t eax_31 = _stricmp(m_charbuffer_1, var_8);
005d6585              ebx = -(eax_31);
005d6587              ebx = (ebx - ebx);
005d6589              int32_t* esi_17 = ((char*)var_8 - 0x14);
005d6590              ebx += 1;
005d6590              
005d659a              if ((InterlockedDecrement(&esi_17[1]) == 0 && esi_17 != 0))
005d65a2                  **(uint32_t**)esi_17(1);
005d65a2              
005d65a6              if (ebx != 0)
005d65a8                  *(uint32_t*)edi = 0x1000000a;
005d64cf          }
005d64cf          else if (eax_2 == 0xcb8e025)
005d64da          {
005d652f              int32_t var_c;
005d652f              PStringBase<char>::PStringBase<char>(&var_c, "ATTRIBUTE_2ND_TABLE");
005d653e              int32_t eax_29 = _stricmp(m_charbuffer_1, var_c);
005d654d              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
005d654d              
005d6554              if (eax_29 == 0)
005d6556                  *(uint32_t*)edi = 0x10000003;
005d64da          }
005d64da          else if (eax_2 == 0xcd1c98d)
005d64e1          {
005d64f0              int32_t var_10;
005d64f0              PStringBase<char>::PStringBase<char>(&var_10, "W_TREASURE_SYSTEM");
005d64ff              int32_t eax_27 = _stricmp(m_charbuffer_1, var_10);
005d650e              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_10);
005d650e              
005d6515              if (eax_27 == 0)
005d651b                  *(uint32_t*)edi = 0x10000007;
005d64e1          }
005d64e1          
005d6391          if (eax_2 == 0xa6a67b5)
005d6391          {
005d647a              void* var_14;
005d647a              PStringBase<char>::PStringBase<char>(&var_14, "XP_TABLE");
005d6489              int32_t eax_24 = _stricmp(m_charbuffer_1, var_14);
005d6498              ebx = -(eax_24);
005d649a              ebx = (ebx - ebx);
005d649c              int32_t* esi_13 = ((char*)var_14 - 0x14);
005d64a3              ebx += 1;
005d64a3              
005d64ad              if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
005d64b5                  **(uint32_t**)esi_13(1);
005d64b5              
005d64b9              if (ebx != 0)
005d64bf                  *(uint32_t*)edi = 0x10000009;
005d6391          }
005d6391          else if (eax_2 == 0x7c6b192)
005d639c          {
005d643b              int32_t var_18;
005d643b              PStringBase<char>::PStringBase<char>(&var_18, "MUTATE_FILTER");
005d644a              int32_t eax_22 = _stricmp(m_charbuffer_1, var_18);
005d6459              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
005d6459              
005d6460              if (eax_22 == 0)
005d6466                  *(uint32_t*)edi = 0x1000000e;
005d639c          }
005d639c          else if (eax_2 == 0x86041b5)
005d63a7          {
005d63fc              int32_t var_1c;
005d63fc              PStringBase<char>::PStringBase<char>(&var_1c, "COMBAT_TABLE");
005d640b              int32_t eax_21 = _stricmp(m_charbuffer_1, var_1c);
005d641a              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
005d641a              
005d6421              if (eax_21 == 0)
005d6427                  *(uint32_t*)edi = 0x1000000d;
005d63a7          }
005d63a7          else if (eax_2 == 0x8dd0dd5)
005d63ae          {
005d63bd              int32_t var_20;
005d63bd              PStringBase<char>::PStringBase<char>(&var_20, "SPELLCOMPONENT_TABLE");
005d63cc              int32_t eax_19 = _stricmp(m_charbuffer_1, var_20);
005d63db              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
005d63db              
005d63e2              if (eax_19 == 0)
005d63e8                  *(uint32_t*)edi = 0x10000006;
005d63ae          }
005d611d      }
005d611d      else if (eax_2 == 0x78631b2)
005d6123      {
005d6336          void* var_24;
005d6336          PStringBase<char>::PStringBase<char>(&var_24, "GAME_EVENT_DB");
005d6345          int32_t eax_15 = _stricmp(m_charbuffer_1, var_24);
005d6354          ebx = -(eax_15);
005d6356          ebx = (ebx - ebx);
005d6358          int32_t* esi_8 = ((char*)var_24 - 0x14);
005d635f          ebx += 1;
005d635f          
005d6369          if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
005d6371              **(uint32_t**)esi_8(1);
005d6371          
005d6375          if (ebx != 0)
005d637b              *(uint32_t*)edi = 0x1000000b;
005d6123      }
005d6123      else
005d6123      {
005d6258          if (eax_2 == 0x3f0ff15)
005d6258          {
005d62f7              int32_t var_28;
005d62f7              PStringBase<char>::PStringBase<char>(&var_28, "W_CRAFT_TABLE");
005d6306              int32_t eax_14 = _stricmp(m_charbuffer_1, var_28);
005d6315              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_28);
005d6315              
005d631c              if (eax_14 == 0)
005d6322                  *(uint32_t*)edi = 0x10000008;
005d6258          }
005d6258          else if (eax_2 == 0x431e285)
005d6263          {
005d62b8              int32_t var_2c;
005d62b8              PStringBase<char>::PStringBase<char>(&var_2c, "CONTRACT_TABLE");
005d62c7              int32_t eax_12 = _stricmp(m_charbuffer_1, var_2c);
005d62d6              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_2c);
005d62d6              
005d62dd              if (eax_12 == 0)
005d62e3                  *(uint32_t*)edi = 0x10000010;
005d6263          }
005d6263          else if (eax_2 == 0x4e5ed76)
005d626a          {
005d6279              int32_t var_30;
005d6279              PStringBase<char>::PStringBase<char>(&var_30, "WEENIE_DEF");
005d6288              int32_t eax_10 = _stricmp(m_charbuffer_1, var_30);
005d6297              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_30);
005d6297              
005d629e              if (eax_10 == 0)
005d62a4                  *(uint32_t*)edi = 0x10000001;
005d626a          }
005d626a          
005d6134          if (eax_2 == 0x288404e)
005d6134          {
005d621d              int32_t var_34;
005d621d              PStringBase<char>::PStringBase<char>(&var_34, "CHAR_GEN");
005d622c              int32_t eax_9 = _stricmp(m_charbuffer_1, var_34);
005d623b              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_34);
005d623b              
005d6242              if (eax_9 == 0)
005d6248                  *(uint32_t*)edi = 0x10000002;
005d6134          }
005d6134          else if (eax_2 == 0x186d515)
005d613f          {
005d61de              int32_t var_38;
005d61de              PStringBase<char>::PStringBase<char>(&var_38, "SPELL_TABLE");
005d61ed              int32_t eax_7 = _stricmp(m_charbuffer_1, var_38);
005d61fc              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_38);
005d61fc              
005d6203              if (eax_7 == 0)
005d6209                  *(uint32_t*)edi = 0x10000005;
005d613f          }
005d613f          else if (eax_2 == 0x19a9915)
005d614a          {
005d619f              int32_t var_3c;
005d619f              PStringBase<char>::PStringBase<char>(&var_3c, "SKILL_TABLE");
005d61ae              int32_t eax_5 = _stricmp(m_charbuffer_1, var_3c);
005d61bd              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c);
005d61bd              
005d61c4              if (eax_5 == 0)
005d61ca                  *(uint32_t*)edi = 0x10000004;
005d614a          }
005d614a          else if (eax_2 == 0x24d2fd2)
005d6151          {
005d6160              PStringBase<char>::PStringBase<char>(&arg3, "QUALITY_FILTER");
005d616f              int32_t eax_4 = _stricmp(m_charbuffer_1, arg3);
005d617e              PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
005d617e              
005d6185              if (eax_4 == 0)
005d618b                  *(uint32_t*)edi = 0x1000000c;
005d6151          }
005d6123      }
005d6123      
005d65b8      uint8_t eax_34 = MasterDBMap::InqTypeByString_Internal(this, arg2, edi);
005d65c1      void* __offset(PSRefBufferCharData<char>, -0x14) esi_19 = &m_charbuffer_1->m_data[0xffffffec];
005d65c8      ebx = eax_34;
005d65c8      
005d65d2      if ((InterlockedDecrement(((char*)esi_19 + 4)) == 0 && esi_19 != 0))
005d65da          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_19) + -0x14)(1);
005d65da      
005d65df      int32_t eax_35;
005d65df      eax_35 = ebx;
005d65e5      return eax_35;
005d60c0  }

005d65e8                          90 90 90 90 90 90 90 90                                                          ........

005d65f0  uint8_t __thiscall gmMasterDBMap::InqStringByType_Internal(class gmMasterDBMap const* this, uint32_t arg2, class PStringBase<char>* arg3)

005d65f0  {
005d6606      if ((arg2 - 0x10000001) <= 0xf)
005d6608          switch (arg2)
005d6608          {
005d660f              case 0x10000001:
005d660f              {
005d6678                  PStringBase<char>::set(arg3, "WEENIE_DEF");
005d660f                  break;
005d660f              }
005d6616              case 0x10000002:
005d6616              {
005d6678                  PStringBase<char>::set(arg3, "CHAR_GEN");
005d6616                  break;
005d6616              }
005d661d              case 0x10000003:
005d661d              {
005d6678                  PStringBase<char>::set(arg3, "ATTRIBUTE_2ND_TABLE");
005d661d                  break;
005d661d              }
005d6624              case 0x10000004:
005d6624              {
005d6678                  PStringBase<char>::set(arg3, "SKILL_TABLE");
005d6624                  break;
005d6624              }
005d662b              case 0x10000005:
005d662b              {
005d6678                  PStringBase<char>::set(arg3, "SPELL_TABLE");
005d662b                  break;
005d662b              }
005d6632              case 0x10000006:
005d6632              {
005d6678                  PStringBase<char>::set(arg3, "SPELLCOMPONENT_TABLE");
005d6632                  break;
005d6632              }
005d6639              case 0x10000007:
005d6639              {
005d6678                  PStringBase<char>::set(arg3, "W_TREASURE_SYSTEM");
005d6639                  break;
005d6639              }
005d6640              case 0x10000008:
005d6640              {
005d6678                  PStringBase<char>::set(arg3, "W_CRAFT_TABLE");
005d6640                  break;
005d6640              }
005d6647              case 0x10000009:
005d6647              {
005d6678                  PStringBase<char>::set(arg3, "XP_TABLE");
005d6647                  break;
005d6647              }
005d664e              case 0x1000000a:
005d664e              {
005d6678                  PStringBase<char>::set(arg3, "QUEST_DEF_DB");
005d664e                  break;
005d664e              }
005d6655              case 0x1000000b:
005d6655              {
005d6678                  PStringBase<char>::set(arg3, "GAME_EVENT_DB");
005d6655                  break;
005d6655              }
005d665c              case 0x1000000c:
005d665c              {
005d6678                  PStringBase<char>::set(arg3, "QUALITY_FILTER");
005d665c                  break;
005d665c              }
005d6663              case 0x1000000d:
005d6663              {
005d6678                  PStringBase<char>::set(arg3, "COMBAT_TABLE");
005d6663                  break;
005d6663              }
005d666a              case 0x1000000e:
005d666a              {
005d6678                  PStringBase<char>::set(arg3, "MUTATE_FILTER");
005d666a                  break;
005d666a              }
005d6671              case 0x10000010:
005d6671              {
005d6678                  PStringBase<char>::set(arg3, "CONTRACT_TABLE");
005d6671                  break;
005d6671              }
005d6608          }
005d6608      
005d6689      return MasterDBMap::InqStringByType_Internal(this, arg2, arg3);
005d65f0  }

005d668c  uint32_t jump_table_5d668c[0x10] = 
005d668c  {
005d668c      [0x0] =  0x005d660f
005d6690      [0x1] =  0x005d6616
005d6694      [0x2] =  0x005d661d
005d6698      [0x3] =  0x005d6624
005d669c      [0x4] =  0x005d662b
005d66a0      [0x5] =  0x005d6632
005d66a4      [0x6] =  0x005d6639
005d66a8      [0x7] =  0x005d6640
005d66ac      [0x8] =  0x005d6647
005d66b0      [0x9] =  0x005d664e
005d66b4      [0xa] =  0x005d6655
005d66b8      [0xb] =  0x005d665c
005d66bc      [0xc] =  0x005d6663
005d66c0      [0xd] =  0x005d666a
005d66c4      [0xe] =  0x005d667d
005d66c8      [0xf] =  0x005d6671
005d66cc  }

005d66cc                                      90 90 90 90                                                              ....

005d66d0  uint8_t __fastcall gmMasterDBMap::InitDBTypeDef_Internal(class gmMasterDBMap* this)

005d66d0  {
005d66df      int32_t var_38;
005d66df      DBTypeDef::DBTypeDef(&var_38);
005d66f2      var_38 = 1;
005d66f6      int32_t var_34 = 0xffff;
005d66fe      void* var_44;
005d66fe      PStringBase<char>::PStringBase<char>(&var_44, ".wdf");
005d670c      class PStringBase<char>* var_30;
005d670c      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d671b      int32_t* ebp_1 = ((char*)var_44 - 0x14);
005d671b      
005d672c      if ((InterlockedDecrement(&ebp_1[1]) == 0 && ebp_1 != 0))
005d6734          **(uint32_t**)ebp_1(1);
005d6734      
005d673f      int32_t var_24 = 1;
005d6743      int32_t var_20 = 1;
005d6747      char var_1c = 1;
005d674c      char var_1b = 1;
005d6751      char var_1a = 0;
005d6755      char var_19 = 0;
005d6759      void* var_18;
005d6759      PStringBase<char>::set(&var_18, "weenie/defaults");
005d6772      char var_14 = 0;
005d6776      char var_13 = 1;
005d677b      char var_12 = 0;
005d677f      char var_11 = 0;
005d6783      char var_10 = 0;
005d6787      char var_f = 0;
005d678b      char var_c = 0;
005d678f      char var_b = 1;
005d6794      int32_t var_8 = 3;
005d679c      int32_t var_4 = 0xf;
005d67a0      char var_e = 0;
005d67a4      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_WEENIE_DEF, &var_38);
005d67b7      int32_t var_28 = 0;
005d67bb      var_38 = 0xe000002;
005d67bf      int32_t var_34_1 = 0xe000002;
005d67c3      PStringBase<char>::PStringBase<char>(&var_44, ".cgd");
005d67d1      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d67da      void* eax_2 = ((char*)var_44 - 0x14);
005d67da      
005d67f1      if ((InterlockedDecrement(((char*)eax_2 + 4)) == 0 && eax_2 != 0))
005d67f6          **(uint32_t**)eax_2(1);
005d67f6      
005d6801      int32_t var_24_1 = 1;
005d6805      int32_t var_20_1 = 1;
005d6809      char var_1c_1 = 1;
005d680e      char var_1b_1 = 1;
005d6813      char var_1a_1 = 0;
005d6817      char var_19_1 = 0;
005d681b      PStringBase<char>::set(&var_18, "weenie");
005d682f      char var_14_1 = 1;
005d6834      char var_13_1 = 1;
005d6839      char var_12_1 = 0;
005d683d      char var_11_1 = 0;
005d6841      char var_10_1 = 0;
005d6845      char var_f_1 = 0;
005d6849      char var_c_1 = 0;
005d684d      char var_b_1 = 1;
005d6852      int32_t var_8_1 = 3;
005d685a      int32_t var_4_1 = 0xf;
005d685e      char var_e_1 = 0;
005d6862      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_CHAR_GEN, &var_38);
005d6875      int32_t var_28_1 = 0;
005d6879      var_38 = 0xe000003;
005d687d      int32_t var_34_2 = 0xe000003;
005d6881      PStringBase<char>::PStringBase<char>(&var_44, ".wa2");
005d688f      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6898      void* eax_6 = ((char*)var_44 - 0x14);
005d6898      
005d68af      if ((InterlockedDecrement(((char*)eax_6 + 4)) == 0 && eax_6 != 0))
005d68b4          **(uint32_t**)eax_6(1);
005d68b4      
005d68bf      int32_t var_24_2 = 1;
005d68c3      int32_t var_20_2 = 1;
005d68c7      char var_1c_2 = 1;
005d68cc      char var_1b_2 = 1;
005d68d1      char var_1a_2 = 0;
005d68d5      char var_19_2 = 0;
005d68d9      PStringBase<char>::set(&var_18, "weenie/skills");
005d68ed      char var_14_2 = 1;
005d68f2      char var_13_2 = 1;
005d68f7      char var_12_2 = 0;
005d68fb      char var_11_2 = 0;
005d68ff      char var_10_2 = 0;
005d6903      char var_f_2 = 0;
005d6907      char var_c_2 = 0;
005d690b      char var_b_2 = 1;
005d6910      int32_t var_8_2 = 3;
005d6918      int32_t var_4_2 = 0xf;
005d691c      char var_e_2 = 0;
005d6920      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_ATTRIBUTE_2ND_TABLE, &var_38);
005d6933      int32_t var_28_2 = 0;
005d6937      var_38 = 0xe000004;
005d693b      int32_t var_34_3 = 0xe000004;
005d693f      PStringBase<char>::PStringBase<char>(&var_44, ".wsk");
005d694d      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6956      void* eax_10 = ((char*)var_44 - 0x14);
005d6956      
005d696d      if ((InterlockedDecrement(((char*)eax_10 + 4)) == 0 && eax_10 != 0))
005d6972          **(uint32_t**)eax_10(1);
005d6972      
005d697d      int32_t var_24_3 = 1;
005d6981      int32_t var_20_3 = 1;
005d6985      char var_1c_3 = 1;
005d698a      char var_1b_3 = 1;
005d698f      char var_1a_3 = 0;
005d6993      char var_19_3 = 0;
005d6997      PStringBase<char>::set(&var_18, "weenie/skills");
005d69ab      char var_14_3 = 1;
005d69b0      char var_13_3 = 1;
005d69b5      char var_12_3 = 0;
005d69b9      char var_11_3 = 0;
005d69bd      char var_10_3 = 0;
005d69c1      char var_f_3 = 0;
005d69c5      char var_c_3 = 0;
005d69c9      char var_b_3 = 1;
005d69ce      int32_t var_8_3 = 3;
005d69d6      int32_t var_4_3 = 0xf;
005d69da      char var_e_3 = 0;
005d69de      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_SKILL_TABLE, &var_38);
005d69f1      int32_t var_28_3 = 0;
005d69f5      var_38 = 0xe00000e;
005d69f9      int32_t var_34_4 = 0xe00000e;
005d69fd      PStringBase<char>::PStringBase<char>(&var_44, ".spt");
005d6a0b      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6a14      void* eax_14 = ((char*)var_44 - 0x14);
005d6a14      
005d6a2b      if ((InterlockedDecrement(((char*)eax_14 + 4)) == 0 && eax_14 != 0))
005d6a30          **(uint32_t**)eax_14(1);
005d6a30      
005d6a3b      int32_t var_24_4 = 1;
005d6a3f      int32_t var_20_4 = 1;
005d6a43      char var_1c_4 = 1;
005d6a48      char var_1b_4 = 1;
005d6a4d      char var_1a_4 = 0;
005d6a51      char var_19_4 = 0;
005d6a55      PStringBase<char>::set(&var_18, "weenie/magic");
005d6a69      char var_14_4 = 1;
005d6a6e      char var_13_4 = 1;
005d6a73      char var_12_4 = 0;
005d6a77      char var_11_4 = 0;
005d6a7b      char var_10_4 = 0;
005d6a7f      char var_f_4 = 0;
005d6a83      char var_c_4 = 0;
005d6a87      char var_b_4 = 1;
005d6a8c      int32_t var_8_4 = 3;
005d6a94      int32_t var_4_4 = 0xf;
005d6a98      char var_e_4 = 0;
005d6a9c      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_SPELL_TABLE, &var_38);
005d6aaf      int32_t var_28_4 = 0;
005d6ab3      var_38 = 0xe00000f;
005d6ab7      int32_t var_34_5 = 0xe00000f;
005d6abb      PStringBase<char>::PStringBase<char>(&var_44, ".sct");
005d6ac9      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6ad2      void* eax_18 = ((char*)var_44 - 0x14);
005d6ad2      
005d6ae9      if ((InterlockedDecrement(((char*)eax_18 + 4)) == 0 && eax_18 != 0))
005d6aee          **(uint32_t**)eax_18(1);
005d6aee      
005d6af9      int32_t var_24_5 = 1;
005d6afd      int32_t var_20_5 = 1;
005d6b01      char var_1c_5 = 1;
005d6b06      char var_1b_5 = 1;
005d6b0b      char var_1a_5 = 0;
005d6b0f      char var_19_5 = 0;
005d6b13      PStringBase<char>::set(&var_18, "weenie/magic");
005d6b27      char var_14_5 = 1;
005d6b2c      char var_13_5 = 1;
005d6b31      char var_12_5 = 0;
005d6b35      char var_11_5 = 0;
005d6b39      char var_10_5 = 0;
005d6b3d      char var_f_5 = 0;
005d6b41      char var_c_5 = 0;
005d6b45      char var_b_5 = 1;
005d6b4a      int32_t var_8_5 = 3;
005d6b52      int32_t var_4_5 = 0xf;
005d6b56      char var_e_5 = 0;
005d6b5a      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_SPELLCOMPONENT_TABLE, &var_38);
005d6b6d      int32_t var_28_5 = 0;
005d6b71      var_38 = 0xe000011;
005d6b75      int32_t var_34_6 = 0xe000011;
005d6b79      PStringBase<char>::PStringBase<char>(&var_44, ".wts");
005d6b87      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6b90      void* eax_22 = ((char*)var_44 - 0x14);
005d6b90      
005d6ba7      if ((InterlockedDecrement(((char*)eax_22 + 4)) == 0 && eax_22 != 0))
005d6bac          **(uint32_t**)eax_22(1);
005d6bac      
005d6bb7      int32_t var_24_6 = 1;
005d6bbb      int32_t var_20_6 = 1;
005d6bbf      char var_1c_6 = 1;
005d6bc4      char var_1b_6 = 1;
005d6bc9      char var_1a_6 = 0;
005d6bcd      char var_19_6 = 0;
005d6bd1      PStringBase<char>::set(&var_18, "weenie/treasure");
005d6be5      char var_14_6 = 0;
005d6be9      char var_13_6 = 1;
005d6bee      char var_12_6 = 0;
005d6bf2      char var_11_6 = 0;
005d6bf6      char var_10_6 = 0;
005d6bfa      char var_f_6 = 0;
005d6bfe      char var_c_6 = 0;
005d6c02      char var_b_6 = 1;
005d6c07      int32_t var_8_6 = 3;
005d6c0f      int32_t var_4_6 = 0xf;
005d6c13      char var_e_6 = 0;
005d6c17      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_W_TREASURE_SYSTEM, &var_38);
005d6c2a      int32_t var_28_6 = 0;
005d6c2e      var_38 = 0xe000019;
005d6c32      int32_t var_34_7 = 0xe000019;
005d6c36      PStringBase<char>::PStringBase<char>(&var_44, ".cft");
005d6c44      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6c4d      void* eax_26 = ((char*)var_44 - 0x14);
005d6c4d      
005d6c64      if ((InterlockedDecrement(((char*)eax_26 + 4)) == 0 && eax_26 != 0))
005d6c69          **(uint32_t**)eax_26(1);
005d6c69      
005d6c74      int32_t var_24_7 = 1;
005d6c78      int32_t var_20_7 = 1;
005d6c7c      char var_1c_7 = 1;
005d6c81      char var_1b_7 = 1;
005d6c86      char var_1a_7 = 0;
005d6c8a      char var_19_7 = 0;
005d6c8e      PStringBase<char>::set(&var_18, "weenie/craft");
005d6ca2      char var_14_7 = 0;
005d6ca6      char var_13_7 = 1;
005d6cab      char var_12_7 = 0;
005d6caf      char var_11_7 = 0;
005d6cb3      char var_10_7 = 0;
005d6cb7      char var_f_7 = 0;
005d6cbb      char var_c_7 = 0;
005d6cbf      char var_b_7 = 1;
005d6cc4      int32_t var_8_7 = 3;
005d6ccc      int32_t var_4_7 = 0xf;
005d6cd0      char var_e_7 = 0;
005d6cd4      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_W_CRAFT_TABLE, &var_38);
005d6ce7      int32_t var_28_7 = 0;
005d6ceb      var_38 = 0xe000018;
005d6cef      int32_t var_34_8 = 0xe000018;
005d6cf3      PStringBase<char>::PStringBase<char>(&var_44, ".xpt");
005d6d01      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6d0a      void* eax_30 = ((char*)var_44 - 0x14);
005d6d0a      
005d6d21      if ((InterlockedDecrement(((char*)eax_30 + 4)) == 0 && eax_30 != 0))
005d6d26          **(uint32_t**)eax_30(1);
005d6d26      
005d6d31      int32_t var_24_8 = 1;
005d6d35      int32_t var_20_8 = 1;
005d6d39      char var_1c_8 = 1;
005d6d3e      char var_1b_8 = 1;
005d6d43      char var_1a_8 = 0;
005d6d47      char var_19_8 = 0;
005d6d4b      PStringBase<char>::set(&var_18, "weenie/experience");
005d6d5f      char var_14_8 = 1;
005d6d64      char var_13_8 = 1;
005d6d69      char var_12_8 = 0;
005d6d6d      char var_11_8 = 0;
005d6d71      char var_10_8 = 0;
005d6d75      char var_f_8 = 0;
005d6d79      char var_c_8 = 0;
005d6d7d      char var_b_8 = 1;
005d6d82      int32_t var_8_8 = 3;
005d6d8a      int32_t var_4_8 = 0xf;
005d6d8e      char var_e_8 = 0;
005d6d92      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_XP_TABLE, &var_38);
005d6da5      int32_t var_28_8 = 0;
005d6da9      var_38 = 0xe00001b;
005d6dad      int32_t var_34_9 = 0xe00001b;
005d6db1      PStringBase<char>::PStringBase<char>(&var_44, ".qdd");
005d6dbf      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6dc8      void* eax_34 = ((char*)var_44 - 0x14);
005d6dc8      
005d6ddf      if ((InterlockedDecrement(((char*)eax_34 + 4)) == 0 && eax_34 != 0))
005d6de4          **(uint32_t**)eax_34(1);
005d6de4      
005d6def      int32_t var_24_9 = 1;
005d6df3      int32_t var_20_9 = 1;
005d6df7      char var_1c_9 = 1;
005d6dfc      char var_1b_9 = 1;
005d6e01      char var_1a_9 = 0;
005d6e05      char var_19_9 = 0;
005d6e09      PStringBase<char>::set(&var_18, "weenie");
005d6e1d      char var_14_9 = 1;
005d6e22      char var_13_9 = 1;
005d6e27      char var_12_9 = 0;
005d6e2b      char var_11_9 = 0;
005d6e2f      char var_10_9 = 0;
005d6e33      char var_f_9 = 0;
005d6e37      char var_c_9 = 0;
005d6e3b      char var_b_9 = 1;
005d6e40      int32_t var_8_9 = 3;
005d6e48      int32_t var_4_9 = 0xf;
005d6e4c      char var_e_9 = 0;
005d6e50      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_QUEST_DEF_DB, &var_38);
005d6e63      int32_t var_28_9 = 0;
005d6e67      var_38 = 0xe00001c;
005d6e6b      int32_t var_34_10 = 0xe00001c;
005d6e6f      PStringBase<char>::PStringBase<char>(&var_44, ".ged");
005d6e7d      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6e86      void* eax_38 = ((char*)var_44 - 0x14);
005d6e86      
005d6e9d      if ((InterlockedDecrement(((char*)eax_38 + 4)) == 0 && eax_38 != 0))
005d6ea2          **(uint32_t**)eax_38(1);
005d6ea2      
005d6ead      int32_t var_24_10 = 1;
005d6eb1      int32_t var_20_10 = 1;
005d6eb5      char var_1c_10 = 1;
005d6eba      char var_1b_10 = 1;
005d6ebf      char var_1a_10 = 0;
005d6ec3      char var_19_10 = 0;
005d6ec7      PStringBase<char>::set(&var_18, "weenie");
005d6edb      char var_14_10 = 0;
005d6edf      char var_13_10 = 1;
005d6ee4      char var_12_10 = 0;
005d6ee8      char var_11_10 = 0;
005d6eec      char var_10_10 = 0;
005d6ef0      char var_f_10 = 0;
005d6ef4      char var_c_10 = 0;
005d6ef8      char var_b_10 = 1;
005d6efd      int32_t var_8_10 = 3;
005d6f05      int32_t var_4_10 = 0xf;
005d6f09      char var_e_10 = 0;
005d6f0d      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_GAME_EVENT_DB, &var_38);
005d6f1b      int32_t var_28_10 = 0;
005d6f1f      var_38 = 0xe010000;
005d6f27      int32_t var_34_11 = 0xe01ffff;
005d6f2f      PStringBase<char>::PStringBase<char>(&var_44, ".wqf");
005d6f3d      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d6f46      void* eax_42 = ((char*)var_44 - 0x14);
005d6f46      
005d6f5d      if ((InterlockedDecrement(((char*)eax_42 + 4)) == 0 && eax_42 != 0))
005d6f62          **(uint32_t**)eax_42(1);
005d6f62      
005d6f6d      int32_t var_24_11 = 1;
005d6f71      int32_t var_20_11 = 1;
005d6f75      char var_1c_11 = 1;
005d6f7a      char var_1b_11 = 1;
005d6f7f      char var_1a_11 = 0;
005d6f83      char var_19_11 = 0;
005d6f87      PStringBase<char>::set(&var_18, "weenie/filters");
005d6f9b      char var_14_11 = 1;
005d6fa0      char var_13_11 = 1;
005d6fa5      char var_12_11 = 0;
005d6fa9      char var_11_11 = 0;
005d6fad      char var_10_11 = 0;
005d6fb1      char var_f_11 = 0;
005d6fb5      char var_c_11 = 0;
005d6fb9      char var_b_11 = 1;
005d6fbe      int32_t var_8_11 = 3;
005d6fc6      int32_t var_4_11 = 0xf;
005d6fca      char var_e_11 = 0;
005d6fce      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_QUALITY_FILTER, &var_38);
005d6fdc      int32_t var_28_11 = 0;
005d6fe0      var_38 = 0x30000000;
005d6fe8      int32_t var_34_12 = 0x3000ffff;
005d6ff0      PStringBase<char>::PStringBase<char>(&var_44, ".wct");
005d6ffe      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d7007      void* eax_46 = ((char*)var_44 - 0x14);
005d7007      
005d701e      if ((InterlockedDecrement(((char*)eax_46 + 4)) == 0 && eax_46 != 0))
005d7023          **(uint32_t**)eax_46(1);
005d7023      
005d702e      int32_t var_24_12 = 1;
005d7032      int32_t var_20_12 = 1;
005d7036      char var_1c_12 = 1;
005d703b      char var_1b_12 = 1;
005d7040      char var_1a_12 = 0;
005d7044      char var_19_12 = 0;
005d7048      PStringBase<char>::set(&var_18, "weenie/combat_tables");
005d705c      char var_14_12 = 1;
005d7061      char var_13_12 = 1;
005d7066      char var_12_12 = 0;
005d706a      char var_11_12 = 0;
005d706e      char var_10_12 = 0;
005d7072      char var_f_12 = 0;
005d7076      char var_c_12 = 0;
005d707a      char var_b_12 = 1;
005d707f      int32_t var_8_12 = 3;
005d7087      int32_t var_4_12 = 0xf;
005d708b      char var_e_12 = 0;
005d708f      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_COMBAT_TABLE, &var_38);
005d709d      int32_t var_28_12 = 0;
005d70a1      var_38 = 0x38000000;
005d70a9      int32_t var_34_13 = 0x3800ffff;
005d70b1      PStringBase<char>::PStringBase<char>(&var_44, ".imf");
005d70bf      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d70c8      void* eax_50 = ((char*)var_44 - 0x14);
005d70c8      
005d70df      if ((InterlockedDecrement(((char*)eax_50 + 4)) == 0 && eax_50 != 0))
005d70e4          **(uint32_t**)eax_50(1);
005d70e4      
005d70ef      int32_t var_24_13 = 1;
005d70f3      int32_t var_20_13 = 1;
005d70f7      char var_1c_13 = 1;
005d70fc      char var_1b_13 = 1;
005d7101      char var_1a_13 = 0;
005d7105      char var_19_13 = 0;
005d7109      PStringBase<char>::set(&var_18, "weenie/ItemMutationFiles");
005d711d      char var_14_13 = 0;
005d7121      char var_13_13 = 1;
005d7126      char var_12_13 = 0;
005d712a      char var_11_13 = 0;
005d712e      char var_10_13 = 0;
005d7132      char var_f_13 = 0;
005d7136      char var_c_13 = 0;
005d713a      char var_b_13 = 1;
005d713f      int32_t var_8_13 = 3;
005d7147      int32_t var_4_13 = 0xf;
005d714b      char var_e_13 = 0;
005d714f      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_MUTATE_FILTER, &var_38);
005d7162      int32_t var_28_13 = 0;
005d7166      var_38 = 0xe00001d;
005d716a      int32_t var_34_14 = 0xe00001d;
005d716e      PStringBase<char>::PStringBase<char>(&var_44, ".acc");
005d717c      SmartArray<PStringBase<char>,1>::AddToEnd(&var_30, &var_44);
005d7185      void* eax_54 = ((char*)var_44 - 0x14);
005d7185      
005d719c      if ((InterlockedDecrement(((char*)eax_54 + 4)) == 0 && eax_54 != 0))
005d71a1          **(uint32_t**)eax_54(1);
005d71a1      
005d71ac      int32_t var_24_14 = 1;
005d71b0      int32_t var_20_14 = 1;
005d71b4      char var_1c_14 = 1;
005d71b9      char var_1b_14 = 1;
005d71be      char var_1a_14 = 0;
005d71c2      char var_19_14 = 0;
005d71c6      PStringBase<char>::set(&var_18, "weenie");
005d71da      char var_14_14 = 1;
005d71df      char var_13_14 = 1;
005d71e4      char var_12_14 = 0;
005d71e8      char var_11_14 = 0;
005d71ec      char var_10_14 = 0;
005d71f0      char var_f_14 = 0;
005d71f4      char var_c_14 = 0;
005d71f8      char var_b_14 = 1;
005d71fd      int32_t var_8_14 = 3;
005d7205      int32_t var_4_14 = 0xf;
005d7209      char var_e_14 = 0;
005d720d      HashTable<unsigned long,DBTypeDef,0>::add(&MasterDBMap::sm_DBTypeDefHash, &DB_TYPE_CONTRACT_TABLE, &var_38);
005d7216      int32_t var_28_14 = 0;
005d721a      uint8_t eax_57 = MasterDBMap::InitDBTypeDef_Internal(this);
005d7223      int32_t* ebp_3 = ((char*)var_18 - 0x14);
005d7223      
005d7236      if ((InterlockedDecrement(&ebp_3[1]) == 0 && ebp_3 != 0))
005d723e          **(uint32_t**)ebp_3(1);
005d723e      
005d724e      int32_t var_2c;
005d724e      
005d724e      if ((var_2c & 0x80000000) == 0x80000000)
005d724e      {
005d7250          class PStringBase<char>* ecx_65 = var_30;
005d7250          
005d7256          if (ecx_65 != 0)
005d725a              PStringBase<char>::`vector deleting destructor'(ecx_65, 3);
005d724e      }
005d724e      
005d725f      void* eax_60;
005d725f      eax_60 = eax_57;
005d726a      return eax_60;
005d66d0  }

005d726b                                   90 90 90 90 90                                                             .....

005d7270  BOOL __stdcall j_ImmReleaseContext(HWND param0, HIMC param1)

005d7270  {
005d7270      /* tailcall */
005d7270      return ImmReleaseContext(param0, param1);
005d7270  }


005d7276  HIMC __stdcall j_ImmGetContext(HWND param0)

005d7276  {
005d7276      /* tailcall */
005d7276      return ImmGetContext(param0);
005d7276  }


005d727c  HIMC __stdcall j_ImmAssociateContext(HWND param0, HIMC param1)

005d727c  {
005d727c      /* tailcall */
005d727c      return ImmAssociateContext(param0, param1);
005d727c  }

005d7282        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

005d7290  uint8_t __thiscall VertexArray::RequestStripHWExtraTexCoords(class VertexArray* this, uint8_t const arg2)

005d7290  {
005d7298      void* eax;
005d7298      
005d7298      if (this->vertices != 0)
005d7298      {
005d72a9          eax = 0;
005d72ab          return 0;
005d7298      }
005d7298      
005d729a      eax = arg2;
005d729e      this->m_bStripHWExtraTexCoords = eax;
005d72a4      eax = 1;
005d72a6      return 1;
005d7290  }

005d72ae                                            90 90                                                                ..

005d72b0  uint8_t __thiscall VertexArray::Startup(class VertexArray* this, uint32_t const arg2, uint32_t const arg3, uint8_t const arg4, uint8_t const arg5, uint32_t const arg6)

005d72b0  {
005d72ba      if (arg2 <= 0)
005d72ba      {
005d7301          int32_t eax;
005d7301          eax = 0;
005d7304          return 0;
005d72ba      }
005d72ba      
005d72c0      this->vertexFormat.format = arg3;
005d72c5      VertexFormatInfo::GenerateOffsets(&this->vertexFormat.format);
005d72cd      uint32_t* ecx;
005d72cd      ecx = arg4;
005d72d1      uint32_t eax_3 = (this->vertexFormat.size * arg2);
005d72d9      this->numVertices = arg2;
005d72dc      this->staticVertices = ecx;
005d72e2      this->m_OnlyWriteOnce = arg5;
005d72e8      void* eax_4 = operator new[](eax_3);
005d72f0      this->vertices = eax_4;
005d72f9      eax_4 = eax_4 != 0;
005d72fd      return eax_4;
005d72b0  }

005d7307                       90 90 90 90 90 90 90 90 90                                                         .........

005d7310  void* __thiscall VertexArray::Lock(class VertexArray* this, uint32_t const arg2, uint32_t const arg3)

005d7310  {
005d7318      if (this->locked == 0)
005d7318      {
005d731a          uint32_t numVertices = this->numVertices;
005d731a          
005d732f          if ((arg2 < numVertices && (arg3 + arg2) <= numVertices))
005d732f          {
005d7334              void* eax_2 = (this->vertexFormat.size * arg2);
005d7337              void* vertices = this->vertices;
005d733d              this->locked = 1;
005d7346              return ((char*)eax_2 + vertices);
005d732f          }
005d7318      }
005d7318      
005d734b      return 0;
005d7310  }

005d734e                                            90 90                                                                ..

005d7350  uint8_t SetDiffuse(uint8_t* arg1, class VertexFormatInfo const* arg2, uint32_t const arg3)

005d7350  {
005d7357      if ((arg2->format & 0x40) != 0)
005d7364          *(uint32_t*)(arg1 + arg2->offsetDiffuse) = arg3;
005d7364      
005d7367      class VertexFormatInfo* eax;
005d7367      eax = 1;
005d7369      return 1;
005d7350  }

005d736a                                90 90 90 90 90 90                                                            ......

005d7370  uint8_t SetSpecular(uint8_t* arg1, class VertexFormatInfo const* arg2, uint32_t const arg3)

005d7370  {
005d7377      if (arg2->format < 0)
005d7384          *(uint32_t*)(arg1 + arg2->offsetSpecular) = arg3;
005d7384      
005d7387      class VertexFormatInfo* eax;
005d7387      eax = 1;
005d7389      return 1;
005d7370  }

005d738a                                90 90 90 90 90 90                                                            ......

005d7390  uint8_t SetVectorS(uint8_t* arg1, class VertexFormatInfo const* arg2, class Vector3 const* arg3)

005d7390  {
005d739a      if ((arg2->format & 0x10000000) == 0)
005d739a      {
005d73ba          class VertexFormatInfo* eax_2;
005d73ba          eax_2 = 0;
005d73bc          return 0;
005d739a      }
005d739a      
005d739f      void* eax_1 = &arg1[arg2->offsetVectorS];
005d73a9      *(uint32_t*)eax_1 = arg3->x;
005d73ae      *(uint32_t*)((char*)eax_1 + 4) = arg3->y;
005d73b4      *(uint32_t*)((char*)eax_1 + 8) = arg3->z;
005d73b7      eax_1 = 1;
005d73b9      return 1;
005d7390  }

005d73bd                                                                                         90 90 90                               ...

005d73c0  uint8_t SetVectorT(uint8_t* arg1, class VertexFormatInfo const* arg2, class Vector3 const* arg3)

005d73c0  {
005d73ca      if ((arg2->format & 0x20000000) == 0)
005d73ca      {
005d73ea          class VertexFormatInfo* eax_2;
005d73ea          eax_2 = 0;
005d73ec          return 0;
005d73ca      }
005d73ca      
005d73cf      void* eax_1 = &arg1[arg2->offsetVectorT];
005d73d9      *(uint32_t*)eax_1 = arg3->x;
005d73de      *(uint32_t*)((char*)eax_1 + 4) = arg3->y;
005d73e4      *(uint32_t*)((char*)eax_1 + 8) = arg3->z;
005d73e7      eax_1 = 1;
005d73e9      return 1;
005d73c0  }

005d73ed                                         90 90 90                                                               ...

005d73f0  uint8_t SetTCPair(uint8_t* arg1, class VertexFormatInfo const* arg2, uint32_t const arg3, float const* arg4)

005d73f0  {
005d73fb      if (arg3 >= arg2->numTCPairs)
005d73fb      {
005d741a          uint32_t const eax;
005d741a          eax = 0;
005d741c          return 0;
005d73fb      }
005d73fb      
005d73fd      int32_t* edx = arg2->offsetTCPair[arg3];
005d740c      *(uint32_t*)((char*)edx + arg1) = *(uint32_t*)arg4;
005d7412      *(uint32_t*)(((char*)edx + arg1) + 4) = arg4[1];
005d7416      int32_t eax_2;
005d7416      eax_2 = 1;
005d7419      return 1;
005d73f0  }

005d741d                                                                                         90 90 90                               ...

005d7420  uint8_t SetMatrixWeight(uint8_t* arg1, class VertexFormatInfo const* arg2, uint32_t const arg3, uint8_t const arg4, float const arg5)

005d7420  {
005d742b      if (arg3 >= arg2->numMatrices)
005d742b      {
005d7451          uint32_t const eax;
005d7451          eax = 0;
005d7453          return 0;
005d742b      }
005d742b      
005d7431      int32_t ebx;
005d7431      ebx = arg4;
005d743a      arg1[(arg2->offsetMatrices + arg3)] = ebx;
005d7449      *(uint32_t*)((arg2->offsetMWeights + (arg3 << 2)) + arg1) = arg5;
005d744d      float const eax_1;
005d744d      eax_1 = 1;
005d7450      return 1;
005d7420  }

005d7454                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005d7460  void __fastcall VertexArray::GenerateBoundingBox(class VertexArray* this)

005d7460  {
005d7470      BBox::InitForAdjustment(&this->m_BoundingBox);
005d7470      
005d747c      if (this->numVertices > 0)
005d747c      {
005d747e          int32_t i = 0;
005d747e          
005d74be          do
005d74be          {
005d748c              class BBox* ecx_1;
005d748c              ecx_1 = this->m_IsYAndZSwapped;
005d7492              class Vector3* eax_3 = ((this->vertexFormat.size * i) + this->vertices);
005d7492              
005d7496              if (ecx_1 != 0)
005d7496              {
005d749d                  float y = eax_3->y;
005d74a0                  float var_8_1 = ((float)((long double)eax_3->z));
005d74a4                  float x = eax_3->x;
005d74a8                  float y_1 = y;
005d74ac                  eax_3 = &x;
005d7496              }
005d7496              
005d74b3              BBox::AdjustBBox(&this->m_BoundingBox, eax_3);
005d74bb              i += 1;
005d74be          } while (i < this->numVertices);
005d747c      }
005d7460  }

005d74c7                       90 90 90 90 90 90 90 90 90                                                         .........

005d74d0  void __fastcall VertexArray::Begin(class VertexArray* this)

005d74d0  {
005d74e6      this->numVertices = 0;
005d74e9      this->vertices = nullptr;
005d74ef      this->staticVertices = 1;
005d74f6      this->locked = 0;
005d74fc      this->m_IsYAndZSwapped = 0;
005d7502      this->m_OnlyWriteOnce = 0;
005d7508      __builtin_memcpy(&this->m_BoundingBox, 0x8ee170, 0x18);
005d750b      this->m_bStripHWExtraTexCoords = 0;
005d7518      /* tailcall */
005d7518      return SmartArray<unsigned long,1>::Reset(&this->m_InfluencedBoneIndexArray);
005d74d0  }

005d751d                                                                                         90 90 90                               ...

005d7520  void __fastcall VertexArray::End(class VertexArray* this)

005d7520  {
005d7523      void* vertices = this->vertices;
005d7523      
005d752b      if (vertices != 0)
005d752b      {
005d752e          operator delete[](vertices);
005d7536          this->vertices = nullptr;
005d752b      }
005d752b      
005d7547      /* tailcall */
005d7547      return SmartArray<unsigned long,1>::Reset(&this->m_InfluencedBoneIndexArray);
005d7520  }

005d754c                                      90 90 90 90                                                              ....

005d7550  void __fastcall VertexArray::Shutdown(class VertexArray* this)

005d7550  {
005d7553      void* vertices = this->vertices;
005d7553      
005d755b      if (vertices != 0)
005d755b      {
005d755e          operator delete[](vertices);
005d7566          this->vertices = nullptr;
005d755b      }
005d755b      
005d7576      SmartArray<unsigned long,1>::Reset(&this->m_InfluencedBoneIndexArray);
005d757e      /* tailcall */
005d757e      return VertexArray::Begin(this);
005d7550  }

005d7583           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005d7590  uint8_t __thiscall SmartArray<RenderMeshFragmentTopology::TopEdgeType,1>::SetNElements(class SmartArray<RenderMeshFragmentTopology::TopEdgeType,1>* this, uint32_t const arg2, uint8_t arg3)

005d7590  {
005d75a5      uint32_t const i;
005d75a5      
005d75a5      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
005d75a5      {
005d75d2          i = arg2;
005d75d2          
005d75d4          if (arg2 < this->m_num)
005d75d4          {
005d75ef              do
005d75ef              {
005d75e0                  class RenderMeshFragmentTopology::TopEdgeType* m_data = this->m_data;
005d75e2                  int32_t var_8;
005d75e2                  m_data[i].m_TopVertexIndices = var_8;
005d75e5                  int32_t var_4;
005d75e5                  m_data[i].m_NeighbourTopTriangleIndices = var_4;
005d75ec                  i += 1;
005d75ef              } while (i < this->m_num);
005d75d4          }
005d75a5      }
005d75a5      else
005d75a5      {
005d75a7          int32_t eax_1;
005d75a7          eax_1 = arg3;
005d75ad          uint32_t const eax_2;
005d75ad          
005d75ad          if (eax_1 == 0)
005d75b6              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
005d75ad          else
005d75af              eax_2 = arg2;
005d75af          
005d75be          i = SmartArray<VertexRange,1>::grow(this, eax_2);
005d75be          
005d75c5          if (i == 0)
005d75cc              return i;
005d75a5      }
005d75a5      
005d75f2      this->m_num = arg2;
005d75f6      i = 1;
005d75fc      return 1;
005d7590  }

005d75ff                                                                                               90                                 .

005d7600  uint8_t __thiscall PFileNode::GetSubName(class PFileNode const* this, uint32_t arg2, uint32_t* arg3)

005d7600  {
005d7607      class PFileNode* eax_1 = this->vtable->GetSubNode(arg2);
005d7607      
005d760c      if (eax_1 != 0)
005d761f          return PFileNode::GetNameAsUInt32(eax_1, arg3);
005d761f      
005d760e      eax_1 = 0;
005d7610      return 0;
005d7600  }

005d7622        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005d7630  uint8_t __thiscall PFileNode::GetSubName(class PFileNode const* this, uint32_t arg2, float* arg3)

005d7630  {
005d7637      class PFileNode* eax_1 = this->vtable->GetSubNode(arg2);
005d7637      
005d763c      if (eax_1 != 0)
005d764f          return PFileNode::GetNameAsFloat(eax_1, arg3);
005d764f      
005d763e      eax_1 = 0;
005d7640      return 0;
005d7630  }

005d7652                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005d7660  void __thiscall SmartArray<LOAD_WEIGHTS,1>::Serialize(class SmartArray<LOAD_WEIGHTS,1>* this, class Archive* arg2)

005d7660  {
005d766a      uint32_t m_num = this->m_num;
005d7671      Archive::CheckAlignment(arg2, 4);
005d767a      uint8_t* eax = Archive::GetBytes(arg2, 4);
005d767f      int32_t i = 0;
005d767f      
005d7683      if (eax != 0)
005d7683      {
005d7689          if ((arg2->m_flags & 1) == 0)
005d768f              m_num = *(uint32_t*)eax;
005d7689          else
005d768b              *(uint32_t*)eax = m_num;
005d7683      }
005d7683      
005d7691      eax = arg2->m_flags;
005d7694      eax = !(eax);
005d7694      
005d7698      if ((eax & 1) != 0)
005d7698      {
005d76a3          if (m_num > Archive::GetSizeLeft(arg2))
005d76a3          {
005d76a7              Archive::RaiseError(arg2);
005d76b0              return;
005d76a3          }
005d76a3          
005d76b8          this->m_num = 0;
005d76bb          SmartArray<RenderMeshFragmentTopology::TopEdgeType,1>::SetNElements(this, m_num, 1);
005d7698      }
005d7698      
005d76c5      if (this->m_num > 0)
005d76c5      {
005d7721          do
005d7721          {
005d76ca              void* edi = &this->m_data[i];
005d76d1              Archive::CheckAlignment(arg2, 4);
005d76da              uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
005d76da              
005d76e1              if (eax_3 != 0)
005d76e1              {
005d76e7                  if ((arg2->m_flags & 1) == 0)
005d76f1                      *(uint32_t*)edi = *(uint32_t*)eax_3;
005d76e7                  else
005d76eb                      *(uint32_t*)eax_3 = *(uint32_t*)edi;
005d76e1              }
005d76e1              
005d76f7              Archive::CheckAlignment(arg2, 4);
005d7700              uint8_t* eax_5 = Archive::GetBytes(arg2, 4);
005d7700              
005d7707              if (eax_5 != 0)
005d7707              {
005d770d                  if ((arg2->m_flags & 1) == 0)
005d7718                      *(uint32_t*)((char*)edi + 4) = *(uint32_t*)eax_5;
005d770d                  else
005d7712                      *(uint32_t*)eax_5 = *(uint32_t*)((char*)edi + 4);
005d7707              }
005d7707              
005d771e              i += 1;
005d7721          } while (i < this->m_num);
005d76c5      }
005d7660  }

005d772a                                90 90 90 90 90 90                                                            ......

005d7730  void __thiscall VertexArray::Serialize(class VertexArray* this, class Archive* arg2)

005d7730  {
005d7731      class Archive* ebx = arg2;
005d773c      Archive::CheckAlignment(ebx, 4);
005d7745      uint8_t* eax = Archive::GetBytes(ebx, 4);
005d7745      
005d774c      if (eax != 0)
005d774c      {
005d7752          if ((ebx->m_flags & 1) == 0)
005d775d              this->vertexFormat.format = *(uint32_t*)eax;
005d7752          else
005d7757              *(uint32_t*)eax = this->vertexFormat.format;
005d774c      }
005d774c      
005d7764      Archive::CheckAlignment(ebx, 4);
005d776d      uint8_t* eax_1;
005d776d      uint32_t ecx_5;
005d776d      eax_1 = Archive::GetBytes(ebx, 4);
005d776d      
005d7774      if (eax_1 != 0)
005d7774      {
005d777a          if ((ebx->m_flags & 1) == 0)
005d7785              this->numVertices = *(uint32_t*)eax_1;
005d777a          else
005d777f              *(uint32_t*)eax_1 = this->numVertices;
005d7774      }
005d7774      
005d7788      eax_1 = ebx->m_flags;
005d778b      eax_1 = !(eax_1);
005d778f      uint8_t* vertices;
005d778f      
005d778f      if ((eax_1 & 1) == 0)
005d77f4          vertices = this->vertices;
005d778f      else
005d778f      {
005d7799          if (this->vertices == 0)
005d779b              this->m_bStripHWExtraTexCoords = 1;
005d779b          
005d77a2          uint32_t format = this->vertexFormat.format;
005d77aa          ecx_5 = 1;
005d77ac          arg2 = 1;
005d77ac          
005d77b0          if ((format & 0xff0000) != 0)
005d77b0          {
005d77b2              ecx_5 = 0;
005d77b4              arg2 = 0;
005d77b0          }
005d77b0          
005d77bd          ecx_5 = ecx_5 != 0;
005d77cf          char eax_4 = this->vtable->Startup(this->numVertices, format, arg2, ecx_5, 0xffffffff);
005d77cf          
005d77d4          if (eax_4 != 0)
005d77e1              vertices = this->vtable->Lock(0, this->numVertices);
005d77e1          
005d77e6          if ((eax_4 == 0 || vertices == 0))
005d77e6          {
005d77ea              Archive::RaiseError(ebx);
005d77f1              return;
005d77e6          }
005d778f      }
005d778f      
005d7804      Serializer::SerializeBytes(vertices, (this->vertexFormat.size * this->numVertices), ebx);
005d7804      
005d7814      if ((!(ebx->m_flags) & 1) != 0)
005d7816          this->vtable->Unlock(0, 0);
005d7816      
005d7827      class BBox* edi = &this->m_BoundingBox;
005d782d      Archive::CheckAlignment(ebx, 0x18);
005d7836      uint8_t* eax_7 = Archive::GetBytes(ebx, 0x18);
005d7836      
005d783d      if (eax_7 != 0)
005d783d      {
005d7849          uint8_t* esi_1;
005d7849          
005d7849          if ((ebx->m_flags & 1) == 0)
005d7851              esi_1 = eax_7;
005d7849          else
005d7849          {
005d784b              esi_1 = edi;
005d784d              edi = eax_7;
005d7849          }
005d7849          
005d7853          __builtin_memcpy(edi, esi_1, 0x18);
005d783d      }
005d783d      
005d785d      SmartArray<unsigned long,1>::Serialize(&this->m_InfluencedBoneIndexArray, ebx);
005d7730  }

005d7868                          90 90 90 90 90 90 90 90                                                          ........

005d7870  uint8_t LoadArbitraryVertex(class PFileNode const* arg1, class VertexFormatInfo const* arg2, uint8_t* arg3)

005d7870  {
005d7881      if (arg1 != 0)
005d7881      {
005d7883          class PStringBase<char> var_84 = 0x8f001c;
005d7891          class PStringBase<char> var_74;
005d7891          
005d7891          if (PFileNode::IsKeyword(arg1, var_84) != 0)
005d7891          {
005d7905              var_84 = arg1;
005d790a              void var_64;
005d790a              PFileNodeIter::PFileNodeIter(&var_64, var_84);
005d790a              
005d791c              for (class PFileNode* i = PFileNodeIter::Curr(&var_64); i != 0; i = PFileNodeIter::Next(&var_64))
005d791c              {
005d7922                  var_84 = 0x8f0024;
005d7930                  class PFileNode* i_1;
005d7930                  class PStringBase<char> ecx_10;
005d7930                  
005d7930                  if (PFileNode::IsKeyword(i, var_84) == 0)
005d7930                  {
005d796f                      var_84 = 0x8f0028;
005d796f                      
005d797d                      if (PFileNode::IsKeyword(i, var_84) == 0)
005d797d                      {
005d79bc                          var_84 = 0x8f0038;
005d79bc                          
005d79ca                          if (PFileNode::IsKeyword(i, var_84) == 0)
005d79ca                          {
005d7a00                              var_84 = 0x8f003c;
005d7a00                              
005d7a0e                              if (PFileNode::IsKeyword(i, var_84) == 0)
005d7a0e                              {
005d7a44                                  var_84 = 0x8f002c;
005d7a44                                  
005d7a52                                  if (PFileNode::IsKeyword(i, var_84) == 0)
005d7a52                                  {
005d7a91                                      var_84 = 0x8f0030;
005d7a91                                      
005d7a9f                                      if (PFileNode::IsKeyword(i, var_84) == 0)
005d7a9f                                      {
005d7ade                                          var_84 = 0x8f0034;
005d7aee                                          char* var_88_10;
005d7aee                                          class PStringBase<char>* ecx_51;
005d7aee                                          class PFileNode* i_2;
005d7aee                                          
005d7aee                                          if (PFileNode::IsKeyword(i, var_84) == 0)
005d7aee                                          {
005d7b83                                              var_84 = 0x8f0044;
005d7b83                                              
005d7b8f                                              if (PFileNode::IsKeyword(i, var_84) != 0)
005d7b8f                                              {
005d7b97                                                  uint32_t eax_41 = PFileNode::GetNumSubNodes(i);
005d7b97                                                  
005d7ba2                                                  if (arg2->numMatrices != eax_41)
005d7ba2                                                      goto label_5d7c9f;
005d7ba2                                                  
005d7baa                                                  class PStringBase<char> ebx_2 = 0;
005d7baa                                                  
005d7bb3                                                  if (PFileNode::GetNumSubNodes(i) > 0)
005d7bb3                                                  {
005d7bb5                                                      while (true)
005d7bb5                                                      {
005d7bb5                                                          struct PFileNode::VTable* vtable_1 = i->vtable;
005d7bb7                                                          var_84 = ebx_2;
005d7bbd                                                          i_2 = vtable_1->GetSubNode(var_84);
005d7bbd                                                          
005d7bc1                                                          if (i_2 == 0)
005d7bc1                                                              goto label_5d7c9f;
005d7bc1                                                          
005d7bd1                                                          if (PFileNode::GetNumSubNodes(i_2) != 2)
005d7bd1                                                          {
005d7c71                                                              var_84 = i_2;
005d7c72                                                              ecx_51 = &var_84;
005d7c74                                                              var_88_10 = "invalid vertex weight";
005d7c79                                                              break;
005d7bd1                                                          }
005d7bd1                                                          
005d7bdb                                                          int32_t var_70;
005d7bdb                                                          var_84 = &var_70;
005d7be0                                                          var_74 = 0;
005d7be8                                                          uint8_t eax_45;
005d7be8                                                          class PStringBase<char> ecx_43;
005d7be8                                                          eax_45 = PFileNode::GetSubName(i_2, 0, var_84);
005d7be8                                                          
005d7bef                                                          if (eax_45 == 0)
005d7bef                                                          {
005d7c7b                                                              var_84 = ecx_43;
005d7c7c                                                              ecx_51 = &var_84;
005d7c7e                                                              var_88_10 = "unable to read matrix index";
005d7c83                                                              break;
005d7bef                                                          }
005d7bef                                                          
005d7bf9                                                          var_84 = &var_74;
005d7bfe                                                          uint8_t eax_46;
005d7bfe                                                          class PStringBase<char> ecx_45;
005d7bfe                                                          eax_46 = PFileNode::GetSubName(i_2, 1, var_84);
005d7bfe                                                          
005d7c05                                                          if (eax_46 == 0)
005d7c05                                                          {
005d7c85                                                              var_84 = ecx_45;
005d7c86                                                              ecx_51 = &var_84;
005d7c88                                                              var_88_10 = "unable to read vertex weight";
005d7c88                                                              break;
005d7c05                                                          }
005d7c05                                                          
005d7c0b                                                          char eax_47 = ((int8_t)var_70);
005d7c12                                                          var_84 = var_74;
005d7c12                                                          
005d7c24                                                          if (SetMatrixWeight(arg3, arg2, ebx_2, eax_47, var_84) == 0)
005d7c24                                                              goto label_5d7c9f;
005d7c24                                                          
005d7c28                                                          ebx_2 += 1;
005d7c28                                                          
005d7c30                                                          if (ebx_2 >= PFileNode::GetNumSubNodes(i))
005d7c30                                                              goto label_5d7c3b;
005d7bb5                                                      }
005d7bb5                                                      
005d7c8d                                                  label_5d7c8d:
005d7c8d                                                      PStringBase<char>::PStringBase<char>(ecx_51, var_88_10);
005d7c92                                                      i_1 = i_2;
005d7c92                                                      goto label_5d7c93;
005d7bb3                                                  }
005d7b8f                                              }
005d7aee                                          }
005d7aee                                          else
005d7aee                                          {
005d7af4                                              uint32_t eax_34 = PFileNode::GetNumSubNodes(i);
005d7af4                                              
005d7aff                                              if (arg2->numTCPairs != eax_34)
005d7aff                                                  goto label_5d7c9f;
005d7aff                                              
005d7b07                                              class PStringBase<char> ebx_1 = 0;
005d7b07                                              
005d7b10                                              if (PFileNode::GetNumSubNodes(i) > 0)
005d7b10                                              {
005d7b16                                                  while (true)
005d7b16                                                  {
005d7b16                                                      struct PFileNode::VTable* vtable = i->vtable;
005d7b18                                                      var_84 = ebx_1;
005d7b1e                                                      i_2 = vtable->GetSubNode(var_84);
005d7b1e                                                      
005d7b22                                                      if (i_2 == 0)
005d7b22                                                          goto label_5d7c9f;
005d7b22                                                      
005d7b32                                                      if (PFileNode::GetNumSubNodes(i_2) != 2)
005d7b32                                                      {
005d7c67                                                          var_84 = i_2;
005d7c68                                                          ecx_51 = &var_84;
005d7c6a                                                          var_88_10 = "invalid uv pair";
005d7c6f                                                          break;
005d7b32                                                      }
005d7b32                                                      
005d7b3c                                                      void var_6c;
005d7b3c                                                      var_84 = &var_6c;
005d7b41                                                      PFileNode::GetSubName(i_2, 0, var_84);
005d7b4a                                                      void var_68;
005d7b4a                                                      var_84 = &var_68;
005d7b4f                                                      PFileNode::GetSubName(i_2, 1, var_84);
005d7b5e                                                      var_84 = &var_6c;
005d7b5e                                                      
005d7b6c                                                      if (SetTCPair(arg3, arg2, ebx_1, var_84) == 0)
005d7b6c                                                          goto label_5d7c9f;
005d7b6c                                                      
005d7b74                                                      ebx_1 += 1;
005d7b74                                                      
005d7b7c                                                      if (ebx_1 >= PFileNode::GetNumSubNodes(i))
005d7b7c                                                          goto label_5d7c3b;
005d7b16                                                  }
005d7b16                                                  
005d7b22                                                  goto label_5d7c8d;
005d7b10                                              }
005d7aee                                          }
005d7a9f                                      }
005d7a9f                                      else
005d7a9f                                      {
005d7aa1                                          var_84 = 1;
005d7aaa                                          void var_18;
005d7aaa                                          uint8_t eax_29;
005d7aaa                                          eax_29 = RGBAColor::FromFileNode(&var_18, i, 1, var_84.m_charbuffer);
005d7aaa                                          
005d7ab1                                          if (eax_29 == 0)
005d7ab1                                              goto label_5d7c57;
005d7ab1                                          
005d7ac3                                          var_84 = RGBAColor::GetColor32(&var_18);
005d7ac3                                          
005d7ad3                                          if (SetSpecular(arg3, arg2, var_84) == 0)
005d7ad3                                              goto label_5d7c9f;
005d7a9f                                      }
005d7a52                                  }
005d7a52                                  else
005d7a52                                  {
005d7a54                                      var_84 = 1;
005d7a5d                                      void var_28;
005d7a5d                                      uint8_t eax_25;
005d7a5d                                      eax_25 = RGBAColor::FromFileNode(&var_28, i, 1, var_84.m_charbuffer);
005d7a5d                                      
005d7a64                                      if (eax_25 == 0)
005d7a64                                          goto label_5d7c57;
005d7a64                                      
005d7a79                                      var_84 = RGBAColor::GetColor32(&var_28);
005d7a79                                      
005d7a86                                      if (SetDiffuse(arg3, arg2, var_84) == 0)
005d7a86                                          goto label_5d7c9f;
005d7a52                                  }
005d7a0e                              }
005d7a0e                              else
005d7a0e                              {
005d7a10                                  var_84 = i;
005d7a15                                  void var_34;
005d7a15                                  uint8_t eax_21;
005d7a15                                  eax_21 = Vector3::FromFileNode(&var_34, var_84);
005d7a15                                  
005d7a1c                                  if (eax_21 == 0)
005d7a1c                                      goto label_5d7c57;
005d7a1c                                  
005d7a2c                                  var_84 = &var_34;
005d7a2c                                  
005d7a39                                  if (SetVectorT(arg3, arg2, var_84) == 0)
005d7a39                                      goto label_5d7c9f;
005d7a0e                              }
005d79ca                          }
005d79ca                          else
005d79ca                          {
005d79cc                              var_84 = i;
005d79d1                              void var_40;
005d79d1                              uint8_t eax_17;
005d79d1                              eax_17 = Vector3::FromFileNode(&var_40, var_84);
005d79d1                              
005d79d8                              if (eax_17 == 0)
005d79d8                                  goto label_5d7c57;
005d79d8                              
005d79e8                              var_84 = &var_40;
005d79e8                              
005d79f5                              if (SetVectorS(arg3, arg2, var_84) == 0)
005d79f5                                  goto label_5d7c9f;
005d79ca                          }
005d797d                      }
005d797d                      else
005d797d                      {
005d797f                          var_84 = i;
005d7984                          int32_t var_4c;
005d7984                          uint8_t eax_12;
005d7984                          eax_12 = Vector3::FromFileNode(&var_4c, var_84);
005d7984                          
005d798b                          if (eax_12 == 0)
005d798b                              goto label_5d7c57;
005d798b                          
005d7997                          if ((arg2->format & 0x10) == 0)
005d7997                              goto label_5d7c9f;
005d7997                          
005d79a0                          void* edx_6 = &arg3[arg2->offsetNormal];
005d79a7                          *(uint32_t*)edx_6 = var_4c;
005d79ad                          int32_t var_48;
005d79ad                          *(uint32_t*)((char*)edx_6 + 4) = var_48;
005d79b4                          int32_t var_44;
005d79b4                          *(uint32_t*)((char*)edx_6 + 8) = var_44;
005d797d                      }
005d7930                  }
005d7930                  else
005d7930                  {
005d7932                      var_84 = i;
005d7937                      int32_t var_58;
005d7937                      uint8_t eax_7;
005d7937                      eax_7 = Vector3::FromFileNode(&var_58, var_84);
005d7937                      
005d793e                      if (eax_7 == 0)
005d793e                      {
005d7c57                      label_5d7c57:
005d7c57                          var_84 = ecx_10;
005d7c5f                          PStringBase<char>::PStringBase<char>(&var_84, "invalid vertex");
005d7c64                          i_1 = i;
005d7c93                      label_5d7c93:
005d7c93                          PFileNode::ReportError(i_1, var_84);
005d7c9f                      label_5d7c9f:
005d7c9f                          PFileNodeIter::~PFileNodeIter(&var_64);
005d7ca6                          int32_t eax_52;
005d7ca6                          eax_52 = 0;
005d7cac                          return 0;
005d793e                      }
005d793e                      
005d794a                      if ((arg2->format & 2) == 0)
005d794a                          goto label_5d7c9f;
005d794a                      
005d7953                      void* eax_10 = &arg3[arg2->offsetOrigin];
005d795a                      *(uint32_t*)eax_10 = var_58;
005d7960                      int32_t var_54;
005d7960                      *(uint32_t*)((char*)eax_10 + 4) = var_54;
005d7967                      int32_t var_50;
005d7967                      *(uint32_t*)((char*)eax_10 + 8) = var_50;
005d7930                  }
005d7c3b              label_5d7c3b:
005d791c              }
005d791c              
005d7c49              PFileNodeIter::~PFileNodeIter(&var_64);
005d7c4e              int32_t eax_51;
005d7c4e              eax_51 = 1;
005d7c56              return 1;
005d7891          }
005d7891          
005d7893          var_84 = "expected ";
005d789c          PStringBase<char>::PStringBase<char>(&var_74, var_84);
005d78a1          class PSRefBufferCharData<char>* m_charbuffer = Vertex.m_charbuffer;
005d78a7          int32_t eax_2 = m_charbuffer->m_data[-4];
005d78a7          
005d78ad          if (eax_2 != 1)
005d78ad          {
005d78b0              var_84 = (eax_2 - 1);
005d78b6              m_charbuffer = PStringBase<char>::append_n_chars(&var_74, m_charbuffer, var_84);
005d78ad          }
005d78ad          
005d78bb          var_84 = m_charbuffer;
005d78c2          var_84 = var_74;
005d78cc          InterlockedIncrement((var_74 - 0x10));
005d78d3          PFileNode::ReportError(arg1, var_84);
005d78dc          int32_t* esi_2 = (var_74 - 0x14);
005d78e5          var_84 = &esi_2[1];
005d78e5          
005d78f2          if ((InterlockedDecrement(var_84) == 0 && esi_2 != 0))
005d78f2          {
005d78f4              int32_t edx_3 = *(uint32_t*)esi_2;
005d78f6              var_84 = 1;
005d78fa              *(uint32_t*)edx_3(var_84);
005d78f2          }
005d7881      }
005d7881      
005d78fc      int32_t eax;
005d78fc      eax = 0;
005d7904      return 0;
005d7870  }

005d7cad                                         90 90 90                                                               ...

005d7cb0  uint8_t StreamArbitraryVertex(class Archive* arg1, class VertexFormatInfo const* arg2, uint8_t* arg3, uint32_t const arg4)

005d7cb0  {
005d7cb3      float x_1 = Vector3_ZeroVector__.x;
005d7cb8      float y_1 = Vector3_ZeroVector__.y;
005d7cbe      float z_1 = Vector3_ZeroVector__.z;
005d7ccb      float x_3 = x_1;
005d7ccf      float x = x_1;
005d7cd9      int32_t var_50 = 0xffffffff;
005d7cdd      int32_t var_4c = 0xffffffff;
005d7ce1      float x_2 = Vector3_ZeroVector__.x;
005d7ce6      float y_2 = y_1;
005d7cfa      float z_2 = z_1;
005d7d02      void* s;
005d7d02      __builtin_memset(&s, 0, 0x18);
005d7d1a      float x_4 = x_2;
005d7d22      float x_5 = x_2;
005d7d2a      Archive::CheckAlignment(arg1, 4);
005d7d33      uint8_t* eax = Archive::GetBytes(arg1, 4);
005d7d33      
005d7d40      if ((eax != 0 && (arg1->m_flags & 1) != 0))
005d7d42          *(uint32_t*)eax = 0;
005d7d42      
005d7d48      Archive::CheckAlignment(arg1, 0xc);
005d7d51      uint8_t* eax_1 = Archive::GetBytes(arg1, 0xc);
005d7d51      
005d7d58      if (eax_1 != 0)
005d7d58      {
005d7d5e          if ((arg1->m_flags & 1) == 0)
005d7d5e          {
005d7d7b              x_3 = *(uint32_t*)eax_1;
005d7d82              y_2 = *(uint32_t*)(eax_1 + 4);
005d7d86              z_2 = *(uint32_t*)(eax_1 + 8);
005d7d5e          }
005d7d5e          else
005d7d5e          {
005d7d68              *(uint32_t*)eax_1 = x_3;
005d7d6e              *(uint32_t*)(eax_1 + 4) = y_2;
005d7d71              *(uint32_t*)(eax_1 + 8) = z_2;
005d7d5e          }
005d7d58      }
005d7d58      
005d7d8e      Archive::CheckAlignment(arg1, 0xc);
005d7d97      uint8_t* eax_2 = Archive::GetBytes(arg1, 0xc);
005d7d9e      float x_6;
005d7d9e      float z_4;
005d7d9e      float y_3;
005d7d9e      
005d7d9e      if (eax_2 == 0)
005d7d9e      {
005d7dc6          y_3 = y_1;
005d7dca          z_4 = z_1;
005d7dce          x_6 = x;
005d7d9e      }
005d7d9e      else if ((arg1->m_flags & 1) == 0)
005d7da4      {
005d7dbc          x_6 = *(uint32_t*)eax_2;
005d7dbe          y_3 = *(uint32_t*)(eax_2 + 4);
005d7dc1          z_4 = *(uint32_t*)(eax_2 + 8);
005d7da4      }
005d7da4      else
005d7da4      {
005d7da6          x_6 = x;
005d7daa          y_3 = y_1;
005d7dae          z_4 = z_1;
005d7db2          *(uint32_t*)eax_2 = x_6;
005d7db4          *(uint32_t*)(eax_2 + 4) = y_3;
005d7db7          *(uint32_t*)(eax_2 + 8) = z_4;
005d7da4      }
005d7da4      
005d7dd6      Archive::CheckAlignment(arg1, 4);
005d7ddf      uint8_t* eax_3 = Archive::GetBytes(arg1, 4);
005d7ddf      
005d7de6      if (eax_3 != 0)
005d7de6      {
005d7dec          if ((arg1->m_flags & 1) == 0)
005d7df8              var_50 = *(uint32_t*)eax_3;
005d7dec          else
005d7dee              *(uint32_t*)eax_3 = 0xffffffff;
005d7de6      }
005d7de6      
005d7e00      Archive::CheckAlignment(arg1, 4);
005d7e09      uint8_t* eax_5 = Archive::GetBytes(arg1, 4);
005d7e09      
005d7e10      if (eax_5 != 0)
005d7e10      {
005d7e16          if ((arg1->m_flags & 1) == 0)
005d7e22              var_4c = *(uint32_t*)eax_5;
005d7e16          else
005d7e18              *(uint32_t*)eax_5 = 0xffffffff;
005d7e10      }
005d7e10      
005d7e31      float z = Vector3_ZeroVector__.z;
005d7e37      float y = Vector3_ZeroVector__.y;
005d7e40      x = Vector3_ZeroVector__.x;
005d7e44      float z_3 = z;
005d7e44      
005d7e48      if (arg4 >= 1)
005d7e48      {
005d7e50          Serializer::SerializeObject(&x_4, arg1);
005d7e5b          Serializer::SerializeObject(&x_5, arg1);
005d7e66          Serializer::SerializeObject(&x, arg1);
005d7e48      }
005d7e48      
005d7e73      SmartArray<LOAD_WEIGHTS,1>::Serialize(&s, arg1);
005d7e7d      void* var_3c;
005d7e7d      SmartArray<LOAD_WEIGHTS,1>::Serialize(&var_3c, arg1);
005d7e86      Archive::CheckAlignment(arg1, 4);
005d7e8f      float eax_7 = Archive::GetBytes(arg1, 4);
005d7e8f      
005d7e9c      if ((eax_7 != 0 && (arg1->m_flags & 1) != 0))
005d7e9e          *(uint32_t*)eax_7 = 0;
005d7e9e      
005d7ea4      int32_t* ecx_18 = arg2;
005d7ea4      
005d7eaf      if ((*(uint8_t*)ecx_18 & 2) != 0)
005d7eaf      {
005d7eb8          float* edx_5 = &arg3[ecx_18[7]];
005d7eba          *(uint32_t*)edx_5 = x_3;
005d7ec0          edx_5[1] = y_2;
005d7ec7          edx_5[2] = z_2;
005d7eaf      }
005d7eaf      
005d7ecd      if ((*(uint8_t*)ecx_18 & 0x10) != 0)
005d7ecd      {
005d7ed2          void* edx_7 = &arg3[ecx_18[0xd]];
005d7ed4          *(uint32_t*)edx_7 = x_6;
005d7ed6          *(uint32_t*)((char*)edx_7 + 4) = y_3;
005d7ed9          *(uint32_t*)((char*)edx_7 + 8) = z_4;
005d7ecd      }
005d7ecd      
005d7edf      if ((*(uint8_t*)ecx_18 & 0x40) != 0)
005d7ee8          *(uint32_t*)(arg3 + ecx_18[0xf]) = var_50;
005d7ee8      
005d7eee      if (*(uint8_t*)ecx_18 < 0)
005d7ef7          *(uint32_t*)(arg3 + ecx_18[0x10]) = var_4c;
005d7ef7      
005d7f01      void* var_64_8;
005d7f01      int32_t var_44;
005d7f01      int32_t var_40;
005d7f01      int32_t var_38;
005d7f01      
005d7f01      if (ecx_18[5] != var_40)
005d7f01      {
005d80c1          if ((var_38 & 0x80000000) != 0x80000000)
005d80c1              goto label_5d80da;
005d80c1          
005d80c7          var_64_8 = var_3c;
005d80c8      label_5d80c8:
005d80c8          operator delete[](var_64_8);
005d80da      label_5d80da:
005d80da          
005d80e0          if ((var_44 & 0x80000000) != 0x80000000)
005d80e0              goto label_5d80f2;
005d80e0          
005d80e7          operator delete[](s);
005d80f2      label_5d80f2:
005d80f2          eax_7 = 0;
005d80f8          return 0;
005d7f01      }
005d7f01      
005d7f07      int32_t eax_10 = 0;
005d7f07      
005d7f0b      if (var_40 > 0)
005d7f0b      {
005d7f0d          void* edi = &ecx_18[0x11];
005d7f0d          
005d7f38          do
005d7f38          {
005d7f17              int32_t* edx_12 = ((char*)s + (eax_10 << 3));
005d7f17              
005d7f1a              if (eax_10 >= ecx_18[5])
005d7f1a              {
005d801c                  if ((var_38 & 0x80000000) == 0x80000000)
005d8023                      operator delete[](var_3c);
005d8023                  
005d803b                  if ((var_44 & 0x80000000) != 0x80000000)
005d803b                      goto label_5d80f2;
005d803b                  
005d8046                  operator delete[](s);
005d8051                  int32_t eax_23;
005d8051                  eax_23 = 0;
005d8057                  return 0;
005d7f1a              }
005d7f1a              
005d7f22              x_6 = *(uint32_t*)edi;
005d7f24              *(uint32_t*)(x_6 + arg3) = *(uint32_t*)edx_12;
005d7f2a              *(uint32_t*)((x_6 + arg3) + 4) = edx_12[1];
005d7f32              eax_10 += 1;
005d7f33              edi += 4;
005d7f38          } while (eax_10 < var_40);
005d7f0b      }
005d7f0b      
005d7f40      if ((*(uint32_t*)ecx_18 & 0x10000000) != 0)
005d7f40      {
005d7f49          float* edx_16 = &arg3[ecx_18[0x19]];
005d7f4b          *(uint32_t*)edx_16 = x_4;
005d7f51          edx_16[1] = y_1;
005d7f58          edx_16[2] = z_1;
005d7f40      }
005d7f40      
005d7f61      if ((*(uint32_t*)ecx_18 & 0x20000000) != 0)
005d7f61      {
005d7f6a          void* edx_18 = &arg3[ecx_18[0x1a]];
005d7f6c          *(uint32_t*)edx_18 = x_5;
005d7f72          *(uint32_t*)((char*)edx_18 + 4) = y_1;
005d7f79          *(uint32_t*)((char*)edx_18 + 8) = z_1;
005d7f61      }
005d7f61      
005d7f83      int32_t var_34;
005d7f83      
005d7f83      if (ecx_18[6] != var_34)
005d7f83      {
005d807b          if ((var_38 & 0x80000000) == 0x80000000)
005d8082              operator delete[](var_3c);
005d8082          
005d8098          if ((var_44 & 0x80000000) != 0x80000000)
005d8098              goto label_5d80f2;
005d8098          
005d809f          operator delete[](s);
005d80aa          int32_t eax_26;
005d80aa          eax_26 = 0;
005d80b0          return 0;
005d7f83      }
005d7f83      
005d7f89      int32_t eax_17 = 0;
005d7f89      
005d7f8d      if (var_34 <= 0)
005d7f8d      {
005d7fd1      label_5d7fd1:
005d7fd1          
005d7fd6          if ((var_38 & 0x80000000) == 0x80000000)
005d7fdd              operator delete[](var_3c);
005d7fdd          
005d7ff5          if ((var_44 & 0x80000000) == 0x80000000)
005d7ffc              operator delete[](s);
005d7ffc          
005d8007          int32_t eax_19;
005d8007          eax_19 = 1;
005d800d          return 1;
005d7f8d      }
005d7f8d      
005d7f90      void* edi_1;
005d7f90      
005d7f90      while (true)
005d7f90      {
005d7f90          edi_1 = var_3c;
005d7f9d          arg4 = ((float)((long double)*(uint32_t*)(((char*)edi_1 + (eax_17 << 3)) + 4)));
005d7f9d          
005d7fa1          if (eax_17 >= ecx_18[6])
005d7fa1              break;
005d7fa1          
005d7faa          x_6 = *(uint8_t*)((char*)edi_1 + (eax_17 << 3));
005d7fb3          *(uint8_t*)((ecx_18[0x1b] + eax_17) + arg3) = x_6;
005d7fbc          *(uint32_t*)((ecx_18[0x1c] + (eax_17 << 2)) + arg3) = arg4;
005d7fc3          eax_17 += 1;
005d7fc3          
005d7fc6          if (eax_17 >= var_34)
005d7fc6              goto label_5d7fd1;
005d7f90      }
005d7f90      
005d8066      if ((var_38 & 0x80000000) != 0x80000000)
005d8066          goto label_5d80da;
005d8066      
005d8068      var_64_8 = edi_1;
005d8069      goto label_5d80c8;
005d7cb0  }

005d80f9                                                                             90 90 90 90 90 90 90                           .......

005d8100  uint8_t __thiscall VertexArray::FromFileNode(class VertexArray* this, class PFileNode const* arg2)

005d8100  {
005d8115      if (arg2 != 0)
005d8115      {
005d811b          class PStringBase<char>* numVertices = &BinaryVertexArray;
005d8122          char var_95_1 = 1;
005d8122          
005d812e          if (PFileNode::IsKeyword(arg2, numVertices) != 0)
005d8130              var_95_1 = 0;
005d8130          
005d8135          struct PFileNode::VTable* vtable = arg2->vtable;
005d8137          numVertices = nullptr;
005d813b          class PStringBase<char> numVertices_1 = 0;
005d8143          class PFileNode* eax_2;
005d8143          class PStringBase<char>* numVertices_2;
005d8143          eax_2 = vtable->GetSubNode(numVertices);
005d8143          
005d814a          if (eax_2 == 0)
005d814a          {
005d8244          label_5d8244:
005d8244              numVertices = numVertices_2;
005d824c              PStringBase<char>::PStringBase<char>(&numVertices, "invalid vertex array");
005d8252              PFileNode::ReportError(arg2, numVertices);
005d825a              int32_t eax_12;
005d825a              eax_12 = 0;
005d8266              return 0;
005d814a          }
005d814a          
005d8150          numVertices = &VertexType;
005d8150          
005d815e          if (PFileNode::IsKeyword(eax_2, numVertices) != 0)
005d815e          {
005d81e4              struct PFileNode::VTable* vtable_1 = eax_2->vtable;
005d81e7              numVertices = nullptr;
005d81eb              class PFileNode* eax_8;
005d81eb              class PStringBase<char>* numVertices_3;
005d81eb              eax_8 = vtable_1->GetSubNode(numVertices);
005d81f0              uint8_t eax_9;
005d81f0              
005d81f0              if (eax_8 != 0)
005d81f0              {
005d81f6                  numVertices = &numVertices_1;
005d81f9                  eax_9 = PFileNode::GetNameAsUInt32(eax_8, numVertices);
005d81f0              }
005d81f0              
005d8200              if ((eax_8 == 0 || eax_9 == 0))
005d8200              {
005d8202                  numVertices = numVertices_3;
005d820a                  PStringBase<char>::PStringBase<char>(&numVertices, "invalid vertex type");
005d8210                  PFileNode::ReportError(eax_2, numVertices);
005d8218                  int32_t eax_10;
005d8218                  eax_10 = 0;
005d8224                  return 0;
005d8200              }
005d8200              
005d8227              class PStringBase<char> numVertices_8 = numVertices_1;
005d822b              struct PFileNode::VTable* vtable_3 = arg2->vtable;
005d822d              numVertices = 1;
005d8231              int32_t edi_1 = (numVertices_8 & 0xffffff3f);
005d8237              class PFileNode* eax_11;
005d8237              eax_11 = vtable_3->GetSubNode(numVertices);
005d823e              class PFileNode* var_94 = eax_11;
005d823e              
005d8242              if (eax_11 == 0)
005d8242                  goto label_5d8244;
005d8242              
005d8269              numVertices = &VertexData;
005d8269              
005d8277              if (PFileNode::IsKeyword(eax_11, numVertices) == 0)
005d8277              {
005d8279                  numVertices = "expected ";
005d8282                  PStringBase<char>::PStringBase<char>(&numVertices_1, numVertices);
005d8287                  numVertices = &VertexData;
005d8295                  numVertices = PStringBase<char>::operator+=(&numVertices_1, numVertices);
005d829d                  PStringBase<unsigned short>::PStringBase<unsigned short>(&numVertices, &numVertices_1);
005d82a3                  PFileNode::ReportError(eax_11, numVertices);
005d82af                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&numVertices_1);
005d82b4                  int32_t eax_14;
005d82b4                  eax_14 = 0;
005d82c0                  return 0;
005d8277              }
005d8277              
005d82c7              void var_84;
005d82c7              AutoStoreVersionArchive::AutoStoreVersionArchive(&var_84);
005d82c7              
005d82d2              if (var_95_1 == 0)
005d82d2              {
005d82e7                  void var_90;
005d82e7                  SmartBuffer::SmartBuffer(&var_90);
005d82ee                  class PFileNode* eax_17;
005d82ee                  class PStringBase<char>* numVertices_4;
005d82ee                  eax_17 = PFileNode::GetLeaf(eax_11);
005d82f5                  uint8_t eax_18;
005d82f5                  
005d82f5                  if (eax_17 != 0)
005d82f5                  {
005d82fb                      numVertices = &var_90;
005d82fe                      eax_18 = PFileNode::GetNameAsBinary(eax_17, numVertices);
005d82f5                  }
005d82f5                  
005d8305                  if ((eax_17 != 0 && eax_18 != 0))
005d8305                  {
005d8342                      numVertices = &var_90;
005d8347                      AutoStoreVersionArchive::InitForUnpacking(&var_84, numVertices);
005d8350                      numVertices = &var_84;
005d835a                      SB_As32Bit_Compressed::Serialize(&var_94, &this->numVertices, numVertices);
005d8366                      SmartBuffer::~SmartBuffer(&var_90);
005d8366                      goto label_5d836b;
005d8305                  }
005d8305                  
005d8307                  numVertices = numVertices_4;
005d830f                  PStringBase<char>::PStringBase<char>(&numVertices, "corrupt vertex data");
005d8315                  PFileNode::ReportError(eax_11, numVertices);
005d8321                  SmartBuffer::~SmartBuffer(&var_90);
005d82d2              }
005d82d2              else
005d82d2              {
005d82db                  this->numVertices = PFileNode::GetNumSubNodes(eax_11);
005d836b              label_5d836b:
005d836b                  numVertices = 1;
005d836f                  VertexArray::RequestStripHWExtraTexCoords(this, numVertices);
005d837a                  int32_t eax_20;
005d837a                  eax_20 = 1;
005d837c                  numVertices_1.m_charbuffer = 1;
005d837c                  
005d8380                  if ((edi_1 & 0xff0000) != 0)
005d8380                  {
005d8382                      eax_20 = 0;
005d8384                      numVertices_1.m_charbuffer = 0;
005d8380                  }
005d8380                  
005d8388                  class PStringBase<char> numVertices_7 = numVertices_1;
005d838c                  struct VertexArray::VTable* vtable_4 = this->vtable;
005d8390                  eax_20 = eax_20 != 0;
005d8393                  numVertices = 0xffffffff;
005d839e                  char eax_22;
005d839e                  class PStringBase<char>* numVertices_5;
005d839e                  eax_22 = vtable_4->Startup(this->numVertices, edi_1, numVertices_7, eax_20, numVertices);
005d839e                  
005d83a3                  if (eax_22 != 0)
005d83a3                  {
005d83c3                      struct VertexArray::VTable* vtable_5 = this->vtable;
005d83c5                      numVertices = this->numVertices;
005d83cd                      class PStringBase<char>* s = vtable_5->Lock(0, numVertices);
005d83cd                      
005d83d1                      if (s != 0)
005d83d1                      {
005d83da                          bool cond:3 = this->numVertices <= 0;
005d83dc                          class PFileNode* ebx;
005d83dc                          ebx = 1;
005d83de                          numVertices_1 = 0;
005d83de                          
005d83e6                          if (!(cond:3))
005d83e6                          {
005d845e                              bool cond:4_1;
005d845e                              
005d845e                              do
005d845e                              {
005d83f0                                  uint32_t size = this->vertexFormat.size;
005d8403                                  __builtin_memset(__builtin_memset(s, 0, ((size >> 2) << 2)), 0, (size & 3));
005d840b                                  uint8_t eax_30;
005d840b                                  class PStringBase<char>* numVertices_6;
005d840b                                  class PFileNode* edi_4;
005d840b                                  
005d840b                                  if (var_95_1 == 0)
005d840b                                  {
005d842d                                      numVertices = 1;
005d8439                                      eax_30 = StreamArbitraryVertex(&var_84, &this->vertexFormat, s, numVertices);
005d843e                                      edi_4 = var_94;
005d840b                                  }
005d840b                                  else
005d840b                                  {
005d840d                                      edi_4 = var_94;
005d8411                                      struct PFileNode::VTable* vtable_6 = edi_4->vtable;
005d8413                                      numVertices = s;
005d8423                                      eax_30 = LoadArbitraryVertex(vtable_6->GetSubNode(numVertices_1), &this->vertexFormat, numVertices);
005d840b                                  }
005d840b                                  
005d8445                                  ebx &= eax_30;
005d8445                                  
005d8449                                  if (ebx == 0)
005d8449                                  {
005d8462                                      numVertices = numVertices_6;
005d846a                                      PStringBase<char>::PStringBase<char>(&numVertices, "could not read vertex");
005d8470                                      PFileNode::ReportError(edi_4, numVertices);
005d8475                                      break;
005d8449                                  }
005d8449                                  
005d8455                                  s += this->vertexFormat.size;
005d8458                                  cond:4_1 = (numVertices_1 + 1) < this->numVertices;
005d845a                                  numVertices_1 += 1;
005d845e                              } while (cond:4_1);
005d83e6                          }
005d83e6                          
005d8478                          struct VertexArray::VTable* vtable_2 = this->vtable;
005d847a                          numVertices = 1;
005d8480                          vtable_2->Unlock(1, numVertices);
005d8487                          AutoStoreVersionArchive::OnSerializingDone(&var_84);
005d8490                          AutoStoreVersionArchive::~AutoStoreVersionArchive(&var_84);
005d84a1                          return ebx;
005d83d1                      }
005d83a3                  }
005d83a3                  else
005d83a3                  {
005d83a5                      numVertices = numVertices_5;
005d83ad                      PStringBase<char>::PStringBase<char>(&numVertices, "could not allocate vertex array");
005d83b3                      PFileNode::ReportError(eax_11, numVertices);
005d83a3                  }
005d82d2              }
005d82d2              
005d832a              AutoStoreVersionArchive::~AutoStoreVersionArchive(&var_84);
005d815e          }
005d815e          else
005d815e          {
005d8164              numVertices = "expected ";
005d816d              PStringBase<char>::PStringBase<char>(&numVertices_1, numVertices);
005d8172              class PSRefBufferCharData<char>* m_charbuffer = VertexType.m_charbuffer;
005d8178              int32_t eax_4 = m_charbuffer->m_data[-4];
005d8178              
005d817e              if (eax_4 != 1)
005d817e              {
005d8181                  numVertices = (eax_4 - 1);
005d8187                  m_charbuffer = PStringBase<char>::append_n_chars(&numVertices_1, m_charbuffer, numVertices);
005d817e              }
005d817e              
005d818c              numVertices = m_charbuffer;
005d8193              numVertices = numVertices_1;
005d819d              InterlockedIncrement((numVertices_1 - 0x10));
005d81a4              PFileNode::ReportError(eax_2, numVertices);
005d81ad              int32_t* esi_2 = (numVertices_1 - 0x14);
005d81b6              numVertices = &esi_2[1];
005d81b6              
005d81c7              if ((InterlockedDecrement(numVertices) == 0 && esi_2 != 0))
005d81c7              {
005d81cd                  int32_t edx_3 = *(uint32_t*)esi_2;
005d81cf                  numVertices = 1;
005d81d3                  *(uint32_t*)edx_3(numVertices);
005d81d5                  int32_t eax_7;
005d81d5                  eax_7 = 0;
005d81e1                  return 0;
005d81c7              }
005d815e          }
005d8115      }
005d8115      
005d832f      int32_t eax;
005d832f      eax = 0;
005d833b      return 0;
005d8100  }

005d84a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005d84b0  void __fastcall VertexArray::ComputeInfluencedBoneIndices(class VertexArray* this)

005d84b0  {
005d84ba      this->m_InfluencedBoneIndexArray.m_num = 0;
005d84ba      
005d84cd      if (this->vertexFormat.numMatrices > 0)
005d84cd      {
005d84d9          int32_t var_74_1 = 0x79bd74;
005d84e1          int32_t var_70;
005d84e1          IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>(&var_70, 0x17);
005d84e6          class VertexArray* this_1 = this;
005d84ea          uint32_t numVertices = this_1->numVertices;
005d84ee          int32_t var_7c_1 = (numVertices - 1);
005d84f2          void* var_10;
005d84f2          
005d84f2          if ((numVertices - 1) >= 0)
005d84f2          {
005d85fd              int32_t temp4_1;
005d85fd              
005d85fd              do
005d85fd              {
005d8503                  int32_t i = 0;
005d8503                  
005d8507                  if (this_1->vertexFormat.numMatrices > 0)
005d8507                  {
005d85f3                      do
005d85f3                      {
005d851e                          void* edx_3 = ((this_1->vertexFormat.size * var_7c_1) + this_1->vertices);
005d8523                          long double x87_r7_1 = ((long double)*(uint32_t*)(this_1->vertexFormat.offsetMWeights + edx_3));
005d8526                          long double temp5_1 = ((long double)0.000199999995f);
005d8526                          (x87_r7_1 - temp5_1);
005d852c                          uint32_t eax_4;
005d852c                          eax_4 = ((((x87_r7_1 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp5_1) ? 1 : 0) << 0xe) | 0))));
005d852c                          
005d8531                          if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) == 0)
005d8531                          {
005d853a                              uint32_t j = ((uint32_t)*(uint8_t*)(this_1->vertexFormat.offsetMatrices + edx_3));
005d8553                              int32_t var_8;
005d8553                              int32_t* eax_9 = *(uint32_t*)((char*)var_10 + ((COMBINE(0, j) % var_8) << 2));
005d8553                              
005d8557                              if (eax_9 == 0)
005d8557                              {
005d8580                              label_5d8580:
005d8580                                  int32_t eax_11 = (this_1->m_InfluencedBoneIndexArray.m_sizeAndDeallocate & 0x7fffffff);
005d8587                                  uint8_t eax_16;
005d8587                                  
005d8587                                  if (this_1->m_InfluencedBoneIndexArray.m_num >= eax_11)
005d8587                                  {
005d8589                                      uint32_t edx_6 = (eax_11 + 1);
005d8589                                      
005d858f                                      if (edx_6 <= 8)
005d8591                                          edx_6 = 8;
005d858f                                      else if (edx_6 <= 0x4000)
005d859e                                      {
005d85bd                                          int32_t eflags_1;
005d85bd                                          char eax_15;
005d85bd                                          eax_15 = __bsr_gprv_memv(edx_6);
005d85c9                                          int32_t edi_1 = (1 << eax_15);
005d85c9                                          
005d85cd                                          if (edx_6 > edi_1)
005d85cf                                              edx_6 = (edi_1 * 2);
005d859e                                      }
005d859e                                      else
005d859e                                      {
005d85a2                                          int32_t eax_13 = (edx_6 & 0x3fff);
005d85a2                                          
005d85a7                                          if (eax_13 != 0)
005d85b0                                              edx_6 += (0x4000 - eax_13);
005d859e                                      }
005d859e                                      
005d85d5                                      eax_16 = SmartArray<unsigned long,1>::grow(&this_1->m_InfluencedBoneIndexArray, edx_6);
005d8587                                  }
005d8587                                  
005d85dc                                  if ((this_1->m_InfluencedBoneIndexArray.m_num < eax_11 || eax_16 != 0))
005d85dc                                  {
005d8577                                      this_1->m_InfluencedBoneIndexArray.m_data[this_1->m_InfluencedBoneIndexArray.m_num] = j;
005d8577                                      this_1->m_InfluencedBoneIndexArray.m_num += 1;
005d85dc                                  }
005d85dc                                  
005d85e9                                  this_1 = this;
005d8557                              }
005d8557                              else
005d8557                              {
005d8562                                  while (*(uint32_t*)eax_9 != j)
005d8562                                  {
005d8564                                      eax_9 = eax_9[1];
005d8564                                      
005d8569                                      if (eax_9 == 0)
005d8569                                          goto label_5d8580;
005d8562                                  }
005d8562                                  
005d856f                                  if (eax_9 == 0)
005d856f                                      goto label_5d8580;
005d8557                              }
005d8531                          }
005d8531                          
005d85f0                          i += 1;
005d85f3                      } while (i < this_1->vertexFormat.numMatrices);
005d8507                  }
005d8507                  
005d85f9                  temp4_1 = var_7c_1;
005d85f9                  var_7c_1 -= 1;
005d85fd              } while ((temp4_1 - 1) >= 0);
005d84f2          }
005d84f2          
005d860b          int32_t var_74_2 = 0x79bd74;
005d8613          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_70);
005d8622          var_70 = 0x79bd6c;
005d862a          void var_6c;
005d862a          
005d862a          if (var_10 != &var_6c)
005d862d              operator delete[](var_10);
005d84cd      }
005d84b0  }

005d863c                                                                                      90 90 90 90                              ....

005d8640  void __thiscall VertexArray::Unlock(class VertexArray* this, uint8_t const arg2, uint8_t const arg3)

005d8640  {
005d8649      this->locked = 0;
005d8649      
005d8650      if (arg2 != 0)
005d8652          VertexArray::GenerateBoundingBox(this);
005d8652      
005d865d      if (arg3 != 0)
005d8661          VertexArray::ComputeInfluencedBoneIndices(this);
005d8640  }

005d866a                                90 90 90 90 90 90                                                            ......

005d8670  void __fastcall VertexFormatInfo::GenerateOffsets(class VertexFormatInfo* this)

005d8670  {
005d8671      uint32_t format = this->format;
005d8676      uint32_t esi = 0;
005d8678      int32_t eax_1 = (format & 0xe);
005d867e      this->bFVFCompatible = 1;
005d8682      this->numWeights = 0;
005d8682      
005d8685      if (eax_1 == 6)
005d8687          this->numWeights = 1;
005d8687      
005d8691      if (eax_1 == 8)
005d8693          this->numWeights = 2;
005d8693      
005d869d      if (eax_1 == 0xa)
005d869f          this->numWeights = 3;
005d869f      
005d86a9      if (eax_1 == 0xc)
005d86ab          this->numWeights = 4;
005d86ab      
005d86b5      if (eax_1 == 0xe)
005d86b7          this->numWeights = 5;
005d86b7      
005d86cc      this->numTCPairs = 0;
005d86cc      
005d86cf      switch ((format & 0xf00))
005d86cf      {
005d86c6          case 0x100:
005d86c6          {
005d86d1              this->numTCPairs = 1;
005d86c6              break;
005d86c6          }
005d86d8          case 0x200:
005d86d8          {
005d86e0              this->numTCPairs = 2;
005d86d8              break;
005d86d8          }
005d86e7          case 0x300:
005d86e7          {
005d86ef              this->numTCPairs = 3;
005d86e7              break;
005d86e7          }
005d86f6          case 0x400:
005d86f6          {
005d86fe              this->numTCPairs = 4;
005d86f6              break;
005d86f6          }
005d8705          case 0x500:
005d8705          {
005d870d              this->numTCPairs = 5;
005d8705              break;
005d8705          }
005d8714          case 0x600:
005d8714          {
005d871c              this->numTCPairs = 6;
005d8714              break;
005d8714          }
005d8723          case 0x700:
005d8723          {
005d872b              this->numTCPairs = 7;
005d8723              break;
005d8723          }
005d8732          case 0x800:
005d8732          {
005d873a              this->numTCPairs = 8;
005d8732              break;
005d8732          }
005d86cf      }
005d86cf      
005d8741      uint32_t edx_2 = ((uint32_t)*(uint8_t*)((char*)this->format)[2]);
005d8747      this->numMatrices = edx_2;
005d8747      
005d874a      if (edx_2 > 0)
005d874c          this->bFVFCompatible = 0;
005d874c      
005d8752      this->offsetOrigin = 0;
005d8752      
005d8759      if (eax_1 != 0)
005d875b          esi = 0xc;
005d875b      
005d8766      this->offsetWeight1 = (esi + 4);
005d876f      this->offsetWeight3 = (esi + 0xc);
005d8772      uint32_t numWeights = this->numWeights;
005d8775      this->offsetWeight2 = (esi + 8);
005d877b      uint32_t eax_4 = (esi + (numWeights << 2));
005d877e      this->offsetWeight0 = esi;
005d8781      this->offsetWeight4 = (esi + 0x10);
005d8784      this->offsetNormal = eax_4;
005d8784      
005d8787      if ((format & 0x10) != 0)
005d8789          eax_4 += 0xc;
005d8789      
005d878f      this->offsetPointSize = eax_4;
005d878f      
005d8792      if ((format & 0x20) != 0)
005d8794          eax_4 += 4;
005d8794      
005d879a      this->offsetDiffuse = eax_4;
005d879a      
005d879d      if ((format & 0x40) != 0)
005d879f          eax_4 += 4;
005d879f      
005d87a4      this->offsetSpecular = eax_4;
005d87a4      
005d87a7      if (format < 0)
005d87a9          eax_4 += 4;
005d87a9      
005d87af      int32_t i = 0;
005d87af      
005d87b3      if (this->numTCPairs > 0)
005d87b3      {
005d87b5          uint32_t* esi_2 = &this->offsetTCPair;
005d87b5          
005d87c6          do
005d87c6          {
005d87b8              *(uint32_t*)esi_2 = eax_4;
005d87bd              eax_4 += 8;
005d87c0              i += 1;
005d87c1              esi_2 = &esi_2[1];
005d87c6          } while (i < this->numTCPairs);
005d87b3      }
005d87b3      
005d87c8      uint32_t format_1 = this->format;
005d87d0      this->offsetVectorS = eax_4;
005d87d0      
005d87d3      if ((format_1 & 0x10000000) != 0)
005d87d3      {
005d87d5          eax_4 += 0xc;
005d87d8          this->bFVFCompatible = 0;
005d87d3      }
005d87d3      
005d87e2      this->offsetVectorT = eax_4;
005d87e2      
005d87e5      if ((format_1 & 0x20000000) != 0)
005d87e5      {
005d87e7          eax_4 += 0xc;
005d87ea          this->bFVFCompatible = 0;
005d87e5      }
005d87e5      
005d87ee      uint32_t numMatrices = this->numMatrices;
005d87f1      this->offsetMatrices = eax_4;
005d87f4      uint32_t eax_5 = (eax_4 + numMatrices);
005d87fc      this->offsetMWeights = eax_5;
005d87ff      uint32_t eax_6 = (eax_5 + (numMatrices << 2));
005d8802      this->size = eax_6;
005d8802      
005d8805      if ((format_1 & 0x1000000) != 0)
005d8805      {
005d880e          if (eax_6 < 0x20)
005d880e          {
005d8816              this->formatFVF = (format_1 & 0xce00ffff);
005d881a              this->size = 0x20;
005d8822              return;
005d880e          }
005d880e          
005d8826          if (eax_6 < 0x40)
005d8826          {
005d882e              this->formatFVF = (format_1 & 0xce00ffff);
005d8832              this->size = 0x40;
005d883a              return;
005d8826          }
005d8826          
005d883e          if (eax_6 < 0x60)
005d883e          {
005d8846              this->formatFVF = (format_1 & 0xce00ffff);
005d884a              this->size = 0x60;
005d8852              return;
005d883e          }
005d883e          
005d8858          if (eax_6 < 0x80)
005d8858          {
005d8860              this->formatFVF = (format_1 & 0xce00ffff);
005d8864              this->size = 0x80;
005d886c              return;
005d8858          }
005d8858          
005d8872          if (eax_6 < 0xa0)
005d8872          {
005d887a              this->formatFVF = (format_1 & 0xce00ffff);
005d887e              this->size = 0xa0;
005d8886              return;
005d8872          }
005d8872          
005d888c          if (eax_6 < 0xc0)
005d888c          {
005d8894              this->formatFVF = (format_1 & 0xce00ffff);
005d8898              this->size = 0xc0;
005d88a0              return;
005d888c          }
005d888c          
005d88a6          if (eax_6 < 0xe0)
005d88a6          {
005d88ae              this->formatFVF = (format_1 & 0xce00ffff);
005d88b2              this->size = 0xe0;
005d88ba              return;
005d88a6          }
005d88a6          
005d88c0          if (eax_6 < 0x100)
005d88c2              this->size = 0x100;
005d8805      }
005d8805      
005d88cf      this->formatFVF = (format_1 & 0xce00ffff);
005d8670  }

005d88d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005d88e0  void __fastcall ProfilerUI::RegisterInputMaps(class ProfilerUI* this)

005d88e0  {
005d88e1      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
005d88e1      
005d88ec      if (ICIDM::s_cidm_1 != 0)
005d88ec      {
005d88f0          struct IInputActionCallback::VTable** eax_1;
005d88f0          
005d88f0          if (this == 0)
005d88f7              eax_1 = nullptr;
005d88f0          else
005d88f2              eax_1 = &this->vtable;
005d88f2          
005d88f9          ICIDM::s_cidm_1->vtable->RegisterInputMap(0xc, eax_1, 0xfa0);
005d88f9          
005d8912          if (this->m_IsActive != 0)
005d8912          {
005d8914              ICIDM::s_cidm_1->vtable->RegisterInputMap(3, &this->vtable, 0xfa0);
005d8923              return;
005d8912          }
005d8912          
005d8924          ICIDM::s_cidm_1->vtable->UnregisterInputMap(3, &this->vtable);
005d88ec      }
005d88e0  }

005d892f                                               90                                                                 .

005d8930  void __thiscall ProfilerUI::UpdateBudgetStat(class ProfilerUI* this, uint32_t const arg2, uint32_t const arg3)

005d8930  {
005d8935      this->m_budgetStatArray.m_data[arg2].nValue = arg3;
005d8947      uint32_t m_nGraphicsQualityLevel = this->m_nGraphicsQualityLevel;
005d894a      struct BudgetStatItem* m_data = this->m_budgetStatArray.m_data;
005d8954      uint32_t edi_2 = *(uint32_t*)((char*)m_data + (((arg2 * 9) + m_nGraphicsQualityLevel) << 2));
005d8954      
005d8957      if (m_nGraphicsQualityLevel == 0)
005d8957      {
005d895a          m_data[arg2].nStatus = m_nGraphicsQualityLevel;
005d895f          return;
005d8957      }
005d8957      
005d8962      int32_t nValue = m_data[arg2].nValue;
005d8966      long double x87_r7 = ((long double)m_data[arg2].nValue);
005d8966      
005d896c      if (nValue < 0)
005d896e          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
005d896e      
005d8976      arg3 = ((float)x87_r7);
005d897e      long double x87_r7_1 = ((long double)edi_2);
005d897e      
005d8982      if (edi_2 < 0)
005d8984          x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
005d8984      
005d898a      arg2 = ((float)x87_r7_1);
005d898e      long double x87_r7_2 = (x87_r7_1 * ((long double)1.14999998f));
005d8994      long double temp1 = ((long double)arg3);
005d8994      (x87_r7_2 - temp1);
005d8998      uint32_t eax;
005d8998      eax = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
005d899a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005d899a      
005d899d      if (!(p))
005d899d      {
005d89a0          m_data[arg2].nStatus = 5;
005d89a9          return;
005d899d      }
005d899d      
005d89ae      if (nValue > edi_2)
005d89ae      {
005d89b1          m_data[arg2].nStatus = 4;
005d89ba          return;
005d89ae      }
005d89ae      
005d89c1      long double x87_r7_4 = (((long double)arg2) * ((long double)0.850000024f));
005d89c7      long double temp2 = ((long double)arg3);
005d89c7      (x87_r7_4 - temp2);
005d89cb      eax = ((((x87_r7_4 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2) ? 1 : 0) << 0xe) | 0))));
005d89cd      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005d89cd      
005d89d0      if (!(p_1))
005d89d0      {
005d89d3          m_data[arg2].nStatus = 3;
005d89dc          return;
005d89d0      }
005d89d0      
005d89e3      long double x87_r7_6 = (((long double)arg2) * ((long double)0.25f));
005d89e9      long double temp3 = ((long double)arg3);
005d89e9      (x87_r7_6 - temp3);
005d89ed      eax = ((((x87_r7_6 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp3) ? 1 : 0) << 0xe) | 0))));
005d89ef      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005d89ef      
005d89f2      if (!(p_2))
005d89f2      {
005d89f5          m_data[arg2].nStatus = 2;
005d89fe          return;
005d89f2      }
005d89f2      
005d8a02      m_data[arg2].nStatus = 1;
005d8930  }

005d8a0e                                            90 90                                                                ..

005d8a10  void __fastcall ProfilerUI::RepositionWindows(class ProfilerUI* this)

005d8a10  {
005d8a16      class ProfilerUI* this_1 = this;
005d8a1f      class ProfilerUI* this_2 = this_1;
005d8a23      uint32_t eax = RenderDevice::GetDisplayWidth(RenderDevice::render_device);
005d8a3d      int32_t ecx_3 = (RenderDevice::GetDisplayHeight(RenderDevice::render_device) - 6);
005d8a40      int32_t eax_2 = 0;
005d8a44      int32_t var_8 = ecx_3;
005d8a48      int32_t ebx = 0xaa;
005d8a4d      int32_t edi = 0x14;
005d8a52      int32_t var_c = 0;
005d8a52      
005d8a56      if (this_1->m_Windows.m_num > 0)
005d8a56      {
005d8a65          while (true)
005d8a65          {
005d8a65              void* eax_3 = this_1->m_Windows.m_data[eax_2];
005d8a68              class ProfilerUIWindow** edx_1;
005d8a68              edx_1 = *(uint8_t*)((char*)eax_3 + 4);
005d8a68              
005d8a6d              if (edx_1 != 0)
005d8a6d              {
005d8a6f                  class QuickWindow* esi = *(uint32_t*)((char*)eax_3 + 0xc);
005d8a6f                  
005d8a74                  if (esi != 0)
005d8a74                  {
005d8a7d                      if ((esi->m_Height + edi) > ecx_3)
005d8a7d                      {
005d8a7f                          ebx += 0x116;
005d8a85                          edi = 0x14;
005d8a7d                      }
005d8a7d                      
005d8a8d                      int32_t eax_6 = (esi->m_Width + ebx);
005d8a8d                      
005d8a92                      if (eax_6 <= (eax - 8))
005d8a92                      {
005d8aba                          QuickWindow::SetPosition(esi, ebx, edi);
005d8ac2                          edi = ((edi + esi->m_Height) + 6);
005d8a92                      }
005d8a92                      else if (ebx != 0xaa)
005d8a9a                      {
005d8aaa                          if (eax_6 > (eax - 8))
005d8aaa                          {
005d8aac                              ebx = 0xaa;
005d8ab1                              edi = 0x14;
005d8aaa                          }
005d8aaa                          
005d8aba                          QuickWindow::SetPosition(esi, ebx, edi);
005d8ac2                          edi = ((edi + esi->m_Height) + 6);
005d8a9a                      }
005d8a9a                      else
005d8aa1                          QuickWindow::SetPosition(esi, ebx, 0x14);
005d8a74                  }
005d8a6d              }
005d8a6d              
005d8aca              this_1 = this_2;
005d8ad1              eax_2 = (var_c + 1);
005d8ad4              var_c = eax_2;
005d8ad4              
005d8ad8              if (eax_2 >= this_1->m_Windows.m_num)
005d8ad8                  break;
005d8ad8              
005d8a5e              ecx_3 = var_8;
005d8a65          }
005d8a56      }
005d8a10  }

005d8ae2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005d8af0  uint8_t __thiscall ProfilerUI::InputLeftMouseCategoryButtonPressed(class ProfilerUI* this, int32_t const arg2, int32_t const arg3)

005d8af0  {
005d8af0      class ProfilerUI* this_1 = this;
005d8af8      uint32_t eax;
005d8af8      eax = 0;
005d8afa      int32_t i = 0;
005d8afe      *(uint8_t*)((char*)this_1)[3] = 0;
005d8afe      
005d8b02      if (this->m_CategoryButtons.m_num > 0)
005d8b02      {
005d8b2c          do
005d8b2c          {
005d8b1f              if (QuickButton::LeftMouseButtonPressed(this->m_CategoryButtons.m_data[i], arg2, arg3) != 0)
005d8b21                  *(uint8_t*)((char*)this_1)[3] = 1;
005d8b21              
005d8b29              i += 1;
005d8b2c          } while (i < this->m_CategoryButtons.m_num);
005d8b2c          
005d8b2e          eax = *(uint8_t*)((char*)this_1)[3];
005d8b02      }
005d8b02      
005d8b37      return eax;
005d8af0  }

005d8b3a                                                                                90 90 90 90 90 90                            ......

005d8b40  uint8_t __thiscall ProfilerUI::InputLeftMouseToolbarButtonPressed(class ProfilerUI* this, int32_t const arg2, int32_t const arg3)

005d8b40  {
005d8b40      class ProfilerUI* this_1 = this;
005d8b48      uint32_t eax;
005d8b48      eax = 0;
005d8b4a      int32_t i = 0;
005d8b4e      *(uint8_t*)((char*)this_1)[3] = 0;
005d8b4e      
005d8b52      if (this->m_ToolbarButtons.m_num > 0)
005d8b52      {
005d8b7c          do
005d8b7c          {
005d8b6f              if (QuickButton::LeftMouseButtonPressed(this->m_ToolbarButtons.m_data[i], arg2, arg3) != 0)
005d8b71                  *(uint8_t*)((char*)this_1)[3] = 1;
005d8b71              
005d8b79              i += 1;
005d8b7c          } while (i < this->m_ToolbarButtons.m_num);
005d8b7c          
005d8b7e          eax = *(uint8_t*)((char*)this_1)[3];
005d8b52      }
005d8b52      
005d8b87      return eax;
005d8b40  }

005d8b8a                                90 90 90 90 90 90                                                            ......

005d8b90  void __fastcall ProfilerUI::UpdateDBObjStats(class ProfilerUI* this)

005d8b90  {
005d8b90      int32_t ebp;
005d8b90      int32_t var_4 = ebp;
005d8ba5      int32_t ebx = 0;
005d8ba9      int32_t var_c = 0;
005d8ba9      
005d8bad      if (this->m_DBObjStats.m_num > 0)
005d8bad      {
005d8c40          bool cond:1_1;
005d8c40          
005d8c40          do
005d8c40          {
005d8bb3              struct ProfilerDBObjStat* m_data = this->m_DBObjStats.m_data;
005d8bb9              void* esi_1 = ((char*)m_data + ebx);
005d8bbc              class DBOCache* eax_2 = DBCache::GetDBOCache(*(uint32_t*)((char*)m_data + ebx));
005d8bbc              
005d8bc6              if (eax_2 != 0)
005d8bc6              {
005d8bd7                  uint32_t ecx_1 = (eax_2->m_nTotalCount - eax_2->m_nFree);
005d8bd7                  
005d8bdb                  if (ecx_1 != *(uint32_t*)((char*)esi_1 + 8))
005d8bdb                  {
005d8be3                      int32_t ebp_2 = *(int32_t*)((char*)Timer::local_time + 4);
005d8be9                      *(uint32_t*)((char*)esi_1 + 0x18) = (*(uint32_t*)Timer::local_time);
005d8bec                      *(uint32_t*)((char*)esi_1 + 0x1c) = ebp_2;
005d8bef                      *(uint32_t*)((char*)esi_1 + 8) = ecx_1;
005d8bdb                  }
005d8bdb                  
005d8bf2                  uint32_t m_nFree = eax_2->m_nFree;
005d8bf2                  
005d8bfb                  if (m_nFree != *(uint32_t*)((char*)esi_1 + 0xc))
005d8bfb                  {
005d8c03                      int32_t edx_3 = *(int32_t*)((char*)Timer::local_time + 4);
005d8c09                      *(uint32_t*)((char*)esi_1 + 0x18) = (*(uint32_t*)Timer::local_time);
005d8c0c                      *(uint32_t*)((char*)esi_1 + 0x1c) = edx_3;
005d8c0f                      *(uint32_t*)((char*)esi_1 + 0xc) = m_nFree;
005d8bfb                  }
005d8bfb                  
005d8c15                  *(uint32_t*)((char*)esi_1 + 0xc);
005d8c15                  
005d8c18                  if (*(uint32_t*)((char*)esi_1 + 8) != -(*(uint32_t*)((char*)esi_1 + 0xc)))
005d8c18                  {
005d8c20                      int32_t edx_4 = *(int32_t*)((char*)Timer::local_time + 4);
005d8c26                      *(uint32_t*)((char*)esi_1 + 0x10) = (*(uint32_t*)Timer::local_time);
005d8c29                      *(uint32_t*)((char*)esi_1 + 0x14) = edx_4;
005d8c18                  }
005d8bc6              }
005d8bc6              
005d8c37              ebx += 0x20;
005d8c3a              cond:1_1 = (var_c + 1) < this->m_DBObjStats.m_num;
005d8c3c              var_c += 1;
005d8c40          } while (cond:1_1);
005d8bad      }
005d8bad      
005d8b9a      var_4;
005d8b90  }

005d8c4e                                            90 90                                                                ..

005d8c50  void __thiscall GlobalRegistry::InqTypedVariable(class GlobalRegistry* this, class PStringBase<char> const* arg2, uint8_t* arg3)

005d8c50  {
005d8c50      class GlobalRegistry* this_1 = this;
005d8c51      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
005d8c5b      this_1 = nullptr;
005d8c5b      
005d8c63      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
005d8c63      {
005d8c6a          void* eax = operator new(0x8100);
005d8c6a          
005d8c74          if (eax == 0)
005d8c7f              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
005d8c74          else
005d8c78              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
005d8c78          
005d8c81          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
005d8c63      }
005d8c63      
005d8c96      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, this, &this_1) != 0)
005d8c96      {
005d8c9e          void* eax_2 = *(uint32_t*)( + 0x44)();
005d8c9e          
005d8ca9          if ((eax_2 != 0 && *(uint32_t*)((char*)eax_2 + 0x10) == 2))
005d8cb4              arg2->m_charbuffer = **(uint8_t**)((char*)eax_2 + 0xc);
005d8c96      }
005d8c50  }

005d8cba                                                                                90 90 90 90 90 90                            ......

005d8cc0  void __thiscall GlobalRegistry::InqTypedVariable(class GlobalRegistry* this, class PStringBase<char> const* arg2, uint32_t* arg3)

005d8cc0  {
005d8cc0      class GlobalRegistry* this_1 = this;
005d8cc1      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
005d8ccb      this_1 = nullptr;
005d8ccb      
005d8cd3      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
005d8cd3      {
005d8cda          void* eax = operator new(0x8100);
005d8cda          
005d8ce4          if (eax == 0)
005d8cef              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
005d8ce4          else
005d8ce8              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
005d8ce8          
005d8cf1          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
005d8cd3      }
005d8cd3      
005d8d06      if (GlobalRegistryInstance::FindObjectByName(GlobalRegistry::s_pcGlobalRegistry_1, this, &this_1) != 0)
005d8d06      {
005d8d0e          void* eax_2 = *(uint32_t*)( + 0x44)();
005d8d0e          
005d8d19          if ((eax_2 != 0 && *(uint32_t*)((char*)eax_2 + 0x10) == 4))
005d8d24              arg2->m_charbuffer = **(uint32_t**)((char*)eax_2 + 0xc);
005d8d06      }
005d8cc0  }

005d8d2a                                90 90 90 90 90 90                                                            ......

005d8d30  void* __thiscall BudgetStatItem::`vector deleting destructor'(struct BudgetStatItem* this, uint32_t arg2)

005d8d30  {
005d8d30      struct BudgetStatItem* var_4 = this;
005d8d30      
005d8d3a      if ((arg2 & 2) == 0)
005d8d3a      {
005d8da1          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = (this->sInfo.strName.m_charbuffer - 0x14);
005d8da1          
005d8db4          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
005d8dbc              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
005d8dbc          
005d8dc3          if ((arg2 & 1) != 0)
005d8dc6              operator delete(this);
005d8dc6          
005d8dd3          return this;
005d8d3a      }
005d8d3a      
005d8d3c      int32_t eax = *(uint32_t*)((char*)this->sInfo + -4);
005d8d47      void* edi_1 = &this[eax];
005d8d47      
005d8d4a      if ((eax - 1) >= 0)
005d8d4a      {
005d8d54          var_4 = eax;
005d8d83          struct BudgetStatItem* i;
005d8d83          
005d8d83          do
005d8d83          {
005d8d60              int32_t esi_1 = *(uint32_t*)((char*)edi_1 - 0x24);
005d8d63              edi_1 -= 0x24;
005d8d63              
005d8d75              if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
005d8d7d                  **(uint32_t**)(esi_1 - 0x14)(1);
005d8d7d              
005d8d7f              i = var_4;
005d8d7f              var_4 -= 1;
005d8d83          } while (i != 1);
005d8d4a      }
005d8d4a      
005d8d8b      if ((arg2 & 1) != 0)
005d8d8e          operator delete[](((char*)this - 4));
005d8d8e      
005d8d9c      return ((char*)this - 4);
005d8d30  }

005d8d5a                                                                                8d 9b 00 00 00 00                            ......
005d8dd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005d8de0  void* __thiscall ProfilerDBObjStat::`vector deleting destructor'(struct ProfilerDBObjStat* this, uint32_t arg2)

005d8de0  {
005d8de0      struct ProfilerDBObjStat* var_4 = this;
005d8de0      
005d8dea      if ((arg2 & 2) == 0)
005d8dea      {
005d8e52          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = (this->DBTypeName.m_charbuffer - 0x14);
005d8e52          
005d8e65          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
005d8e6d              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
005d8e6d          
005d8e74          if ((arg2 & 1) != 0)
005d8e77              operator delete(this);
005d8e77          
005d8e84          return this;
005d8dea      }
005d8dea      
005d8dec      int32_t DBType = this->DBType;
005d8dec      
005d8dfb      if ((DBType - 1) >= 0)
005d8dfb      {
005d8e05          void* edi_1 = &this[DBType].DBTypeName;
005d8e08          var_4 = DBType;
005d8e33          struct ProfilerDBObjStat* i;
005d8e33          
005d8e33          do
005d8e33          {
005d8e10              int32_t esi_1 = *(uint32_t*)((char*)edi_1 - 0x20);
005d8e13              edi_1 -= 0x20;
005d8e13              
005d8e25              if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
005d8e2d                  **(uint32_t**)(esi_1 - 0x14)(1);
005d8e2d              
005d8e2f              i = var_4;
005d8e2f              var_4 -= 1;
005d8e33          } while (i != 1);
005d8dfb      }
005d8dfb      
005d8e3b      if ((arg2 & 1) != 0)
005d8e3e          operator delete[](((char*)this - 4));
005d8e3e      
005d8e4c      return ((char*)this - 4);
005d8de0  }

005d8e87                       90 90 90 90 90 90 90 90 90                                                         .........

005d8e90  struct ProfilerDBObjStat& __thiscall ProfilerDBObjStat::operator=(struct ProfilerDBObjStat* this, struct ProfilerDBObjStat const& arg2)

005d8e90  {
005d8e98      uint32_t* result = this;
005d8e9a      *(uint32_t*)result = arg2->DBType;
005d8e9c      void* eax_1 = result[1];
005d8e9c      
005d8ea2      if (eax_1 != arg2->DBTypeName.m_charbuffer)
005d8ea2      {
005d8eb8          if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
005d8ec0              **(uint32_t**)((char*)eax_1 - 0x14)(1);
005d8ec0          
005d8ec2          class PSRefBufferCharData<char>* m_charbuffer = arg2->DBTypeName.m_charbuffer;
005d8ec5          result[1] = m_charbuffer;
005d8ecc          InterlockedIncrement(&m_charbuffer[-1]);
005d8ea2      }
005d8ea2      
005d8ed6      result[2] = arg2->NumActive;
005d8edc      result[3] = arg2->NumFree;
005d8ee2      result[4] = arg2->LastLocalTimeNotEmpty;
005d8ee8      result[5] = *(uint32_t*)((char*)arg2->LastLocalTimeNotEmpty)[4];
005d8eee      result[6] = arg2->LastLocalTimeChanged;
005d8ef5      result[7] = *(uint32_t*)((char*)arg2->LastLocalTimeChanged)[4];
005d8efb      return result;
005d8e90  }

005d8efe                                                                                            90 90                                ..

005d8f00  struct BudgetStatInfo& __thiscall BudgetStatInfo::operator=(struct BudgetStatInfo* this, struct BudgetStatInfo const& arg2)

005d8f00  {
005d8f08      class PSRefBufferCharData<char>* m_charbuffer = this->strName.m_charbuffer;
005d8f08      
005d8f0c      if (m_charbuffer != arg2->strName.m_charbuffer)
005d8f0c      {
005d8f22          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005d8f2a              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005d8f2a          
005d8f2c          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->strName.m_charbuffer;
005d8f2e          this->strName.m_charbuffer = m_charbuffer_1;
005d8f34          InterlockedIncrement(&m_charbuffer_1[-1]);
005d8f0c      }
005d8f0c      
005d8f3e      this->nGraphicLevel[0] = arg2->nGraphicLevel[0];
005d8f44      this->nGraphicLevel[1] = arg2->nGraphicLevel[1];
005d8f4a      this->nGraphicLevel[2] = arg2->nGraphicLevel[2];
005d8f50      this->nGraphicLevel[3] = arg2->nGraphicLevel[3];
005d8f56      this->nGraphicLevel[4] = arg2->nGraphicLevel[4];
005d8f59      uint32_t edx_2;
005d8f59      edx_2 = arg2->bIsMem;
005d8f5d      this->bIsMem = edx_2;
005d8f63      return this;
005d8f00  }

005d8f66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005d8f70  void __thiscall BudgetStatInfo::BudgetStatInfo(struct BudgetStatInfo* this, class PStringBase<char> arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, uint32_t arg7, uint8_t arg8)

005d8f70  {
005d8f70      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005d8f7d      class PSRefBufferCharData<char>** this_1 = this;
005d8f86      *(uint32_t*)this_1 = PStringBase<char>::s_NullBuffer_1;
005d8f88      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
005d8f8a      class PSRefBufferCharData<char>* eax = *(uint32_t*)this_1;
005d8f8c      class PSRefBufferCharData<char>* __return_addr_1 = __return_addr;
005d8f8c      
005d8f92      if (eax != __return_addr_1)
005d8f92      {
005d8f94          int32_t ebx;
005d8f94          int32_t var_14_1 = ebx;
005d8f94          
005d8fa8          if ((InterlockedDecrement(&eax[-1]) == 0 && eax != 0x14))
005d8fb0              *(uint32_t*)*(int32_t*)((char*)eax + -0x14)(1);
005d8fb0          
005d8fb6          *(uint32_t*)this_1 = __return_addr_1;
005d8fb8          InterlockedIncrement(&__return_addr_1[-1]);
005d8f92      }
005d8f92      
005d8fc7      this_1[1] = arg2;
005d8fce      this_1[4] = arg5;
005d8fd4      this_1[2] = arg3;
005d8fdb      this_1[3] = arg4;
005d8fde      uint32_t ecx_4;
005d8fde      ecx_4 = arg7;
005d8fe6      this_1[5] = arg6;
005d8fe9      this_1[6] = ecx_4;
005d8fe9      
005d8ff8      if ((InterlockedDecrement(&__return_addr_1[-1]) == 0 && __return_addr_1 != 0x14))
005d9000          *(uint32_t*)*(int32_t*)((char*)__return_addr_1 + -0x14)(1);
005d8f70  }

005d900a                                90 90 90 90 90 90                                                            ......

005d9010  void __fastcall ProfilerUI::UpdateStats(class ProfilerUI* this)

005d9010  {
005d9013      class OSSpecificProfilerUIInfo* m_pOSSpecificProfiler = this->m_pOSSpecificProfiler;
005d9013      
005d901b      if (m_pOSSpecificProfiler != 0)
005d901d          m_pOSSpecificProfiler->vtable->FillInOSSpecificInfo(this);
005d901d      
005d902a      ProfilerUI::UpdateBudgetStat(this, 3, this->m_nSystemMemoryAllocated);
005d9037      ProfilerUI::UpdateBudgetStat(this, 4, this->m_nVirtualMemoryReserved);
005d906c      ProfilerUI::UpdateBudgetStat(this, 5, (((((Profiler::CapturedStats.Global.TextureVideoMemoryAllocated + Profiler::CapturedStats.Global.SurfaceVideoMemoryAllocated) + Profiler::CapturedStats.Global.StaticVertexBufferVideoMemoryAllocated) + Profiler::CapturedStats.Global.DynamicVertexBufferVideoMemoryAllocated) + Profiler::CapturedStats.Global.StaticIndexBufferVideoMemoryAllocated) + Profiler::CapturedStats.Global.DynamicIndexBufferVideoMemoryAllocated));
005d907c      ProfilerUI::UpdateBudgetStat(this, 0, Profiler::CapturedStats.Categories[0].TrianglesRendered);
005d908b      ProfilerUI::UpdateBudgetStat(this, 1, *(uint680_t*)Profiler::CapturedStats.Categories[0].VerticesRendered);
005d909b      ProfilerUI::UpdateBudgetStat(this, 2, *(uint680_t*)Profiler::CapturedStats.Categories[0].BatchesRendered);
005d90c2      ProfilerUI::UpdateBudgetStat(this, 6, (((*(uint680_t*)Profiler::CapturedStats.Categories[0].TextureVideoMemoryUsed + *(uint680_t*)Profiler::CapturedStats.Categories[0].SurfaceVideoMemoryUsed) + *(uint680_t*)Profiler::CapturedStats.Categories[0].VertexBufferVideoMemoryUsed) + *(uint680_t*)Profiler::CapturedStats.Categories[0].IndexBufferVideoMemoryUsed));
005d90ca      /* tailcall */
005d90ca      return ProfilerUI::UpdateDBObjStats(this);
005d9010  }

005d90cf                                               90                                                                 .

005d90d0  void __thiscall ProfilerUI::RemoveWindow(class ProfilerUI* this, uint32_t const arg2)

005d90d0  {
005d90d4      uint32_t m_num_1 = this->m_Windows.m_num;
005d90d7      int32_t esi = 0;
005d90d7      
005d90db      if (m_num_1 > 0)
005d90db      {
005d90e1          class ProfilerUIWindow** m_data_1 = this->m_Windows.m_data;
005d90ea          class ProfilerUIWindow** m_data_2 = m_data_1;
005d90ea          
005d90f5          while (*(uint32_t*)m_data_2->m_WindowHandle != arg2)
005d90f5          {
005d90f7              esi += 1;
005d90f8              m_data_2 = &m_data_2[1];
005d90f8              
005d90fd              if (esi >= m_num_1)
005d90fd              {
005d9103                  ProfilerUI::RepositionWindows(this);
005d910a                  return;
005d90fd              }
005d90f5          }
005d90f5          
005d910d          void* ebx_2 = m_data_1[esi];
005d910d          
005d9112          if (ebx_2 != 0)
005d9112          {
005d9114              int32_t* ecx_1 = *(uint32_t*)((char*)ebx_2 + 0xc);
005d9114              
005d9119              if (ecx_1 != 0)
005d9119              {
005d911b                  int32_t temp1_1 = ecx_1[1];
005d911b                  ecx_1[1] -= 1;
005d911b                  
005d911e                  if (temp1_1 == 1)
005d9124                      **(uint32_t**)ecx_1(1);
005d9124                  
005d9126                  *(uint32_t*)((char*)ebx_2 + 0xc) = 0;
005d9119              }
005d9119              
005d912e              operator delete(ebx_2);
005d9112          }
005d9112          
005d9136          this->m_Windows.m_data[esi] = 0;
005d9140          uint32_t m_num = this->m_Windows.m_num;
005d9140          
005d9145          if (esi < m_num)
005d9145          {
005d914a              this->m_Windows.m_num = (m_num - 1);
005d914a              
005d914d              if (esi != (m_num - 1))
005d914d              {
005d914f                  class ProfilerUIWindow** m_data = this->m_Windows.m_data;
005d9155                  m_data[esi] = m_data[(m_num - 1)];
005d915b                  this->m_Windows.m_data[this->m_Windows.m_num] = 0;
005d914d              }
005d9145          }
005d90db      }
005d90db      
005d9169      ProfilerUI::RepositionWindows(this);
005d90d0  }

005d9173                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

005d9180  void __fastcall SmartArray<ProfilerDBObjStat,1>::Reset(class SmartArray<ProfilerDBObjStat,1>* this)

005d9180  {
005d9186      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005d919a      this->m_num = 0;
005d919a      
005d919d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005d919d      {
005d919f          struct ProfilerDBObjStat* m_data = this->m_data;
005d919f          
005d91a3          if (m_data != 0)
005d91a7              ProfilerDBObjStat::`vector deleting destructor'(m_data, 3);
005d91a7          
005d91ac          this->m_data = 0;
005d91ae          this->m_sizeAndDeallocate = 0;
005d91b6          return;
005d919d      }
005d919d      
005d91b9      if (this->m_data != 0)
005d91b9      {
005d91bb          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
005d91bb          
005d91c1          if ((eax - 1) >= 0)
005d91c1          {
005d91cd              int32_t edi_2 = ((eax - 1) << 5);
005d91d1              int32_t var_24_1 = eax;
005d922a              bool cond:1_1;
005d922a              
005d922a              do
005d922a              {
005d91e0                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005d91ed                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005d91f8                  void var_20;
005d91f8                  ProfilerDBObjStat::operator=((this->m_data + edi_2), &var_20);
005d91f8                  
005d9214                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
005d921c                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
005d921c                  
005d9222                  edi_2 -= 0x20;
005d9225                  cond:1_1 = var_24_1 != 1;
005d9226                  var_24_1 -= 1;
005d922a              } while (cond:1_1);
005d91c1          }
005d91b9      }
005d9180  }

005d91d7                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
005d9234                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005d9240  uint8_t __thiscall SmartArray<ProfilerDBObjStat,1>::grow(class SmartArray<ProfilerDBObjStat,1>* this, uint32_t arg2)

005d9240  {
005d9242      uint32_t ebp = arg2;
005d924c      uint32_t* eax;
005d924c      
005d924c      if (ebp >= this->m_num)
005d924c      {
005d925c          if (ebp <= (this->m_sizeAndDeallocate & 0x7fffffff))
005d925c          {
005d92fa              eax = 1;
005d92fd              return 1;
005d925c          }
005d925c          
005d9264          if (ebp == 0)
005d9264          {
005d9266              SmartArray<ProfilerDBObjStat,1>::Reset(this);
005d926d              int32_t eax_2;
005d926d              eax_2 = 1;
005d9270              return 1;
005d9264          }
005d9264          
005d927c          eax = operator new[](((ebp << 5) + 4));
005d927c          
005d9286          if (eax != 0)
005d9286          {
005d928e              void* ebx_1 = &eax[1];
005d9294              *(uint32_t*)eax = ebp;
005d9296              `vector constructor iterator'(ebx_1, 0x20, ebp, SurfaceUsageSummary::SurfaceUsageSummary);
005d9296              
005d929d              if (ebx_1 != 0)
005d929d              {
005d92a2                  if (this->m_data != 0)
005d92a2                  {
005d92a4                      uint32_t m_num = this->m_num;
005d92a4                      
005d92a8                      if ((m_num - 1) >= 0)
005d92a8                      {
005d92ad                          void* esi_2 = ((m_num - 1) << 5);
005d92b1                          arg2 = m_num;
005d92ce                          bool cond:0_1;
005d92ce                          
005d92ce                          do
005d92ce                          {
005d92bd                              ProfilerDBObjStat::operator=(((char*)esi_2 + ebx_1), (this->m_data + esi_2));
005d92c6                              esi_2 -= 0x20;
005d92c9                              cond:0_1 = arg2 != 1;
005d92ca                              arg2 -= 1;
005d92ce                          } while (cond:0_1);
005d92a8                      }
005d92a8                      
005d92de                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005d92de                      {
005d92e0                          struct ProfilerDBObjStat* m_data = this->m_data;
005d92e0                          
005d92e4                          if (m_data != 0)
005d92e8                              ProfilerDBObjStat::`vector deleting destructor'(m_data, 3);
005d92de                      }
005d92a2                  }
005d92a2                  
005d92f3                  this->m_data = ebx_1;
005d92f5                  this->m_sizeAndDeallocate = (ebp | 0x80000000);
005d92fa                  eax = 1;
005d92fd                  return 1;
005d929d              }
005d9286          }
005d924c      }
005d924c      
005d9302      eax = 0;
005d9305      return 0;
005d9240  }

005d9308                          90 90 90 90 90 90 90 90                                                          ........

005d9310  void BudgetStatInfoArray::~BudgetStatInfoArray(class BudgetStatInfoArray* this @ ecx)

005d9310  {
005d9359      for (int32_t* i = &BudgetStatInfoArray::s_BudgetStatInfo; i < 0x8f10bc; i = &i[1])
005d9359      {
005d9320          int32_t* ebx_1 = *(uint32_t*)i;
005d9320          
005d9324          if (ebx_1 != 0)
005d9324          {
005d9328              int32_t* esi_2 = (*(uint32_t*)ebx_1 - 0x14);
005d9328              
005d9337              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005d933f                  **(uint32_t**)esi_2(1);
005d933f              
005d9342              operator delete(ebx_1);
005d9324          }
005d9324          
005d934a          *(uint32_t*)i = 0;
005d9359      }
005d9310  }


005d9360  void __thiscall ProfilerUI::RemoveCategoryWindow(class ProfilerUI* this, enum ProfilerTypes::CategoryType const arg2)

005d9360  {
005d9361      uint32_t m_num = this->m_Windows.m_num;
005d9364      int32_t edx = 0;
005d9364      
005d9368      if (m_num > 0)
005d9368      {
005d936b          class ProfilerUIWindow** m_data = this->m_Windows.m_data;
005d9374          class ProfilerUIWindow** m_data_1 = m_data;
005d9374          
005d938a          do
005d938a          {
005d9378              enum ProfilerTypes::CategoryType m_Category = *(uint32_t*)m_data_1->m_Category;
005d9378              
005d9382              if ((m_Category != Invalid && m_Category == arg2))
005d93a0                  /* tailcall */
005d93a0                  return ProfilerUI::RemoveWindow(this, m_data[edx]->m_WindowHandle);
005d93a0              
005d9384              edx += 1;
005d9385              m_data_1 = &m_data_1[1];
005d938a          } while (edx < m_num);
005d9368      }
005d9360  }

005d93a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005d93b0  void __fastcall ProfilerUI::UpdateToolbarButtonStates(class ProfilerUI* this)

005d93b0  {
005d93b4      class ProfilerUI* this_1 = this;
005d93b9      int32_t i = 0;
005d93bd      class ProfilerUI* this_2 = this_1;
005d93c1      int32_t i_1 = 0;
005d93c1      
005d93c5      if (this_1->m_ToolbarButtons.m_num > 0)
005d93c5      {
005d9535          do
005d9535          {
005d93d7              class QuickButton* edi_1 = this_1->m_ToolbarButtons.m_data[i];
005d93da              uint32_t m_WindowID = edi_1->m_WindowID;
005d93e3              uint8_t* edi;
005d93e3              
005d93e3              if ((m_WindowID - 0xa) <= 0xc)
005d93e3                  switch (m_WindowID)
005d93e3                  {
005d9592                      case 0xa:
005d9592                      case 0xb:
005d9592                      case 0xc:
005d9592                      case 0xd:
005d9592                      case 0xe:
005d9592                      {
005d9592                          uint32_t ecx_23;
005d9592                          ecx_23 = this_1->m_nGraphicsQualityLevel == (m_WindowID - 9);
005d9598                          QuickButton::SetCheckedState(edi_1, ecx_23);
005d9592                          break;
005d9592                      }
005d9400                      case 0x14:
005d9400                      {
005d9400                          void* var_24;
005d9400                          PStringBase<char>::PStringBase<char>(&var_24, "RenderDevice.Wireframe");
005d940e                          class PStringBase<char> var_8;
005d940e                          GlobalRegistry::InqTypedVariable(&var_24, &var_8, edi);
005d9417                          int32_t* esi_2 = ((char*)var_24 - 0x14);
005d9417                          
005d9426                          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005d942e                              **(uint32_t**)esi_2(1);
005d942e                          
005d9437                          QuickButton::SetCheckedState(edi_1, ((int8_t)var_8));
005d9400                          break;
005d9400                      }
005d944a                      case 0x15:
005d944a                      {
005d944a                          class PStringBase<char> var_1c = 0;
005d9452                          void* var_20;
005d9452                          PStringBase<char>::PStringBase<char>(&var_20, "RenderD3D.AlphaDelayMask");
005d9460                          GlobalRegistry::InqTypedVariable(&var_20, &var_1c, edi);
005d9469                          int32_t* esi_4 = ((char*)var_20 - 0x14);
005d9469                          
005d9478                          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
005d9480                              **(uint32_t**)esi_4(1);
005d9480                          
005d9482                          class PStringBase<char> ebx = var_1c;
005d9486                          class PStringBase<char> var_3c_6 = ebx;
005d9493                          char* var_18;
005d9493                          PStringBase<char>::PStringBase<char>(&var_18, Formatted, "Delayed Alpha [%x]");
005d94a4                          class PStringBase<char> var_28;
005d94a4                          PStringBase<char>::PStringBase<char>(&var_28, var_18);
005d94a9                          class PSRefBufferCharData<char>* m_charbuffer = edi_1->m_ButtonLabel.m_charbuffer;
005d94a9                          
005d94b0                          if (m_charbuffer != var_28)
005d94b0                          {
005d94c1                              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005d94c9                                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005d94c9                              
005d94cb                              class PStringBase<char> eax_6 = var_28;
005d94cf                              edi_1->m_ButtonLabel.m_charbuffer = eax_6;
005d94d6                              InterlockedIncrement((eax_6 - 0x10));
005d94b0                          }
005d94b0                          
005d94e0                          int32_t* esi_7 = (var_28 - 0x14);
005d94e0                          
005d94ef                          if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
005d94f7                              **(uint32_t**)esi_7(1);
005d94f7                          
005d94fb                          int32_t eax_9;
005d94fb                          eax_9 = ebx != 0;
005d9501                          QuickButton::SetCheckedState(edi_1, eax_9);
005d950a                          void* esi_9 = &var_18[0xffffffec];
005d950a                          
005d9519                          if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
005d9521                              **(uint32_t**)esi_9(1);
005d9521                          
005d9523                          this_1 = this_2;
005d944a                          break;
005d944a                      }
005d954c                      case 0x16:
005d954c                      {
005d954c                          void* var_14;
005d954c                          PStringBase<char>::PStringBase<char>(&var_14, "RenderDeviceD3D.AllowDrawPrimUP");
005d955a                          int32_t var_4;
005d955a                          GlobalRegistry::InqTypedVariable(&var_14, &var_4, edi);
005d9563                          int32_t* esi_11 = ((char*)var_14 - 0x14);
005d9563                          
005d9572                          if ((InterlockedDecrement(&esi_11[1]) == 0 && esi_11 != 0))
005d957a                              **(uint32_t**)esi_11(1);
005d957a                          
005d9583                          QuickButton::SetCheckedState(edi_1, ((int8_t)var_4));
005d954c                          break;
005d954c                      }
005d93e3                  }
005d952e              i = (i_1 + 1);
005d9531              i_1 = i;
005d9535          } while (i < this_1->m_ToolbarButtons.m_num);
005d93c5      }
005d93b0  }

005d959f                                                                                               90                                 .
005d95a0  uint32_t jump_table_5d95a0[0x5] = 
005d95a0  {
005d95a0      [0x0] =  0x005d958a
005d95a4      [0x1] =  0x005d93f7
005d95a8      [0x2] =  0x005d9441
005d95ac      [0x3] =  0x005d9543
005d95b0      [0x4] =  0x005d9527
005d95b4  }
005d95b4  uint8_t lookup_table_5d95b4[0xd] = 
005d95b4  {
005d95b4      [0x0] =  0x00
005d95b5      [0x1] =  0x00
005d95b6      [0x2] =  0x00
005d95b7      [0x3] =  0x00
005d95b8      [0x4] =  0x00
005d95b9      [0x5] =  0x04
005d95ba      [0x6] =  0x04
005d95bb      [0x7] =  0x04
005d95bc      [0x8] =  0x04
005d95bd      [0x9] =  0x04
005d95be      [0xa] =  0x01
005d95bf      [0xb] =  0x02
005d95c0      [0xc] =  0x03
005d95c1  }

005d95c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005d95d0  void __thiscall ProfilerUI::PrintBudgetStat(class ProfilerUI* this, uint32_t const arg2, class QuickWindow* arg3)

005d95d0  {
005d95e3      struct BudgetStatItem* m_data = this->m_budgetStatArray.m_data;
005d95e6      uint32_t eax_1 = (arg2 * 9);
005d95e9      char* ebp = *(uint32_t*)((char*)m_data + (eax_1 << 2));
005d95ec      void* esi = ((char*)m_data + (eax_1 << 2));
005d95f3      InterlockedIncrement(&ebp[0xfffffff0]);
005d95f9      int32_t eax_2 = *(uint32_t*)((char*)esi + 0x1c);
005d95fc      int32_t ebx;
005d95fc      ebx = *(uint8_t*)((char*)esi + 0x18);
005d95ff      int32_t esi_1 = *(uint32_t*)((char*)esi + 0x20);
005d961c      QuickWindow::RenderText(arg3, 0, this->m_CurrentYPixel, ebp, g_BudgetItemColor[esi_1]);
005d9623      uint32_t m_CurrentYPixel;
005d9623      char* var_840_1;
005d9623      uint32_t var_83c_2;
005d9623      void var_800;
005d9623      
005d9623      if (ebx == 0)
005d9623      {
005d9691          sprintf(&var_800, &data_7e8f70, eax_2);
005d96a4          var_83c_2 = g_BudgetItemColor[esi_1];
005d96a9          var_840_1 = &var_800;
005d96aa          m_CurrentYPixel = this->m_CurrentYPixel;
005d9623      }
005d9623      else
005d9623      {
005d9629          long double x87_r7_1 = ((long double)eax_2);
005d9629          
005d962f          if (eax_2 < 0)
005d9631              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
005d9631          
005d964a          char* var_840;
005d964a          var_840 = ((double)(x87_r7_1 * ((long double)9.53674316e-07f)));
005d9653          sprintf(&var_800, "%.02f", var_840);
005d9667          void var_400;
005d9667          sprintf(&var_400, "%6s MB", &var_800);
005d9676          var_83c_2 = g_BudgetItemColor[esi_1];
005d967e          var_840_1 = &var_400;
005d967f          m_CurrentYPixel = this->m_CurrentYPixel;
005d9623      }
005d96b7      QuickWindow::RenderText(arg3, 0xb4, m_CurrentYPixel, var_840_1, var_83c_2);
005d96bc      this->m_CurrentYPixel += 0xc;
005d96bc      
005d96d3      if ((InterlockedDecrement(&ebp[0xfffffff0]) == 0 && ebp != 0x14))
005d96db          **(uint32_t**)(ebp - 0x14)(1);
005d95d0  }

005d96ea                                90 90 90 90 90 90                                                            ......

005d96f0  void __fastcall BudgetStatItem::BudgetStatItem(struct BudgetStatItem* this)

005d96f0  {
005d96f8      PStringBase<char>::PStringBase<char>(this, &data_7928af);
005d9706      __builtin_memset(&this->sInfo.nGraphicLevel, 0, 0x15);
005d96f0  }

005d9718                                                                          90 90 90 90 90 90 90 90                          ........

005d9720  void __fastcall ProfilerUI::Think(class ProfilerUI* this)

005d9720  {
005d972f      if ((this->m_WantActivate != 0 || this->m_WantDeactivate != 0))
005d972f      {
005d9733          this->m_WantActivate = 0;
005d9737          this->m_WantDeactivate = 0;
005d973b          ProfilerUI::RegisterInputMaps(this);
005d972f      }
005d972f      
005d9745      if (this->m_IsActive != 0)
005d9745      {
005d974e          this->m_nGraphicsQualityLevel = Render::DetermineOverallGraphicsQuality();
005d9751          ProfilerUI::UpdateStats(this);
005d9751          
005d975b          if (this->m_IsActive != 0)
005d9760              /* tailcall */
005d9760              return ProfilerUI::UpdateToolbarButtonStates(this);
005d9745      }
005d9720  }

005d9767                       90 90 90 90 90 90 90 90 90                                                         .........

005d9770  void __fastcall ProfilerUI::Render(class ProfilerUI* this)

005d9770  {
005d9770      int32_t ebp;
005d9770      int32_t var_4 = ebp;
005d9770      
005d9784      if (this->m_IsActive != 0)
005d9784      {
005d9792          RenderDeviceD3D::SetFillMode(RenderDevice::render_device, FILLMODE_SOLID);
005d9797          RGBAColor_White.a;
005d97a3          int32_t eax_1 = _ftol2();
005d97a8          RGBAColor_White.r;
005d97b9          int32_t eax_2 = _ftol2();
005d97be          RGBAColor_White.g;
005d97cf          int32_t eax_3 = _ftol2();
005d97d4          RGBAColor_White.b;
005d97f0          uint32_t ebx_7 = ((((((eax_1 << 8) | eax_2) << 8) | eax_3) << 8) | _ftol2());
005d97f2          RenderDeviceD3D::BeginRenderingDebugText(RenderDevice::render_device);
005d97fc          int32_t var_50_1 = 0;
005d97fc          
005d9804          if (this->m_Windows.m_num > 0)
005d9804          {
005db58f              bool cond:4_1;
005db58f              
005db58f              do
005db58f              {
005d9817                  int32_t* eax_7 = this->m_Windows.m_data[var_50_1];
005d981a                  class QuickWindow* edi_1 = eax_7[3];
005d981d                  edi_1->vtable->Render();
005d982c                  this->m_CurrentYPixel = 0;
005d9833                  int32_t eax_8 = eax_7[2];
005d9839                  int32_t var_80_1;
005d9839                  uint32_t m_CurrentYPixel;
005d9839                  char* var_78_1;
005d9839                  uint32_t var_74_56;
005d9839                  
005d9839                  if (eax_8 == 6)
005d9839                  {
005da5b7                      int32_t eax_114 = *(uint32_t*)eax_7;
005da5b7                      
005da5bc                      if (eax_114 == this->m_MemoryCountersStatsWindowHandle)
005da5bc                      {
005da5d3                          (Profiler::CapturedStats.Global.StaticVertexBufferVideoMemoryAllocated + Profiler::CapturedStats.Global.DynamicVertexBufferVideoMemoryAllocated);
005da5da                          (Profiler::CapturedStats.Global.StaticIndexBufferVideoMemoryAllocated + Profiler::CapturedStats.Global.DynamicIndexBufferVideoMemoryAllocated);
005da5f3                          ((Profiler::CapturedStats.Global.MeshVertexMemoryAllocated + Profiler::CapturedStats.Global.MeshTriangleMemoryAllocated) + Profiler::CapturedStats.Global.MeshTopologyMemoryAllocated);
005da602                          int32_t* eax_121 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
005da60b                          *(uint32_t*)(*(uint32_t*)eax_121 + 0x10)(eax_121);
005da617                          int32_t lpBuffer = 0x20;
005da61f                          GlobalMemoryStatus(&lpBuffer);
005da667                          (((((((Profiler::CapturedStats.Global.UISurfaceMemoryAllocated + Profiler::CapturedStats.Global.SurfaceMemoryAllocated) + Profiler::CapturedStats.Global.FontMemoryAllocated) + Profiler::CapturedStats.Global.AudioMemoryAllocated) + Profiler::CapturedStats.Global.MovieMemoryAllocated) + Profiler::CapturedStats.Global.LandBlockMemoryAllocated) + Profiler::CapturedStats.Global.AC1_ImgTexMemoryAllocated) + Profiler::CapturedStats.Global.AC1_D3DXMeshMemoryAllocated);
005da679                          sprintf(0x8f0b50, "[%s]", "Memory Counters");
005da690                          QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005da6a0                          this->m_CurrentYPixel += 0x10;
005da6a3                          ProfilerUI::PrintBudgetStat(this, 3, edi_1);
005da6ba                          QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, "  Peak Process Memory", 0xffcccccc);
005da6c2                          this->m_nPeakSystemMemoryAllocated;
005da6e5                          sprintf(0x8f0b50, "%.02f", "  Peak Process Memory");
005da6f6                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005da70c                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005da71c                          this->m_CurrentYPixel += 0xc;
005da71f                          ProfilerUI::PrintBudgetStat(this, 4, edi_1);
005da736                          QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, "  Peak Virtual Memory", 0xffcccccc);
005da73e                          this->m_nPeakVirtualMemoryReserved;
005da761                          sprintf(0x8f0b50, "%.02f", "  Peak Virtual Memory");
005da772                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005da788                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005da795                          uint32_t eax_139 = (this->m_CurrentYPixel + 0xc);
005da7a2                          this->m_CurrentYPixel = eax_139;
005da7a5                          QuickWindow::RenderText(edi_1, 0, eax_139, "Memory Available", 0xffcccccc);
005da7d2                          sprintf(0x8f0b50, "%.02f", "Memory Available");
005da7e3                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005da7f9                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005da806                          uint32_t edx_73 = (this->m_CurrentYPixel + 0xc);
005da815                          this->m_CurrentYPixel = edx_73;
005da818                          QuickWindow::RenderText(edi_1, 0, edx_73, "Memory Accounted For", 0xffcccccc);
005da845                          sprintf(0x8f0b50, "%.02f", "Memory Accounted For");
005da856                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005da86c                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005da879                          uint32_t edx_76 = (this->m_CurrentYPixel + 0xc);
005da888                          this->m_CurrentYPixel = edx_76;
005da88b                          QuickWindow::RenderText(edi_1, 0, edx_76, "  ImgTex", 0xffcccccc);
005da896                          Profiler::CapturedStats.Global;
005da8bc                          sprintf(0x8f0b50, "%.02f", "  ImgTex");
005da8cd                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005da8e3                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005da8f0                          uint32_t eax_145 = (this->m_CurrentYPixel + 0xc);
005da8fd                          this->m_CurrentYPixel = eax_145;
005da900                          QuickWindow::RenderText(edi_1, 0, eax_145, "  D3DXMesh", 0xffcccccc);
005da90b                          Profiler::CapturedStats.Global;
005da930                          sprintf(0x8f0b50, "%.02f", "  D3DXMesh");
005da941                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005da957                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005da964                          uint32_t edx_79 = (this->m_CurrentYPixel + 0xc);
005da973                          this->m_CurrentYPixel = edx_79;
005da976                          QuickWindow::RenderText(edi_1, 0, edx_79, "  Surfaces", 0xffcccccc);
005da981                          Profiler::CapturedStats.Global;
005da9a7                          sprintf(0x8f0b50, "%.02f", "  Surfaces");
005da9b8                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005da9ce                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005da9db                          uint32_t edx_82 = (this->m_CurrentYPixel + 0xc);
005da9ea                          this->m_CurrentYPixel = edx_82;
005da9ed                          QuickWindow::RenderText(edi_1, 0, edx_82, "  UISurfaces", 0xffcccccc);
005da9f8                          Profiler::CapturedStats.Global;
005daa1e                          sprintf(0x8f0b50, "%.02f", "  UISurfaces");
005daa2f                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005daa45                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005daa52                          uint32_t eax_151 = (this->m_CurrentYPixel + 0xc);
005daa5f                          this->m_CurrentYPixel = eax_151;
005daa62                          QuickWindow::RenderText(edi_1, 0, eax_151, "  Meshes", 0xffcccccc);
005daa8f                          sprintf(0x8f0b50, "%.02f", "  Meshes");
005daaa0                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005daab6                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005daac3                          uint32_t edx_85 = (this->m_CurrentYPixel + 0xc);
005daad2                          this->m_CurrentYPixel = edx_85;
005daad5                          QuickWindow::RenderText(edi_1, 0, edx_85, "    Vertices", 0xff999999);
005daae0                          Profiler::CapturedStats.Global;
005dab06                          sprintf(0x8f0b50, "%.02f", "    Vertices");
005dab17                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dab31                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, 0xffb2b2b2);
005dab3e                          uint32_t edx_88 = (this->m_CurrentYPixel + 0xc);
005dab4d                          this->m_CurrentYPixel = edx_88;
005dab50                          QuickWindow::RenderText(edi_1, 0, edx_88, "    Triangles", 0xff999999);
005dab5b                          Profiler::CapturedStats.Global;
005dab81                          sprintf(0x8f0b50, "%.02f", "    Triangles");
005dab92                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dabac                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, 0xffb2b2b2);
005dabb9                          uint32_t eax_157 = (this->m_CurrentYPixel + 0xc);
005dabc6                          this->m_CurrentYPixel = eax_157;
005dabc9                          QuickWindow::RenderText(edi_1, 0, eax_157, "    Topology", 0xff999999);
005dabd4                          Profiler::CapturedStats.Global;
005dabf9                          sprintf(0x8f0b50, "%.02f", "    Topology");
005dac0a                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dac24                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, 0xffb2b2b2);
005dac31                          uint32_t edx_91 = (this->m_CurrentYPixel + 0xc);
005dac40                          this->m_CurrentYPixel = edx_91;
005dac43                          QuickWindow::RenderText(edi_1, 0, edx_91, "  Fonts", 0xffcccccc);
005dac4e                          Profiler::CapturedStats.Global;
005dac74                          sprintf(0x8f0b50, "%.02f", "  Fonts");
005dac85                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dac9b                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005daca8                          uint32_t edx_94 = (this->m_CurrentYPixel + 0xc);
005dacb7                          this->m_CurrentYPixel = edx_94;
005dacba                          QuickWindow::RenderText(edi_1, 0, edx_94, "  Audio", 0xffcccccc);
005dacc5                          Profiler::CapturedStats.Global;
005daceb                          sprintf(0x8f0b50, "%.02f", "  Audio");
005dacfc                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dad12                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005dad1f                          uint32_t eax_163 = (this->m_CurrentYPixel + 0xc);
005dad2c                          this->m_CurrentYPixel = eax_163;
005dad2f                          QuickWindow::RenderText(edi_1, 0, eax_163, "  Movies", 0xffcccccc);
005dad3a                          Profiler::CapturedStats.Global;
005dad5f                          sprintf(0x8f0b50, "%.02f", "  Movies");
005dad70                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dad86                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005dad93                          uint32_t edx_97 = (this->m_CurrentYPixel + 0xc);
005dada2                          this->m_CurrentYPixel = edx_97;
005dada5                          QuickWindow::RenderText(edi_1, 0, edx_97, "  LandBlocks", 0xffcccccc);
005dadb0                          Profiler::CapturedStats.Global;
005dadd6                          sprintf(0x8f0b50, "%.02f", "  LandBlocks");
005dade7                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dadfd                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005dae09                          this->m_CurrentYPixel += 0xc;
005dae10                          ProfilerUI::PrintBudgetStat(this, 5, edi_1);
005dae27                          QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, "Video Mem Available", 0xffcccccc);
005dae54                          sprintf(0x8f0b50, "%.02f", "Video Mem Available");
005dae65                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dae7b                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005dae88                          uint32_t edx_101 = (this->m_CurrentYPixel + 0xc);
005dae97                          this->m_CurrentYPixel = edx_101;
005dae9a                          QuickWindow::RenderText(edi_1, 0, edx_101, "  Textures", 0xffcccccc);
005daea5                          Profiler::CapturedStats.Global;
005daecb                          sprintf(0x8f0b50, "%.02f", "  Textures");
005daedc                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005daef2                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005daeff                          uint32_t eax_170 = (this->m_CurrentYPixel + 0xc);
005daf0c                          this->m_CurrentYPixel = eax_170;
005daf0f                          QuickWindow::RenderText(edi_1, 0, eax_170, "  Surfaces", 0xffcccccc);
005daf1a                          Profiler::CapturedStats.Global;
005daf3f                          sprintf(0x8f0b50, "%.02f", "  Surfaces");
005daf50                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005daf66                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005daf73                          int32_t edx_104 = (this->m_CurrentYPixel + 0xc);
005daf82                          this->m_CurrentYPixel = edx_104;
005daf85                          QuickWindow::RenderText(edi_1, 0, edx_104, "  Vertex Buffers", 0xffcccccc);
005dafb2                          sprintf(0x8f0b50, "%.02f", "  Vertex Buffers");
005dafc3                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005dafd9                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005dafe6                          int32_t edx_107 = (this->m_CurrentYPixel + 0xc);
005daff5                          this->m_CurrentYPixel = edx_107;
005daff8                          QuickWindow::RenderText(edi_1, 0, edx_107, "    Static", 0xff999999);
005db003                          Profiler::CapturedStats.Global;
005db029                          sprintf(0x8f0b50, "%.02f", "    Static");
005db03a                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005db054                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, 0xffb2b2b2);
005db061                          int32_t eax_176 = (this->m_CurrentYPixel + 0xc);
005db06e                          this->m_CurrentYPixel = eax_176;
005db071                          QuickWindow::RenderText(edi_1, 0, eax_176, "    Dynamic", 0xff999999);
005db07c                          Profiler::CapturedStats.Global;
005db0a1                          sprintf(0x8f0b50, "%.02f", "    Dynamic");
005db0b2                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005db0cc                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, 0xffb2b2b2);
005db0d9                          int32_t edx_110 = (this->m_CurrentYPixel + 0xc);
005db0e8                          this->m_CurrentYPixel = edx_110;
005db0eb                          QuickWindow::RenderText(edi_1, 0, edx_110, "  Index Buffers", 0xffcccccc);
005db118                          sprintf(0x8f0b50, "%.02f", "  Index Buffers");
005db129                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005db13f                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005db14c                          int32_t edx_113 = (this->m_CurrentYPixel + 0xc);
005db15b                          this->m_CurrentYPixel = edx_113;
005db15e                          QuickWindow::RenderText(edi_1, 0, edx_113, "    Static", 0xff999999);
005db169                          Profiler::CapturedStats.Global;
005db18f                          sprintf(0x8f0b50, "%.02f", "    Static");
005db1a0                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005db1ba                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, 0xffb2b2b2);
005db1c7                          int32_t eax_182 = (this->m_CurrentYPixel + 0xc);
005db1d4                          this->m_CurrentYPixel = eax_182;
005db1d7                          QuickWindow::RenderText(edi_1, 0, eax_182, "    Dynamic", 0xff999999);
005db1e2                          Profiler::CapturedStats.Global;
005db207                          sprintf(0x8f0b50, "%.02f", "    Dynamic");
005db218                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005db232                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, 0xffb2b2b2);
005db23f                          int32_t edx_116 = (this->m_CurrentYPixel + 0xc);
005db24e                          this->m_CurrentYPixel = edx_116;
005db251                          QuickWindow::RenderText(edi_1, 0, edx_116, "Compositor Resources", 0xffcccccc);
005db25c                          Profiler::CapturedStats.Global;
005db282                          sprintf(0x8f0b50, "%.02f", "Compositor Resources");
005db293                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005db2a9                          QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005db2b6                          int32_t edx_119 = (this->m_CurrentYPixel + 0xc);
005db2c5                          this->m_CurrentYPixel = edx_119;
005db2c8                          QuickWindow::RenderText(edi_1, 0, edx_119, "Compositor Textures", 0xffcccccc);
005db2d3                          Profiler::CapturedStats.Global;
005db2f9                          sprintf(0x8f0b50, "%.02f", "Compositor Textures");
005db30a                          sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005db312                          var_74_56 = ebx_7;
005db313                          var_78_1 = &txt2;
005db318                          m_CurrentYPixel = this->m_CurrentYPixel;
005db319                          var_80_1 = 0xac;
005db31e                          goto label_5db573;
005da5bc                      }
005da5bc                      
005db326                      if (eax_114 == this->m_BlockResourcesStatsWindowHandle)
005db326                      {
005db337                          sprintf(0x8f0b50, "[%s]", "Block Resources");
005db34e                          QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005db57e                          this->m_CurrentYPixel += 0x10;
005db326                      }
005db326                      else if (eax_114 == this->m_DBObjStatsWindowHandle)
005db361                      {
005db376                          int32_t var_38 = 0x3e19999a;
005db37e                          int32_t var_34_1 = 0x3e800000;
005db386                          int32_t var_30_1 = 0x3e19999a;
005db38e                          int32_t var_2c_1 = 0x3f800000;
005db396                          sprintf(0x8f0b50, "[%s]", "Database Objects");
005db3ad                          QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005db3bc                          this->m_CurrentYPixel += 0x10;
005db3bf                          uint32_t eax_189 = RGBAColor::GetColor32(&var_38);
005db3d5                          QuickWindow::RenderText(edi_1, 0x80, this->m_CurrentYPixel, "referenced  free", eax_189);
005db3dd                          uint32_t ecx_226 = (this->m_CurrentYPixel + 0xc);
005db3e0                          this->m_CurrentYPixel = ecx_226;
005db3e3                          int32_t Timer::local_time_1 = (*(uint32_t*)Timer::local_time);
005db3f4                          uint32_t edx_123 = ecx_226;
005db3fc                          int32_t var_3c_1 = *(int32_t*)((char*)Timer::local_time + 4);
005db400                          int32_t var_4c_3 = 0;
005db400                          
005db408                          if (this->m_DBObjStats.m_num > 0)
005db408                          {
005db40e                              int32_t var_54_2 = 0;
005db526                              bool cond:5_1;
005db526                              
005db526                              do
005db526                              {
005db420                                  struct ProfilerDBObjStat* m_data = this->m_DBObjStats.m_data;
005db42b                                  long double x87_r7_10 = (((long double)Timer::local_time_1) - ((long double)*(uint64_t*)(&m_data->LastLocalTimeNotEmpty + var_54_2)));
005db431                                  void* var_5c_3 = ((char*)m_data + var_54_2);
005db435                                  long double temp1_1 = ((long double)3.0);
005db435                                  (x87_r7_10 - temp1_1);
005db43b                                  void* eax_192;
005db43b                                  eax_192 = ((((x87_r7_10 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005db43d                                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005db43d                                  
005db440                                  if (!(p_1))
005db440                                  {
005db44e                                      long double x87_r7_12 = (((long double)Timer::local_time_1) - ((long double)*(uint64_t*)((char*)var_5c_3 + 0x18)));
005db451                                      uint32_t ecx_229 = 0xff999999;
005db456                                      uint32_t var_58_2 = 0xffb2b2b2;
005db45e                                      long double temp2_1 = ((long double)1.0);
005db45e                                      (x87_r7_12 - temp2_1);
005db464                                      void* eax_193;
005db464                                      eax_193 = ((((x87_r7_12 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
005db466                                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005db466                                      
005db469                                      if (p_2)
005db469                                      {
005db476                                          long double temp3_1 = ((long double)3.0);
005db476                                          (x87_r7_12 - temp3_1);
005db47c                                          eax_193 = ((((x87_r7_12 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_12, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_12 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005db47e                                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005db47e                                          
005db481                                          if (!(p_3))
005db481                                          {
005db483                                              ecx_229 = 0xffcccccc;
005db488                                              var_58_2 = ebx_7;
005db481                                          }
005db469                                      }
005db469                                      else
005db469                                      {
005db46b                                          ecx_229 = 0xffffffff;
005db470                                          var_58_2 = 0xffffffff;
005db469                                      }
005db469                                      
005db49a                                      QuickWindow::RenderText(edi_1, 0, edx_123, *(uint32_t*)((char*)var_5c_3 + 4), ecx_229);
005db4b1                                      sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((char*)var_5c_3 + 8));
005db4cb                                      QuickWindow::RenderText(edi_1, 0x8c, this->m_CurrentYPixel, &txt1, var_58_2);
005db4e2                                      sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((char*)var_5c_3 + 0xc));
005db4fc                                      QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, var_58_2);
005db504                                      uint32_t eax_198 = (this->m_CurrentYPixel + 0xc);
005db507                                      this->m_CurrentYPixel = eax_198;
005db50a                                      edx_123 = eax_198;
005db440                                  }
005db440                                  
005db518                                  var_54_2 += 0x20;
005db51c                                  cond:5_1 = (var_4c_3 + 1) < this->m_DBObjStats.m_num;
005db522                                  var_4c_3 += 1;
005db526                              } while (cond:5_1);
005db408                          }
005db361                      }
005db361                      else if (eax_114 == this->m_MemoryProbeStatsWindowHandle)
005db531                      {
005db542                          sprintf(0x8f0b50, "[%s]", "Memory Probe");
005db559                          QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005db561                          var_74_56 = 0xffffffff;
005db563                          uint32_t m_CurrentYPixel_1 = (this->m_CurrentYPixel + 0x10);
005db566                          var_78_1 = "CodeProbe disabled by #define";
005db56b                          m_CurrentYPixel = m_CurrentYPixel_1;
005db56c                          this->m_CurrentYPixel = m_CurrentYPixel_1;
005db56f                          var_80_1 = 0;
005db573                      label_5db573:
005db573                          QuickWindow::RenderText(edi_1, var_80_1, m_CurrentYPixel, var_78_1, var_74_56);
005db57e                          this->m_CurrentYPixel += 0xc;
005db531                      }
005d9839                  }
005d9839                  else
005d9839                  {
005d9854                      if (eax_8 <= 4)
005d9854                      {
005d985a                          char const* eax_86;
005d985a                          
005d985a                          switch (eax_8)
005d985a                          {
005d9871                              case 0:
005d9871                              {
005d9871                                  sprintf(0x8f0b50, "[%s]", gc_CategoryNames[0]);
005d9888                                  QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005d9894                                  this->m_CurrentYPixel += 0x10;
005d989b                                  ProfilerUI::PrintBudgetStat(this, 0, edi_1);
005d98a5                                  ProfilerUI::PrintBudgetStat(this, 1, edi_1);
005d98af                                  ProfilerUI::PrintBudgetStat(this, 2, edi_1);
005d98c6                                  QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, "UISurfaces Rendered", 0xffcccccc);
005d98dd                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1448));
005d98f3                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9900                                  uint32_t edx_5 = (this->m_CurrentYPixel + 0xc);
005d990f                                  this->m_CurrentYPixel = edx_5;
005d9912                                  QuickWindow::RenderText(edi_1, 0, edx_5, "Textures Uploaded", 0xffcccccc);
005d9929                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1450));
005d993f                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d994c                                  uint32_t edx_8 = (this->m_CurrentYPixel + 0xc);
005d9957                                  this->m_CurrentYPixel = edx_8;
005d995e                                  QuickWindow::RenderText(edi_1, 0, edx_8, "Texture Mem Uploaded", 0xffcccccc);
005d9967                                  *(uint32_t*)((eax_8 * 0x88) + 0x8f1454);
005d998d                                  sprintf(0x8f0b50, "%.02f", "Texture Mem Uploaded");
005d999e                                  sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005d99b4                                  QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005d99c1                                  uint32_t edx_11 = (this->m_CurrentYPixel + 0xc);
005d99d0                                  this->m_CurrentYPixel = edx_11;
005d99d3                                  QuickWindow::RenderText(edi_1, 0, edx_11, "Vertices Uploaded", 0xffcccccc);
005d99ea                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1458));
005d9a00                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9a0d                                  uint32_t edx_14 = (this->m_CurrentYPixel + 0xc);
005d9a1c                                  this->m_CurrentYPixel = edx_14;
005d9a1f                                  QuickWindow::RenderText(edi_1, 0, edx_14, "VB Memory Uploaded", 0xffcccccc);
005d9a28                                  *(uint32_t*)((eax_8 * 0x88) + 0x8f145c);
005d9a4e                                  sprintf(0x8f0b50, "%.02f", "VB Memory Uploaded");
005d9a5f                                  sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005d9a75                                  QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005d9a82                                  uint32_t edx_17 = (this->m_CurrentYPixel + 0xc);
005d9a91                                  this->m_CurrentYPixel = edx_17;
005d9a94                                  QuickWindow::RenderText(edi_1, 0, edx_17, "Recycled Dynamic Verts", 0xffcccccc);
005d9aab                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1460));
005d9ac1                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9ace                                  uint32_t edx_20 = (this->m_CurrentYPixel + 0xc);
005d9add                                  this->m_CurrentYPixel = edx_20;
005d9ae0                                  QuickWindow::RenderText(edi_1, 0, edx_20, "Indices Uploaded", 0xffcccccc);
005d9af7                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1464));
005d9b0d                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9b1a                                  uint32_t edx_23 = (this->m_CurrentYPixel + 0xc);
005d9b29                                  this->m_CurrentYPixel = edx_23;
005d9b2c                                  QuickWindow::RenderText(edi_1, 0, edx_23, "IB Memory Uploaded", 0xffcccccc);
005d9b35                                  *(uint32_t*)((eax_8 * 0x88) + 0x8f1468);
005d9b5b                                  sprintf(0x8f0b50, "%.02f", "IB Memory Uploaded");
005d9b6c                                  sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005d9b82                                  QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005d9b8f                                  uint32_t eax_26 = (this->m_CurrentYPixel + 0xc);
005d9b9c                                  this->m_CurrentYPixel = eax_26;
005d9b9f                                  QuickWindow::RenderText(edi_1, 0, eax_26, "Particles Rendered", 0xffcccccc);
005d9bb6                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f146c));
005d9bcc                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9bd9                                  uint32_t eax_29 = (this->m_CurrentYPixel + 0xc);
005d9be6                                  this->m_CurrentYPixel = eax_29;
005d9be9                                  QuickWindow::RenderText(edi_1, 0, eax_29, "Particle Systems", 0xffcccccc);
005d9c00                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1470));
005d9c16                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9c23                                  uint32_t eax_32 = (this->m_CurrentYPixel + 0xc);
005d9c30                                  this->m_CurrentYPixel = eax_32;
005d9c33                                  QuickWindow::RenderText(edi_1, 0, eax_32, "Material Layers Applied", 0xffcccccc);
005d9c4a                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1474));
005d9c60                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9c6d                                  uint32_t eax_35 = (this->m_CurrentYPixel + 0xc);
005d9c7a                                  this->m_CurrentYPixel = eax_35;
005d9c7d                                  QuickWindow::RenderText(edi_1, 0, eax_35, "D3D Texture Changes", 0xffcccccc);
005d9c94                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1478));
005d9caa                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9cb7                                  uint32_t eax_38 = (this->m_CurrentYPixel + 0xc);
005d9cc4                                  this->m_CurrentYPixel = eax_38;
005d9cc7                                  QuickWindow::RenderText(edi_1, 0, eax_38, "D3D Stream Changes", 0xffcccccc);
005d9cde                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f147c));
005d9cf4                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9d00                                  this->m_CurrentYPixel += 0xc;
005d9d07                                  ProfilerUI::PrintBudgetStat(this, 6, edi_1);
005d9d1e                                  QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, "Texture Memory", 0xffcccccc);
005d9d27                                  *(uint32_t*)((eax_8 * 0x88) + 0x8f1480);
005d9d4d                                  sprintf(0x8f0b50, "%.02f", "Texture Memory");
005d9d5e                                  sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005d9d74                                  QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005d9d81                                  uint32_t eax_43 = (this->m_CurrentYPixel + 0xc);
005d9d8e                                  this->m_CurrentYPixel = eax_43;
005d9d91                                  QuickWindow::RenderText(edi_1, 0, eax_43, "Surface Memory", 0xffcccccc);
005d9d9a                                  *(uint32_t*)((eax_8 * 0x88) + 0x8f1484);
005d9dc0                                  sprintf(0x8f0b50, "%.02f", "Surface Memory");
005d9dd1                                  sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005d9de7                                  QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005d9df4                                  uint32_t eax_46 = (this->m_CurrentYPixel + 0xc);
005d9e01                                  this->m_CurrentYPixel = eax_46;
005d9e04                                  QuickWindow::RenderText(edi_1, 0, eax_46, "Vertex Buffer Memory", 0xffcccccc);
005d9e0d                                  *(uint32_t*)((eax_8 * 0x88) + 0x8f1488);
005d9e33                                  sprintf(0x8f0b50, "%.02f", "Vertex Buffer Memory");
005d9e44                                  sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005d9e5a                                  QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005d9e67                                  uint32_t eax_49 = (this->m_CurrentYPixel + 0xc);
005d9e74                                  this->m_CurrentYPixel = eax_49;
005d9e77                                  QuickWindow::RenderText(edi_1, 0, eax_49, "Index Buffer Memory", 0xffcccccc);
005d9e80                                  *(uint32_t*)((eax_8 * 0x88) + 0x8f148c);
005d9ea6                                  sprintf(0x8f0b50, "%.02f", "Index Buffer Memory");
005d9eb7                                  sprintf(0x8f0750, "%7s MB", 0x8f0b50);
005d9ecd                                  QuickWindow::RenderText(edi_1, 0xac, this->m_CurrentYPixel, &txt2, ebx_7);
005d9eda                                  uint32_t eax_52 = (this->m_CurrentYPixel + 0xc);
005d9ee7                                  this->m_CurrentYPixel = eax_52;
005d9eea                                  QuickWindow::RenderText(edi_1, 0, eax_52, "Sounds Playing", 0xffcccccc);
005d9f01                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1498));
005d9f17                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9f24                                  uint32_t eax_55 = (this->m_CurrentYPixel + 0xc);
005d9f31                                  this->m_CurrentYPixel = eax_55;
005d9f34                                  QuickWindow::RenderText(edi_1, 0, eax_55, "Sounds Queued", 0xffcccccc);
005d9f4b                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f149c));
005d9f61                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9f6e                                  uint32_t eax_58 = (this->m_CurrentYPixel + 0xc);
005d9f7b                                  this->m_CurrentYPixel = eax_58;
005d9f7e                                  QuickWindow::RenderText(edi_1, 0, eax_58, "UIElements Processed", 0xffcccccc);
005d9f95                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14a0));
005d9fab                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005d9fb8                                  uint32_t eax_61 = (this->m_CurrentYPixel + 0xc);
005d9fc5                                  this->m_CurrentYPixel = eax_61;
005d9fc8                                  QuickWindow::RenderText(edi_1, 0, eax_61, "AC1: Landscape Surfaces", 0xffcccccc);
005d9fde                                  sprintf(0x8f0b50, &data_7e8f70, Profiler::CapturedStats.Global.AC1.lsurfCount);
005d9ff4                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da001                                  uint32_t eax_63 = (this->m_CurrentYPixel + 0xc);
005da00e                                  this->m_CurrentYPixel = eax_63;
005da011                                  QuickWindow::RenderText(edi_1, 0, eax_63, "AC1: Static Lights", 0xffcccccc);
005da028                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14a4));
005da03e                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da04b                                  uint32_t eax_66 = (this->m_CurrentYPixel + 0xc);
005da058                                  this->m_CurrentYPixel = eax_66;
005da05b                                  QuickWindow::RenderText(edi_1, 0, eax_66, "AC1: Dynamic Lights", 0xffcccccc);
005da072                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14a8));
005da088                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da095                                  uint32_t eax_69 = (this->m_CurrentYPixel + 0xc);
005da09e                                  this->m_CurrentYPixel = eax_69;
005da0a5                                  QuickWindow::RenderText(edi_1, 0, eax_69, "AC1: Frame Pushes", 0xffcccccc);
005da0bc                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14ac));
005da0d2                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da0df                                  uint32_t eax_72 = (this->m_CurrentYPixel + 0xc);
005da0ec                                  this->m_CurrentYPixel = eax_72;
005da0ef                                  QuickWindow::RenderText(edi_1, 0, eax_72, "AC1: Poly Count", 0xffcccccc);
005da106                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14b0));
005da11c                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da129                                  uint32_t eax_75 = (this->m_CurrentYPixel + 0xc);
005da136                                  this->m_CurrentYPixel = eax_75;
005da139                                  QuickWindow::RenderText(edi_1, 0, eax_75, "AC1: Landblocks Rendered", 0xffcccccc);
005da150                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14b4));
005da166                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da173                                  uint32_t eax_78 = (this->m_CurrentYPixel + 0xc);
005da180                                  this->m_CurrentYPixel = eax_78;
005da183                                  QuickWindow::RenderText(edi_1, 0, eax_78, "AC1: EnvCells Rendered", 0xffcccccc);
005da19a                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14b8));
005da1b0                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da1bd                                  uint32_t eax_81 = (this->m_CurrentYPixel + 0xc);
005da1ca                                  this->m_CurrentYPixel = eax_81;
005da1cd                                  QuickWindow::RenderText(edi_1, 0, eax_81, "AC1: Objects Rendered", 0xffcccccc);
005da1e7                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14bc));
005da1fd                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da20a                                  uint32_t eax_84 = (this->m_CurrentYPixel + 0xc);
005da217                                  this->m_CurrentYPixel = eax_84;
005da21a                                  QuickWindow::RenderText(edi_1, 0, eax_84, "AC1: Portals Traversed", 0xffcccccc);
005da234                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f14c0));
005da23c                                  var_74_56 = ebx_7;
005da23d                                  var_78_1 = &txt1;
005da242                                  m_CurrentYPixel = this->m_CurrentYPixel;
005da243                                  var_80_1 = 0xb4;
005d9871                                  break;
005d9871                              }
005da24d                              case 1:
005da24d                              {
005da24d                                  eax_86 = gc_CategoryNames[1];
005da477                              label_5da477:
005da477                                  sprintf(0x8f0b50, "[%s]", eax_86);
005da48e                                  QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005da49b                                  uint32_t edx_55 = (this->m_CurrentYPixel + 0x10);
005da4aa                                  this->m_CurrentYPixel = edx_55;
005da4ad                                  QuickWindow::RenderText(edi_1, 0, edx_55, "Triangles Rendered", 0xffcccccc);
005da4c3                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f143c));
005da4d9                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da4e6                                  uint32_t edx_58 = (this->m_CurrentYPixel + 0xc);
005da4f5                                  this->m_CurrentYPixel = edx_58;
005da4f8                                  QuickWindow::RenderText(edi_1, 0, edx_58, "Vertices Rendered", 0xffcccccc);
005da50f                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1440));
005da525                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da532                                  uint32_t edx_61 = (this->m_CurrentYPixel + 0xc);
005da541                                  this->m_CurrentYPixel = edx_61;
005da544                                  QuickWindow::RenderText(edi_1, 0, edx_61, "Batches Rendered", 0xffcccccc);
005da55b                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1444));
005da563                                  var_74_56 = ebx_7;
005da564                                  var_78_1 = &txt1;
005da569                                  m_CurrentYPixel = this->m_CurrentYPixel;
005da56a                                  var_80_1 = 0xb4;
005da24d                                  break;
005da24d                              }
005da268                              case 2:
005da268                              {
005da268                                  sprintf(0x8f0b50, "[%s]", gc_CategoryNames[2]);
005da27f                                  QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005da28c                                  uint32_t eax_89 = (this->m_CurrentYPixel + 0x10);
005da299                                  this->m_CurrentYPixel = eax_89;
005da29c                                  QuickWindow::RenderText(edi_1, 0, eax_89, "Triangles Rendered", 0xffcccccc);
005da2b2                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f143c));
005da2c8                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da2d5                                  uint32_t eax_92 = (this->m_CurrentYPixel + 0xc);
005da2e2                                  this->m_CurrentYPixel = eax_92;
005da2e5                                  QuickWindow::RenderText(edi_1, 0, eax_92, "Vertices Rendered", 0xffcccccc);
005da2fc                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1440));
005da312                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da31f                                  uint32_t eax_95 = (this->m_CurrentYPixel + 0xc);
005da32c                                  this->m_CurrentYPixel = eax_95;
005da32f                                  QuickWindow::RenderText(edi_1, 0, eax_95, "Batches Rendered", 0xffcccccc);
005da346                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1444));
005da34e                                  var_74_56 = ebx_7;
005da34f                                  var_78_1 = &txt1;
005da354                                  m_CurrentYPixel = this->m_CurrentYPixel;
005da355                                  var_80_1 = 0xb4;
005da268                                  break;
005da268                              }
005da370                              case 3:
005da370                              {
005da370                                  sprintf(0x8f0b50, "[%s]", gc_CategoryNames[3]);
005da387                                  QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005da394                                  uint32_t eax_98 = (this->m_CurrentYPixel + 0x10);
005da3a1                                  this->m_CurrentYPixel = eax_98;
005da3a4                                  QuickWindow::RenderText(edi_1, 0, eax_98, "Triangles Rendered", 0xffcccccc);
005da3ba                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f143c));
005da3d0                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da3dd                                  uint32_t eax_101 = (this->m_CurrentYPixel + 0xc);
005da3ea                                  this->m_CurrentYPixel = eax_101;
005da3ed                                  QuickWindow::RenderText(edi_1, 0, eax_101, "Vertices Rendered", 0xffcccccc);
005da404                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1440));
005da41a                                  QuickWindow::RenderText(edi_1, 0xb4, this->m_CurrentYPixel, &txt1, ebx_7);
005da427                                  uint32_t eax_104 = (this->m_CurrentYPixel + 0xc);
005da434                                  this->m_CurrentYPixel = eax_104;
005da437                                  QuickWindow::RenderText(edi_1, 0, eax_104, "Batches Rendered", 0xffcccccc);
005da44e                                  sprintf(0x8f0b50, &data_7e8f70, *(uint32_t*)((eax_8 * 0x88) + 0x8f1444));
005da456                                  var_74_56 = ebx_7;
005da457                                  var_78_1 = &txt1;
005da45c                                  m_CurrentYPixel = this->m_CurrentYPixel;
005da45d                                  var_80_1 = 0xb4;
005da370                                  break;
005da370                              }
005da467                              case 4:
005da467                              {
005da467                                  eax_86 = gc_CategoryNames[4];
005da467                                  goto label_5da477;
005da467                              }
005d985a                          }
005d985a                          
005d985a                          goto label_5db573;
005d9854                      }
005d9854                      
005da57f                      sprintf(0x8f0750, "<Unknown/%i>", eax_8);
005da590                      sprintf(0x8f0b50, "[%s]", 0x8f0750);
005da5a7                      QuickWindow::RenderText(edi_1, 0, this->m_CurrentYPixel, &txt1, 0xff000000);
005db57e                      this->m_CurrentYPixel += 0x10;
005d9839                  }
005db589                  cond:4_1 = (var_50_1 + 1) < this->m_Windows.m_num;
005db58b                  var_50_1 += 1;
005db58f              } while (cond:4_1);
005d9804          }
005d9804          
005db595          this->m_pToggleToolbarWindow->vtable->Render();
005db59d          this->m_pStatsToolbarWindow->vtable->Render();
005db59d          
005db5ac          if (this->m_ToolbarButtons.m_num > 0)
005db5ac          {
005db5ae              int32_t i = 0;
005db5ae              
005db5c1              do
005db5c1              {
005db5b0                  this->m_ToolbarButtons.m_data[i]->vtable->Render();
005db5be                  i += 1;
005db5c1              } while (i < this->m_ToolbarButtons.m_num);
005db5ac          }
005db5ac          
005db5c3          this->m_pCategoryWindow->vtable->Render();
005db5ce          int32_t i_1 = 0;
005db5ce          
005db5d2          if (this->m_CategoryButtons.m_num > 0)
005db5d2          {
005db5e5              do
005db5e5              {
005db5d4                  this->m_CategoryButtons.m_data[i_1]->vtable->Render();
005db5e2                  i_1 += 1;
005db5e5              } while (i_1 < this->m_CategoryButtons.m_num);
005db5d2          }
005db5d2          
005db5ed          RenderDeviceD3D::EndRenderingDebugText(RenderDevice::render_device);
005db5f2          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
005db5f8          int32_t eax_212;
005db5f8          eax_212 = RenderDevice::render_device_1->m_WireframeMode;
005db5fe          char temp0_1 = eax_212;
005db5fe          eax_212 = -(eax_212);
005db606          RenderDeviceD3D::SetFillMode(RenderDevice::render_device_1, ((eax_212 - eax_212) + 3));
005d9784      }
005d9784      
005d977a      var_4;
005d9770  }

005db418                                                                          8d a4 24 00 00 00 00 90                          ..$.....
005db613                                                           90                                                         .
005db614  uint32_t jump_table_5db614[0x5] = 
005db614  {
005db614      [0x0] =  0x005d9861
005db618      [0x1] =  0x005da24d
005db61c      [0x2] =  0x005da257
005db620      [0x3] =  0x005da35f
005db624      [0x4] =  0x005da467
005db628  }

005db628                          90 90 90 90 90 90 90 90                                                          ........

005db630  uint8_t __thiscall ProfilerUI::AddWindow(class ProfilerUI* this, enum ProfilerTypes::CategoryType const arg2, class RGBAColor const* arg3, uint8_t const arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7, uint32_t const arg8, uint32_t* arg9)

005db630  {
005db630      uint32_t const eax_11 = arg8;
005db63a      uint32_t* esi = arg9;
005db65a      uint32_t* edi = nullptr;
005db65d      *(uint32_t*)esi = 0;
005db65f      arg9 = nullptr;
005db65f      
005db66f      if (QuickWindow::Create(&arg8, &arg9, arg5, arg6, arg7, eax_11, 6, 4)->m_val < 0)
005db66f      {
005db6fc          class TResult* eax_1;
005db6fc          eax_1 = 0;
005db6ff          return 0;
005db66f      }
005db66f      
005db67e      QuickWindow::SetColorAndOpacity(arg9, arg3);
005db685      uint32_t* eax_3 = operator new(0x10);
005db685      
005db68f      if (eax_3 != 0)
005db68f      {
005db699          eax_3[3] = arg9;
005db69c          uint32_t ecx_4 = data_823b10;
005db6a2          eax_3[1] = arg4;
005db6a9          *(uint32_t*)eax_3 = ecx_4;
005db6ab          eax_3[2] = arg2;
005db6ae          *(uint32_t*)esi = ecx_4;
005db6b1          data_823b10 = (ecx_4 + 1);
005db6b7          edi = eax_3;
005db68f      }
005db68f      
005db6c2      int32_t eax_5 = (this->m_Windows.m_sizeAndDeallocate & 0x7fffffff);
005db6c9      uint8_t eax_8;
005db6c9      
005db6c9      if (this->m_Windows.m_num >= eax_5)
005db6d7          eax_8 = SmartArray<unsigned long,1>::grow(&this->m_Windows, SmartArray<unsigned long,1>::get_new_size(&this->m_Windows, (eax_5 + 1)));
005db6d7      
005db6de      if ((this->m_Windows.m_num < eax_5 || eax_8 != 0))
005db6de      {
005db6bf          this->m_Windows.m_data[this->m_Windows.m_num] = edi;
005db6bf          this->m_Windows.m_num += 1;
005db6de      }
005db6de      
005db6ed      ProfilerUI::RepositionWindows(this);
005db6f4      int32_t eax_10;
005db6f4      eax_10 = 1;
005db6f7      return 1;
005db630  }

005db702        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005db710  void __fastcall ProfilerUI::RebuildToolbarButtons(class ProfilerUI* this)

005db710  {
005db713      int32_t ebx;
005db713      int32_t var_44 = ebx;
005db717      class ProfilerUI* this_1 = this;
005db720      int32_t i = 0;
005db720      
005db724      if (this->m_ToolbarButtons.m_num > 0)
005db724      {
005db751          do
005db751          {
005db729              int32_t* eax_2 = this->m_ToolbarButtons.m_data[i];
005db729              
005db72e              if (eax_2 != 0)
005db72e              {
005db730                  int32_t temp0_1 = eax_2[1];
005db730                  eax_2[1] -= 1;
005db730                  
005db733                  if (temp0_1 == 1)
005db73b                      **(uint32_t**)eax_2(1);
005db73b                  
005db741                  this_1->m_ToolbarButtons.m_data[i] = 0;
005db747                  this = this_1;
005db72e              }
005db72e              
005db74e              i += 1;
005db751          } while (i < this->m_ToolbarButtons.m_num);
005db724      }
005db724      
005db753      uint32_t m_sizeAndDeallocate = this->m_ToolbarButtons.m_sizeAndDeallocate;
005db756      this->m_ToolbarButtons.m_num = 0;
005db756      
005db76a      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005db76a      {
005db76f          operator delete[](this->m_ToolbarButtons.m_data);
005db756          this->m_ToolbarButtons.m_data = 0;
005db756          this->m_ToolbarButtons.m_sizeAndDeallocate = 0;
005db76a      }
005db76a      else if (this->m_ToolbarButtons.m_data != 0)
005db780      {
005db782          int32_t eax_6 = (m_sizeAndDeallocate & 0x7fffffff);
005db787          int32_t eax_7 = (eax_6 - 1);
005db787          
005db788          if ((eax_6 - 1) >= 0)
005db788          {
005db797              int32_t temp2_1;
005db797              
005db797              do
005db797              {
005db790                  temp2_1 = eax_7;
005db790                  eax_7 -= 1;
005db756                  this->m_ToolbarButtons.m_data[(eax_7 + 1)] = 0;
005db797              } while ((temp2_1 - 1) >= 0);
005db788          }
005db780      }
005db780      
005db7a3      class PStringBase<char> PStringBase<char>::s_NullBuffer_5 = 0;
005db7a5      uint32_t m_ClientAreaWidth = this_1->m_pToggleToolbarWindow->m_ClientAreaWidth;
005db7a9      class PStringBase<char> PStringBase<char>::s_NullBuffer_4 = 0;
005db7ad      int32_t ebp = 0;
005db7b3      class QuickButton* var_3c;
005db7b3      class PStringBase<char> var_38;
005db7b3      void __return;
005db7b3      int32_t var_24;
005db7b3      uint32_t ecx_3;
005db7b3      
005db7b3      while (true)
005db7b3      {
005db7b3          char* esi_1 = gc_ToolbarToggleButtonNames[PStringBase<char>::s_NullBuffer_5];
005db7bc          var_3c = nullptr;
005db7bc          
005db7c5          if ((esi_1 == 0 || *(uint8_t*)esi_1 == 0))
005db7c5          {
005db7fc              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005db801              var_38 = PStringBase<char>::s_NullBuffer_1;
005db809              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005db7c5          }
005db7c5          else
005db7c5          {
005db7c7              char* eax_9 = esi_1;
005db7c7              
005db7d5              do
005db7d5              {
005db7d0                  ecx_3 = *(uint8_t*)eax_9;
005db7d2                  eax_9 = &eax_9[1];
005db7d5              } while (ecx_3 != 0);
005db7d5              
005db7de              PStringBase<char>::allocate_ref_buffer(&var_38, (eax_9 - &eax_9[1]));
005db7e3              uint8_t* edx_6 = var_38;
005db7e7              char* ecx_5 = esi_1;
005db7f8              uint8_t i_1;
005db7f8              
005db7f8              do
005db7f8              {
005db7f0                  i_1 = *(uint8_t*)ecx_5;
005db7f2                  ecx_5 = &ecx_5[1];
005db7f3                  *(uint8_t*)edx_6 = i_1;
005db7f5                  edx_6 = &edx_6[1];
005db7f8              } while (i_1 != 0);
005db7c5          }
005db7c5          
005db813          class QuickWindow* m_pToggleToolbarWindow = this_1->m_pToggleToolbarWindow;
005db84a          ebx = QuickButton::Create(&__return, &var_3c, m_pToggleToolbarWindow->m_ClientAreaX, (m_pToggleToolbarWindow->m_ClientAreaY + ebp), m_ClientAreaWidth, 0x14, 4, 2, &var_38)->m_val >= 0;
005db84d          int32_t* esi_4 = (var_38 - 0x14);
005db854          int32_t eax_14;
005db854          eax_14 = InterlockedDecrement(&esi_4[1]);
005db854          
005db860          if ((eax_14 == 0 && esi_4 != 0))
005db868              **(uint32_t**)esi_4(1);
005db868          
005db86c          if (ebx != 0)
005db86c          {
005db87e              QuickWindow::SetWindowID(var_3c, (PStringBase<char>::s_NullBuffer_4 + 0x14));
005db888              class QuickButton* ecx_11 = var_3c;
005db88c              var_24 = 0x3f008081;
005db894              int32_t var_20_1 = 0x3f0a8a8b;
005db89c              int32_t var_1c_1 = 0x3ee6e6e7;
005db8a4              int32_t var_18;
005db8a4              __builtin_strncpy(&var_18, "333?", 4);
005db8ac              QuickWindow::SetColorAndOpacity(ecx_11, &var_24);
005db8bb              class SmartArray<QuickButton *,1>* edi = &this_1->m_ToolbarButtons;
005db8be              int32_t eax_18 = (this_1->m_ToolbarButtons.m_sizeAndDeallocate & 0x7fffffff);
005db8be              
005db8c5              if (this_1->m_ToolbarButtons.m_num < eax_18)
005db8c5              {
005db91f                  edi->m_data[edi->m_num] = var_3c;
005db928                  edi->m_num += 1;
005db8c5              }
005db8c5              else
005db8c5              {
005db8c7                  uint32_t edx_10 = (eax_18 + 1);
005db8c7                  
005db8cd                  if (edx_10 <= 8)
005db8cf                      edx_10 = 8;
005db8cd                  else if (edx_10 <= 0x4000)
005db8dc                  {
005db8fb                      int32_t eflags_1;
005db8fb                      char eax_22;
005db8fb                      eax_22 = __bsr_gprv_memv(edx_10);
005db907                      int32_t esi_5 = (1 << eax_22);
005db907                      
005db90b                      if (edx_10 > esi_5)
005db90d                          edx_10 = (esi_5 * 2);
005db8dc                  }
005db8dc                  else
005db8dc                  {
005db8e0                      int32_t eax_20 = (edx_10 & 0x3fff);
005db8e0                      
005db8e5                      if (eax_20 != 0)
005db8ee                          edx_10 += (0x4000 - eax_20);
005db8dc                  }
005db8dc                  
005db913                  uint8_t eax_23;
005db913                  eax_23 = SmartArray<unsigned long,1>::grow(edi, edx_10);
005db913                  
005db91a                  if (eax_23 != 0)
005db91a                  {
005db91f                      edi->m_data[edi->m_num] = var_3c;
005db928                      edi->m_num += 1;
005db91a                  }
005db8c5              }
005db86c          }
005db86c          
005db92f          PStringBase<char>::s_NullBuffer_5 = (PStringBase<char>::s_NullBuffer_4 + 1);
005db930          ebp += 0x14;
005db936          PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_5;
005db936          
005db93a          if (PStringBase<char>::s_NullBuffer_5 >= 3)
005db93a              break;
005db7b3      }
005db7b3      
005db940      int32_t i_2 = 0;
005db942      void* const var_14 = &data_7e93fc;
005db94a      void* const var_10 = &data_7e93f8;
005db952      void* const var_c = &data_7cc0f0;
005db95a      void* const var_8 = &data_7e93f4;
005db962      void* const var_4 = &data_7e93f0;
005db96a      PStringBase<char>::s_NullBuffer_4 = 0;
005db96a      
005dbb00      do
005dbb00      {
005db974          char* esi_6 = &var_14[PStringBase<char>::s_NullBuffer_4];
005db97a          var_3c = nullptr;
005db97a          
005db987          if ((esi_6 == 0 || *(uint8_t*)esi_6 == 0))
005db987          {
005db9bc              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
005db9c1              var_38 = PStringBase<char>::s_NullBuffer_2;
005db9c9              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
005db987          }
005db987          else
005db987          {
005db989              char* eax_26 = esi_6;
005db989              
005db995              do
005db995              {
005db990                  ecx_3 = *(uint8_t*)eax_26;
005db992                  eax_26 = &eax_26[1];
005db995              } while (ecx_3 != 0);
005db995              
005db99e              PStringBase<char>::allocate_ref_buffer(&var_38, (eax_26 - &eax_26[1]));
005db9a3              class PStringBase<char> edx_14 = var_38;
005db9a7              char* ecx_17 = esi_6;
005db9b8              uint8_t j;
005db9b8              
005db9b8              do
005db9b8              {
005db9b0                  j = *(uint8_t*)ecx_17;
005db9b2                  ecx_17 = &ecx_17[1];
005db9b3                  *(uint8_t*)edx_14 = j;
005db9b5                  edx_14 += 1;
005db9b8              } while (j != 0);
005db987          }
005db987          
005db9d3          class QuickWindow* m_pToggleToolbarWindow_1 = this_1->m_pToggleToolbarWindow;
005dba0d          ebx = QuickButton::Create(&__return, &var_3c, (m_pToggleToolbarWindow_1->m_ClientAreaX + i_2), (m_pToggleToolbarWindow_1->m_ClientAreaY + 0x8e), 0x1b, 0x14, 4, 2, &var_38)->m_val >= 0;
005dba10          int32_t* esi_9 = (var_38 - 0x14);
005dba17          int32_t eax_34;
005dba17          eax_34 = InterlockedDecrement(&esi_9[1]);
005dba17          
005dba23          if ((eax_34 == 0 && esi_9 != 0))
005dba2b              **(uint32_t**)esi_9(1);
005dba2b          
005dba2f          if (ebx != 0)
005dba2f          {
005dba41              QuickWindow::SetWindowID(var_3c, (PStringBase<char>::s_NullBuffer_4 + 0xa));
005dba4b              class QuickButton* ecx_22 = var_3c;
005dba4f              var_24 = 0x3f008081;
005dba57              int32_t var_20_2 = 0x3f0a8a8b;
005dba5f              int32_t var_1c_2 = 0x3ee6e6e7;
005dba67              int32_t var_18_1;
005dba67              __builtin_strncpy(&var_18_1, "333?", 4);
005dba6f              QuickWindow::SetColorAndOpacity(ecx_22, &var_24);
005dba7e              class SmartArray<QuickButton *,1>* edi_2 = &this_1->m_ToolbarButtons;
005dba81              int32_t eax_38 = (this_1->m_ToolbarButtons.m_sizeAndDeallocate & 0x7fffffff);
005dba81              
005dba88              if (this_1->m_ToolbarButtons.m_num < eax_38)
005dba88              {
005dbae2                  edi_2->m_data[edi_2->m_num] = var_3c;
005dbaeb                  edi_2->m_num += 1;
005dba88              }
005dba88              else
005dba88              {
005dba8a                  uint32_t edx_16 = (eax_38 + 1);
005dba8a                  
005dba90                  if (edx_16 <= 8)
005dba92                      edx_16 = 8;
005dba90                  else if (edx_16 <= 0x4000)
005dba9f                  {
005dbabe                      int32_t eflags_2;
005dbabe                      char eax_42;
005dbabe                      eax_42 = __bsr_gprv_memv(edx_16);
005dbaca                      int32_t esi_10 = (1 << eax_42);
005dbaca                      
005dbace                      if (edx_16 > esi_10)
005dbad0                          edx_16 = (esi_10 * 2);
005dba9f                  }
005dba9f                  else
005dba9f                  {
005dbaa3                      int32_t eax_40 = (edx_16 & 0x3fff);
005dbaa3                      
005dbaa8                      if (eax_40 != 0)
005dbab1                          edx_16 += (0x4000 - eax_40);
005dba9f                  }
005dba9f                  
005dbad6                  uint8_t eax_43;
005dbad6                  eax_43 = SmartArray<unsigned long,1>::grow(edi_2, edx_16);
005dbad6                  
005dbadd                  if (eax_43 != 0)
005dbadd                  {
005dbae2                      edi_2->m_data[edi_2->m_num] = var_3c;
005dbaeb                      edi_2->m_num += 1;
005dbadd                  }
005dba88              }
005dba2f          }
005dba2f          
005dbaf3          i_2 += 0x1b;
005dbafc          PStringBase<char>::s_NullBuffer_4 += 1;
005dbb00      } while (i_2 < 0x87);
005dbb00      
005dbb10      class PStringBase<char> i_3 = 0;
005dbb12      class QuickButton* m_ClientAreaWidth_1 = this_1->m_pStatsToolbarWindow->m_ClientAreaWidth;
005dbb16      var_38 = 0;
005dbb1a      int32_t ebp_1 = 0;
005dbb1a      
005dbca6      do
005dbca6      {
005dbb20          uint8_t* esi_11 = gc_ToolbarStatsButtonNames[i_3];
005dbb29          var_3c = nullptr;
005dbb29          
005dbb36          if ((esi_11 == 0 || *(uint8_t*)esi_11 == 0))
005dbb36          {
005dbb6c              class PStringBase<char> PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
005dbb71              PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
005dbb79              InterlockedIncrement((PStringBase<char>::s_NullBuffer_3 - 0x10));
005dbb36          }
005dbb36          else
005dbb36          {
005dbb38              uint8_t* eax_46 = esi_11;
005dbb45              uint8_t j_1;
005dbb45              
005dbb45              do
005dbb45              {
005dbb40                  j_1 = *(uint8_t*)eax_46;
005dbb42                  eax_46 = &eax_46[1];
005dbb45              } while (j_1 != 0);
005dbb4e              PStringBase<char>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_4, (eax_46 - &eax_46[1]));
005dbb53              class PStringBase<char> PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_4;
005dbb57              uint8_t* ecx_29 = esi_11;
005dbb68              uint8_t j_2;
005dbb68              
005dbb68              do
005dbb68              {
005dbb60                  j_2 = *(uint8_t*)ecx_29;
005dbb62                  ecx_29 = &ecx_29[1];
005dbb63                  *(uint8_t*)PStringBase<char>::s_NullBuffer_6 = j_2;
005dbb65                  PStringBase<char>::s_NullBuffer_6 += 1;
005dbb68              } while (j_2 != 0);
005dbb36          }
005dbb36          
005dbb83          class QuickWindow* m_pStatsToolbarWindow = this_1->m_pStatsToolbarWindow;
005dbbba          ebx = QuickButton::Create(&__return, &var_3c, m_pStatsToolbarWindow->m_ClientAreaX, (m_pStatsToolbarWindow->m_ClientAreaY + ebp_1), m_ClientAreaWidth_1, 0x14, 4, 2, &PStringBase<char>::s_NullBuffer_4)->m_val >= 0;
005dbbbd          int32_t* esi_14 = (PStringBase<char>::s_NullBuffer_4 - 0x14);
005dbbc4          int32_t eax_51;
005dbbc4          class QuickButton* ecx_27;
005dbbc4          eax_51 = InterlockedDecrement(&esi_14[1]);
005dbbc4          
005dbbd0          if ((eax_51 == 0 && esi_14 != 0))
005dbbd8              **(uint32_t**)esi_14(1);
005dbbd8          
005dbbdc          if (ebx != 0)
005dbbdc          {
005dbbea              QuickWindow::SetWindowID(var_3c, (i_3 + 0x1e));
005dbbef              class QuickButton* ecx_35 = var_3c;
005dbbf8              var_24 = 0x3f008081;
005dbc00              int32_t var_20_3 = 0x3f0a8a8b;
005dbc08              int32_t var_1c_3 = 0x3ee6e6e7;
005dbc10              int32_t var_18_2;
005dbc10              __builtin_strncpy(&var_18_2, "333?", 4);
005dbc18              QuickWindow::SetColorAndOpacity(ecx_35, &var_24);
005dbc2a              int32_t eax_53 = (this_1->m_ToolbarButtons.m_sizeAndDeallocate & 0x7fffffff);
005dbc2a              
005dbc31              if (this_1->m_ToolbarButtons.m_num < eax_53)
005dbc31              {
005dbc27                  this_1->m_ToolbarButtons.m_data[this_1->m_ToolbarButtons.m_num] = var_3c;
005dbc27                  this_1->m_ToolbarButtons.m_num += 1;
005dbc31              }
005dbc31              else
005dbc31              {
005dbc33                  uint32_t edx_25 = (eax_53 + 1);
005dbc33                  
005dbc39                  if (edx_25 <= 8)
005dbc3b                      edx_25 = 8;
005dbc39                  else if (edx_25 <= 0x4000)
005dbc48                  {
005dbc67                      int32_t eflags_3;
005dbc67                      char eax_57;
005dbc67                      eax_57 = __bsr_gprv_memv(edx_25);
005dbc73                      int32_t esi_15 = (1 << eax_57);
005dbc73                      
005dbc77                      if (edx_25 > esi_15)
005dbc79                          edx_25 = (esi_15 * 2);
005dbc48                  }
005dbc48                  else
005dbc48                  {
005dbc4c                      int32_t eax_55 = (edx_25 & 0x3fff);
005dbc4c                      
005dbc51                      if (eax_55 != 0)
005dbc5a                          edx_25 += (0x4000 - eax_55);
005dbc48                  }
005dbc48                  
005dbc7f                  uint8_t eax_58;
005dbc7f                  eax_58 = SmartArray<unsigned long,1>::grow(&this_1->m_ToolbarButtons, edx_25);
005dbc7f                  
005dbc86                  if (eax_58 != 0)
005dbc86                  {
005dbc27                      this_1->m_ToolbarButtons.m_data[this_1->m_ToolbarButtons.m_num] = var_3c;
005dbc27                      this_1->m_ToolbarButtons.m_num += 1;
005dbc86                  }
005dbc31              }
005dbc31              
005dbc97              i_3 = var_38;
005dbbdc          }
005dbbdc          
005dbc9b          i_3 += 1;
005dbc9c          ebp_1 += 0x14;
005dbca2          var_38 = i_3;
005dbca6      } while (i_3 < 4);
005db710  }

005dbcb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005dbcc0  void __fastcall ProfilerUI::RebuildCategoryWindow(class ProfilerUI* this)

005dbcc0  {
005dbcc6      class ProfilerUI* this_1 = this;
005dbccf      int32_t i = 0;
005dbccf      
005dbcd4      if (this->m_CategoryButtons.m_num > 0)
005dbcd4      {
005dbd01          do
005dbd01          {
005dbcd9              int32_t* eax_2 = this->m_CategoryButtons.m_data[i];
005dbcd9              
005dbcde              if (eax_2 != 0)
005dbcde              {
005dbce0                  int32_t temp0_1 = eax_2[1];
005dbce0                  eax_2[1] -= 1;
005dbce0                  
005dbce3                  if (temp0_1 == 1)
005dbceb                      **(uint32_t**)eax_2(1);
005dbceb                  
005dbcf1                  this_1->m_CategoryButtons.m_data[i] = 0;
005dbcf7                  this = this_1;
005dbcde              }
005dbcde              
005dbcfe              i += 1;
005dbd01          } while (i < this->m_CategoryButtons.m_num);
005dbcd4      }
005dbcd4      
005dbd03      uint32_t m_sizeAndDeallocate = this->m_CategoryButtons.m_sizeAndDeallocate;
005dbd06      class SmartArray<QuickButton *,1>* esi = &this->m_CategoryButtons;
005dbd17      esi->m_num = 0;
005dbd1a      enum ProfilerTypes::CategoryType i_2;
005dbd1a      int32_t ebp;
005dbd1a      enum ProfilerTypes::CategoryType i_1;
005dbd1a      
005dbd1a      if ((m_sizeAndDeallocate & 0x80000000) != 0x80000000)
005dbd1a      {
005dbd38          if (esi->m_data != 0)
005dbd38          {
005dbd3a              int32_t eax_6 = (m_sizeAndDeallocate & 0x7fffffff);
005dbd3f              int32_t eax_7 = (eax_6 - 1);
005dbd3f              
005dbd40              if ((eax_6 - 1) >= 0)
005dbd40              {
005dbd49                  int32_t temp2_1;
005dbd49                  
005dbd49                  do
005dbd49                  {
005dbd42                      temp2_1 = eax_7;
005dbd42                      eax_7 -= 1;
005dbd45                      &esi->m_data->m_cRef[eax_7] = 0;
005dbd49                  } while ((temp2_1 - 1) >= 0);
005dbd40              }
005dbd38          }
005dbd38          
005dbd4b          i_1 = All;
005dbd4d          i_2 = All;
005dbd51          ebp = 0;
005dbd1a      }
005dbd1a      else
005dbd1a      {
005dbd1f          operator delete[](esi->m_data);
005dbd24          i_1 = All;
005dbd29          esi->m_data = 0;
005dbd2b          esi->m_sizeAndDeallocate = 0;
005dbd2e          i_2 = All;
005dbd32          ebp = 0;
005dbd1a      }
005dbd1a      
005dbf12      do
005dbf12      {
005dbd60          char* esi_1 = gc_CategoryNames[i_1];
005dbd69          class QuickButton* var_28 = nullptr;
005dbd72          class PStringBase<char> PStringBase<char>::s_NullBuffer_2;
005dbd72          
005dbd72          if ((esi_1 == 0 || *(uint8_t*)esi_1 == 0))
005dbd72          {
005dbdac              class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005dbdb1              PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005dbdb9              InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
005dbd72          }
005dbd72          else
005dbd72          {
005dbd74              char* eax_8 = esi_1;
005dbd74              
005dbd85              do
005dbd85              {
005dbd80                  this = *(uint8_t*)eax_8;
005dbd82                  eax_8 = &eax_8[1];
005dbd85              } while (this != 0);
005dbd85              
005dbd8e              PStringBase<char>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_2, (eax_8 - &eax_8[1]));
005dbd93              uint8_t* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
005dbd97              char* ecx_3 = esi_1;
005dbda8              uint8_t j;
005dbda8              
005dbda8              do
005dbda8              {
005dbda0                  j = *(uint8_t*)ecx_3;
005dbda2                  ecx_3 = &ecx_3[1];
005dbda3                  *(uint8_t*)PStringBase<char>::s_NullBuffer_3 = j;
005dbda5                  PStringBase<char>::s_NullBuffer_3 = &PStringBase<char>::s_NullBuffer_3[1];
005dbda8              } while (j != 0);
005dbd72          }
005dbd72          
005dbdc3          class QuickWindow* m_pCategoryWindow = this_1->m_pCategoryWindow;
005dbdf4          void __return;
005dbdf4          bool cond:5_1 = QuickButton::Create(&__return, &var_28, m_pCategoryWindow->m_ClientAreaX, (m_pCategoryWindow->m_ClientAreaY + ebp), m_pCategoryWindow->m_ClientAreaWidth, 0x14, 4, 2, &PStringBase<char>::s_NullBuffer_2)->m_val >= 0;
005dbdfd          int32_t* esi_4 = (PStringBase<char>::s_NullBuffer_2 - 0x14);
005dbe04          int32_t eax_13;
005dbe04          eax_13 = InterlockedDecrement(&esi_4[1]);
005dbe04          
005dbe10          if ((eax_13 == 0 && esi_4 != 0))
005dbe18              **(uint32_t**)esi_4(1);
005dbe18          
005dbe1c          if (cond:5_1 != 0)
005dbe1c          {
005dbe22              class QuickButton* ecx_8 = var_28;
005dbe2b              int32_t var_10 = 0x3f008081;
005dbe33              int32_t var_c_1 = 0x3f0a8a8b;
005dbe3b              int32_t var_8_1 = 0x3ee6e6e7;
005dbe43              int32_t var_4;
005dbe43              __builtin_strncpy(&var_4, "333?", 4);
005dbe4b              QuickWindow::SetColorAndOpacity(ecx_8, &var_10);
005dbe54              uint32_t m_num = this_1->m_Windows.m_num;
005dbe57              int32_t eax_14 = 0;
005dbe5b              char var_1c_1;
005dbe5b              
005dbe5b              if (m_num <= 0)
005dbe5b              {
005dbe6f              label_5dbe6f:
005dbe6f                  var_1c_1 = 0;
005dbe5b              }
005dbe5b              else
005dbe5b              {
005dbe5d                  class ProfilerUIWindow** m_data = this_1->m_Windows.m_data;
005dbe5d                  
005dbe65                  while (*(uint32_t*)m_data->m_Category != i_1)
005dbe65                  {
005dbe67                      eax_14 += 1;
005dbe68                      m_data = &m_data[1];
005dbe68                      
005dbe6d                      if (eax_14 >= m_num)
005dbe6d                          goto label_5dbe6f;
005dbe65                  }
005dbe65                  
005dbea7                  var_1c_1 = 1;
005dbe5b              }
005dbe5b              
005dbe7d              QuickButton::SetCheckedState(var_28, var_1c_1);
005dbe8f              int32_t eax_16 = (this_1->m_CategoryButtons.m_sizeAndDeallocate & 0x7fffffff);
005dbe8f              
005dbe96              if (this_1->m_CategoryButtons.m_num < eax_16)
005dbe96              {
005dbe8c                  this_1->m_CategoryButtons.m_data[this_1->m_CategoryButtons.m_num] = var_28;
005dbe8c                  this_1->m_CategoryButtons.m_num += 1;
005dbe96              }
005dbe96              else
005dbe96              {
005dbe98                  uint32_t edx_8 = (eax_16 + 1);
005dbe98                  
005dbe9e                  if (edx_8 <= 8)
005dbea0                      edx_8 = 8;
005dbe9e                  else if (edx_8 <= 0x4000)
005dbeb4                  {
005dbed3                      int32_t eflags_1;
005dbed3                      char eax_20;
005dbed3                      eax_20 = __bsr_gprv_memv(edx_8);
005dbedf                      int32_t esi_6 = (1 << eax_20);
005dbedf                      
005dbee3                      if (edx_8 > esi_6)
005dbee5                          edx_8 = (esi_6 * 2);
005dbeb4                  }
005dbeb4                  else
005dbeb4                  {
005dbeb8                      int32_t eax_18 = (edx_8 & 0x3fff);
005dbeb8                      
005dbebd                      if (eax_18 != 0)
005dbec6                          edx_8 += (0x4000 - eax_18);
005dbeb4                  }
005dbeb4                  
005dbeeb                  uint8_t eax_21;
005dbeeb                  eax_21 = SmartArray<unsigned long,1>::grow(&this_1->m_CategoryButtons, edx_8);
005dbeeb                  
005dbef2                  if (eax_21 != 0)
005dbef2                  {
005dbe8c                      this_1->m_CategoryButtons.m_data[this_1->m_CategoryButtons.m_num] = var_28;
005dbe8c                      this_1->m_CategoryButtons.m_num += 1;
005dbef2                  }
005dbe96              }
005dbe96              
005dbf03              i_1 = i_2;
005dbe1c          }
005dbe1c          
005dbf07          i_1 += 1;
005dbf08          ebp += 0x14;
005dbf0e          i_2 = i_1;
005dbf12      } while (i_1 < NumCategories);
005dbcc0  }

005dbd59                                                                             8d a4 24 00 00 00 00                           ..$....

005dbf20  void __fastcall SmartArray<BudgetStatItem,1>::Reset(class SmartArray<BudgetStatItem,1>* this)

005dbf20  {
005dbf26      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
005dbf3a      this->m_num = 0;
005dbf3a      
005dbf3d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005dbf3d      {
005dbf3f          struct BudgetStatItem* m_data = this->m_data;
005dbf3f          
005dbf44          if (m_data != 0)
005dbf48              BudgetStatItem::`vector deleting destructor'(m_data, 3);
005dbf48          
005dbf4d          this->m_data = 0;
005dbf50          this->m_sizeAndDeallocate = 0;
005dbf58          return;
005dbf3d      }
005dbf3d      
005dbf5c      if (this->m_data != 0)
005dbf5c      {
005dbf62          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
005dbf62          
005dbf68          if ((eax - 1) >= 0)
005dbf68          {
005dbf79              int32_t edi_2 = ((eax - 1) * 0x24);
005dbf7d              int32_t var_28_1 = eax;
005dbff2              bool cond:1_1;
005dbff2              
005dbff2              do
005dbff2              {
005dbf8a                  void* var_24;
005dbf8a                  PStringBase<char>::PStringBase<char>(&var_24, &data_7928af);
005dbf8f                  struct BudgetStatItem* m_data_1 = this->m_data;
005dbf94                  int32_t s;
005dbf94                  __builtin_memset(&s, 0, 0x15);
005dbfa8                  void* esi_1 = ((char*)m_data_1 + edi_2);
005dbfb6                  BudgetStatInfo::operator=(esi_1, &var_24);
005dbfbf                  int32_t var_8;
005dbfbf                  *(uint32_t*)((char*)esi_1 + 0x1c) = var_8;
005dbfc6                  int32_t var_4;
005dbfc6                  *(uint32_t*)((char*)esi_1 + 0x20) = var_4;
005dbfcd                  int32_t* esi_3 = ((char*)var_24 - 0x14);
005dbfcd                  
005dbfdc                  if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
005dbfe4                      **(uint32_t**)esi_3(1);
005dbfe4                  
005dbfea                  edi_2 -= 0x24;
005dbfed                  cond:1_1 = var_28_1 != 1;
005dbfee                  var_28_1 -= 1;
005dbff2              } while (cond:1_1);
005dbf68          }
005dbf5c      }
005dbf20  }

005dbffc                                                                                      90 90 90 90                              ....

005dc000  uint8_t __thiscall SmartArray<ProfilerDBObjStat,1>::InsertOrderedByIndex(class SmartArray<ProfilerDBObjStat,1>* this, struct ProfilerDBObjStat const* arg2, uint32_t arg3)

005dc000  {
005dc003      uint32_t m_num_1 = this->m_num;
005dc003      
005dc00d      if (arg3 <= m_num_1)
005dc00d      {
005dc012          int32_t eax_2 = (this->m_sizeAndDeallocate & 0x7fffffff);
005dc019          uint8_t eax;
005dc019          
005dc019          if (m_num_1 >= eax_2)
005dc027              eax = SmartArray<ProfilerDBObjStat,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_2 + 1)));
005dc027          
005dc02e          if ((m_num_1 < eax_2 || eax != 0))
005dc02e          {
005dc030              uint32_t m_num = this->m_num;
005dc030              
005dc035              if (m_num > 0)
005dc035              {
005dc037                  struct ProfilerDBObjStat* m_data = this->m_data;
005dc037                  
005dc04b                  for (void* i = &m_data[(m_num - 1)]; i >= &m_data[arg3]; i -= 0x20)
005dc054                      ProfilerDBObjStat::operator=(((char*)i + 0x20), i);
005dc035              }
005dc035              
005dc070              ProfilerDBObjStat::operator=(&this->m_data[arg3], arg2);
005dc075              this->m_num += 1;
005dc079              struct ProfilerDBObjStat* eax_7;
005dc079              eax_7 = 1;
005dc07c              return 1;
005dc02e          }
005dc00d      }
005dc00d      
005dc083      return 0;
005dc000  }

005dc086                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005dc090  uint8_t __thiscall SmartArray<BudgetStatItem,1>::grow(class SmartArray<BudgetStatItem,1>* this, uint32_t arg2)

005dc090  {
005dc09b      uint32_t edi = arg2;
005dc0a1      uint32_t eax;
005dc0a1      
005dc0a1      if (edi >= this->m_num)
005dc0a1      {
005dc0b1          if (edi <= (this->m_sizeAndDeallocate & 0x7fffffff))
005dc0b1          {
005dc181              eax = 1;
005dc187              return 1;
005dc0b1          }
005dc0b1          
005dc0b9          if (edi == 0)
005dc0b9          {
005dc0bb              SmartArray<BudgetStatItem,1>::Reset(this);
005dc0c2              int32_t eax_2;
005dc0c2              eax_2 = 1;
005dc0c8              return 1;
005dc0b9          }
005dc0b9          
005dc0d6          eax = operator new[](((edi * 0x24) + 4));
005dc0d6          
005dc0e0          if (eax != 0)
005dc0e0          {
005dc0ec              void* esi_1 = (eax + 4);
005dc0f2              *(uint32_t*)eax = edi;
005dc0f8              `vector constructor iterator'(esi_1, 0x24, edi, BudgetStatItem::BudgetStatItem);
005dc0f8              
005dc0ff              if (esi_1 != 0)
005dc0ff              {
005dc108                  if (this->m_data != 0)
005dc108                  {
005dc10a                      uint32_t m_num = this->m_num;
005dc10a                      
005dc10e                      if ((m_num - 1) >= 0)
005dc10e                      {
005dc11c                          void* edi_1 = (((char*)esi_1 + ((m_num - 1) * 0x24)) + 0x20);
005dc120                          uint32_t m_num_1 = m_num;
005dc14b                          bool cond:0_1;
005dc14b                          
005dc14b                          do
005dc14b                          {
005dc129                              struct BudgetStatInfo* esi_3 = (((char*)edi_1 + (0xffffffe0 - esi_1)) + this->m_data);
005dc12f                              BudgetStatInfo::operator=(((char*)edi_1 - 0x20), esi_3);
005dc137                              *(uint32_t*)((char*)edi_1 - 4) = *(int32_t*)((char*)esi_3 + 0x1c);
005dc13d                              *(uint32_t*)edi_1 = *(int32_t*)((char*)esi_3 + 0x20);
005dc143                              edi_1 -= 0x24;
005dc146                              cond:0_1 = m_num_1 != 1;
005dc147                              m_num_1 -= 1;
005dc14b                          } while (cond:0_1);
005dc151                          edi = arg2;
005dc10e                      }
005dc10e                      
005dc165                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005dc165                      {
005dc167                          struct BudgetStatItem* m_data = this->m_data;
005dc167                          
005dc16b                          if (m_data != 0)
005dc16f                              BudgetStatItem::`vector deleting destructor'(m_data, 3);
005dc165                      }
005dc108                  }
005dc108                  
005dc17a                  this->m_data = esi_1;
005dc17c                  this->m_sizeAndDeallocate = (edi | 0x80000000);
005dc181                  eax = 1;
005dc187                  return 1;
005dc0ff              }
005dc0e0          }
005dc0a1      }
005dc0a1      
005dc18c      eax = 0;
005dc192      return 0;
005dc090  }

005dc195                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005dc1a0  void __fastcall ProfilerUI::ProfilerUI(class ProfilerUI* this)

005dc1a0  {
005dc1a5      this->m_cRef = 1;
005dc1ac      this->vtable = &IInputActionCallback::`vftable';
005dc1b3      this->vtable = 0x7e940c;
005dc1b9      this->vtable = &ProfilerUI::`vftable';
005dc1c0      this->m_IsActive = 0;
005dc1c3      this->m_WantActivate = 0;
005dc1c6      this->m_WantDeactivate = 0;
005dc1c9      __builtin_memset(&this->m_Windows, 0, 0x78);
005dc22c      SmartArray<BudgetStatItem,1>::Reset(&this->m_budgetStatArray);
005dc233      ProfilerUI::RegisterInputMaps(this);
005dc1a0  }

005dc23c                                                                                      90 90 90 90                              ....

005dc240  void* __thiscall ProfilerUI::`vector deleting destructor'(class ProfilerUI* this, uint32_t arg2)

005dc240  {
005dc243      /* tailcall */
005dc243      return ProfilerUI::`scalar deleting destructor'(((char*)this - 8), arg2);
005dc240  }

005dc248                          cc cc cc cc cc cc cc cc                                                          ........

005dc250  void __fastcall ProfilerUI::~ProfilerUI(class ProfilerUI* this)

005dc250  {
005dc25d      int32_t i = 0;
005dc25f      bool cond:0 = this->m_Windows.m_num <= 0;
005dc262      this->vtable = 0x7e940c;
005dc268      this->vtable = &ProfilerUI::`vftable';
005dc26f      this->m_IsActive = 0;
005dc26f      
005dc273      if (!(cond:0))
005dc273      {
005dc2a9          do
005dc2a9          {
005dc278              void* edi_1 = this->m_Windows.m_data[i];
005dc278              
005dc27d              if (edi_1 != 0)
005dc27d              {
005dc27f                  int32_t* ecx = *(uint32_t*)((char*)edi_1 + 0xc);
005dc27f                  
005dc284                  if (ecx != 0)
005dc284                  {
005dc286                      int32_t temp1_1 = ecx[1];
005dc286                      ecx[1] -= 1;
005dc286                      
005dc289                      if (temp1_1 == 1)
005dc28f                          **(uint32_t**)ecx(1);
005dc28f                      
005dc291                      *(uint32_t*)((char*)edi_1 + 0xc) = 0;
005dc284                  }
005dc284                  
005dc295                  operator delete(edi_1);
005dc27d              }
005dc27d              
005dc29d              this->m_Windows.m_data[i] = 0;
005dc2a6              i += 1;
005dc2a9          } while (i < this->m_Windows.m_num);
005dc273      }
005dc273      
005dc2ab      uint32_t m_sizeAndDeallocate = this->m_Windows.m_sizeAndDeallocate;
005dc2bc      this->m_Windows.m_num = 0;
005dc2bc      
005dc2bf      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005dc2bf      {
005dc2c5          operator delete[](this->m_Windows.m_data);
005dc2cd          this->m_Windows.m_data = 0;
005dc2d0          this->m_Windows.m_sizeAndDeallocate = 0;
005dc2bf      }
005dc2bf      else if (this->m_Windows.m_data != 0)
005dc2d8      {
005dc2da          int32_t eax_4 = (m_sizeAndDeallocate & 0x7fffffff);
005dc2df          int32_t eax_5 = (eax_4 - 1);
005dc2df          
005dc2e0          if ((eax_4 - 1) >= 0)
005dc2e0          {
005dc2ea              int32_t temp2_1;
005dc2ea              
005dc2ea              do
005dc2ea              {
005dc2e2                  temp2_1 = eax_5;
005dc2e2                  eax_5 -= 1;
005dc2e3                  this->m_Windows.m_data[(eax_5 + 1)] = 0;
005dc2ea              } while ((temp2_1 - 1) >= 0);
005dc2e0          }
005dc2d8      }
005dc2d8      
005dc2ef      int32_t i_1 = 0;
005dc2ef      
005dc2f3      if (this->m_ToolbarButtons.m_num > 0)
005dc2f3      {
005dc316          do
005dc316          {
005dc2f8              int32_t* ecx_4 = this->m_ToolbarButtons.m_data[i_1];
005dc2f8              
005dc2fd              if (ecx_4 != 0)
005dc2fd              {
005dc2ff                  int32_t temp3_1 = ecx_4[1];
005dc2ff                  ecx_4[1] -= 1;
005dc2ff                  
005dc302                  if (temp3_1 == 1)
005dc308                      **(uint32_t**)ecx_4(1);
005dc308                  
005dc30a                  this->m_ToolbarButtons.m_data[i_1] = 0;
005dc2fd              }
005dc2fd              
005dc313              i_1 += 1;
005dc316          } while (i_1 < this->m_ToolbarButtons.m_num);
005dc2f3      }
005dc2f3      
005dc318      uint32_t m_sizeAndDeallocate_1 = this->m_ToolbarButtons.m_sizeAndDeallocate;
005dc329      this->m_ToolbarButtons.m_num = 0;
005dc329      
005dc32c      if ((m_sizeAndDeallocate_1 & 0x80000000) == 0x80000000)
005dc32c      {
005dc332          operator delete[](this->m_ToolbarButtons.m_data);
005dc33a          this->m_ToolbarButtons.m_data = 0;
005dc33d          this->m_ToolbarButtons.m_sizeAndDeallocate = 0;
005dc32c      }
005dc32c      else if (this->m_ToolbarButtons.m_data != 0)
005dc345      {
005dc347          int32_t eax_10 = (m_sizeAndDeallocate_1 & 0x7fffffff);
005dc34c          int32_t eax_11 = (eax_10 - 1);
005dc34c          
005dc34d          if ((eax_10 - 1) >= 0)
005dc34d          {
005dc358              int32_t temp7_1;
005dc358              
005dc358              do
005dc358              {
005dc350                  temp7_1 = eax_11;
005dc350                  eax_11 -= 1;
005dc351                  this->m_ToolbarButtons.m_data[(eax_11 + 1)] = 0;
005dc358              } while ((temp7_1 - 1) >= 0);
005dc34d          }
005dc345      }
005dc345      
005dc35a      class QuickWindow* m_pToggleToolbarWindow = this->m_pToggleToolbarWindow;
005dc35a      
005dc35f      if (m_pToggleToolbarWindow != 0)
005dc35f      {
005dc361          uint32_t m_cRef = m_pToggleToolbarWindow->m_cRef;
005dc361          m_pToggleToolbarWindow->m_cRef -= 1;
005dc361          
005dc364          if (m_cRef == 1)
005dc366              m_pToggleToolbarWindow->vtable->__vecDelDtor(1);
005dc366          
005dc36c          this->m_pToggleToolbarWindow = nullptr;
005dc35f      }
005dc35f      
005dc36f      class QuickWindow* m_pStatsToolbarWindow = this->m_pStatsToolbarWindow;
005dc36f      
005dc374      if (m_pStatsToolbarWindow != 0)
005dc374      {
005dc376          uint32_t m_cRef_1 = m_pStatsToolbarWindow->m_cRef;
005dc376          m_pStatsToolbarWindow->m_cRef -= 1;
005dc376          
005dc379          if (m_cRef_1 == 1)
005dc37b              m_pStatsToolbarWindow->vtable->__vecDelDtor(1);
005dc37b          
005dc381          this->m_pStatsToolbarWindow = nullptr;
005dc374      }
005dc374      
005dc387      int32_t i_2 = 0;
005dc387      
005dc38b      if (this->m_CategoryButtons.m_num > 0)
005dc38b      {
005dc3b1          do
005dc3b1          {
005dc393              int32_t* ecx_9 = this->m_CategoryButtons.m_data[i_2];
005dc393              
005dc398              if (ecx_9 != 0)
005dc398              {
005dc39a                  int32_t temp9_1 = ecx_9[1];
005dc39a                  ecx_9[1] -= 1;
005dc39a                  
005dc39d                  if (temp9_1 == 1)
005dc3a3                      **(uint32_t**)ecx_9(1);
005dc3a3                  
005dc3a5                  this->m_CategoryButtons.m_data[i_2] = 0;
005dc398              }
005dc398              
005dc3ae              i_2 += 1;
005dc3b1          } while (i_2 < this->m_CategoryButtons.m_num);
005dc38b      }
005dc38b      
005dc3b3      uint32_t m_sizeAndDeallocate_2 = this->m_CategoryButtons.m_sizeAndDeallocate;
005dc3c4      this->m_CategoryButtons.m_num = 0;
005dc3c4      
005dc3c7      if ((m_sizeAndDeallocate_2 & 0x80000000) == 0x80000000)
005dc3c7      {
005dc3cd          operator delete[](this->m_CategoryButtons.m_data);
005dc3d5          this->m_CategoryButtons.m_data = 0;
005dc3d8          this->m_CategoryButtons.m_sizeAndDeallocate = 0;
005dc3c7      }
005dc3c7      else if (this->m_CategoryButtons.m_data != 0)
005dc3e0      {
005dc3e2          int32_t eax_16 = (m_sizeAndDeallocate_2 & 0x7fffffff);
005dc3e7          int32_t eax_17 = (eax_16 - 1);
005dc3e7          
005dc3e8          if ((eax_16 - 1) >= 0)
005dc3e8          {
005dc3f8              int32_t temp11_1;
005dc3f8              
005dc3f8              do
005dc3f8              {
005dc3f0                  temp11_1 = eax_17;
005dc3f0                  eax_17 -= 1;
005dc3f1                  this->m_CategoryButtons.m_data[(eax_17 + 1)] = 0;
005dc3f8              } while ((temp11_1 - 1) >= 0);
005dc3e8          }
005dc3e0      }
005dc3e0      
005dc3fa      class QuickWindow* m_pCategoryWindow = this->m_pCategoryWindow;
005dc3fa      
005dc3ff      if (m_pCategoryWindow != 0)
005dc3ff      {
005dc401          uint32_t m_cRef_2 = m_pCategoryWindow->m_cRef;
005dc401          m_pCategoryWindow->m_cRef -= 1;
005dc401          
005dc404          if (m_cRef_2 == 1)
005dc406              m_pCategoryWindow->vtable->__vecDelDtor(1);
005dc406          
005dc40c          this->m_pCategoryWindow = nullptr;
005dc3ff      }
005dc3ff      
005dc414      SmartArray<BudgetStatItem,1>::Reset(&this->m_budgetStatArray);
005dc41e      SmartArray<ProfilerDBObjStat,1>::Reset(&this->m_DBObjStats);
005dc42a      operator delete(this->m_pOSSpecificProfiler);
005dc42f      this->m_pOSSpecificProfiler = nullptr;
005dc42f      
005dc44b      if ((this->m_DBObjStats.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005dc44b      {
005dc44d          struct ProfilerDBObjStat* m_data_1 = this->m_DBObjStats.m_data;
005dc44d          
005dc451          if (m_data_1 != 0)
005dc451          {
005dc453              int32_t DBType = m_data_1->DBType;
005dc453              
005dc465              if ((DBType - 1) >= 0)
005dc465              {
005dc468                  void* ebp = &m_data_1[DBType].DBTypeName;
005dc46b                  int32_t var_8_1 = DBType;
005dc497                  int32_t i_3;
005dc497                  
005dc497                  do
005dc497                  {
005dc470                      int32_t edi_3 = *(uint32_t*)((char*)ebp - 0x20);
005dc473                      ebp -= 0x20;
005dc473                      
005dc489                      if ((InterlockedDecrement((edi_3 - 0x10)) == 0 && edi_3 != 0x14))
005dc491                          **(uint32_t**)(edi_3 - 0x14)(1);
005dc491                      
005dc493                      i_3 = var_8_1;
005dc493                      var_8_1 -= 1;
005dc497                  } while (i_3 != 1);
005dc465              }
005dc465              
005dc49e              operator delete[](((char*)m_data_1 - 4));
005dc451          }
005dc44b      }
005dc44b      
005dc4b5      if ((this->m_budgetStatArray.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005dc4b5      {
005dc4b7          struct BudgetStatItem* m_data = this->m_budgetStatArray.m_data;
005dc4b7          
005dc4bb          if (m_data != 0)
005dc4bb          {
005dc4bd              int32_t i_6 = *(uint32_t*)((char*)m_data->sInfo + -4);
005dc4c7              void* ebp_1 = &m_data[i_6];
005dc4c7              
005dc4ca              if ((i_6 - 1) >= 0)
005dc4ca              {
005dc4cd                  int32_t i_5 = i_6;
005dc4f8                  int32_t i_4;
005dc4f8                  
005dc4f8                  do
005dc4f8                  {
005dc4d1                      int32_t edi_5 = *(uint32_t*)((char*)ebp_1 - 0x24);
005dc4d4                      ebp_1 -= 0x24;
005dc4d4                      
005dc4ea                      if ((InterlockedDecrement((edi_5 - 0x10)) == 0 && edi_5 != 0x14))
005dc4f2                          **(uint32_t**)(edi_5 - 0x14)(1);
005dc4f2                      
005dc4f4                      i_4 = i_5;
005dc4f4                      i_5 -= 1;
005dc4f8                  } while (i_4 != 1);
005dc4ca              }
005dc4ca              
005dc4fb              operator delete[](((char*)m_data - 4));
005dc4bb          }
005dc4b5      }
005dc4b5      
005dc510      if ((this->m_CategoryButtons.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005dc516          operator delete[](this->m_CategoryButtons.m_data);
005dc516      
005dc52d      if ((this->m_ToolbarButtons.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005dc533          operator delete[](this->m_ToolbarButtons.m_data);
005dc533      
005dc54a      if ((this->m_Windows.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
005dc550          operator delete[](this->m_Windows.m_data);
005dc550      
005dc558      this->vtable = &IInputActionCallback::`vftable';
005dc561      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
005dc561      
005dc569      if (ICIDM::s_cidm_1 != 0)
005dc56b          ICIDM::s_cidm_1->vtable->UnregisterCallback(&this->vtable);
005dc56b      
005dc572      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
005dc250  }

005dc57f                                                                                               90                                 .

005dc580  uint8_t __fastcall ProfilerUI::CreateToolbarWindows(class ProfilerUI* this)

005dc580  {
005dc5ae      void __return;
005dc5ae      
005dc5ae      if (QuickWindow::Create(&__return, &this->m_pToggleToolbarWindow, 8, 0x18, 0x9a, 0xaa, 6, 4)->m_val >= 0)
005dc5ae      {
005dc5b9          class QuickWindow* m_pToggleToolbarWindow = this->m_pToggleToolbarWindow;
005dc5bb          int32_t var_10 = 0x3ec2c2c3;
005dc5c3          int32_t var_c_1 = 0x3ed2d2d3;
005dc5cb          int32_t var_8_1 = 0x3eb0b0b1;
005dc5d3          int32_t var_4;
005dc5d3          __builtin_strncpy(&var_4, "333?", 4);
005dc5db          QuickWindow::SetColorAndOpacity(m_pToggleToolbarWindow, &var_10);
005dc5db          
005dc607          if (*(uint32_t*)QuickWindow::Create(&__return, &this->m_pStatsToolbarWindow, 8, 0xe0, 0x9a, 0x5c, 6, 4) >= 0)
005dc607          {
005dc610              var_10 = 0x3ec2c2c3;
005dc618              int32_t var_c_2 = 0x3ed2d2d3;
005dc620              int32_t var_8_2 = 0x3eb0b0b1;
005dc628              int32_t var_4_1;
005dc628              __builtin_strncpy(&var_4_1, "333?", 4);
005dc630              QuickWindow::SetColorAndOpacity(this->m_pStatsToolbarWindow, &var_10);
005dc637              ProfilerUI::RebuildToolbarButtons(this);
005dc63d              int32_t eax_2;
005dc63d              eax_2 = 1;
005dc643              return 1;
005dc607          }
005dc5ae      }
005dc5ae      
005dc645      uint32_t eax_1;
005dc645      eax_1 = 0;
005dc64b      return 0;
005dc580  }

005dc64c                                      90 90 90 90                                                              ....

005dc650  uint8_t __fastcall ProfilerUI::CreateCategoryWindow(class ProfilerUI* this)

005dc650  {
005dc681      void __return;
005dc681      
005dc681      if (QuickWindow::Create(&__return, &this->m_pCategoryWindow, 8, 0x15e, 0x9a, 0x96, 6, 4)->m_val < 0)
005dc681      {
005dc6bf          class TResult* eax;
005dc6bf          eax = 0;
005dc6c5          return 0;
005dc681      }
005dc681      
005dc688      class QuickWindow* m_pCategoryWindow = this->m_pCategoryWindow;
005dc68a      int32_t var_10 = 0x3ec2c2c3;
005dc692      int32_t var_c = 0x3ed2d2d3;
005dc69a      int32_t var_8 = 0x3eb0b0b1;
005dc6a2      int32_t var_4;
005dc6a2      __builtin_strncpy(&var_4, "333?", 4);
005dc6aa      QuickWindow::SetColorAndOpacity(m_pCategoryWindow, &var_10);
005dc6b1      ProfilerUI::RebuildCategoryWindow(this);
005dc6b7      int32_t eax_1;
005dc6b7      eax_1 = 1;
005dc6bd      return 1;
005dc650  }

005dc6c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

005dc6d0  void __thiscall ProfilerUI::AddCategoryWindow(class ProfilerUI* this, enum ProfilerTypes::CategoryType const arg2)

005dc6d0  {
005dc6d0      uint32_t m_num = this->m_Windows.m_num;
005dc6d8      int32_t eax = 0;
005dc6dd      enum ProfilerTypes::CategoryType edi = arg2;
005dc6dd      
005dc6e1      if (m_num > 0)
005dc6e1      {
005dc6e3          class ProfilerUIWindow** m_data = this->m_Windows.m_data;
005dc6e3          
005dc6f3          do
005dc6f3          {
005dc6eb              if (*(uint32_t*)m_data->m_Category == edi)
005dc75f                  return;
005dc75f              
005dc6ed              eax += 1;
005dc6ee              m_data = &m_data[1];
005dc6f3          } while (eax < m_num);
005dc6e1      }
005dc6e1      
005dc6f7      int32_t var_4;
005dc6f7      __builtin_strncpy(&var_4, "333?", 4);
005dc6ff      int32_t var_10;
005dc6ff      uint32_t eax_1;
005dc6ff      
005dc6ff      if (edi != All)
005dc6ff      {
005dc720          var_10 = 0x3eaaaaab;
005dc728          int32_t var_c_2 = 0x3ec2c2c3;
005dc730          int32_t var_8_2 = 0x3ed8d8d9;
005dc738          eax_1 = 0xa0;
005dc6ff      }
005dc6ff      else
005dc6ff      {
005dc701          var_10 = 0x3ed2d2d3;
005dc709          int32_t var_c_1 = 0x3eb0b0b1;
005dc711          int32_t var_8_1 = 0x3ebcbcbd;
005dc719          eax_1 = 0x1cc;
005dc6ff      }
005dc6ff      
005dc754      ProfilerUI::AddWindow(this, edi, &var_10, 1, 0, 0, 0x10e, eax_1, &arg2);
005dc6d0  }

005dc762        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005dc770  void __thiscall ProfilerUI::ShowMemoryCountersStatsWindow(class ProfilerUI* this, uint8_t const arg2)

005dc770  {
005dc77c      if (arg2 == 0)
005dc77c      {
005dc7ce          uint32_t m_MemoryCountersStatsWindowHandle = this->m_MemoryCountersStatsWindowHandle;
005dc7ce          
005dc7d3          if (m_MemoryCountersStatsWindowHandle != 0)
005dc7d3          {
005dc7d8              ProfilerUI::RemoveWindow(this, m_MemoryCountersStatsWindowHandle);
005dc7dd              this->m_MemoryCountersStatsWindowHandle = 0;
005dc7d3          }
005dc77c      }
005dc77c      else if (this->m_MemoryCountersStatsWindowHandle == 0)
005dc786      {
005dc7a2          int32_t var_10 = 0x3edcdcdd;
005dc7aa          int32_t var_c = 0x3edcdcdd;
005dc7b2          int32_t var_8 = 0x3edcdcdd;
005dc7ba          int32_t var_4;
005dc7ba          __builtin_strncpy(&var_4, "333?", 4);
005dc7c2          ProfilerUI::AddWindow(this, Invalid, &var_10, 1, 0, 0, 0x10e, 0x168, &this->m_MemoryCountersStatsWindowHandle);
005dc786      }
005dc770  }

005dc7eb                                   90 90 90 90 90                                                             .....

005dc7f0  void __thiscall ProfilerUI::ShowBlockResourcesStatsWindow(class ProfilerUI* this, uint8_t const arg2)

005dc7f0  {
005dc7fc      if (arg2 == 0)
005dc7fc      {
005dc84b          uint32_t m_BlockResourcesStatsWindowHandle = this->m_BlockResourcesStatsWindowHandle;
005dc84b          
005dc850          if (m_BlockResourcesStatsWindowHandle != 0)
005dc850          {
005dc855              ProfilerUI::RemoveWindow(this, m_BlockResourcesStatsWindowHandle);
005dc85a              this->m_BlockResourcesStatsWindowHandle = 0;
005dc850          }
005dc7fc      }
005dc7fc      else if (this->m_BlockResourcesStatsWindowHandle == 0)
005dc806      {
005dc81f          int32_t var_10 = 0x3ef0f0f1;
005dc827          int32_t var_c = 0x3ef0f0f1;
005dc82f          int32_t var_8 = 0x3e20a0a1;
005dc837          int32_t var_4;
005dc837          __builtin_strncpy(&var_4, "333?", 4);
005dc83f          ProfilerUI::AddWindow(this, Invalid, &var_10, 1, 0, 0, 0x10e, 0x78, &this->m_BlockResourcesStatsWindowHandle);
005dc806      }
005dc7f0  }

005dc868                          90 90 90 90 90 90 90 90                                                          ........

005dc870  void __thiscall ProfilerUI::ShowDBObjStatsWindow(class ProfilerUI* this, uint8_t const arg2)

005dc870  {
005dc87c      if (arg2 == 0)
005dc87c      {
005dc8ce          uint32_t m_DBObjStatsWindowHandle = this->m_DBObjStatsWindowHandle;
005dc8ce          
005dc8d3          if (m_DBObjStatsWindowHandle != 0)
005dc8d3          {
005dc8d8              ProfilerUI::RemoveWindow(this, m_DBObjStatsWindowHandle);
005dc8dd              this->m_DBObjStatsWindowHandle = 0;
005dc8d3          }
005dc87c      }
005dc87c      else if (this->m_DBObjStatsWindowHandle == 0)
005dc886      {
005dc8a2          int32_t var_10 = 0x3e70f0f1;
005dc8aa          int32_t var_c = 0x3ef0f0f1;
005dc8b2          int32_t var_8 = 0x3e70f0f1;
005dc8ba          int32_t var_4;
005dc8ba          __builtin_strncpy(&var_4, "333?", 4);
005dc8c2          ProfilerUI::AddWindow(this, Invalid, &var_10, 1, 0, 0, 0x10e, 0x1b8, &this->m_DBObjStatsWindowHandle);
005dc886      }
005dc870  }

005dc8eb                                   90 90 90 90 90                                                             .....

005dc8f0  void __thiscall ProfilerUI::ShowMemoryProbeStatsWindow(class ProfilerUI* this, uint8_t const arg2)

005dc8f0  {
005dc8fc      if (arg2 == 0)
005dc8fc      {
005dc94e          uint32_t m_MemoryProbeStatsWindowHandle = this->m_MemoryProbeStatsWindowHandle;
005dc94e          
005dc953          if (m_MemoryProbeStatsWindowHandle != 0)
005dc953          {
005dc958              ProfilerUI::RemoveWindow(this, m_MemoryProbeStatsWindowHandle);
005dc95d              this->m_MemoryProbeStatsWindowHandle = 0;
005dc953          }
005dc8fc      }
005dc8fc      else if (this->m_MemoryProbeStatsWindowHandle == 0)
005dc906      {
005dc922          int32_t var_10 = 0x3e20a0a1;
005dc92a          int32_t var_c = 0x3e20a0a1;
005dc932          int32_t var_8 = 0x3edcdcdd;
005dc93a          int32_t var_4;
005dc93a          __builtin_strncpy(&var_4, "333?", 4);
005dc942          ProfilerUI::AddWindow(this, Invalid, &var_10, 1, 0, 0, 0x10e, 0x2bc, &this->m_MemoryProbeStatsWindowHandle);
005dc906      }
005dc8f0  }

005dc96b                                   90 90 90 90 90                                                             .....

005dc970  uint8_t __thiscall ProfilerUI::InputLeftMouseCategoryButtonReleased(class ProfilerUI* this, int32_t const arg2, int32_t const arg3)

005dc970  {
005dc970      class ProfilerUI* this_1 = this;
005dc97a      class ProfilerUIWindow* ebx;
005dc97a      ebx = 0;
005dc97c      enum ProfilerTypes::CategoryType i_1 = ~All;
005dc97f      enum ProfilerTypes::CategoryType i = All;
005dc983      *(uint8_t*)((char*)this_1)[3] = 0;
005dc983      
005dc987      if (this->m_CategoryButtons.m_num > 0)
005dc987      {
005dc9b3          do
005dc9b3          {
005dc9a7              if (QuickButton::LeftMouseButtonReleased(this->m_CategoryButtons.m_data[i], arg2, arg3) != 0)
005dc9a7              {
005dc9a9                  i_1 = i;
005dc9ab                  ebx = 1;
005dc9a7              }
005dc9a7              
005dc9b0              i += 1;
005dc9b3          } while (i < this->m_CategoryButtons.m_num);
005dc9b3          
005dc9b8          *(uint8_t*)((char*)this_1)[3] = ebx;
005dc9b8          
005dc9bc          if (i_1 != ~All)
005dc9bc          {
005dc9c1              class QuickButton* edi = this->m_CategoryButtons.m_data[i_1];
005dc9c1              
005dc9c9              if (edi->m_WindowID == 0)
005dc9c9              {
005dc9cb                  uint32_t m_num = this->m_Windows.m_num;
005dc9ce                  int32_t eax_4 = 0;
005dc9ce                  
005dc9d2                  if (m_num > 0)
005dc9d2                  {
005dc9d4                      class ProfilerUIWindow** m_data = this->m_Windows.m_data;
005dc9d4                      
005dc9e4                      do
005dc9e4                      {
005dc9dc                          if (*(uint32_t*)m_data->m_Category == i_1)
005dc9dc                          {
005dca08                              ProfilerUI::RemoveCategoryWindow(this, i_1);
005dca11                              QuickButton::SetCheckedState(edi, 0);
005dca1f                              return *(uint8_t*)((char*)this_1)[3];
005dc9dc                          }
005dc9dc                          
005dc9de                          eax_4 += 1;
005dc9df                          m_data = &m_data[1];
005dc9e4                      } while (eax_4 < m_num);
005dc9e4                      
005dc9e6                      ebx = *(uint8_t*)((char*)this_1)[3];
005dc9d2                  }
005dc9d2                  
005dc9ed                  ProfilerUI::AddCategoryWindow(this, i_1);
005dc9f6                  QuickButton::SetCheckedState(edi, 1);
005dc9c9              }
005dc9bc          }
005dc987      }
005dc987      
005dc9fe      uint32_t eax;
005dc9fe      eax = ebx;
005dca02      return eax;
005dc970  }

005dca22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005dca30  uint8_t __thiscall ProfilerUI::InputLeftMouseToolbarButtonReleased(class ProfilerUI* this, int32_t const arg2, int32_t const arg3)

005dca30  {
005dca3b      int32_t i_1 = 0xffffffff;
005dca3e      int32_t i = 0;
005dca42      char result = 0;
005dca47      uint32_t m_WindowID;
005dca47      
005dca47      if (this->m_ToolbarButtons.m_num > 0)
005dca47      {
005dca4e          int32_t const ebx_1 = arg3;
005dca4e          
005dca74          do
005dca74          {
005dca65              if (QuickButton::LeftMouseButtonReleased(this->m_ToolbarButtons.m_data[i], arg2, ebx_1) != 0)
005dca65              {
005dca67                  i_1 = i;
005dca69                  result = 1;
005dca65              }
005dca65              
005dca71              i += 1;
005dca74          } while (i < this->m_ToolbarButtons.m_num);
005dca74          
005dca7a          if (i_1 != 0xffffffff)
005dca7a          {
005dca83              class QuickButton* edi_1 = this->m_ToolbarButtons.m_data[i_1];
005dca86              m_WindowID = edi_1->m_WindowID;
005dca8f              uint32_t ecx_3;
005dca8f              char ebp;
005dca8f              
005dca8f              if ((m_WindowID - 0xa) <= 0x17)
005dca8f                  switch (m_WindowID)
005dca8f                  {
005dcbf0                      case 0xa:
005dcbf0                      case 0xb:
005dcbf0                      case 0xc:
005dcbf0                      case 0xd:
005dcbf0                      case 0xe:
005dcbf0                      {
005dcbf0                          Render::SetOverallGraphicsQuality((m_WindowID - 9));
005dcbfe                          this->m_nGraphicsQualityLevel = Render::DetermineOverallGraphicsQuality();
005dcc01                          uint32_t eax_13;
005dcc01                          eax_13 = result;
005dcc0a                          return eax_13;
005dcbf0                          break;
005dcbf0                      }
005dcaac                      case 0x14:
005dcaac                      {
005dcaac                          PStringBase<char>::PStringBase<char>(&arg3, "Toggle RenderDevice.Wireframe");
005dcab6                          GlobalRegistry::ProcessCommand(&arg3);
005dcabf                          int32_t* esi_2 = (arg3 - 0x14);
005dcabf                          
005dcad9                          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
005dcad9                          {
005dcae5                              **(uint32_t**)esi_2(1);
005dcaf1                              return result;
005dcad9                          }
005dcaac                          break;
005dcaac                      }
005dcafd                      case 0x15:
005dcafd                      {
005dcafd                          int32_t var_c = 0;
005dcb05                          PStringBase<char>::PStringBase<char>(&arg2, "RenderD3D.AlphaDelayMask");
005dcb13                          uint32_t* edi;
005dcb13                          GlobalRegistry::InqTypedVariable(&arg2, &var_c, edi);
005dcb22                          int32_t* esi_4 = (arg2 - 0x14);
005dcb22                          
005dcb31                          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
005dcb39                              **(uint32_t**)esi_4(1);
005dcb39                          
005dcb43                          int32_t eax_5;
005dcb43                          eax_5 = var_c != 0;
005dcb4a                          int32_t __saved_ebx_5 = ((eax_5 - 1) & 0xe);
005dcb57                          void* var_8;
005dcb57                          PStringBase<char>::PStringBase<char>(&var_8, Formatted, "Set RenderD3D.AlphaDelayMask %d");
005dcb61                          GlobalRegistry::ProcessCommand(&var_8);
005dcb6a                          int32_t* esi_7 = ((char*)var_8 - 0x14);
005dcb6a                          
005dcb80                          if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
005dcb80                          {
005dcb8c                              **(uint32_t**)esi_7(1);
005dcb98                              return result;
005dcb80                          }
005dcafd                          break;
005dcafd                      }
005dcba4                      case 0x16:
005dcba4                      {
005dcba4                          void* var_4;
005dcba4                          PStringBase<char>::PStringBase<char>(&var_4, &ProfilerUI::`vftable'.OnAction);
005dcbae                          GlobalRegistry::ProcessCommand(&var_4);
005dcbb7                          int32_t* esi_9 = ((char*)var_4 - 0x14);
005dcbb7                          
005dcbd1                          if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
005dcbd1                          {
005dcbdd                              **(uint32_t**)esi_9(1);
005dcbe9                              return result;
005dcbd1                          }
005dcba4                          break;
005dcba4                      }
005dcc12                      case 0x1e:
005dcc12                      {
005dcc12                          ecx_3 = this->m_MemoryCountersStatsWindowHandle == 0;
005dcc15                          arg3 = ecx_3;
005dcc19                          ebp = ((int8_t)arg3);
005dcc20                          ProfilerUI::ShowMemoryCountersStatsWindow(this, ebp);
005dcc76                          QuickButton::SetCheckedState(edi_1, ebp);
005dcc12                          break;
005dcc12                      }
005dcc2c                      case 0x1f:
005dcc2c                      {
005dcc2c                          uint32_t edx_7;
005dcc2c                          edx_7 = this->m_BlockResourcesStatsWindowHandle == 0;
005dcc2f                          arg3 = edx_7;
005dcc33                          ebp = ((int8_t)arg3);
005dcc3a                          ProfilerUI::ShowBlockResourcesStatsWindow(this, ebp);
005dcc76                          QuickButton::SetCheckedState(edi_1, ebp);
005dcc2c                          break;
005dcc2c                      }
005dcc46                      case 0x20:
005dcc46                      {
005dcc46                          m_WindowID = this->m_DBObjStatsWindowHandle == 0;
005dcc49                          arg3 = m_WindowID;
005dcc4d                          ebp = ((int8_t)arg3);
005dcc54                          ProfilerUI::ShowDBObjStatsWindow(this, ebp);
005dcc76                          QuickButton::SetCheckedState(edi_1, ebp);
005dcc46                          break;
005dcc46                      }
005dcc60                      case 0x21:
005dcc60                      {
005dcc60                          ecx_3 = this->m_MemoryProbeStatsWindowHandle == 0;
005dcc63                          arg3 = ecx_3;
005dcc67                          ebp = ((int8_t)arg3);
005dcc6e                          ProfilerUI::ShowMemoryProbeStatsWindow(this, ebp);
005dcc76                          QuickButton::SetCheckedState(edi_1, ebp);
005dcc60                          break;
005dcc60                      }
005dca8f                  }
005dca7a          }
005dca47      }
005dca47      
005dcc7b      m_WindowID = result;
005dcc85      return m_WindowID;
005dca30  }

005dcc88  uint32_t jump_table_5dcc88[0x9] = 
005dcc88  {
005dcc88      [0x0] =  0x005dcbec
005dcc8c      [0x1] =  0x005dcaa3
005dcc90      [0x2] =  0x005dcaf4
005dcc94      [0x3] =  0x005dcb9b
005dcc98      [0x4] =  0x005dcc0d
005dcc9c      [0x5] =  0x005dcc27
005dcca0      [0x6] =  0x005dcc41
005dcca4      [0x7] =  0x005dcc5b
005dcca8      [0x8] =  0x005dcc7b
005dccac  }
005dccac  uint8_t lookup_table_5dccac[0x18] = 
005dccac  {
005dccac      [0x00] =  0x00
005dccad      [0x01] =  0x00
005dccae      [0x02] =  0x00
005dccaf      [0x03] =  0x00
005dccb0      [0x04] =  0x00
005dccb1      [0x05] =  0x08
005dccb2      [0x06] =  0x08
005dccb3      [0x07] =  0x08
005dccb4      [0x08] =  0x08
005dccb5      [0x09] =  0x08
005dccb6      [0x0a] =  0x01
005dccb7      [0x0b] =  0x02
005dccb8      [0x0c] =  0x03
005dccb9      [0x0d] =  0x08
005dccba      [0x0e] =  0x08
005dccbb      [0x0f] =  0x08
005dccbc      [0x10] =  0x08
005dccbd      [0x11] =  0x08
005dccbe      [0x12] =  0x08
005dccbf      [0x13] =  0x08
005dccc0      [0x14] =  0x04
005dccc1      [0x15] =  0x05
005dccc2      [0x16] =  0x06
005dccc3      [0x17] =  0x07
005dccc4  }

005dccc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005dccd0  void __fastcall ProfilerUI::InitDBObjStats(class ProfilerUI* this)

005dccd0  {
005dccd0      int32_t ebp;
005dccd0      int32_t var_4 = ebp;
005dcce6      int32_t eax;
005dcce6      uint32_t ecx_1;
005dcce6      int32_t edx;
005dcce6      eax = SmartArray<ProfilerDBObjStat,1>::Reset(&this->m_DBObjStats);
005dcceb      int32_t var_6c = 0x24;
005dcced      int32_t var_70 = 1;
005dccef      int32_t var_74 = 2;
005dccf6      class DBObj* esi = DBObj::GetByEnum(eax, edx, ecx_1);
005dccf6      
005dcd01      if (esi != 0)
005dcd01      {
005dcd0e          void __return_1;
005dcd0e          EnumMapper::begin(esi, &__return_1);
005dcd1a          void __return_2;
005dcd1a          EnumMapper::end(esi, &__return_2);
005dcd1a          
005dcd2f          if (EnumMapper::iterator::operator!=(&__return_1, &__return_2) != 0)
005dcd2f          {
005dce5e              uint8_t i;
005dce5e              
005dce5e              do
005dce5e              {
005dcd39                  uint32_t eax_3 = EnumMapper::iterator::get_enum(&__return_1);
005dcd49                  class PSRefBufferCharData<char>* __return;
005dcd49                  EnumMapper::iterator::get_string(&__return_1, &__return);
005dcd4e                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005dcd5e                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005dcd62                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005dcd64                  bool cond:1_1 = PStringBase<char>::s_NullBuffer_1 == __return;
005dcd68                  uint32_t var_28 = eax_3;
005dcd68                  
005dcd6c                  if (!(cond:1_1))
005dcd6c                  {
005dcd81                      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
005dcd89                          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
005dcd89                      
005dcd8b                      PStringBase<char>::s_NullBuffer_1 = __return;
005dcd93                      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
005dcd97                      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005dcd6c                  }
005dcd6c                  
005dcda3                  uint32_t j = 0;
005dcda7                  int32_t var_20_1 = 0;
005dcdab                  int32_t var_1c_1 = 0;
005dcdaf                  int32_t var_18_1 = 0;
005dcdb3                  int32_t var_14_1 = 0xc0c38780;
005dcdbb                  int32_t var_10_1 = 0;
005dcdbf                  int32_t var_c_1 = 0xc0c38780;
005dcdbf                  
005dcdc7                  if (this->m_DBObjStats.m_num > 0)
005dcdc7                  {
005dcdc9                      int32_t esi_3 = 0;
005dcdc9                      
005dcdf6                      do
005dcdf6                      {
005dcde4                          if (_stricmp(*(uint32_t*)(&this->m_DBObjStats.m_data->DBTypeName + esi_3), PStringBase<char>::s_NullBuffer_1) >= 0)
005dcde4                              break;
005dcde4                          
005dcdf0                          j += 1;
005dcdf1                          esi_3 += 0x20;
005dcdf6                      } while (j < this->m_DBObjStats.m_num);
005dcdc7                  }
005dcdc7                  
005dce00                  SmartArray<ProfilerDBObjStat,1>::InsertOrderedByIndex(&this->m_DBObjStats, &var_28, j);
005dce00                  
005dce1e                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_2[-1]) == 0 && PStringBase<char>::s_NullBuffer_2 != 0x14))
005dce26                      *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_2 + -0x14)(1);
005dce26                  
005dce2c                  void* __offset(PSRefBufferCharData<char>, -0x14) esi_7 = &__return->m_data[0xffffffec];
005dce2c                  
005dce3b                  if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
005dce43                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
005dce43                  
005dce49                  EnumMapper::iterator::operator++(&__return_1);
005dce57                  i = EnumMapper::iterator::operator!=(&__return_1, &__return_2);
005dce5e              } while (i != 0);
005dcd2f          }
005dcd2f          
005dce6c          IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&__return_2);
005dce75          IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&__return_1);
005dce7a          esi->vtable->Release();
005dcd01      }
005dcd01      
005dccda      var_4;
005dccd0  }

005dcdcd                                         8d 49 00                                                               .I.
005dce89                             90 90 90 90 90 90 90                                                           .......

005dce90  void* __thiscall ProfilerUI::`scalar deleting destructor'(class ProfilerUI* this, uint32_t arg2)

005dce90  {
005dce93      ProfilerUI::~ProfilerUI(this);
005dce93      
005dce9d      if ((arg2 & 1) != 0)
005dcea0          operator delete(this);
005dcea0      
005dceab      return this;
005dce90  }

005dceae                                            90 90                                                                ..

005dceb0  uint8_t __thiscall ProfilerUI::OnAction(class ProfilerUI* this, class InputEvent const* arg2)

005dceb0  {
005dceb6      uint32_t m_InputAction = arg2->m_InputAction;
005dceb8      int32_t ebx;
005dceb8      ebx = 0;
005dceb8      
005dcec2      if ((m_InputAction == 7 || m_InputAction == 0xa))
005dcec2      {
005dced0          int32_t y = arg2->m_ptMousePos.y;
005dced8          int32_t x = arg2->m_ptMousePos.x;
005dcedb          ebx = 0;
005dcee6          uint8_t eax;
005dcee6          
005dcee6          if (arg2->m_fStart == 0)
005dcee6          {
005dcf05              if (ProfilerUI::InputLeftMouseCategoryButtonReleased(((char*)this - 8), x, y) != 0)
005dcf07                  ebx = 1;
005dcf07              
005dcf0d              eax = ProfilerUI::InputLeftMouseToolbarButtonReleased(((char*)this - 8), x, y);
005dcee6          }
005dcee6          else
005dcee6          {
005dceef              if (ProfilerUI::InputLeftMouseCategoryButtonPressed(((char*)this - 8), x, y) != 0)
005dcef1                  ebx = 1;
005dcef1              
005dcef7              eax = ProfilerUI::InputLeftMouseToolbarButtonPressed(((char*)this - 8), x, y);
005dcee6          }
005dcee6          
005dcf14          if (eax != 0)
005dcf16              ebx = 1;
005dcec2      }
005dcec2      else if (m_InputAction == 0x57)
005dcecd          return 1;
005dcecd      
005dcf1e      return ebx;
005dceb0  }

005dcf21     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005dcf30  void __thiscall ProfilerUI::AddBudgetStat(class ProfilerUI* this, struct BudgetStatInfo const* arg2)

005dcf30  {
005dcf33      class ProfilerUI* esi;
005dcf33      class ProfilerUI* var_30 = esi;
005dcf34      class ProfilerUI* this_1 = this;
005dcf38      int32_t var_34 = 0x7928af;
005dcf41      void* var_24;
005dcf41      PStringBase<char>::PStringBase<char>(&var_24, &data_7928af);
005dcf41      void* esp_1 = &var_30;
005dcf46      void* esi_1 = var_24;
005dcf4c      int32_t s;
005dcf4c      __builtin_memset(&s, 0, 0x15);
005dcf60      struct BudgetStatInfo* eax = arg2;
005dcf69      uint8_t bIsMem = eax->bIsMem;
005dcf6c      uint8_t bIsMem_1 = bIsMem;
005dcf6c      
005dcf72      if (esi_1 != eax->strName.m_charbuffer)
005dcf72      {
005dcf7b          class ProfilerUI** esp_2 = &this_1;
005dcf7b          
005dcf87          if ((InterlockedDecrement(((char*)esi_1 - 0x10)) == 0 && esi_1 != 0x14))
005dcf87          {
005dcf89              int32_t edx_1 = *(uint32_t*)((char*)esi_1 - 0x14);
005dcf8b              var_30 = 1;
005dcf8b              esp_2 = &var_30;
005dcf8f              *(uint32_t*)edx_1(var_30);
005dcf87          }
005dcf87          
005dcf95          int32_t vtable = esp_2[0xd]->vtable;
005dcf97          esp_2[3] = vtable;
005dcf9e          *(uint32_t*)((char*)esp_2 - 4) = (vtable - 0x10);
005dcf9e          esp_1 = ((char*)esp_2 - 4);
005dcf9f          InterlockedIncrement();
005dcfa5          eax = *(uint32_t*)((char*)esp_1 + 0x34);
005dcfa9          bIsMem = *(uint8_t*)((char*)esp_1 + 0x24);
005dcf72      }
005dcf72      
005dcfaf      uint32_t edx_2 = eax->nGraphicLevel[0];
005dcfb2      *(uint32_t*)((char*)esp_1 + 0x10) = edx_2;
005dcfb2      
005dcfb6      if (bIsMem != 0)
005dcfbb          *(uint32_t*)((char*)esp_1 + 0x10) = (edx_2 << 0x14);
005dcfbb      
005dcfc1      uint32_t edx_4 = eax->nGraphicLevel[1];
005dcfc4      *(uint32_t*)((char*)esp_1 + 0x14) = edx_4;
005dcfc4      
005dcfc8      if (bIsMem != 0)
005dcfcd          *(uint32_t*)((char*)esp_1 + 0x14) = (edx_4 << 0x14);
005dcfcd      
005dcfd3      uint32_t edx_6 = eax->nGraphicLevel[2];
005dcfd6      *(uint32_t*)((char*)esp_1 + 0x18) = edx_6;
005dcfd6      
005dcfda      if (bIsMem != 0)
005dcfdf          *(uint32_t*)((char*)esp_1 + 0x18) = (edx_6 << 0x14);
005dcfdf      
005dcfe5      uint32_t edx_8 = eax->nGraphicLevel[3];
005dcfe8      *(uint32_t*)((char*)esp_1 + 0x1c) = edx_8;
005dcfe8      
005dcfec      if (bIsMem != 0)
005dcff1          *(uint32_t*)((char*)esp_1 + 0x1c) = (edx_8 << 0x14);
005dcff1      
005dcff7      uint32_t eax_4 = eax->nGraphicLevel[4];
005dcffa      *(uint32_t*)((char*)esp_1 + 0x20) = eax_4;
005dcffa      
005dcffe      if (bIsMem != 0)
005dd003          *(uint32_t*)((char*)esp_1 + 0x20) = (eax_4 << 0x14);
005dd003      
005dd007      int32_t edi;
005dd007      *(uint32_t*)((char*)esp_1 - 4) = edi;
005dd007      void* esp_3 = ((char*)esp_1 - 4);
005dd00c      int32_t* edi_2 = (*(uint32_t*)((char*)esp_3 + 8) + 0x58);
005dd00f      *(uint32_t*)((char*)esp_3 + 0x2c) = 0;
005dd017      *(uint32_t*)((char*)esp_3 + 0x30) = 0;
005dd025      int32_t eax_7 = (edi_2[1] & 0x7fffffff);
005dd02c      char eax_12;
005dd02c      
005dd02c      if (edi_2[2] >= eax_7)
005dd02c      {
005dd02e          int32_t edx_10 = (eax_7 + 1);
005dd02e          
005dd034          if (edx_10 <= 8)
005dd036              edx_10 = 8;
005dd034          else if (edx_10 <= 0x4000)
005dd043          {
005dd059              *(uint32_t*)((char*)esp_3 + 0xc) = edx_10;
005dd062              int32_t eflags_1;
005dd062              char eax_11;
005dd062              eax_11 = __bsr_gprv_memv(*(uint32_t*)((char*)esp_3 + 0xc));
005dd06e              int32_t esi_3 = (1 << eax_11);
005dd06e              
005dd072              if (edx_10 > esi_3)
005dd074                  edx_10 = (esi_3 * 2);
005dd043          }
005dd043          else
005dd043          {
005dd047              int32_t eax_9 = (edx_10 & 0x3fff);
005dd047              
005dd04c              if (eax_9 != 0)
005dd055                  edx_10 += (0x4000 - eax_9);
005dd043          }
005dd043          
005dd077          *(uint32_t*)((char*)esp_3 - 4) = edx_10;
005dd07a          eax_12 = SmartArray<BudgetStatItem,1>::grow(edi_2);
005dd02c      }
005dd02c      
005dd081      if ((edi_2[2] < eax_7 || eax_12 != 0))
005dd081      {
005dd093          int32_t* esi_4 = (*(uint32_t*)edi_2 + (edi_2[2] * 0x24));
005dd096          void* eax_15 = *(uint32_t*)esi_4;
005dd096          
005dd09a          if (eax_15 != *(uint32_t*)((char*)esp_3 + 0x10))
005dd09a          {
005dd09c              int32_t ebp;
005dd09c              *(uint32_t*)((char*)esp_3 - 4) = ebp;
005dd0a3              *(uint32_t*)((char*)esp_3 - 8) = ((char*)eax_15 - 0x10);
005dd0a3              
005dd0b0              if ((InterlockedDecrement() == 0 && eax_15 != 0x14))
005dd0b0              {
005dd0b2                  int32_t edx_12 = *(uint32_t*)((char*)eax_15 - 0x14);
005dd0b5                  *(uint32_t*)((char*)esp_3 - 4) = 1;
005dd0b9                  *(uint32_t*)edx_12();
005dd0b0              }
005dd0b0              
005dd0bf              *(uint32_t*)esi_4 = *(uint32_t*)((char*)esp_3 + 0x14);
005dd0c8              *(uint32_t*)((char*)esp_3 - 4) = (*(uint32_t*)((char*)esp_3 + 0x14) - 0x10);
005dd0c9              InterlockedIncrement();
005dd0cf              *(uint32_t*)((char*)esp_3 - 4);
005dd0cf              esp_3 = esp_3;
005dd09a          }
005dd09a          
005dd0d4          esi_4[1] = *(uint32_t*)((char*)esp_3 + 0x14);
005dd0db          esi_4[2] = *(uint32_t*)((char*)esp_3 + 0x18);
005dd0e2          esi_4[3] = *(uint32_t*)((char*)esp_3 + 0x1c);
005dd0e9          esi_4[4] = *(uint32_t*)((char*)esp_3 + 0x20);
005dd0f0          esi_4[5] = *(uint32_t*)((char*)esp_3 + 0x24);
005dd0f3          int32_t ecx_12;
005dd0f3          ecx_12 = *(uint8_t*)((char*)esp_3 + 0x28);
005dd0f7          esi_4[6] = ecx_12;
005dd0fe          esi_4[7] = *(uint32_t*)((char*)esp_3 + 0x2c);
005dd105          esi_4[8] = *(uint32_t*)((char*)esp_3 + 0x30);
005dd108          edi_2[2] += 1;
005dd081      }
005dd081      
005dd10f      int32_t* esi_6 = (*(uint32_t*)((char*)esp_3 + 0x10) - 0x14);
005dd115      *(uint32_t*)((char*)esp_3 - 4) = &esi_6[1];
005dd11c      bool cond:5 = InterlockedDecrement() != 0;
005dd11e      *(uint32_t*)((char*)esp_3 + 4);
005dd11e      void* esp_12 = ((char*)esp_3 + 8);
005dd11e      
005dd123      if ((!(cond:5) && esi_6 != 0))
005dd123      {
005dd125          int32_t edx_16 = *(uint32_t*)esi_6;
005dd127          *(uint32_t*)((char*)esp_12 - 4) = 1;
005dd12b          *(uint32_t*)edx_16();
005dd123      }
005dd123      
005dd12d      *(uint32_t*)esp_12;
005dcf30  }

005dd134                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005dd140  uint8_t __fastcall ProfilerUI::Init(class ProfilerUI* this)

005dd140  {
005dd144      this->m_IsActive = 0;
005dd14d      this->m_nGraphicsQualityLevel = Render::DetermineOverallGraphicsQuality();
005dd14d      
005dd166      for (void* i = nullptr; i < 0x1c; i += 4)
005dd15b          ProfilerUI::AddBudgetStat(this, *(uint32_t*)((char*)i + 0x8f10a0));
005dd15b      
005dd16a      ProfilerUI::InitDBObjStats(this);
005dd173      ProfilerUI::AddCategoryWindow(this, All);
005dd173      
005dd181      if ((ProfilerUI::CreateToolbarWindows(this) != 0 && ProfilerUI::CreateCategoryWindow(this) != 0))
005dd192          return 1;
005dd192      
005dd197      return 0;
005dd140  }

005dd198                                                                          90 90 90 90 90 90 90 90                          ........

005dd1a0  class TResult* ProfilerUI::Create(class TResult* __return, class ProfilerUI** arg2)

005dd1a0  {
005dd1a5      void* eax = operator new(0x88);
005dd1af      class ProfilerUI* eax_1;
005dd1af      
005dd1af      if (eax == 0)
005dd1ba          eax_1 = nullptr;
005dd1af      else
005dd1b3          eax_1 = ProfilerUI::ProfilerUI(eax);
005dd1b3      
005dd1c3      *(uint32_t*)arg2 = eax_1;
005dd1c3      
005dd1c5      if (eax_1 != 0)
005dd1c5      {
005dd1d0          if (ProfilerUI::Init(eax_1) != 0)
005dd1d0          {
005dd1f9              __return->m_val = 0;
005dd200              return __return;
005dd1d0          }
005dd1d0          
005dd1d2          class ProfilerUI* ecx_3 = *(uint32_t*)arg2;
005dd1d2          
005dd1d6          if (ecx_3 != 0)
005dd1d6          {
005dd1d8              uint32_t m_cRef = ecx_3->m_cRef;
005dd1d8              ecx_3->m_cRef -= 1;
005dd1d8              
005dd1db              if (m_cRef == 1)
005dd1dd                  ecx_3->vtable->__vecDelDtor(1);
005dd1dd              
005dd1e3              *(uint32_t*)arg2 = nullptr;
005dd1d6          }
005dd1c5      }
005dd1c5      
005dd1ed      __return->m_val = 0x80004005;
005dd1f4      return __return;
005dd1a0  }

005dd201     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005dd210  void Profiler::ResetFrameStats()

005dd210  {
005dd221      __builtin_memcpy(0x8f13e0, 0x8f10d8, 0x304);
005dd22f      __builtin_memset(0x8f1134, 0, 0x2a8);
005dd232      Profiler::NumActiveCategories = 1;
005dd23c      Profiler::ActiveCategories[0] = All;
005dd210  }

005dd243           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005dd250  void* __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,UIPreferenceItem *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,UIPreferenceItem *> *,0>* this, uint32_t arg2)

005dd250  {
005dd253      class HashTableData<PStringBase<char>,UIPreferenceItem *>** m_buckets = this->m_buckets;
005dd25b      this->vtable = 0x7e9588;
005dd25b      
005dd261      if (m_buckets != &this->m_aInplaceBuckets)
005dd264          operator delete[](m_buckets);
005dd264      
005dd26e      this->m_buckets = nullptr;
005dd271      this->m_firstInterestingBucket = nullptr;
005dd274      this->m_numBuckets = 0;
005dd277      this->m_numElements = 0;
005dd277      
005dd27f      if ((arg2 & 1) != 0)
005dd282          operator delete(this);
005dd282      
005dd28d      return this;
005dd250  }


005dd290  void __fastcall UIPreferenceItem::~UIPreferenceItem(class UIPreferenceItem* this)

005dd290  {
005dd294      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_strPreference.m_charbuffer - 0x14);
005dd29b      this->vtable = 0x7e9590;
005dd29b      
005dd2ad      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
005dd2b5          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
005dd290  }

005dd2b9                                                                             90 90 90 90 90 90 90                           .......

005dd2c0  void* __thiscall UIPreferenceItem::`scalar deleting destructor'(class UIPreferenceItem* this, uint32_t arg2)

005dd2c0  {
005dd2c7      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_strPreference.m_charbuffer - 0x14);
005dd2ce      this->vtable = 0x7e9590;
005dd2ce      
005dd2e0      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
005dd2e8          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
005dd2e8      
005dd2ef      if ((arg2 & 1) != 0)
005dd2f2          operator delete(this);
005dd2f2      
005dd2fe      return this;
005dd2c0  }

005dd301     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005dd310  void __fastcall UIPreferenceItemBool::UIPreferenceItemBool(class UIPreferenceItemBool* this)

005dd310  {
005dd31b      this->vtable = 0x7e9590;
005dd321      PStringBase<char>::PStringBase<char>(&this->m_strPreference, &data_7928af);
005dd328      __builtin_memset(&this->m_dataType, 0, 0x11);
005dd337      this->vtable = 0x7e9600;
005dd310  }

005dd341     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005dd350  uint8_t __thiscall UIPreferenceItemBool::InqBool(class UIPreferenceItemBool const* this, uint8_t* arg2)

005dd350  {
005dd361      return UserPreferences::InqValue(&this->m_strPreference, arg2);
005dd350  }

005dd364              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005dd370  uint8_t __thiscall UIPreferenceItemBool::SetBool(class UIPreferenceItemBool* this, uint8_t const arg2)

005dd370  {
005dd381      return UserPreferences::SetValue(&this->m_strPreference, arg2);
005dd370  }

005dd384              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005dd390  uint8_t __thiscall UIPreferenceItemBool::InqCachedBool(class UIPreferenceItemBool const* this, uint8_t* arg2)

005dd390  {
005dd397      *(uint8_t*)arg2 = this->m_bCache;
005dd39b      return 1;
005dd390  }

005dd39e                                                                                            90 90                                ..

005dd3a0  uint8_t __thiscall UIPreferenceItemBool::SetCachedBool(class UIPreferenceItemBool* this, uint8_t const arg2)

005dd3a0  {
005dd3a4      this->m_bCache = arg2;
005dd3a9      return 1;
005dd3a0  }

005dd3ac                                      90 90 90 90                                                              ....

005dd3b0  void* __thiscall UIPreferenceItemBool::`scalar deleting destructor'(class UIPreferenceItemBool* this, uint32_t arg2)

005dd3b0  {
005dd3b3      this->vtable = 0x7e9600;
005dd3b9      UIPreferenceItem::~UIPreferenceItem(this);
005dd3b9      
005dd3c3      if ((arg2 & 1) != 0)
005dd3c6          operator delete(this);
005dd3c6      
005dd3d1      return this;
005dd3b0  }

005dd3d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005dd3e0  void __fastcall UIPreferenceItemEnum::UIPreferenceItemEnum(class UIPreferenceItemEnum* this)

005dd3e0  {
005dd3eb      this->vtable = 0x7e9590;
005dd3f1      PStringBase<char>::PStringBase<char>(&this->m_strPreference, &data_7928af);
005dd3f8      this->m_dataType = 0;
005dd3fb      this->m_eStringTable = 0;
005dd3fe      this->m_tokenPreference = 0;
005dd401      this->m_tokenTooltip = 0;
005dd404      this->vtable = 0x7e9670;
005dd40a      this->m_nCache = 0xffffffff;
005dd411      this->m_arrayChoices.m_data = 0;
005dd414      this->m_arrayChoices.m_sizeAndDeallocate = 0;
005dd417      this->m_arrayChoices.m_num = 0;
005dd3e0  }

005dd41e                                                                                            90 90                                ..

005dd420  uint8_t __thiscall UIPreferenceItemEnum::InqEnum(class UIPreferenceItemEnum const* this, uint32_t* arg2)

005dd420  {
005dd431      return UserPreferences::InqValue(&this->m_strPreference, arg2);
005dd420  }

005dd434                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005dd440  uint8_t __thiscall UIPreferenceItemEnum::SetEnum(class UIPreferenceItemEnum* this, uint32_t const arg2)

005dd440  {
005dd451      return UserPreferences::SetValue(&this->m_strPreference, arg2);
005dd440  }

005dd454                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005dd460  void* __thiscall UIPreferenceItemEnum::`scalar deleting destructor'(class UIPreferenceItemEnum* this, uint32_t arg2)

005dd460  {
005dd466      this->vtable = 0x7e9670;
005dd46c      SmartArray<unsigned long,1>::~SmartArray<unsigned long,1>(&this->m_arrayChoices);
005dd473      UIPreferenceItem::~UIPreferenceItem(this);
005dd473      
005dd47d      if ((arg2 & 1) != 0)
005dd480          operator delete(this);
005dd480      
005dd48b      return this;
005dd460  }

005dd48e                                            90 90                                                                ..

005dd490  uint8_t __thiscall UIPreferenceItemEnum::InqEnumChoices(class UIPreferenceItemEnum const* this, class SmartArray<unsigned long,1>* arg2)

005dd490  {
005dd498      SmartArray<unsigned long,1>::operator=(arg2, &this->m_arrayChoices);
005dd49d      int32_t* eax;
005dd49d      eax = 1;
005dd49f      return 1;
005dd490  }

005dd4a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005dd4b0  uint8_t __thiscall UIPreferenceItemEnum::SetEnumChoices(class UIPreferenceItemEnum* this, class SmartArray<unsigned long,1> const* arg2)

005dd4b0  {
005dd4b3      /* tailcall */
005dd4b3      return SmartArray<unsigned long,1>::AddToEnd(&this->m_arrayChoices, arg2);
005dd4b0  }

005dd4b8                                                                          90 90 90 90 90 90 90 90                          ........

005dd4c0  uint8_t __thiscall SmartArray<unsigned long,1>::AddToEnd(class SmartArray<unsigned long,1>* this, class SmartArray<unsigned long,1> const* arg2)

005dd4c0  {
005dd4d2      SmartArray<unsigned long,1>::grow(this, (this->m_num + arg2->m_num));
005dd4d7      uint32_t m_num = arg2->m_num;
005dd4da      int32_t eax_2 = (m_num - 1);
005dd4da      
005dd4db      if ((m_num - 1) >= 0)
005dd4db      {
005dd4f0          int32_t temp2_1;
005dd4f0          
005dd4f0          do
005dd4f0          {
005dd4e5              int32_t ecx_3 = arg2->m_data[eax_2];
005dd4ea              int32_t edx_2 = (this->m_num + eax_2);
005dd4ec              temp2_1 = eax_2;
005dd4ec              eax_2 -= 1;
005dd4e8              this->m_data[edx_2] = ecx_3;
005dd4f0          } while ((temp2_1 - 1) >= 0);
005dd4db      }
005dd4db      
005dd4fb      this->m_num += arg2->m_num;
005dd4ff      uint32_t eax_4;
005dd4ff      eax_4 = 1;
005dd502      return 1;
005dd4c0  }

005dd505                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

005dd510  void __fastcall UIPreferenceItemFloat::UIPreferenceItemFloat(class UIPreferenceItemFloat* this)

005dd510  {
005dd51b      this->vtable = 0x7e9590;
005dd521      PStringBase<char>::PStringBase<char>(&this->m_strPreference, &data_7928af);
005dd528      __builtin_memset(&this->m_dataType, 0, 0x18);
005dd53a      this->vtable = 0x7e96e0;
005dd540      this->m_nMax = 1f;
005dd510  }

005dd54b                                   90 90 90 90 90                                                             .....

005dd550  uint8_t __thiscall UIPreferenceItemFloat::InqFloat(class UIPreferenceItemFloat const* this, float* arg2)

005dd550  {
005dd561      return UserPreferences::InqValue(&this->m_strPreference, arg2);
005dd550  }

005dd564              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005dd570  uint8_t __thiscall UIPreferenceItemFloat::SetFloat(class UIPreferenceItemFloat* this, float const arg2)

005dd570  {
005dd581      return UserPreferences::SetValue(&this->m_strPreference, arg2);
005dd570  }

005dd584              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005dd590  uint8_t __thiscall UIPreferenceItemFloat::InqFloatRange(class UIPreferenceItemFloat const* this, float* arg2, float* arg3)

005dd590  {
005dd597      *(uint32_t*)arg2 = this->m_nMin;
005dd5a0      *(uint32_t*)arg3 = this->m_nMax;
005dd5a2      float eax;
005dd5a2      eax = 1;
005dd5a4      return 1;
005dd590  }

005dd5a7                       90 90 90 90 90 90 90 90 90                                                         .........

005dd5b0  uint8_t __thiscall UIPreferenceItemInt::SetIntegerRange(class UIPreferenceItemInt* this, int32_t const arg2, int32_t const arg3)

005dd5b0  {
005dd5b8      this->m_nMin = arg2;
005dd5bb      this->m_nMax = arg3;
005dd5be      int32_t const eax;
005dd5be      eax = 1;
005dd5c0      return 1;
005dd5b0  }

005dd5c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

005dd5d0  void* __thiscall UIPreferenceItemFloat::`scalar deleting destructor'(class UIPreferenceItemFloat* this, uint32_t arg2)

005dd5d0  {
005dd5d3      this->vtable = 0x7e96e0;
005dd5d9      UIPreferenceItem::~UIPreferenceItem(this);
005dd5d9      
005dd5e3      if ((arg2 & 1) != 0)
005dd5e6          operator delete(this);
005dd5e6      
005dd5f1      return this;
005dd5d0  }

005dd5f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005dd600  void __fastcall UIPreferenceItemInt::UIPreferenceItemInt(class UIPreferenceItemInt* this)

005dd600  {
005dd60b      this->vtable = 0x7e9590;
005dd611      PStringBase<char>::PStringBase<char>(&this->m_strPreference, &data_7928af);
005dd618      __builtin_memset(&this->m_dataType, 0, 0x18);
005dd62a      this->vtable = 0x7e9750;
005dd630      this->m_nMax = 1;
005dd600  }

005dd63b                                                                                   90 90 90 90 90                             .....

005dd640  uint8_t __thiscall UIPreferenceItemInt::InqInteger(class UIPreferenceItemInt const* this, int32_t* arg2)

005dd640  {
005dd651      return UserPreferences::InqValue(&this->m_strPreference, arg2);
005dd640  }

005dd654                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005dd660  uint8_t __thiscall UIPreferenceItemInt::SetInteger(class UIPreferenceItemInt* this, int32_t const arg2)

005dd660  {
005dd671      return UserPreferences::SetValue(&this->m_strPreference, arg2);
005dd660  }

005dd674                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

005dd680  uint8_t __thiscall UIPreferenceItemInt::InqCachedInteger(class UIPreferenceItemInt const* this, int32_t* arg2)

005dd680  {
005dd687      *(uint32_t*)arg2 = this->m_nCache;
005dd689      int32_t eax;
005dd689      eax = 1;
005dd68b      return 1;
005dd680  }

005dd68e                                            90 90                                                                ..

005dd690  uint8_t __thiscall UIPreferenceItemEnum::SetCachedEnum(class UIPreferenceItemEnum* this, uint32_t const arg2)

005dd690  {
005dd694      this->m_nCache = arg2;
005dd697      uint32_t const eax;
005dd697      eax = 1;
005dd699      return 1;
005dd690  }

005dd69c                                                                                      90 90 90 90                              ....

005dd6a0  void* __thiscall UIPreferenceItemInt::`scalar deleting destructor'(class UIPreferenceItemInt* this, uint32_t arg2)

005dd6a0  {
005dd6a3      this->vtable = 0x7e9750;
005dd6a9      UIPreferenceItem::~UIPreferenceItem(this);
005dd6a9      
005dd6b3      if ((arg2 & 1) != 0)
005dd6b6          operator delete(this);
005dd6b6      
005dd6c1      return this;
005dd6a0  }

005dd6c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005dd6d0  void __fastcall UIPreferenceItemString::UIPreferenceItemString(class UIPreferenceItemString* this)

005dd6d0  {
005dd6db      this->vtable = 0x7e9590;
005dd6e1      PStringBase<char>::PStringBase<char>(&this->m_strPreference, &data_7928af);
005dd6f0      this->m_dataType = 0;
005dd6f3      this->m_eStringTable = 0;
005dd6f6      this->m_tokenPreference = 0;
005dd6f9      this->m_tokenTooltip = 0;
005dd6fc      this->vtable = 0x7e97c0;
005dd702      PStringBase<char>::PStringBase<char>(&this->m_strCache, &data_7928af);
005dd6d0  }

005dd70b                                   90 90 90 90 90                                                             .....

005dd710  uint8_t __thiscall UIPreferenceItemString::InqString(class UIPreferenceItemString const* this, class PStringBase<char>* arg2)

005dd710  {
005dd721      return UserPreferences::InqValue(&this->m_strPreference, arg2);
005dd710  }

005dd724              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005dd730  uint8_t __thiscall UIPreferenceItemString::SetString(class UIPreferenceItemString* this, class PStringBase<char> const* arg2)

005dd730  {
005dd741      return UserPreferences::SetValue(&this->m_strPreference, arg2);
005dd730  }

005dd744              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

005dd750  uint8_t __thiscall UIPreferenceItemString::InqCachedString(class UIPreferenceItemString const* this, class PStringBase<char>* arg2)

005dd750  {
005dd758      PStringBase<char>::set(arg2, &this->m_strCache);
005dd75d      int32_t eax;
005dd75d      eax = 1;
005dd75f      return 1;
005dd750  }

005dd762        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005dd770  uint8_t __thiscall UIPreferenceItemString::SetCachedString(class UIPreferenceItemString* this, class PStringBase<char> const* arg2)

005dd770  {
005dd778      PStringBase<char>::set(&this->m_strCache, arg2);
005dd77d      int32_t eax;
005dd77d      eax = 1;
005dd77f      return 1;
005dd770  }

005dd782        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005dd790  void* __thiscall UIPreferenceItemString::`scalar deleting destructor'(class UIPreferenceItemString* this, uint32_t arg2)

005dd790  {
005dd796      this->vtable = 0x7e97c0;
005dd79c      PStringBase<unsigned short>::~PStringBase<unsigned short>(&this->m_strCache);
005dd7a3      UIPreferenceItem::~UIPreferenceItem(this);
005dd7a3      
005dd7ad      if ((arg2 & 1) != 0)
005dd7b0          operator delete(this);
005dd7b0      
005dd7bb      return this;
005dd790  }

005dd7be                                                                                            90 90                                ..

005dd7c0  uint8_t UIPreferences::InqPreference(class PStringBase<char> const* arg1, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4)

005dd7c0  {
005dd7d2      void __return;
005dd7d2      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005dd7dd      int32_t* var_4;
005dd7dd      int32_t* eax;
005dd7dd      
005dd7dd      if (var_4 == 0)
005dd7dd      {
005dd809          eax = 0;
005dd80e          return 0;
005dd7dd      }
005dd7dd      
005dd7df      void* ecx = var_4[2];
005dd7e4      eax = 1;
005dd7e4      
005dd7e6      if (ecx != 0)
005dd7e6      {
005dd7ef          *(uint32_t*)arg2 = *(uint32_t*)((char*)ecx + 0xc);
005dd7f8          *(uint32_t*)arg3 = *(uint32_t*)((char*)ecx + 0x10);
005dd801          *(uint32_t*)arg4 = *(uint32_t*)((char*)ecx + 0x14);
005dd803          eax = 1;
005dd7e6      }
005dd7e6      
005dd808      return eax;
005dd7c0  }

005dd80f                                               90                                                                 .

005dd810  uint8_t UIPreferences::SetPreferenceRange(class PStringBase<char> const* arg1, float const arg2, float const arg3)

005dd810  {
005dd822      void __return;
005dd822      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005dd82d      void* var_4;
005dd82d      void* eax;
005dd82d      
005dd82d      if (var_4 == 0)
005dd82d      {
005dd84b          eax = 0;
005dd850          return 0;
005dd82d      }
005dd82d      
005dd82f      int32_t* ecx = *(uint32_t*)((char*)var_4 + 8);
005dd834      eax = 1;
005dd834      
005dd836      if (ecx != 0)
005dd844          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x3c)(arg2, arg3);
005dd844      
005dd84a      return eax;
005dd810  }

005dd851                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005dd860  uint8_t UIPreferences::InqPreferenceRange(class PStringBase<char> const* arg1, float* arg2, float* arg3)

005dd860  {
005dd872      void __return;
005dd872      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005dd87d      void* var_4;
005dd87d      void* eax;
005dd87d      
005dd87d      if (var_4 == 0)
005dd87d      {
005dd89b          eax = 0;
005dd8a0          return 0;
005dd87d      }
005dd87d      
005dd87f      int32_t* ecx = *(uint32_t*)((char*)var_4 + 8);
005dd884      eax = 1;
005dd884      
005dd886      if (ecx != 0)
005dd894          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x38)(arg2, arg3);
005dd894      
005dd89a      return eax;
005dd860  }

005dd8a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

005dd8b0  uint8_t UIPreferences::InqPreferenceRange(class PStringBase<char> const* arg1, int32_t* arg2, int32_t* arg3)

005dd8b0  {
005dd8c2      void __return;
005dd8c2      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005dd8cd      void* var_4;
005dd8cd      void* eax;
005dd8cd      
005dd8cd      if (var_4 == 0)
005dd8cd      {
005dd8eb          eax = 0;
005dd8f0          return 0;
005dd8cd      }
005dd8cd      
005dd8cf      int32_t* ecx = *(uint32_t*)((char*)var_4 + 8);
005dd8d4      eax = 1;
005dd8d4      
005dd8d6      if (ecx != 0)
005dd8e4          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x14)(arg2, arg3);
005dd8e4      
005dd8ea      return eax;
005dd8b0  }

005dd8f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005dd900  uint8_t UIPreferences::SetEnumChoices(class PStringBase<char> const* arg1, class SmartArray<unsigned long,1> const* arg2)

005dd900  {
005dd912      void __return;
005dd912      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005dd91d      void* var_4;
005dd91d      void* eax;
005dd91d      
005dd91d      if (var_4 == 0)
005dd91d      {
005dd936          eax = 0;
005dd93b          return 0;
005dd91d      }
005dd91d      
005dd91f      int32_t* ecx = *(uint32_t*)((char*)var_4 + 8);
005dd924      eax = 1;
005dd924      
005dd926      if (ecx != 0)
005dd92f          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x28)(arg2);
005dd92f      
005dd935      return eax;
005dd900  }

005dd93c                                                                                      90 90 90 90                              ....

005dd940  uint8_t UIPreferences::InqEnumChoices(class PStringBase<char> const* arg1, class SmartArray<unsigned long,1>* arg2)

005dd940  {
005dd952      void __return;
005dd952      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005dd95d      void* var_4;
005dd95d      void* eax;
005dd95d      
005dd95d      if (var_4 == 0)
005dd95d      {
005dd976          eax = 0;
005dd97b          return 0;
005dd95d      }
005dd95d      
005dd95f      int32_t* ecx = *(uint32_t*)((char*)var_4 + 8);
005dd964      eax = 1;
005dd964      
005dd966      if (ecx != 0)
005dd96f          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x24)(arg2);
005dd96f      
005dd975      return eax;
005dd940  }

005dd97c                                                                                      90 90 90 90                              ....

005dd980  void __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,UIPreferenceItem *> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,UIPreferenceItem *> *,0>(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,UIPreferenceItem *> *,0>* this, uint32_t arg2)

005dd980  {
005dd98b      arg2 = arg2;
005dd98f      uint8_t edx = ((int8_t)arg2);
005dd993      this->m_buckets = nullptr;
005dd996      this->m_firstInterestingBucket = nullptr;
005dd999      this->m_numBuckets = 0;
005dd99c      this->m_numElements = 0;
005dd9a0      this->vtable = 0x7e9588;
005dd9a6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
005dd9b9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
005dd9b9      
005dd9c3      if (eax == bucketSizesEnd_1)
005dd9c5          eax -= 4;
005dd9c5      
005dd9c8      uint32_t eax_1 = *(uint32_t*)eax;
005dd9cd      this->m_numBuckets = eax_1;
005dd9cd      
005dd9d0      if (eax_1 > 0x17)
005dd9e6          this->m_buckets = operator new[]((eax_1 << 2));
005dd9d0      else
005dd9d5          this->m_buckets = &this->m_aInplaceBuckets;
005dd9d5      
005dd9ec      class HashTableData<PStringBase<char>,UIPreferenceItem *>** m_buckets = this->m_buckets;
005dd9ef      uint32_t ecx_3 = (this->m_numBuckets << 2);
005dd9f5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
005dda06      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
005dd980  }

005dda0f                                               90                                                                 .

005dda10  void __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>::add_internal(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>* this, class HashTableData<PStringBase<char>,unsigned long>* arg2)

005dda10  {
005dda18      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_hashKey.m_charbuffer;
005dda1a      uint32_t eax = *(int32_t*)((char*)m_charbuffer + -8);
005dda22      uint32_t m_numBuckets = this->m_numBuckets;
005dda22      
005dda25      if (eax == 0xffffffff)
005dda25      {
005dda28          eax = compute_str_hash(m_charbuffer);
005dda30          *(uint32_t*)((char*)m_charbuffer - 8) = eax;
005dda25      }
005dda25      
005dda35      uint32_t temp1 = (COMBINE(0, eax) % m_numBuckets);
005dda37      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_buckets;
005dda3d      arg2->m_hashNext = m_buckets[temp1];
005dda40      m_buckets[temp1] = arg2;
005dda46      class HashTableData<PStringBase<char>,unsigned long>** eax_1 = &m_buckets[temp1];
005dda46      
005dda4b      if (eax_1 < this->m_firstInterestingBucket)
005dda4d          this->m_firstInterestingBucket = eax_1;
005dda4d      
005dda55      this->m_numElements += 1;
005dda10  }

005dda5e                                                                                            90 90                                ..

005dda60  uint8_t UIPreferences::ModifyPreference(class PStringBase<char> const* arg1, uint8_t const arg2)

005dda60  {
005dda72      void __return;
005dda72      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005dda7d      void* var_4;
005dda7d      void* eax;
005dda7d      int32_t* ecx;
005dda7d      
005dda7d      if (var_4 == 0)
005dda7d      {
005dda86          eax = 0;
005dda88          ecx = nullptr;
005dda7d      }
005dda7d      else
005dda7d      {
005dda7f          ecx = *(uint32_t*)((char*)var_4 + 8);
005dda82          eax = 1;
005dda7d      }
005dda7d      
005dda8c      if (eax != 0)
005dda95          eax = *(uint32_t*)(*(uint32_t*)ecx + 8)(arg2);
005dda95      
005dda9b      return eax;
005dda60  }

005dda9c                                                                                      90 90 90 90                              ....

005ddaa0  uint8_t UIPreferences::ModifyPreference(class PStringBase<char> const* arg1, int32_t const arg2)

005ddaa0  {
005ddab2      void __return;
005ddab2      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005ddabd      void* var_4;
005ddabd      void* eax;
005ddabd      int32_t* ecx;
005ddabd      
005ddabd      if (var_4 == 0)
005ddabd      {
005ddac6          eax = 0;
005ddac8          ecx = nullptr;
005ddabd      }
005ddabd      else
005ddabd      {
005ddabf          ecx = *(uint32_t*)((char*)var_4 + 8);
005ddac2          eax = 1;
005ddabd      }
005ddabd      
005ddacc      if (eax != 0)
005ddad5          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x10)(arg2);
005ddad5      
005ddadb      return eax;
005ddaa0  }

005ddadc                                                                                      90 90 90 90                              ....

005ddae0  uint8_t UIPreferences::ModifyPreference(class PStringBase<char> const* arg1, uint32_t const arg2)

005ddae0  {
005ddaf2      void __return;
005ddaf2      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005ddafd      void* var_4;
005ddafd      void* eax;
005ddafd      int32_t* ecx;
005ddafd      
005ddafd      if (var_4 == 0)
005ddafd      {
005ddb06          eax = 0;
005ddb08          ecx = nullptr;
005ddafd      }
005ddafd      else
005ddafd      {
005ddaff          ecx = *(uint32_t*)((char*)var_4 + 8);
005ddb02          eax = 1;
005ddafd      }
005ddafd      
005ddb0c      if (eax != 0)
005ddb15          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x20)(arg2);
005ddb15      
005ddb1b      return eax;
005ddae0  }

005ddb1c                                                                                      90 90 90 90                              ....

005ddb20  uint8_t UIPreferences::ModifyPreference(class PStringBase<char> const* arg1, float const arg2)

005ddb20  {
005ddb32      void __return;
005ddb32      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005ddb3d      void* var_4;
005ddb3d      void* eax;
005ddb3d      int32_t* ecx;
005ddb3d      
005ddb3d      if (var_4 == 0)
005ddb3d      {
005ddb46          eax = 0;
005ddb48          ecx = nullptr;
005ddb3d      }
005ddb3d      else
005ddb3d      {
005ddb3f          ecx = *(uint32_t*)((char*)var_4 + 8);
005ddb42          eax = 1;
005ddb3d      }
005ddb3d      
005ddb4c      if (eax != 0)
005ddb55          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x34)(arg2);
005ddb55      
005ddb5b      return eax;
005ddb20  }

005ddb5c                                                                                      90 90 90 90                              ....

005ddb60  uint8_t UIPreferences::InqPreferenceValue(class PStringBase<char> const* arg1, uint8_t* arg2)

005ddb60  {
005ddb72      void __return;
005ddb72      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005ddb7d      void* var_4;
005ddb7d      void* eax;
005ddb7d      int32_t* ecx;
005ddb7d      
005ddb7d      if (var_4 == 0)
005ddb7d      {
005ddb86          eax = 0;
005ddb88          ecx = nullptr;
005ddb7d      }
005ddb7d      else
005ddb7d      {
005ddb7f          ecx = *(uint32_t*)((char*)var_4 + 8);
005ddb82          eax = 1;
005ddb7d      }
005ddb7d      
005ddb8c      if (eax != 0)
005ddb95          eax = *(uint32_t*)(*(uint32_t*)ecx + 4)(arg2);
005ddb95      
005ddb9b      return eax;
005ddb60  }

005ddb9c                                                                                      90 90 90 90                              ....

005ddba0  uint8_t UIPreferences::InqPreferenceValue(class PStringBase<char> const* arg1, int32_t* arg2)

005ddba0  {
005ddbb2      void __return;
005ddbb2      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005ddbbd      void* var_4;
005ddbbd      void* eax;
005ddbbd      int32_t* ecx;
005ddbbd      
005ddbbd      if (var_4 == 0)
005ddbbd      {
005ddbc6          eax = 0;
005ddbc8          ecx = nullptr;
005ddbbd      }
005ddbbd      else
005ddbbd      {
005ddbbf          ecx = *(uint32_t*)((char*)var_4 + 8);
005ddbc2          eax = 1;
005ddbbd      }
005ddbbd      
005ddbcc      if (eax != 0)
005ddbd5          eax = *(uint32_t*)(*(uint32_t*)ecx + 0xc)(arg2);
005ddbd5      
005ddbdb      return eax;
005ddba0  }

005ddbdc                                                                                      90 90 90 90                              ....

005ddbe0  uint8_t UIPreferences::InqPreferenceValue(class PStringBase<char> const* arg1, uint32_t* arg2)

005ddbe0  {
005ddbf2      void __return;
005ddbf2      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005ddbfd      void* var_4;
005ddbfd      void* eax;
005ddbfd      int32_t* ecx;
005ddbfd      
005ddbfd      if (var_4 == 0)
005ddbfd      {
005ddc06          eax = 0;
005ddc08          ecx = nullptr;
005ddbfd      }
005ddbfd      else
005ddbfd      {
005ddbff          ecx = *(uint32_t*)((char*)var_4 + 8);
005ddc02          eax = 1;
005ddbfd      }
005ddbfd      
005ddc0c      if (eax != 0)
005ddc15          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x1c)(arg2);
005ddc15      
005ddc1b      return eax;
005ddbe0  }

005ddc1c                                                                                      90 90 90 90                              ....

005ddc20  uint8_t UIPreferences::InqPreferenceValue(class PStringBase<char> const* arg1, float* arg2)

005ddc20  {
005ddc32      void __return;
005ddc32      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005ddc3d      void* var_4;
005ddc3d      void* eax;
005ddc3d      int32_t* ecx;
005ddc3d      
005ddc3d      if (var_4 == 0)
005ddc3d      {
005ddc46          eax = 0;
005ddc48          ecx = nullptr;
005ddc3d      }
005ddc3d      else
005ddc3d      {
005ddc3f          ecx = *(uint32_t*)((char*)var_4 + 8);
005ddc42          eax = 1;
005ddc3d      }
005ddc3d      
005ddc4c      if (eax != 0)
005ddc55          eax = *(uint32_t*)(*(uint32_t*)ecx + 0x30)(arg2);
005ddc55      
005ddc5b      return eax;
005ddc20  }

005ddc5c                                                                                      90 90 90 90                              ....

005ddc60  class HashTableData<PStringBase<char>,GRPObject *>* __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>::remove(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>* this, class PStringBase<char> const* arg2)

005ddc60  {
005ddc76      int32_t __return;
005ddc76      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(this, &__return, arg2);
005ddc81      int32_t result;
005ddc81      
005ddc81      if (result == 0)
005ddcb2          return 0;
005ddcb2      
005ddc90      int32_t var_8;
005ddc90      int32_t var_20_1 = var_8;
005ddc97      int32_t result_1 = result;
005ddc9a      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, __return);
005ddca7      return result;
005ddc60  }

005ddcb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

005ddcc0  void* __thiscall HashTable<PStringBase<char>,UIPreferenceItem *,0>::`scalar deleting destructor'(class HashTable<PStringBase<char>,UIPreferenceItem *,0>* this, uint32_t arg2)

005ddcc0  {
005ddcc9      this->vtable = 0x7e9830;
005ddccf      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_intrusiveTable);
005ddcd4      class HashTableData<PStringBase<char>,UIPreferenceItem *>** m_buckets = this->m_intrusiveTable.m_buckets;
005ddcc4      this->m_intrusiveTable.vtable = 0x7e9588;
005ddcc4      
005ddce2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
005ddce5          operator delete[](m_buckets);
005ddce5      
005ddcc4      this->m_intrusiveTable.m_buckets = nullptr;
005ddcc4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
005ddcc4      this->m_intrusiveTable.m_numBuckets = 0;
005ddcc4      this->m_intrusiveTable.m_numElements = 0;
005ddcc4      
005ddd00      if ((arg2 & 1) != 0)
005ddd03          operator delete(this);
005ddd03      
005ddd0f      return this;
005ddcc0  }

005ddd12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

005ddd20  uint8_t UIPreferences::AttachPreference(class PStringBase<char> const* arg1, uint32_t const arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5)

005ddd20  {
005ddd33      void __return;
005ddd33      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&UIPreferences::m_uiPreferences.m_intrusiveTable, &__return, arg1);
005ddd3e      int32_t var_4;
005ddd3e      
005ddd3e      if (var_4 != 0)
005ddd3e      {
005ddd40          int32_t eax;
005ddd40          eax = 0;
005ddd46          return 0;
005ddd3e      }
005ddd3e      
005ddd53      void* eax_1;
005ddd53      
005ddd53      if ((arg2 - 1) <= 4)
005ddd59          switch (arg2)
005ddd59          {
005dddab              case 1:
005dddab              {
005dddab                  eax_1 = operator new(0x24);
005dddab                  
005dddb5                  if (eax_1 != 0)
005dddb5                  {
005dddb9                      eax_1 = UIPreferenceItemInt::UIPreferenceItemInt(eax_1);
005dddbe                      goto label_5dddd9;
005dddb5                  }
005dddab                  break;
005dddab              }
005ddd7d              case 2:
005ddd7d              {
005ddd7d                  eax_1 = operator new(0x28);
005ddd7d                  
005ddd87                  if (eax_1 != 0)
005ddd87                  {
005ddd8b                      eax_1 = UIPreferenceItemEnum::UIPreferenceItemEnum(eax_1);
005ddd90                      goto label_5dddd9;
005ddd87                  }
005ddd7d                  break;
005ddd7d              }
005ddd94              case 3:
005ddd94              {
005ddd94                  eax_1 = operator new(0x24);
005ddd94                  
005ddd9e                  if (eax_1 != 0)
005ddd9e                  {
005ddda2                      eax_1 = UIPreferenceItemFloat::UIPreferenceItemFloat(eax_1);
005ddda7                      goto label_5dddd9;
005ddd9e                  }
005ddd94                  break;
005ddd94              }
005ddd62              case 4:
005ddd62              {
005ddd62                  eax_1 = operator new(0x1c);
005ddd62                  
005ddd6c                  if (eax_1 != 0)
005ddd6c                  {
005ddd74                      eax_1 = UIPreferenceItemBool::UIPreferenceItemBool(eax_1);
005dddd9                  label_5dddd9:
005dddd9                      uint32_t var_10 = eax_1;
005dddd9                      
005ddddd                      if (eax_1 != 0)
005ddddd                      {
005dddf9                          if (UIPreferenceItem::Initialize(eax_1, arg1, arg2, arg3, arg4, arg5) != 0)
005dde22                              return HashTable<PStringBase<char>,unsigned long,0>::add(&UIPreferences::m_uiPreferences, arg1, &var_10);
005dde22                          
005dde01                          **(uint32_t**)eax_1(1);
005ddddd                      }
005ddd6c                  }
005ddd62                  break;
005ddd62              }
005dddc2              case 5:
005dddc2              {
005dddc2                  eax_1 = operator new(0x1c);
005dddc2                  
005dddcc                  if (eax_1 != 0)
005dddcc                  {
005dddd0                      eax_1 = UIPreferenceItemString::UIPreferenceItemString(eax_1);
005dddd0                      goto label_5dddd9;
005dddcc                  }
005dddc2                  break;
005dddc2              }
005ddd59          }
005ddd59      
005dde05      eax_1 = 0;
005dde0b      return 0;
005ddd20  }

005dde23           90                                                                                         .
005dde24  uint32_t jump_table_5dde24[0x5] = 
005dde24  {
005dde24      [0x0] =  0x005ddda9
005dde28      [0x1] =  0x005ddd7b
005dde2c      [0x2] =  0x005ddd92
005dde30      [0x3] =  0x005ddd60
005dde34      [0x4] =  0x005dddc0
005dde38  }

005dde38                                                                          90 90 90 90 90 90 90 90                          ........

005dde40  uint8_t UIPreferences::DetachPreference(class PStringBase<char> const* arg1)

005dde40  {
005dde4b      class HashTableData<PStringBase<char>,GRPObject *>* eax = IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,GRPObject *> *,0>::remove(&UIPreferences::m_uiPreferences.m_intrusiveTable, arg1);
005dde4b      
005dde54      if (eax == 0)
005dde54      {
005dde84          eax = 0;
005dde87          return 0;
005dde54      }
005dde54      
005dde59      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (eax->m_hashKey.m_charbuffer - 0x14);
005dde59      
005dde6c      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
005dde74          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
005dde74      
005dde77      operator delete(eax);
005dde80      int32_t eax_2;
005dde80      eax_2 = 1;
005dde83      return 1;
005dde40  }

005dde88                          90 90 90 90 90 90 90 90                                                          ........

005dde90  uint8_t __thiscall UIPreferenceItem::Initialize(class UIPreferenceItem* this, class PStringBase<char> const* arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6)

005dde90  {
005dde92      class PStringBase<char>* edi = arg2;
005dde96      int32_t __saved_ebx = 0;
005dde98      class PStringBase<char>* var_10 = edi;
005ddea5      class PStringBase<char>* eax;
005ddea5      enum GRVDataType edx;
005ddea5      
005ddea5      if (UserPreferences::IsPreferenceRegistered(eax, edx) == 0)
005ddea5      {
005ddea7          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
005ddeac          arg2 = PStringBase<char>::s_NullBuffer_1;
005ddeb4          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
005ddebc          class PSRefBufferCharData<char>* __saved_ebx_2 = edi->m_charbuffer;
005ddec7          PStringBase<char>::sprintf(&arg2, "UIPreferenceItem::Initialize: At…");
005dded0          void* __offset(PStringBase<char>, -0x14) esi_2 = &arg2[-5];
005dded0          
005ddee6          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
005ddeee              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
005ddeee          
005ddef1          int32_t eax_4;
005ddef1          eax_4 = 0;
005ddef4          return 0;
005ddea5      }
005ddea5      
005ddefa      class PSRefBufferCharData<char>* m_charbuffer = this->m_strPreference.m_charbuffer;
005ddefa      
005ddeff      if (m_charbuffer != edi->m_charbuffer)
005ddeff      {
005ddf14          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
005ddf1c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
005ddf1c          
005ddf1e          class PSRefBufferCharData<char>* m_charbuffer_1 = edi->m_charbuffer;
005ddf20          this->m_strPreference.m_charbuffer = m_charbuffer_1;
005ddf27          InterlockedIncrement(&m_charbuffer_1[-1]);
005ddeff      }
005ddeff      
005ddf39      this->m_dataType = arg3;
005ddf41      this->m_tokenTooltip = arg6;
005ddf45      this->m_eStringTable = arg4;
005ddf48      this->m_tokenPreference = arg5;
005ddf4b      uint32_t const eax_9;
005ddf4b      eax_9 = 1;
005ddf4e      return 1;
005dde90  }

005ddf51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

005ddf60  uint8_t __thiscall UIPreferenceItemEnum::InqEnumValues(class UIPreferenceItemEnum const* this, class SmartArray<unsigned long,1>* arg2)

005ddf60  {
005ddf65      void* var_c = nullptr;
005ddf69      int32_t var_8 = 0;
005ddf6d      int32_t var_4 = 0;
005ddf80      int32_t ebx;
005ddf80      ebx = UserPreferences::InqChoiceValues(&this->m_strPreference, &var_c);
005ddf80      
005ddf87      if (ebx != 0)
005ddf92          SmartArray<unsigned long,1>::AddToEnd(arg2, &var_c);
005ddf92      
005ddfa7      if ((var_8 & 0x80000000) == 0x80000000)
005ddfae          operator delete[](var_c);
005ddfae      
005ddfbc      return ebx;
005ddf60  }

005ddfbf                                                                                               90                                 .

005ddfc0  void* operator new[](uint32_t arg1)

005ddfc0  {
005ddfc0      /* tailcall */
005ddfc0      return operator new(arg1);
005ddfc0  }


005ddfc5  void* operator new(uint32_t arg1)

005ddfc5  {
005ddfde      int32_t result;
005ddfde      
005ddfde      while (true)
005ddfde      {
005ddfde          result = j_malloc(arg1);
005ddfde          
005ddfe6          if (result != 0)
005ddfe6              break;
005ddfe6          
005ddfd5          if (j__callnewh(arg1) == 0)
005ddfd7              std::_Nomemory();
005ddfde      }
005ddfde      
005ddfe9      return result;
005ddfc5  }

005ddfea                                cc cc cc cc cc cc                                                            ......

005ddff0  int32_t (*)() _onexit(int32_t (* arg1)())

005ddff0  {
005ddff7      if (__onexitbegin != 0xffffffff)
005de015          return j___dllonexit(arg1, 0x9057d0, 0x9057cc);
005de015      
005ddff9      /* tailcall */
005ddff9      return _imp___onexit(arg1);
005ddff0  }


005de016  int32_t atexit(void (* arg1)())

005de016  {
005de01a      int32_t (* eax)() = _onexit(arg1);
005de01f      int32_t eax_1 = -(eax);
005de027      return (-((eax_1 - eax_1)) - 1);
005de016  }


005de028  int32_t j__purecall()

005de028  {
005de028      /* tailcall */
005de028      return _purecall();
005de028  }


005de02e  void operator delete(void* arg1)

005de02e  {
005de02e      /* tailcall */
005de02e      return operator delete(arg1);
005de02e  }


005de034  void operator delete[](void* arg1)

005de034  {
005de034      /* tailcall */
005de034      return operator delete[](arg1);
005de034  }


005de03a  void WinMainCRTStartup() __noreturn
// This function has unresolved stack usage. View graph of stack usage to resolve.

005de03a  {
005de03a      int32_t var_4 = 0x70;
005de03c      int32_t var_8 = 0x7e98e8;
005de6a4      int32_t (* var_10)() = j__except_handler3;
005de6af      TEB* fsbase;
005de6af      int32_t var_14 = *(uint32_t*)fsbase;
005de6be      int32_t ebx;
005de6be      int32_t var_88_8 = ebx;
005de6c0      void (* edi)();
005de6c0      void (* var_90)() = edi;
005de6c4      int32_t* var_1c = &var_90;
005de6c7      void* const var_94_2 = &data_5de046;
005de6cb      int32_t var_8_2 = 0xffffffff;
005de6d2      int32_t var_c = 0x7e98e8;
005de6d8      *(uint32_t*)fsbase = &var_14;
005de04f      HINSTANCE eax = GetModuleHandleA(nullptr);
005de056      int32_t var_20;
005de056      
005de056      if (*(uint16_t*)eax != 0x5a4d)
005de077          var_20 = 0;
005de056      else
005de056      {
005de05b          int32_t* ecx_2 = (eax[0xf] + eax);
005de05b          
005de063          if (*(uint32_t*)ecx_2 != 0x4550)
005de077              var_20 = 0;
005de063          else
005de063          {
005de065              uint32_t eax_1 = ((uint32_t)ecx_2[6]);
005de06e              int32_t eax_2;
005de06e              
005de06e              if (eax_1 == 0x10b)
005de06e              {
005de093                  if (ecx_2[0x1d] <= 0xe)
005de077                      var_20 = 0;
005de093                  else
005de093                  {
005de09d                      eax_2 = ecx_2[0x3a] != 0;
005de0a0                      var_20 = eax_2;
005de093                  }
005de06e              }
005de06e              else if ((eax_1 == 0x20b && ecx_2[0x21] > 0xe))
005de083              {
005de09d                  eax_2 = ecx_2[0x3e] != 0;
005de0a0                  var_20 = eax_2;
005de083              }
005de083              else
005de077                  var_20 = 0;
005de063          }
005de056      }
005de056      
005de0a3      int32_t var_8_1 = 0;
005de0a8      __set_app_type(2);
005de0af      __onexitend = 0xffffffff;
005de0b6      __onexitbegin = 0xffffffff;
005de0bd      int32_t eax_3 = __p__fmode();
005de0c9      *(uint32_t*)eax_3 = _fmode;
005de0cb      int32_t eax_4 = __p__commode();
005de0d7      *(uint32_t*)eax_4 = _commode;
005de0e0      _adjust_fdiv = *(uint32_t*)_imp___adjust_fdiv;
005de0e5      _RTC_Initialize();
005de0ea      _setargv();
005de0ea      
005de0f5      if (__defaultmatherr == 0)
005de0fc          __setusermatherr(_setargv);
005de0fc      
005de103      _setdefaultprecision();
005de112      j__initterm(0x816cb0, 0x816cb4);
005de117      var_90 = _RTC_Terminate;
005de11c      atexit(var_90);
005de126      int32_t _newmode_1 = _newmode;
005de13f      void var_30;
005de13f      void var_2c;
005de13f      void var_28;
005de13f      int32_t eax_7 = __getmainargs(&var_30, &var_2c, &var_28, _dowildcard, &_newmode_1);
005de148      int32_t var_34 = eax_7;
005de148      
005de14d      if (eax_7 < 0)
005de151          j__amsg_exit(8);
005de151      
005de161      j__initterm(0x80a000, 0x816cac);
005de16d      char* esi = *(uint32_t*)_imp___acmdln;
005de16f      char* var_38 = esi;
005de175      char i;
005de175      
005de175      if (*(uint8_t*)esi != 0x22)
005de175      {
005de1b4          while (*(uint8_t*)esi > 0x20)
005de1b4          {
005de1b6              esi = &esi[1];
005de1b7              char* var_38_3 = esi;
005de1b4          }
005de175      }
005de175      else
005de175      {
005de183          do
005de183          {
005de177              esi = &esi[1];
005de178              char* var_38_1 = esi;
005de17b              i = *(uint8_t*)esi;
005de17b              
005de17f              if (i == 0)
005de17f                  break;
005de183          } while (i != 0x22);
005de183          
005de188          if (*(uint8_t*)esi == 0x22)
005de188              goto label_5de18a;
005de175      }
005de175      
005de18e      while (true)
005de18e      {
005de18e          i = *(uint8_t*)esi;
005de18e          
005de196          if ((i == 0 || i > 0x20))
005de196          {
005de198              char var_50 = 0;
005de19f              void lpStartupInfo;
005de19f              GetStartupInfoA(&lpStartupInfo);
005de1a9              uint32_t eax_8;
005de1a9              int16_t var_4c;
005de1a9              
005de1a9              if ((var_50 & 1) == 0)
005de1a9              {
005de1bc                  int32_t var_88_5 = 0xa;
005de1be                  eax_8 = 0xa;
005de1a9              }
005de1a9              else
005de1ab                  eax_8 = ((uint32_t)var_4c);
005de1c0              char* var_8c_2 = esi;
005de1c1              var_90 = nullptr;
005de1c6              int32_t status = WinMain(GetModuleHandleA(nullptr), var_90, var_8c_2, eax_8);
005de1cd              int32_t status_1 = status;
005de1cd              
005de1d3              if (var_20 == 0)
005de1d3              {
005de1d6                  exit(status);
005de1d6                  /* no return */
005de1d3              }
005de1d3              
005de1dc              _cexit();
005de1dc              /* no return */
005de196          }
005de196          
005de18a      label_5de18a:
005de18a          esi = &esi[1];
005de18b          char* var_38_2 = esi;
005de18e      }
005de03a  }

005de1e2        eb 2d 8b 45 ec 8b 08 8b 09 89 4d 80 50 51 e8 ff 03 00 00 59 59 c3 8b 65 e8 8b 75 80 83 7d    .-.E......M.PQ.....YY..e..u..}
005de200  e4 00 75 07 56 ff 15 9c 22 79 00 ff 15 5c 23 79 00 83 4d fc ff 8b c6 e8 c3 04 00 00 c3 cc cc cc  ..u.V..."y...\#y..M.............

005de220  void __convention("regparm") _chkstk()

005de220  {
005de225      int32_t i;
005de225      
005de225      if (i < 0x1000)
005de225      {
005de22e          *(uint32_t*)((-(i) + &__return_addr) + 4);
005de233          *(uint32_t*)(-(i) + &__return_addr) = __return_addr;
005de234          return;
005de225      }
005de225      
005de236      void* ecx = &arg_4;
005de236      
005de24c      do
005de24c      {
005de23a          ecx -= 0x1000;
005de240          i -= 0x1000;
005de245          *(uint32_t*)ecx;
005de24c      } while (i >= 0x1000);
005de24c      
005de24e      void* ecx_1 = ((char*)ecx - i);
005de252      *(uint32_t*)ecx_1;
005de25b      *(uint32_t*)((char*)ecx_1 - 4) = __return_addr;
005de220  }

005de25d                                                                                         cc                                     .

005de25e  int32_t j_qsort()

005de25e  {
005de25e      /* tailcall */
005de25e      return qsort();
005de25e  }

005de264              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

005de270  void __convention("regparm") _allshl() __pure

005de27f  {
005de27f      return;
005de27f  }

005de28f                                               cc                                                                 .

005de290  void __convention("regparm") _aullshr() __pure

005de29f  {
005de29f      return;
005de29f  }

005de2af                                               cc                                                                 .

005de2b0  void __stdcall _alldiv() __pure

005de2b0  {
005de2bb      if (arg_8 < 0)
005de2bb      {
005de2c9          arg_8 = (-(arg_8) - 0);
005de2cd          arg_4 = -(arg_4);
005de2bb      }
005de2bb      
005de2d5      uint32_t i_1 = i_2;
005de2d5      
005de2d7      if (i_1 < 0)
005de2d7      {
005de2e2          i_1 = (-(i_1) - 0);
005de2e5          i_2 = i_1;
005de2e9          arg_c = -(arg_c);
005de2d7      }
005de2d7      
005de2ef      if (i_1 != 0)
005de2ef      {
005de309          uint32_t i = i_1;
005de30b          int32_t ecx_1 = arg_c;
005de30f          uint32_t edx_8 = arg_8;
005de313          int32_t eax_11 = arg_4;
005de313          
005de321          do
005de321          {
005de319              ecx_1 = (RRCD(ecx_1, 1, (i & 1) != 0));
005de31b              uint32_t temp6_1 = edx_8;
005de31b              edx_8 u>>= 1;
005de31d              eax_11 = (RRCD(eax_11, 1, (temp6_1 & 1) != 0));
005de31f              i u>>= 1;
005de321          } while (i != 0);
005de2ef      }
005de2b0  }

005de35a                                                                                cc cc cc cc cc cc                            ......

005de360  void __stdcall _allmul() __pure

005de391  {
005de391      return;
005de391  }


005de394  void _ftol2()

005de394  {
005de3a3      long double x87_r0;
005de3a3      int64_t var_20 = ((int64_t)x87_r0);
005de3ab      float edx = ((float)x87_r0);
005de3ab      
005de3b5      if (var_20 == 0)
005de3f3          edx = *(uint32_t*)((char*)var_20)[4];
005de3f3      
005de3fd      if ((var_20 == 0 && (edx & 0x7fffffff) == 0))
005de3fd      {
005de3ff          float var_18_1 = ((float)((long double)var_20));
005de403          float var_18_2 = ((float)x87_r0);
005de3fd      }
005de3fd      else if (edx >= 0)
005de3e7          /* unimplemented  {sbb eax, 0x0} */;
005de394  }

005de409                             cc cc cc cc cc cc cc                                                           .......

005de410  void __stdcall _aullrem() __pure

005de410  {
005de417      if (i_1 != 0)
005de417      {
005de431          uint32_t i = i_1;
005de433          int32_t ebx_1 = arg_c;
005de437          uint32_t edx_4 = arg_8;
005de43b          int32_t eax_5 = arg_4;
005de43b          
005de449          do
005de449          {
005de441              ebx_1 = (RRCD(ebx_1, 1, (i & 1) != 0));
005de443              uint32_t temp4_1 = edx_4;
005de443              edx_4 u>>= 1;
005de445              eax_5 = (RRCD(eax_5, 1, (temp4_1 & 1) != 0));
005de447              i u>>= 1;
005de449          } while (i != 0);
005de417      }
005de410  }

005de485                 cc                                                                                     .

005de486  int32_t j__CIpow()

005de486  {
005de486      /* tailcall */
005de486      return _CIpow();
005de486  }


005de48c  int32_t j__CIfmod()

005de48c  {
005de48c      /* tailcall */
005de48c      return _CIfmod();
005de48c  }


005de492  int32_t j__CIasin()

005de492  {
005de492      /* tailcall */
005de492      return _CIasin();
005de492  }


005de498  int32_t j_floor()

005de498  {
005de498      /* tailcall */
005de498      return floor();
005de498  }


005de49e  int32_t j_malloc()

005de49e  {
005de49e      /* tailcall */
005de49e      return malloc();
005de49e  }


005de4a4  int32_t j__CIacos()

005de4a4  {
005de4a4      /* tailcall */
005de4a4      return _CIacos();
005de4a4  }


005de4aa  int32_t j___CxxFrameHandler()

005de4aa  {
005de4aa      /* tailcall */
005de4aa      return __CxxFrameHandler();
005de4aa  }


005de4b0  void __stdcall __ArrayUnwind(void* arg1, uint32_t arg2, int32_t arg3, void (* arg4)(void*))

005de4b0  {
005de4b0      int32_t __saved_ebp_1 = 0x14;
005de4b2      int32_t var_8 = 0x7e98f8;
005de6a4      int32_t (* var_10)() = j__except_handler3;
005de6af      TEB* fsbase;
005de6af      int32_t var_14 = *(uint32_t*)fsbase;
005de6c4      int32_t __saved_edi;
005de6c4      int32_t* var_1c = &__saved_edi;
005de6c7      void* const var_38 = &data_5de4bc;
005de6cb      int32_t var_8_3 = 0xffffffff;
005de6d2      int32_t var_c = 0x7e98f8;
005de6d8      *(uint32_t*)fsbase = &var_14;
005de4bc      int32_t var_8_1 = 0;
005de4bc      
005de4c0      while (true)
005de4c0      {
005de4c0          int32_t temp1_1 = arg3;
005de4c0          arg3 -= 1;
005de4c0          
005de4c3          if ((temp1_1 - 1) < 0)
005de4c3              break;
005de4c3          
005de4cb          arg1 -= arg2;
005de4ce          arg4();
005de4c0      }
005de4c0      
005de4d3      int32_t var_8_2 = 0xffffffff;
005de6e2      *(uint32_t*)fsbase = var_14;
005de6ee      void* const __saved_ebp = &data_5de4dc;
005de4b0  }

005de4df                                                                                               8b                                 .
005de4e0  45 ec 89 45 e4 8b 45 e4 8b 00 89 45 e0 8b 45 e0 81 38 63 73 6d e0 74 10 c7 45 dc 00 00 00 00 8b  E..E..E....E..E..8csm.t..E......
005de500  45 dc c3 8b 65 e8 eb cb e8 e3 01 00 00 cc                                                        E...e.........

005de50e  void __stdcall `eh vector destructor iterator'(void* arg1, uint32_t arg2, int32_t arg3, void (* arg4)(void*))

005de50e  {
005de50e      int32_t __saved_ebp_2 = 0xc;
005de510      int32_t var_8 = 0x7e9908;
005de6a4      int32_t (* var_10)() = j__except_handler3;
005de6af      TEB* fsbase;
005de6af      int32_t var_14 = *(uint32_t*)fsbase;
005de6c4      int32_t __saved_edi;
005de6c4      int32_t* var_1c = &__saved_edi;
005de6c7      void* const var_30 = &data_5de51a;
005de6cb      int32_t var_8_3 = 0xffffffff;
005de6d2      int32_t var_c = 0x7e9908;
005de6d8      *(uint32_t*)fsbase = &var_14;
005de51a      int32_t var_20 = 0;
005de527      arg1 += (arg2 * arg3);
005de52a      int32_t var_8_1 = 0;
005de52a      
005de52e      while (true)
005de52e      {
005de52e          int32_t temp1_1 = arg3;
005de52e          arg3 -= 1;
005de52e          
005de531          if ((temp1_1 - 1) < 0)
005de531              break;
005de531          
005de533          arg1 -= arg2;
005de539          arg4();
005de52e      }
005de52e      
005de53e      int32_t var_20_1 = 1;
005de545      int32_t var_8_2 = 0xffffffff;
005de549      int32_t __saved_ebp;
005de549      sub_5de556(&__saved_ebp);
005de6e2      *(uint32_t*)fsbase = var_14;
005de6ee      void* const __saved_ebp_1 = &data_5de553;
005de50e  }


005de556  void sub_5de556(void* arg1 @ ebp)

005de556  {
005de55a      if (*(uint32_t*)((char*)arg1 - 0x1c) == 0)
005de568          __ArrayUnwind(*(uint32_t*)((char*)arg1 + 8), *(uint32_t*)((char*)arg1 + 0xc), *(uint32_t*)((char*)arg1 + 0x10), *(uint32_t*)((char*)arg1 + 0x14));
005de556  }


005de56e  int32_t j__finite()

005de56e  {
005de56e      /* tailcall */
005de56e      return _finite();
005de56e  }

005de574                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

005de580  void __stdcall _aulldiv() __pure

005de580  {
005de588      if (i_1 != 0)
005de588      {
005de5a2          uint32_t i = i_1;
005de5a4          int32_t ebx_1 = arg_c;
005de5a8          uint32_t edx_3 = arg_8;
005de5ac          int32_t eax_6 = arg_4;
005de5ac          
005de5ba          do
005de5ba          {
005de5b2              ebx_1 = (RRCD(ebx_1, 1, (i & 1) != 0));
005de5b4              uint32_t temp4_1 = edx_3;
005de5b4              edx_3 u>>= 1;
005de5b6              eax_6 = (RRCD(eax_6, 1, (temp4_1 & 1) != 0));
005de5b8              i u>>= 1;
005de5ba          } while (i != 0);
005de588      }
005de580  }


005de5e8  int32_t j__callnewh()

005de5e8  {
005de5e8      /* tailcall */
005de5e8      return _callnewh();
005de5e8  }


005de5ee  int32_t j___dllonexit()

005de5ee  {
005de5ee      /* tailcall */
005de5ee      return __dllonexit();
005de5ee  }


005de5f4  int32_t j__XcptFilter()

005de5f4  {
005de5f4      /* tailcall */
005de5f4      return _XcptFilter();
005de5f4  }


005de5fa  int32_t j__amsg_exit()

005de5fa  {
005de5fa      /* tailcall */
005de5fa      return _amsg_exit();
005de5fa  }


005de600  void _RTC_Initialize()

005de600  {
005de600      int32_t __saved_ebp_1 = 0xc;
005de602      int32_t var_8 = 0x7e9918;
005de6a4      int32_t (* var_10)() = j__except_handler3;
005de6af      TEB* fsbase;
005de6af      int32_t var_14 = *(uint32_t*)fsbase;
005de6c4      int32_t __saved_edi;
005de6c4      int32_t* var_1c = &__saved_edi;
005de6c7      void* const var_30 = &data_5de60c;
005de6cb      int32_t var_8_3 = 0xffffffff;
005de6d2      int32_t var_c = 0x7e9918;
005de6d8      *(uint32_t*)fsbase = &var_14;
005de6d8      
005de61a      for (int32_t* i = &__rtc_izz; i < 0x807394; i = &i[1])
005de61a      {
005de61c          int32_t var_8_1 = 0;
005de623          int32_t eax_1 = *(uint32_t*)i;
005de623          
005de627          if (eax_1 != 0)
005de629              eax_1();
005de629          
005de634          int32_t var_8_2 = 0xffffffff;
005de61a      }
005de61a      
005de6e2      *(uint32_t*)fsbase = var_14;
005de6ee      void* const __saved_ebp = &data_5de643;
005de600  }

005de62d                                         33 c0 40 c3 8b 65 e8                                                   3.@..e.

005de644  void _RTC_Terminate()

005de644  {
005de644      int32_t __saved_ebp_1 = 0xc;
005de646      int32_t var_8 = 0x7e9928;
005de6a4      int32_t (* var_10)() = j__except_handler3;
005de6af      TEB* fsbase;
005de6af      int32_t var_14 = *(uint32_t*)fsbase;
005de6c4      int32_t __saved_edi;
005de6c4      int32_t* var_1c = &__saved_edi;
005de6c7      void* const var_30 = &data_5de650;
005de6cb      int32_t var_8_3 = 0xffffffff;
005de6d2      int32_t var_c = 0x7e9928;
005de6d8      *(uint32_t*)fsbase = &var_14;
005de6d8      
005de65e      for (int32_t* i = &__rtc_tzz; i < 0x80739c; i = &i[1])
005de65e      {
005de660          int32_t var_8_1 = 0;
005de667          int32_t eax_1 = *(uint32_t*)i;
005de667          
005de66b          if (eax_1 != 0)
005de66d              eax_1();
005de66d          
005de678          int32_t var_8_2 = 0xffffffff;
005de65e      }
005de65e      
005de6e2      *(uint32_t*)fsbase = var_14;
005de6ee      void* const __saved_ebp = &data_5de687;
005de644  }

005de671                                                     33 c0 40 c3 8b 65 e8                                           3.@..e.

005de688  int32_t j__initterm()

005de688  {
005de688      /* tailcall */
005de688      return _initterm();
005de688  }


005de68e  void _setdefaultprecision()

005de68e  {
005de698      j__controlfp(0x10000, 0x30000);
005de68e  }


005de6a0  int32_t _setargv() __pure

005de6a0  {
005de6a2      return 0;
005de6a0  }

005de6a3           cc                                                                                         .

005de6a4  void __SEH_prolog()

005de6a4  {
005de6a4      int32_t (* var_4)() = j__except_handler3;
005de6af      TEB* fsbase;
005de6af      int32_t var_8 = *(uint32_t*)fsbase;
005de6b0      int32_t eax_1 = arg_8;
005de6b4      int32_t ebp;
005de6b4      arg_8 = ebp;
005de6bc      void* esp = (&var_8 - eax_1);
005de6be      int32_t ebx;
005de6be      *(uint32_t*)((char*)esp - 4) = ebx;
005de6bf      int32_t esi;
005de6bf      *(uint32_t*)((char*)esp - 8) = esi;
005de6c0      int32_t edi;
005de6c0      *(uint32_t*)((char*)esp - 0xc) = edi;
005de6c4      void* var_10 = ((char*)esp - 0xc);
005de6c7      *(uint32_t*)((char*)esp - 0x10) = __return_addr;
005de6c8      void* __return_addr_1 = __return_addr_2;
005de6cb      __return_addr_2 = 0xffffffff;
005de6d2      __return_addr = __return_addr_1;
005de6d8      *(uint32_t*)fsbase = &var_8;
005de6a4  }


005de6df  void __SEH_epilog()

005de6df  {
005de6e2      void* ebp;
005de6e2      TEB* fsbase;
005de6e2      *(uint32_t*)fsbase = *(uint32_t*)((char*)ebp - 0x10);
005de6ed      *(uint32_t*)ebp;
005de6ee      *(uint32_t*)ebp = __return_addr;
005de6df  }


005de6f0  void terminate()

005de6f0  {
005de6f0      /* tailcall */
005de6f0      return terminate();
005de6f0  }


005de6f6  int32_t j__controlfp()

005de6f6  {
005de6f6      /* tailcall */
005de6f6      return _controlfp();
005de6f6  }


005de6fc  int32_t j__except_handler3()

005de6fc  {
005de6fc      /* tailcall */
005de6fc      return _except_handler3();
005de6fc  }

005de702        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

005de710  void _com_raise_error(int32_t arg1, struct IErrorInfo* arg2) __noreturn

005de710  {
005de725      int32_t pExceptionObject = 0x7e9938;
005de72d      int32_t var_c = arg1;
005de731      struct IErrorInfo* var_8 = arg2;
005de735      int32_t var_4 = 0;
005de73d      j__CxxThrowException(&pExceptionObject, &data_807488);
005de73d      /* no return */
005de710  }

005de742        cc 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005de750  void __thiscall _com_error::_com_error(class _com_error* this, class _com_error const* arg2)

005de750  {
005de757      this->vtable = 0x7e9938;
005de760      this->m_hresult = arg2->m_hresult;
005de763      struct IErrorInfo* m_perrinfo = arg2->m_perrinfo;
005de76a      this->m_perrinfo = m_perrinfo;
005de76d      this->m_pszMsg = nullptr;
005de76d      
005de774      if (m_perrinfo != 0)
005de776          m_perrinfo->vtable->AddRef(m_perrinfo);
005de750  }

005de782        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

005de790  void __fastcall _com_error::~_com_error(class _com_error* this)

005de790  {
005de793      struct IErrorInfo* m_perrinfo = this->m_perrinfo;
005de798      this->vtable = 0x7e9938;
005de798      
005de79e      if (m_perrinfo != 0)
005de7a0          m_perrinfo->vtable->Release(m_perrinfo);
005de7a0      
005de7a6      char* m_pszMsg = this->m_pszMsg;
005de7a6      
005de7ab      if (m_pszMsg != 0)
005de7ae          LocalFree(m_pszMsg);
005de790  }

005de7b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

005de7c0  void* __thiscall _com_error::`scalar deleting destructor'(class _com_error* this, uint32_t arg2)

005de7c0  {
005de7c3      struct IErrorInfo* m_perrinfo = this->m_perrinfo;
005de7c8      this->vtable = 0x7e9938;
005de7c8      
005de7ce      if (m_perrinfo != 0)
005de7d0          m_perrinfo->vtable->Release(m_perrinfo);
005de7d0      
005de7d6      char* m_pszMsg = this->m_pszMsg;
005de7d6      
005de7db      if (m_pszMsg != 0)
005de7de          LocalFree(m_pszMsg);
005de7de      
005de7e9      if ((arg2 & 1) != 0)
005de7ec          operator delete(this);
005de7ec      
005de7f7      return this;
005de7c0  }

005de7fa                                                                                90 90 90 90 90 90                            ......

005de800  void kernel32_WideCharToMultiByte_Thunk()

005de800  {
005de81a      ResolveThunk("kernel32.dll", "WideCharToMultiByte", &kernel32_WideCharToMultiByte_Ptr, Unicows_WideCharToMultiByte, GodotFailWideCharToMultiByte);
005de81f      /* jump -> kernel32_WideCharToMultiByte_Ptr */
005de800  }


005de825  void kernel32_CreateDirectoryW_Thunk()

005de825  {
005de83f      ResolveThunk("kernel32.dll", "CreateDirectoryW", &kernel32_CreateDirectoryW_Ptr, Unicows_CreateDirectoryW, GodotFailCreateDirectoryW);
005de844      /* jump -> kernel32_CreateDirectoryW_Ptr */
005de825  }


005de84a  void kernel32_GetEnvironmentVariableW_Thunk()

005de84a  {
005de864      ResolveThunk("kernel32.dll", "GetEnvironmentVariableW", &kernel32_GetEnvironmentVariableW_Ptr, Unicows_GetEnvironmentVariableW, GodotFailGetEnvironmentVariableW);
005de869      /* jump -> kernel32_GetEnvironmentVariableW_Ptr */
005de84a  }


005de86f  void kernel32_GetCurrentDirectoryW_Thunk()

005de86f  {
005de889      ResolveThunk("kernel32.dll", "GetCurrentDirectoryW", &kernel32_GetCurrentDirectoryW_Ptr, Unicows_GetCurrentDirectoryW, GodotFailCreateDirectoryW);
005de88e      /* jump -> kernel32_GetCurrentDirectoryW_Ptr */
005de86f  }


005de894  void advapi32_RegQueryValueExW_Thunk()

005de894  {
005de8ae      ResolveThunk("advapi32.dll", "RegQueryValueExW", &advapi32_RegQueryValueExW_Ptr, Unicows_RegQueryValueExW, GodotFailRegQueryValueExW);
005de8b3      /* jump -> advapi32_RegQueryValueExW_Ptr */
005de894  }


005de8b9  void advapi32_RegOpenKeyExW_Thunk()

005de8b9  {
005de8d3      ResolveThunk("advapi32.dll", "RegOpenKeyExW", &advapi32_RegOpenKeyExW_Ptr, Unicows_RegOpenKeyExW, GodotFailRegOpenKeyExW);
005de8d8      /* jump -> advapi32_RegOpenKeyExW_Ptr */
005de8b9  }


005de8de  void kernel32_GetProcAddress_Thunk()

005de8de  {
005de8f8      ResolveThunk("kernel32.dll", "GetProcAddress", &kernel32_GetProcAddress_Ptr, Unicows_GetProcAddress, GodotFailGetProcAddress);
005de8fd      /* jump -> kernel32_GetProcAddress_Ptr */
005de8de  }


005de903  void version_VerQueryValueW_Thunk()

005de903  {
005de91d      ResolveThunk("version.dll", "VerQueryValueW", &version_VerQueryValueW_Ptr, Unicows_VerQueryValueW, GodotFailVerQueryValueW);
005de922      /* jump -> version_VerQueryValueW_Ptr */
005de903  }


005de928  void user32_SetWindowLongA_Thunk()

005de928  {
005de942      ResolveThunk("user32.dll", "SetWindowLongA", &user32_SetWindowLongA_Ptr, Unicows_SetWindowLongA, GodotFailSetWindowLongA);
005de947      /* jump -> user32_SetWindowLongA_Ptr */
005de928  }


005de94d  void user32_GetClipboardData_Thunk()

005de94d  {
005de967      ResolveThunk("user32.dll", "GetClipboardData", &user32_GetClipboardData_Ptr, Unicows_GetClipboardData, GodotFailGetClipboardData);
005de96c      /* jump -> user32_GetClipboardData_Ptr */
005de94d  }


005de972  void user32_IsClipboardFormatAvailable_Thunk()

005de972  {
005de98c      ResolveThunk("user32.dll", "IsClipboardFormatAvailable", &user32_IsClipboardFormatAvailable_Ptr, Unicows_IsClipboardFormatAvailable, GodotFailIsClipboardFormatAvailable);
005de991      /* jump -> user32_IsClipboardFormatAvailable_Ptr */
005de972  }


005de997  void user32_MessageBoxW_Thunk()

005de997  {
005de9b1      ResolveThunk("user32.dll", "MessageBoxW", &user32_MessageBoxW_Ptr, Unicows_MessageBoxW, GodotFailMessageBoxW);
005de9b6      /* jump -> user32_MessageBoxW_Ptr */
005de997  }


005de9bc  void kernel32_lstrlenW_Thunk()

005de9bc  {
005de9d6      ResolveThunk("kernel32.dll", "lstrlenW", &kernel32_lstrlenW_Ptr, Unicows_lstrlenW, GodotFaillstrlenW);
005de9db      /* jump -> kernel32_lstrlenW_Ptr */
005de9bc  }

005de9e1     cc                                                                                             .

005de9e2  BOOL __stdcall j_VerQueryValueA(void* pBlock, PSTR lpSubBlock, void** lplpBuffer, uint32_t* puLen)

005de9e2  {
005de9e2      /* tailcall */
005de9e2      return VerQueryValueA(pBlock, lpSubBlock, lplpBuffer, puLen);
005de9e2  }


005de9e8  BOOL __stdcall j_GetFileVersionInfoA(PSTR lptstrFilename, uint32_t dwHandle, uint32_t dwLen, void* lpData)

005de9e8  {
005de9e8      /* tailcall */
005de9e8      return GetFileVersionInfoA(lptstrFilename, dwHandle, dwLen, lpData);
005de9e8  }


005de9ee  uint32_t __stdcall j_GetFileVersionInfoSizeA(PSTR lptstrFilename, uint32_t* lpdwHandle)

005de9ee  {
005de9ee      /* tailcall */
005de9ee      return GetFileVersionInfoSizeA(lptstrFilename, lpdwHandle);
005de9ee  }


005de9f4  uint32_t __stdcall j_acmStreamUnprepareHeader(HACMSTREAM has, struct ACMSTREAMHEADER* pash, uint32_t fdwUnprepare)

005de9f4  {
005de9f4      /* tailcall */
005de9f4      return acmStreamUnprepareHeader(has, pash, fdwUnprepare);
005de9f4  }


005de9fa  uint32_t __stdcall j_acmStreamConvert(HACMSTREAM has, struct ACMSTREAMHEADER* pash, uint32_t fdwConvert)

005de9fa  {
005de9fa      /* tailcall */
005de9fa      return acmStreamConvert(has, pash, fdwConvert);
005de9fa  }


005dea00  uint32_t __stdcall j_acmStreamPrepareHeader(HACMSTREAM has, struct ACMSTREAMHEADER* pash, uint32_t fdwPrepare)

005dea00  {
005dea00      /* tailcall */
005dea00      return acmStreamPrepareHeader(has, pash, fdwPrepare);
005dea00  }


005dea06  uint32_t __stdcall j_acmStreamClose(HACMSTREAM has, uint32_t fdwClose)

005dea06  {
005dea06      /* tailcall */
005dea06      return acmStreamClose(has, fdwClose);
005dea06  }


005dea0c  uint32_t __stdcall j_acmStreamSize(HACMSTREAM has, uint32_t cbInput, uint32_t* pdwOutputBytes, uint32_t fdwSize)

005dea0c  {
005dea0c      /* tailcall */
005dea0c      return acmStreamSize(has, cbInput, pdwOutputBytes, fdwSize);
005dea0c  }


005dea12  uint32_t __stdcall j_acmStreamOpen(int32_t** phas, HACMDRIVER had, struct WAVEFORMATEX* pwfxSrc, struct WAVEFORMATEX* pwfxDst, struct WAVEFILTER* pwfltr, uint32_t* dwCallback, uint32_t* dwInstance, uint32_t fdwOpen)

005dea12  {
005dea12      /* tailcall */
005dea12      return acmStreamOpen(phas, had, pwfxSrc, pwfxDst, pwfltr, dwCallback, dwInstance, fdwOpen);
005dea12  }


005dea18  int32_t j_DirectSoundCreate()

005dea18  {
005dea18      /* tailcall */
005dea18      return Ordinal_DSOUND_1();
005dea18  }


005dea1e  void __stdcall _D3DXLoadSurfaceFromMemory@40(struct IDirect3DSurface9* arg1, struct tagPALETTEENTRY* arg2, struct tagRECT* arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, int32_t* arg8, unsigned long arg9, int32_t arg10)

005dea1e  {
005dea2d      D3DXTex::CBlt var_10;
005dea2d      D3DXTex::CBlt::CBlt(&var_10);
005dea35      void var_78;
005dea35      D3DXTex::CLockSurface::CLockSurface(&var_78);
005dea35      
005dea60      if ((arg1 != 0 && (arg4 != 0 && arg8 != 0)))
005dea60      {
005dea66          if (arg9 == 0xffffffff)
005dea68              arg9 = 0x80004;
005dea68          
005dea8b          struct D3DX_BLT var_cc;
005dea8b          
005dea8b          if (D3DXTex::CLockSurface::Lock(&var_78, &var_cc, arg1, arg2, arg3, 0, 0) >= 0)
005dea8b          {
005dea90              int32_t edi;
005dea90              int32_t var_d8_1 = edi;
005dea91              int32_t var_60_1 = arg5;
005dea97              int32_t var_5c_1 = arg6;
005dea9d              int32_t var_64 = arg4;
005deaa3              int32_t var_58 = 0;
005deaa9              int32_t var_54 = *(uint32_t*)arg8;
005deaa9              void var_50;
005deaa9              void* edi_1 = &var_50;
005deaa9              void* esi_3 = &arg8[1];
005deaaa              *(uint32_t*)edi_1 = *(uint32_t*)esi_3;
005deaaa              void* edi_2 = ((char*)edi_1 + 4);
005deaaa              void* esi_4 = ((char*)esi_3 + 4);
005deaab              *(uint32_t*)edi_2 = *(uint32_t*)esi_4;
005deaac              *(uint32_t*)((char*)edi_2 + 4) = *(uint32_t*)((char*)esi_4 + 4);
005deab3              int32_t var_44_1 = 0;
005deab6              int32_t var_40_1 = 1;
005deac3              void var_3c;
005deac3              __builtin_memcpy(&var_3c, &var_54, 0x18);
005deac5              int32_t var_84;
005deac5              int32_t var_1c_1 = var_84;
005deacb              int32_t var_18_1 = arg10;
005dead1              int32_t var_14_1 = arg7;
005deae2              long eax_1;
005deae2              int80_t st0_1;
005deae2              eax_1 = D3DXTex::CBlt::Blt(&var_10, &var_cc, &var_64, arg9);
005dea8b          }
005dea60      }
005dea60      
005deaf2      D3DXTex::CLockSurface::~CLockSurface(&var_78);
005deafa      D3DXTex::CBlt::~CBlt(&var_10);
005dea1e  }


005deb06  void __stdcall _D3DXLoadVolumeFromMemory@44(struct IDirect3DVolume9* arg1, struct tagPALETTEENTRY* arg2, struct _D3DBOX* arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, int32_t arg8, int32_t arg9, unsigned long arg10, int32_t arg11)

005deb06  {
005deb15      D3DXTex::CBlt var_14;
005deb15      D3DXTex::CBlt::CBlt(&var_14);
005deb1d      void var_8;
005deb1d      D3DXTex::CLockVolume::CLockVolume(&var_8);
005deb1d      
005deb3d      if ((arg1 != 0 && (arg4 != 0 && arg9 != 0)))
005deb3d      {
005deb43          if (arg10 == 0xffffffff)
005deb45              arg10 = 0x80004;
005deb45          
005deb6a          struct D3DX_BLT var_bc;
005deb6a          
005deb6a          if (D3DXTex::CLockVolume::Lock(&var_8, &var_bc, arg1, arg2, arg3, 0, 0) >= 0)
005deb6a          {
005deb73              int32_t edi;
005deb73              int32_t var_c4_1 = edi;
005deb74              int32_t var_64_1 = arg5;
005deb7a              int32_t var_60_1 = arg6;
005deb83              int32_t var_5c_1 = arg7;
005deb89              int32_t var_68 = arg4;
005deb94              void var_58;
005deb94              __builtin_memcpy(&var_58, arg9, 0x18);
005deba0              void var_40;
005deba0              __builtin_memcpy(&var_40, arg9, 0x18);
005deba2              int32_t var_74;
005deba2              int32_t var_20_1 = var_74;
005deba8              int32_t var_1c_1 = arg11;
005debae              int32_t var_18_1 = arg8;
005debbf              long eax_1;
005debbf              int80_t st0_1;
005debbf              eax_1 = D3DXTex::CBlt::Blt(&var_14, &var_bc, &var_68, arg10);
005deb6a          }
005deb3d      }
005deb3d      
005debce      D3DXTex::CLockVolume::~CLockVolume(&var_8);
005debd6      D3DXTex::CBlt::~CBlt(&var_14);
005deb06  }


005debe2  void __stdcall _D3DXLoadSurfaceFromSurface@32(struct tagPALETTEENTRY* arg1, struct tagRECT* arg2, struct tagPALETTEENTRY* arg3, int32_t* arg4, unsigned long arg5, int32_t arg6)

005debe2  {
005debf1      D3DXTex::CLockSurface var_78;
005debf1      D3DXTex::CLockSurface::CLockSurface(&var_78);
005debf6      int32_t* eax = arg_4;
005debf6      
005debfb      if (eax != 0)
005debfb      {
005dec08          int32_t* ebx_1 = arg_10;
005dec08          
005dec0d          if (ebx_1 != 0)
005dec0d          {
005dec1b              int32_t edi;
005dec1b              int32_t var_d8_1 = edi;
005dec21              void var_64;
005dec21              *(uint32_t*)(*(uint32_t*)eax + 0x30)(eax, &var_64);
005dec2b              void var_44;
005dec2b              *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1, &var_44);
005dec43              int32_t var_58;
005dec43              int32_t var_38;
005dec43              
005dec43              if ((((uint32_t)arg5) == 5 || arg6 != 0))
005dec43              {
005ded4f              label_5ded4f:
005ded4f                  unsigned long eax_11 = 1;
005ded4f                  
005ded53                  if (arg_4 == ebx_1)
005ded55                      eax_11 = 0x10001;
005ded55                  
005ded76                  int32_t var_cc;
005ded76                  
005ded76                  if (D3DXTex::CLockSurface::Lock(&var_78, &var_cc, ebx_1, arg3, arg4, 0, eax_11) >= 0)
005ded76                  {
005deda7                      int32_t var_c8;
005deda7                      int32_t var_c4;
005deda7                      void var_a4;
005deda7                      long eax_12;
005deda7                      int80_t st0_1;
005deda7                      st0_1 = _D3DXLoadSurfaceFromMemory@40(arg_4, arg1, arg2, var_cc, var_c8, var_c4, arg3, &var_a4, arg5, arg6);
005deda7                      
005dedb8                      if ((eax_12 >= 0 && (var_38 == 0 && var_58 != 0)))
005dedb8                      {
005dedc1                          *(uint32_t*)(*(uint32_t*)ebx_1 + 0xc)(ebx_1, &arg_4);
005dedc4                          struct IDirect3DSurface9* eax_14 = arg_4;
005dedc7                          eax_14->vtable->GetDevice(eax_14);
005dedcf                          struct IDirect3DSurface9* eax_16 = arg_4;
005dedd2                          eax_16->vtable->Release(eax_16);
005dedb8                      }
005ded76                  }
005dec43              }
005dec43              else
005dec43              {
005dec49                  struct tagPALETTEENTRY* esi_2 = arg1;
005dec4c                  struct tagPALETTEENTRY* edi_1 = arg3;
005dec4c                  
005dec51                  if (esi_2 != edi_1)
005dec51                  {
005dec5d                      if ((esi_2 == 0 || edi_1 == 0))
005dec55                          goto label_5ded4f;
005dec55                      
005dec63                      int32_t i = 0x100;
005dec68                      bool cond:1_1 = false;
005dec68                      
005dec6a                      while (i != 0)
005dec6a                      {
005dec6a                          int32_t temp1_1;
005dec6a                          temp1_1 = esi_2->peRed;
005dec6a                          *(uint8_t*)((char*)temp1_1)[1] = esi_2->peGreen;
005dec6a                          *(uint8_t*)((char*)temp1_1)[2] = esi_2->peBlue;
005dec6a                          *(uint8_t*)((char*)temp1_1)[3] = esi_2->peFlags;
005dec6a                          int32_t temp2_1;
005dec6a                          temp2_1 = edi_1->peRed;
005dec6a                          *(uint8_t*)((char*)temp2_1)[1] = edi_1->peGreen;
005dec6a                          *(uint8_t*)((char*)temp2_1)[2] = edi_1->peBlue;
005dec6a                          *(uint8_t*)((char*)temp2_1)[3] = edi_1->peFlags;
005dec6a                          cond:1_1 = temp1_1 != temp2_1;
005dec6a                          esi_2 = &esi_2[1];
005dec6a                          edi_1 = &edi_1[1];
005dec6a                          i -= 1;
005dec6a                          
005dec6a                          if (temp1_1 != temp2_1)
005dec6a                              break;
005dec6a                      }
005dec6a                      
005dec6c                      if (cond:1_1)
005dec6c                          goto label_5ded4f;
005dec51                  }
005dec51                  
005dec72                  int32_t* esi_3 = arg2;
005dec79                  int32_t var_14;
005dec79                  int32_t var_10;
005dec79                  int32_t var_8;
005dec79                  int32_t edx_1;
005dec79                  int32_t esi_8;
005dec79                  
005dec79                  if (esi_3 == 0)
005dec79                  {
005dec8a                      int32_t var_4c;
005dec8a                      edx_1 = var_4c;
005dec8d                      int32_t var_48;
005dec8d                      esi_8 = var_48;
005dec90                      var_14 = 0;
005dec93                      var_10 = 0;
005dec96                      int32_t var_c_1 = edx_1;
005dec99                      var_8 = esi_8;
005dec79                  }
005dec79                  else
005dec79                  {
005dec7e                      var_14 = *(uint32_t*)esi_3;
005dec7e                      int32_t* edi_2 = &var_10;
005dec7e                      void* esi_4 = &esi_3[1];
005dec7f                      *(uint32_t*)edi_2 = *(uint32_t*)esi_4;
005dec7f                      void* edi_3 = &edi_2[1];
005dec7f                      void* esi_5 = ((char*)esi_4 + 4);
005dec80                      *(uint32_t*)edi_3 = *(uint32_t*)esi_5;
005dec81                      *(uint32_t*)((char*)edi_3 + 4) = *(uint32_t*)((char*)esi_5 + 4);
005dec82                      int32_t var_c;
005dec82                      edx_1 = var_c;
005dec85                      esi_8 = var_8;
005dec79                  }
005dec79                  
005dec9f                  int32_t var_24;
005dec9f                  int32_t var_20;
005dec9f                  int32_t eax_4;
005dec9f                  int32_t ecx_2;
005dec9f                  int32_t var_18;
005dec9f                  
005dec9f                  if (arg4 == 0)
005dec9f                  {
005decb6                      int32_t var_28;
005decb6                      ecx_2 = var_28;
005decb9                      var_24 = 0;
005decbc                      var_20 = 0;
005decbf                      int32_t var_2c;
005decbf                      eax_4 = var_2c;
005decc2                      int32_t var_1c_1 = eax_4;
005decc5                      var_18 = ecx_2;
005dec9f                  }
005dec9f                  else
005dec9f                  {
005deca7                      var_24 = *(uint32_t*)arg4;
005deca7                      int32_t* edi_6 = &var_20;
005deca7                      void* esi_10 = &arg4[1];
005deca8                      *(uint32_t*)edi_6 = *(uint32_t*)esi_10;
005deca8                      void* edi_7 = &edi_6[1];
005deca8                      void* esi_11 = ((char*)esi_10 + 4);
005deca9                      *(uint32_t*)edi_7 = *(uint32_t*)esi_11;
005decaa                      *(uint32_t*)((char*)edi_7 + 4) = *(uint32_t*)((char*)esi_11 + 4);
005decab                      ecx_2 = var_18;
005decae                      int32_t var_1c;
005decae                      eax_4 = var_1c;
005decb1                      esi_8 = var_8;
005dec9f                  }
005dec9f                  
005decda                  if (((edx_1 - var_14) != (eax_4 - var_24) || (esi_8 - var_10) != (ecx_2 - var_20)))
005decd0                      goto label_5ded4f;
005decd0                  
005dece3                  *(uint32_t*)(*(uint32_t*)ebx_1 + 0xc)(ebx_1, &arg_10);
005dece8                  D3DXDebugMuteInt(1);
005decf2                  int32_t esi_15 = 0x80004005;
005decf2                  
005decf7                  if (var_58 == 0)
005decf7                  {
005decfc                      if (var_38 == 0)
005decfc                      {
005decfe                          int32_t* eax_7 = arg_10;
005ded34                          esi_15 = *(uint32_t*)(*(uint32_t*)eax_7 + 0x88)(eax_7, ebx_1, &var_24, arg_4, &var_14, 0);
005decfc                      }
005decfc                      else if (var_38 == 2)
005ded1d                      {
005ded1f                          int32_t* eax_9 = arg_10;
005ded34                          esi_15 = *(uint32_t*)(*(uint32_t*)eax_9 + 0x78)(eax_9, ebx_1, &var_24, arg_4, &var_14);
005ded1d                      }
005decf7                  }
005decf7                  
005ded37                  D3DXDebugMuteInt(0);
005ded3c                  int32_t* eax_10 = arg_10;
005ded42                  *(uint32_t*)(*(uint32_t*)eax_10 + 8)(eax_10);
005ded42                  
005ded47                  if (esi_15 < 0)
005ded47                      goto label_5ded4f;
005dec43              }
005dec0d          }
005debfb      }
005debfb      
005dedea      D3DXTex::CLockSurface::~CLockSurface(&var_78);
005debe2  }


005dedf6  void __stdcall _D3DXLoadVolumeFromVolume@32(struct IDirect3DVolume9* arg1, struct tagPALETTEENTRY* arg2, struct _D3DBOX* arg3, struct IDirect3DVolume9* arg4, struct tagPALETTEENTRY* arg5, struct _D3DBOX* arg6, unsigned long arg7, int32_t arg8)

005dedf6  {
005dee02      void var_8;
005dee02      D3DXTex::CLockVolume::CLockVolume(&var_8);
005dee02      
005dee1a      if ((arg1 != 0 && arg4 != 0))
005dee1a      {
005dee1e          unsigned long eax_1 = 1;
005dee1e          
005dee22          if (arg1 == arg4)
005dee24              eax_1 = 0x10001;
005dee24          
005dee40          int32_t var_5c;
005dee40          int32_t var_58;
005dee40          int32_t var_54;
005dee40          int32_t var_50;
005dee40          void var_34;
005dee40          long eax_2;
005dee40          int80_t st0_1;
005dee40          
005dee40          if (D3DXTex::CLockVolume::Lock(&var_8, &var_5c, arg4, arg5, arg6, 0, eax_1) >= 0)
005dee64              st0_1 = _D3DXLoadVolumeFromMemory@44(arg1, arg2, arg3, var_5c, var_58, var_54, var_50, arg5, &var_34, arg7, arg8);
005dee1a      }
005dee1a      
005dee72      D3DXTex::CLockVolume::~CLockVolume(&var_8);
005dedf6  }


005dee7e  unsigned long __stdcall _D3DXFilterTexture@16(int32_t* arg1, unsigned long arg2, int32_t arg3, unsigned long arg4)

005dee7e  {
005dee88      int32_t* esi = arg1;
005dee88      
005dee8f      if (esi != 0)
005dee8f      {
005dee94          int32_t eax_2 = *(uint32_t*)(*(uint32_t*)esi + 0x28)(esi);
005dee94          
005deea3          if (((eax_2 == 3 || eax_2 == 4) || eax_2 == 5))
005deea3          {
005deeb3              int32_t edi;
005deeb3              int32_t var_70_2 = edi;
005deeb3              
005deeba              if (arg4 == 0xffffffff)
005deeba              {
005deec2                  void var_64;
005deec2                  int32_t var_4c;
005deec2                  int32_t var_48;
005deec2                  
005deec2                  if (eax_2 == 3)
005deec2                  {
005def3e                      *(uint32_t*)(*(uint32_t*)esi + 0x44)(esi, 0, &var_64);
005def3e                      
005def53                      if (((var_4c & (var_4c - 1)) != 0 || (var_48 & (var_48 - 1)) != 0))
005def53                      {
005def55                          arg4 = 0;
005def58                      label_5def58:
005def58                          
005def5b                          if (arg4 == 0)
005def17                              arg4 = 0x80004;
005def5b                          else
005def5d                              arg4 = 5;
005def53                      }
005def53                      else
005def5d                          arg4 = 5;
005deec2                  }
005deec2                  else
005deec2                  {
005deec5                      int32_t eax_12;
005deec5                      
005deec5                      if (eax_2 == 4)
005deec5                      {
005deef6                          void var_44;
005deef6                          *(uint32_t*)(*(uint32_t*)esi + 0x44)(esi, 0, &var_44);
005def0b                          int32_t var_34;
005def0b                          int32_t var_30;
005def0b                          
005def0b                          if (((var_34 & (var_34 - 1)) != 0 || (var_30 & (var_30 - 1)) != 0))
005def17                              arg4 = 0x80004;
005def0b                          else
005def0b                          {
005def0d                              int32_t var_2c;
005def0d                              eax_12 = var_2c;
005def13                          label_5def13:
005def13                              
005def15                              if ((eax_12 & (eax_12 - 1)) == 0)
005def5d                                  arg4 = 5;
005def15                              else
005def17                                  arg4 = 0x80004;
005def0b                          }
005deec5                      }
005deec5                      else
005deec5                      {
005deec8                          if (eax_2 != 5)
005deec8                              goto label_5def58;
005deec8                          
005deed9                          *(uint32_t*)(*(uint32_t*)esi + 0x44)(esi, 0, &var_64);
005deed9                          
005deee4                          if ((var_4c & (var_4c - 1)) == 0)
005deee4                          {
005deee6                              eax_12 = var_48;
005deee9                              goto label_5def13;
005deee4                          }
005deee4                          
005def17                          arg4 = 0x80004;
005deec5                      }
005deec2                  }
005deeba              }
005deeba              
005def21              if (eax_2 == 5)
005def23                  *(uint8_t*)((char*)arg4)[2] |= 7;
005def23              
005def2b              if ((*(uint8_t*)((char*)arg4)[2] & 0x40) == 0)
005def62                  *(uint8_t*)((char*)arg4)[2] &= 0x9f;
005def2b              else
005def2d                  *(uint8_t*)((char*)arg4)[2] |= 0x60;
005def2d              
005def69              int32_t eax_20 = *(uint32_t*)(*(uint32_t*)esi + 0x34)(esi);
005def69              
005def73              if (arg3 == 0xffffffff)
005def75                  arg3 = 0;
005def75              
005def7b              unsigned long result;
005def7b              
005def7b              if (arg3 < eax_20)
005def7b              {
005def8c                  arg1 = nullptr;
005def8f                  int32_t eax_21;
005def8f                  eax_21 = eax_2 != 5;
005def92                  struct IDirect3DVolume9* var_c = nullptr;
005def95                  struct IDirect3DVolume9* var_8 = nullptr;
005def98                  struct IDirect3DVolume9* var_10 = nullptr;
005defa5                  uint32_t eax_26 = ((uint32_t)arg4);
005defad                  int32_t var_20_1;
005defad                  
005defad                  if (eax_26 != 2)
005defb1                      var_20_1 = 0;
005defb1                  
005defb4                  if ((eax_26 == 2 || eax_26 == 5))
005defb6                      var_20_1 = 1;
005defb6                  
005defc0                  int32_t var_18_1 = 0;
005defc3                  unsigned long result_1;
005defc3                  
005defc3                  if ((((eax_21 - 1) & 5) + 1) <= 0)
005defc3                  {
005df128                  label_5df128:
005df128                      result_1 = 0;
005defc3                  }
005defc3                  else
005defc3                  {
005defc9                      result_1 = arg4;
005defc9                      
005defd2                      while (true)
005defd2                      {
005defd2                          if (eax_2 == 3)
005df004                              result_1 = *(uint32_t*)(*(uint32_t*)esi + 0x48)(esi, arg3, &arg1);
005defd2                          else if (eax_2 == 4)
005df004                              result_1 = *(uint32_t*)(*(uint32_t*)esi + 0x48)(esi, arg3, &var_c);
005defd5                          else if (eax_2 == 5)
005df004                              result_1 = *(uint32_t*)(*(uint32_t*)esi + 0x48)(esi, var_18_1, arg3, &arg1);
005df004                          
005df008                          if (result_1 < 0)
005df008                              break;
005df008                          
005df00e                          int32_t edi_1 = arg3;
005df00e                          
005df0ef                          while (true)
005df0ef                          {
005df0ef                              edi_1 += 1;
005df0ef                              
005df0f3                              if (edi_1 >= eax_20)
005df0f3                              {
005df0f9                                  int32_t* eax_51 = arg1;
005df0f9                                  
005df0fe                                  if (eax_51 != 0)
005df0fe                                  {
005df103                                      *(uint32_t*)(*(uint32_t*)eax_51 + 8)(eax_51);
005df106                                      arg1 = nullptr;
005df0fe                                  }
005df0fe                                  
005df109                                  struct IDirect3DVolume9* eax_52 = var_c;
005df109                                  
005df10e                                  if (eax_52 != 0)
005df10e                                  {
005df110                                      eax_52->vtable->Release(eax_52);
005df116                                      var_c = nullptr;
005df10e                                  }
005df10e                                  
005df119                                  var_18_1 += 1;
005df119                                  
005df122                                  if (var_18_1 < (((eax_21 - 1) & 5) + 1))
005df122                                      break;
005df122                                  
005df122                                  goto label_5df128;
005df0f3                              }
005df0f3                              
005df01c                              if (eax_2 == 3)
005df04a                                  result_1 = *(uint32_t*)(*(uint32_t*)esi + 0x48)(esi, edi_1, &var_8);
005df01c                              else if (eax_2 == 4)
005df04a                                  result_1 = *(uint32_t*)(*(uint32_t*)esi + 0x48)(esi, edi_1, &var_10);
005df01f                              else if (eax_2 == 5)
005df04a                                  result_1 = *(uint32_t*)(*(uint32_t*)esi + 0x48)(esi, var_18_1, edi_1, &var_8);
005df04a                              
005df04e                              if (result_1 < 0)
005df04e                                  goto label_5df12a;
005df04e                              
005df05a                              unsigned long result_2;
005df05a                              
005df05a                              if (eax_2 == 3)
005df05a                              {
005df062                              label_5df062:
005df062                                  int32_t var_74_9 = 0;
005df063                                  unsigned long var_78_5 = arg4;
005df074                                  result_2 = _D3DXLoadSurfaceFromSurface@32(var_8, arg2, nullptr, arg1, arg2, 0);
005df074                                  int16_t top = (top - 1);
005df074                                  /* unimplemented  {call _D3DXLoadSurfaceFromSurface@32} */;
005df079                                  result_1 = result_2;
005df05a                              }
005df05a                              else if (eax_2 == 4)
005df05d                              {
005df0c8                                  result_2 = _D3DXLoadVolumeFromVolume@32(var_10, arg2, nullptr, var_c, arg2, nullptr, arg4, 0);
005df0c8                                  /* unimplemented  {call _D3DXLoadVolumeFromVolume@32} */;
005df079                                  result_1 = result_2;
005df05d                              }
005df05d                              else if (eax_2 == 5)
005df060                                  goto label_5df062;
005df060                              
005df07d                              if (result_1 < 0)
005df07d                                  goto label_5df12a;
005df07d                              
005df086                              if (var_20_1 == 0)
005df086                              {
005df0cf                                  struct IDirect3DVolume9* eax_49 = var_8;
005df0cf                                  
005df0d4                                  if (eax_49 != 0)
005df0d4                                  {
005df0d6                                      eax_49->vtable->Release(eax_49);
005df0dc                                      var_8 = nullptr;
005df0d4                                  }
005df0d4                                  
005df0df                                  struct IDirect3DVolume9* eax_50 = var_10;
005df0df                                  
005df0e4                                  if (eax_50 == 0)
005df0e4                                      continue;
005df0e4                                  else
005df0e6                                      eax_50->vtable->Release(eax_50);
005df086                              }
005df086                              else
005df086                              {
005df088                                  int32_t* eax_45 = arg1;
005df088                                  
005df08d                                  if (eax_45 != 0)
005df08d                                  {
005df092                                      *(uint32_t*)(*(uint32_t*)eax_45 + 8)(eax_45);
005df095                                      arg1 = nullptr;
005df08d                                  }
005df08d                                  
005df098                                  struct IDirect3DVolume9* eax_46 = var_c;
005df098                                  
005df09d                                  if (eax_46 != 0)
005df09f                                      eax_46->vtable->Release(eax_46);
005df09f                                  
005df0a8                                  arg1 = var_8;
005df0ab                                  struct IDirect3DVolume9* eax_48 = var_10;
005df0ae                                  var_8 = nullptr;
005df0b1                                  var_c = eax_48;
005df086                              }
005df086                              
005df0ec                              var_10 = nullptr;
005df0ef                          }
005defd2                      }
005defc3                  }
005defc3                  
005df12a              label_5df12a:
005df12a                  int32_t* eax_54 = arg1;
005df12a                  
005df12f                  if (eax_54 != 0)
005df12f                  {
005df134                      *(uint32_t*)(*(uint32_t*)eax_54 + 8)(eax_54);
005df137                      arg1 = nullptr;
005df12f                  }
005df12f                  
005df13a                  struct IDirect3DVolume9* eax_55 = var_c;
005df13a                  
005df13f                  if (eax_55 != 0)
005df13f                  {
005df141                      eax_55->vtable->Release(eax_55);
005df147                      var_c = nullptr;
005df13f                  }
005df13f                  
005df14a                  struct IDirect3DVolume9* eax_56 = var_8;
005df14a                  
005df14f                  if (eax_56 != 0)
005df14f                  {
005df151                      eax_56->vtable->Release(eax_56);
005df157                      var_8 = nullptr;
005df14f                  }
005df14f                  
005df15a                  struct IDirect3DVolume9* eax_57 = var_10;
005df15a                  
005df15f                  if (eax_57 != 0)
005df161                      eax_57->vtable->Release(eax_57);
005df161                  
005df167                  result = result_1;
005def7b              }
005def7b              else
005def7d                  result = 0x8876086c;
005def7d              
005df16d              return result;
005deea3          }
005dee8f      }
005dee8f      
005deea5      return 0x8876086c;
005dee7e  }


005df170  void __stdcall sub_5df170(float arg1, float arg2)

005df170  {
005df178      long double x87_r7_1 = (((long double)arg1) - ((long double)arg2));
005df17b      long double x87_r6 = ((long double)-1.1920929e-07f);
005df181      (x87_r6 - x87_r7_1);
005df183      int32_t eax;
005df183      eax = ((((x87_r6 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_1) ? 1 : 0) << 0xe) | 0x3800))));
005df185      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
005df185      
005df188      if (!(p))
005df188      {
005df18a          long double temp1_1 = ((long double)1.1920929e-07f);
005df18a          (x87_r7_1 - temp1_1);
005df190          eax = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005df192          /* unimplemented  {test ah, 0x41} */;
005df188      }
005df170  }


005df1a4  struct D3DXFLOAT16* __stdcall init_D3DXFloat32To16Array(struct D3DXFLOAT16* arg1, float const* arg2, uint32_t arg3)

005df1a4  {
005df1a9      int32_t var_8 = 1;
005df1ab      int32_t ecx;
005df1ab      _D3DXCpuOptimizations@4(ecx);
005df1b1      /* jump -> data_8242c0 */
005df1a4  }


005df1b7  int32_t _D3DXFloat32To16Array@12()

005df1b7  {
005df1b7      /* jump -> data_8242c0 */
005df1b7  }


005df1bd  struct D3DXFLOAT16* __stdcall c_D3DXFloat32To16Array(struct D3DXFLOAT16* arg1, float const* arg2, uint32_t arg3)

005df1bd  {
005df1c6      int32_t ebx = 0;
005df1c6      
005df1cb      if (arg3 > 0)
005df1cb      {
005df1d2          int32_t edi;
005df1d2          int32_t var_10_1 = edi;
005df1d2          
005df252          do
005df252          {
005df1d6              int32_t ecx_2 = arg2[ebx];
005df1de              int32_t ecx_3 = (ecx_2 & 0x7fffffff);
005df1e4              int16_t edx_3 = (((int16_t)(ecx_2 >> 0x10)) & 0x8000);
005df1f0              int16_t ecx_4;
005df1f0              
005df1f0              if (ecx_3 <= 0x47ffefff)
005df1f0              {
005df204                  int32_t ecx_10;
005df204                  
005df204                  if (ecx_3 >= 0x38800000)
005df23e                      ecx_10 = ((((ecx_3 >> 0xd) & 1) + ecx_3) - 0x37fff001);
005df204                  else
005df204                  {
005df21d                      uint32_t esi_4;
005df21d                      
005df21d                      if ((0x71 - (ecx_3 >> 0x17)) <= 0x1f)
005df225                          esi_4 = (((ecx_3 & " activation type (%s) with '%s' …") | "activation type (%s) with '%s' b…") >> (0x71 - (ecx_3 >> 0x17)));
005df21d                      else
005df21f                          esi_4 = 0;
005df21f                      
005df22f                      ecx_10 = ((((esi_4 >> 0xd) & 1) + esi_4) + 0xfff);
005df204                  }
005df204                  
005df248                  ecx_4 = (((int16_t)(ecx_10 >> 0xd)) | edx_3);
005df1f0              }
005df1f0              else
005df1f8                  ecx_4 = (edx_3 | 0x7fff);
005df1f8              
005df24a              arg1[ebx].value = ecx_4;
005df24e              ebx += 1;
005df252          } while (ebx < arg3);
005df1cb      }
005df1cb      
005df25c      return arg1;
005df1bd  }


005df25f  float* __stdcall init_D3DXFloat16To32Array(float* arg1, struct D3DXFLOAT16 const* arg2, uint32_t arg3)

005df25f  {
005df264      int32_t var_8 = 1;
005df266      int32_t ecx;
005df266      _D3DXCpuOptimizations@4(ecx);
005df26c      /* jump -> data_8242c4 */
005df25f  }


005df272  int32_t _D3DXFloat16To32Array@12()

005df272  {
005df272      /* jump -> data_8242c4 */
005df272  }


005df278  float* __stdcall c_D3DXFloat16To32Array(float* arg1, struct D3DXFLOAT16 const* arg2, uint32_t arg3)

005df278  {
005df27e      int32_t ebx = 0;
005df27e      
005df283      if (arg3 > 0)
005df283      {
005df28a          int32_t edi;
005df28a          int32_t var_10_1 = edi;
005df28a          
005df313          do
005df313          {
005df298              int32_t edx;
005df298              edx = arg2[ebx].value;
005df29c              uint32_t ecx_2 = ((uint32_t)edx);
005df29c              
005df2a5              if ((ecx_2 & 0xffff7c00) != 0)
005df307                  edx = (((((ecx_2 & 0xffff8000) << 3) | (ecx_2 & 0x3ff)) << 0xd) | ((((ecx_2 >> 0xa) & 0x1f) + 0x70) << 0x17));
005df2a5              else
005df2a5              {
005df2aa                  int32_t ecx_8;
005df2aa                  
005df2aa                  if ((0x3ff & edx) == 0)
005df2e2                      ecx_8 = ((ecx_2 & 0xffff8000) << 0x10);
005df2aa                  else
005df2aa                  {
005df2b0                      int32_t edi_1 = 0xfffffff2;
005df2b1                      int32_t edx_2 = (ecx_2 & 0x3ff);
005df2b1                      
005df2ba                      while ((0x400 & edx_2) == 0)
005df2ba                      {
005df2b5                          edi_1 -= 1;
005df2b6                          edx_2 <<= 1;
005df2ba                      }
005df2ba                      
005df2d6                      ecx_8 = ((((((ecx_2 & 0xffff8080) << 3) | edx_2) & 0xfffffbff) << 0xd) | ((edi_1 + 0x7f) << 0x17));
005df2aa                  }
005df2aa                  
005df2d8                  edx = ecx_8;
005df2a5              }
005df2a5              
005df30c              arg1[ebx] = edx;
005df30f              ebx += 1;
005df313          } while (ebx < arg3);
005df283      }
005df283      
005df31c      return arg1;
005df278  }


005df31f  struct D3DXVECTOR2* __stdcall init_D3DXVec2Normalize(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2)

005df31f  {
005df324      int32_t var_8 = 1;
005df326      int32_t ecx;
005df326      _D3DXCpuOptimizations@4(ecx);
005df32c      /* jump -> data_824294 */
005df31f  }


005df332  struct D3DXVECTOR2* __stdcall init_D3DXVec2Hermite(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6)

005df332  {
005df337      int32_t var_8 = 1;
005df341      int32_t ecx;
005df341      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005df35b      return data_824220(arg1, arg2, arg3, arg4, arg5, ((float)((long double)arg6)));
005df332  }


005df35e  struct D3DXVECTOR2* __stdcall c_D3DXVec2Hermite(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6)

005df35e  {
005df363      int32_t ecx;
005df363      int32_t var_8 = ecx;
005df364      int32_t var_c = ecx;
005df36b      long double x87_r7_1 = (((long double)arg6) * ((long double)arg6));
005df378      long double x87_r6_1 = (((long double)arg6) * x87_r7_1);
005df37d      int32_t edi;
005df37d      int32_t var_14 = edi;
005df383      long double x87_r5_1 = (x87_r6_1 + x87_r6_1);
005df387      long double x87_r4_1 = (x87_r7_1 * ((long double)3f));
005df397      float var_c_1 = ((float)((x87_r5_1 - x87_r4_1) + ((long double)1f)));
005df3a3      float var_8_1 = ((float)((x87_r6_1 - (x87_r7_1 + x87_r7_1)) + ((long double)arg6)));
005df3a8      arg6 = ((float)(x87_r4_1 - x87_r5_1));
005df3ad      long double x87_r7_2 = (x87_r5_1 - x87_r7_1);
005df3c8      arg1->x = ((float)((((((long double)var_c_1) * ((long double)arg2->x)) + (((long double)var_8_1) * ((long double)arg3->x))) + (((long double)arg6) * ((long double)arg4->x))) + (x87_r7_2 * ((long double)arg5->x))));
005df3e7      arg1->y = ((float)((((x87_r7_2 * ((long double)arg5->y)) + (((long double)arg6) * ((long double)arg4->y))) + (((long double)var_8_1) * ((long double)arg3->y))) + (((long double)var_c_1) * ((long double)arg2->y))));
005df3eb      return arg1;
005df35e  }


005df3ee  struct D3DXVECTOR2* __stdcall init_D3DXVec2CatmullRom(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6)

005df3ee  {
005df3f3      int32_t var_8 = 1;
005df3fd      int32_t ecx;
005df3fd      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005df417      return data_824298(arg1, arg2, arg3, arg4, arg5, ((float)((long double)arg6)));
005df3ee  }


005df41a  struct D3DXVECTOR2* __stdcall c_D3DXVec2CatmullRom(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6)

005df41a  {
005df41f      int32_t ecx;
005df41f      int32_t var_8 = ecx;
005df420      int32_t var_c = ecx;
005df427      long double x87_r7_1 = (((long double)arg6) * ((long double)arg6));
005df434      long double x87_r6_1 = (((long double)arg6) * x87_r7_1);
005df439      long double x87_r5 = ((long double)2f);
005df43f      int32_t edi;
005df43f      int32_t var_14 = edi;
005df44c      float var_c_1 = ((float)(((x87_r7_1 * x87_r5) - x87_r6_1) - ((long double)arg6)));
005df451      long double x87_r4_5 = (x87_r6_1 * ((long double)3f));
005df463      float var_8_1 = ((float)((x87_r4_5 - (x87_r7_1 * ((long double)5f))) + x87_r5));
005df473      arg6 = ((float)(((x87_r7_1 * ((long double)4f)) - x87_r4_5) + ((long double)arg6)));
005df47a      long double x87_r7_2 = (x87_r4_5 - x87_r7_1);
005df47c      long double x87_r6_3 = ((long double)0.5f);
005df49d      arg1->x = ((float)(((((((long double)var_c_1) * ((long double)arg2->x)) + (((long double)var_8_1) * ((long double)arg3->x))) + (((long double)arg6) * ((long double)arg4->x))) + (x87_r7_2 * ((long double)arg5->x))) * x87_r6_3));
005df4c0      arg1->y = ((float)(((((x87_r7_2 * ((long double)arg5->y)) + (((long double)arg6) * ((long double)arg4->y))) + (((long double)var_8_1) * ((long double)arg3->y))) + (((long double)var_c_1) * ((long double)arg2->y))) * x87_r6_3));
005df4c8      return arg1;
005df41a  }


005df4cb  struct D3DXVECTOR2* __stdcall init_D3DXVec2BaryCentric(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, float arg5, float arg6)

005df4cb  {
005df4d0      int32_t var_8 = 1;
005df4d2      int32_t ecx;
005df4d2      int32_t ecx_1 = _D3DXCpuOptimizations@4(ecx);
005df4da      int32_t var_8_1 = ecx_1;
005df4db      int32_t var_c = ecx_1;
005df4f9      return data_82429c(arg1, arg2, arg3, arg4, ((float)((long double)arg5)), ((float)((long double)arg6)));
005df4cb  }


005df4fc  struct D3DXVECTOR2* __stdcall c_D3DXVec2BaryCentric(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, float arg5, float arg6)

005df4fc  {
005df520      arg1->x = ((float)((((((long double)arg3->x) - ((long double)arg2->x)) * ((long double)arg5)) + ((((long double)arg4->x) - ((long double)arg2->x)) * ((long double)arg6))) + ((long double)arg2->x)));
005df53a      arg1->y = ((float)((((((long double)arg3->y) - ((long double)arg2->y)) * ((long double)arg5)) + ((((long double)arg4->y) - ((long double)arg2->y)) * ((long double)arg6))) + ((long double)arg2->y)));
005df53e      return arg1;
005df4fc  }


005df541  struct D3DXVECTOR4* __stdcall init_D3DXVec2Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

005df541  {
005df546      int32_t var_8 = 1;
005df548      int32_t ecx;
005df548      _D3DXCpuOptimizations@4(ecx);
005df54e      /* jump -> (*(uint32_t*)g_D3DXFastTable) */
005df541  }


005df554  int32_t _D3DXVec2Transform@12()

005df554  {
005df554      /* jump -> (*(uint32_t*)g_D3DXFastTable) */
005df554  }


005df55a  struct D3DXVECTOR4* __stdcall init_D3DXVec2TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005df55a  {
005df55f      int32_t var_8 = 1;
005df561      int32_t ecx;
005df561      _D3DXCpuOptimizations@4(ecx);
005df567      /* jump -> data_8242c8 */
005df55a  }


005df56d  struct D3DXVECTOR2* __stdcall init_D3DXVec2TransformCoord(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

005df56d  {
005df572      int32_t var_8 = 1;
005df574      int32_t ecx;
005df574      _D3DXCpuOptimizations@4(ecx);
005df57a      /* jump -> data_8241fc */
005df56d  }


005df580  int32_t _D3DXVec2TransformCoord@12()

005df580  {
005df580      /* jump -> data_8241fc */
005df580  }


005df586  struct D3DXVECTOR2* __stdcall init_D3DXVec2TransformCoordArray(struct D3DXVECTOR2* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005df586  {
005df58b      int32_t var_8 = 1;
005df58d      int32_t ecx;
005df58d      _D3DXCpuOptimizations@4(ecx);
005df593      /* jump -> data_8242cc */
005df586  }


005df599  struct D3DXVECTOR2* __stdcall init_D3DXVec2TransformNormal(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

005df599  {
005df59e      int32_t var_8 = 1;
005df5a0      int32_t ecx;
005df5a0      _D3DXCpuOptimizations@4(ecx);
005df5a6      /* jump -> data_8241ec */
005df599  }


005df5ac  int32_t _D3DXVec2TransformNormal@12()

005df5ac  {
005df5ac      /* jump -> data_8241ec */
005df5ac  }


005df5b2  struct D3DXVECTOR2* __stdcall init_D3DXVec2TransformNormalArray(struct D3DXVECTOR2* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005df5b2  {
005df5b7      int32_t var_8 = 1;
005df5b9      int32_t ecx;
005df5b9      _D3DXCpuOptimizations@4(ecx);
005df5bf      /* jump -> data_8242d0 */
005df5b2  }


005df5c5  struct D3DXVECTOR3* __stdcall init_D3DXVec3Normalize(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2)

005df5c5  {
005df5ca      int32_t var_8 = 1;
005df5cc      int32_t ecx;
005df5cc      _D3DXCpuOptimizations@4(ecx);
005df5d2      /* jump -> data_8241f4 */
005df5c5  }


005df5d8  int32_t _D3DXVec3Normalize@8()

005df5d8  {
005df5d8      /* jump -> data_8241f4 */
005df5d8  }


005df5de  struct D3DXVECTOR3* __stdcall init_D3DXVec3Hermite(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, float arg6)

005df5de  {
005df5e3      int32_t var_8 = 1;
005df5ed      int32_t ecx;
005df5ed      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005df607      return data_8242a0(arg1, arg2, arg3, arg4, arg5, ((float)((long double)arg6)));
005df5de  }


005df60a  struct D3DXVECTOR3* __stdcall c_D3DXVec3Hermite(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, float arg6)

005df60a  {
005df60f      int32_t ecx;
005df60f      int32_t var_8 = ecx;
005df610      int32_t var_c = ecx;
005df617      long double x87_r7_1 = (((long double)arg6) * ((long double)arg6));
005df624      long double x87_r6_1 = (((long double)arg6) * x87_r7_1);
005df629      int32_t edi;
005df629      int32_t var_14 = edi;
005df62f      long double x87_r5_1 = (x87_r6_1 + x87_r6_1);
005df633      long double x87_r4_1 = (x87_r7_1 * ((long double)3f));
005df643      float var_c_1 = ((float)((x87_r5_1 - x87_r4_1) + ((long double)1f)));
005df64f      float var_8_1 = ((float)((x87_r6_1 - (x87_r7_1 + x87_r7_1)) + ((long double)arg6)));
005df654      arg6 = ((float)(x87_r4_1 - x87_r5_1));
005df659      long double x87_r7_2 = (x87_r5_1 - x87_r7_1);
005df674      arg1->x = ((float)((((((long double)var_c_1) * ((long double)arg2->x)) + (((long double)var_8_1) * ((long double)arg3->x))) + (((long double)arg6) * ((long double)arg4->x))) + (x87_r7_2 * ((long double)arg5->x))));
005df693      arg1->y = ((float)((((x87_r7_2 * ((long double)arg5->y)) + (((long double)arg6) * ((long double)arg4->y))) + (((long double)var_8_1) * ((long double)arg3->y))) + (((long double)var_c_1) * ((long double)arg2->y))));
005df6b3      arg1->z = ((float)((((x87_r7_2 * ((long double)arg5->z)) + (((long double)arg6) * ((long double)arg4->z))) + (((long double)var_8_1) * ((long double)arg3->z))) + (((long double)var_c_1) * ((long double)arg2->z))));
005df6b7      return arg1;
005df60a  }


005df6ba  struct D3DXVECTOR3* __stdcall init_D3DXVec3CatmullRom(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, float arg6)

005df6ba  {
005df6bf      int32_t var_8 = 1;
005df6c9      int32_t ecx;
005df6c9      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005df6e3      return data_8242a4(arg1, arg2, arg3, arg4, arg5, ((float)((long double)arg6)));
005df6ba  }


005df6e6  struct D3DXVECTOR3* __stdcall c_D3DXVec3CatmullRom(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, float arg6)

005df6e6  {
005df6eb      int32_t ecx;
005df6eb      int32_t var_8 = ecx;
005df6ec      int32_t var_c = ecx;
005df6f3      long double x87_r7_1 = (((long double)arg6) * ((long double)arg6));
005df700      long double x87_r6_1 = (((long double)arg6) * x87_r7_1);
005df705      long double x87_r5 = ((long double)2f);
005df70b      int32_t edi;
005df70b      int32_t var_14 = edi;
005df718      float var_c_1 = ((float)(((x87_r7_1 * x87_r5) - x87_r6_1) - ((long double)arg6)));
005df71d      long double x87_r4_5 = (x87_r6_1 * ((long double)3f));
005df72f      float var_8_1 = ((float)((x87_r4_5 - (x87_r7_1 * ((long double)5f))) + x87_r5));
005df73f      arg6 = ((float)(((x87_r7_1 * ((long double)4f)) - x87_r4_5) + ((long double)arg6)));
005df746      long double x87_r7_2 = (x87_r4_5 - x87_r7_1);
005df748      long double x87_r6_3 = ((long double)0.5f);
005df769      arg1->x = ((float)(((((((long double)var_c_1) * ((long double)arg2->x)) + (((long double)var_8_1) * ((long double)arg3->x))) + (((long double)arg6) * ((long double)arg4->x))) + (x87_r7_2 * ((long double)arg5->x))) * x87_r6_3));
005df78a      arg1->y = ((float)(((((x87_r7_2 * ((long double)arg5->y)) + (((long double)arg6) * ((long double)arg4->y))) + (((long double)var_8_1) * ((long double)arg3->y))) + (((long double)var_c_1) * ((long double)arg2->y))) * x87_r6_3));
005df7ae      arg1->z = ((float)(((((x87_r7_2 * ((long double)arg5->z)) + (((long double)arg6) * ((long double)arg4->z))) + (((long double)var_8_1) * ((long double)arg3->z))) + (((long double)var_c_1) * ((long double)arg2->z))) * x87_r6_3));
005df7b6      return arg1;
005df6e6  }


005df7b9  struct D3DXVECTOR3* __stdcall init_D3DXVec3BaryCentric(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, float arg5, float arg6)

005df7b9  {
005df7be      int32_t var_8 = 1;
005df7c0      int32_t ecx;
005df7c0      int32_t ecx_1 = _D3DXCpuOptimizations@4(ecx);
005df7c8      int32_t var_8_1 = ecx_1;
005df7c9      int32_t var_c = ecx_1;
005df7e7      return data_8242a8(arg1, arg2, arg3, arg4, ((float)((long double)arg5)), ((float)((long double)arg6)));
005df7b9  }


005df7ea  struct D3DXVECTOR3* __stdcall c_D3DXVec3BaryCentric(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, float arg5, float arg6)

005df7ea  {
005df80e      arg1->x = ((float)((((((long double)arg3->x) - ((long double)arg2->x)) * ((long double)arg5)) + ((((long double)arg4->x) - ((long double)arg2->x)) * ((long double)arg6))) + ((long double)arg2->x)));
005df827      arg1->y = ((float)((((((long double)arg3->y) - ((long double)arg2->y)) * ((long double)arg5)) + ((((long double)arg4->y) - ((long double)arg2->y)) * ((long double)arg6))) + ((long double)arg2->y)));
005df842      arg1->z = ((float)((((((long double)arg3->z) - ((long double)arg2->z)) * ((long double)arg5)) + ((((long double)arg4->z) - ((long double)arg2->z)) * ((long double)arg6))) + ((long double)arg2->z)));
005df846      return arg1;
005df7ea  }


005df849  struct D3DXVECTOR4* __stdcall init_D3DXVec3Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

005df849  {
005df84e      int32_t var_8 = 1;
005df850      int32_t ecx;
005df850      _D3DXCpuOptimizations@4(ecx);
005df856      /* jump -> data_8241dc */
005df849  }


005df85c  int32_t _D3DXVec3Transform@12()

005df85c  {
005df85c      /* jump -> data_8241dc */
005df85c  }


005df862  struct D3DXVECTOR4* __stdcall init_D3DXVec3TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005df862  {
005df867      int32_t var_8 = 1;
005df869      int32_t ecx;
005df869      _D3DXCpuOptimizations@4(ecx);
005df86f      /* jump -> data_8242d4 */
005df862  }


005df875  struct D3DXVECTOR3* __stdcall init_D3DXVec3TransformCoord(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

005df875  {
005df87a      int32_t var_8 = 1;
005df87c      int32_t ecx;
005df87c      _D3DXCpuOptimizations@4(ecx);
005df882      /* jump -> data_824200 */
005df875  }


005df888  int32_t _D3DXVec3TransformCoord@12()

005df888  {
005df888      /* jump -> data_824200 */
005df888  }


005df88e  struct D3DXVECTOR3* __stdcall init_D3DXVec3TransformCoordArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005df88e  {
005df893      int32_t var_8 = 1;
005df895      int32_t ecx;
005df895      _D3DXCpuOptimizations@4(ecx);
005df89b      /* jump -> data_8242d8 */
005df88e  }


005df8a1  int32_t _D3DXVec3TransformCoordArray@24()

005df8a1  {
005df8a1      /* jump -> data_8242d8 */
005df8a1  }


005df8a7  struct D3DXVECTOR3* __stdcall init_D3DXVec3TransformNormal(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

005df8a7  {
005df8ac      int32_t var_8 = 1;
005df8ae      int32_t ecx;
005df8ae      _D3DXCpuOptimizations@4(ecx);
005df8b4      /* jump -> data_8241f0 */
005df8a7  }


005df8ba  int32_t _D3DXVec3TransformNormal@12()

005df8ba  {
005df8ba      /* jump -> data_8241f0 */
005df8ba  }


005df8c0  struct D3DXVECTOR3* __stdcall c_D3DXVec3TransformNormal(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

005df8c0  {
005df8d8      int32_t edi;
005df8d8      int32_t var_18 = edi;
005df8e7      float var_10 = ((float)(((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)) * ((long double)arg2->z)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)arg2->y))) + (((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))));
005df8ff      float var_c = ((float)(((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)) * ((long double)arg2->z)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)arg2->x))));
005df918      float* edi_1 = arg1;
005df91c      float var_8 = ((float)(((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)) * ((long double)arg2->z)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)arg2->x))));
005df91f      *(uint32_t*)edi_1 = var_10;
005df91f      void* edi_2 = &edi_1[1];
005df91f      float* esi = &var_c;
005df920      *(uint32_t*)edi_2 = *(uint32_t*)esi;
005df921      *(uint32_t*)((char*)edi_2 + 4) = esi[1];
005df925      return arg1;
005df8c0  }


005df928  struct D3DXVECTOR3* __stdcall init_D3DXVec3TransformNormalArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005df928  {
005df92d      int32_t var_8 = 1;
005df92f      int32_t ecx;
005df92f      _D3DXCpuOptimizations@4(ecx);
005df935      /* jump -> data_8242dc */
005df928  }


005df93b  struct D3DXVECTOR3* __stdcall c_D3DXVec3TransformNormalArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005df93b  {
005df943      uint32_t i_1 = arg6;
005df949      struct D3DXVECTOR3* ebx = arg1;
005df94c      arg1 = ebx;
005df94c      
005df94f      if (i_1 > 0)
005df94f      {
005df954          struct D3DXVECTOR3* ecx_1 = arg3;
005df958          int32_t edi;
005df958          int32_t var_1c_1 = edi;
005df9af          uint32_t i;
005df9af          
005df9af          do
005df9af          {
005df95c              struct D3DXVECTOR3* edi_1 = ebx;
005df961              ebx += arg2;
005df975              float var_10_1 = ((float)(((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x10)) * ((long double)ecx_1->y)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x20)) * ((long double)ecx_1->z))) + (((long double)ecx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0)))));
005df98d              float var_c = ((float)(((((long double)*(uint32_t*)((char*)arg5->__inner0 + 4)) * ((long double)ecx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x14)) * ((long double)ecx_1->y))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x24)) * ((long double)ecx_1->z))));
005df99b              long double x87_r7_11 = ((((long double)ecx_1->z) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x28))) + (((long double)ecx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 8))));
005df99d              long double x87_r6_11 = ((long double)ecx_1->y);
005df9a0              ecx_1 += arg4;
005df9a3              i = i_1;
005df9a3              i_1 -= 1;
005df9a9              float var_8_1 = ((float)(x87_r7_11 + (x87_r6_11 * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x18)))));
005df9ac              edi_1->x = var_10_1;
005df9ac              float* edi_2 = &edi_1->y;
005df9ac              float* esi_1 = &var_c;
005df9b1              ADJ(edi_2)->y = *(uint32_t*)esi_1;
005df9ad              edi_2[1] = esi_1[1];
005df9af          } while (i != 1);
005df94f      }
005df94f      
005df9b8      return arg1;
005df93b  }


005df9bb  struct D3DXVECTOR3* __stdcall init_D3DXVec3Project(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct _D3DVIEWPORT9 const* arg3, struct D3DXMATRIX const* arg4, struct D3DXMATRIX const* arg5, struct D3DXMATRIX const* arg6)

005df9bb  {
005df9c0      int32_t var_8 = 1;
005df9c2      int32_t ecx;
005df9c2      _D3DXCpuOptimizations@4(ecx);
005df9c8      /* jump -> data_824214 */
005df9bb  }


005df9ce  struct D3DXVECTOR3* __stdcall init_D3DXVec3ProjectArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct _D3DVIEWPORT9 const* arg5, struct D3DXMATRIX const* arg6, struct D3DXMATRIX const* arg7, struct D3DXMATRIX const* arg8, uint32_t arg9)

005df9ce  {
005df9d3      int32_t var_8 = 1;
005df9d5      int32_t ecx;
005df9d5      _D3DXCpuOptimizations@4(ecx);
005df9db      /* jump -> data_8242e4 */
005df9ce  }


005df9e1  struct D3DXVECTOR3* __stdcall init_D3DXVec3Unproject(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct _D3DVIEWPORT9 const* arg3, struct D3DXMATRIX const* arg4, struct D3DXMATRIX const* arg5, struct D3DXMATRIX const* arg6)

005df9e1  {
005df9e6      int32_t var_8 = 1;
005df9e8      int32_t ecx;
005df9e8      _D3DXCpuOptimizations@4(ecx);
005df9ee      /* jump -> data_824218 */
005df9e1  }


005df9f4  struct D3DXVECTOR3* __stdcall init_D3DXVec3UnprojectArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct _D3DVIEWPORT9 const* arg5, struct D3DXMATRIX const* arg6, struct D3DXMATRIX const* arg7, struct D3DXMATRIX const* arg8, uint32_t arg9)

005df9f4  {
005df9f9      int32_t var_8 = 1;
005df9fb      int32_t ecx;
005df9fb      _D3DXCpuOptimizations@4(ecx);
005dfa01      /* jump -> data_8242e8 */
005df9f4  }


005dfa07  struct D3DXVECTOR4* __stdcall init_D3DXVec4Cross(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4)

005dfa07  {
005dfa0c      int32_t var_8 = 1;
005dfa0e      int32_t ecx;
005dfa0e      _D3DXCpuOptimizations@4(ecx);
005dfa14      /* jump -> data_82421c */
005dfa07  }


005dfa1a  struct D3DXVECTOR4* __stdcall c_D3DXVec4Cross(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4)

005dfa1a  {
005dfa22      struct D3DXVECTOR4* ecx = arg4;
005dfa25      struct D3DXVECTOR4* eax = arg3;
005dfa2b      long double x87_r7_1 = (((long double)ecx->w) * ((long double)eax->z));
005dfa2e      struct D3DXVECTOR4* edx = arg2;
005dfa35      long double x87_r6_1 = (((long double)eax->w) * ((long double)ecx->z));
005dfa38      int32_t edi;
005dfa38      int32_t var_28 = edi;
005dfa47      arg3 = ((float)((((long double)ecx->w) * ((long double)eax->y)) - (((long double)eax->w) * ((long double)ecx->y))));
005dfa50      float var_c = ((float)(((long double)eax->y) * ((long double)ecx->z)));
005dfa59      float var_8 = ((float)(((long double)eax->z) * ((long double)ecx->y)));
005dfa76      float var_20 = ((float)((((x87_r7_1 - x87_r6_1) * ((long double)edx->y)) - (((long double)arg3) * ((long double)edx->z))) + ((((long double)var_c) - ((long double)var_8)) * ((long double)edx->w))));
005dfa7e      arg2 = ((float)(((long double)eax->w) * ((long double)ecx->x)));
005dfa86      arg4 = ((float)(((long double)ecx->w) * ((long double)eax->x)));
005dfa95      float var_10 = ((float)((((long double)ecx->x) * ((long double)eax->z)) - (((long double)eax->x) * ((long double)ecx->z))));
005dfaaf      float var_1c = ((float)((((x87_r6_1 - x87_r7_1) * ((long double)edx->x)) - ((((long double)arg2) - ((long double)arg4)) * ((long double)edx->z))) + (((long double)var_10) * ((long double)edx->w))));
005dfab6      long double x87_r7_3 = (((long double)eax->x) * ((long double)ecx->y));
005dfabb      long double x87_r6_7 = (((long double)ecx->x) * ((long double)eax->y));
005dfad7      float var_18 = ((float)(((((long double)arg3) * ((long double)edx->x)) - ((((long double)arg4) - ((long double)arg2)) * ((long double)edx->y))) + ((x87_r7_3 - x87_r6_7) * ((long double)edx->w))));
005dfaee      float* edi_1 = arg1;
005dfafb      float var_14 = ((float)((((((long double)var_8) - ((long double)var_c)) * ((long double)edx->x)) - (((long double)var_10) * ((long double)edx->y))) + ((x87_r6_7 - x87_r7_3) * ((long double)edx->z))));
005dfafe      *(uint32_t*)edi_1 = var_20;
005dfafe      void* edi_2 = &edi_1[1];
005dfafe      float* esi = &var_1c;
005dfaff      *(uint32_t*)edi_2 = *(uint32_t*)esi;
005dfaff      void* edi_3 = ((char*)edi_2 + 4);
005dfaff      void* esi_1 = &esi[1];
005dfb04      *(uint32_t*)edi_3 = *(uint32_t*)esi_1;
005dfb05      *(uint32_t*)((char*)edi_3 + 4) = *(uint32_t*)((char*)esi_1 + 4);
005dfb09      return arg1;
005dfa1a  }


005dfb0c  struct D3DXVECTOR4* __stdcall init_D3DXVec4Normalize(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2)

005dfb0c  {
005dfb11      int32_t var_8 = 1;
005dfb13      int32_t ecx;
005dfb13      _D3DXCpuOptimizations@4(ecx);
005dfb19      /* jump -> data_8241f8 */
005dfb0c  }


005dfb1f  struct D3DXVECTOR4* __stdcall init_D3DXVec4Hermite(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, struct D3DXVECTOR4 const* arg5, float arg6)

005dfb1f  {
005dfb24      int32_t var_8 = 1;
005dfb2e      int32_t ecx;
005dfb2e      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005dfb48      return data_8242ac(arg1, arg2, arg3, arg4, arg5, ((float)((long double)arg6)));
005dfb1f  }


005dfb4b  struct D3DXVECTOR4* __stdcall c_D3DXVec4Hermite(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, struct D3DXVECTOR4 const* arg5, float arg6)

005dfb4b  {
005dfb59      long double x87_r7_1 = (((long double)arg6) * ((long double)arg6));
005dfb66      long double x87_r6_1 = (((long double)arg6) * x87_r7_1);
005dfb6b      int32_t edi;
005dfb6b      int32_t var_18 = edi;
005dfb6f      float var_8 = ((float)x87_r6_1);
005dfb74      float var_10 = ((float)(x87_r6_1 + x87_r6_1));
005dfb7f      float var_c = ((float)(((long double)3f) * x87_r7_1));
005dfb88      long double x87_r6_7 = ((((long double)var_10) - ((long double)var_c)) + ((long double)1f));
005dfb95      long double x87_r5_3 = ((((long double)var_8) - (x87_r7_1 + x87_r7_1)) + ((long double)arg6));
005dfb9b      long double x87_r4_1 = (((long double)var_c) - ((long double)var_10));
005dfba1      long double x87_r3_1 = (((long double)var_8) - x87_r7_1);
005dfbb9      arg1->x = ((float)((((x87_r6_7 * ((long double)arg2->x)) + (x87_r5_3 * ((long double)arg3->x))) + (x87_r4_1 * ((long double)arg4->x))) + (x87_r3_1 * ((long double)arg5->x))));
005dfbd5      arg1->y = ((float)((((x87_r3_1 * ((long double)arg5->y)) + (x87_r4_1 * ((long double)arg4->y))) + (x87_r5_3 * ((long double)arg3->y))) + (x87_r6_7 * ((long double)arg2->y))));
005dfbf2      arg1->z = ((float)((((x87_r3_1 * ((long double)arg5->z)) + (x87_r4_1 * ((long double)arg4->z))) + (x87_r5_3 * ((long double)arg3->z))) + (x87_r6_7 * ((long double)arg2->z))));
005dfc0f      arg1->w = ((float)((((x87_r3_1 * ((long double)arg5->w)) + (x87_r4_1 * ((long double)arg4->w))) + (x87_r5_3 * ((long double)arg3->w))) + (x87_r6_7 * ((long double)arg2->w))));
005dfc1b      return arg1;
005dfb4b  }


005dfc1e  struct D3DXVECTOR4* __stdcall init_D3DXVec4CatmullRom(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, struct D3DXVECTOR4 const* arg5, float arg6)

005dfc1e  {
005dfc23      int32_t var_8 = 1;
005dfc2d      int32_t ecx;
005dfc2d      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005dfc47      return data_8242b0(arg1, arg2, arg3, arg4, arg5, ((float)((long double)arg6)));
005dfc1e  }


005dfc4a  struct D3DXVECTOR4* __stdcall c_D3DXVec4CatmullRom(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, struct D3DXVECTOR4 const* arg5, float arg6)

005dfc4a  {
005dfc4f      int32_t ecx;
005dfc4f      int32_t var_8 = ecx;
005dfc50      int32_t var_c = ecx;
005dfc57      long double x87_r7_1 = (((long double)arg6) * ((long double)arg6));
005dfc64      long double x87_r6_1 = (((long double)arg6) * x87_r7_1);
005dfc69      long double x87_r5 = ((long double)2f);
005dfc6f      int32_t edi;
005dfc6f      int32_t var_14 = edi;
005dfc7c      float var_c_1 = ((float)(((x87_r7_1 * x87_r5) - x87_r6_1) - ((long double)arg6)));
005dfc81      long double x87_r4_5 = (x87_r6_1 * ((long double)3f));
005dfc93      float var_8_1 = ((float)((x87_r4_5 - (x87_r7_1 * ((long double)5f))) + x87_r5));
005dfca3      arg6 = ((float)(((x87_r7_1 * ((long double)4f)) - x87_r4_5) + ((long double)arg6)));
005dfcaa      long double x87_r7_2 = (x87_r4_5 - x87_r7_1);
005dfcac      long double x87_r6_3 = ((long double)0.5f);
005dfccd      arg1->x = ((float)(((((((long double)var_c_1) * ((long double)arg2->x)) + (((long double)var_8_1) * ((long double)arg3->x))) + (((long double)arg6) * ((long double)arg4->x))) + (x87_r7_2 * ((long double)arg5->x))) * x87_r6_3));
005dfcee      arg1->y = ((float)(((((x87_r7_2 * ((long double)arg5->y)) + (((long double)arg6) * ((long double)arg4->y))) + (((long double)var_8_1) * ((long double)arg3->y))) + (((long double)var_c_1) * ((long double)arg2->y))) * x87_r6_3));
005dfd10      arg1->z = ((float)(((((x87_r7_2 * ((long double)arg5->z)) + (((long double)arg6) * ((long double)arg4->z))) + (((long double)var_8_1) * ((long double)arg3->z))) + (((long double)var_c_1) * ((long double)arg2->z))) * x87_r6_3));
005dfd34      arg1->w = ((float)(((((x87_r7_2 * ((long double)arg5->w)) + (((long double)arg6) * ((long double)arg4->w))) + (((long double)var_8_1) * ((long double)arg3->w))) + (((long double)var_c_1) * ((long double)arg2->w))) * x87_r6_3));
005dfd3c      return arg1;
005dfc4a  }


005dfd3f  struct D3DXVECTOR4* __stdcall init_D3DXVec4BaryCentric(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, float arg5, float arg6)

005dfd3f  {
005dfd44      int32_t var_8 = 1;
005dfd46      int32_t ecx;
005dfd46      int32_t ecx_1 = _D3DXCpuOptimizations@4(ecx);
005dfd4e      int32_t var_8_1 = ecx_1;
005dfd4f      int32_t var_c = ecx_1;
005dfd6d      return data_8242b4(arg1, arg2, arg3, arg4, ((float)((long double)arg5)), ((float)((long double)arg6)));
005dfd3f  }


005dfd70  struct D3DXVECTOR4* __stdcall c_D3DXVec4BaryCentric(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, float arg5, float arg6)

005dfd70  {
005dfd94      arg1->x = ((float)((((((long double)arg3->x) - ((long double)arg2->x)) * ((long double)arg5)) + ((((long double)arg4->x) - ((long double)arg2->x)) * ((long double)arg6))) + ((long double)arg2->x)));
005dfdad      arg1->y = ((float)((((((long double)arg3->y) - ((long double)arg2->y)) * ((long double)arg5)) + ((((long double)arg4->y) - ((long double)arg2->y)) * ((long double)arg6))) + ((long double)arg2->y)));
005dfdc7      arg1->z = ((float)((((((long double)arg3->z) - ((long double)arg2->z)) * ((long double)arg5)) + ((((long double)arg4->z) - ((long double)arg2->z)) * ((long double)arg6))) + ((long double)arg2->z)));
005dfde2      arg1->w = ((float)((((((long double)arg3->w) - ((long double)arg2->w)) * ((long double)arg5)) + ((((long double)arg4->w) - ((long double)arg2->w)) * ((long double)arg6))) + ((long double)arg2->w)));
005dfde6      return arg1;
005dfd70  }


005dfde9  struct D3DXVECTOR4* __stdcall init_D3DXVec4Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXMATRIX const* arg3)

005dfde9  {
005dfdee      int32_t var_8 = 1;
005dfdf0      int32_t ecx;
005dfdf0      _D3DXCpuOptimizations@4(ecx);
005dfdf6      /* jump -> data_8241e0 */
005dfde9  }


005dfdfc  struct D3DXVECTOR4* __stdcall c_D3DXVec4Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXMATRIX const* arg3)

005dfdfc  {
005dfe14      int32_t edi;
005dfe14      int32_t var_1c = edi;
005dfe29      long double x87_r7_4 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30)) * ((long double)arg2->w)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)) * ((long double)arg2->z))) + (((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))));
005dfe49      long double x87_r7_9 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)) * ((long double)arg2->w)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)arg2->x))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)) * ((long double)arg2->z)));
005dfe4b      float var_10 = ((float)x87_r7_9);
005dfe69      long double x87_r7_14 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)) * ((long double)arg2->w)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)arg2->x))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)) * ((long double)arg2->z)));
005dfe6b      float var_c = ((float)x87_r7_14);
005dfe8c      float* edi_1 = arg1;
005dfe8e      long double x87_r7_19 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)) * ((long double)arg2->w)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc)) * ((long double)arg2->x))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)) * ((long double)arg2->z)));
005dfe90      float var_8 = ((float)x87_r7_19);
005dfe93      *(uint32_t*)edi_1 = ((float)x87_r7_4);
005dfe93      void* edi_2 = &edi_1[1];
005dfe93      float* esi = &var_10;
005dfe94      *(uint32_t*)edi_2 = *(uint32_t*)esi;
005dfe94      void* edi_3 = ((char*)edi_2 + 4);
005dfe94      void* esi_1 = &esi[1];
005dfe95      *(uint32_t*)edi_3 = *(uint32_t*)esi_1;
005dfe96      *(uint32_t*)((char*)edi_3 + 4) = *(uint32_t*)((char*)esi_1 + 4);
005dfe9a      return arg1;
005dfdfc  }


005dfe9d  struct D3DXVECTOR4* __stdcall init_D3DXVec4TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR4 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005dfe9d  {
005dfea2      int32_t var_8 = 1;
005dfea4      int32_t ecx;
005dfea4      _D3DXCpuOptimizations@4(ecx);
005dfeaa      /* jump -> data_8242e0 */
005dfe9d  }


005dfeb0  struct D3DXVECTOR4* __stdcall c_D3DXVec4TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR4 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005dfeb0  {
005dfeb8      uint32_t i_1 = arg6;
005dfebe      struct D3DXVECTOR4* ebx = arg1;
005dfec1      arg1 = ebx;
005dfec1      
005dfec4      if (i_1 > 0)
005dfec4      {
005dfecd          struct D3DXVECTOR4* ecx_1 = arg3;
005dfed1          int32_t edi;
005dfed1          int32_t var_20_1 = edi;
005dff61          uint32_t i;
005dff61          
005dff61          do
005dff61          {
005dfed5              struct D3DXVECTOR4* edi_1 = ebx;
005dfeda              ebx += arg2;
005dfef4              long double x87_r7_5 = ((((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x10)) * ((long double)ecx_1->y)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x20)) * ((long double)ecx_1->z))) + (((long double)ecx_1->w) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x30)))) + (((long double)ecx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0))));
005dff14              long double x87_r7_10 = ((((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x14)) * ((long double)ecx_1->y)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x34)) * ((long double)ecx_1->w))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x24)) * ((long double)ecx_1->z))) + (((long double)ecx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 4))));
005dff16              float var_10 = ((float)x87_r7_10);
005dff34              long double x87_r7_15 = ((((((long double)*(uint32_t*)((char*)arg5->__inner0 + 8)) * ((long double)ecx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x18)) * ((long double)ecx_1->y))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x28)) * ((long double)ecx_1->z))) + (((long double)ecx_1->w) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x38))));
005dff36              float var_c_1 = ((float)x87_r7_15);
005dff4c              long double x87_r7_19 = (((((long double)ecx_1->w) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x3c))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0xc)) * ((long double)ecx_1->x))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x1c)) * ((long double)ecx_1->y)));
005dff51              long double x87_r6_24 = (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x2c)) * ((long double)ecx_1->z));
005dff54              ecx_1 += arg4;
005dff57              i = i_1;
005dff57              i_1 -= 1;
005dff5a              float var_8_1 = ((float)(x87_r7_19 + x87_r6_24));
005dff5d              edi_1->x = ((float)x87_r7_5);
005dff5d              float* edi_2 = &edi_1->y;
005dff5d              float* esi_1 = &var_10;
005dff67              ADJ(edi_2)->y = *(uint32_t*)esi_1;
005dff5e              int32_t* edi_3 = &edi_2[1];
005dff5e              void* esi_2 = &esi_1[1];
005dff5f              *(uint32_t*)edi_3 = *(uint32_t*)esi_2;
005dff5f              edi_3[1] = *(uint32_t*)((char*)esi_2 + 4);
005dff61          } while (i != 1);
005dfec4      }
005dfec4      
005dff6e      return arg1;
005dfeb0  }


005dff71  float __stdcall init_D3DXMatrixDeterminant(struct D3DXMATRIX const* arg1)

005dff71  {
005dff76      int32_t var_8 = 1;
005dff78      int32_t ecx;
005dff78      _D3DXCpuOptimizations@4(ecx);
005dff7e      /* jump -> data_824204 */
005dff71  }


005dff84  int32_t _D3DXMatrixDeterminant@4()

005dff84  {
005dff84      /* jump -> data_824204 */
005dff84  }


005dff8a  float __stdcall c_D3DXMatrixDeterminant(struct D3DXMATRIX const* arg1)

005dff8a  {
005dff8f      struct D3DXMATRIX* eax = arg1;
005dff9e      long double x87_r7_2 = ((((long double)*(uint32_t*)((char*)eax->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x3c))) - (((long double)*(uint32_t*)((char*)eax->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x2c))));
005dffac      long double x87_r6_4 = ((((long double)*(uint32_t*)((char*)eax->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x24))) - (((long double)*(uint32_t*)((char*)eax->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x2c))));
005dffba      long double x87_r5_4 = ((((long double)*(uint32_t*)((char*)eax->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x24))) - (((long double)*(uint32_t*)((char*)eax->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x34))));
005dffc8      long double x87_r4_4 = ((((long double)*(uint32_t*)((char*)eax->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x3c))) - (((long double)*(uint32_t*)((char*)eax->__inner0 + 0x30)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x2c))));
005dffd6      long double x87_r3_4 = ((((long double)*(uint32_t*)((char*)eax->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x20))) - (((long double)*(uint32_t*)((char*)eax->__inner0 + 0x30)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x28))));
005dffe6      arg1 = ((float)((((long double)*(uint32_t*)((char*)eax->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x34))) - (((long double)*(uint32_t*)((char*)eax->__inner0 + 0x30)) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x24)))));
005e0014      long double x87_r2_10 = (((((x87_r7_2 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x14))) - (x87_r6_4 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x18)))) + (x87_r5_4 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x1c)))) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0))) - ((((x87_r7_2 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x10))) - (x87_r4_4 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x18)))) + (x87_r3_4 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x1c)))) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 4))));
005e0046      ((x87_r2_10 + ((((x87_r6_4 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x10))) - (x87_r4_4 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x14)))) + (((long double)arg1) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x1c)))) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 8)))) - ((((x87_r5_4 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x10))) - (x87_r3_4 * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x14)))) + (((long double)arg1) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0x18)))) * ((long double)*(uint32_t*)((char*)eax->__inner0 + 0xc))));
005e0053      return x87_r3_4;
005dff8a  }


005e0056  long __stdcall init_D3DXMatrixDecompose(struct D3DXVECTOR3* arg1, struct D3DXQUATERNION* arg2, struct D3DXVECTOR3* arg3, struct D3DXMATRIX const* arg4)

005e0056  {
005e005b      int32_t var_8 = 1;
005e005d      int32_t ecx;
005e005d      _D3DXCpuOptimizations@4(ecx);
005e0063      /* jump -> data_824208 */
005e0056  }


005e0069  struct D3DXMATRIX* __stdcall init_D3DXMatrixMultiply(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

005e0069  {
005e006e      int32_t var_8 = 1;
005e0070      int32_t ecx;
005e0070      _D3DXCpuOptimizations@4(ecx);
005e0076      /* jump -> data_8241e4 */
005e0069  }


005e007c  int32_t _D3DXMatrixMultiply@12()

005e007c  {
005e007c      /* jump -> data_8241e4 */
005e007c  }


005e0082  struct D3DXMATRIX* __stdcall c_D3DXMatrixMultiply(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

005e0082  {
005e0096      struct D3DXMATRIX* esi_1;
005e0096      
005e0096      if (arg1 != arg2)
005e009a          esi_1 = arg1;
005e009a      
005e009c      void var_44;
005e009c      
005e009c      if ((arg1 == arg2 || arg1 == arg3))
005e009e          esi_1 = &var_44;
005e00bb      long double x87_r7_4 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 4))));
005e00bd      *(uint32_t*)((char*)esi_1->__inner0 + 0) = ((float)x87_r7_4);
005e00da      long double x87_r7_9 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0))));
005e00dc      *(uint32_t*)((char*)esi_1->__inner0 + 4) = ((float)x87_r7_9);
005e00fa      long double x87_r7_14 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 4))));
005e00fc      *(uint32_t*)((char*)esi_1->__inner0 + 8) = ((float)x87_r7_14);
005e011a      long double x87_r7_19 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 8)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 4))));
005e011c      *(uint32_t*)((char*)esi_1->__inner0 + 0xc) = ((float)x87_r7_19);
005e013a      long double x87_r7_24 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x14)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20))));
005e013c      *(uint32_t*)((char*)esi_1->__inner0 + 0x10) = ((float)x87_r7_24);
005e015b      long double x87_r7_29 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x14)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10))));
005e015d      *(uint32_t*)((char*)esi_1->__inner0 + 0x14) = ((float)x87_r7_29);
005e017c      long double x87_r7_34 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x14))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28))));
005e017e      *(uint32_t*)((char*)esi_1->__inner0 + 0x18) = ((float)x87_r7_34);
005e019d      long double x87_r7_39 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x14))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))));
005e019f      *(uint32_t*)((char*)esi_1->__inner0 + 0x1c) = ((float)x87_r7_39);
005e01bd      long double x87_r7_44 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x24)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20))));
005e01bf      *(uint32_t*)((char*)esi_1->__inner0 + 0x20) = ((float)x87_r7_44);
005e01de      long double x87_r7_49 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x24)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x20))));
005e01e0      *(uint32_t*)((char*)esi_1->__inner0 + 0x24) = ((float)x87_r7_49);
005e01ff      long double x87_r7_54 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x24))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x20)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28))));
005e0201      *(uint32_t*)((char*)esi_1->__inner0 + 0x28) = ((float)x87_r7_54);
005e0220      long double x87_r7_59 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x24)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))));
005e0222      *(uint32_t*)((char*)esi_1->__inner0 + 0x2c) = ((float)x87_r7_59);
005e0240      long double x87_r7_64 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x30)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x34))));
005e0242      *(uint32_t*)((char*)esi_1->__inner0 + 0x30) = ((float)x87_r7_64);
005e0263      long double x87_r7_69 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x34)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x30))));
005e0265      *(uint32_t*)((char*)esi_1->__inner0 + 0x34) = ((float)x87_r7_69);
005e0284      long double x87_r7_74 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x34)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x30)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38))));
005e0286      *(uint32_t*)((char*)esi_1->__inner0 + 0x38) = ((float)x87_r7_74);
005e02a5      long double x87_r7_79 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x34)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x30)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x38))));
005e02a7      *(uint32_t*)((char*)esi_1->__inner0 + 0x3c) = ((float)x87_r7_79);
005e02a7      
005e02aa      if (esi_1 != arg1)
005e02aa      {
005e02ac          int32_t edi;
005e02ac          int32_t var_4c_1 = edi;
005e02b2          __builtin_memcpy(arg1, esi_1, 0x40);
005e02aa      }
005e02aa      
005e02b7      return arg1;
005e0082  }


005e02ba  struct D3DXMATRIX* __stdcall init_D3DXMatrixTranspose(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2)

005e02ba  {
005e02bf      int32_t var_8 = 1;
005e02c1      int32_t ecx;
005e02c1      _D3DXCpuOptimizations@4(ecx);
005e02c7      /* jump -> data_824270 */
005e02ba  }


005e02cd  int32_t _D3DXMatrixTranspose@8()

005e02cd  {
005e02cd      /* jump -> data_824270 */
005e02cd  }


005e02d3  struct D3DXMATRIX* __stdcall c_D3DXMatrixTranspose(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2)

005e02d3  {
005e02e6      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10)));
005e02e9      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)((long double)*(uint32_t*)((char*)arg2->__inner0 + 4)));
005e02f2      *(uint32_t*)((char*)arg1->__inner0 + 8) = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
005e02f5      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)((long double)*(uint32_t*)((char*)arg2->__inner0 + 8)));
005e02fe      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
005e0301      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc)));
005e030a      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
005e030d      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)));
005e0316      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
005e0319      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c)));
005e0322      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
005e0325      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)));
005e0325      
005e0328      if (arg1 != arg2)
005e0328      {
005e032c          *(uint32_t*)((char*)arg1->__inner0 + 0) = *(uint32_t*)((char*)arg2->__inner0 + 0);
005e0331          *(uint32_t*)((char*)arg1->__inner0 + 0x14) = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
005e0337          *(uint32_t*)((char*)arg1->__inner0 + 0x28) = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
005e033d          *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
005e0328      }
005e0328      
005e0341      return arg1;
005e02d3  }


005e0344  struct D3DXMATRIX* __stdcall init_D3DXMatrixMultiplyTranspose(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

005e0344  {
005e0349      int32_t var_8 = 1;
005e034b      int32_t ecx;
005e034b      _D3DXCpuOptimizations@4(ecx);
005e0351      /* jump -> data_8241e8 */
005e0344  }


005e0357  struct D3DXMATRIX* __stdcall c_D3DXMatrixMultiplyTranspose(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

005e0357  {
005e036b      struct D3DXMATRIX* esi_1;
005e036b      
005e036b      if (arg1 != arg2)
005e036f          esi_1 = arg1;
005e036f      
005e0371      void var_44;
005e0371      
005e0371      if ((arg1 == arg2 || arg1 == arg3))
005e0373          esi_1 = &var_44;
005e0390      long double x87_r7_4 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 4))));
005e0392      *(uint32_t*)((char*)esi_1->__inner0 + 0) = ((float)x87_r7_4);
005e03af      long double x87_r7_9 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x14))));
005e03b1      *(uint32_t*)((char*)esi_1->__inner0 + 4) = ((float)x87_r7_9);
005e03cf      long double x87_r7_14 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x24)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))));
005e03d1      *(uint32_t*)((char*)esi_1->__inner0 + 8) = ((float)x87_r7_14);
005e03ef      long double x87_r7_19 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x30)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20))));
005e03f1      *(uint32_t*)((char*)esi_1->__inner0 + 0xc) = ((float)x87_r7_19);
005e040f      long double x87_r7_24 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 8))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14))));
005e0411      *(uint32_t*)((char*)esi_1->__inner0 + 0x10) = ((float)x87_r7_24);
005e0430      long double x87_r7_29 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x14)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))));
005e0432      *(uint32_t*)((char*)esi_1->__inner0 + 0x14) = ((float)x87_r7_29);
005e0451      long double x87_r7_34 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x24)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x28)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))));
005e0453      *(uint32_t*)((char*)esi_1->__inner0 + 0x18) = ((float)x87_r7_34);
005e0472      long double x87_r7_39 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x3c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x38)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x30))));
005e0474      *(uint32_t*)((char*)esi_1->__inner0 + 0x1c) = ((float)x87_r7_39);
005e0492      long double x87_r7_44 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 8))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc))));
005e0494      *(uint32_t*)((char*)esi_1->__inner0 + 0x20) = ((float)x87_r7_44);
005e04b3      long double x87_r7_49 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x14)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 8))));
005e04b5      *(uint32_t*)((char*)esi_1->__inner0 + 0x24) = ((float)x87_r7_49);
005e04d4      long double x87_r7_54 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x24)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x28)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 8))));
005e04d6      *(uint32_t*)((char*)esi_1->__inner0 + 0x28) = ((float)x87_r7_54);
005e04f5      long double x87_r7_59 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x3c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x38)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x30))));
005e04f7      *(uint32_t*)((char*)esi_1->__inner0 + 0x2c) = ((float)x87_r7_59);
005e0515      long double x87_r7_64 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 4)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0xc)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 8)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c))));
005e0517      *(uint32_t*)((char*)esi_1->__inner0 + 0x30) = ((float)x87_r7_64);
005e0538      long double x87_r7_69 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x1c))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x18)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x14)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x10)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))));
005e053a      *(uint32_t*)((char*)esi_1->__inner0 + 0x34) = ((float)x87_r7_69);
005e0559      long double x87_r7_74 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x28)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x24)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x2c)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x20)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))));
005e055b      *(uint32_t*)((char*)esi_1->__inner0 + 0x38) = ((float)x87_r7_74);
005e057a      long double x87_r7_79 = ((((((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x34)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x3c)))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc)) * ((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x30)))) + (((long double)*(uint32_t*)((char*)arg2->__inner0 + 0x38)) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c))));
005e057c      *(uint32_t*)((char*)esi_1->__inner0 + 0x3c) = ((float)x87_r7_79);
005e057c      
005e057f      if (esi_1 != arg1)
005e057f      {
005e0581          int32_t edi;
005e0581          int32_t var_4c_1 = edi;
005e0587          __builtin_memcpy(arg1, esi_1, 0x40);
005e057f      }
005e057f      
005e058c      return arg1;
005e0357  }


005e058f  struct D3DXMATRIX* __stdcall init_D3DXMatrixInverse(struct D3DXMATRIX* arg1, float* arg2, struct D3DXMATRIX const* arg3)

005e058f  {
005e0594      int32_t var_8 = 1;
005e0596      int32_t ecx;
005e0596      _D3DXCpuOptimizations@4(ecx);
005e059c      /* jump -> data_824224 */
005e058f  }


005e05a2  int32_t _D3DXMatrixInverse@12()

005e05a2  {
005e05a2      /* jump -> data_824224 */
005e05a2  }


005e05a8  struct D3DXMATRIX* __stdcall c_D3DXMatrixInverse(struct D3DXMATRIX* arg1, float* arg2, struct D3DXMATRIX const* arg3)

005e05a8  {
005e05b3      float ecx = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
005e05b6      long double x87_r7 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0));
005e05b8      long double x87_r6 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4));
005e05be      float ecx_1 = *(uint32_t*)((char*)arg3->__inner0 + 0x14);
005e05c7      float ecx_2 = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
005e05d2      float ecx_3 = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
005e05da      float ecx_4 = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
005e05e2      struct D3DXMATRIX* ecx_5 = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
005e05e8      float ecx_6 = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
005e05eb      float var_10 = ((float)((((long double)ecx_1) * x87_r7) - (((long double)ecx) * x87_r6)));
005e05f4      struct D3DXMATRIX* ecx_7 = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
005e0600      float var_c = ((float)((((long double)ecx_3) * x87_r7) - (((long double)ecx_2) * x87_r6)));
005e060f      float var_30 = ((float)((((long double)ecx_5) * x87_r7) - (((long double)ecx_4) * x87_r6)));
005e0624      float var_3c = ((float)((((long double)ecx_3) * ((long double)ecx)) - (((long double)ecx_2) * ((long double)ecx_1))));
005e0635      float var_38 = ((float)((((long double)ecx_5) * ((long double)ecx)) - (((long double)ecx_4) * ((long double)ecx_1))));
005e0649      float var_34 = ((float)((((long double)ecx_5) * ((long double)ecx_2)) - (((long double)ecx_4) * ((long double)ecx_3))));
005e064c      long double x87_r7_11 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 8));
005e064f      long double x87_r6_7 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc));
005e0652      long double x87_r5_9 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18));
005e0655      float var_2c = ((float)x87_r5_9);
005e0658      long double x87_r4_6 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c));
005e065b      float var_24_1 = ((float)x87_r4_6);
005e065e      long double x87_r3 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28));
005e0661      float var_28 = ((float)x87_r3);
005e0664      long double x87_r2 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c));
005e0667      float var_8_1 = ((float)x87_r2);
005e067d      float var_58 = ((float)(((x87_r7_11 * ((long double)var_3c)) - (x87_r5_9 * ((long double)var_c))) + (x87_r3 * ((long double)var_10))));
005e0694      float var_54 = ((float)(((x87_r5_9 * ((long double)var_30)) - (((long double)ecx_6) * ((long double)var_10))) - (x87_r7_11 * ((long double)var_38))));
005e06ab      float var_50 = ((float)(((x87_r7_11 * ((long double)var_34)) - (x87_r3 * ((long double)var_30))) + (((long double)ecx_6) * ((long double)var_c))));
005e06c2      float var_4c = ((float)(((x87_r3 * ((long double)var_38)) - (((long double)ecx_6) * ((long double)var_3c))) - (x87_r5_9 * ((long double)var_34))));
005e06d8      float var_48 = ((float)(((((long double)var_c) * x87_r4_6) - (((long double)var_10) * x87_r2)) - (((long double)var_3c) * x87_r6_7)));
005e06ef      float var_44 = ((float)(((((long double)var_38) * x87_r6_7) - (((long double)var_30) * x87_r4_6)) + (((long double)var_10) * ((long double)ecx_7))));
005e0706      float var_40 = ((float)(((((long double)var_30) * x87_r2) - (((long double)var_c) * ((long double)ecx_7))) - (((long double)var_34) * x87_r6_7)));
005e071d      float var_30_1 = ((float)(((((long double)var_34) * x87_r4_6) - (((long double)var_38) * x87_r2)) + (((long double)var_3c) * ((long double)ecx_7))));
005e072e      float var_10_1 = ((float)((x87_r7_11 * x87_r2) - (x87_r5_9 * x87_r6_7)));
005e0741      float var_c_1 = ((float)((x87_r7_11 * ((long double)var_8_1)) - (((long double)var_28) * x87_r2)));
005e0757      float ecx_8 = *(uint32_t*)((char*)arg3->__inner0 + 0);
005e0762      float ecx_9 = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
005e076b      float ecx_10 = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
005e0771      long double x87_r6_11 = ((((long double)var_2c) * ((long double)var_8_1)) - (((long double)var_28) * ((long double)var_24_1)));
005e0773      float ecx_11 = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
005e0782      long double x87_r5_21 = ((((long double)var_2c) * ((long double)ecx_7)) - (((long double)ecx_6) * ((long double)var_24_1)));
005e0793      float ecx_12 = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
005e0799      long double x87_r4_16 = ((((long double)var_28) * ((long double)ecx_7)) - (((long double)ecx_6) * ((long double)var_8_1)));
005e079b      long double x87_r3_7 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4));
005e079e      long double x87_r2_3 = ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14));
005e07a1      struct D3DXMATRIX* eax_1 = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
005e07ba      float var_14_1 = ((float)(((((long double)var_c_1) * x87_r2_3) - (((long double)var_10_1) * ((long double)ecx_11))) - (x87_r6_11 * x87_r3_7)));
005e07cf      float var_28_1 = ((float)(((x87_r5_21 * x87_r3_7) - (x87_r2 * x87_r2_3)) + (((long double)var_10_1) * ((long double)eax_1))));
005e07e5      float var_2c_1 = ((float)(((x87_r2 * ((long double)ecx_11)) - (((long double)var_c_1) * ((long double)eax_1))) - (x87_r4_16 * x87_r3_7)));
005e07fa      float var_38_1 = ((float)(((x87_r4_16 * x87_r2_3) - (x87_r5_21 * ((long double)ecx_11))) + (x87_r6_11 * ((long double)eax_1))));
005e0832      float var_8_3 = ((float)(((x87_r2 * ((long double)ecx_9)) - (((long double)var_10_1) * ((long double)ecx_12))) - (x87_r5_21 * ((long double)ecx_8))));
005e0849      float var_24_2 = ((float)(((((long double)ecx_8) * x87_r2_3) - (x87_r2 * ((long double)ecx_10))) + (((long double)var_c_1) * ((long double)ecx_12))));
005e085f      float var_34_1 = ((float)(((x87_r5_21 * ((long double)ecx_10)) - (x87_r6_11 * ((long double)ecx_12))) - (x87_r2_3 * ((long double)ecx_9))));
005e0886      long double x87_r7_18 = ((((((long double)var_14_1) * ((long double)ecx_12)) + (((long double)var_28_1) * ((long double)ecx_10))) + (((long double)var_2c_1) * ((long double)ecx_9))) + (((long double)var_38_1) * ((long double)ecx_8)));
005e0886      
005e0888      if (arg2 != 0)
005e088a          *(uint32_t*)arg2 = ((float)x87_r7_18);
005e088a      
005e088e      long double x87_r5_23 = ((long double)0f);
005e0894      (x87_r5_23 - x87_r7_18);
005e0896      float* eax_2;
005e0896      eax_2 = ((((x87_r5_23 < x87_r7_18) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_23, x87_r7_18))) ? 1 : 0) << 0xa) | ((((x87_r5_23 == x87_r7_18) ? 1 : 0) << 0xe) | 0x3800))));
005e0898      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
005e089b      float* result;
005e089b      
005e089b      if (p)
005e089b      {
005e08a9          float var_60_1 = ecx_12;
005e08aa          float var_c_2 = ((float)(((long double)1) / x87_r7_18));
005e08b2          var_60_1 = ((double)((long double)var_c_2));
005e08b5          result = j__finite(var_60_1, ecx_12, var_58, var_54, var_50, var_4c, var_48, var_44, var_40, ecx_8, var_38_1, var_34_1, var_30_1, var_2c_1, var_28_1, var_24_2, ecx_9, ecx_10, ecx_12, var_14_1, var_10_1, var_c_2, var_8_3);
005e08b5          
005e08be          if (result != 0)
005e08be          {
005e08c4              result = arg1;
005e08c7              x87_r7_18 = ((long double)var_c_2);
005e08cf              *(uint32_t*)result = ((float)(((long double)var_38_1) * x87_r7_18));
005e08d6              result[1] = ((float)(((long double)var_2c_1) * x87_r7_18));
005e08de              result[2] = ((float)(((long double)var_28_1) * x87_r7_18));
005e08e6              result[3] = ((float)(((long double)var_14_1) * x87_r7_18));
005e08ee              result[4] = ((float)(((long double)var_34_1) * x87_r7_18));
005e08f6              result[5] = ((float)(((long double)var_24_2) * x87_r7_18));
005e08fe              result[6] = ((float)(((long double)var_8_3) * x87_r7_18));
005e0906              result[7] = ((float)(((long double)((float)(((x87_r6_11 * ((long double)ecx_8)) - (((long double)var_c_1) * ((long double)ecx_9))) + (((long double)var_10_1) * ((long double)ecx_10))))) * x87_r7_18));
005e090e              result[8] = ((float)(((long double)var_30_1) * x87_r7_18));
005e0916              result[9] = ((float)(((long double)var_40) * x87_r7_18));
005e091e              result[0xa] = ((float)(((long double)var_44) * x87_r7_18));
005e0926              result[0xb] = ((float)(((long double)var_48) * x87_r7_18));
005e092e              result[0xc] = ((float)(((long double)var_4c) * x87_r7_18));
005e0936              result[0xd] = ((float)(((long double)var_50) * x87_r7_18));
005e093e              result[0xe] = ((float)(((long double)var_54) * x87_r7_18));
005e0946              result[0xf] = ((float)(((long double)var_58) * x87_r7_18));
005e08be          }
005e089b      }
005e089b      else
005e089d          result = nullptr;
005e089d      
005e094c      return result;
005e05a8  }


005e094f  struct D3DXMATRIX* __stdcall init_D3DXMatrixScaling(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

005e094f  {
005e0954      int32_t var_8 = 1;
005e0956      int32_t ecx;
005e0956      _D3DXCpuOptimizations@4(ecx);
005e097c      return data_824260(arg1, ((float)((long double)arg2)), ((float)((long double)arg3)), ((float)((long double)arg4)));
005e094f  }


005e097f  struct D3DXMATRIX* __stdcall c_D3DXMatrixScaling(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

005e097f  {
005e0989      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)((long double)0));
005e0991      *(uint32_t*)((char*)arg1->__inner0 + 0) = arg2;
005e0993      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)((long double)0));
005e099b      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = arg3;
005e09a1      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)((long double)0));
005e09a4      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = arg4;
005e09a9      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e09ae      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)((long double)0));
005e09b3      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)((long double)0));
005e09b8      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e09bd      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)((long double)0));
005e09c2      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)((long double)0));
005e09c7      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e09cc      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)((long double)0));
005e09d1      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)((long double)0));
005e09d6      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e09da      return arg1;
005e097f  }


005e09dd  struct D3DXMATRIX* __stdcall init_D3DXMatrixTranslation(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

005e09dd  {
005e09e2      int32_t var_8 = 1;
005e09e4      int32_t ecx;
005e09e4      _D3DXCpuOptimizations@4(ecx);
005e0a0a      return data_824244(arg1, ((float)((long double)arg2)), ((float)((long double)arg3)), ((float)((long double)arg4)));
005e09dd  }


005e0a0d  struct D3DXMATRIX* __stdcall c_D3DXMatrixTranslation(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

005e0a0d  {
005e0a17      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e0a1f      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = arg2;
005e0a22      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)((long double)0));
005e0a2a      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = arg3;
005e0a30      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)((long double)0));
005e0a33      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = arg4;
005e0a38      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e0a3d      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)((long double)0));
005e0a42      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)((long double)0));
005e0a47      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e0a4c      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)((long double)0));
005e0a51      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)((long double)0));
005e0a56      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e0a5b      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)((long double)1));
005e0a60      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)((long double)1));
005e0a65      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)((long double)1));
005e0a68      return arg1;
005e0a0d  }


005e0a6b  struct D3DXMATRIX* __stdcall init_D3DXMatrixRotationX(struct D3DXMATRIX* arg1, float arg2)

005e0a6b  {
005e0a70      int32_t var_8 = 1;
005e0a7a      int32_t ecx;
005e0a7a      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005e0a88      return data_824254(arg1, ((float)((long double)arg2)));
005e0a6b  }


005e0a8b  struct D3DXMATRIX* __stdcall c_D3DXMatrixRotationX(struct D3DXMATRIX* arg1, float arg2)

005e0a8b  {
005e0aa8      long double st0;
005e0aa8      long double st1;
005e0aa8      bool c2;
005e0aa8      st1 = __fsincos(((long double)arg2));
005e0aaa      float var_c = ((float)st0);
005e0aac      float var_8 = ((float)st1);
005e0ab0      float* result = arg1;
005e0ab3      *(uint32_t*)result = ((float)((long double)1));
005e0ab7      float ecx = var_8;
005e0aba      result[1] = ((float)((long double)0));
005e0abd      result[6] = ecx;
005e0ac2      result[2] = ((float)((long double)0));
005e0ac7      result[3] = ((float)((long double)0));
005e0acc      result[4] = ((float)((long double)0));
005e0acf      long double x87_r7_7 = ((long double)var_c);
005e0ad2      result[5] = ((float)x87_r7_7);
005e0ad7      result[7] = ((float)((long double)0));
005e0adc      result[8] = ((float)((long double)0));
005e0ae4      result[9] = ((float)-(((long double)var_8)));
005e0ae7      result[0xa] = ((float)x87_r7_7);
005e0aec      result[0xb] = ((float)((long double)0));
005e0af1      result[0xc] = ((float)((long double)0));
005e0af6      result[0xd] = ((float)((long double)0));
005e0afb      result[0xe] = ((float)((long double)0));
005e0b00      result[0xf] = ((float)((long double)1));
005e0b04      return result;
005e0a8b  }


005e0b07  struct D3DXMATRIX* __stdcall init_D3DXMatrixRotationY(struct D3DXMATRIX* arg1, float arg2)

005e0b07  {
005e0b0c      int32_t var_8 = 1;
005e0b16      int32_t ecx;
005e0b16      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005e0b24      return data_824258(arg1, ((float)((long double)arg2)));
005e0b07  }


005e0b27  struct D3DXMATRIX* __stdcall c_D3DXMatrixRotationY(struct D3DXMATRIX* arg1, float arg2)

005e0b27  {
005e0b44      long double st0;
005e0b44      long double st1;
005e0b44      bool c2;
005e0b44      st1 = __fsincos(((long double)arg2));
005e0b46      float var_8 = ((float)st0);
005e0b48      float var_c = ((float)st1);
005e0b4a      long double x87_r7_2 = ((long double)var_8);
005e0b52      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)x87_r7_2);
005e0b56      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)((long double)0));
005e0b59      long double x87_r6_3 = ((long double)var_c);
005e0b60      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)-(x87_r6_3));
005e0b65      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e0b6a      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)((long double)0));
005e0b6f      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)((long double)1));
005e0b74      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)((long double)0));
005e0b79      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e0b7c      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)x87_r6_3);
005e0b81      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)((long double)0));
005e0b84      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)x87_r7_2);
005e0b89      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e0b8e      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)((long double)0));
005e0b93      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)((long double)0));
005e0b98      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)((long double)0));
005e0b9d      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e0ba1      return arg1;
005e0b27  }


005e0ba4  struct D3DXMATRIX* __stdcall init_D3DXMatrixRotationZ(struct D3DXMATRIX* arg1, float arg2)

005e0ba4  {
005e0ba9      int32_t var_8 = 1;
005e0bb3      int32_t ecx;
005e0bb3      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005e0bc1      return data_82425c(arg1, ((float)((long double)arg2)));
005e0ba4  }


005e0bc4  int32_t _D3DXMatrixRotationZ@8()

005e0bc4  {
005e0bc4      /* jump -> data_82425c */
005e0bc4  }


005e0bca  struct D3DXMATRIX* __stdcall c_D3DXMatrixRotationZ(struct D3DXMATRIX* arg1, float arg2)

005e0bca  {
005e0be7      long double st0;
005e0be7      long double st1;
005e0be7      bool c2;
005e0be7      st1 = __fsincos(((long double)arg2));
005e0be9      float var_c = ((float)st0);
005e0beb      float var_8 = ((float)st1);
005e0bed      long double x87_r7_2 = ((long double)var_c);
005e0bf5      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)x87_r7_2);
005e0bfc      *(uint32_t*)((char*)arg1->__inner0 + 4) = var_8;
005e0bff      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)((long double)0));
005e0c04      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e0c0c      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)-(((long double)var_8)));
005e0c0f      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)x87_r7_2);
005e0c14      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)((long double)0));
005e0c19      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e0c1e      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)((long double)0));
005e0c23      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)((long double)0));
005e0c28      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)((long double)1));
005e0c2d      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e0c32      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)((long double)0));
005e0c37      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)((long double)0));
005e0c3c      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)((long double)0));
005e0c41      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e0c45      return arg1;
005e0bca  }


005e0c48  struct D3DXMATRIX* __stdcall init_D3DXMatrixRotationAxis(struct D3DXMATRIX* arg1, struct D3DXVECTOR3 const* arg2, float arg3)

005e0c48  {
005e0c4d      int32_t var_8 = 1;
005e0c57      int32_t ecx;
005e0c57      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005e0c68      return data_824284(arg1, arg2, ((float)((long double)arg3)));
005e0c48  }


005e0c6b  struct D3DXMATRIX* __stdcall c_D3DXMatrixRotationAxis(struct D3DXMATRIX* arg1, struct D3DXVECTOR3 const* arg2, float arg3)

005e0c6b  {
005e0c76      float var_8;
005e0c76      int32_t* var_10 = &var_8;
005e0c7d      int32_t edi;
005e0c7d      int32_t var_28 = edi;
005e0c7e      float var_c;
005e0c7e      int32_t* var_14 = &var_c;
005e0c8a      long double st0;
005e0c8a      long double st1;
005e0c8a      bool c2;
005e0c8a      st1 = __fsincos(((long double)arg3));
005e0c8c      *(uint32_t*)var_10 = ((float)st0);
005e0c8e      *(uint32_t*)var_14 = ((float)st1);
005e0c95      long double x87_r7_3 = (((long double)1) - ((long double)var_8));
005e0c9b      float x = arg2->x;
005e0c9b      float var_1c;
005e0c9b      int32_t* edi_1 = &var_1c;
005e0c9b      float* esi_1 = &arg2->y;
005e0ca2      *(uint32_t*)edi_1 = ADJ(esi_1)->y;
005e0ca2      edi_1[1] = (&esi_1[1] - 8)->z;
005e0ca6      _D3DXVec3Normalize@8(&x, &x);
005e0cae      long double x87_r7_4 = ((long double)((float)x87_r7_3));
005e0cb9      arg3 = ((float)((((long double)var_1c) * ((long double)x)) * x87_r7_4));
005e0cbc      float var_18;
005e0cbc      long double x87_r6_4 = ((long double)var_18);
005e0cc4      long double x87_r5_2 = ((((long double)var_1c) * x87_r6_4) * x87_r7_4);
005e0cd8      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)(((((long double)x) * ((long double)x)) * x87_r7_4) + ((long double)var_8)));
005e0ce4      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)(((long double)arg3) + (x87_r6_4 * ((long double)var_c))));
005e0cea      long double x87_r2_3 = (((long double)var_1c) * ((long double)var_c));
005e0cf4      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)(((x87_r6_4 * ((long double)x)) * x87_r7_4) - x87_r2_3));
005e0cfb      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e0d03      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)(((long double)arg3) - x87_r2_3));
005e0d13      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)(((((long double)var_1c) * ((long double)var_1c)) * x87_r7_4) + ((long double)var_8)));
005e0d19      long double x87_r3_12 = (((long double)x) * ((long double)var_c));
005e0d20      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)(x87_r3_12 + x87_r5_2));
005e0d25      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e0d2d      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)(((long double)((float)x87_r2_3)) + x87_r2_3));
005e0d34      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)(x87_r5_2 - x87_r3_12));
005e0d46      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)(((x87_r3_12 * x87_r3_12) * x87_r7_4) + ((long double)var_8)));
005e0d51      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e0d56      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)((long double)0));
005e0d5b      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)((long double)0));
005e0d60      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)((long double)0));
005e0d65      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e0d69      return arg1;
005e0c6b  }


005e0d6c  struct D3DXMATRIX* __stdcall init_D3DXMatrixRotationQuaternion(struct D3DXMATRIX* arg1, struct D3DXQUATERNION const* arg2)

005e0d6c  {
005e0d71      int32_t var_8 = 1;
005e0d73      int32_t ecx;
005e0d73      _D3DXCpuOptimizations@4(ecx);
005e0d79      /* jump -> data_824274 */
005e0d6c  }


005e0d7f  int32_t _D3DXMatrixRotationQuaternion@8()

005e0d7f  {
005e0d7f      /* jump -> data_824274 */
005e0d7f  }


005e0d85  struct D3DXMATRIX* __stdcall c_D3DXMatrixRotationQuaternion(struct D3DXMATRIX* arg1, struct D3DXQUATERNION const* arg2)

005e0d85  {
005e0d8d      struct D3DXQUATERNION* eax = arg2;
005e0d90      long double x87_r7 = ((long double)2f);
005e0d9a      float var_8 = ((float)(((long double)eax->x) * x87_r7));
005e0da2      arg2 = ((float)(((long double)eax->y) * x87_r7));
005e0da5      long double x87_r7_1 = (x87_r7 * ((long double)eax->z));
005e0db1      long double x87_r5_1 = (((long double)arg2) * ((long double)eax->w));
005e0db6      long double x87_r4_1 = (x87_r7_1 * ((long double)eax->w));
005e0dc6      float var_8_1 = ((float)(((long double)arg2) * ((long double)eax->x)));
005e0dcd      float var_c = ((float)(x87_r7_1 * ((long double)eax->x)));
005e0dd6      float var_10 = ((float)(((long double)arg2) * ((long double)eax->y)));
005e0dde      arg2 = ((float)(x87_r7_1 * ((long double)eax->y)));
005e0de3      long double x87_r3_11 = (x87_r7_1 * ((long double)eax->z));
005e0df0      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)((((long double)1) - ((long double)var_10)) - x87_r3_11));
005e0df7      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)(((long double)var_8_1) + x87_r4_1));
005e0dff      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)(((long double)var_c) - x87_r5_1));
005e0e04      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e0e0c      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)(((long double)var_8_1) - x87_r4_1));
005e0e11      long double x87_r2_11 = (((long double)1) - ((long double)((float)(((long double)var_8) * ((long double)eax->x)))));
005e0e19      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)(x87_r2_11 - x87_r3_11));
005e0e25      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)(((long double)arg2) + (((long double)var_8) * ((long double)eax->w))));
005e0e2a      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e0e32      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)(((long double)var_c) + x87_r3_11));
005e0e3c      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)(((long double)arg2) - x87_r3_11));
005e0e49      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)(((long double)((float)x87_r2_11)) - ((long double)var_10)));
005e0e4e      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e0e53      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)((long double)0));
005e0e58      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)((long double)0));
005e0e5d      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)((long double)0));
005e0e62      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e0e66      return arg1;
005e0d85  }


005e0e69  struct D3DXMATRIX* __stdcall init_D3DXMatrixRotationYawPitchRoll(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

005e0e69  {
005e0e6e      int32_t var_8 = 1;
005e0e70      int32_t ecx;
005e0e70      _D3DXCpuOptimizations@4(ecx);
005e0e96      return data_82427c(arg1, ((float)((long double)arg2)), ((float)((long double)arg3)), ((float)((long double)arg4)));
005e0e69  }


005e0e99  struct D3DXMATRIX* __stdcall init_D3DXMatrixTransformation(struct D3DXMATRIX* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, struct D3DXQUATERNION const* arg6, struct D3DXVECTOR3 const* arg7)

005e0e99  {
005e0e9e      int32_t var_8 = 1;
005e0ea0      int32_t ecx;
005e0ea0      _D3DXCpuOptimizations@4(ecx);
005e0ea6      /* jump -> data_824278 */
005e0e99  }


005e0eac  struct D3DXMATRIX* __stdcall init_D3DXMatrixTransformation2D(struct D3DXMATRIX* arg1, struct D3DXVECTOR2 const* arg2, float arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6, struct D3DXVECTOR2 const* arg7)

005e0eac  {
005e0eb1      int32_t var_8 = 1;
005e0eb3      int32_t ecx;
005e0eb3      int32_t ecx_1 = _D3DXCpuOptimizations@4(ecx);
005e0ebe      int32_t var_c = ecx_1;
005e0ecb      int32_t var_18 = ecx_1;
005e0edc      return data_8242f8(arg1, arg2, ((float)((long double)arg3)), arg4, arg5, ((float)((long double)arg6)), arg7);
005e0eac  }


005e0edf  struct D3DXMATRIX* __stdcall init_D3DXMatrixAffineTransformation(struct D3DXMATRIX* arg1, float arg2, struct D3DXVECTOR3 const* arg3, struct D3DXQUATERNION const* arg4, struct D3DXVECTOR3 const* arg5)

005e0edf  {
005e0ee4      int32_t var_8 = 1;
005e0ef7      int32_t ecx;
005e0ef7      int32_t var_14 = _D3DXCpuOptimizations@4(ecx);
005e0f05      return data_824280(arg1, ((float)((long double)arg2)), arg3, arg4, arg5);
005e0edf  }


005e0f08  struct D3DXMATRIX* __stdcall c_D3DXMatrixAffineTransformation(struct D3DXMATRIX* arg1, float arg2, struct D3DXVECTOR3 const* arg3, struct D3DXQUATERNION const* arg4, struct D3DXVECTOR3 const* arg5)

005e0f08  {
005e0f0d      int32_t ecx;
005e0f0d      int32_t var_8 = ecx;
005e0f20      int32_t esi;
005e0f20      int32_t var_5c = esi;
005e0f24      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)((long double)0));
005e0f27      void* edi;
005e0f27      void* var_60 = edi;
005e0f27      int32_t* esp = &var_60;
005e0f2a      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)((long double)0));
005e0f2f      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)((long double)0));
005e0f34      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e0f39      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)((long double)0));
005e0f3e      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)((long double)0));
005e0f43      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e0f48      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)((long double)0));
005e0f4d      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)((long double)0));
005e0f52      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e0f57      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)((long double)0));
005e0f5c      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)((long double)0));
005e0f5f      long double x87_r7_12 = ((long double)arg2);
005e0f62      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)x87_r7_12);
005e0f64      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)x87_r7_12);
005e0f67      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)x87_r7_12);
005e0f6c      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e0f6c      
005e0f6f      if (arg4 != 0)
005e0f6f      {
005e0f77          void var_50;
005e0f77          void* var_68 = &var_50;
005e0f78          _D3DXMatrixRotationQuaternion@8(var_68, arg4);
005e0f7d          float* edi_1 = arg3;
005e0f85          var_60 = &var_50;
005e0f86          struct D3DXMATRIX* var_64_2 = arg1;
005e0f87          var_68 = arg1;
005e0f87          esp = &var_68;
005e0f87          
005e0f88          if (edi_1 == 0)
005e0fc5              _D3DXMatrixMultiply@12();
005e0f88          else
005e0f88          {
005e0f8f              *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x30)) - ((long double)*(uint32_t*)edi_1)));
005e0f98              *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)(((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x34)) - ((long double)edi_1[1])));
005e0fa1              *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)(((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x38)) - ((long double)edi_1[2])));
005e0fa4              _D3DXMatrixMultiply@12();
005e0fae              *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)edi_1) + ((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x30))));
005e0fb7              *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)(((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x34)) + ((long double)edi_1[1])));
005e0fc0              *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)(((long double)edi_1[2]) + ((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x38))));
005e0f88          }
005e0f6f      }
005e0f6f      
005e0fcf      if (arg5 != 0)
005e0fcf      {
005e0fd6          *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)(((long double)arg5->x) + ((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x30))));
005e0fdf          *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)(((long double)arg5->y) + ((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x34))));
005e0fe8          *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)(((long double)arg5->z) + ((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x38))));
005e0fcf      }
005e0fcf      
005e0feb      *(uint32_t*)esp;
005e0feb      esp[1];
005e0ff5      return arg1;
005e0f08  }


005e0ff8  struct D3DXMATRIX* __stdcall init_D3DXMatrixAffineTransformation2D(struct D3DXMATRIX* arg1, float arg2, struct D3DXVECTOR2 const* arg3, float arg4, struct D3DXVECTOR2 const* arg5)

005e0ff8  {
005e0ffd      int32_t var_8 = 1;
005e0fff      int32_t ecx;
005e0fff      int32_t ecx_1 = _D3DXCpuOptimizations@4(ecx);
005e100a      int32_t var_c = ecx_1;
005e1014      int32_t var_14 = ecx_1;
005e1022      return data_8242fc(arg1, ((float)((long double)arg2)), arg3, ((float)((long double)arg4)), arg5);
005e0ff8  }


005e1025  struct D3DXMATRIX* __stdcall c_D3DXMatrixAffineTransformation2D(struct D3DXMATRIX* arg1, float arg2, struct D3DXVECTOR2 const* arg3, float arg4, struct D3DXVECTOR2 const* arg5)

005e1025  {
005e102a      int32_t ecx;
005e102a      int32_t var_8 = ecx;
005e1039      int32_t esi;
005e1039      int32_t var_5c = esi;
005e103d      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)((long double)0));
005e1040      void* edi;
005e1040      void* var_60 = edi;
005e1040      int32_t* esp = &var_60;
005e1043      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)((long double)0));
005e1048      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)((long double)0));
005e104d      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e1052      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)((long double)0));
005e1057      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)((long double)0));
005e105c      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e1061      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)((long double)0));
005e1066      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)((long double)0));
005e106b      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e1070      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)((long double)0));
005e1075      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)((long double)0));
005e1078      long double x87_r7_12 = ((long double)arg2);
005e107b      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)x87_r7_12);
005e107d      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)x87_r7_12);
005e1082      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)((long double)1));
005e1087      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e108a      long double x87_r7_15 = ((long double)arg4);
005e108d      long double x87_r6 = ((long double)0f);
005e1093      (x87_r6 - x87_r7_15);
005e1095      int32_t eax;
005e1095      eax = ((((x87_r6 < x87_r7_15) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6, x87_r7_15))) ? 1 : 0) << 0xa) | ((((x87_r6 == x87_r7_15) ? 1 : 0) << 0xe) | 0))));
005e1097      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
005e1097      
005e109a      if (p)
005e109a      {
005e109f          int32_t var_64_1 = ecx;
005e10a3          float var_64_2 = ((float)((long double)arg4));
005e10a6          void var_50;
005e10a6          void* var_68 = &var_50;
005e10a7          _D3DXMatrixRotationZ@8(var_68, var_64_2);
005e10ac          float* edi_1 = arg3;
005e10b4          var_60 = &var_50;
005e10b5          struct D3DXMATRIX* var_64_3 = arg1;
005e10b6          var_68 = arg1;
005e10b6          esp = &var_68;
005e10b6          
005e10b7          if (edi_1 == 0)
005e10e2              _D3DXMatrixMultiply@12();
005e10b7          else
005e10b7          {
005e10be              *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x30)) - ((long double)*(uint32_t*)edi_1)));
005e10c7              *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)(((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x34)) - ((long double)edi_1[1])));
005e10ca              _D3DXMatrixMultiply@12();
005e10d4              *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)edi_1) + ((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x30))));
005e10dd              *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)(((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x34)) + ((long double)edi_1[1])));
005e10b7          }
005e109a      }
005e109a      
005e10e7      float* eax_1 = arg5;
005e10e7      
005e10ec      if (eax_1 != 0)
005e10ec      {
005e10f3          *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)eax_1) + ((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x30))));
005e10fc          *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)(((long double)eax_1[1]) + ((long double)*(uint32_t*)((char*)arg1->__inner0 + 0x34))));
005e10ec      }
005e10ec      
005e10ff      *(uint32_t*)esp;
005e10ff      esp[1];
005e1109      return arg1;
005e1025  }


005e110c  float* __stdcall _D3DXMatrixPerspectiveFovLH@20(float* arg1, float arg2, float arg3, float arg4, float arg5)

005e110c  {
005e1135      long double st0;
005e1135      long double st1;
005e1135      bool c2;
005e1135      st1 = __fsincos(((long double)((float)(((long double)arg2) * ((long double)0.5f)))));
005e1120      arg2 = ((float)st0);
005e1139      float var_8 = ((float)st1);
005e1141      long double x87_r7_5 = (((long double)arg2) / ((long double)var_8));
005e1149      *(uint32_t*)arg1 = ((float)(x87_r7_5 / ((long double)arg3)));
005e114d      arg1[1] = ((float)((long double)0));
005e1152      arg1[2] = ((float)((long double)0));
005e1157      arg1[3] = ((float)((long double)0));
005e115c      arg1[4] = ((float)((long double)0));
005e115f      arg1[5] = ((float)x87_r7_5);
005e1164      arg1[6] = ((float)((long double)0));
005e1169      arg1[7] = ((float)((long double)0));
005e116e      arg1[8] = ((float)((long double)0));
005e1173      arg1[9] = ((float)((long double)0));
005e117c      long double x87_r7_12 = (((long double)arg5) / (((long double)arg5) - ((long double)arg4)));
005e117f      arg1[0xa] = ((float)x87_r7_12);
005e1184      arg1[0xb] = ((float)((long double)1));
005e1189      arg1[0xc] = ((float)((long double)0));
005e118e      arg1[0xd] = ((float)((long double)0));
005e1196      arg1[0xe] = ((float)-((x87_r7_12 * ((long double)arg4))));
005e119b      arg1[0xf] = ((float)((long double)0));
005e119f      return arg1;
005e110c  }


005e11a2  struct D3DXMATRIX* __stdcall init_D3DXMatrixShadow(struct D3DXMATRIX* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXPLANE const* arg3)

005e11a2  {
005e11a7      int32_t var_8 = 1;
005e11a9      int32_t ecx;
005e11a9      _D3DXCpuOptimizations@4(ecx);
005e11af      /* jump -> data_824248 */
005e11a2  }


005e11b5  struct D3DXMATRIX* __stdcall init_D3DXMatrixReflect(struct D3DXMATRIX* arg1, struct D3DXPLANE const* arg2)

005e11b5  {
005e11ba      int32_t var_8 = 1;
005e11bc      int32_t ecx;
005e11bc      _D3DXCpuOptimizations@4(ecx);
005e11c2      /* jump -> data_82424c */
005e11b5  }


005e11c8  void __stdcall init_D3DXQuaternionToAxisAngle(struct D3DXQUATERNION const* arg1, struct D3DXVECTOR3* arg2, float* arg3)

005e11c8  {
005e11cd      int32_t var_8 = 1;
005e11cf      int32_t ecx;
005e11cf      _D3DXCpuOptimizations@4(ecx);
005e11d5      /* jump -> data_824238 */
005e11c8  }


005e11db  void __stdcall c_D3DXQuaternionToAxisAngle(struct D3DXQUATERNION const* arg1, struct D3DXVECTOR3* arg2, float* arg3)

005e11db  {
005e11e8      if (arg2 != 0)
005e11e8      {
005e11ec          arg2->x = arg1->x;
005e11f1          arg2->y = arg1->y;
005e11f7          arg2->z = arg1->z;
005e11e8      }
005e11e8      
005e1200      if (arg3 != 0)
005e1200      {
005e1202          long double x87_r7_1 = ((long double)arg1->w);
005e1205          j__CIacos();
005e120c          *(uint32_t*)arg3 = ((float)(x87_r7_1 + x87_r7_1));
005e1200      }
005e11db  }


005e1213  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionRotationMatrix(struct D3DXQUATERNION* arg1, struct D3DXMATRIX const* arg2)

005e1213  {
005e1218      int32_t var_8 = 1;
005e121a      int32_t ecx;
005e121a      _D3DXCpuOptimizations@4(ecx);
005e1220      /* jump -> data_82423c */
005e1213  }


005e1226  int32_t _D3DXQuaternionRotationMatrix@8()

005e1226  {
005e1226      /* jump -> data_82423c */
005e1226  }


005e122c  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionRotationMatrix(struct D3DXQUATERNION* arg1, struct D3DXMATRIX const* arg2)

005e122c  {
005e1234      struct D3DXMATRIX* ecx = arg2;
005e123c      long double x87_r7_2 = ((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x14)) + ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0))) + ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x28)));
005e123f      long double temp1 = ((long double)0f);
005e123f      (x87_r7_2 - temp1);
005e124a      struct D3DXQUATERNION* result;
005e124a      long double x87_r7_6;
005e124a      
005e124a      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
005e124a      {
005e128f          int32_t var_18_1 = 0;
005e129a          int32_t edi;
005e129a          int32_t var_2c_1 = edi;
005e129d          long double x87_r7_9 = ((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x14))) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x28)));
005e12a0          struct D3DXMATRIX* ebx_1 = 1;
005e12a4          float var_14 = ((float)x87_r7_9);
005e12a7          int32_t var_20 = 1;
005e12ad          int32_t var_1c_1 = 2;
005e12c3          long double temp2_1 = ((long double)((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x14)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0))) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x28)))));
005e12c3          (x87_r7_9 - temp2_1);
005e12c3          
005e12ca          if ((1 & *(uint8_t*)((char*)((((x87_r7_9 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp2_1) ? 1 : 0) << 0xe) | 0)))))[1]) == 0)
005e12cc              ebx_1 = nullptr;
005e12cc          
005e12ce          long double x87_r7_10 = ((long double)&var_14[ebx_1]);
005e12d2          arg2 = ebx_1;
005e12d5          long double temp3_1 = ((long double)((float)(((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x28)) - (((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x14)) + ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0))))));
005e12d5          (x87_r7_10 - temp3_1);
005e12d5          
005e12dd          if ((*(uint8_t*)((char*)((((x87_r7_10 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_10, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_10 == temp3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 1) != 0)
005e12dd          {
005e12df              ebx_1 = 2;
005e12e1              arg2 = 2;
005e12dd          }
005e12dd          
005e12e6          int32_t edx_2 = (ebx_1 << 2);
005e12ed          int32_t edi_1 = *(uint32_t*)(&var_20 + edx_2);
005e12f7          result = arg1;
005e12fc          float* esi_2 = (edi_1 << 2);
005e1308          long double x87_r7_14 = (sqrtl((((long double)*(uint32_t*)(&var_14 + edx_2)) + ((long double)1f))) * ((long double)0.5f));
005e1310          *(uint32_t*)(edx_2 + result) = ((float)x87_r7_14);
005e1313          x87_r7_6 = (((long double)0.25f) / x87_r7_14);
005e1326          int32_t edi_4 = (*(uint32_t*)(&var_20 + esi_2) << 2);
005e1330          int32_t edi_5 = *(uint32_t*)(&var_20 + esi_2);
005e1334          *(uint32_t*)((char*)esi_2 + result) = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)ebx_1 + esi_2) << 2))) + ((long double)*(uint32_t*)((char*)ecx + ((edi_1 + edx_2) << 2)))) * x87_r7_6));
005e1341          float* edx_4 = edi_4;
005e1349          *(uint32_t*)((char*)edx_4 + result) = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)arg2 + edi_4) << 2))) + ((long double)*(uint32_t*)((char*)ecx + ((edx_2 + edi_5) << 2)))) * x87_r7_6));
005e1359          result->w = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)esi_2 + edi_5) << 2))) - ((long double)*(uint32_t*)((char*)ecx + (((char*)edx_4 + edi_1) << 2)))) * x87_r7_6));
005e124a      }
005e124a      else
005e124a      {
005e1252          result = arg1;
005e1257          long double x87_r7_5 = (sqrtl((x87_r7_2 + ((long double)1f))) * ((long double)0.5f));
005e125f          result->w = ((float)x87_r7_5);
005e1262          x87_r7_6 = (((long double)0.25f) / x87_r7_5);
005e1270          result->x = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x18)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x24))) * x87_r7_6));
005e127a          result->y = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x20)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 8))) * x87_r7_6));
005e1285          result->z = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 4)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x10))) * x87_r7_6));
005e124a      }
005e135f      return result;
005e122c  }


005e1362  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionRotationAxis(struct D3DXQUATERNION* arg1, struct D3DXVECTOR3 const* arg2, float arg3)

005e1362  {
005e1367      int32_t var_8 = 1;
005e1371      int32_t ecx;
005e1371      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005e1382      return data_824250(arg1, arg2, ((float)((long double)arg3)));
005e1362  }


005e1385  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionRotationAxis(struct D3DXQUATERNION* arg1, struct D3DXVECTOR3 const* arg2, float arg3)

005e1385  {
005e1394      float var_18;
005e1394      _D3DXVec3Normalize@8(&var_18, arg2);
005e13b1      struct D3DXVECTOR3 const** var_c = &arg2;
005e13bd      long double st0;
005e13bd      long double st1;
005e13bd      bool c2;
005e13bd      st1 = __fsincos(((long double)((float)(((long double)arg3) * ((long double)0.5f)))));
005e13bf      struct D3DXQUATERNION* ecx;
005e13a5      ecx->w = ((float)st0);
005e13c1      *(uint32_t*)var_c = ((float)st1);
005e13cb      arg1->x = ((float)(((long double)var_18) * ((long double)arg2)));
005e13d3      float var_14;
005e13d3      arg1->y = ((float)(((long double)var_14) * ((long double)arg2)));
005e13dc      float var_10;
005e13dc      arg1->z = ((float)(((long double)var_10) * ((long double)arg2)));
005e13e0      return arg1;
005e1385  }


005e13e3  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionRotationYawPitchRoll(struct D3DXQUATERNION* arg1, float arg2, float arg3, float arg4)

005e13e3  {
005e13e8      int32_t var_8 = 1;
005e13ea      int32_t ecx;
005e13ea      _D3DXCpuOptimizations@4(ecx);
005e1410      return data_824240(arg1, ((float)((long double)arg2)), ((float)((long double)arg3)), ((float)((long double)arg4)));
005e13e3  }


005e1413  int32_t _D3DXQuaternionRotationYawPitchRoll@16()

005e1413  {
005e1413      /* jump -> data_824240 */
005e1413  }


005e1419  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionRotationYawPitchRoll(struct D3DXQUATERNION* arg1, float arg2, float arg3, float arg4)

005e1419  {
005e1442      long double st0;
005e1442      long double st1;
005e1442      bool c2;
005e1442      st1 = __fsincos(((long double)((float)(((long double)arg4) * ((long double)0.5f)))));
005e1444      float var_8 = ((float)st0);
005e1433      arg4 = ((float)st1);
005e1469      long double st0_1;
005e1469      long double st1_1;
005e1469      bool c2_1;
005e1469      st1_1 = __fsincos(((long double)((float)(((long double)arg3) * ((long double)0.5f)))));
005e146b      float var_10 = ((float)st0_1);
005e146d      float var_18 = ((float)st1_1);
005e1490      long double st0_2;
005e1490      long double st1_2;
005e1490      bool c2_2;
005e1490      st1_2 = __fsincos(((long double)((float)(((long double)arg2) * ((long double)0.5f)))));
005e1492      float var_c = ((float)st0_2);
005e1494      float var_14 = ((float)st1_2);
005e149c      long double x87_r7_13 = (((long double)var_14) * ((long double)var_10));
005e14a2      long double x87_r6_4 = (((long double)var_c) * ((long double)var_18));
005e14b1      arg1->x = ((float)((((long double)var_8) * x87_r6_4) + (x87_r7_13 * ((long double)arg4))));
005e14bf      arg1->y = ((float)((x87_r7_13 * ((long double)var_8)) - (x87_r6_4 * ((long double)arg4))));
005e14c9      long double x87_r7_16 = (((long double)var_c) * ((long double)var_10));
005e14cf      long double x87_r6_6 = (((long double)var_14) * ((long double)var_18));
005e14de      arg1->z = ((float)((x87_r7_16 * ((long double)arg4)) - (x87_r6_6 * ((long double)var_8))));
005e14eb      arg1->w = ((float)((x87_r6_6 * ((long double)arg4)) + (x87_r7_16 * ((long double)var_8))));
005e14f1      return arg1;
005e1419  }


005e14f4  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionMultiply(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3)

005e14f4  {
005e14f9      int32_t var_8 = 1;
005e14fb      int32_t ecx;
005e14fb      _D3DXCpuOptimizations@4(ecx);
005e1501      /* jump -> data_824228 */
005e14f4  }


005e1507  int32_t _D3DXQuaternionMultiply@12()

005e1507  {
005e1507      /* jump -> data_824228 */
005e1507  }


005e150d  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionMultiply(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3)

005e150d  {
005e158d      long double x87_r5_4 = ((((((long double)arg3->w) * ((long double)arg2->y)) - (((long double)arg3->x) * ((long double)arg2->z))) + (((long double)arg3->y) * ((long double)arg2->w))) + (((long double)arg3->z) * ((long double)arg2->x)));
005e158f      long double x87_r6_4 = ((((((long double)arg3->w) * ((long double)arg2->z)) + (((long double)arg3->x) * ((long double)arg2->y))) - (((long double)arg3->y) * ((long double)arg2->x))) + (((long double)arg3->z) * ((long double)arg2->w)));
005e1591      long double x87_r7_5 = ((((((long double)arg3->w) * ((long double)arg2->w)) - (((long double)arg3->x) * ((long double)arg2->x))) - (((long double)arg3->y) * ((long double)arg2->y))) - (((long double)arg3->z) * ((long double)arg2->z)));
005e1593      arg1->x = ((float)((((((long double)arg3->w) * ((long double)arg2->x)) + (((long double)arg3->x) * ((long double)arg2->w))) + (((long double)arg3->y) * ((long double)arg2->z))) - (((long double)arg3->z) * ((long double)arg2->y))));
005e1595      arg1->y = ((float)x87_r5_4);
005e1598      arg1->z = ((float)x87_r6_4);
005e159b      arg1->w = ((float)x87_r7_5);
005e15a2      return arg1;
005e150d  }


005e15a5  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionNormalize(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

005e15a5  {
005e15aa      int32_t var_8 = 1;
005e15ac      int32_t ecx;
005e15ac      _D3DXCpuOptimizations@4(ecx);
005e15b2      /* jump -> data_82422c */
005e15a5  }


005e15b8  struct D3DXVECTOR4* __stdcall c_D3DXVec4Normalize(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2)

005e15b8  {
005e15c1      struct D3DXVECTOR4* esi = arg2;
005e15c4      long double x87_r7 = ((long double)esi->w);
005e15c7      int32_t edi;
005e15c7      int32_t var_1c = edi;
005e15c8      long double x87_r6 = ((long double)esi->z);
005e15cb      int32_t ecx;
005e15cb      int32_t var_20 = ecx;
005e15cc      long double x87_r5 = ((long double)esi->y);
005e15cf      int32_t var_24 = ecx;
005e15d0      long double x87_r4 = ((long double)esi->x);
005e15e8      arg2 = ((float)((((x87_r4 * x87_r4) + (x87_r5 * x87_r5)) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7)));
005e15ff      int32_t eax;
005e15ff      int80_t st0;
005e15ff      st0 = sub_5df170(((float)((long double)arg2)), ((float)((long double)1)));
005e1606      struct D3DXVECTOR4* result;
005e1606      
005e1606      if (eax == 0)
005e1606      {
005e1617          long double x87_r7_4 = ((long double)arg2);
005e161a          long double temp1_1 = ((long double)1.17549435e-38f);
005e161a          (x87_r7_4 - temp1_1);
005e1620          eax = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005e1625          result = arg1;
005e1625          
005e1628          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005e1628          {
005e1659              result->x = ((float)((long double)0));
005e165d              result->y = ((float)((long double)0));
005e1662              result->z = ((float)((long double)0));
005e1667              result->w = ((float)((long double)0));
005e1628          }
005e1628          else
005e1628          {
005e162f              long double x87_r7_7 = (((long double)1f) / sqrtl(((long double)arg2)));
005e1639              float var_14 = ((float)(x87_r7_7 * ((long double)esi->x)));
005e1641              float var_10_1 = ((float)(x87_r7_7 * ((long double)esi->y)));
005e1649              float var_c_1 = ((float)(x87_r7_7 * ((long double)esi->z)));
005e164c              long double x87_r7_8 = (x87_r7_7 * ((long double)esi->w));
005e164f              esi = &var_14;
005e1652              float var_8_1 = ((float)x87_r7_8);
005e1611          label_5e1611:
005e1611              result->x = esi->x;
005e1611              float* edi_2 = &result->y;
005e1611              float* esi_1 = &esi->y;
005e1615              ADJ(edi_2)->y = ADJ(esi_1)->y;
005e1612              float* edi_3 = &edi_2[1];
005e1612              float* esi_2 = &esi_1[1];
005e1615              ADJ(edi_3)->z = ADJ(esi_2)->z;
005e1615              (&edi_3[1] - 0xc)->w = esi_2[1];
005e1628          }
005e1606      }
005e1606      else
005e1606      {
005e1608          result = arg1;
005e1608          
005e160d          if (result != esi)
005e160d              goto label_5e1611;
005e1606      }
005e1606      
005e166d      return result;
005e15b8  }


005e1670  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionInverse(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

005e1670  {
005e1675      int32_t var_8 = 1;
005e1677      int32_t ecx;
005e1677      _D3DXCpuOptimizations@4(ecx);
005e167d      /* jump -> data_82428c */
005e1670  }


005e1683  int32_t _D3DXQuaternionInverse@8()

005e1683  {
005e1683      /* jump -> data_82428c */
005e1683  }


005e1689  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionInverse(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

005e1689  {
005e168e      struct D3DXQUATERNION* edx = arg2;
005e1691      long double x87_r7 = ((long double)edx->w);
005e1697      long double x87_r6 = ((long double)edx->z);
005e169a      long double x87_r5 = ((long double)edx->y);
005e169d      long double x87_r4 = ((long double)edx->x);
005e16b5      arg2 = ((float)((((x87_r4 * x87_r4) + (x87_r5 * x87_r5)) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7)));
005e16c0      long double x87_r7_2 = ((long double)arg2);
005e16c3      long double temp1 = ((long double)1.08420217e-19f);
005e16c3      (x87_r7_2 - temp1);
005e16c3      
005e16ce      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
005e16ce      {
005e1725          arg1->x = ((float)((long double)0));
005e1729          arg1->y = ((float)((long double)0));
005e172e          arg1->z = ((float)((long double)0));
005e1733          arg1->w = ((float)((long double)0));
005e16ce      }
005e16ce      else
005e16ce      {
005e16d2          struct D3DXQUATERNION* var_8_1 = arg1;
005e16d5          struct D3DXQUATERNION* var_c_1 = arg1;
005e16d6          arg1->x = ((float)-(((long double)edx->x)));
005e16dd          arg1->y = ((float)-(((long double)edx->y)));
005e16e5          arg1->z = ((float)-(((long double)edx->z)));
005e16ed          arg1->w = edx->w;
005e16fa          int32_t eax_2;
005e16fa          int80_t st0_1;
005e16fa          st0_1 = sub_5df170(((float)((long double)arg2)), ((float)((long double)1)));
005e16fa          
005e1701          if (eax_2 == 0)
005e1701          {
005e1705              long double x87_r7_12 = (((long double)1) / ((long double)arg2));
005e170c              arg1->x = ((float)(x87_r7_12 * ((long double)arg1->x)));
005e1713              arg1->y = ((float)(x87_r7_12 * ((long double)arg1->y)));
005e171b              arg1->z = ((float)(x87_r7_12 * ((long double)arg1->z)));
005e1733              arg1->w = ((float)(x87_r7_12 * ((long double)arg1->w)));
005e1701          }
005e16ce      }
005e16ce      
005e1739      return arg1;
005e1689  }


005e173c  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionLn(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

005e173c  {
005e1741      int32_t var_8 = 1;
005e1743      int32_t ecx;
005e1743      _D3DXCpuOptimizations@4(ecx);
005e1749      /* jump -> data_8242b8 */
005e173c  }


005e174f  int32_t _D3DXQuaternionLn@8()

005e174f  {
005e174f      /* jump -> data_8242b8 */
005e174f  }


005e1755  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionLn(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

005e1755  {
005e175a      int32_t ecx;
005e175a      int32_t var_8 = ecx;
005e175f      long double x87_r7 = ((long double)arg2->w);
005e1762      long double temp1 = ((long double)1f);
005e1762      (x87_r7 - temp1);
005e1768      int32_t eax;
005e1768      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0))));
005e176a      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005e176d      struct D3DXQUATERNION* result;
005e176d      
005e176d      if (p)
005e176d      {
005e17b5          result = arg1;
005e17ba      label_5e17ba:
005e17ba          result->x = ((float)((long double)arg2->x));
005e17bf          result->y = arg2->y;
005e17c5          result->z = arg2->z;
005e176d      }
005e176d      else
005e176d      {
005e176f          long double x87_r7_1 = ((long double)arg2->w);
005e1772          int32_t ecx_1 = j__CIacos();
005e177a          long double st0_1;
005e177a          bool c2_1;
005e177a          st0_1 = __fsin(x87_r7_1);
005e177c          int32_t var_10_1 = ecx_1;
005e177d          int32_t var_14_1 = ecx_1;
005e177e          float var_8_1 = ((float)st0_1);
005e178d          int32_t eax_1;
005e178d          int80_t st0_2;
005e178d          st0_2 = sub_5df170(((float)((long double)var_8_1)), ((float)((long double)0)));
005e1794          result = arg1;
005e1794          
005e1797          if (eax_1 != 0)
005e1797              goto label_5e17ba;
005e1797          
005e179c          long double x87_r7_6 = (((long double)((float)x87_r7_1)) / ((long double)var_8_1));
005e17a3          result->x = ((float)(x87_r7_6 * ((long double)arg2->x)));
005e17aa          result->y = ((float)(x87_r7_6 * ((long double)arg2->y)));
005e17b0          result->z = ((float)(x87_r7_6 * ((long double)arg2->z)));
005e176d      }
005e176d      
005e17cb      result->w = ((float)((long double)0));
005e17cf      return result;
005e1755  }


005e17d2  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionExp(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

005e17d2  {
005e17d7      int32_t var_8 = 1;
005e17d9      int32_t ecx;
005e17d9      _D3DXCpuOptimizations@4(ecx);
005e17df      /* jump -> data_8242bc */
005e17d2  }


005e17e5  int32_t _D3DXQuaternionExp@8()

005e17e5  {
005e17e5      /* jump -> data_8242bc */
005e17e5  }


005e17eb  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionExp(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

005e17eb  {
005e17f0      int32_t ecx;
005e17f0      int32_t var_8 = ecx;
005e17f1      int32_t var_c = ecx;
005e17f2      struct D3DXQUATERNION* ecx_1 = arg2;
005e17f5      ecx_1->z;
005e17f9      ecx_1->y;
005e1825      float var_8_1 = ((float)((long double)ecx_1->x));
005e1831      long double st0;
005e1831      long double st1;
005e1831      bool c2;
005e1831      st1 = __fsincos(((long double)var_8_1));
005e1801      arg1->w = ((float)st0);
005e1810      arg2 = ((float)st1);
005e1839      struct D3DXQUATERNION* var_14 = ecx_1;
005e183a      struct D3DXQUATERNION* var_18 = ecx_1;
005e1845      int32_t eax_2;
005e1845      int80_t st0_1;
005e1845      st0_1 = sub_5df170(((float)((long double)arg2)), ((float)((long double)0)));
005e1845      
005e184c      if (eax_2 == 0)
005e184c      {
005e1867          long double x87_r7_7 = (((long double)arg2) / ((long double)var_8_1));
005e186e          arg1->x = ((float)(x87_r7_7 * ((long double)ecx_1->x)));
005e1875          arg1->y = ((float)(x87_r7_7 * ((long double)ecx_1->y)));
005e187b          arg1->z = ((float)(x87_r7_7 * ((long double)ecx_1->z)));
005e184c      }
005e184c      else if (arg1 != ecx_1)
005e1850      {
005e1854          arg1->x = ecx_1->x;
005e1859          arg1->y = ecx_1->y;
005e185f          arg1->z = ecx_1->z;
005e1850      }
005e1850      
005e1882      return arg1;
005e17eb  }


005e1885  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionSlerp(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, float arg4)

005e1885  {
005e188a      int32_t var_8 = 1;
005e1894      int32_t ecx;
005e1894      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005e18a8      return data_824268(arg1, arg2, arg3, ((float)((long double)arg4)));
005e1885  }


005e18ab  int32_t _D3DXQuaternionSlerp@16()

005e18ab  {
005e18ab      /* jump -> data_824268 */
005e18ab  }


005e18b1  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionSlerp(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, float arg4)

005e18b1  {
005e18b6      int32_t ecx;
005e18b6      int32_t var_8 = ecx;
005e18b7      struct D3DXQUATERNION* ecx_1 = arg2;
005e18bf      struct D3DXQUATERNION* edx = arg3;
005e18dc      long double x87_r6_4 = ((((((long double)ecx_1->x) * ((long double)edx->x)) + (((long double)edx->z) * ((long double)ecx_1->z))) + (((long double)edx->y) * ((long double)ecx_1->y))) + (((long double)edx->w) * ((long double)ecx_1->w)));
005e18de      long double temp1 = ((long double)0f);
005e18de      (x87_r6_4 - temp1);
005e18de      
005e18e9      if ((*(uint8_t*)((char*)((((x87_r6_4 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, temp1))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == temp1) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 1) != 0)
005e18f2          arg2 = 0xbf800000;
005e18e9      else
005e18ed          arg2 = ((float)((long double)1));
005e18ed      
005e1905      long double x87_r5_10 = (((long double)1) - x87_r6_4);
005e1907      long double temp2 = ((long double)1.1920929e-07f);
005e1907      (x87_r5_10 - temp2);
005e1912      long double x87_r6_11;
005e1912      long double x87_r7_5;
005e1912      
005e1912      if ((*(uint8_t*)((char*)((((x87_r5_10 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_10, temp2))) ? 1 : 0) << 0xa) | ((((x87_r5_10 == temp2) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) != 0)
005e1912      {
005e194e          x87_r7_5 = x87_r6_4;
005e1950          x87_r6_11 = ((long double)arg4);
005e1912      }
005e1912      else
005e1912      {
005e1929          arg3 = ((float)__fpatan(((long double)((float)(((long double)arg2) * x87_r6_4))), x87_r6_4));
005e1930          float var_8_1 = ((float)(((long double)1) / x87_r6_4));
005e193a          long double st0_1;
005e193a          bool c2_2;
005e193a          st0_1 = __fsin((((long double)arg3) * x87_r6_4));
005e193e          x87_r7_5 = (x87_r6_4 * ((long double)var_8_1));
005e1947          long double st0_2;
005e1947          bool c2_3;
005e1947          st0_2 = __fsin((((long double)arg3) * ((long double)arg4)));
005e1949          x87_r6_11 = (st0_2 * ((long double)var_8_1));
005e1912      }
005e1912      
005e1953      long double x87_r6_12 = (x87_r6_11 * ((long double)arg2));
005e1963      arg1->x = ((float)((x87_r7_5 * ((long double)ecx_1->x)) + (x87_r6_12 * ((long double)edx->x))));
005e1971      arg1->y = ((float)((x87_r6_12 * ((long double)edx->y)) + (x87_r7_5 * ((long double)ecx_1->y))));
005e1980      arg1->z = ((float)((x87_r6_12 * ((long double)edx->z)) + (x87_r7_5 * ((long double)ecx_1->z))));
005e198d      arg1->w = ((float)((x87_r6_12 * ((long double)edx->w)) + (x87_r7_5 * ((long double)ecx_1->w))));
005e1993      return arg1;
005e18b1  }


005e1996  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionSquad(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXQUATERNION const* arg4, struct D3DXQUATERNION const* arg5, float arg6)

005e1996  {
005e199b      int32_t var_8 = 1;
005e19a5      int32_t ecx;
005e19a5      int32_t var_8_1 = _D3DXCpuOptimizations@4(ecx);
005e19bf      return data_824288(arg1, arg2, arg3, arg4, arg5, ((float)((long double)arg6)));
005e1996  }


005e19c2  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionSquad(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXQUATERNION const* arg4, struct D3DXQUATERNION const* arg5, float arg6)

005e19c2  {
005e19cd      int32_t ecx;
005e19cd      int32_t var_28 = ecx;
005e19e3      void var_24;
005e19e3      int32_t var_28_2 = _D3DXQuaternionSlerp@16(&var_24, arg2, arg5, ((float)((long double)arg6)));
005e19fb      void var_14;
005e19fb      int32_t var_28_4 = _D3DXQuaternionSlerp@16(&var_14, arg3, arg4, ((float)((long double)arg6)));
005e19ff      long double x87_r7_4 = ((((long double)1) - ((long double)arg6)) * ((long double)arg6));
005e1a0f      _D3DXQuaternionSlerp@16(arg1, &var_24, &var_14, ((float)(x87_r7_4 + x87_r7_4)));
005e1a18      return arg1;
005e19c2  }


005e1a1b  void __stdcall init_D3DXQuaternionSquadSetup(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION* arg2, struct D3DXQUATERNION* arg3, struct D3DXQUATERNION const* arg4, struct D3DXQUATERNION const* arg5, struct D3DXQUATERNION const* arg6, struct D3DXQUATERNION const* arg7)

005e1a1b  {
005e1a20      int32_t var_8 = 1;
005e1a22      int32_t ecx;
005e1a22      _D3DXCpuOptimizations@4(ecx);
005e1a28      /* jump -> data_824290 */
005e1a1b  }


005e1a2e  struct D3DXQUATERNION* __stdcall init_D3DXQuaternionBaryCentric(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXQUATERNION const* arg4, float arg5, float arg6)

005e1a2e  {
005e1a33      int32_t var_8 = 1;
005e1a35      int32_t ecx;
005e1a35      int32_t ecx_1 = _D3DXCpuOptimizations@4(ecx);
005e1a3d      int32_t var_8_1 = ecx_1;
005e1a3e      int32_t var_c = ecx_1;
005e1a5c      return data_82426c(arg1, arg2, arg3, arg4, ((float)((long double)arg5)), ((float)((long double)arg6)));
005e1a2e  }


005e1a5f  struct D3DXQUATERNION* __stdcall c_D3DXQuaternionBaryCentric(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXQUATERNION const* arg4, float arg5, float arg6)

005e1a5f  {
005e1a6e      int32_t ecx;
005e1a6e      int32_t var_2c = ecx;
005e1a6f      int32_t var_30 = ecx;
005e1a70      arg5 = ((float)(((long double)arg5) + ((long double)arg6)));
005e1a7f      int32_t eax;
005e1a7f      int80_t st0;
005e1a7f      st0 = sub_5df170(((float)((long double)arg5)), ((float)((long double)0)));
005e1a7f      
005e1a86      if (eax == 0)
005e1a86      {
005e1a9e          int32_t var_2c_3 = ecx;
005e1ab4          void var_24;
005e1ab4          int32_t var_2c_5 = _D3DXQuaternionSlerp@16(&var_24, arg2, arg3, ((float)((long double)arg5)));
005e1acd          void var_14;
005e1acd          int32_t var_2c_7 = _D3DXQuaternionSlerp@16(&var_14, arg2, arg4, ((float)((long double)arg5)));
005e1adc          _D3DXQuaternionSlerp@16(arg1, &var_24, &var_14, ((float)(((long double)arg6) / ((long double)arg5))));
005e1a86      }
005e1a86      else if (arg1 != arg2)
005e1a8e      {
005e1a90          int32_t edi;
005e1a90          int32_t var_2c_2 = edi;
005e1a94          arg1->x = arg2->x;
005e1a94          float* edi_2 = &arg1->y;
005e1a94          float* esi_2 = &arg2->y;
005e1a98          ADJ(edi_2)->y = ADJ(esi_2)->y;
005e1a95          float* edi_3 = &edi_2[1];
005e1a95          float* esi_3 = &esi_2[1];
005e1a98          ADJ(edi_3)->z = ADJ(esi_3)->z;
005e1a98          (&edi_3[1] - 0xc)->w = (&esi_3[1] - 0xc)->w;
005e1a8e      }
005e1a8e      
005e1ae6      return arg1;
005e1a5f  }


005e1ae9  struct D3DXPLANE* __stdcall init_D3DXPlaneNormalize(struct D3DXPLANE* arg1, struct D3DXPLANE const* arg2)

005e1ae9  {
005e1aee      int32_t var_8 = 1;
005e1af0      int32_t ecx;
005e1af0      _D3DXCpuOptimizations@4(ecx);
005e1af6      /* jump -> data_824230 */
005e1ae9  }


005e1afc  int32_t _D3DXPlaneNormalize@8()

005e1afc  {
005e1afc      /* jump -> data_824230 */
005e1afc  }


005e1b02  struct D3DXPLANE* __stdcall c_D3DXPlaneNormalize(struct D3DXPLANE* arg1, struct D3DXPLANE const* arg2)

005e1b02  {
005e1b08      struct D3DXPLANE* esi = arg2;
005e1b0b      long double x87_r7 = ((long double)esi->c);
005e1b0e      int32_t ecx;
005e1b0e      int32_t var_c = ecx;
005e1b0f      long double x87_r6 = ((long double)esi->b);
005e1b12      int32_t var_10 = ecx;
005e1b13      long double x87_r5 = ((long double)esi->a);
005e1b25      arg2 = ((float)(((x87_r5 * x87_r5) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7)));
005e1b3a      int32_t eax;
005e1b3a      int80_t st0;
005e1b3a      st0 = sub_5df170(((float)((long double)arg2)), ((float)((long double)1)));
005e1b41      struct D3DXPLANE* result;
005e1b41      
005e1b41      if (eax == 0)
005e1b41      {
005e1b54          long double x87_r7_4 = ((long double)arg2);
005e1b57          long double temp1_1 = ((long double)1.17549435e-38f);
005e1b57          (x87_r7_4 - temp1_1);
005e1b5d          eax = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005e1b62          result = arg1;
005e1b65          long double x87_r7_8;
005e1b65          
005e1b65          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005e1b65          {
005e1b8f              result->a = ((float)((long double)0));
005e1b93              result->b = ((float)((long double)0));
005e1b98              result->c = ((float)((long double)0));
005e1b9b              x87_r7_8 = ((long double)0);
005e1b65          }
005e1b65          else
005e1b65          {
005e1b6c              long double x87_r7_7 = (((long double)1f) / sqrtl(((long double)arg2)));
005e1b76              result->a = ((float)(x87_r7_7 * ((long double)esi->a)));
005e1b7d              result->b = ((float)(x87_r7_7 * ((long double)esi->b)));
005e1b85              result->c = ((float)(x87_r7_7 * ((long double)esi->c)));
005e1b88              x87_r7_8 = (x87_r7_7 * ((long double)esi->d));
005e1b65          }
005e1b65          
005e1b9d          result->d = ((float)x87_r7_8);
005e1b41      }
005e1b41      else
005e1b41      {
005e1b43          result = arg1;
005e1b43          
005e1b48          if (result != esi)
005e1b48          {
005e1b4a              int32_t edi;
005e1b4a              int32_t var_c_2 = edi;
005e1b4d              result->a = esi->a;
005e1b4d              float* edi_2 = &result->b;
005e1b4d              float* esi_1 = &esi->b;
005e1b51              ADJ(edi_2)->b = ADJ(esi_1)->b;
005e1b4e              float* edi_3 = &edi_2[1];
005e1b4e              float* esi_2 = &esi_1[1];
005e1b51              ADJ(edi_3)->c = ADJ(esi_2)->c;
005e1b51              (&edi_3[1] - 0xc)->d = esi_2[1];
005e1b48          }
005e1b41      }
005e1b41      
005e1ba2      return result;
005e1b02  }


005e1ba5  struct D3DXVECTOR3* __stdcall init_D3DXPlaneIntersectLine(struct D3DXVECTOR3* arg1, struct D3DXPLANE const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

005e1ba5  {
005e1baa      int32_t var_8 = 1;
005e1bac      int32_t ecx;
005e1bac      _D3DXCpuOptimizations@4(ecx);
005e1bb2      /* jump -> data_824234 */
005e1ba5  }


005e1bb8  struct D3DXVECTOR3* __stdcall c_D3DXPlaneIntersectLine(struct D3DXVECTOR3* arg1, struct D3DXPLANE const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

005e1bb8  {
005e1bc3      float* esi = arg3;
005e1bc6      long double x87_r7_1 = (((long double)arg2->a) * ((long double)*(uint32_t*)esi));
005e1bc8      int32_t edi;
005e1bc8      int32_t var_c = edi;
005e1bf0      long double x87_r6_4 = ((((((long double)arg2->b) * ((long double)esi[1])) + (((long double)esi[2]) * ((long double)arg2->c))) + x87_r7_1) - (((((long double)arg2->a) * ((long double)arg4->x)) + (((long double)arg4->z) * ((long double)arg2->c))) + (((long double)arg2->b) * ((long double)arg4->y))));
005e1bf2      long double x87_r5_6 = ((long double)0f);
005e1bfa      (x87_r6_4 - x87_r5_6);
005e1bfc      int32_t eax;
005e1bfc      eax = ((((x87_r6_4 < x87_r5_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r5_6))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r5_6) ? 1 : 0) << 0xe) | 0x3000))));
005e1bfe      bool p = /* bool p = unimplemented  {test ah, 0x44} */;
005e1bfe      
005e1c01      if (p)
005e1c01      {
005e1c0c          struct D3DXPLANE* var_10_1 = arg2;
005e1c10          struct D3DXPLANE* var_14_1 = arg2;
005e1c20          arg2 = ((float)(((((((long double)arg2->b) * ((long double)esi[1])) + (((long double)esi[2]) * ((long double)arg2->c))) + ((long double)arg2->d)) + x87_r7_1) / x87_r6_4));
005e1c2a          var_14_1 = ((double)((long double)arg2));
005e1c2a          
005e1c36          if (j__finite(var_14_1, var_10_1) != 0)
005e1c36          {
005e1c48              arg1->x = ((float)(((((long double)arg4->x) - ((long double)*(uint32_t*)esi)) * ((long double)arg2)) + ((long double)*(uint32_t*)esi)));
005e1c56              arg1->y = ((float)(((((long double)arg4->y) - ((long double)esi[1])) * ((long double)arg2)) + ((long double)esi[1])));
005e1c65              arg1->z = ((float)(((((long double)arg4->z) - ((long double)esi[2])) * ((long double)arg2)) + ((long double)esi[2])));
005e1c6b              return arg1;
005e1c36          }
005e1c01      }
005e1c01      
005e1c38      return nullptr;
005e1bb8  }


005e1c6e  struct D3DXPLANE* __stdcall init_D3DXPlaneFromPointNormal(struct D3DXPLANE* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3)

005e1c6e  {
005e1c73      int32_t var_8 = 1;
005e1c75      int32_t ecx;
005e1c75      _D3DXCpuOptimizations@4(ecx);
005e1c7b      /* jump -> data_82420c */
005e1c6e  }


005e1c81  struct D3DXPLANE* __stdcall c_D3DXPlaneFromPointNormal(struct D3DXPLANE* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3)

005e1c81  {
005e1c8b      float* result = arg1;
005e1c8e      *(uint32_t*)result = ((float)((long double)arg3->x));
005e1c93      result[1] = arg3->y;
005e1c99      result[2] = arg3->z;
005e1cb5      result[3] = ((float)-((((((long double)arg2->y) * ((long double)arg3->y)) + (((long double)arg2->z) * ((long double)arg3->z))) + (((long double)arg2->x) * ((long double)arg3->x)))));
005e1cb9      return result;
005e1c81  }


005e1cbc  struct D3DXPLANE* __stdcall init_D3DXPlaneFromPoints(struct D3DXPLANE* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

005e1cbc  {
005e1cc1      int32_t var_8 = 1;
005e1cc3      int32_t ecx;
005e1cc3      _D3DXCpuOptimizations@4(ecx);
005e1cc9      /* jump -> data_824210 */
005e1cbc  }


005e1ccf  struct D3DXPLANE* __stdcall c_D3DXPlaneFromPoints(struct D3DXPLANE* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

005e1ccf  {
005e1ce1      long double x87_r7_1 = (((long double)arg2->x) - ((long double)arg3->x));
005e1ce3      int32_t edi;
005e1ce3      int32_t var_28 = edi;
005e1cf6      long double x87_r5_1 = (((long double)arg2->z) - ((long double)arg3->z));
005e1d03      float var_10 = ((float)(((long double)arg2->x) - ((long double)arg4->x)));
005e1d0c      float var_c = ((float)(((long double)arg2->y) - ((long double)arg4->y)));
005e1d12      long double x87_r4_5 = (((long double)arg2->z) - ((long double)arg4->z));
005e1d20      float var_1c = ((float)((x87_r4_5 * (((long double)arg2->y) - ((long double)arg3->y))) - (((long double)var_c) * x87_r5_1)));
005e1d2e      float var_18 = ((float)((x87_r5_1 * ((long double)var_10)) - (x87_r4_5 * x87_r7_1)));
005e1d41      float var_14 = ((float)((((long double)var_c) * x87_r7_1) - (((long double)var_10) * x87_r4_5)));
005e1d44      arg1->a = var_1c;
005e1d44      float* edi_2 = &arg1->b;
005e1d44      float* esi = &var_18;
005e1d4b      ADJ(edi_2)->b = *(uint32_t*)esi;
005e1d4b      (&edi_2[1] - 8)->c = esi[1];
005e1d4b      _D3DXVec3Normalize@8(arg1, arg1);
005e1d6c      arg1->d = ((float)-((((((long double)arg1->b) * ((long double)arg2->y)) + (((long double)arg1->c) * ((long double)arg2->z))) + (((long double)arg1->a) * ((long double)arg2->x)))));
005e1d70      return arg1;
005e1ccf  }


005e1d73  struct D3DXPLANE* __stdcall init_D3DXPlaneTransform(struct D3DXPLANE* arg1, struct D3DXPLANE const* arg2, struct D3DXMATRIX const* arg3)

005e1d73  {
005e1d78      int32_t var_8 = 1;
005e1d7a      int32_t ecx;
005e1d7a      _D3DXCpuOptimizations@4(ecx);
005e1d80      /* jump -> data_824264 */
005e1d73  }


005e1d86  struct D3DXPLANE* __stdcall c_D3DXPlaneTransform(struct D3DXPLANE* arg1, struct D3DXPLANE const* arg2, struct D3DXMATRIX const* arg3)

005e1d86  {
005e1d9e      int32_t edi;
005e1d9e      int32_t var_1c = edi;
005e1db3      long double x87_r7_4 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)) * ((long double)arg2->c)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30)) * ((long double)arg2->d))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)arg2->b))) + (((long double)arg2->a) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))));
005e1dd3      long double x87_r7_9 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)) * ((long double)arg2->c)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)arg2->a))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)) * ((long double)arg2->d))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)arg2->b)));
005e1dd5      float var_10 = ((float)x87_r7_9);
005e1df3      long double x87_r7_14 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)) * ((long double)arg2->c)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)arg2->a))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)) * ((long double)arg2->d))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)arg2->b)));
005e1df5      float var_c = ((float)x87_r7_14);
005e1e16      float* edi_1 = arg1;
005e1e18      long double x87_r7_19 = ((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)) * ((long double)arg2->c)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc)) * ((long double)arg2->a))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)) * ((long double)arg2->d))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)) * ((long double)arg2->b)));
005e1e1a      float var_8 = ((float)x87_r7_19);
005e1e1d      *(uint32_t*)edi_1 = ((float)x87_r7_4);
005e1e1d      void* edi_2 = &edi_1[1];
005e1e1d      float* esi = &var_10;
005e1e1e      *(uint32_t*)edi_2 = *(uint32_t*)esi;
005e1e1e      void* edi_3 = ((char*)edi_2 + 4);
005e1e1e      void* esi_1 = &esi[1];
005e1e1f      *(uint32_t*)edi_3 = *(uint32_t*)esi_1;
005e1e20      *(uint32_t*)((char*)edi_3 + 4) = *(uint32_t*)((char*)esi_1 + 4);
005e1e24      return arg1;
005e1d86  }


005e1e27  struct D3DXPLANE* __stdcall init_D3DXPlaneTransformArray(struct D3DXPLANE* arg1, uint32_t arg2, struct D3DXPLANE const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005e1e27  {
005e1e2c      int32_t var_8 = 1;
005e1e2e      int32_t ecx;
005e1e2e      _D3DXCpuOptimizations@4(ecx);
005e1e34      /* jump -> data_8242ec */
005e1e27  }


005e1e3a  struct D3DXPLANE* __stdcall c_D3DXPlaneTransformArray(struct D3DXPLANE* arg1, uint32_t arg2, struct D3DXPLANE const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005e1e3a  {
005e1e42      uint32_t i_1 = arg6;
005e1e48      struct D3DXPLANE* ebx = arg1;
005e1e4b      arg1 = ebx;
005e1e4b      
005e1e4e      if (i_1 > 0)
005e1e4e      {
005e1e57          struct D3DXPLANE* ecx_1 = arg3;
005e1e5b          int32_t edi;
005e1e5b          int32_t var_20_1 = edi;
005e1eeb          uint32_t i;
005e1eeb          
005e1eeb          do
005e1eeb          {
005e1e5f              struct D3DXPLANE* edi_1 = ebx;
005e1e64              ebx += arg2;
005e1e7e              long double x87_r7_5 = ((((((long double)ecx_1->b) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x10))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x30)) * ((long double)ecx_1->d))) + (((long double)ecx_1->c) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x20)))) + (((long double)ecx_1->a) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0))));
005e1e9e              long double x87_r7_10 = ((((((long double)ecx_1->c) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x24))) + (((long double)ecx_1->a) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 4)))) + (((long double)ecx_1->b) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x14)))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x34)) * ((long double)ecx_1->d)));
005e1ea0              float var_10 = ((float)x87_r7_10);
005e1ebe              long double x87_r7_15 = ((((((long double)ecx_1->d) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x38))) + (((long double)ecx_1->b) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x18)))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 8)) * ((long double)ecx_1->a))) + (((long double)ecx_1->c) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x28))));
005e1ec0              float var_c_1 = ((float)x87_r7_15);
005e1ed6              long double x87_r7_19 = (((((long double)ecx_1->c) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x2c))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0xc)) * ((long double)ecx_1->a))) + (((long double)ecx_1->b) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x1c))));
005e1ed8              long double x87_r6_23 = ((long double)ecx_1->d);
005e1edb              ecx_1 += arg4;
005e1ede              i = i_1;
005e1ede              i_1 -= 1;
005e1ee4              float var_8_1 = ((float)(x87_r7_19 + (x87_r6_23 * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x3c)))));
005e1ee7              edi_1->a = ((float)x87_r7_5);
005e1ee7              float* edi_2 = &edi_1->b;
005e1ee7              float* esi_1 = &var_10;
005e1ef1              ADJ(edi_2)->b = *(uint32_t*)esi_1;
005e1ee8              int32_t* edi_3 = &edi_2[1];
005e1ee8              void* esi_2 = &esi_1[1];
005e1ee9              *(uint32_t*)edi_3 = *(uint32_t*)esi_2;
005e1ee9              edi_3[1] = *(uint32_t*)((char*)esi_2 + 4);
005e1eeb          } while (i != 1);
005e1e4e      }
005e1e4e      
005e1ef8      return arg1;
005e1e3a  }


005e1efb  void __stdcall init_D3DXPSGPUpdateSkinnedMesh(struct D3DXMATRIX const* arg1, struct D3DXMATRIX const* arg2, uint8_t* arg3, uint8_t* arg4, unsigned long arg5, unsigned long arg6, uint8_t** arg7, uint8_t** arg8, uint8_t* arg9, unsigned long arg10, float* arg11)

005e1efb  {
005e1f00      int32_t var_8 = 1;
005e1f02      int32_t ecx;
005e1f02      _D3DXCpuOptimizations@4(ecx);
005e1f08      /* jump -> data_8242f0 */
005e1efb  }


005e1f0e  void __stdcall init_D3DXPSGPTessellateNPatch(struct D3DXVECTOR3* arg1, struct D3DXVECTOR2* arg2, unsigned long arg3, float* arg4, float* arg5, float* arg6, float* arg7, unsigned long arg8)

005e1f0e  {
005e1f13      int32_t var_8 = 1;
005e1f15      int32_t ecx;
005e1f15      _D3DXCpuOptimizations@4(ecx);
005e1f1b      /* jump -> data_8242f4 */
005e1f0e  }


005e1f21  struct D3DXVECTOR2* __stdcall c_D3DXVec2Normalize(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2)

005e1f21  {
005e1f26      int32_t ecx;
005e1f26      int32_t var_8 = ecx;
005e1f27      int32_t var_c = ecx;
005e1f28      struct D3DXVECTOR2* ecx_1 = arg2;
005e1f2b      long double x87_r7 = ((long double)ecx_1->y);
005e1f2e      struct D3DXVECTOR2* var_10 = ecx_1;
005e1f2f      long double x87_r6 = ((long double)ecx_1->x);
005e1f31      struct D3DXVECTOR2* var_14 = ecx_1;
005e1f3c      arg2 = ((float)((x87_r6 * x87_r6) + (x87_r7 * x87_r7)));
005e1f4f      int32_t eax;
005e1f4f      int80_t st0;
005e1f4f      st0 = sub_5df170(((float)((long double)arg2)), ((float)((long double)1)));
005e1f56      struct D3DXVECTOR2* result;
005e1f56      
005e1f56      if (eax == 0)
005e1f56      {
005e1f6b          long double x87_r7_4 = ((long double)arg2);
005e1f6e          long double temp1_1 = ((long double)1.17549435e-38f);
005e1f6e          (x87_r7_4 - temp1_1);
005e1f74          eax = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005e1f79          result = arg1;
005e1f79          
005e1f7c          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005e1f7c          {
005e1fa2              result->x = ((float)((long double)0));
005e1fa6              result->y = ((float)((long double)0));
005e1f7c          }
005e1f7c          else
005e1f7c          {
005e1f83              long double x87_r7_7 = (((long double)1f) / sqrtl(((long double)arg2)));
005e1f90              long double x87_r7_8 = (x87_r7_7 * ((long double)ecx_1->y));
005e1f96              result->x = ((float)(x87_r7_7 * ((long double)ecx_1->x)));
005e1f66              result->y = ((float)x87_r7_8);
005e1f7c          }
005e1f56      }
005e1f56      else
005e1f56      {
005e1f58          result = arg1;
005e1f58          
005e1f5d          if (result != ecx_1)
005e1f5d          {
005e1f61              result->x = ecx_1->x;
005e1f66              result->y = ecx_1->y;
005e1f5d          }
005e1f56      }
005e1f56      
005e1faa      return result;
005e1f21  }


005e1fad  struct D3DXVECTOR4* __stdcall c_D3DXVec2Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

005e1fad  {
005e1fc4      int32_t edi;
005e1fc4      int32_t var_1c = edi;
005e1fcf      float var_14 = ((float)(((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)arg2->y)) + (((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))));
005e1fe2      float var_10 = ((float)(((((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)arg2->x)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)arg2->y))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34))));
005e1ff5      float var_c = ((float)(((((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)arg2->x)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)arg2->y))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38))));
005e200b      float* edi_1 = arg1;
005e200d      float var_8 = ((float)(((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc)) * ((long double)arg2->x)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)) * ((long double)arg2->y))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c))));
005e2010      *(uint32_t*)edi_1 = var_14;
005e2010      void* edi_2 = &edi_1[1];
005e2010      float* esi = &var_10;
005e2011      *(uint32_t*)edi_2 = *(uint32_t*)esi;
005e2011      void* edi_3 = ((char*)edi_2 + 4);
005e2011      void* esi_1 = &esi[1];
005e2012      *(uint32_t*)edi_3 = *(uint32_t*)esi_1;
005e2013      *(uint32_t*)((char*)edi_3 + 4) = *(uint32_t*)((char*)esi_1 + 4);
005e2017      return arg1;
005e1fad  }


005e201a  struct D3DXVECTOR4* __stdcall c_D3DXVec2TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005e201a  {
005e2022      uint32_t i_1 = arg6;
005e2028      struct D3DXVECTOR4* ebx = arg1;
005e202b      arg1 = ebx;
005e202b      
005e202e      if (i_1 > 0)
005e202e      {
005e2033          struct D3DXVECTOR2* edx_1 = arg3;
005e2037          int32_t edi;
005e2037          int32_t var_20_1 = edi;
005e2093          uint32_t i;
005e2093          
005e2093          do
005e2093          {
005e203b              struct D3DXVECTOR4* edi_1 = ebx;
005e2040              ebx += arg2;
005e204f              float var_14_1 = ((float)(((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x10)) * ((long double)edx_1->y)) + (((long double)edx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0)))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x30))));
005e2062              float var_10 = ((float)(((((long double)*(uint32_t*)((char*)arg5->__inner0 + 4)) * ((long double)edx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x14)) * ((long double)edx_1->y))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x34))));
005e2075              float var_c_1 = ((float)(((((long double)*(uint32_t*)((char*)arg5->__inner0 + 8)) * ((long double)edx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x18)) * ((long double)edx_1->y))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x38))));
005e207a              long double x87_r7_14 = (((long double)edx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0xc)));
005e207d              long double x87_r6_7 = ((long double)edx_1->y);
005e2080              edx_1 += arg4;
005e2083              i = i_1;
005e2083              i_1 -= 1;
005e208c              float var_8_1 = ((float)((x87_r7_14 + (x87_r6_7 * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x1c)))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x3c))));
005e208f              edi_1->x = var_14_1;
005e208f              float* edi_2 = &edi_1->y;
005e208f              float* esi_1 = &var_10;
005e2095              ADJ(edi_2)->y = *(uint32_t*)esi_1;
005e2090              float* edi_3 = &edi_2[1];
005e2090              void* esi_2 = &esi_1[1];
005e2095              ADJ(edi_3)->z = *(uint32_t*)esi_2;
005e2091              edi_3[1] = *(uint32_t*)((char*)esi_2 + 4);
005e2093          } while (i != 1);
005e202e      }
005e202e      
005e209c      return arg1;
005e201a  }


005e209f  struct D3DXVECTOR2* __stdcall c_D3DXVec2TransformCoord(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

005e209f  {
005e20a4      int32_t ecx;
005e20a4      int32_t var_8 = ecx;
005e20e0      long double x87_r6_3 = (((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)));
005e20e5      long double x87_r7_4 = (((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)));
005e20e7      arg1->x = ((float)(((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))));
005e20e9      arg1->y = ((float)x87_r6_3);
005e20ec      float var_8_1 = ((float)x87_r7_4);
005e20f1      struct D3DXVECTOR2* var_c = arg1;
005e20f2      struct D3DXVECTOR2* var_10 = arg1;
005e20fd      int32_t eax_1;
005e20fd      int80_t st0;
005e20fd      st0 = sub_5df170(((float)((long double)var_8_1)), ((float)((long double)1)));
005e2104      float* result = arg1;
005e2104      
005e2107      if (eax_1 == 0)
005e2107      {
005e210b          long double x87_r7_8 = (((long double)1) / ((long double)var_8_1));
005e2112          *(uint32_t*)result = ((float)(x87_r7_8 * ((long double)*(uint32_t*)result)));
005e2117          result[1] = ((float)(x87_r7_8 * ((long double)result[1])));
005e2107      }
005e2107      
005e211b      return result;
005e209f  }


005e211e  struct D3DXVECTOR2* __stdcall c_D3DXVec2TransformCoordArray(struct D3DXVECTOR2* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005e211e  {
005e2128      struct D3DXVECTOR2* result_1 = arg1;
005e212b      int32_t edi;
005e212b      int32_t var_20 = edi;
005e212c      uint32_t i_1 = arg6;
005e2131      struct D3DXVECTOR2* result = result_1;
005e2131      
005e2133      if (i_1 > 0)
005e2133      {
005e2138          struct D3DXVECTOR2* edx_1 = arg3;
005e21ad          uint32_t i;
005e21ad          
005e21ad          do
005e21ad          {
005e213e              struct D3DXMATRIX* var_24_1 = arg5;
005e2142              struct D3DXMATRIX* var_28_1 = arg5;
005e2162              float var_10_1 = ((float)(((((long double)*(uint32_t*)((char*)arg5->__inner0 + 4)) * ((long double)edx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x14)) * ((long double)edx_1->y))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x34))));
005e2172              long double x87_r7_12 = (((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0xc)) * ((long double)edx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x1c)) * ((long double)edx_1->y))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x3c)));
005e2175              result_1->x = ((float)(((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x10)) * ((long double)edx_1->y)) + (((long double)edx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0)))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x30))));
005e217a              result_1->y = var_10_1;
005e217d              arg1 = ((float)x87_r7_12);
005e218c              int32_t eax_3;
005e218c              int80_t st0_1;
005e218c              st0_1 = sub_5df170(((float)((long double)arg1)), ((float)((long double)1)));
005e218c              
005e2193              if (eax_3 == 0)
005e2193              {
005e2197                  long double x87_r7_16 = (((long double)1) / ((long double)arg1));
005e219e                  result_1->x = ((float)(x87_r7_16 * ((long double)result_1->x)));
005e21a3                  result_1->y = ((float)(x87_r7_16 * ((long double)result_1->y)));
005e2193              }
005e2193              
005e21a6              edx_1 += arg4;
005e21a9              result_1 += arg2;
005e21ac              i = i_1;
005e21ac              i_1 -= 1;
005e21ad          } while (i != 1);
005e2133      }
005e2133      
005e21b5      return result;
005e211e  }


005e21b8  struct D3DXVECTOR2* __stdcall c_D3DXVec2TransformNormal(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

005e21b8  {
005e21bd      int32_t ecx;
005e21bd      int32_t var_8 = ecx;
005e21be      int32_t var_c = ecx;
005e21d7      long double x87_r7_4 = (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)arg2->x));
005e21df      long double x87_r6_3 = (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)arg2->y));
005e21e2      float* result = arg1;
005e21e5      *(uint32_t*)result = ((float)((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)arg2->y)) + (((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))));
005e21ef      result[1] = ((float)(x87_r7_4 + x87_r6_3));
005e21f3      return result;
005e21b8  }


005e21f6  struct D3DXVECTOR2* __stdcall c_D3DXVec2TransformNormalArray(struct D3DXVECTOR2* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005e21f6  {
005e21fb      int32_t ecx;
005e21fb      int32_t var_8 = ecx;
005e21fc      int32_t var_c = ecx;
005e21fe      struct D3DXVECTOR2* result_1 = arg1;
005e2201      int32_t edi;
005e2201      int32_t var_14 = edi;
005e2202      uint32_t i_1 = arg6;
005e2207      struct D3DXVECTOR2* result = result_1;
005e2207      
005e2209      if (i_1 > 0)
005e2209      {
005e220e          struct D3DXVECTOR2* ecx_1 = arg3;
005e2243          uint32_t i;
005e2243          
005e2243          do
005e2243          {
005e221e              float var_c_1 = ((float)((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x10)) * ((long double)ecx_1->y)) + (((long double)ecx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0)))));
005e2227              long double x87_r7_5 = (((long double)*(uint32_t*)((char*)arg5->__inner0 + 4)) * ((long double)ecx_1->x));
005e222c              long double x87_r6_4 = (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x14)) * ((long double)ecx_1->y));
005e222f              ecx_1 += arg4;
005e2232              result_1->x = var_c_1;
005e223c              result_1->y = ((float)(x87_r7_5 + x87_r6_4));
005e223f              result_1 += arg2;
005e2242              i = i_1;
005e2242              i_1 -= 1;
005e2243          } while (i != 1);
005e2209      }
005e2209      
005e2249      return result;
005e21f6  }


005e224c  struct D3DXVECTOR3* __stdcall c_D3DXVec3Normalize(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2)

005e224c  {
005e2255      struct D3DXVECTOR3* esi = arg2;
005e2258      long double x87_r7 = ((long double)esi->z);
005e225b      int32_t edi;
005e225b      int32_t var_18 = edi;
005e225c      long double x87_r6 = ((long double)esi->y);
005e225f      int32_t ecx;
005e225f      int32_t var_1c = ecx;
005e2260      long double x87_r5 = ((long double)esi->x);
005e2262      int32_t var_20 = ecx;
005e2273      arg2 = ((float)(((x87_r5 * x87_r5) + (x87_r6 * x87_r6)) + (x87_r7 * x87_r7)));
005e2288      int32_t eax;
005e2288      int80_t st0;
005e2288      st0 = sub_5df170(((float)((long double)arg2)), ((float)((long double)1)));
005e228f      struct D3DXVECTOR3* result;
005e228f      
005e228f      if (eax == 0)
005e228f      {
005e229f          long double x87_r7_4 = ((long double)arg2);
005e22a2          long double temp1_1 = ((long double)1.17549435e-38f);
005e22a2          (x87_r7_4 - temp1_1);
005e22a8          eax = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005e22ad          result = arg1;
005e22ad          
005e22b0          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005e22b0          {
005e22d9              result->x = ((float)((long double)0));
005e22dd              result->y = ((float)((long double)0));
005e22e2              result->z = ((float)((long double)0));
005e22b0          }
005e22b0          else
005e22b0          {
005e22b7              long double x87_r7_7 = (((long double)1f) / sqrtl(((long double)arg2)));
005e22c1              float var_10 = ((float)(x87_r7_7 * ((long double)esi->x)));
005e22c9              float var_c_1 = ((float)(x87_r7_7 * ((long double)esi->y)));
005e22cc              long double x87_r7_8 = (x87_r7_7 * ((long double)esi->z));
005e22cf              esi = &var_10;
005e22d2              float var_8_1 = ((float)x87_r7_8);
005e229a          label_5e229a:
005e229a              result->x = esi->x;
005e229a              float* edi_2 = &result->y;
005e229a              float* esi_1 = &esi->y;
005e229d              ADJ(edi_2)->y = ADJ(esi_1)->y;
005e229d              (&edi_2[1] - 8)->z = (&esi_1[1] - 8)->z;
005e22b0          }
005e228f      }
005e228f      else
005e228f      {
005e2291          result = arg1;
005e2291          
005e2296          if (result != esi)
005e2296              goto label_5e229a;
005e228f      }
005e228f      
005e22e8      return result;
005e224c  }


005e22eb  struct D3DXVECTOR4* __stdcall c_D3DXVec3Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

005e22eb  {
005e2303      int32_t edi;
005e2303      int32_t var_1c = edi;
005e2315      float var_14 = ((float)((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)) * ((long double)arg2->z)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)) * ((long double)arg2->y))) + (((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))));
005e2330      float var_10 = ((float)((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)) * ((long double)arg2->z)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 4)) * ((long double)arg2->x))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34))));
005e234b      float var_c = ((float)((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)) * ((long double)arg2->z)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 8)) * ((long double)arg2->x))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38))));
005e2369      float* edi_1 = arg1;
005e236b      float var_8 = ((float)((((((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)) * ((long double)arg2->z)) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)) * ((long double)arg2->y))) + (((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc)) * ((long double)arg2->x))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c))));
005e236e      *(uint32_t*)edi_1 = var_14;
005e236e      void* edi_2 = &edi_1[1];
005e236e      float* esi = &var_10;
005e236f      *(uint32_t*)edi_2 = *(uint32_t*)esi;
005e236f      void* edi_3 = ((char*)edi_2 + 4);
005e236f      void* esi_1 = &esi[1];
005e2370      *(uint32_t*)edi_3 = *(uint32_t*)esi_1;
005e2371      *(uint32_t*)((char*)edi_3 + 4) = *(uint32_t*)((char*)esi_1 + 4);
005e2375      return arg1;
005e22eb  }


005e2378  struct D3DXVECTOR4* __stdcall c_D3DXVec3TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005e2378  {
005e2380      uint32_t i_1 = arg6;
005e2386      struct D3DXVECTOR4* ebx = arg1;
005e2389      arg1 = ebx;
005e2389      
005e238c      if (i_1 > 0)
005e238c      {
005e2395          struct D3DXVECTOR3* edx_1 = arg3;
005e2399          int32_t edi;
005e2399          int32_t var_20_1 = edi;
005e2415          uint32_t i;
005e2415          
005e2415          do
005e2415          {
005e239d              struct D3DXVECTOR4* edi_1 = ebx;
005e23a2              ebx += arg2;
005e23b9              float var_14_1 = ((float)((((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x10)) * ((long double)edx_1->y)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x20)) * ((long double)edx_1->z))) + (((long double)edx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0)))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x30))));
005e23d4              float var_10 = ((float)((((((long double)*(uint32_t*)((char*)arg5->__inner0 + 4)) * ((long double)edx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x14)) * ((long double)edx_1->y))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x24)) * ((long double)edx_1->z))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x34))));
005e23ef              float var_c_1 = ((float)((((((long double)edx_1->z) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x28))) + (((long double)edx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 8)))) + (((long double)edx_1->y) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x18)))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x38))));
005e23fd              long double x87_r7_18 = ((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0xc)) * ((long double)edx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x1c)) * ((long double)edx_1->y)));
005e2402              long double x87_r6_16 = (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x2c)) * ((long double)edx_1->z));
005e2405              edx_1 += arg4;
005e2408              i = i_1;
005e2408              i_1 -= 1;
005e240e              float var_8_1 = ((float)((x87_r7_18 + x87_r6_16) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x3c))));
005e2411              edi_1->x = var_14_1;
005e2411              float* edi_2 = &edi_1->y;
005e2411              float* esi_1 = &var_10;
005e2417              ADJ(edi_2)->y = *(uint32_t*)esi_1;
005e2412              float* edi_3 = &edi_2[1];
005e2412              void* esi_2 = &esi_1[1];
005e2417              ADJ(edi_3)->z = *(uint32_t*)esi_2;
005e2413              edi_3[1] = *(uint32_t*)((char*)esi_2 + 4);
005e2415          } while (i != 1);
005e238c      }
005e238c      
005e241e      return arg1;
005e2378  }


005e2421  struct D3DXVECTOR3* __stdcall c_D3DXVec3TransformCoord(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

005e2421  {
005e2426      int32_t ecx;
005e2426      int32_t var_8 = ecx;
005e2491      long double x87_r5_4 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)));
005e2496      long double x87_r6_4 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 8))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)));
005e249b      long double x87_r7_5 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)));
005e249d      arg1->x = ((float)((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))));
005e249f      arg1->y = ((float)x87_r5_4);
005e24a2      arg1->z = ((float)x87_r6_4);
005e24a5      float var_8_1 = ((float)x87_r7_5);
005e24aa      struct D3DXVECTOR3* var_c = arg1;
005e24ab      struct D3DXVECTOR3* var_10 = arg1;
005e24b6      int32_t eax_1;
005e24b6      int80_t st0;
005e24b6      st0 = sub_5df170(((float)((long double)var_8_1)), ((float)((long double)1)));
005e24bd      float* result = arg1;
005e24bd      
005e24c0      if (eax_1 == 0)
005e24c0      {
005e24c4          long double x87_r7_9 = (((long double)1) / ((long double)var_8_1));
005e24cb          *(uint32_t*)result = ((float)(x87_r7_9 * ((long double)*(uint32_t*)result)));
005e24d2          result[1] = ((float)(x87_r7_9 * ((long double)result[1])));
005e24d8          result[2] = ((float)(x87_r7_9 * ((long double)result[2])));
005e24c0      }
005e24c0      
005e24dc      return result;
005e2421  }


005e24df  struct D3DXVECTOR3* __stdcall c_D3DXVec3TransformCoordArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

005e24df  {
005e24ed      struct D3DXVECTOR3* result_1 = arg1;
005e24f0      struct D3DXVECTOR3* result = result_1;
005e24f0      
005e24f3      if (arg6 > 0)
005e24f3      {
005e24fc          struct D3DXVECTOR3* edx_1 = arg3;
005e2503          int32_t edi;
005e2503          int32_t var_20_1 = edi;
005e25b0          uint32_t i;
005e25b0          
005e25b0          do
005e25b0          {
005e2512              struct D3DXMATRIX* var_24_1 = arg5;
005e2516              struct D3DXMATRIX* var_28_1 = arg5;
005e2522              float var_14_1 = ((float)((((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x10)) * ((long double)edx_1->y)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x20)) * ((long double)edx_1->z))) + (((long double)edx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0)))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x30))));
005e253d              float var_10 = ((float)((((((long double)*(uint32_t*)((char*)arg5->__inner0 + 4)) * ((long double)edx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x14)) * ((long double)edx_1->y))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x24)) * ((long double)edx_1->z))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x34))));
005e2558              float var_c_1 = ((float)((((((long double)edx_1->z) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x28))) + (((long double)edx_1->x) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 8)))) + (((long double)edx_1->y) * ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x18)))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x38))));
005e2570              long double x87_r7_20 = ((((((long double)*(uint32_t*)((char*)arg5->__inner0 + 0xc)) * ((long double)edx_1->x)) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x1c)) * ((long double)edx_1->y))) + (((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x2c)) * ((long double)edx_1->z))) + ((long double)*(uint32_t*)((char*)arg5->__inner0 + 0x3c)));
005e2573              result_1->x = var_14_1;
005e2573              float* edi_2 = &result_1->y;
005e2573              float* esi_1 = &var_10;
005e25b6              ADJ(edi_2)->y = *(uint32_t*)esi_1;
005e2575              arg1 = ((float)x87_r7_20);
005e25b6              (&edi_2[1] - 8)->z = esi_1[1];
005e2585              int32_t eax_1;
005e2585              int80_t st0_1;
005e2585              st0_1 = sub_5df170(((float)((long double)arg1)), ((float)((long double)1)));
005e2585              
005e258c              if (eax_1 == 0)
005e258c              {
005e2590                  long double x87_r7_24 = (((long double)1) / ((long double)arg1));
005e2597                  result_1->x = ((float)(x87_r7_24 * ((long double)result_1->x)));
005e259e                  result_1->y = ((float)(x87_r7_24 * ((long double)result_1->y)));
005e25a4                  result_1->z = ((float)(x87_r7_24 * ((long double)result_1->z)));
005e258c              }
005e258c              
005e25a7              edx_1 += arg4;
005e25aa              result_1 += arg2;
005e25ad              i = arg6;
005e25ad              arg6 -= 1;
005e25b0          } while (i != 1);
005e24f3      }
005e24f3      
005e25bd      return result;
005e24df  }


005e25c0  struct D3DXVECTOR3* __stdcall c_D3DXVec3Project(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct _D3DVIEWPORT9 const* arg3, struct D3DXMATRIX const* arg4, struct D3DXMATRIX const* arg5, struct D3DXMATRIX const* arg6)

005e25c0  {
005e25c5      int32_t ecx;
005e25c5      int32_t var_8 = ecx;
005e25d4      int32_t esi;
005e25d4      int32_t var_6c = esi;
005e25d5      int32_t edi;
005e25d5      int32_t var_70 = edi;
005e25db      int32_t eax;
005e25db      eax = arg6 != 0;
005e25e0      float var_60;
005e25e0      int32_t* esi_1 = &var_60;
005e25e8      int32_t ecx_1;
005e25e8      ecx_1 = arg5 != 0;
005e25f6      int32_t edx;
005e25f6      edx = arg4 != 0;
005e25f6      
005e2604      switch (((((eax << 1) | ecx_1) << 1) | edx))
005e2604      {
005e260d          case 0:
005e260d          {
005e260d              float var_28_1 = ((float)((long double)0));
005e2612              float var_2c_1 = ((float)((long double)0));
005e2617              float var_30_1 = ((float)((long double)0));
005e261c              float var_34_1 = ((float)((long double)0));
005e2621              float var_3c_1 = ((float)((long double)0));
005e2626              float var_40_1 = ((float)((long double)0));
005e262b              float var_44_1 = ((float)((long double)0));
005e2630              float var_48_1 = ((float)((long double)0));
005e2635              float var_50_1 = ((float)((long double)0));
005e263a              float var_54_1 = ((float)((long double)0));
005e263f              float var_58_1 = ((float)((long double)0));
005e2644              float var_5c_1 = ((float)((long double)0));
005e2649              float var_24_1 = ((float)((long double)1));
005e264e              float var_38_1 = ((float)((long double)1));
005e2653              float var_4c_1 = ((float)((long double)1));
005e2658              var_60 = ((float)((long double)1));
005e260d              break;
005e260d          }
005e265d          case 1:
005e265d          {
005e265d              esi_1 = arg4;
005e265d              break;
005e265d          }
005e2661          case 2:
005e2661          {
005e2661              esi_1 = arg5;
005e2661              break;
005e2661          }
005e2666          case 3:
005e2666          {
005e2691              _D3DXMatrixMultiply@12(&var_60, arg5, arg4);
005e2666              break;
005e2666          }
005e266c          case 4:
005e266c          {
005e266c              esi_1 = arg6;
005e266c              break;
005e266c          }
005e2670          case 5:
005e2670          {
005e2691              _D3DXMatrixMultiply@12(&var_60, arg6, arg4);
005e2670              break;
005e2670          }
005e2673          case 6:
005e2673          {
005e2691              _D3DXMatrixMultiply@12(&var_60, arg6, arg5);
005e2673              break;
005e2673          }
005e2681          case 7:
005e2681          {
005e2681              _D3DXMatrixMultiply@12(&var_60, arg6, arg5);
005e2691              _D3DXMatrixMultiply@12(&var_60, &var_60, arg4);
005e2681              break;
005e2681          }
005e2604      }
005e2604      
005e2696      int32_t* var_74_3 = esi_1;
005e2697      struct D3DXVECTOR3* var_78_3 = arg2;
005e269e      _D3DXVec3TransformCoord@12(arg1);
005e269e      
005e26a8      if (arg3 != 0)
005e26a8      {
005e26b7          long double x87_r6_1 = ((long double)arg3->Width);
005e26b7          
005e26ba          if (arg3->Width < 0)
005e26bc              x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005e26bc          
005e26ce          long double x87_r6_2 = ((long double)arg3->X);
005e26ce          
005e26d0          if (arg3->X < 0)
005e26d2              x87_r6_2 = (x87_r6_2 + ((long double)4.2949673e+09f));
005e26d2          
005e26da          arg1->x = ((float)((((((long double)arg1->x) + ((long double)1f)) * x87_r6_1) * ((long double)0.5f)) + x87_r6_2));
005e26e6          long double x87_r6_3 = ((long double)arg3->Height);
005e26e6          
005e26e9          if (arg3->Height < 0)
005e26eb              x87_r6_3 = (x87_r6_3 + ((long double)4.2949673e+09f));
005e26eb          
005e26fe          long double x87_r6_4 = ((long double)arg3->Y);
005e26fe          
005e2701          if (arg3->Y < 0)
005e2703              x87_r6_4 = (x87_r6_4 + ((long double)4.2949673e+09f));
005e2703          
005e270b          arg1->y = ((float)((((((long double)1) - ((long double)arg1->y)) * x87_r6_3) * ((long double)0.5f)) + x87_r6_4));
005e271a          arg1->z = ((float)(((((long double)arg3->MaxZ) - ((long double)arg3->MinZ)) * ((long double)arg1->z)) + ((long double)arg3->MinZ)));
005e26a8      }
005e26a8      
005e2727      return arg1;
005e25c0  }

005e272a  uint32_t jump_table_5e272a[0x8] = 
005e272a  {
005e272a      [0x0] =  0x005e260b
005e272e      [0x1] =  0x005e265d
005e2732      [0x2] =  0x005e2661
005e2736      [0x3] =  0x005e2666
005e273a      [0x4] =  0x005e266c
005e273e      [0x5] =  0x005e2670
005e2742      [0x6] =  0x005e2673
005e2746      [0x7] =  0x005e2679
005e274a  }

005e274a  struct D3DXVECTOR3* __stdcall c_D3DXVec3ProjectArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct _D3DVIEWPORT9 const* arg5, struct D3DXMATRIX const* arg6, struct D3DXMATRIX const* arg7, struct D3DXMATRIX const* arg8, uint32_t arg9)

005e274a  {
005e274f      int32_t ecx;
005e274f      int32_t var_8 = ecx;
005e2761      int32_t esi;
005e2761      int32_t var_ac = esi;
005e2762      int32_t edi;
005e2762      int32_t var_b0 = edi;
005e2768      int32_t eax;
005e2768      eax = arg8 != 0;
005e276d      float var_60;
005e276d      int32_t* esi_1 = &var_60;
005e2775      int32_t ecx_1;
005e2775      ecx_1 = arg7 != 0;
005e2783      int32_t edx;
005e2783      edx = arg6 != 0;
005e2783      
005e2791      switch (((((eax << 1) | ecx_1) << 1) | edx))
005e2791      {
005e279a          case 0:
005e279a          {
005e279a              float var_28_1 = ((float)((long double)0));
005e279f              float var_2c_1 = ((float)((long double)0));
005e27a4              float var_30_1 = ((float)((long double)0));
005e27a9              float var_34_1 = ((float)((long double)0));
005e27ae              float var_3c_1 = ((float)((long double)0));
005e27b3              float var_40_1 = ((float)((long double)0));
005e27b8              float var_44_1 = ((float)((long double)0));
005e27bd              float var_48_1 = ((float)((long double)0));
005e27c2              float var_50_1 = ((float)((long double)0));
005e27c7              float var_54_1 = ((float)((long double)0));
005e27cc              float var_58_1 = ((float)((long double)0));
005e27d1              float var_5c_1 = ((float)((long double)0));
005e27d6              float var_24_1 = ((float)((long double)1));
005e27db              float var_38_1 = ((float)((long double)1));
005e27e0              float var_4c_1 = ((float)((long double)1));
005e27e5              var_60 = ((float)((long double)1));
005e279a              break;
005e279a          }
005e27ea          case 1:
005e27ea          {
005e27ea              esi_1 = arg6;
005e27ea              break;
005e27ea          }
005e27ee          case 2:
005e27ee          {
005e27ee              esi_1 = arg7;
005e27ee              break;
005e27ee          }
005e27f3          case 3:
005e27f3          {
005e281e              _D3DXMatrixMultiply@12(&var_60, arg7, arg6);
005e27f3              break;
005e27f3          }
005e27f9          case 4:
005e27f9          {
005e27f9              esi_1 = arg8;
005e27f9              break;
005e27f9          }
005e27fd          case 5:
005e27fd          {
005e281e              _D3DXMatrixMultiply@12(&var_60, arg8, arg6);
005e27fd              break;
005e27fd          }
005e2800          case 6:
005e2800          {
005e281e              _D3DXMatrixMultiply@12(&var_60, arg8, arg7);
005e2800              break;
005e2800          }
005e280e          case 7:
005e280e          {
005e280e              _D3DXMatrixMultiply@12(&var_60, arg8, arg7);
005e281e              _D3DXMatrixMultiply@12(&var_60, &var_60, arg6);
005e280e              break;
005e280e          }
005e2791      }
005e2791      
005e2828      if (arg5 != 0)
005e2828      {
005e2831          long double x87_r7_17 = ((long double)arg5->Width);
005e2831          
005e2836          if (arg5->Width < 0)
005e2838              x87_r7_17 = (x87_r7_17 + ((long double)4.2949673e+09f));
005e2838          
005e283e          long double x87_r7_18 = (x87_r7_17 * ((long double)0.5f));
005e2847          bool cond:0_1 = arg5->Height >= 0;
005e2849          float var_a0 = ((float)x87_r7_18);
005e2851          float var_9c_1 = ((float)((long double)0));
005e2859          float var_98_1 = ((float)((long double)0));
005e2861          float var_94_1 = ((float)((long double)0));
005e2869          float var_90_1 = ((float)((long double)0));
005e286c          long double x87_r6_5 = ((long double)arg5->Height);
005e286c          
005e286f          if (!(cond:0_1))
005e2871              x87_r6_5 = (x87_r6_5 + ((long double)4.2949673e+09f));
005e2871          
005e2883          float var_8c_1 = ((float)(((long double)-0.5f) * x87_r6_5));
005e2888          float var_88_1 = ((float)((long double)0));
005e288d          float var_84_1 = ((float)((long double)0));
005e2892          float var_80_1 = ((float)((long double)0));
005e2897          float var_7c_1 = ((float)((long double)0));
005e28a0          float var_78_1 = ((float)(((long double)arg5->MaxZ) - ((long double)arg5->MinZ)));
005e28a5          float var_74_1 = ((float)((long double)0));
005e28a8          long double x87_r5_10 = ((long double)arg5->X);
005e28a8          
005e28aa          if (arg5->X < 0)
005e28ac              x87_r5_10 = (x87_r5_10 + ((long double)4.2949673e+09f));
005e28ac          
005e28b9          float var_70_1 = ((float)(x87_r5_10 + x87_r7_18));
005e28bc          long double x87_r5_12 = ((long double)arg5->Y);
005e28bc          
005e28bf          if (arg5->Y < 0)
005e28c1              x87_r5_12 = (x87_r5_12 + ((long double)4.2949673e+09f));
005e28c1          
005e28d2          float MinZ = arg5->MinZ;
005e28e3          float var_6c_1 = ((float)(x87_r5_12 + (x87_r6_5 * ((long double)0.5f))));
005e28ec          float var_64_1 = ((float)((long double)1));
005e28ef          _D3DXMatrixMultiply@12(&var_60, esi_1, &var_a0);
005e28f4          esi_1 = &var_60;
005e2828      }
005e2828      
005e28f7      uint32_t var_b4_4 = arg9;
005e28fa      int32_t* var_b8_4 = esi_1;
005e2914      return _D3DXVec3TransformCoordArray@24(arg1, arg2, arg3, arg4);
005e274a  }

005e2917  uint32_t jump_table_5e2917[0x8] = 
005e2917  {
005e2917      [0x0] =  0x005e2798
005e291b      [0x1] =  0x005e27ea
005e291f      [0x2] =  0x005e27ee
005e2923      [0x3] =  0x005e27f3
005e2927      [0x4] =  0x005e27f9
005e292b      [0x5] =  0x005e27fd
005e292f      [0x6] =  0x005e2800
005e2933      [0x7] =  0x005e2806
005e2937  }

005e2937  struct D3DXVECTOR3* __stdcall c_D3DXVec3Unproject(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct _D3DVIEWPORT9 const* arg3, struct D3DXMATRIX const* arg4, struct D3DXMATRIX const* arg5, struct D3DXMATRIX const* arg6)

005e2937  {
005e293c      int32_t ecx;
005e293c      int32_t var_8 = ecx;
005e294e      int32_t esi;
005e294e      int32_t var_6c = esi;
005e2951      int32_t edi;
005e2951      int32_t var_70 = edi;
005e2957      int32_t eax;
005e2957      eax = arg6 != 0;
005e2960      int32_t edx;
005e2960      edx = arg5 != 0;
005e296c      int32_t edx_1;
005e296c      edx_1 = arg4 != 0;
005e297a      struct D3DXMATRIX* var_78_1;
005e297a      struct D3DXMATRIX* var_74_2;
005e297a      float var_60;
005e297a      
005e297a      switch (((((eax << 1) | edx) << 1) | edx_1))
005e297a      {
005e2983          case 0:
005e2983          {
005e2983              float var_28_1 = ((float)((long double)0));
005e2988              float var_2c_1 = ((float)((long double)0));
005e298d              float var_30_1 = ((float)((long double)0));
005e2992              float var_34_1 = ((float)((long double)0));
005e2997              float var_3c_1 = ((float)((long double)0));
005e299c              float var_40_1 = ((float)((long double)0));
005e29a1              float var_44_1 = ((float)((long double)0));
005e29a6              float var_48_1 = ((float)((long double)0));
005e29ab              float var_50_1 = ((float)((long double)0));
005e29b0              float var_54_1 = ((float)((long double)0));
005e29b5              float var_58_1 = ((float)((long double)0));
005e29ba              float var_5c_1 = ((float)((long double)0));
005e29bf              float var_24_1 = ((float)((long double)1));
005e29c4              float var_38_1 = ((float)((long double)1));
005e29c9              float var_4c_1 = ((float)((long double)1));
005e29ce              var_60 = ((float)((long double)1));
005e2983              break;
005e2983          }
005e29d3          case 1:
005e29d3          {
005e2a11              _D3DXMatrixInverse@12(&var_60, 0, arg4);
005e29d3              break;
005e29d3          }
005e29d8          case 2:
005e29d8          {
005e2a11              _D3DXMatrixInverse@12(&var_60, 0, arg5);
005e29d8              break;
005e29d8          }
005e29db          case 3:
005e29db          {
005e29db              var_74_2 = arg4;
005e29de              var_78_1 = arg5;
005e2a03          label_5e2a03:
005e2a03              _D3DXMatrixMultiply@12(&var_60, var_78_1, var_74_2);
005e2a11              _D3DXMatrixInverse@12(&var_60, 0, &var_60);
005e29db              break;
005e29db          }
005e29e1          case 4:
005e29e1          {
005e2a11              _D3DXMatrixInverse@12(&var_60, 0, arg6);
005e29e1              break;
005e29e1          }
005e29e4          case 5:
005e29e4          {
005e29e4              var_74_2 = arg4;
005e29ea          label_5e29ea:
005e29ea              var_78_1 = arg6;
005e29eb              goto label_5e2a03;
005e29e4          }
005e29e9          case 6:
005e29e9          {
005e29e9              var_74_2 = arg5;
005e29e9              goto label_5e29ea;
005e29e9          }
005e29f3          case 7:
005e29f3          {
005e29f3              _D3DXMatrixMultiply@12(&var_60, arg6, arg5);
005e29f8              var_74_2 = arg4;
005e29fe              var_78_1 = &var_60;
005e29fe              goto label_5e2a03;
005e29f3          }
005e297a      }
005e297a      
005e2a1b      float* result;
005e2a1b      float* result_1;
005e2a1b      int32_t* var_74_4;
005e2a1b      
005e2a1b      if (arg3 == 0)
005e2a1b      {
005e2a99          result = arg1;
005e2a9f          var_74_4 = &var_60;
005e2aa0          result_1 = arg2;
005e2a1b      }
005e2a1b      else
005e2a1b      {
005e2a1f          long double x87_r7_17 = ((long double)arg3->X);
005e2a1f          
005e2a23          if (arg3->X < 0)
005e2a25              x87_r7_17 = (x87_r7_17 + ((long double)4.2949673e+09f));
005e2a25          
005e2a2b          float* ecx_3 = arg2;
005e2a35          long double x87_r6_1 = ((long double)arg3->Width);
005e2a35          
005e2a38          if (arg3->Width < 0)
005e2a3a              x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005e2a3a          
005e2a40          long double x87_r7_19 = ((((long double)*(uint32_t*)ecx_3) - x87_r7_17) / x87_r6_1);
005e2a42          result = arg1;
005e2a4d          *(uint32_t*)result = ((float)((x87_r7_19 + x87_r7_19) - ((long double)1f)));
005e2a54          long double x87_r7_22 = ((long double)arg3->Y);
005e2a54          
005e2a57          if (arg3->Y < 0)
005e2a59              x87_r7_22 = (x87_r7_22 + ((long double)4.2949673e+09f));
005e2a59          
005e2a67          long double x87_r6_2 = ((long double)arg3->Height);
005e2a67          
005e2a6a          if (arg3->Height < 0)
005e2a6c              x87_r6_2 = (x87_r6_2 + ((long double)4.2949673e+09f));
005e2a6c          
005e2a72          long double x87_r7_24 = ((((long double)ecx_3[1]) - x87_r7_22) / x87_r6_2);
005e2a7e          result[1] = ((float)-(((x87_r7_24 + x87_r7_24) - ((long double)1f))));
005e2a90          var_74_4 = &var_60;
005e2a93          result_1 = result;
005e2a94          result[2] = ((float)((((long double)ecx_3[2]) - ((long double)arg3->MinZ)) / (((long double)arg3->MaxZ) - ((long double)arg3->MinZ))));
005e2a1b      }
005e2aa4      _D3DXVec3TransformCoord@12(result);
005e2ab3      return result;
005e2937  }

005e2ab6  uint32_t jump_table_5e2ab6[0x8] = 
005e2ab6  {
005e2ab6      [0x0] =  0x005e2981
005e2aba      [0x1] =  0x005e29d3
005e2abe      [0x2] =  0x005e29d8
005e2ac2      [0x3] =  0x005e29db
005e2ac6      [0x4] =  0x005e29e1
005e2aca      [0x5] =  0x005e29e4
005e2ace      [0x6] =  0x005e29e9
005e2ad2      [0x7] =  0x005e29ed
005e2ad6  }

005e2ad6  struct D3DXVECTOR3* __stdcall c_D3DXVec3UnprojectArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct _D3DVIEWPORT9 const* arg5, struct D3DXMATRIX const* arg6, struct D3DXMATRIX const* arg7, struct D3DXMATRIX const* arg8, uint32_t arg9)

005e2ad6  {
005e2adb      int32_t ecx;
005e2adb      int32_t var_8 = ecx;
005e2af0      int32_t esi;
005e2af0      int32_t var_bc = esi;
005e2af3      int32_t edi;
005e2af3      int32_t var_c0 = edi;
005e2af9      int32_t eax;
005e2af9      eax = arg8 != 0;
005e2b02      int32_t edx;
005e2b02      edx = arg7 != 0;
005e2b0e      int32_t edx_1;
005e2b0e      edx_1 = arg6 != 0;
005e2b1c      struct D3DXMATRIX* var_c8_1;
005e2b1c      struct D3DXMATRIX* var_c4_2;
005e2b1c      float var_60;
005e2b1c      
005e2b1c      switch (((((eax << 1) | edx) << 1) | edx_1))
005e2b1c      {
005e2b25          case 0:
005e2b25          {
005e2b25              float var_28_1 = ((float)((long double)0));
005e2b2a              float var_2c_1 = ((float)((long double)0));
005e2b2f              float var_30_1 = ((float)((long double)0));
005e2b34              float var_34_1 = ((float)((long double)0));
005e2b39              float var_3c_1 = ((float)((long double)0));
005e2b3e              float var_40_1 = ((float)((long double)0));
005e2b43              float var_44_1 = ((float)((long double)0));
005e2b48              float var_48_1 = ((float)((long double)0));
005e2b4d              float var_50_1 = ((float)((long double)0));
005e2b52              float var_54_1 = ((float)((long double)0));
005e2b57              float var_58_1 = ((float)((long double)0));
005e2b5c              float var_5c_1 = ((float)((long double)0));
005e2b61              float var_24_1 = ((float)((long double)1));
005e2b66              float var_38_1 = ((float)((long double)1));
005e2b6b              float var_4c_1 = ((float)((long double)1));
005e2b70              var_60 = ((float)((long double)1));
005e2b25              break;
005e2b25          }
005e2b75          case 1:
005e2b75          {
005e2bb3              _D3DXMatrixInverse@12(&var_60, 0, arg6);
005e2b75              break;
005e2b75          }
005e2b7a          case 2:
005e2b7a          {
005e2bb3              _D3DXMatrixInverse@12(&var_60, 0, arg7);
005e2b7a              break;
005e2b7a          }
005e2b7d          case 3:
005e2b7d          {
005e2b7d              var_c4_2 = arg6;
005e2b80              var_c8_1 = arg7;
005e2ba5          label_5e2ba5:
005e2ba5              _D3DXMatrixMultiply@12(&var_60, var_c8_1, var_c4_2);
005e2bb3              _D3DXMatrixInverse@12(&var_60, 0, &var_60);
005e2b7d              break;
005e2b7d          }
005e2b83          case 4:
005e2b83          {
005e2bb3              _D3DXMatrixInverse@12(&var_60, 0, arg8);
005e2b83              break;
005e2b83          }
005e2b86          case 5:
005e2b86          {
005e2b86              var_c4_2 = arg6;
005e2b8c          label_5e2b8c:
005e2b8c              var_c8_1 = arg8;
005e2b8d              goto label_5e2ba5;
005e2b86          }
005e2b8b          case 6:
005e2b8b          {
005e2b8b              var_c4_2 = arg7;
005e2b8b              goto label_5e2b8c;
005e2b8b          }
005e2b95          case 7:
005e2b95          {
005e2b95              _D3DXMatrixMultiply@12(&var_60, arg8, arg7);
005e2b9a              var_c4_2 = arg6;
005e2ba0              var_c8_1 = &var_60;
005e2ba0              goto label_5e2ba5;
005e2b95          }
005e2b1c      }
005e2b1c      
005e2bbd      if (arg5 != 0)
005e2bbd      {
005e2bc6          long double x87_r7_17 = ((long double)arg5->Width);
005e2bc6          
005e2bcb          if (arg5->Width < 0)
005e2bcd              x87_r7_17 = (x87_r7_17 + ((long double)4.2949673e+09f));
005e2bcd          
005e2bd8          long double x87_r7_18 = (((long double)2f) / x87_r7_17);
005e2bde          long double x87_r6_1 = ((long double)arg5->Height);
005e2bde          
005e2be1          if (arg5->Height < 0)
005e2be3              x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005e2be3          
005e2be9          long double x87_r6_2 = (((long double)2f) / x87_r6_1);
005e2bf1          bool cond:1_1 = arg5->X >= 0;
005e2bf3          long double x87_r5_1 = ((long double)1f);
005e2bff          long double x87_r4_3 = (x87_r5_1 / (((long double)arg5->MaxZ) - ((long double)arg5->MinZ)));
005e2c01          float var_14_1 = ((float)x87_r4_3);
005e2c06          float var_b0 = ((float)x87_r7_18);
005e2c0e          float var_ac_1 = ((float)((long double)0));
005e2c16          float var_a8_1 = ((float)((long double)0));
005e2c1e          float var_a4_1 = ((float)((long double)0));
005e2c26          float var_a0_1 = ((float)((long double)0));
005e2c30          float var_9c_1 = ((float)-(x87_r6_2));
005e2c38          float var_98_1 = ((float)((long double)0));
005e2c40          float var_94_1 = ((float)((long double)0));
005e2c48          float var_90_1 = ((float)((long double)0));
005e2c4d          float var_8c_1 = ((float)((long double)0));
005e2c50          float var_88_1 = ((float)x87_r4_3);
005e2c55          float var_84_1 = ((float)((long double)0));
005e2c58          long double x87_r4_5 = ((long double)arg5->X);
005e2c58          
005e2c5a          if (!(cond:1_1))
005e2c5c              x87_r4_5 = (x87_r4_5 + ((long double)4.2949673e+09f));
005e2c5c          
005e2c6d          float var_80_1 = ((float)(-((x87_r4_5 * x87_r7_18)) - x87_r5_1));
005e2c70          long double x87_r4_9 = ((long double)arg5->Y);
005e2c70          
005e2c73          if (arg5->Y < 0)
005e2c75              x87_r4_9 = (x87_r4_9 + ((long double)4.2949673e+09f));
005e2c75          
005e2c7f          float var_7c_1 = ((float)((x87_r4_9 * x87_r6_2) + x87_r5_1));
005e2c9b          float var_78_1 = ((float)-((((long double)var_14_1) * ((long double)arg5->MinZ))));
005e2ca4          float var_74_1 = ((float)((long double)1));
005e2ca7          _D3DXMatrixMultiply@12(&var_60, &var_b0, &var_60);
005e2bbd      }
005e2bbd      
005e2cac      uint32_t var_c4_5 = arg9;
005e2cb2      int32_t* var_c8_4 = &var_60;
005e2ccc      return _D3DXVec3TransformCoordArray@24(arg1, arg2, arg3, arg4);
005e2ad6  }

005e2ccf  uint32_t jump_table_5e2ccf[0x8] = 
005e2ccf  {
005e2ccf      [0x0] =  0x005e2b23
005e2cd3      [0x1] =  0x005e2b75
005e2cd7      [0x2] =  0x005e2b7a
005e2cdb      [0x3] =  0x005e2b7d
005e2cdf      [0x4] =  0x005e2b83
005e2ce3      [0x5] =  0x005e2b86
005e2ce7      [0x6] =  0x005e2b8b
005e2ceb      [0x7] =  0x005e2b8f
005e2cef  }

005e2cef  long __stdcall c_D3DXMatrixDecompose(struct D3DXVECTOR3* arg1, struct D3DXQUATERNION* arg2, struct D3DXVECTOR3* arg3, struct D3DXMATRIX const* arg4)

005e2cef  {
005e2cfd      float var_10 = ((float)((long double)1));
005e2d00      int32_t edi;
005e2d00      int32_t var_90 = edi;
005e2d06      float var_c = ((float)((long double)0));
005e2d17      float var_8 = ((float)((long double)0));
005e2d1c      float var_88 = var_10;
005e2d1c      void var_84;
005e2d1c      void* edi_1 = &var_84;
005e2d1c      float* esi = &var_c;
005e2d1d      *(uint32_t*)edi_1 = *(uint32_t*)esi;
005e2d1e      *(uint32_t*)((char*)edi_1 + 4) = esi[1];
005e2d1f      var_10 = ((float)((long double)0));
005e2d24      var_c = ((float)((long double)1));
005e2d2f      float var_8_1 = ((float)((long double)0));
005e2d32      float var_7c = var_10;
005e2d32      void var_78;
005e2d32      void* edi_4 = &var_78;
005e2d32      float* esi_3 = &var_c;
005e2d35      *(uint32_t*)edi_4 = *(uint32_t*)esi_3;
005e2d36      *(uint32_t*)((char*)edi_4 + 4) = esi_3[1];
005e2d37      var_10 = ((float)((long double)0));
005e2d3c      var_c = ((float)((long double)0));
005e2d47      float var_8_2 = ((float)((long double)1));
005e2d4a      float var_70 = var_10;
005e2d4a      void var_6c;
005e2d4a      void* edi_7 = &var_6c;
005e2d4a      float* esi_6 = &var_c;
005e2d4e      arg3->x = ((float)((long double)*(uint32_t*)((char*)arg4->__inner0 + 0x30)));
005e2d52      float edx = *(uint32_t*)((char*)arg4->__inner0 + 0x34);
005e2d55      float var_24 = ((float)((long double)0));
005e2d58      *(uint32_t*)edi_7 = *(uint32_t*)esi_6;
005e2d5b      float var_28 = ((float)((long double)0));
005e2d5e      *(uint32_t*)((char*)edi_7 + 4) = esi_6[1];
005e2d61      float var_2c = ((float)((long double)0));
005e2d66      arg3->y = edx;
005e2d6c      float var_30 = ((float)((long double)0));
005e2d6f      arg3->z = *(uint32_t*)((char*)arg4->__inner0 + 0x38);
005e2d76      float var_40 = ((float)((long double)0));
005e2d81      float var_5c;
005e2d81      var_10 = &var_5c;
005e2d84      float var_50 = ((float)((long double)0));
005e2d8c      float var_4c;
005e2d8c      var_c = &var_4c;
005e2d92      float var_20 = ((float)((long double)1));
005e2d95      var_5c = *(uint32_t*)((char*)arg4->__inner0 + 0);
005e2d95      float var_58;
005e2d95      int32_t* edi_10 = &var_58;
005e2d95      void* __offset(D3DXMATRIX, 0x4) esi_10 = &arg4->__inner0.__inner0._12;
005e2d96      *(uint32_t*)edi_10 = *(uint32_t*)((char*)ADJ(esi_10)->__inner0 + 4);
005e2d96      edi_10[1] = *(uint32_t*)((char*)ADJ(esi_10)->__inner0 + 8);
005e2d9e      var_4c = *(uint32_t*)((char*)arg4->__inner0 + 0x10);
005e2d9e      float var_48;
005e2d9e      float* edi_13 = &var_48;
005e2d9e      void* __offset(D3DXMATRIX, 0x14) esi_14 = &arg4->__inner0.__inner0._22;
005e2d9f      *(uint32_t*)edi_13 = *(uint32_t*)((char*)ADJ(esi_14)->__inner0 + 0x14);
005e2d9f      edi_13[1] = *(uint32_t*)((char*)ADJ(esi_14)->__inner0 + 0x18);
005e2da7      float var_3c = *(uint32_t*)((char*)arg4->__inner0 + 0x20);
005e2da7      float var_38;
005e2da7      int32_t* edi_16 = &var_38;
005e2da7      void* __offset(D3DXMATRIX, 0x24) esi_18 = &arg4->__inner0.__inner0._32;
005e2da8      *(uint32_t*)edi_16 = *(uint32_t*)((char*)ADJ(esi_18)->__inner0 + 0x24);
005e2da8      edi_16[1] = *(uint32_t*)((char*)ADJ(esi_18)->__inner0 + 0x28);
005e2db3      int32_t* var_8_3 = &var_3c;
005e2dc6      float var_54;
005e2dc6      long double x87_r7_21 = sqrtl((((((long double)var_54) * ((long double)var_54)) + (((long double)var_58) * ((long double)var_58))) + (((long double)var_5c) * ((long double)var_5c))));
005e2dca      arg1->x = ((float)x87_r7_21);
005e2de2      float var_44;
005e2de2      long double x87_r6_9 = sqrtl((((((long double)var_44) * ((long double)var_44)) + (((long double)var_48) * ((long double)var_48))) + (((long double)var_4c) * ((long double)var_4c))));
005e2de7      arg1->y = ((float)x87_r6_9);
005e2e02      float var_34;
005e2e02      arg4 = ((float)sqrtl((((((long double)var_34) * ((long double)var_34)) + (((long double)var_38) * ((long double)var_38))) + (((long double)var_3c) * ((long double)var_3c)))));
005e2e07      (x87_r7_21 - x87_r6_9);
005e2e0c      arg1->z = arg4;
005e2e0f      struct D3DXMATRIX* eax_1;
005e2e0f      eax_1 = ((((x87_r7_21 < x87_r6_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, x87_r6_9))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == x87_r6_9) ? 1 : 0) << 0xe) | 0x3000))));
005e2e11      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
005e2e14      int32_t esi_21;
005e2e14      long double x87_r0;
005e2e14      
005e2e14      if (p)
005e2e14      {
005e2e54          long double temp1_1 = ((long double)arg4);
005e2e54          (x87_r6_9 - temp1_1);
005e2e57          eax_1 = ((((x87_r6_9 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_9, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_9 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005e2e59          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005e2e59          
005e2e5c          if (p_3)
005e2e5c          {
005e2e6e              long double x87_r7_23 = ((long double)((float)x87_r6_9));
005e2e71              esi_21 = 0;
005e2e73              long double temp3_1 = ((long double)arg4);
005e2e73              (x87_r7_23 - temp3_1);
005e2e76              eax_1 = ((((x87_r7_23 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_23, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_23 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005e2e78              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005e2e78              
005e2e7b              if (p_4)
005e2e7b              {
005e2e86                  arg3 = 2;
005e2e8d                  arg4 = 1;
005e2e7b              }
005e2e7b              else
005e2e7b              {
005e2e7d                  arg4 = 2;
005e2e65                  arg3 = 1;
005e2e7b              }
005e2e5c          }
005e2e5c          else
005e2e5c          {
005e2e5e              arg4 = nullptr;
005e2e64              esi_21 = 2;
005e2e65              arg3 = 1;
005e2e5c          }
005e2e14      }
005e2e14      else
005e2e14      {
005e2e16          long double temp2_1 = ((long double)arg4);
005e2e16          (x87_r6_9 - temp2_1);
005e2e19          eax_1 = ((((x87_r6_9 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_9, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r6_9 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
005e2e1b          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005e2e1b          
005e2e1e          if (p_1)
005e2e1e          {
005e2e2b              long double temp4_1 = ((long double)arg4);
005e2e2b              (x87_r7_21 - temp4_1);
005e2e30              esi_21 = 1;
005e2e31              eax_1 = ((((x87_r7_21 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_21, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_21 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005e2e33              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005e2e33              
005e2e36              if (p_2)
005e2e36              {
005e2e45                  arg4 = nullptr;
005e2e49                  arg3 = 2;
005e2e36              }
005e2e36              else
005e2e36              {
005e2e38                  arg3 = nullptr;
005e2e3c                  arg4 = 2;
005e2e36              }
005e2e1e          }
005e2e1e          else
005e2e1e          {
005e2e20              arg3 = nullptr;
005e2e24              x87_r0 = x87_r7_21;
005e2e28              esi_21 = 2;
005e2e8d              arg4 = 1;
005e2e1e          }
005e2e14      }
005e2e14      
005e2e99      void* eax_2 = ((esi_21 << 2) + arg1);
005e2e9c      long double x87_r7_24 = ((long double)*(uint32_t*)eax_2);
005e2e9e      void* var_60 = eax_2;
005e2ea1      long double temp5 = ((long double)9.99999975e-05f);
005e2ea1      (x87_r7_24 - temp5);
005e2ea7      eax_2 = ((((x87_r7_24 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_24, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7_24 == temp5) ? 1 : 0) << 0xe) | 0))));
005e2ea9      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005e2eac      int32_t __saved_ebp;
005e2eac      
005e2eac      if (!(p_5))
005e2eac      {
005e2eae          int32_t* edi_19 = &var_10[esi_21];
005e2ebc          *(uint32_t*)edi_19 = &__saved_ebp[((esi_21 * 3) - 0x21)];
005e2ebc          void* edi_20 = &edi_19[1];
005e2ebc          void* esi_24 = &&__saved_ebp[((esi_21 * 3) - 0x20)];
005e2ebd          *(uint32_t*)edi_20 = *(uint32_t*)esi_24;
005e2ebe          *(uint32_t*)((char*)edi_20 + 4) = *(uint32_t*)((char*)esi_24 + 4);
005e2eac      }
005e2eac      
005e2ec4      int32_t eax_3 = &__saved_ebp[(esi_21 - 3)];
005e2ec8      _D3DXVec3Normalize@8(eax_3, eax_3);
005e2ed6      long double x87_r7_25 = ((long double)*(uint32_t*)((arg4 << 2) + arg1));
005e2ed9      long double temp6 = ((long double)9.99999975e-05f);
005e2ed9      (x87_r7_25 - temp6);
005e2edf      struct D3DXVECTOR3* eax_4;
005e2edf      eax_4 = ((((x87_r7_25 < temp6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_25, temp6))) ? 1 : 0) << 0xa) | ((((x87_r7_25 == temp6) ? 1 : 0) << 0xe) | 0))));
005e2ee1      bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
005e2ee4      float var_18;
005e2ee4      float var_14;
005e2ee4      
005e2ee4      if (!(p_6))
005e2ee4      {
005e2eea          float* ecx_3 = &__saved_ebp[(esi_21 - 3)];
005e2eee          long double x87_r7_27 = fabsl(((long double)*(uint32_t*)ecx_3));
005e2ef3          long double x87_r6_11 = fabsl(((long double)ecx_3[1]));
005e2efd          arg4 = ((float)fabsl(((long double)ecx_3[2])));
005e2f02          (x87_r7_27 - x87_r6_11);
005e2f04          eax_4 = ((((x87_r7_27 < x87_r6_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_27, x87_r6_11))) ? 1 : 0) << 0xa) | ((((x87_r7_27 == x87_r6_11) ? 1 : 0) << 0xe) | 0x3000))));
005e2f06          bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
005e2f09          int32_t eax_5;
005e2f09          
005e2f09          if (p_7)
005e2f09          {
005e2f29              long double temp9_1 = ((long double)arg4);
005e2f29              (x87_r6_11 - temp9_1);
005e2f2c              eax_4 = ((((x87_r6_11 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp9_1) ? 1 : 0) << 0xe) | 0))));
005e2f2e              bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x5} */;
005e2f31              bool p_11;
005e2f31              
005e2f31              if (p_10)
005e2f31              {
005e2f38                  long double x87_r7_29 = ((long double)((float)x87_r6_11));
005e2f3b                  long double temp11_1 = ((long double)arg4);
005e2f3b                  (x87_r7_29 - temp11_1);
005e2f3e                  eax_4 = ((((x87_r7_29 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_29, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r7_29 == temp11_1) ? 1 : 0) << 0xe) | 0))));
005e2f40                  p_11 = /* p_11 = unimplemented  {test ah, 0x5} */;
005e2f31              }
005e2f31              
005e2f43              if ((!(p_10) || !(p_11)))
005e2f35                  eax_5 = 1;
005e2f43              else
005e2f47                  eax_5 = 2;
005e2f09          }
005e2f09          else
005e2f09          {
005e2f0b              long double temp10_1 = ((long double)arg4);
005e2f0b              (x87_r6_11 - temp10_1);
005e2f0e              eax_4 = ((((x87_r6_11 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp10_1) ? 1 : 0) << 0xe) | 0x3800))));
005e2f10              bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
005e2f10              
005e2f13              if (p_8)
005e2f13              {
005e2f19                  long double temp12_1 = ((long double)arg4);
005e2f19                  (x87_r7_27 - temp12_1);
005e2f1c                  eax_4 = ((((x87_r7_27 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_27, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r7_27 == temp12_1) ? 1 : 0) << 0xe) | 0))));
005e2f1e                  bool p_9 = /* bool p_9 = unimplemented  {test ah, 0x5} */;
005e2f1e                  
005e2f21                  if (p_9)
005e2f47                      eax_5 = 2;
005e2f21                  else
005e2f23                      eax_5 = 0;
005e2f13              }
005e2f13              else
005e2f13              {
005e2f15                  x87_r0 = x87_r7_27;
005e2f23                  eax_5 = 0;
005e2f13              }
005e2f09          }
005e2f09          
005e2f55          float* edi_23 = &var_10[arg4];
005e2f67          float var_1c_1 = ((float)((((long double)&__saved_ebp[((eax_5 * 3) - 0x1f)]) * ((long double)ecx_3[1])) - (((long double)&__saved_ebp[((eax_5 * 3) - 0x20)]) * ((long double)ecx_3[2]))));
005e2f76          var_18 = ((float)((((long double)ecx_3[2]) * ((long double)&__saved_ebp[((eax_5 * 3) - 0x21)])) - (((long double)&__saved_ebp[((eax_5 * 3) - 0x1f)]) * ((long double)*(uint32_t*)ecx_3))));
005e2f85          var_14 = ((float)((((long double)&__saved_ebp[((eax_5 * 3) - 0x20)]) * ((long double)*(uint32_t*)ecx_3)) - (((long double)ecx_3[1]) * ((long double)&__saved_ebp[((eax_5 * 3) - 0x21)]))));
005e2f88          *(uint32_t*)edi_23 = var_1c_1;
005e2f88          void* edi_24 = &edi_23[1];
005e2f88          float* esi_27 = &var_18;
005e2f89          *(uint32_t*)edi_24 = *(uint32_t*)esi_27;
005e2f8a          *(uint32_t*)((char*)edi_24 + 4) = esi_27[1];
005e2ee4      }
005e2ee4      
005e2f8f      int32_t eax_8 = &__saved_ebp[((char*)arg4 - 3)];
005e2f93      _D3DXVec3Normalize@8(eax_8, eax_8);
005e2fa1      long double x87_r7_39 = ((long double)*(uint32_t*)((arg3 << 2) + arg1));
005e2fa4      long double temp7 = ((long double)9.99999975e-05f);
005e2fa4      (x87_r7_39 - temp7);
005e2faa      struct D3DXVECTOR3* eax_9;
005e2faa      eax_9 = ((((x87_r7_39 < temp7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_39, temp7))) ? 1 : 0) << 0xa) | ((((x87_r7_39 == temp7) ? 1 : 0) << 0xe) | 0))));
005e2fac      bool p_12 = /* bool p_12 = unimplemented  {test ah, 0x5} */;
005e2fac      
005e2faf      if (!(p_12))
005e2faf      {
005e2fb1          float* eax_10 = &__saved_ebp[((char*)arg4 - 3)];
005e2fb3          float* ecx_4 = &__saved_ebp[(esi_21 - 3)];
005e2fbb          float* edi_27 = &var_10[arg3];
005e2fca          float var_1c_2 = ((float)((((long double)eax_10[2]) * ((long double)ecx_4[1])) - (((long double)eax_10[1]) * ((long double)ecx_4[2]))));
005e2fd9          var_18 = ((float)((((long double)*(uint32_t*)eax_10) * ((long double)ecx_4[2])) - (((long double)eax_10[2]) * ((long double)*(uint32_t*)ecx_4))));
005e2fe8          var_14 = ((float)((((long double)*(uint32_t*)ecx_4) * ((long double)eax_10[1])) - (((long double)ecx_4[1]) * ((long double)*(uint32_t*)eax_10))));
005e2feb          *(uint32_t*)edi_27 = var_1c_2;
005e2feb          void* edi_28 = &edi_27[1];
005e2feb          float* esi_31 = &var_18;
005e2fec          *(uint32_t*)edi_28 = *(uint32_t*)esi_31;
005e2fed          *(uint32_t*)((char*)edi_28 + 4) = esi_31[1];
005e2faf      }
005e2faf      
005e2fee      int32_t edx_7 = &var_10[arg3];
005e2ff4      _D3DXVec3Normalize@8(edx_7, edx_7);
005e2ffd      _D3DXMatrixDeterminant@4(&var_5c);
005e3002      long double temp8 = ((long double)0f);
005e3002      (x87_r0 - temp8);
005e3008      void* eax_11;
005e3008      eax_11 = ((((x87_r0 < temp8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r0, temp8))) ? 1 : 0) << 0xa) | ((((x87_r0 == temp8) ? 1 : 0) << 0xe) | 0))));
005e300a      bool p_13 = /* bool p_13 = unimplemented  {test ah, 0x5} */;
005e300a      
005e300d      if (!(p_13))
005e300d      {
005e300f          eax_11 = var_60;
005e3014          int32_t* ebx_1 = &__saved_ebp[(esi_21 - 3)];
005e301b          *(uint32_t*)eax_11 = ((float)-(((long double)*(uint32_t*)eax_11)));
005e3023          float var_1c_3 = ((float)-(((long double)*(uint32_t*)ebx_1)));
005e302b          var_18 = ((float)-(((long double)ebx_1[1])));
005e3033          var_14 = ((float)-(((long double)ebx_1[2])));
005e3036          *(uint32_t*)ebx_1 = var_1c_3;
005e3036          float* edi_32 = &ebx_1[1];
005e3036          float* esi_34 = &var_18;
005e3037          *(uint32_t*)edi_32 = *(uint32_t*)esi_34;
005e3037          edi_32[1] = esi_34[1];
005e300d      }
005e300d      
005e303f      long double x87_r0_1 = (x87_r0 - ((long double)1f));
005e3048      long double x87_r7_60 = (x87_r0_1 * x87_r0_1);
005e304a      long double x87_r6_24 = ((long double)9.99999975e-05f);
005e3050      (x87_r6_24 - x87_r7_60);
005e3052      eax_11 = ((((x87_r6_24 < x87_r7_60) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_24, x87_r7_60))) ? 1 : 0) << 0xa) | ((((x87_r6_24 == x87_r7_60) ? 1 : 0) << 0xe) | 0))));
005e3056      bool p_14 = /* bool p_14 = unimplemented  {test ah, 0x5} */;
005e3056      
005e3059      if (!(p_14))
005e305b          return 0x8876086c;
005e305b      
005e306a      _D3DXQuaternionRotationMatrix@8(arg2, &var_5c);
005e3076      arg2->w = ((float)-(((long double)arg2->w)));
005e307c      return 0;
005e2cef  }


005e307f  struct D3DXMATRIX* __stdcall c_D3DXMatrixRotationYawPitchRoll(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

005e307f  {
005e30a2      void var_14;
005e30a2      _D3DXQuaternionRotationYawPitchRoll@16(&var_14, ((float)((long double)arg2)), ((float)((long double)arg3)), ((float)((long double)arg4)));
005e30ae      _D3DXMatrixRotationQuaternion@8(arg1, &var_14);
005e30b7      return arg1;
005e307f  }


005e30ba  struct D3DXMATRIX* __stdcall c_D3DXMatrixTransformation(struct D3DXMATRIX* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, struct D3DXQUATERNION const* arg6, struct D3DXVECTOR3 const* arg7)

005e30ba  {
005e30bc      int32_t __saved_ebx_1;
005e30bc      int32_t __saved_ebx = __saved_ebx_1;
005e30bf      int32_t ecx;
005e30bf      int32_t var_8 = ecx;
005e30c6      int32_t __saved_ebp_1;
005e30c6      int32_t __saved_ebp = __saved_ebp_1;
005e30cc      long double x87_r7 = ((long double)0);
005e30d6      int32_t esi;
005e30d6      int32_t var_dc = esi;
005e30d7      int32_t edi;
005e30d7      int32_t var_e0 = edi;
005e30d7      int32_t* esp_1 = &var_e0;
005e30d8      void var_90;
005e30d8      struct D3DXMATRIX* result;
005e30d8      
005e30d8      if (arg4 == 0)
005e30d8      {
005e32e9          result = arg1;
005e32ec          *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)x87_r7);
005e32f1          *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)((long double)0));
005e32f6          *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)((long double)0));
005e32fb          *(uint32_t*)((char*)result->__inner0 + 0x2c) = ((float)((long double)0));
005e3300          *(uint32_t*)((char*)result->__inner0 + 0x24) = ((float)((long double)0));
005e3305          *(uint32_t*)((char*)result->__inner0 + 0x20) = ((float)((long double)0));
005e330a          *(uint32_t*)((char*)result->__inner0 + 0x1c) = ((float)((long double)0));
005e330f          *(uint32_t*)((char*)result->__inner0 + 0x18) = ((float)((long double)0));
005e3314          *(uint32_t*)((char*)result->__inner0 + 0x10) = ((float)((long double)0));
005e3319          *(uint32_t*)((char*)result->__inner0 + 0xc) = ((float)((long double)0));
005e331e          *(uint32_t*)((char*)result->__inner0 + 8) = ((float)((long double)0));
005e3323          *(uint32_t*)((char*)result->__inner0 + 4) = ((float)((long double)0));
005e3328          *(uint32_t*)((char*)result->__inner0 + 0x3c) = ((float)((long double)1));
005e332d          *(uint32_t*)((char*)result->__inner0 + 0x28) = ((float)((long double)1));
005e3332          *(uint32_t*)((char*)result->__inner0 + 0x14) = ((float)((long double)1));
005e3337          *(uint32_t*)((char*)result->__inner0 + 0) = ((float)((long double)1));
005e30d8      }
005e30d8      else if (arg3 == 0)
005e30e2      {
005e3234          result = arg1;
005e3234          
005e3237          if (arg2 == 0)
005e3237          {
005e329d              *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)x87_r7);
005e32a2              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)((long double)0));
005e32a7              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)((long double)0));
005e32ac              *(uint32_t*)((char*)result->__inner0 + 0x2c) = ((float)((long double)0));
005e32b1              *(uint32_t*)((char*)result->__inner0 + 0x24) = ((float)((long double)0));
005e32b6              *(uint32_t*)((char*)result->__inner0 + 0x20) = ((float)((long double)0));
005e32bb              *(uint32_t*)((char*)result->__inner0 + 0x1c) = ((float)((long double)0));
005e32c0              *(uint32_t*)((char*)result->__inner0 + 0x18) = ((float)((long double)0));
005e32c5              *(uint32_t*)((char*)result->__inner0 + 0x10) = ((float)((long double)0));
005e32ca              *(uint32_t*)((char*)result->__inner0 + 0xc) = ((float)((long double)0));
005e32cf              *(uint32_t*)((char*)result->__inner0 + 8) = ((float)((long double)0));
005e32d4              *(uint32_t*)((char*)result->__inner0 + 4) = ((float)((long double)0));
005e32d9              *(uint32_t*)((char*)result->__inner0 + 0) = arg4->x;
005e32de              *(uint32_t*)((char*)result->__inner0 + 0x14) = arg4->y;
005e32e4              *(uint32_t*)((char*)result->__inner0 + 0x28) = arg4->z;
005e3237          }
005e3237          else
005e3237          {
005e3239              *(uint32_t*)((char*)result->__inner0 + 0x2c) = ((float)x87_r7);
005e323e              *(uint32_t*)((char*)result->__inner0 + 0x24) = ((float)((long double)0));
005e3243              *(uint32_t*)((char*)result->__inner0 + 0x20) = ((float)((long double)0));
005e3248              *(uint32_t*)((char*)result->__inner0 + 0x1c) = ((float)((long double)0));
005e324d              *(uint32_t*)((char*)result->__inner0 + 0x18) = ((float)((long double)0));
005e3252              *(uint32_t*)((char*)result->__inner0 + 0x10) = ((float)((long double)0));
005e3257              *(uint32_t*)((char*)result->__inner0 + 0xc) = ((float)((long double)0));
005e325c              *(uint32_t*)((char*)result->__inner0 + 8) = ((float)((long double)0));
005e3261              *(uint32_t*)((char*)result->__inner0 + 4) = ((float)((long double)0));
005e3268              *(uint32_t*)((char*)result->__inner0 + 0) = arg4->x;
005e326d              *(uint32_t*)((char*)result->__inner0 + 0x14) = arg4->y;
005e3273              *(uint32_t*)((char*)result->__inner0 + 0x28) = arg4->z;
005e327a              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)((((long double)1) - ((long double)arg4->x)) * ((long double)arg2->x)));
005e3285              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)((((long double)1) - ((long double)arg4->y)) * ((long double)arg2->y)));
005e3290              *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)((((long double)1) - ((long double)arg4->z)) * ((long double)arg2->z)));
005e3237          }
005e3237          
005e3295          *(uint32_t*)((char*)result->__inner0 + 0x3c) = ((float)((long double)1));
005e30e2      }
005e30e2      else
005e30e2      {
005e30e8          float var_18_1 = ((float)x87_r7);
005e30eb          float x = arg4->x;
005e30ef          struct D3DXQUATERNION* var_e4 = arg3;
005e30f2          float var_1c_1 = ((float)((long double)0));
005e30f5          float x_1 = x;
005e30fd          float var_20_1 = ((float)((long double)0));
005e3105          float z = arg4->z;
005e310b          float var_24_1 = ((float)((long double)0));
005e3111          float y = arg4->y;
005e3114          float var_2c_1 = ((float)((long double)0));
005e3119          float var_30_1 = ((float)((long double)0));
005e311e          float var_34_1 = ((float)((long double)0));
005e3123          float var_38_1 = ((float)((long double)0));
005e3128          float var_40_1 = ((float)((long double)0));
005e312d          float var_44_1 = ((float)((long double)0));
005e3132          float var_48_1 = ((float)((long double)0));
005e3137          float var_4c_1 = ((float)((long double)0));
005e313c          float var_14_1 = ((float)((long double)1));
005e313f          _D3DXMatrixRotationQuaternion@8(&var_90, var_e4);
005e314c          var_e4 = &var_90;
005e314c          
005e314d          if (arg2 == 0)
005e314d          {
005e320b              result = arg1;
005e320f              _D3DXMatrixTranspose@8(result);
005e321a              _D3DXMatrixMultiply@12(result, result, &x_1);
005e3225              _D3DXMatrixMultiply@12(result, result, &var_90);
005e3225              esp_1 = &var_e4;
005e314d          }
005e314d          else
005e314d          {
005e315a              void var_d0;
005e315a              _D3DXMatrixTranspose@8(&var_d0);
005e3161              result = arg1;
005e3164              *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)((long double)0));
005e316f              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)((long double)0));
005e3177              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)((long double)0));
005e317c              *(uint32_t*)((char*)result->__inner0 + 0x2c) = ((float)((long double)0));
005e3181              *(uint32_t*)((char*)result->__inner0 + 0x24) = ((float)((long double)0));
005e3186              *(uint32_t*)((char*)result->__inner0 + 0x20) = ((float)((long double)0));
005e318b              *(uint32_t*)((char*)result->__inner0 + 0x1c) = ((float)((long double)0));
005e3190              *(uint32_t*)((char*)result->__inner0 + 0x18) = ((float)((long double)0));
005e3195              *(uint32_t*)((char*)result->__inner0 + 0x10) = ((float)((long double)0));
005e319a              *(uint32_t*)((char*)result->__inner0 + 0xc) = ((float)((long double)0));
005e319f              *(uint32_t*)((char*)result->__inner0 + 8) = ((float)((long double)0));
005e31a4              *(uint32_t*)((char*)result->__inner0 + 4) = ((float)((long double)0));
005e31a9              *(uint32_t*)((char*)result->__inner0 + 0x3c) = ((float)((long double)1));
005e31ae              *(uint32_t*)((char*)result->__inner0 + 0x28) = ((float)((long double)1));
005e31b3              *(uint32_t*)((char*)result->__inner0 + 0x14) = ((float)((long double)1));
005e31b8              *(uint32_t*)((char*)result->__inner0 + 0) = ((float)((long double)1));
005e31be              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)-(((long double)arg2->x)));
005e31c6              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)-(((long double)arg2->y)));
005e31ce              *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)-(((long double)arg2->z)));
005e31d1              _D3DXMatrixMultiply@12(result, result, &var_d0);
005e31dc              _D3DXMatrixMultiply@12(result, result, &x_1);
005e31e7              _D3DXMatrixMultiply@12(result, result, &var_90);
005e31e7              esp_1 = &var_e4;
005e31f1              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x30)) + ((long double)arg2->x)));
005e31fa              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)(((long double)arg2->y) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x34))));
005e3203              *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x38)) + ((long double)arg2->z)));
005e314d          }
005e30e2      }
005e30e2      
005e333d      if (arg6 != 0)
005e333d      {
005e333f          *(uint32_t*)((char*)esp_1 - 4) = arg6;
005e3345          *(uint32_t*)((char*)esp_1 - 8) = &var_90;
005e3346          _D3DXMatrixRotationQuaternion@8();
005e334b          float* edi_2 = arg5;
005e3353          *(uint32_t*)((char*)esp_1 - 4) = &var_90;
005e3354          *(uint32_t*)((char*)esp_1 - 8) = result;
005e3355          *(uint32_t*)((char*)esp_1 - 0xc) = result;
005e3355          
005e3356          if (edi_2 == 0)
005e3393              _D3DXMatrixMultiply@12();
005e3356          else
005e3356          {
005e335d              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x30)) - ((long double)*(uint32_t*)edi_2)));
005e3366              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x34)) - ((long double)edi_2[1])));
005e336f              *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x38)) - ((long double)edi_2[2])));
005e3372              _D3DXMatrixMultiply@12();
005e337c              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x30)) + ((long double)*(uint32_t*)edi_2)));
005e3385              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x34)) + ((long double)edi_2[1])));
005e338e              *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x38)) + ((long double)edi_2[2])));
005e3356          }
005e333d      }
005e333d      
005e3398      float* eax_3 = arg7;
005e3398      
005e339d      if (eax_3 != 0)
005e339d      {
005e33a4          *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x30)) + ((long double)*(uint32_t*)eax_3)));
005e33ad          *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)(((long double)eax_3[1]) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x34))));
005e33b6          *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)(((long double)eax_3[2]) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x38))));
005e339d      }
005e339d      
005e33b9      *(uint32_t*)esp_1;
005e33b9      esp_1[1];
005e33c3      return result;
005e30ba  }


005e33c6  struct D3DXMATRIX* __stdcall c_D3DXMatrixTransformation2D(struct D3DXMATRIX* arg1, struct D3DXVECTOR2 const* arg2, float arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6, struct D3DXVECTOR2 const* arg7)

005e33c6  {
005e33c8      int32_t __saved_ebx_1;
005e33c8      int32_t __saved_ebx = __saved_ebx_1;
005e33cb      int32_t ecx;
005e33cb      int32_t var_8 = ecx;
005e33d2      int32_t __saved_ebp_1;
005e33d2      int32_t __saved_ebp = __saved_ebp_1;
005e33d5      struct D3DXVECTOR2* ecx_1 = arg4;
005e33e0      int32_t esi;
005e33e0      int32_t var_dc = esi;
005e33e1      int32_t edi;
005e33e1      int32_t var_e0 = edi;
005e33e1      int32_t* esp_1 = &var_e0;
005e33e2      void var_90;
005e33e2      float* eax;
005e33e2      struct D3DXMATRIX* result;
005e33e2      
005e33e2      if (ecx_1 == 0)
005e33e2      {
005e35eb          result = arg1;
005e35f0          *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)((long double)0));
005e35f5          *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)((long double)0));
005e35fa          *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)((long double)0));
005e35ff          *(uint32_t*)((char*)result->__inner0 + 0x2c) = ((float)((long double)0));
005e3604          *(uint32_t*)((char*)result->__inner0 + 0x24) = ((float)((long double)0));
005e3609          *(uint32_t*)((char*)result->__inner0 + 0x20) = ((float)((long double)0));
005e360e          *(uint32_t*)((char*)result->__inner0 + 0x1c) = ((float)((long double)0));
005e3613          *(uint32_t*)((char*)result->__inner0 + 0x18) = ((float)((long double)0));
005e3618          *(uint32_t*)((char*)result->__inner0 + 0x10) = ((float)((long double)0));
005e361d          *(uint32_t*)((char*)result->__inner0 + 0xc) = ((float)((long double)0));
005e3622          *(uint32_t*)((char*)result->__inner0 + 8) = ((float)((long double)0));
005e3627          *(uint32_t*)((char*)result->__inner0 + 4) = ((float)((long double)0));
005e362c          *(uint32_t*)((char*)result->__inner0 + 0x3c) = ((float)((long double)1));
005e3631          *(uint32_t*)((char*)result->__inner0 + 0x28) = ((float)((long double)1));
005e3636          *(uint32_t*)((char*)result->__inner0 + 0x14) = ((float)((long double)1));
005e363b          *(uint32_t*)((char*)result->__inner0 + 0) = ((float)((long double)1));
005e33e2      }
005e33e2      else
005e33e2      {
005e33e8          long double x87_r7 = ((long double)arg3);
005e33eb          long double x87_r6_1 = ((long double)0f);
005e33f1          (x87_r6_1 - x87_r7);
005e33f3          long double x87_r7_1 = ((long double)0);
005e33f5          bool c1;
005e33f5          eax = ((((x87_r6_1 < x87_r7) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7) ? 1 : 0) << 0xe) | 0x3800))));
005e33f7          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005e33f7          
005e33fa          if (!(p_1))
005e33fa          {
005e3539              eax = arg2;
005e353e              result = arg1;
005e353e              
005e3541              if (eax == 0)
005e3541              {
005e35a0                  *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)x87_r7_1);
005e35a5                  *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)((long double)0));
005e35aa                  *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)((long double)0));
005e35af                  *(uint32_t*)((char*)result->__inner0 + 0x2c) = ((float)((long double)0));
005e35b4                  *(uint32_t*)((char*)result->__inner0 + 0x24) = ((float)((long double)0));
005e35b9                  *(uint32_t*)((char*)result->__inner0 + 0x20) = ((float)((long double)0));
005e35be                  *(uint32_t*)((char*)result->__inner0 + 0x1c) = ((float)((long double)0));
005e35c3                  *(uint32_t*)((char*)result->__inner0 + 0x18) = ((float)((long double)0));
005e35c8                  *(uint32_t*)((char*)result->__inner0 + 0x10) = ((float)((long double)0));
005e35cd                  *(uint32_t*)((char*)result->__inner0 + 0xc) = ((float)((long double)0));
005e35d2                  *(uint32_t*)((char*)result->__inner0 + 8) = ((float)((long double)0));
005e35d7                  *(uint32_t*)((char*)result->__inner0 + 4) = ((float)((long double)0));
005e35de                  *(uint32_t*)((char*)result->__inner0 + 0) = ecx_1->x;
005e35e3                  *(uint32_t*)((char*)result->__inner0 + 0x28) = ((float)((long double)1));
005e35e6                  *(uint32_t*)((char*)result->__inner0 + 0x14) = ecx_1->y;
005e3541              }
005e3541              else
005e3541              {
005e3543                  *(uint32_t*)((char*)result->__inner0 + 0x2c) = ((float)x87_r7_1);
005e3548                  *(uint32_t*)((char*)result->__inner0 + 0x24) = ((float)((long double)0));
005e354d                  *(uint32_t*)((char*)result->__inner0 + 0x20) = ((float)((long double)0));
005e3552                  *(uint32_t*)((char*)result->__inner0 + 0x1c) = ((float)((long double)0));
005e3557                  *(uint32_t*)((char*)result->__inner0 + 0x18) = ((float)((long double)0));
005e355c                  *(uint32_t*)((char*)result->__inner0 + 0x10) = ((float)((long double)0));
005e3561                  *(uint32_t*)((char*)result->__inner0 + 0xc) = ((float)((long double)0));
005e3566                  *(uint32_t*)((char*)result->__inner0 + 8) = ((float)((long double)0));
005e356b                  *(uint32_t*)((char*)result->__inner0 + 4) = ((float)((long double)0));
005e3572                  *(uint32_t*)((char*)result->__inner0 + 0) = ecx_1->x;
005e3577                  *(uint32_t*)((char*)result->__inner0 + 0x28) = ((float)((long double)1));
005e357a                  *(uint32_t*)((char*)result->__inner0 + 0x14) = ecx_1->y;
005e3583                  *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)((((long double)1) - ((long double)ecx_1->x)) * ((long double)*(uint32_t*)eax)));
005e358e                  *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)((((long double)1) - ((long double)ecx_1->y)) * ((long double)eax[1])));
005e3593                  *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)((long double)0));
005e3541              }
005e3541              
005e3598              *(uint32_t*)((char*)result->__inner0 + 0x3c) = ((float)((long double)1));
005e33fa          }
005e33fa          else
005e33fa          {
005e3400              float var_18_1 = ((float)x87_r7_1);
005e3407              float x = ecx_1->x;
005e340a              float var_1c_1 = ((float)((long double)0));
005e340d              float y = ecx_1->y;
005e3412              struct D3DXVECTOR2* var_e4 = ecx_1;
005e3413              float var_20_1 = ((float)((long double)0));
005e3416              float y_1 = y;
005e341e              float var_24_1 = ((float)((long double)0));
005e3423              float var_2c_1 = ((float)((long double)0));
005e3428              float var_30_1 = ((float)((long double)0));
005e342d              float var_34_1 = ((float)((long double)0));
005e3432              float var_38_1 = ((float)((long double)0));
005e3437              float var_40_1 = ((float)((long double)0));
005e343c              float var_44_1 = ((float)((long double)0));
005e3441              float var_48_1 = ((float)((long double)0));
005e3446              float var_4c_1 = ((float)((long double)0));
005e344b              float var_28_1 = ((float)((long double)1));
005e3450              float var_14_1 = ((float)((long double)1));
005e3456              var_e4 = ((float)((long double)arg3));
005e345a              _D3DXMatrixRotationZ@8(&var_90, var_e4);
005e3467              var_e4 = &var_90;
005e3467              
005e3468              if (arg2 == 0)
005e3468              {
005e3515                  result = arg1;
005e3519                  _D3DXMatrixTranspose@8(result);
005e3524                  _D3DXMatrixMultiply@12(result, result, &x);
005e352f                  eax = _D3DXMatrixMultiply@12(result, result, &var_90);
005e352f                  esp_1 = &var_e4;
005e3468              }
005e3468              else
005e3468              {
005e3475                  void var_d0;
005e3475                  _D3DXMatrixTranspose@8(&var_d0);
005e347c                  result = arg1;
005e347f                  *(uint32_t*)((char*)result->__inner0 + 0x38) = ((float)((long double)0));
005e348a                  *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)((long double)0));
005e3492                  *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)((long double)0));
005e3497                  *(uint32_t*)((char*)result->__inner0 + 0x2c) = ((float)((long double)0));
005e349c                  *(uint32_t*)((char*)result->__inner0 + 0x24) = ((float)((long double)0));
005e34a1                  *(uint32_t*)((char*)result->__inner0 + 0x20) = ((float)((long double)0));
005e34a6                  *(uint32_t*)((char*)result->__inner0 + 0x1c) = ((float)((long double)0));
005e34ab                  *(uint32_t*)((char*)result->__inner0 + 0x18) = ((float)((long double)0));
005e34b0                  *(uint32_t*)((char*)result->__inner0 + 0x10) = ((float)((long double)0));
005e34b5                  *(uint32_t*)((char*)result->__inner0 + 0xc) = ((float)((long double)0));
005e34ba                  *(uint32_t*)((char*)result->__inner0 + 8) = ((float)((long double)0));
005e34bf                  *(uint32_t*)((char*)result->__inner0 + 4) = ((float)((long double)0));
005e34c4                  *(uint32_t*)((char*)result->__inner0 + 0x3c) = ((float)((long double)1));
005e34c9                  *(uint32_t*)((char*)result->__inner0 + 0x28) = ((float)((long double)1));
005e34ce                  *(uint32_t*)((char*)result->__inner0 + 0x14) = ((float)((long double)1));
005e34d3                  *(uint32_t*)((char*)result->__inner0 + 0) = ((float)((long double)1));
005e34d9                  *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)-(((long double)arg2->x)));
005e34e1                  *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)-(((long double)arg2->y)));
005e34e4                  _D3DXMatrixMultiply@12(result, result, &var_d0);
005e34ef                  _D3DXMatrixMultiply@12(result, result, &x);
005e34fa                  eax = _D3DXMatrixMultiply@12(result, result, &var_90);
005e34fa                  esp_1 = &var_e4;
005e3504                  *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)(((long double)arg2->x) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x30))));
005e350d                  *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)(((long double)arg2->y) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x34))));
005e3468              }
005e33fa          }
005e33e2      }
005e33e2      
005e363d      long double x87_r7_85 = ((long double)arg6);
005e3640      long double x87_r6_2 = ((long double)0f);
005e3646      (x87_r6_2 - x87_r7_85);
005e3648      eax = ((((x87_r6_2 < x87_r7_85) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_85))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_85) ? 1 : 0) << 0xe) | 0))));
005e364a      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
005e364a      
005e364d      if (p_2)
005e364d      {
005e3652          *(uint32_t*)((char*)esp_1 - 4) = ecx_1;
005e3656          *(uint32_t*)((char*)esp_1 - 4) = ((float)((long double)arg6));
005e3659          *(uint32_t*)((char*)esp_1 - 8) = &var_90;
005e365a          _D3DXMatrixRotationZ@8();
005e365f          float* edi_2 = arg5;
005e3667          *(uint32_t*)((char*)esp_1 - 4) = &var_90;
005e3668          *(uint32_t*)((char*)esp_1 - 8) = result;
005e3669          *(uint32_t*)((char*)esp_1 - 0xc) = result;
005e3669          
005e366a          if (edi_2 == 0)
005e3695              _D3DXMatrixMultiply@12();
005e366a          else
005e366a          {
005e3671              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x30)) - ((long double)*(uint32_t*)edi_2)));
005e367a              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)(((long double)*(uint32_t*)((char*)result->__inner0 + 0x34)) - ((long double)edi_2[1])));
005e367d              _D3DXMatrixMultiply@12();
005e3687              *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)edi_2) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x30))));
005e3690              *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)(((long double)edi_2[1]) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x34))));
005e366a          }
005e364d      }
005e364d      
005e369a      float* eax_3 = arg7;
005e369a      
005e369f      if (eax_3 != 0)
005e369f      {
005e36a6          *(uint32_t*)((char*)result->__inner0 + 0x30) = ((float)(((long double)*(uint32_t*)eax_3) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x30))));
005e36af          *(uint32_t*)((char*)result->__inner0 + 0x34) = ((float)(((long double)eax_3[1]) + ((long double)*(uint32_t*)((char*)result->__inner0 + 0x34))));
005e369f      }
005e369f      
005e36b2      *(uint32_t*)esp_1;
005e36b2      esp_1[1];
005e36bc      return result;
005e33c6  }


005e36bf  struct D3DXMATRIX* __stdcall c_D3DXMatrixShadow(struct D3DXMATRIX* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXPLANE const* arg3)

005e36bf  {
005e36c8      int32_t edi;
005e36c8      int32_t var_2c = edi;
005e36d0      float var_14;
005e36d0      _D3DXPlaneNormalize@8(&var_14, arg3);
005e36fc      float var_10;
005e36fc      float var_c;
005e36fc      float var_8;
005e36fc      long double x87_r7_4 = ((((((long double)var_10) * ((long double)arg2->y)) + (((long double)var_14) * ((long double)arg2->x))) + (((long double)var_8) * ((long double)arg2->w))) + (((long double)var_c) * ((long double)arg2->z)));
005e3703      float var_24 = ((float)-(((long double)var_14)));
005e370b      float var_20 = ((float)-(((long double)var_10)));
005e3713      float var_1c = ((float)-(((long double)var_c)));
005e371b      float var_18 = ((float)-(((long double)var_8)));
005e371e      var_14 = var_24;
005e371e      float* edi_1 = &var_10;
005e371e      float* esi = &var_20;
005e371f      *(uint32_t*)edi_1 = *(uint32_t*)esi;
005e371f      void* edi_2 = &edi_1[1];
005e371f      void* esi_1 = &esi[1];
005e3720      *(uint32_t*)edi_2 = *(uint32_t*)esi_1;
005e3721      *(uint32_t*)((char*)edi_2 + 4) = *(uint32_t*)((char*)esi_1 + 4);
005e3729      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)((((long double)var_14) * ((long double)arg2->x)) + x87_r7_4));
005e3730      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)(((long double)var_10) * ((long double)arg2->x)));
005e3738      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)(((long double)var_c) * ((long double)arg2->x)));
005e3740      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)(((long double)var_8) * ((long double)arg2->x)));
005e3749      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)(((long double)var_14) * ((long double)arg2->y)));
005e3754      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)((((long double)var_10) * ((long double)arg2->y)) + x87_r7_4));
005e375d      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)(((long double)var_c) * ((long double)arg2->y)));
005e3766      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)(((long double)var_8) * ((long double)arg2->y)));
005e376f      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)(((long double)var_14) * ((long double)arg2->z)));
005e3778      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)(((long double)var_10) * ((long double)arg2->z)));
005e3783      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)((((long double)var_c) * ((long double)arg2->z)) + x87_r7_4));
005e378c      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)(((long double)var_8) * ((long double)arg2->z)));
005e3795      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)(((long double)var_14) * ((long double)arg2->w)));
005e379e      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)(((long double)var_10) * ((long double)arg2->w)));
005e37a9      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)(((long double)var_c) * ((long double)arg2->w)));
005e37b4      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((((long double)var_8) * ((long double)arg2->w)) + x87_r7_4));
005e37ba      return arg1;
005e36bf  }


005e37bd  struct D3DXMATRIX* __stdcall c_D3DXMatrixReflect(struct D3DXMATRIX* arg1, struct D3DXPLANE const* arg2)

005e37bd  {
005e37cc      float var_14;
005e37cc      _D3DXPlaneNormalize@8(&var_14, arg2);
005e37d4      long double x87_r7_1 = (((long double)var_14) * ((long double)-2f));
005e37e0      float var_10;
005e37e0      long double x87_r6_1 = (((long double)var_10) * ((long double)-2f));
005e37e9      float var_c;
005e37e9      long double x87_r5_1 = (((long double)var_c) * ((long double)-2f));
005e37f2      long double x87_r4 = ((long double)1f);
005e37ff      *(uint32_t*)((char*)arg1->__inner0 + 0) = ((float)((((long double)var_14) * x87_r7_1) + x87_r4));
005e3806      *(uint32_t*)((char*)arg1->__inner0 + 4) = ((float)(x87_r6_1 * ((long double)var_14)));
005e380e      *(uint32_t*)((char*)arg1->__inner0 + 8) = ((float)(x87_r5_1 * ((long double)var_14)));
005e3813      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = ((float)((long double)0));
005e381b      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = ((float)(((long double)var_10) * x87_r7_1));
005e3825      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = ((float)((((long double)var_10) * x87_r6_1) + x87_r4));
005e382d      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = ((float)(x87_r5_1 * ((long double)var_10)));
005e3832      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = ((float)((long double)0));
005e383a      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = ((float)(((long double)var_c) * x87_r7_1));
005e3842      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = ((float)(((long double)var_c) * x87_r6_1));
005e384c      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = ((float)((((long double)var_c) * x87_r5_1) + x87_r4));
005e3855      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = ((float)((long double)0));
005e385d      float var_8;
005e385d      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = ((float)(((long double)var_8) * x87_r7_1));
005e3865      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = ((float)(((long double)var_8) * x87_r4));
005e3872      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = ((float)(((long double)var_8) * ((long double)((float)x87_r5_1))));
005e3877      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = ((float)((long double)1));
005e387b      return arg1;
005e37bd  }


005e387e  void __stdcall c_D3DXQuaternionSquadSetup(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION* arg2, struct D3DXQUATERNION* arg3, struct D3DXQUATERNION const* arg4, struct D3DXQUATERNION const* arg5, struct D3DXQUATERNION const* arg6, struct D3DXQUATERNION const* arg7)

005e387e  {
005e388d      int32_t edi;
005e388d      int32_t var_ac = edi;
005e3891      float x = arg4->x;
005e3891      float var_80;
005e3891      int32_t* edi_1 = &var_80;
005e3891      float* esi_1 = &arg4->y;
005e3892      *(uint32_t*)edi_1 = ADJ(esi_1)->y;
005e3892      void* edi_2 = &edi_1[1];
005e3892      float* esi_2 = &esi_1[1];
005e3893      *(uint32_t*)edi_2 = ADJ(esi_2)->z;
005e3894      *(uint32_t*)((char*)edi_2 + 4) = (&esi_2[1] - 0xc)->w;
005e389b      float x_2 = arg5->x;
005e389b      float var_50;
005e389b      int32_t* edi_5 = &var_50;
005e389b      float* esi_6 = &arg5->y;
005e389c      *(uint32_t*)edi_5 = ADJ(esi_6)->y;
005e389c      void* edi_6 = &edi_5[1];
005e389c      float* esi_7 = &esi_6[1];
005e389d      *(uint32_t*)edi_6 = ADJ(esi_7)->z;
005e389e      *(uint32_t*)((char*)edi_6 + 4) = esi_7[1];
005e38a2      long double x87_r7_1 = (((long double)x_2) + ((long double)x));
005e38ab      long double x87_r6_1 = (((long double)var_50) + ((long double)var_80));
005e38b4      float x_3 = arg6->x;
005e38b4      float var_20;
005e38b4      int32_t* edi_9 = &var_20;
005e38b4      float* esi_11 = &arg6->y;
005e38b5      float var_7c;
005e38b5      float var_4c;
005e38b5      long double x87_r5_1 = (((long double)var_4c) + ((long double)var_7c));
005e38bb      float var_78;
005e38bb      float var_48;
005e38bb      long double x87_r4_1 = (((long double)var_48) + ((long double)var_78));
005e38be      long double x87_r3 = ((long double)x);
005e38c1      *(uint32_t*)edi_9 = ADJ(esi_11)->y;
005e38c1      void* edi_10 = &edi_9[1];
005e38c1      float* esi_12 = &esi_11[1];
005e38c2      long double x87_r3_1 = (x87_r3 - ((long double)x_2));
005e38c8      long double x87_r2_1 = (((long double)var_80) - ((long double)var_50));
005e38cb      *(uint32_t*)edi_10 = ADJ(esi_12)->z;
005e38cc      float var_10 = ((float)x87_r2_1);
005e38d5      *(uint32_t*)((char*)edi_10 + 4) = (&esi_12[1] - 0xc)->w;
005e38d6      float var_c = ((float)(((long double)var_7c) - ((long double)var_4c)));
005e38df      long double x87_r2_5 = (((long double)var_78) - ((long double)var_48));
005e38e5      float x_1 = arg7->x;
005e38e5      float var_70;
005e38e5      int32_t* edi_13 = &var_70;
005e38e5      float* esi_16 = &arg7->y;
005e38e6      float var_8 = ((float)x87_r2_5);
005e38ed      *(uint32_t*)edi_13 = ADJ(esi_16)->y;
005e38ed      void* edi_14 = &edi_13[1];
005e38ed      float* esi_17 = &esi_16[1];
005e38f2      *(uint32_t*)edi_14 = ADJ(esi_17)->z;
005e38f9      *(uint32_t*)((char*)edi_14 + 4) = (&esi_17[1] - 0xc)->w;
005e3900      long double x87_r2_10 = ((((x87_r4_1 * x87_r4_1) + (x87_r5_1 * x87_r5_1)) + (x87_r6_1 * x87_r6_1)) + (x87_r7_1 * x87_r7_1));
005e391c      long double x87_r1_10 = ((((((long double)var_8) * ((long double)var_8)) + (((long double)var_c) * ((long double)var_c))) + (((long double)var_10) * ((long double)var_10))) + (x87_r3_1 * x87_r3_1));
005e391e      (x87_r1_10 - x87_r2_10);
005e392f      float x_4;
005e392f      float var_30;
005e392f      float var_28;
005e392f      bool c1;
005e392f      
005e392f      if ((*(uint8_t*)((char*)((((x87_r1_10 < x87_r2_10) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_10, x87_r2_10))) ? 1 : 0) << 0xa) | ((((x87_r1_10 == x87_r2_10) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
005e392f      {
005e393c          x_4 = ((float)-(((long double)x)));
005e3944          var_30 = ((float)-(((long double)var_80)));
005e394c          float var_2c_1 = ((float)-(((long double)var_7c)));
005e3954          var_28 = ((float)-(((long double)var_78)));
005e3957          x = x_4;
005e3957          float* edi_17 = &var_80;
005e3957          float* esi_20 = &var_30;
005e3958          *(uint32_t*)edi_17 = *(uint32_t*)esi_20;
005e3958          void* edi_18 = &edi_17[1];
005e3958          void* esi_21 = &esi_20[1];
005e3959          *(uint32_t*)edi_18 = *(uint32_t*)esi_21;
005e395a          *(uint32_t*)((char*)edi_18 + 4) = *(uint32_t*)((char*)esi_21 + 4);
005e392f      }
005e392f      
005e395e      long double x87_r7_12 = (((long double)x_3) + ((long double)x_2));
005e3964      long double x87_r6_4 = (((long double)var_20) + ((long double)var_50));
005e396a      float var_1c;
005e396a      long double x87_r5_4 = (((long double)var_1c) + ((long double)var_4c));
005e3970      float var_18;
005e3970      long double x87_r4_4 = (((long double)var_18) + ((long double)var_48));
005e3976      long double x87_r3_3 = (((long double)x_2) - ((long double)x_3));
005e397f      float var_10_1 = ((float)(((long double)var_50) - ((long double)var_20)));
005e3988      float var_c_1 = ((float)(((long double)var_4c) - ((long double)var_1c)));
005e3991      float var_8_1 = ((float)(((long double)var_48) - ((long double)var_18)));
005e39a8      long double x87_r2_21 = ((((x87_r4_4 * x87_r4_4) + (x87_r5_4 * x87_r5_4)) + (x87_r6_4 * x87_r6_4)) + (x87_r7_12 * x87_r7_12));
005e39c4      long double x87_r1_21 = ((((((long double)var_8_1) * ((long double)var_8_1)) + (((long double)var_c_1) * ((long double)var_c_1))) + (((long double)var_10_1) * ((long double)var_10_1))) + (x87_r3_3 * x87_r3_3));
005e39c6      (x87_r1_21 - x87_r2_21);
005e39c6      
005e39d7      if ((*(uint8_t*)((char*)((((x87_r1_21 < x87_r2_21) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_21, x87_r2_21))) ? 1 : 0) << 0xa) | ((((x87_r1_21 == x87_r2_21) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
005e39d7      {
005e39e4          x_4 = ((float)-(((long double)x_3)));
005e39ec          var_30 = ((float)-(((long double)var_20)));
005e39f4          float var_2c_2 = ((float)-(((long double)var_1c)));
005e39fc          var_28 = ((float)-(((long double)var_18)));
005e39ff          x_3 = x_4;
005e39ff          float* edi_21 = &var_20;
005e39ff          float* esi_24 = &var_30;
005e3a00          *(uint32_t*)edi_21 = *(uint32_t*)esi_24;
005e3a00          void* edi_22 = &edi_21[1];
005e3a00          void* esi_25 = &esi_24[1];
005e3a01          *(uint32_t*)edi_22 = *(uint32_t*)esi_25;
005e3a02          *(uint32_t*)((char*)edi_22 + 4) = *(uint32_t*)((char*)esi_25 + 4);
005e39d7      }
005e39d7      
005e3a06      long double x87_r7_23 = (((long double)x_1) + ((long double)x_3));
005e3a0c      long double x87_r6_7 = (((long double)var_70) + ((long double)var_20));
005e3a12      float var_6c;
005e3a12      long double x87_r5_7 = (((long double)var_6c) + ((long double)var_1c));
005e3a18      float var_68;
005e3a18      long double x87_r4_7 = (((long double)var_68) + ((long double)var_18));
005e3a1e      long double x87_r3_5 = (((long double)x_3) - ((long double)x_1));
005e3a27      float var_10_2 = ((float)(((long double)var_20) - ((long double)var_70)));
005e3a30      float var_c_2 = ((float)(((long double)var_1c) - ((long double)var_6c)));
005e3a39      float var_8_2 = ((float)(((long double)var_18) - ((long double)var_68)));
005e3a50      long double x87_r2_32 = ((((x87_r4_7 * x87_r4_7) + (x87_r5_7 * x87_r5_7)) + (x87_r6_7 * x87_r6_7)) + (x87_r7_23 * x87_r7_23));
005e3a6c      long double x87_r1_32 = ((((((long double)var_8_2) * ((long double)var_8_2)) + (((long double)var_c_2) * ((long double)var_c_2))) + (((long double)var_10_2) * ((long double)var_10_2))) + (x87_r3_5 * x87_r3_5));
005e3a6e      (x87_r1_32 - x87_r2_32);
005e3a6e      
005e3a7f      if ((*(uint8_t*)((char*)((((x87_r1_32 < x87_r2_32) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r1_32, x87_r2_32))) ? 1 : 0) << 0xa) | ((((x87_r1_32 == x87_r2_32) ? 1 : 0) << 0xe) | 0x3000)))))[1] & 0x41) == 0)
005e3a7f      {
005e3a8c          x_4 = ((float)-(((long double)x_1)));
005e3a94          var_30 = ((float)-(((long double)var_70)));
005e3a9c          float var_2c_3 = ((float)-(((long double)var_6c)));
005e3aa4          var_28 = ((float)-(((long double)var_68)));
005e3aa7          x_1 = x_4;
005e3aa7          float* edi_25 = &var_70;
005e3aa7          float* esi_28 = &var_30;
005e3aa8          *(uint32_t*)edi_25 = *(uint32_t*)esi_28;
005e3aa8          void* edi_26 = &edi_25[1];
005e3aa8          void* esi_29 = &esi_28[1];
005e3aa9          *(uint32_t*)edi_26 = *(uint32_t*)esi_29;
005e3aaa          *(uint32_t*)((char*)edi_26 + 4) = *(uint32_t*)((char*)esi_29 + 4);
005e3a7f      }
005e3a7f      
005e3ab3      _D3DXQuaternionInverse@8(&x_4, &x_2);
005e3ac4      float var_44;
005e3ac4      _D3DXQuaternionMultiply@12(&var_44, &x_4, &x);
005e3acf      float var_64 = var_44;
005e3acf      float var_60;
005e3acf      int32_t* edi_29 = &var_60;
005e3acf      float var_40;
005e3acf      float* esi_32 = &var_40;
005e3ad0      *(uint32_t*)edi_29 = *(uint32_t*)esi_32;
005e3ad0      void* edi_30 = &edi_29[1];
005e3ad0      void* esi_33 = &esi_32[1];
005e3ad4      *(uint32_t*)edi_30 = *(uint32_t*)esi_33;
005e3add      *(uint32_t*)((char*)edi_30 + 4) = *(uint32_t*)((char*)esi_33 + 4);
005e3ade      float var_94;
005e3ade      _D3DXQuaternionLn@8(&var_94, &var_64);
005e3aef      _D3DXQuaternionMultiply@12(&var_44, &x_4, &x_3);
005e3afa      var_64 = var_44;
005e3afa      int32_t* edi_33 = &var_60;
005e3afa      float* esi_36 = &var_40;
005e3afb      *(uint32_t*)edi_33 = *(uint32_t*)esi_36;
005e3afb      void* edi_34 = &edi_33[1];
005e3afb      void* esi_37 = &esi_36[1];
005e3aff      *(uint32_t*)edi_34 = *(uint32_t*)esi_37;
005e3b05      *(uint32_t*)((char*)edi_34 + 4) = *(uint32_t*)((char*)esi_37 + 4);
005e3b06      float var_14;
005e3b06      _D3DXQuaternionLn@8(&var_14, &var_64);
005e3b15      long double x87_r7_34 = (((long double)var_94) + ((long double)var_14));
005e3b28      float var_90;
005e3b28      var_40 = ((float)(((long double)var_90) + ((long double)var_10_2)));
005e3b34      float var_8c;
005e3b34      float var_3c = ((float)(((long double)var_8c) + ((long double)var_c_2)));
005e3b3d      float var_88;
005e3b3d      long double x87_r6_14 = (((long double)var_88) + ((long double)var_8_2));
005e3b40      long double x87_r5_9 = ((long double)-0.25f);
005e3b4a      var_64 = ((float)(x87_r7_34 * x87_r5_9));
005e3b52      var_60 = ((float)(((long double)var_40) * x87_r5_9));
005e3b5a      float var_5c = ((float)(((long double)var_3c) * x87_r5_9));
005e3b61      float var_58 = ((float)(x87_r6_14 * x87_r5_9));
005e3b6a      void var_a4;
005e3b6a      _D3DXQuaternionExp@8(&var_a4, &var_64);
005e3b7e      _D3DXQuaternionMultiply@12(&var_44, &x_2, &var_a4);
005e3b89      arg1->x = var_44;
005e3b89      float* edi_38 = &arg1->y;
005e3b89      float* esi_40 = &var_40;
005e3c79      ADJ(edi_38)->y = *(uint32_t*)esi_40;
005e3b8a      float* edi_39 = &edi_38[1];
005e3b8a      void* esi_41 = &esi_40[1];
005e3c79      ADJ(edi_39)->z = *(uint32_t*)esi_41;
005e3c79      (&edi_39[1] - 0xc)->w = *(uint32_t*)((char*)esi_41 + 4);
005e3b95      _D3DXQuaternionInverse@8(&x_4, &x_3);
005e3ba6      _D3DXQuaternionMultiply@12(&var_44, &x_4, &x_2);
005e3bb1      var_64 = var_44;
005e3bb1      float* edi_42 = &var_60;
005e3bb1      float* esi_44 = &var_40;
005e3bb2      *(uint32_t*)edi_42 = *(uint32_t*)esi_44;
005e3bb2      void* edi_43 = &edi_42[1];
005e3bb2      void* esi_45 = &esi_44[1];
005e3bb6      *(uint32_t*)edi_43 = *(uint32_t*)esi_45;
005e3bbf      *(uint32_t*)((char*)edi_43 + 4) = *(uint32_t*)((char*)esi_45 + 4);
005e3bc0      _D3DXQuaternionLn@8(&var_94, &var_64);
005e3bd1      _D3DXQuaternionMultiply@12(&var_44, &x_4, &x_1);
005e3bdc      var_64 = var_44;
005e3bdc      float* edi_46 = &var_60;
005e3bdc      float* esi_48 = &var_40;
005e3bdd      *(uint32_t*)edi_46 = *(uint32_t*)esi_48;
005e3bdd      void* edi_47 = &edi_46[1];
005e3bdd      void* esi_49 = &esi_48[1];
005e3be1      *(uint32_t*)edi_47 = *(uint32_t*)esi_49;
005e3be7      *(uint32_t*)((char*)edi_47 + 4) = *(uint32_t*)((char*)esi_49 + 4);
005e3be8      _D3DXQuaternionLn@8(&var_14, &var_64);
005e3bf7      long double x87_r7_37 = (((long double)var_94) + ((long double)var_14));
005e3c0a      var_40 = ((float)(((long double)var_90) + ((long double)var_10_2)));
005e3c16      float var_3c_1 = ((float)(((long double)var_8c) + ((long double)var_c_2)));
005e3c1f      long double x87_r6_21 = (((long double)var_88) + ((long double)var_8_2));
005e3c22      long double x87_r5_10 = ((long double)-0.25f);
005e3c2c      var_64 = ((float)(x87_r7_37 * x87_r5_10));
005e3c34      var_60 = ((float)(((long double)var_40) * x87_r5_10));
005e3c3c      float var_5c_1 = ((float)(((long double)var_3c_1) * x87_r5_10));
005e3c43      var_58 = ((float)(x87_r6_21 * x87_r5_10));
005e3c4c      _D3DXQuaternionExp@8(&var_a4, &var_64);
005e3c60      _D3DXQuaternionMultiply@12(&var_44, &x_3, &var_a4);
005e3c65      float* edi_50 = arg2;
005e3c6b      *(uint32_t*)edi_50 = var_44;
005e3c6b      void* edi_51 = &edi_50[1];
005e3c6b      float* esi_52 = &var_40;
005e3c6c      *(uint32_t*)edi_51 = *(uint32_t*)esi_52;
005e3c6c      void* edi_52 = ((char*)edi_51 + 4);
005e3c6c      void* esi_53 = &esi_52[1];
005e3c6d      *(uint32_t*)edi_52 = *(uint32_t*)esi_53;
005e3c6e      *(uint32_t*)((char*)edi_52 + 4) = *(uint32_t*)((char*)esi_53 + 4);
005e3c6f      float* edi_55 = arg3;
005e3c75      *(uint32_t*)edi_55 = x_3;
005e3c75      void* edi_56 = &edi_55[1];
005e3c75      float* esi_56 = &var_20;
005e3c76      *(uint32_t*)edi_56 = *(uint32_t*)esi_56;
005e3c76      void* edi_57 = ((char*)edi_56 + 4);
005e3c76      void* esi_57 = &esi_56[1];
005e3c77      *(uint32_t*)edi_57 = *(uint32_t*)esi_57;
005e3c78      *(uint32_t*)((char*)edi_57 + 4) = *(uint32_t*)((char*)esi_57 + 4);
005e387e  }


005e3c7f  void __stdcall D3DXMesh::SwapFaceNeighbors(uint32_t arg1, uint32_t arg2, unsigned long* arg3)

005e3c7f  {
005e3c8d      void* edx = &arg3[(arg1 * 3)];
005e3c94      int32_t edi;
005e3c94      int32_t var_c = edi;
005e3c9d      void* eax_4 = edx;
005e3c9f      void* ecx_2 = (&arg3[(arg2 * 3)] - edx);
005e3ca1      int32_t i_1 = 3;
005e3cb0      int32_t i;
005e3cb0      
005e3cb0      do
005e3cb0      {
005e3ca4          int32_t edx_1 = *(uint32_t*)((char*)ecx_2 + eax_4);
005e3ca7          *(uint32_t*)((char*)ecx_2 + eax_4) = *(uint32_t*)eax_4;
005e3caa          *(uint32_t*)eax_4 = edx_1;
005e3cac          eax_4 += 4;
005e3caf          i = i_1;
005e3caf          i_1 -= 1;
005e3cb0      } while (i != 1);
005e3c7f  }


005e3cb8  void __stdcall D3DXMesh::RemapFaceNeighbors(uint32_t arg1, uint32_t* arg2, unsigned long* arg3)

005e3cb8  {
005e3cc6      void* ecx_1 = &arg3[(arg1 * 3)];
005e3cc6      
005e3ce7      for (int32_t i = 0; i < 3; i += 1)
005e3ce7      {
005e3ccc          int32_t eax_2 = *(uint32_t*)((char*)ecx_1 + (i << 2));
005e3ccc          
005e3cd2          if (eax_2 == 0xffffffff)
005e3cdf              *(uint32_t*)((char*)ecx_1 + (i << 2)) = 0xffffffff;
005e3cd2          else
005e3cda              *(uint32_t*)((char*)ecx_1 + (i << 2)) = arg2[eax_2];
005e3ce7      }
005e3cb8  }


005e3cee  long __stdcall D3DXMesh::ReorderNeighborData(uint32_t* arg1, unsigned long* arg2, unsigned long arg3)

005e3cee  {
005e3cf3      int32_t ecx;
005e3cf3      int32_t var_8 = ecx;
005e3cf4      int32_t result = 0;
005e3cfc      void* s = operator new(arg3);
005e3cfc      
005e3d06      if (s != 0)
005e3d06      {
005e3d16          int32_t edi;
005e3d16          int32_t var_10_1 = edi;
005e3d25          __builtin_memset(__builtin_memset(s, 0, ((arg3 >> 2) << 2)), 0, (arg3 & 3));
005e3d27          char* edi_3 = nullptr;
005e3d27          
005e3d2b          if (arg3 > 0)
005e3d2b          {
005e3d7d              do
005e3d7d              {
005e3d32                  if (*(uint8_t*)(edi_3 + s) == 0)
005e3d32                  {
005e3d37                      char* esi_1 = arg1[edi_3];
005e3d37                      
005e3d3d                      if (esi_1 != 0xffffffff)
005e3d3d                      {
005e3d67                          do
005e3d67                          {
005e3d6e                              if (esi_1 == edi_3)
005e3d6e                              {
005e3d74                                  D3DXMesh::RemapFaceNeighbors(edi_3, arg1, arg2);
005e3d74                                  break;
005e3d6e                              }
005e3d6e                              
005e3d43                              D3DXMesh::SwapFaceNeighbors(edi_3, esi_1, arg2);
005e3d4f                              D3DXMesh::RemapFaceNeighbors(esi_1, arg1, arg2);
005e3d57                              *(uint8_t*)(esi_1 + s) = 1;
005e3d5b                              esi_1 = arg1[esi_1];
005e3d5b                              
005e3d61                              if (esi_1 == 0xffffffff)
005e3d61                                  break;
005e3d67                          } while (*(uint8_t*)(esi_1 + s) == 0);
005e3d3d                      }
005e3d32                  }
005e3d32                  
005e3d79                  edi_3 = &edi_3[1];
005e3d7d              } while (edi_3 < arg3);
005e3d2b          }
005e3d06      }
005e3d06      else
005e3d08          result = 0x8007000e;
005e3d08      
005e3d82      operator delete(s);
005e3d8d      return result;
005e3cee  }


005e3d90  void __stdcall HashAdd(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, struct hashentry** arg5, struct hashentry* arg6, unsigned long arg7, int32_t& arg8)

005e3d90  {
005e3d9a      int32_t ecx = *(uint32_t*)arg8;
005e3d9c      int32_t edi;
005e3d9c      int32_t var_10 = edi;
005e3dae      *(uint32_t*)arg8 = (ecx + 1);
005e3db3      unsigned long* eax_2 = ((char*)arg6 + (ecx * 0x14));
005e3db6      eax_2[3] = arg4;
005e3dbc      eax_2[1] = arg2;
005e3dc2      eax_2[2] = arg3;
005e3dc8      *(uint32_t*)eax_2 = arg1;
005e3dcd      unsigned long** ecx_6 = &arg5[(COMBINE(0, arg1) % arg7)];
005e3dd2      eax_2[4] = *(uint32_t*)ecx_6;
005e3dd5      *(uint32_t*)ecx_6 = eax_2;
005e3d90  }


005e3ddb  void __stdcall HashRemove(unsigned long arg1, unsigned long arg2, unsigned long arg3, struct hashentry** arg4, unsigned long arg5)

005e3ddb  {
005e3dee      void* ecx = &arg4[(COMBINE(0, arg1) % arg5)];
005e3df1      int32_t* i = *(uint32_t*)ecx;
005e3df3      int32_t* i_1 = nullptr;
005e3df3      
005e3df7      if (i != 0)
005e3df7      {
005e3df9          int32_t edi;
005e3df9          int32_t var_c_1 = edi;
005e3df9          
005e3e15          do
005e3e15          {
005e3e0c              if ((i[3] == arg3 && (i[1] == arg2 && *(uint32_t*)i == arg1)))
005e3e0c              {
005e3e1b                  int32_t eax_2 = i[4];
005e3e1b                  
005e3e1e                  if (i_1 == 0)
005e3e25                      *(uint32_t*)ecx = eax_2;
005e3e1e                  else
005e3e20                      i_1[4] = eax_2;
005e3e20                  
005e3e1e                  break;
005e3e0c              }
005e3e0c              
005e3e0e              i_1 = i;
005e3e10              i = i[4];
005e3e15          } while (i != 0);
005e3df7      }
005e3ddb  }


005e3e2d  void __stdcall D3DXMesh::SetElement(struct _D3DVERTEXELEMENT9* arg1, enum _D3DDECLUSAGE arg2, unsigned long arg3, unsigned long& arg4, unsigned long arg5)

005e3e2d  {
005e3e35      arg1->Stream = 0;
005e3e3c      uint16_t edx = ((uint16_t)*(uint8_t*)arg4);
005e3e41      int32_t ebx;
005e3e41      ebx = arg2;
005e3e44      arg1->Usage = ebx;
005e3e47      ebx = arg5;
005e3e4a      arg1->Offset = edx;
005e3e51      arg1->UsageIndex = ebx;
005e3e54      arg1->Type = arg3;
005e3e57      arg1->Method = 0;
005e3e62      *(uint32_t*)arg4 += ((uint32_t)*(uint8_t*)(arg3 + 0x7ec2c0));
005e3e2d  }


005e3e69  uint32_t __stdcall _D3DXGetDeclVertexSize@8(int16_t* arg1, int32_t arg2)

005e3e69  {
005e3e6e      int16_t* ecx = arg1;
005e3e71      uint32_t result = 0;
005e3e71      
005e3e75      if (ecx != 0)
005e3e75      {
005e3e77          uint32_t result_1;
005e3e77          result_1 = *(uint16_t*)ecx;
005e3e77          
005e3e7f          while (result_1 != 0xff)
005e3e7f          {
005e3e8e              if ((((uint32_t)result_1) == arg2 && *(uint8_t*)((char*)ecx + 5) != 4))
005e3e8e              {
005e3e9f                  result_1 = (((uint32_t)*(uint8_t*)(((uint32_t)ecx[2]) + 0x7ec2c0)) + ((uint32_t)ecx[1]));
005e3e9f                  
005e3ea3                  if (result < result_1)
005e3ea5                      result = result_1;
005e3e8e              }
005e3e8e              
005e3ea7              ecx = &ecx[4];
005e3eaa              result_1 = *(uint16_t*)ecx;
005e3e7f          }
005e3e75      }
005e3e75      
005e3eb6      return result;
005e3e69  }


005e3eb9  long __stdcall D3DXMesh::D3DXFVFFromDeclaratorEx(struct _D3DVERTEXELEMENT9 const* arg1, unsigned long* arg2, int32_t arg3)

005e3eb9  {
005e3ebe      struct _D3DVERTEXELEMENT9* eax = arg1;
005e3ec1      int32_t ebx;
005e3ec1      int32_t var_8 = ebx;
005e3ec5      uint8_t* ecx;
005e3ec5      ecx = eax->Stream;
005e3ec8      int32_t edi;
005e3ec8      int32_t var_10 = edi;
005e3ec9      int32_t edi_1 = 0;
005e3ecb      int32_t esi = 0;
005e3ed2      uint32_t edx;
005e3ed2      
005e3ed2      if (ecx != 0xff)
005e3ed2      {
005e3ed4          edx = ecx;
005e3ed6          ecx = &eax->Usage;
005e3ed6          
005e3f40          do
005e3f40          {
005e3edc              if (edx != 0)
005e40ab                  return 0x8876086c;
005e40ab              
005e3ee2              ebx = ADJ(ecx)->Type;
005e3ee2              
005e3ee8              if (ebx > 7)
005e40ab                  return 0x8876086c;
005e40ab              
005e3ef4              if (esi != ((uint32_t)ADJ(ecx)->Offset))
005e40ab                  return 0x8876086c;
005e40ab              
005e3efe              if (ADJ(ecx)->Method > 5)
005e40ab                  return 0x8876086c;
005e40ab              
005e3f04              uint32_t edx_1;
005e3f04              edx_1 = ADJ(ecx)->Usage;
005e3f04              
005e3f13              if ((edx_1 > 5 && (edx_1 != 9 && edx_1 != 0xa)))
005e40ab                  return 0x8876086c;
005e40ab              
005e3f22              if ((edx_1 == 0xa && ADJ(ecx)->UsageIndex > 1))
005e40ab                  return 0x8876086c;
005e40ab              
005e3f32              ecx = &ecx[8];
005e3f35              esi += ((uint32_t)*(uint8_t*)(((uint32_t)ebx) + 0x7ec2c0));
005e3f37              edx = ADJ(ecx)->Stream;
005e3f40          } while (edx != 0xff);
005e3ed2      }
005e3ed2      
005e3f42      ecx = eax->Usage;
005e3f42      
005e3f4a      if (ecx != 0)
005e3f4a      {
005e3fd9          if ((ecx == 9 && eax->Type == 3))
005e3fd9          {
005e3fdb              edi_1 = 4;
005e3fdd              eax = &eax[1];
005e3fd9          }
005e3f4a      }
005e3f4a      else if (eax->Type == 2)
005e3f54      {
005e3f5a          eax = &eax[1];
005e3f5d          int32_t ecx_1 = 0;
005e3f5d          
005e3f63          if (eax->Usage == 1)
005e3f63          {
005e3f65              edx = eax->Type;
005e3f65              
005e3f6b              if (edx <= 3)
005e3f6b              {
005e3f70                  ecx_1 = (((uint32_t)edx) + 1);
005e3f71                  eax = &eax[1];
005e3f6b              }
005e3f63          }
005e3f63          
005e3f78          if (eax->Usage == 2)
005e3f78          {
005e3f7e              if (eax->Type == 5)
005e3f7e              {
005e3f80                  ecx_1 += 1;
005e3f81                  edi_1 = 0x1000;
005e3f86                  eax = &eax[1];
005e3f7e              }
005e3f7e              
005e3f92              if ((eax->Usage == 2 && eax->Type == 4))
005e3f92              {
005e3f94                  edi_1 |= 0x8000;
005e3f9a                  ecx_1 += 1;
005e3f9b                  eax = &eax[1];
005e3f92              }
005e3f78          }
005e3f78          
005e3fa1          switch (ecx_1)
005e3fa1          {
005e3f9e              case 0:
005e3f9e              {
005e3fcb                  edi_1 |= 2;
005e3f9e                  break;
005e3f9e              }
005e3fa3              case 1:
005e3fa3              {
005e3fc6                  edi_1 |= 6;
005e3fa3                  break;
005e3fa3              }
005e3fa6              case 2:
005e3fa6              {
005e3fc1                  edi_1 |= 8;
005e3fa6                  break;
005e3fa6              }
005e3fa9              case 3:
005e3fa9              {
005e3fbc                  edi_1 |= 0xa;
005e3fa9                  break;
005e3fa9              }
005e3fac              case 4:
005e3fac              {
005e3fb7                  edi_1 |= 0xc;
005e3fac                  break;
005e3fac              }
005e3faf              case 5:
005e3faf              {
005e3fb2                  edi_1 |= 0xe;
005e3faf                  break;
005e3faf              }
005e3fa1          }
005e3f54      }
005e3f54      
005e3fe6      uint8_t* i = 0x10;
005e3fe6      
005e3fed      if ((eax->Usage == 3 && eax->Type == 2))
005e3fed      {
005e3fef          edi_1 |= 0x10;
005e3ff1          eax = &eax[1];
005e3fed      }
005e3fed      
005e3ffd      if ((eax->Usage == 4 && eax->Type == 0))
005e3ffd      {
005e3fff          edi_1 |= 0x20;
005e4002          eax = &eax[1];
005e3ffd      }
005e3ffd      
005e4009      if (eax->Usage == 0xa)
005e4009      {
005e4014          if ((eax->UsageIndex == 0 && eax->Type == 4))
005e4014          {
005e4016              edi_1 |= 0x40;
005e4019              eax = &eax[1];
005e4014          }
005e4014          
005e402b          if ((eax->Usage == 0xa && (eax->UsageIndex == 1 && eax->Type == 4)))
005e402b          {
005e402d              edi_1 |= 0x80;
005e4033              eax = &eax[1];
005e402b          }
005e4009      }
005e4009      
005e4036      int32_t edx_3 = 0;
005e4036      
005e40a2      do
005e40a2      {
005e4038          ecx = eax->Usage;
005e4038          
005e403e          if (ecx != 5)
005e403e              break;
005e403e          
005e404c          if ((eax->Type != 0 || ((uint32_t)eax->UsageIndex) != edx_3))
005e404c          {
005e4055              if (ecx != 5)
005e4055                  break;
005e4055              
005e4063              if ((eax->Type != 1 || ((uint32_t)eax->UsageIndex) != edx_3))
005e4063              {
005e4068                  if (ecx != 5)
005e4068                      break;
005e4068                  
005e4076                  if ((eax->Type != 2 || ((uint32_t)eax->UsageIndex) != edx_3))
005e4076                  {
005e4080                      if (ecx != 5)
005e4080                          break;
005e4080                      
005e4086                      if (eax->Type != 3)
005e4086                          break;
005e4086                      
005e408e                      if (((uint32_t)eax->UsageIndex) != edx_3)
005e408e                          break;
005e408e                      
005e4097                      edi_1 |= (2 << i);
005e4076                  }
005e4076                  else
005e4097                      edi_1 |= (1 << i);
005e4063              }
005e404c          }
005e404c          else
005e4097              edi_1 |= (3 << i);
005e4097          
005e4099          eax = &eax[1];
005e409c          edx_3 += 1;
005e409e          i = &i[2];
005e40a2      } while (i < 0x20);
005e40a2      
005e40a9      if (eax->Stream != 0xff)
005e40ab          return 0x8876086c;
005e40ab      
005e40ba      *(uint32_t*)arg2 = ((edx_3 << 8) | edi_1);
005e40bc      return 0;
005e3eb9  }


005e40c5  int32_t D3DXMesh::CmpFunc(void const* arg1, void const* arg2)

005e40c5  {
005e40d5      return (*(uint32_t*)arg1 - *(uint32_t*)arg2);
005e40c5  }


005e40d6  void __thiscall DXCrackFVF::DXCrackFVF(DXCrackFVF* this, unsigned long arg2)

005e40d6  {
005e40e4      int32_t edi;
005e40e4      int32_t var_10 = edi;
005e40e7      int32_t edx_1 = (arg2 & 0x400e);
005e40ed      void* ecx = nullptr;
005e40f2      void* esi = ((char*)this + 0x18);
005e40f5      *(uint32_t*)this = arg2;
005e40f7      __builtin_memset(((char*)this + 8), 0, 0x14);
005e4103      *(uint32_t*)((char*)this + 0x38) = 0;
005e4106      *(uint32_t*)((char*)this + 0x3c) = 0;
005e4106      
005e410b      if (edx_1 == 2)
005e410f          ecx = 0xc;
005e410b      else if (edx_1 == 4)
005e410f          ecx = 0x10;
005e4115      else if (edx_1 >= 6)
005e411e      {
005e4125          *(uint32_t*)((char*)this + 0x38) = ((edx_1 >> 1) - 2);
005e4128          ecx = ((((edx_1 >> 1) - 2) << 2) + 0xc);
005e411e      }
005e411e      
005e4132      if ((arg2 & 0x10) != 0)
005e4132      {
005e4134          *(uint32_t*)((char*)this + 8) = ecx;
005e4137          ecx += 0xc;
005e4132      }
005e4132      
005e413d      if ((arg2 & 0x20) != 0)
005e413d      {
005e413f          *(uint32_t*)((char*)this + 0xc) = ecx;
005e4142          ecx += 4;
005e413d      }
005e413d      
005e4148      if ((arg2 & 0x40) != 0)
005e4148      {
005e414a          *(uint32_t*)((char*)this + 0x10) = ecx;
005e414d          ecx += 4;
005e4148      }
005e4148      
005e4152      if (arg2 < 0)
005e4152      {
005e4154          *(uint32_t*)((char*)this + 0x14) = ecx;
005e4157          ecx += 4;
005e4152      }
005e4152      
005e415d      if ((*(uint8_t*)((char*)arg2)[1] & 0xf) != 0)
005e415d      {
005e4164          int32_t edx_5 = ((arg2 >> 8) & 0xf);
005e416a          *(uint32_t*)esi = ecx;
005e416c          *(uint32_t*)((char*)this + 0x3c) = edx_5;
005e416c          
005e416f          if (edx_5 > 8)
005e4171              *(uint32_t*)((char*)this + 0x3c) = 8;
005e4171          
005e4178          uint32_t ebx_1 = (arg2 >> 0x10);
005e417b          int32_t i = 0;
005e417b          
005e4180          if (*(uint32_t*)((char*)this + 0x3c) > 0)
005e4180          {
005e419a              do
005e419a              {
005e4187                  *(uint32_t*)esi = ecx;
005e4189                  ecx += *(uint32_t*)(((ebx_1 & 3) << 2) + &data_7ec2b0);
005e4190                  ebx_1 u>>= 2;
005e4193                  i += 1;
005e4194                  esi += 4;
005e419a              } while (i < *(uint32_t*)((char*)this + 0x3c));
005e4180          }
005e415d      }
005e415d      
005e419e      *(uint32_t*)((char*)this + 4) = ecx;
005e40d6  }


005e41a6  unsigned long __thiscall DXCrackFVF::CbTexCoordSize(DXCrackFVF* this, unsigned long arg2)

005e41a6  {
005e41b3      if (arg2 >= *(uint32_t*)((char*)this + 0x3c))
005e41c9          return 0;
005e41c9      
005e41c0      return *(uint32_t*)((((*(uint32_t*)this >> ((arg2 * 2) + 0x10)) & 3) << 2) + &data_7ec2b0);
005e41a6  }


005e41cf  struct _D3DVERTEXELEMENT9 const* __thiscall D3DXMesh::CD3DXCrackDecl::GetSemanticElement(D3DXMesh::CD3DXCrackDecl* this, uint32_t arg2, uint32_t arg3)

005e41cf  {
005e41d4      int16_t* result = *(uint32_t*)this;
005e41d4      
005e41f2      while (*(uint16_t*)result != 0xff)
005e41f2      {
005e41e8          if ((((uint32_t)result[3]) == arg2 && ((uint32_t)*(uint8_t*)((char*)result + 7)) == arg3))
005e41f7              return result;
005e41f7          
005e41ea          result = &result[4];
005e41f2      }
005e41f2      
005e41f4      return nullptr;
005e41cf  }


005e41fa  int32_t __stdcall D3DXMesh::BValidMeshDecl(struct _D3DVERTEXELEMENT9 const* const arg1, char* arg2)

005e41fa  {
005e4204      if (arg1 == 0)
005e424b          return 0;
005e424b      
005e4208      uint32_t ecx_1;
005e4208      ecx_1 = arg1->Stream;
005e420b      char edx = 0;
005e420b      
005e4212      if (ecx_1 == 0xff)
005e4246          return 1;
005e4246      
005e4214      uint16_t* eax_1 = &arg1->Offset;
005e4214      
005e421a      while (true)
005e421a      {
005e421a          if (ecx_1 != 0)
005e424b              return 0;
005e424b          
005e421f          if (ADJ(eax_1)->Method != ecx_1)
005e421f          {
005e4221              ecx_1 = ((uint16_t)edx);
005e4221              
005e4228              if (ADJ(eax_1)->Offset < ecx_1)
005e424b                  return 0;
005e424b              
005e4234              edx = (*(uint8_t*)(((uint32_t)ADJ(eax_1)->Type) + 0x7ec2c0) + ADJ(eax_1)->Offset);
005e421f          }
005e421f          
005e4236          ecx_1 = *(int16_t*)((char*)ADJ(eax_1) + 8);
005e423a          eax_1 = &eax_1[4];
005e423a          
005e4242          if (ecx_1 == 0xff)
005e4246              return 1;
005e421a      }
005e41fa  }


005e424f  int32_t __stdcall _D3DXGetDeclLength@4(int16_t* arg1)

005e424f  {
005e4254      int16_t* ecx = arg1;
005e4257      int32_t result = 0;
005e4257      
005e4264      while (*(uint16_t*)ecx != 0xff)
005e4264      {
005e425b          ecx = &ecx[4];
005e425e          result += 1;
005e4264      }
005e4264      
005e4267      return result;
005e424f  }


005e426a  long __thiscall D3DXMesh::CD3DXCrackDecl1::SetDeclaration(D3DXMesh::CD3DXCrackDecl1* this, struct _D3DVERTEXELEMENT9 const* arg2)

005e426a  {
005e4275      D3DXMesh::CD3DXCrackDecl::SetDeclaration(this, arg2);
005e427a      int16_t* eax = *(uint32_t*)this;
005e427a      
005e434f      while (*(uint16_t*)eax != 0xff)
005e434f      {
005e4281          char edx = *(uint8_t*)((char*)eax + 7);
005e4286          uint32_t ecx;
005e4286          
005e4286          if (edx != 0)
005e4288              ecx = eax[3];
005e4288          
005e4293          if (((edx == 0 || ecx == 5) || ecx == 0xa))
005e42a0              switch (((uint32_t)eax[3]))
005e42a0              {
005e429d                  case 0:
005e429d                  {
005e433f                      if (eax[2] == 2)
005e4341                          *(uint32_t*)((char*)this + 0x88) = eax;
005e429d                      break;
005e429d                  }
005e42a6                  case 1:
005e42a6                  {
005e4331                      if (eax[2] <= 3)
005e4333                          *(uint32_t*)((char*)this + 0x8c) = eax;
005e42a6                      break;
005e42a6                  }
005e42ad                  case 2:
005e42ad                  {
005e4318                      ecx = eax[2];
005e4318                      
005e4323                      if ((ecx == 5 || ecx == 4))
005e4325                          *(uint32_t*)((char*)this + 0x90) = eax;
005e42ad                      break;
005e42ad                  }
005e42b0                  case 3:
005e42b0                  {
005e430e                      if (eax[2] == 2)
005e4310                          *(uint32_t*)((char*)this + 0x94) = eax;
005e42b0                      break;
005e42b0                  }
005e42b4                  case 5:
005e42b4                  {
005e42fc                      if ((eax[2] <= 3 && edx < 8))
005e4301                          *(uint32_t*)(((char*)this + (((uint32_t)edx) << 2)) + 0xa0) = eax;
005e42b4                      break;
005e42b4                  }
005e42b7                  case 0xa:
005e42b7                  {
005e42c2                      if (edx == 0)
005e42c2                      {
005e42c4                          ecx = eax[2];
005e42c4                          
005e42cf                          if ((ecx == 3 || ecx == 4))
005e42d1                              *(uint32_t*)((char*)this + 0x98) = eax;
005e42c2                      }
005e42c2                      else if (edx == 1)
005e42dc                      {
005e42de                          ecx = eax[2];
005e42de                          
005e42e9                          if ((ecx == 3 || ecx == 4))
005e42eb                              *(uint32_t*)((char*)this + 0x9c) = eax;
005e42dc                      }
005e42b7                      break;
005e42b7                  }
005e42a0              }
005e42a0          
005e4347          eax = &eax[4];
005e434f      }
005e434f      
005e435e      *(uint32_t*)((char*)this + 0xc0) = _D3DXGetDeclVertexSize@8(*(uint32_t*)this, 0);
005e4368      return 0;
005e426a  }


005e436b  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint8_t** arg2, unsigned long arg3)

005e436b  {
005e4373      int32_t* eax = *(uint32_t*)((char*)this + 0x248);
005e438e      return *(uint32_t*)(*(uint32_t*)eax + 0x2c)(eax, 0, 0, arg2, (arg3 | 0x800));
005e436b  }


005e4391  void __thiscall D3DXMesh::SVertexCopyContext::SetStreamSource(D3DXMesh::SVertexCopyContext* this, uint8_t* arg2, uint8_t* arg3)

005e4391  {
005e43a0      D3DXMesh::CD3DXCrackDecl::SetStreamSource(this, 0, arg2, 0);
005e43b2      D3DXMesh::CD3DXCrackDecl::SetStreamSource(((char*)this + 0xc4), 0, arg3, 0);
005e4391  }


005e43bc  void __thiscall D3DXMesh::SVertexCopyContext::CopyVertex(D3DXMesh::SVertexCopyContext* this, uint32_t arg2, uint32_t arg3, int32_t arg4)

005e43bc  {
005e43c6      int32_t i = 0;
005e43cb      int32_t edi;
005e43cb      int32_t var_20 = edi;
005e43cb      
005e43ce      if (arg4 != 0)
005e43ce      {
005e43da          int32_t ecx = *(uint32_t*)((char*)this + 0x184);
005e43f4          __builtin_memset(__builtin_memset(((*(uint32_t*)((char*)this + 0x10c) * arg3) + *(uint32_t*)((char*)this + 0xcc)), 0, ((ecx >> 2) << 2)), 0, (ecx & 3));
005e43ce      }
005e43ce      
005e43fc      if (*(uint32_t*)((char*)this + 0x188) > 0)
005e43fc      {
005e43fe          void* edi_5 = ((char*)this + 0x18c);
005e43fe          
005e446b          do
005e446b          {
005e4411              void var_14;
005e4411              D3DXMesh::CD3DXCrackDecl::Decode(this, *(uint32_t*)edi_5, arg2, &var_14, 4);
005e4416              void* eax_1 = *(uint32_t*)edi_5;
005e4416              
005e441c              if (*(uint8_t*)((char*)eax_1 + 6) == 1)
005e441c              {
005e441e                  eax_1 = *(uint8_t*)((char*)eax_1 + 4);
005e441e                  
005e4423                  if (eax_1 <= 2)
005e4423                  {
005e4425                      uint32_t eax_2 = ((uint32_t)eax_1);
005e442d                      int32_t j = 0;
005e442d                      
005e442e                      if (eax_2 != 0xffffffff)
005e442e                      {
005e443b                          do
005e443b                          {
005e4432                              j += 1;
005e4435                              int32_t __saved_ebx;
005e4435                              &__saved_ebx[j];
005e443b                          } while (j < (eax_2 + 1));
005e442e                      }
005e442e                      
005e4441                      *(uint32_t*)(&var_14 + ((eax_2 + 1) << 2)) = ((float)(((long double)1) - ((long double)0)));
005e4423                  }
005e441c              }
005e441c              
005e445c              D3DXMesh::CD3DXCrackDecl::Encode(((char*)this + 0xc4), *(uint32_t*)((char*)edi_5 + 0x104), arg3, &var_14, 4);
005e4461              i += 1;
005e4462              edi_5 += 4;
005e446b          } while (i < *(uint32_t*)((char*)this + 0x188));
005e43fc      }
005e43bc  }


005e4474  int32_t __stdcall D3DXMesh::BIdenticalDecls(struct _D3DVERTEXELEMENT9 const* arg1, struct _D3DVERTEXELEMENT9 const* arg2)

005e4474  {
005e4479      struct _D3DVERTEXELEMENT9* eax = arg1;
005e447c      struct _D3DVERTEXELEMENT9* ecx = arg2;
005e447c      
005e4488      if (eax->Stream == 0xff)
005e4488      {
005e44d8      label_5e44d8:
005e44d8          
005e44db          if (ecx->Stream == 0xff)
005e44df              return 1;
005e4488      }
005e4488      else
005e4488      {
005e448a          int32_t edi;
005e448a          int32_t var_c_1 = edi;
005e448d          int32_t edi_2 = ((char*)ecx - eax);
005e448d          
005e44d0          do
005e44d0          {
005e448f              uint16_t Stream = ecx->Stream;
005e448f              
005e4495              if (Stream == 0xff)
005e4495                  break;
005e4495              
005e44a5              if ((Stream != eax->Stream && *(uint16_t*)(&eax->Offset + edi_2) != eax->Offset))
005e44a5                  break;
005e44a5              
005e44a7              Stream = ecx->Type;
005e44a7              
005e44ad              if (Stream != eax->Type)
005e44ad                  break;
005e44ad              
005e44af              Stream = ecx->Method;
005e44af              
005e44b5              if (Stream != eax->Method)
005e44b5                  break;
005e44b5              
005e44b7              Stream = ecx->Usage;
005e44b7              
005e44bd              if (Stream != eax->Usage)
005e44bd                  break;
005e44bd              
005e44bf              Stream = ecx->UsageIndex;
005e44bf              
005e44c5              if (Stream != eax->UsageIndex)
005e44c5                  break;
005e44c5              
005e44c7              eax = &eax[1];
005e44ca              ecx = &ecx[1];
005e44d0          } while (eax->Stream != 0xff);
005e44d0          
005e44d6          if (eax->Stream == 0xff)
005e44d6              goto label_5e44d8;
005e4488      }
005e4488      
005e44e2      return 0;
005e4474  }


005e44e9  void __stdcall D3DXMesh::CopyDecls(struct _D3DVERTEXELEMENT9* arg1, struct _D3DVERTEXELEMENT9 const* arg2)

005e44e9  {
005e44ee      struct _D3DVERTEXELEMENT9* eax = arg2;
005e44f1      struct _D3DVERTEXELEMENT9* ecx = arg1;
005e44f1      
005e44f4      while (true)
005e44f4      {
005e44f4          int32_t edx_1;
005e44f4          edx_1 = eax->Stream;
005e44f4          *(uint16_t*)((char*)edx_1)[2] = eax->Offset;
005e44fb          ecx->Stream = edx_1;
005e44fb          ecx->Offset = *(uint16_t*)((char*)edx_1)[2];
005e44fb          
005e44fd          if (edx_1 == 0xff)
005e44fd              break;
005e44fd          
005e44ff          int32_t edx_2;
005e44ff          edx_2 = eax->Type;
005e44ff          *(uint8_t*)((char*)edx_2)[1] = eax->Method;
005e44ff          *(uint8_t*)((char*)edx_2)[2] = eax->Usage;
005e44ff          *(uint8_t*)((char*)edx_2)[3] = eax->UsageIndex;
005e4502          ecx->Type = edx_2;
005e4502          ecx->Method = *(uint8_t*)((char*)edx_2)[1];
005e4502          ecx->Usage = *(uint8_t*)((char*)edx_2)[2];
005e4502          ecx->UsageIndex = *(uint8_t*)((char*)edx_2)[3];
005e4505          eax = &eax[1];
005e4508          ecx = &ecx[1];
005e44f4      }
005e44f4      
005e450d      int32_t eax_1;
005e450d      eax_1 = eax->Type;
005e450d      *(uint8_t*)((char*)eax_1)[1] = eax->Method;
005e450d      *(uint8_t*)((char*)eax_1)[2] = eax->Usage;
005e450d      *(uint8_t*)((char*)eax_1)[3] = eax->UsageIndex;
005e4510      ecx->Type = eax_1;
005e4510      ecx->Method = *(uint8_t*)((char*)eax_1)[1];
005e4510      ecx->Usage = *(uint8_t*)((char*)eax_1)[2];
005e4510      ecx->UsageIndex = *(uint8_t*)((char*)eax_1)[3];
005e44e9  }


005e4517  void __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::~GXTri3Mesh<uint16_t,1,65535>(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this)

005e4517  {
005e451d      int32_t* eax = *(uint32_t*)((char*)this + 8);
005e4524      int32_t edi;
005e4524      int32_t var_c = edi;
005e4525      *(uint32_t*)this = 0x7ec2d8;
005e4525      
005e452b      if (eax != 0)
005e452b      {
005e4530          *(uint32_t*)(*(uint32_t*)eax + 8)(eax);
005e4533          *(uint32_t*)((char*)this + 8) = 0;
005e452b      }
005e452b      
005e453c      int32_t* eax_1 = *(uint32_t*)((char*)this + 0x22c);
005e453c      
005e4540      if (eax_1 != 0)
005e4540      {
005e4545          *(uint32_t*)(*(uint32_t*)eax_1 + 8)(eax_1);
005e4548          *(uint32_t*)((char*)this + 0x22c) = 0;
005e4540      }
005e4540      
005e4550      int32_t* eax_2 = *(uint32_t*)((char*)this + 0x230);
005e4550      
005e4554      if (eax_2 != 0)
005e4554      {
005e4559          *(uint32_t*)(*(uint32_t*)eax_2 + 8)(eax_2);
005e455c          *(uint32_t*)((char*)this + 0x230) = 0;
005e4554      }
005e4554      
005e4564      int32_t* eax_3 = *(uint32_t*)((char*)this + 0x234);
005e4564      
005e4568      if (eax_3 != 0)
005e4568      {
005e456d          *(uint32_t*)(*(uint32_t*)eax_3 + 8)(eax_3);
005e4570          *(uint32_t*)((char*)this + 0x234) = 0;
005e4568      }
005e4568      
005e4578      int32_t* eax_4 = *(uint32_t*)((char*)this + 0x248);
005e4578      
005e457c      if (eax_4 != 0)
005e457c      {
005e4581          *(uint32_t*)(*(uint32_t*)eax_4 + 8)(eax_4);
005e4584          *(uint32_t*)((char*)this + 0x248) = 0;
005e457c      }
005e457c      
005e458c      operator delete(*(uint32_t*)((char*)this + 0x250));
005e4597      operator delete(*(uint32_t*)((char*)this + 0x254));
005e45a2      operator delete(*(uint32_t*)((char*)this + 0x258));
005e45ad      operator delete(*(uint32_t*)((char*)this + 0x25c));
005e45b8      operator delete(*(uint32_t*)((char*)this + 0x244));
005e4517  }


005e45c4  unsigned long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::AddRef()

005e45c4  {
005e45cc      int32_t* ecx = *(uint32_t*)((char*)arg_4 + 0x270);
005e45cc      
005e45d4      if (ecx != 0)
005e45d9          return *(uint32_t*)(*(uint32_t*)ecx + 4)(ecx);
005e45d9      
005e45e3      *(uint32_t*)((char*)arg_4 + 0x26c) += 1;
005e45e5      return *(uint32_t*)((char*)arg_4 + 0x26c);
005e45c4  }


005e45eb  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GetDevice(struct IDirect3DDevice9** arg1)

005e45eb  {
005e45f0      int32_t edi;
005e45f0      int32_t var_8 = edi;
005e45f0      
005e45f6      if (arg_8 == 0)
005e45f8          return 0x8876086c;
005e45f8      
005e4609      int32_t* eax_1 = arg1[0x8c];
005e460e      *(uint32_t*)(*(uint32_t*)eax_1 + 4)(eax_1);
005e4613      *(uint32_t*)arg_8 = arg1[0x8c];
005e4615      return 0;
005e45eb  }


005e461d  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::LockVertexBuffer(unsigned long arg1, void** arg2)

005e461d  {
005e4628      int32_t* eax_1 = *(uint32_t*)(arg1 + 0x234);
005e4643      return *(uint32_t*)(*(uint32_t*)eax_1 + 0x2c)(eax_1, 0, 0, arg_c, (arg2 | 0x800));
005e461d  }


005e4646  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::UnlockVertexBuffer()

005e4646  {
005e464e      int32_t* eax_1 = *(uint32_t*)((char*)arg_4 + 0x234);
005e465b      return *(uint32_t*)(*(uint32_t*)eax_1 + 0x30)(eax_1);
005e4646  }


005e465e  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIndexBuffer(unsigned long arg1, void** arg2)

005e465e  {
005e4669      int32_t* eax_1 = *(uint32_t*)(arg1 + 0x248);
005e4684      return *(uint32_t*)(*(uint32_t*)eax_1 + 0x2c)(eax_1, 0, 0, arg_c, (arg2 | 0x800));
005e465e  }


005e4687  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::UnlockIndexBuffer()

005e4687  {
005e468f      int32_t* eax_1 = *(uint32_t*)((char*)arg_4 + 0x248);
005e469c      return *(uint32_t*)(*(uint32_t*)eax_1 + 0x30)(eax_1);
005e4687  }


005e469f  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::QueryInterface(struct _GUID const& arg1, void** arg2)

005e469f  {
005e46b0      if (*(int32_t*)((char*)arg1 + 0x270) != 0)
005e46b0      {
005e46b5          int32_t* eax_1 = *(int32_t*)((char*)arg1 + 0x270);
005e46bd          return **(uint32_t**)eax_1(eax_1, arg2, arg_c);
005e46b0      }
005e46b0      
005e46c4      *(uint32_t*)arg_c = nullptr;
005e46c9      void** esi_1 = arg2;
005e46cc      int32_t edi;
005e46cc      int32_t var_10_1 = edi;
005e46cf      int32_t i = 4;
005e46d0      int32_t* edi_1 = &IID_IUnknown;
005e46d5      bool cond:1_1 = true;
005e46d5      
005e46d7      while (i != 0)
005e46d7      {
005e46d7          void* temp1_1 = *(uint32_t*)esi_1;
005e46d7          int32_t temp2_1 = *(uint32_t*)edi_1;
005e46d7          cond:1_1 = temp1_1 == temp2_1;
005e46d7          esi_1 = &esi_1[1];
005e46d7          edi_1 = &edi_1[1];
005e46d7          i -= 1;
005e46d7          
005e46d7          if (temp1_1 != temp2_1)
005e46d7              break;
005e46d7      }
005e46d7      
005e46d9      int32_t result;
005e46d9      
005e46d9      if (cond:1_1)
005e46d9      {
005e46fd      label_5e46fd:
005e46fd          *(uint32_t*)arg_c = arg1;
005e4702          *(uint32_t*)(arg1->Data1 + 4)(arg1);
005e4705          result = 0;
005e46d9      }
005e46d9      else
005e46d9      {
005e46db          void** esi_2 = arg2;
005e46e0          int32_t i_1 = 4;
005e46e1          int32_t* edi_2 = &data_7f03f0;
005e46e6          bool cond:3_1 = true;
005e46e6          
005e46e8          while (i_1 != 0)
005e46e8          {
005e46e8              void* temp3_1 = *(uint32_t*)esi_2;
005e46e8              int32_t temp4_1 = *(uint32_t*)edi_2;
005e46e8              cond:3_1 = temp3_1 == temp4_1;
005e46e8              esi_2 = &esi_2[1];
005e46e8              edi_2 = &edi_2[1];
005e46e8              i_1 -= 1;
005e46e8              
005e46e8              if (temp3_1 != temp4_1)
005e46e8                  break;
005e46e8          }
005e46e8          
005e46ea          if (cond:3_1)
005e46ea              goto label_5e46fd;
005e46ea          
005e46ec          void** esi_3 = arg2;
005e46f1          int32_t i_2 = 4;
005e46f2          int32_t* edi_3 = &data_7f03e0;
005e46f7          bool cond:5_1 = false;
005e46f7          
005e46f9          while (i_2 != 0)
005e46f9          {
005e46f9              void* temp5_1 = *(uint32_t*)esi_3;
005e46f9              int32_t temp6_1 = *(uint32_t*)edi_3;
005e46f9              cond:5_1 = temp5_1 != temp6_1;
005e46f9              esi_3 = &esi_3[1];
005e46f9              edi_3 = &edi_3[1];
005e46f9              i_2 -= 1;
005e46f9              
005e46f9              if (temp5_1 != temp6_1)
005e46f9                  break;
005e46f9          }
005e46f9          
005e46fb          if (!(cond:5_1))
005e46fb              goto label_5e46fd;
005e46fb          
005e4709          result = 0x80004002;
005e46d9      }
005e46d9      
005e4712      return result;
005e469f  }


005e4715  unsigned long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GetFVF()

005e4715  {
005e4721      return *(uint32_t*)((char*)arg_4 + 4);
005e4715  }


005e4724  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GetAttributeTable(struct _D3DXATTRIBUTERANGE* arg1, unsigned long* arg2)

005e4724  {
005e4731      if (arg_c != 0)
005e4739          *(uint32_t*)arg_c = *(int32_t*)((char*)arg1 + 0x260);
005e4739      
005e473b      int32_t edi;
005e473b      int32_t var_8 = edi;
005e473b      
005e4741      if (arg2 != 0)
005e4741      {
005e4744          int32_t esi_1 = *(int32_t*)((char*)arg1 + 0x25c);
005e4744          
005e474c          if (esi_1 != 0)
005e474c          {
005e4757              int32_t ecx_2 = (*(int32_t*)((char*)arg1 + 0x260) * 0x14);
005e475f              int32_t esi_2;
005e475f              int32_t edi_2;
005e475f              edi_2 = __builtin_memcpy(arg2, esi_1, ((ecx_2 >> 2) << 2));
005e4766              __builtin_memcpy(edi_2, esi_2, (ecx_2 & 3));
005e474c          }
005e4741      }
005e4741      
005e476d      return 0;
005e4724  }


005e4770  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::UpdateSemantics(struct _D3DVERTEXELEMENT9* const arg1)

005e4770  {
005e4776      struct _D3DVERTEXELEMENT9* ebx = arg_8;
005e4779      int32_t edi;
005e4779      int32_t var_c = edi;
005e4779      
005e4785      if (D3DXMesh::BValidMeshDecl(ebx, nullptr) == 0)
005e4787          return 0x8876086c;
005e4787      
005e479f      if (_D3DXGetDeclVertexSize@8(ebx, 0) != *(int32_t*)((char*)arg1 + 0x238))
005e47a1          return 0x8876086c;
005e47a1      
005e47aa      D3DXDebugMuteInt(1);
005e47af      int32_t* eax_3 = *(int32_t*)((char*)arg1 + 0x230);
005e47bd      struct _D3DVERTEXELEMENT9* eax_4 = *(uint32_t*)(*(uint32_t*)eax_3 + 0x158)(eax_3, ebx, &arg_8);
005e47c7      D3DXDebugMuteInt(0);
005e47c7      
005e47cf      if (eax_4 < 0)
005e47d1          arg_8 = nullptr;
005e47d1      
005e47d9      D3DXMesh::CopyDecls(((char*)arg1 + 0xc), ebx);
005e47de      int32_t* eax_6 = *(int32_t*)((char*)arg1 + 8);
005e47de      
005e47e3      if (eax_6 != 0)
005e47e3      {
005e47e8          *(uint32_t*)(*(uint32_t*)eax_6 + 8)(eax_6);
005e47eb          *(int32_t*)((char*)arg1 + 8) = 0;
005e47e3      }
005e47e3      
005e47f1      *(int32_t*)((char*)arg1 + 8) = arg_8;
005e47f4      return 0;
005e4770  }


005e47fd  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::CollectAttributeIds(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, unsigned long** arg2, unsigned long* arg3)

005e47fd  {
005e4808      int32_t edi;
005e4808      int32_t var_34 = edi;
005e4809      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this_1 = this;
005e4811      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this_2 = this_1;
005e4814      int32_t result = 0;
005e4817      unsigned long var_c = 0;
005e481a      void* var_10 = nullptr;
005e481a      
005e481d      if (*(uint32_t*)((char*)this_1 + 0x264) != 0)
005e481d      {
005e4838          int32_t var_24_1 = 0xa;
005e4844          void* esi_1 = operator new(0x28);
005e4849          var_10 = esi_1;
005e4849          
005e484c          if (esi_1 != 0)
005e484c          {
005e4860              int32_t j_1 = 0;
005e4863              int32_t i = 0;
005e4863              
005e4866              if (*(uint32_t*)((char*)this_1 + 0x264) > 0)
005e4866              {
005e486c                  int32_t* var_8_1 = nullptr;
005e486f                  int16_t* var_1c_1 = nullptr;
005e486f                  
005e4920                  do
005e4920                  {
005e4881                      if (*(uint16_t*)((char*)var_1c_1 + *(uint32_t*)((char*)this_1 + 0x24c)) != 0xffff)
005e4881                      {
005e4890                          int32_t j = *(uint32_t*)(*(uint32_t*)((char*)this_1 + 0x254) + (i << 2));
005e4890                          
005e489c                          if ((j != j_1 || var_8_1 == 0))
005e489c                          {
005e489e                              int32_t eax_5 = 0;
005e48a3                              j_1 = j;
005e48a3                              
005e48a6                              if (var_8_1 > 0)
005e48a6                              {
005e48ab                                  while (*(uint32_t*)((char*)esi_1 + (eax_5 << 2)) != j)
005e48ab                                  {
005e48ad                                      eax_5 += 1;
005e48ad                                      
005e48b1                                      if (eax_5 >= var_c)
005e48b1                                          break;
005e48ab                                  }
005e48a6                              }
005e48a6                              
005e48b6                              if (eax_5 == var_c)
005e48b6                              {
005e48be                                  if (var_c == var_24_1)
005e48be                                  {
005e48c0                                      int32_t eax_7 = (var_24_1 * 2);
005e48c2                                      var_24_1 = eax_7;
005e48c9                                      void* eax_9 = operator new((eax_7 << 2));
005e48c9                                      
005e48d4                                      if (eax_9 == 0)
005e48d4                                          goto label_5e484e;
005e48d4                                      
005e48e7                                      int32_t esi_2;
005e48e7                                      int32_t edi_2;
005e48e7                                      edi_2 = __builtin_memcpy(eax_9, esi_1, ((var_8_1 >> 2) << 2));
005e48ee                                      __builtin_memcpy(edi_2, esi_2, (var_8_1 & 3));
005e48f0                                      operator delete(var_10);
005e48f8                                      this_1 = this_2;
005e48fc                                      var_10 = eax_9;
005e48ff                                      esi_1 = eax_9;
005e48be                                  }
005e48be                                  
005e4901                                  int32_t* eax_12 = var_8_1;
005e4904                                  var_c += 1;
005e4907                                  var_8_1 = &var_8_1[1];
005e490b                                  *(uint32_t*)((char*)eax_12 + esi_1) = j;
005e48b6                              }
005e489c                          }
005e4881                      }
005e4881                      
005e4910                      i += 1;
005e4916                      var_1c_1 = &var_1c_1[3];
005e4920                  } while (i < *(uint32_t*)((char*)this_1 + 0x264));
005e4866              }
005e4866              
005e492c              *(uint32_t*)arg2 = esi_1;
005e4931              *(uint32_t*)arg3 = var_c;
005e4933              var_10 = nullptr;
005e484c          }
005e484c          else
005e484c          {
005e484e          label_5e484e:
005e484e              result = 0x8007000e;
005e484c          }
005e481d      }
005e481d      else
005e481d      {
005e4822          *(uint32_t*)arg3 = 0;
005e4827          *(uint32_t*)arg2 = nullptr;
005e4829          result = 0x80004005;
005e481d      }
005e481d      
005e493a      operator delete(var_10);
005e4946      return result;
005e47fd  }


005e4949  void __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::~GXTri3Mesh<uint32_t,0,4294967295>(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this)

005e4949  {
005e494f      int32_t* eax = *(uint32_t*)((char*)this + 8);
005e4956      int32_t edi;
005e4956      int32_t var_c = edi;
005e4957      *(uint32_t*)this = 0x7ec350;
005e4957      
005e495d      if (eax != 0)
005e495d      {
005e4962          *(uint32_t*)(*(uint32_t*)eax + 8)(eax);
005e4965          *(uint32_t*)((char*)this + 8) = 0;
005e495d      }
005e495d      
005e496e      int32_t* eax_1 = *(uint32_t*)((char*)this + 0x22c);
005e496e      
005e4972      if (eax_1 != 0)
005e4972      {
005e4977          *(uint32_t*)(*(uint32_t*)eax_1 + 8)(eax_1);
005e497a          *(uint32_t*)((char*)this + 0x22c) = 0;
005e4972      }
005e4972      
005e4982      int32_t* eax_2 = *(uint32_t*)((char*)this + 0x230);
005e4982      
005e4986      if (eax_2 != 0)
005e4986      {
005e498b          *(uint32_t*)(*(uint32_t*)eax_2 + 8)(eax_2);
005e498e          *(uint32_t*)((char*)this + 0x230) = 0;
005e4986      }
005e4986      
005e4996      int32_t* eax_3 = *(uint32_t*)((char*)this + 0x234);
005e4996      
005e499a      if (eax_3 != 0)
005e499a      {
005e499f          *(uint32_t*)(*(uint32_t*)eax_3 + 8)(eax_3);
005e49a2          *(uint32_t*)((char*)this + 0x234) = 0;
005e499a      }
005e499a      
005e49aa      int32_t* eax_4 = *(uint32_t*)((char*)this + 0x248);
005e49aa      
005e49ae      if (eax_4 != 0)
005e49ae      {
005e49b3          *(uint32_t*)(*(uint32_t*)eax_4 + 8)(eax_4);
005e49b6          *(uint32_t*)((char*)this + 0x248) = 0;
005e49ae      }
005e49ae      
005e49be      operator delete(*(uint32_t*)((char*)this + 0x250));
005e49c9      operator delete(*(uint32_t*)((char*)this + 0x254));
005e49d4      operator delete(*(uint32_t*)((char*)this + 0x258));
005e49df      operator delete(*(uint32_t*)((char*)this + 0x25c));
005e49ea      operator delete(*(uint32_t*)((char*)this + 0x244));
005e4949  }


005e49f6  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::LockAttributeBuffer(unsigned long arg1, unsigned long** arg2)

005e49f6  {
005e4a03      if ((arg2 & 0x10) == 0)
005e4a03      {
005e4a05          int32_t edi;
005e4a05          int32_t var_c_1 = edi;
005e4a0e          operator delete(*(uint32_t*)(arg1 + 0x25c));
005e4a13          *(uint32_t*)(arg1 + 0x25c) = 0;
005e4a16          *(uint32_t*)(arg1 + 0x260) = 0;
005e4a1d          *(uint32_t*)(arg1 + 0x218) &= 0xffffffef;
005e4a03      }
005e4a03      
005e4a2f      *(uint32_t*)arg_c = *(uint32_t*)(arg1 + 0x254);
005e4a35      return 0;
005e49f6  }


005e4a38  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::UnlockAttributeBuffer() __pure

005e4a38  {
005e4a3a      return 0;
005e4a38  }


005e4a3d  unsigned long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GetNumFaces()

005e4a3d  {
005e4a4c      return *(uint32_t*)((char*)arg_4 + 0x264);
005e4a3d  }


005e4a4f  unsigned long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GetNumVertices()

005e4a4f  {
005e4a5e      return *(uint32_t*)((char*)arg_4 + 0x23c);
005e4a4f  }


005e4a61  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GetDeclaration(struct _D3DVERTEXELEMENT9* const arg1)

005e4a61  {
005e4a6a      if (arg_8 == 0)
005e4a6c          return 0x8876086c;
005e4a6c      
005e4a7d      D3DXMesh::CopyDecls(arg_8, ((char*)arg1 + 0xc));
005e4a82      return 0;
005e4a61  }


005e4a88  unsigned long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GetNumBytesPerVertex()

005e4a88  {
005e4a97      return *(uint32_t*)((char*)arg_4 + 0x238);
005e4a88  }


005e4a9a  unsigned long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GetOptions()

005e4a9a  {
005e4aa9      return *(uint32_t*)((char*)arg_4 + 0x214);
005e4a9a  }


005e4aac  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GetVertexBuffer(struct IDirect3DVertexBuffer9** arg1)

005e4aac  {
005e4ab6      if (arg_8 == 0)
005e4ab8          return 0x8876086c;
005e4ab8      
005e4ac9      *(uint32_t*)arg_8 = arg1[0x8d];
005e4acb      int32_t* eax_3 = arg1[0x8d];
005e4ad0      *(uint32_t*)(*(uint32_t*)eax_3 + 4)(eax_3);
005e4ad3      return 0;
005e4aac  }


005e4ad9  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GetIndexBuffer(struct IDirect3DIndexBuffer9** arg1)

005e4ad9  {
005e4ae3      if (arg_8 == 0)
005e4ae5          return 0x8876086c;
005e4ae5      
005e4af6      *(uint32_t*)arg_8 = arg1[0x92];
005e4af8      int32_t* eax_3 = arg1[0x92];
005e4afd      *(uint32_t*)(*(uint32_t*)eax_3 + 4)(eax_3);
005e4b00      return 0;
005e4ad9  }


005e4b06  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::SetAttributeTable(struct _D3DXATTRIBUTERANGE const* arg1, unsigned long arg2)

005e4b06  {
005e4b0b      int32_t ecx;
005e4b0b      int32_t var_8 = ecx;
005e4b11      int32_t edi;
005e4b11      int32_t var_14 = edi;
005e4b11      
005e4b19      if (arg_c == 0)
005e4b19      {
005e4b1e          if (arg2 != 0)
005e4b20              return 0x8876086c;
005e4b20          
005e4b35          operator delete(*(int32_t*)((char*)arg1 + 0x25c));
005e4b3b          *(int32_t*)((char*)arg1 + 0x260) = 0;
005e4b19      }
005e4b19      else if (arg_c >= *(int32_t*)((char*)arg1 + 0x260))
005e4b4c      {
005e4b79          operator delete(*(int32_t*)((char*)arg1 + 0x25c));
005e4b81          int32_t esi_5 = (arg_c * 0x14);
005e4b85          void* eax_2 = operator new(esi_5);
005e4b91          *(int32_t*)((char*)arg1 + 0x25c) = eax_2;
005e4b91          
005e4b97          if (eax_2 == 0)
005e4b99              return 0x8007000e;
005e4b99          
005e4bae          int32_t esi_7;
005e4bae          int32_t edi_4;
005e4bae          edi_4 = __builtin_memcpy(eax_2, arg2, ((esi_5 >> 2) << 2));
005e4bb5          __builtin_memcpy(edi_4, esi_7, (esi_5 & 3));
005e4bb7          *(int32_t*)((char*)arg1 + 0x260) = arg_c;
005e4b4c      }
005e4b4c      else
005e4b4c      {
005e4b5a          int32_t ecx_3 = (arg_c * 0x14);
005e4b62          int32_t esi_3;
005e4b62          int32_t edi_2;
005e4b62          edi_2 = __builtin_memcpy(*(int32_t*)((char*)arg1 + 0x25c), arg2, ((ecx_3 >> 2) << 2));
005e4b69          __builtin_memcpy(edi_2, esi_3, (ecx_3 & 3));
005e4b6b          *(int32_t*)((char*)arg1 + 0x260) = arg_c;
005e4b4c      }
005e4b4c      
005e4bc4      return 0;
005e4b06  }


005e4bc7  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::CollectAttributeIds(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, unsigned long** arg2, unsigned long* arg3)

005e4bc7  {
005e4bd2      int32_t edi;
005e4bd2      int32_t var_34 = edi;
005e4bd3      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_1 = this;
005e4bdb      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_2 = this_1;
005e4bde      int32_t result = 0;
005e4be1      unsigned long var_c = 0;
005e4be4      void* var_10 = nullptr;
005e4be4      
005e4be7      if (*(uint32_t*)((char*)this_1 + 0x264) != 0)
005e4be7      {
005e4c02          int32_t var_24_1 = 0xa;
005e4c0e          void* esi_1 = operator new(0x28);
005e4c13          var_10 = esi_1;
005e4c13          
005e4c16          if (esi_1 != 0)
005e4c16          {
005e4c2a              int32_t j_1 = 0;
005e4c2d              int32_t i = 0;
005e4c2d              
005e4c30              if (*(uint32_t*)((char*)this_1 + 0x264) > 0)
005e4c30              {
005e4c36                  int32_t* var_8_1 = nullptr;
005e4c39                  int32_t* var_1c_1 = nullptr;
005e4c39                  
005e4ce8                  do
005e4ce8                  {
005e4c49                      if (*(uint32_t*)((char*)var_1c_1 + *(uint32_t*)((char*)this_1 + 0x24c)) != 0xffffffff)
005e4c49                      {
005e4c58                          int32_t j = *(uint32_t*)(*(uint32_t*)((char*)this_1 + 0x254) + (i << 2));
005e4c58                          
005e4c64                          if ((j != j_1 || var_8_1 == 0))
005e4c64                          {
005e4c66                              int32_t eax_5 = 0;
005e4c6b                              j_1 = j;
005e4c6b                              
005e4c6e                              if (var_8_1 > 0)
005e4c6e                              {
005e4c73                                  while (*(uint32_t*)((char*)esi_1 + (eax_5 << 2)) != j)
005e4c73                                  {
005e4c75                                      eax_5 += 1;
005e4c75                                      
005e4c79                                      if (eax_5 >= var_c)
005e4c79                                          break;
005e4c73                                  }
005e4c6e                              }
005e4c6e                              
005e4c7e                              if (eax_5 == var_c)
005e4c7e                              {
005e4c86                                  if (var_c == var_24_1)
005e4c86                                  {
005e4c88                                      int32_t eax_7 = (var_24_1 * 2);
005e4c8a                                      var_24_1 = eax_7;
005e4c91                                      void* eax_9 = operator new((eax_7 << 2));
005e4c91                                      
005e4c9c                                      if (eax_9 == 0)
005e4c9c                                          goto label_5e4c18;
005e4c9c                                      
005e4caf                                      int32_t esi_2;
005e4caf                                      int32_t edi_2;
005e4caf                                      edi_2 = __builtin_memcpy(eax_9, esi_1, ((var_8_1 >> 2) << 2));
005e4cb6                                      __builtin_memcpy(edi_2, esi_2, (var_8_1 & 3));
005e4cb8                                      operator delete(var_10);
005e4cc0                                      this_1 = this_2;
005e4cc4                                      var_10 = eax_9;
005e4cc7                                      esi_1 = eax_9;
005e4c86                                  }
005e4c86                                  
005e4cc9                                  int32_t* eax_12 = var_8_1;
005e4ccc                                  var_c += 1;
005e4ccf                                  var_8_1 = &var_8_1[1];
005e4cd3                                  *(uint32_t*)((char*)eax_12 + esi_1) = j;
005e4c7e                              }
005e4c64                          }
005e4c49                      }
005e4c49                      
005e4cd8                      i += 1;
005e4cde                      var_1c_1 = &var_1c_1[3];
005e4ce8                  } while (i < *(uint32_t*)((char*)this_1 + 0x264));
005e4c30              }
005e4c30              
005e4cf4              *(uint32_t*)arg2 = esi_1;
005e4cf9              *(uint32_t*)arg3 = var_c;
005e4cfb              var_10 = nullptr;
005e4c16          }
005e4c16          else
005e4c16          {
005e4c18          label_5e4c18:
005e4c18              result = 0x8007000e;
005e4c16          }
005e4be7      }
005e4be7      else
005e4be7      {
005e4bec          *(uint32_t*)arg3 = 0;
005e4bf1          *(uint32_t*)arg2 = nullptr;
005e4bf3          result = 0x80004005;
005e4be7      }
005e4be7      
005e4d02      operator delete(var_10);
005e4d0e      return result;
005e4bc7  }


005e4d11  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint8_t** arg2, unsigned long arg3)

005e4d11  {
005e4d19      int32_t* eax = *(uint32_t*)((char*)this + 0x234);
005e4d34      return *(uint32_t*)(*(uint32_t*)eax + 0x2c)(eax, 0, 0, arg2, (arg3 | 0x800));
005e4d11  }


005e4d37  int16_t* __thiscall ??0?$CFaceListIter@G$00$0PPPP@@D3DXMesh@@QAE@PAV?$GXTri3Mesh@G$00$0PPPP@@1@@Z(int16_t* arg1, int32_t arg2)

005e4d37  {
005e4d41      *(uint16_t*)arg1 = 0xffff;
005e4d46      arg1[1] = 0xffff;
005e4d4c      arg1[2] = 0xffff;
005e4d52      *(uint32_t*)((char*)arg1 + 0xc) = arg2;
005e4d55      arg1[8] = 0;
005e4d59      *(uint8_t*)((char*)arg1 + 0x11) = 0;
005e4d5e      return arg1;
005e4d37  }


005e4d61  int32_t* __thiscall ??0?$CFaceListIter@I$0A@$0PPPPPPPP@@D3DXMesh@@QAE@PAV?$GXTri3Mesh@I$0A@$0PPPPPPPP@@1@@Z(int32_t* arg1, int32_t arg2)

005e4d61  {
005e4d6b      *(uint32_t*)arg1 = 0xffffffff;
005e4d6e      arg1[1] = 0xffffffff;
005e4d72      arg1[2] = 0xffffffff;
005e4d76      arg1[5] = arg2;
005e4d79      arg1[6] = 0;
005e4d7d      *(uint8_t*)((char*)arg1 + 0x19) = 0;
005e4d82      return arg1;
005e4d61  }


005e4d85  uint32_t __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::FindWedge(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint16_t* arg2, uint32_t arg3)

005e4d85  {
005e4d93      if (((uint32_t)*(uint16_t*)arg2) == arg3)
005e4d95          return 0;
005e4d95      
005e4da0      if (((uint32_t)arg2[1]) == arg3)
005e4da4          return 1;
005e4da4      
005e4db0      int32_t ecx_2;
005e4db0      ecx_2 = ((uint32_t)arg2[2]) != arg3;
005e4db5      return (ecx_2 + 2);
005e4d85  }


005e4dbb  uint32_t __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::FindWedge(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t* arg2, uint32_t arg3)

005e4dbb  {
005e4dc8      if (*(uint32_t*)arg2 == arg3)
005e4dca          return 0;
005e4dca      
005e4dd1      if (arg2[1] == arg3)
005e4dd5          return 1;
005e4dd5      
005e4ddd      int32_t edx_1;
005e4ddd      edx_1 = arg2[2] != arg3;
005e4de2      return (edx_1 + 2);
005e4dbb  }


005e4de8  int32_t __stdcall ResizeDynamicArray<class D3DXMesh::NeighborInfo<uint16_t> >(class D3DXMesh::NeighborInfo<uint16_t>** arg1, uint32_t arg2, uint32_t arg3, uint32_t* arg4)

005e4de8  {
005e4ded      int32_t ecx;
005e4ded      int32_t var_8 = ecx;
005e4df3      int32_t edi;
005e4df3      int32_t var_14 = edi;
005e4df4      class D3DXMesh::NeighborInfo<uint16_t>* edi_1 = *(uint32_t*)arg1;
005e4df8      class D3DXMesh::NeighborInfo<uint16_t>* var_8_1 = edi_1;
005e4df8      
005e4dfb      if (edi_1 != 0)
005e4dfb      {
005e4e30          uint32_t ebx_1 = arg2;
005e4e30          
005e4e38          if (ebx_1 > *(uint32_t*)arg4)
005e4e38          {
005e4e40              void* eax_8 = operator new((ebx_1 * 6));
005e4e40              
005e4e4a              if (eax_8 == 0)
005e4e5f                  arg2 = 0;
005e4e4a              else
005e4e4a              {
005e4e55                  `vector constructor iterator'(eax_8, 6, ebx_1, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005e4e5a                  arg2 = eax_8;
005e4e4a              }
005e4e4a              
005e4e63              uint32_t result = arg2;
005e4e63              
005e4e68              if (result == 0)
005e4ea6                  return result;
005e4ea6              
005e4e6a              uint32_t i_1 = arg3;
005e4e6a              
005e4e6f              if (i_1 > 0)
005e4e6f              {
005e4e73                  void* ecx_4 = ((char*)edi_1 - result);
005e4e81                  uint32_t i;
005e4e81                  
005e4e81                  do
005e4e81                  {
005e4e75                      void* esi_3 = ((char*)ecx_4 + result);
005e4e7a                      *(uint32_t*)result = *(uint32_t*)esi_3;
005e4e7a                      int16_t* edi_4 = (result + 4);
005e4e7b                      result += 6;
005e4e7e                      i = i_1;
005e4e7e                      i_1 -= 1;
005e4e7f                      *(uint16_t*)edi_4 = *(uint16_t*)((char*)esi_3 + 4);
005e4e81                  } while (i != 1);
005e4e6f              }
005e4e6f              
005e4e89              *(uint32_t*)arg4 = ebx_1;
005e4e8b              operator delete(var_8_1);
005e4e94              var_8_1 = arg2;
005e4e38          }
005e4dfb      }
005e4dfb      else
005e4dfb      {
005e4e06          void* eax_3 = operator new((arg2 * 6));
005e4e06          
005e4e10          if (eax_3 == 0)
005e4e25              var_8_1 = nullptr;
005e4e10          else
005e4e10          {
005e4e1b              `vector constructor iterator'(eax_3, 6, arg2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005e4e20              var_8_1 = eax_3;
005e4e10          }
005e4e10          
005e4e2c          *(uint32_t*)arg4 = arg2;
005e4dfb      }
005e4dfb      
005e4e9d      *(uint32_t*)arg1 = var_8_1;
005e4ea1      return 1;
005e4de8  }


005e4ea9  int32_t __stdcall ResizeDynamicArray<uint16_t>(uint16_t** arg1, uint32_t arg2, uint32_t arg3, uint32_t* arg4)

005e4ea9  {
005e4eb3      uint16_t* result_3 = *(uint32_t*)arg1;
005e4eb7      int32_t edi;
005e4eb7      int32_t var_10 = edi;
005e4eb7      
005e4eb8      if (result_3 != 0)
005e4eb8      {
005e4ecf          uint32_t ebx_1 = arg2;
005e4ecf          
005e4ed7          if (ebx_1 > *(uint32_t*)arg4)
005e4ed7          {
005e4edd              void* result = operator new((ebx_1 * 2));
005e4ee2              uint16_t* result_1 = result;
005e4ee2              
005e4ee7              if (result_1 == 0)
005e4f21                  return result;
005e4f21              
005e4eee              if (arg3 > 0)
005e4eee              {
005e4ef2                  uint16_t* result_2 = result_1;
005e4ef6                  arg2 = arg3;
005e4f05                  uint32_t i;
005e4f05                  
005e4f05                  do
005e4f05                  {
005e4ef9                      uint32_t edx_1;
005e4ef9                      edx_1 = *(uint16_t*)(((char*)result_3 - result_1) + result_2);
005e4efd                      *(uint16_t*)result_2 = edx_1;
005e4f01                      result_2 = &result_2[1];
005e4f02                      i = arg2;
005e4f02                      arg2 -= 1;
005e4f05                  } while (i != 1);
005e4eee              }
005e4eee              
005e4f0b              *(uint32_t*)arg4 = ebx_1;
005e4f0d              operator delete(result_3);
005e4f12              result_3 = result_1;
005e4ed7          }
005e4eb8      }
005e4eb8      else
005e4eb8      {
005e4ec6          result_3 = operator new((arg2 * 2));
005e4ecb          *(uint32_t*)arg4 = arg2;
005e4eb8      }
005e4eb8      
005e4f18      *(uint32_t*)arg1 = result_3;
005e4f1c      return 1;
005e4ea9  }


005e4f24  uint32_t __stdcall D3DXMesh::FindEdge<uint16_t>(uint16_t const* arg1, uint16_t arg2)

005e4f24  {
005e4f3c      int32_t i;
005e4f3c      
005e4f3c      for (i = 0; i < 3; i += 1)
005e4f3c      {
005e4f2e          uint16_t const* ecx_1;
005e4f2e          ecx_1 = arg1[i];
005e4f2e          
005e4f36          if (ecx_1 == arg2)
005e4f36              break;
005e4f3c      }
005e4f3c      
005e4f3f      return i;
005e4f24  }


005e4f42  int32_t __stdcall ResizeDynamicArray<class D3DXMesh::NeighborInfo<uint32_t> >(class D3DXMesh::NeighborInfo<uint32_t>** arg1, uint32_t arg2, uint32_t arg3, uint32_t* arg4)

005e4f42  {
005e4f47      int32_t ecx;
005e4f47      int32_t var_8 = ecx;
005e4f4d      int32_t edi;
005e4f4d      int32_t var_14 = edi;
005e4f4e      class D3DXMesh::NeighborInfo<uint32_t>* edi_1 = *(uint32_t*)arg1;
005e4f52      class D3DXMesh::NeighborInfo<uint32_t>* var_8_1 = edi_1;
005e4f52      
005e4f55      if (edi_1 != 0)
005e4f55      {
005e4f8b          uint32_t ebx_1 = arg2;
005e4f8b          
005e4f93          if (ebx_1 > *(uint32_t*)arg4)
005e4f93          {
005e4f9c              void* eax_8 = operator new((ebx_1 * 0xc));
005e4f9c              
005e4fa6              if (eax_8 == 0)
005e4fbb                  arg2 = 0;
005e4fa6              else
005e4fa6              {
005e4fb1                  `vector constructor iterator'(eax_8, 0xc, ebx_1, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005e4fb6                  arg2 = eax_8;
005e4fa6              }
005e4fa6              
005e4fbf              uint32_t result = arg2;
005e4fbf              
005e4fc4              if (result == 0)
005e5002                  return result;
005e5002              
005e4fc6              uint32_t i_1 = arg3;
005e4fc6              
005e4fcb              if (i_1 > 0)
005e4fcb              {
005e4fcf                  void* ecx_4 = ((char*)edi_1 - result);
005e4fdd                  uint32_t i;
005e4fdd                  
005e4fdd                  do
005e4fdd                  {
005e4fd1                      void* esi_3 = ((char*)ecx_4 + result);
005e4fd6                      *(uint32_t*)result = *(uint32_t*)esi_3;
005e4fd6                      int32_t* edi_4 = (result + 4);
005e4fd6                      void* esi_4 = ((char*)esi_3 + 4);
005e4fd7                      *(uint32_t*)edi_4 = *(uint32_t*)esi_4;
005e4fd8                      result += 0xc;
005e4fdb                      i = i_1;
005e4fdb                      i_1 -= 1;
005e4fd7                      edi_4[1] = *(uint32_t*)((char*)esi_4 + 4);
005e4fdd                  } while (i != 1);
005e4fcb              }
005e4fcb              
005e4fe5              *(uint32_t*)arg4 = ebx_1;
005e4fe7              operator delete(var_8_1);
005e4ff0              var_8_1 = arg2;
005e4f93          }
005e4f55      }
005e4f55      else
005e4f55      {
005e4f61          void* eax_3 = operator new((arg2 * 0xc));
005e4f61          
005e4f6b          if (eax_3 == 0)
005e4f80              var_8_1 = nullptr;
005e4f6b          else
005e4f6b          {
005e4f76              `vector constructor iterator'(eax_3, 0xc, arg2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005e4f7b              var_8_1 = eax_3;
005e4f6b          }
005e4f6b          
005e4f87          *(uint32_t*)arg4 = arg2;
005e4f55      }
005e4f55      
005e4ff9      *(uint32_t*)arg1 = var_8_1;
005e4ffd      return 1;
005e4f42  }


005e5005  int32_t __stdcall ResizeDynamicArray<unsigned long>(unsigned long** arg1, uint32_t arg2, uint32_t arg3, uint32_t* arg4)

005e5005  {
005e500f      unsigned long* result_3 = *(uint32_t*)arg1;
005e5013      int32_t edi;
005e5013      int32_t var_10 = edi;
005e5013      
005e5014      if (result_3 != 0)
005e5014      {
005e502d          uint32_t ebx_1 = arg2;
005e502d          
005e5035          if (ebx_1 > *(uint32_t*)arg4)
005e5035          {
005e503d              void* result = operator new((ebx_1 << 2));
005e5042              unsigned long* result_1 = result;
005e5042              
005e5047              if (result_1 == 0)
005e5080                  return result;
005e5080              
005e504e              if (arg3 > 0)
005e504e              {
005e5052                  unsigned long* result_2 = result_1;
005e5056                  arg2 = arg3;
005e5064                  uint32_t i;
005e5064                  
005e5064                  do
005e5064                  {
005e505c                      *(uint32_t*)result_2 = *(uint32_t*)(((char*)result_3 - result_1) + result_2);
005e505e                      result_2 = &result_2[1];
005e5061                      i = arg2;
005e5061                      arg2 -= 1;
005e5064                  } while (i != 1);
005e504e              }
005e504e              
005e506a              *(uint32_t*)arg4 = ebx_1;
005e506c              operator delete(result_3);
005e5071              result_3 = result_1;
005e5035          }
005e5014      }
005e5014      else
005e5014      {
005e5024          result_3 = operator new((arg2 << 2));
005e5029          *(uint32_t*)arg4 = arg2;
005e5014      }
005e5014      
005e5077      *(uint32_t*)arg1 = result_3;
005e507b      return 1;
005e5005  }


005e5083  uint32_t __stdcall D3DXMesh::FindEdge<uint32_t>(uint32_t const* arg1, uint32_t arg2)

005e5083  {
005e5088      int32_t result = 0;
005e5088      
005e5093      while (arg1[result] != arg2)
005e5093      {
005e5095          result += 1;
005e5095          
005e5099          if (result >= 3)
005e5099              break;
005e5093      }
005e5093      
005e509c      return result;
005e5083  }


005e509f  int32_t* __thiscall ??0?$CMeshStatus@G$00$0PPPP@@D3DXMesh@@QAE@PAV?$GXTri3Mesh@G$00$0PPPP@@1@PAV?$NeighborInfo@G@1@G@Z(int32_t* arg1, int32_t arg2, int32_t arg3, int16_t arg4)

005e509f  {
005e50a9      arg1[4] = 0;
005e50ad      arg1[8] = 0;
005e50b1      *(uint32_t*)arg1 = arg2;
005e50b6      arg1[1] = arg3;
005e50b9      int32_t ecx_1;
005e50b9      ecx_1 = arg4;
005e50bd      arg1[6] = ecx_1;
005e50c2      return arg1;
005e509f  }


005e50c5  void __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::~CMeshStatus<uint16_t,1,65535>(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this)

005e50c5  {
005e50cd      operator delete(*(uint32_t*)((char*)this + 0x10));
005e50d5      operator delete(*(uint32_t*)((char*)this + 0x20));
005e50c5  }


005e50de  int32_t* __thiscall ??0?$CMeshStatus@I$0A@$0PPPPPPPP@@D3DXMesh@@QAE@PAV?$GXTri3Mesh@I$0A@$0PPPPPPPP@@1@PAV?$NeighborInfo@I@1@I@Z(int32_t* arg1, int32_t arg2, int32_t arg3, int32_t arg4)

005e50de  {
005e50e8      arg1[6] = 0;
005e50ec      arg1[0xb] = 0;
005e50f0      *(uint32_t*)arg1 = arg2;
005e50f5      arg1[1] = arg3;
005e50fb      arg1[9] = arg4;
005e50ff      return arg1;
005e50de  }


005e5102  void __thiscall D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::~CMeshStatus<uint32_t,0,4294967295>(D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this)

005e5102  {
005e510a      operator delete(*(uint32_t*)((char*)this + 0x18));
005e5112      operator delete(*(uint32_t*)((char*)this + 0x2c));
005e5102  }


005e511b  uint16_t __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::IFindInitialFace(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this)

005e511b  {
005e511b      int32_t eax = 0;
005e511b      
005e512e      do
005e512e      {
005e5127          if (*(uint16_t*)(((char*)this + (((uint32_t)eax) << 1)) + 8) != 0xffff)
005e5143              return (*(uint16_t*)(((char*)this + (((uint32_t)eax) << 1)) + 8) + *(uint16_t*)((char*)this + 0x14));
005e5143          
005e5129          eax += 1;
005e512e      } while (eax < 4);
005e512e      
005e5130      eax = 0xffff;
005e5134      return 0xffff;
005e511b  }


005e5144  uint32_t __thiscall D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::IFindInitialFace(D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this)

005e5144  {
005e5144      int32_t i = 0;
005e5146      void* eax = ((char*)this + 8);
005e5146      
005e5155      do
005e5155      {
005e514c          if (*(uint32_t*)eax != 0xffffffff)
005e5162              return (*(uint32_t*)(((char*)this + (i << 2)) + 8) + *(uint32_t*)((char*)this + 0x1c));
005e5162          
005e514e          i += 1;
005e514f          eax += 4;
005e5155      } while (i < 4);
005e5155      
005e515a      return 0xffffffff;
005e5144  }


005e5163  long __thiscall D3DXMesh::CIndexQueue<uint16_t,65535>::Init(D3DXMesh::CIndexQueue<uint16_t,65535>* this)

005e5163  {
005e5166      int32_t edi;
005e5166      int32_t var_8 = edi;
005e5166      
005e516e      if (*(uint32_t*)((char*)this + 0x10) == 0)
005e516e      {
005e5176          void* eax_3 = operator new((*(uint32_t*)((char*)this + 0xc) << 1));
005e517e          *(uint32_t*)((char*)this + 0x10) = eax_3;
005e517e          
005e5181          if (eax_3 == 0)
005e5183              return 0x8007000e;
005e516e      }
005e516e      
005e518a      int32_t i = 0;
005e518a      
005e518f      if (*(uint32_t*)((char*)this + 0xc) > 0)
005e518f      {
005e519e          do
005e519e          {
005e5194              *(uint16_t*)(*(uint32_t*)((char*)this + 0x10) + (i << 1)) = 0xffff;
005e519a              i += 1;
005e519e          } while (i < *(uint32_t*)((char*)this + 0xc));
005e518f      }
005e518f      
005e51a0      *(uint32_t*)((char*)this + 8) = 0;
005e51a3      *(uint32_t*)((char*)this + 4) = 0;
005e51a6      *(uint32_t*)this = 0;
005e51a8      return 0;
005e5163  }


005e51ad  bool __thiscall D3DXMesh::CIndexQueue<uint16_t,65535>::BElementPresent(D3DXMesh::CIndexQueue<uint16_t,65535>* this, uint16_t arg2)

005e51ad  {
005e51b2      int32_t eax = *(uint32_t*)((char*)this + 0xc);
005e51b5      int32_t edx = 0;
005e51b9      int32_t esi;
005e51b9      int32_t var_8 = esi;
005e51b9      
005e51ba      if (eax <= 0)
005e51ba      {
005e51cf      label_5e51cf:
005e51cf          eax = 0;
005e51ba      }
005e51ba      else
005e51ba      {
005e51bc          int16_t* ecx = *(uint32_t*)((char*)this + 0x10);
005e51bc          
005e51bf          while (true)
005e51bf          {
005e51bf              esi = *(uint16_t*)ecx;
005e51bf              
005e51c6              if (esi == arg2)
005e51c6              {
005e51d6                  eax = 1;
005e51d8                  break;
005e51c6              }
005e51c6              
005e51c8              edx += 1;
005e51ca              ecx = &ecx[1];
005e51ca              
005e51cd              if (edx >= eax)
005e51cd                  goto label_5e51cf;
005e51bf          }
005e51ba      }
005e51ba      
005e51d3      return eax;
005e51ad  }


005e51da  void __thiscall D3DXMesh::CIndexQueue<uint16_t,65535>::InsertElement(D3DXMesh::CIndexQueue<uint16_t,65535>* this, uint16_t arg2)

005e51da  {
005e51e6      int32_t esi;
005e51e6      esi = arg2;
005e51ea      *(uint16_t*)(*(uint32_t*)((char*)this + 0x10) + (*(uint32_t*)((char*)this + 4) << 1)) = esi;
005e51ee      *(uint32_t*)((char*)this + 8) += 1;
005e51f1      *(uint32_t*)((char*)this + 4) += 1;
005e51f1      
005e51fb      if (*(uint32_t*)((char*)this + 4) == *(uint32_t*)((char*)this + 0xc))
005e51fd          *(uint32_t*)((char*)this + 4) = 0;
005e51da  }


005e5205  long __thiscall D3DXMesh::CIndexQueue<uint32_t,4294967295>::Init(D3DXMesh::CIndexQueue<uint32_t,4294967295>* this)

005e5205  {
005e5208      int32_t edi;
005e5208      int32_t var_8 = edi;
005e5208      
005e5210      if (*(uint32_t*)((char*)this + 0x10) == 0)
005e5210      {
005e5219          void* eax_3 = operator new((*(uint32_t*)((char*)this + 0xc) << 2));
005e5221          *(uint32_t*)((char*)this + 0x10) = eax_3;
005e5221          
005e5224          if (eax_3 == 0)
005e5226              return 0x8007000e;
005e5210      }
005e5210      
005e522d      int32_t i = 0;
005e522d      
005e5232      if (*(uint32_t*)((char*)this + 0xc) > 0)
005e5232      {
005e523f          do
005e523f          {
005e5237              *(uint32_t*)(*(uint32_t*)((char*)this + 0x10) + (i << 2)) = 0xffffffff;
005e523b              i += 1;
005e523f          } while (i < *(uint32_t*)((char*)this + 0xc));
005e5232      }
005e5232      
005e5241      *(uint32_t*)((char*)this + 8) = 0;
005e5244      *(uint32_t*)((char*)this + 4) = 0;
005e5247      *(uint32_t*)this = 0;
005e5249      return 0;
005e5205  }


005e524e  bool __thiscall D3DXMesh::CIndexQueue<uint32_t,4294967295>::BElementPresent(D3DXMesh::CIndexQueue<uint32_t,4294967295>* this, uint32_t arg2)

005e524e  {
005e5253      int32_t eax = *(uint32_t*)((char*)this + 0xc);
005e5256      int32_t edx = 0;
005e5256      
005e525b      if (eax <= 0)
005e525b      {
005e526f      label_5e526f:
005e526f          eax = 0;
005e525b      }
005e525b      else
005e525b      {
005e525d          int32_t* ecx = *(uint32_t*)((char*)this + 0x10);
005e525d          
005e5265          while (*(uint32_t*)ecx != arg2)
005e5265          {
005e5267              edx += 1;
005e5268              ecx = &ecx[1];
005e5268              
005e526d              if (edx >= eax)
005e526d                  goto label_5e526f;
005e5265          }
005e5265          
005e5276          eax = 1;
005e525b      }
005e525b      
005e5273      return eax;
005e524e  }


005e527a  void __thiscall D3DXMesh::CIndexQueue<uint32_t,4294967295>::InsertElement(D3DXMesh::CIndexQueue<uint32_t,4294967295>* this, uint32_t arg2)

005e527a  {
005e5289      *(uint32_t*)(*(uint32_t*)((char*)this + 0x10) + (*(uint32_t*)((char*)this + 4) << 2)) = arg2;
005e528c      *(uint32_t*)((char*)this + 8) += 1;
005e528f      *(uint32_t*)((char*)this + 4) += 1;
005e528f      
005e5299      if (*(uint32_t*)((char*)this + 4) == *(uint32_t*)((char*)this + 0xc))
005e529b          *(uint32_t*)((char*)this + 4) = 0;
005e527a  }


005e52a3  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Compact(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4)

005e52a3  {
005e52af      int32_t edx = 0;
005e52b7      int32_t edi;
005e52b7      int32_t var_1c = edi;
005e52b8      uint32_t* edi_1 = arg4;
005e52b8      
005e52be      if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e52be      {
005e52c0          uint32_t i = 0;
005e52c0          
005e52d3          do
005e52d3          {
005e52c2              edx += 1;
005e52c3              edi_1[i] = 0xffff;
005e52ca              i = ((uint32_t)edx);
005e52d3          } while (i < *(uint32_t*)((char*)this + 0x23c));
005e52be      }
005e52be      
005e52d5      int32_t edx_1 = 0;
005e52d5      
005e52dd      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e52dd      {
005e52df          uint32_t i_1 = 0;
005e52df          
005e52f1          do
005e52f1          {
005e52e4              edx_1 += 1;
005e52e5              arg3[i_1] = i_1;
005e52e8              i_1 = ((uint32_t)edx_1);
005e52f1          } while (i_1 < *(uint32_t*)((char*)this + 0x264));
005e52dd      }
005e52dd      
005e52f9      int32_t var_8 = 0;
005e52fc      int32_t var_c = 0;
005e52fc      
005e52ff      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e52ff      {
005e5303          uint32_t i_2 = 0;
005e5303          
005e5359          do
005e5359          {
005e530f              int16_t* esi_3 = (*(uint32_t*)((char*)this + 0x24c) + (i_2 * 6));
005e530f              
005e531a              if (*(uint16_t*)esi_3 == 0xffff)
005e5345                  arg2[i_2] = 0xffff;
005e531a              else
005e531a              {
005e531c                  uint32_t edi_2 = ((uint32_t)var_8);
005e5320                  var_8 += 1;
005e5323                  arg2[i_2] = edi_2;
005e5329                  arg3[edi_2] = i_2;
005e532f                  edi_1 = arg4;
005e5332                  edi_1[((uint32_t)*(uint16_t*)esi_3)] = 1;
005e5339                  edi_1[((uint32_t)esi_3[1])] = 1;
005e5340                  edi_1[((uint32_t)esi_3[2])] = 1;
005e531a              }
005e531a              
005e534c              var_c += 1;
005e534f              i_2 = ((uint32_t)var_c);
005e5359          } while (i_2 < *(uint32_t*)((char*)this + 0x264));
005e52ff      }
005e52ff      
005e535d      int32_t edx_2 = var_8;
005e535d      
005e536d      while (true)
005e536d      {
005e536d          uint32_t eax_7 = ((uint32_t)edx_2);
005e536d          
005e5376          if (eax_7 >= *(uint32_t*)((char*)this + 0x264))
005e5376              break;
005e5376          
005e5365          arg3[eax_7] = 0xffff;
005e536c          edx_2 += 1;
005e536d      }
005e536d      
005e5378      int32_t esi_5 = 0;
005e537a      int32_t edx_3 = 0;
005e537a      
005e5382      if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e5382      {
005e5384          uint32_t i_3 = 0;
005e5384          
005e53a3          do
005e53a3          {
005e5386              void* eax_8 = &edi_1[i_3];
005e5386              
005e538f              if (*(uint32_t*)eax_8 != 0xffff)
005e538f              {
005e5394                  *(uint32_t*)eax_8 = ((uint32_t)esi_5);
005e5396                  esi_5 += 1;
005e538f              }
005e538f              
005e5399              edx_3 += 1;
005e539a              i_3 = ((uint32_t)edx_3);
005e53a3          } while (i_3 < *(uint32_t*)((char*)this + 0x23c));
005e5382      }
005e5382      
005e53ae      if ((var_8 != 0 && esi_5 != 0))
005e53be          return 0;
005e53be      
005e53b0      return 0x88760b5a;
005e52a3  }


005e53c1  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::AttributeSort(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4, unsigned long arg5)

005e53c1  {
005e53d2      int32_t edi;
005e53d2      int32_t var_34 = edi;
005e53d5      int32_t eax_1 = (arg5 & 0x10000000);
005e53dd      void* temp1 = (arg5 & "activation type (%s) with '%s' b…");
005e53e4      long result = 0;
005e53e7      void* var_c = nullptr;
005e53ea      void* var_8 = nullptr;
005e53ed      void* var_20 = nullptr;
005e53f3      unsigned long i_14;
005e53f3      unsigned long i_13;
005e53f3      void* edi_1;
005e53f3      
005e53f3      if (temp1 == 0)
005e53f3      {
005e5447          long result_1 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::CollectAttributeIds(this, &var_8, &i_14);
005e544e          result = result_1;
005e544e          
005e5451          if (result_1 >= 0)
005e5451          {
005e5457              i_13 = i_14;
005e545a              edi_1 = var_8;
005e5466              j_qsort(edi_1, i_13, 4, D3DXMesh::CmpFunc);
005e5474          label_5e5474:
005e5474              void* eax_8 = operator new((i_13 << 4));
005e547e              var_c = eax_8;
005e547e              
005e5481              if (eax_8 == 0)
005e5413                  result = 0x8007000e;
005e5481              else
005e5481              {
005e5485                  if (i_13 > 0)
005e5485                  {
005e5487                      unsigned long i_11 = i_13;
005e5492                      unsigned long i;
005e5492                      
005e5492                      do
005e5492                      {
005e5489                          *(uint32_t*)eax_8 = 0;
005e548b                          *(uint32_t*)((char*)eax_8 + 8) = 0;
005e548e                          eax_8 += 0x10;
005e5491                          i = i_11;
005e5491                          i_11 -= 1;
005e5492                      } while (i != 1);
005e5485                  }
005e5485                  
005e5494                  int32_t i_1 = 0;
005e5494                  
005e549c                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e549c                  {
005e54af                      do
005e54af                      {
005e54a1                          arg4[i_1] = 0xffff;
005e54a8                          i_1 += 1;
005e54af                      } while (i_1 < *(uint32_t*)((char*)this + 0x23c));
005e549c                  }
005e549c                  
005e54b1                  int32_t eax_9 = 0;
005e54b5                  int32_t j_6 = 0;
005e54b5                  
005e54b8                  if (i_13 > 0)
005e54b8                  {
005e54bd                      while (*(uint32_t*)((char*)edi_1 + (eax_9 << 2)) != 0)
005e54bd                      {
005e54bf                          eax_9 += 1;
005e54bf                          
005e54c2                          if (eax_9 >= i_13)
005e54c2                              break;
005e54bd                      }
005e54b8                  }
005e54b8                  
005e54c4                  int32_t edi_2 = eax_9;
005e54c6                  uint32_t i_2 = 0;
005e54ce                  arg5 = 0;
005e54ce                  
005e54d1                  if (*(uint32_t*)((char*)this + 0x264) > 0)
005e54d1                  {
005e5566                      do
005e5566                      {
005e54da                          i_2 = arg3[i_2];
005e54da                          
005e54e2                          if (i_2 != 0xffff)
005e54e2                          {
005e54ea                              uint32_t eax_10 = ((uint32_t)i_2);
005e54ed                              int32_t j = *(uint32_t*)(*(uint32_t*)((char*)this + 0x254) + (eax_10 << 2));
005e54f3                              int32_t edx_3;
005e54f3                              
005e54f3                              if (j != j_6)
005e54f3                              {
005e54f9                                  edx_3 = 0;
005e54f9                                  
005e54fd                                  if (i_13 > 0)
005e54fd                                  {
005e5505                                      while (*(uint32_t*)((char*)var_8 + (edx_3 << 2)) != j)
005e5505                                      {
005e5507                                          edx_3 += 1;
005e5507                                          
005e550a                                          if (edx_3 >= i_13)
005e550a                                              break;
005e5505                                      }
005e54fd                                  }
005e54fd                                  
005e550c                                  j_6 = j;
005e550f                                  edi_2 = edx_3;
005e54f3                              }
005e54f3                              else
005e54f5                                  edx_3 = edi_2;
005e54f5                              
005e5514                              uint32_t eax_12 = (eax_10 * 6);
005e5516                              int32_t j_5 = 3;
005e554a                              int32_t j_1;
005e554a                              
005e554a                              do
005e554a                              {
005e552a                                  void* ecx_10 = &arg4[((uint32_t)*(uint16_t*)(*(uint32_t*)((char*)this + 0x24c) + eax_12))];
005e552a                                  
005e5533                                  if (*(uint32_t*)ecx_10 == 0xffff)
005e5533                                  {
005e5538                                      *(uint32_t*)ecx_10 = edi_2;
005e5543                                      *(uint32_t*)(((edx_3 << 4) + var_c) + 8) += 1;
005e5533                                  }
005e5533                                  
005e5546                                  eax_12 += 2;
005e5547                                  j_1 = j_5;
005e5547                                  j_5 -= 1;
005e554a                              } while (j_1 != 1);
005e554f                              i_13 = i_14;
005e5555                              void* eax_15 = ((char*)var_c + (edx_3 << 4));
005e5557                              *(uint32_t*)eax_15 += 1;
005e54e2                          }
005e54e2                          
005e5559                          arg5 += 1;
005e555c                          i_2 = ((uint32_t)arg5);
005e5566                      } while (i_2 < *(uint32_t*)((char*)this + 0x264));
005e54d1                  }
005e54d1                  
005e5572                  var_20 = *(uint32_t*)((char*)this + 0x25c);
005e557c                  *(uint32_t*)((char*)this + 0x260) = i_13;
005e5582                  void* eax_19 = operator new((i_13 * 0x14));
005e5588                  int32_t* ecx_14 = nullptr;
005e558c                  *(uint32_t*)((char*)this + 0x25c) = eax_19;
005e558c                  
005e5592                  if (eax_19 == 0)
005e5413                      result = 0x8007000e;
005e5592                  else
005e5592                  {
005e559a                      int32_t var_14_1 = 0;
005e559d                      int32_t var_24_1 = 0;
005e55a0                      arg5 = 0;
005e55a0                      
005e55a3                      if (i_13 > 0)
005e55a3                      {
005e55a8                          void* eax_21 = ((char*)var_c + 8);
005e55a8                          
005e5613                          do
005e5613                          {
005e55b1                              void* edi_4 = var_8;
005e55b4                              *(uint32_t*)((char*)eax_21 - 4) = var_14_1;
005e55c0                              *(uint32_t*)((char*)ecx_14 + *(uint32_t*)((char*)this + 0x25c)) = *(uint32_t*)((char*)edi_4 + (arg5 << 2));
005e55cc                              *(uint32_t*)((*(uint32_t*)((char*)this + 0x25c) + ecx_14) + 4) = var_14_1;
005e55d9                              *(uint32_t*)((*(uint32_t*)((char*)this + 0x25c) + ecx_14) + 8) = *(uint32_t*)((char*)eax_21 - 8);
005e55e0                              ecx_14 = &ecx_14[5];
005e55e3                              var_14_1 += *(uint32_t*)((char*)eax_21 - 8);
005e55e9                              *(uint32_t*)((char*)eax_21 + 4) = var_24_1;
005e55f2                              *(uint32_t*)((*(uint32_t*)((char*)this + 0x25c) + ecx_14) - 8) = var_24_1;
005e55fe                              *(uint32_t*)((*(uint32_t*)((char*)this + 0x25c) + ecx_14) - 4) = *(uint32_t*)eax_21;
005e5602                              int32_t edx_10 = (var_24_1 + *(uint32_t*)eax_21);
005e5604                              arg5 += 1;
005e5607                              i_13 = i_14;
005e560a                              eax_21 += 0x10;
005e5610                              var_24_1 = edx_10;
005e5613                          } while (arg5 < i_13);
005e55a3                      }
005e55a3                      
005e5617                      int32_t eax_22 = 0;
005e561b                      int32_t j_7 = 0;
005e561b                      
005e561e                      if (i_13 > 0)
005e561e                      {
005e5626                          while (*(uint32_t*)((char*)var_8 + (eax_22 << 2)) != 0)
005e5626                          {
005e5628                              eax_22 += 1;
005e5628                              
005e562b                              if (eax_22 >= i_13)
005e562b                                  break;
005e5626                          }
005e561e                      }
005e561e                      
005e5633                      int32_t var_24_2 = eax_22;
005e5636                      arg5 = 0;
005e5636                      
005e5639                      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e5639                      {
005e563b                          uint32_t i_3 = 0;
005e563b                          
005e569f                          do
005e569f                          {
005e5640                              i_3 = arg3[i_3];
005e5640                              
005e5648                              if (i_3 != 0xffff)
005e5648                              {
005e5653                                  uint32_t ecx_18 = (((uint32_t)i_3) << 2);
005e5656                                  int32_t j_2 = *(uint32_t*)(ecx_18 + *(uint32_t*)((char*)this + 0x254));
005e565c                                  int32_t eax_24;
005e565c                                  
005e565c                                  if (j_2 != j_7)
005e565c                                  {
005e5663                                      eax_24 = 0;
005e5663                                      
005e5667                                      if (i_13 > 0)
005e5667                                      {
005e566f                                          while (*(uint32_t*)((char*)var_8 + (eax_24 << 2)) != j_2)
005e566f                                          {
005e5671                                              eax_24 += 1;
005e5671                                              
005e5674                                              if (eax_24 >= i_13)
005e5674                                                  break;
005e566f                                          }
005e5667                                      }
005e5667                                      
005e5676                                      j_7 = j_2;
005e5679                                      var_24_2 = eax_24;
005e565c                                  }
005e565c                                  else
005e565e                                      eax_24 = var_24_2;
005e565e                                  
005e568b                                  *(uint32_t*)(ecx_18 + arg2) = *(uint32_t*)(((eax_24 << 4) + var_c) + 4);
005e568e                                  *(uint32_t*)(((eax_24 << 4) + var_c) + 4) += 1;
005e5648                              }
005e5648                              
005e5692                              arg5 += 1;
005e5695                              i_3 = ((uint32_t)arg5);
005e569f                          } while (i_3 < *(uint32_t*)((char*)this + 0x264));
005e5639                      }
005e5639                      
005e56a4                      if (eax_1 != 0)
005e56a4                      {
005e56dc                          int32_t i_4 = 0;
005e56dc                          
005e56e4                          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e56e4                          {
005e56f3                              do
005e56f3                              {
005e56e9                                  arg4[i_4] = i_4;
005e56ec                                  i_4 += 1;
005e56f3                              } while (i_4 < *(uint32_t*)((char*)this + 0x23c));
005e56e4                          }
005e56a4                      }
005e56a4                      else
005e56a4                      {
005e56a6                          int32_t i_5 = 0;
005e56a6                          
005e56ae                          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e56ae                          {
005e56d8                              do
005e56d8                              {
005e56b3                                  void* edx_13 = &arg4[i_5];
005e56b6                                  int32_t eax_28 = *(uint32_t*)edx_13;
005e56b6                                  
005e56bd                                  if (eax_28 != 0xffff)
005e56bd                                  {
005e56cb                                      *(uint32_t*)edx_13 = *(uint32_t*)(((eax_28 << 4) + var_c) + 0xc);
005e56cd                                      *(uint32_t*)(((eax_28 << 4) + var_c) + 0xc) += 1;
005e56bd                                  }
005e56bd                                  
005e56d1                                  i_5 += 1;
005e56d8                              } while (i_5 < *(uint32_t*)((char*)this + 0x23c));
005e56ae                          }
005e56a4                      }
005e56a4                      
005e56f5                      int32_t ecx_20 = 0;
005e56f5                      
005e56fd                      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e56fd                      {
005e56ff                          uint32_t i_6 = 0;
005e56ff                          
005e5715                          do
005e5715                          {
005e5704                              ecx_20 += 1;
005e5705                              arg3[i_6] = 0xffff;
005e570c                              i_6 = ((uint32_t)ecx_20);
005e5715                          } while (i_6 < *(uint32_t*)((char*)this + 0x264));
005e56fd                      }
005e56fd                      
005e5717                      int32_t edx_15 = 0;
005e5717                      
005e571f                      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e571f                      {
005e5721                          uint32_t i_7 = 0;
005e5721                          
005e5746                          do
005e5746                          {
005e5726                              uint32_t* ecx_21;
005e5726                              ecx_21 = arg2[i_7];
005e5726                              
005e572f                              if (ecx_21 != 0xffff)
005e5737                                  arg3[((uint32_t)ecx_21)] = i_7;
005e5737                              
005e573c                              edx_15 += 1;
005e573d                              i_7 = ((uint32_t)edx_15);
005e5746                          } while (i_7 < *(uint32_t*)((char*)this + 0x264));
005e571f                      }
005e571f                      
005e574b                      if (temp1 == 0)
005e574b                      {
005e5788                          if (i_13 > 0)
005e5788                          {
005e578e                              unsigned long i_15 = 0;
005e5790                              i_14 = 0;
005e5793                              unsigned long i_10 = i_13;
005e583d                              unsigned long i_8;
005e583d                              
005e583d                              do
005e583d                              {
005e57a5                                  void* edx_16 = (i_15 + *(uint32_t*)((char*)this + 0x25c));
005e57a7                                  unsigned long eax_34 = *(uint32_t*)((char*)edx_16 + 4);
005e57ba                                  int32_t ecx_28 = arg4[((uint32_t)*(uint16_t*)(*(uint32_t*)((char*)this + 0x24c) + (arg3[eax_34] * 6)))];
005e57bd                                  int32_t edi_18 = (*(uint32_t*)((char*)edx_16 + 8) + eax_34);
005e57bf                                  arg5 = eax_34;
005e57c2                                  uint32_t eax_35 = ((uint32_t)eax_34);
005e57c7                                  int32_t var_1c_2 = ecx_28;
005e57ca                                  int32_t eax_42;
005e57ca                                  
005e57ca                                  if (eax_35 >= edi_18)
005e581e                                      eax_42 = var_1c_2;
005e57ca                                  else
005e57ca                                  {
005e57cc                                      uint32_t ebx_10 = eax_35;
005e57cc                                      
005e581a                                      do
005e581a                                      {
005e57e0                                          arg2 = (*(uint32_t*)((char*)this + 0x24c) + (arg3[ebx_10] * 6));
005e57e3                                          int32_t j_4 = 3;
005e580f                                          int32_t j_3;
005e580f                                          
005e580f                                          do
005e580f                                          {
005e57f3                                              int32_t ebx_13 = arg4[((uint32_t)*(uint16_t*)arg2)];
005e57f3                                              
005e57f8                                              if (ebx_13 < ecx_28)
005e57fa                                                  ecx_28 = ebx_13;
005e57fa                                              
005e57fc                                              eax_42 = var_1c_2;
005e57fc                                              
005e5801                                              if (ebx_13 > eax_42)
005e5801                                              {
005e5803                                                  eax_42 = ebx_13;
005e5805                                                  var_1c_2 = eax_42;
005e5801                                              }
005e5801                                              
005e5808                                              arg2 += 2;
005e580c                                              j_3 = j_4;
005e580c                                              j_4 -= 1;
005e580f                                          } while (j_3 != 1);
005e5811                                          arg5 += 1;
005e5814                                          ebx_10 = ((uint32_t)arg5);
005e581a                                      } while (ebx_10 < edi_18);
005e57ca                                  }
005e57ca                                  
005e5821                                  *(uint32_t*)((char*)edx_16 + 0xc) = ecx_28;
005e5824                                  unsigned long i_16 = i_14;
005e5830                                  *(uint32_t*)((i_16 + *(uint32_t*)((char*)this + 0x25c)) + 0x10) = ((eax_42 - ecx_28) + 1);
005e5834                                  i_15 = (i_16 + 0x14);
005e5837                                  i_8 = i_10;
005e5837                                  i_10 -= 1;
005e583a                                  i_14 = i_15;
005e583d                              } while (i_8 != 1);
005e5788                          }
005e574b                      }
005e574b                      else if (i_13 > 0)
005e574f                      {
005e5758                          int32_t ecx_23 = 0;
005e575a                          void* eax_32 = ((char*)var_20 + 0x10);
005e575d                          unsigned long i_12 = i_13;
005e577f                          unsigned long i_9;
005e577f                          
005e577f                          do
005e577f                          {
005e5768                              *(uint32_t*)((ecx_23 + *(uint32_t*)((char*)this + 0x25c)) + 0xc) = *(uint32_t*)((char*)eax_32 - 4);
005e5774                              *(uint32_t*)((ecx_23 + *(uint32_t*)((char*)this + 0x25c)) + 0x10) = *(uint32_t*)eax_32;
005e5778                              ecx_23 += 0x14;
005e577b                              eax_32 += 0x14;
005e577e                              i_9 = i_12;
005e577e                              i_12 -= 1;
005e577f                          } while (i_9 != 1);
005e574f                      }
005e574f                      
005e5843                      *(uint32_t*)((char*)this + 0x218) |= 0x10;
005e5592                  }
005e5481              }
005e5451          }
005e53f3      }
005e53f3      else
005e53f3      {
005e53f5          i_13 = *(uint32_t*)((char*)this + 0x260);
005e5401          i_14 = i_13;
005e5409          edi_1 = operator new((i_13 << 2));
005e540e          var_8 = edi_1;
005e540e          
005e5411          if (edi_1 != 0)
005e5411          {
005e541f              int32_t eax_5 = 0;
005e541f              
005e5423              if (i_13 > 0)
005e5423              {
005e5425                  int32_t* ecx_2 = nullptr;
005e5425                  
005e5439                  do
005e5439                  {
005e5430                      *(uint32_t*)((char*)edi_1 + (eax_5 << 2)) = *(uint32_t*)((char*)ecx_2 + *(uint32_t*)((char*)this + 0x25c));
005e5433                      eax_5 += 1;
005e5434                      ecx_2 = &ecx_2[5];
005e5439                  } while (eax_5 < i_13);
005e5423              }
005e5423              
005e5423              goto label_5e5474;
005e5411          }
005e5411          
005e5413          result = 0x8007000e;
005e53f3      }
005e584d      operator delete(var_c);
005e5855      operator delete(var_8);
005e585d      operator delete(var_20);
005e585d      
005e5869      if (result < 0)
005e5869      {
005e586b          *(uint32_t*)((char*)this + 0x218) &= 0xffffffef;
005e587a          operator delete(*(uint32_t*)((char*)this + 0x25c));
005e587f          *(uint32_t*)((char*)this + 0x25c) = 0;
005e5869      }
005e5869      
005e588a      return result;
005e53c1  }


005e588d  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::VertexOptimize(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t* arg2, uint32_t* arg3)

005e588d  {
005e5892      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this_2 = this;
005e5893      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this_1 = this;
005e5895      uint32_t* ebx = arg3;
005e5899      int32_t edi;
005e5899      int32_t var_18 = edi;
005e589a      int32_t edi_1 = 0;
005e589a      
005e58a9      if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e58a9      {
005e58ab          uint32_t i = 0;
005e58ab          
005e58b6          do
005e58b6          {
005e58ad              edi_1 += 1;
005e58ae              ebx[i] = 0xffff;
005e58b1              i = ((uint32_t)edi_1);
005e58b6          } while (i < *(uint32_t*)((char*)this + 0x23c));
005e58a9      }
005e58a9      
005e58b8      uint32_t i_1 = 0;
005e58c0      arg3 = nullptr;
005e58c3      int32_t var_8 = 0;
005e58c3      
005e58c6      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e58c6      {
005e5911          do
005e5911          {
005e58cb              i_1 = arg2[i_1];
005e58cb              
005e58d2              if (i_1 != 0xffff)
005e58d2              {
005e58e0                  int16_t* edx_3 = (*(uint32_t*)((char*)this + 0x24c) + (((uint32_t)i_1) * 6));
005e58e3                  int32_t j_1 = 3;
005e5902                  int32_t j;
005e5902                  
005e5902                  do
005e5902                  {
005e58ed                      void* eax_4 = &ebx[((uint32_t)*(uint16_t*)edx_3)];
005e58ed                      
005e58f2                      if (*(uint32_t*)eax_4 == 0xffff)
005e58f2                      {
005e58f4                          uint32_t edi_2 = ((uint32_t)arg3);
005e58f8                          arg3 += 1;
005e58fb                          *(uint32_t*)eax_4 = edi_2;
005e58f2                      }
005e58f2                      
005e58fe                      edx_3 = &edx_3[1];
005e58ff                      j = j_1;
005e58ff                      j_1 -= 1;
005e5902                  } while (j != 1);
005e58d2              }
005e58d2              
005e5904              var_8 += 1;
005e5907              i_1 = ((uint32_t)var_8);
005e5911          } while (i_1 < *(uint32_t*)((char*)this + 0x264));
005e58c6      }
005e58c6      
005e5919      return 0;
005e588d  }


005e591c  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::CreateEmptyMesh(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this)

005e591c  {
005e591c      *(uint32_t*)((char*)this + 0x218) &= 0xffffffef;
005e5923      *(uint32_t*)((char*)this + 0x23c) = 0;
005e592a      *(uint32_t*)((char*)this + 0x264) = 0;
005e5933      return 0;
005e591c  }


005e5934  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Compact(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4)

005e5934  {
005e593c      uint32_t* eax = arg4;
005e5942      int32_t i = 0;
005e5942      
005e594e      if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e594e      {
005e595b          do
005e595b          {
005e5950              eax[i] = 0xffffffff;
005e5954              i += 1;
005e595b          } while (i < *(uint32_t*)((char*)this + 0x23c));
005e594e      }
005e594e      
005e595d      int32_t i_1 = 0;
005e595d      
005e5965      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e5965      {
005e5974          do
005e5974          {
005e596a              arg3[i_1] = i_1;
005e596d              i_1 += 1;
005e5974          } while (i_1 < *(uint32_t*)((char*)this + 0x264));
005e5965      }
005e5965      
005e5976      int32_t i_2 = 0;
005e597e      int32_t edi;
005e597e      int32_t var_1c = edi;
005e597f      int32_t i_5 = 0;
005e597f      
005e5982      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e5982      {
005e5986          int32_t var_8_1 = 0;
005e5986          
005e59d5          do
005e59d5          {
005e5990              int32_t* edx_1 = (*(uint32_t*)((char*)this + 0x24c) + var_8_1);
005e5990              
005e5996              if (*(uint32_t*)edx_1 == 0xffffffff)
005e59c4                  arg2[i_2] = 0xffffffff;
005e5996              else
005e5996              {
005e599e                  arg2[i_2] = i_5;
005e59a4                  arg3[i_5] = i_2;
005e59aa                  i_5 += 1;
005e59ad                  eax = arg4;
005e59b0                  eax[*(uint32_t*)edx_1] = 1;
005e59b6                  eax[edx_1[1]] = 1;
005e59bc                  eax[edx_1[2]] = 1;
005e5996              }
005e5996              
005e59c8              var_8_1 += 0xc;
005e59ce              i_2 += 1;
005e59d5          } while (i_2 < *(uint32_t*)((char*)this + 0x264));
005e5982      }
005e5982      
005e59e0      int32_t i_3 = i_5;
005e59e0      
005e59e2      if (i_5 < *(uint32_t*)((char*)this + 0x264))
005e59e2      {
005e59f2          do
005e59f2          {
005e59e7              arg3[i_3] = 0xffffffff;
005e59eb              i_3 += 1;
005e59f2          } while (i_3 < *(uint32_t*)((char*)this + 0x264));
005e59e2      }
005e59e2      
005e59f4      int32_t esi_3 = 0;
005e59f6      int32_t i_4 = 0;
005e59f6      
005e59fe      if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e59fe      {
005e5a11          do
005e5a11          {
005e5a04              if (eax[i_4] != 0xffffffff)
005e5a04              {
005e5a06                  eax[i_4] = esi_3;
005e5a09                  esi_3 += 1;
005e5a04              }
005e5a04              
005e5a0a              i_4 += 1;
005e5a11          } while (i_4 < *(uint32_t*)((char*)this + 0x23c));
005e59fe      }
005e59fe      
005e5a1a      if ((i_5 != 0 && esi_3 != 0))
005e5a29          return 0;
005e5a29      
005e5a1c      return 0x88760b5a;
005e5934  }


005e5a2c  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::AttributeSort(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4, unsigned long arg5)

005e5a2c  {
005e5a3d      int32_t edi;
005e5a3d      int32_t var_34 = edi;
005e5a40      int32_t eax_1 = (arg5 & 0x10000000);
005e5a48      void* temp1 = (arg5 & "activation type (%s) with '%s' b…");
005e5a4f      long result_1 = 0;
005e5a52      void* var_c = nullptr;
005e5a55      void* var_8 = nullptr;
005e5a58      void* var_20 = nullptr;
005e5a5e      long result;
005e5a5e      unsigned long i_14;
005e5a5e      unsigned long i_13;
005e5a5e      
005e5a5e      if (temp1 == 0)
005e5a5e      {
005e5ab8          result = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::CollectAttributeIds(this, &var_8, &i_14);
005e5abc          result_1 = result;
005e5abc          
005e5abf          if (result >= 0)
005e5abf          {
005e5ac5              i_13 = i_14;
005e5ad3              j_qsort(var_8, i_13, 4, D3DXMesh::CmpFunc);
005e5ae1          label_5e5ae1:
005e5ae1              void* eax_9 = operator new((i_13 << 4));
005e5ae9              var_c = eax_9;
005e5ae9              
005e5aec              if (eax_9 == 0)
005e5a7c                  result = 0x8007000e;
005e5aec              else
005e5aec              {
005e5af0                  if (i_13 > 0)
005e5af0                  {
005e5af2                      unsigned long i_11 = i_13;
005e5afd                      unsigned long i;
005e5afd                      
005e5afd                      do
005e5afd                      {
005e5af4                          *(uint32_t*)eax_9 = 0;
005e5af6                          *(uint32_t*)((char*)eax_9 + 8) = 0;
005e5af9                          eax_9 += 0x10;
005e5afc                          i = i_11;
005e5afc                          i_11 -= 1;
005e5afd                      } while (i != 1);
005e5af0                  }
005e5af0                  
005e5aff                  int32_t i_1 = 0;
005e5aff                  
005e5b07                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e5b07                  {
005e5b17                      do
005e5b17                      {
005e5b0c                          arg4[i_1] = 0xffffffff;
005e5b10                          i_1 += 1;
005e5b17                      } while (i_1 < *(uint32_t*)((char*)this + 0x23c));
005e5b07                  }
005e5b07                  
005e5b19                  unsigned long eax_10 = 0;
005e5b1d                  int32_t j_6 = 0;
005e5b1d                  
005e5b20                  if (i_13 > 0)
005e5b20                  {
005e5b28                      while (*(uint32_t*)((char*)var_8 + (eax_10 << 2)) != 0)
005e5b28                      {
005e5b2a                          eax_10 += 1;
005e5b2a                          
005e5b2d                          if (eax_10 >= i_13)
005e5b2d                              break;
005e5b28                      }
005e5b20                  }
005e5b20                  
005e5b35                  arg5 = eax_10;
005e5b38                  int32_t i_2 = 0;
005e5b38                  
005e5b3b                  if (*(uint32_t*)((char*)this + 0x264) > 0)
005e5b3b                  {
005e5bcf                      do
005e5bcf                      {
005e5b47                          int32_t eax_12 = arg3[i_2];
005e5b47                          
005e5b4d                          if (eax_12 != 0xffffffff)
005e5b4d                          {
005e5b55                              int32_t j = *(uint32_t*)(*(uint32_t*)((char*)this + 0x254) + (eax_12 << 2));
005e5b5b                              unsigned long edx_3;
005e5b5b                              
005e5b5b                              if (j != j_6)
005e5b5b                              {
005e5b62                                  edx_3 = 0;
005e5b62                                  
005e5b66                                  if (i_13 > 0)
005e5b66                                  {
005e5b6e                                      while (*(uint32_t*)((char*)var_8 + (edx_3 << 2)) != j)
005e5b6e                                      {
005e5b70                                          edx_3 += 1;
005e5b70                                          
005e5b73                                          if (edx_3 >= i_13)
005e5b73                                              break;
005e5b6e                                      }
005e5b66                                  }
005e5b66                                  
005e5b75                                  j_6 = j;
005e5b78                                  arg5 = edx_3;
005e5b5b                              }
005e5b5b                              else
005e5b5d                                  edx_3 = arg5;
005e5b5d                              
005e5b7e                              int32_t eax_14 = (eax_12 * 0xc);
005e5b81                              int32_t j_4 = 3;
005e5bb5                              int32_t j_1;
005e5bb5                              
005e5bb5                              do
005e5bb5                              {
005e5b94                                  void* ecx_11 = &arg4[*(uint32_t*)(eax_14 + *(uint32_t*)((char*)this + 0x24c))];
005e5b94                                  
005e5b9a                                  if (*(uint32_t*)ecx_11 == 0xffffffff)
005e5b9a                                  {
005e5b9f                                      *(uint32_t*)ecx_11 = arg5;
005e5bad                                      *(uint32_t*)(((edx_3 << 4) + var_c) + 8) += 1;
005e5b9a                                  }
005e5b9a                                  
005e5baf                                  eax_14 += 4;
005e5bb2                                  j_1 = j_4;
005e5bb2                                  j_4 -= 1;
005e5bb5                              } while (j_1 != 1);
005e5bbd                              void* eax_16 = ((char*)var_c + (edx_3 << 4));
005e5bbf                              *(uint32_t*)eax_16 += 1;
005e5b4d                          }
005e5b4d                          
005e5bc3                          i_2 += 1;
005e5bcf                      } while (i_2 < *(uint32_t*)((char*)this + 0x264));
005e5b3b                  }
005e5b3b                  
005e5bdb                  var_20 = *(uint32_t*)((char*)this + 0x25c);
005e5be5                  *(uint32_t*)((char*)this + 0x260) = i_13;
005e5beb                  void* eax_21 = operator new((i_13 * 0x14));
005e5bf3                  *(uint32_t*)((char*)this + 0x25c) = eax_21;
005e5bf3                  
005e5bf9                  if (eax_21 == 0)
005e5a7c                      result = 0x8007000e;
005e5bf9                  else
005e5bf9                  {
005e5c01                      int32_t var_18_1 = 0;
005e5c04                      int32_t var_10_1 = 0;
005e5c07                      arg5 = 0;
005e5c07                      
005e5c0a                      if (i_13 > 0)
005e5c0a                      {
005e5c0f                          int32_t* ecx_16 = nullptr;
005e5c11                          void* eax_23 = ((char*)var_c + 8);
005e5c11                          
005e5c7c                          do
005e5c7c                          {
005e5c1a                              void* edi_6 = var_8;
005e5c1d                              *(uint32_t*)((char*)eax_23 - 4) = var_18_1;
005e5c29                              *(uint32_t*)((char*)ecx_16 + *(uint32_t*)((char*)this + 0x25c)) = *(uint32_t*)((char*)edi_6 + (arg5 << 2));
005e5c35                              *(uint32_t*)((*(uint32_t*)((char*)this + 0x25c) + ecx_16) + 4) = var_18_1;
005e5c42                              *(uint32_t*)((*(uint32_t*)((char*)this + 0x25c) + ecx_16) + 8) = *(uint32_t*)((char*)eax_23 - 8);
005e5c49                              ecx_16 = &ecx_16[5];
005e5c4c                              var_18_1 += *(uint32_t*)((char*)eax_23 - 8);
005e5c52                              *(uint32_t*)((char*)eax_23 + 4) = var_10_1;
005e5c5b                              *(uint32_t*)((*(uint32_t*)((char*)this + 0x25c) + ecx_16) - 8) = var_10_1;
005e5c67                              *(uint32_t*)((*(uint32_t*)((char*)this + 0x25c) + ecx_16) - 4) = *(uint32_t*)eax_23;
005e5c6b                              int32_t edx_10 = (var_10_1 + *(uint32_t*)eax_23);
005e5c6d                              arg5 += 1;
005e5c70                              i_13 = i_14;
005e5c73                              eax_23 += 0x10;
005e5c79                              var_10_1 = edx_10;
005e5c7c                          } while (arg5 < i_13);
005e5c0a                      }
005e5c0a                      
005e5c7e                      int32_t j_7 = 0;
005e5c82                      unsigned long eax_24 = 0;
005e5c82                      
005e5c86                      if (i_13 > 0)
005e5c86                      {
005e5c8f                          while (*(uint32_t*)((char*)var_8 + (eax_24 << 2)) != 0)
005e5c8f                          {
005e5c91                              eax_24 += 1;
005e5c91                              
005e5c94                              if (eax_24 >= i_13)
005e5c94                                  break;
005e5c8f                          }
005e5c86                      }
005e5c86                      
005e5c98                      int32_t i_3 = 0;
005e5ca0                      arg5 = eax_24;
005e5ca0                      
005e5ca3                      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e5ca3                      {
005e5d02                          do
005e5d02                          {
005e5ca8                              int32_t eax_26 = arg3[i_3];
005e5ca8                              
005e5cae                              if (eax_26 != 0xffffffff)
005e5cae                              {
005e5cb8                                  int32_t ecx_19 = (eax_26 << 2);
005e5cbb                                  int32_t j_2 = *(uint32_t*)(ecx_19 + *(uint32_t*)((char*)this + 0x254));
005e5cc1                                  unsigned long eax_28;
005e5cc1                                  
005e5cc1                                  if (j_2 != j_7)
005e5cc1                                  {
005e5cc8                                      eax_28 = 0;
005e5cc8                                      
005e5ccc                                      if (i_13 > 0)
005e5ccc                                      {
005e5cd4                                          while (*(uint32_t*)((char*)var_8 + (eax_28 << 2)) != j_2)
005e5cd4                                          {
005e5cd6                                              eax_28 += 1;
005e5cd6                                              
005e5cda                                              if (eax_28 >= i_14)
005e5cda                                                  break;
005e5cd4                                          }
005e5ccc                                      }
005e5ccc                                      
005e5cdc                                      j_7 = j_2;
005e5cdf                                      arg5 = eax_28;
005e5cc1                                  }
005e5cc1                                  else
005e5cc3                                      eax_28 = arg5;
005e5cc3                                  
005e5cf1                                  *(uint32_t*)(ecx_19 + arg2) = *(uint32_t*)(((eax_28 << 4) + var_c) + 4);
005e5cf4                                  *(uint32_t*)(((eax_28 << 4) + var_c) + 4) += 1;
005e5cf6                                  i_13 = i_14;
005e5cae                              }
005e5cae                              
005e5cfb                              i_3 += 1;
005e5d02                          } while (i_3 < *(uint32_t*)((char*)this + 0x264));
005e5ca3                      }
005e5ca3                      
005e5d07                      if (eax_1 != 0)
005e5d07                      {
005e5d3d                          int32_t i_4 = 0;
005e5d3d                          
005e5d45                          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e5d45                          {
005e5d54                              do
005e5d54                              {
005e5d4a                                  arg4[i_4] = i_4;
005e5d4d                                  i_4 += 1;
005e5d54                              } while (i_4 < *(uint32_t*)((char*)this + 0x23c));
005e5d45                          }
005e5d07                      }
005e5d07                      else
005e5d07                      {
005e5d09                          int32_t i_5 = 0;
005e5d09                          
005e5d11                          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e5d11                          {
005e5d39                              do
005e5d39                              {
005e5d16                                  void* edi_12 = &arg4[i_5];
005e5d19                                  int32_t eax_32 = *(uint32_t*)edi_12;
005e5d19                                  
005e5d1e                                  if (eax_32 != 0xffffffff)
005e5d1e                                  {
005e5d2c                                      *(uint32_t*)edi_12 = *(uint32_t*)(((eax_32 << 4) + var_c) + 0xc);
005e5d2e                                      *(uint32_t*)(((eax_32 << 4) + var_c) + 0xc) += 1;
005e5d1e                                  }
005e5d1e                                  
005e5d32                                  i_5 += 1;
005e5d39                              } while (i_5 < *(uint32_t*)((char*)this + 0x23c));
005e5d11                          }
005e5d07                      }
005e5d07                      
005e5d56                      int32_t i_6 = 0;
005e5d56                      
005e5d5e                      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e5d5e                      {
005e5d6e                          do
005e5d6e                          {
005e5d63                              arg3[i_6] = 0xffffffff;
005e5d67                              i_6 += 1;
005e5d6e                          } while (i_6 < *(uint32_t*)((char*)this + 0x264));
005e5d5e                      }
005e5d5e                      
005e5d70                      int32_t i_7 = 0;
005e5d70                      
005e5d78                      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e5d78                      {
005e5d92                          do
005e5d92                          {
005e5d7d                              int32_t ecx_23 = arg2[i_7];
005e5d7d                              
005e5d83                              if (ecx_23 != 0xffffffff)
005e5d88                                  arg3[ecx_23] = i_7;
005e5d88                              
005e5d8b                              i_7 += 1;
005e5d92                          } while (i_7 < *(uint32_t*)((char*)this + 0x264));
005e5d78                      }
005e5d78                      
005e5d97                      if (temp1 == 0)
005e5d97                      {
005e5dd4                          if (i_13 > 0)
005e5dd4                          {
005e5dda                              unsigned long i_15 = 0;
005e5ddc                              i_14 = 0;
005e5ddf                              unsigned long i_10 = i_13;
005e5e7c                              unsigned long i_8;
005e5e7c                              
005e5e7c                              do
005e5e7c                              {
005e5df1                                  void* edx_15 = (i_15 + *(uint32_t*)((char*)this + 0x25c));
005e5df3                                  uint32_t* eax_38 = *(uint32_t*)((char*)edx_15 + 4);
005e5e05                                  int32_t ecx_29 = arg4[*(uint32_t*)(*(uint32_t*)((char*)this + 0x24c) + (arg3[eax_38] * 0xc))];
005e5e08                                  void* edi_17 = (*(uint32_t*)((char*)edx_15 + 8) + eax_38);
005e5e0c                                  int32_t var_1c_2 = ecx_29;
005e5e0f                                  arg2 = eax_38;
005e5e0f                                  
005e5e12                                  if (eax_38 < edi_17)
005e5e12                                  {
005e5e5b                                      do
005e5e5b                                      {
005e5e29                                          arg5 = (*(uint32_t*)((char*)this + 0x24c) + (arg3[arg2] * 0xc));
005e5e2c                                          int32_t j_5 = 3;
005e5e53                                          int32_t j_3;
005e5e53                                          
005e5e53                                          do
005e5e53                                          {
005e5e3b                                              int32_t eax_45 = arg4[*(uint32_t*)arg5];
005e5e3b                                              
005e5e41                                              if (eax_45 < var_1c_2)
005e5e43                                                  var_1c_2 = eax_45;
005e5e43                                              
005e5e48                                              if (eax_45 > ecx_29)
005e5e4a                                                  ecx_29 = eax_45;
005e5e4a                                              
005e5e4c                                              arg5 += 4;
005e5e50                                              j_3 = j_5;
005e5e50                                              j_5 -= 1;
005e5e53                                          } while (j_3 != 1);
005e5e55                                          arg2 += 1;
005e5e5b                                      } while (arg2 < edi_17);
005e5e12                                  }
005e5e12                                  
005e5e60                                  *(uint32_t*)((char*)edx_15 + 0xc) = var_1c_2;
005e5e63                                  unsigned long i_16 = i_14;
005e5e6f                                  *(uint32_t*)((i_16 + *(uint32_t*)((char*)this + 0x25c)) + 0x10) = ((ecx_29 - var_1c_2) + 1);
005e5e73                                  i_15 = (i_16 + 0x14);
005e5e76                                  i_8 = i_10;
005e5e76                                  i_10 -= 1;
005e5e79                                  i_14 = i_15;
005e5e7c                              } while (i_8 != 1);
005e5dd4                          }
005e5d97                      }
005e5d97                      else if (i_13 > 0)
005e5d9b                      {
005e5da4                          int32_t ecx_24 = 0;
005e5da6                          void* eax_36 = ((char*)var_20 + 0x10);
005e5da9                          unsigned long i_12 = i_13;
005e5dcb                          unsigned long i_9;
005e5dcb                          
005e5dcb                          do
005e5dcb                          {
005e5db4                              *(uint32_t*)((ecx_24 + *(uint32_t*)((char*)this + 0x25c)) + 0xc) = *(uint32_t*)((char*)eax_36 - 4);
005e5dc0                              *(uint32_t*)((ecx_24 + *(uint32_t*)((char*)this + 0x25c)) + 0x10) = *(uint32_t*)eax_36;
005e5dc4                              ecx_24 += 0x14;
005e5dc7                              eax_36 += 0x14;
005e5dca                              i_9 = i_12;
005e5dca                              i_12 -= 1;
005e5dcb                          } while (i_9 != 1);
005e5d9b                      }
005e5d9b                      
005e5e82                      *(uint32_t*)((char*)this + 0x218) |= 0x10;
005e5e89                      result = result_1;
005e5bf9                  }
005e5aec              }
005e5abf          }
005e5a5e      }
005e5a5e      else
005e5a5e      {
005e5a60          i_13 = *(uint32_t*)((char*)this + 0x260);
005e5a6c          i_14 = i_13;
005e5a6f          void* eax_4 = operator new((i_13 << 2));
005e5a77          var_8 = eax_4;
005e5a77          
005e5a7a          if (eax_4 != 0)
005e5a7a          {
005e5a86              int32_t eax_5 = 0;
005e5a86              
005e5a8a              if (i_13 > 0)
005e5a8a              {
005e5a8c                  int32_t* ecx_2 = nullptr;
005e5a8c                  
005e5aa3                  do
005e5aa3                  {
005e5a9a                      *(uint32_t*)((char*)var_8 + (eax_5 << 2)) = *(uint32_t*)((char*)ecx_2 + *(uint32_t*)((char*)this + 0x25c));
005e5a9d                      eax_5 += 1;
005e5a9e                      ecx_2 = &ecx_2[5];
005e5aa3                  } while (eax_5 < i_13);
005e5a8a              }
005e5a8a              
005e5a8a              goto label_5e5ae1;
005e5a7a          }
005e5a7a          
005e5a7c          result = 0x8007000e;
005e5a5e      }
005e5e91      operator delete(var_c);
005e5e99      operator delete(var_8);
005e5ea1      operator delete(var_20);
005e5ea1      
005e5eab      if (result < 0)
005e5eab      {
005e5ead          *(uint32_t*)((char*)this + 0x218) &= 0xffffffef;
005e5ebc          operator delete(*(uint32_t*)((char*)this + 0x25c));
005e5ec2          *(uint32_t*)((char*)this + 0x25c) = 0;
005e5eab      }
005e5eab      
005e5eca      return result;
005e5a2c  }


005e5ecd  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::VertexOptimize(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t* arg2, uint32_t* arg3)

005e5ecd  {
005e5ed2      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_1 = this;
005e5ed4      int32_t edi;
005e5ed4      int32_t var_10 = edi;
005e5ed5      int32_t i_1 = 0;
005e5edd      int32_t i = 0;
005e5edd      
005e5ee1      if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e5ee1      {
005e5eed          do
005e5eed          {
005e5ee6              arg3[i] = 0xffffffff;
005e5eea              i += 1;
005e5eed          } while (i < *(uint32_t*)((char*)this + 0x23c));
005e5ee1      }
005e5ee1      
005e5ef5      int32_t var_8 = 0;
005e5ef5      
005e5ef8      if (*(uint32_t*)((char*)this + 0x264) > 0)
005e5ef8      {
005e5f37          do
005e5f37          {
005e5efe              int32_t eax_2 = arg2[i_1];
005e5efe              
005e5f04              if (eax_2 != 0xffffffff)
005e5f04              {
005e5f0f                  int32_t edx_1 = (*(uint32_t*)((char*)this + 0x24c) + (eax_2 * 0xc));
005e5f0f                  
005e5f2e                  for (int32_t j = 0; j < 3; j += 1)
005e5f2e                  {
005e5f1a                      void* eax_5 = &arg3[*(uint32_t*)(edx_1 + (j << 2))];
005e5f1a                      
005e5f20                      if (*(uint32_t*)eax_5 == 0xffffffff)
005e5f20                      {
005e5f22                          int32_t ebx_2 = var_8;
005e5f25                          var_8 += 1;
005e5f28                          *(uint32_t*)eax_5 = ebx_2;
005e5f20                      }
005e5f2e                  }
005e5f04              }
005e5f04              
005e5f30              i_1 += 1;
005e5f37          } while (i_1 < *(uint32_t*)((char*)this + 0x264));
005e5ef8      }
005e5ef8      
005e5f3f      return 0;
005e5ecd  }


005e5f42  int32_t __stdcall AddToDynamicArray<uint16_t>(uint16_t** arg1, uint16_t const& arg2, uint32_t* arg3, uint32_t* arg4)

005e5f42  {
005e5f4c      int32_t edi;
005e5f4c      int32_t var_10 = edi;
005e5f4d      uint16_t* edi_1 = *(uint32_t*)arg1;
005e5f51      uint32_t* esi_1;
005e5f51      
005e5f51      if (edi_1 != 0)
005e5f51      {
005e5f72          uint32_t* ebx_1 = arg4;
005e5f75          uint32_t eax_3 = *(uint32_t*)ebx_1;
005e5f77          esi_1 = arg3;
005e5f77          
005e5f7c          if (*(uint32_t*)esi_1 == eax_3)
005e5f7c          {
005e5f82              int16_t* eax_5 = operator new((eax_3 << 2));
005e5f87              int32_t i = 0;
005e5f8c              arg3 = eax_5;
005e5f8c              
005e5f8f              if (eax_5 == 0)
005e5f91                  return 0;
005e5f91              
005e5f97              if (*(uint32_t*)esi_1 > 0)
005e5f97              {
005e5faa                  do
005e5faa                  {
005e5f9e                      ebx_1 = *(uint16_t*)(((char*)edi_1 - arg3) + eax_5);
005e5fa2                      *(uint16_t*)eax_5 = ebx_1;
005e5fa5                      i += 1;
005e5fa7                      eax_5 = &eax_5[1];
005e5faa                  } while (i < *(uint32_t*)esi_1);
005e5faa                  
005e5fac                  ebx_1 = arg4;
005e5f97              }
005e5f97              
005e5faf              *(uint32_t*)ebx_1 <<= 1;
005e5fb2              operator delete(edi_1);
005e5fb7              edi_1 = arg3;
005e5f7c          }
005e5f51      }
005e5f51      else
005e5f51      {
005e5f5a          edi_1 = operator new(4);
005e5f5a          
005e5f5f          if (edi_1 == 0)
005e5f91              return 0;
005e5f91          
005e5f61          esi_1 = arg3;
005e5f67          *(uint32_t*)esi_1 = 0;
005e5f6a          *(uint32_t*)arg4 = 2;
005e5f51      }
005e5f51      
005e5fc0      uint16_t const& ecx_6;
005e5fc0      ecx_6 = *(uint16_t*)arg2;
005e5fc3      edi_1[*(uint32_t*)esi_1] = ecx_6;
005e5fca      *(uint32_t*)esi_1 += 1;
005e5fcc      *(uint32_t*)arg1 = edi_1;
005e5fd0      return 1;
005e5f42  }


005e5fd8  struct D3DXMesh::SFaceCorner __stdcall D3DXMesh::CcwCorner<uint16_t,1,65535>(struct D3DXMesh::SFaceCorner& arg1, class D3DXMesh::CMeshStatus<uint16_t,1,65535>* arg2)

005e5fd8  {
005e5fe1      int32_t edi;
005e5fe1      int32_t var_c = edi;
005e5fe2      int32_t edi_1;
005e5fe2      edi_1 = *(uint16_t*)arg2;
005e5ff4      int32_t ecx_1 = *(uint32_t*)((char*)arg_c + 4);
005e5fff      uint32_t esi = ((uint32_t)*(uint16_t*)(ecx_1 + (((COMBINE(0, (*(uint32_t*)((char*)arg2 + 4) + 2)) % 3) + (((uint32_t)edi_1) * 3)) << 1)));
005e6003      uint32_t eax_6 = 0xffff;
005e6003      
005e600a      if (esi != 0xffff)
005e6017          eax_6 = D3DXMesh::FindEdge<uint16_t>((ecx_1 + (((uint32_t)esi) * 6)), edi_1);
005e6017      
005e601c      uint32_t* result = arg1;
005e6020      *(uint32_t*)result = esi;
005e6022      result[1] = eax_6;
005e6029      return result;
005e5fd8  }


005e602c  struct D3DXMesh::SFaceCorner __stdcall D3DXMesh::CcwCorner<uint32_t,0,4294967295>(struct D3DXMesh::SFaceCorner& arg1, class D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* arg2)

005e602c  {
005e6034      uint32_t ecx = *(uint32_t*)arg2;
005e603d      int32_t edi;
005e603d      int32_t var_c = edi;
005e603e      int32_t edi_1 = *(uint32_t*)((char*)arg_c + 4);
005e604f      int32_t esi = *(uint32_t*)(edi_1 + (((COMBINE(0, (*(uint32_t*)((char*)arg2 + 4) + 2)) % 3) + (ecx * 3)) << 2));
005e6055      uint32_t ecx_1;
005e6055      
005e6055      if (esi != 0xffffffff)
005e6068          ecx_1 = D3DXMesh::FindEdge<uint32_t>((edi_1 + (esi * 0xc)), ecx);
005e6055      else
005e6057          ecx_1 = (ecx | esi);
005e6057      
005e606e      *(uint32_t*)arg1 = esi;
005e6070      *(uint32_t*)((char*)arg1 + 4) = ecx_1;
005e6075      return arg1;
005e602c  }


005e6078  struct D3DXMesh::SFaceCorner __stdcall D3DXMesh::ClwFaceCorner<uint16_t,1,65535>(struct D3DXMesh::SFaceCorner& arg1)

005e6078  {
005e608b      uint32_t temp1 = (COMBINE(0, (arg_8[1] + 2)) % 3);
005e6092      *(uint32_t*)arg1 = *(uint32_t*)arg_8;
005e6095      *(uint32_t*)((char*)arg1 + 4) = temp1;
005e6099      return arg1;
005e6078  }


005e609c  void __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::RemapVertex(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t arg2, uint32_t* arg3)

005e609c  {
005e60a8      if ((*(uint8_t*)((char*)this + 0x218) & 2) != 0)
005e60a8      {
005e60b6          int16_t* eax_2 = (*(uint32_t*)((char*)this + 0x244) + (arg2 << 1));
005e60bc          uint32_t ecx_1;
005e60bc          ecx_1 = arg3[((uint32_t)*(uint16_t*)eax_2)];
005e60c0          *(uint16_t*)eax_2 = ecx_1;
005e60a8      }
005e609c  }


005e60c7  void __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::RemapFace(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t arg2, uint32_t* arg3, uint32_t* arg4)

005e60c7  {
005e60d8      uint32_t edx_1 = (arg2 * 6);
005e60e1      int16_t* eax_2 = (*(uint32_t*)((char*)this + 0x24c) + edx_1);
005e60e3      int16_t* esi_1 = (*(uint32_t*)((char*)this + 0x250) + edx_1);
005e60e3      
005e60ea      if (*(uint16_t*)eax_2 != 0xffff)
005e60ea      {
005e60ed          int32_t edi;
005e60ed          int32_t var_10_1 = edi;
005e60f0          int16_t* edx_2 = esi_1;
005e60f2          void* eax_3 = ((char*)eax_2 - esi_1);
005e60f4          int32_t i_1 = 3;
005e612e          int32_t i;
005e612e          
005e612e          do
005e612e          {
005e60fc              uint32_t esi_2;
005e60fc              esi_2 = arg3[((uint32_t)*(uint16_t*)((char*)eax_3 + edx_2))];
005e6100              *(uint16_t*)((char*)eax_3 + edx_2) = esi_2;
005e6100              
005e610b              if ((*(uint8_t*)((char*)this + 0x218) & 1) != 0)
005e610b              {
005e610d                  esi_2 = *(uint16_t*)edx_2;
005e610d                  
005e6115                  if (esi_2 == 0xffff)
005e6126                      *(uint16_t*)edx_2 = 0xffff;
005e6115                  else
005e6115                  {
005e611d                      uint32_t esi_3;
005e611d                      esi_3 = arg4[((uint32_t)esi_2)];
005e6121                      *(uint16_t*)edx_2 = esi_3;
005e6115                  }
005e610b              }
005e610b              
005e612c              edx_2 = &edx_2[1];
005e612d              i = i_1;
005e612d              i_1 -= 1;
005e612e          } while (i != 1);
005e60ea      }
005e60c7  }


005e6137  void __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::SwapVertex(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t arg2, uint32_t arg3, uint8_t* arg4)

005e6137  {
005e613c      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this_1 = this;
005e6140      *(uint32_t*)((char*)this + 0x238);
005e614a      int32_t edi;
005e614a      int32_t var_14 = edi;
005e614e      _chkstk();
005e6153      int32_t ecx = *(uint32_t*)((char*)this + 0x238);
005e615f      void* esi_2 = ((ecx * arg3) + arg4);
005e6168      void* eax_5 = ((ecx * arg2) + arg4);
005e6175      int32_t* var_8 = &var_14;
005e6178      int32_t esi_3;
005e6178      int32_t edi_1;
005e6178      edi_1 = __builtin_memcpy(&var_14, esi_2, ((ecx >> 2) << 2));
005e617f      __builtin_memcpy(edi_1, esi_3, (ecx & 3));
005e6181      int32_t ecx_4 = *(uint32_t*)((char*)this + 0x238);
005e6191      int32_t esi_5;
005e6191      int32_t edi_3;
005e6191      edi_3 = __builtin_memcpy(esi_2, eax_5, ((ecx_4 >> 2) << 2));
005e6198      __builtin_memcpy(edi_3, esi_5, (ecx_4 & 3));
005e619a      int32_t ecx_8 = *(uint32_t*)((char*)this + 0x238);
005e61a9      int32_t esi_6;
005e61a9      int32_t edi_5;
005e61a9      edi_5 = __builtin_memcpy(eax_5, &var_14, ((ecx_8 >> 2) << 2));
005e61b0      __builtin_memcpy(edi_5, esi_6, (ecx_8 & 3));
005e61b0      
005e61b9      if ((*(uint8_t*)((char*)this + 0x218) & 2) != 0)
005e61b9      {
005e61c7          int32_t ecx_12 = *(uint32_t*)((char*)this + 0x244);
005e61c9          int16_t* edx_3 = (ecx_12 + (arg3 << 1));
005e61cc          int16_t edi_6 = *(uint16_t*)edx_3;
005e61cf          uint32_t esi_8 = (arg2 * 2);
005e61d1          ecx_12 = *(uint16_t*)(esi_8 + ecx_12);
005e61d5          *(uint16_t*)edx_3 = ecx_12;
005e61da          *(uint16_t*)(esi_8 + *(uint32_t*)((char*)this + 0x244)) = edi_6;
005e61b9      }
005e6137  }


005e61e8  void __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::SwapFace(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t arg2, uint32_t arg3)

005e61e8  {
005e61f5      int32_t esi = *(uint32_t*)((char*)this + 0x24c);
005e61fb      int32_t edi;
005e61fb      int32_t var_20 = edi;
005e61fc      uint32_t edi_1 = arg2;
005e6202      uint32_t eax_1 = (edi_1 * 6);
005e620d      uint32_t edx_2 = (arg3 * 6);
005e6214      int32_t esi_2 = *(uint32_t*)((char*)this + 0x250);
005e6222      uint32_t esi_3 = (esi_2 + edx_2);
005e6224      uint32_t edx_3 = (esi + eax_1);
005e6227      uint32_t eax_4 = ((esi + edx_2) - edx_3);
005e622e      uint32_t eax_6 = (esi_3 - edx_3);
005e6236      uint32_t eax_8 = ((eax_1 + esi_2) - edx_3);
005e6238      uint32_t var_8 = esi_3;
005e623e      int32_t i_1 = 3;
005e628d      int32_t i;
005e628d      
005e628d      do
005e628d      {
005e6248          uint32_t eax_10 = (eax_4 + edx_3);
005e624a          esi_3 = *(uint16_t*)eax_10;
005e624d          arg2 = esi_3;
005e6251          esi_3 = *(uint16_t*)edx_3;
005e6254          *(uint16_t*)eax_10 = esi_3;
005e6257          eax_10 = arg2;
005e625b          *(uint16_t*)edx_3 = eax_10;
005e625b          
005e6265          if ((*(uint8_t*)((char*)this + 0x218) & 1) != 0)
005e6265          {
005e626a              int16_t* eax_12 = (eax_6 + edx_3);
005e626c              esi_3 = *(uint16_t*)eax_12;
005e626f              arg2 = esi_3;
005e6276              uint32_t esi_4;
005e6276              esi_4 = *(uint16_t*)(eax_8 + edx_3);
005e627a              *(uint16_t*)eax_12 = esi_4;
005e627d              eax_12 = arg2;
005e6284              *(uint16_t*)(eax_8 + edx_3) = eax_12;
005e6265          }
005e6265          
005e6289          edx_3 += 2;
005e628a          i = i_1;
005e628a          i_1 -= 1;
005e628d      } while (i != 1);
005e628d      
005e6296      if ((*(uint8_t*)((char*)this + 0x218) & 4) != 0)
005e6296      {
005e629e          int32_t edx_5 = *(uint32_t*)((char*)this + 0x254);
005e62a0          uint32_t esi_5 = (edx_5 + (arg3 << 2));
005e62a9          uint32_t esi_6 = *(uint32_t*)esi_5;
005e62b1          *(uint32_t*)esi_5 = *(uint32_t*)(edx_5 + (edi_1 << 2));
005e62b8          *(uint32_t*)(*(uint32_t*)((char*)this + 0x254) + (edi_1 << 2)) = esi_6;
005e6296      }
005e6296      
005e62c2      if ((*(uint8_t*)((char*)this + 0x218) & 8) != 0)
005e62c2      {
005e62ca          int32_t ecx = *(uint32_t*)((char*)this + 0x258);
005e62cc          int16_t* edx_8 = (ecx + (arg3 << 1));
005e62cf          uint32_t ebx;
005e62cf          ebx = *(uint16_t*)edx_8;
005e62d2          int16_t* esi_8 = (edi_1 * 2);
005e62d5          ecx = *(uint16_t*)((char*)esi_8 + ecx);
005e62d9          *(uint16_t*)edx_8 = ecx;
005e62de          *(uint16_t*)((char*)esi_8 + *(uint32_t*)((char*)this + 0x258)) = ebx;
005e62c2      }
005e61e8  }


005e62e9  int32_t __stdcall AddToDynamicArray<uint32_t>(uint32_t** arg1, uint32_t const& arg2, uint32_t* arg3, uint32_t* arg4)

005e62e9  {
005e62f3      int32_t edi;
005e62f3      int32_t var_10 = edi;
005e62f4      uint32_t* edi_1 = *(uint32_t*)arg1;
005e62f8      uint32_t* esi_1;
005e62f8      
005e62f8      if (edi_1 != 0)
005e62f8      {
005e6319          uint32_t* ebx_1 = arg4;
005e631c          uint32_t eax_3 = *(uint32_t*)ebx_1;
005e631e          esi_1 = arg3;
005e631e          
005e6323          if (*(uint32_t*)esi_1 == eax_3)
005e6323          {
005e6329              void* eax_5 = operator new((eax_3 << 3));
005e632e              int32_t i = 0;
005e6333              arg3 = eax_5;
005e6333              
005e6336              if (eax_5 == 0)
005e6338                  return 0;
005e6338              
005e633e              if (*(uint32_t*)esi_1 > 0)
005e633e              {
005e6350                  do
005e6350                  {
005e6348                      *(uint32_t*)eax_5 = *(uint32_t*)(((char*)edi_1 - arg3) + eax_5);
005e634a                      i += 1;
005e634b                      eax_5 += 4;
005e6350                  } while (i < *(uint32_t*)esi_1);
005e6350                  
005e6352                  ebx_1 = arg4;
005e633e              }
005e633e              
005e6355              *(uint32_t*)ebx_1 <<= 1;
005e6358              operator delete(edi_1);
005e635d              edi_1 = arg3;
005e6323          }
005e62f8      }
005e62f8      else
005e62f8      {
005e6301          edi_1 = operator new(8);
005e6301          
005e6306          if (edi_1 == 0)
005e6338              return 0;
005e6338          
005e6308          esi_1 = arg3;
005e630e          *(uint32_t*)esi_1 = 0;
005e6311          *(uint32_t*)arg4 = 2;
005e62f8      }
005e62f8      
005e6368      edi_1[*(uint32_t*)esi_1] = *(uint32_t*)arg2;
005e636e      *(uint32_t*)esi_1 += 1;
005e6370      *(uint32_t*)arg1 = edi_1;
005e6374      return 1;
005e62e9  }


005e637c  void __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::RemoveElement(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this, uint16_t arg2)

005e637c  {
005e6385      int32_t edx = *(uint32_t*)((char*)this + 0x10);
005e638c      uint32_t eax_2 = (((uint32_t)arg2) * 6);
005e6396      int32_t edi;
005e6396      int32_t var_10 = edi;
005e6396      
005e6397      if (*(uint16_t*)((edx + eax_2) + 2) == 0xffff)
005e6397      {
005e63c5          void* edx_3 = (edx + eax_2);
005e63c7          int32_t esi;
005e63c7          esi = ((uint16_t)*(uint8_t*)((char*)edx_3 + 1));
005e63cc          edx_3 = *(uint16_t*)((char*)edx_3 + 4);
005e63d8          *(uint16_t*)(((char*)this + (((uint32_t)esi) << 1)) + 8) = edx_3;
005e63d8          
005e63dd          if (edx_3 != 0xffff)
005e63e8              *(uint16_t*)((*(uint32_t*)((char*)this + 0x10) + (((uint32_t)edx_3) * 6)) + 2) = 0xffff;
005e6397      }
005e6397      else
005e6397      {
005e6399          int32_t ebx;
005e6399          ebx = *(uint16_t*)((edx + eax_2) + 2);
005e639e          int32_t edi_1;
005e639e          edi_1 = *(uint16_t*)((edx + eax_2) + 4);
005e63ae          *(uint16_t*)((edx + (((uint32_t)ebx) * 6)) + 4) = edi_1;
005e63ae          
005e63b3          if (edi_1 != 0xffff)
005e63be              *(uint16_t*)((*(uint32_t*)((char*)this + 0x10) + (((uint32_t)edi_1) * 6)) + 2) = ebx;
005e6397      }
005e6397      
005e63f2      *(uint16_t*)((*(uint32_t*)((char*)this + 0x10) + eax_2) + 4) = 0xffff;
005e63fc      *(uint16_t*)((*(uint32_t*)((char*)this + 0x10) + eax_2) + 2) = 0xffff;
005e637c  }


005e640a  void __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::PrependElement(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this, uint16_t arg2)

005e640a  {
005e6413      int32_t ebx;
005e6413      ebx = arg2;
005e641d      uint32_t eax_2 = (((uint32_t)ebx) * 6);
005e641f      void* edx_1 = (*(uint32_t*)((char*)this + 0x10) + eax_2);
005e6426      int32_t edi;
005e6426      int32_t var_10 = edi;
005e6427      void* edi_1 = (((char*)this + (((uint32_t)*(uint8_t*)((char*)edx_1 + 1)) << 1)) + 8);
005e642b      uint32_t esi;
005e642b      esi = *(uint16_t*)edi_1;
005e6433      *(uint16_t*)((char*)edx_1 + 4) = esi;
005e6433      
005e6437      if (esi != 0xffff)
005e6442          *(uint16_t*)((*(uint32_t*)((char*)this + 0x10) + (((uint32_t)esi) * 6)) + 2) = ebx;
005e6442      
005e6447      *(uint16_t*)edi_1 = ebx;
005e644d      *(uint16_t*)((*(uint32_t*)((char*)this + 0x10) + eax_2) + 2) = 0xffff;
005e640a  }


005e645b  void __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::DecrementCount(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this, uint16_t arg2)

005e645b  {
005e6461      int32_t edi;
005e6461      int32_t var_c = edi;
005e646a      uint16_t esi = (arg2 - *(uint16_t*)((char*)this + 0x14));
005e646f      D3DXMesh::CMeshStatus<uint16_t,1,65535>::RemoveElement(this, esi);
005e647d      char* eax_2 = ((*(uint32_t*)((char*)this + 0x10) + (((uint32_t)esi) * 6)) + 1);
005e6481      *(uint8_t*)eax_2 -= 1;
005e6486      D3DXMesh::CMeshStatus<uint16_t,1,65535>::PrependElement(this, esi);
005e645b  }


005e6491  void __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::RemapVertex(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t arg2, uint32_t* arg3)

005e6491  {
005e649d      if ((*(uint8_t*)((char*)this + 0x218) & 2) != 0)
005e649d      {
005e64ab          int32_t* eax_2 = (*(uint32_t*)((char*)this + 0x244) + (arg2 << 2));
005e64b3          *(uint32_t*)eax_2 = arg3[*(uint32_t*)eax_2];
005e649d      }
005e6491  }


005e64b9  void __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::RemapFace(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t arg2, uint32_t* arg3, uint32_t* arg4)

005e64b9  {
005e64ca      uint32_t edx_1 = (arg2 * 0xc);
005e64d4      int32_t* eax_2 = (*(uint32_t*)((char*)this + 0x24c) + edx_1);
005e64d6      int32_t* esi_1 = (*(uint32_t*)((char*)this + 0x250) + edx_1);
005e64d6      
005e64db      if (*(uint32_t*)eax_2 != 0xffffffff)
005e64db      {
005e64de          int32_t edi;
005e64de          int32_t var_10_1 = edi;
005e64e1          int32_t* edx_2 = esi_1;
005e64e3          void* eax_3 = ((char*)eax_2 - esi_1);
005e64e5          int32_t i_1 = 3;
005e6513          int32_t i;
005e6513          
005e6513          do
005e6513          {
005e64ef              *(uint32_t*)((char*)eax_3 + edx_2) = arg3[*(uint32_t*)((char*)eax_3 + edx_2)];
005e64ef              
005e64f9              if ((*(uint8_t*)((char*)this + 0x218) & 1) != 0)
005e64f9              {
005e64fb                  int32_t esi_4 = *(uint32_t*)edx_2;
005e64fb                  
005e6500                  if (esi_4 == 0xffffffff)
005e650c                      *(uint32_t*)edx_2 = 0xffffffff;
005e6500                  else
005e6508                      *(uint32_t*)edx_2 = arg4[esi_4];
005e64f9              }
005e64f9              
005e650f              edx_2 = &edx_2[1];
005e6512              i = i_1;
005e6512              i_1 -= 1;
005e6513          } while (i != 1);
005e64db      }
005e64b9  }


005e651c  void __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::SwapVertex(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t arg2, uint32_t arg3, uint8_t* arg4)

005e651c  {
005e6521      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_1 = this;
005e6525      *(uint32_t*)((char*)this + 0x238);
005e652f      int32_t edi;
005e652f      int32_t var_14 = edi;
005e6533      _chkstk();
005e6538      int32_t ecx = *(uint32_t*)((char*)this + 0x238);
005e6544      void* esi_2 = ((ecx * arg3) + arg4);
005e654d      void* eax_5 = ((ecx * arg2) + arg4);
005e655a      int32_t* var_8 = &var_14;
005e655d      int32_t esi_3;
005e655d      int32_t edi_1;
005e655d      edi_1 = __builtin_memcpy(&var_14, esi_2, ((ecx >> 2) << 2));
005e6564      __builtin_memcpy(edi_1, esi_3, (ecx & 3));
005e6566      int32_t ecx_4 = *(uint32_t*)((char*)this + 0x238);
005e6576      int32_t esi_5;
005e6576      int32_t edi_3;
005e6576      edi_3 = __builtin_memcpy(esi_2, eax_5, ((ecx_4 >> 2) << 2));
005e657d      __builtin_memcpy(edi_3, esi_5, (ecx_4 & 3));
005e657f      int32_t ecx_8 = *(uint32_t*)((char*)this + 0x238);
005e658e      int32_t esi_6;
005e658e      int32_t edi_5;
005e658e      edi_5 = __builtin_memcpy(eax_5, &var_14, ((ecx_8 >> 2) << 2));
005e6595      __builtin_memcpy(edi_5, esi_6, (ecx_8 & 3));
005e6595      
005e659e      if ((*(uint8_t*)((char*)this + 0x218) & 2) != 0)
005e659e      {
005e65ac          int32_t ecx_12 = *(uint32_t*)((char*)this + 0x244);
005e65ae          int32_t* edx_3 = (ecx_12 + (arg3 << 2));
005e65b1          int32_t edi_6 = *(uint32_t*)edx_3;
005e65b3          uint32_t esi_8 = (arg2 << 2);
005e65b9          *(uint32_t*)edx_3 = *(uint32_t*)(esi_8 + ecx_12);
005e65bd          *(uint32_t*)(esi_8 + *(uint32_t*)((char*)this + 0x244)) = edi_6;
005e659e      }
005e651c  }


005e65ca  void __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::SwapFace(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t arg2, uint32_t arg3)

005e65ca  {
005e65d7      int32_t esi = *(uint32_t*)((char*)this + 0x24c);
005e65dd      int32_t edi;
005e65dd      int32_t var_20 = edi;
005e65e4      uint32_t eax_1 = (arg2 * 0xc);
005e65f0      uint32_t edx_2 = (arg3 * 0xc);
005e65f8      int32_t esi_2 = *(uint32_t*)((char*)this + 0x250);
005e6606      int32_t esi_3 = (esi_2 + edx_2);
005e6608      uint32_t edx_3 = (esi + eax_1);
005e660b      uint32_t eax_4 = ((esi + edx_2) - edx_3);
005e6612      int32_t eax_6 = (esi_3 - edx_3);
005e661a      uint32_t eax_8 = ((eax_1 + esi_2) - edx_3);
005e661c      int32_t var_8 = esi_3;
005e6622      int32_t i_1 = 3;
005e6666      int32_t i;
005e6666      
005e6666      do
005e6666      {
005e662c          uint32_t eax_10 = (eax_4 + edx_3);
005e662e          uint32_t esi_4 = *(uint32_t*)eax_10;
005e6635          *(uint32_t*)eax_10 = *(uint32_t*)edx_3;
005e663a          *(uint32_t*)edx_3 = esi_4;
005e663a          
005e6643          if ((*(uint8_t*)((char*)this + 0x218) & 1) != 0)
005e6643          {
005e6648              int32_t* eax_13 = (eax_6 + edx_3);
005e664a              uint32_t esi_6 = *(uint32_t*)eax_13;
005e6655              *(uint32_t*)eax_13 = *(uint32_t*)(eax_8 + edx_3);
005e665d              *(uint32_t*)(eax_8 + edx_3) = esi_6;
005e6643          }
005e6643          
005e6660          edx_3 += 4;
005e6663          i = i_1;
005e6663          i_1 -= 1;
005e6666      } while (i != 1);
005e6666      
005e666f      if ((*(uint8_t*)((char*)this + 0x218) & 4) != 0)
005e666f      {
005e6677          int32_t edx_4 = *(uint32_t*)((char*)this + 0x254);
005e6679          uint32_t esi_10 = (edx_4 + (arg3 << 2));
005e6682          uint32_t esi_11 = *(uint32_t*)esi_10;
005e668a          *(uint32_t*)esi_10 = *(uint32_t*)(edx_4 + (arg2 << 2));
005e6691          *(uint32_t*)(*(uint32_t*)((char*)this + 0x254) + (arg2 << 2)) = esi_11;
005e666f      }
005e666f      
005e669b      if ((*(uint8_t*)((char*)this + 0x218) & 8) != 0)
005e669b      {
005e66a3          int32_t ecx = *(uint32_t*)((char*)this + 0x258);
005e66a5          int16_t* edx_7 = (ecx + (arg3 << 1));
005e66a8          uint32_t ebx;
005e66a8          ebx = *(uint16_t*)edx_7;
005e66ab          int16_t* esi_13 = (arg2 * 2);
005e66ae          ecx = *(uint16_t*)((char*)esi_13 + ecx);
005e66b2          *(uint16_t*)edx_7 = ecx;
005e66b7          *(uint16_t*)((char*)esi_13 + *(uint32_t*)((char*)this + 0x258)) = ebx;
005e669b      }
005e65ca  }


005e66c2  void __thiscall D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::RemoveElement(D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this, uint32_t arg2)

005e66c2  {
005e66ca      int32_t edx = *(uint32_t*)((char*)this + 0x18);
005e66d0      uint32_t eax_2 = (arg2 * 0xc);
005e66d9      int32_t edi;
005e66d9      int32_t var_c = edi;
005e66d9      
005e66da      if (*(uint32_t*)((edx + eax_2) + 4) == 0xffffffff)
005e66da      {
005e6703          void* edx_3 = (*(uint32_t*)((char*)this + 0x18) + eax_2);
005e6709          int32_t edx_4 = *(uint32_t*)((char*)edx_3 + 8);
005e670f          *(uint32_t*)(((char*)this + (((uint32_t)*(uint8_t*)((char*)edx_3 + 1)) << 2)) + 8) = edx_4;
005e670f          
005e6713          if (edx_4 != 0xffffffff)
005e671b              *(uint32_t*)((*(uint32_t*)((char*)this + 0x18) + (edx_4 * 0xc)) + 4) = 0xffffffff;
005e66da      }
005e66da      else
005e66da      {
005e66de          int32_t edx_1 = *(uint32_t*)((edx + eax_2) + 4);
005e66e2          int32_t esi = *(uint32_t*)((edx + eax_2) + 8);
005e66ed          *(uint32_t*)((edx + (edx_1 * 0xc)) + 8) = esi;
005e66ed          
005e66f2          if (esi != 0xffffffff)
005e66fa              *(uint32_t*)((*(uint32_t*)((char*)this + 0x18) + (esi * 0xc)) + 4) = edx_1;
005e66da      }
005e66da      
005e6723      *(uint32_t*)((*(uint32_t*)((char*)this + 0x18) + eax_2) + 8) = 0xffffffff;
005e672b      *(uint32_t*)((*(uint32_t*)((char*)this + 0x18) + eax_2) + 4) = 0xffffffff;
005e66c2  }


005e6736  void __thiscall D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::PrependElement(D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this, uint32_t arg2)

005e6736  {
005e6746      uint32_t eax_1 = (arg2 * 0xc);
005e6749      int32_t edi;
005e6749      int32_t var_10 = edi;
005e674a      void* edi_1 = (*(uint32_t*)((char*)this + 0x18) + eax_1);
005e6751      void* ebx = (((char*)this + (((uint32_t)*(uint8_t*)((char*)edi_1 + 1)) << 2)) + 8);
005e6755      int32_t edx_2 = *(uint32_t*)ebx;
005e675a      *(uint32_t*)((char*)edi_1 + 8) = edx_2;
005e675a      
005e675d      if (edx_2 != 0xffffffff)
005e6765          *(uint32_t*)((*(uint32_t*)((char*)this + 0x18) + (edx_2 * 0xc)) + 4) = arg2;
005e6765      
005e6769      *(uint32_t*)ebx = arg2;
005e676e      *(uint32_t*)((*(uint32_t*)((char*)this + 0x18) + eax_1) + 4) = 0xffffffff;
005e6736  }


005e677a  void __thiscall D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::DecrementCount(D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this, uint32_t arg2)

005e677a  {
005e6783      int32_t edi;
005e6783      int32_t var_c = edi;
005e6786      uint32_t esi_1 = (arg2 - *(uint32_t*)((char*)this + 0x1c));
005e678a      D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::RemoveElement(this, esi_1);
005e6795      char* eax_1 = ((*(uint32_t*)((char*)this + 0x18) + (esi_1 * 0xc)) + 1);
005e6799      *(uint8_t*)eax_1 -= 1;
005e679e      D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::PrependElement(this, esi_1);
005e677a  }


005e67a9  uint16_t __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::CUnprocessedNeighbors(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this, uint16_t arg2)

005e67a9  {
005e67be      uint32_t eax_2;
005e67be      eax_2 = ((uint16_t)*(uint8_t*)((*(uint32_t*)((char*)this + 0x10) + ((((uint32_t)arg2) - ((uint32_t)*(uint16_t*)((char*)this + 0x14))) * 6)) + 1));
005e67c5      return eax_2;
005e67a9  }


005e67c8  float __stdcall CalculateDiff(unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5, unsigned long arg6, uint8_t* arg7, unsigned long arg8)

005e67c8  {
005e67d6      if (arg7 == 0)
005e694d          return ((int32_t)((long double)0f));
005e694d      
005e67e9      int32_t edi;
005e67e9      int32_t var_4c_1 = edi;
005e67f6      void* eax_3 = ((arg1 * arg8) + arg7);
005e67fd      float* ecx_3 = ((arg2 * arg8) + arg7);
005e67ff      void* edx_3 = ((arg3 * arg8) + arg7);
005e6801      void* ebx_3 = ((arg4 * arg8) + arg7);
005e680b      float var_34 = ((float)(((long double)*(uint32_t*)eax_3) - ((long double)*(uint32_t*)ecx_3)));
005e6814      float var_30 = ((float)(((long double)*(uint32_t*)((char*)eax_3 + 4)) - ((long double)ecx_3[1])));
005e6820      float var_2c = ((float)(((long double)*(uint32_t*)((char*)eax_3 + 8)) - ((long double)ecx_3[2])));
005e6825      long double x87_r7_7 = (((long double)*(uint32_t*)eax_3) - ((long double)*(uint32_t*)edx_3));
005e6827      arg1 = ((arg5 * arg8) + arg7);
005e6836      arg7 += (arg6 * arg8);
005e683c      float var_10_1 = var_34;
005e683c      float var_c;
005e683c      int32_t* edi_2 = &var_c;
005e683c      float* esi_7 = &var_30;
005e683d      *(uint32_t*)edi_2 = *(uint32_t*)esi_7;
005e683d      edi_2[1] = esi_7[1];
005e683f      var_34 = ((float)x87_r7_7);
005e684e      var_30 = ((float)(((long double)*(uint32_t*)((char*)eax_3 + 4)) - ((long double)*(uint32_t*)((char*)edx_3 + 4))));
005e685c      var_2c = ((float)(((long double)*(uint32_t*)((char*)eax_3 + 8)) - ((long double)*(uint32_t*)((char*)edx_3 + 8))));
005e685f      float var_1c_1 = var_34;
005e685f      float var_18;
005e685f      int32_t* edi_5 = &var_18;
005e685f      float* esi_10 = &var_30;
005e6860      *(uint32_t*)edi_5 = *(uint32_t*)esi_10;
005e6860      edi_5[1] = esi_10[1];
005e6876      float var_14;
005e6876      float var_8;
005e6876      float var_28 = ((float)((((long double)var_14) * ((long double)var_c)) - (((long double)var_18) * ((long double)var_8))));
005e6887      float var_24 = ((float)((((long double)var_8) * ((long double)var_1c_1)) - (((long double)var_14) * ((long double)var_10_1))));
005e6898      float var_20 = ((float)((((long double)var_18) * ((long double)var_10_1)) - (((long double)var_c) * ((long double)var_1c_1))));
005e689b      var_34 = var_28;
005e689b      float* edi_8 = &var_30;
005e689b      float* esi_13 = &var_24;
005e689c      *(uint32_t*)edi_8 = *(uint32_t*)esi_13;
005e689c      edi_8[1] = esi_13[1];
005e689e      _D3DXVec3Normalize@8(&var_34, &var_34);
005e68aa      float var_40_1 = ((float)(((long double)*(uint32_t*)ebx_3) - ((long double)*(uint32_t*)arg1)));
005e68b9      float var_3c = ((float)(((long double)*(uint32_t*)((char*)ebx_3 + 4)) - ((long double)*(uint32_t*)(arg1 + 4))));
005e68c5      float var_38 = ((float)(((long double)*(uint32_t*)((char*)ebx_3 + 8)) - ((long double)*(uint32_t*)(arg1 + 8))));
005e68c8      float* edi_11 = &var_c;
005e68c8      float* esi_16 = &var_3c;
005e68cb      long double x87_r7_28 = (((long double)*(uint32_t*)ebx_3) - ((long double)*(uint32_t*)arg7));
005e68cd      *(uint32_t*)edi_11 = *(uint32_t*)esi_16;
005e68cd      edi_11[1] = esi_16[1];
005e68cf      float var_40_2 = ((float)x87_r7_28);
005e68de      var_3c = ((float)(((long double)*(uint32_t*)((char*)ebx_3 + 4)) - ((long double)*(uint32_t*)(arg7 + 4))));
005e68ec      var_38 = ((float)(((long double)*(uint32_t*)((char*)ebx_3 + 8)) - ((long double)*(uint32_t*)(arg7 + 8))));
005e68ef      float* edi_14 = &var_18;
005e68ef      float* esi_19 = &var_3c;
005e68f0      *(uint32_t*)edi_14 = *(uint32_t*)esi_19;
005e68f0      edi_14[1] = esi_19[1];
005e6906      float var_40_3 = ((float)((((long double)var_14) * ((long double)var_c)) - (((long double)var_18) * ((long double)var_8))));
005e6917      var_3c = ((float)((((long double)var_8) * ((long double)var_40_2)) - (((long double)var_14) * ((long double)var_40_1))));
005e6928      var_38 = ((float)((((long double)var_18) * ((long double)var_40_1)) - (((long double)var_c) * ((long double)var_40_2))));
005e692b      var_28 = var_40_3;
005e692b      float* edi_17 = &var_24;
005e692b      float* esi_22 = &var_3c;
005e692c      *(uint32_t*)edi_17 = *(uint32_t*)esi_22;
005e692c      edi_17[1] = esi_22[1];
005e692e      _D3DXVec3Normalize@8(&var_28, &var_28);
005e6949      return ((int32_t)(((((long double)var_20) * ((long double)var_2c)) + (((long double)var_24) * ((long double)var_30))) + (((long double)var_28) * ((long double)var_34))));
005e67c8  }


005e6958  unsigned long __stdcall HashFind(unsigned long arg1, unsigned long arg2, unsigned long arg3, struct hashentry** arg4, unsigned long arg5, unsigned long arg6, uint8_t* arg7, unsigned long arg8)

005e6958  {
005e695d      int32_t ecx;
005e695d      int32_t var_8 = ecx;
005e695e      int32_t var_c = ecx;
005e696e      int32_t edi;
005e696e      int32_t var_18 = edi;
005e696f      struct hashentry** i_2 = nullptr;
005e6971      void* ebx = &arg4[(COMBINE(0, arg1) % arg5)];
005e6977      int32_t* i = *(uint32_t*)ebx;
005e6979      arg5 = arg6;
005e6979      
005e6991      for (; i != 0; i = i[4])
005e6991      {
005e6988          if ((i[1] == arg2 && *(uint32_t*)i == arg1))
005e6988          {
005e6998              arg5 = i[3];
005e6998              break;
005e6988          }
005e6988          
005e698a          i_2 = i;
005e6991      }
005e6991      
005e699d      int32_t* i_3 = i;
005e699f      struct hashentry** i_4 = i_2;
005e699f      
005e69a2      if (i != 0)
005e69a2      {
005e69a4          int32_t* i_1 = i[4];
005e69a7          arg4 = i;
005e69a7          
005e6a12          for (; i_1 != 0; i_1 = i_1[4])
005e6a12          {
005e69b9              if ((i_1[1] == arg2 && *(uint32_t*)i_1 == arg1))
005e69b9              {
005e69d3                  float var_c_1 = ((float)CalculateDiff(*(uint32_t*)i_3, i_3[1], i_3[2], arg2, arg1, arg3, arg7, arg8));
005e69ed                  long double st0_2 = CalculateDiff(*(uint32_t*)i_1, i_1[1], i_1[2], arg2, arg1, arg3, arg7, arg8);
005e69f2                  long double temp3_1 = ((long double)var_c_1);
005e69f2                  (st0_2 - temp3_1);
005e69f2                  
005e69fa                  if ((*(uint8_t*)((char*)((((st0_2 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(st0_2, temp3_1))) ? 1 : 0) << 0xa) | ((((st0_2 == temp3_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005e69fa                  {
005e69ff                      i_4 = arg4;
005e6a05                      i_3 = i_1;
005e6a07                      arg5 = i_1[3];
005e69fa                  }
005e69b9              }
005e69b9              
005e6a0a              arg4 = i_1;
005e6a12          }
005e69a2      }
005e69a2      
005e6a1a      if (arg5 != arg6)
005e6a1a      {
005e6a21          if (i_4 == 0)
005e6a2e              *(uint32_t*)ebx = i_3[4];
005e6a21          else
005e6a26              i_4[4] = i_3[4];
005e6a1a      }
005e6a1a      
005e6a34      return arg5;
005e6958  }


005e6a37  int32_t __stdcall _D3DXDeclaratorFromFVF@8(unsigned long arg1, struct _D3DVERTEXELEMENT9* arg2)

005e6a37  {
005e6a47      DXCrackFVF var_54;
005e6a47      DXCrackFVF::DXCrackFVF(&var_54, arg1);
005e6a4f      struct _D3DVERTEXELEMENT9* esi = arg2;
005e6a52      unsigned long ebx = 0;
005e6a58      int32_t result = 0;
005e6a5b      unsigned long var_8 = 0;
005e6a5e      int16_t var_14 = 0xff;
005e6a64      int16_t var_12 = 0;
005e6a68      char var_10 = 0x11;
005e6a6c      char var_f = 0;
005e6a6f      char var_e = 0;
005e6a72      char var_d = 0;
005e6a72      
005e6a89      if (((arg1 & 0x6001) != 0 || (arg1 & 0xf00) > 0x800))
005e6ba7          return 0x8876086c;
005e6ba7      
005e6a8f      int32_t eax_1 = (arg1 & 0x400e);
005e6a8f      
005e6a94      if (eax_1 != 0)
005e6a94      {
005e6a9e          enum _D3DDECLUSAGE var_6c_1;
005e6a9e          unsigned long var_68_1;
005e6a9e          
005e6a9e          if (eax_1 != 4)
005e6a9e          {
005e6aa6              var_68_1 = 2;
005e6aa8              var_6c_1 = 0;
005e6a9e          }
005e6a9e          else
005e6a9e          {
005e6aa0              var_68_1 = 3;
005e6aa2              var_6c_1 = 9;
005e6a9e          }
005e6a9e          
005e6aaa          D3DXMesh::SetElement(esi, var_6c_1, var_68_1, &var_8, 0);
005e6aaf          esi = &esi[1];
005e6a94      }
005e6a94      
005e6ab7      int32_t edi;
005e6ab7      int32_t var_60_1 = edi;
005e6abb      int32_t var_1c;
005e6abb      
005e6abb      if (var_1c <= 0)
005e6abb          goto label_5e6b16;
005e6abb      
005e6ac1      enum _D3DDECLUSAGE var_70_2;
005e6ac1      unsigned long var_6c_3;
005e6ac1      int32_t* var_68_3;
005e6ac1      char var_53;
005e6ac1      
005e6ac1      if ((var_53 & 0x90) != 0)
005e6ac1      {
005e6ac6          if (var_1c > 1)
005e6ac6          {
005e6ad4              D3DXMesh::SetElement(esi, 1, (var_1c - 2), &var_8, 0);
005e6ad9              esi = &esi[1];
005e6ac6          }
005e6ac6          
005e6ae2          int32_t var_64_2 = 0;
005e6ae3          var_68_3 = &var_8;
005e6ae3          
005e6ae4          if ((var_53 & 0x10) == 0)
005e6aea              var_6c_3 = 4;
005e6ae4          else
005e6ae6              var_6c_3 = 5;
005e6ae6          
005e6aec          var_70_2 = 2;
005e6ae4          goto label_5e6b0b;
005e6ac1      }
005e6ac1      
005e6af3      if (var_1c != 5)
005e6af3      {
005e6b01          int32_t var_64_3 = 0;
005e6b05          var_68_3 = &var_8;
005e6b07          var_6c_3 = (var_1c - 1);
005e6b08          var_70_2 = 1;
005e6b0b      label_5e6b0b:
005e6b0b          D3DXMesh::SetElement(esi, var_70_2, var_6c_3, var_68_3, 0);
005e6b10          esi = &esi[1];
005e6b16      label_5e6b16:
005e6b16          
005e6b16          if ((arg1 & 0x10) != 0)
005e6b16          {
005e6b22              D3DXMesh::SetElement(esi, 3, 2, &var_8, 0);
005e6b27              esi = &esi[1];
005e6b16          }
005e6b16          
005e6b2d          if ((arg1 & 0x20) != 0)
005e6b2d          {
005e6b38              D3DXMesh::SetElement(esi, 4, 0, &var_8, 0);
005e6b3d              esi = &esi[1];
005e6b2d          }
005e6b2d          
005e6b43          if ((arg1 & 0x40) != 0)
005e6b43          {
005e6b4f              D3DXMesh::SetElement(esi, 0xa, 4, &var_8, 0);
005e6b54              esi = &esi[1];
005e6b43          }
005e6b43          
005e6b5a          if ((arg1 & 0x80) != 0)
005e6b5a          {
005e6b67              D3DXMesh::SetElement(esi, 0xa, 4, &var_8, 1);
005e6b6c              esi = &esi[1];
005e6b5a          }
005e6b5a          
005e6b71          int32_t var_18;
005e6b71          
005e6b71          if (var_18 > 0)
005e6b71          {
005e6b94              do
005e6b94              {
005e6b89                  D3DXMesh::SetElement(esi, 5, ((DXCrackFVF::CbTexCoordSize(&var_54, ebx) >> 2) - 1), &var_8, ebx);
005e6b8e                  esi = &esi[1];
005e6b90                  ebx += 1;
005e6b94              } while (ebx < var_18);
005e6b71          }
005e6b71          
005e6b96          int32_t eax_8 = var_14;
005e6b99          esi->Stream = eax_8;
005e6b99          esi->Offset = *(uint16_t*)((char*)eax_8)[2];
005e6b9b          int32_t eax_9 = var_10;
005e6b9e          esi->Type = eax_9;
005e6b9e          esi->Method = *(uint8_t*)((char*)eax_9)[1];
005e6b9e          esi->Usage = *(uint8_t*)((char*)eax_9)[2];
005e6b9e          esi->UsageIndex = *(uint8_t*)((char*)eax_9)[3];
005e6af3      }
005e6af3      else
005e6af5          result = 0x8876086c;
005e6af5      
005e6baf      return result;
005e6a37  }


005e6bb2  void __thiscall D3DXMesh::CD3DXCrackDecl1::CD3DXCrackDecl1(D3DXMesh::CD3DXCrackDecl1* this, struct _D3DVERTEXELEMENT9 const* arg2)

005e6bb2  {
005e6bb8      int32_t edi;
005e6bb8      int32_t var_c = edi;
005e6bbb      D3DXMesh::CD3DXCrackDecl::CD3DXCrackDecl(this);
005e6bc8      __builtin_memset(((char*)this + 0x88), 0, 0x18);
005e6bf2      __builtin_memset(((char*)this + 0xa0), 0, 0x20);
005e6bf6      D3DXMesh::CD3DXCrackDecl1::SetDeclaration(this, arg2);
005e6bb2  }


005e6c03  void __thiscall D3DXMesh::SVertexCopyContext::SVertexCopyContext(D3DXMesh::SVertexCopyContext* this, struct _D3DVERTEXELEMENT9 const* arg2, struct _D3DVERTEXELEMENT9 const* arg3)

005e6c03  {
005e6c0a      int32_t edi;
005e6c0a      int32_t var_10 = edi;
005e6c11      D3DXMesh::CD3DXCrackDecl1::CD3DXCrackDecl1(this, arg2);
005e6c21      D3DXMesh::CD3DXCrackDecl1::CD3DXCrackDecl1(((char*)this + 0xc4), arg3);
005e6c26      *(uint32_t*)((char*)this + 0x188) = 0;
005e6c26      
005e6c32      if (arg2->Stream != 0xff)
005e6c32      {
005e6c34          uint8_t* edi_2 = &arg2->Usage;
005e6c34          
005e6c83          do
005e6c83          {
005e6c42              struct _D3DVERTEXELEMENT9* eax_3 = D3DXMesh::CD3DXCrackDecl::GetSemanticElement(((char*)this + 0xc4), ((uint32_t)ADJ(edi_2)->Usage), ((uint32_t)ADJ(edi_2)->UsageIndex));
005e6c42              
005e6c55              if ((eax_3 != 0 && (ADJ(edi_2)->Method != 4 && eax_3->Method != 4)))
005e6c55              {
005e6c60                  *(uint32_t*)(((char*)this + (*(uint32_t*)((char*)this + 0x188) << 2)) + 0x18c) = &edi_2[0xfffffffa];
005e6c6d                  *(uint32_t*)(((char*)this + (*(uint32_t*)((char*)this + 0x188) << 2)) + 0x290) = eax_3;
005e6c74                  *(uint32_t*)((char*)this + 0x188) += 1;
005e6c55              }
005e6c55              
005e6c7a              edi_2 = &edi_2[8];
005e6c83          } while (ADJ(edi_2)->Stream != 0xff);
005e6c32      }
005e6c03  }


005e6c8e  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::DrawSubset(unsigned long arg1)

005e6c8e  {
005e6c93      int32_t ecx;
005e6c93      int32_t var_8 = ecx;
005e6c94      int32_t var_c = ecx;
005e6c97      unsigned long esi = arg1;
005e6ca2      int32_t edi;
005e6ca2      int32_t var_18 = edi;
005e6ca6      int32_t var_c_1 = 0;
005e6ca6      
005e6ca9      if (*(uint32_t*)(esi + 0x234) != 0)
005e6ca9      {
005e6caf          int32_t* eax_1 = *(uint32_t*)(esi + 0x230);
005e6cbb          *(uint32_t*)(*(uint32_t*)eax_1 + 0x15c)(eax_1, *(uint32_t*)(esi + 8));
005e6cc7          int32_t* eax_2 = *(uint32_t*)(esi + 0x230);
005e6cd8          *(uint32_t*)(*(uint32_t*)eax_2 + 0x190)(eax_2, 0, *(uint32_t*)(esi + 0x234), 0, *(uint32_t*)(esi + 0x238));
005e6cde          int32_t* eax_3 = *(uint32_t*)(esi + 0x230);
005e6ced          *(uint32_t*)(*(uint32_t*)eax_3 + 0x1a0)(eax_3, *(uint32_t*)(esi + 0x248));
005e6ced          
005e6cfa          if ((*(uint8_t*)(esi + 0x218) & 0x10) == 0)
005e6cfa          {
005e6d82              int32_t i = 0;
005e6d8a              arg1 = 0;
005e6d8a              
005e6d8d              if (*(uint32_t*)(esi + 0x264) > 0)
005e6d8d              {
005e6dd8                  do
005e6dd8                  {
005e6d9b                      if (*(uint32_t*)(*(uint32_t*)(esi + 0x254) + (i << 2)) != i_1)
005e6d9b                      {
005e6da5                          if (arg1 > 0)
005e6da5                          {
005e6daa                              int32_t* ecx_9 = *(uint32_t*)(esi + 0x230);
005e6dc8                              *(uint32_t*)(*(uint32_t*)ecx_9 + 0x148)(ecx_9, 4, 0, 0, *(uint32_t*)(esi + 0x23c), ((i - arg1) * 3), arg1);
005e6da5                          }
005e6da5                          
005e6dce                          arg1 = 0;
005e6d9b                      }
005e6d9b                      else
005e6d9d                          arg1 += 1;
005e6d9d                      
005e6dd1                      i += 1;
005e6dd8                  } while (i < *(uint32_t*)(esi + 0x264));
005e6dd8                  
005e6ddd                  if (arg1 > 0)
005e6ddd                  {
005e6de5                      int32_t* eax_14 = *(uint32_t*)(esi + 0x230);
005e6dfc                      return *(uint32_t*)(*(uint32_t*)eax_14 + 0x148)(eax_14, 4, 0, 0, *(uint32_t*)(esi + 0x23c), ((i - arg1) * 3), arg1);
005e6ddd                  }
005e6d8d              }
005e6cfa          }
005e6cfa          else
005e6cfa          {
005e6d00              int32_t edi_1 = *(uint32_t*)(esi + 0x260);
005e6d19              int32_t i_2;
005e6d19              
005e6d19              if ((i_1 >= edi_1 || *(uint32_t*)(*(uint32_t*)(esi + 0x25c) + (i_1 * 0x14)) != i_1))
005e6d19              {
005e6d1f                  i_2 = 0;
005e6d1f                  
005e6d23                  if (edi_1 > 0)
005e6d23                  {
005e6d25                      int32_t* edx_2 = *(uint32_t*)(esi + 0x25c);
005e6d25                      
005e6d2d                      while (*(uint32_t*)edx_2 != i_1)
005e6d2d                      {
005e6d2f                          i_2 += 1;
005e6d30                          edx_2 = &edx_2[5];
005e6d30                          
005e6d35                          if (i_2 >= edi_1)
005e6d35                              break;
005e6d2d                      }
005e6d23                  }
005e6d19              }
005e6d19              else
005e6d1b                  i_2 = i_1;
005e6d1b              
005e6d39              if (i_2 < edi_1)
005e6d39              {
005e6d45                  int32_t edx_3 = *(uint32_t*)(esi + 0x25c);
005e6d4a                  int32_t eax_6 = (i_2 * 0x14);
005e6d4a                  
005e6d51                  if (*(uint32_t*)((eax_6 + edx_3) + 8) > 0)
005e6d51                  {
005e6d57                      int32_t* esi_1 = *(uint32_t*)(esi + 0x230);
005e6d61                      void* eax_7 = (eax_6 + edx_3);
005e6d77                      return *(uint32_t*)(*(uint32_t*)esi_1 + 0x148)(esi_1, 4, 0, *(uint32_t*)((char*)eax_7 + 0xc), *(uint32_t*)((char*)eax_7 + 0x10), (*(uint32_t*)((char*)eax_7 + 4) * 3), *(uint32_t*)((char*)eax_7 + 8));
005e6d51                  }
005e6d39              }
005e6cfa          }
005e6ca9      }
005e6ca9      
005e6e0f      return 0;
005e6c8e  }


005e6e12  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Resize(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t arg2, uint32_t arg3)

005e6e12  {
005e6e1d      uint32_t __security_cookie_1 = __security_cookie;
005e6e28      uint32_t eax = *(uint32_t*)((char*)this + 0x268);
005e6e31      int32_t edi;
005e6e31      int32_t var_5d0 = edi;
005e6e32      uint32_t var_48c = eax;
005e6e38      uint32_t var_488 = eax;
005e6e3e      uint32_t var_490 = eax;
005e6e4d      bool cond:0 = *(uint32_t*)((char*)this + 8) != 0;
005e6e5b      int32_t* var_458 = nullptr;
005e6e61      int32_t var_494 = *(uint32_t*)((char*)this + 0x240);
005e6e67      int32_t* var_45c = nullptr;
005e6e6d      int32_t s;
005e6e6d      __builtin_memset(&s, 0, 0x14);
005e6e7f      int32_t* var_460;
005e6e7f      
005e6e7f      if (!(cond:0))
005e6e7f      {
005e6e83          D3DXDebugMuteInt(1);
005e6e88          int32_t* eax_2 = *(uint32_t*)((char*)this + 0x230);
005e6e9d          var_460 = *(uint32_t*)(*(uint32_t*)eax_2 + 0x158)(eax_2, ((char*)this + 0xc), ((char*)this + 8));
005e6ea3          D3DXDebugMuteInt(0);
005e6ea3          
005e6eae          if (var_460 < 0)
005e6eb0              *(uint32_t*)((char*)this + 8) = 0;
005e6e7f      }
005e6e7f      
005e6eb2      uint32_t esi = arg2;
005e6ec5      int32_t* var_470;
005e6ec5      int32_t var_46c;
005e6ec5      int32_t var_468;
005e6ec5      int32_t var_464;
005e6ec5      int32_t result;
005e6ec5      
005e6ec5      if ((esi >= 0xffff || arg3 >= 0xffff))
005e7413          result = 0x8876086c;
005e6ec5      else if (*(uint32_t*)((char*)this + 0x268) >= esi)
005e6ed1      {
005e70bb      label_5e70bb:
005e70bb          
005e70c1          if (*(uint32_t*)((char*)this + 0x240) >= arg3)
005e70c1          {
005e724d          label_5e724d:
005e724d              *(uint32_t*)((char*)this + 0x23c) = arg3;
005e7253              int32_t* eax_42 = *(uint32_t*)((char*)this + 0x230);
005e7260              *(uint32_t*)((char*)this + 0x264) = esi;
005e726c              void var_5c4;
005e726c              result = *(uint32_t*)(*(uint32_t*)eax_42 + 0x1c)(eax_42, &var_5c4);
005e726c              
005e7270              if (result >= 0)
005e7270              {
005e7276                  int32_t* eax_44 = *(uint32_t*)((char*)this + 0x230);
005e7289                  result = *(uint32_t*)(*(uint32_t*)eax_44 + 0x18)(eax_44, &var_470);
005e7289                  
005e728d                  if (result >= 0)
005e728d                  {
005e729e                      if (D3DXMesh::sm_pD3DDeviceCacheInfo == *(uint32_t*)((char*)this + 0x230))
005e729e                      {
005e7400                          *(uint32_t*)((char*)this + 0x274) = D3DXMesh::sm_dwCacheSize;
005e740b                          *(uint32_t*)((char*)this + 0x278) = D3DXMesh::sm_dwMagicNumber;
005e729e                      }
005e729e                      else
005e729e                      {
005e72a4                          int32_t* eax_47 = var_470;
005e72bf                          int32_t var_5c0;
005e72bf                          void var_454;
005e72bf                          result = *(uint32_t*)(*(uint32_t*)eax_47 + 0x14)(eax_47, var_5c0, 0, &var_454);
005e72bf                          
005e72c3                          if (result >= 0)
005e72c3                          {
005e72e2                              unsigned long var_47c;
005e72e2                              unsigned long var_478;
005e72e2                              int32_t var_2c;
005e72e2                              int32_t var_28;
005e72e2                              uint32_t var_480;
005e72e2                              
005e72e2                              if (((var_2c != 0x1002 || var_28 < 0x5144) || var_28 > 0x5147))
005e72e2                              {
005e7305                                  int32_t var_484 = 0;
005e7305                                  uint32_t* edi_19 = &var_480;
005e7306                                  *(uint32_t*)edi_19 = 0;
005e7306                                  void* edi_20 = &edi_19[1];
005e7307                                  *(uint32_t*)edi_20 = 0;
005e730b                                  *(uint32_t*)((char*)edi_20 + 4) = 0;
005e730c                                  int32_t* eax_49 = *(uint32_t*)((char*)this + 0x230);
005e730c                                  
005e731f                                  if (*(uint32_t*)(*(uint32_t*)eax_49 + 0x1d8)(eax_49, 4, 0) < 0)
005e731f                                  {
005e7385                                  label_5e7385:
005e7385                                      var_480 = 1;
005e738f                                      var_47c = 0xc;
005e7399                                      var_478 = 7;
005e73a3                                      result = 0;
005e731f                                  }
005e731f                                  else
005e731f                                  {
005e7321                                      int32_t* eax_51 = *(uint32_t*)((char*)this + 0x230);
005e7321                                      
005e733b                                      if (*(uint32_t*)(*(uint32_t*)eax_51 + 0x1d8)(eax_51, 4, &var_460) < 0)
005e733b                                          goto label_5e7385;
005e733b                                      
005e733d                                      int32_t* eax_53 = var_460;
005e734b                                      result = *(uint32_t*)(*(uint32_t*)eax_53 + 0x18)(eax_53, 1);
005e734b                                      
005e734f                                      if (result >= 0)
005e734f                                      {
005e7353                                          result = 1;
005e7354                                          bool cond:2_1 = false;
005e7354                                          
005e7356                                          while (!(cond:2_1))
005e7356                                          {
005e7358                                              int32_t* eax_55 = var_460;
005e736f                                              result = *(uint32_t*)(*(uint32_t*)eax_55 + 0x1c)(eax_55, &var_484, 0x10, 1);
005e7371                                              cond:2_1 = result == 0;
005e7371                                              
005e7373                                              if (result < 0)
005e7373                                                  break;
005e7356                                          }
005e734f                                      }
005e734f                                      
005e7375                                      int32_t* eax_57 = var_460;
005e737e                                      *(uint32_t*)(*(uint32_t*)eax_57 + 8)(eax_57);
005e737e                                      
005e7383                                      if (result < 0)
005e7383                                          goto label_5e7385;
005e731f                                  }
005e731f                                  
005e73ab                                  if (var_480 == 0)
005e73ab                                  {
005e73ad                                      var_47c = 0;
005e73b3                                      var_478 = 0;
005e73ab                                  }
005e73ab                                  
005e73b9                                  int32_t ecx_46 = *(uint32_t*)((char*)this + 0x274);
005e73b9                                  
005e73c7                                  if (*(uint32_t*)((char*)this + 0x278) > ecx_46)
005e73c9                                      *(uint32_t*)((char*)this + 0x278) = ecx_46;
005e72e2                              }
005e72e2                              else
005e72e2                              {
005e72e6                                  var_480 = 0;
005e72ec                                  var_47c = 0;
005e72f2                                  var_478 = 0;
005e72e2                              }
005e73d7                              D3DXMesh::sm_dwCacheSize = var_47c;
005e73dc                              D3DXMesh::sm_dwMagicNumber = var_478;
005e73e2                              *(uint32_t*)((char*)this + 0x274) = var_47c;
005e73e8                              struct IDirect3DDevice9* eax_60 = *(uint32_t*)((char*)this + 0x230);
005e73ee                              *(uint32_t*)((char*)this + 0x278) = var_478;
005e73f4                              D3DXMesh::sm_pD3DDeviceCacheInfo = eax_60;
005e72c3                          }
005e729e                      }
005e728d                  }
005e7270              }
005e70c1          }
005e70c1          else
005e70c1          {
005e70ce              int32_t eax_26;
005e70ce              
005e70ce              if ((*(uint8_t*)((char*)this + 0x218) & 2) != 0)
005e70e5                  eax_26 = ResizeDynamicArray<uint16_t>(((char*)this + 0x244), arg3, *(uint32_t*)((char*)this + 0x23c), &var_494);
005e70e5              
005e70ec              if (((*(uint8_t*)((char*)this + 0x218) & 2) != 0 && eax_26 == 0))
005e703e                  result = 0x8007000e;
005e70ec              else
005e70ec              {
005e70f9                  if ((*(uint8_t*)((char*)this + 0x218) & 0x20) != 0)
005e70f9                      goto label_5e724d;
005e70f9                  
005e70ff                  int32_t* eax_27 = *(uint32_t*)((char*)this + 0x230);
005e712d                  result = *(uint32_t*)(*(uint32_t*)eax_27 + 0x68)(eax_27, (*(uint32_t*)((char*)this + 0x238) * arg3), *(uint32_t*)((char*)this + 0x228), *(uint32_t*)((char*)this + 4), *(uint32_t*)((char*)this + 0x220), &var_458, 0);
005e712d                  
005e7131                  if (result >= 0)
005e7131                  {
005e713f                      if (*(uint32_t*)((char*)this + 0x23c) <= 0)
005e713f                          goto label_5e7223;
005e713f                      
005e7145                      int32_t* eax_29 = *(uint32_t*)((char*)this + 0x234);
005e7160                      result = *(uint32_t*)(*(uint32_t*)eax_29 + 0x2c)(eax_29, 0, 0, &var_46c, 0x800);
005e7160                      
005e7164                      if (result >= 0)
005e7164                      {
005e716a                          int32_t* eax_31 = var_458;
005e7182                          result = *(uint32_t*)(*(uint32_t*)eax_31 + 0x2c)(eax_31, 0, 0, &var_468, 0x800);
005e7182                          
005e7186                          if (result >= 0)
005e7186                          {
005e7192                              int32_t ecx_25 = (*(uint32_t*)((char*)this + 0x238) * *(uint32_t*)((char*)this + 0x23c));
005e71aa                              int32_t esi_5;
005e71aa                              int32_t edi_13;
005e71aa                              edi_13 = __builtin_memcpy(var_468, var_46c, ((ecx_25 >> 2) << 2));
005e71b1                              __builtin_memcpy(edi_13, esi_5, (ecx_25 & 3));
005e71b3                              int32_t edx_13 = *(uint32_t*)((char*)this + 0x23c);
005e71b9                              int32_t edi_14 = *(uint32_t*)((char*)this + 0x238);
005e71c4                              int32_t ecx_31 = ((arg3 - edx_13) * edi_14);
005e71de                              __builtin_memset(__builtin_memset(((edi_14 * edx_13) + var_468), 0, ((ecx_31 >> 2) << 2)), 0, (ecx_31 & 3));
005e71e0                              int32_t* eax_34 = var_458;
005e71ec                              result = *(uint32_t*)(*(uint32_t*)eax_34 + 0x30)(eax_34);
005e71ec                              
005e71f0                              if (result >= 0)
005e71f0                              {
005e71f6                                  int32_t* eax_36 = *(uint32_t*)((char*)this + 0x234);
005e71fc                                  var_468 = 0;
005e7209                                  result = *(uint32_t*)(*(uint32_t*)eax_36 + 0x30)(eax_36);
005e7209                                  
005e720d                                  if (result >= 0)
005e720d                                  {
005e7213                                      var_46c = 0;
005e721a                                      esi = arg2;
005e7223                                  label_5e7223:
005e7223                                      int32_t* eax_38 = *(uint32_t*)((char*)this + 0x234);
005e7223                                      
005e7227                                      if (eax_38 != 0)
005e7227                                      {
005e722c                                          *(uint32_t*)(*(uint32_t*)eax_38 + 8)(eax_38);
005e722f                                          *(uint32_t*)((char*)this + 0x234) = nullptr;
005e7227                                      }
005e7227                                      
005e7232                                      int32_t* eax_39 = var_458;
005e7238                                      var_458 = nullptr;
005e723f                                      *(uint32_t*)((char*)this + 0x234) = eax_39;
005e7244                                      *(uint32_t*)((char*)this + 0x240) = arg3;
005e7244                                      goto label_5e724d;
005e720d                                  }
005e71f0                              }
005e7186                          }
005e7164                      }
005e7131                  }
005e70ec              }
005e70c1          }
005e6ed1      }
005e6ed1      else
005e6ed1      {
005e6ed7          int32_t* eax_4 = *(uint32_t*)((char*)this + 0x230);
005e6f00          result = *(uint32_t*)(*(uint32_t*)eax_4 + 0x6c)(eax_4, (esi * 6), *(uint32_t*)((char*)this + 0x224), 0x65, *(uint32_t*)((char*)this + 0x21c), &var_45c, 0);
005e6f00          
005e6f06          if (result >= 0)
005e6f06          {
005e6f12              if (*(uint32_t*)((char*)this + 0x264) <= 0)
005e6f12                  goto label_5e6ff3;
005e6f12              
005e6f18              int32_t* eax_6 = *(uint32_t*)((char*)this + 0x248);
005e6f33              result = *(uint32_t*)(*(uint32_t*)eax_6 + 0x2c)(eax_6, 0, 0, &s, 0x800);
005e6f33              
005e6f37              if (result >= 0)
005e6f37              {
005e6f3d                  int32_t* eax_8 = var_45c;
005e6f55                  result = *(uint32_t*)(*(uint32_t*)eax_8 + 0x2c)(eax_8, 0, 0, &var_464, 0x800);
005e6f55                  
005e6f59                  if (result >= 0)
005e6f59                  {
005e6f74                      int32_t ecx_4 = (*(uint32_t*)((char*)this + 0x264) * 6);
005e6f7b                      int32_t esi_2;
005e6f7b                      int32_t edi_3;
005e6f7b                      edi_3 = __builtin_memcpy(var_464, s, ((ecx_4 >> 2) << 2));
005e6f85                      __builtin_memcpy(edi_3, esi_2, (ecx_4 & 3));
005e6f87                      int32_t edx_5 = *(uint32_t*)((char*)this + 0x264);
005e6f98                      int32_t ecx_9 = ((arg2 - edx_5) * 6);
005e6fae                      __builtin_memset(__builtin_memset((var_464 + (edx_5 * 6)), 0, ((ecx_9 >> 2) << 2)), 0, (ecx_9 & 3));
005e6fb0                      int32_t* eax_14 = var_45c;
005e6fbc                      result = *(uint32_t*)(*(uint32_t*)eax_14 + 0x30)(eax_14);
005e6fbc                      
005e6fc0                      if (result >= 0)
005e6fc0                      {
005e6fc6                          int32_t* eax_16 = *(uint32_t*)((char*)this + 0x248);
005e6fcc                          var_464 = 0;
005e6fd9                          result = *(uint32_t*)(*(uint32_t*)eax_16 + 0x30)(eax_16);
005e6fd9                          
005e6fdd                          if (result >= 0)
005e6fdd                          {
005e6fe3                              s = 0;
005e6fea                              esi = arg2;
005e6ff3                          label_5e6ff3:
005e6ff3                              int32_t* eax_18 = *(uint32_t*)((char*)this + 0x248);
005e6ff3                              
005e6ff7                              if (eax_18 != 0)
005e6ff7                              {
005e6ffc                                  *(uint32_t*)(*(uint32_t*)eax_18 + 8)(eax_18);
005e6fff                                  *(uint32_t*)((char*)this + 0x248) = nullptr;
005e6ff7                              }
005e6ff7                              
005e7002                              int32_t* eax_19 = var_45c;
005e7008                              var_45c = nullptr;
005e700f                              bool cond:1_1 = (*(uint8_t*)((char*)this + 0x218) & 1) == 0;
005e7016                              *(uint32_t*)((char*)this + 0x248) = eax_19;
005e7018                              *(uint32_t*)((char*)this + 0x268) = esi;
005e701e                              int32_t eax_21;
005e701e                              
005e701e                              if (!(cond:1_1))
005e7035                                  eax_21 = ResizeDynamicArray<class D3DXMesh::NeighborInfo<uint16_t> >(((char*)this + 0x250), esi, *(uint32_t*)((char*)this + 0x264), &var_48c);
005e7035                              
005e703c                              if ((!(cond:1_1) && eax_21 == 0))
005e703e                                  result = 0x8007000e;
005e703c                              else if ((*(uint8_t*)((char*)this + 0x218) & 4) == 0)
005e704f                              {
005e7091                              label_5e7091:
005e7091                                  
005e7098                                  if ((*(uint8_t*)((char*)this + 0x218) & 8) == 0)
005e7098                                      goto label_5e70bb;
005e7098                                  
005e70b6                                  if (ResizeDynamicArray<uint16_t>(((char*)this + 0x258), esi, *(uint32_t*)((char*)this + 0x264), &var_490) != 0)
005e70b6                                      goto label_5e70bb;
005e70b6                                  
005e703e                                  result = 0x8007000e;
005e704f                              }
005e704f                              else
005e704f                              {
005e706d                                  if (ResizeDynamicArray<unsigned long>(((char*)this + 0x254), esi, *(uint32_t*)((char*)this + 0x264), &var_488) != 0)
005e706d                                  {
005e706f                                      int32_t edx_8 = *(uint32_t*)((char*)this + 0x264);
005e707b                                      int32_t ecx_18 = ((esi - edx_8) << 2);
005e708f                                      __builtin_memset(__builtin_memset((*(uint32_t*)((char*)this + 0x254) + (edx_8 << 2)), 0, ((ecx_18 >> 2) << 2)), 0, (ecx_18 & 3));
005e708f                                      goto label_5e7091;
005e706d                                  }
005e706d                                  
005e703e                                  result = 0x8007000e;
005e704f                              }
005e6fdd                          }
005e6fc0                      }
005e6f59                  }
005e6f37              }
005e6f06          }
005e6ed1      }
005e6ed1      
005e7418      int32_t* eax_63 = var_470;
005e7418      
005e7420      if (eax_63 != 0)
005e7420      {
005e7425          *(uint32_t*)(*(uint32_t*)eax_63 + 8)(eax_63);
005e7428          var_470 = nullptr;
005e7420      }
005e7420      
005e7436      if (var_464 != 0)
005e7436      {
005e7438          int32_t* eax_64 = var_45c;
005e7441          *(uint32_t*)(*(uint32_t*)eax_64 + 0x30)(eax_64);
005e7436      }
005e7436      
005e744b      if (s != 0)
005e744b      {
005e744d          int32_t* eax_65 = *(uint32_t*)((char*)this + 0x248);
005e7456          *(uint32_t*)(*(uint32_t*)eax_65 + 0x30)(eax_65);
005e744b      }
005e744b      
005e7460      if (var_468 != 0)
005e7460      {
005e7462          int32_t* eax_66 = var_458;
005e746b          *(uint32_t*)(*(uint32_t*)eax_66 + 0x30)(eax_66);
005e7460      }
005e7460      
005e7475      if (var_46c != 0)
005e7475      {
005e7477          int32_t* ebx_1 = *(uint32_t*)((char*)this + 0x234);
005e7480          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005e7475      }
005e7475      
005e748b      __security_check_cookie(__security_cookie_1);
005e7491      return result;
005e6e12  }


005e7494  void* __thiscall ?BValid@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@EAE_NPAV?$GXTri3Face@G@2@@Z(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg1, int16_t* arg2)

005e7494  {
005e749c      int16_t* result_7 = arg2;
005e74a4      char var_6 = 0;
005e74a8      char var_5 = 0;
005e74a8      
005e74ac      if (result_7 != 0)
005e74ac          goto label_5e74ae;
005e74ac      
005e74bc      int16_t* result_5;
005e74bc      void* result;
005e74bc      int16_t* edx;
005e74bc      
005e74bc      if (*(uint32_t*)((char*)arg1 + 0x24c) == 0)
005e74bc      {
005e74cd          result = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg1, &result_5, 0x10);
005e74cd          
005e74d4          if (result >= 0)
005e74d4              goto label_5e74e0;
005e74bc      }
005e74bc      else
005e74bc      {
005e74be          result_7 = *(uint32_t*)((char*)arg1 + 0x24c);
005e74c0          arg2 = result_7;
005e74ae      label_5e74ae:
005e74ae          result_5 = result_7;
005e74e0      label_5e74e0:
005e74e0          void* var_18_1 = nullptr;
005e74e7          void* edi;
005e74e7          void* var_48_2 = edi;
005e74e7          
005e74e8          if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005e74e8          {
005e74ee              result = *(uint32_t*)((char*)arg1 + 0x250);
005e74f4              int16_t* result_4 = result_5;
005e74f7              int16_t* ebx_1 = &result_4[1];
005e74fd              void* var_1c_2 = ((char*)result - result_4);
005e7500              void* result_1 = result;
005e7503              int16_t* var_28_1 = ebx_1;
005e7503              
005e7506              while (true)
005e7506              {
005e7506                  result_4 = ebx_1[-1];
005e7506                  
005e750f                  if (result_4 != 0xffff)
005e750f                  {
005e756f                      int32_t temp3_1 = (*(uint32_t*)((char*)arg1 + 0x218) & 2);
005e7573                      void* edi_1;
005e7573                      bool cond:3_1;
005e7573                      
005e7573                      if (temp3_1 == 0)
005e7573                      {
005e75b1                          int32_t eax_1;
005e75b1                          eax_1 = *(uint16_t*)ebx_1;
005e75b1                          
005e75b7                          if (result_4 == eax_1)
005e75c7                              var_5 = 1;
005e75b7                          else
005e75b7                          {
005e75b9                              edx = ebx_1[1];
005e75b9                              
005e75c0                              if (eax_1 == edx)
005e75c7                                  var_5 = 1;
005e75c0                              else
005e75c0                              {
005e75c2                                  cond:3_1 = edx != result_4;
005e75c5                              label_5e75c5:
005e75c5                                  
005e75c5                                  if (!(cond:3_1))
005e75c7                                      var_5 = 1;
005e75c0                              }
005e75b7                          }
005e7573                      }
005e7573                      else
005e7573                      {
005e7578                          edx = *(uint32_t*)((char*)arg1 + 0x244);
005e7581                          result_4 = (((uint32_t)result_4) << 1);
005e7583                          edi_1 = *(uint16_t*)((char*)result_4 + edx);
005e7587                          uint32_t eax_3 = (((uint32_t)*(uint16_t*)ebx_1) << 1);
005e7587                          
005e758d                          if (edi_1 == *(uint16_t*)(eax_3 + edx))
005e75c7                              var_5 = 1;
005e758d                          else
005e758d                          {
005e7593                              edi_1 = *(uint32_t*)((char*)arg1 + 0x244);
005e7599                              eax_3 = *(uint16_t*)(eax_3 + edi_1);
005e759d                              edx = (((uint32_t)ebx_1[1]) << 1);
005e759d                              
005e75a3                              if (eax_3 != *(uint16_t*)((char*)edx + edi_1))
005e75a3                              {
005e75a7                                  edx = *(uint16_t*)((char*)edx + edi_1);
005e75ab                                  cond:3_1 = edx != *(uint16_t*)((char*)result_4 + edi_1);
005e75af                                  goto label_5e75c5;
005e75a3                              }
005e75a3                              
005e75c7                              var_5 = 1;
005e758d                          }
005e7573                      }
005e7573                      
005e75d2                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0)
005e75d2                      {
005e75e1                          int32_t eax_5 = 0;
005e75e6                          void* result_3 = result_1;
005e75e6                          
005e75ef                          while (true)
005e75ef                          {
005e75ef                              uint32_t ecx_4 = ((uint32_t)*(uint16_t*)((&ebx_1[-1] - result_1) + result_3));
005e7604                              edx = ((uint32_t)ebx_1[(-1 + (COMBINE(0, (eax_5 + 1)) % 3))]);
005e7608                              result = *(uint32_t*)((char*)arg1 + 0x23c);
005e7610                              int16_t var_2c_1 = edx;
005e7610                              
005e7613                              if (ecx_4 >= result)
005e7613                                  break;
005e7613                              
005e761b                              if (edx >= result)
005e761b                                  break;
005e761b                              
005e7621                              result_4 = result_3;
005e7624                              result = *(uint16_t*)result_4;
005e7624                              
005e762b                              if (result != 0xffff)
005e762b                              {
005e763a                                  if (((uint32_t)result) >= *(uint32_t*)((char*)arg1 + 0x264))
005e763a                                      break;
005e763a                                  
005e764c                                  uint32_t eax_10 = (((uint32_t)*(uint16_t*)result_4) * 6);
005e764e                                  edi_1 = (eax_10 + result_5);
005e765a                                  result = D3DXMesh::FindEdge<uint16_t>((eax_10 + *(uint32_t*)((char*)arg1 + 0x250)), var_18_1);
005e765a                                  
005e7662                                  if (result >= 3)
005e7662                                      break;
005e7662                                  
005e766c                                  if (temp3_1 != 0)
005e766c                                  {
005e766e                                      int16_t ecx_7 = *(uint16_t*)((char*)edi_1 + (result << 1));
005e7681                                      result_4 = (((uint32_t)ecx_4) << 1);
005e7683                                      int16_t eax_13 = *(uint16_t*)((char*)edi_1 + ((COMBINE(0, ((char*)result + 1)) % 3) << 1));
005e7687                                      edx = *(uint32_t*)((char*)arg1 + 0x244);
005e768d                                      edi_1 = *(uint16_t*)((char*)result_4 + edx);
005e7698                                      result = (((uint32_t)ecx_7) << 1);
005e769e                                      uint32_t ebx_2;
005e769e                                      
005e769e                                      if (edi_1 == *(uint16_t*)((char*)edx + result))
005e769e                                      {
005e76a8                                          ebx_2 = edx[((uint32_t)var_2c_1)];
005e76b0                                          ebx_1 = var_28_1;
005e769e                                      }
005e769e                                      
005e76b3                                      if ((edi_1 != *(uint16_t*)((char*)edx + result) || ebx_2 != edx[((uint32_t)eax_13)]))
005e76b3                                      {
005e76b9                                          int16_t* result_2 = *(uint32_t*)((char*)arg1 + 0x244);
005e76bf                                          edi_1 = result_2[((uint32_t)var_2c_1)];
005e76bf                                          
005e76c7                                          if (edi_1 != *(uint16_t*)((char*)result_2 + result))
005e76c7                                              break;
005e76c7                                          
005e76c9                                          result = result_2;
005e76cf                                          result_4 = *(uint16_t*)((char*)result + result_4);
005e76cf                                          
005e76d7                                          if (result_4 != *(uint16_t*)((char*)result + (((uint32_t)eax_13) << 1)))
005e76d7                                              break;
005e76b3                                      }
005e766c                                  }
005e762b                              }
005e762b                              
005e76d9                              eax_5 += 1;
005e76dc                              result_3 += 2;
005e76dc                              
005e76e3                              if (eax_5 >= 3)
005e76e3                                  goto label_5e76e9;
005e75ef                          }
005e75ef                          
005e7613                          goto label_5e7737;
005e75d2                      }
005e750f                  }
005e750f                  else
005e750f                  {
005e7511                      result = *(uint16_t*)ebx_1;
005e7511                      
005e7517                      if (result_4 != result)
005e7517                          goto label_5e7737;
005e7517                      
005e7521                      if (result != ebx_1[1])
005e7521                          goto label_5e7737;
005e7521                      
005e752e                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0)
005e752e                      {
005e7537                          result_4 = *(uint16_t*)result_1;
005e7537                          
005e753f                          if (result_4 != 0xffff)
005e753f                              goto label_5e7737;
005e753f                          
005e7548                          edx = ((char*)var_1c_2 + ebx_1);
005e754b                          result = *(uint16_t*)edx;
005e754b                          
005e7551                          if (result_4 != result)
005e7551                              goto label_5e7737;
005e7551                          
005e755b                          if (result != edx[1])
005e755b                              goto label_5e7737;
005e752e                      }
005e750f                  }
005e750f                  
005e76e9              label_5e76e9:
005e76e9                  var_18_1 += 1;
005e76ef                  result_1 += 6;
005e76f3                  ebx_1 = &ebx_1[3];
005e76fc                  var_28_1 = ebx_1;
005e76fc                  
005e76ff                  if (var_18_1 >= *(uint32_t*)((char*)arg1 + 0x264))
005e76ff                  {
005e7709                      if (var_5 == 0)
005e7709                          break;
005e7709                      
005e770b                      var_6 = 0;
005e770f                      goto label_5e7737;
005e76ff                  }
005e7506              }
005e74e8          }
005e74e8          
005e7721          if (((*(uint8_t*)((char*)arg1 + 0x218) & 0x10) != 0 && *(uint32_t*)((char*)arg1 + 0x25c) != 0))
005e7721          {
005e7723              int16_t* result_6 = result_5;
005e7728              result = ?BValidAttributeGroups@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAE_NPAV?$GXTri3Face@I@2@@Z(arg1);
005e7721          }
005e7721          
005e772f          if ((((*(uint8_t*)((char*)arg1 + 0x218) & 0x10) == 0 || *(uint32_t*)((char*)arg1 + 0x25c) == 0) || result != 0))
005e7731              var_6 = 1;
005e74bc      }
005e7737  label_5e7737:
005e7737      
005e7741      if ((result_5 != 0 && arg2 == 0))
005e7741      {
005e7743          int32_t* esi_1 = *(uint32_t*)((char*)arg1 + 0x248);
005e774c          *(uint32_t*)(*(uint32_t*)esi_1 + 0x30)(esi_1);
005e7741      }
005e7741      
005e774f      result = var_6;
005e7754      return result;
005e7494  }


005e7757  void* __fastcall ?BValidAttributeGroups@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAE_NPAV?$GXTri3Face@I@2@@Z(void* arg1)

005e7757  {
005e775c      void* var_8 = arg1;
005e775d      int32_t var_8_1 = 0;
005e776a      int32_t edi;
005e776a      int32_t var_14 = edi;
005e776b      void* result;
005e776b      
005e776b      if (*(uint32_t*)((char*)arg1 + 0x260) <= 0)
005e776b      {
005e77a9      label_5e77a9:
005e77a9          result = 1;
005e776b      }
005e776b      else
005e776b      {
005e776d          result = *(uint32_t*)((char*)arg1 + 0x25c);
005e7773      label_5e7773:
005e7773          int32_t esi_1 = *(uint32_t*)((char*)result + 4);
005e777b          int32_t edx_2 = (*(uint32_t*)((char*)result + 8) + esi_1);
005e777b          
005e7796          while (true)
005e7796          {
005e7796              if (esi_1 >= edx_2)
005e7796              {
005e7798                  var_8_1 += 1;
005e779e                  result += 0x14;
005e779e                  
005e77a7                  if (var_8_1 < *(uint32_t*)((char*)arg1 + 0x260))
005e77a7                      goto label_5e7773;
005e77a7                  
005e77a7                  goto label_5e77a9;
005e7796              }
005e7796              
005e7791              if (((*(uint8_t*)((char*)arg1 + 0x218) & 4) != 0 && *(uint32_t*)(*(uint32_t*)((char*)arg1 + 0x254) + (esi_1 << 2)) != *(uint32_t*)result))
005e7791              {
005e77b2                  result = 0;
005e77b4                  break;
005e7791              }
005e7791              
005e7793              esi_1 += 1;
005e7796          }
005e776b      }
005e776b      
005e77af      return result;
005e7757  }


005e77b6  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::DrawSubset(unsigned long arg1)

005e77b6  {
005e77b8      int32_t __saved_ebp_1;
005e77b8      int32_t __saved_ebp = __saved_ebp_1;
005e77be      int32_t __saved_ebx_1;
005e77be      int32_t __saved_ebx = __saved_ebx_1;
005e77bf      unsigned long ebx = arg1;
005e77c2      int32_t __saved_esi_1;
005e77c2      int32_t __saved_esi = __saved_esi_1;
005e77c3      int32_t edi;
005e77c3      int32_t var_28 = edi;
005e77c3      int32_t* esp_1 = &var_28;
005e77c6      bool cond:0 = *(uint32_t*)(ebx + 0x234) == 0;
005e77cc      long result = 0;
005e77cf      int32_t var_c = 0;
005e77cf      
005e77d2      if (!(cond:0))
005e77d2      {
005e77d8          bool cond:1_1 = (*(uint8_t*)(ebx + 0x218) & 0x40) == 0;
005e77df          int32_t var_2c_1 = *(uint32_t*)(ebx + 8);
005e77e2          int32_t* eax_1 = *(uint32_t*)(ebx + 0x230);
005e77e8          int32_t ecx_1 = *(uint32_t*)eax_1;
005e77ea          int32_t* var_30 = eax_1;
005e77ea          
005e77eb          if (cond:1_1)
005e77eb          {
005e798e              *(uint32_t*)(ecx_1 + 0x15c)();
005e799a              int32_t* eax_20 = *(uint32_t*)(ebx + 0x230);
005e79a2              int32_t var_38_4 = 0;
005e79a9              int32_t var_40_2 = 0;
005e79ab              *(uint32_t*)(*(uint32_t*)eax_20 + 0x190)(eax_20, 0, *(uint32_t*)(ebx + 0x234), 0, *(uint32_t*)(ebx + 0x238));
005e79b1              int32_t* eax_21 = *(uint32_t*)(ebx + 0x230);
005e79c0              *(uint32_t*)(*(uint32_t*)eax_21 + 0x1a0)(eax_21, *(uint32_t*)(ebx + 0x248));
005e79c0              esp_1 = &var_30;
005e79c0              
005e79cd              if ((*(uint8_t*)(ebx + 0x218) & 0x10) == 0)
005e79cd              {
005e7a4e                  int32_t edx_9 = 0;
005e7a50                  int32_t i = 0;
005e7a50                  
005e7a58                  if (*(uint32_t*)(ebx + 0x264) > 0)
005e7a58                  {
005e7aa9                      do
005e7aa9                      {
005e7a66                          if (*(uint32_t*)(*(uint32_t*)(ebx + 0x254) + (i << 2)) != i_1)
005e7a66                          {
005e7a6d                              if (edx_9 > 0)
005e7a6d                              {
005e7a6f                                  int32_t* ecx_28 = *(uint32_t*)(ebx + 0x230);
005e7a8e                                  int32_t var_40_4 = 0;
005e7a8f                                  int32_t var_44_4 = 0;
005e7a90                                  int32_t var_48_2 = 4;
005e7a93                                  long result_4 = *(uint32_t*)(*(uint32_t*)ecx_28 + 0x148)(ecx_28, 4, 0, 0, *(uint32_t*)(ebx + 0x23c), ((i - edx_9) * 3), edx_9);
005e7a93                                  esp_1 = &var_30;
005e7a9b                                  result = result_4;
005e7a9b                                  
005e7a9e                                  if (result_4 < 0)
005e7a9e                                      goto label_5e7ad2;
005e7a6d                              }
005e7a6d                              
005e7aa0                              edx_9 = 0;
005e7a66                          }
005e7a66                          else
005e7a68                              edx_9 += 1;
005e7a68                          
005e7aa2                          i += 1;
005e7aa9                      } while (i < *(uint32_t*)(ebx + 0x264));
005e7aa9                      
005e7aad                      if (edx_9 > 0)
005e7aad                      {
005e7aaf                          int32_t* eax_33 = *(uint32_t*)(ebx + 0x230);
005e7ac4                          int32_t var_40_5 = 0;
005e7ac5                          int32_t var_44_5 = 0;
005e7ac6                          int32_t var_48_3 = 4;
005e7ac9                          esp_1 = &var_30;
005e7acf                          result = *(uint32_t*)(*(uint32_t*)eax_33 + 0x148)(eax_33, 4, 0, 0, *(uint32_t*)(ebx + 0x23c), ((i - edx_9) * 3), edx_9);
005e7aad                      }
005e7a58                  }
005e79cd              }
005e79cd              else
005e79cd              {
005e79cf                  int32_t esi_15 = *(uint32_t*)(ebx + 0x260);
005e79e8                  int32_t i_2;
005e79e8                  
005e79e8                  if ((i_1 >= esi_15 || *(uint32_t*)(*(uint32_t*)(ebx + 0x25c) + (i_1 * 0x14)) != i_1))
005e79e8                  {
005e79ee                      i_2 = 0;
005e79ee                      
005e79f2                      if (esi_15 > 0)
005e79f2                      {
005e79f4                          int32_t* edx_7 = *(uint32_t*)(ebx + 0x25c);
005e79f4                          
005e79fc                          while (*(uint32_t*)edx_7 != i_1)
005e79fc                          {
005e79fe                              i_2 += 1;
005e79ff                              edx_7 = &edx_7[5];
005e79ff                              
005e7a08                              if (i_2 >= *(uint32_t*)(ebx + 0x260))
005e7a08                                  break;
005e79fc                          }
005e79f2                      }
005e79e8                  }
005e79e8                  else
005e79ea                      i_2 = i_1;
005e79ea                  
005e7a0c                  if (i_2 < esi_15)
005e7a0c                  {
005e7a1b                      void* eax_24 = (*(uint32_t*)(ebx + 0x25c) + (i_2 * 0x14));
005e7a1e                      int32_t ecx_25 = *(uint32_t*)((char*)eax_24 + 8);
005e7a1e                      
005e7a23                      if (ecx_25 > 0)
005e7a23                      {
005e7a29                          int32_t* edx_8 = *(uint32_t*)(ebx + 0x230);
005e7a3f                          int32_t var_44_3 = 0;
005e7a40                          int32_t var_48_1 = 4;
005e7a43                          esp_1 = &var_30;
005e7acf                          result = *(uint32_t*)(*(uint32_t*)edx_8 + 0x148)(edx_8, 4, 0, *(uint32_t*)((char*)eax_24 + 0xc), *(uint32_t*)((char*)eax_24 + 0x10), (*(uint32_t*)((char*)eax_24 + 4) * 3), ecx_25);
005e7a23                      }
005e7a0c                  }
005e79cd              }
005e77eb          }
005e77eb          else
005e77eb          {
005e77f1              *(uint32_t*)(ecx_1 + 0x15c)();
005e77fd              int32_t var_18_1 = *(uint32_t*)(ebx + 0x264);
005e780f              *(uint8_t*)((char*)arg1)[3] = 0;
005e7813              int32_t esi = 0;
005e7815              _chkstk();
005e7821              int32_t** var_14_1 = &var_30;
005e7821              
005e7824              if ((*(uint8_t*)(ebx + 0x218) & 0x10) != 0)
005e7824              {
005e7826                  int32_t edx_1 = *(uint32_t*)(ebx + 0x260);
005e782c                  int32_t eax_7 = 0;
005e782c                  
005e7830                  if (edx_1 > 0)
005e7830                  {
005e7832                      int32_t* ecx_2 = *(uint32_t*)(ebx + 0x25c);
005e7832                      
005e783d                      while (*(uint32_t*)ecx_2 != i_1)
005e783d                      {
005e783f                          eax_7 += 1;
005e7840                          ecx_2 = &ecx_2[5];
005e7840                          
005e7849                          if (eax_7 >= *(uint32_t*)(ebx + 0x260))
005e7849                              break;
005e783d                      }
005e7830                  }
005e7830                  
005e784d                  if (eax_7 == edx_1)
005e784f                      return 0;
005e784f                  
005e785f                  void* eax_10 = (*(uint32_t*)(ebx + 0x25c) + (eax_7 * 0x14));
005e7862                  esi = *(uint32_t*)((char*)eax_10 + 4);
005e786a                  var_18_1 = (*(uint32_t*)((char*)eax_10 + 8) + esi);
005e786d                  *(uint8_t*)((char*)arg1)[3] = 1;
005e7824              }
005e7824              
005e7871              int32_t var_34_1 = 0x10;
005e7879              long result_1 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(ebx, &var_c, 0x10);
005e7879              esp_1 = &var_30;
005e7880              result = result_1;
005e7880              
005e7883              if (result_1 >= 0)
005e7883              {
005e788f                  int32_t var_34_2 = 0x10;
005e7894                  long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(ebx, (ebx + 0x24c), 0x10);
005e7894                  esp_1 = &var_30;
005e789b                  result = result_2;
005e789b                  
005e789e                  if (result_2 >= 0)
005e789e                  {
005e78a7                      int32_t var_10_1 = esi;
005e78a7                      
005e78aa                      if (esi < var_18_1)
005e78aa                      {
005e78b3                          int32_t ecx_7 = (esi * 0xc);
005e78b6                          int32_t var_1c_1 = ecx_7;
005e78b6                          
005e7983                          do
005e7983                          {
005e78bf                              int32_t* eax_15 = (*(uint32_t*)(ebx + 0x24c) + ecx_7);
005e78bf                              
005e78d6                              if ((*(uint8_t*)((char*)arg1)[3] != 0 || *(uint32_t*)(*(uint32_t*)(ebx + 0x254) + (var_10_1 << 2)) == i_1))
005e78d6                              {
005e78de                                  int32_t ecx_8 = *(uint32_t*)(ebx + 0x238);
005e78f2                                  int32_t esi_6;
005e78f2                                  int32_t edi_3;
005e78f2                                  edi_3 = __builtin_memcpy(var_14_1, ((*(uint32_t*)eax_15 * ecx_8) + var_c), ((ecx_8 >> 2) << 2));
005e78fc                                  __builtin_memcpy(edi_3, esi_6, (ecx_8 & 3));
005e7901                                  void* ecx_12 = *(uint32_t*)(ebx + 0x238);
005e790d                                  void* edi_4 = ((char*)ecx_12 + var_14_1);
005e7918                                  int32_t esi_10;
005e7918                                  int32_t edi_5;
005e7918                                  edi_5 = __builtin_memcpy(edi_4, ((eax_15[1] * ecx_12) + var_c), ((ecx_12 >> 2) << 2));
005e791f                                  __builtin_memcpy(edi_5, esi_10, (ecx_12 & 3));
005e7924                                  void* ecx_16 = *(uint32_t*)(ebx + 0x238);
005e793b                                  int32_t esi_14;
005e793b                                  int32_t edi_7;
005e793b                                  edi_7 = __builtin_memcpy(((char*)ecx_16 + edi_4), ((eax_15[2] * ecx_16) + var_c), ((ecx_16 >> 2) << 2));
005e7942                                  __builtin_memcpy(edi_7, esi_14, (ecx_16 & 3));
005e794a                                  int32_t* eax_18 = *(uint32_t*)(ebx + 0x230);
005e7955                                  int32_t var_3c_1 = 1;
005e7957                                  int32_t var_40_1 = 4;
005e795a                                  long result_3 = *(uint32_t*)(*(uint32_t*)eax_18 + 0x14c)(eax_18, 4, 1, var_14_1, *(uint32_t*)(ebx + 0x238));
005e795a                                  esp_1 = &var_30;
005e7964                                  result = result_3;
005e7964                                  
005e7967                                  if (result_3 < 0)
005e7967                                      break;
005e7967                                  
005e796d                                  ecx_7 = var_1c_1;
005e78d6                              }
005e78d6                              
005e7974                              var_10_1 += 1;
005e797a                              ecx_7 += 0xc;
005e7980                              var_1c_1 = ecx_7;
005e7983                          } while (var_10_1 < var_18_1);
005e78aa                      }
005e789e                  }
005e7883              }
005e77eb          }
005e77eb          
005e7ad2      label_5e7ad2:
005e7ad2          
005e7ad5          if (var_c != 0)
005e7ad5          {
005e7ad7              int32_t* eax_34 = *(uint32_t*)(ebx + 0x234);
005e7ae0              *(uint32_t*)(*(uint32_t*)eax_34 + 0x30)(eax_34);
005e7ae0              esp_1 = &var_30;
005e7ad5          }
005e77d2      }
005e77d2      
005e7aeb      if (*(uint32_t*)(ebx + 0x24c) != 0)
005e7aeb      {
005e7aed          int32_t* ebx_1 = *(uint32_t*)(ebx + 0x248);
005e7af3          int32_t eax_35 = *(uint32_t*)ebx_1;
005e7af5          *(uint32_t*)((char*)esp_1 - 4) = ebx_1;
005e7af6          *(uint32_t*)(eax_35 + 0x30)();
005e7af9          *(uint32_t*)(ebx + 0x24c) = 0;
005e7aeb      }
005e7aeb      
005e7afb      return result;
005e77b6  }


005e7b08  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::CloneMeshFVF(unsigned long arg1, unsigned long arg2, struct IDirect3DDevice9* arg3, struct ID3DXMesh** arg4)

005e7b08  {
005e7b1d      void var_20c;
005e7b1d      int32_t result = _D3DXDeclaratorFromFVF@8(arg3, &var_20c);
005e7b1d      
005e7b24      if (result < 0)
005e7b40          return result;
005e7b40      
005e7b3c      return *(uint32_t*)(*(uint32_t*)arg1 + 0x30)(arg1, arg2, &var_20c, arg4, arg_14);
005e7b08  }


005e7b43  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Resize(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t arg2, uint32_t arg3)

005e7b43  {
005e7b4e      uint32_t __security_cookie_1 = __security_cookie;
005e7b59      uint32_t eax = *(uint32_t*)((char*)this + 0x268);
005e7b62      int32_t edi;
005e7b62      int32_t var_5d0 = edi;
005e7b63      uint32_t var_48c = eax;
005e7b69      uint32_t var_488 = eax;
005e7b6f      uint32_t var_490 = eax;
005e7b7e      bool cond:0 = *(uint32_t*)((char*)this + 8) != 0;
005e7b8c      int32_t* var_458 = nullptr;
005e7b92      int32_t var_494 = *(uint32_t*)((char*)this + 0x240);
005e7b98      int32_t* var_45c = nullptr;
005e7b9e      int32_t s;
005e7b9e      __builtin_memset(&s, 0, 0x14);
005e7bb0      int32_t* var_460;
005e7bb0      
005e7bb0      if (!(cond:0))
005e7bb0      {
005e7bb4          D3DXDebugMuteInt(1);
005e7bb9          int32_t* eax_2 = *(uint32_t*)((char*)this + 0x230);
005e7bce          var_460 = *(uint32_t*)(*(uint32_t*)eax_2 + 0x158)(eax_2, ((char*)this + 0xc), ((char*)this + 8));
005e7bd4          D3DXDebugMuteInt(0);
005e7bd4          
005e7bdf          if (var_460 < 0)
005e7be1              *(uint32_t*)((char*)this + 8) = 0;
005e7bb0      }
005e7bb0      
005e7be3      uint32_t esi = arg2;
005e7bf3      int32_t* var_470;
005e7bf3      int32_t var_46c;
005e7bf3      int32_t var_468;
005e7bf3      int32_t var_464;
005e7bf3      int32_t result;
005e7bf3      
005e7bf3      if ((esi >= 0xffffffff || arg3 >= 0xffffffff))
005e816e          result = 0x8876086c;
005e7bf3      else if (*(uint32_t*)((char*)this + 0x268) >= esi)
005e7bff      {
005e7dec      label_5e7dec:
005e7dec          
005e7df2          if (*(uint32_t*)((char*)this + 0x240) >= arg3)
005e7df2          {
005e7f7e          label_5e7f7e:
005e7f7e              *(uint32_t*)((char*)this + 0x23c) = arg3;
005e7f84              int32_t* eax_42 = *(uint32_t*)((char*)this + 0x230);
005e7f91              *(uint32_t*)((char*)this + 0x264) = esi;
005e7f9d              void var_5c4;
005e7f9d              result = *(uint32_t*)(*(uint32_t*)eax_42 + 0x1c)(eax_42, &var_5c4);
005e7f9d              
005e7fa1              if (result >= 0)
005e7fa1              {
005e7fa7                  int32_t* eax_44 = *(uint32_t*)((char*)this + 0x230);
005e7fba                  result = *(uint32_t*)(*(uint32_t*)eax_44 + 0x18)(eax_44, &var_470);
005e7fba                  
005e7fbe                  if (result >= 0)
005e7fbe                  {
005e7fe5                      int32_t var_510;
005e7fe5                      int32_t var_50c;
005e7fe5                      
005e7fe5                      if (((var_50c < *(uint32_t*)((char*)this + 0x240) || var_50c <= 0xffff) || var_510 < *(uint32_t*)((char*)this + 0x268)))
005e7fe7                          *(uint32_t*)((char*)this + 0x218) |= 0x40;
005e7fe7                      
005e7ff9                      if (D3DXMesh::sm_pD3DDeviceCacheInfo == *(uint32_t*)((char*)this + 0x230))
005e7ff9                      {
005e815b                          *(uint32_t*)((char*)this + 0x274) = D3DXMesh::sm_dwCacheSize;
005e8166                          *(uint32_t*)((char*)this + 0x278) = D3DXMesh::sm_dwMagicNumber;
005e7ff9                      }
005e7ff9                      else
005e7ff9                      {
005e7fff                          int32_t* eax_49 = var_470;
005e801a                          int32_t var_5c0;
005e801a                          void var_454;
005e801a                          result = *(uint32_t*)(*(uint32_t*)eax_49 + 0x14)(eax_49, var_5c0, 0, &var_454);
005e801a                          
005e801e                          if (result >= 0)
005e801e                          {
005e803d                              unsigned long var_47c;
005e803d                              unsigned long var_478;
005e803d                              int32_t var_2c;
005e803d                              int32_t var_28;
005e803d                              uint32_t var_480;
005e803d                              
005e803d                              if (((var_2c != 0x1002 || var_28 < 0x5144) || var_28 > 0x5147))
005e803d                              {
005e8060                                  int32_t var_484 = 0;
005e8060                                  uint32_t* edi_19 = &var_480;
005e8061                                  *(uint32_t*)edi_19 = 0;
005e8061                                  void* edi_20 = &edi_19[1];
005e8062                                  *(uint32_t*)edi_20 = 0;
005e8066                                  *(uint32_t*)((char*)edi_20 + 4) = 0;
005e8067                                  int32_t* eax_51 = *(uint32_t*)((char*)this + 0x230);
005e8067                                  
005e807a                                  if (*(uint32_t*)(*(uint32_t*)eax_51 + 0x1d8)(eax_51, 4, 0) < 0)
005e807a                                  {
005e80e0                                  label_5e80e0:
005e80e0                                      var_480 = 1;
005e80ea                                      var_47c = 0xc;
005e80f4                                      var_478 = 7;
005e80fe                                      result = 0;
005e807a                                  }
005e807a                                  else
005e807a                                  {
005e807c                                      int32_t* eax_53 = *(uint32_t*)((char*)this + 0x230);
005e807c                                      
005e8096                                      if (*(uint32_t*)(*(uint32_t*)eax_53 + 0x1d8)(eax_53, 4, &var_460) < 0)
005e8096                                          goto label_5e80e0;
005e8096                                      
005e8098                                      int32_t* eax_55 = var_460;
005e80a6                                      result = *(uint32_t*)(*(uint32_t*)eax_55 + 0x18)(eax_55, 1);
005e80a6                                      
005e80aa                                      if (result >= 0)
005e80aa                                      {
005e80ae                                          result = 1;
005e80af                                          bool cond:2_1 = false;
005e80af                                          
005e80b1                                          while (!(cond:2_1))
005e80b1                                          {
005e80b3                                              int32_t* eax_57 = var_460;
005e80ca                                              result = *(uint32_t*)(*(uint32_t*)eax_57 + 0x1c)(eax_57, &var_484, 0x10, 1);
005e80cc                                              cond:2_1 = result == 0;
005e80cc                                              
005e80ce                                              if (result < 0)
005e80ce                                                  break;
005e80b1                                          }
005e80aa                                      }
005e80aa                                      
005e80d0                                      int32_t* eax_59 = var_460;
005e80d9                                      *(uint32_t*)(*(uint32_t*)eax_59 + 8)(eax_59);
005e80d9                                      
005e80de                                      if (result < 0)
005e80de                                          goto label_5e80e0;
005e807a                                  }
005e807a                                  
005e8106                                  if (var_480 == 0)
005e8106                                  {
005e8108                                      var_47c = 0;
005e810e                                      var_478 = 0;
005e8106                                  }
005e8106                                  
005e8114                                  int32_t ecx_46 = *(uint32_t*)((char*)this + 0x274);
005e8114                                  
005e8122                                  if (*(uint32_t*)((char*)this + 0x278) > ecx_46)
005e8124                                      *(uint32_t*)((char*)this + 0x278) = ecx_46;
005e803d                              }
005e803d                              else
005e803d                              {
005e8041                                  var_480 = 0;
005e8047                                  var_47c = 0;
005e804d                                  var_478 = 0;
005e803d                              }
005e8132                              D3DXMesh::sm_dwCacheSize = var_47c;
005e8137                              D3DXMesh::sm_dwMagicNumber = var_478;
005e813d                              *(uint32_t*)((char*)this + 0x274) = var_47c;
005e8143                              struct IDirect3DDevice9* eax_62 = *(uint32_t*)((char*)this + 0x230);
005e8149                              *(uint32_t*)((char*)this + 0x278) = var_478;
005e814f                              D3DXMesh::sm_pD3DDeviceCacheInfo = eax_62;
005e801e                          }
005e7ff9                      }
005e7fbe                  }
005e7fa1              }
005e7df2          }
005e7df2          else
005e7df2          {
005e7dff              int32_t eax_26;
005e7dff              
005e7dff              if ((*(uint8_t*)((char*)this + 0x218) & 2) != 0)
005e7e16                  eax_26 = ResizeDynamicArray<unsigned long>(((char*)this + 0x244), arg3, *(uint32_t*)((char*)this + 0x23c), &var_494);
005e7e16              
005e7e1d              if (((*(uint8_t*)((char*)this + 0x218) & 2) != 0 && eax_26 == 0))
005e7d6f                  result = 0x8007000e;
005e7e1d              else
005e7e1d              {
005e7e2a                  if ((*(uint8_t*)((char*)this + 0x218) & 0x20) != 0)
005e7e2a                      goto label_5e7f7e;
005e7e2a                  
005e7e30                  int32_t* eax_27 = *(uint32_t*)((char*)this + 0x230);
005e7e5e                  result = *(uint32_t*)(*(uint32_t*)eax_27 + 0x68)(eax_27, (*(uint32_t*)((char*)this + 0x238) * arg3), *(uint32_t*)((char*)this + 0x228), *(uint32_t*)((char*)this + 4), *(uint32_t*)((char*)this + 0x220), &var_458, 0);
005e7e5e                  
005e7e62                  if (result >= 0)
005e7e62                  {
005e7e70                      if (*(uint32_t*)((char*)this + 0x23c) <= 0)
005e7e70                          goto label_5e7f54;
005e7e70                      
005e7e76                      int32_t* eax_29 = *(uint32_t*)((char*)this + 0x234);
005e7e91                      result = *(uint32_t*)(*(uint32_t*)eax_29 + 0x2c)(eax_29, 0, 0, &var_46c, 0x800);
005e7e91                      
005e7e95                      if (result >= 0)
005e7e95                      {
005e7e9b                          int32_t* eax_31 = var_458;
005e7eb3                          result = *(uint32_t*)(*(uint32_t*)eax_31 + 0x2c)(eax_31, 0, 0, &var_468, 0x800);
005e7eb3                          
005e7eb7                          if (result >= 0)
005e7eb7                          {
005e7ec3                              int32_t ecx_25 = (*(uint32_t*)((char*)this + 0x238) * *(uint32_t*)((char*)this + 0x23c));
005e7edb                              int32_t esi_5;
005e7edb                              int32_t edi_13;
005e7edb                              edi_13 = __builtin_memcpy(var_468, var_46c, ((ecx_25 >> 2) << 2));
005e7ee2                              __builtin_memcpy(edi_13, esi_5, (ecx_25 & 3));
005e7ee4                              int32_t edx_13 = *(uint32_t*)((char*)this + 0x23c);
005e7eea                              int32_t edi_14 = *(uint32_t*)((char*)this + 0x238);
005e7ef5                              int32_t ecx_31 = ((arg3 - edx_13) * edi_14);
005e7f0f                              __builtin_memset(__builtin_memset(((edi_14 * edx_13) + var_468), 0, ((ecx_31 >> 2) << 2)), 0, (ecx_31 & 3));
005e7f11                              int32_t* eax_34 = var_458;
005e7f1d                              result = *(uint32_t*)(*(uint32_t*)eax_34 + 0x30)(eax_34);
005e7f1d                              
005e7f21                              if (result >= 0)
005e7f21                              {
005e7f27                                  int32_t* eax_36 = *(uint32_t*)((char*)this + 0x234);
005e7f2d                                  var_468 = 0;
005e7f3a                                  result = *(uint32_t*)(*(uint32_t*)eax_36 + 0x30)(eax_36);
005e7f3a                                  
005e7f3e                                  if (result >= 0)
005e7f3e                                  {
005e7f44                                      var_46c = 0;
005e7f4b                                      esi = arg2;
005e7f54                                  label_5e7f54:
005e7f54                                      int32_t* eax_38 = *(uint32_t*)((char*)this + 0x234);
005e7f54                                      
005e7f58                                      if (eax_38 != 0)
005e7f58                                      {
005e7f5d                                          *(uint32_t*)(*(uint32_t*)eax_38 + 8)(eax_38);
005e7f60                                          *(uint32_t*)((char*)this + 0x234) = nullptr;
005e7f58                                      }
005e7f58                                      
005e7f63                                      int32_t* eax_39 = var_458;
005e7f69                                      var_458 = nullptr;
005e7f70                                      *(uint32_t*)((char*)this + 0x234) = eax_39;
005e7f75                                      *(uint32_t*)((char*)this + 0x240) = arg3;
005e7f75                                      goto label_5e7f7e;
005e7f3e                                  }
005e7f21                              }
005e7eb7                          }
005e7e95                      }
005e7e62                  }
005e7e1d              }
005e7df2          }
005e7bff      }
005e7bff      else
005e7bff      {
005e7c05          int32_t* eax_4 = *(uint32_t*)((char*)this + 0x230);
005e7c2f          result = *(uint32_t*)(*(uint32_t*)eax_4 + 0x6c)(eax_4, (esi * 0xc), *(uint32_t*)((char*)this + 0x224), 0x66, *(uint32_t*)((char*)this + 0x21c), &var_45c, 0);
005e7c2f          
005e7c35          if (result >= 0)
005e7c35          {
005e7c41              if (*(uint32_t*)((char*)this + 0x264) <= 0)
005e7c41                  goto label_5e7d24;
005e7c41              
005e7c47              int32_t* eax_6 = *(uint32_t*)((char*)this + 0x248);
005e7c62              result = *(uint32_t*)(*(uint32_t*)eax_6 + 0x2c)(eax_6, 0, 0, &s, 0x800);
005e7c62              
005e7c66              if (result >= 0)
005e7c66              {
005e7c6c                  int32_t* eax_8 = var_45c;
005e7c84                  result = *(uint32_t*)(*(uint32_t*)eax_8 + 0x2c)(eax_8, 0, 0, &var_464, 0x800);
005e7c84                  
005e7c88                  if (result >= 0)
005e7c88                  {
005e7ca3                      int32_t ecx_4 = (*(uint32_t*)((char*)this + 0x264) * 0xc);
005e7cab                      int32_t esi_2;
005e7cab                      int32_t edi_3;
005e7cab                      edi_3 = __builtin_memcpy(var_464, s, ((ecx_4 >> 2) << 2));
005e7cb5                      __builtin_memcpy(edi_3, esi_2, (ecx_4 & 3));
005e7cb7                      int32_t edx_5 = *(uint32_t*)((char*)this + 0x264);
005e7cc8                      int32_t ecx_9 = ((arg2 - edx_5) * 0xc);
005e7cdf                      __builtin_memset(__builtin_memset((var_464 + (edx_5 * 0xc)), 0, ((ecx_9 >> 2) << 2)), 0, (ecx_9 & 3));
005e7ce1                      int32_t* eax_14 = var_45c;
005e7ced                      result = *(uint32_t*)(*(uint32_t*)eax_14 + 0x30)(eax_14);
005e7ced                      
005e7cf1                      if (result >= 0)
005e7cf1                      {
005e7cf7                          int32_t* eax_16 = *(uint32_t*)((char*)this + 0x248);
005e7cfd                          var_464 = 0;
005e7d0a                          result = *(uint32_t*)(*(uint32_t*)eax_16 + 0x30)(eax_16);
005e7d0a                          
005e7d0e                          if (result >= 0)
005e7d0e                          {
005e7d14                              s = 0;
005e7d1b                              esi = arg2;
005e7d24                          label_5e7d24:
005e7d24                              int32_t* eax_18 = *(uint32_t*)((char*)this + 0x248);
005e7d24                              
005e7d28                              if (eax_18 != 0)
005e7d28                              {
005e7d2d                                  *(uint32_t*)(*(uint32_t*)eax_18 + 8)(eax_18);
005e7d30                                  *(uint32_t*)((char*)this + 0x248) = nullptr;
005e7d28                              }
005e7d28                              
005e7d33                              int32_t* eax_19 = var_45c;
005e7d39                              var_45c = nullptr;
005e7d40                              bool cond:1_1 = (*(uint8_t*)((char*)this + 0x218) & 1) == 0;
005e7d47                              *(uint32_t*)((char*)this + 0x248) = eax_19;
005e7d49                              *(uint32_t*)((char*)this + 0x268) = esi;
005e7d4f                              int32_t eax_21;
005e7d4f                              
005e7d4f                              if (!(cond:1_1))
005e7d66                                  eax_21 = ResizeDynamicArray<class D3DXMesh::NeighborInfo<uint32_t> >(((char*)this + 0x250), esi, *(uint32_t*)((char*)this + 0x264), &var_48c);
005e7d66                              
005e7d6d                              if ((!(cond:1_1) && eax_21 == 0))
005e7d6f                                  result = 0x8007000e;
005e7d6d                              else if ((*(uint8_t*)((char*)this + 0x218) & 4) == 0)
005e7d80                              {
005e7dc2                              label_5e7dc2:
005e7dc2                                  
005e7dc9                                  if ((*(uint8_t*)((char*)this + 0x218) & 8) == 0)
005e7dc9                                      goto label_5e7dec;
005e7dc9                                  
005e7de7                                  if (ResizeDynamicArray<uint16_t>(((char*)this + 0x258), esi, *(uint32_t*)((char*)this + 0x264), &var_490) != 0)
005e7de7                                      goto label_5e7dec;
005e7de7                                  
005e7d6f                                  result = 0x8007000e;
005e7d80                              }
005e7d80                              else
005e7d80                              {
005e7d9e                                  if (ResizeDynamicArray<unsigned long>(((char*)this + 0x254), esi, *(uint32_t*)((char*)this + 0x264), &var_488) != 0)
005e7d9e                                  {
005e7da0                                      int32_t edx_8 = *(uint32_t*)((char*)this + 0x264);
005e7dac                                      int32_t ecx_18 = ((esi - edx_8) << 2);
005e7dc0                                      __builtin_memset(__builtin_memset((*(uint32_t*)((char*)this + 0x254) + (edx_8 << 2)), 0, ((ecx_18 >> 2) << 2)), 0, (ecx_18 & 3));
005e7dc0                                      goto label_5e7dc2;
005e7d9e                                  }
005e7d9e                                  
005e7d6f                                  result = 0x8007000e;
005e7d80                              }
005e7d0e                          }
005e7cf1                      }
005e7c88                  }
005e7c66              }
005e7c35          }
005e7bff      }
005e7bff      
005e8173      int32_t* eax_65 = var_470;
005e8173      
005e817b      if (eax_65 != 0)
005e817b      {
005e8180          *(uint32_t*)(*(uint32_t*)eax_65 + 8)(eax_65);
005e8183          var_470 = nullptr;
005e817b      }
005e817b      
005e8191      if (var_464 != 0)
005e8191      {
005e8193          int32_t* eax_66 = var_45c;
005e819c          *(uint32_t*)(*(uint32_t*)eax_66 + 0x30)(eax_66);
005e8191      }
005e8191      
005e81a6      if (s != 0)
005e81a6      {
005e81a8          int32_t* eax_67 = *(uint32_t*)((char*)this + 0x248);
005e81b1          *(uint32_t*)(*(uint32_t*)eax_67 + 0x30)(eax_67);
005e81a6      }
005e81a6      
005e81bb      if (var_468 != 0)
005e81bb      {
005e81bd          int32_t* eax_68 = var_458;
005e81c6          *(uint32_t*)(*(uint32_t*)eax_68 + 0x30)(eax_68);
005e81bb      }
005e81bb      
005e81d0      if (var_46c != 0)
005e81d0      {
005e81d2          int32_t* ebx_1 = *(uint32_t*)((char*)this + 0x234);
005e81db          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005e81d0      }
005e81d0      
005e81e6      __security_check_cookie(__security_cookie_1);
005e81ec      return result;
005e7b43  }


005e81ef  void* __thiscall ?BValid@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@EAE_NPAV?$GXTri3Face@I@2@@Z(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg1, void* arg2)

005e81ef  {
005e81f7      void* eax = arg2;
005e81ff      char var_6 = 0;
005e8203      char var_5 = 0;
005e8203      
005e8207      if (eax != 0)
005e8207          goto label_5e8209;
005e8207      
005e8217      void* var_c;
005e8217      void* result;
005e8217      
005e8217      if (*(uint32_t*)((char*)arg1 + 0x24c) == 0)
005e8217      {
005e8228          result = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg1, &var_c, 0x10);
005e8228          
005e822f          if (result >= 0)
005e822f              goto label_5e823b;
005e8217      }
005e8217      else
005e8217      {
005e8219          eax = *(uint32_t*)((char*)arg1 + 0x24c);
005e821b          arg2 = eax;
005e8209      label_5e8209:
005e8209          var_c = eax;
005e823b      label_5e823b:
005e823b          void* var_18_1 = nullptr;
005e8242          int32_t edi;
005e8242          int32_t var_48_2 = edi;
005e8242          
005e8243          if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005e8243          {
005e8249              void* eax_2 = *(uint32_t*)((char*)arg1 + 0x250);
005e824f              void* ecx_1 = var_c;
005e8252              void** ebx_1 = ((char*)ecx_1 + 4);
005e825b              void* var_14_1 = eax_2;
005e825e              void** var_28_1 = ebx_1;
005e825e              
005e8261              while (true)
005e8261              {
005e8261                  int32_t edx_1 = ebx_1[-1];
005e8261                  
005e8267                  if (edx_1 != 0xffffffff)
005e8267                  {
005e82bd                      int32_t temp3_1 = (*(uint32_t*)((char*)arg1 + 0x218) & 2);
005e82c1                      void* eax_5 = *(uint32_t*)ebx_1;
005e82c3                      bool cond:4_1;
005e82c3                      
005e82c3                      if (temp3_1 != 0)
005e82c3                      {
005e82c5                          int32_t ecx_3 = *(uint32_t*)((char*)arg1 + 0x244);
005e82cb                          int32_t edx_3 = (edx_1 << 2);
005e82d1                          int32_t eax_6 = (eax_5 << 2);
005e82d1                          
005e82d7                          if (*(uint32_t*)(edx_3 + ecx_3) == *(uint32_t*)(eax_6 + ecx_3))
005e8306                              var_5 = 1;
005e82d7                          else
005e82d7                          {
005e82d9                              int32_t edi_2 = *(uint32_t*)((char*)arg1 + 0x244);
005e82e5                              int32_t ecx_5 = (ebx_1[1] << 2);
005e82e5                              
005e82eb                              if (*(uint32_t*)(eax_6 + edi_2) != *(uint32_t*)(ecx_5 + edi_2))
005e82eb                              {
005e82f2                                  cond:4_1 = *(uint32_t*)(ecx_5 + edi_2) != *(uint32_t*)(edx_3 + edi_2);
005e82f5                                  goto label_5e8304;
005e82eb                              }
005e82eb                              
005e8306                              var_5 = 1;
005e82d7                          }
005e82c3                      }
005e82c3                      else if (edx_1 == eax_5)
005e8306                          var_5 = 1;
005e82f9                      else
005e82f9                      {
005e82fb                          int32_t ecx_7 = ebx_1[1];
005e82fb                          
005e8300                          if (eax_5 == ecx_7)
005e8306                              var_5 = 1;
005e8300                          else
005e8300                          {
005e8302                              cond:4_1 = ecx_7 != edx_1;
005e8304                          label_5e8304:
005e8304                              
005e8304                              if (!(cond:4_1))
005e8306                                  var_5 = 1;
005e8300                          }
005e82f9                      }
005e82f9                      
005e8311                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0)
005e8311                      {
005e8320                          int32_t eax_9 = 0;
005e8325                          void* var_10_1 = var_14_1;
005e8325                          
005e832e                          while (true)
005e832e                          {
005e832e                              int32_t edi_3 = *(uint32_t*)((&ebx_1[-1] - var_14_1) + var_10_1);
005e833c                              int32_t ecx_10 = *(uint32_t*)((char*)arg1 + 0x23c);
005e834a                              result = ebx_1[(-1 + (COMBINE(0, (eax_9 + 1)) % 3))];
005e834d                              void* result_1 = result;
005e834d                              
005e8350                              if (edi_3 >= ecx_10)
005e8350                                  break;
005e8350                              
005e8358                              if (result >= ecx_10)
005e8358                                  break;
005e8358                              
005e8361                              result = *(uint32_t*)var_10_1;
005e8361                              
005e8366                              if (result != 0xffffffff)
005e8366                              {
005e8372                                  if (result >= *(uint32_t*)((char*)arg1 + 0x264))
005e8372                                      break;
005e8372                                  
005e8381                                  int32_t eax_13 = (result * 0xc);
005e8384                                  void* edi_4 = (eax_13 + var_c);
005e8390                                  result = D3DXMesh::FindEdge<uint32_t>((eax_13 + *(uint32_t*)((char*)arg1 + 0x250)), var_18_1);
005e8390                                  
005e8398                                  if (result >= 3)
005e8398                                      break;
005e8398                                  
005e83a2                                  if (temp3_1 != 0)
005e83a2                                  {
005e83b5                                      int32_t ecx_16 = (*(uint32_t*)((char*)edi_4 + (result << 2)) << 2);
005e83b8                                      int32_t eax_16 = *(uint32_t*)((char*)edi_4 + ((COMBINE(0, ((char*)result + 1)) % 3) << 2));
005e83c1                                      int32_t* eax_17 = *(uint32_t*)((char*)arg1 + 0x244);
005e83c7                                      int32_t edx_11 = (edi_3 << 2);
005e83c7                                      
005e83d0                                      if (*(uint32_t*)(edx_11 + eax_17) == *(uint32_t*)((char*)eax_17 + ecx_16))
005e83de                                          ebx_1 = var_28_1;
005e83de                                      
005e83e1                                      if ((*(uint32_t*)(edx_11 + eax_17) != *(uint32_t*)((char*)eax_17 + ecx_16) || eax_17[result_1] != eax_17[eax_16]))
005e83e1                                      {
005e83e3                                          result = *(uint32_t*)((char*)arg1 + 0x244);
005e83e3                                          
005e83f2                                          if (*(uint32_t*)((char*)result + (result_1 << 2)) != *(uint32_t*)((char*)result + ecx_16))
005e83f2                                              break;
005e83f2                                          
005e83fd                                          if (*(uint32_t*)((char*)result + edx_11) != *(uint32_t*)((char*)result + (eax_16 << 2)))
005e83fd                                              break;
005e83e1                                      }
005e83a2                                  }
005e8366                              }
005e8366                              
005e83ff                              eax_9 += 1;
005e8402                              var_10_1 += 4;
005e8402                              
005e8409                              if (eax_9 >= 3)
005e8409                                  goto label_5e840f;
005e832e                          }
005e832e                          
005e8350                          goto label_5e845d;
005e8311                      }
005e8267                  }
005e8267                  else
005e8267                  {
005e8269                      result = *(uint32_t*)ebx_1;
005e8269                      
005e826d                      if (edx_1 != result)
005e826d                          goto label_5e845d;
005e826d                      
005e8276                      if (result != ebx_1[1])
005e8276                          goto label_5e845d;
005e8276                      
005e8283                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0)
005e8283                      {
005e828c                          int32_t ecx_2 = *(uint32_t*)var_14_1;
005e828c                          
005e8290                          if (ecx_2 != edx_1)
005e8290                              goto label_5e845d;
005e8290                          
005e8299                          void* edx_2 = (((char*)eax_2 - ecx_1) + ebx_1);
005e829c                          result = *(uint32_t*)edx_2;
005e829c                          
005e82a0                          if (ecx_2 != result)
005e82a0                              goto label_5e845d;
005e82a0                          
005e82a9                          if (result != *(uint32_t*)((char*)edx_2 + 4))
005e82a9                              goto label_5e845d;
005e8283                      }
005e8267                  }
005e8267                  
005e840f              label_5e840f:
005e840f                  var_18_1 += 1;
005e8415                  var_14_1 += 0xc;
005e8419                  ebx_1 = &ebx_1[3];
005e8422                  var_28_1 = ebx_1;
005e8422                  
005e8425                  if (var_18_1 >= *(uint32_t*)((char*)arg1 + 0x264))
005e8425                  {
005e842f                      if (var_5 == 0)
005e842f                          break;
005e842f                      
005e8431                      var_6 = 0;
005e8435                      goto label_5e845d;
005e8425                  }
005e8261              }
005e8243          }
005e8243          
005e8447          if (((*(uint8_t*)((char*)arg1 + 0x218) & 0x10) != 0 && *(uint32_t*)((char*)arg1 + 0x25c) != 0))
005e8447          {
005e8449              void* var_4c_2 = var_c;
005e844e              result = ?BValidAttributeGroups@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAE_NPAV?$GXTri3Face@I@2@@Z(arg1);
005e8447          }
005e8447          
005e8455          if ((((*(uint8_t*)((char*)arg1 + 0x218) & 0x10) == 0 || *(uint32_t*)((char*)arg1 + 0x25c) == 0) || result != 0))
005e8457              var_6 = 1;
005e8217      }
005e8217      
005e845d  label_5e845d:
005e845d      
005e8467      if ((var_c != 0 && arg2 == 0))
005e8467      {
005e8469          int32_t* esi_1 = *(uint32_t*)((char*)arg1 + 0x248);
005e8472          *(uint32_t*)(*(uint32_t*)esi_1 + 0x30)(esi_1);
005e8467      }
005e8467      
005e8475      result = var_6;
005e847a      return result;
005e81ef  }


005e847d  void __thiscall D3DXMesh::CFaceListIter<uint16_t,1,65535>::Init(D3DXMesh::CFaceListIter<uint16_t,1,65535>* this, uint16_t arg2, uint16_t arg3, uint8_t arg4)

005e847d  {
005e848c      D3DXMesh::CFaceListIter<uint16_t,1,65535>* this_1 = this;
005e848e      int32_t edi;
005e848e      int32_t var_10 = edi;
005e848f      int32_t edi_1;
005e848f      edi_1 = arg3;
005e8493      int32_t ebx;
005e8493      ebx = arg4 != 2;
005e849a      *(uint16_t*)this_1 = arg2;
005e849d      *(uint16_t*)((char*)this_1 + 4) = arg2;
005e84a1      this = arg4 != 0;
005e84aa      *(uint8_t*)((char*)this_1 + 0x11) = this;
005e84ad      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* ecx = *(uint32_t*)((char*)this_1 + 0xc);
005e84b1      *(uint16_t*)((char*)this_1 + 2) = edi_1;
005e84b5      *(uint8_t*)((char*)this_1 + 0x10) = ebx;
005e84c5      int16_t eax_4 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::FindWedge(ecx, (*(uint32_t*)((char*)ecx + 0x24c) + (((uint32_t)arg2) * 6)), ((uint32_t)edi_1));
005e84cc      *(uint16_t*)((char*)this_1 + 8) = eax_4;
005e84cc      
005e84d0      if (ebx == 0)
005e84dd          *(uint16_t*)((char*)this_1 + 8) = ((int16_t)(((int64_t)(((uint32_t)eax_4) + 2)) % 3));
005e84dd      
005e84e6      *(uint16_t*)((char*)this_1 + 6) = *(uint16_t*)((char*)this_1 + 8);
005e847d  }


005e84f0  void __thiscall D3DXMesh::CFaceListIter<uint32_t,0,4294967295>::Init(D3DXMesh::CFaceListIter<uint32_t,0,4294967295>* this, uint32_t arg2, uint32_t arg3, uint8_t arg4)

005e84f0  {
005e84fe      D3DXMesh::CFaceListIter<uint32_t,0,4294967295>* this_1 = this;
005e8500      int32_t ebx;
005e8500      ebx = arg4 != 2;
005e8507      int32_t edi;
005e8507      int32_t var_10 = edi;
005e850b      this = arg4 != 0;
005e850e      *(uint8_t*)((char*)this_1 + 0x19) = this;
005e8511      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* ecx = *(uint32_t*)((char*)this_1 + 0x14);
005e8514      *(uint32_t*)this_1 = arg2;
005e8516      *(uint32_t*)((char*)this_1 + 8) = arg2;
005e8519      *(uint32_t*)((char*)this_1 + 4) = arg3;
005e851c      *(uint8_t*)((char*)this_1 + 0x18) = ebx;
005e8534      *(uint32_t*)((char*)this_1 + 0x10) = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::FindWedge(ecx, (*(uint32_t*)((char*)ecx + 0x24c) + (arg2 * 0xc)), arg3);
005e8537      uint32_t eax_3;
005e8537      
005e8537      if (ebx == 0)
005e8543          *(uint32_t*)((char*)this_1 + 0x10) = (COMBINE(0, (eax_3 + 2)) % 3);
005e854a      *(uint32_t*)((char*)this_1 + 0xc) = *(uint32_t*)((char*)this_1 + 0x10);
005e84f0  }


005e8553  long __thiscall ?CopyMesh@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV12@@Z(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg1, D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg2)

005e8553  {
005e8566      uint8_t* var_c = nullptr;
005e8569      uint8_t* var_10 = nullptr;
005e856c      int32_t var_14 = 0;
005e856f      int32_t var_18 = 0;
005e8572      long result_1 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg1, &var_18, 0);
005e8579      long result = result_1;
005e8579      
005e857c      if (result_1 >= 0)
005e857c      {
005e858b          long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg2, &var_14, 0x10);
005e8592          result = result_2;
005e8592          
005e8595          if (result_2 >= 0)
005e8595          {
005e85a7              int32_t ecx_2 = (*(uint32_t*)((char*)arg1 + 0x264) * 6);
005e85ae              int32_t edi;
005e85ae              int32_t var_24_1 = edi;
005e85b2              int32_t esi_2;
005e85b2              int32_t edi_2;
005e85b2              edi_2 = __builtin_memcpy(var_18, var_14, ((ecx_2 >> 2) << 2));
005e85b6              D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* eax_2 = arg2;
005e85bc              __builtin_memcpy(edi_2, esi_2, (ecx_2 & 3));
005e85bc              
005e85ce              if (((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0 && (*(uint8_t*)((char*)eax_2 + 0x218) & 1) != 0))
005e85ce              {
005e85e5                  int32_t ecx_8 = (*(uint32_t*)((char*)arg1 + 0x264) * 6);
005e85ec                  int32_t esi_4;
005e85ec                  int32_t edi_4;
005e85ec                  edi_4 = __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x250), *(uint32_t*)((char*)eax_2 + 0x250), ((ecx_8 >> 2) << 2));
005e85f3                  __builtin_memcpy(edi_4, esi_4, (ecx_8 & 3));
005e85ce              }
005e85ce              
005e8605              if (((*(uint8_t*)((char*)arg1 + 0x218) & 4) != 0 && (*(uint8_t*)((char*)eax_2 + 0x218) & 4) != 0))
005e8605              {
005e8619                  int32_t ecx_13 = (*(uint32_t*)((char*)arg1 + 0x264) << 2);
005e8621                  int32_t esi_6;
005e8621                  int32_t edi_6;
005e8621                  edi_6 = __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x254), *(uint32_t*)((char*)eax_2 + 0x254), ((ecx_13 >> 2) << 2));
005e8628                  __builtin_memcpy(edi_6, esi_6, (ecx_13 & 3));
005e8605              }
005e8605              
005e863a              if (((*(uint8_t*)((char*)arg1 + 0x218) & 8) != 0 && (*(uint8_t*)((char*)eax_2 + 0x218) & 8) != 0))
005e863a              {
005e864e                  int32_t ecx_18 = (*(uint32_t*)((char*)arg1 + 0x264) << 1);
005e8655                  int32_t esi_8;
005e8655                  int32_t edi_8;
005e8655                  edi_8 = __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x258), *(uint32_t*)((char*)eax_2 + 0x258), ((ecx_18 >> 2) << 2));
005e865c                  __builtin_memcpy(edi_8, esi_8, (ecx_18 & 3));
005e863a              }
005e863a              
005e8665              if ((*(uint8_t*)((char*)eax_2 + 0x218) & 0x10) == 0)
005e8665              {
005e86f0              label_5e86f0:
005e86f0                  int32_t eax_9 = *(uint32_t*)((char*)arg1 + 0x23c);
005e86f0                  
005e86f8                  if (eax_9 > 0)
005e86f8                  {
005e870d                      if (((*(uint8_t*)((char*)arg1 + 0x218) & 2) != 0 && (*(uint8_t*)((char*)arg2 + 0x218) & 2) != 0))
005e871d                          __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x244), *(uint32_t*)((char*)arg2 + 0x244), (eax_9 << 1));
005e871d                      
005e8727                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 0x20) == 0)
005e8727                      {
005e8732                          long result_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(arg2, &var_10, 0x10);
005e8739                          result = result_3;
005e8739                          
005e873c                          if (result_3 >= 0)
005e873c                          {
005e8746                              long result_4 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(arg1, &var_c, 0);
005e874d                              result = result_4;
005e874d                              
005e8750                              if (result_4 >= 0)
005e8750                              {
005e8758                                  int32_t ecx_34 = (*(uint32_t*)((char*)arg1 + 0x238) * *(uint32_t*)((char*)arg1 + 0x23c));
005e876a                                  int32_t esi_13;
005e876a                                  int32_t edi_13;
005e876a                                  edi_13 = __builtin_memcpy(var_c, var_10, ((ecx_34 >> 2) << 2));
005e8771                                  __builtin_memcpy(edi_13, esi_13, (ecx_34 & 3));
005e8750                              }
005e873c                          }
005e8727                      }
005e86f8                  }
005e8665              }
005e8665              else
005e8665              {
005e8680                  if (((*(uint8_t*)((char*)arg1 + 0x218) & 0x10) != 0 && *(uint32_t*)((char*)arg1 + 0x260) == *(uint32_t*)((char*)eax_2 + 0x260)))
005e8672                      goto label_5e86ca;
005e8672                  
005e8688                  operator delete(*(uint32_t*)((char*)arg1 + 0x25c));
005e8690                  int32_t eax_4 = *(uint32_t*)((char*)arg2 + 0x260);
005e8696                  *(uint32_t*)((char*)arg1 + 0x260) = eax_4;
005e86a3                  void* eax_7 = operator new((eax_4 * 0x14));
005e86ac                  *(uint32_t*)((char*)arg1 + 0x25c) = eax_7;
005e86ac                  
005e86b2                  if (eax_7 != 0)
005e86b2                  {
005e86c0                      *(uint32_t*)((char*)arg1 + 0x218) |= 0x10;
005e86c7                      eax_2 = arg2;
005e86ca                  label_5e86ca:
005e86df                      int32_t ecx_26 = (*(uint32_t*)((char*)arg1 + 0x260) * 0x14);
005e86e7                      int32_t esi_10;
005e86e7                      int32_t edi_10;
005e86e7                      edi_10 = __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x25c), *(uint32_t*)((char*)eax_2 + 0x25c), ((ecx_26 >> 2) << 2));
005e86ee                      __builtin_memcpy(edi_10, esi_10, (ecx_26 & 3));
005e86ee                      goto label_5e86f0;
005e86b2                  }
005e86b2                  
005e86b4                  result = 0x8007000e;
005e8665              }
005e8595          }
005e857c      }
005e857c      
005e8779      if (var_c != 0)
005e8779      {
005e877b          int32_t* eax_11 = *(uint32_t*)((char*)arg1 + 0x234);
005e8784          *(uint32_t*)(*(uint32_t*)eax_11 + 0x30)(eax_11);
005e8779      }
005e8779      
005e878a      if (var_10 != 0)
005e878a      {
005e878f          int32_t* eax_13 = *(uint32_t*)((char*)arg2 + 0x234);
005e8798          *(uint32_t*)(*(uint32_t*)eax_13 + 0x30)(eax_13);
005e878a      }
005e878a      
005e879e      if (var_14 != 0)
005e879e      {
005e87a3          int32_t* eax_15 = *(uint32_t*)((char*)arg2 + 0x248);
005e87ac          *(uint32_t*)(*(uint32_t*)eax_15 + 0x30)(eax_15);
005e879e      }
005e879e      
005e87b2      if (var_18 != 0)
005e87b2      {
005e87b4          int32_t* eax_16 = *(uint32_t*)((char*)arg1 + 0x248);
005e87bd          *(uint32_t*)(*(uint32_t*)eax_16 + 0x30)(eax_16);
005e87b2      }
005e87b2      
005e87c3      if (result < 0)
005e87c7          D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::CreateEmptyMesh(arg1);
005e87c7      
005e87d2      return result;
005e8553  }


005e87d5  long __thiscall ?CopyMesh@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV12@@Z(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg1, D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg2)

005e87d5  {
005e87e8      uint8_t* var_c = nullptr;
005e87eb      uint8_t* var_10 = nullptr;
005e87ee      int32_t var_14 = 0;
005e87f1      int32_t var_18 = 0;
005e87f4      long result_1 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg1, &var_18, 0);
005e87fb      long result = result_1;
005e87fb      
005e87fe      if (result_1 >= 0)
005e87fe      {
005e880d          long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg2, &var_14, 0x10);
005e8814          result = result_2;
005e8814          
005e8817          if (result_2 >= 0)
005e8817          {
005e8829              int32_t ecx_2 = (*(uint32_t*)((char*)arg1 + 0x264) * 0xc);
005e8831              int32_t edi;
005e8831              int32_t var_24_1 = edi;
005e8835              int32_t esi_2;
005e8835              int32_t edi_2;
005e8835              edi_2 = __builtin_memcpy(var_18, var_14, ((ecx_2 >> 2) << 2));
005e8839              D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* eax_2 = arg2;
005e883f              __builtin_memcpy(edi_2, esi_2, (ecx_2 & 3));
005e883f              
005e8851              if (((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0 && (*(uint8_t*)((char*)eax_2 + 0x218) & 1) != 0))
005e8851              {
005e8868                  int32_t ecx_8 = (*(uint32_t*)((char*)arg1 + 0x264) * 0xc);
005e8870                  int32_t esi_4;
005e8870                  int32_t edi_4;
005e8870                  edi_4 = __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x250), *(uint32_t*)((char*)eax_2 + 0x250), ((ecx_8 >> 2) << 2));
005e8877                  __builtin_memcpy(edi_4, esi_4, (ecx_8 & 3));
005e8851              }
005e8851              
005e8889              if (((*(uint8_t*)((char*)arg1 + 0x218) & 4) != 0 && (*(uint8_t*)((char*)eax_2 + 0x218) & 4) != 0))
005e8889              {
005e889d                  int32_t ecx_13 = (*(uint32_t*)((char*)arg1 + 0x264) << 2);
005e88a5                  int32_t esi_6;
005e88a5                  int32_t edi_6;
005e88a5                  edi_6 = __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x254), *(uint32_t*)((char*)eax_2 + 0x254), ((ecx_13 >> 2) << 2));
005e88ac                  __builtin_memcpy(edi_6, esi_6, (ecx_13 & 3));
005e8889              }
005e8889              
005e88be              if (((*(uint8_t*)((char*)arg1 + 0x218) & 8) != 0 && (*(uint8_t*)((char*)eax_2 + 0x218) & 8) != 0))
005e88be              {
005e88d2                  int32_t ecx_18 = (*(uint32_t*)((char*)arg1 + 0x264) << 1);
005e88d9                  int32_t esi_8;
005e88d9                  int32_t edi_8;
005e88d9                  edi_8 = __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x258), *(uint32_t*)((char*)eax_2 + 0x258), ((ecx_18 >> 2) << 2));
005e88e0                  __builtin_memcpy(edi_8, esi_8, (ecx_18 & 3));
005e88be              }
005e88be              
005e88e9              if ((*(uint8_t*)((char*)eax_2 + 0x218) & 0x10) == 0)
005e88e9              {
005e8974              label_5e8974:
005e8974                  int32_t ecx_30 = *(uint32_t*)((char*)arg1 + 0x23c);
005e8974                  
005e897c                  if (ecx_30 > 0)
005e897c                  {
005e8991                      if (((*(uint8_t*)((char*)arg1 + 0x218) & 2) != 0 && (*(uint8_t*)((char*)arg2 + 0x218) & 2) != 0))
005e899f                          __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x244), *(uint32_t*)((char*)arg2 + 0x244), (ecx_30 << 2));
005e899f                      
005e89a8                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 0x20) == 0)
005e89a8                      {
005e89b3                          long result_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(arg2, &var_10, 0x10);
005e89ba                          result = result_3;
005e89ba                          
005e89bd                          if (result_3 >= 0)
005e89bd                          {
005e89c7                              long result_4 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(arg1, &var_c, 0);
005e89ce                              result = result_4;
005e89ce                              
005e89d1                              if (result_4 >= 0)
005e89d1                              {
005e89d9                                  int32_t ecx_34 = (*(uint32_t*)((char*)arg1 + 0x238) * *(uint32_t*)((char*)arg1 + 0x23c));
005e89eb                                  int32_t esi_13;
005e89eb                                  int32_t edi_13;
005e89eb                                  edi_13 = __builtin_memcpy(var_c, var_10, ((ecx_34 >> 2) << 2));
005e89f2                                  __builtin_memcpy(edi_13, esi_13, (ecx_34 & 3));
005e89d1                              }
005e89bd                          }
005e89a8                      }
005e897c                  }
005e88e9              }
005e88e9              else
005e88e9              {
005e8904                  if (((*(uint8_t*)((char*)arg1 + 0x218) & 0x10) != 0 && *(uint32_t*)((char*)arg1 + 0x260) == *(uint32_t*)((char*)eax_2 + 0x260)))
005e88f6                      goto label_5e894e;
005e88f6                  
005e890c                  operator delete(*(uint32_t*)((char*)arg1 + 0x25c));
005e8914                  int32_t eax_4 = *(uint32_t*)((char*)arg2 + 0x260);
005e891a                  *(uint32_t*)((char*)arg1 + 0x260) = eax_4;
005e8927                  void* eax_7 = operator new((eax_4 * 0x14));
005e8930                  *(uint32_t*)((char*)arg1 + 0x25c) = eax_7;
005e8930                  
005e8936                  if (eax_7 != 0)
005e8936                  {
005e8944                      *(uint32_t*)((char*)arg1 + 0x218) |= 0x10;
005e894b                      eax_2 = arg2;
005e894e                  label_5e894e:
005e8963                      int32_t ecx_26 = (*(uint32_t*)((char*)arg1 + 0x260) * 0x14);
005e896b                      int32_t esi_10;
005e896b                      int32_t edi_10;
005e896b                      edi_10 = __builtin_memcpy(*(uint32_t*)((char*)arg1 + 0x25c), *(uint32_t*)((char*)eax_2 + 0x25c), ((ecx_26 >> 2) << 2));
005e8972                      __builtin_memcpy(edi_10, esi_10, (ecx_26 & 3));
005e8972                      goto label_5e8974;
005e8936                  }
005e8936                  
005e8938                  result = 0x8007000e;
005e88e9              }
005e8817          }
005e87fe      }
005e87fe      
005e89fa      if (var_c != 0)
005e89fa      {
005e89fc          int32_t* eax_11 = *(uint32_t*)((char*)arg1 + 0x234);
005e8a05          *(uint32_t*)(*(uint32_t*)eax_11 + 0x30)(eax_11);
005e89fa      }
005e89fa      
005e8a0b      if (var_10 != 0)
005e8a0b      {
005e8a10          int32_t* eax_13 = *(uint32_t*)((char*)arg2 + 0x234);
005e8a19          *(uint32_t*)(*(uint32_t*)eax_13 + 0x30)(eax_13);
005e8a0b      }
005e8a0b      
005e8a1f      if (var_14 != 0)
005e8a1f      {
005e8a24          int32_t* eax_15 = *(uint32_t*)((char*)arg2 + 0x248);
005e8a2d          *(uint32_t*)(*(uint32_t*)eax_15 + 0x30)(eax_15);
005e8a1f      }
005e8a1f      
005e8a33      if (var_18 != 0)
005e8a33      {
005e8a35          int32_t* eax_16 = *(uint32_t*)((char*)arg1 + 0x248);
005e8a3e          *(uint32_t*)(*(uint32_t*)eax_16 + 0x30)(eax_16);
005e8a33      }
005e8a33      
005e8a44      if (result < 0)
005e8a48          D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::CreateEmptyMesh(arg1);
005e8a48      
005e8a53      return result;
005e87d5  }


005e8a56  uint16_t __thiscall D3DXMesh::CFaceListIter<uint16_t,1,65535>::GetNextFace(D3DXMesh::CFaceListIter<uint16_t,1,65535>* this)

005e8a56  {
005e8a5b      int16_t var_8 = this;
005e8a5d      D3DXMesh::CFaceListIter<uint16_t,1,65535>* this_1 = this;
005e8a5f      int16_t eax = *(uint16_t*)((char*)this_1 + 4);
005e8a63      int16_t edx = *(uint16_t*)((char*)this_1 + 8);
005e8a67      this = eax;
005e8a6e      *(uint16_t*)((char*)this_1 + 6) = edx;
005e8a86      uint32_t eax_3;
005e8a86      eax_3 = *(uint16_t*)(*(uint32_t*)(*(uint32_t*)((char*)this_1 + 0xc) + 0x250) + (((((uint32_t)this) * 3) + ((uint32_t)edx)) << 1));
005e8a8a      bool cond:0 = eax_3 == *(uint16_t*)this_1;
005e8a8d      int32_t edi;
005e8a8d      int32_t var_10 = edi;
005e8a8e      *(uint16_t*)((char*)this_1 + 4) = eax_3;
005e8a8e      
005e8a92      if (!(cond:0))
005e8a92      {
005e8b1a          do
005e8b1a          {
005e8aa1              if (*(uint16_t*)((char*)this_1 + 4) != 0xffff)
005e8aa1              {
005e8b43                  int16_t eax_21 = D3DXMesh::FindEdge<uint16_t>((*(uint32_t*)(*(uint32_t*)((char*)this_1 + 0xc) + 0x250) + (((uint32_t)*(uint16_t*)((char*)this_1 + 4)) * 6)), this);
005e8b48                  *(uint16_t*)((char*)this_1 + 8) = eax_21;
005e8b4f                  int32_t eax_23 = (((uint32_t)eax_21) + 1);
005e8b4f                  
005e8b54                  if (*(uint8_t*)((char*)this_1 + 0x10) == 0)
005e8b5f                      eax_23 += 1;
005e8b5f                  
005e8b59                  *(uint16_t*)((char*)this_1 + 8) = ((int16_t)(((int64_t)eax_23) % 3));
005e8b5d                  goto label_5e8b26;
005e8aa1              }
005e8aa1              
005e8aab              if (*(uint8_t*)((char*)this_1 + 0x10) == 0)
005e8aab                  goto label_5e8b26;
005e8aab              
005e8ab1              if (*(uint8_t*)((char*)this_1 + 0x11) != 0)
005e8ab1                  goto label_5e8b26;
005e8ab1              
005e8ab3              eax_3 = *(uint16_t*)this_1;
005e8ab6              uint32_t edx_4 = ((uint32_t)*(uint16_t*)((char*)this_1 + 2));
005e8aba              D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* ecx = *(uint32_t*)((char*)this_1 + 0xc);
005e8abd              *(uint16_t*)((char*)this_1 + 4) = eax_3;
005e8ac5              *(uint8_t*)((char*)this_1 + 0x10) = 0;
005e8ae0              int32_t eax_11;
005e8ae0              int32_t edx_6;
005e8ae0              edx_6 = HIGHD(((int64_t)(((uint32_t)D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::FindWedge(ecx, (*(uint32_t*)((char*)ecx + 0x24c) + (((uint32_t)eax_3) * 6)), edx_4)) + 2)));
005e8ae0              eax_11 = LOWD(((int64_t)(((uint32_t)D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::FindWedge(ecx, (*(uint32_t*)((char*)ecx + 0x24c) + (((uint32_t)eax_3) * 6)), edx_4)) + 2)));
005e8aea              int32_t eax_14 = (((uint32_t)*(uint16_t*)((char*)this_1 + 6)) + 2);
005e8aeb              *(uint16_t*)((char*)this_1 + 8) = ((int16_t)(COMBINE(edx_6, eax_11) % 3));
005e8af2              *(uint16_t*)((char*)this_1 + 6) = ((int16_t)(((int64_t)eax_14) % 3));
005e8af6              this = *(uint16_t*)((char*)this_1 + 4);
005e8b0f              eax_3 = *(uint16_t*)(*(uint32_t*)(*(uint32_t*)((char*)this_1 + 0xc) + 0x250) + (((((uint32_t)this) * 3) + ((uint32_t)*(uint16_t*)((char*)this_1 + 8))) << 1));
005e8b13              *(uint16_t*)((char*)this_1 + 4) = eax_3;
005e8b1a          } while (eax_3 != *(uint16_t*)this_1);
005e8a92      }
005e8a92      
005e8b20      *(uint16_t*)((char*)this_1 + 4) = 0xffff;
005e8b26  label_5e8b26:
005e8b26      eax_3 = eax;
005e8b2d      return eax_3;
005e8a56  }


005e8b62  uint32_t __thiscall D3DXMesh::CFaceListIter<uint32_t,0,4294967295>::GetNextFace(D3DXMesh::CFaceListIter<uint32_t,0,4294967295>* this)

005e8b62  {
005e8b67      D3DXMesh::CFaceListIter<uint32_t,0,4294967295>* this_1 = this;
005e8b6b      uint32_t result_1 = *(uint32_t*)((char*)this + 8);
005e8b6e      int32_t ecx = *(uint32_t*)((char*)this + 0x10);
005e8b71      void* edx = *(uint32_t*)((char*)this + 0x14);
005e8b74      *(uint32_t*)((char*)this + 0xc) = ecx;
005e8b82      int32_t ecx_3 = *(uint32_t*)(*(uint32_t*)((char*)edx + 0x250) + (((result_1 * 3) + ecx) << 2));
005e8b85      bool cond:0 = ecx_3 == *(uint32_t*)this;
005e8b87      int32_t edi;
005e8b87      int32_t var_10 = edi;
005e8b88      uint32_t result = result_1;
005e8b8b      *(uint32_t*)((char*)this + 8) = ecx_3;
005e8b8b      
005e8b8e      if (!(cond:0))
005e8b8e      {
005e8bf7          int32_t i;
005e8bf7          
005e8bf7          do
005e8bf7          {
005e8b97              if (*(uint32_t*)((char*)this + 8) != 0xffffffff)
005e8b97              {
005e8c18                  uint32_t eax_13 = D3DXMesh::FindEdge<uint32_t>((*(uint32_t*)(*(uint32_t*)((char*)this + 0x14) + 0x250) + (*(uint32_t*)((char*)this + 8) * 0xc)), result_1);
005e8c1f                  bool cond:1_1 = *(uint8_t*)((char*)this + 0x18) == 0;
005e8c22                  *(uint32_t*)((char*)this + 0x10) = eax_13;
005e8c25                  int32_t eax_14;
005e8c25                  
005e8c25                  if (cond:1_1)
005e8c2f                      eax_14 = (eax_13 + 2);
005e8c25                  else
005e8c27                      eax_14 = (eax_13 + 1);
005e8c27                  
005e8c2a                  *(uint32_t*)((char*)this + 0x10) = (COMBINE(0, eax_14) % 3);
005e8c03                  return result;
005e8b97              }
005e8b97              
005e8b9d              if (*(uint8_t*)((char*)this + 0x18) == 0)
005e8c03                  return result;
005e8c03              
005e8ba3              if (*(uint8_t*)((char*)this + 0x19) != 0)
005e8c03                  return result;
005e8c03              
005e8ba5              int32_t eax = *(uint32_t*)this;
005e8ba7              D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* ecx_4 = *(uint32_t*)((char*)this + 0x14);
005e8baa              uint32_t var_14_1 = *(uint32_t*)((char*)this + 4);
005e8bad              *(uint32_t*)((char*)this + 8) = eax;
005e8bb0              *(uint8_t*)((char*)this + 0x18) = 0;
005e8bcc              uint32_t temp1_1 = (COMBINE(0, (D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::FindWedge(ecx_4, (*(uint32_t*)((char*)ecx_4 + 0x24c) + (eax * 0xc)), var_14_1) + 2)) % 3);
005e8bd2              int32_t eax_8 = (*(uint32_t*)((char*)this + 0xc) + 2);
005e8bd3              *(uint32_t*)((char*)this + 0x10) = temp1_1;
005e8bda              *(uint32_t*)((char*)this + 0xc) = (COMBINE(0, eax_8) % 3);
005e8bdd              result_1 = *(uint32_t*)((char*)this + 8);
005e8bef              i = *(uint32_t*)(*(uint32_t*)(*(uint32_t*)((char*)this + 0x14) + 0x250) + (((result_1 * 3) + *(uint32_t*)((char*)this + 0x10)) << 2));
005e8bf2              *(uint32_t*)((char*)this + 8) = i;
005e8bf7          } while (i != *(uint32_t*)this);
005e8b8e      }
005e8b8e      
005e8bf9      *(uint32_t*)((char*)this + 8) = 0xffffffff;
005e8c03      return result;
005e8b62  }


005e8c34  long __stdcall GXConvertPointRepsToAdjacencyInt<uint16_t,65535>(class D3DXMesh::GXTri3Face<uint16_t>* arg1, uint8_t* arg2, uint32_t arg3, uint32_t arg4, struct _D3DXATTRIBUTERANGE* arg5, uint32_t arg6, unsigned long const* arg7, unsigned long* arg8, uint32_t arg9, uint32_t arg10)

005e8c34  {
005e8c41      int32_t edi;
005e8c41      int32_t var_5c = edi;
005e8c47      uint32_t temp0 = (COMBINE(0, arg3) / 3);
005e8c49      uint32_t ebx = arg4;
005e8c4c      int32_t result = 0;
005e8c50      int32_t var_2c = 0;
005e8c54      uint32_t esi = (ebx * 3);
005e8c57      uint32_t var_24 = esi;
005e8c5c      uint32_t edi_2 = (temp0 << 2);
005e8c63      void* s = operator new(edi_2);
005e8c72      void* eax_4 = operator new((esi * 0x14));
005e8c72      
005e8c88      if ((s == 0 || eax_4 == 0))
005e8fa1          result = 0x8007000e;
005e8c88      else
005e8c88      {
005e8ca1          __builtin_memset(__builtin_memset(s, 0, ((edi_2 >> 2) << 2)), 0, (edi_2 & 3));
005e8ca8          void* edx_3;
005e8ca8          
005e8ca8          if (arg6 != 0)
005e8cc5              edx_3 = arg5;
005e8ca8          else
005e8ca8          {
005e8caa              int32_t var_4c;
005e8caa              int32_t var_4c_1 = (var_4c & arg6);
005e8cad              int32_t var_44;
005e8cad              int32_t var_44_1 = (var_44 & arg6);
005e8cb3              arg6 = 1;
005e8cba              void var_50;
005e8cba              edx_3 = &var_50;
005e8cbd              uint32_t var_48_1 = ebx;
005e8cc0              uint32_t var_40_1 = arg3;
005e8ca8          }
005e8ca8          
005e8cd0          void* var_14_1 = edx_3;
005e8cd3          uint32_t var_3c;
005e8cd3          
005e8cd3          if (arg6 > 0)
005e8cd3          {
005e8cd9              void* ecx_5 = ((char*)edx_3 + 4);
005e8cdc              void* var_10_1 = ecx_5;
005e8cdf              uint32_t i_3 = arg6;
005e8dbb              uint32_t i;
005e8dbb              
005e8dbb              do
005e8dbb              {
005e8ce2                  uint32_t eax_8 = *(uint32_t*)ecx_5;
005e8ce7                  int32_t edi_6 = (*(uint32_t*)((char*)ecx_5 + 4) + eax_8);
005e8ceb                  int32_t var_18_1 = edi_6;
005e8cee                  arg3 = eax_8;
005e8cee                  
005e8cf1                  if (eax_8 < edi_6)
005e8cf1                  {
005e8cfd                      void* esi_1 = (((char*)arg1 + (eax_8 * 6)) + 4);
005e8cfd                      
005e8da3                      do
005e8da3                      {
005e8d01                          uint32_t ecx_7 = ((uint32_t)*(uint16_t*)((char*)esi_1 - 4));
005e8d01                          
005e8d08                          if (ecx_7 != arg9)
005e8d08                          {
005e8d13                              uint32_t eax_11;
005e8d13                              uint32_t ecx_10;
005e8d13                              
005e8d13                              if (arg7 == 0)
005e8d13                              {
005e8d2a                                  eax_11 = ((uint32_t)*(uint16_t*)esi_1);
005e8d2d                                  var_3c = ecx_7;
005e8d30                                  ecx_10 = ((uint32_t)*(uint16_t*)((char*)esi_1 - 2));
005e8d13                              }
005e8d13                              else
005e8d13                              {
005e8d18                                  uint32_t edx_4 = ((uint32_t)*(uint16_t*)esi_1);
005e8d1b                                  var_3c = arg7[ecx_7];
005e8d22                                  ecx_10 = arg7[((uint32_t)*(uint16_t*)((char*)esi_1 - 2))];
005e8d25                                  eax_11 = arg7[edx_4];
005e8d13                              }
005e8d13                              
005e8d37                              uint32_t var_38_1 = ecx_10;
005e8d3a                              uint32_t var_34_1 = eax_11;
005e8d3a                              
005e8d46                              if ((var_3c != ecx_10 && (var_3c != eax_11 && ecx_10 != eax_11)))
005e8d46                              {
005e8d4a                                  int32_t ecx_11 = 1;
005e8d4b                                  uint32_t* edi_7 = &var_3c;
005e8d4e                                  arg5 = 3;
005e8d92                                  struct _D3DXATTRIBUTERANGE* j;
005e8d92                                  
005e8d92                                  do
005e8d92                                  {
005e8d84                                      HashAdd(*(uint32_t*)edi_7, &var_3c[(COMBINE(0, ecx_11) % 3)], &var_3c[(COMBINE(0, (ecx_11 + 1)) % 3)], arg3, s, eax_4, temp0, &var_2c);
005e8d89                                      ecx_11 += 1;
005e8d8c                                      edi_7 = &edi_7[1];
005e8d8f                                      j = arg5;
005e8d8f                                      arg5 -= 1;
005e8d92                                  } while (j != 1);
005e8d94                                  edi_6 = var_18_1;
005e8d97                                  ebx = arg4;
005e8d46                              }
005e8d08                          }
005e8d08                          
005e8d9a                          arg3 += 1;
005e8d9d                          esi_1 += 6;
005e8da3                      } while (arg3 < edi_6);
005e8da3                      
005e8da9                      esi = var_24;
005e8dac                      ecx_5 = var_10_1;
005e8daf                      edx_3 = var_14_1;
005e8cf1                  }
005e8cf1                  
005e8db2                  ecx_5 += 0x14;
005e8db5                  i = i_3;
005e8db5                  i_3 -= 1;
005e8db8                  var_10_1 = ecx_5;
005e8dbb              } while (i != 1);
005e8cd3          }
005e8cd3          
005e8dc7          uint32_t ecx_13 = (ebx * 0xc);
005e8dd9          __builtin_memset(__builtin_memset(arg8, 0xffffffff, ((ecx_13 >> 2) << 2)), 0xff, (ecx_13 & 3));
005e8dd9          
005e8de0          if (arg6 > 0)
005e8de0          {
005e8de6              void* ecx_17 = ((char*)edx_3 + 4);
005e8de9              void* var_20_1 = ecx_17;
005e8dec              uint32_t i_2 = arg6;
005e8f8d              uint32_t i_1;
005e8f8d              
005e8f8d              do
005e8f8d              {
005e8def                  uint32_t edx_9 = *(uint32_t*)ecx_17;
005e8df4                  int32_t eax_17 = (*(uint32_t*)((char*)ecx_17 + 4) + edx_9);
005e8dfb                  arg3 = edx_9;
005e8dfb                  
005e8dfe                  if (edx_9 < eax_17)
005e8dfe                  {
005e8e0d                      uint32_t eax_19 = (edx_9 * 0xc);
005e8e10                      void* ebx_2 = (eax_19 + arg8);
005e8e16                      int16_t* ecx_20 = (((char*)arg1 + (edx_9 * 6)) + 4);
005e8e22                      arg4 = ebx_2;
005e8e25                      arg5 = ecx_20;
005e8e28                      int32_t* var_14_2 = ((&var_3c - eax_19) - arg8);
005e8e28                      
005e8f7b                      do
005e8f7b                      {
005e8e2b                          uint32_t edi_13 = ((uint32_t)ecx_20[-2]);
005e8e2b                          
005e8e32                          if (edi_13 != arg9)
005e8e32                          {
005e8e3d                              uint32_t eax_21;
005e8e3d                              uint32_t edi_16;
005e8e3d                              
005e8e3d                              if (arg7 == 0)
005e8e3d                              {
005e8e54                                  eax_21 = ((uint32_t)*(uint16_t*)ecx_20);
005e8e57                                  var_3c = edi_13;
005e8e5a                                  edi_16 = ((uint32_t)ecx_20[-1]);
005e8e3d                              }
005e8e3d                              else
005e8e3d                              {
005e8e42                                  uint32_t ebx_3 = ((uint32_t)*(uint16_t*)ecx_20);
005e8e45                                  var_3c = arg7[edi_13];
005e8e4c                                  edi_16 = arg7[((uint32_t)ecx_20[-1])];
005e8e4f                                  eax_21 = arg7[ebx_3];
005e8e3d                              }
005e8e3d                              
005e8e61                              uint32_t var_38_2 = edi_16;
005e8e64                              uint32_t var_34_2 = eax_21;
005e8e64                              
005e8e78                              if (((var_3c == edi_16 || var_3c == eax_21) || edi_16 == eax_21))
005e8e78                              {
005e8f56                                  ebx_2 = arg4;
005e8f59                                  *(uint32_t*)ebx_2 = 0xffffffff;
005e8f5c                                  *(uint32_t*)((char*)ebx_2 + 4) = 0xffffffff;
005e8f60                                  *(uint32_t*)((char*)ebx_2 + 8) = 0xffffffff;
005e8e78                              }
005e8e78                              else
005e8e78                              {
005e8e7e                                  uint32_t esi_2 = arg4;
005e8e83                                  int32_t edi_17 = 1;
005e8e83                                  
005e8f43                                  do
005e8f43                                  {
005e8e87                                      if (*(uint32_t*)esi_2 == 0xffffffff)
005e8e87                                      {
005e8e90                                          unsigned long ebx_4 = *(uint32_t*)((char*)var_14_2 + esi_2);
005e8eaa                                          unsigned long eax_24 = &var_3c[(COMBINE(0, edi_17) % 3)];
005e8ec0                                          unsigned long eax_27 = HashFind(eax_24, ebx_4, &var_3c[(COMBINE(0, (edi_17 + 1)) % 3)], s, temp0, 0xffffffff, arg2, arg10);
005e8ec8                                          *(uint32_t*)esi_2 = eax_27;
005e8ec8                                          
005e8eca                                          if (eax_27 != 0xffffffff)
005e8eca                                          {
005e8ed9                                              HashRemove(ebx_4, eax_24, arg3, s, temp0);
005e8ee1                                              int32_t ecx_21 = 0;
005e8ee1                                              
005e8ee5                                              if ((edi_17 - 1) <= 0)
005e8ee5                                              {
005e8ef6                                              label_5e8ef6:
005e8ef6                                                  int32_t eax_29 = *(uint32_t*)esi_2;
005e8efb                                                  arg6 = 0;
005e8f02                                                  void* ecx_23 = ((char*)arg1 + (eax_29 * 6));
005e8f02                                                  
005e8f20                                                  do
005e8f20                                                  {
005e8f0a                                                      uint32_t edx_16 = ((uint32_t)*(uint16_t*)ecx_23);
005e8f0a                                                      
005e8f0d                                                      if (arg7 != 0)
005e8f0f                                                          edx_16 = arg7[edx_16];
005e8f0f                                                      
005e8f15                                                      if (edx_16 == eax_24)
005e8f15                                                          break;
005e8f15                                                      
005e8f17                                                      arg6 += 1;
005e8f1b                                                      ecx_23 += 2;
005e8f20                                                  } while (arg6 < 3);
005e8f20                                                  
005e8f30                                                  arg8[((eax_29 * 3) + arg6)] = arg3;
005e8ee5                                              }
005e8ee5                                              else
005e8ee5                                              {
005e8eef                                                  while (*(uint32_t*)esi_2 != *(uint32_t*)(arg4 + (ecx_21 << 2)))
005e8eef                                                  {
005e8ef1                                                      ecx_21 += 1;
005e8ef1                                                      
005e8ef4                                                      if (ecx_21 >= (edi_17 - 1))
005e8ef4                                                          goto label_5e8ef6;
005e8eef                                                  }
005e8eef                                                  
005e8f51                                                  *(uint32_t*)esi_2 = 0xffffffff;
005e8ee5                                              }
005e8eca                                          }
005e8eca                                          
005e8f33                                          edx_9 = arg3;
005e8f36                                          ecx_20 = arg5;
005e8e87                                      }
005e8e87                                      
005e8f39                                      edi_17 += 1;
005e8f3d                                      esi_2 += 4;
005e8f43                                  } while ((edi_17 - 1) < 3);
005e8f43                                  
005e8f49                                  esi = var_24;
005e8f4c                                  ebx_2 = arg4;
005e8e78                              }
005e8e32                          }
005e8e32                          
005e8f64                          var_14_2 -= 0xc;
005e8f68                          edx_9 += 1;
005e8f69                          ecx_20 = &ecx_20[3];
005e8f6c                          ebx_2 += 0xc;
005e8f72                          arg3 = edx_9;
005e8f75                          arg5 = ecx_20;
005e8f78                          arg4 = ebx_2;
005e8f7b                      } while (edx_9 < eax_17);
005e8f7b                      
005e8f81                      ecx_17 = var_20_1;
005e8dfe                  }
005e8dfe                  
005e8f84                  ecx_17 += 0x14;
005e8f87                  i_1 = i_2;
005e8f87                  i_2 -= 1;
005e8f8a                  var_20_1 = ecx_17;
005e8f8d              } while (i_1 != 1);
005e8de0          }
005e8de0          
005e8f96          if (var_2c > esi)
005e8f98              result = 0x80004005;
005e8c88      }
005e8c88      
005e8fab      operator delete(s);
005e8fb3      operator delete(eax_4);
005e8fc1      return result;
005e8c34  }


005e8fc4  long __stdcall GXConvertPointRepsToAdjacencyInt<uint32_t,4294967295>(class D3DXMesh::GXTri3Face<uint32_t>* arg1, uint8_t* arg2, uint32_t arg3, uint32_t arg4, struct _D3DXATTRIBUTERANGE* arg5, uint32_t arg6, unsigned long const* arg7, unsigned long* arg8, uint32_t arg9, uint32_t arg10)

005e8fc4  {
005e8fcd      uint32_t ebx = arg4;
005e8fd4      int32_t edi;
005e8fd4      int32_t var_60 = edi;
005e8fd5      uint32_t eax = (ebx * 3);
005e8fe2      uint32_t temp0 = (COMBINE(0, arg3) / 3);
005e8fe4      int32_t result = 0;
005e8fe8      int32_t var_2c = 0;
005e8fee      uint32_t edi_2 = (temp0 << 2);
005e8ff5      void* s = operator new(edi_2);
005e9007      void* eax_6 = operator new((eax * 0x14));
005e9007      
005e901d      if ((s == 0 || eax_6 == 0))
005e9331          result = 0x8007000e;
005e901d      else
005e901d      {
005e9036          __builtin_memset(__builtin_memset(s, 0, ((edi_2 >> 2) << 2)), 0, (edi_2 & 3));
005e903d          void* edx_3;
005e903d          
005e903d          if (arg6 != 0)
005e9057              edx_3 = arg5;
005e903d          else
005e903d          {
005e903f              int32_t var_50;
005e903f              int32_t var_50_1 = (var_50 & arg6);
005e9042              int32_t var_48;
005e9042              int32_t var_48_1 = (var_48 & arg6);
005e9045              arg6 = 1;
005e904c              void var_54;
005e904c              edx_3 = &var_54;
005e904f              uint32_t var_4c_1 = ebx;
005e9052              uint32_t var_44_1 = arg3;
005e903d          }
005e903d          
005e9062          void* var_14_1 = edx_3;
005e9065          int32_t var_40;
005e9065          
005e9065          if (arg6 > 0)
005e9065          {
005e906b              void* ecx_5 = ((char*)edx_3 + 4);
005e906e              void* var_c_1 = ecx_5;
005e9071              uint32_t i_3 = arg6;
005e9145              uint32_t i;
005e9145              
005e9145              do
005e9145              {
005e9074                  uint32_t eax_9 = *(uint32_t*)ecx_5;
005e9079                  struct _D3DXATTRIBUTERANGE* edi_6 = (*(uint32_t*)((char*)ecx_5 + 4) + eax_9);
005e907d                  arg5 = edi_6;
005e9080                  arg3 = eax_9;
005e9080                  
005e9083                  if (eax_9 < edi_6)
005e9083                  {
005e908f                      void* esi_1 = (((char*)arg1 + (eax_9 * 0xc)) + 8);
005e908f                      
005e9130                      do
005e9130                      {
005e9093                          int32_t ecx_7 = *(uint32_t*)((char*)esi_1 - 8);
005e9093                          
005e9099                          if (ecx_7 != arg9)
005e9099                          {
005e90a4                              int32_t eax_12;
005e90a4                              int32_t ecx_10;
005e90a4                              
005e90a4                              if (arg7 == 0)
005e90a4                              {
005e90b9                                  eax_12 = *(uint32_t*)esi_1;
005e90bb                                  var_40 = ecx_7;
005e90be                                  ecx_10 = *(uint32_t*)((char*)esi_1 - 4);
005e90a4                              }
005e90a4                              else
005e90a4                              {
005e90a9                                  int32_t edx_4 = *(uint32_t*)esi_1;
005e90ab                                  var_40 = arg7[ecx_7];
005e90b1                                  ecx_10 = arg7[*(uint32_t*)((char*)esi_1 - 4)];
005e90b4                                  eax_12 = arg7[edx_4];
005e90a4                              }
005e90a4                              
005e90c4                              int32_t var_3c_1 = ecx_10;
005e90c7                              int32_t var_38_1 = eax_12;
005e90c7                              
005e90d3                              if ((var_40 != ecx_10 && (var_40 != eax_12 && ecx_10 != eax_12)))
005e90d3                              {
005e90d7                                  int32_t ecx_11 = 1;
005e90d8                                  int32_t* edi_7 = &var_40;
005e90db                                  int32_t j_1 = 3;
005e911f                                  int32_t j;
005e911f                                  
005e911f                                  do
005e911f                                  {
005e9111                                      HashAdd(*(uint32_t*)edi_7, &var_40[(COMBINE(0, ecx_11) % 3)], &var_40[(COMBINE(0, (ecx_11 + 1)) % 3)], arg3, s, eax_6, temp0, &var_2c);
005e9116                                      ecx_11 += 1;
005e9119                                      edi_7 = &edi_7[1];
005e911c                                      j = j_1;
005e911c                                      j_1 -= 1;
005e911f                                  } while (j != 1);
005e9121                                  edi_6 = arg5;
005e9124                                  ebx = arg4;
005e90d3                              }
005e9099                          }
005e9099                          
005e9127                          arg3 += 1;
005e912a                          esi_1 += 0xc;
005e9130                      } while (arg3 < edi_6);
005e9130                      
005e9136                      edx_3 = var_14_1;
005e9139                      ecx_5 = var_c_1;
005e9083                  }
005e9083                  
005e913c                  ecx_5 += 0x14;
005e913f                  i = i_3;
005e913f                  i_3 -= 1;
005e9142                  var_c_1 = ecx_5;
005e9145              } while (i != 1);
005e9065          }
005e9065          
005e9151          uint32_t ecx_13 = (ebx * 0xc);
005e9163          __builtin_memset(__builtin_memset(arg8, 0xffffffff, ((ecx_13 >> 2) << 2)), 0xff, (ecx_13 & 3));
005e9163          
005e916a          if (arg6 > 0)
005e916a          {
005e9170              void* edx_9 = ((char*)edx_3 + 4);
005e9173              void* var_20_1 = edx_9;
005e9176              uint32_t i_2 = arg6;
005e931a              uint32_t i_1;
005e931a              
005e931a              do
005e931a              {
005e9179                  uint32_t eax_17 = *(uint32_t*)edx_9;
005e917e                  struct _D3DXATTRIBUTERANGE* esi_4 = (*(uint32_t*)((char*)edx_9 + 4) + eax_17);
005e9180                  uint32_t edi_10 = eax_17;
005e9184                  arg5 = esi_4;
005e9187                  arg3 = edi_10;
005e9187                  
005e918a                  if (edi_10 < esi_4)
005e918a                  {
005e9199                      uint32_t eax_19 = (edi_10 * 0xc);
005e91a3                      int32_t ebx_2 = ((&var_40 - eax_19) - arg8);
005e91a6                      arg4 = ((char*)arg8 + eax_19);
005e91a9                      void* ecx_19 = ((eax_19 + arg1) + 8);
005e91b2                      void* var_c_2 = ecx_19;
005e91b5                      int32_t var_18_1 = ebx_2;
005e91b5                      
005e9308                      do
005e9308                      {
005e91bb                          int32_t edx_11 = *(uint32_t*)((char*)ecx_19 - 8);
005e91bb                          
005e91c1                          if (edx_11 != arg9)
005e91c1                          {
005e91cc                              int32_t eax_23;
005e91cc                              int32_t edx_14;
005e91cc                              
005e91cc                              if (arg7 == 0)
005e91cc                              {
005e91e4                                  eax_23 = *(uint32_t*)ecx_19;
005e91e6                                  var_40 = edx_11;
005e91e9                                  edx_14 = *(uint32_t*)((char*)ecx_19 - 4);
005e91cc                              }
005e91cc                              else
005e91cc                              {
005e91d1                                  int32_t esi_5 = *(uint32_t*)ecx_19;
005e91d3                                  var_40 = arg7[edx_11];
005e91d9                                  edx_14 = arg7[*(uint32_t*)((char*)ecx_19 - 4)];
005e91dc                                  eax_23 = arg7[esi_5];
005e91df                                  esi_4 = arg5;
005e91cc                              }
005e91cc                              
005e91ef                              int32_t var_3c_2 = edx_14;
005e91f2                              int32_t var_38_2 = eax_23;
005e91f2                              
005e9206                              if (((var_40 == edx_14 || var_40 == eax_23) || edx_14 == eax_23))
005e9206                              {
005e92e4                                  *(uint32_t*)arg4 = 0xffffffff;
005e92e7                                  *(uint32_t*)(arg4 + 4) = 0xffffffff;
005e92ee                                  *(uint32_t*)(((char*)arg8 - arg1) + ecx_19) = 0xffffffff;
005e9206                              }
005e9206                              else
005e9206                              {
005e920c                                  int32_t* esi_6 = arg4;
005e9211                                  int32_t edi_11 = 1;
005e9211                                  
005e92ce                                  do
005e92ce                                  {
005e9215                                      if (*(uint32_t*)esi_6 == 0xffffffff)
005e9215                                      {
005e9227                                          unsigned long ebx_3 = *(uint32_t*)((char*)esi_6 + ebx_2);
005e9235                                          unsigned long eax_25 = &var_40[(COMBINE(0, edi_11) % 3)];
005e924b                                          unsigned long eax_28 = HashFind(eax_25, ebx_3, &var_40[(COMBINE(0, (edi_11 + 1)) % 3)], s, temp0, 0xffffffff, arg2, arg10);
005e9253                                          *(uint32_t*)esi_6 = eax_28;
005e9253                                          
005e9255                                          if (eax_28 != 0xffffffff)
005e9255                                          {
005e9264                                              HashRemove(ebx_3, eax_25, arg3, s, temp0);
005e926c                                              int32_t ecx_20 = 0;
005e926c                                              
005e9270                                              if ((edi_11 - 1) <= 0)
005e9270                                              {
005e9281                                              label_5e9281:
005e9281                                                  int32_t eax_30 = *(uint32_t*)esi_6;
005e9286                                                  arg6 = 0;
005e928d                                                  void* ecx_22 = ((char*)arg1 + (eax_30 * 0xc));
005e928d                                                  
005e92ab                                                  do
005e92ab                                                  {
005e9295                                                      int32_t edx_21 = *(uint32_t*)ecx_22;
005e9295                                                      
005e9297                                                      if (arg7 != 0)
005e9299                                                          edx_21 = arg7[edx_21];
005e9299                                                      
005e929f                                                      if (edx_21 == eax_25)
005e929f                                                          break;
005e929f                                                      
005e92a1                                                      arg6 += 1;
005e92a4                                                      ecx_22 += 4;
005e92ab                                                  } while (arg6 < 3);
005e92ab                                                  
005e92bb                                                  arg8[((eax_30 * 3) + arg6)] = arg3;
005e9270                                              }
005e9270                                              else
005e9270                                              {
005e927a                                                  while (*(uint32_t*)esi_6 != *(uint32_t*)(arg4 + (ecx_20 << 2)))
005e927a                                                  {
005e927c                                                      ecx_20 += 1;
005e927c                                                      
005e927f                                                      if (ecx_20 >= (edi_11 - 1))
005e927f                                                          goto label_5e9281;
005e927a                                                  }
005e927a                                                  
005e92dc                                                  *(uint32_t*)esi_6 = 0xffffffff;
005e9270                                              }
005e9255                                          }
005e9255                                          
005e92be                                          ecx_19 = var_c_2;
005e9215                                      }
005e9215                                      
005e92c1                                      ebx_2 = var_18_1;
005e92c4                                      edi_11 += 1;
005e92c8                                      esi_6 = &esi_6[1];
005e92ce                                  } while ((edi_11 - 1) < 3);
005e92ce                                  
005e92d4                                  edi_10 = arg3;
005e92d7                                  esi_4 = arg5;
005e9206                              }
005e91c1                          }
005e91c1                          
005e92f2                          arg4 += 0xc;
005e92f6                          edi_10 += 1;
005e92f7                          ebx_2 -= 0xc;
005e92fa                          ecx_19 += 0xc;
005e92ff                          arg3 = edi_10;
005e9302                          var_18_1 = ebx_2;
005e9305                          var_c_2 = ecx_19;
005e9308                      } while (edi_10 < esi_4);
005e9308                      
005e930e                      edx_9 = var_20_1;
005e918a                  }
005e918a                  
005e9311                  edx_9 += 0x14;
005e9314                  i_1 = i_2;
005e9314                  i_2 -= 1;
005e9317                  var_20_1 = edx_9;
005e931a              } while (i_1 != 1);
005e916a          }
005e916a          
005e9326          if (var_2c > eax)
005e9328              result = 0x80004005;
005e901d      }
005e901d      
005e933b      operator delete(s);
005e9343      operator delete(eax_6);
005e9351      return result;
005e8fc4  }


005e9354  void __thiscall D3DXMesh::CSimVertexCache<uint16_t,65535>::AccessVertex(D3DXMesh::CSimVertexCache<uint16_t,65535>* this, uint16_t arg2, bool& arg3)

005e9354  {
005e935f      bool eax = D3DXMesh::CIndexQueue<uint16_t,65535>::BElementPresent(this, arg2);
005e9369      *(uint8_t*)arg3 = eax;
005e9369      
005e936b      if (eax == 0)
005e9372          D3DXMesh::CIndexQueue<uint16_t,65535>::InsertElement(this, arg2);
005e9354  }


005e937c  void __thiscall D3DXMesh::CSimVertexCache<uint32_t,4294967295>::AccessVertex(D3DXMesh::CSimVertexCache<uint32_t,4294967295>* this, uint32_t arg2, bool& arg3)

005e937c  {
005e9387      bool eax = D3DXMesh::CIndexQueue<uint32_t,4294967295>::BElementPresent(this, arg2);
005e9391      *(uint8_t*)arg3 = eax;
005e9391      
005e9393      if (eax == 0)
005e939a          D3DXMesh::CIndexQueue<uint32_t,4294967295>::InsertElement(this, arg2);
005e937c  }


005e93a4  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::SplitSharedVertices(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, unsigned long** arg2, uint32_t* arg3)

005e93a4  {
005e93b2      int16_t eax = ((int16_t)*(uint32_t*)((char*)this + 0x23c));
005e93be      *(uint32_t*)arg2 = nullptr;
005e93c3      *(uint32_t*)arg3 = 0;
005e93cb      int32_t eax_4 = (*(uint32_t*)((char*)this + 0x23c) << 1);
005e93cd      int32_t edi;
005e93cd      int32_t var_5c = edi;
005e93cf      int32_t result = 0;
005e93d2      void* var_8 = nullptr;
005e93d5      void* var_14 = nullptr;
005e93d8      uint32_t var_48 = 0;
005e93db      uint32_t var_24 = 0;
005e93de      uint32_t var_4c = 0;
005e93e1      int32_t var_2c = 0;
005e93e4      uint32_t var_30 = 0;
005e93e7      void* s = operator new(eax_4);
005e93f9      void* s_1 = operator new((*(uint32_t*)((char*)this + 0x23c) << 2));
005e93f9      
005e9410      if ((s == 0 || s_1 == 0))
005e9410      {
005e95fa      label_5e95fa:
005e95fa          result = 0x8007000e;
005e9410      }
005e9410      else
005e9410      {
005e941c          int32_t ecx_2 = (*(uint32_t*)((char*)this + 0x23c) << 2);
005e942e          __builtin_memset(__builtin_memset(s_1, 0xffffffff, ((ecx_2 >> 2) << 2)), 0xff, (ecx_2 & 3));
005e9439          int32_t ecx_7 = (*(uint32_t*)((char*)this + 0x23c) << 1);
005e944a          __builtin_memset(__builtin_memset(s, 0xffffffff, ((ecx_7 >> 2) << 2)), 0xff, (ecx_7 & 3));
005e9452          int32_t i = 0;
005e9452          
005e9455          if (*(uint32_t*)((char*)this + 0x264) > 0)
005e9455          {
005e945b              int32_t var_28_1 = 0;
005e945b              
005e95e8              do
005e95e8              {
005e9464                  int32_t edx_4 = (*(uint32_t*)((char*)this + 0x24c) + var_28_1);
005e946c                  int32_t var_3c_1 = edx_4;
005e946c                  
005e946f                  if (*(uint16_t*)edx_4 != 0xffff)
005e946f                  {
005e9481                      uint32_t var_18 = *(uint32_t*)(*(uint32_t*)((char*)this + 0x254) + (i << 2));
005e9481                      
005e95d0                      for (int32_t j = 0; j < 3; j += 1)
005e95d0                      {
005e948d                          int16_t* edi_5 = (edx_4 + (j << 1));
005e9490                          uint32_t eax_10 = ((uint32_t)*(uint16_t*)edi_5);
005e9493                          void* ecx_13 = ((char*)s_1 + (eax_10 << 2));
005e9496                          int32_t ebx_1 = *(uint32_t*)ecx_13;
005e9496                          
005e949b                          if (ebx_1 != var_18)
005e949b                          {
005e94a4                              if (ebx_1 != 0xffffffff)
005e94a4                              {
005e94b0                                  void* s_2 = s;
005e94b3                                  eax_10 = *(uint16_t*)((char*)s_2 + (eax_10 << 1));
005e94b3                                  
005e94d6                                  while (eax_10 != 0xffff)
005e94d6                                  {
005e94bc                                      uint32_t ecx_14 = ((uint32_t)eax_10);
005e94bc                                      
005e94c5                                      if (*(uint32_t*)((char*)var_14 + (ecx_14 << 2)) == var_18)
005e94c5                                      {
005e95f5                                          *(uint16_t*)edi_5 = (eax + eax_10);
005e95f8                                          goto label_5e95c6;
005e94c5                                      }
005e94c5                                      
005e94ce                                      eax_10 = *(uint16_t*)((char*)var_8 + (ecx_14 << 1));
005e94d6                                  }
005e94d6                                  
005e94dc                                  if (var_24 == 0)
005e94dc                                  {
005e94e8                                      var_2c = 0x100;
005e94eb                                      var_24 = 0x100;
005e94ee                                      var_30 = 0x100;
005e94fc                                      var_8 = operator new(0x200);
005e9505                                      var_14 = operator new(0x400);
005e9508                                      eax_10 = operator new(0x400);
005e9513                                      bool cond:3_1 = var_8 == 0;
005e9517                                      *(uint32_t*)arg2 = eax_10;
005e9517                                      
005e9519                                      if (cond:3_1)
005e9519                                          goto label_5e95fa;
005e9519                                      
005e9523                                      if (var_14 == 0)
005e9523                                          goto label_5e95fa;
005e9523                                      
005e952b                                      if (eax_10 == 0)
005e952b                                          goto label_5e95fa;
005e952b                                      
005e9531                                      s_2 = s;
005e94dc                                  }
005e94dc                                  
005e9534                                  eax_10 = *(uint16_t*)((char*)this + 0x23c);
005e953b                                  *(uint32_t*)((char*)this + 0x23c) += 1;
005e9541                                  uint16_t var_38 = eax_10;
005e9548                                  uint32_t* eax_14;
005e9548                                  eax_14 = *(uint16_t*)arg3;
005e954b                                  int16_t var_34_1 = eax_14;
005e954b                                  
005e9566                                  if (AddToDynamicArray<uint32_t>(&var_14, &var_18, &var_48, &var_24) == 0)
005e9566                                      goto label_5e95fa;
005e9566                                  
005e9583                                  if (AddToDynamicArray<uint16_t>(&var_8, &var_38, &var_4c, &var_2c) == 0)
005e9583                                      goto label_5e95fa;
005e9583                                  
005e9588                                  uint32_t var_50 = ((uint32_t)*(uint16_t*)edi_5);
005e9588                                  
005e95a0                                  if (AddToDynamicArray<uint32_t>(arg2, &var_50, arg3, &var_30) == 0)
005e95a0                                      goto label_5e95fa;
005e95a0                                  
005e95a5                                  uint32_t eax_19;
005e95a5                                  eax_19 = *(uint16_t*)((char*)s_2 + (((uint32_t)*(uint16_t*)edi_5) << 1));
005e95b0                                  *(uint16_t*)((char*)var_8 + (((uint32_t)var_34_1) << 1)) = eax_19;
005e95b7                                  uint32_t ecx_16;
005e95b7                                  ecx_16 = var_34_1;
005e95bb                                  *(uint16_t*)((char*)s_2 + (((uint32_t)*(uint16_t*)edi_5) << 1)) = ecx_16;
005e95bf                                  uint32_t eax_20;
005e95bf                                  eax_20 = var_38;
005e95c3                                  *(uint16_t*)edi_5 = eax_20;
005e95c6                              label_5e95c6:
005e95c6                                  edx_4 = var_3c_1;
005e94a4                              }
005e94a4                              else
005e94a9                                  *(uint32_t*)ecx_13 = var_18;
005e949b                          }
005e95d0                      }
005e946f                  }
005e946f                  
005e95d8                  i += 1;
005e95de                  var_28_1 += 6;
005e95e8              } while (i < *(uint32_t*)((char*)this + 0x264));
005e9455          }
005e9410      }
005e9410      
005e9604      operator delete(s);
005e960c      operator delete(var_8);
005e9614      operator delete(s_1);
005e961c      operator delete(var_14);
005e962b      return result;
005e93a4  }


005e962e  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::ReorderVertexData(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t* arg2, uint8_t* arg3)

005e962e  {
005e9636      int32_t result = 0;
005e963d      uint32_t eax = *(uint32_t*)((char*)this + 0x23c);
005e9643      uint32_t ecx = *(uint32_t*)((char*)this + 0x264);
005e9643      
005e964b      if (eax <= ecx)
005e964d          eax = ecx;
005e964d      
005e9650      void* s = operator new(eax);
005e9650      
005e965b      if (s != 0)
005e965b      {
005e9671          int32_t edi;
005e9671          int32_t var_1c_1 = edi;
005e9671          
005e9677          if ((*(uint8_t*)((char*)this + 0x218) & 2) != 0)
005e9677          {
005e9679              int32_t i = 0;
005e9679              
005e9681              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e9681              {
005e96c8                  do
005e96c8                  {
005e9689                      if (arg2[i] != 0xffff)
005e9689                      {
005e9691                          int16_t* ecx_3 = (*(uint32_t*)((char*)this + 0x244) + (i << 1));
005e9691                          
005e969a                          if (arg2[((uint32_t)*(uint16_t*)ecx_3)] == 0xffff)
005e969a                          {
005e969c                              uint32_t edi_1;
005e969c                              edi_1 = *(uint16_t*)ecx_3;
005e969f                              *(uint16_t*)ecx_3 = i;
005e969f                              
005e96bf                              for (int32_t j = (i + 1); j < *(uint32_t*)((char*)this + 0x23c); j += 1)
005e96bf                              {
005e96ad                                  int16_t* edx_3 = (*(uint32_t*)((char*)this + 0x244) + (j << 1));
005e96ad                                  
005e96b3                                  if (*(uint16_t*)edx_3 == edi_1)
005e96b5                                      *(uint16_t*)edx_3 = i;
005e96bf                              }
005e969a                          }
005e9689                      }
005e9689                      
005e96c1                      i += 1;
005e96c8                  } while (i < *(uint32_t*)((char*)this + 0x23c));
005e9681              }
005e9677          }
005e9677          
005e96ca          int32_t ecx_4 = *(uint32_t*)((char*)this + 0x23c);
005e96e1          __builtin_memset(__builtin_memset(s, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
005e96e3          uint32_t i_1 = 0;
005e96eb          uint32_t i_3 = 0;
005e96eb          
005e96ee          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e96ee          {
005e9756              do
005e9756              {
005e96f7                  if (*(uint8_t*)(i_1 + s) == 0)
005e96f7                  {
005e96fc                      char* edi_4 = arg2[i_1];
005e96fc                      
005e9701                      if (edi_4 != 0xffff)
005e9701                      {
005e9705                          if (edi_4 != i_1)
005e9705                          {
005e973a                              do
005e973a                              {
005e9710                                  D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::SwapVertex(this, i_3, edi_4, arg3);
005e971b                                  D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::RemapVertex(this, edi_4, arg2);
005e9726                                  *(uint8_t*)(edi_4 + s) = 1;
005e972a                                  edi_4 = arg2[edi_4];
005e972a                                  
005e972f                                  if (edi_4 == 0xffff)
005e972f                                      goto label_5e974c;
005e972f                                  
005e9735                                  if (*(uint8_t*)(edi_4 + s) != 0)
005e9735                                      goto label_5e974c;
005e973a                              } while (edi_4 != i_3);
005e9705                          }
005e9705                          
005e9744                          D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::RemapVertex(this, i_3, arg2);
005e9701                      }
005e96f7                  }
005e96f7                  
005e974c              label_5e974c:
005e974c                  i_1 = (i_3 + 1);
005e9753                  i_3 = i_1;
005e9756              } while (i_1 < *(uint32_t*)((char*)this + 0x23c));
005e96ee          }
005e96ee          
005e9758          int32_t i_2 = 0;
005e975a          int32_t edx_5 = 0;
005e975a          
005e9762          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e9762          {
005e977b              do
005e977b              {
005e9767                  void* eax_4 = &arg2[i_2];
005e9767                  
005e976c                  if (*(uint32_t*)eax_4 == 0xffff)
005e9771                      *(uint32_t*)eax_4 = 0xffffffff;
005e976c                  else
005e976e                      edx_5 += 1;
005e976e                  
005e9774                  i_2 += 1;
005e977b              } while (i_2 < *(uint32_t*)((char*)this + 0x23c));
005e9762          }
005e9762          
005e977e          *(uint32_t*)((char*)this + 0x23c) = edx_5;
005e965b      }
005e965b      else
005e965d          result = 0x8007000e;
005e965d      
005e9788      operator delete(s);
005e9793      return result;
005e962e  }


005e9796  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::ReorderFaceData(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, uint32_t* arg2, uint32_t* arg3)

005e9796  {
005e979b      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this_2 = this;
005e979c      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this_1 = this;
005e979d      int32_t result = 0;
005e97a4      uint32_t eax = *(uint32_t*)((char*)this + 0x23c);
005e97aa      uint32_t ecx = *(uint32_t*)((char*)this + 0x264);
005e97b2      int32_t edi;
005e97b2      int32_t var_14 = edi;
005e97b2      
005e97b3      if (eax <= ecx)
005e97b5          eax = ecx;
005e97b5      
005e97b8      void* s = operator new(eax);
005e97b8      
005e97c5      if (s != 0)
005e97c5      {
005e97d3          int32_t ecx_2 = *(uint32_t*)((char*)this + 0x264);
005e97e7          __builtin_memset(__builtin_memset(s, 0, ((ecx_2 >> 2) << 2)), 0, (ecx_2 & 3));
005e97e9          uint32_t i = 0;
005e97e9          
005e97f1          if (*(uint32_t*)((char*)this + 0x264) > 0)
005e97f1          {
005e9856              do
005e9856              {
005e97fb                  if (*(uint8_t*)(i + s) == 0)
005e97fb                  {
005e9800                      char* esi_1 = arg2[i];
005e9800                      
005e9809                      if (esi_1 != 0xffff)
005e9809                      {
005e983b                          do
005e983b                          {
005e9841                              if (esi_1 == i)
005e9841                              {
005e984a                                  D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::RemapFace(this, i, arg3, arg2);
005e984a                                  break;
005e9841                              }
005e9841                              
005e980f                              D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::SwapFace(this, i, esi_1);
005e981d                              D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::RemapFace(this, esi_1, arg3, arg2);
005e9828                              *(uint8_t*)(esi_1 + s) = 1;
005e982c                              esi_1 = arg2[esi_1];
005e982c                              
005e9835                              if (esi_1 == 0xffff)
005e9835                                  break;
005e983b                          } while (*(uint8_t*)(esi_1 + s) == 0);
005e9809                      }
005e97fb                  }
005e97fb                  
005e984f                  i += 1;
005e9856              } while (i < *(uint32_t*)((char*)this + 0x264));
005e97f1          }
005e97f1          
005e9859          int32_t i_1 = 0;
005e985b          int32_t edx_2 = 0;
005e985b          
005e9863          if (*(uint32_t*)((char*)this + 0x264) > 0)
005e9863          {
005e9880              do
005e9880              {
005e9868                  void* eax_5 = &arg2[i_1];
005e9868                  
005e9871                  if (*(uint32_t*)eax_5 == 0xffff)
005e9876                      *(uint32_t*)eax_5 = 0xffffffff;
005e9871                  else
005e9873                      edx_2 += 1;
005e9873                  
005e9879                  i_1 += 1;
005e9880              } while (i_1 < *(uint32_t*)((char*)this + 0x264));
005e9863          }
005e9863          
005e9882          *(uint32_t*)((char*)this + 0x264) = edx_2;
005e97c5      }
005e97c5      else
005e97c7          result = 0x8007000e;
005e97c7      
005e988b      operator delete(s);
005e9897      return result;
005e9796  }


005e989a  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::SplitSharedVertices(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, unsigned long** arg2, uint32_t* arg3)

005e989a  {
005e98a8      int32_t eax = *(uint32_t*)((char*)this + 0x23c);
005e98b4      *(uint32_t*)arg2 = nullptr;
005e98b9      *(uint32_t*)arg3 = 0;
005e98c1      int32_t eax_4 = (*(uint32_t*)((char*)this + 0x23c) << 2);
005e98c4      int32_t edi;
005e98c4      int32_t var_58 = edi;
005e98c6      int32_t result = 0;
005e98c9      void* var_8 = nullptr;
005e98cc      void* var_14 = nullptr;
005e98cf      uint32_t var_44 = 0;
005e98d2      uint32_t var_24 = 0;
005e98d5      uint32_t var_48 = 0;
005e98d8      int32_t var_2c = 0;
005e98db      int32_t var_30 = 0;
005e98de      void* s = operator new(eax_4);
005e98f0      void* s_1 = operator new((*(uint32_t*)((char*)this + 0x23c) << 2));
005e98f0      
005e9907      if ((s == 0 || s_1 == 0))
005e9907      {
005e9acf      label_5e9acf:
005e9acf          result = 0x8007000e;
005e9907      }
005e9907      else
005e9907      {
005e9913          int32_t ecx_2 = (*(uint32_t*)((char*)this + 0x23c) << 2);
005e9925          __builtin_memset(__builtin_memset(s_1, 0xffffffff, ((ecx_2 >> 2) << 2)), 0xff, (ecx_2 & 3));
005e9930          int32_t ecx_7 = (*(uint32_t*)((char*)this + 0x23c) << 2);
005e9942          __builtin_memset(__builtin_memset(s, 0xffffffff, ((ecx_7 >> 2) << 2)), 0xff, (ecx_7 & 3));
005e994a          int32_t i = 0;
005e994a          
005e994d          if (*(uint32_t*)((char*)this + 0x264) > 0)
005e994d          {
005e9953              int32_t var_28_1 = 0;
005e9953              
005e9ac0              do
005e9ac0              {
005e995c                  int32_t ecx_12 = (*(uint32_t*)((char*)this + 0x24c) + var_28_1);
005e9962                  int32_t var_38_1 = ecx_12;
005e9962                  
005e9965                  if (*(uint32_t*)ecx_12 != 0xffffffff)
005e9965                  {
005e9977                      uint32_t var_18 = *(uint32_t*)(*(uint32_t*)((char*)this + 0x254) + (i << 2));
005e9977                      
005e9aaa                      for (int32_t j = 0; j < 3; j += 1)
005e9aaa                      {
005e9983                          int32_t* edi_5 = (ecx_12 + (j << 2));
005e9988                          int32_t* eax_11 = (*(uint32_t*)edi_5 << 2);
005e998b                          void* edx_5 = ((char*)s_1 + eax_11);
005e998d                          int32_t ebx_1 = *(uint32_t*)edx_5;
005e998d                          
005e9992                          if (ebx_1 != var_18)
005e9992                          {
005e999b                              if (ebx_1 != 0xffffffff)
005e999b                              {
005e99cc                                  uint32_t eax_25;
005e99cc                                  int32_t* ecx_15;
005e99cc                                  
005e99cc                                  for (int32_t k = *(uint32_t*)((char*)eax_11 + s); k != 0xffffffff; k = *(uint32_t*)((char*)ecx_15 + var_8))
005e99cc                                  {
005e99b4                                      ecx_15 = (k << 2);
005e99b4                                      
005e99bd                                      if (*(uint32_t*)((char*)ecx_15 + var_14) == var_18)
005e99bd                                      {
005e9acb                                          eax_25 = (k + eax);
005e9acd                                          goto label_5e9a9c;
005e99bd                                      }
005e99cc                                  }
005e99cc                                  
005e99d2                                  if (var_24 == 0)
005e99d2                                  {
005e99df                                      var_2c = 0x100;
005e99e2                                      var_24 = 0x100;
005e99e5                                      var_30 = 0x100;
005e99ee                                      var_8 = operator new(0x400);
005e99f7                                      var_14 = operator new(0x400);
005e99fa                                      void* eax_16 = operator new(0x400);
005e9a05                                      bool cond:3_1 = var_8 == 0;
005e9a09                                      *(uint32_t*)arg2 = eax_16;
005e9a09                                      
005e9a0b                                      if (cond:3_1)
005e9a0b                                          goto label_5e9acf;
005e9a0b                                      
005e9a15                                      if (var_14 == 0)
005e9a15                                          goto label_5e9acf;
005e9a15                                      
005e9a1d                                      if (eax_16 == 0)
005e9a1d                                          goto label_5e9acf;
005e99d2                                  }
005e99d2                                  
005e9a23                                  uint32_t eax_17 = *(uint32_t*)((char*)this + 0x23c);
005e9a29                                  uint32_t var_34 = eax_17;
005e9a2d                                  *(uint32_t*)((char*)this + 0x23c) = (eax_17 + 1);
005e9a36                                  uint32_t ebx_2 = *(uint32_t*)arg3;
005e9a36                                  
005e9a4f                                  if (AddToDynamicArray<uint32_t>(&var_14, &var_18, &var_44, &var_24) == 0)
005e9a4f                                      goto label_5e9acf;
005e9a4f                                  
005e9a68                                  if (AddToDynamicArray<uint32_t>(&var_8, &var_34, &var_48, &var_2c) == 0)
005e9a68                                      goto label_5e9acf;
005e9a68                                  
005e9a6c                                  uint32_t var_4c = *(uint32_t*)edi_5;
005e9a6c                                  
005e9a84                                  if (AddToDynamicArray<uint32_t>(arg2, &var_4c, arg3, &var_30) == 0)
005e9a84                                      goto label_5e9acf;
005e9a84                                  
005e9a91                                  *(uint32_t*)((char*)var_8 + (ebx_2 << 2)) = *(uint32_t*)((char*)s + (*(uint32_t*)edi_5 << 2));
005e9a96                                  *(uint32_t*)((char*)s + (*(uint32_t*)edi_5 << 2)) = ebx_2;
005e9a99                                  eax_25 = var_34;
005e9a9c                              label_5e9a9c:
005e9a9c                                  ecx_12 = var_38_1;
005e9a9f                                  *(uint32_t*)edi_5 = eax_25;
005e999b                              }
005e999b                              else
005e99a0                                  *(uint32_t*)edx_5 = var_18;
005e9992                          }
005e9aaa                      }
005e9965                  }
005e9965                  
005e9ab0                  i += 1;
005e9ab6                  var_28_1 += 0xc;
005e9ac0              } while (i < *(uint32_t*)((char*)this + 0x264));
005e994d          }
005e9907      }
005e9907      
005e9ad9      operator delete(s);
005e9ae1      operator delete(var_8);
005e9ae9      operator delete(s_1);
005e9af1      operator delete(var_14);
005e9b00      return result;
005e989a  }


005e9b03  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::ReorderVertexData(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t* arg2, uint8_t* arg3)

005e9b03  {
005e9b08      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_2 = this;
005e9b09      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_1 = this;
005e9b0a      int32_t result = 0;
005e9b11      uint32_t eax = *(uint32_t*)((char*)this + 0x23c);
005e9b17      uint32_t ecx = *(uint32_t*)((char*)this + 0x264);
005e9b17      
005e9b1f      if (eax <= ecx)
005e9b21          eax = ecx;
005e9b21      
005e9b24      void* s = operator new(eax);
005e9b24      
005e9b2f      if (s != 0)
005e9b2f      {
005e9b45          int32_t edi;
005e9b45          int32_t var_18_1 = edi;
005e9b46          int32_t i;
005e9b46          
005e9b46          if ((*(uint8_t*)((char*)this + 0x218) & 2) != 0)
005e9b48              i = 0;
005e9b48          
005e9b50          uint32_t* edx_1;
005e9b50          
005e9b50          if (((*(uint8_t*)((char*)this + 0x218) & 2) == 0 || *(uint32_t*)((char*)this + 0x23c) <= 0))
005e9b98              edx_1 = arg2;
005e9b50          else
005e9b50          {
005e9b94              do
005e9b94              {
005e9b52                  edx_1 = arg2;
005e9b52                  
005e9b59                  if (edx_1[i] != 0xffffffff)
005e9b59                  {
005e9b61                      int32_t* eax_2 = (*(uint32_t*)((char*)this + 0x244) + (i << 2));
005e9b64                      int32_t edi_1 = *(uint32_t*)eax_2;
005e9b64                      
005e9b6a                      if (edx_1[edi_1] == 0xffffffff)
005e9b6a                      {
005e9b6c                          *(uint32_t*)eax_2 = i;
005e9b6c                          
005e9b8b                          for (int32_t j = (i + 1); j < *(uint32_t*)((char*)this + 0x23c); j += 1)
005e9b8b                          {
005e9b7b                              int32_t* edi_3 = (*(uint32_t*)((char*)this + 0x244) + (j << 2));
005e9b7b                              
005e9b80                              if (*(uint32_t*)edi_3 == edi_1)
005e9b82                                  *(uint32_t*)edi_3 = i;
005e9b8b                          }
005e9b6a                      }
005e9b59                  }
005e9b59                  
005e9b8d                  i += 1;
005e9b94              } while (i < *(uint32_t*)((char*)this + 0x23c));
005e9b50          }
005e9b50          
005e9b9b          int32_t ecx_2 = *(uint32_t*)((char*)this + 0x23c);
005e9bb2          uint32_t i_1 = 0;
005e9bb4          __builtin_memset(__builtin_memset(s, 0, ((ecx_2 >> 2) << 2)), 0, (ecx_2 & 3));
005e9bb4          
005e9bbc          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e9bbc          {
005e9c1b              do
005e9c1b              {
005e9bc5                  if (*(uint8_t*)(i_1 + s) == 0)
005e9bc5                  {
005e9bc7                      char* edi_6 = edx_1[i_1];
005e9bc7                      
005e9bcd                      if (edi_6 != 0xffffffff)
005e9bcd                      {
005e9bd1                          if (edi_6 != i_1)
005e9bd1                          {
005e9c04                              do
005e9c04                              {
005e9bda                                  D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::SwapVertex(this, i_1, edi_6, arg3);
005e9be5                                  D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::RemapVertex(this, edi_6, arg2);
005e9bf0                                  *(uint8_t*)(edi_6 + s) = 1;
005e9bf4                                  edi_6 = arg2[edi_6];
005e9bf4                                  
005e9bfa                                  if (edi_6 == 0xffffffff)
005e9bfa                                      goto label_5e9c11;
005e9bfa                                  
005e9c00                                  if (*(uint8_t*)(edi_6 + s) != 0)
005e9c00                                      goto label_5e9c11;
005e9c04                              } while (edi_6 != i_1);
005e9c04                              
005e9c06                              edx_1 = arg2;
005e9bd1                          }
005e9bd1                          
005e9c0c                          D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::RemapVertex(this, i_1, edx_1);
005e9c11                      label_5e9c11:
005e9c11                          edx_1 = arg2;
005e9bcd                      }
005e9bc5                  }
005e9bc5                  
005e9c14                  i_1 += 1;
005e9c1b              } while (i_1 < *(uint32_t*)((char*)this + 0x23c));
005e9bbc          }
005e9bbc          
005e9c1d          int32_t i_2 = 0;
005e9c1f          int32_t ecx_10 = 0;
005e9c1f          
005e9c29          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005e9c29          {
005e9c3f              do
005e9c3f              {
005e9c2f                  if (edx_1[i_2] == 0xffffffff)
005e9c34                      edx_1[i_2] = 0xffffffff;
005e9c2f                  else
005e9c31                      ecx_10 += 1;
005e9c31                  
005e9c38                  i_2 += 1;
005e9c3f              } while (i_2 < *(uint32_t*)((char*)this + 0x23c));
005e9c29          }
005e9c29          
005e9c41          *(uint32_t*)((char*)this + 0x23c) = ecx_10;
005e9b2f      }
005e9b2f      else
005e9b31          result = 0x8007000e;
005e9b31      
005e9c4a      operator delete(s);
005e9c55      return result;
005e9b03  }


005e9c58  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::ReorderFaceData(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, uint32_t* arg2, uint32_t* arg3)

005e9c58  {
005e9c5d      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_2 = this;
005e9c5e      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_1 = this;
005e9c5f      int32_t result = 0;
005e9c66      uint32_t eax = *(uint32_t*)((char*)this + 0x23c);
005e9c6c      uint32_t ecx = *(uint32_t*)((char*)this + 0x264);
005e9c74      int32_t edi;
005e9c74      int32_t var_14 = edi;
005e9c74      
005e9c75      if (eax <= ecx)
005e9c77          eax = ecx;
005e9c77      
005e9c7a      void* s = operator new(eax);
005e9c7a      
005e9c87      if (s != 0)
005e9c87      {
005e9c95          int32_t ecx_2 = *(uint32_t*)((char*)this + 0x264);
005e9ca9          __builtin_memset(__builtin_memset(s, 0, ((ecx_2 >> 2) << 2)), 0, (ecx_2 & 3));
005e9cab          uint32_t i = 0;
005e9cab          
005e9cb3          if (*(uint32_t*)((char*)this + 0x264) > 0)
005e9cb3          {
005e9d12              do
005e9d12              {
005e9cbd                  if (*(uint8_t*)(i + s) == 0)
005e9cbd                  {
005e9cc2                      char* esi_1 = arg2[i];
005e9cc2                      
005e9cc8                      if (esi_1 != 0xffffffff)
005e9cc8                      {
005e9cf7                          do
005e9cf7                          {
005e9cfd                              if (esi_1 == i)
005e9cfd                              {
005e9d06                                  D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::RemapFace(this, i, arg3, arg2);
005e9d06                                  break;
005e9cfd                              }
005e9cfd                              
005e9cce                              D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::SwapFace(this, i, esi_1);
005e9cdc                              D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::RemapFace(this, esi_1, arg3, arg2);
005e9ce7                              *(uint8_t*)(esi_1 + s) = 1;
005e9ceb                              esi_1 = arg2[esi_1];
005e9ceb                              
005e9cf1                              if (esi_1 == 0xffffffff)
005e9cf1                                  break;
005e9cf7                          } while (*(uint8_t*)(esi_1 + s) == 0);
005e9cc8                      }
005e9cbd                  }
005e9cbd                  
005e9d0b                  i += 1;
005e9d12              } while (i < *(uint32_t*)((char*)this + 0x264));
005e9cb3          }
005e9cb3          
005e9d15          int32_t i_1 = 0;
005e9d17          int32_t edx_2 = 0;
005e9d17          
005e9d1f          if (*(uint32_t*)((char*)this + 0x264) > 0)
005e9d1f          {
005e9d39              do
005e9d39              {
005e9d24                  void* eax_5 = &arg2[i_1];
005e9d24                  
005e9d2a                  if (*(uint32_t*)eax_5 == 0xffffffff)
005e9d2f                      *(uint32_t*)eax_5 = 0xffffffff;
005e9d2a                  else
005e9d2c                      edx_2 += 1;
005e9d2c                  
005e9d32                  i_1 += 1;
005e9d39              } while (i_1 < *(uint32_t*)((char*)this + 0x264));
005e9d1f          }
005e9d1f          
005e9d3b          *(uint32_t*)((char*)this + 0x264) = edx_2;
005e9c87      }
005e9c87      else
005e9c89          result = 0x8007000e;
005e9c89      
005e9d44      operator delete(s);
005e9d50      return result;
005e9c58  }


005e9d53  long __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::Init(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this, uint16_t arg2, uint16_t arg3, bool arg4)

005e9d53  {
005e9d58      D3DXMesh::CMeshStatus<uint16_t,1,65535>* this_1 = this;
005e9d5a      int32_t edi;
005e9d5a      int32_t var_10 = edi;
005e9d5b      int32_t edi_1 = 0;
005e9d5d      D3DXMesh::CMeshStatus<uint16_t,1,65535>* this_2 = this;
005e9d62      int32_t result = 0;
005e9d62      
005e9d65      if (*(uint32_t*)((char*)this_2 + 0x10) != 0)
005e9d65      {
005e9db2      label_5e9db2:
005e9db2          this = arg3;
005e9db6          *(uint16_t*)((char*)this_2 + 8) = 0xffff;
005e9dbc          *(uint16_t*)((char*)this_2 + 0xa) = 0xffff;
005e9dc2          *(uint16_t*)((char*)this_2 + 0xc) = 0xffff;
005e9dc8          *(uint16_t*)((char*)this_2 + 0xe) = 0xffff;
005e9dd2          *(uint16_t*)((char*)this_2 + 0x16) = this;
005e9dd6          uint32_t i = ((uint32_t)arg2);
005e9dd9          uint32_t ecx_1 = ((uint32_t)this);
005e9de1          *(uint16_t*)((char*)this_2 + 0x14) = arg2;
005e9de5          arg4 = ecx_1;
005e9de5          
005e9de8          if (i < (i + ecx_1))
005e9de8          {
005e9e34              do
005e9e34              {
005e9df2                  int16_t* eax_10 = (*(uint32_t*)((char*)this_2 + 4) + (i * 6));
005e9df5                  int32_t ecx_2;
005e9df5                  ecx_2 = 0;
005e9df7                  int32_t j_1 = 3;
005e9e04                  int32_t j;
005e9e04                  
005e9e04                  do
005e9e04                  {
005e9dfd                      if (*(uint16_t*)eax_10 != 0xffff)
005e9dff                          ecx_2 += 1;
005e9dff                      
005e9e02                      eax_10 = &eax_10[1];
005e9e03                      j = j_1;
005e9e03                      j_1 -= 1;
005e9e04                  } while (j != 1);
005e9e0f                  uint32_t eax_14 = (((uint32_t)edi_1) * 6);
005e9e11                  *(uint8_t*)(eax_14 + *(uint32_t*)((char*)this_2 + 0x10)) = 0;
005e9e18                  *(uint8_t*)((eax_14 + *(uint32_t*)((char*)this_2 + 0x10)) + 1) = ecx_2;
005e9e1f                  D3DXMesh::CMeshStatus<uint16_t,1,65535>::PrependElement(this_2, edi_1);
005e9e2b                  edi_1 += 1;
005e9e2f                  i = ((uint32_t)(edi_1 + arg2));
005e9e34              } while (i < (((uint32_t)*(uint16_t*)((char*)this_2 + 0x14)) + arg4));
005e9e34              
005e9e36              ecx_1 = arg4;
005e9de8          }
005e9de8          
005e9e39          int32_t s = *(uint32_t*)((char*)this_2 + 0x20);
005e9e39          
005e9e3f          if (s != 0)
005e9e3f          {
005e9e47              __builtin_memset(s, 0, (ecx_1 << 2));
005e9e49              *(uint32_t*)((char*)this_2 + 0x1c) = 0;
005e9e3f          }
005e9d65      }
005e9d65      else
005e9d65      {
005e9d71          void* eax_4 = operator new((((uint32_t)*(uint16_t*)((char*)this_2 + 0x18)) * 6));
005e9d79          *(uint32_t*)((char*)this_2 + 0x10) = eax_4;
005e9d79          
005e9d7c          if (eax_4 == 0)
005e9d7c          {
005e9d9c              result = 0x8007000e;
005e9da3              operator delete(*(uint32_t*)((char*)this_2 + 0x10));
005e9d7c          }
005e9d7c          else
005e9d7c          {
005e9d82              if (arg4 == 0)
005e9d82                  goto label_5e9db2;
005e9d82              
005e9d8c              void* eax_7 = operator new((((uint32_t)*(uint16_t*)((char*)this_2 + 0x18)) << 2));
005e9d94              *(uint32_t*)((char*)this_2 + 0x20) = eax_7;
005e9d94              
005e9d97              if (eax_7 != 0)
005e9d97                  goto label_5e9db2;
005e9d97              
005e9d9c              result = 0x8007000e;
005e9da3              operator delete(*(uint32_t*)((char*)this_2 + 0x10));
005e9d7c          }
005e9d65      }
005e9d65      
005e9daf      return result;
005e9d53  }


005e9e51  void __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::MarkAsProcessed(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this, uint16_t arg2)

005e9e51  {
005e9e63      uint16_t eax = (arg2 - *(uint16_t*)((char*)this + 0x14));
005e9e67      int32_t edi;
005e9e67      int32_t var_10 = edi;
005e9e68      uint32_t edi_1 = ((uint32_t)eax);
005e9e6e      *(uint8_t*)(*(uint32_t*)((char*)this + 0x10) + (edi_1 * 6)) = 1;
005e9e75      D3DXMesh::CMeshStatus<uint16_t,1,65535>::RemoveElement(this, eax);
005e9e84      int16_t* ebx = (*(uint32_t*)((char*)this + 4) + (((uint32_t)arg2) * 6));
005e9e87      arg2 = 3;
005e9eba      int32_t i;
005e9eba      
005e9eba      do
005e9eba      {
005e9e8e          int32_t ecx_2;
005e9e8e          ecx_2 = *(uint16_t*)ebx;
005e9e8e          
005e9e96          if ((ecx_2 != 0xffff && *(uint8_t*)(*(uint32_t*)((char*)this + 0x10) + ((((uint32_t)ecx_2) - ((uint32_t)*(uint16_t*)((char*)this + 0x14))) * 6)) == 0))
005e9eb0              D3DXMesh::CMeshStatus<uint16_t,1,65535>::DecrementCount(this, ecx_2);
005e9eb0          
005e9eb6          ebx = &ebx[1];
005e9eb7          i = arg2;
005e9eb7          arg2 -= 1;
005e9eba      } while (i != 1);
005e9ebc      int32_t esi_1 = *(uint32_t*)((char*)this + 0x20);
005e9ebc      
005e9ec1      if (esi_1 != 0)
005e9ec3          *(uint32_t*)(esi_1 + (edi_1 << 2)) = 0xffffffff;
005e9e51  }


005e9ece  long __thiscall D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::Init(D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this, uint32_t arg2, uint32_t arg3, bool arg4)

005e9ece  {
005e9ed3      D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this_1 = this;
005e9ed5      int32_t edi;
005e9ed5      int32_t var_10 = edi;
005e9ed6      char* edi_1 = nullptr;
005e9edd      int32_t result = 0;
005e9edd      
005e9ee0      if (*(uint32_t*)((char*)this + 0x18) != 0)
005e9ee0      {
005e9f2c      label_5e9f2c:
005e9f2c          uint32_t eax_9 = arg2;
005e9f2f          uint32_t ecx_3 = arg3;
005e9f35          *(uint32_t*)((char*)this + 8) = 0xffffffff;
005e9f38          *(uint32_t*)((char*)this + 0xc) = 0xffffffff;
005e9f3b          *(uint32_t*)((char*)this + 0x10) = 0xffffffff;
005e9f3e          *(uint32_t*)((char*)this + 0x14) = 0xffffffff;
005e9f46          *(uint32_t*)((char*)this + 0x1c) = eax_9;
005e9f49          *(uint32_t*)((char*)this + 0x20) = ecx_3;
005e9f4c          arg2 = eax_9;
005e9f4c          
005e9f4f          if (eax_9 < (eax_9 + ecx_3))
005e9f4f          {
005e9f55              arg4 = 0;
005e9f58              uint32_t ebx_2 = (eax_9 * 0xc);
005e9f58              
005e9f9f              do
005e9f9f              {
005e9f60                  ecx_3 = 0;
005e9f60                  
005e9f70                  for (int32_t j = 0; j < 3; j += 1)
005e9f70                  {
005e9f68                      if (*(uint32_t*)((*(uint32_t*)((char*)this + 4) + ebx_2) + (j << 2)) != 0xffffffff)
005e9f6a                          ecx_3 += 1;
005e9f70                  }
005e9f70                  
005e9f78                  edi_1[*(uint32_t*)((char*)this + 0x18)] = 0;
005e9f7f                  edi_1[(*(uint32_t*)((char*)this + 0x18) + 1)] = ecx_3;
005e9f85                  D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::PrependElement(this, arg4);
005e9f8d                  arg2 += 1;
005e9f93                  ebx_2 += 0xc;
005e9f96                  edi_1 = &edi_1[0xc];
005e9f99                  arg4 += 1;
005e9f9f              } while (arg2 < (*(uint32_t*)((char*)this + 0x1c) + arg3));
005e9f9f              
005e9fa1              ecx_3 = arg3;
005e9f4f          }
005e9f4f          
005e9fa5          int32_t s = *(uint32_t*)((char*)this + 0x2c);
005e9fa5          
005e9faa          if (s != 0)
005e9faa          {
005e9fb2              __builtin_memset(s, 0, (ecx_3 << 2));
005e9fb4              *(uint32_t*)((char*)this + 0x28) = 0;
005e9faa          }
005e9ee0      }
005e9ee0      else
005e9ee0      {
005e9eec          void* eax_4 = operator new((*(uint32_t*)((char*)this + 0x24) * 0xc));
005e9ef4          *(uint32_t*)((char*)this + 0x18) = eax_4;
005e9ef4          
005e9ef7          if (eax_4 == 0)
005e9ef7          {
005e9f16              result = 0x8007000e;
005e9f1d              operator delete(*(uint32_t*)((char*)this + 0x18));
005e9ef7          }
005e9ef7          else
005e9ef7          {
005e9efd              if (arg4 == 0)
005e9efd                  goto label_5e9f2c;
005e9efd              
005e9f06              void* eax_7 = operator new((*(uint32_t*)((char*)this + 0x24) << 2));
005e9f0e              *(uint32_t*)((char*)this + 0x2c) = eax_7;
005e9f0e              
005e9f11              if (eax_7 != 0)
005e9f11                  goto label_5e9f2c;
005e9f11              
005e9f16              result = 0x8007000e;
005e9f1d              operator delete(*(uint32_t*)((char*)this + 0x18));
005e9ef7          }
005e9ee0      }
005e9ee0      
005e9f29      return result;
005e9ece  }


005e9fbc  void __thiscall D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::MarkAsProcessed(D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this, uint32_t arg2)

005e9fbc  {
005e9fc2      uint32_t ebx = arg2;
005e9fc6      int32_t edi;
005e9fc6      int32_t var_10 = edi;
005e9fce      uint32_t edi_2 = (ebx - *(uint32_t*)((char*)this + 0x1c));
005e9fd4      *(uint8_t*)(*(uint32_t*)((char*)this + 0x18) + (edi_2 * 0xc)) = 1;
005e9fdb      D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::RemoveElement(this, edi_2);
005e9fe3      arg2 = 0;
005e9fea      int32_t ebx_1 = (*(uint32_t*)((char*)this + 4) + (ebx * 0xc));
005e9fea      
005ea018      do
005ea018      {
005e9ff0          uint32_t ecx_3 = *(uint32_t*)(ebx_1 + (arg2 << 2));
005e9ff0          
005e9ff6          if ((ecx_3 != 0xffffffff && *(uint8_t*)(*(uint32_t*)((char*)this + 0x18) + ((ecx_3 - *(uint32_t*)((char*)this + 0x1c)) * 0xc)) == 0))
005ea00c              D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::DecrementCount(this, ecx_3);
005ea00c          
005ea011          arg2 += 1;
005ea018      } while (arg2 < 3);
005ea018      
005ea01a      int32_t esi_1 = *(uint32_t*)((char*)this + 0x2c);
005ea01a      
005ea01f      if (esi_1 != 0)
005ea021          *(uint32_t*)(esi_1 + (edi_2 << 2)) = 0xffffffff;
005e9fbc  }


005ea02c  uint16_t __thiscall D3DXMesh::CMeshStatus<uint16_t,1,65535>::IFindNextFace(D3DXMesh::CMeshStatus<uint16_t,1,65535>* this, uint16_t arg2)

005ea02c  {
005ea038      uint32_t var_8 = 0;
005ea03e      int32_t edi;
005ea03e      int32_t var_2c = edi;
005ea041      int32_t ebx = *(uint32_t*)((char*)this + 4);
005ea04a      int16_t var_14 = 3;
005ea051      int16_t var_c = -1;
005ea058      int16_t* var_10 = (ebx + (((uint32_t)arg2) * 6));
005ea128      uint32_t eax_4;
005ea128      
005ea128      do
005ea128      {
005ea05e          eax_4 = ((uint32_t)*(uint16_t*)var_10);
005ea065          arg2 = eax_4;
005ea065          
005ea068          if (eax_4 != 0xffff)
005ea068          {
005ea075              uint32_t esi_1 = ((uint32_t)eax_4);
005ea075              
005ea083              if (*(uint8_t*)(*(uint32_t*)((char*)this + 0x10) + ((esi_1 - ((uint32_t)*(uint16_t*)((char*)this + 0x14))) * 6)) == 0)
005ea083              {
005ea08e                  uint32_t eax_7 = D3DXMesh::CMeshStatus<uint16_t,1,65535>::CUnprocessedNeighbors(this, arg2);
005ea093                  int32_t ecx_2 = 0xffff;
005ea098                  arg2 = 0xffff;
005ea09b                  int32_t i_1 = 3;
005ea0a8                  uint16_t* esi_2 = (ebx + (esi_1 * 6));
005ea0e7                  int32_t i;
005ea0e7                  
005ea0e7                  do
005ea0e7                  {
005ea0ab                      uint32_t eax_8;
005ea0ab                      eax_8 = *(uint16_t*)esi_2;
005ea0ab                      
005ea0b2                      if ((eax_8 != 0xffff && *(uint8_t*)(*(uint32_t*)((char*)this + 0x10) + ((((uint32_t)eax_8) - ((uint32_t)*(uint16_t*)((char*)this + 0x14))) * 6)) == 0))
005ea0b2                      {
005ea0d1                          eax_8 = D3DXMesh::CMeshStatus<uint16_t,1,65535>::CUnprocessedNeighbors(this, *(uint16_t*)esi_2);
005ea0d1                          
005ea0da                          if (eax_8 < arg2)
005ea0dc                              arg2 = eax_8;
005ea0dc                          
005ea0df                          ecx_2 = arg2;
005ea0b2                      }
005ea0b2                      
005ea0e3                      esi_2 = &esi_2[1];
005ea0e4                      i = i_1;
005ea0e4                      i_1 -= 1;
005ea0e7                  } while (i != 1);
005ea0e7                  
005ea0ee                  if (ecx_2 == 0xffff)
005ea0ee                  {
005ea0f0                      arg2 = 0;
005ea0f4                      ecx_2 = 0;
005ea0ee                  }
005ea0ee                  
005ea0fe                  int16_t var_1c;
005ea0fe                  
005ea0fe                  if (eax_7 < var_c)
005ea0fe                  {
005ea103                      var_14 = var_8;
005ea106                      var_c = eax_7;
005ea119                      var_1c = ecx_2;
005ea0fe                  }
005ea0fe                  else if ((eax_7 == var_c && ecx_2 < var_1c))
005ea111                  {
005ea116                      var_14 = var_8;
005ea119                      var_1c = ecx_2;
005ea111                  }
005ea083              }
005ea068          }
005ea068          
005ea11c          var_8 += 1;
005ea11f          var_10 = &var_10[1];
005ea128      } while (var_8 < 3);
005ea128      
005ea12e      eax_4 = var_14;
005ea136      return eax_4;
005ea02c  }


005ea139  uint32_t __thiscall D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::IFindNextFace(D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* this, uint32_t arg2)

005ea139  {
005ea141      uint32_t edx = arg2;
005ea144      uint32_t var_10 = 0xffffffff;
005ea148      arg2 = 0;
005ea14d      int32_t ebx = *(uint32_t*)((char*)this + 4);
005ea157      int32_t edi;
005ea157      int32_t var_2c = edi;
005ea158      uint32_t result = 3;
005ea158      
005ea203      do
005ea203      {
005ea168          int32_t esi_1 = *(uint32_t*)((ebx + (edx * 0xc)) + (arg2 << 2));
005ea168          
005ea16e          if (esi_1 != 0xffffffff)
005ea16e          {
005ea177              int32_t edi_1 = *(uint32_t*)((char*)this + 0x18);
005ea181              char* edx_4 = (edi_1 + ((esi_1 - *(uint32_t*)((char*)this + 0x1c)) * 0xc));
005ea181              
005ea187              if (*(uint8_t*)edx_4 == 0)
005ea187              {
005ea189                  uint32_t eax_5 = ((uint32_t)edx_4[1]);
005ea190                  uint32_t eax_6 = 0xffffffff;
005ea193                  int32_t j = 0;
005ea19a                  uint32_t var_c_1 = 0xffffffff;
005ea19a                  
005ea1d0                  do
005ea1d0                  {
005ea1a3                      int32_t edx_7 = *(uint32_t*)((ebx + (esi_1 * 0xc)) + (j << 2));
005ea1a3                      
005ea1a9                      if (edx_7 != 0xffffffff)
005ea1a9                      {
005ea1b1                          void* edx_9 = (edi_1 + ((edx_7 - *(uint32_t*)((char*)this + 0x1c)) * 0xc));
005ea1b7                          eax_6 = var_c_1;
005ea1b7                          
005ea1ba                          if (*(uint8_t*)edx_9 == 0)
005ea1ba                          {
005ea1bc                              uint32_t edx_10 = ((uint32_t)*(uint8_t*)((char*)edx_9 + 1));
005ea1bc                              
005ea1c2                              if (edx_10 < eax_6)
005ea1c2                              {
005ea1c4                                  eax_6 = edx_10;
005ea1c6                                  var_c_1 = eax_6;
005ea1c2                              }
005ea1ba                          }
005ea1a9                      }
005ea1a9                      
005ea1c9                      j += 1;
005ea1d0                  } while (j < 3);
005ea1d0                  
005ea1d5                  if (eax_6 == 0xffffffff)
005ea1d7                      eax_6 = 0;
005ea1d7                  
005ea1df                  uint32_t var_18;
005ea1df                  
005ea1df                  if (eax_5 < var_10)
005ea1df                  {
005ea1e4                      result = arg2;
005ea1e7                      var_10 = eax_5;
005ea1f9                      var_18 = eax_6;
005ea1df                  }
005ea1df                  else if ((eax_5 == var_10 && eax_6 < var_18))
005ea1f1                  {
005ea1f6                      result = arg2;
005ea1f9                      var_18 = eax_6;
005ea1f1                  }
005ea187              }
005ea16e          }
005ea16e          
005ea1fc          arg2 += 1;
005ea203      } while (arg2 < 3);
005ea203      
005ea210      return result;
005ea139  }


005ea213  unsigned long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Release()

005ea213  {
005ea218      int32_t edi;
005ea218      int32_t var_8 = edi;
005ea21c      int32_t* eax = *(uint32_t*)((char*)arg_4 + 0x270);
005ea21c      
005ea224      if (eax != 0)
005ea229          return *(uint32_t*)(*(uint32_t*)eax + 8)(eax);
005ea229      
005ea234      int32_t ecx_1 = *(uint32_t*)((char*)arg_4 + 0x26c);
005ea23d      *(uint32_t*)((char*)arg_4 + 0x26c) = (ecx_1 - 1);
005ea23d      
005ea23f      if (ecx_1 == 1)
005ea23f      {
005ea243          D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::~GXTri3Mesh<uint16_t,1,65535>(arg_4);
005ea249          operator delete(arg_4);
005ea23f      }
005ea23f      
005ea24f      return (ecx_1 - 1);
005ea213  }


005ea257  unsigned long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Release()

005ea257  {
005ea25c      int32_t edi;
005ea25c      int32_t var_8 = edi;
005ea260      int32_t* eax = *(uint32_t*)((char*)arg_4 + 0x270);
005ea260      
005ea268      if (eax != 0)
005ea26d          return *(uint32_t*)(*(uint32_t*)eax + 8)(eax);
005ea26d      
005ea278      int32_t ecx_1 = *(uint32_t*)((char*)arg_4 + 0x26c);
005ea281      *(uint32_t*)((char*)arg_4 + 0x26c) = (ecx_1 - 1);
005ea281      
005ea283      if (ecx_1 == 1)
005ea283      {
005ea287          D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::~GXTri3Mesh<uint32_t,0,4294967295>(arg_4);
005ea28d          operator delete(arg_4);
005ea283      }
005ea283      
005ea293      return (ecx_1 - 1);
005ea257  }


005ea29b  void __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GXTri3Mesh<uint16_t,1,65535>(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, struct IDirect3DDevice9* arg2, struct _D3DVERTEXELEMENT9 const* arg3, unsigned long arg4)

005ea29b  {
005ea2a0      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this_1 = this;
005ea2a4      int32_t ebx;
005ea2a4      int32_t var_c = ebx;
005ea2a5      int32_t esi;
005ea2a5      int32_t var_10 = esi;
005ea2a8      int32_t edi;
005ea2a8      int32_t var_14 = edi;
005ea2ae      *(uint32_t*)((char*)this + 0x214) = arg4;
005ea2bb      *(uint32_t*)this = 0x7ec2d8;
005ea2c1      *(uint32_t*)((char*)this + 0x218) = 4;
005ea2cb      *(uint32_t*)((char*)this + 0x22c) = 0;
005ea2d1      *(uint32_t*)((char*)this + 0x234) = 0;
005ea2d7      __builtin_memset(((char*)this + 0x23c), 0, 0x30);
005ea31f      *(uint32_t*)((char*)this + 0x26c) = 1;
005ea329      *(uint32_t*)((char*)this + 0x270) = 0;
005ea32f      *(uint32_t*)((char*)this + 0x230) = arg2;
005ea335      D3DXMesh::CopyDecls(((char*)this + 0xc), arg3);
005ea341      *(uint32_t*)((char*)this + 0x238) = _D3DXGetDeclVertexSize@8(((char*)this + 0xc), 0);
005ea34e      *(uint32_t*)((char*)this + 8) = 0;
005ea34e      
005ea358      if (D3DXMesh::D3DXFVFFromDeclaratorEx(((char*)this + 0xc), ((char*)this + 4), 1) < 0)
005ea35a          *(uint32_t*)((char*)this + 4) = 0;
005ea35a      
005ea35d      unsigned long ecx = *(uint32_t*)((char*)this + 0x214);
005ea366      *(uint32_t*)((char*)this + 0x21c) = 0;
005ea36c      *(uint32_t*)((char*)this + 0x224) = 0;
005ea36c      
005ea372      if ((*(uint8_t*)((char*)ecx)[1] & 2) != 0)
005ea374          *(uint32_t*)((char*)this + 0x21c) = 1;
005ea374      
005ea381      if ((*(uint8_t*)((char*)ecx)[1] & 1) != 0)
005ea383          *(uint32_t*)((char*)this + 0x21c) = 2;
005ea383      
005ea393      if ((*(uint8_t*)((char*)ecx)[1] & 4) != 0)
005ea395          *(uint32_t*)((char*)this + 0x224) = 8;
005ea395      
005ea39e      unsigned long temp1 = (ecx & 2);
005ea39e      
005ea3a2      if (temp1 != 0)
005ea3a4          *(uint32_t*)((char*)this + 0x224) |= 0x20;
005ea3a4      
005ea3ae      void* temp2 = (ecx & 4);
005ea3ae      
005ea3b2      if (temp2 != 0)
005ea3b4          *(uint32_t*)((char*)this + 0x224) |= 0x40;
005ea3b4      
005ea3be      void* temp3 = (ecx & 8);
005ea3be      
005ea3c6      if (temp3 != 0)
005ea3c8          *(uint32_t*)((char*)this + 0x224) |= 0x80;
005ea3c8      
005ea3d1      int32_t temp4 = (ecx & 0x4000);
005ea3d1      
005ea3d8      if (temp4 != 0)
005ea3da          *(uint8_t*)((char*)this + 0x225) |= 1;
005ea3da      
005ea3e4      if ((*(uint8_t*)((char*)ecx)[1] & 8) != 0)
005ea3e6          *(uint8_t*)((char*)this + 0x225) |= 2;
005ea3e6      
005ea3f3      if ((ecx & 0x10000) != 0)
005ea3f5          *(uint32_t*)((char*)this + 0x224) |= 0x10;
005ea3f5      
005ea405      *(uint32_t*)((char*)this + 0x220) = 0;
005ea407      *(uint32_t*)((char*)this + 0x228) = 0;
005ea407      
005ea40d      if ((ecx & 0x20) != 0)
005ea40f          *(uint32_t*)((char*)this + 0x220) = 1;
005ea40f      
005ea418      if ((ecx & 0x10) != 0)
005ea41a          *(uint32_t*)((char*)this + 0x220) = 2;
005ea41a      
005ea423      if ((ecx & 0x40) != 0)
005ea425          *(uint32_t*)((char*)this + 0x228) = 8;
005ea425      
005ea42e      if (temp1 != 0)
005ea430          *(uint32_t*)((char*)this + 0x228) |= 0x20;
005ea430      
005ea43a      if (temp2 != 0)
005ea43c          *(uint32_t*)((char*)this + 0x228) |= 0x40;
005ea43c      
005ea446      if (temp3 != 0)
005ea448          *(uint32_t*)((char*)this + 0x228) |= 0x80;
005ea448      
005ea451      if (temp4 != 0)
005ea453          *(uint8_t*)((char*)this + 0x229) |= 1;
005ea453      
005ea45c      if ((0x80 & ecx) != 0)
005ea45e          *(uint8_t*)((char*)this + 0x229) |= 2;
005ea45e      
005ea467      if (*(uint8_t*)((char*)ecx)[1] < 0)
005ea469          *(uint32_t*)((char*)this + 0x228) |= 0x10;
005ea469      
005ea473      if ((*(uint8_t*)((char*)ecx)[1] & 0x10) != 0)
005ea475          *(uint32_t*)((char*)this + 0x218) |= 0x20;
005ea475      
005ea47c      int32_t* eax_6 = *(uint32_t*)((char*)this + 0x230);
005ea485      *(uint32_t*)(*(uint32_t*)eax_6 + 4)(eax_6);
005ea488      int32_t* eax_7 = *(uint32_t*)((char*)this + 0x230);
005ea498      *(uint32_t*)(*(uint32_t*)eax_7 + 0x18)(eax_7, ((char*)this + 0x22c));
005ea29b  }


005ea4a4  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::ConvertAdjacencyToPointReps(unsigned long const* arg1, unsigned long* arg2)

005ea4a4  {
005ea4ad      unsigned long const* esi = arg1;
005ea4b4      void var_40;
005ea4b4      ??0?$CFaceListIter@G$00$0PPPP@@D3DXMesh@@QAE@PAV?$GXTri3Mesh@G$00$0PPPP@@1@@Z(&var_40, esi);
005ea4b9      int32_t ecx_1 = esi[0x94];
005ea4c4      arg1 = nullptr;
005ea4c4      
005ea4d8      if (((arg2 == 0 || s == 0) || (*(uint8_t*)((char*)esi + 0x215) & 4) != 0))
005ea4da          arg2 = 0x8876086c;
005ea4d8      else
005ea4d8      {
005ea4e7          int32_t edi;
005ea4e7          int32_t var_60_1 = edi;
005ea4e8          int32_t edi_1 = esi[0x99];
005ea4f4          void* eax_3 = operator new((edi_1 * 6));
005ea4fe          void* eax_4;
005ea4fe          
005ea4fe          if (eax_3 == 0)
005ea512              eax_4 = nullptr;
005ea4fe          else
005ea4fe          {
005ea509              `vector constructor iterator'(eax_3, 6, edi_1, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005ea50e              eax_4 = eax_3;
005ea4fe          }
005ea4fe          
005ea514          int16_t* ecx_3 = nullptr;
005ea518          esi[0x94] = eax_4;
005ea518          
005ea51e          if (eax_4 != 0)
005ea51e          {
005ea52c              void* eax_5 = arg2;
005ea52f              int32_t i = 0;
005ea52f              
005ea537              if (esi[0x99] > 0)
005ea537              {
005ea575                  do
005ea575                  {
005ea539                      void* ebx_1;
005ea539                      ebx_1 = *(uint16_t*)eax_5;
005ea542                      *(uint16_t*)((char*)ecx_3 + esi[0x94]) = ebx_1;
005ea54f                      ebx_1 = *(uint16_t*)((char*)eax_5 + 4);
005ea552                      *(uint16_t*)(((char*)ecx_3 + esi[0x94]) + 2) = ebx_1;
005ea560                      ebx_1 = *(uint16_t*)((char*)eax_5 + 8);
005ea563                      eax_5 += 0xc;
005ea566                      *(uint16_t*)(((char*)ecx_3 + esi[0x94]) + 4) = ebx_1;
005ea56b                      i += 1;
005ea56c                      ecx_3 = &ecx_3[3];
005ea575                  } while (i < esi[0x99]);
005ea537              }
005ea537              
005ea580              int32_t ecx_5 = (esi[0x8f] << 2);
005ea592              __builtin_memset(__builtin_memset(s, 0xffffffff, ((ecx_5 >> 2) << 2)), 0xff, (ecx_5 & 3));
005ea59c              long eax_8 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(esi, &arg1, 0x10);
005ea5a5              arg2 = eax_8;
005ea5a5              
005ea5a8              if (eax_8 >= 0)
005ea5a8              {
005ea5b1                  esi[0x93] = arg1;
005ea5b7                  int32_t eax_10 = esi[0x98];
005ea5bf                  int32_t var_18_1;
005ea5bf                  void* eax_11;
005ea5bf                  
005ea5bf                  if (eax_10 != 0)
005ea5bf                  {
005ea5e5                      var_18_1 = eax_10;
005ea5e8                      eax_11 = esi[0x97];
005ea5bf                  }
005ea5bf                  else
005ea5bf                  {
005ea5c7                      int32_t var_4c_1 = esi[0x99];
005ea5d0                      var_18_1 = 1;
005ea5d7                      void var_54;
005ea5d7                      eax_11 = &var_54;
005ea5da                      int32_t var_50_1 = 0;
005ea5dd                      int32_t var_48_1 = 0;
005ea5e0                      int32_t var_44_1 = esi[0x8f];
005ea5bf                  }
005ea5bf                  
005ea5f1                  int32_t var_14_1 = 0;
005ea5f1                  
005ea5f4                  if (var_18_1 <= 0)
005ea5f4                  {
005ea6e8                  label_5ea6e8:
005ea6e8                      int32_t i_1 = 0;
005ea6e8                      
005ea6f0                      if (esi[0x8f] > 0)
005ea6f0                      {
005ea706                          do
005ea706                          {
005ea6f5                              int32_t* ecx_18 = (s + (i_1 << 2));
005ea6f5                              
005ea6fb                              if (*(uint32_t*)ecx_18 == 0xffffffff)
005ea6fd                                  *(uint32_t*)ecx_18 = i_1;
005ea6fd                              
005ea6ff                              i_1 += 1;
005ea706                          } while (i_1 < esi[0x8f]);
005ea6f0                      }
005ea5f4                  }
005ea5f4                  else
005ea5f4                  {
005ea5fa                      void* edi_7 = ((char*)eax_11 + 4);
005ea5fd                      void* var_20_1 = edi_7;
005ea5fd                      
005ea600                      while (true)
005ea600                      {
005ea600                          int32_t eax_12 = *(uint32_t*)edi_7;
005ea605                          int32_t edx_5 = (*(uint32_t*)((char*)edi_7 + 4) + eax_12);
005ea609                          int32_t var_1c_1 = edx_5;
005ea60c                          int32_t var_c_1 = eax_12;
005ea60c                          
005ea60f                          if (eax_12 < edx_5)
005ea60f                          {
005ea618                              int32_t ecx_11 = (eax_12 * 6);
005ea61a                              int32_t var_10_1 = ecx_11;
005ea620                          label_5ea620:
005ea620                              void* eax_14 = ((char*)arg1 + ecx_11);
005ea622                              int32_t var_8_1 = 0;
005ea622                              
005ea62f                              while (true)
005ea62f                              {
005ea62f                                  void* eax_15;
005ea62f                                  eax_15 = *(uint16_t*)((char*)eax_14 + (var_8_1 << 1));
005ea62f                                  
005ea637                                  if (eax_15 != 0xffff)
005ea637                                  {
005ea63c                                      uint32_t edi_9 = ((uint32_t)eax_15);
005ea63c                                      
005ea643                                      if (*(uint32_t*)(s + (edi_9 << 2)) == 0xffffffff)
005ea643                                      {
005ea645                                          int32_t i_2 = 0;
005ea64f                                          D3DXMesh::CFaceListIter<uint16_t,1,65535>::Init(&var_40, var_c_1, eax_15, 0);
005ea64f                                          
005ea69e                                          do
005ea69e                                          {
005ea65a                                              int16_t var_3c;
005ea65a                                              
005ea65a                                              if (var_3c == 0xffff)
005ea65a                                              {
005ea6a9                                                  edx_5 = var_1c_1;
005ea6ac                                                  ecx_11 = var_10_1;
005ea6ac                                                  goto label_5ea6af;
005ea65a                                              }
005ea65a                                              
005ea65f                                              uint16_t eax_16 = D3DXMesh::CFaceListIter<uint16_t,1,65535>::GetNextFace(&var_40);
005ea66b                                              char var_30;
005ea66b                                              int16_t edx_6;
005ea66b                                              int16_t var_3a;
005ea66b                                              
005ea66b                                              if (var_30 == 0)
005ea67c                                                  edx_6 = ((int16_t)(((int64_t)(((uint32_t)var_3a) + 1)) % 3));
005ea66b                                              else
005ea66d                                                  edx_6 = var_3a;
005ea694                                              i_2 += 1;
005ea69b                                              *(uint32_t*)(s + (((uint32_t)*(uint16_t*)((char*)arg1 + (((((uint32_t)eax_16) * 3) + ((uint32_t)edx_6)) << 1))) << 2)) = edi_9;
005ea69e                                          } while (i_2 <= 0x2710);
005ea69e                                          
005ea6a0                                          arg2 = 0x88760b55;
005ea65a                                          break;
005ea643                                      }
005ea637                                  }
005ea637                                  
005ea6af                              label_5ea6af:
005ea6af                                  var_8_1 += 1;
005ea6af                                  
005ea6b6                                  if (var_8_1 >= 3)
005ea6b6                                  {
005ea6bc                                      var_c_1 += 1;
005ea6bf                                      ecx_11 += 6;
005ea6c5                                      var_10_1 = ecx_11;
005ea6c5                                      
005ea6c8                                      if (var_c_1 < edx_5)
005ea6c8                                          goto label_5ea620;
005ea6c8                                      
005ea6ce                                      edi_7 = var_20_1;
005ea6ce                                      goto label_5ea6d1;
005ea6b6                                  }
005ea62f                              }
005ea62f                              
005ea6b6                              break;
005ea60f                          }
005ea60f                          
005ea6d1                      label_5ea6d1:
005ea6d1                          var_14_1 += 1;
005ea6d7                          edi_7 += 0x14;
005ea6dd                          var_20_1 = edi_7;
005ea6dd                          
005ea6e0                          if (var_14_1 >= var_18_1)
005ea6e0                              goto label_5ea6e8;
005ea600                      }
005ea5f4                  }
005ea5a8              }
005ea51e          }
005ea51e          else
005ea520              arg2 = 0x8007000e;
005ea520          
005ea70e          if (arg1 != 0)
005ea70e          {
005ea710              int32_t* eax_26 = esi[0x92];
005ea719              *(uint32_t*)(*(uint32_t*)eax_26 + 0x30)(eax_26);
005ea70e          }
005ea4d8      }
005ea4d8      
005ea71c      void* __saved_ebx_2 = esi[0x94];
005ea722      esi[0x93] = 0;
005ea729      operator delete(__saved_ebx_2);
005ea732      esi[0x94] = ecx_1;
005ea73d      return arg2;
005ea4a4  }


005ea740  void __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GXTri3Mesh<uint32_t,0,4294967295>(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, struct IDirect3DDevice9* arg2, struct _D3DVERTEXELEMENT9 const* arg3, unsigned long arg4)

005ea740  {
005ea745      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_1 = this;
005ea749      int32_t ebx;
005ea749      int32_t var_c = ebx;
005ea74a      int32_t esi;
005ea74a      int32_t var_10 = esi;
005ea74d      int32_t edi;
005ea74d      int32_t var_14 = edi;
005ea753      *(uint32_t*)((char*)this + 0x214) = arg4;
005ea760      *(uint32_t*)this = 0x7ec350;
005ea766      *(uint32_t*)((char*)this + 0x218) = 4;
005ea770      *(uint32_t*)((char*)this + 0x22c) = 0;
005ea776      *(uint32_t*)((char*)this + 0x234) = 0;
005ea77c      __builtin_memset(((char*)this + 0x23c), 0, 0x30);
005ea7c4      *(uint32_t*)((char*)this + 0x26c) = 1;
005ea7ce      *(uint32_t*)((char*)this + 0x270) = 0;
005ea7d4      *(uint32_t*)((char*)this + 0x230) = arg2;
005ea7da      D3DXMesh::CopyDecls(((char*)this + 0xc), arg3);
005ea7e6      *(uint32_t*)((char*)this + 0x238) = _D3DXGetDeclVertexSize@8(((char*)this + 0xc), 0);
005ea7f3      *(uint32_t*)((char*)this + 8) = 0;
005ea7f3      
005ea7fd      if (D3DXMesh::D3DXFVFFromDeclaratorEx(((char*)this + 0xc), ((char*)this + 4), 1) < 0)
005ea7ff          *(uint32_t*)((char*)this + 4) = 0;
005ea7ff      
005ea802      unsigned long ecx = *(uint32_t*)((char*)this + 0x214);
005ea80b      *(uint32_t*)((char*)this + 0x21c) = 0;
005ea811      *(uint32_t*)((char*)this + 0x224) = 0;
005ea811      
005ea817      if ((*(uint8_t*)((char*)ecx)[1] & 2) != 0)
005ea819          *(uint32_t*)((char*)this + 0x21c) = 1;
005ea819      
005ea826      if ((*(uint8_t*)((char*)ecx)[1] & 1) != 0)
005ea828          *(uint32_t*)((char*)this + 0x21c) = 2;
005ea828      
005ea838      if ((*(uint8_t*)((char*)ecx)[1] & 4) != 0)
005ea83a          *(uint32_t*)((char*)this + 0x224) = 8;
005ea83a      
005ea843      unsigned long temp1 = (ecx & 2);
005ea843      
005ea847      if (temp1 != 0)
005ea849          *(uint32_t*)((char*)this + 0x224) |= 0x20;
005ea849      
005ea853      void* temp2 = (ecx & 4);
005ea853      
005ea857      if (temp2 != 0)
005ea859          *(uint32_t*)((char*)this + 0x224) |= 0x40;
005ea859      
005ea863      void* temp3 = (ecx & 8);
005ea863      
005ea86b      if (temp3 != 0)
005ea86d          *(uint32_t*)((char*)this + 0x224) |= 0x80;
005ea86d      
005ea876      int32_t temp4 = (ecx & 0x4000);
005ea876      
005ea87d      if (temp4 != 0)
005ea87f          *(uint8_t*)((char*)this + 0x225) |= 1;
005ea87f      
005ea889      if ((*(uint8_t*)((char*)ecx)[1] & 8) != 0)
005ea88b          *(uint8_t*)((char*)this + 0x225) |= 2;
005ea88b      
005ea898      if ((ecx & 0x10000) != 0)
005ea89a          *(uint32_t*)((char*)this + 0x224) |= 0x10;
005ea89a      
005ea8aa      *(uint32_t*)((char*)this + 0x220) = 0;
005ea8ac      *(uint32_t*)((char*)this + 0x228) = 0;
005ea8ac      
005ea8b2      if ((ecx & 0x20) != 0)
005ea8b4          *(uint32_t*)((char*)this + 0x220) = 1;
005ea8b4      
005ea8bd      if ((ecx & 0x10) != 0)
005ea8bf          *(uint32_t*)((char*)this + 0x220) = 2;
005ea8bf      
005ea8c8      if ((ecx & 0x40) != 0)
005ea8ca          *(uint32_t*)((char*)this + 0x228) = 8;
005ea8ca      
005ea8d3      if (temp1 != 0)
005ea8d5          *(uint32_t*)((char*)this + 0x228) |= 0x20;
005ea8d5      
005ea8df      if (temp2 != 0)
005ea8e1          *(uint32_t*)((char*)this + 0x228) |= 0x40;
005ea8e1      
005ea8eb      if (temp3 != 0)
005ea8ed          *(uint32_t*)((char*)this + 0x228) |= 0x80;
005ea8ed      
005ea8f6      if (temp4 != 0)
005ea8f8          *(uint8_t*)((char*)this + 0x229) |= 1;
005ea8f8      
005ea901      if ((0x80 & ecx) != 0)
005ea903          *(uint8_t*)((char*)this + 0x229) |= 2;
005ea903      
005ea90c      if (*(uint8_t*)((char*)ecx)[1] < 0)
005ea90e          *(uint32_t*)((char*)this + 0x228) |= 0x10;
005ea90e      
005ea918      if ((*(uint8_t*)((char*)ecx)[1] & 0x10) != 0)
005ea91a          *(uint32_t*)((char*)this + 0x218) |= 0x20;
005ea91a      
005ea921      int32_t* eax_6 = *(uint32_t*)((char*)this + 0x230);
005ea92a      *(uint32_t*)(*(uint32_t*)eax_6 + 4)(eax_6);
005ea92d      int32_t* eax_7 = *(uint32_t*)((char*)this + 0x230);
005ea93d      *(uint32_t*)(*(uint32_t*)eax_7 + 0x18)(eax_7, ((char*)this + 0x22c));
005ea740  }


005ea949  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::CloneMesh(unsigned long arg1, struct _D3DVERTEXELEMENT9 const* arg2, struct IDirect3DDevice9* arg3, struct ID3DXMesh** arg4)

005ea949  {
005ea94e      int32_t ecx;
005ea94e      int32_t var_8 = ecx;
005ea94f      int32_t var_c = ecx;
005ea954      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* ebx = nullptr;
005ea959      unsigned long esi = arg1;
005ea95c      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* var_8_1 = nullptr;
005ea95f      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* var_c_1 = nullptr;
005ea95f      
005ea965      if (arg3 == 0)
005ea96a          arg3 = (esi + 0xc);
005ea96a      
005ea978      if (D3DXMesh::BValidMeshDecl(arg3, nullptr) == 0)
005ea97a          return 0x8876086c;
005ea97a      
005ea98b      int32_t edi;
005ea98b      int32_t var_18_1 = edi;
005ea98c      long result;
005ea98c      
005ea98c      if ((arg2 & 0xfffe2000) != 0)
005ea9ca          result = 0x8876086c;
005ea98c      else
005ea98c      {
005ea991          void* eax_5 = (arg2 & 0x1000);
005ea996          arg1 = eax_5;
005ea996          
005ea999          if (eax_5 == 0)
005ea999          {
005ea9b9              if ((arg1 == 0 || arg4 == *(uint32_t*)(esi + 0x230)))
005ea9b1                  goto label_5ea9bb;
005ea9b1              
005ea9ca              result = 0x8876086c;
005ea999          }
005ea999          else if ((D3DXMesh::BIdenticalDecls(arg3, (esi + 0xc)) == 0 || (arg1 != 0 && arg4 != *(uint32_t*)(esi + 0x230))))
005ea9ca              result = 0x8876086c;
005ea9b9          else
005ea9b9          {
005ea9bb          label_5ea9bb:
005ea9bb              int16_t eax_8 = ((int16_t)*(uint32_t*)(esi + 0x214));
005ea9bb              
005ea9c8              if (((*(uint8_t*)((char*)eax_8)[1] & 4) != 0 || (eax_8 & 0x40) != 0))
005ea9ca                  result = 0x8876086c;
005ea9c8              else
005ea9c8              {
005ea9d8                  struct IDirect3DVertexBuffer9* eax_14;
005ea9d8                  
005ea9d8                  if ((arg2 & 1) != 0)
005ea9d8                  {
005ea9df                      void* eax_9 = operator new(0x27c);
005ea9df                      
005ea9e7                      if (eax_9 == 0)
005ea9fc                          var_8_1 = nullptr;
005ea9e7                      else
005ea9f7                          var_8_1 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GXTri3Mesh<uint32_t,0,4294967295>(eax_9, arg4, arg3, arg2);
005ea9f7                      
005eaa04                      if (var_8_1 == 0)
005eaa9d                          result = 0x8007000e;
005eaa04                      else
005eaa04                      {
005eaa14                          result = ?CloneHelper32@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV12@@Z(esi, var_8_1);
005eaa14                          
005eaa18                          if (result < 0)
005eaa18                              goto label_5eab23;
005eaa18                          
005eaa22                          if (arg1 != 0)
005eaa22                          {
005eaa24                              *(uint32_t*)(esi + 0x218) |= 0x20;
005eaa36                              *(uint32_t*)((char*)var_8_1 + 0x234) = *(uint32_t*)(esi + 0x234);
005eaa3c                              int32_t* eax_13 = *(uint32_t*)(esi + 0x234);
005eaa41                              *(uint32_t*)(*(uint32_t*)eax_13 + 4)(eax_13);
005eaa22                          }
005eaa22                          
005eaa44                          D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* ecx_6 = var_8_1;
005eaa47                          eax_14 = *(uint32_t*)((char*)ecx_6 + 0x234);
005eaa4d                          var_8_1 = nullptr;
005eaa51                          var_c_1 = ecx_6;
005eaae3                      label_5eaae3:
005eaae3                          
005eaae7                          if (arg1 != 0)
005eab00                              *(uint32_t*)arg_14 = var_c_1;
005eaae7                          else
005eaae7                          {
005eaaef                              long result_1;
005eaaef                              int80_t st0_1;
005eaaef                              result_1 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::CloneVertexBuffer(esi, arg3, eax_14);
005eaaf4                              result = result_1;
005eaaf4                              
005eaaf8                              if (result < 0)
005eaaf8                                  goto label_5eab0c;
005eaaf8                              
005eab00                              *(uint32_t*)arg_14 = var_c_1;
005eaae7                          }
005eaa04                      }
005ea9d8                  }
005ea9d8                  else if ((*(uint32_t*)(esi + 0x264) > 0xffff || *(uint32_t*)(esi + 0x23c) > 0xffff))
005eaa70                  {
005eab04                      result = 0x8876086c;
005eab0c                  label_5eab0c:
005eab0c                      
005eab0e                      if (var_c_1 != 0)
005eab0e                      {
005eab13                          *(uint32_t*)(*(uint32_t*)var_c_1 + 8)(var_c_1);
005eab16                      label_5eab16:
005eab16                          
005eab18                          if (ebx != 0)
005eab18                          {
005eab1d                              *(uint32_t*)(*(uint32_t*)ebx + 8)(ebx);
005eab23                          label_5eab23:
005eab23                              
005eab25                              if (var_8_1 != 0)
005eab2a                                  *(uint32_t*)(*(uint32_t*)var_8_1 + 8)(var_8_1);
005eab18                          }
005eab0e                      }
005eaa70                  }
005eaa70                  else
005eaa70                  {
005eaa7b                      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* eax_15 = operator new(0x27c);
005eaa7b                      
005eaa83                      if (eax_15 == 0)
005eaa97                          ebx = nullptr;
005eaa83                      else
005eaa93                          ebx = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GXTri3Mesh<uint16_t,1,65535>(eax_15, arg4, arg3, arg2);
005eaa93                      
005eaa9b                      if (ebx != 0)
005eaa9b                      {
005eaaaf                          result = ?CloneHelper16@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV?$GXTri3Mesh@G$00$0PPPP@@2@@Z(esi, ebx);
005eaaaf                          
005eaab3                          if (result < 0)
005eaab3                              goto label_5eab16;
005eaab3                          
005eaab9                          if (arg1 != 0)
005eaab9                          {
005eaabb                              *(uint32_t*)(esi + 0x218) |= 0x20;
005eaaca                              *(uint32_t*)((char*)ebx + 0x234) = *(uint32_t*)(esi + 0x234);
005eaad0                              int32_t* eax_19 = *(uint32_t*)(esi + 0x234);
005eaad5                              *(uint32_t*)(*(uint32_t*)eax_19 + 4)(eax_19);
005eaab9                          }
005eaab9                          
005eaad8                          eax_14 = *(uint32_t*)((char*)ebx + 0x234);
005eaade                          var_c_1 = ebx;
005eaae1                          ebx = nullptr;
005eaae1                          goto label_5eaae3;
005eaa9b                      }
005eaa9b                      
005eaa9d                      result = 0x8007000e;
005eaa70                  }
005ea9c8              }
005ea9b9          }
005ea98c      }
005ea98c      
005eab33      return result;
005ea949  }


005eab36  long __thiscall ?CloneHelper16@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV?$GXTri3Mesh@G$00$0PPPP@@2@@Z(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg1, D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg2)

005eab36  {
005eab48      int32_t edi;
005eab48      int32_t var_24 = edi;
005eab49      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* edi_1 = arg2;
005eab4c      int32_t* eax = ((char*)edi_1 + 0x218);
005eab54      int32_t esi = 0;
005eab5f      int32_t var_14 = 0;
005eab62      *(uint32_t*)eax = (((*(uint32_t*)((char*)arg1 + 0x218) ^ *(uint32_t*)eax) & 0x20) ^ *(uint32_t*)((char*)arg1 + 0x218));
005eab72      int32_t var_18 = 0;
005eab75      long result_1 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Resize(edi_1, *(uint32_t*)((char*)arg1 + 0x264), *(uint32_t*)((char*)arg1 + 0x23c));
005eab7c      long result = result_1;
005eab7c      
005eab7f      if (result_1 >= 0)
005eab7f      {
005eab8c          long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(edi_1, &var_18, 0);
005eab93          result = result_2;
005eab93          
005eab96          if (result_2 >= 0)
005eab96          {
005eaba4              long result_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg1, &var_14, 0x10);
005eabab              result = result_3;
005eabab              
005eabae              if (result_3 >= 0)
005eabae              {
005eabbb                  if ((*(uint8_t*)((char*)arg1 + 0x218) & 4) != 0)
005eabbb                  {
005eabcf                      int32_t ecx_8 = (*(uint32_t*)((char*)arg1 + 0x264) << 2);
005eabd7                      int32_t esi_2;
005eabd7                      int32_t edi_3;
005eabd7                      edi_3 = __builtin_memcpy(*(uint32_t*)((char*)edi_1 + 0x254), *(uint32_t*)((char*)arg1 + 0x254), ((ecx_8 >> 2) << 2));
005eabde                      __builtin_memcpy(edi_3, esi_2, (ecx_8 & 3));
005eabe0                      edi_1 = arg2;
005eabe3                      esi = 0;
005eabbb                  }
005eabbb                  
005eabec                  if ((*(uint8_t*)((char*)arg1 + 0x218) & 8) != 0)
005eabec                  {
005eac00                      int32_t ecx_13 = (*(uint32_t*)((char*)arg1 + 0x264) << 1);
005eac07                      int32_t esi_4;
005eac07                      int32_t edi_5;
005eac07                      edi_5 = __builtin_memcpy(*(uint32_t*)((char*)edi_1 + 0x258), *(uint32_t*)((char*)arg1 + 0x258), ((ecx_13 >> 2) << 2));
005eac0e                      __builtin_memcpy(edi_5, esi_4, (ecx_13 & 3));
005eac10                      edi_1 = arg2;
005eac13                      esi = 0;
005eabec                  }
005eabec                  
005eac1b                  if (*(uint32_t*)((char*)arg1 + 0x25c) == 0)
005eac1b                  {
005eac81                  label_5eac81:
005eac81                      int32_t i = 0;
005eac81                      
005eac84                      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eac84                      {
005eac86                          int32_t var_10_1 = 0;
005eac86                          
005eaccb                          do
005eaccb                          {
005eac8f                              int32_t ecx_25 = (esi + var_18);
005eac95                              int32_t edx_2 = (var_10_1 + var_14);
005eac95                              
005eacb6                              for (int32_t j = 0; j < 3; j += 1)
005eacb6                              {
005eac9d                                  if (*(uint32_t*)(edx_2 + (j << 2)) == 0xffffffff)
005eacac                                      *(uint16_t*)(ecx_25 + (j << 1)) = 0xffff;
005eac9d                                  else
005eac9d                                  {
005eac9f                                      edi_1 = *(uint16_t*)(edx_2 + (j << 2));
005eaca3                                      *(uint16_t*)(ecx_25 + (j << 1)) = edi_1;
005eaca7                                      edi_1 = arg2;
005eac9d                                  }
005eacb6                              }
005eacb6                              
005eacb8                              i += 1;
005eacbe                              var_10_1 += 0xc;
005eacc2                              esi += 6;
005eaccb                          } while (i < *(uint32_t*)((char*)arg1 + 0x264));
005eac84                      }
005eac84                      
005eacd6                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0)
005eacd6                      {
005eacde                          int32_t i_1 = 0;
005eacde                          
005eace1                          if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eace1                          {
005eace3                              int32_t var_10_2 = 0;
005eace6                              arg2 = nullptr;
005eace6                              
005ead2f                              do
005ead2f                              {
005eacf5                                  void* eax_13 = (*(uint32_t*)((char*)edi_1 + 0x250) + arg2);
005eacf8                                  int32_t ecx_27 = (*(uint32_t*)((char*)arg1 + 0x250) + var_10_2);
005eacf8                                  
005ead19                                  for (int32_t j_1 = 0; j_1 < 3; j_1 += 1)
005ead19                                  {
005ead01                                      if (*(uint32_t*)(ecx_27 + (j_1 << 2)) == 0xffffffff)
005ead0f                                          *(uint16_t*)((char*)eax_13 + (j_1 << 1)) = 0xffff;
005ead01                                      else
005ead01                                      {
005ead03                                          esi = *(uint16_t*)(ecx_27 + (j_1 << 2));
005ead07                                          *(uint16_t*)((char*)eax_13 + (j_1 << 1)) = esi;
005ead01                                      }
005ead19                                  }
005ead19                                  
005ead1b                                  i_1 += 1;
005ead21                                  arg2 += 6;
005ead25                                  var_10_2 += 0xc;
005ead2f                              } while (i_1 < *(uint32_t*)((char*)arg1 + 0x264));
005eace1                          }
005eacd6                      }
005eac1b                  }
005eac1b                  else
005eac1b                  {
005eac2a                      void* eax_6 = operator new((*(uint32_t*)((char*)arg1 + 0x260) * 0x14));
005eac32                      *(uint32_t*)((char*)edi_1 + 0x25c) = eax_6;
005eac32                      
005eac38                      if (eax_6 != 0)
005eac38                      {
005eac55                          int32_t ecx_20 = (*(uint32_t*)((char*)arg1 + 0x260) * 0x14);
005eac5f                          int32_t esi_6;
005eac5f                          int32_t edi_7;
005eac5f                          edi_7 = __builtin_memcpy(eax_6, *(uint32_t*)((char*)arg1 + 0x25c), ((ecx_20 >> 2) << 2));
005eac66                          __builtin_memcpy(edi_7, esi_6, (ecx_20 & 3));
005eac71                          *(uint32_t*)((char*)arg2 + 0x260) = *(uint32_t*)((char*)arg1 + 0x260);
005eac77                          edi_1 = arg2;
005eac79                          esi = 0;
005eac79                          goto label_5eac81;
005eac38                      }
005eac38                      
005eac3a                      result = 0x8007000e;
005eac1b                  }
005eabae              }
005eab96          }
005eab7f      }
005eab7f      
005ead34      if (var_14 != 0)
005ead34      {
005ead36          int32_t* ebx_1 = *(uint32_t*)((char*)arg1 + 0x248);
005ead3f          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005ead34      }
005ead34      
005ead45      if (var_18 != 0)
005ead45      {
005ead47          int32_t* edi_8 = *(uint32_t*)((char*)edi_1 + 0x248);
005ead50          *(uint32_t*)(*(uint32_t*)edi_8 + 0x30)(edi_8);
005ead45      }
005ead45      
005ead5a      return result;
005eab36  }


005ead5d  long __thiscall ?CloneHelper32@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV12@@Z(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg1, D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg2)

005ead5d  {
005ead6f      int32_t edi;
005ead6f      int32_t var_20 = edi;
005ead70      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* edi_1 = arg2;
005ead73      int32_t* eax = ((char*)edi_1 + 0x218);
005ead86      int32_t var_c = 0;
005ead89      *(uint32_t*)eax = (((*(uint32_t*)((char*)arg1 + 0x218) ^ *(uint32_t*)eax) & 0x20) ^ *(uint32_t*)((char*)arg1 + 0x218));
005ead99      void* var_10 = nullptr;
005ead9c      long result_1 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Resize(edi_1, *(uint32_t*)((char*)arg1 + 0x264), *(uint32_t*)((char*)arg1 + 0x23c));
005eada3      long result = result_1;
005eada3      
005eada6      if (result_1 >= 0)
005eada6      {
005eadb3          long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(edi_1, &var_10, 0);
005eadba          result = result_2;
005eadba          
005eadbd          if (result_2 >= 0)
005eadbd          {
005eadcb              long result_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg1, &var_c, 0x10);
005eadd2              result = result_3;
005eadd2              
005eadd5              if (result_3 >= 0)
005eadd5              {
005eade2                  if ((*(uint8_t*)((char*)arg1 + 0x218) & 4) != 0)
005eade2                  {
005eadf6                      int32_t ecx_8 = (*(uint32_t*)((char*)arg1 + 0x264) << 2);
005eadfe                      int32_t esi_2;
005eadfe                      int32_t edi_3;
005eadfe                      edi_3 = __builtin_memcpy(*(uint32_t*)((char*)edi_1 + 0x254), *(uint32_t*)((char*)arg1 + 0x254), ((ecx_8 >> 2) << 2));
005eae05                      __builtin_memcpy(edi_3, esi_2, (ecx_8 & 3));
005eae07                      edi_1 = arg2;
005eade2                  }
005eade2                  
005eae11                  if ((*(uint8_t*)((char*)arg1 + 0x218) & 8) != 0)
005eae11                  {
005eae25                      int32_t ecx_13 = (*(uint32_t*)((char*)arg1 + 0x264) << 1);
005eae2c                      int32_t esi_4;
005eae2c                      int32_t edi_5;
005eae2c                      edi_5 = __builtin_memcpy(*(uint32_t*)((char*)edi_1 + 0x258), *(uint32_t*)((char*)arg1 + 0x258), ((ecx_13 >> 2) << 2));
005eae33                      __builtin_memcpy(edi_5, esi_4, (ecx_13 & 3));
005eae35                      edi_1 = arg2;
005eae11                  }
005eae11                  
005eae3f                  if (*(uint32_t*)((char*)arg1 + 0x25c) == 0)
005eae3f                  {
005eae9d                  label_5eae9d:
005eae9d                      int32_t eax_9 = 0;
005eaea5                      arg2 = nullptr;
005eaea5                      
005eaea8                      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eaea8                      {
005eaee3                          do
005eaee3                          {
005eaeb0                              int32_t* ecx_26 = ((char*)var_10 + eax_9);
005eaeb4                              int32_t* edx_3 = ((var_c + eax_9) - ecx_26);
005eaeb6                              int32_t j_2 = 3;
005eaed2                              int32_t j;
005eaed2                              
005eaed2                              do
005eaed2                              {
005eaebd                                  int32_t esi_7 = *(uint32_t*)((char*)edx_3 + ecx_26);
005eaebd                                  
005eaec3                                  if (esi_7 == 0xffffffff)
005eaec9                                      *(uint32_t*)ecx_26 = 0xffffffff;
005eaec3                                  else
005eaec5                                      *(uint32_t*)ecx_26 = esi_7;
005eaec5                                  
005eaecc                                  ecx_26 = &ecx_26[1];
005eaecf                                  j = j_2;
005eaecf                                  j_2 -= 1;
005eaed2                              } while (j != 1);
005eaed4                              arg2 += 1;
005eaeda                              eax_9 += 0xc;
005eaee3                          } while (arg2 < *(uint32_t*)((char*)arg1 + 0x264));
005eaea8                      }
005eaea8                      
005eaeec                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0)
005eaeec                      {
005eaeee                          int32_t esi_8 = 0;
005eaef6                          arg2 = nullptr;
005eaef6                          
005eaef9                          if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eaef9                          {
005eaf3a                              do
005eaf3a                              {
005eaf07                                  int32_t* eax_11 = (*(uint32_t*)((char*)edi_1 + 0x250) + esi_8);
005eaf0b                                  void* ecx_30 = ((*(uint32_t*)((char*)arg1 + 0x250) + esi_8) - eax_11);
005eaf0d                                  int32_t j_3 = 3;
005eaf29                                  int32_t j_1;
005eaf29                                  
005eaf29                                  do
005eaf29                                  {
005eaf14                                      int32_t edx_4 = *(uint32_t*)((char*)eax_11 + ecx_30);
005eaf14                                      
005eaf1a                                      if (edx_4 == 0xffffffff)
005eaf20                                          *(uint32_t*)eax_11 = 0xffffffff;
005eaf1a                                      else
005eaf1c                                          *(uint32_t*)eax_11 = edx_4;
005eaf1c                                      
005eaf23                                      eax_11 = &eax_11[1];
005eaf26                                      j_1 = j_3;
005eaf26                                      j_3 -= 1;
005eaf29                                  } while (j_1 != 1);
005eaf2b                                  arg2 += 1;
005eaf31                                  esi_8 += 0xc;
005eaf3a                              } while (arg2 < *(uint32_t*)((char*)arg1 + 0x264));
005eaef9                          }
005eaeec                      }
005eae3f                  }
005eae3f                  else
005eae3f                  {
005eae4e                      void* eax_6 = operator new((*(uint32_t*)((char*)arg1 + 0x260) * 0x14));
005eae56                      *(uint32_t*)((char*)edi_1 + 0x25c) = eax_6;
005eae56                      
005eae5c                      if (eax_6 != 0)
005eae5c                      {
005eae79                          int32_t ecx_20 = (*(uint32_t*)((char*)arg1 + 0x260) * 0x14);
005eae83                          int32_t esi_6;
005eae83                          int32_t edi_7;
005eae83                          edi_7 = __builtin_memcpy(eax_6, *(uint32_t*)((char*)arg1 + 0x25c), ((ecx_20 >> 2) << 2));
005eae8a                          __builtin_memcpy(edi_7, esi_6, (ecx_20 & 3));
005eae95                          *(uint32_t*)((char*)arg2 + 0x260) = *(uint32_t*)((char*)arg1 + 0x260);
005eae9b                          edi_1 = arg2;
005eae9b                          goto label_5eae9d;
005eae5c                      }
005eae5c                      
005eae5e                      result = 0x8007000e;
005eae3f                  }
005eadd5              }
005eadbd          }
005eada6      }
005eada6      
005eaf40      if (var_c != 0)
005eaf40      {
005eaf42          int32_t* ebx_1 = *(uint32_t*)((char*)arg1 + 0x248);
005eaf4b          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005eaf40      }
005eaf40      
005eaf52      if (var_10 != 0)
005eaf52      {
005eaf54          int32_t* edi_8 = *(uint32_t*)((char*)edi_1 + 0x248);
005eaf5d          *(uint32_t*)(*(uint32_t*)edi_8 + 0x30)(edi_8);
005eaf52      }
005eaf52      
005eaf67      return result;
005ead5d  }


005eaf6a  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::ConvertAdjacencyToPointReps(unsigned long const* arg1, unsigned long* arg2)

005eaf6a  {
005eaf73      unsigned long const* esi = arg1;
005eaf7a      void var_5c;
005eaf7a      ??0?$CFaceListIter@I$0A@$0PPPPPPPP@@D3DXMesh@@QAE@PAV?$GXTri3Mesh@I$0A@$0PPPPPPPP@@1@@Z(&var_5c, esi);
005eaf7f      int32_t ecx_1 = esi[0x94];
005eaf8a      arg1 = nullptr;
005eaf8a      
005eaf9e      if (((arg2 == 0 || s == 0) || (*(uint8_t*)((char*)esi + 0x215) & 4) != 0))
005eafa0          arg2 = 0x8876086c;
005eaf9e      else
005eaf9e      {
005eafad          int32_t edi;
005eafad          int32_t var_68_1 = edi;
005eafae          int32_t edi_1 = esi[0x99];
005eafbb          void* eax_3 = operator new((edi_1 * 0xc));
005eafc5          void* eax_4;
005eafc5          
005eafc5          if (eax_3 == 0)
005eafd9              eax_4 = nullptr;
005eafc5          else
005eafc5          {
005eafd0              `vector constructor iterator'(eax_3, 0xc, edi_1, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005eafd5              eax_4 = eax_3;
005eafc5          }
005eafc5          
005eafdb          unsigned long* ecx_3 = nullptr;
005eafdf          esi[0x94] = eax_4;
005eafdf          
005eafe5          if (eax_4 != 0)
005eafe5          {
005eaff3              unsigned long* eax_5 = arg2;
005eaff6              int32_t i = 0;
005eaff6              
005eaffe              if (esi[0x99] > 0)
005eaffe              {
005eb036                  do
005eb036                  {
005eb008                      *(uint32_t*)((char*)ecx_3 + esi[0x94]) = *(uint32_t*)eax_5;
005eb016                      *(uint32_t*)(((char*)ecx_3 + esi[0x94]) + 4) = eax_5[1];
005eb023                      int32_t ebx_4 = eax_5[2];
005eb025                      eax_5 = &eax_5[3];
005eb028                      *(uint32_t*)(((char*)ecx_3 + esi[0x94]) + 8) = ebx_4;
005eb02c                      i += 1;
005eb02d                      ecx_3 = &ecx_3[3];
005eb036                  } while (i < esi[0x99]);
005eaffe              }
005eaffe              
005eb041              int32_t ecx_5 = (esi[0x8f] << 2);
005eb053              __builtin_memset(__builtin_memset(s, 0xffffffff, ((ecx_5 >> 2) << 2)), 0xff, (ecx_5 & 3));
005eb05d              long eax_8 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(esi, &arg1, 0x10);
005eb066              arg2 = eax_8;
005eb066              
005eb069              if (eax_8 >= 0)
005eb069              {
005eb072                  esi[0x93] = arg1;
005eb078                  int32_t eax_10 = esi[0x98];
005eb080                  int32_t var_18_1;
005eb080                  void* eax_11;
005eb080                  
005eb080                  if (eax_10 != 0)
005eb080                  {
005eb0a6                      var_18_1 = eax_10;
005eb0a9                      eax_11 = esi[0x97];
005eb080                  }
005eb080                  else
005eb080                  {
005eb088                      int32_t var_38_1 = esi[0x99];
005eb091                      var_18_1 = 1;
005eb098                      void var_40;
005eb098                      eax_11 = &var_40;
005eb09b                      int32_t var_3c_1 = 0;
005eb09e                      int32_t var_34_1 = 0;
005eb0a1                      int32_t var_30_1 = esi[0x8f];
005eb080                  }
005eb080                  
005eb0b2                  int32_t var_14_1 = 0;
005eb0b2                  
005eb0b5                  if (var_18_1 <= 0)
005eb0b5                  {
005eb19f                  label_5eb19f:
005eb19f                      int32_t i_1 = 0;
005eb19f                      
005eb1a7                      if (esi[0x8f] > 0)
005eb1a7                      {
005eb1bd                          do
005eb1bd                          {
005eb1ac                              int32_t* ecx_18 = (s + (i_1 << 2));
005eb1ac                              
005eb1b2                              if (*(uint32_t*)ecx_18 == 0xffffffff)
005eb1b4                                  *(uint32_t*)ecx_18 = i_1;
005eb1b4                              
005eb1b6                              i_1 += 1;
005eb1bd                          } while (i_1 < esi[0x8f]);
005eb1a7                      }
005eb0b5                  }
005eb0b5                  else
005eb0b5                  {
005eb0bb                      void* edx_4 = ((char*)eax_11 + 4);
005eb0be                      void* var_24_1 = edx_4;
005eb0be                      
005eb0c1                      while (true)
005eb0c1                      {
005eb0c1                          uint32_t eax_12 = *(uint32_t*)edx_4;
005eb0c6                          int32_t ecx_11 = (*(uint32_t*)((char*)edx_4 + 4) + eax_12);
005eb0ca                          int32_t var_1c_1 = ecx_11;
005eb0cd                          uint32_t var_c_1 = eax_12;
005eb0cd                          
005eb0d0                          if (eax_12 < ecx_11)
005eb0d0                          {
005eb0d9                              int32_t ebx_6 = (eax_12 * 0xc);
005eb0dc                              int32_t var_20_1 = ebx_6;
005eb0e2                          label_5eb0e2:
005eb0e2                              void* eax_14 = ((char*)arg1 + ebx_6);
005eb0e4                              int32_t var_8_1 = 0;
005eb0e4                              
005eb0f1                              while (true)
005eb0f1                              {
005eb0f1                                  uint32_t edi_7 = *(uint32_t*)((char*)eax_14 + (var_8_1 << 2));
005eb0f1                                  
005eb100                                  if ((edi_7 != 0xffffffff && *(uint32_t*)(s + (edi_7 << 2)) == 0xffffffff))
005eb100                                  {
005eb10b                                      D3DXMesh::CFaceListIter<uint32_t,0,4294967295>::Init(&var_5c, var_c_1, edi_7, 0);
005eb10b                                      
005eb158                                      for (int32_t i_2 = 0; i_2 <= 0x2710; )
005eb158                                      {
005eb118                                          int32_t var_54;
005eb118                                          
005eb118                                          if (var_54 == 0xffffffff)
005eb118                                          {
005eb163                                              ecx_11 = var_1c_1;
005eb163                                              goto label_5eb166;
005eb118                                          }
005eb118                                          
005eb11d                                          uint32_t eax_17 = D3DXMesh::CFaceListIter<uint32_t,0,4294967295>::GetNextFace(&var_5c);
005eb128                                          char var_44;
005eb128                                          uint32_t edx_6;
005eb128                                          uint32_t var_50;
005eb128                                          
005eb128                                          if (var_44 == 0)
005eb128                                          {
005eb138                                              edx_6 = (COMBINE(0, (var_50 + 1)) % 3);
005eb13a                                              ebx_6 = var_20_1;
005eb128                                          }
005eb128                                          else
005eb12a                                              edx_6 = var_50;
005eb148                                          i_2 += 1;
005eb155                                          *(uint32_t*)(s + (arg1[((eax_17 * 3) + edx_6)] << 2)) = edi_7;
005eb158                                      }
005eb158                                      
005eb15a                                      arg2 = 0x88760b55;
005eb118                                      break;
005eb100                                  }
005eb100                                  
005eb166                              label_5eb166:
005eb166                                  var_8_1 += 1;
005eb166                                  
005eb16d                                  if (var_8_1 >= 3)
005eb16d                                  {
005eb173                                      var_c_1 += 1;
005eb176                                      ebx_6 += 0xc;
005eb17c                                      var_20_1 = ebx_6;
005eb17c                                      
005eb17f                                      if (var_c_1 < ecx_11)
005eb17f                                          goto label_5eb0e2;
005eb17f                                      
005eb185                                      edx_4 = var_24_1;
005eb185                                      goto label_5eb188;
005eb16d                                  }
005eb0f1                              }
005eb0f1                              
005eb16d                              break;
005eb0d0                          }
005eb0d0                          
005eb188                      label_5eb188:
005eb188                          var_14_1 += 1;
005eb18e                          edx_4 += 0x14;
005eb194                          var_24_1 = edx_4;
005eb194                          
005eb197                          if (var_14_1 >= var_18_1)
005eb197                              goto label_5eb19f;
005eb0c1                      }
005eb0b5                  }
005eb069              }
005eafe5          }
005eafe5          else
005eafe7              arg2 = 0x8007000e;
005eafe7          
005eb1c5          if (arg1 != 0)
005eb1c5          {
005eb1c7              int32_t* eax_25 = esi[0x92];
005eb1d0              *(uint32_t*)(*(uint32_t*)eax_25 + 0x30)(eax_25);
005eb1c5          }
005eaf9e      }
005eaf9e      
005eb1d3      void* __saved_ebx_2 = esi[0x94];
005eb1d9      esi[0x93] = 0;
005eb1e0      operator delete(__saved_ebx_2);
005eb1e9      esi[0x94] = ecx_1;
005eb1f4      return arg2;
005eaf6a  }


005eb1f7  long __stdcall D3DXMesh::Simulate<uint16_t,1,65535>(class D3DXMesh::CSimVertexCache<uint16_t,65535>& arg1, class D3DXMesh::CMeshStatus<uint16_t,1,65535>* arg2, uint32_t* arg3, unsigned long arg4, unsigned long arg5, uint32_t arg6, uint32_t arg7, class D3DXMesh::GXTri3Face<uint16_t>* arg8)

005eb1f7  {
005eb1f9      int32_t __saved_ebp_1;
005eb1f9      int32_t __saved_ebp = __saved_ebp_1;
005eb202      uint32_t eax_1 = (arg4 - arg5);
005eb208      uint32_t var_18 = 0xffffffff;
005eb20c      int32_t var_14 = 0xffffffff;
005eb210      int32_t var_1c = 0xffffffff;
005eb214      int32_t ebx;
005eb214      int32_t var_5c = ebx;
005eb215      int32_t edi;
005eb215      int32_t var_60 = edi;
005eb215      int32_t* esp_1 = &var_60;
005eb21d      int32_t var_8 = 0;
005eb223      uint32_t var_20 = 0xffff;
005eb226      long result_1 = D3DXMesh::CIndexQueue<uint16_t,65535>::Init(arg1);
005eb22d      long result = result_1;
005eb22d      
005eb230      if (result_1 >= 0)
005eb230      {
005eb232          int32_t esi;
005eb232          int32_t var_64 = esi;
005eb236          int32_t var_68_1 = 0;
005eb23f          long result_2 = D3DXMesh::CMeshStatus<uint16_t,1,65535>::Init(arg2, arg6, arg7, false);
005eb23f          void* esp_2 = &var_64;
005eb246          result = result_2;
005eb246          
005eb249          if (result_2 >= 0)
005eb249          {
005eb24b              arg7 = 0;
005eb255          label_5eb255:
005eb255              uint32_t ebx_1 = ((uint32_t)D3DXMesh::CMeshStatus<uint16_t,1,65535>::IFindInitialFace(arg2));
005eb25a              var_18 = ebx_1;
005eb25a              
005eb25d              if (ebx_1 != 0xffff)
005eb25d              {
005eb272                  int16_t* ecx_4 = (*(uint32_t*)((char*)arg2 + 4) + (((uint32_t)ebx_1) * 6));
005eb275                  uint32_t eax_5;
005eb275                  eax_5 = *(uint16_t*)ecx_4;
005eb27b                  uint32_t eax_7;
005eb27b                  
005eb27b                  if (eax_5 != 0xffff)
005eb284                      eax_7 = (((uint32_t)eax_5) - ((uint32_t)*(uint16_t*)((char*)arg2 + 0x14)));
005eb284                  
005eb290                  int32_t var_14_1;
005eb290                  
005eb290                  if ((eax_5 == 0xffff || *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x10) + (eax_7 * 6)) != 0))
005eb290                  {
005eb29b                      ecx_4 = ecx_4[1];
005eb2a2                      uint32_t eax_10;
005eb2a2                      
005eb2a2                      if (ecx_4 != 0xffff)
005eb2ae                          eax_10 = (((uint32_t)ecx_4) - ((uint32_t)*(uint16_t*)((char*)arg2 + 0x14)));
005eb2ae                      
005eb2b7                      if ((ecx_4 == 0xffff || *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x10) + (eax_10 * 6)) != 0))
005eb2c2                          var_14_1 = 0;
005eb2b7                      else
005eb2b9                          var_14_1 = 2;
005eb290                  }
005eb290                  else
005eb292                      var_14_1 = 1;
005eb292                  
005eb2c9                  while (true)
005eb2c9                  {
005eb2c9                      if (var_20 != 0xffff)
005eb2c9                      {
005eb2cb                          int32_t eax_12 = var_14_1;
005eb2ce                          arg4 = 1;
005eb2d5                          uint32_t var_28 = ebx_1;
005eb2d5                          
005eb2f8                          while (true)
005eb2f8                          {
005eb2f8                              int32_t var_24_1 = eax_12;
005eb2fb                              *(uint32_t*)((char*)esp_2 - 4) = arg2;
005eb2ff                              *(uint32_t*)((char*)esp_2 - 8) = &var_28;
005eb303                              void var_38;
005eb303                              *(uint32_t*)((char*)esp_2 - 0xc) = &var_38;
005eb304                              uint32_t* eax_16 = D3DXMesh::CcwCorner<uint16_t,1,65535>();
005eb304                              esp_2 -= 4;
005eb309                              uint32_t ecx_6 = *(uint32_t*)eax_16;
005eb309                              
005eb313                              if (ecx_6 == 0xffff)
005eb313                                  break;
005eb313                              
005eb2ed                              if (*(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x10) + ((((uint32_t)ecx_6) - ((uint32_t)*(uint16_t*)((char*)arg2 + 0x14))) * 6)) != 0)
005eb2ed                                  break;
005eb2ed                              
005eb2ef                              arg4 += 1;
005eb2f2                              eax_12 = eax_16[1];
005eb2f5                              var_28 = ecx_6;
005eb2f8                          }
005eb2f8                          
005eb322                          if (((arg4 + var_8) - 1) > eax_1)
005eb322                          {
005eb338                              if (*(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x10) + ((((uint32_t)var_20) - ((uint32_t)*(uint16_t*)((char*)arg2 + 0x14))) * 6)) == 0)
005eb338                              {
005eb33a                                  ebx_1 = var_20;
005eb340                                  var_18 = ebx_1;
005eb343                                  int32_t var_14_2 = var_1c;
005eb338                              }
005eb338                              
005eb346                              var_20 = 0xffff;
005eb322                          }
005eb2c9                      }
005eb2c9                      
005eb349                      while (true)
005eb349                      {
005eb349                          *(uint32_t*)((char*)esp_2 - 4) = ebx_1;
005eb34c                          D3DXMesh::CMeshStatus<uint16_t,1,65535>::MarkAsProcessed(arg2);
005eb355                          uint32_t eax_25 = (((uint32_t)arg7) + arg6);
005eb35b                          arg7 += 1;
005eb35e                          arg4 = 0;
005eb362                          arg3[ebx_1] = eax_25;
005eb362                          
005eb395                          do
005eb395                          {
005eb374                              *(uint32_t*)((char*)esp_2 - 4) = &*(uint32_t*)((char*)arg5)[3];
005eb37c                              *(uint32_t*)((char*)esp_2 - 8) = ((uint32_t)*(uint16_t*)(((char*)arg8 + (ebx_1 * 6)) + (arg4 << 1)));
005eb37d                              D3DXMesh::CSimVertexCache<uint16_t,65535>::AccessVertex(arg1);
005eb38b                              var_8 += (1 - ((uint32_t)*(uint8_t*)((char*)arg5)[3]));
005eb38e                              arg4 += 1;
005eb395                          } while (arg4 < 3);
005eb395                          
005eb397                          *(uint32_t*)((char*)esp_2 - 4) = arg2;
005eb39b                          *(uint32_t*)((char*)esp_2 - 8) = &var_18;
005eb39f                          void var_40;
005eb39f                          *(uint32_t*)((char*)esp_2 - 0xc) = &var_40;
005eb3a0                          uint32_t* eax_30 = D3DXMesh::CcwCorner<uint16_t,1,65535>();
005eb3aa                          int32_t var_44_1 = eax_30[1];
005eb3ad                          *(uint32_t*)((char*)esp_2 - 8) = arg2;
005eb3b1                          *(uint32_t*)((char*)esp_2 - 0xc) = &var_18;
005eb3b5                          void var_50;
005eb3b5                          *(uint32_t*)((char*)esp_2 - 0x10) = &var_50;
005eb3be                          *(uint32_t*)((char*)esp_2 - 0x10) = D3DXMesh::ClwFaceCorner<uint16_t,1,65535>();
005eb3c2                          void var_58;
005eb3c2                          *(uint32_t*)((char*)esp_2 - 0x14) = &var_58;
005eb3c3                          uint32_t* eax_33 = D3DXMesh::CcwCorner<uint16_t,1,65535>();
005eb3c3                          esp_2 -= 0xc;
005eb3cb                          int32_t var_44_2 = eax_33[1];
005eb3ce                          uint32_t ecx_16 = *(uint32_t*)eax_30;
005eb3d2                          uint32_t ecx_18;
005eb3d2                          
005eb3d2                          if (ecx_16 != 0xffff)
005eb3d2                          {
005eb3db                              ecx_18 = (((uint32_t)ecx_16) - ((uint32_t)*(uint16_t*)((char*)arg2 + 0x14)));
005eb3e7                              *(uint8_t*)((char*)arg4)[3] = 1;
005eb3d2                          }
005eb3d2                          
005eb3eb                          if ((ecx_16 == 0xffff || *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x10) + (ecx_18 * 6)) != 0))
005eb3ed                              *(uint8_t*)((char*)arg4)[3] = 0;
005eb3ed                          
005eb3f1                          uint32_t ecx_22 = *(uint32_t*)eax_33;
005eb3f5                          uint32_t ecx_21;
005eb3f5                          
005eb3f5                          if (ecx_22 != 0xffff)
005eb3fe                              ecx_21 = (((uint32_t)ecx_22) - ((uint32_t)*(uint16_t*)((char*)arg2 + 0x14)));
005eb3fe                          
005eb40a                          if ((ecx_22 == 0xffff || *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x10) + (ecx_21 * 6)) != 0))
005eb410                              ecx_22 = 0;
005eb40a                          else
005eb40c                              ecx_22 = 1;
005eb40c                          
005eb416                          if (*(uint8_t*)((char*)arg4)[3] == 0)
005eb416                          {
005eb445                              if (ecx_22 != 0)
005eb445                              {
005eb47c                                  ebx_1 = *(uint32_t*)eax_33;
005eb47e                                  int32_t eax_41 = eax_33[1];
005eb481                                  var_18 = ebx_1;
005eb484                                  var_14_1 = eax_41;
005eb487                                  break;
005eb445                              }
005eb445                              
005eb447                              ebx_1 = var_20;
005eb44f                              var_18 = ebx_1;
005eb452                              int32_t var_14_4 = var_1c;
005eb455                              var_20 = 0xffff;
005eb455                              
005eb458                              if (ebx_1 == 0xffff)
005eb458                                  goto label_5eb255;
005eb458                              
005eb471                              if (*(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x10) + ((((uint32_t)ebx_1) - ((uint32_t)*(uint16_t*)((char*)arg2 + 0x14))) * 6)) != 0)
005eb471                                  goto label_5eb255;
005eb416                          }
005eb416                          else
005eb416                          {
005eb41f                              if ((ecx_22 != 0 && var_20 == 0xffff))
005eb41f                              {
005eb426                                  var_8 = 0;
005eb42a                                  var_20 = *(uint32_t*)eax_33;
005eb42d                                  var_1c = eax_33[1];
005eb41f                              }
005eb41f                              
005eb433                              ebx_1 = *(uint32_t*)eax_30;
005eb435                              int32_t eax_36 = *(uint32_t*)((char*)eax_30 + 4);
005eb438                              var_18 = ebx_1;
005eb43b                              int32_t var_14_3 = eax_36;
005eb416                          }
005eb349                      }
005eb2c9                  }
005eb25d              }
005eb249          }
005eb249          
005eb25f          *(uint32_t*)esp_2;
005eb25f          esp_1 = ((char*)esp_2 + 4);
005eb230      }
005eb230      
005eb263      *(uint32_t*)esp_1;
005eb263      esp_1[1];
005eb266      return result;
005eb1f7  }


005eb48c  long __stdcall D3DXMesh::Simulate<uint32_t,0,4294967295>(class D3DXMesh::CSimVertexCache<uint32_t,4294967295>& arg1, class D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* arg2, uint32_t* arg3, unsigned long arg4, unsigned long arg5, uint32_t arg6, uint32_t arg7, class D3DXMesh::GXTri3Face<uint32_t>* arg8)

005eb48c  {
005eb48e      int32_t __saved_ebp_1;
005eb48e      int32_t __saved_ebp = __saved_ebp_1;
005eb497      uint32_t eax_1 = (arg4 - arg5);
005eb49d      int32_t ebx;
005eb49d      int32_t var_54 = ebx;
005eb4a1      int32_t edi;
005eb4a1      int32_t var_58 = edi;
005eb4a1      int32_t* esp_1 = &var_58;
005eb4a4      int32_t var_8 = 0;
005eb4a7      uint32_t var_18 = 0xffffffff;
005eb4aa      int32_t var_14 = 0xffffffff;
005eb4ad      int32_t var_1c = 0xffffffff;
005eb4b3      uint32_t var_20 = 0xffffffff;
005eb4b6      long result_1 = D3DXMesh::CIndexQueue<uint32_t,4294967295>::Init(arg1);
005eb4bd      long result = result_1;
005eb4bd      
005eb4c0      if (result_1 >= 0)
005eb4c0      {
005eb4c6          int32_t esi;
005eb4c6          int32_t var_5c = esi;
005eb4ca          int32_t var_60_1 = 0;
005eb4d3          long result_2 = D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::Init(arg2, arg6, arg7, false);
005eb4d3          void* esp_2 = &var_5c;
005eb4da          result = result_2;
005eb4da          
005eb4dd          if (result_2 >= 0)
005eb4dd          {
005eb4e5              arg7 = 0;
005eb4ed              uint32_t edi_1 = D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::IFindInitialFace(arg2);
005eb4ef              bool cond:2_1 = edi_1 != 0xffffffff;
005eb4ef              
005eb6d5              while (true)
005eb6d5              {
005eb6d5                  var_18 = edi_1;
005eb6d5                  
005eb6d8                  if (!(cond:2_1))
005eb6d8                      break;
005eb6d8                  
005eb4fc                  int32_t* ecx_4 = (*(uint32_t*)((char*)arg2 + 4) + (edi_1 * 0xc));
005eb4ff                  int32_t eax_4 = *(uint32_t*)ecx_4;
005eb504                  int32_t eax_5;
005eb504                  
005eb504                  if (eax_4 != 0xffffffff)
005eb506                      eax_5 = (eax_4 - *(uint32_t*)((char*)arg2 + 0x1c));
005eb506                  
005eb513                  int32_t var_14_1;
005eb513                  
005eb513                  if ((eax_4 == 0xffffffff || *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x18) + (eax_5 * 0xc)) != 0))
005eb513                  {
005eb51e                      int32_t eax_7 = ecx_4[1];
005eb524                      int32_t eax_8;
005eb524                      
005eb524                      if (eax_7 != 0xffffffff)
005eb526                          eax_8 = (eax_7 - *(uint32_t*)((char*)arg2 + 0x1c));
005eb526                      
005eb533                      if ((eax_7 == 0xffffffff || *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x18) + (eax_8 * 0xc)) != 0))
005eb53e                          var_14_1 = 0;
005eb533                      else
005eb535                          var_14_1 = 2;
005eb513                  }
005eb513                  else
005eb515                      var_14_1 = 1;
005eb515                  
005eb542              label_5eb542:
005eb542                  
005eb546                  if (var_20 != 0xffffffff)
005eb546                  {
005eb54b                      arg5 = 1;
005eb552                      uint32_t var_28 = edi_1;
005eb555                      int32_t var_24_1 = var_14_1;
005eb555                      
005eb574                      while (true)
005eb574                      {
005eb574                          *(uint32_t*)((char*)esp_2 - 4) = arg2;
005eb578                          *(uint32_t*)((char*)esp_2 - 8) = &var_28;
005eb57c                          void var_30;
005eb57c                          *(uint32_t*)((char*)esp_2 - 0xc) = &var_30;
005eb57d                          uint32_t* eax_14 = D3DXMesh::CcwCorner<uint32_t,0,4294967295>();
005eb57d                          esp_2 -= 4;
005eb582                          uint32_t ecx_6 = *(uint32_t*)eax_14;
005eb587                          int32_t edx_2 = eax_14[1];
005eb587                          
005eb58a                          if (ecx_6 == 0xffffffff)
005eb58a                              break;
005eb58a                          
005eb569                          if (*(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x18) + ((ecx_6 - *(uint32_t*)((char*)arg2 + 0x1c)) * 0xc)) != 0)
005eb569                              break;
005eb569                          
005eb56b                          arg5 += 1;
005eb56e                          var_28 = ecx_6;
005eb571                          int32_t var_24_2 = edx_2;
005eb574                      }
005eb574                      
005eb599                      if (((arg5 + var_8) - 1) > eax_1)
005eb599                      {
005eb5ab                          if (*(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x18) + ((var_20 - *(uint32_t*)((char*)arg2 + 0x1c)) * 0xc)) == 0)
005eb5ab                          {
005eb5ad                              edi_1 = var_20;
005eb5b3                              var_18 = edi_1;
005eb5b6                              int32_t var_14_2 = var_1c;
005eb5ab                          }
005eb5ab                          
005eb5b9                          var_20 = 0xffffffff;
005eb599                      }
005eb546                  }
005eb546                  
005eb5bd                  while (true)
005eb5bd                  {
005eb5bd                      *(uint32_t*)((char*)esp_2 - 4) = edi_1;
005eb5c0                      D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::MarkAsProcessed(arg2);
005eb5cb                      uint32_t ecx_11 = (arg7 + arg6);
005eb5d0                      arg7 += 1;
005eb5d3                      arg3[edi_1] = ecx_11;
005eb5d3                      
005eb600                      for (int32_t i = 0; i < 3; i += 1)
005eb600                      {
005eb5e7                          *(uint32_t*)((char*)esp_2 - 4) = &*(uint32_t*)((char*)arg4)[3];
005eb5e8                          *(uint32_t*)((char*)esp_2 - 8) = *(uint32_t*)(((char*)arg8 + (edi_1 * 0xc)) + (i << 2));
005eb5eb                          D3DXMesh::CSimVertexCache<uint32_t,4294967295>::AccessVertex(arg1);
005eb5f9                          var_8 += (1 - ((uint32_t)*(uint8_t*)((char*)arg4)[3]));
005eb600                      }
005eb600                      
005eb602                      *(uint32_t*)((char*)esp_2 - 4) = arg2;
005eb606                      *(uint32_t*)((char*)esp_2 - 8) = &var_18;
005eb60a                      void var_38;
005eb60a                      *(uint32_t*)((char*)esp_2 - 0xc) = &var_38;
005eb60b                      uint32_t* eax_25 = D3DXMesh::CcwCorner<uint32_t,0,4294967295>();
005eb615                      uint32_t edi_3 = *(uint32_t*)eax_25;
005eb617                      int32_t var_3c_1 = eax_25[1];
005eb61a                      *(uint32_t*)((char*)esp_2 - 8) = arg2;
005eb61e                      *(uint32_t*)((char*)esp_2 - 0xc) = &var_18;
005eb622                      void var_48;
005eb622                      *(uint32_t*)((char*)esp_2 - 0x10) = &var_48;
005eb628                      *(uint32_t*)((char*)esp_2 - 0x10) = D3DXMesh::ClwFaceCorner<uint16_t,1,65535>();
005eb62c                      void var_50;
005eb62c                      *(uint32_t*)((char*)esp_2 - 0x14) = &var_50;
005eb62d                      uint32_t* eax_28 = D3DXMesh::CcwCorner<uint32_t,0,4294967295>();
005eb62d                      esp_2 -= 0xc;
005eb638                      uint32_t ecx_15 = *(uint32_t*)eax_28;
005eb63a                      int32_t var_3c_2 = eax_28[1];
005eb63d                      int32_t edi_4;
005eb63d                      
005eb63d                      if (edi_3 != 0xffffffff)
005eb63f                          edi_4 = (edi_3 - *(uint32_t*)((char*)arg2 + 0x1c));
005eb63f                      
005eb64c                      int32_t edx_3;
005eb64c                      
005eb64c                      if ((edi_3 == 0xffffffff || *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x18) + (edi_4 * 0xc)) != 0))
005eb652                          edx_3 = 0;
005eb64c                      else
005eb64e                          edx_3 = 1;
005eb64e                      
005eb657                      int32_t ecx_16;
005eb657                      
005eb657                      if (ecx_15 != 0xffffffff)
005eb659                          ecx_16 = (ecx_15 - *(uint32_t*)((char*)arg2 + 0x1c));
005eb659                      
005eb666                      if ((ecx_15 == 0xffffffff || *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x18) + (ecx_16 * 0xc)) != 0))
005eb66c                          ecx_15 = 0;
005eb666                      else
005eb668                          ecx_15 = 1;
005eb668                      
005eb670                      if (edx_3 == 0)
005eb670                      {
005eb69d                          if (ecx_15 != 0)
005eb69d                          {
005eb6e8                              edi_1 = *(uint32_t*)eax_28;
005eb6ea                              int32_t eax_37 = eax_28[1];
005eb6ed                              var_18 = edi_1;
005eb6f0                              var_14_1 = eax_37;
005eb6f3                              goto label_5eb542;
005eb69d                          }
005eb69d                          
005eb69f                          edi_1 = var_20;
005eb6a5                          var_20 = 0xffffffff;
005eb6ac                          var_18 = edi_1;
005eb6af                          int32_t var_14_4 = var_1c;
005eb6af                          
005eb6b2                          if ((edi_1 != 0xffffffff && *(uint8_t*)(*(uint32_t*)((char*)arg2 + 0x18) + ((edi_1 - *(uint32_t*)((char*)arg2 + 0x1c)) * 0xc)) == 0))
005eb6c3                              continue;
005eb6c3                          
005eb6d0                          edi_1 = D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::IFindInitialFace(arg2);
005eb6d2                          cond:2_1 = edi_1 != 0xffffffff;
005eb6d2                          break;
005eb670                      }
005eb670                      
005eb67a                      if ((ecx_15 != 0 && var_20 == 0xffffffff))
005eb67a                      {
005eb681                          var_8 = 0;
005eb685                          var_20 = *(uint32_t*)eax_28;
005eb688                          var_1c = eax_28[1];
005eb67a                      }
005eb67a                      
005eb68b                      edi_1 = *(uint32_t*)eax_25;
005eb68d                      int32_t eax_30 = eax_25[1];
005eb690                      var_18 = edi_1;
005eb693                      int32_t var_14_3 = eax_30;
005eb5bd                  }
005eb6d5              }
005eb4dd          }
005eb4dd          
005eb6de          *(uint32_t*)esp_2;
005eb6de          esp_1 = ((char*)esp_2 + 4);
005eb4c0      }
005eb4c0      
005eb6e2      *(uint32_t*)esp_1;
005eb6e2      esp_1[1];
005eb6e5      return result;
005eb48c  }


005eb6f8  long __thiscall ?SGIStripReorder@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV?$CMeshStatus@G$00$0PPPP@@2@PAI1@Z(void* arg1, D3DXMesh::CMeshStatus<uint16_t,1,65535>* arg2, int32_t arg3, int32_t arg4)

005eb6f8  {
005eb701      int32_t ebx = 0;
005eb70a      int32_t edi;
005eb70a      int32_t var_24 = edi;
005eb70b      void* var_14 = arg1;
005eb70e      long result = 0;
005eb711      int32_t i = 0;
005eb711      
005eb714      if (*(uint32_t*)((char*)arg1 + 0x260) > 0)
005eb714      {
005eb71a          D3DXMesh::CMeshStatus<uint16_t,1,65535>* edi_1 = arg2;
005eb71d          int32_t var_c_1 = 0;
005eb71d          
005eb7b1          do
005eb7b1          {
005eb729              void* eax_2 = (*(uint32_t*)((char*)arg1 + 0x25c) + var_c_1);
005eb72e              int32_t esi_1 = *(uint32_t*)((char*)eax_2 + 4);
005eb736              long result_1 = D3DXMesh::CMeshStatus<uint16_t,1,65535>::Init(edi_1, esi_1, ((int16_t)*(uint32_t*)((char*)eax_2 + 8)), false);
005eb73d              result = result_1;
005eb73d              
005eb740              if (result_1 < 0)
005eb802                  return result;
005eb802              
005eb78c              while (true)
005eb78c              {
005eb78c                  D3DXMesh::CMeshStatus<uint16_t,1,65535>* eax_8 = D3DXMesh::CMeshStatus<uint16_t,1,65535>::IFindInitialFace(edi_1);
005eb795                  arg2 = eax_8;
005eb795                  
005eb798                  if (eax_8 == 0xffff)
005eb798                      break;
005eb798                  
005eb748                  uint16_t var_28_1 = arg2;
005eb748                  
005eb763                  while (true)
005eb763                  {
005eb763                      D3DXMesh::CMeshStatus<uint16_t,1,65535>::MarkAsProcessed(edi_1, var_28_1);
005eb76d                      uint16_t eax_6 = D3DXMesh::CMeshStatus<uint16_t,1,65535>::IFindNextFace(edi_1, arg2);
005eb772                      uint32_t ecx_7 = ((uint32_t)arg2);
005eb77c                      int32_t eax_7 = (ebx + esi_1);
005eb77f                      ebx += 1;
005eb785                      *(uint32_t*)(arg3 + (ecx_7 << 2)) = eax_7;
005eb785                      
005eb788                      if (eax_6 == 3)
005eb788                          break;
005eb788                      
005eb759                      uint32_t eax_5 = ((uint32_t)*(uint16_t*)(*(uint32_t*)((char*)edi_1 + 4) + (((ecx_7 * 3) + ((uint32_t)eax_6)) << 1)));
005eb75d                      arg2 = eax_5;
005eb760                      var_28_1 = eax_5;
005eb763                  }
005eb78c              }
005eb78c              
005eb79a              i += 1;
005eb7a3              var_c_1 += 0x14;
005eb7a7              ebx = 0;
005eb7af              arg1 = var_14;
005eb7b1          } while (i < *(uint32_t*)((char*)var_14 + 0x260));
005eb714      }
005eb714      
005eb7ba      int32_t i_1 = 0;
005eb7ba      
005eb7c2      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eb7c2      {
005eb7d2          do
005eb7d2          {
005eb7c4              *(uint32_t*)(arg4 + (i_1 << 2)) = 0xffff;
005eb7cb              i_1 += 1;
005eb7d2          } while (i_1 < *(uint32_t*)((char*)arg1 + 0x264));
005eb7c2      }
005eb7c2      
005eb7d4      int32_t i_2 = 0;
005eb7d4      
005eb7dc      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eb7dc      {
005eb7f9          do
005eb7f9          {
005eb7e1              int32_t edx_2;
005eb7e1              edx_2 = *(uint16_t*)(arg3 + (i_2 << 2));
005eb7e1              
005eb7ea              if (edx_2 != 0xffff)
005eb7ef                  *(uint32_t*)(arg4 + (((uint32_t)edx_2) << 2)) = i_2;
005eb7ef              
005eb7f2              i_2 += 1;
005eb7f9          } while (i_2 < *(uint32_t*)((char*)arg1 + 0x264));
005eb7dc      }
005eb7dc      
005eb802      return result;
005eb6f8  }


005eb805  long __thiscall ?VCacheStripReorder@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV?$CMeshStatus@G$00$0PPPP@@2@PAI1KK@Z(void* arg1, class D3DXMesh::CMeshStatus<uint16_t,1,65535>* arg2, uint32_t* arg3, int32_t arg4, unsigned long arg5, unsigned long arg6)

005eb805  {
005eb80e      unsigned long ebx = arg5;
005eb812      int32_t edi;
005eb812      int32_t var_28 = edi;
005eb813      int32_t edi_1 = 0;
005eb81d      long result = 0;
005eb820      unsigned long var_10 = ebx;
005eb823      void* var_c = nullptr;
005eb826      arg5 = 0;
005eb826      
005eb829      if (*(uint32_t*)((char*)arg1 + 0x260) > 0)
005eb829      {
005eb86a          do
005eb86a          {
005eb837              void* eax_2 = (*(uint32_t*)((char*)arg1 + 0x25c) + edi_1);
005eb84f              void var_1c;
005eb84f              long result_1 = D3DXMesh::Simulate<uint16_t,1,65535>(&var_1c, arg2, arg3, ebx, arg6, *(uint32_t*)((char*)eax_2 + 4), *(uint32_t*)((char*)eax_2 + 8), *(uint32_t*)((char*)arg1 + 0x24c));
005eb856              result = result_1;
005eb856              
005eb859              if (result_1 < 0)
005eb859                  goto label_5eb8b7;
005eb859              
005eb85b              arg5 += 1;
005eb861              edi_1 += 0x14;
005eb86a          } while (arg5 < *(uint32_t*)((char*)arg1 + 0x260));
005eb829      }
005eb829      
005eb86f      uint32_t i = 0;
005eb871      int32_t ecx_1 = 0;
005eb871      
005eb87e      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eb87e      {
005eb88d          do
005eb88d          {
005eb880              ecx_1 += 1;
005eb881              *(uint32_t*)(arg4 + (i << 2)) = 0xffff;
005eb884              i = ((uint32_t)ecx_1);
005eb88d          } while (i < *(uint32_t*)((char*)arg1 + 0x264));
005eb87e      }
005eb87e      
005eb88f      uint32_t i_1 = 0;
005eb891      int32_t ebx_1 = 0;
005eb891      
005eb899      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eb899      {
005eb8b2          do
005eb8b2          {
005eb89e              int32_t ecx_3 = arg3[i_1];
005eb89e              
005eb8a3              if (ecx_3 != 0xffff)
005eb8a5                  *(uint32_t*)(arg4 + (ecx_3 << 2)) = i_1;
005eb8a5              
005eb8a8              ebx_1 += 1;
005eb8a9              i_1 = ((uint32_t)ebx_1);
005eb8b2          } while (i_1 < *(uint32_t*)((char*)arg1 + 0x264));
005eb899      }
005eb899      
005eb8b7  label_5eb8b7:
005eb8b7      operator delete(var_c);
005eb8c4      return result;
005eb805  }


005eb8c7  long __thiscall ?SGIStripReorder@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV?$CMeshStatus@I$0A@$0PPPPPPPP@@2@PAI1@Z(void* arg1, D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* arg2, int32_t arg3, int32_t arg4)

005eb8c7  {
005eb8db      int32_t edi;
005eb8db      int32_t var_20 = edi;
005eb8dc      long result = 0;
005eb8df      int32_t i = 0;
005eb8df      
005eb8e2      if (*(uint32_t*)((char*)arg1 + 0x260) > 0)
005eb8e2      {
005eb8e8          int32_t var_c_1 = 0;
005eb8e8          
005eb96d          do
005eb96d          {
005eb8f4              void* eax_2 = (*(uint32_t*)((char*)arg1 + 0x25c) + var_c_1);
005eb8f9              uint32_t edi_1 = *(uint32_t*)((char*)eax_2 + 4);
005eb902              int32_t var_8_1 = 0;
005eb905              long result_1 = D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::Init(arg2, edi_1, *(uint32_t*)((char*)eax_2 + 8), false);
005eb90c              result = result_1;
005eb90c              
005eb90f              if (result_1 < 0)
005eb9b5                  return result;
005eb9b5              
005eb954              while (true)
005eb954              {
005eb954                  uint32_t esi_1 = D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::IFindInitialFace(arg2);
005eb954                  
005eb959                  if (esi_1 == 0xffffffff)
005eb959                      break;
005eb959                  
005eb917                  D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* ecx_3 = arg2;
005eb917                  
005eb92b                  while (true)
005eb92b                  {
005eb92b                      D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::MarkAsProcessed(ecx_3, esi_1);
005eb934                      uint32_t eax_5 = D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::IFindNextFace(arg2, esi_1);
005eb93f                      int32_t ecx_6 = (var_8_1 + edi_1);
005eb941                      var_8_1 += 1;
005eb947                      *(uint32_t*)(arg3 + (esi_1 << 2)) = ecx_6;
005eb947                      
005eb94a                      if (eax_5 == 3)
005eb94a                          break;
005eb94a                      
005eb91c                      ecx_3 = arg2;
005eb927                      esi_1 = *(uint32_t*)(*(uint32_t*)((char*)ecx_3 + 4) + (((esi_1 * 3) + eax_5) << 2));
005eb92b                  }
005eb954              }
005eb954              
005eb95b              i += 1;
005eb961              var_c_1 += 0x14;
005eb96d          } while (i < *(uint32_t*)((char*)arg1 + 0x260));
005eb8e2      }
005eb8e2      
005eb976      int32_t i_1 = 0;
005eb976      
005eb97e      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eb97e      {
005eb98b          do
005eb98b          {
005eb980              *(uint32_t*)(arg4 + (i_1 << 2)) = 0xffffffff;
005eb984              i_1 += 1;
005eb98b          } while (i_1 < *(uint32_t*)((char*)arg1 + 0x264));
005eb97e      }
005eb97e      
005eb98d      int32_t i_2 = 0;
005eb98d      
005eb995      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eb995      {
005eb9ac          do
005eb9ac          {
005eb99a              int32_t ecx_9 = *(uint32_t*)(arg3 + (i_2 << 2));
005eb99a              
005eb9a0              if (ecx_9 != 0xffffffff)
005eb9a2                  *(uint32_t*)(arg4 + (ecx_9 << 2)) = i_2;
005eb9a2              
005eb9a5              i_2 += 1;
005eb9ac          } while (i_2 < *(uint32_t*)((char*)arg1 + 0x264));
005eb995      }
005eb995      
005eb9b5      return result;
005eb8c7  }


005eb9b8  long __thiscall ?VCacheStripReorder@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV?$CMeshStatus@I$0A@$0PPPPPPPP@@2@PAI1KK@Z(void* arg1, class D3DXMesh::CMeshStatus<uint32_t,0,4294967295>* arg2, uint32_t* arg3, int32_t arg4, unsigned long arg5, unsigned long arg6)

005eb9b8  {
005eb9c1      unsigned long ebx = arg5;
005eb9c5      int32_t edi;
005eb9c5      int32_t var_28 = edi;
005eb9c6      int32_t edi_1 = 0;
005eb9d0      long result = 0;
005eb9d3      unsigned long var_10 = ebx;
005eb9d6      void* var_c = nullptr;
005eb9d9      arg5 = 0;
005eb9d9      
005eb9dc      if (*(uint32_t*)((char*)arg1 + 0x260) > 0)
005eb9dc      {
005eba1d          do
005eba1d          {
005eb9ea              void* eax_2 = (*(uint32_t*)((char*)arg1 + 0x25c) + edi_1);
005eba02              void var_1c;
005eba02              long result_1 = D3DXMesh::Simulate<uint32_t,0,4294967295>(&var_1c, arg2, arg3, ebx, arg6, *(uint32_t*)((char*)eax_2 + 4), *(uint32_t*)((char*)eax_2 + 8), *(uint32_t*)((char*)arg1 + 0x24c));
005eba09              result = result_1;
005eba09              
005eba0c              if (result_1 < 0)
005eba0c                  goto label_5eba5f;
005eba0c              
005eba0e              arg5 += 1;
005eba14              edi_1 += 0x14;
005eba1d          } while (arg5 < *(uint32_t*)((char*)arg1 + 0x260));
005eb9dc      }
005eb9dc      
005eba24      int32_t i = 0;
005eba24      
005eba2c      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eba2c      {
005eba39          do
005eba39          {
005eba2e              *(uint32_t*)(arg4 + (i << 2)) = 0xffffffff;
005eba32              i += 1;
005eba39          } while (i < *(uint32_t*)((char*)arg1 + 0x264));
005eba2c      }
005eba2c      
005eba3b      int32_t i_1 = 0;
005eba3b      
005eba43      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005eba43      {
005eba5a          do
005eba5a          {
005eba48              int32_t ecx_2 = arg3[i_1];
005eba48              
005eba4e              if (ecx_2 != 0xffffffff)
005eba50                  *(uint32_t*)(arg4 + (ecx_2 << 2)) = i_1;
005eba50              
005eba53              i_1 += 1;
005eba5a          } while (i_1 < *(uint32_t*)((char*)arg1 + 0x264));
005eba43      }
005eba43      
005eba5f  label_5eba5f:
005eba5f      operator delete(var_c);
005eba6c      return result;
005eb9b8  }


005eba6f  long __stdcall _D3DXCreateMesh@24(uint32_t arg1, uint32_t arg2, unsigned long arg3, struct _D3DVERTEXELEMENT9* arg4, struct IDirect3DDevice9* arg5, int32_t* arg6)

005eba6f  {
005eba7f      int32_t edi;
005eba7f      int32_t var_10 = edi;
005eba7f      
005eba96      if ((((arg3 & 0xfffe3000) == 0 && (arg5 != 0 && arg6 != 0)) && (D3DXMesh::BValidMeshDecl(arg4, nullptr) != 0 && (arg1 != 0 && arg2 != 0))))
005eba96      {
005ebac1          *(uint32_t*)arg6 = 0;
005ebac7          long result;
005ebac7          D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* esi_2;
005ebac7          
005ebac7          if ((arg3 & 1) != 0)
005ebac7          {
005ebace              void* eax_2 = operator new(0x27c);
005ebace              
005ebad6              if (eax_2 == 0)
005ebaea                  esi_2 = nullptr;
005ebad6              else
005ebae6                  esi_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GXTri3Mesh<uint32_t,0,4294967295>(eax_2, arg5, arg4, arg3);
005ebae6              
005ebaee              if (esi_2 == 0)
005ebaf0                  return 0x8007000e;
005ebaf0              
005ebafd              result = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Resize(esi_2, arg1, arg2);
005ebb46          label_5ebb46:
005ebb46              
005ebb46              if (result >= 0)
005ebb4b                  *(uint32_t*)arg6 = esi_2;
005ebb4b              
005ebb58              return result;
005ebac7          }
005ebac7          
005ebb10          if ((arg1 <= 0xffff && arg2 <= 0xffff))
005ebb10          {
005ebb17              D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* eax_4 = operator new(0x27c);
005ebb17              
005ebb1f              if (eax_4 == 0)
005ebb33                  esi_2 = nullptr;
005ebb1f              else
005ebb2f                  esi_2 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GXTri3Mesh<uint16_t,1,65535>(eax_4, arg5, arg4, arg3);
005ebb2f              
005ebb37              if (esi_2 == 0)
005ebaf0                  return 0x8007000e;
005ebaf0              
005ebb3f              result = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Resize(esi_2, arg1, arg2);
005ebb3f              goto label_5ebb46;
005ebb10          }
005eba96      }
005eba96      
005ebb4f      return 0x8876086c;
005eba6f  }


005ebb5b  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::CloneMesh(unsigned long arg1, struct _D3DVERTEXELEMENT9 const* arg2, struct IDirect3DDevice9* arg3, struct ID3DXMesh** arg4)

005ebb5b  {
005ebb60      int32_t ecx;
005ebb60      int32_t var_8 = ecx;
005ebb61      int32_t var_c = ecx;
005ebb66      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* ebx = nullptr;
005ebb6b      unsigned long esi = arg1;
005ebb6e      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* var_8_1 = nullptr;
005ebb71      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* var_c_1 = nullptr;
005ebb71      
005ebb77      if (arg3 == 0)
005ebb7c          arg3 = (esi + 0xc);
005ebb7c      
005ebb8a      if (D3DXMesh::BValidMeshDecl(arg3, nullptr) == 0)
005ebb8c          return 0x8876086c;
005ebb8c      
005ebb9d      int32_t edi;
005ebb9d      int32_t var_18_1 = edi;
005ebb9e      long result;
005ebb9e      
005ebb9e      if ((arg2 & 0xfffe2000) != 0)
005ebbdc          result = 0x8876086c;
005ebb9e      else
005ebb9e      {
005ebba3          void* eax_5 = (arg2 & 0x1000);
005ebba8          arg1 = eax_5;
005ebba8          
005ebbab          if (eax_5 == 0)
005ebbab          {
005ebbcb              if ((arg1 == 0 || arg4 == *(uint32_t*)(esi + 0x230)))
005ebbc3                  goto label_5ebbcd;
005ebbc3              
005ebbdc              result = 0x8876086c;
005ebbab          }
005ebbab          else if ((D3DXMesh::BIdenticalDecls(arg3, (esi + 0xc)) == 0 || (arg1 != 0 && arg4 != *(uint32_t*)(esi + 0x230))))
005ebbdc              result = 0x8876086c;
005ebbcb          else
005ebbcb          {
005ebbcd          label_5ebbcd:
005ebbcd              int16_t eax_8 = ((int16_t)*(uint32_t*)(esi + 0x214));
005ebbcd              
005ebbda              if (((*(uint8_t*)((char*)eax_8)[1] & 4) != 0 || (eax_8 & 0x40) != 0))
005ebbdc                  result = 0x8876086c;
005ebbda              else
005ebbda              {
005ebbea                  struct IDirect3DVertexBuffer9* eax_14;
005ebbea                  
005ebbea                  if ((arg2 & 1) != 0)
005ebbea                  {
005ebbf1                      void* eax_9 = operator new(0x27c);
005ebbf1                      
005ebbf9                      if (eax_9 == 0)
005ebc0e                          var_8_1 = nullptr;
005ebbf9                      else
005ebc09                          var_8_1 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GXTri3Mesh<uint32_t,0,4294967295>(eax_9, arg4, arg3, arg2);
005ebc09                      
005ebc16                      if (var_8_1 == 0)
005ebcaf                          result = 0x8007000e;
005ebc16                      else
005ebc16                      {
005ebc26                          result = ?CloneHelper32@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV?$GXTri3Mesh@I$0A@$0PPPPPPPP@@2@@Z(esi, var_8_1);
005ebc26                          
005ebc2a                          if (result < 0)
005ebc2a                              goto label_5ebd35;
005ebc2a                          
005ebc34                          if (arg1 != 0)
005ebc34                          {
005ebc36                              *(uint32_t*)(esi + 0x218) |= 0x20;
005ebc48                              *(uint32_t*)((char*)var_8_1 + 0x234) = *(uint32_t*)(esi + 0x234);
005ebc4e                              int32_t* eax_13 = *(uint32_t*)(esi + 0x234);
005ebc53                              *(uint32_t*)(*(uint32_t*)eax_13 + 4)(eax_13);
005ebc34                          }
005ebc34                          
005ebc56                          D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* ecx_6 = var_8_1;
005ebc59                          eax_14 = *(uint32_t*)((char*)ecx_6 + 0x234);
005ebc5f                          var_8_1 = nullptr;
005ebc63                          var_c_1 = ecx_6;
005ebcf5                      label_5ebcf5:
005ebcf5                          
005ebcf9                          if (arg1 != 0)
005ebd12                              *(uint32_t*)arg_14 = var_c_1;
005ebcf9                          else
005ebcf9                          {
005ebd01                              long result_1;
005ebd01                              int80_t st0_1;
005ebd01                              result_1 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::CloneVertexBuffer(esi, arg3, eax_14);
005ebd06                              result = result_1;
005ebd06                              
005ebd0a                              if (result < 0)
005ebd0a                                  goto label_5ebd1e;
005ebd0a                              
005ebd12                              *(uint32_t*)arg_14 = var_c_1;
005ebcf9                          }
005ebc16                      }
005ebbea                  }
005ebbea                  else if ((*(uint32_t*)(esi + 0x264) > 0xffff || *(uint32_t*)(esi + 0x23c) > 0xffff))
005ebc82                  {
005ebd16                      result = 0x8876086c;
005ebd1e                  label_5ebd1e:
005ebd1e                      
005ebd20                      if (var_c_1 != 0)
005ebd20                      {
005ebd25                          *(uint32_t*)(*(uint32_t*)var_c_1 + 8)(var_c_1);
005ebd28                      label_5ebd28:
005ebd28                          
005ebd2a                          if (ebx != 0)
005ebd2a                          {
005ebd2f                              *(uint32_t*)(*(uint32_t*)ebx + 8)(ebx);
005ebd35                          label_5ebd35:
005ebd35                              
005ebd37                              if (var_8_1 != 0)
005ebd3c                                  *(uint32_t*)(*(uint32_t*)var_8_1 + 8)(var_8_1);
005ebd2a                          }
005ebd20                      }
005ebc82                  }
005ebc82                  else
005ebc82                  {
005ebc8d                      D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* eax_15 = operator new(0x27c);
005ebc8d                      
005ebc95                      if (eax_15 == 0)
005ebca9                          ebx = nullptr;
005ebc95                      else
005ebca5                          ebx = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GXTri3Mesh<uint16_t,1,65535>(eax_15, arg4, arg3, arg2);
005ebca5                      
005ebcad                      if (ebx != 0)
005ebcad                      {
005ebcc1                          result = ?CloneHelper16@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV12@@Z(esi, ebx);
005ebcc1                          
005ebcc5                          if (result < 0)
005ebcc5                              goto label_5ebd28;
005ebcc5                          
005ebccb                          if (arg1 != 0)
005ebccb                          {
005ebccd                              *(uint32_t*)(esi + 0x218) |= 0x20;
005ebcdc                              *(uint32_t*)((char*)ebx + 0x234) = *(uint32_t*)(esi + 0x234);
005ebce2                              int32_t* eax_19 = *(uint32_t*)(esi + 0x234);
005ebce7                              *(uint32_t*)(*(uint32_t*)eax_19 + 4)(eax_19);
005ebccb                          }
005ebccb                          
005ebcea                          eax_14 = *(uint32_t*)((char*)ebx + 0x234);
005ebcf0                          var_c_1 = ebx;
005ebcf3                          ebx = nullptr;
005ebcf3                          goto label_5ebcf5;
005ebcad                      }
005ebcad                      
005ebcaf                      result = 0x8007000e;
005ebc82                  }
005ebbda              }
005ebbcb          }
005ebb9e      }
005ebb9e      
005ebd45      return result;
005ebb5b  }


005ebd48  long __thiscall ?CloneHelper16@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV12@@Z(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg1, D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg2)

005ebd48  {
005ebd5a      int32_t edi;
005ebd5a      int32_t var_20 = edi;
005ebd5b      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* edi_1 = arg2;
005ebd5e      int32_t* eax = ((char*)edi_1 + 0x218);
005ebd71      int32_t var_c = 0;
005ebd74      *(uint32_t*)eax = (((*(uint32_t*)((char*)arg1 + 0x218) ^ *(uint32_t*)eax) & 0x20) ^ *(uint32_t*)((char*)arg1 + 0x218));
005ebd84      void* var_10 = nullptr;
005ebd87      long result_1 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Resize(edi_1, *(uint32_t*)((char*)arg1 + 0x264), *(uint32_t*)((char*)arg1 + 0x23c));
005ebd8e      long result = result_1;
005ebd8e      
005ebd91      if (result_1 >= 0)
005ebd91      {
005ebd9e          long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(edi_1, &var_10, 0);
005ebda5          result = result_2;
005ebda5          
005ebda8          if (result_2 >= 0)
005ebda8          {
005ebdb6              long result_3;
005ebdb6              int16_t* edx_1;
005ebdb6              result_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg1, &var_c, 0x10);
005ebdbd              result = result_3;
005ebdbd              
005ebdc0              if (result_3 >= 0)
005ebdc0              {
005ebdcd                  if ((*(uint8_t*)((char*)arg1 + 0x218) & 4) != 0)
005ebdcd                  {
005ebde1                      int32_t ecx_8 = (*(uint32_t*)((char*)arg1 + 0x264) << 2);
005ebde9                      int32_t esi_3;
005ebde9                      int32_t edi_3;
005ebde9                      edi_3 = __builtin_memcpy(*(uint32_t*)((char*)edi_1 + 0x254), *(uint32_t*)((char*)arg1 + 0x254), ((ecx_8 >> 2) << 2));
005ebdf0                      __builtin_memcpy(edi_3, esi_3, (ecx_8 & 3));
005ebdf2                      edi_1 = arg2;
005ebdcd                  }
005ebdcd                  
005ebdfc                  if ((*(uint8_t*)((char*)arg1 + 0x218) & 8) != 0)
005ebdfc                  {
005ebe10                      int32_t ecx_13 = (*(uint32_t*)((char*)arg1 + 0x264) << 1);
005ebe17                      int32_t esi_5;
005ebe17                      int32_t edi_5;
005ebe17                      edi_5 = __builtin_memcpy(*(uint32_t*)((char*)edi_1 + 0x258), *(uint32_t*)((char*)arg1 + 0x258), ((ecx_13 >> 2) << 2));
005ebe1e                      __builtin_memcpy(edi_5, esi_5, (ecx_13 & 3));
005ebe20                      edi_1 = arg2;
005ebdfc                  }
005ebdfc                  
005ebe2a                  if (*(uint32_t*)((char*)arg1 + 0x25c) == 0)
005ebe2a                  {
005ebe88                  label_5ebe88:
005ebe88                      int32_t eax_9 = 0;
005ebe90                      arg2 = nullptr;
005ebe90                      
005ebe93                      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005ebe93                      {
005ebed3                          do
005ebed3                          {
005ebe9b                              int16_t* ecx_26 = ((char*)var_10 + eax_9);
005ebe9f                              edx_1 = ((var_c + eax_9) - ecx_26);
005ebea1                              int32_t j_2 = 3;
005ebec2                              int32_t j;
005ebec2                              
005ebec2                              do
005ebec2                              {
005ebea8                                  int16_t esi_1 = *(uint16_t*)((char*)edx_1 + ecx_26);
005ebea8                                  
005ebeb1                                  if (esi_1 == 0xffff)
005ebeb8                                      *(uint16_t*)ecx_26 = 0xffff;
005ebeb1                                  else
005ebeb3                                      *(uint16_t*)ecx_26 = esi_1;
005ebeb3                                  
005ebebe                                  ecx_26 = &ecx_26[1];
005ebebf                                  j = j_2;
005ebebf                                  j_2 -= 1;
005ebec2                              } while (j != 1);
005ebec4                              arg2 += 1;
005ebeca                              eax_9 += 6;
005ebed3                          } while (arg2 < *(uint32_t*)((char*)arg1 + 0x264));
005ebe93                      }
005ebe93                      
005ebedc                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0)
005ebedc                      {
005ebede                          int32_t esi_8 = 0;
005ebee6                          arg2 = nullptr;
005ebee6                          
005ebee9                          if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005ebee9                          {
005ebf2f                              do
005ebf2f                              {
005ebef7                                  int16_t* eax_11 = (*(uint32_t*)((char*)edi_1 + 0x250) + esi_8);
005ebefb                                  void* ecx_31 = ((*(uint32_t*)((char*)arg1 + 0x250) + esi_8) - eax_11);
005ebefd                                  int32_t j_3 = 3;
005ebf1e                                  int32_t j_1;
005ebf1e                                  
005ebf1e                                  do
005ebf1e                                  {
005ebf04                                      edx_1 = *(uint16_t*)((char*)eax_11 + ecx_31);
005ebf04                                      
005ebf0d                                      if (edx_1 == 0xffff)
005ebf14                                          *(uint16_t*)eax_11 = 0xffff;
005ebf0d                                      else
005ebf0f                                          *(uint16_t*)eax_11 = edx_1;
005ebf0f                                      
005ebf1a                                      eax_11 = &eax_11[1];
005ebf1b                                      j_1 = j_3;
005ebf1b                                      j_3 -= 1;
005ebf1e                                  } while (j_1 != 1);
005ebf20                                  arg2 += 1;
005ebf26                                  esi_8 += 6;
005ebf2f                              } while (arg2 < *(uint32_t*)((char*)arg1 + 0x264));
005ebee9                          }
005ebedc                      }
005ebe2a                  }
005ebe2a                  else
005ebe2a                  {
005ebe39                      void* eax_6;
005ebe39                      eax_6 = operator new((*(uint32_t*)((char*)arg1 + 0x260) * 0x14));
005ebe41                      *(uint32_t*)((char*)edi_1 + 0x25c) = eax_6;
005ebe41                      
005ebe47                      if (eax_6 != 0)
005ebe47                      {
005ebe64                          int32_t ecx_20 = (*(uint32_t*)((char*)arg1 + 0x260) * 0x14);
005ebe6e                          int32_t esi_7;
005ebe6e                          int32_t edi_7;
005ebe6e                          edi_7 = __builtin_memcpy(eax_6, *(uint32_t*)((char*)arg1 + 0x25c), ((ecx_20 >> 2) << 2));
005ebe75                          __builtin_memcpy(edi_7, esi_7, (ecx_20 & 3));
005ebe80                          *(uint32_t*)((char*)arg2 + 0x260) = *(uint32_t*)((char*)arg1 + 0x260);
005ebe86                          edi_1 = arg2;
005ebe86                          goto label_5ebe88;
005ebe47                      }
005ebe47                      
005ebe49                      result = 0x8007000e;
005ebe2a                  }
005ebdc0              }
005ebda8          }
005ebd91      }
005ebd91      
005ebf35      if (var_c != 0)
005ebf35      {
005ebf37          int32_t* ebx_1 = *(uint32_t*)((char*)arg1 + 0x248);
005ebf40          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005ebf35      }
005ebf35      
005ebf47      if (var_10 != 0)
005ebf47      {
005ebf49          int32_t* edi_8 = *(uint32_t*)((char*)edi_1 + 0x248);
005ebf52          *(uint32_t*)(*(uint32_t*)edi_8 + 0x30)(edi_8);
005ebf47      }
005ebf47      
005ebf5c      return result;
005ebd48  }


005ebf5f  long __thiscall ?CloneHelper32@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV?$GXTri3Mesh@I$0A@$0PPPPPPPP@@2@@Z(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg1, D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* arg2)

005ebf5f  {
005ebf71      int32_t edi;
005ebf71      int32_t var_24 = edi;
005ebf72      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* edi_1 = arg2;
005ebf75      int32_t* eax = ((char*)edi_1 + 0x218);
005ebf88      int32_t var_14 = 0;
005ebf8b      *(uint32_t*)eax = (((*(uint32_t*)((char*)arg1 + 0x218) ^ *(uint32_t*)eax) & 0x20) ^ *(uint32_t*)((char*)arg1 + 0x218));
005ebf9b      int32_t var_18 = 0;
005ebf9e      long result_1 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Resize(edi_1, *(uint32_t*)((char*)arg1 + 0x264), *(uint32_t*)((char*)arg1 + 0x23c));
005ebfa5      long result = result_1;
005ebfa5      
005ebfa8      if (result_1 >= 0)
005ebfa8      {
005ebfb5          long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(edi_1, &var_18, 0);
005ebfbc          result = result_2;
005ebfbc          
005ebfbf          if (result_2 >= 0)
005ebfbf          {
005ebfcd              long result_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(arg1, &var_14, 0x10);
005ebfd4              result = result_3;
005ebfd4              
005ebfd7              if (result_3 >= 0)
005ebfd7              {
005ebfe4                  if ((*(uint8_t*)((char*)arg1 + 0x218) & 4) != 0)
005ebfe4                  {
005ebff8                      int32_t ecx_8 = (*(uint32_t*)((char*)arg1 + 0x264) << 2);
005ec000                      int32_t esi_2;
005ec000                      int32_t edi_3;
005ec000                      edi_3 = __builtin_memcpy(*(uint32_t*)((char*)edi_1 + 0x254), *(uint32_t*)((char*)arg1 + 0x254), ((ecx_8 >> 2) << 2));
005ec007                      __builtin_memcpy(edi_3, esi_2, (ecx_8 & 3));
005ec009                      edi_1 = arg2;
005ebfe4                  }
005ebfe4                  
005ec013                  if ((*(uint8_t*)((char*)arg1 + 0x218) & 8) != 0)
005ec013                  {
005ec027                      int32_t ecx_13 = (*(uint32_t*)((char*)arg1 + 0x264) << 1);
005ec02e                      int32_t esi_4;
005ec02e                      int32_t edi_5;
005ec02e                      edi_5 = __builtin_memcpy(*(uint32_t*)((char*)edi_1 + 0x258), *(uint32_t*)((char*)arg1 + 0x258), ((ecx_13 >> 2) << 2));
005ec035                      __builtin_memcpy(edi_5, esi_4, (ecx_13 & 3));
005ec037                      edi_1 = arg2;
005ec013                  }
005ec013                  
005ec041                  if (*(uint32_t*)((char*)arg1 + 0x25c) == 0)
005ec041                  {
005ec09f                  label_5ec09f:
005ec09f                      uint32_t esi_7 = 0;
005ec0a7                      int32_t i = 0;
005ec0a7                      
005ec0aa                      if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005ec0aa                      {
005ec0ac                          int32_t var_10_1 = 0;
005ec0ac                          
005ec0ef                          do
005ec0ef                          {
005ec0b5                              int32_t ecx_25 = (esi_7 + var_18);
005ec0bb                              int32_t edx_2 = (var_10_1 + var_14);
005ec0bb                              
005ec0da                              for (int32_t j = 0; j < 3; j += 1)
005ec0da                              {
005ec0bf                                  edi_1 = *(uint16_t*)(edx_2 + (j << 1));
005ec0bf                                  
005ec0c8                                  if (edi_1 == 0xffff)
005ec0d2                                      *(uint32_t*)(ecx_25 + (j << 2)) = 0xffffffff;
005ec0c8                                  else
005ec0cd                                      *(uint32_t*)(ecx_25 + (j << 2)) = ((uint32_t)edi_1);
005ec0da                              }
005ec0da                              
005ec0dc                              i += 1;
005ec0e2                              var_10_1 += 6;
005ec0e6                              esi_7 += 0xc;
005ec0ef                          } while (i < *(uint32_t*)((char*)arg1 + 0x264));
005ec0ef                          
005ec0f1                          edi_1 = arg2;
005ec0aa                      }
005ec0aa                      
005ec0fb                      if ((*(uint8_t*)((char*)arg1 + 0x218) & 1) != 0)
005ec0fb                      {
005ec105                          int32_t i_1 = 0;
005ec105                          
005ec108                          if (*(uint32_t*)((char*)arg1 + 0x264) > 0)
005ec108                          {
005ec10a                              int32_t var_10_2 = 0;
005ec10d                              arg2 = nullptr;
005ec10d                              
005ec155                              do
005ec155                              {
005ec11c                                  void* eax_13 = (*(uint32_t*)((char*)edi_1 + 0x250) + arg2);
005ec11f                                  int32_t ecx_27 = (*(uint32_t*)((char*)arg1 + 0x250) + var_10_2);
005ec11f                                  
005ec13f                                  for (int32_t j_1 = 0; j_1 < 3; j_1 += 1)
005ec13f                                  {
005ec124                                      esi_7 = *(uint16_t*)(ecx_27 + (j_1 << 1));
005ec124                                      
005ec12d                                      if (esi_7 == 0xffff)
005ec137                                          *(uint32_t*)((char*)eax_13 + (j_1 << 2)) = 0xffffffff;
005ec12d                                      else
005ec132                                          *(uint32_t*)((char*)eax_13 + (j_1 << 2)) = ((uint32_t)esi_7);
005ec13f                                  }
005ec13f                                  
005ec141                                  i_1 += 1;
005ec147                                  arg2 += 0xc;
005ec14b                                  var_10_2 += 6;
005ec155                              } while (i_1 < *(uint32_t*)((char*)arg1 + 0x264));
005ec108                          }
005ec0fb                      }
005ec041                  }
005ec041                  else
005ec041                  {
005ec050                      void* eax_6 = operator new((*(uint32_t*)((char*)arg1 + 0x260) * 0x14));
005ec058                      *(uint32_t*)((char*)edi_1 + 0x25c) = eax_6;
005ec058                      
005ec05e                      if (eax_6 != 0)
005ec05e                      {
005ec07b                          int32_t ecx_20 = (*(uint32_t*)((char*)arg1 + 0x260) * 0x14);
005ec085                          int32_t esi_6;
005ec085                          int32_t edi_7;
005ec085                          edi_7 = __builtin_memcpy(eax_6, *(uint32_t*)((char*)arg1 + 0x25c), ((ecx_20 >> 2) << 2));
005ec08c                          __builtin_memcpy(edi_7, esi_6, (ecx_20 & 3));
005ec097                          *(uint32_t*)((char*)arg2 + 0x260) = *(uint32_t*)((char*)arg1 + 0x260);
005ec09d                          edi_1 = arg2;
005ec09d                          goto label_5ec09f;
005ec05e                      }
005ec05e                      
005ec060                      result = 0x8007000e;
005ec041                  }
005ebfd7              }
005ebfbf          }
005ebfa8      }
005ebfa8      
005ec15b      if (var_14 != 0)
005ec15b      {
005ec15d          int32_t* ebx_1 = *(uint32_t*)((char*)arg1 + 0x248);
005ec166          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005ec15b      }
005ec15b      
005ec16d      if (var_18 != 0)
005ec16d      {
005ec16f          int32_t* edi_8 = *(uint32_t*)((char*)edi_1 + 0x248);
005ec178          *(uint32_t*)(*(uint32_t*)edi_8 + 0x30)(edi_8);
005ec16d      }
005ec16d      
005ec182      return result;
005ebf5f  }


005ec185  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::CloneVertexBuffer(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, struct _D3DVERTEXELEMENT9 const* arg2, struct IDirect3DVertexBuffer9* arg3)

005ec185  {
005ec194      int32_t edi;
005ec194      int32_t var_3ac = edi;
005ec19a      uint32_t i = 0;
005ec1a4      struct IDirect3DVertexBuffer9::VTable* vtable = arg3->vtable;
005ec1a7      uint8_t* var_c = nullptr;
005ec1aa      uint8_t* var_8 = nullptr;
005ec1ad      long result_1 = vtable->Lock(arg3, 0, 0, &var_c, 0x800);
005ec1b2      long result = result_1;
005ec1b2      
005ec1b5      if (result_1 >= 0)
005ec1b5      {
005ec1c3          long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(this, &var_8, 0x10);
005ec1ca          result = result_2;
005ec1ca          
005ec1cd          if (result_2 >= 0)
005ec1cd          {
005ec1de              if (D3DXMesh::BIdenticalDecls(arg2, ((char*)this + 0xc)) == 0)
005ec1de              {
005ec20d                  D3DXMesh::SVertexCopyContext var_3a4;
005ec20d                  D3DXMesh::SVertexCopyContext::SVertexCopyContext(&var_3a4, ((char*)this + 0xc), arg2);
005ec21e                  D3DXMesh::SVertexCopyContext::SetStreamSource(&var_3a4, var_8, var_c);
005ec21e                  
005ec22c                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ec22c                  {
005ec240                      do
005ec240                      {
005ec238                          D3DXMesh::SVertexCopyContext::CopyVertex(&var_3a4, i, i, 1);
005ec23d                          i += 1;
005ec240                      } while (i < *(uint32_t*)((char*)this + 0x23c));
005ec22c                  }
005ec1de              }
005ec1de              else
005ec1de              {
005ec1e6                  int32_t ecx_2 = (*(uint32_t*)((char*)this + 0x23c) * *(uint32_t*)((char*)this + 0x238));
005ec1f8                  int32_t esi_3;
005ec1f8                  int32_t edi_2;
005ec1f8                  edi_2 = __builtin_memcpy(var_c, var_8, ((ecx_2 >> 2) << 2));
005ec1ff                  __builtin_memcpy(edi_2, esi_3, (ecx_2 & 3));
005ec1de              }
005ec1cd          }
005ec1b5      }
005ec1b5      
005ec247      if (var_c != 0)
005ec24c          arg3->vtable->Unlock(arg3);
005ec24c      
005ec256      if (var_8 != 0)
005ec256      {
005ec258          int32_t* ebx_1 = *(uint32_t*)((char*)this + 0x234);
005ec261          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005ec256      }
005ec256      
005ec26a      return result;
005ec185  }


005ec26d  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::ConvertPointRepsToAdjacency(unsigned long const* arg1, unsigned long* arg2)

005ec2b1  {
005ec2b1      return GXConvertPointRepsToAdjacency<uint16_t,65535>(arg1[0x8d], arg1[0x92], arg1[0x85], arg1[0x8f], arg1[0x99], arg1[0x97], arg1[0x98], arg2, arg_c, arg1[0x8e]);
005ec2b1  }


005ec2b4  long __stdcall GXConvertPointRepsToAdjacency<uint16_t,65535>(struct IDirect3DVertexBuffer9* arg1, struct IDirect3DIndexBuffer9* arg2, unsigned long arg3, uint32_t arg4, uint32_t arg5, struct _D3DXATTRIBUTERANGE* arg6, uint32_t arg7, unsigned long const* arg8, unsigned long* arg9, uint32_t arg10)

005ec2b4  {
005ec2b9      class D3DXMesh::GXTri3Face<uint16_t>* ecx;
005ec2b9      class D3DXMesh::GXTri3Face<uint16_t>* var_8 = ecx;
005ec2ba      uint8_t* var_c = ecx;
005ec2c1      int32_t edi;
005ec2c1      int32_t var_14 = edi;
005ec2c2      var_8 = nullptr;
005ec2c5      var_c = nullptr;
005ec2c5      
005ec2ce      if ((arg9 == 0 || (*(uint8_t*)((char*)arg3)[1] & 4) != 0))
005ec2d0          return 0x8876086c;
005ec2d0      
005ec2e9      long result = arg2->vtable->Lock(arg2, 0, 0, &var_8, 0x10);
005ec2e9      
005ec2ed      if (result >= 0)
005ec2ed      {
005ec300          result = arg1->vtable->Lock(arg1, 0, 0, &var_c, 0x10);
005ec300          
005ec304          if (result >= 0)
005ec32b              result = GXConvertPointRepsToAdjacencyInt<uint16_t,65535>(var_8, var_c, arg4, arg5, arg6, arg7, arg8, arg9, 0xffff, arg10);
005ec2ed      }
005ec2ed      
005ec330      if (var_8 != 0)
005ec332          arg2->vtable->Unlock(arg2);
005ec332      
005ec33c      if (var_c != 0)
005ec341          arg1->vtable->Unlock(arg1);
005ec341      
005ec34c      return result;
005ec2b4  }


005ec34f  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GenerateAdjacency(float arg1, unsigned long* arg2)

005ec34f  {
005ec35d      int32_t ecx;
005ec35d      int32_t var_c = ecx;
005ec38f      long result;
005ec38f      int80_t st0;
005ec38f      result = GXGenerateAdjacency<uint16_t,65535>(*(uint32_t*)(arg1 + 0x234), *(uint32_t*)(arg1 + 0x248), (arg1 + 0xc), *(uint32_t*)(arg1 + 0x214), *(uint32_t*)(arg1 + 0x23c), *(uint32_t*)(arg1 + 0x264), *(uint32_t*)(arg1 + 0x25c), *(uint32_t*)(arg1 + 0x260), ((float)((long double)arg2)), arg_c);
005ec395      return result;
005ec34f  }


005ec398  long __stdcall GXGenerateAdjacency<uint16_t,65535>(struct IDirect3DVertexBuffer9* arg1, struct IDirect3DIndexBuffer9* arg2, struct _D3DVERTEXELEMENT9 const* arg3, unsigned long arg4, uint32_t arg5, uint32_t arg6, struct _D3DXATTRIBUTERANGE* arg7, uint32_t arg8, float arg9, unsigned long* arg10)

005ec398  {
005ec3a5      int32_t edi;
005ec3a5      int32_t var_120 = edi;
005ec3b1      void* s_2 = nullptr;
005ec3b4      float* var_1c = nullptr;
005ec3b7      D3DXMesh::CD3DXCrackDecl1 var_114;
005ec3b7      D3DXMesh::CD3DXCrackDecl1::CD3DXCrackDecl1(&var_114, arg3);
005ec3bc      uint32_t i_4 = arg5;
005ec3c6      uint32_t temp0 = (COMBINE(0, i_4) / 3);
005ec3cb      void* s = nullptr;
005ec3ce      void* var_24 = nullptr;
005ec3d1      unsigned long var_48 = 0;
005ec3d4      void* s_1 = nullptr;
005ec3d7      void* var_14 = nullptr;
005ec3da      class D3DXMesh::GXTri3Face<uint16_t>* var_28 = nullptr;
005ec3dd      void* var_34 = nullptr;
005ec3e0      void* var_2c = nullptr;
005ec400      void* var_8c;
005ec400      long result;
005ec400      
005ec400      if (((arg10 != 0 && (arg4 & 0x440) == 0) && var_8c != 0))
005ec400      {
005ec404          uint32_t edi_2 = (temp0 << 2);
005ec40d          s = operator new(edi_2);
005ec417          void* eax_5 = operator new((i_4 * 0x14));
005ec417          
005ec422          if (eax_5 == 0)
005ec437              var_24 = nullptr;
005ec422          else
005ec422          {
005ec42d              `vector constructor iterator'(eax_5, 0x14, i_4, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005ec432              var_24 = eax_5;
005ec422          }
005ec422          
005ec43d          uint32_t ebx_3 = (i_4 << 2);
005ec446          s_1 = operator new(ebx_3);
005ec459          var_14 = operator new((arg6 * 0xc));
005ec45c          void* s_3 = operator new(ebx_3);
005ec469          s_2 = s_3;
005ec469          
005ec48f          if (((((s == 0 || var_24 == 0) || s_1 == 0) || var_14 == 0) || s_3 == 0))
005ec798              result = 0x8007000e;
005ec48f          else
005ec48f          {
005ec4a8              __builtin_memset(__builtin_memset(s, 0, ((edi_2 >> 2) << 2)), 0, (edi_2 & 3));
005ec4c7              __builtin_memset(__builtin_memset(s_1, 0xffffffff, ((ebx_3 >> 2) << 2)), 0xff, (ebx_3 & 3));
005ec4d3              result = arg2->vtable->Lock(arg2, 0, 0, &var_28, 0x10);
005ec4d3              
005ec4d7              if (result >= 0)
005ec4d7              {
005ec4e2                  if (arg6 > 0)
005ec4e2                  {
005ec4e4                      void* ecx_11 = var_14;
005ec4e7                      int32_t var_c_1 = 0;
005ec4ea                      arg3 = nullptr;
005ec4ed                      uint32_t i_3 = arg6;
005ec526                      uint32_t i;
005ec526                      
005ec526                      do
005ec526                      {
005ec4f6                          void* edx_5 = ((char*)arg3 + var_28);
005ec4f6                          
005ec519                          for (int32_t j = 0; j < 3; )
005ec519                          {
005ec504                              *(uint32_t*)ecx_11 = *(uint32_t*)((char*)s_1 + (((uint32_t)*(uint16_t*)((char*)edx_5 + (j << 1))) << 2));
005ec509                              uint32_t ebx_4 = ((uint32_t)*(uint16_t*)((char*)edx_5 + (j << 1)));
005ec50d                              int32_t edi_10 = (var_c_1 + j);
005ec50f                              j += 1;
005ec510                              ecx_11 += 4;
005ec516                              *(uint32_t*)((char*)s_1 + (ebx_4 << 2)) = edi_10;
005ec519                          }
005ec519                          
005ec51b                          arg3 = &arg3->Usage;
005ec51f                          var_c_1 += 3;
005ec523                          i = i_3;
005ec523                          i_3 -= 1;
005ec526                      } while (i != 1);
005ec528                      i_4 = arg5;
005ec4e2                  }
005ec4e2                  
005ec53e                  result = arg1->vtable->Lock(arg1, 0, 0, &var_1c, 0x10);
005ec53e                  
005ec542                  if (result >= 0)
005ec542                  {
005ec548                      long double x87_r7_1 = ((long double)0f);
005ec54e                      long double x87_r6_1 = ((long double)arg9);
005ec551                      (x87_r6_1 - x87_r7_1);
005ec553                      long eax_16;
005ec553                      eax_16 = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
005ec555                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005ec558                      uint32_t var_54;
005ec558                      
005ec558                      if (p_1)
005ec558                      {
005ec5b8                          uint32_t ebx_7 = (i_4 << 2);
005ec5bc                          void* eax_23 = operator new(ebx_7);
005ec5c4                          var_34 = eax_23;
005ec5cf                          void* ebx_8 = operator new(ebx_7);
005ec5d2                          var_2c = ebx_8;
005ec5d2                          
005ec5dd                          if ((eax_23 == 0 || ebx_8 == 0))
005ec798                              result = 0x8007000e;
005ec5dd                          else
005ec5dd                          {
005ec5e3                              float* eax_25 = var_1c;
005ec5e6                              int32_t ecx_15 = 0;
005ec5e6                              
005ec5ea                              if (i_4 > 0)
005ec5ea                              {
005ec5f7                                  do
005ec5f7                                  {
005ec5ee                                      *(uint32_t*)((char*)eax_23 + (ecx_15 << 2)) = ((float)((long double)*(uint32_t*)eax_25));
005ec5f1                                      eax_25 += var_54;
005ec5f4                                      ecx_15 += 1;
005ec5f7                                  } while (ecx_15 < i_4);
005ec5ea                              }
005ec5ea                              
005ec5fc                              IndexedHeapSort(ebx_8, eax_23, i_4);
005ec607                              long double x87_r7_4 = (((long double)arg9) * ((long double)arg9));
005ec60a                              arg3 = nullptr;
005ec610                              uint32_t ecx_17 = (i_4 << 2);
005ec624                              __builtin_memset(__builtin_memset(s_2, 0xffffffff, ((ecx_17 >> 2) << 2)), 0xff, (ecx_17 & 3));
005ec624                              
005ec626                              if (i_4 > 0)
005ec626                              {
005ec62c                                  int32_t j_2 = 1;
005ec633                                  uint32_t i_2 = i_4;
005ec76b                                  uint32_t i_1;
005ec76b                                  
005ec76b                                  do
005ec76b                                  {
005ec639                                      for (; arg3 < i_4; arg3 = (&arg3->Stream + 1))
005ec639                                      {
005ec64e                                          long double x87_r6_3 = (((long double)*(uint32_t*)((char*)var_34 + (*(uint32_t*)ebx_8 << 2))) - ((long double)*(uint32_t*)((char*)var_34 + (*(uint32_t*)((char*)var_2c + (arg3 << 2)) << 2))));
005ec651                                          long double temp5_1 = ((long double)arg9);
005ec651                                          (x87_r6_3 - temp5_1);
005ec654                                          int32_t eax_28;
005ec654                                          eax_28 = ((((x87_r6_3 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005ec656                                          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
005ec656                                          
005ec659                                          if (p_2)
005ec659                                              break;
005ec639                                      }
005ec639                                      
005ec663                                      int32_t eax_29 = *(uint32_t*)ebx_8;
005ec663                                      
005ec66c                                      if (*(uint32_t*)((char*)s_2 + (eax_29 << 2)) == 0xffffffff)
005ec66c                                      {
005ec672                                          *(uint32_t*)((char*)s_2 + (eax_29 << 2)) = eax_29;
005ec688                                          void* ecx_25 = (((uint32_t)*(uint16_t*)((char*)var_8c + 2)) + ((*(uint32_t*)ebx_8 * var_54) + var_1c));
005ec68a                                          int32_t j_1 = j_2;
005ec68d                                          int32_t j_3 = j_1;
005ec68d                                          
005ec75c                                          for (; j_1 < arg3; j_1 = j_3)
005ec75c                                          {
005ec69b                                              int32_t eax_34 = *(uint32_t*)((char*)var_2c + (j_3 << 2));
005ec6a1                                              void* edx_10 = ((char*)s_2 + (eax_34 << 2));
005ec6a1                                              
005ec6ad                                              if (*(uint32_t*)edx_10 == 0xffffffff)
005ec6ad                                              {
005ec6c7                                                  int32_t* esi_3 = (((uint32_t)*(uint16_t*)((char*)var_8c + 2)) + ((eax_34 * var_54) + var_1c));
005ec6c9                                                  float var_44_1 = *(uint32_t*)esi_3;
005ec6c9                                                  float var_40;
005ec6c9                                                  unsigned long* edi_16 = &var_40;
005ec6c9                                                  unsigned long* esi_4 = &esi_3[1];
005ec6ca                                                  *(uint32_t*)edi_16 = *(uint32_t*)esi_4;
005ec6ca                                                  edi_16[1] = esi_4[1];
005ec6cf                                                  long double x87_r6_5 = (((long double)var_44_1) - ((long double)*(uint32_t*)ecx_25));
005ec6d1                                                  float var_44_2 = ((float)x87_r6_5);
005ec6d7                                                  long double x87_r5_2 = (((long double)var_40) - ((long double)*(uint32_t*)((char*)ecx_25 + 4)));
005ec6da                                                  var_40 = ((float)x87_r5_2);
005ec6e0                                                  float var_3c;
005ec6e0                                                  long double x87_r4_2 = (((long double)var_3c) - ((long double)*(uint32_t*)((char*)ecx_25 + 8)));
005ec6e3                                                  var_3c = ((float)x87_r4_2);
005ec6f4                                                  long double x87_r3_4 = (((x87_r4_2 * x87_r4_2) + (x87_r5_2 * x87_r5_2)) + (x87_r6_5 * x87_r6_5));
005ec6f6                                                  (x87_r3_4 - x87_r7_4);
005ec6fa                                                  void* eax_36;
005ec6fa                                                  eax_36 = ((((x87_r3_4 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_4, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r3_4 == x87_r7_4) ? 1 : 0) << 0xe) | 0x2800))));
005ec6fe                                                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005ec701                                                  x87_r7_4 = x87_r4_2;
005ec701                                                  
005ec703                                                  if (!(p_3))
005ec703                                                  {
005ec710                                                      for (int32_t k = *(uint32_t*)((char*)s_1 + (*(uint32_t*)ebx_8 << 2)); k != 0xffffffff; k = *(uint32_t*)((char*)var_14 + (k << 2)))
005ec710                                                      {
005ec721                                                          void* eax_41 = ((char*)var_28 + ((COMBINE(0, k) / 3) * 6));
005ec721                                                          
005ec72a                                                          if (((uint32_t)*(uint16_t*)eax_41) == eax_34)
005ec72a                                                              goto label_5ec750;
005ec72a                                                          
005ec733                                                          if (((uint32_t)*(uint16_t*)((char*)eax_41 + 2)) == eax_34)
005ec733                                                              goto label_5ec750;
005ec733                                                          
005ec73c                                                          if (((uint32_t)*(uint16_t*)((char*)eax_41 + 4)) == eax_34)
005ec73c                                                              goto label_5ec750;
005ec710                                                      }
005ec710                                                      
005ec74e                                                      *(uint32_t*)edx_10 = *(uint32_t*)ebx_8;
005ec703                                                  }
005ec703                                                  
005ec750                                              label_5ec750:
005ec750                                                  i_4 = arg5;
005ec6ad                                              }
005ec6ad                                              
005ec753                                              j_3 += 1;
005ec75c                                          }
005ec66c                                      }
005ec66c                                      
005ec762                                      j_2 += 1;
005ec765                                      ebx_8 += 4;
005ec768                                      i_1 = i_2;
005ec768                                      i_2 -= 1;
005ec76b                                  } while (i_1 != 1);
005ec626                              }
005ec626                              
005ec794                              result = GXConvertPointRepsToAdjacency<uint16_t,65535>(arg1, arg2, arg4, i_4, arg6, arg7, arg8, s_2, arg10, var_54);
005ec5dd                          }
005ec558                      }
005ec558                      else
005ec558                      {
005ec55a                          float* ebx_5 = var_1c;
005ec55d                          unsigned long edi_11 = 0;
005ec55d                          
005ec561                          if (i_4 > 0)
005ec561                          {
005ec5af                              do
005ec5af                              {
005ec596                                  unsigned long var_4c;
005ec596                                  
005ec596                                  if (VertexHashAdd<uint16_t>((((uint32_t)*(uint16_t*)((char*)var_8c + 2)) + ebx_5), edi_11, s, var_24, temp0, s_1, var_14, var_28, &var_48, &var_4c) == 0)
005ec5a6                                      *(uint32_t*)((char*)s_2 + (edi_11 << 2)) = edi_11;
005ec596                                  else
005ec59e                                      *(uint32_t*)((char*)s_2 + (edi_11 << 2)) = var_4c;
005ec59e                                  
005ec5a9                                  ebx_5 += var_54;
005ec5ac                                  edi_11 += 1;
005ec5af                              } while (edi_11 < i_4);
005ec561                          }
005ec561                          
005ec794                          result = GXConvertPointRepsToAdjacency<uint16_t,65535>(arg1, arg2, arg4, i_4, arg6, arg7, arg8, s_2, arg10, var_54);
005ec558                      }
005ec542                  }
005ec4d7              }
005ec48f          }
005ec400      }
005ec400      else
005ec3e8          result = 0x8876086c;
005ec3e8      
005ec7a2      operator delete(s);
005ec7aa      operator delete(var_24);
005ec7b2      operator delete(s_1);
005ec7ba      operator delete(var_14);
005ec7c2      operator delete(var_34);
005ec7ca      operator delete(var_2c);
005ec7d2      operator delete(s_2);
005ec7d2      
005ec7dd      if (var_1c != 0)
005ec7e2          arg1->vtable->Unlock(arg1);
005ec7e2      
005ec7eb      if (var_28 != 0)
005ec7f0          arg2->vtable->Unlock(arg2);
005ec7f0      
005ec7fc      return result;
005ec398  }


005ec7ff  void __stdcall IndexedHeapSort(unsigned long* arg1, float* arg2, unsigned long arg3)

005ec7ff  {
005ec807      unsigned long* ecx = arg1;
005ec80e      int32_t eax = 0;
005ec80e      
005ec812      if (arg3 > 0)
005ec812      {
005ec81a          do
005ec81a          {
005ec814              ecx[eax] = eax;
005ec817              eax += 1;
005ec81a          } while (eax < arg3);
005ec812      }
005ec812      
005ec81f      if (arg3 > 1)
005ec81f      {
005ec827          unsigned long* i = ((arg3 >> 1) - 1);
005ec82c          int32_t edi;
005ec82c          int32_t var_20_1 = edi;
005ec82c          
005ec82d          if (i != 0xffffffff)
005ec82d          {
005ec833              unsigned long* var_8_1 = ((i * 2) + 1);
005ec833              
005ec8ab              do
005ec8ab              {
005ec836                  unsigned long* edx_1 = var_8_1;
005ec83c                  int32_t eax_2 = ecx[i];
005ec83f                  arg1 = i;
005ec83f                  
005ec845                  while (edx_1 < arg3)
005ec845                  {
005ec850                      int32_t edi_2 = ecx[edx_1];
005ec850                      
005ec85c                      if (((char*)edx_1 + 1) < arg3)
005ec85c                      {
005ec85e                          int32_t eax_5 = ecx[((char*)edx_1 + 1)];
005ec862                          long double x87_r7_1 = ((long double)arg2[eax_5]);
005ec865                          int32_t var_14_1 = eax_5;
005ec868                          long double temp2_1 = ((long double)arg2[edi_2]);
005ec868                          (x87_r7_1 - temp2_1);
005ec86b                          eax_5 = ((((x87_r7_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005ec86d                          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
005ec86d                          
005ec870                          if (!(p_1))
005ec870                          {
005ec872                              edi_2 = var_14_1;
005ec875                              edx_1 += 1;
005ec870                          }
005ec85c                      }
005ec85c                      
005ec879                      long double x87_r7_2 = ((long double)arg2[edi_2]);
005ec87c                      long double temp1_1 = ((long double)arg2[eax_2]);
005ec87c                      (x87_r7_2 - temp1_1);
005ec87e                      void* eax_6;
005ec87e                      eax_6 = ((((x87_r7_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005ec87e                      
005ec883                      if ((*(uint8_t*)((char*)eax_6)[1] & 0x41) == 0)
005ec883                          break;
005ec883                      
005ec885                      unsigned long* edi_3 = arg1;
005ec888                      int32_t eax_7 = ecx[edx_1];
005ec88b                      arg1 = edx_1;
005ec88e                      edx_1 = ((edx_1 * 2) + 1);
005ec895                      ecx[edi_3] = eax_7;
005ec845                  }
005ec845                  
005ec8a0                  var_8_1 -= 2;
005ec8a4                  i -= 1;
005ec8a8                  ecx[arg1] = eax_2;
005ec8ab              } while (i != 0xffffffff);
005ec82d          }
005ec82d          
005ec8ad          unsigned long esi_2 = arg3;
005ec8ad          
005ec921          while (true)
005ec921          {
005ec921              esi_2 -= 1;
005ec921              
005ec925              if (esi_2 == 0xffffffff)
005ec925                  break;
005ec925              
005ec8b4              int32_t eax_9 = ecx[esi_2];
005ec8b7              arg1 = nullptr;
005ec8bb              ecx[esi_2] = *(uint32_t*)ecx;
005ec8c0              unsigned long* edx_4 = 1;
005ec8c0              
005ec8c6              if (esi_2 > 1)
005ec8c6              {
005ec916                  do
005ec916                  {
005ec8d1                      int32_t edi_5 = ecx[edx_4];
005ec8d1                      
005ec8d9                      if (((char*)edx_4 + 1) < esi_2)
005ec8d9                      {
005ec8de                          int32_t ebx_2 = ecx[((char*)edx_4 + 1)];
005ec8e2                          long double x87_r7_3 = ((long double)arg2[ebx_2]);
005ec8e5                          long double temp4_1 = ((long double)arg2[edi_5]);
005ec8e5                          (x87_r7_3 - temp4_1);
005ec8e8                          float* eax_12;
005ec8e8                          eax_12 = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005ec8ea                          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
005ec8ea                          
005ec8ed                          if (!(p_2))
005ec8ed                          {
005ec8ef                              edx_4 += 1;
005ec8f0                              edi_5 = ebx_2;
005ec8ed                          }
005ec8d9                      }
005ec8d9                      
005ec8f5                      long double x87_r7_4 = ((long double)arg2[edi_5]);
005ec8fb                      long double temp3_1 = ((long double)arg2[eax_9]);
005ec8fb                      (x87_r7_4 - temp3_1);
005ec8fd                      void* eax_14;
005ec8fd                      eax_14 = ((((x87_r7_4 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005ec8fd                      
005ec902                      if ((*(uint8_t*)((char*)eax_14)[1] & 0x41) == 0)
005ec902                          break;
005ec902                      
005ec904                      unsigned long* edi_6 = arg1;
005ec907                      int32_t eax_15 = ecx[edx_4];
005ec90a                      arg1 = edx_4;
005ec90d                      edx_4 = ((edx_4 * 2) + 1);
005ec913                      ecx[edi_6] = eax_15;
005ec916                  } while (edx_4 < esi_2);
005ec8c6              }
005ec8c6              
005ec91e              ecx[arg1] = eax_9;
005ec921          }
005ec81f      }
005ec7ff  }


005ec92e  void __thiscall D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>(D3DXMesh::NeighborInfo<uint16_t>* this) __pure

005ec92e  {
005ec930      return;
005ec92e  }


005ec931  int32_t __stdcall VertexHashAdd<uint16_t>(struct D3DXVECTOR3* arg1, unsigned long arg2, struct SVertexHashEntry** arg3, struct SVertexHashEntry* arg4, unsigned long arg5, unsigned long* arg6, unsigned long* arg7, class D3DXMesh::GXTri3Face<uint16_t>* arg8, unsigned long* arg9, unsigned long* arg10)

005ec931  {
005ec945      int32_t edi;
005ec945      int32_t var_10 = edi;
005ec946      uint32_t temp1 = (COMBINE(0, ((arg1->y + arg1->x) + arg1->z)) % arg5);
005ec94c      *(uint32_t*)arg10 = 0xffffffff;
005ec952      void* ebx = &arg3[temp1];
005ec952      
005ec9d9      for (float* i = *(uint32_t*)ebx; i != 0; i = i[4])
005ec9d9      {
005ec959          long double x87_r7_1 = ((long double)arg1->x);
005ec95b          long double x87_r6_1 = ((long double)*(uint32_t*)i);
005ec95d          (x87_r6_1 - x87_r7_1);
005ec95f          struct SVertexHashEntry** eax_4;
005ec95f          eax_4 = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
005ec961          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005ec961          
005ec964          if (!(p_1))
005ec964          {
005ec966              long double x87_r7_2 = ((long double)arg1->y);
005ec969              long double x87_r6_2 = ((long double)i[1]);
005ec96c              (x87_r6_2 - x87_r7_2);
005ec96e              eax_4 = ((((x87_r6_2 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_2) ? 1 : 0) << 0xe) | 0))));
005ec970              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
005ec970              
005ec973              if (!(p_2))
005ec973              {
005ec975                  long double x87_r7_3 = ((long double)arg1->z);
005ec978                  long double x87_r6_3 = ((long double)i[2]);
005ec97b                  (x87_r6_3 - x87_r7_3);
005ec97d                  eax_4 = ((((x87_r6_3 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_3) ? 1 : 0) << 0xe) | 0))));
005ec97f                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
005ec97f                  
005ec982                  if (!(p_3))
005ec982                  {
005ec984                      unsigned long* eax_5 = arg6;
005ec987                      unsigned long edx_2 = arg2;
005ec987                      
005ec9bc                      while (true)
005ec9bc                      {
005ec9bc                          struct D3DXVECTOR3* eax_8 = eax_5[edx_2];
005ec9bc                          
005ec9c5                          if (eax_8 == 0xffffffff)
005ec9c5                          {
005ec9cd                              *(uint32_t*)arg10 = i[3];
005ec9d1                              return 1;
005ec9c5                          }
005ec9c5                          
005ec999                          eax_4 = ((char*)arg8 + ((COMBINE(0, eax_8) / 3) * 6));
005ec99f                          int32_t edx_5 = i[3];
005ec99f                          
005ec9a4                          if (((uint32_t)*(uint16_t*)eax_4) == edx_5)
005ec9a4                              break;
005ec9a4                          
005ec9ac                          if (((uint32_t)*(uint16_t*)((char*)eax_4 + 2)) == edx_5)
005ec9ac                              break;
005ec9ac                          
005ec9b4                          if (((uint32_t)eax_4[1]) == edx_5)
005ec9b4                              break;
005ec9b4                          
005ec9b6                          eax_5 = arg7;
005ec9b9                          edx_2 = eax_8;
005ec9bc                      }
005ec982                  }
005ec973              }
005ec964          }
005ec9d9      }
005ec9d9      
005ec9e2      unsigned long ecx_1 = *(uint32_t*)arg9;
005ec9ea      void* eax_12 = ((char*)arg4 + (ecx_1 * 0x14));
005ec9ee      *(uint32_t*)arg9 = (ecx_1 + 1);
005ec9f5      *(uint32_t*)eax_12 = arg1->x;
005ec9f5      void* edi_5 = ((char*)eax_12 + 4);
005ec9f5      float* esi_1 = &arg1->y;
005ec9f6      *(uint32_t*)edi_5 = ADJ(esi_1)->y;
005ec9f7      *(uint32_t*)((char*)edi_5 + 4) = (&esi_1[1] - 8)->z;
005ec9f8      *(uint32_t*)((char*)eax_12 + 0xc) = arg2;
005ec9fd      *(uint32_t*)((char*)eax_12 + 0x10) = *(uint32_t*)ebx;
005eca00      *(uint32_t*)ebx = eax_12;
005eca02      return 0;
005ec931  }


005eca0b  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::ConvertPointRepsToAdjacency(unsigned long const* arg1, unsigned long* arg2)

005eca4f  {
005eca4f      return GXConvertPointRepsToAdjacency<uint32_t,4294967295>(arg1[0x8d], arg1[0x92], arg1[0x85], arg1[0x8f], arg1[0x99], arg1[0x97], arg1[0x98], arg2, arg_c, arg1[0x8e]);
005eca4f  }


005eca52  long __stdcall GXConvertPointRepsToAdjacency<uint32_t,4294967295>(struct IDirect3DVertexBuffer9* arg1, struct IDirect3DIndexBuffer9* arg2, unsigned long arg3, uint32_t arg4, uint32_t arg5, struct _D3DXATTRIBUTERANGE* arg6, uint32_t arg7, unsigned long const* arg8, unsigned long* arg9, uint32_t arg10)

005eca52  {
005eca57      class D3DXMesh::GXTri3Face<uint32_t>* ecx;
005eca57      class D3DXMesh::GXTri3Face<uint32_t>* var_8 = ecx;
005eca58      uint8_t* var_c = ecx;
005eca5f      int32_t edi;
005eca5f      int32_t var_14 = edi;
005eca60      var_8 = nullptr;
005eca63      var_c = nullptr;
005eca63      
005eca6c      if ((arg9 == 0 || (*(uint8_t*)((char*)arg3)[1] & 4) != 0))
005eca6e          return 0x8876086c;
005eca6e      
005eca87      long result = arg2->vtable->Lock(arg2, 0, 0, &var_8, 0x10);
005eca87      
005eca8b      if (result >= 0)
005eca8b      {
005eca9e          result = arg1->vtable->Lock(arg1, 0, 0, &var_c, 0x10);
005eca9e          
005ecaa2          if (result >= 0)
005ecac6              result = GXConvertPointRepsToAdjacencyInt<uint32_t,4294967295>(var_8, var_c, arg4, arg5, arg6, arg7, arg8, arg9, 0xffffffff, arg10);
005eca8b      }
005eca8b      
005ecacb      if (var_8 != 0)
005ecacd          arg2->vtable->Unlock(arg2);
005ecacd      
005ecad7      if (var_c != 0)
005ecadc          arg1->vtable->Unlock(arg1);
005ecadc      
005ecae7      return result;
005eca52  }


005ecaea  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GenerateAdjacency(float arg1, unsigned long* arg2)

005ecaea  {
005ecaf8      int32_t ecx;
005ecaf8      int32_t var_c = ecx;
005ecb2a      long result;
005ecb2a      int80_t st0;
005ecb2a      result = GXGenerateAdjacency<uint32_t,4294967295>(*(uint32_t*)(arg1 + 0x234), *(uint32_t*)(arg1 + 0x248), (arg1 + 0xc), *(uint32_t*)(arg1 + 0x214), *(uint32_t*)(arg1 + 0x23c), *(uint32_t*)(arg1 + 0x264), *(uint32_t*)(arg1 + 0x25c), *(uint32_t*)(arg1 + 0x260), ((float)((long double)arg2)), arg_c);
005ecb30      return result;
005ecaea  }


005ecb33  long __stdcall GXGenerateAdjacency<uint32_t,4294967295>(struct IDirect3DVertexBuffer9* arg1, struct IDirect3DIndexBuffer9* arg2, struct _D3DVERTEXELEMENT9 const* arg3, unsigned long arg4, uint32_t arg5, uint32_t arg6, struct _D3DXATTRIBUTERANGE* arg7, uint32_t arg8, float arg9, unsigned long* arg10)

005ecb33  {
005ecb40      int32_t edi;
005ecb40      int32_t var_124 = edi;
005ecb4c      void* s_2 = nullptr;
005ecb4f      float* var_1c = nullptr;
005ecb52      D3DXMesh::CD3DXCrackDecl1 var_118;
005ecb52      D3DXMesh::CD3DXCrackDecl1::CD3DXCrackDecl1(&var_118, arg3);
005ecb57      uint32_t i_4 = arg5;
005ecb61      uint32_t temp0 = (COMBINE(0, i_4) / 3);
005ecb66      void* s = nullptr;
005ecb69      void* var_2c = nullptr;
005ecb6c      unsigned long var_54 = 0;
005ecb6f      void* s_1 = nullptr;
005ecb72      void* var_18 = nullptr;
005ecb75      class D3DXMesh::GXTri3Face<uint32_t>* var_24 = nullptr;
005ecb78      void* var_38 = nullptr;
005ecb7b      void* var_10 = nullptr;
005ecb9b      void* var_90;
005ecb9b      long result;
005ecb9b      
005ecb9b      if (((arg10 != 0 && (arg4 & 0x440) == 0) && var_90 != 0))
005ecb9b      {
005ecb9f          uint32_t edi_2 = (temp0 << 2);
005ecba8          s = operator new(edi_2);
005ecbb2          void* eax_5 = operator new((i_4 * 0x14));
005ecbb2          
005ecbbd          if (eax_5 == 0)
005ecbd2              var_2c = nullptr;
005ecbbd          else
005ecbbd          {
005ecbc8              `vector constructor iterator'(eax_5, 0x14, i_4, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005ecbcd              var_2c = eax_5;
005ecbbd          }
005ecbbd          
005ecbd8          uint32_t ebx_3 = (i_4 << 2);
005ecbe1          s_1 = operator new(ebx_3);
005ecbf4          var_18 = operator new((arg6 * 0xc));
005ecbf7          void* s_3 = operator new(ebx_3);
005ecc04          s_2 = s_3;
005ecc04          
005ecc2a          if (((((s == 0 || var_2c == 0) || s_1 == 0) || var_18 == 0) || s_3 == 0))
005ecf42              result = 0x8007000e;
005ecc2a          else
005ecc2a          {
005ecc43              __builtin_memset(__builtin_memset(s, 0, ((edi_2 >> 2) << 2)), 0, (edi_2 & 3));
005ecc62              __builtin_memset(__builtin_memset(s_1, 0xffffffff, ((ebx_3 >> 2) << 2)), 0xff, (ebx_3 & 3));
005ecc6e              result = arg2->vtable->Lock(arg2, 0, 0, &var_24, 0x10);
005ecc6e              
005ecc72              if (result >= 0)
005ecc72              {
005ecc7d                  if (arg6 > 0)
005ecc7d                  {
005ecc7f                      void* ecx_11 = nullptr;
005ecc81                      arg3 = nullptr;
005ecc84                      void* var_20_1 = nullptr;
005ecc87                      uint32_t i_3 = arg6;
005eccc6                      uint32_t i;
005eccc6                      
005eccc6                      do
005eccc6                      {
005ecc90                          void* edx_4 = ((char*)ecx_11 + var_24);
005ecc93                          int32_t j = 0;
005ecc95                          int32_t* ecx_12 = ((char*)ecx_11 + var_18);
005ecc95                          
005eccb4                          do
005eccb4                          {
005ecca0                              *(uint32_t*)ecx_12 = *(uint32_t*)((char*)s_1 + (*(uint32_t*)((char*)edx_4 + (j << 2)) << 2));
005ecca5                              int32_t ebx_4 = *(uint32_t*)((char*)edx_4 + (j << 2));
005ecca8                              void* edi_10 = ((char*)arg3 + j);
005eccaa                              j += 1;
005eccab                              ecx_12 = &ecx_12[1];
005eccb1                              *(uint32_t*)((char*)s_1 + (ebx_4 << 2)) = edi_10;
005eccb4                          } while (j < 3);
005eccb4                          
005eccb9                          arg3 = (&arg3->Offset + 1);
005eccbd                          ecx_11 = ((char*)var_20_1 + 0xc);
005eccc0                          i = i_3;
005eccc0                          i_3 -= 1;
005eccc3                          var_20_1 = ecx_11;
005eccc6                      } while (i != 1);
005eccc8                      i_4 = arg5;
005ecc7d                  }
005ecc7d                  
005eccde                  result = arg1->vtable->Lock(arg1, 0, 0, &var_1c, 0x10);
005eccde                  
005ecce2                  if (result >= 0)
005ecce2                  {
005ecce8                      long double x87_r7_1 = ((long double)0f);
005eccee                      long double x87_r6_1 = ((long double)arg9);
005eccf1                      (x87_r6_1 - x87_r7_1);
005eccf3                      long eax_16;
005eccf3                      eax_16 = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
005eccf5                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005eccf8                      uint32_t var_58;
005eccf8                      
005eccf8                      if (p_1)
005eccf8                      {
005ecd58                          uint32_t edi_13 = (i_4 << 2);
005ecd61                          void* ebx_6 = operator new(edi_13);
005ecd64                          var_38 = ebx_6;
005ecd67                          void* eax_24 = operator new(edi_13);
005ecd6e                          int32_t ecx_16 = 0;
005ecd72                          var_10 = eax_24;
005ecd72                          
005ecd7d                          if ((ebx_6 == 0 || eax_24 == 0))
005ecf42                              result = 0x8007000e;
005ecd7d                          else
005ecd7d                          {
005ecd85                              float* eax_25 = var_1c;
005ecd85                              
005ecd88                              if (i_4 > 0)
005ecd88                              {
005ecd95                                  do
005ecd95                                  {
005ecd8c                                      *(uint32_t*)((char*)ebx_6 + (ecx_16 << 2)) = ((float)((long double)*(uint32_t*)eax_25));
005ecd8f                                      eax_25 += var_58;
005ecd92                                      ecx_16 += 1;
005ecd95                                  } while (ecx_16 < i_4);
005ecd88                              }
005ecd88                              
005ecd9c                              IndexedHeapSort(var_10, ebx_6, i_4);
005ecda7                              long double x87_r7_4 = (((long double)arg9) * ((long double)arg9));
005ecdaa                              arg3 = nullptr;
005ecdb0                              uint32_t ecx_18 = (i_4 << 2);
005ecdc4                              __builtin_memset(__builtin_memset(s_2, 0xffffffff, ((ecx_18 >> 2) << 2)), 0xff, (ecx_18 & 3));
005ecdc4                              
005ecdc6                              if (i_4 > 0)
005ecdc6                              {
005ecdcc                                  void* edx_6 = var_10;
005ecdcf                                  int32_t var_14_1 = 1;
005ecdd6                                  void* var_20_2 = edx_6;
005ecdd9                                  uint32_t i_2 = i_4;
005ecf15                                  uint32_t i_1;
005ecf15                                  
005ecf15                                  do
005ecf15                                  {
005ecddf                                      for (; arg3 < i_4; arg3 = (&arg3->Stream + 1))
005ecddf                                      {
005ecdf1                                          long double x87_r6_3 = (((long double)*(uint32_t*)((char*)ebx_6 + (*(uint32_t*)edx_6 << 2))) - ((long double)*(uint32_t*)((char*)ebx_6 + (*(uint32_t*)((char*)var_10 + (arg3 << 2)) << 2))));
005ecdf4                                          long double temp5_1 = ((long double)arg9);
005ecdf4                                          (x87_r6_3 - temp5_1);
005ecdf7                                          int32_t eax_28;
005ecdf7                                          eax_28 = ((((x87_r6_3 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005ecdf9                                          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
005ecdf9                                          
005ecdfc                                          if (p_2)
005ecdfc                                              break;
005ecddf                                      }
005ecddf                                      
005ece06                                      int32_t eax_29 = *(uint32_t*)edx_6;
005ece06                                      
005ece0f                                      if (*(uint32_t*)((char*)s_2 + (eax_29 << 2)) == 0xffffffff)
005ece0f                                      {
005ece15                                          *(uint32_t*)((char*)s_2 + (eax_29 << 2)) = eax_29;
005ece2b                                          void* ecx_26 = (((uint32_t)*(uint16_t*)((char*)var_90 + 2)) + ((*(uint32_t*)edx_6 * var_58) + var_1c));
005ece33                                          int32_t var_30_1 = var_14_1;
005ece33                                          
005ece36                                          if (var_14_1 < arg3)
005ece36                                          {
005ecefd                                              do
005ecefd                                              {
005ece42                                                  int32_t ebx_7 = *(uint32_t*)((char*)var_10 + (var_30_1 << 2));
005ece48                                                  void* edx_8 = ((char*)s_2 + (ebx_7 << 2));
005ece4b                                                  bool cond:10_1 = *(uint32_t*)edx_8 != 0xffffffff;
005ece4e                                                  void* var_48 = edx_8;
005ece4e                                                  
005ece51                                                  if (!(cond:10_1))
005ece51                                                  {
005ece6d                                                      int32_t* esi_4 = (((uint32_t)*(uint16_t*)((char*)var_90 + 2)) + ((ebx_7 * var_58) + var_1c));
005ece6f                                                      float var_44_1 = *(uint32_t*)esi_4;
005ece6f                                                      void* var_40;
005ece6f                                                      void** edi_17 = &var_40;
005ece6f                                                      void** esi_5 = &esi_4[1];
005ece70                                                      *(uint32_t*)edi_17 = *(uint32_t*)esi_5;
005ece70                                                      edi_17[1] = esi_5[1];
005ece75                                                      long double x87_r6_5 = (((long double)var_44_1) - ((long double)*(uint32_t*)ecx_26));
005ece77                                                      float var_44_2 = ((float)x87_r6_5);
005ece7d                                                      long double x87_r5_2 = (((long double)var_40) - ((long double)*(uint32_t*)((char*)ecx_26 + 4)));
005ece80                                                      var_40 = ((float)x87_r5_2);
005ece86                                                      float var_3c;
005ece86                                                      long double x87_r4_2 = (((long double)var_3c) - ((long double)*(uint32_t*)((char*)ecx_26 + 8)));
005ece89                                                      var_3c = ((float)x87_r4_2);
005ece9a                                                      long double x87_r3_4 = (((x87_r4_2 * x87_r4_2) + (x87_r5_2 * x87_r5_2)) + (x87_r6_5 * x87_r6_5));
005ece9c                                                      (x87_r3_4 - x87_r7_4);
005ecea0                                                      void* eax_38;
005ecea0                                                      eax_38 = ((((x87_r3_4 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_4, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r3_4 == x87_r7_4) ? 1 : 0) << 0xe) | 0x2800))));
005ecea4                                                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005ecea7                                                      x87_r7_4 = x87_r4_2;
005ecea7                                                      
005ecea9                                                      if (!(p_3))
005ecea9                                                      {
005eceae                                                          int32_t eax_40 = *(uint32_t*)var_20_2;
005eceb3                                                          int32_t j_1 = *(uint32_t*)((char*)s_1 + (eax_40 << 2));
005eceb3                                                          
005ecebc                                                          if (j_1 != 0xffffffff)
005ecebc                                                          {
005ecee7                                                              do
005ecee7                                                              {
005ececd                                                                  void* eax_44 = ((char*)var_24 + ((COMBINE(0, j_1) / 3) * 0xc));
005ececd                                                                  
005eced2                                                                  if (*(uint32_t*)eax_44 == ebx_7)
005eced2                                                                      goto label_5ecef1;
005eced2                                                                  
005eced7                                                                  if (*(uint32_t*)((char*)eax_44 + 4) == ebx_7)
005eced7                                                                      goto label_5ecef1;
005eced7                                                                  
005ecedc                                                                  if (*(uint32_t*)((char*)eax_44 + 8) == ebx_7)
005ecedc                                                                      goto label_5ecef1;
005ecedc                                                                  
005ecee1                                                                  j_1 = *(uint32_t*)((char*)var_18 + (j_1 << 2));
005ecee7                                                              } while (j_1 != 0xffffffff);
005ecee7                                                              
005ecee9                                                              edx_8 = var_48;
005ecebc                                                          }
005ecebc                                                          
005eceef                                                          *(uint32_t*)edx_8 = eax_40;
005ecea9                                                      }
005ecea9                                                      
005ecef1                                                  label_5ecef1:
005ecef1                                                      i_4 = arg5;
005ece51                                                  }
005ece51                                                  
005ecef4                                                  var_30_1 += 1;
005ecefd                                              } while (var_30_1 < arg3);
005ecefd                                              
005ecf03                                              ebx_6 = var_38;
005ecf06                                              edx_6 = var_20_2;
005ece36                                          }
005ece0f                                      }
005ece0f                                      
005ecf09                                      var_14_1 += 1;
005ecf0c                                      edx_6 += 4;
005ecf0f                                      i_1 = i_2;
005ecf0f                                      i_2 -= 1;
005ecf12                                      var_20_2 = edx_6;
005ecf15                                  } while (i_1 != 1);
005ecdc6                              }
005ecdc6                              
005ecf3e                              result = GXConvertPointRepsToAdjacency<uint32_t,4294967295>(arg1, arg2, arg4, i_4, arg6, arg7, arg8, s_2, arg10, var_58);
005ecd7d                          }
005eccf8                      }
005eccf8                      else
005eccf8                      {
005eccfa                          float* ebx_5 = var_1c;
005eccfd                          unsigned long edi_11 = 0;
005eccfd                          
005ecd01                          if (i_4 > 0)
005ecd01                          {
005ecd4f                              do
005ecd4f                              {
005ecd36                                  unsigned long var_50;
005ecd36                                  
005ecd36                                  if (VertexHashAdd<uint32_t>((((uint32_t)*(uint16_t*)((char*)var_90 + 2)) + ebx_5), edi_11, s, var_2c, temp0, s_1, var_18, var_24, &var_54, &var_50) == 0)
005ecd46                                      *(uint32_t*)((char*)s_2 + (edi_11 << 2)) = edi_11;
005ecd36                                  else
005ecd3e                                      *(uint32_t*)((char*)s_2 + (edi_11 << 2)) = var_50;
005ecd3e                                  
005ecd49                                  ebx_5 += var_58;
005ecd4c                                  edi_11 += 1;
005ecd4f                              } while (edi_11 < i_4);
005ecd01                          }
005ecd01                          
005ecf3e                          result = GXConvertPointRepsToAdjacency<uint32_t,4294967295>(arg1, arg2, arg4, i_4, arg6, arg7, arg8, s_2, arg10, var_58);
005eccf8                      }
005ecce2                  }
005ecc72              }
005ecc2a          }
005ecb9b      }
005ecb9b      else
005ecb83          result = 0x8876086c;
005ecb83      
005ecf4c      operator delete(s);
005ecf54      operator delete(var_2c);
005ecf5c      operator delete(s_1);
005ecf64      operator delete(var_18);
005ecf6c      operator delete(var_38);
005ecf74      operator delete(var_10);
005ecf7c      operator delete(s_2);
005ecf7c      
005ecf87      if (var_1c != 0)
005ecf8c          arg1->vtable->Unlock(arg1);
005ecf8c      
005ecf95      if (var_24 != 0)
005ecf9a          arg2->vtable->Unlock(arg2);
005ecf9a      
005ecfa6      return result;
005ecb33  }


005ecfa9  int32_t __stdcall VertexHashAdd<uint32_t>(struct D3DXVECTOR3* arg1, unsigned long arg2, struct SVertexHashEntry** arg3, struct SVertexHashEntry* arg4, unsigned long arg5, unsigned long* arg6, unsigned long* arg7, class D3DXMesh::GXTri3Face<uint32_t>* arg8, unsigned long* arg9, unsigned long* arg10)

005ecfa9  {
005ecfbd      int32_t edi;
005ecfbd      int32_t var_10 = edi;
005ecfbe      uint32_t temp1 = (COMBINE(0, ((arg1->y + arg1->x) + arg1->z)) % arg5);
005ecfc4      *(uint32_t*)arg10 = 0xffffffff;
005ecfca      void* ebx = &arg3[temp1];
005ecfca      
005ed048      for (float* i = *(uint32_t*)ebx; i != 0; i = i[4])
005ed048      {
005ecfd1          long double x87_r7_1 = ((long double)arg1->x);
005ecfd3          long double x87_r6_1 = ((long double)*(uint32_t*)i);
005ecfd5          (x87_r6_1 - x87_r7_1);
005ecfd7          struct SVertexHashEntry** eax_4;
005ecfd7          eax_4 = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
005ecfd9          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005ecfd9          
005ecfdc          if (!(p_1))
005ecfdc          {
005ecfde              long double x87_r7_2 = ((long double)arg1->y);
005ecfe1              long double x87_r6_2 = ((long double)i[1]);
005ecfe4              (x87_r6_2 - x87_r7_2);
005ecfe6              eax_4 = ((((x87_r6_2 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_2) ? 1 : 0) << 0xe) | 0))));
005ecfe8              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
005ecfe8              
005ecfeb              if (!(p_2))
005ecfeb              {
005ecfed                  long double x87_r7_3 = ((long double)arg1->z);
005ecff0                  long double x87_r6_3 = ((long double)i[2]);
005ecff3                  (x87_r6_3 - x87_r7_3);
005ecff5                  eax_4 = ((((x87_r6_3 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_3) ? 1 : 0) << 0xe) | 0))));
005ecff7                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
005ecff7                  
005ecffa                  if (!(p_3))
005ecffa                  {
005ecffc                      unsigned long* eax_5 = arg6;
005ecfff                      unsigned long edx_2 = arg2;
005ecfff                      
005ed02b                      while (true)
005ed02b                      {
005ed02b                          struct D3DXVECTOR3* eax_8 = eax_5[edx_2];
005ed02b                          
005ed034                          if (eax_8 == 0xffffffff)
005ed034                          {
005ed03c                              *(uint32_t*)arg10 = i[3];
005ed040                              return 1;
005ed034                          }
005ed034                          
005ed011                          eax_4 = ((char*)arg8 + ((COMBINE(0, eax_8) / 3) * 0xc));
005ed014                          int32_t edx_5 = i[3];
005ed014                          
005ed019                          if (*(uint32_t*)eax_4 == edx_5)
005ed019                              break;
005ed019                          
005ed01e                          if (eax_4[1] == edx_5)
005ed01e                              break;
005ed01e                          
005ed023                          if (eax_4[2] == edx_5)
005ed023                              break;
005ed023                          
005ed025                          eax_5 = arg7;
005ed028                          edx_2 = eax_8;
005ed02b                      }
005ecffa                  }
005ecfeb              }
005ecfdc          }
005ed048      }
005ed048      
005ed04d      unsigned long ecx_1 = *(uint32_t*)arg9;
005ed055      void* eax_12 = ((char*)arg4 + (ecx_1 * 0x14));
005ed059      *(uint32_t*)arg9 = (ecx_1 + 1);
005ed060      *(uint32_t*)eax_12 = arg1->x;
005ed060      void* edi_3 = ((char*)eax_12 + 4);
005ed060      float* esi_1 = &arg1->y;
005ed061      *(uint32_t*)edi_3 = ADJ(esi_1)->y;
005ed062      *(uint32_t*)((char*)edi_3 + 4) = (&esi_1[1] - 8)->z;
005ed063      *(uint32_t*)((char*)eax_12 + 0xc) = arg2;
005ed068      *(uint32_t*)((char*)eax_12 + 0x10) = *(uint32_t*)ebx;
005ed06b      *(uint32_t*)ebx = eax_12;
005ed06d      return 0;
005ecfa9  }


005ed076  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::StripReorder(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, unsigned long arg2, uint32_t* arg3, uint32_t* arg4, unsigned long const* arg5)

005ed076  {
005ed081      uint32_t __security_cookie_1 = __security_cookie;
005ed09b      unsigned long eax_2 = *(uint32_t*)((char*)this + 0x274);
005ed0a4      int32_t edi;
005ed0a4      int32_t var_b4 = edi;
005ed0a8      unsigned long var_64_1;
005ed0a8      
005ed0a8      if (eax_2 != 0)
005ed0ae          var_64_1 = eax_2;
005ed0ae      
005ed0b1      if ((eax_2 == 0 || (*(uint8_t*)((char*)arg2)[2] & 0x40) != 0))
005ed0b3          var_64_1 = 0xc;
005ed0b3      
005ed0d5      unsigned long eax_5;
005ed0d5      
005ed0d5      if ((((0x4000000 & arg2) == 0 || eax_2 != 0) || (arg2 & 0x400000) != 0))
005ed0e2          eax_5 = arg2;
005ed0d5      else
005ed0de          eax_5 = ((arg2 & 0xfbffffff) | 0x8000000);
005ed0de      
005ed0e8      int32_t var_2c = 0;
005ed0eb      int32_t var_1c = 0;
005ed0ee      int32_t var_c = 0;
005ed0f1      int32_t temp3_1;
005ed0f1      
005ed0f1      if (arg5 != 0)
005ed100          temp3_1 = (eax_5 & 0x8000000);
005ed100      
005ed107      long result;
005ed107      
005ed107      if ((arg5 != 0 && (temp3_1 == 0 || (0x4000000 & eax_5) == 0)))
005ed107      {
005ed109          int32_t i_3 = *(uint32_t*)((char*)this + 0x260);
005ed111          int32_t var_50_1 = 0;
005ed111          
005ed114          if (i_3 > 0)
005ed114          {
005ed11c              int32_t* eax_7 = (*(uint32_t*)((char*)this + 0x25c) + 8);
005ed12d              int32_t i;
005ed12d              
005ed12d              do
005ed12d              {
005ed11f                  int32_t edx_1 = *(uint32_t*)eax_7;
005ed11f                  
005ed124                  if (var_50_1 < edx_1)
005ed126                      var_50_1 = edx_1;
005ed126                  
005ed129                  eax_7 = &eax_7[5];
005ed12c                  i = i_3;
005ed12c                  i_3 -= 1;
005ed12d              } while (i != 1);
005ed114          }
005ed114          
005ed12f          int32_t edi_2 = *(uint32_t*)((char*)this + 0x264);
005ed13b          void* eax_10 = operator new((edi_2 * 6));
005ed145          void* var_34_1;
005ed145          
005ed145          if (eax_10 == 0)
005ed15a              var_34_1 = nullptr;
005ed145          else
005ed145          {
005ed150              `vector constructor iterator'(eax_10, 6, edi_2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005ed155              var_34_1 = eax_10;
005ed145          }
005ed145          
005ed15e          uint32_t i_2 = 0;
005ed15e          
005ed163          if (var_34_1 != 0)
005ed163          {
005ed175              int32_t i_1 = 0;
005ed175              
005ed178              if (*(uint32_t*)((char*)this + 0x260) > 0)
005ed178              {
005ed17e                  int32_t var_58_1 = 0;
005ed17e                  
005ed2f5                  do
005ed2f5                  {
005ed18a                      void* eax_12 = (*(uint32_t*)((char*)this + 0x25c) + var_58_1);
005ed18c                      int32_t edi_3 = *(uint32_t*)((char*)eax_12 + 4);
005ed192                      int32_t edx_3 = (*(uint32_t*)((char*)eax_12 + 8) + edi_3);
005ed196                      int32_t var_84_1 = edx_3;
005ed196                      
005ed199                      if (edi_3 < edx_3)
005ed199                      {
005ed1a5                          int32_t var_44_1 = (edi_3 * 3);
005ed1ae                          uint32_t* var_48_1 = &arg4[edi_3];
005ed1b4                          void* ecx_3 = ((char*)var_34_1 + (edi_3 * 6));
005ed1bb                          int32_t j_1 = (edx_3 - edi_3);
005ed2df                          int32_t j;
005ed2df                          
005ed2df                          do
005ed2df                          {
005ed1c9                              void* eax_22 = &arg5[(*(uint32_t*)var_48_1 * 3)];
005ed1cc                              void* var_74_1 = eax_22;
005ed1cf                              int32_t var_38_1 = 1;
005ed1d6                              void* var_78_1 = ecx_3;
005ed1d9                              void* var_3c_1 = eax_22;
005ed1dc                              int32_t k_1 = 3;
005ed2ce                              int32_t k;
005ed2ce                              
005ed2ce                              do
005ed2ce                              {
005ed1e6                                  if (*(uint32_t*)eax_22 == 0xffffffff)
005ed2b5                                      *(uint16_t*)ecx_3 = 0xffff;
005ed1e6                                  else
005ed1e6                                  {
005ed1f2                                      uint32_t eax_24 = ((uint32_t)arg3[((uint32_t)*(uint16_t*)eax_22)]);
005ed1f6                                      uint32_t esi_2 = ((uint32_t)eax_24);
005ed1fb                                      int16_t var_54_1 = eax_24;
005ed1fb                                      
005ed206                                      if ((esi_2 < edi_3 || esi_2 >= edx_3))
005ed29f                                          var_54_1 = -1;
005ed206                                      else
005ed206                                      {
005ed214                                          uint32_t temp1_1 = (COMBINE(0, var_38_1) % 3);
005ed214                                          
005ed23c                                          if ((*(uint32_t*)var_3c_1 == *(uint32_t*)((char*)var_74_1 + (temp1_1 << 2)) || *(uint32_t*)var_3c_1 == *(uint32_t*)((char*)var_74_1 + ((COMBINE(0, (var_38_1 + 1)) % 3) << 2))))
005ed29f                                              var_54_1 = -1;
005ed23c                                          else
005ed23c                                          {
005ed253                                              uint32_t eax_35 = D3DXMesh::FindEdge<uint32_t>(&arg5[(arg4[esi_2] * 3)], *(uint32_t*)var_48_1);
005ed25b                                              uint32_t ecx_8 = (esi_2 * 3);
005ed26f                                              int32_t ecx_9 = *(uint32_t*)((char*)this + 0x24c);
005ed277                                              eax_24 = *(uint16_t*)((ecx_9 + ((var_44_1 + var_38_1) << 1)) - 2);
005ed277                                              
005ed283                                              if (eax_24 != *(uint16_t*)(ecx_9 + (((COMBINE(0, (eax_35 + 1)) % 3) + ecx_8) << 1)))
005ed29f                                                  var_54_1 = -1;
005ed283                                              else
005ed283                                              {
005ed295                                                  int32_t edx_13;
005ed295                                                  edx_13 = *(uint16_t*)(ecx_9 + ((var_44_1 + temp1_1) << 1));
005ed295                                                  
005ed29d                                                  if (edx_13 != *(uint16_t*)(ecx_9 + ((ecx_8 + eax_35) << 1)))
005ed29f                                                      var_54_1 = -1;
005ed283                                              }
005ed23c                                          }
005ed206                                      }
005ed206                                      
005ed2a6                                      eax_24 = var_54_1;
005ed2aa                                      ecx_3 = var_78_1;
005ed2ad                                      edx_3 = var_84_1;
005ed2b0                                      *(uint16_t*)ecx_3 = eax_24;
005ed1e6                                  }
005ed1e6                                  
005ed2bd                                  eax_22 = ((char*)var_3c_1 + 4);
005ed2c0                                  var_38_1 += 1;
005ed2c4                                  ecx_3 += 2;
005ed2c5                                  k = k_1;
005ed2c5                                  k_1 -= 1;
005ed2c8                                  var_3c_1 = eax_22;
005ed2cb                                  var_78_1 = ecx_3;
005ed2ce                              } while (k != 1);
005ed2d4                              var_48_1 = &var_48_1[1];
005ed2d8                              var_44_1 += 3;
005ed2dc                              j = j_1;
005ed2dc                              j_1 -= 1;
005ed2df                          } while (j != 1);
005ed199                      }
005ed199                      
005ed2e5                      i_1 += 1;
005ed2eb                      var_58_1 += 0x14;
005ed2f5                  } while (i_1 < *(uint32_t*)((char*)this + 0x260));
005ed2f5                  
005ed2fb                  i_2 = 0;
005ed178              }
005ed178              
005ed303              if (*(uint32_t*)((char*)this + 0x264) > 0)
005ed303              {
005ed305                  uint32_t* ecx_11 = arg4;
005ed30b                  int32_t* edx_15 = ((char*)arg3 - ecx_11);
005ed30b                  
005ed31c                  do
005ed31c                  {
005ed30d                      *(uint32_t*)((char*)edx_15 + ecx_11) = i_2;
005ed310                      *(uint32_t*)ecx_11 = i_2;
005ed312                      i_2 += 1;
005ed313                      ecx_11 = &ecx_11[1];
005ed31c                  } while (i_2 < *(uint32_t*)((char*)this + 0x264));
005ed303              }
005ed303              
005ed338              void var_a8;
005ed338              __builtin_memcpy(&var_2c, ??0?$CMeshStatus@G$00$0PPPP@@D3DXMesh@@QAE@PAV?$GXTri3Mesh@G$00$0PPPP@@1@PAV?$NeighborInfo@G@1@G@Z(&var_a8, this, var_34_1, var_50_1), 0x24);
005ed340              D3DXMesh::CMeshStatus<uint16_t,1,65535>::~CMeshStatus<uint16_t,1,65535>(&var_a8);
005ed349              long result_1;
005ed349              
005ed349              if (temp3_1 == 0)
005ed349              {
005ed362                  unsigned long eax_42;
005ed362                  
005ed362                  if ((*(uint8_t*)((char*)arg2)[2] & 0x40) == 0)
005ed369                      eax_42 = *(uint32_t*)((char*)this + 0x278);
005ed362                  else
005ed366                      eax_42 = 7;
005ed366                  
005ed37f                  result_1 = ?VCacheStripReorder@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV?$CMeshStatus@G$00$0PPPP@@2@PAI1KK@Z(this, &var_2c, arg3, arg4, var_64_1, eax_42);
005ed349              }
005ed349              else
005ed357                  result_1 = ?SGIStripReorder@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV?$CMeshStatus@G$00$0PPPP@@2@PAI1@Z(this, &var_2c, arg3, arg4);
005ed357              
005ed384              result = result_1;
005ed163          }
005ed163          else
005ed165              result = 0x8007000e;
005ed165          
005ed389          operator delete(var_34_1);
005ed107      }
005ed107      else
005ed0f3          result = 0x8876086c;
005ed0f3      
005ed392      D3DXMesh::CMeshStatus<uint16_t,1,65535>::~CMeshStatus<uint16_t,1,65535>(&var_2c);
005ed39f      __security_check_cookie(__security_cookie_1);
005ed3a5      return result;
005ed076  }


005ed3a8  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::StripReorder(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, unsigned long arg2, uint32_t* arg3, uint32_t* arg4, unsigned long const* arg5)

005ed3a8  {
005ed3b4      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_1 = this;
005ed3b6      unsigned long eax = *(uint32_t*)((char*)this_1 + 0x274);
005ed3c1      int32_t edi;
005ed3c1      int32_t var_bc = edi;
005ed3c2      D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this_2 = this_1;
005ed3c5      unsigned long var_40_1;
005ed3c5      
005ed3c5      if (eax != 0)
005ed3cb          var_40_1 = eax;
005ed3cb      
005ed3ce      if ((eax == 0 || (*(uint8_t*)((char*)arg2)[2] & 0x40) != 0))
005ed3d0          var_40_1 = 0xc;
005ed3d0      
005ed3f2      unsigned long eax_3;
005ed3f2      
005ed3f2      if ((((0x4000000 & arg2) == 0 || eax != 0) || (arg2 & 0x400000) != 0))
005ed3ff          eax_3 = arg2;
005ed3f2      else
005ed3fb          eax_3 = ((arg2 & 0xfbffffff) | 0x8000000);
005ed3fb      
005ed404      int32_t var_80 = 0;
005ed407      int32_t var_68 = 0;
005ed40a      int32_t var_54 = 0;
005ed40d      int32_t temp3_1;
005ed40d      
005ed40d      if (arg5 != 0)
005ed41c          temp3_1 = (eax_3 & 0x8000000);
005ed41c      
005ed423      long result;
005ed423      
005ed423      if ((arg5 != 0 && (temp3_1 == 0 || (0x4000000 & eax_3) == 0)))
005ed423      {
005ed425          int32_t i_3 = *(uint32_t*)((char*)this_1 + 0x260);
005ed42d          int32_t var_24_1 = 0;
005ed42d          
005ed430          if (i_3 > 0)
005ed430          {
005ed438              int32_t* eax_5 = (*(uint32_t*)((char*)this_1 + 0x25c) + 8);
005ed449              int32_t i;
005ed449              
005ed449              do
005ed449              {
005ed43b                  int32_t edx_1 = *(uint32_t*)eax_5;
005ed43b                  
005ed440                  if (var_24_1 < edx_1)
005ed442                      var_24_1 = edx_1;
005ed442                  
005ed445                  eax_5 = &eax_5[5];
005ed448                  i = i_3;
005ed448                  i_3 -= 1;
005ed449              } while (i != 1);
005ed430          }
005ed430          
005ed44b          int32_t edi_2 = *(uint32_t*)((char*)this_1 + 0x264);
005ed458          void* eax_8 = operator new((edi_2 * 0xc));
005ed462          void* var_c_1;
005ed462          
005ed462          if (eax_8 == 0)
005ed477              var_c_1 = nullptr;
005ed462          else
005ed462          {
005ed46d              `vector constructor iterator'(eax_8, 0xc, edi_2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005ed472              var_c_1 = eax_8;
005ed462          }
005ed462          
005ed47b          uint32_t i_2 = 0;
005ed47b          
005ed480          if (var_c_1 != 0)
005ed480          {
005ed492              int32_t i_1 = 0;
005ed492              
005ed495              if (*(uint32_t*)((char*)this_1 + 0x260) > 0)
005ed495              {
005ed49b                  int32_t var_1c_1 = 0;
005ed49b                  
005ed60a                  do
005ed60a                  {
005ed4a7                      void* eax_10 = (*(uint32_t*)((char*)this_1 + 0x25c) + var_1c_1);
005ed4a9                      int32_t edi_3 = *(uint32_t*)((char*)eax_10 + 4);
005ed4af                      int32_t eax_12 = (*(uint32_t*)((char*)eax_10 + 8) + edi_3);
005ed4af                      
005ed4b6                      if (edi_3 < eax_12)
005ed4b6                      {
005ed4c2                          int32_t var_10_1 = (edi_3 * 3);
005ed4cb                          void* var_14_1 = &arg4[edi_3];
005ed4d6                          void* var_28_1 = ((char*)var_c_1 + (edi_3 * 0xc));
005ed4d9                          int32_t j_1 = (eax_12 - edi_3);
005ed5f4                          int32_t j;
005ed5f4                          
005ed5f4                          do
005ed5f4                          {
005ed4ea                              void* eax_17 = &arg5[(*(uint32_t*)var_14_1 * 3)];
005ed4ed                              void* ecx_8 = eax_17;
005ed4ef                              void* edx_4 = ((char*)var_28_1 - eax_17);
005ed4f4                              int32_t var_8_1 = 1;
005ed4fb                              void* var_18_1 = ecx_8;
005ed4fe                              void* var_48_1 = edx_4;
005ed501                              int32_t k_1 = 3;
005ed5df                              int32_t k;
005ed5df                              
005ed5df                              do
005ed5df                              {
005ed508                                  int32_t eax_18 = *(uint32_t*)ecx_8;
005ed508                                  
005ed50d                                  if (eax_18 == 0xffffffff)
005ed5cf                                      *(uint32_t*)((char*)edx_4 + ecx_8) = 0xffffffff;
005ed50d                                  else
005ed50d                                  {
005ed516                                      int32_t esi_1 = arg3[eax_18];
005ed524                                      uint32_t temp1_1;
005ed524                                      
005ed524                                      if ((esi_1 >= edi_3 && esi_1 < eax_12))
005ed532                                          temp1_1 = (COMBINE(0, var_8_1) % 3);
005ed532                                      
005ed55e                                      if ((((esi_1 < edi_3 || esi_1 >= eax_12) || *(uint32_t*)var_18_1 == *(uint32_t*)((char*)eax_17 + (temp1_1 << 2))) || *(uint32_t*)var_18_1 == *(uint32_t*)((char*)eax_17 + ((COMBINE(0, (var_8_1 + 1)) % 3) << 2))))
005ed5ca                                          esi_1 = 0xffffffff;
005ed55e                                      else
005ed55e                                      {
005ed575                                          uint32_t eax_31 = D3DXMesh::FindEdge<uint32_t>(&arg5[(arg4[esi_1] * 3)], *(uint32_t*)var_14_1);
005ed57a                                          int32_t ecx_13 = *(uint32_t*)((char*)this_1 + 0x24c);
005ed57a                                          
005ed5b7                                          if ((*(uint32_t*)((ecx_13 + ((var_10_1 + var_8_1) << 2)) - 4) != *(uint32_t*)(ecx_13 + (((COMBINE(0, (eax_31 + 1)) % 3) + (esi_1 * 3)) << 2)) || *(uint32_t*)(ecx_13 + ((var_10_1 + temp1_1) << 2)) != *(uint32_t*)(ecx_13 + (((esi_1 * 3) + eax_31) << 2))))
005ed5b9                                              esi_1 = 0xffffffff;
005ed5b9                                          
005ed5bc                                          this_1 = this_2;
005ed55e                                      }
005ed55e                                      
005ed5bf                                      edx_4 = var_48_1;
005ed5c2                                      ecx_8 = var_18_1;
005ed5c5                                      *(uint32_t*)((char*)edx_4 + ecx_8) = esi_1;
005ed50d                                  }
005ed50d                                  
005ed5d3                                  var_8_1 += 1;
005ed5d6                                  ecx_8 += 4;
005ed5d9                                  k = k_1;
005ed5d9                                  k_1 -= 1;
005ed5dc                                  var_18_1 = ecx_8;
005ed5df                              } while (k != 1);
005ed5e5                              var_28_1 += 0xc;
005ed5e9                              var_14_1 += 4;
005ed5ed                              var_10_1 += 3;
005ed5f1                              j = j_1;
005ed5f1                              j_1 -= 1;
005ed5f4                          } while (j != 1);
005ed4b6                      }
005ed4b6                      
005ed5fa                      i_1 += 1;
005ed600                      var_1c_1 += 0x14;
005ed60a                  } while (i_1 < *(uint32_t*)((char*)this_1 + 0x260));
005ed60a                  
005ed610                  i_2 = 0;
005ed495              }
005ed495              
005ed618              if (*(uint32_t*)((char*)this_1 + 0x264) > 0)
005ed618              {
005ed61a                  uint32_t* ecx_14 = arg4;
005ed620                  int32_t* edx_16 = ((char*)arg3 - ecx_14);
005ed620                  
005ed631                  do
005ed631                  {
005ed622                      *(uint32_t*)((char*)edx_16 + ecx_14) = i_2;
005ed625                      *(uint32_t*)ecx_14 = i_2;
005ed627                      i_2 += 1;
005ed628                      ecx_14 = &ecx_14[1];
005ed631                  } while (i_2 < *(uint32_t*)((char*)this_1 + 0x264));
005ed618              }
005ed618              
005ed64d              void var_b0;
005ed64d              __builtin_memcpy(&var_80, ??0?$CMeshStatus@I$0A@$0PPPPPPPP@@D3DXMesh@@QAE@PAV?$GXTri3Mesh@I$0A@$0PPPPPPPP@@1@PAV?$NeighborInfo@I@1@I@Z(&var_b0, this_1, var_c_1, var_24_1), 0x30);
005ed655              D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::~CMeshStatus<uint32_t,0,4294967295>(&var_b0);
005ed65e              long result_1;
005ed65e              
005ed65e              if (temp3_1 == 0)
005ed65e              {
005ed677                  unsigned long eax_41;
005ed677                  
005ed677                  if ((*(uint8_t*)((char*)arg2)[2] & 0x40) == 0)
005ed67e                      eax_41 = *(uint32_t*)((char*)this_1 + 0x278);
005ed677                  else
005ed67b                      eax_41 = 7;
005ed67b                  
005ed694                  result_1 = ?VCacheStripReorder@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV?$CMeshStatus@I$0A@$0PPPPPPPP@@2@PAI1KK@Z(this_1, &var_80, arg3, arg4, var_40_1, eax_41);
005ed65e              }
005ed65e              else
005ed66c                  result_1 = ?SGIStripReorder@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV?$CMeshStatus@I$0A@$0PPPPPPPP@@2@PAI1@Z(this_1, &var_80, arg3, arg4);
005ed66c              
005ed699              result = result_1;
005ed480          }
005ed480          else
005ed482              result = 0x8007000e;
005ed482          
005ed69e          operator delete(var_c_1);
005ed423      }
005ed423      else
005ed40f          result = 0x8876086c;
005ed40f      
005ed6a7      D3DXMesh::CMeshStatus<uint32_t,0,4294967295>::~CMeshStatus<uint32_t,0,4294967295>(&var_80);
005ed6b2      return result;
005ed3a8  }


005ed6b5  long __stdcall _D3DXCreateMeshFVF@24(uint32_t arg1, uint32_t arg2, unsigned long arg3, unsigned long arg4, struct IDirect3DDevice9* arg5, int32_t* arg6)

005ed6b5  {
005ed6d6      if ((arg4 == 0 || ((arg4 & 1) != 0 || (arg4 & 0x400e) == 4)))
005ed706          return 0x8876086c;
005ed706      
005ed6e0      void var_20c;
005ed6e0      long result = _D3DXDeclaratorFromFVF@8(arg4, &var_20c);
005ed6e0      
005ed6e7      if (result < 0)
005ed70c          return result;
005ed70c      
005ed6ff      return _D3DXCreateMesh@24(arg1, arg2, arg3, &var_20c, arg5, arg6);
005ed6b5  }


005ed70f  long __thiscall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::OptimizeInternal(D3DXMesh::GXTri3Mesh<uint16_t,1,65535>* this, unsigned long arg2, unsigned long const* arg3, unsigned long* arg4, unsigned long* arg5, struct ID3DXBuffer** arg6, struct IDirect3DVertexBuffer9* arg7, struct _D3DVERTEXELEMENT9 const* arg8)

005ed70f  {
005ed723      unsigned long eax = *(uint32_t*)((char*)this + 0x264);
005ed729      int32_t edi;
005ed729      int32_t var_3f0 = edi;
005ed74e      int32_t* s_1;
005ed74e      __builtin_memset(&s_1, 0, 0x1c);
005ed751      void* s;
005ed751      __builtin_memset(&s, 0, 0x1c);
005ed788      void* var_3c;
005ed788      void* var_34_1;
005ed788      uint8_t* var_30;
005ed788      void* var_2c_1;
005ed788      int32_t* var_1c;
005ed788      uint8_t* var_18;
005ed788      void* var_14_1;
005ed788      void* var_10_1;
005ed788      void* var_c_1;
005ed788      long result;
005ed788      
005ed788      if ((((arg2 != 0 && (arg2 & 0x3fefff) == 0) && (arg3 != 0 || arg4 == 0)) && ((arg2 & 0x40000000) == 0 || *(uint32_t*)((char*)this + 0x260) != 0)))
005ed788      {
005ed78a          *(uint8_t*)((char*)arg2)[3] |= 1;
005ed78a          
005ed79b          if ((arg2 & 0xc000000) != 0)
005ed79d              arg2 |= 0x2000000;
005ed79d          
005ed7a3          int32_t edx_2 = (arg2 & 0x2000000);
005ed7ad          int32_t var_40_1;
005ed7ad          int32_t var_20;
005ed7ad          
005ed7ad          if ((edx_2 == 0 || (arg2 & 0x40000000) != 0))
005ed7ad          {
005ed7fe          label_5ed7fe:
005ed7fe              var_c_1 = operator new((*(uint32_t*)((char*)this + 0x264) << 2));
005ed810              var_14_1 = operator new((*(uint32_t*)((char*)this + 0x264) << 2));
005ed81d              void* eax_10 = operator new((*(uint32_t*)((char*)this + 0x23c) << 2));
005ed828              var_10_1 = eax_10;
005ed828              
005ed83c              if (((var_c_1 == 0 || var_14_1 == 0) || eax_10 == 0))
005edde6                  result = 0x8007000e;
005ed83c              else
005ed83c              {
005ed842                  int32_t eax_11 = *(uint32_t*)((char*)this + 0x23c);
005ed84e                  int32_t eax_13 = (arg2 & 0xc000000);
005ed853                  void* eax_16;
005ed853                  
005ed853                  if (eax_13 != 0)
005ed853                  {
005ed85f                      eax_16 = operator new((*(uint32_t*)((char*)this + 0x264) << 2));
005ed867                      var_2c_1 = eax_16;
005ed853                  }
005ed853                  
005ed86a                  if ((eax_13 != 0 && eax_16 == 0))
005edde6                      result = 0x8007000e;
005ed86a                  else
005ed86a                  {
005ed881                      if (((arg2 & 0x1000000) == 0 || (arg2 & 0x40000000) != 0))
005ed881                      {
005ed8a0                          int32_t i = 0;
005ed8a0                          
005ed8a8                          if (*(uint32_t*)((char*)this + 0x264) > 0)
005ed8a8                          {
005ed8aa                              void* ecx_3 = var_c_1;
005ed8b0                              void* edx_4 = ((char*)var_14_1 - ecx_3);
005ed8b0                              
005ed8c1                              do
005ed8c1                              {
005ed8b2                                  *(uint32_t*)((char*)edx_4 + ecx_3) = i;
005ed8b5                                  *(uint32_t*)ecx_3 = i;
005ed8b7                                  i += 1;
005ed8b8                                  ecx_3 += 4;
005ed8c1                              } while (i < *(uint32_t*)((char*)this + 0x264));
005ed8a8                          }
005ed8a8                          
005ed8c3                          int32_t i_1 = 0;
005ed8c3                          
005ed8cb                          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ed8cb                          {
005ed8da                              do
005ed8da                              {
005ed8d0                                  *(uint32_t*)((char*)var_10_1 + (i_1 << 2)) = i_1;
005ed8d3                                  i_1 += 1;
005ed8da                              } while (i_1 < *(uint32_t*)((char*)this + 0x23c));
005ed8cb                          }
005ed8cb                          
005ed8cb                          goto label_5ed8dc;
005ed881                      }
005ed881                      
005ed88e                      long result_2 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Compact(this, var_c_1, var_14_1, var_10_1);
005ed895                      result = result_2;
005ed895                      
005ed898                      if (result_2 >= 0)
005ed898                      {
005ed8dc                      label_5ed8dc:
005ed8dc                          
005ed8e7                          if ((edx_2 == 0 || (arg2 & 0x40000000) != 0))
005ed8e7                          {
005ed908                          label_5ed908:
005ed908                              int32_t temp1_1 = (arg2 & 0x10000000);
005ed908                              
005ed90f                              if (temp1_1 != 0)
005ed90f                              {
005ed911                                  int32_t i_2 = 0;
005ed911                                  
005ed919                                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ed919                                  {
005ed928                                      do
005ed928                                      {
005ed91e                                          *(uint32_t*)((char*)var_10_1 + (i_2 << 2)) = i_2;
005ed921                                          i_2 += 1;
005ed928                                      } while (i_2 < *(uint32_t*)((char*)this + 0x23c));
005ed919                                  }
005ed90f                              }
005ed90f                              
005ed932                              long result_4 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::ReorderFaceData(this, var_c_1, var_10_1);
005ed939                              result = result_4;
005ed939                              
005ed93c                              if (result_4 >= 0)
005ed93c                              {
005ed945                                  if (eax_13 == 0)
005ed945                                  {
005eda8b                                  label_5eda8b:
005eda9b                                      int32_t var_38_1;
005eda9b                                      
005eda9b                                      if (((arg6 != 0 || var_20 > 0) || *(uint32_t*)((char*)this + 0x240) == 0))
005eda9b                                      {
005edaa4                                          int32_t** var_3f4_11 = &var_1c;
005edaae                                          int32_t var_3f8_9 = (*(uint32_t*)((char*)this + 0x23c) << 2);
005edaaf                                          long result_7 = _D3DXCreateBuffer@8();
005edab6                                          result = result_7;
005edab6                                          
005edab9                                          if (result_7 >= 0)
005edab9                                          {
005edabf                                              int32_t* eax_25 = var_1c;
005edac5                                              int32_t eax_26 = *(uint32_t*)(*(uint32_t*)eax_25 + 0xc)(eax_25);
005edaca                                              int32_t i_3 = 0;
005edad2                                              var_38_1 = eax_26;
005edad2                                              
005edad5                                              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005edad5                                              {
005edae2                                                  do
005edae2                                                  {
005edad7                                                      *(uint32_t*)(eax_26 + (i_3 << 2)) = 0xffffffff;
005edadb                                                      i_3 += 1;
005edae2                                                  } while (i_3 < *(uint32_t*)((char*)this + 0x23c));
005edad5                                              }
005edad5                                              
005edae4                                              int32_t ecx_25 = 0;
005edae4                                              
005edae9                                              if (eax_11 > 0)
005edae9                                              {
005edb00                                                  do
005edb00                                                  {
005edaee                                                      int32_t edx_9 = *(uint32_t*)((char*)var_10_1 + (ecx_25 << 2));
005edaee                                                      
005edaf7                                                      if (edx_9 != 0xffff)
005edaf9                                                          *(uint32_t*)(eax_26 + (edx_9 << 2)) = ecx_25;
005edaf9                                                      
005edafc                                                      ecx_25 += 1;
005edb00                                                  } while (ecx_25 < eax_11);
005edae9                                              }
005edae9                                              
005edb05                                              if (var_20 > 0)
005edb05                                              {
005edb07                                                  int32_t i_4 = 0;
005edb07                                                  
005edb0f                                                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005edb0f                                                  {
005edb31                                                      do
005edb31                                                      {
005edb11                                                          int32_t ecx_26 = *(uint32_t*)(eax_26 + (i_4 << 2));
005edb11                                                          
005edb1c                                                          if ((ecx_26 != 0xffffffff && ecx_26 >= var_40_1))
005edb27                                                              *(uint32_t*)(eax_26 + (i_4 << 2)) = *(uint32_t*)((char*)var_3c + ((ecx_26 - var_40_1) << 2));
005edb27                                                          
005edb2a                                                          i_4 += 1;
005edb31                                                      } while (i_4 < *(uint32_t*)((char*)this + 0x23c));
005edb0f                                                  }
005edb05                                              }
005edb05                                              
005edae9                                              goto label_5edb35;
005edab9                                          }
005eda9b                                      }
005eda9b                                      else
005eda9b                                      {
005edb35                                      label_5edb35:
005edb35                                          
005edb40                                          if ((var_20 == 0 && *(uint32_t*)((char*)this + 0x240) > 0))
005edb40                                          {
005edb49                                              long result_8 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(this, &var_18, 0);
005edb50                                              result = result_8;
005edb50                                              
005edb53                                              if (result_8 >= 0)
005edb53                                              {
005edb61                                                  long result_9 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::ReorderVertexData(this, var_10_1, var_18);
005edb68                                                  result = result_9;
005edb68                                                  
005edb6b                                                  if (result_9 >= 0)
005edb6b                                                      goto label_5edd3a;
005edb53                                              }
005edb40                                          }
005edb40                                          else if ((*(uint8_t*)((char*)this + 0x218) & 0x20) != 0)
005edb7d                                          {
005edd3a                                          label_5edd3a:
005edd3a                                              
005edd3a                                              if (arg5 != 0)
005edd3a                                              {
005edd42                                                  void* esi_11 = var_c_1;
005edd45                                                  int32_t ecx_45 = (*(uint32_t*)((char*)this + 0x264) << 2);
005edd45                                                  
005edd51                                                  if ((*(uint8_t*)((char*)arg2)[3] & 0x80) == 0)
005edd53                                                      esi_11 = var_14_1;
005edd53                                                  
005edd56                                                  int32_t esi_12;
005edd56                                                  int32_t edi_10;
005edd56                                                  edi_10 = __builtin_memcpy(arg5, esi_11, ((ecx_45 >> 2) << 2));
005edd5d                                                  __builtin_memcpy(edi_10, esi_12, (ecx_45 & 3));
005edd3a                                              }
005edd3a                                              
005edd62                                              int32_t i_5 = 0;
005edd62                                              
005edd66                                              if (arg4 == 0)
005edd66                                              {
005eddd2                                              label_5eddd2:
005eddd2                                                  
005eddd6                                                  if (arg6 != 0)
005eddd6                                                  {
005eddd8                                                      int32_t* eax_41 = var_1c;
005eddde                                                      var_1c = nullptr;
005edde2                                                      *(uint32_t*)arg6 = eax_41;
005eddd6                                                  }
005edd66                                              }
005edd66                                              else
005edd66                                              {
005edd6b                                                  if (arg4 != arg3)
005edd6b                                                  {
005edd88                                                      if (*(uint32_t*)((char*)this + 0x264) > 0)
005edd88                                                      {
005edd8a                                                          arg2 = arg4;
005edd8a                                                          
005eddd0                                                          do
005eddd0                                                          {
005edd9c                                                              unsigned long eax_40 = arg2;
005edd9f                                                              void* ecx_51 = (&arg3[(*(uint32_t*)((char*)var_14_1 + (i_5 << 2)) * 3)] - eax_40);
005edda1                                                              arg8 = 3;
005eddc3                                                              struct _D3DVERTEXELEMENT9* j;
005eddc3                                                              
005eddc3                                                              do
005eddc3                                                              {
005edda8                                                                  int32_t esi_13 = *(uint32_t*)((char*)ecx_51 + eax_40);
005edda8                                                                  
005eddae                                                                  if (esi_13 == 0xffffffff)
005eddba                                                                      *(uint32_t*)eax_40 = 0xffffffff;
005eddae                                                                  else
005eddb6                                                                      *(uint32_t*)eax_40 = *(uint32_t*)((char*)var_c_1 + (esi_13 << 2));
005eddb6                                                                  
005eddbd                                                                  eax_40 += 4;
005eddc0                                                                  j = arg8;
005eddc0                                                                  arg8 -= 1;
005eddc3                                                              } while (j != 1);
005eddc5                                                              arg2 += 0xc;
005eddc9                                                              i_5 += 1;
005eddd0                                                          } while (i_5 < *(uint32_t*)((char*)this + 0x264));
005edd88                                                      }
005edd88                                                      
005edd88                                                      goto label_5eddd2;
005edd6b                                                  }
005edd6b                                                  
005edd74                                                  long result_13 = D3DXMesh::ReorderNeighborData(var_c_1, arg4, eax);
005edd7b                                                  result = result_13;
005edd7b                                                  
005edd7e                                                  if (result_13 >= 0)
005edd7e                                                      goto label_5eddd2;
005edd66                                              }
005edb7d                                          }
005edb7d                                          else
005edb7d                                          {
005edb89                                              uint32_t edi_5 = *(uint32_t*)((char*)this + 0x23c);
005edb8f                                              s_1 = *(uint32_t*)((char*)this + 0x234);
005edb98                                              s = *(uint32_t*)((char*)this + 0x244);
005edb98                                              
005edba5                                              if (*(uint32_t*)((char*)this + 0x240) == 0)
005edba5                                              {
005edba7                                                  int32_t* s_2 = arg7;
005edbaa                                                  int32_t ecx_31 = *(uint32_t*)s_2;
005edbad                                                  s_1 = s_2;
005edbb0                                                  *(uint32_t*)(ecx_31 + 4)(s_2);
005edba5                                              }
005edba5                                              
005edbb6                                              uint32_t var_3f8_12 = *(uint32_t*)((char*)this + 0x264);
005edbbe                                              *(uint32_t*)((char*)this + 0x234) = 0;
005edbc4                                              *(uint32_t*)((char*)this + 0x23c) = 0;
005edbca                                              *(uint32_t*)((char*)this + 0x240) = 0;
005edbcc                                              *(uint32_t*)((char*)this + 0x244) = 0;
005edbd2                                              long result_10 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Resize(this, var_3f8_12, edi_5);
005edbd9                                              result = result_10;
005edbd9                                              
005edbdc                                              if (result_10 >= 0)
005edbdc                                              {
005edbea                                                  long result_11 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(this, &var_18, 0);
005edbf1                                                  result = result_11;
005edbf1                                                  
005edbf4                                                  if (result_11 >= 0)
005edbf4                                                  {
005edbfa                                                      int32_t* s_3 = s_1;
005edc0d                                                      long result_12 = *(uint32_t*)(*(uint32_t*)s_3 + 0x2c)(s_3, 0, 0, &var_30, 0x810);
005edc12                                                      result = result_12;
005edc12                                                      
005edc15                                                      if (result_12 >= 0)
005edc15                                                      {
005edc20                                                          if (arg8 == 0)
005edc20                                                          {
005edc87                                                          label_5edc87:
005edc87                                                              uint8_t* eax_32 = var_18;
005edc8a                                                              arg8 = nullptr;
005edc8a                                                              
005edc8d                                                              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005edc8d                                                              {
005edccd                                                                  do
005edccd                                                                  {
005edc95                                                                      int32_t edx_11 = *(uint32_t*)(var_38_1 + (arg8 << 2));
005edc95                                                                      
005edc9b                                                                      if (edx_11 != 0xffffffff)
005edc9b                                                                      {
005edc9d                                                                          int32_t ecx_39 = *(uint32_t*)((char*)this + 0x238);
005edcb2                                                                          int32_t esi_9;
005edcb2                                                                          int32_t edi_7;
005edcb2                                                                          edi_7 = __builtin_memcpy(eax_32, &var_30[(ecx_39 * edx_11)], ((ecx_39 >> 2) << 2));
005edcb9                                                                          __builtin_memcpy(edi_7, esi_9, (ecx_39 & 3));
005edcbb                                                                          eax_32 = &eax_32[*(uint32_t*)((char*)this + 0x238)];
005edc9b                                                                      }
005edc9b                                                                      
005edcc1                                                                      arg8 = (&arg8->Stream + 1);
005edccd                                                                  } while (arg8 < *(uint32_t*)((char*)this + 0x23c));
005edc8d                                                              }
005edc20                                                          }
005edc20                                                          else
005edc20                                                          {
005edc30                                                              if (D3DXMesh::BIdenticalDecls(arg8, ((char*)this + 0xc)) != 0)
005edc30                                                                  goto label_5edc87;
005edc30                                                              
005edc3c                                                              D3DXMesh::SVertexCopyContext var_3e4;
005edc3c                                                              D3DXMesh::SVertexCopyContext::SVertexCopyContext(&var_3e4, arg8, ((char*)this + 0xc));
005edc4d                                                              D3DXMesh::SVertexCopyContext::SetStreamSource(&var_3e4, var_30, var_18);
005edc52                                                              uint32_t i_6 = 0;
005edc52                                                              
005edc5a                                                              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005edc5a                                                              {
005edc7d                                                                  do
005edc7d                                                                  {
005edc5f                                                                      uint32_t eax_31 = *(uint32_t*)(var_38_1 + (i_6 << 2));
005edc5f                                                                      
005edc65                                                                      if (eax_31 != 0xffffffff)
005edc71                                                                          D3DXMesh::SVertexCopyContext::CopyVertex(&var_3e4, eax_31, i_6, 1);
005edc71                                                                      
005edc76                                                                      i_6 += 1;
005edc7d                                                                  } while (i_6 < *(uint32_t*)((char*)this + 0x23c));
005edc5a                                                              }
005edc20                                                          }
005edc20                                                          
005edcd1                                                          void* s_5 = s;
005edcd1                                                          
005edcd6                                                          if (s_5 != 0)
005edcd6                                                          {
005edcd8                                                              int32_t i_7 = 0;
005edcd8                                                              
005edce0                                                              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005edce0                                                              {
005edd04                                                                  do
005edd04                                                                  {
005edcf5                                                                      uint32_t edx_15;
005edcf5                                                                      edx_15 = *(uint16_t*)((char*)var_10_1 + (((uint32_t)*(uint16_t*)((char*)s_5 + (*(uint32_t*)(var_38_1 + (i_7 << 2)) << 1))) << 2));
005edcf9                                                                      *(uint16_t*)(*(uint32_t*)((char*)this + 0x244) + (i_7 << 1)) = edx_15;
005edcfd                                                                      i_7 += 1;
005edd04                                                                  } while (i_7 < *(uint32_t*)((char*)this + 0x23c));
005edce0                                                              }
005edcd6                                                          }
005edcd6                                                          
005edd06                                                          int32_t i_8 = 0;
005edd08                                                          int32_t edx_16 = 0;
005edd08                                                          
005edd10                                                          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005edd10                                                          {
005edd2d                                                              do
005edd2d                                                              {
005edd15                                                                  void* eax_34 = ((char*)var_10_1 + (i_8 << 2));
005edd15                                                                  
005edd1e                                                                  if (*(uint32_t*)eax_34 == 0xffff)
005edd23                                                                      *(uint32_t*)eax_34 = 0xffffffff;
005edd1e                                                                  else
005edd20                                                                      edx_16 += 1;
005edd20                                                                  
005edd26                                                                  i_8 += 1;
005edd2d                                                              } while (i_8 < *(uint32_t*)((char*)this + 0x23c));
005edd10                                                          }
005edd10                                                          
005edd2f                                                          *(uint32_t*)((char*)this + 0x23c) = edx_16;
005edcd6                                                          goto label_5edd3a;
005edc15                                                      }
005edbf4                                                  }
005edbdc                                              }
005edb7d                                          }
005eda9b                                      }
005ed945                                  }
005ed945                                  else
005ed945                                  {
005ed95a                                      int32_t ecx_9 = (*(uint32_t*)((char*)this + 0x264) << 2);
005ed96b                                      int32_t esi_2;
005ed96b                                      int32_t edi_3;
005ed96b                                      edi_3 = __builtin_memcpy(var_2c_1, var_14_1, ((ecx_9 >> 2) << 2));
005ed972                                      __builtin_memcpy(edi_3, esi_2, (ecx_9 & 3));
005ed976                                      long result_5 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::StripReorder(this, arg2, var_c_1, var_14_1, arg3);
005ed97d                                      result = result_5;
005ed97d                                      
005ed980                                      if (result_5 >= 0)
005ed980                                      {
005ed990                                          void* eax_20 = operator new((*(uint32_t*)((char*)this + 0x23c) << 2));
005ed998                                          var_34_1 = eax_20;
005ed998                                          
005ed99b                                          if (eax_20 == 0)
005edde6                                              result = 0x8007000e;
005ed99b                                          else
005ed99b                                          {
005ed9a5                                              if (temp1_1 != 0)
005ed9a5                                              {
005ed9ea                                                  int32_t i_9 = 0;
005ed9ea                                                  
005ed9f2                                                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ed9f2                                                  {
005ed9fe                                                      do
005ed9fe                                                      {
005ed9f4                                                          *(uint32_t*)((char*)eax_20 + (i_9 << 2)) = i_9;
005ed9f7                                                          i_9 += 1;
005ed9fe                                                      } while (i_9 < *(uint32_t*)((char*)this + 0x23c));
005ed9f2                                                  }
005ed9a5                                              }
005ed9a5                                              else
005ed9a5                                              {
005ed9ad                                                  D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::VertexOptimize(this, var_14_1, eax_20);
005ed9b4                                                  result = 0;
005ed9bd                                                  eax_20 = var_34_1;
005ed9c0                                                  int32_t i_10 = 0;
005ed9c0                                                  
005ed9c8                                                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ed9c8                                                  {
005ed9e6                                                      do
005ed9e6                                                      {
005ed9cd                                                          void* ecx_17 = ((char*)var_10_1 + (i_10 << 2));
005ed9d0                                                          int32_t edx_5 = *(uint32_t*)ecx_17;
005ed9d0                                                          
005ed9d8                                                          if (edx_5 != 0xffff)
005ed9dd                                                              *(uint32_t*)ecx_17 = *(uint32_t*)((char*)eax_20 + (edx_5 << 2));
005ed9dd                                                          
005ed9df                                                          i_10 += 1;
005ed9e6                                                      } while (i_10 < *(uint32_t*)((char*)this + 0x23c));
005ed9c8                                                  }
005ed9a5                                              }
005ed9a5                                              
005eda06                                              long result_6 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::ReorderFaceData(this, var_c_1, eax_20);
005eda0d                                              result = result_6;
005eda0d                                              
005eda10                                              if (result_6 >= 0)
005eda10                                              {
005eda18                                                  int32_t i_11 = 0;
005eda18                                                  
005eda20                                                  if (*(uint32_t*)((char*)this + 0x264) > 0)
005eda20                                                  {
005eda43                                                      do
005eda43                                                      {
005eda25                                                          void* eax_22 = ((char*)var_14_1 + (i_11 << 2));
005eda28                                                          int32_t ecx_19 = *(uint32_t*)eax_22;
005eda28                                                          
005eda2d                                                          if (ecx_19 == 0xffffffff)
005eda39                                                              *(uint32_t*)eax_22 = 0xffffffff;
005eda2d                                                          else
005eda35                                                              *(uint32_t*)eax_22 = *(uint32_t*)((char*)var_2c_1 + (ecx_19 << 2));
005eda35                                                          
005eda3c                                                          i_11 += 1;
005eda43                                                      } while (i_11 < *(uint32_t*)((char*)this + 0x264));
005eda20                                                  }
005eda20                                                  
005eda45                                                  int32_t i_12 = 0;
005eda45                                                  
005eda4d                                                  if (*(uint32_t*)((char*)this + 0x264) > 0)
005eda4d                                                  {
005eda60                                                      do
005eda60                                                      {
005eda52                                                          *(uint32_t*)((char*)var_c_1 + (i_12 << 2)) = 0xffff;
005eda59                                                          i_12 += 1;
005eda60                                                      } while (i_12 < *(uint32_t*)((char*)this + 0x264));
005eda4d                                                  }
005eda4d                                                  
005eda62                                                  int32_t i_13 = 0;
005eda62                                                  
005eda6a                                                  if (*(uint32_t*)((char*)this + 0x264) > 0)
005eda6a                                                  {
005eda87                                                      do
005eda87                                                      {
005eda6f                                                          int32_t ecx_23 = *(uint32_t*)((char*)var_14_1 + (i_13 << 2));
005eda6f                                                          
005eda78                                                          if (ecx_23 != 0xffff)
005eda7d                                                              *(uint32_t*)((char*)var_c_1 + (ecx_23 << 2)) = i_13;
005eda7d                                                          
005eda80                                                          i_13 += 1;
005eda87                                                      } while (i_13 < *(uint32_t*)((char*)this + 0x264));
005eda6a                                                  }
005eda6a                                                  
005eda4d                                                  goto label_5eda8b;
005eda10                                              }
005ed99b                                          }
005ed980                                      }
005ed945                                  }
005ed93c                              }
005ed8e7                          }
005ed8e7                          else
005ed8e7                          {
005ed8f5                              long result_3 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::AttributeSort(this, var_c_1, var_14_1, var_10_1, arg2);
005ed8fc                              result = result_3;
005ed8fc                              
005ed8ff                              if (result_3 >= 0)
005ed8ff                                  goto label_5ed908;
005ed8e7                          }
005ed898                      }
005ed86a                  }
005ed83c              }
005ed7ad          }
005ed7ad          else
005ed7ad          {
005ed7b9              var_40_1 = *(uint32_t*)((char*)this + 0x23c);
005ed7b9              
005ed7bc              if ((*(uint8_t*)((char*)arg2)[3] & 0x20) != 0)
005ed7bc                  goto label_5ed7fe;
005ed7bc              
005ed7c8              long result_1 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::SplitSharedVertices(this, &var_3c, &var_20);
005ed7cf              result = result_1;
005ed7cf              
005ed7d2              if (result_1 >= 0)
005ed7d2              {
005ed7e1                  if ((var_20 <= 0 || (*(uint8_t*)((char*)arg2)[3] & 0x10) == 0))
005ed7db                      goto label_5ed7fe;
005ed7db                  
005ed7e3                  result = 0x88760b56;
005ed7d2              }
005ed7ad          }
005ed788      }
005ed788      else
005ed759          result = 0x8876086c;
005ed759      
005eddf0      operator delete(var_10_1);
005eddf8      operator delete(var_c_1);
005ede00      operator delete(var_14_1);
005ede08      operator delete(var_2c_1);
005ede10      operator delete(var_3c);
005ede18      operator delete(var_34_1);
005ede1d      void* s_4 = s;
005ede1d      
005ede29      if (*(uint32_t*)((char*)this + 0x244) != s_4)
005ede2c          operator delete(s_4);
005ede2c      
005ede37      if (var_18 != 0)
005ede37      {
005ede39          int32_t* ebx_1 = *(uint32_t*)((char*)this + 0x234);
005ede42          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005ede37      }
005ede37      
005ede48      int32_t* s_6 = s_1;
005ede48      
005ede4b      if (var_30 != 0)
005ede50          *(uint32_t*)(*(uint32_t*)s_6 + 0x30)(s_6);
005ede50      
005ede53      int32_t* eax_44 = var_1c;
005ede53      
005ede58      if (eax_44 != 0)
005ede58      {
005ede5d          *(uint32_t*)(*(uint32_t*)eax_44 + 8)(eax_44);
005ede60          var_1c = nullptr;
005ede58      }
005ede58      
005ede65      if (s_6 != 0)
005ede6a          *(uint32_t*)(*(uint32_t*)s_6 + 8)(s_6);
005ede6a      
005ede74      return result;
005ed70f  }


005ede77  long __thiscall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::OptimizeInternal(D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* this, unsigned long arg2, unsigned long const* arg3, unsigned long* arg4, unsigned long* arg5, struct ID3DXBuffer** arg6, struct IDirect3DVertexBuffer9* arg7, struct _D3DVERTEXELEMENT9 const* arg8)

005ede77  {
005ede8b      unsigned long eax = *(uint32_t*)((char*)this + 0x264);
005ede91      int32_t edi;
005ede91      int32_t var_3f0 = edi;
005edeb6      int32_t* s_1;
005edeb6      __builtin_memset(&s_1, 0, 0x1c);
005edeb9      void* s;
005edeb9      __builtin_memset(&s, 0, 0x1c);
005edef0      void* var_3c;
005edef0      void* var_34_1;
005edef0      uint8_t* var_30;
005edef0      void* var_2c_1;
005edef0      int32_t* var_1c;
005edef0      uint8_t* var_18;
005edef0      void* var_14_1;
005edef0      void* var_10_1;
005edef0      void* var_c_1;
005edef0      long result;
005edef0      
005edef0      if ((((arg2 != 0 && (arg2 & 0x3fefff) == 0) && (arg3 != 0 || arg4 == 0)) && ((arg2 & 0x40000000) == 0 || *(uint32_t*)((char*)this + 0x260) != 0)))
005edef0      {
005edef2          *(uint8_t*)((char*)arg2)[3] |= 1;
005edef2          
005edf03          if ((arg2 & 0xc000000) != 0)
005edf05              arg2 |= 0x2000000;
005edf05          
005edf0b          int32_t edx_2 = (arg2 & 0x2000000);
005edf15          int32_t var_40_1;
005edf15          int32_t var_20;
005edf15          
005edf15          if ((edx_2 == 0 || (arg2 & 0x40000000) != 0))
005edf15          {
005edf66          label_5edf66:
005edf66              var_c_1 = operator new((*(uint32_t*)((char*)this + 0x264) << 2));
005edf78              var_14_1 = operator new((*(uint32_t*)((char*)this + 0x264) << 2));
005edf85              void* eax_10 = operator new((*(uint32_t*)((char*)this + 0x23c) << 2));
005edf90              var_10_1 = eax_10;
005edf90              
005edfa4              if (((var_c_1 == 0 || var_14_1 == 0) || eax_10 == 0))
005ee53c                  result = 0x8007000e;
005edfa4              else
005edfa4              {
005edfaa                  int32_t eax_11 = *(uint32_t*)((char*)this + 0x23c);
005edfb6                  int32_t eax_13 = (arg2 & 0xc000000);
005edfbb                  void* eax_16;
005edfbb                  
005edfbb                  if (eax_13 != 0)
005edfbb                  {
005edfc7                      eax_16 = operator new((*(uint32_t*)((char*)this + 0x264) << 2));
005edfcf                      var_2c_1 = eax_16;
005edfbb                  }
005edfbb                  
005edfd2                  if ((eax_13 != 0 && eax_16 == 0))
005ee53c                      result = 0x8007000e;
005edfd2                  else
005edfd2                  {
005edfe9                      if (((arg2 & 0x1000000) == 0 || (arg2 & 0x40000000) != 0))
005edfe9                      {
005ee008                          int32_t i = 0;
005ee008                          
005ee010                          if (*(uint32_t*)((char*)this + 0x264) > 0)
005ee010                          {
005ee012                              void* ecx_3 = var_c_1;
005ee018                              void* edx_4 = ((char*)var_14_1 - ecx_3);
005ee018                              
005ee029                              do
005ee029                              {
005ee01a                                  *(uint32_t*)((char*)edx_4 + ecx_3) = i;
005ee01d                                  *(uint32_t*)ecx_3 = i;
005ee01f                                  i += 1;
005ee020                                  ecx_3 += 4;
005ee029                              } while (i < *(uint32_t*)((char*)this + 0x264));
005ee010                          }
005ee010                          
005ee02b                          int32_t i_1 = 0;
005ee02b                          
005ee033                          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee033                          {
005ee042                              do
005ee042                              {
005ee038                                  *(uint32_t*)((char*)var_10_1 + (i_1 << 2)) = i_1;
005ee03b                                  i_1 += 1;
005ee042                              } while (i_1 < *(uint32_t*)((char*)this + 0x23c));
005ee033                          }
005ee033                          
005ee033                          goto label_5ee044;
005edfe9                      }
005edfe9                      
005edff6                      long result_2 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Compact(this, var_c_1, var_14_1, var_10_1);
005edffd                      result = result_2;
005edffd                      
005ee000                      if (result_2 >= 0)
005ee000                      {
005ee044                      label_5ee044:
005ee044                          
005ee04f                          if ((edx_2 == 0 || (arg2 & 0x40000000) != 0))
005ee04f                          {
005ee070                          label_5ee070:
005ee070                              int32_t temp1_1 = (arg2 & 0x10000000);
005ee070                              
005ee077                              if (temp1_1 != 0)
005ee077                              {
005ee079                                  int32_t i_2 = 0;
005ee079                                  
005ee081                                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee081                                  {
005ee090                                      do
005ee090                                      {
005ee086                                          *(uint32_t*)((char*)var_10_1 + (i_2 << 2)) = i_2;
005ee089                                          i_2 += 1;
005ee090                                      } while (i_2 < *(uint32_t*)((char*)this + 0x23c));
005ee081                                  }
005ee077                              }
005ee077                              
005ee09a                              long result_4 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::ReorderFaceData(this, var_c_1, var_10_1);
005ee0a1                              result = result_4;
005ee0a1                              
005ee0a4                              if (result_4 >= 0)
005ee0a4                              {
005ee0ad                                  if (eax_13 == 0)
005ee0ad                                  {
005ee1ea                                  label_5ee1ea:
005ee1fa                                      int32_t var_38_1;
005ee1fa                                      
005ee1fa                                      if (((arg6 != 0 || var_20 > 0) || *(uint32_t*)((char*)this + 0x240) == 0))
005ee1fa                                      {
005ee203                                          int32_t** var_3f4_11 = &var_1c;
005ee20d                                          int32_t var_3f8_9 = (*(uint32_t*)((char*)this + 0x23c) << 2);
005ee20e                                          long result_7 = _D3DXCreateBuffer@8();
005ee215                                          result = result_7;
005ee215                                          
005ee218                                          if (result_7 >= 0)
005ee218                                          {
005ee21e                                              int32_t* eax_25 = var_1c;
005ee224                                              int32_t eax_26 = *(uint32_t*)(*(uint32_t*)eax_25 + 0xc)(eax_25);
005ee229                                              int32_t i_3 = 0;
005ee231                                              var_38_1 = eax_26;
005ee231                                              
005ee234                                              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee234                                              {
005ee241                                                  do
005ee241                                                  {
005ee236                                                      *(uint32_t*)(eax_26 + (i_3 << 2)) = 0xffffffff;
005ee23a                                                      i_3 += 1;
005ee241                                                  } while (i_3 < *(uint32_t*)((char*)this + 0x23c));
005ee234                                              }
005ee234                                              
005ee243                                              int32_t ecx_25 = 0;
005ee243                                              
005ee248                                              if (eax_11 > 0)
005ee248                                              {
005ee25c                                                  do
005ee25c                                                  {
005ee24d                                                      int32_t edx_9 = *(uint32_t*)((char*)var_10_1 + (ecx_25 << 2));
005ee24d                                                      
005ee253                                                      if (edx_9 != 0xffffffff)
005ee255                                                          *(uint32_t*)(eax_26 + (edx_9 << 2)) = ecx_25;
005ee255                                                      
005ee258                                                      ecx_25 += 1;
005ee25c                                                  } while (ecx_25 < eax_11);
005ee248                                              }
005ee248                                              
005ee261                                              if (var_20 > 0)
005ee261                                              {
005ee263                                                  int32_t i_4 = 0;
005ee263                                                  
005ee26b                                                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee26b                                                  {
005ee28d                                                      do
005ee28d                                                      {
005ee26d                                                          int32_t ecx_26 = *(uint32_t*)(eax_26 + (i_4 << 2));
005ee26d                                                          
005ee278                                                          if ((ecx_26 != 0xffffffff && ecx_26 >= var_40_1))
005ee283                                                              *(uint32_t*)(eax_26 + (i_4 << 2)) = *(uint32_t*)((char*)var_3c + ((ecx_26 - var_40_1) << 2));
005ee283                                                          
005ee286                                                          i_4 += 1;
005ee28d                                                      } while (i_4 < *(uint32_t*)((char*)this + 0x23c));
005ee26b                                                  }
005ee261                                              }
005ee261                                              
005ee248                                              goto label_5ee291;
005ee218                                          }
005ee1fa                                      }
005ee1fa                                      else
005ee1fa                                      {
005ee291                                      label_5ee291:
005ee291                                          
005ee29c                                          if ((var_20 == 0 && *(uint32_t*)((char*)this + 0x240) > 0))
005ee29c                                          {
005ee2a5                                              long result_8 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(this, &var_18, 0);
005ee2ac                                              result = result_8;
005ee2ac                                              
005ee2af                                              if (result_8 >= 0)
005ee2af                                              {
005ee2bd                                                  long result_9 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::ReorderVertexData(this, var_10_1, var_18);
005ee2c4                                                  result = result_9;
005ee2c4                                                  
005ee2c7                                                  if (result_9 >= 0)
005ee2c7                                                      goto label_5ee490;
005ee2af                                              }
005ee29c                                          }
005ee29c                                          else if ((*(uint8_t*)((char*)this + 0x218) & 0x20) != 0)
005ee2d9                                          {
005ee490                                          label_5ee490:
005ee490                                              
005ee490                                              if (arg5 != 0)
005ee490                                              {
005ee498                                                  void* esi_11 = var_c_1;
005ee49b                                                  int32_t ecx_45 = (*(uint32_t*)((char*)this + 0x264) << 2);
005ee49b                                                  
005ee4a7                                                  if ((*(uint8_t*)((char*)arg2)[3] & 0x80) == 0)
005ee4a9                                                      esi_11 = var_14_1;
005ee4a9                                                  
005ee4ac                                                  int32_t esi_12;
005ee4ac                                                  int32_t edi_10;
005ee4ac                                                  edi_10 = __builtin_memcpy(arg5, esi_11, ((ecx_45 >> 2) << 2));
005ee4b3                                                  __builtin_memcpy(edi_10, esi_12, (ecx_45 & 3));
005ee490                                              }
005ee490                                              
005ee4b8                                              int32_t i_5 = 0;
005ee4b8                                              
005ee4bc                                              if (arg4 == 0)
005ee4bc                                              {
005ee528                                              label_5ee528:
005ee528                                                  
005ee52c                                                  if (arg6 != 0)
005ee52c                                                  {
005ee52e                                                      int32_t* eax_41 = var_1c;
005ee534                                                      var_1c = nullptr;
005ee538                                                      *(uint32_t*)arg6 = eax_41;
005ee52c                                                  }
005ee4bc                                              }
005ee4bc                                              else
005ee4bc                                              {
005ee4c1                                                  if (arg4 != arg3)
005ee4c1                                                  {
005ee4de                                                      if (*(uint32_t*)((char*)this + 0x264) > 0)
005ee4de                                                      {
005ee4e0                                                          arg2 = arg4;
005ee4e0                                                          
005ee526                                                          do
005ee526                                                          {
005ee4f2                                                              unsigned long eax_40 = arg2;
005ee4f5                                                              void* ecx_51 = (&arg3[(*(uint32_t*)((char*)var_14_1 + (i_5 << 2)) * 3)] - eax_40);
005ee4f7                                                              arg8 = 3;
005ee519                                                              struct _D3DVERTEXELEMENT9* j;
005ee519                                                              
005ee519                                                              do
005ee519                                                              {
005ee4fe                                                                  int32_t esi_13 = *(uint32_t*)((char*)ecx_51 + eax_40);
005ee4fe                                                                  
005ee504                                                                  if (esi_13 == 0xffffffff)
005ee510                                                                      *(uint32_t*)eax_40 = 0xffffffff;
005ee504                                                                  else
005ee50c                                                                      *(uint32_t*)eax_40 = *(uint32_t*)((char*)var_c_1 + (esi_13 << 2));
005ee50c                                                                  
005ee513                                                                  eax_40 += 4;
005ee516                                                                  j = arg8;
005ee516                                                                  arg8 -= 1;
005ee519                                                              } while (j != 1);
005ee51b                                                              arg2 += 0xc;
005ee51f                                                              i_5 += 1;
005ee526                                                          } while (i_5 < *(uint32_t*)((char*)this + 0x264));
005ee4de                                                      }
005ee4de                                                      
005ee4de                                                      goto label_5ee528;
005ee4c1                                                  }
005ee4c1                                                  
005ee4ca                                                  long result_13 = D3DXMesh::ReorderNeighborData(var_c_1, arg4, eax);
005ee4d1                                                  result = result_13;
005ee4d1                                                  
005ee4d4                                                  if (result_13 >= 0)
005ee4d4                                                      goto label_5ee528;
005ee4bc                                              }
005ee2d9                                          }
005ee2d9                                          else
005ee2d9                                          {
005ee2e5                                              uint32_t edi_5 = *(uint32_t*)((char*)this + 0x23c);
005ee2eb                                              s_1 = *(uint32_t*)((char*)this + 0x234);
005ee2f4                                              s = *(uint32_t*)((char*)this + 0x244);
005ee2f4                                              
005ee301                                              if (*(uint32_t*)((char*)this + 0x240) == 0)
005ee301                                              {
005ee303                                                  int32_t* s_2 = arg7;
005ee306                                                  int32_t ecx_31 = *(uint32_t*)s_2;
005ee309                                                  s_1 = s_2;
005ee30c                                                  *(uint32_t*)(ecx_31 + 4)(s_2);
005ee301                                              }
005ee301                                              
005ee312                                              uint32_t var_3f8_12 = *(uint32_t*)((char*)this + 0x264);
005ee31a                                              *(uint32_t*)((char*)this + 0x234) = 0;
005ee320                                              *(uint32_t*)((char*)this + 0x23c) = 0;
005ee326                                              *(uint32_t*)((char*)this + 0x240) = 0;
005ee328                                              *(uint32_t*)((char*)this + 0x244) = 0;
005ee32e                                              long result_10 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Resize(this, var_3f8_12, edi_5);
005ee335                                              result = result_10;
005ee335                                              
005ee338                                              if (result_10 >= 0)
005ee338                                              {
005ee346                                                  long result_11 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockVB(this, &var_18, 0);
005ee34d                                                  result = result_11;
005ee34d                                                  
005ee350                                                  if (result_11 >= 0)
005ee350                                                  {
005ee356                                                      int32_t* s_3 = s_1;
005ee369                                                      long result_12 = *(uint32_t*)(*(uint32_t*)s_3 + 0x2c)(s_3, 0, 0, &var_30, 0x810);
005ee36e                                                      result = result_12;
005ee36e                                                      
005ee371                                                      if (result_12 >= 0)
005ee371                                                      {
005ee37c                                                          if (arg8 == 0)
005ee37c                                                          {
005ee3e3                                                          label_5ee3e3:
005ee3e3                                                              uint8_t* eax_32 = var_18;
005ee3e6                                                              arg8 = nullptr;
005ee3e6                                                              
005ee3e9                                                              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee3e9                                                              {
005ee429                                                                  do
005ee429                                                                  {
005ee3f1                                                                      int32_t edx_11 = *(uint32_t*)(var_38_1 + (arg8 << 2));
005ee3f1                                                                      
005ee3f7                                                                      if (edx_11 != 0xffffffff)
005ee3f7                                                                      {
005ee3f9                                                                          int32_t ecx_39 = *(uint32_t*)((char*)this + 0x238);
005ee40e                                                                          int32_t esi_9;
005ee40e                                                                          int32_t edi_7;
005ee40e                                                                          edi_7 = __builtin_memcpy(eax_32, &var_30[(ecx_39 * edx_11)], ((ecx_39 >> 2) << 2));
005ee415                                                                          __builtin_memcpy(edi_7, esi_9, (ecx_39 & 3));
005ee417                                                                          eax_32 = &eax_32[*(uint32_t*)((char*)this + 0x238)];
005ee3f7                                                                      }
005ee3f7                                                                      
005ee41d                                                                      arg8 = (&arg8->Stream + 1);
005ee429                                                                  } while (arg8 < *(uint32_t*)((char*)this + 0x23c));
005ee3e9                                                              }
005ee37c                                                          }
005ee37c                                                          else
005ee37c                                                          {
005ee38c                                                              if (D3DXMesh::BIdenticalDecls(arg8, ((char*)this + 0xc)) != 0)
005ee38c                                                                  goto label_5ee3e3;
005ee38c                                                              
005ee398                                                              D3DXMesh::SVertexCopyContext var_3e4;
005ee398                                                              D3DXMesh::SVertexCopyContext::SVertexCopyContext(&var_3e4, arg8, ((char*)this + 0xc));
005ee3a9                                                              D3DXMesh::SVertexCopyContext::SetStreamSource(&var_3e4, var_30, var_18);
005ee3ae                                                              uint32_t i_6 = 0;
005ee3ae                                                              
005ee3b6                                                              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee3b6                                                              {
005ee3d9                                                                  do
005ee3d9                                                                  {
005ee3bb                                                                      uint32_t eax_31 = *(uint32_t*)(var_38_1 + (i_6 << 2));
005ee3bb                                                                      
005ee3c1                                                                      if (eax_31 != 0xffffffff)
005ee3cd                                                                          D3DXMesh::SVertexCopyContext::CopyVertex(&var_3e4, eax_31, i_6, 1);
005ee3cd                                                                      
005ee3d2                                                                      i_6 += 1;
005ee3d9                                                                  } while (i_6 < *(uint32_t*)((char*)this + 0x23c));
005ee3b6                                                              }
005ee37c                                                          }
005ee37c                                                          
005ee42d                                                          void* s_5 = s;
005ee42d                                                          
005ee432                                                          if (s_5 != 0)
005ee432                                                          {
005ee434                                                              int32_t i_7 = 0;
005ee434                                                              
005ee43c                                                              if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee43c                                                              {
005ee45d                                                                  do
005ee45d                                                                  {
005ee453                                                                      *(uint32_t*)(*(uint32_t*)((char*)this + 0x244) + (i_7 << 2)) = *(uint32_t*)((char*)var_10_1 + (*(uint32_t*)((char*)s_5 + (*(uint32_t*)(var_38_1 + (i_7 << 2)) << 2)) << 2));
005ee456                                                                      i_7 += 1;
005ee45d                                                                  } while (i_7 < *(uint32_t*)((char*)this + 0x23c));
005ee43c                                                              }
005ee432                                                          }
005ee432                                                          
005ee45f                                                          int32_t i_8 = 0;
005ee461                                                          int32_t edx_17 = 0;
005ee461                                                          
005ee469                                                          if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee469                                                          {
005ee483                                                              do
005ee483                                                              {
005ee46e                                                                  void* eax_34 = ((char*)var_10_1 + (i_8 << 2));
005ee46e                                                                  
005ee474                                                                  if (*(uint32_t*)eax_34 == 0xffffffff)
005ee479                                                                      *(uint32_t*)eax_34 = 0xffffffff;
005ee474                                                                  else
005ee476                                                                      edx_17 += 1;
005ee476                                                                  
005ee47c                                                                  i_8 += 1;
005ee483                                                              } while (i_8 < *(uint32_t*)((char*)this + 0x23c));
005ee469                                                          }
005ee469                                                          
005ee485                                                          *(uint32_t*)((char*)this + 0x23c) = edx_17;
005ee432                                                          goto label_5ee490;
005ee371                                                      }
005ee350                                                  }
005ee338                                              }
005ee2d9                                          }
005ee1fa                                      }
005ee0ad                                  }
005ee0ad                                  else
005ee0ad                                  {
005ee0c2                                      int32_t ecx_9 = (*(uint32_t*)((char*)this + 0x264) << 2);
005ee0d3                                      int32_t esi_2;
005ee0d3                                      int32_t edi_3;
005ee0d3                                      edi_3 = __builtin_memcpy(var_2c_1, var_14_1, ((ecx_9 >> 2) << 2));
005ee0da                                      __builtin_memcpy(edi_3, esi_2, (ecx_9 & 3));
005ee0de                                      long result_5 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::StripReorder(this, arg2, var_c_1, var_14_1, arg3);
005ee0e5                                      result = result_5;
005ee0e5                                      
005ee0e8                                      if (result_5 >= 0)
005ee0e8                                      {
005ee0f8                                          void* eax_20 = operator new((*(uint32_t*)((char*)this + 0x23c) << 2));
005ee100                                          var_34_1 = eax_20;
005ee100                                          
005ee103                                          if (eax_20 == 0)
005ee53c                                              result = 0x8007000e;
005ee103                                          else
005ee103                                          {
005ee10d                                              if (temp1_1 != 0)
005ee10d                                              {
005ee14f                                                  int32_t i_9 = 0;
005ee14f                                                  
005ee157                                                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee157                                                  {
005ee163                                                      do
005ee163                                                      {
005ee159                                                          *(uint32_t*)((char*)eax_20 + (i_9 << 2)) = i_9;
005ee15c                                                          i_9 += 1;
005ee163                                                      } while (i_9 < *(uint32_t*)((char*)this + 0x23c));
005ee157                                                  }
005ee10d                                              }
005ee10d                                              else
005ee10d                                              {
005ee115                                                  D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::VertexOptimize(this, var_14_1, eax_20);
005ee11c                                                  result = 0;
005ee125                                                  eax_20 = var_34_1;
005ee128                                                  int32_t i_10 = 0;
005ee128                                                  
005ee130                                                  if (*(uint32_t*)((char*)this + 0x23c) > 0)
005ee130                                                  {
005ee14b                                                      do
005ee14b                                                      {
005ee135                                                          void* ecx_17 = ((char*)var_10_1 + (i_10 << 2));
005ee138                                                          int32_t edx_5 = *(uint32_t*)ecx_17;
005ee138                                                          
005ee13d                                                          if (edx_5 != 0xffffffff)
005ee142                                                              *(uint32_t*)ecx_17 = *(uint32_t*)((char*)eax_20 + (edx_5 << 2));
005ee142                                                          
005ee144                                                          i_10 += 1;
005ee14b                                                      } while (i_10 < *(uint32_t*)((char*)this + 0x23c));
005ee130                                                  }
005ee10d                                              }
005ee10d                                              
005ee16b                                              long result_6 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::ReorderFaceData(this, var_c_1, eax_20);
005ee172                                              result = result_6;
005ee172                                              
005ee175                                              if (result_6 >= 0)
005ee175                                              {
005ee17d                                                  int32_t i_11 = 0;
005ee17d                                                  
005ee185                                                  if (*(uint32_t*)((char*)this + 0x264) > 0)
005ee185                                                  {
005ee1a8                                                      do
005ee1a8                                                      {
005ee18a                                                          void* eax_22 = ((char*)var_14_1 + (i_11 << 2));
005ee18d                                                          int32_t ecx_19 = *(uint32_t*)eax_22;
005ee18d                                                          
005ee192                                                          if (ecx_19 == 0xffffffff)
005ee19e                                                              *(uint32_t*)eax_22 = 0xffffffff;
005ee192                                                          else
005ee19a                                                              *(uint32_t*)eax_22 = *(uint32_t*)((char*)var_2c_1 + (ecx_19 << 2));
005ee19a                                                          
005ee1a1                                                          i_11 += 1;
005ee1a8                                                      } while (i_11 < *(uint32_t*)((char*)this + 0x264));
005ee185                                                  }
005ee185                                                  
005ee1aa                                                  int32_t i_12 = 0;
005ee1aa                                                  
005ee1b2                                                  if (*(uint32_t*)((char*)this + 0x264) > 0)
005ee1b2                                                  {
005ee1c2                                                      do
005ee1c2                                                      {
005ee1b7                                                          *(uint32_t*)((char*)var_c_1 + (i_12 << 2)) = 0xffffffff;
005ee1bb                                                          i_12 += 1;
005ee1c2                                                      } while (i_12 < *(uint32_t*)((char*)this + 0x264));
005ee1b2                                                  }
005ee1b2                                                  
005ee1c4                                                  int32_t i_13 = 0;
005ee1c4                                                  
005ee1cc                                                  if (*(uint32_t*)((char*)this + 0x264) > 0)
005ee1cc                                                  {
005ee1e6                                                      do
005ee1e6                                                      {
005ee1d1                                                          int32_t ecx_23 = *(uint32_t*)((char*)var_14_1 + (i_13 << 2));
005ee1d1                                                          
005ee1d7                                                          if (ecx_23 != 0xffffffff)
005ee1dc                                                              *(uint32_t*)((char*)var_c_1 + (ecx_23 << 2)) = i_13;
005ee1dc                                                          
005ee1df                                                          i_13 += 1;
005ee1e6                                                      } while (i_13 < *(uint32_t*)((char*)this + 0x264));
005ee1cc                                                  }
005ee1cc                                                  
005ee1b2                                                  goto label_5ee1ea;
005ee175                                              }
005ee103                                          }
005ee0e8                                      }
005ee0ad                                  }
005ee0a4                              }
005ee04f                          }
005ee04f                          else
005ee04f                          {
005ee05d                              long result_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::AttributeSort(this, var_c_1, var_14_1, var_10_1, arg2);
005ee064                              result = result_3;
005ee064                              
005ee067                              if (result_3 >= 0)
005ee067                                  goto label_5ee070;
005ee04f                          }
005ee000                      }
005edfd2                  }
005edfa4              }
005edf15          }
005edf15          else
005edf15          {
005edf21              var_40_1 = *(uint32_t*)((char*)this + 0x23c);
005edf21              
005edf24              if ((*(uint8_t*)((char*)arg2)[3] & 0x20) != 0)
005edf24                  goto label_5edf66;
005edf24              
005edf30              long result_1 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::SplitSharedVertices(this, &var_3c, &var_20);
005edf37              result = result_1;
005edf37              
005edf3a              if (result_1 >= 0)
005edf3a              {
005edf49                  if ((var_20 <= 0 || (*(uint8_t*)((char*)arg2)[3] & 0x10) == 0))
005edf43                      goto label_5edf66;
005edf43                  
005edf4b                  result = 0x88760b56;
005edf3a              }
005edf15          }
005edef0      }
005edef0      else
005edec1          result = 0x8876086c;
005edec1      
005ee546      operator delete(var_10_1);
005ee54e      operator delete(var_c_1);
005ee556      operator delete(var_14_1);
005ee55e      operator delete(var_2c_1);
005ee566      operator delete(var_3c);
005ee56e      operator delete(var_34_1);
005ee573      void* s_4 = s;
005ee573      
005ee57f      if (*(uint32_t*)((char*)this + 0x244) != s_4)
005ee582          operator delete(s_4);
005ee582      
005ee58d      if (var_18 != 0)
005ee58d      {
005ee58f          int32_t* ebx_1 = *(uint32_t*)((char*)this + 0x234);
005ee598          *(uint32_t*)(*(uint32_t*)ebx_1 + 0x30)(ebx_1);
005ee58d      }
005ee58d      
005ee59e      int32_t* s_6 = s_1;
005ee59e      
005ee5a1      if (var_30 != 0)
005ee5a6          *(uint32_t*)(*(uint32_t*)s_6 + 0x30)(s_6);
005ee5a6      
005ee5a9      int32_t* eax_44 = var_1c;
005ee5a9      
005ee5ae      if (eax_44 != 0)
005ee5ae      {
005ee5b3          *(uint32_t*)(*(uint32_t*)eax_44 + 8)(eax_44);
005ee5b6          var_1c = nullptr;
005ee5ae      }
005ee5ae      
005ee5bb      if (s_6 != 0)
005ee5c0          *(uint32_t*)(*(uint32_t*)s_6 + 8)(s_6);
005ee5c0      
005ee5ca      return result;
005ede77  }


005ee5cd  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Optimize(unsigned long arg1, unsigned long const* arg2, unsigned long* arg3, unsigned long* arg4, struct ID3DXBuffer** arg5, struct ID3DXMesh** arg6)

005ee5cd  {
005ee5e9      if (((arg2 & 0xc0be2000) != 0 || ((arg2 & 1) != 0 || (0x400 & arg2) != 0)))
005ee5eb          return 0x8876086c;
005ee5eb      
005ee5f7      int32_t edi;
005ee5f7      int32_t var_8_1 = edi;
005ee5f8      unsigned long edi_1 = arg1;
005ee5fb      int32_t ecx_1 = *(uint32_t*)(edi_1 + 0x214);
005ee5fb      
005ee614      if (((0x400 & ecx_1) == 0 && (ecx_1 & 0x40) == 0))
005ee614      {
005ee619          void* esi_2 = (arg2 & 0x1cfff);
005ee619          
005ee624          if (esi_2 == 0)
005ee624          {
005ee641              void* ecx_2;
005ee641              
005ee641              if ((0x1000 & arg2) == 0)
005ee647                  ecx_2 = (ecx_1 & 0xffffefff);
005ee641              else
005ee643                  ecx_2 = (ecx_1 | 0x1000);
005ee643              
005ee64d              esi_2 = ecx_2;
005ee624          }
005ee624          else
005ee624          {
005ee628              if ((0x1000 & arg2) != 0)
005ee62a                  esi_2 |= 0x1000;
005ee62a              
005ee62f              if ((ecx_1 & 1) != 0)
005ee631                  esi_2 |= 1;
005ee631              
005ee63a              arg2 &= 0xfffe3000;
005ee624          }
005ee624          
005ee654          void* eax_1 = operator new(0x27c);
005ee65c          D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* esi_3;
005ee65c          
005ee65c          if (eax_1 == 0)
005ee674              esi_3 = nullptr;
005ee65c          else
005ee670              esi_3 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::GXTri3Mesh<uint16_t,1,65535>(eax_1, *(uint32_t*)(edi_1 + 0x230), (edi_1 + 0xc), esi_2);
005ee670          
005ee678          if (esi_3 != 0)
005ee678          {
005ee690              uint32_t eax_3;
005ee690              
005ee690              if ((*(uint8_t*)((char*)esi_3 + 0x218) & 0x20) == 0)
005ee69a                  eax_3 = 0;
005ee690              else
005ee692                  eax_3 = *(uint32_t*)(edi_1 + 0x23c);
005ee692              
005ee6a5              long eax_4 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::Resize(esi_3, *(uint32_t*)(edi_1 + 0x264), eax_3);
005ee6ac              arg1 = eax_4;
005ee6ac              
005ee6af              if (eax_4 >= 0)
005ee6af              {
005ee6bb                  if ((*(uint8_t*)((char*)esi_3 + 0x218) & 0x20) != 0)
005ee6bb                  {
005ee6bd                      *(uint32_t*)(edi_1 + 0x218) |= 0x20;
005ee6cb                      *(uint32_t*)((char*)esi_3 + 0x234) = *(uint32_t*)(edi_1 + 0x234);
005ee6d1                      int32_t* eax_6 = *(uint32_t*)(edi_1 + 0x234);
005ee6d6                      *(uint32_t*)(*(uint32_t*)eax_6 + 4)(eax_6);
005ee6d9                      *(uint8_t*)((char*)arg2)[3] |= 0x10;
005ee6bb                  }
005ee6bb                  
005ee6e0                  long eax_7 = ?CopyMesh@?$GXTri3Mesh@G$00$0PPPP@@D3DXMesh@@AAEJPAV12@@Z(esi_3, edi_1);
005ee6e7                  arg1 = eax_7;
005ee6e7                  
005ee6ea                  if (eax_7 >= 0)
005ee6ea                  {
005ee6f2                      if ((*(uint8_t*)((char*)esi_3 + 0x218) & 0x20) == 0)
005ee6fa                          *(uint32_t*)((char*)esi_3 + 0x23c) = *(uint32_t*)(edi_1 + 0x23c);
005ee6fa                      
005ee70b                      long eax_9 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(esi_3, ((char*)esi_3 + 0x24c), 0);
005ee712                      arg1 = eax_9;
005ee712                      
005ee715                      if (eax_9 >= 0)
005ee715                      {
005ee730                          long eax_10;
005ee730                          int80_t st0_1;
005ee730                          eax_10 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::OptimizeInternal(esi_3, arg2, arg3, arg4, arg5, arg6, *(uint32_t*)(edi_1 + 0x234), nullptr);
005ee737                          arg1 = eax_10;
005ee737                          
005ee73a                          if (eax_10 >= 0)
005ee73a                          {
005ee73f                              if (*(uint32_t*)((char*)esi_3 + 0x24c) != 0)
005ee73f                              {
005ee741                                  int32_t* eax_11 = *(uint32_t*)((char*)esi_3 + 0x248);
005ee74a                                  *(uint32_t*)(*(uint32_t*)eax_11 + 0x30)(eax_11);
005ee74d                                  *(uint32_t*)((char*)esi_3 + 0x24c) = nullptr;
005ee73f                              }
005ee73f                              
005ee753                              *(uint32_t*)arg_1c = esi_3;
005ee755                              esi_3 = nullptr;
005ee73a                          }
005ee715                      }
005ee6ea                  }
005ee6af              }
005ee6af              
005ee75a              if (esi_3 != 0)
005ee75a              {
005ee763                  if (*(uint32_t*)((char*)esi_3 + 0x24c) != 0)
005ee763                  {
005ee765                      int32_t* eax_13 = *(uint32_t*)((char*)esi_3 + 0x248);
005ee76e                      *(uint32_t*)(*(uint32_t*)eax_13 + 0x30)(eax_13);
005ee763                  }
005ee763                  
005ee774                  *(uint32_t*)(*(uint32_t*)esi_3 + 8)(esi_3);
005ee75a              }
005ee678          }
005ee678          else
005ee67a              arg1 = 0x8007000e;
005ee614      }
005ee614      else
005ee605          arg1 = 0x8876086c;
005ee605      
005ee77d      return arg1;
005ee5cd  }


005ee780  long __stdcall D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::OptimizeInplace(unsigned long arg1, unsigned long const* arg2, unsigned long* arg3, unsigned long* arg4, struct ID3DXBuffer** arg5)

005ee780  {
005ee787      unsigned long esi = arg1;
005ee793      int32_t edi;
005ee793      int32_t var_10 = edi;
005ee794      int16_t eax_1;
005ee794      
005ee794      if ((arg2 & 0xc0bfefff) == 0)
005ee79f          eax_1 = ((int16_t)*(uint32_t*)(esi + 0x214));
005ee79f      
005ee7ac      if ((((arg2 & 0xc0bfefff) != 0 || (*(uint8_t*)((char*)eax_1)[1] & 4) != 0) || (eax_1 & 0x40) != 0))
005ee796          arg1 = 0x8876086c;
005ee7ac      else
005ee7ac      {
005ee7b8          long eax_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(esi, (esi + 0x24c), 0);
005ee7bf          arg1 = eax_3;
005ee7bf          
005ee7c2          if (eax_3 >= 0)
005ee7c2          {
005ee7cb              if ((*(uint8_t*)(esi + 0x218) & 0x20) != 0)
005ee7cd                  *(uint8_t*)((char*)arg2)[3] |= 0x10;
005ee7cd              
005ee7e4              long eax_4;
005ee7e4              int80_t st0_1;
005ee7e4              eax_4 = D3DXMesh::GXTri3Mesh<uint16_t,1,65535>::OptimizeInternal(esi, arg2, arg3, arg4, arg5, arg_18, nullptr, nullptr);
005ee7e9              arg1 = eax_4;
005ee7c2          }
005ee7ac      }
005ee7ac      
005ee7f4      if (*(uint32_t*)(esi + 0x24c) != 0)
005ee7f4      {
005ee7f6          int32_t* esi_1 = *(uint32_t*)(esi + 0x248);
005ee7ff          *(uint32_t*)(*(uint32_t*)esi_1 + 0x30)(esi_1);
005ee802          *(uint32_t*)(esi + 0x24c) = 0;
005ee7f4      }
005ee7f4      
005ee80b      return arg1;
005ee780  }


005ee80e  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Optimize(unsigned long arg1, unsigned long const* arg2, unsigned long* arg3, unsigned long* arg4, struct ID3DXBuffer** arg5, struct ID3DXMesh** arg6)

005ee80e  {
005ee82a      if (((arg2 & 0xc0be2000) != 0 || ((arg2 & 1) != 0 || (0x400 & arg2) != 0)))
005ee82c          return 0x8876086c;
005ee82c      
005ee838      int32_t edi;
005ee838      int32_t var_8_1 = edi;
005ee839      unsigned long edi_1 = arg1;
005ee83c      int32_t ecx_1 = *(uint32_t*)(edi_1 + 0x214);
005ee83c      
005ee855      if (((0x400 & ecx_1) == 0 && (ecx_1 & 0x40) == 0))
005ee855      {
005ee85a          void* esi_2 = (arg2 & 0x1cfff);
005ee85a          
005ee865          if (esi_2 == 0)
005ee865          {
005ee882              void* ecx_2;
005ee882              
005ee882              if ((0x1000 & arg2) == 0)
005ee888                  ecx_2 = (ecx_1 & 0xffffefff);
005ee882              else
005ee884                  ecx_2 = (ecx_1 | 0x1000);
005ee884              
005ee88e              esi_2 = ecx_2;
005ee865          }
005ee865          else
005ee865          {
005ee869              if ((0x1000 & arg2) != 0)
005ee86b                  esi_2 |= 0x1000;
005ee86b              
005ee870              if ((ecx_1 & 1) != 0)
005ee872                  esi_2 |= 1;
005ee872              
005ee87b              arg2 &= 0xfffe3000;
005ee865          }
005ee865          
005ee895          void* eax_1 = operator new(0x27c);
005ee89d          D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>* esi_3;
005ee89d          
005ee89d          if (eax_1 == 0)
005ee8b5              esi_3 = nullptr;
005ee89d          else
005ee8b1              esi_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::GXTri3Mesh<uint32_t,0,4294967295>(eax_1, *(uint32_t*)(edi_1 + 0x230), (edi_1 + 0xc), esi_2);
005ee8b1          
005ee8b9          if (esi_3 != 0)
005ee8b9          {
005ee8d1              uint32_t eax_3;
005ee8d1              
005ee8d1              if ((*(uint8_t*)((char*)esi_3 + 0x218) & 0x20) == 0)
005ee8db                  eax_3 = 0;
005ee8d1              else
005ee8d3                  eax_3 = *(uint32_t*)(edi_1 + 0x23c);
005ee8d3              
005ee8e6              long eax_4 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::Resize(esi_3, *(uint32_t*)(edi_1 + 0x264), eax_3);
005ee8ed              arg1 = eax_4;
005ee8ed              
005ee8f0              if (eax_4 >= 0)
005ee8f0              {
005ee8fc                  if ((*(uint8_t*)((char*)esi_3 + 0x218) & 0x20) != 0)
005ee8fc                  {
005ee8fe                      *(uint32_t*)(edi_1 + 0x218) |= 0x20;
005ee90c                      *(uint32_t*)((char*)esi_3 + 0x234) = *(uint32_t*)(edi_1 + 0x234);
005ee912                      int32_t* eax_6 = *(uint32_t*)(edi_1 + 0x234);
005ee917                      *(uint32_t*)(*(uint32_t*)eax_6 + 4)(eax_6);
005ee91a                      *(uint8_t*)((char*)arg2)[3] |= 0x10;
005ee8fc                  }
005ee8fc                  
005ee921                  long eax_7 = ?CopyMesh@?$GXTri3Mesh@I$0A@$0PPPPPPPP@@D3DXMesh@@AAEJPAV12@@Z(esi_3, edi_1);
005ee928                  arg1 = eax_7;
005ee928                  
005ee92b                  if (eax_7 >= 0)
005ee92b                  {
005ee933                      if ((*(uint8_t*)((char*)esi_3 + 0x218) & 0x20) == 0)
005ee93b                          *(uint32_t*)((char*)esi_3 + 0x23c) = *(uint32_t*)(edi_1 + 0x23c);
005ee93b                      
005ee94c                      long eax_9 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(esi_3, ((char*)esi_3 + 0x24c), 0);
005ee953                      arg1 = eax_9;
005ee953                      
005ee956                      if (eax_9 >= 0)
005ee956                      {
005ee971                          long eax_10;
005ee971                          int80_t st0_1;
005ee971                          eax_10 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::OptimizeInternal(esi_3, arg2, arg3, arg4, arg5, arg6, *(uint32_t*)(edi_1 + 0x234), nullptr);
005ee978                          arg1 = eax_10;
005ee978                          
005ee97b                          if (eax_10 >= 0)
005ee97b                          {
005ee980                              if (*(uint32_t*)((char*)esi_3 + 0x24c) != 0)
005ee980                              {
005ee982                                  int32_t* eax_11 = *(uint32_t*)((char*)esi_3 + 0x248);
005ee98b                                  *(uint32_t*)(*(uint32_t*)eax_11 + 0x30)(eax_11);
005ee98e                                  *(uint32_t*)((char*)esi_3 + 0x24c) = nullptr;
005ee980                              }
005ee980                              
005ee994                              *(uint32_t*)arg_1c = esi_3;
005ee996                              esi_3 = nullptr;
005ee97b                          }
005ee956                      }
005ee92b                  }
005ee8f0              }
005ee8f0              
005ee99b              if (esi_3 != 0)
005ee99b              {
005ee9a4                  if (*(uint32_t*)((char*)esi_3 + 0x24c) != 0)
005ee9a4                  {
005ee9a6                      int32_t* eax_13 = *(uint32_t*)((char*)esi_3 + 0x248);
005ee9af                      *(uint32_t*)(*(uint32_t*)eax_13 + 0x30)(eax_13);
005ee9a4                  }
005ee9a4                  
005ee9b5                  *(uint32_t*)(*(uint32_t*)esi_3 + 8)(esi_3);
005ee99b              }
005ee8b9          }
005ee8b9          else
005ee8bb              arg1 = 0x8007000e;
005ee855      }
005ee855      else
005ee846          arg1 = 0x8876086c;
005ee846      
005ee9be      return arg1;
005ee80e  }


005ee9c1  long __stdcall D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::OptimizeInplace(unsigned long arg1, unsigned long const* arg2, unsigned long* arg3, unsigned long* arg4, struct ID3DXBuffer** arg5)

005ee9c1  {
005ee9c8      unsigned long esi = arg1;
005ee9d4      int32_t edi;
005ee9d4      int32_t var_10 = edi;
005ee9d5      int16_t eax_1;
005ee9d5      
005ee9d5      if ((arg2 & 0xc0bfefff) == 0)
005ee9e0          eax_1 = ((int16_t)*(uint32_t*)(esi + 0x214));
005ee9e0      
005ee9ed      if ((((arg2 & 0xc0bfefff) != 0 || (*(uint8_t*)((char*)eax_1)[1] & 4) != 0) || (eax_1 & 0x40) != 0))
005ee9d7          arg1 = 0x8876086c;
005ee9ed      else
005ee9ed      {
005ee9f9          long eax_3 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::LockIB(esi, (esi + 0x24c), 0);
005eea00          arg1 = eax_3;
005eea00          
005eea03          if (eax_3 >= 0)
005eea03          {
005eea0c              if ((*(uint8_t*)(esi + 0x218) & 0x20) != 0)
005eea0e                  *(uint8_t*)((char*)arg2)[3] |= 0x10;
005eea0e              
005eea25              long eax_4;
005eea25              int80_t st0_1;
005eea25              eax_4 = D3DXMesh::GXTri3Mesh<uint32_t,0,4294967295>::OptimizeInternal(esi, arg2, arg3, arg4, arg5, arg_18, nullptr, nullptr);
005eea2a              arg1 = eax_4;
005eea03          }
005ee9ed      }
005ee9ed      
005eea35      if (*(uint32_t*)(esi + 0x24c) != 0)
005eea35      {
005eea37          int32_t* esi_1 = *(uint32_t*)(esi + 0x248);
005eea40          *(uint32_t*)(*(uint32_t*)esi_1 + 0x30)(esi_1);
005eea43          *(uint32_t*)(esi + 0x24c) = 0;
005eea35      }
005eea35      
005eea4c      return arg1;
005ee9c1  }


005eea4f  int32_t __stdcall D3DXDebugMuteInt(int32_t arg1)

005eea4f  {
005eea54      HKEY ecx;
005eea54      HKEY var_8 = ecx;
005eea55      bool cond:0 = data_8f1980 != 0;
005eea5c      int32_t result = data_8f1978;
005eea67      data_8f1978 = arg1;
005eea67      
005eea75      if ((!(cond:0) && data_8f197c == 0))
005eea75      {
005eea79          int32_t edi;
005eea79          int32_t var_14_1 = edi;
005eea86          bool cond:1_1 = GetModuleHandleA("d3d9.dll") == 0;
005eea88          void (* kernel32_GetProcAddress_Ptr_1)() = kernel32_GetProcAddress_Ptr;
005eea88          
005eea94          if (!(cond:1_1))
005eea94          {
005eea97              HINSTANCE eax_2 = LoadLibraryA("d3d9.dll");
005eea97              
005eea9b              if (eax_2 != 0)
005eeaa5                  data_8f1980 = kernel32_GetProcAddress_Ptr_1(eax_2, "DebugSetMute");
005eea94          }
005eea94          
005eeab0          HINSTANCE eax_4;
005eeab0          eax_4 = GetModuleHandleA("d3d9d.dll");
005eeab0          
005eeab8          if (eax_4 != 0)
005eeab8          {
005eeabb              HINSTANCE eax_5;
005eeabb              eax_5 = LoadLibraryA("d3d9d.dll");
005eeabb              
005eeabf              if (eax_5 != 0)
005eeabf              {
005eeac7                  int32_t eax_6;
005eeac7                  eax_6 = kernel32_GetProcAddress_Ptr_1(eax_5, "DebugSetMute");
005eeac9                  data_8f197c = eax_6;
005eeabf              }
005eeab8          }
005eea75      }
005eea75      
005eead8      if (data_824428 != 0xffffffff)
005eead8          goto label_5eeb0a;
005eead8      
005eeada      int32_t __saved_ebx_1 = 4;
005eeadc      int32_t __saved_esi_1 = 0x824428;
005eeae8      int32_t eax_7 = sub_5fe4d7(ecx, 4, "D3DXDoNotMute");
005eeae8      
005eeaef      if (eax_7 == 0)
005eeaf1          data_824428 &= eax_7;
005eeaf1      
005eeafe      if (data_824428 == 0)
005eeafe          goto label_5eeb13;
005eeafe      
005eeb00      data_824428 = 1;
005eeb0a  label_5eeb0a:
005eeb0a      
005eeb11      if (data_824428 == 0)
005eeb11      {
005eeb13      label_5eeb13:
005eeb13          int32_t eax_8 = data_8f1980;
005eeb13          
005eeb1a          if (eax_8 != 0)
005eeb1f              eax_8(arg1, result);
005eeb1f          
005eeb22          int32_t eax_9 = data_8f197c;
005eeb22          
005eeb29          if (eax_9 != 0)
005eeb2e              eax_9(arg1, result);
005eeb11      }
005eeb11      
005eeb35      return result;
005eea4f  }


005eeb38  void __stdcall D3DXCheckNewDelete()

005eeb38  {
005eeb3d      int32_t ecx;
005eeb3d      int32_t var_8 = ecx;
005eeb3d      
005eeb47      if (data_8f1984 == 0)
005eeb47      {
005eeb4c          int32_t edi;
005eeb4c          int32_t var_14_1 = edi;
005eeb4f          data_8f1984 = 1;
005eeb55          int32_t var_8_1 = 0;
005eeb58          void* eax_1 = operator new(0);
005eeb60          void* eax_2 = operator new(0);
005eeb60          
005eeb73          if (((eax_1 == 0 || eax_2 == 0) || eax_1 == eax_2))
005eeb75              var_8_1 = 1;
005eeb75          
005eeb7a          if (eax_1 != 0)
005eeb7d              operator delete(eax_1);
005eeb7d          
005eeb89          if ((eax_2 != 0 && eax_2 != eax_1))
005eeb8c              operator delete(eax_2);
005eeb8c          
005eeb94          operator delete(nullptr);
005eeb94          
005eeb9e          if (var_8_1 != 0)
005eeb9e          {
005eebab              OutputDebugStringA("D3DX: (WARN) Overloaded ::new an…");
005eebb2              OutputDebugStringA("D3DX: (WARN) An allocation of ze…");
005eebb9              OutputDebugStringA("D3DX: (WARN) least zero bytes. D…");
005eebc0              OutputDebugStringA("D3DX: (WARN) D3DX relies upon th…");
005eeb9e          }
005eeb47      }
005eeb38  }


005eebc7  void __thiscall D3DXTex::CBlt::CBlt(D3DXTex::CBlt* this)

005eebc7  {
005eebc9      *(uint32_t*)((char*)this + 4) = 0;
005eebcd      *(uint32_t*)this = 0;
005eebc7  }


005eebd1  void __thiscall D3DXTex::CBlt::~CBlt(D3DXTex::CBlt* this)

005eebd1  {
005eebd6      int32_t* ecx = *(uint32_t*)((char*)this + 4);
005eebd6      
005eebdb      if (ecx != 0)
005eebe1          **(uint32_t**)ecx(1);
005eebe1      
005eebe3      int32_t* ecx_1 = *(uint32_t*)this;
005eebe3      
005eebe8      if (ecx_1 != 0)
005eebee          **(uint32_t**)ecx_1(1);
005eebd1  }


005eebf1  int32_t __thiscall _floorf@4(int32_t arg1, float arg2)

005eebf1  {
005eebfa      int32_t var_c = arg1;
005eebfb      var_c = ((double)((long double)arg2));
005eec06      return j_floor(var_c, arg1);
005eebf1  }


005eec09  void __thiscall D3DXTex::TF_Row::TF_Row(D3DXTex::TF_Row* this)

005eec09  {
005eec0d      *(uint32_t*)this = 0;
005eec0f      *(uint32_t*)((char*)this + 4) = 0;
005eec12      *(uint32_t*)((char*)this + 8) = 0;
005eec09  }


005eec16  void __thiscall D3DXTex::TF_Row::~TF_Row(D3DXTex::TF_Row* this)

005eec16  {
005eec18      operator delete(*(uint32_t*)this);
005eec16  }


005eec1f  void* __stdcall sub_5eec1f(int32_t arg1, void* arg2, int32_t arg3)

005eec1f  {
005eec2c      int32_t edi;
005eec2c      int32_t var_4c = edi;
005eec2d      int32_t edi_1 = 0;
005eec2d      
005eec31      if (arg1 != 0)
005eec31      {
005eec37          int32_t eax_1 = arg2;
005eec37          
005eec3c          if (eax_1 != 0)
005eec3c          {
005eec47              long double x87_r7_1 = ((long double)eax_1);
005eec47              
005eec4a              if (eax_1 < 0)
005eec4c                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
005eec4c              
005eec54              float var_20_1 = ((float)x87_r7_1);
005eec5a              long double x87_r7_2 = ((long double)arg1);
005eec5a              
005eec5d              if (arg1 < 0)
005eec5f                  x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
005eec5f              
005eec74              int32_t eax_2;
005eec74              eax_2 = arg3 != 0;
005eec79              uint32_t esi_1 = 0x10;
005eec7a              float var_2c_1 = ((float)(((long double)var_20_1) / x87_r7_2));
005eec87              float var_38_1 = ((float)(((long double)0.5f) / x87_r7_2));
005eec87              
005eec8a              if (arg1 > 0)
005eec8a              {
005eecd3                  do
005eecd3                  {
005eeccc                      edi_1 += 1;
005eeccf                      esi_1 = ((esi_1 + (_ftol2() << 4)) + 0xc);
005eecd3                  } while (edi_1 < arg1);
005eec8a              }
005eec8a              
005eecda              void* result = operator new(esi_1);
005eece3              uint32_t ecx_1 = esi_1;
005eece3              
005eece4              if (result != 0)
005eece4              {
005eecea                  uint32_t ebx_1 = 0;
005eecee                  int32_t var_1c_1 = 0;
005eecf1                  float var_8_1 = ((float)((long double)0));
005eecf1                  int16_t top_1 = 0;
005eecf9                  void* esi_2 = 4;
005eecf9                  
005eecfa                  if (arg1 > 0)
005eecfa                  {
005eeec8                      do
005eeec8                      {
005eed00                          int32_t i = 0;
005eed04                          /* unimplemented  {fild st0, dword [ebp-0x18]} */;
005eed07                          uint32_t eax_5 = ((char*)esi_2 + result);
005eed10                          void* var_3c_1 = esi_2;
005eed13                          esi_2 += 4;
005eed13                          
005eed18                          if (var_1c_1 < 0)
005eed1a                              /* unimplemented  {fadd dword [&data_79820c]} */;
005eed1a                          
005eed20                          float var_30_1 = ((float)/* float var_30_1 = fconvert.s(unimplemented  {fstp dword [ebp-0x2c], st0}) */);
005eed20                          /* unimplemented  {fstp dword [ebp-0x2c], st0} */;
005eed20                          int16_t top_3 = top_1;
005eee8c                          void* eax_9;
005eee8c                          
005eee8c                          do
005eee8c                          {
005eed26                              /* unimplemented  {fild st0, dword [ebp-0xc]} */;
005eed26                              
005eed2b                              if (i < 0)
005eed2d                                  /* unimplemented  {fadd dword [&data_79820c]} */;
005eed2d                              
005eed37                              /* unimplemented  {fadd dword [ebp-0x2c]} */;
005eed3a                              /* unimplemented  {fsub st0, dword [&data_7928b8]} */;
005eed40                              float var_14_1 = ((float)/* float var_14_1 = fconvert.s(unimplemented  {fst dword [ebp-0x10], st0}) */);
005eed43                              /* unimplemented  {fmul st0, dword [ebp-0x28]} */;
005eed46                              float var_24_1 = ((float)/* float var_24_1 = fconvert.s(unimplemented  {fst dword [ebp-0x20], st0}) */);
005eed49                              /* unimplemented  {fld st0, dword [ebp-0x28]} */;
005eed4c                              /* unimplemented  {fadd st0, st1} */;
005eed4e                              float var_c_1 = ((float)/* float var_c_1 = fconvert.s(unimplemented  {fstp dword [ebp-0x8], st0}) */);
005eed4e                              /* unimplemented  {fstp dword [ebp-0x8], st0} */;
005eed4e                              int16_t top_6 = (top_3 - 1);
005eed4e                              
005eed51                              if (arg3 == 0)
005eed51                              {
005eed53                                  long double temp2_1 = ((long double)0f);
005eed53                                  (/* unimplemented  {fcom st0, dword [&data_795344]} f- temp2_1 */ - temp2_1);
005eed53                                  bool c0_1 = /* bool c0_1 = unimplemented  {fcom st0, dword [&data_795344]} f< temp2_1 */ < temp2_1;
005eed53                                  bool c2_1 = (FCMP_UO(/* bool c2_1 = is_unordered.t(unimplemented  {fcom st0, dword [&data_795344]}, temp2_1) */, temp2_1));
005eed53                                  bool c3_1 = /* bool c3_1 = unimplemented  {fcom st0, dword [&data_795344]} f== temp2_1 */ == temp2_1;
005eed59                                  int32_t eax_7;
005eed59                                  eax_7 = ((((c0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_1) ? 1 : 0) << 0xa) | ((((c3_1) ? 1 : 0) << 0xe) | ((top_6 & 7) << 0xb)))));
005eed5b                                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005eed5b                                  
005eed5e                                  if (!(p_1))
005eed5e                                  {
005eed60                                      /* unimplemented  {fstp st0, st0} */;
005eed60                                      /* unimplemented  {fstp st0, st0} */;
005eed62                                      /* unimplemented  {fldz } */;
005eed64                                      var_24_1 = ((float)/* var_24_1 = fconvert.s(unimplemented  {fst dword [ebp-0x20], st0}) */);
005eed5e                                  }
005eed5e                                  
005eed67                                  /* unimplemented  {fld st0, dword [ebp-0x8]} */;
005eed6a                                  long double temp3_1 = ((long double)var_20_1);
005eed6a                                  (/* unimplemented  {fcomp st0, dword [ebp-0x1c]} f- temp3_1 */ - temp3_1);
005eed6a                                  bool c0_2 = /* bool c0_2 = unimplemented  {fcomp st0, dword [ebp-0x1c]} f< temp3_1 */ < temp3_1;
005eed6a                                  bool c2_2 = (FCMP_UO(/* bool c2_2 = is_unordered.t(unimplemented  {fcomp st0, dword [ebp-0x1c]}, temp3_1) */, temp3_1));
005eed6a                                  bool c3_2 = /* bool c3_2 = unimplemented  {fcomp st0, dword [ebp-0x1c]} f== temp3_1 */ == temp3_1;
005eed6a                                  /* unimplemented  {fcomp st0, dword [ebp-0x1c]} */;
005eed6d                                  eax_7 = ((((c0_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_2) ? 1 : 0) << 0xa) | ((((c3_2) ? 1 : 0) << 0xe) | ((top_6 & 7) << 0xb)))));
005eed6d                                  
005eed72                                  if ((*(uint8_t*)((char*)eax_7)[1] & 0x41) == 0)
005eed77                                      var_c_1 = var_20_1;
005eed51                              }
005eed51                              
005eed7a                              uint32_t var_50_2 = ecx_1;
005eed7b                              float var_50_3 = ((float)/* float var_50_3 = fconvert.s(unimplemented  {fstp dword [esp], st0}) */);
005eed7b                              /* unimplemented  {fstp dword [esp], st0} */;
005eed7e                              _floorf@4(ecx_1, var_50_3);
005eed83                              eax_9 = _ftol2();
005eed88                              void* edx_1 = eax_9;
005eed8a                              void* var_18_1 = edx_1;
005eed8d                              int16_t top_11 = (top_6 + 1);
005eed8d                              /* unimplemented  {fild st0, dword [ebp-0x14]} */;
005eed90                              long double temp1_1 = ((long double)var_c_1);
005eed90                              (/* unimplemented  {fcom st0, dword [ebp-0x8]} f- temp1_1 */ - temp1_1);
005eed90                              bool c0_3 = /* bool c0_3 = unimplemented  {fcom st0, dword [ebp-0x8]} f< temp1_1 */ < temp1_1;
005eed90                              bool c2_3 = (FCMP_UO(/* bool c2_3 = is_unordered.t(unimplemented  {fcom st0, dword [ebp-0x8]}, temp1_1) */, temp1_1));
005eed90                              bool c3_3 = /* bool c3_3 = unimplemented  {fcom st0, dword [ebp-0x8]} f== temp1_1 */ == temp1_1;
005eed93                              eax_9 = ((((c0_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_3) ? 1 : 0) << 0xa) | ((((c3_3) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
005eed95                              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005eed95                              
005eed98                              if (!(p_2))
005eed98                              {
005eeda0                                  ecx_1 = ((char*)edx_1 - arg2);
005eeda3                                  uint32_t var_28_1 = ecx_1;
005eeda3                                  
005eedad                                  while (true)
005eedad                                  {
005eedad                                      /* unimplemented  {fld st0, dword [&data_7928b0]} */;
005eedb3                                      /* unimplemented  {fadd st0, st1} */;
005eedb5                                      float var_18_2 = ((float)/* float var_18_2 = fconvert.s(unimplemented  {fstp dword [ebp-0x14], st0}) */);
005eedb5                                      /* unimplemented  {fstp dword [ebp-0x14], st0} */;
005eedb5                                      
005eedb8                                      if (edx_1 < 0)
005eedbd                                          ecx_1 = ((char*)edx_1 + arg2);
005eedb8                                      else if (edx_1 < arg2)
005eedc7                                          ecx_1 = edx_1;
005eedc7                                      
005eedcb                                      if (ecx_1 != ebx_1)
005eedcb                                      {
005eedcd                                          /* unimplemented  {fld st0, dword [ebp-0x4]} */;
005eedd0                                          long double temp6_1 = ((long double)9.99999975e-06f);
005eedd0                                          (/* unimplemented  {fcomp st0, dword [&data_7ec5bc]} f- temp6_1 */ - temp6_1);
005eedd0                                          bool c0_4 = /* bool c0_4 = unimplemented  {fcomp st0, dword [&data_7ec5bc]} f< temp6_1 */ < temp6_1;
005eedd0                                          bool c2_4 = (FCMP_UO(/* bool c2_4 = is_unordered.t(unimplemented  {fcomp st0, dword [&data_7ec5bc]}, temp6_1) */, temp6_1));
005eedd0                                          bool c3_4 = /* bool c3_4 = unimplemented  {fcomp st0, dword [&data_7ec5bc]} f== temp6_1 */ == temp6_1;
005eedd0                                          /* unimplemented  {fcomp st0, dword [&data_7ec5bc]} */;
005eedd6                                          eax_9 = ((((c0_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_4) ? 1 : 0) << 0xa) | ((((c3_4) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
005eedd6                                          
005eeddb                                          if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) == 0)
005eeddb                                          {
005eeddd                                              eax_9 = ((char*)esi_2 + result);
005eede0                                              *(uint32_t*)eax_9 = ebx_1;
005eede5                                              esi_2 += 8;
005eede8                                              *(uint32_t*)((char*)eax_9 + 4) = var_8_1;
005eeddb                                          }
005eeddb                                          
005eedeb                                          /* unimplemented  {fldz } */;
005eeded                                          ebx_1 = ecx_1;
005eedef                                          float var_8_2 = ((float)/* float var_8_2 = fconvert.s(unimplemented  {fstp dword [ebp-0x4], st0}) */);
005eedef                                          /* unimplemented  {fstp dword [ebp-0x4], st0} */;
005eedcb                                      }
005eedcb                                      
005eedf2                                      long double temp5_1 = ((long double)var_24_1);
005eedf2                                      (/* unimplemented  {fcom st0, dword [ebp-0x20]} f- temp5_1 */ - temp5_1);
005eedf2                                      bool c0_5 = /* bool c0_5 = unimplemented  {fcom st0, dword [ebp-0x20]} f< temp5_1 */ < temp5_1;
005eedf2                                      bool c2_5 = (FCMP_UO(/* bool c2_5 = is_unordered.t(unimplemented  {fcom st0, dword [ebp-0x20]}, temp5_1) */, temp5_1));
005eedf2                                      bool c3_5 = /* bool c3_5 = unimplemented  {fcom st0, dword [ebp-0x20]} f== temp5_1 */ == temp5_1;
005eedf5                                      eax_9 = ((((c0_5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_5) ? 1 : 0) << 0xa) | ((((c3_5) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
005eedf7                                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005eedf7                                      
005eedfa                                      if (!(p_3))
005eedfa                                      {
005eedfc                                          /* unimplemented  {fstp st0, st0} */;
005eedfc                                          /* unimplemented  {fstp st0, st0} */;
005eedfe                                          /* unimplemented  {fld st0, dword [ebp-0x20]} */;
005eedfa                                      }
005eedfa                                      
005eee01                                      /* unimplemented  {fld st0, dword [ebp-0x14]} */;
005eee04                                      long double temp7_1 = ((long double)var_c_1);
005eee04                                      (/* unimplemented  {fcomp st0, dword [ebp-0x8]} f- temp7_1 */ - temp7_1);
005eee04                                      bool c0_6 = /* bool c0_6 = unimplemented  {fcomp st0, dword [ebp-0x8]} f< temp7_1 */ < temp7_1;
005eee04                                      bool c2_6 = (FCMP_UO(/* bool c2_6 = is_unordered.t(unimplemented  {fcomp st0, dword [ebp-0x8]}, temp7_1) */, temp7_1));
005eee04                                      bool c3_6 = /* bool c3_6 = unimplemented  {fcomp st0, dword [ebp-0x8]} f== temp7_1 */ == temp7_1;
005eee04                                      /* unimplemented  {fcomp st0, dword [ebp-0x8]} */;
005eee07                                      eax_9 = ((((c0_6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_6) ? 1 : 0) << 0xa) | ((((c3_6) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
005eee07                                      
005eee0c                                      if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) == 0)
005eee11                                          void* var_18_3 = var_c_1;
005eee11                                      
005eee18                                      int16_t top_22;
005eee18                                      
005eee18                                      if (arg3 != 0)
005eee18                                      {
005eee45                                      label_5eee45:
005eee45                                          top_22 = (top_11 - 1);
005eee45                                          /* unimplemented  {fld st0, dword [ebp-0x14]} */;
005eee48                                          /* unimplemented  {fadd st0, st1} */;
005eee4a                                          /* unimplemented  {fmul st0, dword [ebp-0x34]} */;
005eee4d                                          /* unimplemented  {fsub st0, dword [ebp-0x10]} */;
005eee18                                      }
005eee18                                      else
005eee18                                      {
005eee1a                                          /* unimplemented  {fld st0, dword [ebp-0x10]} */;
005eee1d                                          long double temp8_1 = ((long double)0f);
005eee1d                                          (/* unimplemented  {fcomp st0, dword [&data_795344]} f- temp8_1 */ - temp8_1);
005eee1d                                          bool c0_7 = /* bool c0_7 = unimplemented  {fcomp st0, dword [&data_795344]} f< temp8_1 */ < temp8_1;
005eee1d                                          bool c2_7 = (FCMP_UO(/* bool c2_7 = is_unordered.t(unimplemented  {fcomp st0, dword [&data_795344]}, temp8_1) */, temp8_1));
005eee1d                                          bool c3_7 = /* bool c3_7 = unimplemented  {fcomp st0, dword [&data_795344]} f== temp8_1 */ == temp8_1;
005eee1d                                          /* unimplemented  {fcomp st0, dword [&data_795344]} */;
005eee23                                          eax_9 = ((((c0_7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_7) ? 1 : 0) << 0xa) | ((((c3_7) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
005eee25                                          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005eee25                                          
005eee28                                          if (p_4)
005eee28                                          {
005eee2e                                              /* unimplemented  {fld st0, dword [ebp-0x10]} */;
005eee31                                              /* unimplemented  {fadd dword [&data_7928b0]} */;
005eee37                                              long double temp9_1 = ((long double)((float)x87_r7_2));
005eee37                                              (/* unimplemented  {fcomp st0, dword [ebp-0x30]} f- temp9_1 */ - temp9_1);
005eee37                                              bool c0_8 = /* bool c0_8 = unimplemented  {fcomp st0, dword [ebp-0x30]} f< temp9_1 */ < temp9_1;
005eee37                                              bool c2_8 = (FCMP_UO(/* bool c2_8 = is_unordered.t(unimplemented  {fcomp st0, dword [ebp-0x30]}, temp9_1) */, temp9_1));
005eee37                                              bool c3_8 = /* bool c3_8 = unimplemented  {fcomp st0, dword [ebp-0x30]} f== temp9_1 */ == temp9_1;
005eee37                                              /* unimplemented  {fcomp st0, dword [ebp-0x30]} */;
005eee3a                                              eax_9 = ((((c0_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_8) ? 1 : 0) << 0xa) | ((((c3_8) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
005eee3a                                              
005eee3f                                              if ((*(uint8_t*)((char*)eax_9)[1] & 1) != 0)
005eee3f                                                  goto label_5eee45;
005eee3f                                              
005eee41                                              top_22 = (top_11 - 1);
005eee41                                              /* unimplemented  {fldz } */;
005eee28                                          }
005eee28                                          else
005eee28                                          {
005eee2a                                              top_22 = (top_11 - 1);
005eee2a                                              /* unimplemented  {fld1 } */;
005eee28                                          }
005eee18                                      }
005eee18                                      
005eee54                                      if (i != 0)
005eee54                                      {
005eee56                                          /* unimplemented  {fld1 } */;
005eee58                                          /* unimplemented  {fsubrp st1, st0} */;
005eee58                                          /* unimplemented  {fsubrp st1, st0} */;
005eee54                                      }
005eee54                                      
005eee5a                                      /* unimplemented  {fld st0, dword [ebp-0x14]} */;
005eee5d                                      edx_1 += 1;
005eee5e                                      /* unimplemented  {fsub st0, st2} */;
005eee60                                      var_28_1 += 1;
005eee63                                      void* var_18_4 = edx_1;
005eee66                                      /* unimplemented  {fmul st0, st1} */;
005eee68                                      /* unimplemented  {fadd dword [ebp-0x4]} */;
005eee6b                                      var_8_1 = ((float)/* var_8_1 = fconvert.s(unimplemented  {fstp dword [ebp-0x4], st0}) */);
005eee6b                                      /* unimplemented  {fstp dword [ebp-0x4], st0} */;
005eee6e                                      /* unimplemented  {fstp st0, st0} */;
005eee6e                                      /* unimplemented  {fstp st0, st0} */;
005eee70                                      /* unimplemented  {fstp st0, st0} */;
005eee70                                      /* unimplemented  {fstp st0, st0} */;
005eee72                                      top_11 = (top_22 + 1);
005eee72                                      /* unimplemented  {fild st0, dword [ebp-0x14]} */;
005eee75                                      long double temp10_1 = ((long double)var_c_1);
005eee75                                      (/* unimplemented  {fcom st0, dword [ebp-0x8]} f- temp10_1 */ - temp10_1);
005eee75                                      bool c0_9 = /* bool c0_9 = unimplemented  {fcom st0, dword [ebp-0x8]} f< temp10_1 */ < temp10_1;
005eee75                                      bool c2_9 = (FCMP_UO(/* bool c2_9 = is_unordered.t(unimplemented  {fcom st0, dword [ebp-0x8]}, temp10_1) */, temp10_1));
005eee75                                      bool c3_9 = /* bool c3_9 = unimplemented  {fcom st0, dword [ebp-0x8]} f== temp10_1 */ == temp10_1;
005eee78                                      eax_9 = ((((c0_9) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_9) ? 1 : 0) << 0xa) | ((((c3_9) ? 1 : 0) << 0xe) | ((top_11 & 7) << 0xb)))));
005eee7a                                      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005eee7a                                      
005eee7d                                      if (p_5)
005eee7d                                          break;
005eee7d                                      
005eeda8                                      ecx_1 = var_28_1;
005eedad                                  }
005eed98                              }
005eed98                              
005eee83                              i += 1;
005eee86                              /* unimplemented  {fstp st0, st0} */;
005eee86                              /* unimplemented  {fstp st0, st0} */;
005eee86                              top_3 = (top_11 + 1);
005eee8c                          } while (i < 2);
005eee8c                          
005eee92                          /* unimplemented  {fld st0, dword [ebp-0x4]} */;
005eee95                          long double temp4_1 = ((long double)9.99999975e-06f);
005eee95                          (/* unimplemented  {fcomp st0, dword [&data_7ec5bc]} f- temp4_1 */ - temp4_1);
005eee95                          bool c0_10 = /* bool c0_10 = unimplemented  {fcomp st0, dword [&data_7ec5bc]} f< temp4_1 */ < temp4_1;
005eee95                          bool c2_10 = (FCMP_UO(/* bool c2_10 = is_unordered.t(unimplemented  {fcomp st0, dword [&data_7ec5bc]}, temp4_1) */, temp4_1));
005eee95                          bool c3_10 = /* bool c3_10 = unimplemented  {fcomp st0, dword [&data_7ec5bc]} f== temp4_1 */ == temp4_1;
005eee95                          /* unimplemented  {fcomp st0, dword [&data_7ec5bc]} */;
005eee9b                          eax_9 = ((((c0_10) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | ((((c2_10) ? 1 : 0) << 0xa) | ((((c3_10) ? 1 : 0) << 0xe) | ((top_3 & 7) << 0xb)))));
005eee9b                          
005eeea0                          if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) == 0)
005eeea0                          {
005eeea5                              uint32_t* eax_10 = ((char*)esi_2 + result);
005eeea8                              esi_2 += 8;
005eeeab                              *(uint32_t*)eax_10 = ebx_1;
005eeead                              eax_10[1] = var_8_1;
005eeea0                          }
005eeea0                          
005eeeb0                          ecx_1 = eax_5;
005eeeb3                          /* unimplemented  {fldz } */;
005eeeb7                          var_8_1 = ((float)/* var_8_1 = fconvert.s(unimplemented  {fstp dword [ebp-0x4], st0}) */);
005eeeb7                          /* unimplemented  {fstp dword [ebp-0x4], st0} */;
005eeeb7                          top_1 = top_3;
005eeebd                          var_1c_1 += 1;
005eeec0                          *(uint32_t*)ecx_1 = ((char*)esi_2 - var_3c_1);
005eeec8                      } while (var_1c_1 < arg1);
005eecfa                  }
005eecfa                  
005eeece                  *(uint32_t*)result = esi_2;
005eeed0                  return result;
005eece4              }
005eec3c          }
005eec31      }
005eec31      
005eeed4      return nullptr;
005eec1f  }


005eeedd  long __thiscall D3DXTex::CBlt::BltSame_DXTn(D3DXTex::CBlt* this)

005eeedd  {
005eeee8      void* esi = *(uint32_t*)this;
005eeef0      int32_t ecx = *(uint32_t*)((char*)esi + 0x40);
005eeef3      int32_t edi;
005eeef3      int32_t var_24 = edi;
005eeef4      int32_t edi_1 = *(uint32_t*)((char*)esi + 0x3c);
005eeef4      
005eef01      if (((((((int8_t)*(uint32_t*)((char*)esi + 0x48)) | ((int8_t)*(uint32_t*)((char*)esi + 0x44))) | edi_1) | ecx) & 3) != 0)
005eef03          return 0x80004005;
005eef03      
005eef0d      void* edx_4 = *(uint32_t*)((char*)this + 4);
005eef0d      
005eef20      if (((((((int8_t)*(uint32_t*)((char*)edx_4 + 0x48)) | ((int8_t)*(uint32_t*)((char*)edx_4 + 0x44))) | ((int8_t)*(uint32_t*)((char*)edx_4 + 0x40))) | ((int8_t)*(uint32_t*)((char*)edx_4 + 0x3c))) & 3) == 0)
005eef20      {
005eef2f          int32_t edx_6 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 4);
005eef38          int32_t var_8_1;
005eef38          
005eef38          if (edx_6 == 0x31545844)
005eef38          {
005eef63              var_8_1 = 8;
005eef6a          label_5eef6a:
005eef6a              void* eax_2 = *(uint32_t*)((char*)this + 4);
005eef7a              int32_t edx_9 = ((*(uint32_t*)((char*)eax_2 + 0x68) >> 2) * var_8_1);
005eef97              int32_t i = 0;
005eefa4              int32_t edx_15 = (((((*(uint32_t*)((char*)eax_2 + 0x40) >> 2) * *(uint32_t*)((char*)eax_2 + 0x60)) + (*(uint32_t*)((char*)eax_2 + 0x64) * *(uint32_t*)((char*)eax_2 + 0x4c))) + ((*(uint32_t*)((char*)eax_2 + 0x3c) >> 2) * var_8_1)) + *(uint32_t*)((char*)eax_2 + 0x20));
005eefbf              int32_t var_c_1 = (((((ecx >> 2) * *(uint32_t*)((char*)esi + 0x60)) + (*(uint32_t*)((char*)esi + 0x64) * *(uint32_t*)((char*)esi + 0x4c))) + ((edi_1 >> 2) * var_8_1)) + *(uint32_t*)((char*)esi + 0x20));
005eefc2              void* ecx_6 = *(uint32_t*)((char*)this + 4);
005eefc2              
005eefc9              if (*(uint32_t*)((char*)ecx_6 + 0x70) > 0)
005eefc9              {
005eefcb                  int32_t ecx_7 = *(uint32_t*)((char*)ecx_6 + 0x6c);
005ef02c                  void* esi_4;
005ef02c                  
005ef02c                  do
005ef02c                  {
005eefce                      int32_t esi_1 = var_c_1;
005eefd1                      int32_t var_8_2 = 0;
005eefd7                      int32_t edi_4 = edx_15;
005eefd9                      int32_t var_14_1 = edi_4;
005eefdc                      int32_t var_18_1 = esi_1;
005eefdc                      
005eefdf                      if (ecx_7 > 0)
005eefdf                      {
005ef013                          do
005ef013                          {
005eefe4                              var_8_2 += 4;
005eefed                              int32_t esi_2;
005eefed                              int32_t edi_5;
005eefed                              edi_5 = __builtin_memcpy(edi_4, esi_1, ((edx_9 >> 2) << 2));
005eeff4                              __builtin_memcpy(edi_5, esi_2, (edx_9 & 3));
005eeff6                              void* ecx_12 = *(uint32_t*)((char*)this + 4);
005eeffc                              edi_4 = (var_14_1 + *(uint32_t*)((char*)ecx_12 + 0x60));
005ef004                              esi_1 = (var_18_1 + *(uint32_t*)(*(uint32_t*)this + 0x60));
005ef007                              ecx_7 = *(uint32_t*)((char*)ecx_12 + 0x6c);
005ef00d                              var_14_1 = edi_4;
005ef010                              var_18_1 = esi_1;
005ef013                          } while (var_8_2 < ecx_7);
005eefdf                      }
005eefdf                      
005ef017                      esi_4 = *(uint32_t*)((char*)this + 4);
005ef01d                      var_c_1 += *(uint32_t*)(*(uint32_t*)this + 0x64);
005ef020                      edx_15 += *(uint32_t*)((char*)esi_4 + 0x64);
005ef023                      i += 1;
005ef02c                  } while (i < *(uint32_t*)((char*)esi_4 + 0x70));
005eefc9              }
005eefc9              
005ef02e              return 0;
005eef38          }
005eef38          
005eef58          if ((((edx_6 == 0x32545844 || edx_6 == 0x33545844) || edx_6 == 0x34545844) || edx_6 == 0x35545844))
005eef58          {
005eef5a              var_8_1 = 0x10;
005eef61              goto label_5eef6a;
005eef58          }
005eef20      }
005eef20      
005eef22      return 0x80004005;
005eeedd  }


005ef035  long __stdcall D3DXTex::c_BoxFilter2D_A8R8G8B8(uint32_t* arg1, uint32_t* arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

005ef035  {
005ef040      uint32_t* edx = arg2;
005ef043      int32_t edi;
005ef043      int32_t var_1c = edi;
005ef044      uint32_t edi_1 = arg5;
005ef04a      void* eax_2 = ((arg4 * edi_1) + edx);
005ef04a      
005ef051      if (edx < eax_2)
005ef051      {
005ef05f          arg4 = &edx[arg3];
005ef05f          
005ef150          do
005ef150          {
005ef072              uint32_t* var_8_1 = arg1;
005ef072              
005ef075              if (edx < arg4)
005ef075              {
005ef084                  void* ecx_2 = &edx[1];
005ef088                  void* var_10_1 = ecx_2;
005ef08b                  int32_t i_1 = ((((arg4 - edx) - 1) >> 3) + 1);
005ef133                  int32_t i;
005ef133                  
005ef133                  do
005ef133                  {
005ef08e                      uint32_t edx_1 = *(uint32_t*)((char*)ecx_2 + edi_1);
005ef091                      int32_t edi_2 = *(uint32_t*)((edi_1 + ecx_2) - 4);
005ef0a0                      int32_t edx_2 = *(uint32_t*)ecx_2;
005ef0a2                      int32_t ecx_3 = *(uint32_t*)((char*)ecx_2 - 4);
005ef0ec                      int32_t ebx_12 = (((((((ecx_3 >> 2) & 0xffc03fc0) + ((edi_2 >> 2) & 0xffc03fc0)) + ((edx_1 >> 2) & 0xffc03fc0)) + ((edx_2 >> 2) & 0xffc03fc0)) - 0x7fff80) ^ ((((((ecx_3 & 0xff00ff) + (edi_2 & 0xff00ff)) + (edx_1 & 0xff00ff)) + (edx_2 & 0xff00ff)) + 0x20002) >> 2));  {  // {"ID_sci_POVUp"}}
005ef106                      edi_1 = arg5;
005ef119                      uint32_t* ecx_9 = var_8_1;
005ef11c                      var_8_1 = &var_8_1[1];
005ef120                      *(uint32_t*)ecx_9 = ((ebx_12 & 0xff00ff) ^ &*"GUID_Virtual"[(((((ecx_3 >> 2) & 0x3fc03fc0) + ((edi_2 >> 2) & 0x3fc03fc0)) + ((edx_1 >> 2) & 0x3fc03fc0)) + ((edx_2 >> 2) & 0x3fc03fc0))]);
005ef125                      ecx_2 = ((char*)var_10_1 + 8);
005ef128                      i = i_1;
005ef128                      i_1 -= 1;
005ef12b                      var_10_1 = ecx_2;
005ef133                  } while (i != 1);
005ef139                  edx = arg2;
005ef075              }
005ef075              
005ef13f              arg1 += arg6;
005ef142              uint32_t ecx_12 = (edi_1 * 2);
005ef145              arg4 += ecx_12;
005ef148              edx += ecx_12;
005ef14d              arg2 = edx;
005ef150          } while (edx < eax_2);
005ef051      }
005ef051      
005ef15c      return 0;
005ef035  }


005ef15f  long __thiscall D3DXTex::CBlt::BltBox2D_A8R8G8B8(D3DXTex::CBlt* this)

005ef15f  {
005ef15f      void* edx = *(uint32_t*)((char*)this + 4);
005ef162      void* eax = *(uint32_t*)this;
005ef180      return D3DXTex::g_pBoxFilter2D_A8R8G8B8(*(uint32_t*)((char*)edx + 0x20), *(uint32_t*)((char*)eax + 0x20), *(uint32_t*)((char*)eax + 0x68), *(uint32_t*)((char*)eax + 0x6c), *(uint32_t*)((char*)eax + 0x60), *(uint32_t*)((char*)edx + 0x60));
005ef15f  }

005ef181     8b ff 55 8b ec 83 ec 14 8b 4d 14 8b 45 18 0f af c8 57 8b 7d 0c 03 cf 3b f9 89 4d ec 0f 83 c3   ..U......M..E....W.}...;..M....
005ef1a0  00 00 00 8b 4d 10 8d 0c 8f 53 89 4d 14 56 ba ff 00 ff 00 b9 00 ff 00 00 3b 7d 14 8b 75 08 89 75  ....M....S.M.V..........;}..u..u
005ef1c0  10 0f 83 83 00 00 00 8b 5d 14 2b df 4b c1 eb 03 43 8d 77 04 89 5d f4 8b 3c 06 89 7d fc 8b 3e 89  ........].+.K...C.w..]..<..}..>.
005ef1e0  7d f8 8b 7c 30 fc 8b 46 fc 89 7d f0 23 fa 8b d8 23 da 03 df 8b 7d fc 23 fa 03 df 8b 7d f8 23 fa  }..|0..F..}.#...#....}.#....}.#.
005ef200  8d 9c 3b 02 00 02 00 8b 7d f0 23 c1 23 f9 03 c7 8b 7d fc 23 f9 03 c7 8b 7d f8 23 f9 8d 84 38 00  ..;.....}.#.#....}.#....}.#...8.
005ef220  02 00 00 25 00 fc 03 00 81 e3 fc 03 fc 03 0b d8 8b 45 10 83 45 10 04 c1 eb 02 83 c6 08 ff 4d f4  ...%.............E..E.........M.
005ef240  89 18 8b 45 18 75 90 8b 7d 0c 8b 75 1c 01 75 08 8d 34 00 01 75 14 03 fe 3b 7d ec 89 7d 0c 0f 82  ...E.u..}..u..u..4..u...;}..}...
005ef260  54 ff ff ff 5e 5b 33 c0 5f c9 c2 18 00 8b ff 55 8b ec 83 ec 18 f6 45 10 03 74 1c ff 75 1c ff 75  T...^[3._......U......E..t..u..u
005ef280  18 ff 75 14 ff 75 10 ff 75 0c ff 75 08 e8 a3 fd ff ff e9 ec 00 00 00 8b 45 14 0f af 45 18 03 45  ..u..u..u..u............E...E..E
005ef2a0  0c 83 65 f0 00 83 65 f4 00 53 89 45 14 b8 02 00 02 00 56 57 89 45 e8 89 45 ec 0f 77 8b 45 10 c1  ..e...e..S.E......VW.E..E..w.E..
005ef2c0  e0 02 89 45 10 8b 45 0c 8b 55 08 0f 6f 65 e8 0f ef f6 3b 45 14 0f 8d a1 00 00 00 8b f8 8b f0 03  ...E..E..U..oe....;E............
005ef2e0  75 18 8b df 03 5d 10 89 45 f8 89 55 fc 8b c2 3b fb 7d 71 0f 6f 07 0f 6f 16 0f 6f 67 08 0f 6f 76  u....]..E..U...;.}q.o..o..og..ov
005ef300  08 0f 7f c1 0f 7f d3 0f 7f e5 0f 7f f7 0f 60 45 f0 0f 68 4d f0 0f 60 55 f0 0f 68 5d f0 0f 60 65  ..............`E..hM..`U..h]..`e
005ef320  f0 0f 68 6d f0 0f 60 75 f0 0f 68 7d f0 8b c8 0f fd c1 83 c7 10 0f fd e5 83 c6 10 0f fd c2 0f fd  ..hm..`u..h}....................
005ef340  e6 83 c0 08 0f fd c3 0f fd e7 3b fb 0f fd 45 e8 0f fd 65 e8 0f 71 e0 02 0f 71 e4 02 0f 67 c4 0f  ..........;...E...e..q...q...g..
005ef360  7f 01 7c 8f 8b 55 fc 8b 45 f8 03 45 18 03 45 18 03 55 1c 3b 45 14 0f 8c 5f ff ff ff 0f 77 5f 5e  ..|..U..E..E..E..U.;E..._....w_^
005ef380  33 c0 5b c9 c2 18 00 8b ff 55 8b ec e8 cd f1 00 00 85 c0 74 11 b8 6d f2 5e 00 a3 5c 4c 82 00 a3  3.[......U.........t..m.^..\L...
005ef3a0  60 4c 82 00 eb 14 c7 05 5c 4c 82 00 35 f0 5e 00 c7 05 60 4c 82 00 81 f1 5e 00 5d ff 25 5c 4c 82  `L......\L..5.^...`L....^.].%\L.
005ef3c0  00 8b ff 55 8b ec e8 93 f1 00 00 85 c0 74 0c b8 6d f2 5e 00 a3 5c 4c 82 00 eb 0f c7 05 5c 4c 82  ...U.........t..m.^..\L......\L.
005ef3e0  00 35 f0 5e 00 b8 81 f1 5e 00 a3 60 4c 82 00 5d ff e0                                            .5.^....^..`L..]..

005ef3f2  long __thiscall D3DXTex::CBlt::BltBox2D_X8R8G8B8(D3DXTex::CBlt* this)

005ef3f2  {
005ef3f2      void* edx = *(uint32_t*)((char*)this + 4);
005ef3f5      void* eax = *(uint32_t*)this;
005ef413      return D3DXTex::g_pBoxFilter2D_X8R8G8B8(*(uint32_t*)((char*)edx + 0x20), *(uint32_t*)((char*)eax + 0x20), *(uint32_t*)((char*)eax + 0x68), *(uint32_t*)((char*)eax + 0x6c), *(uint32_t*)((char*)eax + 0x60), *(uint32_t*)((char*)edx + 0x60));
005ef3f2  }


005ef414  long __thiscall D3DXTex::CBlt::BltBox2D_R5G6B5(D3DXTex::CBlt* this)

005ef414  {
005ef41e      void* edx = *(uint32_t*)this;
005ef423      int16_t* ecx_1 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005ef427      int16_t* ebx = *(uint32_t*)((char*)edx + 0x20);
005ef432      void* esi_2 = ((*(uint32_t*)((char*)edx + 0x6c) * *(uint32_t*)((char*)edx + 0x60)) + ebx);
005ef439      int16_t* var_18 = ecx_1;
005ef43c      int16_t* var_1c = ebx;
005ef43f      void* var_28 = esi_2;
005ef43f      
005ef442      if (ebx < esi_2)
005ef442      {
005ef44d          int32_t edi;
005ef44d          int32_t var_38_1 = edi;
005ef44d          
005ef53b          do
005ef53b          {
005ef454              void* edx_2 = &ebx[*(uint32_t*)((char*)edx + 0x68)];
005ef457              int16_t* edi_2 = (*(uint32_t*)((char*)edx + 0x60) + ebx);
005ef45b              int16_t* var_c_1 = ecx_1;
005ef45e              int16_t* var_10_1 = ebx;
005ef461              int16_t* var_14_1 = edi_2;
005ef461              
005ef467              if (ebx < edx_2)
005ef467              {
005ef513                  do
005ef513                  {
005ef46d                      uint32_t ecx_2 = ((uint32_t)*(uint16_t*)edi_2);
005ef470                      uint32_t edx_3 = ((uint32_t)edi_2[1]);
005ef474                      uint32_t esi_3 = ((uint32_t)ebx[1]);
005ef47b                      uint32_t ecx_3 = ((uint32_t)*(uint16_t*)ebx);
005ef480                      uint32_t ebx_1;
005ef480                      ebx_1 = (ecx_3 & 0xf81f);
005ef485                      uint32_t edi_3;
005ef485                      edi_3 = (edx_3 & 0xf81f);
005ef496                      uint32_t ebx_2;
005ef496                      ebx_2 = (ecx_2 & 0xf81f);
005ef49d                      uint32_t ebx_3;
005ef49d                      ebx_3 = (esi_3 & 0xf81f);
005ef4d1                      uint16_t edi_8 = (((int16_t)(((((edi_3 + ebx_1) + ebx_2) + ebx_3) + 0x1002) >> 2)) ^ ((int16_t)((((((edx_3 & 0xffff07e0) + (ecx_3 & 0xffff07e0)) + (ecx_2 & 0xffff07e0)) + (esi_3 & 0xffff07e0)) + 0x40) >> 2)));
005ef4f7                      int16_t* ecx_17 = var_c_1;
005ef4fa                      var_c_1 = &var_c_1[1];
005ef4fe                      *(uint16_t*)ecx_17 = ((edi_8 & 0x7e0) ^ ((int16_t)((((((edx_3 & 0xf81f) + (ecx_3 & 0xf81f)) + (ecx_2 & 0xf81f)) + (esi_3 & 0xf81f)) + 0x1002) >> 2)));
005ef504                      ebx = &var_10_1[2];
005ef507                      edi_2 = &var_14_1[2];
005ef50d                      var_10_1 = ebx;
005ef510                      var_14_1 = edi_2;
005ef513                  } while (ebx < edx_2);
005ef513                  
005ef519                  ecx_1 = var_18;
005ef51c                  ebx = var_1c;
005ef51f                  esi_2 = var_28;
005ef467              }
005ef467              
005ef528              ecx_1 += *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60);
005ef52b              edx = *(uint32_t*)this;
005ef530              ebx = &ebx[*(uint32_t*)((char*)edx + 0x60)];
005ef535              var_18 = ecx_1;
005ef538              var_1c = ebx;
005ef53b          } while (ebx < esi_2);
005ef442      }
005ef442      
005ef547      return 0;
005ef414  }


005ef548  long __thiscall D3DXTex::CBlt::BltBox2D_X1R5G5B5(D3DXTex::CBlt* this)

005ef548  {
005ef552      void* edx = *(uint32_t*)this;
005ef557      int16_t* ecx_1 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005ef55b      int16_t* ebx = *(uint32_t*)((char*)edx + 0x20);
005ef566      void* esi_2 = ((*(uint32_t*)((char*)edx + 0x6c) * *(uint32_t*)((char*)edx + 0x60)) + ebx);
005ef56d      int16_t* var_14 = ecx_1;
005ef570      int16_t* var_18 = ebx;
005ef573      void* var_24 = esi_2;
005ef573      
005ef576      if (ebx < esi_2)
005ef576      {
005ef581          int32_t edi;
005ef581          int32_t var_34_1 = edi;
005ef581          
005ef640          do
005ef640          {
005ef588              void* edx_2 = &ebx[*(uint32_t*)((char*)edx + 0x68)];
005ef58b              int16_t* edi_2 = (*(uint32_t*)((char*)edx + 0x60) + ebx);
005ef58f              int16_t* var_8_1 = ecx_1;
005ef592              int16_t* var_10_1 = ebx;
005ef592              
005ef598              if (ebx < edx_2)
005ef598              {
005ef61c                  do
005ef61c                  {
005ef59e                      uint32_t esi_3 = ((uint32_t)ebx[1]);
005ef5a2                      uint32_t ecx_2 = ((uint32_t)*(uint16_t*)edi_2);
005ef5a5                      uint32_t edx_3 = ((uint32_t)edi_2[1]);
005ef5ac                      uint32_t ecx_3 = ((uint32_t)*(uint16_t*)ebx);
005ef601                      edi_2 = &edi_2[2];
005ef604                      int16_t ebx_8 = ((((int16_t)((((((edx_3 & 0xffff03e0) + (ecx_3 & 0xffff03e0)) + (ecx_2 & 0xffff03e0)) + (esi_3 & 0xffff03e0)) + 0x40) >> 2)) & 0x3e0) | (((int16_t)((((((edx_3 & 0x7c1f) + (ecx_3 & 0x7c1f)) + (ecx_2 & 0x7c1f)) + (esi_3 & 0x7c1f)) + 0x802) >> 2)) & 0x7c1f));
005ef606                      int16_t* ecx_15 = var_8_1;
005ef609                      var_8_1 = &var_8_1[1];
005ef60d                      *(uint16_t*)ecx_15 = ebx_8;
005ef613                      ebx = &var_10_1[2];
005ef619                      var_10_1 = ebx;
005ef61c                  } while (ebx < edx_2);
005ef61c                  
005ef61e                  ecx_1 = var_14;
005ef621                  ebx = var_18;
005ef624                  esi_2 = var_24;
005ef598              }
005ef598              
005ef62d              ecx_1 += *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60);
005ef630              edx = *(uint32_t*)this;
005ef635              ebx = &ebx[*(uint32_t*)((char*)edx + 0x60)];
005ef63a              var_14 = ecx_1;
005ef63d              var_18 = ebx;
005ef640          } while (ebx < esi_2);
005ef576      }
005ef576      
005ef64c      return 0;
005ef548  }


005ef64d  long __thiscall D3DXTex::CBlt::BltBox2D_A1R5G5B5(D3DXTex::CBlt* this)

005ef64d  {
005ef65c      void* ecx = *(uint32_t*)this;
005ef65e      int16_t* ebx = *(uint32_t*)((char*)ecx + 0x20);
005ef662      uint16_t* esi = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005ef66c      void* eax_3 = ((*(uint32_t*)((char*)ecx + 0x6c) * *(uint32_t*)((char*)ecx + 0x60)) + ebx);
005ef670      uint16_t* var_1c = esi;
005ef673      int16_t* var_20 = ebx;
005ef673      
005ef679      if (ebx < eax_3)
005ef679      {
005ef689          int32_t edi;
005ef689          int32_t var_3c_1 = edi;
005ef689          
005ef769          do
005ef769          {
005ef690              void* ecx_2 = &ebx[*(uint32_t*)((char*)ecx + 0x68)];
005ef693              int16_t* edi_2 = (*(uint32_t*)((char*)ecx + 0x60) + ebx);
005ef697              uint16_t* var_10_1 = esi;
005ef69a              int16_t* var_14_1 = ebx;
005ef69d              int16_t* var_18_1 = edi_2;
005ef69d              
005ef6a3              if (ebx < ecx_2)
005ef6a3              {
005ef743                  do
005ef743                  {
005ef6a9                      uint32_t ecx_3 = ((uint32_t)ebx[1]);
005ef6ad                      uint32_t esi_1 = ((uint32_t)edi_2[1]);
005ef6b4                      uint32_t ecx_4 = ((uint32_t)*(uint16_t*)edi_2);
005ef6b7                      uint32_t edi_3 = ((uint32_t)*(uint16_t*)ebx);
005ef701                      uint16_t ebx_9 = (((int16_t)((((((esi_1 & 0x83e0) + (edi_3 & 0x83e0)) + (ecx_4 & 0x83e0)) + (ecx_3 & 0x83e0)) + 0x10040) >> 2)) ^ ((int16_t)((((((esi_1 & 0x7c1f) + (edi_3 & 0x7c1f)) + (ecx_4 & 0x7c1f)) + (ecx_3 & 0x7c1f)) + 0x802) >> 2)));
005ef725                      edi_2 = &var_18_1[2];
005ef728                      var_18_1 = edi_2;
005ef72d                      uint16_t* ecx_23 = var_10_1;
005ef730                      var_10_1 = &var_10_1[1];
005ef734                      *(uint16_t*)ecx_23 = ((ebx_9 & 0x7c1f) ^ ((int16_t)((((((esi_1 & 0x83e0) + (edi_3 & 0x83e0)) + (ecx_4 & 0x83e0)) + (ecx_3 & 0x83e0)) + 0x10040) >> 2)));
005ef73a                      ebx = &var_14_1[2];
005ef740                      var_14_1 = ebx;
005ef743                  } while (ebx < ecx_2);
005ef743                  
005ef749                  ebx = var_20;
005ef6a3              }
005ef6a3              
005ef755              esi = ((char*)var_1c + *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60));
005ef758              ecx = *(uint32_t*)this;
005ef75d              ebx = &ebx[*(uint32_t*)((char*)ecx + 0x60)];
005ef763              var_1c = esi;
005ef766              var_20 = ebx;
005ef769          } while (ebx < eax_3);
005ef679      }
005ef679      
005ef775      return 0;
005ef64d  }


005ef776  long __thiscall D3DXTex::CBlt::BltBox2D_A4R4G4B4(D3DXTex::CBlt* this)

005ef776  {
005ef780      void* edx = *(uint32_t*)this;
005ef785      int16_t* ecx_1 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005ef789      int16_t* ebx = *(uint32_t*)((char*)edx + 0x20);
005ef794      void* esi_2 = ((*(uint32_t*)((char*)edx + 0x6c) * *(uint32_t*)((char*)edx + 0x60)) + ebx);
005ef79b      int16_t* var_18 = ecx_1;
005ef79e      int16_t* var_1c = ebx;
005ef7a1      void* var_28 = esi_2;
005ef7a1      
005ef7a4      if (ebx < esi_2)
005ef7a4      {
005ef7af          int32_t edi;
005ef7af          int32_t var_38_1 = edi;
005ef7af          
005ef8a0          do
005ef8a0          {
005ef7b6              void* edx_2 = &ebx[*(uint32_t*)((char*)edx + 0x68)];
005ef7b9              int16_t* edi_2 = (*(uint32_t*)((char*)edx + 0x60) + ebx);
005ef7bd              int16_t* var_c_1 = ecx_1;
005ef7c0              int16_t* var_10_1 = ebx;
005ef7c3              int16_t* var_14_1 = edi_2;
005ef7c3              
005ef7c9              if (ebx < edx_2)
005ef7c9              {
005ef878                  do
005ef878                  {
005ef7cf                      uint32_t ecx_2 = ((uint32_t)*(uint16_t*)edi_2);
005ef7d2                      uint32_t edx_3 = ((uint32_t)edi_2[1]);
005ef7d6                      uint32_t esi_3 = ((uint32_t)ebx[1]);
005ef7dd                      uint32_t ecx_3 = ((uint32_t)*(uint16_t*)ebx);
005ef7e2                      uint32_t ebx_1;
005ef7e2                      ebx_1 = (ecx_3 & 0xf0f0);
005ef7e7                      uint32_t edi_3;
005ef7e7                      edi_3 = (edx_3 & 0xf0f0);
005ef7f8                      uint32_t ebx_2;
005ef7f8                      ebx_2 = (ecx_2 & 0xf0f0);
005ef7ff                      uint32_t ebx_3;
005ef7ff                      ebx_3 = (esi_3 & 0xf0f0);
005ef836                      uint16_t edi_8 = (((int16_t)(((((edi_3 + ebx_1) + ebx_2) + ebx_3) + 0x2020) >> 2)) ^ ((int16_t)((((((edx_3 & 0xffff0f0f) + (ecx_3 & 0xffff0f0f)) + (ecx_2 & 0xffff0f0f)) + (esi_3 & 0xffff0f0f)) + 0x202) >> 2)));
005ef85c                      int16_t* ecx_17 = var_c_1;
005ef85f                      var_c_1 = &var_c_1[1];
005ef863                      *(uint16_t*)ecx_17 = ((edi_8 & 0xf0f) ^ ((int16_t)((((((edx_3 & 0xf0f0) + (ecx_3 & 0xf0f0)) + (ecx_2 & 0xf0f0)) + (esi_3 & 0xf0f0)) + 0x2020) >> 2)));
005ef869                      ebx = &var_10_1[2];
005ef86c                      edi_2 = &var_14_1[2];
005ef872                      var_10_1 = ebx;
005ef875                      var_14_1 = edi_2;
005ef878                  } while (ebx < edx_2);
005ef878                  
005ef87e                  ecx_1 = var_18;
005ef881                  ebx = var_1c;
005ef884                  esi_2 = var_28;
005ef7c9              }
005ef7c9              
005ef88d              ecx_1 += *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60);
005ef890              edx = *(uint32_t*)this;
005ef895              ebx = &ebx[*(uint32_t*)((char*)edx + 0x60)];
005ef89a              var_18 = ecx_1;
005ef89d              var_1c = ebx;
005ef8a0          } while (ebx < esi_2);
005ef7a4      }
005ef7a4      
005ef8ac      return 0;
005ef776  }


005ef8ad  long __thiscall D3DXTex::CBlt::BltBox2D_R3G3B2(D3DXTex::CBlt* this)

005ef8ad  {
005ef8ba      uint8_t* ecx_1 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005ef8be      int32_t edi;
005ef8be      int32_t var_34 = edi;
005ef8c2      void* eax_1 = *(uint32_t*)this;
005ef8cb      char* ebx = *(uint32_t*)((char*)eax_1 + 0x20);
005ef8ce      void* edi_3 = ((*(uint32_t*)((char*)eax_1 + 0x6c) * *(uint32_t*)((char*)eax_1 + 0x60)) + ebx);
005ef8d2      uint8_t* var_18 = ecx_1;
005ef8d5      char* var_1c = ebx;
005ef8d8      void* var_28 = edi_3;
005ef8d8      
005ef8db      while (ebx < edi_3)
005ef8db      {
005ef8ed          void* eax_3 = (*(uint32_t*)((char*)eax_1 + 0x68) + ebx);
005ef8ef          char* edx_2 = (*(uint32_t*)((char*)eax_1 + 0x60) + ebx);
005ef8f3          uint8_t* var_c_1 = ecx_1;
005ef8f6          char* var_10_1 = ebx;
005ef8f9          char* var_14_1 = edx_2;
005ef8f9          
005ef8ff          if (ebx < eax_3)
005ef8ff          {
005ef996              do
005ef996              {
005ef905                  uint32_t ecx_2 = ((uint32_t)*(uint8_t*)edx_2);
005ef908                  uint32_t eax_4 = ((uint32_t)edx_2[1]);
005ef90c                  uint32_t edi_4 = ((uint32_t)ebx[1]);
005ef913                  uint32_t ecx_3 = ((uint32_t)*(uint8_t*)ebx);
005ef928                  int32_t edx_6 = (((eax_4 & 0x1c) + (ecx_3 & 0x1c)) + (ecx_2 & 0x1c));
005ef92a                  uint32_t var_20_1 = ecx_3;
005ef92d                  ecx_3 &= 0xe3;
005ef93b                  uint32_t ebx_7;
005ef93b                  ebx_7 = (eax_4 & 0xe3);
005ef93e                  uint8_t edx_8 = ((int8_t)(((edx_6 + (edi_4 & 0x1c)) + 8) >> 2));
005ef941                  eax_4 &= 0xe3;
005ef949                  uint32_t ecx_4;
005ef949                  ecx_4 = (ecx_2 & 0xe3);
005ef950                  uint32_t ecx_5;
005ef950                  ecx_5 = (edi_4 & 0xe3);
005ef953                  edi_4 &= 0xe3;
005ef965                  uint32_t ecx_8;
005ef965                  ecx_8 = (var_20_1 & 0xe3);
005ef970                  uint32_t ecx_9;
005ef970                  ecx_9 = (ecx_2 & 0xe3);
005ef97e                  uint8_t* eax_9 = var_c_1;
005ef981                  var_c_1 = &var_c_1[1];
005ef984                  *(uint8_t*)eax_9 = (((edx_8 ^ ((int8_t)(((((ebx_7 + ecx_3) + ecx_4) + ecx_5) + 0x42) >> 2))) & 0x1c) ^ ((int8_t)(((((eax_4 + ecx_8) + ecx_9) + edi_4) + 0x42) >> 2)));
005ef98a                  ebx = &var_10_1[2];
005ef98c                  edx_2 = &var_14_1[2];
005ef990                  var_10_1 = ebx;
005ef993                  var_14_1 = edx_2;
005ef996              } while (ebx < eax_3);
005ef996              
005ef99c              ecx_1 = var_18;
005ef99f              ebx = var_1c;
005ef9a2              edi_3 = var_28;
005ef8ff          }
005ef8ff          
005ef9ab          ecx_1 = &ecx_1[*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60)];
005ef9ae          eax_1 = *(uint32_t*)this;
005ef9b3          ebx = &ebx[(*(uint32_t*)((char*)eax_1 + 0x60) << 1)];
005ef9b8          var_18 = ecx_1;
005ef9bb          var_1c = ebx;
005ef8db      }
005ef8db      
005ef9ca      return 0;
005ef8ad  }


005ef9cb  long __thiscall D3DXTex::CBlt::BltBox2D_A8(D3DXTex::CBlt* this)

005ef9cb  {
005ef9d7      uint8_t* ebx = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005ef9da      void* eax_1 = *(uint32_t*)this;
005ef9dd      char* i = *(uint32_t*)((char*)eax_1 + 0x20);
005ef9e0      int32_t edi;
005ef9e0      int32_t var_20 = edi;
005ef9e8      D3DXTex::CBlt* this_1 = this;
005ef9e8      
005efa4e      for (void* edi_3 = ((*(uint32_t*)((char*)eax_1 + 0x6c) * *(uint32_t*)((char*)eax_1 + 0x60)) + i); i < edi_3; i = &i[(*(uint32_t*)((char*)eax_1 + 0x60) << 1)])
005efa4e      {
005ef9f5          void* eax_3 = (*(uint32_t*)((char*)eax_1 + 0x68) + i);
005ef9f7          void* edx_2 = (*(uint32_t*)((char*)eax_1 + 0x60) + i);
005ef9fb          uint8_t* var_c_1 = ebx;
005ef9fe          char* i_1 = i;
005ef9fe          
005efa01          if (i < eax_3)
005efa01          {
005efa33              do
005efa33              {
005efa13                  uint32_t ecx_2 = ((((uint32_t)*(uint8_t*)((char*)edx_2 + 1)) + ((uint32_t)i_1[1])) + ((uint32_t)*(uint8_t*)edx_2));
005efa18                  uint32_t ebx_5 = ((uint32_t)*(uint8_t*)i_1);
005efa1b                  i_1 = &i_1[2];
005efa23                  uint8_t* ebx_6 = var_c_1;
005efa29                  var_c_1 = &var_c_1[1];
005efa2d                  edx_2 += 2;
005efa31                  *(uint8_t*)ebx_6 = ((int8_t)(((ecx_2 + ebx_5) + 2) >> 2));
005efa33              } while (i_1 < eax_3);
005efa33              
005efa38              this = this_1;
005efa01          }
005efa01          
005efa3e          ebx = &ebx[*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60)];
005efa41          eax_1 = *(uint32_t*)this;
005efa4e      }
005efa4e      
005efa56      return 0;
005ef9cb  }


005efa57  long __thiscall D3DXTex::CBlt::BltBox2D_A8R3G3B2(D3DXTex::CBlt* this)

005efa57  {
005efa65      int16_t* ecx_1 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005efa69      void* esi = *(uint32_t*)this;
005efa6b      int16_t* ebx = *(uint32_t*)((char*)esi + 0x20);
005efa6e      int32_t edi;
005efa6e      int32_t var_38 = edi;
005efa76      void* edi_3 = ((*(uint32_t*)((char*)esi + 0x6c) * *(uint32_t*)((char*)esi + 0x60)) + ebx);
005efa7d      int16_t* var_1c = ecx_1;
005efa80      int16_t* var_20 = ebx;
005efa83      void* var_28 = edi_3;
005efa83      
005efa86      while (ebx < edi_3)
005efa86      {
005efa97          void* esi_2 = &ebx[*(uint32_t*)((char*)esi + 0x68)];
005efa9a          int16_t* edx_2 = (*(uint32_t*)((char*)esi + 0x60) + ebx);
005efa9e          int16_t* var_c_1 = ecx_1;
005efaa1          int16_t* var_14_1 = ebx;
005efaa4          int16_t* var_18_1 = edx_2;
005efaa4          
005efaaa          if (ebx < esi_2)
005efaaa          {
005efb50              do
005efb50              {
005efab0                  uint32_t esi_3 = ((uint32_t)edx_2[1]);
005efab4                  uint32_t ecx_2 = ((uint32_t)*(uint16_t*)edx_2);
005efab7                  uint32_t edx_3 = ((uint32_t)*(uint16_t*)ebx);
005efaba                  uint32_t edi_4 = ((uint32_t)ebx[1]);
005efac1                  uint32_t var_10_1 = edx_3;
005efacb                  edx_3 &= 0xe3;
005eface                  uint32_t ebx_1;
005eface                  ebx_1 = (esi_3 & 0xe3);
005efad6                  uint32_t edx_4;
005efad6                  edx_4 = (ecx_2 & 0xe3);
005efadd                  uint32_t edx_5;
005efadd                  edx_5 = (edi_4 & 0xe3);
005efae2                  uint32_t ecx_3;
005efae2                  ecx_3 = (esi_3 & 0xff1c);
005efaee                  uint32_t ebx_4;
005efaee                  ebx_4 = (var_10_1 & 0xff1c);
005efaf9                  uint32_t ebx_5;
005efaf9                  ebx_5 = (ecx_2 & 0xff1c);
005efb00                  uint32_t ebx_6;
005efb00                  ebx_6 = (edi_4 & 0xff1c);
005efb12                  uint16_t edx_7;
005efb12                  edx_7 = (((int16_t)(((((ebx_1 + edx_3) + edx_4) + edx_5) + 0x42) >> 2)) ^ ((int8_t)(((((ecx_3 + ebx_4) + ebx_5) + ebx_6) + 0x208) >> 2)));
005efb34                  int16_t* ecx_14 = var_c_1;
005efb37                  var_c_1 = &var_c_1[1];
005efb3b                  *(uint16_t*)ecx_14 = ((edx_7 & 0xe3) ^ ((int16_t)((((((esi_3 & 0xff1c) + (var_10_1 & 0xff1c)) + (ecx_2 & 0xff1c)) + (edi_4 & 0xff1c)) + 0x208) >> 2)));
005efb41                  ebx = &var_14_1[2];
005efb44                  edx_2 = &var_18_1[2];
005efb4a                  var_14_1 = ebx;
005efb4d                  var_18_1 = edx_2;
005efb50              } while (ebx < esi_2);
005efb50              
005efb56              ecx_1 = var_1c;
005efb59              ebx = var_20;
005efb5c              edi_3 = var_28;
005efaaa          }
005efaaa          
005efb65          ecx_1 += *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60);
005efb68          esi = *(uint32_t*)this;
005efb6d          ebx = &ebx[*(uint32_t*)((char*)esi + 0x60)];
005efb72          var_1c = ecx_1;
005efb75          var_20 = ebx;
005efa86      }
005efa86      
005efb84      return 0;
005efa57  }


005efb85  long __thiscall D3DXTex::CBlt::BltBox2D_X4R4G4B4(D3DXTex::CBlt* this)

005efb85  {
005efb91      int32_t edi;
005efb91      int32_t var_2c = edi;
005efb92      int16_t* edi_1 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005efb95      void* eax_1 = *(uint32_t*)this;
005efb9e      int16_t* ebx = *(uint32_t*)((char*)eax_1 + 0x20);
005efba1      void* edx_2 = ((*(uint32_t*)((char*)eax_1 + 0x6c) * *(uint32_t*)((char*)eax_1 + 0x60)) + ebx);
005efba5      D3DXTex::CBlt* this_1 = this;
005efba8      int16_t* var_10 = edi_1;
005efbab      int16_t* var_14 = ebx;
005efbae      void* var_24 = edx_2;
005efbae      
005efbb1      while (ebx < edx_2)
005efbb1      {
005efbbe          void* eax_3 = &ebx[*(uint32_t*)((char*)eax_1 + 0x68)];
005efbc1          void* esi_2 = (*(uint32_t*)((char*)eax_1 + 0x60) + ebx);
005efbc5          int16_t* var_8_1 = edi_1;
005efbc8          int16_t* var_c_1 = ebx;
005efbc8          
005efbce          if (ebx < eax_3)
005efbce          {
005efc59              do
005efc59              {
005efbd4                  uint32_t ecx = ((uint32_t)*(uint16_t*)ebx);
005efbd7                  uint32_t edx_3 = ((uint32_t)ebx[1]);
005efbdb                  uint32_t eax_4 = ((uint32_t)*(uint16_t*)((char*)esi_2 + 2));
005efbdf                  uint32_t edi_2 = ((uint32_t)*(uint16_t*)esi_2);
005efc07                  int32_t ebx_5 = (((((eax_4 & 0xffff00f0) + (ecx & 0xffff00f0)) + (edi_2 & 0xffff00f0)) + (edx_3 & 0xffff00f0)) + 0x20);
005efc20                  edi_2 &= 0xf0f;
005efc23                  edx_3 &= 0xf0f;
005efc2f                  esi_2 += 4;
005efc43                  int16_t* eax_10 = var_8_1;
005efc46                  var_8_1 = &var_8_1[1];
005efc4a                  *(uint16_t*)eax_10 = ((((int16_t)(ebx_5 >> 2)) & 0xf0) | (((int16_t)((((((eax_4 & 0xffff0f0f) + (ecx & 0xffff0f0f)) + edi_2) + edx_3) + 0x202) >> 2)) & 0xf0f));
005efc50                  ebx = &var_c_1[2];
005efc56                  var_c_1 = ebx;
005efc59              } while (ebx < eax_3);
005efc59              
005efc5f              this = this_1;
005efc62              edi_1 = var_10;
005efc65              ebx = var_14;
005efc68              edx_2 = var_24;
005efbce          }
005efbce          
005efc6e          edi_1 += *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60);
005efc71          eax_1 = *(uint32_t*)this;
005efc76          ebx = &ebx[*(uint32_t*)((char*)eax_1 + 0x60)];
005efc7b          var_10 = edi_1;
005efc7e          var_14 = ebx;
005efbb1      }
005efbb1      
005efc8d      return 0;
005efb85  }


005efc8e  long __thiscall D3DXTex::CBlt::BltBox2D_A8L8(D3DXTex::CBlt* this)

005efc8e  {
005efc9c      uint16_t* ecx_1 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005efca0      void* esi = *(uint32_t*)this;
005efca2      int16_t* ebx = *(uint32_t*)((char*)esi + 0x20);
005efca5      int32_t edi;
005efca5      int32_t var_38 = edi;
005efcad      void* edi_3 = ((*(uint32_t*)((char*)esi + 0x6c) * *(uint32_t*)((char*)esi + 0x60)) + ebx);
005efcb4      uint16_t* var_1c = ecx_1;
005efcb7      int16_t* var_20 = ebx;
005efcba      void* var_28 = edi_3;
005efcba      
005efcbd      while (ebx < edi_3)
005efcbd      {
005efcce          void* esi_2 = &ebx[*(uint32_t*)((char*)esi + 0x68)];
005efcd1          int16_t* edx_2 = (*(uint32_t*)((char*)esi + 0x60) + ebx);
005efcd5          uint16_t* var_c_1 = ecx_1;
005efcd8          int16_t* var_14_1 = ebx;
005efcdb          int16_t* var_18_1 = edx_2;
005efcdb          
005efce1          if (ebx < esi_2)
005efce1          {
005efd87              do
005efd87              {
005efce7                  uint32_t esi_3 = ((uint32_t)edx_2[1]);
005efceb                  uint32_t ecx_2 = ((uint32_t)*(uint16_t*)edx_2);
005efcee                  uint32_t edx_3 = ((uint32_t)*(uint16_t*)ebx);
005efcf1                  uint32_t edi_4 = ((uint32_t)ebx[1]);
005efcf8                  uint32_t var_10_1 = edx_3;
005efd02                  edx_3 &= 0xff;
005efd05                  uint32_t ebx_1;
005efd05                  ebx_1 = (esi_3 & 0xff);
005efd0d                  uint32_t edx_4;
005efd0d                  edx_4 = (ecx_2 & 0xff);
005efd14                  uint32_t edx_5;
005efd14                  edx_5 = (edi_4 & 0xff);
005efd19                  uint32_t ecx_3;
005efd19                  ecx_3 = (esi_3 & 0xff00);
005efd25                  uint32_t ebx_4;
005efd25                  ebx_4 = (var_10_1 & 0xff00);
005efd30                  uint32_t ebx_5;
005efd30                  ebx_5 = (ecx_2 & 0xff00);
005efd37                  uint32_t ebx_6;
005efd37                  ebx_6 = (edi_4 & 0xff00);
005efd69                  uint16_t edx_9 = (((uint16_t)(((int8_t)(((((ebx_1 + edx_3) + edx_4) + edx_5) + 2) >> 2)) ^ ((int8_t)(((((ecx_3 + ebx_4) + ebx_5) + ebx_6) + 0x200) >> 2)))) ^ ((int16_t)((((((esi_3 & 0xff00) + (var_10_1 & 0xff00)) + (ecx_2 & 0xff00)) + (edi_4 & 0xff00)) + 0x200) >> 2)));
005efd6b                  uint16_t* ecx_14 = var_c_1;
005efd6e                  var_c_1 = &var_c_1[1];
005efd72                  *(uint16_t*)ecx_14 = edx_9;
005efd78                  ebx = &var_14_1[2];
005efd7b                  edx_2 = &var_18_1[2];
005efd81                  var_14_1 = ebx;
005efd84                  var_18_1 = edx_2;
005efd87              } while (ebx < esi_2);
005efd87              
005efd8d              ecx_1 = var_1c;
005efd90              ebx = var_20;
005efd93              edi_3 = var_28;
005efce1          }
005efce1          
005efd9c          ecx_1 += *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60);
005efd9f          esi = *(uint32_t*)this;
005efda4          ebx = &ebx[*(uint32_t*)((char*)esi + 0x60)];
005efda9          var_1c = ecx_1;
005efdac          var_20 = ebx;
005efcbd      }
005efcbd      
005efdbb      return 0;
005efc8e  }


005efdbc  long __thiscall D3DXTex::CBlt::BltBox2D_A4L4(D3DXTex::CBlt* this)

005efdbc  {
005efdc9      uint8_t* ecx_1 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x20);
005efdcd      int32_t edi;
005efdcd      int32_t var_34 = edi;
005efdd1      void* eax_1 = *(uint32_t*)this;
005efdda      char* ebx = *(uint32_t*)((char*)eax_1 + 0x20);
005efddd      void* edi_3 = ((*(uint32_t*)((char*)eax_1 + 0x6c) * *(uint32_t*)((char*)eax_1 + 0x60)) + ebx);
005efde1      uint8_t* var_18 = ecx_1;
005efde4      char* var_1c = ebx;
005efde7      void* var_28 = edi_3;
005efde7      
005efdea      while (ebx < edi_3)
005efdea      {
005efdfc          void* eax_3 = (*(uint32_t*)((char*)eax_1 + 0x68) + ebx);
005efdfe          char* edx_2 = (*(uint32_t*)((char*)eax_1 + 0x60) + ebx);
005efe02          uint8_t* var_c_1 = ecx_1;
005efe05          char* var_10_1 = ebx;
005efe08          char* var_14_1 = edx_2;
005efe08          
005efe0e          if (ebx < eax_3)
005efe0e          {
005efea5              do
005efea5              {
005efe14                  uint32_t ecx_2 = ((uint32_t)*(uint8_t*)edx_2);
005efe17                  uint32_t eax_4 = ((uint32_t)edx_2[1]);
005efe1b                  uint32_t edi_4 = ((uint32_t)ebx[1]);
005efe22                  uint32_t ecx_3 = ((uint32_t)*(uint8_t*)ebx);
005efe37                  int32_t edx_6 = (((eax_4 & 0xf) + (ecx_3 & 0xf)) + (ecx_2 & 0xf));
005efe39                  uint32_t var_20_1 = ecx_3;
005efe3c                  ecx_3 &= 0xf0;
005efe4a                  uint32_t ebx_7;
005efe4a                  ebx_7 = (eax_4 & 0xf0);
005efe4d                  uint8_t edx_8 = ((int8_t)(((edx_6 + (edi_4 & 0xf)) + 2) >> 2));
005efe50                  eax_4 &= 0xf0;
005efe58                  uint32_t ecx_4;
005efe58                  ecx_4 = (ecx_2 & 0xf0);
005efe5f                  uint32_t ecx_5;
005efe5f                  ecx_5 = (edi_4 & 0xf0);
005efe62                  edi_4 &= 0xf0;
005efe74                  uint32_t ecx_8;
005efe74                  ecx_8 = (var_20_1 & 0xf0);
005efe7f                  uint32_t ecx_9;
005efe7f                  ecx_9 = (ecx_2 & 0xf0);
005efe8d                  uint8_t* eax_9 = var_c_1;
005efe90                  var_c_1 = &var_c_1[1];
005efe93                  *(uint8_t*)eax_9 = (((edx_8 ^ ((int8_t)(((((ebx_7 + ecx_3) + ecx_4) + ecx_5) + 0x20) >> 2))) & 0xf) ^ ((int8_t)(((((eax_4 + ecx_8) + ecx_9) + edi_4) + 0x20) >> 2)));
005efe99                  ebx = &var_10_1[2];
005efe9b                  edx_2 = &var_14_1[2];
005efe9f                  var_10_1 = ebx;
005efea2                  var_14_1 = edx_2;
005efea5              } while (ebx < eax_3);
005efea5              
005efeab              ecx_1 = var_18;
005efeae              ebx = var_1c;
005efeb1              edi_3 = var_28;
005efe0e          }
005efe0e          
005efeba          ecx_1 = &ecx_1[*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x60)];
005efebd          eax_1 = *(uint32_t*)this;
005efec2          ebx = &ebx[(*(uint32_t*)((char*)eax_1 + 0x60) << 1)];
005efec7          var_18 = ecx_1;
005efeca          var_1c = ebx;
005efdea      }
005efdea      
005efed9      return 0;
005efdbc  }


005efeda  long __thiscall D3DXTex::CBlt::BltSame(D3DXTex::CBlt* this)

005efeda  {
005efee3      D3DXTex::CBlt* this_1 = this;
005efee5      void* eax = *(uint32_t*)((char*)this_1 + 4);
005efee8      void* ecx = *(uint32_t*)this_1;
005efef0      int32_t edi;
005efef0      int32_t var_18 = edi;
005efef1      D3DXTex::CBlt* this_2 = this_1;
005efef1      
005efefb      if ((*(uint32_t*)((char*)eax + 4) != *(uint32_t*)((char*)ecx + 4) || *(uint32_t*)((char*)ecx + 0x18) != 0))
005efefd          return 0x80004005;
005efefd      
005eff32      if ((*(uint32_t*)((char*)eax + 0x68) == *(uint32_t*)((char*)ecx + 0x68) && (*(uint32_t*)((char*)eax + 0x6c) == *(uint32_t*)((char*)ecx + 0x6c) && (*(uint32_t*)((char*)eax + 0x70) == *(uint32_t*)((char*)ecx + 0x70) && *(uint32_t*)((char*)eax + 0x10) == *(uint32_t*)((char*)ecx + 0x10)))))
005eff32      {
005eff3b          if (*(uint32_t*)((char*)eax + 0xc) == 0)
005eff3f              return D3DXTex::CBlt::BltSame_DXTn(this_1);
005eff3f          
005eff4c          if (*(uint32_t*)((char*)eax + 0x1c) == 0)
005eff4c          {
005eff63          label_5eff63:
005eff63              *(uint32_t*)((char*)eax + 0x10) = 0;
005eff68              *(uint32_t*)(*(uint32_t*)this_1 + 0x10) = 0;
005eff6b              void* ecx_2 = *(uint32_t*)((char*)this_1 + 4);
005eff71              int32_t i = 0;
005eff71              
005eff74              if (*(uint32_t*)((char*)ecx_2 + 0x70) > 0)
005eff74              {
005eff76                  void* esi_6 = *(uint32_t*)this_1;
005eff78                  int32_t edi_2 = *(uint32_t*)((char*)ecx_2 + 0x6c);
005eff78                  
005effd4                  do
005effd4                  {
005eff7b                      void* edx_1 = *(uint32_t*)((char*)this_1 + 4);
005eff85                      int32_t eax_5 = ((*(uint32_t*)((char*)edx_1 + 0x64) * i) + *(uint32_t*)((char*)edx_1 + 0x20));
005eff8f                      int32_t edx_4 = ((*(uint32_t*)((char*)esi_6 + 0x64) * i) + *(uint32_t*)((char*)esi_6 + 0x20));
005eff92                      int32_t var_c_1 = 0;
005eff92                      
005eff98                      if (edi_2 > 0)
005eff98                      {
005effc6                          do
005effc6                          {
005eff9a                              int32_t ecx_3 = *(uint32_t*)((char*)ecx_2 + 0x74);
005effa6                              int32_t esi_8;
005effa6                              int32_t edi_4;
005effa6                              edi_4 = __builtin_memcpy(eax_5, edx_4, ((ecx_3 >> 2) << 2));
005effaa                              this_1 = this_2;
005effb0                              __builtin_memcpy(edi_4, esi_8, (ecx_3 & 3));
005effb2                              ecx_2 = *(uint32_t*)((char*)this_1 + 4);
005effb5                              esi_6 = *(uint32_t*)this_1;
005effb7                              eax_5 += *(uint32_t*)((char*)ecx_2 + 0x60);
005effba                              edx_4 += *(uint32_t*)((char*)esi_6 + 0x60);
005effbd                              var_c_1 += 1;
005effc0                              edi_2 = *(uint32_t*)((char*)ecx_2 + 0x6c);
005effc6                          } while (var_c_1 < edi_2);
005eff98                      }
005eff98                      
005effc8                      i += 1;
005effcb                      ecx_2 = *(uint32_t*)((char*)this_1 + 4);
005effd4                  } while (i < *(uint32_t*)((char*)ecx_2 + 0x70));
005eff74              }
005eff74              
005effd6              return 0;
005eff4c          }
005eff4c          
005eff4e          int32_t* esi_5 = *(uint32_t*)((char*)eax + 0x38);
005eff51          int32_t* edi_1 = *(uint32_t*)((char*)ecx + 0x38);
005eff51          
005eff56          if (esi_5 == edi_1)
005eff56              goto label_5eff63;
005eff56          
005eff58          int32_t i_1 = 0x100;
005eff5d          bool cond:3_1 = false;
005eff5d          
005eff5f          while (i_1 != 0)
005eff5f          {
005eff5f              int32_t temp0_1 = *(uint32_t*)esi_5;
005eff5f              int32_t temp1_1 = *(uint32_t*)edi_1;
005eff5f              cond:3_1 = temp0_1 != temp1_1;
005eff5f              esi_5 = &esi_5[1];
005eff5f              edi_1 = &edi_1[1];
005eff5f              i_1 -= 1;
005eff5f              
005eff5f              if (temp0_1 != temp1_1)
005eff5f                  break;
005eff5f          }
005eff5f          
005eff61          if (!(cond:3_1))
005eff61              goto label_5eff63;
005eff32      }
005eff32      
005effda      return 0x80004005;
005efeda  }


005effe4  long __thiscall D3DXTex::CBlt::BltCopy(D3DXTex::CBlt* this)

005effe4  {
005effe9      D3DXTex::CBlt* this_1 = this;
005effee      void* eax = *(uint32_t*)((char*)this + 4);
005efff1      void* ecx = *(uint32_t*)this;
005efff3      int32_t edi;
005efff3      int32_t var_14 = edi;
005efff4      int32_t edi_1 = *(uint32_t*)((char*)eax + 0x68);
005efff4      
005f0012      if ((edi_1 == *(uint32_t*)((char*)ecx + 0x68) && (*(uint32_t*)((char*)eax + 0x6c) == *(uint32_t*)((char*)ecx + 0x6c) && *(uint32_t*)((char*)eax + 0x70) == *(uint32_t*)((char*)ecx + 0x70))))
005f0012      {
005f001e          void* eax_4 = operator new((edi_1 << 4));
005f002a          void* var_8;
005f002a          
005f002a          if (eax_4 == 0)
005f0041              var_8 = nullptr;
005f002a          else
005f002a          {
005f0035              `vector constructor iterator'(eax_4, 0x10, edi_1, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f003a              var_8 = eax_4;
005f002a          }
005f002a          
005f0047          if (var_8 != 0)
005f0047          {
005f0049              void* eax_5 = *(uint32_t*)((char*)this + 4);
005f0049              
005f0056              if ((*(uint32_t*)((char*)eax_5 + 0x10) != 0 && *(uint32_t*)(*(uint32_t*)this + 0x10) != 0))
005f0056              {
005f0058                  *(uint32_t*)((char*)eax_5 + 0x10) = 0;
005f005d                  *(uint32_t*)(*(uint32_t*)this + 0x10) = 0;
005f0056              }
005f0056              
005f0060              void* eax_7 = *(uint32_t*)((char*)this + 4);
005f0063              int32_t i = 0;
005f0063              
005f0068              if (*(uint32_t*)((char*)eax_7 + 0x70) > 0)
005f0068              {
005f006a                  int32_t eax_8 = *(uint32_t*)((char*)eax_7 + 0x6c);
005f006a                  
005f009e                  do
005f009e                  {
005f006d                      int32_t edi_2 = 0;
005f006d                      
005f0071                      if (eax_8 > 0)
005f0071                      {
005f0095                          do
005f0095                          {
005f007c                              *(uint32_t*)(**(uint32_t**)this + 4)(edi_2, i, var_8);
005f0089                              *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(edi_2, i, var_8);
005f008f                              eax_8 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c);
005f0092                              edi_2 += 1;
005f0095                          } while (edi_2 < eax_8);
005f0071                      }
005f0071                      
005f009a                      i += 1;
005f009e                  } while (i < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x70));
005f0068              }
005f0068              
005f00a3              operator delete(var_8);
005f00a9              return 0;
005f0047          }
005f0012      }
005f0012      
005f00ad      return 0x80004005;
005effe4  }


005f00b7  long __thiscall D3DXTex::CBlt::BltNone(D3DXTex::CBlt* this)

005f00b7  {
005f00c6      if (*(uint8_t*)((char*)this + 8) != 1)
005f00c8          return 0x80004005;
005f00c8      
005f00d2      void* eax = *(uint32_t*)((char*)this + 4);
005f00d5      void* ecx = *(uint32_t*)this;
005f00d7      int32_t edx_1 = *(uint32_t*)((char*)eax + 0x68);
005f00da      int32_t edi;
005f00da      int32_t var_20_1 = edi;
005f00db      int32_t edi_1 = *(uint32_t*)((char*)ecx + 0x68);
005f00e0      int32_t var_10_1 = edx_1;
005f00e0      
005f00e3      if (edx_1 <= edi_1)
005f00e5          var_10_1 = edi_1;
005f00e5      
005f00e8      int32_t i_6 = *(uint32_t*)((char*)eax + 0x6c);
005f00eb      int32_t i_7 = *(uint32_t*)((char*)ecx + 0x6c);
005f00f0      int32_t i_2 = i_6;
005f00f0      
005f00f3      if (i_6 >= i_7)
005f00f5          i_2 = i_7;
005f00f5      
005f00f8      int32_t i_4 = *(uint32_t*)((char*)eax + 0x70);
005f00fb      int32_t i_5 = *(uint32_t*)((char*)ecx + 0x70);
005f0100      int32_t i_3 = i_4;
005f0100      
005f0103      if (i_4 >= i_5)
005f0105          i_3 = i_5;
005f0105      
005f010c      int32_t edi_3 = (var_10_1 << 4);
005f0110      void* s_2 = operator new(edi_3);
005f0120      void* s_1;
005f0120      
005f0120      if (s_2 == 0)
005f0136          s_1 = nullptr;
005f0120      else
005f0120      {
005f0129          `vector constructor iterator'(s_2, 0x10, var_10_1, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0131          s_1 = s_2;
005f0120      }
005f0120      
005f013e      int32_t result;
005f013e      
005f013e      if (s_1 != 0)
005f013e      {
005f014d          int32_t eax_3 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68);
005f0157          void* s_3 = operator new((eax_3 << 4));
005f0162          void* s;
005f0162          
005f0162          if (s_3 == 0)
005f0178              s = nullptr;
005f0162          else
005f0162          {
005f016b              `vector constructor iterator'(s_3, 0x10, eax_3, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0173              s = s_3;
005f0162          }
005f0162          
005f0181          if (s != 0)
005f0181          {
005f01a8              __builtin_memset(__builtin_memset(s_1, 0, ((edi_3 >> 2) << 2)), 0, (edi_3 & 3));
005f01b3              int32_t ecx_8 = (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) << 4);
005f01c4              __builtin_memset(__builtin_memset(s, 0, ((ecx_8 >> 2) << 2)), 0, (ecx_8 & 3));
005f01c6              void* eax_7 = *(uint32_t*)((char*)this + 4);
005f01c6              
005f01d3              if ((*(uint32_t*)((char*)eax_7 + 0x10) != 0 && *(uint32_t*)(*(uint32_t*)this + 0x10) != 0))
005f01d3              {
005f01d5                  *(uint32_t*)((char*)eax_7 + 0x10) = 0;
005f01da                  *(uint32_t*)(*(uint32_t*)this + 0x10) = 0;
005f01d3              }
005f01d3              
005f01dd              int32_t i_1 = i_3;
005f01e2              int32_t var_c_3 = 0;
005f01e2              
005f01e5              if (i_1 > 0)
005f01e5              {
005f023d                  do
005f023d                  {
005f01ea                      int32_t edi_8 = 0;
005f01ea                      
005f01ee                      if (i_2 > 0)
005f01ee                      {
005f0210                          do
005f0210                          {
005f01fb                              *(uint32_t*)(**(uint32_t**)this + 4)(edi_8, var_c_3, s_1);
005f020a                              *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(edi_8, var_c_3, s_1);
005f020d                              edi_8 += 1;
005f0210                          } while (edi_8 < i_2);
005f01ee                      }
005f01ee                      
005f0218                      int32_t i = i_2;
005f0218                      
005f021a                      if (i_2 < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c))
005f021a                      {
005f0232                          do
005f0232                          {
005f0228                              *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(i, var_c_3, s);
005f022e                              i += 1;
005f0232                          } while (i < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c));
005f021a                      }
005f021a                      
005f0234                      var_c_3 += 1;
005f0237                      i_1 = i_3;
005f023d                  } while (var_c_3 < i_1);
005f01e5              }
005f01e5              
005f023f              void* eax_14 = *(uint32_t*)((char*)this + 4);
005f023f              
005f0245              if (i_1 < *(uint32_t*)((char*)eax_14 + 0x70))
005f0245              {
005f0247                  int32_t eax_15 = *(uint32_t*)((char*)eax_14 + 0x6c);
005f0247                  
005f026f                  do
005f026f                  {
005f024a                      int32_t edi_9 = 0;
005f024a                      
005f024e                      if (eax_15 > 0)
005f024e                      {
005f0266                          do
005f0266                          {
005f025a                              *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(edi_9, i_1, s);
005f0260                              eax_15 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c);
005f0263                              edi_9 += 1;
005f0266                          } while (edi_9 < eax_15);
005f024e                      }
005f024e                      
005f026b                      i_1 += 1;
005f026f                  } while (i_1 < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x70));
005f0245              }
005f0245              
005f0274              operator delete(s_1);
005f027c              operator delete(s);
005f0282              result = 0;
005f0181          }
005f0181          else
005f0181          {
005f0186              operator delete(s_1);
005f018b              result = 0x80004005;
005f0181          }
005f013e      }
005f013e      else
005f0140          result = 0x80004005;
005f0140      
005f0289      return result;
005f00b7  }


005f028a  long __thiscall D3DXTex::CBlt::BltPoint(D3DXTex::CBlt* this)

005f028a  {
005f0299      if (*(uint8_t*)((char*)this + 8) != 2)
005f029b          return 0x80004005;
005f029b      
005f02a8      int32_t edi;
005f02a8      int32_t var_40_1 = edi;
005f02a9      int32_t edi_1 = *(uint32_t*)(*(uint32_t*)this + 0x68);
005f02b2      void* eax_3 = operator new((edi_1 << 4));
005f02c2      void* var_8_1;
005f02c2      
005f02c2      if (eax_3 == 0)
005f02d6          var_8_1 = nullptr;
005f02c2      else
005f02c2      {
005f02c9          `vector constructor iterator'(eax_3, 0x10, edi_1, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f02d1          var_8_1 = eax_3;
005f02c2      }
005f02c2      
005f02de      int32_t result;
005f02de      
005f02de      if (var_8_1 != 0)
005f02de      {
005f02ed          int32_t edi_2 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68);
005f02f6          void* eax_8 = operator new((edi_2 << 4));
005f0303          void* var_c_1;
005f0303          
005f0303          if (eax_8 == 0)
005f0319              var_c_1 = nullptr;
005f0303          else
005f0303          {
005f030a              `vector constructor iterator'(eax_8, 0x10, edi_2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0312              var_c_1 = eax_8;
005f0303          }
005f0303          
005f031f          if (var_c_1 != 0)
005f031f          {
005f0333              void* eax_10 = *(uint32_t*)((char*)this + 4);
005f0333              
005f0340              if ((*(uint32_t*)((char*)eax_10 + 0x10) != 0 && *(uint32_t*)(*(uint32_t*)this + 0x10) != 0))
005f0340              {
005f0342                  *(uint32_t*)((char*)eax_10 + 0x10) = 0;
005f0347                  *(uint32_t*)(*(uint32_t*)this + 0x10) = 0;
005f0340              }
005f0340              
005f034a              void* ecx_1 = *(uint32_t*)this;
005f034c              void* esi_1 = *(uint32_t*)((char*)this + 4);
005f0357              uint32_t temp0_1 = (COMBINE(0, (*(uint32_t*)((char*)ecx_1 + 0x68) << 0x10)) / *(uint32_t*)((char*)esi_1 + 0x68));
005f035e              int32_t var_20_1 = 0;
005f0361              int32_t i = 0;
005f036d              uint32_t temp0_2 = (COMBINE(0, (*(uint32_t*)((char*)ecx_1 + 0x6c) << 0x10)) / *(uint32_t*)((char*)esi_1 + 0x6c));
005f0378              int32_t eax_19 = (*(uint32_t*)((char*)ecx_1 + 0x70) << 0x10);
005f037b              int32_t temp2_3 = *(uint32_t*)((char*)esi_1 + 0x70);
005f0381              void* eax_21 = esi_1;
005f0381              
005f0386              if (*(uint32_t*)((char*)eax_21 + 0x70) > 0)
005f0386              {
005f0441                  do
005f0441                  {
005f038c                      int32_t var_24_1 = 0xffffffff;
005f0390                      int32_t esi_2 = 0;
005f0395                      int32_t var_28_3 = 0;
005f0398                      int32_t j = 0;
005f0398                      
005f039b                      if (*(uint32_t*)((char*)eax_21 + 0x6c) > 0)
005f039b                      {
005f0429                          do
005f0429                          {
005f03ab                              int32_t var_18_1 = 0;
005f03ae                              int32_t k = 0;
005f03ae                              
005f03b1                              if (((var_24_1 ^ esi_2) & 0xffff0000) != 0)
005f03b1                              {
005f03c7                                  *(uint32_t*)(**(uint32_t**)this + 4)((esi_2 >> 0x10), (var_20_1 >> 0x10), var_8_1);
005f03ca                                  var_24_1 = esi_2;
005f03b1                              }
005f03b1                              
005f03d3                              if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) > 0)
005f03d3                              {
005f03d5                                  void* eax_26 = var_c_1;
005f03d5                                  
005f03ff                                  do
005f03ff                                  {
005f03d8                                      int32_t esi_3 = var_18_1;
005f03de                                      var_18_1 += temp0_1;
005f03e7                                      void* esi_6 = (((esi_3 >> 0x10) << 4) + var_8_1);
005f03ea                                      k += 1;
005f03f2                                      *(uint32_t*)eax_26 = *(uint32_t*)esi_6;
005f03f2                                      int32_t* edi_4 = ((char*)eax_26 + 4);
005f03f2                                      void* esi_7 = ((char*)esi_6 + 4);
005f03f3                                      *(uint32_t*)edi_4 = *(uint32_t*)esi_7;
005f03f3                                      int32_t* edi_5 = &edi_4[1];
005f03f3                                      void* esi_8 = ((char*)esi_7 + 4);
005f03f4                                      *(uint32_t*)edi_5 = *(uint32_t*)esi_8;
005f03f4                                      edi_5[1] = *(uint32_t*)((char*)esi_8 + 4);
005f03f9                                      eax_26 += 0x10;
005f03ff                                  } while (k < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f03d3                              }
005f03d3                              
005f0411                              *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(j, i, var_c_1);
005f0417                              esi_2 = (var_28_3 + temp0_2);
005f041a                              j += 1;
005f0426                              var_28_3 = esi_2;
005f0429                          } while (j < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c));
005f039b                      }
005f039b                      
005f0432                      var_20_1 += (COMBINE(0, eax_19) / temp2_3);
005f0435                      i += 1;
005f0438                      eax_21 = *(uint32_t*)((char*)this + 4);
005f0441                  } while (i < *(uint32_t*)((char*)eax_21 + 0x70));
005f0386              }
005f0386              
005f044a              operator delete(var_8_1);
005f0452              operator delete(var_c_1);
005f0458              result = 0;
005f031f          }
005f031f          else
005f031f          {
005f0324              operator delete(var_8_1);
005f0329              result = 0x8007000e;
005f031f          }
005f02de      }
005f02de      else
005f02e0          result = 0x8007000e;
005f02e0      
005f045f      return result;
005f028a  }


005f0460  long __thiscall D3DXTex::CBlt::BltBox2D(D3DXTex::CBlt* this)

005f0460  {
005f046f      if (*(uint8_t*)((char*)this + 8) != 5)
005f0471          return 0x80004005;
005f0471      
005f047b      void* eax = *(uint32_t*)this;
005f047d      int32_t edx_1 = *(uint32_t*)((char*)eax + 0x68);
005f0481      void* esi_1 = *(uint32_t*)((char*)this + 4);
005f0486      int32_t edi;
005f0486      int32_t var_6c_1 = edi;
005f0487      int32_t edi_1 = *(uint32_t*)((char*)esi_1 + 0x68);
005f049b      int32_t ecx_2;
005f049b      
005f049b      if ((edi_1 == (edx_1 >> 1) || (edi_1 == 1 && edx_1 == edi_1)))
005f04a4          ecx_2 = *(uint32_t*)((char*)esi_1 + 0x6c);
005f04a4      
005f04ce      int32_t result;
005f04ce      
005f04ce      if (((((edi_1 == (edx_1 >> 1) || (edi_1 == 1 && edx_1 == edi_1)) && (ecx_2 == (*(uint32_t*)((char*)eax + 0x6c) >> 1) || (ecx_2 == 1 && *(uint32_t*)((char*)eax + 0x6c) == ecx_2))) && *(uint32_t*)((char*)esi_1 + 0x70) == 1) && *(uint32_t*)((char*)eax + 0x70) == 1))
005f04ce      {
005f04da          if ((edx_1 > 1 && (1 & edx_1) != 0))
005f04da          {
005f04dc              *(uint32_t*)((char*)eax + 0x68) &= 0xfffffffe;
005f04e0              void* eax_1 = *(uint32_t*)this;
005f04e5              *(uint32_t*)((char*)eax_1 + 0x74) -= *(uint32_t*)((char*)eax_1 + 0x78);
005f04da          }
005f04da          
005f04e8          void* eax_2 = *(uint32_t*)this;
005f04e8          
005f04ed          if (*(uint32_t*)((char*)eax_2 + 0x6c) > 1)
005f04ef              *(uint32_t*)((char*)eax_2 + 0x6c) &= 0xfffffffe;
005f04ef          
005f04f7          if ((*(uint8_t*)((char*)this + 0xa) & 8) != 0)
005f04f7          {
005f05e8          label_5f05e8:
005f05e8              int32_t esi_2 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68);
005f05f1              void* eax_17 = operator new((esi_2 << 4));
005f0601              void* var_14_1;
005f0601              
005f0601              if (eax_17 == 0)
005f0615                  var_14_1 = nullptr;
005f0601              else
005f0601              {
005f0608                  `vector constructor iterator'(eax_17, 0x10, esi_2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0610                  var_14_1 = eax_17;
005f0601              }
005f0601              
005f061d              if (var_14_1 != 0)
005f061d              {
005f0629                  void* eax_19 = *(uint32_t*)this;
005f062f                  int32_t esi_3 = *(uint32_t*)((char*)eax_19 + 0x68);
005f0632                  void* var_c_1;
005f0632                  void* var_8_1;
005f0632                  void* eax_30;
005f0632                  void* esi_4;
005f0632                  
005f0632                  if (*(uint32_t*)((char*)eax_19 + 0x6c) != 1)
005f0632                  {
005f0667                      int32_t esi_5 = (esi_3 << 1);
005f066f                      void* eax_25 = operator new((esi_5 << 4));
005f066f                      
005f067a                      if (eax_25 == 0)
005f068e                          var_8_1 = nullptr;
005f067a                      else
005f067a                      {
005f0681                          `vector constructor iterator'(eax_25, 0x10, esi_5, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0689                          var_8_1 = eax_25;
005f067a                      }
005f067a                      
005f0697                      esi_4 = var_8_1;
005f069d                      eax_30 = ((*(uint32_t*)(*(uint32_t*)this + 0x68) << 4) + var_8_1);
005f06a0                      var_c_1 = eax_30;
005f0632                  }
005f0632                  else
005f0632                  {
005f063a                      void* eax_22 = operator new((esi_3 << 4));
005f063a                      
005f0645                      if (eax_22 == 0)
005f0645                      {
005f0659                          var_8_1 = nullptr;
005f065d                          esi_4 = nullptr;
005f0645                      }
005f0645                      else
005f0645                      {
005f064c                          `vector constructor iterator'(eax_22, 0x10, esi_3, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0651                          esi_4 = eax_22;
005f0654                          var_8_1 = esi_4;
005f0645                      }
005f0645                      
005f0660                      eax_30 = esi_4;
005f0662                      var_c_1 = eax_30;
005f0632                  }
005f0632                  
005f06a5                  int32_t result_1;
005f06a5                  
005f06a5                  if (esi_4 != 0)
005f06a5                  {
005f06b7                      void* var_1c_1;
005f06b7                      
005f06b7                      if (*(uint32_t*)(*(uint32_t*)this + 0x68) != 1)
005f06b7                      {
005f06c1                          var_1c_1 = ((char*)esi_4 + 0x10);
005f06c4                          eax_30 += 0x10;
005f06b7                      }
005f06b7                      else
005f06b9                          var_1c_1 = esi_4;
005f06b9                      
005f06c7                      int32_t i = 0;
005f06c7                      
005f06d5                      if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c) > 0)
005f06d5                      {
005f07de                          do
005f07de                          {
005f06e5                              int32_t edi_5 = (i * 2);
005f06e8                              *(uint32_t*)(**(uint32_t**)this + 4)(edi_5, 0, esi_4);
005f06e8                              
005f06ee                              if (var_c_1 != esi_4)
005f06fb                                  *(uint32_t*)(**(uint32_t**)this + 4)((edi_5 + 1), 0, var_c_1);
005f06fb                              
005f0701                              int32_t j = 0;
005f0701                              
005f0706                              if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) > 0)
005f0706                              {
005f0715                                  void* var_18_1 = var_14_1;
005f0715                                  
005f07b7                                  do
005f07b7                                  {
005f0721                                      int32_t esi_7 = (j * 0x20);
005f0724                                      void* eax_37 = ((char*)var_1c_1 + esi_7);
005f0728                                      void* ecx_24 = ((char*)var_8_1 + esi_7);
005f072a                                      long double x87_r6_2 = (((long double)*(uint32_t*)eax_37) + ((long double)*(uint32_t*)ecx_24));
005f072c                                      void* edi_7 = var_18_1;
005f0732                                      var_18_1 += 0x10;
005f0736                                      (((long double)*(uint32_t*)((char*)eax_37 + 4)) + ((long double)*(uint32_t*)((char*)ecx_24 + 4)));
005f073f                                      float var_38_1 = ((float)(((long double)*(uint32_t*)((char*)eax_37 + 8)) + ((long double)*(uint32_t*)((char*)ecx_24 + 8))));
005f074b                                      void* eax_39 = ((char*)var_c_1 + esi_7);
005f074d                                      float var_34 = ((float)(((long double)*(uint32_t*)((char*)eax_37 + 0xc)) + ((long double)*(uint32_t*)((char*)ecx_24 + 0xc))));
005f0757                                      *(uint32_t*)((char*)eax_39 + 4);
005f076b                                      void* eax_41 = ((char*)eax_30 + esi_7);
005f0773                                      j += 1;
005f0784                                      long double x87_r5_6 = ((((long double)var_38_1) + ((long double)*(uint32_t*)((char*)eax_39 + 8))) + ((long double)*(uint32_t*)((char*)eax_41 + 8)));
005f078c                                      long double x87_r5_8 = (((long double)((float)(((long double)var_34) + ((long double)*(uint32_t*)((char*)eax_39 + 0xc))))) + ((long double)*(uint32_t*)((char*)eax_41 + 0xc)));
005f0794                                      float var_30_1 = ((float)(((long double)((float)(((long double)((float)(x87_r6_2 + ((long double)*(uint32_t*)eax_39)))) + ((long double)*(uint32_t*)eax_41)))) * x87_r5_6));
005f079c                                      float var_2c = ((float)(((long double)((float)(x87_r6_2 + ((long double)*(uint32_t*)((char*)eax_41 + 4))))) * x87_r5_6));
005f07a3                                      float var_28_1 = ((float)(x87_r6_2 * x87_r5_6));
005f07a8                                      float var_24_1 = ((float)(x87_r5_8 * x87_r5_6));
005f07ab                                      *(uint32_t*)edi_7 = var_30_1;
005f07ab                                      void* edi_8 = ((char*)edi_7 + 4);
005f07ab                                      float* esi_8 = &var_2c;
005f07ac                                      *(uint32_t*)edi_8 = *(uint32_t*)esi_8;
005f07ac                                      void* edi_9 = ((char*)edi_8 + 4);
005f07ac                                      void* esi_9 = &esi_8[1];
005f07af                                      *(uint32_t*)edi_9 = *(uint32_t*)esi_9;
005f07b0                                      *(uint32_t*)((char*)edi_9 + 4) = *(uint32_t*)((char*)esi_9 + 4);
005f07b7                                  } while (j < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f07b7                                  
005f07bd                                  esi_4 = var_8_1;
005f0706                              }
005f0706                              
005f07cf                              *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(i, 0, var_14_1);
005f07d2                              i += 1;
005f07de                          } while (i < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c));
005f06d5                      }
005f06d5                      
005f07e5                      operator delete(esi_4);
005f07eb                      result_1 = 0;
005f06a5                  }
005f06a5                  else
005f06a7                      result_1 = 0x8007000e;
005f06a7                  
005f07f0                  operator delete(var_14_1);
005f07f6                  result = result_1;
005f061d              }
005f061d              else
005f061f                  result = 0x8007000e;
005f04f7          }
005f04f7          else
005f04f7          {
005f04fd              void* eax_3 = *(uint32_t*)this;
005f04ff              void* ecx_3 = *(uint32_t*)((char*)this + 4);
005f0502              int32_t edx_3 = *(uint32_t*)((char*)eax_3 + 4);
005f0502              
005f0530              if (((((edx_3 != *(uint32_t*)((char*)ecx_3 + 4) || *(uint32_t*)((char*)eax_3 + 0x68) < 2) || *(uint32_t*)((char*)eax_3 + 0x6c) < 2) || *(uint32_t*)((char*)ecx_3 + 0x10) != 0) || *(uint32_t*)((char*)eax_3 + 0x10) != 0))
005f0508                  goto label_5f05e8;
005f0508              
005f053b              long eax_6;
005f053b              
005f053b              if (edx_3 > 0x1d)
005f053b              {
005f058b                  if (edx_3 > 0x29)
005f058b                  {
005f05b9                      if (edx_3 == 0x32)
005f05b9                      {
005f05d5                      label_5f05d5:
005f05d5                          eax_6 = D3DXTex::CBlt::BltBox2D_A8(this);
005f05d5                          goto label_5f05da;
005f05b9                      }
005f05b9                      
005f05bc                      if (edx_3 == 0x33)
005f05cc                          eax_6 = D3DXTex::CBlt::BltBox2D_A8L8(this);
005f05bc                      else
005f05bc                      {
005f05bf                          if (edx_3 != 0x34)
005f05bf                              goto label_5f05e8;
005f05bf                          
005f05c3                          eax_6 = D3DXTex::CBlt::BltBox2D_A4L4(this);
005f05bc                      }
005f058b                  }
005f058b                  else
005f058b                  {
005f058d                      if (edx_3 == 0x29)
005f058d                          goto label_5f05e8;
005f058d                      
005f0592                      if (edx_3 != 0x1e)
005f0592                      {
005f0596                          if (edx_3 == 0x20)
005f0596                              goto label_5f05a6;
005f0596                          
005f0599                          if (edx_3 != 0x21)
005f0599                              goto label_5f05e8;
005f0599                          
005f0599                          goto label_5f059d;
005f0592                      }
005f0592                      
005f05af                      eax_6 = D3DXTex::CBlt::BltBox2D_X4R4G4B4(this);
005f058b                  }
005f053b              }
005f053b              else if (edx_3 == 0x1d)
005f0581                  eax_6 = D3DXTex::CBlt::BltBox2D_A8R3G3B2(this);
005f053d              else
005f053d              {
005f0545                  if ((edx_3 - 0x14) > 8)
005f0545                      goto label_5f05e8;
005f0545                  
005f058b                  switch (edx_3)
005f058b                  {
005f054b                      case 0x14:
005f054b                      {
005f054b                          goto label_5f05e8;
005f054b                      }
005f05a6                      case 0x15:
005f05a6                      {
005f05a6                      label_5f05a6:
005f05a6                          eax_6 = D3DXTex::CBlt::BltBox2D_A8R8G8B8(this);
005f05a6                          break;
005f05a6                      }
005f059d                      case 0x16:
005f059d                      {
005f059d                      label_5f059d:
005f059d                          eax_6 = D3DXTex::CBlt::BltBox2D_X8R8G8B8(this);
005f059d                          break;
005f059d                      }
005f0554                      case 0x17:
005f0554                      {
005f0554                          eax_6 = D3DXTex::CBlt::BltBox2D_R5G6B5(this);
005f0554                          break;
005f0554                      }
005f055d                      case 0x18:
005f055d                      {
005f055d                          eax_6 = D3DXTex::CBlt::BltBox2D_X1R5G5B5(this);
005f055d                          break;
005f055d                      }
005f0566                      case 0x19:
005f0566                      {
005f0566                          eax_6 = D3DXTex::CBlt::BltBox2D_A1R5G5B5(this);
005f0566                          break;
005f0566                      }
005f056f                      case 0x1a:
005f056f                      {
005f056f                          eax_6 = D3DXTex::CBlt::BltBox2D_A4R4G4B4(this);
005f056f                          break;
005f056f                      }
005f0578                      case 0x1b:
005f0578                      {
005f0578                          eax_6 = D3DXTex::CBlt::BltBox2D_R3G3B2(this);
005f0578                          break;
005f0578                      }
005f054b                      case 0x1c:
005f054b                      {
005f054b                          goto label_5f05d5;
005f054b                      }
005f058b                  }
005f053d              }
005f053d              
005f05da          label_5f05da:
005f05da              
005f05dc              if (eax_6 < 0)
005f05dc                  goto label_5f05e8;
005f05dc              
005f05de              result = 0;
005f04f7          }
005f04ce      }
005f04ce      else
005f07fa          result = 0x80004005;
005f07fa      
005f0803      return result;
005f0460  }

005f0804  uint32_t jump_table_5f0804[0x9] = 
005f0804  {
005f0804      [0x0] =  0x005f05e5
005f0808      [0x1] =  0x005f05a4
005f080c      [0x2] =  0x005f059b
005f0810      [0x3] =  0x005f0552
005f0814      [0x4] =  0x005f055b
005f0818      [0x5] =  0x005f0564
005f081c      [0x6] =  0x005f056d
005f0820      [0x7] =  0x005f0576
005f0824      [0x8] =  0x005f05d3
005f0828  }

005f0828  long __thiscall D3DXTex::CBlt::BltBox3D(D3DXTex::CBlt* this)

005f0828  {
005f083a      if (*(uint8_t*)((char*)this + 8) != 5)
005f083c          return 0x80004005;
005f083c      
005f0846      void* eax = *(uint32_t*)this;
005f0848      int32_t ecx = *(uint32_t*)((char*)eax + 0x68);
005f084c      void* esi_1 = *(uint32_t*)((char*)this + 4);
005f0851      int32_t edi;
005f0851      int32_t var_c4_1 = edi;
005f0852      int32_t edi_1 = *(uint32_t*)((char*)esi_1 + 0x68);
005f0862      int32_t edx_3;
005f0862      
005f0862      if ((edi_1 == (ecx >> 1) || (edi_1 == 1 && ecx == edi_1)))
005f0867          edx_3 = *(uint32_t*)((char*)esi_1 + 0x6c);
005f0867      
005f0878      int32_t result;
005f0878      
005f0878      if ((((edi_1 == (ecx >> 1) || (edi_1 == 1 && ecx == edi_1)) && (edx_3 == (*(uint32_t*)((char*)eax + 0x6c) >> 1) || (edx_3 == 1 && *(uint32_t*)((char*)eax + 0x6c) == edx_3))) && *(uint32_t*)((char*)esi_1 + 0x70) == (*(uint32_t*)((char*)eax + 0x70) >> 1)))
005f0878      {
005f0896          if ((ecx > 1 && (ecx & 1) != 0))
005f0896          {
005f0898              *(uint32_t*)((char*)eax + 0x68) &= 0xfffffffe;
005f089c              void* eax_1 = *(uint32_t*)this;
005f08a1              *(uint32_t*)((char*)eax_1 + 0x74) -= *(uint32_t*)((char*)eax_1 + 0x78);
005f0896          }
005f0896          
005f08a4          void* eax_2 = *(uint32_t*)this;
005f08a4          
005f08aa          if (*(uint32_t*)((char*)eax_2 + 0x6c) > 1)
005f08ac              *(uint32_t*)((char*)eax_2 + 0x6c) &= 0xfffffffe;
005f08ac          
005f08b0          void* eax_3 = *(uint32_t*)this;
005f08b0          
005f08b6          if (*(uint32_t*)((char*)eax_3 + 0x70) > 1)
005f08b8              *(uint32_t*)((char*)eax_3 + 0x70) &= 0xfffffffe;
005f08b8          
005f08bf          int32_t esi_2 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68);
005f08c8          void* eax_7 = operator new((esi_2 << 4));
005f08d8          void* var_14_1;
005f08d8          
005f08d8          if (eax_7 == 0)
005f08ec              var_14_1 = nullptr;
005f08d8          else
005f08d8          {
005f08df              `vector constructor iterator'(eax_7, 0x10, esi_2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f08e7              var_14_1 = eax_7;
005f08d8          }
005f08d8          
005f08f4          if (var_14_1 != 0)
005f08f4          {
005f0900              void* eax_9 = *(uint32_t*)this;
005f0906              int32_t esi_3 = *(uint32_t*)((char*)eax_9 + 0x68);
005f0909              void* var_28_1;
005f0909              void* var_24_1;
005f0909              void* var_1c_1;
005f0909              void* var_8_1;
005f0909              void* eax_14;
005f0909              int32_t* ecx_5;
005f0909              void* edx_6;
005f0909              void* esi_7;
005f0909              
005f0909              if (*(uint32_t*)((char*)eax_9 + 0x6c) != 1)
005f0909              {
005f0952                  int32_t esi_8 = (esi_3 << 2);
005f095b                  void* eax_17 = operator new((esi_8 << 4));
005f095b                  
005f0966                  if (eax_17 == 0)
005f097a                      var_8_1 = nullptr;
005f0966                  else
005f0966                  {
005f096d                      `vector constructor iterator'(eax_17, 0x10, esi_8, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0975                      var_8_1 = eax_17;
005f0966                  }
005f0966                  
005f0980                  ecx_5 = (*(uint32_t*)this + 0x68);
005f0983                  int32_t edx_7 = *(uint32_t*)ecx_5;
005f098d                  var_28_1 = ((edx_7 << 4) + var_8_1);
005f0990                  esi_7 = var_28_1;
005f099b                  var_1c_1 = ((edx_7 << 5) + var_8_1);
005f09a7                  var_24_1 = ((edx_7 * 0x30) + var_8_1);
005f09aa                  eax_14 = var_1c_1;
005f09ad                  edx_6 = var_24_1;
005f0909              }
005f0909              else
005f0909              {
005f090b                  int32_t esi_4 = (esi_3 << 1);
005f0913                  void* eax_12 = operator new((esi_4 << 4));
005f0913                  
005f091e                  if (eax_12 == 0)
005f0932                      var_8_1 = nullptr;
005f091e                  else
005f091e                  {
005f0925                      `vector constructor iterator'(eax_12, 0x10, esi_4, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f092d                      var_8_1 = eax_12;
005f091e                  }
005f091e                  
005f0938                  eax_14 = var_8_1;
005f093b                  ecx_5 = (*(uint32_t*)this + 0x68);
005f0943                  esi_7 = ((*(uint32_t*)ecx_5 << 4) + eax_14);
005f0945                  edx_6 = esi_7;
005f0947                  var_28_1 = esi_7;
005f094a                  var_1c_1 = eax_14;
005f094d                  var_24_1 = edx_6;
005f0909              }
005f0909              
005f09b0              void* edi_4 = var_8_1;
005f09b5              int32_t result_1;
005f09b5              
005f09b5              if (edi_4 != 0)
005f09b5              {
005f09c4                  void* var_34_1;
005f09c4                  void* var_30_1;
005f09c4                  
005f09c4                  if (*(uint32_t*)ecx_5 != 1)
005f09c4                  {
005f09d1                      var_34_1 = ((char*)edi_4 + 0x10);
005f09d7                      eax_14 += 0x10;
005f09da                      var_30_1 = ((char*)esi_7 + 0x10);
005f09dd                      edx_6 += 0x10;
005f09c4                  }
005f09c4                  else
005f09c4                  {
005f09c6                      var_34_1 = edi_4;
005f09c9                      var_30_1 = esi_7;
005f09c4                  }
005f09c4                  
005f09e0                  int32_t i = 0;
005f09e7                  void* eax_28 = *(uint32_t*)((char*)this + 4);
005f09e7                  
005f09f1                  if (*(uint32_t*)((char*)eax_28 + 0x70) > 0)
005f09f1                  {
005f0c0e                      do
005f0c0e                      {
005f09f7                          int32_t j = 0;
005f09f7                          
005f09ff                          if (*(uint32_t*)((char*)eax_28 + 0x6c) > 0)
005f09ff                          {
005f0bfc                              do
005f0bfc                              {
005f0a12                                  int32_t edi_6 = (i * 2);
005f0a18                                  *(uint32_t*)(**(uint32_t**)this + 4)((j * 2), edi_6, var_8_1);
005f0a18                                  
005f0a1e                                  if (esi_7 != var_8_1)
005f0a2f                                      *(uint32_t*)(**(uint32_t**)this + 4)((j * 2), (edi_6 + 1), esi_7);
005f0a2f                                  
005f0a38                                  if (var_1c_1 != var_8_1)
005f0a47                                      *(uint32_t*)(**(uint32_t**)this + 4)(((j * 2) + 1), edi_6, var_1c_1);
005f0a47                                  
005f0a54                                  if ((var_24_1 != esi_7 && var_24_1 != var_1c_1))
005f0a64                                      *(uint32_t*)(**(uint32_t**)this + 4)(((j * 2) + 1), (edi_6 + 1), var_24_1);
005f0a64                                  
005f0a6a                                  int32_t k = 0;
005f0a6a                                  
005f0a72                                  if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) > 0)
005f0a72                                  {
005f0a81                                      void* var_2c_1 = var_14_1;
005f0a81                                      
005f0bd7                                      do
005f0bd7                                      {
005f0a8f                                          int32_t eax_46 = (k * 0x20);
005f0a92                                          void* ecx_15 = ((char*)var_34_1 + eax_46);
005f0a96                                          void* edx_13 = ((char*)var_8_1 + eax_46);
005f0a98                                          long double x87_r6_2 = (((long double)*(uint32_t*)ecx_15) + ((long double)*(uint32_t*)edx_13));
005f0aac                                          void* ecx_16 = (eax_46 + esi_7);
005f0abf                                          ((((long double)*(uint32_t*)((char*)ecx_15 + 4)) + ((long double)*(uint32_t*)((char*)edx_13 + 4))) + ((long double)*(uint32_t*)((char*)ecx_16 + 4)));
005f0ad3                                          float* ecx_18 = ((char*)var_30_1 + eax_46);
005f0aee                                          ((((long double)((float)(((long double)*(uint32_t*)((char*)ecx_15 + 8)) + ((long double)*(uint32_t*)((char*)edx_13 + 8))))) + ((long double)*(uint32_t*)((char*)ecx_16 + 8))) + ((long double)ecx_18[2]));
005f0b02                                          float* ecx_20 = ((char*)var_1c_1 + eax_46);
005f0b1a                                          ((((long double)((float)(((long double)((float)(((long double)*(uint32_t*)((char*)ecx_15 + 0xc)) + ((long double)*(uint32_t*)((char*)edx_13 + 0xc))))) + ((long double)*(uint32_t*)((char*)ecx_16 + 0xc))))) + ((long double)ecx_18[3])) + ((long double)ecx_20[3]));
005f0b20                                          float* ecx_22 = ((char*)eax_14 + eax_46);
005f0b43                                          void* ecx_24 = ((char*)var_24_1 + eax_46);
005f0b48                                          ((((long double)((float)(((long double)((float)(((long double)((float)(x87_r6_2 + ((long double)*(uint32_t*)ecx_16)))) + ((long double)*(uint32_t*)ecx_18)))) + ((long double)*(uint32_t*)ecx_20)))) + ((long double)*(uint32_t*)ecx_22)) + ((long double)*(uint32_t*)ecx_24));
005f0b67                                          float* eax_47 = (eax_46 + edx_6);
005f0b73                                          void* edi_8 = var_2c_1;
005f0b76                                          k += 1;
005f0b82                                          var_2c_1 += 0x10;
005f0b89                                          long double x87_r5_15 = ((((long double)((float)(((long double)((float)(((long double)((float)(x87_r6_2 + ((long double)ecx_18[1])))) + ((long double)ecx_20[1])))) + ((long double)ecx_22[1])))) + ((long double)*(uint32_t*)((char*)ecx_24 + 4))) + ((long double)eax_47[1]));
005f0b94                                          long double x87_r5_17 = (((long double)((float)(((long double)((float)(((long double)((float)(x87_r6_2 + ((long double)ecx_20[2])))) + ((long double)ecx_22[2])))) + ((long double)*(uint32_t*)((char*)ecx_24 + 8))))) + ((long double)eax_47[2]));
005f0ba0                                          float var_ac_1 = ((float)(((long double)((float)(((long double)((float)(x87_r6_2 + ((long double)ecx_22[3])))) + ((long double)*(uint32_t*)((char*)ecx_24 + 0xc))))) + ((long double)eax_47[3])));
005f0bae                                          float var_68_1 = ((float)(((long double)((float)(x87_r6_2 + ((long double)*(uint32_t*)eax_47)))) * x87_r5_15));
005f0bb5                                          float var_64 = ((float)(x87_r6_2 * x87_r5_15));
005f0bba                                          float var_60_1 = ((float)(x87_r5_17 * x87_r5_15));
005f0bc7                                          float var_5c_1 = ((float)(((long double)var_ac_1) * x87_r6_2));
005f0bca                                          *(uint32_t*)edi_8 = var_68_1;
005f0bca                                          void* edi_9 = ((char*)edi_8 + 4);
005f0bca                                          float* esi_9 = &var_64;
005f0bcb                                          *(uint32_t*)edi_9 = *(uint32_t*)esi_9;
005f0bcb                                          void* edi_10 = ((char*)edi_9 + 4);
005f0bcb                                          void* esi_10 = &esi_9[1];
005f0bcc                                          *(uint32_t*)edi_10 = *(uint32_t*)esi_10;
005f0bcd                                          *(uint32_t*)((char*)edi_10 + 4) = *(uint32_t*)((char*)esi_10 + 4);
005f0bd4                                          esi_7 = var_28_1;
005f0bd7                                      } while (k < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f0a72                                  }
005f0a72                                  
005f0bed                                  *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(j, i, var_14_1);
005f0bf0                                  j += 1;
005f0bfc                              } while (j < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c));
005f09ff                          }
005f09ff                          
005f0c02                          i += 1;
005f0c05                          eax_28 = *(uint32_t*)((char*)this + 4);
005f0c0e                      } while (i < *(uint32_t*)((char*)eax_28 + 0x70));
005f0c0e                      
005f0c14                      edi_4 = var_8_1;
005f09f1                  }
005f09f1                  
005f0c18                  operator delete(edi_4);
005f0c1e                  result_1 = 0;
005f09b5              }
005f09b5              else
005f09b7                  result_1 = 0x8007000e;
005f09b7              
005f0c23              operator delete(var_14_1);
005f0c29              result = result_1;
005f08f4          }
005f08f4          else
005f08f6              result = 0x8007000e;
005f0878      }
005f0878      else
005f0884          result = 0x80004005;
005f0884      
005f0c2f      return result;
005f0828  }


005f0c30  void __stdcall sub_5f0c30(int32_t arg1 @ esi, int32_t arg2 @ edi, int16_t arg3 @ x87control, int32_t arg4)

005f0c30  {
005f0c44      void* ecx = operator new((arg2 << 4));
005f0c44      
005f0c48      if (ecx != 0)
005f0c48      {
005f0c53          long double x87_r7_1 = ((long double)arg1);
005f0c56          void* var_20_1 = ecx;
005f0c56          
005f0c59          if (arg1 < 0)
005f0c5b              x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
005f0c5b          
005f0c66          long double x87_r6_1 = ((long double)arg2);
005f0c66          
005f0c69          if (arg2 < 0)
005f0c6b              x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005f0c6b          
005f0c76          int16_t x87status_1;
005f0c76          int16_t temp0_1;
005f0c76          temp0_1 = __fnstcw_memmem16(arg3);
005f0c84          int16_t x87control;
005f0c84          int16_t x87status_2;
005f0c84          x87control = __fldcw_memmem16((temp0_1 | 0xc00));
005f0c8a          int16_t var_8_1;
005f0c8a          var_8_1 = 0;
005f0c8a          
005f0c93          if (arg2 > 0)
005f0c93          {
005f0d0f              do
005f0d0f              {
005f0c99                  long double x87_r7_3 = ((long double)var_8_1);
005f0c99                  
005f0c9e                  if (var_8_1 < 0)
005f0ca0                      x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
005f0ca0                  
005f0cb5                  float var_c_2 = ((float)(((x87_r7_3 + ((long double)0.5f)) * ((long double)((float)(x87_r7_1 / x87_r6_1)))) + ((long double)0.5f)));
005f0cbe                  int32_t eax_7 = ((int32_t)((long double)var_c_2));
005f0cc7                  int32_t edx_1 = (eax_7 - 1);
005f0cd2                  long double x87_r7_10 = ((((long double)eax_7) + ((long double)1f)) - ((long double)var_c_2));
005f0cd2                  
005f0cd5                  if (edx_1 < 0)
005f0cd5                  {
005f0cda                      int32_t edx_3 = -(arg4);
005f0ce1                      edx_1 = ((edx_3 - edx_3) & (arg1 - 1));
005f0cd5                  }
005f0cd5                  
005f0ce5                  if (eax_7 >= arg1)
005f0ce5                  {
005f0cea                      int32_t eax_9 = -(arg4);
005f0cf3                      eax_7 = (!((eax_9 - eax_9)) & (arg1 - 1));
005f0ce5                  }
005f0ce5                  
005f0cf5                  *(uint32_t*)((char*)ecx + 4) = ((float)x87_r7_10);
005f0cf8                  *(uint32_t*)ecx = edx_1;
005f0cfc                  *(uint32_t*)((char*)ecx + 8) = eax_7;
005f0d01                  ecx += 0x10;
005f0d04                  var_8_1 += 1;
005f0d0a                  *(uint32_t*)((char*)ecx - 4) = ((float)(((long double)1) - x87_r7_10));
005f0d0f              } while (var_8_1 < arg2);
005f0c93          }
005f0c93          
005f0d12          int16_t x87control_1;
005f0d12          int16_t x87status_3;
005f0d12          x87control_1 = __fldcw_memmem16(temp0_1);
005f0c48      }
005f0c30  }


005f0d1c  long __thiscall D3DXTex::CBlt::BltLinear2D(D3DXTex::CBlt* this)

005f0d1c  {
005f0d27      void* var_c = nullptr;
005f0d2b      void* var_14 = nullptr;
005f0d32      int32_t eax = *(uint32_t*)((char*)this + 8);
005f0d32      
005f0d37      if (eax != 3)
005f0d39          return 0x80004005;
005f0d39      
005f0d44      void* esi_1 = *(uint32_t*)((char*)this + 4);
005f0d47      int32_t edi;
005f0d47      int32_t var_d0_1 = edi;
005f0d4e      void* edx_1;
005f0d4e      
005f0d4e      if (*(uint32_t*)((char*)esi_1 + 0x70) == 1)
005f0d54          edx_1 = *(uint32_t*)this;
005f0d54      
005f0d59      int32_t result;
005f0d59      
005f0d59      if ((*(uint32_t*)((char*)esi_1 + 0x70) != 1 || *(uint32_t*)((char*)edx_1 + 0x70) != 1))
005f10b4          result = 0x80004005;
005f0d59      else
005f0d59      {
005f0d79          void* eax_4;
005f0d79          int16_t x87control;
005f0d79          int16_t x87control_1;
005f0d79          int80_t st0_1;
005f0d79          st0_1 = sub_5f0c30(*(uint32_t*)((char*)edx_1 + 0x68), *(uint32_t*)((char*)esi_1 + 0x68), x87control, (!((eax >> 0x10)) & 1));
005f0d8f          void* eax_6;
005f0d8f          int80_t st0_2;
005f0d8f          st0_2 = sub_5f0c30(*(uint32_t*)(*(uint32_t*)this + 0x6c), *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c), x87control_1, (!((eax >> 0x11)) & 1));
005f0da3          int32_t result_1;
005f0da3          
005f0da3          if ((eax_4 == 0 || eax_6 == 0))
005f1088              result_1 = 0x8007000e;
005f0da3          else
005f0da3          {
005f0dac              int32_t edi_3 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68);
005f0db5              void* eax_10 = operator new((edi_3 << 4));
005f0db5              
005f0dc5              if (eax_10 == 0)
005f0dd9                  var_c = nullptr;
005f0dc5              else
005f0dc5              {
005f0dcc                  `vector constructor iterator'(eax_10, 0x10, edi_3, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0dd4                  var_c = eax_10;
005f0dc5              }
005f0dc5              
005f0de1              if (var_c == 0)
005f1088                  result_1 = 0x8007000e;
005f0de1              else
005f0de1              {
005f0dec                  int32_t edi_5 = (*(uint32_t*)(*(uint32_t*)this + 0x68) << 1);
005f0df4                  void* eax_15 = operator new((edi_5 << 4));
005f0df4                  
005f0dff                  if (eax_15 == 0)
005f0e13                      var_14 = nullptr;
005f0dff                  else
005f0dff                  {
005f0e06                      `vector constructor iterator'(eax_15, 0x10, edi_5, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f0e0e                      var_14 = eax_15;
005f0dff                  }
005f0dff                  
005f0e1c                  if (var_14 == 0)
005f1088                      result_1 = 0x8007000e;
005f0e1c                  else
005f0e1c                  {
005f0e27                      int32_t i = 0;
005f0e2b                      int32_t var_30_1 = 0xffffffff;
005f0e2f                      int32_t var_1c_1 = 0xffffffff;
005f0e36                      void* edi_8 = ((*(uint32_t*)(*(uint32_t*)this + 0x68) << 4) + var_14);
005f0e38                      void* var_24_1 = var_14;
005f0e42                      void* var_10_1 = edi_8;
005f0e42                      
005f0e45                      if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c) > 0)
005f0e45                      {
005f0e4e                          int32_t* esi_5 = ((char*)eax_6 + 8);
005f0e51                          int32_t* var_8_3 = esi_5;
005f0e51                          
005f107e                          do
005f107e                          {
005f0e54                              int32_t eax_19 = esi_5[-2];
005f0e57                              int32_t j = 0;
005f0e57                              
005f0e5e                              if (eax_19 != var_30_1)
005f0e5e                              {
005f0e60                                  int32_t ecx_8 = var_1c_1;
005f0e60                                  
005f0e65                                  if (eax_19 == ecx_8)
005f0e65                                  {
005f0e79                                      void* eax_20 = var_24_1;
005f0e7c                                      var_1c_1 = 0xffffffff;
005f0e80                                      var_24_1 = edi_8;
005f0e83                                      var_30_1 = ecx_8;
005f0e86                                      var_10_1 = eax_20;
005f0e89                                      edi_8 = eax_20;
005f0e65                                  }
005f0e65                                  else
005f0e65                                  {
005f0e71                                      var_30_1 = eax_19;
005f0e74                                      *(uint32_t*)(**(uint32_t**)this + 4)(eax_19, 0, var_24_1);
005f0e65                                  }
005f0e5e                              }
005f0e5e                              
005f0e8b                              int32_t eax_21 = *(uint32_t*)esi_5;
005f0e8b                              
005f0e90                              if (eax_21 != var_1c_1)
005f0e90                              {
005f0e9a                                  var_1c_1 = eax_21;
005f0e9d                                  *(uint32_t*)(**(uint32_t**)this + 4)(eax_21, 0, edi_8);
005f0e90                              }
005f0e90                              
005f0ea7                              if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) > 0)
005f0ea7                              {
005f0eb3                                  int32_t* eax_24 = ((char*)eax_4 + 8);
005f0eb6                                  void* var_2c_1 = var_c;
005f0eb6                                  
005f1053                                  do
005f1053                                  {
005f0ebb                                      long double x87_r7_1 = ((long double)eax_24[1]);
005f0ec0                                      int32_t ecx_13 = (*(uint32_t*)eax_24 << 4);
005f0ec3                                      void* esi_6 = (ecx_13 + edi_8);
005f0edb                                      *(uint32_t*)((char*)esi_6 + 0xc);
005f0ee1                                      long double x87_r6_7 = ((long double)eax_24[-1]);
005f0ee4                                      int32_t esi_8 = (eax_24[-2] << 4);
005f0ee9                                      void* edx_4 = (esi_8 + edi_8);
005f0ef3                                      void* ecx_14 = (ecx_13 + var_24_1);
005f0ef8                                      void* esi_9 = (esi_8 + var_24_1);
005f0f3f                                      long double x87_r6_12 = ((long double)var_8_3[1]);
005f0f5d                                      float var_9c_1 = ((float)(((long double)((float)(((long double)((float)(x87_r6_7 * ((long double)*(uint32_t*)((char*)edx_4 + 8))))) + ((long double)((float)(x87_r7_1 * ((long double)*(uint32_t*)((char*)esi_6 + 8)))))))) * x87_r6_12));
005f0f0d                                      *(uint32_t*)((char*)edx_4 + 0xc);
005f0f6b                                      long double x87_r6_13 = ((long double)eax_24[1]);
005f0f8e                                      *(uint32_t*)((char*)ecx_14 + 0xc);
005f0f91                                      long double x87_r5_18 = ((long double)eax_24[-1]);
005f0fb9                                      void* edi_10 = var_2c_1;
005f0fbc                                      var_2c_1 += 0x10;
005f0fcb                                      eax_24 = &eax_24[4];
005f0fd4                                      j += 1;
005f0fe9                                      long double x87_r5_23 = ((long double)var_8_3[-1]);
005f1004                                      float var_7c_1 = ((float)(((long double)((float)(((long double)((float)(x87_r5_18 * ((long double)*(uint32_t*)((char*)esi_9 + 8))))) + ((long double)((float)(x87_r6_13 * ((long double)*(uint32_t*)((char*)ecx_14 + 8)))))))) * x87_r5_23));
005f1009                                      long double x87_r4_17 = ((x87_r5_18 + ((long double)((float)(x87_r5_18 * ((long double)*(uint32_t*)((char*)esi_9 + 0xc)))))) * x87_r5_23);
005f1012                                      long double x87_r5_25 = (((long double)((float)(((long double)((float)((x87_r5_18 * ((long double)*(uint32_t*)esi_9)) + ((long double)((float)(x87_r6_13 * ((long double)*(uint32_t*)ecx_14))))))) * x87_r5_23))) + ((long double)((float)(((long double)((float)((x87_r6_7 * ((long double)*(uint32_t*)edx_4)) + ((long double)((float)(x87_r7_1 * ((long double)*(uint32_t*)esi_6))))))) * x87_r6_12))));
005f1021                                      long double x87_r5_27 = (((long double)((float)(((long double)((float)(((long double)((float)(x87_r5_18 * ((long double)*(uint32_t*)((char*)esi_9 + 4))))) + ((long double)((float)(x87_r6_13 * ((long double)*(uint32_t*)((char*)ecx_14 + 4)))))))) * x87_r5_23))) + ((long double)((float)(((long double)((float)(((long double)((float)(x87_r6_7 * ((long double)*(uint32_t*)((char*)edx_4 + 4))))) + ((long double)((float)(x87_r7_1 * ((long double)*(uint32_t*)((char*)esi_6 + 4)))))))) * x87_r6_12))));
005f1027                                      float var_c0 = ((float)x87_r5_27);
005f1036                                      float var_bc_1 = ((float)(((long double)var_7c_1) + ((long double)var_9c_1)));
005f103e                                      float var_b8_1 = ((float)(x87_r5_23 + x87_r4_17));
005f1044                                      *(uint32_t*)edi_10 = ((float)x87_r5_25);
005f1044                                      void* edi_11 = ((char*)edi_10 + 4);
005f1044                                      float* esi_10 = &var_c0;
005f1045                                      *(uint32_t*)edi_11 = *(uint32_t*)esi_10;
005f1045                                      void* edi_12 = ((char*)edi_11 + 4);
005f1045                                      void* esi_11 = &esi_10[1];
005f1048                                      *(uint32_t*)edi_12 = *(uint32_t*)esi_11;
005f1049                                      *(uint32_t*)((char*)edi_12 + 4) = *(uint32_t*)((char*)esi_11 + 4);
005f1050                                      edi_8 = var_10_1;
005f1053                                  } while (j < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f1053                                  
005f1059                                  esi_5 = var_8_3;
005f0ea7                              }
005f0ea7                              
005f1069                              *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(i, 0, var_c);
005f106f                              esi_5 = &esi_5[4];
005f1072                              i += 1;
005f107b                              var_8_3 = esi_5;
005f107e                          } while (i < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c));
005f0e45                      }
005f0e45                      
005f1084                      result_1 = 0;
005f0e1c                  }
005f0de1              }
005f0da3          }
005f0da3          
005f1090          operator delete(eax_4);
005f1098          operator delete(eax_6);
005f10a0          operator delete(var_c);
005f10a8          operator delete(var_14);
005f10b0          result = result_1;
005f0d59      }
005f0d59      
005f10bd      return result;
005f0d1c  }


005f10be  long __thiscall D3DXTex::CBlt::BltLinear3D(D3DXTex::CBlt* this)

005f10be  {
005f10c9      void* var_10 = nullptr;
005f10cd      void* var_28 = nullptr;
005f10d4      int32_t eax = *(uint32_t*)((char*)this + 8);
005f10d4      
005f10d9      if (eax != 3)
005f10db          return 0x80004005;
005f10db      
005f10f4      int32_t edi;
005f10f4      int32_t var_1a4_1 = edi;
005f1115      void* eax_6;
005f1115      int16_t x87control;
005f1115      int16_t x87control_1;
005f1115      int80_t st0_1;
005f1115      st0_1 = sub_5f0c30(*(uint32_t*)(*(uint32_t*)this + 0x68), *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68), x87control, (!((eax >> 0x10)) & 1));
005f112b      void* eax_8;
005f112b      int16_t x87control_2;
005f112b      int80_t st0_2;
005f112b      st0_2 = sub_5f0c30(*(uint32_t*)(*(uint32_t*)this + 0x6c), *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c), x87control_1, (!((eax >> 0x11)) & 1));
005f1141      void* eax_10;
005f1141      int80_t st0_3;
005f1141      st0_3 = sub_5f0c30(*(uint32_t*)(*(uint32_t*)this + 0x70), *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x70), x87control_2, (!((eax >> 0x12)) & 1));
005f115f      int32_t result;
005f115f      
005f115f      if (((eax_6 == 0 || eax_8 == 0) || eax_10 == 0))
005f1749          result = 0x8007000e;
005f115f      else
005f115f      {
005f1168          int32_t esi_4 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68);
005f1171          void* eax_14 = operator new((esi_4 << 4));
005f1171          
005f1181          if (eax_14 == 0)
005f1195              var_10 = nullptr;
005f1181          else
005f1181          {
005f1188              `vector constructor iterator'(eax_14, 0x10, esi_4, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f1190              var_10 = eax_14;
005f1181          }
005f1181          
005f119d          if (var_10 == 0)
005f1749              result = 0x8007000e;
005f119d          else
005f119d          {
005f11a8              int32_t esi_6 = (*(uint32_t*)(*(uint32_t*)this + 0x68) << 2);
005f11b1              void* eax_19 = operator new((esi_6 << 4));
005f11b1              
005f11bc              if (eax_19 == 0)
005f11d0                  var_28 = nullptr;
005f11bc              else
005f11bc              {
005f11c3                  `vector constructor iterator'(eax_19, 0x10, esi_6, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f11cb                  var_28 = eax_19;
005f11bc              }
005f11bc              
005f11d9              if (var_28 == 0)
005f1749                  result = 0x8007000e;
005f11d9              else
005f11d9              {
005f11e1                  int32_t eax_22 = *(uint32_t*)(*(uint32_t*)this + 0x68);
005f11e4                  int32_t i = 0;
005f11ef                  void* var_18_1 = ((eax_22 << 4) + var_28);
005f11f7                  void* eax_23 = *(uint32_t*)((char*)this + 4);
005f1202                  void* esi_9 = ((eax_22 * 0x30) + var_28);
005f1208                  void* var_38_1 = var_28;
005f120b                  void* var_2c_1 = ((eax_22 << 5) + var_28);
005f120e                  void* var_30_1 = esi_9;
005f120e                  
005f1211                  if (*(uint32_t*)((char*)eax_23 + 0x70) > 0)
005f1211                  {
005f121d                      int32_t* var_c_1 = ((char*)eax_10 + 8);
005f121d                      
005f173f                      do
005f173f                      {
005f1220                          int32_t j = 0;
005f1224                          int32_t var_1c_1 = 0xffffffff;
005f1228                          int32_t var_14_1 = 0xffffffff;
005f1228                          
005f1230                          if (*(uint32_t*)((char*)eax_23 + 0x6c) > 0)
005f1230                          {
005f1239                              int32_t* edi_5 = ((char*)eax_8 + 8);
005f123c                              int32_t* var_8_4 = edi_5;
005f123c                              
005f1729                              do
005f1729                              {
005f123f                                  int32_t eax_24 = edi_5[-2];
005f1242                                  int32_t k = 0;
005f1242                                  
005f1249                                  if (eax_24 != var_1c_1)
005f1249                                  {
005f124b                                      int32_t ecx_17 = var_14_1;
005f124b                                      
005f1250                                      if (eax_24 == ecx_17)
005f1250                                      {
005f127f                                          var_14_1 = 0xffffffff;
005f1283                                          var_1c_1 = ecx_17;
005f1286                                          void* ecx_20 = var_18_1;
005f1289                                          var_18_1 = var_38_1;
005f128c                                          void* eax_28 = var_2c_1;
005f128f                                          var_2c_1 = esi_9;
005f1292                                          var_38_1 = ecx_20;
005f1295                                          var_30_1 = eax_28;
005f1298                                          esi_9 = eax_28;
005f1250                                      }
005f1250                                      else
005f1250                                      {
005f125d                                          var_1c_1 = eax_24;
005f1265                                          *(uint32_t*)(**(uint32_t**)this + 4)(var_1c_1, var_c_1[-2], var_38_1);
005f1277                                          *(uint32_t*)(**(uint32_t**)this + 4)(var_1c_1, *(uint32_t*)var_c_1, var_2c_1);
005f1250                                      }
005f1249                                  }
005f1249                                  
005f129a                                  int32_t eax_29 = *(uint32_t*)edi_5;
005f129a                                  
005f129f                                  if (eax_29 != var_14_1)
005f129f                                  {
005f12ac                                      var_14_1 = eax_29;
005f12b4                                      *(uint32_t*)(**(uint32_t**)this + 4)(var_14_1, var_c_1[-2], var_18_1);
005f12c4                                      *(uint32_t*)(**(uint32_t**)this + 4)(var_14_1, *(uint32_t*)var_c_1, esi_9);
005f129f                                  }
005f129f                                  
005f12ce                                  if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) > 0)
005f12ce                                  {
005f12da                                      int32_t* eax_34 = ((char*)eax_6 + 8);
005f12dd                                      void* var_3c_1 = var_10;
005f12dd                                      
005f16fd                                      do
005f16fd                                      {
005f12e2                                          long double x87_r7_1 = ((long double)eax_34[1]);
005f12ea                                          int32_t esi_11 = (*(uint32_t*)eax_34 << 4);
005f12ed                                          float* ecx_24 = (esi_11 + var_30_1);
005f130e                                          ecx_24[3];
005f1314                                          long double x87_r6_7 = ((long double)eax_34[-1]);
005f1317                                          int32_t ecx_26 = (eax_34[-2] << 4);
005f131c                                          float* edx_11 = ((char*)var_30_1 + ecx_26);
005f1338                                          void* esi_12 = (esi_11 + var_2c_1);
005f133a                                          void* edx_13 = ((char*)var_2c_1 + ecx_26);
005f1368                                          long double x87_r6_12 = ((long double)edi_5[1]);
005f1332                                          edx_11[3];
005f1397                                          long double x87_r6_13 = ((long double)eax_34[1]);
005f13ba                                          *(uint32_t*)((char*)esi_12 + 0xc);
005f13bd                                          long double x87_r5_18 = ((long double)eax_34[-1]);
005f1423                                          long double x87_r5_23 = ((long double)edi_5[-1]);
005f145e                                          long double x87_r5_25 = (((long double)((float)(((long double)((float)((x87_r5_18 * ((long double)*(uint32_t*)edx_13)) + ((long double)((float)(x87_r6_13 * ((long double)*(uint32_t*)esi_12))))))) * x87_r5_23))) + ((long double)((float)(((long double)((float)((x87_r6_7 * ((long double)*(uint32_t*)edx_11)) + ((long double)((float)(x87_r7_1 * ((long double)*(uint32_t*)ecx_24))))))) * x87_r6_12))));
005f1470                                          long double x87_r5_27 = (((long double)((float)(((long double)((float)(((long double)((float)(x87_r5_18 * ((long double)*(uint32_t*)((char*)edx_13 + 4))))) + ((long double)((float)(x87_r6_13 * ((long double)*(uint32_t*)((char*)esi_12 + 4)))))))) * x87_r5_23))) + ((long double)((float)(((long double)((float)(((long double)((float)(x87_r6_7 * ((long double)edx_11[1])))) + ((long double)((float)(x87_r7_1 * ((long double)ecx_24[1]))))))) * x87_r6_12))));
005f1482                                          long double x87_r5_29 = (((long double)((float)(((long double)((float)(((long double)((float)(x87_r5_18 * ((long double)*(uint32_t*)((char*)edx_13 + 8))))) + ((long double)((float)(x87_r6_13 * ((long double)*(uint32_t*)((char*)esi_12 + 8)))))))) * x87_r5_23))) + ((long double)((float)(((long double)((float)(((long double)((float)(x87_r6_7 * ((long double)edx_11[2])))) + ((long double)((float)(x87_r7_1 * ((long double)ecx_24[2]))))))) * x87_r6_12))));
005f1490                                          long double x87_r6_18 = ((long double)var_c_1[1]);
005f149b                                          int32_t edx_16 = (*(uint32_t*)eax_34 << 4);
005f14a0                                          void* esi_14 = ((char*)var_18_1 + edx_16);
005f14be                                          float var_170_1 = ((float)(((long double)((float)x87_r5_29)) * x87_r6_18));
005f13dc                                          *(uint32_t*)((char*)edx_13 + 0xc);
005f14cc                                          long double x87_r6_19 = ((long double)eax_34[1]);
005f14ef                                          *(uint32_t*)((char*)esi_14 + 0xc);
005f14f5                                          long double x87_r5_44 = ((long double)eax_34[-1]);
005f14f8                                          void* esi_16 = ((char*)var_18_1 + ecx_26);
005f152d                                          void* edx_17 = (edx_16 + var_38_1);
005f152f                                          void* ecx_27 = (ecx_26 + var_38_1);
005f1543                                          long double x87_r5_49 = ((long double)edi_5[1]);
005f1510                                          *(uint32_t*)((char*)esi_16 + 0xc);
005f156f                                          long double x87_r5_50 = ((long double)eax_34[1]);
005f1592                                          *(uint32_t*)((char*)edx_17 + 0xc);
005f1595                                          long double x87_r4_35 = ((long double)eax_34[-1]);
005f15f8                                          long double x87_r4_40 = ((long double)edi_5[-1]);
005f1633                                          long double x87_r4_42 = (((long double)((float)(((long double)((float)((x87_r4_35 * ((long double)*(uint32_t*)ecx_27)) + ((long double)((float)(x87_r5_50 * ((long double)*(uint32_t*)edx_17))))))) * x87_r4_40))) + ((long double)((float)(((long double)((float)((x87_r5_44 * ((long double)*(uint32_t*)esi_16)) + ((long double)((float)(x87_r6_19 * ((long double)*(uint32_t*)esi_14))))))) * x87_r5_49))));
005f1645                                          long double x87_r4_44 = (((long double)((float)(((long double)((float)(((long double)((float)(x87_r4_35 * ((long double)*(uint32_t*)((char*)ecx_27 + 4))))) + ((long double)((float)(x87_r5_50 * ((long double)*(uint32_t*)((char*)edx_17 + 4)))))))) * x87_r4_40))) + ((long double)((float)(((long double)((float)(((long double)((float)(x87_r5_44 * ((long double)*(uint32_t*)((char*)esi_16 + 4))))) + ((long double)((float)(x87_r6_19 * ((long double)*(uint32_t*)((char*)esi_14 + 4)))))))) * x87_r5_49))));
005f1657                                          long double x87_r4_46 = (((long double)((float)(((long double)((float)(((long double)((float)(x87_r4_35 * ((long double)*(uint32_t*)((char*)ecx_27 + 8))))) + ((long double)((float)(x87_r5_50 * ((long double)*(uint32_t*)((char*)edx_17 + 8)))))))) * x87_r4_40))) + ((long double)((float)(((long double)((float)(((long double)((float)(x87_r5_44 * ((long double)*(uint32_t*)((char*)esi_16 + 8))))) + ((long double)((float)(x87_r6_19 * ((long double)*(uint32_t*)((char*)esi_14 + 8)))))))) * x87_r5_49))));
005f1665                                          long double x87_r5_55 = ((long double)var_c_1[-1]);
005f1668                                          void* edi_6 = var_3c_1;
005f1671                                          var_3c_1 += 0x10;
005f167d                                          eax_34 = &eax_34[4];
005f1680                                          k += 1;
005f16a2                                          float var_150_1 = ((float)(((long double)((float)x87_r4_46)) * x87_r5_55));
005f16aa                                          long double x87_r4_54 = ((((x87_r4_35 + ((long double)((float)(x87_r4_35 * ((long double)*(uint32_t*)((char*)ecx_27 + 0xc)))))) * x87_r4_40) + x87_r4_40) * x87_r5_55);
005f16ce                                          float var_194 = ((float)(((long double)((float)(((long double)((float)x87_r4_44)) * x87_r5_55))) + ((long double)((float)(((long double)((float)x87_r5_27)) * x87_r6_18)))));
005f16e0                                          float var_190_1 = ((float)(((long double)var_150_1) + ((long double)var_170_1)));
005f16e8                                          float var_18c_1 = ((float)(x87_r5_55 + x87_r4_54));
005f16ee                                          *(uint32_t*)edi_6 = ((float)(((long double)((float)(((long double)((float)x87_r4_42)) * x87_r5_55))) + ((long double)((float)(((long double)((float)x87_r5_25)) * x87_r6_18)))));
005f16ee                                          void* edi_7 = ((char*)edi_6 + 4);
005f16ee                                          float* esi_18 = &var_194;
005f16ef                                          *(uint32_t*)edi_7 = *(uint32_t*)esi_18;
005f16ef                                          void* edi_8 = ((char*)edi_7 + 4);
005f16ef                                          void* esi_19 = &esi_18[1];
005f16f2                                          *(uint32_t*)edi_8 = *(uint32_t*)esi_19;
005f16f3                                          *(uint32_t*)((char*)edi_8 + 4) = *(uint32_t*)((char*)esi_19 + 4);
005f16fa                                          edi_5 = var_8_4;
005f16fd                                      } while (k < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f16fd                                      
005f1703                                      esi_9 = var_30_1;
005f12ce                                  }
005f12ce                                  
005f1714                                  *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(j, i, var_10);
005f171a                                  edi_5 = &edi_5[4];
005f171d                                  j += 1;
005f1726                                  var_8_4 = edi_5;
005f1729                              } while (j < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c));
005f1230                          }
005f1230                          
005f172f                          var_c_1 = &var_c_1[4];
005f1733                          i += 1;
005f1736                          eax_23 = *(uint32_t*)((char*)this + 4);
005f173f                      } while (i < *(uint32_t*)((char*)eax_23 + 0x70));
005f1211                  }
005f1211                  
005f1745                  result = 0;
005f11d9              }
005f119d          }
005f115f      }
005f115f      
005f1751      operator delete(eax_6);
005f1759      operator delete(eax_8);
005f1761      operator delete(eax_10);
005f1769      operator delete(var_10);
005f1771      operator delete(var_28);
005f177a      return result;
005f10be  }


005f1780  void* __thiscall D3DXTex::TF_Row::`vector deleting destructor'(D3DXTex::TF_Row* this, uint32_t arg2)

005f1780  {
005f178c      if ((arg2 & 2) == 0)
005f178c      {
005f17b5          operator delete(*(uint32_t*)this);
005f17b5          
005f17bf          if ((arg2 & 1) != 0)
005f17c2              operator delete(this);
005f17c2          
005f17c8          return this;
005f178c      }
005f178c      
005f178e      int32_t edi;
005f178e      int32_t var_c = edi;
005f179c      `vector destructor iterator'(this, 0xc, *(uint32_t*)((char*)this - 4), D3DXTex::TF_Row::~TF_Row);
005f179c      
005f17a5      if ((arg2 & 1) != 0)
005f17a8          operator delete(((char*)this - 4));
005f17a8      
005f17cc      return ((char*)this - 4);
005f1780  }


005f17cf  long __thiscall D3DXTex::CBlt::BltTriangle3D(D3DXTex::CBlt* this)

005f17cf  {
005f17db      int32_t eax = *(uint32_t*)((char*)this + 8);
005f17de      int32_t edi;
005f17de      int32_t var_58 = edi;
005f1809      void* var_20 = nullptr;
005f180c      void* var_1c = nullptr;
005f180f      void* var_c = nullptr;
005f1812      void* var_18 = nullptr;
005f1815      void* var_10 = nullptr;
005f181b      void* eax_6 = sub_5eec1f(*(uint32_t*)(*(uint32_t*)this + 0x68), *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68), (!((eax >> 0x10)) & 1));
005f1825      int32_t result;
005f1825      
005f1825      if (eax_6 == 0)
005f1e11          result = 0x80004005;
005f1825      else
005f1825      {
005f1837          void* eax_9 = sub_5eec1f(*(uint32_t*)(*(uint32_t*)this + 0x6c), *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c), (!((eax >> 0x11)) & 1));
005f183e          var_20 = eax_9;
005f183e          
005f1841          if (eax_9 == 0)
005f1e11              result = 0x80004005;
005f1841          else
005f1841          {
005f1855              void* eax_12 = sub_5eec1f(*(uint32_t*)(*(uint32_t*)this + 0x70), *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x70), (!((eax >> 0x12)) & 1));
005f185c              var_1c = eax_12;
005f185c              
005f185f              if (eax_12 == 0)
005f1e11                  result = 0x80004005;
005f185f              else
005f185f              {
005f186a                  void* eax_14 = (*(uint32_t*)eax_6 + eax_6);
005f1874                  void* eax_16 = (*(uint32_t*)var_20 + var_20);
005f187e                  void* ebx_2 = (*(uint32_t*)var_1c + var_1c);
005f1883                  int32_t edi_5 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x70);
005f1894                  void* eax_21 = operator new(((edi_5 * 0xc) + 4));
005f1894                  
005f189c                  if (eax_21 == 0)
005f18bc                      var_c = nullptr;
005f189c                  else
005f189c                  {
005f18a4                      *(uint32_t*)eax_21 = edi_5;
005f18af                      `vector constructor iterator'(((char*)eax_21 + 4), 0xc, edi_5, D3DXTex::TF_Row::TF_Row);
005f18b7                      var_c = ((char*)eax_21 + 4);
005f189c                  }
005f189c                  
005f18c4                  if (var_c == 0)
005f18c4                  {
005f1e0a                  label_5f1e0a:
005f1e0a                      result = 0x8007000e;
005f18c4                  }
005f18c4                  else
005f18c4                  {
005f18cc                      int32_t edi_6 = *(uint32_t*)(*(uint32_t*)this + 0x68);
005f18d5                      void* eax_27 = operator new((edi_6 << 4));
005f18d5                      
005f18e0                      if (eax_27 == 0)
005f18f8                          var_10 = nullptr;
005f18e0                      else
005f18e0                      {
005f18eb                          `vector constructor iterator'(eax_27, 0x10, edi_6, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f18f3                          var_10 = eax_27;
005f18e0                      }
005f18e0                      
005f1900                      if (var_10 == 0)
005f1900                      {
005f1e0a                      label_5f1e0a_1:
005f1e0a                          result = 0x8007000e;
005f1900                      }
005f1900                      else
005f1900                      {
005f1909                          void* ecx_9 = ((char*)var_1c + 4);
005f190e                          void* var_48_3 = ecx_9;
005f190e                          
005f1911                          if (ecx_9 < ebx_2)
005f1911                          {
005f1935                              void* edx_2;
005f1935                              
005f1935                              do
005f1935                              {
005f1915                                  edx_2 = (*(uint32_t*)ecx_9 + ecx_9);
005f1915                                  
005f192f                                  for (void* i = ((char*)ecx_9 + 4); i < edx_2; i += 8)
005f192f                                  {
005f191c                                      int32_t eax_29 = *(uint32_t*)i;
005f1928                                      *(uint32_t*)(((char*)var_c + (eax_29 * 0xc)) + 8) += 1;
005f192f                                  }
005f192f                                  
005f1933                                  ecx_9 = edx_2;
005f1935                              } while (edx_2 < ebx_2);
005f1911                          }
005f1911                          
005f1937                          void* eax_32 = var_48_3;
005f193a                          int32_t var_38_1 = 0;
005f193a                          
005f1940                          if (eax_32 < ebx_2)
005f1940                          {
005f1946                              long double x87_r7_1 = ((long double)-1f);
005f1946                              
005f1dfe                              do
005f1dfe                              {
005f194e                                  void* ecx_11 = (*(uint32_t*)eax_32 + eax_32);
005f195b                                  void* var_8_1 = ((char*)eax_32 + 4);
005f195b                                  
005f195e                                  if (((char*)eax_32 + 4) < ecx_11)
005f195e                                  {
005f19fa                                      do
005f19fa                                      {
005f196f                                          void* ebx_3 = ((char*)var_c + (*(uint32_t*)var_8_1 * 0xc));
005f196f                                          
005f1975                                          if (*(uint32_t*)ebx_3 == 0)
005f1975                                          {
005f197c                                              if (var_18 == 0)
005f197c                                              {
005f198d                                                  void* eax_39 = *(uint32_t*)((char*)this + 4);
005f1995                                                  int32_t edi_9 = (*(uint32_t*)((char*)eax_39 + 0x6c) * *(uint32_t*)((char*)eax_39 + 0x68));
005f199f                                                  void* eax_42 = operator new((edi_9 << 4));
005f19aa                                                  void* eax_43;
005f19aa                                                  
005f19aa                                                  if (eax_42 == 0)
005f19bf                                                      eax_43 = nullptr;
005f19aa                                                  else
005f19aa                                                  {
005f19b5                                                      `vector constructor iterator'(eax_42, 0x10, edi_9, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f19ba                                                      eax_43 = eax_42;
005f19aa                                                  }
005f19aa                                                  
005f19c3                                                  *(uint32_t*)ebx_3 = eax_43;
005f19c3                                                  
005f19c5                                                  if (eax_43 == 0)
005f19c5                                                      goto label_5f1e0a_1;
005f19c5                                                  
005f19cb                                                  x87_r7_1 = ((long double)-1f);
005f197c                                              }
005f197c                                              else
005f197c                                              {
005f1980                                                  *(uint32_t*)ebx_3 = *(uint32_t*)var_18;
005f1982                                                  *(uint32_t*)var_18 = 0;
005f1988                                                  var_18 = *(uint32_t*)((char*)var_18 + 4);
005f197c                                              }
005f197c                                              
005f19d1                                              void* eax_44 = *(uint32_t*)((char*)this + 4);
005f19dd                                              int32_t ecx_17 = ((*(uint32_t*)((char*)eax_44 + 0x6c) * *(uint32_t*)((char*)eax_44 + 0x68)) << 4);
005f19ee                                              __builtin_memset(__builtin_memset(*(uint32_t*)ebx_3, 0, ((ecx_17 >> 2) << 2)), 0, (ecx_17 & 3));
005f1975                                          }
005f1975                                          
005f19f0                                          var_8_1 += 8;
005f19fa                                      } while (var_8_1 < ecx_11);
005f195e                                  }
005f195e                                  
005f1a03                                  int32_t var_2c_1 = 0;
005f1a0d                                  void* var_34_2 = ((char*)var_20 + 4);
005f1a0d                                  
005f1a10                                  if (((char*)var_20 + 4) < eax_16)
005f1a10                                  {
005f1b1a                                      void* eax_49;
005f1b1a                                      
005f1b1a                                      do
005f1b1a                                      {
005f1a23                                          eax_49 = (*(uint32_t*)var_34_2 + var_34_2);
005f1a2f                                          *(uint32_t*)(**(uint32_t**)this + 4)(var_2c_1, var_38_1, var_10);
005f1a3b                                          void* var_28_1 = ((char*)eax_6 + 4);
005f1a3b                                          
005f1a3e                                          if (((char*)eax_6 + 4) < eax_14)
005f1a3e                                          {
005f1a47                                              void* edx_5 = ((char*)var_10 + 8);
005f1b08                                              void* eax_54;
005f1b08                                              
005f1b08                                              do
005f1b08                                              {
005f1a4a                                                  void** ecx_23 = var_28_1;
005f1a4f                                                  eax_54 = (*(uint32_t*)ecx_23 + ecx_23);
005f1a54                                                  void* i_1 = ((char*)eax_32 + 4);
005f1a57                                                  void* i_3 = i_1;
005f1a57                                                  
005f1af6                                                  for (; i_1 < ecx_11; i_1 = i_3)
005f1af6                                                  {
005f1ae6                                                      for (void* j = ((char*)var_34_2 + 4); j < eax_49; j += 8)
005f1ae6                                                      {
005f1a7e                                                          int32_t eax_61 = (((*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) * *(uint32_t*)j) << 4) + *(uint32_t*)((char*)var_c + (*(uint32_t*)i_3 * 0xc)));
005f1a84                                                          void* ecx_26 = ((char*)var_28_1 + 4);
005f1a84                                                          
005f1ade                                                          while (ecx_26 < eax_54)
005f1ade                                                          {
005f1a97                                                              float* edi_16 = ((*(uint32_t*)ecx_26 << 4) + eax_61);
005f1a99                                                              long double x87_r7_4 = ((((long double)*(uint32_t*)((char*)ecx_26 + 4)) * ((long double)*(uint32_t*)((char*)i_3 + 4))) * ((long double)*(uint32_t*)((char*)j + 4)));
005f1aa3                                                              *(uint32_t*)edi_16 = ((float)((x87_r7_4 * ((long double)*(uint32_t*)((char*)edx_5 - 8))) + ((long double)*(uint32_t*)edi_16)));
005f1aac                                                              float* edi_19 = (((*(uint32_t*)ecx_26 << 4) + eax_61) + 4);
005f1ab5                                                              *(uint32_t*)edi_19 = ((float)((x87_r7_4 * ((long double)*(uint32_t*)((char*)edx_5 - 4))) + ((long double)*(uint32_t*)edi_19)));
005f1abe                                                              float* edi_22 = (((*(uint32_t*)ecx_26 << 4) + eax_61) + 8);
005f1ac6                                                              *(uint32_t*)edi_22 = ((float)((x87_r7_4 * ((long double)*(uint32_t*)edx_5)) + ((long double)*(uint32_t*)edi_22)));
005f1ad0                                                              float* edi_25 = (((*(uint32_t*)ecx_26 << 4) + eax_61) + 0xc);
005f1ad4                                                              ecx_26 += 8;
005f1ad9                                                              *(uint32_t*)edi_25 = ((float)((x87_r7_4 * ((long double)*(uint32_t*)((char*)edx_5 + 4))) + ((long double)*(uint32_t*)edi_25)));
005f1ade                                                          }
005f1ae6                                                      }
005f1ae6                                                      
005f1aec                                                      i_3 += 8;
005f1af6                                                  }
005f1af6                                                  
005f1aff                                                  edx_5 += 0x10;
005f1b05                                                  var_28_1 = eax_54;
005f1b08                                              } while (eax_54 < eax_14);
005f1a3e                                          }
005f1a3e                                          
005f1b11                                          var_2c_1 += 1;
005f1b17                                          var_34_2 = eax_49;
005f1b1a                                      } while (eax_49 < eax_16);
005f1b20                                      x87_r7_1 = ((long double)-1f);
005f1a10                                  }
005f1a10                                  
005f1b26                                  void* i_2 = ((char*)eax_32 + 4);
005f1b26                                  
005f1df2                                  for (eax_32 = ecx_11; i_2 < eax_32; i_2 += 8)
005f1df2                                  {
005f1b39                                      void* edi_26 = ((char*)var_c + (*(uint32_t*)i_2 * 0xc));
005f1b3c                                      int32_t temp0_1 = *(uint32_t*)((char*)edi_26 + 8);
005f1b3c                                      *(uint32_t*)((char*)edi_26 + 8) -= 1;
005f1b3c                                      
005f1b3f                                      if (temp0_1 == 1)
005f1b3f                                      {
005f1b45                                          void* eax_64 = *(uint32_t*)((char*)this + 4);
005f1b48                                          int32_t j_1 = 0;
005f1b48                                          
005f1b50                                          if (*(uint32_t*)((char*)eax_64 + 0x6c) > 0)
005f1b50                                          {
005f1ddb                                              do
005f1ddb                                              {
005f1b56                                                  int32_t ecx_29 = *(uint32_t*)((char*)eax_64 + 0x68);
005f1b5b                                                  int32_t edx_8 = *(uint32_t*)(*(uint32_t*)this + 8);
005f1b67                                                  void* eax_68 = (((ecx_29 * j_1) << 4) + *(uint32_t*)edi_26);
005f1b67                                                  
005f1b6a                                                  if (edx_8 == 1)
005f1b6a                                                  {
005f1cfc                                                      int32_t k = 0;
005f1cfc                                                      
005f1d02                                                      if (ecx_29 > 0)
005f1d02                                                      {
005f1d08                                                          x87_r7_1 = ((long double)1f);
005f1d0e                                                          void* ecx_32 = ((char*)eax_68 + 8);
005f1d0e                                                          
005f1da7                                                          do
005f1da7                                                          {
005f1d11                                                              long double x87_r6_27 = ((long double)0);
005f1d13                                                              long double temp4_1 = ((long double)*(uint32_t*)((char*)ecx_32 - 8));
005f1d13                                                              (x87_r6_27 - temp4_1);
005f1d16                                                              eax_68 = ((((x87_r6_27 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_27, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r6_27 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1d1b                                                              long double x87_r6_28;
005f1d1b                                                              
005f1d1b                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1d1b                                                              {
005f1d21                                                                  long double temp5_1 = ((long double)*(uint32_t*)((char*)ecx_32 - 8));
005f1d21                                                                  (x87_r7_1 - temp5_1);
005f1d24                                                                  eax_68 = ((((x87_r7_1 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1d24                                                                  
005f1d29                                                                  if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1d30                                                                      x87_r6_28 = ((long double)1);
005f1d29                                                                  else
005f1d2b                                                                      x87_r6_28 = ((long double)*(uint32_t*)((char*)ecx_32 - 8));
005f1d1b                                                              }
005f1d1b                                                              else
005f1d1d                                                                  x87_r6_28 = ((long double)0);
005f1d1d                                                              
005f1d32                                                              *(uint32_t*)((char*)ecx_32 - 8) = ((float)x87_r6_28);
005f1d35                                                              long double x87_r6_29 = ((long double)0);
005f1d37                                                              long double temp7_1 = ((long double)*(uint32_t*)((char*)ecx_32 - 4));
005f1d37                                                              (x87_r6_29 - temp7_1);
005f1d3a                                                              eax_68 = ((((x87_r6_29 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_29, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_29 == temp7_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1d3f                                                              long double x87_r6_30;
005f1d3f                                                              
005f1d3f                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1d3f                                                              {
005f1d45                                                                  long double temp10_1 = ((long double)*(uint32_t*)((char*)ecx_32 - 4));
005f1d45                                                                  (x87_r7_1 - temp10_1);
005f1d48                                                                  eax_68 = ((((x87_r7_1 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp10_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1d48                                                                  
005f1d4d                                                                  if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1d54                                                                      x87_r6_30 = ((long double)1);
005f1d4d                                                                  else
005f1d4f                                                                      x87_r6_30 = ((long double)*(uint32_t*)((char*)ecx_32 - 4));
005f1d3f                                                              }
005f1d3f                                                              else
005f1d41                                                                  x87_r6_30 = ((long double)0);
005f1d41                                                              
005f1d56                                                              *(uint32_t*)((char*)ecx_32 - 4) = ((float)x87_r6_30);
005f1d59                                                              long double x87_r6_31 = ((long double)0);
005f1d5b                                                              long double temp13_1 = ((long double)*(uint32_t*)ecx_32);
005f1d5b                                                              (x87_r6_31 - temp13_1);
005f1d5d                                                              eax_68 = ((((x87_r6_31 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_31, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r6_31 == temp13_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1d62                                                              long double x87_r6_32;
005f1d62                                                              
005f1d62                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1d62                                                              {
005f1d68                                                                  long double temp16_1 = ((long double)*(uint32_t*)ecx_32);
005f1d68                                                                  (x87_r7_1 - temp16_1);
005f1d6a                                                                  eax_68 = ((((x87_r7_1 < temp16_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp16_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp16_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1d6a                                                                  
005f1d6f                                                                  if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1d75                                                                      x87_r6_32 = ((long double)1);
005f1d6f                                                                  else
005f1d71                                                                      x87_r6_32 = ((long double)*(uint32_t*)ecx_32);
005f1d62                                                              }
005f1d62                                                              else
005f1d64                                                                  x87_r6_32 = ((long double)0);
005f1d64                                                              
005f1d77                                                              *(uint32_t*)ecx_32 = ((float)x87_r6_32);
005f1d79                                                              long double x87_r6_33 = ((long double)0);
005f1d7b                                                              long double temp19_1 = ((long double)*(uint32_t*)((char*)ecx_32 + 4));
005f1d7b                                                              (x87_r6_33 - temp19_1);
005f1d7e                                                              eax_68 = ((((x87_r6_33 < temp19_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_33, temp19_1))) ? 1 : 0) << 0xa) | ((((x87_r6_33 == temp19_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1d83                                                              long double x87_r6_34;
005f1d83                                                              
005f1d83                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1d83                                                              {
005f1d89                                                                  long double temp22_1 = ((long double)*(uint32_t*)((char*)ecx_32 + 4));
005f1d89                                                                  (x87_r7_1 - temp22_1);
005f1d8c                                                                  eax_68 = ((((x87_r7_1 < temp22_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp22_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp22_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1d8c                                                                  
005f1d91                                                                  if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1d98                                                                      x87_r6_34 = ((long double)1);
005f1d91                                                                  else
005f1d93                                                                      x87_r6_34 = ((long double)*(uint32_t*)((char*)ecx_32 + 4));
005f1d83                                                              }
005f1d83                                                              else
005f1d85                                                                  x87_r6_34 = ((long double)0);
005f1d85                                                              
005f1d9a                                                              *(uint32_t*)((char*)ecx_32 + 4) = ((float)x87_r6_34);
005f1da0                                                              k += 1;
005f1da1                                                              ecx_32 += 0x10;
005f1da7                                                          } while (k < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f1d02                                                      }
005f1b6a                                                  }
005f1b6a                                                  else if (edx_8 == 2)
005f1b71                                                  {
005f1c3c                                                      int32_t k_1 = 0;
005f1c3c                                                      
005f1c40                                                      if (ecx_29 > 0)
005f1c40                                                      {
005f1c46                                                          void* ecx_31 = ((char*)eax_68 + 8);
005f1c46                                                          
005f1cf1                                                          do
005f1cf1                                                          {
005f1c49                                                              long double temp6_1 = ((long double)*(uint32_t*)((char*)ecx_31 - 8));
005f1c49                                                              (x87_r7_1 - temp6_1);
005f1c4c                                                              eax_68 = ((((x87_r7_1 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp6_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1c51                                                              long double x87_r6_18;
005f1c51                                                              
005f1c51                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1c51                                                              {
005f1c57                                                                  long double x87_r6_19 = ((long double)*(uint32_t*)((char*)ecx_31 - 8));
005f1c5a                                                                  long double temp8_1 = ((long double)1f);
005f1c5a                                                                  (x87_r6_19 - temp8_1);
005f1c60                                                                  eax_68 = ((((x87_r6_19 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_19, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r6_19 == temp8_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1c62                                                                  bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005f1c62                                                                  
005f1c65                                                                  if (p_5)
005f1c6c                                                                      x87_r6_18 = ((long double)1);
005f1c65                                                                  else
005f1c67                                                                      x87_r6_18 = ((long double)*(uint32_t*)((char*)ecx_31 - 8));
005f1c51                                                              }
005f1c51                                                              else
005f1c53                                                                  x87_r6_18 = x87_r7_1;
005f1c53                                                              
005f1c6e                                                              *(uint32_t*)((char*)ecx_31 - 8) = ((float)x87_r6_18);
005f1c71                                                              long double temp11_1 = ((long double)*(uint32_t*)((char*)ecx_31 - 4));
005f1c71                                                              (x87_r7_1 - temp11_1);
005f1c74                                                              eax_68 = ((((x87_r7_1 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp11_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1c79                                                              long double x87_r6_20;
005f1c79                                                              
005f1c79                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1c79                                                              {
005f1c7f                                                                  long double x87_r6_21 = ((long double)*(uint32_t*)((char*)ecx_31 - 4));
005f1c82                                                                  long double temp14_1 = ((long double)1f);
005f1c82                                                                  (x87_r6_21 - temp14_1);
005f1c88                                                                  eax_68 = ((((x87_r6_21 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_21, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r6_21 == temp14_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1c8a                                                                  bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
005f1c8a                                                                  
005f1c8d                                                                  if (p_6)
005f1c94                                                                      x87_r6_20 = ((long double)1);
005f1c8d                                                                  else
005f1c8f                                                                      x87_r6_20 = ((long double)*(uint32_t*)((char*)ecx_31 - 4));
005f1c79                                                              }
005f1c79                                                              else
005f1c7b                                                                  x87_r6_20 = x87_r7_1;
005f1c7b                                                              
005f1c96                                                              *(uint32_t*)((char*)ecx_31 - 4) = ((float)x87_r6_20);
005f1c99                                                              long double temp17_1 = ((long double)*(uint32_t*)ecx_31);
005f1c99                                                              (x87_r7_1 - temp17_1);
005f1c9b                                                              eax_68 = ((((x87_r7_1 < temp17_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp17_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp17_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1ca0                                                              long double x87_r6_22;
005f1ca0                                                              
005f1ca0                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1ca0                                                              {
005f1ca6                                                                  long double x87_r6_23 = ((long double)*(uint32_t*)ecx_31);
005f1ca8                                                                  long double temp20_1 = ((long double)1f);
005f1ca8                                                                  (x87_r6_23 - temp20_1);
005f1cae                                                                  eax_68 = ((((x87_r6_23 < temp20_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_23, temp20_1))) ? 1 : 0) << 0xa) | ((((x87_r6_23 == temp20_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1cb0                                                                  bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
005f1cb0                                                                  
005f1cb3                                                                  if (p_7)
005f1cb9                                                                      x87_r6_22 = ((long double)1);
005f1cb3                                                                  else
005f1cb5                                                                      x87_r6_22 = ((long double)*(uint32_t*)ecx_31);
005f1ca0                                                              }
005f1ca0                                                              else
005f1ca2                                                                  x87_r6_22 = x87_r7_1;
005f1ca2                                                              
005f1cbb                                                              *(uint32_t*)ecx_31 = ((float)x87_r6_22);
005f1cbd                                                              long double x87_r6_24 = ((long double)0);
005f1cbf                                                              long double temp23_1 = ((long double)*(uint32_t*)((char*)ecx_31 + 4));
005f1cbf                                                              (x87_r6_24 - temp23_1);
005f1cc2                                                              eax_68 = ((((x87_r6_24 < temp23_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_24, temp23_1))) ? 1 : 0) << 0xa) | ((((x87_r6_24 == temp23_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1cc7                                                              long double x87_r6_25;
005f1cc7                                                              
005f1cc7                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1cc7                                                              {
005f1ccd                                                                  long double x87_r6_26 = ((long double)*(uint32_t*)((char*)ecx_31 + 4));
005f1cd0                                                                  long double temp25_1 = ((long double)1f);
005f1cd0                                                                  (x87_r6_26 - temp25_1);
005f1cd6                                                                  eax_68 = ((((x87_r6_26 < temp25_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_26, temp25_1))) ? 1 : 0) << 0xa) | ((((x87_r6_26 == temp25_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1cd8                                                                  bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
005f1cd8                                                                  
005f1cdb                                                                  if (p_8)
005f1ce2                                                                      x87_r6_25 = ((long double)1);
005f1cdb                                                                  else
005f1cdd                                                                      x87_r6_25 = ((long double)*(uint32_t*)((char*)ecx_31 + 4));
005f1cc7                                                              }
005f1cc7                                                              else
005f1cc9                                                                  x87_r6_25 = ((long double)0);
005f1cc9                                                              
005f1ce4                                                              *(uint32_t*)((char*)ecx_31 + 4) = ((float)x87_r6_25);
005f1cea                                                              k_1 += 1;
005f1ceb                                                              ecx_31 += 0x10;
005f1cf1                                                          } while (k_1 < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f1c40                                                      }
005f1b71                                                  }
005f1b71                                                  else if (edx_8 == 3)
005f1b78                                                  {
005f1b7e                                                      int32_t k_2 = 0;
005f1b7e                                                      
005f1b82                                                      if (ecx_29 > 0)
005f1b82                                                      {
005f1b88                                                          void* ecx_30 = ((char*)eax_68 + 8);
005f1b88                                                          
005f1c31                                                          do
005f1c31                                                          {
005f1b8b                                                              long double temp9_1 = ((long double)*(uint32_t*)((char*)ecx_30 - 8));
005f1b8b                                                              (x87_r7_1 - temp9_1);
005f1b8e                                                              eax_68 = ((((x87_r7_1 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp9_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1b93                                                              long double x87_r6_10;
005f1b93                                                              
005f1b93                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1b93                                                              {
005f1b99                                                                  long double x87_r6_11 = ((long double)*(uint32_t*)((char*)ecx_30 - 8));
005f1b9c                                                                  long double temp12_1 = ((long double)1f);
005f1b9c                                                                  (x87_r6_11 - temp12_1);
005f1ba2                                                                  eax_68 = ((((x87_r6_11 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp12_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1ba4                                                                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005f1ba4                                                                  
005f1ba7                                                                  if (p_1)
005f1bae                                                                      x87_r6_10 = ((long double)1);
005f1ba7                                                                  else
005f1ba9                                                                      x87_r6_10 = ((long double)*(uint32_t*)((char*)ecx_30 - 8));
005f1b93                                                              }
005f1b93                                                              else
005f1b95                                                                  x87_r6_10 = x87_r7_1;
005f1b95                                                              
005f1bb0                                                              *(uint32_t*)((char*)ecx_30 - 8) = ((float)x87_r6_10);
005f1bb3                                                              long double temp15_1 = ((long double)*(uint32_t*)((char*)ecx_30 - 4));
005f1bb3                                                              (x87_r7_1 - temp15_1);
005f1bb6                                                              eax_68 = ((((x87_r7_1 < temp15_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp15_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp15_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1bbb                                                              long double x87_r6_12;
005f1bbb                                                              
005f1bbb                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1bbb                                                              {
005f1bc1                                                                  long double x87_r6_13 = ((long double)*(uint32_t*)((char*)ecx_30 - 4));
005f1bc4                                                                  long double temp18_1 = ((long double)1f);
005f1bc4                                                                  (x87_r6_13 - temp18_1);
005f1bca                                                                  eax_68 = ((((x87_r6_13 < temp18_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_13, temp18_1))) ? 1 : 0) << 0xa) | ((((x87_r6_13 == temp18_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1bcc                                                                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005f1bcc                                                                  
005f1bcf                                                                  if (p_2)
005f1bd6                                                                      x87_r6_12 = ((long double)1);
005f1bcf                                                                  else
005f1bd1                                                                      x87_r6_12 = ((long double)*(uint32_t*)((char*)ecx_30 - 4));
005f1bbb                                                              }
005f1bbb                                                              else
005f1bbd                                                                  x87_r6_12 = x87_r7_1;
005f1bbd                                                              
005f1bd8                                                              *(uint32_t*)((char*)ecx_30 - 4) = ((float)x87_r6_12);
005f1bdb                                                              long double temp21_1 = ((long double)*(uint32_t*)ecx_30);
005f1bdb                                                              (x87_r7_1 - temp21_1);
005f1bdd                                                              eax_68 = ((((x87_r7_1 < temp21_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp21_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp21_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1be2                                                              long double x87_r6_14;
005f1be2                                                              
005f1be2                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1be2                                                              {
005f1be8                                                                  long double x87_r6_15 = ((long double)*(uint32_t*)ecx_30);
005f1bea                                                                  long double temp24_1 = ((long double)1f);
005f1bea                                                                  (x87_r6_15 - temp24_1);
005f1bf0                                                                  eax_68 = ((((x87_r6_15 < temp24_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_15, temp24_1))) ? 1 : 0) << 0xa) | ((((x87_r6_15 == temp24_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1bf2                                                                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005f1bf2                                                                  
005f1bf5                                                                  if (p_3)
005f1bfb                                                                      x87_r6_14 = ((long double)1);
005f1bf5                                                                  else
005f1bf7                                                                      x87_r6_14 = ((long double)*(uint32_t*)ecx_30);
005f1be2                                                              }
005f1be2                                                              else
005f1be4                                                                  x87_r6_14 = x87_r7_1;
005f1be4                                                              
005f1bfd                                                              *(uint32_t*)ecx_30 = ((float)x87_r6_14);
005f1bff                                                              long double temp26_1 = ((long double)*(uint32_t*)((char*)ecx_30 + 4));
005f1bff                                                              (x87_r7_1 - temp26_1);
005f1c02                                                              eax_68 = ((((x87_r7_1 < temp26_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp26_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp26_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1c07                                                              long double x87_r6_16;
005f1c07                                                              
005f1c07                                                              if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f1c07                                                              {
005f1c0d                                                                  long double x87_r6_17 = ((long double)*(uint32_t*)((char*)ecx_30 + 4));
005f1c10                                                                  long double temp27_1 = ((long double)1f);
005f1c10                                                                  (x87_r6_17 - temp27_1);
005f1c16                                                                  eax_68 = ((((x87_r6_17 < temp27_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_17, temp27_1))) ? 1 : 0) << 0xa) | ((((x87_r6_17 == temp27_1) ? 1 : 0) << 0xe) | 0x3800))));
005f1c18                                                                  bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005f1c18                                                                  
005f1c1b                                                                  if (p_4)
005f1c22                                                                      x87_r6_16 = ((long double)1);
005f1c1b                                                                  else
005f1c1d                                                                      x87_r6_16 = ((long double)*(uint32_t*)((char*)ecx_30 + 4));
005f1c07                                                              }
005f1c07                                                              else
005f1c09                                                                  x87_r6_16 = x87_r7_1;
005f1c09                                                              
005f1c24                                                              *(uint32_t*)((char*)ecx_30 + 4) = ((float)x87_r6_16);
005f1c2a                                                              k_2 += 1;
005f1c2b                                                              ecx_30 += 0x10;
005f1c31                                                          } while (k_2 < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f1b82                                                      }
005f1b78                                                  }
005f1b78                                                  
005f1daf                                                  int32_t* ecx_33 = *(uint32_t*)((char*)this + 4);
005f1dc6                                                  *(uint32_t*)(*(uint32_t*)ecx_33 + 8)(j_1, *(uint32_t*)i_2, (((ecx_33[0x1a] * j_1) << 4) + *(uint32_t*)edi_26));
005f1dc9                                                  x87_r7_1 = ((long double)-1f);
005f1dcf                                                  j_1 += 1;
005f1dd2                                                  eax_64 = *(uint32_t*)((char*)this + 4);
005f1ddb                                              } while (j_1 < *(uint32_t*)((char*)eax_64 + 0x6c));
005f1b50                                          }
005f1b50                                          
005f1de4                                          *(uint32_t*)((char*)edi_26 + 4) = var_18;
005f1de7                                          eax_32 = ecx_11;
005f1dea                                          var_18 = edi_26;
005f1b3f                                      }
005f1df2                                  }
005f1df2                                  
005f1df8                                  var_38_1 += 1;
005f1dfe                              } while (eax_32 < ebx_2);
005f1940                          }
005f1940                          
005f1e06                          result = 0;
005f1900                      }
005f18c4                  }
005f185f              }
005f1841          }
005f1825      }
005f1825      
005f1e1b      if (var_c != 0)
005f1e1f          D3DXTex::TF_Row::`vector deleting destructor'(var_c, 3);
005f1e1f      
005f1e27      operator delete(var_1c);
005f1e2f      operator delete(var_20);
005f1e37      operator delete(eax_6);
005f1e3f      operator delete(var_10);
005f1e46      operator delete(nullptr);
005f1e54      return result;
005f17cf  }


005f1e55  long __thiscall D3DXTex::CBlt::BltTriangle2D(D3DXTex::CBlt* this)

005f1e55  {
005f1e5f      int32_t edi;
005f1e5f      int32_t var_40 = edi;
005f1e66      void* edx = *(uint32_t*)((char*)this + 4);
005f1e6d      void* var_1c = nullptr;
005f1e70      void* var_c = nullptr;
005f1e73      int32_t* var_18 = nullptr;
005f1e76      void* var_10 = nullptr;
005f1e76      
005f1e79      if (*(uint32_t*)((char*)edx + 0x70) == 1)
005f1e79      {
005f1e7f          void* esi_1 = *(uint32_t*)this;
005f1e7f          
005f1e84          if (*(uint32_t*)((char*)esi_1 + 0x70) == 1)
005f1e84          {
005f1e8a              int32_t eax = *(uint32_t*)((char*)this + 8);
005f1ea6              void* eax_4 = sub_5eec1f(*(uint32_t*)((char*)esi_1 + 0x68), *(uint32_t*)((char*)edx + 0x68), (!((eax >> 0x10)) & 1));
005f1eb0              void* eax_7;
005f1eb0              
005f1eb0              if (eax_4 != 0)
005f1eb0              {
005f1ec2                  eax_7 = sub_5eec1f(*(uint32_t*)(*(uint32_t*)this + 0x6c), *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c), (!((eax >> 0x11)) & 1));
005f1ec9                  var_1c = eax_7;
005f1eb0              }
005f1eb0              
005f1ecc              int32_t result;
005f1ecc              
005f1ecc              if ((eax_4 == 0 || eax_7 == 0))
005f23d2                  result = 0x80004005;
005f1ecc              else
005f1ecc              {
005f1ed7                  void* eax_9 = (*(uint32_t*)eax_4 + eax_4);
005f1ee1                  void* edi_3 = (*(uint32_t*)var_1c + var_1c);
005f1ee6                  int32_t esi_2 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x6c);
005f1ef7                  void* eax_14 = operator new(((esi_2 * 0xc) + 4));
005f1ef7                  
005f1eff                  if (eax_14 == 0)
005f1f1f                      var_c = nullptr;
005f1eff                  else
005f1eff                  {
005f1f07                      *(uint32_t*)eax_14 = esi_2;
005f1f12                      `vector constructor iterator'(((char*)eax_14 + 4), 0xc, esi_2, D3DXTex::TF_Row::TF_Row);
005f1f1a                      var_c = ((char*)eax_14 + 4);
005f1eff                  }
005f1eff                  
005f1f27                  if (var_c == 0)
005f1f27                  {
005f23cb                  label_5f23cb:
005f23cb                      result = 0x8007000e;
005f1f27                  }
005f1f27                  else
005f1f27                  {
005f1f2f                      int32_t esi_3 = *(uint32_t*)(*(uint32_t*)this + 0x68);
005f1f38                      void* eax_20 = operator new((esi_3 << 4));
005f1f38                      
005f1f43                      if (eax_20 == 0)
005f1f5b                          var_10 = nullptr;
005f1f43                      else
005f1f43                      {
005f1f4e                          `vector constructor iterator'(eax_20, 0x10, esi_3, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f1f56                          var_10 = eax_20;
005f1f43                      }
005f1f43                      
005f1f63                      if (var_10 == 0)
005f1f63                      {
005f23cb                      label_5f23cb_1:
005f23cb                          result = 0x8007000e;
005f1f63                      }
005f1f63                      else
005f1f63                      {
005f1f6c                          void* ecx_8 = ((char*)var_1c + 4);
005f1f71                          void* var_30_2 = ecx_8;
005f1f71                          
005f1f74                          if (ecx_8 < edi_3)
005f1f74                          {
005f1f98                              void* edx_2;
005f1f98                              
005f1f98                              do
005f1f98                              {
005f1f78                                  edx_2 = (*(uint32_t*)ecx_8 + ecx_8);
005f1f78                                  
005f1f92                                  for (void* i = ((char*)ecx_8 + 4); i < edx_2; i += 8)
005f1f92                                  {
005f1f7f                                      int32_t eax_22 = *(uint32_t*)i;
005f1f8b                                      *(uint32_t*)(((char*)var_c + (eax_22 * 0xc)) + 8) += 1;
005f1f92                                  }
005f1f92                                  
005f1f96                                  ecx_8 = edx_2;
005f1f98                              } while (edx_2 < edi_3);
005f1f74                          }
005f1f74                          
005f1f9a                          void* eax_25 = var_30_2;
005f1f9d                          int32_t var_20_2 = 0;
005f1f9d                          
005f1fa3                          while (eax_25 < edi_3)
005f1fa3                          {
005f1fab                              void* ecx_10 = (*(uint32_t*)eax_25 + eax_25);
005f1fb2                              void* var_14_1 = ecx_10;
005f1fb8                              void* var_8_1 = ((char*)eax_25 + 4);
005f1fb8                              
005f1fbb                              if (((char*)eax_25 + 4) < ecx_10)
005f1fbb                              {
005f2047                                  do
005f2047                                  {
005f1fcc                                      void* edi_4 = ((char*)var_c + (*(uint32_t*)var_8_1 * 0xc));
005f1fcc                                      
005f1fd2                                      if (*(uint32_t*)edi_4 == 0)
005f1fd2                                      {
005f1fd9                                          if (var_18 == 0)
005f1fd9                                          {
005f1fed                                              int32_t esi_5 = *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68);
005f1ff6                                              void* eax_35 = operator new((esi_5 << 4));
005f2001                                              void* eax_36;
005f2001                                              
005f2001                                              if (eax_35 == 0)
005f2016                                                  eax_36 = nullptr;
005f2001                                              else
005f2001                                              {
005f200c                                                  `vector constructor iterator'(eax_35, 0x10, esi_5, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f2011                                                  eax_36 = eax_35;
005f2001                                              }
005f2001                                              
005f201a                                              *(uint32_t*)edi_4 = eax_36;
005f201a                                              
005f201c                                              if (eax_36 == 0)
005f201c                                                  goto label_5f23cb_1;
005f1fd9                                          }
005f1fd9                                          else
005f1fd9                                          {
005f1fdd                                              *(uint32_t*)edi_4 = *(uint32_t*)var_18;
005f1fdf                                              *(uint32_t*)var_18 = 0;
005f1fe5                                              var_18 = var_18[1];
005f1fd9                                          }
005f1fd9                                          
005f202a                                          int32_t ecx_14 = (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) << 4);
005f203b                                          __builtin_memset(__builtin_memset(*(uint32_t*)edi_4, 0, ((ecx_14 >> 2) << 2)), 0, (ecx_14 & 3));
005f203d                                          ecx_10 = var_14_1;
005f1fd2                                      }
005f1fd2                                      
005f2040                                      var_8_1 += 8;
005f2047                                  } while (var_8_1 < ecx_10);
005f1fbb                              }
005f1fbb                              
005f2059                              *(uint32_t*)(**(uint32_t**)this + 4)(var_20_2, 0, var_10);
005f205f                              void* eax_40 = ((char*)eax_4 + 4);
005f205f                              
005f2065                              if (eax_40 < eax_9)
005f2065                              {
005f206e                                  void* edx_6 = ((char*)var_10 + 8);
005f2100                                  void* edi_8;
005f2100                                  
005f2100                                  do
005f2100                                  {
005f2076                                      edi_8 = (*(uint32_t*)eax_40 + eax_40);
005f207b                                      void* var_8_2 = ((char*)eax_25 + 4);
005f207b                                      
005f207e                                      if (((char*)eax_25 + 4) < var_14_1)
005f207e                                      {
005f20f6                                          do
005f20f6                                          {
005f2091                                              int32_t ecx_21 = *(uint32_t*)((char*)var_c + (*(uint32_t*)var_8_2 * 0xc));
005f2094                                              void* eax_45 = ((char*)eax_40 + 4);
005f2094                                              
005f20ea                                              while (eax_45 < edi_8)
005f20ea                                              {
005f209f                                                  long double x87_r7_2 = (((long double)*(uint32_t*)((char*)eax_45 + 4)) * ((long double)*(uint32_t*)((char*)var_8_2 + 4)));
005f20a7                                                  float* esi_9 = ((*(uint32_t*)eax_45 << 4) + ecx_21);
005f20b0                                                  *(uint32_t*)esi_9 = ((float)((x87_r7_2 * ((long double)*(uint32_t*)((char*)edx_6 - 8))) + ((long double)*(uint32_t*)esi_9)));
005f20b9                                                  float* esi_12 = (((*(uint32_t*)eax_45 << 4) + ecx_21) + 4);
005f20c2                                                  *(uint32_t*)esi_12 = ((float)((x87_r7_2 * ((long double)*(uint32_t*)((char*)edx_6 - 4))) + ((long double)*(uint32_t*)esi_12)));
005f20cb                                                  float* esi_15 = (((*(uint32_t*)eax_45 << 4) + ecx_21) + 8);
005f20d3                                                  *(uint32_t*)esi_15 = ((float)((x87_r7_2 * ((long double)*(uint32_t*)edx_6)) + ((long double)*(uint32_t*)esi_15)));
005f20dd                                                  float* esi_18 = (((*(uint32_t*)eax_45 << 4) + ecx_21) + 0xc);
005f20e1                                                  eax_45 += 8;
005f20e6                                                  *(uint32_t*)esi_18 = ((float)((x87_r7_2 * ((long double)*(uint32_t*)((char*)edx_6 + 4))) + ((long double)*(uint32_t*)esi_18)));
005f20ea                                              }
005f20ea                                              
005f20ec                                              var_8_2 += 8;
005f20f6                                          } while (var_8_2 < var_14_1);
005f207e                                      }
005f207e                                      
005f20f8                                      edx_6 += 0x10;
005f20fe                                      eax_40 = edi_8;
005f2100                                  } while (edi_8 < eax_9);
005f2065                              }
005f2065                              
005f2106                              void* i_1 = ((char*)eax_25 + 4);
005f2106                              
005f23b5                              for (eax_25 = var_14_1; i_1 < eax_25; i_1 += 8)
005f23b5                              {
005f2119                                  void* esi_19 = ((char*)var_c + (*(uint32_t*)i_1 * 0xc));
005f211c                                  int32_t temp0_1 = *(uint32_t*)((char*)esi_19 + 8);
005f211c                                  *(uint32_t*)((char*)esi_19 + 8) -= 1;
005f211c                                  
005f211f                                  if (temp0_1 == 1)
005f211f                                  {
005f2127                                      int32_t eax_48 = *(uint32_t*)(*(uint32_t*)this + 8);
005f2127                                      
005f212b                                      if (eax_48 == 1)
005f212b                                      {
005f22d4                                          int32_t edx_10 = 0;
005f22d6                                          int32_t j = 0;
005f22d6                                          
005f22db                                          if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) > 0)
005f22db                                          {
005f22e1                                              long double x87_r7_7 = ((long double)1f);
005f22e1                                              
005f2388                                              do
005f2388                                              {
005f22e9                                                  long double x87_r6_11 = ((long double)0);
005f22eb                                                  float* ecx_32 = (*(uint32_t*)esi_19 + edx_10);
005f22ee                                                  long double temp4_1 = ((long double)*(uint32_t*)ecx_32);
005f22ee                                                  (x87_r6_11 - temp4_1);
005f22f0                                                  void* eax_65;
005f22f0                                                  eax_65 = ((((x87_r6_11 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
005f22f5                                                  long double x87_r6_12;
005f22f5                                                  
005f22f5                                                  if ((*(uint8_t*)((char*)eax_65)[1] & 0x41) != 0)
005f22f5                                                  {
005f22fb                                                      long double temp5_1 = ((long double)*(uint32_t*)ecx_32);
005f22fb                                                      (x87_r7_7 - temp5_1);
005f22fd                                                      eax_65 = ((((x87_r7_7 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005f22fd                                                      
005f2302                                                      if ((*(uint8_t*)((char*)eax_65)[1] & 0x41) != 0)
005f2308                                                          x87_r6_12 = ((long double)1);
005f2302                                                      else
005f2304                                                          x87_r6_12 = ((long double)*(uint32_t*)ecx_32);
005f22f5                                                  }
005f22f5                                                  else
005f22f7                                                      x87_r6_12 = ((long double)0);
005f22f7                                                  
005f230a                                                  *(uint32_t*)ecx_32 = ((float)x87_r6_12);
005f230e                                                  float* ecx_33 = ((*(uint32_t*)esi_19 + edx_10) + 4);
005f2312                                                  long double x87_r6_13 = ((long double)0);
005f2314                                                  long double temp7_1 = ((long double)*(uint32_t*)ecx_33);
005f2314                                                  (x87_r6_13 - temp7_1);
005f2316                                                  int32_t eax_66;
005f2316                                                  eax_66 = ((((x87_r6_13 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_13, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_13 == temp7_1) ? 1 : 0) << 0xe) | 0x3800))));
005f231b                                                  long double x87_r6_14;
005f231b                                                  
005f231b                                                  if ((*(uint8_t*)((char*)eax_66)[1] & 0x41) != 0)
005f231b                                                  {
005f2321                                                      long double temp10_1 = ((long double)*(uint32_t*)ecx_33);
005f2321                                                      (x87_r7_7 - temp10_1);
005f2323                                                      eax_66 = ((((x87_r7_7 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp10_1) ? 1 : 0) << 0xe) | 0x3800))));
005f2323                                                      
005f2328                                                      if ((*(uint8_t*)((char*)eax_66)[1] & 0x41) != 0)
005f232e                                                          x87_r6_14 = ((long double)1);
005f2328                                                      else
005f232a                                                          x87_r6_14 = ((long double)*(uint32_t*)ecx_33);
005f231b                                                  }
005f231b                                                  else
005f231d                                                      x87_r6_14 = ((long double)0);
005f231d                                                  
005f2330                                                  *(uint32_t*)ecx_33 = ((float)x87_r6_14);
005f2334                                                  float* ecx_34 = ((*(uint32_t*)esi_19 + edx_10) + 8);
005f2338                                                  long double x87_r6_15 = ((long double)0);
005f233a                                                  long double temp13_1 = ((long double)*(uint32_t*)ecx_34);
005f233a                                                  (x87_r6_15 - temp13_1);
005f233c                                                  int32_t eax_67;
005f233c                                                  eax_67 = ((((x87_r6_15 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_15, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r6_15 == temp13_1) ? 1 : 0) << 0xe) | 0x3800))));
005f2341                                                  long double x87_r6_16;
005f2341                                                  
005f2341                                                  if ((*(uint8_t*)((char*)eax_67)[1] & 0x41) != 0)
005f2341                                                  {
005f2347                                                      long double temp16_1 = ((long double)*(uint32_t*)ecx_34);
005f2347                                                      (x87_r7_7 - temp16_1);
005f2349                                                      eax_67 = ((((x87_r7_7 < temp16_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp16_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp16_1) ? 1 : 0) << 0xe) | 0x3800))));
005f2349                                                      
005f234e                                                      if ((*(uint8_t*)((char*)eax_67)[1] & 0x41) != 0)
005f2354                                                          x87_r6_16 = ((long double)1);
005f234e                                                      else
005f2350                                                          x87_r6_16 = ((long double)*(uint32_t*)ecx_34);
005f2341                                                  }
005f2341                                                  else
005f2343                                                      x87_r6_16 = ((long double)0);
005f2343                                                  
005f2356                                                  *(uint32_t*)ecx_34 = ((float)x87_r6_16);
005f235a                                                  float* ecx_35 = ((*(uint32_t*)esi_19 + edx_10) + 0xc);
005f235e                                                  long double x87_r6_17 = ((long double)0);
005f2360                                                  long double temp19_1 = ((long double)*(uint32_t*)ecx_35);
005f2360                                                  (x87_r6_17 - temp19_1);
005f2362                                                  int32_t eax_68;
005f2362                                                  eax_68 = ((((x87_r6_17 < temp19_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_17, temp19_1))) ? 1 : 0) << 0xa) | ((((x87_r6_17 == temp19_1) ? 1 : 0) << 0xe) | 0x3800))));
005f2367                                                  long double x87_r6_18;
005f2367                                                  
005f2367                                                  if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f2367                                                  {
005f236d                                                      long double temp22_1 = ((long double)*(uint32_t*)ecx_35);
005f236d                                                      (x87_r7_7 - temp22_1);
005f236f                                                      eax_68 = ((((x87_r7_7 < temp22_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp22_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp22_1) ? 1 : 0) << 0xe) | 0x3800))));
005f236f                                                      
005f2374                                                      if ((*(uint8_t*)((char*)eax_68)[1] & 0x41) != 0)
005f237a                                                          x87_r6_18 = ((long double)1);
005f2374                                                      else
005f2376                                                          x87_r6_18 = ((long double)*(uint32_t*)ecx_35);
005f2367                                                  }
005f2367                                                  else
005f2369                                                      x87_r6_18 = ((long double)0);
005f2369                                                  
005f237c                                                  *(uint32_t*)ecx_35 = ((float)x87_r6_18);
005f2381                                                  j += 1;
005f2382                                                  edx_10 += 0x10;
005f2388                                              } while (j < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f22db                                          }
005f212b                                      }
005f212b                                      else
005f212b                                      {
005f2132                                          long double x87_r6_10;
005f2132                                          
005f2132                                          if (eax_48 == 2)
005f2132                                          {
005f220a                                              int32_t edx_9 = 0;
005f220c                                              int32_t j_1 = 0;
005f220c                                              
005f2211                                              if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) > 0)
005f2211                                              {
005f2217                                                  long double x87_r7_6 = ((long double)-1f);
005f221d                                                  x87_r6_10 = ((long double)1f);
005f221d                                                  
005f22c4                                                  do
005f22c4                                                  {
005f2227                                                      float* ecx_28 = (*(uint32_t*)esi_19 + edx_9);
005f222a                                                      long double temp6_1 = ((long double)*(uint32_t*)ecx_28);
005f222a                                                      (x87_r7_6 - temp6_1);
005f222c                                                      void* eax_59;
005f222c                                                      eax_59 = ((((x87_r7_6 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp6_1) ? 1 : 0) << 0xe) | 0x3000))));
005f2231                                                      long double x87_r5_10;
005f2231                                                      
005f2231                                                      if ((*(uint8_t*)((char*)eax_59)[1] & 0x41) != 0)
005f2231                                                      {
005f2237                                                          long double temp8_1 = ((long double)*(uint32_t*)ecx_28);
005f2237                                                          (x87_r6_10 - temp8_1);
005f2239                                                          eax_59 = ((((x87_r6_10 < temp8_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp8_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp8_1) ? 1 : 0) << 0xe) | 0x3000))));
005f2239                                                          
005f223e                                                          if ((*(uint8_t*)((char*)eax_59)[1] & 0x41) != 0)
005f2244                                                              x87_r5_10 = ((long double)1);
005f223e                                                          else
005f2240                                                              x87_r5_10 = ((long double)*(uint32_t*)ecx_28);
005f2231                                                      }
005f2231                                                      else
005f2233                                                          x87_r5_10 = x87_r7_6;
005f2233                                                      
005f2246                                                      *(uint32_t*)ecx_28 = ((float)x87_r5_10);
005f224a                                                      float* ecx_29 = ((*(uint32_t*)esi_19 + edx_9) + 4);
005f2250                                                      long double temp11_1 = ((long double)*(uint32_t*)ecx_29);
005f2250                                                      (x87_r7_6 - temp11_1);
005f2252                                                      int32_t eax_60;
005f2252                                                      eax_60 = ((((x87_r7_6 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp11_1) ? 1 : 0) << 0xe) | 0x3000))));
005f2257                                                      long double x87_r5_12;
005f2257                                                      
005f2257                                                      if ((*(uint8_t*)((char*)eax_60)[1] & 0x41) != 0)
005f2257                                                      {
005f225d                                                          long double temp14_1 = ((long double)*(uint32_t*)ecx_29);
005f225d                                                          (x87_r6_10 - temp14_1);
005f225f                                                          eax_60 = ((((x87_r6_10 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp14_1) ? 1 : 0) << 0xe) | 0x3000))));
005f225f                                                          
005f2264                                                          if ((*(uint8_t*)((char*)eax_60)[1] & 0x41) != 0)
005f226a                                                              x87_r5_12 = ((long double)1);
005f2264                                                          else
005f2266                                                              x87_r5_12 = ((long double)*(uint32_t*)ecx_29);
005f2257                                                      }
005f2257                                                      else
005f2259                                                          x87_r5_12 = x87_r7_6;
005f2259                                                      
005f226c                                                      *(uint32_t*)ecx_29 = ((float)x87_r5_12);
005f2270                                                      float* ecx_30 = ((*(uint32_t*)esi_19 + edx_9) + 8);
005f2276                                                      long double temp17_1 = ((long double)*(uint32_t*)ecx_30);
005f2276                                                      (x87_r7_6 - temp17_1);
005f2278                                                      int32_t eax_61;
005f2278                                                      eax_61 = ((((x87_r7_6 < temp17_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp17_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp17_1) ? 1 : 0) << 0xe) | 0x3000))));
005f227d                                                      long double x87_r5_14;
005f227d                                                      
005f227d                                                      if ((*(uint8_t*)((char*)eax_61)[1] & 0x41) != 0)
005f227d                                                      {
005f2283                                                          long double temp20_1 = ((long double)*(uint32_t*)ecx_30);
005f2283                                                          (x87_r6_10 - temp20_1);
005f2285                                                          eax_61 = ((((x87_r6_10 < temp20_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp20_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp20_1) ? 1 : 0) << 0xe) | 0x3000))));
005f2285                                                          
005f228a                                                          if ((*(uint8_t*)((char*)eax_61)[1] & 0x41) != 0)
005f2290                                                              x87_r5_14 = ((long double)1);
005f228a                                                          else
005f228c                                                              x87_r5_14 = ((long double)*(uint32_t*)ecx_30);
005f227d                                                      }
005f227d                                                      else
005f227f                                                          x87_r5_14 = x87_r7_6;
005f227f                                                      
005f2292                                                      *(uint32_t*)ecx_30 = ((float)x87_r5_14);
005f2296                                                      float* ecx_31 = ((*(uint32_t*)esi_19 + edx_9) + 0xc);
005f229a                                                      long double x87_r5_15 = ((long double)0);
005f229c                                                      long double temp23_1 = ((long double)*(uint32_t*)ecx_31);
005f229c                                                      (x87_r5_15 - temp23_1);
005f229e                                                      int32_t eax_62;
005f229e                                                      eax_62 = ((((x87_r5_15 < temp23_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_15, temp23_1))) ? 1 : 0) << 0xa) | ((((x87_r5_15 == temp23_1) ? 1 : 0) << 0xe) | 0x3000))));
005f22a3                                                      long double x87_r5_16;
005f22a3                                                      
005f22a3                                                      if ((*(uint8_t*)((char*)eax_62)[1] & 0x41) != 0)
005f22a3                                                      {
005f22a9                                                          long double temp25_1 = ((long double)*(uint32_t*)ecx_31);
005f22a9                                                          (x87_r6_10 - temp25_1);
005f22ab                                                          eax_62 = ((((x87_r6_10 < temp25_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp25_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp25_1) ? 1 : 0) << 0xe) | 0x3000))));
005f22ab                                                          
005f22b0                                                          if ((*(uint8_t*)((char*)eax_62)[1] & 0x41) != 0)
005f22b6                                                              x87_r5_16 = ((long double)1);
005f22b0                                                          else
005f22b2                                                              x87_r5_16 = ((long double)*(uint32_t*)ecx_31);
005f22a3                                                      }
005f22a3                                                      else
005f22a5                                                          x87_r5_16 = ((long double)0);
005f22a5                                                      
005f22b8                                                      *(uint32_t*)ecx_31 = ((float)x87_r5_16);
005f22bd                                                      j_1 += 1;
005f22be                                                      edx_9 += 0x10;
005f22c4                                                  } while (j_1 < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f2211                                              }
005f2132                                          }
005f2132                                          else if (eax_48 == 3)
005f2139                                          {
005f2142                                              int32_t edx_8 = 0;
005f2144                                              int32_t j_2 = 0;
005f2144                                              
005f2149                                              if (*(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68) > 0)
005f2149                                              {
005f214f                                                  long double x87_r7_5 = ((long double)-1f);
005f2155                                                  x87_r6_10 = ((long double)1f);
005f2155                                                  
005f21fc                                                  do
005f21fc                                                  {
005f215f                                                      float* ecx_24 = (*(uint32_t*)esi_19 + edx_8);
005f2162                                                      long double temp9_1 = ((long double)*(uint32_t*)ecx_24);
005f2162                                                      (x87_r7_5 - temp9_1);
005f2164                                                      void* eax_53;
005f2164                                                      eax_53 = ((((x87_r7_5 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp9_1) ? 1 : 0) << 0xe) | 0x3000))));
005f2169                                                      long double x87_r5_2;
005f2169                                                      
005f2169                                                      if ((*(uint8_t*)((char*)eax_53)[1] & 0x41) != 0)
005f2169                                                      {
005f216f                                                          long double temp12_1 = ((long double)*(uint32_t*)ecx_24);
005f216f                                                          (x87_r6_10 - temp12_1);
005f2171                                                          eax_53 = ((((x87_r6_10 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp12_1) ? 1 : 0) << 0xe) | 0x3000))));
005f2171                                                          
005f2176                                                          if ((*(uint8_t*)((char*)eax_53)[1] & 0x41) != 0)
005f217c                                                              x87_r5_2 = ((long double)1);
005f2176                                                          else
005f2178                                                              x87_r5_2 = ((long double)*(uint32_t*)ecx_24);
005f2169                                                      }
005f2169                                                      else
005f216b                                                          x87_r5_2 = x87_r7_5;
005f216b                                                      
005f217e                                                      *(uint32_t*)ecx_24 = ((float)x87_r5_2);
005f2182                                                      float* ecx_25 = ((*(uint32_t*)esi_19 + edx_8) + 4);
005f2188                                                      long double temp15_1 = ((long double)*(uint32_t*)ecx_25);
005f2188                                                      (x87_r7_5 - temp15_1);
005f218a                                                      int32_t eax_54;
005f218a                                                      eax_54 = ((((x87_r7_5 < temp15_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp15_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp15_1) ? 1 : 0) << 0xe) | 0x3000))));
005f218f                                                      long double x87_r5_4;
005f218f                                                      
005f218f                                                      if ((*(uint8_t*)((char*)eax_54)[1] & 0x41) != 0)
005f218f                                                      {
005f2195                                                          long double temp18_1 = ((long double)*(uint32_t*)ecx_25);
005f2195                                                          (x87_r6_10 - temp18_1);
005f2197                                                          eax_54 = ((((x87_r6_10 < temp18_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp18_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp18_1) ? 1 : 0) << 0xe) | 0x3000))));
005f2197                                                          
005f219c                                                          if ((*(uint8_t*)((char*)eax_54)[1] & 0x41) != 0)
005f21a2                                                              x87_r5_4 = ((long double)1);
005f219c                                                          else
005f219e                                                              x87_r5_4 = ((long double)*(uint32_t*)ecx_25);
005f218f                                                      }
005f218f                                                      else
005f2191                                                          x87_r5_4 = x87_r7_5;
005f2191                                                      
005f21a4                                                      *(uint32_t*)ecx_25 = ((float)x87_r5_4);
005f21a8                                                      float* ecx_26 = ((*(uint32_t*)esi_19 + edx_8) + 8);
005f21ae                                                      long double temp21_1 = ((long double)*(uint32_t*)ecx_26);
005f21ae                                                      (x87_r7_5 - temp21_1);
005f21b0                                                      int32_t eax_55;
005f21b0                                                      eax_55 = ((((x87_r7_5 < temp21_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp21_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp21_1) ? 1 : 0) << 0xe) | 0x3000))));
005f21b5                                                      long double x87_r5_6;
005f21b5                                                      
005f21b5                                                      if ((*(uint8_t*)((char*)eax_55)[1] & 0x41) != 0)
005f21b5                                                      {
005f21bb                                                          long double temp24_1 = ((long double)*(uint32_t*)ecx_26);
005f21bb                                                          (x87_r6_10 - temp24_1);
005f21bd                                                          eax_55 = ((((x87_r6_10 < temp24_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp24_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp24_1) ? 1 : 0) << 0xe) | 0x3000))));
005f21bd                                                          
005f21c2                                                          if ((*(uint8_t*)((char*)eax_55)[1] & 0x41) != 0)
005f21c8                                                              x87_r5_6 = ((long double)1);
005f21c2                                                          else
005f21c4                                                              x87_r5_6 = ((long double)*(uint32_t*)ecx_26);
005f21b5                                                      }
005f21b5                                                      else
005f21b7                                                          x87_r5_6 = x87_r7_5;
005f21b7                                                      
005f21ca                                                      *(uint32_t*)ecx_26 = ((float)x87_r5_6);
005f21ce                                                      float* ecx_27 = ((*(uint32_t*)esi_19 + edx_8) + 0xc);
005f21d4                                                      long double temp26_1 = ((long double)*(uint32_t*)ecx_27);
005f21d4                                                      (x87_r7_5 - temp26_1);
005f21d6                                                      int32_t eax_56;
005f21d6                                                      eax_56 = ((((x87_r7_5 < temp26_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp26_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp26_1) ? 1 : 0) << 0xe) | 0x3000))));
005f21db                                                      long double x87_r5_8;
005f21db                                                      
005f21db                                                      if ((*(uint8_t*)((char*)eax_56)[1] & 0x41) != 0)
005f21db                                                      {
005f21e1                                                          long double temp27_1 = ((long double)*(uint32_t*)ecx_27);
005f21e1                                                          (x87_r6_10 - temp27_1);
005f21e3                                                          eax_56 = ((((x87_r6_10 < temp27_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, temp27_1))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == temp27_1) ? 1 : 0) << 0xe) | 0x3000))));
005f21e3                                                          
005f21e8                                                          if ((*(uint8_t*)((char*)eax_56)[1] & 0x41) != 0)
005f21ee                                                              x87_r5_8 = ((long double)1);
005f21e8                                                          else
005f21ea                                                              x87_r5_8 = ((long double)*(uint32_t*)ecx_27);
005f21db                                                      }
005f21db                                                      else
005f21dd                                                          x87_r5_8 = x87_r7_5;
005f21dd                                                      
005f21f0                                                      *(uint32_t*)ecx_27 = ((float)x87_r5_8);
005f21f5                                                      j_2 += 1;
005f21f6                                                      edx_8 += 0x10;
005f21fc                                                  } while (j_2 < *(uint32_t*)(*(uint32_t*)((char*)this + 4) + 0x68));
005f2149                                              }
005f2139                                          }
005f212b                                      }
005f212b                                      
005f239e                                      *(uint32_t*)(**(uint32_t**)((char*)this + 4) + 8)(*(uint32_t*)i_1, 0, *(uint32_t*)esi_19);
005f23a4                                      *(uint32_t*)((char*)esi_19 + 4) = var_18;
005f23a7                                      eax_25 = var_14_1;
005f23aa                                      var_18 = esi_19;
005f211f                                  }
005f23b5                              }
005f23b5                              
005f23bb                              var_20_2 += 1;
005f1fa3                          }
005f1fa3                          
005f23c7                          result = 0;
005f1f63                      }
005f1f27                  }
005f1ecc              }
005f1ecc              
005f23dc              if (var_c != 0)
005f23e0                  D3DXTex::TF_Row::`vector deleting destructor'(var_c, 3);
005f23e0              
005f23e8              operator delete(var_1c);
005f23f0              operator delete(eax_4);
005f23f8              operator delete(var_10);
005f23ff              operator delete(nullptr);
005f2407              return result;
005f1e84          }
005f1e79      }
005f1e79      
005f240b      return 0x80004005;
005f1e55  }


005f2415  long __thiscall D3DXTex::CBlt::Blt(D3DXTex::CBlt* this, struct D3DX_BLT* arg2, struct D3DX_BLT* arg3, unsigned long arg4)

005f2415  {
005f2420      *(uint32_t*)((char*)this + 4) = 0;
005f2424      *(uint32_t*)this = 0;
005f2429      uint32_t ecx_1 = ((uint32_t)arg4);
005f242f      *(uint32_t*)((char*)this + 8) = arg4;
005f242f      
005f2446      if ((ecx_1 <= 0 || (ecx_1 > 5 || (arg4 & 0xff800000) != 0)))
005f2548          return 0x8876086c;
005f2548      
005f244e      int32_t edi;
005f244e      int32_t var_c_1 = edi;
005f2458      *(uint32_t*)((char*)arg3 + 0x48) = (arg4 & 0x200000);
005f2466      *(uint32_t*)((char*)arg2 + 0x48) = (arg4 & 0x400000);
005f2477      *(uint32_t*)((char*)arg2 + 0x40) = (arg4 & 0x80000);
005f247a      *(uint32_t*)((char*)arg2 + 0x44) = (arg4 & 0x100000);
005f247d      class D3DXTex::CCodec* eax_2;
005f247d      int80_t st0_1;
005f247d      eax_2 = D3DXTex::CCodec::Create(arg2);
005f2484      *(uint32_t*)((char*)this + 4) = eax_2;
005f2487      long result;
005f2487      
005f2487      if (eax_2 == 0)
005f251e          result = 0x80004005;
005f2487      else
005f2487      {
005f248e          class D3DXTex::CCodec* eax_3;
005f248e          int80_t st0_2;
005f248e          eax_3 = D3DXTex::CCodec::Create(arg3);
005f2495          *(uint32_t*)this = eax_3;
005f2495          
005f2497          if (eax_3 == 0)
005f251e              result = 0x80004005;
005f2497          else
005f2497          {
005f24a6              result = D3DXTex::CCodec::ConvertFrom(*(uint32_t*)((char*)this + 4), eax_3);
005f24a6              
005f24aa              if (result >= 0)
005f24aa              {
005f24b5                  if (D3DXTex::CBlt::BltSame(this) >= 0)
005f251a                      result = 0;
005f24b5                  else if (D3DXTex::CBlt::BltCopy(this) >= 0)
005f251a                      result = 0;
005f24c0                  else if (D3DXTex::CBlt::BltNone(this) >= 0)
005f251a                      result = 0;
005f24cb                  else if (D3DXTex::CBlt::BltPoint(this) >= 0)
005f251a                      result = 0;
005f24d6                  else
005f24d6                  {
005f24da                      long eax_9;
005f24da                      int80_t st0_3;
005f24da                      eax_9 = D3DXTex::CBlt::BltBox2D(this);
005f24da                      
005f24e1                      if (eax_9 >= 0)
005f251a                          result = 0;
005f24e1                      else
005f24e1                      {
005f24e5                          long eax_10;
005f24e5                          int80_t st0_4;
005f24e5                          eax_10 = D3DXTex::CBlt::BltBox3D(this);
005f24e5                          
005f24ec                          if (eax_10 >= 0)
005f251a                              result = 0;
005f24ec                          else
005f24ec                          {
005f24f0                              long eax_11;
005f24f0                              int80_t st0_5;
005f24f0                              eax_11 = D3DXTex::CBlt::BltLinear2D(this);
005f24f0                              
005f24f7                              if (eax_11 >= 0)
005f251a                                  result = 0;
005f24f7                              else
005f24f7                              {
005f24fb                                  long eax_12;
005f24fb                                  int80_t st0_6;
005f24fb                                  eax_12 = D3DXTex::CBlt::BltLinear3D(this);
005f24fb                                  
005f2502                                  if (eax_12 >= 0)
005f251a                                      result = 0;
005f2502                                  else
005f2502                                  {
005f2506                                      long eax_13;
005f2506                                      int80_t st0_7;
005f2506                                      eax_13 = D3DXTex::CBlt::BltTriangle2D(this);
005f2506                                      
005f250d                                      if (eax_13 >= 0)
005f251a                                          result = 0;
005f250d                                      else
005f250d                                      {
005f2511                                          long eax_14;
005f2511                                          int80_t st0_8;
005f2511                                          eax_14 = D3DXTex::CBlt::BltTriangle3D(this);
005f2511                                          
005f2518                                          if (eax_14 < 0)
005f251e                                              result = 0x80004005;
005f2518                                          else
005f251a                                              result = 0;
005f250d                                      }
005f2502                                  }
005f24f7                              }
005f24ec                          }
005f24e1                      }
005f24d6                  }
005f24aa              }
005f2497          }
005f2487      }
005f2487      
005f2523      int32_t* ecx_16 = *(uint32_t*)((char*)this + 4);
005f2523      
005f2528      if (ecx_16 != 0)
005f2528      {
005f252e          **(uint32_t**)ecx_16(1);
005f2530          *(uint32_t*)((char*)this + 4) = 0;
005f2528      }
005f2528      
005f2534      int32_t* ecx_17 = *(uint32_t*)this;
005f2534      
005f2538      if (ecx_17 != 0)
005f2538      {
005f253e          **(uint32_t**)ecx_17(1);
005f2540          *(uint32_t*)this = 0;
005f2538      }
005f2538      
005f254f      return result;
005f2415  }


005f2552  void __thiscall D3DXTex::CLockSurface::CLockSurface(D3DXTex::CLockSurface* this)

005f2552  {
005f2556      __builtin_memset(this, 0, 0x14);
005f2552  }


005f2565  long __stdcall D3DXTex::InternalCopy(struct IDirect3DSurface9* arg1, struct IDirect3DSurface9* arg2)

005f2565  {
005f256e      struct IDirect3DSurface9* ebx = arg1;
005f2579      int32_t var_3c;
005f2571      ebx->vtable->GetDesc(ebx, &var_3c);
005f257e      int32_t result_1 = 0;
005f2587      int32_t var_14;
005f2587      int32_t result = ebx->vtable->LockRect(ebx, &var_14, 0, 0);
005f2587      
005f258c      if (result >= 0)
005f258c      {
005f2592          int32_t edi;
005f2592          int32_t var_48_1 = edi;
005f2593          struct IDirect3DSurface9* edi_1 = arg2;
005f259f          int32_t var_1c;
005f259f          int32_t result_2 = edi_1->vtable->LockRect(edi_1, &var_1c, 0, 0);
005f259f          
005f25a4          if (result_2 >= 0)
005f25a4          {
005f25ad              int32_t eax_3 = var_3c;
005f25d1              uint32_t var_20;
005f25d1              uint32_t ecx_3;
005f25d1              
005f25d1              if (((((eax_3 == 0x31545844 || eax_3 == 0x32545844) || eax_3 == 0x33545844) || eax_3 == 0x34545844) || eax_3 == 0x35545844))
005f25d1              {
005f25d9                  ecx_3 = ((var_20 + 3) >> 2);
005f25dc                  var_20 = ecx_3;
005f25d1              }
005f25d1              else
005f25e1                  ecx_3 = var_20;
005f25e1              
005f25e4              int32_t edx_1 = var_1c;
005f25e7              int32_t eax_4 = var_14;
005f25ec              int32_t var_c_1 = edx_1;
005f25ec              
005f25ef              if (edx_1 >= eax_4)
005f25f1                  var_c_1 = eax_4;
005f25f1              
005f25f6              int32_t var_10;
005f25f6              int32_t eax_5 = var_10;
005f25f9              int32_t var_18;
005f25f9              int32_t edx_2 = var_18;
005f25fc              int32_t var_8_1 = 0;
005f25fc              
005f25ff              if (ecx_3 > 0)
005f25ff              {
005f2625                  do
005f2625                  {
005f260d                      int32_t esi_1;
005f260d                      int32_t edi_3;
005f260d                      edi_3 = __builtin_memcpy(edx_2, eax_5, ((var_c_1 >> 2) << 2));
005f2614                      __builtin_memcpy(edi_3, esi_1, (var_c_1 & 3));
005f2616                      eax_5 += var_14;
005f2619                      edx_2 += var_1c;
005f261c                      var_8_1 += 1;
005f2625                  } while (var_8_1 < var_20);
005f2625                  
005f2627                  edi_1 = arg2;
005f262a                  ebx = arg1;
005f262d                  result_1 = 0;
005f25ff              }
005f25ff              
005f262f              edi_1->vtable->UnlockRect(edi_1);
005f25a4          }
005f25a4          else
005f25a6              result_1 = result_2;
005f25a6          
005f2635          ebx->vtable->UnlockRect(ebx);
005f263b          result = result_1;
005f258c      }
005f258c      
005f2641      return result;
005f2565  }


005f2644  long __thiscall D3DXTex::CLockSurface::Unlock(D3DXTex::CLockSurface* this)

005f2644  {
005f2649      int32_t* eax = *(uint32_t*)((char*)this + 8);
005f264c      int32_t edi;
005f264c      int32_t var_8 = edi;
005f264c      
005f2651      if (eax != 0)
005f265d          *(uint32_t*)(*(uint32_t*)eax + 0x38)(eax);
005f2651      else
005f2651      {
005f2653          eax = *(uint32_t*)((char*)this + 4);
005f2653          
005f2658          if (eax != 0)
005f265d              *(uint32_t*)(*(uint32_t*)eax + 0x38)(eax);
005f2651      }
005f2651      
005f2672      if ((*(uint32_t*)((char*)this + 4) != 0 && (*(uint32_t*)((char*)this + 8) != 0 && (*(uint32_t*)((char*)this + 0x10) != 0 && (*(uint8_t*)this & 1) == 0))))
005f2672      {
005f2677          D3DXDebugMuteInt(1);
005f267c          int32_t* eax_1 = *(uint32_t*)((char*)this + 0x10);
005f268a          int32_t eax_2 = *(uint32_t*)(*(uint32_t*)eax_1 + 0x78)(eax_1, *(uint32_t*)((char*)this + 8), 0, *(uint32_t*)((char*)this + 4), 0);
005f2690          D3DXDebugMuteInt(0);
005f2690          
005f2698          if (eax_2 < 0)
005f2698          {
005f269c              D3DXDebugMuteInt(1);
005f26a7              D3DXTex::InternalCopy(*(uint32_t*)((char*)this + 8), *(uint32_t*)((char*)this + 4));
005f26ad              D3DXDebugMuteInt(0);
005f2698          }
005f2672      }
005f2672      
005f26b2      int32_t* eax_3 = *(uint32_t*)((char*)this + 8);
005f26b2      
005f26b7      if (eax_3 != 0)
005f26b7      {
005f26bc          *(uint32_t*)(*(uint32_t*)eax_3 + 8)(eax_3);
005f26bf          *(uint32_t*)((char*)this + 8) = 0;
005f26b7      }
005f26b7      
005f26c2      int32_t* eax_4 = *(uint32_t*)((char*)this + 0xc);
005f26c2      
005f26c7      if (eax_4 != 0)
005f26c7      {
005f26cc          *(uint32_t*)(*(uint32_t*)eax_4 + 8)(eax_4);
005f26cf          *(uint32_t*)((char*)this + 0xc) = 0;
005f26c7      }
005f26c7      
005f26d2      int32_t* eax_5 = *(uint32_t*)((char*)this + 0x10);
005f26d2      
005f26d7      if (eax_5 != 0)
005f26d7      {
005f26dc          *(uint32_t*)(*(uint32_t*)eax_5 + 8)(eax_5);
005f26df          *(uint32_t*)((char*)this + 0x10) = 0;
005f26d7      }
005f26d7      
005f26e2      int32_t* eax_6 = *(uint32_t*)((char*)this + 4);
005f26e2      
005f26e7      if (eax_6 != 0)
005f26e7      {
005f26ec          *(uint32_t*)(*(uint32_t*)eax_6 + 8)(eax_6);
005f26ef          *(uint32_t*)((char*)this + 4) = 0;
005f26e7      }
005f26e7      
005f26f6      return 0;
005f2644  }


005f26f7  void __thiscall D3DXTex::CLockVolume::CLockVolume(D3DXTex::CLockVolume* this)

005f26f7  {
005f26f9      *(uint32_t*)this = 0;
005f26f7  }


005f26fd  long __thiscall D3DXTex::CLockVolume::Unlock(D3DXTex::CLockVolume* this)

005f26fd  {
005f2702      int32_t* eax = *(uint32_t*)this;
005f2702      
005f2706      if (eax != 0)
005f2706      {
005f270b          *(uint32_t*)(*(uint32_t*)eax + 0x28)(eax);
005f270e          int32_t* eax_1 = *(uint32_t*)this;
005f270e          
005f2712          if (eax_1 != 0)
005f2712          {
005f2717              *(uint32_t*)(*(uint32_t*)eax_1 + 8)(eax_1);
005f271a              *(uint32_t*)this = 0;
005f2712          }
005f2706      }
005f2706      
005f2720      return 0;
005f26fd  }


005f2721  void __thiscall D3DXTex::CLockSurface::~CLockSurface(D3DXTex::CLockSurface* this)

005f2721  {
005f2721      /* tailcall */
005f2721      return D3DXTex::CLockSurface::Unlock(this);
005f2721  }


005f2726  long __thiscall D3DXTex::CLockSurface::Lock(D3DXTex::CLockSurface* this, struct D3DX_BLT* arg2, struct IDirect3DSurface9* arg3, struct tagPALETTEENTRY const* arg4, struct tagRECT const* arg5, unsigned long arg6, unsigned long arg7)

005f2726  {
005f2730      int32_t edi;
005f2730      int32_t var_80 = edi;
005f2734      D3DXTex::CLockSurface::Unlock(this);
005f2743      int32_t var_74;
005f273c      arg3->vtable->GetDesc(arg3, &var_74);
005f274d      int32_t var_5c;
005f274d      int32_t var_58;
005f274d      int32_t left;
005f274d      int32_t var_40;
005f274d      int32_t var_3c;
005f274d      int32_t var_38;
005f274d      int32_t var_1c_1;
005f274d      int32_t var_8_1;
005f274d      
005f274d      if (arg5 == 0)
005f274d      {
005f27b4          var_3c = var_5c;
005f27ba          var_38 = var_58;
005f27c2          left = 0;
005f27c5          var_40 = 0;
005f27c8          var_8_1 = 0;
005f27ce          var_1c_1 = (!(arg7) & 1);
005f274d      }
005f274d      else
005f274d      {
005f2752          left = arg5->left;
005f2752          int32_t* edi_1 = &var_40;
005f2752          int32_t* esi_1 = &arg5->top;
005f2753          *(uint32_t*)edi_1 = ADJ(esi_1)->top;
005f2753          void* edi_2 = &edi_1[1];
005f2753          int32_t* esi_2 = &esi_1[1];
005f2754          *(uint32_t*)edi_2 = ADJ(esi_2)->right;
005f2755          *(uint32_t*)((char*)edi_2 + 4) = (&esi_2[1] - 0xc)->bottom;
005f2755          
005f2778          if ((((((left < 0 || var_3c > var_5c) || left > var_3c) || var_40 < 0) || var_38 > var_58) || var_40 > var_38))
005f27a7              return 0x8876086c;
005f27a7          
005f278a          if (((left == 0 && var_3c == var_5c) && var_40 == 0))
005f278f              var_8_1 = 0;
005f278f          
005f2792          if ((((left != 0 || var_3c != var_5c) || var_40 != 0) || var_38 != var_58))
005f2794              var_8_1 = 1;
005f2794          
005f27a0          if (((arg7 & 1) != 0 || var_8_1 != 0))
005f27a2              var_1c_1 = 0;
005f27a0          else
005f27ce              var_1c_1 = 1;
005f274d      }
005f274d      
005f27d4      int32_t eax_8 = (arg7 & 0x10000);
005f27dc      int32_t* var_14;
005f27dc      
005f27dc      if (eax_8 == 0)
005f298b          var_14 = arg3;
005f27dc      else
005f27dc      {
005f27e2          int32_t eax_9 = var_74;
005f27ed          int32_t edx_2 = var_58;
005f27f6          int32_t var_10_1 = 0;
005f27f6          
005f2815          if (((((eax_9 == 0x31545844 || eax_9 == 0x32545844) || eax_9 == 0x33545844) || eax_9 == 0x34545844) || eax_9 == 0x35545844))
005f2815          {
005f2819              int32_t eax_11 = (edx_2 | var_5c);
005f2819              
005f281d              if ((eax_11 & 3) != 0)
005f281d              {
005f282c                  do
005f281f                      var_10_1 += 1;
005f282c                   while ((((int8_t)(eax_11 << var_10_1)) & 3) != 0);
005f281d              }
005f2815          }
005f2815          
005f2834          arg3->vtable->GetDevice(arg3, ((char*)this + 0x10));
005f2846          int32_t var_68;
005f2846          int32_t ecx_2;
005f2846          ecx_2 = var_68 == 3;
005f2849          int32_t* eax_13 = *(uint32_t*)((char*)this + 0x10);
005f286d          long eax_14 = *(uint32_t*)(*(uint32_t*)eax_13 + 0x5c)(eax_13, (var_5c << var_10_1), (edx_2 << var_10_1), (var_10_1 + 1), 0, var_74, (ecx_2 + 2), ((char*)this + 0xc), 0);
005f2872          long var_c_1 = eax_14;
005f2875          long eax_16;
005f2875          
005f2875          if (eax_14 >= 0)
005f2875          {
005f287e              int32_t* eax_15 = *(uint32_t*)((char*)this + 0xc);
005f288a              eax_16 = *(uint32_t*)(*(uint32_t*)eax_15 + 0x48)(eax_15, var_10_1, ((char*)this + 8));
005f288f              var_c_1 = eax_16;
005f2875          }
005f2875          
005f2892          if ((eax_14 < 0 || eax_16 < 0))
005f2892          {
005f2978              int32_t* eax_29 = *(uint32_t*)((char*)this + 8);
005f2978              
005f297d              if (eax_29 != 0)
005f297d              {
005f2982                  *(uint32_t*)(*(uint32_t*)eax_29 + 8)(eax_29);
005f2985                  *(uint32_t*)((char*)this + 8) = 0;
005f297d              }
005f297d              
005f2948          label_5f2948:
005f2948              int32_t* eax_26 = *(uint32_t*)((char*)this + 0xc);
005f2948              
005f294c              if (eax_26 != 0)
005f294c              {
005f2951                  *(uint32_t*)(*(uint32_t*)eax_26 + 8)(eax_26);
005f2954                  *(uint32_t*)((char*)this + 0xc) = 0;
005f294c              }
005f294c              
005f2957              int32_t* eax_27 = *(uint32_t*)((char*)this + 0x10);
005f2957              
005f295b              if (eax_27 != 0)
005f295b              {
005f2960                  *(uint32_t*)(*(uint32_t*)eax_27 + 8)(eax_27);
005f2963                  *(uint32_t*)((char*)this + 0x10) = 0;
005f295b              }
005f295b              
005f2966              return var_c_1;
005f2892          }
005f2892          
005f289c          if (var_1c_1 != 0)
005f2970              var_14 = *(uint32_t*)((char*)this + 8);
005f289c          else
005f289c          {
005f28a2              var_14 = nullptr;
005f28a8              D3DXDebugMuteInt(1);
005f28b9              var_c_1 = D3DXTex::InternalCopy(arg3, *(uint32_t*)((char*)this + 8));
005f28bc              D3DXDebugMuteInt(0);
005f28bc              
005f28c5              if (var_c_1 >= 0)
005f2970                  var_14 = *(uint32_t*)((char*)this + 8);
005f28c5              else
005f28c5              {
005f28cf                  if (var_10_1 != 0)
005f28cf                      goto label_5f2939;
005f28cf                  
005f28d1                  int32_t* eax_18 = *(uint32_t*)((char*)this + 0x10);
005f28eb                  long eax_19 = *(uint32_t*)(*(uint32_t*)eax_18 + 0x70)(eax_18, var_5c, edx_2, var_74, 0, 0, 1, &var_14, 0);
005f28f0                  var_c_1 = eax_19;
005f28f0                  
005f28f3                  if (eax_19 < 0)
005f28f3                      goto label_5f2939;
005f28f3                  
005f28f5                  int32_t* eax_20 = *(uint32_t*)((char*)this + 0x10);
005f2905                  long eax_21 = *(uint32_t*)(*(uint32_t*)eax_20 + 0x88)(eax_20, arg3, 0, var_14, 0, 0);
005f290d                  var_c_1 = eax_21;
005f290d                  
005f2910                  if (eax_21 < 0)
005f2910                  {
005f2912                      int32_t* eax_22 = var_14;
005f2918                      *(uint32_t*)(*(uint32_t*)eax_22 + 8)(eax_22);
005f2939                  label_5f2939:
005f2939                      int32_t* eax_25 = *(uint32_t*)((char*)this + 8);
005f2939                      
005f293d                      if (eax_25 != 0)
005f293d                      {
005f2942                          *(uint32_t*)(*(uint32_t*)eax_25 + 8)(eax_25);
005f2945                          *(uint32_t*)((char*)this + 8) = 0;
005f293d                      }
005f293d                      
005f293d                      goto label_5f2948;
005f2910                  }
005f2910                  
005f2927                  var_c_1 = D3DXTex::InternalCopy(var_14, *(uint32_t*)((char*)this + 8));
005f292a                  int32_t* eax_24 = var_14;
005f2930                  *(uint32_t*)(*(uint32_t*)eax_24 + 8)(eax_24);
005f2930                  
005f2937                  if (var_c_1 < 0)
005f2937                      goto label_5f2939;
005f2937                  
005f2970                  var_14 = *(uint32_t*)((char*)this + 8);
005f28c5              }
005f289c          }
005f27dc      }
005f27dc      
005f299d      int32_t ebx_6 = (((((uint32_t)arg7) & 1) | 0x80) << 4);
005f29ae      char var_6b;
005f29ae      int32_t left_1;
005f29ae      int32_t var_50;
005f29ae      int32_t var_34;
005f29ae      
005f29ae      if (((var_1c_1 == 0 || eax_8 != 0) || (var_6b & 2) == 0))
005f29ae      {
005f2a15      label_5f2a15:
005f2a15          
005f2a15          if (var_8_1 != 0)
005f2a15          {
005f2a1b              int32_t eax_35 = var_74;
005f2a1b              
005f2a25              if (eax_35 <= 0x34545844)
005f2a25              {
005f2a35                  if (((eax_35 == 0x34545844 || eax_35 == 0x31545844) || eax_35 == 0x32545844))
005f2a27                      goto label_5f2a5e;
005f2a27                  
005f2a3c                  if (eax_35 == 0x32595559)
005f2a3c                      goto label_5f2ace;
005f2a3c                  
005f2a47                  if (eax_35 != 0x33545844)
005f2a47                      goto label_5f2ac2;
005f2a47                  
005f2a47                  goto label_5f2a5e;
005f2a25              }
005f2a25              
005f2aa5              int32_t var_48;
005f2aa5              bool cond:11_1;
005f2aa5              
005f2aa5              if (eax_35 == 0x35545844)
005f2aa5              {
005f2a5e              label_5f2a5e:
005f2a5e                  int32_t eax_38 = ((var_3c + 3) & 0xfffffffc);
005f2a60                  int32_t left_4 = (left & 0xfffffffc);
005f2a62                  int32_t esi_9 = (var_40 & 0xfffffffc);
005f2a64                  int32_t ecx_19 = ((var_38 + 3) & 0xfffffffc);
005f2a69                  left_1 = left_4;
005f2a6c                  int32_t var_4c_1 = eax_38;
005f2a6f                  var_50 = esi_9;
005f2a72                  var_48 = ecx_19;
005f2a72                  
005f2a75                  if (eax_38 > var_5c)
005f2a75                  {
005f2a77                      eax_38 = var_5c;
005f2a7a                      int32_t var_4c_2 = eax_38;
005f2a75                  }
005f2a75                  
005f2a80                  if (ecx_19 > var_58)
005f2a80                  {
005f2a82                      ecx_19 = var_58;
005f2a85                      var_48 = ecx_19;
005f2a80                  }
005f2a80                  
005f2a93                  if (((left_4 == 0 && eax_38 == var_5c) && esi_9 == 0))
005f2a93                  {
005f2a95                      cond:11_1 = ecx_19 != var_58;
005f2a95                      goto label_5f2a98;
005f2a93                  }
005f2a93                  
005f2b04                  var_8_1 = 1;
005f2aa5              }
005f2aa5              else if (((eax_35 == 0x42475247 || eax_35 == 0x47424752) || eax_35 == 0x59565955))
005f2aba              {
005f2ace              label_5f2ace:
005f2ace                  int32_t edx_8 = var_40;
005f2ad4                  int32_t left_3 = (left & 0xfffffffe);
005f2ad8                  int32_t eax_41 = ((var_3c + 1) & 0xfffffffe);
005f2ade                  left_1 = left_3;
005f2ae1                  int32_t var_4c_3 = eax_41;
005f2ae4                  var_50 = edx_8;
005f2ae7                  var_48 = var_38;
005f2ae7                  
005f2aea                  if (eax_41 > var_5c)
005f2aea                  {
005f2aec                      eax_41 = var_5c;
005f2aef                      int32_t var_4c_4 = eax_41;
005f2aea                  }
005f2aea                  
005f2afd                  if (((left_3 != 0 || eax_41 != var_5c) || edx_8 != 0))
005f2b04                      var_8_1 = 1;
005f2afd                  else
005f2afd                  {
005f2aff                      cond:11_1 = var_38 != var_58;
005f2a98                  label_5f2a98:
005f2a98                      
005f2a98                      if (cond:11_1)
005f2b04                          var_8_1 = 1;
005f2a98                      else
005f2a9a                          var_8_1 = 0;
005f2afd                  }
005f2aba              }
005f2aba              else
005f2aba              {
005f2ac2              label_5f2ac2:
005f2ac2                  left_1 = left;
005f2ac2                  int32_t* edi_13 = &var_50;
005f2ac2                  int32_t* esi_10 = &var_40;
005f2ac3                  *(uint32_t*)edi_13 = *(uint32_t*)esi_10;
005f2ac3                  void* edi_14 = &edi_13[1];
005f2ac3                  void* esi_11 = &esi_10[1];
005f2ac4                  *(uint32_t*)edi_14 = *(uint32_t*)esi_11;
005f2ac5                  *(uint32_t*)((char*)edi_14 + 4) = *(uint32_t*)((char*)esi_11 + 4);
005f2aba              }
005f2a15          }
005f2a15          
005f2b0f          if (eax_8 == 0)
005f2b0f              goto label_5f2b13;
005f2b0f          
005f2b68          int32_t* eax_46 = var_14;
005f2b6d          int32_t edx_14 = -(var_8_1);
005f2b7d          long eax_2 = *(uint32_t*)(*(uint32_t*)eax_46 + 0x34)(eax_46, &var_34, ((edx_14 - edx_14) & &left_1), ebx_6);
005f2b7d          
005f2b82          if (eax_2 < 0)
005f2c12              return eax_2;
005f29ae      }
005f29ae      else
005f29ae      {
005f29b4          if ((*(uint8_t*)((char*)arg7)[2] & 2) == 0)
005f29b4          {
005f29c6              D3DXDebugMuteInt(1);
005f29df              int32_t* var_20;
005f29df              
005f29df              if (arg3->vtable->GetContainer(arg3, 0x7f0420, &var_20) >= 0)
005f29df              {
005f29e1                  int32_t* eax_32 = var_20;
005f29e1                  
005f29ed                  if (*(uint32_t*)(*(uint32_t*)eax_32 + 0x34)(eax_32) == 1)
005f29ed                  {
005f29ef                      ebx_6 |= 0x2000;
005f29f5                      var_8_1 = 0;
005f29ed                  }
005f29ed                  
005f29f9                  int32_t* eax_34 = var_20;
005f29f9                  
005f29fe                  if (eax_34 != 0)
005f29fe                  {
005f2a03                      *(uint32_t*)(*(uint32_t*)eax_34 + 8)(eax_34);
005f2a06                      var_20 = nullptr;
005f29fe                  }
005f29df              }
005f29df              
005f2a0c              D3DXDebugMuteInt(0);
005f2a0c              goto label_5f2a15;
005f29b4          }
005f29b4          
005f29b6          ebx_6 |= 0x2000;
005f29bc          var_8_1 = 0;
005f2b13      label_5f2b13:
005f2b13          D3DXDebugMuteInt(1);
005f2b1b          int32_t* eax_42 = var_14;
005f2b20          int32_t edx_10 = -(var_8_1);
005f2b30          int32_t eax_43 = *(uint32_t*)(*(uint32_t*)eax_42 + 0x34)(eax_42, &var_34, ((edx_10 - edx_10) & &left_1), ebx_6);
005f2b37          D3DXDebugMuteInt(0);
005f2b37          
005f2b3e          if (eax_43 < 0)
005f2b5b              return D3DXTex::CLockSurface::Lock(this, arg2, arg3, arg4, arg5, arg6, (arg7 | 0x10000));
005f29ae      }
005f29ae      
005f2b8d      if (var_8_1 != 0)
005f2b8d      {
005f2b8f          int32_t left_2 = left_1;
005f2b92          left -= left_2;
005f2b95          int32_t var_3c_1 = (var_3c - left_2);
005f2b98          int32_t eax_47 = var_50;
005f2b9b          var_40 -= eax_47;
005f2b9e          int32_t var_38_1 = (var_38 - eax_47);
005f2b8d      }
005f2b8d      
005f2ba7      int32_t var_30;
005f2ba7      *(uint32_t*)arg2 = var_30;
005f2bac      *(uint32_t*)((char*)arg2 + 4) = var_74;
005f2bb2      *(uint32_t*)((char*)arg2 + 8) = var_34;
005f2bb8      *(uint32_t*)((char*)arg2 + 0x18) = var_5c;
005f2bbe      *(uint32_t*)((char*)arg2 + 0x1c) = var_58;
005f2bca      *(uint32_t*)((char*)arg2 + 0x28) = left;
005f2bca      void* edi_18 = ((char*)arg2 + 0x2c);
005f2bca      int32_t* esi_16 = &var_40;
005f2bcb      *(uint32_t*)((char*)arg2 + 0x24) = 1;
005f2bce      *(uint32_t*)edi_18 = *(uint32_t*)esi_16;
005f2bce      void* edi_19 = ((char*)edi_18 + 4);
005f2bce      void* esi_17 = &esi_16[1];
005f2bcf      *(uint32_t*)((char*)arg2 + 0x3c) = 1;
005f2bd2      *(uint32_t*)((char*)arg2 + 0x40) = 1;
005f2bd8      *(uint32_t*)((char*)arg2 + 0x4c) = arg6;
005f2bde      *(uint32_t*)edi_19 = *(uint32_t*)esi_17;
005f2bdf      *(uint32_t*)((char*)arg2 + 0xc) = 0;
005f2be2      *(uint32_t*)((char*)arg2 + 0x10) = 0;
005f2be5      *(uint32_t*)((char*)arg2 + 0x14) = 0;
005f2be8      *(uint32_t*)((char*)arg2 + 0x20) = 0;
005f2beb      *(uint32_t*)((char*)arg2 + 0x38) = 0;
005f2bee      *(uint32_t*)((char*)arg2 + 0x44) = 0;
005f2bf1      *(uint32_t*)((char*)arg2 + 0x48) = 0;
005f2bf7      *(uint32_t*)((char*)arg2 + 0x50) = arg4;
005f2c00      *(uint32_t*)((char*)edi_19 + 4) = *(uint32_t*)((char*)esi_17 + 4);
005f2c01      *(uint32_t*)((char*)this + 4) = arg3;
005f2c04      *(uint32_t*)this = arg7;
005f2c06      arg3->vtable->AddRef(arg3);
005f2c0c      return 0;
005f2726  }


005f2c15  void __thiscall D3DXTex::CLockVolume::~CLockVolume(D3DXTex::CLockVolume* this)

005f2c15  {
005f2c15      /* tailcall */
005f2c15      return D3DXTex::CLockVolume::Unlock(this);
005f2c15  }


005f2c1a  long __thiscall D3DXTex::CLockVolume::Lock(D3DXTex::CLockVolume* this, struct D3DX_BLT* arg2, struct IDirect3DVolume9* arg3, struct tagPALETTEENTRY const* arg4, struct _D3DBOX const* arg5, unsigned long arg6, unsigned long arg7)

005f2c1a  {
005f2c24      int32_t edi;
005f2c24      int32_t var_74 = edi;
005f2c24      
005f2c2c      if (*(uint32_t*)this != 0)
005f2c2e          D3DXTex::CLockVolume::Unlock(this);
005f2c2e      
005f2c3d      int32_t var_68;
005f2c36      arg3->vtable->GetDesc(arg3, &var_68);
005f2c45      int32_t var_58;
005f2c45      int32_t var_54;
005f2c45      int32_t var_50;
005f2c45      int32_t var_34;
005f2c45      int32_t var_30;
005f2c45      int32_t var_2c;
005f2c45      int32_t var_28;
005f2c45      int32_t var_24;
005f2c45      int32_t eax_2;
005f2c45      int32_t ebx_1;
005f2c45      
005f2c45      if (arg5 == 0)
005f2c45      {
005f2cc7          ebx_1 = var_50;
005f2cca          arg5 = nullptr;
005f2cce          var_2c = var_58;
005f2cd4          var_28 = var_54;
005f2cdc          eax_2 = (!(arg7) & 1);
005f2cdf          var_34 = 0;
005f2ce2          var_30 = 0;
005f2ce5          var_24 = 0;
005f2ce8          int32_t var_20_1 = ebx_1;
005f2c45      }
005f2c45      else
005f2c45      {
005f2c4d          __builtin_memcpy(&var_34, arg5, 0x18);
005f2c4d          
005f2c73          if ((((var_2c > var_58 || var_34 > var_2c) || var_28 > var_54) || var_30 > var_28))
005f2cfc              return 0x8876086c;
005f2cfc          
005f2c79          int32_t var_20;
005f2c79          ebx_1 = var_20;
005f2c79          
005f2c84          if ((ebx_1 > var_50 || var_24 > ebx_1))
005f2cfc              return 0x8876086c;
005f2cfc          
005f2c9f          if (((((var_34 == 0 && var_2c == var_58) && var_30 == 0) && var_28 == var_54) && var_24 == 0))
005f2ca4              arg5 = nullptr;
005f2ca4          
005f2ca7          if ((((((var_34 != 0 || var_2c != var_58) || var_30 != 0) || var_28 != var_54) || var_24 != 0) || ebx_1 != var_50))
005f2ca9              arg5 = 1;
005f2ca9          
005f2cb9          if (((arg7 & 1) != 0 || arg5 != 0))
005f2cc0              eax_2 = 0;
005f2cb9          else
005f2cbd              eax_2 = 1;
005f2c45      }
005f2c45      
005f2cfa      int32_t var_60;
005f2cfa      int32_t var_5c;
005f2cfa      
005f2cfa      if ((var_5c == 0 && (var_60 & 0x200) == 0))
005f2cfc          return 0x8876086c;
005f2cfc      
005f2d13      int32_t esi_4 = (((((uint32_t)arg7) & 1) | 0x80) << 4);
005f2d1a      int32_t var_c_1 = esi_4;
005f2d22      int32_t var_1c;
005f2d22      int32_t result;
005f2d22      
005f2d22      if ((eax_2 == 0 || (var_60 & 0x200) == 0))
005f2d22      {
005f2d82      label_5f2d82:
005f2d82          
005f2d85          if (arg5 == 0)
005f2d85              goto label_5f2e49;
005f2d85          
005f2d8b          int32_t ecx_5 = var_68;
005f2d8b          
005f2d95          if (ecx_5 <= 0x34545844)
005f2d95          {
005f2dab              if (((ecx_5 == 0x34545844 || ecx_5 == 0x31545844) || ecx_5 == 0x32545844))
005f2d9b                  goto label_5f2dda;
005f2d9b              
005f2db3              if (ecx_5 == 0x32595559)
005f2db3                  goto label_5f2e96;
005f2db3              
005f2dbf              if (ecx_5 != 0x33545844)
005f2dbf                  goto label_5f2e86;
005f2dbf              
005f2dbf              goto label_5f2dda;
005f2d95          }
005f2d95          
005f2e5f          int32_t var_4c;
005f2e5f          int32_t var_48;
005f2e5f          int32_t var_3c;
005f2e5f          
005f2e5f          if (ecx_5 == 0x35545844)
005f2e5f          {
005f2dda          label_5f2dda:
005f2dda              int32_t edx_2 = (var_34 & 0xfffffffc);
005f2ddc              int32_t eax_14 = ((var_2c + 3) & 0xfffffffc);
005f2dde              int32_t esi_6 = (var_30 & 0xfffffffc);
005f2de0              int32_t ecx_8 = ((var_28 + 3) & 0xfffffffc);
005f2de8              var_4c = edx_2;
005f2deb              int32_t var_44_1 = eax_14;
005f2dee              var_48 = esi_6;
005f2df1              int32_t var_40_1 = ecx_8;
005f2df4              var_3c = var_24;
005f2df7              int32_t var_38_1 = ebx_1;
005f2df7              
005f2dfa              if (eax_14 > var_58)
005f2dfa              {
005f2dfc                  eax_14 = var_58;
005f2dff                  int32_t var_44_2 = eax_14;
005f2dfa              }
005f2dfa              
005f2e05              if (ecx_8 > var_54)
005f2e05              {
005f2e07                  ecx_8 = var_54;
005f2e0a                  int32_t var_40_2 = ecx_8;
005f2e05              }
005f2e05              
005f2e26              if ((((((edx_2 == 0 && eax_14 == var_58) && esi_6 == 0) && ecx_8 == var_54) && var_24 == 0) && ebx_1 == var_50))
005f2e26              {
005f2e39                  esi_4 = var_c_1;
005f2e39                  goto label_5f2e49;
005f2e26              }
005f2e26              
005f2e28              arg5 = 1;
005f2e28              goto label_5f2e2f;
005f2e5f          }
005f2e5f          
005f2e7b          if (((ecx_5 == 0x42475247 || ecx_5 == 0x47424752) || ecx_5 == 0x59565955))
005f2e7b          {
005f2e96          label_5f2e96:
005f2e96              int32_t ecx_11 = (var_34 & 0xfffffffe);
005f2e9a              int32_t eax_18 = ((var_2c + 1) & 0xfffffffe);
005f2ea0              int32_t var_40_3 = var_28;
005f2ea6              var_4c = ecx_11;
005f2ea9              int32_t var_44_3 = eax_18;
005f2eac              var_48 = var_30;
005f2eaf              var_3c = var_24;
005f2eb2              int32_t var_38_2 = ebx_1;
005f2eb2              
005f2eb5              if (eax_18 > var_58)
005f2eb5              {
005f2eb7                  eax_18 = var_58;
005f2eba                  int32_t var_44_4 = eax_18;
005f2eb5              }
005f2eb5              
005f2ed9              if ((((((ecx_11 == 0 && eax_18 == var_58) && var_30 == 0) && var_28 == var_54) && var_24 == 0) && ebx_1 == var_50))
005f2ebf                  goto label_5f2e49;
005f2e7b          }
005f2e7b          else
005f2e7b          {
005f2e86          label_5f2e86:
005f2e86              __builtin_memcpy(&var_4c, &var_34, 0x18);
005f2e2f          label_5f2e2f:
005f2e2f              
005f2e33              if (arg5 == 0)
005f2e33              {
005f2e39                  esi_4 = var_c_1;
005f2e39                  goto label_5f2e49;
005f2e33              }
005f2e33              
005f2ee1              esi_4 = var_c_1;
005f2e7b          }
005f2e7b          
005f2ef3          result = arg3->vtable->LockBox(arg3, &var_1c, &var_4c, esi_4);
005f2ef3          
005f2ef8          if (result < 0)
005f2f8c              return result;
005f2f8c          
005f2efe          int32_t eax_21 = var_4c;
005f2f01          var_34 -= eax_21;
005f2f04          int32_t var_2c_1 = (var_2c - eax_21);
005f2f0a          int32_t var_30_1 = (var_30 - var_48);
005f2f0d          int32_t var_28_1 = (var_28 - var_48);
005f2f13          int32_t var_24_1 = (var_24 - var_3c);
005f2f18          int32_t var_20_2 = (ebx_1 - var_3c);
005f2d22      }
005f2d22      else
005f2d22      {
005f2d28          if ((*(uint8_t*)((char*)arg7)[2] & 2) == 0)
005f2d28          {
005f2d37              D3DXDebugMuteInt(1);
005f2d50              int32_t* var_8;
005f2d50              
005f2d50              if (arg3->vtable->GetContainer(arg3, 0x7f0410, &var_8) >= 0)
005f2d50              {
005f2d52                  int32_t* eax_9 = var_8;
005f2d52                  
005f2d5e                  if (*(uint32_t*)(*(uint32_t*)eax_9 + 0x34)(eax_9) == 1)
005f2d5e                  {
005f2d60                      esi_4 |= 0x2000;
005f2d66                      var_c_1 = esi_4;
005f2d69                      arg5 = nullptr;
005f2d5e                  }
005f2d5e                  
005f2d6c                  int32_t* eax_11 = var_8;
005f2d6c                  
005f2d71                  if (eax_11 != 0)
005f2d71                  {
005f2d76                      *(uint32_t*)(*(uint32_t*)eax_11 + 8)(eax_11);
005f2d79                      var_8 = nullptr;
005f2d71                  }
005f2d50              }
005f2d50              
005f2d7d              D3DXDebugMuteInt(0);
005f2d7d              goto label_5f2d82;
005f2d28          }
005f2d28          
005f2d2a          esi_4 |= 0x2000;
005f2e49      label_5f2e49:
005f2e49          result = arg3->vtable->LockBox(arg3, &var_1c, 0, esi_4);
005f2e49          
005f2e4e          if (result < 0)
005f2f8c              return result;
005f2d22      }
005f2f24      int32_t var_14;
005f2f24      *(uint32_t*)arg2 = var_14;
005f2f26      int32_t ecx_14 = var_68;
005f2f29      *(uint32_t*)((char*)arg2 + 0x44) = 0;
005f2f2d      *(uint32_t*)((char*)arg2 + 0x48) = 0;
005f2f31      *(uint32_t*)((char*)arg2 + 4) = ecx_14;
005f2f37      *(uint32_t*)((char*)arg2 + 8) = var_1c;
005f2f3d      int32_t var_18;
005f2f3d      *(uint32_t*)((char*)arg2 + 0xc) = var_18;
005f2f42      *(uint32_t*)((char*)arg2 + 0x10) = 0;
005f2f45      *(uint32_t*)((char*)arg2 + 0x14) = 0;
005f2f48      *(uint32_t*)((char*)arg2 + 0x20) = 0;
005f2f4e      *(uint32_t*)((char*)arg2 + 0x24) = var_50;
005f2f5a      __builtin_memcpy(((char*)arg2 + 0x28), &var_34, 0x18);
005f2f5f      *(uint32_t*)((char*)arg2 + 0x4c) = arg6;
005f2f65      *(uint32_t*)((char*)arg2 + 0x18) = var_58;
005f2f6b      *(uint32_t*)((char*)arg2 + 0x50) = arg4;
005f2f71      *(uint32_t*)((char*)arg2 + 0x1c) = var_54;
005f2f74      *(uint32_t*)((char*)arg2 + 0x40) = 1;
005f2f7e      *(uint32_t*)this = arg3;
005f2f80      arg3->vtable->AddRef(arg3);
005f2f86      return 0;
005f2c1a  }


005f2f8f  void __thiscall D3DXTex::CCodec::~CCodec(D3DXTex::CCodec* this)

005f2f8f  {
005f2f94      void* var_8 = *(uint32_t*)((char*)this + 0x38);
005f2f97      *(uint32_t*)this = 0x7ecdc0;
005f2f9d      operator delete(var_8);
005f2fa5      operator delete(*(uint32_t*)((char*)this + 0x58));
005f2fad      operator delete(*(uint32_t*)((char*)this + 0x5c));
005f2f8f  }


005f2fb7  void __thiscall D3DXTex::CCodec::Decode(D3DXTex::CCodec* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4) __pure

005f2fb7  {
005f2fb7      return;
005f2fb7  }


005f2fba  struct D3DXCOLOR* __thiscall D3DXTex::CCodec::Convert(D3DXTex::CCodec* this, struct D3DXCOLOR* arg2)

005f2fba  {
005f2fbf      int32_t eax = *(uint32_t*)((char*)this + 8);
005f2fc5      int32_t edi;
005f2fc5      int32_t var_10 = edi;
005f2fc6      long double x87_r6_1;
005f2fc6      
005f2fc6      if (eax == 1)
005f2fc6      {
005f3325          int32_t eax_31 = (*(uint32_t*)((char*)this + 0x54) - 1);
005f3325          
005f3327          if (eax_31 == 1)
005f3327          {
005f346b              int32_t i = 0;
005f346b              
005f3470              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f3470              {
005f3475                  long double x87_r7_19 = ((long double)1f);
005f347b                  x87_r6_1 = ((long double)0.5f);
005f3481                  float* edx_9 = nullptr;
005f3483                  void* eax_42 = &arg2->b;
005f3483                  
005f34c2                  do
005f34c2                  {
005f348e                      i += 1;
005f3491                      *(uint32_t*)((char*)edx_9 + *(uint32_t*)((char*)this + 0x58)) = ((float)((((long double)*(uint32_t*)((char*)eax_42 - 8)) + x87_r7_19) * x87_r6_1));
005f349a                      edx_9 = &edx_9[4];
005f34a1                      *(uint32_t*)(((char*)edx_9 + *(uint32_t*)((char*)this + 0x58)) - 0xc) = ((float)((((long double)*(uint32_t*)((char*)eax_42 - 4)) + x87_r7_19) * x87_r6_1));
005f34a8                      long double x87_r5_57 = ((long double)*(uint32_t*)eax_42);
005f34aa                      eax_42 += 0x10;
005f34b1                      *(uint32_t*)(((char*)edx_9 + *(uint32_t*)((char*)this + 0x58)) - 8) = ((float)((x87_r5_57 + x87_r7_19) * x87_r6_1));
005f34bb                      *(uint32_t*)(((char*)edx_9 + *(uint32_t*)((char*)this + 0x58)) - 4) = ((float)((long double)*(uint32_t*)((char*)eax_42 - 0xc)));
005f34c2                  } while (i < *(uint32_t*)((char*)this + 0x68));
005f3470              }
005f3327          }
005f3327          else if (eax_31 == 2)
005f332e          {
005f3408              int32_t i_1 = 0;
005f3408              
005f340d              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f340d              {
005f3416                  long double x87_r7_18 = ((long double)1f);
005f341c                  x87_r6_1 = ((long double)0.5f);
005f3422                  float* edx_8 = nullptr;
005f3424                  float* eax_40 = &arg2->b;
005f3424                  
005f3467                  do
005f3467                  {
005f342f                      i_1 += 1;
005f3432                      *(uint32_t*)((char*)edx_8 + *(uint32_t*)((char*)this + 0x58)) = ((float)((((long double)eax_40[-2]) + x87_r7_18) * x87_r6_1));
005f343b                      edx_8 = &edx_8[4];
005f3442                      *(uint32_t*)(((char*)edx_8 + *(uint32_t*)((char*)this + 0x58)) - 0xc) = ((float)((((long double)eax_40[-1]) + x87_r7_18) * x87_r6_1));
005f3449                      long double x87_r5_45 = ((long double)*(uint32_t*)eax_40);
005f344b                      eax_40 = &eax_40[4];
005f3452                      *(uint32_t*)(((char*)edx_8 + *(uint32_t*)((char*)this + 0x58)) - 8) = ((float)((x87_r5_45 + x87_r7_18) * x87_r6_1));
005f3460                      *(uint32_t*)(((char*)edx_8 + *(uint32_t*)((char*)this + 0x58)) - 4) = ((float)((((long double)eax_40[-3]) + x87_r7_18) * x87_r6_1));
005f3467                  } while (i_1 < *(uint32_t*)((char*)this + 0x68));
005f340d              }
005f332e          }
005f332e          else if (eax_31 == 3)
005f3335          {
005f333b              int32_t i_2 = 0;
005f333b              
005f3340              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f3340              {
005f3349                  long double x87_r7_17 = ((long double)1f);
005f3352                  void* edx_7 = &arg2->b;
005f3352                  
005f33fd                  do
005f33fd                  {
005f3357                      long double x87_r6_2 = ((long double)0);
005f3359                      long double temp13_1 = ((long double)*(uint32_t*)((char*)edx_7 - 8));
005f3359                      (x87_r6_2 - temp13_1);
005f335c                      struct D3DXCOLOR* eax_35;
005f335c                      eax_35 = ((((x87_r6_2 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == temp13_1) ? 1 : 0) << 0xe) | 0x3800))));
005f3361                      long double x87_r6_3;
005f3361                      
005f3361                      if ((*(uint8_t*)((char*)eax_35)[1] & 0x41) != 0)
005f3361                      {
005f3367                          long double temp14_1 = ((long double)*(uint32_t*)((char*)edx_7 - 8));
005f3367                          (x87_r7_17 - temp14_1);
005f336a                          eax_35 = ((((x87_r7_17 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp14_1) ? 1 : 0) << 0xe) | 0x3800))));
005f336a                          
005f336f                          if ((*(uint8_t*)((char*)eax_35)[1] & 0x41) != 0)
005f3376                              x87_r6_3 = ((long double)1);
005f336f                          else
005f3371                              x87_r6_3 = ((long double)*(uint32_t*)((char*)edx_7 - 8));
005f3361                      }
005f3361                      else
005f3363                          x87_r6_3 = ((long double)0);
005f3363                      
005f337b                      void* esi_3 = ((0xfffffff8 - arg2) + edx_7);
005f337e                      *(uint32_t*)((char*)esi_3 + *(uint32_t*)((char*)this + 0x58)) = ((float)x87_r6_3);
005f3381                      long double x87_r6_4 = ((long double)0);
005f3383                      long double temp16_1 = ((long double)*(uint32_t*)((char*)edx_7 - 4));
005f3383                      (x87_r6_4 - temp16_1);
005f3386                      int32_t eax_36;
005f3386                      eax_36 = ((((x87_r6_4 < temp16_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, temp16_1))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == temp16_1) ? 1 : 0) << 0xe) | 0x3800))));
005f338b                      long double x87_r6_5;
005f338b                      
005f338b                      if ((*(uint8_t*)((char*)eax_36)[1] & 0x41) != 0)
005f338b                      {
005f3391                          long double temp19_1 = ((long double)*(uint32_t*)((char*)edx_7 - 4));
005f3391                          (x87_r7_17 - temp19_1);
005f3394                          eax_36 = ((((x87_r7_17 < temp19_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp19_1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp19_1) ? 1 : 0) << 0xe) | 0x3800))));
005f3394                          
005f3399                          if ((*(uint8_t*)((char*)eax_36)[1] & 0x41) != 0)
005f33a0                              x87_r6_5 = ((long double)1);
005f3399                          else
005f339b                              x87_r6_5 = ((long double)*(uint32_t*)((char*)edx_7 - 4));
005f338b                      }
005f338b                      else
005f338d                          x87_r6_5 = ((long double)0);
005f338d                      
005f33a5                      *(uint32_t*)(((char*)esi_3 + *(uint32_t*)((char*)this + 0x58)) + 4) = ((float)x87_r6_5);
005f33a9                      long double x87_r6_6 = ((long double)0);
005f33ab                      long double temp22_1 = ((long double)*(uint32_t*)edx_7);
005f33ab                      (x87_r6_6 - temp22_1);
005f33ad                      int32_t eax_37;
005f33ad                      eax_37 = ((((x87_r6_6 < temp22_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_6, temp22_1))) ? 1 : 0) << 0xa) | ((((x87_r6_6 == temp22_1) ? 1 : 0) << 0xe) | 0x3800))));
005f33b2                      long double x87_r6_7;
005f33b2                      
005f33b2                      if ((*(uint8_t*)((char*)eax_37)[1] & 0x41) != 0)
005f33b2                      {
005f33b8                          long double temp25_1 = ((long double)*(uint32_t*)edx_7);
005f33b8                          (x87_r7_17 - temp25_1);
005f33ba                          eax_37 = ((((x87_r7_17 < temp25_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp25_1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp25_1) ? 1 : 0) << 0xe) | 0x3800))));
005f33ba                          
005f33bf                          if ((*(uint8_t*)((char*)eax_37)[1] & 0x41) != 0)
005f33c5                              x87_r6_7 = ((long double)1);
005f33bf                          else
005f33c1                              x87_r6_7 = ((long double)*(uint32_t*)edx_7);
005f33b2                      }
005f33b2                      else
005f33b4                          x87_r6_7 = ((long double)0);
005f33b4                      
005f33ca                      *(uint32_t*)(((char*)esi_3 + *(uint32_t*)((char*)this + 0x58)) + 8) = ((float)x87_r6_7);
005f33ce                      long double x87_r6_8 = ((long double)0);
005f33d0                      long double temp28_1 = ((long double)*(uint32_t*)((char*)edx_7 + 4));
005f33d0                      (x87_r6_8 - temp28_1);
005f33d3                      int32_t eax_38;
005f33d3                      eax_38 = ((((x87_r6_8 < temp28_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_8, temp28_1))) ? 1 : 0) << 0xa) | ((((x87_r6_8 == temp28_1) ? 1 : 0) << 0xe) | 0x3800))));
005f33d8                      long double x87_r6_9;
005f33d8                      
005f33d8                      if ((*(uint8_t*)((char*)eax_38)[1] & 0x41) != 0)
005f33d8                      {
005f33de                          long double temp31_1 = ((long double)*(uint32_t*)((char*)edx_7 + 4));
005f33de                          (x87_r7_17 - temp31_1);
005f33e1                          eax_38 = ((((x87_r7_17 < temp31_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_17, temp31_1))) ? 1 : 0) << 0xa) | ((((x87_r7_17 == temp31_1) ? 1 : 0) << 0xe) | 0x3800))));
005f33e1                          
005f33e6                          if ((*(uint8_t*)((char*)eax_38)[1] & 0x41) != 0)
005f33ed                              x87_r6_9 = ((long double)1);
005f33e6                          else
005f33e8                              x87_r6_9 = ((long double)*(uint32_t*)((char*)edx_7 + 4));
005f33d8                      }
005f33d8                      else
005f33da                          x87_r6_9 = ((long double)0);
005f33da                      
005f33f2                      i_2 += 1;
005f33f3                      *(uint32_t*)(&*(uint32_t*)((char*)this + 0x58)->a + esi_3) = ((float)x87_r6_9);
005f33f7                      edx_7 += 0x10;
005f33fd                  } while (i_2 < *(uint32_t*)((char*)this + 0x68));
005f3340              }
005f3335          }
005f2fc6      }
005f2fc6      else if (eax == 2)
005f2fcd      {
005f317e          int32_t eax_17 = *(uint32_t*)((char*)this + 0x54);
005f317e          
005f3182          if (eax_17 == 1)
005f3182          {
005f32c0              int32_t i_3 = 0;
005f32c0              
005f32c5              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f32c5              {
005f32ce                  long double x87_r7_16 = ((long double)1f);
005f32d4                  x87_r6_1 = ((long double)2f);
005f32da                  float* edx_6 = nullptr;
005f32dc                  float* eax_29 = &arg2->b;
005f32dc                  
005f331b                  do
005f331b                  {
005f32e7                      i_3 += 1;
005f32ea                      *(uint32_t*)((char*)edx_6 + *(uint32_t*)((char*)this + 0x58)) = ((float)((((long double)ADJ(eax_29)->r) * x87_r6_1) - x87_r7_16));
005f32f3                      edx_6 = &edx_6[4];
005f32fa                      *(uint32_t*)(((char*)edx_6 + *(uint32_t*)((char*)this + 0x58)) - 0xc) = ((float)((((long double)ADJ(eax_29)->g) * x87_r6_1) - x87_r7_16));
005f3301                      long double x87_r5_35 = ((long double)ADJ(eax_29)->b);
005f3303                      eax_29 = &eax_29[4];
005f330a                      *(uint32_t*)(((char*)edx_6 + *(uint32_t*)((char*)this + 0x58)) - 8) = ((float)((x87_r5_35 * x87_r6_1) - x87_r7_16));
005f3314                      *(uint32_t*)(((char*)edx_6 + *(uint32_t*)((char*)this + 0x58)) - 4) = ((float)((long double)ADJ(eax_29)->r));
005f331b                  } while (i_3 < *(uint32_t*)((char*)this + 0x68));
005f32c5              }
005f3182          }
005f3182          else if (eax_17 == 3)
005f318a          {
005f326a              int32_t i_4 = 0;
005f326a              
005f326f              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f326f              {
005f3278                  float* edx_5 = nullptr;
005f327a                  float* eax_27 = &arg2->b;
005f327a                  
005f32b9                  do
005f32b9                  {
005f3283                      *(uint32_t*)((char*)edx_5 + *(uint32_t*)((char*)this + 0x58)) = ((float)((long double)ADJ(eax_27)->r));
005f328c                      i_4 += 1;
005f328d                      *(uint32_t*)(((char*)edx_5 + *(uint32_t*)((char*)this + 0x58)) + 4) = ((float)((long double)ADJ(eax_27)->g));
005f3296                      edx_5 = &edx_5[4];
005f3299                      *(uint32_t*)(((char*)edx_5 + *(uint32_t*)((char*)this + 0x58)) - 8) = ((float)((long double)ADJ(eax_27)->b));
005f32a0                      long double x87_r7_13 = ((long double)ADJ(eax_27)->a);
005f32a3                      eax_27 = &eax_27[4];
005f32b2                      *(uint32_t*)(((char*)edx_5 + *(uint32_t*)((char*)this + 0x58)) - 4) = ((float)((x87_r7_13 + ((long double)1f)) * ((long double)0.5f)));
005f32b9                  } while (i_4 < *(uint32_t*)((char*)this + 0x68));
005f326f              }
005f318a          }
005f318a          else if (eax_17 == 4)
005f3191          {
005f3197              int32_t i_5 = 0;
005f3197              
005f319c              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f319c              {
005f31a5                  long double x87_r7_9 = ((long double)-1f);
005f31ab                  x87_r6_1 = ((long double)1f);
005f31b4                  float* edx_4 = &arg2->b;
005f31b4                  
005f325f                  do
005f325f                  {
005f31bb                      long double temp15_1 = ((long double)ADJ(edx_4)->r);
005f31bb                      (x87_r7_9 - temp15_1);
005f31be                      struct D3DXCOLOR* eax_22;
005f31be                      eax_22 = ((((x87_r7_9 < temp15_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp15_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp15_1) ? 1 : 0) << 0xe) | 0x3000))));
005f31c3                      long double x87_r5_22;
005f31c3                      
005f31c3                      if ((*(uint8_t*)((char*)eax_22)[1] & 0x41) != 0)
005f31c3                      {
005f31c9                          long double temp17_1 = ((long double)ADJ(edx_4)->r);
005f31c9                          (x87_r6_1 - temp17_1);
005f31cc                          eax_22 = ((((x87_r6_1 < temp17_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp17_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp17_1) ? 1 : 0) << 0xe) | 0x3000))));
005f31cc                          
005f31d1                          if ((*(uint8_t*)((char*)eax_22)[1] & 0x41) != 0)
005f31d8                              x87_r5_22 = ((long double)1);
005f31d1                          else
005f31d3                              x87_r5_22 = ((long double)ADJ(edx_4)->r);
005f31c3                      }
005f31c3                      else
005f31c5                          x87_r5_22 = x87_r7_9;
005f31c5                      
005f31dd                      float* esi_2 = ((char*)edx_4 + (0xfffffff8 - arg2));
005f31e0                      *(uint32_t*)((char*)esi_2 + *(uint32_t*)((char*)this + 0x58)) = ((float)x87_r5_22);
005f31e5                      long double temp20_1 = ((long double)ADJ(edx_4)->g);
005f31e5                      (x87_r7_9 - temp20_1);
005f31e8                      int32_t eax_23;
005f31e8                      eax_23 = ((((x87_r7_9 < temp20_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp20_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp20_1) ? 1 : 0) << 0xe) | 0x3000))));
005f31ed                      long double x87_r5_24;
005f31ed                      
005f31ed                      if ((*(uint8_t*)((char*)eax_23)[1] & 0x41) != 0)
005f31ed                      {
005f31f3                          long double temp23_1 = ((long double)ADJ(edx_4)->g);
005f31f3                          (x87_r6_1 - temp23_1);
005f31f6                          eax_23 = ((((x87_r6_1 < temp23_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp23_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp23_1) ? 1 : 0) << 0xe) | 0x3000))));
005f31f6                          
005f31fb                          if ((*(uint8_t*)((char*)eax_23)[1] & 0x41) != 0)
005f3202                              x87_r5_24 = ((long double)1);
005f31fb                          else
005f31fd                              x87_r5_24 = ((long double)ADJ(edx_4)->g);
005f31ed                      }
005f31ed                      else
005f31ef                          x87_r5_24 = x87_r7_9;
005f31ef                      
005f3207                      *(uint32_t*)(((char*)esi_2 + *(uint32_t*)((char*)this + 0x58)) + 4) = ((float)x87_r5_24);
005f320d                      long double temp26_1 = ((long double)ADJ(edx_4)->b);
005f320d                      (x87_r7_9 - temp26_1);
005f320f                      int32_t eax_24;
005f320f                      eax_24 = ((((x87_r7_9 < temp26_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_9, temp26_1))) ? 1 : 0) << 0xa) | ((((x87_r7_9 == temp26_1) ? 1 : 0) << 0xe) | 0x3000))));
005f3214                      long double x87_r5_26;
005f3214                      
005f3214                      if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) != 0)
005f3214                      {
005f321a                          long double temp29_1 = ((long double)ADJ(edx_4)->b);
005f321a                          (x87_r6_1 - temp29_1);
005f321c                          eax_24 = ((((x87_r6_1 < temp29_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp29_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp29_1) ? 1 : 0) << 0xe) | 0x3000))));
005f321c                          
005f3221                          if ((*(uint8_t*)((char*)eax_24)[1] & 0x41) != 0)
005f3227                              x87_r5_26 = ((long double)1);
005f3221                          else
005f3223                              x87_r5_26 = ((long double)ADJ(edx_4)->b);
005f3214                      }
005f3214                      else
005f3216                          x87_r5_26 = x87_r7_9;
005f3216                      
005f322c                      *(uint32_t*)(((char*)esi_2 + *(uint32_t*)((char*)this + 0x58)) + 8) = ((float)x87_r5_26);
005f3230                      long double x87_r5_27 = ((long double)0);
005f3232                      long double temp32_1 = ((long double)ADJ(edx_4)->a);
005f3232                      (x87_r5_27 - temp32_1);
005f3235                      int32_t eax_25;
005f3235                      eax_25 = ((((x87_r5_27 < temp32_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_27, temp32_1))) ? 1 : 0) << 0xa) | ((((x87_r5_27 == temp32_1) ? 1 : 0) << 0xe) | 0x3000))));
005f323a                      long double x87_r5_28;
005f323a                      
005f323a                      if ((*(uint8_t*)((char*)eax_25)[1] & 0x41) != 0)
005f323a                      {
005f3240                          long double temp34_1 = ((long double)ADJ(edx_4)->a);
005f3240                          (x87_r6_1 - temp34_1);
005f3243                          eax_25 = ((((x87_r6_1 < temp34_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp34_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp34_1) ? 1 : 0) << 0xe) | 0x3000))));
005f3243                          
005f3248                          if ((*(uint8_t*)((char*)eax_25)[1] & 0x41) != 0)
005f324f                              x87_r5_28 = ((long double)1);
005f3248                          else
005f324a                              x87_r5_28 = ((long double)ADJ(edx_4)->a);
005f323a                      }
005f323a                      else
005f323c                          x87_r5_28 = ((long double)0);
005f323c                      
005f3254                      i_5 += 1;
005f3255                      *(uint32_t*)(&*(uint32_t*)((char*)this + 0x58)->a + esi_2) = ((float)x87_r5_28);
005f3259                      edx_4 = &edx_4[4];
005f325f                  } while (i_5 < *(uint32_t*)((char*)this + 0x68));
005f319c              }
005f3191          }
005f2fcd      }
005f2fcd      else if (eax == 3)
005f2fd4      {
005f2fda          int32_t eax_4 = *(uint32_t*)((char*)this + 0x54);
005f2fda          
005f2fde          if (eax_4 == 1)
005f2fde          {
005f3118              int32_t i_6 = 0;
005f3118              
005f311d              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f311d              {
005f3126                  long double x87_r7_8 = ((long double)1f);
005f312c                  x87_r6_1 = ((long double)2f);
005f3132                  float* edx_3 = nullptr;
005f3134                  float* eax_16 = &arg2->b;
005f3134                  
005f3177                  do
005f3177                  {
005f313f                      i_6 += 1;
005f3142                      *(uint32_t*)((char*)edx_3 + *(uint32_t*)((char*)this + 0x58)) = ((float)((((long double)ADJ(eax_16)->r) * x87_r6_1) - x87_r7_8));
005f314b                      edx_3 = &edx_3[4];
005f3152                      *(uint32_t*)(((char*)edx_3 + *(uint32_t*)((char*)this + 0x58)) - 0xc) = ((float)((((long double)ADJ(eax_16)->g) * x87_r6_1) - x87_r7_8));
005f3159                      long double x87_r5_15 = ((long double)ADJ(eax_16)->b);
005f315b                      eax_16 = &eax_16[4];
005f3162                      *(uint32_t*)(((char*)edx_3 + *(uint32_t*)((char*)this + 0x58)) - 8) = ((float)((x87_r5_15 * x87_r6_1) - x87_r7_8));
005f3170                      *(uint32_t*)(((char*)edx_3 + *(uint32_t*)((char*)this + 0x58)) - 4) = ((float)((((long double)ADJ(eax_16)->r) * x87_r6_1) - x87_r7_8));
005f3177                  } while (i_6 < *(uint32_t*)((char*)this + 0x68));
005f311d              }
005f2fde          }
005f2fde          else if (eax_4 == 2)
005f2fe5          {
005f30c6              int32_t i_7 = 0;
005f30c6              
005f30cb              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f30cb              {
005f30d4                  float* edx_2 = nullptr;
005f30d6                  float* eax_14 = &arg2->b;
005f30d6                  
005f3111                  do
005f3111                  {
005f30df                      *(uint32_t*)((char*)edx_2 + *(uint32_t*)((char*)this + 0x58)) = ((float)((long double)ADJ(eax_14)->r));
005f30e8                      i_7 += 1;
005f30e9                      *(uint32_t*)(((char*)edx_2 + *(uint32_t*)((char*)this + 0x58)) + 4) = ((float)((long double)ADJ(eax_14)->g));
005f30f2                      edx_2 = &edx_2[4];
005f30f5                      *(uint32_t*)(((char*)edx_2 + *(uint32_t*)((char*)this + 0x58)) - 8) = ((float)((long double)ADJ(eax_14)->b));
005f30fc                      long double x87_r7_5 = ((long double)ADJ(eax_14)->a);
005f30ff                      eax_14 = &eax_14[4];
005f310a                      *(uint32_t*)(((char*)edx_2 + *(uint32_t*)((char*)this + 0x58)) - 4) = ((float)((x87_r7_5 + x87_r7_5) - ((long double)1f)));
005f3111                  } while (i_7 < *(uint32_t*)((char*)this + 0x68));
005f30cb              }
005f2fe5          }
005f2fe5          else if (eax_4 == 4)
005f2fed          {
005f2ff3              int32_t i_8 = 0;
005f2ff3              
005f2ff8              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f2ff8              {
005f3001                  long double x87_r7_1 = ((long double)-1f);
005f3007                  x87_r6_1 = ((long double)1f);
005f3010                  float* edx_1 = &arg2->b;
005f3010                  
005f30bb                  do
005f30bb                  {
005f3017                      long double temp18_1 = ((long double)ADJ(edx_1)->r);
005f3017                      (x87_r7_1 - temp18_1);
005f301a                      struct D3DXCOLOR* eax_9;
005f301a                      eax_9 = ((((x87_r7_1 < temp18_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp18_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp18_1) ? 1 : 0) << 0xe) | 0x3000))));
005f301f                      long double x87_r5_2;
005f301f                      
005f301f                      if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
005f301f                      {
005f3025                          long double temp21_1 = ((long double)ADJ(edx_1)->r);
005f3025                          (x87_r6_1 - temp21_1);
005f3028                          eax_9 = ((((x87_r6_1 < temp21_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp21_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp21_1) ? 1 : 0) << 0xe) | 0x3000))));
005f3028                          
005f302d                          if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
005f3034                              x87_r5_2 = ((long double)1);
005f302d                          else
005f302f                              x87_r5_2 = ((long double)ADJ(edx_1)->r);
005f301f                      }
005f301f                      else
005f3021                          x87_r5_2 = x87_r7_1;
005f3021                      
005f3039                      float* esi_1 = ((0xfffffff8 - arg2) + edx_1);
005f303c                      *(uint32_t*)((char*)esi_1 + *(uint32_t*)((char*)this + 0x58)) = ((float)x87_r5_2);
005f3041                      long double temp24_1 = ((long double)ADJ(edx_1)->g);
005f3041                      (x87_r7_1 - temp24_1);
005f3044                      int32_t eax_10;
005f3044                      eax_10 = ((((x87_r7_1 < temp24_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp24_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp24_1) ? 1 : 0) << 0xe) | 0x3000))));
005f3049                      long double x87_r5_4;
005f3049                      
005f3049                      if ((*(uint8_t*)((char*)eax_10)[1] & 0x41) != 0)
005f3049                      {
005f304f                          long double temp27_1 = ((long double)ADJ(edx_1)->g);
005f304f                          (x87_r6_1 - temp27_1);
005f3052                          eax_10 = ((((x87_r6_1 < temp27_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp27_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp27_1) ? 1 : 0) << 0xe) | 0x3000))));
005f3052                          
005f3057                          if ((*(uint8_t*)((char*)eax_10)[1] & 0x41) != 0)
005f305e                              x87_r5_4 = ((long double)1);
005f3057                          else
005f3059                              x87_r5_4 = ((long double)ADJ(edx_1)->g);
005f3049                      }
005f3049                      else
005f304b                          x87_r5_4 = x87_r7_1;
005f304b                      
005f3063                      *(uint32_t*)(((char*)esi_1 + *(uint32_t*)((char*)this + 0x58)) + 4) = ((float)x87_r5_4);
005f3069                      long double temp30_1 = ((long double)ADJ(edx_1)->b);
005f3069                      (x87_r7_1 - temp30_1);
005f306b                      int32_t eax_11;
005f306b                      eax_11 = ((((x87_r7_1 < temp30_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp30_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp30_1) ? 1 : 0) << 0xe) | 0x3000))));
005f3070                      long double x87_r5_6;
005f3070                      
005f3070                      if ((*(uint8_t*)((char*)eax_11)[1] & 0x41) != 0)
005f3070                      {
005f3076                          long double temp33_1 = ((long double)ADJ(edx_1)->b);
005f3076                          (x87_r6_1 - temp33_1);
005f3078                          eax_11 = ((((x87_r6_1 < temp33_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp33_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp33_1) ? 1 : 0) << 0xe) | 0x3000))));
005f3078                          
005f307d                          if ((*(uint8_t*)((char*)eax_11)[1] & 0x41) != 0)
005f3083                              x87_r5_6 = ((long double)1);
005f307d                          else
005f307f                              x87_r5_6 = ((long double)ADJ(edx_1)->b);
005f3070                      }
005f3070                      else
005f3072                          x87_r5_6 = x87_r7_1;
005f3072                      
005f3088                      *(uint32_t*)(((char*)esi_1 + *(uint32_t*)((char*)this + 0x58)) + 8) = ((float)x87_r5_6);
005f308e                      long double temp35_1 = ((long double)ADJ(edx_1)->a);
005f308e                      (x87_r7_1 - temp35_1);
005f3091                      int32_t eax_12;
005f3091                      eax_12 = ((((x87_r7_1 < temp35_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp35_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp35_1) ? 1 : 0) << 0xe) | 0x3000))));
005f3096                      long double x87_r5_8;
005f3096                      
005f3096                      if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) != 0)
005f3096                      {
005f309c                          long double temp36_1 = ((long double)ADJ(edx_1)->a);
005f309c                          (x87_r6_1 - temp36_1);
005f309f                          eax_12 = ((((x87_r6_1 < temp36_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp36_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp36_1) ? 1 : 0) << 0xe) | 0x3000))));
005f309f                          
005f30a4                          if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) != 0)
005f30ab                              x87_r5_8 = ((long double)1);
005f30a4                          else
005f30a6                              x87_r5_8 = ((long double)ADJ(edx_1)->a);
005f3096                      }
005f3096                      else
005f3098                          x87_r5_8 = x87_r7_1;
005f3098                      
005f30b0                      i_8 += 1;
005f30b1                      *(uint32_t*)(&*(uint32_t*)((char*)this + 0x58)->a + esi_1) = ((float)x87_r5_8);
005f30b5                      edx_1 = &edx_1[4];
005f30bb                  } while (i_8 < *(uint32_t*)((char*)this + 0x68));
005f2ff8              }
005f2fed          }
005f2fd4      }
005f34cf      return *(uint32_t*)((char*)this + 0x58);
005f2fba  }


005f34d2  void __thiscall D3DXTex::CCodecYUV::QuantizeColorKey(D3DXTex::CCodecYUV* this) __pure

005f34d2  {
005f34d2      return;
005f34d2  }


005f34d3  long __thiscall D3DXTex::CCodecYUV::Commit(D3DXTex::CCodecYUV* this)

005f34d3  {
005f34f2      if ((*(uint32_t*)((char*)this + 0xa0) != 0 && *(uint32_t*)((char*)this + 0xa4) != 0))
005f34f2      {
005f350c          void* edx_1 = *(uint32_t*)((char*)this + 0x80);
005f351b          int32_t edi;
005f351b          int32_t var_38_1 = edi;
005f351f          void* edi_2 = ((((*(uint32_t*)((char*)this + 0x94) * *(uint32_t*)((char*)this + 0x64)) + (*(uint32_t*)((char*)this + 0x88) * *(uint32_t*)((char*)this + 0x60))) + (*(uint32_t*)((char*)this + 0x84) << 1)) + *(uint32_t*)((char*)this + 0x20));
005f3522          int16_t x87control;
005f3522          int16_t x87status_1;
005f3522          int16_t temp0_1;
005f3522          temp0_1 = __fnstcw_memmem16(x87control);
005f3530          int16_t x87control_1;
005f3530          int16_t x87status_2;
005f3530          x87control_1 = __fldcw_memmem16((temp0_1 | 0xc00));
005f3536          *(uint32_t*)((char*)this + 0x7c) = temp0_1;
005f3539          int32_t eax_7 = *(uint32_t*)((char*)this + 4);
005f3541          int16_t var_10_1;
005f3541          
005f3541          if (eax_7 == 0x32595559)
005f3541          {
005f355c          label_5f355c:
005f355c              int32_t i = *(uint32_t*)((char*)this + 0x84);
005f3562              var_10_1 = i;
005f3562              
005f37b9              for (; i < *(uint32_t*)((char*)this + 0x8c); i = var_10_1)
005f37b9              {
005f36c9                  int32_t eax_15 = (((int32_t)((long double)((float)((((((long double)*(uint32_t*)edx_1) * ((long double)65.4810028f)) + (((long double)*(uint32_t*)((char*)edx_1 + 4)) * ((long double)128.552994f))) + (((long double)*(uint32_t*)((char*)edx_1 + 8)) * ((long double)24.9659996f))) + ((long double)0.5f))))) + 0x10);
005f36cf                  long double x87_r7_36 = ((long double)((float)(((long double)((float)(((((long double)*(uint32_t*)((char*)edx_1 + 0x10)) * ((long double)65.4810028f)) + (((long double)*(uint32_t*)((char*)edx_1 + 0x18)) * ((long double)24.9659996f))) + (((long double)*(uint32_t*)((char*)edx_1 + 0x14)) * ((long double)128.552994f))))) + ((long double)0.5f))));
005f36e4                  int32_t var_8_2 = (((int32_t)x87_r7_36) + 0x10);
005f36fc                  int32_t ebx_6 = (((int32_t)((long double)((float)(((long double)((float)(((((long double)*(uint32_t*)((char*)edx_1 + 8)) * ((long double)112f)) - (((long double)*(uint32_t*)((char*)edx_1 + 4)) * ((long double)74.2030029f))) - (((long double)*(uint32_t*)edx_1) * ((long double)37.7970009f))))) + ((long double)0.5f))))) + 0x80);
005f370e                  int32_t ecx_10 = (((int32_t)((long double)((float)(((long double)((float)((((long double)*(uint32_t*)edx_1) * ((long double)112f)) - ((((long double)*(uint32_t*)((char*)edx_1 + 4)) * ((long double)93.7860031f)) + (((long double)*(uint32_t*)((char*)edx_1 + 8)) * ((long double)18.2140007f)))))) + ((long double)0.5f))))) + 0x80);
005f3716                  int32_t var_c_3 = ecx_10;
005f3716                  
005f3719                  if (eax_15 < 0)
005f371b                      eax_15 = 0;
005f3719                  else if (eax_15 > 0xff)
005f3728                      eax_15 = 0xff;
005f3728                  
005f372e                  if (var_8_2 < 0)
005f3730                      var_8_2 = 0;
005f372e                  else if (var_8_2 > 0xff)
005f373f                      var_8_2 = 0xff;
005f373f                  
005f3748                  if (ebx_6 < 0)
005f374a                      ebx_6 = 0;
005f3748                  else if (ebx_6 > 0xff)
005f3757                      ebx_6 = 0xff;
005f3757                  
005f375d                  if (var_c_3 < 0)
005f375f                      var_c_3 = 0;
005f375d                  else if (var_c_3 > 0xff)
005f376e                      var_c_3 = 0xff;
005f376e                  
005f3785                  edx_1 += 0x20;
005f378d                  *(uint16_t*)edi_2 = (((int16_t)(eax_15 << ((int8_t)*(uint32_t*)((char*)this + 0xa8)))) | ((int16_t)(ebx_6 << ((int8_t)*(uint32_t*)((char*)this + 0xac)))));
005f37a3                  edi_2 += 4;
005f37a8                  var_10_1 += 2;
005f37ac                  *(uint16_t*)((char*)edi_2 - 2) = (((int16_t)(var_8_2 << ((int8_t)*(uint32_t*)((char*)this + 0xa8)))) | ((int16_t)(var_c_3 << ((int8_t)*(uint32_t*)((char*)this + 0xac)))));
005f37b9              }
005f3541          }
005f3541          else if ((eax_7 == 0x42475247 || eax_7 == 0x47424752))
005f354f          {
005f356a              int32_t i_1 = *(uint32_t*)((char*)this + 0x84);
005f3570              int32_t i_2 = i_1;
005f3570              
005f3621              for (; i_1 < *(uint32_t*)((char*)this + 0x8c); i_1 = i_2)
005f3621              {
005f3587                  var_10_1 = ((float)((((long double)*(uint32_t*)((char*)edx_1 + 4)) * ((long double)255f)) + ((long double)0.5f)));
005f358d                  int32_t var_8_1 = ((int32_t)((long double)var_10_1));
005f35a1                  var_10_1 = ((float)((((long double)*(uint32_t*)edx_1) * ((long double)255f)) + ((long double)0.5f)));
005f35bf                  *(uint16_t*)edi_2 = (((int16_t)(var_8_1 << ((int8_t)*(uint32_t*)((char*)this + 0xa8)))) | ((int16_t)(((int32_t)((long double)var_10_1)) << ((int8_t)*(uint32_t*)((char*)this + 0xac)))));
005f35d1                  var_10_1 = ((float)((((long double)*(uint32_t*)((char*)edx_1 + 0x14)) * ((long double)255f)) + ((long double)0.5f)));
005f35d7                  int32_t var_18_1 = ((int32_t)((long double)var_10_1));
005f35ec                  var_10_1 = ((float)((((long double)*(uint32_t*)((char*)edx_1 + 8)) * ((long double)255f)) + ((long double)0.5f)));
005f3608                  edx_1 += 0x20;
005f360b                  edi_2 += 4;
005f3610                  i_2 += 2;
005f3614                  *(uint16_t*)((char*)edi_2 - 2) = (((int16_t)(var_18_1 << ((int8_t)*(uint32_t*)((char*)this + 0xa8)))) | ((int16_t)(((int32_t)((long double)var_10_1)) << ((int8_t)*(uint32_t*)((char*)this + 0xac)))));
005f3621              }
005f354f          }
005f354f          else if (eax_7 == 0x59565955)
005f3556              goto label_5f355c;
005f37c5          int16_t x87control_2;
005f37c5          int16_t x87status_3;
005f37c5          x87control_2 = __fldcw_memmem16(((int16_t)*(uint32_t*)((char*)this + 0x7c)));
005f37c8          *(uint32_t*)((char*)this + 0xa0) = 0;
005f34f2      }
005f34f2      
005f37d5      return 0;
005f34d3  }


005f37d6  long __thiscall D3DXTex::CCodecYUV::Fetch(D3DXTex::CCodecYUV* this, uint32_t arg2, uint32_t arg3, int32_t arg4)

005f37d6  {
005f37de      int32_t edi;
005f37de      int32_t var_14 = edi;
005f37de      
005f37e8      if (*(uint32_t*)((char*)this + 0xa4) == 0)
005f37ea          return 0x8007000e;
005f37ea      
005f381a      if ((((arg2 < *(uint32_t*)((char*)this + 0x88) || arg2 >= *(uint32_t*)((char*)this + 0x90)) || arg3 < *(uint32_t*)((char*)this + 0x94)) || arg3 >= *(uint32_t*)((char*)this + 0x98)))
005f381a      {
005f3822          D3DXTex::CCodecYUV::Commit(this);
005f3836          *(uint32_t*)((char*)this + 0x90) = (arg2 + 1);
005f383f          *(uint32_t*)((char*)this + 0x88) = arg2;
005f3845          *(uint32_t*)((char*)this + 0x94) = arg3;
005f384b          *(uint32_t*)((char*)this + 0x98) = (arg3 + 1);
005f384b          
005f3851          if (arg4 != 0)
005f3851          {
005f3860              int32_t eax_4 = *(uint32_t*)((char*)this + 0x84);
005f3869              uint32_t ebx_2 = *(uint32_t*)((char*)this + 0x80);
005f3874              int32_t ecx_4 = *(uint32_t*)((char*)this + 0x68);
005f3877              int16_t* esi_3 = ((((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + (eax_4 << 1)) + *(uint32_t*)((char*)this + 0x20));
005f387d              arg3 = ebx_2;
005f387d              
005f3880              if ((ecx_4 & 1) != 0)
005f3882                  ecx_4 += 1;
005f3882              
005f3886              uint32_t ecx_5 = *(uint32_t*)((char*)this + 4);
005f3886              
005f388f              if (ecx_5 == 0x32595559)
005f388f              {
005f38bb              label_5f38bb:
005f38bb                  arg4 = eax_4;
005f38bb                  
005f38be                  if (eax_4 < *(uint32_t*)((char*)this + 0x8c))
005f38be                  {
005f38c4                      long double x87_r7_1 = ((long double)128f);
005f38cf                      long double x87_r6_1 = ((long double)0f);
005f38d5                      long double x87_r5_1 = ((long double)1f);
005f38d5                      
005f3e48                      do
005f3e48                      {
005f38db                          ecx_5 = *(uint16_t*)((char*)this + 0xa8);
005f38e4                          uint32_t eax_5;
005f38e4                          eax_5 = *(uint16_t*)esi_3;
005f38e7                          arg2 = eax_5;
005f38ea                          eax_5 u>>= ecx_5;
005f38fa                          int32_t eax_8 = (arg4 & 1);
005f3906                          uint32_t eax_12;
005f3906                          long double x87_r3_1;
005f3906                          long double x87_r4_4;
005f3906                          
005f3906                          if (eax_8 == 0)
005f3906                          {
005f390f                              ecx_5 = *(uint16_t*)((char*)this + 0xac);
005f392a                              x87_r4_4 = (((long double)((uint32_t)(arg2 >> ecx_5))) - x87_r7_1);
005f3931                              x87_r3_1 = ((long double)((uint32_t)(esi_3[1] >> ecx_5)));
005f3906                          }
005f3906                          else if ((eax_8 == 1 && ecx_4 == 2))
005f3a0e                          {
005f3a10                              ecx_5 = *(uint16_t*)((char*)this + 0xac);
005f3a2e                              x87_r4_4 = (((long double)((uint32_t)(esi_3[-1] >> ecx_5))) - x87_r7_1);
005f3a35                              x87_r3_1 = ((long double)((uint32_t)(arg2 >> ecx_5)));
005f3a0e                          }
005f3a0e                          else if ((arg4 != 1 || ecx_4 != 4))
005f3a49                          {
005f3aeb                              bool cond:11_1;
005f3aeb                              
005f3aeb                              if (arg4 == (ecx_4 - 1))
005f3aeb                              {
005f3aed                                  char ebx_4 = ((int8_t)*(uint16_t*)((char*)this + 0xac));
005f3af8                                  ecx_5 = ebx_4;
005f3b0c                                  uint32_t ecx_13;
005f3b0c                                  ecx_13 = ebx_4;
005f3b1a                                  uint32_t eax_56 = ((((((uint32_t)((int8_t)(((uint32_t)esi_3[-1]) >> ecx_5))) * 0x11) - ((uint32_t)((int8_t)(((uint32_t)esi_3[-3]) >> ecx_13)))) + 8) >> 4);
005f3b22                                  long double x87_r4_11 = ((long double)eax_56);
005f3b22                                  
005f3b25                                  if (eax_56 < 0)
005f3b27                                      x87_r4_11 = (x87_r4_11 + ((long double)4.2949673e+09f));
005f3b27                                  
005f3b2d                                  char ebx_8 = ((int8_t)*(uint16_t*)((char*)this + 0xac));
005f3b34                                  x87_r4_4 = (x87_r4_11 - x87_r7_1);
005f3b3a                                  ecx_13 = ebx_8;
005f3b4e                                  ecx_5 = ebx_8;
005f3b5c                                  eax_12 = ((((((uint32_t)((int8_t)(((uint32_t)arg2) >> ecx_13))) * 0x11) - ((uint32_t)((int8_t)(((uint32_t)esi_3[-2]) >> ecx_5)))) + 8) >> 4);
005f3b62                                  x87_r3_1 = ((long double)eax_12);
005f3d71                                  cond:11_1 = eax_12 >= 0;
005f3aeb                              }
005f3aeb                              else if (arg4 == 1)
005f3b6d                              {
005f3b94                                  uint32_t eax_65 = ((uint32_t)((int8_t)(((uint32_t)esi_3[-1]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))));
005f3bb0                                  uint32_t eax_70 = ((((((((uint32_t)((int8_t)(((uint32_t)esi_3[1]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac))))) + eax_65) * 9) - ((uint32_t)((int8_t)(((uint32_t)esi_3[3]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))))) - eax_65) + 8) >> 4);
005f3bb8                                  long double x87_r4_12 = ((long double)eax_70);
005f3bb8                                  
005f3bbb                                  if (eax_70 < 0)
005f3bbd                                      x87_r4_12 = (x87_r4_12 + ((long double)4.2949673e+09f));
005f3bbd                                  
005f3bc7                                  x87_r4_4 = (x87_r4_12 - x87_r7_1);
005f3be6                                  uint32_t eax_73 = ((uint32_t)((int8_t)(((uint32_t)arg2) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))));
005f3c02                                  eax_12 = ((((((((uint32_t)((int8_t)(((uint32_t)esi_3[2]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac))))) + eax_73) * 9) - ((uint32_t)((int8_t)(((uint32_t)esi_3[4]) >> *(uint16_t*)((char*)this + 0xac))))) - eax_73) + 8) >> 4);
005f3c08                                  x87_r3_1 = ((long double)eax_12);
005f3d71                                  cond:11_1 = eax_12 >= 0;
005f3b6d                              }
005f3b6d                              else if (arg4 != (ecx_4 - 3))
005f3c15                              {
005f3cbd                                  char ebx_40 = ((int8_t)*(uint16_t*)((char*)this + 0xac));
005f3cc8                                  ecx_5 = ebx_40;
005f3cd3                                  uint32_t ecx_26;
005f3cd3                                  ecx_26 = ebx_40;
005f3d08                                  uint32_t eax_102 = ((((((((uint32_t)((int8_t)(((uint32_t)esi_3[-1]) >> ecx_5))) + ((uint32_t)((int8_t)(((uint32_t)esi_3[1]) >> ecx_26)))) * 9) - ((uint32_t)((int8_t)(((uint32_t)esi_3[-3]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))))) - ((uint32_t)((int8_t)(((uint32_t)esi_3[3]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))))) + 8) >> 4);
005f3d10                                  long double x87_r4_14 = ((long double)eax_102);
005f3d10                                  
005f3d13                                  if (eax_102 < 0)
005f3d15                                      x87_r4_14 = (x87_r4_14 + ((long double)4.2949673e+09f));
005f3d15                                  
005f3d1b                                  char ebx_50 = ((int8_t)*(uint16_t*)((char*)this + 0xac));
005f3d22                                  x87_r4_4 = (x87_r4_14 - x87_r7_1);
005f3d33                                  uint32_t ecx_29;
005f3d33                                  ecx_29 = ebx_50;
005f3d68                                  eax_12 = ((((((((uint32_t)((int8_t)(((uint32_t)esi_3[2]) >> ebx_50))) + ((uint32_t)((int8_t)(((uint32_t)arg2) >> ecx_29)))) * 9) - ((uint32_t)((int8_t)(((uint32_t)esi_3[4]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))))) - ((uint32_t)((int8_t)(((uint32_t)esi_3[-2]) >> *(uint16_t*)((char*)this + 0xac))))) + 8) >> 4);
005f3d6e                                  x87_r3_1 = ((long double)eax_12);
005f3d71                                  cond:11_1 = eax_12 >= 0;
005f3c15                              }
005f3c15                              else
005f3c15                              {
005f3c3c                                  uint32_t eax_81 = ((uint32_t)((int8_t)(((uint32_t)esi_3[1]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))));
005f3c58                                  uint32_t eax_86 = ((((((((uint32_t)((int8_t)(((uint32_t)esi_3[-1]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac))))) + eax_81) * 9) - ((uint32_t)((int8_t)(((uint32_t)esi_3[-3]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))))) - eax_81) + 8) >> 4);
005f3c60                                  long double x87_r4_13 = ((long double)eax_86);
005f3c60                                  
005f3c63                                  if (eax_86 < 0)
005f3c65                                      x87_r4_13 = (x87_r4_13 + ((long double)4.2949673e+09f));
005f3c65                                  
005f3c6b                                  char eax_87 = ((int8_t)*(uint16_t*)((char*)this + 0xac));
005f3c72                                  x87_r4_4 = (x87_r4_13 - x87_r7_1);
005f3c8e                                  uint32_t ecx_25;
005f3c8e                                  ecx_25 = eax_87;
005f3cad                                  uint32_t ebx_39 = (((((((uint32_t)((int8_t)(((uint32_t)esi_3[2]) >> eax_87))) << 3) + 8) - ((uint32_t)((int8_t)(((uint32_t)esi_3[-2]) >> ecx_25)))) + (((uint32_t)((int8_t)(((uint32_t)arg2) >> *(uint16_t*)((char*)this + 0xac)))) * 9)) >> 4);
005f3cb3                                  x87_r3_1 = ((long double)ebx_39);
005f3cb6                                  cond:11_1 = ebx_39 >= 0;
005f3c15                              }
005f3c15                              
005f3d73                              if (!(cond:11_1))
005f3d75                                  x87_r3_1 = (x87_r3_1 + ((long double)4.2949673e+09f));
005f3d75                              
005f3d7b                              ebx_2 = arg3;
005f3a49                          }
005f3a49                          else
005f3a49                          {
005f3a63                              uint32_t eax_29 = ((uint32_t)((int8_t)(((uint32_t)esi_3[-1]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))));
005f3a71                              uint32_t eax_32 = ((uint32_t)((int8_t)(((uint32_t)esi_3[1]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac)))));
005f3a83                              uint32_t eax_38 = ((((((eax_32 + eax_29) * 9) - eax_29) - eax_32) + 8) >> 4);
005f3a8b                              long double x87_r4_10 = ((long double)eax_38);
005f3a8b                              
005f3a8e                              if (eax_38 < 0)
005f3a90                                  x87_r4_10 = (x87_r4_10 + ((long double)4.2949673e+09f));
005f3a90                              
005f3a9a                              x87_r4_4 = (x87_r4_10 - x87_r7_1);
005f3aca                              eax_12 = ((((((uint32_t)((int8_t)(((uint32_t)arg2) >> ((int8_t)*(uint16_t*)((char*)this + 0xac))))) * 8) + (((uint32_t)((int8_t)(((uint32_t)esi_3[2]) >> ((int8_t)*(uint16_t*)((char*)this + 0xac))))) << 3)) + 8) >> 4);
005f3ad2                              x87_r3_1 = ((long double)eax_12);
005f3ad2                              
005f3ad5                              if (eax_12 < 0)
005f3adb                                  x87_r3_1 = (x87_r3_1 + ((long double)4.2949673e+09f));
005f3a49                          }
005f3a49                          
005f3d7e                          long double x87_r3_6 = (x87_r3_1 - x87_r7_1);
005f3d83                          long double x87_r2_2 = (((long double)((float)(((long double)(eax_5 & 0xff)) - ((long double)16f)))) * ((long double)0.00456620986f));
005f3d94                          long double x87_r1_3 = ((x87_r3_6 * ((long double)0.00625893008f)) + x87_r2_2);
005f3d96                          arg2 = ((float)x87_r1_3);
005f3d99                          *(uint32_t*)ebx_2 = ((float)x87_r1_3);
005f3dad                          long double x87_r1_7 = ((x87_r2_2 - (x87_r4_4 * ((long double)0.00153631996f))) - (x87_r3_6 * ((long double)0.00318810996f)));
005f3daf                          arg3 = ((float)x87_r1_7);
005f3db6                          *(uint32_t*)(ebx_2 + 4) = ((float)x87_r2_2);
005f3dbf                          long double x87_r4_17 = ((x87_r1_7 * ((long double)0.00791070983f)) + ((long double)((float)x87_r2_2)));
005f3dc2                          *(uint32_t*)(ebx_2 + 8) = ((float)x87_r4_17);
005f3dc7                          *(uint32_t*)(ebx_2 + 0xc) = ((float)((long double)1));
005f3dca                          long double x87_r3_9 = ((long double)arg2);
005f3dcd                          (x87_r3_9 - x87_r6_1);
005f3dcf                          eax_12 = ((((x87_r3_9 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_9, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r3_9 == x87_r6_1) ? 1 : 0) << 0xe) | 0x2000))));
005f3dd1                          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005f3dd4                          long double x87_r3_10;
005f3dd4                          
005f3dd4                          if (p_1)
005f3dd4                          {
005f3dda                              long double x87_r3_11 = ((long double)arg2);
005f3ddd                              (x87_r3_11 - x87_r5_1);
005f3ddf                              eax_12 = ((((x87_r3_11 < x87_r5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_11, x87_r5_1))) ? 1 : 0) << 0xa) | ((((x87_r3_11 == x87_r5_1) ? 1 : 0) << 0xe) | 0x2000))));
005f3ddf                              
005f3de4                              if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) != 0)
005f3dea                                  x87_r3_10 = ((long double)arg2);
005f3de4                              else
005f3de6                                  x87_r3_10 = ((long double)1);
005f3dd4                          }
005f3dd4                          else
005f3dd6                              x87_r3_10 = ((long double)0);
005f3dd6                          
005f3ded                          *(uint32_t*)ebx_2 = ((float)x87_r3_10);
005f3def                          long double x87_r3_12 = ((long double)arg3);
005f3df2                          (x87_r3_12 - x87_r6_1);
005f3df4                          eax_12 = ((((x87_r3_12 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_12, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r3_12 == x87_r6_1) ? 1 : 0) << 0xe) | 0x2000))));
005f3df6                          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005f3df9                          long double x87_r3_13;
005f3df9                          
005f3df9                          if (p_2)
005f3df9                          {
005f3dff                              long double x87_r3_14 = ((long double)arg3);
005f3e02                              (x87_r3_14 - x87_r5_1);
005f3e04                              eax_12 = ((((x87_r3_14 < x87_r5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r3_14, x87_r5_1))) ? 1 : 0) << 0xa) | ((((x87_r3_14 == x87_r5_1) ? 1 : 0) << 0xe) | 0x2000))));
005f3e04                              
005f3e09                              if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) != 0)
005f3e0f                                  x87_r3_13 = ((long double)arg3);
005f3e09                              else
005f3e0b                                  x87_r3_13 = ((long double)1);
005f3df9                          }
005f3df9                          else
005f3dfb                              x87_r3_13 = ((long double)0);
005f3dfb                          
005f3e12                          *(uint32_t*)(ebx_2 + 4) = ((float)x87_r3_13);
005f3e15                          (x87_r4_17 - x87_r6_1);
005f3e17                          eax_12 = ((((x87_r4_17 < x87_r6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_17, x87_r6_1))) ? 1 : 0) << 0xa) | ((((x87_r4_17 == x87_r6_1) ? 1 : 0) << 0xe) | 0x2000))));
005f3e19                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005f3e19                          
005f3e1c                          if (p_3)
005f3e1c                          {
005f3e24                              (x87_r4_17 - x87_r5_1);
005f3e26                              eax_12 = ((((x87_r4_17 < x87_r5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_17, x87_r5_1))) ? 1 : 0) << 0xa) | ((((x87_r4_17 == x87_r5_1) ? 1 : 0) << 0xe) | 0x2000))));
005f3e26                              
005f3e2b                              if ((*(uint8_t*)((char*)eax_12)[1] & 0x41) == 0)
005f3e2b                              {
005f3e2d                                  x87_r5_1 = x87_r4_17;
005f3e2f                                  x87_r4_17 = ((long double)1);
005f3e2b                              }
005f3e1c                          }
005f3e1c                          else
005f3e1c                          {
005f3e1e                              x87_r5_1 = x87_r4_17;
005f3e20                              x87_r4_17 = ((long double)0);
005f3e1c                          }
005f3e1c                          
005f3e31                          ebx_2 += 0x10;
005f3e34                          *(uint32_t*)(ebx_2 - 8) = ((float)x87_r4_17);
005f3e38                          esi_3 = &esi_3[1];
005f3e39                          arg4 += 1;
005f3e45                          arg3 = ebx_2;
005f3e48                      } while (arg4 < *(uint32_t*)((char*)this + 0x8c));
005f38be                  }
005f388f              }
005f388f              else if ((ecx_5 == 0x42475247 || ecx_5 == 0x47424752))
005f38a3              {
005f393f                  arg3 = eax_4;
005f393f                  
005f3942                  if (eax_4 < *(uint32_t*)((char*)this + 0x8c))
005f3942                  {
005f3948                      long double x87_r7_2 = ((long double)0.00392156886f);
005f3948                      
005f39f8                      do
005f39f8                      {
005f3953                          ecx_5 = *(uint16_t*)((char*)this + 0xa8);
005f395c                          uint32_t eax_13;
005f395c                          eax_13 = *(uint16_t*)esi_3;
005f395f                          arg3 += 2;
005f3963                          esi_3 = &esi_3[2];
005f3966                          arg2 = eax_13;
005f3969                          eax_13 u>>= ecx_5;
005f396c                          ecx_5 = *(uint16_t*)((char*)this + 0xac);
005f397e                          uint16_t eax_15 = (arg2 >> ecx_5);
005f3981                          ecx_5 = *(uint16_t*)((char*)this + 0xa8);
005f3994                          int32_t eax_17;
005f3994                          eax_17 = esi_3[-1];
005f3998                          long double x87_r5_3 = (((long double)((uint32_t)eax_15)) * x87_r7_2);
005f399a                          arg4 = eax_17;
005f399d                          eax_17 u>>= ecx_5;
005f39a0                          ecx_5 = *(uint16_t*)((char*)this + 0xac);
005f39c5                          *(uint32_t*)(ebx_2 + 0x14) = ((float)(((long double)(eax_17 & 0xff)) * x87_r7_2));
005f39cb                          long double x87_r4_8 = (((long double)((uint32_t)(arg4 >> ecx_5))) * x87_r7_2);
005f39cf                          *(uint32_t*)ebx_2 = ((float)x87_r5_3);
005f39d1                          ebx_2 += 0x20;
005f39d6                          *(uint32_t*)(ebx_2 - 0x1c) = ((float)(((long double)(eax_13 & 0xff)) * x87_r7_2));
005f39d9                          *(uint32_t*)(ebx_2 - 0x18) = ((float)x87_r4_8);
005f39de                          *(uint32_t*)(ebx_2 - 0x14) = ((float)((long double)1));
005f39e3                          *(uint32_t*)(ebx_2 - 0x10) = ((float)x87_r5_3);
005f39e6                          *(uint32_t*)(ebx_2 - 8) = ((float)x87_r4_8);
005f39eb                          x87_r7_2 = x87_r5_3;
005f39ef                          *(uint32_t*)(ebx_2 - 4) = ((float)((long double)1));
005f39f8                      } while (arg3 < *(uint32_t*)((char*)this + 0x8c));
005f3942                  }
005f38a3              }
005f38a3              else if (ecx_5 == 0x59565955)
005f38af                  goto label_5f38bb;
005f3851          }
005f381a      }
005f381a      
005f3e54      return 0;
005f37d6  }


005f3e5d  void __thiscall D3DXTex::CCodecDXT::~CCodecDXT(D3DXTex::CCodecDXT* this)

005f3e5d  {
005f3e62      D3DXTex::CCodecDXT* this_1 = this;
005f3e66      bool cond:0 = *(uint32_t*)((char*)this + 0xf4) == 0;
005f3e6d      *(uint32_t*)this = 0x7ece08;
005f3e6d      
005f3e73      if (!(cond:0))
005f3e73      {
005f3e75          void* eax_1 = *(uint32_t*)((char*)this + 0xf8);
005f3e75          
005f3e7d          if (eax_1 != 0)
005f3e7d          {
005f3e7f              int32_t edi;
005f3e7f              int32_t var_10_1 = edi;
005f3e80              int32_t i = *(uint32_t*)((char*)this + 0xd4);
005f3e8c              void* var_8 = eax_1;
005f3e8c              
005f3e8f              for (; i < *(uint32_t*)((char*)this + 0xd8); i += 1)
005f3e8f              {
005f3eb3                  for (int32_t j = *(uint32_t*)((char*)this + 0xc8); j < *(uint32_t*)((char*)this + 0xd0); j += 4)
005f3eb3                  {
005f3ea0                      operator delete(*(uint32_t*)((char*)var_8 + 4));
005f3ea5                      var_8 += 8;
005f3eb3                  }
005f3e8f              }
005f3e7d          }
005f3e73      }
005f3e73      
005f3ec6      operator delete(*(uint32_t*)((char*)this + 0xf0));
005f3ed1      operator delete(*(uint32_t*)((char*)this + 0xf8));
005f3eda      D3DXTex::CCodec::~CCodec(this);
005f3e5d  }


005f3ee2  void __thiscall D3DXTex::CCodecDXT::QuantizeColorKey(D3DXTex::CCodecDXT* this)

005f3ee2  {
005f3ee7      D3DXTex::CCodecDXT* this_2 = this;
005f3ee8      D3DXTex::CCodecDXT* this_1 = this;
005f3ee9      int32_t eax = *(uint32_t*)((char*)this + 4);
005f3ef8      long double x87_r7;
005f3ef8      
005f3ef8      if ((eax == 0x32545844 || eax == 0x33545844))
005f3f02          x87_r7 = ((long double)15f);
005f3ef8      else
005f3efa          x87_r7 = ((long double)255f);
005f3efa      
005f3f08      *(uint32_t*)((char*)this + 0x80) = ((float)x87_r7);
005f3f12      *(uint32_t*)((char*)this + 0x84) = ((float)(((long double)1) / x87_r7));
005f3f41      *(uint32_t*)((char*)this + 0x24) = ((float)(((long double)((int32_t)((long double)((float)((((long double)*(uint32_t*)((char*)this + 0x24)) * ((long double)31f)) + ((long double)0.5f)))))) * ((long double)0.0322580636f)));
005f3f6b      *(uint32_t*)((char*)this + 0x28) = ((float)(((long double)((int32_t)((long double)((float)((((long double)*(uint32_t*)((char*)this + 0x28)) * ((long double)63f)) + ((long double)0.5f)))))) * ((long double)0.0158730168f)));
005f3f95      *(uint32_t*)((char*)this + 0x2c) = ((float)(((long double)((int32_t)((long double)((float)((((long double)*(uint32_t*)((char*)this + 0x2c)) * ((long double)31f)) + ((long double)0.5f)))))) * ((long double)0.0322580636f)));
005f3fbf      *(uint32_t*)((char*)this + 0x30) = ((float)(((long double)((int32_t)((long double)((float)((((long double)*(uint32_t*)((char*)this + 0x80)) * ((long double)*(uint32_t*)((char*)this + 0x30))) + ((long double)0.5f)))))) * ((long double)*(uint32_t*)((char*)this + 0x84))));
005f3ee2  }


005f3fc4  float __stdcall D3DXTex::TableEncodeGamma22(float arg1)

005f3fc4  {
005f3fc9      float ecx;
005f3fc9      float var_8 = ecx;
005f3fcd      float var_c = ecx;
005f3fce      float var_c_1 = ((float)((long double)arg1));
005f3fdf      arg1 = ((float)((TableInvSqrt(ecx) * ((long double)arg1)) * ((long double)254f)));
005f3fe5      int32_t var_8_1 = ((int32_t)((long double)arg1));
005f3fed      long double x87_r7_5 = ((long double)*(uint32_t*)((var_8_1 << 2) + &data_7ec5c0));
005f4000      long double x87_r5 = ((long double)var_8_1);
005f4000      
005f4003      if (var_8_1 < 0)
005f4005          x87_r5 = (x87_r5 + ((long double)4.2949673e+09f));
005f4005      
005f4013      return ((int32_t)(x87_r7_5 + ((((long double)*(uint32_t*)((var_8_1 << 2) + &data_7ec5c4)) - x87_r7_5) * (((long double)arg1) - x87_r5))));
005f3fc4  }


005f4016  float __stdcall D3DXTex::TableDecodeGamma22(float arg1)

005f4016  {
005f401b      int32_t ecx;
005f401b      int32_t var_8 = ecx;
005f4028      arg1 = ((float)((((long double)arg1) * ((long double)arg1)) * ((long double)254f)));
005f402e      int32_t var_8_1 = ((int32_t)((long double)arg1));
005f4036      long double x87_r7_4 = ((long double)*(uint32_t*)((var_8_1 << 2) + &data_7ec9c0));
005f4049      long double x87_r5 = ((long double)var_8_1);
005f4049      
005f404c      if (var_8_1 < 0)
005f404e          x87_r5 = (x87_r5 + ((long double)4.2949673e+09f));
005f404e      
005f405c      return ((int32_t)(x87_r7_4 + ((((long double)*(uint32_t*)((var_8_1 << 2) + &data_7ec9c4)) - x87_r7_4) * (((long double)arg1) - x87_r5))));
005f4016  }


005f405f  void __thiscall D3DXTex::CCodec::CCodec(D3DXTex::CCodec* this, struct D3DX_BLT* arg2, uint32_t arg3, unsigned long arg4)

005f405f  {
005f4067      struct D3DX_BLT* edx = arg2;
005f406d      *(uint32_t*)this = 0x7ecdc0;
005f4075      *(uint32_t*)((char*)this + 0x20) = *(uint32_t*)edx;
005f407c      *(uint32_t*)((char*)this + 4) = *(uint32_t*)((char*)edx + 4);
005f4082      int32_t edi;
005f4082      int32_t var_24 = edi;
005f4083      *(uint32_t*)((char*)this + 0x60) = *(uint32_t*)((char*)edx + 8);
005f408b      *(uint32_t*)((char*)this + 0x64) = *(uint32_t*)((char*)edx + 0xc);
005f4095      __builtin_memcpy(((char*)this + 0x3c), ((char*)edx + 0x28), 0x18);
005f409c      int32_t eax_4 = 0x824ce8;
005f409c      
005f40a1      if (*(uint32_t*)((char*)edx + 0x40) == 0)
005f40a3          eax_4 = 0x824c68;
005f40a3      
005f40a8      *(uint32_t*)((char*)this + 0x34) = eax_4;
005f40ae      uint32_t eax_6 = (arg3 >> 3);
005f40b1      arg2 = eax_6;
005f40b4      *(uint32_t*)((char*)this + 0x78) = eax_6;
005f40bc      *(uint32_t*)((char*)this + 0x54) = 0;
005f40bf      int32_t eax_7;
005f40bf      eax_7 = arg3 != 0;
005f40c2      *(uint32_t*)((char*)this + 0x58) = 0;
005f40c8      *(uint32_t*)((char*)this + 0xc) = eax_7;
005f40ce      *(uint32_t*)((char*)this + 8) = arg4;
005f40d4      *(uint32_t*)((char*)this + 0x18) = *(uint32_t*)((char*)edx + 0x4c);
005f40d7      int32_t eax_10 = *(uint32_t*)((char*)this + 4);
005f40e2      int32_t eax_11;
005f40e2      
005f40e2      if ((eax_10 == 0x29 || eax_10 == 0x28))
005f40ea          eax_11 = 1;
005f40e2      else
005f40e4          eax_11 = 0;
005f40e4      
005f40eb      bool cond:2 = *(uint32_t*)((char*)this + 0x18) == 0;
005f40ee      *(uint32_t*)((char*)this + 0x1c) = eax_11;
005f40f1      *(uint32_t*)((char*)this + 0x38) = 0;
005f40f7      *(uint32_t*)((char*)this + 0x10) = *(uint32_t*)((char*)edx + 0x48);
005f40fa      *(uint32_t*)((char*)this + 0x14) = 0;
005f40fd      *(uint32_t*)((char*)this + 0x5c) = 0;
005f40fd      
005f4100      if (!(cond:2))
005f4100      {
005f4102          int32_t ecx = *(uint32_t*)((char*)edx + 0x4c);
005f4105          long double x87_r7_1 = ((long double)0.00392156886f);
005f413d          float var_14 = ((float)(((long double)((uint32_t)((int8_t)(ecx >> 8)))) * x87_r7_1));
005f4148          float var_10_1 = ((float)(((long double)((uint32_t)ecx)) * x87_r7_1));
005f4150          float var_c_1 = ((float)(((long double)(ecx >> 0x18)) * x87_r7_1));
005f4153          *(uint32_t*)((char*)this + 0x24) = ((float)(((long double)((uint32_t)((int8_t)(ecx >> 0x10)))) * x87_r7_1));
005f4153          void* edi_3 = ((char*)this + 0x28);
005f4153          float* esi_1 = &var_14;
005f4154          *(uint32_t*)edi_3 = *(uint32_t*)esi_1;
005f4154          void* edi_4 = ((char*)edi_3 + 4);
005f4154          void* esi_2 = &esi_1[1];
005f4157          *(uint32_t*)edi_4 = *(uint32_t*)esi_2;
005f4158          *(uint32_t*)((char*)edi_4 + 4) = *(uint32_t*)((char*)esi_2 + 4);
005f4100      }
005f4100      
005f415f      if (arg4 != 2)
005f415f          goto label_5f416a;
005f415f      
005f4165      if (*(uint32_t*)((char*)this + 4) != 0x3d)
005f4165      {
005f4167          *(uint32_t*)((char*)this + 0x10) = 0;
005f416a      label_5f416a:
005f416a          
005f416e          if (arg4 == 3)
005f4170              *(uint32_t*)((char*)this + 0x10) = 0;
005f4165      }
005f4165      
005f4173      int32_t ecx_2 = *(uint32_t*)((char*)this + 0x3c);
005f4179      int32_t esi_5 = *(uint32_t*)((char*)this + 0x40);
005f417c      int32_t edi_7 = *(uint32_t*)((char*)this + 0x48);
005f417f      int32_t eax_21 = (*(uint32_t*)((char*)this + 0x44) - ecx_2);
005f4181      *(uint32_t*)((char*)this + 0x68) = eax_21;
005f418a      int32_t esi_6 = *(uint32_t*)((char*)this + 0x4c);
005f418d      *(uint32_t*)((char*)this + 0x6c) = (edi_7 - esi_5);
005f4190      int32_t edi_9 = *(uint32_t*)((char*)this + 0x50);
005f4193      *(uint32_t*)((char*)this + 0x74) = (eax_21 * arg2);
005f419d      *(uint32_t*)((char*)this + 0x70) = (edi_9 - esi_6);
005f419d      
005f41a0      if (eax_7 != 0)
005f41a0      {
005f41b7          *(uint32_t*)((char*)this + 0x20) += (((ecx_2 * arg2) + (*(uint32_t*)((char*)this + 0x60) * *(uint32_t*)((char*)this + 0x40))) + (*(uint32_t*)((char*)this + 0x64) * esi_6));
005f41bd          *(uint32_t*)((char*)this + 0x44) = *(uint32_t*)((char*)this + 0x68);
005f41c3          *(uint32_t*)((char*)this + 0x48) = *(uint32_t*)((char*)this + 0x6c);
005f41c6          int32_t ecx_8 = *(uint32_t*)((char*)this + 0x70);
005f41c9          *(uint32_t*)((char*)this + 0x3c) = 0;
005f41cc          *(uint32_t*)((char*)this + 0x40) = 0;
005f41cf          *(uint32_t*)((char*)this + 0x4c) = 0;
005f41d2          *(uint32_t*)((char*)this + 0x50) = ecx_8;
005f41a0      }
005f41a0      
005f41d8      if (*(uint32_t*)((char*)edx + 0x44) != 0)
005f41d8      {
005f41de          int32_t esi_9 = (*(uint32_t*)((char*)this + 0x68) + 2);
005f41ea          void* s = operator new((esi_9 << 4));
005f41ea          
005f41ef          if (s == 0)
005f4201              s = nullptr;
005f41ef          else
005f41fa              `vector constructor iterator'(s, 0x10, esi_9, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f41fa          
005f4205          *(uint32_t*)((char*)this + 0x5c) = s;
005f4205          
005f4208          if (s != 0)
005f4208          {
005f420f              int32_t ecx_13 = ((*(uint32_t*)((char*)this + 0x68) + 2) << 4);
005f4220              __builtin_memset(__builtin_memset(s, 0, ((ecx_13 >> 2) << 2)), 0, (ecx_13 & 3));
005f4208          }
005f41d8      }
005f405f  }


005f422b  long __thiscall D3DXTex::CCodec::ConvertFrom(D3DXTex::CCodec* this, class D3DXTex::CCodec* arg2)

005f422b  {
005f4233      int32_t eax = *(uint32_t*)((char*)arg2 + 8);
005f4239      int32_t ecx = *(uint32_t*)((char*)this + 8);
005f4239      
005f4243      if ((ecx != eax && ecx != 4))
005f4245          *(uint32_t*)((char*)this + 0x54) = eax;
005f4245      
005f4252      if ((*(uint32_t*)((char*)this + 0x54) != 0 || *(uint32_t*)((char*)this + 0x10) != 0))
005f4252      {
005f4255          int32_t edi;
005f4255          int32_t var_10_1 = edi;
005f4256          int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f425f          void* eax_3 = operator new((edi_1 << 4));
005f4269          void* eax_4;
005f4269          
005f4269          if (eax_3 == 0)
005f427d              eax_4 = nullptr;
005f4269          else
005f4269          {
005f4274              `vector constructor iterator'(eax_3, 0x10, edi_1, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f4279              eax_4 = eax_3;
005f4269          }
005f4269          
005f4282          *(uint32_t*)((char*)this + 0x58) = eax_4;
005f4282          
005f4286          if (eax_4 == 0)
005f4288              return 0x8007000e;
005f4288          
005f429c          if ((*(uint32_t*)((char*)this + 0x10) != 0 && *(uint32_t*)((char*)arg2 + 0x10) != 0))
005f429c          {
005f42a1              *(uint32_t*)((char*)arg2 + 0x14) = 1;
005f42a4              *(uint32_t*)((char*)this + 0x14) = 1;
005f429c          }
005f4252      }
005f4252      
005f42a7      return 0;
005f422b  }


005f42ae  long __thiscall D3DXTex::CCodec::DecodePalette(D3DXTex::CCodec* this, struct D3DX_BLT* arg2)

005f42ae  {
005f42b5      int32_t edi;
005f42b5      int32_t var_10 = edi;
005f42be      void* eax = operator new(0x1000);
005f42c8      void* eax_1;
005f42c8      
005f42c8      if (eax == 0)
005f42e0          eax_1 = nullptr;
005f42c8      else
005f42c8      {
005f42d7          `vector constructor iterator'(eax, 0x10, 0x100, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005f42dc          eax_1 = eax;
005f42c8      }
005f42c8      
005f42e2      float* ecx_1 = nullptr;
005f42e6      *(uint32_t*)((char*)this + 0x38) = eax_1;
005f42e6      
005f42e9      if (eax_1 == 0)
005f42eb          return 0x8007000e;
005f42eb      
005f42f5      struct D3DX_BLT* edx_1 = arg2;
005f42f8      void* i = nullptr;
005f42f8      
005f42fd      if (*(uint32_t*)((char*)edx_1 + 0x50) == 0)
005f42fd      {
005f4398          do
005f4398          {
005f4375              *(uint32_t*)(((char*)i + *(uint32_t*)((char*)this + 0x38)) + 0xc) = ((float)((long double)1));
005f437e              *(uint32_t*)(((char*)i + *(uint32_t*)((char*)this + 0x38)) + 8) = ((float)((long double)1));
005f4387              *(uint32_t*)(((char*)i + *(uint32_t*)((char*)this + 0x38)) + 4) = ((float)((long double)1));
005f4390              *(uint32_t*)((char*)i + *(uint32_t*)((char*)this + 0x38)) = ((float)((long double)1));
005f4393              i += 0x10;
005f4398          } while (i < 0x1000);
005f42fd      }
005f42fd      else
005f42fd      {
005f42ff          long double x87_r7_1 = ((long double)0.00392156886f);
005f42ff          
005f436a          do
005f436a          {
005f430c              arg2 = ((uint32_t)*(uint8_t*)((char*)i + *(uint32_t*)((char*)edx_1 + 0x50)));
005f4312              i += 4;
005f431a              *(uint32_t*)((char*)ecx_1 + *(uint32_t*)((char*)this + 0x38)) = ((float)(((long double)arg2) * x87_r7_1));
005f432b              ecx_1 = &ecx_1[4];
005f4338              *(uint32_t*)(((char*)ecx_1 + *(uint32_t*)((char*)this + 0x38)) - 0xc) = ((float)(((long double)((uint32_t)*(uint8_t*)(((char*)i + *(uint32_t*)((char*)edx_1 + 0x50)) - 3))) * x87_r7_1));
005f434f              *(uint32_t*)(((char*)ecx_1 + *(uint32_t*)((char*)this + 0x38)) - 8) = ((float)(((long double)((uint32_t)*(uint8_t*)(((char*)i + *(uint32_t*)((char*)edx_1 + 0x50)) - 2))) * x87_r7_1));
005f4366              *(uint32_t*)(((char*)ecx_1 + *(uint32_t*)((char*)this + 0x38)) - 4) = ((float)(((long double)((uint32_t)*(uint8_t*)(((char*)i + *(uint32_t*)((char*)edx_1 + 0x50)) - 1))) * x87_r7_1));
005f436a          } while (i < 0x400);
005f42fd      }
005f42fd      
005f439a      return 0;
005f42ae  }


005f43a3  void __thiscall D3DXTex::CCodec::QuantizeColorKey(D3DXTex::CCodec* this)

005f43a3  {
005f43ab      uint32_t __security_cookie_1 = __security_cookie;
005f43b7      int32_t eax = *(uint32_t*)((char*)this + 0x20);
005f43ba      int32_t ecx = *(uint32_t*)((char*)this + 0x78);
005f43bd      int32_t ebx = *(uint32_t*)((char*)this + 0x74);
005f43c3      int32_t eax_1 = *(uint32_t*)((char*)this + 0x34);
005f43c9      int32_t eax_2 = *(uint32_t*)((char*)this + 0x18);
005f43cc      *(uint32_t*)((char*)this + 0x18) = 0;
005f43d0      *(uint32_t*)((char*)this + 0x74) = ecx;
005f43dc      void var_18;
005f43dc      *(uint32_t*)((char*)this + 0x20) = &var_18;
005f43df      int32_t ecx_1 = *(uint32_t*)((char*)this + 8);
005f43e4      int32_t edi;
005f43e4      int32_t var_38 = edi;
005f43e5      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f43e8      *(uint32_t*)((char*)this + 0x68) = 1;
005f43eb      *(uint32_t*)((char*)this + 0x34) = 0x824c68;
005f43eb      
005f43f7      if ((ecx_1 != 1 && ecx_1 != 4))
005f43f7      {
005f43f9          int32_t ecx_2 = *(uint32_t*)((char*)this + 0x54);
005f43ff          int32_t ecx_3 = *(uint32_t*)((char*)this + 0x58);
005f4402          *(uint32_t*)((char*)this + 0x54) = 1;
005f440e          *(uint32_t*)((char*)this + 0x58) = ((char*)this + 0x24);
005f4411          D3DXTex::CCodec::Convert(this, ((char*)this + 0x24));
005f4419          *(uint32_t*)((char*)this + 0x54) = ecx_2;
005f441f          *(uint32_t*)((char*)this + 0x58) = ecx_3;
005f43f7      }
005f43f7      
005f442e      *(uint32_t*)(*(uint32_t*)this + 8)(0, 0, ((char*)this + 0x24));
005f443d      *(uint32_t*)(*(uint32_t*)this + 4)(0, 0, ((char*)this + 0x24));
005f4446      *(uint32_t*)((char*)this + 0x20) = eax;
005f444c      *(uint32_t*)((char*)this + 0x34) = eax_1;
005f4452      *(uint32_t*)((char*)this + 0x68) = edi_1;
005f4456      *(uint32_t*)((char*)this + 0x74) = ebx;
005f4459      *(uint32_t*)((char*)this + 0x18) = eax_2;
005f445e      __security_check_cookie(__security_cookie_1);
005f43a3  }


005f4465  void __thiscall D3DXTex::CCodec::ColorKey(D3DXTex::CCodec* this, struct D3DXCOLOR* arg2)

005f4465  {
005f4474      void* eax_2 = &arg2[*(uint32_t*)((char*)this + 0x68)];
005f4474      
005f4478      if (arg2 < eax_2)
005f4478      {
005f4481          float* edx_1 = &arg2->b;
005f4484          int32_t i_1 = (((((char*)eax_2 - arg2) - 1) >> 4) + 1);
005f44d8          int32_t i;
005f44d8          
005f44d8          do
005f44d8          {
005f4486              long double x87_r7_1 = ((long double)*(uint32_t*)((char*)this + 0x24));
005f4489              long double x87_r6_1 = ((long double)ADJ(edx_1)->r);
005f448c              (x87_r6_1 - x87_r7_1);
005f448e              int32_t eax_6;
005f448e              eax_6 = ((((x87_r6_1 < x87_r7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_1) ? 1 : 0) << 0xe) | 0))));
005f4490              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005f4490              
005f4493              if (!(p_1))
005f4493              {
005f4495                  long double x87_r7_2 = ((long double)*(uint32_t*)((char*)this + 0x28));
005f4498                  long double x87_r6_2 = ((long double)ADJ(edx_1)->g);
005f449b                  (x87_r6_2 - x87_r7_2);
005f449d                  eax_6 = ((((x87_r6_2 < x87_r7_2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_2))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_2) ? 1 : 0) << 0xe) | 0))));
005f449f                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
005f449f                  
005f44a2                  if (!(p_2))
005f44a2                  {
005f44a4                      long double x87_r7_3 = ((long double)*(uint32_t*)((char*)this + 0x2c));
005f44a7                      long double x87_r6_3 = ((long double)ADJ(edx_1)->b);
005f44a9                      (x87_r6_3 - x87_r7_3);
005f44ab                      eax_6 = ((((x87_r6_3 < x87_r7_3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_3))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_3) ? 1 : 0) << 0xe) | 0))));
005f44ad                      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
005f44ad                      
005f44b0                      if (!(p_3))
005f44b0                      {
005f44b2                          long double x87_r7_4 = ((long double)*(uint32_t*)((char*)this + 0x30));
005f44b5                          long double x87_r6_4 = ((long double)ADJ(edx_1)->a);
005f44b8                          (x87_r6_4 - x87_r7_4);
005f44ba                          eax_6 = ((((x87_r6_4 < x87_r7_4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_4))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_4) ? 1 : 0) << 0xe) | 0))));
005f44bc                          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
005f44bc                          
005f44bf                          if (!(p_4))
005f44bf                          {
005f44c1                              ADJ(edx_1)->a = ((float)((long double)0));
005f44c1                              ADJ(edx_1)->b = ((float)((long double)0));
005f44c1                              ADJ(edx_1)->g = ((float)((long double)0));
005f44c1                              ADJ(edx_1)->r = ((float)((long double)0));
005f44bf                          }
005f44b0                      }
005f44a2                  }
005f4493              }
005f4493              
005f44d4              edx_1 = &edx_1[4];
005f44d7              i = i_1;
005f44d7              i_1 -= 1;
005f44d8          } while (i != 1);
005f4478      }
005f4465  }


005f44df  struct D3DXCOLOR* __thiscall D3DXTex::CCodec::EncodeGamma22(D3DXTex::CCodec* this, struct D3DXCOLOR* arg2)

005f44df  {
005f44e4      D3DXTex::CCodec* this_6 = this;
005f44e5      D3DXTex::CCodec* this_5 = this;
005f44e6      int32_t ebx;
005f44e6      int32_t var_10 = ebx;
005f44e7      int32_t esi;
005f44e7      int32_t var_14 = esi;
005f44ea      float* ebx_1 = nullptr;
005f44ec      bool cond:0 = *(uint32_t*)((char*)this + 0x14) == 0;
005f44ef      int32_t edi;
005f44ef      int32_t var_18 = edi;
005f44ef      int32_t* esp = &var_18;
005f44ef      
005f44f0      if (cond:0)
005f44f0      {
005f45e7          int16_t x87control;
005f45e7          int16_t x87status_1;
005f45e7          int16_t temp0_1;
005f45e7          temp0_1 = __fnstcw_memmem16(x87control);
005f45e7          this_6 = temp0_1;
005f45f5          int16_t x87control_1;
005f45f5          int16_t x87status_2;
005f45f5          x87control_1 = __fldcw_memmem16((this_6 | 0xc00));
005f45fb          *(uint32_t*)((char*)this + 0x7c) = this_6;
005f45fe          int32_t eax_18 = *(uint32_t*)((char*)this + 8);
005f45fe          
005f4609          if ((eax_18 == 1 || eax_18 == 4))
005f4609          {
005f4662              int32_t i = 0;
005f4662              
005f4665              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f4665              {
005f466a                  void* edi_6 = &arg2->b;
005f466a                  
005f46bd                  do
005f46bd                  {
005f4670                      D3DXTex::CCodec* this_2 = this;
005f467c                      *(uint32_t*)((char*)ebx_1 + *(uint32_t*)((char*)this + 0x58)) = ((float)D3DXTex::TableEncodeGamma22(((float)((long double)*(uint32_t*)((char*)edi_6 - 8)))));
005f467f                      D3DXTex::CCodec* this_3 = this;
005f468e                      *(uint32_t*)(((char*)ebx_1 + *(uint32_t*)((char*)this + 0x58)) + 4) = ((float)D3DXTex::TableEncodeGamma22(((float)((long double)*(uint32_t*)((char*)edi_6 - 4)))));
005f4692                      D3DXTex::CCodec* this_4 = this;
005f4698                      esp = &var_18;
005f46a0                      i += 1;
005f46a3                      *(uint32_t*)(((char*)ebx_1 + *(uint32_t*)((char*)this + 0x58)) + 8) = ((float)D3DXTex::TableEncodeGamma22(((float)((long double)*(uint32_t*)edi_6))));
005f46ad                      *(uint32_t*)(((char*)ebx_1 + *(uint32_t*)((char*)this + 0x58)) + 0xc) = ((float)((long double)*(uint32_t*)((char*)edi_6 + 4)));
005f46b4                      ebx_1 = &ebx_1[4];
005f46b7                      edi_6 += 0x10;
005f46bd                  } while (i < *(uint32_t*)((char*)this + 0x68));
005f4665              }
005f4609          }
005f4609          else
005f4609          {
005f460e              int32_t i_1 = 0;
005f460e              
005f4611              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f4611              {
005f461a                  float* edi_4 = &arg2->b;
005f461a                  
005f465b                  do
005f465b                  {
005f4623                      *(uint32_t*)((char*)ebx_1 + *(uint32_t*)((char*)this + 0x58)) = ((float)((long double)ADJ(edi_4)->r));
005f462c                      D3DXTex::CCodec* this_1 = this;
005f462d                      *(uint32_t*)(((char*)ebx_1 + *(uint32_t*)((char*)this + 0x58)) + 4) = ((float)((long double)ADJ(edi_4)->g));
005f4636                      *(uint32_t*)(((char*)ebx_1 + *(uint32_t*)((char*)this + 0x58)) + 8) = ((float)((long double)ADJ(edi_4)->b));
005f4640                      esp = &var_18;
005f4648                      i_1 += 1;
005f464b                      *(uint32_t*)(((char*)ebx_1 + *(uint32_t*)((char*)this + 0x58)) + 0xc) = ((float)D3DXTex::TableEncodeGamma22(((float)((long double)ADJ(edi_4)->a))));
005f4652                      ebx_1 = &ebx_1[4];
005f4655                      edi_4 = &edi_4[4];
005f465b                  } while (i_1 < *(uint32_t*)((char*)this + 0x68));
005f4611              }
005f4609          }
005f4609          
005f46c5          int16_t x87control_2;
005f46c5          int16_t x87status_3;
005f46c5          x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f44f0      }
005f44f0      else
005f44f0      {
005f44f6          int32_t eax = *(uint32_t*)((char*)this + 8);
005f44f6          
005f4501          if ((eax == 1 || eax == 4))
005f4501          {
005f456c              int32_t i_2 = 0;
005f456c              
005f456f              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f456f              {
005f4582                  float* edi_2 = &arg2->b;
005f4582                  
005f45e0                  do
005f45e0                  {
005f4588                      long double x87_r7_7 = ((long double)edi_2[-2]);
005f458b                      *(uint32_t*)((char*)esp - 4) = this;
005f458c                      *(uint32_t*)((char*)esp - 4) = ((float)x87_r7_7);
005f458f                      float* ebx_3 = ((0xfffffff8 - arg2) + edi_2);
005f4597                      long double x87_r7_9 = (TableInvSqrt(this) * ((long double)edi_2[-2]));
005f459a                      int32_t eax_10 = *(uint32_t*)((char*)this + 0x58);
005f459d                      *(uint32_t*)((char*)esp - 8) = this;
005f459e                      *(uint32_t*)((char*)ebx_3 + eax_10) = ((float)x87_r7_9);
005f45a4                      *(uint32_t*)((char*)esp - 8) = ((float)((long double)edi_2[-1]));
005f45ac                      long double x87_r7_12 = (TableInvSqrt(this) * ((long double)edi_2[-1]));
005f45af                      int32_t eax_11 = *(uint32_t*)((char*)this + 0x58);
005f45b2                      *(uint32_t*)((char*)esp - 0xc) = this;
005f45b2                      esp -= 0xc;
005f45b3                      *(uint32_t*)(((char*)ebx_3 + eax_11) + 4) = ((float)x87_r7_12);
005f45b9                      *(uint32_t*)esp = ((float)((long double)*(uint32_t*)edi_2));
005f45c1                      long double x87_r7_15 = (TableInvSqrt(this) * ((long double)*(uint32_t*)edi_2));
005f45c6                      i_2 += 1;
005f45c9                      edi_2 = &edi_2[4];
005f45cc                      *(uint32_t*)(((char*)ebx_3 + *(uint32_t*)((char*)this + 0x58)) + 8) = ((float)x87_r7_15);
005f45d6                      *(uint32_t*)(((char*)ebx_3 + *(uint32_t*)((char*)this + 0x58)) + 0xc) = ((float)((long double)edi_2[-3]));
005f45e0                  } while (i_2 < *(uint32_t*)((char*)this + 0x68));
005f456f              }
005f4501          }
005f4501          else
005f4501          {
005f4506              int32_t i_3 = 0;
005f4506              
005f4509              if (*(uint32_t*)((char*)this + 0x68) > 0)
005f4509              {
005f451c                  float* edi_1 = &arg2->a;
005f451c                  
005f4562                  do
005f4562                  {
005f4525                      float* ebx_2 = ((0xfffffff4 - arg2) + edi_1);
005f452b                      *(uint32_t*)((char*)ebx_2 + *(uint32_t*)((char*)this + 0x58)) = ((float)((long double)edi_1[-3]));
005f452e                      int32_t eax_4 = *(uint32_t*)((char*)this + 0x58);
005f4531                      long double x87_r7_2 = ((long double)edi_1[-2]);
005f4534                      *(uint32_t*)((char*)esp - 4) = this;
005f4534                      esp -= 4;
005f4535                      *(uint32_t*)((eax_4 + ebx_2) + 4) = ((float)x87_r7_2);
005f453f                      *(uint32_t*)((*(uint32_t*)((char*)this + 0x58) + ebx_2) + 8) = ((float)((long double)edi_1[-1]));
005f4545                      *(uint32_t*)esp = ((float)((long double)*(uint32_t*)edi_1));
005f454d                      long double x87_r7_6 = (TableInvSqrt(this) * ((long double)*(uint32_t*)edi_1));
005f4552                      i_3 += 1;
005f4555                      edi_1 = &edi_1[4];
005f4558                      *(uint32_t*)((*(uint32_t*)((char*)this + 0x58) + ebx_2) + 0xc) = ((float)x87_r7_6);
005f4562                  } while (i_3 < *(uint32_t*)((char*)this + 0x68));
005f4509              }
005f4501          }
005f44f0      }
005f44f0      
005f46cb      *(uint32_t*)esp;
005f46cb      esp[1];
005f46cb      esp[2];
005f46cf      return *(uint32_t*)((char*)this + 0x58);
005f44df  }


005f46d2  void __thiscall D3DXTex::CCodec::DecodeGamma22(D3DXTex::CCodec* this, struct D3DXCOLOR* arg2)

005f46d2  {
005f46d7      D3DXTex::CCodec* this_1 = this;
005f46d8      struct D3DXCOLOR* edx = arg2;
005f46db      int32_t edi;
005f46db      int32_t var_c = edi;
005f46e4      void* ecx_2 = &edx[*(uint32_t*)((char*)this + 0x68)];
005f46e4      
005f46ea      if (*(uint32_t*)((char*)this + 0x14) == 0)
005f46ea      {
005f4761          int16_t x87control;
005f4761          int16_t x87status_1;
005f4761          int16_t temp0_1;
005f4761          temp0_1 = __fnstcw_memmem16(x87control);
005f4761          arg2 = temp0_1;
005f476f          int16_t x87control_1;
005f476f          int16_t x87status_2;
005f476f          x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f4775          *(uint32_t*)((char*)this + 0x7c) = arg2;
005f4778          int32_t eax_6 = *(uint32_t*)((char*)this + 8);
005f4778          
005f4783          if ((eax_6 == 1 || eax_6 == 4))
005f4783          {
005f47ac              if (edx < ecx_2)
005f47ac              {
005f47b5                  float* esi_2 = &edx->b;
005f47b8                  int32_t i_7 = (((((char*)ecx_2 - edx) - 1) >> 4) + 1);
005f47e9                  int32_t i;
005f47e9                  
005f47e9                  do
005f47e9                  {
005f47bd                      int32_t var_18_3 = (((((char*)ecx_2 - edx) - 1) >> 4) + 1);
005f471b                      ADJ(esi_2)->r = ((float)D3DXTex::TableDecodeGamma22(((float)((long double)ADJ(esi_2)->r))));
005f47c9                      int32_t var_18_5 = (((((char*)ecx_2 - edx) - 1) >> 4) + 1);
005f471b                      ADJ(esi_2)->g = ((float)D3DXTex::TableDecodeGamma22(((float)((long double)ADJ(esi_2)->g))));
005f47d8                      int32_t var_18_7 = (((((char*)ecx_2 - edx) - 1) >> 4) + 1);
005f471b                      ADJ(esi_2)->b = ((float)D3DXTex::TableDecodeGamma22(((float)((long double)ADJ(esi_2)->b))));
005f47e5                      esi_2 = &esi_2[4];
005f47e8                      i = i_7;
005f47e8                      i_7 -= 1;
005f47e9                  } while (i != 1);
005f47ac              }
005f4783          }
005f4783          else if (edx < ecx_2)
005f4787          {
005f4790              float* esi_1 = &edx->a;
005f4793              int32_t i_6 = (((((char*)ecx_2 - edx) - 1) >> 4) + 1);
005f47a6              int32_t i_1;
005f47a6              
005f47a6              do
005f47a6              {
005f4797                  int32_t var_18_1 = (((((char*)ecx_2 - edx) - 1) >> 4) + 1);
005f471b                  ADJ(esi_1)->a = ((float)D3DXTex::TableDecodeGamma22(((float)((long double)ADJ(esi_1)->a))));
005f47a2                  esi_1 = &esi_1[4];
005f47a5                  i_1 = i_6;
005f47a5                  i_6 -= 1;
005f47a6              } while (i_1 != 1);
005f4787          }
005f4787          
005f47f1          int16_t x87control_2;
005f47f1          int16_t x87status_3;
005f47f1          x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f46ea      }
005f46ea      else
005f46ea      {
005f46ec          int32_t edi_2 = *(uint32_t*)((char*)this + 8);
005f46ec          
005f46f7          if ((edi_2 == 1 || edi_2 == 4))
005f46f7          {
005f4722              if (edx < ecx_2)
005f4722              {
005f472e                  float* eax_2 = &edx->b;
005f4731                  int32_t i_5 = (((((char*)ecx_2 - edx) - 1) >> 4) + 1);
005f4758                  int32_t i_2;
005f4758                  
005f4758                  do
005f4758                  {
005f4732                      long double x87_r7_2 = ((long double)ADJ(eax_2)->r);
005f471b                      ADJ(eax_2)->r = ((float)(x87_r7_2 * x87_r7_2));
005f473e                      long double x87_r7_3 = ((long double)ADJ(eax_2)->g);
005f471b                      ADJ(eax_2)->g = ((float)(x87_r7_3 * x87_r7_3));
005f474a                      long double x87_r7_4 = ((long double)ADJ(eax_2)->b);
005f471b                      ADJ(eax_2)->b = ((float)(x87_r7_4 * x87_r7_4));
005f4752                      eax_2 = &eax_2[4];
005f4755                      i_2 = i_5;
005f4755                      i_5 -= 1;
005f4758                  } while (i_2 != 1);
005f4722              }
005f46f7          }
005f46f7          else if (edx < ecx_2)
005f46fb          {
005f4707              float* eax_1 = &edx->a;
005f470a              int32_t i_4 = (((((char*)ecx_2 - edx) - 1) >> 4) + 1);
005f4719              int32_t i_3;
005f4719              
005f4719              do
005f4719              {
005f470b                  long double x87_r7_1 = ((long double)ADJ(eax_1)->a);
005f471b                  ADJ(eax_1)->a = ((float)(x87_r7_1 * x87_r7_1));
005f4713                  eax_1 = &eax_1[4];
005f4716                  i_3 = i_4;
005f4716                  i_4 -= 1;
005f4719              } while (i_3 != 1);
005f46fb          }
005f46ea      }
005f46d2  }


005f47fb  void __thiscall D3DXTex::CCodec::AddDiffusionError(D3DXTex::CCodec* this, struct D3DXCOLOR* arg2)

005f47fb  {
005f4800      int32_t edi;
005f4800      int32_t var_8 = edi;
005f4803      int32_t i = 0;
005f4803      
005f4808      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f4808      {
005f4812          float* eax_1 = &arg2->b;
005f4812          
005f4849          do
005f4849          {
005f481d              void* ecx_2 = ((((0xfffffff8 - arg2) + eax_1) + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f4823              i += 1;
005f4868              ADJ(eax_1)->r = ((float)(((long double)*(uint32_t*)ecx_2) + ((long double)ADJ(eax_1)->r)));
005f4868              ADJ(eax_1)->g = ((float)(((long double)*(uint32_t*)((char*)ecx_2 + 4)) + ((long double)ADJ(eax_1)->g)));
005f4868              ADJ(eax_1)->b = ((float)(((long double)*(uint32_t*)((char*)ecx_2 + 8)) + ((long double)ADJ(eax_1)->b)));
005f483a              eax_1 = &eax_1[4];
005f4868              ADJ(eax_1)->r = ((float)(((long double)*(uint32_t*)((char*)ecx_2 + 0xc)) + ((long double)ADJ(eax_1)->r)));
005f4849          } while (i < *(uint32_t*)((char*)this + 0x68));
005f4808      }
005f4808      
005f4855      int32_t ecx_6 = ((*(uint32_t*)((char*)this + 0x68) + 2) << 4);
005f4866      __builtin_memset(__builtin_memset(*(uint32_t*)((char*)this + 0x5c), 0, ((ecx_6 >> 2) << 2)), 0, (ecx_6 & 3));
005f47fb  }


005f486d  void __thiscall D3DXTex::CCodec_R8G8B8::Encode(D3DXTex::CCodec_R8G8B8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f486d  {
005f487d      int32_t edi;
005f487d      int32_t var_60 = edi;
005f487d      
005f487e      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f487e      {
005f4883          struct D3DXCOLOR* eax_1;
005f4883          int80_t st0_1;
005f4883          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f4888          arg4 = eax_1;
005f487e      }
005f487e      
005f488f      int16_t x87control;
005f488f      
005f488f      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f488f      {
005f4896          struct D3DXCOLOR* eax_2;
005f4896          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f489b          arg4 = eax_2;
005f488f      }
005f488f      
005f489e      uint32_t ecx_1 = arg2;
005f48a3      int32_t ebx = *(uint32_t*)((char*)this + 0x68);
005f48a6      float var_54 = ((float)((long double)0));
005f48ae      arg2 = (ecx_1 & 1);
005f48b2      float var_50 = ((float)((long double)0));
005f48c1      float var_4c = ((float)((long double)0));
005f48e3      char* edi_4 = ((((((ebx - 1) * arg2) * 3) + (*(uint32_t*)((char*)this + 0x60) * ecx_1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f48ea      int32_t eax_10 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((ecx_1 & 3) << 3)) << 2));
005f48f0      uint32_t edx_2;
005f48f0      int32_t ebx_1;
005f48f0      
005f48f0      if (arg2 != 0)
005f48f0      {
005f48fc          ebx_1 = (ebx - 1);
005f48fd          arg2 = 0xffffffff;
005f4901          edx_2 = 0xffffffff;
005f48f0      }
005f48f0      else
005f48f0      {
005f48f4          ebx_1 = 0;
005f48f6          edx_2 = 1;
005f48f7          arg2 = 1;
005f48f0      }
005f48f0      
005f4904      int16_t x87status;
005f4904      int16_t temp0;
005f4904      temp0 = __fnstcw_memmem16(x87control);
005f4904      arg3 = temp0;
005f4912      int16_t x87control_1;
005f4912      int16_t x87status_1;
005f4912      x87control_1 = __fldcw_memmem16((arg3 | 0xc00));
005f4918      *(uint32_t*)((char*)this + 0x7c) = arg3;
005f4918      
005f491f      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f491f      {
005f4926          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f492b          edx_2 = arg2;
005f491f      }
005f491f      
005f492e      arg2 = 0;
005f492e      
005f4936      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f4936      {
005f4941          uint32_t ecx_6 = (edx_2 << 4);
005f4954          int32_t eax_16 = (ebx_1 << 4);
005f4957          int32_t ecx_8 = ((edx_2 + ebx_1) << 4);
005f4961          arg3 = ((ebx_1 - edx_2) << 4);
005f4964          arg4 = (&arg4->b + eax_16);
005f4964          
005f4b50          do
005f4b50          {
005f4970              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_10 + ((arg2 & 3) << 2)));
005f4973              float* edx_7 = arg4;
005f4976              float var_8_1 = ((float)x87_r7_3);
005f4985              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_7[-2])) * ((long double)255f)));
005f4994              float var_40_1 = ((float)((((long double)var_50) + ((long double)edx_7[-1])) * ((long double)255f)));
005f49a2              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)*(uint32_t*)edx_7)) * ((long double)255f)));
005f49be              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_3))));
005f49d3              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)var_8_1)))));
005f49dc              int32_t var_1c_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)var_8_1)))));
005f49dc              
005f49e9              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f49e9              {
005f49ef                  long double x87_r7_11 = ((long double)0.00392156886f);
005f49fe                  float* ebx_6 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x10);
005f4a05                  long double x87_r6_14 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_11);
005f4a11                  *(uint32_t*)ebx_6 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_6)));
005f4a1c                  float* ebx_8 = ((*(uint32_t*)((char*)this + 0x5c) + eax_16) + 0x10);
005f4a24                  *(uint32_t*)ebx_8 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_8)));
005f4a2f                  float* ebx_10 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_8) + 0x10);
005f4a37                  *(uint32_t*)ebx_10 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_10)));
005f4a3c                  float* ebx_12 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x14);
005f4a46                  var_54 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f4a4f                  long double x87_r6_18 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_11);
005f4a5b                  *(uint32_t*)ebx_12 = ((float)((((long double)0.1875f) * x87_r6_18) + ((long double)*(uint32_t*)ebx_12)));
005f4a66                  float* ebx_14 = ((*(uint32_t*)((char*)this + 0x5c) + eax_16) + 0x14);
005f4a6e                  *(uint32_t*)ebx_14 = ((float)((((long double)0.3125f) * x87_r6_18) + ((long double)*(uint32_t*)ebx_14)));
005f4a79                  float* ebx_16 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_8) + 0x14);
005f4a81                  *(uint32_t*)ebx_16 = ((float)((((long double)0.0625f) * x87_r6_18) + ((long double)*(uint32_t*)ebx_16)));
005f4a86                  float* edx_12 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x18);
005f4a90                  var_50 = ((float)(x87_r6_18 * ((long double)0.4375)));
005f4a99                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_3c_1) - ((long double)var_1c_1)));
005f4aa5                  *(uint32_t*)edx_12 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edx_12)));
005f4ab0                  float* edx_14 = ((*(uint32_t*)((char*)this + 0x5c) + eax_16) + 0x18);
005f4ab8                  *(uint32_t*)edx_14 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edx_14)));
005f4ac3                  float* edx_16 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_8) + 0x18);
005f4acb                  *(uint32_t*)edx_16 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edx_16)));
005f4ad3                  var_4c = ((float)(x87_r7_12 * ((long double)0.4375)));
005f49e9              }
005f49e9              
005f4ad6              int32_t ebx_18 = var_34_1;
005f4ad9              char edx_17 = -1;
005f4ad9              
005f4ae1              if (var_34_1 >= 0xff)
005f4ae3                  ebx_18 = 0xff;
005f4ae3              
005f4ae7              if (ebx_18 <= 0)
005f4af3                  var_34_1 = 0;
005f4ae7              else if (var_34_1 >= 0xff)
005f4aee                  var_34_1 = 0xff;
005f4aee              
005f4afa              int32_t ebx_19 = var_30_1;
005f4afa              
005f4afd              if (var_30_1 >= 0xff)
005f4aff                  ebx_19 = 0xff;
005f4aff              
005f4b03              if (ebx_19 <= 0)
005f4b0f                  var_30_1 = 0;
005f4b03              else if (var_30_1 >= 0xff)
005f4b0a                  var_30_1 = 0xff;
005f4b0a              
005f4b16              int32_t ebx_20 = var_1c_1;
005f4b16              
005f4b19              if (var_1c_1 >= 0xff)
005f4b1b                  ebx_20 = 0xff;
005f4b1b              
005f4b1f              if (ebx_20 <= 0)
005f4b66                  edx_17 = 0;
005f4b1f              else if (var_1c_1 < 0xff)
005f4b26                  edx_17 = var_1c_1;
005f4b26              
005f4b29              *(uint8_t*)edi_4 = edx_17;
005f4b2e              edi_4[1] = var_30_1;
005f4b34              edi_4[2] = var_34_1;
005f4b3a              arg4 += ecx_6;
005f4b3d              arg3 += ecx_6;
005f4b40              edi_4 = &edi_4[(edx_2 * 3)];
005f4b43              eax_16 += ecx_6;
005f4b45              ecx_8 += ecx_6;
005f4b47              arg2 += 1;
005f4b50          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f4936      }
005f4936      
005f4b5c      int16_t x87control_2;
005f4b5c      int16_t x87status_2;
005f4b5c      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f486d  }


005f4b6a  void __thiscall D3DXTex::CCodec_A8R8G8B8::Encode(D3DXTex::CCodec_A8R8G8B8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f4b6a  {
005f4b7a      int32_t edi;
005f4b7a      int32_t var_64 = edi;
005f4b7a      
005f4b7b      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f4b7b      {
005f4b80          struct D3DXCOLOR* eax_1;
005f4b80          int80_t st0_1;
005f4b80          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f4b85          arg4 = eax_1;
005f4b7b      }
005f4b7b      
005f4b8c      int16_t x87control;
005f4b8c      
005f4b8c      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f4b8c      {
005f4b93          struct D3DXCOLOR* eax_2;
005f4b93          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f4b98          arg4 = eax_2;
005f4b8c      }
005f4b8c      
005f4b9b      uint32_t eax_3 = arg2;
005f4ba0      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f4ba3      float var_58 = ((float)((long double)0));
005f4bb1      float var_54 = ((float)((long double)0));
005f4bb6      float var_50 = ((float)((long double)0));
005f4bbb      float var_4c = ((float)((long double)0));
005f4bc1      arg2 = (eax_3 & 1);
005f4be4      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f4bed      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f4bf3      int32_t ebx_2;
005f4bf3      int32_t edi_2;
005f4bf3      
005f4bf3      if (arg2 != 0)
005f4bf3      {
005f4bfc          edi_2 = (edi_1 - 1);
005f4bfd          ebx_2 = 0xffffffff;
005f4bf3      }
005f4bf3      else
005f4bf3      {
005f4bf7          edi_2 = 0;
005f4bf9          ebx_2 = 1;
005f4bf3      }
005f4bf3      
005f4c00      int16_t x87status;
005f4c00      int16_t temp0;
005f4c00      temp0 = __fnstcw_memmem16(x87control);
005f4c00      arg2 = temp0;
005f4c0e      int16_t x87control_1;
005f4c0e      int16_t x87status_1;
005f4c0e      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f4c14      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f4c14      
005f4c1b      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f4c22          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f4c22      
005f4c27      arg2 = 0;
005f4c27      
005f4c2f      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f4c2f      {
005f4c44          int32_t ecx_9 = (ebx_2 << 4);
005f4c47          int32_t eax_13 = (edi_2 << 4);
005f4c56          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f4c59          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f4c5c          arg3 = (&arg4->b + eax_13);
005f4c5c          
005f4f03          do
005f4f03          {
005f4c62              long double x87_r7_4 = ((long double)255f);
005f4c6e              long double x87_r6_1 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f4c71              float* edx_8 = arg3;
005f4c74              arg4 = ((float)x87_r6_1);
005f4c7f              float var_48_1 = ((float)((((long double)var_58) + ((long double)edx_8[-2])) * x87_r7_4));
005f4c8a              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_8[-1])) * x87_r7_4));
005f4c94              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edx_8)) * x87_r7_4));
005f4c9f              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)edx_8[1])) * x87_r7_4));
005f4cbd              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r6_1))));
005f4cd2              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f4ce7              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f4cf7              int32_t edx_12 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f4cf7              
005f4cfd              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f4cfd              {
005f4d03                  long double x87_r7_16 = ((long double)0.00392156886f);
005f4d0f                  float* ebx_5 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f4d16                  long double x87_r6_4 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_16);
005f4d22                  *(uint32_t*)ebx_5 = ((float)((((long double)0.1875f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_5)));
005f4d2d                  float* ebx_7 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f4d35                  *(uint32_t*)ebx_7 = ((float)((((long double)0.3125f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_7)));
005f4d40                  float* ebx_9 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f4d48                  *(uint32_t*)ebx_9 = ((float)((((long double)0.0625f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_9)));
005f4d4d                  float* ebx_11 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f4d57                  var_58 = ((float)(x87_r6_4 * ((long double)0.4375)));
005f4d60                  long double x87_r6_8 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_16);
005f4d6c                  *(uint32_t*)ebx_11 = ((float)((((long double)0.1875f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_11)));
005f4d77                  float* ebx_13 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f4d7f                  *(uint32_t*)ebx_13 = ((float)((((long double)0.3125f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_13)));
005f4d8a                  float* ebx_15 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f4d92                  *(uint32_t*)ebx_15 = ((float)((((long double)0.0625f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_15)));
005f4d97                  float* ebx_17 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f4da1                  var_54 = ((float)(x87_r6_8 * ((long double)0.4375)));
005f4daa                  long double x87_r6_12 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_16);
005f4db6                  *(uint32_t*)ebx_17 = ((float)((((long double)0.1875f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_17)));
005f4dc1                  float* ebx_19 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x18);
005f4dc9                  *(uint32_t*)ebx_19 = ((float)((((long double)0.3125f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_19)));
005f4dd4                  float* ebx_21 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f4ddc                  *(uint32_t*)ebx_21 = ((float)((((long double)0.0625f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_21)));
005f4de1                  float* ebx_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f4deb                  var_50 = ((float)(x87_r6_12 * ((long double)0.4375)));
005f4df4                  long double x87_r7_17 = (x87_r7_16 * (((long double)var_3c_1) - ((long double)edx_12)));
005f4e00                  *(uint32_t*)ebx_23 = ((float)((((long double)0.1875f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_23)));
005f4e0b                  float* ebx_25 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x1c);
005f4e13                  *(uint32_t*)ebx_25 = ((float)((((long double)0.3125f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_25)));
005f4e1e                  float* ebx_27 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f4e26                  *(uint32_t*)ebx_27 = ((float)((((long double)0.0625f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_27)));
005f4e2e                  var_4c = ((float)(x87_r7_17 * ((long double)0.4375)));
005f4cfd              }
005f4cfd              
005f4e31              int32_t ebx_28 = var_38_1;
005f4e31              
005f4e3a              if (ebx_28 >= 0xff)
005f4e3c                  ebx_28 = 0xff;
005f4e3c              
005f4e43              if (ebx_28 <= 0)
005f4e57                  var_38_1 = 0;
005f4e43              else if (var_38_1 >= 0xff)
005f4e4e                  var_38_1 = 0xff;
005f4e4e              
005f4e5b              int32_t ebx_29 = var_34_1;
005f4e5b              
005f4e64              if (ebx_29 >= 0xff)
005f4e66                  ebx_29 = 0xff;
005f4e66              
005f4e6d              if (ebx_29 <= 0)
005f4e81                  var_34_1 = 0;
005f4e6d              else if (var_34_1 >= 0xff)
005f4e78                  var_34_1 = 0xff;
005f4e78              
005f4e85              int32_t ebx_30 = var_30_1;
005f4e85              
005f4e8e              if (ebx_30 >= 0xff)
005f4e90                  ebx_30 = 0xff;
005f4e90              
005f4e97              if (ebx_30 <= 0)
005f4eab                  var_30_1 = 0;
005f4e97              else if (var_30_1 >= 0xff)
005f4ea2                  var_30_1 = 0xff;
005f4ea2              
005f4eb5              int32_t ebx_31 = edx_12;
005f4eb5              
005f4eb7              if (edx_12 >= 0xff)
005f4eb9                  ebx_31 = 0xff;
005f4eb9              
005f4ec0              if (ebx_31 <= 0)
005f4ecf                  edx_12 = 0;
005f4ec0              else if (edx_12 >= 0xff)
005f4ecb                  edx_12 = 0xff;
005f4ecb              
005f4ed1              int32_t* ebx_32 = var_8;
005f4ee6              *(uint32_t*)ebx_32 = ((((((edx_12 << 8) | var_38_1) << 8) | var_34_1) << 8) | var_30_1);
005f4eee              arg3 += ecx_9;
005f4ef1              eax_13 += ecx_9;
005f4ef3              edi_4 += ecx_9;
005f4ef5              ecx_11 += ecx_9;
005f4ef7              arg2 += 1;
005f4f00              var_8 = &ebx_32[ebx_2];
005f4f03          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f4c2f      }
005f4c2f      
005f4f0f      int16_t x87control_2;
005f4f0f      int16_t x87status_2;
005f4f0f      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f4b6a  }


005f4f19  void __thiscall D3DXTex::CCodec_X8R8G8B8::Encode(D3DXTex::CCodec_X8R8G8B8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f4f19  {
005f4f29      int32_t edi;
005f4f29      int32_t var_60 = edi;
005f4f29      
005f4f2a      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f4f2a      {
005f4f2f          struct D3DXCOLOR* eax_1;
005f4f2f          int80_t st0_1;
005f4f2f          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f4f34          arg4 = eax_1;
005f4f2a      }
005f4f2a      
005f4f3b      int16_t x87control;
005f4f3b      
005f4f3b      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f4f3b      {
005f4f42          struct D3DXCOLOR* eax_2;
005f4f42          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f4f47          arg4 = eax_2;
005f4f3b      }
005f4f3b      
005f4f4a      uint32_t eax_3 = arg2;
005f4f4f      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f4f52      float var_54 = ((float)((long double)0));
005f4f60      float var_50 = ((float)((long double)0));
005f4f65      float var_4c = ((float)((long double)0));
005f4f6b      arg2 = (eax_3 & 1);
005f4f94      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f4f97      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f4f9d      int32_t ebx_2;
005f4f9d      int32_t edi_2;
005f4f9d      
005f4f9d      if (arg2 != 0)
005f4f9d      {
005f4fa6          edi_2 = (edi_1 - 1);
005f4fa7          ebx_2 = 0xffffffff;
005f4f9d      }
005f4f9d      else
005f4f9d      {
005f4fa1          edi_2 = 0;
005f4fa3          ebx_2 = 1;
005f4f9d      }
005f4f9d      
005f4faa      int16_t x87status;
005f4faa      int16_t temp0;
005f4faa      temp0 = __fnstcw_memmem16(x87control);
005f4faa      arg2 = temp0;
005f4fb8      int16_t x87control_1;
005f4fb8      int16_t x87status_1;
005f4fb8      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f4fbe      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f4fbe      
005f4fc5      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f4fcc          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f4fcc      
005f4fd1      arg2 = 0;
005f4fd1      
005f4fd9      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f4fd9      {
005f4fe9          int32_t ecx_8 = (ebx_2 << 4);
005f4ff7          int32_t eax_13 = (edi_2 << 4);
005f4ffc          int32_t ecx_10 = ((ebx_2 + edi_2) << 4);
005f5006          int32_t ebx_3 = ((edi_2 - ebx_2) << 4);
005f5008          arg4 = (&arg4->b + eax_13);
005f5008          
005f5219          do
005f5219          {
005f5014              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f5017              float* edx_9 = arg4;
005f501a              arg3 = ((float)x87_r7_3);
005f5029              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_9[-2])) * ((long double)255f)));
005f5038              float var_40_1 = ((float)((((long double)var_50) + ((long double)edx_9[-1])) * ((long double)255f)));
005f5046              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)*(uint32_t*)edx_9)) * ((long double)255f)));
005f505c              int32_t edx_10 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_3))));
005f5077              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg3)))));
005f508a              int32_t var_2c_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg3)))));
005f508a              
005f508d              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f508d              {
005f5093                  long double x87_r7_11 = ((long double)0.00392156886f);
005f509f                  float* edi_9 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x10);
005f50a6                  long double x87_r6_14 = ((((long double)var_44_1) - ((long double)edx_10)) * x87_r7_11);
005f50b2                  *(uint32_t*)edi_9 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)edi_9)));
005f50bd                  float* edi_11 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f50c5                  *(uint32_t*)edi_11 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)edi_11)));
005f50d0                  float* edi_13 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x10);
005f50d8                  *(uint32_t*)edi_13 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)edi_13)));
005f50dd                  float* edi_15 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x14);
005f50e7                  var_54 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f50f0                  long double x87_r6_18 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_11);
005f50fc                  *(uint32_t*)edi_15 = ((float)((((long double)0.1875f) * x87_r6_18) + ((long double)*(uint32_t*)edi_15)));
005f5107                  float* edi_17 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f510f                  *(uint32_t*)edi_17 = ((float)((((long double)0.3125f) * x87_r6_18) + ((long double)*(uint32_t*)edi_17)));
005f511a                  float* edi_19 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x14);
005f5122                  *(uint32_t*)edi_19 = ((float)((((long double)0.0625f) * x87_r6_18) + ((long double)*(uint32_t*)edi_19)));
005f5127                  float* edi_21 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x18);
005f5131                  var_50 = ((float)(x87_r6_18 * ((long double)0.4375)));
005f513a                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_3c_1) - ((long double)var_2c_1)));
005f5146                  *(uint32_t*)edi_21 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edi_21)));
005f5151                  float* edi_23 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x18);
005f5159                  *(uint32_t*)edi_23 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edi_23)));
005f5164                  float* edi_25 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x18);
005f516c                  *(uint32_t*)edi_25 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edi_25)));
005f5174                  var_4c = ((float)(x87_r7_12 * ((long double)0.4375)));
005f508d              }
005f508d              
005f517d              int32_t edi_26 = edx_10;
005f517d              
005f517f              if (edx_10 >= 0xff)
005f5181                  edi_26 = 0xff;
005f5181              
005f5188              if (edi_26 <= 0)
005f5197                  edx_10 = 0;
005f5188              else if (edx_10 >= 0xff)
005f5193                  edx_10 = 0xff;
005f5193              
005f5199              int32_t edi_27 = var_30_1;
005f5199              
005f51a2              if (edi_27 >= 0xff)
005f51a4                  edi_27 = 0xff;
005f51a4              
005f51ab              if (edi_27 <= 0)
005f51bf                  var_30_1 = 0;
005f51ab              else if (var_30_1 >= 0xff)
005f51b6                  var_30_1 = 0xff;
005f51b6              
005f51c3              int32_t edi_28 = var_2c_1;
005f51c3              
005f51cc              if (edi_28 >= 0xff)
005f51ce                  edi_28 = 0xff;
005f51ce              
005f51d5              if (edi_28 <= 0)
005f51e9                  var_2c_1 = 0;
005f51d5              else if (var_2c_1 >= 0xff)
005f51e0                  var_2c_1 = 0xff;
005f51e0              
005f51ed              int32_t* edi_29 = var_8;
005f51fc              *(uint32_t*)edi_29 = ((((edx_10 << 8) | var_30_1) << 8) | var_2c_1);
005f5204              arg4 += ecx_8;
005f5207              eax_13 += ecx_8;
005f5209              ebx_3 += ecx_8;
005f520b              ecx_10 += ecx_8;
005f520d              arg2 += 1;
005f5216              var_8 = &edi_29[ebx_2];
005f5219          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f4fd9      }
005f4fd9      
005f5225      int16_t x87control_2;
005f5225      int16_t x87status_2;
005f5225      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f4f19  }


005f522f  void __thiscall D3DXTex::CCodec_R5G6B5::Encode(D3DXTex::CCodec_R5G6B5* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f522f  {
005f523f      int32_t edi;
005f523f      int32_t var_60 = edi;
005f523f      
005f5240      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f5240      {
005f5245          struct D3DXCOLOR* eax_1;
005f5245          int80_t st0_1;
005f5245          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f524a          arg4 = eax_1;
005f5240      }
005f5240      
005f5251      int16_t x87control;
005f5251      
005f5251      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f5251      {
005f5258          struct D3DXCOLOR* eax_2;
005f5258          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f525d          arg4 = eax_2;
005f5251      }
005f5251      
005f5260      uint32_t eax_3 = arg2;
005f5265      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f5268      float var_54 = ((float)((long double)0));
005f5276      float var_50 = ((float)((long double)0));
005f527b      float var_4c = ((float)((long double)0));
005f5281      arg2 = (eax_3 & 1);
005f52aa      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f52ad      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f52b3      int32_t ebx_2;
005f52b3      int32_t edi_2;
005f52b3      
005f52b3      if (arg2 != 0)
005f52b3      {
005f52bc          edi_2 = (edi_1 - 1);
005f52bd          ebx_2 = 0xffffffff;
005f52b3      }
005f52b3      else
005f52b3      {
005f52b7          edi_2 = 0;
005f52b9          ebx_2 = 1;
005f52b3      }
005f52b3      
005f52c0      int16_t x87status;
005f52c0      int16_t temp0;
005f52c0      temp0 = __fnstcw_memmem16(x87control);
005f52c0      arg2 = temp0;
005f52ce      int16_t x87control_1;
005f52ce      int16_t x87status_1;
005f52ce      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f52d4      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f52d4      
005f52db      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f52e2          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f52e2      
005f52e7      arg2 = 0;
005f52e7      
005f52ef      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f52ef      {
005f52fd          int32_t ecx_8 = (ebx_2 << 4);
005f530b          int32_t eax_12 = (edi_2 << 4);
005f5310          int32_t ecx_10 = ((ebx_2 + edi_2) << 4);
005f531a          int32_t ebx_3 = ((edi_2 - ebx_2) << 4);
005f531c          arg4 = (&arg4->b + eax_12);
005f531c          
005f551c          do
005f551c          {
005f5328              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f532b              float* edx_9 = arg4;
005f532e              arg3 = ((float)x87_r7_3);
005f533d              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_9[-2])) * ((long double)31f)));
005f534c              float var_40_1 = ((float)((((long double)var_50) + ((long double)edx_9[-1])) * ((long double)63f)));
005f535a              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)*(uint32_t*)edx_9)) * ((long double)31f)));
005f5370              int32_t edx_10 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_3))));
005f538b              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg3)))));
005f539e              int32_t var_2c_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg3)))));
005f539e              
005f53a1              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f53a1              {
005f53a7                  long double x87_r7_11 = ((long double)0.0322580636f);
005f53b3                  float* edi_9 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x10);
005f53ba                  long double x87_r6_14 = ((((long double)var_44_1) - ((long double)edx_10)) * x87_r7_11);
005f53c6                  *(uint32_t*)edi_9 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)edi_9)));
005f53d1                  float* edi_11 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x10);
005f53d9                  *(uint32_t*)edi_11 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)edi_11)));
005f53e4                  float* edi_13 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x10);
005f53ec                  *(uint32_t*)edi_13 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)edi_13)));
005f53f1                  float* edi_15 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x14);
005f53fb                  var_54 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f5404                  long double x87_r6_18 = ((((long double)var_40_1) - ((long double)var_30_1)) * ((long double)0.0158730168f));
005f5414                  *(uint32_t*)edi_15 = ((float)((((long double)0.1875f) * x87_r6_18) + ((long double)*(uint32_t*)edi_15)));
005f541f                  float* edi_17 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x14);
005f5427                  *(uint32_t*)edi_17 = ((float)((((long double)0.3125f) * x87_r6_18) + ((long double)*(uint32_t*)edi_17)));
005f5432                  float* edi_19 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x14);
005f543a                  *(uint32_t*)edi_19 = ((float)((((long double)0.0625f) * x87_r6_18) + ((long double)*(uint32_t*)edi_19)));
005f543f                  float* edi_21 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x18);
005f5449                  var_50 = ((float)(x87_r6_18 * ((long double)0.4375)));
005f5452                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_3c_1) - ((long double)var_2c_1)));
005f545e                  *(uint32_t*)edi_21 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edi_21)));
005f5469                  float* edi_23 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x18);
005f5471                  *(uint32_t*)edi_23 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edi_23)));
005f547c                  float* edi_25 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x18);
005f5484                  *(uint32_t*)edi_25 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edi_25)));
005f548c                  var_4c = ((float)(x87_r7_12 * ((long double)0.4375)));
005f53a1              }
005f53a1              
005f5492              int32_t edi_26;
005f5492              
005f5492              if (edx_10 >= 0x1f)
005f549a                  edi_26 = 0x1f;
005f5492              else
005f5494                  edi_26 = edx_10;
005f5494              
005f549d              if (edi_26 <= 0)
005f54a9                  edx_10 = 0;
005f549d              else if (edx_10 >= 0x1f)
005f54a6                  edx_10 = 0x1f;
005f54a6              
005f54ab              int32_t edi_27 = var_30_1;
005f54ab              
005f54b1              if (edi_27 >= 0x3f)
005f54b5                  edi_27 = 0x3f;
005f54b5              
005f54b8              if (edi_27 <= 0)
005f54c9                  var_30_1 = 0;
005f54b8              else if (var_30_1 >= 0x3f)
005f54c0                  var_30_1 = 0x3f;
005f54c0              
005f54cd              int32_t edi_28 = var_2c_1;
005f54cd              
005f54d3              if (edi_28 >= 0x1f)
005f54d7                  edi_28 = 0x1f;
005f54d7              
005f54da              if (edi_28 <= 0)
005f54eb                  var_2c_1 = 0;
005f54da              else if (var_2c_1 >= 0x1f)
005f54e2                  var_2c_1 = 0x1f;
005f54e2              
005f54ef              int16_t* edi_29 = var_8;
005f54fe              *(uint16_t*)edi_29 = (((int16_t)(((edx_10 << 6) | var_30_1) << 5)) | var_2c_1);
005f5507              arg4 += ecx_8;
005f550a              eax_12 += ecx_8;
005f550c              ebx_3 += ecx_8;
005f550e              ecx_10 += ecx_8;
005f5510              arg2 += 1;
005f5519              var_8 = &edi_29[ebx_2];
005f551c          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f52ef      }
005f52ef      
005f5528      int16_t x87control_2;
005f5528      int16_t x87status_2;
005f5528      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f522f  }


005f5532  void __thiscall D3DXTex::CCodec_X1R5G5B5::Encode(D3DXTex::CCodec_X1R5G5B5* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f5532  {
005f5542      int32_t edi;
005f5542      int32_t var_60 = edi;
005f5542      
005f5543      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f5543      {
005f5548          struct D3DXCOLOR* eax_1;
005f5548          int80_t st0_1;
005f5548          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f554d          arg4 = eax_1;
005f5543      }
005f5543      
005f5554      int16_t x87control;
005f5554      
005f5554      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f5554      {
005f555b          struct D3DXCOLOR* eax_2;
005f555b          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f5560          arg4 = eax_2;
005f5554      }
005f5554      
005f5563      uint32_t eax_3 = arg2;
005f5568      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f556b      float var_54 = ((float)((long double)0));
005f5579      float var_50 = ((float)((long double)0));
005f557e      float var_4c = ((float)((long double)0));
005f5584      arg2 = (eax_3 & 1);
005f55ad      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f55b0      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f55b6      int32_t ebx_2;
005f55b6      int32_t edi_2;
005f55b6      
005f55b6      if (arg2 != 0)
005f55b6      {
005f55bf          edi_2 = (edi_1 - 1);
005f55c0          ebx_2 = 0xffffffff;
005f55b6      }
005f55b6      else
005f55b6      {
005f55ba          edi_2 = 0;
005f55bc          ebx_2 = 1;
005f55b6      }
005f55b6      
005f55c3      int16_t x87status;
005f55c3      int16_t temp0;
005f55c3      temp0 = __fnstcw_memmem16(x87control);
005f55c3      arg2 = temp0;
005f55d1      int16_t x87control_1;
005f55d1      int16_t x87status_1;
005f55d1      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f55d7      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f55d7      
005f55de      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f55e5          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f55e5      
005f55ea      arg2 = 0;
005f55ea      
005f55f2      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f55f2      {
005f5600          int32_t ecx_8 = (ebx_2 << 4);
005f560e          int32_t eax_12 = (edi_2 << 4);
005f5613          int32_t ecx_10 = ((ebx_2 + edi_2) << 4);
005f561d          int32_t ebx_3 = ((edi_2 - ebx_2) << 4);
005f561f          arg4 = (&arg4->b + eax_12);
005f561f          
005f581b          do
005f581b          {
005f562b              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f562e              float* edx_9 = arg4;
005f5631              arg3 = ((float)x87_r7_3);
005f5640              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_9[-2])) * ((long double)31f)));
005f564f              float var_40_1 = ((float)((((long double)var_50) + ((long double)edx_9[-1])) * ((long double)31f)));
005f565d              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)*(uint32_t*)edx_9)) * ((long double)31f)));
005f5673              int32_t edx_10 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_3))));
005f568e              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg3)))));
005f56a1              int32_t var_2c_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg3)))));
005f56a1              
005f56a4              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f56a4              {
005f56aa                  long double x87_r7_11 = ((long double)0.0322580636f);
005f56b6                  float* edi_9 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x10);
005f56bd                  long double x87_r6_14 = ((((long double)var_44_1) - ((long double)edx_10)) * x87_r7_11);
005f56c9                  *(uint32_t*)edi_9 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)edi_9)));
005f56d4                  float* edi_11 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x10);
005f56dc                  *(uint32_t*)edi_11 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)edi_11)));
005f56e7                  float* edi_13 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x10);
005f56ef                  *(uint32_t*)edi_13 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)edi_13)));
005f56f4                  float* edi_15 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x14);
005f56fe                  var_54 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f5707                  long double x87_r6_18 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_11);
005f5713                  *(uint32_t*)edi_15 = ((float)((((long double)0.1875f) * x87_r6_18) + ((long double)*(uint32_t*)edi_15)));
005f571e                  float* edi_17 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x14);
005f5726                  *(uint32_t*)edi_17 = ((float)((((long double)0.3125f) * x87_r6_18) + ((long double)*(uint32_t*)edi_17)));
005f5731                  float* edi_19 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x14);
005f5739                  *(uint32_t*)edi_19 = ((float)((((long double)0.0625f) * x87_r6_18) + ((long double)*(uint32_t*)edi_19)));
005f573e                  float* edi_21 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x18);
005f5748                  var_50 = ((float)(x87_r6_18 * ((long double)0.4375)));
005f5751                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_3c_1) - ((long double)var_2c_1)));
005f575d                  *(uint32_t*)edi_21 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edi_21)));
005f5768                  float* edi_23 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x18);
005f5770                  *(uint32_t*)edi_23 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edi_23)));
005f577b                  float* edi_25 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x18);
005f5783                  *(uint32_t*)edi_25 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edi_25)));
005f578b                  var_4c = ((float)(x87_r7_12 * ((long double)0.4375)));
005f56a4              }
005f56a4              
005f5791              int32_t edi_26;
005f5791              
005f5791              if (edx_10 >= 0x1f)
005f5799                  edi_26 = 0x1f;
005f5791              else
005f5793                  edi_26 = edx_10;
005f5793              
005f579c              if (edi_26 <= 0)
005f57a8                  edx_10 = 0;
005f579c              else if (edx_10 >= 0x1f)
005f57a5                  edx_10 = 0x1f;
005f57a5              
005f57aa              int32_t edi_27 = var_30_1;
005f57aa              
005f57b0              if (edi_27 >= 0x1f)
005f57b4                  edi_27 = 0x1f;
005f57b4              
005f57b7              if (edi_27 <= 0)
005f57c8                  var_30_1 = 0;
005f57b7              else if (var_30_1 >= 0x1f)
005f57bf                  var_30_1 = 0x1f;
005f57bf              
005f57cc              int32_t edi_28 = var_2c_1;
005f57cc              
005f57d2              if (edi_28 >= 0x1f)
005f57d6                  edi_28 = 0x1f;
005f57d6              
005f57d9              if (edi_28 <= 0)
005f57ea                  var_2c_1 = 0;
005f57d9              else if (var_2c_1 >= 0x1f)
005f57e1                  var_2c_1 = 0x1f;
005f57e1              
005f57ee              int16_t* edi_29 = var_8;
005f57fd              *(uint16_t*)edi_29 = (((int16_t)(((edx_10 << 5) | var_30_1) << 5)) | var_2c_1);
005f5806              arg4 += ecx_8;
005f5809              eax_12 += ecx_8;
005f580b              ebx_3 += ecx_8;
005f580d              ecx_10 += ecx_8;
005f580f              arg2 += 1;
005f5818              var_8 = &edi_29[ebx_2];
005f581b          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f55f2      }
005f55f2      
005f5827      int16_t x87control_2;
005f5827      int16_t x87status_2;
005f5827      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f5532  }


005f5831  void __thiscall D3DXTex::CCodec_A1R5G5B5::Encode(D3DXTex::CCodec_A1R5G5B5* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f5831  {
005f5841      int32_t edi;
005f5841      int32_t var_64 = edi;
005f5841      
005f5842      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f5842      {
005f5847          struct D3DXCOLOR* eax_1;
005f5847          int80_t st0_1;
005f5847          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f584c          arg4 = eax_1;
005f5842      }
005f5842      
005f5853      int16_t x87control;
005f5853      
005f5853      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f5853      {
005f585a          struct D3DXCOLOR* eax_2;
005f585a          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f585f          arg4 = eax_2;
005f5853      }
005f5853      
005f5862      uint32_t eax_3 = arg2;
005f5867      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f586a      float var_58 = ((float)((long double)0));
005f5878      float var_54 = ((float)((long double)0));
005f587d      float var_50 = ((float)((long double)0));
005f5882      float var_4c = ((float)((long double)0));
005f5888      arg2 = (eax_3 & 1);
005f58ab      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f58b4      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f58ba      int32_t ebx_2;
005f58ba      int32_t edi_2;
005f58ba      
005f58ba      if (arg2 != 0)
005f58ba      {
005f58c3          edi_2 = (edi_1 - 1);
005f58c4          ebx_2 = 0xffffffff;
005f58ba      }
005f58ba      else
005f58ba      {
005f58be          edi_2 = 0;
005f58c0          ebx_2 = 1;
005f58ba      }
005f58ba      
005f58c7      int16_t x87status;
005f58c7      int16_t temp0;
005f58c7      temp0 = __fnstcw_memmem16(x87control);
005f58c7      arg2 = temp0;
005f58d5      int16_t x87control_1;
005f58d5      int16_t x87status_1;
005f58d5      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f58db      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f58db      
005f58e2      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f58e9          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f58e9      
005f58ee      arg2 = 0;
005f58ee      
005f58f6      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f58f6      {
005f5909          int32_t ecx_9 = (ebx_2 << 4);
005f590c          int32_t eax_12 = (edi_2 << 4);
005f591b          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f591e          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f5921          arg3 = (&arg4->b + eax_12);
005f5921          
005f5bab          do
005f5bab          {
005f592d              long double x87_r7_4 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f5930              float* edx_8 = arg3;
005f5933              arg4 = ((float)x87_r7_4);
005f5942              float var_48_1 = ((float)((((long double)var_58) + ((long double)edx_8[-2])) * ((long double)31f)));
005f5951              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_8[-1])) * ((long double)31f)));
005f595f              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edx_8)) * ((long double)31f)));
005f5968              float var_3c_1 = ((float)(((long double)var_4c) + ((long double)edx_8[1])));
005f5984              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r7_4))));
005f5999              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f59ae              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f59be              int32_t edx_12 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f59be              
005f59c4              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f59c4              {
005f59ca                  long double x87_r7_15 = ((long double)0.0322580636f);
005f59d6                  float* ebx_5 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f59dd                  long double x87_r6_16 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_15);
005f59e9                  *(uint32_t*)ebx_5 = ((float)((((long double)0.1875f) * x87_r6_16) + ((long double)*(uint32_t*)ebx_5)));
005f59f4                  float* ebx_7 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x10);
005f59fc                  *(uint32_t*)ebx_7 = ((float)((((long double)0.3125f) * x87_r6_16) + ((long double)*(uint32_t*)ebx_7)));
005f5a07                  float* ebx_9 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f5a0f                  *(uint32_t*)ebx_9 = ((float)((((long double)0.0625f) * x87_r6_16) + ((long double)*(uint32_t*)ebx_9)));
005f5a14                  float* ebx_11 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f5a1e                  var_58 = ((float)(x87_r6_16 * ((long double)0.4375)));
005f5a27                  long double x87_r6_20 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_15);
005f5a33                  *(uint32_t*)ebx_11 = ((float)((((long double)0.1875f) * x87_r6_20) + ((long double)*(uint32_t*)ebx_11)));
005f5a3e                  float* ebx_13 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x14);
005f5a46                  *(uint32_t*)ebx_13 = ((float)((((long double)0.3125f) * x87_r6_20) + ((long double)*(uint32_t*)ebx_13)));
005f5a51                  float* ebx_15 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f5a59                  *(uint32_t*)ebx_15 = ((float)((((long double)0.0625f) * x87_r6_20) + ((long double)*(uint32_t*)ebx_15)));
005f5a5e                  float* ebx_17 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f5a68                  var_54 = ((float)(x87_r6_20 * ((long double)0.4375)));
005f5a71                  long double x87_r7_16 = (x87_r7_15 * (((long double)var_40_1) - ((long double)var_30_1)));
005f5a7d                  *(uint32_t*)ebx_17 = ((float)((((long double)0.1875f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_17)));
005f5a88                  float* ebx_19 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x18);
005f5a90                  *(uint32_t*)ebx_19 = ((float)((((long double)0.3125f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_19)));
005f5a9b                  float* ebx_21 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f5aa3                  *(uint32_t*)ebx_21 = ((float)((((long double)0.0625f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_21)));
005f5aa8                  float* ebx_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f5ab2                  var_50 = ((float)(x87_r7_16 * ((long double)0.4375)));
005f5ab8                  long double x87_r7_19 = (((long double)var_3c_1) - ((long double)edx_12));
005f5ac5                  *(uint32_t*)ebx_23 = ((float)((((long double)0.1875f) * x87_r7_19) + ((long double)*(uint32_t*)ebx_23)));
005f5ad2                  float* ebx_25 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x1c);
005f5ad8                  *(uint32_t*)ebx_25 = ((float)((((long double)0.3125f) * x87_r7_19) + ((long double)*(uint32_t*)ebx_25)));
005f5ae3                  float* ebx_27 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f5aeb                  *(uint32_t*)ebx_27 = ((float)((((long double)0.0625f) * x87_r7_19) + ((long double)*(uint32_t*)ebx_27)));
005f5af3                  var_4c = ((float)(x87_r7_19 * ((long double)0.4375)));
005f59c4              }
005f59c4              
005f5af6              int32_t ebx_28 = var_38_1;
005f5af6              
005f5afc              if (ebx_28 >= 0x1f)
005f5b00                  ebx_28 = 0x1f;
005f5b00              
005f5b03              if (ebx_28 <= 0)
005f5b14                  var_38_1 = 0;
005f5b03              else if (var_38_1 >= 0x1f)
005f5b0b                  var_38_1 = 0x1f;
005f5b0b              
005f5b18              int32_t ebx_29 = var_34_1;
005f5b18              
005f5b1e              if (ebx_29 >= 0x1f)
005f5b22                  ebx_29 = 0x1f;
005f5b22              
005f5b25              if (ebx_29 <= 0)
005f5b36                  var_34_1 = 0;
005f5b25              else if (var_34_1 >= 0x1f)
005f5b2d                  var_34_1 = 0x1f;
005f5b2d              
005f5b3a              int32_t ebx_30 = var_30_1;
005f5b3a              
005f5b40              if (ebx_30 >= 0x1f)
005f5b44                  ebx_30 = 0x1f;
005f5b44              
005f5b47              if (ebx_30 <= 0)
005f5b58                  var_30_1 = 0;
005f5b47              else if (var_30_1 >= 0x1f)
005f5b4f                  var_30_1 = 0x1f;
005f5b4f              
005f5b5f              int32_t ebx_31;
005f5b5f              
005f5b5f              if (edx_12 >= 1)
005f5b67                  ebx_31 = 1;
005f5b5f              else
005f5b61                  ebx_31 = edx_12;
005f5b61              
005f5b6a              if (ebx_31 <= 0)
005f5b76                  edx_12 = 0;
005f5b6a              else if (edx_12 >= 1)
005f5b73                  edx_12 = 1;
005f5b73              
005f5b78              int16_t* ebx_32 = var_8;
005f5b8d              *(uint16_t*)ebx_32 = (((int16_t)(((((edx_12 << 5) | var_38_1) << 5) | var_34_1) << 5)) | var_30_1);
005f5b96              arg3 += ecx_9;
005f5b99              eax_12 += ecx_9;
005f5b9b              edi_4 += ecx_9;
005f5b9d              ecx_11 += ecx_9;
005f5b9f              arg2 += 1;
005f5ba8              var_8 = &ebx_32[ebx_2];
005f5bab          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f58f6      }
005f58f6      
005f5bb7      int16_t x87control_2;
005f5bb7      int16_t x87status_2;
005f5bb7      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f5831  }


005f5bc1  void __thiscall D3DXTex::CCodec_A4R4G4B4::Encode(D3DXTex::CCodec_A4R4G4B4* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f5bc1  {
005f5bd1      int32_t edi;
005f5bd1      int32_t var_64 = edi;
005f5bd1      
005f5bd2      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f5bd2      {
005f5bd7          struct D3DXCOLOR* eax_1;
005f5bd7          int80_t st0_1;
005f5bd7          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f5bdc          arg4 = eax_1;
005f5bd2      }
005f5bd2      
005f5be3      int16_t x87control;
005f5be3      
005f5be3      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f5be3      {
005f5bea          struct D3DXCOLOR* eax_2;
005f5bea          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f5bef          arg4 = eax_2;
005f5be3      }
005f5be3      
005f5bf2      uint32_t eax_3 = arg2;
005f5bf7      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f5bfa      float var_58 = ((float)((long double)0));
005f5c08      float var_54 = ((float)((long double)0));
005f5c0d      float var_50 = ((float)((long double)0));
005f5c12      float var_4c = ((float)((long double)0));
005f5c18      arg2 = (eax_3 & 1);
005f5c3b      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f5c44      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f5c4a      int32_t ebx_2;
005f5c4a      int32_t edi_2;
005f5c4a      
005f5c4a      if (arg2 != 0)
005f5c4a      {
005f5c53          edi_2 = (edi_1 - 1);
005f5c54          ebx_2 = 0xffffffff;
005f5c4a      }
005f5c4a      else
005f5c4a      {
005f5c4e          edi_2 = 0;
005f5c50          ebx_2 = 1;
005f5c4a      }
005f5c4a      
005f5c57      int16_t x87status;
005f5c57      int16_t temp0;
005f5c57      temp0 = __fnstcw_memmem16(x87control);
005f5c57      arg2 = temp0;
005f5c65      int16_t x87control_1;
005f5c65      int16_t x87status_1;
005f5c65      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f5c6b      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f5c6b      
005f5c72      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f5c79          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f5c79      
005f5c7e      arg2 = 0;
005f5c7e      
005f5c86      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f5c86      {
005f5c99          int32_t ecx_9 = (ebx_2 << 4);
005f5c9c          int32_t eax_12 = (edi_2 << 4);
005f5cab          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f5cae          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f5cb1          arg3 = (&arg4->b + eax_12);
005f5cb1          
005f5f3b          do
005f5f3b          {
005f5cb7              long double x87_r7_4 = ((long double)15f);
005f5cc3              long double x87_r6_1 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f5cc6              float* edx_8 = arg3;
005f5cc9              arg4 = ((float)x87_r6_1);
005f5cd4              float var_48_1 = ((float)((((long double)var_58) + ((long double)edx_8[-2])) * x87_r7_4));
005f5cdf              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_8[-1])) * x87_r7_4));
005f5ce9              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edx_8)) * x87_r7_4));
005f5cf4              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)edx_8[1])) * x87_r7_4));
005f5d12              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r6_1))));
005f5d27              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f5d3c              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f5d4c              int32_t edx_12 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f5d4c              
005f5d52              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f5d52              {
005f5d58                  long double x87_r7_16 = ((long double)0.0666666701f);
005f5d64                  float* ebx_5 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f5d6b                  long double x87_r6_4 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_16);
005f5d77                  *(uint32_t*)ebx_5 = ((float)((((long double)0.1875f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_5)));
005f5d82                  float* ebx_7 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x10);
005f5d8a                  *(uint32_t*)ebx_7 = ((float)((((long double)0.3125f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_7)));
005f5d95                  float* ebx_9 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f5d9d                  *(uint32_t*)ebx_9 = ((float)((((long double)0.0625f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_9)));
005f5da2                  float* ebx_11 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f5dac                  var_58 = ((float)(x87_r6_4 * ((long double)0.4375)));
005f5db5                  long double x87_r6_8 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_16);
005f5dc1                  *(uint32_t*)ebx_11 = ((float)((((long double)0.1875f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_11)));
005f5dcc                  float* ebx_13 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x14);
005f5dd4                  *(uint32_t*)ebx_13 = ((float)((((long double)0.3125f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_13)));
005f5ddf                  float* ebx_15 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f5de7                  *(uint32_t*)ebx_15 = ((float)((((long double)0.0625f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_15)));
005f5dec                  float* ebx_17 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f5df6                  var_54 = ((float)(x87_r6_8 * ((long double)0.4375)));
005f5dff                  long double x87_r6_12 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_16);
005f5e0b                  *(uint32_t*)ebx_17 = ((float)((((long double)0.1875f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_17)));
005f5e16                  float* ebx_19 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x18);
005f5e1e                  *(uint32_t*)ebx_19 = ((float)((((long double)0.3125f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_19)));
005f5e29                  float* ebx_21 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f5e31                  *(uint32_t*)ebx_21 = ((float)((((long double)0.0625f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_21)));
005f5e36                  float* ebx_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f5e40                  var_50 = ((float)(x87_r6_12 * ((long double)0.4375)));
005f5e49                  long double x87_r7_17 = (x87_r7_16 * (((long double)var_3c_1) - ((long double)edx_12)));
005f5e55                  *(uint32_t*)ebx_23 = ((float)((((long double)0.1875f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_23)));
005f5e60                  float* ebx_25 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x1c);
005f5e68                  *(uint32_t*)ebx_25 = ((float)((((long double)0.3125f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_25)));
005f5e73                  float* ebx_27 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f5e7b                  *(uint32_t*)ebx_27 = ((float)((((long double)0.0625f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_27)));
005f5e83                  var_4c = ((float)(x87_r7_17 * ((long double)0.4375)));
005f5d52              }
005f5d52              
005f5e86              int32_t ebx_28 = var_38_1;
005f5e86              
005f5e8c              if (ebx_28 >= 0xf)
005f5e90                  ebx_28 = 0xf;
005f5e90              
005f5e93              if (ebx_28 <= 0)
005f5ea4                  var_38_1 = 0;
005f5e93              else if (var_38_1 >= 0xf)
005f5e9b                  var_38_1 = 0xf;
005f5e9b              
005f5ea8              int32_t ebx_29 = var_34_1;
005f5ea8              
005f5eae              if (ebx_29 >= 0xf)
005f5eb2                  ebx_29 = 0xf;
005f5eb2              
005f5eb5              if (ebx_29 <= 0)
005f5ec6                  var_34_1 = 0;
005f5eb5              else if (var_34_1 >= 0xf)
005f5ebd                  var_34_1 = 0xf;
005f5ebd              
005f5eca              int32_t ebx_30 = var_30_1;
005f5eca              
005f5ed0              if (ebx_30 >= 0xf)
005f5ed4                  ebx_30 = 0xf;
005f5ed4              
005f5ed7              if (ebx_30 <= 0)
005f5ee8                  var_30_1 = 0;
005f5ed7              else if (var_30_1 >= 0xf)
005f5edf                  var_30_1 = 0xf;
005f5edf              
005f5eef              int32_t ebx_31;
005f5eef              
005f5eef              if (edx_12 >= 0xf)
005f5ef7                  ebx_31 = 0xf;
005f5eef              else
005f5ef1                  ebx_31 = edx_12;
005f5ef1              
005f5efa              if (ebx_31 <= 0)
005f5f06                  edx_12 = 0;
005f5efa              else if (edx_12 >= 0xf)
005f5f03                  edx_12 = 0xf;
005f5f03              
005f5f08              int16_t* ebx_32 = var_8;
005f5f1d              *(uint16_t*)ebx_32 = (((int16_t)(((((edx_12 << 4) | var_38_1) << 4) | var_34_1) << 4)) | var_30_1);
005f5f26              arg3 += ecx_9;
005f5f29              eax_12 += ecx_9;
005f5f2b              edi_4 += ecx_9;
005f5f2d              ecx_11 += ecx_9;
005f5f2f              arg2 += 1;
005f5f38              var_8 = &ebx_32[ebx_2];
005f5f3b          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f5c86      }
005f5c86      
005f5f47      int16_t x87control_2;
005f5f47      int16_t x87status_2;
005f5f47      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f5bc1  }


005f5f51  void __thiscall D3DXTex::CCodec_R3G3B2::Encode(D3DXTex::CCodec_R3G3B2* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f5f51  {
005f5f61      int32_t edi;
005f5f61      int32_t var_64 = edi;
005f5f61      
005f5f62      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f5f62      {
005f5f67          struct D3DXCOLOR* eax_1;
005f5f67          int80_t st0_1;
005f5f67          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f5f6c          arg4 = eax_1;
005f5f62      }
005f5f62      
005f5f73      int16_t x87control;
005f5f73      
005f5f73      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f5f73      {
005f5f7a          struct D3DXCOLOR* eax_2;
005f5f7a          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f5f7f          arg4 = eax_2;
005f5f73      }
005f5f73      
005f5f82      uint32_t eax_3 = arg2;
005f5f87      int32_t edx = *(uint32_t*)((char*)this + 0x68);
005f5f8a      float var_58 = ((float)((long double)0));
005f5f98      float var_54 = ((float)((long double)0));
005f5f9d      float var_50 = ((float)((long double)0));
005f5fa3      arg2 = (eax_3 & 1);
005f5fbe      char* ebx_4 = (((((edx - 1) * arg2) + (*(uint32_t*)((char*)this + 0x60) * eax_3)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f5fcc      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f5fcf      char* var_10 = ebx_4;
005f5fd5      int32_t var_8;
005f5fd5      
005f5fd5      if (arg2 != 0)
005f5fd5      {
005f5fe4          arg2 = 0xffffffff;
005f5fe8          var_8 = (edx - 1);
005f5fd5      }
005f5fd5      else
005f5fd5      {
005f5fd7          var_8 = 0;
005f5fda          arg2 = 1;
005f5fd5      }
005f5fd5      
005f5feb      int16_t x87status;
005f5feb      int16_t temp0;
005f5feb      temp0 = __fnstcw_memmem16(x87control);
005f5feb      arg3 = temp0;
005f5ff9      int16_t x87control_1;
005f5ff9      int16_t x87status_1;
005f5ff9      x87control_1 = __fldcw_memmem16((arg3 | 0xc00));
005f5fff      *(uint32_t*)((char*)this + 0x7c) = arg3;
005f5fff      
005f6005      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f600c          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f600c      
005f6014      arg3 = 0;
005f6014      
005f6017      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f6017      {
005f6025          uint32_t ecx_8 = (arg2 << 4);
005f6034          int32_t eax_11 = (var_8 << 4);
005f6037          int32_t edi_5 = ((arg2 + var_8) << 4);
005f603d          int32_t var_8_1 = ((var_8 - arg2) << 4);
005f6047          arg4 = (&arg4->b + eax_11);
005f6047          
005f6250          do
005f6250          {
005f6053              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_6 + ((arg3 & 3) << 2)));
005f6056              float* ecx_16 = arg4;
005f6059              float var_c_1 = ((float)x87_r7_3);
005f6068              float var_48_1 = ((float)((((long double)var_58) + ((long double)ecx_16[-2])) * ((long double)7f)));
005f6077              float var_44_1 = ((float)((((long double)var_54) + ((long double)ecx_16[-1])) * ((long double)7f)));
005f6085              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)ecx_16)) * ((long double)3f)));
005f609b              int32_t ecx_17 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r7_3))));
005f60b6              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)var_c_1)))));
005f60c9              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)var_c_1)))));
005f60c9              
005f60cc              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f60cc              {
005f60d2                  long double x87_r7_11 = ((long double)0.142857149f);
005f60e1                  float* ebx_6 = ((*(uint32_t*)((char*)this + 0x5c) + var_8_1) + 0x10);
005f60e8                  long double x87_r6_14 = ((((long double)var_48_1) - ((long double)ecx_17)) * x87_r7_11);
005f60f4                  *(uint32_t*)ebx_6 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_6)));
005f60ff                  float* ebx_8 = ((*(uint32_t*)((char*)this + 0x5c) + eax_11) + 0x10);
005f6107                  *(uint32_t*)ebx_8 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_8)));
005f6112                  float* ebx_10 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x10);
005f611a                  *(uint32_t*)ebx_10 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_10)));
005f611f                  float* ebx_12 = ((*(uint32_t*)((char*)this + 0x5c) + var_8_1) + 0x14);
005f6129                  var_58 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f6132                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_44_1) - ((long double)var_34_1)));
005f613e                  *(uint32_t*)ebx_12 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)ebx_12)));
005f6149                  float* ebx_14 = ((*(uint32_t*)((char*)this + 0x5c) + eax_11) + 0x14);
005f6151                  *(uint32_t*)ebx_14 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)ebx_14)));
005f615c                  float* ebx_16 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x14);
005f6164                  *(uint32_t*)ebx_16 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)ebx_16)));
005f6169                  float* edx_7 = ((*(uint32_t*)((char*)this + 0x5c) + var_8_1) + 0x18);
005f6173                  ebx_4 = var_10;
005f6176                  var_54 = ((float)(x87_r7_12 * ((long double)0.4375)));
005f617f                  long double x87_r7_16 = ((((long double)var_40_1) - ((long double)var_30_1)) * ((long double)0.333333343f));
005f618f                  *(uint32_t*)edx_7 = ((float)((((long double)0.1875f) * x87_r7_16) + ((long double)*(uint32_t*)edx_7)));
005f619a                  float* edx_9 = ((*(uint32_t*)((char*)this + 0x5c) + eax_11) + 0x18);
005f61a2                  *(uint32_t*)edx_9 = ((float)((((long double)0.3125f) * x87_r7_16) + ((long double)*(uint32_t*)edx_9)));
005f61ad                  float* edx_11 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x18);
005f61b5                  *(uint32_t*)edx_11 = ((float)((((long double)0.0625f) * x87_r7_16) + ((long double)*(uint32_t*)edx_11)));
005f61bd                  var_50 = ((float)(x87_r7_16 * ((long double)0.4375)));
005f60cc              }
005f60cc              
005f61c3              int32_t edx_12;
005f61c3              
005f61c3              if (ecx_17 >= 7)
005f61cb                  edx_12 = 7;
005f61c3              else
005f61c5                  edx_12 = ecx_17;
005f61c5              
005f61ce              if (edx_12 <= 0)
005f61da                  ecx_17 = 0;
005f61ce              else if (ecx_17 >= 7)
005f61d7                  ecx_17 = 7;
005f61d7              
005f61e0              int32_t edx_13;
005f61e0              
005f61e0              if (var_34_1 >= 7)
005f61e9                  edx_13 = 7;
005f61e0              else
005f61e2                  edx_13 = var_34_1;
005f61e2              
005f61ec              if (edx_13 <= 0)
005f61fd                  var_34_1 = 0;
005f61ec              else if (var_34_1 >= 7)
005f61f4                  var_34_1 = 7;
005f61f4              
005f6205              int32_t edx_14;
005f6205              
005f6205              if (var_30_1 >= 3)
005f620e                  edx_14 = 3;
005f6205              else
005f6207                  edx_14 = var_30_1;
005f6207              
005f6211              if (edx_14 <= 0)
005f6222                  var_30_1 = 0;
005f6211              else if (var_30_1 >= 3)
005f6219                  var_30_1 = 3;
005f6219              
005f6226              ecx_17 <<= 3;
005f6229              ecx_17 |= var_34_1;
005f622c              ecx_17 <<= 2;
005f622f              ecx_17 |= var_30_1;
005f6232              *(uint8_t*)ebx_4 = ecx_17;
005f6237              ebx_4 = &ebx_4[arg2];
005f623a              arg4 += ecx_8;
005f623d              var_8_1 += ecx_8;
005f6240              eax_11 += ecx_8;
005f6242              edi_5 += ecx_8;
005f6244              arg3 += 1;
005f624d              var_10 = ebx_4;
005f6250          } while (arg3 < *(uint32_t*)((char*)this + 0x68));
005f6017      }
005f6017      
005f625c      int16_t x87control_2;
005f625c      int16_t x87status_2;
005f625c      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f5f51  }


005f6266  void __thiscall D3DXTex::CCodec_A8::Encode(D3DXTex::CCodec_A8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f6266  {
005f6276      int32_t edi;
005f6276      int32_t var_54 = edi;
005f6276      
005f6277      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f6277      {
005f627c          struct D3DXCOLOR* eax_1;
005f627c          int80_t st0_1;
005f627c          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f6281          arg4 = eax_1;
005f6277      }
005f6277      
005f6288      int16_t x87control;
005f6288      
005f6288      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f6288      {
005f628f          struct D3DXCOLOR* eax_2;
005f628f          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f6294          arg4 = eax_2;
005f6288      }
005f6288      
005f6297      uint32_t eax_3 = arg2;
005f629c      int32_t ebx = *(uint32_t*)((char*)this + 0x68);
005f629f      float var_2c = ((float)((long double)0));
005f62ae      arg2 = (eax_3 & 1);
005f62cf      char* edi_5 = (((((ebx - 1) * arg2) + (*(uint32_t*)((char*)this + 0x60) * eax_3)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f62d6      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f62dc      int32_t ebx_1;
005f62dc      
005f62dc      if (arg2 != 0)
005f62dc      {
005f62e9          ebx_1 = (ebx - 1);
005f62ea          arg2 = 0xffffffff;
005f62dc      }
005f62dc      else
005f62dc      {
005f62de          ebx_1 = 0;
005f62e0          arg2 = 1;
005f62dc      }
005f62dc      
005f62ee      int16_t x87status;
005f62ee      int16_t temp0;
005f62ee      temp0 = __fnstcw_memmem16(x87control);
005f62ee      arg3 = temp0;
005f62fc      int16_t x87control_1;
005f62fc      int16_t x87status_1;
005f62fc      x87control_1 = __fldcw_memmem16((arg3 | 0xc00));
005f6302      *(uint32_t*)((char*)this + 0x7c) = arg3;
005f6302      
005f6309      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f6310          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f6310      
005f6315      arg3 = 0;
005f6315      
005f631d      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f631d      {
005f6328          uint32_t ecx_8 = (arg2 << 4);
005f6338          int32_t eax_11 = (ebx_1 << 4);
005f633b          int32_t ecx_10 = ((arg2 + ebx_1) << 4);
005f6345          int32_t var_8_1 = ((ebx_1 - arg2) << 4);
005f6348          arg4 = (&arg4->a + eax_11);
005f6348          
005f6411          do
005f6411          {
005f6362              float var_1c_1 = ((float)((((long double)var_2c) + ((long double)*(uint32_t*)arg4)) * ((long double)255f)));
005f6378              int32_t edx_8 = ((int32_t)((long double)((float)(((long double)var_1c_1) + ((long double)*(uint32_t*)(eax_6 + ((arg3 & 3) << 2)))))));
005f6378              
005f637e              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f637e              {
005f6389                  float* edx_10 = ((var_8_1 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005f6390                  long double x87_r7_9 = ((((long double)var_1c_1) - ((long double)edx_8)) * ((long double)0.00392156886f));
005f63a0                  *(uint32_t*)edx_10 = ((float)((((long double)0.1875f) * x87_r7_9) + ((long double)*(uint32_t*)edx_10)));
005f63ab                  float* edx_12 = ((eax_11 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005f63b3                  *(uint32_t*)edx_12 = ((float)((((long double)0.3125f) * x87_r7_9) + ((long double)*(uint32_t*)edx_12)));
005f63be                  float* edx_14 = ((ecx_10 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005f63c6                  *(uint32_t*)edx_14 = ((float)((((long double)0.0625f) * x87_r7_9) + ((long double)*(uint32_t*)edx_14)));
005f63d1                  var_2c = ((float)(x87_r7_9 * ((long double)0.4375)));
005f637e              }
005f637e              
005f63da              int32_t ebx_6 = edx_8;
005f63da              
005f63dc              if (edx_8 >= 0xff)
005f63de                  ebx_6 = 0xff;
005f63de              
005f63e5              if (ebx_6 <= 0)
005f63f4                  edx_8 = 0;
005f63e5              else if (edx_8 >= 0xff)
005f63f0                  edx_8 = 0xff;
005f63f0              
005f63f6              *(uint8_t*)edi_5 = edx_8;
005f63fb              arg4 += ecx_8;
005f63fe              var_8_1 += ecx_8;
005f6401              edi_5 = &edi_5[arg2];
005f6404              eax_11 += ecx_8;
005f6406              ecx_10 += ecx_8;
005f6408              arg3 += 1;
005f6411          } while (arg3 < *(uint32_t*)((char*)this + 0x68));
005f631d      }
005f631d      
005f641d      int16_t x87control_2;
005f641d      int16_t x87status_2;
005f641d      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f6266  }


005f6427  void __thiscall D3DXTex::CCodec_A8R3G3B2::Encode(D3DXTex::CCodec_A8R3G3B2* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f6427  {
005f6437      int32_t edi;
005f6437      int32_t var_64 = edi;
005f6437      
005f6438      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f6438      {
005f643d          struct D3DXCOLOR* eax_1;
005f643d          int80_t st0_1;
005f643d          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f6442          arg4 = eax_1;
005f6438      }
005f6438      
005f6449      int16_t x87control;
005f6449      
005f6449      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f6449      {
005f6450          struct D3DXCOLOR* eax_2;
005f6450          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f6455          arg4 = eax_2;
005f6449      }
005f6449      
005f6458      uint32_t eax_3 = arg2;
005f645d      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f6460      float var_58 = ((float)((long double)0));
005f646e      float var_54 = ((float)((long double)0));
005f6473      float var_50 = ((float)((long double)0));
005f6478      float var_4c = ((float)((long double)0));
005f647e      arg2 = (eax_3 & 1);
005f64a1      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f64aa      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f64b0      int32_t ebx_2;
005f64b0      int32_t edi_2;
005f64b0      
005f64b0      if (arg2 != 0)
005f64b0      {
005f64b9          edi_2 = (edi_1 - 1);
005f64ba          ebx_2 = 0xffffffff;
005f64b0      }
005f64b0      else
005f64b0      {
005f64b4          edi_2 = 0;
005f64b6          ebx_2 = 1;
005f64b0      }
005f64b0      
005f64bd      int16_t x87status;
005f64bd      int16_t temp0;
005f64bd      temp0 = __fnstcw_memmem16(x87control);
005f64bd      arg2 = temp0;
005f64cb      int16_t x87control_1;
005f64cb      int16_t x87status_1;
005f64cb      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f64d1      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f64d1      
005f64d8      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f64df          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f64df      
005f64e4      arg2 = 0;
005f64e4      
005f64ec      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f64ec      {
005f64f4          int32_t ecx_9 = (ebx_2 << 4);
005f6507          int32_t eax_12 = (edi_2 << 4);
005f650a          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f6510          int32_t edx_4 = ((edi_2 - ebx_2) << 4);
005f6519          arg3 = (&arg4->b + eax_12);
005f6519          
005f67a9          do
005f67a9          {
005f6525              long double x87_r7_4 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f6528              float* edi_9 = arg3;
005f652b              arg4 = ((float)x87_r7_4);
005f653a              float var_48_1 = ((float)((((long double)var_58) + ((long double)edi_9[-2])) * ((long double)7f)));
005f6549              float var_44_1 = ((float)((((long double)var_54) + ((long double)edi_9[-1])) * ((long double)7f)));
005f6557              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edi_9)) * ((long double)3f)));
005f6566              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)edi_9[1])) * ((long double)255f)));
005f6576              int32_t var_14_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r7_4))));
005f6582              int32_t var_38_1 = var_14_1;
005f6597              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f65ac              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f65b5              int32_t var_20_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f65b5              
005f65c2              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f65c2              {
005f65c8                  long double x87_r7_15 = ((long double)0.142857149f);
005f65d4                  float* edi_14 = ((*(uint32_t*)((char*)this + 0x5c) + edx_4) + 0x10);
005f65db                  long double x87_r6_17 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_15);
005f65e7                  *(uint32_t*)edi_14 = ((float)((((long double)0.1875f) * x87_r6_17) + ((long double)*(uint32_t*)edi_14)));
005f65f2                  float* edi_16 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x10);
005f65fa                  *(uint32_t*)edi_16 = ((float)((((long double)0.3125f) * x87_r6_17) + ((long double)*(uint32_t*)edi_16)));
005f6605                  float* edi_18 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f660d                  *(uint32_t*)edi_18 = ((float)((((long double)0.0625f) * x87_r6_17) + ((long double)*(uint32_t*)edi_18)));
005f6612                  float* edi_20 = ((*(uint32_t*)((char*)this + 0x5c) + edx_4) + 0x14);
005f661c                  var_58 = ((float)(x87_r6_17 * ((long double)0.4375)));
005f6625                  long double x87_r7_16 = (x87_r7_15 * (((long double)var_44_1) - ((long double)var_34_1)));
005f6631                  *(uint32_t*)edi_20 = ((float)((((long double)0.1875f) * x87_r7_16) + ((long double)*(uint32_t*)edi_20)));
005f663c                  float* edi_22 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x14);
005f6644                  *(uint32_t*)edi_22 = ((float)((((long double)0.3125f) * x87_r7_16) + ((long double)*(uint32_t*)edi_22)));
005f664f                  float* edi_24 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f6657                  *(uint32_t*)edi_24 = ((float)((((long double)0.0625f) * x87_r7_16) + ((long double)*(uint32_t*)edi_24)));
005f665c                  float* edi_26 = ((*(uint32_t*)((char*)this + 0x5c) + edx_4) + 0x18);
005f6666                  var_54 = ((float)(x87_r7_16 * ((long double)0.4375)));
005f666f                  long double x87_r7_20 = ((((long double)var_40_1) - ((long double)var_30_1)) * ((long double)0.333333343f));
005f667f                  *(uint32_t*)edi_26 = ((float)((((long double)0.1875f) * x87_r7_20) + ((long double)*(uint32_t*)edi_26)));
005f668a                  float* edi_28 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x18);
005f6692                  *(uint32_t*)edi_28 = ((float)((((long double)0.3125f) * x87_r7_20) + ((long double)*(uint32_t*)edi_28)));
005f669d                  float* edi_30 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f66a5                  *(uint32_t*)edi_30 = ((float)((((long double)0.0625f) * x87_r7_20) + ((long double)*(uint32_t*)edi_30)));
005f66aa                  float* edi_32 = ((*(uint32_t*)((char*)this + 0x5c) + edx_4) + 0x1c);
005f66b4                  var_50 = ((float)(x87_r7_20 * ((long double)0.4375)));
005f66bd                  long double x87_r7_24 = ((((long double)var_3c_1) - ((long double)var_20_1)) * ((long double)0.00392156886f));
005f66cd                  *(uint32_t*)edi_32 = ((float)((((long double)0.1875f) * x87_r7_24) + ((long double)*(uint32_t*)edi_32)));
005f66d8                  float* edi_34 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x1c);
005f66e0                  *(uint32_t*)edi_34 = ((float)((((long double)0.3125f) * x87_r7_24) + ((long double)*(uint32_t*)edi_34)));
005f66eb                  float* edi_36 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f66f3                  *(uint32_t*)edi_36 = ((float)((((long double)0.0625f) * x87_r7_24) + ((long double)*(uint32_t*)edi_36)));
005f66fb                  var_4c = ((float)(x87_r7_24 * ((long double)0.4375)));
005f65c2              }
005f65c2              
005f6701              int32_t edi_37;
005f6701              
005f6701              if (var_14_1 >= 7)
005f6709                  edi_37 = 7;
005f6701              else
005f6703                  edi_37 = var_14_1;
005f6703              
005f670f              if (edi_37 <= 0)
005f671a                  var_38_1 = 0;
005f670f              else if (var_14_1 >= 7)
005f6715                  var_38_1 = 7;
005f6715              
005f671e              int32_t ebx_5 = var_34_1;
005f671e              
005f6723              if (ebx_5 >= 7)
005f6725                  ebx_5 = 7;
005f6725              
005f6729              if (ebx_5 <= 0)
005f6735                  var_34_1 = 0;
005f6729              else if (var_34_1 >= 7)
005f6730                  var_34_1 = 7;
005f6730              
005f6739              int32_t edi_38 = var_30_1;
005f6739              
005f6741              if (edi_38 >= 3)
005f6743                  edi_38 = 3;
005f6743              
005f6747              if (edi_38 <= 0)
005f6753                  var_30_1 = 0;
005f6747              else if (var_30_1 >= 3)
005f674e                  var_30_1 = 3;
005f674e              
005f6757              int32_t ebx_6 = var_20_1;
005f6757              
005f6761              if (ebx_6 >= 0xff)
005f6763                  ebx_6 = 0xff;
005f6763              
005f6767              int32_t ebx_7;
005f6767              
005f6767              if (ebx_6 <= 0)
005f6774                  ebx_7 = 0;
005f6767              else
005f6767              {
005f6769                  ebx_7 = var_20_1;
005f6769                  
005f676e                  if (ebx_7 >= 0xff)
005f6770                      ebx_7 = 0xff;
005f6767              }
005f6767              
005f6776              int16_t* edi_39 = var_8;
005f678b              *(uint16_t*)edi_39 = (((int16_t)(((((ebx_7 << 3) | var_38_1) << 3) | var_34_1) << 2)) | var_30_1);
005f6791              var_8 = &edi_39[ebx_2];
005f6797              arg3 += ecx_9;
005f679a              eax_12 += ecx_9;
005f679c              edx_4 += ecx_9;
005f679e              ecx_11 += ecx_9;
005f67a0              arg2 += 1;
005f67a9          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f64ec      }
005f64ec      
005f67b5      int16_t x87control_2;
005f67b5      int16_t x87status_2;
005f67b5      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f6427  }


005f67bf  void __thiscall D3DXTex::CCodec_X4R4G4B4::Encode(D3DXTex::CCodec_X4R4G4B4* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f67bf  {
005f67cf      int32_t edi;
005f67cf      int32_t var_60 = edi;
005f67cf      
005f67d0      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f67d0      {
005f67d5          struct D3DXCOLOR* eax_1;
005f67d5          int80_t st0_1;
005f67d5          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f67da          arg4 = eax_1;
005f67d0      }
005f67d0      
005f67e1      int16_t x87control;
005f67e1      
005f67e1      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f67e1      {
005f67e8          struct D3DXCOLOR* eax_2;
005f67e8          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f67ed          arg4 = eax_2;
005f67e1      }
005f67e1      
005f67f0      uint32_t eax_3 = arg2;
005f67f5      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f67f8      float var_54 = ((float)((long double)0));
005f6806      float var_50 = ((float)((long double)0));
005f680b      float var_4c = ((float)((long double)0));
005f6811      arg2 = (eax_3 & 1);
005f683a      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f683d      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f6843      int32_t ebx_2;
005f6843      int32_t edi_2;
005f6843      
005f6843      if (arg2 != 0)
005f6843      {
005f684c          edi_2 = (edi_1 - 1);
005f684d          ebx_2 = 0xffffffff;
005f6843      }
005f6843      else
005f6843      {
005f6847          edi_2 = 0;
005f6849          ebx_2 = 1;
005f6843      }
005f6843      
005f6850      int16_t x87status;
005f6850      int16_t temp0;
005f6850      temp0 = __fnstcw_memmem16(x87control);
005f6850      arg2 = temp0;
005f685e      int16_t x87control_1;
005f685e      int16_t x87status_1;
005f685e      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f6864      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f6864      
005f686b      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f6872          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f6872      
005f6877      arg2 = 0;
005f6877      
005f687f      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f687f      {
005f688d          int32_t ecx_8 = (ebx_2 << 4);
005f689b          int32_t eax_12 = (edi_2 << 4);
005f68a0          int32_t ecx_10 = ((ebx_2 + edi_2) << 4);
005f68aa          int32_t ebx_3 = ((edi_2 - ebx_2) << 4);
005f68ac          arg4 = (&arg4->b + eax_12);
005f68ac          
005f6aa8          do
005f6aa8          {
005f68b8              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f68bb              float* edx_9 = arg4;
005f68be              arg3 = ((float)x87_r7_3);
005f68cd              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_9[-2])) * ((long double)15f)));
005f68dc              float var_40_1 = ((float)((((long double)var_50) + ((long double)edx_9[-1])) * ((long double)15f)));
005f68ea              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)*(uint32_t*)edx_9)) * ((long double)15f)));
005f6900              int32_t edx_10 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_3))));
005f691b              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg3)))));
005f692e              int32_t var_2c_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg3)))));
005f692e              
005f6931              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f6931              {
005f6937                  long double x87_r7_11 = ((long double)0.0666666701f);
005f6943                  float* edi_9 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x10);
005f694a                  long double x87_r6_14 = ((((long double)var_44_1) - ((long double)edx_10)) * x87_r7_11);
005f6956                  *(uint32_t*)edi_9 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)edi_9)));
005f6961                  float* edi_11 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x10);
005f6969                  *(uint32_t*)edi_11 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)edi_11)));
005f6974                  float* edi_13 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x10);
005f697c                  *(uint32_t*)edi_13 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)edi_13)));
005f6981                  float* edi_15 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x14);
005f698b                  var_54 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f6994                  long double x87_r6_18 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_11);
005f69a0                  *(uint32_t*)edi_15 = ((float)((((long double)0.1875f) * x87_r6_18) + ((long double)*(uint32_t*)edi_15)));
005f69ab                  float* edi_17 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x14);
005f69b3                  *(uint32_t*)edi_17 = ((float)((((long double)0.3125f) * x87_r6_18) + ((long double)*(uint32_t*)edi_17)));
005f69be                  float* edi_19 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x14);
005f69c6                  *(uint32_t*)edi_19 = ((float)((((long double)0.0625f) * x87_r6_18) + ((long double)*(uint32_t*)edi_19)));
005f69cb                  float* edi_21 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x18);
005f69d5                  var_50 = ((float)(x87_r6_18 * ((long double)0.4375)));
005f69de                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_3c_1) - ((long double)var_2c_1)));
005f69ea                  *(uint32_t*)edi_21 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edi_21)));
005f69f5                  float* edi_23 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x18);
005f69fd                  *(uint32_t*)edi_23 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edi_23)));
005f6a08                  float* edi_25 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x18);
005f6a10                  *(uint32_t*)edi_25 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edi_25)));
005f6a18                  var_4c = ((float)(x87_r7_12 * ((long double)0.4375)));
005f6931              }
005f6931              
005f6a1e              int32_t edi_26;
005f6a1e              
005f6a1e              if (edx_10 >= 0xf)
005f6a26                  edi_26 = 0xf;
005f6a1e              else
005f6a20                  edi_26 = edx_10;
005f6a20              
005f6a29              if (edi_26 <= 0)
005f6a35                  edx_10 = 0;
005f6a29              else if (edx_10 >= 0xf)
005f6a32                  edx_10 = 0xf;
005f6a32              
005f6a37              int32_t edi_27 = var_30_1;
005f6a37              
005f6a3d              if (edi_27 >= 0xf)
005f6a41                  edi_27 = 0xf;
005f6a41              
005f6a44              if (edi_27 <= 0)
005f6a55                  var_30_1 = 0;
005f6a44              else if (var_30_1 >= 0xf)
005f6a4c                  var_30_1 = 0xf;
005f6a4c              
005f6a59              int32_t edi_28 = var_2c_1;
005f6a59              
005f6a5f              if (edi_28 >= 0xf)
005f6a63                  edi_28 = 0xf;
005f6a63              
005f6a66              if (edi_28 <= 0)
005f6a77                  var_2c_1 = 0;
005f6a66              else if (var_2c_1 >= 0xf)
005f6a6e                  var_2c_1 = 0xf;
005f6a6e              
005f6a7b              int16_t* edi_29 = var_8;
005f6a8a              *(uint16_t*)edi_29 = (((int16_t)(((edx_10 << 4) | var_30_1) << 4)) | var_2c_1);
005f6a93              arg4 += ecx_8;
005f6a96              eax_12 += ecx_8;
005f6a98              ebx_3 += ecx_8;
005f6a9a              ecx_10 += ecx_8;
005f6a9c              arg2 += 1;
005f6aa5              var_8 = &edi_29[ebx_2];
005f6aa8          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f687f      }
005f687f      
005f6ab4      int16_t x87control_2;
005f6ab4      int16_t x87status_2;
005f6ab4      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f67bf  }


005f6abe  void __thiscall D3DXTex::CCodec_A2B10G10R10::Encode(D3DXTex::CCodec_A2B10G10R10* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f6abe  {
005f6ace      int32_t edi;
005f6ace      int32_t var_64 = edi;
005f6ace      
005f6acf      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f6acf      {
005f6ad4          struct D3DXCOLOR* eax_1;
005f6ad4          int80_t st0_1;
005f6ad4          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f6ad9          arg4 = eax_1;
005f6acf      }
005f6acf      
005f6ae0      int16_t x87control;
005f6ae0      
005f6ae0      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f6ae0      {
005f6ae7          struct D3DXCOLOR* eax_2;
005f6ae7          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f6aec          arg4 = eax_2;
005f6ae0      }
005f6ae0      
005f6aef      uint32_t eax_3 = arg2;
005f6af4      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f6af7      float var_58 = ((float)((long double)0));
005f6b05      float var_54 = ((float)((long double)0));
005f6b0a      float var_50 = ((float)((long double)0));
005f6b0f      float var_4c = ((float)((long double)0));
005f6b15      arg2 = (eax_3 & 1);
005f6b38      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f6b41      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f6b47      int32_t ebx_2;
005f6b47      int32_t edi_2;
005f6b47      
005f6b47      if (arg2 != 0)
005f6b47      {
005f6b50          edi_2 = (edi_1 - 1);
005f6b51          ebx_2 = 0xffffffff;
005f6b47      }
005f6b47      else
005f6b47      {
005f6b4b          edi_2 = 0;
005f6b4d          ebx_2 = 1;
005f6b47      }
005f6b47      
005f6b54      int16_t x87status;
005f6b54      int16_t temp0;
005f6b54      temp0 = __fnstcw_memmem16(x87control);
005f6b54      arg2 = temp0;
005f6b62      int16_t x87control_1;
005f6b62      int16_t x87status_1;
005f6b62      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f6b68      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f6b68      
005f6b6f      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f6b76          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f6b76      
005f6b7b      arg2 = 0;
005f6b7b      
005f6b83      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f6b83      {
005f6b98          int32_t ecx_9 = (ebx_2 << 4);
005f6b9b          int32_t eax_13 = (edi_2 << 4);
005f6baa          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f6bad          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f6bb0          arg3 = (&arg4->b + eax_13);
005f6bb0          
005f6e5d          do
005f6e5d          {
005f6bbc              long double x87_r7_4 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f6bbf              float* edx_8 = arg3;
005f6bc2              arg4 = ((float)x87_r7_4);
005f6bd1              float var_48_1 = ((float)((((long double)var_58) + ((long double)edx_8[-2])) * ((long double)1023f)));
005f6be0              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_8[-1])) * ((long double)1023f)));
005f6bee              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edx_8)) * ((long double)1023f)));
005f6bfd              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)edx_8[1])) * ((long double)3f)));
005f6c19              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r7_4))));
005f6c2e              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f6c43              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f6c53              int32_t edx_12 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f6c53              
005f6c59              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f6c59              {
005f6c5f                  long double x87_r7_15 = ((long double)0.000977517106f);
005f6c6b                  float* ebx_5 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f6c72                  long double x87_r6_17 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_15);
005f6c7e                  *(uint32_t*)ebx_5 = ((float)((((long double)0.1875f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_5)));
005f6c89                  float* ebx_7 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f6c91                  *(uint32_t*)ebx_7 = ((float)((((long double)0.3125f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_7)));
005f6c9c                  float* ebx_9 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f6ca4                  *(uint32_t*)ebx_9 = ((float)((((long double)0.0625f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_9)));
005f6ca9                  float* ebx_11 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f6cb3                  var_58 = ((float)(x87_r6_17 * ((long double)0.4375)));
005f6cbc                  long double x87_r6_21 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_15);
005f6cc8                  *(uint32_t*)ebx_11 = ((float)((((long double)0.1875f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_11)));
005f6cd3                  float* ebx_13 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f6cdb                  *(uint32_t*)ebx_13 = ((float)((((long double)0.3125f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_13)));
005f6ce6                  float* ebx_15 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f6cee                  *(uint32_t*)ebx_15 = ((float)((((long double)0.0625f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_15)));
005f6cf3                  float* ebx_17 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f6cfd                  var_54 = ((float)(x87_r6_21 * ((long double)0.4375)));
005f6d06                  long double x87_r7_16 = (x87_r7_15 * (((long double)var_40_1) - ((long double)var_30_1)));
005f6d12                  *(uint32_t*)ebx_17 = ((float)((((long double)0.1875f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_17)));
005f6d1d                  float* ebx_19 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x18);
005f6d25                  *(uint32_t*)ebx_19 = ((float)((((long double)0.3125f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_19)));
005f6d30                  float* ebx_21 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f6d38                  *(uint32_t*)ebx_21 = ((float)((((long double)0.0625f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_21)));
005f6d3d                  float* ebx_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f6d47                  var_50 = ((float)(x87_r7_16 * ((long double)0.4375)));
005f6d50                  long double x87_r7_20 = ((((long double)var_3c_1) - ((long double)edx_12)) * ((long double)0.333333343f));
005f6d60                  *(uint32_t*)ebx_23 = ((float)((((long double)0.1875f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_23)));
005f6d6b                  float* ebx_25 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x1c);
005f6d73                  *(uint32_t*)ebx_25 = ((float)((((long double)0.3125f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_25)));
005f6d7e                  float* ebx_27 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f6d86                  *(uint32_t*)ebx_27 = ((float)((((long double)0.0625f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_27)));
005f6d8e                  var_4c = ((float)(x87_r7_20 * ((long double)0.4375)));
005f6c59              }
005f6c59              
005f6d91              int32_t ebx_28 = var_38_1;
005f6d91              
005f6d9a              if (ebx_28 >= 0x3ff)
005f6d9c                  ebx_28 = 0x3ff;
005f6d9c              
005f6da3              if (ebx_28 <= 0)
005f6db7                  var_38_1 = 0;
005f6da3              else if (var_38_1 >= 0x3ff)
005f6dae                  var_38_1 = 0x3ff;
005f6dae              
005f6dbb              int32_t ebx_29 = var_34_1;
005f6dbb              
005f6dc4              if (ebx_29 >= 0x3ff)
005f6dc6                  ebx_29 = 0x3ff;
005f6dc6              
005f6dcd              if (ebx_29 <= 0)
005f6de1                  var_34_1 = 0;
005f6dcd              else if (var_34_1 >= 0x3ff)
005f6dd8                  var_34_1 = 0x3ff;
005f6dd8              
005f6de5              int32_t ebx_30 = var_30_1;
005f6de5              
005f6dee              if (ebx_30 >= 0x3ff)
005f6df0                  ebx_30 = 0x3ff;
005f6df0              
005f6df7              if (ebx_30 <= 0)
005f6e0b                  var_30_1 = 0;
005f6df7              else if (var_30_1 >= 0x3ff)
005f6e02                  var_30_1 = 0x3ff;
005f6e02              
005f6e12              int32_t ebx_31;
005f6e12              
005f6e12              if (edx_12 >= 3)
005f6e1a                  ebx_31 = 3;
005f6e12              else
005f6e14                  ebx_31 = edx_12;
005f6e14              
005f6e1d              if (ebx_31 <= 0)
005f6e29                  edx_12 = 0;
005f6e1d              else if (edx_12 >= 3)
005f6e26                  edx_12 = 3;
005f6e26              
005f6e2b              int32_t* ebx_32 = var_8;
005f6e40              *(uint32_t*)ebx_32 = ((((((edx_12 << 0xa) | var_30_1) << 0xa) | var_34_1) << 0xa) | var_38_1);
005f6e48              arg3 += ecx_9;
005f6e4b              eax_13 += ecx_9;
005f6e4d              edi_4 += ecx_9;
005f6e4f              ecx_11 += ecx_9;
005f6e51              arg2 += 1;
005f6e5a              var_8 = &ebx_32[ebx_2];
005f6e5d          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f6b83      }
005f6b83      
005f6e69      int16_t x87control_2;
005f6e69      int16_t x87status_2;
005f6e69      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f6abe  }


005f6e73  void __thiscall D3DXTex::CCodec_A8B8G8R8::Encode(D3DXTex::CCodec_A8B8G8R8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f6e73  {
005f6e83      int32_t edi;
005f6e83      int32_t var_64 = edi;
005f6e83      
005f6e84      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f6e84      {
005f6e89          struct D3DXCOLOR* eax_1;
005f6e89          int80_t st0_1;
005f6e89          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f6e8e          arg4 = eax_1;
005f6e84      }
005f6e84      
005f6e95      int16_t x87control;
005f6e95      
005f6e95      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f6e95      {
005f6e9c          struct D3DXCOLOR* eax_2;
005f6e9c          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f6ea1          arg4 = eax_2;
005f6e95      }
005f6e95      
005f6ea4      uint32_t eax_3 = arg2;
005f6ea9      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f6eac      float var_58 = ((float)((long double)0));
005f6eba      float var_54 = ((float)((long double)0));
005f6ebf      float var_50 = ((float)((long double)0));
005f6ec4      float var_4c = ((float)((long double)0));
005f6eca      arg2 = (eax_3 & 1);
005f6eed      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f6ef6      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f6efc      int32_t ebx_2;
005f6efc      int32_t edi_2;
005f6efc      
005f6efc      if (arg2 != 0)
005f6efc      {
005f6f05          edi_2 = (edi_1 - 1);
005f6f06          ebx_2 = 0xffffffff;
005f6efc      }
005f6efc      else
005f6efc      {
005f6f00          edi_2 = 0;
005f6f02          ebx_2 = 1;
005f6efc      }
005f6efc      
005f6f09      int16_t x87status;
005f6f09      int16_t temp0;
005f6f09      temp0 = __fnstcw_memmem16(x87control);
005f6f09      arg2 = temp0;
005f6f17      int16_t x87control_1;
005f6f17      int16_t x87status_1;
005f6f17      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f6f1d      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f6f1d      
005f6f24      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f6f2b          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f6f2b      
005f6f30      arg2 = 0;
005f6f30      
005f6f38      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f6f38      {
005f6f4d          int32_t ecx_9 = (ebx_2 << 4);
005f6f50          int32_t eax_13 = (edi_2 << 4);
005f6f5f          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f6f62          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f6f65          arg3 = (&arg4->b + eax_13);
005f6f65          
005f720c          do
005f720c          {
005f6f6b              long double x87_r7_4 = ((long double)255f);
005f6f77              long double x87_r6_1 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f6f7a              float* edx_8 = arg3;
005f6f7d              arg4 = ((float)x87_r6_1);
005f6f88              float var_48_1 = ((float)((((long double)var_58) + ((long double)edx_8[-2])) * x87_r7_4));
005f6f93              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_8[-1])) * x87_r7_4));
005f6f9d              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edx_8)) * x87_r7_4));
005f6fa8              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)edx_8[1])) * x87_r7_4));
005f6fc6              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r6_1))));
005f6fdb              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f6ff0              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f7000              int32_t edx_12 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f7000              
005f7006              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f7006              {
005f700c                  long double x87_r7_16 = ((long double)0.00392156886f);
005f7018                  float* ebx_5 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f701f                  long double x87_r6_4 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_16);
005f702b                  *(uint32_t*)ebx_5 = ((float)((((long double)0.1875f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_5)));
005f7036                  float* ebx_7 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f703e                  *(uint32_t*)ebx_7 = ((float)((((long double)0.3125f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_7)));
005f7049                  float* ebx_9 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f7051                  *(uint32_t*)ebx_9 = ((float)((((long double)0.0625f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_9)));
005f7056                  float* ebx_11 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f7060                  var_58 = ((float)(x87_r6_4 * ((long double)0.4375)));
005f7069                  long double x87_r6_8 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_16);
005f7075                  *(uint32_t*)ebx_11 = ((float)((((long double)0.1875f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_11)));
005f7080                  float* ebx_13 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f7088                  *(uint32_t*)ebx_13 = ((float)((((long double)0.3125f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_13)));
005f7093                  float* ebx_15 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f709b                  *(uint32_t*)ebx_15 = ((float)((((long double)0.0625f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_15)));
005f70a0                  float* ebx_17 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f70aa                  var_54 = ((float)(x87_r6_8 * ((long double)0.4375)));
005f70b3                  long double x87_r6_12 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_16);
005f70bf                  *(uint32_t*)ebx_17 = ((float)((((long double)0.1875f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_17)));
005f70ca                  float* ebx_19 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x18);
005f70d2                  *(uint32_t*)ebx_19 = ((float)((((long double)0.3125f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_19)));
005f70dd                  float* ebx_21 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f70e5                  *(uint32_t*)ebx_21 = ((float)((((long double)0.0625f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_21)));
005f70ea                  float* ebx_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f70f4                  var_50 = ((float)(x87_r6_12 * ((long double)0.4375)));
005f70fd                  long double x87_r7_17 = (x87_r7_16 * (((long double)var_3c_1) - ((long double)edx_12)));
005f7109                  *(uint32_t*)ebx_23 = ((float)((((long double)0.1875f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_23)));
005f7114                  float* ebx_25 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x1c);
005f711c                  *(uint32_t*)ebx_25 = ((float)((((long double)0.3125f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_25)));
005f7127                  float* ebx_27 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f712f                  *(uint32_t*)ebx_27 = ((float)((((long double)0.0625f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_27)));
005f7137                  var_4c = ((float)(x87_r7_17 * ((long double)0.4375)));
005f7006              }
005f7006              
005f713a              int32_t ebx_28 = var_38_1;
005f713a              
005f7143              if (ebx_28 >= 0xff)
005f7145                  ebx_28 = 0xff;
005f7145              
005f714c              if (ebx_28 <= 0)
005f7160                  var_38_1 = 0;
005f714c              else if (var_38_1 >= 0xff)
005f7157                  var_38_1 = 0xff;
005f7157              
005f7164              int32_t ebx_29 = var_34_1;
005f7164              
005f716d              if (ebx_29 >= 0xff)
005f716f                  ebx_29 = 0xff;
005f716f              
005f7176              if (ebx_29 <= 0)
005f718a                  var_34_1 = 0;
005f7176              else if (var_34_1 >= 0xff)
005f7181                  var_34_1 = 0xff;
005f7181              
005f718e              int32_t ebx_30 = var_30_1;
005f718e              
005f7197              if (ebx_30 >= 0xff)
005f7199                  ebx_30 = 0xff;
005f7199              
005f71a0              if (ebx_30 <= 0)
005f71b4                  var_30_1 = 0;
005f71a0              else if (var_30_1 >= 0xff)
005f71ab                  var_30_1 = 0xff;
005f71ab              
005f71be              int32_t ebx_31 = edx_12;
005f71be              
005f71c0              if (edx_12 >= 0xff)
005f71c2                  ebx_31 = 0xff;
005f71c2              
005f71c9              if (ebx_31 <= 0)
005f71d8                  edx_12 = 0;
005f71c9              else if (edx_12 >= 0xff)
005f71d4                  edx_12 = 0xff;
005f71d4              
005f71da              int32_t* ebx_32 = var_8;
005f71ef              *(uint32_t*)ebx_32 = ((((((edx_12 << 8) | var_30_1) << 8) | var_34_1) << 8) | var_38_1);
005f71f7              arg3 += ecx_9;
005f71fa              eax_13 += ecx_9;
005f71fc              edi_4 += ecx_9;
005f71fe              ecx_11 += ecx_9;
005f7200              arg2 += 1;
005f7209              var_8 = &ebx_32[ebx_2];
005f720c          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f6f38      }
005f6f38      
005f7218      int16_t x87control_2;
005f7218      int16_t x87status_2;
005f7218      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f6e73  }


005f7222  void __thiscall D3DXTex::CCodec_X8B8G8R8::Encode(D3DXTex::CCodec_X8B8G8R8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f7222  {
005f7232      int32_t edi;
005f7232      int32_t var_60 = edi;
005f7232      
005f7233      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f7233      {
005f7238          struct D3DXCOLOR* eax_1;
005f7238          int80_t st0_1;
005f7238          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f723d          arg4 = eax_1;
005f7233      }
005f7233      
005f7244      int16_t x87control;
005f7244      
005f7244      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f7244      {
005f724b          struct D3DXCOLOR* eax_2;
005f724b          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f7250          arg4 = eax_2;
005f7244      }
005f7244      
005f7253      uint32_t eax_3 = arg2;
005f7258      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f725b      float var_54 = ((float)((long double)0));
005f7269      float var_50 = ((float)((long double)0));
005f726e      float var_4c = ((float)((long double)0));
005f7274      arg2 = (eax_3 & 1);
005f729d      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f72a0      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f72a6      int32_t ebx_2;
005f72a6      int32_t edi_2;
005f72a6      
005f72a6      if (arg2 != 0)
005f72a6      {
005f72af          edi_2 = (edi_1 - 1);
005f72b0          ebx_2 = 0xffffffff;
005f72a6      }
005f72a6      else
005f72a6      {
005f72aa          edi_2 = 0;
005f72ac          ebx_2 = 1;
005f72a6      }
005f72a6      
005f72b3      int16_t x87status;
005f72b3      int16_t temp0;
005f72b3      temp0 = __fnstcw_memmem16(x87control);
005f72b3      arg2 = temp0;
005f72c1      int16_t x87control_1;
005f72c1      int16_t x87status_1;
005f72c1      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f72c7      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f72c7      
005f72ce      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f72d5          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f72d5      
005f72da      arg2 = 0;
005f72da      
005f72e2      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f72e2      {
005f72f2          int32_t ecx_8 = (ebx_2 << 4);
005f7300          int32_t eax_13 = (edi_2 << 4);
005f7305          int32_t ecx_10 = ((ebx_2 + edi_2) << 4);
005f730f          int32_t ebx_3 = ((edi_2 - ebx_2) << 4);
005f7311          arg4 = (&arg4->b + eax_13);
005f7311          
005f7522          do
005f7522          {
005f731d              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f7320              float* edx_9 = arg4;
005f7323              arg3 = ((float)x87_r7_3);
005f7332              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_9[-2])) * ((long double)255f)));
005f7341              float var_40_1 = ((float)((((long double)var_50) + ((long double)edx_9[-1])) * ((long double)255f)));
005f734f              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)*(uint32_t*)edx_9)) * ((long double)255f)));
005f736b              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_3))));
005f7380              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg3)))));
005f7390              int32_t edx_12 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg3)))));
005f7390              
005f7396              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f7396              {
005f739c                  long double x87_r7_11 = ((long double)0.00392156886f);
005f73a8                  float* edi_7 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x10);
005f73af                  long double x87_r6_14 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_11);
005f73bb                  *(uint32_t*)edi_7 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)edi_7)));
005f73c6                  float* edi_9 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f73ce                  *(uint32_t*)edi_9 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)edi_9)));
005f73d9                  float* edi_11 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x10);
005f73e1                  *(uint32_t*)edi_11 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)edi_11)));
005f73e6                  float* edi_13 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x14);
005f73f0                  var_54 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f73f9                  long double x87_r6_18 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_11);
005f7405                  *(uint32_t*)edi_13 = ((float)((((long double)0.1875f) * x87_r6_18) + ((long double)*(uint32_t*)edi_13)));
005f7410                  float* edi_15 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f7418                  *(uint32_t*)edi_15 = ((float)((((long double)0.3125f) * x87_r6_18) + ((long double)*(uint32_t*)edi_15)));
005f7423                  float* edi_17 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x14);
005f742b                  *(uint32_t*)edi_17 = ((float)((((long double)0.0625f) * x87_r6_18) + ((long double)*(uint32_t*)edi_17)));
005f7430                  float* edi_19 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x18);
005f743a                  var_50 = ((float)(x87_r6_18 * ((long double)0.4375)));
005f7443                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_3c_1) - ((long double)edx_12)));
005f744f                  *(uint32_t*)edi_19 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edi_19)));
005f745a                  float* edi_21 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x18);
005f7462                  *(uint32_t*)edi_21 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edi_21)));
005f746d                  float* edi_23 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_10) + 0x18);
005f7475                  *(uint32_t*)edi_23 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edi_23)));
005f747d                  var_4c = ((float)(x87_r7_12 * ((long double)0.4375)));
005f7396              }
005f7396              
005f7480              int32_t edi_24 = var_34_1;
005f7480              
005f7489              if (edi_24 >= 0xff)
005f748b                  edi_24 = 0xff;
005f748b              
005f7492              if (edi_24 <= 0)
005f74a6                  var_34_1 = 0;
005f7492              else if (var_34_1 >= 0xff)
005f749d                  var_34_1 = 0xff;
005f749d              
005f74aa              int32_t edi_25 = var_30_1;
005f74aa              
005f74b3              if (edi_25 >= 0xff)
005f74b5                  edi_25 = 0xff;
005f74b5              
005f74bc              if (edi_25 <= 0)
005f74d0                  var_30_1 = 0;
005f74bc              else if (var_30_1 >= 0xff)
005f74c7                  var_30_1 = 0xff;
005f74c7              
005f74da              int32_t edi_26 = edx_12;
005f74da              
005f74dc              if (edx_12 >= 0xff)
005f74de                  edi_26 = 0xff;
005f74de              
005f74e5              if (edi_26 <= 0)
005f74f4                  edx_12 = 0;
005f74e5              else if (edx_12 >= 0xff)
005f74f0                  edx_12 = 0xff;
005f74f0              
005f74f6              int32_t* edi_27 = var_8;
005f7505              *(uint32_t*)edi_27 = ((((edx_12 << 8) | var_30_1) << 8) | var_34_1);
005f750d              arg4 += ecx_8;
005f7510              eax_13 += ecx_8;
005f7512              ebx_3 += ecx_8;
005f7514              ecx_10 += ecx_8;
005f7516              arg2 += 1;
005f751f              var_8 = &edi_27[ebx_2];
005f7522          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f72e2      }
005f72e2      
005f752e      int16_t x87control_2;
005f752e      int16_t x87status_2;
005f752e      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f7222  }


005f7538  void __thiscall D3DXTex::CCodec_G16R16::Encode(D3DXTex::CCodec_G16R16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f7538  {
005f7548      int32_t edi;
005f7548      int32_t var_60 = edi;
005f7548      
005f7549      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f7549      {
005f754e          struct D3DXCOLOR* eax_1;
005f754e          int80_t st0_1;
005f754e          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f7553          arg4 = eax_1;
005f7549      }
005f7549      
005f755a      int16_t x87control;
005f755a      
005f755a      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f755a      {
005f7561          struct D3DXCOLOR* eax_2;
005f7561          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f7566          arg4 = eax_2;
005f755a      }
005f755a      
005f7569      uint32_t eax_3 = arg2;
005f756e      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f7571      float var_54 = ((float)((long double)0));
005f757c      float var_50 = ((float)((long double)0));
005f7582      arg2 = (eax_3 & 1);
005f75a1      int32_t* ebx_2 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f75ae      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f75b1      int32_t* var_8 = ebx_2;
005f75b7      int32_t edi_2;
005f75b7      
005f75b7      if (arg2 != 0)
005f75b7      {
005f75c4          edi_2 = (edi_1 - 1);
005f75c5          arg3 = 0xffffffff;
005f75b7      }
005f75b7      else
005f75b7      {
005f75b9          edi_2 = 0;
005f75bb          arg3 = 1;
005f75b7      }
005f75b7      
005f75c9      int16_t x87status;
005f75c9      int16_t temp0;
005f75c9      temp0 = __fnstcw_memmem16(x87control);
005f75c9      arg2 = temp0;
005f75d7      int16_t x87control_1;
005f75d7      int16_t x87status_1;
005f75d7      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f75dd      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f75dd      
005f75e4      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f75eb          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f75eb      
005f75f0      arg2 = 0;
005f75f0      
005f75f8      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f75f8      {
005f7603          uint32_t eax_11 = (arg3 << 2);
005f7612          uint32_t ecx_8 = (arg3 << 4);
005f7615          int32_t eax_13 = (edi_2 << 4);
005f7618          int32_t edx_6 = ((arg3 + edi_2) << 4);
005f7621          arg3 = ((edi_2 - arg3) << 4);
005f7621          
005f7797          do
005f7797          {
005f762d              long double x87_r7_2 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f7636              float* ecx_12 = ((char*)arg4 + eax_13);
005f7643              float var_44_1 = ((float)((((long double)var_54) + ((long double)*(uint32_t*)ecx_12)) * ((long double)65535f)));
005f7652              float var_40_1 = ((float)((((long double)var_50) + ((long double)ecx_12[1])) * ((long double)65535f)));
005f766e              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_2))));
005f767e              int32_t ecx_14 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)((float)x87_r7_2))))));
005f767e              
005f7684              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f7684              {
005f768a                  long double x87_r7_7 = ((long double)1.52590219e-05f);
005f7699                  float* edi_7 = ((arg3 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f76a0                  long double x87_r6_11 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_7);
005f76ac                  *(uint32_t*)edi_7 = ((float)((((long double)0.1875f) * x87_r6_11) + ((long double)*(uint32_t*)edi_7)));
005f76b7                  float* edi_9 = ((eax_13 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f76bf                  *(uint32_t*)edi_9 = ((float)((((long double)0.3125f) * x87_r6_11) + ((long double)*(uint32_t*)edi_9)));
005f76ca                  float* edi_11 = ((edx_6 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f76d2                  *(uint32_t*)edi_11 = ((float)((((long double)0.0625f) * x87_r6_11) + ((long double)*(uint32_t*)edi_11)));
005f76d7                  float* edi_13 = ((arg3 + *(uint32_t*)((char*)this + 0x5c)) + 0x14);
005f76e1                  ebx_2 = var_8;
005f76e4                  var_54 = ((float)(x87_r6_11 * ((long double)0.4375)));
005f76ed                  long double x87_r7_8 = (x87_r7_7 * (((long double)var_40_1) - ((long double)ecx_14)));
005f76f9                  *(uint32_t*)edi_13 = ((float)((((long double)0.1875f) * x87_r7_8) + ((long double)*(uint32_t*)edi_13)));
005f7704                  float* edi_15 = ((eax_13 + *(uint32_t*)((char*)this + 0x5c)) + 0x14);
005f770c                  *(uint32_t*)edi_15 = ((float)((((long double)0.3125f) * x87_r7_8) + ((long double)*(uint32_t*)edi_15)));
005f7717                  float* edi_17 = ((edx_6 + *(uint32_t*)((char*)this + 0x5c)) + 0x14);
005f771f                  *(uint32_t*)edi_17 = ((float)((((long double)0.0625f) * x87_r7_8) + ((long double)*(uint32_t*)edi_17)));
005f7727                  var_50 = ((float)(x87_r7_8 * ((long double)0.4375)));
005f7684              }
005f7684              
005f772a              int32_t edi_18 = var_34_1;
005f772a              
005f7733              if (edi_18 >= 0xffff)
005f7735                  edi_18 = 0xffff;
005f7735              
005f773c              if (edi_18 <= 0)
005f7750                  var_34_1 = 0;
005f773c              else if (var_34_1 >= 0xffff)
005f7747                  var_34_1 = 0xffff;
005f7747              
005f775a              int32_t edi_19 = ecx_14;
005f775a              
005f775c              if (ecx_14 >= 0xffff)
005f775e                  edi_19 = 0xffff;
005f775e              
005f7765              if (edi_19 <= 0)
005f7774                  ecx_14 = 0;
005f7765              else if (ecx_14 >= 0xffff)
005f7770                  ecx_14 = 0xffff;
005f7770              
005f777c              *(uint32_t*)ebx_2 = ((ecx_14 << 0x10) | var_34_1);
005f7781              ebx_2 += eax_11;
005f7784              arg3 += ecx_8;
005f7787              eax_13 += ecx_8;
005f7789              edx_6 += ecx_8;
005f778b              arg2 += 1;
005f7794              var_8 = ebx_2;
005f7797          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f75f8      }
005f75f8      
005f77a3      int16_t x87control_2;
005f77a3      int16_t x87status_2;
005f77a3      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f7538  }


005f77ad  void __thiscall D3DXTex::CCodec_A2R10G10B10::Encode(D3DXTex::CCodec_A2R10G10B10* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f77ad  {
005f77bd      int32_t edi;
005f77bd      int32_t var_64 = edi;
005f77bd      
005f77be      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f77be      {
005f77c3          struct D3DXCOLOR* eax_1;
005f77c3          int80_t st0_1;
005f77c3          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f77c8          arg4 = eax_1;
005f77be      }
005f77be      
005f77cf      int16_t x87control;
005f77cf      
005f77cf      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f77cf      {
005f77d6          struct D3DXCOLOR* eax_2;
005f77d6          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f77db          arg4 = eax_2;
005f77cf      }
005f77cf      
005f77de      uint32_t eax_3 = arg2;
005f77e3      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f77e6      float var_58 = ((float)((long double)0));
005f77f4      float var_54 = ((float)((long double)0));
005f77f9      float var_50 = ((float)((long double)0));
005f77fe      float var_4c = ((float)((long double)0));
005f7804      arg2 = (eax_3 & 1);
005f7827      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f7830      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f7836      int32_t ebx_2;
005f7836      int32_t edi_2;
005f7836      
005f7836      if (arg2 != 0)
005f7836      {
005f783f          edi_2 = (edi_1 - 1);
005f7840          ebx_2 = 0xffffffff;
005f7836      }
005f7836      else
005f7836      {
005f783a          edi_2 = 0;
005f783c          ebx_2 = 1;
005f7836      }
005f7836      
005f7843      int16_t x87status;
005f7843      int16_t temp0;
005f7843      temp0 = __fnstcw_memmem16(x87control);
005f7843      arg2 = temp0;
005f7851      int16_t x87control_1;
005f7851      int16_t x87status_1;
005f7851      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f7857      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f7857      
005f785e      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f7865          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f7865      
005f786a      arg2 = 0;
005f786a      
005f7872      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f7872      {
005f7887          int32_t ecx_9 = (ebx_2 << 4);
005f788a          int32_t eax_13 = (edi_2 << 4);
005f7899          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f789c          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f789f          arg3 = (&arg4->b + eax_13);
005f789f          
005f7b4c          do
005f7b4c          {
005f78ab              long double x87_r7_4 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f78ae              float* edx_8 = arg3;
005f78b1              arg4 = ((float)x87_r7_4);
005f78c0              float var_48_1 = ((float)((((long double)var_58) + ((long double)edx_8[-2])) * ((long double)1023f)));
005f78cf              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_8[-1])) * ((long double)1023f)));
005f78dd              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edx_8)) * ((long double)1023f)));
005f78ec              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)edx_8[1])) * ((long double)3f)));
005f7908              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r7_4))));
005f791d              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f7932              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f7942              int32_t edx_12 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f7942              
005f7948              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f7948              {
005f794e                  long double x87_r7_15 = ((long double)0.000977517106f);
005f795a                  float* ebx_5 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f7961                  long double x87_r6_17 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_15);
005f796d                  *(uint32_t*)ebx_5 = ((float)((((long double)0.1875f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_5)));
005f7978                  float* ebx_7 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f7980                  *(uint32_t*)ebx_7 = ((float)((((long double)0.3125f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_7)));
005f798b                  float* ebx_9 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f7993                  *(uint32_t*)ebx_9 = ((float)((((long double)0.0625f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_9)));
005f7998                  float* ebx_11 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f79a2                  var_58 = ((float)(x87_r6_17 * ((long double)0.4375)));
005f79ab                  long double x87_r6_21 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_15);
005f79b7                  *(uint32_t*)ebx_11 = ((float)((((long double)0.1875f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_11)));
005f79c2                  float* ebx_13 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f79ca                  *(uint32_t*)ebx_13 = ((float)((((long double)0.3125f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_13)));
005f79d5                  float* ebx_15 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f79dd                  *(uint32_t*)ebx_15 = ((float)((((long double)0.0625f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_15)));
005f79e2                  float* ebx_17 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f79ec                  var_54 = ((float)(x87_r6_21 * ((long double)0.4375)));
005f79f5                  long double x87_r7_16 = (x87_r7_15 * (((long double)var_40_1) - ((long double)var_30_1)));
005f7a01                  *(uint32_t*)ebx_17 = ((float)((((long double)0.1875f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_17)));
005f7a0c                  float* ebx_19 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x18);
005f7a14                  *(uint32_t*)ebx_19 = ((float)((((long double)0.3125f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_19)));
005f7a1f                  float* ebx_21 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f7a27                  *(uint32_t*)ebx_21 = ((float)((((long double)0.0625f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_21)));
005f7a2c                  float* ebx_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f7a36                  var_50 = ((float)(x87_r7_16 * ((long double)0.4375)));
005f7a3f                  long double x87_r7_20 = ((((long double)var_3c_1) - ((long double)edx_12)) * ((long double)0.333333343f));
005f7a4f                  *(uint32_t*)ebx_23 = ((float)((((long double)0.1875f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_23)));
005f7a5a                  float* ebx_25 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x1c);
005f7a62                  *(uint32_t*)ebx_25 = ((float)((((long double)0.3125f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_25)));
005f7a6d                  float* ebx_27 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f7a75                  *(uint32_t*)ebx_27 = ((float)((((long double)0.0625f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_27)));
005f7a7d                  var_4c = ((float)(x87_r7_20 * ((long double)0.4375)));
005f7948              }
005f7948              
005f7a80              int32_t ebx_28 = var_38_1;
005f7a80              
005f7a89              if (ebx_28 >= 0x3ff)
005f7a8b                  ebx_28 = 0x3ff;
005f7a8b              
005f7a92              if (ebx_28 <= 0)
005f7aa6                  var_38_1 = 0;
005f7a92              else if (var_38_1 >= 0x3ff)
005f7a9d                  var_38_1 = 0x3ff;
005f7a9d              
005f7aaa              int32_t ebx_29 = var_34_1;
005f7aaa              
005f7ab3              if (ebx_29 >= 0x3ff)
005f7ab5                  ebx_29 = 0x3ff;
005f7ab5              
005f7abc              if (ebx_29 <= 0)
005f7ad0                  var_34_1 = 0;
005f7abc              else if (var_34_1 >= 0x3ff)
005f7ac7                  var_34_1 = 0x3ff;
005f7ac7              
005f7ad4              int32_t ebx_30 = var_30_1;
005f7ad4              
005f7add              if (ebx_30 >= 0x3ff)
005f7adf                  ebx_30 = 0x3ff;
005f7adf              
005f7ae6              if (ebx_30 <= 0)
005f7afa                  var_30_1 = 0;
005f7ae6              else if (var_30_1 >= 0x3ff)
005f7af1                  var_30_1 = 0x3ff;
005f7af1              
005f7b01              int32_t ebx_31;
005f7b01              
005f7b01              if (edx_12 >= 3)
005f7b09                  ebx_31 = 3;
005f7b01              else
005f7b03                  ebx_31 = edx_12;
005f7b03              
005f7b0c              if (ebx_31 <= 0)
005f7b18                  edx_12 = 0;
005f7b0c              else if (edx_12 >= 3)
005f7b15                  edx_12 = 3;
005f7b15              
005f7b1a              int32_t* ebx_32 = var_8;
005f7b2f              *(uint32_t*)ebx_32 = ((((((edx_12 << 0xa) | var_38_1) << 0xa) | var_34_1) << 0xa) | var_30_1);
005f7b37              arg3 += ecx_9;
005f7b3a              eax_13 += ecx_9;
005f7b3c              edi_4 += ecx_9;
005f7b3e              ecx_11 += ecx_9;
005f7b40              arg2 += 1;
005f7b49              var_8 = &ebx_32[ebx_2];
005f7b4c          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f7872      }
005f7872      
005f7b58      int16_t x87control_2;
005f7b58      int16_t x87status_2;
005f7b58      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f77ad  }


005f7b62  void __thiscall D3DXTex::CCodec_A16B16G16R16::Encode(D3DXTex::CCodec_A16B16G16R16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f7b62  {
005f7b72      int32_t edi;
005f7b72      int32_t var_6c = edi;
005f7b72      
005f7b73      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f7b73      {
005f7b78          struct D3DXCOLOR* eax_1;
005f7b78          int80_t st0_1;
005f7b78          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f7b7d          arg4 = eax_1;
005f7b73      }
005f7b73      
005f7b84      int16_t x87control;
005f7b84      
005f7b84      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f7b84      {
005f7b8b          struct D3DXCOLOR* eax_2;
005f7b8b          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f7b90          arg4 = eax_2;
005f7b84      }
005f7b84      
005f7b93      uint32_t eax_3 = arg2;
005f7b98      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f7b9b      float var_60 = ((float)((long double)0));
005f7ba9      float var_5c = ((float)((long double)0));
005f7bae      float var_58 = ((float)((long double)0));
005f7bb3      float var_54 = ((float)((long double)0));
005f7bb9      arg2 = (eax_3 & 1);
005f7bdc      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 3)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f7be5      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f7beb      int32_t ebx_2;
005f7beb      int32_t edi_2;
005f7beb      
005f7beb      if (arg2 != 0)
005f7beb      {
005f7bf4          edi_2 = (edi_1 - 1);
005f7bf5          ebx_2 = 0xffffffff;
005f7beb      }
005f7beb      else
005f7beb      {
005f7bef          edi_2 = 0;
005f7bf1          ebx_2 = 1;
005f7beb      }
005f7beb      
005f7bf8      int16_t x87status;
005f7bf8      int16_t temp0;
005f7bf8      temp0 = __fnstcw_memmem16(x87control);
005f7bf8      arg2 = temp0;
005f7c06      int16_t x87control_1;
005f7c06      int16_t x87status_1;
005f7c06      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f7c0c      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f7c0c      
005f7c13      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f7c1a          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f7c1a      
005f7c1f      arg2 = 0;
005f7c1f      
005f7c27      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f7c27      {
005f7c37          int32_t eax_13 = (ebx_2 << 4);
005f7c45          int32_t ecx_9 = (edi_2 << 4);
005f7c48          int32_t edx_5 = ((ebx_2 + edi_2) << 4);
005f7c4d          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f7c54          int32_t var_10_1 = edx_5;
005f7c57          int32_t var_c_1 = edi_4;
005f7c5a          arg3 = (&arg4->b + ecx_9);
005f7c5a          
005f7f03          do
005f7f03          {
005f7c60              long double x87_r7_4 = ((long double)65535f);
005f7c6c              long double x87_r6_1 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f7c6f              float* eax_18 = arg3;
005f7c72              arg4 = ((float)x87_r6_1);
005f7c7d              float var_50_1 = ((float)((((long double)var_60) + ((long double)eax_18[-2])) * x87_r7_4));
005f7c88              float var_4c_1 = ((float)((((long double)var_5c) + ((long double)eax_18[-1])) * x87_r7_4));
005f7c92              float var_48_1 = ((float)((((long double)var_58) + ((long double)*(uint32_t*)eax_18)) * x87_r7_4));
005f7c9d              float var_44_1 = ((float)((((long double)var_54) + ((long double)eax_18[1])) * x87_r7_4));
005f7caf              int32_t var_1c_1 = ((int32_t)((long double)((float)(((long double)var_50_1) + x87_r6_1))));
005f7cbb              int32_t var_40_1 = var_1c_1;
005f7cd0              int32_t var_3c_1 = ((int32_t)((long double)((float)(((long double)var_4c_1) + ((long double)arg4)))));
005f7ce5              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + ((long double)arg4)))));
005f7cf8              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f7cf8              
005f7cfb              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f7cfb              {
005f7d01                  long double x87_r7_16 = ((long double)1.52590219e-05f);
005f7d0d                  float* eax_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f7d14                  long double x87_r6_4 = ((((long double)var_50_1) - ((long double)var_40_1)) * x87_r7_16);
005f7d20                  *(uint32_t*)eax_23 = ((float)((((long double)0.1875f) * x87_r6_4) + ((long double)*(uint32_t*)eax_23)));
005f7d2b                  float* eax_25 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x10);
005f7d33                  *(uint32_t*)eax_25 = ((float)((((long double)0.3125f) * x87_r6_4) + ((long double)*(uint32_t*)eax_25)));
005f7d3e                  float* eax_27 = ((*(uint32_t*)((char*)this + 0x5c) + edx_5) + 0x10);
005f7d46                  *(uint32_t*)eax_27 = ((float)((((long double)0.0625f) * x87_r6_4) + ((long double)*(uint32_t*)eax_27)));
005f7d4b                  float* eax_29 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f7d55                  var_60 = ((float)(x87_r6_4 * ((long double)0.4375)));
005f7d5e                  long double x87_r6_8 = ((((long double)var_4c_1) - ((long double)var_3c_1)) * x87_r7_16);
005f7d6a                  *(uint32_t*)eax_29 = ((float)((((long double)0.1875f) * x87_r6_8) + ((long double)*(uint32_t*)eax_29)));
005f7d75                  float* eax_31 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x14);
005f7d7d                  *(uint32_t*)eax_31 = ((float)((((long double)0.3125f) * x87_r6_8) + ((long double)*(uint32_t*)eax_31)));
005f7d88                  float* eax_33 = ((*(uint32_t*)((char*)this + 0x5c) + edx_5) + 0x14);
005f7d90                  *(uint32_t*)eax_33 = ((float)((((long double)0.0625f) * x87_r6_8) + ((long double)*(uint32_t*)eax_33)));
005f7d95                  float* eax_35 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f7d9f                  var_5c = ((float)(x87_r6_8 * ((long double)0.4375)));
005f7da8                  long double x87_r6_12 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_16);
005f7db4                  *(uint32_t*)eax_35 = ((float)((((long double)0.1875f) * x87_r6_12) + ((long double)*(uint32_t*)eax_35)));
005f7dbf                  float* eax_37 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x18);
005f7dc7                  *(uint32_t*)eax_37 = ((float)((((long double)0.3125f) * x87_r6_12) + ((long double)*(uint32_t*)eax_37)));
005f7dd2                  float* eax_39 = ((*(uint32_t*)((char*)this + 0x5c) + edx_5) + 0x18);
005f7dda                  *(uint32_t*)eax_39 = ((float)((((long double)0.0625f) * x87_r6_12) + ((long double)*(uint32_t*)eax_39)));
005f7ddf                  float* edi_5 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f7de9                  var_58 = ((float)(x87_r6_12 * ((long double)0.4375)));
005f7df2                  long double x87_r7_17 = (x87_r7_16 * (((long double)var_44_1) - ((long double)var_34_1)));
005f7dfe                  *(uint32_t*)edi_5 = ((float)((((long double)0.1875f) * x87_r7_17) + ((long double)*(uint32_t*)edi_5)));
005f7e09                  float* eax_42 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x1c);
005f7e11                  *(uint32_t*)eax_42 = ((float)((((long double)0.3125f) * x87_r7_17) + ((long double)*(uint32_t*)eax_42)));
005f7e1c                  float* edx_6 = ((*(uint32_t*)((char*)this + 0x5c) + edx_5) + 0x1c);
005f7e24                  *(uint32_t*)edx_6 = ((float)((((long double)0.0625f) * x87_r7_17) + ((long double)*(uint32_t*)edx_6)));
005f7e2c                  var_54 = ((float)(x87_r7_17 * ((long double)0.4375)));
005f7cfb              }
005f7cfb              
005f7e36              int32_t edx_7 = var_1c_1;
005f7e36              
005f7e38              if (var_1c_1 >= 0xffff)
005f7e3a                  edx_7 = 0xffff;
005f7e3a              
005f7e40              if (edx_7 <= 0)
005f7e4b                  var_40_1 = 0;
005f7e40              else if (var_1c_1 >= 0xffff)
005f7e46                  var_40_1 = 0xffff;
005f7e46              
005f7e51              int32_t edx_8 = var_3c_1;
005f7e51              
005f7e54              if (var_3c_1 >= 0xffff)
005f7e56                  edx_8 = 0xffff;
005f7e56              
005f7e5a              if (edx_8 <= 0)
005f7e66                  var_3c_1 = 0;
005f7e5a              else if (var_3c_1 >= 0xffff)
005f7e61                  var_3c_1 = 0xffff;
005f7e61              
005f7e6c              int32_t edx_9 = var_38_1;
005f7e6c              
005f7e6f              if (var_38_1 >= 0xffff)
005f7e71                  edx_9 = 0xffff;
005f7e71              
005f7e75              if (edx_9 <= 0)
005f7e81                  var_38_1 = 0;
005f7e75              else if (var_38_1 >= 0xffff)
005f7e7c                  var_38_1 = 0xffff;
005f7e7c              
005f7e87              int32_t edx_10 = var_34_1;
005f7e87              
005f7e8a              if (var_34_1 >= 0xffff)
005f7e8c                  edx_10 = 0xffff;
005f7e8c              
005f7e90              if (edx_10 <= 0)
005f7e9c                  var_34_1 = 0;
005f7e90              else if (var_34_1 >= 0xffff)
005f7e97                  var_34_1 = 0xffff;
005f7e97              
005f7ea2              int32_t eax_45;
005f7ea2              int32_t edx_11;
005f7ea2              edx_11 = HIGHD(((int64_t)var_34_1));
005f7ea2              eax_45 = LOWD(((int64_t)var_34_1));
005f7eb1              int32_t eax_48;
005f7eb1              int32_t edx_13;
005f7eb1              edx_13 = HIGHD(((int64_t)var_38_1));
005f7eb1              eax_48 = LOWD(((int64_t)var_38_1));
005f7eb2              int32_t edi_7 = ((eax_45 << 0x10) | eax_48);
005f7ebd              int32_t eax_50;
005f7ebd              int32_t edx_14;
005f7ebd              edx_14 = HIGHD(((int64_t)var_3c_1));
005f7ebd              eax_50 = LOWD(((int64_t)var_3c_1));
005f7ec1              int32_t edi_9 = ((edi_7 << 0x10) | eax_50);
005f7ecc              int32_t eax_52;
005f7ecc              int32_t edx_15;
005f7ecc              edx_15 = HIGHD(((int64_t)var_40_1));
005f7ecc              eax_52 = LOWD(((int64_t)var_40_1));
005f7ed2              int32_t* eax_53 = var_8;
005f7eda              *(uint32_t*)eax_53 = ((edi_9 << 0x10) | eax_52);
005f7edf              eax_53[1] = (((((((((edx_11 << 0x10) | (eax_45 >> 0xfffffff0)) | edx_13) << 0x10) | (edi_7 >> 0xfffffff0)) | edx_14) << 0x10) | (edi_9 >> 0xfffffff0)) | edx_15);
005f7ee5              var_8 = &eax_53[(ebx_2 * 2)];
005f7eeb              arg3 += eax_13;
005f7eee              edi_4 = (var_c_1 + eax_13);
005f7ef0              edx_5 = (var_10_1 + eax_13);
005f7ef2              ecx_9 += eax_13;
005f7ef4              arg2 += 1;
005f7efd              var_c_1 = edi_4;
005f7f00              var_10_1 = edx_5;
005f7f03          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f7c27      }
005f7c27      
005f7f0f      int16_t x87control_2;
005f7f0f      int16_t x87status_2;
005f7f0f      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f7b62  }


005f7f19  void __thiscall D3DXTex::CCodec_A8P8::Encode(D3DXTex::CCodec_A8P8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f7f19  {
005f7f29      int32_t edi;
005f7f29      int32_t var_64 = edi;
005f7f29      
005f7f2a      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f7f2a      {
005f7f2f          struct D3DXCOLOR* eax_1;
005f7f2f          int80_t st0_1;
005f7f2f          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f7f34          arg4 = eax_1;
005f7f2a      }
005f7f2a      
005f7f3b      int16_t x87control;
005f7f3b      
005f7f3b      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f7f3b      {
005f7f42          struct D3DXCOLOR* eax_2;
005f7f42          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f7f47          arg4 = eax_2;
005f7f3b      }
005f7f3b      
005f7f4a      uint32_t eax_3 = arg2;
005f7f4f      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f7f52      float var_3c = ((float)((long double)0));
005f7f5e      arg2 = (eax_3 & 1);
005f7f83      int16_t* ebx_2 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f7f8a      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f7f90      int32_t edi_2;
005f7f90      
005f7f90      if (arg2 != 0)
005f7f90      {
005f7f9d          edi_2 = (edi_1 - 1);
005f7f9e          arg2 = 0xffffffff;
005f7f90      }
005f7f90      else
005f7f90      {
005f7f92          edi_2 = 0;
005f7f94          arg2 = 1;
005f7f90      }
005f7f90      
005f7fa2      int16_t x87status;
005f7fa2      int16_t temp0;
005f7fa2      temp0 = __fnstcw_memmem16(x87control);
005f7fa2      arg3 = temp0;
005f7fb0      int16_t x87control_1;
005f7fb0      int16_t x87status_1;
005f7fb0      x87control_1 = __fldcw_memmem16((arg3 | 0xc00));
005f7fb6      *(uint32_t*)((char*)this + 0x7c) = arg3;
005f7fb6      
005f7fbd      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f7fc4          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f7fc4      
005f7fc9      arg3 = 0;
005f7fc9      
005f7fd1      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f7fd1      {
005f7fda          uint32_t eax_10 = (arg2 * 2);
005f7fe2          uint32_t eax_12 = (arg2 << 4);
005f7ff5          int32_t edx_6 = ((edi_2 - arg2) << 4);
005f7ff8          uint32_t edi_4 = &arg4[edi_2].b;
005f8003          int32_t ecx_9 = ((arg2 + edi_2) << 4);
005f8006          void* var_c_1 = (0xfffffff8 - arg4);
005f8009          int32_t var_1c_1 = edx_6;
005f800c          arg2 = edi_4;
005f800c          
005f814b          do
005f814b          {
005f800f              float* eax_14 = *(uint32_t*)((char*)this + 0x38);
005f8012              int16_t var_18_1 = 0;
005f8016              arg4 = nullptr;
005f801a              float var_14_1 = 3.40282347e+38f;
005f8021              float* var_8_1 = eax_14;
005f8021              
005f802c              while (true)
005f802c              {
005f802c                  (((long double)*(uint32_t*)(edi_4 - 8)) - ((long double)*(uint32_t*)eax_14));
005f8031                  (((long double)*(uint32_t*)(edi_4 - 4)) - ((long double)eax_14[1]));
005f8036                  long double x87_r5_2 = (((long double)*(uint32_t*)edi_4) - ((long double)eax_14[2]));
005f804f                  long double temp1_1 = ((long double)var_14_1);
005f804f                  (x87_r5_2 - temp1_1);
005f8052                  eax_14 = ((((x87_r5_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r5_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
005f8054                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005f8054                  
005f8057                  if (!(p_1))
005f8057                  {
005f805c                      var_14_1 = ((float)x87_r5_2);
005f805f                      var_18_1 = arg4;
005f8057                  }
005f8057                  
005f8066                  arg4 = (&arg4->r + 1);
005f8069                  var_8_1 = &var_8_1[4];
005f8069                  
005f8074                  if (arg4 >= 0x100)
005f8074                      break;
005f8074                  
005f8026                  eax_14 = var_8_1;
005f802c              }
005f802c              
005f808b              float var_2c_1 = ((float)((((long double)var_3c) + ((long double)*(uint32_t*)(edi_4 + 4))) * ((long double)255f)));
005f80a1              int32_t eax_18 = ((int32_t)((long double)((float)(((long double)var_2c_1) + ((long double)*(uint32_t*)(eax_6 + ((arg3 & 3) << 2)))))));
005f80a7              uint32_t edi_7;
005f80a7              
005f80a7              if (*(uint32_t*)((char*)this + 0x5c) == 0)
005f80ff                  edi_7 = arg2;
005f80a7              else
005f80a7              {
005f80af                  float* edx_7 = ((*(uint32_t*)((char*)this + 0x5c) + edx_6) + 0x1c);
005f80b3                  edi_7 = arg2;
005f80b9                  long double x87_r7_12 = ((((long double)var_2c_1) - ((long double)eax_18)) * ((long double)0.00392156886f));
005f80c9                  *(uint32_t*)edx_7 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edx_7)));
005f80d9                  void* edx_10 = (((*(uint32_t*)((char*)this + 0x5c) + var_c_1) + edi_7) + 0x1c);
005f80df                  *(uint32_t*)edx_10 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edx_10)));
005f80ea                  float* edx_12 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x1c);
005f80f2                  *(uint32_t*)edx_12 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edx_12)));
005f80fa                  var_3c = ((float)(x87_r7_12 * ((long double)0.4375)));
005f80a7              }
005f80a7              
005f8107              int32_t edx_13 = eax_18;
005f8107              
005f8109              if (eax_18 >= 0xff)
005f810b                  edx_13 = 0xff;
005f810b              
005f8112              if (edx_13 <= 0)
005f8121                  eax_18 = 0;
005f8112              else if (eax_18 >= 0xff)
005f811d                  eax_18 = 0xff;
005f811d              
005f8123              edi_4 = (edi_7 + eax_12);
005f8126              ecx_9 += eax_12;
005f812b              int16_t edx_14;
005f812b              *(uint8_t*)((char*)edx_14)[1] = eax_18;
005f812d              arg2 = edi_4;
005f8133              *(uint16_t*)ebx_2 = (edx_14 | var_18_1);
005f8139              edx_6 = (var_1c_1 + eax_12);
005f813c              ebx_2 += eax_10;
005f813f              arg3 += 1;
005f8148              var_1c_1 = edx_6;
005f814b          } while (arg3 < *(uint32_t*)((char*)this + 0x68));
005f7fd1      }
005f7fd1      
005f8157      int16_t x87control_2;
005f8157      int16_t x87status_2;
005f8157      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f7f19  }


005f8161  void __thiscall D3DXTex::CCodec_P8::Encode(D3DXTex::CCodec_P8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f8161  {
005f8167      int32_t edi;
005f8167      int32_t var_c = edi;
005f816f      struct D3DXCOLOR* eax;
005f816f      int80_t st0_1;
005f816f      
005f816f      if (*(uint32_t*)((char*)this + 0x54) == 0)
005f817b          eax = arg4;
005f816f      else
005f8174          eax = D3DXTex::CCodec::Convert(this, arg4);
005f8174      
005f8181      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f8186          eax = D3DXTex::CCodec::EncodeGamma22(this, eax);
005f8186      
005f819b      char* ecx_4 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f81a1      arg2 = 0;
005f81a1      
005f81a4      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f81a4      {
005f81a6          float* edi_1 = &eax->b;
005f81a6          
005f821f          do
005f821f          {
005f81aa              void* edx_2 = *(uint32_t*)((char*)this + 0x38);
005f81ad              char ebx_1 = 0;
005f81af              arg4 = nullptr;
005f81b2              arg3 = 0x7f7fffff;
005f81b2              
005f820e              do
005f820e              {
005f81bc                  (((long double)ADJ(edi_1)->r) - ((long double)*(uint32_t*)edx_2));
005f81c1                  (((long double)ADJ(edi_1)->g) - ((long double)*(uint32_t*)((char*)edx_2 + 4)));
005f81c6                  (((long double)ADJ(edi_1)->b) - ((long double)*(uint32_t*)((char*)edx_2 + 8)));
005f81cc                  long double x87_r4_2 = (((long double)ADJ(edi_1)->a) - ((long double)*(uint32_t*)((char*)edx_2 + 0xc)));
005f81ed                  long double temp1_1 = ((long double)arg3);
005f81ed                  (x87_r4_2 - temp1_1);
005f81f0                  eax = ((((x87_r4_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r4_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
005f81f2                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005f81f2                  
005f81f5                  if (!(p_1))
005f81f5                  {
005f81f7                      ebx_1 = arg4;
005f81fa                      arg3 = ((float)x87_r4_2);
005f81f5                  }
005f81f5                  
005f8201                  arg4 = (&arg4->r + 1);
005f8204                  edx_2 += 0x10;
005f820e              } while (arg4 < 0x100);
005f820e              
005f8210              *(uint8_t*)ecx_4 = ebx_1;
005f8212              ecx_4 = &ecx_4[1];
005f8213              arg2 += 1;
005f8219              edi_1 = &edi_1[4];
005f821f          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f81a4      }
005f8161  }


005f8228  void __thiscall D3DXTex::CCodec_L8::Encode(D3DXTex::CCodec_L8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f8228  {
005f8238      int32_t edi;
005f8238      int32_t var_54 = edi;
005f8238      
005f8239      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f8239      {
005f823e          struct D3DXCOLOR* eax_1;
005f823e          int80_t st0_1;
005f823e          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f8243          arg4 = eax_1;
005f8239      }
005f8239      
005f824a      int16_t x87control;
005f824a      
005f824a      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f824a      {
005f8251          struct D3DXCOLOR* eax_2;
005f8251          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f8256          arg4 = eax_2;
005f824a      }
005f824a      
005f8259      uint32_t eax_3 = arg2;
005f8261      float var_38 = ((float)((long double)0));
005f8276      arg2 = (eax_3 & 1);
005f8289      char* edi_5 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + ((*(uint32_t*)((char*)this + 0x68) - 1) * arg2)) + *(uint32_t*)((char*)this + 0x20));
005f8297      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f829d      int32_t ebx_2;
005f829d      
005f829d      if (arg2 != 0)
005f829d      {
005f82ad          ebx_2 = (*(uint32_t*)((char*)this + 0x68) - 1);
005f82ae          arg2 = 0xffffffff;
005f829d      }
005f829d      else
005f829d      {
005f829f          ebx_2 = 0;
005f82a1          arg2 = 1;
005f829d      }
005f829d      
005f82b2      int16_t x87status;
005f82b2      int16_t temp0;
005f82b2      temp0 = __fnstcw_memmem16(x87control);
005f82b2      arg3 = temp0;
005f82c0      int16_t x87control_1;
005f82c0      int16_t x87status_1;
005f82c0      x87control_1 = __fldcw_memmem16((arg3 | 0xc00));
005f82c6      *(uint32_t*)((char*)this + 0x7c) = arg3;
005f82c9      int32_t i = 0;
005f82c9      
005f82ce      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f82ce      {
005f82d0          struct D3DXCOLOR* eax_10 = arg4;
005f82d0          
005f82fa          do
005f82fa          {
005f82d6              i += 1;
005f82f2              eax_10->r = ((float)(((((long double)eax_10->b) * ((long double)0.0720999986f)) + (((long double)eax_10->g) * ((long double)0.715399981f))) + (((long double)eax_10->r) * ((long double)0.212500006f))));
005f82f4              eax_10 = &eax_10[1];
005f82fa          } while (i < *(uint32_t*)((char*)this + 0x68));
005f82ce      }
005f82ce      
005f82ff      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f8306          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f8306      
005f8310      arg3 = 0;
005f8310      
005f8313      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f8313      {
005f8325          uint32_t ecx_6 = (arg2 << 4);
005f8328          float* eax_12 = (ebx_2 << 4);
005f832b          int32_t edx_5 = ((arg2 + ebx_2) << 4);
005f8334          int32_t var_8_1 = ((ebx_2 - arg2) << 4);
005f8334          
005f83fb          do
005f83fb          {
005f834f              float var_28_1 = ((float)((((long double)var_38) + ((long double)*(uint32_t*)((char*)eax_12 + arg4))) * ((long double)255f)));
005f8365              int32_t ecx_10 = ((int32_t)((long double)((float)(((long double)var_28_1) + ((long double)*(uint32_t*)(eax_6 + ((arg3 & 3) << 2)))))));
005f8365              
005f836b              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f836b              {
005f8376                  float* ecx_12 = ((var_8_1 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f837d                  long double x87_r7_13 = ((((long double)var_28_1) - ((long double)ecx_10)) * ((long double)0.00392156886f));
005f838d                  *(uint32_t*)ecx_12 = ((float)((((long double)0.1875f) * x87_r7_13) + ((long double)*(uint32_t*)ecx_12)));
005f8398                  void* ecx_14 = (((char*)eax_12 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f83a0                  *(uint32_t*)ecx_14 = ((float)((((long double)0.3125f) * x87_r7_13) + ((long double)*(uint32_t*)ecx_14)));
005f83ab                  float* ecx_16 = ((edx_5 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f83b3                  *(uint32_t*)ecx_16 = ((float)((((long double)0.0625f) * x87_r7_13) + ((long double)*(uint32_t*)ecx_16)));
005f83be                  var_38 = ((float)(x87_r7_13 * ((long double)0.4375)));
005f836b              }
005f836b              
005f83c7              int32_t ebx_8 = ecx_10;
005f83c7              
005f83c9              if (ecx_10 >= 0xff)
005f83cb                  ebx_8 = 0xff;
005f83cb              
005f83d2              if (ebx_8 <= 0)
005f83e1                  ecx_10 = 0;
005f83d2              else if (ecx_10 >= 0xff)
005f83dd                  ecx_10 = 0xff;
005f83dd              
005f83e3              *(uint8_t*)edi_5 = ecx_10;
005f83e8              var_8_1 += ecx_6;
005f83eb              edi_5 = &edi_5[arg2];
005f83ee              eax_12 += ecx_6;
005f83f0              edx_5 += ecx_6;
005f83f2              arg3 += 1;
005f83fb          } while (arg3 < *(uint32_t*)((char*)this + 0x68));
005f8313      }
005f8313      
005f8407      int16_t x87control_2;
005f8407      int16_t x87status_2;
005f8407      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f8228  }


005f8411  void __thiscall D3DXTex::CCodec_A8L8::Encode(D3DXTex::CCodec_A8L8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f8411  {
005f8421      int32_t edi;
005f8421      int32_t var_5c = edi;
005f8421      
005f8422      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f8422      {
005f8427          struct D3DXCOLOR* eax_1;
005f8427          int80_t st0_1;
005f8427          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f842c          arg4 = eax_1;
005f8422      }
005f8422      
005f8433      int16_t x87control;
005f8433      
005f8433      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f8433      {
005f843a          struct D3DXCOLOR* eax_2;
005f843a          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f843f          arg4 = eax_2;
005f8433      }
005f8433      
005f8442      uint32_t eax_3 = arg2;
005f8447      int32_t ebx = *(uint32_t*)((char*)this + 0x68);
005f844a      float var_50 = ((float)((long double)0));
005f8458      float var_44 = ((float)((long double)0));
005f845e      arg2 = (eax_3 & 1);
005f8483      int16_t* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((ebx - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f848b      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f8491      int32_t ebx_1;
005f8491      int32_t edi_3;
005f8491      
005f8491      if (arg2 != 0)
005f8491      {
005f849d          ebx_1 = (ebx - 1);
005f849e          arg3 = 0xffffffff;
005f84a2          edi_3 = 0xffffffff;
005f8491      }
005f8491      else
005f8491      {
005f8495          ebx_1 = 0;
005f8497          edi_3 = 1;
005f8498          arg3 = 1;
005f8491      }
005f8491      
005f84a5      int16_t x87status;
005f84a5      int16_t temp0;
005f84a5      temp0 = __fnstcw_memmem16(x87control);
005f84a5      arg2 = temp0;
005f84b3      int16_t x87control_1;
005f84b3      int16_t x87status_1;
005f84b3      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f84b9      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f84bc      int32_t i = 0;
005f84bc      
005f84c1      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f84c1      {
005f84c3          struct D3DXCOLOR* eax_10 = arg4;
005f84c3          
005f84ed          do
005f84ed          {
005f84c9              i += 1;
005f84e5              eax_10->r = ((float)(((((long double)eax_10->b) * ((long double)0.0720999986f)) + (((long double)eax_10->g) * ((long double)0.715399981f))) + (((long double)eax_10->r) * ((long double)0.212500006f))));
005f84e7              eax_10 = &eax_10[1];
005f84ed          } while (i < *(uint32_t*)((char*)this + 0x68));
005f84c1      }
005f84c1      
005f84f2      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f84f9          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f84f9      
005f8503      arg2 = 0;
005f8503      
005f8506      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f8506      {
005f851b          int32_t ecx_8 = (edi_3 << 4);
005f851e          int32_t eax_13 = (ebx_1 << 4);
005f8521          int32_t edi_5 = ((edi_3 + ebx_1) << 4);
005f8527          int32_t ebx_3 = ((ebx_1 - arg3) << 4);
005f8527          
005f8689          do
005f8689          {
005f8533              long double x87_r7_6 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f853c              float* ecx_12 = ((char*)arg4 + eax_13);
005f8549              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)ecx_12)) * ((long double)255f)));
005f8558              float var_34_1 = ((float)((((long double)var_44) + ((long double)ecx_12[3])) * ((long double)255f)));
005f856e              int32_t edx_6 = ((int32_t)((long double)((float)(((long double)var_40_1) + x87_r7_6))));
005f8574              int32_t var_30_1 = edx_6;
005f8587              int32_t var_24_1 = ((int32_t)((long double)((float)(((long double)var_34_1) + ((long double)((float)x87_r7_6))))));
005f8587              
005f858a              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f858a              {
005f8590                  long double x87_r7_11 = ((long double)0.00392156886f);
005f859c                  float* ecx_15 = ((ebx_3 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f85a3                  long double x87_r6_15 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_11);
005f85af                  *(uint32_t*)ecx_15 = ((float)((((long double)0.1875f) * x87_r6_15) + ((long double)*(uint32_t*)ecx_15)));
005f85ba                  float* ecx_17 = ((eax_13 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f85c2                  *(uint32_t*)ecx_17 = ((float)((((long double)0.3125f) * x87_r6_15) + ((long double)*(uint32_t*)ecx_17)));
005f85cd                  float* ecx_19 = ((edi_5 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f85d5                  *(uint32_t*)ecx_19 = ((float)((((long double)0.0625f) * x87_r6_15) + ((long double)*(uint32_t*)ecx_19)));
005f85da                  float* ecx_21 = ((ebx_3 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005f85e4                  var_50 = ((float)(x87_r6_15 * ((long double)0.4375)));
005f85ed                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_34_1) - ((long double)var_24_1)));
005f85f9                  *(uint32_t*)ecx_21 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)ecx_21)));
005f8604                  float* ecx_23 = ((eax_13 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005f860c                  *(uint32_t*)ecx_23 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)ecx_23)));
005f8617                  float* ecx_25 = ((edi_5 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005f861f                  *(uint32_t*)ecx_25 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)ecx_25)));
005f8627                  var_44 = ((float)(x87_r7_12 * ((long double)0.4375)));
005f858a              }
005f858a              
005f8631              if (edx_6 >= 0xff)
005f8633                  edx_6 = 0xff;
005f8633              
005f8637              if (edx_6 <= 0)
005f8643                  var_30_1 = 0;
005f8637              else if (var_30_1 >= 0xff)
005f863e                  var_30_1 = 0xff;
005f863e              
005f864a              int32_t edx_7 = var_24_1;
005f864a              
005f864d              if (var_24_1 >= 0xff)
005f864f                  edx_7 = 0xff;
005f864f              
005f8653              if (edx_7 <= 0)
005f865f                  var_24_1 = 0;
005f8653              else if (var_24_1 >= 0xff)
005f865a                  var_24_1 = 0xff;
005f865a              
005f8666              eax_13 += ecx_8;
005f8669              ebx_3 += ecx_8;
005f866c              edi_5 += ecx_8;
005f8671              int16_t ecx_26;
005f8671              *(uint8_t*)((char*)ecx_26)[1] = var_24_1;
005f8677              *(uint16_t*)var_8 = (ecx_26 | var_30_1);
005f867d              var_8 = &var_8[edi_3];
005f8680              arg2 += 1;
005f8689          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f8506      }
005f8506      
005f8695      int16_t x87control_2;
005f8695      int16_t x87status_2;
005f8695      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f8411  }


005f869f  void __thiscall D3DXTex::CCodec_A4L4::Encode(D3DXTex::CCodec_A4L4* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f869f  {
005f86af      int32_t edi;
005f86af      int32_t var_60 = edi;
005f86af      
005f86b0      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f86b0      {
005f86b5          struct D3DXCOLOR* eax_1;
005f86b5          int80_t st0_1;
005f86b5          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f86ba          arg4 = eax_1;
005f86b0      }
005f86b0      
005f86c1      int16_t x87control;
005f86c1      
005f86c1      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f86c1      {
005f86c8          struct D3DXCOLOR* eax_2;
005f86c8          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f86cd          arg4 = eax_2;
005f86c1      }
005f86c1      
005f86d0      uint32_t eax_3 = arg2;
005f86d5      int32_t edx = *(uint32_t*)((char*)this + 0x68);
005f86d8      float var_54 = ((float)((long double)0));
005f86e6      float var_48 = ((float)((long double)0));
005f86ec      arg2 = (eax_3 & 1);
005f8707      char* edi_5 = (((((edx - 1) * arg2) + (*(uint32_t*)((char*)this + 0x60) * eax_3)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f8715      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f8715      
005f871b      if (arg2 != 0)
005f871b      {
005f872a          arg2 = 0xffffffff;
005f872e          arg3 = (edx - 1);
005f871b      }
005f871b      else
005f871b      {
005f871d          arg3 = 0;
005f8720          arg2 = 1;
005f871b      }
005f871b      
005f8731      int16_t x87status;
005f8731      int16_t temp0;
005f8731      temp0 = __fnstcw_memmem16(x87control);
005f873f      int16_t x87control_1;
005f873f      int16_t x87status_1;
005f873f      x87control_1 = __fldcw_memmem16((temp0 | 0xc00));
005f8745      *(uint32_t*)((char*)this + 0x7c) = temp0;
005f8748      int32_t i = 0;
005f8748      
005f874d      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f874d      {
005f874f          struct D3DXCOLOR* eax_10 = arg4;
005f874f          
005f8779          do
005f8779          {
005f8755              i += 1;
005f8771              eax_10->r = ((float)(((((long double)eax_10->b) * ((long double)0.0720999986f)) + (((long double)eax_10->r) * ((long double)0.212500006f))) + (((long double)eax_10->g) * ((long double)0.715399981f))));
005f8773              eax_10 = &eax_10[1];
005f8779          } while (i < *(uint32_t*)((char*)this + 0x68));
005f874d      }
005f874d      
005f877e      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f8785          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f8785      
005f878d      int32_t i_1 = 0;
005f878d      
005f8790      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f8790      {
005f879e          uint32_t ecx_8 = (arg2 << 4);
005f87ad          uint32_t ebx_4 = ((arg2 + arg3) << 4);
005f87b0          uint32_t eax_12 = (arg3 << 4);
005f87b6          int16_t var_c;
005f87b6          var_c = ebx_4;
005f87b9          arg3 = ((arg3 - arg2) << 4);
005f87b9          
005f892a          do
005f892a          {
005f87c5              long double x87_r7_6 = ((long double)*(uint32_t*)(eax_6 + ((i_1 & 3) << 2)));
005f87ce              float* ecx_15 = ((char*)arg4 + eax_12);
005f87db              float var_44_1 = ((float)((((long double)var_54) + ((long double)*(uint32_t*)ecx_15)) * ((long double)15f)));
005f87ea              float var_38_1 = ((float)((((long double)var_48) + ((long double)ecx_15[3])) * ((long double)15f)));
005f8806              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_6))));
005f8816              int32_t ecx_17 = ((int32_t)((long double)((float)(((long double)var_38_1) + ((long double)((float)x87_r7_6))))));
005f8816              
005f881c              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f881c              {
005f8822                  long double x87_r7_11 = ((long double)0.0666666701f);
005f8831                  float* edx_5 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x10);
005f883b                  long double x87_r6_15 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_11);
005f8847                  *(uint32_t*)edx_5 = ((float)((((long double)0.1875f) * x87_r6_15) + ((long double)*(uint32_t*)edx_5)));
005f8852                  float* edx_7 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x10);
005f885a                  *(uint32_t*)edx_7 = ((float)((((long double)0.3125f) * x87_r6_15) + ((long double)*(uint32_t*)edx_7)));
005f8865                  float* edx_9 = ((*(uint32_t*)((char*)this + 0x5c) + var_c) + 0x10);
005f8870                  *(uint32_t*)edx_9 = ((float)((((long double)0.0625f) * x87_r6_15) + ((long double)*(uint32_t*)edx_9)));
005f8875                  float* edx_11 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x1c);
005f887f                  ebx_4 = var_c;
005f8882                  var_54 = ((float)(x87_r6_15 * ((long double)0.4375)));
005f888b                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_38_1) - ((long double)ecx_17)));
005f8897                  *(uint32_t*)edx_11 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edx_11)));
005f88a2                  float* edx_13 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x1c);
005f88aa                  *(uint32_t*)edx_13 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edx_13)));
005f88b5                  float* edx_15 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_4) + 0x1c);
005f88bd                  *(uint32_t*)edx_15 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edx_15)));
005f88c5                  var_48 = ((float)(x87_r7_12 * ((long double)0.4375)));
005f881c              }
005f881c              
005f88cc              int32_t edx_16;
005f88cc              
005f88cc              if (var_34_1 >= 0xf)
005f88d5                  edx_16 = 0xf;
005f88cc              else
005f88ce                  edx_16 = var_34_1;
005f88ce              
005f88d8              if (edx_16 <= 0)
005f88e9                  var_34_1 = 0;
005f88d8              else if (var_34_1 >= 0xf)
005f88e0                  var_34_1 = 0xf;
005f88e0              
005f88f0              int32_t edx_17;
005f88f0              
005f88f0              if (ecx_17 >= 0xf)
005f88f8                  edx_17 = 0xf;
005f88f0              else
005f88f2                  edx_17 = ecx_17;
005f88f2              
005f88fb              if (edx_17 <= 0)
005f8907                  ecx_17 = 0;
005f88fb              else if (ecx_17 >= 0xf)
005f8904                  ecx_17 = 0xf;
005f8904              
005f8909              ecx_17 <<= 4;
005f890c              ecx_17 |= var_34_1;
005f890f              *(uint8_t*)edi_5 = ecx_17;
005f8914              arg3 += ecx_8;
005f8917              edi_5 = &edi_5[arg2];
005f891a              ebx_4 += ecx_8;
005f891c              eax_12 += ecx_8;
005f891e              i_1 += 1;
005f8927              var_c = ebx_4;
005f892a          } while (i_1 < *(uint32_t*)((char*)this + 0x68));
005f8790      }
005f8790      
005f8936      int16_t x87control_2;
005f8936      int16_t x87status_2;
005f8936      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f869f  }


005f8940  void __thiscall D3DXTex::CCodec_V8U8::Encode(D3DXTex::CCodec_V8U8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f8940  {
005f8950      int32_t edi;
005f8950      int32_t var_5c = edi;
005f8950      
005f8951      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f8951      {
005f8956          struct D3DXCOLOR* eax_1;
005f8956          int80_t st0_1;
005f8956          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f895b          arg4 = eax_1;
005f8951      }
005f8951      
005f8962      int16_t x87control;
005f8962      
005f8962      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f8962      {
005f8969          struct D3DXCOLOR* eax_2;
005f8969          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f896e          arg4 = eax_2;
005f8962      }
005f8962      
005f8971      uint32_t eax_3 = arg2;
005f8976      int32_t ebx = *(uint32_t*)((char*)this + 0x68);
005f8979      float var_50 = ((float)((long double)0));
005f8987      float var_4c = ((float)((long double)0));
005f898d      arg2 = (eax_3 & 1);
005f89b6      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f89b9      int16_t* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((ebx - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f89bf      int32_t ebx_1;
005f89bf      int32_t edi_3;
005f89bf      
005f89bf      if (arg2 != 0)
005f89bf      {
005f89cb          ebx_1 = (ebx - 1);
005f89cc          arg3 = 0xffffffff;
005f89d0          edi_3 = 0xffffffff;
005f89bf      }
005f89bf      else
005f89bf      {
005f89c3          ebx_1 = 0;
005f89c5          edi_3 = 1;
005f89c6          arg3 = 1;
005f89bf      }
005f89bf      
005f89d3      int16_t x87status;
005f89d3      int16_t temp0;
005f89d3      temp0 = __fnstcw_memmem16(x87control);
005f89d3      arg2 = temp0;
005f89e1      int16_t x87control_1;
005f89e1      int16_t x87status_1;
005f89e1      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f89e7      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f89e7      
005f89ee      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f89f5          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f89f5      
005f89fa      arg2 = 0;
005f89fa      
005f8a02      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f8a02      {
005f8a17          int32_t ecx_8 = (edi_3 << 4);
005f8a1a          int32_t eax_12 = (ebx_1 << 4);
005f8a1d          int32_t edi_5 = ((edi_3 + ebx_1) << 4);
005f8a23          int32_t ebx_3 = ((ebx_1 - arg3) << 4);
005f8a23          
005f8b91          do
005f8b91          {
005f8a2f              long double x87_r7_2 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f8a38              float* ecx_12 = ((char*)arg4 + eax_12);
005f8a45              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)ecx_12)) * ((long double)127f)));
005f8a54              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)ecx_12[1])) * ((long double)127f)));
005f8a70              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + x87_r7_2))));
005f8a80              int32_t edx_6 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)((float)x87_r7_2))))));
005f8a80              
005f8a86              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f8a86              {
005f8a8c                  long double x87_r7_7 = ((long double)0.00787401572f);
005f8a98                  float* ecx_15 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x10);
005f8a9f                  long double x87_r6_11 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_7);
005f8aab                  *(uint32_t*)ecx_15 = ((float)((((long double)0.1875f) * x87_r6_11) + ((long double)*(uint32_t*)ecx_15)));
005f8ab6                  float* ecx_17 = ((eax_12 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f8abe                  *(uint32_t*)ecx_17 = ((float)((((long double)0.3125f) * x87_r6_11) + ((long double)*(uint32_t*)ecx_17)));
005f8ac9                  float* ecx_19 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x10);
005f8ad1                  *(uint32_t*)ecx_19 = ((float)((((long double)0.0625f) * x87_r6_11) + ((long double)*(uint32_t*)ecx_19)));
005f8ad6                  float* ecx_21 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x14);
005f8ae0                  var_50 = ((float)(x87_r6_11 * ((long double)0.4375)));
005f8ae9                  long double x87_r7_8 = (x87_r7_7 * (((long double)var_3c_1) - ((long double)edx_6)));
005f8af5                  *(uint32_t*)ecx_21 = ((float)((((long double)0.1875f) * x87_r7_8) + ((long double)*(uint32_t*)ecx_21)));
005f8b00                  float* ecx_23 = ((eax_12 + *(uint32_t*)((char*)this + 0x5c)) + 0x14);
005f8b08                  *(uint32_t*)ecx_23 = ((float)((((long double)0.3125f) * x87_r7_8) + ((long double)*(uint32_t*)ecx_23)));
005f8b13                  float* ecx_25 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x14);
005f8b1b                  *(uint32_t*)ecx_25 = ((float)((((long double)0.0625f) * x87_r7_8) + ((long double)*(uint32_t*)ecx_25)));
005f8b23                  var_4c = ((float)(x87_r7_8 * ((long double)0.4375)));
005f8a86              }
005f8a86              
005f8b2a              int32_t ecx_26;
005f8b2a              
005f8b2a              if (var_30_1 >= 0x7f)
005f8b33                  ecx_26 = 0x7f;
005f8b2a              else
005f8b2c                  ecx_26 = var_30_1;
005f8b2c              
005f8b37              if (ecx_26 <= 0xffffff81)
005f8b48                  var_30_1 = 0xffffff81;
005f8b37              else if (var_30_1 >= 0x7f)
005f8b3f                  var_30_1 = 0x7f;
005f8b3f              
005f8b52              int32_t ecx_27;
005f8b52              
005f8b52              if (edx_6 >= 0x7f)
005f8b5a                  ecx_27 = 0x7f;
005f8b52              else
005f8b54                  ecx_27 = edx_6;
005f8b54              
005f8b5e              if (ecx_27 <= 0xffffff81)
005f8b6b                  edx_6 = 0xffffff81;
005f8b5e              else if (edx_6 >= 0x7f)
005f8b6b                  edx_6 = 0x7f;
005f8b6b              
005f8b6c              ecx_27 = ((uint16_t)var_30_1);
005f8b71              eax_12 += ecx_8;
005f8b74              ebx_3 += ecx_8;
005f8b77              edi_5 += ecx_8;
005f8b7a              *(uint8_t*)((char*)ecx_27)[1] = edx_6;
005f8b7f              *(uint16_t*)var_8 = ecx_27;
005f8b85              var_8 = &var_8[edi_3];
005f8b88              arg2 += 1;
005f8b91          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f8a02      }
005f8a02      
005f8b9d      int16_t x87control_2;
005f8b9d      int16_t x87status_2;
005f8b9d      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f8940  }


005f8ba7  void __thiscall D3DXTex::CCodec_L6V5U5::Encode(D3DXTex::CCodec_L6V5U5* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f8ba7  {
005f8bb7      int32_t edi;
005f8bb7      int32_t var_64 = edi;
005f8bb7      
005f8bb8      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f8bb8      {
005f8bbd          struct D3DXCOLOR* eax_1;
005f8bbd          int80_t st0_1;
005f8bbd          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f8bc2          arg4 = eax_1;
005f8bb8      }
005f8bb8      
005f8bc9      int16_t x87control;
005f8bc9      
005f8bc9      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f8bc9      {
005f8bd0          struct D3DXCOLOR* eax_2;
005f8bd0          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f8bd5          arg4 = eax_2;
005f8bc9      }
005f8bc9      
005f8bd8      uint32_t eax_3 = arg2;
005f8bdd      int32_t ebx = *(uint32_t*)((char*)this + 0x68);
005f8be0      float var_58 = ((float)((long double)0));
005f8bee      float var_54 = ((float)((long double)0));
005f8bf3      float var_4c = ((float)((long double)0));
005f8bf9      arg2 = (eax_3 & 1);
005f8c1c      int16_t* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((ebx - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f8c25      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f8c2b      int32_t ebx_1;
005f8c2b      int32_t edi_3;
005f8c2b      
005f8c2b      if (arg2 != 0)
005f8c2b      {
005f8c37          ebx_1 = (ebx - 1);
005f8c38          arg3 = 0xffffffff;
005f8c3c          edi_3 = 0xffffffff;
005f8c2b      }
005f8c2b      else
005f8c2b      {
005f8c2f          ebx_1 = 0;
005f8c31          edi_3 = 1;
005f8c32          arg3 = 1;
005f8c2b      }
005f8c2b      
005f8c3f      int16_t x87status;
005f8c3f      int16_t temp0;
005f8c3f      temp0 = __fnstcw_memmem16(x87control);
005f8c3f      arg2 = temp0;
005f8c4d      int16_t x87control_1;
005f8c4d      int16_t x87status_1;
005f8c4d      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f8c53      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f8c53      
005f8c5a      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f8c61          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f8c61      
005f8c66      arg2 = 0;
005f8c66      
005f8c6e      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f8c6e      {
005f8c79          int32_t ecx_9 = (edi_3 << 4);
005f8c8c          int32_t eax_12 = (ebx_1 << 4);
005f8c8f          int32_t edi_5 = ((edi_3 + ebx_1) << 4);
005f8c92          int32_t ebx_3 = ((ebx_1 - arg3) << 4);
005f8c99          int32_t var_c_1 = ebx_3;
005f8c9c          arg4 = (&arg4->a + eax_12);
005f8c9c          
005f8eac          do
005f8eac          {
005f8ca8              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f8cab              float* ecx_14 = arg4;
005f8cae              arg3 = ((float)x87_r7_3);
005f8cbd              float var_48_1 = ((float)((((long double)var_58) + ((long double)ecx_14[-3])) * ((long double)15f)));
005f8ccc              float var_44_1 = ((float)((((long double)var_54) + ((long double)ecx_14[-2])) * ((long double)15f)));
005f8cda              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)*(uint32_t*)ecx_14)) * ((long double)63f)));
005f8cf6              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r7_3))));
005f8d05              int32_t ecx_16 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg3)))));
005f8d1b              int32_t edx_5 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg3)))));
005f8d1b              
005f8d21              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f8d21              {
005f8d27                  long double x87_r7_11 = ((long double)0.0666666701f);
005f8d33                  float* edx_7 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x10);
005f8d3a                  long double x87_r6_14 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_11);
005f8d46                  *(uint32_t*)edx_7 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)edx_7)));
005f8d51                  float* edx_9 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x10);
005f8d59                  *(uint32_t*)edx_9 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)edx_9)));
005f8d64                  float* edx_11 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x10);
005f8d6c                  *(uint32_t*)edx_11 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)edx_11)));
005f8d71                  float* edx_13 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x14);
005f8d7b                  var_58 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f8d84                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_44_1) - ((long double)ecx_16)));
005f8d90                  *(uint32_t*)edx_13 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edx_13)));
005f8d9b                  float* edx_15 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x14);
005f8da3                  *(uint32_t*)edx_15 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edx_15)));
005f8dae                  float* edx_17 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x14);
005f8db6                  *(uint32_t*)edx_17 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edx_17)));
005f8dbb                  float* edx_19 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x1c);
005f8dc5                  var_54 = ((float)(x87_r7_12 * ((long double)0.4375)));
005f8dce                  long double x87_r7_16 = ((((long double)var_3c_1) - ((long double)edx_5)) * ((long double)0.0158730168f));
005f8dde                  *(uint32_t*)edx_19 = ((float)((((long double)0.1875f) * x87_r7_16) + ((long double)*(uint32_t*)edx_19)));
005f8de9                  float* edx_21 = ((*(uint32_t*)((char*)this + 0x5c) + eax_12) + 0x1c);
005f8df1                  *(uint32_t*)edx_21 = ((float)((((long double)0.3125f) * x87_r7_16) + ((long double)*(uint32_t*)edx_21)));
005f8dfc                  float* edx_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x1c);
005f8e04                  *(uint32_t*)edx_23 = ((float)((((long double)0.0625f) * x87_r7_16) + ((long double)*(uint32_t*)edx_23)));
005f8e0f                  var_4c = ((float)(x87_r7_16 * ((long double)0.4375)));
005f8d21              }
005f8d21              
005f8e12              int32_t ebx_4 = var_38_1;
005f8e12              
005f8e18              if (ebx_4 >= 0xf)
005f8e1c                  ebx_4 = 0xf;
005f8e1c              
005f8e20              if (ebx_4 <= 0xfffffff1)
005f8e31                  var_38_1 = 0xfffffff1;
005f8e20              else if (var_38_1 >= 0xf)
005f8e28                  var_38_1 = 0xf;
005f8e28              
005f8e3b              int32_t ebx_5;
005f8e3b              
005f8e3b              if (ecx_16 >= 0xf)
005f8e43                  ebx_5 = 0xf;
005f8e3b              else
005f8e3d                  ebx_5 = ecx_16;
005f8e3d              
005f8e47              if (ebx_5 <= 0xfffffff1)
005f8e54                  ecx_16 = 0xfffffff1;
005f8e47              else if (ecx_16 >= 0xf)
005f8e54                  ecx_16 = 0xf;
005f8e54              
005f8e58              int32_t ebx_6;
005f8e58              
005f8e58              if (edx_5 >= 0x3f)
005f8e60                  ebx_6 = 0x3f;
005f8e58              else
005f8e5a                  ebx_6 = edx_5;
005f8e5a              
005f8e64              if (ebx_6 <= 0xffffffc1)
005f8e71                  edx_5 = 0xffffffc1;
005f8e64              else if (edx_5 >= 0x3f)
005f8e71                  edx_5 = 0x3f;
005f8e71              
005f8e8b              *(uint16_t*)var_8 = (((int16_t)(((ecx_16 & 0x1f) | (edx_5 << 5)) << 5)) | (var_38_1 & 0x1f));
005f8e91              var_8 = &var_8[edi_3];
005f8e97              arg4 += ecx_9;
005f8e9a              ebx_3 = (var_c_1 + ecx_9);
005f8e9c              eax_12 += ecx_9;
005f8e9e              edi_5 += ecx_9;
005f8ea0              arg2 += 1;
005f8ea9              var_c_1 = ebx_3;
005f8eac          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f8c6e      }
005f8c6e      
005f8eb8      int16_t x87control_2;
005f8eb8      int16_t x87status_2;
005f8eb8      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f8ba7  }


005f8ec2  void __thiscall D3DXTex::CCodec_X8L8V8U8::Encode(D3DXTex::CCodec_X8L8V8U8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f8ec2  {
005f8ed2      int32_t edi;
005f8ed2      int32_t var_60 = edi;
005f8ed2      
005f8ed3      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f8ed3      {
005f8ed8          struct D3DXCOLOR* eax_1;
005f8ed8          int80_t st0_1;
005f8ed8          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f8edd          arg4 = eax_1;
005f8ed3      }
005f8ed3      
005f8ee4      int16_t x87control;
005f8ee4      
005f8ee4      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f8ee4      {
005f8eeb          struct D3DXCOLOR* eax_2;
005f8eeb          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f8ef0          arg4 = eax_2;
005f8ee4      }
005f8ee4      
005f8ef3      uint32_t eax_3 = arg2;
005f8ef8      int32_t ebx = *(uint32_t*)((char*)this + 0x68);
005f8efb      float var_54 = ((float)((long double)0));
005f8f09      float var_50 = ((float)((long double)0));
005f8f0e      float var_48 = ((float)((long double)0));
005f8f14      arg2 = (eax_3 & 1);
005f8f3d      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f8f40      int32_t* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((ebx - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f8f46      int32_t ebx_1;
005f8f46      int32_t edi_3;
005f8f46      
005f8f46      if (arg2 != 0)
005f8f46      {
005f8f52          ebx_1 = (ebx - 1);
005f8f53          arg3 = 0xffffffff;
005f8f57          edi_3 = 0xffffffff;
005f8f46      }
005f8f46      else
005f8f46      {
005f8f4a          ebx_1 = 0;
005f8f4c          edi_3 = 1;
005f8f4d          arg3 = 1;
005f8f46      }
005f8f46      
005f8f5a      int16_t x87status;
005f8f5a      int16_t temp0;
005f8f5a      temp0 = __fnstcw_memmem16(x87control);
005f8f5a      arg2 = temp0;
005f8f68      int16_t x87control_1;
005f8f68      int16_t x87status_1;
005f8f68      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f8f6e      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f8f6e      
005f8f75      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f8f7c          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f8f7c      
005f8f81      arg2 = 0;
005f8f81      
005f8f89      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f8f89      {
005f8f96          int32_t ecx_8 = (edi_3 << 4);
005f8fa9          int32_t eax_13 = (ebx_1 << 4);
005f8fb0          int32_t edi_5 = ((edi_3 + ebx_1) << 4);
005f8fb3          int32_t ebx_3 = ((ebx_1 - arg3) << 4);
005f8fb6          arg4 = (&arg4->a + eax_13);
005f8fb6          
005f91c5          do
005f91c5          {
005f8fc2              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f8fc5              float* ecx_13 = arg4;
005f8fc8              arg3 = ((float)x87_r7_3);
005f8fd7              float var_44_1 = ((float)((((long double)var_54) + ((long double)ecx_13[-3])) * ((long double)127f)));
005f8fe6              float var_40_1 = ((float)((((long double)var_50) + ((long double)ecx_13[-2])) * ((long double)127f)));
005f8ff4              float var_38_1 = ((float)((((long double)var_48) + ((long double)*(uint32_t*)ecx_13)) * ((long double)255f)));
005f900a              int32_t edx_6 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_3))));
005f9010              int32_t var_34_1 = edx_6;
005f9025              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg3)))));
005f9038              int32_t var_28_1 = ((int32_t)((long double)((float)(((long double)var_38_1) + ((long double)arg3)))));
005f9038              
005f903b              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f903b              {
005f9041                  long double x87_r7_11 = ((long double)0.00787401572f);
005f904d                  float* ecx_17 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x10);
005f9054                  long double x87_r6_14 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_11);
005f9060                  *(uint32_t*)ecx_17 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)ecx_17)));
005f906b                  float* ecx_19 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f9073                  *(uint32_t*)ecx_19 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)ecx_19)));
005f907e                  float* ecx_21 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x10);
005f9086                  *(uint32_t*)ecx_21 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)ecx_21)));
005f908b                  float* ecx_23 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x14);
005f9095                  var_54 = ((float)(x87_r6_14 * ((long double)0.4375)));
005f909e                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_40_1) - ((long double)var_30_1)));
005f90aa                  *(uint32_t*)ecx_23 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)ecx_23)));
005f90b5                  float* ecx_25 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f90bd                  *(uint32_t*)ecx_25 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)ecx_25)));
005f90c8                  float* ecx_27 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x14);
005f90d0                  *(uint32_t*)ecx_27 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)ecx_27)));
005f90d5                  float* ecx_29 = ((*(uint32_t*)((char*)this + 0x5c) + ebx_3) + 0x1c);
005f90df                  var_50 = ((float)(x87_r7_12 * ((long double)0.4375)));
005f90e8                  long double x87_r7_16 = ((((long double)var_38_1) - ((long double)var_28_1)) * ((long double)0.00392156886f));
005f90f8                  *(uint32_t*)ecx_29 = ((float)((((long double)0.1875f) * x87_r7_16) + ((long double)*(uint32_t*)ecx_29)));
005f9103                  float* ecx_31 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x1c);
005f910b                  *(uint32_t*)ecx_31 = ((float)((((long double)0.3125f) * x87_r7_16) + ((long double)*(uint32_t*)ecx_31)));
005f9116                  float* ecx_33 = ((*(uint32_t*)((char*)this + 0x5c) + edi_5) + 0x1c);
005f911e                  *(uint32_t*)ecx_33 = ((float)((((long double)0.0625f) * x87_r7_16) + ((long double)*(uint32_t*)ecx_33)));
005f9126                  var_48 = ((float)(x87_r7_16 * ((long double)0.4375)));
005f903b              }
005f903b              
005f912e              if (edx_6 >= 0x7f)
005f9130                  edx_6 = 0x7f;
005f9130              
005f9135              if (edx_6 <= 0xffffff81)
005f9141                  var_34_1 = 0xffffff81;
005f9135              else if (var_34_1 >= 0x7f)
005f913c                  var_34_1 = 0x7f;
005f913c              
005f9148              int32_t edx_7 = var_30_1;
005f9148              
005f914d              if (edx_7 >= 0x7f)
005f914f                  edx_7 = 0x7f;
005f914f              
005f9154              if (edx_7 <= 0xffffff81)
005f9160                  var_30_1 = 0xffffff81;
005f9154              else if (var_30_1 >= 0x7f)
005f915b                  var_30_1 = 0x7f;
005f915b              
005f9167              int32_t edx_8 = var_28_1;
005f9167              
005f9172              if (var_28_1 >= 0xff)
005f9174                  edx_8 = 0xff;
005f9174              
005f917c              if (edx_8 <= 0xffffff01)
005f9188                  var_28_1 = 0xffffff01;
005f917c              else if (var_28_1 >= 0xff)
005f9183                  var_28_1 = 0xff;
005f9183              
005f9194              int32_t edx_9;
005f9194              *(uint8_t*)((char*)edx_9)[1] = var_28_1;
005f919d              edx_9 = var_30_1;
005f91a8              *(uint32_t*)var_8 = ((edx_9 << 8) | ((uint32_t)var_34_1));
005f91ad              var_8 = &var_8[edi_3];
005f91b3              arg4 += ecx_8;
005f91b6              eax_13 += ecx_8;
005f91b8              ebx_3 += ecx_8;
005f91ba              edi_5 += ecx_8;
005f91bc              arg2 += 1;
005f91c5          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f8f89      }
005f8f89      
005f91d1      int16_t x87control_2;
005f91d1      int16_t x87status_2;
005f91d1      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f8ec2  }


005f91db  void __thiscall D3DXTex::CCodec_R8G8B8::CCodec_R8G8B8(D3DXTex::CCodec_R8G8B8* this, struct D3DX_BLT* arg2)

005f91db  {
005f91ea      D3DXTex::CCodec::CCodec(this, arg2, 0x18, 1);
005f91ef      *(uint32_t*)this = 0x7ece60;
005f91db  }


005f91fc  void __thiscall D3DXTex::CCodec_A8R8G8B8::CCodec_A8R8G8B8(D3DXTex::CCodec_A8R8G8B8* this, struct D3DX_BLT* arg2)

005f91fc  {
005f920b      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 1);
005f9210      *(uint32_t*)this = 0x7ece70;
005f91fc  }


005f921d  void __thiscall D3DXTex::CCodec_X8R8G8B8::CCodec_X8R8G8B8(D3DXTex::CCodec_X8R8G8B8* this, struct D3DX_BLT* arg2)

005f921d  {
005f922c      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 1);
005f9231      *(uint32_t*)this = 0x7ece80;
005f921d  }


005f923e  void __thiscall D3DXTex::CCodec_Q8W8V8U8::Encode(D3DXTex::CCodec_Q8W8V8U8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f923e  {
005f924e      int32_t edi;
005f924e      int32_t var_64 = edi;
005f924e      
005f924f      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f924f      {
005f9254          struct D3DXCOLOR* eax_1;
005f9254          int80_t st0_1;
005f9254          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f9259          arg4 = eax_1;
005f924f      }
005f924f      
005f9260      int16_t x87control;
005f9260      
005f9260      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f9260      {
005f9267          struct D3DXCOLOR* eax_2;
005f9267          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f926c          arg4 = eax_2;
005f9260      }
005f9260      
005f926f      uint32_t eax_3 = arg2;
005f9274      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f9277      float var_58 = ((float)((long double)0));
005f9285      float var_54 = ((float)((long double)0));
005f928a      float var_50 = ((float)((long double)0));
005f928f      float var_4c = ((float)((long double)0));
005f9295      arg2 = (eax_3 & 1);
005f92b8      int32_t* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f92c1      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f92c7      int32_t ebx_2;
005f92c7      int32_t edi_2;
005f92c7      
005f92c7      if (arg2 != 0)
005f92c7      {
005f92d0          edi_2 = (edi_1 - 1);
005f92d1          ebx_2 = 0xffffffff;
005f92c7      }
005f92c7      else
005f92c7      {
005f92cb          edi_2 = 0;
005f92cd          ebx_2 = 1;
005f92c7      }
005f92c7      
005f92d4      int16_t x87status;
005f92d4      int16_t temp0;
005f92d4      temp0 = __fnstcw_memmem16(x87control);
005f92d4      arg2 = temp0;
005f92e2      int16_t x87control_1;
005f92e2      int16_t x87status_1;
005f92e2      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f92e8      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f92e8      
005f92ef      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f92f6          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f92f6      
005f92fb      arg2 = 0;
005f92fb      
005f9303      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f9303      {
005f9318          int32_t ecx_9 = (ebx_2 << 4);
005f931b          int32_t eax_13 = (edi_2 << 4);
005f932a          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f932d          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f9330          arg3 = (&arg4->b + eax_13);
005f9330          
005f95d4          do
005f95d4          {
005f9336              long double x87_r7_4 = ((long double)127f);
005f9342              long double x87_r6_1 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f9345              float* edx_8 = arg3;
005f9348              arg4 = ((float)x87_r6_1);
005f9353              float var_48_1 = ((float)((((long double)var_58) + ((long double)edx_8[-2])) * x87_r7_4));
005f935e              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_8[-1])) * x87_r7_4));
005f9368              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edx_8)) * x87_r7_4));
005f9373              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)edx_8[1])) * x87_r7_4));
005f9391              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r6_1))));
005f93a6              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f93b5              int32_t edx_11 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f93c4              int32_t var_20_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f93c4              
005f93d1              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f93d1              {
005f93d7                  long double x87_r7_16 = ((long double)0.00787401572f);
005f93e3                  float* ebx_6 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f93ea                  long double x87_r6_4 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_16);
005f93f6                  *(uint32_t*)ebx_6 = ((float)((((long double)0.1875f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_6)));
005f9401                  float* ebx_8 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f9409                  *(uint32_t*)ebx_8 = ((float)((((long double)0.3125f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_8)));
005f9414                  float* ebx_10 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f941c                  *(uint32_t*)ebx_10 = ((float)((((long double)0.0625f) * x87_r6_4) + ((long double)*(uint32_t*)ebx_10)));
005f9421                  float* ebx_12 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f942b                  var_58 = ((float)(x87_r6_4 * ((long double)0.4375)));
005f9434                  long double x87_r6_8 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_16);
005f9440                  *(uint32_t*)ebx_12 = ((float)((((long double)0.1875f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_12)));
005f944b                  float* ebx_14 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f9453                  *(uint32_t*)ebx_14 = ((float)((((long double)0.3125f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_14)));
005f945e                  float* ebx_16 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f9466                  *(uint32_t*)ebx_16 = ((float)((((long double)0.0625f) * x87_r6_8) + ((long double)*(uint32_t*)ebx_16)));
005f946b                  float* ebx_18 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f9475                  var_54 = ((float)(x87_r6_8 * ((long double)0.4375)));
005f947e                  long double x87_r6_12 = ((((long double)var_40_1) - ((long double)edx_11)) * x87_r7_16);
005f948a                  *(uint32_t*)ebx_18 = ((float)((((long double)0.1875f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_18)));
005f9495                  float* ebx_20 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x18);
005f949d                  *(uint32_t*)ebx_20 = ((float)((((long double)0.3125f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_20)));
005f94a8                  float* ebx_22 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f94b0                  *(uint32_t*)ebx_22 = ((float)((((long double)0.0625f) * x87_r6_12) + ((long double)*(uint32_t*)ebx_22)));
005f94b5                  float* ebx_24 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f94bf                  var_50 = ((float)(x87_r6_12 * ((long double)0.4375)));
005f94c8                  long double x87_r7_17 = (x87_r7_16 * (((long double)var_3c_1) - ((long double)var_20_1)));
005f94d4                  *(uint32_t*)ebx_24 = ((float)((((long double)0.1875f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_24)));
005f94df                  float* ebx_26 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x1c);
005f94e7                  *(uint32_t*)ebx_26 = ((float)((((long double)0.3125f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_26)));
005f94f2                  float* ebx_28 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f94fa                  *(uint32_t*)ebx_28 = ((float)((((long double)0.0625f) * x87_r7_17) + ((long double)*(uint32_t*)ebx_28)));
005f9502                  var_4c = ((float)(x87_r7_17 * ((long double)0.4375)));
005f93d1              }
005f93d1              
005f9505              int32_t ebx_29 = var_38_1;
005f9505              
005f950b              if (ebx_29 >= 0x7f)
005f950f                  ebx_29 = 0x7f;
005f950f              
005f9513              if (ebx_29 <= 0xffffff81)
005f9524                  var_38_1 = 0xffffff81;
005f9513              else if (var_38_1 >= 0x7f)
005f951b                  var_38_1 = 0x7f;
005f951b              
005f952b              int32_t ebx_30 = var_34_1;
005f952b              
005f9531              if (ebx_30 >= 0x7f)
005f9535                  ebx_30 = 0x7f;
005f9535              
005f9539              if (ebx_30 <= 0xffffff81)
005f954a                  var_34_1 = 0xffffff81;
005f9539              else if (var_34_1 >= 0x7f)
005f9541                  var_34_1 = 0x7f;
005f9541              
005f9554              int32_t ebx_31;
005f9554              
005f9554              if (edx_11 >= 0x7f)
005f955c                  ebx_31 = 0x7f;
005f9554              else
005f9556                  ebx_31 = edx_11;
005f9556              
005f9560              if (ebx_31 <= 0xffffff81)
005f956d                  edx_11 = 0xffffff81;
005f9560              else if (edx_11 >= 0x7f)
005f956d                  edx_11 = 0x7f;
005f956d              
005f956e              int32_t ebx_32 = var_20_1;
005f956e              
005f9574              if (ebx_32 >= 0x7f)
005f9578                  ebx_32 = 0x7f;
005f9578              
005f957c              int32_t ebx_33;
005f957c              
005f957c              if (ebx_32 <= 0xffffff81)
005f958c                  ebx_33 = 0xffffff81;
005f957c              else
005f957c              {
005f957e                  ebx_33 = var_20_1;
005f957e                  
005f9584                  if (ebx_33 >= 0x7f)
005f958c                      ebx_33 = 0x7f;
005f957c              }
005f957c              
005f95b7              *(uint32_t*)var_8 = ((((((edx_11 & 0xff) | (ebx_33 << 8)) << 8) | ((uint32_t)var_34_1)) << 8) | ((uint32_t)var_38_1));
005f95bf              arg3 += ecx_9;
005f95c2              eax_13 += ecx_9;
005f95c4              edi_4 += ecx_9;
005f95c6              ecx_11 += ecx_9;
005f95c8              arg2 += 1;
005f95d1              var_8 = &var_8[ebx_2];
005f95d4          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f9303      }
005f9303      
005f95e0      int16_t x87control_2;
005f95e0      int16_t x87status_2;
005f95e0      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f923e  }


005f95ea  void __thiscall D3DXTex::CCodec_R5G6B5::CCodec_R5G6B5(D3DXTex::CCodec_R5G6B5* this, struct D3DX_BLT* arg2)

005f95ea  {
005f95f9      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005f95fe      *(uint32_t*)this = 0x7ece90;
005f95ea  }


005f960b  void __thiscall D3DXTex::CCodec_X1R5G5B5::CCodec_X1R5G5B5(D3DXTex::CCodec_X1R5G5B5* this, struct D3DX_BLT* arg2)

005f960b  {
005f961a      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005f961f      *(uint32_t*)this = 0x7ecea0;
005f960b  }


005f962c  void __thiscall D3DXTex::CCodec_A1R5G5B5::CCodec_A1R5G5B5(D3DXTex::CCodec_A1R5G5B5* this, struct D3DX_BLT* arg2)

005f962c  {
005f963b      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005f9640      *(uint32_t*)this = 0x7eceb0;
005f962c  }


005f964d  void __thiscall D3DXTex::CCodec_A4R4G4B4::CCodec_A4R4G4B4(D3DXTex::CCodec_A4R4G4B4* this, struct D3DX_BLT* arg2)

005f964d  {
005f965c      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005f9661      *(uint32_t*)this = 0x7ecec0;
005f964d  }


005f966e  void __thiscall D3DXTex::CCodec_R3G3B2::CCodec_R3G3B2(D3DXTex::CCodec_R3G3B2* this, struct D3DX_BLT* arg2)

005f966e  {
005f967d      D3DXTex::CCodec::CCodec(this, arg2, 8, 1);
005f9682      *(uint32_t*)this = 0x7eced0;
005f966e  }


005f968f  void __thiscall D3DXTex::CCodec_A8::CCodec_A8(D3DXTex::CCodec_A8* this, struct D3DX_BLT* arg2)

005f968f  {
005f969e      D3DXTex::CCodec::CCodec(this, arg2, 8, 1);
005f96a3      *(uint32_t*)this = 0x7ecee0;
005f968f  }


005f96b0  void __thiscall D3DXTex::CCodec_A8R3G3B2::CCodec_A8R3G3B2(D3DXTex::CCodec_A8R3G3B2* this, struct D3DX_BLT* arg2)

005f96b0  {
005f96bf      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005f96c4      *(uint32_t*)this = 0x7ecef0;
005f96b0  }


005f96d1  void __thiscall D3DXTex::CCodec_V16U16::Encode(D3DXTex::CCodec_V16U16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f96d1  {
005f96e1      int32_t edi;
005f96e1      int32_t var_60 = edi;
005f96e1      
005f96e2      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f96e2      {
005f96e7          struct D3DXCOLOR* eax_1;
005f96e7          int80_t st0_1;
005f96e7          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f96ec          arg4 = eax_1;
005f96e2      }
005f96e2      
005f96f3      int16_t x87control;
005f96f3      
005f96f3      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f96f3      {
005f96fa          struct D3DXCOLOR* eax_2;
005f96fa          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f96ff          arg4 = eax_2;
005f96f3      }
005f96f3      
005f9702      uint32_t eax_3 = arg2;
005f9707      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f970a      float var_44 = ((float)((long double)0));
005f9718      float var_40 = ((float)((long double)0));
005f971e      arg2 = (eax_3 & 1);
005f9747      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f974a      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f9750      int32_t ebx_2;
005f9750      int32_t edi_2;
005f9750      
005f9750      if (arg2 != 0)
005f9750      {
005f9759          edi_2 = (edi_1 - 1);
005f975a          ebx_2 = 0xffffffff;
005f9750      }
005f9750      else
005f9750      {
005f9754          edi_2 = 0;
005f9756          ebx_2 = 1;
005f9750      }
005f9750      
005f975d      int16_t x87status;
005f975d      int16_t temp0;
005f975d      temp0 = __fnstcw_memmem16(x87control);
005f975d      arg2 = temp0;
005f976b      int16_t x87control_1;
005f976b      int16_t x87status_1;
005f976b      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f9771      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f9771      
005f9778      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f977f          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f977f      
005f9784      arg2 = 0;
005f9784      
005f978c      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f978c      {
005f97a1          int32_t ecx_8 = (ebx_2 << 4);
005f97a6          int32_t eax_13 = (edi_2 << 4);
005f97a9          int32_t edx_6 = ((ebx_2 + edi_2) << 4);
005f97b2          arg3 = ((edi_2 - ebx_2) << 4);
005f97b2          
005f9932          do
005f9932          {
005f97be              long double x87_r7_2 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f97c7              float* ecx_12 = ((char*)arg4 + eax_13);
005f97d4              float var_34_1 = ((float)((((long double)var_44) + ((long double)*(uint32_t*)ecx_12)) * ((long double)32767f)));
005f97e3              float var_30_1 = ((float)((((long double)var_40) + ((long double)ecx_12[1])) * ((long double)32767f)));
005f97f9              int32_t edi_6 = ((int32_t)((long double)((float)(((long double)var_34_1) + x87_r7_2))));
005f980f              int32_t ecx_13 = ((int32_t)((long double)((float)(((long double)var_30_1) + ((long double)((float)x87_r7_2))))));
005f980f              
005f9815              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f9815              {
005f981b                  long double x87_r7_7 = ((long double)3.05185094e-05f);
005f982a                  float* edi_8 = ((arg3 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f9831                  long double x87_r6_11 = ((((long double)var_34_1) - ((long double)edi_6)) * x87_r7_7);
005f983d                  *(uint32_t*)edi_8 = ((float)((((long double)0.1875f) * x87_r6_11) + ((long double)*(uint32_t*)edi_8)));
005f9848                  float* edi_10 = ((eax_13 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f9850                  *(uint32_t*)edi_10 = ((float)((((long double)0.3125f) * x87_r6_11) + ((long double)*(uint32_t*)edi_10)));
005f985b                  float* edi_12 = ((edx_6 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005f9863                  *(uint32_t*)edi_12 = ((float)((((long double)0.0625f) * x87_r6_11) + ((long double)*(uint32_t*)edi_12)));
005f9868                  float* edi_14 = ((arg3 + *(uint32_t*)((char*)this + 0x5c)) + 0x14);
005f9872                  var_44 = ((float)(x87_r6_11 * ((long double)0.4375)));
005f987b                  long double x87_r7_8 = (x87_r7_7 * (((long double)var_30_1) - ((long double)ecx_13)));
005f9887                  *(uint32_t*)edi_14 = ((float)((((long double)0.1875f) * x87_r7_8) + ((long double)*(uint32_t*)edi_14)));
005f9892                  float* edi_16 = ((eax_13 + *(uint32_t*)((char*)this + 0x5c)) + 0x14);
005f989a                  *(uint32_t*)edi_16 = ((float)((((long double)0.3125f) * x87_r7_8) + ((long double)*(uint32_t*)edi_16)));
005f98a5                  float* edi_18 = ((edx_6 + *(uint32_t*)((char*)this + 0x5c)) + 0x14);
005f98ad                  *(uint32_t*)edi_18 = ((float)((((long double)0.0625f) * x87_r7_8) + ((long double)*(uint32_t*)edi_18)));
005f98b8                  var_40 = ((float)(x87_r7_8 * ((long double)0.4375)));
005f9815              }
005f9815              
005f98c1              int32_t ebx_4 = edi_6;
005f98c1              
005f98c3              if (edi_6 >= 0x7fff)
005f98c5                  ebx_4 = 0x7fff;
005f98c5              
005f98d5              if (ebx_4 <= 0xffff8001)
005f98df                  edi_6 = 0xffff8001;
005f98d5              else if (edi_6 >= 0x7fff)
005f98db                  edi_6 = 0x7fff;
005f98db              
005f98e6              int32_t ebx_5 = ecx_13;
005f98e6              
005f98e8              if (ecx_13 >= 0x7fff)
005f98ea                  ebx_5 = 0x7fff;
005f98ea              
005f98f5              if (ebx_5 <= 0xffff8001)
005f9904                  ecx_13 = 0xffff8001;
005f98f5              else if (ecx_13 >= 0x7fff)
005f9900                  ecx_13 = 0x7fff;
005f9900              
005f9914              int32_t* edi_20 = var_8;
005f9917              *(uint32_t*)edi_20 = ((ecx_13 << 0x10) | (edi_6 & 0xffff));
005f991f              arg3 += ecx_8;
005f9922              eax_13 += ecx_8;
005f9924              edx_6 += ecx_8;
005f9926              arg2 += 1;
005f992f              var_8 = &edi_20[ebx_2];
005f9932          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f978c      }
005f978c      
005f993e      int16_t x87control_2;
005f993e      int16_t x87status_2;
005f993e      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f96d1  }


005f9948  void __thiscall D3DXTex::CCodec_X4R4G4B4::CCodec_X4R4G4B4(D3DXTex::CCodec_X4R4G4B4* this, struct D3DX_BLT* arg2)

005f9948  {
005f9957      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005f995c      *(uint32_t*)this = 0x7ecf04;
005f9948  }


005f9969  void __thiscall D3DXTex::CCodec_A2B10G10R10::CCodec_A2B10G10R10(D3DXTex::CCodec_A2B10G10R10* this, struct D3DX_BLT* arg2)

005f9969  {
005f9978      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 1);
005f997d      *(uint32_t*)this = 0x7ecf14;
005f9969  }


005f998a  void __thiscall D3DXTex::CCodec_A8B8G8R8::CCodec_A8B8G8R8(D3DXTex::CCodec_A8B8G8R8* this, struct D3DX_BLT* arg2)

005f998a  {
005f9999      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 1);
005f999e      *(uint32_t*)this = 0x7ecf24;
005f998a  }


005f99ab  void __thiscall D3DXTex::CCodec_X8B8G8R8::CCodec_X8B8G8R8(D3DXTex::CCodec_X8B8G8R8* this, struct D3DX_BLT* arg2)

005f99ab  {
005f99ba      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 1);
005f99bf      *(uint32_t*)this = 0x7ecf34;
005f99ab  }


005f99cc  void __thiscall D3DXTex::CCodec_G16R16::CCodec_G16R16(D3DXTex::CCodec_G16R16* this, struct D3DX_BLT* arg2)

005f99cc  {
005f99db      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 1);
005f99e0      *(uint32_t*)this = 0x7ecf44;
005f99cc  }


005f99ed  void __thiscall D3DXTex::CCodec_A2R10G10B10::CCodec_A2R10G10B10(D3DXTex::CCodec_A2R10G10B10* this, struct D3DX_BLT* arg2)

005f99ed  {
005f99fc      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 1);
005f9a01      *(uint32_t*)this = 0x7ecf54;
005f99ed  }


005f9a0e  void __thiscall D3DXTex::CCodec_A16B16G16R16::CCodec_A16B16G16R16(D3DXTex::CCodec_A16B16G16R16* this, struct D3DX_BLT* arg2)

005f9a0e  {
005f9a1d      D3DXTex::CCodec::CCodec(this, arg2, 0x40, 1);
005f9a22      *(uint32_t*)this = 0x7ecf64;
005f9a0e  }


005f9a2f  void __thiscall D3DXTex::CCodec_A8P8::CCodec_A8P8(D3DXTex::CCodec_A8P8* this, struct D3DX_BLT* arg2)

005f9a2f  {
005f9a3e      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005f9a43      *(uint32_t*)this = 0x7ecf74;
005f9a2f  }


005f9a50  void __thiscall D3DXTex::CCodec_A2W10V10U10::Encode(D3DXTex::CCodec_A2W10V10U10* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f9a50  {
005f9a60      int32_t edi;
005f9a60      int32_t var_64 = edi;
005f9a60      
005f9a61      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f9a61      {
005f9a66          struct D3DXCOLOR* eax_1;
005f9a66          int80_t st0_1;
005f9a66          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f9a6b          arg4 = eax_1;
005f9a61      }
005f9a61      
005f9a72      int16_t x87control;
005f9a72      
005f9a72      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f9a72      {
005f9a79          struct D3DXCOLOR* eax_2;
005f9a79          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f9a7e          arg4 = eax_2;
005f9a72      }
005f9a72      
005f9a81      uint32_t eax_3 = arg2;
005f9a86      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f9a89      float var_58 = ((float)((long double)0));
005f9a97      float var_54 = ((float)((long double)0));
005f9a9c      float var_50 = ((float)((long double)0));
005f9aa1      float var_4c = ((float)((long double)0));
005f9aa7      arg2 = (eax_3 & 1);
005f9aca      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f9ad3      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f9ad9      int32_t ebx_2;
005f9ad9      int32_t edi_2;
005f9ad9      
005f9ad9      if (arg2 != 0)
005f9ad9      {
005f9ae2          edi_2 = (edi_1 - 1);
005f9ae3          ebx_2 = 0xffffffff;
005f9ad9      }
005f9ad9      else
005f9ad9      {
005f9add          edi_2 = 0;
005f9adf          ebx_2 = 1;
005f9ad9      }
005f9ad9      
005f9ae6      int16_t x87status;
005f9ae6      int16_t temp0;
005f9ae6      temp0 = __fnstcw_memmem16(x87control);
005f9ae6      arg2 = temp0;
005f9af4      int16_t x87control_1;
005f9af4      int16_t x87status_1;
005f9af4      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f9afa      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f9afa      
005f9b01      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f9b08          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f9b08      
005f9b0d      arg2 = 0;
005f9b0d      
005f9b15      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f9b15      {
005f9b2a          int32_t ecx_9 = (ebx_2 << 4);
005f9b2d          int32_t eax_13 = (edi_2 << 4);
005f9b3c          int32_t ecx_11 = ((ebx_2 + edi_2) << 4);
005f9b3f          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f9b42          arg3 = (&arg4->b + eax_13);
005f9b42          
005f9e14          do
005f9e14          {
005f9b4e              long double x87_r7_4 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f9b51              float* edx_8 = arg3;
005f9b54              arg4 = ((float)x87_r7_4);
005f9b63              float var_48_1 = ((float)((((long double)var_58) + ((long double)edx_8[-2])) * ((long double)511f)));
005f9b72              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_8[-1])) * ((long double)511f)));
005f9b80              float var_40_1 = ((float)((((long double)var_50) + ((long double)*(uint32_t*)edx_8)) * ((long double)511f)));
005f9b8f              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)edx_8[1])) * ((long double)3f)));
005f9bab              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + x87_r7_4))));
005f9bc0              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005f9bcf              int32_t edx_11 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)arg4)))));
005f9bde              int32_t var_20_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)arg4)))));
005f9bde              
005f9beb              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f9beb              {
005f9bf1                  long double x87_r7_15 = ((long double)0.00195694715f);
005f9bfd                  float* ebx_6 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005f9c04                  long double x87_r6_17 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_15);
005f9c10                  *(uint32_t*)ebx_6 = ((float)((((long double)0.1875f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_6)));
005f9c1b                  float* ebx_8 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x10);
005f9c23                  *(uint32_t*)ebx_8 = ((float)((((long double)0.3125f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_8)));
005f9c2e                  float* ebx_10 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x10);
005f9c36                  *(uint32_t*)ebx_10 = ((float)((((long double)0.0625f) * x87_r6_17) + ((long double)*(uint32_t*)ebx_10)));
005f9c3b                  float* ebx_12 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005f9c45                  var_58 = ((float)(x87_r6_17 * ((long double)0.4375)));
005f9c4e                  long double x87_r6_21 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_15);
005f9c5a                  *(uint32_t*)ebx_12 = ((float)((((long double)0.1875f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_12)));
005f9c65                  float* ebx_14 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x14);
005f9c6d                  *(uint32_t*)ebx_14 = ((float)((((long double)0.3125f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_14)));
005f9c78                  float* ebx_16 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x14);
005f9c80                  *(uint32_t*)ebx_16 = ((float)((((long double)0.0625f) * x87_r6_21) + ((long double)*(uint32_t*)ebx_16)));
005f9c85                  float* ebx_18 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005f9c8f                  var_54 = ((float)(x87_r6_21 * ((long double)0.4375)));
005f9c98                  long double x87_r7_16 = (x87_r7_15 * (((long double)var_40_1) - ((long double)edx_11)));
005f9ca4                  *(uint32_t*)ebx_18 = ((float)((((long double)0.1875f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_18)));
005f9caf                  float* ebx_20 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x18);
005f9cb7                  *(uint32_t*)ebx_20 = ((float)((((long double)0.3125f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_20)));
005f9cc2                  float* ebx_22 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x18);
005f9cca                  *(uint32_t*)ebx_22 = ((float)((((long double)0.0625f) * x87_r7_16) + ((long double)*(uint32_t*)ebx_22)));
005f9ccf                  float* ebx_24 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005f9cd9                  var_50 = ((float)(x87_r7_16 * ((long double)0.4375)));
005f9ce2                  long double x87_r7_20 = ((((long double)var_3c_1) - ((long double)var_20_1)) * ((long double)0.333333343f));
005f9cf2                  *(uint32_t*)ebx_24 = ((float)((((long double)0.1875f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_24)));
005f9cfd                  float* ebx_26 = ((*(uint32_t*)((char*)this + 0x5c) + eax_13) + 0x1c);
005f9d05                  *(uint32_t*)ebx_26 = ((float)((((long double)0.3125f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_26)));
005f9d10                  float* ebx_28 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_11) + 0x1c);
005f9d18                  *(uint32_t*)ebx_28 = ((float)((((long double)0.0625f) * x87_r7_20) + ((long double)*(uint32_t*)ebx_28)));
005f9d20                  var_4c = ((float)(x87_r7_20 * ((long double)0.4375)));
005f9beb              }
005f9beb              
005f9d23              int32_t ebx_29 = var_38_1;
005f9d23              
005f9d2c              if (ebx_29 >= 0x1ff)
005f9d2e                  ebx_29 = 0x1ff;
005f9d2e              
005f9d39              if (ebx_29 <= 0xfffffe01)
005f9d4d                  var_38_1 = 0xfffffe01;
005f9d39              else if (var_38_1 >= 0x1ff)
005f9d44                  var_38_1 = 0x1ff;
005f9d44              
005f9d54              int32_t ebx_30 = var_34_1;
005f9d54              
005f9d5d              if (ebx_30 >= 0x1ff)
005f9d5f                  ebx_30 = 0x1ff;
005f9d5f              
005f9d6a              if (ebx_30 <= 0xfffffe01)
005f9d7e                  var_34_1 = 0xfffffe01;
005f9d6a              else if (var_34_1 >= 0x1ff)
005f9d75                  var_34_1 = 0x1ff;
005f9d75              
005f9d8b              int32_t ebx_31 = edx_11;
005f9d8b              
005f9d8d              if (edx_11 >= 0x1ff)
005f9d8f                  ebx_31 = 0x1ff;
005f9d8f              
005f9d9a              if (ebx_31 <= 0xfffffe01)
005f9da9                  edx_11 = 0xfffffe01;
005f9d9a              else if (edx_11 >= 0x1ff)
005f9da5                  edx_11 = 0x1ff;
005f9da5              
005f9dae              int32_t ebx_32 = var_20_1;
005f9dae              
005f9db4              if (ebx_32 >= 3)
005f9db8                  ebx_32 = 3;
005f9db8              
005f9dbc              int32_t ebx_33;
005f9dbc              
005f9dbc              if (ebx_32 <= 0xfffffffd)
005f9dcc                  ebx_33 = 0xfffffffd;
005f9dbc              else
005f9dbc              {
005f9dbe                  ebx_33 = var_20_1;
005f9dbe                  
005f9dc4                  if (ebx_33 >= 3)
005f9dcc                      ebx_33 = 3;
005f9dbc              }
005f9dbc              
005f9df4              int32_t* ebx_39 = var_8;
005f9df7              *(uint32_t*)ebx_39 = ((((((edx_11 & 0x3ff) | (ebx_33 << 0xa)) << 0xa) | (var_34_1 & 0x3ff)) << 0xa) | (var_38_1 & 0x3ff));
005f9dff              arg3 += ecx_9;
005f9e02              eax_13 += ecx_9;
005f9e04              edi_4 += ecx_9;
005f9e06              ecx_11 += ecx_9;
005f9e08              arg2 += 1;
005f9e11              var_8 = &ebx_39[ebx_2];
005f9e14          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f9b15      }
005f9b15      
005f9e20      int16_t x87control_2;
005f9e20      int16_t x87status_2;
005f9e20      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f9a50  }


005f9e2a  void __thiscall D3DXTex::CCodec_P8::CCodec_P8(D3DXTex::CCodec_P8* this, struct D3DX_BLT* arg2)

005f9e2a  {
005f9e39      D3DXTex::CCodec::CCodec(this, arg2, 8, 1);
005f9e3e      *(uint32_t*)this = 0x7ecf8c;
005f9e2a  }


005f9e4b  void __thiscall D3DXTex::CCodec_L8::CCodec_L8(D3DXTex::CCodec_L8* this, struct D3DX_BLT* arg2)

005f9e4b  {
005f9e5a      D3DXTex::CCodec::CCodec(this, arg2, 8, 1);
005f9e5f      *(uint32_t*)this = 0x7ecf9c;
005f9e4b  }


005f9e6c  void __thiscall D3DXTex::CCodec_A8L8::CCodec_A8L8(D3DXTex::CCodec_A8L8* this, struct D3DX_BLT* arg2)

005f9e6c  {
005f9e7b      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005f9e80      *(uint32_t*)this = 0x7ecfac;
005f9e6c  }


005f9e8d  void __thiscall D3DXTex::CCodec_A4L4::CCodec_A4L4(D3DXTex::CCodec_A4L4* this, struct D3DX_BLT* arg2)

005f9e8d  {
005f9e9c      D3DXTex::CCodec::CCodec(this, arg2, 8, 1);
005f9ea1      *(uint32_t*)this = 0x7ecfbc;
005f9e8d  }


005f9eae  void __thiscall D3DXTex::CCodec_V8U8::CCodec_V8U8(D3DXTex::CCodec_V8U8* this, struct D3DX_BLT* arg2)

005f9eae  {
005f9ebd      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 2);
005f9ec2      *(uint32_t*)this = 0x7ecfdc;
005f9eae  }


005f9ecf  void __thiscall D3DXTex::CCodec_L6V5U5::CCodec_L6V5U5(D3DXTex::CCodec_L6V5U5* this, struct D3DX_BLT* arg2)

005f9ecf  {
005f9ede      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 2);
005f9ee3      *(uint32_t*)this = 0x7ecfec;
005f9ecf  }


005f9ef0  void __thiscall D3DXTex::CCodec_Q16W16V16U16::Encode(D3DXTex::CCodec_Q16W16V16U16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005f9ef0  {
005f9f00      int32_t edi;
005f9f00      int32_t var_6c = edi;
005f9f00      
005f9f01      if (*(uint32_t*)((char*)this + 0x54) != 0)
005f9f01      {
005f9f06          struct D3DXCOLOR* eax_1;
005f9f06          int80_t st0_1;
005f9f06          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005f9f0b          arg4 = eax_1;
005f9f01      }
005f9f01      
005f9f12      int16_t x87control;
005f9f12      
005f9f12      if (*(uint32_t*)((char*)this + 0x10) != 0)
005f9f12      {
005f9f19          struct D3DXCOLOR* eax_2;
005f9f19          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005f9f1e          arg4 = eax_2;
005f9f12      }
005f9f12      
005f9f21      uint32_t eax_3 = arg2;
005f9f26      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005f9f29      float var_60 = ((float)((long double)0));
005f9f37      float var_5c = ((float)((long double)0));
005f9f3c      float var_58 = ((float)((long double)0));
005f9f41      float var_54 = ((float)((long double)0));
005f9f47      arg2 = (eax_3 & 1);
005f9f6a      void* var_8 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 3)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005f9f73      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005f9f79      int32_t ebx_2;
005f9f79      int32_t edi_2;
005f9f79      
005f9f79      if (arg2 != 0)
005f9f79      {
005f9f82          edi_2 = (edi_1 - 1);
005f9f83          ebx_2 = 0xffffffff;
005f9f79      }
005f9f79      else
005f9f79      {
005f9f7d          edi_2 = 0;
005f9f7f          ebx_2 = 1;
005f9f79      }
005f9f79      
005f9f86      int16_t x87status;
005f9f86      int16_t temp0;
005f9f86      temp0 = __fnstcw_memmem16(x87control);
005f9f86      arg2 = temp0;
005f9f94      int16_t x87control_1;
005f9f94      int16_t x87status_1;
005f9f94      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005f9f9a      *(uint32_t*)((char*)this + 0x7c) = arg2;
005f9f9a      
005f9fa1      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005f9fa8          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005f9fa8      
005f9fad      arg2 = 0;
005f9fad      
005f9fb5      if (*(uint32_t*)((char*)this + 0x68) > 0)
005f9fb5      {
005f9fc5          int32_t eax_13 = (ebx_2 << 4);
005f9fd3          int32_t ecx_9 = (edi_2 << 4);
005f9fd6          int32_t edx_5 = ((ebx_2 + edi_2) << 4);
005f9fdb          int32_t edi_4 = ((edi_2 - ebx_2) << 4);
005f9fe2          int32_t var_10_1 = edx_5;
005f9fe5          int32_t var_c_1 = edi_4;
005f9fe8          arg3 = (&arg4->b + ecx_9);
005f9fe8          
005fa2af          do
005fa2af          {
005f9fee              long double x87_r7_4 = ((long double)32767f);
005f9ffa              long double x87_r6_1 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005f9ffd              float* eax_18 = arg3;
005fa000              arg4 = ((float)x87_r6_1);
005fa00b              float var_50_1 = ((float)((((long double)var_60) + ((long double)eax_18[-2])) * x87_r7_4));
005fa016              float var_4c_1 = ((float)((((long double)var_5c) + ((long double)eax_18[-1])) * x87_r7_4));
005fa020              float var_48_1 = ((float)((((long double)var_58) + ((long double)*(uint32_t*)eax_18)) * x87_r7_4));
005fa02b              float var_44_1 = ((float)((((long double)var_54) + ((long double)eax_18[1])) * x87_r7_4));
005fa03d              int32_t var_1c_1 = ((int32_t)((long double)((float)(((long double)var_50_1) + x87_r6_1))));
005fa049              int32_t var_40_1 = var_1c_1;
005fa05e              int32_t var_3c_1 = ((int32_t)((long double)((float)(((long double)var_4c_1) + ((long double)arg4)))));
005fa073              int32_t var_38_1 = ((int32_t)((long double)((float)(((long double)var_48_1) + ((long double)arg4)))));
005fa086              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + ((long double)arg4)))));
005fa086              
005fa089              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005fa089              {
005fa08f                  long double x87_r7_16 = ((long double)3.05185094e-05f);
005fa09b                  float* eax_23 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x10);
005fa0a2                  long double x87_r6_4 = ((((long double)var_50_1) - ((long double)var_40_1)) * x87_r7_16);
005fa0ae                  *(uint32_t*)eax_23 = ((float)((((long double)0.1875f) * x87_r6_4) + ((long double)*(uint32_t*)eax_23)));
005fa0b9                  float* eax_25 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x10);
005fa0c1                  *(uint32_t*)eax_25 = ((float)((((long double)0.3125f) * x87_r6_4) + ((long double)*(uint32_t*)eax_25)));
005fa0cc                  float* eax_27 = ((*(uint32_t*)((char*)this + 0x5c) + edx_5) + 0x10);
005fa0d4                  *(uint32_t*)eax_27 = ((float)((((long double)0.0625f) * x87_r6_4) + ((long double)*(uint32_t*)eax_27)));
005fa0d9                  float* eax_29 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x14);
005fa0e3                  var_60 = ((float)(x87_r6_4 * ((long double)0.4375)));
005fa0ec                  long double x87_r6_8 = ((((long double)var_4c_1) - ((long double)var_3c_1)) * x87_r7_16);
005fa0f8                  *(uint32_t*)eax_29 = ((float)((((long double)0.1875f) * x87_r6_8) + ((long double)*(uint32_t*)eax_29)));
005fa103                  float* eax_31 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x14);
005fa10b                  *(uint32_t*)eax_31 = ((float)((((long double)0.3125f) * x87_r6_8) + ((long double)*(uint32_t*)eax_31)));
005fa116                  float* eax_33 = ((*(uint32_t*)((char*)this + 0x5c) + edx_5) + 0x14);
005fa11e                  *(uint32_t*)eax_33 = ((float)((((long double)0.0625f) * x87_r6_8) + ((long double)*(uint32_t*)eax_33)));
005fa123                  float* eax_35 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x18);
005fa12d                  var_5c = ((float)(x87_r6_8 * ((long double)0.4375)));
005fa136                  long double x87_r6_12 = ((((long double)var_48_1) - ((long double)var_38_1)) * x87_r7_16);
005fa142                  *(uint32_t*)eax_35 = ((float)((((long double)0.1875f) * x87_r6_12) + ((long double)*(uint32_t*)eax_35)));
005fa14d                  float* eax_37 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x18);
005fa155                  *(uint32_t*)eax_37 = ((float)((((long double)0.3125f) * x87_r6_12) + ((long double)*(uint32_t*)eax_37)));
005fa160                  float* eax_39 = ((*(uint32_t*)((char*)this + 0x5c) + edx_5) + 0x18);
005fa168                  *(uint32_t*)eax_39 = ((float)((((long double)0.0625f) * x87_r6_12) + ((long double)*(uint32_t*)eax_39)));
005fa16d                  float* eax_41 = ((*(uint32_t*)((char*)this + 0x5c) + edi_4) + 0x1c);
005fa177                  var_58 = ((float)(x87_r6_12 * ((long double)0.4375)));
005fa180                  long double x87_r7_17 = (x87_r7_16 * (((long double)var_44_1) - ((long double)var_34_1)));
005fa18c                  *(uint32_t*)eax_41 = ((float)((((long double)0.1875f) * x87_r7_17) + ((long double)*(uint32_t*)eax_41)));
005fa197                  float* eax_43 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_9) + 0x1c);
005fa19f                  *(uint32_t*)eax_43 = ((float)((((long double)0.3125f) * x87_r7_17) + ((long double)*(uint32_t*)eax_43)));
005fa1aa                  float* eax_45 = ((*(uint32_t*)((char*)this + 0x5c) + edx_5) + 0x1c);
005fa1b2                  *(uint32_t*)eax_45 = ((float)((((long double)0.0625f) * x87_r7_17) + ((long double)*(uint32_t*)eax_45)));
005fa1ba                  var_54 = ((float)(x87_r7_17 * ((long double)0.4375)));
005fa089              }
005fa089              
005fa1c4              int32_t edi_5 = var_1c_1;
005fa1c4              
005fa1c6              if (var_1c_1 >= 0x7fff)
005fa1c8                  edi_5 = 0x7fff;
005fa1c8              
005fa1d1              if (edi_5 <= 0xffff8001)
005fa1dc                  var_40_1 = 0xffff8001;
005fa1d1              else if (var_1c_1 >= 0x7fff)
005fa1d7                  var_40_1 = 0x7fff;
005fa1d7              
005fa1e2              int32_t edi_6 = var_3c_1;
005fa1e2              
005fa1e5              if (var_3c_1 >= 0x7fff)
005fa1e7                  edi_6 = 0x7fff;
005fa1e7              
005fa1eb              if (edi_6 <= 0xffff8001)
005fa1f7                  var_3c_1 = 0xffff8001;
005fa1eb              else if (var_3c_1 >= 0x7fff)
005fa1f2                  var_3c_1 = 0x7fff;
005fa1f2              
005fa1fd              int32_t edi_7 = var_38_1;
005fa1fd              
005fa200              if (var_38_1 >= 0x7fff)
005fa202                  edi_7 = 0x7fff;
005fa202              
005fa206              if (edi_7 <= 0xffff8001)
005fa212                  var_38_1 = 0xffff8001;
005fa206              else if (var_38_1 >= 0x7fff)
005fa20d                  var_38_1 = 0x7fff;
005fa20d              
005fa218              int32_t edi_8 = var_34_1;
005fa218              
005fa21b              if (var_34_1 >= 0x7fff)
005fa21d                  edi_8 = 0x7fff;
005fa21d              
005fa221              if (edi_8 <= 0xffff8001)
005fa22d                  var_34_1 = 0xffff8001;
005fa221              else if (var_34_1 >= 0x7fff)
005fa228                  var_34_1 = 0x7fff;
005fa228              
005fa23a              int32_t eax_48;
005fa23a              int32_t edx_6;
005fa23a              edx_6 = HIGHD(((int64_t)((uint32_t)var_34_1)));
005fa23a              eax_48 = LOWD(((int64_t)((uint32_t)var_34_1)));
005fa24e              int32_t eax_53;
005fa24e              int32_t edx_8;
005fa24e              edx_8 = HIGHD(((int64_t)((uint32_t)var_38_1)));
005fa24e              eax_53 = LOWD(((int64_t)((uint32_t)var_38_1)));
005fa24f              int32_t ebx_6 = ((eax_48 << 0x10) | eax_53);
005fa264              int32_t eax_59;
005fa264              int32_t edx_9;
005fa264              edx_9 = HIGHD(((int64_t)((uint32_t)var_3c_1)));
005fa264              eax_59 = LOWD(((int64_t)((uint32_t)var_3c_1)));
005fa26a              int32_t ebx_8 = ((ebx_6 << 0x10) | eax_59);
005fa278              int32_t eax_62;
005fa278              int32_t edx_10;
005fa278              edx_10 = HIGHD(((int64_t)((uint32_t)var_40_1)));
005fa278              eax_62 = LOWD(((int64_t)((uint32_t)var_40_1)));
005fa283              int32_t* eax_63 = var_8;
005fa286              eax_63[1] = (((((((((edx_6 << 0x10) | (eax_48 >> 0xfffffff0)) | edx_8) << 0x10) | (ebx_6 >> 0xfffffff0)) | edx_9) << 0x10) | (ebx_8 >> 0xfffffff0)) | edx_10);
005fa28c              *(uint32_t*)eax_63 = ((ebx_8 << 0x10) | eax_62);
005fa291              var_8 = &eax_63[(ebx_2 * 2)];
005fa297              arg3 += eax_13;
005fa29a              edi_4 = (var_c_1 + eax_13);
005fa29c              edx_5 = (var_10_1 + eax_13);
005fa29e              ecx_9 += eax_13;
005fa2a0              arg2 += 1;
005fa2a9              var_c_1 = edi_4;
005fa2ac              var_10_1 = edx_5;
005fa2af          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005f9fb5      }
005f9fb5      
005fa2bb      int16_t x87control_2;
005fa2bb      int16_t x87status_2;
005fa2bb      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005f9ef0  }


005fa2c5  void __thiscall D3DXTex::CCodec_X8L8V8U8::CCodec_X8L8V8U8(D3DXTex::CCodec_X8L8V8U8* this, struct D3DX_BLT* arg2)

005fa2c5  {
005fa2d4      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 2);
005fa2d9      *(uint32_t*)this = 0x7ecffc;
005fa2c5  }


005fa2e6  void __thiscall D3DXTex::CCodec_Q8W8V8U8::CCodec_Q8W8V8U8(D3DXTex::CCodec_Q8W8V8U8* this, struct D3DX_BLT* arg2)

005fa2e6  {
005fa2f5      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 3);
005fa2fa      *(uint32_t*)this = 0x7ed00c;
005fa2e6  }


005fa307  void __thiscall D3DXTex::CCodec_V16U16::CCodec_V16U16(D3DXTex::CCodec_V16U16* this, struct D3DX_BLT* arg2)

005fa307  {
005fa316      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 2);
005fa31b      *(uint32_t*)this = 0x7ed01c;
005fa307  }


005fa328  void __thiscall D3DXTex::CCodec_A2W10V10U10::CCodec_A2W10V10U10(D3DXTex::CCodec_A2W10V10U10* this, struct D3DX_BLT* arg2)

005fa328  {
005fa337      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 2);
005fa33c      *(uint32_t*)this = 0x7ed02c;
005fa328  }


005fa349  void __thiscall D3DXTex::CCodec_Q16W16V16U16::CCodec_Q16W16V16U16(D3DXTex::CCodec_Q16W16V16U16* this, struct D3DX_BLT* arg2)

005fa349  {
005fa358      D3DXTex::CCodec::CCodec(this, arg2, 0x40, 3);
005fa35d      *(uint32_t*)this = 0x7ed03c;
005fa349  }


005fa36a  void __thiscall D3DXTex::CCodec_CxV8U8::CCodec_CxV8U8(D3DXTex::CCodec_CxV8U8* this, struct D3DX_BLT* arg2)

005fa36a  {
005fa379      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 2);
005fa37e      *(uint32_t*)this = 0x7ed04c;
005fa36a  }


005fa38b  void __thiscall D3DXTex::CCodec_CxV8U8::Encode(D3DXTex::CCodec_CxV8U8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fa38b  {
005fa39b      int32_t edi;
005fa39b      int32_t var_64 = edi;
005fa39b      
005fa39c      if (*(uint32_t*)((char*)this + 0x54) != 0)
005fa39c      {
005fa3a1          struct D3DXCOLOR* eax_1;
005fa3a1          int80_t st0_1;
005fa3a1          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005fa3a6          arg4 = eax_1;
005fa39c      }
005fa39c      
005fa3ad      int16_t x87control;
005fa3ad      
005fa3ad      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fa3ad      {
005fa3b4          struct D3DXCOLOR* eax_2;
005fa3b4          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005fa3b9          arg4 = eax_2;
005fa3ad      }
005fa3ad      
005fa3bc      uint32_t eax_3 = arg2;
005fa3c1      int32_t ebx = *(uint32_t*)((char*)this + 0x68);
005fa3c4      float var_48 = ((float)((long double)0));
005fa3d2      float var_44 = ((float)((long double)0));
005fa3d8      arg2 = (eax_3 & 1);
005fa402      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005fa405      void* var_c = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((ebx - 1) * arg2) << 1)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fa40b      int32_t ebx_1;
005fa40b      
005fa40b      if (arg2 != 0)
005fa40b      {
005fa418          ebx_1 = (ebx - 1);
005fa419          arg2 = 0xffffffff;
005fa40b      }
005fa40b      else
005fa40b      {
005fa40d          ebx_1 = 0;
005fa40f          arg2 = 1;
005fa40b      }
005fa40b      
005fa41d      int16_t x87status;
005fa41d      int16_t temp0;
005fa41d      temp0 = __fnstcw_memmem16(x87control);
005fa41d      arg3 = temp0;
005fa42b      int16_t x87control_1;
005fa42b      int16_t x87status_1;
005fa42b      x87control_1 = __fldcw_memmem16((arg3 | 0xc00));
005fa431      *(uint32_t*)((char*)this + 0x7c) = arg3;
005fa431      
005fa437      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005fa43e          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005fa43e      
005fa446      int32_t i = 0;
005fa446      
005fa449      if (*(uint32_t*)((char*)this + 0x68) > 0)
005fa449      {
005fa455          uint32_t eax_11 = (arg2 * 2);
005fa45c          uint32_t eax_13 = (arg2 << 4);
005fa46c          int32_t edi_4 = (ebx_1 << 4);
005fa472          arg3 = ((arg2 + ebx_1) << 4);
005fa475          arg2 = ((ebx_1 - arg2) << 4);
005fa475          
005fa5e5          do
005fa5e5          {
005fa47b              float* ebx_4 = (edi_4 + arg4);
005fa480              _D3DXVec3Normalize@8(ebx_4, ebx_4);
005fa494              long double x87_r6_1 = ((long double)127f);
005fa4a1              float var_38_1 = ((float)((((long double)var_48) + ((long double)*(uint32_t*)ebx_4)) * x87_r6_1));
005fa4ac              float var_34_1 = ((float)((((long double)var_44) + ((long double)ebx_4[1])) * x87_r6_1));
005fa4c4              int32_t edx_5 = ((int32_t)((long double)((float)(((long double)var_38_1) + x87_r6_1))));
005fa4da              int32_t ecx_9 = ((int32_t)((long double)((float)(((long double)var_34_1) + ((long double)((float)((long double)*(uint32_t*)(eax_6 + ((i & 3) << 2)))))))));
005fa4da              
005fa4e0              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005fa4e0              {
005fa4e6                  long double x87_r7_8 = ((long double)0.00787401572f);
005fa4f5                  float* eax_20 = ((*(uint32_t*)((char*)this + 0x5c) + arg2) + 0x10);
005fa4ff                  long double x87_r6_6 = ((((long double)var_38_1) - ((long double)edx_5)) * x87_r7_8);
005fa50b                  *(uint32_t*)eax_20 = ((float)((((long double)0.1875f) * x87_r6_6) + ((long double)*(uint32_t*)eax_20)));
005fa516                  float* eax_22 = ((edi_4 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005fa51e                  *(uint32_t*)eax_22 = ((float)((((long double)0.3125f) * x87_r6_6) + ((long double)*(uint32_t*)eax_22)));
005fa529                  float* eax_24 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x10);
005fa534                  *(uint32_t*)eax_24 = ((float)((((long double)0.0625f) * x87_r6_6) + ((long double)*(uint32_t*)eax_24)));
005fa539                  float* eax_26 = ((*(uint32_t*)((char*)this + 0x5c) + arg2) + 0x14);
005fa546                  var_48 = ((float)(x87_r6_6 * ((long double)0.4375)));
005fa54f                  long double x87_r7_9 = (x87_r7_8 * (((long double)var_34_1) - ((long double)ecx_9)));
005fa55b                  *(uint32_t*)eax_26 = ((float)((((long double)0.1875f) * x87_r7_9) + ((long double)*(uint32_t*)eax_26)));
005fa566                  float* eax_28 = ((edi_4 + *(uint32_t*)((char*)this + 0x5c)) + 0x14);
005fa56e                  *(uint32_t*)eax_28 = ((float)((((long double)0.3125f) * x87_r7_9) + ((long double)*(uint32_t*)eax_28)));
005fa579                  float* eax_30 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x14);
005fa581                  *(uint32_t*)eax_30 = ((float)((((long double)0.0625f) * x87_r7_9) + ((long double)*(uint32_t*)eax_30)));
005fa589                  var_44 = ((float)(x87_r7_9 * ((long double)0.4375)));
005fa4e0              }
005fa4e0              
005fa591              int32_t eax_31 = edx_5;
005fa591              
005fa593              if (edx_5 >= 0x7f)
005fa595                  eax_31 = 0x7f;
005fa595              
005fa59a              if (eax_31 <= 0xffffff81)
005fa5a6                  edx_5 = 0xffffff81;
005fa59a              else if (edx_5 >= 0x7f)
005fa5a0                  edx_5 = 0x7f;
005fa5a0              
005fa5a9              int32_t eax_32 = ecx_9;
005fa5a9              
005fa5ab              if (ecx_9 >= 0x7f)
005fa5ad                  eax_32 = 0x7f;
005fa5ad              
005fa5b2              if (eax_32 <= 0xffffff81)
005fa5be                  ecx_9 = 0xffffff81;
005fa5b2              else if (ecx_9 >= 0x7f)
005fa5b8                  ecx_9 = 0x7f;
005fa5b8              
005fa5bf              int16_t* eax_33 = var_c;
005fa5c2              edx_5 = ((uint16_t)edx_5);
005fa5c6              *(uint8_t*)((char*)edx_5)[1] = ecx_9;
005fa5c8              *(uint16_t*)eax_33 = edx_5;
005fa5ce              var_c = ((char*)eax_33 + eax_11);
005fa5d4              arg2 += eax_13;
005fa5d7              arg3 += eax_13;
005fa5da              edi_4 += eax_13;
005fa5dc              i += 1;
005fa5e5          } while (i < *(uint32_t*)((char*)this + 0x68));
005fa449      }
005fa449      
005fa5f1      int16_t x87control_2;
005fa5f1      int16_t x87status_2;
005fa5f1      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005fa38b  }


005fa5fb  void __thiscall D3DXTex::CCodec_D16_LOCKABLE::CCodec_D16_LOCKABLE(D3DXTex::CCodec_D16_LOCKABLE* this, struct D3DX_BLT* arg2)

005fa5fb  {
005fa60a      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 1);
005fa60f      *(uint32_t*)this = 0x7ecfcc;
005fa5fb  }


005fa61c  void __thiscall D3DXTex::CCodec_R16F::CCodec_R16F(D3DXTex::CCodec_R16F* this, struct D3DX_BLT* arg2)

005fa61c  {
005fa62b      D3DXTex::CCodec::CCodec(this, arg2, 0x10, 4);
005fa630      *(uint32_t*)this = 0x7ed06c;
005fa61c  }


005fa63d  void __thiscall D3DXTex::CCodec_G16R16F::CCodec_G16R16F(D3DXTex::CCodec_G16R16F* this, struct D3DX_BLT* arg2)

005fa63d  {
005fa64c      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 4);
005fa651      *(uint32_t*)this = 0x7ed07c;
005fa63d  }


005fa65e  void __thiscall D3DXTex::CCodec_A16B16G16R16F::CCodec_A16B16G16R16F(D3DXTex::CCodec_A16B16G16R16F* this, struct D3DX_BLT* arg2)

005fa65e  {
005fa66d      D3DXTex::CCodec::CCodec(this, arg2, 0x40, 4);
005fa672      *(uint32_t*)this = 0x7ed08c;
005fa65e  }


005fa67f  void __thiscall D3DXTex::CCodec_D32F_LOCKABLE::CCodec_D32F_LOCKABLE(D3DXTex::CCodec_D32F_LOCKABLE* this, struct D3DX_BLT* arg2)

005fa67f  {
005fa68e      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 4);
005fa693      *(uint32_t*)this = 0x7ed05c;
005fa67f  }


005fa6a0  void __thiscall D3DXTex::CCodec_G32R32F::CCodec_G32R32F(D3DXTex::CCodec_G32R32F* this, struct D3DX_BLT* arg2)

005fa6a0  {
005fa6af      D3DXTex::CCodec::CCodec(this, arg2, 0x40, 4);
005fa6b4      *(uint32_t*)this = 0x7ed09c;
005fa6a0  }


005fa6c1  void __thiscall D3DXTex::CCodec_A32B32G32R32F::CCodec_A32B32G32R32F(D3DXTex::CCodec_A32B32G32R32F* this, struct D3DX_BLT* arg2)

005fa6c1  {
005fa6d3      D3DXTex::CCodec::CCodec(this, arg2, 0x80, 4);
005fa6d8      *(uint32_t*)this = 0x7ed0ac;
005fa6c1  }


005fa6e5  void __thiscall D3DXTex::CCodec_L16::Encode(D3DXTex::CCodec_L16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fa6e5  {
005fa6f5      int32_t edi;
005fa6f5      int32_t var_54 = edi;
005fa6f5      
005fa6f6      if (*(uint32_t*)((char*)this + 0x54) != 0)
005fa6f6      {
005fa6fb          struct D3DXCOLOR* eax_1;
005fa6fb          int80_t st0_1;
005fa6fb          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005fa700          arg4 = eax_1;
005fa6f6      }
005fa6f6      
005fa707      int16_t x87control;
005fa707      
005fa707      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fa707      {
005fa70e          struct D3DXCOLOR* eax_2;
005fa70e          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005fa713          arg4 = eax_2;
005fa707      }
005fa707      
005fa716      uint32_t eax_3 = arg2;
005fa71e      float var_38 = ((float)((long double)0));
005fa733      arg2 = (eax_3 & 1);
005fa74d      int16_t* ebx_3 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + (((*(uint32_t*)((char*)this + 0x68) - 1) * arg2) << 1)) + *(uint32_t*)((char*)this + 0x20));
005fa755      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005fa75b      int32_t edi_4;
005fa75b      
005fa75b      if (arg2 != 0)
005fa75b      {
005fa76b          edi_4 = (*(uint32_t*)((char*)this + 0x68) - 1);
005fa76c          arg3 = 0xffffffff;
005fa75b      }
005fa75b      else
005fa75b      {
005fa75d          edi_4 = 0;
005fa75f          arg3 = 1;
005fa75b      }
005fa75b      
005fa770      int16_t x87status;
005fa770      int16_t temp0;
005fa770      temp0 = __fnstcw_memmem16(x87control);
005fa770      arg2 = temp0;
005fa77e      int16_t x87control_1;
005fa77e      int16_t x87status_1;
005fa77e      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005fa784      *(uint32_t*)((char*)this + 0x7c) = arg2;
005fa787      int32_t i = 0;
005fa787      
005fa78c      if (*(uint32_t*)((char*)this + 0x68) > 0)
005fa78c      {
005fa78e          struct D3DXCOLOR* eax_10 = arg4;
005fa78e          
005fa7b8          do
005fa7b8          {
005fa794              i += 1;
005fa7b0              eax_10->r = ((float)(((((long double)eax_10->b) * ((long double)0.0720999986f)) + (((long double)eax_10->g) * ((long double)0.715399981f))) + (((long double)eax_10->r) * ((long double)0.212500006f))));
005fa7b2              eax_10 = &eax_10[1];
005fa7b8          } while (i < *(uint32_t*)((char*)this + 0x68));
005fa78c      }
005fa78c      
005fa7bd      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005fa7c4          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005fa7c4      
005fa7ce      arg2 = 0;
005fa7ce      
005fa7d1      if (*(uint32_t*)((char*)this + 0x68) > 0)
005fa7d1      {
005fa7dc          uint32_t ecx_6 = (arg3 << 4);
005fa7df          uint32_t eax_11 = (arg3 * 2);
005fa7ef          float* eax_13 = (edi_4 << 4);
005fa7f2          int32_t ecx_8 = ((arg3 + edi_4) << 4);
005fa7f8          arg3 = ((edi_4 - arg3) << 4);
005fa7f8          
005fa8c0          do
005fa8c0          {
005fa813              float var_28_1 = ((float)((((long double)var_38) + ((long double)*(uint32_t*)((char*)eax_13 + arg4))) * ((long double)65535f)));
005fa829              int32_t edx_7 = ((int32_t)((long double)((float)(((long double)var_28_1) + ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)))))));
005fa829              
005fa82f              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005fa82f              {
005fa83a                  float* edx_9 = ((arg3 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005fa841                  long double x87_r7_13 = ((((long double)var_28_1) - ((long double)edx_7)) * ((long double)1.52590219e-05f));
005fa851                  *(uint32_t*)edx_9 = ((float)((((long double)0.1875f) * x87_r7_13) + ((long double)*(uint32_t*)edx_9)));
005fa85c                  void* edx_11 = (((char*)eax_13 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005fa864                  *(uint32_t*)edx_11 = ((float)((((long double)0.3125f) * x87_r7_13) + ((long double)*(uint32_t*)edx_11)));
005fa86f                  float* edx_13 = ((ecx_8 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005fa877                  *(uint32_t*)edx_13 = ((float)((((long double)0.0625f) * x87_r7_13) + ((long double)*(uint32_t*)edx_13)));
005fa882                  var_38 = ((float)(x87_r7_13 * ((long double)0.4375)));
005fa82f              }
005fa82f              
005fa88b              int32_t edi_10 = edx_7;
005fa88b              
005fa88d              if (edx_7 >= 0xffff)
005fa88f                  edi_10 = 0xffff;
005fa88f              
005fa896              if (edi_10 <= 0)
005fa8a5                  edx_7 = 0;
005fa896              else if (edx_7 >= 0xffff)
005fa8a1                  edx_7 = 0xffff;
005fa8a1              
005fa8a7              *(uint16_t*)ebx_3 = edx_7;
005fa8ad              arg3 += ecx_6;
005fa8b0              ebx_3 += eax_11;
005fa8b3              eax_13 += ecx_6;
005fa8b5              ecx_8 += ecx_6;
005fa8b7              arg2 += 1;
005fa8c0          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005fa7d1      }
005fa7d1      
005fa8cc      int16_t x87control_2;
005fa8cc      int16_t x87status_2;
005fa8cc      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005fa6e5  }


005fa8d6  void __thiscall D3DXTex::CCodec_D3DX_A16L16::CCodec_D3DX_A16L16(D3DXTex::CCodec_D3DX_A16L16* this, struct D3DX_BLT* arg2)

005fa8d6  {
005fa8e5      D3DXTex::CCodec::CCodec(this, arg2, 0x20, 1);
005fa8ea      *(uint32_t*)this = 0x7ed0bc;
005fa8d6  }


005fa8f7  void* __thiscall D3DXTex::CCodec_Q8W8V8U8::`scalar deleting destructor'(D3DXTex::CCodec_Q8W8V8U8* this, uint32_t arg2)

005fa8f7  {
005fa8ff      D3DXTex::CCodec::~CCodec(this);
005fa8ff      
005fa908      if ((arg2 & 1) != 0)
005fa90b          operator delete(this);
005fa90b      
005fa915      return this;
005fa8f7  }


005fa918  void __thiscall D3DXTex::CCodec_D3DX_R16G16B16::CCodec_D3DX_R16G16B16(D3DXTex::CCodec_D3DX_R16G16B16* this, struct D3DX_BLT* arg2)

005fa918  {
005fa927      D3DXTex::CCodec::CCodec(this, arg2, 0x30, 1);
005fa92c      *(uint32_t*)this = 0x7ed0cc;
005fa918  }


005fa939  void __thiscall D3DXTex::CCodec_R16F::Encode(D3DXTex::CCodec_R16F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fa939  {
005fa940      int32_t edi;
005fa940      int32_t var_10 = edi;
005fa943      int32_t i = 0;
005fa943      
005fa948      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fa952          arg4 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005fa952      
005fa965      int32_t esi_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fa965      
005fa96b      if (*(uint32_t*)((char*)this + 0x68) > 0)
005fa96b      {
005fa988          do
005fa988          {
005fa979              _D3DXFloat32To16Array@12(esi_3, arg4, 1);
005fa97e              arg4 = &arg4[1];
005fa983              esi_3 += 2;
005fa984              i += 1;
005fa988          } while (i < *(uint32_t*)((char*)this + 0x68));
005fa96b      }
005fa939  }


005fa991  void __thiscall D3DXTex::CCodec_G16R16F::Encode(D3DXTex::CCodec_G16R16F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fa991  {
005fa998      int32_t edi;
005fa998      int32_t var_10 = edi;
005fa99b      int32_t i = 0;
005fa99b      
005fa9a0      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fa9aa          arg4 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005fa9aa      
005fa9bd      int32_t esi_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fa9bd      
005fa9c3      if (*(uint32_t*)((char*)this + 0x68) > 0)
005fa9c3      {
005fa9e1          do
005fa9e1          {
005fa9d1              _D3DXFloat32To16Array@12(esi_3, arg4, 2);
005fa9d6              arg4 = &arg4[1];
005fa9da              esi_3 += 4;
005fa9dd              i += 1;
005fa9e1          } while (i < *(uint32_t*)((char*)this + 0x68));
005fa9c3      }
005fa991  }


005fa9ea  void __thiscall D3DXTex::CCodec_A16B16G16R16F::Encode(D3DXTex::CCodec_A16B16G16R16F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fa9ea  {
005fa9f6      if (*(uint32_t*)((char*)this + 0x10) != 0)
005faa00          arg4 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005faa00      
005faa21      _D3DXFloat32To16Array@12((((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20)), arg4, (*(uint32_t*)((char*)this + 0x68) << 2));
005fa9ea  }


005faa2b  void __thiscall D3DXTex::CCodec_R32F::Encode(D3DXTex::CCodec_R32F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005faa2b  {
005faa37      if (*(uint32_t*)((char*)this + 0x10) != 0)
005faa41          arg4 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005faa41      
005faa54      float* eax_5 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005faa57      int32_t i = 0;
005faa57      
005faa5c      if (*(uint32_t*)((char*)this + 0x68) > 0)
005faa5c      {
005faa5e          struct D3DXCOLOR* edx_1 = arg4;
005faa61          int32_t edi;
005faa61          int32_t var_c_2 = edi;
005faa61          
005faa70          do
005faa70          {
005faa64              *(uint32_t*)eax_5 = edx_1->r;
005faa66              eax_5 = &eax_5[1];
005faa69              i += 1;
005faa6a              edx_1 = &edx_1[1];
005faa70          } while (i < *(uint32_t*)((char*)this + 0x68));
005faa5c      }
005faa2b  }


005faa78  void __thiscall D3DXTex::CCodec_G32R32F::Encode(D3DXTex::CCodec_G32R32F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005faa78  {
005faa84      if (*(uint32_t*)((char*)this + 0x10) != 0)
005faa8e          arg4 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005faa8e      
005faaa1      void* eax_5 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005faaa4      int32_t i = 0;
005faaa4      
005faaa9      if (*(uint32_t*)((char*)this + 0x68) > 0)
005faaa9      {
005faaab          struct D3DXCOLOR* ecx_2 = arg4;
005faaae          int32_t edi;
005faaae          int32_t var_c_2 = edi;
005faaae          
005faac3          do
005faac3          {
005faab1              *(uint32_t*)eax_5 = ecx_2->r;
005faab6              *(uint32_t*)((char*)eax_5 + 4) = ecx_2->g;
005faab9              eax_5 += 8;
005faabc              i += 1;
005faabd              ecx_2 = &ecx_2[1];
005faac3          } while (i < *(uint32_t*)((char*)this + 0x68));
005faaa9      }
005faa78  }


005faacb  void __thiscall D3DXTex::CCodec_A32B32G32R32F::Encode(D3DXTex::CCodec_A32B32G32R32F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005faacb  {
005faad8      int32_t edi;
005faad8      int32_t var_10 = edi;
005faad8      
005faad9      if (*(uint32_t*)((char*)this + 0x10) != 0)
005faae3          arg4 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005faae3      
005faafa      int32_t ecx_1 = (*(uint32_t*)((char*)this + 0x68) << 4);
005fab07      int32_t esi_1;
005fab07      int32_t edi_5;
005fab07      edi_5 = __builtin_memcpy((((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20)), arg4, ((ecx_1 >> 2) << 2));
005fab0e      __builtin_memcpy(edi_5, esi_1, (ecx_1 & 3));
005faacb  }


005fab17  void __thiscall D3DXTex::CCodec_D3DX_A16L16::Encode(D3DXTex::CCodec_D3DX_A16L16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fab17  {
005fab27      int32_t edi;
005fab27      int32_t var_60 = edi;
005fab27      
005fab28      if (*(uint32_t*)((char*)this + 0x54) != 0)
005fab28      {
005fab2d          struct D3DXCOLOR* eax_1;
005fab2d          int80_t st0_1;
005fab2d          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005fab32          arg4 = eax_1;
005fab28      }
005fab28      
005fab39      int16_t x87control;
005fab39      
005fab39      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fab39      {
005fab40          struct D3DXCOLOR* eax_2;
005fab40          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005fab45          arg4 = eax_2;
005fab39      }
005fab39      
005fab48      uint32_t eax_3 = arg2;
005fab4d      int32_t edi_1 = *(uint32_t*)((char*)this + 0x68);
005fab50      float var_54 = ((float)((long double)0));
005fab5b      float var_48 = ((float)((long double)0));
005fab61      arg2 = (eax_3 & 1);
005fab80      int32_t* ebx_2 = ((((*(uint32_t*)((char*)this + 0x60) * eax_3) + (((edi_1 - 1) * arg2) << 2)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fab8d      int32_t eax_6 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((eax_3 & 3) << 3)) << 2));
005fab90      int32_t* var_8 = ebx_2;
005fab96      int32_t edi_2;
005fab96      
005fab96      if (arg2 != 0)
005fab96      {
005faba3          edi_2 = (edi_1 - 1);
005faba4          arg3 = 0xffffffff;
005fab96      }
005fab96      else
005fab96      {
005fab98          edi_2 = 0;
005fab9a          arg3 = 1;
005fab96      }
005fab96      
005faba8      int16_t x87status;
005faba8      int16_t temp0;
005faba8      temp0 = __fnstcw_memmem16(x87control);
005faba8      arg2 = temp0;
005fabb6      int16_t x87control_1;
005fabb6      int16_t x87status_1;
005fabb6      x87control_1 = __fldcw_memmem16((arg2 | 0xc00));
005fabbc      int32_t i = 0;
005fabbe      *(uint32_t*)((char*)this + 0x7c) = arg2;
005fabbe      
005fabc4      if (*(uint32_t*)((char*)this + 0x68) > 0)
005fabc4      {
005fabc6          struct D3DXCOLOR* eax_10 = arg4;
005fabc6          
005fabf0          do
005fabf0          {
005fabcc              i += 1;
005fabe8              eax_10->r = ((float)(((((long double)eax_10->b) * ((long double)0.0720999986f)) + (((long double)eax_10->g) * ((long double)0.715399981f))) + (((long double)eax_10->r) * ((long double)0.212500006f))));
005fabea              eax_10 = &eax_10[1];
005fabf0          } while (i < *(uint32_t*)((char*)this + 0x68));
005fabc4      }
005fabc4      
005fabf6      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005fabfd          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005fabfd      
005fac02      arg2 = 0;
005fac02      
005fac0a      if (*(uint32_t*)((char*)this + 0x68) > 0)
005fac0a      {
005fac15          uint32_t eax_12 = (arg3 << 2);
005fac24          uint32_t ecx_8 = (arg3 << 4);
005fac27          int32_t eax_14 = (edi_2 << 4);
005fac2a          int32_t edx_6 = ((arg3 + edi_2) << 4);
005fac33          arg3 = ((edi_2 - arg3) << 4);
005fac33          
005fada9          do
005fada9          {
005fac3f              long double x87_r7_6 = ((long double)*(uint32_t*)(eax_6 + ((arg2 & 3) << 2)));
005fac48              float* ecx_12 = ((char*)arg4 + eax_14);
005fac55              float var_44_1 = ((float)((((long double)var_54) + ((long double)*(uint32_t*)ecx_12)) * ((long double)65535f)));
005fac64              float var_38_1 = ((float)((((long double)var_48) + ((long double)ecx_12[3])) * ((long double)65535f)));
005fac80              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_6))));
005fac90              int32_t ecx_14 = ((int32_t)((long double)((float)(((long double)var_38_1) + ((long double)((float)x87_r7_6))))));
005fac90              
005fac96              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005fac96              {
005fac9c                  long double x87_r7_11 = ((long double)1.52590219e-05f);
005facab                  float* edi_7 = ((arg3 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005facb2                  long double x87_r6_15 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_11);
005facbe                  *(uint32_t*)edi_7 = ((float)((((long double)0.1875f) * x87_r6_15) + ((long double)*(uint32_t*)edi_7)));
005facc9                  float* edi_9 = ((eax_14 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005facd1                  *(uint32_t*)edi_9 = ((float)((((long double)0.3125f) * x87_r6_15) + ((long double)*(uint32_t*)edi_9)));
005facdc                  float* edi_11 = ((edx_6 + *(uint32_t*)((char*)this + 0x5c)) + 0x10);
005face4                  *(uint32_t*)edi_11 = ((float)((((long double)0.0625f) * x87_r6_15) + ((long double)*(uint32_t*)edi_11)));
005face9                  float* edi_13 = ((arg3 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005facf3                  ebx_2 = var_8;
005facf6                  var_54 = ((float)(x87_r6_15 * ((long double)0.4375)));
005facff                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_38_1) - ((long double)ecx_14)));
005fad0b                  *(uint32_t*)edi_13 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edi_13)));
005fad16                  float* edi_15 = ((eax_14 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005fad1e                  *(uint32_t*)edi_15 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edi_15)));
005fad29                  float* edi_17 = ((edx_6 + *(uint32_t*)((char*)this + 0x5c)) + 0x1c);
005fad31                  *(uint32_t*)edi_17 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edi_17)));
005fad39                  var_48 = ((float)(x87_r7_12 * ((long double)0.4375)));
005fac96              }
005fac96              
005fad3c              int32_t edi_18 = var_34_1;
005fad3c              
005fad45              if (edi_18 >= 0xffff)
005fad47                  edi_18 = 0xffff;
005fad47              
005fad4e              if (edi_18 <= 0)
005fad62                  var_34_1 = 0;
005fad4e              else if (var_34_1 >= 0xffff)
005fad59                  var_34_1 = 0xffff;
005fad59              
005fad6c              int32_t edi_19 = ecx_14;
005fad6c              
005fad6e              if (ecx_14 >= 0xffff)
005fad70                  edi_19 = 0xffff;
005fad70              
005fad77              if (edi_19 <= 0)
005fad86                  ecx_14 = 0;
005fad77              else if (ecx_14 >= 0xffff)
005fad82                  ecx_14 = 0xffff;
005fad82              
005fad8e              *(uint32_t*)ebx_2 = ((ecx_14 << 0x10) | var_34_1);
005fad93              ebx_2 += eax_12;
005fad96              arg3 += ecx_8;
005fad99              eax_14 += ecx_8;
005fad9b              edx_6 += ecx_8;
005fad9d              arg2 += 1;
005fada6              var_8 = ebx_2;
005fada9          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005fac0a      }
005fac0a      
005fadb5      int16_t x87control_2;
005fadb5      int16_t x87status_2;
005fadb5      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005fab17  }


005fadbf  void __thiscall D3DXTex::CCodec_D3DX_R16G16B16::Encode(D3DXTex::CCodec_D3DX_R16G16B16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fadbf  {
005fadcf      int32_t edi;
005fadcf      int32_t var_60 = edi;
005fadcf      
005fadd0      if (*(uint32_t*)((char*)this + 0x54) != 0)
005fadd0      {
005fadd5          struct D3DXCOLOR* eax_1;
005fadd5          int80_t st0_1;
005fadd5          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005fadda          arg4 = eax_1;
005fadd0      }
005fadd0      
005fade1      int16_t x87control;
005fade1      
005fade1      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fade1      {
005fade8          struct D3DXCOLOR* eax_2;
005fade8          eax_2 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005faded          arg4 = eax_2;
005fade1      }
005fade1      
005fadf0      uint32_t ecx_1 = arg2;
005fadf5      int32_t ebx = *(uint32_t*)((char*)this + 0x68);
005fadf8      float var_54 = ((float)((long double)0));
005fae06      float var_50 = ((float)((long double)0));
005fae0b      float var_4c = ((float)((long double)0));
005fae0e      arg2 = (ecx_1 & 1);
005fae36      int16_t* edi_3 = ((((*(uint32_t*)((char*)this + 0x60) * ecx_1) + (((ebx - 1) * arg2) * 6)) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fae3d      int32_t eax_9 = (*(uint32_t*)((char*)this + 0x34) + (((arg3 & 3) + ((ecx_1 & 3) << 3)) << 2));
005fae43      uint32_t edx_4;
005fae43      int32_t ebx_1;
005fae43      
005fae43      if (arg2 != 0)
005fae43      {
005fae4f          ebx_1 = (ebx - 1);
005fae50          arg2 = 0xffffffff;
005fae54          edx_4 = 0xffffffff;
005fae43      }
005fae43      else
005fae43      {
005fae47          ebx_1 = 0;
005fae49          edx_4 = 1;
005fae4a          arg2 = 1;
005fae43      }
005fae43      
005fae57      int16_t x87status;
005fae57      int16_t temp0;
005fae57      temp0 = __fnstcw_memmem16(x87control);
005fae57      arg3 = temp0;
005fae65      int16_t x87control_1;
005fae65      int16_t x87status_1;
005fae65      x87control_1 = __fldcw_memmem16((arg3 | 0xc00));
005fae6b      *(uint32_t*)((char*)this + 0x7c) = arg3;
005fae6b      
005fae72      if (*(uint32_t*)((char*)this + 0x5c) != 0)
005fae72      {
005fae79          D3DXTex::CCodec::AddDiffusionError(this, arg4);
005fae7e          edx_4 = arg2;
005fae72      }
005fae72      
005fae81      arg2 = 0;
005fae81      
005fae89      if (*(uint32_t*)((char*)this + 0x68) > 0)
005fae89      {
005fae96          uint32_t ecx_6 = (edx_4 << 4);
005faea9          int32_t eax_16 = (ebx_1 << 4);
005faeac          int32_t ecx_8 = ((edx_4 + ebx_1) << 4);
005faeb6          arg3 = ((ebx_1 - edx_4) << 4);
005faeb9          arg4 = (&arg4->b + eax_16);
005faeb9          
005fb0ac          do
005fb0ac          {
005faec5              long double x87_r7_3 = ((long double)*(uint32_t*)(eax_9 + ((arg2 & 3) << 2)));
005faec8              float* edx_9 = arg4;
005faecb              float var_8_1 = ((float)x87_r7_3);
005faeda              float var_44_1 = ((float)((((long double)var_54) + ((long double)edx_9[-2])) * ((long double)65535f)));
005faee9              float var_40_1 = ((float)((((long double)var_50) + ((long double)edx_9[-1])) * ((long double)65535f)));
005faef7              float var_3c_1 = ((float)((((long double)var_4c) + ((long double)*(uint32_t*)edx_9)) * ((long double)65535f)));
005faf13              int32_t var_34_1 = ((int32_t)((long double)((float)(((long double)var_44_1) + x87_r7_3))));
005faf28              int32_t var_30_1 = ((int32_t)((long double)((float)(((long double)var_40_1) + ((long double)var_8_1)))));
005faf31              int32_t var_1c_1 = ((int32_t)((long double)((float)(((long double)var_3c_1) + ((long double)var_8_1)))));
005faf31              
005faf3e              if (*(uint32_t*)((char*)this + 0x5c) != 0)
005faf3e              {
005faf44                  long double x87_r7_11 = ((long double)1.52590219e-05f);
005faf53                  float* ebx_6 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x10);
005faf5a                  long double x87_r6_14 = ((((long double)var_44_1) - ((long double)var_34_1)) * x87_r7_11);
005faf66                  *(uint32_t*)ebx_6 = ((float)((((long double)0.1875f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_6)));
005faf71                  float* ebx_8 = ((*(uint32_t*)((char*)this + 0x5c) + eax_16) + 0x10);
005faf79                  *(uint32_t*)ebx_8 = ((float)((((long double)0.3125f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_8)));
005faf84                  float* ebx_10 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_8) + 0x10);
005faf8c                  *(uint32_t*)ebx_10 = ((float)((((long double)0.0625f) * x87_r6_14) + ((long double)*(uint32_t*)ebx_10)));
005faf91                  float* ebx_12 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x14);
005faf9b                  var_54 = ((float)(x87_r6_14 * ((long double)0.4375)));
005fafa4                  long double x87_r6_18 = ((((long double)var_40_1) - ((long double)var_30_1)) * x87_r7_11);
005fafb0                  *(uint32_t*)ebx_12 = ((float)((((long double)0.1875f) * x87_r6_18) + ((long double)*(uint32_t*)ebx_12)));
005fafbb                  float* ebx_14 = ((*(uint32_t*)((char*)this + 0x5c) + eax_16) + 0x14);
005fafc3                  *(uint32_t*)ebx_14 = ((float)((((long double)0.3125f) * x87_r6_18) + ((long double)*(uint32_t*)ebx_14)));
005fafce                  float* ebx_16 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_8) + 0x14);
005fafd6                  *(uint32_t*)ebx_16 = ((float)((((long double)0.0625f) * x87_r6_18) + ((long double)*(uint32_t*)ebx_16)));
005fafdb                  float* edx_14 = ((*(uint32_t*)((char*)this + 0x5c) + arg3) + 0x18);
005fafe5                  var_50 = ((float)(x87_r6_18 * ((long double)0.4375)));
005fafee                  long double x87_r7_12 = (x87_r7_11 * (((long double)var_3c_1) - ((long double)var_1c_1)));
005faffa                  *(uint32_t*)edx_14 = ((float)((((long double)0.1875f) * x87_r7_12) + ((long double)*(uint32_t*)edx_14)));
005fb005                  float* edx_16 = ((*(uint32_t*)((char*)this + 0x5c) + eax_16) + 0x18);
005fb00d                  *(uint32_t*)edx_16 = ((float)((((long double)0.3125f) * x87_r7_12) + ((long double)*(uint32_t*)edx_16)));
005fb018                  float* edx_18 = ((*(uint32_t*)((char*)this + 0x5c) + ecx_8) + 0x18);
005fb020                  *(uint32_t*)edx_18 = ((float)((((long double)0.0625f) * x87_r7_12) + ((long double)*(uint32_t*)edx_18)));
005fb028                  var_4c = ((float)(x87_r7_12 * ((long double)0.4375)));
005faf3e              }
005faf3e              
005fb02b              int32_t ebx_18 = var_34_1;
005fb02b              
005fb035              if (ebx_18 >= 0xffff)
005fb037                  ebx_18 = 0xffff;
005fb037              
005fb03b              if (ebx_18 <= 0)
005fb047                  var_34_1 = 0;
005fb03b              else if (var_34_1 >= 0xffff)
005fb042                  var_34_1 = 0xffff;
005fb042              
005fb04b              int32_t ebx_19 = var_30_1;
005fb04b              
005fb050              if (ebx_19 >= 0xffff)
005fb052                  ebx_19 = 0xffff;
005fb052              
005fb056              if (ebx_19 <= 0)
005fb062                  var_30_1 = 0;
005fb056              else if (var_30_1 >= 0xffff)
005fb05d                  var_30_1 = 0xffff;
005fb05d              
005fb066              int32_t ebx_20 = var_1c_1;
005fb066              
005fb06b              if (ebx_20 >= 0xffff)
005fb06d                  ebx_20 = 0xffff;
005fb06d              
005fb071              int32_t ebx_21;
005fb071              
005fb071              if (ebx_20 <= 0)
005fb07e                  ebx_21 = 0;
005fb071              else
005fb071              {
005fb073                  ebx_21 = var_1c_1;
005fb073                  
005fb078                  if (ebx_21 >= 0xffff)
005fb07a                      ebx_21 = 0xffff;
005fb071              }
005fb071              
005fb084              edi_3[1] = var_30_1;
005fb08c              edi_3[2] = var_34_1;
005fb093              arg4 += ecx_6;
005fb096              arg3 += ecx_6;
005fb099              *(uint16_t*)edi_3 = ebx_21;
005fb09c              edi_3 = &edi_3[(edx_4 * 3)];
005fb09f              eax_16 += ecx_6;
005fb0a1              ecx_8 += ecx_6;
005fb0a3              arg2 += 1;
005fb0ac          } while (arg2 < *(uint32_t*)((char*)this + 0x68));
005fae89      }
005fae89      
005fb0b8      int16_t x87control_2;
005fb0b8      int16_t x87status_2;
005fb0b8      x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005fadbf  }


005fb0c2  void __thiscall D3DXTex::CCodec_R8G8B8::Decode(D3DXTex::CCodec_R8G8B8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb0c2  {
005fb0d7      void* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb0dd      void* edx_3 = (*(uint32_t*)((char*)this + 0x74) + eax_3);
005fb0e2      struct D3DXCOLOR* esi = arg4;
005fb0e2      
005fb0e5      if (eax_3 < edx_3)
005fb0e5      {
005fb0e7          long double x87_r7_1 = ((long double)0.00392156886f);
005fb0ed          int32_t edi;
005fb0ed          int32_t var_c_1 = edi;
005fb0ed          
005fb126          do
005fb126          {
005fb0fa              esi->r = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 + 2))) * x87_r7_1));
005fb103              esi = &esi[1];
005fb10b              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 + 1))) * x87_r7_1));
005fb111              arg4 = ((uint32_t)*(uint8_t*)eax_3);
005fb114              eax_3 += 3;
005fb11e              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)arg4) * x87_r7_1));
005fb123              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fb126          } while (eax_3 < edx_3);
005fb0e5      }
005fb0e5      
005fb12f      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb13c          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb13c      
005fb145      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb150          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb0c2  }


005fb15a  void __thiscall D3DXTex::CCodec_A8R8G8B8::Decode(D3DXTex::CCodec_A8R8G8B8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb15a  {
005fb16f      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb175      void* edx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb17b      struct D3DXCOLOR* esi = arg4;
005fb17b      
005fb17e      if (eax_3 < edx_3)
005fb17e      {
005fb180          long double x87_r7_1 = ((long double)0.00392156886f);
005fb186          int32_t edi;
005fb186          int32_t var_c_1 = edi;
005fb186          
005fb1d8          do
005fb1d8          {
005fb193              esi->r = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 + 2))) * x87_r7_1));
005fb1a1              esi->g = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 + 1))) * x87_r7_1));
005fb1a6              uint32_t edi_4 = ((uint32_t)((int8_t)*(uint32_t*)eax_3));
005fb1b1              long double x87_r6_5 = ((long double)edi_4);
005fb1b1              
005fb1b4              if (edi_4 < 0)
005fb1b6                  x87_r6_5 = (x87_r6_5 + ((long double)4.2949673e+09f));
005fb1b6              
005fb1be              eax_3 = &eax_3[1];
005fb1c1              esi = &esi[1];
005fb1c6              *(uint32_t*)((char*)esi - 8) = ((float)(x87_r6_5 * x87_r7_1));
005fb1d5              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 - 1))) * x87_r7_1));
005fb1d8          } while (eax_3 < edx_3);
005fb17e      }
005fb17e      
005fb1e1      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb1ee          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb1ee      
005fb1f7      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb202          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb15a  }


005fb20c  void __thiscall D3DXTex::CCodec_X8R8G8B8::Decode(D3DXTex::CCodec_X8R8G8B8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb20c  {
005fb221      void* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb227      void* edx_3 = ((char*)eax_3 + (*(uint32_t*)((char*)this + 0x68) << 2));
005fb22d      struct D3DXCOLOR* esi = arg4;
005fb22d      
005fb230      if (eax_3 < edx_3)
005fb230      {
005fb232          long double x87_r7_1 = ((long double)0.00392156886f);
005fb238          int32_t edi;
005fb238          int32_t var_c_1 = edi;
005fb238          
005fb280          do
005fb280          {
005fb245              esi->r = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 + 2))) * x87_r7_1));
005fb253              esi->g = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 + 1))) * x87_r7_1));
005fb258              uint32_t edi_4 = ((uint32_t)((int8_t)*(uint32_t*)eax_3));
005fb263              long double x87_r6_5 = ((long double)edi_4);
005fb263              
005fb266              if (edi_4 < 0)
005fb268                  x87_r6_5 = (x87_r6_5 + ((long double)4.2949673e+09f));
005fb268              
005fb270              eax_3 += 4;
005fb273              esi = &esi[1];
005fb278              *(uint32_t*)((char*)esi - 8) = ((float)(x87_r6_5 * x87_r7_1));
005fb27d              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fb280          } while (eax_3 < edx_3);
005fb230      }
005fb230      
005fb289      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb296          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb296      
005fb29f      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb2aa          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb20c  }


005fb2b4  void __thiscall D3DXTex::CCodec_R5G6B5::Decode(D3DXTex::CCodec_R5G6B5* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb2b4  {
005fb2c9      int16_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb2d0      struct D3DXCOLOR* esi = arg4;
005fb2d3      int32_t edi;
005fb2d3      int32_t var_c = edi;
005fb2d4      void* edi_1 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb2d4      
005fb2d9      if (eax_3 < edi_1)
005fb2d9      {
005fb2db          long double x87_r7_1 = ((long double)0.0322580636f);
005fb2db          
005fb32d          do
005fb32d          {
005fb2e1              struct D3DXCOLOR* edx_2;
005fb2e1              edx_2 = *(uint16_t*)eax_3;
005fb2e4              edx_2 u>>= 0xb;
005fb2f5              esi->r = ((float)(((long double)((uint32_t)edx_2)) * x87_r7_1));
005fb2f7              int32_t edx_4;
005fb2f7              edx_4 = *(uint16_t*)eax_3;
005fb2fa              esi = &esi[1];
005fb311              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((edx_4 >> 5) & 0x3f)) * ((long double)0.0158730168f)));
005fb314              int32_t edx_7;
005fb314              edx_7 = *(uint8_t*)eax_3;
005fb320              eax_3 = &eax_3[1];
005fb325              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)(edx_7 & 0x1f)) * x87_r7_1));
005fb32a              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fb32d          } while (eax_3 < edi_1);
005fb2d9      }
005fb2d9      
005fb335      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb342          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb342      
005fb34b      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb356          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb2b4  }


005fb361  void __thiscall D3DXTex::CCodec_X1R5G5B5::Decode(D3DXTex::CCodec_X1R5G5B5* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb361  {
005fb376      int16_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb37d      struct D3DXCOLOR* esi = arg4;
005fb380      int32_t edi;
005fb380      int32_t var_c = edi;
005fb381      void* edi_1 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb381      
005fb386      if (eax_3 < edi_1)
005fb386      {
005fb388          long double x87_r7_1 = ((long double)0.0322580636f);
005fb388          
005fb3d7          do
005fb3d7          {
005fb390              int32_t edx_3;
005fb390              edx_3 = *(uint16_t*)eax_3;
005fb3a3              esi->r = ((float)(((long double)((edx_3 >> 0xa) & 0x1f)) * x87_r7_1));
005fb3a5              int32_t edx_6;
005fb3a5              edx_6 = *(uint16_t*)eax_3;
005fb3a8              esi = &esi[1];
005fb3bb              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((edx_6 >> 5) & 0x1f)) * x87_r7_1));
005fb3be              int32_t edx_9;
005fb3be              edx_9 = *(uint8_t*)eax_3;
005fb3ca              eax_3 = &eax_3[1];
005fb3cf              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)(edx_9 & 0x1f)) * x87_r7_1));
005fb3d4              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fb3d7          } while (eax_3 < edi_1);
005fb386      }
005fb386      
005fb3df      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb3ec          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb3ec      
005fb3f5      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb400          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb361  }


005fb40b  void __thiscall D3DXTex::CCodec_A1R5G5B5::Decode(D3DXTex::CCodec_A1R5G5B5* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb40b  {
005fb420      int16_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb427      struct D3DXCOLOR* esi = arg4;
005fb42a      int32_t edi;
005fb42a      int32_t var_c = edi;
005fb42b      void* edi_1 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb42b      
005fb430      if (eax_3 < edi_1)
005fb430      {
005fb432          long double x87_r7_1 = ((long double)0.0322580636f);
005fb432          
005fb48f          do
005fb48f          {
005fb43a              int32_t edx_3;
005fb43a              edx_3 = *(uint16_t*)eax_3;
005fb44d              esi->r = ((float)(((long double)((edx_3 >> 0xa) & 0x1f)) * x87_r7_1));
005fb44f              int32_t edx_6;
005fb44f              edx_6 = *(uint16_t*)eax_3;
005fb452              esi = &esi[1];
005fb465              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((edx_6 >> 5) & 0x1f)) * x87_r7_1));
005fb468              int32_t edx_9;
005fb468              edx_9 = *(uint8_t*)eax_3;
005fb475              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)(edx_9 & 0x1f)) * x87_r7_1));
005fb478              struct D3DXCOLOR* edx_10;
005fb478              edx_10 = *(uint16_t*)eax_3;
005fb47b              edx_10 u>>= 0xf;
005fb486              eax_3 = &eax_3[1];
005fb48c              *(uint32_t*)((char*)esi - 4) = ((float)((long double)((uint32_t)edx_10)));
005fb48f          } while (eax_3 < edi_1);
005fb430      }
005fb430      
005fb497      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb4a4          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb4a4      
005fb4ad      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb4b8          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb40b  }


005fb4c3  void __thiscall D3DXTex::CCodec_A4R4G4B4::Decode(D3DXTex::CCodec_A4R4G4B4* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb4c3  {
005fb4d8      void* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb4df      struct D3DXCOLOR* esi = arg4;
005fb4e2      int32_t edi;
005fb4e2      int32_t var_c = edi;
005fb4e3      void* edi_1 = ((char*)eax_3 + (*(uint32_t*)((char*)this + 0x68) << 1));
005fb4e3      
005fb4e8      if (eax_3 < edi_1)
005fb4e8      {
005fb4ea          long double x87_r7_1 = ((long double)0.0666666701f);
005fb4ea          
005fb546          do
005fb546          {
005fb4f0              uint32_t edx_2;
005fb4f0              edx_2 = *(uint8_t*)((char*)eax_3 + 1);
005fb4f3              edx_2 &= 0xf;
005fb503              esi->r = ((float)(((long double)((uint32_t)edx_2)) * x87_r7_1));
005fb505              int32_t edx_4;
005fb505              edx_4 = *(uint8_t*)eax_3;
005fb507              edx_4 u>>= 4;
005fb50a              esi = &esi[1];
005fb51a              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)(edx_4 & 0xf)) * x87_r7_1));
005fb51d              int32_t edx_6;
005fb51d              edx_6 = *(uint8_t*)eax_3;
005fb52a              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)(edx_6 & 0xf)) * x87_r7_1));
005fb52d              struct D3DXCOLOR* edx_7;
005fb52d              edx_7 = *(uint16_t*)eax_3;
005fb530              edx_7 u>>= 0xc;
005fb53b              eax_3 += 2;
005fb543              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)edx_7)) * x87_r7_1));
005fb546          } while (eax_3 < edi_1);
005fb4e8      }
005fb4e8      
005fb54e      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb55b          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb55b      
005fb564      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb56f          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb4c3  }


005fb57a  void __thiscall D3DXTex::CCodec_A2B10G10R10::Decode(D3DXTex::CCodec_A2B10G10R10* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb57a  {
005fb58f      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb596      struct D3DXCOLOR* esi = arg4;
005fb599      int32_t edi;
005fb599      int32_t var_c = edi;
005fb59a      void* edi_1 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb59a      
005fb59f      if (eax_3 < edi_1)
005fb59f      {
005fb5a5          long double x87_r7_1 = ((long double)0.000977517106f);
005fb5a5          
005fb627          do
005fb627          {
005fb5b3              struct D3DXCOLOR* ebx_2 = (*(uint32_t*)eax_3 & 0x3ff);
005fb5ba              long double x87_r6_1 = ((long double)ebx_2);
005fb5ba              
005fb5bd              if (ebx_2 < 0)
005fb5bf                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005fb5bf              
005fb5c7              esi->r = ((float)(x87_r6_1 * x87_r7_1));
005fb5ce              struct D3DXCOLOR* ebx_5 = ((*(uint32_t*)eax_3 >> 0xa) & 0x3ff);
005fb5d5              long double x87_r6_3 = ((long double)ebx_5);
005fb5d5              
005fb5d8              if (ebx_5 < 0)
005fb5da                  x87_r6_3 = (x87_r6_3 + ((long double)4.2949673e+09f));
005fb5da              
005fb5e2              esi->g = ((float)(x87_r6_3 * x87_r7_1));
005fb5ea              struct D3DXCOLOR* ebx_8 = ((*(uint32_t*)eax_3 >> 0x14) & 0x3ff);
005fb5f1              long double x87_r6_5 = ((long double)ebx_8);
005fb5f1              
005fb5f4              if (ebx_8 < 0)
005fb5f6                  x87_r6_5 = (x87_r6_5 + ((long double)4.2949673e+09f));
005fb5f6              
005fb5fe              esi->b = ((float)(x87_r6_5 * x87_r7_1));
005fb603              uint32_t ebx_10 = (*(uint32_t*)eax_3 >> 0x1e);
005fb60b              long double x87_r6_7 = ((long double)ebx_10);
005fb60b              
005fb60e              if (ebx_10 < 0)
005fb610                  x87_r6_7 = (x87_r6_7 + ((long double)4.2949673e+09f));
005fb610              
005fb61c              eax_3 = &eax_3[1];
005fb61f              esi = &esi[1];
005fb624              *(uint32_t*)((char*)esi - 4) = ((float)(x87_r6_7 * ((long double)0.333333343f)));
005fb627          } while (eax_3 < edi_1);
005fb59f      }
005fb59f      
005fb630      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb63d          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb63d      
005fb646      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb651          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb57a  }


005fb65c  void __thiscall D3DXTex::CCodec_A8B8G8R8::Decode(D3DXTex::CCodec_A8B8G8R8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb65c  {
005fb671      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb677      void* edx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb67d      struct D3DXCOLOR* esi = arg4;
005fb67d      
005fb680      if (eax_3 < edx_3)
005fb680      {
005fb682          long double x87_r7_1 = ((long double)0.00392156886f);
005fb688          int32_t edi;
005fb688          int32_t var_c_1 = edi;
005fb688          
005fb6da          do
005fb6da          {
005fb68b              uint32_t edi_2 = ((uint32_t)((int8_t)*(uint32_t*)eax_3));
005fb696              long double x87_r6_1 = ((long double)edi_2);
005fb696              
005fb699              if (edi_2 < 0)
005fb69b                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005fb69b              
005fb6a3              eax_3 = &eax_3[1];
005fb6a6              esi->r = ((float)(x87_r6_1 * x87_r7_1));
005fb6af              esi = &esi[1];
005fb6b9              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 - 3))) * x87_r7_1));
005fb6c8              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 - 2))) * x87_r7_1));
005fb6d7              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 - 1))) * x87_r7_1));
005fb6da          } while (eax_3 < edx_3);
005fb680      }
005fb680      
005fb6e3      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb6f0          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb6f0      
005fb6f9      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb704          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb65c  }


005fb70e  void __thiscall D3DXTex::CCodec_X8B8G8R8::Decode(D3DXTex::CCodec_X8B8G8R8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb70e  {
005fb723      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb729      void* edx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb72f      struct D3DXCOLOR* esi = arg4;
005fb72f      
005fb732      if (eax_3 < edx_3)
005fb732      {
005fb734          long double x87_r7_1 = ((long double)0.00392156886f);
005fb73a          int32_t edi;
005fb73a          int32_t var_c_1 = edi;
005fb73a          
005fb782          do
005fb782          {
005fb73d              uint32_t edi_2 = ((uint32_t)((int8_t)*(uint32_t*)eax_3));
005fb748              long double x87_r6_1 = ((long double)edi_2);
005fb748              
005fb74b              if (edi_2 < 0)
005fb74d                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005fb74d              
005fb755              eax_3 = &eax_3[1];
005fb758              esi->r = ((float)(x87_r6_1 * x87_r7_1));
005fb761              esi = &esi[1];
005fb76b              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 - 3))) * x87_r7_1));
005fb77a              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)((uint32_t)*(uint8_t*)((char*)eax_3 - 2))) * x87_r7_1));
005fb77f              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fb782          } while (eax_3 < edx_3);
005fb732      }
005fb732      
005fb78b      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb798          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb798      
005fb7a1      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb7ac          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb70e  }


005fb7b6  void __thiscall D3DXTex::CCodec_G16R16::Decode(D3DXTex::CCodec_G16R16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb7b6  {
005fb7cb      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb7d1      void* edx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb7d7      struct D3DXCOLOR* esi = arg4;
005fb7d7      
005fb7da      if (eax_3 < edx_3)
005fb7da      {
005fb7dc          long double x87_r7_1 = ((long double)1.52590219e-05f);
005fb7e2          int32_t edi;
005fb7e2          int32_t var_c_1 = edi;
005fb7e2          
005fb820          do
005fb820          {
005fb7e5              uint32_t edi_2 = ((uint32_t)((int16_t)*(uint32_t*)eax_3));
005fb7f0              long double x87_r6_1 = ((long double)edi_2);
005fb7f0              
005fb7f3              if (edi_2 < 0)
005fb7f5                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005fb7f5              
005fb7fd              eax_3 = &eax_3[1];
005fb800              esi->r = ((float)(x87_r6_1 * x87_r7_1));
005fb809              esi = &esi[1];
005fb813              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((uint32_t)*(uint16_t*)((char*)eax_3 - 2))) * x87_r7_1));
005fb818              *(uint32_t*)((char*)esi - 8) = ((float)((long double)1));
005fb81d              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fb820          } while (eax_3 < edx_3);
005fb7da      }
005fb7da      
005fb829      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb836          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb836      
005fb83f      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb84a          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb7b6  }


005fb854  void __thiscall D3DXTex::CCodec_A2R10G10B10::Decode(D3DXTex::CCodec_A2R10G10B10* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb854  {
005fb869      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb870      struct D3DXCOLOR* esi = arg4;
005fb873      int32_t edi;
005fb873      int32_t var_c = edi;
005fb874      void* edi_1 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fb874      
005fb879      if (eax_3 < edi_1)
005fb879      {
005fb87f          long double x87_r7_1 = ((long double)0.000977517106f);
005fb87f          
005fb901          do
005fb901          {
005fb890              struct D3DXCOLOR* ebx_3 = ((*(uint32_t*)eax_3 >> 0x14) & 0x3ff);
005fb897              long double x87_r6_1 = ((long double)ebx_3);
005fb897              
005fb89a              if (ebx_3 < 0)
005fb89c                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005fb89c              
005fb8a4              esi->r = ((float)(x87_r6_1 * x87_r7_1));
005fb8ab              struct D3DXCOLOR* ebx_6 = ((*(uint32_t*)eax_3 >> 0xa) & 0x3ff);
005fb8b2              long double x87_r6_3 = ((long double)ebx_6);
005fb8b2              
005fb8b5              if (ebx_6 < 0)
005fb8b7                  x87_r6_3 = (x87_r6_3 + ((long double)4.2949673e+09f));
005fb8b7              
005fb8bf              esi->g = ((float)(x87_r6_3 * x87_r7_1));
005fb8c4              struct D3DXCOLOR* ebx_8 = (*(uint32_t*)eax_3 & 0x3ff);
005fb8cb              long double x87_r6_5 = ((long double)ebx_8);
005fb8cb              
005fb8ce              if (ebx_8 < 0)
005fb8d0                  x87_r6_5 = (x87_r6_5 + ((long double)4.2949673e+09f));
005fb8d0              
005fb8d8              esi->b = ((float)(x87_r6_5 * x87_r7_1));
005fb8dd              uint32_t ebx_10 = (*(uint32_t*)eax_3 >> 0x1e);
005fb8e5              long double x87_r6_7 = ((long double)ebx_10);
005fb8e5              
005fb8e8              if (ebx_10 < 0)
005fb8ea                  x87_r6_7 = (x87_r6_7 + ((long double)4.2949673e+09f));
005fb8ea              
005fb8f6              eax_3 = &eax_3[1];
005fb8f9              esi = &esi[1];
005fb8fe              *(uint32_t*)((char*)esi - 4) = ((float)(x87_r6_7 * ((long double)0.333333343f)));
005fb901          } while (eax_3 < edi_1);
005fb879      }
005fb879      
005fb90a      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fb917          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb917      
005fb920      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fb92b          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb854  }


005fb936  void __thiscall D3DXTex::CCodec_A16B16G16R16::Decode(D3DXTex::CCodec_A16B16G16R16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fb936  {
005fb94f      int32_t* esi_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fb955      uint32_t eax_3 = &esi_3[(*(uint32_t*)((char*)this + 0x68) * 2)];
005fb95a      int32_t edi;
005fb95a      int32_t var_10 = edi;
005fb95b      struct D3DXCOLOR* edi_1 = arg4;
005fb95b      
005fb961      if (esi_3 < eax_3)
005fb961      {
005fb967          long double x87_r7_1 = ((long double)1.52590219e-05f);
005fb967          
005fb9f3          do
005fb9f3          {
005fb974              uint32_t ecx_1 = ((uint32_t)((int16_t)*(uint32_t*)esi_3));
005fb97b              long double x87_r6_1 = ((long double)ecx_1);
005fb97b              
005fb97e              if (ecx_1 < 0)
005fb980                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005fb980              
005fb988              edi_1->r = ((float)(x87_r6_1 * x87_r7_1));
005fb993              uint32_t ecx_4 = ((uint32_t)(((int16_t)(*(uint32_t*)esi_3 >> 0x10)) | ((int16_t)(esi_3[1] << 0x10))));
005fb99d              long double x87_r6_3 = ((long double)ecx_4);
005fb99d              
005fb9a0              if (ecx_4 < 0)
005fb9a2                  x87_r6_3 = (x87_r6_3 + ((long double)4.2949673e+09f));
005fb9a2              
005fb9aa              ecx_4 = 0x20;
005fb9ac              edi_1->g = ((float)(x87_r6_3 * x87_r7_1));
005fb9af              *(uint32_t*)esi_3;
005fb9b1              esi_3[1];
005fb9bb              x87_r7_1 = ((long double)1.52590219e-05f);
005fb9c1              uint32_t eax_6 = ((uint32_t)_aullshr());
005fb9cb              long double x87_r6_5 = ((long double)eax_6);
005fb9cb              
005fb9ce              if (eax_6 < 0)
005fb9d0                  x87_r6_5 = (x87_r6_5 + ((long double)4.2949673e+09f));
005fb9d0              
005fb9d8              esi_3 = &esi_3[2];
005fb9db              edi_1 = &edi_1[1];
005fb9e1              *(uint32_t*)((char*)edi_1 - 8) = ((float)(x87_r6_5 * x87_r7_1));
005fb9f0              *(uint32_t*)((char*)edi_1 - 4) = ((float)(((long double)((uint32_t)*(uint16_t*)((char*)esi_3 - 2))) * x87_r7_1));
005fb9f3          } while (esi_3 < eax_3);
005fb961      }
005fb961      
005fb9ff      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fba0e          D3DXTex::CCodec::ColorKey(this, ((char*)edi_1 - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fba0e      
005fba17      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fba24          D3DXTex::CCodec::DecodeGamma22(this, ((char*)edi_1 - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fb936  }


005fba30  void __thiscall D3DXTex::CCodec_R3G3B2::Decode(D3DXTex::CCodec_R3G3B2* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fba30  {
005fba44      struct D3DXCOLOR* esi = arg4;
005fba49      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fba4c      int32_t edi;
005fba4c      int32_t var_c = edi;
005fba50      void* edi_2 = (*(uint32_t*)((char*)this + 0x68) + eax_3);
005fba50      
005fba54      if (eax_3 < edi_2)
005fba54      {
005fba56          long double x87_r7_1 = ((long double)0.142857149f);
005fba56          
005fbaa6          do
005fbaa6          {
005fba5c              uint32_t edx_1;
005fba5c              edx_1 = *(uint8_t*)eax_3;
005fba5e              edx_1 u>>= 5;
005fba6c              esi->r = ((float)(((long double)((uint32_t)edx_1)) * x87_r7_1));
005fba6e              uint32_t edx_2;
005fba6e              edx_2 = *(uint8_t*)eax_3;
005fba70              edx_2 u>>= 2;
005fba73              edx_2 &= 7;
005fba7c              esi = &esi[1];
005fba84              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((uint32_t)edx_2)) * x87_r7_1));
005fba87              uint32_t edx_3;
005fba87              edx_3 = *(uint8_t*)eax_3;
005fba89              edx_3 &= 3;
005fba92              eax_3 = &eax_3[1];
005fba9e              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)((uint32_t)edx_3)) * ((long double)0.333333343f)));
005fbaa3              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fbaa6          } while (eax_3 < edi_2);
005fba54      }
005fba54      
005fbaae      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbabb          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbabb      
005fbac4      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbacf          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fba30  }


005fbada  void __thiscall D3DXTex::CCodec_A8::Decode(D3DXTex::CCodec_A8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbada  {
005fbaef      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbaf5      void* edx_3 = (*(uint32_t*)((char*)this + 0x68) + eax_3);
005fbafa      struct D3DXCOLOR* esi = arg4;
005fbafa      
005fbafd      if (eax_3 < edx_3)
005fbafd      {
005fbaff          int32_t edi;
005fbaff          int32_t var_c_1 = edi;
005fbaff          
005fbb26          do
005fbb26          {
005fbb02              esi->r = ((float)((long double)0));
005fbb06              esi = &esi[1];
005fbb09              *(uint32_t*)((char*)esi - 0xc) = ((float)((long double)0));
005fbb0e              *(uint32_t*)((char*)esi - 8) = ((float)((long double)0));
005fbb14              arg4 = ((uint32_t)*(uint8_t*)eax_3);
005fbb17              eax_3 = &eax_3[1];
005fbb23              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)arg4) * ((long double)0.00392156886f)));
005fbb26          } while (eax_3 < edx_3);
005fbafd      }
005fbafd      
005fbb2d      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbb3a          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbb3a      
005fbb43      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbb4e          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbada  }


005fbb58  void __thiscall D3DXTex::CCodec_A8R3G3B2::Decode(D3DXTex::CCodec_A8R3G3B2* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbb58  {
005fbb6d      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbb74      struct D3DXCOLOR* esi = arg4;
005fbb77      int32_t edi;
005fbb77      int32_t var_c = edi;
005fbb78      void* edi_1 = &eax_3[(*(uint32_t*)((char*)this + 0x68) << 1)];
005fbb78      
005fbb7d      if (eax_3 < edi_1)
005fbb7d      {
005fbb7f          long double x87_r7_1 = ((long double)0.142857149f);
005fbb7f          
005fbbde          do
005fbbde          {
005fbb87              int32_t edx_3;
005fbb87              edx_3 = *(uint8_t*)eax_3;
005fbb89              edx_3 u>>= 5;
005fbb99              esi->r = ((float)(((long double)(edx_3 & 7)) * x87_r7_1));
005fbb9b              int32_t edx_5;
005fbb9b              edx_5 = *(uint8_t*)eax_3;
005fbb9d              edx_5 u>>= 2;
005fbba0              esi = &esi[1];
005fbbb0              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)(edx_5 & 7)) * x87_r7_1));
005fbbb3              int32_t edx_7;
005fbbb3              edx_7 = *(uint8_t*)eax_3;
005fbbbf              eax_3 = &eax_3[2];
005fbbc8              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)(edx_7 & 3)) * ((long double)0.333333343f)));
005fbbdb              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)eax_3[0xffffffff])) * ((long double)0.00392156886f)));
005fbbde          } while (eax_3 < edi_1);
005fbb7d      }
005fbb7d      
005fbbe6      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbbf3          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbbf3      
005fbbfc      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbc07          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbb58  }


005fbc12  void __thiscall D3DXTex::CCodec_X4R4G4B4::Decode(D3DXTex::CCodec_X4R4G4B4* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbc12  {
005fbc27      void* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbc2e      struct D3DXCOLOR* esi = arg4;
005fbc31      int32_t edi;
005fbc31      int32_t var_c = edi;
005fbc32      void* edi_1 = ((char*)eax_3 + (*(uint32_t*)((char*)this + 0x68) << 1));
005fbc32      
005fbc37      if (eax_3 < edi_1)
005fbc37      {
005fbc39          long double x87_r7_1 = ((long double)0.0666666701f);
005fbc39          
005fbc85          do
005fbc85          {
005fbc3f              struct D3DXCOLOR* edx_2;
005fbc3f              edx_2 = *(uint8_t*)((char*)eax_3 + 1);
005fbc42              edx_2 &= 0xf;
005fbc52              esi->r = ((float)(((long double)((uint32_t)edx_2)) * x87_r7_1));
005fbc54              int32_t edx_4;
005fbc54              edx_4 = *(uint8_t*)eax_3;
005fbc56              edx_4 u>>= 4;
005fbc59              esi = &esi[1];
005fbc69              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)(edx_4 & 0xf)) * x87_r7_1));
005fbc6c              int32_t edx_6;
005fbc6c              edx_6 = *(uint8_t*)eax_3;
005fbc78              eax_3 += 2;
005fbc7d              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)(edx_6 & 0xf)) * x87_r7_1));
005fbc82              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fbc85          } while (eax_3 < edi_1);
005fbc37      }
005fbc37      
005fbc8d      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbc9a          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbc9a      
005fbca3      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbcae          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbc12  }


005fbcb9  void __thiscall D3DXTex::CCodec_A8P8::Decode(D3DXTex::CCodec_A8P8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbcb9  {
005fbcce      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbcd4      uint32_t edx_3 = &eax_3[(*(uint32_t*)((char*)this + 0x68) << 1)];
005fbcda      struct D3DXCOLOR* ebx = arg4;
005fbcda      
005fbce0      if (eax_3 < edx_3)
005fbce0      {
005fbce3          int32_t edi;
005fbce3          int32_t var_10_1 = edi;
005fbce3          
005fbd16          do
005fbd16          {
005fbce8              struct D3DXCOLOR* edi_1 = ebx;
005fbcea              ebx = &ebx[1];
005fbcf6              struct D3DXCOLOR* edx_7 = ((((uint32_t)*(uint8_t*)eax_3) << 4) + *(uint32_t*)((char*)this + 0x38));
005fbcfc              edi_1->r = edx_7->r;
005fbcfc              float* edi_2 = &edi_1->g;
005fbcfc              float* esi_2 = &edx_7->g;
005fbd18              ADJ(edi_2)->g = ADJ(esi_2)->g;
005fbcfd              float* edi_3 = &edi_2[1];
005fbcfd              float* esi_3 = &esi_2[1];
005fbd18              ADJ(edi_3)->b = ADJ(esi_3)->b;
005fbcfe              edi_3[1] = (&esi_3[1] - 0xc)->a;
005fbd03              arg4 = ((uint32_t)eax_3[1]);
005fbd06              eax_3 = &eax_3[2];
005fbd13              *(uint32_t*)((char*)ebx - 4) = ((float)(((long double)arg4) * ((long double)0.00392156886f)));
005fbd16          } while (eax_3 < edx_3);
005fbce0      }
005fbce0      
005fbd1e      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbd2b          D3DXTex::CCodec::ColorKey(this, ((char*)ebx - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbd2b      
005fbd34      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbd3f          D3DXTex::CCodec::DecodeGamma22(this, ((char*)ebx - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbcb9  }


005fbd49  void __thiscall D3DXTex::CCodec_P8::Decode(D3DXTex::CCodec_P8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbd49  {
005fbd5e      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbd64      void* edx_3 = (*(uint32_t*)((char*)this + 0x68) + eax_3);
005fbd69      struct D3DXCOLOR* ebx = arg4;
005fbd69      
005fbd6c      if (eax_3 < edx_3)
005fbd6c      {
005fbd6f          int32_t edi;
005fbd6f          int32_t var_10_1 = edi;
005fbd6f          
005fbd85          do
005fbd85          {
005fbd76              struct D3DXCOLOR* esi_3 = ((((uint32_t)*(uint8_t*)eax_3) << 4) + *(uint32_t*)((char*)this + 0x38));
005fbd7b              ebx->r = esi_3->r;
005fbd7b              float* edi_2 = &ebx->g;
005fbd7b              float* esi_4 = &esi_3->g;
005fbd87              ADJ(edi_2)->g = ADJ(esi_4)->g;
005fbd7c              float* edi_3 = &edi_2[1];
005fbd7c              float* esi_5 = &esi_4[1];
005fbd87              ADJ(edi_3)->b = ADJ(esi_5)->b;
005fbd7e              eax_3 = &eax_3[1];
005fbd7f              ebx = &ebx[1];
005fbd7d              edi_3[1] = (&esi_5[1] - 0xc)->a;
005fbd85          } while (eax_3 < edx_3);
005fbd6c      }
005fbd6c      
005fbd8d      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbd9a          D3DXTex::CCodec::ColorKey(this, ((char*)ebx - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbd9a      
005fbda3      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbdae          D3DXTex::CCodec::DecodeGamma22(this, ((char*)ebx - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbd49  }


005fbdb8  void __thiscall D3DXTex::CCodec_L8::Decode(D3DXTex::CCodec_L8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbdb8  {
005fbdcd      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbdd3      void* edx_3 = (*(uint32_t*)((char*)this + 0x68) + eax_3);
005fbdd8      struct D3DXCOLOR* esi = arg4;
005fbdd8      
005fbddb      if (eax_3 < edx_3)
005fbddb      {
005fbddd          int32_t edi;
005fbddd          int32_t var_c_1 = edi;
005fbddd          
005fbe00          do
005fbe00          {
005fbde1              arg4 = ((uint32_t)*(uint8_t*)eax_3);
005fbde4              eax_3 = &eax_3[1];
005fbde8              long double x87_r7_2 = (((long double)arg4) * ((long double)0.00392156886f));
005fbdee              esi->b = ((float)x87_r7_2);
005fbdf1              esi->g = ((float)x87_r7_2);
005fbdf4              esi->r = ((float)x87_r7_2);
005fbdf6              esi = &esi[1];
005fbdfd              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fbe00          } while (eax_3 < edx_3);
005fbddb      }
005fbddb      
005fbe07      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbe14          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbe14      
005fbe1d      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbe28          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbdb8  }


005fbe32  void __thiscall D3DXTex::CCodec_A8L8::Decode(D3DXTex::CCodec_A8L8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbe32  {
005fbe47      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbe4e      struct D3DXCOLOR* esi = arg4;
005fbe51      int32_t edi;
005fbe51      int32_t var_c = edi;
005fbe52      void* edi_1 = &eax_3[(*(uint32_t*)((char*)this + 0x68) << 1)];
005fbe52      
005fbe57      if (eax_3 < edi_1)
005fbe57      {
005fbe59          long double x87_r7_1 = ((long double)0.00392156886f);
005fbe59          
005fbe8f          do
005fbe8f          {
005fbe6c              long double x87_r6_1 = ((long double)((uint32_t)*(uint8_t*)eax_3));
005fbe70              eax_3 = &eax_3[2];
005fbe71              long double x87_r6_2 = (x87_r6_1 * x87_r7_1);
005fbe73              esi->b = ((float)x87_r6_2);
005fbe76              esi->g = ((float)x87_r6_2);
005fbe79              esi->r = ((float)x87_r6_2);
005fbe82              esi = &esi[1];
005fbe8c              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)eax_3[0xffffffff])) * x87_r7_1));
005fbe8f          } while (eax_3 < edi_1);
005fbe57      }
005fbe57      
005fbe97      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbea4          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbea4      
005fbead      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbeb8          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbe32  }


005fbec3  void __thiscall D3DXTex::CCodec_A4L4::Decode(D3DXTex::CCodec_A4L4* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbec3  {
005fbed7      struct D3DXCOLOR* esi = arg4;
005fbedc      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbedf      int32_t edi;
005fbedf      int32_t var_c = edi;
005fbee3      void* edi_2 = (*(uint32_t*)((char*)this + 0x68) + eax_3);
005fbee3      
005fbee7      if (eax_3 < edi_2)
005fbee7      {
005fbee9          long double x87_r7_1 = ((long double)0.0666666701f);
005fbee9          
005fbf20          do
005fbf20          {
005fbeef              uint32_t edx_1;
005fbeef              edx_1 = *(uint8_t*)eax_3;
005fbef1              edx_1 &= 0xf;
005fbefd              long double x87_r6_2 = (((long double)((uint32_t)edx_1)) * x87_r7_1);
005fbeff              esi->b = ((float)x87_r6_2);
005fbf02              esi->g = ((float)x87_r6_2);
005fbf05              esi->r = ((float)x87_r6_2);
005fbf07              uint32_t edx_2;
005fbf07              edx_2 = *(uint8_t*)eax_3;
005fbf09              edx_2 u>>= 4;
005fbf12              eax_3 = &eax_3[1];
005fbf13              esi = &esi[1];
005fbf1d              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)edx_2)) * x87_r7_1));
005fbf20          } while (eax_3 < edi_2);
005fbee7      }
005fbee7      
005fbf28      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbf35          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbf35      
005fbf3e      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbf49          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbec3  }


005fbf54  void __thiscall D3DXTex::CCodec_V8U8::Decode(D3DXTex::CCodec_V8U8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fbf54  {
005fbf5a      struct D3DXCOLOR* esi = arg4;
005fbf5d      int32_t edi;
005fbf5d      int32_t var_c = edi;
005fbf70      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fbf76      uint32_t ecx_3 = &eax_3[(*(uint32_t*)((char*)this + 0x68) << 1)];
005fbf7b      arg2 = ecx_3;
005fbf7b      
005fbf7e      if (eax_3 < ecx_3)
005fbf7e      {
005fbf80          long double x87_r7_1 = ((long double)0.00787401572f);
005fbf86          int32_t ebx;
005fbf86          int32_t var_10_1 = ebx;
005fbf86          
005fbfc9          do
005fbfc9          {
005fbf87              ecx_3 = *(uint8_t*)eax_3;
005fbf89              char edx = eax_3[1];
005fbf8f              ebx = ecx_3 == 0x80;
005fbf92              ebx += ecx_3;
005fbf9d              int32_t ecx_4;
005fbf9d              ecx_4 = edx == 0x80;
005fbfa3              ecx_4 += edx;
005fbfae              esi->r = ((float)(((long double)((int32_t)ebx)) * x87_r7_1));
005fbfb0              eax_3 = &eax_3[2];
005fbfb4              esi = &esi[1];
005fbfbc              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((int32_t)ecx_4)) * x87_r7_1));
005fbfc1              *(uint32_t*)((char*)esi - 8) = ((float)((long double)1));
005fbfc6              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fbfc9          } while (eax_3 < arg2);
005fbf7e      }
005fbf7e      
005fbfd2      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fbfe1          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbfe1      
005fbfea      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fbff7          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fbf54  }


005fc002  void __thiscall D3DXTex::CCodec_L6V5U5::Decode(D3DXTex::CCodec_L6V5U5* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc002  {
005fc008      struct D3DXCOLOR* esi = arg4;
005fc00b      int32_t edi;
005fc00b      int32_t var_c = edi;
005fc01e      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc024      uint32_t ecx_3 = &eax_3[(*(uint32_t*)((char*)this + 0x68) << 1)];
005fc024      
005fc02c      if (eax_3 < ecx_3)
005fc02c      {
005fc02e          long double x87_r7_1 = ((long double)0.0666666701f);
005fc034          int32_t ebx;
005fc034          int32_t var_10_1 = ebx;
005fc034          
005fc09c          do
005fc09c          {
005fc035              int32_t edx;
005fc035              edx = *(uint8_t*)eax_3;
005fc039              int32_t ecx_4;
005fc039              ecx_4 = *(uint16_t*)eax_3;
005fc03c              edx <<= 3;
005fc03f              edx s>>= 3;
005fc048              uint8_t ecx_5 = ((((int8_t)(ecx_4 >> 5)) << 3) >> 3);
005fc04e              ebx = edx == 0xf0;
005fc051              ebx += edx;
005fc05c              edx = ecx_5 == 0xf0;
005fc05f              edx += ecx_5;
005fc06c              esi->r = ((float)(((long double)((int32_t)ebx)) * x87_r7_1));
005fc06e              esi = &esi[1];
005fc076              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((int32_t)edx)) * x87_r7_1));
005fc07b              *(uint32_t*)((char*)esi - 8) = ((float)((long double)1));
005fc07e              int32_t ecx_6;
005fc07e              ecx_6 = *(uint16_t*)eax_3;
005fc081              ecx_6 u>>= 0xa;
005fc08c              eax_3 = &eax_3[2];
005fc099              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)ecx_6)) * ((long double)0.0158730168f)));
005fc09c          } while (eax_3 < ecx_3);
005fc02c      }
005fc02c      
005fc0a5      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc0b4          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc0b4      
005fc0bd      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc0ca          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc002  }


005fc0d5  void __thiscall D3DXTex::CCodec_X8L8V8U8::Decode(D3DXTex::CCodec_X8L8V8U8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc0d5  {
005fc0db      struct D3DXCOLOR* esi = arg4;
005fc0de      int32_t edi;
005fc0de      int32_t var_c = edi;
005fc0f1      char* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc0f7      uint32_t ecx_3 = &eax_3[(*(uint32_t*)((char*)this + 0x68) << 2)];
005fc0f7      
005fc0ff      if (eax_3 < ecx_3)
005fc0ff      {
005fc101          long double x87_r7_1 = ((long double)0.00787401572f);
005fc107          int32_t ebx;
005fc107          int32_t var_10_1 = ebx;
005fc107          
005fc15b          do
005fc15b          {
005fc108              int32_t edx;
005fc108              edx = *(uint8_t*)eax_3;
005fc10c              uint8_t ecx_5 = ((int8_t)(*(uint32_t*)eax_3 >> 8));
005fc112              ebx = edx == 0x80;
005fc115              ebx += edx;
005fc120              edx = ecx_5 == 0x80;
005fc123              edx += ecx_5;
005fc130              eax_3 = &eax_3[4];
005fc133              esi->r = ((float)(((long double)((int32_t)ebx)) * x87_r7_1));
005fc135              esi = &esi[1];
005fc140              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((int32_t)edx)) * x87_r7_1));
005fc145              *(uint32_t*)((char*)esi - 8) = ((float)((long double)1));
005fc158              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)eax_3[0xfffffffe])) * ((long double)0.00392156886f)));
005fc15b          } while (eax_3 < ecx_3);
005fc0ff      }
005fc0ff      
005fc164      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc173          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc173      
005fc17c      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc189          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc0d5  }


005fc194  void __thiscall D3DXTex::CCodec_Q8W8V8U8::Decode(D3DXTex::CCodec_Q8W8V8U8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc194  {
005fc199      D3DXTex::CCodec_Q8W8V8U8* this_1 = this;
005fc19b      struct D3DXCOLOR* esi = arg4;
005fc19e      int32_t edi;
005fc19e      int32_t var_10 = edi;
005fc1b1      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc1b7      void* ecx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fc1b7      
005fc1bf      if (eax_3 < ecx_3)
005fc1bf      {
005fc1c5          long double x87_r7_1 = ((long double)0.00787401572f);
005fc1c5          
005fc249          do
005fc249          {
005fc1cc              int32_t ebx_1 = *(uint32_t*)eax_3;
005fc1d3              *(uint8_t*)((char*)arg4)[3] = ((int8_t)(ebx_1 >> 0x10));
005fc1db              *(uint8_t*)((char*)arg2)[3] = ((int8_t)(ebx_1 >> 0x18));
005fc1e0              uint8_t ecx_5 = ((int8_t)(ebx_1 >> 8));
005fc1e3              uint8_t edx_4 = ebx_1;
005fc1e8              ebx_1 = edx_4 == 0x80;
005fc1eb              ebx_1 += edx_4;
005fc1f6              int32_t edx_5;
005fc1f6              edx_5 = ecx_5 == 0x80;
005fc1f9              edx_5 += ecx_5;
005fc20a              int32_t ecx_6;
005fc20a              ecx_6 = *(uint8_t*)((char*)arg4)[3] == 0x80;
005fc20d              ecx_6 += *(uint8_t*)((char*)arg4)[3];
005fc210              esi->r = ((float)(((long double)((int32_t)ebx_1)) * x87_r7_1));
005fc221              int32_t ecx_7;
005fc221              ecx_7 = *(uint8_t*)((char*)arg2)[3] == 0x80;
005fc224              ecx_7 += *(uint8_t*)((char*)arg2)[3];
005fc227              esi->g = ((float)(((long double)((int32_t)edx_5)) * x87_r7_1));
005fc22d              eax_3 = &eax_3[1];
005fc238              esi = &esi[1];
005fc23e              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)((int32_t)ecx_6)) * x87_r7_1));
005fc246              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((int32_t)ecx_7)) * x87_r7_1));
005fc249          } while (eax_3 < ecx_3);
005fc1bf      }
005fc1bf      
005fc252      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc261          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc261      
005fc26a      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc277          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc194  }


005fc282  void __thiscall D3DXTex::CCodec_V16U16::Decode(D3DXTex::CCodec_V16U16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc282  {
005fc297      void* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc29d      uint32_t edx_3 = ((char*)eax_3 + (*(uint32_t*)((char*)this + 0x68) << 2));
005fc2a3      struct D3DXCOLOR* esi = arg4;
005fc2a6      arg2 = edx_3;
005fc2a6      
005fc2a9      if (eax_3 < edx_3)
005fc2a9      {
005fc2ab          long double x87_r7_1 = ((long double)3.05185094e-05f);
005fc2b2          int32_t edi;
005fc2b2          int32_t var_10_1 = edi;
005fc2b2          
005fc302          do
005fc302          {
005fc2b3              edx_3 = *(uint16_t*)((char*)eax_3 + 2);
005fc2b9              int16_t edi_1 = *(uint16_t*)eax_3;
005fc2c3              int16_t ebx_1;
005fc2c3              ebx_1 = edi_1 == 0x8000;
005fc2d2              int16_t ebx_3;
005fc2d2              ebx_3 = edx_3 == 0x8000;
005fc2d8              eax_3 += 4;
005fc2e2              esi->r = ((float)(((long double)((int32_t)(ebx_1 + edi_1))) * x87_r7_1));
005fc2ea              esi = &esi[1];
005fc2f5              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((int32_t)(ebx_3 + edx_3))) * x87_r7_1));
005fc2fa              *(uint32_t*)((char*)esi - 8) = ((float)((long double)1));
005fc2ff              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fc302          } while (eax_3 < arg2);
005fc2a9      }
005fc2a9      
005fc30c      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc319          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc319      
005fc322      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc32d          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc282  }


005fc337  void __thiscall D3DXTex::CCodec_A2W10V10U10::Decode(D3DXTex::CCodec_A2W10V10U10* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc337  {
005fc34c      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc352      uint32_t edx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fc358      struct D3DXCOLOR* esi = arg4;
005fc358      
005fc35e      if (eax_3 < edx_3)
005fc35e      {
005fc364          long double x87_r7_1 = ((long double)0.00195694715f);
005fc36b          int32_t edi;
005fc36b          int32_t var_10_1 = edi;
005fc36b          
005fc40a          do
005fc40a          {
005fc36c              int32_t edx_4 = *(uint32_t*)eax_3;
005fc36e              int32_t edi_1;
005fc36e              edi_1 = *(uint16_t*)eax_3;
005fc376              uint32_t edx_5;
005fc376              edx_5 = ((edx_4 >> 0x14) << 6);
005fc37a              edx_5 s>>= 6;
005fc381              edi_1 <<= 6;
005fc389              edi_1 s>>= 6;
005fc38d              uint16_t ebx_2 = ((((int16_t)(edx_4 >> 0xa)) << 6) >> 6);
005fc391              arg4 = edx_5;
005fc39b              int16_t edx_6;
005fc39b              edx_6 = edi_1 == 0xfe00;
005fc3b0              int16_t edx_9;
005fc3b0              edx_9 = ebx_2 == 0xfe00;
005fc3b5              esi->r = ((float)(((long double)((int32_t)(edx_6 + edi_1))) * x87_r7_1));
005fc3ca              int16_t edx_12;
005fc3ca              edx_12 = arg4 == 0xfe00;
005fc3cf              esi->g = ((float)(((long double)((int32_t)(edx_9 + ebx_2))) * x87_r7_1));
005fc3e0              esi->b = ((float)(((long double)((int32_t)(edx_12 + arg4))) * x87_r7_1));
005fc3e5              uint32_t edx_16 = (*(uint32_t*)eax_3 >> 0x1e);
005fc3ed              long double x87_r6_7 = ((long double)edx_16);
005fc3ed              
005fc3f0              if (edx_16 < 0)
005fc3f2                  x87_r6_7 = (x87_r6_7 + ((long double)4.2949673e+09f));
005fc3f2              
005fc3fe              eax_3 = &eax_3[1];
005fc401              esi = &esi[1];
005fc407              *(uint32_t*)((char*)esi - 4) = ((float)(x87_r6_7 * ((long double)0.333333343f)));
005fc40a          } while (eax_3 < edx_3);
005fc35e      }
005fc35e      
005fc418      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc425          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc425      
005fc42e      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc439          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc337  }


005fc443  void __thiscall D3DXTex::CCodec_Q16W16V16U16::Decode(D3DXTex::CCodec_Q16W16V16U16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc443  {
005fc45b      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc461      void* edx_3 = &eax_3[(*(uint32_t*)((char*)this + 0x68) * 2)];
005fc467      struct D3DXCOLOR* esi = arg4;
005fc467      
005fc470      if (eax_3 < edx_3)
005fc470      {
005fc476          long double x87_r7_1 = ((long double)3.05185094e-05f);
005fc47d          int32_t edi;
005fc47d          int32_t var_20_1 = edi;
005fc47d          
005fc511          do
005fc511          {
005fc483              int32_t edx_4 = eax_3[1];
005fc48e              arg4 = ((*(uint32_t*)eax_3 >> 0x10) | (edx_4 << 0x10));
005fc493              int16_t ecx_2 = *(uint16_t*)eax_3;
005fc499              uint16_t ebx_2 = edx_4;
005fc49c              int32_t var_10_1 = edx_4;
005fc49f              uint32_t edx_5 = (edx_4 >> 0x10);
005fc4aa              int16_t edx_6;
005fc4aa              edx_6 = ecx_2 == 0x8000;
005fc4be              int16_t ecx_4;
005fc4be              ecx_4 = arg4 == 0x8000;
005fc4c3              esi->r = ((float)(((long double)((int32_t)(edx_6 + ecx_2))) * x87_r7_1));
005fc4d6              int16_t ecx_7;
005fc4d6              ecx_7 = ebx_2 == 0x8000;
005fc4db              esi->g = ((float)(((long double)((int32_t)(ecx_4 + arg4))) * x87_r7_1));
005fc4ef              int16_t ecx_10;
005fc4ef              ecx_10 = edx_5 == 0x8000;
005fc4f4              eax_3 = &eax_3[2];
005fc4f7              esi = &esi[1];
005fc4fa              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)((int32_t)(ecx_7 + ebx_2))) * x87_r7_1));
005fc50e              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((int32_t)(ecx_10 + edx_5))) * x87_r7_1));
005fc511          } while (eax_3 < edx_3);
005fc470      }
005fc470      
005fc522      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc52f          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc52f      
005fc538      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc543          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc443  }


005fc54d  void __thiscall D3DXTex::CCodec_CxV8U8::Decode(D3DXTex::CCodec_CxV8U8* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc54d  {
005fc553      struct D3DXCOLOR* esi = arg4;
005fc556      int32_t edi;
005fc556      int32_t var_c = edi;
005fc557      D3DXTex::CCodec_CxV8U8* this_1 = this;
005fc569      char* edx_3 = (((*(uint32_t*)((char*)this_1 + 0x60) * arg2) + (*(uint32_t*)((char*)this_1 + 0x64) * arg3)) + *(uint32_t*)((char*)this_1 + 0x20));
005fc56f      uint32_t eax_3 = &edx_3[(*(uint32_t*)((char*)this_1 + 0x68) << 1)];
005fc574      arg2 = eax_3;
005fc574      
005fc577      if (edx_3 < eax_3)
005fc577      {
005fc579          long double x87_r7_1 = ((long double)0.00787401572f);
005fc57f          int32_t ebx;
005fc57f          int32_t var_10_1 = ebx;
005fc57f          
005fc5e8          do
005fc5e8          {
005fc580              eax_3 = *(uint8_t*)edx_3;
005fc582              this = edx_3[1];
005fc587              ebx = eax_3 == 0x80;
005fc58a              ebx += eax_3;
005fc595              int32_t eax_4;
005fc595              eax_4 = this == 0x80;
005fc59b              eax_4 += this;
005fc5a0              long double x87_r6_2 = (((long double)((int32_t)ebx)) * x87_r7_1);
005fc5a5              esi->r = ((float)x87_r6_2);
005fc5aa              long double x87_r5_2 = (((long double)((int32_t)eax_4)) * x87_r7_1);
005fc5ac              esi->g = ((float)x87_r5_2);
005fc5bf              x87_r7_1 = ((((long double)1f) - (x87_r6_2 * x87_r6_2)) - (x87_r5_2 * x87_r5_2));
005fc5c3              long double temp1_1 = ((long double)0f);
005fc5c3              (x87_r5_2 - temp1_1);
005fc5c9              eax_3 = ((((x87_r5_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r5_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3000))));
005fc5cb              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
005fc5ce              long double x87_r6_4;
005fc5ce              
005fc5ce              if (p_1)
005fc5d6                  x87_r6_4 = sqrtl(x87_r5_2);
005fc5ce              else
005fc5ce              {
005fc5d0                  x87_r7_1 = x87_r5_2;
005fc5d2                  x87_r6_4 = ((long double)0);
005fc5ce              }
005fc5ce              
005fc5d8              esi->b = ((float)x87_r6_4);
005fc5de              edx_3 = &edx_3[2];
005fc5df              esi->a = ((float)((long double)1));
005fc5e2              esi = &esi[1];
005fc5e8          } while (edx_3 < arg2);
005fc577      }
005fc577      
005fc5f1      if (*(uint32_t*)((char*)this_1 + 0x18) != 0)
005fc600          D3DXTex::CCodec::ColorKey(this_1, ((char*)esi - (*(uint32_t*)((char*)this_1 + 0x68) << 4)));
005fc600      
005fc609      if (*(uint32_t*)((char*)this_1 + 0x10) != 0)
005fc616          D3DXTex::CCodec::DecodeGamma22(this_1, ((char*)esi - (*(uint32_t*)((char*)this_1 + 0x68) << 4)));
005fc54d  }


005fc621  void __thiscall D3DXTex::CCodec_L16::Decode(D3DXTex::CCodec_L16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc621  {
005fc636      int16_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc63c      void* edx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fc642      struct D3DXCOLOR* esi = arg4;
005fc642      
005fc645      if (eax_3 < edx_3)
005fc645      {
005fc647          int32_t edi;
005fc647          int32_t var_c_1 = edi;
005fc647          
005fc66b          do
005fc66b          {
005fc64b              arg4 = ((uint32_t)*(uint16_t*)eax_3);
005fc64f              eax_3 = &eax_3[1];
005fc653              long double x87_r7_2 = (((long double)arg4) * ((long double)1.52590219e-05f));
005fc659              esi->b = ((float)x87_r7_2);
005fc65c              esi->g = ((float)x87_r7_2);
005fc65f              esi->r = ((float)x87_r7_2);
005fc661              esi = &esi[1];
005fc668              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fc66b          } while (eax_3 < edx_3);
005fc645      }
005fc645      
005fc672      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc67f          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc67f      
005fc688      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc693          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc621  }


005fc69d  void __thiscall D3DXTex::CCodec_R16F::Decode(D3DXTex::CCodec_R16F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc69d  {
005fc6a3      struct D3DXCOLOR* ebx = arg4;
005fc6a7      int32_t edi;
005fc6a7      int32_t var_10 = edi;
005fc6ba      int32_t esi_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc6c0      uint32_t eax_3 = (esi_3 + (*(uint32_t*)((char*)this + 0x68) << 1));
005fc6c0      
005fc6c8      while (esi_3 < eax_3)
005fc6c8      {
005fc6ce          _D3DXFloat16To32Array@12(ebx, esi_3, 1);
005fc6d5          ebx->a = ((float)((long double)1));
005fc6db          esi_3 += 2;
005fc6dc          ebx->b = ((float)((long double)1));
005fc6e1          ebx = &ebx[1];
005fc6e7          *(uint32_t*)((char*)ebx - 0xc) = ((float)((long double)1));
005fc6c8      }
005fc6c8      
005fc6f0      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc6ff          D3DXTex::CCodec::ColorKey(this, ((char*)ebx - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc6ff      
005fc708      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc715          D3DXTex::CCodec::DecodeGamma22(this, ((char*)ebx - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc69d  }


005fc721  void __thiscall D3DXTex::CCodec_G16R16F::Decode(D3DXTex::CCodec_G16R16F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc721  {
005fc727      struct D3DXCOLOR* ebx = arg4;
005fc72b      int32_t edi;
005fc72b      int32_t var_10 = edi;
005fc73e      int32_t esi_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc744      uint32_t eax_3 = (esi_3 + (*(uint32_t*)((char*)this + 0x68) << 2));
005fc744      
005fc74c      while (esi_3 < eax_3)
005fc74c      {
005fc752          _D3DXFloat16To32Array@12(ebx, esi_3, 2);
005fc759          ebx->a = ((float)((long double)1));
005fc75c          esi_3 += 4;
005fc761          ebx = &ebx[1];
005fc767          *(uint32_t*)((char*)ebx - 8) = ((float)((long double)1));
005fc74c      }
005fc74c      
005fc770      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc77f          D3DXTex::CCodec::ColorKey(this, ((char*)ebx - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc77f      
005fc788      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc795          D3DXTex::CCodec::DecodeGamma22(this, ((char*)ebx - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc721  }


005fc7a1  void __thiscall D3DXTex::CCodec_A16B16G16R16F::Decode(D3DXTex::CCodec_A16B16G16R16F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc7a1  {
005fc7c7      _D3DXFloat16To32Array@12(arg4, (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20)), (*(uint32_t*)((char*)this + 0x68) << 2));
005fc7c7      
005fc7d0      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc7d7          D3DXTex::CCodec::ColorKey(this, arg4);
005fc7d7      
005fc7e0      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc7e7          D3DXTex::CCodec::DecodeGamma22(this, arg4);
005fc7a1  }


005fc7f1  void __thiscall D3DXTex::CCodec_R32F::Decode(D3DXTex::CCodec_R32F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc7f1  {
005fc806      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc80c      void* edx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fc812      struct D3DXCOLOR* esi = arg4;
005fc812      
005fc815      if (eax_3 < edx_3)
005fc815      {
005fc817          int32_t edi;
005fc817          int32_t var_c_1 = edi;
005fc817          
005fc833          do
005fc833          {
005fc818              int32_t edi_1 = *(uint32_t*)eax_3;
005fc81c              esi->a = ((float)((long double)1));
005fc81f              esi->r = edi_1;
005fc823              eax_3 = &eax_3[1];
005fc826              esi->b = ((float)((long double)1));
005fc82b              esi = &esi[1];
005fc830              *(uint32_t*)((char*)esi - 0xc) = ((float)((long double)1));
005fc833          } while (eax_3 < edx_3);
005fc815      }
005fc815      
005fc83a      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc847          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc847      
005fc850      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc85b          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc7f1  }


005fc865  void __thiscall D3DXTex::CCodec_G32R32F::Decode(D3DXTex::CCodec_G32R32F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc865  {
005fc87a      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc880      void* edx_3 = &eax_3[(*(uint32_t*)((char*)this + 0x68) * 2)];
005fc886      struct D3DXCOLOR* esi = arg4;
005fc886      
005fc889      if (eax_3 < edx_3)
005fc889      {
005fc88b          int32_t edi;
005fc88b          int32_t var_c_1 = edi;
005fc88b          
005fc8a8          do
005fc8a8          {
005fc890              esi->r = *(uint32_t*)eax_3;
005fc892              float edi_2 = eax_3[1];
005fc895              esi->a = ((float)((long double)1));
005fc89a              esi->g = edi_2;
005fc89d              esi->b = ((float)((long double)1));
005fc8a0              eax_3 = &eax_3[2];
005fc8a3              esi = &esi[1];
005fc8a8          } while (eax_3 < edx_3);
005fc889      }
005fc889      
005fc8af      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc8bc          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc8bc      
005fc8c5      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc8d0          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc865  }


005fc8da  void __thiscall D3DXTex::CCodec_A32B32G32R32F::Decode(D3DXTex::CCodec_A32B32G32R32F* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc8da  {
005fc8f4      int32_t ecx_1 = (*(uint32_t*)((char*)this + 0x68) << 4);
005fc901      int32_t edi;
005fc901      int32_t var_10 = edi;
005fc905      int32_t esi_4;
005fc905      int32_t edi_2;
005fc905      edi_2 = __builtin_memcpy(arg4, (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20)), ((ecx_1 >> 2) << 2));
005fc90c      __builtin_memcpy(edi_2, esi_4, (ecx_1 & 3));
005fc90c      
005fc912      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc919          D3DXTex::CCodec::ColorKey(this, arg4);
005fc919      
005fc922      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc929          D3DXTex::CCodec::DecodeGamma22(this, arg4);
005fc8da  }


005fc935  void __thiscall D3DXTex::CCodec_D3DX_A16L16::Decode(D3DXTex::CCodec_D3DX_A16L16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc935  {
005fc94a      int32_t* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc950      void* edx_3 = &eax_3[*(uint32_t*)((char*)this + 0x68)];
005fc956      struct D3DXCOLOR* esi = arg4;
005fc956      
005fc959      if (eax_3 < edx_3)
005fc959      {
005fc95b          long double x87_r7_1 = ((long double)1.52590219e-05f);
005fc961          int32_t edi;
005fc961          int32_t var_c_1 = edi;
005fc961          
005fc99b          do
005fc99b          {
005fc964              uint32_t edi_2 = ((uint32_t)((int16_t)*(uint32_t*)eax_3));
005fc96f              long double x87_r6_1 = ((long double)edi_2);
005fc96f              
005fc972              if (edi_2 < 0)
005fc974                  x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
005fc974              
005fc97a              long double x87_r6_2 = (x87_r6_1 * x87_r7_1);
005fc97c              eax_3 = &eax_3[1];
005fc97f              esi->b = ((float)x87_r6_2);
005fc982              esi->g = ((float)x87_r6_2);
005fc985              esi->r = ((float)x87_r6_2);
005fc98e              esi = &esi[1];
005fc998              *(uint32_t*)((char*)esi - 4) = ((float)(((long double)((uint32_t)*(uint16_t*)((char*)eax_3 - 2))) * x87_r7_1));
005fc99b          } while (eax_3 < edx_3);
005fc959      }
005fc959      
005fc9a4      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fc9b1          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc9b1      
005fc9ba      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fc9c5          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc935  }


005fc9cf  void __thiscall D3DXTex::CCodec_D3DX_R16G16B16::Decode(D3DXTex::CCodec_D3DX_R16G16B16* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fc9cf  {
005fc9e4      void* eax_3 = (((*(uint32_t*)((char*)this + 0x60) * arg2) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fc9ea      void* edx_3 = (*(uint32_t*)((char*)this + 0x74) + eax_3);
005fc9ef      struct D3DXCOLOR* esi = arg4;
005fc9ef      
005fc9f2      if (eax_3 < edx_3)
005fc9f2      {
005fc9f4          long double x87_r7_1 = ((long double)1.52590219e-05f);
005fc9fa          int32_t edi;
005fc9fa          int32_t var_c_1 = edi;
005fc9fa          
005fca33          do
005fca33          {
005fca07              esi->r = ((float)(((long double)((uint32_t)*(uint16_t*)((char*)eax_3 + 4))) * x87_r7_1));
005fca10              esi = &esi[1];
005fca18              *(uint32_t*)((char*)esi - 0xc) = ((float)(((long double)((uint32_t)*(uint16_t*)((char*)eax_3 + 2))) * x87_r7_1));
005fca1e              arg4 = ((uint32_t)*(uint16_t*)eax_3);
005fca21              eax_3 += 6;
005fca2b              *(uint32_t*)((char*)esi - 8) = ((float)(((long double)arg4) * x87_r7_1));
005fca30              *(uint32_t*)((char*)esi - 4) = ((float)((long double)1));
005fca33          } while (eax_3 < edx_3);
005fc9f2      }
005fc9f2      
005fca3c      if (*(uint32_t*)((char*)this + 0x18) != 0)
005fca49          D3DXTex::CCodec::ColorKey(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fca49      
005fca52      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fca5d          D3DXTex::CCodec::DecodeGamma22(this, ((char*)esi - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fc9cf  }


005fca67  void __thiscall D3DXTex::CCodecYUV::CCodecYUV(D3DXTex::CCodecYUV* this, struct D3DX_BLT* arg2)

005fca67  {
005fca6c      D3DXTex::CCodecYUV* this_1 = this;
005fca6f      int32_t edi;
005fca6f      int32_t var_14 = edi;
005fca7a      D3DXTex::CCodec::CCodec(this, arg2, 0, 1);
005fca85      int32_t ecx_1 = (*(uint32_t*)((char*)this + 0x3c) & 0xfffffffe);
005fca89      int32_t eax_2 = ((*(uint32_t*)((char*)this + 0x44) + 1) & 0xfffffffe);
005fca8e      int32_t edi_2 = (eax_2 - ecx_1);
005fca90      *(uint32_t*)((char*)this + 0x8c) = eax_2;
005fca9c      *(uint32_t*)this = 0x7ed0dc;
005fcaa2      *(uint32_t*)((char*)this + 0x84) = ecx_1;
005fcaa8      *(uint32_t*)((char*)this + 0x88) = 0;
005fcaae      *(uint32_t*)((char*)this + 0x94) = 0;
005fcab4      *(uint32_t*)((char*)this + 0x90) = 0;
005fcaba      *(uint32_t*)((char*)this + 0x98) = 0;
005fcac0      *(uint32_t*)((char*)this + 0x9c) = edi_2;
005fcac6      *(uint32_t*)((char*)this + 0xa0) = 0;
005fcacc      *(uint32_t*)((char*)this + 0xa4) = 1;
005fcad6      void* eax_5 = operator new((edi_2 << 4));
005fcae1      void* eax_6;
005fcae1      
005fcae1      if (eax_5 == 0)
005fcaf6          eax_6 = nullptr;
005fcae1      else
005fcae1      {
005fcaec          `vector constructor iterator'(eax_5, 0x10, edi_2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005fcaf1          eax_6 = eax_5;
005fcae1      }
005fcae1      
005fcafa      *(uint32_t*)((char*)this + 0x80) = eax_6;
005fcafa      
005fcb00      if (eax_6 == 0)
005fcb02          *(uint32_t*)((char*)this + 0xa4) = 0;
005fcb02      
005fcb0b      int32_t eax_8 = *(uint32_t*)((char*)arg2 + 4);
005fcb0b      
005fcb13      if (eax_8 == 0x32595559)
005fcb13      {
005fcb3c          *(uint32_t*)((char*)this + 0xa8) = 0;
005fcb42          *(uint32_t*)((char*)this + 0xac) = 8;
005fcb13      }
005fcb13      else if (eax_8 == 0x42475247)
005fcb1a      {
005fcb2a          *(uint32_t*)((char*)this + 0xa8) = 8;
005fcb34          *(uint32_t*)((char*)this + 0xac) = 0;
005fcb1a      }
005fcb1a      else if (eax_8 == 0x47424752)
005fcb21      {
005fcb3c          *(uint32_t*)((char*)this + 0xa8) = 0;
005fcb42          *(uint32_t*)((char*)this + 0xac) = 8;
005fcb21      }
005fcb21      else if (eax_8 == 0x59565955)
005fcb28      {
005fcb2a          *(uint32_t*)((char*)this + 0xa8) = 8;
005fcb34          *(uint32_t*)((char*)this + 0xac) = 0;
005fcb28      }
005fca67  }


005fcb55  void __thiscall D3DXTex::CCodecYUV::~CCodecYUV(D3DXTex::CCodecYUV* this)

005fcb55  {
005fcb5a      *(uint32_t*)this = 0x7ed0dc;
005fcb60      D3DXTex::CCodecYUV::Commit(this);
005fcb65      void* eax = *(uint32_t*)((char*)this + 0x80);
005fcb65      
005fcb6d      if (eax != 0)
005fcb70          operator delete(eax);
005fcb70      
005fcb79      /* tailcall */
005fcb79      return D3DXTex::CCodec::~CCodec(this);
005fcb55  }


005fcb7e  void __thiscall D3DXTex::CCodecYUV::Encode(D3DXTex::CCodecYUV* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fcb7e  {
005fcb8b      int32_t edi;
005fcb8b      int32_t var_10 = edi;
005fcb8c      struct D3DXCOLOR* esi;
005fcb8c      
005fcb8c      if (*(uint32_t*)((char*)this + 0x54) == 0)
005fcb9a          esi = arg4;
005fcb8c      else
005fcb8c      {
005fcb91          struct D3DXCOLOR* eax_1;
005fcb91          int80_t st0_1;
005fcb91          eax_1 = D3DXTex::CCodec::Convert(this, arg4);
005fcb96          esi = eax_1;
005fcb8c      }
005fcb8c      
005fcba1      if (*(uint32_t*)((char*)this + 0x10) != 0)
005fcbab          esi = D3DXTex::CCodec::EncodeGamma22(this, esi);
005fcbab      
005fcbc6      int32_t edx;
005fcbc6      edx = *(uint32_t*)((char*)this + 0x9c) != *(uint32_t*)((char*)this + 0x68);
005fcbcc      long eax_5;
005fcbcc      int80_t st0_2;
005fcbcc      eax_5 = D3DXTex::CCodecYUV::Fetch(this, (arg2 + *(uint32_t*)((char*)this + 0x40)), (arg3 + *(uint32_t*)((char*)this + 0x4c)), edx);
005fcbcc      
005fcbd3      if (eax_5 >= 0)
005fcbd3      {
005fcbe1          int32_t ecx_4 = (*(uint32_t*)((char*)this + 0x68) << 4);
005fcbf2          int32_t esi_1;
005fcbf2          int32_t edi_7;
005fcbf2          edi_7 = __builtin_memcpy((((*(uint32_t*)((char*)this + 0x3c) - *(uint32_t*)((char*)this + 0x84)) << 4) + *(uint32_t*)((char*)this + 0x80)), esi, ((ecx_4 >> 2) << 2));
005fcbf9          __builtin_memcpy(edi_7, esi_1, (ecx_4 & 3));
005fcbfb          *(uint32_t*)((char*)this + 0xa0) = 1;
005fcbd3      }
005fcb7e  }


005fcc0c  void __thiscall D3DXTex::CCodecYUV::Decode(D3DXTex::CCodecYUV* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fcc0c  {
005fcc26      long eax_2;
005fcc26      int80_t st0;
005fcc26      eax_2 = D3DXTex::CCodecYUV::Fetch(this, (arg2 + *(uint32_t*)((char*)this + 0x40)), (arg3 + *(uint32_t*)((char*)this + 0x4c)), 1);
005fcc26      
005fcc2d      if (eax_2 >= 0)
005fcc2d      {
005fcc3c          int32_t ecx_4 = (*(uint32_t*)((char*)this + 0x68) << 4);
005fcc4a          int32_t edi;
005fcc4a          int32_t var_10_1 = edi;
005fcc51          int32_t esi_5;
005fcc51          int32_t edi_2;
005fcc51          edi_2 = __builtin_memcpy(arg4, (((*(uint32_t*)((char*)this + 0x3c) - *(uint32_t*)((char*)this + 0x84)) << 4) + *(uint32_t*)((char*)this + 0x80)), ((ecx_4 >> 2) << 2));
005fcc58          __builtin_memcpy(edi_2, esi_5, (ecx_4 & 3));
005fcc58          
005fcc60          if (*(uint32_t*)((char*)this + 0x18) != 0)
005fcc67              D3DXTex::CCodec::ColorKey(this, arg4);
005fcc67          
005fcc70          if (*(uint32_t*)((char*)this + 0x10) != 0)
005fcc77              D3DXTex::CCodec::DecodeGamma22(this, arg4);
005fcc2d      }
005fcc0c  }


005fcc81  void __thiscall D3DXTex::CCodecDXT::CCodecDXT(D3DXTex::CCodecDXT* this, struct D3DX_BLT* arg2)

005fcc81  {
005fcc8b      int32_t edi;
005fcc8b      int32_t var_10 = edi;
005fcc93      D3DXTex::CCodec::CCodec(this, arg2, 0, 1);
005fcc98      int32_t eax = *(uint32_t*)((char*)this + 4);
005fcca0      *(uint32_t*)this = 0x7ece08;
005fcca0      
005fcca6      if (eax == 0x31545844)
005fcca6      {
005fcd4c          *(uint32_t*)((char*)this + 0x88) = 8;
005fcd56          *(uint32_t*)((char*)this + 0x90) = D3DXTex::D3DXEncodeDXT1;
005fcd60          *(uint32_t*)((char*)this + 0x8c) = D3DXTex::D3DXDecodeDXT1;
005fcca6      }
005fcca6      else if (eax == 0x32545844)
005fccb1      {
005fcd2c          *(uint32_t*)((char*)this + 0x88) = 0x10;
005fcd36          *(uint32_t*)((char*)this + 0x90) = D3DXTex::D3DXEncodeDXT2;
005fcd40          *(uint32_t*)((char*)this + 0x8c) = D3DXTex::D3DXDecodeDXT2;
005fccb1      }
005fccb1      else if (eax == 0x33545844)
005fccb8      {
005fcd0c          *(uint32_t*)((char*)this + 0x88) = 0x10;
005fcd16          *(uint32_t*)((char*)this + 0x90) = D3DXTex::D3DXEncodeDXT3;
005fcd20          *(uint32_t*)((char*)this + 0x8c) = D3DXTex::D3DXDecodeDXT3;
005fccb8      }
005fccb8      else if (eax == 0x34545844)
005fccbf      {
005fccec          *(uint32_t*)((char*)this + 0x88) = 0x10;
005fccf6          *(uint32_t*)((char*)this + 0x90) = D3DXTex::D3DXEncodeDXT4;
005fcd00          *(uint32_t*)((char*)this + 0x8c) = D3DXTex::D3DXDecodeDXT4;
005fccbf      }
005fccbf      else if (eax == 0x35545844)
005fccc6      {
005fcccc          *(uint32_t*)((char*)this + 0x88) = 0x10;
005fccd6          *(uint32_t*)((char*)this + 0x90) = D3DXTex::D3DXEncodeDXT5;
005fcce0          *(uint32_t*)((char*)this + 0x8c) = D3DXTex::D3DXDecodeDXT5;
005fccc6      }
005fccc6      
005fcd78      __builtin_memcpy(((char*)this + 0x94), ((char*)arg2 + 0x10), 0x18);
005fcd81      *(uint32_t*)((char*)this + 0xac) = (*(uint32_t*)((char*)this + 0x94) & 0xfffffffc);
005fcd8f      *(uint32_t*)((char*)this + 0xb0) = (*(uint32_t*)((char*)this + 0x98) & 0xfffffffc);
005fcd9b      *(uint32_t*)((char*)this + 0xbc) = *(uint32_t*)((char*)this + 0xa4);
005fcdac      int32_t ecx = *(uint32_t*)((char*)this + 0x48);
005fcdaf      int32_t esi_2 = *(uint32_t*)((char*)this + 0x3c);
005fcdb2      *(uint32_t*)((char*)this + 0xb4) = ((*(uint32_t*)((char*)this + 0x9c) + 3) & 0xfffffffc);
005fcdb8      int32_t eax_10 = *(uint32_t*)((char*)this + 0xa0);
005fcdbe      int32_t edi_2 = *(uint32_t*)((char*)this + 0x40);
005fcdc1      *(uint32_t*)((char*)this + 0xe8) = 0xffffffff;
005fcdc8      *(uint32_t*)((char*)this + 0xec) = 0xffffffff;
005fcdd4      *(uint32_t*)((char*)this + 0xb8) = ((eax_10 + 3) & 0xfffffffc);
005fcde0      *(uint32_t*)((char*)this + 0xc0) = *(uint32_t*)((char*)this + 0xa8);
005fcde9      *(uint32_t*)((char*)this + 0xd4) = *(uint32_t*)((char*)this + 0x4c);
005fcdf5      int32_t eax_17 = ((*(uint32_t*)((char*)this + 0x44) + 3) & 0xfffffffc);
005fcdf7      int32_t esi_3 = (esi_2 & 0xfffffffc);
005fcdf9      *(uint32_t*)((char*)this + 0xcc) = eax_17;
005fce02      int32_t ecx_2 = ((ecx + 3) & 0xfffffffc);
005fce04      int32_t edi_3 = (edi_2 & 0xfffffffc);
005fce06      int32_t edx = *(uint32_t*)((char*)this + 0x50);
005fce0b      *(uint32_t*)((char*)this + 0xd0) = ecx_2;
005fce14      *(uint32_t*)((char*)this + 0xdc) = ((eax_17 - esi_3) >> 2);
005fce1c      *(uint32_t*)((char*)this + 0xd8) = edx;
005fce22      int32_t edx_1 = (edx - *(uint32_t*)((char*)this + 0x4c));
005fce2a      *(uint32_t*)((char*)this + 0xf0) = 0;
005fce30      *(uint32_t*)((char*)this + 0xf4) = 0;
005fce36      *(uint32_t*)((char*)this + 0xf8) = 0;
005fce3f      *(uint32_t*)((char*)this + 0xc4) = esi_3;
005fce45      *(uint32_t*)((char*)this + 0xc8) = edi_3;
005fce4b      *(uint32_t*)((char*)this + 0xe0) = ((ecx_2 - edi_3) >> 2);
005fce51      *(uint32_t*)((char*)this + 0xe4) = edx_1;
005fce5b      *(uint32_t*)((char*)this + 0xfc) = *(uint32_t*)((char*)arg2 + 0x40);
005fcc81  }


005fce69  void* __thiscall D3DXTex::CCodec_DXT5::`scalar deleting destructor'(D3DXTex::CCodec_DXT5* this, uint32_t arg2)

005fce69  {
005fce71      D3DXTex::CCodecDXT::~CCodecDXT(this);
005fce71      
005fce7a      if ((arg2 & 1) != 0)
005fce7d          operator delete(this);
005fce7d      
005fce87      return this;
005fce69  }


005fce8a  void __thiscall D3DXTex::CCodecDXT::Encode(D3DXTex::CCodecDXT* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fce8a  {
005fce98      arg2 += *(uint32_t*)((char*)this + 0x40);
005fce9e      arg3 += *(uint32_t*)((char*)this + 0x4c);
005fcea8      int32_t edi;
005fcea8      int32_t var_2c = edi;
005fcea8      
005fcea9      if (*(uint32_t*)((char*)this + 0xf8) == 0)
005fcea9      {
005fcebc          void* s = operator new(((*(uint32_t*)((char*)this + 0xe0) * *(uint32_t*)((char*)this + 0xe4)) << 3));
005fcec6          *(uint32_t*)((char*)this + 0xf8) = s;
005fcec6          
005fcecc          if (s != 0)
005fcecc          {
005fcedf              int32_t ecx_3 = ((*(uint32_t*)((char*)this + 0xe0) * *(uint32_t*)((char*)this + 0xe4)) << 3);
005fcef0              __builtin_memset(__builtin_memset(s, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
005fcef0              goto label_5fcf17;
005fcecc          }
005fcecc          
005fcecc          return;
005fcea9      }
005fcea9      
005fcf17  label_5fcf17:
005fcf17      int32_t* esi_1 = (*(uint32_t*)((char*)this + 0xf8) + ((((arg3 - *(uint32_t*)((char*)this + 0xd4)) * *(uint32_t*)((char*)this + 0xe0)) + ((arg2 - *(uint32_t*)((char*)this + 0xc8)) >> 2)) << 3));
005fcf1e      int32_t* var_8_1 = esi_1;
005fcf1e      
005fcf21      if (esi_1[1] != 0)
005fcf21          goto label_5fcf6b;
005fcf21      
005fcf29      int32_t edi_4 = (*(uint32_t*)((char*)this + 0xdc) << 4);
005fcf32      void* eax_11 = operator new((edi_4 << 4));
005fcf3d      void* eax_12;
005fcf3d      
005fcf3d      if (eax_11 == 0)
005fcf52          eax_12 = nullptr;
005fcf3d      else
005fcf3d      {
005fcf48          `vector constructor iterator'(eax_11, 0x10, edi_4, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005fcf4d          eax_12 = eax_11;
005fcf3d      }
005fcf3d      
005fcf56      esi_1[1] = eax_12;
005fcf56      
005fcf59      if (eax_12 != 0)
005fcf59      {
005fcf5f          *(uint32_t*)esi_1 = 0;
005fcf62          *(uint32_t*)((char*)this + 0xf4) += 1;
005fcf6b      label_5fcf6b:
005fcf6b          
005fcf6b          if (*(uint32_t*)esi_1 == 0)
005fcf6b          {
005fcf74              int32_t eax_13 = *(uint32_t*)((char*)this + 0x40);
005fcf79              int32_t edx_3 = (arg2 & 0xfffffffc);
005fcf7e              int32_t var_14_2 = edx_3;
005fcf8c              int32_t eax_14;
005fcf8c              
005fcf8c              if ((edx_3 >= eax_13 || eax_13 <= *(uint32_t*)((char*)this + 0x98)))
005fcf8e                  eax_14 = *(uint32_t*)((char*)this + 0x48);
005fcf8e              
005fcf9b              if (((edx_3 >= eax_13 || eax_13 <= *(uint32_t*)((char*)this + 0x98)) && ((edx_3 + 4) <= eax_14 || eax_14 >= *(uint32_t*)((char*)this + 0xa0))))
005fcf9b              {
005fd004                  int32_t eax_16 = *(uint32_t*)((char*)this + 0xc4);
005fd00a                  int32_t ecx_19 = *(uint32_t*)((char*)this + 0x3c);
005fd00a                  
005fd017                  if ((eax_16 < ecx_19 && ecx_19 > *(uint32_t*)((char*)this + 0x94)))
005fd017                  {
005fd03c                      *(uint32_t*)((char*)this + 0x8c)(esi_1[1], (((((eax_16 >> 2) * *(uint32_t*)((char*)this + 0x88)) + ((arg2 >> 2) * *(uint32_t*)((char*)this + 0x60))) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20)));
005fd042                      edx_3 = var_14_2;
005fd017                  }
005fd017                  
005fd045                  int32_t eax_22 = *(uint32_t*)((char*)this + 0xcc);
005fd04b                  int32_t ecx_22 = *(uint32_t*)((char*)this + 0x44);
005fd04b                  
005fd058                  if ((eax_22 > ecx_22 && ecx_22 < *(uint32_t*)((char*)this + 0x9c)))
005fd058                  {
005fd083                      *(uint32_t*)((char*)this + 0x8c)(esi_1[1], ((((((eax_22 - 4) >> 2) * *(uint32_t*)((char*)this + 0x88)) + ((arg2 >> 2) * *(uint32_t*)((char*)this + 0x60))) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20)));
005fd089                      edx_3 = var_14_2;
005fd058                  }
005fcf9b              }
005fcf9b              else
005fcf9b              {
005fcf9d                  int32_t i_3 = *(uint32_t*)((char*)this + 0xc4);
005fcfc1                  int32_t edi_10 = (((((arg2 >> 2) * *(uint32_t*)((char*)this + 0x60)) + ((i_3 >> 2) * *(uint32_t*)((char*)this + 0x88))) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fcfcd                  int32_t var_c_1 = esi_1[1];
005fcfd0                  int32_t i = i_3;
005fcfd0                  
005fcfd3                  if (i_3 < *(uint32_t*)((char*)this + 0xcc))
005fcfd3                  {
005fcffd                      do
005fcffd                      {
005fcfdd                          *(uint32_t*)((char*)this + 0x8c)(var_c_1, edi_10);
005fcfe3                          i += 4;
005fcfea                          edi_10 += *(uint32_t*)((char*)this + 0x88);
005fcff0                          var_c_1 += 0x100;
005fcffd                      } while (i < *(uint32_t*)((char*)this + 0xcc));
005fcffd                      
005fd089                      edx_3 = var_14_2;
005fcfd3                  }
005fcf9b              }
005fcf9b              
005fd0a6              for (int32_t i_1 = 0; i_1 < 4; i_1 += 1)
005fd0a6              {
005fd08e                  int32_t eax_29 = (i_1 + edx_3);
005fd08e                  
005fd099                  if ((eax_29 < *(uint32_t*)((char*)this + 0x40) || eax_29 >= *(uint32_t*)((char*)this + 0x48)))
005fd0a0                      *(uint32_t*)esi_1 |= (1 << i_1);
005fd0a6              }
005fcf6b          }
005fcf6b          
005fd0ac          if (*(uint32_t*)((char*)this + 0x54) != 0)
005fd0ac          {
005fd0b3              struct D3DXCOLOR* eax_31;
005fd0b3              int80_t st0_1;
005fd0b3              eax_31 = D3DXTex::CCodec::Convert(this, arg4);
005fd0b8              arg4 = eax_31;
005fd0ac          }
005fd0ac          
005fd0bf          if (*(uint32_t*)((char*)this + 0x10) != 0)
005fd0cb              arg4 = D3DXTex::CCodec::EncodeGamma22(this, arg4);
005fd0cb          
005fd0d1          int32_t ecx_31 = (*(uint32_t*)((char*)this + 0x3c) - *(uint32_t*)((char*)this + 0xc4));
005fd0e3          int32_t eax_34 = (*(uint32_t*)((char*)this + 0x68) + ecx_31);
005fd0e5          int32_t edx_6 = ((arg2 - *(uint32_t*)((char*)this + 0xc8)) & 3);
005fd0e5          
005fd0ed          while (ecx_31 < eax_34)
005fd0ed          {
005fd103              float* edi_19 = ((((((ecx_31 & 0xfffffffc) | edx_6) << 2) | (ecx_31 & 3)) << 4) + esi_1[1]);
005fd106              struct D3DXCOLOR* esi_2 = arg4;
005fd109              arg4 = &arg4[1];
005fd10d              *(uint32_t*)edi_19 = esi_2->r;
005fd10d              void* edi_20 = &edi_19[1];
005fd10d              float* esi_3 = &esi_2->g;
005fd10e              *(uint32_t*)edi_20 = ADJ(esi_3)->g;
005fd10e              void* edi_21 = ((char*)edi_20 + 4);
005fd10e              float* esi_4 = &esi_3[1];
005fd10f              *(uint32_t*)edi_21 = ADJ(esi_4)->b;
005fd110              ecx_31 += 1;
005fd114              *(uint32_t*)((char*)edi_21 + 4) = (&esi_4[1] - 0xc)->a;
005fd115              esi_1 = var_8_1;
005fd0ed          }
005fd0ed          
005fd129          *(uint32_t*)esi_1 |= (1 << (arg2 & 3));
005fd129          
005fd12e          if (*(uint32_t*)esi_1 == 0xf)
005fd12e          {
005fd134              int32_t i_4 = *(uint32_t*)((char*)this + 0xc4);
005fd158              uint32_t edi_29 = (((((arg2 >> 2) * *(uint32_t*)((char*)this + 0x60)) + ((i_4 >> 2) * *(uint32_t*)((char*)this + 0x88))) + (*(uint32_t*)((char*)this + 0x64) * arg3)) + *(uint32_t*)((char*)this + 0x20));
005fd164              arg3 = edi_29;
005fd167              arg4 = esi_1[1];
005fd16a              int32_t i_2 = i_4;
005fd16a              
005fd16d              if (i_4 < *(uint32_t*)((char*)this + 0xcc))
005fd16d              {
005fd175                  int32_t var_24 = 0;
005fd178                  int32_t var_20_1 = 0;
005fd17b                  int32_t var_1c_1 = 0;
005fd181                  int32_t eax_39 = (arg2 & 0xfffffffc);
005fd184                  int32_t var_18_1 = 1;
005fd184                  
005fd258                  do
005fd258                  {
005fd190                      int32_t k_2 = (*(uint32_t*)((char*)this + 0x9c) - i_2);
005fd199                      int32_t j = (*(uint32_t*)((char*)this + 0xa0) - eax_39);
005fd199                      
005fd19f                      if (k_2 < 4)
005fd19f                      {
005fd1a1                          arg2 = 0;
005fd1a1                          
005fd1a7                          if (j > 0)
005fd1a7                          {
005fd1ad                              while (arg2 < 4)
005fd1ad                              {
005fd1af                                  int32_t k = k_2;
005fd1af                                  
005fd1d3                                  do
005fd1d3                                  {
005fd1b8                                      uint32_t edi_31 = (arg2 << 2);
005fd1c2                                      void* esi_10 = &arg4[(&var_24[k] | edi_31)];
005fd1c8                                      void* edi_34 = &arg4[(edi_31 | k)];
005fd1cb                                      k += 1;
005fd1cf                                      *(uint32_t*)edi_34 = *(uint32_t*)esi_10;
005fd1cf                                      void* edi_35 = ((char*)edi_34 + 4);
005fd1cf                                      void* esi_11 = ((char*)esi_10 + 4);
005fd1d0                                      *(uint32_t*)edi_35 = *(uint32_t*)esi_11;
005fd1d0                                      void* edi_36 = ((char*)edi_35 + 4);
005fd1d0                                      void* esi_12 = ((char*)esi_11 + 4);
005fd1d1                                      *(uint32_t*)edi_36 = *(uint32_t*)esi_12;
005fd1d2                                      *(uint32_t*)((char*)edi_36 + 4) = *(uint32_t*)((char*)esi_12 + 4);
005fd1d3                                  } while (k < 4);
005fd1d3                                  
005fd1d5                                  arg2 += 1;
005fd1db                                  esi_1 = var_8_1;
005fd1de                                  edi_29 = arg3;
005fd1de                                  
005fd1e1                                  if (arg2 >= j)
005fd1e1                                      break;
005fd1ad                              }
005fd1a7                          }
005fd19f                      }
005fd19f                      
005fd1e6                      if (j < 4)
005fd1e6                      {
005fd216                          do
005fd216                          {
005fd1ec                              int32_t k_1 = 0;
005fd1ee                              int32_t edx_8 = (&var_24[j] << 2);
005fd1ee                              
005fd210                              do
005fd210                              {
005fd1fb                                  void* edi_43 = &arg4[((j << 2) | k_1)];
005fd205                                  void* esi_18 = &arg4[(edx_8 | k_1)];
005fd208                                  k_1 += 1;
005fd20c                                  *(uint32_t*)edi_43 = *(uint32_t*)esi_18;
005fd20c                                  void* edi_44 = ((char*)edi_43 + 4);
005fd20c                                  void* esi_19 = ((char*)esi_18 + 4);
005fd20d                                  *(uint32_t*)edi_44 = *(uint32_t*)esi_19;
005fd20d                                  void* edi_45 = ((char*)edi_44 + 4);
005fd20d                                  void* esi_20 = ((char*)esi_19 + 4);
005fd20e                                  *(uint32_t*)edi_45 = *(uint32_t*)esi_20;
005fd20f                                  *(uint32_t*)((char*)edi_45 + 4) = *(uint32_t*)((char*)esi_20 + 4);
005fd210                              } while (k_1 < 4);
005fd210                              
005fd212                              j += 1;
005fd216                          } while (j < 4);
005fd216                          
005fd218                          edi_29 = arg3;
005fd21b                          esi_1 = var_8_1;
005fd1e6                      }
005fd1e6                      
005fd21e                      int32_t eax_41 = 0;
005fd21e                      
005fd22b                      if ((*(uint32_t*)((char*)this + 0xfc) != 0 || *(uint32_t*)((char*)this + 0x5c) != 0))
005fd22f                          eax_41 = 1;
005fd22f                      
005fd235                      *(uint32_t*)((char*)this + 0x90)(edi_29, arg4, eax_41);
005fd23b                      i_2 += 4;
005fd23f                      edi_29 += *(uint32_t*)((char*)this + 0x88);
005fd248                      arg4 = &arg4[0x10];
005fd255                      arg3 = edi_29;
005fd258                  } while (i_2 < *(uint32_t*)((char*)this + 0xcc));
005fd16d              }
005fd16d              
005fd284              if (((&esi_1[2] >= (*(uint32_t*)((char*)this + 0xf8) + ((*(uint32_t*)((char*)this + 0xe4) * *(uint32_t*)((char*)this + 0xe0)) << 3)) || esi_1[2] != 0) || esi_1[3] != 0))
005fd284              {
005fd294                  operator delete(esi_1[1]);
005fd299                  *(uint32_t*)((char*)this + 0xf4) -= 1;
005fd284              }
005fd284              else
005fd284              {
005fd289                  esi_1[3] = esi_1[1];
005fd28c                  esi_1[1] = 0;
005fd284              }
005fd284              
005fd2a0              esi_1[1] = 0;
005fd12e          }
005fcf59      }
005fce8a  }


005fd2ab  void __thiscall D3DXTex::CCodecDXT::Decode(D3DXTex::CCodecDXT* this, uint32_t arg2, uint32_t arg3, struct D3DXCOLOR* arg4)

005fd2ab  {
005fd2b8      int32_t edi;
005fd2b8      int32_t var_38 = edi;
005fd2be      int32_t esi_1 = (arg2 + *(uint32_t*)((char*)this + 0x40));
005fd2c1      int32_t edi_2 = (arg3 + *(uint32_t*)((char*)this + 0x4c));
005fd2cb      uint32_t eax_5;
005fd2cb      
005fd2cb      if (*(uint32_t*)((char*)this + 0xf0) == 0)
005fd2cb      {
005fd2d3          int32_t eax_2 = (*(uint32_t*)((char*)this + 0xdc) << 4);
005fd2dd          void* eax_4 = operator new((eax_2 << 4));
005fd2dd          
005fd2e8          if (eax_4 == 0)
005fd2ff              eax_5 = 0;
005fd2e8          else
005fd2e8          {
005fd2f5              `vector constructor iterator'(eax_4, 0x10, eax_2, D3DXMesh::NeighborInfo<uint16_t>::NeighborInfo<uint16_t>);
005fd2fa              eax_5 = eax_4;
005fd2e8          }
005fd2e8          
005fd303          *(uint32_t*)((char*)this + 0xf0) = eax_5;
005fd2cb      }
005fd2cb      
005fd309      if ((*(uint32_t*)((char*)this + 0xf0) != 0 || eax_5 != 0))
005fd309      {
005fd317          int32_t eax_7 = (esi_1 & 0xfffffffc);
005fd317          
005fd324          if ((eax_7 != *(uint32_t*)((char*)this + 0xe8) || edi_2 != *(uint32_t*)((char*)this + 0xec)))
005fd324          {
005fd326              *(uint32_t*)((char*)this + 0xe8) = eax_7;
005fd328              int32_t i_3 = *(uint32_t*)((char*)this + 0xc4);
005fd34b              uint32_t eax_12 = (((((eax_7 >> 2) * *(uint32_t*)((char*)this + 0x60)) + ((i_3 >> 2) * *(uint32_t*)((char*)this + 0x88))) + (*(uint32_t*)((char*)this + 0x64) * edi_2)) + *(uint32_t*)((char*)this + 0x20));
005fd34e              *(uint32_t*)((char*)this + 0xec) = edi_2;
005fd354              arg2 = eax_12;
005fd35d              arg3 = *(uint32_t*)((char*)this + 0xf0);
005fd35d              
005fd389              for (int32_t i = i_3; i < *(uint32_t*)((char*)this + 0xcc); i += 4)
005fd389              {
005fd36a                  *(uint32_t*)((char*)this + 0x8c)(arg3, arg2);
005fd376                  arg2 += *(uint32_t*)((char*)this + 0x88);
005fd379                  arg3 += 0x100;
005fd389              }
005fd324          }
005fd324          
005fd394          int32_t i_1 = (*(uint32_t*)((char*)this + 0x3c) - *(uint32_t*)((char*)this + 0xc4));
005fd39d          struct D3DXCOLOR* i_2 = arg4;
005fd3a0          uint32_t esi_3 = ((esi_1 - *(uint32_t*)((char*)this + 0xc8)) & 3);
005fd3a0          
005fd3aa          for (int32_t ecx_3 = (*(uint32_t*)((char*)this + 0x68) + i_1); i_1 < ecx_3; i_1 += 1)
005fd3aa          {
005fd3c1              struct D3DXCOLOR* esi_10 = ((((((i_1 & 0xfffffffc) | esi_3) << 2) | (i_1 & 3)) << 4) + *(uint32_t*)((char*)this + 0xf0));
005fd3c9              i_2->r = esi_10->r;
005fd3c9              float* edi_6 = &i_2->g;
005fd3c9              float* esi_11 = &esi_10->g;
005fd504              ADJ(edi_6)->g = ADJ(esi_11)->g;
005fd3ca              float* edi_7 = &edi_6[1];
005fd3ca              float* esi_12 = &esi_11[1];
005fd504              ADJ(edi_7)->b = ADJ(esi_12)->b;
005fd3cc              i_2 = &i_2[1];
005fd3cb              edi_7[1] = (&esi_12[1] - 0xc)->a;
005fd3aa          }
005fd3aa          
005fd3d7          if (*(uint32_t*)((char*)this + 0x18) != 0)
005fd3d7          {
005fd3e5              struct D3DXCOLOR* i_4 = i_2;
005fd3e7              i_2 = &i_2[-(*(uint32_t*)((char*)this + 0x68))];
005fd3e9              int16_t x87control;
005fd3e9              int16_t x87status_1;
005fd3e9              int16_t temp0_1;
005fd3e9              temp0_1 = __fnstcw_memmem16(x87control);
005fd3e9              arg4 = temp0_1;
005fd3f7              int16_t x87control_1;
005fd3f7              int16_t x87status_2;
005fd3f7              x87control_1 = __fldcw_memmem16((arg4 | 0xc00));
005fd3fd              *(uint32_t*)((char*)this + 0x7c) = arg4;
005fd3fd              
005fd50a              for (; i_2 < i_4; i_2 = &i_2[1])
005fd50a              {
005fd4ac                  long double x87_r7_25 = ((long double)*(uint32_t*)((char*)this + 0x24));
005fd4af                  long double x87_r6_1 = ((long double)((float)(((long double)((int32_t)((long double)((float)((((long double)i_2->r) * ((long double)31f)) + ((long double)0.5f)))))) * ((long double)0.0322580636f))));
005fd4b2                  (x87_r6_1 - x87_r7_25);
005fd4b4                  int32_t eax_25;
005fd4b4                  eax_25 = ((((x87_r6_1 < x87_r7_25) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_25))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_25) ? 1 : 0) << 0xe) | 0))));
005fd4b6                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005fd4b6                  
005fd4b9                  if (!(p_1))
005fd4b9                  {
005fd4bb                      long double x87_r7_26 = ((long double)*(uint32_t*)((char*)this + 0x28));
005fd4be                      long double x87_r6_2 = ((long double)((float)(((long double)((int32_t)((long double)((float)((((long double)i_2->g) * ((long double)63f)) + ((long double)0.5f)))))) * ((long double)0.0158730168f))));
005fd4c1                      (x87_r6_2 - x87_r7_26);
005fd4c3                      eax_25 = ((((x87_r6_2 < x87_r7_26) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, x87_r7_26))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == x87_r7_26) ? 1 : 0) << 0xe) | 0))));
005fd4c5                      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
005fd4c5                      
005fd4c8                      if (!(p_2))
005fd4c8                      {
005fd4ca                          long double x87_r7_27 = ((long double)*(uint32_t*)((char*)this + 0x2c));
005fd4cd                          long double x87_r6_3 = ((long double)((float)(((long double)((int32_t)((long double)((float)((((long double)i_2->b) * ((long double)31f)) + ((long double)0.5f)))))) * ((long double)0.0322580636f))));
005fd4d0                          (x87_r6_3 - x87_r7_27);
005fd4d2                          eax_25 = ((((x87_r6_3 < x87_r7_27) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, x87_r7_27))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == x87_r7_27) ? 1 : 0) << 0xe) | 0))));
005fd4d4                          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
005fd4d4                          
005fd4d7                          if (!(p_3))
005fd4d7                          {
005fd4d9                              long double x87_r7_28 = ((long double)*(uint32_t*)((char*)this + 0x30));
005fd4dc                              long double x87_r6_4 = ((long double)((float)(((long double)((int32_t)((long double)((float)((((long double)i_2->a) * ((long double)*(uint32_t*)((char*)this + 0x80))) + ((long double)0.5f)))))) * ((long double)*(uint32_t*)((char*)this + 0x84)))));
005fd4df                              (x87_r6_4 - x87_r7_28);
005fd4e1                              eax_25 = ((((x87_r6_4 < x87_r7_28) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, x87_r7_28))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == x87_r7_28) ? 1 : 0) << 0xe) | 0))));
005fd4e3                              bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
005fd4e3                              
005fd4e6                              if (!(p_4))
005fd4e6                              {
005fd4f4                                  float var_28 = ((float)((long double)0));
005fd4f9                                  float var_24_1 = ((float)((long double)0));
005fd4fe                                  float var_20_1 = ((float)((long double)0));
005fd501                                  i_2->r = ((float)((long double)0));
005fd501                                  float* edi_11 = &i_2->g;
005fd501                                  float* esi_15 = &var_28;
005fd504                                  ADJ(edi_11)->g = *(uint32_t*)esi_15;
005fd502                                  float* edi_12 = &edi_11[1];
005fd502                                  float* esi_16 = &esi_15[1];
005fd504                                  ADJ(edi_12)->b = *(uint32_t*)esi_16;
005fd504                                  (&edi_12[1] - 0xc)->a = esi_16[1];
005fd4e6                              }
005fd4d7                          }
005fd4c8                      }
005fd4b9                  }
005fd50a              }
005fd50a              
005fd516              int16_t x87control_2;
005fd516              int16_t x87status_3;
005fd516              x87control_2 = __fldcw_memmem16(*(uint32_t*)((char*)this + 0x7c));
005fd3d7          }
005fd3d7          
005fd51d          if (*(uint32_t*)((char*)this + 0x10) != 0)
005fd52a              D3DXTex::CCodec::DecodeGamma22(this, ((char*)i_2 - (*(uint32_t*)((char*)this + 0x68) << 4)));
005fd309      }
005fd2ab  }


005fd536  void __thiscall D3DXTex::CCodec_R8G8_B8G8::CCodec_R8G8_B8G8(D3DXTex::CCodec_R8G8_B8G8* this, struct D3DX_BLT* arg2)

005fd536  {
005fd541      D3DXTex::CCodecYUV::CCodecYUV(this, arg2);
005fd546      *(uint32_t*)this = 0x7ed0dc;
005fd536  }


005fd553  void __thiscall D3DXTex::CCodec_DXT4::CCodec_DXT4(D3DXTex::CCodec_DXT4* this, struct D3DX_BLT* arg2)

005fd553  {
005fd55e      D3DXTex::CCodecDXT::CCodecDXT(this, arg2);
005fd563      *(uint32_t*)this = 0x7ece08;
005fd553  }


005fd570  class D3DXTex::CCodec* __stdcall D3DXTex::CCodec::Create(struct D3DX_BLT* arg1)

005fd570  {
005fd576      int32_t edi;
005fd576      int32_t var_c = edi;
005fd57a      int32_t eax = *(uint32_t*)((char*)arg1 + 4);
005fd584      D3DXTex::CCodec* result_1;
005fd584      
005fd584      if (eax > 0x31545844)
005fdc32          switch (eax)
005fdc32          {
005fdb42              case 0x32545844:
005fdb42              {
005fdbf2                  D3DXTex::CCodec_DXT4* eax_62 = operator new(0x100);
005fdbf2                  
005fdbfa                  if (eax_62 == 0)
005fdbfa                      goto label_5fdcb3;
005fdbfa                  
005fdc03                  result_1 = D3DXTex::CCodec_DXT4::CCodec_DXT4(eax_62, arg1);
005fdc08                  goto label_5fdcaf;
005fdb42              }
005fdb4d              case 0x32595559:
005fdb4d              {
005fdbd2                  D3DXTex::CCodec_R8G8_B8G8* eax_61 = operator new(0xb0);
005fdbd2                  
005fdbda                  if (eax_61 == 0)
005fdbda                      goto label_5fdcb3;
005fdbda                  
005fdbe3                  result_1 = D3DXTex::CCodec_R8G8_B8G8::CCodec_R8G8_B8G8(eax_61, arg1);
005fdbe8                  goto label_5fdcaf;
005fdb4d              }
005fdb54              case 0x33545844:
005fdb54              {
005fdbb2                  D3DXTex::CCodec_DXT4* eax_60 = operator new(0x100);
005fdbb2                  
005fdbba                  if (eax_60 == 0)
005fdbba                      goto label_5fdcb3;
005fdbba                  
005fdbc3                  result_1 = D3DXTex::CCodec_DXT4::CCodec_DXT4(eax_60, arg1);
005fdbc8                  goto label_5fdcaf;
005fdb54              }
005fdb5b              case 0x34545844:
005fdb5b              {
005fdb92                  D3DXTex::CCodec_DXT4* eax_59 = operator new(0x100);
005fdb92                  
005fdb9a                  if (eax_59 == 0)
005fdb9a                      goto label_5fdcb3;
005fdb9a                  
005fdba3                  result_1 = D3DXTex::CCodec_DXT4::CCodec_DXT4(eax_59, arg1);
005fdba8                  goto label_5fdcaf;
005fdb5b              }
005fdb62              case 0x35545844:
005fdb62              {
005fdb72                  D3DXTex::CCodec_DXT4* eax_58 = operator new(0x100);
005fdb72                  
005fdb7a                  if (eax_58 == 0)
005fdb7a                      goto label_5fdcb3;
005fdb7a                  
005fdb83                  result_1 = D3DXTex::CCodec_DXT4::CCodec_DXT4(eax_58, arg1);
005fdb88                  goto label_5fdcaf;
005fdb62              }
005fdb34              case 0x36314c41:
005fdb34              {
005fdc12                  D3DXTex::CCodec_D3DX_A16L16* eax_63 = operator new(0x80);
005fdc12                  
005fdc1a                  if (eax_63 == 0)
005fdc1a                      goto label_5fdcb3;
005fdc1a                  
005fdc23                  result_1 = D3DXTex::CCodec_D3DX_A16L16::CCodec_D3DX_A16L16(eax_63, arg1);
005fdc28                  goto label_5fdcaf;
005fdb34              }
005fdc2d              case 0x36315220:
005fdc2d              {
005fdc9d                  D3DXTex::CCodec_D3DX_R16G16B16* eax_67 = operator new(0x80);
005fdc9d                  
005fdca5                  if (eax_67 == 0)
005fdca5                      goto label_5fdcb3;
005fdca5                  
005fdcaa                  result_1 = D3DXTex::CCodec_D3DX_R16G16B16::CCodec_D3DX_R16G16B16(eax_67, arg1);
005fdcaa                  goto label_5fdcaf;
005fdc2d              }
005fdc34              case 0x42475247:
005fdc34              {
005fdc84                  D3DXTex::CCodec_R8G8_B8G8* eax_66 = operator new(0xb0);
005fdc84                  
005fdc8c                  if (eax_66 == 0)
005fdc8c                      goto label_5fdcb3;
005fdc8c                  
005fdc91                  result_1 = D3DXTex::CCodec_R8G8_B8G8::CCodec_R8G8_B8G8(eax_66, arg1);
005fdc96                  goto label_5fdcaf;
005fdc34              }
005fdc3b              case 0x47424752:
005fdc3b              {
005fdc6b                  D3DXTex::CCodec_R8G8_B8G8* eax_65 = operator new(0xb0);
005fdc6b                  
005fdc73                  if (eax_65 == 0)
005fdc73                      goto label_5fdcb3;
005fdc73                  
005fdc78                  result_1 = D3DXTex::CCodec_R8G8_B8G8::CCodec_R8G8_B8G8(eax_65, arg1);
005fdc7d                  goto label_5fdcaf;
005fdc3b              }
005fdc42              case 0x59565955:
005fdc42              {
005fdc52                  D3DXTex::CCodec_R8G8_B8G8* eax_64 = operator new(0xb0);
005fdc52                  
005fdc5a                  if (eax_64 == 0)
005fdc5a                      goto label_5fdcb3;
005fdc5a                  
005fdc5f                  result_1 = D3DXTex::CCodec_R8G8_B8G8::CCodec_R8G8_B8G8(eax_64, arg1);
005fdc64                  goto label_5fdcaf;
005fdc42              }
005fdc32          }
005fd584      else if (eax == 0x31545844)
005fd58a      {
005fdb14          D3DXTex::CCodec_DXT4* eax_57 = operator new(0x100);
005fdb1c          D3DXTex::CCodec* result;
005fdb1c          
005fdb1c          if (eax_57 == 0)
005fdb1c          {
005fdcb3          label_5fdcb3:
005fdcb3              result = nullptr;
005fdb1c          }
005fdb1c          else
005fdb1c          {
005fdb25              result_1 = D3DXTex::CCodec_DXT4::CCodec_DXT4(eax_57, arg1);
005fdcaf          label_5fdcaf:
005fdcaf              result = result_1;
005fdb1c          }
005fdb1c          
005fdcb7          if (result != 0)
005fdcb7          {
005fdcbd              long eax_68;
005fdcbd              int80_t st0_1;
005fdcbd              
005fdcbd              if (*(uint32_t*)((char*)result + 0x1c) != 0)
005fdcc2                  eax_68 = D3DXTex::CCodec::DecodePalette(result, arg1);
005fdcc2              
005fdcc9              if ((*(uint32_t*)((char*)result + 0x1c) == 0 || eax_68 >= 0))
005fdcc9              {
005fdcdb                  if (*(uint32_t*)((char*)result + 0x18) != 0)
005fdce1                      *(uint32_t*)(*(uint32_t*)result + 0xc)();
005fdce1                  
005fdce4                  return result;
005fdcc9              }
005fdcc9              
005fdcd1              **(uint32_t**)result(1);
005fdcb7          }
005fd58a      }
005fd58a      else if (eax <= 0x32)
005fd593      {
005fd599          if (eax == 0x32)
005fd599          {
005fd817              D3DXTex::CCodec_L8* eax_21 = operator new(0x80);
005fd817              
005fd81f              if (eax_21 == 0)
005fd81f                  goto label_5fdcb3;
005fd81f              
005fd828              result_1 = D3DXTex::CCodec_L8::CCodec_L8(eax_21, arg1);
005fd82d              goto label_5fdcaf;
005fd599          }
005fd599          
005fd5a5          if ((eax - 0x14) <= 0x15)
005fd5a5              switch (eax)
005fd5a5              {
005fd5b7                  case 0x14:
005fd5b7                  {
005fd5b7                      D3DXTex::CCodec_R8G8B8* eax_2 = operator new(0x80);
005fd5b7                      
005fd5bf                      if (eax_2 == 0)
005fd5bf                          goto label_5fdcb3;
005fd5bf                      
005fd5c8                      result_1 = D3DXTex::CCodec_R8G8B8::CCodec_R8G8B8(eax_2, arg1);
005fd5cd                      goto label_5fdcaf;
005fd5b7                  }
005fd5d7                  case 0x15:
005fd5d7                  {
005fd5d7                      D3DXTex::CCodec_A8R8G8B8* eax_3 = operator new(0x80);
005fd5d7                      
005fd5df                      if (eax_3 == 0)
005fd5df                          goto label_5fdcb3;
005fd5df                      
005fd5e8                      result_1 = D3DXTex::CCodec_A8R8G8B8::CCodec_A8R8G8B8(eax_3, arg1);
005fd5ed                      goto label_5fdcaf;
005fd5d7                  }
005fd5f7                  case 0x16:
005fd5f7                  {
005fd5f7                      D3DXTex::CCodec_X8R8G8B8* eax_4 = operator new(0x80);
005fd5f7                      
005fd5ff                      if (eax_4 == 0)
005fd5ff                          goto label_5fdcb3;
005fd5ff                      
005fd608                      result_1 = D3DXTex::CCodec_X8R8G8B8::CCodec_X8R8G8B8(eax_4, arg1);
005fd60d                      goto label_5fdcaf;
005fd5f7                  }
005fd617                  case 0x17:
005fd617                  {
005fd617                      D3DXTex::CCodec_R5G6B5* eax_5 = operator new(0x80);
005fd617                      
005fd61f                      if (eax_5 == 0)
005fd61f                          goto label_5fdcb3;
005fd61f                      
005fd628                      result_1 = D3DXTex::CCodec_R5G6B5::CCodec_R5G6B5(eax_5, arg1);
005fd62d                      goto label_5fdcaf;
005fd617                  }
005fd637                  case 0x18:
005fd637                  {
005fd637                      D3DXTex::CCodec_X1R5G5B5* eax_6 = operator new(0x80);
005fd637                      
005fd63f                      if (eax_6 == 0)
005fd63f                          goto label_5fdcb3;
005fd63f                      
005fd648                      result_1 = D3DXTex::CCodec_X1R5G5B5::CCodec_X1R5G5B5(eax_6, arg1);
005fd64d                      goto label_5fdcaf;
005fd637                  }
005fd657                  case 0x19:
005fd657                  {
005fd657                      D3DXTex::CCodec_A1R5G5B5* eax_7 = operator new(0x80);
005fd657                      
005fd65f                      if (eax_7 == 0)
005fd65f                          goto label_5fdcb3;
005fd65f                      
005fd668                      result_1 = D3DXTex::CCodec_A1R5G5B5::CCodec_A1R5G5B5(eax_7, arg1);
005fd66d                      goto label_5fdcaf;
005fd657                  }
005fd677                  case 0x1a:
005fd677                  {
005fd677                      D3DXTex::CCodec_A4R4G4B4* eax_8 = operator new(0x80);
005fd677                      
005fd67f                      if (eax_8 == 0)
005fd67f                          goto label_5fdcb3;
005fd67f                      
005fd688                      result_1 = D3DXTex::CCodec_A4R4G4B4::CCodec_A4R4G4B4(eax_8, arg1);
005fd68d                      goto label_5fdcaf;
005fd677                  }
005fd697                  case 0x1b:
005fd697                  {
005fd697                      D3DXTex::CCodec_R3G3B2* eax_9 = operator new(0x80);
005fd697                      
005fd69f                      if (eax_9 == 0)
005fd69f                          goto label_5fdcb3;
005fd69f                      
005fd6a8                      result_1 = D3DXTex::CCodec_R3G3B2::CCodec_R3G3B2(eax_9, arg1);
005fd6ad                      goto label_5fdcaf;
005fd697                  }
005fd6b7                  case 0x1c:
005fd6b7                  {
005fd6b7                      D3DXTex::CCodec_A8* eax_10 = operator new(0x80);
005fd6b7                      
005fd6bf                      if (eax_10 == 0)
005fd6bf                          goto label_5fdcb3;
005fd6bf                      
005fd6c8                      result_1 = D3DXTex::CCodec_A8::CCodec_A8(eax_10, arg1);
005fd6cd                      goto label_5fdcaf;
005fd6b7                  }
005fd6d7                  case 0x1d:
005fd6d7                  {
005fd6d7                      D3DXTex::CCodec_A8R3G3B2* eax_11 = operator new(0x80);
005fd6d7                      
005fd6df                      if (eax_11 == 0)
005fd6df                          goto label_5fdcb3;
005fd6df                      
005fd6e8                      result_1 = D3DXTex::CCodec_A8R3G3B2::CCodec_A8R3G3B2(eax_11, arg1);
005fd6ed                      goto label_5fdcaf;
005fd6d7                  }
005fd6f7                  case 0x1e:
005fd6f7                  {
005fd6f7                      D3DXTex::CCodec_X4R4G4B4* eax_12 = operator new(0x80);
005fd6f7                      
005fd6ff                      if (eax_12 == 0)
005fd6ff                          goto label_5fdcb3;
005fd6ff                      
005fd708                      result_1 = D3DXTex::CCodec_X4R4G4B4::CCodec_X4R4G4B4(eax_12, arg1);
005fd70d                      goto label_5fdcaf;
005fd6f7                  }
005fd717                  case 0x1f:
005fd717                  {
005fd717                      D3DXTex::CCodec_A2B10G10R10* eax_13 = operator new(0x80);
005fd717                      
005fd71f                      if (eax_13 == 0)
005fd71f                          goto label_5fdcb3;
005fd71f                      
005fd728                      result_1 = D3DXTex::CCodec_A2B10G10R10::CCodec_A2B10G10R10(eax_13, arg1);
005fd72d                      goto label_5fdcaf;
005fd717                  }
005fd737                  case 0x20:
005fd737                  {
005fd737                      D3DXTex::CCodec_A8B8G8R8* eax_14 = operator new(0x80);
005fd737                      
005fd73f                      if (eax_14 == 0)
005fd73f                          goto label_5fdcb3;
005fd73f                      
005fd748                      result_1 = D3DXTex::CCodec_A8B8G8R8::CCodec_A8B8G8R8(eax_14, arg1);
005fd74d                      goto label_5fdcaf;
005fd737                  }
005fd757                  case 0x21:
005fd757                  {
005fd757                      D3DXTex::CCodec_X8B8G8R8* eax_15 = operator new(0x80);
005fd757                      
005fd75f                      if (eax_15 == 0)
005fd75f                          goto label_5fdcb3;
005fd75f                      
005fd768                      result_1 = D3DXTex::CCodec_X8B8G8R8::CCodec_X8B8G8R8(eax_15, arg1);
005fd76d                      goto label_5fdcaf;
005fd757                  }
005fd777                  case 0x22:
005fd777                  {
005fd777                      D3DXTex::CCodec_G16R16* eax_16 = operator new(0x80);
005fd777                      
005fd77f                      if (eax_16 == 0)
005fd77f                          goto label_5fdcb3;
005fd77f                      
005fd788                      result_1 = D3DXTex::CCodec_G16R16::CCodec_G16R16(eax_16, arg1);
005fd78d                      goto label_5fdcaf;
005fd777                  }
005fd797                  case 0x23:
005fd797                  {
005fd797                      D3DXTex::CCodec_A2R10G10B10* eax_17 = operator new(0x80);
005fd797                      
005fd79f                      if (eax_17 == 0)
005fd79f                          goto label_5fdcb3;
005fd79f                      
005fd7a8                      result_1 = D3DXTex::CCodec_A2R10G10B10::CCodec_A2R10G10B10(eax_17, arg1);
005fd7ad                      goto label_5fdcaf;
005fd797                  }
005fd7b7                  case 0x24:
005fd7b7                  {
005fd7b7                      D3DXTex::CCodec_A16B16G16R16* eax_18 = operator new(0x80);
005fd7b7                      
005fd7bf                      if (eax_18 == 0)
005fd7bf                          goto label_5fdcb3;
005fd7bf                      
005fd7c8                      result_1 = D3DXTex::CCodec_A16B16G16R16::CCodec_A16B16G16R16(eax_18, arg1);
005fd7cd                      goto label_5fdcaf;
005fd7b7                  }
005fd7d7                  case 0x28:
005fd7d7                  {
005fd7d7                      D3DXTex::CCodec_A8P8* eax_19 = operator new(0x80);
005fd7d7                      
005fd7df                      if (eax_19 == 0)
005fd7df                          goto label_5fdcb3;
005fd7df                      
005fd7e8                      result_1 = D3DXTex::CCodec_A8P8::CCodec_A8P8(eax_19, arg1);
005fd7ed                      goto label_5fdcaf;
005fd7d7                  }
005fd7f7                  case 0x29:
005fd7f7                  {
005fd7f7                      void* eax_20 = operator new(0x80);
005fd7f7                      
005fd7ff                      if (eax_20 == 0)
005fd7ff                          goto label_5fdcb3;
005fd7ff                      
005fd808                      result_1 = D3DXTex::CCodec_P8::CCodec_P8(eax_20, arg1);
005fd80d                      goto label_5fdcaf;
005fd7f7                  }
005fd5a5              }
005fd593      }
005fd593      else
005fd907          switch (eax)
005fd907          {
005fd850              case 0x33:
005fd850              {
005fd8c9                  D3DXTex::CCodec_A8L8* eax_29 = operator new(0x80);
005fd8c9                  
005fd8d1                  if (eax_29 == 0)
005fd8d1                      goto label_5fdcb3;
005fd8d1                  
005fd8da                  result_1 = D3DXTex::CCodec_A8L8::CCodec_A8L8(eax_29, arg1);
005fd8df                  goto label_5fdcaf;
005fd850              }
005fd855              case 0x34:
005fd855              {
005fd8a9                  D3DXTex::CCodec_A4L4* eax_28 = operator new(0x80);
005fd8a9                  
005fd8b1                  if (eax_28 == 0)
005fd8b1                      goto label_5fdcb3;
005fd8b1                  
005fd8ba                  result_1 = D3DXTex::CCodec_A4L4::CCodec_A4L4(eax_28, arg1);
005fd8bf                  goto label_5fdcaf;
005fd855              }
005fd858              case 0x3c:
005fd858              {
005fd889                  D3DXTex::CCodec_V8U8* eax_27 = operator new(0x80);
005fd889                  
005fd891                  if (eax_27 == 0)
005fd891                      goto label_5fdcb3;
005fd891                  
005fd89a                  result_1 = D3DXTex::CCodec_V8U8::CCodec_V8U8(eax_27, arg1);
005fd89f                  goto label_5fdcaf;
005fd858              }
005fd85d              case 0x3d:
005fd85d              {
005fd869                  D3DXTex::CCodec_L6V5U5* eax_26 = operator new(0x80);
005fd869                  
005fd871                  if (eax_26 == 0)
005fd871                      goto label_5fdcb3;
005fd871                  
005fd87a                  result_1 = D3DXTex::CCodec_L6V5U5::CCodec_L6V5U5(eax_26, arg1);
005fd87f                  goto label_5fdcaf;
005fd85d              }
005fd841              case 0x3e:
005fd841              {
005fd8e9                  D3DXTex::CCodec_X8L8V8U8* eax_30 = operator new(0x80);
005fd8e9                  
005fd8f1                  if (eax_30 == 0)
005fd8f1                      goto label_5fdcb3;
005fd8f1                  
005fd8fa                  result_1 = D3DXTex::CCodec_X8L8V8U8::CCodec_X8L8V8U8(eax_30, arg1);
005fd8ff                  goto label_5fdcaf;
005fd841              }
005fd904              case 0x3f:
005fd904              {
005fd97f                  D3DXTex::CCodec_Q8W8V8U8* eax_38 = operator new(0x80);
005fd97f                  
005fd987                  if (eax_38 == 0)
005fd987                      goto label_5fdcb3;
005fd987                  
005fd990                  result_1 = D3DXTex::CCodec_Q8W8V8U8::CCodec_Q8W8V8U8(eax_38, arg1);
005fd995                  goto label_5fdcaf;
005fd904              }
005fd909              case 0x40:
005fd909              {
005fd95f                  D3DXTex::CCodec_V16U16* eax_37 = operator new(0x80);
005fd95f                  
005fd967                  if (eax_37 == 0)
005fd967                      goto label_5fdcb3;
005fd967                  
005fd970                  result_1 = D3DXTex::CCodec_V16U16::CCodec_V16U16(eax_37, arg1);
005fd975                  goto label_5fdcaf;
005fd909              }
005fd90c              case 0x43:
005fd90c              {
005fd93f                  D3DXTex::CCodec_A2W10V10U10* eax_36 = operator new(0x80);
005fd93f                  
005fd947                  if (eax_36 == 0)
005fd947                      goto label_5fdcb3;
005fd947                  
005fd950                  result_1 = D3DXTex::CCodec_A2W10V10U10::CCodec_A2W10V10U10(eax_36, arg1);
005fd955                  goto label_5fdcaf;
005fd90c              }
005fd911              case 0x46:
005fd911              {
005fd91f                  D3DXTex::CCodec_D16_LOCKABLE* eax_35 = operator new(0x80);
005fd91f                  
005fd927                  if (eax_35 == 0)
005fd927                      goto label_5fdcb3;
005fd927                  
005fd930                  result_1 = D3DXTex::CCodec_D16_LOCKABLE::CCodec_D16_LOCKABLE(eax_35, arg1);
005fd935                  goto label_5fdcaf;
005fd911              }
005fd832              case 0x51:
005fd832              {
005fd99f                  D3DXTex::CCodec_D16_LOCKABLE* eax_39 = operator new(0x80);
005fd99f                  
005fd9a7                  if (eax_39 == 0)
005fd9a7                      goto label_5fdcb3;
005fd9a7                  
005fd9b0                  result_1 = D3DXTex::CCodec_D16_LOCKABLE::CCodec_D16_LOCKABLE(eax_39, arg1);
005fd9b5                  goto label_5fdcaf;
005fd832              }
005fd9c9              case 0x52:
005fd9c9              {
005fda42                  D3DXTex::CCodec_D32F_LOCKABLE* eax_47 = operator new(0x80);
005fda42                  
005fda4a                  if (eax_47 == 0)
005fda4a                      goto label_5fdcb3;
005fda4a                  
005fda53                  result_1 = D3DXTex::CCodec_D32F_LOCKABLE::CCodec_D32F_LOCKABLE(eax_47, arg1);
005fda58                  goto label_5fdcaf;
005fd9c9              }
005fd9ce              case 0x6e:
005fd9ce              {
005fda22                  D3DXTex::CCodec_Q16W16V16U16* eax_46 = operator new(0x80);
005fda22                  
005fda2a                  if (eax_46 == 0)
005fda2a                      goto label_5fdcb3;
005fda2a                  
005fda33                  result_1 = D3DXTex::CCodec_Q16W16V16U16::CCodec_Q16W16V16U16(eax_46, arg1);
005fda38                  goto label_5fdcaf;
005fd9ce              }
005fd9d3              case 0x6f:
005fd9d3              {
005fda02                  D3DXTex::CCodec_R16F* eax_45 = operator new(0x80);
005fda02                  
005fda0a                  if (eax_45 == 0)
005fda0a                      goto label_5fdcb3;
005fda0a                  
005fda13                  result_1 = D3DXTex::CCodec_R16F::CCodec_R16F(eax_45, arg1);
005fda18                  goto label_5fdcaf;
005fd9d3              }
005fd9d6              case 0x70:
005fd9d6              {
005fd9e2                  D3DXTex::CCodec_G16R16F* eax_44 = operator new(0x80);
005fd9e2                  
005fd9ea                  if (eax_44 == 0)
005fd9ea                      goto label_5fdcb3;
005fd9ea                  
005fd9f3                  result_1 = D3DXTex::CCodec_G16R16F::CCodec_G16R16F(eax_44, arg1);
005fd9f8                  goto label_5fdcaf;
005fd9d6              }
005fd9ba              case 0x71:
005fd9ba              {
005fda62                  D3DXTex::CCodec_A16B16G16R16F* eax_48 = operator new(0x80);
005fda62                  
005fda6a                  if (eax_48 == 0)
005fda6a                      goto label_5fdcb3;
005fda6a                  
005fda73                  result_1 = D3DXTex::CCodec_A16B16G16R16F::CCodec_A16B16G16R16F(eax_48, arg1);
005fda78                  goto label_5fdcaf;
005fd9ba              }
005fda7d              case 0x72:
005fda7d              {
005fdaf4                  D3DXTex::CCodec_D32F_LOCKABLE* eax_56 = operator new(0x80);
005fdaf4                  
005fdafc                  if (eax_56 == 0)
005fdafc                      goto label_5fdcb3;
005fdafc                  
005fdb05                  result_1 = D3DXTex::CCodec_D32F_LOCKABLE::CCodec_D32F_LOCKABLE(eax_56, arg1);
005fdb0a                  goto label_5fdcaf;
005fda7d              }
005fda82              case 0x73:
005fda82              {
005fdad4                  D3DXTex::CCodec_G32R32F* eax_55 = operator new(0x80);
005fdad4                  
005fdadc                  if (eax_55 == 0)
005fdadc                      goto label_5fdcb3;
005fdadc                  
005fdae5                  result_1 = D3DXTex::CCodec_G32R32F::CCodec_G32R32F(eax_55, arg1);
005fdaea                  goto label_5fdcaf;
005fda82              }
005fda85              case 0x74:
005fda85              {
005fdab4                  D3DXTex::CCodec_A32B32G32R32F* eax_54 = operator new(0x80);
005fdab4                  
005fdabc                  if (eax_54 == 0)
005fdabc                      goto label_5fdcb3;
005fdabc                  
005fdac5                  result_1 = D3DXTex::CCodec_A32B32G32R32F::CCodec_A32B32G32R32F(eax_54, arg1);
005fdaca                  goto label_5fdcaf;
005fda85              }
005fda88              case 0x75:
005fda88              {
005fda94                  D3DXTex::CCodec_CxV8U8* eax_53 = operator new(0x80);
005fda94                  
005fda9c                  if (eax_53 == 0)
005fda9c                      goto label_5fdcb3;
005fda9c                  
005fdaa5                  result_1 = D3DXTex::CCodec_CxV8U8::CCodec_CxV8U8(eax_53, arg1);
005fdaaa                  goto label_5fdcaf;
005fda88              }
005fd907          }
005fdcd3      return nullptr;
005fd570  }

005fdcec  uint32_t jump_table_5fdcec[0x16] = 
005fdcec  {
005fdcec      [0x00] =  0x005fd5b2
005fdcf0      [0x01] =  0x005fd5d2
005fdcf4      [0x02] =  0x005fd5f2
005fdcf8      [0x03] =  0x005fd612
005fdcfc      [0x04] =  0x005fd632
005fdd00      [0x05] =  0x005fd652
005fdd04      [0x06] =  0x005fd672
005fdd08      [0x07] =  0x005fd692
005fdd0c      [0x08] =  0x005fd6b2
005fdd10      [0x09] =  0x005fd6d2
005fdd14      [0x0a] =  0x005fd6f2
005fdd18      [0x0b] =  0x005fd712
005fdd1c      [0x0c] =  0x005fd732
005fdd20      [0x0d] =  0x005fd752
005fdd24      [0x0e] =  0x005fd772
005fdd28      [0x0f] =  0x005fd792
005fdd2c      [0x10] =  0x005fd7b2
005fdd30      [0x11] =  0x005fdcd3
005fdd34      [0x12] =  0x005fdcd3
005fdd38      [0x13] =  0x005fdcd3
005fdd3c      [0x14] =  0x005fd7d2
005fdd40      [0x15] =  0x005fd7f2
005fdd44  }

005fdd44  void* __thiscall D3DXTex::CCodec_UYVY::`scalar deleting destructor'(D3DXTex::CCodec_UYVY* this, uint32_t arg2)

005fdd44  {
005fdd4c      D3DXTex::CCodecYUV::~CCodecYUV(this);
005fdd4c      
005fdd55      if ((arg2 & 1) != 0)
005fdd58          operator delete(this);
005fdd58      
005fdd62      return this;
005fdd44  }


005fdd65  void __stdcall c_D3DXPSGPUpdateSkinnedMesh(struct D3DXMATRIX const* arg1, struct D3DXMATRIX const* arg2, uint8_t* arg3, uint8_t* arg4, unsigned long arg5, unsigned long arg6, uint8_t** arg7, uint8_t** arg8, uint8_t* arg9, unsigned long arg10, float* arg11)

005fdd65  {
005fdd78      uint32_t esi_1 = (arg10 * 0xc);
005fdd80      int32_t edi;
005fdd80      int32_t var_348 = edi;
005fdd81      struct D3DXMATRIX* ecx;
005fdd81      ecx = esi_1 != arg6;
005fdd89      uint32_t var_30 = esi_1;
005fdd8c      struct D3DXMATRIX* var_2c = ecx;
005fdd8c      
005fdd8f      if (arg2 == 0)
005fdd94          arg2 = arg1;
005fdd94      
005fdd9a      float var_18;
005fdd9a      float var_14;
005fdd9a      float var_10;
005fdd9a      
005fdd9a      if (arg10 != 2)
005fdd9a      {
005fdf57      label_5fdf57:
005fdf57          int32_t var_c_2 = 0;
005fdf57          
005fdf5a          if (arg5 > 0)
005fdf5a          {
005fdf67              while (true)
005fdf67              {
005fdf67                  float* esi_6 = arg11;
005fdf7e                  void s;
005fdf7e                  __builtin_memset(__builtin_memset(&s, 0, ((esi_1 >> 2) << 2)), 0, (esi_1 & 3));
005fdf7e                  
005fe05d                  while (true)
005fe05d                  {
005fe05d                      long double x87_r7_40 = ((long double)*(uint32_t*)esi_6);
005fe05f                      long double temp1_1 = ((long double)0f);
005fe05f                      (x87_r7_40 - temp1_1);
005fe065                      int32_t eax_17;
005fe065                      eax_17 = ((((x87_r7_40 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_40, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_40 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005fe065                      
005fe06a                      if ((*(uint8_t*)((char*)eax_17)[1] & 1) != 0)
005fe06a                          break;
005fe06a                      
005fdf85                      *(uint32_t*)esi_6;
005fdf8e                      uint32_t ebx_3 = (_ftol2() >> 1);
005fdf90                      eax_17 = (ebx_3 * 2);
005fdf98                      long double x87_r7_26 = ((long double)eax_17);
005fdf98                      
005fdf9b                      if (eax_17 < 0)
005fdf9d                          x87_r7_26 = (x87_r7_26 + ((long double)4.2949673e+09f));
005fdf9d                      
005fdfa5                      char* esi_7 = nullptr;
005fdfaa                      float var_8_3 = ((float)(((long double)*(uint32_t*)esi_6) - x87_r7_26));
005fdfaa                      
005fdfad                      if (arg10 > 0)
005fdfad                      {
005fdfb3                          void var_334;
005fdfb3                          float* edi_6 = &var_334;
005fdfb3                          
005fe04e                          do
005fe04e                          {
005fdfbc                              uint8_t* eax_19;
005fdfbc                              eax_19 = *(uint8_t*)(esi_7 + arg9);
005fdfbc                              
005fdfc1                              if (eax_19 == 0)
005fe00e                                  _D3DXVec3TransformCoord@12(&var_18, arg7[esi_7], &arg1[ebx_3]);
005fdfc1                              else
005fdfc1                              {
005fdfc5                                  void* eax_22;
005fdfc5                                  
005fdfc5                                  if (eax_19 == 3)
005fdff6                                      eax_22 = &arg2[ebx_3];
005fdfc5                                  else
005fdfc5                                  {
005fdfc9                                      if (eax_19 <= 5)
005fe0dc                                          return;
005fe0dc                                      
005fdfd1                                      if (eax_19 > 7)
005fe0dc                                          return;
005fe0dc                                      
005fdfdc                                      eax_22 = &arg1[ebx_3];
005fdfc5                                  }
005fdfc5                                  
005fdfea                                  _D3DXVec3TransformNormal@12(&var_18, arg7[esi_7], eax_22);
005fdfc1                              }
005fdfc1                              
005fe016                              esi_7 = &esi_7[1];
005fe01a                              var_18 = ((float)(((long double)var_18) * ((long double)var_8_3)));
005fe023                              var_14 = ((float)(((long double)var_14) * ((long double)var_8_3)));
005fe02c                              var_10 = ((float)(((long double)var_10) * ((long double)var_8_3)));
005fe035                              edi_6[-2] = ((float)(((long double)var_18) + ((long double)edi_6[-2])));
005fe03e                              edi_6[-1] = ((float)(((long double)var_14) + ((long double)edi_6[-1])));
005fe046                              *(uint32_t*)edi_6 = ((float)(((long double)var_10) + ((long double)*(uint32_t*)edi_6)));
005fe048                              edi_6 = &edi_6[3];
005fe04e                          } while (esi_7 < arg10);
005fdfad                      }
005fdfad                      
005fe057                      esi_6 = &arg11[1];
005fe05a                      arg11 = esi_6;
005fe05d                  }
005fe05d                  
005fe074                  if (var_2c != 0)
005fe074                  {
005fe07c                      uint8_t* edi_7 = arg4;
005fe081                      arg4 = &arg4[arg6];
005fe087                      int32_t esi_10;
005fe087                      int32_t edi_8;
005fe087                      edi_8 = __builtin_memcpy(edi_7, arg3, ((arg6 >> 2) << 2));
005fe08e                      arg3 = &arg3[arg6];
005fe091                      __builtin_memcpy(edi_8, esi_10, (arg6 & 3));
005fe074                  }
005fe074                  
005fe098                  if (arg10 > 0)
005fe098                  {
005fe09a                      uint8_t** eax_31 = arg8;
005fe0a0                      void* ebx_4 = &s;
005fe0a6                      int32_t* edx_4 = ((char*)arg7 - eax_31);
005fe0a8                      unsigned long i_2 = arg10;
005fe0c3                      unsigned long i;
005fe0c3                      
005fe0c3                      do
005fe0c3                      {
005fe0ab                          uint8_t* edi_9 = *(uint32_t*)eax_31;
005fe0b2                          *(uint32_t*)edi_9 = *(uint32_t*)ebx_4;
005fe0b2                          void* edi_10 = &edi_9[4];
005fe0b2                          void* esi_12 = ((char*)ebx_4 + 4);
005fe0b3                          *(uint32_t*)edi_10 = *(uint32_t*)esi_12;
005fe0b4                          *(uint32_t*)((char*)edi_10 + 4) = *(uint32_t*)((char*)esi_12 + 4);
005fe0b5                          *(uint32_t*)eax_31 = &*(uint32_t*)eax_31[arg6];
005fe0b7                          *(uint32_t*)((char*)edx_4 + eax_31) += arg6;
005fe0ba                          ebx_4 += 0xc;
005fe0bd                          eax_31 = &eax_31[1];
005fe0c0                          i = i_2;
005fe0c0                          i_2 -= 1;
005fe0c3                      } while (i != 1);
005fe098                  }
005fe098                  
005fe0c5                  arg11 = &arg11[1];
005fe0c9                  var_c_2 += 1;
005fe0c9                  
005fe0d2                  if (var_c_2 >= arg5)
005fe0d2                      break;
005fe0d2                  
005fdf62                  esi_1 = var_30;
005fdf67              }
005fdf5a          }
005fdd9a      }
005fdd9a      else
005fdd9a      {
005fdda0          char* eax_1 = arg9;
005fdda3          ecx = *(uint8_t*)eax_1;
005fddad          float* var_c_1;
005fddad          uint8_t* var_8_1;
005fddad          uint8_t* ecx_1;
005fddad          float* edx_1;
005fddad          uint8_t* ebx_1;
005fddad          
005fddad          if ((ecx != 0 || eax_1[1] != 3))
005fddad          {
005fddd4              if ((eax_1[1] != 0 || ecx != 3))
005fddcb                  goto label_5fdf57;
005fddcb              
005fdddd              ecx_1 = arg7[1];
005fdde2              var_8_1 = *(uint32_t*)arg7;
005fdde5              float** eax_7 = arg8;
005fdde8              ebx_1 = eax_7[1];
005fddeb              float* eax_8 = *(uint32_t*)eax_7;
005fdded              var_c_1 = eax_8;
005fddf0              edx_1 = eax_8;
005fddf0              goto label_5fddf4;
005fddad          }
005fddad          
005fddb2          ecx_1 = *(uint32_t*)arg7;
005fddb7          var_8_1 = arg7[1];
005fddbd          edx_1 = arg8[1];
005fddc0          ebx_1 = *(uint32_t*)arg8;
005fddc2          var_c_1 = edx_1;
005fddf4      label_5fddf4:
005fddf4          uint8_t* var_1c_1 = ecx_1;
005fddf4          
005fddf7          if (ecx_1 == 0)
005fddf7              goto label_5fdf57;
005fddf7          
005fde02          if (arg5 > 0)
005fde02          {
005fde08              arg7 = arg5;
005fdf49              uint8_t** i_1;
005fdf49              
005fdf49              do
005fdf49              {
005fde12                  if (var_2c != 0)
005fde12                  {
005fde1a                      uint8_t* edi_1 = arg4;
005fde1f                      arg4 = &arg4[arg6];
005fde25                      int32_t esi_3;
005fde25                      int32_t edi_2;
005fde25                      edi_2 = __builtin_memcpy(edi_1, arg3, ((arg6 >> 2) << 2));
005fde2c                      arg3 = &arg3[arg6];
005fde2f                      __builtin_memcpy(edi_2, esi_3, (arg6 & 3));
005fde12                  }
005fde12                  
005fde31                  float* esi_4 = arg11;
005fde36                  *(uint32_t*)ebx_1 = ((float)((long double)0));
005fde3a                  *(uint32_t*)(ebx_1 + 4) = ((float)((long double)0));
005fde3f                  *(uint32_t*)(ebx_1 + 8) = ((float)((long double)0));
005fde44                  *(uint32_t*)edx_1 = ((float)((long double)0));
005fde48                  edx_1[1] = ((float)((long double)0));
005fde4d                  edx_1[2] = ((float)((long double)0));
005fde50                  long double x87_r7_7 = ((long double)*(uint32_t*)esi_4);
005fde52                  long double temp2_1 = ((long double)0f);
005fde52                  (x87_r7_7 - temp2_1);
005fde58                  unsigned long eax_9;
005fde58                  eax_9 = ((((x87_r7_7 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005fde58                  
005fde5d                  if ((*(uint8_t*)((char*)eax_9)[1] & 1) == 0)
005fde5d                  {
005fdf27                      float* eax_16;
005fdf27                      
005fdf27                      do
005fdf27                      {
005fde63                          *(uint32_t*)esi_4;
005fde6a                          uint32_t eax_11 = (_ftol2() >> 1);
005fde6c                          uint32_t ecx_6 = (eax_11 * 2);
005fde74                          long double x87_r7_9 = ((long double)ecx_6);
005fde74                          
005fde77                          if (ecx_6 < 0)
005fde79                              x87_r7_9 = (x87_r7_9 + ((long double)4.2949673e+09f));
005fde79                          
005fde81                          uint32_t eax_12 = (eax_11 << 6);
005fde8b                          arg11 = ((float)(((long double)*(uint32_t*)esi_4) - x87_r7_9));
005fde96                          _D3DXVec3TransformCoord@12(&var_18, var_1c_1, ((char*)arg1 + eax_12));
005fdea8                          float var_28;
005fdea8                          _D3DXVec3TransformNormal@12(&var_28, var_8_1, (eax_12 + arg2));
005fdead                          long double x87_r7_11 = ((long double)arg11);
005fdeb8                          esi_4 = &esi_4[1];
005fdebb                          var_18 = ((float)(((long double)var_18) * x87_r7_11));
005fdec3                          var_14 = ((float)(((long double)var_14) * x87_r7_11));
005fdecb                          var_10 = ((float)(((long double)var_10) * x87_r7_11));
005fded3                          var_28 = ((float)(((long double)var_28) * x87_r7_11));
005fdedb                          float var_24 = ((float)(((long double)var_24) * x87_r7_11));
005fdee3                          float var_20 = ((float)(((long double)var_20) * x87_r7_11));
005fdeed                          *(uint32_t*)ebx_1 = ((float)(((long double)var_18) + ((long double)*(uint32_t*)ebx_1)));
005fdef5                          *(uint32_t*)(ebx_1 + 4) = ((float)(((long double)var_14) + ((long double)*(uint32_t*)(ebx_1 + 4))));
005fdefe                          *(uint32_t*)(ebx_1 + 8) = ((float)(((long double)var_10) + ((long double)*(uint32_t*)(ebx_1 + 8))));
005fdf06                          *(uint32_t*)var_c_1 = ((float)(((long double)var_28) + ((long double)*(uint32_t*)var_c_1)));
005fdf0e                          var_c_1[1] = ((float)(((long double)var_24) + ((long double)var_c_1[1])));
005fdf17                          var_c_1[2] = ((float)(((long double)var_20) + ((long double)var_c_1[2])));
005fdf1a                          long double x87_r7_24 = ((long double)*(uint32_t*)esi_4);
005fdf1c                          long double temp4_1 = ((long double)0f);
005fdf1c                          (x87_r7_24 - temp4_1);
005fdf22                          eax_16 = ((((x87_r7_24 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_24, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_24 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005fdf27                      } while ((*(uint8_t*)((char*)eax_16)[1] & 1) == 0);
005fdf2d                      edx_1 = var_c_1;
005fde5d                  }
005fde5d                  
005fdf33                  var_1c_1 = &var_1c_1[arg6];
005fdf36                  var_8_1 = &var_8_1[arg6];
005fdf39                  edx_1 += arg6;
005fdf3e                  ebx_1 = &ebx_1[arg6];
005fdf40                  i_1 = arg7;
005fdf40                  arg7 -= 1;
005fdf43                  var_c_1 = edx_1;
005fdf46                  arg11 = &esi_4[1];
005fdf49              } while (i_1 != 1);
005fde02          }
005fdd9a      }
005fdd65  }


005fe0df  void __stdcall CalculateEdgeControlPoint(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3* arg2, struct D3DXVECTOR3* arg3, float arg4, struct D3DXVECTOR3* arg5)

005fe0df  {
005fe0f1      int32_t edi;
005fe0f1      int32_t var_18 = edi;
005fe0f7      arg5->x = arg1->x;
005fe0f7      float* edi_2 = &arg5->y;
005fe0f7      float* esi_1 = &arg1->y;
005fe0fa      ADJ(edi_2)->y = ADJ(esi_1)->y;
005fe0fa      (&edi_2[1] - 8)->z = (&esi_1[1] - 8)->z;
005fe100      arg5->x = ((float)(((long double)arg5->x) - ((long double)arg2->x)));
005fe108      arg5->y = ((float)(((long double)arg5->y) - ((long double)arg2->y)));
005fe10e      long double x87_r7_5 = (((long double)arg5->z) - ((long double)arg2->z));
005fe111      arg5->z = ((float)x87_r7_5);
005fe125      long double x87_r6_3 = (((x87_r7_5 * ((long double)arg3->z)) + (((long double)arg3->x) * ((long double)arg5->x))) + (((long double)arg5->y) * ((long double)arg3->y)));
005fe12b      float var_10 = ((float)(x87_r6_3 * ((long double)arg3->x)));
005fe133      float var_c = ((float)(x87_r6_3 * ((long double)arg3->y)));
005fe13d      arg5->z = ((float)(x87_r7_5 - (x87_r6_3 * ((long double)arg3->z))));
005fe149      long double x87_r7_9 = ((((long double)arg5->x) - ((long double)var_10)) * ((long double)arg4));
005fe14c      arg5->x = ((float)x87_r7_9);
005fe154      long double x87_r6_7 = ((((long double)arg5->y) - ((long double)var_c)) * ((long double)arg4));
005fe157      arg5->y = ((float)x87_r6_7);
005fe160      arg5->z = ((float)(((long double)arg4) * ((long double)arg5->z)));
005fe167      arg5->x = ((float)(x87_r7_9 + ((long double)arg2->x)));
005fe16c      arg5->y = ((float)(x87_r6_7 + ((long double)arg2->y)));
005fe177      arg5->z = ((float)(((long double)arg2->z) + ((long double)arg5->z)));
005fe0df  }


005fe17e  void __stdcall c_D3DXPSGPTessellateNPatch(struct D3DXVECTOR3* arg1, struct D3DXVECTOR2* arg2, unsigned long arg3, float* arg4, float* arg5, float* arg6, float* arg7, unsigned long arg8)

005fe17e  {
005fe197      int32_t edi;
005fe197      int32_t var_1d8 = edi;
005fe19b      float var_7c = *(uint32_t*)arg5;
005fe19b      float var_78;
005fe19b      int32_t* edi_1 = &var_78;
005fe19b      void* esi_1 = &arg5[1];
005fe19c      *(uint32_t*)edi_1 = *(uint32_t*)esi_1;
005fe19c      edi_1[1] = *(uint32_t*)((char*)esi_1 + 4);
005fe1a3      float var_34 = *(uint32_t*)arg6;
005fe1a3      float var_30;
005fe1a3      int32_t* edi_4 = &var_30;
005fe1a3      void* esi_5 = &arg6[1];
005fe1a4      *(uint32_t*)edi_4 = *(uint32_t*)esi_5;
005fe1a4      edi_4[1] = *(uint32_t*)((char*)esi_5 + 4);
005fe1ac      float var_10 = *(uint32_t*)arg7;
005fe1ac      float var_c;
005fe1ac      int32_t* edi_7 = &var_c;
005fe1ac      void* esi_9 = &arg7[1];
005fe1ad      *(uint32_t*)edi_7 = *(uint32_t*)esi_9;
005fe1b2      int32_t ecx;
005fe1b2      int32_t var_1e0 = ecx;
005fe1ad      edi_7[1] = *(uint32_t*)((char*)esi_9 + 4);
005fe1d2      float var_70;
005fe1d2      int32_t var_1e0_2 = CalculateEdgeControlPoint(&var_34, &var_7c, arg1, ((float)((long double)0.333333343f)), &var_70);
005fe1ee      float var_64;
005fe1ee      int32_t var_1e0_4 = CalculateEdgeControlPoint(&var_10, &var_7c, arg1, ((float)((long double)0.333333343f)), &var_64);
005fe20d      float var_58;
005fe20d      int32_t var_1e0_6 = CalculateEdgeControlPoint(&var_7c, &var_34, &arg1[1], ((float)((long double)0.333333343f)), &var_58);
005fe22c      float var_40;
005fe22c      int32_t var_1e0_8 = CalculateEdgeControlPoint(&var_7c, &var_10, &arg1[2], ((float)((long double)0.333333343f)), &var_40);
005fe248      float var_28;
005fe248      int32_t var_1e0_10 = CalculateEdgeControlPoint(&var_10, &var_34, &arg1[1], ((float)((long double)0.333333343f)), &var_28);
005fe255      float var_1c;
005fe255      CalculateEdgeControlPoint(&var_34, &var_10, &arg1[2], ((float)((long double)0.333333343f)), &var_1c);
005fe260      float var_4c = var_70;
005fe260      float var_48;
005fe260      int32_t* edi_11 = &var_48;
005fe260      void var_6c;
005fe260      void* esi_14 = &var_6c;
005fe261      *(uint32_t*)edi_11 = *(uint32_t*)esi_14;
005fe261      edi_11[1] = *(uint32_t*)((char*)esi_14 + 4);
005fe28c      float var_5c;
005fe28c      float var_50;
005fe28c      float var_44;
005fe28c      long double x87_r6_3 = (((long double)var_50) + ((long double)((float)(((long double)var_5c) + ((long double)var_44)))));
005fe295      float var_4c_2 = ((float)(((long double)var_40) + ((long double)((float)(((long double)var_58) + (((long double)var_64) + ((long double)var_4c)))))));
005fe29d      float var_60;
005fe29d      float var_3c;
005fe29d      var_48 = ((float)(((long double)var_3c) + (((long double)var_60) + ((long double)var_48))));
005fe2ac      long double x87_r6_5 = (((long double)var_28) + ((long double)var_4c_2));
005fe2b5      float var_24;
005fe2b5      var_48 = ((float)(((long double)var_24) + ((long double)var_48)));
005fe2bd      float var_20;
005fe2bd      float var_44_2 = ((float)(((long double)var_20) + x87_r6_3));
005fe2c5      float var_4c_3 = ((float)(((long double)var_1c) + x87_r6_5));
005fe2d2      float var_18;
005fe2d2      var_48 = ((float)(((long double)var_18) + ((long double)var_48)));
005fe2db      long double x87_r6_6 = ((long double)0.25f);
005fe2e6      float var_4c_4 = ((float)(((long double)var_4c_3) * x87_r6_6));
005fe2ee      var_48 = ((float)(((long double)var_48) * x87_r6_6));
005fe2fc      long double x87_r6_8 = (((long double)var_34) + ((long double)var_7c));
005fe302      long double x87_r5_25 = (((long double)var_30) + ((long double)var_78));
005fe30b      float var_74;
005fe30b      float var_2c;
005fe30b      float var_80 = ((float)(((long double)var_2c) + ((long double)var_74)));
005fe325      void* __offset(D3DXVECTOR3, 0x1) eax = nullptr;
005fe32d      arg1 = nullptr;
005fe336      long double x87_r5_28 = ((long double)0.166666001f);
005fe342      long double x87_r4_7 = (((long double)((float)(((long double)var_10) + x87_r6_8))) * x87_r5_28);
005fe348      float var_84 = ((float)(x87_r5_25 * x87_r5_28));
005fe353      float var_8;
005fe353      var_80 = ((float)(((long double)((float)(((long double)var_8) + ((long double)var_80)))) * x87_r5_28));
005fe35b      float var_4c_5 = ((float)(((long double)var_4c_4) - x87_r4_7));
005fe36a      var_48 = ((float)(((long double)var_48) - ((long double)var_84)));
005fe370      float var_44_3 = ((float)(x87_r4_7 - ((long double)var_80)));
005fe370      
005fe373      if (arg3 > 0)
005fe373      {
005fe379          long double x87_r7_19 = ((long double)3f);
005fe379          
005fe4c8          do
005fe4c8          {
005fe382              int32_t eax_1 = (eax << 3);
005fe385              long double x87_r6_13 = ((long double)*(uint32_t*)(eax_1 + arg2));
005fe388              int32_t i = 0;
005fe38a              long double x87_r5_30 = ((long double)*(uint32_t*)(&arg2->y + eax_1));
005fe38e              float* eax_2 = &var_78;
005fe395              long double x87_r4_10 = ((((long double)1) - x87_r6_13) - x87_r5_30);
005fe399              long double x87_r3_7 = (x87_r5_30 * x87_r5_30);
005fe39f              float var_bc_1 = ((float)(x87_r3_7 * x87_r5_30));
005fe3a7              long double x87_r2_4 = (x87_r4_10 * x87_r5_30);
005fe3b0              float var_b8_1 = ((float)((x87_r2_4 * x87_r5_30) * x87_r7_19));
005fe3ba              float var_b4_1 = ((float)((x87_r3_7 * x87_r6_13) * x87_r7_19));
005fe3c2              long double x87_r3_11 = (x87_r4_10 * x87_r4_10);
005fe3ca              float var_b0_1 = ((float)((x87_r3_11 * x87_r5_30) * x87_r7_19));
005fe3db              float var_ac_1 = ((float)((((long double)((float)x87_r2_4)) * x87_r6_13) * ((long double)6f)));
005fe3e9              float var_a8_1 = ((float)(((x87_r5_30 * x87_r6_13) * x87_r6_13) * x87_r7_19));
005fe3f3              float var_a4_1 = ((float)(x87_r3_11 * x87_r4_10));
005fe3fd              float var_a0_1 = ((float)((x87_r3_11 * x87_r6_13) * x87_r7_19));
005fe40b              float var_9c_1 = ((float)(((x87_r4_10 * x87_r6_13) * x87_r6_13) * x87_r7_19));
005fe417              float var_98_1 = ((float)((x87_r6_13 * x87_r6_13) * x87_r6_13));
005fe41d              long double x87_r3_21 = ((long double)0);
005fe41f              long double x87_r2_19 = ((long double)0);
005fe421              long double x87_r1_1 = ((long double)0);
005fe421              
005fe445              do
005fe445              {
005fe426                  int32_t __saved_ebp;
005fe426                  float* ecx_7 = &&__saved_ebp[(i - 0x2e)];
005fe42f                  i += 1;
005fe430                  x87_r3_21 = (x87_r3_21 + (((long double)eax_2[-1]) * ((long double)*(uint32_t*)ecx_7)));
005fe434                  long double x87_r0_7 = (((long double)*(uint32_t*)ecx_7) * ((long double)*(uint32_t*)eax_2));
005fe436                  eax_2 = &eax_2[3];
005fe43c                  x87_r2_19 = (x87_r2_19 + x87_r0_7);
005fe443                  x87_r1_1 = (x87_r1_1 + (((long double)eax_2[-2]) * ((long double)*(uint32_t*)ecx_7)));
005fe445              } while (i < 0xa);
005fe445              
005fe447              unsigned long edx_1 = arg8;
005fe44a              float var_1c4_1 = ((float)x87_r1_1);
005fe453              float var_1c8_1 = ((float)x87_r2_19);
005fe459              float var_1cc = ((float)x87_r3_21);
005fe459              
005fe45f              if (edx_1 > 3)
005fe45f              {
005fe473                  void* eax_3 = &arg6[3];
005fe476                  int32_t i_2 = (edx_1 - 3);
005fe492                  int32_t i_1;
005fe492                  
005fe492                  do
005fe492                  {
005fe48b                      *(uint32_t*)((&var_1cc - arg6) + eax_3) = ((float)(((x87_r6_13 * ((long double)*(uint32_t*)(((char*)arg7 - arg6) + eax_3))) + (x87_r5_30 * ((long double)*(uint32_t*)(((char*)arg5 - arg6) + eax_3)))) + (x87_r4_10 * ((long double)*(uint32_t*)eax_3))));
005fe48e                      eax_3 += 4;
005fe491                      i_1 = i_2;
005fe491                      i_2 -= 1;
005fe492                  } while (i_1 != 1);
005fe494                  edx_1 = arg8;
005fe45f              }
005fe45f              
005fe497              float* edi_16 = arg4;
005fe4a0              uint32_t eax_5 = (edx_1 << 2);
005fe4a3              x87_r7_19 = x87_r4_10;
005fe4a5              arg4 += eax_5;
005fe4b8              int32_t esi_19;
005fe4b8              int32_t edi_17;
005fe4b8              edi_17 = __builtin_memcpy(edi_16, &var_1cc, ((eax_5 >> 2) << 2));
005fe4bf              eax = (&arg1->x + 1);
005fe4c3              __builtin_memcpy(edi_17, esi_19, (eax_5 & 3));
005fe4c5              arg1 = eax;
005fe4c8          } while (eax < arg3);
005fe373      }
005fe17e  }


005fe4d7  int32_t __thiscall sub_5fe4d7(HKEY arg1, int32_t arg2, PSTR arg3)

005fe4d7  {
005fe4dc      HKEY var_8 = arg1;
005fe4dd      var_8 = nullptr;
005fe4dd      
005fe4f7      if (RegOpenKeyA(0x80000002, "Software\Microsoft\Direct3D", &var_8) == NO_ERROR)
005fe4f7      {
005fe50d          enum WIN32_ERROR eax_1 = RegQueryValueExA(var_8, arg3, nullptr, &arg_c, arg_c, &lpcbData);
005fe518          RegCloseKey(var_8);
005fe518          
005fe529          if ((eax_1 == NO_ERROR && arg_c == arg2))
005fe52d              return 1;
005fe4f7      }
005fe4f7      
005fe530      return 0;
005fe4d7  }


005fe536  int32_t __stdcall _asm_isMMX()

005fe536  {
005fe538      int32_t ebp;
005fe538      int32_t var_4 = ebp;
005fe53b      int32_t ecx;
005fe53b      int32_t var_8 = ecx;
005fe53c      int32_t ebx;
005fe53c      int32_t var_c = ebx;
005fe53d      int32_t esi;
005fe53d      int32_t var_10 = esi;
005fe53e      int32_t edi;
005fe53e      int32_t var_14 = edi;
005fe541      int32_t var_18 = 0;
005fe541      int32_t var_1c = ecx;
005fe541      int32_t var_24 = ebx;
005fe541      int32_t* var_28 = &var_24;
005fe541      int32_t* var_2c = &var_4;
005fe541      int32_t var_30 = esi;
005fe541      int32_t var_34 = edi;
005fe547      int32_t eax;
005fe547      int32_t ecx_1;
005fe547      int32_t edx;
005fe547      int32_t ebx_1;
005fe547      eax = __cpuid(1, ecx);
005fe550      int32_t eax_1;
005fe550      eax_1 = (edx & "activation type (%s) with '%s' b…") != 0;
005fe553      var_2c[-1] = eax_1;
005fe55c      *(uint32_t*)var_2c;
005fe55d      return var_2c[-1];
005fe536  }


005fe55e  int32_t __stdcall isMMXprocessor()

005fe55e  {
005fe566      int32_t edi;
005fe566      int32_t var_3c = edi;
005fe57f      HKEY hKey_1;
005fe57f      
005fe57f      if (RegOpenKeyA(0x80000002, "Software\Microsoft\Direct3D", &hKey_1) == NO_ERROR)
005fe57f      {
005fe593          HKEY hKey = hKey_1;
005fe596          int32_t lpcbData = 4;
005fe5b0          int32_t lpData;
005fe5b0          enum REG_VALUE_TYPE lpType;
005fe5b0          
005fe5b0          if ((RegQueryValueExA(hKey, "DisableMMX", nullptr, &lpType, &lpData, &lpcbData) == NO_ERROR && (lpType == REG_DWORD && lpData != 0)))
005fe5b0          {
005fe5b5              RegCloseKey(hKey_1);
005fe5bb              data_824d68 = 0;
005fe5c1              return 0;
005fe5b0          }
005fe5b0          
005fe5c8          RegCloseKey(hKey_1);
005fe57f      }
005fe57f      
005fe5d4      if (data_824d68 < 0)
005fe5d4      {
005fe5da          data_824d68 = 0;
005fe5e0          int16_t lpSystemInfo;
005fe5e0          GetSystemInfo(&lpSystemInfo);
005fe5f1          int16_t var_18;
005fe5f1          
005fe5f1          if (((lpSystemInfo == 0 && var_18 >= 5) && _asm_isMMX() != 0))
005fe5fe              data_824d68 = 1;
005fe5d4      }
005fe5d4      
005fe608      return data_824d68;
005fe55e  }


005fe610  int32_t __fastcall sub_5fe610(int32_t arg1)

005fe610  {
006b7d04      int32_t var_8_2 = 0xffffffff;
006b7d06      int32_t var_c = 0x6c2b5a;
006b7d0d      TEB* fsbase;
006b7d0d      int32_t var_10 = *(uint32_t*)fsbase;
006b7d12      *(uint32_t*)fsbase = &var_10;
006b7d21      void* const var_14_2 = &data_5fe61a;
005fe61a      int32_t var_14 = arg1;
005fe61e      uint32_t __security_cookie_1 = __security_cookie;
005fe629      int32_t __saved_edi;
005fe629      int32_t* var_14_1 = &__saved_edi;
005fe62c      int32_t result_1 = 0;
005fe638      int32_t var_2c;
005fe638      __builtin_strncpy(&var_2c, "Genu", 4);
005fe638      void var_28;
005fe638      void* edi = &var_28;
005fe638      char const* const esi = "ineIntel";
005fe639      *(uint32_t*)edi = *(uint32_t*)esi;
005fe639      void* edi_1 = ((char*)edi + 4);
005fe639      void* esi_1 = &esi[4];
005fe63a      *(uint32_t*)edi_1 = *(uint32_t*)esi_1;
005fe63b      *(uint8_t*)((char*)edi_1 + 4) = *(uint8_t*)((char*)esi_1 + 4);
005fe63c      int32_t var_8 = 0;
005fe642      int32_t eax;
005fe642      int32_t ecx;
005fe642      int32_t edx;
005fe642      int32_t ebx;
005fe642      eax = __cpuid(0, arg1);
005fe647      int32_t var_40 = ebx;
005fe64a      int32_t var_3c = edx;
005fe64d      int32_t var_38 = ecx;
005fe65e      int32_t var_8_1 = 0xffffffff;
005fe66d      int32_t result;
005fe66d      
005fe66d      if (eax != 0)
005fe66d      {
005fe679          int32_t eax_1;
005fe679          int32_t ecx_1;
005fe679          int32_t edx_1;
005fe679          int32_t ebx_1;
005fe679          eax_1 = __cpuid(1, ecx);
005fe67b          int32_t var_34_1 = eax_1;
005fe67e          int32_t var_30 = edx_1;
005fe67e          
005fe689          if ((var_30 & 0x2000000) != 0)
005fe691              result_1 |= 4;
005fe691          
005fe69c          if ((var_30 & 0x4000000) != 0)
005fe6a4              result_1 |= 8;
005fe6a4          
005fe6a7          result = result_1;
005fe66d      }
005fe66d      else
005fe66f          result = result_1;
005fe66f      
005fe6ad      *(uint32_t*)fsbase = var_10;
005fe6b7      __security_check_cookie(__security_cookie_1);
005fe6c0      return result;
005fe610  }

005fe652                                                        8b 45 ec 89 45 c0 b8 64 e6 5f 00 c3                          .E..E..d._..
005fe664              8b 45 c0 eb 41                                                                           .E..A

005fe6c1  int32_t __fastcall _D3DXCpuOptimizations@4(int32_t arg1)

005fe6c1  {
005fe6c6      int32_t var_8 = arg1;
005fe6c7      int32_t var_c = arg1;
005fe6c9      int32_t edi;
005fe6c9      int32_t var_14 = edi;
005fe6ca      D3DXCheckNewDelete();
005fe6ca      
005fe6d3      if (arg_4 == 0)
005fe6d3      {
005fe6e2          g_CpuOptimization = 0xffff;
005fe6ec          __builtin_memcpy(0x8241d8, 0x824300, 0x128);
005fe6d3      }
005fe6d3      else if (g_CpuOptimization == 0xffff)
005fe6fd      {
005fe703          g_CpuOptimization = 0;
005fe71b          __builtin_memcpy(0x8241d8, 0x824300, 0x128);
005fe71d          x86_D3DXInitFastTable(&g_D3DXFastTable);
005fe725          int32_t var_1c_1 = 4;
005fe729          int32_t* var_20_1 = &arg_4;
005fe730          int32_t eax_1;
005fe730          HKEY ecx;
005fe730          eax_1 = sub_5fe4d7(x86_D3DXVec4Transform, 4, "DisablePSGP");
005fe730          
005fe737          if (eax_1 == 0)
005fe739              arg_4 &= eax_1;
005fe739          
005fe73c          int32_t var_1c_2 = 4;
005fe740          int32_t* var_20_2 = &var_8;
005fe747          int32_t eax_2;
005fe747          int32_t ecx_1;
005fe747          eax_2 = sub_5fe4d7(ecx, 4, "DisableD3DXPSGP");
005fe747          
005fe74e          if (eax_2 != 0)
005fe753              arg_4 = var_8;
005fe753          
005fe75a          if (arg_4 != 1)
005fe75a          {
005fe768              if (arg_4 == 2)
005fe768              {
005fe789              label_5fe789:
005fe789                  int32_t eax_6 = (sub_5fe610(ecx_1) & 8);
005fe78c                  int32_t var_c_1 = eax_6;
005fe78c                  
005fe78f                  if (eax_6 == 0)
005fe78f                  {
005fe7a5                      if (IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE) != 0)
005fe7a5                      {
005fe7a8                          sse_D3DXInitFastTable(&g_D3DXFastTable);
005fe7ad                          g_CpuOptimization = 3;
005fe7a5                      }
005fe78f                  }
005fe78f                  else
005fe78f                  {
005fe792                      sse2_D3DXInitFastTable(&g_D3DXFastTable);
005fe797                      g_CpuOptimization = 2;
005fe78f                  }
005fe768              }
005fe768              else
005fe768              {
005fe76c                  BOOL eax_4;
005fe76c                  eax_4 = IsProcessorFeaturePresent(PF_3DNOW_INSTRUCTIONS_AVAILABLE);
005fe76c                  
005fe770                  if (eax_4 == 0)
005fe770                      goto label_5fe789;
005fe770                  
005fe773                  x3d_D3DXInitFastTable(&g_D3DXFastTable);
005fe778                  g_CpuOptimization = 1;
005fe768              }
005fe75a          }
005fe6fd      }
005fe6fd      
005fe7c1      return g_CpuOptimization;
005fe6c1  }


005fe7c4  void __thiscall D3DXMesh::CD3DXCrackDecl::CD3DXCrackDecl(D3DXMesh::CD3DXCrackDecl* this)

005fe7c4  {
005fe7c6      int32_t edi;
005fe7c6      int32_t var_4 = edi;
005fe7d1      __builtin_memset(((char*)this + 0x48), 0, 0x40);
005fe7c4  }


005fe7d7  long __thiscall D3DXMesh::CD3DXCrackDecl::SetDeclaration(D3DXMesh::CD3DXCrackDecl* this, struct _D3DVERTEXELEMENT9 const* arg2)

005fe7d7  {
005fe7e0      struct _D3DVERTEXELEMENT9** this_1 = this;
005fe7e3      *(uint32_t*)this_1 = arg2;
005fe7ea      this_1[1] = _D3DXGetDeclLength@4(arg2);
005fe7f1      return 0;
005fe7d7  }


005fe7f4  long __thiscall D3DXMesh::CD3DXCrackDecl::SetStreamSource(D3DXMesh::CD3DXCrackDecl* this, uint32_t arg2, void* arg3, uint32_t arg4)

005fe7f4  {
005fe7fd      int32_t edi;
005fe7fd      int32_t var_c = edi;
005fe803      *(uint32_t*)(((char*)this + (arg2 << 2)) + 8) = arg3;
005fe807      uint32_t eax_1 = arg4;
005fe807      
005fe80c      if (eax_1 == 0)
005fe811          eax_1 = _D3DXGetDeclVertexSize@8(*(uint32_t*)this, arg2);
005fe811      
005fe816      *(uint32_t*)(((char*)this + (arg2 << 2)) + 0x48) = eax_1;
005fe81f      return 0;
005fe7f4  }


005fe822  uint8_t* __thiscall D3DXMesh::CD3DXCrackDecl::GetElementPointer(D3DXMesh::CD3DXCrackDecl* this, struct _D3DVERTEXELEMENT9 const* arg2, uint32_t arg3)

005fe822  {
005fe82b      uint32_t Stream = ((uint32_t)arg2->Stream);
005fe842      return (((*(uint32_t*)(((char*)this + (Stream << 2)) + 0x48) * arg3) + *(uint32_t*)(((char*)this + (Stream << 2)) + 8)) + ((uint32_t)arg2->Offset));
005fe822  }


005fe845  void __thiscall D3DXMesh::CD3DXCrackDecl::Decode(D3DXMesh::CD3DXCrackDecl* this, struct _D3DVERTEXELEMENT9 const* arg2, uint32_t arg3, float* arg4, uint32_t arg5)

005fe845  {
005fe853      int32_t edi;
005fe853      int32_t var_1c = edi;
005fe854      float var_14;
005fe854      float var_8_4;
005fe854      long double x87_r7_7;
005fe854      long double x87_r7_15;
005fe854      
005fe854      if (arg2 == 0)
005fe854      {
005febe2          var_14 = ((float)((long double)0));
005febe5      label_5febe5:
005febe5          x87_r7_7 = ((long double)0);
005febe7      label_5febe7:
005febe7          float var_10_13 = ((float)x87_r7_7);
005febea      label_5febea:
005febea          x87_r7_15 = ((long double)0);
005febec      label_5febec:
005febec          float var_c_10 = ((float)x87_r7_15);
005febf1          var_8_4 = ((float)((long double)1));
005fe854      }
005fe854      else
005fe854      {
005fe85e          uint8_t* eax_1 = D3DXMesh::CD3DXCrackDecl::GetElementPointer(this, arg2, arg3);
005fe870          float var_10_9;
005fe870          float var_8_2;
005fe870          struct _D3DVERTEXELEMENT9* esi;
005fe870          long double x87_r7_1;
005fe870          long double x87_r7_11;
005fe870          
005fe870          switch (((uint32_t)arg2->Type))
005fe870          {
005fe879              case 0:
005fe879              {
005fe879                  var_14 = *(uint32_t*)eax_1;
005fe87c                  goto label_5febe5;
005fe879              }
005fe883              case 1:
005fe883              {
005fe883                  var_14 = *(uint32_t*)eax_1;
005fe889                  int32_t var_10_1 = *(uint32_t*)(eax_1 + 4);
005fe88c                  goto label_5febea;
005fe883              }
005fe893              case 2:
005fe893              {
005fe893                  var_14 = *(uint32_t*)eax_1;
005fe899                  int32_t var_10_2 = *(uint32_t*)(eax_1 + 4);
005fe89f                  int32_t var_c_1 = *(uint32_t*)(eax_1 + 8);
005febf1                  var_8_4 = ((float)((long double)1));
005fe893                  break;
005fe893              }
005fe8a9              case 3:
005fe8a9              {
005fe8a9                  var_14 = *(uint32_t*)eax_1;
005fe8af                  int32_t var_10_3 = *(uint32_t*)(eax_1 + 4);
005fe8b5                  int32_t var_c_2 = *(uint32_t*)(eax_1 + 8);
005fe8bb                  int32_t var_8_1 = *(uint32_t*)(eax_1 + 0xc);
005fe8a9                  break;
005fe8a9              }
005fe8c7              case 4:
005fe8c7              {
005fe8c7                  x87_r7_1 = ((long double)0.00392156886f);
005fe8d5                  var_14 = ((float)(((long double)((uint32_t)eax_1[2])) * x87_r7_1));
005fe8e8                  float var_10_4 = ((float)(((long double)((uint32_t)((int8_t)(*(uint32_t*)eax_1 >> 8)))) * x87_r7_1));
005fe8f6                  float var_c_3 = ((float)(((long double)((uint32_t)*(uint8_t*)eax_1)) * x87_r7_1));
005fe905                  var_8_2 = ((float)(((long double)((uint32_t)eax_1[3])) * x87_r7_1));
005fe8c7                  break;
005fe8c7              }
005fe918              case 5:
005fe918              {
005fe918                  var_14 = ((float)((long double)((uint32_t)*(uint8_t*)eax_1)));
005fe925                  float var_10_5 = ((float)((long double)((uint32_t)eax_1[1])));
005fe932                  float var_c_4 = ((float)((long double)((uint32_t)eax_1[2])));
005febf1                  var_8_4 = ((float)((long double)((uint32_t)eax_1[3])));
005fe918                  break;
005fe918              }
005fe94d              case 6:
005fe94d              {
005fe94d                  var_14 = ((float)((long double)((int32_t)*(uint16_t*)eax_1)));
005fe957                  x87_r7_7 = ((long double)((int32_t)*(uint16_t*)(eax_1 + 2)));
005fe95a                  goto label_5febe7;
005fe94d              }
005fe968              case 7:
005fe968              {
005fe968                  var_14 = ((float)((long double)((int32_t)*(uint16_t*)eax_1)));
005fe975                  float var_10_6 = ((float)((long double)((int32_t)*(uint16_t*)(eax_1 + 2))));
005fe982                  float var_c_5 = ((float)((long double)((int32_t)*(uint16_t*)(eax_1 + 4))));
005febf1                  var_8_4 = ((float)((long double)((int32_t)*(uint16_t*)(eax_1 + 6))));
005fe968                  break;
005fe968              }
005fe997              case 8:
005fe997              {
005fe997                  x87_r7_1 = ((long double)0.00392156886f);
005fe9a5                  var_14 = ((float)(((long double)((uint32_t)*(uint8_t*)eax_1)) * x87_r7_1));
005fe9b4                  float var_10_7 = ((float)(((long double)((uint32_t)eax_1[1])) * x87_r7_1));
005fe9c3                  float var_c_6 = ((float)(((long double)((uint32_t)eax_1[2])) * x87_r7_1));
005fe905                  var_8_2 = ((float)(((long double)((uint32_t)eax_1[3])) * x87_r7_1));
005fe997                  break;
005fe997              }
005fe9d5              case 9:
005fe9d5              {
005fe9d5                  esi = *(uint16_t*)(eax_1 + 2);
005fe9d9                  x87_r7_11 = ((long double)3.05185094e-05f);
005fe9e1                  int16_t edx_1 = *(uint16_t*)eax_1;
005fe9ee                  int16_t eax_11;
005fe9ee                  eax_11 = edx_1 == 0x8000;
005fea01                  int16_t eax_14;
005fea01                  eax_14 = esi == 0x8000;
005fea06                  var_14 = ((float)(((long double)((int32_t)(eax_11 + edx_1))) * x87_r7_11));
005feabe                  var_10_9 = ((float)(((long double)((int32_t)(eax_14 + esi))) * x87_r7_11));
005feac3                  goto label_5febea;
005fe9d5              }
005fea19              case 0xa:
005fea19              {
005fea19                  esi = *(uint16_t*)(eax_1 + 2);
005fea1d                  long double x87_r7_12 = ((long double)3.05185094e-05f);
005fea25                  int16_t edx_2 = *(uint16_t*)eax_1;
005fea2b                  int32_t edi_1;
005fea2b                  edi_1 = *(uint16_t*)(eax_1 + 4);
005fea37                  int16_t ebx_1;
005fea37                  ebx_1 = edx_2 == 0x8000;
005fea3a                  eax_1 = *(uint16_t*)(eax_1 + 6);
005fea4e                  int16_t edx_4;
005fea4e                  edx_4 = esi == 0x8000;
005fea54                  var_14 = ((float)(((long double)((int32_t)(ebx_1 + edx_2))) * x87_r7_12));
005fea67                  int16_t edx_7;
005fea67                  edx_7 = edi_1 == 0x8000;
005fea6c                  float var_10_8 = ((float)(((long double)((int32_t)(edx_4 + esi))) * x87_r7_12));
005fea7f                  int16_t edx_10;
005fea7f                  edx_10 = eax_1 == 0x8000;
005fea84                  float var_c_7 = ((float)(((long double)((int32_t)(edx_7 + edi_1))) * x87_r7_12));
005fea94                  float var_8_3 = ((float)(((long double)((int32_t)(edx_10 + eax_1))) * x87_r7_12));
005fea19                  break;
005fea19              }
005feaa1              case 0xb:
005feaa1              {
005feaa1                  x87_r7_11 = ((long double)1.52590219e-05f);
005feaaf                  var_14 = ((float)(((long double)((uint32_t)*(uint16_t*)eax_1)) * x87_r7_11));
005feabe                  var_10_9 = ((float)(((long double)((uint32_t)*(uint16_t*)(eax_1 + 2))) * x87_r7_11));
005feac3                  goto label_5febea;
005feaa1              }
005feacb              case 0xc:
005feacb              {
005feacb                  x87_r7_1 = ((long double)1.52590219e-05f);
005fead9                  var_14 = ((float)(((long double)((uint32_t)*(uint16_t*)eax_1)) * x87_r7_1));
005feae8                  float var_10_10 = ((float)(((long double)((uint32_t)*(uint16_t*)(eax_1 + 2))) * x87_r7_1));
005feaf7                  float var_c_8 = ((float)(((long double)((uint32_t)*(uint16_t*)(eax_1 + 4))) * x87_r7_1));
005fe905                  var_8_2 = ((float)(((long double)((uint32_t)*(uint16_t*)(eax_1 + 6))) * x87_r7_1));
005feacb                  break;
005feacb              }
005feb10              case 0xd:
005feb10              {
005feb10                  struct _D3DVERTEXELEMENT9* edx_13 = (*(uint32_t*)eax_1 & 0x3ff);
005feb17                  long double x87_r7_13 = ((long double)edx_13);
005feb17                  
005feb1a                  if (edx_13 < 0)
005feb1c                      x87_r7_13 = (x87_r7_13 + ((long double)4.2949673e+09f));
005feb1c                  
005feb22                  var_14 = ((float)x87_r7_13);
005feb2a                  struct _D3DVERTEXELEMENT9* edx_16 = ((*(uint32_t*)eax_1 >> 0xa) & 0x3ff);
005feb31                  long double x87_r7_14 = ((long double)edx_16);
005feb31                  
005feb34                  if (edx_16 < 0)
005feb36                      x87_r7_14 = (x87_r7_14 + ((long double)4.2949673e+09f));
005feb36                  
005feb3c                  float var_10_11 = ((float)x87_r7_14);
005feb44                  struct _D3DVERTEXELEMENT9* eax_22 = ((*(uint32_t*)eax_1 >> 0x14) & 0x3ff);
005feb4b                  x87_r7_15 = ((long double)eax_22);
005feb4b                  
005feb4e                  if (eax_22 < 0)
005feb54                      x87_r7_15 = (x87_r7_15 + ((long double)4.2949673e+09f));
005feb54                  
005feb34                  goto label_5febec;
005feb10              }
005feb5f              case 0xe:
005feb5f              {
005feb5f                  int32_t eax_23 = *(uint32_t*)eax_1;
005feb61                  long double x87_r7_16 = ((long double)0.00195694715f);
005feb6e                  int32_t esi_3 = ((eax_23 << 0x16) >> 0x16);
005feb7b                  int32_t edi_4 = ((eax_23 << 0xc) >> 0x16);
005feb7e                  int32_t ecx_28 = ((eax_23 << 2) >> 0x16);
005feb88                  void* edx_17;
005feb88                  edx_17 = esi_3 == 0xfffffe00;
005feb97                  void* edx_19;
005feb97                  edx_19 = edi_4 == 0xfffffe00;
005feb9c                  var_14 = ((float)(((long double)((char*)edx_17 + esi_3)) * x87_r7_16));
005febab                  void* edx_21;
005febab                  edx_21 = ecx_28 == 0xfffffe00;
005febb0                  float var_10_12 = ((float)(((long double)((char*)edx_19 + edi_4)) * x87_r7_16));
005febbd                  float var_c_9 = ((float)(((long double)((char*)edx_21 + ecx_28)) * x87_r7_16));
005febf1                  var_8_4 = ((float)((long double)1));
005feb5f                  break;
005feb5f              }
005febcb              case 0xf:
005febcb              {
005febcb                  _D3DXFloat16To32Array@12(&var_14, eax_1, 2);
005febd0                  goto label_5febea;
005febcb              }
005febd9              case 0x10:
005febd9              {
005febd9                  _D3DXFloat16To32Array@12(&var_14, eax_1, 4);
005febd9                  break;
005febd9              }
005fe870          }
005fe854      }
005febf4      uint32_t ecx_29 = arg5;
005febf4      
005febfa      if (ecx_29 > 4)
005febfe          ecx_29 = 4;
005febfe      
005fec01      if (ecx_29 > 0)
005fec09          __builtin_memcpy(arg4, &var_14, (ecx_29 << 2));
005fe845  }

005fec11  uint32_t jump_table_5fec11[0x11] = 
005fec11  {
005fec11      [0x00] =  0x005fe877
005fec15      [0x01] =  0x005fe881
005fec19      [0x02] =  0x005fe891
005fec1d      [0x03] =  0x005fe8a7
005fec21      [0x04] =  0x005fe8c3
005fec25      [0x05] =  0x005fe90f
005fec29      [0x06] =  0x005fe944
005fec2d      [0x07] =  0x005fe95f
005fec31      [0x08] =  0x005fe994
005fec35      [0x09] =  0x005fe9d5
005fec39      [0x0a] =  0x005fea19
005fec3d      [0x0b] =  0x005fea9e
005fec41      [0x0c] =  0x005feac8
005fec45      [0x0d] =  0x005feb09
005fec49      [0x0e] =  0x005feb5f
005fec4d      [0x0f] =  0x005febc4
005fec51      [0x10] =  0x005febd2
005fec55  }

005fec55  void __thiscall D3DXMesh::CD3DXCrackDecl::Encode(D3DXMesh::CD3DXCrackDecl* this, struct _D3DVERTEXELEMENT9 const* arg2, uint32_t arg3, float const* arg4, uint32_t arg5)

005fec55  {
005fec5d      uint32_t i_6 = arg5;
005fec62      uint32_t i_7 = 0;
005fec67      int32_t edi;
005fec67      int32_t var_24 = edi;
005fec67      
005fec6b      if (i_6 > 4)
005fec6f          i_6 = 4;
005fec6f      
005fec73      uint32_t Type = ((uint32_t)arg2->Type);
005fec80      float var_18;
005fec80      int32_t __saved_ebp;
005fec80      uint32_t eax_2;
005fec80      
005fec80      if ((Type - 4) > 0xa)
005fec80      {
005fed40      label_5fed40:
005fed40          
005fed42          if (i_6 <= 0)
005fed42          {
005fed62              __builtin_memset(&&__saved_ebp[(i_7 - 5)], 0, ((3 - i_7) << 2));
005fed64              i_7 = (3 + (i_7 * 0));
005fed42          }
005fed42          else
005fed42          {
005fed4c              __builtin_memcpy(&var_18, arg4, (i_6 << 2));
005fed4e              i_7 = i_6;
005fed50          label_5fed50:
005fed50              
005fed53              if (i_6 < 3)
005fed53              {
005fed62                  __builtin_memset(&&__saved_ebp[(i_7 - 5)], 0, ((3 - i_7) << 2));
005fed64                  i_7 = (3 + (i_7 * 0));
005fed53              }
005fed42          }
005fec80      }
005fec80      else
005fec80          switch (Type)
005fec80          {
005fec96              case 4:
005fec96              case 8:
005fec96              case 0xb:
005fec96              case 0xc:
005fec96              {
005fec96                  if (i_6 > 0)
005fec96                  {
005fec9c                      float* esi_1 = arg4;
005feca2                      void* ecx = (&var_18 - esi_1);
005feca4                      uint32_t i_3 = i_6;
005feca6                      i_7 = i_6;
005feccf                      uint32_t i;
005feccf                      
005feccf                      do
005feccf                      {
005feca8                          long double x87_r7_1 = ((long double)0);
005fecaa                          long double temp1_1 = ((long double)*(uint32_t*)esi_1);
005fecaa                          (x87_r7_1 - temp1_1);
005fecac                          eax_2 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005fecb1                          long double x87_r7_2;
005fecb1                          
005fecb1                          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
005fecb1                          {
005fecb7                              long double x87_r7_3 = ((long double)1);
005fecb9                              long double temp4_1 = ((long double)*(uint32_t*)esi_1);
005fecb9                              (x87_r7_3 - temp4_1);
005fecbb                              eax_2 = ((((x87_r7_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005fecbd                              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005fecbd                              
005fecc0                              if (p_1)
005fecc6                                  x87_r7_2 = ((long double)*(uint32_t*)esi_1);
005fecc0                              else
005fecc2                                  x87_r7_2 = ((long double)1);
005fecb1                          }
005fecb1                          else
005fecb3                              x87_r7_2 = ((long double)0);
005fecb3                          
005fecc8                          *(uint32_t*)((char*)ecx + esi_1) = ((float)x87_r7_2);
005feccb                          esi_1 = &esi_1[1];
005fecce                          i = i_3;
005fecce                          i_3 -= 1;
005feccf                      } while (i != 1);
005feccf                      goto label_5fed50;
005fec96                  }
005fec96                  
005fed62                  __builtin_memset(&&__saved_ebp[(i_7 - 5)], 0, ((3 - i_7) << 2));
005fed64                  i_7 = (3 + (i_7 * 0));
005fec96                  break;
005fec96              }
005fed16              case 5:
005fed16              case 0xd:
005fed16              {
005fed16                  if (i_6 > 0)
005fed16                  {
005fed18                      float const* esi_3 = arg4;
005fed1e                      int32_t ecx_2 = (&var_18 - esi_3);
005fed20                      uint32_t i_5 = i_6;
005fed22                      i_7 = i_6;
005fed3c                      uint32_t i_1;
005fed3c                      
005fed3c                      do
005fed3c                      {
005fed24                          long double x87_r7_5 = ((long double)0);
005fed26                          long double temp3_1 = ((long double)*(uint32_t*)esi_3);
005fed26                          (x87_r7_5 - temp3_1);
005fed28                          eax_2 = ((((x87_r7_5 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005fed2d                          long double x87_r7_6;
005fed2d                          
005fed2d                          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
005fed33                              x87_r7_6 = ((long double)*(uint32_t*)esi_3);
005fed2d                          else
005fed2f                              x87_r7_6 = ((long double)0);
005fed2f                          
005fed35                          *(uint32_t*)((char*)esi_3 + ecx_2) = ((float)x87_r7_6);
005fed38                          esi_3 = &esi_3[1];
005fed3b                          i_1 = i_5;
005fed3b                          i_5 -= 1;
005fed3c                      } while (i_1 != 1);
005fed3c                      goto label_5fed50;
005fed16                  }
005fed16                  
005fed62                  __builtin_memset(&&__saved_ebp[(i_7 - 5)], 0, ((3 - i_7) << 2));
005fed64                  i_7 = (3 + (i_7 * 0));
005fed16                  break;
005fed16              }
005fec8d              case 6:
005fec8d              case 7:
005fec8d              {
005fec8d                  goto label_5fed40;
005fec8d              }
005fecd5              case 9:
005fecd5              case 0xa:
005fecd5              case 0xe:
005fecd5              {
005fecd5                  if (i_6 > 0)
005fecd5                  {
005fecd7                      float* esi_2 = arg4;
005fecda                      long double x87_r7_4 = ((long double)-1f);
005fece3                      void* ecx_1 = (&var_18 - esi_2);
005fece5                      uint32_t i_4 = i_6;
005fece7                      i_7 = i_6;
005fed0e                      uint32_t i_2;
005fed0e                      
005fed0e                      do
005fed0e                      {
005fece9                          long double temp2_1 = ((long double)*(uint32_t*)esi_2);
005fece9                          (x87_r7_4 - temp2_1);
005feceb                          eax_2 = ((((x87_r7_4 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
005fecf0                          long double x87_r6_1;
005fecf0                          
005fecf0                          if ((*(uint8_t*)((char*)eax_2)[1] & 0x41) != 0)
005fecf0                          {
005fecf6                              long double x87_r6_2 = ((long double)1);
005fecf8                              long double temp5_1 = ((long double)*(uint32_t*)esi_2);
005fecf8                              (x87_r6_2 - temp5_1);
005fecfa                              eax_2 = ((((x87_r6_2 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005fecfc                              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005fecfc                              
005fecff                              if (p_2)
005fed05                                  x87_r6_1 = ((long double)*(uint32_t*)esi_2);
005fecff                              else
005fed01                                  x87_r6_1 = ((long double)1);
005fecf0                          }
005fecf0                          else
005fecf2                              x87_r6_1 = x87_r7_4;
005fecf2                          
005fed07                          *(uint32_t*)((char*)esi_2 + ecx_1) = ((float)x87_r6_1);
005fed0a                          esi_2 = &esi_2[1];
005fed0d                          i_2 = i_4;
005fed0d                          i_4 -= 1;
005fed0e                      } while (i_2 != 1);
005fed0e                      goto label_5fed50;
005fecd5                  }
005fecd5                  
005fed62                  __builtin_memset(&&__saved_ebp[(i_7 - 5)], 0, ((3 - i_7) << 2));
005fed64                  i_7 = (3 + (i_7 * 0));
005fecd5                  break;
005fecd5              }
005fec80          }
005fed6b      int32_t ecx_6;
005fed6b      int32_t edi_3;
005fed6b      
005fed6b      if (i_7 < 4)
005fed78          edi_3 = __memfill_u32(&&__saved_ebp[(i_7 - 5)], 0x3f800000, (4 - i_7));
005fed83      uint8_t* eax_3 = D3DXMesh::CD3DXCrackDecl::GetElementPointer(this, arg2, arg3);
005fed96      float var_14;
005fed96      float var_10;
005fed96      
005fed96      switch (Type)
005fed96      {
005feda0          case 0:
005feda0          {
005feda0              *(uint32_t*)eax_3 = var_18;
005feda0              break;
005feda0          }
005fedaa          case 1:
005fedaa          {
005fedaa              *(uint32_t*)eax_3 = var_18;
005fedaf              *(uint32_t*)(eax_3 + 4) = var_14;
005fedaa              break;
005fedaa          }
005fedba          case 2:
005fedba          {
005fedba              *(uint32_t*)eax_3 = var_18;
005fedbf              *(uint32_t*)(eax_3 + 4) = var_14;
005fedc5              *(uint32_t*)(eax_3 + 8) = var_10;
005fedba              break;
005fedba          }
005fedd0          case 3:
005fedd0          {
005fedd0              *(uint32_t*)eax_3 = var_18;
005fedd5              *(uint32_t*)(eax_3 + 4) = var_14;
005feddb              *(uint32_t*)(eax_3 + 8) = var_10;
005fede1              float var_c;
005fede1              *(uint32_t*)(eax_3 + 0xc) = var_c;
005fedd0              break;
005fedd0          }
005fee08          case 4:
005fee08          {
005ff051              *(uint32_t*)eax_3 = (((((((uint32_t)_ftol2()) | (_ftol2() << 8)) << 8) | ((uint32_t)_ftol2())) << 8) | (_ftol2() & 0xff));
005fee08              break;
005fee08          }
005fee49          case 5:
005fee49          {
005fee49              *(uint8_t*)eax_3 = _ftol2();
005fee55              eax_3[1] = _ftol2();
005fee62              eax_3[2] = _ftol2();
005fef13              eax_3[3] = _ftol2();
005fee49              break;
005fee49          }
005fee82          case 6:
005fee82          {
005fee82              *(uint16_t*)eax_3 = _ftol2();
005fef70              *(uint16_t*)(eax_3 + 2) = _ftol2();
005fee82              break;
005fee82          }
005fee9d          case 7:
005fee9d          {
005fee9d              *(uint16_t*)eax_3 = _ftol2();
005feeaa              *(uint16_t*)(eax_3 + 2) = _ftol2();
005feeb8              *(uint16_t*)(eax_3 + 4) = _ftol2();
005fefc4              *(uint16_t*)(eax_3 + 6) = _ftol2();
005fee9d              break;
005fee9d          }
005feee3          case 8:
005feee3          {
005feee3              *(uint8_t*)eax_3 = _ftol2();
005feef1              eax_3[1] = _ftol2();
005fef00              eax_3[2] = _ftol2();
005fef13              eax_3[3] = _ftol2();
005feee3              break;
005feee3          }
005fef2f          case 9:
005fef2f          {
005fef2f              *(uint16_t*)eax_3 = _ftol2();
005fef70              *(uint16_t*)(eax_3 + 2) = _ftol2();
005fef2f              break;
005fef2f          }
005fef59          case 0xb:
005fef59          {
005fef59              *(uint16_t*)eax_3 = _ftol2();
005fef70              *(uint16_t*)(eax_3 + 2) = _ftol2();
005fef59              break;
005fef59          }
005fef91          case 0xc:
005fef91          {
005fef91              *(uint16_t*)eax_3 = _ftol2();
005fefa0              *(uint16_t*)(eax_3 + 2) = _ftol2();
005fefb0              *(uint16_t*)(eax_3 + 4) = _ftol2();
005fefc4              *(uint16_t*)(eax_3 + 6) = _ftol2();
005fef91              break;
005fef91          }
005fefe4          case 0xd:
005fefe4          {
005ff051              *(uint32_t*)eax_3 = (((((_ftol2() & 0x3ff) << 0xa) | (_ftol2() & 0x3ff)) << 0xa) | (_ftol2() & 0x3ff));
005fefe4              break;
005fefe4          }
005ff025          case 0xe:
005ff025          {
005ff051              *(uint32_t*)eax_3 = (((((_ftol2() & 0x3ff) << 0xa) | (_ftol2() & 0x3ff)) << 0xa) | (_ftol2() & 0x3ff));
005ff025              break;
005ff025          }
005ff055          case 0xf:
005ff055          {
005ff060              _D3DXFloat32To16Array@12(eax_3, &var_18, 2);
005ff055              break;
005ff055          }
005ff059          case 0x10:
005ff059          {
005ff060              _D3DXFloat32To16Array@12(eax_3, &var_18, 4);
005ff059              break;
005ff059          }
005fed96      }
005fec55  }

005ff06c  uint32_t jump_table_5ff06c[0x4] = 
005ff06c  {
005ff06c      [0x0] =  0x005fec94
005ff070      [0x1] =  0x005fed14
005ff074      [0x2] =  0x005fecd3
005ff078      [0x3] =  0x005fed40
005ff07c  }
005ff07c  uint8_t lookup_table_5ff07c[0xb] = 
005ff07c  {
005ff07c      [0x0] =  0x00
005ff07d      [0x1] =  0x01
005ff07e      [0x2] =  0x03
005ff07f      [0x3] =  0x03
005ff080      [0x4] =  0x00
005ff081      [0x5] =  0x02
005ff082      [0x6] =  0x02
005ff083      [0x7] =  0x00
005ff084      [0x8] =  0x00
005ff085      [0x9] =  0x01
005ff086      [0xa] =  0x02
005ff087  }
005ff087  uint32_t jump_table_5ff087[0x11] = 
005ff087  {
005ff087      [0x00] =  0x005fed9d
005ff08b      [0x01] =  0x005feda7
005ff08f      [0x02] =  0x005fedb7
005ff093      [0x03] =  0x005fedcd
005ff097      [0x04] =  0x005fede9
005ff09b      [0x05] =  0x005fee39
005ff09f      [0x06] =  0x005fee74
005ff0a3      [0x07] =  0x005fee8d
005ff0a7      [0x08] =  0x005feecb
005ff0ab      [0x09] =  0x005fef1b
005ff0af      [0x0a] =  0x005fef3d
005ff0b3      [0x0b] =  0x005fef45
005ff0b7      [0x0c] =  0x005fef79
005ff0bb      [0x0d] =  0x005fefcd
005ff0bf      [0x0e] =  0x005ff006
005ff0c3      [0x0f] =  0x005ff055
005ff0c7      [0x10] =  0x005ff059
005ff0cb  }

005ff0cb  void __thiscall D3DXCore::CBuffer::~CBuffer(D3DXCore::CBuffer* this)

005ff0cb  {
005ff0cb      void* var_4 = *(uint32_t*)((char*)this + 0xc);
005ff0ce      *(uint32_t*)this = 0x7f04fc;
005ff0d4      operator delete(var_4);
005ff0cb  }


005ff0db  long __thiscall D3DXCore::CBuffer::Init(D3DXCore::CBuffer* this, unsigned long arg2)

005ff0db  {
005ff0e1      int32_t edi;
005ff0e1      int32_t var_c = edi;
005ff0e8      void* eax = operator new(arg2);
005ff0f0      *(uint32_t*)((char*)this + 0xc) = eax;
005ff0f0      
005ff0f3      if (eax == 0)
005ff0f5          return 0x8007000e;
005ff0f5      
005ff0fc      *(uint32_t*)((char*)this + 8) = arg2;
005ff0ff      return 0;
005ff0db  }


005ff107  long __thiscall D3DXCore::CBuffer::Set(D3DXCore::CBuffer* this, uint8_t* arg2, unsigned long arg3)

005ff107  {
005ff112      operator delete(*(uint32_t*)((char*)this + 0xc));
005ff11a      *(uint32_t*)((char*)this + 0xc) = arg2;
005ff121      *(uint32_t*)((char*)this + 8) = arg3;
005ff128      return 0;
005ff107  }


005ff12b  unsigned long __stdcall D3DXCore::CBuffer::AddRef()

005ff12b  {
005ff133      *(uint32_t*)((char*)arg_4 + 4) += 1;
005ff13a      return *(uint32_t*)((char*)arg_4 + 4);
005ff12b  }


005ff13d  unsigned long __stdcall D3DXCore::CBuffer::Release()

005ff13d  {
005ff145      int32_t eax = arg_4[1];
005ff14f      arg_4[1] = (eax - 1);
005ff14f      
005ff152      if (eax == 1)
005ff158          *(uint32_t*)(*(uint32_t*)arg_4 + 0x14)(1);
005ff158      
005ff15f      return (eax - 1);
005ff13d  }


005ff162  void* __stdcall D3DXCore::CBuffer::GetBufferPointer()

005ff162  {
005ff16e      return *(uint32_t*)((char*)arg_4 + 0xc);
005ff162  }


005ff171  unsigned long __stdcall D3DXCore::CBuffer::GetBufferSize()

005ff171  {
005ff17d      return *(uint32_t*)((char*)arg_4 + 8);
005ff171  }


005ff180  void* __thiscall D3DXCore::CBuffer::`scalar deleting destructor'(D3DXCore::CBuffer* this, uint32_t arg2)

005ff180  {
005ff188      D3DXCore::CBuffer::~CBuffer(this);
005ff188      
005ff191      if ((arg2 & 1) != 0)
005ff194          operator delete(this);
005ff194      
005ff19e      return this;
005ff180  }


005ff1a1  long __stdcall D3DXCore::CBuffer::QueryInterface(struct _GUID const& arg1, void** arg2)

005ff1a1  {
005ff1a9      *(uint32_t*)arg_c = 0;
005ff1ad      void** esi = arg2;
005ff1b0      int32_t edi;
005ff1b0      int32_t var_c = edi;
005ff1b3      int32_t i = 4;
005ff1b4      int32_t* edi_1 = &IID_IUnknown;
005ff1b9      bool cond:1 = true;
005ff1b9      
005ff1bb      while (i != 0)
005ff1bb      {
005ff1bb          void* temp1_1 = *(uint32_t*)esi;
005ff1bb          int32_t temp2_1 = *(uint32_t*)edi_1;
005ff1bb          cond:1 = temp1_1 == temp2_1;
005ff1bb          esi = &esi[1];
005ff1bb          edi_1 = &edi_1[1];
005ff1bb          i -= 1;
005ff1bb          
005ff1bb          if (temp1_1 != temp2_1)
005ff1bb              break;
005ff1bb      }
005ff1bb      
005ff1bd      if (!(cond:1))
005ff1bd      {
005ff1bf          void** esi_1 = arg2;
005ff1c4          int32_t i_1 = 4;
005ff1c5          int32_t* edi_2 = &data_7f0400;
005ff1ca          bool cond:3_1 = false;
005ff1ca          
005ff1cc          while (i_1 != 0)
005ff1cc          {
005ff1cc              void* temp3_1 = *(uint32_t*)esi_1;
005ff1cc              int32_t temp4_1 = *(uint32_t*)edi_2;
005ff1cc              cond:3_1 = temp3_1 != temp4_1;
005ff1cc              esi_1 = &esi_1[1];
005ff1cc              edi_2 = &edi_2[1];
005ff1cc              i_1 -= 1;
005ff1cc              
005ff1cc              if (temp3_1 != temp4_1)
005ff1cc                  break;
005ff1cc          }
005ff1cc          
005ff1ce          if (cond:3_1)
005ff1df              return 0x80004002;
005ff1bd      }
005ff1bd      
005ff1d3      *(uint32_t*)arg_c = arg1;
005ff1d8      *(uint32_t*)(arg1->Data1 + 4)(arg1);
005ff1db      return 0;
005ff1a1  }


005ff1ea  void __thiscall D3DXCore::CBuffer::CBuffer(D3DXCore::CBuffer* this)

005ff1ea  {
005ff1ec      *(uint32_t*)((char*)this + 0xc) = 0;
005ff1f0      *(uint32_t*)((char*)this + 8) = 0;
005ff1f4      *(uint32_t*)this = 0x7f04fc;
005ff1fa      *(uint32_t*)((char*)this + 4) = 1;
005ff1ea  }


005ff202  long __stdcall D3DXCore::CBuffer::Create(unsigned long arg1, class D3DXCore::CBuffer** arg2)

005ff202  {
005ff20d      if (arg2 == 0)
005ff20f          return 0x8876086c;
005ff20f      
005ff219      void* eax = operator new(0x10);
005ff221      class D3DXCore::CBuffer* esi_1;
005ff221      
005ff221      if (eax == 0)
005ff22e          esi_1 = nullptr;
005ff221      else
005ff22a          esi_1 = D3DXCore::CBuffer::CBuffer(eax);
005ff22a      
005ff232      if (esi_1 == 0)
005ff234          return 0x8007000e;
005ff234      
005ff23d      int32_t edi;
005ff23d      int32_t var_10_1 = edi;
005ff243      int32_t result_1 = *(uint32_t*)(*(uint32_t*)esi_1 + 0x18)(arg1);
005ff24a      int32_t result;
005ff24a      
005ff24a      if (result_1 >= 0)
005ff24a      {
005ff259          *(uint32_t*)arg2 = esi_1;
005ff25b          result = 0;
005ff24a      }
005ff24a      else
005ff24a      {
005ff252          *(uint32_t*)(*(uint32_t*)esi_1 + 0x14)(1);
005ff255          result = result_1;
005ff24a      }
005ff24a      
005ff261      return result;
005ff202  }


005ff264  int32_t _D3DXCreateBuffer@8()

005ff264  {
005ff26a      /* tailcall */
005ff26a      return D3DXCore::CBuffer::Create();
005ff264  }


005ff26f  struct D3DXVECTOR4* __stdcall x86_D3DXVec2Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

005ff26f  {
005ff2bc      long double x87_r5_3 = (((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)));
005ff2c1      long double x87_r6_3 = (((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 8))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)));
005ff2c6      long double x87_r7_4 = (((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)));
005ff2c8      arg1->x = ((float)(((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))));
005ff2ca      arg1->y = ((float)x87_r5_3);
005ff2cd      arg1->z = ((float)x87_r6_3);
005ff2d0      arg1->w = ((float)x87_r7_4);
005ff2d7      return arg1;
005ff26f  }


005ff2da  struct D3DXVECTOR2* __stdcall x86_D3DXVec2TransformNormal(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

005ff2da  {
005ff303      long double x87_r7_3 = ((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14))));
005ff305      arg1->x = ((float)((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)))));
005ff307      arg1->y = ((float)x87_r7_3);
005ff30e      return arg1;
005ff2da  }


005ff311  struct D3DXVECTOR4* __stdcall x86_D3DXVec3Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

005ff311  {
005ff380      long double x87_r5_4 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34)));
005ff385      long double x87_r6_4 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 8))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38)));
005ff38a      long double x87_r7_5 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c)));
005ff38c      arg1->x = ((float)((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)))) + ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))));
005ff38e      arg1->y = ((float)x87_r5_4);
005ff391      arg1->z = ((float)x87_r6_4);
005ff394      arg1->w = ((float)x87_r7_5);
005ff39b      return arg1;
005ff311  }


005ff39e  struct D3DXVECTOR3* __stdcall x86_D3DXVec3TransformNormal(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

005ff39e  {
005ff3ec      long double x87_r6_3 = (((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24))));
005ff3ee      long double x87_r7_4 = (((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 8))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28))));
005ff3f0      arg1->x = ((float)(((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)))));
005ff3f2      arg1->y = ((float)x87_r6_3);
005ff3f5      arg1->z = ((float)x87_r7_4);
005ff3fc      return arg1;
005ff39e  }


005ff3ff  struct D3DXVECTOR4* __stdcall x86_D3DXVec4Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXMATRIX const* arg3)

005ff3ff  {
005ff480      long double x87_r4_5 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x10)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x20)))) + (((long double)arg2->w) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x30))));
005ff482      long double x87_r5_4 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 4))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x14)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x24)))) + (((long double)arg2->w) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x34))));
005ff484      long double x87_r6_4 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 8))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x18)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x28)))) + (((long double)arg2->w) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x38))));
005ff486      long double x87_r7_5 = ((((((long double)arg2->x) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0xc))) + (((long double)arg2->y) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x1c)))) + (((long double)arg2->z) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x2c)))) + (((long double)arg2->w) * ((long double)*(uint32_t*)((char*)arg3->__inner0 + 0x3c))));
005ff488      arg1->x = ((float)x87_r4_5);
005ff48a      arg1->y = ((float)x87_r5_4);
005ff48d      arg1->z = ((float)x87_r6_4);
005ff490      arg1->w = ((float)x87_r7_5);
005ff497      return arg1;
005ff3ff  }


005ff49a  float __fastcall TableInvSqrt(float arg1 @ ecx)

005ff49a  {
005ff4a9      void* ecx_2 = ((arg_4 >> 0xc) & 0xff8);
005ff4dc      return ((int32_t)(((((long double)((arg_4 & 0xffffff) | 0x3f000000)) * ((long double)*(uint32_t*)((char*)ecx_2 + 0x825aa8))) + ((long double)*(uint32_t*)((char*)ecx_2 + 0x825aac))) * ((long double)(((0xbeffffff - arg_4) >> 1) & 0xff800000))));
005ff49a  }


005ff4df  struct D3DXVECTOR3* __stdcall x86_D3DXVec3Normalize(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2)

005ff4df  {
005ff4e4      int32_t ecx;
005ff4e4      int32_t var_8 = ecx;
005ff4e5      int32_t var_c = ecx;
005ff4e6      int32_t edi;
005ff4e6      int32_t var_10 = edi;
005ff501      long double x87_r7_3 = ((((long double)arg2->z) * ((long double)arg2->z)) + ((((long double)arg2->y) * ((long double)arg2->y)) + (((long double)arg2->x) * ((long double)arg2->x))));
005ff503      float var_c_1 = ((float)x87_r7_3);
005ff503      
005ff50b      if (var_c_1 == 0)
005ff50b      {
005ff50f          arg1->x = var_c_1;
005ff511          arg1->y = var_c_1;
005ff514          arg1->z = var_c_1;
005ff50b      }
005ff50b      else if ((((float)(x87_r7_3 - ((long double)1))) & 0x7fffffff) > 0x3727c5ac)
005ff530      {
005ff555          void* edi_3 = ((var_c_1 >> 0xc) & 0xff8);
005ff584          long double x87_r7_8 = (((((long double)((var_c_1 & 0xffffff) | 0x3f000000)) * ((long double)*(uint32_t*)((char*)edi_3 + 0x825aa8))) + ((long double)*(uint32_t*)((char*)edi_3 + 0x825aac))) * ((long double)(((0xbeffffff - var_c_1) >> 1) & 0xff800000)));
005ff58e          long double x87_r5_4 = (((long double)arg2->y) * x87_r7_8);
005ff593          long double x87_r4_2 = (((long double)arg2->z) * x87_r7_8);
005ff597          arg1->x = ((float)(((long double)arg2->x) * x87_r7_8));
005ff599          arg1->y = ((float)x87_r5_4);
005ff59c          arg1->z = ((float)x87_r4_2);
005ff530      }
005ff530      else if (arg1 != arg2)
005ff534      {
005ff538          arg1->x = arg2->x;
005ff53d          arg1->y = arg2->y;
005ff543          arg1->z = arg2->z;
005ff534      }
005ff534      
005ff5a8      return arg1;
005ff4df  }


005ff5ab  struct D3DXMATRIX* __stdcall x86_D3DXMatrixMultiply(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

005ff5ab  {
005ff5bd      int32_t edi;
005ff5bd      int32_t var_50 = edi;
005ff5be      int16_t top;
005ff5be      
005ff5be      if (arg3 != arg1)
005ff5be      {
005ff631      label_5ff631:
005ff631          struct D3DXMATRIX* ebx_1 = arg1;
005ff634          struct D3DXMATRIX* ecx_1 = arg2;
005ff63a          int32_t i_3 = 0xfffffffc;
005ff687          int32_t i;
005ff687          
005ff687          do
005ff687          {
005ff63f              int32_t j_3 = 0xfffffffc;
005ff644              /* unimplemented  {fld st0, dword [ecx]} */;
005ff646              /* unimplemented  {fld st0, dword [ecx+0x4]} */;
005ff649              /* unimplemented  {fld st0, dword [ecx+0x8]} */;
005ff64c              top -= 4;
005ff64c              /* unimplemented  {fld st0, dword [ecx+0xc]} */;
005ff676              int32_t j;
005ff676              
005ff676              do
005ff676              {
005ff64f                  /* unimplemented  {fld st0, st3} */;
005ff651                  /* unimplemented  {fmul st0, dword [edx+esi*4+0x10]} */;
005ff655                  /* unimplemented  {fld st0, st3} */;
005ff657                  /* unimplemented  {fmul st0, dword [edx+esi*4+0x20]} */;
005ff65b                  /* unimplemented  {fld st0, st3} */;
005ff65d                  /* unimplemented  {fmul st0, dword [edx+esi*4+0x30]} */;
005ff661                  /* unimplemented  {fld st0, st3} */;
005ff663                  /* unimplemented  {fmul st0, dword [edx+esi*4+0x40]} */;
005ff667                  /* unimplemented  {fxch st0, st3} */;
005ff667                  /* unimplemented  {fxch st0, st3} */;
005ff669                  /* unimplemented  {faddp st1, st0} */;
005ff669                  /* unimplemented  {faddp st1, st0} */;
005ff66b                  /* unimplemented  {fxch st0, st2} */;
005ff66b                  /* unimplemented  {fxch st0, st2} */;
005ff66d                  /* unimplemented  {faddp st1, st0} */;
005ff66d                  /* unimplemented  {faddp st1, st0} */;
005ff66f                  /* unimplemented  {faddp st1, st0} */;
005ff66f                  /* unimplemented  {faddp st1, st0} */;
005ff671                  *(uint32_t*)(((char*)ebx_1 + (j_3 << 2)) + 0x10) = ((float)/* *(ebx_1 + (j_3 << 2) + 0x10) = fconvert.s(unimplemented  {fstp dword [ebx+esi*4+0x10], st0}) */);
005ff671                  /* unimplemented  {fstp dword [ebx+esi*4+0x10], st0} */;
005ff675                  j = j_3;
005ff675                  j_3 += 1;
005ff676              } while (j != 0xffffffff);
005ff678              /* unimplemented  {ffree st3} */;
005ff67a              /* unimplemented  {ffree st2} */;
005ff67c              /* unimplemented  {ffree st1} */;
005ff67e              /* unimplemented  {ffree st0} */;
005ff680              ecx_1 = &ecx_1->__inner0.__inner0._21;
005ff683              ebx_1 = &ebx_1->__inner0.__inner0._21;
005ff686              i = i_3;
005ff686              i_3 += 1;
005ff687          } while (i != 0xffffffff);
005ff5be      }
005ff5be      else
005ff5be      {
005ff5c3          if (arg2 == arg1)
005ff5c3          {
005ff629              void var_44;
005ff629              __builtin_memcpy(&var_44, arg3, 0x40);
005ff62e              arg3 = &var_44;
005ff62e              goto label_5ff631;
005ff5c3          }
005ff5c3          
005ff5c5          struct D3DXMATRIX* ebx = arg1;
005ff5ce          int32_t i_2 = 0xfffffffc;
005ff61f          int32_t i_1;
005ff61f          
005ff61f          do
005ff61f          {
005ff5d3              int32_t j_2 = 0xfffffff0;
005ff5d8              /* unimplemented  {fld st0, dword [edx+edi*4+0x10]} */;
005ff5dc              /* unimplemented  {fld st0, dword [edx+edi*4+0x20]} */;
005ff5e0              /* unimplemented  {fld st0, dword [edx+edi*4+0x30]} */;
005ff5e4              top -= 4;
005ff5e4              /* unimplemented  {fld st0, dword [edx+edi*4+0x40]} */;
005ff611              int32_t j_1;
005ff611              
005ff611              do
005ff611              {
005ff5e8                  /* unimplemented  {fld st0, st3} */;
005ff5ea                  /* unimplemented  {fmul st0, dword [ecx+esi*4+0x40]} */;
005ff5ee                  /* unimplemented  {fld st0, st3} */;
005ff5f0                  /* unimplemented  {fmul st0, dword [ecx+esi*4+0x44]} */;
005ff5f4                  /* unimplemented  {fld st0, st3} */;
005ff5f6                  /* unimplemented  {fmul st0, dword [ecx+esi*4+0x48]} */;
005ff5fa                  /* unimplemented  {fld st0, st3} */;
005ff5fc                  /* unimplemented  {fmul st0, dword [ecx+esi*4+0x4c]} */;
005ff600                  /* unimplemented  {fxch st0, st3} */;
005ff600                  /* unimplemented  {fxch st0, st3} */;
005ff602                  /* unimplemented  {faddp st1, st0} */;
005ff602                  /* unimplemented  {faddp st1, st0} */;
005ff604                  /* unimplemented  {fxch st0, st2} */;
005ff604                  /* unimplemented  {fxch st0, st2} */;
005ff606                  /* unimplemented  {faddp st1, st0} */;
005ff606                  /* unimplemented  {faddp st1, st0} */;
005ff608                  /* unimplemented  {faddp st1, st0} */;
005ff608                  /* unimplemented  {faddp st1, st0} */;
005ff60a                  *(uint32_t*)(((char*)ebx + (j_2 << 2)) + 0x40) = ((float)/* *(ebx + (j_2 << 2) + 0x40) = fconvert.s(unimplemented  {fstp dword [ebx+esi*4+0x40], st0}) */);
005ff60a                  /* unimplemented  {fstp dword [ebx+esi*4+0x40], st0} */;
005ff60e                  j_1 = j_2;
005ff60e                  j_2 += 4;
005ff611              } while (j_1 != 0xfffffffc);
005ff613              /* unimplemented  {ffree st3} */;
005ff615              /* unimplemented  {ffree st2} */;
005ff617              /* unimplemented  {ffree st1} */;
005ff619              /* unimplemented  {ffree st0} */;
005ff61b              ebx = &ebx->__inner0.__inner0._12;
005ff61e              i_1 = i_2;
005ff61e              i_2 += 1;
005ff61f          } while (i_1 != 0xffffffff);
005ff5be      }
005ff68d      return arg1;
005ff5ab  }


005ff690  struct D3DXMATRIX* __stdcall x86_D3DXMatrixMultiplyTranspose(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

005ff690  {
005ff698      struct D3DXMATRIX* eax = arg1;
005ff6a3      void var_48;
005ff6a3      
005ff6a3      if ((eax == arg2 || eax == arg3))
005ff6a5          eax = &var_48;
005ff6ad      int32_t edi;
005ff6ad      int32_t var_54 = edi;
005ff6b1      struct D3DXMATRIX* ecx = arg2;
005ff6b7      int32_t i_1 = 0xfffffffc;
005ff706      int32_t i;
005ff706      
005ff706      do
005ff706      {
005ff6bc          int32_t j_1 = 0xfffffffc;
005ff6c1          void* ebx_1 = (((char*)eax + (i_1 << 2)) + 0x10);
005ff6c5          /* unimplemented  {fld st0, dword [ecx]} */;
005ff6c7          /* unimplemented  {fld st0, dword [ecx+0x4]} */;
005ff6ca          /* unimplemented  {fld st0, dword [ecx+0x8]} */;
005ff6cd          int16_t top = (top - 4);
005ff6cd          /* unimplemented  {fld st0, dword [ecx+0xc]} */;
005ff6f8          int32_t j;
005ff6f8          
005ff6f8          do
005ff6f8          {
005ff6d0              /* unimplemented  {fld st0, st3} */;
005ff6d2              /* unimplemented  {fmul st0, dword [edx+esi*4+0x10]} */;
005ff6d6              /* unimplemented  {fld st0, st3} */;
005ff6d8              /* unimplemented  {fmul st0, dword [edx+esi*4+0x20]} */;
005ff6dc              /* unimplemented  {fld st0, st3} */;
005ff6de              /* unimplemented  {fmul st0, dword [edx+esi*4+0x30]} */;
005ff6e2              /* unimplemented  {fld st0, st3} */;
005ff6e4              /* unimplemented  {fmul st0, dword [edx+esi*4+0x40]} */;
005ff6e8              /* unimplemented  {fxch st0, st3} */;
005ff6e8              /* unimplemented  {fxch st0, st3} */;
005ff6ea              /* unimplemented  {faddp st1, st0} */;
005ff6ea              /* unimplemented  {faddp st1, st0} */;
005ff6ec              /* unimplemented  {fxch st0, st2} */;
005ff6ec              /* unimplemented  {fxch st0, st2} */;
005ff6ee              /* unimplemented  {faddp st1, st0} */;
005ff6ee              /* unimplemented  {faddp st1, st0} */;
005ff6f0              /* unimplemented  {faddp st1, st0} */;
005ff6f0              /* unimplemented  {faddp st1, st0} */;
005ff6f2              *(uint32_t*)ebx_1 = ((float)/* *ebx_1 = fconvert.s(unimplemented  {fstp dword [ebx], st0}) */);
005ff6f2              /* unimplemented  {fstp dword [ebx], st0} */;
005ff6f4              ebx_1 += 0x10;
005ff6f7              j = j_1;
005ff6f7              j_1 += 1;
005ff6f8          } while (j != 0xffffffff);
005ff6fa          /* unimplemented  {ffree st3} */;
005ff6fc          /* unimplemented  {ffree st2} */;
005ff6fe          /* unimplemented  {ffree st1} */;
005ff700          /* unimplemented  {ffree st0} */;
005ff702          ecx = &ecx->__inner0.__inner0._21;
005ff705          i = i_1;
005ff705          i_1 += 1;
005ff706      } while (i != 0xffffffff);
005ff706      
005ff710      if (eax != arg1)
005ff717          __builtin_memcpy(arg1, eax, 0x40);
005ff717      
005ff71d      return arg1;
005ff690  }


005ff720  void __stdcall x86_D3DXInitFastTable(struct D3DXFASTTABLE* arg1)

005ff720  {
005ff72d      *(uint32_t*)arg1 = x86_D3DXVec2Transform;
005ff733      *(uint32_t*)((char*)arg1 + 4) = x86_D3DXVec3Transform;
005ff73a      *(uint32_t*)((char*)arg1 + 8) = x86_D3DXVec4Transform;
005ff73d      *(uint32_t*)((char*)arg1 + 0xc) = x86_D3DXMatrixMultiply;
005ff744      *(uint32_t*)((char*)arg1 + 0x10) = x86_D3DXMatrixMultiplyTranspose;
005ff74b      *(uint32_t*)((char*)arg1 + 0x14) = x86_D3DXVec2TransformNormal;
005ff752      *(uint32_t*)((char*)arg1 + 0x18) = x86_D3DXVec3TransformNormal;
005ff759      *(uint32_t*)((char*)arg1 + 0x1c) = x86_D3DXVec3Normalize;
005ff760      *(uint32_t*)((char*)arg1 + 0x8c) = x86_D3DXVec4Transform;
005ff720  }


005ff76a  void __convention("regparm") sub_5ff76a(float* arg1, uint16_t arg2, int32_t arg3)

005ff76a  {
005ff76f      int32_t var_8 = arg3;
005ff770      long double x87_r7 = ((long double)0.0322580636f);
005ff796      *(uint32_t*)arg1 = ((float)(((long double)((uint32_t)(arg3 >> 0xb))) * x87_r7));
005ff7a4      arg1[1] = ((float)(((long double)((arg3 >> 5) & 0x3f)) * ((long double)0.0158730168f)));
005ff7ac      arg1[2] = ((float)(((long double)(arg3 & 0x1f)) * x87_r7));
005ff7b3      arg1[3] = ((float)((long double)1));
005ff76a  }


005ff7b8  void __fastcall sub_5ff7b8(float* arg1)

005ff7b8  {
005ff7ba      int32_t i_1 = 0x10;
005ff837      int32_t i;
005ff837      
005ff837      do
005ff837      {
005ff7c4          (((long double)0f) - ((long double)arg1[3]));
005ff7c8          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
005ff7c8          
005ff7cb          if (p_1)
005ff7cb          {
005ff7da              long double x87_r7_5 = ((long double)1);
005ff7dc              long double temp0_1 = ((long double)arg1[3]);
005ff7dc              (x87_r7_5 - temp0_1);
005ff7dc              
005ff7e4              if ((*(uint8_t*)((char*)((((x87_r7_5 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp0_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) == 0)
005ff7e4              {
005ff7e8                  long double x87_r7_7 = (((long double)1) / ((long double)arg1[3]));
005ff7ed                  (((long double)*(uint32_t*)arg1) - ((long double)arg1[3]));
005ff7f2                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005ff7f5                  long double x87_r6_4;
005ff7f5                  
005ff7f5                  if (p_2)
005ff7fd                      x87_r6_4 = ((long double)1);
005ff7f5                  else
005ff7f9                      x87_r6_4 = (x87_r7_7 * ((long double)*(uint32_t*)arg1));
005ff7f9                  
005ff7ff                  *(uint32_t*)arg1 = ((float)x87_r6_4);
005ff804                  (((long double)arg1[1]) - ((long double)arg1[3]));
005ff809                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005ff80c                  long double x87_r6_7;
005ff80c                  
005ff80c                  if (p_3)
005ff815                      x87_r6_7 = ((long double)1);
005ff80c                  else
005ff810                      x87_r6_7 = (x87_r7_7 * ((long double)arg1[1]));
005ff810                  
005ff817                  arg1[1] = ((float)x87_r6_7);
005ff81d                  (((long double)arg1[2]) - ((long double)arg1[3]));
005ff822                  bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005ff825                  long double x87_r7_4;
005ff825                  
005ff825                  if (p_4)
005ff82e                      x87_r7_4 = ((long double)1);
005ff825                  else
005ff827                      x87_r7_4 = (x87_r7_7 * ((long double)arg1[2]));
005ff827                  
005ff830                  arg1[2] = ((float)x87_r7_4);
005ff7e4              }
005ff7cb          }
005ff7cb          else
005ff7cb          {
005ff7cf              *(uint32_t*)arg1 = ((float)((long double)0));
005ff7d3              arg1[1] = ((float)((long double)0));
005ff830              arg1[2] = ((float)((long double)0));
005ff7cb          }
005ff7cb          
005ff833          arg1 = &arg1[4];
005ff836          i = i_1;
005ff836          i_1 -= 1;
005ff837      } while (i != 1);
005ff7b8  }


005ff83c  int32_t __convention("regparm") sub_5ff83c(float* arg1, int32_t arg2, float* arg3)

005ff83c  {
005ff83e      int32_t i_1 = 0x10;
005ff866      int32_t i;
005ff866      
005ff866      do
005ff866      {
005ff843          long double x87_r7_2 = (((long double)arg1[3]) * ((long double)*(uint32_t*)arg1));
005ff845          arg1 = &arg1[4];
005ff848          *(uint32_t*)arg3 = ((float)x87_r7_2);
005ff84a          arg3 = &arg3[4];
005ff84d          i = i_1;
005ff84d          i_1 -= 1;
005ff854          arg3[-3] = ((float)(((long double)arg1[-3]) * ((long double)arg1[-1])));
005ff85d          arg3[-2] = ((float)(((long double)arg1[-2]) * ((long double)arg1[-1])));
005ff863          arg3[-1] = arg1[-1];
005ff866      } while (i != 1);
005ff86b      return 0;
005ff83c  }


005ff86c  int32_t __fastcall sub_5ff86c(float* arg1, int16_t arg2 @ x87control)

005ff86c  {
005ff874      long double x87_r7 = ((long double)0f);
005ff87a      long double temp1 = ((long double)*(uint32_t*)arg1);
005ff87a      (x87_r7 - temp1);
005ff87c      float eax;
005ff87c      eax = ((((x87_r7 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp1) ? 1 : 0) << 0xe) | 0x3800))));
005ff881      float var_20;
005ff881      
005ff881      if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005ff881      {
005ff88a          long double x87_r6_1 = ((long double)*(uint32_t*)arg1);
005ff88c          long double temp2_1 = ((long double)1f);
005ff88c          (x87_r6_1 - temp2_1);
005ff892          eax = ((((x87_r6_1 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
005ff892          
005ff897          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005ff89f              var_20 = *(uint32_t*)arg1;
005ff897          else
005ff885              var_20 = ((float)((long double)1));
005ff881      }
005ff881      else
005ff885          var_20 = ((float)((long double)0));
005ff885      
005ff8a2      long double temp3 = ((long double)arg1[1]);
005ff8a2      (x87_r7 - temp3);
005ff8a5      eax = ((((x87_r7 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp3) ? 1 : 0) << 0xe) | 0x3800))));
005ff8aa      float var_1c;
005ff8aa      
005ff8aa      if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005ff8aa      {
005ff8b3          long double x87_r6_3 = ((long double)arg1[1]);
005ff8b6          long double temp4_1 = ((long double)1f);
005ff8b6          (x87_r6_3 - temp4_1);
005ff8bc          eax = ((((x87_r6_3 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
005ff8bc          
005ff8c1          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005ff8ca              var_1c = arg1[1];
005ff8c1          else
005ff8ae              var_1c = ((float)((long double)1));
005ff8aa      }
005ff8aa      else
005ff8ae          var_1c = ((float)((long double)0));
005ff8ae      
005ff8cd      long double temp5 = ((long double)arg1[2]);
005ff8cd      (x87_r7 - temp5);
005ff8d0      eax = ((((x87_r7 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp5) ? 1 : 0) << 0xe) | 0))));
005ff8d5      float var_18;
005ff8d5      
005ff8d5      if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005ff8d5      {
005ff8de          long double x87_r7_2 = ((long double)arg1[2]);
005ff8e1          long double temp6_1 = ((long double)1f);
005ff8e1          (x87_r7_2 - temp6_1);
005ff8e7          eax = ((((x87_r7_2 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp6_1) ? 1 : 0) << 0xe) | 0))));
005ff8e7          
005ff8ec          if ((*(uint8_t*)((char*)eax)[1] & 0x41) != 0)
005ff8f5              var_18 = arg1[2];
005ff8ec          else
005ff8d9              var_18 = ((float)((long double)1));
005ff8d5      }
005ff8d5      else
005ff8d9          var_18 = ((float)((long double)0));
005ff8d9      
005ff8f8      int16_t x87status;
005ff8f8      int16_t temp0;
005ff8f8      temp0 = __fnstcw_memmem16(arg2);
005ff906      int16_t x87control;
005ff906      int16_t x87status_1;
005ff906      x87control = __fldcw_memmem16((temp0 | 0xc00));
005ff924      int16_t var_8;
005ff924      var_8 = ((int32_t)((long double)((float)((((long double)var_20) * ((long double)31f)) + ((long double)0.5f)))));
005ff92a      int32_t eax_5 = var_8;
005ff93f      var_8 = ((int32_t)((long double)((float)((((long double)var_1c) * ((long double)63f)) + ((long double)0.5f)))));
005ff945      int32_t ecx = var_8;
005ff95a      var_8 = ((int32_t)((long double)((float)((((long double)var_18) * ((long double)31f)) + ((long double)0.5f)))));
005ff960      int16_t x87control_1;
005ff960      int16_t x87status_2;
005ff960      x87control_1 = __fldcw_memmem16(temp0);
005ff96e      return ((((eax_5 << 6) | ecx) << 5) | var_8);
005ff86c  }


005ff96f  long double __stdcall sub_5ff96f(int16_t arg1 @ x87control, float* arg2, float* arg3, float arg4, int32_t arg5)

005ff96f  {
005ff979      int32_t i_3 = arg5;
005ff97f      int32_t edi;
005ff97f      int32_t var_64 = edi;
005ff980      int32_t var_20;
005ff980      float* ebx;
005ff980      
005ff980      if (i_3 != 6)
005ff980      {
005ff990          ebx = &data_7f1a6c;
005ff995          var_20 = 0x7f1a4c;
005ff980      }
005ff980      else
005ff980      {
005ff982          ebx = &data_7f1aa4;
005ff987          var_20 = 0x7f1a8c;
005ff980      }
005ff980      
005ff99e      int32_t i = 0;
005ff9a3      float var_8 = ((float)((long double)1));
005ff9a8      float var_c = ((float)((long double)0));
005ff9a8      
005ff9ab      if (i_3 != 8)
005ff9ab      {
005ffa27          float eax_3;
005ffa27          
005ffa27          do
005ffa27          {
005ff9e0              float* ecx_2 = (arg4 + (i << 2));
005ff9e3              long double x87_r7_4 = ((long double)*(uint32_t*)ecx_2);
005ff9e5              long double temp1_1 = ((long double)var_8);
005ff9e5              (x87_r7_4 - temp1_1);
005ff9e8              eax_3 = ((((x87_r7_4 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp1_1) ? 1 : 0) << 0xe) | 0))));
005ff9ea              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005ff9ea              
005ff9ed              if (!(p_2))
005ff9ed              {
005ff9ef                  long double x87_r7_5 = ((long double)*(uint32_t*)ecx_2);
005ff9f1                  long double temp4_1 = ((long double)0f);
005ff9f1                  (x87_r7_5 - temp4_1);
005ff9f7                  eax_3 = ((((x87_r7_5 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp4_1) ? 1 : 0) << 0xe) | 0))));
005ff9f7                  
005ff9fc                  if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
005ffa00                      var_8 = *(uint32_t*)ecx_2;
005ff9ed              }
005ff9ed              
005ffa03              long double x87_r7_6 = ((long double)*(uint32_t*)ecx_2);
005ffa05              long double temp3_1 = ((long double)var_c);
005ffa05              (x87_r7_6 - temp3_1);
005ffa08              eax_3 = ((((x87_r7_6 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp3_1) ? 1 : 0) << 0xe) | 0))));
005ffa08              
005ffa0d              if ((*(uint8_t*)((char*)eax_3)[1] & 0x41) == 0)
005ffa0d              {
005ffa0f                  long double x87_r7_7 = ((long double)*(uint32_t*)ecx_2);
005ffa11                  long double temp6_1 = ((long double)1f);
005ffa11                  (x87_r7_7 - temp6_1);
005ffa17                  eax_3 = ((((x87_r7_7 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp6_1) ? 1 : 0) << 0xe) | 0))));
005ffa19                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005ffa19                  
005ffa1c                  if (!(p_3))
005ffa20                      var_c = *(uint32_t*)ecx_2;
005ffa0d              }
005ffa0d              
005ffa23              i += 1;
005ffa27          } while (i < 0x10);
005ffa27          
005ffa29          long double x87_r7_8 = ((long double)var_c);
005ffa2c          long double x87_r6_1 = ((long double)var_8);
005ffa2f          (x87_r6_1 - x87_r7_8);
005ffa31          eax_3 = ((((x87_r6_1 < x87_r7_8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, x87_r7_8))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == x87_r7_8) ? 1 : 0) << 0xe) | 0))));
005ffa33          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x44} */;
005ffa33          
005ffa36          if (!(p_4))
005ffa3a              var_c = ((float)((long double)1));
005ff9ab      }
005ff9ab      else
005ff9ab      {
005ff9d9          do
005ff9d9          {
005ff9b0              float* ecx_1 = (arg4 + (i << 2));
005ff9b3              long double x87_r7_2 = ((long double)*(uint32_t*)ecx_1);
005ff9b5              long double temp2_1 = ((long double)var_8);
005ff9b5              (x87_r7_2 - temp2_1);
005ff9b8              float eax_1;
005ff9b8              eax_1 = ((((x87_r7_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2_1) ? 1 : 0) << 0xe) | 0))));
005ff9ba              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005ff9ba              
005ff9bd              if (!(p_1))
005ff9c1                  var_8 = *(uint32_t*)ecx_1;
005ff9c1              
005ff9c4              long double x87_r7_3 = ((long double)*(uint32_t*)ecx_1);
005ff9c6              long double temp5_1 = ((long double)var_c);
005ff9c6              (x87_r7_3 - temp5_1);
005ff9c9              eax_1 = ((((x87_r7_3 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp5_1) ? 1 : 0) << 0xe) | 0))));
005ff9c9              
005ff9ce              if ((*(uint8_t*)((char*)eax_1)[1] & 0x41) == 0)
005ff9d2                  var_c = *(uint32_t*)ecx_1;
005ff9d2              
005ff9d5              i += 1;
005ff9d9          } while (i < 0x10);
005ff9ab      }
005ff9ab      
005ffa3d      int32_t edi_1 = (i_3 - 1);
005ffa45      long double x87_r7_10 = ((long double)edi_1);
005ffa45      
005ffa48      if (edi_1 < 0)
005ffa4a          x87_r7_10 = (x87_r7_10 + ((long double)4.2949673e+09f));
005ffa4a      
005ffa50      float var_28 = ((float)x87_r7_10);
005ffa53      int16_t x87status;
005ffa53      int16_t temp0;
005ffa53      temp0 = __fnstcw_memmem16(arg1);
005ffa61      int16_t x87control;
005ffa61      int16_t x87status_1;
005ffa61      x87control = __fldcw_memmem16((temp0 | 0xc00));
005ffa67      int16_t var_24;
005ffa67      var_24 = 0;
005ffa6b      int16_t var_38_1 = temp0;
005ffc22      float eax_6;
005ffc22      long double result;
005ffc22      
005ffc22      do
005ffc22      {
005ffa71          long double result_1 = (((long double)var_c) - ((long double)var_8));
005ffa74          long double temp7_1 = ((long double)0.00390625f);
005ffa74          (result_1 - temp7_1);
005ffa7a          eax_6 = ((((result_1 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(result_1, temp7_1))) ? 1 : 0) << 0xa) | ((((result_1 == temp7_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffa7c          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005ffa7c          
005ffa7f          if (!(p_5))
005ffa7f          {
005ffc2a              result = result_1;
005ffc2a              break;
005ffa7f          }
005ffa7f          
005ffa8c          float var_2c_1 = ((float)(((long double)var_28) / result_1));
005ffa8f          result = result_1;
005ffa91          void var_58;
005ffa91          
005ffa91          if (i_3 > 0)
005ffa91          {
005ffa9b              float* eax_7 = ebx;
005ffab3              int32_t i_1;
005ffab3              
005ffab3              do
005ffab3              {
005ffaac                  *(uint32_t*)((&var_58 - ebx) + eax_7) = ((float)((((long double)var_c) * ((long double)*(uint32_t*)((var_20 - ebx) + eax_7))) + (((long double)var_8) * ((long double)*(uint32_t*)eax_7))));
005ffaaf                  eax_7 = &eax_7[1];
005ffab2                  i_1 = i_3;
005ffab2                  i_3 -= 1;
005ffab3              } while (i_1 != 1);
005ffab5              i_3 = arg5;
005ffa91          }
005ffa91          
005ffabb          if (i_3 == 6)
005ffabb          {
005ffabf              float var_40_1 = ((float)((long double)0));
005ffac4              float var_3c_1 = ((float)((long double)1));
005ffabb          }
005ffabb          
005ffac9          int32_t i_2 = 0;
005ffacb          float var_10_1 = ((float)((long double)0));
005ffad0          float var_14_1 = ((float)((long double)0));
005ffad5          float var_18_1 = ((float)((long double)0));
005ffada          float var_1c_1 = ((float)((long double)0));
005ffada          
005ffb9e          do
005ffb9e          {
005ffae0              float* ecx_4 = (arg4 + (i_2 << 2));
005ffae8              long double result_2 = ((((long double)*(uint32_t*)ecx_4) - ((long double)var_8)) * ((long double)var_2c_1));
005ffaeb              long double temp12_1 = ((long double)0f);
005ffaeb              (result_2 - temp12_1);
005ffaf1              eax_6 = ((((result_2 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(result_2, temp12_1))) ? 1 : 0) << 0xa) | ((((result_2 == temp12_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffaf3              bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x41} */;
005ffaf3              
005ffaf6              if (p_6)
005ffaf6              {
005ffb19                  long double temp14_1 = ((long double)var_28);
005ffb19                  (result_2 - temp14_1);
005ffb1c                  eax_6 = ((((result_2 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(result_2, temp14_1))) ? 1 : 0) << 0xa) | ((((result_2 == temp14_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffb1c                  
005ffb21                  if ((*(uint8_t*)((char*)eax_6)[1] & 1) != 0)
005ffb21                  {
005ffb55                      eax_6 = ((int32_t)((long double)((float)(result_2 + ((long double)0.5f)))));
005ffb58                  label_5ffb58:
005ffb58                      
005ffb5a                      if (eax_6 < i_3)
005ffb5a                      {
005ffb5e                          float* eax_8 = (eax_6 << 2);
005ffb70                          var_10_1 = ((float)(((((long double)*(uint32_t*)ecx_4) - ((long double)*(uint32_t*)(&var_58 + eax_8))) * ((long double)*(uint32_t*)((char*)eax_8 + ebx))) + ((long double)var_10_1)));
005ffb73                          long double x87_r6_9 = ((long double)*(uint32_t*)((char*)eax_8 + ebx));
005ffb76                          eax_6 = ((char*)eax_8 + var_20);
005ffb7f                          var_18_1 = ((float)((x87_r6_9 * x87_r6_9) + ((long double)var_18_1)));
005ffb89                          var_14_1 = ((float)((x87_r6_9 * ((long double)*(uint32_t*)eax_6)) + ((long double)var_14_1)));
005ffb8c                          long double result_3 = ((long double)*(uint32_t*)eax_6);
005ffb95                          var_1c_1 = ((float)((result_3 * result_3) + ((long double)var_1c_1)));
005ffb98                          result = result_3;
005ffb5a                      }
005ffb21                  }
005ffb21                  else
005ffb21                  {
005ffb26                      result = result_2;
005ffb28                      bool p_7;
005ffb28                      
005ffb28                      if (i_3 == 6)
005ffb28                      {
005ffb33                          long double x87_r7_27 = ((((long double)var_c) + ((long double)1f)) * ((long double)0.5f));
005ffb39                          long double temp16_1 = ((long double)*(uint32_t*)ecx_4);
005ffb39                          (x87_r7_27 - temp16_1);
005ffb3b                          eax_6 = ((((x87_r7_27 < temp16_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_27, temp16_1))) ? 1 : 0) << 0xa) | ((((x87_r7_27 == temp16_1) ? 1 : 0) << 0xe) | 0))));
005ffb3d                          p_7 = /* p_7 = unimplemented  {test ah, 0x41} */;
005ffb28                      }
005ffb28                      
005ffb40                      if ((i_3 != 6 || p_7))
005ffb40                      {
005ffb42                          eax_6 = edi_1;
005ffb44                          goto label_5ffb58;
005ffb40                      }
005ffb21                  }
005ffaf6              }
005ffaf6              else
005ffaf6              {
005ffafb                  result = result_2;
005ffafb                  
005ffafd                  if (i_3 == 6)
005ffafd                  {
005ffb02                      long double x87_r7_24 = (((long double)var_8) * ((long double)0.5f));
005ffb08                      long double temp15_1 = ((long double)*(uint32_t*)ecx_4);
005ffb08                      (x87_r7_24 - temp15_1);
005ffb0a                      eax_6 = ((((x87_r7_24 < temp15_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_24, temp15_1))) ? 1 : 0) << 0xa) | ((((x87_r7_24 == temp15_1) ? 1 : 0) << 0xe) | 0))));
005ffafd                  }
005ffafd                  
005ffb0f                  if ((i_3 != 6 || (*(uint8_t*)((char*)eax_6)[1] & 1) != 0))
005ffb0f                  {
005ffb15                      eax_6 = 0f;
005ffb17                      goto label_5ffb58;
005ffb0f                  }
005ffaf6              }
005ffaf6              
005ffb9a              i_2 += 1;
005ffb9e          } while (i_2 < 0x10);
005ffb9e          
005ffba4          long double x87_r7_35 = ((long double)var_18_1);
005ffba7          long double temp17_1 = ((long double)0f);
005ffba7          (x87_r7_35 - temp17_1);
005ffbad          eax_6 = ((((x87_r7_35 < temp17_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_35, temp17_1))) ? 1 : 0) << 0xa) | ((((x87_r7_35 == temp17_1) ? 1 : 0) << 0xe) | 0))));
005ffbad          
005ffbb2          if ((*(uint8_t*)((char*)eax_6)[1] & 0x41) == 0)
005ffbbd              var_8 = ((float)(((long double)var_8) - (((long double)var_10_1) / ((long double)var_18_1))));
005ffbbd          
005ffbc0          long double x87_r7_39 = ((long double)var_1c_1);
005ffbc3          long double temp18_1 = ((long double)0f);
005ffbc3          (x87_r7_39 - temp18_1);
005ffbc9          eax_6 = ((((x87_r7_39 < temp18_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_39, temp18_1))) ? 1 : 0) << 0xa) | ((((x87_r7_39 == temp18_1) ? 1 : 0) << 0xe) | 0))));
005ffbc9          
005ffbce          if ((*(uint8_t*)((char*)eax_6)[1] & 0x41) == 0)
005ffbd9              var_c = ((float)(((long double)var_c) - (((long double)var_14_1) / ((long double)var_1c_1))));
005ffbd9          
005ffbdc          long double x87_r7_43 = ((long double)var_8);
005ffbdf          long double temp19_1 = ((long double)var_c);
005ffbdf          (x87_r7_43 - temp19_1);
005ffbe2          eax_6 = ((((x87_r7_43 < temp19_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_43, temp19_1))) ? 1 : 0) << 0xa) | ((((x87_r7_43 == temp19_1) ? 1 : 0) << 0xe) | 0))));
005ffbe2          
005ffbe7          if ((*(uint8_t*)((char*)eax_6)[1] & 0x41) == 0)
005ffbe7          {
005ffbec              eax_6 = var_c;
005ffbef              var_c = ((float)((long double)var_8));
005ffbf2              var_8 = eax_6;
005ffbe7          }
005ffbe7          
005ffbf8          long double x87_r7_46 = (((long double)var_10_1) * ((long double)var_10_1));
005ffbfb          long double temp20_1 = ((long double)0.015625f);
005ffbfb          (x87_r7_46 - temp20_1);
005ffc01          eax_6 = ((((x87_r7_46 < temp20_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_46, temp20_1))) ? 1 : 0) << 0xa) | ((((x87_r7_46 == temp20_1) ? 1 : 0) << 0xe) | 0))));
005ffc03          bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
005ffc03          
005ffc06          if (!(p_8))
005ffc06          {
005ffc0b              long double x87_r7_48 = (((long double)var_14_1) * ((long double)var_14_1));
005ffc0e              long double temp21_1 = ((long double)0.015625f);
005ffc0e              (x87_r7_48 - temp21_1);
005ffc14              eax_6 = ((((x87_r7_48 < temp21_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_48, temp21_1))) ? 1 : 0) << 0xa) | ((((x87_r7_48 == temp21_1) ? 1 : 0) << 0xe) | 0))));
005ffc16              bool p_9 = /* bool p_9 = unimplemented  {test ah, 0x5} */;
005ffc16              
005ffc19              if (!(p_9))
005ffc19                  break;
005ffc06          }
005ffc06          
005ffc1b          var_24 += 1;
005ffc22      } while (var_24 < 8);
005ffc22      
005ffc2c      int16_t x87control_1;
005ffc2c      int16_t x87status_2;
005ffc2c      x87control_1 = __fldcw_memmem16(var_38_1);
005ffc2f      long double x87_r7_49 = ((long double)var_8);
005ffc32      long double temp8 = ((long double)0f);
005ffc32      (x87_r7_49 - temp8);
005ffc3b      eax_6 = ((((x87_r7_49 < temp8) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_49, temp8))) ? 1 : 0) << 0xa) | ((((x87_r7_49 == temp8) ? 1 : 0) << 0xe) | 0))));
005ffc3d      bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x5} */;
005ffc40      long double x87_r7_50;
005ffc40      
005ffc40      if (p_10)
005ffc40      {
005ffc46          long double x87_r7_51 = ((long double)var_8);
005ffc49          long double temp9_1 = ((long double)1f);
005ffc49          (x87_r7_51 - temp9_1);
005ffc4f          eax_6 = ((((x87_r7_51 < temp9_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_51, temp9_1))) ? 1 : 0) << 0xa) | ((((x87_r7_51 == temp9_1) ? 1 : 0) << 0xe) | 0))));
005ffc4f          
005ffc54          if ((*(uint8_t*)((char*)eax_6)[1] & 0x41) != 0)
005ffc5a              x87_r7_50 = ((long double)var_8);
005ffc54          else
005ffc56              x87_r7_50 = ((long double)1);
005ffc40      }
005ffc40      else
005ffc42          x87_r7_50 = ((long double)0);
005ffc42      
005ffc60      *(uint32_t*)arg2 = ((float)x87_r7_50);
005ffc62      long double x87_r7_52 = ((long double)var_c);
005ffc65      long double temp11 = ((long double)0f);
005ffc65      (x87_r7_52 - temp11);
005ffc6b      float* eax_9;
005ffc6b      eax_9 = ((((x87_r7_52 < temp11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_52, temp11))) ? 1 : 0) << 0xa) | ((((x87_r7_52 == temp11) ? 1 : 0) << 0xe) | 0))));
005ffc6d      bool p_11 = /* bool p_11 = unimplemented  {test ah, 0x5} */;
005ffc70      long double x87_r7_53;
005ffc70      
005ffc70      if (p_11)
005ffc70      {
005ffc76          long double x87_r7_54 = ((long double)var_c);
005ffc79          long double temp13_1 = ((long double)1f);
005ffc79          (x87_r7_54 - temp13_1);
005ffc7f          eax_9 = ((((x87_r7_54 < temp13_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_54, temp13_1))) ? 1 : 0) << 0xa) | ((((x87_r7_54 == temp13_1) ? 1 : 0) << 0xe) | 0))));
005ffc7f          
005ffc84          if ((*(uint8_t*)((char*)eax_9)[1] & 0x41) != 0)
005ffc8a              x87_r7_53 = ((long double)var_c);
005ffc84          else
005ffc86              x87_r7_53 = ((long double)1);
005ffc70      }
005ffc70      else
005ffc72          x87_r7_53 = ((long double)0);
005ffc72      
005ffc90      *(uint32_t*)arg3 = ((float)x87_r7_53);
005ffc93      return result;
005ff96f  }


005ffc96  void __stdcall sub_5ffc96(int16_t arg1 @ x87control, int32_t* arg2, int32_t* arg3, float arg4, int32_t arg5)

005ffc96  {
005ffca5      int32_t var_68;
005ffca5      float* var_5c;
005ffca5      
005ffca5      if (arg5 != 3)
005ffca5      {
005ffcb7          var_5c = &data_7f1ad4;
005ffcbe          var_68 = 0x7f1ac4;
005ffca5      }
005ffca5      else
005ffca5      {
005ffca7          var_5c = &data_7f1af0;
005ffcae          var_68 = 0x7f1ae4;
005ffca5      }
005ffca5      
005ffcc8      int32_t edi;
005ffcc8      int32_t var_cc = edi;
005ffcc9      float var_24 = ((float)((long double)0));
005ffcd1      long double x87_r7_1 = ((long double)0);
005ffcd6      float var_20 = ((float)x87_r7_1);
005ffcd9      int32_t var_14 = data_826ab0;
005ffcd9      float var_10;
005ffcd9      int32_t* edi_1 = &var_10;
005ffcd9      int32_t* esi = &data_826ab4;
005ffcdc      *(uint32_t*)edi_1 = *(uint32_t*)esi;
005ffcdc      void* edi_2 = &edi_1[1];
005ffcdc      void* esi_1 = &esi[1];
005ffcdd      float var_1c = ((float)((long double)0));
005ffce0      *(uint32_t*)edi_2 = *(uint32_t*)esi_1;
005ffce1      *(uint32_t*)((char*)edi_2 + 4) = *(uint32_t*)((char*)esi_1 + 4);
005ffce7      float* esi_5 = (arg4 + 8);
005ffcee      int32_t* ecx = esi_5;
005ffcf0      int32_t i_5 = 0x10;
005ffd5f      float var_c;
005ffd5f      int32_t eax;
005ffd5f      int32_t i;
005ffd5f      
005ffd5f      do
005ffd5f      {
005ffcf2          long double x87_r6_1 = ((long double)ecx[-2]);
005ffcf5          long double temp1_1 = ((long double)var_14);
005ffcf5          (x87_r6_1 - temp1_1);
005ffcf8          eax = ((((x87_r6_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_1 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffcfa          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
005ffcfa          
005ffcfd          if (!(p_1))
005ffd02              var_14 = ecx[-2];
005ffd02          
005ffd05          long double x87_r6_2 = ((long double)ecx[-1]);
005ffd08          long double temp2_1 = ((long double)var_10);
005ffd08          (x87_r6_2 - temp2_1);
005ffd0b          eax = ((((x87_r6_2 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffd0d          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
005ffd0d          
005ffd10          if (!(p_2))
005ffd15              var_10 = ecx[-1];
005ffd15          
005ffd18          long double x87_r6_3 = ((long double)*(uint32_t*)ecx);
005ffd1a          long double temp3_1 = ((long double)var_c);
005ffd1a          (x87_r6_3 - temp3_1);
005ffd1d          eax = ((((x87_r6_3 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_3, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r6_3 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffd1f          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
005ffd1f          
005ffd22          if (!(p_3))
005ffd26              var_c = *(uint32_t*)ecx;
005ffd26          
005ffd29          long double x87_r6_4 = ((long double)ecx[-2]);
005ffd2c          long double temp4_1 = ((long double)var_24);
005ffd2c          (x87_r6_4 - temp4_1);
005ffd2f          eax = ((((x87_r6_4 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_4, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r6_4 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffd2f          
005ffd34          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005ffd39              var_24 = ecx[-2];
005ffd39          
005ffd3c          long double temp5_1 = ((long double)ecx[-1]);
005ffd3c          (x87_r7_1 - temp5_1);
005ffd3f          eax = ((((x87_r7_1 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffd41          bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
005ffd41          
005ffd44          if (!(p_4))
005ffd48              x87_r7_1 = ((long double)ecx[-1]);
005ffd48          
005ffd4b          long double x87_r6_5 = ((long double)*(uint32_t*)ecx);
005ffd4d          long double temp6_1 = ((long double)var_1c);
005ffd4d          (x87_r6_5 - temp6_1);
005ffd50          eax = ((((x87_r6_5 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_5, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r6_5 == temp6_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffd50          
005ffd55          if ((*(uint8_t*)((char*)eax)[1] & 0x41) == 0)
005ffd59              var_1c = *(uint32_t*)ecx;
005ffd59          
005ffd5c          ecx = &ecx[4];
005ffd5e          i = i_5;
005ffd5e          i_5 -= 1;
005ffd5f      } while (i != 1);
005ffd61      float var_20_1 = ((float)x87_r7_1);
005ffd6a      float var_44 = ((float)(((long double)var_24) - ((long double)var_14)));
005ffd72      float var_40 = ((float)(x87_r7_1 - ((long double)var_10)));
005ffd78      long double x87_r6_11 = (((long double)var_1c) - ((long double)var_c));
005ffd8d      long double x87_r5_3 = (((x87_r6_11 * x87_r6_11) + (((long double)var_40) * ((long double)var_40))) + (((long double)var_44) * ((long double)var_44)));
005ffd8f      long double temp8 = ((long double)1.17549435e-38f);
005ffd8f      (x87_r5_3 - temp8);
005ffd95      float var_58 = ((float)x87_r5_3);
005ffd95      bool c1 = /* bool c1 = unimplemented  {fst dword [ebp-0x54], st0} */;
005ffd98      eax = ((((x87_r5_3 < temp8) ? 1 : 0) << 8) | ((((c1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_3, temp8))) ? 1 : 0) << 0xa) | ((((x87_r5_3 == temp8) ? 1 : 0) << 0xe) | 0x2800))));
005ffd9a      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
005ffd9d      int32_t* eax_2;
005ffd9d      
005ffd9d      if (p_5)
005ffd9d      {
005ffdc7          long double x87_r4_4 = ((long double)1);
005ffdc9          float* eax_3 = esi_5;
005ffdcb          long double x87_r5_4 = (x87_r4_4 / x87_r4_4);
005ffdcd          int32_t i_4 = 0x10;
005ffde6          long double x87_r6_13 = ((long double)0.5f);
005ffe10          float var_28_1 = ((float)((long double)0));
005ffe15          float var_2c_1 = ((float)((long double)0));
005ffe1a          float var_30_1 = ((float)((long double)0));
005ffe8a          long double x87_r6_17;
005ffe8a          int32_t i_1;
005ffe8a          
005ffe8a          do
005ffe8a          {
005ffe28              float var_44_1 = ((float)((((long double)eax_3[-2]) - ((long double)((float)((((long double)var_24) + ((long double)var_14)) * x87_r6_13)))) * ((long double)((float)(((long double)var_44) * x87_r5_4)))));
005ffe34              float var_40_1 = ((float)((((long double)eax_3[-1]) - ((long double)((float)((x87_r6_11 + ((long double)var_10)) * x87_r6_13)))) * ((long double)((float)(((long double)var_40) * x87_r5_4)))));
005ffe37              long double x87_r5_21 = ((long double)*(uint32_t*)eax_3);
005ffe39              eax_3 = &eax_3[4];
005ffe3b              i_1 = i_4;
005ffe3b              i_4 -= 1;
005ffe58              long double x87_r4_14 = ((((long double)var_40_1) + ((long double)var_44_1)) - ((((long double)var_40_1) + ((x87_r5_21 - ((long double)((float)((((long double)var_1c) + ((long double)var_c)) * x87_r6_13)))) * ((long double)((float)(x87_r5_4 * x87_r6_11))))) + ((long double)var_44_1)));
005ffe61              var_30_1 = ((float)((x87_r4_14 * x87_r4_14) + ((long double)var_30_1)));
005ffe6e              long double x87_r3_7 = ((((long double)var_44_1) - ((long double)var_40_1)) + x87_r4_14);
005ffe77              var_2c_1 = ((float)((x87_r3_7 * x87_r3_7) + ((long double)var_2c_1)));
005ffe7c              long double x87_r5_26 = (x87_r3_7 - x87_r4_14);
005ffe85              var_28_1 = ((float)((x87_r5_26 * x87_r5_26) + ((long double)var_28_1)));
005ffe88              x87_r6_17 = x87_r5_26;
005ffe8a          } while (i_1 != 1);
005ffe8d          float var_34_1 = ((float)x87_r6_17);
005ffe92          char ebx_1 = 0;
005ffe92          
005ffeac          for (int32_t i_2 = 1; i_2 < 4; i_2 += 1)
005ffeac          {
005ffe99              int32_t __saved_ebp;
005ffe99              long double temp10_1 = ((long double)&__saved_ebp[(i_2 - 0xc)]);
005ffe99              (x87_r6_17 - temp10_1);
005ffe9b              eax_3 = ((((x87_r6_17 < temp10_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_17, temp10_1))) ? 1 : 0) << 0xa) | ((((x87_r6_17 == temp10_1) ? 1 : 0) << 0xe) | 0x3000))));
005ffe9d              bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
005ffe9d              
005ffea0              if (!(p_6))
005ffea0              {
005ffea4                  ebx_1 = i_2;
005ffea6                  x87_r6_17 = ((long double)&__saved_ebp[(i_2 - 0xc)]);
005ffea0              }
005ffeac          }
005ffeac          
005ffeb1          long double x87_r7_6 = x87_r6_17;
005ffeb1          
005ffeb3          if ((ebx_1 & 2) != 0)
005ffeb3          {
005ffeb5              eax_3 = var_10;
005ffeb8              var_10 = ((float)x87_r7_6);
005ffebe              x87_r7_6 = ((long double)eax_3);
005ffec1              var_20_1 = ((float)x87_r7_6);
005ffeb3          }
005ffeb3          
005ffec7          if ((ebx_1 & 1) != 0)
005ffec7          {
005ffecc              eax_3 = var_1c;
005ffecf              var_1c = ((float)((long double)var_c));
005ffed2              var_c = eax_3;
005ffec7          }
005ffec7          
005ffed5          long double x87_r6_20 = ((long double)var_58);
005ffed8          long double temp11_1 = ((long double)0.000244140625f);
005ffed8          (x87_r6_20 - temp11_1);
005ffede          eax_3 = ((((x87_r6_20 < temp11_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_20, temp11_1))) ? 1 : 0) << 0xa) | ((((x87_r6_20 == temp11_1) ? 1 : 0) << 0xe) | 0x3800))));
005ffee0          bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
005ffee0          
005ffee3          if (p_7)
005ffee3          {
005fff09              int32_t j_4 = arg5;
005fff16              long double x87_r7_7 = ((long double)(j_4 - 1));
005fff16              
005fff19              if ((j_4 - 1) < 0)
005fff1b                  x87_r7_7 = (x87_r7_7 + ((long double)4.2949673e+09f));
005fff1b              
005fff21              float var_58_1 = ((float)x87_r7_7);
005fff24              int16_t x87status_1;
005fff24              int16_t temp0_1;
005fff24              temp0_1 = __fnstcw_memmem16(arg1);
005fff24              arg5 = temp0_1;
005fff32              int16_t x87control;
005fff32              int16_t x87status_2;
005fff32              x87control = __fldcw_memmem16((arg5 | 0xc00));
005fff3e              int32_t i_3 = 0;
005fff42              int16_t var_7c_1 = arg5;
005fff42              
006001d4              do
006001d4              {
005fff47                  void var_c0;
005fff47                  float* eax_8;
005fff47                  
005fff47                  if (j_4 > 0)
005fff47                  {
005fff49                      eax_8 = var_5c;
005fff4f                      void* ecx_10 = &var_c0;
005fff55                      float* edx_1 = (var_68 - eax_8);
005fff57                      int32_t j_2 = j_4;
005fff8e                      int32_t j;
005fff8e                      
005fff8e                      do
005fff8e                      {
005fff66                          *(uint32_t*)((char*)ecx_10 - 4) = ((float)((((long double)var_14) * ((long double)*(uint32_t*)eax_8)) + (((long double)var_24) * ((long double)*(uint32_t*)((char*)edx_1 + eax_8)))));
005fff76                          *(uint32_t*)ecx_10 = ((float)((((long double)var_10) * ((long double)*(uint32_t*)eax_8)) + (((long double)var_20_1) * ((long double)*(uint32_t*)((char*)edx_1 + eax_8)))));
005fff7b                          long double x87_r6_28 = (((long double)var_c) * ((long double)*(uint32_t*)eax_8));
005fff80                          long double x87_r5_32 = (((long double)var_1c) * ((long double)*(uint32_t*)((char*)edx_1 + eax_8)));
005fff83                          eax_8 = &eax_8[1];
005fff88                          *(uint32_t*)((char*)ecx_10 + 4) = ((float)(x87_r6_28 + x87_r5_32));
005fff8b                          ecx_10 += 0x10;
005fff8d                          j = j_2;
005fff8d                          j_2 -= 1;
005fff8e                      } while (j != 1);
005fff47                  }
005fff47                  
005fff93                  long double x87_r6_31 = (((long double)var_24) - ((long double)var_14));
005fff9c                  float var_40_2 = ((float)(((long double)var_20_1) - ((long double)var_10)));
005fffa2                  long double x87_r5_36 = (((long double)var_1c) - ((long double)var_c));
005fffb5                  long double x87_r4_24 = (((x87_r5_36 * x87_r5_36) + (((long double)var_40_2) * ((long double)var_40_2))) + (x87_r6_31 * x87_r6_31));
005fffb7                  long double temp12_1 = ((long double)0.000244140625f);
005fffb7                  (x87_r4_24 - temp12_1);
005fffbd                  eax_8 = ((((x87_r4_24 < temp12_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r4_24, temp12_1))) ? 1 : 0) << 0xa) | ((((x87_r4_24 == temp12_1) ? 1 : 0) << 0xe) | 0x2000))));
005fffbf                  bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
005fffbf                  
005fffc2                  if (!(p_8))
005fffc2                      break;
005fffc2                  
005fffc8                  long double x87_r4_25 = (((long double)var_58_1) / x87_r4_24);
005fffcb                  float* ecx_11 = esi_5;
005fffce                  int32_t j_3 = 0x10;
005fffea                  float var_2c_2 = ((float)((long double)0));
005fffef                  float var_30_2 = ((float)((long double)0));
005ffff4                  float var_34_2 = ((float)((long double)0));
005ffff9                  float var_4c_2 = ((float)((long double)0));
005ffffe                  float var_50_2 = ((float)((long double)0));
00600003                  float var_54_2 = ((float)((long double)0));
00600008                  arg4 = ((float)((long double)0));
0060000d                  arg5 = ((float)((long double)0));
006000fd                  long double x87_r4_28;
006000fd                  int32_t j_1;
006000fd                  
006000fd                  do
006000fd                  {
0060002c                      long double x87_r6_45 = ((((((long double)ecx_11[-1]) - ((long double)var_10)) * ((long double)((float)(((long double)var_40_2) * x87_r4_25)))) + ((((long double)ecx_11[-2]) - ((long double)var_14)) * ((long double)((float)(x87_r4_25 * x87_r6_31))))) + ((((long double)*(uint32_t*)ecx_11) - ((long double)var_c)) * ((long double)((float)(x87_r4_25 * x87_r5_36)))));
00600031                      long double temp14_1 = ((long double)var_58_1);
00600031                      (x87_r6_45 - temp14_1);
00600034                      eax_8 = ((((x87_r6_45 < temp14_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_45, temp14_1))) ? 1 : 0) << 0xa) | ((((x87_r6_45 == temp14_1) ? 1 : 0) << 0xe) | 0x3800))));
00600039                      int32_t edx_2;
00600039                      
00600039                      if ((*(uint8_t*)((char*)eax_8)[1] & 1) != 0)
00600054                          edx_2 = ((int32_t)((long double)((float)(((long double)((float)x87_r6_45)) + ((long double)0.5f)))));
00600039                      else
0060003b                          edx_2 = (j_4 - 1);
0060003b                      
00600062                      int32_t eax_10 = (edx_2 << 4);
0060006e                      void var_c4;
0060006e                      long double x87_r6_47 = (((long double)*(uint32_t*)(&var_c4 + eax_10)) - ((long double)ecx_11[-2]));
0060007b                      float var_74_2 = ((float)(((long double)*(uint32_t*)(&var_c0 + eax_10)) - ((long double)ecx_11[-1])));
00600087                      void var_bc;
00600087                      long double x87_r5_46 = (((long double)*(uint32_t*)(&var_bc + eax_10)) - ((long double)*(uint32_t*)ecx_11));
0060008c                      int32_t eax_12 = (edx_2 << 2);
0060008f                      void* edx_4 = ((char*)var_5c + eax_12);
00600093                      eax_8 = (eax_12 + var_68);
00600095                      x87_r4_28 = (((long double)*(uint32_t*)edx_4) * ((long double)0.125f));
0060009e                      ecx_11 = &ecx_11[4];
006000a0                      j_1 = j_3;
006000a0                      j_3 -= 1;
006000a1                      long double x87_r3_17 = (((long double)*(uint32_t*)eax_8) * ((long double)0.125f));
006000ae                      arg5 = ((float)((x87_r4_28 * ((long double)*(uint32_t*)edx_4)) + ((long double)arg5)));
006000b8                      var_54_2 = ((float)((x87_r4_28 * x87_r6_47) + ((long double)var_54_2)));
006000c3                      var_50_2 = ((float)((x87_r4_28 * ((long double)var_74_2)) + ((long double)var_50_2)));
006000cd                      var_4c_2 = ((float)((x87_r4_28 * x87_r5_46) + ((long double)var_4c_2)));
006000d7                      arg4 = ((float)((x87_r3_17 * ((long double)*(uint32_t*)eax_8)) + ((long double)arg4)));
006000e1                      var_34_2 = ((float)((x87_r3_17 * x87_r6_47) + ((long double)var_34_2)));
006000ec                      var_30_2 = ((float)((((long double)var_74_2) * x87_r3_17) + ((long double)var_30_2)));
006000f4                      var_2c_2 = ((float)((x87_r3_17 * x87_r5_46) + ((long double)var_2c_2)));
006000fd                  } while (j_1 != 1);
00600103                  long double x87_r6_49 = ((long double)arg5);
00600106                  long double temp16_1 = ((long double)0f);
00600106                  (x87_r6_49 - temp16_1);
0060010c                  eax_8 = ((((x87_r6_49 < temp16_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_49, temp16_1))) ? 1 : 0) << 0xa) | ((((x87_r6_49 == temp16_1) ? 1 : 0) << 0xe) | 0x3800))));
0060010c                  
00600111                  if ((*(uint8_t*)((char*)eax_8)[1] & 0x41) == 0)
00600111                  {
00600119                      long double x87_r6_51 = (((long double)-1f) / ((long double)arg5));
00600124                      var_14 = ((float)((((long double)var_54_2) * x87_r6_51) + ((long double)var_14)));
0060012f                      var_10 = ((float)((((long double)var_50_2) * x87_r6_51) + ((long double)var_10)));
00600138                      var_c = ((float)((x87_r6_51 * ((long double)var_4c_2)) + ((long double)var_c)));
00600111                  }
00600111                  
0060013b                  long double x87_r6_54 = ((long double)arg4);
0060013e                  long double temp17_1 = ((long double)0f);
0060013e                  (x87_r6_54 - temp17_1);
00600144                  eax_8 = ((((x87_r6_54 < temp17_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_54, temp17_1))) ? 1 : 0) << 0xa) | ((((x87_r6_54 == temp17_1) ? 1 : 0) << 0xe) | 0x3800))));
00600144                  
00600149                  if ((*(uint8_t*)((char*)eax_8)[1] & 0x41) == 0)
00600149                  {
00600151                      long double x87_r6_56 = (((long double)-1f) / ((long double)arg4));
0060015c                      var_24 = ((float)((((long double)var_34_2) * x87_r6_56) + ((long double)var_24)));
00600167                      var_20_1 = ((float)((((long double)var_30_2) * x87_r6_56) + ((long double)var_20_1)));
00600170                      var_1c = ((float)((x87_r6_56 * ((long double)var_2c_2)) + ((long double)var_1c)));
00600149                  }
00600149                  
00600176                  long double x87_r6_60 = (((long double)var_54_2) * ((long double)var_54_2));
00600179                  (x87_r6_60 - x87_r4_28);
0060017b                  eax_8 = ((((x87_r6_60 < x87_r4_28) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_60, x87_r4_28))) ? 1 : 0) << 0xa) | ((((x87_r6_60 == x87_r4_28) ? 1 : 0) << 0xe) | 0x3800))));
0060017d                  bool p_9 = /* bool p_9 = unimplemented  {test ah, 0x5} */;
0060017d                  
00600180                  if (!(p_9))
00600180                  {
00600185                      long double x87_r6_62 = (((long double)var_50_2) * ((long double)var_50_2));
00600188                      (x87_r6_62 - x87_r4_28);
0060018a                      eax_8 = ((((x87_r6_62 < x87_r4_28) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_62, x87_r4_28))) ? 1 : 0) << 0xa) | ((((x87_r6_62 == x87_r4_28) ? 1 : 0) << 0xe) | 0x3800))));
0060018c                      bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x5} */;
0060018c                      
0060018f                      if (!(p_10))
0060018f                      {
00600194                          long double x87_r6_64 = (((long double)var_4c_2) * ((long double)var_4c_2));
00600197                          (x87_r6_64 - x87_r4_28);
00600199                          eax_8 = ((((x87_r6_64 < x87_r4_28) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_64, x87_r4_28))) ? 1 : 0) << 0xa) | ((((x87_r6_64 == x87_r4_28) ? 1 : 0) << 0xe) | 0x3800))));
0060019b                          bool p_11 = /* bool p_11 = unimplemented  {test ah, 0x5} */;
0060019b                          
0060019e                          if (!(p_11))
0060019e                          {
006001a3                              long double x87_r6_66 = (((long double)var_34_2) * ((long double)var_34_2));
006001a6                              (x87_r6_66 - x87_r4_28);
006001a8                              eax_8 = ((((x87_r6_66 < x87_r4_28) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_66, x87_r4_28))) ? 1 : 0) << 0xa) | ((((x87_r6_66 == x87_r4_28) ? 1 : 0) << 0xe) | 0x3800))));
006001aa                              bool p_12 = /* bool p_12 = unimplemented  {test ah, 0x5} */;
006001aa                              
006001ad                              if (!(p_12))
006001ad                              {
006001b2                                  long double x87_r6_68 = (((long double)var_30_2) * ((long double)var_30_2));
006001b5                                  (x87_r6_68 - x87_r4_28);
006001b7                                  eax_8 = ((((x87_r6_68 < x87_r4_28) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_68, x87_r4_28))) ? 1 : 0) << 0xa) | ((((x87_r6_68 == x87_r4_28) ? 1 : 0) << 0xe) | 0x3800))));
006001b9                                  bool p_13 = /* bool p_13 = unimplemented  {test ah, 0x5} */;
006001b9                                  
006001bc                                  if (!(p_13))
006001bc                                  {
006001c1                                      long double x87_r6_70 = (((long double)var_2c_2) * ((long double)var_2c_2));
006001c4                                      (x87_r6_70 - x87_r4_28);
006001c6                                      eax_8 = ((((x87_r6_70 < x87_r4_28) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_70, x87_r4_28))) ? 1 : 0) << 0xa) | ((((x87_r6_70 == x87_r4_28) ? 1 : 0) << 0xe) | 0x3800))));
006001c8                                      bool p_14 = /* bool p_14 = unimplemented  {test ah, 0x5} */;
006001c8                                      
006001cb                                      if (!(p_14))
006001cb                                          break;
006001bc                                  }
006001ad                              }
0060019e                          }
0060018f                      }
00600180                  }
00600180                  
006001cd                  i_3 += 1;
006001d4              } while (i_3 < 8);
006001d4              
006001e4              int16_t x87control_1;
006001e4              int16_t x87status_3;
006001e4              x87control_1 = __fldcw_memmem16(var_7c_1);
006001ed              *(uint32_t*)arg2 = var_14;
006001f2              arg2[1] = var_10;
006001f8              arg2[2] = var_c;
006001fe              eax_2 = arg3;
00600201              *(uint32_t*)eax_2 = var_24;
00600206              eax_2[1] = var_20_1;
005ffee3          }
005ffee3          else
005ffee3          {
005ffeeb              *(uint32_t*)arg2 = var_14;
005ffef0              arg2[1] = var_10;
005ffef6              arg2[2] = var_c;
005ffef9              eax_2 = arg3;
005ffeff              eax_2[1] = ((float)x87_r7_6);
005fff02              *(uint32_t*)eax_2 = var_24;
005ffee3          }
005ffd9d      }
005ffd9d      else
005ffd9d      {
005ffda9          *(uint32_t*)arg2 = var_14;
005ffdae          arg2[1] = var_10;
005ffdb4          arg2[2] = var_c;
005ffdb7          eax_2 = arg3;
005ffdbd          eax_2[1] = ((float)x87_r5_3);
005ffdc0          *(uint32_t*)eax_2 = var_24;
005ffd9d      }
005ffd9d      
0060020e      eax_2[2] = var_1c;
005ffc96  }


00600216  void __stdcall sub_600216(void* arg1 @ eax, int16_t arg2 @ x87control, int16_t* arg3, float arg4, int32_t arg5)

00600216  {
00600228      int32_t edi;
00600228      int32_t var_2ec = edi;
00600229      void* ebx = arg1;
0060022b      int32_t i_3;
0060022b      int32_t i_4;
0060022b      
0060022b      if (arg4 != 0)
0060022b      {
0060022d          i_3 = 0x10;
0060022f          int32_t edx_1 = 0;
00600231          float* ecx_1 = ((char*)ebx + 0xc);
00600234          int32_t i_2 = i_3;
00600249          int32_t i;
00600249          
00600249          do
00600249          {
00600235              long double x87_r7_1 = ((long double)*(uint32_t*)ecx_1);
00600237              long double temp1_1 = ((long double)0.5f);
00600237              (x87_r7_1 - temp1_1);
0060023d              arg1 = ((((x87_r7_1 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0060023f              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0060023f              
00600242              if (!(p_1))
00600244                  edx_1 += 1;
00600244              
00600245              ecx_1 = &ecx_1[4];
00600248              i = i_2;
00600248              i_2 -= 1;
00600249          } while (i != 1);
00600249          
0060024e          if (edx_1 != 0x10)
0060024e          {
0060026e              i_4 = ((0 - 0) + 4);
00600271              goto label_60027d;
0060024e          }
0060024e          
00600253          arg3[1] = 0xffff;
00600259          *(uint32_t*)((char*)arg3 + 4) = 0xffffffff;
0060025d          *(uint16_t*)arg3 = 0;
0060025d          return;
0060022b      }
0060022b      
00600273      i_4 = 4;
0060027d  label_60027d:
0060027d      void s;
0060027d      
0060027d      if (arg5 != 0)
0060027d      {
0060027f          i_3 = 0x40;
0060028a          __builtin_memset(&s, 0, (i_3 << 2));
0060027d      }
0060027d      
0060028c      int16_t x87status_1;
0060028c      int16_t temp0_1;
0060028c      temp0_1 = __fnstcw_memmem16(arg2);
0060028c      arg4 = temp0_1;
0060029a      int16_t x87control;
0060029a      int16_t x87status_2;
0060029a      x87control = __fldcw_memmem16((arg4 | 0xc00));
006002a3      void* ecx_3 = (&s - ebx);
006002be      void var_1d8;
006002be      float var_58 = (&var_1d8 - ebx);
006002c7      void var_1d4;
006002c7      void* ecx_6 = (&var_1d4 - ebx);
006002d5      void var_1d0;
006002d5      void* ecx_7 = (&var_1d0 - ebx);
006002e8      int16_t eax_5 = arg4;
006002f1      void var_1b4;
006002f1      void* ecx_9 = (&var_1b4 - ebx);
006002ff      void var_1b0;
006002ff      void* ecx_10 = (&var_1b0 - ebx);
00600325      void var_194;
00600325      float var_ac = (&var_194 - ebx);
00600331      void var_190;
00600331      void* ecx_14 = (&var_190 - ebx);
00600348      void var_2e0;
00600348      float* ecx_15 = (&var_2e0 - ebx);
0060034a      void var_1a4;
0060034a      float* edx_2 = (&var_1a4 - ebx);
0060034c      void var_1a0;
0060034c      float* edi_1 = (&var_1a0 - ebx);
00600354      arg4 = 0f;
00600357      void* eax_6 = ((char*)ebx + 8);
006005a4      void var_1dc;
006005a4      float var_20;
006005a4      float var_1c;
006005a4      float var_18;
006005a4      float var_14_1;
006005a4      
006005a4      for (int32_t i_1 = 0; i_1 < 0x100; )
006005a4      {
0060036f          var_1c = *(uint32_t*)((char*)eax_6 - 8);
00600375          var_18 = *(uint32_t*)((char*)eax_6 - 4);
0060037a          var_14_1 = *(uint32_t*)eax_6;
0060037a          
0060037d          if (arg5 != 0)
0060037d          {
0060038f              var_1c = ((float)(((long double)var_1c) + ((long double)*(uint32_t*)(&s + i_1))));
0060039c              var_18 = ((float)(((long double)var_18) + ((long double)*(uint32_t*)(&var_1dc + i_1))));
006003a5              var_14_1 = ((float)(((long double)var_14_1) + ((long double)*(uint32_t*)((char*)ecx_3 + eax_6))));
0060037d          }
0060037d          
006003cf          long double x87_r7_13 = (((long double)((int32_t)((long double)((float)((((long double)var_1c) * ((long double)31f)) + ((long double)0.5f)))))) * ((long double)0.0322580636f));
006003d5          var_20 = ((float)x87_r7_13);
006003d8          *(uint32_t*)(&var_2e0 + i_1) = ((float)x87_r7_13);
00600406          long double x87_r7_19 = (((long double)((int32_t)((long double)((float)((((long double)var_18) * ((long double)63f)) + ((long double)0.5f)))))) * ((long double)0.0158730168f));
0060040c          float var_8_5 = ((float)x87_r7_19);
0060040f          void var_2dc;
0060040f          *(uint32_t*)(&var_2dc + i_1) = ((float)x87_r7_19);
0060043e          long double x87_r7_25 = (((long double)((int32_t)((long double)((float)((((long double)var_14_1) * ((long double)31f)) + ((long double)0.5f)))))) * ((long double)0.0322580636f));
00600446          *(uint32_t*)((char*)ecx_15 + eax_6) = ((float)x87_r7_25);
0060044e          *(uint32_t*)((&var_2dc - ebx) + eax_6) = ((float)((long double)1));
0060044e          
00600451          if (arg5 != 0)
00600451          {
0060045d              long double x87_r6_4 = (((long double)var_1c) - ((long double)var_20));
00600460              int32_t esi_11 = (arg4 & 3);
00600469              long double x87_r5_2 = (((long double)var_18) - ((long double)var_8_5));
0060046f              float var_40_1 = ((float)x87_r5_2);
00600475              long double x87_r4_2 = (((long double)var_14_1) - x87_r7_25);
00600477              float var_3c_1 = ((float)x87_r4_2);
00600477              
0060047a              if (esi_11 != 3)
0060047a              {
0060047c                  long double x87_r3_1 = ((long double)0.4375f);
00600485                  void* esi_13 = (var_58 + eax_6);
0060048d                  *(uint32_t*)esi_13 = ((float)((x87_r6_4 * x87_r3_1) + ((long double)*(uint32_t*)esi_13)));
00600497                  void* esi_15 = ((char*)ecx_6 + eax_6);
0060049d                  *(uint32_t*)esi_15 = ((float)((x87_r5_2 * x87_r3_1) + ((long double)*(uint32_t*)esi_15)));
006004a7                  void* esi_17 = ((char*)ecx_7 + eax_6);
006004ad                  *(uint32_t*)esi_17 = ((float)((x87_r4_2 * x87_r3_1) + ((long double)*(uint32_t*)esi_17)));
006004af                  x87_r4_2 = x87_r3_1;
0060047a              }
0060047a              
006004b7              if (i_1 >= 0xc0)
00600567                  x87_r7_25 = x87_r4_2;
006004b7              else
006004b7              {
006004c1                  if (esi_11 != 0)
006004c1                  {
006004c3                      long double x87_r3_2 = ((long double)0.1875f);
006004cc                      void var_1b8;
006004cc                      float* esi_19 = ((&var_1b8 - ebx) + eax_6);
006004d4                      *(uint32_t*)esi_19 = ((float)((x87_r6_4 * x87_r3_2) + ((long double)*(uint32_t*)esi_19)));
006004de                      void* esi_21 = ((char*)ecx_9 + eax_6);
006004e4                      *(uint32_t*)esi_21 = ((float)((x87_r5_2 * x87_r3_2) + ((long double)*(uint32_t*)esi_21)));
006004ee                      void* esi_23 = ((char*)ecx_10 + eax_6);
006004f4                      *(uint32_t*)esi_23 = ((float)((x87_r4_2 * x87_r3_2) + ((long double)*(uint32_t*)esi_23)));
006004f6                      x87_r4_2 = x87_r3_2;
006004c1                  }
006004c1                  
006004f8                  long double x87_r3_3 = ((long double)0.3125f);
00600503                  void var_1a8;
00600503                  void* esi_25 = ((&var_1a8 - ebx) + eax_6);
0060050d                  *(uint32_t*)esi_25 = ((float)((x87_r6_4 * x87_r3_3) + ((long double)*(uint32_t*)esi_25)));
00600516                  *(uint32_t*)((char*)edx_2 + eax_6) = ((float)((x87_r5_2 * x87_r3_3) + ((long double)*(uint32_t*)((char*)edx_2 + eax_6))));
00600520                  *(uint32_t*)((char*)edi_1 + eax_6) = ((float)((x87_r4_2 * x87_r3_3) + ((long double)*(uint32_t*)((char*)edi_1 + eax_6))));
00600520                  
00600529                  if (esi_11 == 3)
00600567                      x87_r7_25 = x87_r3_3;
00600529                  else
00600529                  {
00600534                      void var_198;
00600534                      float* esi_27 = ((&var_198 - ebx) + eax_6);
00600538                      *(uint32_t*)esi_27 = ((float)((x87_r3_3 * ((long double)0.0625f)) + ((long double)*(uint32_t*)esi_27)));
00600543                      float* esi_29 = (var_ac + eax_6);
0060054d                      *(uint32_t*)esi_29 = ((float)((((long double)var_40_1) * ((long double)0.0625f)) + ((long double)*(uint32_t*)esi_29)));
00600555                      void* esi_31 = ((char*)ecx_14 + eax_6);
0060055f                      *(uint32_t*)esi_31 = ((float)((((long double)var_3c_1) * ((long double)0.0625f)) + ((long double)*(uint32_t*)esi_31)));
00600529                  }
006004b7              }
00600451          }
00600451          
00600575          arg4 += 1;
00600578          i_1 += 0x10;
0060057b          *(uint32_t*)(&i_3 + i_1) = ((float)(((long double)var_20) * ((long double)data_826ab0)));
0060058b          *(uint32_t*)(&var_2ec + i_1) = ((float)(((long double)var_8_5) * ((long double)data_826ab4)));
00600598          *(uint32_t*)((char*)ecx_15 + eax_6) = ((float)(x87_r7_25 * ((long double)data_826ab8)));
0060059b          eax_6 += 0x10;
006005a4      }
006005a4      
006005aa      int16_t x87control_1;
006005aa      int16_t x87status_3;
006005aa      x87control_1 = __fldcw_memmem16(eax_5);
006005ad      i_3 = i_4;
006005bf      float var_54;
006005bf      int16_t x87control_2;
006005bf      int80_t st0_1;
006005bf      st0_1 = sub_5ffc96(x87control_1, &var_1c, &var_54, &var_2e0, i_3);
006005c4      long double x87_r7_27 = ((long double)data_826ac0[0]);
006005d5      float var_dc = ((float)(((long double)var_1c) * x87_r7_27));
006005db      long double x87_r6_20 = ((long double)data_826ac0[4][0]);
006005e6      float var_d8_1 = ((float)(((long double)var_18) * x87_r6_20));
006005f5      float var_d4_1 = ((float)(((long double)var_14_1) * ((long double)data_826ac8)));
00600600      float var_44 = ((float)(((long double)var_54) * x87_r7_27));
00600608      float var_50;
00600608      float var_40_2 = ((float)(((long double)var_50) * x87_r6_20));
00600618      float var_4c;
00600618      float var_3c_2 = ((float)(((long double)var_4c) * ((long double)data_826ac8)));
0060061b      int32_t eax_7;
0060061b      int16_t x87control_3;
0060061b      eax_7 = sub_5ff86c(&var_dc, x87control_2);
00600625      int16_t var_2c_2 = eax_7;
00600628      int32_t eax_8;
00600628      uint16_t edx_3;
00600628      int16_t x87control_4;
00600628      eax_8 = sub_5ff86c(&var_44, x87control_3);
00600633      int16_t var_24_2 = eax_8;
00600633      
0060063b      if ((i_4 == 4 && eax_7 == eax_8))
0060063b      {
00600640          *(uint32_t*)((char*)arg3 + 4) = 0;
00600644          *(uint16_t*)arg3 = eax_7;
00600647          arg3[1] = eax_8;
00600647          return;
0060063b      }
0060063b      
00600662      sub_5ff76a(&var_44, sub_5ff76a(&var_dc, edx_3, eax_7), eax_8);
00600667      long double x87_r7_31 = ((long double)data_826ab0);
0060067d      var_1c = ((float)(((long double)var_dc) * x87_r7_31));
00600684      long double x87_r6_23 = ((long double)data_826ab4);
00600690      int32_t ecx_20;
00600690      ecx_20 = i_4 == 3;
00600695      var_18 = ((float)(((long double)var_d8_1) * x87_r6_23));
006006a9      float var_14_2 = ((float)(((long double)var_d4_1) * ((long double)data_826ab8)));
006006b1      var_54 = ((float)(((long double)var_44) * x87_r7_31));
006006b9      var_50 = ((float)(((long double)var_40_2) * x87_r6_23));
006006c9      float var_4c_1 = ((float)(((long double)var_3c_2) * ((long double)data_826ab8)));
006006cc      float var_a8;
006006cc      float var_a4;
006006cc      float* esi_42;
006006cc      
006006cc      if (ecx_20 != ((&var_44 - &var_44) + 1))
006006cc      {
006006e7          arg3[1] = eax_7;
006006eb          *(uint16_t*)arg3 = eax_8;
006006f7          var_a8 = var_54;
006006f7          float* edi_7 = &var_a4;
006006f7          float* esi_38 = &var_50;
006006f8          *(uint32_t*)edi_7 = *(uint32_t*)esi_38;
006006f8          void* edi_8 = &edi_7[1];
006006f8          void* esi_39 = &esi_38[1];
006006f9          *(uint32_t*)edi_8 = *(uint32_t*)esi_39;
006006fa          *(uint32_t*)((char*)edi_8 + 4) = *(uint32_t*)((char*)esi_39 + 4);
006006fb          esi_42 = &var_1c;
006006cc      }
006006cc      else
006006cc      {
006006ce          *(uint16_t*)arg3 = eax_7;
006006d1          arg3[1] = eax_8;
006006de          var_a8 = var_1c;
006006de          float* edi_3 = &var_a4;
006006de          float* esi_34 = &var_18;
006006df          *(uint32_t*)edi_3 = *(uint32_t*)esi_34;
006006df          void* edi_4 = &edi_3[1];
006006df          void* esi_35 = &esi_34[1];
006006e0          *(uint32_t*)edi_4 = *(uint32_t*)esi_35;
006006e1          *(uint32_t*)((char*)edi_4 + 4) = *(uint32_t*)((char*)esi_35 + 4);
006006e2          esi_42 = &var_54;
006006cc      }
006006cc      
0060070a      float var_98_1 = *(uint32_t*)esi_42;
0060070a      float var_94;
0060070a      int32_t* edi_11 = &var_94;
0060070a      void* esi_43 = &esi_42[1];
0060070b      *(uint32_t*)edi_11 = *(uint32_t*)esi_43;
0060070b      void* edi_12 = &edi_11[1];
0060070b      void* esi_44 = ((char*)esi_43 + 4);
0060070c      *(uint32_t*)edi_12 = *(uint32_t*)esi_44;
0060070d      *(uint32_t*)((char*)edi_12 + 4) = *(uint32_t*)((char*)esi_44 + 4);
00600714      long double x87_r7_36 = (((long double)var_98_1) - ((long double)var_a8));
0060071a      float var_a0;
0060071a      int32_t var_8_6;
0060071a      long double x87_r5_21;
0060071a      float var_9c;
0060071a      float var_90;
0060071a      float var_8c;
0060071a      
0060071a      if (i_4 != 3)
0060071a      {
00600792          var_8_6 = 0x7f1b00;
006007a1          float var_88_2 = ((float)((((long double)0.333333343f) * x87_r7_36) + ((long double)var_a8)));
006007ad          long double x87_r6_33 = (((long double)var_94) - ((long double)var_a4));
006007c1          float var_84_2 = ((float)((((long double)0.333333343f) * x87_r6_33) + ((long double)var_a4)));
006007ca          long double x87_r5_26 = (((long double)var_90) - ((long double)var_a0));
006007d0          arg4 = ((float)x87_r5_26);
006007e1          float var_80_2 = ((float)((((long double)0.333333343f) * x87_r5_26) + ((long double)var_a0)));
006007ea          long double x87_r4_19 = (((long double)var_8c) - ((long double)var_9c));
006007fe          float var_7c_2 = ((float)((((long double)0.333333343f) * x87_r4_19) + ((long double)var_9c)));
00600801          long double x87_r3_7 = ((long double)0.666666687f);
00600811          float var_78_1 = ((float)((x87_r7_36 * x87_r3_7) + ((long double)var_a8)));
0060081e          float var_74_1 = ((float)((x87_r6_33 * x87_r3_7) + ((long double)var_a4)));
0060082b          float var_70_1 = ((float)((x87_r5_26 * x87_r3_7) + ((long double)var_a0)));
00600838          float var_6c_1 = ((float)((x87_r4_19 * x87_r3_7) + ((long double)var_9c)));
0060083d          x87_r5_21 = x87_r3_7;
0060071a      }
0060071a      else
0060071a      {
00600722          var_8_6 = 0x7f1b10;
00600731          float var_88_1 = ((float)((((long double)0.5f) * x87_r7_36) + ((long double)var_a8)));
00600743          x87_r5_21 = ((long double)0.5f);
00600753          float var_84_1 = ((float)(((((long double)var_94) - ((long double)var_a4)) * x87_r5_21) + ((long double)var_a4)));
0060075c          long double x87_r4_8 = (((long double)var_90) - ((long double)var_a0));
00600762          arg4 = ((float)x87_r4_8);
0060076d          float var_80_1 = ((float)((x87_r4_8 * x87_r5_21) + ((long double)var_a0)));
00600784          float var_7c_1 = ((float)(((((long double)var_8c) - ((long double)var_9c)) * x87_r5_21) + ((long double)var_9c)));
0060071a      }
00600846      var_54 = ((float)x87_r7_36);
0060084d      long double x87_r6_35 = ((long double)arg4);
00600853      long double x87_r5_28 = ((long double)(i_4 - 1));
00600853      
00600856      if ((i_4 - 1) < 0)
00600858          x87_r5_28 = (x87_r5_28 + ((long double)4.2949673e+09f));
00600858      
0060085e      float eax_16;
0060085e      eax_16 = var_24_2;
00600862      float var_30_2 = ((float)x87_r5_28);
00600869      long double x87_r5_33;
00600869      
00600869      if (var_2c_2 == eax_16)
00600882          x87_r5_33 = ((long double)0);
00600869      else
0060087d          x87_r5_33 = (((long double)var_30_2) / (((x87_r6_35 * x87_r6_35) + (x87_r5_21 * x87_r5_21)) + (((long double)var_54) * ((long double)var_54))));
0060087d      
0060088c      long double x87_r4_26 = (((long double)var_54) * x87_r5_33);
0060088e      var_20 = 0f;
00600891      var_54 = ((float)x87_r4_26);
00600898      var_50 = ((float)(x87_r5_33 * x87_r5_21));
0060089d      float var_4c_2 = ((float)(x87_r5_33 * x87_r6_35));
0060089d      
006008a4      if (arg5 != 0)
006008a4      {
006008a6          i_3 = 0x40;
006008b1          __builtin_memset(&s, 0, (i_3 << 2));
006008a4      }
006008a4      
006008b3      int16_t x87status_4;
006008b3      int16_t temp0_2;
006008b3      temp0_2 = __fnstcw_memmem16(x87control_4);
006008b3      arg4 = temp0_2;
006008c1      int16_t x87control_5;
006008c1      int16_t x87status_5;
006008c1      x87control_5 = __fldcw_memmem16((arg4 | 0xc00));
006008c4      int16_t eax_19 = arg4;
006008d0      void* var_c_4 = &s;
006008db      void var_1cc;
006008db      var_58 = (&var_1cc - ebx);
006008e6      arg4 = 0f;
006008fe      float* esi_47 = (&var_1dc - ebx);
00600906      void var_2d8;
00600906      float* edx_5 = (&var_2d8 - ebx);
00600908      void var_19c;
00600908      float* edi_15 = (&var_19c - ebx);
0060090c      void* ecx_22 = ((char*)ebx + 4);
0060090f      float* var_24_4 = esi_47;
00600912      void var_18c;
00600912      void* var_68_2 = (&var_18c - ebx);
00600912      
0060091e      while (true)
0060091e      {
0060091e          void* eax_22;
0060091e          
0060091e          if (i_4 != 3)
0060091e          {
00600950          label_600950:
00600950              var_1c = ((float)(((long double)data_826ab0) * ((long double)*(uint32_t*)((char*)ecx_22 - 4))));
0060095b              var_18 = ((float)(((long double)data_826ab4) * ((long double)*(uint32_t*)ecx_22)));
00600967              float var_14_3 = ((float)(((long double)data_826ab8) * ((long double)*(uint32_t*)((char*)ecx_22 + 4))));
00600967              
0060096a              if (arg5 != 0)
0060096a              {
0060097a                  var_1c = ((float)(((long double)var_1c) + ((long double)*(uint32_t*)var_c_4)));
00600983                  var_18 = ((float)(((long double)var_18) + ((long double)*(uint32_t*)((char*)ecx_22 + ecx_3))));
0060098c                  var_14_3 = ((float)(((long double)var_14_3) + ((long double)*(uint32_t*)((char*)esi_47 + ecx_22))));
0060096a              }
0060096a              
006009b5              long double x87_r7_57 = ((((((long double)var_14_3) - ((long double)var_a0)) * ((long double)var_4c_2)) + ((((long double)var_18) - ((long double)var_a4)) * ((long double)var_50))) + ((((long double)var_1c) - ((long double)var_a8)) * ((long double)var_54)));
006009b7              long double temp4_1 = ((long double)0f);
006009b7              (x87_r7_57 - temp4_1);
006009bd              eax_22 = ((((x87_r7_57 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_57, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_57 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
006009bf              bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
006009bf              
006009c2              if (p_3)
006009c2              {
006009ca                  long double temp5_1 = ((long double)var_30_2);
006009ca                  (x87_r7_57 - temp5_1);
006009cd                  eax_22 = ((((x87_r7_57 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_57, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_57 == temp5_1) ? 1 : 0) << 0xe) | 0x3800))));
006009cd                  
006009d2                  if ((*(uint8_t*)((char*)eax_22)[1] & 1) != 0)
006009f0                      eax_22 = *(uint32_t*)(var_8_6 + (((int32_t)((long double)((float)(x87_r7_57 + ((long double)0.5f))))) << 2));
006009d2                  else
006009d8                      eax_22 = 1;
006009c2              }
006009c2              else
006009c6                  eax_22 = nullptr;
006009c6              
00600a04              var_20 = ((eax_22 << 0x1e) | (var_20 >> 2));
00600a04              
00600a07              if (arg5 != 0)
00600a07              {
00600a13                  eax_22 <<= 4;
00600a1d                  int32_t esi_53 = (arg4 & 3);
00600a23                  long double x87_r7_62 = ((((long double)var_1c) - ((long double)*(uint32_t*)(&var_a8 + eax_22))) * ((long double)*(uint32_t*)((char*)edx_5 + ecx_22)));
00600a30                  long double x87_r6_44 = ((((long double)var_18) - ((long double)*(uint32_t*)(&var_a4 + eax_22))) * ((long double)*(uint32_t*)((char*)edx_5 + ecx_22)));
00600a33                  float var_40_3 = ((float)x87_r6_44);
00600a43                  float var_3c_3 = ((float)((((long double)var_14_3) - ((long double)*(uint32_t*)(&var_a0 + eax_22))) * ((long double)*(uint32_t*)((char*)edx_5 + ecx_22))));
00600a43                  
00600a46                  if (esi_53 != 3)
00600a46                  {
00600a56                      float* eax_28 = ((char*)ecx_6 + ecx_22);
00600a5a                      *(uint32_t*)eax_28 = ((float)((x87_r7_62 * ((long double)0.4375f)) + ((long double)*(uint32_t*)eax_28)));
00600a68                      float* eax_30 = ((char*)ecx_7 + ecx_22);
00600a6e                      *(uint32_t*)eax_30 = ((float)((((long double)0.4375f) * x87_r6_44) + ((long double)*(uint32_t*)eax_30)));
00600a76                      eax_22 = (var_58 + ecx_22);
00600a80                      *(uint32_t*)eax_22 = ((float)((((long double)var_3c_3) * ((long double)0.4375f)) + ((long double)*(uint32_t*)eax_22)));
00600a46                  }
00600a46                  
00600a86                  if (arg4 < 0xc)
00600a86                  {
00600a8e                      if (esi_53 != 0)
00600a8e                      {
00600a9e                          float* eax_33 = ((char*)ecx_9 + ecx_22);
00600aa2                          *(uint32_t*)eax_33 = ((float)((x87_r7_62 * ((long double)0.1875f)) + ((long double)*(uint32_t*)eax_33)));
00600ab0                          float* eax_35 = ((char*)ecx_10 + ecx_22);
00600ab6                          *(uint32_t*)eax_35 = ((float)((((long double)0.1875f) * x87_r6_44) + ((long double)*(uint32_t*)eax_35)));
00600abe                          void var_1ac;
00600abe                          float* eax_37 = ((&var_1ac - ebx) + ecx_22);
00600ac8                          *(uint32_t*)eax_37 = ((float)((((long double)var_3c_3) * ((long double)0.1875f)) + ((long double)*(uint32_t*)eax_37)));
00600a8e                      }
00600a8e                      
00600ad8                      float* eax_39 = ((char*)edx_2 + ecx_22);
00600adc                      *(uint32_t*)eax_39 = ((float)((x87_r7_62 * ((long double)0.3125f)) + ((long double)*(uint32_t*)eax_39)));
00600ae4                      eax_22 = ((char*)edi_1 + ecx_22);
00600af1                      *(uint32_t*)eax_22 = ((float)((x87_r6_44 * ((long double)0.3125f)) + ((long double)*(uint32_t*)eax_22)));
00600aff                      *(uint32_t*)((char*)edi_15 + ecx_22) = ((float)((((long double)var_3c_3) * ((long double)0.3125f)) + ((long double)*(uint32_t*)((char*)edi_15 + ecx_22))));
00600aff                      
00600b02                      if (esi_53 != 3)
00600b02                      {
00600b10                          float* eax_42 = (var_ac + ecx_22);
00600b14                          *(uint32_t*)eax_42 = ((float)((x87_r7_62 * ((long double)0.0625f)) + ((long double)*(uint32_t*)eax_42)));
00600b1c                          float* eax_44 = ((char*)ecx_14 + ecx_22);
00600b26                          *(uint32_t*)eax_44 = ((float)((((long double)var_40_3) * ((long double)0.0625f)) + ((long double)*(uint32_t*)eax_44)));
00600b2e                          eax_22 = ((char*)var_68_2 + ecx_22);
00600b38                          *(uint32_t*)eax_22 = ((float)((((long double)var_3c_3) * ((long double)0.0625f)) + ((long double)*(uint32_t*)eax_22)));
00600b02                      }
00600a86                  }
00600a07              }
0060091e          }
0060091e          else
0060091e          {
00600920              long double x87_r7_40 = ((long double)*(uint32_t*)((char*)ecx_22 + 8));
00600923              long double temp3_1 = ((long double)0.5f);
00600923              (x87_r7_40 - temp3_1);
00600929              eax_22 = ((((x87_r7_40 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_40, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_40 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0060092b              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0060092b              
0060092e              if (p_2)
0060092e                  goto label_600950;
0060092e              
0060093b              var_20 = ((var_20 >> 2) | 0xc0000000);
0060091e          }
00600b40          arg4 += 1;
00600b43          var_c_4 += 0x10;
00600b47          ecx_22 += 0x10;
00600b47          
00600b4e          if (arg4 >= 0x10)
00600b4e              break;
00600b4e          
00600917          esi_47 = var_24_4;
0060091e      }
0060091e      
00600b54      int16_t x87control_6;
00600b54      int16_t x87status_6;
00600b54      x87control_6 = __fldcw_memmem16(eax_19);
00600b5d      *(uint32_t*)((char*)arg3 + 4) = var_20;
00600216  }


00600b69  long __stdcall D3DXTex::D3DXDecodeDXT1(struct D3DXCOLOR* arg1, uint8_t const* arg2)

00600b69  {
00600b78      int32_t esi;
00600b78      esi = *(uint16_t*)arg2;
00600b7b      int32_t edi;
00600b7b      int32_t var_68 = edi;
00600b81      float var_5c;
00600b81      uint16_t edx;
00600b81      uint16_t edx_1 = sub_5ff76a(&var_5c, edx, esi);
00600b88      int32_t edi_1;
00600b88      edi_1 = *(uint16_t*)(arg2 + 2);
00600b91      float var_4c;
00600b91      sub_5ff76a(&var_4c, edx_1, edi_1);
00600b99      float var_58;
00600b99      float var_54;
00600b99      float var_50;
00600b99      float var_48;
00600b99      float var_44;
00600b99      float var_40;
00600b99      float var_30;
00600b99      float var_28;
00600b99      
00600b99      if (esi > edi_1)
00600b99      {
00600c04          long double x87_r6_16 = ((long double)0.333333343f);
00600c11          float var_3c_1 = ((float)(((((long double)var_4c) - ((long double)var_5c)) * x87_r6_16) + ((long double)var_5c)));
00600c17          long double x87_r5_5 = (((long double)var_48) - ((long double)var_58));
00600c22          float var_38_1 = ((float)((x87_r5_5 * x87_r6_16) + ((long double)var_58)));
00600c28          long double x87_r5_9 = (((long double)var_44) - ((long double)var_54));
00600c2b          float var_8_1 = ((float)x87_r5_9);
00600c33          float var_34_1 = ((float)((x87_r5_9 * x87_r6_16) + ((long double)var_54)));
00600c39          long double x87_r5_13 = (((long double)var_40) - ((long double)var_50));
00600c3c          float var_c_1 = ((float)x87_r5_13);
00600c44          var_30 = ((float)((x87_r5_13 * x87_r6_16) + ((long double)var_50)));
00600c49          long double x87_r6_17 = ((long double)0.666666687f);
00600c56          float var_2c_1 = ((float)((x87_r6_16 * x87_r6_17) + ((long double)var_5c)));
00600c61          var_28 = ((float)((((long double)((float)x87_r5_5)) * x87_r6_17) + ((long double)var_58)));
00600c6c          float var_24_1 = ((float)((((long double)var_8_1) * x87_r6_17) + ((long double)var_54)));
00600c77          float var_20 = ((float)((((long double)var_c_1) * x87_r6_17) + ((long double)var_50)));
00600b99      }
00600b99      else
00600b99      {
00600b9b          long double x87_r7 = ((long double)0.5f);
00600bb2          float var_3c = ((float)(((((long double)var_4c) - ((long double)var_5c)) * x87_r7) + ((long double)var_5c)));
00600bc0          float var_38 = ((float)(((((long double)var_48) - ((long double)var_58)) * x87_r7) + ((long double)var_58)));
00600bce          float var_34 = ((float)(((((long double)var_44) - ((long double)var_54)) * x87_r7) + ((long double)var_54)));
00600bdc          var_30 = ((float)(((((long double)var_40) - ((long double)var_50)) * x87_r7) + ((long double)var_50)));
00600be3          float var_1c_1 = ((float)((long double)0));
00600be8          float var_18 = ((float)((long double)0));
00600bed          float var_14_1 = ((float)((long double)0));
00600bf2          float var_10_1 = ((float)((long double)0));
00600bf5          float var_2c = var_1c_1;
00600bf5          float* edi_2 = &var_28;
00600bf5          float* esi_1 = &var_18;
00600bf6          *(uint32_t*)edi_2 = *(uint32_t*)esi_1;
00600bf6          void* edi_3 = &edi_2[1];
00600bf6          void* esi_2 = &esi_1[1];
00600bf7          *(uint32_t*)edi_3 = *(uint32_t*)esi_2;
00600bf8          *(uint32_t*)((char*)edi_3 + 4) = *(uint32_t*)((char*)esi_2 + 4);
00600b99      }
00600c7e      uint32_t ebx_1 = *(uint32_t*)(arg2 + 4);
00600c81      struct D3DXCOLOR* eax_2 = arg1;
00600c86      int32_t i_1 = 0x10;
00600ca0      int32_t i;
00600ca0      
00600ca0      do
00600ca0      {
00600c95          int32_t __saved_ebp;
00600c95          eax_2->r = &__saved_ebp[(((ebx_1 & 3) * 4) - 0x16)];
00600c95          float* edi_7 = &eax_2->g;
00600c95          void* esi_6 = &&__saved_ebp[(((ebx_1 & 3) * 4) - 0x15)];
00600ca2          ADJ(edi_7)->g = *(uint32_t*)esi_6;
00600c96          float* edi_8 = &edi_7[1];
00600c96          void* esi_7 = ((char*)esi_6 + 4);
00600ca2          ADJ(edi_8)->b = *(uint32_t*)esi_7;
00600c98          eax_2 = &eax_2[1];
00600c9b          ebx_1 u>>= 2;
00600c9e          i = i_1;
00600c9e          i_1 -= 1;
00600ca2          (&edi_8[1] - 0xc)->a = *(uint32_t*)((char*)esi_7 + 4);
00600ca0      } while (i != 1);
00600ca8      return 0;
00600b69  }


00600cab  long __stdcall D3DXTex::D3DXDecodeDXT3(struct D3DXCOLOR* arg1, uint8_t const* arg2)

00600cab  {
00600cb4      int32_t edi;
00600cb4      int32_t var_c = edi;
00600cbd      D3DXTex::D3DXDecodeDXT1(arg1, &arg2[8]);
00600cc6      uint32_t ecx_1 = *(uint32_t*)arg2;
00600cc8      long double x87_r7_1 = ((long double)0.0666666701f);
00600cd0      int32_t i_3 = 8;
00600cd1      float* eax_1 = &arg1->a;
00600cf5      int32_t i;
00600cf5      
00600cf5      do
00600cf5      {
00600cd7          uint8_t* ebx_2 = (ecx_1 & 0xf);
00600cdf          long double x87_r6_1 = ((long double)ebx_2);
00600cdf          
00600ce2          if (ebx_2 < 0)
00600ce4              x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
00600ce4          
00600cec          ecx_1 u>>= 4;
00600d26          ADJ(eax_1)->a = ((float)(x87_r6_1 * x87_r7_1));
00600cf1          eax_1 = &eax_1[4];
00600cf4          i = i_3;
00600cf4          i_3 -= 1;
00600cf5      } while (i != 1);
00600cf7      uint32_t esi_1 = *(uint32_t*)(arg2 + 4);
00600cfc      int32_t i_2 = 8;
00600cfd      void* __offset(D3DXCOLOR, 0x8c) eax_2 = ((char*)arg1 + 0x8c);
00600d24      int32_t i_1;
00600d24      
00600d24      do
00600d24      {
00600d06          uint8_t* edx_2 = (esi_1 & 0xf);
00600d0e          long double x87_r6_3 = ((long double)edx_2);
00600d0e          
00600d11          if (edx_2 < 0)
00600d13              x87_r6_3 = (x87_r6_3 + ((long double)4.2949673e+09f));
00600d13          
00600d1b          esi_1 u>>= 4;
00600d1e          *(int32_t*)((char*)ADJ(eax_2) + 0x8c) = ((float)(x87_r6_3 * x87_r7_1));
00600d20          eax_2 += 0x10;
00600d23          i_1 = i_2;
00600d23          i_2 -= 1;
00600d24      } while (i_1 != 1);
00600d2d      return 0;
00600cab  }


00600d30  long __stdcall D3DXTex::D3DXDecodeDXT5(struct D3DXCOLOR* arg1, uint8_t const* arg2)

00600d30  {
00600d3c      int32_t edi;
00600d3c      int32_t var_2c = edi;
00600d45      D3DXTex::D3DXDecodeDXT1(arg1, &arg2[8]);
00600d52      uint8_t const eax_1 = *(uint8_t*)arg2;
00600d54      long double x87_r7_1 = ((long double)0.00392156886f);
00600d60      uint32_t ecx_1;
00600d60      ecx_1 = arg2[1];
00600d70      float var_24 = ((float)(((long double)((uint32_t)eax_1)) * x87_r7_1));
00600d78      float var_20_1 = ((float)(((long double)((uint32_t)ecx_1)) * x87_r7_1));
00600d78      
00600d7d      if (eax_1 <= ecx_1)
00600d7d      {
00600dff          for (uint8_t* i = 1; i < 5; )
00600dff          {
00600dce              long double x87_r7_6 = ((long double)(5 - i));
00600dce              
00600dd1              if ((5 - i) < 0)
00600dd3                  x87_r7_6 = (x87_r7_6 + ((long double)4.2949673e+09f));
00600dd3              
00600de1              long double x87_r6_7 = ((long double)i);
00600de1              
00600de4              if (i < 0)
00600de6                  x87_r6_7 = (x87_r6_7 + ((long double)4.2949673e+09f));
00600de6              
00600def              i = &i[1];
00600dfb              &var_24[i] = ((float)(((x87_r7_6 * ((long double)var_24)) + (x87_r6_7 * ((long double)var_20_1))) * ((long double)0.200000003f)));
00600dff          }
00600dff          
00600e03          float var_c_1 = ((float)((long double)0));
00600e08          float var_8_1 = ((float)((long double)1));
00600d7d      }
00600d7d      else
00600d7d      {
00600dbd          for (uint8_t* i_1 = 1; i_1 < 7; )
00600dbd          {
00600d8c              long double x87_r7_2 = ((long double)(7 - i_1));
00600d8c              
00600d8f              if ((7 - i_1) < 0)
00600d91                  x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
00600d91              
00600d9f              long double x87_r6_5 = ((long double)i_1);
00600d9f              
00600da2              if (i_1 < 0)
00600da4                  x87_r6_5 = (x87_r6_5 + ((long double)4.2949673e+09f));
00600da4              
00600dad              i_1 = &i_1[1];
00600db9              &var_24[i_1] = ((float)(((x87_r7_2 * ((long double)var_24)) + (x87_r6_5 * ((long double)var_20_1))) * ((long double)0.142857149f)));
00600dbd          }
00600d7d      }
00600d7d      
00600e11      int32_t ecx_4;
00600e11      *(uint8_t*)((char*)ecx_4)[1] = arg2[4];
00600e16      int32_t i_4 = 8;
00600e18      ecx_4 = arg2[3];
00600e1e      int32_t ecx_6 = ((ecx_4 << 8) | ((uint32_t)arg2[2]));
00600e20      float* eax_3 = &arg1->a;
00600e35      int32_t i_2;
00600e35      
00600e35      do
00600e35      {
00600e28          long double x87_r7_12 = ((long double)&var_24[(ecx_6 & 7)]);
00600e2c          ecx_6 u>>= 3;
00600e66          ADJ(eax_3)->a = ((float)x87_r7_12);
00600e31          eax_3 = &eax_3[4];
00600e34          i_2 = i_4;
00600e34          i_4 -= 1;
00600e35      } while (i_2 != 1);
00600e3d      int32_t ecx_7;
00600e3d      *(uint8_t*)((char*)ecx_7)[1] = arg2[7];
00600e42      int32_t i_5 = 8;
00600e44      ecx_7 = arg2[6];
00600e4a      int32_t ecx_9 = ((ecx_7 << 8) | ((uint32_t)arg2[5]));
00600e4c      void* __offset(D3DXCOLOR, 0x8c) eax_5 = ((char*)arg1 + 0x8c);
00600e64      int32_t i_3;
00600e64      
00600e64      do
00600e64      {
00600e57          long double x87_r7_13 = ((long double)&var_24[(ecx_9 & 7)]);
00600e5b          ecx_9 u>>= 3;
00600e5e          *(int32_t*)((char*)ADJ(eax_5) + 0x8c) = ((float)x87_r7_13);
00600e60          eax_5 += 0x10;
00600e63          i_3 = i_5;
00600e63          i_5 -= 1;
00600e64      } while (i_3 != 1);
00600e6b      return 0;
00600d30  }


00600e6e  long __stdcall D3DXTex::D3DXEncodeDXT1(uint8_t* arg1, struct D3DXCOLOR const* arg2, int32_t arg3)

00600e6e  {
00600e7d      void* eax_4;
00600e7d      int16_t x87control;
00600e7d      
00600e7d      if (arg3 == 0)
00600f78          eax_4 = arg2;
00600e7d      else
00600e7d      {
00600e85          int32_t edi;
00600e85          int32_t var_15c_1 = edi;
00600e8e          void s;
00600e8e          __builtin_memset(&s, 0, 0x40);
00600e90          int16_t x87status_1;
00600e90          int16_t temp0_1;
00600e90          temp0_1 = __fnstcw_memmem16(x87control);
00600e9e          int16_t x87control_1;
00600e9e          int16_t x87status_2;
00600e9e          x87control_1 = __fldcw_memmem16((temp0_1 | 0xc00));
00600eb0          struct D3DXCOLOR* i = nullptr;
00600eb2          void var_14c;
00600eb2          void* ecx_1 = &var_14c;
00600eb8          float* eax_3 = &arg2->a;
00600ebb          void var_150;
00600ebb          float* ebx_1 = (&var_150 - arg2);
00600ebb          
00600f64          do
00600f64          {
00600ec2              int32_t edx_3 = (i << 2);
00600ec5              long double x87_r7_1 = ((long double)*(uint32_t*)(&s + edx_3));
00600ec9              *(uint32_t*)((char*)ecx_1 - 4) = ADJ(eax_3)->r;
00600ecc              long double x87_r7_2 = (x87_r7_1 + ((long double)ADJ(eax_3)->a));
00600ed1              *(uint32_t*)ecx_1 = ADJ(eax_3)->g;
00600ed6              int16_t var_8_1;
00600ed6              var_8_1 = ((float)x87_r7_2);
00600ed9              *(uint32_t*)((char*)ecx_1 + 4) = ADJ(eax_3)->b;
00600ef1              long double x87_r7_5 = ((long double)((int32_t)((long double)((float)(x87_r7_2 + ((long double)0.5f))))));
00600ef7              arg2 = (i & 3);
00600eff              *(uint32_t*)((char*)ebx_1 + eax_3) = ((float)x87_r7_5);
00600f02              long double x87_r7_6 = (((long double)var_8_1) - x87_r7_5);
00600f05              int32_t __saved_ebp;
00600f05              
00600f05              if (arg2 != 3)
00600f15                  *(uint32_t*)((&__saved_ebp + edx_3) - 0x48) = ((float)((((long double)0.4375f) * x87_r7_6) + ((long double)*(uint32_t*)((&__saved_ebp + edx_3) - 0x48))));
00600f15              
00600f1a              if (i < 0xc)
00600f1a              {
00600f20                  if (arg2 != 0)
00600f30                      *(uint32_t*)((&__saved_ebp + edx_3) - 0x40) = ((float)((((long double)0.1875f) * x87_r7_6) + ((long double)*(uint32_t*)((&__saved_ebp + edx_3) - 0x40))));
00600f30                  
00600f44                  *(uint32_t*)((&__saved_ebp + edx_3) - 0x3c) = ((float)((((long double)0.3125f) * x87_r7_6) + ((long double)*(uint32_t*)((&__saved_ebp + edx_3) - 0x3c))));
00600f44                  
00600f46                  if (arg2 != 3)
00600f54                      *(uint32_t*)((&__saved_ebp + edx_3) - 0x38) = ((float)((x87_r7_6 * ((long double)0.0625f)) + ((long double)*(uint32_t*)((&__saved_ebp + edx_3) - 0x38))));
00600f1a              }
00600f1a              
00600f5a              i = (&i->r + 1);
00600f5b              ecx_1 += 0x10;
00600f5e              eax_3 = &eax_3[4];
00600f64          } while (i < 0x10);
00600f64          
00600f6a          int16_t x87status_3;
00600f6a          x87control = __fldcw_memmem16(temp0_1);
00600f6f          eax_4 = &var_150;
00600e7d      }
00600e7d      
00600f83      sub_600216(eax_4, x87control, arg1, 1.40129846e-45f, arg3);
00600f8f      return 0;
00600e6e  }


00600f92  long __stdcall D3DXTex::D3DXEncodeDXT3(uint8_t* arg1, struct D3DXCOLOR const* arg2, int32_t arg3)

00600f92  {
00600f9b      uint8_t* ebx = arg1;
00600f9e      int32_t i = 0;
00600fa4      int32_t edi;
00600fa4      int32_t var_60 = edi;
00600fa5      *(uint32_t*)ebx = 0;
00600fa7      *(uint32_t*)(ebx + 4) = 0;
00600faa      void s;
00600faa      
00600faa      if (arg3 != 0)
00600fb4          __builtin_memset(&s, 0, 0x40);
00600fb4      
00600fb6      int16_t x87control;
00600fb6      int16_t x87status;
00600fb6      int16_t temp0;
00600fb6      temp0 = __fnstcw_memmem16(x87control);
00600fb6      arg1 = temp0;
00600fc4      int16_t x87control_1;
00600fc4      int16_t x87status_1;
00600fc4      x87control_1 = __fldcw_memmem16((arg1 | 0xc00));
00600fc7      int16_t eax_2 = arg1;
00600fd3      float* var_8_1 = &arg2->a;
00600fd3      
006010a0      do
006010a0      {
00600fdf          arg1 = ADJ(var_8_1)->a;
00600fdf          
00600fe2          if (arg3 != 0)
00600feb              arg1 = ((float)(((long double)arg1) + ((long double)*(uint32_t*)(&s + (i << 2)))));
00600feb          
00601003          int32_t var_10_1 = ((int32_t)((long double)((float)((((long double)arg1) * ((long double)15f)) + ((long double)0.5f)))));
0060100e          void* ecx_1 = &ebx[((i >> 3) << 2)];
00601021          *(uint32_t*)ecx_1 = ((*(uint32_t*)ecx_1 >> 4) | (var_10_1 << 0x1c));
00601021          
00601023          if (arg3 != 0)
00601023          {
0060102a              long double x87_r7_7 = ((long double)var_10_1);
0060102a              
0060102d              if (var_10_1 < 0)
0060102f                  x87_r7_7 = (x87_r7_7 + ((long double)4.2949673e+09f));
0060102f              
0060103d              int32_t esi_3 = (i & 3);
00601043              long double x87_r7_9 = (((long double)arg1) - (x87_r7_7 * ((long double)0.0666666701f)));
00601046              int32_t __saved_ebp;
00601046              
00601046              if (esi_3 != 3)
0060104e                  &__saved_ebp[(i - 0x13)] = ((float)((((long double)0.4375f) * x87_r7_9) + ((long double)&__saved_ebp[(i - 0x13)])));
0060104e              
0060105b              if (i < 0xc)
0060105b              {
0060105f                  if (esi_3 != 0)
00601067                      &__saved_ebp[(i - 0x11)] = ((float)((((long double)0.1875f) * x87_r7_9) + ((long double)&__saved_ebp[(i - 0x11)])));
00601067                  
0060107c                  &__saved_ebp[(i - 0x10)] = ((float)((((long double)0.3125f) * x87_r7_9) + ((long double)&__saved_ebp[(i - 0x10)])));
0060107c                  
00601084                  if (esi_3 != 3)
0060108c                      &__saved_ebp[(i - 0xf)] = ((float)((x87_r7_9 * ((long double)0.0625f)) + ((long double)&__saved_ebp[(i - 0xf)])));
0060105b              }
00601023          }
00601023          
00601098          var_8_1 = &var_8_1[4];
0060109c          i += 1;
006010a0      } while (i < 0x10);
006010a0      
006010a6      int16_t x87control_2;
006010a6      int16_t x87status_2;
006010a6      x87control_2 = __fldcw_memmem16(eax_2);
006010b5      sub_600216(arg2, x87control_2, &ebx[8], 0f, arg3);
006010be      return 0;
00600f92  }


006010c1  long __stdcall D3DXTex::D3DXEncodeDXT5(uint8_t* arg1, struct D3DXCOLOR const* arg2, int32_t arg3)

006010c1  {
006010cd      struct D3DXCOLOR* ebx = arg2;
006010d4      float a = ebx->a;
006010d6      int32_t i = 0;
006010db      int32_t edi;
006010db      int32_t var_b0 = edi;
006010df      float a_1 = a;
006010e2      float a_2 = a;
006010e5      void s;
006010e5      
006010e5      if (arg3 != 0)
006010f2          __builtin_memset(&s, 0, 0x40);
006010f2      
006010f4      int16_t x87control;
006010f4      int16_t x87status;
006010f4      int16_t temp0;
006010f4      temp0 = __fnstcw_memmem16(x87control);
006010f4      arg2 = temp0;
00601102      int16_t x87control_1;
00601102      int16_t x87status_1;
00601102      x87control_1 = __fldcw_memmem16((((int16_t)arg2) | 0xc00));
00601105      int16_t eax_2 = ((int16_t)arg2);
0060110b      float* edi_1 = &ebx->a;
006011e7      void var_64;
006011e7      int32_t var_10;
006011e7      int32_t __saved_ebp;
006011e7      
006011e7      do
006011e7      {
00601113          arg2 = ADJ(edi_1)->a;
00601113          
00601116          if (arg3 != 0)
00601122              arg2 = ((float)(((long double)arg2) + ((long double)*(uint32_t*)(&s + (i << 2)))));
00601122          
0060113a          var_10 = ((int32_t)((long double)((float)((((long double)arg2) * ((long double)255f)) + ((long double)0.5f)))));
00601148          int32_t ecx_2 = (i << 2);
0060114b          long double x87_r7_8 = (((long double)var_10) * ((long double)0.00392156886f));
00601151          long double temp1_1 = ((long double)a_1);
00601151          (x87_r7_8 - temp1_1);
00601154          *(uint32_t*)(&var_64 + ecx_2) = ((float)x87_r7_8);
00601154          bool c1_1 = /* bool c1_1 = unimplemented  {fst dword [ebp+ecx-0x60], st0} */;
00601158          int32_t eax_4;
00601158          eax_4 = ((((x87_r7_8 < temp1_1) ? 1 : 0) << 8) | ((((c1_1) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp1_1) ? 1 : 0) << 0xe) | 0x3800))));
0060115a          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0060115a          
0060115d          if (p_1)
0060115d          {
00601164              long double temp2_1 = ((long double)a_2);
00601164              (x87_r7_8 - temp2_1);
00601167              eax_4 = ((((x87_r7_8 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp2_1) ? 1 : 0) << 0xe) | 0x3800))));
00601167              
0060116c              if ((*(uint8_t*)((char*)eax_4)[1] & 0x41) == 0)
0060116e                  a_2 = ((float)x87_r7_8);
0060115d          }
0060115d          else
0060115f              a_1 = ((float)x87_r7_8);
0060115f          
00601175          if (arg3 != 0)
00601175          {
00601177              x87_r7_8 = (((long double)arg2) - x87_r7_8);
0060117c              int32_t edx_2 = (i & 3);
0060117c              
00601182              if (edx_2 != 3)
00601195                  *(uint32_t*)((&__saved_ebp + ecx_2) - 0x9c) = ((float)((((long double)0.4375f) * x87_r7_8) + ((long double)*(uint32_t*)((&__saved_ebp + ecx_2) - 0x9c))));
00601195              
0060119a              if (i < 0xc)
0060119a              {
0060119e                  if (edx_2 != 0)
006011b1                      *(uint32_t*)((&__saved_ebp + ecx_2) - 0x94) = ((float)((((long double)0.1875f) * x87_r7_8) + ((long double)*(uint32_t*)((&__saved_ebp + ecx_2) - 0x94))));
006011b1                  
006011c7                  *(uint32_t*)((&__saved_ebp + ecx_2) - 0x90) = ((float)((((long double)0.3125f) * x87_r7_8) + ((long double)*(uint32_t*)((&__saved_ebp + ecx_2) - 0x90))));
006011c7                  
006011c9                  if (edx_2 != 3)
006011da                      *(uint32_t*)((&__saved_ebp + ecx_2) - 0x8c) = ((float)((x87_r7_8 * ((long double)0.0625f)) + ((long double)*(uint32_t*)((&__saved_ebp + ecx_2) - 0x8c))));
0060119a              }
00601175          }
00601175          
006011e0          i += 1;
006011e1          edi_1 = &edi_1[4];
006011e7      } while (i < 0x10);
006011e7      
006011ed      int16_t x87control_2;
006011ed      int16_t x87status_2;
006011ed      x87control_2 = __fldcw_memmem16(eax_2);
006011f3      uint8_t* esi = arg1;
006011fe      int32_t eax_11;
006011fe      int16_t x87control_3;
006011fe      int80_t st0;
006011fe      st0 = sub_600216(ebx, x87control_2, &esi[8], 0f, arg3);
0060120b      long double x87_r7_11 = ((long double)a_1);
0060120e      long double x87_r6_10 = ((long double)1f);
00601214      (x87_r6_10 - x87_r7_11);
00601216      eax_11 = ((((x87_r6_10 < x87_r7_11) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_10, x87_r7_11))) ? 1 : 0) << 0xa) | ((((x87_r6_10 == x87_r7_11) ? 1 : 0) << 0xe) | 0))));
00601218      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x44} */;
00601218      
0060121b      if (p_2)
0060121b      {
00601229          long double x87_r7_12 = ((long double)a_1);
0060122c          long double x87_r6_11 = ((long double)0f);
00601232          (x87_r6_11 - x87_r7_12);
00601234          eax_11 = ((((x87_r6_11 < x87_r7_12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_11, x87_r7_12))) ? 1 : 0) << 0xa) | ((((x87_r6_11 == x87_r7_12) ? 1 : 0) << 0xe) | 0))));
00601236          bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x44} */;
00601239          bool p_4;
00601239          
00601239          if (p_3)
00601239          {
0060123b              long double x87_r7_13 = ((long double)a_2);
0060123e              long double x87_r6_12 = ((long double)1f);
00601244              (x87_r6_12 - x87_r7_13);
00601246              eax_11 = ((((x87_r6_12 < x87_r7_13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_12, x87_r7_13))) ? 1 : 0) << 0xa) | ((((x87_r6_12 == x87_r7_13) ? 1 : 0) << 0xe) | 0))));
00601248              p_4 = /* p_4 = unimplemented  {test ah, 0x44} */;
00601239          }
00601239          
0060124b          int32_t edi_2;
0060124b          
0060124b          if ((!(p_3) || !(p_4)))
0060124b          {
00601255              arg1 = 6;
0060125c              edi_2 = 6;
0060124b          }
0060124b          else
0060124b          {
0060124f              edi_2 = 8;
00601250              arg1 = 8;
0060124b          }
0060124b          
0060126c          int16_t x87control_4;
0060126c          int80_t st0_1;
0060126c          st0_1 = sub_5ff96f(x87control_3, &var_10, &arg2, &var_64, edi_2);
00601271          int16_t x87status_3;
00601271          int16_t temp0_1;
00601271          temp0_1 = __fnstcw_memmem16(x87control_4);
00601271          a_2 = temp0_1;
0060127f          int16_t x87control_5;
0060127f          int16_t x87status_4;
0060127f          x87control_5 = __fldcw_memmem16((a_2 | 0xc00));
0060129d          var_10 = ((int32_t)((long double)((float)((((long double)var_10) * ((long double)255f)) + ((long double)0.5f)))));
006012a3          uint8_t eax_15 = ((int8_t)var_10);
006012b2          arg2 = ((float)((((long double)arg2) * ((long double)255f)) + ((long double)0.5f)));
006012b8          uint8_t var_c_5 = ((int8_t)((int32_t)((long double)arg2)));
006012be          int16_t x87control_6;
006012be          int16_t x87status_5;
006012be          x87control_6 = __fldcw_memmem16(a_2);
006012c7          arg2 = ((uint32_t)eax_15);
006012cd          long double x87_r7_22 = ((long double)arg2);
006012d0          arg2 = ((uint32_t)var_c_5);
006012dc          long double x87_r6_14 = (((long double)arg2) * ((long double)0.00392156886f));
006012e2          arg2 = ((float)x87_r6_14);
006012e2          
006012e5          if (edi_2 == 8)
006012e5          {
006012e9              if (eax_15 != var_c_5)
006012e9                  goto label_601369;
006012e9              
006012ed              *(uint8_t*)esi = eax_15;
006012f1              esi[1] = var_c_5;
006012f1              goto label_6012f9;
006012e5          }
006012e5          
00601304          float var_44;
00601304          float var_40_1;
00601304          int32_t var_c_6;
00601304          struct D3DXCOLOR* i_1;
00601304          
00601304          if (edi_2 != 6)
00601304          {
00601369          label_601369:
00601369              esi[1] = eax_15;
0060136c              var_44 = ((float)x87_r6_14);
00601371              var_40_1 = ((float)(x87_r7_22 * ((long double)0.00392156886f)));
00601374              *(uint8_t*)esi = var_c_5;
00601374              
006013b2              for (i_1 = 1; i_1 < 7; )
006013b2              {
0060137e                  arg2 = (7 - i_1);
00601381                  long double x87_r7_32 = ((long double)arg2);
00601381                  
00601384                  if ((7 - i_1) < 0)
00601386                      x87_r7_32 = (x87_r7_32 + ((long double)4.2949673e+09f));
00601386                  
0060138e                  long double x87_r7_33 = (x87_r7_32 * ((long double)var_44));
00601391                  arg2 = i_1;
00601394                  long double x87_r6_17 = ((long double)arg2);
00601394                  
00601397                  if (i_1 < 0)
00601399                      x87_r6_17 = (x87_r6_17 + ((long double)4.2949673e+09f));
00601399                  
006013a2                  i_1 = (&i_1->r + 1);
006013ae                  &var_44[i_1] = ((float)((x87_r7_33 + (x87_r6_17 * ((long double)var_40_1))) * ((long double)0.142857149f)));
006013b2              }
006013b2              
006013b4              var_c_6 = 0x7f1b20;
00601304          }
00601304          else
00601304          {
00601306              *(uint8_t*)esi = eax_15;
0060130a              float eax_16 = arg2;
0060130d              var_44 = ((float)x87_r6_14);
00601310              var_40_1 = eax_16;
00601315              esi[1] = var_c_5;
00601315              
00601354              for (i_1 = 1; i_1 < 5; )
00601354              {
00601320                  arg2 = (5 - i_1);
00601323                  long double x87_r7_26 = ((long double)arg2);
00601323                  
00601326                  if ((5 - i_1) < 0)
00601328                      x87_r7_26 = (x87_r7_26 + ((long double)4.2949673e+09f));
00601328                  
00601330                  long double x87_r7_27 = (x87_r7_26 * ((long double)var_44));
00601333                  arg2 = i_1;
00601336                  long double x87_r6_15 = ((long double)arg2);
00601336                  
00601339                  if (i_1 < 0)
0060133b                      x87_r6_15 = (x87_r6_15 + ((long double)4.2949673e+09f));
0060133b                  
00601344                  i_1 = (&i_1->r + 1);
00601350                  &var_44[i_1] = ((float)((x87_r7_27 + (x87_r6_15 * ((long double)var_40_1))) * ((long double)0.200000003f)));
00601354              }
00601354              
00601358              var_c_6 = 0x7f1b40;
0060135f              float var_2c_1 = ((float)((long double)0));
00601364              float var_28_1 = ((float)((long double)1));
00601304          }
00601304          
006013be          arg2 = (edi_2 - 1);
006013c1          long double x87_r7_36 = ((long double)arg2);
006013c1          
006013c4          if ((edi_2 - 1) < 0)
006013c6              x87_r7_36 = (x87_r7_36 + ((long double)4.2949673e+09f));
006013c6          
006013cc          var_10 = ((float)x87_r7_36);
006013cf          long double x87_r7_37 = ((long double)var_40_1);
006013d2          long double x87_r6_19 = ((long double)var_44);
006013d5          (x87_r6_19 - x87_r7_37);
006013d7          i_1 = ((((x87_r6_19 < x87_r7_37) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_19, x87_r7_37))) ? 1 : 0) << 0xa) | ((((x87_r6_19 == x87_r7_37) ? 1 : 0) << 0xe) | 0))));
006013d9          bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x44} */;
006013dc          long double x87_r7_40;
006013dc          
006013dc          if (!(p_5))
006013e9              x87_r7_40 = ((long double)0);
006013dc          else
006013e4              x87_r7_40 = (((long double)var_10) / (((long double)var_40_1) - ((long double)var_44)));
006013e4          
006013ef          float var_20_1 = ((float)x87_r7_40);
006013ef          
006013f2          if (arg3 != 0)
006013ff              __builtin_memset(&s, 0, 0x40);
006013ff          
00601401          int16_t x87status_6;
00601401          int16_t temp0_2;
00601401          temp0_2 = __fnstcw_memmem16(x87control_6);
00601401          arg2 = temp0_2;
0060140f          int16_t x87control_7;
0060140f          int16_t x87status_7;
0060140f          x87control_7 = __fldcw_memmem16((((int16_t)arg2) | 0xc00));
00601412          int16_t eax_19 = ((int16_t)arg2);
0060141b          float* i_2 = nullptr;
0060141d          void* ecx_6 = &esi[3];
00601420          float* var_14 = &ebx->a;
00601420          
00601583          do
00601583          {
00601423              int32_t ebx_1 = 0;
00601425              void* i_4 = &i_2[2];
0060142a              int24_t var_8_1 = 0;
0060142d              float* i_3 = i_2;
0060142d              
0060142f              if (i_2 < i_4)
0060142f              {
00601438                  float* var_8_2 = var_14;
00601438                  
00601560                  do
00601560                  {
00601444                      arg2 = ADJ(var_8_2)->a;
00601444                      
00601447                      if (arg3 != 0)
00601453                          arg2 = ((float)(((long double)arg2) + ((long double)*(uint32_t*)(&s + (i_3 << 2)))));
00601453                      
0060145c                      long double x87_r7_45 = ((((long double)arg2) - ((long double)var_44)) * ((long double)var_20_1));
0060145f                      long double temp3_1 = ((long double)0f);
0060145f                      (x87_r7_45 - temp3_1);
00601465                      float eax_22;
00601465                      eax_22 = ((((x87_r7_45 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_45, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_45 == temp3_1) ? 1 : 0) << 0xe) | 0x3800))));
00601467                      bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x41} */;
00601467                      
0060146a                      if (p_6)
0060146a                      {
0060148f                          long double temp4_1 = ((long double)var_10);
0060148f                          (x87_r7_45 - temp4_1);
00601492                          eax_22 = ((((x87_r7_45 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_45, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_45 == temp4_1) ? 1 : 0) << 0xe) | 0x3800))));
00601492                          
00601497                          if ((*(uint8_t*)((char*)eax_22)[1] & 1) != 0)
006014d9                              i_2 = *(uint32_t*)(var_c_6 + (((int32_t)((long double)((float)(x87_r7_45 + ((long double)0.5f))))) << 2));
00601497                          else if (arg1 != 6)
006014c1                              i_2 = 1;
0060149f                          else
0060149f                          {
006014aa                              long double x87_r7_50 = ((((long double)var_40_1) + ((long double)1f)) * ((long double)0.5f));
006014b0                              long double temp6_1 = ((long double)arg2);
006014b0                              (x87_r7_50 - temp6_1);
006014b3                              eax_22 = ((((x87_r7_50 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_50, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_50 == temp6_1) ? 1 : 0) << 0xe) | 0))));
006014b5                              bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x41} */;
006014b5                              
006014b8                              if (p_7)
006014c1                                  i_2 = 1;
006014b8                              else
006014bc                                  i_2 = 7;
0060149f                          }
0060146a                      }
0060146a                      else
0060146a                      {
00601472                          if (arg1 == 6)
00601472                          {
00601477                              long double x87_r7_47 = (((long double)var_44) * ((long double)0.5f));
0060147d                              long double temp5_1 = ((long double)arg2);
0060147d                              (x87_r7_47 - temp5_1);
00601480                              eax_22 = ((((x87_r7_47 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_47, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_47 == temp5_1) ? 1 : 0) << 0xe) | 0))));
00601472                          }
00601472                          
00601485                          if ((arg1 != 6 || (*(uint8_t*)((char*)eax_22)[1] & 1) != 0))
0060148b                              i_2 = nullptr;
00601485                          else
006014bc                              i_2 = 6;
0060146a                      }
0060146a                      
006014e4                      ebx_1 = ((ebx_1 >> 3) | (i_2 << 0x15));
006014e4                      
006014ea                      if (arg3 != 0)
006014ea                      {
006014f1                          long double x87_r7_54 = (((long double)arg2) - ((long double)&var_44[i_2]));
006014f5                          void* edx_10 = (i_3 & 3);
006014f5                          
006014fb                          if (edx_10 != 3)
00601503                              &__saved_ebp[((char*)i_3 - 0x27)] = ((float)((((long double)0.4375f) * x87_r7_54) + ((long double)&__saved_ebp[((char*)i_3 - 0x27)])));
00601503                          
00601513                          if (i_3 < 0xc)
00601513                          {
00601517                              if (edx_10 != 0)
0060151f                                  &__saved_ebp[((char*)i_3 - 0x25)] = ((float)((((long double)0.1875f) * x87_r7_54) + ((long double)&__saved_ebp[((char*)i_3 - 0x25)])));
0060151f                              
00601537                              &__saved_ebp[&i_3[-9]] = ((float)((((long double)0.3125f) * x87_r7_54) + ((long double)&__saved_ebp[&i_3[-9]])));
00601537                              
00601542                              if (edx_10 != 3)
0060154a                                  &__saved_ebp[((char*)i_3 - 0x23)] = ((float)((x87_r7_54 * ((long double)0.0625f)) + ((long double)&__saved_ebp[((char*)i_3 - 0x23)])));
00601513                          }
006014ea                      }
006014ea                      
00601559                      var_8_2 = &var_8_2[4];
0060155d                      i_3 += 1;
00601560                  } while (i_3 < i_4);
00601560                  
00601566                  var_8_1 = ebx_1;
0060142f              }
0060142f              
00601569              i_2 = *(uint8_t*)((char*)var_8_1)[2];
0060156c              var_14 = &var_14[0x20];
00601573              *(uint8_t*)((char*)ecx_6 + 1) = i_2;
00601576              *(uint8_t*)((char*)ecx_6 - 1) = ebx_1;
00601579              *(uint8_t*)ecx_6 = *(uint8_t*)((char*)ebx_1)[1];
0060157b              i_2 = i_4;
0060157d              ecx_6 += 3;
00601583          } while (i_2 < 0x10);
00601583          
00601589          int16_t x87control_8;
00601589          int16_t x87status_8;
00601589          x87control_8 = __fldcw_memmem16(eax_19);
0060121b      }
0060121b      else
0060121b      {
0060121d          *(uint8_t*)esi = 0xff;
00601220          esi[1] = 0xff;
006012f9      label_6012f9:
006012f9          *(uint32_t*)(esi + 2) = 0;
006012fa          *(uint16_t*)(esi + 6) = 0;
0060121b      }
0060121b      
00601592      return 0;
006010c1  }


00601595  long __stdcall D3DXTex::D3DXDecodeDXT2(struct D3DXCOLOR* arg1, uint8_t const* arg2)

00601595  {
006015a0      D3DXTex::D3DXDecodeDXT3(arg1, arg2);
006015ac      sub_5ff7b8(arg1);
006015b8      return 0;
00601595  }


006015bb  long __stdcall D3DXTex::D3DXDecodeDXT4(struct D3DXCOLOR* arg1, uint8_t const* arg2)

006015bb  {
006015c6      D3DXTex::D3DXDecodeDXT5(arg1, arg2);
006015d2      sub_5ff7b8(arg1);
006015de      return 0;
006015bb  }


006015e1  long __stdcall D3DXTex::D3DXEncodeDXT2(uint8_t* arg1, struct D3DXCOLOR const* arg2, int32_t arg3)

006015e1  {
006015f5      void var_104;
006015f5      int32_t edx;
006015f5      sub_5ff83c(arg2, edx, &var_104);
0060160b      D3DXTex::D3DXEncodeDXT3(arg1, &var_104, arg3);
00601617      return 0;
006015e1  }


0060161a  long __stdcall D3DXTex::D3DXEncodeDXT4(uint8_t* arg1, struct D3DXCOLOR const* arg2, int32_t arg3)

0060161a  {
0060162e      void var_104;
0060162e      int32_t edx;
0060162e      sub_5ff83c(arg2, edx, &var_104);
00601644      D3DXTex::D3DXEncodeDXT5(arg1, &var_104, arg3);
00601650      return 0;
0060161a  }


00601653  void sse_D3DXInitFastTable(struct D3DXFASTTABLE* arg1)

00601653  {
00601660      *(uint32_t*)((char*)arg1 + 8) = sse2_D3DXVec4Transform;
00601663      *(uint32_t*)((char*)arg1 + 0x8c) = sse2_D3DXVec4Transform;
0060166e      *(uint32_t*)arg1 = sse_D3DXVec2Transform;
00601674      *(uint32_t*)((char*)arg1 + 4) = sse_D3DXVec3Transform;
0060167b      *(uint32_t*)((char*)arg1 + 0xc) = sse_D3DXMatrixMultiply;
00601682      *(uint32_t*)((char*)arg1 + 0x10) = sse2_D3DXMatrixMultiplyTranspose;
00601689      *(uint32_t*)((char*)arg1 + 0x14) = sse_D3DXVec2TransformNormal;
00601690      *(uint32_t*)((char*)arg1 + 0x18) = sse_D3DXVec3TransformNormal;
00601697      *(uint32_t*)((char*)arg1 + 0x24) = sse_D3DXVec2TransformCoord;
0060169e      *(uint32_t*)((char*)arg1 + 0x28) = sse2_D3DXVec3TransformCoord;
006016a5      *(uint32_t*)((char*)arg1 + 0x1c) = sse_D3DXVec3Normalize;
006016ac      *(uint32_t*)((char*)arg1 + 0x20) = sse_D3DXVec4Normalize;
006016b3      *(uint32_t*)((char*)arg1 + 0x58) = sse_D3DXPlaneNormalize;
006016ba      *(uint32_t*)((char*)arg1 + 0x44) = sse_D3DXVec4Cross;
006016c1      *(uint32_t*)((char*)arg1 + 0x54) = sse_D3DXQuaternionNormalize;
006016c8      *(uint32_t*)((char*)arg1 + 0x50) = sse_D3DXQuaternionMultiply;
006016cf      *(uint32_t*)((char*)arg1 + 0x64) = sse_D3DXQuaternionRotationMatrix;
006016d6      *(uint32_t*)((char*)arg1 + 0x68) = sse_D3DXQuaternionRotationYawPitchRoll;
006016dd      *(uint32_t*)((char*)arg1 + 0x5c) = sse_D3DXPlaneIntersectLine;
006016e4      *(uint32_t*)((char*)arg1 + 0x4c) = sse_D3DXMatrixInverse;
006016eb      *(uint32_t*)((char*)arg1 + 0xc8) = sse_D3DXVec3Hermite;
006016f5      *(uint32_t*)((char*)arg1 + 0xcc) = sse_D3DXVec3CatmullRom;
006016ff      *(uint32_t*)((char*)arg1 + 0xd0) = sse_D3DXVec3BaryCentric;
00601709      *(uint32_t*)((char*)arg1 + 0xd4) = sse_D3DXVec4Hermite;
00601713      *(uint32_t*)((char*)arg1 + 0xd8) = sse_D3DXVec4CatmullRom;
0060171d      *(uint32_t*)((char*)arg1 + 0xdc) = sse_D3DXVec4BaryCentric;
00601727      *(uint32_t*)((char*)arg1 + 0x48) = sse_D3DXVec2Hermite;
0060172e      *(uint32_t*)((char*)arg1 + 0xc0) = sse_D3DXVec2CatmullRom;
00601738      *(uint32_t*)((char*)arg1 + 0xc4) = sse_D3DXVec2BaryCentric;
00601742      *(uint32_t*)((char*)arg1 + 0x2c) = sse_D3DXMatrixDeterminant;
00601749      *(uint32_t*)((char*)arg1 + 0x70) = sse_D3DXMatrixShadow;
00601750      *(uint32_t*)((char*)arg1 + 0x38) = sse_D3DXPlaneFromPoints;
00601757      *(uint32_t*)((char*)arg1 + 0x74) = sse_D3DXMatrixReflect;
0060175e      *(uint32_t*)((char*)arg1 + 0xec) = sse_D3DXFloat16To32Array;
00601768      *(uint32_t*)((char*)arg1 + 0xf0) = sse_D3DXVec2TransformArray;
00601772      *(uint32_t*)((char*)arg1 + 0xf4) = sse_D3DXVec2TransformCoordArray;
0060177c      *(uint32_t*)((char*)arg1 + 0xf8) = sse_D3DXVec2TransformNormalArray;
00601786      *(uint32_t*)((char*)arg1 + 0xfc) = sse_D3DXVec3TransformArray;
00601790      *(uint32_t*)((char*)arg1 + 0x100) = sse_D3DXVec3TransformCoordArray;
0060179a      *(uint32_t*)((char*)arg1 + 0x104) = sse_D3DXVec3TransformNormalArray;
006017a4      *(uint32_t*)((char*)arg1 + 0x108) = sse_D3DXVec4TransformArray;
006017aa      *(uint32_t*)((char*)arg1 + 0x114) = sse_D3DXVec4TransformArray;
006017b0      *(uint32_t*)((char*)arg1 + 0x11c) = sse_D3DXPSGPTessellateNPatch;
006017ba      *(uint32_t*)((char*)arg1 + 0xb4) = sse_D3DXQuaternionInverse;
00601653  }


006017c6  void sse2_D3DXInitFastTable(struct D3DXFASTTABLE* arg1)

006017c6  {
006017d3      *(uint32_t*)((char*)arg1 + 8) = sse2_D3DXVec4Transform;
006017d6      *(uint32_t*)((char*)arg1 + 0x8c) = sse2_D3DXVec4Transform;
006017e1      *(uint32_t*)arg1 = sse_D3DXVec2Transform;
006017e7      *(uint32_t*)((char*)arg1 + 4) = sse_D3DXVec3Transform;
006017ee      *(uint32_t*)((char*)arg1 + 0xc) = sse_D3DXMatrixMultiply;
006017f5      *(uint32_t*)((char*)arg1 + 0x10) = sse2_D3DXMatrixMultiplyTranspose;
006017fc      *(uint32_t*)((char*)arg1 + 0x14) = sse_D3DXVec2TransformNormal;
00601803      *(uint32_t*)((char*)arg1 + 0x18) = sse_D3DXVec3TransformNormal;
0060180a      *(uint32_t*)((char*)arg1 + 0x24) = sse_D3DXVec2TransformCoord;
00601811      *(uint32_t*)((char*)arg1 + 0x28) = sse2_D3DXVec3TransformCoord;
00601818      *(uint32_t*)((char*)arg1 + 0x1c) = sse2_D3DXVec3Normalize;
0060181f      *(uint32_t*)((char*)arg1 + 0x20) = sse_D3DXVec4Normalize;
00601826      *(uint32_t*)((char*)arg1 + 0x58) = sse2_D3DXPlaneNormalize;
0060182d      *(uint32_t*)((char*)arg1 + 0x44) = sse2_D3DXVec4Cross;
00601834      *(uint32_t*)((char*)arg1 + 0x54) = sse_D3DXQuaternionNormalize;
0060183b      *(uint32_t*)((char*)arg1 + 0x50) = sse_D3DXQuaternionMultiply;
00601842      *(uint32_t*)((char*)arg1 + 0x64) = sse2_D3DXQuaternionRotationMatrix;
00601849      *(uint32_t*)((char*)arg1 + 0x68) = sse2_D3DXQuaternionRotationYawPitchRoll;
00601850      *(uint32_t*)((char*)arg1 + 0x5c) = sse_D3DXPlaneIntersectLine;
00601857      *(uint32_t*)((char*)arg1 + 0x4c) = sse_D3DXMatrixInverse;
0060185e      *(uint32_t*)((char*)arg1 + 0xc8) = sse_D3DXVec3Hermite;
00601868      *(uint32_t*)((char*)arg1 + 0xcc) = sse_D3DXVec3CatmullRom;
00601872      *(uint32_t*)((char*)arg1 + 0xd0) = sse_D3DXVec3BaryCentric;
0060187c      *(uint32_t*)((char*)arg1 + 0xd4) = sse_D3DXVec4Hermite;
00601886      *(uint32_t*)((char*)arg1 + 0xd8) = sse_D3DXVec4CatmullRom;
00601890      *(uint32_t*)((char*)arg1 + 0xdc) = sse_D3DXVec4BaryCentric;
0060189a      *(uint32_t*)((char*)arg1 + 0x48) = sse_D3DXVec2Hermite;
006018a1      *(uint32_t*)((char*)arg1 + 0xc0) = sse_D3DXVec2CatmullRom;
006018ab      *(uint32_t*)((char*)arg1 + 0xc4) = sse_D3DXVec2BaryCentric;
006018b5      *(uint32_t*)((char*)arg1 + 0x2c) = sse_D3DXMatrixDeterminant;
006018bc      *(uint32_t*)((char*)arg1 + 0x70) = sse2_D3DXMatrixShadow;
006018c3      *(uint32_t*)((char*)arg1 + 0x38) = sse2_D3DXPlaneFromPoints;
006018ca      *(uint32_t*)((char*)arg1 + 0x74) = sse2_D3DXMatrixReflect;
006018d1      *(uint32_t*)((char*)arg1 + 0xec) = sse2_D3DXFloat16To32Array;
006018db      *(uint32_t*)((char*)arg1 + 0xf0) = sse2_D3DXVec2TransformArray;
006018e5      *(uint32_t*)((char*)arg1 + 0xf4) = sse2_D3DXVec2TransformCoordArray;
006018ef      *(uint32_t*)((char*)arg1 + 0xf8) = sse2_D3DXVec2TransformNormalArray;
006018f9      *(uint32_t*)((char*)arg1 + 0xfc) = sse2_D3DXVec3TransformArray;
00601903      *(uint32_t*)((char*)arg1 + 0x100) = sse2_D3DXVec3TransformCoordArray;
0060190d      *(uint32_t*)((char*)arg1 + 0x104) = sse2_D3DXVec3TransformNormalArray;
00601917      *(uint32_t*)((char*)arg1 + 0x108) = sse2_D3DXVec4TransformArray;
0060191d      *(uint32_t*)((char*)arg1 + 0x114) = sse2_D3DXVec4TransformArray;
00601923      *(uint32_t*)((char*)arg1 + 0x11c) = sse_D3DXPSGPTessellateNPatch;
006017c6  }


0060192f  uint32_t __stdcall get_feature_flags()

0060192f  {
00601939      int32_t edi;
00601939      int32_t var_3c = edi;
00601942      int32_t var_18;
00601942      __builtin_strncpy(&var_18, "Unkn", 4);
00601942      int32_t var_14;
00601942      int32_t* edi_1 = &var_14;
00601942      char const* const esi = "ownVendr";
00601943      *(uint32_t*)edi_1 = *(uint32_t*)esi;
00601943      void* edi_2 = &edi_1[1];
00601943      void* esi_1 = &esi[4];
00601944      uint32_t __security_cookie_1 = __security_cookie;
00601949      *(uint32_t*)edi_2 = *(uint32_t*)esi_1;
0060194a      *(uint8_t*)((char*)edi_2 + 4) = *(uint8_t*)((char*)esi_1 + 4);
00601953      int32_t var_28;
00601953      __builtin_strncpy(&var_28, "Auth", 4);
00601953      void var_24;
00601953      void* edi_5 = &var_24;
00601953      char const* const esi_4 = "enticAMD";
00601954      *(uint32_t*)edi_5 = *(uint32_t*)esi_4;
00601954      void* edi_6 = ((char*)edi_5 + 4);
00601954      void* esi_5 = &esi_4[4];
00601955      *(uint32_t*)edi_6 = *(uint32_t*)esi_5;
00601959      *(uint8_t*)((char*)edi_6 + 4) = *(uint8_t*)((char*)esi_5 + 4);
00601962      int32_t eax;
00601962      int32_t ecx;
00601962      int32_t edx_1;
00601962      int32_t ebx_1;
00601962      eax = __cpuid(0, 0);
00601964      int32_t result_1 = 1;
0060196d      int32_t eax_1;
0060196d      int32_t ecx_1;
0060196d      int32_t edx_2;
0060196d      int32_t ebx_2;
0060196d      eax_1 = __cpuid(0, ecx);
0060196f      var_18 = ebx_2;
00601972      var_14 = edx_2;
00601975      int32_t var_10 = ecx_1;
00601975      
0060197a      if (eax_1 != 0)
0060197a      {
00601980          result_1 |= 2;
00601989          int32_t eax_2;
00601989          int32_t ecx_2;
00601989          int32_t edx_3;
00601989          int32_t ebx_3;
00601989          eax_2 = __cpuid(1, ecx_1);
0060198b          int32_t var_30_1 = eax_2;
00601993          void* ecx_3 = ("activation type (%s) with '%s' b…" & edx_3);
00601995          int32_t ecx_4 = -(ecx_3);
0060199c          result_1 |= ((ecx_4 - ecx_4) & 0x20);
006019a4          int32_t ecx_7 = (0x2000000 & edx_3);
006019a6          int32_t ecx_8 = -(ecx_7);
006019aa          int32_t ecx_10 = ((ecx_8 - ecx_8) & 0x40);
006019ad          result_1 |= ecx_10;
006019b5          int32_t eax_3;
006019b5          int32_t ecx_11;
006019b5          int32_t edx_4;
006019b5          int32_t ebx_4;
006019b5          eax_3 = __cpuid(0x80000000, ecx_10);
006019b5          
006019bc          if (eax_3 > 0x80000000)
006019bc          {
006019be              result_1 |= 4;
006019c7              int32_t eax_4;
006019c7              int32_t ecx_12;
006019c7              int32_t edx_5;
006019c7              int32_t ebx_5;
006019c7              eax_4 = __cpuid(0x80000001, ecx_11);
006019ce              int32_t ecx_13 = (0x80000000 & edx_5);
006019d0              int32_t ecx_14 = -(ecx_13);
006019da              result_1 |= ((ecx_14 - ecx_14) & 0x80);
006019dd              int32_t* esi_8 = &var_28;
006019e0              int32_t* edi_9 = &var_18;
006019e3              int32_t i = 0xc;
006019e3              
006019e9              while (i != 0)
006019e9              {
006019e9                  bool cond:0_1 = *(uint8_t*)esi_8 == *(uint8_t*)edi_9;
006019e9                  esi_8 += 1;
006019e9                  edi_9 += 1;
006019e9                  i -= 1;
006019e9                  
006019e9                  if (!(cond:0_1))
006019e9                      break;
006019e9              }
006019e9              
006019f0              int32_t ecx_17 = (0x40000000 & edx_5);
006019f2              int32_t ecx_18 = -(ecx_17);
006019fc              result_1 |= ((ecx_18 - ecx_18) & 0x100);
00601a04              int32_t ecx_21 = (0x400000 & edx_5);
00601a06              int32_t ecx_22 = -(ecx_21);
00601a10              result_1 |= ((ecx_22 - ecx_22) & 0x200);
006019bc          }
0060197a      }
0060197a      
00601a18      int32_t result = result_1;
00601a1e      __security_check_cookie(__security_cookie_1);
00601a24      return result;
0060192f  }


00601a25  void x3d_D3DXInitFastTable(struct D3DXFASTTABLE* arg1)

00601a25  {
00601a2a      int16_t eax = get_feature_flags();
00601a2a      
00601a3c      if (((eax & 0x20) != 0 && eax < 0))
00601a3c      {
00601a45          *(uint32_t*)arg1 = _x3d_D3DXVec2Transform@12;
00601a4b          *(uint32_t*)((char*)arg1 + 4) = _x3d_D3DXVec3Transform@12;
00601a52          *(uint32_t*)((char*)arg1 + 8) = _x3d_D3DXVec4Transform@12;
00601a59          *(uint32_t*)((char*)arg1 + 0xc) = x3d_D3DXMatrixMultiply;
00601a60          *(uint32_t*)((char*)arg1 + 0x14) = _x3d_D3DXVec2TransformNormal@12;
00601a67          *(uint32_t*)((char*)arg1 + 0x18) = _x3d_D3DXVec3TransformNormal@12;
00601a6e          *(uint32_t*)((char*)arg1 + 0x1c) = x3d_D3DXVec3Normalize;
00601a75          *(uint32_t*)((char*)arg1 + 0x20) = x3d_D3DXVec4Normalize;
00601a7c          *(uint32_t*)((char*)arg1 + 0x24) = _x3d_D3DXVec2TransformCoord@12;
00601a83          *(uint32_t*)((char*)arg1 + 0x28) = _x3d_D3DXVec3TransformCoord@12;
00601a8a          *(uint32_t*)((char*)arg1 + 0x2c) = x3d_D3DXMatrixfDeterminant;
00601a91          *(uint32_t*)((char*)arg1 + 0x34) = x3d_D3DXPlaneFromPointNormal;
00601a98          *(uint32_t*)((char*)arg1 + 0x38) = x3d_D3DXPlaneFromPoints;
00601a9f          *(uint32_t*)((char*)arg1 + 0x3c) = x3d_D3DXVec3Project;
00601aa6          *(uint32_t*)((char*)arg1 + 0x40) = x3d_D3DXVec3Unproject;
00601aad          *(uint32_t*)((char*)arg1 + 0x44) = x3d_D3DXVec4Cross;
00601ab4          *(uint32_t*)((char*)arg1 + 0x48) = x3d_D3DXVec2Hermite;
00601abb          *(uint32_t*)((char*)arg1 + 0x4c) = x3d_D3DXMatrixInverse;
00601ac2          *(uint32_t*)((char*)arg1 + 0x50) = x3d_D3DXQuaternionMultiply;
00601ac9          *(uint32_t*)((char*)arg1 + 0x54) = x3d_D3DXQuaternionNormalize;
00601ad0          *(uint32_t*)((char*)arg1 + 0x58) = x3d_D3DXPlaneNormalize;
00601ad7          *(uint32_t*)((char*)arg1 + 0x5c) = x3d_D3DXPlaneIntersectLine;
00601ade          *(uint32_t*)((char*)arg1 + 0x60) = x3d_D3DXQuaternionToAxisAngle;
00601ae5          *(uint32_t*)((char*)arg1 + 0x64) = x3d_D3DXQuaternionRotationMatrix;
00601aec          *(uint32_t*)((char*)arg1 + 0x68) = x3d_D3DXQuaternionRotationYawPitchRoll;
00601af3          *(uint32_t*)((char*)arg1 + 0x6c) = x3d_D3DXMatrixTranslation;
00601afa          *(uint32_t*)((char*)arg1 + 0x70) = x3d_D3DXMatrixShadow;
00601b01          *(uint32_t*)((char*)arg1 + 0x74) = x3d_D3DXMatrixReflect;
00601b08          *(uint32_t*)((char*)arg1 + 0x78) = x3d_D3DXQuaternionRotationAxis;
00601b0f          *(uint32_t*)((char*)arg1 + 0x7c) = x3d_D3DXMatrixRotationX;
00601b16          *(uint32_t*)((char*)arg1 + 0x80) = x3d_D3DXMatrixRotationY;
00601b20          *(uint32_t*)((char*)arg1 + 0x84) = x3d_D3DXMatrixRotationZ;
00601b2a          *(uint32_t*)((char*)arg1 + 0x88) = x3d_D3DXMatrixScaling;
00601b34          *(uint32_t*)((char*)arg1 + 0x8c) = _x3d_D3DXPlaneTransform@12;
00601b3e          *(uint32_t*)((char*)arg1 + 0x90) = x3d_D3DXQuaternionSlerp;
00601b48          *(uint32_t*)((char*)arg1 + 0x94) = x3d_D3DXQuaternionBaryCentric;
00601b52          *(uint32_t*)((char*)arg1 + 0x98) = x3d_D3DXMatrixTranspose;
00601b5c          *(uint32_t*)((char*)arg1 + 0x9c) = x3d_D3DXMatrixRotationQuaternion;
00601b66          *(uint32_t*)((char*)arg1 + 0xa0) = x3d_D3DXMatrixTransformation;
00601b70          *(uint32_t*)((char*)arg1 + 0xa4) = x3d_D3DXMatrixRotationYawPitchRoll;
00601b7a          *(uint32_t*)((char*)arg1 + 0xa8) = x3d_D3DXMatrixAffineTransformation;
00601b84          *(uint32_t*)((char*)arg1 + 0xac) = x3d_D3DXMatrixRotationAxis;
00601b8e          *(uint32_t*)((char*)arg1 + 0xb0) = x3d_D3DXQuaternionSquad;
00601b98          *(uint32_t*)((char*)arg1 + 0xb4) = x3d_D3DXQuaternionInverse;
00601ba2          *(uint32_t*)((char*)arg1 + 0xdc) = x3d_D3DXVec4BaryCentric;
00601bac          *(uint32_t*)((char*)arg1 + 0xd0) = x3d_D3DXVec3BaryCentric;
00601bb6          *(uint32_t*)((char*)arg1 + 0xc4) = x3d_D3DXVec2BaryCentric;
00601bc0          *(uint32_t*)((char*)arg1 + 0xbc) = x3d_D3DXVec2Normalize;
00601bca          *(uint32_t*)((char*)arg1 + 0xd4) = x3d_D3DXVec4Hermite;
00601bd4          *(uint32_t*)((char*)arg1 + 0xc8) = x3d_D3DXVec3Hermite;
00601bde          *(uint32_t*)((char*)arg1 + 0xe0) = x3d_D3DXQuaternionLn;
00601be8          *(uint32_t*)((char*)arg1 + 0xe4) = x3d_D3DXQuaternionExp;
00601bf2          *(uint32_t*)((char*)arg1 + 0xd8) = x3d_D3DXVec4CatmullRom;
00601bfc          *(uint32_t*)((char*)arg1 + 0xc0) = x3d_D3DXVec2CatmullRom;
00601c06          *(uint32_t*)((char*)arg1 + 0xcc) = x3d_D3DXVec3CatmullRom;
00601c10          *(uint32_t*)((char*)arg1 + 0x10) = x3d_D3DXMatrixMultiplyTranspose;
00601c17          *(uint32_t*)((char*)arg1 + 0xb8) = x3d_D3DXQuaternionSquadSetup;
00601c21          *(uint32_t*)((char*)arg1 + 0xec) = AMDX3D_D3DXFloat16To32Array;
00601c2b          *(uint32_t*)((char*)arg1 + 0xe8) = AMDX3D_D3DXFloat32To16Array;
00601c2b          
00601c3a          if (((*(uint8_t*)((char*)eax)[1] & 1) != 0 && (*(uint8_t*)((char*)eax)[1] & 2) != 0))
00601c3a          {
00601c3c              *(uint32_t*)((char*)arg1 + 0x40) = x3d_D3DXVec3Unproject_K7;
00601c43              *(uint32_t*)((char*)arg1 + 0x4c) = x3d_D3DXMatrixInverse_K7;
00601c4a              *(uint32_t*)((char*)arg1 + 0x9c) = x3d_D3DXMatrixRotationQuaternion_K7;
00601c54              *(uint32_t*)((char*)arg1 + 0xa0) = x3d_D3DXMatrixTransformation_K7;
00601c5e              *(uint32_t*)((char*)arg1 + 0x64) = x3d_D3DXQuaternionRotationMatrix_K7;
00601c3a          }
00601a3c      }
00601a3c      
00601c67      if ((eax & 0x40) != 0)
00601c67      {
00601c69          *(uint32_t*)((char*)arg1 + 0xfc) = AMDSSE_D3DXVec3TransformArray;
00601c73          *(uint32_t*)((char*)arg1 + 0x100) = AMDSSE_D3DXVec3TransformCoordArray;
00601c7d          *(uint32_t*)((char*)arg1 + 0x104) = AMDSSE_D3DXVec3TransformNormalArray;
00601c87          *(uint32_t*)((char*)arg1 + 0xf0) = AMDSSE_D3DXVec2TransformArray;
00601c91          *(uint32_t*)((char*)arg1 + 0xf4) = AMDSSE_D3DXVec2TransformCoordArray;
00601c9b          *(uint32_t*)((char*)arg1 + 0xf8) = AMDSSE_D3DXVec2TransformNormalArray;
00601ca5          *(uint32_t*)((char*)arg1 + 0x108) = AMDSSE_D3DXVec4TransformArray;
00601caf          *(uint32_t*)((char*)arg1 + 0x114) = AMDSSE_D3DXPlaneTransformArray;
00601c67      }
00601a25  }


00601cbb  void __convention("regparm") flush_pending(struct z_stream_s* arg1)

00601cbb  {
00601cbb      void* eax;
00601cbb      int32_t ecx_7 = *(uint32_t*)((char*)eax + 0x10);
00601cbf      void* esi = *(uint32_t*)((char*)eax + 0x1c);
00601cc2      int32_t edx = *(uint32_t*)((char*)esi + 0x14);
00601cc2      
00601cc7      if (edx > ecx_7)
00601cc9          edx = ecx_7;
00601cc9      
00601ccd      if (edx != 0)
00601ccd      {
00601cde          int32_t esi_2;
00601cde          int32_t edi_2;
00601cde          edi_2 = __builtin_memcpy(*(uint32_t*)((char*)eax + 0xc), *(uint32_t*)((char*)esi + 0x10), ((edx >> 2) << 2));
00601ce5          __builtin_memcpy(edi_2, esi_2, (edx & 3));
00601ce7          void* ecx_4 = *(uint32_t*)((char*)eax + 0x1c);
00601cea          *(uint32_t*)((char*)eax + 0xc) += edx;
00601ced          *(uint32_t*)((char*)ecx_4 + 0x10) += edx;
00601cf0          *(uint32_t*)((char*)eax + 0x14) += edx;
00601cf3          *(uint32_t*)((char*)eax + 0x10) -= edx;
00601cf6          void* ecx_5 = *(uint32_t*)((char*)eax + 0x1c);
00601cf9          *(uint32_t*)((char*)ecx_5 + 0x14) -= edx;
00601cfc          void* eax_1 = *(uint32_t*)((char*)eax + 0x1c);
00601cfc          
00601d05          if (*(uint32_t*)((char*)eax_1 + 0x14) == 0)
00601d0a              *(uint32_t*)((char*)eax_1 + 0x10) = *(uint32_t*)((char*)eax_1 + 8);
00601ccd      }
00601cbb  }


00601d0f  uint32_t __thiscall longest_match(struct internal_state* arg1, uint32_t arg2)

00601d0f  {
00601d1d      void* ecx;
00601d1d      uint32_t i_1 = *(uint32_t*)((char*)ecx + 0x74);
00601d28      int32_t esi = *(uint32_t*)((char*)ecx + 0x64);
00601d2b      char* var_10 = *(uint32_t*)((char*)ecx + 0x88);
00601d2e      int32_t eax_2 = *(uint32_t*)((char*)ecx + 0x24);
00601d37      char* edx_1 = (*(uint32_t*)((char*)ecx + 0x30) + esi);
00601d3b      int32_t edi;
00601d3b      int32_t var_28 = edi;
00601d3c      char* edi_1 = *(uint32_t*)((char*)ecx + 0x70);
00601d3f      int32_t var_14;
00601d3f      
00601d3f      if (esi <= (eax_2 - 0x106))
00601d4e          var_14 = 0;
00601d3f      else
00601d49          var_14 = ((esi - eax_2) + 0x106);
00601d49      
00601d5e      void* var_18 = &edx_1[0x102];
00601d61      void* eax_3;
00601d61      eax_3 = *(uint8_t*)((edi_1 + edx_1) - 1);
00601d65      char var_5 = eax_3;
00601d68      eax_3 = *(uint8_t*)(edi_1 + edx_1);
00601d6b      char var_6 = eax_3;
00601d6b      
00601d6e      if (edi_1 >= *(uint32_t*)((char*)ecx + 0x84))
00601d70          i_1 u>>= 2;
00601d70      
00601d74      char* eax_4 = *(uint32_t*)((char*)ecx + 0x6c);
00601d74      
00601d7d      if (var_10 > eax_4)
00601d7f          var_10 = eax_4;
00601d7f      
00601d82      struct internal_state* eax_5 = arg1;
00601e45      uint32_t i;
00601e45      
00601e45      do
00601e45      {
00601d88          void* esi_4 = (*(uint32_t*)((char*)ecx + 0x30) + eax_5);
00601d8a          eax_5 = var_6;
00601d8a          
00601d90          if (*(uint8_t*)((char*)esi_4 + edi_1) == eax_5)
00601d90          {
00601d96              eax_5 = var_5;
00601d96              
00601d9d              if (*(uint8_t*)(((char*)esi_4 + edi_1) - 1) == eax_5)
00601d9d              {
00601da3                  eax_5 = *(uint8_t*)esi_4;
00601da3                  
00601da7                  if (eax_5 == *(uint8_t*)edx_1)
00601da7                  {
00601dae                      eax_5 = *(uint8_t*)((char*)esi_4 + 1);
00601dae                      
00601db3                      if (eax_5 == edx_1[1])
00601db3                      {
00601db9                          void* edx_3 = &edx_1[2];
00601dba                          char* esi_6 = ((char*)esi_4 + 2);
00601dba                          
00601dfd                          do
00601dfd                          {
00601dbb                              edx_3 += 1;
00601dbc                              eax_5 = *(uint8_t*)edx_3;
00601dbc                              
00601dc1                              if (eax_5 != esi_6[1])
00601dc1                                  break;
00601dc1                              
00601dc3                              edx_3 += 1;
00601dc4                              eax_5 = *(uint8_t*)edx_3;
00601dc4                              
00601dc9                              if (eax_5 != esi_6[2])
00601dc9                                  break;
00601dc9                              
00601dcb                              edx_3 += 1;
00601dcc                              eax_5 = *(uint8_t*)edx_3;
00601dcc                              
00601dd1                              if (eax_5 != esi_6[3])
00601dd1                                  break;
00601dd1                              
00601dd3                              edx_3 += 1;
00601dd4                              eax_5 = *(uint8_t*)edx_3;
00601dd4                              
00601dd9                              if (eax_5 != esi_6[4])
00601dd9                                  break;
00601dd9                              
00601ddb                              edx_3 += 1;
00601ddc                              eax_5 = *(uint8_t*)edx_3;
00601ddc                              
00601de1                              if (eax_5 != esi_6[5])
00601de1                                  break;
00601de1                              
00601de3                              edx_3 += 1;
00601de4                              eax_5 = *(uint8_t*)edx_3;
00601de4                              
00601de9                              if (eax_5 != esi_6[6])
00601de9                                  break;
00601de9                              
00601deb                              edx_3 += 1;
00601dec                              eax_5 = *(uint8_t*)edx_3;
00601dec                              
00601df1                              if (eax_5 != esi_6[7])
00601df1                                  break;
00601df1                              
00601df3                              edx_3 += 1;
00601df4                              eax_5 = *(uint8_t*)edx_3;
00601df6                              esi_6 = &esi_6[8];
00601df6                              
00601df9                              if (eax_5 != *(uint8_t*)esi_6)
00601df9                                  break;
00601dfd                          } while (edx_3 < var_18);
00601dfd                          
00601e0a                          edx_1 = ((char*)var_18 - 0x102);
00601e0a                          
00601e10                          if ((((char*)edx_3 - var_18) + 0x102) > edi_1)
00601e10                          {
00601e18                              *(uint32_t*)((char*)ecx + 0x68) = arg1;
00601e1b                              edi_1 = (((char*)edx_3 - var_18) + 0x102);
00601e1b                              
00601e1d                              if ((((char*)edx_3 - var_18) + 0x102) >= var_10)
00601e1d                                  break;
00601e1d                              
00601e1f                              void* esi_15 = ((((char*)edx_3 - var_18) + 0x102) + edx_1);
00601e22                              void* eax_8;
00601e22                              eax_8 = *(uint8_t*)((char*)esi_15 - 1);
00601e25                              var_5 = eax_8;
00601e28                              eax_8 = *(uint8_t*)esi_15;
00601e2a                              var_6 = eax_8;
00601e10                          }
00601db3                      }
00601da7                  }
00601d9d              }
00601d90          }
00601d90          
00601e36          eax_5 = ((uint32_t)*(uint16_t*)(*(uint32_t*)((char*)ecx + 0x38) + ((*(uint32_t*)((char*)ecx + 0x2c) & arg1) << 1)));
00601e3d          arg1 = eax_5;
00601e3d          
00601e40          if (eax_5 <= var_14)
00601e40              break;
00601e40          
00601e42          i = i_1;
00601e42          i_1 -= 1;
00601e45      } while (i != 1);
00601e45      
00601e50      if (edi_1 > eax_4)
00601e58          return eax_4;
00601e58      
00601e52      return edi_1;
00601d0f  }


00601e5b  void fill_window(struct internal_state* arg1)

00601e5b  {
00601e63      int32_t* ebx;
00601e63      uint32_t i_4 = ebx[9];
00601e67      uint32_t i_5 = i_4;
00601e6a      int32_t edi;
00601e6a      int32_t var_18 = edi;
00601e6a      
00601fab      do
00601fab      {
00601e6b          int32_t ecx_1 = ebx[0x19];
00601e71          int32_t esi_1 = ebx[0x1b];
00601e74          int32_t eax_2 = (ebx[0xd] - ecx_1);
00601e76          uint32_t i_6 = (eax_2 - esi_1);
00601e76          
00601e7b          if (eax_2 == esi_1)
00601e7b          {
00601e83              if ((ecx_1 != 0 || esi_1 != 0))
00601e7f                  goto label_601e9d;
00601e7f              
00601e85              i_6 = i_4;
00601e7b          }
00601e7b          else if (i_6 != 0xffffffff)
00601e8c          {
00601e9d          label_601e9d:
00601e9d              
00601e9f              if (ecx_1 >= ((i_4 + ebx[9]) - 0x106))
00601e9f              {
00601ea1                  int32_t edi_1 = ebx[0xc];
00601eae                  int32_t esi_5;
00601eae                  int32_t edi_2;
00601eae                  edi_2 = __builtin_memcpy(edi_1, (edi_1 + i_4), ((i_4 >> 2) << 2));
00601eb5                  __builtin_memcpy(edi_2, esi_5, (i_4 & 3));
00601eb7                  int32_t i_2 = ebx[0x11];
00601eba                  int32_t eax_4 = ebx[0xf];
00601ebd                  ebx[0x1a] -= i_4;
00601ec0                  ebx[0x19] -= i_4;
00601ec3                  ebx[0x15] -= i_4;
00601ec6                  int16_t* eax_5 = (eax_4 + (i_2 << 1));
00601ede                  int32_t i;
00601ede                  
00601ede                  do
00601ede                  {
00601eca                      eax_5 -= 2;
00601ecb                      uint32_t esi_6 = ((uint32_t)*(uint16_t*)eax_5);
00601eda                      i = i_2;
00601eda                      i_2 -= 1;
00601edb                      *(uint16_t*)eax_5 = (((int16_t)!((esi_6 - esi_6))) & (esi_6 - i_4));
00601ede                  } while (i != 1);
00601ee3                  uint32_t i_3 = i_4;
00601ee5                  int16_t* eax_8 = (ebx[0xe] + (i_4 << 1));
00601efd                  uint32_t i_1;
00601efd                  
00601efd                  do
00601efd                  {
00601ee9                      eax_8 -= 2;
00601eea                      uint32_t ecx_6 = ((uint32_t)*(uint16_t*)eax_8);
00601ef9                      i_1 = i_3;
00601ef9                      i_3 -= 1;
00601efa                      *(uint16_t*)eax_8 = (((int16_t)!((ecx_6 - ecx_6))) & (ecx_6 - i_4));
00601efd                  } while (i_1 != 1);
00601f02                  i_6 += i_4;
00601e9f              }
00601e8c          }
00601e8c          else
00601e90              i_6 = 0xfffffffe;
00601e90          
00601f04          int32_t* esi_10 = *(uint32_t*)ebx;
00601f04          
00601f0d          if (esi_10[1] == 0)
00601f0d              break;
00601f0d          
00601f19          uint32_t i_8 = esi_10[1];
00601f1c          int32_t edi_9 = ((ebx[0x1b] + ebx[0x19]) + ebx[0xc]);
00601f21          uint32_t i_7 = i_8;
00601f21          
00601f24          if (i_8 > i_6)
00601f26              i_7 = i_6;
00601f26          
00601f2d          uint32_t i_9;
00601f2d          
00601f2d          if (i_7 != 0)
00601f2d          {
00601f36              void* eax_11 = esi_10[7];
00601f39              esi_10[1] = (i_8 - i_7);
00601f39              
00601f40              if (*(uint32_t*)((char*)eax_11 + 0x18) == 0)
00601f40              {
00601f4f                  i_4 = i_5;
00601f52                  esi_10[0xc] = d3dx_adler32(esi_10[0xc], *(uint32_t*)esi_10, i_7);
00601f40              }
00601f40              
00601f5f              int32_t esi_12;
00601f5f              int32_t edi_10;
00601f5f              edi_10 = __builtin_memcpy(edi_9, *(uint32_t*)esi_10, ((i_7 >> 2) << 2));
00601f66              __builtin_memcpy(edi_10, esi_12, (i_7 & 3));
00601f68              i_9 = i_7;
00601f6d              *(uint32_t*)esi_10 += i_9;
00601f6f              esi_10[2] += i_9;
00601f2d          }
00601f2d          else
00601f2f              i_9 = 0;
00601f2f          
00601f72          ebx[0x1b] += i_9;
00601f75          int32_t edi_11 = ebx[0x1b];
00601f75          
00601f7b          if (edi_11 >= 3)
00601f7b          {
00601f83              char* esi_13 = (ebx[0x19] + ebx[0xc]);
00601f86              uint32_t eax_16 = ((uint32_t)*(uint8_t*)esi_13);
00601f89              char ecx_16 = ((int8_t)ebx[0x14]);
00601f8c              ebx[0x10] = eax_16;
00601f9a              ebx[0x10] = (((eax_16 << ecx_16) ^ ((uint32_t)esi_13[1])) & ebx[0x13]);
00601f7b          }
00601f7b          
00601fa3          if (edi_11 >= 0x106)
00601fa3              break;
00601fab      } while (*(uint32_t*)(*(uint32_t*)ebx + 4) != 0);
00601e5b  }


00601fb5  enum block_state __stdcall deflate_stored(struct internal_state* arg1, int32_t arg2)

00601fb5  {
00601fc7      int32_t ecx_1 = (arg1->nowrap - 5);
00601fcd      int32_t esi = 0xffff;
00601fcd      
00601fcf      if (ecx_1 < 0xffff)
00601fd1          esi = ecx_1;
00601fd1      
00601fd5      while (true)
00601fd5      {
00601fd5          int32_t eax_1 = *(int32_t*)((char*)arg1 + 0x6c);
00601fd5          
00601fdb          if (eax_1 <= 1)
00601fdb          {
00601fdd              struct internal_state* edi;
00601fdd              fill_window(edi);
00601fe2              eax_1 = *(int32_t*)((char*)arg1 + 0x6c);
00601fe2              
00601fe7              if (eax_1 == 0)
00601fe7              {
00602084                  if (arg2 != 0)
00602084                  {
00602086                      int32_t esi_1 = *(int32_t*)((char*)arg1 + 0x54);
0060208b                      char* eax_16;
0060208b                      
0060208b                      if (esi_1 < 0)
00602094                          eax_16 = nullptr;
0060208b                      else
00602090                          eax_16 = (*(int32_t*)((char*)arg1 + 0x30) + esi_1);
00602090                      
0060209c                      int32_t ecx_7;
0060209c                      ecx_7 = arg2 == 4;
006020a8                      d3dx__tr_flush_block(arg1, eax_16, (*(int32_t*)((char*)arg1 + 0x64) - esi_1), ecx_7);
006020b0                      *(int32_t*)((char*)arg1 + 0x54) = *(int32_t*)((char*)arg1 + 0x64);
006020b5                      flush_pending(arg1->mode);
006020b5                      
006020bf                      if (*(uint32_t*)(arg1->mode + 0x10) != 0)
006020bf                      {
006020d2                          int32_t eax_20;
006020d2                          eax_20 = arg2 == 4;
006020d5                          return ((eax_20 * 2) + 1);
006020bf                      }
006020bf                      
006020c5                      if (arg2 == 4)
006020c9                          return 2;
00602084                  }
00602084                  
00602084                  break;
00601fe7              }
00601fdb          }
00601fdb          
00601fed          int32_t temp1_1 = *(int32_t*)((char*)arg1 + 0x64);
00601fed          *(int32_t*)((char*)arg1 + 0x64) += eax_1;
00601ff0          int32_t edx_1 = *(int32_t*)((char*)arg1 + 0x54);
00601ff3          int32_t ecx_2 = *(int32_t*)((char*)arg1 + 0x64);
00601ff6          *(int32_t*)((char*)arg1 + 0x6c) = 0;
00601ff9          int32_t eax_2 = (edx_1 + esi);
00601ff9          
00602000          if ((temp1_1 == -(eax_1) || ecx_2 >= eax_2))
00602000          {
00602006              *(int32_t*)((char*)arg1 + 0x6c) = (ecx_2 - eax_2);
00602009              *(int32_t*)((char*)arg1 + 0x64) = eax_2;
0060200c              char* ecx_5;
0060200c              
0060200c              if (edx_1 < 0)
00602015                  ecx_5 = nullptr;
0060200c              else
00602011                  ecx_5 = (*(int32_t*)((char*)arg1 + 0x30) + edx_1);
00602011              
0060201d              d3dx__tr_flush_block(arg1, ecx_5, (eax_2 - edx_1), 0);
00602025              *(int32_t*)((char*)arg1 + 0x54) = *(int32_t*)((char*)arg1 + 0x64);
0060202a              flush_pending(arg1->mode);
0060202a              
00602034              if (*(uint32_t*)(arg1->mode + 0x10) == 0)
00602034                  break;
00602000          }
00602000          
00602036          int32_t ecx_6 = *(int32_t*)((char*)arg1 + 0x54);
0060203f          uint32_t edx_3 = (*(int32_t*)((char*)arg1 + 0x64) - ecx_6);
0060203f          
00602048          if (edx_3 >= (*(int32_t*)((char*)arg1 + 0x24) - 0x106))
00602048          {
0060204c              char* eax_10;
0060204c              
0060204c              if (ecx_6 < 0)
00602055                  eax_10 = nullptr;
0060204c              else
00602051                  eax_10 = (*(int32_t*)((char*)arg1 + 0x30) + ecx_6);
00602051              
0060205b              d3dx__tr_flush_block(arg1, eax_10, edx_3, 0);
00602063              *(int32_t*)((char*)arg1 + 0x54) = *(int32_t*)((char*)arg1 + 0x64);
00602068              flush_pending(arg1->mode);
00602068              
00602072              if (*(uint32_t*)(arg1->mode + 0x10) == 0)
00602072                  break;
00602048          }
00601fd5      }
00601fd5      
00602078      return 0;
00601fb5  }


006020db  enum block_state __stdcall deflate_fast(struct internal_state* arg1, int32_t arg2)

006020db  {
006020e6      uint32_t edi_1 = 0;
006020e6      
006020e8      while (true)
006020e8      {
006020e8          int32_t eax_1 = *(int32_t*)((char*)arg1 + 0x6c);
006020e8          
006020f0          if (eax_1 < 0x106)
006020f0          {
006020f4              struct internal_state* edi;
006020f4              fill_window(edi);
006020f9              eax_1 = *(int32_t*)((char*)arg1 + 0x6c);
006020f9              
00602107              if ((eax_1 < 0x106 && arg2 == 0))
00602107                  break;
00602107              
0060210f              if (eax_1 == 0)
0060210f              {
00602331                  int32_t ecx_18 = *(int32_t*)((char*)arg1 + 0x54);
00602336                  char* eax_45;
00602336                  
00602336                  if (ecx_18 < 0)
0060233f                      eax_45 = nullptr;
00602336                  else
0060233b                      eax_45 = (*(int32_t*)((char*)arg1 + 0x30) + ecx_18);
0060233b                  
00602347                  int32_t edx_11;
00602347                  edx_11 = arg2 == 4;
00602353                  d3dx__tr_flush_block(arg1, eax_45, (*(int32_t*)((char*)arg1 + 0x64) - ecx_18), edx_11);
0060235b                  *(int32_t*)((char*)arg1 + 0x54) = *(int32_t*)((char*)arg1 + 0x64);
00602360                  flush_pending(arg1->mode);
00602360                  
0060236b                  if (*(uint32_t*)(arg1->mode + 0x10) != 0)
0060236b                  {
0060237e                      int32_t eax_49;
0060237e                      eax_49 = arg2 == 4;
00602381                      return ((eax_49 * 2) + 1);
0060236b                  }
0060236b                  
00602371                  if (arg2 == 4)
00602375                      return 2;
00602375                  
0060236b                  break;
0060210f              }
006020f0          }
006020f0          
00602118          if (eax_1 >= 3)
00602118          {
00602120              int32_t edx_1 = *(int32_t*)((char*)arg1 + 0x64);
0060212f              int32_t eax_5 = (((*(int32_t*)((char*)arg1 + 0x40) << ((int8_t)*(int32_t*)((char*)arg1 + 0x50))) ^ ((uint32_t)*(uint8_t*)((*(int32_t*)((char*)arg1 + 0x30) + edx_1) + 2))) & *(int32_t*)((char*)arg1 + 0x4c));
00602132              int32_t ecx_4 = *(int32_t*)((char*)arg1 + 0x3c);
00602135              *(int32_t*)((char*)arg1 + 0x40) = eax_5;
00602138              edi_1 = ((uint32_t)*(uint16_t*)(ecx_4 + (eax_5 << 1)));
00602144              *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x38) + ((*(int32_t*)((char*)arg1 + 0x2c) & edx_1) << 1)) = edi_1;
0060214e              edx_1 = *(int32_t*)((char*)arg1 + 0x64);
00602152              *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x3c) + (*(int32_t*)((char*)arg1 + 0x40) << 1)) = edx_1;
00602118          }
00602118          
00602173          if ((edi_1 != 0 && ((*(int32_t*)((char*)arg1 + 0x64) - edi_1) <= (*(int32_t*)((char*)arg1 + 0x24) - 0x106) && *(int32_t*)((char*)arg1 + 0x80) != 2)))
0060217d              *(int32_t*)((char*)arg1 + 0x58) = longest_match(arg1, edi_1);
0060217d          
00602184          int32_t ebx_4;
00602184          
00602184          if (*(int32_t*)((char*)arg1 + 0x58) < 3)
00602184          {
0060229a              char* eax_33;
0060229a              eax_33 = *(int32_t*)((char*)arg1 + 0x64)[*(int32_t*)((char*)arg1 + 0x30)];
006022a9              *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x169c) + (*(int32_t*)((char*)arg1 + 0x1698) << 1)) = 0;
006022ba              *(uint8_t*)(*(int32_t*)((char*)arg1 + 0x1690) + *(int32_t*)((char*)arg1 + 0x1698)) = eax_33;
006022bd              *(int32_t*)((char*)arg1 + 0x1698) += 1;
006022cd              *(uint16_t*)(((char*)arg1 + (((uint32_t)eax_33) << 2)) + 0x8c) += 1;
006022df              ebx_4 = *(int32_t*)((char*)arg1 + 0x1698) == (*(int32_t*)((char*)arg1 + 0x1694) - 1);
006022e2              *(int32_t*)((char*)arg1 + 0x6c) -= 1;
006022e5              *(int32_t*)((char*)arg1 + 0x64) += 1;
00602184          }
00602184          else
00602184          {
00602190              struct internal_state* ecx;
00602190              ecx = *(int32_t*)((char*)arg1 + 0x58);
0060219f              int16_t eax_12 = (*(int32_t*)((char*)arg1 + 0x64) - *(int32_t*)((char*)arg1 + 0x68));
006021a3              ecx -= 3;
006021a6              *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x169c) + (*(int32_t*)((char*)arg1 + 0x1698) << 1)) = eax_12;
006021b0              *(int32_t*)((char*)arg1 + 0x1690)[*(int32_t*)((char*)arg1 + 0x1698)] = ecx;
006021b9              *(int32_t*)((char*)arg1 + 0x1698) += 1;
006021ce              void* ecx_9 = (((char*)arg1 + (((uint32_t)*(uint8_t*)(((uint32_t)ecx) + 0x7f5290)) << 2)) + 0x490);
006021d5              *(uint16_t*)ecx_9 += 1;
006021dc              uint32_t eax_14 = ((uint32_t)(eax_12 - 1));
006021df              uint32_t eax_15;
006021df              
006021df              if ((eax_12 - 1) >= 0x100)
006021ed                  eax_15 = ((uint32_t)*(uint8_t*)((eax_14 >> 7) + 0x7f5190));
006021df              else
006021e1                  eax_15 = ((uint32_t)*(uint8_t*)(eax_14 + 0x7f5090));
006021e1              
006021fb              *(uint16_t*)(((char*)arg1 + (eax_15 << 2)) + 0x980) += 1;
0060220d              int32_t eax_20 = *(int32_t*)((char*)arg1 + 0x58);
00602210              ebx_4 = *(int32_t*)((char*)arg1 + 0x1698) == (*(int32_t*)((char*)arg1 + 0x1694) - 1);
00602213              *(int32_t*)((char*)arg1 + 0x6c) -= eax_20;
00602213              
00602221              if ((eax_20 > *(int32_t*)((char*)arg1 + 0x78) || *(int32_t*)((char*)arg1 + 0x6c) < 3))
00602221              {
0060226b                  *(int32_t*)((char*)arg1 + 0x64) += eax_20;
0060226e                  void* eax_28 = *(int32_t*)((char*)arg1 + 0x64);
00602271                  int32_t ecx_13 = *(int32_t*)((char*)arg1 + 0x30);
00602274                  *(int32_t*)((char*)arg1 + 0x58) = 0;
00602278                  char* edx_6 = ((char*)eax_28 + ecx_13);
0060227b                  uint32_t eax_29 = ((uint32_t)*(uint8_t*)edx_6);
0060227e                  char ecx_14 = ((int8_t)*(int32_t*)((char*)arg1 + 0x50));
00602281                  *(int32_t*)((char*)arg1 + 0x40) = eax_29;
0060228f                  *(int32_t*)((char*)arg1 + 0x40) = (((eax_29 << ecx_14) ^ ((uint32_t)edx_6[1])) & *(int32_t*)((char*)arg1 + 0x4c));
00602221              }
00602221              else
00602221              {
00602224                  *(int32_t*)((char*)arg1 + 0x58) = (eax_20 - 1);
00602267                  int32_t i;
00602267                  
00602267                  do
00602267                  {
00602227                      *(int32_t*)((char*)arg1 + 0x64) += 1;
00602230                      int32_t edx_4 = *(int32_t*)((char*)arg1 + 0x64);
0060223b                      int32_t edx_5 = (edx_4 & *(int32_t*)((char*)arg1 + 0x2c));
00602240                      int32_t ecx_12 = *(int32_t*)((char*)arg1 + 0x3c);
00602245                      int32_t eax_25 = ((((uint32_t)*(uint8_t*)((edx_4 + *(int32_t*)((char*)arg1 + 0x30)) + 2)) ^ (*(int32_t*)((char*)arg1 + 0x40) << ((int8_t)*(int32_t*)((char*)arg1 + 0x50)))) & *(int32_t*)((char*)arg1 + 0x4c));
00602248                      *(int32_t*)((char*)arg1 + 0x40) = eax_25;
0060224b                      edi_1 = ((uint32_t)*(uint16_t*)(ecx_12 + (eax_25 << 1)));
00602252                      *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x38) + (edx_5 << 1)) = edi_1;
0060225c                      edx_5 = *(int32_t*)((char*)arg1 + 0x64);
00602260                      *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x3c) + (*(int32_t*)((char*)arg1 + 0x40) << 1)) = edx_5;
00602264                      i = *(int32_t*)((char*)arg1 + 0x58);
00602264                      *(int32_t*)((char*)arg1 + 0x58) -= 1;
00602267                  } while (i != 1);
006022e5                  *(int32_t*)((char*)arg1 + 0x64) += 1;
00602221              }
00602184          }
00602184          
006022ea          if (ebx_4 != 0)
006022ea          {
006022f0              int32_t ecx_17 = *(int32_t*)((char*)arg1 + 0x54);
006022f5              char* eax_39;
006022f5              
006022f5              if (ecx_17 < 0)
006022fe                  eax_39 = nullptr;
006022f5              else
006022fa                  eax_39 = (*(int32_t*)((char*)arg1 + 0x30) + ecx_17);
006022fa              
0060230a              d3dx__tr_flush_block(arg1, eax_39, (*(int32_t*)((char*)arg1 + 0x64) - ecx_17), 0);
00602312              *(int32_t*)((char*)arg1 + 0x54) = *(int32_t*)((char*)arg1 + 0x64);
00602317              flush_pending(arg1->mode);
00602317              
00602322              if (*(uint32_t*)(arg1->mode + 0x10) == 0)
00602322                  break;
006022ea          }
006020e8      }
006020e8      
00602328      return 0;
006020db  }


00602387  enum block_state __stdcall deflate_slow(struct internal_state* arg1, int32_t arg2)

00602387  {
0060238c      int32_t ecx;
0060238c      int32_t var_8 = ecx;
0060238d      uint32_t var_8_1 = 0;
0060238d      
00602397      while (true)
00602397      {
00602397          int32_t eax_1 = *(int32_t*)((char*)arg1 + 0x6c);
00602397          
006023a1          if (eax_1 < 0x106)
006023a1          {
006023a5              struct internal_state* edi;
006023a5              fill_window(edi);
006023aa              eax_1 = *(int32_t*)((char*)arg1 + 0x6c);
006023aa              
006023b6              if ((eax_1 < 0x106 && arg2 == 0))
006023b6                  break;
006023b6              
006023c5              if (eax_1 == 0)
006023c5              {
00602673                  if (*(int32_t*)((char*)arg1 + 0x60) != 0)
00602673                  {
0060267b                      int32_t ecx_30;
0060267b                      ecx_30 = *(uint8_t*)((*(int32_t*)((char*)arg1 + 0x64) + *(int32_t*)((char*)arg1 + 0x30)) - 1);
0060268d                      *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x169c) + (*(int32_t*)((char*)arg1 + 0x1698) << 1)) = 0;
00602693                      *(int32_t*)((char*)arg1 + 0x1690)[*(int32_t*)((char*)arg1 + 0x1698)] = ecx_30;
0060269c                      *(int32_t*)((char*)arg1 + 0x1698) += 1;
006026a8                      *(uint16_t*)(((char*)arg1 + (((uint32_t)ecx_30) << 2)) + 0x8c) += 1;
006026ab                      *(int32_t*)((char*)arg1 + 0x60) = 0;
00602673                  }
00602673                  
006026ae                  int32_t ecx_31 = *(int32_t*)((char*)arg1 + 0x54);
006026b3                  char* eax_56;
006026b3                  
006026b3                  if (ecx_31 < 0)
006026bc                      eax_56 = nullptr;
006026b3                  else
006026b8                      eax_56 = (*(int32_t*)((char*)arg1 + 0x30) + ecx_31);
006026b8                  
006026c4                  int32_t edx_12;
006026c4                  edx_12 = arg2 == 4;
006026d0                  d3dx__tr_flush_block(arg1, eax_56, (*(int32_t*)((char*)arg1 + 0x64) - ecx_31), edx_12);
006026d8                  *(int32_t*)((char*)arg1 + 0x54) = *(int32_t*)((char*)arg1 + 0x64);
006026dd                  flush_pending(arg1->mode);
006026dd                  
006026e7                  if (*(uint32_t*)(arg1->mode + 0x10) != 0)
006026e7                  {
00602701                      int32_t eax_60;
00602701                      eax_60 = arg2 == 4;
00602704                      return ((eax_60 * 2) + 1);
006026e7                  }
006026e7                  
006026ed                  if (arg2 == 4)
006026f5                      return 2;
006026f5                  
006026b3                  break;
006023c5              }
006023a1          }
006023a1          
006023ce          if (eax_1 >= 3)
006023ce          {
006023d6              int32_t edx_1 = *(int32_t*)((char*)arg1 + 0x64);
006023e5              int32_t eax_6 = (((*(int32_t*)((char*)arg1 + 0x40) << ((int8_t)*(int32_t*)((char*)arg1 + 0x50))) ^ ((uint32_t)*(uint8_t*)((*(int32_t*)((char*)arg1 + 0x30) + edx_1) + 2))) & *(int32_t*)((char*)arg1 + 0x4c));
006023e8              int32_t ecx_4 = *(int32_t*)((char*)arg1 + 0x3c);
006023eb              *(int32_t*)((char*)arg1 + 0x40) = eax_6;
006023ee              uint32_t eax_7 = ((uint32_t)*(uint16_t*)(ecx_4 + (eax_6 << 1)));
006023fa              *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x38) + ((*(int32_t*)((char*)arg1 + 0x2c) & edx_1) << 1)) = eax_7;
00602401              int32_t edx_2;
00602401              edx_2 = *(int32_t*)((char*)arg1 + 0x64);
00602405              var_8_1 = eax_7;
0060240b              *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x3c) + (*(int32_t*)((char*)arg1 + 0x40) << 1)) = edx_2;
006023ce          }
006023ce          
00602418          *(int32_t*)((char*)arg1 + 0x70) = *(int32_t*)((char*)arg1 + 0x58);
0060241f          *(int32_t*)((char*)arg1 + 0x5c) = *(int32_t*)((char*)arg1 + 0x68);
00602422          *(int32_t*)((char*)arg1 + 0x58) = 2;
00602422          
00602440          if ((var_8_1 != 0 && (*(int32_t*)((char*)arg1 + 0x70) < *(int32_t*)((char*)arg1 + 0x78) && (*(int32_t*)((char*)arg1 + 0x64) - var_8_1) <= (*(int32_t*)((char*)arg1 + 0x24) - 0x106))))
00602440          {
0060244a              if (*(int32_t*)((char*)arg1 + 0x80) != 2)
00602456                  *(int32_t*)((char*)arg1 + 0x58) = longest_match(arg1, var_8_1);
00602456              
00602459              int32_t eax_15 = *(int32_t*)((char*)arg1 + 0x58);
00602459              
0060245f              if (eax_15 <= 5)
0060245f              {
00602464                  if (*(int32_t*)((char*)arg1 + 0x80) == 1)
00602478                      *(int32_t*)((char*)arg1 + 0x58) = 2;
00602464                  else if ((eax_15 == 3 && (*(int32_t*)((char*)arg1 + 0x64) - *(int32_t*)((char*)arg1 + 0x68)) > 0x1000))
00602478                      *(int32_t*)((char*)arg1 + 0x58) = 2;
0060245f              }
00602440          }
00602440          
0060247b          int32_t eax_18 = *(int32_t*)((char*)arg1 + 0x70);
0060247b          
0060248a          if ((eax_18 >= 3 && *(int32_t*)((char*)arg1 + 0x58) <= eax_18))
0060248a          {
006024a2              int32_t ebx_3 = ((*(int32_t*)((char*)arg1 + 0x64) + *(int32_t*)((char*)arg1 + 0x6c)) - 3);
006024a6              int32_t ecx_11;
006024a6              ecx_11 = *(int32_t*)((char*)arg1 + 0x70);
006024b3              ecx_11 -= 3;
006024b6              int16_t eax_21 = ((*(int32_t*)((char*)arg1 + 0x64) - *(int32_t*)((char*)arg1 + 0x5c)) - 1);
006024b7              *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x169c) + (*(int32_t*)((char*)arg1 + 0x1698) << 1)) = eax_21;
006024c1              *(int32_t*)((char*)arg1 + 0x1690)[*(int32_t*)((char*)arg1 + 0x1698)] = ecx_11;
006024ca              *(int32_t*)((char*)arg1 + 0x1698) += 1;
006024df              void* ecx_14 = (((char*)arg1 + (((uint32_t)*(uint8_t*)(((uint32_t)ecx_11) + 0x7f5290)) << 2)) + 0x490);
006024e6              *(uint16_t*)ecx_14 += 1;
006024ed              uint32_t eax_23 = ((uint32_t)(eax_21 - 1));
006024f0              uint32_t eax_24;
006024f0              
006024f0              if ((eax_21 - 1) >= 0x100)
006024fe                  eax_24 = ((uint32_t)*(uint8_t*)((eax_23 >> 7) + 0x7f5190));
006024f0              else
006024f2                  eax_24 = ((uint32_t)*(uint8_t*)(eax_23 + 0x7f5090));
006024f2              
0060250c              *(uint16_t*)(((char*)arg1 + (eax_24 << 2)) + 0x980) += 1;
0060251e              int32_t eax_29 = *(int32_t*)((char*)arg1 + 0x70);
00602521              int32_t ecx_15;
00602521              ecx_15 = *(int32_t*)((char*)arg1 + 0x1698) == (*(int32_t*)((char*)arg1 + 0x1694) - 1);
0060252b              *(int32_t*)((char*)arg1 + 0x6c) += (1 - eax_29);
00602531              *(int32_t*)((char*)arg1 + 0x70) = (eax_29 - 2);
0060257d              int32_t i;
0060257d              
0060257d              do
0060257d              {
00602534                  *(int32_t*)((char*)arg1 + 0x64) += 1;
00602537                  int32_t edx_5 = *(int32_t*)((char*)arg1 + 0x64);
00602537                  
0060253c                  if (edx_5 <= ebx_3)
0060253c                  {
00602550                      int32_t eax_34 = (((*(int32_t*)((char*)arg1 + 0x40) << ((int8_t)*(int32_t*)((char*)arg1 + 0x50))) ^ ((uint32_t)*(uint8_t*)((*(int32_t*)((char*)arg1 + 0x30) + edx_5) + 2))) & *(int32_t*)((char*)arg1 + 0x4c));
00602553                      int32_t ecx_20 = *(int32_t*)((char*)arg1 + 0x3c);
00602556                      *(int32_t*)((char*)arg1 + 0x40) = eax_34;
00602559                      uint32_t eax_35 = ((uint32_t)*(uint16_t*)(ecx_20 + (eax_34 << 1)));
00602565                      *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x38) + ((*(int32_t*)((char*)arg1 + 0x2c) & edx_5) << 1)) = eax_35;
0060256c                      int32_t edx_6;
0060256c                      edx_6 = *(int32_t*)((char*)arg1 + 0x64);
00602570                      var_8_1 = eax_35;
00602576                      *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x3c) + (*(int32_t*)((char*)arg1 + 0x40) << 1)) = edx_6;
0060253c                  }
0060253c                  
0060257a                  i = *(int32_t*)((char*)arg1 + 0x70);
0060257a                  *(int32_t*)((char*)arg1 + 0x70) -= 1;
0060257d              } while (i != 1);
0060257f              *(int32_t*)((char*)arg1 + 0x60) = 0;
00602583              *(int32_t*)((char*)arg1 + 0x64) += 1;
00602588              int32_t eax_37 = *(int32_t*)((char*)arg1 + 0x64);
0060258b              *(int32_t*)((char*)arg1 + 0x58) = 2;
0060258b              
00602592              if (ecx_15 == 0)
00602592                  continue;
00602592              else
00602592              {
00602598                  int32_t edx_7 = *(int32_t*)((char*)arg1 + 0x54);
0060259d                  char* ecx_25;
0060259d                  
0060259d                  if (edx_7 < 0)
006025a6                      ecx_25 = nullptr;
0060259d                  else
006025a2                      ecx_25 = (*(int32_t*)((char*)arg1 + 0x30) + edx_7);
006025a2                  
006025af                  d3dx__tr_flush_block(arg1, ecx_25, (eax_37 - edx_7), 0);
006025b7                  *(int32_t*)((char*)arg1 + 0x54) = *(int32_t*)((char*)arg1 + 0x64);
006025bc                  flush_pending(arg1->mode);
00602592              }
0060248a          }
0060248a          else if (*(int32_t*)((char*)arg1 + 0x60) == 0)
006025d7          {
0060265e              *(int32_t*)((char*)arg1 + 0x64) += 1;
00602661              *(int32_t*)((char*)arg1 + 0x6c) -= 1;
00602664              *(int32_t*)((char*)arg1 + 0x60) = 1;
0060266b              continue;
006025d7          }
006025d7          else
006025d7          {
006025e3              int32_t eax_42;
006025e3              eax_42 = *(uint8_t*)((*(int32_t*)((char*)arg1 + 0x64) + *(int32_t*)((char*)arg1 + 0x30)) - 1);
006025f3              *(uint16_t*)(*(int32_t*)((char*)arg1 + 0x169c) + (*(int32_t*)((char*)arg1 + 0x1698) << 1)) = 0;
006025fd              *(int32_t*)((char*)arg1 + 0x1690)[*(int32_t*)((char*)arg1 + 0x1698)] = eax_42;
00602606              *(int32_t*)((char*)arg1 + 0x1698) += 1;
00602616              *(uint16_t*)(((char*)arg1 + (((uint32_t)eax_42) << 2)) + 0x8c) += 1;
00602616              
00602626              if (*(int32_t*)((char*)arg1 + 0x1698) == (*(int32_t*)((char*)arg1 + 0x1694) - 1))
00602626              {
00602628                  int32_t ecx_29 = *(int32_t*)((char*)arg1 + 0x54);
0060262d                  char* eax_48;
0060262d                  
0060262d                  if (ecx_29 < 0)
00602636                      eax_48 = nullptr;
0060262d                  else
00602632                      eax_48 = (*(int32_t*)((char*)arg1 + 0x30) + ecx_29);
00602632                  
00602641                  d3dx__tr_flush_block(arg1, eax_48, (*(int32_t*)((char*)arg1 + 0x64) - ecx_29), 0);
00602649                  *(int32_t*)((char*)arg1 + 0x54) = *(int32_t*)((char*)arg1 + 0x64);
0060264e                  flush_pending(arg1->mode);
00602626              }
00602626              
00602653              *(int32_t*)((char*)arg1 + 0x64) += 1;
00602656              *(int32_t*)((char*)arg1 + 0x6c) -= 1;
006025d7          }
006025d7          
006025c7          if (*(uint32_t*)(arg1->mode + 0x10) == 0)
006025c7              break;
00602397      }
00602397      
006023b8      return 0;
00602387  }


0060270d  struct D3DXQUATERNION* __stdcall sse_D3DXQuaternionMultiply(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3)

0060270d  {
0060271c      int64_t xmm1;
0060271c      xmm1 = arg3->x;
0060271c      *(uint32_t*)((char*)xmm1)[4] = arg3->y;
0060271f      float xmm1_1[0x4] = (xmm1 | (arg3->z*(int32_t*)((char*)arg3 + 8) << 0x40));
00602723      int64_t xmm0;
00602723      xmm0 = arg2->x;
00602723      *(uint32_t*)((char*)xmm0)[4] = arg2->y;
00602726      float xmm0_1[0x4] = (xmm0 | (arg2->z*(int32_t*)((char*)arg2 + 8) << 0x40));
00602731      float xmm1_3[0x4] = _mm_mul_ps(_mm_shuffle_ps(xmm1_1, xmm1_1, 0xff), xmm0_1);
00602737      float xmm2_1[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
0060273b      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0x1b);
00602749      float xmm1_4[0x4] = _mm_add_ps(xmm1_3, _mm_mul_ps((xmm2_1 ^ data_7f47d0), xmm0_2));
0060274f      float xmm3_1[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0x55);
00602753      float xmm0_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm0_2, 0xb1);
00602761      float xmm1_5[0x4] = _mm_add_ps(xmm1_4, _mm_mul_ps((xmm3_1 ^ data_7f47c0), xmm0_3));
00602764      float xmm2_5[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0xaa);
00602768      float xmm0_4[0x4] = _mm_shuffle_ps(xmm0_3, xmm0_3, 0x1b);
00602776      int64_t xmm1_6 = _mm_add_ps(xmm1_5, _mm_mul_ps((xmm2_5 ^ data_7f47b0), xmm0_4));
00602779      arg1->x = xmm1_6;
00602779      arg1->y = *(uint32_t*)((char*)xmm1_6)[4];
0060277c      arg1->z*(int32_t*)((char*)arg1 + 8) = (arg1->z*(int32_t*)((char*)arg1 + 8) | (xmm1_6 << 0x40));
00602785      return arg1;
0060270d  }


00602788  struct D3DXQUATERNION* __stdcall sse_D3DXQuaternionNormalize(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

00602788  {
00602790      float x = arg2->x;
00602794      float y = arg2->y;
00602799      float z = arg2->z;
0060279e      float w = arg2->w;
006027b7      float xmm5_1 = (y * y);
006027cb      float xmm4_3 = (((x * x) + xmm5_1) + ((z * z) + (w * w)));
006027d2      float xmm5_2 = _mm_rsqrt_ss(xmm5_1, xmm4_3);
006027f6      float xmm5_7 = (((data_827cd0 - (xmm4_3 * (xmm5_2 * xmm5_2))) * data_827cc0) * xmm5_2);
00602802      arg1->x = (x * xmm5_7);
0060280a      arg1->y = (y * xmm5_7);
00602813      arg1->z = (z * xmm5_7);
00602818      arg1->w = (w * xmm5_7);
00602821      return arg1;
00602788  }


00602824  struct D3DXQUATERNION* __stdcall sse_D3DXQuaternionInverse(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

00602824  {
00602829      int32_t ecx;
00602829      int32_t var_8 = ecx;
0060283d      int64_t xmm1;
0060283d      xmm1 = arg2->x;
0060283d      *(uint32_t*)((char*)xmm1)[4] = arg2->y;
00602840      float xmm1_1[0x4] = (xmm1 | (arg2->z*(int32_t*)((char*)arg2 + 8) << 0x40));
0060284a      float xmm0_1[0x4] = _mm_mul_ps(xmm1_1, xmm1_1);
00602853      float xmm0_2[0x4] = _mm_add_ps(xmm0_1, (xmm0_1 >> 0x40));
00602859      float xmm2_2 = _mm_shuffle_ps(xmm0_2, xmm0_2, 0x55);
0060285d      float xmm0_3 = (xmm0_2 + xmm2_2);
00602861      float var_20 = xmm0_3;
00602865      float xmm2_3 = _mm_rcp_ss(xmm2_2, xmm0_3);
00602884      float xmm0_6[0x4] = ((xmm2_3 + xmm2_3) - ((xmm2_3 * xmm0_3) * xmm2_3));
0060288b      float xmm2_6[0x4] = _mm_shuffle_ps(xmm0_6, xmm0_6, 0);
00602899      struct D3DXQUATERNION xmm1_3 = _mm_mul_ps(_mm_mul_ps(xmm1_1, data_827ce0), xmm2_6);
0060289c      arg1->x = xmm1_3.x;
0060289c      arg1->y = xmm1_3.y;
0060289c      arg1->z = xmm1_3.z;
0060289c      arg1->w = xmm1_3.w;
006028a5      return arg1;
00602824  }


006028a8  struct D3DXQUATERNION* __stdcall sse_D3DXQuaternionRotationYawPitchRoll(struct D3DXQUATERNION* arg1, float arg2, float arg3, float arg4)

006028a8  {
006028ad      int32_t ecx;
006028ad      int32_t var_8 = ecx;
006028bf      float var_20 = arg4;
006028d1      float var_1c = arg3;
006028db      float var_18 = arg2;
006028ef      int32_t var_14 = 0;
006028fd      var_20 = _mm_mul_ps(var_20, data_7f4850);
00602901      float var_30[0x4];
00602901      sse_SinCos4(&var_20, &var_20, &var_30);
00602906      float xmm0_1[0x4] = var_20;
0060290d      float xmm1_6[0x4] = __shufps_xmmps_memps_immb(xmm0_1, var_30, 0x99);
00602912      float xmm0_2[0x4] = __shufps_xmmps_memps_immb(xmm0_1, var_30, 0);
0060291a      float xmm2_1[0x4] = _mm_shuffle_ps(xmm1_6, xmm1_6, 0xf7);
00602921      float xmm3_1[0x4] = _mm_shuffle_ps(xmm1_6, xmm1_6, 0xa8);
00602925      float xmm0_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm0_2, 0x8a);
0060292c      float xmm1_8[0x4] = _mm_shuffle_ps(xmm0_3, xmm0_3, 0x8a);
00602936      float xmm0_5[0x4] = _mm_mul_ps(_mm_mul_ps(xmm0_3, xmm2_1), xmm3_1);
00602939      float xmm5_1[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 1);
00602958      float xmm0_6[0x4] = _mm_add_ps(xmm0_5, (_mm_mul_ps(_mm_mul_ps(xmm1_8, _mm_shuffle_ps(xmm2_1, xmm2_1, 0x51)), xmm5_1) ^ data_7f4840));
0060295b      arg1->x = xmm0_6[0];
0060295b      arg1->y = xmm0_6[1];
0060295b      arg1->z = xmm0_6[2];
0060295b      arg1->w = xmm0_6[3];
00602964      return arg1;
006028a8  }


00602967  struct D3DXQUATERNION* __stdcall sse_D3DXQuaternionRotationMatrix(struct D3DXQUATERNION* arg1, struct D3DXMATRIX const* arg2)

00602967  {
0060296f      struct D3DXMATRIX* ecx = arg2;
00602977      long double x87_r7_2 = ((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x14)) + ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0))) + ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x28)));
0060297a      long double temp1 = ((long double)0f);
0060297a      (x87_r7_2 - temp1);
00602985      struct D3DXQUATERNION* result;
00602985      long double x87_r7_6;
00602985      
00602985      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
00602985      {
006029c8          float eax_1 = *(uint32_t*)((char*)ecx->__inner0 + 0x14);
006029cd          long double x87_r7_7 = ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0));
006029d2          float eax_2 = *(uint32_t*)((char*)ecx->__inner0 + 0x28);
006029d5          float var_18 = ((float)x87_r7_7);
006029d8          long double temp2_1 = ((long double)eax_1);
006029d8          (x87_r7_7 - temp2_1);
006029dc          float var_10_1 = eax_2;
006029e0          struct D3DXMATRIX* ebx_1 = nullptr;
006029e2          eax_2 = ((((x87_r7_7 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp2_1) ? 1 : 0) << 0xe) | 0))));
006029e4          int32_t edi;
006029e4          int32_t var_24_1 = edi;
006029e4          
006029e8          if ((*(uint8_t*)((char*)eax_2)[1] & 1) != 0)
006029ea              ebx_1 = 1;
006029ea          
006029eb          long double x87_r7_8 = ((long double)&var_18[ebx_1]);
006029ef          arg2 = ebx_1;
006029f2          long double temp3_1 = ((long double)var_10_1);
006029f2          (x87_r7_8 - temp3_1);
006029f5          eax_2 = ((((x87_r7_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp3_1) ? 1 : 0) << 0xe) | 0))));
006029f5          
006029fa          if ((*(uint8_t*)((char*)eax_2)[1] & 1) != 0)
006029fa          {
006029fe              ebx_1 = 2;
006029ff              arg2 = 2;
006029fa          }
006029fa          
00602a04          int32_t edx_2 = (ebx_1 << 2);
00602a07          int32_t edi_1 = *(uint32_t*)(edx_2 + 0x7f4860);
00602a13          float* esi_2 = (edi_1 << 2);
00602a1a          int32_t eax_3 = esi_2[0x1fd218];
00602a2a          result = arg1;
00602a3c          long double x87_r7_14 = (sqrtl((((((long double)*(uint32_t*)(&var_18 + edx_2)) - ((long double)*(uint32_t*)(&var_18 + esi_2))) - ((long double)&var_18[eax_3])) + ((long double)1f))) * ((long double)0.5f));
00602a44          *(uint32_t*)(edx_2 + result) = ((float)x87_r7_14);
00602a47          x87_r7_6 = (((long double)0.25f) / x87_r7_14);
00602a65          *(uint32_t*)((char*)esi_2 + result) = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)ebx_1 + esi_2) << 2))) + ((long double)*(uint32_t*)((char*)ecx + ((edi_1 + edx_2) << 2)))) * x87_r7_6));
00602a75          float* edx_5 = (eax_3 << 2);
00602a7a          *(uint32_t*)((char*)edx_5 + result) = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)arg2 + (eax_3 << 2)) << 2))) + ((long double)*(uint32_t*)((char*)ecx + ((edx_2 + eax_3) << 2)))) * x87_r7_6));
00602a8a          result->w = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)esi_2 + eax_3) << 2))) - ((long double)*(uint32_t*)((char*)ecx + (((char*)edx_5 + edi_1) << 2)))) * x87_r7_6));
00602985      }
00602985      else
00602985      {
0060298d          result = arg1;
00602992          long double x87_r7_5 = (sqrtl((x87_r7_2 + ((long double)1f))) * ((long double)0.5f));
0060299a          result->w = ((float)x87_r7_5);
0060299d          x87_r7_6 = (((long double)0.25f) / x87_r7_5);
006029ab          result->x = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x18)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x24))) * x87_r7_6));
006029b5          result->y = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x20)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 8))) * x87_r7_6));
006029c0          result->z = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 4)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x10))) * x87_r7_6));
00602985      }
00602a90      return result;
00602967  }


00602a93  struct D3DXVECTOR4* __stdcall sse_D3DXVec2Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

00602a93  {
00602a9e      float xmm3[0x4];
00602a9e      xmm3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
00602a9e      xmm3[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
00602a9e      xmm3[2] = *(uint32_t*)((char*)arg3->__inner0 + 8);
00602a9e      xmm3[3] = *(uint32_t*)((char*)arg3->__inner0 + 0xc);
00602aa1      float xmm2[0x4];
00602aa1      xmm2[0] = arg2->x;
00602aa1      xmm2[1] = arg2->x;
00602aa1      xmm2[2] = arg2->x;
00602aa1      xmm2[3] = arg2->x;
00602aa5      float xmm2_1[0x4] = _mm_shuffle_ps(xmm2, xmm2, 0);
00602aa9      float xmm4[0x4];
00602aa9      xmm4[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
00602aa9      xmm4[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x14);
00602aa9      xmm4[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x18);
00602aa9      xmm4[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x1c);
00602aad      float xmm2_2[0x4] = _mm_mul_ps(xmm2_1, xmm3);
00602ab0      float xmm1[0x4];
00602ab0      xmm1[0] = arg2->y;
00602ab0      xmm1[1] = arg2->y;
00602ab0      xmm1[2] = arg2->y;
00602ab0      xmm1[3] = arg2->y;
00602ab5      float xmm1_1[0x4] = _mm_shuffle_ps(xmm1, xmm1, 0);
00602ab9      float xmm3_1[0x4];
00602ab9      xmm3_1[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
00602ab9      xmm3_1[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
00602ab9      xmm3_1[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
00602ab9      xmm3_1[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
00602abd      float xmm1_2[0x4] = _mm_mul_ps(xmm1_1, xmm4);
00602ac6      struct D3DXVECTOR4 xmm2_4 = _mm_add_ps(_mm_add_ps(xmm2_2, xmm3_1), xmm1_2);
00602ac9      arg1->x = xmm2_4.x;
00602ac9      arg1->y = xmm2_4.y;
00602ac9      arg1->z = xmm2_4.z;
00602ac9      arg1->w = xmm2_4.w;
00602ad0      return arg1;
00602a93  }


00602ad3  struct D3DXVECTOR2* __stdcall sse_D3DXVec2TransformCoord(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

00602ad3  {
00602ade      float xmm3[0x4];
00602ade      xmm3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
00602ade      xmm3[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
00602ade      xmm3[2] = *(uint32_t*)((char*)arg3->__inner0 + 8);
00602ade      xmm3[3] = *(uint32_t*)((char*)arg3->__inner0 + 0xc);
00602ae1      float xmm2[0x4];
00602ae1      xmm2[0] = arg2->x;
00602ae1      xmm2[1] = arg2->x;
00602ae1      xmm2[2] = arg2->x;
00602ae1      xmm2[3] = arg2->x;
00602ae5      float xmm2_1[0x4] = _mm_shuffle_ps(xmm2, xmm2, 0);
00602ae9      float xmm4[0x4];
00602ae9      xmm4[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
00602ae9      xmm4[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x14);
00602ae9      xmm4[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x18);
00602ae9      xmm4[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x1c);
00602aed      float xmm2_2[0x4] = _mm_mul_ps(xmm2_1, xmm3);
00602af0      float xmm1[0x4];
00602af0      xmm1[0] = arg2->y;
00602af0      xmm1[1] = arg2->y;
00602af0      xmm1[2] = arg2->y;
00602af0      xmm1[3] = arg2->y;
00602af5      float xmm1_1[0x4] = _mm_shuffle_ps(xmm1, xmm1, 0);
00602af9      float xmm3_1[0x4];
00602af9      xmm3_1[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
00602af9      xmm3_1[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
00602af9      xmm3_1[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
00602af9      xmm3_1[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
00602afd      float xmm1_2[0x4] = _mm_mul_ps(xmm1_1, xmm4);
00602b06      float xmm2_4[0x4] = _mm_add_ps(_mm_add_ps(xmm2_2, xmm3_1), xmm1_2);
00602b09      float xmm0[0x4] = _mm_rcp_ps(xmm2_4);
00602b0f      float xmm1_4[0x4] = _mm_mul_ps(xmm0, xmm0);
00602b18      float xmm0_2[0x4] = _mm_sub_ps(_mm_add_ps(xmm0, xmm0), _mm_mul_ps(xmm1_4, xmm2_4));
00602b1f      struct D3DXVECTOR2 xmm2_5 = _mm_mul_ps(xmm2_4, _mm_shuffle_ps(xmm0_2, xmm0_2, 0xff));
00602b22      arg1->x = xmm2_5.x;
00602b22      arg1->y = xmm2_5.y;
00602b29      return arg1;
00602ad3  }


00602b2c  struct D3DXVECTOR2* __stdcall sse_D3DXVec2TransformNormal(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXMATRIX const* arg3)

00602b2c  {
00602b37      float xmm2[0x4];
00602b37      xmm2[0] = arg2->x;
00602b37      xmm2[1] = arg2->x;
00602b37      xmm2[2] = arg2->x;
00602b37      xmm2[3] = arg2->x;
00602b3b      float xmm3[0x4];
00602b3b      xmm3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
00602b3b      xmm3[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
00602b3b      xmm3[2] = *(uint32_t*)((char*)arg3->__inner0 + 8);
00602b3b      xmm3[3] = *(uint32_t*)((char*)arg3->__inner0 + 0xc);
00602b3e      float xmm2_1[0x4] = _mm_shuffle_ps(xmm2, xmm2, 0);
00602b42      float xmm4[0x4];
00602b42      xmm4[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
00602b42      xmm4[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x14);
00602b42      xmm4[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x18);
00602b42      xmm4[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x1c);
00602b46      float xmm1[0x4];
00602b46      xmm1[0] = arg2->y;
00602b46      xmm1[1] = arg2->y;
00602b46      xmm1[2] = arg2->y;
00602b46      xmm1[3] = arg2->y;
00602b58      struct D3DXVECTOR2 xmm2_3 = _mm_add_ps(_mm_mul_ps(xmm2_1, xmm3), _mm_mul_ps(_mm_shuffle_ps(xmm1, xmm1, 0), xmm4));
00602b5b      arg1->x = xmm2_3.x;
00602b5b      arg1->y = xmm2_3.y;
00602b62      return arg1;
00602b2c  }


00602b65  struct D3DXVECTOR3* __stdcall sse_D3DXVec3Normalize(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2)

00602b65  {
00602b6d      float x = arg2->x;
00602b71      float y = arg2->y;
00602b76      float z = arg2->z;
00602b94      float xmm0_2 = (((x * x) + (y * y)) + (z * z));
00602b94      
00602ba2      if (xmm0_2 >= 1.42108547e-14f)
00602ba2      {
00602bb1          int32_t xmm6;
00602bb1          float xmm6_1 = _mm_rsqrt_ss(xmm6, xmm0_2);
00602bd4          float xmm1_2 = ((3f - ((xmm6_1 * xmm0_2) * xmm6_1)) * (xmm6_1 * 0.5f));
00602be4          arg1->x = (x * xmm1_2);
00602be8          arg1->y = (y * xmm1_2);
00602bed          arg1->z = (z * xmm1_2);
00602ba2      }
00602ba2      else
00602ba2      {
00602ba6          arg1->x = 0;
00602ba8          arg1->y = 0f;
00602bab          arg1->z = 0f;
00602ba2      }
00602ba2      
00602bf6      return arg1;
00602b65  }

00602bb0                                                  90                                                               .

00602bf9  struct D3DXPLANE* __stdcall sse_D3DXPlaneNormalize(struct D3DXPLANE* arg1, struct D3DXPLANE const* arg2)

00602bf9  {
00602c01      float a = arg2->a;
00602c05      float b = arg2->b;
00602c0a      float c = arg2->c;
00602c28      float xmm0_2 = (((a * a) + (b * b)) + (c * c));
00602c28      
00602c36      if (xmm0_2 >= 1.42108547e-14f)
00602c36      {
00602c49          int32_t xmm6;
00602c49          float xmm6_1 = _mm_rsqrt_ss(xmm6, xmm0_2);
00602c6c          float xmm1_2 = ((3f - ((xmm6_1 * xmm0_2) * xmm6_1)) * (xmm6_1 * 0.5f));
00602c7c          float xmm1_3 = (xmm1_2 * arg2->d);
00602c81          arg1->a = (a * xmm1_2);
00602c85          arg1->b = (b * xmm1_2);
00602c8a          arg1->c = (c * xmm1_2);
00602c8f          arg1->d = xmm1_3;
00602c36      }
00602c36      else
00602c36      {
00602c3a          arg1->a = 0;
00602c3c          arg1->b = 0f;
00602c3f          arg1->c = 0f;
00602c42          arg1->d = 0f;
00602c36      }
00602c36      
00602c98      return arg1;
00602bf9  }

00602c47                       8b ff                                                                              ..

00602c9b  struct D3DXVECTOR4* __stdcall sse_D3DXVec4Cross(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4)

00602c9b  {
00602ca0      int32_t ecx;
00602ca0      int32_t var_8 = ecx;
00602cb4      int64_t xmm4;
00602cb4      xmm4 = arg2->x;
00602cb4      *(uint32_t*)((char*)xmm4)[4] = arg2->y;
00602cb7      float xmm4_1[0x4] = (xmm4 | (arg2->z*(int32_t*)((char*)arg2 + 8) << 0x40));
00602cc2      int64_t xmm0;
00602cc2      xmm0 = arg3->x;
00602cc2      *(uint32_t*)((char*)xmm0)[4] = arg3->y;
00602cc5      float xmm0_1[0x4] = (xmm0 | (arg3->z*(int32_t*)((char*)arg3 + 8) << 0x40));
00602cd0      int64_t xmm2;
00602cd0      xmm2 = arg4->x;
00602cd0      *(uint32_t*)((char*)xmm2)[4] = arg4->y;
00602cd3      float xmm2_1[0x4] = (xmm2 | (arg4->z*(int32_t*)((char*)arg4 + 8) << 0x40));
00602cda      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0x39);
00602ce1      float xmm1_1[0x4] = _mm_mul_ps(xmm0_2, xmm2_1);
00602ce7      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0x4e);
00602ceb      float xmm3_1[0x4] = _mm_mul_ps(xmm0_2, xmm2_2);
00602cf2      float xmm0_3[0x4] = _mm_mul_ps(xmm0_2, _mm_shuffle_ps(xmm2_2, xmm2_2, 0x39));
00602cf8      float xmm2_5[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0x4e);
00602d07      float xmm5_2[0x4] = _mm_sub_ps(_mm_shuffle_ps(xmm3_1, xmm3_1, 0x39), xmm2_5);
00602d11      float xmm2_8[0x4] = __subps_xmmps_memps(_mm_shuffle_ps(xmm0_3, xmm0_3, 0x4e), xmm0_3);
00602d18      float xmm6_1[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0x39);
00602d1f      float xmm0_5[0x4] = _mm_shuffle_ps(xmm4_1, xmm4_1, 0x39);
00602d23      int128_t xmm4_2 = data_827e40;
00602d2d      float xmm1_3[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0x39);
00602d37      float xmm3_3[0x4] = _mm_shuffle_ps(xmm1_3, xmm1_3, 0x39);
00602d3b      float xmm0_6[0x4] = _mm_mul_ps(xmm0_5, xmm5_2);
00602d3e      float xmm7_1[0x4] = _mm_sub_ps(xmm3_1, xmm6_1);
00602d4d      struct D3DXVECTOR4 xmm0_9 = (_mm_add_ps(_mm_add_ps(xmm0_6, _mm_mul_ps(xmm1_3, xmm2_8)), _mm_mul_ps(xmm3_3, xmm7_1)) ^ xmm4_2);
00602d50      arg1->x = xmm0_9.x;
00602d50      arg1->y = xmm0_9.y;
00602d50      arg1->z = xmm0_9.z;
00602d50      arg1->w = xmm0_9.w;
00602d59      return arg1;
00602c9b  }


00602d5c  struct D3DXVECTOR4* __stdcall sse_D3DXVec4Normalize(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2)

00602d5c  {
00602d64      float x = arg2->x;
00602d68      float y = arg2->y;
00602d6d      float z = arg2->z;
00602d72      float w = arg2->w;
00602d8b      float xmm5_1 = (y * y);
00602d9f      float xmm4_3 = (((x * x) + xmm5_1) + ((z * z) + (w * w)));
00602da3      float xmm5_2 = _mm_rsqrt_ss(xmm5_1, xmm4_3);
00602dc7      float xmm5_7 = (((data_827e60 - (xmm4_3 * (xmm5_2 * xmm5_2))) * data_827e50) * xmm5_2);
00602dd6      arg1->x = (x * xmm5_7);
00602dde      arg1->y = (y * xmm5_7);
00602de7      arg1->z = (z * xmm5_7);
00602dec      arg1->w = (w * xmm5_7);
00602df5      return arg1;
00602d5c  }


00602df8  struct D3DXVECTOR3* __stdcall sse_D3DXVec3CatmullRom(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, float arg6)

00602df8  {
00602dfd      float xmm0[0x4] = arg6;
00602e06      float xmm1_1[0x4] = (xmm0 * xmm0);
00602e0e      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
00602e12      float xmm2_1[0x4] = (xmm0 * xmm1_1);
00602e16      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
00602e1a      float xmm0_2[0x4] = __mulps_xmmps_memps(xmm0_1, data_827d50);
00602e21      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00602e25      float xmm1_3[0x4] = __mulps_xmmps_memps(xmm1_2, data_827d40);
00602e2c      float xmm0_3[0x4] = __addps_xmmps_memps(xmm0_2, data_827d60);
00602e33      float xmm2_3[0x4] = __mulps_xmmps_memps(xmm2_2, data_827d30);
00602e3d      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), xmm2_3);
00602e4c      float xmm1_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0x55);
00602e53      float xmm2_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xaa);
00602e5a      float xmm3_1[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xff);
00602e5e      float xmm0_6[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0);
00602e9a      int64_t xmm4_5 = _mm_add_ps(_mm_add_ps(_mm_add_ps(_mm_mul_ps((arg2->z | (arg2->x << 0x40)), xmm0_6), _mm_mul_ps((arg3->z | (arg3->x << 0x40)), xmm1_5)), _mm_mul_ps((arg4->z | (arg4->x << 0x40)), xmm2_5)), _mm_mul_ps((arg5->z | (arg5->x << 0x40)), xmm3_1));
00602e9d      arg1->x = (arg1->x | (xmm4_5 << 0x40));
00602ea0      arg1->z = xmm4_5;
00602ea9      return arg1;
00602df8  }


00602eac  struct D3DXVECTOR2* __stdcall sse_D3DXVec2CatmullRom(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6)

00602eac  {
00602eb1      float xmm0[0x4] = arg6;
00602eba      float xmm1_1[0x4] = (xmm0 * xmm0);
00602ec2      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
00602ec6      float xmm2_1[0x4] = (xmm0 * xmm1_1);
00602eca      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
00602ece      float xmm0_2[0x4] = __mulps_xmmps_memps(xmm0_1, data_827d50);
00602ed5      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00602ed9      float xmm1_3[0x4] = __mulps_xmmps_memps(xmm1_2, data_827d40);
00602ee0      float xmm0_3[0x4] = __addps_xmmps_memps(xmm0_2, data_827d60);
00602ee7      float xmm2_3[0x4] = __mulps_xmmps_memps(xmm2_2, data_827d30);
00602ef1      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), xmm2_3);
00602f00      float xmm2_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xfa);
00602f04      float xmm0_6[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0x50);
00602f08      int64_t xmm4;
00602f08      xmm4 = arg2->x;
00602f08      *(uint32_t*)((char*)xmm4)[4] = arg2->y;
00602f11      float xmm4_2[0x4] = _mm_mul_ps((xmm4 | (arg3->x << 0x40)), xmm0_6);
00602f14      int64_t xmm6;
00602f14      xmm6 = arg4->x;
00602f14      *(uint32_t*)((char*)xmm6)[4] = arg4->y;
00602f1d      float xmm4_3[0x4] = _mm_add_ps(xmm4_2, _mm_mul_ps((xmm6 | (arg5->x << 0x40)), xmm2_5));
00602f23      struct D3DXVECTOR2 xmm4_4 = _mm_add_ps(xmm4_3, (xmm4_3 >> 0x40));
00602f29      arg1->x = xmm4_4.x;
00602f29      arg1->y = xmm4_4.y;
00602f30      return arg1;
00602eac  }


00602f33  struct D3DXVECTOR4* __stdcall sse_D3DXVec4CatmullRom(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, struct D3DXVECTOR4 const* arg5, float arg6)

00602f33  {
00602f38      float xmm0[0x4] = arg6;
00602f41      float xmm1_1[0x4] = (xmm0 * xmm0);
00602f49      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
00602f4d      float xmm2_1[0x4] = (xmm0 * xmm1_1);
00602f51      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
00602f55      float xmm0_2[0x4] = __mulps_xmmps_memps(xmm0_1, data_827d50);
00602f5c      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00602f60      float xmm1_3[0x4] = __mulps_xmmps_memps(xmm1_2, data_827d40);
00602f67      float xmm0_3[0x4] = __addps_xmmps_memps(xmm0_2, data_827d60);
00602f6e      float xmm2_3[0x4] = __mulps_xmmps_memps(xmm2_2, data_827d30);
00602f78      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), xmm2_3);
00602f8a      float xmm1_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0x55);
00602f91      float xmm2_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xaa);
00602f98      float xmm3_1[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xff);
00602f9f      float xmm0_6[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0);
00602fa3      float xmm4[0x4];
00602fa3      xmm4[0] = arg2->x;
00602fa3      xmm4[1] = arg2->y;
00602fa3      xmm4[2] = arg2->z;
00602fa3      xmm4[3] = arg2->w;
00602fa9      float xmm4_1[0x4] = _mm_mul_ps(xmm4, xmm0_6);
00602faf      float xmm5[0x4];
00602faf      xmm5[0] = arg3->x;
00602faf      xmm5[1] = arg3->y;
00602faf      xmm5[2] = arg3->z;
00602faf      xmm5[3] = arg3->w;
00602fb2      float xmm5_1[0x4] = _mm_mul_ps(xmm5, xmm1_5);
00602fb8      float xmm6[0x4];
00602fb8      xmm6[0] = arg4->x;
00602fb8      xmm6[1] = arg4->y;
00602fb8      xmm6[2] = arg4->z;
00602fb8      xmm6[3] = arg4->w;
00602fd0      *(uint128_t*)arg1 = _mm_add_ps(_mm_add_ps(_mm_add_ps(xmm4_1, xmm5_1), _mm_mul_ps(xmm6, xmm2_5)), _mm_mul_ps(*(uint128_t*)arg5, xmm3_1));
00602fd7      return arg1;
00602f33  }


00602fda  struct D3DXVECTOR3* __stdcall sse_D3DXVec3Hermite(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, float arg6)

00602fda  {
00602fdf      float xmm0[0x4] = arg6;
00602fe8      float xmm1_1[0x4] = (xmm0 * xmm0);
00602ff0      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
00602ff4      float xmm2_1[0x4] = (xmm0 * xmm1_1);
00602ff8      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
00602ffc      float xmm0_2 = __mulps_xmmps_memps(xmm0_1, data_827d10);
00603003      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00603007      float xmm1_3[0x4] = __mulps_xmmps_memps(xmm1_2, data_827d00);
0060300e      float xmm0_3[0x4] = (xmm0_2 + data_827d20);
00603016      float xmm2_3[0x4] = __mulps_xmmps_memps(xmm2_2, data_827cf0);
00603020      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), xmm2_3);
0060302f      float xmm1_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0x55);
00603036      float xmm2_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xaa);
0060303d      float xmm3_1[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xff);
00603041      float xmm0_6[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0);
0060307d      int64_t xmm4_5 = _mm_add_ps(_mm_add_ps(_mm_add_ps(_mm_mul_ps((arg2->z | (arg2->x << 0x40)), xmm0_6), _mm_mul_ps((arg3->z | (arg3->x << 0x40)), xmm1_5)), _mm_mul_ps((arg4->z | (arg4->x << 0x40)), xmm2_5)), _mm_mul_ps((arg5->z | (arg5->x << 0x40)), xmm3_1));
00603080      arg1->x = (arg1->x | (xmm4_5 << 0x40));
00603083      arg1->z = xmm4_5;
0060308c      return arg1;
00602fda  }


0060308f  struct D3DXVECTOR4* __stdcall sse_D3DXVec4Hermite(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, struct D3DXVECTOR4 const* arg5, float arg6)

0060308f  {
00603094      float xmm0[0x4] = arg6;
0060309d      float xmm1_1[0x4] = (xmm0 * xmm0);
006030a5      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
006030a9      float xmm2_1[0x4] = (xmm0 * xmm1_1);
006030ad      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
006030b1      float xmm0_2 = __mulps_xmmps_memps(xmm0_1, data_827d10);
006030b8      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
006030bc      float xmm1_3[0x4] = __mulps_xmmps_memps(xmm1_2, data_827d00);
006030c3      float xmm0_3[0x4] = (xmm0_2 + data_827d20);
006030cb      float xmm2_3[0x4] = __mulps_xmmps_memps(xmm2_2, data_827cf0);
006030d5      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), xmm2_3);
006030de      float xmm1_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0x55);
006030e8      float xmm2_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xaa);
006030ef      float xmm3_1[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xff);
006030f6      float xmm0_6[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0);
006030fa      float xmm4[0x4];
006030fa      xmm4[0] = arg2->x;
006030fa      xmm4[1] = arg2->y;
006030fa      xmm4[2] = arg2->z;
006030fa      xmm4[3] = arg2->w;
00603100      float xmm4_1[0x4] = _mm_mul_ps(xmm4, xmm0_6);
00603103      float xmm5[0x4];
00603103      xmm5[0] = arg3->x;
00603103      xmm5[1] = arg3->y;
00603103      xmm5[2] = arg3->z;
00603103      xmm5[3] = arg3->w;
00603106      float xmm5_1[0x4] = _mm_mul_ps(xmm5, xmm1_5);
00603109      float xmm6[0x4];
00603109      xmm6[0] = arg4->x;
00603109      xmm6[1] = arg4->y;
00603109      xmm6[2] = arg4->z;
00603109      xmm6[3] = arg4->w;
00603112      float xmm4_3[0x4] = _mm_add_ps(_mm_add_ps(xmm4_1, xmm5_1), _mm_mul_ps(xmm6, xmm2_5));
00603115      float xmm7[0x4];
00603115      xmm7[0] = arg5->x;
00603115      xmm7[1] = arg5->y;
00603115      xmm7[2] = arg5->z;
00603115      xmm7[3] = arg5->w;
0060311e      float xmm4_4[0x4] = _mm_add_ps(xmm4_3, _mm_mul_ps(xmm7, xmm3_1));
00603121      arg1->x = xmm4_4[0];
00603121      arg1->y = xmm4_4[1];
00603121      arg1->z = xmm4_4[2];
00603121      arg1->w = xmm4_4[3];
00603128      return arg1;
0060308f  }


0060312b  struct D3DXVECTOR2* __stdcall sse_D3DXVec2Hermite(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6)

0060312b  {
00603130      float xmm0[0x4] = arg6;
00603139      float xmm1_1[0x4] = (xmm0 * xmm0);
00603141      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
00603145      float xmm2_1[0x4] = (xmm0 * xmm1_1);
00603149      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
0060314d      float xmm0_2 = __mulps_xmmps_memps(xmm0_1, data_827d10);
00603154      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00603158      float xmm1_3[0x4] = __mulps_xmmps_memps(xmm1_2, data_827d00);
0060315f      float xmm0_3[0x4] = (xmm0_2 + data_827d20);
00603167      float xmm2_3[0x4] = __mulps_xmmps_memps(xmm2_2, data_827cf0);
00603171      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), xmm2_3);
0060317a      float xmm2_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0xfa);
0060317e      float xmm0_6[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0x50);
00603188      int64_t xmm4;
00603188      xmm4 = arg2->x;
00603188      *(uint32_t*)((char*)xmm4)[4] = arg2->y;
00603191      float xmm4_2[0x4] = _mm_mul_ps((xmm4 | (arg3->x << 0x40)), xmm0_6);
00603194      int64_t xmm6;
00603194      xmm6 = arg4->x;
00603194      *(uint32_t*)((char*)xmm6)[4] = arg4->y;
006031a0      float xmm4_3[0x4] = _mm_add_ps(xmm4_2, _mm_mul_ps((xmm6 | (arg5->x << 0x40)), xmm2_5));
006031a6      struct D3DXVECTOR2 xmm4_4 = _mm_add_ps(xmm4_3, (xmm4_3 >> 0x40));
006031a9      arg1->x = xmm4_4.x;
006031a9      arg1->y = xmm4_4.y;
006031b0      return arg1;
0060312b  }


006031b3  struct D3DXVECTOR3* __stdcall sse_D3DXVec3BaryCentric(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, float arg5, float arg6)

006031b3  {
006031b8      float xmm0[0x4] = arg5;
006031c0      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
006031cc      float xmm2_1[0x4] = (arg2->z | (arg2->x << 0x40));
006031cf      float xmm1[0x4] = arg6;
006031d9      float xmm3_1[0x4] = (arg3->z | (arg3->x << 0x40));
006031dc      float xmm1_1[0x4] = _mm_shuffle_ps(xmm1, xmm1, 0);
006031e3      float xmm3_2[0x4] = _mm_sub_ps(xmm3_1, xmm2_1);
006031eb      float xmm4_1[0x4] = (arg4->z | (arg4->x << 0x40));
006031ee      float xmm3_3[0x4] = _mm_mul_ps(xmm3_2, xmm0_1);
006031f1      float xmm4_2[0x4] = _mm_sub_ps(xmm4_1, xmm2_1);
006031fd      int64_t xmm3_5 = _mm_add_ps(_mm_add_ps(xmm3_3, xmm2_1), _mm_mul_ps(xmm4_2, xmm1_1));
00603200      arg1->z = xmm3_5;
00603205      arg1->x = (arg1->x | (xmm3_5 << 0x40));
0060320c      return arg1;
006031b3  }


0060320f  struct D3DXVECTOR4* __stdcall sse_D3DXVec4BaryCentric(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, float arg5, float arg6)

0060320f  {
00603214      float xmm0[0x4] = arg5;
0060321c      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
00603223      float xmm2[0x4];
00603223      xmm2[0] = arg2->x;
00603223      xmm2[1] = arg2->y;
00603223      xmm2[2] = arg2->z;
00603223      xmm2[3] = arg2->w;
00603226      float xmm1[0x4] = arg6;
0060322b      float xmm3[0x4];
0060322b      xmm3[0] = arg3->x;
0060322b      xmm3[1] = arg3->y;
0060322b      xmm3[2] = arg3->z;
0060322b      xmm3[3] = arg3->w;
0060322e      float xmm1_1[0x4] = _mm_shuffle_ps(xmm1, xmm1, 0);
00603235      float xmm3_1[0x4] = _mm_sub_ps(xmm3, xmm2);
00603238      float xmm4[0x4];
00603238      xmm4[0] = arg4->x;
00603238      xmm4[1] = arg4->y;
00603238      xmm4[2] = arg4->z;
00603238      xmm4[3] = arg4->w;
0060323b      float xmm3_2[0x4] = _mm_mul_ps(xmm3_1, xmm0_1);
0060323e      float xmm4_1[0x4] = _mm_sub_ps(xmm4, xmm2);
0060324a      float xmm3_4[0x4] = _mm_add_ps(_mm_add_ps(xmm3_2, xmm2), _mm_mul_ps(xmm4_1, xmm1_1));
0060324d      arg1->x = xmm3_4[0];
0060324d      arg1->y = xmm3_4[1];
0060324d      arg1->z = xmm3_4[2];
0060324d      arg1->w = xmm3_4[3];
00603254      return arg1;
0060320f  }


00603257  struct D3DXVECTOR2* __stdcall sse_D3DXVec2BaryCentric(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, float arg5, float arg6)

00603257  {
0060325f      float xmm0[0x4] = arg5;
00603267      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0);
00603271      float xmm2[0x4] = (0 | (arg2->x << 0x40));
00603274      float xmm1[0x4] = arg6;
00603279      float xmm3[0x4] = (0 | (arg3->x << 0x40));
0060327f      float xmm1_1[0x4] = _mm_shuffle_ps(xmm1, xmm1, 0);
00603286      float xmm3_1[0x4] = _mm_sub_ps(xmm3, xmm2);
00603289      float xmm4[0x4] = (0 | (arg4->x << 0x40));
0060328c      float xmm3_2[0x4] = _mm_mul_ps(xmm3_1, xmm0_1);
0060328f      float xmm4_1[0x4] = _mm_sub_ps(xmm4, xmm2);
0060329b      int64_t xmm3_4 = _mm_add_ps(_mm_add_ps(xmm3_2, xmm2), _mm_mul_ps(xmm4_1, xmm1_1));
0060329e      arg1->x = (arg1->x | (xmm3_4 << 0x40));
006032a5      return arg1;
00603257  }


006032a8  struct D3DXVECTOR3* __stdcall sse_D3DXPlaneIntersectLine(struct D3DXVECTOR3* arg1, struct D3DXPLANE const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

006032a8  {
006032b6      float xmm0[0x4];
006032b6      xmm0[0] = arg2->a;
006032b6      xmm0[1] = arg2->b;
006032b6      xmm0[2] = arg2->c;
006032b6      xmm0[3] = arg2->d;
006032c4      float xmm1_1[0x4] = (arg3->z | (arg3->x << 0x40));
006032c7      int64_t z = arg4->z;
006032cf      float xmm0_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0x4e);
006032d6      float xmm4_1 = _mm_shuffle_ps(xmm0, xmm0, 0xff);
006032da      float xmm2[0x4] = (z | (arg4->x << 0x40));
006032dd      float xmm3_1[0x4] = _mm_mul_ps(xmm1_1, xmm0_1);
006032e0      float xmm0_2[0x4] = _mm_mul_ps(xmm0_1, xmm2);
006032e3      uint128_t xmm5 = (xmm3_1 >> 0x40);
006032e6      uint128_t xmm6 = (xmm0_2 >> 0x40);
006032e9      float xmm3_2[0x4] = _mm_add_ps(xmm3_1, xmm5);
006032ec      float xmm0_3[0x4] = _mm_add_ps(xmm0_2, xmm6);
006032f7      float xmm3_3 = (xmm3_2 + _mm_shuffle_ps(xmm5, xmm3_2, 0x55));
006032fb      float xmm0_4 = (xmm0_3 + _mm_shuffle_ps(xmm6, xmm0_3, 0x55));
00603303      float xmm5_3 = (xmm3_3 - xmm0_4);
00603303      
00603312      if (xmm5_3 == data_8f326c)
0060334a          return nullptr;
0060334a      
00603314      float xmm0_5 = _mm_rcp_ss(xmm0_4, xmm5_3);
0060332c      float xmm3_5[0x4] = ((xmm3_3 + xmm4_1) * ((xmm0_5 + xmm0_5) - ((xmm5_3 * xmm0_5) * xmm0_5)));
0060333d      int64_t xmm1_2 = _mm_add_ps(xmm1_1, _mm_mul_ps(_mm_shuffle_ps(xmm3_5, xmm3_5, 0), _mm_sub_ps(xmm2, xmm1_1)));
00603340      arg1->x = (arg1->x | (xmm1_2 << 0x40));
00603343      arg1->z = xmm1_2;
00603355      return arg1;
006032a8  }


00603358  struct D3DXPLANE* __stdcall sse_D3DXPlaneFromPoints(struct D3DXPLANE* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

00603358  {
00603366      int32_t ebp;
00603366      int32_t var_c = ebp;
00603367      int32_t var_10 = ebp;
0060336b      void* const __return_addr_1 = __return_addr;
00603384      float xmm0_1[0x4] = (arg2->z | (arg2->x << 0x40));
00603395      float xmm2_1[0x4] = (arg3->z | (arg3->x << 0x40));
0060339b      float xmm0_2[0x4] = _mm_sub_ps(xmm0_1, (arg4->z | (arg4->x << 0x40)));
006033a1      float xmm0_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm0_2, 0x78);
006033a5      float xmm1_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm0_2, 0x63);
006033ac      float xmm3_1[0x4] = _mm_sub_ps(xmm0_1, xmm2_1);
006033af      int32_t xmm2_2 = ((int32_t)(*(uint128_t*)data_7f47e0));
006033b9      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0x63);
006033bd      float xmm5_1[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0x78);
006033c1      float xmm0_4[0x4] = _mm_mul_ps(xmm0_3, xmm3_2);
006033c4      float xmm5_2[0x4] = _mm_mul_ps(xmm5_1, xmm1_3);
006033c7      int32_t xmm1_4 = ((int32_t)(*(uint128_t*)data_7f47f0));
006033ce      float xmm0_5[0x4] = _mm_sub_ps(xmm0_4, xmm5_2);
006033d1      float xmm4_1[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0xe);
006033d8      float xmm0_6[0x4] = _mm_mul_ps(xmm0_5, xmm0_5);
006033e1      float xmm5_4[0x4] = _mm_add_ps(xmm0_6, (xmm0_6 >> 0x40));
006033eb      float xmm0_9 = (xmm5_4[0] + _mm_shuffle_ps(xmm5_4, xmm5_4, 1));
006033f2      float xmm0_10 = _mm_rsqrt_ss(xmm0_9, xmm0_9);
00603409      float xmm1_6[0x4] = ((xmm1_4 * xmm0_10) * (xmm2_2 - ((xmm0_9 * xmm0_10) * xmm0_10)));
00603411      float xmm3_4[0x4] = _mm_mul_ps(xmm0_5, _mm_shuffle_ps(xmm1_6, xmm1_6, 0));
00603414      float xmm4_2[0x4] = _mm_mul_ps(xmm4_1, xmm3_4);
00603417      arg1->a = xmm3_4[0];
00603417      arg1->b = xmm3_4[1];
00603417      arg1->c = xmm3_4[2];
00603417      arg1->d = xmm3_4[3];
00603433      arg1->d = ((xmm4_2[0] + (((int32_t)(xmm4_2 >> 0x40)) + _mm_shuffle_ps(xmm4_2, xmm4_2, 0x55))) ^ ((int32_t)data_827d70));
0060343e      return arg1;
00603358  }

00603441     8d 49 00                                                                                       .I.

00603444  struct _D3DMATRIX* __stdcall sse_D3DXMatrixShadow(struct _D3DMATRIX* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXPLANE const* arg3)

00603444  {
0060344d      float xmm1[0x4];
0060344d      xmm1[0] = arg3->a;
0060344d      xmm1[1] = arg3->b;
0060344d      xmm1[2] = arg3->c;
0060344d      xmm1[3] = arg3->d;
00603459      uint32_t xmm2_1[0x4] = __andps_xmmxud_memxud(xmm1, data_827eb0);
0060345d      float xmm2_2[0x4] = _mm_mul_ps(xmm2_1, xmm2_1);
00603463      float xmm3_1[0x4] = _mm_add_ps((xmm2_2 >> 0x40), xmm2_2);
0060346d      float xmm2_5[0x4] = (_mm_shuffle_ps(xmm3_1, xmm3_1, 1) + xmm3_1);
0060346d      
00603477      if (!(xmm2_5 == 0))
00603477      {
00603479          float xmm6_1 = xmm2_5[0];
0060347c          float xmm2_6 = _mm_rsqrt_ss(xmm2_5, xmm6_1);
0060349f          float xmm2_8[0x4] = ((xmm2_6 * 0.5f) * (3f - ((xmm6_1 * xmm2_6) * xmm2_6)));
006034a7          xmm2_5 = _mm_mul_ps(_mm_shuffle_ps(xmm2_8, xmm2_8, 0), xmm1);
00603477      }
00603477      
006034ad      float xmm4[0x4];
006034ad      xmm4[0] = arg2->x;
006034ad      xmm4[1] = arg2->y;
006034ad      xmm4[2] = arg2->z;
006034ad      xmm4[3] = arg2->w;
006034b3      float xmm5_1[0x4] = _mm_mul_ps(xmm4, xmm2_5);
006034b9      float xmm5_2[0x4] = _mm_add_ps(xmm5_1, (xmm5_1 >> 0x40));
006034c3      float xmm5_3[0x4] = (xmm5_2 + _mm_shuffle_ps(xmm5_2, xmm5_2, 1));
006034c7      float xmm5_4[0x4] = _mm_shuffle_ps(xmm5_3, xmm5_3, 0);
006034cb      float xmm2_10[0x4] = (xmm2_5 ^ data_827e70);
006034d7      float xmm0_1[0x4] = _mm_shuffle_ps(xmm2_10, xmm2_10, 0);
006034db      float xmm1_2[0x4] = _mm_shuffle_ps(xmm2_10, xmm2_10, 0x55);
006034df      float xmm2_11[0x4] = _mm_shuffle_ps(xmm2_10, xmm2_10, 0xaa);
006034e3      float xmm3_7[0x4] = _mm_shuffle_ps(xmm2_10, xmm2_10, 0xff);
006034e7      float xmm0_2 = _mm_mul_ps(xmm0_1, xmm4);
006034ea      float xmm1_3[0x4] = _mm_mul_ps(xmm1_2, xmm4);
006034ed      float xmm2_12[0x4] = _mm_mul_ps(xmm2_11, xmm4);
006034f0      float xmm3_8[0x4] = _mm_mul_ps(xmm3_7, xmm4);
006034f3      int64_t xmm0_3 = (xmm0_2 + xmm5_4);
006034fd      uint32_t xmm5_5[0x4] = __andps_xmmxud_memxud(xmm5_4, data_827e80);
00603501      float xmm6_5[0x4] = __andps_xmmxud_memxud(xmm5_4, data_827e90);
00603505      float xmm7_1[0x4] = __andps_xmmxud_memxud(xmm5_4, data_827ea0);
00603509      int64_t xmm1_4 = _mm_add_ps(xmm1_3, xmm5_5);
0060350c      int64_t xmm2_13 = _mm_add_ps(xmm2_12, xmm6_5);
0060350f      int64_t xmm3_9 = _mm_add_ps(xmm3_8, xmm7_1);
00603515      *(uint64_t*)((char*)arg1->__inner0 + 0) = xmm0_3;
00603518      *(uint128_t*)((char*)arg1->__inner0 + 8) = (*(uint64_t*)((char*)arg1->__inner0 + 8) | (xmm0_3 << 0x40));
0060351c      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = xmm1_4;
00603520      *(uint128_t*)((char*)arg1->__inner0 + 0x18) = (*(uint64_t*)((char*)arg1->__inner0 + 0x18) | (xmm1_4 << 0x40));
00603524      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = xmm2_13;
00603528      *(uint128_t*)((char*)arg1->__inner0 + 0x28) = (*(uint64_t*)((char*)arg1->__inner0 + 0x28) | (xmm2_13 << 0x40));
0060352c      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = xmm3_9;
00603530      arg1->__inner0*(int32_t*)((char*)arg1 + 0x38) = (*(uint64_t*)((char*)arg1->__inner0 + 0x38) | (xmm3_9 << 0x40));
00603539      return arg1;
00603444  }


0060353c  struct D3DXMATRIX* __stdcall sse_D3DXMatrixReflect(struct D3DXMATRIX* arg1, struct D3DXPLANE const* arg2)

0060353c  {
00603541      int32_t ebp;
00603541      int32_t var_8 = ebp;
00603542      int32_t var_c = ebp;
00603546      void* const __return_addr_1 = __return_addr;
00603559      uint32_t xmm0[0x4];
00603559      xmm0[0] = arg2->a;
00603559      xmm0[1] = arg2->b;
00603563      uint32_t xmm1_1[0x4] = _mm_and_ps(data_827d80, xmm0);
00603566      float xmm1_2[0x4] = _mm_mul_ps(xmm1_1, xmm1_1);
0060357f      float xmm4_1[0x4] = _mm_add_ps(xmm1_2, (xmm1_2 >> 0x40));
00603589      float xmm1_5 = (xmm4_1[0] + _mm_shuffle_ps(xmm4_1, xmm4_1, 1));
0060358d      int128_t xmm4_3 = data_827d90;
00603597      float xmm1_6 = _mm_rsqrt_ss(xmm1_5, xmm1_5);
006035ab      float xmm3_1[0x4] = ((0.5f * xmm1_6) * (3f - ((xmm1_5 * xmm1_6) * xmm1_6)));
006035b3      float xmm0_1[0x4] = _mm_mul_ps(xmm0, _mm_shuffle_ps(xmm3_1, xmm3_1, 0));
006035b6      float xmm4_4[0x4] = _mm_mul_ps(xmm4_3, xmm0_1);
006035c3      float xmm0_4[0x4] = __addps_xmmps_memps(_mm_mul_ps(_mm_shuffle_ps(xmm0_1, xmm0_1, 0), xmm4_4), data_827dd0);
006035d4      float xmm1_10[0x4] = __addps_xmmps_memps(_mm_mul_ps(_mm_shuffle_ps(xmm0_1, xmm0_1, 0xff), xmm4_4), data_827da0);
006035e5      float xmm2_4[0x4] = __addps_xmmps_memps(_mm_mul_ps(_mm_shuffle_ps(xmm0_1, xmm0_1, 0xaa), xmm4_4), data_827db0);
006035f3      float xmm4_6[0x4] = __addps_xmmps_memps(_mm_mul_ps(xmm4_4, _mm_shuffle_ps(xmm0_1, xmm0_1, 0x55)), data_827dc0);
006035fa      *(uint32_t*)((char*)arg1->__inner0 + 0) = xmm0_4[0];
006035fa      *(uint32_t*)((char*)arg1->__inner0 + 4) = xmm0_4[1];
006035fa      *(uint32_t*)((char*)arg1->__inner0 + 8) = xmm0_4[2];
006035fa      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = xmm0_4[3];
006035fd      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = xmm4_6[0];
006035fd      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = xmm4_6[1];
006035fd      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = xmm4_6[2];
006035fd      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = xmm4_6[3];
00603601      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = xmm2_4[0];
00603601      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = xmm2_4[1];
00603601      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = xmm2_4[2];
00603601      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = xmm2_4[3];
00603605      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = xmm1_10[0];
00603605      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = xmm1_10[1];
00603605      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = xmm1_10[2];
00603605      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = xmm1_10[3];
0060360f      return arg1;
0060353c  }

00603612                                                        8b ff                                                        ..

00603614  void __stdcall sse_D3DXPSGPTessellateNPatch(struct D3DXVECTOR3* arg1, struct D3DXVECTOR2* arg2, unsigned long arg3, float* arg4, float* arg5, float* arg6, float* arg7, unsigned long arg8)

00603614  {
00603622      int32_t ebp;
00603622      int32_t var_c = ebp;
00603623      int32_t var_10 = ebp;
00603627      void* const __return_addr_1 = __return_addr;
00603633      int32_t edi;
00603633      int32_t var_2d8 = edi;
00603641      int128_t xmm0 = arg5[2];
0060364f      int128_t var_2d0 = xmm0;
00603656      float xmm0_1[0x4] = (xmm0 | (*(uint64_t*)arg5 << 0x40));
0060366b      float xmm1_1[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0x4e);
0060366f      float* var_a0 = arg4;
0060367f      struct D3DXVECTOR2* i_1 = arg2;
00603688      int128_t xmm0_2 = arg6[2];
0060368d      int128_t var_270 = xmm0_2;
00603694      float xmm0_3[0x4] = (xmm0_2 | (*(uint64_t*)arg6 << 0x40));
00603697      float xmm0_4[0x4] = _mm_shuffle_ps(xmm0_3, xmm0_3, 0x4e);
006036a2      int128_t xmm0_5 = arg7[2];
006036a7      int128_t var_240 = xmm0_5;
006036ae      float xmm0_6[0x4] = (xmm0_5 | (*(uint64_t*)arg7 << 0x40));
006036b1      float xmm0_7[0x4] = _mm_shuffle_ps(xmm0_6, xmm0_6, 0x4e);
006036bc      int128_t z = arg1->z;
006036c1      int128_t z_1 = z;
006036c8      float xmm0_8[0x4] = (z | (arg1->x << 0x40));
006036ce      float xmm1_3[0x4] = _mm_shuffle_ps(xmm0_8, xmm0_8, 0x4e);
006036d9      int128_t xmm0_9 = *(int32_t*)((char*)arg1 + 0x14);
006036e5      int128_t var_220 = xmm0_9;
006036ec      float xmm0_10[0x4] = (xmm0_9 | (*(int32_t*)((char*)arg1 + 0xc) << 0x40));
006036f0      float xmm0_11[0x4] = _mm_shuffle_ps(xmm0_10, xmm0_10, 0x4e);
006036f4      float var_220_1[0x4] = xmm0_11;
006036fb      int128_t xmm1_4 = *(int32_t*)((char*)arg1 + 0x20);
00603703      int128_t var_210 = xmm1_4;
0060370a      float xmm1_5[0x4] = (xmm1_4 | (*(int32_t*)((char*)arg1 + 0x18) << 0x40));
00603711      float xmm1_6[0x4] = _mm_shuffle_ps(xmm1_5, xmm1_5, 0x4e);
00603718      float var_210_1[0x4] = xmm1_6;
00603734      float xmm3_2[0x4] = __mulps_xmmps_memps(__subps_xmmps_memps(xmm1_1, xmm0_4), data_827df0);
0060373b      float xmm2_1[0x4] = _mm_mul_ps(xmm1_3, xmm3_2);
00603750      float xmm7_3[0x4] = __mulps_xmmps_memps(__subps_xmmps_memps(xmm1_1, xmm0_7), data_827df0);
00603757      float var_2c0[0x4] = xmm2_1;
00603769      float xmm6_2[0x4] = _mm_mul_ps(xmm1_3, xmm7_3);
0060376c      float var_2b0[0x4] = xmm6_2;
0060377d      float xmm6_3[0x4] = (xmm6_2 | (xmm2_1 << 0x40));
00603787      float xmm5_3[0x4] = _mm_add_ps(_mm_add_ps((xmm6_2 >> 0x40), xmm6_3), _mm_shuffle_ps(xmm6_3, xmm6_3, 0xf5));
00603791      float xmm2_3[0x4] = _mm_sub_ps(xmm1_1, xmm3_2);
00603797      float xmm3_4[0x4] = _mm_shuffle_ps(xmm5_3, xmm5_3, 0xaa);
0060379b      float xmm5_4[0x4] = _mm_shuffle_ps(xmm5_3, xmm5_3, 0);
006037a6      float xmm2_4[0x4] = _mm_add_ps(xmm2_3, __mulps_xmmps_memps(xmm3_4, xmm1_3));
006037b3      float xmm5_5[0x4] = __mulps_xmmps_memps(xmm5_4, xmm1_3);
006037cb      float xmm3_9[0x4] = _mm_add_ps(_mm_sub_ps(xmm1_1, xmm7_3), xmm5_5);
006037ea      float xmm6_8[0x4] = _mm_sub_ps(xmm0_4, xmm1_1);
006037fd      float xmm2_5[0x4] = _mm_add_ps(xmm2_4, xmm3_9);
00603804      float xmm4_1[0x4] = __subps_xmmps_memps(xmm0_4, xmm0_7);
0060380b      float xmm3_11[0x4] = __mulps_xmmps_memps(xmm6_8, data_827df0);
00603812      float xmm4_2[0x4] = __mulps_xmmps_memps(xmm4_1, data_827df0);
00603819      int64_t xmm7_5 = _mm_mul_ps(xmm0_11, xmm3_11);
0060381c      float xmm6_10[0x4] = _mm_mul_ps(xmm0_11, xmm4_2);
00603829      float xmm6_11[0x4] = (xmm6_10 | (xmm7_5 << 0x40));
00603833      float xmm7_8[0x4] = _mm_add_ps(_mm_add_ps((xmm6_10 >> 0x40), xmm6_11), _mm_shuffle_ps(xmm6_11, xmm6_11, 0xf5));
0060383d      float xmm1_9[0x4] = _mm_sub_ps(xmm0_4, xmm4_2);
00603847      float xmm4_4[0x4] = _mm_sub_ps(xmm0_4, xmm3_11);
0060384d      float xmm7_9[0x4] = _mm_shuffle_ps(xmm7_8, xmm7_8, 0);
00603851      float xmm3_13[0x4] = _mm_shuffle_ps(xmm7_8, xmm7_8, 0xaa);
00603855      float xmm7_10[0x4] = _mm_mul_ps(xmm7_9, xmm0_11);
00603858      float xmm3_14[0x4] = _mm_mul_ps(xmm3_13, xmm0_11);
0060385b      float xmm1_10[0x4] = _mm_add_ps(xmm1_9, xmm7_10);
0060385e      float xmm4_5[0x4] = _mm_add_ps(xmm4_4, xmm3_14);
0060387d      int128_t xmm5_8 = data_827df0;
0060388b      float xmm3_16[0x4] = _mm_sub_ps(xmm0_7, xmm1_1);
0060388e      float xmm2_6[0x4] = _mm_add_ps(xmm2_5, xmm4_5);
00603891      float xmm3_17[0x4] = _mm_mul_ps(xmm3_16, xmm5_8);
00603898      int64_t xmm6_14 = _mm_mul_ps(xmm1_6, xmm3_17);
006038a2      float xmm7_13[0x4] = _mm_mul_ps(__subps_xmmps_memps(xmm0_7, xmm0_4), xmm5_8);
006038ac      float xmm0_14[0x4] = _mm_mul_ps(xmm1_6, xmm7_13);
006038af      float xmm4_7[0x4] = _mm_sub_ps(xmm0_7, xmm3_17);
006038b8      float xmm0_15[0x4] = (xmm0_14 | (xmm6_14 << 0x40));
006038c2      float xmm6_16[0x4] = _mm_add_ps((xmm0_14 >> 0x40), xmm0_15);
006038c5      float xmm0_16[0x4] = _mm_shuffle_ps(xmm0_15, xmm0_15, 0xf5);
006038c9      float xmm3_20[0x4] = _mm_sub_ps(xmm0_7, xmm7_13);
006038cc      float xmm6_17[0x4] = _mm_add_ps(xmm6_16, xmm0_16);
006038d2      float xmm6_18[0x4] = _mm_shuffle_ps(xmm6_17, xmm6_17, 0xaa);
006038d6      float xmm5_10[0x4] = _mm_shuffle_ps(xmm6_17, xmm6_17, 0);
006038da      float xmm6_19[0x4] = __mulps_xmmps_memps(xmm6_18, xmm1_6);
006038de      int128_t xmm0_17 = data_827e30;
006038e5      float xmm4_8[0x4] = _mm_add_ps(xmm4_7, xmm6_19);
006038f2      float xmm2_8[0x4] = _mm_add_ps(_mm_add_ps(xmm2_6, xmm4_8), xmm1_10);
006038fc      float xmm3_21[0x4] = _mm_add_ps(xmm3_20, _mm_mul_ps(xmm5_10, xmm1_6));
006038ff      float xmm2_9[0x4] = _mm_add_ps(xmm2_8, xmm3_21);
00603909      float var_290[0x4] = xmm2_9;
00603910      float xmm2_10[0x4] = __mulps_xmmps_memps(xmm2_9, data_827e20);
00603917      float var_290_1[0x4] = xmm2_10;
00603936      float xmm2_11[0x4] = _mm_sub_ps(xmm2_10, _mm_mul_ps(__addps_xmmps_memps(__addps_xmmps_memps(xmm1_1, xmm0_4), xmm0_7), xmm0_17));
00603936      
00603942      if (arg3 > 0)
00603942      {
00603956          uint32_t eax_4 = (arg8 * 4);
00603b74          void* __offset(D3DXVECTOR2, 0x8) i;
00603b74          
00603b74          do
00603b74          {
0060398c              int64_t x = i_1->x;
0060399c              float y[0x4] = i_1->y;
006039ac              int32_t xmm3_22 = data_827e10;
006039b4              float xmm2_13 = (data_827e00 - x);
006039b8              int64_t xmm1_16 = _mm_unpacklo_ps(y, x);
006039bf              int64_t xmm2_14 = (xmm2_13 - xmm1_16);
006039cf              float xmm1_17[0x4] = (xmm1_16 | (xmm2_14 << 0x40));
006039d2              float xmm0_19[0x4] = ((x * xmm1_16) * (xmm3_22 * xmm2_14));
006039e1              float xmm7_15[0x4] = _mm_mul_ps(xmm2_11, _mm_shuffle_ps(xmm0_19, xmm0_19, 0));
006039e7              float xmm2_16[0x4] = _mm_shuffle_ps(xmm1_17, xmm1_17, 0xc9);
006039ee              float xmm3_25[0x4] = _mm_shuffle_ps(xmm1_17, xmm1_17, 0xd2);
006039f5              float xmm5_13[0x4] = _mm_mul_ps(xmm1_17, xmm1_17);
006039f8              float xmm1_18[0x4] = _mm_mul_ps(xmm1_17, xmm5_13);
00603a2b              float xmm7_18[0x4] = _mm_add_ps(_mm_add_ps(_mm_add_ps(xmm7_15, __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_18, xmm1_18, 0), xmm1_1)), __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_18, xmm1_18, 0x55), xmm0_7)), __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_18, xmm1_18, 0xaa), xmm0_4));
00603a2e              float xmm5_14[0x4] = __mulps_xmmps_memps(xmm5_13, data_827de0);
00603a38              float xmm1_20[0x4] = _mm_mul_ps(xmm5_14, xmm2_16);
00603a6b              float xmm7_21[0x4] = _mm_add_ps(_mm_add_ps(_mm_add_ps(xmm7_18, __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_20, xmm1_20, 0), xmm3_9)), __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_20, xmm1_20, 0x55), xmm3_21)), __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_20, xmm1_20, 0xaa), xmm4_5));
00603a71              float xmm1_22[0x4] = _mm_mul_ps(xmm5_14, xmm3_25);
00603aa7              float var_1d0[0x4] = _mm_add_ps(_mm_add_ps(_mm_add_ps(xmm7_21, __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_22, xmm1_22, 0), xmm2_4)), __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_22, xmm1_22, 0x55), xmm4_8)), __mulps_xmmps_memps(_mm_shuffle_ps(xmm1_22, xmm1_22, 0xaa), xmm1_10));
00603ab4              int32_t eax_7 = 3;
00603ab4              
00603abc              if (arg8 > 3)
00603abc              {
00603b1c                  do
00603b1c                  {
00603b0a                      var_1d0[eax_7] = (((arg5[eax_7] * y) + (arg6[eax_7] * xmm2_14)) + (arg7[eax_7] * x));
00603b13                      eax_7 += 1;
00603b1c                  } while (eax_7 < arg8);
00603abc              }
00603abc              
00603b40              int32_t esi_2;
00603b40              int32_t edi_5;
00603b40              edi_5 = __builtin_memcpy(var_a0, &var_1d0, ((eax_4 >> 2) << 2));
00603b46              __builtin_memcpy(edi_5, esi_2, (eax_4 & 3));
00603b5d              i = &i_1[1];
00603b60              var_a0 = &var_a0[arg8];
00603b6c              i_1 = i;
00603b74          } while (i < &arg2[arg3]);
00603942      }
00603614  }

00603b8b                                   90                                                                         .

00603b8c  struct D3DXVECTOR3* __stdcall sse_D3DXVec3TransformNormal(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

00603b8c  {
00603b91      int32_t ecx;
00603b91      int32_t var_8 = ecx;
00603ba6      float xmm0_4[0x4];
00603ba6      float xmm2_1[0x4];
00603ba6      float xmm3_2[0x4];
00603ba6      
00603ba6      if ((arg3 & 0xf) != 0)
00603ba6      {
00603bec          float xmm0_5[0x4];
00603bec          xmm0_5[0] = arg2->x;
00603bec          xmm0_5[1] = arg2->y;
00603c06          float xmm3_4[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x10) | (*(uint64_t*)((char*)arg3->__inner0 + 0x18) << 0x40));
00603c0d          float z_1[0x4] = arg2->z;
00603c16          xmm2_1 = _mm_mul_ps((*(uint64_t*)((char*)arg3->__inner0 + 0x20) | (*(uint64_t*)((char*)arg3->__inner0 + 0x28) << 0x40)), _mm_shuffle_ps(z_1, z_1, 0));
00603c20          xmm3_2 = _mm_mul_ps(xmm3_4, _mm_shuffle_ps(xmm0_5, xmm0_5, 0x55));
00603c26          float xmm1_5[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0);
00603c35          xmm0_4 = _mm_mul_ps((*(uint64_t*)((char*)arg3->__inner0 + 0) | (*(uint64_t*)((char*)arg3->__inner0 + 8) << 0x40)), xmm1_5);
00603ba6      }
00603ba6      else
00603ba6      {
00603bac          float xmm1[0x4];
00603bac          xmm1[0] = arg2->x;
00603bac          xmm1[1] = arg2->y;
00603baf          float z = arg2->z;
00603bb2          float xmm2[0x4];
00603bb2          xmm2[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
00603bb2          xmm2[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
00603bb2          xmm2[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x28);
00603bb2          xmm2[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x2c);
00603bb9          float z_2[0x4] = z;
00603bc5          xmm2_1 = _mm_mul_ps(_mm_shuffle_ps(z_2, z_2, 0), xmm2);
00603bc8          float xmm0_2[0x4];
00603bc8          xmm0_2[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
00603bc8          xmm0_2[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x14);
00603bc8          xmm0_2[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x18);
00603bc8          xmm0_2[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x1c);
00603bd3          xmm3_2 = _mm_mul_ps(_mm_shuffle_ps(xmm1, xmm1, 0x55), xmm0_2);
00603bd6          float xmm0_3[0x4];
00603bd6          xmm0_3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
00603bd6          xmm0_3[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
00603bd6          xmm0_3[2] = *(uint32_t*)((char*)arg3->__inner0 + 8);
00603bd6          xmm0_3[3] = *(uint32_t*)((char*)arg3->__inner0 + 0xc);
00603be3          xmm0_4 = _mm_mul_ps(_mm_shuffle_ps(xmm1, xmm1, 0), xmm0_3);
00603ba6      }
00603ba6      
00603c3e      float xmm0_9[0x4] = _mm_add_ps(_mm_add_ps(xmm0_4, xmm3_2), xmm2_1);
00603c47      arg1->x = xmm0_9[0];
00603c47      arg1->y = xmm0_9[1];
00603c4a      arg1->z = ((int32_t)(xmm0_9 >> 0x40));
00603c55      return arg1;
00603b8c  }


00603c58  struct D3DXVECTOR3* __stdcall sse2_D3DXVec3TransformCoord(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

00603c58  {
00603c5d      int32_t ecx;
00603c5d      int32_t var_8 = ecx;
00603c71      float xmm0[0x4];
00603c71      xmm0[0] = arg2->x;
00603c71      xmm0[1] = arg2->y;
00603c74      float z = arg2->z;
00603c7c      float xmm0_1[0x4];
00603c7c      float xmm1_4[0x4];
00603c7c      float xmm2_2[0x4];
00603c7c      float xmm3_2[0x4];
00603c7c      
00603c7c      if ((arg3 & 0xf) != 0)
00603c7c      {
00603cd0          float z_2[0x4] = z;
00603cdc          xmm3_2 = _mm_add_ps(_mm_mul_ps((*(uint64_t*)((char*)arg3->__inner0 + 0x20) | (*(uint64_t*)((char*)arg3->__inner0 + 0x28) << 0x40)), _mm_shuffle_ps(z_2, z_2, 0)), (*(uint64_t*)((char*)arg3->__inner0 + 0x30) | (*(uint64_t*)((char*)arg3->__inner0 + 0x38) << 0x40)));
00603cf2          xmm2_2 = _mm_mul_ps((*(uint64_t*)((char*)arg3->__inner0 + 0x10) | (*(uint64_t*)((char*)arg3->__inner0 + 0x18) << 0x40)), _mm_shuffle_ps(xmm0, xmm0, 0x55));
00603cf8          xmm1_4 = _mm_shuffle_ps(xmm0, xmm0, 0);
00603d03          xmm0_1 = (*(uint64_t*)((char*)arg3->__inner0 + 0) | (*(uint64_t*)((char*)arg3->__inner0 + 8) << 0x40));
00603c7c      }
00603c7c      else
00603c7c      {
00603c7e          float xmm2[0x4];
00603c7e          xmm2[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
00603c7e          xmm2[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
00603c7e          xmm2[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
00603c7e          xmm2[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
00603c82          float xmm3[0x4];
00603c82          xmm3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
00603c82          xmm3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
00603c82          xmm3[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x28);
00603c82          xmm3[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x2c);
00603c89          float z_1[0x4] = z;
00603c95          xmm3_2 = _mm_add_ps(_mm_mul_ps(xmm3, _mm_shuffle_ps(z_1, z_1, 0)), xmm2);
00603c98          float xmm2_1[0x4];
00603c98          xmm2_1[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
00603c98          xmm2_1[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x14);
00603c98          xmm2_1[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x18);
00603c98          xmm2_1[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x1c);
00603ca3          xmm2_2 = _mm_mul_ps(xmm2_1, _mm_shuffle_ps(xmm0, xmm0, 0x55));
00603ca9          xmm1_4 = _mm_shuffle_ps(xmm0, xmm0, 0);
00603cad          xmm0_1[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
00603cad          xmm0_1[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
00603cad          xmm0_1[2] = *(uint32_t*)((char*)arg3->__inner0 + 8);
00603cad          xmm0_1[3] = *(uint32_t*)((char*)arg3->__inner0 + 0xc);
00603c7c      }
00603c7c      
00603d10      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(_mm_mul_ps(xmm0_1, xmm1_4), xmm2_2), xmm3_2);
00603d13      float xmm1_11[0x4] = _mm_rcp_ps(xmm0_5);
00603d1f      float xmm2_8[0x4] = _mm_mul_ps(_mm_mul_ps(xmm1_11, xmm0_5), xmm1_11);
00603d28      float xmm1_13[0x4] = _mm_sub_ps(_mm_add_ps(xmm1_11, xmm1_11), xmm2_8);
00603d32      float xmm0_6[0x4] = _mm_mul_ps(xmm0_5, _mm_shuffle_ps(xmm1_13, xmm1_13, 0xff));
00603d3b      arg1->x = xmm0_6[0];
00603d3b      arg1->y = xmm0_6[1];
00603d3e      arg1->z = ((int32_t)(xmm0_6 >> 0x40));
00603d49      return arg1;
00603c58  }


00603d4c  void __thiscall KMATRIX::KMATRIX(KMATRIX* this, struct D3DXMATRIX const& arg2)

00603d4c  {
00603d51      KMATRIX* this_1 = this;
00603d68      float xmm0[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00603d71      *(uint128_t*)this = _mm_shuffle_ps(xmm0, xmm0, 0);
00603d7a      float xmm0_2[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00603d83      *(uint128_t*)((char*)this + 0x40) = _mm_shuffle_ps(xmm0_2, xmm0_2, 0);
00603d8d      float xmm0_4[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00603d96      *(uint128_t*)((char*)this + 0x80) = _mm_shuffle_ps(xmm0_4, xmm0_4, 0);
00603da3      float xmm0_6[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00603dac      *(uint128_t*)((char*)this + 0xc0) = _mm_shuffle_ps(xmm0_6, xmm0_6, 0);
00603db9      float xmm0_8[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00603dc2      *(uint128_t*)((char*)this + 0x10) = _mm_shuffle_ps(xmm0_8, xmm0_8, 0);
00603dcc      float xmm0_10[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00603dd5      *(uint128_t*)((char*)this + 0x50) = _mm_shuffle_ps(xmm0_10, xmm0_10, 0);
00603ddf      float xmm0_12[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00603de8      *(uint128_t*)((char*)this + 0x90) = _mm_shuffle_ps(xmm0_12, xmm0_12, 0);
00603df5      float xmm0_14[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
00603dfe      *(uint128_t*)((char*)this + 0xd0) = _mm_shuffle_ps(xmm0_14, xmm0_14, 0);
00603e0b      float xmm0_16[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00603e14      *(uint128_t*)((char*)this + 0x20) = _mm_shuffle_ps(xmm0_16, xmm0_16, 0);
00603e1e      float xmm0_18[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00603e27      *(uint128_t*)((char*)this + 0x60) = _mm_shuffle_ps(xmm0_18, xmm0_18, 0);
00603e31      float xmm0_20[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00603e3a      *(uint128_t*)((char*)this + 0xa0) = _mm_shuffle_ps(xmm0_20, xmm0_20, 0);
00603e47      float xmm0_22[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00603e50      *(uint128_t*)((char*)this + 0xe0) = _mm_shuffle_ps(xmm0_22, xmm0_22, 0);
00603e5d      float xmm0_24[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00603e66      *(uint128_t*)((char*)this + 0x30) = _mm_shuffle_ps(xmm0_24, xmm0_24, 0);
00603e70      float xmm0_26[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00603e79      *(uint128_t*)((char*)this + 0x70) = _mm_shuffle_ps(xmm0_26, xmm0_26, 0);
00603e83      float xmm0_28[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00603e8c      *(uint128_t*)((char*)this + 0xb0) = _mm_shuffle_ps(xmm0_28, xmm0_28, 0);
00603e99      float xmm0_30[0x4] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
00603ea2      *(uint128_t*)((char*)this + 0xf0) = _mm_shuffle_ps(xmm0_30, xmm0_30, 0);
00603d4c  }


00603eb2  struct D3DXVECTOR4* __stdcall sse_D3DXVec3TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00603eb2  {
00603eb7      int32_t ecx;
00603eb7      int32_t var_8 = ecx;
00603eca      int32_t esi;
00603eca      int32_t var_13c = esi;
00603ecb      int32_t edi;
00603ecb      int32_t var_140 = edi;
00603ecc      struct D3DXVECTOR4* result_1 = arg1;
00603edb      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
00603edd      int32_t i_4 = (arg6 - esi_2);
00603edf      uint32_t i_5 = (esi_2 >> 2);
00603ee5      struct D3DXVECTOR4* result = result_1;
00603ee8      float var_130[0x4];
00603ee8      
00603ee8      if (i_5 != 0)
00603ef7          KMATRIX::KMATRIX(&var_130, arg5);
00603ef7      
00603f04      struct D3DXVECTOR3* esi_3;
00603f04      
00603f04      if ((i_5 == 0 || i_5 <= 0))
00604055          esi_3 = arg3;
00603f04      else
00603f04      {
00603f12          uint32_t i_2 = i_5;
00603f15          esi_3 = arg3;
0060404d          uint32_t i;
0060404d          
0060404d          do
0060404d          {
00603f1c              int64_t xmm2_2;
00603f1c              xmm2_2 = esi_3->x;
00603f1c              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
00603f22              float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
00603f29              int64_t z = esi_3->z;
00603f31              uint32_t edx_2 = (arg4 * 3);
00603f34              float xmm2_4[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)(edx_2 + esi_3) << 0x40));
00603f38              float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0xdd);
00603f3c              float xmm0_2[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0x88);
00603f5e              float xmm1_7[0x4] = _mm_shuffle_ps((z | (*(uint32_t*)(&esi_3->z + arg4) << 0x40)), (*(uint32_t*)(&esi_3->z + (arg4 << 1)) | (*(uint32_t*)(&esi_3->z + edx_2) << 0x40)), 0x88);
00603f65              float var_f0[0x4];
00603f65              float xmm3_5[0x4] = __mulps_xmmps_memps(xmm1_3, var_f0);
00603f8c              float var_b0[0x4];
00603f8c              float var_70[0x4];
00603f8c              float xmm2_10[0x4] = __addps_xmmps_memps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_130), xmm3_5), __mulps_xmmps_memps(xmm1_7, var_b0)), var_70);
00603f93              float var_e0[0x4];
00603f93              float xmm5_5[0x4] = __mulps_xmmps_memps(xmm1_3, var_e0);
00603fb7              float var_120[0x4];
00603fb7              float var_a0[0x4];
00603fb7              float var_60[0x4];
00603fb7              float xmm5_8[0x4] = __addps_xmmps_memps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_120), xmm5_5), __mulps_xmmps_memps(xmm1_7, var_a0)), var_60);
00603fbe              float var_d0[0x4];
00603fbe              float xmm6_5[0x4] = __mulps_xmmps_memps(xmm1_3, var_d0);
00603fc5              float var_c0[0x4];
00603fc5              float xmm4_2[0x4] = __mulps_xmmps_memps(xmm1_3, var_c0);
00603fcf              float var_110[0x4];
00603fcf              float xmm7_2[0x4] = __mulps_xmmps_memps(xmm0_2, var_110);
00603fd6              float var_100[0x4];
00603fd6              float xmm0_3[0x4] = __mulps_xmmps_memps(xmm0_2, var_100);
00603fe0              float var_90[0x4];
00603fe0              float xmm3_11[0x4] = __mulps_xmmps_memps(xmm1_7, var_90);
00603fe4              float var_80[0x4];
00603fe4              float xmm1_8[0x4] = __mulps_xmmps_memps(xmm1_7, var_80);
00603fe8              float xmm0_4[0x4] = _mm_add_ps(xmm0_3, xmm4_2);
00603ff1              float xmm6_7[0x4] = _mm_add_ps(_mm_add_ps(xmm7_2, xmm6_5), xmm3_11);
00603ffa              float var_40[0x4];
00603ffa              float xmm4_5[0x4] = __addps_xmmps_memps(_mm_add_ps(xmm0_4, xmm1_8), var_40);
00604001              float var_50[0x4];
00604001              float xmm3_13[0x4] = __addps_xmmps_memps(xmm6_7, var_50);
00604008              int64_t xmm0_6 = _mm_unpacklo_ps(xmm2_10, xmm5_8);
0060400b              result_1->x = xmm0_6;
0060400b              result_1->y = *(uint32_t*)((char*)xmm0_6)[4];
00604011              int64_t xmm1_10 = _mm_unpacklo_ps(xmm3_13, xmm4_5);
00604014              result_1->z = xmm1_10;
00604014              result_1->w = *(uint32_t*)((char*)xmm1_10)[4];
00604018              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_6 << 0x40));
0060401c              *(uint128_t*)(&result_1->z + arg2) = (*(uint64_t*)(&result_1->z + arg2) | (xmm1_10 << 0x40));
00604021              int64_t xmm2_11 = _mm_unpackhi_ps(xmm2_10, xmm5_8);
00604024              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_11;
00604028              uint32_t edx_3 = (arg2 * 3);
0060402b              int64_t xmm3_14 = _mm_unpackhi_ps(xmm3_13, xmm4_5);
0060402e              *(uint64_t*)(&result_1->z + (arg2 << 1)) = xmm3_14;
00604033              *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm2_11 << 0x40));
00604037              *(uint128_t*)(&result_1->z + edx_3) = (*(uint64_t*)(&result_1->z + edx_3) | (xmm3_14 << 0x40));
00604041              esi_3 += (arg4 << 2);
00604048              result_1 += (arg2 << 2);
0060404a              i = i_2;
0060404a              i_2 -= 1;
0060404d          } while (i != 1);
00603f04      }
00603f04      
0060405d      if (i_4 > 0)
0060405d      {
0060405f          int32_t i_3 = i_4;
00604075          int32_t i_1;
00604075          
00604075          do
00604075          {
00604067              sse_D3DXVec3Transform(result_1, esi_3, arg5);
0060406c              esi_3 += arg4;
0060406f              result_1 += arg2;
00604072              i_1 = i_3;
00604072              i_3 -= 1;
00604075          } while (i_1 != 1);
0060405d      }
0060405d      
00604082      return result;
00603eb2  }


00604085  struct D3DXVECTOR4* __stdcall sse_D3DXVec2TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604085  {
00604087      int32_t __saved_ebx_1;
00604087      int32_t __saved_ebx = __saved_ebx_1;
0060408a      int32_t ecx;
0060408a      int32_t var_8 = ecx;
00604091      int32_t __saved_ebp_1;
00604091      int32_t __saved_ebp = __saved_ebp_1;
0060409d      int32_t esi;
0060409d      int32_t var_13c = esi;
0060409e      struct D3DXVECTOR4* result_1 = arg1;
006040a1      int32_t edi;
006040a1      int32_t var_140 = edi;
006040a5      int32_t var_144 = 0xc;
006040a9      int32_t* esp_1 = &var_140;
006040b1      int32_t ecx_2 = ((0xc - 0xc) & (arg6 & 0xfffffffc));
006040b3      int32_t i_4 = (arg6 - ecx_2);
006040b5      uint32_t i_5 = (ecx_2 >> 2);
006040be      struct D3DXVECTOR4* result = result_1;
006040be      
006040c1      if (i_5 != 0)
006040c1      {
006040d0          float var_130[0x4];
006040d0          KMATRIX::KMATRIX(&var_130, arg5);
006040d0          esp_1 = &var_140;
006040d0          
006040dd          if (i_5 > 0)
006040dd          {
006040eb              uint32_t i_2 = i_5;
006041ce              uint32_t i;
006041ce              
006041ce              do
006041ce              {
006040f5                  int64_t xmm2_2;
006040f5                  xmm2_2 = arg3->x;
006040f5                  *(uint32_t*)((char*)xmm2_2)[4] = arg3->y;
006040fb                  float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)arg3 + arg4) << 0x40));
00604108                  float xmm2_4[0x4] = (*(uint64_t*)((char*)arg3 + (arg4 << 1)) | (*(uint64_t*)((arg4 * 3) + arg3) << 0x40));
0060410c                  float xmm0_2[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0x88);
00604110                  float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0xdd);
0060412e                  float var_f0[0x4];
0060412e                  float var_70[0x4];
0060412e                  float xmm2_8[0x4] = __addps_xmmps_memps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_130), __mulps_xmmps_memps(xmm1_3, var_f0)), var_70);
00604149                  float var_120[0x4];
00604149                  float var_e0[0x4];
00604149                  float var_60[0x4];
00604149                  float xmm4_4[0x4] = __addps_xmmps_memps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_120), __mulps_xmmps_memps(xmm1_3, var_e0)), var_60);
00604150                  float var_110[0x4];
00604150                  float xmm5_2[0x4] = __mulps_xmmps_memps(xmm0_2, var_110);
00604157                  float var_100[0x4];
00604157                  float xmm0_3[0x4] = __mulps_xmmps_memps(xmm0_2, var_100);
00604161                  float var_d0[0x4];
00604161                  float xmm3_9[0x4] = __mulps_xmmps_memps(xmm1_3, var_d0);
00604168                  float var_c0[0x4];
00604168                  float xmm1_4[0x4] = __mulps_xmmps_memps(xmm1_3, var_c0);
0060416f                  float xmm5_3[0x4] = _mm_add_ps(xmm5_2, xmm3_9);
00604172                  float xmm0_4[0x4] = _mm_add_ps(xmm0_3, xmm1_4);
00604178                  float var_50[0x4];
00604178                  float xmm3_11[0x4] = __addps_xmmps_memps(xmm5_3, var_50);
0060417f                  float var_40[0x4];
0060417f                  float xmm5_5[0x4] = __addps_xmmps_memps(xmm0_4, var_40);
00604186                  int64_t xmm0_6 = _mm_unpacklo_ps(xmm2_8, xmm4_4);
00604189                  result_1->x = xmm0_6;
00604189                  result_1->y = *(uint32_t*)((char*)xmm0_6)[4];
0060418f                  int64_t xmm1_6 = _mm_unpacklo_ps(xmm3_11, xmm5_5);
00604192                  result_1->z = xmm1_6;
00604192                  result_1->w = *(uint32_t*)((char*)xmm1_6)[4];
00604196                  *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_6 << 0x40));
0060419a                  *(uint128_t*)(&result_1->z + arg2) = (*(uint64_t*)(&result_1->z + arg2) | (xmm1_6 << 0x40));
0060419f                  int64_t xmm2_9 = _mm_unpackhi_ps(xmm2_8, xmm4_4);
006041a2                  *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_9;
006041a6                  uint32_t edx_3 = (arg2 * 3);
006041a9                  int64_t xmm3_12 = _mm_unpackhi_ps(xmm3_11, xmm5_5);
006041ac                  *(uint64_t*)(&result_1->z + (arg2 << 1)) = xmm3_12;
006041b1                  *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm2_9 << 0x40));
006041b5                  *(uint128_t*)(&result_1->z + edx_3) = (*(uint64_t*)(&result_1->z + edx_3) | (xmm3_12 << 0x40));
006041c1                  arg3 += (arg4 << 2);
006041c9                  result_1 += (arg2 << 2);
006041cb                  i = i_2;
006041cb                  i_2 -= 1;
006041ce              } while (i != 1);
006040dd          }
006040c1      }
006040c1      
006041d9      if (i_4 > 0)
006041d9      {
006041db          int32_t i_3 = i_4;
006041f5          int32_t i_1;
006041f5          
006041f5          do
006041f5          {
006041de              *(uint32_t*)((char*)esp_1 - 4) = arg5;
006041e1              *(uint32_t*)((char*)esp_1 - 8) = arg3;
006041e4              *(uint32_t*)((char*)esp_1 - 0xc) = result_1;
006041e5              _D3DXVec2Transform@12();
006041e5              esp_1 -= 8;
006041ed              arg3 += arg4;
006041f0              result_1 += arg2;
006041f2              i_1 = i_3;
006041f2              i_3 -= 1;
006041f5          } while (i_1 != 1);
006041d9      }
006041d9      
006041fa      *(uint32_t*)esp_1;
006041fa      esp_1[1];
00604202      return result;
00604085  }


00604205  struct D3DXVECTOR2* __stdcall sse_D3DXVec2TransformCoordArray(struct D3DXVECTOR2* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604205  {
00604207      int32_t __saved_ebx_1;
00604207      int32_t __saved_ebx = __saved_ebx_1;
0060420a      int32_t ecx;
0060420a      int32_t var_8 = ecx;
00604211      int32_t __saved_ebp_1;
00604211      int32_t __saved_ebp = __saved_ebp_1;
0060421d      int32_t esi;
0060421d      int32_t var_13c = esi;
0060421e      int32_t edi;
0060421e      int32_t var_140 = edi;
0060421f      struct D3DXVECTOR2* result_1 = arg1;
00604222      int32_t var_144 = 0xc;
00604229      int32_t* esp_1 = &var_140;
0060422e      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
00604230      int32_t i_4 = (arg6 - esi_2);
00604232      uint32_t i_5 = (esi_2 >> 2);
00604238      struct D3DXVECTOR2* result = result_1;
0060423b      float var_130[0x4];
0060423b      
0060423b      if (i_5 != 0)
0060423b      {
0060424a          KMATRIX::KMATRIX(&var_130, arg5);
0060424a          esp_1 = &var_140;
0060423b      }
0060423b      
00604257      struct D3DXVECTOR2* esi_3;
00604257      
00604257      if ((i_5 == 0 || i_5 <= 0))
00604331          esi_3 = arg3;
00604257      else
00604257      {
00604265          uint32_t i_2 = i_5;
00604268          esi_3 = arg3;
00604329          uint32_t i;
00604329          
00604329          do
00604329          {
0060426b              int64_t xmm2_2;
0060426b              xmm2_2 = esi_3->x;
0060426b              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
00604275              float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
0060427f              float xmm4_3[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)((arg4 * 3) + esi_3) << 0x40));
00604283              float xmm0_2[0x4] = _mm_shuffle_ps(xmm1_2, xmm4_3, 0x88);
00604287              float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm4_3, 0xdd);
0060428e              float var_c0[0x4];
0060428e              float xmm2_4[0x4] = __mulps_xmmps_memps(xmm1_3, var_c0);
006042a5              float var_100[0x4];
006042a5              float var_40[0x4];
006042a5              float xmm2_6[0x4] = __addps_xmmps_memps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_100), xmm2_4), var_40);
006042a9              float xmm3_4[0x4] = _mm_rcp_ps(xmm2_6);
006042b2              float xmm5_3[0x4] = _mm_mul_ps(_mm_mul_ps(xmm3_4, xmm2_6), xmm3_4);
006042be              float xmm3_6[0x4] = _mm_sub_ps(_mm_add_ps(xmm3_4, xmm3_4), xmm5_3);
006042c4              float var_f0[0x4];
006042c4              float xmm2_10[0x4] = __mulps_xmmps_memps(xmm1_3, var_f0);
006042cb              float var_e0[0x4];
006042cb              float xmm1_4[0x4] = __mulps_xmmps_memps(xmm1_3, var_e0);
006042d5              float var_120[0x4];
006042d5              float xmm0_3[0x4] = __mulps_xmmps_memps(xmm0_2, var_120);
006042e3              float xmm5_6[0x4] = _mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_130), xmm2_10);
006042ec              float var_60[0x4];
006042ec              float xmm1_6[0x4] = __addps_xmmps_memps(_mm_add_ps(xmm0_3, xmm1_4), var_60);
006042f7              float var_70[0x4];
006042f7              float xmm2_13[0x4] = _mm_mul_ps(__addps_xmmps_memps(xmm5_6, var_70), xmm3_6);
006042fa              float xmm1_7[0x4] = _mm_mul_ps(xmm1_6, xmm3_6);
00604300              struct D3DXVECTOR2 xmm0_6 = _mm_unpacklo_ps(xmm2_13, xmm1_7);
00604303              result_1->x = xmm0_6.x;
00604303              result_1->y = xmm0_6.y;
00604306              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_6 << 0x40));
0060430a              int64_t xmm2_14 = _mm_unpackhi_ps(xmm2_13, xmm1_7);
0060430d              int128_t* edx_3 = (arg2 * 3);
00604310              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_14;
00604314              *(uint128_t*)((char*)edx_3 + result_1) = (*(uint64_t*)((char*)edx_3 + result_1) | (xmm2_14 << 0x40));
0060431d              esi_3 += (arg4 << 2);
00604324              result_1 += (arg2 << 2);
00604326              i = i_2;
00604326              i_2 -= 1;
00604329          } while (i != 1);
00604257      }
00604257      
00604339      if (i_4 > 0)
00604339      {
0060433b          int32_t i_3 = i_4;
00604351          int32_t i_1;
00604351          
00604351          do
00604351          {
0060433e              *(uint32_t*)((char*)esp_1 - 4) = arg5;
00604341              *(uint32_t*)((char*)esp_1 - 8) = esi_3;
00604342              *(uint32_t*)((char*)esp_1 - 0xc) = result_1;
00604343              _D3DXVec2TransformCoord@12();
00604343              esp_1 -= 8;
00604348              esi_3 += arg4;
0060434b              result_1 += arg2;
0060434e              i_1 = i_3;
0060434e              i_3 -= 1;
00604351          } while (i_1 != 1);
00604339      }
00604339      
00604356      *(uint32_t*)esp_1;
00604356      esp_1[1];
0060435e      return result;
00604205  }


00604361  struct D3DXVECTOR2* __stdcall sse_D3DXVec2TransformNormalArray(struct D3DXVECTOR2* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604361  {
00604363      int32_t __saved_ebx_1;
00604363      int32_t __saved_ebx = __saved_ebx_1;
00604366      int32_t ecx;
00604366      int32_t var_8 = ecx;
0060436d      int32_t __saved_ebp_1;
0060436d      int32_t __saved_ebp = __saved_ebp_1;
00604379      int32_t esi;
00604379      int32_t var_13c = esi;
0060437a      int32_t edi;
0060437a      int32_t var_140 = edi;
0060437b      struct D3DXVECTOR2* result_1 = arg1;
0060437e      int32_t var_144 = 0xc;
00604385      int32_t* esp_1 = &var_140;
0060438a      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
0060438c      int32_t i_4 = (arg6 - esi_2);
0060438e      uint32_t i_5 = (esi_2 >> 2);
00604394      struct D3DXVECTOR2* result = result_1;
00604397      float var_130[0x4];
00604397      
00604397      if (i_5 != 0)
00604397      {
006043a6          KMATRIX::KMATRIX(&var_130, arg5);
006043a6          esp_1 = &var_140;
00604397      }
00604397      
006043b3      struct D3DXVECTOR2* esi_3;
006043b3      
006043b3      if ((i_5 == 0 || i_5 <= 0))
00604442          esi_3 = arg3;
006043b3      else
006043b3      {
006043c1          uint32_t i_2 = i_5;
006043c4          esi_3 = arg3;
0060443e          uint32_t i;
0060443e          
0060443e          do
0060443e          {
006043c7              int64_t xmm2_2;
006043c7              xmm2_2 = esi_3->x;
006043c7              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
006043d1              float xmm0_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
006043db              float xmm3_3[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)((arg4 * 3) + esi_3) << 0x40));
006043df              float xmm0_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm3_3, 0xdd);
006043e6              float var_f0[0x4];
006043e6              float xmm2_4[0x4] = __mulps_xmmps_memps(xmm0_3, var_f0);
006043ed              float var_e0[0x4];
006043ed              float xmm0_4[0x4] = __mulps_xmmps_memps(xmm0_3, var_e0);
006043f7              float xmm1_2[0x4] = _mm_shuffle_ps(xmm0_2, xmm3_3, 0x88);
006043fe              float xmm2_6[0x4] = __mulps_xmmps_memps(xmm1_2, var_130);
0060440c              float var_120[0x4];
0060440c              float xmm1_4[0x4] = _mm_add_ps(__mulps_xmmps_memps(xmm1_2, var_120), xmm0_4);
0060440f              float xmm2_7[0x4] = _mm_add_ps(xmm2_6, xmm2_4);
00604415              struct D3DXVECTOR2 xmm0_6 = _mm_unpacklo_ps(xmm2_7, xmm1_4);
00604418              result_1->x = xmm0_6.x;
00604418              result_1->y = xmm0_6.y;
0060441b              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_6 << 0x40));
0060441f              int64_t xmm2_8 = _mm_unpackhi_ps(xmm2_7, xmm1_4);
00604422              int128_t* edx_3 = (arg2 * 3);
00604425              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_8;
00604429              *(uint128_t*)((char*)edx_3 + result_1) = (*(uint64_t*)((char*)edx_3 + result_1) | (xmm2_8 << 0x40));
00604432              esi_3 += (arg4 << 2);
00604439              result_1 += (arg2 << 2);
0060443b              i = i_2;
0060443b              i_2 -= 1;
0060443e          } while (i != 1);
006043b3      }
006043b3      
0060444a      if (i_4 > 0)
0060444a      {
0060444c          int32_t i_3 = i_4;
00604462          int32_t i_1;
00604462          
00604462          do
00604462          {
0060444f              *(uint32_t*)((char*)esp_1 - 4) = arg5;
00604452              *(uint32_t*)((char*)esp_1 - 8) = esi_3;
00604453              *(uint32_t*)((char*)esp_1 - 0xc) = result_1;
00604454              _D3DXVec2TransformNormal@12();
00604454              esp_1 -= 8;
00604459              esi_3 += arg4;
0060445c              result_1 += arg2;
0060445f              i_1 = i_3;
0060445f              i_3 -= 1;
00604462          } while (i_1 != 1);
0060444a      }
0060444a      
00604467      *(uint32_t*)esp_1;
00604467      esp_1[1];
0060446f      return result;
00604361  }


00604472  struct D3DXVECTOR4* __stdcall sse_D3DXVec4TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR4 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604472  {
00604477      int32_t ecx;
00604477      int32_t var_8 = ecx;
0060448a      int32_t esi;
0060448a      int32_t var_14c = esi;
0060448b      int32_t edi;
0060448b      int32_t var_150 = edi;
0060448c      struct D3DXVECTOR4* result_1 = arg1;
0060449b      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
0060449d      int32_t i_4 = (arg6 - esi_2);
0060449f      uint32_t i_5 = (esi_2 >> 2);
006044a5      struct D3DXVECTOR4* result = result_1;
006044a8      float var_140[0x4];
006044a8      
006044a8      if (i_5 != 0)
006044b7          KMATRIX::KMATRIX(&var_140, arg5);
006044b7      
006044c4      struct D3DXVECTOR4* esi_3;
006044c4      
006044c4      if ((i_5 == 0 || i_5 <= 0))
00604642          esi_3 = arg3;
006044c4      else
006044c4      {
006044d2          uint32_t i_2 = i_5;
006044d5          esi_3 = arg3;
0060463a          uint32_t i;
0060463a          
0060463a          do
0060463a          {
006044dc              int64_t xmm3_2;
006044dc              xmm3_2 = esi_3->x;
006044dc              *(uint32_t*)((char*)xmm3_2)[4] = esi_3->y;
006044e2              float xmm2_2[0x4] = (xmm3_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
006044ef              int64_t xmm2_3;
006044ef              xmm2_3 = esi_3->z;
006044ef              *(uint32_t*)((char*)xmm2_3)[4] = esi_3->w;
006044f6              float xmm4_4[0x4] = (xmm2_3 | (*(uint64_t*)(&esi_3->z + arg4) << 0x40));
006044fe              uint32_t edx_2 = (arg4 * 3);
00604501              float xmm3_4[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)(edx_2 + esi_3) << 0x40));
00604505              float xmm0_2[0x4] = _mm_shuffle_ps(xmm2_2, xmm3_4, 0x88);
00604509              float xmm1_2[0x4] = _mm_shuffle_ps(xmm2_2, xmm3_4, 0xdd);
00604512              float xmm3_6[0x4] = (*(uint64_t*)(&esi_3->z + (arg4 << 1)) | (*(uint64_t*)(&esi_3->z + edx_2) << 0x40));
00604517              float xmm4_5[0x4] = _mm_shuffle_ps(xmm4_4, xmm3_6, 0xdd);
0060451b              float xmm2_5[0x4] = _mm_shuffle_ps(xmm4_4, xmm3_6, 0x88);
00604522              float var_80[0x4];
00604522              float xmm3_8[0x4] = __mulps_xmmps_memps(xmm4_5, var_80);
0060452a              float var_70[0x4];
0060452a              float xmm4_6[0x4] = __mulps_xmmps_memps(xmm4_5, var_70);
0060455b              float var_100[0x4];
0060455b              float var_c0[0x4];
0060455b              float xmm3_12[0x4] = _mm_add_ps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_140), __mulps_xmmps_memps(xmm1_2, var_100)), __mulps_xmmps_memps(xmm2_5, var_c0)), xmm3_8);
0060458b              float var_130[0x4];
0060458b              float var_f0[0x4];
0060458b              float var_b0[0x4];
0060458b              float xmm4_10[0x4] = _mm_add_ps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_130), __mulps_xmmps_memps(xmm1_2, var_f0)), __mulps_xmmps_memps(xmm2_5, var_b0)), xmm4_6);
00604596              float var_60[0x4];
00604596              float xmm4_12[0x4] = __mulps_xmmps_memps(xmm4_5, var_60);
0060459d              float var_120[0x4];
0060459d              float xmm7_8[0x4] = __mulps_xmmps_memps(xmm0_2, var_120);
006045a4              float var_110[0x4];
006045a4              float xmm0_3[0x4] = __mulps_xmmps_memps(xmm0_2, var_110);
006045b1              float var_e0[0x4];
006045b1              float xmm6_10[0x4] = __mulps_xmmps_memps(xmm1_2, var_e0);
006045b8              float var_d0[0x4];
006045b8              float xmm1_3[0x4] = __mulps_xmmps_memps(xmm1_2, var_d0);
006045c2              float var_a0[0x4];
006045c2              float xmm4_14[0x4] = __mulps_xmmps_memps(xmm2_5, var_a0);
006045c9              float var_90[0x4];
006045c9              float xmm2_6[0x4] = __mulps_xmmps_memps(xmm2_5, var_90);
006045cd              float xmm7_9[0x4] = _mm_add_ps(xmm7_8, xmm6_10);
006045d0              float xmm0_4[0x4] = _mm_add_ps(xmm0_3, xmm1_3);
006045d6              float xmm6_12[0x4] = _mm_add_ps(xmm7_9, xmm4_14);
006045d9              float xmm0_5[0x4] = _mm_add_ps(xmm0_4, xmm2_6);
006045df              float xmm4_16[0x4] = _mm_add_ps(xmm6_12, xmm4_12);
006045e6              float var_50[0x4];
006045e6              float xmm5_5[0x4] = __mulps_xmmps_memps(xmm4_5, var_50);
006045f0              int64_t xmm0_7 = __unpcklps_xmmps_memdq(xmm3_12, xmm4_10);
006045f4              int64_t xmm3_13 = __unpckhps_xmmps_memdq(xmm3_12, xmm4_10);
006045f8              float xmm2_8[0x4] = _mm_add_ps(xmm0_5, xmm5_5);
006045fe              result_1->x = xmm0_7;
006045fe              result_1->y = *(uint32_t*)((char*)xmm0_7)[4];
00604601              int64_t xmm1_5 = _mm_unpacklo_ps(xmm4_16, xmm2_8);
00604604              result_1->z = xmm1_5;
00604604              result_1->w = *(uint32_t*)((char*)xmm1_5)[4];
00604608              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_7 << 0x40));
0060460c              *(uint128_t*)(&result_1->z + arg2) = (*(uint64_t*)(&result_1->z + arg2) | (xmm1_5 << 0x40));
00604611              int64_t xmm4_17 = _mm_unpackhi_ps(xmm4_16, xmm2_8);
00604614              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm3_13;
00604618              uint32_t edx_3 = (arg2 * 3);
0060461b              *(uint64_t*)(&result_1->z + (arg2 << 1)) = xmm4_17;
00604620              *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm3_13 << 0x40));
00604624              *(uint128_t*)(&result_1->z + edx_3) = (*(uint64_t*)(&result_1->z + edx_3) | (xmm4_17 << 0x40));
0060462e              esi_3 += (arg4 << 2);
00604635              result_1 += (arg2 << 2);
00604637              i = i_2;
00604637              i_2 -= 1;
0060463a          } while (i != 1);
006044c4      }
006044c4      
0060464a      if (i_4 > 0)
0060464a      {
0060464c          int32_t i_3 = i_4;
00604662          int32_t i_1;
00604662          
00604662          do
00604662          {
00604654              sse2_D3DXVec4Transform(result_1, esi_3, arg5);
00604659              esi_3 += arg4;
0060465c              result_1 += arg2;
0060465f              i_1 = i_3;
0060465f              i_3 -= 1;
00604662          } while (i_1 != 1);
0060464a      }
0060464a      
0060466f      return result;
00604472  }


00604672  struct D3DXVECTOR3* __stdcall sse_D3DXVec3TransformNormalArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604672  {
00604677      int32_t ecx;
00604677      int32_t var_8 = ecx;
0060468a      int32_t esi;
0060468a      int32_t var_13c = esi;
0060468b      int32_t edi;
0060468b      int32_t var_140 = edi;
0060468c      struct D3DXVECTOR3* result_1 = arg1;
0060469b      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
0060469d      int32_t i_4 = (arg6 - esi_2);
0060469f      uint32_t i_5 = (esi_2 >> 2);
006046a5      struct D3DXVECTOR3* result = result_1;
006046a8      float var_130[0x4];
006046a8      
006046a8      if (i_5 != 0)
006046b7          KMATRIX::KMATRIX(&var_130, arg5);
006046b7      
006046c4      struct D3DXVECTOR3* esi_3;
006046c4      
006046c4      if ((i_5 == 0 || i_5 <= 0))
006047f6          esi_3 = arg3;
006046c4      else
006046c4      {
006046d2          uint32_t i_2 = i_5;
006046d5          esi_3 = arg3;
006047ee          uint32_t i;
006047ee          
006047ee          do
006047ee          {
006046d8              int64_t xmm2_2;
006046d8              xmm2_2 = esi_3->x;
006046d8              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
006046df              int64_t z = esi_3->z;
006046e7              float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
006046f1              uint32_t edx_2 = (arg4 * 3);
006046f4              float xmm2_4[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)(edx_2 + esi_3) << 0x40));
006046f8              float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0xdd);
006046fc              float xmm0_4[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0x88);
0060471e              float xmm1_7[0x4] = _mm_shuffle_ps((z | (*(uint32_t*)(&esi_3->z + arg4) << 0x40)), (*(uint32_t*)(&esi_3->z + (arg4 << 1)) | (*(uint32_t*)(&esi_3->z + edx_2) << 0x40)), 0x88);
00604725              float var_b0[0x4];
00604725              float xmm2_8[0x4] = __mulps_xmmps_memps(xmm1_7, var_b0);
00604732              float var_f0[0x4];
00604732              float xmm2_10[0x4] = __mulps_xmmps_memps(xmm1_3, var_f0);
00604749              float xmm2_12[0x4] = _mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_4, var_130), xmm2_10), xmm2_8);
0060474f              float var_a0[0x4];
0060474f              float xmm4_4[0x4] = __mulps_xmmps_memps(xmm1_7, var_a0);
00604756              float var_90[0x4];
00604756              float xmm1_8[0x4] = __mulps_xmmps_memps(xmm1_7, var_90);
0060475d              float var_110[0x4];
0060475d              float xmm0_5[0x4] = __mulps_xmmps_memps(xmm0_4, var_110);
00604764              float var_120[0x4];
00604764              float xmm6_2[0x4] = __mulps_xmmps_memps(xmm0_4, var_120);
00604771              float var_d0[0x4];
00604771              float xmm3_2[0x4] = __mulps_xmmps_memps(xmm1_3, var_d0);
00604778              float var_e0[0x4];
00604778              float xmm4_6[0x4] = __mulps_xmmps_memps(xmm1_3, var_e0);
00604782              float xmm0_7[0x4] = _mm_add_ps(_mm_add_ps(xmm0_5, xmm3_2), xmm1_8);
0060478b              float xmm4_8[0x4] = _mm_add_ps(_mm_add_ps(xmm6_2, xmm4_6), xmm4_4);
00604791              int64_t xmm3_4 = _mm_unpacklo_ps(xmm2_12, xmm4_8);
00604794              result_1->x = xmm3_4;
00604794              result_1->y = *(uint32_t*)((char*)xmm3_4)[4];
00604797              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm3_4 << 0x40));
0060479e              int32_t var_30[0x4];
0060479e              float xmm1_10[0x4] = __unpcklps_xmmps_memdq(xmm0_7, var_30);
006047a2              float xmm0_8[0x4] = __unpckhps_xmmps_memdq(xmm0_7, var_30);
006047a6              result_1->z = xmm1_10;
006047b1              *(uint32_t*)(&result_1->z + arg2) = ((int32_t)(xmm1_10 >> 0x40));
006047b7              int64_t xmm2_13 = _mm_unpackhi_ps(xmm2_12, xmm4_8);
006047ba              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_13;
006047be              uint32_t edx_3 = (arg2 * 3);
006047c1              *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm2_13 << 0x40));
006047c5              *(uint32_t*)(&result_1->z + (arg2 << 1)) = xmm0_8;
006047d7              *(uint32_t*)(&result_1->z + (arg2 * 3)) = ((int32_t)(xmm0_8 >> 0x40));
006047e2              esi_3 += (arg4 << 2);
006047e9              result_1 += (arg2 << 2);
006047eb              i = i_2;
006047eb              i_2 -= 1;
006047ee          } while (i != 1);
006046c4      }
006046c4      
006047fe      if (i_4 > 0)
006047fe      {
00604800          int32_t i_3 = i_4;
00604816          int32_t i_1;
00604816          
00604816          do
00604816          {
00604808              sse_D3DXVec3TransformNormal(result_1, esi_3, arg5);
0060480d              esi_3 += arg4;
00604810              result_1 += arg2;
00604813              i_1 = i_3;
00604813              i_3 -= 1;
00604816          } while (i_1 != 1);
006047fe      }
006047fe      
00604823      return result;
00604672  }


00604826  struct D3DXVECTOR3* __stdcall sse_D3DXVec3TransformCoordArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604826  {
0060482b      int32_t ecx;
0060482b      int32_t var_8 = ecx;
0060483e      int32_t esi;
0060483e      int32_t var_13c = esi;
0060483f      int32_t edi;
0060483f      int32_t var_140 = edi;
00604840      struct D3DXVECTOR3* result_1 = arg1;
0060484f      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
00604851      int32_t i_4 = (arg6 - esi_2);
00604853      uint32_t i_5 = (esi_2 >> 2);
00604859      struct D3DXVECTOR3* result = result_1;
0060485c      float var_130[0x4];
0060485c      
0060485c      if (i_5 != 0)
0060486b          KMATRIX::KMATRIX(&var_130, arg5);
0060486b      
00604878      struct D3DXVECTOR3* esi_3;
00604878      
00604878      if ((i_5 == 0 || i_5 <= 0))
006049fa          esi_3 = arg3;
00604878      else
00604878      {
00604886          uint32_t i_2 = i_5;
00604889          esi_3 = arg3;
006049f2          uint32_t i;
006049f2          
006049f2          do
006049f2          {
0060488c              int64_t xmm2_2;
0060488c              xmm2_2 = esi_3->x;
0060488c              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
00604893              int64_t z = esi_3->z;
0060489b              float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
006048a5              uint32_t edx_2 = (arg4 * 3);
006048a8              float xmm2_4[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)(edx_2 + esi_3) << 0x40));
006048ac              float xmm0_4[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0x88);
006048b0              float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0xdd);
006048d2              float xmm1_7[0x4] = _mm_shuffle_ps((z | (*(uint32_t*)(&esi_3->z + arg4) << 0x40)), (*(uint32_t*)(&esi_3->z + (arg4 << 1)) | (*(uint32_t*)(&esi_3->z + edx_2) << 0x40)), 0x88);
006048fd              float var_100[0x4];
006048fd              float var_c0[0x4];
006048fd              float var_80[0x4];
006048fd              float var_40[0x4];
006048fd              float xmm2_10[0x4] = __addps_xmmps_memps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_4, var_100), __mulps_xmmps_memps(xmm1_3, var_c0)), __mulps_xmmps_memps(xmm1_7, var_80)), var_40);
00604901              float xmm4_6[0x4] = _mm_rcp_ps(xmm2_10);
0060490a              float xmm5_6[0x4] = _mm_mul_ps(_mm_mul_ps(xmm4_6, xmm2_10), xmm4_6);
00604916              float xmm4_8[0x4] = _mm_sub_ps(_mm_add_ps(xmm4_6, xmm4_6), xmm5_6);
0060493a              float var_f0[0x4];
0060493a              float var_b0[0x4];
0060493a              float xmm6_4[0x4] = _mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_4, var_130), __mulps_xmmps_memps(xmm1_3, var_f0)), __mulps_xmmps_memps(xmm1_7, var_b0));
00604940              float var_110[0x4];
00604940              float xmm0_5[0x4] = __mulps_xmmps_memps(xmm0_4, var_110);
00604947              float var_120[0x4];
00604947              float xmm7_2[0x4] = __mulps_xmmps_memps(xmm0_4, var_120);
00604951              float var_70[0x4];
00604951              float xmm2_16[0x4] = __addps_xmmps_memps(xmm6_4, var_70);
00604958              float var_d0[0x4];
00604958              float xmm3_2[0x4] = __mulps_xmmps_memps(xmm1_3, var_d0);
0060495f              float var_e0[0x4];
0060495f              float xmm6_6[0x4] = __mulps_xmmps_memps(xmm1_3, var_e0);
00604966              float xmm0_6[0x4] = _mm_add_ps(xmm0_5, xmm3_2);
0060496c              float var_a0[0x4];
0060496c              float xmm5_10[0x4] = __mulps_xmmps_memps(xmm1_7, var_a0);
0060497a              float var_90[0x4];
0060497a              float var_50[0x4];
0060497a              float xmm0_8[0x4] = __addps_xmmps_memps(_mm_add_ps(xmm0_6, __mulps_xmmps_memps(xmm1_7, var_90)), var_50);
00604981              float xmm7_4[0x4] = _mm_add_ps(_mm_add_ps(xmm7_2, xmm6_6), xmm5_10);
00604984              float xmm2_17[0x4] = _mm_mul_ps(xmm2_16, xmm4_8);
0060498e              float var_60[0x4];
0060498e              float xmm5_13[0x4] = _mm_mul_ps(__addps_xmmps_memps(xmm7_4, var_60), xmm4_8);
00604994              int64_t xmm3_4 = _mm_unpacklo_ps(xmm2_17, xmm5_13);
00604997              result_1->x = xmm3_4;
00604997              result_1->y = *(uint32_t*)((char*)xmm3_4)[4];
0060499a              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm3_4 << 0x40));
0060499e              float xmm0_9[0x4] = _mm_mul_ps(xmm0_8, xmm4_8);
006049a4              float xmm1_10[0x4] = _mm_unpacklo_ps(xmm0_9, xmm4_8);
006049a7              result_1->z = xmm1_10;
006049b2              *(uint32_t*)(&result_1->z + arg2) = ((int32_t)(xmm1_10 >> 0x40));
006049b8              int64_t xmm2_18 = _mm_unpackhi_ps(xmm2_17, xmm5_13);
006049bb              float xmm0_10[0x4] = _mm_unpackhi_ps(xmm0_9, xmm4_8);
006049be              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_18;
006049c2              uint32_t edx_3 = (arg2 * 3);
006049c5              *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm2_18 << 0x40));
006049c9              *(uint32_t*)(&result_1->z + (arg2 << 1)) = xmm0_10;
006049db              *(uint32_t*)(&result_1->z + (arg2 * 3)) = ((int32_t)(xmm0_10 >> 0x40));
006049e6              esi_3 += (arg4 << 2);
006049ed              result_1 += (arg2 << 2);
006049ef              i = i_2;
006049ef              i_2 -= 1;
006049f2          } while (i != 1);
00604878      }
00604878      
00604a02      if (i_4 > 0)
00604a02      {
00604a04          int32_t i_3 = i_4;
00604a1a          int32_t i_1;
00604a1a          
00604a1a          do
00604a1a          {
00604a0c              sse2_D3DXVec3TransformCoord(result_1, esi_3, arg5);
00604a11              esi_3 += arg4;
00604a14              result_1 += arg2;
00604a17              i_1 = i_3;
00604a17              i_3 -= 1;
00604a1a          } while (i_1 != 1);
00604a02      }
00604a02      
00604a27      return result;
00604826  }


00604a2a  int32_t sub_604a2a(int64_t arg1 @ st0, int64_t arg2 @ st1, float arg3[0x2] @ xmm0, float arg4[0x2] @ xmm2, float arg5[0x2] @ xmm3)

00604a2a  {
00604a3e      int64_t st6 = (data_827ee0 & arg1);
00604a44      int64_t st2 = (data_827ef0 & arg1);
00604a47      arg1 &= data_827ed0;
00604a58      st2 |= (_m_pcmpeqw(st6, 0) & !(data_827ec0));
00604a5e      int64_t temp0_1 = __pmaxsw_mmxq_memq(st6, data_827f00);
00604a65      int64_t st4 = data_827f10;
00604a6f      st6 = _m_punpcklwd(temp0_1, 0);
00604a72      int64_t temp0_3 = __punpckhwd_mmxq_mmxd(temp0_1, 0);
00604a78      uint16_t temp0_4[0x4] = _m_punpcklwd(0, arg1);
00604a7b      int64_t temp0_5 = __punpckhwd_mmxq_mmxd(0, arg1);
00604a7e      int64_t temp0_6 = _m_paddd(st6, st4);
00604a81      int64_t temp0_7 = _m_paddd(temp0_3, st4);
00604a9f      int128_t xmm1_1 = ((_m_pslldi(temp0_6, 0xd) | temp0_4) | ((_m_pslldi(temp0_7, 0xd) | temp0_5) << 0x40));
00604aa7      int64_t st7 = st2;
00604aaa      st2 = _m_punpcklwd(st2, 0);
00604aad      int64_t temp0_11 = __punpckhwd_mmxq_mmxd(st7, 0);
00604ab0      float xmm0[0x2] = _mm_cvtpi32_ps(arg3, st2);
00604ab3      float xmm2[0x2] = _mm_cvtpi32_ps(arg4, temp0_11);
00604ab9      _mm_mul_ps((xmm0 | (xmm2 << 0x40)), xmm1_1);
00604ad0      st6 = (data_827ee0 & arg2);
00604ad9      arg1 = (arg2 & data_827ed0);
00604aea      st2 = ((data_827ef0 & arg2) | (_m_pcmpeqw(st6, 0) & !(data_827ec0)));
00604af0      int64_t temp0_13 = __pmaxsw_mmxq_memq(st6, data_827f00);
00604af7      st4 = data_827f10;
00604b01      st6 = _m_punpcklwd(temp0_13, 0);
00604b04      int64_t temp0_15 = __punpckhwd_mmxq_mmxd(temp0_13, 0);
00604b0a      uint16_t temp0_16[0x4] = _m_punpcklwd(0, arg1);
00604b0d      int64_t temp0_17 = __punpckhwd_mmxq_mmxd(0, arg1);
00604b10      int64_t temp0_18 = _m_paddd(st6, st4);
00604b13      int64_t temp0_19 = _m_paddd(temp0_15, st4);
00604b31      int128_t xmm1_3 = ((_m_pslldi(temp0_18, 0xd) | temp0_16) | ((_m_pslldi(temp0_19, 0xd) | temp0_17) << 0x40));
00604b39      st7 = st2;
00604b3c      st2 = _m_punpcklwd(st2, 0);
00604b3f      int64_t temp0_23 = __punpckhwd_mmxq_mmxd(st7, 0);
00604b4b      _mm_mul_ps((_mm_cvtpi32_ps(arg5, st2) | (_mm_cvtpi32_ps(xmm2, temp0_23) << 0x40)), xmm1_3);
00604a2a  }


00604b54  float* __stdcall sse_D3DXFloat16To32Array(float* arg1, struct D3DXFLOAT16 const* arg2, uint32_t arg3)

00604b54  {
00604b62      int32_t edi;
00604b62      int32_t var_1c = edi;
00604b66      float* result = arg1;
00604b66      
00604b69      if (arg3 >= 8)
00604b69      {
00604b6e          int32_t i_2 = (arg3 & 0xfffffff8);
00604b74          int32_t i_1 = i_2;
00604b77          struct D3DXFLOAT16* eax_1 = arg2;
00604b7a          float* ecx_1 = arg1;
00604ba1          int32_t i;
00604ba1          
00604ba1          do
00604ba1          {
00604b7d              int80_t st0;
00604b7d              st0 = eax_1->value;
00604b80              int80_t st1;
00604b80              st1 = *(int32_t*)((char*)eax_1 + 8);
00604b84              eax_1 = &eax_1[8];
00604b87              float xmm0[0x2];
00604b87              float xmm2[0x2];
00604b87              float xmm3[0x2];
00604b87              int64_t x87_r0;
00604b87              int64_t x87_r1;
00604b87              xmm0 = sub_604a2a(x87_r0, x87_r1, xmm0, xmm2, xmm3);
00604b8c              *(uint64_t*)ecx_1 = xmm0;
00604b8f              *(uint128_t*)((char*)ecx_1 + 8) = (*(uint64_t*)((char*)ecx_1 + 8) | (xmm0 << 0x40));
00604b93              *(uint64_t*)((char*)ecx_1 + 0x10) = xmm3;
00604b97              *(uint128_t*)((char*)ecx_1 + 0x18) = (*(uint64_t*)((char*)ecx_1 + 0x18) | (xmm3 << 0x40));
00604b9b              ecx_1 = &ecx_1[8];
00604b9e              i = i_1;
00604b9e              i_1 -= 8;
00604ba1          } while (i != 8);
00604ba8          arg3 -= i_2;
00604bae          arg2 = &arg2[i_2];
00604bb4          arg1 = &arg1[i_2];
00604b69      }
00604b69      
00604bb7      int32_t ebx = 0;
00604bb7      
00604bbc      if (arg3 > 0)
00604bbc      {
00604c1e          do
00604c1e          {
00604bc6              uint32_t value = ((uint32_t)arg2[ebx].value);
00604bce              int32_t edx_2 = (value & 0x7c00);
00604bdf              int32_t eax_7 = -(edx_2);
00604beb              int32_t eax_10 = (((eax_7 - eax_7) & 0x400) | (value & 0x3ff));
00604beb              
00604bef              if (edx_2 <= 0x400)
00604bf1                  edx_2 = 0x400;
00604bf1              
00604c03              long double x87_r7_1 = ((long double)eax_10);
00604c03              
00604c09              if (eax_10 < 0)
00604c0b                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
00604c0b              
00604c17              arg1[ebx] = ((float)(x87_r7_1 * ((long double)(((edx_2 + 0x19800) << 0xd) | ((value & 0xffff8000) << 0x10)))));
00604c1a              ebx += 1;
00604c1e          } while (ebx < arg3);
00604bbc      }
00604bbc      
00604c27      return result;
00604b54  }


00604c2a  struct D3DXVECTOR4* __stdcall sse2_D3DXVec3TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604c2a  {
00604c2f      int32_t ecx;
00604c2f      int32_t var_8 = ecx;
00604c42      int32_t esi;
00604c42      int32_t var_13c = esi;
00604c43      int32_t edi;
00604c43      int32_t var_140 = edi;
00604c44      struct D3DXVECTOR4* result_1 = arg1;
00604c53      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
00604c55      int32_t i_4 = (arg6 - esi_2);
00604c57      uint32_t i_5 = (esi_2 >> 2);
00604c5d      struct D3DXVECTOR4* result = result_1;
00604c60      float var_130[0x4];
00604c60      
00604c60      if (i_5 != 0)
00604c6f          KMATRIX::KMATRIX(&var_130, arg5);
00604c6f      
00604c7c      struct D3DXVECTOR3* esi_3;
00604c7c      
00604c7c      if ((i_5 == 0 || i_5 <= 0))
00604dcd          esi_3 = arg3;
00604c7c      else
00604c7c      {
00604c8a          uint32_t i_2 = i_5;
00604c8d          esi_3 = arg3;
00604dc5          uint32_t i;
00604dc5          
00604dc5          do
00604dc5          {
00604c94              int64_t xmm2_2;
00604c94              xmm2_2 = esi_3->x;
00604c94              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
00604c9a              float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
00604ca1              int64_t z = esi_3->z;
00604ca9              uint32_t edx_2 = (arg4 * 3);
00604cac              float xmm2_4[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)(edx_2 + esi_3) << 0x40));
00604cb0              float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0xdd);
00604cb4              float xmm0_2[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0x88);
00604cd6              float xmm1_7[0x4] = _mm_shuffle_ps((z | (*(uint32_t*)(&esi_3->z + arg4) << 0x40)), (*(uint32_t*)(&esi_3->z + (arg4 << 1)) | (*(uint32_t*)(&esi_3->z + edx_2) << 0x40)), 0x88);
00604cdd              float var_f0[0x4];
00604cdd              float xmm3_5[0x4] = __mulps_xmmps_memps(xmm1_3, var_f0);
00604d04              float var_b0[0x4];
00604d04              float var_70[0x4];
00604d04              float xmm2_10[0x4] = __addps_xmmps_memps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_130), xmm3_5), __mulps_xmmps_memps(xmm1_7, var_b0)), var_70);
00604d0b              float var_e0[0x4];
00604d0b              float xmm5_5[0x4] = __mulps_xmmps_memps(xmm1_3, var_e0);
00604d2f              float var_120[0x4];
00604d2f              float var_a0[0x4];
00604d2f              float var_60[0x4];
00604d2f              float xmm5_8[0x4] = __addps_xmmps_memps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_120), xmm5_5), __mulps_xmmps_memps(xmm1_7, var_a0)), var_60);
00604d36              float var_d0[0x4];
00604d36              float xmm6_5[0x4] = __mulps_xmmps_memps(xmm1_3, var_d0);
00604d3d              float var_c0[0x4];
00604d3d              float xmm4_2[0x4] = __mulps_xmmps_memps(xmm1_3, var_c0);
00604d47              float var_110[0x4];
00604d47              float xmm7_2[0x4] = __mulps_xmmps_memps(xmm0_2, var_110);
00604d4e              float var_100[0x4];
00604d4e              float xmm0_3[0x4] = __mulps_xmmps_memps(xmm0_2, var_100);
00604d58              float var_90[0x4];
00604d58              float xmm3_11[0x4] = __mulps_xmmps_memps(xmm1_7, var_90);
00604d5c              float var_80[0x4];
00604d5c              float xmm1_8[0x4] = __mulps_xmmps_memps(xmm1_7, var_80);
00604d60              float xmm0_4[0x4] = _mm_add_ps(xmm0_3, xmm4_2);
00604d69              float xmm6_7[0x4] = _mm_add_ps(_mm_add_ps(xmm7_2, xmm6_5), xmm3_11);
00604d72              float var_40[0x4];
00604d72              float xmm4_5[0x4] = __addps_xmmps_memps(_mm_add_ps(xmm0_4, xmm1_8), var_40);
00604d79              float var_50[0x4];
00604d79              float xmm3_13[0x4] = __addps_xmmps_memps(xmm6_7, var_50);
00604d80              int64_t xmm0_6 = _mm_unpacklo_ps(xmm2_10, xmm5_8);
00604d83              result_1->x = xmm0_6;
00604d83              result_1->y = *(uint32_t*)((char*)xmm0_6)[4];
00604d89              int64_t xmm1_10 = _mm_unpacklo_ps(xmm3_13, xmm4_5);
00604d8c              result_1->z = xmm1_10;
00604d8c              result_1->w = *(uint32_t*)((char*)xmm1_10)[4];
00604d90              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_6 << 0x40));
00604d94              *(uint128_t*)(&result_1->z + arg2) = (*(uint64_t*)(&result_1->z + arg2) | (xmm1_10 << 0x40));
00604d99              int64_t xmm2_11 = _mm_unpackhi_ps(xmm2_10, xmm5_8);
00604d9c              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_11;
00604da0              uint32_t edx_3 = (arg2 * 3);
00604da3              int64_t xmm3_14 = _mm_unpackhi_ps(xmm3_13, xmm4_5);
00604da6              *(uint64_t*)(&result_1->z + (arg2 << 1)) = xmm3_14;
00604dab              *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm2_11 << 0x40));
00604daf              *(uint128_t*)(&result_1->z + edx_3) = (*(uint64_t*)(&result_1->z + edx_3) | (xmm3_14 << 0x40));
00604db9              esi_3 += (arg4 << 2);
00604dc0              result_1 += (arg2 << 2);
00604dc2              i = i_2;
00604dc2              i_2 -= 1;
00604dc5          } while (i != 1);
00604c7c      }
00604c7c      
00604dd5      if (i_4 > 0)
00604dd5      {
00604dd7          int32_t i_3 = i_4;
00604ded          int32_t i_1;
00604ded          
00604ded          do
00604ded          {
00604ddf              sse_D3DXVec3Transform(result_1, esi_3, arg5);
00604de4              esi_3 += arg4;
00604de7              result_1 += arg2;
00604dea              i_1 = i_3;
00604dea              i_3 -= 1;
00604ded          } while (i_1 != 1);
00604dd5      }
00604dd5      
00604dfa      return result;
00604c2a  }


00604dfd  struct D3DXVECTOR4* __stdcall sse2_D3DXVec2TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604dfd  {
00604dff      int32_t __saved_ebx_1;
00604dff      int32_t __saved_ebx = __saved_ebx_1;
00604e02      int32_t ecx;
00604e02      int32_t var_8 = ecx;
00604e09      int32_t __saved_ebp_1;
00604e09      int32_t __saved_ebp = __saved_ebp_1;
00604e15      int32_t esi;
00604e15      int32_t var_13c = esi;
00604e16      struct D3DXVECTOR4* result_1 = arg1;
00604e19      int32_t edi;
00604e19      int32_t var_140 = edi;
00604e1d      int32_t var_144 = 0xa;
00604e21      int32_t* esp_1 = &var_140;
00604e29      int32_t ecx_2 = ((0xa - 0xa) & (arg6 & 0xfffffffc));
00604e2b      int32_t i_4 = (arg6 - ecx_2);
00604e2d      uint32_t i_5 = (ecx_2 >> 2);
00604e36      struct D3DXVECTOR4* result = result_1;
00604e36      
00604e39      if (i_5 != 0)
00604e39      {
00604e48          float var_130[0x4];
00604e48          KMATRIX::KMATRIX(&var_130, arg5);
00604e48          esp_1 = &var_140;
00604e48          
00604e55          if (i_5 > 0)
00604e55          {
00604e63              uint32_t i_2 = i_5;
00604f46              uint32_t i;
00604f46              
00604f46              do
00604f46              {
00604e6d                  int64_t xmm2_2;
00604e6d                  xmm2_2 = arg3->x;
00604e6d                  *(uint32_t*)((char*)xmm2_2)[4] = arg3->y;
00604e73                  float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)arg3 + arg4) << 0x40));
00604e80                  float xmm2_4[0x4] = (*(uint64_t*)((char*)arg3 + (arg4 << 1)) | (*(uint64_t*)((arg4 * 3) + arg3) << 0x40));
00604e84                  float xmm0_2[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0x88);
00604e88                  float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0xdd);
00604ea6                  float var_f0[0x4];
00604ea6                  float var_70[0x4];
00604ea6                  float xmm2_8[0x4] = __addps_xmmps_memps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_130), __mulps_xmmps_memps(xmm1_3, var_f0)), var_70);
00604ec1                  float var_120[0x4];
00604ec1                  float var_e0[0x4];
00604ec1                  float var_60[0x4];
00604ec1                  float xmm4_4[0x4] = __addps_xmmps_memps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_120), __mulps_xmmps_memps(xmm1_3, var_e0)), var_60);
00604ec8                  float var_110[0x4];
00604ec8                  float xmm5_2[0x4] = __mulps_xmmps_memps(xmm0_2, var_110);
00604ecf                  float var_100[0x4];
00604ecf                  float xmm0_3[0x4] = __mulps_xmmps_memps(xmm0_2, var_100);
00604ed9                  float var_d0[0x4];
00604ed9                  float xmm3_9[0x4] = __mulps_xmmps_memps(xmm1_3, var_d0);
00604ee0                  float var_c0[0x4];
00604ee0                  float xmm1_4[0x4] = __mulps_xmmps_memps(xmm1_3, var_c0);
00604ee7                  float xmm5_3[0x4] = _mm_add_ps(xmm5_2, xmm3_9);
00604eea                  float xmm0_4[0x4] = _mm_add_ps(xmm0_3, xmm1_4);
00604ef0                  float var_50[0x4];
00604ef0                  float xmm3_11[0x4] = __addps_xmmps_memps(xmm5_3, var_50);
00604ef7                  float var_40[0x4];
00604ef7                  float xmm5_5[0x4] = __addps_xmmps_memps(xmm0_4, var_40);
00604efe                  int64_t xmm0_6 = _mm_unpacklo_ps(xmm2_8, xmm4_4);
00604f01                  result_1->x = xmm0_6;
00604f01                  result_1->y = *(uint32_t*)((char*)xmm0_6)[4];
00604f07                  int64_t xmm1_6 = _mm_unpacklo_ps(xmm3_11, xmm5_5);
00604f0a                  result_1->z = xmm1_6;
00604f0a                  result_1->w = *(uint32_t*)((char*)xmm1_6)[4];
00604f0e                  *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_6 << 0x40));
00604f12                  *(uint128_t*)(&result_1->z + arg2) = (*(uint64_t*)(&result_1->z + arg2) | (xmm1_6 << 0x40));
00604f17                  int64_t xmm2_9 = _mm_unpackhi_ps(xmm2_8, xmm4_4);
00604f1a                  *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_9;
00604f1e                  uint32_t edx_3 = (arg2 * 3);
00604f21                  int64_t xmm3_12 = _mm_unpackhi_ps(xmm3_11, xmm5_5);
00604f24                  *(uint64_t*)(&result_1->z + (arg2 << 1)) = xmm3_12;
00604f29                  *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm2_9 << 0x40));
00604f2d                  *(uint128_t*)(&result_1->z + edx_3) = (*(uint64_t*)(&result_1->z + edx_3) | (xmm3_12 << 0x40));
00604f39                  arg3 += (arg4 << 2);
00604f41                  result_1 += (arg2 << 2);
00604f43                  i = i_2;
00604f43                  i_2 -= 1;
00604f46              } while (i != 1);
00604e55          }
00604e39      }
00604e39      
00604f51      if (i_4 > 0)
00604f51      {
00604f53          int32_t i_3 = i_4;
00604f6d          int32_t i_1;
00604f6d          
00604f6d          do
00604f6d          {
00604f56              *(uint32_t*)((char*)esp_1 - 4) = arg5;
00604f59              *(uint32_t*)((char*)esp_1 - 8) = arg3;
00604f5c              *(uint32_t*)((char*)esp_1 - 0xc) = result_1;
00604f5d              _D3DXVec2Transform@12();
00604f5d              esp_1 -= 8;
00604f65              arg3 += arg4;
00604f68              result_1 += arg2;
00604f6a              i_1 = i_3;
00604f6a              i_3 -= 1;
00604f6d          } while (i_1 != 1);
00604f51      }
00604f51      
00604f72      *(uint32_t*)esp_1;
00604f72      esp_1[1];
00604f7a      return result;
00604dfd  }


00604f7d  struct D3DXVECTOR2* __stdcall sse2_D3DXVec2TransformCoordArray(struct D3DXVECTOR2* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

00604f7d  {
00604f7f      int32_t __saved_ebx_1;
00604f7f      int32_t __saved_ebx = __saved_ebx_1;
00604f82      int32_t ecx;
00604f82      int32_t var_8 = ecx;
00604f89      int32_t __saved_ebp_1;
00604f89      int32_t __saved_ebp = __saved_ebp_1;
00604f95      int32_t esi;
00604f95      int32_t var_13c = esi;
00604f96      int32_t edi;
00604f96      int32_t var_140 = edi;
00604f97      struct D3DXVECTOR2* result_1 = arg1;
00604f9a      int32_t var_144 = 0xa;
00604fa1      int32_t* esp_1 = &var_140;
00604fa6      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
00604fa8      int32_t i_4 = (arg6 - esi_2);
00604faa      uint32_t i_5 = (esi_2 >> 2);
00604fb0      struct D3DXVECTOR2* result = result_1;
00604fb3      float var_130[0x4];
00604fb3      
00604fb3      if (i_5 != 0)
00604fb3      {
00604fc2          KMATRIX::KMATRIX(&var_130, arg5);
00604fc2          esp_1 = &var_140;
00604fb3      }
00604fb3      
00604fcf      struct D3DXVECTOR2* esi_3;
00604fcf      
00604fcf      if ((i_5 == 0 || i_5 <= 0))
006050a9          esi_3 = arg3;
00604fcf      else
00604fcf      {
00604fdd          uint32_t i_2 = i_5;
00604fe0          esi_3 = arg3;
006050a1          uint32_t i;
006050a1          
006050a1          do
006050a1          {
00604fe3              int64_t xmm2_2;
00604fe3              xmm2_2 = esi_3->x;
00604fe3              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
00604fed              float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
00604ff7              float xmm4_3[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)((arg4 * 3) + esi_3) << 0x40));
00604ffb              float xmm0_2[0x4] = _mm_shuffle_ps(xmm1_2, xmm4_3, 0x88);
00604fff              float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm4_3, 0xdd);
00605006              float var_c0[0x4];
00605006              float xmm2_4[0x4] = __mulps_xmmps_memps(xmm1_3, var_c0);
0060501d              float var_100[0x4];
0060501d              float var_40[0x4];
0060501d              float xmm2_6[0x4] = __addps_xmmps_memps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_100), xmm2_4), var_40);
00605021              float xmm3_4[0x4] = _mm_rcp_ps(xmm2_6);
0060502a              float xmm5_3[0x4] = _mm_mul_ps(_mm_mul_ps(xmm3_4, xmm2_6), xmm3_4);
00605036              float xmm3_6[0x4] = _mm_sub_ps(_mm_add_ps(xmm3_4, xmm3_4), xmm5_3);
0060503c              float var_f0[0x4];
0060503c              float xmm2_10[0x4] = __mulps_xmmps_memps(xmm1_3, var_f0);
00605043              float var_e0[0x4];
00605043              float xmm1_4[0x4] = __mulps_xmmps_memps(xmm1_3, var_e0);
0060504d              float var_120[0x4];
0060504d              float xmm0_3[0x4] = __mulps_xmmps_memps(xmm0_2, var_120);
0060505b              float xmm5_6[0x4] = _mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_130), xmm2_10);
00605064              float var_60[0x4];
00605064              float xmm1_6[0x4] = __addps_xmmps_memps(_mm_add_ps(xmm0_3, xmm1_4), var_60);
0060506f              float var_70[0x4];
0060506f              float xmm2_13[0x4] = _mm_mul_ps(__addps_xmmps_memps(xmm5_6, var_70), xmm3_6);
00605072              float xmm1_7[0x4] = _mm_mul_ps(xmm1_6, xmm3_6);
00605078              struct D3DXVECTOR2 xmm0_6 = _mm_unpacklo_ps(xmm2_13, xmm1_7);
0060507b              result_1->x = xmm0_6.x;
0060507b              result_1->y = xmm0_6.y;
0060507e              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_6 << 0x40));
00605082              int64_t xmm2_14 = _mm_unpackhi_ps(xmm2_13, xmm1_7);
00605085              int128_t* edx_3 = (arg2 * 3);
00605088              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_14;
0060508c              *(uint128_t*)((char*)edx_3 + result_1) = (*(uint64_t*)((char*)edx_3 + result_1) | (xmm2_14 << 0x40));
00605095              esi_3 += (arg4 << 2);
0060509c              result_1 += (arg2 << 2);
0060509e              i = i_2;
0060509e              i_2 -= 1;
006050a1          } while (i != 1);
00604fcf      }
00604fcf      
006050b1      if (i_4 > 0)
006050b1      {
006050b3          int32_t i_3 = i_4;
006050c9          int32_t i_1;
006050c9          
006050c9          do
006050c9          {
006050b6              *(uint32_t*)((char*)esp_1 - 4) = arg5;
006050b9              *(uint32_t*)((char*)esp_1 - 8) = esi_3;
006050ba              *(uint32_t*)((char*)esp_1 - 0xc) = result_1;
006050bb              _D3DXVec2TransformCoord@12();
006050bb              esp_1 -= 8;
006050c0              esi_3 += arg4;
006050c3              result_1 += arg2;
006050c6              i_1 = i_3;
006050c6              i_3 -= 1;
006050c9          } while (i_1 != 1);
006050b1      }
006050b1      
006050ce      *(uint32_t*)esp_1;
006050ce      esp_1[1];
006050d6      return result;
00604f7d  }


006050d9  struct D3DXVECTOR2* __stdcall sse2_D3DXVec2TransformNormalArray(struct D3DXVECTOR2* arg1, uint32_t arg2, struct D3DXVECTOR2 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

006050d9  {
006050db      int32_t __saved_ebx_1;
006050db      int32_t __saved_ebx = __saved_ebx_1;
006050de      int32_t ecx;
006050de      int32_t var_8 = ecx;
006050e5      int32_t __saved_ebp_1;
006050e5      int32_t __saved_ebp = __saved_ebp_1;
006050f1      int32_t esi;
006050f1      int32_t var_13c = esi;
006050f2      int32_t edi;
006050f2      int32_t var_140 = edi;
006050f3      struct D3DXVECTOR2* result_1 = arg1;
006050f6      int32_t var_144 = 0xa;
006050fd      int32_t* esp_1 = &var_140;
00605102      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
00605104      int32_t i_4 = (arg6 - esi_2);
00605106      uint32_t i_5 = (esi_2 >> 2);
0060510c      struct D3DXVECTOR2* result = result_1;
0060510f      float var_130[0x4];
0060510f      
0060510f      if (i_5 != 0)
0060510f      {
0060511e          KMATRIX::KMATRIX(&var_130, arg5);
0060511e          esp_1 = &var_140;
0060510f      }
0060510f      
0060512b      struct D3DXVECTOR2* esi_3;
0060512b      
0060512b      if ((i_5 == 0 || i_5 <= 0))
006051ba          esi_3 = arg3;
0060512b      else
0060512b      {
00605139          uint32_t i_2 = i_5;
0060513c          esi_3 = arg3;
006051b6          uint32_t i;
006051b6          
006051b6          do
006051b6          {
0060513f              int64_t xmm2_2;
0060513f              xmm2_2 = esi_3->x;
0060513f              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
00605149              float xmm0_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
00605153              float xmm3_3[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)((arg4 * 3) + esi_3) << 0x40));
00605157              float xmm0_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm3_3, 0xdd);
0060515e              float var_f0[0x4];
0060515e              float xmm2_4[0x4] = __mulps_xmmps_memps(xmm0_3, var_f0);
00605165              float var_e0[0x4];
00605165              float xmm0_4[0x4] = __mulps_xmmps_memps(xmm0_3, var_e0);
0060516f              float xmm1_2[0x4] = _mm_shuffle_ps(xmm0_2, xmm3_3, 0x88);
00605176              float xmm2_6[0x4] = __mulps_xmmps_memps(xmm1_2, var_130);
00605184              float var_120[0x4];
00605184              float xmm1_4[0x4] = _mm_add_ps(__mulps_xmmps_memps(xmm1_2, var_120), xmm0_4);
00605187              float xmm2_7[0x4] = _mm_add_ps(xmm2_6, xmm2_4);
0060518d              struct D3DXVECTOR2 xmm0_6 = _mm_unpacklo_ps(xmm2_7, xmm1_4);
00605190              result_1->x = xmm0_6.x;
00605190              result_1->y = xmm0_6.y;
00605193              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_6 << 0x40));
00605197              int64_t xmm2_8 = _mm_unpackhi_ps(xmm2_7, xmm1_4);
0060519a              int128_t* edx_3 = (arg2 * 3);
0060519d              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_8;
006051a1              *(uint128_t*)((char*)edx_3 + result_1) = (*(uint64_t*)((char*)edx_3 + result_1) | (xmm2_8 << 0x40));
006051aa              esi_3 += (arg4 << 2);
006051b1              result_1 += (arg2 << 2);
006051b3              i = i_2;
006051b3              i_2 -= 1;
006051b6          } while (i != 1);
0060512b      }
0060512b      
006051c2      if (i_4 > 0)
006051c2      {
006051c4          int32_t i_3 = i_4;
006051da          int32_t i_1;
006051da          
006051da          do
006051da          {
006051c7              *(uint32_t*)((char*)esp_1 - 4) = arg5;
006051ca              *(uint32_t*)((char*)esp_1 - 8) = esi_3;
006051cb              *(uint32_t*)((char*)esp_1 - 0xc) = result_1;
006051cc              _D3DXVec2TransformNormal@12();
006051cc              esp_1 -= 8;
006051d1              esi_3 += arg4;
006051d4              result_1 += arg2;
006051d7              i_1 = i_3;
006051d7              i_3 -= 1;
006051da          } while (i_1 != 1);
006051c2      }
006051c2      
006051df      *(uint32_t*)esp_1;
006051df      esp_1[1];
006051e7      return result;
006050d9  }


006051ea  struct D3DXVECTOR4* __stdcall sse2_D3DXVec4TransformArray(struct D3DXVECTOR4* arg1, uint32_t arg2, struct D3DXVECTOR4 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

006051ea  {
006051ef      int32_t ecx;
006051ef      int32_t var_8 = ecx;
00605202      int32_t esi;
00605202      int32_t var_14c = esi;
00605203      int32_t edi;
00605203      int32_t var_150 = edi;
00605204      struct D3DXVECTOR4* result_1 = arg1;
00605213      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
00605215      int32_t i_4 = (arg6 - esi_2);
00605217      uint32_t i_5 = (esi_2 >> 2);
0060521d      struct D3DXVECTOR4* result = result_1;
00605220      float var_140[0x4];
00605220      
00605220      if (i_5 != 0)
0060522f          KMATRIX::KMATRIX(&var_140, arg5);
0060522f      
0060523c      struct D3DXVECTOR4* esi_3;
0060523c      
0060523c      if ((i_5 == 0 || i_5 <= 0))
006053ba          esi_3 = arg3;
0060523c      else
0060523c      {
0060524a          uint32_t i_2 = i_5;
0060524d          esi_3 = arg3;
006053b2          uint32_t i;
006053b2          
006053b2          do
006053b2          {
00605254              int64_t xmm3_2;
00605254              xmm3_2 = esi_3->x;
00605254              *(uint32_t*)((char*)xmm3_2)[4] = esi_3->y;
0060525a              float xmm2_2[0x4] = (xmm3_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
00605267              int64_t xmm2_3;
00605267              xmm2_3 = esi_3->z;
00605267              *(uint32_t*)((char*)xmm2_3)[4] = esi_3->w;
0060526e              float xmm4_4[0x4] = (xmm2_3 | (*(uint64_t*)(&esi_3->z + arg4) << 0x40));
00605276              uint32_t edx_2 = (arg4 * 3);
00605279              float xmm3_4[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)(edx_2 + esi_3) << 0x40));
0060527d              float xmm0_2[0x4] = _mm_shuffle_ps(xmm2_2, xmm3_4, 0x88);
00605281              float xmm1_2[0x4] = _mm_shuffle_ps(xmm2_2, xmm3_4, 0xdd);
0060528a              float xmm3_6[0x4] = (*(uint64_t*)(&esi_3->z + (arg4 << 1)) | (*(uint64_t*)(&esi_3->z + edx_2) << 0x40));
0060528f              float xmm4_5[0x4] = _mm_shuffle_ps(xmm4_4, xmm3_6, 0xdd);
00605293              float xmm2_5[0x4] = _mm_shuffle_ps(xmm4_4, xmm3_6, 0x88);
0060529a              float var_80[0x4];
0060529a              float xmm3_8[0x4] = __mulps_xmmps_memps(xmm4_5, var_80);
006052a2              float var_70[0x4];
006052a2              float xmm4_6[0x4] = __mulps_xmmps_memps(xmm4_5, var_70);
006052d3              float var_100[0x4];
006052d3              float var_c0[0x4];
006052d3              float xmm3_12[0x4] = _mm_add_ps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_140), __mulps_xmmps_memps(xmm1_2, var_100)), __mulps_xmmps_memps(xmm2_5, var_c0)), xmm3_8);
00605303              float var_130[0x4];
00605303              float var_f0[0x4];
00605303              float var_b0[0x4];
00605303              float xmm4_10[0x4] = _mm_add_ps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_2, var_130), __mulps_xmmps_memps(xmm1_2, var_f0)), __mulps_xmmps_memps(xmm2_5, var_b0)), xmm4_6);
0060530e              float var_60[0x4];
0060530e              float xmm4_12[0x4] = __mulps_xmmps_memps(xmm4_5, var_60);
00605315              float var_120[0x4];
00605315              float xmm7_8[0x4] = __mulps_xmmps_memps(xmm0_2, var_120);
0060531c              float var_110[0x4];
0060531c              float xmm0_3[0x4] = __mulps_xmmps_memps(xmm0_2, var_110);
00605329              float var_e0[0x4];
00605329              float xmm6_10[0x4] = __mulps_xmmps_memps(xmm1_2, var_e0);
00605330              float var_d0[0x4];
00605330              float xmm1_3[0x4] = __mulps_xmmps_memps(xmm1_2, var_d0);
0060533a              float var_a0[0x4];
0060533a              float xmm4_14[0x4] = __mulps_xmmps_memps(xmm2_5, var_a0);
00605341              float var_90[0x4];
00605341              float xmm2_6[0x4] = __mulps_xmmps_memps(xmm2_5, var_90);
00605345              float xmm7_9[0x4] = _mm_add_ps(xmm7_8, xmm6_10);
00605348              float xmm0_4[0x4] = _mm_add_ps(xmm0_3, xmm1_3);
0060534e              float xmm6_12[0x4] = _mm_add_ps(xmm7_9, xmm4_14);
00605351              float xmm0_5[0x4] = _mm_add_ps(xmm0_4, xmm2_6);
00605357              float xmm4_16[0x4] = _mm_add_ps(xmm6_12, xmm4_12);
0060535e              float var_50[0x4];
0060535e              float xmm5_5[0x4] = __mulps_xmmps_memps(xmm4_5, var_50);
00605368              int64_t xmm0_7 = __unpcklps_xmmps_memdq(xmm3_12, xmm4_10);
0060536c              int64_t xmm3_13 = __unpckhps_xmmps_memdq(xmm3_12, xmm4_10);
00605370              float xmm2_8[0x4] = _mm_add_ps(xmm0_5, xmm5_5);
00605376              result_1->x = xmm0_7;
00605376              result_1->y = *(uint32_t*)((char*)xmm0_7)[4];
00605379              int64_t xmm1_5 = _mm_unpacklo_ps(xmm4_16, xmm2_8);
0060537c              result_1->z = xmm1_5;
0060537c              result_1->w = *(uint32_t*)((char*)xmm1_5)[4];
00605380              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm0_7 << 0x40));
00605384              *(uint128_t*)(&result_1->z + arg2) = (*(uint64_t*)(&result_1->z + arg2) | (xmm1_5 << 0x40));
00605389              int64_t xmm4_17 = _mm_unpackhi_ps(xmm4_16, xmm2_8);
0060538c              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm3_13;
00605390              uint32_t edx_3 = (arg2 * 3);
00605393              *(uint64_t*)(&result_1->z + (arg2 << 1)) = xmm4_17;
00605398              *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm3_13 << 0x40));
0060539c              *(uint128_t*)(&result_1->z + edx_3) = (*(uint64_t*)(&result_1->z + edx_3) | (xmm4_17 << 0x40));
006053a6              esi_3 += (arg4 << 2);
006053ad              result_1 += (arg2 << 2);
006053af              i = i_2;
006053af              i_2 -= 1;
006053b2          } while (i != 1);
0060523c      }
0060523c      
006053c2      if (i_4 > 0)
006053c2      {
006053c4          int32_t i_3 = i_4;
006053da          int32_t i_1;
006053da          
006053da          do
006053da          {
006053cc              sse2_D3DXVec4Transform(result_1, esi_3, arg5);
006053d1              esi_3 += arg4;
006053d4              result_1 += arg2;
006053d7              i_1 = i_3;
006053d7              i_3 -= 1;
006053da          } while (i_1 != 1);
006053c2      }
006053c2      
006053e7      return result;
006051ea  }


006053ea  struct D3DXVECTOR3* __stdcall sse2_D3DXVec3TransformNormalArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

006053ea  {
006053ef      int32_t ecx;
006053ef      int32_t var_8 = ecx;
00605402      int32_t esi;
00605402      int32_t var_13c = esi;
00605403      int32_t edi;
00605403      int32_t var_140 = edi;
00605404      struct D3DXVECTOR3* result_1 = arg1;
00605413      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
00605415      int32_t i_4 = (arg6 - esi_2);
00605417      uint32_t i_5 = (esi_2 >> 2);
0060541d      struct D3DXVECTOR3* result = result_1;
00605420      float var_130[0x4];
00605420      
00605420      if (i_5 != 0)
0060542f          KMATRIX::KMATRIX(&var_130, arg5);
0060542f      
0060543c      struct D3DXVECTOR3* esi_3;
0060543c      
0060543c      if ((i_5 == 0 || i_5 <= 0))
0060556e          esi_3 = arg3;
0060543c      else
0060543c      {
0060544a          uint32_t i_2 = i_5;
0060544d          esi_3 = arg3;
00605566          uint32_t i;
00605566          
00605566          do
00605566          {
00605450              int64_t xmm2_2;
00605450              xmm2_2 = esi_3->x;
00605450              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
00605457              int64_t z = esi_3->z;
0060545f              float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
00605469              uint32_t edx_2 = (arg4 * 3);
0060546c              float xmm2_4[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)(edx_2 + esi_3) << 0x40));
00605470              float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0xdd);
00605474              float xmm0_4[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0x88);
00605496              float xmm1_7[0x4] = _mm_shuffle_ps((z | (*(uint32_t*)(&esi_3->z + arg4) << 0x40)), (*(uint32_t*)(&esi_3->z + (arg4 << 1)) | (*(uint32_t*)(&esi_3->z + edx_2) << 0x40)), 0x88);
0060549d              float var_b0[0x4];
0060549d              float xmm2_8[0x4] = __mulps_xmmps_memps(xmm1_7, var_b0);
006054aa              float var_f0[0x4];
006054aa              float xmm2_10[0x4] = __mulps_xmmps_memps(xmm1_3, var_f0);
006054c1              float xmm2_12[0x4] = _mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_4, var_130), xmm2_10), xmm2_8);
006054c7              float var_a0[0x4];
006054c7              float xmm4_4[0x4] = __mulps_xmmps_memps(xmm1_7, var_a0);
006054ce              float var_90[0x4];
006054ce              float xmm1_8[0x4] = __mulps_xmmps_memps(xmm1_7, var_90);
006054d5              float var_110[0x4];
006054d5              float xmm0_5[0x4] = __mulps_xmmps_memps(xmm0_4, var_110);
006054dc              float var_120[0x4];
006054dc              float xmm6_2[0x4] = __mulps_xmmps_memps(xmm0_4, var_120);
006054e9              float var_d0[0x4];
006054e9              float xmm3_2[0x4] = __mulps_xmmps_memps(xmm1_3, var_d0);
006054f0              float var_e0[0x4];
006054f0              float xmm4_6[0x4] = __mulps_xmmps_memps(xmm1_3, var_e0);
006054fa              float xmm0_7[0x4] = _mm_add_ps(_mm_add_ps(xmm0_5, xmm3_2), xmm1_8);
00605503              float xmm4_8[0x4] = _mm_add_ps(_mm_add_ps(xmm6_2, xmm4_6), xmm4_4);
00605509              int64_t xmm3_4 = _mm_unpacklo_ps(xmm2_12, xmm4_8);
0060550c              result_1->x = xmm3_4;
0060550c              result_1->y = *(uint32_t*)((char*)xmm3_4)[4];
0060550f              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm3_4 << 0x40));
00605516              int32_t var_30[0x4];
00605516              float xmm1_10[0x4] = __unpcklps_xmmps_memdq(xmm0_7, var_30);
0060551a              float xmm0_8[0x4] = __unpckhps_xmmps_memdq(xmm0_7, var_30);
0060551e              result_1->z = xmm1_10;
00605529              *(uint32_t*)(&result_1->z + arg2) = ((int32_t)(xmm1_10 >> 0x40));
0060552f              int64_t xmm2_13 = _mm_unpackhi_ps(xmm2_12, xmm4_8);
00605532              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_13;
00605536              uint32_t edx_3 = (arg2 * 3);
00605539              *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm2_13 << 0x40));
0060553d              *(uint32_t*)(&result_1->z + (arg2 << 1)) = xmm0_8;
0060554f              *(uint32_t*)(&result_1->z + (arg2 * 3)) = ((int32_t)(xmm0_8 >> 0x40));
0060555a              esi_3 += (arg4 << 2);
00605561              result_1 += (arg2 << 2);
00605563              i = i_2;
00605563              i_2 -= 1;
00605566          } while (i != 1);
0060543c      }
0060543c      
00605576      if (i_4 > 0)
00605576      {
00605578          int32_t i_3 = i_4;
0060558e          int32_t i_1;
0060558e          
0060558e          do
0060558e          {
00605580              sse_D3DXVec3TransformNormal(result_1, esi_3, arg5);
00605585              esi_3 += arg4;
00605588              result_1 += arg2;
0060558b              i_1 = i_3;
0060558b              i_3 -= 1;
0060558e          } while (i_1 != 1);
00605576      }
00605576      
0060559b      return result;
006053ea  }


0060559e  struct D3DXVECTOR3* __stdcall sse2_D3DXVec3TransformCoordArray(struct D3DXVECTOR3* arg1, uint32_t arg2, struct D3DXVECTOR3 const* arg3, uint32_t arg4, struct D3DXMATRIX const* arg5, uint32_t arg6)

0060559e  {
006055a3      int32_t ecx;
006055a3      int32_t var_8 = ecx;
006055b6      int32_t esi;
006055b6      int32_t var_13c = esi;
006055b7      int32_t edi;
006055b7      int32_t var_140 = edi;
006055b8      struct D3DXVECTOR3* result_1 = arg1;
006055c7      int32_t esi_2 = ((esi - esi) & (arg6 & 0xfffffffc));
006055c9      int32_t i_4 = (arg6 - esi_2);
006055cb      uint32_t i_5 = (esi_2 >> 2);
006055d1      struct D3DXVECTOR3* result = result_1;
006055d4      float var_130[0x4];
006055d4      
006055d4      if (i_5 != 0)
006055e3          KMATRIX::KMATRIX(&var_130, arg5);
006055e3      
006055f0      struct D3DXVECTOR3* esi_3;
006055f0      
006055f0      if ((i_5 == 0 || i_5 <= 0))
00605772          esi_3 = arg3;
006055f0      else
006055f0      {
006055fe          uint32_t i_2 = i_5;
00605601          esi_3 = arg3;
0060576a          uint32_t i;
0060576a          
0060576a          do
0060576a          {
00605604              int64_t xmm2_2;
00605604              xmm2_2 = esi_3->x;
00605604              *(uint32_t*)((char*)xmm2_2)[4] = esi_3->y;
0060560b              int64_t z = esi_3->z;
00605613              float xmm1_2[0x4] = (xmm2_2 | (*(uint64_t*)((char*)esi_3 + arg4) << 0x40));
0060561d              uint32_t edx_2 = (arg4 * 3);
00605620              float xmm2_4[0x4] = (*(uint64_t*)((char*)esi_3 + (arg4 << 1)) | (*(uint64_t*)(edx_2 + esi_3) << 0x40));
00605624              float xmm0_4[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0x88);
00605628              float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm2_4, 0xdd);
0060564a              float xmm1_7[0x4] = _mm_shuffle_ps((z | (*(uint32_t*)(&esi_3->z + arg4) << 0x40)), (*(uint32_t*)(&esi_3->z + (arg4 << 1)) | (*(uint32_t*)(&esi_3->z + edx_2) << 0x40)), 0x88);
00605675              float var_100[0x4];
00605675              float var_c0[0x4];
00605675              float var_80[0x4];
00605675              float var_40[0x4];
00605675              float xmm2_10[0x4] = __addps_xmmps_memps(_mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_4, var_100), __mulps_xmmps_memps(xmm1_3, var_c0)), __mulps_xmmps_memps(xmm1_7, var_80)), var_40);
00605679              float xmm4_6[0x4] = _mm_rcp_ps(xmm2_10);
00605682              float xmm5_6[0x4] = _mm_mul_ps(_mm_mul_ps(xmm4_6, xmm2_10), xmm4_6);
0060568e              float xmm4_8[0x4] = _mm_sub_ps(_mm_add_ps(xmm4_6, xmm4_6), xmm5_6);
006056b2              float var_f0[0x4];
006056b2              float var_b0[0x4];
006056b2              float xmm6_4[0x4] = _mm_add_ps(_mm_add_ps(__mulps_xmmps_memps(xmm0_4, var_130), __mulps_xmmps_memps(xmm1_3, var_f0)), __mulps_xmmps_memps(xmm1_7, var_b0));
006056b8              float var_110[0x4];
006056b8              float xmm0_5[0x4] = __mulps_xmmps_memps(xmm0_4, var_110);
006056bf              float var_120[0x4];
006056bf              float xmm7_2[0x4] = __mulps_xmmps_memps(xmm0_4, var_120);
006056c9              float var_70[0x4];
006056c9              float xmm2_16[0x4] = __addps_xmmps_memps(xmm6_4, var_70);
006056d0              float var_d0[0x4];
006056d0              float xmm3_2[0x4] = __mulps_xmmps_memps(xmm1_3, var_d0);
006056d7              float var_e0[0x4];
006056d7              float xmm6_6[0x4] = __mulps_xmmps_memps(xmm1_3, var_e0);
006056de              float xmm0_6[0x4] = _mm_add_ps(xmm0_5, xmm3_2);
006056e4              float var_a0[0x4];
006056e4              float xmm5_10[0x4] = __mulps_xmmps_memps(xmm1_7, var_a0);
006056f2              float var_90[0x4];
006056f2              float var_50[0x4];
006056f2              float xmm0_8[0x4] = __addps_xmmps_memps(_mm_add_ps(xmm0_6, __mulps_xmmps_memps(xmm1_7, var_90)), var_50);
006056f9              float xmm7_4[0x4] = _mm_add_ps(_mm_add_ps(xmm7_2, xmm6_6), xmm5_10);
006056fc              float xmm2_17[0x4] = _mm_mul_ps(xmm2_16, xmm4_8);
00605706              float var_60[0x4];
00605706              float xmm5_13[0x4] = _mm_mul_ps(__addps_xmmps_memps(xmm7_4, var_60), xmm4_8);
0060570c              int64_t xmm3_4 = _mm_unpacklo_ps(xmm2_17, xmm5_13);
0060570f              result_1->x = xmm3_4;
0060570f              result_1->y = *(uint32_t*)((char*)xmm3_4)[4];
00605712              *(uint128_t*)((char*)result_1 + arg2) = (*(uint64_t*)((char*)result_1 + arg2) | (xmm3_4 << 0x40));
00605716              float xmm0_9[0x4] = _mm_mul_ps(xmm0_8, xmm4_8);
0060571c              float xmm1_10[0x4] = _mm_unpacklo_ps(xmm0_9, xmm4_8);
0060571f              result_1->z = xmm1_10;
0060572a              *(uint32_t*)(&result_1->z + arg2) = ((int32_t)(xmm1_10 >> 0x40));
00605730              int64_t xmm2_18 = _mm_unpackhi_ps(xmm2_17, xmm5_13);
00605733              float xmm0_10[0x4] = _mm_unpackhi_ps(xmm0_9, xmm4_8);
00605736              *(uint64_t*)((char*)result_1 + (arg2 << 1)) = xmm2_18;
0060573a              uint32_t edx_3 = (arg2 * 3);
0060573d              *(uint128_t*)(edx_3 + result_1) = (*(uint64_t*)(edx_3 + result_1) | (xmm2_18 << 0x40));
00605741              *(uint32_t*)(&result_1->z + (arg2 << 1)) = xmm0_10;
00605753              *(uint32_t*)(&result_1->z + (arg2 * 3)) = ((int32_t)(xmm0_10 >> 0x40));
0060575e              esi_3 += (arg4 << 2);
00605765              result_1 += (arg2 << 2);
00605767              i = i_2;
00605767              i_2 -= 1;
0060576a          } while (i != 1);
006055f0      }
006055f0      
0060577a      if (i_4 > 0)
0060577a      {
0060577c          int32_t i_3 = i_4;
00605792          int32_t i_1;
00605792          
00605792          do
00605792          {
00605784              sse2_D3DXVec3TransformCoord(result_1, esi_3, arg5);
00605789              esi_3 += arg4;
0060578c              result_1 += arg2;
0060578f              i_1 = i_3;
0060578f              i_3 -= 1;
00605792          } while (i_1 != 1);
0060577a      }
0060577a      
0060579f      return result;
0060559e  }


006057a2  int32_t sub_6057a2(int128_t arg1 @ xmm0)

006057a2  {
006057b9      int16_t xmm1_1[0x8] = (data_827f50 & arg1);
006057c1      int32_t xmm2_1[0x4] = (data_827f60 & arg1);
006057c5      int64_t xmm0 = (arg1 & ((int64_t)data_827f40));
006057cd      int16_t xmm3_1[0x8] = _mm_cmpeq_epi16(xmm1_1, {0});
006057cd      
006057d7      if (_mm_movemask_epi8(xmm3_1) == 0)
006057d7      {
00605845          int128_t xmm6 = data_827f90;
00605851          _mm_unpacklo_epi16({0}, xmm0);
00605855          int32_t xmm7_3[0x4] = _mm_unpackhi_epi16({0}, xmm0);
0060585d          int32_t xmm1_7[0x4] = _mm_unpacklo_epi16(xmm1_1, xmm7_3);
00605861          int32_t xmm3_10[0x4] = _mm_unpackhi_epi16(xmm1_1, xmm7_3);
00605865          int32_t xmm1_8[0x4] = _mm_add_epi32(xmm1_7, xmm6);
00605869          int32_t xmm3_11[0x4] = _mm_add_epi32(xmm3_10, xmm6);
00605871          int32_t xmm0_4[0x4] = _mm_unpacklo_epi16(xmm2_1, xmm7_3);
0060587d          uint32_t xmm3_12[0x4] = (xmm3_11 | _mm_unpackhi_epi16(xmm2_1, xmm7_3));
00605881          _mm_slli_epi32((xmm0_4 | xmm1_8), 0xd);
00605886          _mm_slli_epi32(xmm3_12, 0xd);
00605894          return;
006057d7      }
006057d7      
006057e1      int32_t xmm2_2[0x4] = (xmm2_1 | (xmm3_1 & !(data_827f30)));
006057e5      int32_t xmm1_2[0x4] = __pmaxsw_xmmdq_memdq(xmm1_1, data_827f70);
006057ed      int128_t xmm4 = data_827f80;
006057f9      int32_t xmm1_3[0x4] = _mm_unpacklo_epi16(xmm1_2, 0);
006057fd      int32_t xmm3_4[0x4] = _mm_unpackhi_epi16(xmm1_2, 0);
00605805      int32_t xmm5[0x4] = _mm_unpacklo_epi16({0}, xmm0);
00605809      int32_t xmm7[0x4] = _mm_unpackhi_epi16({0}, xmm0);
0060580d      int32_t xmm1_4[0x4] = _mm_add_epi32(xmm1_3, xmm4);
00605811      int32_t xmm3_5[0x4] = _mm_add_epi32(xmm3_4, xmm4);
00605815      uint32_t xmm1_5[0x4] = _mm_slli_epi32(xmm1_4, 0xd);
00605823      float xmm3_7[0x4] = (_mm_slli_epi32(xmm3_5, 0xd) | xmm7);
0060582f      int32_t xmm2_3[0x4] = _mm_unpacklo_epi16(xmm2_2, 0);
00605833      int32_t xmm7_2[0x4] = _mm_unpackhi_epi16(xmm2_2, 0);
00605837      float xmm0_1[0x4] = _mm_cvtepi32_ps(xmm2_3);
0060583a      float xmm2_4[0x4] = _mm_cvtepi32_ps(xmm7_2);
0060583d      _mm_mul_ps(xmm0_1, (xmm1_5 | xmm5));
00605840      _mm_mul_ps(xmm3_7, xmm2_4);
006057a2  }


00605895  float* __stdcall sse2_D3DXFloat16To32Array(float* arg1, struct D3DXFLOAT16 const* arg2, uint32_t arg3)

00605895  {
006058a3      int32_t edi;
006058a3      int32_t var_1c = edi;
006058a7      float* result = arg1;
006058a7      
006058aa      if (arg3 >= 8)
006058aa      {
006058af          int32_t i_2 = (arg3 & 0xfffffff8);
006058b5          int32_t i_1 = i_2;
006058b8          struct D3DXFLOAT16* eax_1 = arg2;
006058bb          float* ecx_1 = arg1;
006058e2          int32_t i;
006058e2          
006058e2          do
006058e2          {
006058c1              int128_t xmm0_2 = (eax_1->value | (*(int32_t*)((char*)eax_1 + 8) << 0x40));
006058c5              eax_1 = &eax_1[8];
006058c8              int64_t xmm0_3;
006058c8              int64_t xmm3_1;
006058c8              xmm0_3 = sub_6057a2(xmm0_2);
006058cd              *(uint64_t*)ecx_1 = xmm0_3;
006058d0              *(uint128_t*)((char*)ecx_1 + 8) = (*(uint64_t*)((char*)ecx_1 + 8) | (xmm0_3 << 0x40));
006058d4              *(uint64_t*)((char*)ecx_1 + 0x10) = xmm3_1;
006058d8              *(uint128_t*)((char*)ecx_1 + 0x18) = (*(uint64_t*)((char*)ecx_1 + 0x18) | (xmm3_1 << 0x40));
006058dc              ecx_1 = &ecx_1[8];
006058df              i = i_1;
006058df              i_1 -= 8;
006058e2          } while (i != 8);
006058e7          arg3 -= i_2;
006058ed          arg2 = &arg2[i_2];
006058f3          arg1 = &arg1[i_2];
006058aa      }
006058aa      
006058f6      int32_t ebx = 0;
006058f6      
006058fb      if (arg3 > 0)
006058fb      {
0060595d          do
0060595d          {
00605905              uint32_t value = ((uint32_t)arg2[ebx].value);
0060590d              int32_t edx_2 = (value & 0x7c00);
0060591e              int32_t eax_7 = -(edx_2);
0060592a              int32_t eax_10 = (((eax_7 - eax_7) & 0x400) | (value & 0x3ff));
0060592a              
0060592e              if (edx_2 <= 0x400)
00605930                  edx_2 = 0x400;
00605930              
00605942              long double x87_r7_1 = ((long double)eax_10);
00605942              
00605948              if (eax_10 < 0)
0060594a                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0060594a              
00605956              arg1[ebx] = ((float)(x87_r7_1 * ((long double)(((edx_2 + 0x19800) << 0xd) | ((value & 0xffff8000) << 0x10)))));
00605959              ebx += 1;
0060595d          } while (ebx < arg3);
006058fb      }
006058fb      
00605966      return result;
00605895  }


00605969  struct D3DXVECTOR4* __stdcall sse2_D3DXVec4Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXMATRIX const* arg3)

00605969  {
0060596e      int32_t ecx;
0060596e      int32_t var_8 = ecx;
0060597e      float xmm0[0x4];
0060597e      xmm0[0] = arg2->x;
0060597e      xmm0[1] = arg2->y;
0060597e      xmm0[2] = arg2->z;
0060597e      xmm0[3] = arg2->w;
00605989      float xmm1_1[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0xff);
0060598d      float xmm0_1[0x4];
0060598d      float xmm1_7[0x4];
0060598d      float xmm2_3[0x4];
0060598d      float xmm3_2[0x4];
0060598d      
0060598d      if ((arg3 & 0xf) != 0)
0060598d      {
006059d5          float xmm3_4[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x20) | (*(uint64_t*)((char*)arg3->__inner0 + 0x28) << 0x40));
006059d9          float xmm2_6[0x4] = _mm_mul_ps((*(uint64_t*)((char*)arg3->__inner0 + 0x30) | (*(uint64_t*)((char*)arg3->__inner0 + 0x38) << 0x40)), xmm1_1);
006059e6          xmm3_2 = _mm_add_ps(_mm_mul_ps(xmm3_4, _mm_shuffle_ps(xmm0, xmm0, 0xaa)), xmm2_6);
006059fc          xmm2_3 = _mm_mul_ps((*(uint64_t*)((char*)arg3->__inner0 + 0x10) | (*(uint64_t*)((char*)arg3->__inner0 + 0x18) << 0x40)), _mm_shuffle_ps(xmm0, xmm0, 0x55));
00605a02          xmm1_7 = _mm_shuffle_ps(xmm0, xmm0, 0);
00605a0d          xmm0_1 = (*(uint64_t*)((char*)arg3->__inner0 + 0) | (*(uint64_t*)((char*)arg3->__inner0 + 8) << 0x40));
0060598d      }
0060598d      else
0060598d      {
0060598f          float xmm2[0x4];
0060598f          xmm2[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
0060598f          xmm2[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
0060598f          xmm2[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
0060598f          xmm2[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
00605993          float xmm3[0x4];
00605993          xmm3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
00605993          xmm3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
00605993          xmm3[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x28);
00605993          xmm3[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x2c);
00605997          float xmm2_1[0x4] = _mm_mul_ps(xmm2, xmm1_1);
006059a4          xmm3_2 = _mm_add_ps(_mm_mul_ps(xmm3, _mm_shuffle_ps(xmm0, xmm0, 0xaa)), xmm2_1);
006059a7          float xmm2_2[0x4];
006059a7          xmm2_2[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
006059a7          xmm2_2[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x14);
006059a7          xmm2_2[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x18);
006059a7          xmm2_2[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x1c);
006059b2          xmm2_3 = _mm_mul_ps(xmm2_2, _mm_shuffle_ps(xmm0, xmm0, 0x55));
006059b8          xmm1_7 = _mm_shuffle_ps(xmm0, xmm0, 0);
006059bc          xmm0_1[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
006059bc          xmm0_1[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
006059bc          xmm0_1[2] = *(uint32_t*)((char*)arg3->__inner0 + 8);
006059bc          xmm0_1[3] = *(uint32_t*)((char*)arg3->__inner0 + 0xc);
0060598d      }
0060598d      
00605a1a      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(_mm_mul_ps(xmm0_1, xmm1_7), xmm2_3), xmm3_2);
00605a1d      arg1->x = xmm0_5[0];
00605a1d      arg1->y = xmm0_5[1];
00605a1d      arg1->z = xmm0_5[2];
00605a1d      arg1->w = xmm0_5[3];
00605a26      return arg1;
00605969  }


00605a29  struct D3DXMATRIX* __stdcall sse_D3DXMatrixMultiply(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

00605a29  {
00605a3a      float xmm0_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0) | (*(uint64_t*)((char*)arg3->__inner0 + 8) << 0x40));
00605a42      float xmm1_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x10) | (*(uint64_t*)((char*)arg3->__inner0 + 0x18) << 0x40));
00605a4a      float xmm2_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x20) | (*(uint64_t*)((char*)arg3->__inner0 + 0x28) << 0x40));
00605a52      float xmm3_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x30) | (*(uint64_t*)((char*)arg3->__inner0 + 0x38) << 0x40));
00605a56      float xmm4[0x4];
00605a56      xmm4[0] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00605a56      xmm4[1] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00605a56      xmm4[2] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00605a56      xmm4[3] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00605a5a      float xmm5[0x4];
00605a5a      xmm5[0] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00605a5a      xmm5[1] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00605a5a      xmm5[2] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00605a5a      xmm5[3] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00605a5f      float xmm6[0x4];
00605a5f      xmm6[0] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00605a5f      xmm6[1] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00605a5f      xmm6[2] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00605a5f      xmm6[3] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00605a64      float xmm7[0x4];
00605a64      xmm7[0] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00605a64      xmm7[1] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00605a64      xmm7[2] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00605a64      xmm7[3] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00605a69      float xmm4_1[0x4] = _mm_shuffle_ps(xmm4, xmm4, 0);
00605a6d      float xmm5_1[0x4] = _mm_shuffle_ps(xmm5, xmm5, 0);
00605a71      float xmm6_1[0x4] = _mm_shuffle_ps(xmm6, xmm6, 0);
00605a75      float xmm7_1[0x4] = _mm_shuffle_ps(xmm7, xmm7, 0);
00605a79      float xmm4_2[0x4] = _mm_mul_ps(xmm4_1, xmm0_1);
00605a7c      float xmm5_2[0x4] = _mm_mul_ps(xmm5_1, xmm1_1);
00605a7f      float xmm6_2[0x4] = _mm_mul_ps(xmm6_1, xmm2_1);
00605a82      float xmm7_2[0x4] = _mm_mul_ps(xmm7_1, xmm3_1);
00605a8b      int64_t xmm4_4 = _mm_add_ps(_mm_add_ps(xmm4_2, xmm5_2), _mm_add_ps(xmm6_2, xmm7_2));
00605a8e      float xmm5_3[0x4];
00605a8e      xmm5_3[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00605a8e      xmm5_3[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00605a8e      xmm5_3[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00605a8e      xmm5_3[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00605a93      float xmm6_4[0x4];
00605a93      xmm6_4[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00605a93      xmm6_4[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00605a93      xmm6_4[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00605a93      xmm6_4[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00605a98      float xmm7_3[0x4];
00605a98      xmm7_3[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00605a98      xmm7_3[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00605a98      xmm7_3[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00605a98      xmm7_3[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00605a9d      float xmm5_4[0x4] = _mm_shuffle_ps(xmm5_3, xmm5_3, 0);
00605aa1      float xmm6_5[0x4] = _mm_shuffle_ps(xmm6_4, xmm6_4, 0);
00605aa5      float xmm7_4[0x4] = _mm_shuffle_ps(xmm7_3, xmm7_3, 0);
00605aa9      float xmm5_5[0x4] = _mm_mul_ps(xmm5_4, xmm0_1);
00605aac      float xmm6_6[0x4] = _mm_mul_ps(xmm6_5, xmm1_1);
00605aaf      float xmm7_5[0x4] = _mm_mul_ps(xmm7_4, xmm2_1);
00605ab5      float xmm5_7[0x4] = _mm_add_ps(_mm_add_ps(xmm5_5, xmm6_6), xmm7_5);
00605ab8      float xmm6_7[0x4];
00605ab8      xmm6_7[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00605ab8      xmm6_7[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00605ab8      xmm6_7[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00605ab8      xmm6_7[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00605ac4      int64_t xmm5_8 = _mm_add_ps(xmm5_7, _mm_mul_ps(_mm_shuffle_ps(xmm6_7, xmm6_7, 0), xmm3_1));
00605ac7      float xmm6_10[0x4];
00605ac7      xmm6_10[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00605ac7      xmm6_10[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00605ac7      xmm6_10[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00605ac7      xmm6_10[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00605acc      float xmm7_6[0x4];
00605acc      xmm7_6[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00605acc      xmm7_6[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00605acc      xmm7_6[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00605acc      xmm7_6[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00605ad1      float xmm6_11[0x4] = _mm_shuffle_ps(xmm6_10, xmm6_10, 0);
00605ad5      float xmm7_7[0x4] = _mm_shuffle_ps(xmm7_6, xmm7_6, 0);
00605adf      float xmm6_13[0x4] = _mm_add_ps(_mm_mul_ps(xmm6_11, xmm0_1), _mm_mul_ps(xmm7_7, xmm1_1));
00605ae2      float xmm7_9[0x4];
00605ae2      xmm7_9[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00605ae2      xmm7_9[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00605ae2      xmm7_9[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00605ae2      xmm7_9[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00605aee      float xmm6_14[0x4] = _mm_add_ps(xmm6_13, _mm_mul_ps(_mm_shuffle_ps(xmm7_9, xmm7_9, 0), xmm2_1));
00605af1      float xmm7_12[0x4];
00605af1      xmm7_12[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00605af1      xmm7_12[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00605af1      xmm7_12[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00605af1      xmm7_12[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00605afd      int64_t xmm6_15 = _mm_add_ps(xmm6_14, _mm_mul_ps(_mm_shuffle_ps(xmm7_12, xmm7_12, 0), xmm3_1));
00605b00      float xmm7_15[0x4];
00605b00      xmm7_15[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00605b00      xmm7_15[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00605b00      xmm7_15[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00605b00      xmm7_15[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00605b09      float xmm0_2[0x4] = _mm_mul_ps(xmm0_1, _mm_shuffle_ps(xmm7_15, xmm7_15, 0));
00605b0c      float xmm7_17[0x4];
00605b0c      xmm7_17[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
00605b0c      xmm7_17[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
00605b0c      xmm7_17[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
00605b0c      xmm7_17[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
00605b15      float xmm1_2[0x4] = _mm_mul_ps(xmm1_1, _mm_shuffle_ps(xmm7_17, xmm7_17, 0));
00605b18      float xmm7_19[0x4];
00605b18      xmm7_19[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00605b18      xmm7_19[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00605b18      xmm7_19[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00605b18      xmm7_19[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00605b21      float xmm2_2[0x4] = _mm_mul_ps(xmm2_1, _mm_shuffle_ps(xmm7_19, xmm7_19, 0));
00605b24      float xmm7_21[0x4];
00605b24      xmm7_21[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
00605b24      xmm7_21[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
00605b24      xmm7_21[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
00605b24      xmm7_21[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
00605b2d      float xmm3_2[0x4] = _mm_mul_ps(xmm3_1, _mm_shuffle_ps(xmm7_21, xmm7_21, 0));
00605b30      *(uint64_t*)((char*)arg1->__inner0 + 0) = xmm4_4;
00605b33      *(uint128_t*)((char*)arg1->__inner0 + 8) = (*(uint64_t*)((char*)arg1->__inner0 + 8) | (xmm4_4 << 0x40));
00605b37      float xmm0_3[0x4] = _mm_add_ps(xmm0_2, xmm1_2);
00605b3a      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = xmm5_8;
00605b3e      *(uint128_t*)((char*)arg1->__inner0 + 0x18) = (*(uint64_t*)((char*)arg1->__inner0 + 0x18) | (xmm5_8 << 0x40));
00605b42      float xmm2_3[0x4] = _mm_add_ps(xmm2_2, xmm3_2);
00605b45      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = xmm6_15;
00605b49      *(uint128_t*)((char*)arg1->__inner0 + 0x28) = (*(uint64_t*)((char*)arg1->__inner0 + 0x28) | (xmm6_15 << 0x40));
00605b4d      int64_t xmm0_4 = _mm_add_ps(xmm0_3, xmm2_3);
00605b50      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = xmm0_4;
00605b54      arg1->__inner0*(int32_t*)((char*)arg1 + 0x38) = (*(uint64_t*)((char*)arg1->__inner0 + 0x38) | (xmm0_4 << 0x40));
00605b5c      return arg1;
00605a29  }


00605b5f  struct D3DXVECTOR3* __stdcall sse2_D3DXVec3Normalize(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2)

00605b5f  {
00605b67      float x = arg2->x;
00605b6b      float y = arg2->y;
00605b70      float z = arg2->z;
00605b8e      float xmm0_2 = (((x * x) + (y * y)) + (z * z));
00605b8e      
00605b9c      if (xmm0_2 >= 1.42108547e-14f)
00605b9c      {
00605bab          int32_t xmm6;
00605bab          float xmm6_1 = _mm_rsqrt_ss(xmm6, xmm0_2);
00605bce          float xmm1_2 = ((3f - ((xmm6_1 * xmm0_2) * xmm6_1)) * (xmm6_1 * 0.5f));
00605bde          arg1->x = (x * xmm1_2);
00605be2          arg1->y = (y * xmm1_2);
00605be7          arg1->z = (z * xmm1_2);
00605b9c      }
00605b9c      else
00605b9c      {
00605ba0          arg1->x = 0;
00605ba2          arg1->y = 0f;
00605ba5          arg1->z = 0f;
00605b9c      }
00605b9c      
00605bf0      return arg1;
00605b5f  }

00605baa                                90                                                                           .

00605bf3  struct D3DXPLANE* __stdcall sse2_D3DXPlaneNormalize(struct D3DXPLANE* arg1, struct D3DXPLANE const* arg2)

00605bf3  {
00605bfb      float a = arg2->a;
00605bff      float b = arg2->b;
00605c04      float c = arg2->c;
00605c22      float xmm0_2 = (((a * a) + (b * b)) + (c * c));
00605c22      
00605c30      if (xmm0_2 >= 1.42108547e-14f)
00605c30      {
00605c43          int32_t xmm6;
00605c43          float xmm6_1 = _mm_rsqrt_ss(xmm6, xmm0_2);
00605c66          float xmm1_2 = ((3f - ((xmm6_1 * xmm0_2) * xmm6_1)) * (xmm6_1 * 0.5f));
00605c76          float xmm1_3 = (xmm1_2 * arg2->d);
00605c7b          arg1->a = (a * xmm1_2);
00605c7f          arg1->b = (b * xmm1_2);
00605c84          arg1->c = (c * xmm1_2);
00605c89          arg1->d = xmm1_3;
00605c30      }
00605c30      else
00605c30      {
00605c34          arg1->a = 0;
00605c36          arg1->b = 0f;
00605c39          arg1->c = 0f;
00605c3c          arg1->d = 0f;
00605c30      }
00605c30      
00605c92      return arg1;
00605bf3  }

00605c41     8b ff                                                                                          ..

00605c95  struct D3DXMATRIX* __stdcall sse_D3DXMatrixInverse(struct D3DXMATRIX* arg1, float* arg2, struct D3DXMATRIX const* arg3)

00605c95  {
00605ca3      int32_t ebp;
00605ca3      int32_t var_c = ebp;
00605ca4      int32_t var_10 = ebp;
00605ca8      void* const __return_addr_1 = __return_addr;
00605cc2      float xmm2_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 8) | (*(uint64_t*)((char*)arg3->__inner0 + 0x18) << 0x40));
00605cc6      float xmm4_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x28) | (*(uint64_t*)((char*)arg3->__inner0 + 0x38) << 0x40));
00605cd1      float xmm3_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x20) | (*(uint64_t*)((char*)arg3->__inner0 + 0x30) << 0x40));
00605cd5      float xmm1_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0) | (*(uint64_t*)((char*)arg3->__inner0 + 0x10) << 0x40));
00605cdc      float xmm5_1[0x4] = _mm_shuffle_ps(xmm2_1, xmm4_1, 0x88);
00605ce0      float xmm4_2[0x4] = _mm_shuffle_ps(xmm4_1, xmm2_1, 0xdd);
00605ce7      float xmm2_3[0x4] = _mm_mul_ps(xmm4_2, xmm5_1);
00605cea      float xmm2_4[0x4] = _mm_shuffle_ps(xmm2_3, xmm2_3, 0xb1);
00605cf1      float xmm6_1[0x4] = _mm_shuffle_ps(xmm2_4, xmm2_4, 0x4e);
00605cf8      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm1_1, 0xdd);
00605cfc      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm3_1, 0x88);
00605d03      float xmm3_3[0x4] = _mm_mul_ps(xmm3_2, xmm6_1);
00605d06      float xmm6_2[0x4] = _mm_mul_ps(xmm6_1, xmm1_2);
00605d13      float xmm7_2[0x4] = _mm_mul_ps(xmm3_2, xmm2_4);
00605d16      float xmm2_5[0x4] = _mm_mul_ps(xmm2_4, xmm1_2);
00605d19      float xmm3_4[0x4] = _mm_sub_ps(xmm3_3, xmm7_2);
00605d1f      float xmm7_4[0x4] = _mm_mul_ps(xmm3_2, xmm5_1);
00605d22      float xmm5_2[0x4] = _mm_shuffle_ps(xmm5_1, xmm5_1, 0x4e);
00605d26      float xmm7_5[0x4] = _mm_shuffle_ps(xmm7_4, xmm7_4, 0xb1);
00605d37      float xmm2_8[0x4] = _mm_add_ps(_mm_mul_ps(xmm4_2, xmm7_5), xmm3_4);
00605d3d      float xmm7_6[0x4] = _mm_shuffle_ps(xmm7_5, xmm7_5, 0x4e);
00605d41      float xmm3_6[0x4] = _mm_mul_ps(xmm7_5, xmm1_2);
00605d4e      float xmm3_8[0x4] = _mm_mul_ps(xmm4_2, xmm7_6);
00605d51      float xmm7_7[0x4] = _mm_mul_ps(xmm7_6, xmm1_2);
00605d54      float xmm2_9[0x4] = _mm_sub_ps(xmm2_8, xmm3_8);
00605d5e      float xmm3_11[0x4] = _mm_mul_ps(_mm_shuffle_ps(xmm3_2, xmm3_2, 0x4e), xmm4_2);
00605d61      float xmm3_12[0x4] = _mm_shuffle_ps(xmm3_11, xmm3_11, 0xb1);
00605d72      float xmm5_4[0x4] = _mm_add_ps(_mm_mul_ps(xmm5_2, xmm3_12), xmm2_9);
00605d78      float xmm3_13[0x4] = _mm_shuffle_ps(xmm3_12, xmm3_12, 0x4e);
00605d7c      float xmm2_11[0x4] = _mm_mul_ps(xmm3_12, xmm1_2);
00605d89      float xmm7_9[0x4] = _mm_mul_ps(xmm5_2, xmm3_13);
00605d8c      float xmm3_14[0x4] = _mm_mul_ps(xmm3_13, xmm1_2);
00605d8f      float xmm5_5[0x4] = _mm_sub_ps(xmm5_4, xmm7_9);
00605d92      float xmm3_15[0x4] = _mm_sub_ps(xmm3_14, xmm2_11);
00605d98      float xmm1_3[0x4] = _mm_mul_ps(xmm1_2, xmm5_5);
00605d9b      float xmm3_16[0x4] = _mm_shuffle_ps(xmm3_15, xmm3_15, 0x4e);
00605dad      float xmm1_5[0x4] = _mm_add_ps(_mm_shuffle_ps(xmm1_3, xmm1_3, 0x4e), xmm1_3);
00605db7      int128_t xmm1_7 = (_mm_shuffle_ps(xmm1_5, xmm1_5, 0xb1) + xmm1_5[0]);
00605dbb      int128_t var_100 = xmm1_7;
00605dc5      float xmm5_8[0x4] = _mm_mul_ps(xmm3_2, xmm1_2);
00605dc8      float xmm5_9[0x4] = _mm_shuffle_ps(xmm5_8, xmm5_8, 0xb1);
00605dcf      float xmm5_10[0x4] = _mm_shuffle_ps(xmm5_9, xmm5_9, 0x4e);
00605de8      float xmm6_6[0x4] = _mm_add_ps(_mm_mul_ps(xmm4_2, xmm5_9), xmm3_16);
00605df1      float xmm3_19[0x4] = _mm_sub_ps(_mm_mul_ps(xmm4_2, xmm5_10), xmm6_6);
00605df7      float xmm6_8[0x4] = _mm_mul_ps(xmm4_2, xmm1_2);
00605dfa      float xmm6_9[0x4] = _mm_shuffle_ps(xmm6_8, xmm6_8, 0xb1);
00605e10      float xmm7_14[0x4] = _mm_add_ps(_mm_mul_ps(xmm6_9, xmm3_2), xmm3_19);
00605e16      float xmm3_21[0x4] = _mm_shuffle_ps(xmm6_9, xmm6_9, 0x4e);
00605e2e      float xmm6_11[0x4] = _mm_sub_ps(xmm7_14, _mm_mul_ps(xmm3_2, xmm3_21));
00605e3f      float xmm5_14[0x4] = _mm_sub_ps(xmm6_2, xmm2_5);
00605e42      float xmm5_15[0x4] = _mm_shuffle_ps(xmm5_14, xmm5_14, 0x4e);
00605e4a      float xmm4_7[0x4] = _mm_mul_ps(xmm6_9, xmm5_2);
00605e4d      float xmm3_22[0x4] = _mm_mul_ps(xmm3_21, xmm5_2);
00605e50      float xmm5_16[0x4] = _mm_sub_ps(xmm5_15, xmm4_7);
00605e53      float xmm2_13[0x4] = _mm_mul_ps(xmm1_2, xmm5_2);
00605e56      float xmm3_23[0x4] = _mm_add_ps(xmm3_22, xmm5_16);
00605e59      float xmm2_14[0x4] = _mm_shuffle_ps(xmm2_13, xmm2_13, 0xb1);
00605e60      float xmm4_9[0x4] = _mm_shuffle_ps(xmm2_14, xmm2_14, 0x4e);
00605e6f      float xmm5_18[0x4] = _mm_mul_ps(xmm4_2, xmm2_14);
00605e72      float xmm6_13[0x4] = _mm_mul_ps(xmm4_2, xmm4_9);
00605e7e      float xmm4_11[0x4] = _mm_sub_ps(_mm_add_ps(xmm5_18, xmm3_23), xmm6_13);
00605e8f      float xmm5_21[0x4] = _mm_sub_ps(xmm7_7, xmm3_6);
00605e92      float xmm5_22[0x4] = _mm_shuffle_ps(xmm5_21, xmm5_21, 0x4e);
00605ea7      float xmm6_18[0x4] = _mm_sub_ps(_mm_sub_ps(_mm_mul_ps(xmm5_9, xmm5_2), xmm5_22), _mm_mul_ps(xmm5_2, xmm5_10));
00605eae      float xmm2_15[0x4] = _mm_mul_ps(xmm2_14, xmm3_2);
00605eba      float xmm2_17[0x4] = _mm_add_ps(_mm_mul_ps(xmm3_2, xmm4_9), _mm_sub_ps(xmm6_18, xmm2_15));
00605eba      
00605ec4      if (xmm1_7 == 0f)
00605f3b          return 0;
00605f3b      
00605ecb      if (arg2 != 0)
00605ed0          *(uint32_t*)arg2 = xmm1_7;
00605ed0      
00605ed4      float xmm0_2 = xmm1_7;
00605ee4      float xmm0_3 = _mm_rcp_ss(xmm0_2, xmm0_2);
00605ef7      float xmm5_28[0x4] = ((xmm0_3 + xmm0_3) - (xmm0_2 * (xmm0_3 * xmm0_3)));
00605efb      float xmm5_29[0x4] = _mm_shuffle_ps(xmm5_28, xmm5_28, 0);
00605eff      int64_t xmm1_9 = _mm_mul_ps(xmm5_5, xmm5_29);
00605f02      *(uint64_t*)((char*)arg1->__inner0 + 0) = xmm1_9;
00605f05      *(uint128_t*)((char*)arg1->__inner0 + 8) = (*(uint64_t*)((char*)arg1->__inner0 + 8) | (xmm1_9 << 0x40));
00605f09      int64_t xmm4_12 = _mm_mul_ps(xmm4_11, xmm5_29);
00605f0c      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = xmm4_12;
00605f10      *(uint128_t*)((char*)arg1->__inner0 + 0x18) = (*(uint64_t*)((char*)arg1->__inner0 + 0x18) | (xmm4_12 << 0x40));
00605f14      int64_t xmm6_21 = _mm_mul_ps(xmm6_11, xmm5_29);
00605f17      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = xmm6_21;
00605f1b      *(uint128_t*)((char*)arg1->__inner0 + 0x28) = (*(uint64_t*)((char*)arg1->__inner0 + 0x28) | (xmm6_21 << 0x40));
00605f1f      int64_t xmm5_30 = _mm_mul_ps(xmm5_29, xmm2_17);
00605f22      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = xmm5_30;
00605f26      arg1->__inner0*(int32_t*)((char*)arg1 + 0x38) = (*(uint64_t*)((char*)arg1->__inner0 + 0x38) | (xmm5_30 << 0x40));
00605f30      return arg1;
00605c95  }

00605f3e                                                                                            8d 49                                .I
00605f40  00                                                                                               .

00605f41  struct D3DXMATRIX* __stdcall sse2_D3DXMatrixMultiplyTranspose(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

00605f41  {
00605f52      float xmm0_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0) | (*(uint64_t*)((char*)arg3->__inner0 + 8) << 0x40));
00605f5a      float xmm1_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x10) | (*(uint64_t*)((char*)arg3->__inner0 + 0x18) << 0x40));
00605f62      float xmm2_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x20) | (*(uint64_t*)((char*)arg3->__inner0 + 0x28) << 0x40));
00605f6a      float xmm3_1[0x4] = (*(uint64_t*)((char*)arg3->__inner0 + 0x30) | (*(uint64_t*)((char*)arg3->__inner0 + 0x38) << 0x40));
00605f6e      float xmm4[0x4];
00605f6e      xmm4[0] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00605f6e      xmm4[1] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00605f6e      xmm4[2] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00605f6e      xmm4[3] = *(uint32_t*)((char*)arg2->__inner0 + 0);
00605f72      float xmm5[0x4];
00605f72      xmm5[0] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00605f72      xmm5[1] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00605f72      xmm5[2] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00605f72      xmm5[3] = *(uint32_t*)((char*)arg2->__inner0 + 4);
00605f77      float xmm6[0x4];
00605f77      xmm6[0] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00605f77      xmm6[1] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00605f77      xmm6[2] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00605f77      xmm6[3] = *(uint32_t*)((char*)arg2->__inner0 + 8);
00605f7c      float xmm7[0x4];
00605f7c      xmm7[0] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00605f7c      xmm7[1] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00605f7c      xmm7[2] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00605f7c      xmm7[3] = *(uint32_t*)((char*)arg2->__inner0 + 0xc);
00605f81      float xmm4_1[0x4] = _mm_shuffle_ps(xmm4, xmm4, 0);
00605f85      float xmm5_1[0x4] = _mm_shuffle_ps(xmm5, xmm5, 0);
00605f89      float xmm6_1[0x4] = _mm_shuffle_ps(xmm6, xmm6, 0);
00605f8d      float xmm7_1[0x4] = _mm_shuffle_ps(xmm7, xmm7, 0);
00605f91      float xmm4_2[0x4] = _mm_mul_ps(xmm4_1, xmm0_1);
00605f94      float xmm5_2[0x4] = _mm_mul_ps(xmm5_1, xmm1_1);
00605f97      float xmm6_2[0x4] = _mm_mul_ps(xmm6_1, xmm2_1);
00605f9a      float xmm7_2[0x4] = _mm_mul_ps(xmm7_1, xmm3_1);
00605fa3      float xmm4_4[0x4] = _mm_add_ps(_mm_add_ps(xmm4_2, xmm5_2), _mm_add_ps(xmm6_2, xmm7_2));
00605fa6      float xmm5_3[0x4];
00605fa6      xmm5_3[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00605fa6      xmm5_3[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00605fa6      xmm5_3[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00605fa6      xmm5_3[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
00605fab      float xmm6_4[0x4];
00605fab      xmm6_4[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00605fab      xmm6_4[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00605fab      xmm6_4[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00605fab      xmm6_4[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
00605fb0      float xmm7_3[0x4];
00605fb0      xmm7_3[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00605fb0      xmm7_3[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00605fb0      xmm7_3[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00605fb0      xmm7_3[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x18);
00605fb5      float xmm5_4[0x4] = _mm_shuffle_ps(xmm5_3, xmm5_3, 0);
00605fb9      float xmm6_5[0x4] = _mm_shuffle_ps(xmm6_4, xmm6_4, 0);
00605fbd      float xmm7_4[0x4] = _mm_shuffle_ps(xmm7_3, xmm7_3, 0);
00605fc1      float xmm5_5[0x4] = _mm_mul_ps(xmm5_4, xmm0_1);
00605fc4      float xmm6_6[0x4] = _mm_mul_ps(xmm6_5, xmm1_1);
00605fc7      float xmm7_5[0x4] = _mm_mul_ps(xmm7_4, xmm2_1);
00605fcd      float xmm5_7[0x4] = _mm_add_ps(_mm_add_ps(xmm5_5, xmm6_6), xmm7_5);
00605fd0      float xmm6_7[0x4];
00605fd0      xmm6_7[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00605fd0      xmm6_7[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00605fd0      xmm6_7[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00605fd0      xmm6_7[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x1c);
00605fdc      int32_t xmm5_8[0x4] = _mm_add_ps(xmm5_7, _mm_mul_ps(_mm_shuffle_ps(xmm6_7, xmm6_7, 0), xmm3_1));
00605fdf      float xmm6_10[0x4];
00605fdf      xmm6_10[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00605fdf      xmm6_10[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00605fdf      xmm6_10[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00605fdf      xmm6_10[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
00605fe4      float xmm7_6[0x4];
00605fe4      xmm7_6[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00605fe4      xmm7_6[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00605fe4      xmm7_6[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00605fe4      xmm7_6[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
00605fe9      float xmm6_11[0x4] = _mm_shuffle_ps(xmm6_10, xmm6_10, 0);
00605fed      float xmm7_7[0x4] = _mm_shuffle_ps(xmm7_6, xmm7_6, 0);
00605ff7      float xmm6_13[0x4] = _mm_add_ps(_mm_mul_ps(xmm6_11, xmm0_1), _mm_mul_ps(xmm7_7, xmm1_1));
00605ffa      float xmm7_9[0x4];
00605ffa      xmm7_9[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00605ffa      xmm7_9[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00605ffa      xmm7_9[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00605ffa      xmm7_9[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
00606006      float xmm6_14[0x4] = _mm_add_ps(xmm6_13, _mm_mul_ps(_mm_shuffle_ps(xmm7_9, xmm7_9, 0), xmm2_1));
00606009      float xmm7_12[0x4];
00606009      xmm7_12[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00606009      xmm7_12[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00606009      xmm7_12[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00606009      xmm7_12[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
00606015      float xmm6_15[0x4] = _mm_add_ps(xmm6_14, _mm_mul_ps(_mm_shuffle_ps(xmm7_12, xmm7_12, 0), xmm3_1));
00606018      float xmm7_15[0x4];
00606018      xmm7_15[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00606018      xmm7_15[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00606018      xmm7_15[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00606018      xmm7_15[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
00606021      float xmm0_2[0x4] = _mm_mul_ps(xmm0_1, _mm_shuffle_ps(xmm7_15, xmm7_15, 0));
00606024      float xmm7_17[0x4];
00606024      xmm7_17[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
00606024      xmm7_17[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
00606024      xmm7_17[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
00606024      xmm7_17[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
0060602d      float xmm1_2[0x4] = _mm_mul_ps(xmm1_1, _mm_shuffle_ps(xmm7_17, xmm7_17, 0));
00606030      float xmm7_19[0x4];
00606030      xmm7_19[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00606030      xmm7_19[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00606030      xmm7_19[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00606030      xmm7_19[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x38);
00606039      float xmm2_2[0x4] = _mm_mul_ps(xmm2_1, _mm_shuffle_ps(xmm7_19, xmm7_19, 0));
0060603c      float xmm7_21[0x4];
0060603c      xmm7_21[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
0060603c      xmm7_21[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
0060603c      xmm7_21[2] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
0060603c      xmm7_21[3] = *(uint32_t*)((char*)arg2->__inner0 + 0x3c);
00606045      float xmm3_2[0x4] = _mm_mul_ps(xmm3_1, _mm_shuffle_ps(xmm7_21, xmm7_21, 0));
0060604e      int32_t xmm0_4[0x4] = _mm_add_ps(_mm_add_ps(xmm0_2, xmm1_2), _mm_add_ps(xmm2_2, xmm3_2));
00606057      int64_t xmm4_5 = _mm_unpacklo_ps(xmm4_4, xmm5_8);
0060605a      int64_t xmm6_16 = _mm_unpacklo_ps(xmm6_15, xmm0_4);
0060605d      int64_t xmm1_4 = _mm_unpackhi_ps(xmm4_4, xmm5_8);
00606060      int64_t xmm2_5 = _mm_unpackhi_ps(xmm6_15, xmm0_4);
00606063      *(uint64_t*)((char*)arg1->__inner0 + 0) = xmm4_5;
00606066      *(uint64_t*)((char*)arg1->__inner0 + 8) = xmm6_16;
0060606a      *(uint128_t*)((char*)arg1->__inner0 + 0x10) = (*(uint64_t*)((char*)arg1->__inner0 + 0x10) | (xmm4_5 << 0x40));
0060606e      *(uint128_t*)((char*)arg1->__inner0 + 0x18) = (*(uint64_t*)((char*)arg1->__inner0 + 0x18) | (xmm6_16 << 0x40));
00606072      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = xmm1_4;
00606076      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = xmm2_5;
0060607a      *(uint128_t*)((char*)arg1->__inner0 + 0x30) = (*(uint64_t*)((char*)arg1->__inner0 + 0x30) | (xmm1_4 << 0x40));
0060607e      arg1->__inner0*(int32_t*)((char*)arg1 + 0x38) = (*(uint64_t*)((char*)arg1->__inner0 + 0x38) | (xmm2_5 << 0x40));
00606086      return arg1;
00605f41  }


00606089  struct D3DXVECTOR4* __stdcall sse2_D3DXVec4Cross(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4)

00606089  {
0060608e      int32_t ecx;
0060608e      int32_t var_8 = ecx;
006060a2      int64_t xmm4;
006060a2      xmm4 = arg2->x;
006060a2      *(uint32_t*)((char*)xmm4)[4] = arg2->y;
006060a5      float xmm4_1[0x4] = (xmm4 | (arg2->z*(int32_t*)((char*)arg2 + 8) << 0x40));
006060b0      int64_t xmm0;
006060b0      xmm0 = arg3->x;
006060b0      *(uint32_t*)((char*)xmm0)[4] = arg3->y;
006060b3      float xmm0_1[0x4] = (xmm0 | (arg3->z*(int32_t*)((char*)arg3 + 8) << 0x40));
006060be      int64_t xmm2;
006060be      xmm2 = arg4->x;
006060be      *(uint32_t*)((char*)xmm2)[4] = arg4->y;
006060c1      float xmm2_1[0x4] = (xmm2 | (arg4->z*(int32_t*)((char*)arg4 + 8) << 0x40));
006060c8      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0x39);
006060cf      float xmm1_1[0x4] = _mm_mul_ps(xmm0_2, xmm2_1);
006060d5      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0x4e);
006060d9      float xmm3_1[0x4] = _mm_mul_ps(xmm0_2, xmm2_2);
006060e0      float xmm0_3[0x4] = _mm_mul_ps(xmm0_2, _mm_shuffle_ps(xmm2_2, xmm2_2, 0x39));
006060e6      float xmm2_5[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0x4e);
006060f5      float xmm5_2[0x4] = _mm_sub_ps(_mm_shuffle_ps(xmm3_1, xmm3_1, 0x39), xmm2_5);
006060ff      float xmm2_8[0x4] = __subps_xmmps_memps(_mm_shuffle_ps(xmm0_3, xmm0_3, 0x4e), xmm0_3);
00606106      float xmm6_1[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0x39);
0060610d      float xmm0_5[0x4] = _mm_shuffle_ps(xmm4_1, xmm4_1, 0x39);
00606111      int128_t xmm4_2 = data_828010;
0060611b      float xmm1_3[0x4] = _mm_shuffle_ps(xmm0_5, xmm0_5, 0x39);
00606125      float xmm3_3[0x4] = _mm_shuffle_ps(xmm1_3, xmm1_3, 0x39);
00606129      float xmm0_6[0x4] = _mm_mul_ps(xmm0_5, xmm5_2);
0060612c      float xmm7_1[0x4] = _mm_sub_ps(xmm3_1, xmm6_1);
0060613b      struct D3DXVECTOR4 xmm0_9 = (_mm_add_ps(_mm_add_ps(xmm0_6, _mm_mul_ps(xmm1_3, xmm2_8)), _mm_mul_ps(xmm3_3, xmm7_1)) ^ xmm4_2);
0060613e      arg1->x = xmm0_9.x;
0060613e      arg1->y = xmm0_9.y;
0060613e      arg1->z = xmm0_9.z;
0060613e      arg1->w = xmm0_9.w;
00606147      return arg1;
00606089  }


0060614a  float __stdcall sse_D3DXMatrixDeterminant(struct D3DXMATRIX const* arg1)

0060614a  {
00606158      int32_t ebp;
00606158      int32_t var_c = ebp;
00606159      int32_t var_10 = ebp;
0060615d      void* const __return_addr_1 = __return_addr;
0060616b      float xmm0[0x4];
0060616b      float xmm1[0x4];
0060616b      float xmm2[0x4];
0060616b      float xmm7[0x4];
0060616b      
0060616b      if ((arg1 & 0xf) != 0)
0060616b      {
00606185          xmm1 = (*(uint64_t*)((char*)arg1->__inner0 + 0x10) | (*(uint64_t*)((char*)arg1->__inner0 + 0x18) << 0x40));
00606189          xmm7 = (*(uint64_t*)((char*)arg1->__inner0 + 0) | (*(uint64_t*)((char*)arg1->__inner0 + 8) << 0x40));
00606195          xmm2 = (*(uint64_t*)((char*)arg1->__inner0 + 0x20) | (*(uint64_t*)((char*)arg1->__inner0 + 0x28) << 0x40));
00606199          xmm0 = (*(uint64_t*)((char*)arg1->__inner0 + 0x30) | (*(uint64_t*)((char*)arg1->__inner0 + 0x38) << 0x40));
0060616b      }
0060616b      else
0060616b      {
0060616d          xmm7[0] = *(uint32_t*)((char*)arg1->__inner0 + 0);
0060616d          xmm7[1] = *(uint32_t*)((char*)arg1->__inner0 + 4);
0060616d          xmm7[2] = *(uint32_t*)((char*)arg1->__inner0 + 8);
0060616d          xmm7[3] = *(uint32_t*)((char*)arg1->__inner0 + 0xc);
00606170          xmm1[0] = *(uint32_t*)((char*)arg1->__inner0 + 0x10);
00606170          xmm1[1] = *(uint32_t*)((char*)arg1->__inner0 + 0x14);
00606170          xmm1[2] = *(uint32_t*)((char*)arg1->__inner0 + 0x18);
00606170          xmm1[3] = *(uint32_t*)((char*)arg1->__inner0 + 0x1c);
00606174          xmm2[0] = *(uint32_t*)((char*)arg1->__inner0 + 0x20);
00606174          xmm2[1] = *(uint32_t*)((char*)arg1->__inner0 + 0x24);
00606174          xmm2[2] = *(uint32_t*)((char*)arg1->__inner0 + 0x28);
00606174          xmm2[3] = *(uint32_t*)((char*)arg1->__inner0 + 0x2c);
00606178          xmm0[0] = *(uint32_t*)((char*)arg1->__inner0 + 0x30);
00606178          xmm0[1] = *(uint32_t*)((char*)arg1->__inner0 + 0x34);
00606178          xmm0[2] = *(uint32_t*)((char*)arg1->__inner0 + 0x38);
00606178          xmm0[3] = *(uint32_t*)((char*)arg1->__inner0 + 0x3c);
0060616b      }
0060616b      
0060619d      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2, xmm2, 0x39);
006061a1      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1, xmm1, 0x39);
006061a8      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0, xmm0, 0x4e);
006061ac      float xmm3_1[0x4] = _mm_mul_ps(xmm0, xmm2_2);
006061b2      float xmm0_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm0_2, 0x39);
006061b6      float xmm4_1[0x4] = _mm_mul_ps(xmm0_2, xmm2_2);
006061b9      float xmm2_3[0x4] = _mm_mul_ps(xmm2_2, xmm0_3);
006061c3      float xmm2_5[0x4] = _mm_sub_ps(_mm_shuffle_ps(xmm2_3, xmm2_3, 0x4e), xmm2_3);
006061c9      float xmm1_3[0x4] = _mm_shuffle_ps(xmm1_2, xmm1_2, 0x39);
006061cd      float xmm2_6[0x4] = _mm_mul_ps(xmm2_5, xmm1_3);
006061d0      float xmm1_4[0x4] = _mm_shuffle_ps(xmm1_3, xmm1_3, 0x39);
006061d7      float xmm4_2[0x4] = _mm_shuffle_ps(xmm4_1, xmm4_1, 0x39);
006061de      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0x4e);
006061e2      float xmm6_1[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0x39);
006061e6      float xmm4_3[0x4] = _mm_sub_ps(xmm4_2, xmm3_2);
006061e9      float xmm5_1[0x4] = _mm_sub_ps(xmm4_1, xmm6_1);
006061ec      float xmm0_6[0x4] = _mm_mul_ps(xmm1_2, xmm4_3);
006061ef      float xmm1_5[0x4] = _mm_mul_ps(xmm1_4, xmm5_1);
006061f8      float xmm0_9[0x4] = _mm_mul_ps(_mm_add_ps(_mm_add_ps(xmm0_6, xmm2_6), xmm1_5), xmm7);
00606201      float xmm1_7[0x4] = _mm_add_ps(xmm0_9, (xmm0_9 >> 0x40));
0060621d      return ((int32_t)((long double)(xmm1_7[0] - _mm_shuffle_ps(xmm1_7, xmm1_7, 1))));
0060614a  }

00606220  8b ff                                                                                            ..

00606222  struct D3DXPLANE* __stdcall sse2_D3DXPlaneFromPoints(struct D3DXPLANE* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

00606222  {
00606230      int32_t ebp;
00606230      int32_t var_c = ebp;
00606231      int32_t var_10 = ebp;
00606235      void* const __return_addr_1 = __return_addr;
0060624e      float xmm0_1[0x4] = (arg2->z | (arg2->x << 0x40));
0060625f      float xmm2_1[0x4] = (arg3->z | (arg3->x << 0x40));
00606265      float xmm0_2[0x4] = _mm_sub_ps(xmm0_1, (arg4->z | (arg4->x << 0x40)));
0060626b      float xmm0_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm0_2, 0x78);
0060626f      float xmm1_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm0_2, 0x63);
00606276      float xmm3_1[0x4] = _mm_sub_ps(xmm0_1, xmm2_1);
00606279      int32_t xmm2_2 = ((int32_t)(*(uint128_t*)data_7f4810));
00606283      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0x63);
00606287      float xmm5_1[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0x78);
0060628b      float xmm0_4[0x4] = _mm_mul_ps(xmm0_3, xmm3_2);
0060628e      float xmm5_2[0x4] = _mm_mul_ps(xmm5_1, xmm1_3);
00606291      int32_t xmm1_4 = ((int32_t)(*(uint128_t*)data_7f4820));
00606298      float xmm0_5[0x4] = _mm_sub_ps(xmm0_4, xmm5_2);
0060629b      float xmm4_1[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0xe);
006062a2      float xmm0_6[0x4] = _mm_mul_ps(xmm0_5, xmm0_5);
006062ab      float xmm5_4[0x4] = _mm_add_ps(xmm0_6, (xmm0_6 >> 0x40));
006062b5      float xmm0_9 = (xmm5_4[0] + _mm_shuffle_ps(xmm5_4, xmm5_4, 1));
006062bc      float xmm0_10 = _mm_rsqrt_ss(xmm0_9, xmm0_9);
006062d3      float xmm1_6[0x4] = ((xmm1_4 * xmm0_10) * (xmm2_2 - ((xmm0_9 * xmm0_10) * xmm0_10)));
006062db      float xmm3_4[0x4] = _mm_mul_ps(xmm0_5, _mm_shuffle_ps(xmm1_6, xmm1_6, 0));
006062de      float xmm4_2[0x4] = _mm_mul_ps(xmm4_1, xmm3_4);
006062e1      arg1->a = xmm3_4[0];
006062e1      arg1->b = xmm3_4[1];
006062e1      arg1->c = xmm3_4[2];
006062e1      arg1->d = xmm3_4[3];
006062fd      arg1->d = ((xmm4_2[0] + (((int32_t)(xmm4_2 >> 0x40)) + _mm_shuffle_ps(xmm4_2, xmm4_2, 0x55))) ^ ((int32_t)data_827fa0));
00606308      return arg1;
00606222  }

0060630b                                   8d 49 00                                                                   .I.

0060630e  struct _D3DMATRIX* __stdcall sse2_D3DXMatrixShadow(struct _D3DMATRIX* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXPLANE const* arg3)

0060630e  {
00606317      float xmm1[0x4];
00606317      xmm1[0] = arg3->a;
00606317      xmm1[1] = arg3->b;
00606317      xmm1[2] = arg3->c;
00606317      xmm1[3] = arg3->d;
00606323      uint32_t xmm2_1[0x4] = __andps_xmmxud_memxud(xmm1, data_828060);
00606327      float xmm2_2[0x4] = _mm_mul_ps(xmm2_1, xmm2_1);
0060632d      float xmm3_1[0x4] = _mm_add_ps((xmm2_2 >> 0x40), xmm2_2);
00606337      float xmm2_5[0x4] = (_mm_shuffle_ps(xmm3_1, xmm3_1, 1) + xmm3_1);
00606337      
00606341      if (!(xmm2_5 == 0))
00606341      {
00606343          float xmm6_1 = xmm2_5[0];
00606346          float xmm2_6 = _mm_rsqrt_ss(xmm2_5, xmm6_1);
00606369          float xmm2_8[0x4] = ((xmm2_6 * 0.5f) * (3f - ((xmm6_1 * xmm2_6) * xmm2_6)));
00606371          xmm2_5 = _mm_mul_ps(_mm_shuffle_ps(xmm2_8, xmm2_8, 0), xmm1);
00606341      }
00606341      
00606377      float xmm4[0x4];
00606377      xmm4[0] = arg2->x;
00606377      xmm4[1] = arg2->y;
00606377      xmm4[2] = arg2->z;
00606377      xmm4[3] = arg2->w;
0060637d      float xmm5_1[0x4] = _mm_mul_ps(xmm4, xmm2_5);
00606383      float xmm5_2[0x4] = _mm_add_ps(xmm5_1, (xmm5_1 >> 0x40));
0060638d      float xmm5_3[0x4] = (xmm5_2 + _mm_shuffle_ps(xmm5_2, xmm5_2, 1));
00606391      float xmm5_4[0x4] = _mm_shuffle_ps(xmm5_3, xmm5_3, 0);
00606395      float xmm2_10[0x4] = (xmm2_5 ^ data_828020);
006063a1      float xmm0_1[0x4] = _mm_shuffle_ps(xmm2_10, xmm2_10, 0);
006063a5      float xmm1_2[0x4] = _mm_shuffle_ps(xmm2_10, xmm2_10, 0x55);
006063a9      float xmm2_11[0x4] = _mm_shuffle_ps(xmm2_10, xmm2_10, 0xaa);
006063ad      float xmm3_7[0x4] = _mm_shuffle_ps(xmm2_10, xmm2_10, 0xff);
006063b1      float xmm0_2 = _mm_mul_ps(xmm0_1, xmm4);
006063b4      float xmm1_3[0x4] = _mm_mul_ps(xmm1_2, xmm4);
006063b7      float xmm2_12[0x4] = _mm_mul_ps(xmm2_11, xmm4);
006063ba      float xmm3_8[0x4] = _mm_mul_ps(xmm3_7, xmm4);
006063bd      int64_t xmm0_3 = (xmm0_2 + xmm5_4);
006063c7      uint32_t xmm5_5[0x4] = __andps_xmmxud_memxud(xmm5_4, data_828030);
006063cb      float xmm6_5[0x4] = __andps_xmmxud_memxud(xmm5_4, data_828040);
006063cf      float xmm7_1[0x4] = __andps_xmmxud_memxud(xmm5_4, data_828050);
006063d3      int64_t xmm1_4 = _mm_add_ps(xmm1_3, xmm5_5);
006063d6      int64_t xmm2_13 = _mm_add_ps(xmm2_12, xmm6_5);
006063d9      int64_t xmm3_9 = _mm_add_ps(xmm3_8, xmm7_1);
006063df      *(uint64_t*)((char*)arg1->__inner0 + 0) = xmm0_3;
006063e2      *(uint128_t*)((char*)arg1->__inner0 + 8) = (*(uint64_t*)((char*)arg1->__inner0 + 8) | (xmm0_3 << 0x40));
006063e6      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = xmm1_4;
006063ea      *(uint128_t*)((char*)arg1->__inner0 + 0x18) = (*(uint64_t*)((char*)arg1->__inner0 + 0x18) | (xmm1_4 << 0x40));
006063ee      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = xmm2_13;
006063f2      *(uint128_t*)((char*)arg1->__inner0 + 0x28) = (*(uint64_t*)((char*)arg1->__inner0 + 0x28) | (xmm2_13 << 0x40));
006063f6      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = xmm3_9;
006063fa      arg1->__inner0*(int32_t*)((char*)arg1 + 0x38) = (*(uint64_t*)((char*)arg1->__inner0 + 0x38) | (xmm3_9 << 0x40));
00606403      return arg1;
0060630e  }


00606406  struct D3DXMATRIX* __stdcall sse2_D3DXMatrixReflect(struct D3DXMATRIX* arg1, struct D3DXPLANE const* arg2)

00606406  {
0060640b      int32_t ebp;
0060640b      int32_t var_8 = ebp;
0060640c      int32_t var_c = ebp;
00606410      void* const __return_addr_1 = __return_addr;
00606423      uint32_t xmm0[0x4];
00606423      xmm0[0] = arg2->a;
00606423      xmm0[1] = arg2->b;
0060642d      uint32_t xmm1_1[0x4] = _mm_and_ps(data_827fb0, xmm0);
00606430      float xmm1_2[0x4] = _mm_mul_ps(xmm1_1, xmm1_1);
00606449      float xmm4_1[0x4] = _mm_add_ps(xmm1_2, (xmm1_2 >> 0x40));
00606453      float xmm1_5 = (xmm4_1[0] + _mm_shuffle_ps(xmm4_1, xmm4_1, 1));
00606457      int128_t xmm4_3 = data_827fc0;
00606461      float xmm1_6 = _mm_rsqrt_ss(xmm1_5, xmm1_5);
00606475      float xmm3_1[0x4] = ((0.5f * xmm1_6) * (3f - ((xmm1_5 * xmm1_6) * xmm1_6)));
0060647d      float xmm0_1[0x4] = _mm_mul_ps(xmm0, _mm_shuffle_ps(xmm3_1, xmm3_1, 0));
00606480      float xmm4_4[0x4] = _mm_mul_ps(xmm4_3, xmm0_1);
0060648d      float xmm0_4[0x4] = __addps_xmmps_memps(_mm_mul_ps(_mm_shuffle_ps(xmm0_1, xmm0_1, 0), xmm4_4), data_828000);
0060649e      float xmm1_10[0x4] = __addps_xmmps_memps(_mm_mul_ps(_mm_shuffle_ps(xmm0_1, xmm0_1, 0xff), xmm4_4), data_827fd0);
006064af      float xmm2_4[0x4] = __addps_xmmps_memps(_mm_mul_ps(_mm_shuffle_ps(xmm0_1, xmm0_1, 0xaa), xmm4_4), data_827fe0);
006064bd      float xmm4_6[0x4] = __addps_xmmps_memps(_mm_mul_ps(xmm4_4, _mm_shuffle_ps(xmm0_1, xmm0_1, 0x55)), data_827ff0);
006064c4      *(uint32_t*)((char*)arg1->__inner0 + 0) = xmm0_4[0];
006064c4      *(uint32_t*)((char*)arg1->__inner0 + 4) = xmm0_4[1];
006064c4      *(uint32_t*)((char*)arg1->__inner0 + 8) = xmm0_4[2];
006064c4      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = xmm0_4[3];
006064c7      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = xmm4_6[0];
006064c7      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = xmm4_6[1];
006064c7      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = xmm4_6[2];
006064c7      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = xmm4_6[3];
006064cb      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = xmm2_4[0];
006064cb      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = xmm2_4[1];
006064cb      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = xmm2_4[2];
006064cb      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = xmm2_4[3];
006064cf      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = xmm1_10[0];
006064cf      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = xmm1_10[1];
006064cf      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = xmm1_10[2];
006064cf      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = xmm1_10[3];
006064d9      return arg1;
00606406  }

006064dc                                                                                      8b ff                                    ..

006064de  struct D3DXVECTOR4* __stdcall sse_D3DXVec3Transform(struct D3DXVECTOR4* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

006064de  {
006064e3      int32_t ecx;
006064e3      int32_t var_8 = ecx;
006064f7      float xmm0[0x4];
006064f7      xmm0[0] = arg2->x;
006064f7      xmm0[1] = arg2->y;
006064fa      float z = arg2->z;
00606502      float xmm0_1[0x4];
00606502      float xmm1_4[0x4];
00606502      float xmm2_2[0x4];
00606502      float xmm3_2[0x4];
00606502      
00606502      if ((arg3 & 0xf) != 0)
00606502      {
00606556          float z_2[0x4] = z;
00606562          xmm3_2 = _mm_add_ps(_mm_mul_ps((*(uint64_t*)((char*)arg3->__inner0 + 0x20) | (*(uint64_t*)((char*)arg3->__inner0 + 0x28) << 0x40)), _mm_shuffle_ps(z_2, z_2, 0)), (*(uint64_t*)((char*)arg3->__inner0 + 0x30) | (*(uint64_t*)((char*)arg3->__inner0 + 0x38) << 0x40)));
00606578          xmm2_2 = _mm_mul_ps((*(uint64_t*)((char*)arg3->__inner0 + 0x10) | (*(uint64_t*)((char*)arg3->__inner0 + 0x18) << 0x40)), _mm_shuffle_ps(xmm0, xmm0, 0x55));
0060657e          xmm1_4 = _mm_shuffle_ps(xmm0, xmm0, 0);
00606589          xmm0_1 = (*(uint64_t*)((char*)arg3->__inner0 + 0) | (*(uint64_t*)((char*)arg3->__inner0 + 8) << 0x40));
00606502      }
00606502      else
00606502      {
00606504          float xmm2[0x4];
00606504          xmm2[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
00606504          xmm2[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
00606504          xmm2[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
00606504          xmm2[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
00606508          float xmm3[0x4];
00606508          xmm3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
00606508          xmm3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
00606508          xmm3[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x28);
00606508          xmm3[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x2c);
0060650f          float z_1[0x4] = z;
0060651b          xmm3_2 = _mm_add_ps(_mm_mul_ps(xmm3, _mm_shuffle_ps(z_1, z_1, 0)), xmm2);
0060651e          float xmm2_1[0x4];
0060651e          xmm2_1[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x10);
0060651e          xmm2_1[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x14);
0060651e          xmm2_1[2] = *(uint32_t*)((char*)arg3->__inner0 + 0x18);
0060651e          xmm2_1[3] = *(uint32_t*)((char*)arg3->__inner0 + 0x1c);
00606529          xmm2_2 = _mm_mul_ps(xmm2_1, _mm_shuffle_ps(xmm0, xmm0, 0x55));
0060652f          xmm1_4 = _mm_shuffle_ps(xmm0, xmm0, 0);
00606533          xmm0_1[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
00606533          xmm0_1[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
00606533          xmm0_1[2] = *(uint32_t*)((char*)arg3->__inner0 + 8);
00606533          xmm0_1[3] = *(uint32_t*)((char*)arg3->__inner0 + 0xc);
00606502      }
00606502      
00606596      float xmm0_5[0x4] = _mm_add_ps(_mm_add_ps(_mm_mul_ps(xmm0_1, xmm1_4), xmm2_2), xmm3_2);
00606599      arg1->x = xmm0_5[0];
00606599      arg1->y = xmm0_5[1];
00606599      arg1->z = xmm0_5[2];
00606599      arg1->w = xmm0_5[3];
006065a2      return arg1;
006064de  }


006065a5  struct D3DXQUATERNION* __stdcall sse2_D3DXQuaternionRotationYawPitchRoll(struct D3DXQUATERNION* arg1, float arg2, float arg3, float arg4)

006065a5  {
006065aa      int32_t ecx;
006065aa      int32_t var_8 = ecx;
006065bc      float var_20 = arg4;
006065ce      float var_1c = arg3;
006065d8      float var_18 = arg2;
006065ec      int32_t var_14 = 0;
006065fa      var_20 = _mm_mul_ps(var_20, data_7f4850);
006065fe      float var_30[0x4];
006065fe      sse2_SinCos4(&var_20, &var_20, &var_30);
00606603      float xmm0_1[0x4] = var_20;
0060660a      float xmm1_6[0x4] = __shufps_xmmps_memps_immb(xmm0_1, var_30, 0x99);
0060660f      float xmm0_2[0x4] = __shufps_xmmps_memps_immb(xmm0_1, var_30, 0);
00606617      float xmm2_1[0x4] = _mm_shuffle_ps(xmm1_6, xmm1_6, 0xf7);
0060661e      float xmm3_1[0x4] = _mm_shuffle_ps(xmm1_6, xmm1_6, 0xa8);
00606622      float xmm0_3[0x4] = _mm_shuffle_ps(xmm0_2, xmm0_2, 0x8a);
00606629      float xmm1_8[0x4] = _mm_shuffle_ps(xmm0_3, xmm0_3, 0x8a);
00606633      float xmm0_5[0x4] = _mm_mul_ps(_mm_mul_ps(xmm0_3, xmm2_1), xmm3_1);
00606636      float xmm5_1[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 1);
00606655      float xmm0_6[0x4] = _mm_add_ps(xmm0_5, (_mm_mul_ps(_mm_mul_ps(xmm1_8, _mm_shuffle_ps(xmm2_1, xmm2_1, 0x51)), xmm5_1) ^ data_7f4840));
00606658      arg1->x = xmm0_6[0];
00606658      arg1->y = xmm0_6[1];
00606658      arg1->z = xmm0_6[2];
00606658      arg1->w = xmm0_6[3];
00606661      return arg1;
006065a5  }


00606664  struct D3DXQUATERNION* __stdcall sse2_D3DXQuaternionRotationMatrix(struct D3DXQUATERNION* arg1, struct D3DXMATRIX const* arg2)

00606664  {
0060666c      struct D3DXMATRIX* ecx = arg2;
00606674      long double x87_r7_2 = ((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x14)) + ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0))) + ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x28)));
00606677      long double temp1 = ((long double)0f);
00606677      (x87_r7_2 - temp1);
00606682      struct D3DXQUATERNION* result;
00606682      long double x87_r7_6;
00606682      
00606682      if ((*(uint8_t*)((char*)((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) != 0)
00606682      {
006066c5          float eax_1 = *(uint32_t*)((char*)ecx->__inner0 + 0x14);
006066ca          long double x87_r7_7 = ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0));
006066cf          float eax_2 = *(uint32_t*)((char*)ecx->__inner0 + 0x28);
006066d2          float var_18 = ((float)x87_r7_7);
006066d5          long double temp2_1 = ((long double)eax_1);
006066d5          (x87_r7_7 - temp2_1);
006066d9          float var_10_1 = eax_2;
006066dd          struct D3DXMATRIX* ebx_1 = nullptr;
006066df          eax_2 = ((((x87_r7_7 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp2_1) ? 1 : 0) << 0xe) | 0))));
006066e1          int32_t edi;
006066e1          int32_t var_24_1 = edi;
006066e1          
006066e5          if ((*(uint8_t*)((char*)eax_2)[1] & 1) != 0)
006066e7              ebx_1 = 1;
006066e7          
006066e8          long double x87_r7_8 = ((long double)&var_18[ebx_1]);
006066ec          arg2 = ebx_1;
006066ef          long double temp3_1 = ((long double)var_10_1);
006066ef          (x87_r7_8 - temp3_1);
006066f2          eax_2 = ((((x87_r7_8 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp3_1) ? 1 : 0) << 0xe) | 0))));
006066f2          
006066f7          if ((*(uint8_t*)((char*)eax_2)[1] & 1) != 0)
006066f7          {
006066fb              ebx_1 = 2;
006066fc              arg2 = 2;
006066f7          }
006066f7          
00606701          int32_t edx_2 = (ebx_1 << 2);
00606704          int32_t edi_1 = *(uint32_t*)(edx_2 + 0x7f4860);
00606710          float* esi_2 = (edi_1 << 2);
00606717          int32_t eax_3 = esi_2[0x1fd218];
00606727          result = arg1;
00606739          long double x87_r7_14 = (sqrtl((((((long double)*(uint32_t*)(&var_18 + edx_2)) - ((long double)*(uint32_t*)(&var_18 + esi_2))) - ((long double)&var_18[eax_3])) + ((long double)1f))) * ((long double)0.5f));
00606741          *(uint32_t*)(edx_2 + result) = ((float)x87_r7_14);
00606744          x87_r7_6 = (((long double)0.25f) / x87_r7_14);
00606762          *(uint32_t*)((char*)esi_2 + result) = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)ebx_1 + esi_2) << 2))) + ((long double)*(uint32_t*)((char*)ecx + ((edi_1 + edx_2) << 2)))) * x87_r7_6));
00606772          float* edx_5 = (eax_3 << 2);
00606777          *(uint32_t*)((char*)edx_5 + result) = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)arg2 + (eax_3 << 2)) << 2))) + ((long double)*(uint32_t*)((char*)ecx + ((edx_2 + eax_3) << 2)))) * x87_r7_6));
00606787          result->w = ((float)((((long double)*(uint32_t*)((char*)ecx + (((char*)esi_2 + eax_3) << 2))) - ((long double)*(uint32_t*)((char*)ecx + (((char*)edx_5 + edi_1) << 2)))) * x87_r7_6));
00606682      }
00606682      else
00606682      {
0060668a          result = arg1;
0060668f          long double x87_r7_5 = (sqrtl((x87_r7_2 + ((long double)1f))) * ((long double)0.5f));
00606697          result->w = ((float)x87_r7_5);
0060669a          x87_r7_6 = (((long double)0.25f) / x87_r7_5);
006066a8          result->x = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x18)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x24))) * x87_r7_6));
006066b2          result->y = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x20)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 8))) * x87_r7_6));
006066bd          result->z = ((float)((((long double)*(uint32_t*)((char*)ecx->__inner0 + 4)) - ((long double)*(uint32_t*)((char*)ecx->__inner0 + 0x10))) * x87_r7_6));
00606682      }
0060678d      return result;
00606664  }

00606790                                                  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                  ................
006067a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006067c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006067e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606800  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606820  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606840  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606860  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606880  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006068a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006068c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006068e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606900  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606920  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606940  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606960  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606980  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006069a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006069c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006069e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606a00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606a20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606a40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606a60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606a80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606aa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606ac0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606ae0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606b00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606b20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606b40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606b60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606b80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606ba0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606bc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606be0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606c00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606c20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606c40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606c60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606c80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606ca0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606cc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606ce0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606d00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606d20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606d40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606d60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606d80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606da0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606dc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606de0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606e00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606e20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606e40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606e60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606e80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606ea0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606ec0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606ee0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606f00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606f20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606f40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606f60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606f80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606fa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606fc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00606fe0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................

00607000  void __stdcall AMDSSE_D3DXPlaneTransformArray(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

00607000  {
0060700e      uint32_t i_1 = arg6;
00607012      uint32_t eax = arg1;
00607016      uint32_t ebx = arg3;
00607016      
00607021      if (i_1 > 0)
00607021      {
0060702b          float xmm4_1[0x4] = *(uint128_t*)arg5;
0060702e          float xmm5_1[0x4] = *(uint128_t*)(arg5 + 0x10);
00607032          float xmm6_1[0x4] = *(uint128_t*)(arg5 + 0x20);
00607036          float xmm7_1[0x4] = *(uint128_t*)(arg5 + 0x30);
0060707e          uint32_t i;
0060707e          
0060707e          do
0060707e          {
0060703a              float xmm0_1[0x4] = *(uint32_t*)ebx;
0060703e              float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0);
00607042              float xmm1_1[0x4] = *(uint32_t*)(ebx + 4);
00607047              float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
0060704b              float xmm2_1[0x4] = *(uint32_t*)(ebx + 8);
00607050              float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00607054              float xmm3_1[0x4] = *(uint32_t*)(ebx + 0xc);
00607059              float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0);
0060705d              ebx += arg4;
00607060              float xmm0_3[0x4] = _mm_mul_ps(xmm0_2, xmm4_1);
00607063              float xmm1_3[0x4] = _mm_mul_ps(xmm1_2, xmm5_1);
00607066              float xmm2_3[0x4] = _mm_mul_ps(xmm2_2, xmm6_1);
00607069              float xmm3_3[0x4] = _mm_mul_ps(xmm3_2, xmm7_1);
00607075              *(uint128_t*)eax = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), _mm_add_ps(xmm2_3, xmm3_3));
00607078              eax += arg2;
0060707b              i = i_1;
0060707b              i_1 -= 1;
0060707e          } while (i > 1);
00607021      }
00607000  }

00607095                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........
006070a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006070c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006070e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607100  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607120  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607140  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607160  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607180  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006071a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006071c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006071e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607200  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607220  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607240  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607260  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607280  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006072a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006072c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006072e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607300  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607320  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607340  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607360  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607380  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006073a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006073c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006073e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607400  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607420  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607440  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607460  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607480  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006074a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006074c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006074e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607500  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607520  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607540  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607560  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607580  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006075a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006075c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006075e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607600  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607620  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607640  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607660  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607680  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006076a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006076c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006076e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607700  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607720  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607740  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607760  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607780  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006077a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006077c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006077e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607800  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607820  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607840  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607860  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607880  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006078a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006078c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006078e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607900  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607920  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607940  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607960  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607980  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006079a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006079c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006079e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607a00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607a20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607a40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607a60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607a80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607aa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607ac0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607ae0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607b00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607b20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607b40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607b60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607b80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607ba0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607bc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607be0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607c00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607c20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607c40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607c60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607c80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607ca0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607cc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607ce0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607d00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607d20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607d40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607d60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607d80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607da0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607dc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607de0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607e00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607e20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607e40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607e60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607e80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607ea0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607ec0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607ee0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607f00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607f20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607f40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607f60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607f80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607fa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607fc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00607fe0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................

00608000  void __stdcall AMDSSE_D3DXVec4TransformArray(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

00608000  {
0060800e      uint32_t i_1 = arg6;
00608012      uint32_t eax = arg1;
00608016      uint32_t ebx = arg3;
00608016      
00608021      if (i_1 > 0)
00608021      {
0060802b          float xmm4_1[0x4] = *(uint128_t*)arg5;
0060802e          float xmm5_1[0x4] = *(uint128_t*)(arg5 + 0x10);
00608032          float xmm6_1[0x4] = *(uint128_t*)(arg5 + 0x20);
00608036          float xmm7_1[0x4] = *(uint128_t*)(arg5 + 0x30);
0060807e          uint32_t i;
0060807e          
0060807e          do
0060807e          {
0060803a              float xmm0_1[0x4] = *(uint32_t*)ebx;
0060803e              float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0);
00608042              float xmm1_1[0x4] = *(uint32_t*)(ebx + 4);
00608047              float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
0060804b              float xmm2_1[0x4] = *(uint32_t*)(ebx + 8);
00608050              float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00608054              float xmm3_1[0x4] = *(uint32_t*)(ebx + 0xc);
00608059              float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0);
0060805d              ebx += arg4;
00608060              float xmm0_3[0x4] = _mm_mul_ps(xmm0_2, xmm4_1);
00608063              float xmm1_3[0x4] = _mm_mul_ps(xmm1_2, xmm5_1);
00608066              float xmm2_3[0x4] = _mm_mul_ps(xmm2_2, xmm6_1);
00608069              float xmm3_3[0x4] = _mm_mul_ps(xmm3_2, xmm7_1);
00608075              *(uint128_t*)eax = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), _mm_add_ps(xmm2_3, xmm3_3));
00608078              eax += arg2;
0060807b              i = i_1;
0060807b              i_1 -= 1;
0060807e          } while (i > 1);
00608021      }
00608000  }

00608095                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........
006080a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006080c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006080e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608100  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608120  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608140  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608160  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608180  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006081a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006081c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006081e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608200  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608220  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608240  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608260  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608280  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006082a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006082c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006082e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608300  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608320  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608340  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608360  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608380  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006083a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006083c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006083e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608400  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608420  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608440  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608460  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608480  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006084a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006084c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006084e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608500  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608520  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608540  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608560  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608580  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006085a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006085c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006085e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608600  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608620  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608640  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608660  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608680  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006086a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006086c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006086e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608700  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608720  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608740  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608760  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608780  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006087a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006087c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006087e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608800  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608820  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608840  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608860  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608880  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006088a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006088c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006088e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608900  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608920  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608940  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608960  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608980  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006089a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006089c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006089e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608a00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608a20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608a40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608a60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608a80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608aa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608ac0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608ae0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608b00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608b20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608b40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608b60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608b80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608ba0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608bc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608be0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608c00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608c20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608c40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608c60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608c80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608ca0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608cc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608ce0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608d00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608d20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608d40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608d60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608d80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608da0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608dc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608de0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608e00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608e20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608e40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608e60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608e80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608ea0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608ec0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608ee0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608f00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608f20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608f40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608f60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608f80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608fa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608fc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00608fe0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................

00609000  void __stdcall AMDSSE_D3DXVec2TransformArray(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

00609000  {
00609020      uint32_t ecx = arg6;
00609026      uint32_t eax = arg1;
0060902c      uint32_t edx = arg5;
0060902c      
00609035      if (ecx < 4)
00609035      {
00609037          uint32_t esi = arg3;
00609040          uint32_t temp1_1;
00609040          
00609040          for (bool cond:0_1 = ecx == 0; !(cond:0_1); cond:0_1 = temp1_1 == 1)
00609040          {
00609054              uint32_t (* eax_1)[0x2];
00609054              eax_1 = _x3d_D3DXVec2Transform@12(eax, esi, edx);
00609059              eax = ((char*)eax_1 + arg2);
00609065              esi = (arg3 + arg4);
0060906b              arg3 = esi;
00609071              temp1_1 = arg6;
00609071              arg6 -= 1;
00609040          }
00609040          
00609040          return;
00609035      }
00609035      
00609079      float xmm0_1[0x4] = *(uint32_t*)edx;
0060907d      float xmm1_1[0x4] = *(uint32_t*)(edx + 4);
00609082      float xmm2_1[0x4] = *(uint32_t*)(edx + 8);
00609087      float xmm3_1[0x4] = *(uint32_t*)(edx + 0xc);
0060908c      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0);
00609090      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
00609094      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00609098      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0);
0060909c      float xmm4_1[0x4] = *(uint32_t*)(edx + 0x10);
006090a1      float xmm5_1[0x4] = *(uint32_t*)(edx + 0x14);
006090a6      float xmm6_1[0x4] = *(uint32_t*)(edx + 0x18);
006090ab      float xmm7_1[0x4] = *(uint32_t*)(edx + 0x1c);
006090b0      float xmm4_2[0x4] = _mm_shuffle_ps(xmm4_1, xmm4_1, 0);
006090b4      float xmm5_2[0x4] = _mm_shuffle_ps(xmm5_1, xmm5_1, 0);
006090b8      float xmm6_2[0x4] = _mm_shuffle_ps(xmm6_1, xmm6_1, 0);
006090bc      float xmm7_2[0x4] = _mm_shuffle_ps(xmm7_1, xmm7_1, 0);
006090e7      float xmm0_3[0x4] = *(uint32_t*)(edx + 0x30);
006090ec      float xmm1_3[0x4] = *(uint32_t*)(edx + 0x34);
006090f1      float xmm2_3[0x4] = *(uint32_t*)(edx + 0x38);
006090f6      float xmm3_3[0x4] = *(uint32_t*)(edx + 0x3c);
006090fb      float xmm0_4[0x4] = _mm_shuffle_ps(xmm0_3, xmm0_3, 0);
006090ff      float xmm1_4[0x4] = _mm_shuffle_ps(xmm1_3, xmm1_3, 0);
00609103      float xmm2_4[0x4] = _mm_shuffle_ps(xmm2_3, xmm2_3, 0);
00609107      float xmm3_4[0x4] = _mm_shuffle_ps(xmm3_3, xmm3_3, 0);
0060912b      uint32_t edx_1 = arg3;
00609131      uint32_t esi_2 = arg4;
00609137      int128_t* edi_1 = arg2;
00609137      
00609140      while (true)
00609140      {
00609140          if (ecx < 4)
00609140          {
00609214              if (ecx == 0)
00609214                  break;
00609214              
0060921f              edx_1 += (esi_2 * (ecx - 4));
00609221              eax += (edi_1 * (ecx - 4));
00609223              ecx = 4;
00609228              esi_2 = arg4;
0060922e              edi_1 = arg2;
00609140          }
00609140          else
00609140          {
0060914d              uint32_t edx_2 = (edx_1 + (esi_2 << 1));
00609150              float xmm0_6[0x4] = _mm_unpacklo_ps(*(uint64_t*)edx_1, *(uint64_t*)(esi_2 + edx_1));
00609160              float xmm0_7[0x4] = (xmm0_6 | (_mm_unpacklo_ps(*(uint64_t*)edx_2, *(uint64_t*)(esi_2 + edx_2)) << 0x40));
00609163              float xmm4_5[0x4] = (xmm0_6 >> 0x40);
00609166              edx_1 = (edx_2 + (esi_2 << 1));
00609172              float xmm0_8[0x4] = __mulps_xmmps_memps(xmm0_7, xmm0_2);
00609176              float xmm1_8[0x4] = __mulps_xmmps_memps(xmm0_7, xmm1_2);
0060917b              float xmm3_6[0x4] = __mulps_xmmps_memps(xmm0_7, xmm2_2);
00609180              float xmm5_5[0x4] = __mulps_xmmps_memps(xmm0_7, xmm3_2);
0060918e              float xmm4_6[0x4] = __mulps_xmmps_memps(xmm4_5, xmm4_2);
00609193              float xmm2_6[0x4] = __mulps_xmmps_memps(xmm4_5, xmm5_2);
00609198              float xmm6_4[0x4] = __mulps_xmmps_memps(xmm4_5, xmm6_2);
0060919d              float xmm7_4[0x4] = __mulps_xmmps_memps(xmm4_5, xmm7_2);
006091a2              float xmm0_9[0x4] = _mm_add_ps(xmm0_8, xmm4_6);
006091a5              float xmm1_9[0x4] = _mm_add_ps(xmm1_8, xmm2_6);
006091a8              float xmm3_7[0x4] = _mm_add_ps(xmm3_6, xmm6_4);
006091ab              float xmm5_6[0x4] = _mm_add_ps(xmm5_5, xmm7_4);
006091ae              float xmm0_10[0x4] = __addps_xmmps_memps(xmm0_9, xmm0_4);
006091b6              float xmm1_10[0x4] = __addps_xmmps_memps(xmm1_9, xmm1_4);
006091be              float xmm3_8[0x4] = __addps_xmmps_memps(xmm3_7, xmm2_4);
006091c6              float xmm5_7[0x4] = __addps_xmmps_memps(xmm5_6, xmm3_4);
006091d1              float xmm0_11[0x4] = _mm_unpacklo_ps(xmm0_10, xmm1_10);
006091e0              int128_t xmm0_12 = (xmm0_11 | (_mm_unpacklo_ps(xmm3_8, xmm5_7) << 0x40));
006091e6              int64_t xmm4_8 = _mm_unpackhi_ps(xmm3_8, xmm5_7);
006091e9              float xmm2_8[0x4] = _mm_unpackhi_ps(xmm0_10, xmm1_10);
006091f5              *(uint128_t*)eax = xmm0_12;
006091f8              *(uint128_t*)((char*)edi_1 + eax) = (xmm0_11 >> 0x40);
006091fc              int32_t eax_2 = (eax + (edi_1 << 1));
006091ff              *(uint128_t*)eax_2 = (xmm2_8 | (xmm4_8 << 0x40));
00609202              *(uint128_t*)((char*)edi_1 + eax_2) = (xmm2_8 >> 0x40);
00609206              eax = (eax_2 + (edi_1 << 1));
00609209              ecx -= 4;
00609140          }
00609140      }
00609000  }

0060925f                                                                                               90                                 .

00609260  void __stdcall AMDSSE_D3DXVec2TransformCoordArray(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

00609260  {
00609280      uint32_t ecx = arg6;
00609286      uint32_t eax = arg1;
0060928c      uint32_t edx = arg5;
0060928c      
00609295      if (ecx < 4)
00609295      {
00609297          uint32_t esi = arg3;
006092a0          uint32_t temp1_1;
006092a0          
006092a0          for (bool cond:0_1 = ecx == 0; !(cond:0_1); cond:0_1 = temp1_1 == 1)
006092a0          {
006092b4              uint32_t (* eax_1)[0x2];
006092b4              eax_1 = _x3d_D3DXVec2TransformCoord@12(eax, esi, edx);
006092b9              eax = ((char*)eax_1 + arg2);
006092c5              esi = (arg3 + arg4);
006092cb              arg3 = esi;
006092d1              temp1_1 = arg6;
006092d1              arg6 -= 1;
006092a0          }
006092a0          
006092a0          return;
00609295      }
00609295      
006092d9      float xmm0_1[0x4] = *(uint32_t*)edx;
006092dd      float xmm1_1[0x4] = *(uint32_t*)(edx + 4);
006092e2      float xmm2_1[0x4] = *(uint32_t*)(edx + 8);
006092e7      float xmm3_1[0x4] = *(uint32_t*)(edx + 0xc);
006092ec      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0);
006092f0      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
006092f4      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
006092f8      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0);
006092fc      float xmm4_1[0x4] = *(uint32_t*)(edx + 0x10);
00609301      float xmm5_1[0x4] = *(uint32_t*)(edx + 0x14);
00609306      float xmm6_1[0x4] = *(uint32_t*)(edx + 0x18);
0060930b      float xmm7_1[0x4] = *(uint32_t*)(edx + 0x1c);
00609310      float xmm4_2[0x4] = _mm_shuffle_ps(xmm4_1, xmm4_1, 0);
00609314      float xmm5_2[0x4] = _mm_shuffle_ps(xmm5_1, xmm5_1, 0);
00609318      float xmm6_2[0x4] = _mm_shuffle_ps(xmm6_1, xmm6_1, 0);
0060931c      float xmm7_2[0x4] = _mm_shuffle_ps(xmm7_1, xmm7_1, 0);
00609329      float var_f0_1[0x4] = xmm2_2;
0060933d      float var_b0_1[0x4] = xmm6_2;
00609347      float xmm0_3[0x4] = *(uint32_t*)(edx + 0x30);
0060934c      float xmm1_3[0x4] = *(uint32_t*)(edx + 0x34);
00609351      float xmm2_3[0x4] = *(uint32_t*)(edx + 0x38);
00609356      float xmm3_3[0x4] = *(uint32_t*)(edx + 0x3c);
0060935b      float xmm0_4[0x4] = _mm_shuffle_ps(xmm0_3, xmm0_3, 0);
0060935f      float xmm1_4[0x4] = _mm_shuffle_ps(xmm1_3, xmm1_3, 0);
00609363      float xmm2_4[0x4] = _mm_shuffle_ps(xmm2_3, xmm2_3, 0);
00609367      float xmm3_4[0x4] = _mm_shuffle_ps(xmm3_3, xmm3_3, 0);
0060937b      float var_30_1[0x4] = xmm2_4;
0060938b      uint32_t edx_1 = arg3;
00609391      uint32_t esi_2 = arg4;
00609397      int64_t* edi_1 = arg2;
00609397      
006093a0      while (true)
006093a0      {
006093a0          if (ecx < 4)
006093a0          {
0060945a              if (ecx == 0)
0060945a                  break;
0060945a              
00609465              edx_1 += (esi_2 * (ecx - 4));
00609467              eax += (edi_1 * (ecx - 4));
00609469              ecx = 4;
0060946e              esi_2 = arg4;
00609474              edi_1 = arg2;
006093a0          }
006093a0          else
006093a0          {
006093ad              uint32_t edx_2 = (edx_1 + (esi_2 << 1));
006093b0              float xmm0_6[0x4] = _mm_unpacklo_ps(*(uint64_t*)edx_1, *(uint64_t*)(esi_2 + edx_1));
006093c0              float xmm0_7[0x4] = (xmm0_6 | (_mm_unpacklo_ps(*(uint64_t*)edx_2, *(uint64_t*)(esi_2 + edx_2)) << 0x40));
006093c3              float xmm4_5[0x4] = (xmm0_6 >> 0x40);
006093c6              edx_1 = (edx_2 + (esi_2 << 1));
006093cf              float xmm0_8[0x4] = __mulps_xmmps_memps(xmm0_7, xmm0_2);
006093d3              float xmm1_8[0x4] = __mulps_xmmps_memps(xmm0_7, xmm1_2);
006093d8              float xmm5_5[0x4] = __mulps_xmmps_memps(xmm0_7, xmm3_2);
006093e3              float xmm4_6[0x4] = __mulps_xmmps_memps(xmm4_5, xmm4_2);
006093e8              float xmm2_6[0x4] = __mulps_xmmps_memps(xmm4_5, xmm5_2);
006093ed              float xmm7_4[0x4] = __mulps_xmmps_memps(xmm4_5, xmm7_2);
006093f2              float xmm0_9[0x4] = _mm_add_ps(xmm0_8, xmm4_6);
006093f5              float xmm1_9[0x4] = _mm_add_ps(xmm1_8, xmm2_6);
006093f8              float xmm5_6[0x4] = _mm_add_ps(xmm5_5, xmm7_4);
006093fb              float AMDSSE_two_1[0x4] = (*(uint128_t*)AMDSSE_two);
00609402              float xmm0_10[0x4] = __addps_xmmps_memps(xmm0_9, xmm0_4);
0060940a              float xmm1_10[0x4] = __addps_xmmps_memps(xmm1_9, xmm1_4);
00609412              float xmm5_7[0x4] = __addps_xmmps_memps(xmm5_6, xmm3_4);
0060941a              float xmm4_7[0x4] = _mm_rcp_ps(xmm5_7);
00609423              float xmm4_8[0x4] = _mm_mul_ps(xmm4_7, _mm_sub_ps(AMDSSE_two_1, _mm_mul_ps(xmm5_7, xmm4_7)));
00609426              float xmm0_11[0x4] = _mm_mul_ps(xmm0_10, xmm4_8);
00609429              float xmm1_11[0x4] = _mm_mul_ps(xmm1_10, xmm4_8);
0060942f              float xmm0_12[0x4] = _mm_unpacklo_ps(xmm0_11, xmm1_11);
00609432              float xmm2_9[0x4] = _mm_unpackhi_ps(xmm0_11, xmm1_11);
00609435              *(uint64_t*)eax = xmm0_12;
0060943b              *(uint64_t*)((char*)edi_1 + eax) = ((int64_t)(xmm0_12 >> 0x40));
0060943f              int32_t eax_2 = (eax + (edi_1 << 1));
00609442              *(uint64_t*)eax_2 = xmm2_9;
00609448              *(uint64_t*)((char*)edi_1 + eax_2) = ((int64_t)(xmm2_9 >> 0x40));
0060944c              eax = (eax_2 + (edi_1 << 1));
0060944f              ecx -= 4;
006093a0          }
006093a0      }
00609260  }

006094a5                 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d 9b 00 00 00 00       ..$......$......$..........

006094c0  void __stdcall AMDSSE_D3DXVec2TransformNormalArray(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

006094c0  {
006094e0      uint32_t ecx = arg6;
006094e6      uint32_t eax = arg1;
006094ec      uint32_t edx = arg5;
006094ec      
006094f5      if (ecx < 4)
006094f5      {
006094f7          uint32_t esi = arg3;
00609500          uint32_t temp1_1;
00609500          
00609500          for (bool cond:0_1 = ecx == 0; !(cond:0_1); cond:0_1 = temp1_1 == 1)
00609500          {
00609514              uint32_t (* eax_1)[0x2];
00609514              eax_1 = _x3d_D3DXVec2TransformNormal@12(eax, esi, edx);
00609519              eax = ((char*)eax_1 + arg2);
00609525              esi = (arg3 + arg4);
0060952b              arg3 = esi;
00609531              temp1_1 = arg6;
00609531              arg6 -= 1;
00609500          }
00609500          
00609500          return;
006094f5      }
006094f5      
00609539      float xmm0_1[0x4] = *(uint32_t*)edx;
0060953d      float xmm1_1[0x4] = *(uint32_t*)(edx + 4);
00609542      float xmm2_1[0x4] = *(uint32_t*)(edx + 8);
00609547      float xmm3_1[0x4] = *(uint32_t*)(edx + 0xc);
0060954c      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0);
00609550      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
00609554      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
00609558      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0);
0060955c      float xmm4_1[0x4] = *(uint32_t*)(edx + 0x10);
00609561      float xmm5_1[0x4] = *(uint32_t*)(edx + 0x14);
00609566      float xmm6_1[0x4] = *(uint32_t*)(edx + 0x18);
0060956b      float xmm7_1[0x4] = *(uint32_t*)(edx + 0x1c);
00609570      float xmm4_2[0x4] = _mm_shuffle_ps(xmm4_1, xmm4_1, 0);
00609574      float xmm5_2[0x4] = _mm_shuffle_ps(xmm5_1, xmm5_1, 0);
00609589      float var_f0_1[0x4] = xmm2_2;
0060958e      float var_e0_1[0x4] = xmm3_2;
0060959d      float var_b0_1[0x4] = _mm_shuffle_ps(xmm6_1, xmm6_1, 0);
006095a2      float var_a0_1[0x4] = _mm_shuffle_ps(xmm7_1, xmm7_1, 0);
006095a7      uint32_t edx_1 = arg3;
006095ad      uint32_t esi_2 = arg4;
006095b3      int64_t* edi_1 = arg2;
006095b3      
006095bc      while (true)
006095bc      {
006095bc          if (ecx < 4)
006095bc          {
0060962b              if (ecx == 0)
0060962b                  break;
0060962b              
00609636              edx_1 += (esi_2 * (ecx - 4));
00609638              eax += (edi_1 * (ecx - 4));
0060963a              ecx = 4;
0060963f              esi_2 = arg4;
00609645              edi_1 = arg2;
006095bc          }
006095bc          else
006095bc          {
006095c5              uint32_t edx_2 = (edx_1 + (esi_2 << 1));
006095c8              float xmm0_4[0x4] = _mm_unpacklo_ps(*(uint64_t*)edx_1, *(uint64_t*)(esi_2 + edx_1));
006095d8              float xmm0_5[0x4] = (xmm0_4 | (_mm_unpacklo_ps(*(uint64_t*)edx_2, *(uint64_t*)(esi_2 + edx_2)) << 0x40));
006095db              uint128_t xmm4_5 = (xmm0_4 >> 0x40);
006095de              edx_1 = (edx_2 + (esi_2 << 1));
006095e4              float xmm0_6[0x4] = __mulps_xmmps_memps(xmm0_5, xmm0_2);
006095e8              float xmm1_6[0x4] = __mulps_xmmps_memps(xmm0_5, xmm1_2);
006095f0              float xmm4_6[0x4] = __mulps_xmmps_memps(xmm4_5, xmm4_2);
006095f5              float xmm2_4[0x4] = __mulps_xmmps_memps(xmm4_5, xmm5_2);
006095fa              float xmm0_7[0x4] = _mm_add_ps(xmm0_6, xmm4_6);
006095fd              float xmm1_7[0x4] = _mm_add_ps(xmm1_6, xmm2_4);
00609603              float xmm0_8[0x4] = _mm_unpacklo_ps(xmm0_7, xmm1_7);
00609606              float xmm2_6[0x4] = _mm_unpackhi_ps(xmm0_7, xmm1_7);
00609609              *(uint64_t*)eax = xmm0_8;
0060960f              *(uint64_t*)((char*)edi_1 + eax) = ((int64_t)(xmm0_8 >> 0x40));
00609613              int32_t eax_2 = (eax + (edi_1 << 1));
00609616              *(uint64_t*)eax_2 = xmm2_6;
0060961c              *(uint64_t*)((char*)edi_1 + eax_2) = ((int64_t)(xmm2_6 >> 0x40));
00609620              eax = (eax_2 + (edi_1 << 1));
00609623              ecx -= 4;
006095bc          }
006095bc      }
006094c0  }

00609676                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........
00609680  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006096a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006096c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006096e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609700  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609720  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609740  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609760  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609780  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006097a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006097c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006097e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609800  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609820  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609840  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609860  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609880  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006098a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006098c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006098e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609900  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609920  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609940  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609960  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609980  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006099a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006099c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006099e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609a00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609a20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609a40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609a60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609a80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609aa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609ac0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609ae0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609b00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609b20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609b40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609b60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609b80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609ba0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609bc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609be0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609c00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609c20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609c40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609c60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609c80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609ca0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609cc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609ce0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609d00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609d20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609d40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609d60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609d80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609da0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609dc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609de0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609e00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609e20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609e40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609e60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609e80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609ea0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609ec0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609ee0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609f00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609f20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609f40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609f60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609f80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609fa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609fc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00609fe0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................

0060a000  void __stdcall AMDSSE_D3DXVec3TransformArray(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

0060a000  {
0060a00e      uint32_t i_1 = arg6;
0060a012      uint32_t eax = arg1;
0060a016      uint32_t ebx = arg3;
0060a016      
0060a021      if (i_1 > 0)
0060a021      {
0060a02b          float xmm4_1[0x4] = *(uint128_t*)arg5;
0060a02e          float xmm5_1[0x4] = *(uint128_t*)(arg5 + 0x10);
0060a032          float xmm6_1[0x4] = *(uint128_t*)(arg5 + 0x20);
0060a036          float xmm7_1[0x4] = *(uint128_t*)(arg5 + 0x30);
0060a072          uint32_t i;
0060a072          
0060a072          do
0060a072          {
0060a03a              float xmm0_1[0x4] = *(uint32_t*)ebx;
0060a03e              float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0);
0060a042              float xmm1_1[0x4] = *(uint32_t*)(ebx + 4);
0060a047              float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
0060a04b              float xmm2_1[0x4] = *(uint32_t*)(ebx + 8);
0060a050              float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
0060a054              ebx += arg4;
0060a057              float xmm0_3[0x4] = _mm_mul_ps(xmm0_2, xmm4_1);
0060a05a              float xmm1_3[0x4] = _mm_mul_ps(xmm1_2, xmm5_1);
0060a05d              float xmm2_3[0x4] = _mm_mul_ps(xmm2_2, xmm6_1);
0060a069              *(uint128_t*)eax = _mm_add_ps(_mm_add_ps(xmm0_3, xmm1_3), _mm_add_ps(xmm2_3, xmm7_1));
0060a06c              eax += arg2;
0060a06f              i = i_1;
0060a06f              i_1 -= 1;
0060a072          } while (i > 1);
0060a021      }
0060a000  }

0060a089                             8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8b ff           ..$......$......$......

0060a0a0  void __stdcall AMDSSE_D3DXVec3TransformCoordArray(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

0060a0a0  {
0060a0c0      uint32_t ecx = arg6;
0060a0c6      uint32_t eax = arg1;
0060a0cc      uint32_t edx = arg5;
0060a0cc      
0060a0d5      if (ecx < 4)
0060a0d5      {
0060a0d7          uint32_t esi = arg3;
0060a0e0          uint32_t temp1_1;
0060a0e0          
0060a0e0          for (bool cond:0_1 = ecx == 0; !(cond:0_1); cond:0_1 = temp1_1 == 1)
0060a0e0          {
0060a0e9              uint32_t var_11c_1 = eax;
0060a0ec              uint32_t var_118_1 = esi;
0060a0f0              uint32_t var_114_1 = edx;
0060a0f4              int32_t eax_1;
0060a0f4              eax_1 = _x3d_D3DXVec3TransformCoord@12();
0060a0f9              eax = (eax_1 + arg2);
0060a105              esi = (arg3 + arg4);
0060a10b              arg3 = esi;
0060a111              temp1_1 = arg6;
0060a111              arg6 -= 1;
0060a0e0          }
0060a0e0          
0060a0e0          return;
0060a0d5      }
0060a0d5      
0060a119      float xmm0_1[0x4] = *(uint32_t*)edx;
0060a11d      float xmm1_1[0x4] = *(uint32_t*)(edx + 4);
0060a122      float xmm2_1[0x4] = *(uint32_t*)(edx + 8);
0060a127      float xmm3_1[0x4] = *(uint32_t*)(edx + 0xc);
0060a12c      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0);
0060a130      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
0060a134      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
0060a138      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0);
0060a13c      float xmm4_1[0x4] = *(uint32_t*)(edx + 0x10);
0060a141      float xmm5_1[0x4] = *(uint32_t*)(edx + 0x14);
0060a146      float xmm6_1[0x4] = *(uint32_t*)(edx + 0x18);
0060a14b      float xmm7_1[0x4] = *(uint32_t*)(edx + 0x1c);
0060a150      float xmm4_2[0x4] = _mm_shuffle_ps(xmm4_1, xmm4_1, 0);
0060a154      float xmm5_2[0x4] = _mm_shuffle_ps(xmm5_1, xmm5_1, 0);
0060a158      float xmm6_2[0x4] = _mm_shuffle_ps(xmm6_1, xmm6_1, 0);
0060a15c      float xmm7_2[0x4] = _mm_shuffle_ps(xmm7_1, xmm7_1, 0);
0060a187      float xmm0_3[0x4] = *(uint32_t*)(edx + 0x20);
0060a18c      float xmm1_3[0x4] = *(uint32_t*)(edx + 0x24);
0060a191      float xmm2_3[0x4] = *(uint32_t*)(edx + 0x28);
0060a196      float xmm3_3[0x4] = *(uint32_t*)(edx + 0x2c);
0060a19b      float xmm0_4[0x4] = _mm_shuffle_ps(xmm0_3, xmm0_3, 0);
0060a19f      float xmm1_4[0x4] = _mm_shuffle_ps(xmm1_3, xmm1_3, 0);
0060a1a3      float xmm2_4[0x4] = _mm_shuffle_ps(xmm2_3, xmm2_3, 0);
0060a1a7      float xmm3_4[0x4] = _mm_shuffle_ps(xmm3_3, xmm3_3, 0);
0060a1ab      float xmm4_3[0x4] = *(uint32_t*)(edx + 0x30);
0060a1b0      float xmm5_3[0x4] = *(uint32_t*)(edx + 0x34);
0060a1b5      float xmm6_3[0x4] = *(uint32_t*)(edx + 0x38);
0060a1ba      float xmm7_3[0x4] = *(uint32_t*)(edx + 0x3c);
0060a1bf      float xmm4_4[0x4] = _mm_shuffle_ps(xmm4_3, xmm4_3, 0);
0060a1c3      float xmm5_4[0x4] = _mm_shuffle_ps(xmm5_3, xmm5_3, 0);
0060a1c7      float xmm6_4[0x4] = _mm_shuffle_ps(xmm6_3, xmm6_3, 0);
0060a1cb      float xmm7_4[0x4] = _mm_shuffle_ps(xmm7_3, xmm7_3, 0);
0060a20f      uint32_t edx_1 = arg3;
0060a215      uint32_t esi_2 = arg4;
0060a21b      int64_t* edi_1 = arg2;
0060a21b      
0060a224      while (true)
0060a224      {
0060a224          if (ecx < 4)
0060a224          {
0060a372              if (ecx == 0)
0060a372                  break;
0060a372              
0060a37d              edx_1 += (esi_2 * (ecx - 4));
0060a37f              eax += (edi_1 * (ecx - 4));
0060a381              ecx = 4;
0060a386              esi_2 = arg4;
0060a38c              edi_1 = arg2;
0060a224          }
0060a224          else
0060a224          {
0060a231              float xmm2_5[0x4] = *(uint32_t*)(edx_1 + 8);
0060a236              int64_t xmm3_5 = *(uint32_t*)((esi_2 + edx_1) + 8);
0060a23c              uint32_t edx_2 = (edx_1 + (esi_2 << 1));
0060a23f              float xmm0_6[0x4] = _mm_unpacklo_ps(*(uint64_t*)edx_1, *(uint64_t*)(esi_2 + edx_1));
0060a242              int64_t xmm2_6 = _mm_unpacklo_ps(xmm2_5, xmm3_5);
0060a24c              float xmm6_5[0x4] = *(uint32_t*)(edx_2 + 8);
0060a251              int64_t xmm7_5 = *(uint32_t*)((esi_2 + edx_2) + 8);
0060a257              int64_t xmm4_6 = _mm_unpacklo_ps(*(uint64_t*)edx_2, *(uint64_t*)(esi_2 + edx_2));
0060a260              float xmm2_7[0x4] = (xmm2_6 | (_mm_unpacklo_ps(xmm6_5, xmm7_5) << 0x40));
0060a263              float xmm0_7[0x4] = (xmm0_6 | (xmm4_6 << 0x40));
0060a266              uint128_t xmm4_7 = (xmm0_6 >> 0x40);
0060a269              edx_1 = (edx_2 + (esi_2 << 1));
0060a275              float xmm0_8[0x4] = __mulps_xmmps_memps(xmm0_7, xmm0_2);
0060a279              float xmm1_8[0x4] = __mulps_xmmps_memps(xmm0_7, xmm1_2);
0060a27e              float xmm3_7[0x4] = __mulps_xmmps_memps(xmm0_7, xmm2_2);
0060a283              float xmm5_7[0x4] = __mulps_xmmps_memps(xmm0_7, xmm3_2);
0060a28b              float xmm7_6[0x4] = xmm4_7;
0060a28e              float xmm4_8[0x4] = __mulps_xmmps_memps(xmm4_7, xmm4_2);
0060a293              float xmm6_8[0x4] = __mulps_xmmps_memps(xmm4_7, xmm5_2);
0060a298              float xmm0_9[0x4] = _mm_add_ps(xmm0_8, xmm4_8);
0060a29b              float xmm1_9[0x4] = _mm_add_ps(xmm1_8, xmm6_8);
0060a2a1              float xmm6_10[0x4] = __mulps_xmmps_memps(xmm7_6, xmm6_2);
0060a2a6              float xmm7_7[0x4] = __mulps_xmmps_memps(xmm7_6, xmm7_2);
0060a2ab              float xmm3_8[0x4] = _mm_add_ps(xmm3_7, xmm6_10);
0060a2ae              float xmm5_8[0x4] = _mm_add_ps(xmm5_7, xmm7_7);
0060a2ba              float xmm2_8[0x4] = __mulps_xmmps_memps(xmm2_7, xmm0_4);
0060a2c2              float xmm4_10[0x4] = __mulps_xmmps_memps(xmm2_7, xmm1_4);
0060a2ca              float xmm6_12[0x4] = __mulps_xmmps_memps(xmm2_7, xmm2_4);
0060a2d2              float xmm7_9[0x4] = __mulps_xmmps_memps(xmm2_7, xmm3_4);
0060a2da              float xmm0_10[0x4] = _mm_add_ps(xmm0_9, xmm2_8);
0060a2dd              float xmm1_10[0x4] = _mm_add_ps(xmm1_9, xmm4_10);
0060a2e0              float xmm3_9[0x4] = _mm_add_ps(xmm3_8, xmm6_12);
0060a2e3              float xmm5_9[0x4] = _mm_add_ps(xmm5_8, xmm7_9);
0060a2e6              float AMDSSE_two_1[0x4] = (*(uint128_t*)AMDSSE_two);
0060a2ed              float xmm0_11[0x4] = __addps_xmmps_memps(xmm0_10, xmm4_4);
0060a2f5              float xmm1_11[0x4] = __addps_xmmps_memps(xmm1_10, xmm5_4);
0060a2fd              float xmm3_10[0x4] = __addps_xmmps_memps(xmm3_9, xmm6_4);
0060a305              float xmm5_10[0x4] = __addps_xmmps_memps(xmm5_9, xmm7_4);
0060a30d              float xmm4_11[0x4] = _mm_rcp_ps(xmm5_10);
0060a316              float xmm4_12[0x4] = _mm_mul_ps(xmm4_11, _mm_sub_ps(AMDSSE_two_1, _mm_mul_ps(xmm5_10, xmm4_11)));
0060a319              float xmm0_12[0x4] = _mm_mul_ps(xmm0_11, xmm4_12);
0060a31c              float xmm1_12[0x4] = _mm_mul_ps(xmm1_11, xmm4_12);
0060a31f              float xmm3_11[0x4] = _mm_mul_ps(xmm3_10, xmm4_12);
0060a325              float xmm0_13[0x4] = _mm_unpacklo_ps(xmm0_12, xmm1_12);
0060a328              float xmm2_11[0x4] = _mm_unpackhi_ps(xmm0_12, xmm1_12);
0060a32b              *(uint64_t*)eax = xmm0_13;
0060a32e              *(uint32_t*)(eax + 8) = xmm3_11;
0060a333              float xmm3_12[0x4] = _mm_shuffle_ps(xmm3_11, xmm3_11, 0xf9);
0060a33a              *(uint64_t*)((char*)edi_1 + eax) = ((int64_t)(xmm0_13 >> 0x40));
0060a33e              *(uint32_t*)(((char*)edi_1 + eax) + 8) = xmm3_12;
0060a344              float xmm3_13[0x4] = _mm_shuffle_ps(xmm3_12, xmm3_12, 0xf9);
0060a348              int32_t eax_2 = (eax + (edi_1 << 1));
0060a34b              *(uint64_t*)eax_2 = xmm2_11;
0060a34e              *(uint32_t*)(eax_2 + 8) = xmm3_13;
0060a353              int32_t xmm3_14 = _mm_shuffle_ps(xmm3_13, xmm3_13, 0xf9);
0060a35a              *(uint64_t*)((char*)edi_1 + eax_2) = ((int64_t)(xmm2_11 >> 0x40));
0060a35e              *(uint32_t*)(((char*)edi_1 + eax_2) + 8) = xmm3_14;
0060a364              eax = (eax_2 + (edi_1 << 1));
0060a367              ecx -= 4;
0060a224          }
0060a224      }
0060a0a0  }

0060a3bd                                                                                         8d 49 00                               .I.

0060a3c0  void __stdcall AMDSSE_D3DXVec3TransformNormalArray(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6)

0060a3c0  {
0060a3e0      uint32_t ecx = arg6;
0060a3e6      uint32_t eax = arg1;
0060a3ec      uint32_t edx = arg5;
0060a3ec      
0060a3f5      if (ecx < 4)
0060a3f5      {
0060a3f7          uint32_t esi = arg3;
0060a400          uint32_t temp1_1;
0060a400          
0060a400          for (bool cond:0_1 = ecx == 0; !(cond:0_1); cond:0_1 = temp1_1 == 1)
0060a400          {
0060a414              uint32_t (* eax_1)[0x2];
0060a414              eax_1 = _x3d_D3DXVec3TransformNormal@12(eax, esi, edx);
0060a419              eax = ((char*)eax_1 + arg2);
0060a425              esi = (arg3 + arg4);
0060a42b              arg3 = esi;
0060a431              temp1_1 = arg6;
0060a431              arg6 -= 1;
0060a400          }
0060a400          
0060a400          return;
0060a3f5      }
0060a3f5      
0060a439      float xmm0_1[0x4] = *(uint32_t*)edx;
0060a43d      float xmm1_1[0x4] = *(uint32_t*)(edx + 4);
0060a442      float xmm2_1[0x4] = *(uint32_t*)(edx + 8);
0060a447      float xmm3_1[0x4] = *(uint32_t*)(edx + 0xc);
0060a44c      float xmm0_2[0x4] = _mm_shuffle_ps(xmm0_1, xmm0_1, 0);
0060a450      float xmm1_2[0x4] = _mm_shuffle_ps(xmm1_1, xmm1_1, 0);
0060a454      float xmm2_2[0x4] = _mm_shuffle_ps(xmm2_1, xmm2_1, 0);
0060a458      float xmm3_2[0x4] = _mm_shuffle_ps(xmm3_1, xmm3_1, 0);
0060a45c      float xmm4_1[0x4] = *(uint32_t*)(edx + 0x10);
0060a461      float xmm5_1[0x4] = *(uint32_t*)(edx + 0x14);
0060a466      float xmm6_1[0x4] = *(uint32_t*)(edx + 0x18);
0060a46b      float xmm7_1[0x4] = *(uint32_t*)(edx + 0x1c);
0060a470      float xmm4_2[0x4] = _mm_shuffle_ps(xmm4_1, xmm4_1, 0);
0060a474      float xmm5_2[0x4] = _mm_shuffle_ps(xmm5_1, xmm5_1, 0);
0060a478      float xmm6_2[0x4] = _mm_shuffle_ps(xmm6_1, xmm6_1, 0);
0060a48e      float var_e0_1[0x4] = xmm3_2;
0060a4a2      float var_a0_1[0x4] = _mm_shuffle_ps(xmm7_1, xmm7_1, 0);
0060a4a7      float xmm0_3[0x4] = *(uint32_t*)(edx + 0x20);
0060a4ac      float xmm1_3[0x4] = *(uint32_t*)(edx + 0x24);
0060a4b1      float xmm2_3[0x4] = *(uint32_t*)(edx + 0x28);
0060a4b6      float xmm3_3[0x4] = *(uint32_t*)(edx + 0x2c);
0060a4bb      float xmm0_4[0x4] = _mm_shuffle_ps(xmm0_3, xmm0_3, 0);
0060a4bf      float xmm1_4[0x4] = _mm_shuffle_ps(xmm1_3, xmm1_3, 0);
0060a4c3      float xmm2_4[0x4] = _mm_shuffle_ps(xmm2_3, xmm2_3, 0);
0060a4e3      float var_60_1[0x4] = _mm_shuffle_ps(xmm3_3, xmm3_3, 0);
0060a4eb      uint32_t edx_1 = arg3;
0060a4f1      uint32_t esi_2 = arg4;
0060a4f7      int64_t* edi_1 = arg2;
0060a4f7      
0060a500      while (true)
0060a500      {
0060a500          if (ecx < 4)
0060a500          {
0060a5f1              if (ecx == 0)
0060a5f1                  break;
0060a5f1              
0060a5fc              edx_1 += (esi_2 * (ecx - 4));
0060a5fe              eax += (edi_1 * (ecx - 4));
0060a600              ecx = 4;
0060a605              esi_2 = arg4;
0060a60b              edi_1 = arg2;
0060a500          }
0060a500          else
0060a500          {
0060a50d              float xmm2_5[0x4] = *(uint32_t*)(edx_1 + 8);
0060a512              int64_t xmm3_5 = *(uint32_t*)((esi_2 + edx_1) + 8);
0060a518              uint32_t edx_2 = (edx_1 + (esi_2 << 1));
0060a51b              float xmm0_6[0x4] = _mm_unpacklo_ps(*(uint64_t*)edx_1, *(uint64_t*)(esi_2 + edx_1));
0060a51e              int64_t xmm2_6 = _mm_unpacklo_ps(xmm2_5, xmm3_5);
0060a528              float xmm6_3[0x4] = *(uint32_t*)(edx_2 + 8);
0060a52d              int64_t xmm7_3 = *(uint32_t*)((esi_2 + edx_2) + 8);
0060a533              int64_t xmm4_4 = _mm_unpacklo_ps(*(uint64_t*)edx_2, *(uint64_t*)(esi_2 + edx_2));
0060a53c              float xmm2_7[0x4] = (xmm2_6 | (_mm_unpacklo_ps(xmm6_3, xmm7_3) << 0x40));
0060a53f              float xmm0_7[0x4] = (xmm0_6 | (xmm4_4 << 0x40));
0060a542              uint128_t xmm4_5 = (xmm0_6 >> 0x40);
0060a545              edx_1 = (edx_2 + (esi_2 << 1));
0060a54e              float xmm0_8[0x4] = __mulps_xmmps_memps(xmm0_7, xmm0_2);
0060a552              float xmm1_8[0x4] = __mulps_xmmps_memps(xmm0_7, xmm1_2);
0060a557              float xmm3_7[0x4] = __mulps_xmmps_memps(xmm0_7, xmm2_2);
0060a562              float xmm4_6[0x4] = __mulps_xmmps_memps(xmm4_5, xmm4_2);
0060a567              float xmm6_6[0x4] = __mulps_xmmps_memps(xmm4_5, xmm5_2);
0060a56c              float xmm5_5[0x4] = __mulps_xmmps_memps(xmm4_5, xmm6_2);
0060a571              float xmm0_9[0x4] = _mm_add_ps(xmm0_8, xmm4_6);
0060a574              float xmm1_9[0x4] = _mm_add_ps(xmm1_8, xmm6_6);
0060a577              float xmm3_8[0x4] = _mm_add_ps(xmm3_7, xmm5_5);
0060a580              float xmm2_8[0x4] = __mulps_xmmps_memps(xmm2_7, xmm0_4);
0060a588              float xmm4_8[0x4] = __mulps_xmmps_memps(xmm2_7, xmm1_4);
0060a590              float xmm7_5[0x4] = __mulps_xmmps_memps(xmm2_7, xmm2_4);
0060a598              float xmm0_10[0x4] = _mm_add_ps(xmm0_9, xmm2_8);
0060a59b              float xmm1_10[0x4] = _mm_add_ps(xmm1_9, xmm4_8);
0060a59e              float xmm3_9[0x4] = _mm_add_ps(xmm3_8, xmm7_5);
0060a5a4              float xmm0_11[0x4] = _mm_unpacklo_ps(xmm0_10, xmm1_10);
0060a5a7              float xmm2_10[0x4] = _mm_unpackhi_ps(xmm0_10, xmm1_10);
0060a5aa              *(uint64_t*)eax = xmm0_11;
0060a5ad              *(uint32_t*)(eax + 8) = xmm3_9;
0060a5b2              float xmm3_10[0x4] = _mm_shuffle_ps(xmm3_9, xmm3_9, 0xf9);
0060a5b9              *(uint64_t*)((char*)edi_1 + eax) = ((int64_t)(xmm0_11 >> 0x40));
0060a5bd              *(uint32_t*)(((char*)edi_1 + eax) + 8) = xmm3_10;
0060a5c3              float xmm3_11[0x4] = _mm_shuffle_ps(xmm3_10, xmm3_10, 0xf9);
0060a5c7              int32_t eax_2 = (eax + (edi_1 << 1));
0060a5ca              *(uint64_t*)eax_2 = xmm2_10;
0060a5cd              *(uint32_t*)(eax_2 + 8) = xmm3_11;
0060a5d2              int32_t xmm3_12 = _mm_shuffle_ps(xmm3_11, xmm3_11, 0xf9);
0060a5d9              *(uint64_t*)((char*)edi_1 + eax_2) = ((int64_t)(xmm2_10 >> 0x40));
0060a5dd              *(uint32_t*)(((char*)edi_1 + eax_2) + 8) = xmm3_12;
0060a5e3              eax = (eax_2 + (edi_1 << 1));
0060a5e6              ecx -= 4;
0060a500          }
0060a500      }
0060a3c0  }


0060a63c  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionMultiply(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3)

0060a63c  {
0060a644      int64_t st2;
0060a644      st2 = arg3->x;
0060a644      *(uint32_t*)((char*)st2)[4] = arg3->y;
0060a647      int64_t st3;
0060a647      st3 = arg3->z;
0060a647      *(uint32_t*)((char*)st3)[4] = arg3->w;
0060a651      int64_t st0;
0060a651      st0 = arg2->x;
0060a651      *(uint32_t*)((char*)st0)[4] = arg2->y;
0060a654      int64_t temp0 = _m_punpckhdq(st2, st2);
0060a657      int64_t temp0_1 = _m_punpckhdq(st3, st3);
0060a65a      int64_t st1;
0060a65a      st1 = arg2->z;
0060a65a      *(uint32_t*)((char*)st1)[4] = arg2->w;
0060a65e      int64_t st4 = _m_punpckldq(temp0, st2);
0060a661      int64_t st5 = _m_punpckldq(temp0_1, st3);
0060a664      int64_t* result = arg1;
0060a66b      int64_t st7 = st5;
0060a66e      int64_t temp0_4 = __pfmul_mmxq_mmxq(st2, st1);
0060a679      int64_t temp0_5 = __pfmul_mmxq_mmxq(st3, st0);
0060a684      int64_t temp0_6 = __pfmul_mmxq_mmxq((st5 ^ 0x80000000), st0);
0060a688      int64_t temp0_7 = __pfmul_mmxq_mmxq(st4, st1);
0060a68c      int64_t temp0_8 = __pfadd_mmxq_mmxq((temp0_4 ^ 0x80000000), temp0_5);
0060a690      st3 = arg3->x;
0060a690      *(uint32_t*)((char*)st3)[4] = arg3->y;
0060a693      int64_t temp0_9 = __pfsub_mmxq_mmxq(temp0_7, temp0_6);
0060a697      st5 = arg3->z;
0060a697      *(uint32_t*)((char*)st5)[4] = arg3->w;
0060a69b      int64_t temp0_10 = __pfmul_mmxq_mmxq(st7, st1);
0060a6a6      int64_t temp0_11 = __pfacc_mmxq_mmxq(temp0_9, temp0_8);
0060a6aa      int64_t temp0_12 = __pfmul_mmxq_mmxq((st4 ^ 0x80000000), st0);
0060a6b5      int64_t temp0_13 = __pfmul_mmxq_mmxq(st3, st0);
0060a6b9      *(uint64_t*)result = temp0_11;
0060a6bc      int64_t temp0_14 = __pfmul_mmxq_mmxq((st5 ^ 0x80000000), st1);
0060a6cc      result[1] = __pfacc_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_12, temp0_10), __pfsub_mmxq_mmxq(temp0_14, temp0_13));
0060a6d0      __femms();
0060a6d2      return result;
0060a63c  }


0060a6d5  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionNormalize(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

0060a6d5  {
0060a6d9      int64_t st0;
0060a6d9      st0 = arg2->x;
0060a6d9      *(uint32_t*)((char*)st0)[4] = arg2->y;
0060a6dc      int64_t st2;
0060a6dc      st2 = arg2->z;
0060a6dc      *(uint32_t*)((char*)st2)[4] = arg2->w;
0060a6ee      int64_t temp0_2 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(st0, st0), __pfmul_mmxq_mmxq(st2, st2));
0060a6f6      int64_t temp0_3 = __pfacc_mmxq_mmxq(temp0_2, temp0_2);
0060a6fd      int64_t st4;
0060a6fd      int64_t temp0_4 = __pfrsqrt_mmxq_mmxq(st4, temp0_3);
0060a701      int64_t temp0_5 = __pfcmpgt_mmxq_memq(temp0_3, 0x80000000800000);
0060a71a      int64_t temp0_8 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(temp0_3, __pfmul_mmxq_mmxq(temp0_4, temp0_4)), temp0_4);
0060a71e      int64_t temp0_9 = __pfmul_mmxq_mmxq((st0 & temp0_5), temp0_8);
0060a722      int64_t temp0_10 = __pfmul_mmxq_mmxq((st2 & temp0_5), temp0_8);
0060a726      arg1->x = temp0_9;
0060a726      arg1->y = *(uint32_t*)((char*)temp0_9)[4];
0060a729      arg1->z = temp0_10;
0060a729      arg1->w = *(uint32_t*)((char*)temp0_10)[4];
0060a72d      __femms();
0060a72f      return arg1;
0060a6d5  }


0060a732  void __stdcall x3d_D3DXQuaternionToAxisAngle(struct D3DXQUATERNION const* arg1, struct D3DXVECTOR3* arg2, float* arg3)

0060a732  {
0060a73d      int64_t st5;
0060a73d      st5 = arg1->x;
0060a73d      *(uint32_t*)((char*)st5)[4] = arg1->y;
0060a740      int64_t st0;
0060a740      st0 = arg1->z;
0060a740      *(uint32_t*)((char*)st0)[4] = arg1->w;
0060a740      
0060a74a      if (arg2 != 0)
0060a74a      {
0060a74c          arg2->x = st5;
0060a74c          arg2->y = *(uint32_t*)((char*)st5)[4];
0060a74f          arg2->z = st0;
0060a74a      }
0060a74a      
0060a755      int64_t temp0 = _m_punpckhdq(st0, st0);
0060a755      
0060a758      if (arg3 != 0)
0060a758      {
0060a75a          _a_acos();
0060a76b          *(uint32_t*)arg3 = __pfmul_mmxq_memq(temp0, 0x4000000040000000);
0060a758      }
0060a758      
0060a771      __femms();
0060a732  }


0060a776  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionRotationMatrix(struct D3DXQUATERNION* arg1, struct D3DXMATRIX const* arg2)

0060a776  {
0060a77a      int64_t st0 = *(uint64_t*)((char*)arg2->__inner0 + 0);
0060a780      uint64_t st4 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x14));
0060a78d      int64_t temp0 = __pfadd_mmxq_mmxq(st0, st4);
0060a791      uint64_t st5 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x28));
0060a795      int64_t temp0_1 = __pfsub_mmxq_mmxq(st0, st4);
0060a799      int64_t temp0_2 = __pfsubr_mmxq_mmxq(st0, st4);
0060a79d      int64_t temp0_3 = __pfsubr_mmxq_mmxq(st0, st5);
0060a7a1      int64_t temp0_4 = __pfadd_mmxq_mmxq(temp0, st5);
0060a7a5      int64_t temp0_5 = __pfsub_mmxq_mmxq(temp0_1, st5);
0060a7a9      int64_t temp0_6 = __pfsub_mmxq_mmxq(temp0_2, st5);
0060a7ad      st5 = *(uint64_t*)((char*)arg2->__inner0 + 0x20);
0060a7b1      int64_t temp0_7 = __pfsub_mmxq_mmxq(temp0_3, st4);
0060a7b5      st0 = _m_punpckldq(temp0_4, temp0_6);
0060a7bb      uint32_t temp0_9[0x2] = _m_punpckldq(0, temp0_5);
0060a7be      uint64_t st7 = _m_punpckldq(temp0_6, temp0_5);
0060a7c1      int64_t st3 = _m_punpckldq(temp0_7, temp0_7);
0060a7cc      uint32_t st6[0x2] = _m_packssdw(__pfcmpge_mmxq_mmxq(temp0_9, st0), __pfcmpge_mmxq_mmxq(st7, st3));
0060a7d2      uint32_t ecx = _m_packsswb(st6, st6)[0];
0060a7db      st6 = st5;
0060a7e0      int64_t st1;
0060a7e0      
0060a7e0      if ((ecx & 1) == 0)
0060a7e0      {
0060a7e2          int64_t temp0_16 = __pfadd_mmxq_memq(st0, -0x407fffffc0800000);
0060a7ea          st3 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x18));
0060a7ee          st7 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 8));
0060a7f2          int64_t temp0_17 = __pfrsqrt_mmxq_mmxq(st4, temp0_16);
0060a7f6          st3 = _m_punpckldq(st3, st5);
0060a7f9          st7 = _m_punpckldq(st7, st7);
0060a7ff          st0 = _m_punpckldq(temp0_16, temp0_16);
0060a802          int64_t temp0_21 = __pfmul_mmxq_mmxq(temp0_17, temp0_17);
0060a806          int64_t temp0_22 = _m_punpckhdq(st5, st7);
0060a809          st6 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x10));
0060a80d          int64_t temp0_23 = __pfrsqit1_mmxq_mmxq(temp0_21, st0);
0060a811          int64_t temp0_24 = _m_punpckhdq(temp0_5, temp0_5);
0060a814          int64_t temp0_25 = __pfsub_mmxq_mmxq(st3, temp0_22);
0060a818          int64_t temp0_26 = __pfrcpit2_mmxq_mmxq(temp0_23, temp0_17);
0060a81c          int64_t temp0_27 = __pfsub_mmxq_mmxq(temp0_24, st6);
0060a820          int64_t temp0_28 = __pfmul_mmxq_memq(temp0_26, 0x3f0000003f000000);
0060a82c          int64_t temp0_29 = __pfmul_mmxq_mmxq(st0, temp0_28);
0060a830          int64_t temp0_30 = __pfmul_mmxq_mmxq(temp0_27, temp0_28);
0060a834          int64_t temp0_31 = __pfmul_mmxq_mmxq(temp0_25, temp0_28);
0060a838          st1 = _m_punpckldq(temp0_30, temp0_29);
0060a83b          arg1->x = temp0_31;
0060a83b          arg1->y = *(uint32_t*)((char*)temp0_31)[4];
0060a83e          arg1->z = st1;
0060a83e          arg1->w = *(uint32_t*)((char*)st1)[4];
0060a842          __femms();
0060a844          return arg1;
0060a7e0      }
0060a7e0      
0060a855      if ((ecx & 0xff00ff00) == 0xff00ff00)
0060a855      {
0060a857          int64_t temp0_33 = __pfadd_mmxq_memq(temp0_5, -0x407fffffc0800000);
0060a85f          int64_t temp0_34 = _m_punpckhdq(temp0_6, temp0_6);
0060a862          int64_t temp0_35 = __pfrsqrt_mmxq_mmxq(st4, temp0_33);
0060a866          st3 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x10));
0060a86d          int64_t temp0_36 = __pfmul_mmxq_mmxq(temp0_35, temp0_35);
0060a871          st1 = _m_punpckldq(temp0_33, temp0_33);
0060a874          st5 = __punpckldq_mmxq_memd(st5, *(uint32_t*)((char*)arg2->__inner0 + 0x18));
0060a878          int64_t temp0_39 = __pfsub_mmxq_mmxq(st3, temp0_34);
0060a87c          int64_t temp0_40 = __pfrsqit1_mmxq_mmxq(temp0_36, st1);
0060a880          st7 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 8));
0060a884          st6 = _m_punpckhdq(st6, st6[0]);
0060a887          int64_t temp0_42 = __pfrcpit2_mmxq_mmxq(temp0_40, temp0_35);
0060a88b          st7 = _m_punpckldq(st7, st6[0]);
0060a88e          int64_t temp0_44 = __pfmul_mmxq_memq(temp0_42, 0x3f0000003f000000);
0060a89d          int64_t temp0_45 = __pfmul_mmxq_mmxq(st1, temp0_44);
0060a8a1          int64_t temp0_46 = __pfadd_mmxq_mmxq(st5, (st7 ^ 0x8000000000000000));
0060a8a5          int64_t temp0_47 = __pfmul_mmxq_mmxq(temp0_39, temp0_44);
0060a8ad          int64_t temp0_48 = __pfmul_mmxq_mmxq(temp0_46, temp0_44);
0060a8b1          st1 = _m_punpckldq(temp0_45, temp0_47);
0060a8b4          arg1->z = temp0_48;
0060a8b4          arg1->w = *(uint32_t*)((char*)temp0_48)[4];
0060a8b8          arg1->x = st1;
0060a8b8          arg1->y = *(uint32_t*)((char*)st1)[4];
0060a8bb          __femms();
0060a8bd          return arg1;
0060a855      }
0060a855      
0060a8c6      int64_t* eax_5 = arg1;
0060a8c6      
0060a8ca      if ((ecx & 0x10000) == 0)
0060a8ca      {
0060a934          int64_t temp0_67 = __pfadd_mmxq_memq(st3, -0x407fffffc0800000);
0060a93c          int64_t temp0_68 = _m_punpckhdq(temp0_5, temp0_5);
0060a93f          int64_t temp0_69 = __pfrsqrt_mmxq_mmxq(temp0_6, temp0_67);
0060a943          st4 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 8));
0060a947          st6 = _m_punpckhdq(st6, st6[0]);
0060a94d          int64_t temp0_71 = __pfmul_mmxq_mmxq(temp0_69, temp0_69);
0060a951          st3 = _m_punpckldq(temp0_67, temp0_67);
0060a954          st5 = __punpckldq_mmxq_memd(st5, *(uint32_t*)((char*)arg2->__inner0 + 0x18));
0060a958          st4 = _m_punpckldq(st4, st6[0]);
0060a95b          int64_t temp0_75 = __pfrsqit1_mmxq_mmxq(temp0_71, st3);
0060a95f          st7 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x10));
0060a963          int64_t temp0_76 = __pfrcpit2_mmxq_mmxq(temp0_75, temp0_69);
0060a967          int64_t temp0_77 = __pfsub_mmxq_mmxq(temp0_68, st7);
0060a96b          int64_t temp0_78 = __pfadd_mmxq_mmxq(st5, st4);
0060a96f          int64_t temp0_79 = __pfmul_mmxq_memq(temp0_76, 0x3f0000003f000000);
0060a977          int64_t temp0_80 = __pfmul_mmxq_mmxq(st3, temp0_79);
0060a97b          int64_t temp0_81 = __pfmul_mmxq_mmxq(temp0_77, temp0_79);
0060a97f          int64_t temp0_82 = __pfmul_mmxq_mmxq(temp0_78, temp0_79);
0060a983          st3 = _m_punpckldq(temp0_80, temp0_81);
0060a986          *(uint64_t*)eax_5 = temp0_82;
0060a989          eax_5[1] = st3;
0060a98d          __femms();
0060a98f          return eax_5;
0060a8ca      }
0060a8ca      
0060a8cc      int64_t temp0_50 = __pfadd_mmxq_memq(temp0_6, -0x407fffffc0800000);
0060a8d4      int64_t temp0_51 = _m_punpckhdq(temp0_5, temp0_5);
0060a8d7      st6 = st5;
0060a8da      int64_t temp0_52 = __pfrsqrt_mmxq_mmxq(st4, temp0_50);
0060a8de      st3 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x18));
0060a8e2      st6 = _m_punpckhdq(st6, st6[0]);
0060a8e8      int64_t temp0_54 = __pfmul_mmxq_mmxq(temp0_52, temp0_52);
0060a8ec      int64_t st2 = _m_punpckldq(temp0_50, temp0_50);
0060a8ef      uint32_t temp0_56[0x2] = __punpckldq_mmxq_memd(st6, *(uint32_t*)((char*)arg2->__inner0 + 8));
0060a8f3      st3 = _m_punpckldq(st3, st5);
0060a8f6      int64_t temp0_58 = __pfrsqit1_mmxq_mmxq(temp0_54, st2);
0060a8fa      st7 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x10));
0060a8fe      int64_t temp0_59 = __pfrcpit2_mmxq_mmxq(temp0_58, temp0_52);
0060a909      int64_t temp0_60 = __pfadd_mmxq_mmxq(temp0_51, st7);
0060a90d      int64_t temp0_61 = __pfmul_mmxq_memq(temp0_59, 0x3f0000003f000000);
0060a915      int64_t temp0_62 = __pfadd_mmxq_mmxq(st3, (temp0_56 ^ 0x8000000000000000));
0060a919      int64_t temp0_63 = __pfmul_mmxq_mmxq(temp0_60, temp0_61);
0060a91d      int64_t temp0_64 = __pfmul_mmxq_mmxq(st2, temp0_61);
0060a921      int64_t temp0_65 = __pfmul_mmxq_mmxq(temp0_62, temp0_61);
0060a925      st1 = _m_punpckldq(temp0_63, temp0_64);
0060a928      eax_5[1] = temp0_65;
0060a92c      *(uint64_t*)eax_5 = st1;
0060a92f      __femms();
0060a931      return eax_5;
0060a776  }


0060a992  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionRotationMatrix_K7(struct D3DXQUATERNION* arg1, struct D3DXMATRIX const* arg2)

0060a992  {
0060a996      int64_t st0 = *(uint64_t*)((char*)arg2->__inner0 + 0);
0060a99c      uint64_t st4 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x14));
0060a9a9      int64_t temp0 = __pfadd_mmxq_mmxq(st0, st4);
0060a9ad      uint64_t st5 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x28));
0060a9b1      int64_t temp0_1 = __pfsub_mmxq_mmxq(st0, st4);
0060a9b5      int64_t temp0_2 = __pfsubr_mmxq_mmxq(st0, st4);
0060a9b9      int64_t temp0_3 = __pfsubr_mmxq_mmxq(st0, st5);
0060a9bd      int64_t temp0_4 = __pfadd_mmxq_mmxq(temp0, st5);
0060a9c1      int64_t temp0_5 = __pfsub_mmxq_mmxq(temp0_1, st5);
0060a9c5      int64_t temp0_6 = __pfsub_mmxq_mmxq(temp0_2, st5);
0060a9c9      st5 = *(uint64_t*)((char*)arg2->__inner0 + 0x20);
0060a9cd      int64_t temp0_7 = __pfsub_mmxq_mmxq(temp0_3, st4);
0060a9d1      st0 = _m_punpckldq(temp0_4, temp0_6);
0060a9d7      uint32_t temp0_9[0x2] = _m_punpckldq(0, temp0_5);
0060a9da      uint64_t st7 = _m_punpckldq(temp0_6, temp0_5);
0060a9dd      int64_t st3 = _m_punpckldq(temp0_7, temp0_7);
0060a9eb      uint32_t ecx = _mm_movemask_pi8(_m_packssdw(__pfcmpge_mmxq_mmxq(temp0_9, st0), __pfcmpge_mmxq_mmxq(st7, st3)));
0060a9f4      uint32_t st6[0x2] = st5;
0060a9f9      int64_t st1;
0060a9f9      
0060a9f9      if ((ecx & 1) == 0)
0060a9f9      {
0060a9fb          int64_t temp0_15 = __pfadd_mmxq_memq(st0, -0x407fffffc0800000);
0060aa03          st3 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x18));
0060aa07          st7 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 8));
0060aa0b          int64_t temp0_16 = __pfrsqrt_mmxq_mmxq(st4, temp0_15);
0060aa0f          st3 = _m_punpckldq(st3, st5);
0060aa12          st7 = _m_punpckldq(st7, st7);
0060aa18          st0 = _m_punpckldq(temp0_15, temp0_15);
0060aa1b          int64_t temp0_20 = __pfmul_mmxq_mmxq(temp0_16, temp0_16);
0060aa1f          int64_t temp0_21 = _m_punpckhdq(st5, st7);
0060aa22          st6 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x10));
0060aa26          int64_t temp0_22 = __pfrsqit1_mmxq_mmxq(temp0_20, st0);
0060aa2a          int64_t temp0_23 = _m_punpckhdq(temp0_5, temp0_5);
0060aa2d          int64_t temp0_24 = __pfsub_mmxq_mmxq(st3, temp0_21);
0060aa31          int64_t temp0_25 = __pfrcpit2_mmxq_mmxq(temp0_22, temp0_16);
0060aa35          int64_t temp0_26 = __pfsub_mmxq_mmxq(temp0_23, st6);
0060aa39          int64_t temp0_27 = __pfmul_mmxq_memq(temp0_25, 0x3f0000003f000000);
0060aa45          int64_t temp0_28 = __pfmul_mmxq_mmxq(st0, temp0_27);
0060aa49          int64_t temp0_29 = __pfmul_mmxq_mmxq(temp0_26, temp0_27);
0060aa4d          int64_t temp0_30 = __pfmul_mmxq_mmxq(temp0_24, temp0_27);
0060aa51          st1 = _m_punpckldq(temp0_29, temp0_28);
0060aa54          arg1->x = temp0_30;
0060aa54          arg1->y = *(uint32_t*)((char*)temp0_30)[4];
0060aa57          arg1->z = st1;
0060aa57          arg1->w = *(uint32_t*)((char*)st1)[4];
0060aa5b          __femms();
0060aa5d          return arg1;
0060a9f9      }
0060a9f9      
0060aa6a      if ((ecx & 0xcc) == 0xcc)
0060aa6a      {
0060aa6c          int64_t temp0_32 = __pfadd_mmxq_memq(temp0_5, -0x407fffffc0800000);
0060aa74          int64_t temp0_33 = _m_punpckhdq(temp0_6, temp0_6);
0060aa77          int64_t temp0_34 = __pfrsqrt_mmxq_mmxq(st4, temp0_32);
0060aa7b          st3 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x10));
0060aa82          int64_t temp0_35 = __pfmul_mmxq_mmxq(temp0_34, temp0_34);
0060aa86          st1 = _m_punpckldq(temp0_32, temp0_32);
0060aa89          st5 = __punpckldq_mmxq_memd(st5, *(uint32_t*)((char*)arg2->__inner0 + 0x18));
0060aa8d          int64_t temp0_38 = __pfsub_mmxq_mmxq(st3, temp0_33);
0060aa91          int64_t temp0_39 = __pfrsqit1_mmxq_mmxq(temp0_35, st1);
0060aa95          st7 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 8));
0060aa99          st6 = _m_punpckhdq(st6, st6[0]);
0060aa9c          int64_t temp0_41 = __pfrcpit2_mmxq_mmxq(temp0_39, temp0_34);
0060aaa0          st7 = _m_punpckldq(st7, st6[0]);
0060aaa3          int64_t temp0_43 = __pfmul_mmxq_memq(temp0_41, 0x3f0000003f000000);
0060aab2          int64_t temp0_44 = __pfmul_mmxq_mmxq(st1, temp0_43);
0060aab6          int64_t temp0_45 = __pfadd_mmxq_mmxq(st5, (st7 ^ 0x8000000000000000));
0060aaba          int64_t temp0_46 = __pfmul_mmxq_mmxq(temp0_38, temp0_43);
0060aac2          int64_t temp0_47 = __pfmul_mmxq_mmxq(temp0_45, temp0_43);
0060aac6          st1 = _m_punpckldq(temp0_44, temp0_46);
0060aac9          arg1->z = temp0_47;
0060aac9          arg1->w = *(uint32_t*)((char*)temp0_47)[4];
0060aacd          arg1->x = st1;
0060aacd          arg1->y = *(uint32_t*)((char*)st1)[4];
0060aad0          __femms();
0060aad2          return arg1;
0060aa6a      }
0060aa6a      
0060aadb      int64_t* eax_4 = arg1;
0060aadb      
0060aadf      if ((ecx & 0x10) == 0)
0060aadf      {
0060ab49          int64_t temp0_66 = __pfadd_mmxq_memq(st3, -0x407fffffc0800000);
0060ab51          int64_t temp0_67 = _m_punpckhdq(temp0_5, temp0_5);
0060ab54          int64_t temp0_68 = __pfrsqrt_mmxq_mmxq(temp0_6, temp0_66);
0060ab58          st4 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 8));
0060ab5c          st6 = _m_punpckhdq(st6, st6[0]);
0060ab62          int64_t temp0_70 = __pfmul_mmxq_mmxq(temp0_68, temp0_68);
0060ab66          st3 = _m_punpckldq(temp0_66, temp0_66);
0060ab69          st5 = __punpckldq_mmxq_memd(st5, *(uint32_t*)((char*)arg2->__inner0 + 0x18));
0060ab6d          st4 = _m_punpckldq(st4, st6[0]);
0060ab70          int64_t temp0_74 = __pfrsqit1_mmxq_mmxq(temp0_70, st3);
0060ab74          st7 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x10));
0060ab78          int64_t temp0_75 = __pfrcpit2_mmxq_mmxq(temp0_74, temp0_68);
0060ab7c          int64_t temp0_76 = __pfsub_mmxq_mmxq(temp0_67, st7);
0060ab80          int64_t temp0_77 = __pfadd_mmxq_mmxq(st5, st4);
0060ab84          int64_t temp0_78 = __pfmul_mmxq_memq(temp0_75, 0x3f0000003f000000);
0060ab8c          int64_t temp0_79 = __pfmul_mmxq_mmxq(st3, temp0_78);
0060ab90          int64_t temp0_80 = __pfmul_mmxq_mmxq(temp0_76, temp0_78);
0060ab94          int64_t temp0_81 = __pfmul_mmxq_mmxq(temp0_77, temp0_78);
0060ab98          st3 = _m_punpckldq(temp0_79, temp0_80);
0060ab9b          *(uint64_t*)eax_4 = temp0_81;
0060ab9e          eax_4[1] = st3;
0060aba2          __femms();
0060aba4          return eax_4;
0060aadf      }
0060aadf      
0060aae1      int64_t temp0_49 = __pfadd_mmxq_memq(temp0_6, -0x407fffffc0800000);
0060aae9      int64_t temp0_50 = _m_punpckhdq(temp0_5, temp0_5);
0060aaec      st6 = st5;
0060aaef      int64_t temp0_51 = __pfrsqrt_mmxq_mmxq(st4, temp0_49);
0060aaf3      st3 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x18));
0060aaf7      st6 = _m_punpckhdq(st6, st6[0]);
0060aafd      int64_t temp0_53 = __pfmul_mmxq_mmxq(temp0_51, temp0_51);
0060ab01      int64_t st2 = _m_punpckldq(temp0_49, temp0_49);
0060ab04      uint32_t temp0_55[0x2] = __punpckldq_mmxq_memd(st6, *(uint32_t*)((char*)arg2->__inner0 + 8));
0060ab08      st3 = _m_punpckldq(st3, st5);
0060ab0b      int64_t temp0_57 = __pfrsqit1_mmxq_mmxq(temp0_53, st2);
0060ab0f      st7 = ((uint64_t)*(uint32_t*)((char*)arg2->__inner0 + 0x10));
0060ab13      int64_t temp0_58 = __pfrcpit2_mmxq_mmxq(temp0_57, temp0_51);
0060ab1e      int64_t temp0_59 = __pfadd_mmxq_mmxq(temp0_50, st7);
0060ab22      int64_t temp0_60 = __pfmul_mmxq_memq(temp0_58, 0x3f0000003f000000);
0060ab2a      int64_t temp0_61 = __pfadd_mmxq_mmxq(st3, (temp0_55 ^ 0x8000000000000000));
0060ab2e      int64_t temp0_62 = __pfmul_mmxq_mmxq(temp0_59, temp0_60);
0060ab32      int64_t temp0_63 = __pfmul_mmxq_mmxq(st2, temp0_60);
0060ab36      int64_t temp0_64 = __pfmul_mmxq_mmxq(temp0_61, temp0_60);
0060ab3a      st1 = _m_punpckldq(temp0_62, temp0_63);
0060ab3d      eax_4[1] = temp0_64;
0060ab41      *(uint64_t*)eax_4 = st1;
0060ab44      __femms();
0060ab46      return eax_4;
0060a992  }


0060aba7  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionRotationYawPitchRoll(struct D3DXQUATERNION* arg1, float arg2, float arg3, float arg4)

0060aba7  {
0060aba7      __femms();
0060abb8      int64_t temp0 = __pfmul_mmxq_memq(0x3f0000003f000000, arg4);
0060abbe      int64_t temp0_1 = __pfmul_mmxq_memq(0x3f0000003f000000, arg2);
0060abc9      _a_sincos();
0060abd7      int64_t temp0_2 = _m_punpckhdq(temp0_1, temp0_1);
0060abda      _a_sincos();
0060abe9      _a_sincos();
0060abf7      int64_t* result = arg1;
0060ac0b      int64_t st0 = _m_punpckldq(temp0_1, temp0_1);
0060ac0e      int64_t st3 = _m_punpckldq(temp0_1, temp0_1);
0060ac11      int64_t temp0_5 = _m_punpckhdq(temp0_1, temp0_1);
0060ac14      int64_t temp0_6 = _m_punpckhdq(temp0_1, temp0_1);
0060ac1a      uint64_t temp0_7 = _m_psrlqi(-0x8000000000000000, 0x20);
0060ac21      int64_t st2 = _m_punpckldq(temp0_2, temp0_2);
0060ac24      int64_t temp0_9 = _m_punpckhdq(temp0_2, temp0_2);
0060ac2a      int64_t temp0_10 = __pfmul_mmxq_mmxq((st0 ^ 0x8000000000000000), temp0_9);
0060ac2e      int64_t temp0_11 = __pfmul_mmxq_mmxq(st3, st2);
0060ac32      int64_t temp0_12 = __pfmul_mmxq_mmxq(temp0_5, st2);
0060ac36      int64_t temp0_13 = __pfmul_mmxq_mmxq((temp0_6 ^ temp0_7), temp0_9);
0060ac40      int64_t st7 = _m_punpckldq(_m_punpckhdq(temp0, temp0), temp0);
0060ac43      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_10, temp0);
0060ac47      int64_t temp0_17 = __pfmul_mmxq_mmxq(temp0_11, st7);
0060ac4b      int64_t temp0_18 = __pfmul_mmxq_mmxq(temp0_12, st7);
0060ac4f      int64_t temp0_19 = __pfmul_mmxq_mmxq(temp0_13, temp0);
0060ac53      int64_t temp0_20 = __pfadd_mmxq_mmxq(temp0_16, temp0_18);
0060ac57      int64_t temp0_21 = __pfadd_mmxq_mmxq(temp0_17, temp0_19);
0060ac5b      *(uint64_t*)result = temp0_20;
0060ac5e      result[1] = temp0_21;
0060ac62      __femms();
0060ac69      return result;
0060aba7  }


0060ac6c  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionRotationAxis(struct D3DXQUATERNION* arg1, struct D3DXVECTOR3 const* arg2, float arg3)

0060ac6c  {
0060ac82      __femms();
0060ac88      int64_t var_18;
0060ac88      x3d_D3DXVec3Normalize(&var_18, arg2);
0060ac91      int64_t temp0 = __pfmul_mmxq_memq(((uint64_t)arg3), 0x3f0000003f000000);
0060ac99      _a_sincos();
0060aca1      int64_t st1 = var_18;
0060acad      int64_t temp0_1 = _m_punpckhdq(temp0, temp0);
0060acb0      int64_t temp0_2 = __pfmul_mmxq_mmxq(st1, temp0_1);
0060acb8      int32_t var_10;
0060acb8      uint32_t temp0_4[0x2] = _m_punpckldq(__pfmul_mmxq_mmxq(((uint64_t)var_10), temp0_1), temp0);
0060acbb      arg1->x = temp0_2;
0060acbb      arg1->y = *(uint32_t*)((char*)temp0_2)[4];
0060acbe      arg1->z = temp0_4[0];
0060acbe      arg1->w = temp0_4[1];
0060acc2      __femms();
0060acd5      return arg1;
0060ac6c  }


0060acd8  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionSlerp(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, float arg4)

0060acd8  {
0060acd8      __femms();
0060acf4      int64_t st1;
0060acf4      st1 = arg2->x;
0060acf4      *(uint32_t*)((char*)st1)[4] = arg2->y;
0060acf7      int64_t temp0 = __pfmul_mmxq_memq(st1, arg3->x);
0060acfb      int64_t st2;
0060acfb      st2 = arg2->z;
0060acfb      *(uint32_t*)((char*)st2)[4] = arg2->w;
0060ad04      int64_t temp0_2 = __pfadd_mmxq_mmxq(temp0, __pfmul_mmxq_memq(st2, arg3->z*(int32_t*)((char*)arg3 + 8)));
0060ad0b      int64_t st4 = ((uint64_t)arg4);
0060ad10      int64_t st0 = __pfsub_mmxq_mmxq(0x3f800000, st4);
0060ad14      int64_t temp0_4 = __pfacc_mmxq_mmxq(temp0_2, temp0_2);
0060ad23      int64_t st7 = (__pfcmpge_mmxq_mmxq(0, temp0_4) & 0x8000000080000000);
0060ad2a      st1 = (temp0_4 ^ st7);
0060ad31      int32_t eax = __pfcmpge_mmxq_mmxq(0x3f7fff583f7fff58, st1);
0060ad3b      int64_t temp0_8 = __pfsubr_mmxq_memq(__pfmul_mmxq_mmxq(st1, st1), 0x3f8000003f800000);
0060ad3b      
0060ad45      if (eax != 0)
0060ad45      {
0060ad47          int64_t temp0_9 = __pfrsqrt_mmxq_mmxq(st4, temp0_8);
0060ad53          int64_t temp0_10 = __pfmul_mmxq_mmxq(temp0_9, temp0_9);
0060ad5b          int64_t temp0_12 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(temp0_8, temp0_10), temp0_9);
0060ad5f          int64_t temp0_13 = __pfrcp_mmxq_mmxq(temp0_10, temp0_12);
0060ad6a          __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_12, temp0_13), temp0_13);
0060ad7d          _a_atan2();
0060ad8c          int64_t temp0_16 = __pfmul_mmxq_mmxq(st1, ((uint64_t)arg4));
0060ad90          _a_sin();
0060ada3          int64_t temp0_17 = __pfmul_mmxq_mmxq(((uint64_t)st1), ((uint64_t)st0));
0060ada7          _a_sin();
0060adb1          st1 = ((uint64_t)temp0_12);
0060adb6          st7 = ((uint64_t)st7);
0060adbb          st0 = __pfmul_mmxq_mmxq(temp0_17, st1);
0060adbf          st4 = __pfmul_mmxq_mmxq(((uint64_t)temp0_16), st1);
0060ad45      }
0060ad45      
0060adc3      int64_t* ecx_1 = arg2;
0060adc7      int64_t* edx_1 = arg3;
0060adcb      int64_t* result = arg1;
0060adcf      st4 ^= st7;
0060add2      st0 = _m_punpckldq(st0, st0);
0060add5      st4 = _m_punpckldq(st4, st4);
0060adde      int64_t temp0_22 = __pfmul_mmxq_memq(st0, *(uint64_t*)ecx_1);
0060ade2      int64_t temp0_23 = __pfmul_mmxq_memq(st4, *(uint64_t*)edx_1);
0060ade6      int64_t temp0_24 = __pfmul_mmxq_memq(st0, ecx_1[1]);
0060adeb      int64_t temp0_25 = __pfmul_mmxq_memq(st4, edx_1[1]);
0060adf0      int64_t temp0_26 = __pfadd_mmxq_mmxq(temp0_22, temp0_23);
0060adf4      int64_t temp0_27 = __pfadd_mmxq_mmxq(temp0_24, temp0_25);
0060adf8      *(uint64_t*)result = temp0_26;
0060adfb      result[1] = temp0_27;
0060adff      __femms();
0060ae0c      return result;
0060acd8  }


0060ae0f  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionBaryCentric(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXQUATERNION const* arg4, float arg5, float arg6)

0060ae0f  {
0060ae1d      __femms();
0060ae27      int64_t temp0 = __pfadd_mmxq_mmxq(((uint64_t)arg5), ((uint64_t)arg6));
0060ae2b      arg5 = temp0;
0060ae3d      void var_28;
0060ae3d      x3d_D3DXQuaternionSlerp(&var_28, arg2, arg3, temp0);
0060ae50      void var_18;
0060ae50      x3d_D3DXQuaternionSlerp(&var_18, arg2, arg4, arg5);
0060ae55      uint64_t st0 = ((uint64_t)arg5);
0060ae64      int64_t st2;
0060ae64      int64_t temp0_1 = __pfrcp_mmxq_mmxq(st2, st0);
0060ae86      x3d_D3DXQuaternionSlerp(arg1, &var_28, &var_18, __pfmul_mmxq_mmxq(__pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(st0, temp0_1), temp0_1), ((uint64_t)arg6)));
0060ae8e      __femms();
0060ae99      return arg1;
0060ae0f  }


0060ae9c  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionSquad(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXQUATERNION const* arg4, struct D3DXQUATERNION const* arg5, float arg6)

0060ae9c  {
0060aebe      void var_20;
0060aebe      x3d_D3DXQuaternionSlerp(&var_20, arg2, arg5, arg6);
0060aee5      void var_10;
0060aee5      x3d_D3DXQuaternionSlerp(&var_10, arg3, arg4, arg6);
0060aeed      uint64_t st0 = ((uint64_t)arg6);
0060af21      struct D3DXQUATERNION* result = x3d_D3DXQuaternionSlerp(arg1, &var_20, &var_10, __pfmul_mmxq_memq(__pfsub_mmxq_mmxq(st0, __pfmul_mmxq_mmxq(st0, st0)), 0x4000000040000000));
0060af29      __femms();
0060af2b      return result;
0060ae9c  }


0060af2e  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionInverse(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

0060af2e  {
0060af32      int64_t st0;
0060af32      st0 = arg2->x;
0060af32      *(uint32_t*)((char*)st0)[4] = arg2->y;
0060af38      int64_t st2;
0060af38      st2 = arg2->z;
0060af38      *(uint32_t*)((char*)st2)[4] = arg2->w;
0060af47      int64_t temp0_2 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(st0, st0), __pfmul_mmxq_mmxq(st2, st2));
0060af4b      int64_t temp0_3 = __pfacc_mmxq_mmxq(temp0_2, temp0_2);
0060af56      int64_t st4;
0060af56      int64_t temp0_4 = __pfrcp_mmxq_mmxq(st4, temp0_3);
0060af5a      int64_t temp0_5 = __pfcmpgt_mmxq_memq(temp0_3, 0x80000000800000);
0060af7a      int64_t temp0_7 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_3, temp0_4), temp0_4);
0060af7e      int64_t temp0_8 = __pfmul_mmxq_mmxq(((st0 ^ 0x8000000080000000) & temp0_5), temp0_7);
0060af82      int64_t temp0_9 = __pfmul_mmxq_mmxq(((st2 ^ 0x80000000) & temp0_5), temp0_7);
0060af86      arg1->x = temp0_8;
0060af86      arg1->y = *(uint32_t*)((char*)temp0_8)[4];
0060af89      arg1->z = temp0_9;
0060af89      arg1->w = *(uint32_t*)((char*)temp0_9)[4];
0060af8d      __femms();
0060af8f      return arg1;
0060af2e  }


0060af92  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionLn(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

0060af92  {
0060af95      __femms();
0060af97      struct D3DXQUATERNION* result = arg1;
0060af9f      int64_t st1;
0060af9f      st1 = arg2->x;
0060af9f      *(uint32_t*)((char*)st1)[4] = arg2->y;
0060afa2      int64_t st2;
0060afa2      st2 = arg2->z;
0060afa2      *(uint32_t*)((char*)st2)[4] = arg2->w;
0060afa9      int64_t temp0 = _m_punpckhdq(st2, st2);
0060afa9      
0060afbc      if (__pfcmpge_mmxq_memq(temp0, 0x3f8000003f800000) == 0)
0060afbc      {
0060afbe          _a_acos();
0060afcf          _a_sin();
0060afe6          result = arg1;
0060aff6          int32_t ecx_1 = __pfcmpge_mmxq_memq((temp0 & 0x7fffffff7fffffff), 0x3400000034000000);
0060aff9          st1 = arg2->x;
0060aff9          *(uint32_t*)((char*)st1)[4] = arg2->y;
0060affc          st2 = arg2->z;
0060affc          *(uint32_t*)((char*)st2)[4] = arg2->w;
0060affc          
0060b002          if (ecx_1 != 0)
0060b002          {
0060b004              int64_t st3 = ((uint64_t)temp0);
0060b008              int64_t st4;
0060b008              int64_t temp0_3 = __pfrcp_mmxq_mmxq(st4, temp0);
0060b017              int64_t temp0_7 = __pfmul_mmxq_mmxq(_m_punpckldq(st3, st3), __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0, temp0_3), temp0_3));
0060b01b              st1 = __pfmul_mmxq_mmxq(st1, temp0_7);
0060b01f              st2 = __pfmul_mmxq_mmxq(st2, temp0_7);
0060b002          }
0060afbc      }
0060afbc      
0060b023      st2 &= 0xffffffff;
0060b02a      result->x = st1;
0060b02a      result->y = *(uint32_t*)((char*)st1)[4];
0060b02d      result->z = st2;
0060b02d      result->w = *(uint32_t*)((char*)st2)[4];
0060b031      __femms();
0060b036      return result;
0060af92  }


0060b039  struct D3DXQUATERNION* __stdcall x3d_D3DXQuaternionExp(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION const* arg2)

0060b039  {
0060b040      int64_t st0;
0060b040      st0 = arg2->x;
0060b040      *(uint32_t*)((char*)st0)[4] = arg2->y;
0060b043      uint64_t z = ((uint64_t)arg2->z);
0060b047      int64_t temp0 = __pfmul_mmxq_mmxq(st0, st0);
0060b04b      int64_t temp0_1 = __pfmul_mmxq_mmxq(z, z);
0060b04f      int64_t temp0_2 = __pfadd_mmxq_mmxq(temp0, temp0_1);
0060b053      int64_t temp0_3 = __pfacc_mmxq_mmxq(temp0_2, temp0_2);
0060b057      int64_t temp0_4 = __pfrsqrt_mmxq_mmxq(temp0_1, temp0_3);
0060b06e      int64_t temp0_7 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_4, temp0_4), temp0_3), temp0_4);
0060b076      int64_t temp0_8 = __pfmul_mmxq_mmxq(temp0_3, temp0_7);
0060b07a      _a_sincos();
0060b08d      int64_t temp0_9 = __pfcmpge_mmxq_memq((temp0_8 & 0x7fffffffffffffff), 0x3400000034000000);
0060b095      int64_t* result = arg1;
0060b09c      int32_t ecx = _m_punpckhdq(temp0_9, temp0_9);
0060b09f      int64_t st2;
0060b09f      st2 = arg2->x;
0060b09f      *(uint32_t*)((char*)st2)[4] = arg2->y;
0060b0ae      int64_t temp0_12 = __pfmul_mmxq_memq(_m_punpckhdq(temp0_8, temp0_8), temp0_7);
0060b0b3      uint32_t z_1[0x2] = ((uint64_t)arg2->z);
0060b0b3      
0060b0b7      if ((ecx & 1) != 0)
0060b0b7      {
0060b0b9          z = _m_punpckldq(temp0_12, temp0_12);
0060b0bc          z_1 = __pfmul_mmxq_mmxq(z_1, z);
0060b0c0          st2 = __pfmul_mmxq_mmxq(st2, z);
0060b0b7      }
0060b0b7      
0060b0c4      uint32_t temp0_16[0x2] = _m_punpckldq(z_1, temp0_8);
0060b0c7      *(uint64_t*)result = st2;
0060b0ca      result[1] = temp0_16;
0060b0d9      __femms();
0060b0db      return result;
0060b039  }


0060b0de  void __stdcall x3d_D3DXQuaternionSquadSetup(struct D3DXQUATERNION* arg1, struct D3DXQUATERNION* arg2, struct D3DXQUATERNION* arg3, struct D3DXQUATERNION const* arg4, struct D3DXQUATERNION const* arg5, struct D3DXQUATERNION const* arg6, struct D3DXQUATERNION const* arg7)

0060b0de  {
0060b0f2      int64_t st0;
0060b0f2      st0 = arg4->x;
0060b0f2      *(uint32_t*)((char*)st0)[4] = arg4->y;
0060b0f5      int64_t st1;
0060b0f5      st1 = arg4->z;
0060b0f5      *(uint32_t*)((char*)st1)[4] = arg4->w;
0060b0ff      int64_t var_a8 = st0;
0060b103      int64_t var_a0 = st1;
0060b108      int64_t st4;
0060b108      st4 = arg5->x;
0060b108      *(uint32_t*)((char*)st4)[4] = arg5->y;
0060b10b      int64_t st5;
0060b10b      st5 = arg5->z;
0060b10b      *(uint32_t*)((char*)st5)[4] = arg5->w;
0060b10f      int64_t var_98 = st4;
0060b114      int64_t temp0 = __pfadd_mmxq_mmxq(st0, st4);
0060b118      int64_t var_90 = st5;
0060b11d      int64_t temp0_1 = __pfadd_mmxq_mmxq(st1, st5);
0060b121      int64_t temp0_2 = __pfsub_mmxq_mmxq(st0, st4);
0060b125      int64_t temp0_3 = __pfmul_mmxq_mmxq(temp0, temp0);
0060b129      int64_t temp0_4 = __pfsub_mmxq_mmxq(st1, st5);
0060b12d      int64_t temp0_5 = __pfmul_mmxq_mmxq(temp0_1, temp0_1);
0060b134      int64_t temp0_6 = __pfmul_mmxq_mmxq(temp0_2, temp0_2);
0060b138      int64_t temp0_7 = __pfmul_mmxq_mmxq(temp0_4, temp0_4);
0060b13c      int64_t temp0_8 = __pfadd_mmxq_mmxq(temp0_3, temp0_5);
0060b140      int64_t temp0_9 = __pfadd_mmxq_mmxq(temp0_6, temp0_7);
0060b144      int64_t st6;
0060b144      st6 = arg6->x;
0060b144      *(uint32_t*)((char*)st6)[4] = arg6->y;
0060b147      int64_t st7;
0060b147      st7 = arg6->z;
0060b147      *(uint32_t*)((char*)st7)[4] = arg6->w;
0060b14b      int64_t var_88 = st6;
0060b150      int64_t var_80 = st7;
0060b15b      int64_t temp0_10 = __pfadd_mmxq_mmxq(st4, st6);
0060b15f      int64_t temp0_11 = __pfadd_mmxq_mmxq(st5, st7);
0060b163      int64_t temp0_12 = __pfsub_mmxq_mmxq(st4, st6);
0060b167      int64_t temp0_13 = __pfsub_mmxq_mmxq(st5, st7);
0060b16b      int64_t temp0_14 = __pfmul_mmxq_mmxq(temp0_10, temp0_10);
0060b16f      int64_t temp0_15 = __pfmul_mmxq_mmxq(temp0_11, temp0_11);
0060b173      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_12, temp0_12);
0060b177      int64_t temp0_17 = __pfmul_mmxq_mmxq(temp0_13, temp0_13);
0060b17b      int64_t temp0_18 = __pfadd_mmxq_mmxq(temp0_14, temp0_15);
0060b17f      int64_t temp0_19 = __pfadd_mmxq_mmxq(temp0_16, temp0_17);
0060b183      int64_t temp0_20 = __pfacc_mmxq_mmxq(temp0_8, temp0_18);
0060b18b      int64_t temp0_22 = __pfcmpgt_mmxq_mmxq(__pfacc_mmxq_mmxq(temp0_9, temp0_19), temp0_20);
0060b192      int32_t eax = _m_packsswb(temp0_22, temp0_22);
0060b192      
0060b1a1      if ((eax & 1) != 0)
0060b1a1      {
0060b1b3          var_a8 = (-0x7fffffff80000000 ^ arg4->x);
0060b1b7          var_a0 = (-0x7fffffff80000000 ^ arg4->z*(int32_t*)((char*)arg4 + 8));
0060b1a1      }
0060b1a1      
0060b1c1      if ((eax & 0x10000) != 0)
0060b1c1      {
0060b1d3          var_88 = (-0x7fffffff80000000 ^ arg6->x);
0060b1d8          var_80 = (-0x7fffffff80000000 ^ arg6->z*(int32_t*)((char*)arg6 + 8));
0060b1c1      }
0060b1c1      
0060b1ea      st1 = arg7->x;
0060b1ea      *(uint32_t*)((char*)st1)[4] = arg7->y;
0060b1ed      st4 = arg7->z;
0060b1ed      *(uint32_t*)((char*)st4)[4] = arg7->w;
0060b1f7      int64_t temp0_24 = __pfadd_mmxq_mmxq(var_88, st1);
0060b1fb      int64_t var_78 = st1;
0060b200      int64_t temp0_25 = __pfadd_mmxq_mmxq(var_80, st4);
0060b204      int64_t var_70 = st4;
0060b209      int64_t temp0_26 = __pfsub_mmxq_mmxq(var_88, st1);
0060b20d      int64_t temp0_27 = __pfsub_mmxq_mmxq(var_80, st4);
0060b211      int64_t temp0_28 = __pfmul_mmxq_mmxq(temp0_24, temp0_24);
0060b215      int64_t temp0_29 = __pfmul_mmxq_mmxq(temp0_25, temp0_25);
0060b219      int64_t temp0_30 = __pfmul_mmxq_mmxq(temp0_26, temp0_26);
0060b21d      int64_t temp0_31 = __pfmul_mmxq_mmxq(temp0_27, temp0_27);
0060b221      int64_t temp0_32 = __pfadd_mmxq_mmxq(temp0_28, temp0_29);
0060b225      int64_t temp0_33 = __pfadd_mmxq_mmxq(temp0_30, temp0_31);
0060b229      int64_t temp0_34 = __pfacc_mmxq_mmxq(temp0_32, temp0_32);
0060b229      
0060b23d      if ((__pfcmpgt_mmxq_mmxq(__pfacc_mmxq_mmxq(temp0_33, temp0_33), temp0_34) & 1) != 0)
0060b23d      {
0060b24c          var_78 = (-0x7fffffff80000000 ^ arg7->x);
0060b251          var_70 = (-0x7fffffff80000000 ^ arg7->z*(int32_t*)((char*)arg7 + 8));
0060b23d      }
0060b23d      
0060b26e      int64_t temp0_39 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(var_98, var_98), __pfmul_mmxq_mmxq(var_90, var_90));
0060b272      int64_t temp0_40 = __pfacc_mmxq_mmxq(temp0_39, temp0_39);
0060b279      int64_t temp0_41 = __pfrcp_mmxq_mmxq(st4, temp0_40);
0060b27d      int64_t temp0_42 = __pfcmpgt_mmxq_memq(temp0_40, 0x80000000800000);
0060b29d      int64_t temp0_44 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_40, temp0_41), temp0_41);
0060b2a1      int64_t temp0_45 = __pfmul_mmxq_mmxq(((var_98 ^ 0x8000000080000000) & temp0_42), temp0_44);
0060b2a5      int64_t temp0_46 = __pfmul_mmxq_mmxq(((var_90 ^ 0x80000000) & temp0_42), temp0_44);
0060b2c7      int64_t temp0_47 = _m_punpckhdq(var_a8, var_a8);
0060b2ca      int64_t temp0_48 = _m_punpckhdq(var_a0, var_a0);
0060b2d2      st4 = _m_punpckldq(temp0_47, var_a8);
0060b2d5      st5 = _m_punpckldq(temp0_48, var_a0);
0060b2de      int64_t temp0_51 = __pfmul_mmxq_mmxq(var_a8, temp0_46);
0060b2e9      int64_t temp0_52 = __pfmul_mmxq_mmxq(var_a0, temp0_45);
0060b2f4      int64_t temp0_53 = __pfmul_mmxq_mmxq((st5 ^ 0x80000000), temp0_45);
0060b2f8      int64_t temp0_54 = __pfmul_mmxq_mmxq(st4, temp0_46);
0060b2fc      int64_t temp0_55 = __pfadd_mmxq_mmxq((temp0_51 ^ 0x80000000), temp0_52);
0060b304      int64_t temp0_56 = __pfsub_mmxq_mmxq(temp0_54, temp0_53);
0060b30d      int64_t temp0_57 = __pfmul_mmxq_mmxq(st5, temp0_46);
0060b318      int64_t temp0_58 = __pfacc_mmxq_mmxq(temp0_56, temp0_55);
0060b31c      int64_t temp0_59 = __pfmul_mmxq_mmxq((st4 ^ 0x80000000), temp0_45);
0060b327      int64_t temp0_60 = __pfmul_mmxq_mmxq(var_a8, temp0_45);
0060b333      int64_t temp0_61 = __pfmul_mmxq_mmxq((var_a0 ^ 0x80000000), temp0_46);
0060b33f      int64_t temp0_64 = __pfacc_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_59, temp0_57), __pfsub_mmxq_mmxq(temp0_61, temp0_60));
0060b360      int64_t temp0_65 = _m_punpckhdq(var_88, var_88);
0060b363      int64_t temp0_66 = _m_punpckhdq(var_80, var_80);
0060b36b      st4 = _m_punpckldq(temp0_65, var_88);
0060b36e      st5 = _m_punpckldq(temp0_66, var_80);
0060b377      int64_t temp0_69 = __pfmul_mmxq_mmxq(var_88, temp0_46);
0060b382      int64_t temp0_70 = __pfmul_mmxq_mmxq(var_80, temp0_45);
0060b38d      int64_t temp0_71 = __pfmul_mmxq_mmxq((st5 ^ 0x80000000), temp0_45);
0060b391      int64_t temp0_72 = __pfmul_mmxq_mmxq(st4, temp0_46);
0060b395      int64_t temp0_73 = __pfadd_mmxq_mmxq((temp0_69 ^ 0x80000000), temp0_70);
0060b39e      int64_t temp0_74 = __pfsub_mmxq_mmxq(temp0_72, temp0_71);
0060b3a7      int64_t temp0_75 = __pfmul_mmxq_mmxq(st5, temp0_46);
0060b3ab      st6 = (st4 ^ 0x80000000);
0060b3b2      st4 = __pfacc_mmxq_mmxq(temp0_74, temp0_73);
0060b3b6      int64_t temp0_77 = __pfmul_mmxq_mmxq(st6, temp0_45);
0060b3c1      int64_t temp0_78 = __pfmul_mmxq_mmxq(var_88, temp0_45);
0060b3c5      int64_t var_18 = st4;
0060b3cd      int64_t temp0_79 = __pfmul_mmxq_mmxq((var_80 ^ 0x80000000), temp0_46);
0060b3d9      int64_t temp0_82 = __pfacc_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_77, temp0_75), __pfsub_mmxq_mmxq(temp0_79, temp0_78));
0060b3e8      st1 = temp0_58;
0060b3f0      int64_t st2 = temp0_64;
0060b3fb      int64_t temp0_83 = _m_punpckhdq(st2, st2);
0060b40e      int64_t st3;
0060b40e      
0060b40e      if (__pfcmpge_mmxq_memq(temp0_83, 0x3f8000003f800000) == 0)
0060b40e      {
0060b410          _a_acos();
0060b421          _a_sin();
0060b443          st1 = temp0_58;
0060b44b          st2 = temp0_64;
0060b44b          
0060b455          if (__pfcmpge_mmxq_memq((temp0_83 & 0x7fffffff7fffffff), 0x3400000034000000) != 0)
0060b455          {
0060b457              st3 = ((uint64_t)temp0_83);
0060b45b              st4 = __pfrcp_mmxq_mmxq(st4, temp0_83);
0060b46a              int64_t temp0_90 = __pfmul_mmxq_mmxq(_m_punpckldq(st3, st3), __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_83, st4), st4));
0060b46e              st1 = __pfmul_mmxq_mmxq(st1, temp0_90);
0060b472              st2 = __pfmul_mmxq_mmxq(st2, temp0_90);
0060b455          }
0060b40e      }
0060b40e      
0060b47d      int64_t var_58 = st1;
0060b482      int64_t var_50 = (st2 & 0xffffffff);
0060b48d      st1 = var_18;
0060b495      st2 = temp0_82;
0060b4a0      int64_t temp0_93 = _m_punpckhdq(st2, st2);
0060b4a0      
0060b4b3      if (__pfcmpge_mmxq_memq(temp0_93, 0x3f8000003f800000) == 0)
0060b4b3      {
0060b4b5          _a_acos();
0060b4c6          _a_sin();
0060b4e8          st1 = var_18;
0060b4f0          st2 = temp0_82;
0060b4f0          
0060b4fa          if (__pfcmpge_mmxq_memq((temp0_93 & 0x7fffffff7fffffff), 0x3400000034000000) != 0)
0060b4fa          {
0060b4fc              st3 = ((uint64_t)temp0_93);
0060b500              int64_t temp0_96 = __pfrcp_mmxq_mmxq(st4, temp0_93);
0060b50f              int64_t temp0_100 = __pfmul_mmxq_mmxq(_m_punpckldq(st3, st3), __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_93, temp0_96), temp0_96));
0060b513              st1 = __pfmul_mmxq_mmxq(st1, temp0_100);
0060b517              st2 = __pfmul_mmxq_mmxq(st2, temp0_100);
0060b4fa          }
0060b4b3      }
0060b4b3      
0060b539      int64_t temp0_103 = __pfadd_mmxq_memq(var_58, st1);
0060b53f      int64_t temp0_104 = __pfadd_mmxq_memq(var_50, (st2 & 0xffffffff));
0060b545      int64_t temp0_105 = __pfmul_mmxq_memq(temp0_103, -0x417fffff41800000);
0060b55d      int32_t var_20_1 = __pfmul_mmxq_memq(temp0_104, -0x417fffff41800000);
0060b577      st1 = ((uint64_t)var_20_1);
0060b57f      int64_t temp0_107 = __pfmul_mmxq_mmxq(temp0_105, temp0_105);
0060b583      int64_t temp0_108 = __pfmul_mmxq_mmxq(st1, st1);
0060b587      int64_t temp0_109 = __pfadd_mmxq_mmxq(temp0_107, temp0_108);
0060b58b      int64_t temp0_110 = __pfacc_mmxq_mmxq(temp0_109, temp0_109);
0060b58f      int64_t temp0_111 = __pfrsqrt_mmxq_mmxq(temp0_108, temp0_110);
0060b5a6      int64_t temp0_114 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_111, temp0_111), temp0_110), temp0_111);
0060b5ae      int64_t temp0_115 = __pfmul_mmxq_mmxq(temp0_110, temp0_114);
0060b5b2      _a_sincos();
0060b5c1      int64_t temp0_116 = __pfcmpge_mmxq_memq((temp0_115 & 0x7fffffffffffffff), 0x3400000034000000);
0060b5cc      int32_t ecx_7 = _m_punpckhdq(temp0_116, temp0_116);
0060b5cf      st2 = temp0_105;
0060b5e3      int64_t temp0_119 = __pfmul_mmxq_memq(_m_punpckhdq(temp0_115, temp0_115), temp0_114);
0060b5e8      st3 = ((uint64_t)var_20_1);
0060b5e8      
0060b5f0      if ((ecx_7 & 1) != 0)
0060b5f0      {
0060b5f2          st1 = _m_punpckldq(temp0_119, temp0_119);
0060b5f5          st3 = __pfmul_mmxq_mmxq(st3, st1);
0060b5f9          st2 = __pfmul_mmxq_mmxq(st2, st1);
0060b5f0      }
0060b5f0      
0060b605      int64_t var_30 = _m_punpckldq(st3, temp0_115);
0060b630      int64_t temp0_124 = _m_punpckhdq(st2, st2);
0060b633      int64_t temp0_125 = _m_punpckhdq(var_30, var_30);
0060b63b      st4 = _m_punpckldq(temp0_124, st2);
0060b63e      st5 = _m_punpckldq(temp0_125, var_30);
0060b647      int64_t temp0_128 = __pfmul_mmxq_mmxq(st2, var_90);
0060b652      int64_t temp0_129 = __pfmul_mmxq_mmxq(var_30, var_98);
0060b65d      int64_t temp0_130 = __pfmul_mmxq_mmxq((st5 ^ 0x80000000), var_98);
0060b661      int64_t temp0_131 = __pfmul_mmxq_mmxq(st4, var_90);
0060b665      int64_t temp0_132 = __pfadd_mmxq_mmxq((temp0_128 ^ 0x80000000), temp0_129);
0060b66e      int64_t temp0_133 = __pfsub_mmxq_mmxq(temp0_131, temp0_130);
0060b677      int64_t temp0_134 = __pfmul_mmxq_mmxq(st5, var_90);
0060b682      int64_t temp0_135 = __pfacc_mmxq_mmxq(temp0_133, temp0_132);
0060b686      int64_t temp0_136 = __pfmul_mmxq_mmxq((st4 ^ 0x80000000), var_98);
0060b691      int64_t temp0_137 = __pfmul_mmxq_mmxq(st2, var_98);
0060b695      arg1->x = temp0_135;
0060b695      arg1->y = *(uint32_t*)((char*)temp0_135)[4];
0060b698      int64_t temp0_138 = __pfmul_mmxq_mmxq((var_30 ^ 0x80000000), var_90);
0060b6a4      int64_t temp0_141 = __pfacc_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_136, temp0_134), __pfsub_mmxq_mmxq(temp0_138, temp0_137));
0060b6a8      arg1->z = temp0_141;
0060b6a8      arg1->w = *(uint32_t*)((char*)temp0_141)[4];
0060b6c4      int64_t temp0_144 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(var_88, var_88), __pfmul_mmxq_mmxq(var_80, var_80));
0060b6c8      int64_t temp0_145 = __pfacc_mmxq_mmxq(temp0_144, temp0_144);
0060b6cf      int64_t temp0_146 = __pfrcp_mmxq_mmxq(temp0_135, temp0_145);
0060b6d3      int64_t temp0_147 = __pfcmpgt_mmxq_memq(temp0_145, 0x80000000800000);
0060b6f3      int64_t temp0_149 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_145, temp0_146), temp0_146);
0060b6f7      int64_t temp0_150 = __pfmul_mmxq_mmxq(((var_88 ^ 0x8000000080000000) & temp0_147), temp0_149);
0060b6fb      int64_t temp0_151 = __pfmul_mmxq_mmxq(((var_80 ^ 0x80000000) & temp0_147), temp0_149);
0060b71e      int64_t temp0_152 = _m_punpckhdq(var_98, var_98);
0060b721      int64_t temp0_153 = _m_punpckhdq(var_90, var_90);
0060b729      st4 = _m_punpckldq(temp0_152, var_98);
0060b72c      st5 = _m_punpckldq(temp0_153, var_90);
0060b735      int64_t temp0_156 = __pfmul_mmxq_mmxq(var_98, temp0_151);
0060b740      int64_t temp0_157 = __pfmul_mmxq_mmxq(var_90, temp0_150);
0060b74b      int64_t temp0_158 = __pfmul_mmxq_mmxq((st5 ^ 0x80000000), temp0_150);
0060b74f      int64_t temp0_159 = __pfmul_mmxq_mmxq(st4, temp0_151);
0060b753      int64_t temp0_160 = __pfadd_mmxq_mmxq((temp0_156 ^ 0x80000000), temp0_157);
0060b75c      int64_t temp0_161 = __pfsub_mmxq_mmxq(temp0_159, temp0_158);
0060b765      int64_t temp0_162 = __pfmul_mmxq_mmxq(st5, temp0_151);
0060b770      int64_t temp0_163 = __pfacc_mmxq_mmxq(temp0_161, temp0_160);
0060b774      int64_t temp0_164 = __pfmul_mmxq_mmxq((st4 ^ 0x80000000), temp0_150);
0060b77f      int64_t temp0_165 = __pfmul_mmxq_mmxq(var_98, temp0_150);
0060b78b      int64_t temp0_166 = __pfmul_mmxq_mmxq((var_90 ^ 0x80000000), temp0_151);
0060b797      int64_t temp0_169 = __pfacc_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_164, temp0_162), __pfsub_mmxq_mmxq(temp0_166, temp0_165));
0060b7b8      int64_t temp0_170 = _m_punpckhdq(var_78, var_78);
0060b7bb      int64_t temp0_171 = _m_punpckhdq(var_70, var_70);
0060b7c3      st4 = _m_punpckldq(temp0_170, var_78);
0060b7c6      st5 = _m_punpckldq(temp0_171, var_70);
0060b7cf      int64_t temp0_174 = __pfmul_mmxq_mmxq(var_78, temp0_151);
0060b7da      int64_t temp0_175 = __pfmul_mmxq_mmxq(var_70, temp0_150);
0060b7e5      int64_t temp0_176 = __pfmul_mmxq_mmxq((st5 ^ 0x80000000), temp0_150);
0060b7e9      int64_t temp0_177 = __pfmul_mmxq_mmxq(st4, temp0_151);
0060b7ed      int64_t temp0_178 = __pfadd_mmxq_mmxq((temp0_174 ^ 0x80000000), temp0_175);
0060b7f6      int64_t temp0_179 = __pfsub_mmxq_mmxq(temp0_177, temp0_176);
0060b7ff      int64_t temp0_180 = __pfmul_mmxq_mmxq(st5, temp0_151);
0060b803      st6 = (st4 ^ 0x80000000);
0060b80a      st4 = __pfacc_mmxq_mmxq(temp0_179, temp0_178);
0060b80e      int64_t temp0_182 = __pfmul_mmxq_mmxq(st6, temp0_150);
0060b819      int64_t temp0_183 = __pfmul_mmxq_mmxq(var_78, temp0_150);
0060b81d      int64_t var_18_1 = st4;
0060b825      int64_t temp0_184 = __pfmul_mmxq_mmxq((var_70 ^ 0x80000000), temp0_151);
0060b831      int64_t temp0_187 = __pfacc_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_182, temp0_180), __pfsub_mmxq_mmxq(temp0_184, temp0_183));
0060b840      st1 = temp0_163;
0060b848      st2 = temp0_169;
0060b853      int64_t temp0_188 = _m_punpckhdq(st2, st2);
0060b853      
0060b866      if (__pfcmpge_mmxq_memq(temp0_188, 0x3f8000003f800000) == 0)
0060b866      {
0060b868          _a_acos();
0060b879          _a_sin();
0060b89b          st1 = temp0_163;
0060b8a3          st2 = temp0_169;
0060b8a3          
0060b8ad          if (__pfcmpge_mmxq_memq((temp0_188 & 0x7fffffff7fffffff), 0x3400000034000000) != 0)
0060b8ad          {
0060b8af              st3 = ((uint64_t)temp0_188);
0060b8b3              st4 = __pfrcp_mmxq_mmxq(st4, temp0_188);
0060b8c2              int64_t temp0_195 = __pfmul_mmxq_mmxq(_m_punpckldq(st3, st3), __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_188, st4), st4));
0060b8c6              st1 = __pfmul_mmxq_mmxq(st1, temp0_195);
0060b8ca              st2 = __pfmul_mmxq_mmxq(st2, temp0_195);
0060b8ad          }
0060b866      }
0060b866      
0060b8d5      int64_t var_58_1 = st1;
0060b8da      int64_t var_50_1 = (st2 & 0xffffffff);
0060b8e5      st1 = var_18_1;
0060b8ed      st2 = temp0_187;
0060b8f8      int64_t temp0_198 = _m_punpckhdq(st2, st2);
0060b8f8      
0060b90b      if (__pfcmpge_mmxq_memq(temp0_198, 0x3f8000003f800000) == 0)
0060b90b      {
0060b90d          _a_acos();
0060b91e          _a_sin();
0060b940          st1 = var_18_1;
0060b948          st2 = temp0_187;
0060b948          
0060b952          if (__pfcmpge_mmxq_memq((temp0_198 & 0x7fffffff7fffffff), 0x3400000034000000) != 0)
0060b952          {
0060b954              st3 = ((uint64_t)temp0_198);
0060b958              int64_t temp0_201 = __pfrcp_mmxq_mmxq(st4, temp0_198);
0060b967              int64_t temp0_205 = __pfmul_mmxq_mmxq(_m_punpckldq(st3, st3), __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_198, temp0_201), temp0_201));
0060b96b              st1 = __pfmul_mmxq_mmxq(st1, temp0_205);
0060b96f              st2 = __pfmul_mmxq_mmxq(st2, temp0_205);
0060b952          }
0060b90b      }
0060b90b      
0060b991      int64_t temp0_208 = __pfadd_mmxq_memq(var_58_1, st1);
0060b997      int64_t temp0_209 = __pfadd_mmxq_memq(var_50_1, (st2 & 0xffffffff));
0060b99d      int64_t temp0_210 = __pfmul_mmxq_memq(temp0_208, -0x417fffff41800000);
0060b9b5      int32_t var_20_3 = __pfmul_mmxq_memq(temp0_209, -0x417fffff41800000);
0060b9c8      st1 = ((uint64_t)var_20_3);
0060b9d0      int64_t temp0_212 = __pfmul_mmxq_mmxq(temp0_210, temp0_210);
0060b9d4      int64_t temp0_213 = __pfmul_mmxq_mmxq(st1, st1);
0060b9d8      int64_t temp0_214 = __pfadd_mmxq_mmxq(temp0_212, temp0_213);
0060b9dc      int64_t temp0_215 = __pfacc_mmxq_mmxq(temp0_214, temp0_214);
0060b9e0      int64_t temp0_216 = __pfrsqrt_mmxq_mmxq(temp0_213, temp0_215);
0060b9eb      int32_t esi;
0060b9eb      int32_t var_b0_6 = esi;
0060b9f3      int32_t ebx;
0060b9f3      int32_t var_ac_6 = ebx;
0060b9f7      int64_t temp0_219 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_216, temp0_216), temp0_215), temp0_216);
0060b9ff      int64_t temp0_220 = __pfmul_mmxq_mmxq(temp0_215, temp0_219);
0060ba03      _a_sincos();
0060ba12      int64_t temp0_221 = __pfcmpge_mmxq_memq((temp0_220 & 0x7fffffffffffffff), 0x3400000034000000);
0060ba1d      int32_t ecx_12 = _m_punpckhdq(temp0_221, temp0_221);
0060ba20      st2 = temp0_210;
0060ba34      int64_t temp0_224 = __pfmul_mmxq_memq(_m_punpckhdq(temp0_220, temp0_220), temp0_219);
0060ba39      st3 = ((uint64_t)var_20_3);
0060ba39      
0060ba41      if ((ecx_12 & 1) != 0)
0060ba41      {
0060ba43          st1 = _m_punpckldq(temp0_224, temp0_224);
0060ba46          st3 = __pfmul_mmxq_mmxq(st3, st1);
0060ba4a          st2 = __pfmul_mmxq_mmxq(st2, st1);
0060ba41      }
0060ba41      
0060ba56      int64_t var_30_1 = _m_punpckldq(st3, temp0_220);
0060ba81      int64_t temp0_229 = _m_punpckhdq(st2, st2);
0060ba84      int64_t temp0_230 = _m_punpckhdq(var_30_1, var_30_1);
0060ba8c      st4 = _m_punpckldq(temp0_229, st2);
0060ba8f      st5 = _m_punpckldq(temp0_230, var_30_1);
0060ba98      int64_t temp0_233 = __pfmul_mmxq_mmxq(st2, var_80);
0060baa3      int64_t temp0_234 = __pfmul_mmxq_mmxq(var_30_1, var_88);
0060baae      int64_t temp0_235 = __pfmul_mmxq_mmxq((st5 ^ 0x80000000), var_88);
0060bab2      int64_t temp0_236 = __pfmul_mmxq_mmxq(st4, var_80);
0060bab6      int64_t temp0_237 = __pfadd_mmxq_mmxq((temp0_233 ^ 0x80000000), temp0_234);
0060babf      int64_t temp0_238 = __pfsub_mmxq_mmxq(temp0_236, temp0_235);
0060bac8      int64_t temp0_239 = __pfmul_mmxq_mmxq(st5, var_80);
0060bad3      int64_t temp0_240 = __pfacc_mmxq_mmxq(temp0_238, temp0_237);
0060bad7      int64_t temp0_241 = __pfmul_mmxq_mmxq((st4 ^ 0x80000000), var_88);
0060bae2      int64_t temp0_242 = __pfmul_mmxq_mmxq(st2, var_88);
0060bae6      arg2->x = temp0_240;
0060bae6      arg2->y = *(uint32_t*)((char*)temp0_240)[4];
0060bae9      int64_t temp0_243 = __pfmul_mmxq_mmxq((var_30_1 ^ 0x80000000), var_80);
0060baf5      int64_t temp0_246 = __pfacc_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_241, temp0_239), __pfsub_mmxq_mmxq(temp0_243, temp0_242));
0060baf9      arg2->z = temp0_246;
0060baf9      arg2->w = *(uint32_t*)((char*)temp0_246)[4];
0060bb0a      arg3->x = var_88;
0060bb0a      arg3->y = *(uint32_t*)((char*)var_88)[4];
0060bb0d      arg3->z = var_80;
0060bb0d      arg3->w = *(uint32_t*)((char*)var_80)[4];
0060bb14      __femms();
0060b0de  }


0060bb19  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixMultiply(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

0060bb19  {
0060bb19      __femms();
0060bb2b      uint32_t st0[0x2];
0060bb2b      st0[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
0060bb2b      st0[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
0060bb2e      int64_t st1 = *(uint64_t*)((char*)arg3->__inner0 + 0x10);
0060bb32      uint32_t st3[0x2];
0060bb32      st3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x28);
0060bb32      st3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x2c);
0060bb36      int64_t st4 = *(uint64_t*)((char*)arg3->__inner0 + 0x38);
0060bb3d      uint32_t temp0[0x2] = _m_punpckldq(st0, st1);
0060bb40      int64_t temp0_1 = _m_punpckhdq(st0, st1);
0060bb4f      int64_t st6 = *(uint64_t*)((char*)arg3->__inner0 + 8);
0060bb53      uint32_t temp0_2[0x2] = _m_punpckldq(st3, st4);
0060bb56      int64_t st7 = *(uint64_t*)((char*)arg3->__inner0 + 0x18);
0060bb5a      temp0[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
0060bb5a      temp0[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
0060bb5e      int64_t temp0_3 = _m_punpckhdq(st3, st4);
0060bb61      st1 = st6;
0060bb71      st6 = _m_punpckldq(st6, st7);
0060bb74      st4 = *(uint64_t*)((char*)arg3->__inner0 + 0x30);
0060bb7b      int64_t temp0_5 = _m_punpckhdq(st1, st7);
0060bb83      st0 = _m_punpckhdq(temp0, st4);
0060bb8e      uint32_t var_30[0x2] = st0;
0060bb93      int64_t var_40 = _m_punpckldq(temp0, st4);
0060bb9b      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0);
0060bb9b      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 4);
0060bb9e      st1 = *(uint64_t*)((char*)arg2->__inner0 + 8);
0060bba2      int64_t st2 = st0;
0060bba5      st3 = st1;
0060bba8      st4 = st0;
0060bbae      st0 = __pfmul_mmxq_memq(st0, temp0);
0060bbb3      int64_t temp0_9 = __pfmul_mmxq_memq(st1, var_40);
0060bbbc      st7 = st3;
0060bbbf      int64_t temp0_10 = __pfmul_mmxq_memq(st2, temp0_1);
0060bbc5      st3 = __pfmul_mmxq_memq(st3, var_30);
0060bbcb      int64_t temp0_12 = __pfmul_mmxq_memq(st4, st6);
0060bbd1      int64_t temp0_13 = __pfmul_mmxq_memq(st1, temp0_2);
0060bbd7      int64_t temp0_14 = __pfmul_mmxq_memq(st2, temp0_5);
0060bbdd      int64_t temp0_15 = __pfmul_mmxq_memq(st7, temp0_3);
0060bbe3      st0 = __pfacc_mmxq_mmxq(st0, temp0_10);
0060bbe7      int64_t temp0_17 = __pfacc_mmxq_mmxq(temp0_9, st3);
0060bbeb      int64_t temp0_18 = __pfacc_mmxq_mmxq(temp0_12, temp0_14);
0060bbef      int64_t temp0_19 = __pfacc_mmxq_mmxq(temp0_13, temp0_15);
0060bbf3      st0 = __pfadd_mmxq_mmxq(st0, temp0_17);
0060bbf7      int64_t temp0_21 = __pfadd_mmxq_mmxq(temp0_18, temp0_19);
0060bbfb      *(uint32_t*)((char*)arg1->__inner0 + 0) = st0[0];
0060bbfb      *(uint32_t*)((char*)arg1->__inner0 + 4) = st0[1];
0060bbfe      *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_21;
0060bc02      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
0060bc02      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
0060bc06      st1 = *(uint64_t*)((char*)arg2->__inner0 + 0x18);
0060bc0a      st2 = st0;
0060bc0d      st3 = st1;
0060bc10      st4 = st0;
0060bc16      st0 = __pfmul_mmxq_memq(st0, temp0);
0060bc1b      int64_t temp0_23 = __pfmul_mmxq_memq(st1, var_40);
0060bc24      st7 = st3;
0060bc27      int64_t temp0_24 = __pfmul_mmxq_memq(st2, temp0_1);
0060bc2d      st3 = __pfmul_mmxq_memq(st3, var_30);
0060bc33      int64_t temp0_26 = __pfmul_mmxq_memq(st4, st6);
0060bc39      int64_t temp0_27 = __pfmul_mmxq_memq(st1, temp0_2);
0060bc3f      int64_t temp0_28 = __pfmul_mmxq_memq(st2, temp0_5);
0060bc45      int64_t temp0_29 = __pfmul_mmxq_memq(st7, temp0_3);
0060bc4b      st0 = __pfacc_mmxq_mmxq(st0, temp0_24);
0060bc4f      int64_t temp0_31 = __pfacc_mmxq_mmxq(temp0_23, st3);
0060bc53      int64_t temp0_32 = __pfacc_mmxq_mmxq(temp0_26, temp0_28);
0060bc57      int64_t temp0_33 = __pfacc_mmxq_mmxq(temp0_27, temp0_29);
0060bc5b      st0 = __pfadd_mmxq_mmxq(st0, temp0_31);
0060bc5f      int64_t temp0_35 = __pfadd_mmxq_mmxq(temp0_32, temp0_33);
0060bc63      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = st0[0];
0060bc63      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = st0[1];
0060bc67      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0_35;
0060bc6b      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
0060bc6b      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
0060bc6f      st1 = *(uint64_t*)((char*)arg2->__inner0 + 0x28);
0060bc73      st2 = st0;
0060bc76      st3 = st1;
0060bc79      st4 = st0;
0060bc7f      st0 = __pfmul_mmxq_memq(st0, temp0);
0060bc84      int64_t temp0_37 = __pfmul_mmxq_memq(st1, var_40);
0060bc8d      st7 = st3;
0060bc90      int64_t temp0_38 = __pfmul_mmxq_memq(st2, temp0_1);
0060bc96      st3 = __pfmul_mmxq_memq(st3, var_30);
0060bc9c      int64_t temp0_40 = __pfmul_mmxq_memq(st4, st6);
0060bca2      int64_t temp0_41 = __pfmul_mmxq_memq(st1, temp0_2);
0060bca8      int64_t temp0_42 = __pfmul_mmxq_memq(st2, temp0_5);
0060bcae      int64_t temp0_43 = __pfmul_mmxq_memq(st7, temp0_3);
0060bcb4      st0 = __pfacc_mmxq_mmxq(st0, temp0_38);
0060bcb8      int64_t temp0_45 = __pfacc_mmxq_mmxq(temp0_37, st3);
0060bcbc      int64_t temp0_46 = __pfacc_mmxq_mmxq(temp0_40, temp0_42);
0060bcc0      int64_t temp0_47 = __pfacc_mmxq_mmxq(temp0_41, temp0_43);
0060bcc4      st0 = __pfadd_mmxq_mmxq(st0, temp0_45);
0060bcc8      int64_t temp0_49 = __pfadd_mmxq_mmxq(temp0_46, temp0_47);
0060bccc      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = st0[0];
0060bccc      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = st0[1];
0060bcd0      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = temp0_49;
0060bcd4      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
0060bcd4      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
0060bcd8      st1 = *(uint64_t*)((char*)arg2->__inner0 + 0x38);
0060bcdc      st2 = st0;
0060bcdf      st3 = st1;
0060bce2      st4 = st0;
0060bce8      st0 = __pfmul_mmxq_memq(st0, temp0);
0060bced      int64_t temp0_51 = __pfmul_mmxq_memq(st1, var_40);
0060bcf6      st7 = st3;
0060bcf9      int64_t temp0_52 = __pfmul_mmxq_memq(st2, temp0_1);
0060bcff      st3 = __pfmul_mmxq_memq(st3, var_30);
0060bd05      int64_t temp0_54 = __pfmul_mmxq_memq(st4, st6);
0060bd0b      int64_t temp0_55 = __pfmul_mmxq_memq(st1, temp0_2);
0060bd11      int64_t temp0_56 = __pfmul_mmxq_memq(st2, temp0_5);
0060bd17      int64_t temp0_57 = __pfmul_mmxq_memq(st7, temp0_3);
0060bd1d      st0 = __pfacc_mmxq_mmxq(st0, temp0_52);
0060bd21      int64_t temp0_59 = __pfacc_mmxq_mmxq(temp0_51, st3);
0060bd25      int64_t temp0_60 = __pfacc_mmxq_mmxq(temp0_54, temp0_56);
0060bd29      int64_t temp0_61 = __pfacc_mmxq_mmxq(temp0_55, temp0_57);
0060bd2d      st0 = __pfadd_mmxq_mmxq(st0, temp0_59);
0060bd31      int64_t temp0_63 = __pfadd_mmxq_mmxq(temp0_60, temp0_61);
0060bd35      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = st0[0];
0060bd35      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = st0[1];
0060bd39      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_63;
0060bd46      __femms();
0060bd48      return arg1;
0060bb19  }


0060bd4b  float __stdcall x3d_D3DXMatrixfDeterminant(struct D3DXMATRIX const* arg1)

0060bd4b  {
0060bd4f      uint32_t st2[0x2];
0060bd4f      st2[0] = *(uint32_t*)((char*)arg1->__inner0 + 0x20);
0060bd4f      st2[1] = *(uint32_t*)((char*)arg1->__inner0 + 0x24);
0060bd53      int64_t st1 = *(uint64_t*)((char*)arg1->__inner0 + 0x28);
0060bd57      int64_t st0 = *(uint64_t*)((char*)arg1->__inner0 + 0x24);
0060bd5b      int64_t temp0 = _m_punpckhdq(st1, st1);
0060bd5e      uint32_t temp0_1[0x2] = _m_punpckldq(st2, st2[0]);
0060bd61      uint32_t st5[0x2];
0060bd61      st5[0] = *(uint32_t*)((char*)arg1->__inner0 + 0x30);
0060bd61      st5[1] = *(uint32_t*)((char*)arg1->__inner0 + 0x34);
0060bd65      int64_t st4 = *(uint64_t*)((char*)arg1->__inner0 + 0x38);
0060bd69      int64_t st3 = *(uint64_t*)((char*)arg1->__inner0 + 0x34);
0060bd6d      int64_t temp0_2 = _m_punpckhdq(st4, st4);
0060bd70      uint32_t temp0_3[0x2] = _m_punpckldq(st5, st5[0]);
0060bd7b      int64_t temp0_6 = __pfsub_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_2, st0), __pfmul_mmxq_mmxq(temp0, st3));
0060bd89      st2 = __pfsub_mmxq_mmxq(__pfmul_mmxq_memq(temp0_1, *(uint64_t*)((char*)arg1->__inner0 + 0x38)), __pfmul_mmxq_memq(temp0_3, *(uint64_t*)((char*)arg1->__inner0 + 0x28)));
0060bd97      int64_t temp0_12 = __pfsub_mmxq_mmxq(__pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg1->__inner0 + 0x20)), __pfmul_mmxq_memq(st0, *(uint64_t*)((char*)arg1->__inner0 + 0x30)));
0060bd9b      st0 = st2;
0060bda1      st0 = _m_punpckldq(_m_punpckhdq(st0, st0), temp0_6);
0060bda7      int64_t temp0_15 = _m_punpckhdq(temp0_12, temp0_6);
0060bdad      uint32_t temp0_16[0x2] = _m_punpckldq(temp0_12, st2[0]);
0060bdb0      int64_t st6 = *(uint64_t*)((char*)arg1->__inner0 + 0x18);
0060bdb7      int64_t temp0_17 = _m_punpckhdq(st6, st6);
0060bdc3      int64_t temp0_20 = __pfadd_mmxq_mmxq(__pfmul_mmxq_memq(temp0_6, *(uint64_t*)((char*)arg1->__inner0 + 0x10)), __pfmul_mmxq_mmxq(temp0_12, temp0_17));
0060bdc7      st3 = *(uint64_t*)((char*)arg1->__inner0 + 0x14);
0060bdcf      int64_t temp0_22 = __pfsub_mmxq_mmxq(temp0_20, __pfmul_mmxq_mmxq(st0, st3));
0060bdd3      st0 = *(uint64_t*)((char*)arg1->__inner0 + 0x10);
0060bdd7      st0 = _m_punpckldq(st0, st0);
0060bde1      int64_t temp0_25 = __pfmul_mmxq_mmxq(temp0_22, __punpckldq_mmxq_memd(*(uint64_t*)((char*)arg1->__inner0 + 8), *(uint32_t*)((char*)arg1->__inner0 + 0)));
0060bde9      int64_t temp0_26 = __punpckhdq_mmxq_memq(*(uint64_t*)((char*)arg1->__inner0 + 8), *(uint64_t*)((char*)arg1->__inner0 + 0));
0060bdec      st5 = __pfmul_mmxq_mmxq(temp0_16, st6);
0060bdf0      st2 = __pfmul_mmxq_mmxq(st2, st3);
0060be04      int64_t temp0_33 = __pfsub_mmxq_mmxq(temp0_25, __pfmul_mmxq_mmxq(__pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_15, st0), st5), st2), temp0_26));
0060be0c      arg1 = __pfacc_mmxq_mmxq(temp0_33, temp0_33);
0060be11      __femms();
0060be17      return ((int32_t)((long double)arg1));
0060bd4b  }


0060be1a  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixTranslation(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

0060be1a  {
0060be1e      __femms();
0060be40      uint64_t st4 = _m_punpckldq(((uint64_t)arg4), 0x3f800000);
0060be43      uint64_t st3 = _m_punpckldq(((uint64_t)arg2), arg3);
0060be46      *(uint64_t*)((char*)arg1->__inner0 + 0) = 0x3f800000;
0060be49      *(uint64_t*)((char*)arg1->__inner0 + 8) = 0;
0060be4d      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = 0x3f80000000000000;
0060be51      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = 0;
0060be55      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = 0;
0060be59      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = 0x3f800000;
0060be5d      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = st3;
0060be61      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = st4;
0060be65      __femms();
0060be67      return arg1;
0060be1a  }


0060be6a  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixShadow(struct D3DXMATRIX* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXPLANE const* arg3)

0060be6a  {
0060be6a      __femms();
0060be7e      int64_t var_18;
0060be7e      x3d_D3DXPlaneNormalize(&var_18, arg3);
0060be89      int64_t st0 = var_18;
0060be8d      int64_t st1;
0060be8d      st1 = arg2->x;
0060be8d      *(uint32_t*)((char*)st1)[4] = arg2->y;
0060be93      int64_t temp0 = __pfmul_mmxq_mmxq(st1, st0);
0060be9c      int64_t st3;
0060be9c      st3 = arg2->z;
0060be9c      *(uint32_t*)((char*)st3)[4] = arg2->w;
0060bea0      int64_t st7 = st3;
0060bea3      int64_t var_10;
0060bea3      int64_t temp0_1 = __pfmul_mmxq_mmxq(st3, var_10);
0060bea7      int64_t temp0_2 = __pfadd_mmxq_mmxq(temp0, temp0_1);
0060beab      st0 ^= 0x8000000080000000;
0060beb2      int64_t st2 = (var_10 ^ 0x8000000080000000);
0060beb9      int64_t temp0_3 = __pfacc_mmxq_mmxq(temp0_2, temp0_2);
0060bec3      st3 = _m_punpckldq(temp0_1, temp0_3);
0060bec6      uint64_t temp0_5 = _m_psllqi(temp0_3, 0x20);
0060beca      uint64_t temp0_6 = _m_psrlqi(st3, 0x20);
0060bece      int64_t st4 = _m_punpckldq(st0, st0);
0060bed1      int64_t st5 = _m_punpckldq(st0, st0);
0060bed4      int64_t temp0_9 = __pfmul_mmxq_mmxq(st4, st1);
0060bed8      int64_t temp0_10 = __pfmul_mmxq_mmxq(st5, st7);
0060bee0      *(uint64_t*)((char*)arg1->__inner0 + 0) = __pfadd_mmxq_mmxq(temp0_9, temp0_6);
0060bee3      *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_10;
0060beed      int64_t temp0_12 = _m_punpckhdq(st0, st0);
0060bef0      int64_t temp0_13 = _m_punpckhdq(st0, st0);
0060bef3      int64_t temp0_14 = __pfmul_mmxq_mmxq(temp0_12, st1);
0060bef7      int64_t temp0_15 = __pfmul_mmxq_mmxq(temp0_13, st7);
0060beff      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = __pfadd_mmxq_mmxq(temp0_14, temp0_5);
0060bf03      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0_15;
0060bf0d      st4 = _m_punpckldq(st2, st2);
0060bf10      st5 = _m_punpckldq(st2, st2);
0060bf13      int64_t temp0_19 = __pfmul_mmxq_mmxq(st4, st1);
0060bf1b      int64_t temp0_21 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(st5, st7), temp0_6);
0060bf1f      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = temp0_19;
0060bf23      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = temp0_21;
0060bf2d      int64_t temp0_22 = _m_punpckhdq(st2, st2);
0060bf30      int64_t temp0_23 = _m_punpckhdq(st2, st2);
0060bf33      int64_t temp0_24 = __pfmul_mmxq_mmxq(temp0_22, st1);
0060bf3b      int64_t temp0_26 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_23, st7), temp0_5);
0060bf3f      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_24;
0060bf43      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_26;
0060bf50      __femms();
0060bf52      return arg1;
0060be6a  }


0060bf55  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixReflect(struct D3DXMATRIX* arg1, struct D3DXPLANE const* arg2)

0060bf55  {
0060bf55      __femms();
0060bf69      int64_t var_18;
0060bf69      x3d_D3DXPlaneNormalize(&var_18, arg2);
0060bf71      int64_t st0 = var_18;
0060bf7d      int64_t var_10;
0060bf7d      uint32_t st3[0x2] = var_10;
0060bf80      int64_t temp0 = __pfmul_mmxq_memq(st0, -0x3fffffff40000000);
0060bf88      int64_t temp0_1 = __pfmul_mmxq_memq(var_10, 0x3f800000c0000000);
0060bf90      uint32_t st4[0x2] = st0;
0060bf96      uint32_t temp0_2[0x2] = _m_punpckldq(st4, st4[0]);
0060bf99      int64_t temp0_3 = _m_punpckhdq(st0, st0);
0060bfa2      uint32_t st5[0x2] = _m_psrlqi(temp0_2, 0x20);
0060bfa6      uint64_t temp0_5 = _m_psrlqi(temp0_3, 0x20);
0060bfaa      st4 = __pfmul_mmxq_mmxq(temp0_2, temp0);
0060bfae      st5 = __pfmul_mmxq_mmxq(st5, temp0_1);
0060bfb2      int64_t temp0_8 = __pfmul_mmxq_mmxq(temp0_3, temp0);
0060bfb6      int64_t temp0_9 = __pfmul_mmxq_mmxq(temp0_5, temp0_1);
0060bfba      st4 = __pfadd_mmxq_memq(st4, 0x3f800000);
0060bfc2      int64_t temp0_11 = __pfadd_mmxq_memq(temp0_8, 0x3f80000000000000);
0060bfca      *(uint32_t*)((char*)arg1->__inner0 + 0) = st4[0];
0060bfca      *(uint32_t*)((char*)arg1->__inner0 + 4) = st4[1];
0060bfcd      *(uint32_t*)((char*)arg1->__inner0 + 8) = st5[0];
0060bfcd      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = st5[1];
0060bfd1      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = temp0_11;
0060bfd5      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0_9;
0060bfdc      int64_t st6 = st3;
0060bfdf      uint32_t temp0_12[0x2] = _m_punpckldq(st3, st3[0]);
0060bfe2      int64_t temp0_13 = _m_punpckhdq(st6, st6);
0060bfeb      st5 = _m_psrlqi(temp0_12, 0x20);
0060bfef      uint64_t temp0_15 = _m_psrlqi(temp0_13, 0x20);
0060bff3      st4 = __pfmul_mmxq_mmxq(temp0_12, temp0);
0060bff7      st5 = __pfmul_mmxq_mmxq(st5, temp0_1);
0060bffb      int64_t temp0_18 = __pfmul_mmxq_mmxq(temp0_13, temp0);
0060bfff      int64_t temp0_19 = __pfmul_mmxq_mmxq(temp0_15, temp0_1);
0060c003      st5 = __pfadd_mmxq_memq(st5, 0x3f800000);
0060c00b      int64_t temp0_21 = __pfadd_mmxq_memq(temp0_19, 0x3f80000000000000);
0060c013      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = st4[0];
0060c013      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = st4[1];
0060c017      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = st5[0];
0060c017      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = st5[1];
0060c01b      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_18;
0060c01f      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_21;
0060c02c      __femms();
0060c02e      return arg1;
0060bf55  }


0060c031  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixRotationX(struct D3DXMATRIX* arg1, float arg2)

0060c031  {
0060c035      __femms();
0060c037      uint64_t st0 = ((uint64_t)arg2);
0060c03c      _a_sincos();
0060c059      uint64_t temp0 = _m_psrlqi(st0, 0x20);
0060c05d      *(uint64_t*)((char*)arg1->__inner0 + 0) = 0x3f800000;
0060c060      *(uint64_t*)((char*)arg1->__inner0 + 8) = 0;
0060c064      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = 0;
0060c068      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = st0;
0060c06c      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0;
0060c077      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = 0;
0060c07b      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = 0x3f80000000000000;
0060c07f      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = 0;
0060c083      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = (temp0 ^ 0x80000000);
0060c087      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = st0;
0060c08b      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = 0;
0060c08f      __femms();
0060c093      return arg1;
0060c031  }


0060c096  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixRotationY(struct D3DXMATRIX* arg1, float arg2)

0060c096  {
0060c09a      __femms();
0060c09c      uint64_t st0 = ((uint64_t)arg2);
0060c0a1      _a_sincos();
0060c0aa      uint64_t st4 = st0;
0060c0ad      st0 &= 0xffffffff;
0060c0b7      int80_t st2;
0060c0b7      st2 = 0x3f800000;
0060c0c5      uint64_t temp0 = _m_psrlqi(st4, 0x20);
0060c0c9      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = 0x3f80000000000000;
0060c0cd      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = 0;
0060c0d1      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = 0;
0060c0d5      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = 0x3f80000000000000;
0060c0d9      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = temp0;
0060c0e4      *(uint64_t*)((char*)arg1->__inner0 + 0) = st0;
0060c0e7      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = st0;
0060c0eb      *(uint64_t*)((char*)arg1->__inner0 + 8) = (temp0 ^ 0x80000000);
0060c0ef      __femms();
0060c0f3      return arg1;
0060c096  }


0060c0f6  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixRotationZ(struct D3DXMATRIX* arg1, float arg2)

0060c0f6  {
0060c0fa      __femms();
0060c0fc      uint64_t st0 = ((uint64_t)arg2);
0060c101      _a_sincos();
0060c106      uint64_t* result = arg1;
0060c124      uint64_t st4 = (_m_punpckldq(_m_punpckhdq(st0, st0), st0) ^ 0x80000000);
0060c12b      *(uint64_t*)result = st0;
0060c12e      result[1] = 0;
0060c132      result[3] = 0;
0060c136      result[4] = 0;
0060c13a      result[5] = 0x3f800000;
0060c13e      result[6] = 0;
0060c142      result[7] = 0x3f80000000000000;
0060c146      result[2] = st4;
0060c14a      __femms();
0060c14e      return result;
0060c0f6  }


0060c151  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixScaling(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

0060c151  {
0060c151      __femms();
0060c16b      uint64_t temp0 = _m_psllqi(((uint64_t)arg3), 0x20);
0060c174      *(uint64_t*)((char*)arg1->__inner0 + 0) = ((uint64_t)arg2);
0060c177      *(uint64_t*)((char*)arg1->__inner0 + 8) = 0;
0060c17b      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = 0;
0060c17f      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = 0;
0060c183      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = 0;
0060c187      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = temp0;
0060c18b      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = ((uint64_t)arg4);
0060c18f      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = 0x3f80000000000000;
0060c193      __femms();
0060c195      return arg1;
0060c151  }


0060c198  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixTranspose(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2)

0060c198  {
0060c19c      uint32_t st0[0x2];
0060c19c      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0);
0060c19c      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 4);
0060c19f      int64_t st1 = *(uint64_t*)((char*)arg2->__inner0 + 0x10);
0060c1a3      uint32_t st3[0x2];
0060c1a3      st3[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x28);
0060c1a3      st3[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x2c);
0060c1a7      int32_t st4 = ((int32_t)*(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060c1b2      uint32_t temp0[0x2] = _m_punpckldq(st0, st1);
0060c1b5      uint32_t st2[0x2] = _m_punpckhdq(st0, st1);
0060c1bb      *(uint32_t*)((char*)arg1->__inner0 + 0) = temp0[0];
0060c1bb      *(uint32_t*)((char*)arg1->__inner0 + 4) = temp0[1];
0060c1be      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = st2[0];
0060c1be      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = st2[1];
0060c1c2      int64_t st6 = *(uint64_t*)((char*)arg2->__inner0 + 8);
0060c1c6      uint32_t temp0_2[0x2] = _m_punpckldq(st3, st4);
0060c1c9      int32_t st7 = ((int32_t)*(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060c1cd      temp0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
0060c1cd      temp0[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
0060c1d1      int64_t temp0_3 = _m_punpckhdq(st3, st4);
0060c1d4      st1 = st6;
0060c1d7      *(uint32_t*)((char*)arg1->__inner0 + 0x28) = temp0_2[0];
0060c1d7      *(uint32_t*)((char*)arg1->__inner0 + 0x2c) = temp0_2[1];
0060c1db      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_3;
0060c1df      st6 = _m_punpckldq(st6, st7);
0060c1e2      st4 = ((int32_t)*(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060c1e9      int64_t temp0_5 = _m_punpckhdq(st1, st7);
0060c1ec      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = st6;
0060c1f0      st0 = _m_punpckhdq(temp0, st4);
0060c1f3      uint32_t temp0_7[0x2] = _m_punpckldq(temp0, st4);
0060c1f6      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_5;
0060c1fa      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = st0[0];
0060c1fa      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = st0[1];
0060c1fe      *(uint32_t*)((char*)arg1->__inner0 + 8) = temp0_7[0];
0060c1fe      *(uint32_t*)((char*)arg1->__inner0 + 0xc) = temp0_7[1];
0060c202      __femms();
0060c204      return arg1;
0060c198  }


0060c207  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixRotationQuaternion(struct D3DXMATRIX* arg1, struct D3DXQUATERNION const* arg2)

0060c207  {
0060c20f      int64_t st0;
0060c20f      st0 = arg2->x;
0060c20f      *(uint32_t*)((char*)st0)[4] = arg2->y;
0060c212      uint32_t st1[0x2];
0060c212      st1[0] = arg2->z;
0060c212      st1[1] = arg2->w;
0060c21c      int64_t temp0 = __pfadd_mmxq_mmxq(st0, st0);
0060c220      uint32_t st4[0x2] = st1;
0060c223      uint32_t st7[0x2] = st1;
0060c226      st1 = __pfadd_mmxq_mmxq(st1, st1);
0060c22a      int64_t temp0_2 = _m_punpckhdq(st0, st0);
0060c230      st4 = _m_punpckhdq(st4, st4[0]);
0060c233      int64_t temp0_4 = __pfmul_mmxq_mmxq(st0, temp0);
0060c237      uint32_t temp0_5[0x2] = _m_punpckldq(st1, temp0);
0060c23a      uint32_t temp0_6[0x2] = _m_punpckldq(st7, st7[0]);
0060c23d      int64_t temp0_7 = __pfmul_mmxq_mmxq(temp0, st4);
0060c244      st7 = __pfmul_mmxq_mmxq(temp0_6, temp0_5);
0060c248      st1 = __pfmul_mmxq_mmxq(temp0_5, temp0_2);
0060c24f      uint32_t st6[0x2] = __pfmul_mmxq_mmxq(temp0_5, st4);
0060c253      int64_t st2 = st1;
0060c256      st1 = _m_punpckhdq(st1, st7[0]);
0060c259      uint32_t temp0_12[0x2] = _m_punpckldq(st7, st7[0]);
0060c25c      uint32_t temp0_13[0x2] = _m_punpckldq(st6, st6[0]);
0060c25f      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = 0;
0060c263      st7 = __pfadd_mmxq_mmxq(temp0_12, temp0_4);
0060c267      int64_t temp0_15 = __pfacc_mmxq_mmxq(temp0_4, temp0_4);
0060c26b      st4 = st1;
0060c26e      st6 = _m_punpckhdq(temp0_13, temp0_7);
0060c271      int64_t temp0_17 = __pfsubr_mmxq_memq(temp0_15, 0x3f8000003f800000);
0060c279      st7 = __pfsubr_mmxq_memq(st7, 0x3f8000003f800000);
0060c281      int64_t st3 = _m_punpckldq(temp0_17, 0);
0060c284      st1 = __pfadd_mmxq_mmxq(st1, st6);
0060c288      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = st3;
0060c28c      st4 = __pfsub_mmxq_mmxq(st4, st6);
0060c293      int64_t temp0_22 = __pfadd_mmxq_mmxq(st2, temp0_7);
0060c297      int64_t temp0_23 = __pfsub_mmxq_mmxq(st2, temp0_7);
0060c29e      st2 = _m_punpckldq(temp0_22, 0);
0060c2a4      uint32_t temp0_25[0x2] = _m_punpckldq(st4, st7[0]);
0060c2a7      uint32_t temp0_26[0x2] = _m_punpckldq(st1, st1[0]);
0060c2aa      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = st2;
0060c2ae      int64_t temp0_27 = _m_punpckhdq(st4, 0);
0060c2b1      st0 = __punpckldq_mmxq_memd(0, 0x3f800000);
0060c2b8      *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_27;
0060c2bc      st6 = _m_punpckhdq(st1, st1[0]);
0060c2bf      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = temp0_25[0];
0060c2bf      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = temp0_25[1];
0060c2c3      st7 = _m_punpckhdq(st7, temp0_26[0]);
0060c2c6      uint32_t temp0_31[0x2] = _m_punpckldq(st6, temp0_23);
0060c2c9      *(uint32_t*)((char*)arg1->__inner0 + 0) = st7[0];
0060c2c9      *(uint32_t*)((char*)arg1->__inner0 + 4) = st7[1];
0060c2cc      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = temp0_31[0];
0060c2cc      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = temp0_31[1];
0060c2d0      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = st0;
0060c2d4      __femms();
0060c2d6      return arg1;
0060c207  }


0060c2d9  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixRotationQuaternion_K7(struct D3DXMATRIX* arg1, struct D3DXQUATERNION const* arg2)

0060c2d9  {
0060c2e1      int64_t st0;
0060c2e1      st0 = arg2->x;
0060c2e1      *(uint32_t*)((char*)st0)[4] = arg2->y;
0060c2e4      int64_t st1;
0060c2e4      st1 = arg2->z;
0060c2e4      *(uint32_t*)((char*)st1)[4] = arg2->w;
0060c2e8      int64_t st3;
0060c2e8      int64_t temp0 = __pswapd_mmxq_mmxq(st3, st0);
0060c2f2      int64_t temp0_1 = __pfadd_mmxq_mmxq(st0, st0);
0060c2f9      int64_t temp0_2 = _m_punpckhdq(st0, st1);
0060c2fc      int64_t temp0_3 = __pfadd_mmxq_mmxq(st1, st1);
0060c303      int64_t temp0_4 = __pfmul_mmxq_mmxq(temp0_1, st0);
0060c307      int64_t st5 = _m_punpckldq(temp0_1, temp0_3);
0060c30a      int64_t temp0_6 = __pfmul_mmxq_mmxq(st0, temp0_3);
0060c30e      int64_t temp0_7 = __pfmul_mmxq_mmxq(temp0, temp0_3);
0060c312      int64_t temp0_8 = __pfmul_mmxq_mmxq(temp0_3, st1);
0060c316      int64_t temp0_9 = __pfmul_mmxq_mmxq(temp0_2, st5);
0060c31d      int64_t temp0_10 = __pfsubr_mmxq_memq(temp0_4, 0x3f8000003f800000);
0060c328      st1 = _m_punpckldq(temp0_8, temp0_8);
0060c32b      int64_t temp0_12 = __pfpnacc_mmxq_mmxq(temp0_7, temp0_7);
0060c32f      int64_t temp0_13 = __pfacc_mmxq_mmxq(temp0_4, temp0_4);
0060c333      int64_t temp0_14 = __pfpnacc_mmxq_mmxq(temp0_9, temp0_9);
0060c337      int64_t temp0_15 = __pfpnacc_mmxq_mmxq(temp0_6, temp0_6);
0060c33b      int64_t temp0_16 = __pfsub_mmxq_mmxq(temp0_10, st1);
0060c33f      int64_t temp0_17 = __pswapd_mmxq_mmxq(temp0_8, temp0_15);
0060c343      int64_t temp0_18 = __pfsubr_mmxq_memq(temp0_13, 0x3f8000003f800000);
0060c351      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = 0;
0060c355      st5 = _m_punpckldq(temp0_17, temp0_12);
0060c358      int64_t st2 = _m_punpckldq(temp0_15, 0);
0060c35b      int64_t temp0_21 = _m_punpckhdq(temp0_18, 0);
0060c35e      int64_t temp0_22 = _m_punpckhdq(temp0_16, temp0_14);
0060c361      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = st5;
0060c365      int64_t temp0_23 = _m_punpckhdq(temp0_12, 0);
0060c368      *(uint64_t*)((char*)arg1->__inner0 + 8) = st2;
0060c36c      int64_t st6 = _m_punpckldq(temp0_14, temp0_16);
0060c36f      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = temp0_21;
0060c373      uint32_t temp0_25[0x2] = __punpckldq_mmxq_memd(0, 0x3f800000);
0060c37a      *(uint64_t*)((char*)arg1->__inner0 + 0) = temp0_22;
0060c37d      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = st6;
0060c381      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0_23;
0060c385      *(uint32_t*)((char*)arg1->__inner0 + 0x38) = temp0_25[0];
0060c385      *(uint32_t*)((char*)arg1->__inner0 + 0x3c) = temp0_25[1];
0060c389      __femms();
0060c38b      return arg1;
0060c2d9  }


0060c38e  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixTransformation(struct D3DXMATRIX* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, struct D3DXQUATERNION const* arg6, struct D3DXVECTOR3 const* arg7)

0060c38e  {
0060c3a4      struct D3DXMATRIX* result = arg1;
0060c3a7      int64_t st0;
0060c3a7      uint64_t st1;
0060c3a7      uint64_t z;
0060c3a7      uint64_t z_1;
0060c3a7      uint64_t z_2;
0060c3a7      int64_t st6;
0060c3a7      uint64_t st7;
0060c3a7      
0060c3a7      if (arg4 == 0)
0060c3a7      {
0060d067          z = _m_punpckldq(_m_punpckhdq(0x3f800000, 0x3f800000), 0x3f800000);
0060d06a          *(uint64_t*)((char*)result->__inner0 + 0) = 0x3f800000;
0060d06d          *(uint64_t*)((char*)result->__inner0 + 8) = 0;
0060d071          *(uint64_t*)((char*)result->__inner0 + 0x10) = z;
0060d075          *(uint64_t*)((char*)result->__inner0 + 0x18) = 0;
0060d079          *(uint64_t*)((char*)result->__inner0 + 0x20) = 0;
0060d07d          *(uint64_t*)((char*)result->__inner0 + 0x28) = 0x3f800000;
0060d081          *(uint64_t*)((char*)result->__inner0 + 0x30) = 0;
0060d085          *(uint64_t*)((char*)result->__inner0 + 0x38) = z;
0060c3a7      }
0060c3a7      else if (arg3 != 0)
0060c3af      {
0060c3bc          z = arg4->x;
0060c3bc          *(uint32_t*)((char*)z)[4] = arg4->y;
0060c3bf          z_2 = ((uint64_t)arg4->z);
0060c3c6          z_1 = z;
0060c3c9          z = _m_punpckldq(z, 0);
0060c3cf          int64_t temp0_1 = _m_punpckhdq(0, z_1);
0060c3d2          uint64_t z_3 = z;
0060c3ea          uint64_t z_4 = z_2;
0060c3fd          st0 = arg3->x;
0060c3fd          *(uint32_t*)((char*)st0)[4] = arg3->y;
0060c400          st1 = arg3->z;
0060c400          *(uint32_t*)((char*)st1)[4] = arg3->w;
0060c40a          int64_t temp0_2 = __pfadd_mmxq_mmxq(st0, st0);
0060c411          st7 = st1;
0060c414          int64_t temp0_3 = __pfadd_mmxq_mmxq(st1, st1);
0060c418          int64_t temp0_4 = _m_punpckhdq(st0, st0);
0060c41e          int64_t temp0_5 = _m_punpckhdq(st1, st1);
0060c421          int64_t temp0_6 = __pfmul_mmxq_mmxq(st0, temp0_2);
0060c425          st1 = _m_punpckldq(temp0_3, temp0_2);
0060c428          st7 = _m_punpckldq(st7, st7);
0060c42b          int64_t temp0_9 = __pfmul_mmxq_mmxq(temp0_2, temp0_5);
0060c432          int64_t temp0_10 = __pfmul_mmxq_mmxq(st7, st1);
0060c436          int64_t temp0_11 = __pfmul_mmxq_mmxq(st1, temp0_4);
0060c43d          int64_t temp0_12 = __pfmul_mmxq_mmxq(st1, temp0_5);
0060c444          int64_t temp0_13 = _m_punpckhdq(temp0_11, temp0_10);
0060c447          st7 = _m_punpckldq(temp0_10, temp0_10);
0060c44a          st6 = _m_punpckldq(temp0_12, temp0_12);
0060c451          int64_t temp0_16 = __pfadd_mmxq_mmxq(st7, temp0_6);
0060c455          int64_t temp0_17 = __pfacc_mmxq_mmxq(temp0_6, temp0_6);
0060c45c          int64_t temp0_18 = _m_punpckhdq(st6, temp0_9);
0060c45f          int64_t temp0_19 = __pfsubr_mmxq_memq(temp0_17, 0x3f8000003f800000);
0060c467          int64_t temp0_20 = __pfsubr_mmxq_memq(temp0_16, 0x3f8000003f800000);
0060c46f          z_1 = _m_punpckldq(temp0_19, 0);
0060c472          int64_t temp0_22 = __pfadd_mmxq_mmxq(temp0_13, temp0_18);
0060c476          uint64_t z_8 = z_1;
0060c47a          int64_t temp0_23 = __pfsub_mmxq_mmxq(temp0_13, temp0_18);
0060c481          int64_t temp0_24 = __pfadd_mmxq_mmxq(temp0_11, temp0_9);
0060c485          int64_t temp0_25 = __pfsub_mmxq_mmxq(temp0_11, temp0_9);
0060c48c          z = _m_punpckldq(temp0_24, 0);
0060c492          z_2 = _m_punpckldq(temp0_23, temp0_20);
0060c495          st1 = _m_punpckldq(temp0_22, temp0_22);
0060c498          uint64_t z_6 = z;
0060c49c          int64_t temp0_29 = _m_punpckhdq(temp0_23, 0);
0060c49f          st0 = __punpckldq_mmxq_memd(0, 0x3f800000);
0060c4aa          int64_t temp0_31 = _m_punpckhdq(temp0_22, temp0_22);
0060c4ad          uint64_t z_5 = z_2;
0060c4b1          int64_t temp0_32 = _m_punpckhdq(temp0_20, st1);
0060c4ba          int64_t var_68_1 = _m_punpckldq(temp0_31, temp0_25);
0060c4be          int64_t var_50_1 = st0;
0060c4be          
0060c4c7          if (arg2 == 0)
0060c4c7          {
0060cb9f              result = arg1;
0060cbb9              st0 = _m_punpckldq(temp0_32, z_5);
0060cbbc              int64_t temp0_289 = _m_punpckhdq(temp0_32, z_5);
0060cbc2              *(uint64_t*)((char*)result->__inner0 + 0) = st0;
0060cbc5              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_289;
0060cbce              z_1 = _m_punpckldq(z_8, var_50_1);
0060cbdb              int64_t temp0_291 = _m_punpckhdq(z_8, var_50_1);
0060cbe1              *(uint64_t*)((char*)result->__inner0 + 0x28) = z_1;
0060cbe5              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_291;
0060cbe9              st6 = _m_punpckldq(temp0_29, z_6);
0060cbf4              int64_t temp0_293 = _m_punpckhdq(temp0_29, z_6);
0060cbf7              *(uint64_t*)((char*)result->__inner0 + 0x20) = st6;
0060cbfb              int64_t temp0_294 = _m_punpckhdq(var_68_1, 0);
0060cbfe              z = _m_punpckldq(var_68_1, 0);
0060cc01              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_293;
0060cc05              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_294;
0060cc09              *(uint64_t*)((char*)result->__inner0 + 8) = z;
0060cc0d              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060cc10              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060cc18              int64_t temp0_296 = _m_punpckhdq(z, st0);
0060cc20              int64_t temp0_297 = _m_punpckhdq(z_1, st1);
0060cc28              st0 = _m_punpckldq(st0, st0);
0060cc2b              st1 = _m_punpckldq(st1, st1);
0060cc2e              int64_t temp0_300 = __pfmul_mmxq_mmxq(z_3, st0);
0060cc32              int64_t temp0_301 = _m_punpckhdq(temp0_296, temp0_296);
0060cc35              int64_t temp0_302 = __pfmul_mmxq_memq(st0, 0);
0060cc40              int64_t temp0_303 = __pfmul_mmxq_mmxq(temp0_1, temp0_301);
0060cc44              int64_t temp0_304 = _m_punpckhdq(temp0_297, temp0_297);
0060cc47              int64_t temp0_305 = __pfmul_mmxq_memq(temp0_301, 0);
0060cc4d              int64_t temp0_306 = __pfadd_mmxq_mmxq(temp0_303, temp0_300);
0060cc51              int64_t temp0_307 = __pfmul_mmxq_mmxq(0, st1);
0060cc55              int64_t temp0_308 = __pfadd_mmxq_mmxq(temp0_305, temp0_302);
0060cc59              int64_t temp0_309 = __pfmul_mmxq_memq(st1, z_4);
0060cc5f              int64_t temp0_310 = __pfadd_mmxq_mmxq(temp0_307, temp0_306);
0060cc63              int64_t temp0_311 = __pfmul_mmxq_mmxq(0, temp0_304);
0060cc67              int64_t temp0_312 = __pfadd_mmxq_mmxq(temp0_308, temp0_309);
0060cc6b              int64_t temp0_313 = __pfmul_mmxq_memq(temp0_304, 0x3f80000000000000);
0060cc71              int64_t temp0_314 = __pfadd_mmxq_mmxq(temp0_311, temp0_310);
0060cc75              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060cc79              int64_t temp0_315 = __pfadd_mmxq_mmxq(temp0_313, temp0_312);
0060cc7d              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060cc81              *(uint64_t*)((char*)result->__inner0 + 0) = temp0_314;
0060cc88              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_315;
0060cc8c              int64_t temp0_316 = _m_punpckhdq(temp0_312, st0);
0060cc94              int64_t temp0_317 = _m_punpckhdq(temp0_315, st1);
0060cc9c              st0 = _m_punpckldq(st0, st0);
0060cc9f              st1 = _m_punpckldq(st1, st1);
0060cca2              int64_t temp0_320 = __pfmul_mmxq_mmxq(z_3, st0);
0060cca6              int64_t temp0_321 = _m_punpckhdq(temp0_316, temp0_316);
0060cca9              int64_t temp0_322 = __pfmul_mmxq_memq(st0, 0);
0060ccb4              int64_t temp0_323 = __pfmul_mmxq_mmxq(temp0_1, temp0_321);
0060ccb8              int64_t temp0_324 = _m_punpckhdq(temp0_317, temp0_317);
0060ccbb              int64_t temp0_325 = __pfmul_mmxq_memq(temp0_321, 0);
0060ccc1              int64_t temp0_326 = __pfadd_mmxq_mmxq(temp0_323, temp0_320);
0060ccc5              int64_t temp0_327 = __pfmul_mmxq_mmxq(0, st1);
0060ccc9              int64_t temp0_328 = __pfadd_mmxq_mmxq(temp0_325, temp0_322);
0060cccd              int64_t temp0_329 = __pfmul_mmxq_memq(st1, z_4);
0060ccd3              int64_t temp0_330 = __pfadd_mmxq_mmxq(temp0_327, temp0_326);
0060ccd7              int64_t temp0_331 = __pfmul_mmxq_mmxq(0, temp0_324);
0060ccdb              int64_t temp0_332 = __pfadd_mmxq_mmxq(temp0_328, temp0_329);
0060ccdf              int64_t temp0_333 = __pfmul_mmxq_memq(temp0_324, 0x3f80000000000000);
0060cce5              int64_t temp0_334 = __pfadd_mmxq_mmxq(temp0_331, temp0_330);
0060cce9              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060cced              int64_t temp0_335 = __pfadd_mmxq_mmxq(temp0_333, temp0_332);
0060ccf1              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060ccf5              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_334;
0060ccfd              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_335;
0060cd01              int64_t temp0_336 = _m_punpckhdq(temp0_332, st0);
0060cd09              int64_t temp0_337 = _m_punpckhdq(temp0_335, st1);
0060cd11              st0 = _m_punpckldq(st0, st0);
0060cd14              st1 = _m_punpckldq(st1, st1);
0060cd17              int64_t temp0_340 = __pfmul_mmxq_mmxq(z_3, st0);
0060cd1b              int64_t temp0_341 = _m_punpckhdq(temp0_336, temp0_336);
0060cd1e              int64_t temp0_342 = __pfmul_mmxq_memq(st0, 0);
0060cd29              int64_t temp0_343 = __pfmul_mmxq_mmxq(temp0_1, temp0_341);
0060cd2d              int64_t temp0_344 = _m_punpckhdq(temp0_337, temp0_337);
0060cd30              int64_t temp0_345 = __pfmul_mmxq_memq(temp0_341, 0);
0060cd36              int64_t temp0_346 = __pfadd_mmxq_mmxq(temp0_343, temp0_340);
0060cd3a              int64_t temp0_347 = __pfmul_mmxq_mmxq(0, st1);
0060cd3e              int64_t temp0_348 = __pfadd_mmxq_mmxq(temp0_345, temp0_342);
0060cd42              int64_t temp0_349 = __pfmul_mmxq_memq(st1, z_4);
0060cd48              int64_t temp0_350 = __pfadd_mmxq_mmxq(temp0_347, temp0_346);
0060cd4c              int64_t temp0_351 = __pfmul_mmxq_mmxq(0, temp0_344);
0060cd50              int64_t temp0_352 = __pfadd_mmxq_mmxq(temp0_348, temp0_349);
0060cd54              int64_t temp0_353 = __pfmul_mmxq_memq(temp0_344, 0x3f80000000000000);
0060cd5a              int64_t temp0_354 = __pfadd_mmxq_mmxq(temp0_351, temp0_350);
0060cd5e              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060cd62              int64_t temp0_355 = __pfadd_mmxq_mmxq(temp0_353, temp0_352);
0060cd66              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060cd6a              *(uint64_t*)((char*)result->__inner0 + 0x20) = temp0_354;
0060cd72              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_355;
0060cd76              int64_t temp0_356 = _m_punpckhdq(temp0_352, st0);
0060cd7e              int64_t temp0_357 = _m_punpckhdq(temp0_355, st1);
0060cd86              st0 = _m_punpckldq(st0, st0);
0060cd89              st1 = _m_punpckldq(st1, st1);
0060cd8c              int64_t temp0_360 = __pfmul_mmxq_mmxq(z_3, st0);
0060cd90              int64_t temp0_361 = _m_punpckhdq(temp0_356, temp0_356);
0060cd93              int64_t temp0_362 = __pfmul_mmxq_memq(st0, 0);
0060cd9e              int64_t temp0_363 = __pfmul_mmxq_mmxq(temp0_1, temp0_361);
0060cda2              int64_t temp0_364 = _m_punpckhdq(temp0_357, temp0_357);
0060cda5              int64_t temp0_365 = __pfmul_mmxq_memq(temp0_361, 0);
0060cdab              int64_t temp0_366 = __pfadd_mmxq_mmxq(temp0_363, temp0_360);
0060cdaf              int64_t temp0_367 = __pfmul_mmxq_mmxq(0, st1);
0060cdb3              int64_t temp0_368 = __pfadd_mmxq_mmxq(temp0_365, temp0_362);
0060cdb7              int64_t temp0_369 = __pfmul_mmxq_memq(st1, z_4);
0060cdbd              int64_t temp0_370 = __pfadd_mmxq_mmxq(temp0_367, temp0_366);
0060cdc1              int64_t temp0_371 = __pfmul_mmxq_mmxq(0, temp0_364);
0060cdc5              int64_t temp0_372 = __pfadd_mmxq_mmxq(temp0_368, temp0_369);
0060cdc9              int64_t temp0_373 = __pfmul_mmxq_memq(temp0_364, 0x3f80000000000000);
0060cdcf              int64_t temp0_374 = __pfadd_mmxq_mmxq(temp0_371, temp0_370);
0060cdd3              int64_t temp0_375 = __pfadd_mmxq_mmxq(temp0_373, temp0_372);
0060cdd7              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_374;
0060cddb              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_375;
0060cddf              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060cde2              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060cdeb              int64_t temp0_376 = _m_punpckhdq(temp0_372, st0);
0060cdf3              int64_t temp0_377 = _m_punpckhdq(temp0_375, st1);
0060cdfb              st0 = _m_punpckldq(st0, st0);
0060cdfe              st1 = _m_punpckldq(st1, st1);
0060ce01              int64_t temp0_380 = __pfmul_mmxq_mmxq(temp0_32, st0);
0060ce05              int64_t temp0_381 = _m_punpckhdq(temp0_376, temp0_376);
0060ce08              int64_t temp0_382 = __pfmul_mmxq_memq(st0, temp0_29);
0060ce13              int64_t temp0_383 = __pfmul_mmxq_mmxq(z_5, temp0_381);
0060ce17              int64_t temp0_384 = _m_punpckhdq(temp0_377, temp0_377);
0060ce1a              int64_t temp0_385 = __pfmul_mmxq_memq(temp0_381, z_6);
0060ce20              int64_t temp0_386 = __pfadd_mmxq_mmxq(temp0_383, temp0_380);
0060ce24              int64_t temp0_387 = __pfmul_mmxq_mmxq(var_68_1, st1);
0060ce28              int64_t temp0_388 = __pfadd_mmxq_mmxq(temp0_385, temp0_382);
0060ce2c              int64_t temp0_389 = __pfmul_mmxq_memq(st1, z_8);
0060ce32              int64_t temp0_390 = __pfadd_mmxq_mmxq(temp0_387, temp0_386);
0060ce36              int64_t temp0_391 = __pfmul_mmxq_mmxq(0, temp0_384);
0060ce3a              int64_t temp0_392 = __pfadd_mmxq_mmxq(temp0_388, temp0_389);
0060ce3e              int64_t temp0_393 = __pfmul_mmxq_memq(temp0_384, var_50_1);
0060ce44              int64_t temp0_394 = __pfadd_mmxq_mmxq(temp0_391, temp0_390);
0060ce48              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060ce4c              int64_t temp0_395 = __pfadd_mmxq_mmxq(temp0_393, temp0_392);
0060ce50              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060ce54              *(uint64_t*)((char*)result->__inner0 + 0) = temp0_394;
0060ce5c              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_395;
0060ce60              int64_t temp0_396 = _m_punpckhdq(temp0_392, st0);
0060ce68              int64_t temp0_397 = _m_punpckhdq(temp0_395, st1);
0060ce70              st0 = _m_punpckldq(st0, st0);
0060ce73              st1 = _m_punpckldq(st1, st1);
0060ce76              int64_t temp0_400 = __pfmul_mmxq_mmxq(temp0_32, st0);
0060ce7a              int64_t temp0_401 = _m_punpckhdq(temp0_396, temp0_396);
0060ce7d              int64_t temp0_402 = __pfmul_mmxq_memq(st0, temp0_29);
0060ce88              int64_t temp0_403 = __pfmul_mmxq_mmxq(z_5, temp0_401);
0060ce8c              int64_t temp0_404 = _m_punpckhdq(temp0_397, temp0_397);
0060ce8f              int64_t temp0_405 = __pfmul_mmxq_memq(temp0_401, z_6);
0060ce95              int64_t temp0_406 = __pfadd_mmxq_mmxq(temp0_403, temp0_400);
0060ce99              int64_t temp0_407 = __pfmul_mmxq_mmxq(var_68_1, st1);
0060ce9d              int64_t temp0_408 = __pfadd_mmxq_mmxq(temp0_405, temp0_402);
0060cea1              int64_t temp0_409 = __pfmul_mmxq_memq(st1, z_8);
0060cea7              int64_t temp0_410 = __pfadd_mmxq_mmxq(temp0_407, temp0_406);
0060ceab              int64_t temp0_411 = __pfmul_mmxq_mmxq(0, temp0_404);
0060ceaf              int64_t temp0_412 = __pfadd_mmxq_mmxq(temp0_408, temp0_409);
0060ceb3              int64_t temp0_413 = __pfmul_mmxq_memq(temp0_404, var_50_1);
0060ceb9              int64_t temp0_414 = __pfadd_mmxq_mmxq(temp0_411, temp0_410);
0060cebd              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060cec1              int64_t temp0_415 = __pfadd_mmxq_mmxq(temp0_413, temp0_412);
0060cec5              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060cec9              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_414;
0060ced2              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_415;
0060ced6              int64_t temp0_416 = _m_punpckhdq(temp0_412, st0);
0060cede              int64_t temp0_417 = _m_punpckhdq(temp0_415, st1);
0060cee6              st0 = _m_punpckldq(st0, st0);
0060cee9              st1 = _m_punpckldq(st1, st1);
0060ceec              int64_t temp0_420 = __pfmul_mmxq_mmxq(temp0_32, st0);
0060cef0              int64_t temp0_421 = _m_punpckhdq(temp0_416, temp0_416);
0060cef3              int64_t temp0_422 = __pfmul_mmxq_memq(st0, temp0_29);
0060cefe              int64_t temp0_423 = __pfmul_mmxq_mmxq(z_5, temp0_421);
0060cf02              int64_t temp0_424 = _m_punpckhdq(temp0_417, temp0_417);
0060cf05              int64_t temp0_425 = __pfmul_mmxq_memq(temp0_421, z_6);
0060cf0b              int64_t temp0_426 = __pfadd_mmxq_mmxq(temp0_423, temp0_420);
0060cf0f              int64_t temp0_427 = __pfmul_mmxq_mmxq(var_68_1, st1);
0060cf13              int64_t temp0_428 = __pfadd_mmxq_mmxq(temp0_425, temp0_422);
0060cf17              int64_t temp0_429 = __pfmul_mmxq_memq(st1, z_8);
0060cf1d              int64_t temp0_430 = __pfadd_mmxq_mmxq(temp0_427, temp0_426);
0060cf21              uint64_t temp0_431 = __pfmul_mmxq_mmxq(0, temp0_424);
0060cf25              int64_t temp0_432 = __pfadd_mmxq_mmxq(temp0_428, temp0_429);
0060cf29              int64_t temp0_433 = __pfmul_mmxq_memq(temp0_424, var_50_1);
0060cf2f              int64_t temp0_434 = __pfadd_mmxq_mmxq(temp0_431, temp0_430);
0060cf33              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060cf37              int64_t temp0_435 = __pfadd_mmxq_mmxq(temp0_433, temp0_432);
0060cf3b              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060cf3f              *(uint64_t*)((char*)result->__inner0 + 0x20) = temp0_434;
0060cf48              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_435;
0060cf4c              int64_t temp0_436 = _m_punpckhdq(temp0_432, st0);
0060cf54              int64_t temp0_437 = _m_punpckhdq(temp0_435, st1);
0060cf5c              st0 = _m_punpckldq(st0, st0);
0060cf5f              st1 = _m_punpckldq(st1, st1);
0060cf62              int64_t temp0_440 = __pfmul_mmxq_mmxq(temp0_32, st0);
0060cf66              int64_t temp0_441 = _m_punpckhdq(temp0_436, temp0_436);
0060cf69              int64_t temp0_442 = __pfmul_mmxq_memq(st0, temp0_29);
0060cf74              int64_t temp0_443 = __pfmul_mmxq_mmxq(z_5, temp0_441);
0060cf78              int64_t temp0_444 = _m_punpckhdq(temp0_437, temp0_437);
0060cf7b              int64_t temp0_445 = __pfmul_mmxq_memq(temp0_441, z_6);
0060cf81              int64_t temp0_446 = __pfadd_mmxq_mmxq(temp0_443, temp0_440);
0060cf85              int64_t temp0_447 = __pfmul_mmxq_mmxq(var_68_1, st1);
0060cf89              int64_t temp0_448 = __pfadd_mmxq_mmxq(temp0_445, temp0_442);
0060cf8d              int64_t temp0_449 = __pfmul_mmxq_memq(st1, z_8);
0060cf93              int64_t temp0_450 = __pfadd_mmxq_mmxq(temp0_447, temp0_446);
0060cf97              uint64_t temp0_451 = __pfmul_mmxq_mmxq(0, temp0_444);
0060cf9b              int64_t temp0_452 = __pfadd_mmxq_mmxq(temp0_448, temp0_449);
0060cf9f              int64_t temp0_453 = __pfmul_mmxq_memq(temp0_444, var_50_1);
0060cfa5              int64_t temp0_454 = __pfadd_mmxq_mmxq(temp0_451, temp0_450);
0060cfa9              int64_t temp0_455 = __pfadd_mmxq_mmxq(temp0_453, temp0_452);
0060cfad              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_454;
0060cfb1              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_455;
0060c4c7          }
0060c4c7          else
0060c4c7          {
0060c4e4              st0 = _m_punpckldq(temp0_32, z_5);
0060c4e7              int64_t temp0_35 = _m_punpckhdq(temp0_32, z_5);
0060c4ed              int64_t var_48_1 = st0;
0060c502              z_1 = _m_punpckldq(z_8, var_50_1);
0060c50f              int64_t temp0_37 = _m_punpckhdq(z_8, var_50_1);
0060c515              uint64_t z_10 = z_1;
0060c525              st6 = _m_punpckldq(temp0_29, z_6);
0060c530              int64_t temp0_39 = _m_punpckhdq(temp0_29, z_6);
0060c53b              int64_t temp0_40 = _m_punpckhdq(var_68_1, 0);
0060c551              uint64_t var_40_1 = _m_punpckldq(var_68_1, 0);
0060c559              result = arg1;
0060c55c              z_1 = arg2->x;
0060c55c              *(uint32_t*)((char*)z_1)[4] = arg2->y;
0060c55f              z_2 = ((uint64_t)arg2->z);
0060c573              z = _m_punpckldq(_m_punpckhdq(0x3f800000, 0x3f800000), 0x3f800000);
0060c576              *(uint64_t*)((char*)result->__inner0 + 0) = 0x3f800000;
0060c579              *(uint64_t*)((char*)result->__inner0 + 8) = 0;
0060c57d              *(uint64_t*)((char*)result->__inner0 + 0x10) = z;
0060c581              *(uint64_t*)((char*)result->__inner0 + 0x18) = 0;
0060c585              *(uint64_t*)((char*)result->__inner0 + 0x20) = 0;
0060c589              *(uint64_t*)((char*)result->__inner0 + 0x28) = 0x3f800000;
0060c58d              int64_t temp0_44 = __pfsub_mmxq_mmxq(z, z_2);
0060c591              int64_t temp0_45 = __pfsub_mmxq_mmxq(0, z_1);
0060c595              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_44;
0060c599              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_45;
0060c59d              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060c5a0              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060c5ac              int64_t temp0_46 = _m_punpckhdq(temp0_44, st0);
0060c5b7              int64_t temp0_47 = _m_punpckhdq(z_1, st1);
0060c5c2              st0 = _m_punpckldq(st0, st0);
0060c5c5              st1 = _m_punpckldq(st1, st1);
0060c5c8              int64_t temp0_50 = __pfmul_mmxq_mmxq(var_48_1, st0);
0060c5cc              int64_t temp0_51 = _m_punpckhdq(temp0_46, temp0_46);
0060c5cf              int64_t temp0_52 = __pfmul_mmxq_memq(st0, var_40_1);
0060c5e0              int64_t temp0_53 = __pfmul_mmxq_mmxq(temp0_35, temp0_51);
0060c5e4              int64_t temp0_54 = _m_punpckhdq(temp0_47, temp0_47);
0060c5e7              int64_t temp0_55 = __pfmul_mmxq_memq(temp0_51, temp0_40);
0060c5f0              int64_t temp0_56 = __pfadd_mmxq_mmxq(temp0_53, temp0_50);
0060c5f4              int64_t temp0_57 = __pfmul_mmxq_mmxq(st6, st1);
0060c5f8              int64_t temp0_58 = __pfadd_mmxq_mmxq(temp0_55, temp0_52);
0060c5fc              int64_t temp0_59 = __pfmul_mmxq_memq(st1, z_10);
0060c605              int64_t temp0_60 = __pfadd_mmxq_mmxq(temp0_57, temp0_56);
0060c609              int64_t temp0_61 = __pfmul_mmxq_mmxq(temp0_39, temp0_54);
0060c60d              int64_t temp0_62 = __pfadd_mmxq_mmxq(temp0_58, temp0_59);
0060c611              int64_t temp0_63 = __pfmul_mmxq_memq(temp0_54, temp0_37);
0060c61a              int64_t temp0_64 = __pfadd_mmxq_mmxq(temp0_61, temp0_60);
0060c61e              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060c622              int64_t temp0_65 = __pfadd_mmxq_mmxq(temp0_63, temp0_62);
0060c626              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060c62a              *(uint64_t*)((char*)result->__inner0 + 0) = temp0_64;
0060c635              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_65;
0060c639              int64_t temp0_66 = _m_punpckhdq(temp0_62, st0);
0060c644              int64_t temp0_67 = _m_punpckhdq(temp0_65, st1);
0060c64f              st0 = _m_punpckldq(st0, st0);
0060c652              st1 = _m_punpckldq(st1, st1);
0060c655              int64_t temp0_70 = __pfmul_mmxq_mmxq(var_48_1, st0);
0060c659              int64_t temp0_71 = _m_punpckhdq(temp0_66, temp0_66);
0060c65c              int64_t temp0_72 = __pfmul_mmxq_memq(st0, var_40_1);
0060c66d              int64_t temp0_73 = __pfmul_mmxq_mmxq(temp0_35, temp0_71);
0060c671              int64_t temp0_74 = _m_punpckhdq(temp0_67, temp0_67);
0060c674              int64_t temp0_75 = __pfmul_mmxq_memq(temp0_71, temp0_40);
0060c67d              int64_t temp0_76 = __pfadd_mmxq_mmxq(temp0_73, temp0_70);
0060c681              int64_t temp0_77 = __pfmul_mmxq_mmxq(st6, st1);
0060c685              int64_t temp0_78 = __pfadd_mmxq_mmxq(temp0_75, temp0_72);
0060c689              int64_t temp0_79 = __pfmul_mmxq_memq(st1, z_10);
0060c692              int64_t temp0_80 = __pfadd_mmxq_mmxq(temp0_77, temp0_76);
0060c696              int64_t temp0_81 = __pfmul_mmxq_mmxq(temp0_39, temp0_74);
0060c69a              int64_t temp0_82 = __pfadd_mmxq_mmxq(temp0_78, temp0_79);
0060c69e              int64_t temp0_83 = __pfmul_mmxq_memq(temp0_74, temp0_37);
0060c6a7              int64_t temp0_84 = __pfadd_mmxq_mmxq(temp0_81, temp0_80);
0060c6ab              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060c6af              int64_t temp0_85 = __pfadd_mmxq_mmxq(temp0_83, temp0_82);
0060c6b3              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060c6b7              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_84;
0060c6c3              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_85;
0060c6c7              int64_t temp0_86 = _m_punpckhdq(temp0_82, st0);
0060c6d2              int64_t temp0_87 = _m_punpckhdq(temp0_85, st1);
0060c6dd              st0 = _m_punpckldq(st0, st0);
0060c6e0              st1 = _m_punpckldq(st1, st1);
0060c6e3              int64_t temp0_90 = __pfmul_mmxq_mmxq(var_48_1, st0);
0060c6e7              int64_t temp0_91 = _m_punpckhdq(temp0_86, temp0_86);
0060c6ea              int64_t temp0_92 = __pfmul_mmxq_memq(st0, var_40_1);
0060c6fb              int64_t temp0_93 = __pfmul_mmxq_mmxq(temp0_35, temp0_91);
0060c6ff              int64_t temp0_94 = _m_punpckhdq(temp0_87, temp0_87);
0060c702              int64_t temp0_95 = __pfmul_mmxq_memq(temp0_91, temp0_40);
0060c70b              int64_t temp0_96 = __pfadd_mmxq_mmxq(temp0_93, temp0_90);
0060c70f              int64_t temp0_97 = __pfmul_mmxq_mmxq(st6, st1);
0060c713              int64_t temp0_98 = __pfadd_mmxq_mmxq(temp0_95, temp0_92);
0060c717              int64_t temp0_99 = __pfmul_mmxq_memq(st1, z_10);
0060c720              int64_t temp0_100 = __pfadd_mmxq_mmxq(temp0_97, temp0_96);
0060c724              int64_t temp0_101 = __pfmul_mmxq_mmxq(temp0_39, temp0_94);
0060c728              int64_t temp0_102 = __pfadd_mmxq_mmxq(temp0_98, temp0_99);
0060c72c              int64_t temp0_103 = __pfmul_mmxq_memq(temp0_94, temp0_37);
0060c735              int64_t temp0_104 = __pfadd_mmxq_mmxq(temp0_101, temp0_100);
0060c739              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060c73d              int64_t temp0_105 = __pfadd_mmxq_mmxq(temp0_103, temp0_102);
0060c741              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060c745              *(uint64_t*)((char*)result->__inner0 + 0x20) = temp0_104;
0060c751              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_105;
0060c755              int64_t temp0_106 = _m_punpckhdq(temp0_102, st0);
0060c760              int64_t temp0_107 = _m_punpckhdq(temp0_105, st1);
0060c76b              st0 = _m_punpckldq(st0, st0);
0060c76e              st1 = _m_punpckldq(st1, st1);
0060c771              int64_t temp0_110 = __pfmul_mmxq_mmxq(var_48_1, st0);
0060c775              int64_t temp0_111 = _m_punpckhdq(temp0_106, temp0_106);
0060c778              int64_t temp0_112 = __pfmul_mmxq_memq(st0, var_40_1);
0060c789              int64_t temp0_113 = __pfmul_mmxq_mmxq(temp0_35, temp0_111);
0060c78d              int64_t temp0_114 = _m_punpckhdq(temp0_107, temp0_107);
0060c790              int64_t temp0_115 = __pfmul_mmxq_memq(temp0_111, temp0_40);
0060c799              int64_t temp0_116 = __pfadd_mmxq_mmxq(temp0_113, temp0_110);
0060c79d              int64_t temp0_117 = __pfmul_mmxq_mmxq(st6, st1);
0060c7a1              int64_t temp0_118 = __pfadd_mmxq_mmxq(temp0_115, temp0_112);
0060c7a5              int64_t temp0_119 = __pfmul_mmxq_memq(st1, z_10);
0060c7ae              int64_t temp0_120 = __pfadd_mmxq_mmxq(temp0_117, temp0_116);
0060c7b2              int64_t temp0_121 = __pfmul_mmxq_mmxq(temp0_39, temp0_114);
0060c7b6              int64_t temp0_122 = __pfadd_mmxq_mmxq(temp0_118, temp0_119);
0060c7ba              int64_t temp0_123 = __pfmul_mmxq_memq(temp0_114, temp0_37);
0060c7c3              int64_t temp0_124 = __pfadd_mmxq_mmxq(temp0_121, temp0_120);
0060c7c7              int64_t temp0_125 = __pfadd_mmxq_mmxq(temp0_123, temp0_122);
0060c7cb              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_124;
0060c7cf              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_125;
0060c7d3              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060c7d6              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060c7de              int64_t temp0_126 = _m_punpckhdq(temp0_122, st0);
0060c7e6              int64_t temp0_127 = _m_punpckhdq(temp0_125, st1);
0060c7ee              st0 = _m_punpckldq(st0, st0);
0060c7f1              st1 = _m_punpckldq(st1, st1);
0060c7f4              int64_t temp0_130 = __pfmul_mmxq_mmxq(z_3, st0);
0060c7f8              int64_t temp0_131 = _m_punpckhdq(temp0_126, temp0_126);
0060c7fb              int64_t temp0_132 = __pfmul_mmxq_memq(st0, 0);
0060c806              int64_t temp0_133 = __pfmul_mmxq_mmxq(temp0_1, temp0_131);
0060c80a              int64_t temp0_134 = _m_punpckhdq(temp0_127, temp0_127);
0060c80d              int64_t temp0_135 = __pfmul_mmxq_memq(temp0_131, 0);
0060c813              int64_t temp0_136 = __pfadd_mmxq_mmxq(temp0_133, temp0_130);
0060c817              int64_t temp0_137 = __pfmul_mmxq_mmxq(0, st1);
0060c81b              int64_t temp0_138 = __pfadd_mmxq_mmxq(temp0_135, temp0_132);
0060c81f              int64_t temp0_139 = __pfmul_mmxq_memq(st1, z_4);
0060c825              int64_t temp0_140 = __pfadd_mmxq_mmxq(temp0_137, temp0_136);
0060c829              int64_t temp0_141 = __pfmul_mmxq_mmxq(0, temp0_134);
0060c82d              int64_t temp0_142 = __pfadd_mmxq_mmxq(temp0_138, temp0_139);
0060c831              int64_t temp0_143 = __pfmul_mmxq_memq(temp0_134, 0x3f80000000000000);
0060c837              int64_t temp0_144 = __pfadd_mmxq_mmxq(temp0_141, temp0_140);
0060c83b              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060c83f              int64_t temp0_145 = __pfadd_mmxq_mmxq(temp0_143, temp0_142);
0060c843              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060c847              *(uint64_t*)((char*)result->__inner0 + 0) = temp0_144;
0060c84e              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_145;
0060c852              int64_t temp0_146 = _m_punpckhdq(temp0_142, st0);
0060c85a              int64_t temp0_147 = _m_punpckhdq(temp0_145, st1);
0060c862              st0 = _m_punpckldq(st0, st0);
0060c865              st1 = _m_punpckldq(st1, st1);
0060c868              int64_t temp0_150 = __pfmul_mmxq_mmxq(z_3, st0);
0060c86c              int64_t temp0_151 = _m_punpckhdq(temp0_146, temp0_146);
0060c86f              int64_t temp0_152 = __pfmul_mmxq_memq(st0, 0);
0060c87a              int64_t temp0_153 = __pfmul_mmxq_mmxq(temp0_1, temp0_151);
0060c87e              int64_t temp0_154 = _m_punpckhdq(temp0_147, temp0_147);
0060c881              int64_t temp0_155 = __pfmul_mmxq_memq(temp0_151, 0);
0060c887              int64_t temp0_156 = __pfadd_mmxq_mmxq(temp0_153, temp0_150);
0060c88b              int64_t temp0_157 = __pfmul_mmxq_mmxq(0, st1);
0060c88f              int64_t temp0_158 = __pfadd_mmxq_mmxq(temp0_155, temp0_152);
0060c893              int64_t temp0_159 = __pfmul_mmxq_memq(st1, z_4);
0060c899              int64_t temp0_160 = __pfadd_mmxq_mmxq(temp0_157, temp0_156);
0060c89d              int64_t temp0_161 = __pfmul_mmxq_mmxq(0, temp0_154);
0060c8a1              int64_t temp0_162 = __pfadd_mmxq_mmxq(temp0_158, temp0_159);
0060c8a5              int64_t temp0_163 = __pfmul_mmxq_memq(temp0_154, 0x3f80000000000000);
0060c8ab              int64_t temp0_164 = __pfadd_mmxq_mmxq(temp0_161, temp0_160);
0060c8af              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060c8b3              int64_t temp0_165 = __pfadd_mmxq_mmxq(temp0_163, temp0_162);
0060c8b7              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060c8bb              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_164;
0060c8c3              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_165;
0060c8c7              int64_t temp0_166 = _m_punpckhdq(temp0_162, st0);
0060c8cf              int64_t temp0_167 = _m_punpckhdq(temp0_165, st1);
0060c8d7              st0 = _m_punpckldq(st0, st0);
0060c8da              st1 = _m_punpckldq(st1, st1);
0060c8dd              int64_t temp0_170 = __pfmul_mmxq_mmxq(z_3, st0);
0060c8e1              int64_t temp0_171 = _m_punpckhdq(temp0_166, temp0_166);
0060c8e4              int64_t temp0_172 = __pfmul_mmxq_memq(st0, 0);
0060c8ef              int64_t temp0_173 = __pfmul_mmxq_mmxq(temp0_1, temp0_171);
0060c8f3              int64_t temp0_174 = _m_punpckhdq(temp0_167, temp0_167);
0060c8f6              int64_t temp0_175 = __pfmul_mmxq_memq(temp0_171, 0);
0060c8fc              int64_t temp0_176 = __pfadd_mmxq_mmxq(temp0_173, temp0_170);
0060c900              int64_t temp0_177 = __pfmul_mmxq_mmxq(0, st1);
0060c904              int64_t temp0_178 = __pfadd_mmxq_mmxq(temp0_175, temp0_172);
0060c908              int64_t temp0_179 = __pfmul_mmxq_memq(st1, z_4);
0060c90e              int64_t temp0_180 = __pfadd_mmxq_mmxq(temp0_177, temp0_176);
0060c912              int64_t temp0_181 = __pfmul_mmxq_mmxq(0, temp0_174);
0060c916              int64_t temp0_182 = __pfadd_mmxq_mmxq(temp0_178, temp0_179);
0060c91a              int64_t temp0_183 = __pfmul_mmxq_memq(temp0_174, 0x3f80000000000000);
0060c920              int64_t temp0_184 = __pfadd_mmxq_mmxq(temp0_181, temp0_180);
0060c924              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060c928              int64_t temp0_185 = __pfadd_mmxq_mmxq(temp0_183, temp0_182);
0060c92c              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060c930              *(uint64_t*)((char*)result->__inner0 + 0x20) = temp0_184;
0060c938              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_185;
0060c93c              int64_t temp0_186 = _m_punpckhdq(temp0_182, st0);
0060c944              int64_t temp0_187 = _m_punpckhdq(temp0_185, st1);
0060c94c              st0 = _m_punpckldq(st0, st0);
0060c94f              st1 = _m_punpckldq(st1, st1);
0060c952              int64_t temp0_190 = __pfmul_mmxq_mmxq(z_3, st0);
0060c956              int64_t temp0_191 = _m_punpckhdq(temp0_186, temp0_186);
0060c959              int64_t temp0_192 = __pfmul_mmxq_memq(st0, 0);
0060c964              int64_t temp0_193 = __pfmul_mmxq_mmxq(temp0_1, temp0_191);
0060c968              int64_t temp0_194 = _m_punpckhdq(temp0_187, temp0_187);
0060c96b              int64_t temp0_195 = __pfmul_mmxq_memq(temp0_191, 0);
0060c971              int64_t temp0_196 = __pfadd_mmxq_mmxq(temp0_193, temp0_190);
0060c975              int64_t temp0_197 = __pfmul_mmxq_mmxq(0, st1);
0060c979              int64_t temp0_198 = __pfadd_mmxq_mmxq(temp0_195, temp0_192);
0060c97d              int64_t temp0_199 = __pfmul_mmxq_memq(st1, z_4);
0060c983              int64_t temp0_200 = __pfadd_mmxq_mmxq(temp0_197, temp0_196);
0060c987              int64_t temp0_201 = __pfmul_mmxq_mmxq(0, temp0_194);
0060c98b              int64_t temp0_202 = __pfadd_mmxq_mmxq(temp0_198, temp0_199);
0060c98f              int64_t temp0_203 = __pfmul_mmxq_memq(temp0_194, 0x3f80000000000000);
0060c995              int64_t temp0_204 = __pfadd_mmxq_mmxq(temp0_201, temp0_200);
0060c999              int64_t temp0_205 = __pfadd_mmxq_mmxq(temp0_203, temp0_202);
0060c99d              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_204;
0060c9a1              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_205;
0060c9a5              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060c9a8              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060c9b1              int64_t temp0_206 = _m_punpckhdq(temp0_202, st0);
0060c9b9              int64_t temp0_207 = _m_punpckhdq(temp0_205, st1);
0060c9c1              st0 = _m_punpckldq(st0, st0);
0060c9c4              st1 = _m_punpckldq(st1, st1);
0060c9c7              int64_t temp0_210 = __pfmul_mmxq_mmxq(temp0_32, st0);
0060c9cb              int64_t temp0_211 = _m_punpckhdq(temp0_206, temp0_206);
0060c9ce              int64_t temp0_212 = __pfmul_mmxq_memq(st0, temp0_29);
0060c9d9              int64_t temp0_213 = __pfmul_mmxq_mmxq(z_5, temp0_211);
0060c9dd              int64_t temp0_214 = _m_punpckhdq(temp0_207, temp0_207);
0060c9e0              int64_t temp0_215 = __pfmul_mmxq_memq(temp0_211, z_6);
0060c9e6              int64_t temp0_216 = __pfadd_mmxq_mmxq(temp0_213, temp0_210);
0060c9ea              int64_t temp0_217 = __pfmul_mmxq_mmxq(var_68_1, st1);
0060c9ee              int64_t temp0_218 = __pfadd_mmxq_mmxq(temp0_215, temp0_212);
0060c9f2              int64_t temp0_219 = __pfmul_mmxq_memq(st1, z_8);
0060c9f8              int64_t temp0_220 = __pfadd_mmxq_mmxq(temp0_217, temp0_216);
0060c9fc              int64_t temp0_221 = __pfmul_mmxq_mmxq(0, temp0_214);
0060ca00              int64_t temp0_222 = __pfadd_mmxq_mmxq(temp0_218, temp0_219);
0060ca04              int64_t temp0_223 = __pfmul_mmxq_memq(temp0_214, var_50_1);
0060ca0a              int64_t temp0_224 = __pfadd_mmxq_mmxq(temp0_221, temp0_220);
0060ca0e              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060ca12              int64_t temp0_225 = __pfadd_mmxq_mmxq(temp0_223, temp0_222);
0060ca16              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060ca1a              *(uint64_t*)((char*)result->__inner0 + 0) = temp0_224;
0060ca22              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_225;
0060ca26              int64_t temp0_226 = _m_punpckhdq(temp0_222, st0);
0060ca2e              int64_t temp0_227 = _m_punpckhdq(temp0_225, st1);
0060ca36              st0 = _m_punpckldq(st0, st0);
0060ca39              st1 = _m_punpckldq(st1, st1);
0060ca3c              int64_t temp0_230 = __pfmul_mmxq_mmxq(temp0_32, st0);
0060ca40              int64_t temp0_231 = _m_punpckhdq(temp0_226, temp0_226);
0060ca43              int64_t temp0_232 = __pfmul_mmxq_memq(st0, temp0_29);
0060ca4e              int64_t temp0_233 = __pfmul_mmxq_mmxq(z_5, temp0_231);
0060ca52              int64_t temp0_234 = _m_punpckhdq(temp0_227, temp0_227);
0060ca55              int64_t temp0_235 = __pfmul_mmxq_memq(temp0_231, z_6);
0060ca5b              int64_t temp0_236 = __pfadd_mmxq_mmxq(temp0_233, temp0_230);
0060ca5f              int64_t temp0_237 = __pfmul_mmxq_mmxq(var_68_1, st1);
0060ca63              int64_t temp0_238 = __pfadd_mmxq_mmxq(temp0_235, temp0_232);
0060ca67              int64_t temp0_239 = __pfmul_mmxq_memq(st1, z_8);
0060ca6d              int64_t temp0_240 = __pfadd_mmxq_mmxq(temp0_237, temp0_236);
0060ca71              int64_t temp0_241 = __pfmul_mmxq_mmxq(0, temp0_234);
0060ca75              int64_t temp0_242 = __pfadd_mmxq_mmxq(temp0_238, temp0_239);
0060ca79              int64_t temp0_243 = __pfmul_mmxq_memq(temp0_234, var_50_1);
0060ca7f              int64_t temp0_244 = __pfadd_mmxq_mmxq(temp0_241, temp0_240);
0060ca83              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060ca87              int64_t temp0_245 = __pfadd_mmxq_mmxq(temp0_243, temp0_242);
0060ca8b              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060ca8f              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_244;
0060ca98              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_245;
0060ca9c              int64_t temp0_246 = _m_punpckhdq(temp0_242, st0);
0060caa4              int64_t temp0_247 = _m_punpckhdq(temp0_245, st1);
0060caac              st0 = _m_punpckldq(st0, st0);
0060caaf              st1 = _m_punpckldq(st1, st1);
0060cab2              int64_t temp0_250 = __pfmul_mmxq_mmxq(temp0_32, st0);
0060cab6              int64_t temp0_251 = _m_punpckhdq(temp0_246, temp0_246);
0060cab9              int64_t temp0_252 = __pfmul_mmxq_memq(st0, temp0_29);
0060cac4              int64_t temp0_253 = __pfmul_mmxq_mmxq(z_5, temp0_251);
0060cac8              int64_t temp0_254 = _m_punpckhdq(temp0_247, temp0_247);
0060cacb              int64_t temp0_255 = __pfmul_mmxq_memq(temp0_251, z_6);
0060cad1              int64_t temp0_256 = __pfadd_mmxq_mmxq(temp0_253, temp0_250);
0060cad5              int64_t temp0_257 = __pfmul_mmxq_mmxq(var_68_1, st1);
0060cad9              int64_t temp0_258 = __pfadd_mmxq_mmxq(temp0_255, temp0_252);
0060cadd              int64_t temp0_259 = __pfmul_mmxq_memq(st1, z_8);
0060cae3              int64_t temp0_260 = __pfadd_mmxq_mmxq(temp0_257, temp0_256);
0060cae7              int64_t temp0_261 = __pfmul_mmxq_mmxq(0, temp0_254);
0060caeb              int64_t temp0_262 = __pfadd_mmxq_mmxq(temp0_258, temp0_259);
0060caef              int64_t temp0_263 = __pfmul_mmxq_memq(temp0_254, var_50_1);
0060caf5              int64_t temp0_264 = __pfadd_mmxq_mmxq(temp0_261, temp0_260);
0060caf9              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060cafd              int64_t temp0_265 = __pfadd_mmxq_mmxq(temp0_263, temp0_262);
0060cb01              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060cb05              *(uint64_t*)((char*)result->__inner0 + 0x20) = temp0_264;
0060cb0e              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_265;
0060cb12              int64_t temp0_266 = _m_punpckhdq(temp0_262, st0);
0060cb1a              int64_t temp0_267 = _m_punpckhdq(temp0_265, st1);
0060cb22              st0 = _m_punpckldq(st0, st0);
0060cb25              st1 = _m_punpckldq(st1, st1);
0060cb28              int64_t temp0_270 = __pfmul_mmxq_mmxq(temp0_32, st0);
0060cb2c              int64_t temp0_271 = _m_punpckhdq(temp0_266, temp0_266);
0060cb2f              int64_t temp0_272 = __pfmul_mmxq_memq(st0, temp0_29);
0060cb3a              int64_t temp0_273 = __pfmul_mmxq_mmxq(z_5, temp0_271);
0060cb3e              int64_t temp0_274 = _m_punpckhdq(temp0_267, temp0_267);
0060cb41              int64_t temp0_275 = __pfmul_mmxq_memq(temp0_271, z_6);
0060cb47              int64_t temp0_276 = __pfadd_mmxq_mmxq(temp0_273, temp0_270);
0060cb4b              int64_t temp0_277 = __pfmul_mmxq_mmxq(var_68_1, st1);
0060cb4f              int64_t temp0_278 = __pfadd_mmxq_mmxq(temp0_275, temp0_272);
0060cb53              int64_t temp0_279 = __pfmul_mmxq_memq(st1, z_8);
0060cb59              int64_t temp0_280 = __pfadd_mmxq_mmxq(temp0_277, temp0_276);
0060cb5d              int64_t temp0_281 = __pfmul_mmxq_mmxq(0, temp0_274);
0060cb61              int64_t temp0_282 = __pfadd_mmxq_mmxq(temp0_278, temp0_279);
0060cb65              int64_t temp0_283 = __pfmul_mmxq_memq(temp0_274, var_50_1);
0060cb6b              int64_t temp0_284 = __pfadd_mmxq_mmxq(temp0_281, temp0_280);
0060cb6f              int64_t temp0_285 = __pfadd_mmxq_mmxq(temp0_283, temp0_282);
0060cb73              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_284;
0060cb77              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_285;
0060cb7b              st0 = arg2->x;
0060cb7b              *(uint32_t*)((char*)st0)[4] = arg2->y;
0060cb82              z = ((uint64_t)arg2->z);
0060cb86              z_1 = ((uint64_t)*(uint32_t*)((char*)result->__inner0 + 0x38));
0060cb8a              int64_t temp0_286 = __pfadd_mmxq_mmxq(st0, *(uint64_t*)((char*)result->__inner0 + 0x30));
0060cb8e              int64_t temp0_287 = __pfadd_mmxq_mmxq(z, z_1);
0060cb92              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_286;
0060cb96              *(uint32_t*)((char*)result->__inner0 + 0x38) = temp0_287;
0060c4c7          }
0060c3af      }
0060c3af      else if (arg2 == 0)
0060cfbf      {
0060d020          z = arg4->x;
0060d020          *(uint32_t*)((char*)z)[4] = arg4->y;
0060d023          z_2 = ((uint64_t)arg4->z);
0060d02a          z_1 = z;
0060d02d          z = _m_punpckldq(z, 0);
0060d033          int64_t temp0_464 = _m_punpckhdq(0, z_1);
0060d036          *(uint64_t*)((char*)result->__inner0 + 0) = z;
0060d039          *(uint64_t*)((char*)result->__inner0 + 8) = 0;
0060d03d          *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_464;
0060d041          *(uint64_t*)((char*)result->__inner0 + 0x18) = 0;
0060d045          *(uint64_t*)((char*)result->__inner0 + 0x20) = 0;
0060d049          *(uint64_t*)((char*)result->__inner0 + 0x28) = z_2;
0060d04d          *(uint64_t*)((char*)result->__inner0 + 0x30) = 0;
0060d051          *(uint64_t*)((char*)result->__inner0 + 0x38) = 0x3f80000000000000;
0060cfbf      }
0060cfbf      else
0060cfbf      {
0060cfc8          z_2 = arg2->x;
0060cfc8          *(uint32_t*)((char*)z_2)[4] = arg2->y;
0060cfcf          z = arg4->x;
0060cfcf          *(uint32_t*)((char*)z)[4] = arg4->y;
0060cfd2          z_1 = ((uint64_t)arg4->z);
0060cfdc          int64_t st5 = _m_punpckldq(((uint64_t)arg2->z), 0x3f800000);
0060cfdf          int64_t temp0_457 = __pfsub_mmxq_mmxq(0x3f8000003f800000, z);
0060cfe3          *(uint64_t*)((char*)result->__inner0 + 0x28) = z_1;
0060cfe7          int64_t temp0_458 = __pfsub_mmxq_mmxq(0x3f8000003f800000, z_1);
0060cfeb          *(uint64_t*)((char*)result->__inner0 + 8) = 0;
0060cfef          *(uint64_t*)((char*)result->__inner0 + 0x18) = 0;
0060cff3          *(uint64_t*)((char*)result->__inner0 + 0x20) = 0;
0060cff7          int64_t temp0_459 = __pfmul_mmxq_mmxq(temp0_457, z_2);
0060cffb          z_2 = z;
0060cffe          int64_t temp0_460 = __pfmul_mmxq_mmxq(temp0_458, st5);
0060d002          z = _m_punpckldq(z, 0);
0060d005          int64_t temp0_462 = _m_punpckhdq(0, z_2);
0060d008          *(uint64_t*)((char*)result->__inner0 + 0) = z;
0060d00b          *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_462;
0060d00f          *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_459;
0060d013          *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_460;
0060cfbf      }
0060cfbf      
0060d091      if (arg6 != 0)
0060d091      {
0060d097          st0 = arg6->x;
0060d097          *(uint32_t*)((char*)st0)[4] = arg6->y;
0060d09a          st1 = arg6->z;
0060d09a          *(uint32_t*)((char*)st1)[4] = arg6->w;
0060d0a4          int64_t temp0_467 = __pfadd_mmxq_mmxq(st0, st0);
0060d0ab          st7 = st1;
0060d0ae          int64_t temp0_468 = __pfadd_mmxq_mmxq(st1, st1);
0060d0b2          int64_t temp0_469 = _m_punpckhdq(st0, st0);
0060d0b8          int64_t temp0_470 = _m_punpckhdq(st1, st1);
0060d0bb          int64_t temp0_471 = __pfmul_mmxq_mmxq(st0, temp0_467);
0060d0bf          st1 = _m_punpckldq(temp0_468, temp0_467);
0060d0c2          st7 = _m_punpckldq(st7, st7);
0060d0c5          int64_t temp0_474 = __pfmul_mmxq_mmxq(temp0_467, temp0_470);
0060d0cc          int64_t temp0_475 = __pfmul_mmxq_mmxq(st7, st1);
0060d0d0          int64_t temp0_476 = __pfmul_mmxq_mmxq(st1, temp0_469);
0060d0d7          int64_t temp0_477 = __pfmul_mmxq_mmxq(st1, temp0_470);
0060d0de          int64_t temp0_478 = _m_punpckhdq(temp0_476, temp0_475);
0060d0e1          st7 = _m_punpckldq(temp0_475, temp0_475);
0060d0e4          st6 = _m_punpckldq(temp0_477, temp0_477);
0060d0ec          int64_t temp0_481 = __pfadd_mmxq_mmxq(st7, temp0_471);
0060d0f0          int64_t temp0_482 = __pfacc_mmxq_mmxq(temp0_471, temp0_471);
0060d0f7          int64_t temp0_483 = _m_punpckhdq(st6, temp0_474);
0060d0fa          int64_t temp0_484 = __pfsubr_mmxq_memq(temp0_482, 0x3f8000003f800000);
0060d102          int64_t temp0_485 = __pfsubr_mmxq_memq(temp0_481, 0x3f8000003f800000);
0060d10a          z_1 = _m_punpckldq(temp0_484, 0);
0060d10d          int64_t temp0_487 = __pfadd_mmxq_mmxq(temp0_478, temp0_483);
0060d111          uint64_t z_9 = z_1;
0060d116          int64_t temp0_488 = __pfsub_mmxq_mmxq(temp0_478, temp0_483);
0060d11d          int64_t temp0_489 = __pfadd_mmxq_mmxq(temp0_476, temp0_474);
0060d121          int64_t temp0_490 = __pfsub_mmxq_mmxq(temp0_476, temp0_474);
0060d128          z = _m_punpckldq(temp0_489, 0);
0060d12e          z_2 = _m_punpckldq(temp0_488, temp0_485);
0060d131          st1 = _m_punpckldq(temp0_487, temp0_487);
0060d134          uint64_t z_7 = z;
0060d139          int64_t temp0_494 = _m_punpckhdq(temp0_488, 0);
0060d13c          st0 = __punpckldq_mmxq_memd(0, 0x3f800000);
0060d148          int64_t temp0_496 = _m_punpckhdq(temp0_487, temp0_487);
0060d150          int64_t temp0_497 = _m_punpckhdq(temp0_485, st1);
0060d15b          int64_t var_68_2 = _m_punpckldq(temp0_496, temp0_490);
0060d160          int64_t var_50_2 = st0;
0060d160          
0060d167          if (arg5 == 0)
0060d167          {
0060d386              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060d389              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060d392              int64_t temp0_583 = _m_punpckhdq(z, st0);
0060d39a              int64_t temp0_584 = _m_punpckhdq(temp0_490, st1);
0060d3a2              st0 = _m_punpckldq(st0, st0);
0060d3a5              st1 = _m_punpckldq(st1, st1);
0060d3a8              int64_t temp0_587 = __pfmul_mmxq_mmxq(temp0_497, st0);
0060d3ac              int64_t temp0_588 = _m_punpckhdq(temp0_583, temp0_583);
0060d3af              int64_t temp0_589 = __pfmul_mmxq_memq(st0, temp0_494);
0060d3ba              int64_t temp0_590 = __pfmul_mmxq_mmxq(z_2, temp0_588);
0060d3be              int64_t temp0_591 = _m_punpckhdq(temp0_584, temp0_584);
0060d3c1              int64_t temp0_592 = __pfmul_mmxq_memq(temp0_588, z_7);
0060d3c7              int64_t temp0_593 = __pfadd_mmxq_mmxq(temp0_590, temp0_587);
0060d3cb              int64_t temp0_594 = __pfmul_mmxq_mmxq(var_68_2, st1);
0060d3cf              int64_t temp0_595 = __pfadd_mmxq_mmxq(temp0_592, temp0_589);
0060d3d3              int64_t temp0_596 = __pfmul_mmxq_memq(st1, z_9);
0060d3d9              int64_t temp0_597 = __pfadd_mmxq_mmxq(temp0_594, temp0_593);
0060d3dd              int64_t temp0_598 = __pfmul_mmxq_mmxq(0, temp0_591);
0060d3e1              int64_t temp0_599 = __pfadd_mmxq_mmxq(temp0_595, temp0_596);
0060d3e5              int64_t temp0_600 = __pfmul_mmxq_memq(temp0_591, var_50_2);
0060d3eb              int64_t temp0_601 = __pfadd_mmxq_mmxq(temp0_598, temp0_597);
0060d3ef              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060d3f3              int64_t temp0_602 = __pfadd_mmxq_mmxq(temp0_600, temp0_599);
0060d3f7              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060d3fb              *(uint64_t*)((char*)result->__inner0 + 0) = temp0_601;
0060d403              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_602;
0060d407              int64_t temp0_603 = _m_punpckhdq(temp0_599, st0);
0060d40f              int64_t temp0_604 = _m_punpckhdq(temp0_602, st1);
0060d417              st0 = _m_punpckldq(st0, st0);
0060d41a              st1 = _m_punpckldq(st1, st1);
0060d41d              int64_t temp0_607 = __pfmul_mmxq_mmxq(temp0_497, st0);
0060d421              int64_t temp0_608 = _m_punpckhdq(temp0_603, temp0_603);
0060d424              int64_t temp0_609 = __pfmul_mmxq_memq(st0, temp0_494);
0060d42f              int64_t temp0_610 = __pfmul_mmxq_mmxq(z_2, temp0_608);
0060d433              int64_t temp0_611 = _m_punpckhdq(temp0_604, temp0_604);
0060d436              int64_t temp0_612 = __pfmul_mmxq_memq(temp0_608, z_7);
0060d43c              int64_t temp0_613 = __pfadd_mmxq_mmxq(temp0_610, temp0_607);
0060d440              int64_t temp0_614 = __pfmul_mmxq_mmxq(var_68_2, st1);
0060d444              int64_t temp0_615 = __pfadd_mmxq_mmxq(temp0_612, temp0_609);
0060d448              int64_t temp0_616 = __pfmul_mmxq_memq(st1, z_9);
0060d44e              int64_t temp0_617 = __pfadd_mmxq_mmxq(temp0_614, temp0_613);
0060d452              int64_t temp0_618 = __pfmul_mmxq_mmxq(0, temp0_611);
0060d456              int64_t temp0_619 = __pfadd_mmxq_mmxq(temp0_615, temp0_616);
0060d45a              int64_t temp0_620 = __pfmul_mmxq_memq(temp0_611, var_50_2);
0060d460              int64_t temp0_621 = __pfadd_mmxq_mmxq(temp0_618, temp0_617);
0060d464              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060d468              int64_t temp0_622 = __pfadd_mmxq_mmxq(temp0_620, temp0_619);
0060d46c              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060d470              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_621;
0060d479              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_622;
0060d47d              int64_t temp0_623 = _m_punpckhdq(temp0_619, st0);
0060d485              int64_t temp0_624 = _m_punpckhdq(temp0_622, st1);
0060d48d              st0 = _m_punpckldq(st0, st0);
0060d490              st1 = _m_punpckldq(st1, st1);
0060d493              int64_t temp0_627 = __pfmul_mmxq_mmxq(temp0_497, st0);
0060d497              int64_t temp0_628 = _m_punpckhdq(temp0_623, temp0_623);
0060d49a              int64_t temp0_629 = __pfmul_mmxq_memq(st0, temp0_494);
0060d4a5              int64_t temp0_630 = __pfmul_mmxq_mmxq(z_2, temp0_628);
0060d4a9              int64_t temp0_631 = _m_punpckhdq(temp0_624, temp0_624);
0060d4ac              int64_t temp0_632 = __pfmul_mmxq_memq(temp0_628, z_7);
0060d4b2              int64_t temp0_633 = __pfadd_mmxq_mmxq(temp0_630, temp0_627);
0060d4b6              int64_t temp0_634 = __pfmul_mmxq_mmxq(var_68_2, st1);
0060d4ba              int64_t temp0_635 = __pfadd_mmxq_mmxq(temp0_632, temp0_629);
0060d4be              int64_t temp0_636 = __pfmul_mmxq_memq(st1, z_9);
0060d4c4              int64_t temp0_637 = __pfadd_mmxq_mmxq(temp0_634, temp0_633);
0060d4c8              int64_t temp0_638 = __pfmul_mmxq_mmxq(0, temp0_631);
0060d4cc              int64_t temp0_639 = __pfadd_mmxq_mmxq(temp0_635, temp0_636);
0060d4d0              int64_t temp0_640 = __pfmul_mmxq_memq(temp0_631, var_50_2);
0060d4d6              int64_t temp0_641 = __pfadd_mmxq_mmxq(temp0_638, temp0_637);
0060d4da              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060d4de              int64_t temp0_642 = __pfadd_mmxq_mmxq(temp0_640, temp0_639);
0060d4e2              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060d4e6              *(uint64_t*)((char*)result->__inner0 + 0x20) = temp0_641;
0060d4ef              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_642;
0060d4f3              int64_t temp0_643 = _m_punpckhdq(temp0_639, st0);
0060d4fb              int64_t temp0_644 = _m_punpckhdq(temp0_642, st1);
0060d503              st0 = _m_punpckldq(st0, st0);
0060d506              st1 = _m_punpckldq(st1, st1);
0060d509              int64_t temp0_647 = __pfmul_mmxq_mmxq(temp0_497, st0);
0060d50d              int64_t temp0_648 = _m_punpckhdq(temp0_643, temp0_643);
0060d510              int64_t temp0_649 = __pfmul_mmxq_memq(st0, temp0_494);
0060d51b              int64_t temp0_650 = __pfmul_mmxq_mmxq(z_2, temp0_648);
0060d51f              int64_t temp0_651 = _m_punpckhdq(temp0_644, temp0_644);
0060d522              int64_t temp0_652 = __pfmul_mmxq_memq(temp0_648, z_7);
0060d528              int64_t temp0_653 = __pfadd_mmxq_mmxq(temp0_650, temp0_647);
0060d52c              int64_t temp0_654 = __pfmul_mmxq_mmxq(var_68_2, st1);
0060d530              int64_t temp0_655 = __pfadd_mmxq_mmxq(temp0_652, temp0_649);
0060d534              int64_t temp0_656 = __pfmul_mmxq_memq(st1, z_9);
0060d53a              int64_t temp0_657 = __pfadd_mmxq_mmxq(temp0_654, temp0_653);
0060d53e              int64_t temp0_658 = __pfmul_mmxq_mmxq(0, temp0_651);
0060d542              int64_t temp0_659 = __pfadd_mmxq_mmxq(temp0_655, temp0_656);
0060d546              int64_t temp0_660 = __pfmul_mmxq_memq(temp0_651, var_50_2);
0060d54c              int64_t temp0_661 = __pfadd_mmxq_mmxq(temp0_658, temp0_657);
0060d550              int64_t temp0_662 = __pfadd_mmxq_mmxq(temp0_660, temp0_659);
0060d554              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_661;
0060d558              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_662;
0060d167          }
0060d167          else
0060d167          {
0060d171              st1 = ((uint64_t)*(uint32_t*)((char*)result->__inner0 + 0x38));
0060d175              z = arg5->x;
0060d175              *(uint32_t*)((char*)z)[4] = arg5->y;
0060d178              z_1 = ((uint64_t)arg5->z);
0060d17c              int64_t temp0_499 = __pfsub_mmxq_mmxq(*(uint64_t*)((char*)result->__inner0 + 0x30), z);
0060d180              int64_t temp0_500 = __pfsub_mmxq_mmxq(st1, z_1);
0060d184              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_499;
0060d188              *(uint32_t*)((char*)result->__inner0 + 0x38) = temp0_500;
0060d18c              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060d18f              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060d198              int64_t temp0_501 = _m_punpckhdq(z, st0);
0060d1a0              int64_t temp0_502 = _m_punpckhdq(z_1, st1);
0060d1a8              st0 = _m_punpckldq(st0, st0);
0060d1ab              st1 = _m_punpckldq(st1, st1);
0060d1ae              int64_t temp0_505 = __pfmul_mmxq_mmxq(temp0_497, st0);
0060d1b2              int64_t temp0_506 = _m_punpckhdq(temp0_501, temp0_501);
0060d1b5              int64_t temp0_507 = __pfmul_mmxq_memq(st0, temp0_494);
0060d1c0              int64_t temp0_508 = __pfmul_mmxq_mmxq(z_2, temp0_506);
0060d1c4              int64_t temp0_509 = _m_punpckhdq(temp0_502, temp0_502);
0060d1c7              int64_t temp0_510 = __pfmul_mmxq_memq(temp0_506, z_7);
0060d1cd              int64_t temp0_511 = __pfadd_mmxq_mmxq(temp0_508, temp0_505);
0060d1d1              int64_t temp0_512 = __pfmul_mmxq_mmxq(var_68_2, st1);
0060d1d5              int64_t temp0_513 = __pfadd_mmxq_mmxq(temp0_510, temp0_507);
0060d1d9              int64_t temp0_514 = __pfmul_mmxq_memq(st1, z_9);
0060d1df              int64_t temp0_515 = __pfadd_mmxq_mmxq(temp0_512, temp0_511);
0060d1e3              int64_t temp0_516 = __pfmul_mmxq_mmxq(0, temp0_509);
0060d1e7              int64_t temp0_517 = __pfadd_mmxq_mmxq(temp0_513, temp0_514);
0060d1eb              int64_t temp0_518 = __pfmul_mmxq_memq(temp0_509, var_50_2);
0060d1f1              int64_t temp0_519 = __pfadd_mmxq_mmxq(temp0_516, temp0_515);
0060d1f5              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060d1f9              int64_t temp0_520 = __pfadd_mmxq_mmxq(temp0_518, temp0_517);
0060d1fd              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060d201              *(uint64_t*)((char*)result->__inner0 + 0) = temp0_519;
0060d209              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_520;
0060d20d              int64_t temp0_521 = _m_punpckhdq(temp0_517, st0);
0060d215              int64_t temp0_522 = _m_punpckhdq(temp0_520, st1);
0060d21d              st0 = _m_punpckldq(st0, st0);
0060d220              st1 = _m_punpckldq(st1, st1);
0060d223              int64_t temp0_525 = __pfmul_mmxq_mmxq(temp0_497, st0);
0060d227              int64_t temp0_526 = _m_punpckhdq(temp0_521, temp0_521);
0060d22a              int64_t temp0_527 = __pfmul_mmxq_memq(st0, temp0_494);
0060d235              int64_t temp0_528 = __pfmul_mmxq_mmxq(z_2, temp0_526);
0060d239              int64_t temp0_529 = _m_punpckhdq(temp0_522, temp0_522);
0060d23c              int64_t temp0_530 = __pfmul_mmxq_memq(temp0_526, z_7);
0060d242              int64_t temp0_531 = __pfadd_mmxq_mmxq(temp0_528, temp0_525);
0060d246              int64_t temp0_532 = __pfmul_mmxq_mmxq(var_68_2, st1);
0060d24a              int64_t temp0_533 = __pfadd_mmxq_mmxq(temp0_530, temp0_527);
0060d24e              int64_t temp0_534 = __pfmul_mmxq_memq(st1, z_9);
0060d254              int64_t temp0_535 = __pfadd_mmxq_mmxq(temp0_532, temp0_531);
0060d258              int64_t temp0_536 = __pfmul_mmxq_mmxq(0, temp0_529);
0060d25c              int64_t temp0_537 = __pfadd_mmxq_mmxq(temp0_533, temp0_534);
0060d260              int64_t temp0_538 = __pfmul_mmxq_memq(temp0_529, var_50_2);
0060d266              int64_t temp0_539 = __pfadd_mmxq_mmxq(temp0_536, temp0_535);
0060d26a              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060d26e              int64_t temp0_540 = __pfadd_mmxq_mmxq(temp0_538, temp0_537);
0060d272              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060d276              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_539;
0060d27f              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_540;
0060d283              int64_t temp0_541 = _m_punpckhdq(temp0_537, st0);
0060d28b              int64_t temp0_542 = _m_punpckhdq(temp0_540, st1);
0060d293              st0 = _m_punpckldq(st0, st0);
0060d296              st1 = _m_punpckldq(st1, st1);
0060d299              int64_t temp0_545 = __pfmul_mmxq_mmxq(temp0_497, st0);
0060d29d              int64_t temp0_546 = _m_punpckhdq(temp0_541, temp0_541);
0060d2a0              int64_t temp0_547 = __pfmul_mmxq_memq(st0, temp0_494);
0060d2ab              int64_t temp0_548 = __pfmul_mmxq_mmxq(z_2, temp0_546);
0060d2af              int64_t temp0_549 = _m_punpckhdq(temp0_542, temp0_542);
0060d2b2              int64_t temp0_550 = __pfmul_mmxq_memq(temp0_546, z_7);
0060d2b8              int64_t temp0_551 = __pfadd_mmxq_mmxq(temp0_548, temp0_545);
0060d2bc              int64_t temp0_552 = __pfmul_mmxq_mmxq(var_68_2, st1);
0060d2c0              int64_t temp0_553 = __pfadd_mmxq_mmxq(temp0_550, temp0_547);
0060d2c4              int64_t temp0_554 = __pfmul_mmxq_memq(st1, z_9);
0060d2ca              int64_t temp0_555 = __pfadd_mmxq_mmxq(temp0_552, temp0_551);
0060d2ce              int64_t temp0_556 = __pfmul_mmxq_mmxq(0, temp0_549);
0060d2d2              int64_t temp0_557 = __pfadd_mmxq_mmxq(temp0_553, temp0_554);
0060d2d6              int64_t temp0_558 = __pfmul_mmxq_memq(temp0_549, var_50_2);
0060d2dc              int64_t temp0_559 = __pfadd_mmxq_mmxq(temp0_556, temp0_555);
0060d2e0              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060d2e4              int64_t temp0_560 = __pfadd_mmxq_mmxq(temp0_558, temp0_557);
0060d2e8              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060d2ec              *(uint64_t*)((char*)result->__inner0 + 0x20) = temp0_559;
0060d2f5              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_560;
0060d2f9              int64_t temp0_561 = _m_punpckhdq(temp0_557, st0);
0060d301              int64_t temp0_562 = _m_punpckhdq(temp0_560, st1);
0060d309              st0 = _m_punpckldq(st0, st0);
0060d30c              st1 = _m_punpckldq(st1, st1);
0060d30f              int64_t temp0_565 = __pfmul_mmxq_mmxq(temp0_497, st0);
0060d313              int64_t temp0_566 = _m_punpckhdq(temp0_561, temp0_561);
0060d316              int64_t temp0_567 = __pfmul_mmxq_memq(st0, temp0_494);
0060d321              int64_t temp0_568 = __pfmul_mmxq_mmxq(z_2, temp0_566);
0060d325              int64_t temp0_569 = _m_punpckhdq(temp0_562, temp0_562);
0060d328              int64_t temp0_570 = __pfmul_mmxq_memq(temp0_566, z_7);
0060d32e              int64_t temp0_571 = __pfadd_mmxq_mmxq(temp0_568, temp0_565);
0060d332              int64_t temp0_572 = __pfmul_mmxq_mmxq(var_68_2, st1);
0060d336              int64_t temp0_573 = __pfadd_mmxq_mmxq(temp0_570, temp0_567);
0060d33a              int64_t temp0_574 = __pfmul_mmxq_memq(st1, z_9);
0060d340              int64_t temp0_575 = __pfadd_mmxq_mmxq(temp0_572, temp0_571);
0060d344              int64_t temp0_576 = __pfmul_mmxq_mmxq(0, temp0_569);
0060d348              int64_t temp0_577 = __pfadd_mmxq_mmxq(temp0_573, temp0_574);
0060d34c              int64_t temp0_578 = __pfmul_mmxq_memq(temp0_569, var_50_2);
0060d352              int64_t temp0_579 = __pfadd_mmxq_mmxq(temp0_576, temp0_575);
0060d356              int64_t temp0_580 = __pfadd_mmxq_mmxq(temp0_578, temp0_577);
0060d35a              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_579;
0060d35e              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_580;
0060d366              st1 = ((uint64_t)*(uint32_t*)((char*)result->__inner0 + 0x38));
0060d36a              z = arg5->x;
0060d36a              *(uint32_t*)((char*)z)[4] = arg5->y;
0060d36d              z_1 = ((uint64_t)arg5->z);
0060d371              int64_t temp0_581 = __pfadd_mmxq_mmxq(*(uint64_t*)((char*)result->__inner0 + 0x30), z);
0060d375              int64_t temp0_582 = __pfadd_mmxq_mmxq(st1, z_1);
0060d379              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_581;
0060d37d              *(uint32_t*)((char*)result->__inner0 + 0x38) = temp0_582;
0060d167          }
0060d091      }
0060d091      
0060d561      if (arg7 != 0)
0060d561      {
0060d567          st1 = ((uint64_t)*(uint32_t*)((char*)result->__inner0 + 0x38));
0060d56b          z = arg7->x;
0060d56b          *(uint32_t*)((char*)z)[4] = arg7->y;
0060d56e          z_1 = ((uint64_t)arg7->z);
0060d572          int64_t temp0_663 = __pfadd_mmxq_mmxq(*(uint64_t*)((char*)result->__inner0 + 0x30), z);
0060d576          int64_t temp0_664 = __pfadd_mmxq_mmxq(st1, z_1);
0060d57a          *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_663;
0060d57e          *(uint32_t*)((char*)result->__inner0 + 0x38) = temp0_664;
0060d561      }
0060d561      
0060d585      __femms();
0060d587      return result;
0060c38e  }


0060d58a  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixRotationYawPitchRoll(struct D3DXMATRIX* arg1, float arg2, float arg3, float arg4)

0060d58a  {
0060d5a9      int64_t temp0 = __pfmul_mmxq_memq(0x3f0000003f000000, arg4);
0060d5ae      int64_t temp0_1 = __pfmul_mmxq_memq(0x3f0000003f000000, arg2);
0060d5b8      _a_sincos();
0060d5c7      int64_t temp0_2 = _m_punpckhdq(temp0_1, temp0_1);
0060d5ca      _a_sincos();
0060d5d9      _a_sincos();
0060d5f8      int64_t st0 = _m_punpckldq(temp0_1, temp0_1);
0060d5fb      int64_t st3 = _m_punpckldq(temp0_1, temp0_1);
0060d5fe      int64_t temp0_5 = _m_punpckhdq(temp0_1, temp0_1);
0060d601      int64_t temp0_6 = _m_punpckhdq(temp0_1, temp0_1);
0060d607      uint64_t temp0_7 = _m_psrlqi(-0x8000000000000000, 0x20);
0060d60b      uint32_t st6[0x2] = temp0_2;
0060d60e      int64_t st2 = _m_punpckldq(temp0_2, temp0_2);
0060d611      st6 = _m_punpckhdq(st6, st6[0]);
0060d617      int64_t temp0_10 = __pfmul_mmxq_mmxq((st0 ^ 0x8000000000000000), st6);
0060d61b      int64_t temp0_11 = __pfmul_mmxq_mmxq(st3, st2);
0060d61f      int64_t temp0_12 = __pfmul_mmxq_mmxq(temp0_5, st2);
0060d623      int64_t temp0_13 = __pfmul_mmxq_mmxq((temp0_6 ^ temp0_7), st6);
0060d62d      int64_t st7 = _m_punpckldq(_m_punpckhdq(temp0, temp0), temp0);
0060d630      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_10, temp0);
0060d634      int64_t temp0_17 = __pfmul_mmxq_mmxq(temp0_11, st7);
0060d638      int64_t temp0_18 = __pfmul_mmxq_mmxq(temp0_12, st7);
0060d63c      int64_t temp0_19 = __pfmul_mmxq_mmxq(temp0_13, temp0);
0060d640      int64_t temp0_20 = __pfadd_mmxq_mmxq(temp0_16, temp0_18);
0060d644      int64_t temp0_21 = __pfadd_mmxq_mmxq(temp0_17, temp0_19);
0060d66c      int64_t temp0_22 = __pfadd_mmxq_mmxq(temp0_20, temp0_20);
0060d676      int64_t temp0_23 = __pfadd_mmxq_mmxq(temp0_21, temp0_21);
0060d67a      int64_t temp0_24 = _m_punpckhdq(temp0_20, temp0_20);
0060d680      int64_t temp0_25 = _m_punpckhdq(temp0_21, temp0_21);
0060d683      int64_t temp0_26 = __pfmul_mmxq_mmxq(temp0_20, temp0_22);
0060d687      int64_t st1 = _m_punpckldq(temp0_23, temp0_22);
0060d68a      st7 = _m_punpckldq(temp0_21, temp0_21);
0060d68d      int64_t temp0_29 = __pfmul_mmxq_mmxq(temp0_22, temp0_25);
0060d694      int64_t temp0_30 = __pfmul_mmxq_mmxq(st7, st1);
0060d698      int64_t temp0_31 = __pfmul_mmxq_mmxq(st1, temp0_24);
0060d69f      st6 = __pfmul_mmxq_mmxq(st1, temp0_25);
0060d6a6      int64_t temp0_33 = _m_punpckhdq(temp0_31, temp0_30);
0060d6a9      st7 = _m_punpckldq(temp0_30, temp0_30);
0060d6ac      uint32_t temp0_35[0x2] = _m_punpckldq(st6, st6[0]);
0060d6af      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = 0;
0060d6b3      int64_t temp0_36 = __pfadd_mmxq_mmxq(st7, temp0_26);
0060d6b7      int64_t temp0_37 = __pfacc_mmxq_mmxq(temp0_26, temp0_26);
0060d6be      st6 = _m_punpckhdq(temp0_35, temp0_29);
0060d6c1      int64_t temp0_39 = __pfsubr_mmxq_memq(temp0_37, 0x3f8000003f800000);
0060d6c9      int64_t temp0_40 = __pfsubr_mmxq_memq(temp0_36, 0x3f8000003f800000);
0060d6d1      st3 = _m_punpckldq(temp0_39, 0);
0060d6d4      int64_t temp0_42 = __pfadd_mmxq_mmxq(temp0_33, st6);
0060d6d8      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = st3;
0060d6dc      int64_t temp0_43 = __pfsub_mmxq_mmxq(temp0_33, st6);
0060d6e3      int64_t temp0_44 = __pfadd_mmxq_mmxq(temp0_31, temp0_29);
0060d6e7      int64_t temp0_45 = __pfsub_mmxq_mmxq(temp0_31, temp0_29);
0060d6ee      st2 = _m_punpckldq(temp0_44, 0);
0060d6f1      st6 = temp0_42;
0060d6f4      int64_t st4 = _m_punpckldq(temp0_43, temp0_40);
0060d6f7      st1 = _m_punpckldq(temp0_42, temp0_42);
0060d6fa      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = st2;
0060d6fe      int64_t temp0_49 = _m_punpckhdq(temp0_43, 0);
0060d701      st0 = __punpckldq_mmxq_memd(0, 0x3f800000);
0060d708      *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_49;
0060d70c      st6 = _m_punpckhdq(st6, st6[0]);
0060d70f      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = st4;
0060d713      int64_t temp0_52 = _m_punpckhdq(temp0_40, st1);
0060d716      uint32_t temp0_53[0x2] = _m_punpckldq(st6, temp0_45);
0060d719      *(uint64_t*)((char*)arg1->__inner0 + 0) = temp0_52;
0060d71c      *(uint32_t*)((char*)arg1->__inner0 + 0x20) = temp0_53[0];
0060d71c      *(uint32_t*)((char*)arg1->__inner0 + 0x24) = temp0_53[1];
0060d720      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = st0;
0060d72a      __femms();
0060d72c      return arg1;
0060d58a  }


0060d72f  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixAffineTransformation(struct D3DXMATRIX* arg1, float arg2, struct D3DXVECTOR3 const* arg3, struct D3DXQUATERNION const* arg4, struct D3DXVECTOR3 const* arg5)

0060d72f  {
0060d733      uint64_t st6 = ((uint64_t)arg2);
0060d74a      *(uint64_t*)((char*)arg1->__inner0 + 0) = st6;
0060d74d      *(uint64_t*)((char*)arg1->__inner0 + 8) = 0;
0060d751      *(uint32_t*)((char*)arg1->__inner0 + 0x10) = 0;
0060d758      *(uint32_t*)((char*)arg1->__inner0 + 0x14) = st6;
0060d75c      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = 0;
0060d762      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = 0;
0060d766      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = st6;
0060d76a      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = 0;
0060d76e      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = 0x3f80000000000000;
0060d772      int64_t st0;
0060d772      int64_t z;
0060d772      uint64_t z_1;
0060d772      
0060d772      if (arg4 != 0)
0060d772      {
0060d778          st0 = arg4->x;
0060d778          *(uint32_t*)((char*)st0)[4] = arg4->y;
0060d77b          z = arg4->z;
0060d77b          *(uint32_t*)((char*)z)[4] = arg4->w;
0060d785          int64_t temp0_1 = __pfadd_mmxq_mmxq(st0, st0);
0060d78c          int64_t z_3 = z;
0060d78f          int64_t temp0_2 = __pfadd_mmxq_mmxq(z, z);
0060d793          int64_t temp0_3 = _m_punpckhdq(st0, st0);
0060d799          int64_t temp0_4 = _m_punpckhdq(z, z);
0060d79c          int64_t temp0_5 = __pfmul_mmxq_mmxq(st0, temp0_1);
0060d7a0          z = _m_punpckldq(temp0_2, temp0_1);
0060d7a3          z_3 = _m_punpckldq(z_3, z_3);
0060d7a6          int64_t temp0_8 = __pfmul_mmxq_mmxq(temp0_1, temp0_4);
0060d7ad          int64_t temp0_9 = __pfmul_mmxq_mmxq(z_3, z);
0060d7b1          int64_t temp0_10 = __pfmul_mmxq_mmxq(z, temp0_3);
0060d7b8          int64_t temp0_11 = __pfmul_mmxq_mmxq(z, temp0_4);
0060d7bf          int64_t temp0_12 = _m_punpckhdq(temp0_10, temp0_9);
0060d7c2          z_3 = _m_punpckldq(temp0_9, temp0_9);
0060d7c5          st6 = _m_punpckldq(temp0_11, temp0_11);
0060d7cd          int64_t temp0_15 = __pfadd_mmxq_mmxq(z_3, temp0_5);
0060d7d1          int64_t temp0_16 = __pfacc_mmxq_mmxq(temp0_5, temp0_5);
0060d7d8          int64_t temp0_17 = _m_punpckhdq(st6, temp0_8);
0060d7db          int64_t temp0_18 = __pfsubr_mmxq_memq(temp0_16, 0x3f8000003f800000);
0060d7e3          int64_t temp0_19 = __pfsubr_mmxq_memq(temp0_15, 0x3f8000003f800000);
0060d7eb          z_1 = _m_punpckldq(temp0_18, 0);
0060d7ee          int64_t temp0_21 = __pfadd_mmxq_mmxq(temp0_12, temp0_17);
0060d7f2          uint64_t z_2 = z_1;
0060d7f7          int64_t temp0_22 = __pfsub_mmxq_mmxq(temp0_12, temp0_17);
0060d7fe          int64_t temp0_23 = __pfadd_mmxq_mmxq(temp0_10, temp0_8);
0060d802          int64_t temp0_24 = __pfsub_mmxq_mmxq(temp0_10, temp0_8);
0060d809          int64_t st2 = _m_punpckldq(temp0_23, 0);
0060d80f          int64_t st4 = _m_punpckldq(temp0_22, temp0_19);
0060d812          z = _m_punpckldq(temp0_21, temp0_21);
0060d815          int64_t var_28_1 = st2;
0060d81a          int64_t temp0_28 = _m_punpckhdq(temp0_22, 0);
0060d81d          st0 = __punpckldq_mmxq_memd(0, 0x3f800000);
0060d829          int64_t temp0_30 = _m_punpckhdq(temp0_21, temp0_21);
0060d831          int64_t temp0_31 = _m_punpckhdq(temp0_19, z);
0060d83b          uint64_t var_20_1 = _m_punpckldq(temp0_30, temp0_24);
0060d840          int64_t var_8_1 = st0;
0060d840          
0060d847          if (arg3 == 0)
0060d847          {
0060da62              st0 = *(uint64_t*)((char*)arg1->__inner0 + 0);
0060da65              z = *(uint64_t*)((char*)arg1->__inner0 + 8);
0060da6d              int64_t temp0_117 = _m_punpckhdq(st2, st0);
0060da75              int64_t temp0_118 = _m_punpckhdq(temp0_24, z);
0060da7d              st0 = _m_punpckldq(st0, st0);
0060da80              z = _m_punpckldq(z, z);
0060da83              int64_t temp0_121 = __pfmul_mmxq_mmxq(temp0_31, st0);
0060da87              int64_t temp0_122 = _m_punpckhdq(temp0_117, temp0_117);
0060da8a              int64_t temp0_123 = __pfmul_mmxq_memq(st0, temp0_28);
0060da95              int64_t temp0_124 = __pfmul_mmxq_mmxq(st4, temp0_122);
0060da99              int64_t temp0_125 = _m_punpckhdq(temp0_118, temp0_118);
0060da9c              int64_t temp0_126 = __pfmul_mmxq_memq(temp0_122, var_28_1);
0060daa2              int64_t temp0_127 = __pfadd_mmxq_mmxq(temp0_124, temp0_121);
0060daa6              int64_t temp0_128 = __pfmul_mmxq_mmxq(var_20_1, z);
0060daaa              int64_t temp0_129 = __pfadd_mmxq_mmxq(temp0_126, temp0_123);
0060daae              int64_t temp0_130 = __pfmul_mmxq_memq(z, z_2);
0060dab4              int64_t temp0_131 = __pfadd_mmxq_mmxq(temp0_128, temp0_127);
0060dab8              int64_t temp0_132 = __pfmul_mmxq_mmxq(0, temp0_125);
0060dabc              int64_t temp0_133 = __pfadd_mmxq_mmxq(temp0_129, temp0_130);
0060dac0              int64_t temp0_134 = __pfmul_mmxq_memq(temp0_125, var_8_1);
0060dac6              int64_t temp0_135 = __pfadd_mmxq_mmxq(temp0_132, temp0_131);
0060daca              st0 = *(uint64_t*)((char*)arg1->__inner0 + 0x10);
0060dace              int64_t temp0_136 = __pfadd_mmxq_mmxq(temp0_134, temp0_133);
0060dad2              z = *(uint64_t*)((char*)arg1->__inner0 + 0x18);
0060dad6              *(uint64_t*)((char*)arg1->__inner0 + 0) = temp0_135;
0060dadd              *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_136;
0060dae1              int64_t temp0_137 = _m_punpckhdq(temp0_133, st0);
0060dae9              int64_t temp0_138 = _m_punpckhdq(temp0_136, z);
0060daf1              st0 = _m_punpckldq(st0, st0);
0060daf4              z = _m_punpckldq(z, z);
0060daf7              int64_t temp0_141 = __pfmul_mmxq_mmxq(temp0_31, st0);
0060dafb              int64_t temp0_142 = _m_punpckhdq(temp0_137, temp0_137);
0060dafe              int64_t temp0_143 = __pfmul_mmxq_memq(st0, temp0_28);
0060db09              int64_t temp0_144 = __pfmul_mmxq_mmxq(st4, temp0_142);
0060db0d              int64_t temp0_145 = _m_punpckhdq(temp0_138, temp0_138);
0060db10              int64_t temp0_146 = __pfmul_mmxq_memq(temp0_142, var_28_1);
0060db16              int64_t temp0_147 = __pfadd_mmxq_mmxq(temp0_144, temp0_141);
0060db1a              int64_t temp0_148 = __pfmul_mmxq_mmxq(var_20_1, z);
0060db1e              int64_t temp0_149 = __pfadd_mmxq_mmxq(temp0_146, temp0_143);
0060db22              int64_t temp0_150 = __pfmul_mmxq_memq(z, z_2);
0060db28              int64_t temp0_151 = __pfadd_mmxq_mmxq(temp0_148, temp0_147);
0060db2c              int64_t temp0_152 = __pfmul_mmxq_mmxq(0, temp0_145);
0060db30              int64_t temp0_153 = __pfadd_mmxq_mmxq(temp0_149, temp0_150);
0060db34              int64_t temp0_154 = __pfmul_mmxq_memq(temp0_145, var_8_1);
0060db3a              int64_t temp0_155 = __pfadd_mmxq_mmxq(temp0_152, temp0_151);
0060db3e              st0 = *(uint64_t*)((char*)arg1->__inner0 + 0x20);
0060db42              int64_t temp0_156 = __pfadd_mmxq_mmxq(temp0_154, temp0_153);
0060db46              z = *(uint64_t*)((char*)arg1->__inner0 + 0x28);
0060db4a              *(uint64_t*)((char*)arg1->__inner0 + 0x10) = temp0_155;
0060db52              *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0_156;
0060db56              int64_t temp0_157 = _m_punpckhdq(temp0_153, st0);
0060db5e              int64_t temp0_158 = _m_punpckhdq(temp0_156, z);
0060db66              st0 = _m_punpckldq(st0, st0);
0060db69              z = _m_punpckldq(z, z);
0060db6c              int64_t temp0_161 = __pfmul_mmxq_mmxq(temp0_31, st0);
0060db70              int64_t temp0_162 = _m_punpckhdq(temp0_157, temp0_157);
0060db73              int64_t temp0_163 = __pfmul_mmxq_memq(st0, temp0_28);
0060db7e              int64_t temp0_164 = __pfmul_mmxq_mmxq(st4, temp0_162);
0060db82              int64_t temp0_165 = _m_punpckhdq(temp0_158, temp0_158);
0060db85              int64_t temp0_166 = __pfmul_mmxq_memq(temp0_162, var_28_1);
0060db8b              int64_t temp0_167 = __pfadd_mmxq_mmxq(temp0_164, temp0_161);
0060db8f              int64_t temp0_168 = __pfmul_mmxq_mmxq(var_20_1, z);
0060db93              int64_t temp0_169 = __pfadd_mmxq_mmxq(temp0_166, temp0_163);
0060db97              int64_t temp0_170 = __pfmul_mmxq_memq(z, z_2);
0060db9d              int64_t temp0_171 = __pfadd_mmxq_mmxq(temp0_168, temp0_167);
0060dba1              int64_t temp0_172 = __pfmul_mmxq_mmxq(0, temp0_165);
0060dba5              int64_t temp0_173 = __pfadd_mmxq_mmxq(temp0_169, temp0_170);
0060dba9              int64_t temp0_174 = __pfmul_mmxq_memq(temp0_165, var_8_1);
0060dbaf              int64_t temp0_175 = __pfadd_mmxq_mmxq(temp0_172, temp0_171);
0060dbb3              st0 = *(uint64_t*)((char*)arg1->__inner0 + 0x30);
0060dbb7              int64_t temp0_176 = __pfadd_mmxq_mmxq(temp0_174, temp0_173);
0060dbbb              z = *(uint64_t*)((char*)arg1->__inner0 + 0x38);
0060dbbf              *(uint64_t*)((char*)arg1->__inner0 + 0x20) = temp0_175;
0060dbc7              *(uint64_t*)((char*)arg1->__inner0 + 0x28) = temp0_176;
0060dbcb              int64_t temp0_177 = _m_punpckhdq(temp0_173, st0);
0060dbd3              int64_t temp0_178 = _m_punpckhdq(temp0_176, z);
0060dbdb              st0 = _m_punpckldq(st0, st0);
0060dbde              z = _m_punpckldq(z, z);
0060dbe1              int64_t temp0_181 = __pfmul_mmxq_mmxq(temp0_31, st0);
0060dbe5              int64_t temp0_182 = _m_punpckhdq(temp0_177, temp0_177);
0060dbe8              int64_t temp0_183 = __pfmul_mmxq_memq(st0, temp0_28);
0060dbf3              int64_t temp0_184 = __pfmul_mmxq_mmxq(st4, temp0_182);
0060dbf7              int64_t temp0_185 = _m_punpckhdq(temp0_178, temp0_178);
0060dbfa              int64_t temp0_186 = __pfmul_mmxq_memq(temp0_182, var_28_1);
0060dc00              int64_t temp0_187 = __pfadd_mmxq_mmxq(temp0_184, temp0_181);
0060dc04              int64_t temp0_188 = __pfmul_mmxq_mmxq(var_20_1, z);
0060dc08              int64_t temp0_189 = __pfadd_mmxq_mmxq(temp0_186, temp0_183);
0060dc0c              int64_t temp0_190 = __pfmul_mmxq_memq(z, z_2);
0060dc12              int64_t temp0_191 = __pfadd_mmxq_mmxq(temp0_188, temp0_187);
0060dc16              int64_t temp0_192 = __pfmul_mmxq_mmxq(0, temp0_185);
0060dc1a              int64_t temp0_193 = __pfadd_mmxq_mmxq(temp0_189, temp0_190);
0060dc1e              int64_t temp0_194 = __pfmul_mmxq_memq(temp0_185, var_8_1);
0060dc24              int64_t temp0_195 = __pfadd_mmxq_mmxq(temp0_192, temp0_191);
0060dc28              int64_t temp0_196 = __pfadd_mmxq_mmxq(temp0_194, temp0_193);
0060dc2c              *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_195;
0060dc30              *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_196;
0060d847          }
0060d847          else
0060d847          {
0060d851              z = ((uint64_t)*(uint32_t*)((char*)arg1->__inner0 + 0x38));
0060d855              st2 = arg3->x;
0060d855              *(uint32_t*)((char*)st2)[4] = arg3->y;
0060d858              z_1 = ((uint64_t)arg3->z);
0060d85c              int64_t temp0_33 = __pfsub_mmxq_mmxq(*(uint64_t*)((char*)arg1->__inner0 + 0x30), st2);
0060d860              int64_t temp0_34 = __pfsub_mmxq_mmxq(z, z_1);
0060d864              *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_33;
0060d868              *(uint32_t*)((char*)arg1->__inner0 + 0x38) = temp0_34;
0060d86c              st0 = *(uint64_t*)((char*)arg1->__inner0 + 0);
0060d86f              z = *(uint64_t*)((char*)arg1->__inner0 + 8);
0060d877              int64_t temp0_35 = _m_punpckhdq(st2, st0);
0060d87f              int64_t temp0_36 = _m_punpckhdq(z_1, z);
0060d887              st0 = _m_punpckldq(st0, st0);
0060d88a              z = _m_punpckldq(z, z);
0060d88d              int64_t temp0_39 = __pfmul_mmxq_mmxq(temp0_31, st0);
0060d891              int64_t temp0_40 = _m_punpckhdq(temp0_35, temp0_35);
0060d894              int64_t temp0_41 = __pfmul_mmxq_memq(st0, temp0_28);
0060d89f              int64_t temp0_42 = __pfmul_mmxq_mmxq(st4, temp0_40);
0060d8a3              int64_t temp0_43 = _m_punpckhdq(temp0_36, temp0_36);
0060d8a6              int64_t temp0_44 = __pfmul_mmxq_memq(temp0_40, var_28_1);
0060d8ac              int64_t temp0_45 = __pfadd_mmxq_mmxq(temp0_42, temp0_39);
0060d8b0              int64_t temp0_46 = __pfmul_mmxq_mmxq(var_20_1, z);
0060d8b4              int64_t temp0_47 = __pfadd_mmxq_mmxq(temp0_44, temp0_41);
0060d8b8              int64_t temp0_48 = __pfmul_mmxq_memq(z, z_2);
0060d8be              int64_t temp0_49 = __pfadd_mmxq_mmxq(temp0_46, temp0_45);
0060d8c2              int64_t temp0_50 = __pfmul_mmxq_mmxq(0, temp0_43);
0060d8c6              int64_t temp0_51 = __pfadd_mmxq_mmxq(temp0_47, temp0_48);
0060d8ca              int64_t temp0_52 = __pfmul_mmxq_memq(temp0_43, var_8_1);
0060d8d0              int64_t temp0_53 = __pfadd_mmxq_mmxq(temp0_50, temp0_49);
0060d8d4              st0 = *(uint64_t*)((char*)arg1->__inner0 + 0x10);
0060d8d8              int64_t temp0_54 = __pfadd_mmxq_mmxq(temp0_52, temp0_51);
0060d8dc              z = *(uint64_t*)((char*)arg1->__inner0 + 0x18);
0060d8e0              *(uint64_t*)((char*)arg1->__inner0 + 0) = temp0_53;
0060d8e7              *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_54;
0060d8eb              int64_t temp0_55 = _m_punpckhdq(temp0_51, st0);
0060d8f3              int64_t temp0_56 = _m_punpckhdq(temp0_54, z);
0060d8fb              st0 = _m_punpckldq(st0, st0);
0060d8fe              z = _m_punpckldq(z, z);
0060d901              int64_t temp0_59 = __pfmul_mmxq_mmxq(temp0_31, st0);
0060d905              int64_t temp0_60 = _m_punpckhdq(temp0_55, temp0_55);
0060d908              int64_t temp0_61 = __pfmul_mmxq_memq(st0, temp0_28);
0060d913              int64_t temp0_62 = __pfmul_mmxq_mmxq(st4, temp0_60);
0060d917              int64_t temp0_63 = _m_punpckhdq(temp0_56, temp0_56);
0060d91a              int64_t temp0_64 = __pfmul_mmxq_memq(temp0_60, var_28_1);
0060d920              int64_t temp0_65 = __pfadd_mmxq_mmxq(temp0_62, temp0_59);
0060d924              int64_t temp0_66 = __pfmul_mmxq_mmxq(var_20_1, z);
0060d928              int64_t temp0_67 = __pfadd_mmxq_mmxq(temp0_64, temp0_61);
0060d92c              int64_t temp0_68 = __pfmul_mmxq_memq(z, z_2);
0060d932              int64_t temp0_69 = __pfadd_mmxq_mmxq(temp0_66, temp0_65);
0060d936              int64_t temp0_70 = __pfmul_mmxq_mmxq(0, temp0_63);
0060d93a              int64_t temp0_71 = __pfadd_mmxq_mmxq(temp0_67, temp0_68);
0060d93e              int64_t temp0_72 = __pfmul_mmxq_memq(temp0_63, var_8_1);
0060d944              int64_t temp0_73 = __pfadd_mmxq_mmxq(temp0_70, temp0_69);
0060d948              st0 = *(uint64_t*)((char*)arg1->__inner0 + 0x20);
0060d94c              int64_t temp0_74 = __pfadd_mmxq_mmxq(temp0_72, temp0_71);
0060d950              z = *(uint64_t*)((char*)arg1->__inner0 + 0x28);
0060d954              *(uint64_t*)((char*)arg1->__inner0 + 0x10) = temp0_73;
0060d95c              *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0_74;
0060d960              int64_t temp0_75 = _m_punpckhdq(temp0_71, st0);
0060d968              int64_t temp0_76 = _m_punpckhdq(temp0_74, z);
0060d970              st0 = _m_punpckldq(st0, st0);
0060d973              z = _m_punpckldq(z, z);
0060d976              int64_t temp0_79 = __pfmul_mmxq_mmxq(temp0_31, st0);
0060d97a              int64_t temp0_80 = _m_punpckhdq(temp0_75, temp0_75);
0060d97d              int64_t temp0_81 = __pfmul_mmxq_memq(st0, temp0_28);
0060d988              int64_t temp0_82 = __pfmul_mmxq_mmxq(st4, temp0_80);
0060d98c              int64_t temp0_83 = _m_punpckhdq(temp0_76, temp0_76);
0060d98f              int64_t temp0_84 = __pfmul_mmxq_memq(temp0_80, var_28_1);
0060d995              int64_t temp0_85 = __pfadd_mmxq_mmxq(temp0_82, temp0_79);
0060d999              int64_t temp0_86 = __pfmul_mmxq_mmxq(var_20_1, z);
0060d99d              int64_t temp0_87 = __pfadd_mmxq_mmxq(temp0_84, temp0_81);
0060d9a1              int64_t temp0_88 = __pfmul_mmxq_memq(z, z_2);
0060d9a7              int64_t temp0_89 = __pfadd_mmxq_mmxq(temp0_86, temp0_85);
0060d9ab              int64_t temp0_90 = __pfmul_mmxq_mmxq(0, temp0_83);
0060d9af              int64_t temp0_91 = __pfadd_mmxq_mmxq(temp0_87, temp0_88);
0060d9b3              int64_t temp0_92 = __pfmul_mmxq_memq(temp0_83, var_8_1);
0060d9b9              int64_t temp0_93 = __pfadd_mmxq_mmxq(temp0_90, temp0_89);
0060d9bd              st0 = *(uint64_t*)((char*)arg1->__inner0 + 0x30);
0060d9c1              int64_t temp0_94 = __pfadd_mmxq_mmxq(temp0_92, temp0_91);
0060d9c5              z = *(uint64_t*)((char*)arg1->__inner0 + 0x38);
0060d9c9              *(uint64_t*)((char*)arg1->__inner0 + 0x20) = temp0_93;
0060d9d1              *(uint64_t*)((char*)arg1->__inner0 + 0x28) = temp0_94;
0060d9d5              int64_t temp0_95 = _m_punpckhdq(temp0_91, st0);
0060d9dd              int64_t temp0_96 = _m_punpckhdq(temp0_94, z);
0060d9e5              st0 = _m_punpckldq(st0, st0);
0060d9e8              z = _m_punpckldq(z, z);
0060d9eb              int64_t temp0_99 = __pfmul_mmxq_mmxq(temp0_31, st0);
0060d9ef              int64_t temp0_100 = _m_punpckhdq(temp0_95, temp0_95);
0060d9f2              int64_t temp0_101 = __pfmul_mmxq_memq(st0, temp0_28);
0060d9fd              int64_t temp0_102 = __pfmul_mmxq_mmxq(st4, temp0_100);
0060da01              int64_t temp0_103 = _m_punpckhdq(temp0_96, temp0_96);
0060da04              int64_t temp0_104 = __pfmul_mmxq_memq(temp0_100, var_28_1);
0060da0a              int64_t temp0_105 = __pfadd_mmxq_mmxq(temp0_102, temp0_99);
0060da0e              int64_t temp0_106 = __pfmul_mmxq_mmxq(var_20_1, z);
0060da12              int64_t temp0_107 = __pfadd_mmxq_mmxq(temp0_104, temp0_101);
0060da16              int64_t temp0_108 = __pfmul_mmxq_memq(z, z_2);
0060da1c              int64_t temp0_109 = __pfadd_mmxq_mmxq(temp0_106, temp0_105);
0060da20              int64_t temp0_110 = __pfmul_mmxq_mmxq(0, temp0_103);
0060da24              int64_t temp0_111 = __pfadd_mmxq_mmxq(temp0_107, temp0_108);
0060da28              int64_t temp0_112 = __pfmul_mmxq_memq(temp0_103, var_8_1);
0060da2e              int64_t temp0_113 = __pfadd_mmxq_mmxq(temp0_110, temp0_109);
0060da32              int64_t temp0_114 = __pfadd_mmxq_mmxq(temp0_112, temp0_111);
0060da36              *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_113;
0060da3a              *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_114;
0060da42              z = ((uint64_t)*(uint32_t*)((char*)arg1->__inner0 + 0x38));
0060da46              st2 = arg3->x;
0060da46              *(uint32_t*)((char*)st2)[4] = arg3->y;
0060da49              z_1 = ((uint64_t)arg3->z);
0060da4d              int64_t temp0_115 = __pfadd_mmxq_mmxq(*(uint64_t*)((char*)arg1->__inner0 + 0x30), st2);
0060da51              int64_t temp0_116 = __pfadd_mmxq_mmxq(z, z_1);
0060da55              *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_115;
0060da59              *(uint32_t*)((char*)arg1->__inner0 + 0x38) = temp0_116;
0060d847          }
0060d772      }
0060d772      
0060dc3a      if (arg5 != 0)
0060dc3a      {
0060dc3c          st0 = arg5->x;
0060dc3c          *(uint32_t*)((char*)st0)[4] = arg5->y;
0060dc3f          z = ((uint64_t)arg5->z);
0060dc47          z_1 = ((uint64_t)*(uint32_t*)((char*)arg1->__inner0 + 0x38));
0060dc4b          int64_t temp0_197 = __pfadd_mmxq_mmxq(st0, *(uint64_t*)((char*)arg1->__inner0 + 0x30));
0060dc4f          int64_t temp0_198 = __pfadd_mmxq_mmxq(z, z_1);
0060dc53          *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_197;
0060dc57          *(uint32_t*)((char*)arg1->__inner0 + 0x38) = temp0_198;
0060dc3a      }
0060dc3a      
0060dc5e      __femms();
0060dc60      return arg1;
0060d72f  }


0060dc63  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixRotationAxis(struct D3DXMATRIX* arg1, struct D3DXVECTOR3 const* arg2, float arg3)

0060dc63  {
0060dc74      uint64_t z_2;
0060dc74      z_2 = arg2->x;
0060dc74      *(uint32_t*)((char*)z_2)[4] = arg2->y;
0060dc77      uint64_t z = ((uint64_t)arg2->z);
0060dc83      int64_t z_3 = z_2;
0060dc87      int32_t var_18 = z;
0060dc8e      x3d_D3DXVec3Normalize(&z_3, &z_3);
0060dc93      z_2 = ((uint64_t)arg3);
0060dc97      _a_sincos();
0060dc9f      z = z_2;
0060dca2      int64_t temp0 = __pfsubr_mmxq_memq(z_2, 0x3f8000003f800000);
0060dcaa      int64_t temp0_1 = _m_punpckhdq(z_2, z_2);
0060dcad      int64_t z_4 = z_3;
0060dcb1      uint64_t st3 = ((uint64_t)var_18);
0060dcb9      int64_t st5 = st3;
0060dcbc      int32_t z_1 = temp0_1;
0060dcc1      uint64_t st7 = st3;
0060dcc4      st3 = _m_punpckldq(st3, st3);
0060dcce      int64_t temp0_3 = _m_punpckhdq(z_4, st3);
0060dcd1      int64_t temp0_4 = __pfmul_mmxq_mmxq(st3, z_4);
0060dcd5      z_2 = _m_punpckldq(temp0, temp0);
0060dcd8      int64_t temp0_6 = __pfmul_mmxq_mmxq(temp0_3, z_4);
0060dcdc      z = _m_punpckldq(z, z);
0060dcdf      int64_t temp0_8 = __pfmul_mmxq_mmxq(temp0_6, z_2);
0060dce3      int64_t* result = arg1;
0060dce6      int64_t temp0_9 = __pfmul_mmxq_mmxq(temp0_4, z_2);
0060dcea      int64_t temp0_10 = __pfmul_mmxq_mmxq(z_4, z_4);
0060dcee      int64_t temp0_11 = __pfmul_mmxq_mmxq(st5, st5);
0060dcf2      int64_t temp0_12 = __pfmul_mmxq_mmxq(temp0_10, z_2);
0060dcfa      int64_t temp0_13 = __pfmul_mmxq_mmxq(temp0_11, z_2);
0060dcfe      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_12, z);
0060dd02      int64_t temp0_15 = __pfadd_mmxq_mmxq(temp0_13, z);
0060dd06      z = ((uint64_t)z_1);
0060dd0e      z = _m_punpckldq(z, z);
0060dd11      int64_t temp0_17 = __pfmul_mmxq_mmxq(z_4, z);
0060dd15      st5 = _m_punpckldq(temp0_15, 0);
0060dd18      int64_t temp0_19 = __pfmul_mmxq_mmxq(st7, z);
0060dd1c      result[6] = 0;
0060dd20      st7 = _m_punpckldq(temp0_19, temp0_17);
0060dd26      int64_t temp0_21 = _m_punpckhdq(temp0_17, temp0_17);
0060dd29      result[5] = st5;
0060dd2d      int64_t temp0_22 = __pfsub_mmxq_mmxq(temp0_8, st7);
0060dd31      int64_t temp0_23 = __pfadd_mmxq_mmxq(temp0_8, st7);
0060dd38      int64_t temp0_24 = __pfsub_mmxq_mmxq(temp0_9, temp0_21);
0060dd3f      int64_t st4 = _m_punpckldq(temp0_14, temp0_23);
0060dd42      st3 = _m_punpckldq(temp0_24, 0);
0060dd45      int64_t temp0_27 = _m_punpckhdq(temp0_23, 0);
0060dd48      *(uint64_t*)result = st4;
0060dd4b      st7 = _m_punpckldq(temp0_9, temp0_9);
0060dd4e      result[1] = st3;
0060dd52      int64_t temp0_29 = __punpckhdq_mmxq_memq(0, 0x3f8000003f800000);
0060dd59      int64_t temp0_30 = __pfadd_mmxq_mmxq(st7, temp0_21);
0060dd5d      result[3] = temp0_27;
0060dd61      int64_t temp0_31 = _m_punpckhdq(temp0_14, temp0_14);
0060dd64      result[7] = temp0_29;
0060dd68      int64_t temp0_32 = _m_punpckhdq(temp0_30, temp0_22);
0060dd6b      z_4 = _m_punpckldq(temp0_22, temp0_31);
0060dd6e      result[4] = temp0_32;
0060dd72      result[2] = z_4;
0060dd79      __femms();
0060dd7b      return result;
0060dc63  }


0060dd7e  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixTransformation_K7(struct D3DXMATRIX* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXQUATERNION const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, struct D3DXQUATERNION const* arg6, struct D3DXVECTOR3 const* arg7)

0060dd7e  {
0060dd94      struct D3DXMATRIX* result = arg1;
0060dd97      int64_t st0;
0060dd97      uint64_t st1;
0060dd97      uint64_t z;
0060dd97      uint64_t z_1;
0060dd97      int64_t st5;
0060dd97      int64_t st6;
0060dd97      uint32_t st7[0x2];
0060dd97      
0060dd97      if (arg4 == 0)
0060dd97      {
0060ea2f          int64_t temp0_457 = __pswapd_mmxq_mmxq(z, 0x3f800000);
0060ea33          *(uint64_t*)((char*)result->__inner0 + 0) = 0x3f800000;
0060ea36          *(uint64_t*)((char*)result->__inner0 + 8) = 0;
0060ea3a          *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_457;
0060ea3e          *(uint64_t*)((char*)result->__inner0 + 0x18) = 0;
0060ea42          *(uint64_t*)((char*)result->__inner0 + 0x20) = 0;
0060ea46          *(uint64_t*)((char*)result->__inner0 + 0x28) = 0x3f800000;
0060ea4a          *(uint64_t*)((char*)result->__inner0 + 0x30) = 0;
0060ea4e          *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_457;
0060dd97      }
0060dd97      else
0060dd97      {
0060dd9f          uint64_t z_2;
0060dd9f          
0060dd9f          if (arg3 != 0)
0060dd9f          {
0060ddac              z = arg4->x;
0060ddac              *(uint32_t*)((char*)z)[4] = arg4->y;
0060ddaf              z_2 = ((uint64_t)arg4->z);
0060ddb6              z_1 = z;
0060ddb9              z = _m_punpckldq(z, 0);
0060ddbf              int64_t temp0_1 = _m_punpckhdq(0, z_1);
0060ddc2              uint64_t z_3 = z;
0060ddda              uint64_t z_4 = z_2;
0060dded              st0 = arg3->x;
0060dded              *(uint32_t*)((char*)st0)[4] = arg3->y;
0060ddf0              st1 = arg3->z;
0060ddf0              *(uint32_t*)((char*)st1)[4] = arg3->w;
0060ddf4              int64_t temp0_2 = __pswapd_mmxq_mmxq(z_1, st0);
0060ddfe              int64_t temp0_3 = __pfadd_mmxq_mmxq(st0, st0);
0060de05              int64_t temp0_4 = _m_punpckhdq(st0, st1);
0060de08              int64_t temp0_5 = __pfadd_mmxq_mmxq(st1, st1);
0060de0f              int64_t temp0_6 = __pfmul_mmxq_mmxq(temp0_3, st0);
0060de13              st5 = _m_punpckldq(temp0_3, temp0_5);
0060de16              int64_t temp0_8 = __pfmul_mmxq_mmxq(st0, temp0_5);
0060de1a              int64_t temp0_9 = __pfmul_mmxq_mmxq(temp0_2, temp0_5);
0060de1e              int64_t temp0_10 = __pfmul_mmxq_mmxq(temp0_5, st1);
0060de22              int64_t temp0_11 = __pfmul_mmxq_mmxq(temp0_4, st5);
0060de29              int64_t temp0_12 = __pfsubr_mmxq_memq(temp0_6, 0x3f8000003f800000);
0060de34              st1 = _m_punpckldq(temp0_10, temp0_10);
0060de37              int64_t temp0_14 = __pfpnacc_mmxq_mmxq(temp0_9, temp0_9);
0060de3b              int64_t temp0_15 = __pfacc_mmxq_mmxq(temp0_6, temp0_6);
0060de3f              int64_t temp0_16 = __pfpnacc_mmxq_mmxq(temp0_11, temp0_11);
0060de43              int64_t temp0_17 = __pfpnacc_mmxq_mmxq(temp0_8, temp0_8);
0060de47              int64_t temp0_18 = __pfsub_mmxq_mmxq(temp0_12, st1);
0060de4b              int64_t temp0_19 = __pswapd_mmxq_mmxq(temp0_10, temp0_17);
0060de4f              int64_t temp0_20 = __pfsubr_mmxq_memq(temp0_15, 0x3f8000003f800000);
0060de61              st5 = _m_punpckldq(temp0_19, temp0_14);
0060de64              z = _m_punpckldq(temp0_17, 0);
0060de67              int64_t temp0_23 = _m_punpckhdq(temp0_20, 0);
0060de6a              int64_t temp0_24 = _m_punpckhdq(temp0_18, temp0_16);
0060de71              int64_t temp0_25 = _m_punpckhdq(temp0_14, 0);
0060de74              uint64_t z_5 = z;
0060de78              st6 = _m_punpckldq(temp0_16, temp0_18);
0060de7f              uint32_t z_8[0x2] = __punpckldq_mmxq_memd(0, 0x3f800000);
0060de89              int64_t var_78_1 = st6;
0060de89              
0060de9a              if (arg2 == 0)
0060de9a              {
0060e56d                  result = arg1;
0060e57f                  z_2 = z_8;
0060e587                  st0 = _m_punpckldq(temp0_24, var_78_1);
0060e58a                  int64_t temp0_281 = _m_punpckhdq(temp0_24, var_78_1);
0060e590                  *(uint64_t*)((char*)result->__inner0 + 0) = st0;
0060e593                  *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_281;
0060e59c                  z_1 = _m_punpckldq(temp0_23, z_2);
0060e59f                  st7 = temp0_25;
0060e5a9                  int64_t temp0_283 = _m_punpckhdq(temp0_23, z_2);
0060e5af                  *(uint64_t*)((char*)result->__inner0 + 0x28) = z_1;
0060e5b3                  *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_283;
0060e5b7                  st6 = _m_punpckldq(z_5, st7[0]);
0060e5c2                  int64_t temp0_285 = _m_punpckhdq(z_5, st7[0]);
0060e5c5                  *(uint64_t*)((char*)result->__inner0 + 0x20) = st6;
0060e5c9                  int64_t temp0_286 = _m_punpckhdq(st5, 0);
0060e5cc                  z = _m_punpckldq(st5, 0);
0060e5cf                  *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_285;
0060e5d3                  *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_286;
0060e5d7                  *(uint64_t*)((char*)result->__inner0 + 8) = z;
0060e5db                  st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060e5de                  st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060e5e6                  int64_t temp0_288 = _m_punpckhdq(z, st0);
0060e5ee                  int64_t temp0_289 = _m_punpckhdq(z_1, st1);
0060e5f6                  st0 = _m_punpckldq(st0, st0);
0060e5f9                  st1 = _m_punpckldq(st1, st1);
0060e5fc                  int64_t temp0_292 = __pfmul_mmxq_mmxq(z_3, st0);
0060e600                  int64_t temp0_293 = _m_punpckhdq(temp0_288, temp0_288);
0060e603                  int64_t temp0_294 = __pfmul_mmxq_memq(st0, 0);
0060e60e                  int64_t temp0_295 = __pfmul_mmxq_mmxq(temp0_1, temp0_293);
0060e612                  int64_t temp0_296 = _m_punpckhdq(temp0_289, temp0_289);
0060e615                  int64_t temp0_297 = __pfmul_mmxq_memq(temp0_293, 0);
0060e61b                  int64_t temp0_298 = __pfadd_mmxq_mmxq(temp0_295, temp0_292);
0060e61f                  int64_t temp0_299 = __pfmul_mmxq_mmxq(0, st1);
0060e623                  int64_t temp0_300 = __pfadd_mmxq_mmxq(temp0_297, temp0_294);
0060e627                  int64_t temp0_301 = __pfmul_mmxq_memq(st1, z_4);
0060e62d                  int64_t temp0_302 = __pfadd_mmxq_mmxq(temp0_299, temp0_298);
0060e631                  st7 = __pfmul_mmxq_mmxq(0, temp0_296);
0060e635                  int64_t temp0_304 = __pfadd_mmxq_mmxq(temp0_300, temp0_301);
0060e639                  int64_t temp0_305 = __pfmul_mmxq_memq(temp0_296, 0x3f80000000000000);
0060e63f                  st7 = __pfadd_mmxq_mmxq(st7, temp0_302);
0060e643                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060e647                  int64_t temp0_307 = __pfadd_mmxq_mmxq(temp0_305, temp0_304);
0060e64b                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060e64f                  *(uint32_t*)((char*)result->__inner0 + 0) = st7[0];
0060e64f                  *(uint32_t*)((char*)result->__inner0 + 4) = st7[1];
0060e656                  *(uint64_t*)((char*)result->__inner0 + 8) = temp0_307;
0060e65a                  int64_t temp0_308 = _m_punpckhdq(temp0_304, st0);
0060e662                  int64_t temp0_309 = _m_punpckhdq(temp0_307, st1);
0060e66a                  st0 = _m_punpckldq(st0, st0);
0060e66d                  st1 = _m_punpckldq(st1, st1);
0060e670                  int64_t temp0_312 = __pfmul_mmxq_mmxq(z_3, st0);
0060e674                  int64_t temp0_313 = _m_punpckhdq(temp0_308, temp0_308);
0060e677                  int64_t temp0_314 = __pfmul_mmxq_memq(st0, 0);
0060e682                  int64_t temp0_315 = __pfmul_mmxq_mmxq(temp0_1, temp0_313);
0060e686                  int64_t temp0_316 = _m_punpckhdq(temp0_309, temp0_309);
0060e689                  int64_t temp0_317 = __pfmul_mmxq_memq(temp0_313, 0);
0060e68f                  int64_t temp0_318 = __pfadd_mmxq_mmxq(temp0_315, temp0_312);
0060e693                  int64_t temp0_319 = __pfmul_mmxq_mmxq(0, st1);
0060e697                  int64_t temp0_320 = __pfadd_mmxq_mmxq(temp0_317, temp0_314);
0060e69b                  int64_t temp0_321 = __pfmul_mmxq_memq(st1, z_4);
0060e6a1                  int64_t temp0_322 = __pfadd_mmxq_mmxq(temp0_319, temp0_318);
0060e6a5                  st7 = __pfmul_mmxq_mmxq(0, temp0_316);
0060e6a9                  int64_t temp0_324 = __pfadd_mmxq_mmxq(temp0_320, temp0_321);
0060e6ad                  int64_t temp0_325 = __pfmul_mmxq_memq(temp0_316, 0x3f80000000000000);
0060e6b3                  st7 = __pfadd_mmxq_mmxq(st7, temp0_322);
0060e6b7                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060e6bb                  int64_t temp0_327 = __pfadd_mmxq_mmxq(temp0_325, temp0_324);
0060e6bf                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060e6c3                  *(uint32_t*)((char*)result->__inner0 + 0x10) = st7[0];
0060e6c3                  *(uint32_t*)((char*)result->__inner0 + 0x14) = st7[1];
0060e6cb                  *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_327;
0060e6cf                  int64_t temp0_328 = _m_punpckhdq(temp0_324, st0);
0060e6d7                  int64_t temp0_329 = _m_punpckhdq(temp0_327, st1);
0060e6df                  st0 = _m_punpckldq(st0, st0);
0060e6e2                  st1 = _m_punpckldq(st1, st1);
0060e6e5                  int64_t temp0_332 = __pfmul_mmxq_mmxq(z_3, st0);
0060e6e9                  int64_t temp0_333 = _m_punpckhdq(temp0_328, temp0_328);
0060e6ec                  int64_t temp0_334 = __pfmul_mmxq_memq(st0, 0);
0060e6f7                  int64_t temp0_335 = __pfmul_mmxq_mmxq(temp0_1, temp0_333);
0060e6fb                  int64_t temp0_336 = _m_punpckhdq(temp0_329, temp0_329);
0060e6fe                  int64_t temp0_337 = __pfmul_mmxq_memq(temp0_333, 0);
0060e704                  int64_t temp0_338 = __pfadd_mmxq_mmxq(temp0_335, temp0_332);
0060e708                  int64_t temp0_339 = __pfmul_mmxq_mmxq(0, st1);
0060e70c                  int64_t temp0_340 = __pfadd_mmxq_mmxq(temp0_337, temp0_334);
0060e710                  int64_t temp0_341 = __pfmul_mmxq_memq(st1, z_4);
0060e716                  int64_t temp0_342 = __pfadd_mmxq_mmxq(temp0_339, temp0_338);
0060e71a                  st7 = __pfmul_mmxq_mmxq(0, temp0_336);
0060e71e                  int64_t temp0_344 = __pfadd_mmxq_mmxq(temp0_340, temp0_341);
0060e722                  int64_t temp0_345 = __pfmul_mmxq_memq(temp0_336, 0x3f80000000000000);
0060e728                  st7 = __pfadd_mmxq_mmxq(st7, temp0_342);
0060e72c                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060e730                  int64_t temp0_347 = __pfadd_mmxq_mmxq(temp0_345, temp0_344);
0060e734                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060e738                  *(uint32_t*)((char*)result->__inner0 + 0x20) = st7[0];
0060e738                  *(uint32_t*)((char*)result->__inner0 + 0x24) = st7[1];
0060e740                  *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_347;
0060e744                  int64_t temp0_348 = _m_punpckhdq(temp0_344, st0);
0060e74c                  int64_t temp0_349 = _m_punpckhdq(temp0_347, st1);
0060e754                  st0 = _m_punpckldq(st0, st0);
0060e757                  st1 = _m_punpckldq(st1, st1);
0060e75a                  int64_t temp0_352 = __pfmul_mmxq_mmxq(z_3, st0);
0060e75e                  int64_t temp0_353 = _m_punpckhdq(temp0_348, temp0_348);
0060e761                  int64_t temp0_354 = __pfmul_mmxq_memq(st0, 0);
0060e76c                  int64_t temp0_355 = __pfmul_mmxq_mmxq(temp0_1, temp0_353);
0060e770                  int64_t temp0_356 = _m_punpckhdq(temp0_349, temp0_349);
0060e773                  int64_t temp0_357 = __pfmul_mmxq_memq(temp0_353, 0);
0060e779                  int64_t temp0_358 = __pfadd_mmxq_mmxq(temp0_355, temp0_352);
0060e77d                  int64_t temp0_359 = __pfmul_mmxq_mmxq(0, st1);
0060e781                  int64_t temp0_360 = __pfadd_mmxq_mmxq(temp0_357, temp0_354);
0060e785                  int64_t temp0_361 = __pfmul_mmxq_memq(st1, z_4);
0060e78b                  int64_t temp0_362 = __pfadd_mmxq_mmxq(temp0_359, temp0_358);
0060e78f                  uint32_t temp0_363[0x2] = __pfmul_mmxq_mmxq(0, temp0_356);
0060e793                  int64_t temp0_364 = __pfadd_mmxq_mmxq(temp0_360, temp0_361);
0060e797                  int64_t temp0_365 = __pfmul_mmxq_memq(temp0_356, 0x3f80000000000000);
0060e79d                  st7 = __pfadd_mmxq_mmxq(temp0_363, temp0_362);
0060e7a1                  int64_t temp0_367 = __pfadd_mmxq_mmxq(temp0_365, temp0_364);
0060e7a5                  *(uint32_t*)((char*)result->__inner0 + 0x30) = st7[0];
0060e7a5                  *(uint32_t*)((char*)result->__inner0 + 0x34) = st7[1];
0060e7a9                  *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_367;
0060e7ad                  st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060e7b0                  st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060e7b9                  int64_t temp0_368 = _m_punpckhdq(temp0_364, st0);
0060e7c1                  int64_t temp0_369 = _m_punpckhdq(temp0_367, st1);
0060e7c9                  st0 = _m_punpckldq(st0, st0);
0060e7cc                  st1 = _m_punpckldq(st1, st1);
0060e7cf                  int64_t temp0_372 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060e7d3                  int64_t temp0_373 = _m_punpckhdq(temp0_368, temp0_368);
0060e7d6                  int64_t temp0_374 = __pfmul_mmxq_memq(st0, z_5);
0060e7e1                  int64_t temp0_375 = __pfmul_mmxq_mmxq(var_78_1, temp0_373);
0060e7e5                  int64_t temp0_376 = _m_punpckhdq(temp0_369, temp0_369);
0060e7e8                  int64_t temp0_377 = __pfmul_mmxq_memq(temp0_373, temp0_25);
0060e7ee                  int64_t temp0_378 = __pfadd_mmxq_mmxq(temp0_375, temp0_372);
0060e7f2                  int64_t temp0_379 = __pfmul_mmxq_mmxq(st5, st1);
0060e7f6                  int64_t temp0_380 = __pfadd_mmxq_mmxq(temp0_377, temp0_374);
0060e7fa                  int64_t temp0_381 = __pfmul_mmxq_memq(st1, temp0_23);
0060e800                  int64_t temp0_382 = __pfadd_mmxq_mmxq(temp0_379, temp0_378);
0060e804                  uint32_t temp0_383[0x2] = __pfmul_mmxq_mmxq(0, temp0_376);
0060e808                  int64_t temp0_384 = __pfadd_mmxq_mmxq(temp0_380, temp0_381);
0060e80c                  int64_t temp0_385 = __pfmul_mmxq_memq(temp0_376, z_8);
0060e812                  st7 = __pfadd_mmxq_mmxq(temp0_383, temp0_382);
0060e816                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060e81a                  int64_t temp0_387 = __pfadd_mmxq_mmxq(temp0_385, temp0_384);
0060e81e                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060e822                  *(uint32_t*)((char*)result->__inner0 + 0) = st7[0];
0060e822                  *(uint32_t*)((char*)result->__inner0 + 4) = st7[1];
0060e82a                  *(uint64_t*)((char*)result->__inner0 + 8) = temp0_387;
0060e82e                  int64_t temp0_388 = _m_punpckhdq(temp0_384, st0);
0060e836                  int64_t temp0_389 = _m_punpckhdq(temp0_387, st1);
0060e83e                  st0 = _m_punpckldq(st0, st0);
0060e841                  st1 = _m_punpckldq(st1, st1);
0060e844                  int64_t temp0_392 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060e848                  int64_t temp0_393 = _m_punpckhdq(temp0_388, temp0_388);
0060e84b                  int64_t temp0_394 = __pfmul_mmxq_memq(st0, z_5);
0060e856                  int64_t temp0_395 = __pfmul_mmxq_mmxq(var_78_1, temp0_393);
0060e85a                  int64_t temp0_396 = _m_punpckhdq(temp0_389, temp0_389);
0060e85d                  int64_t temp0_397 = __pfmul_mmxq_memq(temp0_393, temp0_25);
0060e863                  int64_t temp0_398 = __pfadd_mmxq_mmxq(temp0_395, temp0_392);
0060e867                  int64_t temp0_399 = __pfmul_mmxq_mmxq(st5, st1);
0060e86b                  int64_t temp0_400 = __pfadd_mmxq_mmxq(temp0_397, temp0_394);
0060e86f                  int64_t temp0_401 = __pfmul_mmxq_memq(st1, temp0_23);
0060e875                  int64_t temp0_402 = __pfadd_mmxq_mmxq(temp0_399, temp0_398);
0060e879                  uint32_t temp0_403[0x2] = __pfmul_mmxq_mmxq(0, temp0_396);
0060e87d                  int64_t temp0_404 = __pfadd_mmxq_mmxq(temp0_400, temp0_401);
0060e881                  int64_t temp0_405 = __pfmul_mmxq_memq(temp0_396, z_8);
0060e887                  st7 = __pfadd_mmxq_mmxq(temp0_403, temp0_402);
0060e88b                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060e88f                  int64_t temp0_407 = __pfadd_mmxq_mmxq(temp0_405, temp0_404);
0060e893                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060e897                  *(uint32_t*)((char*)result->__inner0 + 0x10) = st7[0];
0060e897                  *(uint32_t*)((char*)result->__inner0 + 0x14) = st7[1];
0060e8a0                  *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_407;
0060e8a4                  int64_t temp0_408 = _m_punpckhdq(temp0_404, st0);
0060e8ac                  int64_t temp0_409 = _m_punpckhdq(temp0_407, st1);
0060e8b4                  st0 = _m_punpckldq(st0, st0);
0060e8b7                  st1 = _m_punpckldq(st1, st1);
0060e8ba                  int64_t temp0_412 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060e8be                  int64_t temp0_413 = _m_punpckhdq(temp0_408, temp0_408);
0060e8c1                  int64_t temp0_414 = __pfmul_mmxq_memq(st0, z_5);
0060e8cc                  int64_t temp0_415 = __pfmul_mmxq_mmxq(var_78_1, temp0_413);
0060e8d0                  int64_t temp0_416 = _m_punpckhdq(temp0_409, temp0_409);
0060e8d3                  int64_t temp0_417 = __pfmul_mmxq_memq(temp0_413, temp0_25);
0060e8d9                  int64_t temp0_418 = __pfadd_mmxq_mmxq(temp0_415, temp0_412);
0060e8dd                  int64_t temp0_419 = __pfmul_mmxq_mmxq(st5, st1);
0060e8e1                  int64_t temp0_420 = __pfadd_mmxq_mmxq(temp0_417, temp0_414);
0060e8e5                  int64_t temp0_421 = __pfmul_mmxq_memq(st1, temp0_23);
0060e8eb                  int64_t temp0_422 = __pfadd_mmxq_mmxq(temp0_419, temp0_418);
0060e8ef                  uint32_t temp0_423[0x2] = __pfmul_mmxq_mmxq(0, temp0_416);
0060e8f3                  int64_t temp0_424 = __pfadd_mmxq_mmxq(temp0_420, temp0_421);
0060e8f7                  int64_t temp0_425 = __pfmul_mmxq_memq(temp0_416, z_8);
0060e8fd                  st7 = __pfadd_mmxq_mmxq(temp0_423, temp0_422);
0060e901                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060e905                  int64_t temp0_427 = __pfadd_mmxq_mmxq(temp0_425, temp0_424);
0060e909                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060e90d                  *(uint32_t*)((char*)result->__inner0 + 0x20) = st7[0];
0060e90d                  *(uint32_t*)((char*)result->__inner0 + 0x24) = st7[1];
0060e916                  *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_427;
0060e91a                  int64_t temp0_428 = _m_punpckhdq(temp0_424, st0);
0060e922                  int64_t temp0_429 = _m_punpckhdq(temp0_427, st1);
0060e92a                  st0 = _m_punpckldq(st0, st0);
0060e92d                  st1 = _m_punpckldq(st1, st1);
0060e930                  int64_t temp0_432 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060e934                  int64_t temp0_433 = _m_punpckhdq(temp0_428, temp0_428);
0060e937                  int64_t temp0_434 = __pfmul_mmxq_memq(st0, z_5);
0060e942                  int64_t temp0_435 = __pfmul_mmxq_mmxq(var_78_1, temp0_433);
0060e946                  int64_t temp0_436 = _m_punpckhdq(temp0_429, temp0_429);
0060e949                  int64_t temp0_437 = __pfmul_mmxq_memq(temp0_433, temp0_25);
0060e94f                  int64_t temp0_438 = __pfadd_mmxq_mmxq(temp0_435, temp0_432);
0060e953                  int64_t temp0_439 = __pfmul_mmxq_mmxq(st5, st1);
0060e957                  int64_t temp0_440 = __pfadd_mmxq_mmxq(temp0_437, temp0_434);
0060e95b                  int64_t temp0_441 = __pfmul_mmxq_memq(st1, temp0_23);
0060e961                  int64_t temp0_442 = __pfadd_mmxq_mmxq(temp0_439, temp0_438);
0060e965                  uint32_t temp0_443[0x2] = __pfmul_mmxq_mmxq(0, temp0_436);
0060e969                  int64_t temp0_444 = __pfadd_mmxq_mmxq(temp0_440, temp0_441);
0060e96d                  int64_t temp0_445 = __pfmul_mmxq_memq(temp0_436, z_8);
0060e973                  st7 = __pfadd_mmxq_mmxq(temp0_443, temp0_442);
0060e977                  z_1 = __pfadd_mmxq_mmxq(temp0_445, temp0_444);
0060e97b                  *(uint32_t*)((char*)result->__inner0 + 0x30) = st7[0];
0060e97b                  *(uint32_t*)((char*)result->__inner0 + 0x34) = st7[1];
0060e97f                  *(uint64_t*)((char*)result->__inner0 + 0x38) = z_1;
0060de9a              }
0060de9a              else
0060de9a              {
0060deaf                  z_2 = z_8;
0060deb7                  st0 = _m_punpckldq(temp0_24, var_78_1);
0060deba                  int64_t temp0_28 = _m_punpckhdq(temp0_24, var_78_1);
0060dec0                  int64_t var_48_1 = st0;
0060ded5                  z_1 = _m_punpckldq(temp0_23, z_2);
0060ded8                  st7 = temp0_25;
0060dee2                  int64_t temp0_30 = _m_punpckhdq(temp0_23, z_2);
0060dee8                  uint64_t z_7 = z_1;
0060def8                  st6 = _m_punpckldq(z_5, st7[0]);
0060df03                  int64_t temp0_32 = _m_punpckhdq(z_5, st7[0]);
0060df0e                  int64_t temp0_33 = _m_punpckhdq(st5, 0);
0060df11                  z = _m_punpckldq(st5, 0);
0060df2c                  result = arg1;
0060df2f                  z_1 = arg2->x;
0060df2f                  *(uint32_t*)((char*)z_1)[4] = arg2->y;
0060df32                  z_2 = ((uint64_t)arg2->z);
0060df40                  int64_t temp0_35 = __pswapd_mmxq_mmxq(z, 0x3f800000);
0060df44                  *(uint64_t*)((char*)result->__inner0 + 0) = 0x3f800000;
0060df47                  *(uint64_t*)((char*)result->__inner0 + 8) = 0;
0060df4b                  *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_35;
0060df4f                  *(uint64_t*)((char*)result->__inner0 + 0x18) = 0;
0060df53                  *(uint64_t*)((char*)result->__inner0 + 0x20) = 0;
0060df57                  *(uint64_t*)((char*)result->__inner0 + 0x28) = 0x3f800000;
0060df5b                  int64_t temp0_36 = __pfsub_mmxq_mmxq(temp0_35, z_2);
0060df5f                  int64_t temp0_37 = __pfsub_mmxq_mmxq(0, z_1);
0060df63                  *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_36;
0060df67                  *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_37;
0060df6b                  st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060df6e                  st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060df7a                  int64_t temp0_38 = _m_punpckhdq(temp0_36, st0);
0060df85                  int64_t temp0_39 = _m_punpckhdq(z_1, st1);
0060df90                  st0 = _m_punpckldq(st0, st0);
0060df93                  st1 = _m_punpckldq(st1, st1);
0060df96                  int64_t temp0_42 = __pfmul_mmxq_mmxq(var_48_1, st0);
0060df9a                  int64_t temp0_43 = _m_punpckhdq(temp0_38, temp0_38);
0060df9d                  int64_t temp0_44 = __pfmul_mmxq_memq(st0, z);
0060dfae                  int64_t temp0_45 = __pfmul_mmxq_mmxq(temp0_28, temp0_43);
0060dfb2                  int64_t temp0_46 = _m_punpckhdq(temp0_39, temp0_39);
0060dfb5                  int64_t temp0_47 = __pfmul_mmxq_memq(temp0_43, temp0_33);
0060dfbe                  int64_t temp0_48 = __pfadd_mmxq_mmxq(temp0_45, temp0_42);
0060dfc2                  int64_t temp0_49 = __pfmul_mmxq_mmxq(st6, st1);
0060dfc6                  int64_t temp0_50 = __pfadd_mmxq_mmxq(temp0_47, temp0_44);
0060dfca                  int64_t temp0_51 = __pfmul_mmxq_memq(st1, z_7);
0060dfd3                  int64_t temp0_52 = __pfadd_mmxq_mmxq(temp0_49, temp0_48);
0060dfd7                  st7 = __pfmul_mmxq_mmxq(temp0_32, temp0_46);
0060dfdb                  int64_t temp0_54 = __pfadd_mmxq_mmxq(temp0_50, temp0_51);
0060dfdf                  int64_t temp0_55 = __pfmul_mmxq_memq(temp0_46, temp0_30);
0060dfe8                  st7 = __pfadd_mmxq_mmxq(st7, temp0_52);
0060dfec                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060dff0                  int64_t temp0_57 = __pfadd_mmxq_mmxq(temp0_55, temp0_54);
0060dff4                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060dff8                  *(uint32_t*)((char*)result->__inner0 + 0) = st7[0];
0060dff8                  *(uint32_t*)((char*)result->__inner0 + 4) = st7[1];
0060e003                  *(uint64_t*)((char*)result->__inner0 + 8) = temp0_57;
0060e007                  int64_t temp0_58 = _m_punpckhdq(temp0_54, st0);
0060e012                  int64_t temp0_59 = _m_punpckhdq(temp0_57, st1);
0060e01d                  st0 = _m_punpckldq(st0, st0);
0060e020                  st1 = _m_punpckldq(st1, st1);
0060e023                  int64_t temp0_62 = __pfmul_mmxq_mmxq(var_48_1, st0);
0060e027                  int64_t temp0_63 = _m_punpckhdq(temp0_58, temp0_58);
0060e02a                  int64_t temp0_64 = __pfmul_mmxq_memq(st0, z);
0060e03b                  int64_t temp0_65 = __pfmul_mmxq_mmxq(temp0_28, temp0_63);
0060e03f                  int64_t temp0_66 = _m_punpckhdq(temp0_59, temp0_59);
0060e042                  int64_t temp0_67 = __pfmul_mmxq_memq(temp0_63, temp0_33);
0060e04b                  int64_t temp0_68 = __pfadd_mmxq_mmxq(temp0_65, temp0_62);
0060e04f                  int64_t temp0_69 = __pfmul_mmxq_mmxq(st6, st1);
0060e053                  int64_t temp0_70 = __pfadd_mmxq_mmxq(temp0_67, temp0_64);
0060e057                  int64_t temp0_71 = __pfmul_mmxq_memq(st1, z_7);
0060e060                  int64_t temp0_72 = __pfadd_mmxq_mmxq(temp0_69, temp0_68);
0060e064                  st7 = __pfmul_mmxq_mmxq(temp0_32, temp0_66);
0060e068                  int64_t temp0_74 = __pfadd_mmxq_mmxq(temp0_70, temp0_71);
0060e06c                  int64_t temp0_75 = __pfmul_mmxq_memq(temp0_66, temp0_30);
0060e075                  st7 = __pfadd_mmxq_mmxq(st7, temp0_72);
0060e079                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060e07d                  int64_t temp0_77 = __pfadd_mmxq_mmxq(temp0_75, temp0_74);
0060e081                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060e085                  *(uint32_t*)((char*)result->__inner0 + 0x10) = st7[0];
0060e085                  *(uint32_t*)((char*)result->__inner0 + 0x14) = st7[1];
0060e091                  *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_77;
0060e095                  int64_t temp0_78 = _m_punpckhdq(temp0_74, st0);
0060e0a0                  int64_t temp0_79 = _m_punpckhdq(temp0_77, st1);
0060e0ab                  st0 = _m_punpckldq(st0, st0);
0060e0ae                  st1 = _m_punpckldq(st1, st1);
0060e0b1                  int64_t temp0_82 = __pfmul_mmxq_mmxq(var_48_1, st0);
0060e0b5                  int64_t temp0_83 = _m_punpckhdq(temp0_78, temp0_78);
0060e0b8                  int64_t temp0_84 = __pfmul_mmxq_memq(st0, z);
0060e0c9                  int64_t temp0_85 = __pfmul_mmxq_mmxq(temp0_28, temp0_83);
0060e0cd                  int64_t temp0_86 = _m_punpckhdq(temp0_79, temp0_79);
0060e0d0                  int64_t temp0_87 = __pfmul_mmxq_memq(temp0_83, temp0_33);
0060e0d9                  int64_t temp0_88 = __pfadd_mmxq_mmxq(temp0_85, temp0_82);
0060e0dd                  int64_t temp0_89 = __pfmul_mmxq_mmxq(st6, st1);
0060e0e1                  int64_t temp0_90 = __pfadd_mmxq_mmxq(temp0_87, temp0_84);
0060e0e5                  int64_t temp0_91 = __pfmul_mmxq_memq(st1, z_7);
0060e0ee                  int64_t temp0_92 = __pfadd_mmxq_mmxq(temp0_89, temp0_88);
0060e0f2                  st7 = __pfmul_mmxq_mmxq(temp0_32, temp0_86);
0060e0f6                  int64_t temp0_94 = __pfadd_mmxq_mmxq(temp0_90, temp0_91);
0060e0fa                  int64_t temp0_95 = __pfmul_mmxq_memq(temp0_86, temp0_30);
0060e103                  st7 = __pfadd_mmxq_mmxq(st7, temp0_92);
0060e107                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060e10b                  int64_t temp0_97 = __pfadd_mmxq_mmxq(temp0_95, temp0_94);
0060e10f                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060e113                  *(uint32_t*)((char*)result->__inner0 + 0x20) = st7[0];
0060e113                  *(uint32_t*)((char*)result->__inner0 + 0x24) = st7[1];
0060e11f                  *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_97;
0060e123                  int64_t temp0_98 = _m_punpckhdq(temp0_94, st0);
0060e12e                  int64_t temp0_99 = _m_punpckhdq(temp0_97, st1);
0060e139                  st0 = _m_punpckldq(st0, st0);
0060e13c                  st1 = _m_punpckldq(st1, st1);
0060e13f                  int64_t temp0_102 = __pfmul_mmxq_mmxq(var_48_1, st0);
0060e143                  int64_t temp0_103 = _m_punpckhdq(temp0_98, temp0_98);
0060e146                  int64_t temp0_104 = __pfmul_mmxq_memq(st0, z);
0060e157                  int64_t temp0_105 = __pfmul_mmxq_mmxq(temp0_28, temp0_103);
0060e15b                  int64_t temp0_106 = _m_punpckhdq(temp0_99, temp0_99);
0060e15e                  int64_t temp0_107 = __pfmul_mmxq_memq(temp0_103, temp0_33);
0060e167                  int64_t temp0_108 = __pfadd_mmxq_mmxq(temp0_105, temp0_102);
0060e16b                  int64_t temp0_109 = __pfmul_mmxq_mmxq(st6, st1);
0060e16f                  int64_t temp0_110 = __pfadd_mmxq_mmxq(temp0_107, temp0_104);
0060e173                  int64_t temp0_111 = __pfmul_mmxq_memq(st1, z_7);
0060e17c                  int64_t temp0_112 = __pfadd_mmxq_mmxq(temp0_109, temp0_108);
0060e180                  st7 = __pfmul_mmxq_mmxq(temp0_32, temp0_106);
0060e184                  int64_t temp0_114 = __pfadd_mmxq_mmxq(temp0_110, temp0_111);
0060e188                  int64_t temp0_115 = __pfmul_mmxq_memq(temp0_106, temp0_30);
0060e191                  st7 = __pfadd_mmxq_mmxq(st7, temp0_112);
0060e195                  int64_t temp0_117 = __pfadd_mmxq_mmxq(temp0_115, temp0_114);
0060e199                  *(uint32_t*)((char*)result->__inner0 + 0x30) = st7[0];
0060e199                  *(uint32_t*)((char*)result->__inner0 + 0x34) = st7[1];
0060e19d                  *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_117;
0060e1a1                  st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060e1a4                  st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060e1ac                  int64_t temp0_118 = _m_punpckhdq(temp0_114, st0);
0060e1b4                  int64_t temp0_119 = _m_punpckhdq(temp0_117, st1);
0060e1bc                  st0 = _m_punpckldq(st0, st0);
0060e1bf                  st1 = _m_punpckldq(st1, st1);
0060e1c2                  int64_t temp0_122 = __pfmul_mmxq_mmxq(z_3, st0);
0060e1c6                  int64_t temp0_123 = _m_punpckhdq(temp0_118, temp0_118);
0060e1c9                  int64_t temp0_124 = __pfmul_mmxq_memq(st0, 0);
0060e1d4                  int64_t temp0_125 = __pfmul_mmxq_mmxq(temp0_1, temp0_123);
0060e1d8                  int64_t temp0_126 = _m_punpckhdq(temp0_119, temp0_119);
0060e1db                  int64_t temp0_127 = __pfmul_mmxq_memq(temp0_123, 0);
0060e1e1                  int64_t temp0_128 = __pfadd_mmxq_mmxq(temp0_125, temp0_122);
0060e1e5                  int64_t temp0_129 = __pfmul_mmxq_mmxq(0, st1);
0060e1e9                  int64_t temp0_130 = __pfadd_mmxq_mmxq(temp0_127, temp0_124);
0060e1ed                  int64_t temp0_131 = __pfmul_mmxq_memq(st1, z_4);
0060e1f3                  int64_t temp0_132 = __pfadd_mmxq_mmxq(temp0_129, temp0_128);
0060e1f7                  st7 = __pfmul_mmxq_mmxq(0, temp0_126);
0060e1fb                  int64_t temp0_134 = __pfadd_mmxq_mmxq(temp0_130, temp0_131);
0060e1ff                  int64_t temp0_135 = __pfmul_mmxq_memq(temp0_126, 0x3f80000000000000);
0060e205                  st7 = __pfadd_mmxq_mmxq(st7, temp0_132);
0060e209                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060e20d                  int64_t temp0_137 = __pfadd_mmxq_mmxq(temp0_135, temp0_134);
0060e211                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060e215                  *(uint32_t*)((char*)result->__inner0 + 0) = st7[0];
0060e215                  *(uint32_t*)((char*)result->__inner0 + 4) = st7[1];
0060e21c                  *(uint64_t*)((char*)result->__inner0 + 8) = temp0_137;
0060e220                  int64_t temp0_138 = _m_punpckhdq(temp0_134, st0);
0060e228                  int64_t temp0_139 = _m_punpckhdq(temp0_137, st1);
0060e230                  st0 = _m_punpckldq(st0, st0);
0060e233                  st1 = _m_punpckldq(st1, st1);
0060e236                  int64_t temp0_142 = __pfmul_mmxq_mmxq(z_3, st0);
0060e23a                  int64_t temp0_143 = _m_punpckhdq(temp0_138, temp0_138);
0060e23d                  int64_t temp0_144 = __pfmul_mmxq_memq(st0, 0);
0060e248                  int64_t temp0_145 = __pfmul_mmxq_mmxq(temp0_1, temp0_143);
0060e24c                  int64_t temp0_146 = _m_punpckhdq(temp0_139, temp0_139);
0060e24f                  int64_t temp0_147 = __pfmul_mmxq_memq(temp0_143, 0);
0060e255                  int64_t temp0_148 = __pfadd_mmxq_mmxq(temp0_145, temp0_142);
0060e259                  int64_t temp0_149 = __pfmul_mmxq_mmxq(0, st1);
0060e25d                  int64_t temp0_150 = __pfadd_mmxq_mmxq(temp0_147, temp0_144);
0060e261                  int64_t temp0_151 = __pfmul_mmxq_memq(st1, z_4);
0060e267                  int64_t temp0_152 = __pfadd_mmxq_mmxq(temp0_149, temp0_148);
0060e26b                  st7 = __pfmul_mmxq_mmxq(0, temp0_146);
0060e26f                  int64_t temp0_154 = __pfadd_mmxq_mmxq(temp0_150, temp0_151);
0060e273                  int64_t temp0_155 = __pfmul_mmxq_memq(temp0_146, 0x3f80000000000000);
0060e279                  st7 = __pfadd_mmxq_mmxq(st7, temp0_152);
0060e27d                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060e281                  int64_t temp0_157 = __pfadd_mmxq_mmxq(temp0_155, temp0_154);
0060e285                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060e289                  *(uint32_t*)((char*)result->__inner0 + 0x10) = st7[0];
0060e289                  *(uint32_t*)((char*)result->__inner0 + 0x14) = st7[1];
0060e291                  *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_157;
0060e295                  int64_t temp0_158 = _m_punpckhdq(temp0_154, st0);
0060e29d                  int64_t temp0_159 = _m_punpckhdq(temp0_157, st1);
0060e2a5                  st0 = _m_punpckldq(st0, st0);
0060e2a8                  st1 = _m_punpckldq(st1, st1);
0060e2ab                  int64_t temp0_162 = __pfmul_mmxq_mmxq(z_3, st0);
0060e2af                  int64_t temp0_163 = _m_punpckhdq(temp0_158, temp0_158);
0060e2b2                  int64_t temp0_164 = __pfmul_mmxq_memq(st0, 0);
0060e2bd                  int64_t temp0_165 = __pfmul_mmxq_mmxq(temp0_1, temp0_163);
0060e2c1                  int64_t temp0_166 = _m_punpckhdq(temp0_159, temp0_159);
0060e2c4                  int64_t temp0_167 = __pfmul_mmxq_memq(temp0_163, 0);
0060e2ca                  int64_t temp0_168 = __pfadd_mmxq_mmxq(temp0_165, temp0_162);
0060e2ce                  int64_t temp0_169 = __pfmul_mmxq_mmxq(0, st1);
0060e2d2                  int64_t temp0_170 = __pfadd_mmxq_mmxq(temp0_167, temp0_164);
0060e2d6                  int64_t temp0_171 = __pfmul_mmxq_memq(st1, z_4);
0060e2dc                  int64_t temp0_172 = __pfadd_mmxq_mmxq(temp0_169, temp0_168);
0060e2e0                  st7 = __pfmul_mmxq_mmxq(0, temp0_166);
0060e2e4                  int64_t temp0_174 = __pfadd_mmxq_mmxq(temp0_170, temp0_171);
0060e2e8                  int64_t temp0_175 = __pfmul_mmxq_memq(temp0_166, 0x3f80000000000000);
0060e2ee                  st7 = __pfadd_mmxq_mmxq(st7, temp0_172);
0060e2f2                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060e2f6                  int64_t temp0_177 = __pfadd_mmxq_mmxq(temp0_175, temp0_174);
0060e2fa                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060e2fe                  *(uint32_t*)((char*)result->__inner0 + 0x20) = st7[0];
0060e2fe                  *(uint32_t*)((char*)result->__inner0 + 0x24) = st7[1];
0060e306                  *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_177;
0060e30a                  int64_t temp0_178 = _m_punpckhdq(temp0_174, st0);
0060e312                  int64_t temp0_179 = _m_punpckhdq(temp0_177, st1);
0060e31a                  st0 = _m_punpckldq(st0, st0);
0060e31d                  st1 = _m_punpckldq(st1, st1);
0060e320                  int64_t temp0_182 = __pfmul_mmxq_mmxq(z_3, st0);
0060e324                  int64_t temp0_183 = _m_punpckhdq(temp0_178, temp0_178);
0060e327                  int64_t temp0_184 = __pfmul_mmxq_memq(st0, 0);
0060e332                  int64_t temp0_185 = __pfmul_mmxq_mmxq(temp0_1, temp0_183);
0060e336                  int64_t temp0_186 = _m_punpckhdq(temp0_179, temp0_179);
0060e339                  int64_t temp0_187 = __pfmul_mmxq_memq(temp0_183, 0);
0060e33f                  int64_t temp0_188 = __pfadd_mmxq_mmxq(temp0_185, temp0_182);
0060e343                  int64_t temp0_189 = __pfmul_mmxq_mmxq(0, st1);
0060e347                  int64_t temp0_190 = __pfadd_mmxq_mmxq(temp0_187, temp0_184);
0060e34b                  int64_t temp0_191 = __pfmul_mmxq_memq(st1, z_4);
0060e351                  int64_t temp0_192 = __pfadd_mmxq_mmxq(temp0_189, temp0_188);
0060e355                  st7 = __pfmul_mmxq_mmxq(0, temp0_186);
0060e359                  int64_t temp0_194 = __pfadd_mmxq_mmxq(temp0_190, temp0_191);
0060e35d                  int64_t temp0_195 = __pfmul_mmxq_memq(temp0_186, 0x3f80000000000000);
0060e363                  st7 = __pfadd_mmxq_mmxq(st7, temp0_192);
0060e367                  int64_t temp0_197 = __pfadd_mmxq_mmxq(temp0_195, temp0_194);
0060e36b                  *(uint32_t*)((char*)result->__inner0 + 0x30) = st7[0];
0060e36b                  *(uint32_t*)((char*)result->__inner0 + 0x34) = st7[1];
0060e36f                  *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_197;
0060e373                  st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060e376                  st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060e37f                  int64_t temp0_198 = _m_punpckhdq(temp0_194, st0);
0060e387                  int64_t temp0_199 = _m_punpckhdq(temp0_197, st1);
0060e38f                  st0 = _m_punpckldq(st0, st0);
0060e392                  st1 = _m_punpckldq(st1, st1);
0060e395                  int64_t temp0_202 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060e399                  int64_t temp0_203 = _m_punpckhdq(temp0_198, temp0_198);
0060e39c                  int64_t temp0_204 = __pfmul_mmxq_memq(st0, z_5);
0060e3a7                  int64_t temp0_205 = __pfmul_mmxq_mmxq(var_78_1, temp0_203);
0060e3ab                  int64_t temp0_206 = _m_punpckhdq(temp0_199, temp0_199);
0060e3ae                  int64_t temp0_207 = __pfmul_mmxq_memq(temp0_203, temp0_25);
0060e3b4                  int64_t temp0_208 = __pfadd_mmxq_mmxq(temp0_205, temp0_202);
0060e3b8                  int64_t temp0_209 = __pfmul_mmxq_mmxq(st5, st1);
0060e3bc                  int64_t temp0_210 = __pfadd_mmxq_mmxq(temp0_207, temp0_204);
0060e3c0                  int64_t temp0_211 = __pfmul_mmxq_memq(st1, temp0_23);
0060e3c6                  int64_t temp0_212 = __pfadd_mmxq_mmxq(temp0_209, temp0_208);
0060e3ca                  st7 = __pfmul_mmxq_mmxq(0, temp0_206);
0060e3ce                  int64_t temp0_214 = __pfadd_mmxq_mmxq(temp0_210, temp0_211);
0060e3d2                  int64_t temp0_215 = __pfmul_mmxq_memq(temp0_206, z_8);
0060e3d8                  st7 = __pfadd_mmxq_mmxq(st7, temp0_212);
0060e3dc                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060e3e0                  int64_t temp0_217 = __pfadd_mmxq_mmxq(temp0_215, temp0_214);
0060e3e4                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060e3e8                  *(uint32_t*)((char*)result->__inner0 + 0) = st7[0];
0060e3e8                  *(uint32_t*)((char*)result->__inner0 + 4) = st7[1];
0060e3f0                  *(uint64_t*)((char*)result->__inner0 + 8) = temp0_217;
0060e3f4                  int64_t temp0_218 = _m_punpckhdq(temp0_214, st0);
0060e3fc                  int64_t temp0_219 = _m_punpckhdq(temp0_217, st1);
0060e404                  st0 = _m_punpckldq(st0, st0);
0060e407                  st1 = _m_punpckldq(st1, st1);
0060e40a                  int64_t temp0_222 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060e40e                  int64_t temp0_223 = _m_punpckhdq(temp0_218, temp0_218);
0060e411                  int64_t temp0_224 = __pfmul_mmxq_memq(st0, z_5);
0060e41c                  int64_t temp0_225 = __pfmul_mmxq_mmxq(var_78_1, temp0_223);
0060e420                  int64_t temp0_226 = _m_punpckhdq(temp0_219, temp0_219);
0060e423                  int64_t temp0_227 = __pfmul_mmxq_memq(temp0_223, temp0_25);
0060e429                  int64_t temp0_228 = __pfadd_mmxq_mmxq(temp0_225, temp0_222);
0060e42d                  int64_t temp0_229 = __pfmul_mmxq_mmxq(st5, st1);
0060e431                  int64_t temp0_230 = __pfadd_mmxq_mmxq(temp0_227, temp0_224);
0060e435                  int64_t temp0_231 = __pfmul_mmxq_memq(st1, temp0_23);
0060e43b                  int64_t temp0_232 = __pfadd_mmxq_mmxq(temp0_229, temp0_228);
0060e43f                  st7 = __pfmul_mmxq_mmxq(0, temp0_226);
0060e443                  int64_t temp0_234 = __pfadd_mmxq_mmxq(temp0_230, temp0_231);
0060e447                  int64_t temp0_235 = __pfmul_mmxq_memq(temp0_226, z_8);
0060e44d                  st7 = __pfadd_mmxq_mmxq(st7, temp0_232);
0060e451                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060e455                  int64_t temp0_237 = __pfadd_mmxq_mmxq(temp0_235, temp0_234);
0060e459                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060e45d                  *(uint32_t*)((char*)result->__inner0 + 0x10) = st7[0];
0060e45d                  *(uint32_t*)((char*)result->__inner0 + 0x14) = st7[1];
0060e466                  *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_237;
0060e46a                  int64_t temp0_238 = _m_punpckhdq(temp0_234, st0);
0060e472                  int64_t temp0_239 = _m_punpckhdq(temp0_237, st1);
0060e47a                  st0 = _m_punpckldq(st0, st0);
0060e47d                  st1 = _m_punpckldq(st1, st1);
0060e480                  int64_t temp0_242 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060e484                  int64_t temp0_243 = _m_punpckhdq(temp0_238, temp0_238);
0060e487                  int64_t temp0_244 = __pfmul_mmxq_memq(st0, z_5);
0060e492                  int64_t temp0_245 = __pfmul_mmxq_mmxq(var_78_1, temp0_243);
0060e496                  int64_t temp0_246 = _m_punpckhdq(temp0_239, temp0_239);
0060e499                  int64_t temp0_247 = __pfmul_mmxq_memq(temp0_243, temp0_25);
0060e49f                  int64_t temp0_248 = __pfadd_mmxq_mmxq(temp0_245, temp0_242);
0060e4a3                  int64_t temp0_249 = __pfmul_mmxq_mmxq(st5, st1);
0060e4a7                  int64_t temp0_250 = __pfadd_mmxq_mmxq(temp0_247, temp0_244);
0060e4ab                  int64_t temp0_251 = __pfmul_mmxq_memq(st1, temp0_23);
0060e4b1                  int64_t temp0_252 = __pfadd_mmxq_mmxq(temp0_249, temp0_248);
0060e4b5                  st7 = __pfmul_mmxq_mmxq(0, temp0_246);
0060e4b9                  int64_t temp0_254 = __pfadd_mmxq_mmxq(temp0_250, temp0_251);
0060e4bd                  int64_t temp0_255 = __pfmul_mmxq_memq(temp0_246, z_8);
0060e4c3                  st7 = __pfadd_mmxq_mmxq(st7, temp0_252);
0060e4c7                  st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060e4cb                  int64_t temp0_257 = __pfadd_mmxq_mmxq(temp0_255, temp0_254);
0060e4cf                  st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060e4d3                  *(uint32_t*)((char*)result->__inner0 + 0x20) = st7[0];
0060e4d3                  *(uint32_t*)((char*)result->__inner0 + 0x24) = st7[1];
0060e4dc                  *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_257;
0060e4e0                  int64_t temp0_258 = _m_punpckhdq(temp0_254, st0);
0060e4e8                  int64_t temp0_259 = _m_punpckhdq(temp0_257, st1);
0060e4f0                  st0 = _m_punpckldq(st0, st0);
0060e4f3                  st1 = _m_punpckldq(st1, st1);
0060e4f6                  int64_t temp0_262 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060e4fa                  int64_t temp0_263 = _m_punpckhdq(temp0_258, temp0_258);
0060e4fd                  int64_t temp0_264 = __pfmul_mmxq_memq(st0, z_5);
0060e508                  int64_t temp0_265 = __pfmul_mmxq_mmxq(var_78_1, temp0_263);
0060e50c                  int64_t temp0_266 = _m_punpckhdq(temp0_259, temp0_259);
0060e50f                  int64_t temp0_267 = __pfmul_mmxq_memq(temp0_263, temp0_25);
0060e515                  int64_t temp0_268 = __pfadd_mmxq_mmxq(temp0_265, temp0_262);
0060e519                  int64_t temp0_269 = __pfmul_mmxq_mmxq(st5, st1);
0060e51d                  int64_t temp0_270 = __pfadd_mmxq_mmxq(temp0_267, temp0_264);
0060e521                  int64_t temp0_271 = __pfmul_mmxq_memq(st1, temp0_23);
0060e527                  int64_t temp0_272 = __pfadd_mmxq_mmxq(temp0_269, temp0_268);
0060e52b                  st7 = __pfmul_mmxq_mmxq(0, temp0_266);
0060e52f                  int64_t temp0_274 = __pfadd_mmxq_mmxq(temp0_270, temp0_271);
0060e533                  int64_t temp0_275 = __pfmul_mmxq_memq(temp0_266, z_8);
0060e539                  st7 = __pfadd_mmxq_mmxq(st7, temp0_272);
0060e53d                  int64_t temp0_277 = __pfadd_mmxq_mmxq(temp0_275, temp0_274);
0060e541                  *(uint32_t*)((char*)result->__inner0 + 0x30) = st7[0];
0060e541                  *(uint32_t*)((char*)result->__inner0 + 0x34) = st7[1];
0060e545                  *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_277;
0060e549                  st0 = arg2->x;
0060e549                  *(uint32_t*)((char*)st0)[4] = arg2->y;
0060e550                  z = ((uint64_t)arg2->z);
0060e554                  z_1 = ((uint64_t)*(uint32_t*)((char*)result->__inner0 + 0x38));
0060e558                  int64_t temp0_278 = __pfadd_mmxq_mmxq(st0, *(uint64_t*)((char*)result->__inner0 + 0x30));
0060e55c                  int64_t temp0_279 = __pfadd_mmxq_mmxq(z, z_1);
0060e560                  *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_278;
0060e564                  *(uint32_t*)((char*)result->__inner0 + 0x38) = temp0_279;
0060de9a              }
0060dd9f          }
0060dd9f          else if (arg2 == 0)
0060e98d          {
0060e9ee              z = arg4->x;
0060e9ee              *(uint32_t*)((char*)z)[4] = arg4->y;
0060e9f1              z_2 = ((uint64_t)arg4->z);
0060e9f8              z_1 = z;
0060e9fb              z = _m_punpckldq(z, 0);
0060ea01              int64_t temp0_456 = _m_punpckhdq(0, z_1);
0060ea04              *(uint64_t*)((char*)result->__inner0 + 0) = z;
0060ea07              *(uint64_t*)((char*)result->__inner0 + 8) = 0;
0060ea0b              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_456;
0060ea0f              *(uint64_t*)((char*)result->__inner0 + 0x18) = 0;
0060ea13              *(uint64_t*)((char*)result->__inner0 + 0x20) = 0;
0060ea17              *(uint64_t*)((char*)result->__inner0 + 0x28) = z_2;
0060ea1b              *(uint64_t*)((char*)result->__inner0 + 0x30) = 0;
0060ea1f              *(uint64_t*)((char*)result->__inner0 + 0x38) = 0x3f80000000000000;
0060e98d          }
0060e98d          else
0060e98d          {
0060e996              z_2 = arg2->x;
0060e996              *(uint32_t*)((char*)z_2)[4] = arg2->y;
0060e99d              z = arg4->x;
0060e99d              *(uint32_t*)((char*)z)[4] = arg4->y;
0060e9a0              z_1 = ((uint64_t)arg4->z);
0060e9aa              st5 = _m_punpckldq(((uint64_t)arg2->z), 0x3f800000);
0060e9ad              int64_t temp0_449 = __pfsub_mmxq_mmxq(0x3f8000003f800000, z);
0060e9b1              *(uint64_t*)((char*)result->__inner0 + 0x28) = z_1;
0060e9b5              int64_t temp0_450 = __pfsub_mmxq_mmxq(0x3f8000003f800000, z_1);
0060e9b9              *(uint64_t*)((char*)result->__inner0 + 8) = 0;
0060e9bd              *(uint64_t*)((char*)result->__inner0 + 0x18) = 0;
0060e9c1              *(uint64_t*)((char*)result->__inner0 + 0x20) = 0;
0060e9c5              int64_t temp0_451 = __pfmul_mmxq_mmxq(temp0_449, z_2);
0060e9c9              z_2 = z;
0060e9cc              int64_t temp0_452 = __pfmul_mmxq_mmxq(temp0_450, st5);
0060e9d0              z = _m_punpckldq(z, 0);
0060e9d3              int64_t temp0_454 = _m_punpckhdq(0, z_2);
0060e9d6              *(uint64_t*)((char*)result->__inner0 + 0) = z;
0060e9d9              *(uint64_t*)((char*)result->__inner0 + 0x10) = temp0_454;
0060e9dd              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_451;
0060e9e1              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_452;
0060e98d          }
0060dd97      }
0060dd97      
0060ea5a      if (arg6 != 0)
0060ea5a      {
0060ea60          st0 = arg6->x;
0060ea60          *(uint32_t*)((char*)st0)[4] = arg6->y;
0060ea63          st1 = arg6->z;
0060ea63          *(uint32_t*)((char*)st1)[4] = arg6->w;
0060ea67          int64_t temp0_458 = __pswapd_mmxq_mmxq(z_1, st0);
0060ea71          int64_t temp0_459 = __pfadd_mmxq_mmxq(st0, st0);
0060ea78          int64_t temp0_460 = _m_punpckhdq(st0, st1);
0060ea7b          int64_t temp0_461 = __pfadd_mmxq_mmxq(st1, st1);
0060ea82          int64_t temp0_462 = __pfmul_mmxq_mmxq(temp0_459, st0);
0060ea86          st5 = _m_punpckldq(temp0_459, temp0_461);
0060ea89          int64_t temp0_464 = __pfmul_mmxq_mmxq(st0, temp0_461);
0060ea8d          int64_t temp0_465 = __pfmul_mmxq_mmxq(temp0_458, temp0_461);
0060ea91          int64_t temp0_466 = __pfmul_mmxq_mmxq(temp0_461, st1);
0060ea95          int64_t temp0_467 = __pfmul_mmxq_mmxq(temp0_460, st5);
0060ea9c          int64_t temp0_468 = __pfsubr_mmxq_memq(temp0_462, 0x3f8000003f800000);
0060eaa7          st1 = _m_punpckldq(temp0_466, temp0_466);
0060eaaa          int64_t temp0_470 = __pfpnacc_mmxq_mmxq(temp0_465, temp0_465);
0060eaae          int64_t temp0_471 = __pfacc_mmxq_mmxq(temp0_462, temp0_462);
0060eab2          int64_t temp0_472 = __pfpnacc_mmxq_mmxq(temp0_467, temp0_467);
0060eab6          int64_t temp0_473 = __pfpnacc_mmxq_mmxq(temp0_464, temp0_464);
0060eaba          int64_t temp0_474 = __pfsub_mmxq_mmxq(temp0_468, st1);
0060eabe          int64_t temp0_475 = __pswapd_mmxq_mmxq(temp0_466, temp0_473);
0060eac2          int64_t temp0_476 = __pfsubr_mmxq_memq(temp0_471, 0x3f8000003f800000);
0060ead5          st5 = _m_punpckldq(temp0_475, temp0_470);
0060ead8          z = _m_punpckldq(temp0_473, 0);
0060eadb          int64_t temp0_479 = _m_punpckhdq(temp0_476, 0);
0060eade          int64_t temp0_480 = _m_punpckhdq(temp0_474, temp0_472);
0060eae6          int64_t temp0_481 = _m_punpckhdq(temp0_470, 0);
0060eae9          uint64_t z_6 = z;
0060eaee          st6 = _m_punpckldq(temp0_472, temp0_474);
0060eaf6          uint32_t temp0_483[0x2] = __punpckldq_mmxq_memd(0, 0x3f800000);
0060eaf6          
0060eb13          if (arg5 == 0)
0060eb13          {
0060ed32              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060ed35              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060ed3e              int64_t temp0_568 = _m_punpckhdq(z, st0);
0060ed46              int64_t temp0_569 = _m_punpckhdq(temp0_481, st1);
0060ed4e              st0 = _m_punpckldq(st0, st0);
0060ed51              st1 = _m_punpckldq(st1, st1);
0060ed54              int64_t temp0_572 = __pfmul_mmxq_mmxq(temp0_480, st0);
0060ed58              int64_t temp0_573 = _m_punpckhdq(temp0_568, temp0_568);
0060ed5b              int64_t temp0_574 = __pfmul_mmxq_memq(st0, z_6);
0060ed66              int64_t temp0_575 = __pfmul_mmxq_mmxq(st6, temp0_573);
0060ed6a              int64_t temp0_576 = _m_punpckhdq(temp0_569, temp0_569);
0060ed6d              int64_t temp0_577 = __pfmul_mmxq_memq(temp0_573, temp0_481);
0060ed73              int64_t temp0_578 = __pfadd_mmxq_mmxq(temp0_575, temp0_572);
0060ed77              int64_t temp0_579 = __pfmul_mmxq_mmxq(st5, st1);
0060ed7b              int64_t temp0_580 = __pfadd_mmxq_mmxq(temp0_577, temp0_574);
0060ed7f              int64_t temp0_581 = __pfmul_mmxq_memq(st1, temp0_479);
0060ed85              int64_t temp0_582 = __pfadd_mmxq_mmxq(temp0_579, temp0_578);
0060ed89              st7 = __pfmul_mmxq_mmxq(0, temp0_576);
0060ed8d              int64_t temp0_584 = __pfadd_mmxq_mmxq(temp0_580, temp0_581);
0060ed91              int64_t temp0_585 = __pfmul_mmxq_memq(temp0_576, temp0_483);
0060ed97              st7 = __pfadd_mmxq_mmxq(st7, temp0_582);
0060ed9b              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060ed9f              int64_t temp0_587 = __pfadd_mmxq_mmxq(temp0_585, temp0_584);
0060eda3              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060eda7              *(uint32_t*)((char*)result->__inner0 + 0) = st7[0];
0060eda7              *(uint32_t*)((char*)result->__inner0 + 4) = st7[1];
0060edaf              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_587;
0060edb3              int64_t temp0_588 = _m_punpckhdq(temp0_584, st0);
0060edbb              int64_t temp0_589 = _m_punpckhdq(temp0_587, st1);
0060edc3              st0 = _m_punpckldq(st0, st0);
0060edc6              st1 = _m_punpckldq(st1, st1);
0060edc9              int64_t temp0_592 = __pfmul_mmxq_mmxq(temp0_480, st0);
0060edcd              int64_t temp0_593 = _m_punpckhdq(temp0_588, temp0_588);
0060edd0              int64_t temp0_594 = __pfmul_mmxq_memq(st0, z_6);
0060eddb              int64_t temp0_595 = __pfmul_mmxq_mmxq(st6, temp0_593);
0060eddf              int64_t temp0_596 = _m_punpckhdq(temp0_589, temp0_589);
0060ede2              int64_t temp0_597 = __pfmul_mmxq_memq(temp0_593, temp0_481);
0060ede8              int64_t temp0_598 = __pfadd_mmxq_mmxq(temp0_595, temp0_592);
0060edec              int64_t temp0_599 = __pfmul_mmxq_mmxq(st5, st1);
0060edf0              int64_t temp0_600 = __pfadd_mmxq_mmxq(temp0_597, temp0_594);
0060edf4              int64_t temp0_601 = __pfmul_mmxq_memq(st1, temp0_479);
0060edfa              int64_t temp0_602 = __pfadd_mmxq_mmxq(temp0_599, temp0_598);
0060edfe              st7 = __pfmul_mmxq_mmxq(0, temp0_596);
0060ee02              int64_t temp0_604 = __pfadd_mmxq_mmxq(temp0_600, temp0_601);
0060ee06              int64_t temp0_605 = __pfmul_mmxq_memq(temp0_596, temp0_483);
0060ee0c              st7 = __pfadd_mmxq_mmxq(st7, temp0_602);
0060ee10              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060ee14              int64_t temp0_607 = __pfadd_mmxq_mmxq(temp0_605, temp0_604);
0060ee18              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060ee1c              *(uint32_t*)((char*)result->__inner0 + 0x10) = st7[0];
0060ee1c              *(uint32_t*)((char*)result->__inner0 + 0x14) = st7[1];
0060ee25              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_607;
0060ee29              int64_t temp0_608 = _m_punpckhdq(temp0_604, st0);
0060ee31              int64_t temp0_609 = _m_punpckhdq(temp0_607, st1);
0060ee39              st0 = _m_punpckldq(st0, st0);
0060ee3c              st1 = _m_punpckldq(st1, st1);
0060ee3f              int64_t temp0_612 = __pfmul_mmxq_mmxq(temp0_480, st0);
0060ee43              int64_t temp0_613 = _m_punpckhdq(temp0_608, temp0_608);
0060ee46              int64_t temp0_614 = __pfmul_mmxq_memq(st0, z_6);
0060ee51              int64_t temp0_615 = __pfmul_mmxq_mmxq(st6, temp0_613);
0060ee55              int64_t temp0_616 = _m_punpckhdq(temp0_609, temp0_609);
0060ee58              int64_t temp0_617 = __pfmul_mmxq_memq(temp0_613, temp0_481);
0060ee5e              int64_t temp0_618 = __pfadd_mmxq_mmxq(temp0_615, temp0_612);
0060ee62              int64_t temp0_619 = __pfmul_mmxq_mmxq(st5, st1);
0060ee66              int64_t temp0_620 = __pfadd_mmxq_mmxq(temp0_617, temp0_614);
0060ee6a              int64_t temp0_621 = __pfmul_mmxq_memq(st1, temp0_479);
0060ee70              int64_t temp0_622 = __pfadd_mmxq_mmxq(temp0_619, temp0_618);
0060ee74              st7 = __pfmul_mmxq_mmxq(0, temp0_616);
0060ee78              int64_t temp0_624 = __pfadd_mmxq_mmxq(temp0_620, temp0_621);
0060ee7c              int64_t temp0_625 = __pfmul_mmxq_memq(temp0_616, temp0_483);
0060ee82              st7 = __pfadd_mmxq_mmxq(st7, temp0_622);
0060ee86              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060ee8a              int64_t temp0_627 = __pfadd_mmxq_mmxq(temp0_625, temp0_624);
0060ee8e              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060ee92              *(uint32_t*)((char*)result->__inner0 + 0x20) = st7[0];
0060ee92              *(uint32_t*)((char*)result->__inner0 + 0x24) = st7[1];
0060ee9b              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_627;
0060ee9f              int64_t temp0_628 = _m_punpckhdq(temp0_624, st0);
0060eea7              int64_t temp0_629 = _m_punpckhdq(temp0_627, st1);
0060eeaf              st0 = _m_punpckldq(st0, st0);
0060eeb2              st1 = _m_punpckldq(st1, st1);
0060eeb5              int64_t temp0_632 = __pfmul_mmxq_mmxq(temp0_480, st0);
0060eeb9              int64_t temp0_633 = _m_punpckhdq(temp0_628, temp0_628);
0060eebc              int64_t temp0_634 = __pfmul_mmxq_memq(st0, z_6);
0060eec7              int64_t temp0_635 = __pfmul_mmxq_mmxq(st6, temp0_633);
0060eecb              int64_t temp0_636 = _m_punpckhdq(temp0_629, temp0_629);
0060eece              int64_t temp0_637 = __pfmul_mmxq_memq(temp0_633, temp0_481);
0060eed4              int64_t temp0_638 = __pfadd_mmxq_mmxq(temp0_635, temp0_632);
0060eed8              int64_t temp0_639 = __pfmul_mmxq_mmxq(st5, st1);
0060eedc              int64_t temp0_640 = __pfadd_mmxq_mmxq(temp0_637, temp0_634);
0060eee0              int64_t temp0_641 = __pfmul_mmxq_memq(st1, temp0_479);
0060eee6              int64_t temp0_642 = __pfadd_mmxq_mmxq(temp0_639, temp0_638);
0060eeea              st7 = __pfmul_mmxq_mmxq(0, temp0_636);
0060eeee              int64_t temp0_644 = __pfadd_mmxq_mmxq(temp0_640, temp0_641);
0060eef2              int64_t temp0_645 = __pfmul_mmxq_memq(temp0_636, temp0_483);
0060eef8              st7 = __pfadd_mmxq_mmxq(st7, temp0_642);
0060eefc              int64_t temp0_647 = __pfadd_mmxq_mmxq(temp0_645, temp0_644);
0060ef00              *(uint32_t*)((char*)result->__inner0 + 0x30) = st7[0];
0060ef00              *(uint32_t*)((char*)result->__inner0 + 0x34) = st7[1];
0060ef04              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_647;
0060eb13          }
0060eb13          else
0060eb13          {
0060eb1d              st1 = ((uint64_t)*(uint32_t*)((char*)result->__inner0 + 0x38));
0060eb21              z = arg5->x;
0060eb21              *(uint32_t*)((char*)z)[4] = arg5->y;
0060eb24              z_1 = ((uint64_t)arg5->z);
0060eb28              int64_t temp0_484 = __pfsub_mmxq_mmxq(*(uint64_t*)((char*)result->__inner0 + 0x30), z);
0060eb2c              int64_t temp0_485 = __pfsub_mmxq_mmxq(st1, z_1);
0060eb30              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_484;
0060eb34              *(uint32_t*)((char*)result->__inner0 + 0x38) = temp0_485;
0060eb38              st0 = *(uint64_t*)((char*)result->__inner0 + 0);
0060eb3b              st1 = *(uint64_t*)((char*)result->__inner0 + 8);
0060eb44              int64_t temp0_486 = _m_punpckhdq(z, st0);
0060eb4c              int64_t temp0_487 = _m_punpckhdq(z_1, st1);
0060eb54              st0 = _m_punpckldq(st0, st0);
0060eb57              st1 = _m_punpckldq(st1, st1);
0060eb5a              int64_t temp0_490 = __pfmul_mmxq_mmxq(temp0_480, st0);
0060eb5e              int64_t temp0_491 = _m_punpckhdq(temp0_486, temp0_486);
0060eb61              int64_t temp0_492 = __pfmul_mmxq_memq(st0, z_6);
0060eb6c              int64_t temp0_493 = __pfmul_mmxq_mmxq(st6, temp0_491);
0060eb70              int64_t temp0_494 = _m_punpckhdq(temp0_487, temp0_487);
0060eb73              int64_t temp0_495 = __pfmul_mmxq_memq(temp0_491, temp0_481);
0060eb79              int64_t temp0_496 = __pfadd_mmxq_mmxq(temp0_493, temp0_490);
0060eb7d              int64_t temp0_497 = __pfmul_mmxq_mmxq(st5, st1);
0060eb81              int64_t temp0_498 = __pfadd_mmxq_mmxq(temp0_495, temp0_492);
0060eb85              int64_t temp0_499 = __pfmul_mmxq_memq(st1, temp0_479);
0060eb8b              int64_t temp0_500 = __pfadd_mmxq_mmxq(temp0_497, temp0_496);
0060eb8f              st7 = __pfmul_mmxq_mmxq(0, temp0_494);
0060eb93              int64_t temp0_502 = __pfadd_mmxq_mmxq(temp0_498, temp0_499);
0060eb97              int64_t temp0_503 = __pfmul_mmxq_memq(temp0_494, temp0_483);
0060eb9d              st7 = __pfadd_mmxq_mmxq(st7, temp0_500);
0060eba1              st0 = *(uint64_t*)((char*)result->__inner0 + 0x10);
0060eba5              int64_t temp0_505 = __pfadd_mmxq_mmxq(temp0_503, temp0_502);
0060eba9              st1 = *(uint64_t*)((char*)result->__inner0 + 0x18);
0060ebad              *(uint32_t*)((char*)result->__inner0 + 0) = st7[0];
0060ebad              *(uint32_t*)((char*)result->__inner0 + 4) = st7[1];
0060ebb5              *(uint64_t*)((char*)result->__inner0 + 8) = temp0_505;
0060ebb9              int64_t temp0_506 = _m_punpckhdq(temp0_502, st0);
0060ebc1              int64_t temp0_507 = _m_punpckhdq(temp0_505, st1);
0060ebc9              st0 = _m_punpckldq(st0, st0);
0060ebcc              st1 = _m_punpckldq(st1, st1);
0060ebcf              int64_t temp0_510 = __pfmul_mmxq_mmxq(temp0_480, st0);
0060ebd3              int64_t temp0_511 = _m_punpckhdq(temp0_506, temp0_506);
0060ebd6              int64_t temp0_512 = __pfmul_mmxq_memq(st0, z_6);
0060ebe1              int64_t temp0_513 = __pfmul_mmxq_mmxq(st6, temp0_511);
0060ebe5              int64_t temp0_514 = _m_punpckhdq(temp0_507, temp0_507);
0060ebe8              int64_t temp0_515 = __pfmul_mmxq_memq(temp0_511, temp0_481);
0060ebee              int64_t temp0_516 = __pfadd_mmxq_mmxq(temp0_513, temp0_510);
0060ebf2              int64_t temp0_517 = __pfmul_mmxq_mmxq(st5, st1);
0060ebf6              int64_t temp0_518 = __pfadd_mmxq_mmxq(temp0_515, temp0_512);
0060ebfa              int64_t temp0_519 = __pfmul_mmxq_memq(st1, temp0_479);
0060ec00              int64_t temp0_520 = __pfadd_mmxq_mmxq(temp0_517, temp0_516);
0060ec04              st7 = __pfmul_mmxq_mmxq(0, temp0_514);
0060ec08              int64_t temp0_522 = __pfadd_mmxq_mmxq(temp0_518, temp0_519);
0060ec0c              int64_t temp0_523 = __pfmul_mmxq_memq(temp0_514, temp0_483);
0060ec12              st7 = __pfadd_mmxq_mmxq(st7, temp0_520);
0060ec16              st0 = *(uint64_t*)((char*)result->__inner0 + 0x20);
0060ec1a              int64_t temp0_525 = __pfadd_mmxq_mmxq(temp0_523, temp0_522);
0060ec1e              st1 = *(uint64_t*)((char*)result->__inner0 + 0x28);
0060ec22              *(uint32_t*)((char*)result->__inner0 + 0x10) = st7[0];
0060ec22              *(uint32_t*)((char*)result->__inner0 + 0x14) = st7[1];
0060ec2b              *(uint64_t*)((char*)result->__inner0 + 0x18) = temp0_525;
0060ec2f              int64_t temp0_526 = _m_punpckhdq(temp0_522, st0);
0060ec37              int64_t temp0_527 = _m_punpckhdq(temp0_525, st1);
0060ec3f              st0 = _m_punpckldq(st0, st0);
0060ec42              st1 = _m_punpckldq(st1, st1);
0060ec45              int64_t temp0_530 = __pfmul_mmxq_mmxq(temp0_480, st0);
0060ec49              int64_t temp0_531 = _m_punpckhdq(temp0_526, temp0_526);
0060ec4c              int64_t temp0_532 = __pfmul_mmxq_memq(st0, z_6);
0060ec57              int64_t temp0_533 = __pfmul_mmxq_mmxq(st6, temp0_531);
0060ec5b              int64_t temp0_534 = _m_punpckhdq(temp0_527, temp0_527);
0060ec5e              int64_t temp0_535 = __pfmul_mmxq_memq(temp0_531, temp0_481);
0060ec64              int64_t temp0_536 = __pfadd_mmxq_mmxq(temp0_533, temp0_530);
0060ec68              int64_t temp0_537 = __pfmul_mmxq_mmxq(st5, st1);
0060ec6c              int64_t temp0_538 = __pfadd_mmxq_mmxq(temp0_535, temp0_532);
0060ec70              int64_t temp0_539 = __pfmul_mmxq_memq(st1, temp0_479);
0060ec76              int64_t temp0_540 = __pfadd_mmxq_mmxq(temp0_537, temp0_536);
0060ec7a              st7 = __pfmul_mmxq_mmxq(0, temp0_534);
0060ec7e              int64_t temp0_542 = __pfadd_mmxq_mmxq(temp0_538, temp0_539);
0060ec82              int64_t temp0_543 = __pfmul_mmxq_memq(temp0_534, temp0_483);
0060ec88              st7 = __pfadd_mmxq_mmxq(st7, temp0_540);
0060ec8c              st0 = *(uint64_t*)((char*)result->__inner0 + 0x30);
0060ec90              int64_t temp0_545 = __pfadd_mmxq_mmxq(temp0_543, temp0_542);
0060ec94              st1 = *(uint64_t*)((char*)result->__inner0 + 0x38);
0060ec98              *(uint32_t*)((char*)result->__inner0 + 0x20) = st7[0];
0060ec98              *(uint32_t*)((char*)result->__inner0 + 0x24) = st7[1];
0060eca1              *(uint64_t*)((char*)result->__inner0 + 0x28) = temp0_545;
0060eca5              int64_t temp0_546 = _m_punpckhdq(temp0_542, st0);
0060ecad              int64_t temp0_547 = _m_punpckhdq(temp0_545, st1);
0060ecb5              st0 = _m_punpckldq(st0, st0);
0060ecb8              st1 = _m_punpckldq(st1, st1);
0060ecbb              int64_t temp0_550 = __pfmul_mmxq_mmxq(temp0_480, st0);
0060ecbf              int64_t temp0_551 = _m_punpckhdq(temp0_546, temp0_546);
0060ecc2              int64_t temp0_552 = __pfmul_mmxq_memq(st0, z_6);
0060eccd              int64_t temp0_553 = __pfmul_mmxq_mmxq(st6, temp0_551);
0060ecd1              int64_t temp0_554 = _m_punpckhdq(temp0_547, temp0_547);
0060ecd4              int64_t temp0_555 = __pfmul_mmxq_memq(temp0_551, temp0_481);
0060ecda              int64_t temp0_556 = __pfadd_mmxq_mmxq(temp0_553, temp0_550);
0060ecde              int64_t temp0_557 = __pfmul_mmxq_mmxq(st5, st1);
0060ece2              int64_t temp0_558 = __pfadd_mmxq_mmxq(temp0_555, temp0_552);
0060ece6              int64_t temp0_559 = __pfmul_mmxq_memq(st1, temp0_479);
0060ecec              int64_t temp0_560 = __pfadd_mmxq_mmxq(temp0_557, temp0_556);
0060ecf0              st7 = __pfmul_mmxq_mmxq(0, temp0_554);
0060ecf4              int64_t temp0_562 = __pfadd_mmxq_mmxq(temp0_558, temp0_559);
0060ecf8              int64_t temp0_563 = __pfmul_mmxq_memq(temp0_554, temp0_483);
0060ecfe              st7 = __pfadd_mmxq_mmxq(st7, temp0_560);
0060ed02              int64_t temp0_565 = __pfadd_mmxq_mmxq(temp0_563, temp0_562);
0060ed06              *(uint32_t*)((char*)result->__inner0 + 0x30) = st7[0];
0060ed06              *(uint32_t*)((char*)result->__inner0 + 0x34) = st7[1];
0060ed0a              *(uint64_t*)((char*)result->__inner0 + 0x38) = temp0_565;
0060ed12              st1 = ((uint64_t)*(uint32_t*)((char*)result->__inner0 + 0x38));
0060ed16              z = arg5->x;
0060ed16              *(uint32_t*)((char*)z)[4] = arg5->y;
0060ed19              z_1 = ((uint64_t)arg5->z);
0060ed1d              int64_t temp0_566 = __pfadd_mmxq_mmxq(*(uint64_t*)((char*)result->__inner0 + 0x30), z);
0060ed21              int64_t temp0_567 = __pfadd_mmxq_mmxq(st1, z_1);
0060ed25              *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_566;
0060ed29              *(uint32_t*)((char*)result->__inner0 + 0x38) = temp0_567;
0060eb13          }
0060ea5a      }
0060ea5a      
0060ef0d      if (arg7 != 0)
0060ef0d      {
0060ef13          st1 = ((uint64_t)*(uint32_t*)((char*)result->__inner0 + 0x38));
0060ef17          z = arg7->x;
0060ef17          *(uint32_t*)((char*)z)[4] = arg7->y;
0060ef1a          z_1 = ((uint64_t)arg7->z);
0060ef1e          int64_t temp0_648 = __pfadd_mmxq_mmxq(*(uint64_t*)((char*)result->__inner0 + 0x30), z);
0060ef22          int64_t temp0_649 = __pfadd_mmxq_mmxq(st1, z_1);
0060ef26          *(uint64_t*)((char*)result->__inner0 + 0x30) = temp0_648;
0060ef2a          *(uint32_t*)((char*)result->__inner0 + 0x38) = temp0_649;
0060ef0d      }
0060ef0d      
0060ef31      __femms();
0060ef33      return result;
0060dd7e  }


0060ef36  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixInverse_K7(struct D3DXMATRIX* arg1, float* arg2, struct D3DXMATRIX const* arg3)

0060ef36  {
0060ef3d      int64_t st1 = *(uint64_t*)((char*)arg3->__inner0 + 0x10);
0060ef41      int64_t st2 = *(uint64_t*)((char*)arg3->__inner0 + 0x20);
0060ef45      int64_t st5;
0060ef45      int64_t temp0 = __pswapd_mmxq_mmxq(st5, st1);
0060ef49      uint32_t st3[0x2];
0060ef49      st3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
0060ef49      st3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
0060ef4d      uint32_t st4[0x2] = __pswapd_mmxq_mmxq(st4, st2);
0060ef51      int64_t st0 = *(uint64_t*)((char*)arg3->__inner0 + 0);
0060ef54      int64_t st6;
0060ef54      int64_t temp0_2 = __pswapd_mmxq_mmxq(st6, st3);
0060ef58      uint32_t st7[0x2] = __pswapd_mmxq_mmxq(st7, st2);
0060ef5c      int64_t temp0_4 = __pfmul_mmxq_mmxq(temp0, st0);
0060ef60      st4 = __pfmul_mmxq_mmxq(st4, st0);
0060ef64      int64_t temp0_6 = __pfmul_mmxq_mmxq(temp0_2, st0);
0060ef68      int64_t temp0_7 = __pswapd_mmxq_mmxq(st0, st3);
0060ef6c      st7 = __pfmul_mmxq_mmxq(st7, st1);
0060ef70      int64_t temp0_9 = __pfnacc_mmxq_mmxq(temp0_4, st4);
0060ef74      int64_t temp0_10 = __pfmul_mmxq_mmxq(st1, temp0_7);
0060ef78      int64_t temp0_11 = __pfmul_mmxq_mmxq(st2, temp0_7);
0060ef7c      int64_t temp0_12 = __pfnacc_mmxq_mmxq(temp0_6, st7);
0060ef80      int64_t temp0_13 = __pfnacc_mmxq_mmxq(temp0_10, temp0_11);
0060ef84      st0 = *(uint64_t*)((char*)arg3->__inner0 + 0x38);
0060ef8b      st4 = temp0_13;
0060ef8e      st7[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x28);
0060ef8e      st7[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x2c);
0060ef92      int64_t temp0_14 = _m_punpckhdq(temp0_12, temp0_12);
0060ef95      st3 = temp0_13;
0060ef98      st4 = _m_punpckhdq(st4, st4[0]);
0060ef9b      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_14, st0);
0060ef9f      uint32_t temp0_17[0x2] = _m_punpckldq(st3, st3[0]);
0060efa2      st4 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060efa7      st3 = __pfmul_mmxq_mmxq(temp0_17, st7);
0060efab      int64_t temp0_20 = __pfadd_mmxq_mmxq(temp0_16, st4);
0060efaf      st4 = temp0_12;
0060efb2      int64_t temp0_21 = __pfsub_mmxq_mmxq(temp0_20, st3);
0060efb6      st3 = temp0_13;
0060efb9      uint32_t temp0_22[0x2] = _m_punpckldq(st4, st4[0]);
0060efc4      st3 = _m_punpckhdq(st3, st3[0]);
0060efc7      int64_t temp0_24 = _m_punpckhdq(temp0_9, temp0_9);
0060efca      st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060efcf      int64_t temp0_26 = __pfmul_mmxq_mmxq(temp0_24, st0);
0060efd3      st4 = __pfmul_mmxq_mmxq(temp0_22, st7);
0060efdb      int64_t temp0_29 = __pfadd_mmxq_mmxq(__pfsub_mmxq_mmxq(temp0_26, st4), st3);
0060efe7      st3 = temp0_12;
0060efea      st1 = _m_punpckldq(temp0_13, temp0_13);
0060efed      st2 = _m_punpckldq(temp0_9, temp0_9);
0060eff0      uint32_t temp0_32[0x2] = _m_punpckldq(st3, st3[0]);
0060eff3      int64_t temp0_33 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060eff8      int64_t temp0_34 = __pfmul_mmxq_mmxq(st0, st2);
0060effc      st3 = __pfmul_mmxq_memq(temp0_32, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060f005      int64_t temp0_37 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_34, temp0_33), st3);
0060f00e      int64_t temp0_38 = _m_punpckhdq(temp0_9, temp0_9);
0060f011      int64_t temp0_39 = _m_punpckhdq(temp0_12, temp0_12);
0060f014      int64_t temp0_40 = __pfmul_mmxq_mmxq(st2, st7);
0060f018      int64_t temp0_41 = __pfmul_mmxq_memq(temp0_38, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060f01d      st0 = *(uint64_t*)((char*)arg3->__inner0 + 8);
0060f021      int64_t temp0_42 = __pfmul_mmxq_memq(temp0_39, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060f02a      int64_t temp0_44 = __pfadd_mmxq_mmxq(__pfsub_mmxq_mmxq(temp0_40, temp0_41), temp0_42);
0060f033      st1 = *(uint64_t*)((char*)arg3->__inner0 + 0x18);
0060f037      st2 = *(uint64_t*)((char*)arg3->__inner0 + 0x28);
0060f03b      st3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
0060f03b      st3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
0060f03f      int64_t temp0_45 = __pswapd_mmxq_mmxq(temp0_41, st1);
0060f043      st4 = __pswapd_mmxq_mmxq(st4, st2);
0060f047      int64_t temp0_47 = __pfmul_mmxq_mmxq(temp0_45, st0);
0060f04b      int64_t temp0_48 = __pswapd_mmxq_mmxq(temp0_42, st3);
0060f04f      st4 = __pfmul_mmxq_mmxq(st4, st0);
0060f053      st7 = __pswapd_mmxq_mmxq(st7, st2);
0060f057      int64_t temp0_51 = __pfmul_mmxq_mmxq(temp0_48, st0);
0060f05b      int64_t temp0_52 = __pswapd_mmxq_mmxq(st0, st3);
0060f05f      int64_t temp0_53 = __pfnacc_mmxq_mmxq(temp0_47, st4);
0060f063      st7 = __pfmul_mmxq_mmxq(st7, st1);
0060f067      int64_t temp0_55 = __pfmul_mmxq_mmxq(st1, temp0_52);
0060f06b      int64_t temp0_56 = __pfmul_mmxq_mmxq(st2, temp0_52);
0060f06f      int64_t temp0_57 = __pfnacc_mmxq_mmxq(temp0_51, st7);
0060f073      int64_t temp0_58 = __pfnacc_mmxq_mmxq(temp0_55, temp0_56);
0060f077      st0 = *(uint64_t*)((char*)arg3->__inner0 + 0x30);
0060f07b      st4 = temp0_58;
0060f07e      st3 = temp0_58;
0060f081      st7[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
0060f081      st7[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
0060f088      st4 = _m_punpckhdq(st4, st4[0]);
0060f08b      uint32_t temp0_60[0x2] = _m_punpckldq(st3, st3[0]);
0060f08e      int64_t temp0_61 = _m_punpckhdq(temp0_57, temp0_57);
0060f091      st4 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg3->__inner0 + 0x10));
0060f096      int64_t temp0_63 = __pfmul_mmxq_mmxq(temp0_61, st0);
0060f09a      st3 = __pfmul_mmxq_mmxq(temp0_60, st7);
0060f0a2      int64_t temp0_66 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_63, st4), st3);
0060f0aa      st3 = temp0_58;
0060f0ad      st4 = temp0_57;
0060f0b3      st3 = _m_punpckhdq(st3, st3[0]);
0060f0b6      uint32_t temp0_68[0x2] = _m_punpckldq(st4, st4[0]);
0060f0b9      int64_t temp0_69 = _m_punpckhdq(temp0_53, temp0_53);
0060f0bc      st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg3->__inner0 + 0));
0060f0cc      int64_t temp0_74 = __pfadd_mmxq_mmxq(__pfsub_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_69, st0), __pfmul_mmxq_mmxq(temp0_68, st7)), st3);
0060f0db      st3 = temp0_57;
0060f0de      st1 = _m_punpckldq(temp0_58, temp0_58);
0060f0e1      st2 = _m_punpckldq(temp0_53, temp0_53);
0060f0e4      uint32_t temp0_77[0x2] = _m_punpckldq(st3, st3[0]);
0060f0e7      int64_t temp0_78 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg3->__inner0 + 0));
0060f0eb      int64_t temp0_79 = __pfmul_mmxq_mmxq(st0, st2);
0060f0ef      st3 = __pfmul_mmxq_memq(temp0_77, *(uint64_t*)((char*)arg3->__inner0 + 0x10));
0060f0f8      int64_t temp0_82 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_79, temp0_78), st3);
0060f101      int64_t temp0_83 = _m_punpckhdq(temp0_53, temp0_53);
0060f104      int64_t temp0_84 = _m_punpckhdq(temp0_57, temp0_57);
0060f107      int64_t temp0_85 = __pfmul_mmxq_mmxq(st2, st7);
0060f10b      int64_t temp0_86 = __pfmul_mmxq_memq(temp0_83, *(uint64_t*)((char*)arg3->__inner0 + 0x10));
0060f110      int64_t temp0_87 = __pfmul_mmxq_memq(temp0_84, *(uint64_t*)((char*)arg3->__inner0 + 0));
0060f118      int64_t temp0_89 = __pfadd_mmxq_mmxq(__pfsub_mmxq_mmxq(temp0_85, temp0_86), temp0_87);
0060f121      int64_t temp0_90 = _m_punpckhdq(temp0_82, temp0_89);
0060f124      uint32_t temp0_91[0x2] = _m_punpckldq(st7, st0[0]);
0060f127      st3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
0060f127      st3[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
0060f12e      uint32_t temp0_92[0x2] = __punpckldq_mmxq_memd(st3, *(uint32_t*)((char*)arg3->__inner0 + 0x10));
0060f132      int64_t temp0_93 = __punpckhdq_mmxq_memq(temp0_66, temp0_74);
0060f13f      int64_t temp0_96 = __pfnacc_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_90, temp0_91), __pfmul_mmxq_mmxq(temp0_92, temp0_93));
0060f143      int32_t* eax = arg2;
0060f147      int64_t temp0_97 = __pfacc_mmxq_mmxq(temp0_96, temp0_96);
0060f147      
0060f150      if (eax != 0)
0060f152          *(uint32_t*)eax = temp0_97;
0060f152      
0060f155      int64_t temp0_98 = __pfrcp_mmxq_mmxq(temp0_93, temp0_97);
0060f15c      st0 = _m_punpckldq(temp0_97, temp0_97);
0060f15f      st3 = __pfcmpeq_mmxq_mmxq(0, temp0_97);
0060f167      int64_t temp0_102 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(st0, temp0_98), temp0_98);
0060f16b      uint32_t result = st3[0];
0060f16e      int64_t temp0_103 = __pfmul_mmxq_memq(temp0_102, -0x407fffffc0800000);
0060f178      int64_t temp0_104 = __pswapd_mmxq_mmxq(temp0_98, temp0_103);
0060f178      
0060f17c      if (result == 0)
0060f17c      {
0060f182          result = arg1;
0060f199          int64_t temp0_105 = __pfmul_mmxq_mmxq(temp0_66, temp0_104);
0060f19d          st3 = __pfmul_mmxq_mmxq(temp0_74, temp0_103);
0060f1a1          int64_t temp0_107 = __pfmul_mmxq_mmxq(temp0_21, temp0_104);
0060f1a5          int64_t temp0_108 = __pfmul_mmxq_mmxq(temp0_29, temp0_103);
0060f1af          int64_t temp0_109 = _m_punpckhdq(temp0_105, st3[0]);
0060f1b2          uint32_t temp0_110[0x2] = _m_punpckldq(temp0_105, st3[0]);
0060f1b5          int64_t temp0_111 = _m_punpckhdq(temp0_107, temp0_108);
0060f1b8          uint32_t temp0_112[0x2] = _m_punpckldq(temp0_107, temp0_108);
0060f1bb          *(uint64_t*)result = temp0_109;
0060f1be          *(uint64_t*)(result + 0x10) = temp0_110;
0060f1c2          *(uint64_t*)(result + 0x20) = temp0_111;
0060f1c6          *(uint64_t*)(result + 0x30) = temp0_112;
0060f1de          int64_t temp0_113 = __pfmul_mmxq_mmxq(temp0_82, temp0_104);
0060f1e2          st3 = __pfmul_mmxq_mmxq(temp0_89, temp0_103);
0060f1e6          int64_t temp0_115 = __pfmul_mmxq_mmxq(temp0_37, temp0_104);
0060f1ea          int64_t temp0_116 = __pfmul_mmxq_mmxq(temp0_44, temp0_103);
0060f1f4          int64_t temp0_117 = _m_punpckhdq(temp0_113, st3[0]);
0060f1f7          uint32_t temp0_118[0x2] = _m_punpckldq(temp0_113, st3[0]);
0060f1fa          int64_t temp0_119 = _m_punpckhdq(temp0_115, temp0_116);
0060f1fd          uint32_t temp0_120[0x2] = _m_punpckldq(temp0_115, temp0_116);
0060f200          *(uint64_t*)(result + 8) = temp0_117;
0060f204          *(uint64_t*)(result + 0x18) = temp0_118;
0060f208          *(uint64_t*)(result + 0x28) = temp0_119;
0060f20c          *(uint64_t*)(result + 0x38) = temp0_120;
0060f17c      }
0060f17c      
0060f210      __femms();
0060f215      return result;
0060ef36  }


0060f218  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixMultiplyTranspose(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

0060f218  {
0060f218      __femms();
0060f22a      uint32_t st0[0x2];
0060f22a      st0[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
0060f22a      st0[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
0060f22d      int64_t st1 = *(uint64_t*)((char*)arg3->__inner0 + 0x10);
0060f231      uint32_t st3[0x2];
0060f231      st3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x28);
0060f231      st3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x2c);
0060f235      int64_t st4 = *(uint64_t*)((char*)arg3->__inner0 + 0x38);
0060f23c      uint32_t temp0[0x2] = _m_punpckldq(st0, st1);
0060f23f      int64_t temp0_1 = _m_punpckhdq(st0, st1);
0060f24e      int64_t st6 = *(uint64_t*)((char*)arg3->__inner0 + 8);
0060f252      uint32_t temp0_2[0x2] = _m_punpckldq(st3, st4);
0060f255      int64_t st7 = *(uint64_t*)((char*)arg3->__inner0 + 0x18);
0060f259      temp0[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x20);
0060f259      temp0[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x24);
0060f25d      int64_t temp0_3 = _m_punpckhdq(st3, st4);
0060f260      st1 = st6;
0060f273      st6 = _m_punpckldq(st6, st7);
0060f276      st4 = *(uint64_t*)((char*)arg3->__inner0 + 0x30);
0060f27d      int64_t temp0_5 = _m_punpckhdq(st1, st7);
0060f285      st0 = _m_punpckhdq(temp0, st4);
0060f288      int64_t st2 = _m_punpckldq(temp0, st4);
0060f290      uint32_t var_30[0x2] = st0;
0060f290      
0060f29a      if (arg2 != arg1)
0060f29a      {
0060f2a7          st1 = st2;
0060f2ac          st2 = temp0;
0060f2af          st3 = st1;
0060f2b8          st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)((char*)arg2->__inner0 + 0));
0060f2bc          int64_t temp0_9 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 8));
0060f2c4          st7 = st3;
0060f2c7          int64_t temp0_10 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x10));
0060f2cc          st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060f2d1          int64_t temp0_12 = __pfmul_mmxq_memq(temp0, *(uint64_t*)((char*)arg2->__inner0 + 0x20));
0060f2d6          int64_t temp0_13 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 0x28));
0060f2db          int64_t temp0_14 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060f2e0          int64_t temp0_15 = __pfmul_mmxq_memq(st7, *(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060f2e5          st0 = __pfacc_mmxq_mmxq(st0, temp0_10);
0060f2e9          int64_t temp0_17 = __pfacc_mmxq_mmxq(temp0_9, st3);
0060f2ed          int64_t temp0_18 = __pfacc_mmxq_mmxq(temp0_12, temp0_14);
0060f2f1          int64_t temp0_19 = __pfacc_mmxq_mmxq(temp0_13, temp0_15);
0060f2f5          st0 = __pfadd_mmxq_mmxq(st0, temp0_17);
0060f2f9          int64_t temp0_21 = __pfadd_mmxq_mmxq(temp0_18, temp0_19);
0060f2fd          *(uint32_t*)((char*)arg1->__inner0 + 0) = st0[0];
0060f2fd          *(uint32_t*)((char*)arg1->__inner0 + 4) = st0[1];
0060f300          *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_21;
0060f304          st0 = temp0_1;
0060f309          st1 = var_30;
0060f30e          st2 = st0;
0060f311          st3 = st1;
0060f314          st4 = st0;
0060f31a          st0 = __pfmul_mmxq_memq(st0, *(uint64_t*)((char*)arg2->__inner0 + 0));
0060f31e          int64_t temp0_23 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 8));
0060f326          st7 = st3;
0060f329          int64_t temp0_24 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x10));
0060f32e          st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060f333          int64_t temp0_26 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg2->__inner0 + 0x20));
0060f338          int64_t temp0_27 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 0x28));
0060f33d          int64_t temp0_28 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060f342          int64_t temp0_29 = __pfmul_mmxq_memq(st7, *(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060f347          st0 = __pfacc_mmxq_mmxq(st0, temp0_24);
0060f34b          int64_t temp0_31 = __pfacc_mmxq_mmxq(temp0_23, st3);
0060f34f          int64_t temp0_32 = __pfacc_mmxq_mmxq(temp0_26, temp0_28);
0060f353          int64_t temp0_33 = __pfacc_mmxq_mmxq(temp0_27, temp0_29);
0060f357          st0 = __pfadd_mmxq_mmxq(st0, temp0_31);
0060f35b          int64_t temp0_35 = __pfadd_mmxq_mmxq(temp0_32, temp0_33);
0060f35f          *(uint32_t*)((char*)arg1->__inner0 + 0x10) = st0[0];
0060f35f          *(uint32_t*)((char*)arg1->__inner0 + 0x14) = st0[1];
0060f363          *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0_35;
0060f367          st0 = st6;
0060f36c          st1 = temp0_2;
0060f371          st2 = st0;
0060f374          st3 = st1;
0060f377          st4 = st0;
0060f37d          st0 = __pfmul_mmxq_memq(st0, *(uint64_t*)((char*)arg2->__inner0 + 0));
0060f381          int64_t temp0_37 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 8));
0060f389          st7 = st3;
0060f38c          int64_t temp0_38 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x10));
0060f391          st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060f396          int64_t temp0_40 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg2->__inner0 + 0x20));
0060f39b          int64_t temp0_41 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 0x28));
0060f3a0          int64_t temp0_42 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060f3a5          int64_t temp0_43 = __pfmul_mmxq_memq(st7, *(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060f3aa          st0 = __pfacc_mmxq_mmxq(st0, temp0_38);
0060f3ae          int64_t temp0_45 = __pfacc_mmxq_mmxq(temp0_37, st3);
0060f3b2          int64_t temp0_46 = __pfacc_mmxq_mmxq(temp0_40, temp0_42);
0060f3b6          int64_t temp0_47 = __pfacc_mmxq_mmxq(temp0_41, temp0_43);
0060f3ba          st0 = __pfadd_mmxq_mmxq(st0, temp0_45);
0060f3be          int64_t temp0_49 = __pfadd_mmxq_mmxq(temp0_46, temp0_47);
0060f3c2          *(uint32_t*)((char*)arg1->__inner0 + 0x20) = st0[0];
0060f3c2          *(uint32_t*)((char*)arg1->__inner0 + 0x24) = st0[1];
0060f3c6          *(uint64_t*)((char*)arg1->__inner0 + 0x28) = temp0_49;
0060f3ca          st0 = temp0_5;
0060f3d4          st2 = st0;
0060f3d7          st3 = temp0_3;
0060f3da          st4 = st0;
0060f3e0          st0 = __pfmul_mmxq_memq(st0, *(uint64_t*)((char*)arg2->__inner0 + 0));
0060f3e4          int64_t temp0_51 = __pfmul_mmxq_memq(temp0_3, *(uint64_t*)((char*)arg2->__inner0 + 8));
0060f3ec          st7 = st3;
0060f3ef          int64_t temp0_52 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x10));
0060f3f4          st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060f3f9          int64_t temp0_54 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg2->__inner0 + 0x20));
0060f3fe          int64_t temp0_55 = __pfmul_mmxq_memq(temp0_3, *(uint64_t*)((char*)arg2->__inner0 + 0x28));
0060f403          int64_t temp0_56 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060f408          int64_t temp0_57 = __pfmul_mmxq_memq(st7, *(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060f40d          st0 = __pfacc_mmxq_mmxq(st0, temp0_52);
0060f411          int64_t temp0_59 = __pfacc_mmxq_mmxq(temp0_51, st3);
0060f415          int64_t temp0_60 = __pfacc_mmxq_mmxq(temp0_54, temp0_56);
0060f419          int64_t temp0_61 = __pfacc_mmxq_mmxq(temp0_55, temp0_57);
0060f41d          st0 = __pfadd_mmxq_mmxq(st0, temp0_59);
0060f421          int64_t temp0_63 = __pfadd_mmxq_mmxq(temp0_60, temp0_61);
0060f425          *(uint32_t*)((char*)arg1->__inner0 + 0x30) = st0[0];
0060f425          *(uint32_t*)((char*)arg1->__inner0 + 0x34) = st0[1];
0060f429          *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_63;
0060f436          __femms();
0060f438          return arg1;
0060f29a      }
0060f29a      
0060f442      st1 = st2;
0060f447      st2 = temp0;
0060f44a      st3 = st1;
0060f453      st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)((char*)arg2->__inner0 + 0));
0060f457      int64_t temp0_65 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 8));
0060f45f      st7 = st3;
0060f462      int64_t temp0_66 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x10));
0060f467      st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060f46c      int64_t temp0_68 = __pfmul_mmxq_memq(temp0, *(uint64_t*)((char*)arg2->__inner0 + 0x20));
0060f471      int64_t temp0_69 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 0x28));
0060f476      int64_t temp0_70 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060f47b      int64_t temp0_71 = __pfmul_mmxq_memq(st7, *(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060f480      st0 = __pfacc_mmxq_mmxq(st0, temp0_66);
0060f484      int64_t temp0_73 = __pfacc_mmxq_mmxq(temp0_65, st3);
0060f488      int64_t temp0_74 = __pfacc_mmxq_mmxq(temp0_68, temp0_70);
0060f48c      int64_t temp0_75 = __pfacc_mmxq_mmxq(temp0_69, temp0_71);
0060f490      st0 = __pfadd_mmxq_mmxq(st0, temp0_73);
0060f494      int64_t temp0_77 = __pfadd_mmxq_mmxq(temp0_74, temp0_75);
0060f498      uint32_t var_48_1[0x2] = st0;
0060f4a1      st0 = temp0_1;
0060f4a6      st1 = var_30;
0060f4ab      st2 = st0;
0060f4ae      st3 = st1;
0060f4b1      st4 = st0;
0060f4b7      st0 = __pfmul_mmxq_memq(st0, *(uint64_t*)((char*)arg2->__inner0 + 0));
0060f4bb      int64_t temp0_79 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 8));
0060f4c3      st7 = st3;
0060f4c6      int64_t temp0_80 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x10));
0060f4cb      st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060f4d0      int64_t temp0_82 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg2->__inner0 + 0x20));
0060f4d5      int64_t temp0_83 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 0x28));
0060f4da      int64_t temp0_84 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060f4df      int64_t temp0_85 = __pfmul_mmxq_memq(st7, *(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060f4e4      st0 = __pfacc_mmxq_mmxq(st0, temp0_80);
0060f4e8      int64_t temp0_87 = __pfacc_mmxq_mmxq(temp0_79, st3);
0060f4ec      int64_t temp0_88 = __pfacc_mmxq_mmxq(temp0_82, temp0_84);
0060f4f0      int64_t temp0_89 = __pfacc_mmxq_mmxq(temp0_83, temp0_85);
0060f4f4      st0 = __pfadd_mmxq_mmxq(st0, temp0_87);
0060f4f8      int64_t temp0_91 = __pfadd_mmxq_mmxq(temp0_88, temp0_89);
0060f4fc      uint32_t var_38_1[0x2] = st0;
0060f506      st0 = st6;
0060f50b      st1 = temp0_2;
0060f510      st2 = st0;
0060f513      st3 = st1;
0060f516      st4 = st0;
0060f51c      st0 = __pfmul_mmxq_memq(st0, *(uint64_t*)((char*)arg2->__inner0 + 0));
0060f520      int64_t temp0_93 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 8));
0060f528      st7 = st3;
0060f52b      int64_t temp0_94 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x10));
0060f530      st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060f535      int64_t temp0_96 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg2->__inner0 + 0x20));
0060f53a      int64_t temp0_97 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg2->__inner0 + 0x28));
0060f53f      int64_t temp0_98 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060f544      int64_t temp0_99 = __pfmul_mmxq_memq(st7, *(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060f549      st0 = __pfacc_mmxq_mmxq(st0, temp0_94);
0060f54d      int64_t temp0_101 = __pfacc_mmxq_mmxq(temp0_93, st3);
0060f551      int64_t temp0_102 = __pfacc_mmxq_mmxq(temp0_96, temp0_98);
0060f555      int64_t temp0_103 = __pfacc_mmxq_mmxq(temp0_97, temp0_99);
0060f559      st0 = __pfadd_mmxq_mmxq(st0, temp0_101);
0060f55d      int64_t temp0_105 = __pfadd_mmxq_mmxq(temp0_102, temp0_103);
0060f561      uint32_t var_28_1[0x2] = st0;
0060f56b      st0 = temp0_5;
0060f575      st2 = st0;
0060f578      st3 = temp0_3;
0060f57b      st4 = st0;
0060f581      st0 = __pfmul_mmxq_memq(st0, *(uint64_t*)((char*)arg2->__inner0 + 0));
0060f585      int64_t temp0_107 = __pfmul_mmxq_memq(temp0_3, *(uint64_t*)((char*)arg2->__inner0 + 8));
0060f58d      st7 = st3;
0060f590      int64_t temp0_108 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x10));
0060f595      st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg2->__inner0 + 0x18));
0060f59a      int64_t temp0_110 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg2->__inner0 + 0x20));
0060f59f      int64_t temp0_111 = __pfmul_mmxq_memq(temp0_3, *(uint64_t*)((char*)arg2->__inner0 + 0x28));
0060f5a4      int64_t temp0_112 = __pfmul_mmxq_memq(st2, *(uint64_t*)((char*)arg2->__inner0 + 0x30));
0060f5a9      int64_t temp0_113 = __pfmul_mmxq_memq(st7, *(uint64_t*)((char*)arg2->__inner0 + 0x38));
0060f5ae      st0 = __pfacc_mmxq_mmxq(st0, temp0_108);
0060f5b2      int64_t temp0_115 = __pfacc_mmxq_mmxq(temp0_107, st3);
0060f5b6      int64_t temp0_116 = __pfacc_mmxq_mmxq(temp0_110, temp0_112);
0060f5ba      int64_t temp0_117 = __pfacc_mmxq_mmxq(temp0_111, temp0_113);
0060f5be      st0 = __pfadd_mmxq_mmxq(st0, temp0_115);
0060f5c2      int64_t temp0_119 = __pfadd_mmxq_mmxq(temp0_116, temp0_117);
0060f5c6      *(uint32_t*)((char*)arg1->__inner0 + 0x30) = st0[0];
0060f5c6      *(uint32_t*)((char*)arg1->__inner0 + 0x34) = st0[1];
0060f5ca      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_119;
0060f5dc      st3 = temp0_91;
0060f5eb      *(uint32_t*)((char*)arg1->__inner0 + 0) = var_48_1[0];
0060f5eb      *(uint32_t*)((char*)arg1->__inner0 + 4) = var_48_1[1];
0060f5ee      *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_77;
0060f5f2      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = var_38_1;
0060f5f6      *(uint32_t*)((char*)arg1->__inner0 + 0x18) = st3[0];
0060f5f6      *(uint32_t*)((char*)arg1->__inner0 + 0x1c) = st3[1];
0060f5fa      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = var_28_1;
0060f5fe      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = temp0_105;
0060f60b      __femms();
0060f60d      return arg1;
0060f218  }


0060f610  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixInverse_inline(struct D3DXMATRIX* arg1, float* arg2, struct D3DXMATRIX const* arg3)

0060f610  {
0060f61b      uint32_t st0[0x2];
0060f61b      st0[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
0060f61b      st0[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
0060f61e      int64_t st1 = *(uint64_t*)((char*)arg3->__inner0 + 0x10);
0060f622      int64_t st2 = *(uint64_t*)((char*)arg3->__inner0 + 0x20);
0060f632      uint32_t st4[0x2] = _m_punpckhdq(st0, st0[0]);
0060f635      int64_t st6 = _m_punpckldq(st1, st2);
0060f638      uint32_t temp0_2[0x2] = _m_punpckldq(st0, st0[0]);
0060f63b      int64_t temp0_3 = _m_punpckhdq(st1, st2);
0060f63e      st4 = __pfmul_mmxq_mmxq(st4, st6);
0060f642      uint32_t st5[0x2] = __pfmul_mmxq_mmxq(temp0_2, temp0_3);
0060f646      uint32_t st3[0x2];
0060f646      st3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
0060f646      st3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
0060f64d      st5 = __pfsub_mmxq_mmxq(st5, st4);
0060f651      uint32_t temp0_7[0x2] = _m_punpckldq(st0, st1);
0060f654      int64_t temp0_8 = _m_punpckhdq(st0, st1);
0060f657      st6 = st3;
0060f65a      st4 = st3;
0060f65d      st3 = _m_punpckhdq(st3, st3[0]);
0060f660      int64_t temp0_10 = _m_punpckhdq(st6, st2);
0060f663      uint32_t temp0_11[0x2] = _m_punpckldq(st4, st2);
0060f666      int64_t temp0_12 = _m_punpckhdq(st1, st2);
0060f669      int64_t temp0_13 = __pfmul_mmxq_mmxq(temp0_10, temp0_7);
0060f66d      st0 = _m_punpckhdq(temp0_7, temp0_11[0]);
0060f670      int64_t temp0_15 = __pfmul_mmxq_mmxq(temp0_8, temp0_11);
0060f674      uint32_t temp0_16[0x2] = _m_punpckldq(temp0_11, temp0_11[0]);
0060f677      st0 = __pfmul_mmxq_mmxq(st0, st3);
0060f67b      int64_t temp0_18 = __pfmul_mmxq_mmxq(temp0_12, temp0_16);
0060f67f      int64_t temp0_19 = __pfsub_mmxq_mmxq(temp0_13, temp0_15);
0060f683      int64_t temp0_20 = __pfsubr_mmxq_mmxq(temp0_18, st0);
0060f687      st0[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
0060f687      st0[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
0060f68e      st4 = temp0_20;
0060f691      int64_t st7 = *(uint64_t*)((char*)arg3->__inner0 + 0x28);
0060f695      int64_t temp0_21 = _m_punpckhdq(temp0_19, temp0_19);
0060f698      st3 = temp0_20;
0060f69b      st4 = _m_punpckhdq(st4, st4[0]);
0060f69e      int64_t temp0_23 = __pfmul_mmxq_mmxq(temp0_21, st0);
0060f6a2      uint32_t temp0_24[0x2] = _m_punpckldq(st3, st3[0]);
0060f6a5      st4 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060f6aa      st3 = __pfmul_mmxq_mmxq(temp0_24, st7);
0060f6ae      int64_t temp0_27 = __pfadd_mmxq_mmxq(temp0_23, st4);
0060f6b2      st4 = temp0_19;
0060f6b5      int64_t temp0_28 = __pfsub_mmxq_mmxq(temp0_27, st3);
0060f6b9      st3 = temp0_20;
0060f6bc      uint32_t temp0_29[0x2] = _m_punpckldq(st4, st4[0]);
0060f6c3      st2 = st5;
0060f6c6      st3 = _m_punpckhdq(st3, st3[0]);
0060f6c9      int64_t temp0_31 = _m_punpckhdq(st2, st2);
0060f6cc      st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060f6dd      int64_t temp0_36 = __pfadd_mmxq_mmxq(__pfsub_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_31, st0), __pfmul_mmxq_mmxq(temp0_29, st7)), st3);
0060f6e5      st2 = st5;
0060f6e8      st3 = temp0_19;
0060f6eb      st1 = _m_punpckldq(temp0_20, temp0_20);
0060f6ee      st2 = _m_punpckldq(st2, st2);
0060f6f1      uint32_t temp0_39[0x2] = _m_punpckldq(st3, st3[0]);
0060f6f4      int64_t temp0_40 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060f6f9      st0 = __pfmul_mmxq_mmxq(st0, st2);
0060f6fd      st3 = __pfmul_mmxq_memq(temp0_39, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060f706      st0 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(st0, temp0_40), st3);
0060f70a      uint32_t var_20[0x2] = st0;
0060f70e      st5 = _m_punpckhdq(st5, st5[0]);
0060f711      int64_t temp0_46 = _m_punpckhdq(temp0_19, temp0_19);
0060f714      int64_t temp0_47 = __pfmul_mmxq_mmxq(st2, st7);
0060f718      st5 = __pfmul_mmxq_memq(st5, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060f71d      int64_t temp0_49 = __pfmul_mmxq_memq(temp0_46, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060f726      int64_t temp0_51 = __pfadd_mmxq_mmxq(__pfsub_mmxq_mmxq(temp0_47, st5), temp0_49);
0060f72e      st0[0] = *(uint32_t*)((char*)arg3->__inner0 + 8);
0060f72e      st0[1] = *(uint32_t*)((char*)arg3->__inner0 + 0xc);
0060f732      st1 = *(uint64_t*)((char*)arg3->__inner0 + 0x18);
0060f736      st2 = *(uint64_t*)((char*)arg3->__inner0 + 0x28);
0060f746      st4 = _m_punpckhdq(st0, st0[0]);
0060f749      st6 = _m_punpckldq(st1, st2);
0060f74c      uint32_t temp0_54[0x2] = _m_punpckldq(st0, st0[0]);
0060f74f      int64_t temp0_55 = _m_punpckhdq(st1, st2);
0060f752      st4 = __pfmul_mmxq_mmxq(st4, st6);
0060f756      st5 = __pfmul_mmxq_mmxq(temp0_54, temp0_55);
0060f75a      st3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x38);
0060f75a      st3[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x3c);
0060f761      st5 = __pfsub_mmxq_mmxq(st5, st4);
0060f765      uint32_t temp0_59[0x2] = _m_punpckldq(st0, st1);
0060f768      int64_t temp0_60 = _m_punpckhdq(st0, st1);
0060f76b      st6 = st3;
0060f76e      st4 = st3;
0060f771      st3 = _m_punpckhdq(st3, st3[0]);
0060f774      int64_t temp0_62 = _m_punpckhdq(st6, st2);
0060f777      uint32_t temp0_63[0x2] = _m_punpckldq(st4, st2);
0060f77a      int64_t temp0_64 = _m_punpckhdq(st1, st2);
0060f77d      int64_t temp0_65 = __pfmul_mmxq_mmxq(temp0_62, temp0_59);
0060f781      st0 = _m_punpckhdq(temp0_59, temp0_63[0]);
0060f784      int64_t temp0_67 = __pfmul_mmxq_mmxq(temp0_60, temp0_63);
0060f788      uint32_t temp0_68[0x2] = _m_punpckldq(temp0_63, temp0_63[0]);
0060f78b      st0 = __pfmul_mmxq_mmxq(st0, st3);
0060f78f      int64_t temp0_70 = __pfmul_mmxq_mmxq(temp0_64, temp0_68);
0060f793      int64_t temp0_71 = __pfsub_mmxq_mmxq(temp0_65, temp0_67);
0060f797      int64_t temp0_72 = __pfsubr_mmxq_mmxq(temp0_70, st0);
0060f79b      st0[0] = *(uint32_t*)((char*)arg3->__inner0 + 0x30);
0060f79b      st0[1] = *(uint32_t*)((char*)arg3->__inner0 + 0x34);
0060f79f      st4 = temp0_72;
0060f7a2      st3 = temp0_72;
0060f7a5      st7 = *(uint64_t*)((char*)arg3->__inner0 + 0x20);
0060f7ac      st4 = _m_punpckhdq(st4, st4[0]);
0060f7af      uint32_t temp0_74[0x2] = _m_punpckldq(st3, st3[0]);
0060f7b2      int64_t temp0_75 = _m_punpckhdq(temp0_71, temp0_71);
0060f7b5      st4 = __pfmul_mmxq_memq(st4, *(uint64_t*)((char*)arg3->__inner0 + 0x10));
0060f7ba      int64_t temp0_77 = __pfmul_mmxq_mmxq(temp0_75, st0);
0060f7be      st3 = __pfmul_mmxq_mmxq(temp0_74, st7);
0060f7c6      int64_t temp0_80 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_77, st4), st3);
0060f7ce      st3 = temp0_72;
0060f7d1      st4 = temp0_71;
0060f7d4      st2 = st5;
0060f7d7      st3 = _m_punpckhdq(st3, st3[0]);
0060f7da      uint32_t temp0_82[0x2] = _m_punpckldq(st4, st4[0]);
0060f7dd      int64_t temp0_83 = _m_punpckhdq(st2, st2);
0060f7e0      st3 = __pfmul_mmxq_memq(st3, *(uint64_t*)((char*)arg3->__inner0 + 0));
0060f7f0      int64_t temp0_88 = __pfadd_mmxq_mmxq(__pfsub_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_83, st0), __pfmul_mmxq_mmxq(temp0_82, st7)), st3);
0060f7f8      st4 = st0;
0060f7fb      st2 = st5;
0060f7fe      st3 = temp0_71;
0060f801      st1 = _m_punpckldq(temp0_72, temp0_72);
0060f804      st2 = _m_punpckldq(st2, st2);
0060f807      uint32_t temp0_91[0x2] = _m_punpckldq(st3, st3[0]);
0060f80a      int64_t temp0_92 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg3->__inner0 + 0));
0060f80e      st0 = __pfmul_mmxq_mmxq(st0, st2);
0060f812      st3 = __pfmul_mmxq_memq(temp0_91, *(uint64_t*)((char*)arg3->__inner0 + 0x10));
0060f81b      st0 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(st0, temp0_92), st3);
0060f81f      uint32_t var_28[0x2] = st0;
0060f823      st5 = _m_punpckhdq(st5, st5[0]);
0060f826      int64_t temp0_98 = _m_punpckhdq(temp0_71, temp0_71);
0060f829      int64_t temp0_99 = __pfmul_mmxq_mmxq(st2, st7);
0060f82d      st5 = __pfmul_mmxq_memq(st5, *(uint64_t*)((char*)arg3->__inner0 + 0x10));
0060f832      int64_t temp0_101 = __pfmul_mmxq_memq(temp0_98, *(uint64_t*)((char*)arg3->__inner0 + 0));
0060f83a      int64_t temp0_103 = __pfadd_mmxq_mmxq(__pfsub_mmxq_mmxq(temp0_99, st5), temp0_101);
0060f842      st7 = _m_punpckldq(st7, st4[0]);
0060f845      st3[0] = *(uint32_t*)((char*)arg3->__inner0 + 0);
0060f845      st3[1] = *(uint32_t*)((char*)arg3->__inner0 + 4);
0060f848      st0 = _m_punpckhdq(st0, temp0_103);
0060f84b      int64_t temp0_106 = __pfmul_mmxq_memq(st7, -0x407fffffc0800000);
0060f857      uint32_t temp0_107[0x2] = __punpckldq_mmxq_memd(st3, *(uint32_t*)((char*)arg3->__inner0 + 0x10));
0060f85b      int64_t temp0_108 = __punpckhdq_mmxq_memq(temp0_80, temp0_88);
0060f85f      st3 = __pfmul_mmxq_memq(temp0_107, -0x407fffffc0800000);
0060f86f      st0 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(st0, temp0_106), __pfmul_mmxq_mmxq(st3, temp0_108));
0060f876      st0 = __pfacc_mmxq_mmxq(st0, st0);
0060f876      
0060f87f      if (arg2 != 0)
0060f881          *(uint32_t*)arg2 = st0[0];
0060f881      
0060f884      int64_t temp0_114 = __pfrcp_mmxq_mmxq(temp0_108, st0);
0060f88b      uint32_t temp0_115[0x2] = _m_punpckldq(st0, st0[0]);
0060f88e      st3 = __pfcmpeq_mmxq_mmxq(0, st0);
0060f896      st0 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_115, temp0_114), temp0_114);
0060f89a      int64_t* result = st3[0];
0060f89d      st0 = __pfmul_mmxq_memq(st0, -0x407fffffc0800000);
0060f8a7      st1 = st0;
0060f8ad      int64_t temp0_121 = _m_punpckhdq(st1, _m_punpckldq(temp0_103, st1));
0060f8ad      
0060f8b0      if (result == 0)
0060f8b0      {
0060f8b6          result = arg1;
0060f8c9          int64_t temp0_122 = __pfmul_mmxq_mmxq(temp0_80, temp0_121);
0060f8cd          st3 = __pfmul_mmxq_mmxq(temp0_88, st0);
0060f8d1          st5 = __pfmul_mmxq_mmxq(temp0_28, temp0_121);
0060f8d5          int64_t temp0_125 = __pfmul_mmxq_mmxq(temp0_36, st0);
0060f8dc          st7 = st5;
0060f8df          int64_t temp0_126 = _m_punpckhdq(temp0_122, st3[0]);
0060f8e2          uint32_t temp0_127[0x2] = _m_punpckldq(temp0_122, st3[0]);
0060f8e5          st5 = _m_punpckhdq(st5, temp0_125);
0060f8e8          st7 = _m_punpckldq(st7, temp0_125);
0060f8eb          *(uint64_t*)result = temp0_126;
0060f8ee          result[2] = temp0_127;
0060f8f2          result[4] = st5;
0060f8f6          result[6] = st7;
0060f90a          int64_t temp0_130 = __pfmul_mmxq_mmxq(var_28, temp0_121);
0060f90e          st3 = __pfmul_mmxq_mmxq(temp0_103, st0);
0060f912          st5 = __pfmul_mmxq_mmxq(var_20, temp0_121);
0060f916          int64_t temp0_133 = __pfmul_mmxq_mmxq(temp0_51, st0);
0060f91d          st7 = st5;
0060f920          int64_t temp0_134 = _m_punpckhdq(temp0_130, st3[0]);
0060f923          uint32_t temp0_135[0x2] = _m_punpckldq(temp0_130, st3[0]);
0060f926          st5 = _m_punpckhdq(st5, temp0_133);
0060f929          st7 = _m_punpckldq(st7, temp0_133);
0060f92c          result[1] = temp0_134;
0060f930          result[3] = temp0_135;
0060f934          result[5] = st5;
0060f938          result[7] = st7;
0060f8b0      }
0060f8b0      
0060f943      return result;
0060f610  }


0060f946  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixInverse(struct D3DXMATRIX* arg1, float* arg2, struct D3DXMATRIX const* arg3)

0060f946  {
0060f94b      __femms();
0060f956      x3d_D3DXMatrixInverse_inline(arg1, arg2, arg3);
0060f95b      __femms();
0060f961      return arg1;
0060f946  }


0060f964  uint32_t (*)[0x2] __stdcall _x3d_D3DXVec3Transform@12(uint32_t (* arg1)[0x2], int64_t* arg2, int64_t* arg3)

0060f964  {
0060f969      __femms();
0060f974      uint32_t st0[0x2] = *(uint64_t*)arg2;
0060f977      int64_t st1 = st0;
0060f97a      uint32_t temp0[0x2] = _m_punpckldq(st0, st0[0]);
0060f97d      int64_t temp0_1 = _m_punpckhdq(st1, st1);
0060f980      uint64_t st2 = ((uint64_t)arg2[1]);
0060f984      st2 = _m_punpckldq(st2, st2);
0060f98a      st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)arg3);
0060f991      int64_t temp0_4 = __pfmul_mmxq_memq(temp0_1, arg3[2]);
0060f999      int64_t temp0_5 = __pfmul_mmxq_memq(st2, arg3[4]);
0060f99e      st0 = __pfadd_mmxq_memq(st0, arg3[6]);
0060f9a3      uint32_t st3[0x2] = __pfmul_mmxq_memq(temp0, arg3[1]);
0060f9a8      int64_t temp0_8 = __pfadd_mmxq_mmxq(temp0_4, temp0_5);
0060f9ac      int64_t temp0_9 = __pfmul_mmxq_memq(temp0_1, arg3[3]);
0060f9b1      int64_t temp0_10 = __pfmul_mmxq_memq(st2, arg3[5]);
0060f9b6      st3 = __pfadd_mmxq_memq(st3, arg3[7]);
0060f9bb      st0 = __pfadd_mmxq_mmxq(st0, temp0_8);
0060f9c3      st3 = __pfadd_mmxq_mmxq(st3, __pfadd_mmxq_mmxq(temp0_9, temp0_10));
0060f9c7      *(uint64_t*)arg1 = st0;
0060f9ca      arg1[1] = st3;
0060f9ce      __femms();
0060f9d4      return arg1;
0060f964  }


0060f9d7  uint32_t (*)[0x2] __stdcall _x3d_D3DXVec3TransformNormal@12(uint32_t (* arg1)[0x2], int64_t* arg2, int64_t* arg3)

0060f9d7  {
0060f9dc      __femms();
0060f9e7      uint32_t st0[0x2] = *(uint64_t*)arg2;
0060f9ea      int64_t st1 = st0;
0060f9ed      uint32_t temp0[0x2] = _m_punpckldq(st0, st0[0]);
0060f9f0      int64_t temp0_1 = _m_punpckhdq(st1, st1);
0060f9f3      uint64_t st2 = ((uint64_t)arg2[1]);
0060f9f7      st2 = _m_punpckldq(st2, st2);
0060f9fd      st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)arg3);
0060fa04      int64_t temp0_4 = __pfmul_mmxq_memq(temp0_1, arg3[2]);
0060fa0c      int64_t temp0_5 = __pfmul_mmxq_memq(st2, arg3[4]);
0060fa11      uint32_t st3[0x2] = __pfmul_mmxq_memq(temp0, arg3[1]);
0060fa16      int64_t temp0_7 = __pfadd_mmxq_mmxq(temp0_4, temp0_5);
0060fa1a      int64_t temp0_8 = __pfmul_mmxq_memq(temp0_1, arg3[3]);
0060fa1f      int64_t temp0_9 = __pfmul_mmxq_memq(st2, arg3[5]);
0060fa24      st0 = __pfadd_mmxq_mmxq(st0, temp0_7);
0060fa2c      st3 = __pfadd_mmxq_mmxq(st3, __pfadd_mmxq_mmxq(temp0_8, temp0_9));
0060fa30      *(uint64_t*)arg1 = st0;
0060fa33      arg1[1][0] = st3[0];
0060fa37      __femms();
0060fa3d      return arg1;
0060f9d7  }


0060fa40  struct D3DXVECTOR3* __stdcall x3d_D3DXVec3Normalize(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2)

0060fa40  {
0060fa40      __femms();
0060fa46      int64_t st0;
0060fa46      st0 = arg2->x;
0060fa46      *(uint32_t*)((char*)st0)[4] = arg2->y;
0060fa4c      uint64_t z = ((uint64_t)arg2->z);
0060fa5b      int64_t temp0_2 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(st0, st0), __pfmul_mmxq_mmxq(z, z));
0060fa5f      int64_t temp0_3 = __pfacc_mmxq_mmxq(temp0_2, temp0_2);
0060fa66      int64_t st4;
0060fa66      int64_t temp0_4 = __pfrsqrt_mmxq_mmxq(st4, temp0_3);
0060fa6a      int64_t temp0_5 = __pfcmpgt_mmxq_memq(temp0_3, 0x80000000800000);
0060fa7d      int64_t* result = arg1;
0060fa87      int64_t temp0_8 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(temp0_3, __pfmul_mmxq_mmxq(temp0_4, temp0_4)), temp0_4);
0060fa8b      int64_t temp0_9 = __pfmul_mmxq_mmxq((st0 & temp0_5), temp0_8);
0060fa8f      int64_t temp0_10 = __pfmul_mmxq_mmxq((z & temp0_5), temp0_8);
0060fa93      *(uint64_t*)result = temp0_9;
0060fa96      result[1] = temp0_10;
0060fa9a      __femms();
0060fa9c      return result;
0060fa40  }


0060fa9f  struct D3DXVECTOR3* __stdcall x3d_D3DXVec3BaryCentric(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, float arg5, float arg6)

0060fa9f  {
0060faab      int64_t st0;
0060faab      st0 = arg3->x;
0060faab      *(uint32_t*)((char*)st0)[4] = arg3->y;
0060faae      int64_t st4;
0060faae      st4 = arg2->x;
0060faae      *(uint32_t*)((char*)st4)[4] = arg2->y;
0060fab1      uint64_t st6 = ((uint64_t)arg5);
0060fab6      uint64_t z = ((uint64_t)arg3->z);
0060faba      int64_t st2;
0060faba      st2 = arg4->x;
0060faba      *(uint32_t*)((char*)st2)[4] = arg4->y;
0060fabd      uint64_t z_1 = ((uint64_t)arg4->z);
0060fac1      uint64_t z_2 = ((uint64_t)arg2->z);
0060fac5      int64_t temp0 = __pfsub_mmxq_mmxq(st0, st4);
0060fac9      uint64_t st7 = ((uint64_t)arg6);
0060face      int64_t temp0_1 = __pfsub_mmxq_mmxq(z, z_2);
0060fad2      int64_t* result = arg1;
0060fad6      int64_t temp0_2 = __pfsub_mmxq_mmxq(st2, st4);
0060fada      st6 = _m_punpckldq(st6, st6);
0060fadd      int64_t temp0_4 = __pfsub_mmxq_mmxq(z_1, z_2);
0060fae1      int64_t temp0_5 = __pfmul_mmxq_mmxq(temp0, st6);
0060fae5      st7 = _m_punpckldq(st7, st7);
0060fae8      int64_t temp0_7 = __pfmul_mmxq_mmxq(temp0_1, st6);
0060faec      int64_t temp0_8 = __pfadd_mmxq_mmxq(temp0_5, st4);
0060faf0      int64_t temp0_9 = __pfmul_mmxq_mmxq(temp0_2, st7);
0060faf4      int64_t temp0_10 = __pfadd_mmxq_mmxq(temp0_7, z_2);
0060faf8      int64_t temp0_11 = __pfmul_mmxq_mmxq(temp0_4, st7);
0060fafc      int64_t temp0_12 = __pfadd_mmxq_mmxq(temp0_8, temp0_9);
0060fb00      int64_t temp0_13 = __pfadd_mmxq_mmxq(temp0_10, temp0_11);
0060fb04      *(uint64_t*)result = temp0_12;
0060fb07      result[1] = temp0_13;
0060fb0b      __femms();
0060fb0d      return result;
0060fa9f  }


0060fb10  struct D3DXVECTOR3* __stdcall x3d_D3DXVec3Hermite(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, float arg6)

0060fb10  {
0060fb10      __femms();
0060fb12      uint64_t st0 = ((uint64_t)arg6);
0060fb1a      int64_t temp0 = __pfmul_mmxq_mmxq(st0, st0);
0060fb21      int64_t temp0_1 = __pfmul_mmxq_mmxq(temp0, st0);
0060fb32      int64_t temp0_2 = __pfsub_mmxq_mmxq(temp0_1, temp0);
0060fb36      int64_t temp0_3 = __pfmul_mmxq_mmxq(temp0, 0x4000000040000000);
0060fb3d      int64_t temp0_4 = __pfmul_mmxq_memq(temp0, 0x4040000040400000);
0060fb45      int64_t temp0_5 = __pfmul_mmxq_mmxq(temp0_1, 0x4000000040000000);
0060fb49      int64_t temp0_6 = __pfsub_mmxq_mmxq(temp0_1, temp0_3);
0060fb50      int64_t temp0_7 = __pfsub_mmxq_mmxq(temp0_4, temp0_5);
0060fb54      int64_t temp0_8 = __pfadd_mmxq_mmxq(temp0_6, st0);
0060fb5c      int64_t temp0_10 = __pfadd_mmxq_memq(__pfsub_mmxq_mmxq(temp0_5, temp0_4), 0x3f8000003f800000);
0060fb70      uint64_t st7 = _m_punpckldq(temp0_2, temp0_2);
0060fb73      uint64_t st1 = _m_punpckldq(temp0_7, temp0_7);
0060fb76      uint64_t st6 = _m_punpckldq(temp0_8, temp0_8);
0060fb79      uint64_t st2 = _m_punpckldq(temp0_10, temp0_10);
0060fb7f      int64_t temp0_15 = __pfmul_mmxq_memq(st7, arg5->x);
0060fb86      int64_t temp0_16 = __pfmul_mmxq_memq(st1, arg4->x);
0060fb8e      int64_t temp0_17 = __pfmul_mmxq_mmxq(st7, ((uint64_t)arg5->z));
0060fb96      int64_t temp0_18 = __pfmul_mmxq_mmxq(st1, ((uint64_t)arg4->z));
0060fb9e      uint64_t* result = arg1;
0060fba5      int64_t temp0_19 = __pfmul_mmxq_memq(st6, arg3->x);
0060fbac      int64_t temp0_20 = __pfadd_mmxq_mmxq(temp0_16, temp0_15);
0060fbb0      int64_t temp0_21 = __pfadd_mmxq_mmxq(temp0_18, temp0_17);
0060fbb4      int64_t temp0_22 = __pfmul_mmxq_memq(st2, arg2->x);
0060fbbc      int64_t temp0_23 = __pfmul_mmxq_mmxq(st6, ((uint64_t)arg3->z));
0060fbc4      int64_t temp0_24 = __pfmul_mmxq_mmxq(st2, ((uint64_t)arg2->z));
0060fbc8      int64_t temp0_25 = __pfadd_mmxq_mmxq(temp0_22, temp0_19);
0060fbcc      int64_t temp0_26 = __pfadd_mmxq_mmxq(temp0_24, temp0_23);
0060fbd0      int64_t temp0_27 = __pfadd_mmxq_mmxq(temp0_20, temp0_25);
0060fbd4      int64_t temp0_28 = __pfadd_mmxq_mmxq(temp0_21, temp0_26);
0060fbd8      *(uint64_t*)result = temp0_27;
0060fbdb      result[1] = temp0_28;
0060fbdf      __femms();
0060fbe1      return result;
0060fb10  }


0060fbe4  struct D3DXVECTOR3* __stdcall x3d_D3DXVec3CatmullRom(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4, struct D3DXVECTOR3 const* arg5, float arg6)

0060fbe4  {
0060fbe4      uint64_t st0 = ((uint64_t)arg6);
0060fbed      int64_t st1 = st0;
0060fbf0      st0 = _m_punpckldq(st0, st0);
0060fbf3      int64_t temp0_1 = __pfmul_mmxq_mmxq(st0, st0);
0060fbf7      st1 = __punpckldq_mmxq_memd(st1, 0x3f800000);
0060fbfe      int64_t temp0_3 = __pfmul_mmxq_mmxq(temp0_1, st1);
0060fc02      int64_t st3 = st1;
0060fc05      int64_t temp0_4 = __pfmul_mmxq_mmxq(st1, st1);
0060fc0c      int64_t temp0_5 = __pfsub_mmxq_mmxq(temp0_3, temp0_4);
0060fc10      st1 = _m_punpckldq(temp0_4, temp0_4);
0060fc16      st3 = _m_punpckldq(st3, st3);
0060fc19      int64_t temp0_8 = __pfmul_mmxq_memq(temp0_5, 0x4000000040400000);
0060fc24      st0 = _m_punpckldq(temp0_8, temp0_5);
0060fc2e      int64_t temp0_10 = _m_punpckhdq(temp0_8, 0);
0060fc35      int64_t temp0_12 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(st1, (st3 ^ 0x8000000000000000)), st0);
0060fc3d      int64_t temp0_13 = __pfsub_mmxq_mmxq(st0, temp0_10);
0060fc44      int64_t temp0_14 = _m_punpckhdq(temp0_12, temp0_12);
0060fc4a      st0 = _m_punpckldq(temp0_13, temp0_13);
0060fc51      int64_t st2 = _m_punpckldq(temp0_12, temp0_12);
0060fc54      int64_t z_1 = ((uint64_t)arg2->z);
0060fc5b      int64_t temp0_17 = __pfmul_mmxq_memq(temp0_14, arg2->x);
0060fc5f      int64_t temp0_18 = _m_punpckhdq(temp0_13, temp0_13);
0060fc65      int64_t temp0_19 = __pfmul_mmxq_memq(st0, arg3->x);
0060fc6c      int64_t temp0_20 = __pfmul_mmxq_memq(st2, arg4->x);
0060fc70      int64_t temp0_21 = __pfmul_mmxq_mmxq(temp0_14, z_1);
0060fc7c      int64_t temp0_22 = __pfmul_mmxq_mmxq(st0, ((uint64_t)arg3->z));
0060fc80      int64_t temp0_23 = __pfadd_mmxq_mmxq(temp0_19, temp0_17);
0060fc88      int64_t temp0_24 = __pfmul_mmxq_mmxq(st2, ((uint64_t)arg4->z));
0060fc8c      uint64_t* result = arg1;
0060fc90      int64_t temp0_25 = __pfadd_mmxq_mmxq(temp0_21, temp0_22);
0060fc97      uint64_t z = ((uint64_t)arg5->z);
0060fcaa      int64_t temp0_28 = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_23, temp0_20), __pfmul_mmxq_memq(temp0_18, arg5->x));
0060fcae      int64_t temp0_29 = __pfmul_mmxq_mmxq(temp0_18, z);
0060fcb2      int64_t temp0_30 = __pfadd_mmxq_mmxq(temp0_25, temp0_24);
0060fcb6      int64_t temp0_31 = __pfmul_mmxq_mmxq(temp0_28, 0x3f0000003f000000);
0060fcba      int64_t temp0_32 = __pfadd_mmxq_mmxq(temp0_30, temp0_29);
0060fcbe      *(uint64_t*)result = temp0_31;
0060fcc5      result[1] = __pfmul_mmxq_mmxq(temp0_32, 0x3f0000003f000000);
0060fcc9      __femms();
0060fccb      return result;
0060fbe4  }


0060fcce  struct D3DXVECTOR3* __stdcall x3d_D3DXVec3TransformCoord_inline(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXMATRIX const* arg3)

0060fcce  {
0060fcd3      __femms();
0060fcde      uint32_t st0[0x2];
0060fcde      st0[0] = arg2->x;
0060fcde      st0[1] = arg2->y;
0060fce1      int64_t st1 = st0;
0060fce4      uint32_t temp0[0x2] = _m_punpckldq(st0, st0[0]);
0060fce7      int64_t temp0_1 = _m_punpckhdq(st1, st1);
0060fcea      uint64_t z = ((uint64_t)arg2->z);
0060fcee      z = _m_punpckldq(z, z);
0060fcf4      st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)((char*)arg3->__inner0 + 0));
0060fcfb      int64_t temp0_4 = __pfmul_mmxq_memq(temp0_1, *(uint64_t*)((char*)arg3->__inner0 + 0x10));
0060fd03      int64_t temp0_5 = __pfmul_mmxq_memq(z, *(uint64_t*)((char*)arg3->__inner0 + 0x20));
0060fd08      st0 = __pfadd_mmxq_memq(st0, *(uint64_t*)((char*)arg3->__inner0 + 0x30));
0060fd0d      int64_t temp0_7 = __pfmul_mmxq_memq(temp0, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060fd12      int64_t temp0_8 = __pfadd_mmxq_mmxq(temp0_4, temp0_5);
0060fd16      int64_t temp0_9 = __pfmul_mmxq_memq(temp0_1, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060fd1b      int64_t temp0_10 = __pfmul_mmxq_memq(z, *(uint64_t*)((char*)arg3->__inner0 + 0x28));
0060fd20      int64_t temp0_11 = __pfadd_mmxq_memq(temp0_7, *(uint64_t*)((char*)arg3->__inner0 + 0x38));
0060fd25      st0 = __pfadd_mmxq_mmxq(st0, temp0_8);
0060fd29      int64_t temp0_13 = __pfadd_mmxq_mmxq(temp0_9, temp0_10);
0060fd2d      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_11, temp0_13);
0060fd34      int64_t temp0_15 = _m_punpckhdq(temp0_14, temp0_14);
0060fd37      int64_t temp0_16 = __pfrcp_mmxq_mmxq(temp0_13, temp0_15);
0060fd3f      int64_t temp0_18 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_15, temp0_16), temp0_16);
0060fd43      st0 = __pfmul_mmxq_mmxq(st0, temp0_18);
0060fd47      int64_t temp0_20 = __pfmul_mmxq_mmxq(temp0_14, temp0_18);
0060fd4b      arg1->x = st0[0];
0060fd4b      arg1->y = st0[1];
0060fd4e      arg1->z = temp0_20;
0060fd52      __femms();
0060fd58      return arg1;
0060fcce  }


0060fd5b  struct D3DXMATRIX* __stdcall x3d_D3DXMatrixMultiply_inline(struct D3DXMATRIX* arg1, struct D3DXMATRIX const* arg2, struct D3DXMATRIX const* arg3)

0060fd5b  {
0060fd69      uint32_t st0[0x2];
0060fd69      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0);
0060fd69      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 4);
0060fd6c      int64_t st1 = *(uint64_t*)((char*)arg2->__inner0 + 8);
0060fd70      int64_t st4 = *(uint64_t*)((char*)arg3->__inner0 + 0);
0060fd73      int64_t st2;
0060fd73      int64_t temp0 = _m_punpckhdq(st2, st0[0]);
0060fd76      int64_t st5 = *(uint64_t*)((char*)arg3->__inner0 + 0x10);
0060fd7a      int64_t st3;
0060fd7a      int64_t temp0_1 = _m_punpckhdq(st3, st1);
0060fd7d      int64_t st6 = *(uint64_t*)((char*)arg3->__inner0 + 0x20);
0060fd81      uint32_t temp0_2[0x2] = _m_punpckldq(st0, st0[0]);
0060fd84      st1 = _m_punpckldq(st1, st1);
0060fd87      int64_t temp0_4 = __pfmul_mmxq_mmxq(st4, temp0_2);
0060fd8b      int64_t temp0_5 = _m_punpckhdq(temp0, temp0);
0060fd8e      st0 = __pfmul_mmxq_memq(temp0_2, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060fd93      int64_t st7 = *(uint64_t*)((char*)arg3->__inner0 + 0x30);
0060fd97      int64_t temp0_7 = __pfmul_mmxq_mmxq(st5, temp0_5);
0060fd9b      int64_t temp0_8 = _m_punpckhdq(temp0_1, temp0_1);
0060fd9e      int64_t temp0_9 = __pfmul_mmxq_memq(temp0_5, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060fda3      int64_t temp0_10 = __pfadd_mmxq_mmxq(temp0_7, temp0_4);
0060fda7      int64_t temp0_11 = __pfmul_mmxq_mmxq(st6, st1);
0060fdab      int64_t temp0_12 = __pfadd_mmxq_mmxq(temp0_9, st0);
0060fdaf      int64_t temp0_13 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg3->__inner0 + 0x28));
0060fdb4      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_11, temp0_10);
0060fdb8      int64_t temp0_15 = __pfmul_mmxq_mmxq(st7, temp0_8);
0060fdbc      int64_t temp0_16 = __pfadd_mmxq_mmxq(temp0_12, temp0_13);
0060fdc0      int64_t temp0_17 = __pfmul_mmxq_memq(temp0_8, *(uint64_t*)((char*)arg3->__inner0 + 0x38));
0060fdc5      int64_t temp0_18 = __pfadd_mmxq_mmxq(temp0_15, temp0_14);
0060fdc9      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x10);
0060fdc9      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x14);
0060fdcd      int64_t temp0_19 = __pfadd_mmxq_mmxq(temp0_17, temp0_16);
0060fdd1      st1 = *(uint64_t*)((char*)arg2->__inner0 + 0x18);
0060fdd5      *(uint64_t*)((char*)arg1->__inner0 + 0) = temp0_18;
0060fdd8      st4 = *(uint64_t*)((char*)arg3->__inner0 + 0);
0060fddb      *(uint64_t*)((char*)arg1->__inner0 + 8) = temp0_19;
0060fddf      int64_t temp0_20 = _m_punpckhdq(temp0_16, st0[0]);
0060fde2      st5 = *(uint64_t*)((char*)arg3->__inner0 + 0x10);
0060fde6      int64_t temp0_21 = _m_punpckhdq(temp0_19, st1);
0060fde9      st6 = *(uint64_t*)((char*)arg3->__inner0 + 0x20);
0060fded      uint32_t temp0_22[0x2] = _m_punpckldq(st0, st0[0]);
0060fdf0      st1 = _m_punpckldq(st1, st1);
0060fdf3      int64_t temp0_24 = __pfmul_mmxq_mmxq(st4, temp0_22);
0060fdf7      int64_t temp0_25 = _m_punpckhdq(temp0_20, temp0_20);
0060fdfa      st0 = __pfmul_mmxq_memq(temp0_22, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060fdff      st7 = *(uint64_t*)((char*)arg3->__inner0 + 0x30);
0060fe03      int64_t temp0_27 = __pfmul_mmxq_mmxq(st5, temp0_25);
0060fe07      int64_t temp0_28 = _m_punpckhdq(temp0_21, temp0_21);
0060fe0a      int64_t temp0_29 = __pfmul_mmxq_memq(temp0_25, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060fe0f      int64_t temp0_30 = __pfadd_mmxq_mmxq(temp0_27, temp0_24);
0060fe13      int64_t temp0_31 = __pfmul_mmxq_mmxq(st6, st1);
0060fe17      int64_t temp0_32 = __pfadd_mmxq_mmxq(temp0_29, st0);
0060fe1b      int64_t temp0_33 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg3->__inner0 + 0x28));
0060fe20      int64_t temp0_34 = __pfadd_mmxq_mmxq(temp0_31, temp0_30);
0060fe24      int64_t temp0_35 = __pfmul_mmxq_mmxq(st7, temp0_28);
0060fe28      int64_t temp0_36 = __pfadd_mmxq_mmxq(temp0_32, temp0_33);
0060fe2c      int64_t temp0_37 = __pfmul_mmxq_memq(temp0_28, *(uint64_t*)((char*)arg3->__inner0 + 0x38));
0060fe31      int64_t temp0_38 = __pfadd_mmxq_mmxq(temp0_35, temp0_34);
0060fe35      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x20);
0060fe35      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x24);
0060fe39      int64_t temp0_39 = __pfadd_mmxq_mmxq(temp0_37, temp0_36);
0060fe3d      st1 = *(uint64_t*)((char*)arg2->__inner0 + 0x28);
0060fe41      *(uint64_t*)((char*)arg1->__inner0 + 0x10) = temp0_38;
0060fe45      st4 = *(uint64_t*)((char*)arg3->__inner0 + 0);
0060fe48      *(uint64_t*)((char*)arg1->__inner0 + 0x18) = temp0_39;
0060fe4c      int64_t temp0_40 = _m_punpckhdq(temp0_36, st0[0]);
0060fe4f      st5 = *(uint64_t*)((char*)arg3->__inner0 + 0x10);
0060fe53      int64_t temp0_41 = _m_punpckhdq(temp0_39, st1);
0060fe56      st6 = *(uint64_t*)((char*)arg3->__inner0 + 0x20);
0060fe5a      uint32_t temp0_42[0x2] = _m_punpckldq(st0, st0[0]);
0060fe5d      st1 = _m_punpckldq(st1, st1);
0060fe60      int64_t temp0_44 = __pfmul_mmxq_mmxq(st4, temp0_42);
0060fe64      int64_t temp0_45 = _m_punpckhdq(temp0_40, temp0_40);
0060fe67      st0 = __pfmul_mmxq_memq(temp0_42, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060fe6c      st7 = *(uint64_t*)((char*)arg3->__inner0 + 0x30);
0060fe70      int64_t temp0_47 = __pfmul_mmxq_mmxq(st5, temp0_45);
0060fe74      int64_t temp0_48 = _m_punpckhdq(temp0_41, temp0_41);
0060fe77      int64_t temp0_49 = __pfmul_mmxq_memq(temp0_45, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060fe7c      int64_t temp0_50 = __pfadd_mmxq_mmxq(temp0_47, temp0_44);
0060fe80      int64_t temp0_51 = __pfmul_mmxq_mmxq(st6, st1);
0060fe84      int64_t temp0_52 = __pfadd_mmxq_mmxq(temp0_49, st0);
0060fe88      int64_t temp0_53 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg3->__inner0 + 0x28));
0060fe8d      int64_t temp0_54 = __pfadd_mmxq_mmxq(temp0_51, temp0_50);
0060fe91      int64_t temp0_55 = __pfmul_mmxq_mmxq(st7, temp0_48);
0060fe95      int64_t temp0_56 = __pfadd_mmxq_mmxq(temp0_52, temp0_53);
0060fe99      int64_t temp0_57 = __pfmul_mmxq_memq(temp0_48, *(uint64_t*)((char*)arg3->__inner0 + 0x38));
0060fe9e      int64_t temp0_58 = __pfadd_mmxq_mmxq(temp0_55, temp0_54);
0060fea2      st0[0] = *(uint32_t*)((char*)arg2->__inner0 + 0x30);
0060fea2      st0[1] = *(uint32_t*)((char*)arg2->__inner0 + 0x34);
0060fea6      int64_t temp0_59 = __pfadd_mmxq_mmxq(temp0_57, temp0_56);
0060feaa      st1 = *(uint64_t*)((char*)arg2->__inner0 + 0x38);
0060feae      *(uint64_t*)((char*)arg1->__inner0 + 0x20) = temp0_58;
0060feb2      st4 = *(uint64_t*)((char*)arg3->__inner0 + 0);
0060feb5      *(uint64_t*)((char*)arg1->__inner0 + 0x28) = temp0_59;
0060feb9      int64_t temp0_60 = _m_punpckhdq(temp0_56, st0[0]);
0060febc      st5 = *(uint64_t*)((char*)arg3->__inner0 + 0x10);
0060fec0      int64_t temp0_61 = _m_punpckhdq(temp0_59, st1);
0060fec3      st6 = *(uint64_t*)((char*)arg3->__inner0 + 0x20);
0060fec7      uint32_t temp0_62[0x2] = _m_punpckldq(st0, st0[0]);
0060feca      st1 = _m_punpckldq(st1, st1);
0060fecd      int64_t temp0_64 = __pfmul_mmxq_mmxq(st4, temp0_62);
0060fed1      int64_t temp0_65 = _m_punpckhdq(temp0_60, temp0_60);
0060fed4      st0 = __pfmul_mmxq_memq(temp0_62, *(uint64_t*)((char*)arg3->__inner0 + 8));
0060fed9      st7 = *(uint64_t*)((char*)arg3->__inner0 + 0x30);
0060fedd      int64_t temp0_67 = __pfmul_mmxq_mmxq(st5, temp0_65);
0060fee1      int64_t temp0_68 = _m_punpckhdq(temp0_61, temp0_61);
0060fee4      int64_t temp0_69 = __pfmul_mmxq_memq(temp0_65, *(uint64_t*)((char*)arg3->__inner0 + 0x18));
0060fee9      int64_t temp0_70 = __pfadd_mmxq_mmxq(temp0_67, temp0_64);
0060feed      int64_t temp0_71 = __pfmul_mmxq_mmxq(st6, st1);
0060fef1      int64_t temp0_72 = __pfadd_mmxq_mmxq(temp0_69, st0);
0060fef5      int64_t temp0_73 = __pfmul_mmxq_memq(st1, *(uint64_t*)((char*)arg3->__inner0 + 0x28));
0060fefa      int64_t temp0_74 = __pfadd_mmxq_mmxq(temp0_71, temp0_70);
0060fefe      int64_t temp0_75 = __pfmul_mmxq_mmxq(st7, temp0_68);
0060ff02      int64_t temp0_76 = __pfadd_mmxq_mmxq(temp0_72, temp0_73);
0060ff06      int64_t temp0_77 = __pfmul_mmxq_memq(temp0_68, *(uint64_t*)((char*)arg3->__inner0 + 0x38));
0060ff0b      int64_t temp0_78 = __pfadd_mmxq_mmxq(temp0_75, temp0_74);
0060ff0f      int64_t temp0_79 = __pfadd_mmxq_mmxq(temp0_77, temp0_76);
0060ff13      *(uint64_t*)((char*)arg1->__inner0 + 0x30) = temp0_78;
0060ff17      *(uint64_t*)((char*)arg1->__inner0 + 0x38) = temp0_79;
0060ff1b      __femms();
0060ff21      return arg1;
0060fd5b  }


0060ff24  int32_t _x3d_D3DXVec3TransformCoord@12()

0060ff24  {
0060ff2a      /* tailcall */
0060ff2a      return x3d_D3DXVec3TransformCoord_inline();
0060ff24  }


0060ff2f  struct D3DXVECTOR3* __stdcall x3d_D3DXVec3Project(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct _D3DVIEWPORT9 const* arg3, struct D3DXMATRIX const* arg4, struct D3DXMATRIX const* arg5, struct D3DXMATRIX const* arg6)

0060ff2f  {
0060ff3a      int32_t edi;
0060ff3a      int32_t var_4c = edi;
0060ff40      int32_t eax;
0060ff40      eax = arg6 != 0;
0060ff45      float var_44;
0060ff45      int32_t* esi = &var_44;
0060ff4d      int32_t ecx;
0060ff4d      ecx = arg5 != 0;
0060ff5b      int32_t edx;
0060ff5b      edx = arg4 != 0;
0060ff5b      
0060ff69      switch (((((eax << 1) | ecx) << 1) | edx))
0060ff69      {
0060ff72          case 0:
0060ff72          {
0060ff72              float var_c_1 = ((float)((long double)0));
0060ff77              float var_10_1 = ((float)((long double)0));
0060ff7c              float var_14_1 = ((float)((long double)0));
0060ff81              float var_18_1 = ((float)((long double)0));
0060ff86              float var_20_1 = ((float)((long double)0));
0060ff8b              float var_24_1 = ((float)((long double)0));
0060ff90              float var_28_1 = ((float)((long double)0));
0060ff95              float var_2c_1 = ((float)((long double)0));
0060ff9a              float var_34_1 = ((float)((long double)0));
0060ff9f              float var_38_1 = ((float)((long double)0));
0060ffa4              float var_3c_1 = ((float)((long double)0));
0060ffa9              float var_40_1 = ((float)((long double)0));
0060ffae              float var_8_1 = ((float)((long double)1));
0060ffb3              float var_1c_1 = ((float)((long double)1));
0060ffb8              float var_30_1 = ((float)((long double)1));
0060ffbd              var_44 = ((float)((long double)1));
0060ff72              break;
0060ff72          }
0060ffc2          case 1:
0060ffc2          {
0060ffc2              esi = arg4;
0060ffc2              break;
0060ffc2          }
0060ffc6          case 2:
0060ffc6          {
0060ffc6              esi = arg5;
0060ffc6              break;
0060ffc6          }
0060ffcb          case 3:
0060ffcb          {
0060ffcb              __femms();
0060ffd5              x3d_D3DXMatrixMultiply_inline(&var_44, arg5, arg4);
0060ffda              __femms();
0060ffcb              break;
0060ffcb          }
0060ffde          case 4:
0060ffde          {
0060ffde              esi = arg6;
0060ffde              break;
0060ffde          }
0060ffe2          case 5:
0060ffe2          {
0060ffe2              __femms();
0060ffea              x3d_D3DXMatrixMultiply_inline(&var_44, arg6, arg4);
0060ffef              __femms();
0060ffe2              break;
0060ffe2          }
0060fff3          case 6:
0060fff3          {
0060fff3              __femms();
0060fffd              x3d_D3DXMatrixMultiply_inline(&var_44, arg6, arg5);
00610002              __femms();
0060fff3              break;
0060fff3          }
00610006          case 7:
00610006          {
00610006              __femms();
00610010              x3d_D3DXMatrixMultiply_inline(&var_44, arg6, arg5);
0061001d              x3d_D3DXMatrixMultiply_inline(&var_44, &var_44, arg4);
00610022              __femms();
00610006              break;
00610006          }
0060ff69      }
0060ff69      
0061002b      x3d_D3DXVec3TransformCoord_inline(arg1, arg2, esi);
0061002b      
00610036      if (arg3 != 0)
00610036      {
00610038          __femms();
00610040          int64_t st0;
00610040          st0 = arg1->x;
00610040          *(uint32_t*)((char*)st0)[4] = arg1->y;
00610043          uint64_t z = ((uint64_t)arg1->z);
00610047          int64_t st2;
00610047          st2 = arg3->X;
00610047          *(uint32_t*)((char*)st2)[4] = arg3->Y;
00610051          int64_t st3;
00610051          st3 = arg3->Width;
00610051          *(uint32_t*)((char*)st3)[4] = arg3->Height;
00610055          int64_t st4;
00610055          st4 = arg3->MinZ;
00610055          *(uint32_t*)((char*)st4)[4] = arg3->MaxZ;
00610059          st2 = __pi2fd_mmxq_mmxq(st2, st2);
0061005d          st3 = __pi2fd_mmxq_mmxq(st3, st3);
00610061          st0 = __pfadd_mmxq_memq((st0 ^ 0x8000000000000000), 0x3f8000003f800000);
00610069          st3 = __pfmul_mmxq_memq(st3, 0x3f0000003f000000);
00610077          int64_t st5 = __pfsub_mmxq_mmxq(_m_punpckhdq(st4, st4), st4);
0061007b          st0 = __pfmul_mmxq_mmxq(st0, st3);
00610083          z = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(z, st5), st4);
00610087          st0 = __pfadd_mmxq_mmxq(st0, st2);
0061008b          arg1->x = st0;
0061008b          arg1->y = *(uint32_t*)((char*)st0)[4];
0061008e          arg1->z = z;
00610092          __femms();
00610036      }
00610036      
00610098      return arg1;
0060ff2f  }

0061009b  uint32_t jump_table_61009b[0x8] = 
0061009b  {
0061009b      [0x0] =  0x0060ff70
0061009f      [0x1] =  0x0060ffc2
006100a3      [0x2] =  0x0060ffc6
006100a7      [0x3] =  0x0060ffcb
006100ab      [0x4] =  0x0060ffde
006100af      [0x5] =  0x0060ffe2
006100b3      [0x6] =  0x0060fff3
006100b7      [0x7] =  0x00610006
006100bb  }

006100bb  struct D3DXVECTOR3* __stdcall x3d_D3DXVec3Unproject(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct _D3DVIEWPORT9 const* arg3, struct D3DXMATRIX const* arg4, struct D3DXMATRIX const* arg5, struct D3DXMATRIX const* arg6)

006100bb  {
006100cb      int32_t edi;
006100cb      int32_t var_4c = edi;
006100d1      int32_t eax;
006100d1      eax = arg6 != 0;
006100da      int32_t edx;
006100da      edx = arg5 != 0;
006100e6      int32_t edx_1;
006100e6      edx_1 = arg4 != 0;
006100f4      float var_44;
006100f4      
006100f4      switch (((((eax << 1) | edx) << 1) | edx_1))
006100f4      {
006100fd          case 0:
006100fd          {
006100fd              float var_c_1 = ((float)((long double)0));
00610102              float var_10_1 = ((float)((long double)0));
00610107              float var_14_1 = ((float)((long double)0));
0061010c              float var_18_1 = ((float)((long double)0));
00610111              float var_20_1 = ((float)((long double)0));
00610116              float var_24_1 = ((float)((long double)0));
0061011b              float var_28_1 = ((float)((long double)0));
00610120              float var_2c_1 = ((float)((long double)0));
00610125              float var_34_1 = ((float)((long double)0));
0061012a              float var_38_1 = ((float)((long double)0));
0061012f              float var_3c_1 = ((float)((long double)0));
00610134              float var_40_1 = ((float)((long double)0));
00610139              float var_8_1 = ((float)((long double)1));
0061013e              float var_1c_1 = ((float)((long double)1));
00610143              float var_30_1 = ((float)((long double)1));
00610148              var_44 = ((float)((long double)1));
006100fd              break;
006100fd          }
00610150          case 1:
00610150          {
00610150              __femms();
0061015a              x3d_D3DXMatrixInverse_inline(&var_44, nullptr, arg4);
0061015f              __femms();
00610150              break;
00610150          }
00610166          case 2:
00610166          {
00610166              __femms();
0061016e              x3d_D3DXMatrixInverse_inline(&var_44, nullptr, arg5);
00610173              __femms();
00610166              break;
00610166          }
0061017a          case 3:
0061017a          {
0061017a              __femms();
00610184              x3d_D3DXMatrixMultiply_inline(&var_44, arg5, arg4);
0061018f              x3d_D3DXMatrixInverse_inline(&var_44, nullptr, &var_44);
00610194              __femms();
0061017a              break;
0061017a          }
00610198          case 4:
00610198          {
00610198              __femms();
006101a0              x3d_D3DXMatrixInverse_inline(&var_44, nullptr, arg6);
006101a5              __femms();
00610198              break;
00610198          }
006101a9          case 5:
006101a9          {
006101a9              __femms();
006101b3              x3d_D3DXMatrixMultiply_inline(&var_44, arg6, arg4);
006101be              x3d_D3DXMatrixInverse_inline(&var_44, nullptr, &var_44);
006101c3              __femms();
006101a9              break;
006101a9          }
006101c7          case 6:
006101c7          {
006101c7              __femms();
006101cf              x3d_D3DXMatrixMultiply_inline(&var_44, arg6, arg5);
006101da              x3d_D3DXMatrixInverse_inline(&var_44, nullptr, &var_44);
006101df              __femms();
006101c7              break;
006101c7          }
006101e3          case 7:
006101e3          {
006101e3              __femms();
006101eb              x3d_D3DXMatrixMultiply_inline(&var_44, arg6, arg5);
006101f8              x3d_D3DXMatrixMultiply_inline(&var_44, &var_44, arg4);
00610203              x3d_D3DXMatrixInverse_inline(&var_44, nullptr, &var_44);
00610208              __femms();
006101e3              break;
006101e3          }
006100f4      }
006100f4      
0061020f      struct D3DXVECTOR3* var_4c_1;
0061020f      int32_t* __saved_esi;
0061020f      
0061020f      if (arg3 == 0)
0061020f      {
006102a5          __saved_esi = &var_44;
006102a6          var_4c_1 = arg2;
0061020f      }
0061020f      else
0061020f      {
00610215          __femms();
00610220          int64_t st1;
00610220          st1 = arg3->X;
00610220          *(uint32_t*)((char*)st1)[4] = arg3->Y;
00610223          int64_t st2;
00610223          st2 = arg3->Width;
00610223          *(uint32_t*)((char*)st2)[4] = arg3->Height;
00610227          int64_t st0;
00610227          st0 = arg2->x;
00610227          *(uint32_t*)((char*)st0)[4] = arg2->y;
0061022a          int64_t temp0_1 = __pi2fd_mmxq_mmxq(st1, st1);
0061022e          int64_t st4;
0061022e          st4 = arg3->MinZ;
0061022e          *(uint32_t*)((char*)st4)[4] = arg3->MaxZ;
00610232          int64_t temp0_2 = __pi2fd_mmxq_mmxq(st2, st2);
00610239          int64_t temp0_3 = _m_punpckhdq(temp0_2, temp0_2);
0061023c          int64_t st5;
0061023c          int64_t temp0_4 = __pfrcp_mmxq_mmxq(st5, temp0_2);
00610240          int64_t temp0_5 = __pfrcp_mmxq_mmxq(temp0_3, temp0_3);
00610244          int64_t temp0_6 = __pfsub_mmxq_mmxq(st0, temp0_1);
00610248          st5 = _m_punpckldq(temp0_4, temp0_5);
0061024b          int64_t temp0_8 = __pfrcpit1_mmxq_mmxq(temp0_2, st5);
0061024f          int64_t z = ((uint64_t)arg2->z);
00610262          int64_t temp0_11 = __pfmul_mmxq_mmxq(temp0_6, __pfmul_mmxq_memq(__pfrcpit2_mmxq_mmxq(temp0_8, st5), 0x4000000040000000));
00610266          int64_t temp0_12 = _m_punpckhdq(st4, st4);
00610269          int64_t temp0_13 = __pfsub_mmxq_memq(temp0_11, 0x3f8000003f800000);
00610271          int64_t temp0_14 = __pfsub_mmxq_mmxq(temp0_12, st4);
00610275          int64_t st6;
00610275          int64_t temp0_15 = __pfrcp_mmxq_mmxq(st6, temp0_14);
00610279          st0 = (temp0_13 ^ 0x8000000000000000);
00610284          int64_t temp0_17 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_14, temp0_15), temp0_15);
0061028c          int64_t temp0_19 = __pfmul_mmxq_mmxq(__pfsub_mmxq_mmxq(z, st4), temp0_17);
00610290          arg1->x = st0;
00610290          arg1->y = *(uint32_t*)((char*)st0)[4];
00610293          arg1->z = temp0_19;
00610297          __femms();
0061029c          __saved_esi = &var_44;
0061029d          var_4c_1 = arg1;
0061020f      }
0061020f      
006102ac      x3d_D3DXVec3TransformCoord_inline(arg1, var_4c_1, __saved_esi);
006102b5      return arg1;
006100bb  }

006102b8  uint32_t jump_table_6102b8[0x8] = 
006102b8  {
006102b8      [0x0] =  0x006100fb
006102bc      [0x1] =  0x00610150
006102c0      [0x2] =  0x00610166
006102c4      [0x3] =  0x0061017a
006102c8      [0x4] =  0x00610198
006102cc      [0x5] =  0x006101a9
006102d0      [0x6] =  0x006101c7
006102d4      [0x7] =  0x006101e3
006102d8  }

006102d8  struct D3DXVECTOR3* __stdcall x3d_D3DXVec3Unproject_K7(struct D3DXVECTOR3* arg1, struct D3DXVECTOR3 const* arg2, struct _D3DVIEWPORT9 const* arg3, struct D3DXMATRIX const* arg4, struct D3DXMATRIX const* arg5, struct D3DXMATRIX const* arg6)

006102d8  {
006102e8      int32_t edi;
006102e8      int32_t var_4c = edi;
006102ee      int32_t eax;
006102ee      eax = arg6 != 0;
006102f7      int32_t edx;
006102f7      edx = arg5 != 0;
00610303      int32_t edx_1;
00610303      edx_1 = arg4 != 0;
00610311      struct D3DXMATRIX* var_54_1;
00610311      struct D3DXMATRIX* var_50_2;
00610311      float var_44;
00610311      
00610311      switch (((((eax << 1) | edx) << 1) | edx_1))
00610311      {
0061031a          case 0:
0061031a          {
0061031a              float var_c_1 = ((float)((long double)0));
0061031f              float var_10_1 = ((float)((long double)0));
00610324              float var_14_1 = ((float)((long double)0));
00610329              float var_18_1 = ((float)((long double)0));
0061032e              float var_20_1 = ((float)((long double)0));
00610333              float var_24_1 = ((float)((long double)0));
00610338              float var_28_1 = ((float)((long double)0));
0061033d              float var_2c_1 = ((float)((long double)0));
00610342              float var_34_1 = ((float)((long double)0));
00610347              float var_38_1 = ((float)((long double)0));
0061034c              float var_3c_1 = ((float)((long double)0));
00610351              float var_40_1 = ((float)((long double)0));
00610356              float var_8_1 = ((float)((long double)1));
0061035b              float var_1c_1 = ((float)((long double)1));
00610360              float var_30_1 = ((float)((long double)1));
00610365              var_44 = ((float)((long double)1));
0061031a              break;
0061031a          }
0061036a          case 1:
0061036a          {
006103a8              x3d_D3DXMatrixInverse_K7(&var_44, nullptr, arg4);
0061036a              break;
0061036a          }
0061036f          case 2:
0061036f          {
006103a8              x3d_D3DXMatrixInverse_K7(&var_44, nullptr, arg5);
0061036f              break;
0061036f          }
00610372          case 3:
00610372          {
00610372              var_50_2 = arg4;
00610375              var_54_1 = arg5;
0061039a          label_61039a:
0061039a              x3d_D3DXMatrixMultiply_inline(&var_44, var_54_1, var_50_2);
006103a8              x3d_D3DXMatrixInverse_K7(&var_44, nullptr, &var_44);
00610372              break;
00610372          }
00610378          case 4:
00610378          {
006103a8              x3d_D3DXMatrixInverse_K7(&var_44, nullptr, arg6);
00610378              break;
00610378          }
0061037b          case 5:
0061037b          {
0061037b              var_50_2 = arg4;
00610381          label_610381:
00610381              var_54_1 = arg6;
00610382              goto label_61039a;
0061037b          }
00610380          case 6:
00610380          {
00610380              var_50_2 = arg5;
00610380              goto label_610381;
00610380          }
0061038a          case 7:
0061038a          {
0061038a              x3d_D3DXMatrixMultiply_inline(&var_44, arg6, arg5);
0061038f              var_50_2 = arg4;
00610395              var_54_1 = &var_44;
00610395              goto label_61039a;
0061038a          }
00610311      }
00610311      
006103b2      struct D3DXVECTOR3* var_4c_1;
006103b2      int32_t* __saved_esi;
006103b2      
006103b2      if (arg3 == 0)
006103b2      {
00610448          __saved_esi = &var_44;
00610449          var_4c_1 = arg2;
006103b2      }
006103b2      else
006103b2      {
006103b8          __femms();
006103c3          int64_t st1;
006103c3          st1 = arg3->X;
006103c3          *(uint32_t*)((char*)st1)[4] = arg3->Y;
006103c6          int64_t st2;
006103c6          st2 = arg3->Width;
006103c6          *(uint32_t*)((char*)st2)[4] = arg3->Height;
006103ca          int64_t st0;
006103ca          st0 = arg2->x;
006103ca          *(uint32_t*)((char*)st0)[4] = arg2->y;
006103cd          int64_t temp0_1 = __pi2fd_mmxq_mmxq(st1, st1);
006103d1          int64_t st4;
006103d1          st4 = arg3->MinZ;
006103d1          *(uint32_t*)((char*)st4)[4] = arg3->MaxZ;
006103d5          int64_t temp0_2 = __pi2fd_mmxq_mmxq(st2, st2);
006103dc          int64_t temp0_3 = _m_punpckhdq(temp0_2, temp0_2);
006103df          int64_t st5;
006103df          int64_t temp0_4 = __pfrcp_mmxq_mmxq(st5, temp0_2);
006103e3          int64_t temp0_5 = __pfrcp_mmxq_mmxq(temp0_3, temp0_3);
006103e7          int64_t temp0_6 = __pfsub_mmxq_mmxq(st0, temp0_1);
006103eb          st5 = _m_punpckldq(temp0_4, temp0_5);
006103ee          int64_t temp0_8 = __pfrcpit1_mmxq_mmxq(temp0_2, st5);
006103f2          int64_t z = ((uint64_t)arg2->z);
00610405          int64_t temp0_11 = __pfmul_mmxq_mmxq(temp0_6, __pfmul_mmxq_memq(__pfrcpit2_mmxq_mmxq(temp0_8, st5), 0x4000000040000000));
00610409          int64_t temp0_12 = _m_punpckhdq(st4, st4);
0061040c          int64_t temp0_13 = __pfsub_mmxq_memq(temp0_11, 0x3f8000003f800000);
00610414          int64_t temp0_14 = __pfsub_mmxq_mmxq(temp0_12, st4);
00610418          int64_t st6;
00610418          int64_t temp0_15 = __pfrcp_mmxq_mmxq(st6, temp0_14);
0061041c          st0 = (temp0_13 ^ 0x8000000000000000);
00610427          int64_t temp0_17 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_14, temp0_15), temp0_15);
0061042f          int64_t temp0_19 = __pfmul_mmxq_mmxq(__pfsub_mmxq_mmxq(z, st4), temp0_17);
00610433          arg1->x = st0;
00610433          arg1->y = *(uint32_t*)((char*)st0)[4];
00610436          arg1->z = temp0_19;
0061043a          __femms();
0061043f          __saved_esi = &var_44;
00610440          var_4c_1 = arg1;
006103b2      }
006103b2      
0061044f      x3d_D3DXVec3TransformCoord_inline(arg1, var_4c_1, __saved_esi);
00610458      return arg1;
006102d8  }

0061045b  uint32_t jump_table_61045b[0x8] = 
0061045b  {
0061045b      [0x0] =  0x00610318
0061045f      [0x1] =  0x0061036a
00610463      [0x2] =  0x0061036f
00610467      [0x3] =  0x00610372
0061046b      [0x4] =  0x00610378
0061046f      [0x5] =  0x0061037b
00610473      [0x6] =  0x00610380
00610477      [0x7] =  0x00610384
0061047b  }

0061047b                                                                                   cc cc cc cc cc                             .....
00610480  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006104a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006104c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006104e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610500  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610520  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610540  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610560  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610580  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006105a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006105c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006105e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610600  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610620  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610640  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610660  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610680  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006106a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006106c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006106e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610700  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610720  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610740  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610760  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610780  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006107a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006107c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006107e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610800  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610820  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610840  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610860  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610880  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006108a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006108c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006108e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610900  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610920  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610940  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610960  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610980  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006109a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006109c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006109e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610a00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610a20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610a40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610a60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610a80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610aa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610ac0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610ae0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610b00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610b20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610b40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610b60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610b80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610ba0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610bc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610be0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610c00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610c20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610c40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610c60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610c80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610ca0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610cc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610ce0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610d00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610d20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610d40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610d60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610d80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610da0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610dc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610de0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610e00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610e20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610e40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610e60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610e80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610ea0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610ec0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610ee0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610f00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610f20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610f40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610f60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610f80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610fa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610fc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00610fe0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................

00611000  void __stdcall AMDX3D_D3DXFloat16To32Array(uint32_t arg1, uint32_t arg2, uint32_t arg3)

00611000  {
00611010      uint32_t ecx = arg3;
00611013      uint32_t eax = arg1;
00611016      uint32_t edx = arg2;
00611016      
0061101c      if (ecx >= 4)
0061101c      {
00611042          while (true)
00611042          {
00611042              if (ecx < 4)
00611042              {
006110f5                  if (ecx == 0)
006110f5                      break;
006110f5                  
00611104                  edx += ((ecx - 4) * 2);
00611106                  eax += ((ecx - 4) * 4);
00611108                  ecx = 4;
00611042              }
00611042              else
00611042              {
0061104b                  uint64_t st1 = ((uint64_t)*(uint32_t*)(edx + 4));
00611052                  int64_t st7 = (*(uint64_t*)AMDX3D_MaskExponentF16);
00611059                  int64_t st0 = _m_punpcklwd(((uint64_t)*(uint32_t*)edx), 0);
0061105c                  st1 = _m_punpcklwd(st1, 0);
0061105f                  int64_t st2 = st0;
00611062                  int64_t st3 = st0;
00611065                  uint64_t st4 = st1;
00611068                  int64_t st5 = st1;
0061106b                  st0 &= st7;
0061106e                  st1 &= st7;
00611071                  st7 = (*(uint64_t*)AMDX3D_F16toF32ExpBias);
00611078                  st0 = _m_pcmpeqd(st0, 0);
0061107b                  st1 = _m_pcmpeqd(st1, 0);
0061107e                  int64_t AMDX3D_MaskSignF16_1 = (*(uint64_t*)AMDX3D_MaskSignF16);
00611085                  st2 &= AMDX3D_MaskSignF16_1;
00611088                  st4 &= AMDX3D_MaskSignF16_1;
00611091                  int64_t temp0_5 = _m_paddd((st3 ^ st2), st7);
00611094                  int64_t temp0_6 = _m_paddd((st5 ^ st4), st7);
0061109a                  st7 = st1;
006110a4                  st1 &= (*(uint64_t*)AMDX3D_ExpIncF16);
006110ab                  int64_t temp0_7 = _m_paddd(temp0_5, (st0 & (*(uint64_t*)AMDX3D_ExpIncF16)));
006110ae                  int64_t temp0_8 = _m_paddd(temp0_6, st1);
006110b1                  AMDX3D_MaskSignF16_1 = (st0 & (*(uint64_t*)AMDX3D_NormalizeF16));
006110b8                  st7 &= (*(uint64_t*)AMDX3D_NormalizeF16);
006110bf                  st2 = _m_pslldi(st2, 0x10);
006110c3                  st4 = _m_pslldi(st4, 0x10);
006110c7                  st3 = _m_pslldi(temp0_7, 0xd);
006110cb                  st5 = _m_pslldi(temp0_8, 0xd);
006110cf                  int64_t temp0_13 = __pfsub_mmxq_mmxq(st3, AMDX3D_MaskSignF16_1);
006110da                  st5 = (__pfsub_mmxq_mmxq(st5, st7) | st4);
006110dd                  *(uint64_t*)eax = (temp0_13 | st2);
006110e0                  *(uint64_t*)(eax + 8) = st5;
006110e4                  eax += 0x10;
006110e7                  edx += 8;
006110ea                  ecx -= 4;
00611042              }
00611042          }
0061101c      }
0061101c      else if (ecx != 0)
00611035          c_D3DXFloat16To32Array(eax, edx, ecx);
00611035      
00611125      __femms();
00611000  }

0061112a                                8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 90            ..$......$......$.....

00611140  void __stdcall AMDX3D_D3DXFloat32To16Array(uint32_t arg1, uint32_t arg2, uint32_t arg3)

00611140  {
00611154      uint32_t ecx = arg3;
00611157      uint32_t eax = arg1;
0061115a      uint32_t edx = arg2;
0061115a      
00611160      if (ecx >= 4)
00611160      {
00611186          while (true)
00611186          {
00611186              if (ecx < 4)
00611186              {
00611285                  if (ecx == 0)
00611285                      break;
00611285                  
00611294                  edx += ((ecx - 4) * 4);
00611296                  eax += ((ecx - 4) * 2);
00611298                  ecx = 4;
00611186              }
00611186              else
00611186              {
0061118c                  uint32_t AMDX3D_MaskSignF32_2[0x2] = *(uint64_t*)edx;
0061118f                  uint32_t st1[0x2] = *(uint64_t*)(edx + 8);
00611193                  uint32_t AMDX3D_MaskSignF32_1[0x2] = (*(uint64_t*)AMDX3D_MaskSignF32);
006111ae                  uint32_t temp0_4[0x2] = _m_pslldi(_m_packssdw(_m_psrldi((AMDX3D_MaskSignF32_1 & AMDX3D_MaskSignF32_2), 0x12), _m_psrldi((AMDX3D_MaskSignF32_1 & st1), 0x12)), 2);
006111b6                  int64_t st2 = (*(uint64_t*)AMDX3D_Mask32);
006111bd                  AMDX3D_MaskSignF32_2 &= st2;
006111c0                  st1 &= st2;
006111c3                  AMDX3D_MaskSignF32_1 = AMDX3D_MaskSignF32_2;
006111c6                  uint32_t st7[0x2] = st1;
006111c9                  int64_t st3 = (*(uint64_t*)AMDX3D_MaskSmallest16);
006111d6                  int64_t temp0_5 = __pfcmpge_mmxq_mmxq(st3, AMDX3D_MaskSignF32_2);
006111eb                  AMDX3D_MaskSignF32_2 = _m_psubd(__pfadd_mmxq_mmxq(AMDX3D_MaskSignF32_2, (temp0_5 & st3)), (temp0_5 & (*(uint64_t*)AMDX3D_OneShift23)));
006111ee                  int64_t temp0_8 = __pfcmpge_mmxq_mmxq(st3, st1);
00611203                  st1 = _m_psubd(__pfadd_mmxq_mmxq(st1, (temp0_8 & st3)), (temp0_8 & (*(uint64_t*)AMDX3D_OneShift23)));
0061120c                  uint32_t temp0_11[0x2] = _m_psrldi(AMDX3D_MaskSignF32_2, 0xd);
00611210                  uint32_t temp0_12[0x2] = _m_psrldi(st1, 0xd);
00611214                  int64_t st4 = (*(uint64_t*)AMDX3D_One16);
00611221                  AMDX3D_MaskSignF32_2 = _m_paddd((temp0_11 & st4), AMDX3D_MaskSignF32_2);
00611224                  st1 = _m_paddd((temp0_12 & st4), st1);
00611227                  st4 = (*(uint64_t*)AMDX3D_MaskLargest16);
00611231                  int64_t temp0_15 = __pfcmpgt_mmxq_mmxq(st4, AMDX3D_MaskSignF32_1);
00611235                  int64_t temp0_16 = __pfcmpgt_mmxq_mmxq(st4, st7);
0061123d                  st2 = (*(uint64_t*)AMDX3D_BiasDiff);
00611244                  AMDX3D_MaskSignF32_2 = _m_paddd(AMDX3D_MaskSignF32_2, st2);
00611247                  st1 = _m_paddd(st1, st2);
0061124a                  st3 = (*(uint64_t*)AMDX3D_Inf16);
00611271                  *(uint64_t*)eax = (_m_packssdw(((_m_psrldi(AMDX3D_MaskSignF32_2, 0xd) & temp0_15) | (temp0_15 & !(st3))), ((_m_psrldi(st1, 0xd) & temp0_16) | (temp0_16 & !(st3)))) | temp0_4);
00611274                  eax += 8;
00611277                  edx += 0x10;
0061127a                  ecx -= 4;
00611186              }
00611186          }
00611160      }
00611160      else if (ecx != 0)
00611179          c_D3DXFloat32To16Array(eax, edx, ecx);
00611179      
006112b6      __femms();
00611140  }


006112bb  uint32_t (*)[0x2] __stdcall _x3d_D3DXVec2Transform@12(uint32_t (* arg1)[0x2], int64_t* arg2, int64_t* arg3)

006112bb  {
006112c0      __femms();
006112cb      uint32_t st0[0x2] = *(uint64_t*)arg2;
006112ce      int64_t st1 = st0;
006112d1      uint32_t temp0[0x2] = _m_punpckldq(st0, st0[0]);
006112d4      int64_t temp0_1 = _m_punpckhdq(st1, st1);
006112da      st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)arg3);
006112e1      int64_t temp0_3 = __pfmul_mmxq_memq(temp0_1, arg3[2]);
006112e6      st0 = __pfadd_mmxq_memq(st0, arg3[6]);
006112eb      uint32_t st3[0x2] = __pfmul_mmxq_memq(temp0, arg3[1]);
006112f0      int64_t temp0_6 = __pfmul_mmxq_memq(temp0_1, arg3[3]);
006112f5      st0 = __pfadd_mmxq_mmxq(st0, temp0_3);
006112fe      st3 = __pfadd_mmxq_mmxq(__pfadd_mmxq_memq(st3, arg3[7]), temp0_6);
00611302      *(uint64_t*)arg1 = st0;
00611305      arg1[1] = st3;
00611309      __femms();
0061130f      return arg1;
006112bb  }


00611312  uint32_t (*)[0x2] __stdcall _x3d_D3DXVec2TransformNormal@12(uint32_t (* arg1)[0x2], int64_t* arg2, int64_t* arg3)

00611312  {
00611317      __femms();
00611322      uint32_t st0[0x2] = *(uint64_t*)arg2;
00611325      int64_t st1 = st0;
00611328      uint32_t temp0[0x2] = _m_punpckldq(st0, st0[0]);
0061132b      int64_t temp0_1 = _m_punpckhdq(st1, st1);
0061132e      int80_t st3;
0061132e      st3 = temp0;
00611335      int80_t st4;
00611335      st4 = temp0_1;
00611341      *(uint64_t*)arg1 = __pfadd_mmxq_mmxq(__pfmul_mmxq_memq(temp0, *(uint64_t*)arg3), __pfmul_mmxq_memq(temp0_1, arg3[2]));
00611344      __femms();
0061134a      return arg1;
00611312  }


0061134d  uint32_t (*)[0x2] __stdcall _x3d_D3DXVec2TransformCoord@12(uint32_t (* arg1)[0x2], int64_t* arg2, int64_t* arg3)

0061134d  {
00611352      __femms();
0061135d      uint32_t st0[0x2] = *(uint64_t*)arg2;
00611360      int64_t st1 = st0;
00611363      uint32_t temp0[0x2] = _m_punpckldq(st0, st0[0]);
00611366      int64_t temp0_1 = _m_punpckhdq(st1, st1);
0061136c      st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)arg3);
00611373      int64_t temp0_3 = __pfmul_mmxq_memq(temp0_1, arg3[2]);
00611378      st0 = __pfadd_mmxq_memq(st0, arg3[6]);
0061137d      uint32_t st3[0x2] = __pfmul_mmxq_memq(temp0, arg3[1]);
00611382      int64_t temp0_6 = __pfmul_mmxq_memq(temp0_1, arg3[3]);
00611387      st0 = __pfadd_mmxq_mmxq(st0, temp0_3);
00611390      st3 = __pfadd_mmxq_mmxq(__pfadd_mmxq_memq(st3, arg3[7]), temp0_6);
00611394      st3 = _m_punpckhdq(st3, st3[0]);
00611397      int64_t temp0_11 = __pfrcp_mmxq_mmxq(temp0_6, st3);
006113a7      *(uint64_t*)arg1 = __pfmul_mmxq_mmxq(st0, __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(st3, temp0_11), temp0_11));
006113aa      __femms();
006113b0      return arg1;
0061134d  }


006113b3  struct D3DXVECTOR2* __stdcall x3d_D3DXVec2Hermite(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6)

006113b3  {
006113b3      __femms();
006113b5      uint64_t st0 = ((uint64_t)arg6);
006113bd      int64_t temp0 = __pfmul_mmxq_mmxq(st0, st0);
006113c4      int64_t temp0_1 = __pfmul_mmxq_mmxq(temp0, st0);
006113d5      int64_t temp0_2 = __pfsub_mmxq_mmxq(temp0_1, temp0);
006113d9      int64_t temp0_3 = __pfmul_mmxq_mmxq(temp0, 0x4000000040000000);
006113e0      int64_t temp0_4 = __pfmul_mmxq_memq(temp0, 0x4040000040400000);
006113e8      int64_t temp0_5 = __pfmul_mmxq_mmxq(temp0_1, 0x4000000040000000);
006113ec      int64_t temp0_6 = __pfsub_mmxq_mmxq(temp0_1, temp0_3);
006113f3      int64_t temp0_7 = __pfsub_mmxq_mmxq(temp0_4, temp0_5);
006113f7      int64_t temp0_8 = __pfadd_mmxq_mmxq(temp0_6, st0);
006113ff      int64_t temp0_10 = __pfadd_mmxq_memq(__pfsub_mmxq_mmxq(temp0_5, temp0_4), 0x3f8000003f800000);
00611407      int64_t* result = arg1;
0061140f      uint64_t st1 = _m_punpckldq(temp0_7, temp0_7);
00611416      int64_t st6 = _m_punpckldq(temp0_8, temp0_8);
00611419      int64_t st7 = _m_punpckldq(temp0_2, temp0_2);
00611443      *(uint64_t*)result = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(__pfmul_mmxq_memq(_m_punpckldq(temp0_10, temp0_10), arg2->x), __pfmul_mmxq_memq(st6, arg3->x)), __pfadd_mmxq_mmxq(__pfmul_mmxq_memq(st1, arg4->x), __pfmul_mmxq_memq(st7, *(uint64_t*)arg5)));
00611446      __femms();
00611448      return result;
006113b3  }


0061144b  struct D3DXVECTOR2* __stdcall x3d_D3DXVec2BaryCentric(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, float arg5, float arg6)

0061144b  {
00611457      uint64_t st6 = ((uint64_t)arg5);
0061145c      int64_t st0;
0061145c      st0 = arg3->x;
0061145c      *(uint32_t*)((char*)st0)[4] = arg3->y;
0061145f      int64_t st2;
0061145f      st2 = arg4->x;
0061145f      *(uint32_t*)((char*)st2)[4] = arg4->y;
00611462      int64_t st4;
00611462      st4 = arg2->x;
00611462      *(uint32_t*)((char*)st4)[4] = arg2->y;
00611465      st6 = _m_punpckldq(st6, st6);
00611468      uint64_t st7 = ((uint64_t)arg6);
0061146d      int64_t temp0_1 = __pfsub_mmxq_mmxq(st0, st4);
00611471      int64_t* result = arg1;
00611475      st7 = _m_punpckldq(st7, st7);
00611478      int64_t temp0_3 = __pfmul_mmxq_mmxq(temp0_1, st6);
0061147c      int64_t temp0_4 = __pfsub_mmxq_mmxq(st2, st4);
0061148c      *(uint64_t*)result = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(st4, temp0_3), __pfmul_mmxq_mmxq(temp0_4, st7));
0061148f      __femms();
00611491      return result;
0061144b  }


00611494  struct D3DXVECTOR2* __stdcall x3d_D3DXVec2Normalize(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2)

00611494  {
00611498      int64_t st0;
00611498      st0 = arg2->x;
00611498      *(uint32_t*)((char*)st0)[4] = arg2->y;
0061149e      int64_t temp0 = __pfmul_mmxq_mmxq(st0, st0);
006114a6      int64_t temp0_1 = __pfacc_mmxq_mmxq(temp0, temp0);
006114ad      int64_t st4;
006114ad      int64_t temp0_2 = __pfrsqrt_mmxq_mmxq(st4, temp0_1);
006114cb      int64_t temp0_7 = __pfmul_mmxq_mmxq((st0 & __pfcmpgt_mmxq_memq(temp0_1, 0x80000000800000)), __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_2, temp0_2), temp0_1), temp0_2));
006114cf      arg1->x = temp0_7;
006114cf      arg1->y = *(uint32_t*)((char*)temp0_7)[4];
006114d2      __femms();
006114d4      return arg1;
00611494  }


006114d7  struct D3DXVECTOR2* __stdcall x3d_D3DXVec2CatmullRom(struct D3DXVECTOR2* arg1, struct D3DXVECTOR2 const* arg2, struct D3DXVECTOR2 const* arg3, struct D3DXVECTOR2 const* arg4, struct D3DXVECTOR2 const* arg5, float arg6)

006114d7  {
006114d7      uint64_t st0 = ((uint64_t)arg6);
006114dc      uint64_t st1 = st0;
006114df      st0 = _m_punpckldq(st0, st0);
006114e2      int64_t temp0_1 = __pfmul_mmxq_mmxq(st0, st0);
006114e6      st1 = __punpckldq_mmxq_memd(st1, 0x3f800000);
006114ed      int64_t temp0_3 = __pfmul_mmxq_mmxq(temp0_1, st1);
006114f1      uint64_t st3 = st1;
006114f4      int64_t temp0_4 = __pfmul_mmxq_mmxq(st1, st1);
006114ff      int64_t temp0_5 = __pfsub_mmxq_mmxq(temp0_3, temp0_4);
00611503      st1 = _m_punpckldq(temp0_4, temp0_4);
00611509      st3 = _m_punpckldq(st3, st3);
0061150c      int64_t temp0_8 = __pfmul_mmxq_memq(temp0_5, 0x4000000040400000);
00611517      st0 = _m_punpckldq(temp0_8, temp0_5);
00611521      int64_t temp0_10 = _m_punpckhdq(temp0_8, 0);
0061152c      int64_t temp0_12 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(st1, (st3 ^ 0x8000000000000000)), st0);
00611530      int64_t temp0_13 = __pfsub_mmxq_mmxq(st0, temp0_10);
00611537      int64_t temp0_14 = _m_punpckhdq(temp0_12, temp0_12);
0061153d      st0 = _m_punpckldq(temp0_13, temp0_13);
00611544      uint64_t st2 = _m_punpckldq(temp0_12, temp0_12);
00611547      int64_t temp0_17 = __pfmul_mmxq_memq(temp0_14, arg2->x);
0061154b      int64_t temp0_18 = _m_punpckhdq(temp0_13, temp0_13);
0061154e      int64_t temp0_19 = __pfmul_mmxq_memq(st0, arg3->x);
00611552      int64_t temp0_20 = __pfmul_mmxq_memq(st2, arg4->x);
00611556      int64_t temp0_21 = __pfadd_mmxq_mmxq(temp0_19, temp0_17);
0061155e      __pfadd_mmxq_mmxq(temp0_5, temp0_10);
00611562      uint64_t* result = arg1;
0061157a      *(uint64_t*)result = __pfmul_mmxq_memq(__pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_21, temp0_20), __pfmul_mmxq_memq(temp0_18, arg5->x)), 0x3f0000003f000000);
0061157d      __femms();
0061157f      return result;
006114d7  }


00611582  uint32_t (*)[0x2] __stdcall _x3d_D3DXVec4Transform@12(uint32_t (* arg1)[0x2], int64_t* arg2, int64_t* arg3)

00611582  {
00611587      __femms();
00611592      uint32_t st0[0x2] = *(uint64_t*)arg2;
00611595      int64_t st1 = st0;
00611598      uint32_t temp0[0x2] = _m_punpckldq(st0, st0[0]);
0061159b      int64_t temp0_1 = _m_punpckhdq(st1, st1);
0061159e      uint32_t st2[0x2] = arg2[1];
006115a2      int64_t st3 = st2;
006115a5      uint32_t temp0_2[0x2] = _m_punpckldq(st2, st2[0]);
006115a8      int64_t temp0_3 = _m_punpckhdq(st3, st3);
006115ae      st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)arg3);
006115b5      int64_t temp0_5 = __pfmul_mmxq_memq(temp0_1, arg3[2]);
006115bd      st2 = __pfmul_mmxq_memq(temp0_2, arg3[4]);
006115c5      int64_t temp0_7 = __pfmul_mmxq_memq(temp0_3, arg3[6]);
006115ca      st0 = __pfadd_mmxq_mmxq(st0, temp0_5);
006115ce      uint32_t st4[0x2] = __pfmul_mmxq_memq(temp0, arg3[1]);
006115d3      st2 = __pfadd_mmxq_mmxq(st2, temp0_7);
006115d7      int64_t temp0_11 = __pfmul_mmxq_memq(temp0_1, arg3[3]);
006115dc      int64_t temp0_12 = __pfmul_mmxq_memq(temp0_2, arg3[5]);
006115e1      int64_t temp0_13 = __pfmul_mmxq_memq(temp0_3, arg3[7]);
006115e6      st0 = __pfadd_mmxq_mmxq(st0, st2);
006115f2      st4 = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(st4, temp0_11), __pfadd_mmxq_mmxq(temp0_12, temp0_13));
006115f6      *(uint64_t*)arg1 = st0;
006115f9      arg1[1] = st4;
006115fd      __femms();
00611603      return arg1;
00611582  }


00611606  struct D3DXVECTOR4* __stdcall x3d_D3DXVec4Normalize(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2)

00611606  {
00611606      __femms();
0061160c      int64_t st0;
0061160c      st0 = arg2->x;
0061160c      *(uint32_t*)((char*)st0)[4] = arg2->y;
00611612      int64_t st2;
00611612      st2 = arg2->z;
00611612      *(uint32_t*)((char*)st2)[4] = arg2->w;
00611621      int64_t temp0_2 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(st0, st0), __pfmul_mmxq_mmxq(st2, st2));
00611625      int64_t temp0_3 = __pfacc_mmxq_mmxq(temp0_2, temp0_2);
00611630      int64_t st4;
00611630      int64_t temp0_4 = __pfrsqrt_mmxq_mmxq(st4, temp0_3);
00611634      int64_t temp0_5 = __pfcmpgt_mmxq_memq(temp0_3, 0x80000000800000);
0061164d      int64_t temp0_8 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(temp0_3, __pfmul_mmxq_mmxq(temp0_4, temp0_4)), temp0_4);
00611651      int64_t temp0_9 = __pfmul_mmxq_mmxq((st0 & temp0_5), temp0_8);
00611655      int64_t temp0_10 = __pfmul_mmxq_mmxq((st2 & temp0_5), temp0_8);
00611659      arg1->x = temp0_9;
00611659      arg1->y = *(uint32_t*)((char*)temp0_9)[4];
0061165c      arg1->z = temp0_10;
0061165c      arg1->w = *(uint32_t*)((char*)temp0_10)[4];
00611660      __femms();
00611662      return arg1;
00611606  }


00611665  struct D3DXVECTOR4* __stdcall x3d_D3DXVec4Cross(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4)

00611665  {
00611668      __femms();
0061167a      uint32_t st0[0x2];
0061167a      st0[0] = arg3->x;
0061167a      st0[1] = arg3->y;
0061167d      int64_t st1;
0061167d      st1 = arg4->x;
0061167d      *(uint32_t*)((char*)st1)[4] = arg4->y;
00611680      uint32_t st2[0x2];
00611680      st2[0] = arg3->z;
00611680      st2[1] = arg3->w;
00611684      int64_t st3;
00611684      st3 = arg4->z;
00611684      *(uint32_t*)((char*)st3)[4] = arg4->w;
0061168b      int64_t st6 = st2;
0061168e      int64_t temp0 = _m_punpckhdq(st3, st3);
00611691      int64_t temp0_1 = _m_punpckhdq(st6, st6);
00611697      uint32_t st7[0x2] = st3;
0061169a      uint32_t temp0_2[0x2] = _m_punpckldq(st2, st2[0]);
0061169d      uint32_t temp0_3[0x2] = _m_punpckldq(st7, st7[0]);
006116a0      uint32_t st5[0x2] = _m_punpckhdq(temp0_2, st0[0]);
006116a3      st7 = _m_punpckhdq(temp0_3, st1);
006116ae      int64_t temp0_8 = __pfsub_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0, st5), __pfmul_mmxq_mmxq(temp0_1, st7));
006116d2      st5 = __pfsub_mmxq_mmxq(__pfmul_mmxq_mmxq(_m_punpckhdq(st0, st2[0]), _m_punpckldq(st3, st1)), __pfmul_mmxq_mmxq(_m_punpckhdq(st1, st3), _m_punpckldq(st2, st0[0])));
006116d9      st6 = _m_punpckldq(st1, st1);
006116df      st2 = _m_punpckhdq(_m_punpckldq(st2, st2[0]), st0[0]);
006116e2      st3 = _m_punpckldq(st3, st3);
006116e5      uint32_t temp0_20[0x2] = _m_punpckldq(st0, st0[0]);
006116e8      int64_t temp0_21 = __pfmul_mmxq_mmxq(st6, st2);
006116ef      st0 = __pfmul_mmxq_mmxq(temp0_20, _m_punpckhdq(st3, st1));
006116f3      int64_t temp0_24 = __pfsub_mmxq_mmxq(temp0_21, st0);
006116f7      st0[0] = arg2->x;
006116f7      st0[1] = arg2->y;
006116fa      st1 = arg2->z;
006116fa      *(uint32_t*)((char*)st1)[4] = arg2->w;
00611705      st2 = temp0_8;
00611708      st3 = st0;
0061170b      uint32_t temp0_25[0x2] = _m_punpckldq(st2, st2[0]);
00611714      st0 = _m_punpckhdq(st0, _m_punpckldq(st3, st3));
00611717      st2 = __pfmul_mmxq_mmxq((temp0_25 ^ 0x8000000000000000), st0);
00611724      int64_t temp0_29 = _m_punpckhdq(temp0_8, temp0_8);
00611727      st7 = _m_punpckhdq(st5, st5[0]);
0061172a      st3 = _m_punpckldq(temp0_29, st5[0]);
0061172d      uint32_t temp0_32[0x2] = _m_punpckldq(st7, temp0_24);
0061173e      int64_t temp0_35 = __pfacc_mmxq_mmxq((__pfmul_mmxq_mmxq(st3, st1) ^ 0x8000000000000000), (__pfmul_mmxq_mmxq(temp0_32, st1) ^ 0x8000000000000000));
00611745      st0[0] = arg2->x;
00611745      st0[1] = arg2->y;
00611748      st2 = __pfsub_mmxq_mmxq(st2, temp0_35);
0061174c      arg1->x = st2[0];
0061174c      arg1->y = st2[1];
00611752      int64_t st4 = (_m_punpckhdq(temp0_8, st5[0]) ^ 0x8000000000000000);
00611758      st7 = _m_psrlqi(-0x8000000000000000, 0x20);
0061175f      st2 = (_m_punpckldq(st5, temp0_24) ^ st7);
0061176b      st6 = (_m_punpckhdq(temp0_24, temp0_24) ^ st7);
0061176e      int64_t temp0_42 = _m_punpckhdq(st1, _m_punpckldq(st1, st1));
00611771      st7 = _m_psllqi(st7, 0x20);
00611775      int64_t temp0_44 = __pfmul_mmxq_mmxq(st4, st0);
00611779      st2 = __pfmul_mmxq_mmxq(st2, st0);
0061178b      int64_t temp0_48 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_42, st6), __pfacc_mmxq_mmxq((temp0_44 ^ st7), (st2 ^ st7)));
0061178f      arg1->z = temp0_48;
0061178f      arg1->w = *(uint32_t*)((char*)temp0_48)[4];
00611793      __femms();
00611796      return arg1;
00611665  }


00611799  struct D3DXVECTOR4* __stdcall x3d_D3DXVec4BaryCentric(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, float arg5, float arg6)

00611799  {
006117a5      int64_t st0;
006117a5      st0 = arg3->x;
006117a5      *(uint32_t*)((char*)st0)[4] = arg3->y;
006117a8      int64_t st1;
006117a8      st1 = arg3->z;
006117a8      *(uint32_t*)((char*)st1)[4] = arg3->w;
006117ac      int64_t st2;
006117ac      st2 = arg4->x;
006117ac      *(uint32_t*)((char*)st2)[4] = arg4->y;
006117af      int64_t st3;
006117af      st3 = arg4->z;
006117af      *(uint32_t*)((char*)st3)[4] = arg4->w;
006117b3      int64_t st4;
006117b3      st4 = arg2->x;
006117b3      *(uint32_t*)((char*)st4)[4] = arg2->y;
006117b6      int64_t st5;
006117b6      st5 = arg2->z;
006117b6      *(uint32_t*)((char*)st5)[4] = arg2->w;
006117ba      uint64_t st6 = ((uint64_t)arg5);
006117bf      uint64_t st7 = ((uint64_t)arg6);
006117c4      int64_t temp0 = __pfsub_mmxq_mmxq(st0, st4);
006117c8      int64_t temp0_1 = __pfsub_mmxq_mmxq(st1, st5);
006117d0      int64_t temp0_2 = __pfsub_mmxq_mmxq(st2, st4);
006117d4      int64_t temp0_3 = __pfsub_mmxq_mmxq(st3, st5);
006117d8      st6 = _m_punpckldq(st6, st6);
006117db      st7 = _m_punpckldq(st7, st7);
006117de      int64_t temp0_6 = __pfmul_mmxq_mmxq(temp0, st6);
006117e2      int64_t temp0_7 = __pfmul_mmxq_mmxq(temp0_1, st6);
006117e6      int64_t temp0_8 = __pfmul_mmxq_mmxq(temp0_2, st7);
006117ea      int64_t temp0_9 = __pfadd_mmxq_mmxq(temp0_6, st4);
006117ee      int64_t temp0_10 = __pfmul_mmxq_mmxq(temp0_3, st7);
006117f2      int64_t temp0_11 = __pfadd_mmxq_mmxq(temp0_7, st5);
006117f6      int64_t temp0_12 = __pfadd_mmxq_mmxq(temp0_9, temp0_8);
006117fa      int64_t temp0_13 = __pfadd_mmxq_mmxq(temp0_11, temp0_10);
006117fe      arg1->x = temp0_12;
006117fe      arg1->y = *(uint32_t*)((char*)temp0_12)[4];
00611801      arg1->z = temp0_13;
00611801      arg1->w = *(uint32_t*)((char*)temp0_13)[4];
00611805      __femms();
00611807      return arg1;
00611799  }


0061180a  struct D3DXVECTOR4* __stdcall x3d_D3DXVec4Hermite(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, struct D3DXVECTOR4 const* arg5, float arg6)

0061180a  {
0061180a      __femms();
0061180c      uint64_t st0 = ((uint64_t)arg6);
00611814      int64_t temp0 = __pfmul_mmxq_mmxq(st0, st0);
0061181b      int64_t temp0_1 = __pfmul_mmxq_mmxq(temp0, st0);
0061182c      int64_t temp0_2 = __pfsub_mmxq_mmxq(temp0_1, temp0);
00611830      int64_t temp0_3 = __pfmul_mmxq_mmxq(temp0, 0x4000000040000000);
00611837      int64_t temp0_4 = __pfmul_mmxq_memq(temp0, 0x4040000040400000);
0061183f      int64_t temp0_5 = __pfmul_mmxq_mmxq(temp0_1, 0x4000000040000000);
00611843      int64_t temp0_6 = __pfsub_mmxq_mmxq(temp0_1, temp0_3);
0061184a      int64_t temp0_7 = __pfsub_mmxq_mmxq(temp0_4, temp0_5);
0061184e      int64_t temp0_8 = __pfadd_mmxq_mmxq(temp0_6, st0);
00611856      int64_t temp0_10 = __pfadd_mmxq_memq(__pfsub_mmxq_mmxq(temp0_5, temp0_4), 0x3f8000003f800000);
0061186a      uint64_t st7 = _m_punpckldq(temp0_2, temp0_2);
0061186d      uint64_t st1 = _m_punpckldq(temp0_7, temp0_7);
00611870      uint64_t st6 = _m_punpckldq(temp0_8, temp0_8);
00611873      uint64_t st2 = _m_punpckldq(temp0_10, temp0_10);
00611879      int64_t temp0_15 = __pfmul_mmxq_memq(st7, arg5->x);
00611880      int64_t temp0_16 = __pfmul_mmxq_memq(st1, arg4->x);
00611884      int64_t temp0_17 = __pfmul_mmxq_memq(st7, arg5->z*(int32_t*)((char*)arg5 + 8));
00611889      int64_t temp0_18 = __pfmul_mmxq_memq(st1, arg4->z*(int32_t*)((char*)arg4 + 8));
00611892      uint64_t* result = arg1;
00611899      int64_t temp0_19 = __pfmul_mmxq_memq(st6, arg3->x);
006118a0      int64_t temp0_20 = __pfmul_mmxq_memq(st2, arg2->x);
006118a4      int64_t temp0_21 = __pfmul_mmxq_memq(st6, arg3->z*(int32_t*)((char*)arg3 + 8));
006118a9      int64_t temp0_22 = __pfmul_mmxq_memq(st2, arg2->z*(int32_t*)((char*)arg2 + 8));
006118ae      int64_t temp0_23 = __pfadd_mmxq_mmxq(temp0_16, temp0_15);
006118b2      int64_t temp0_24 = __pfadd_mmxq_mmxq(temp0_18, temp0_17);
006118b6      int64_t temp0_25 = __pfadd_mmxq_mmxq(temp0_20, temp0_19);
006118ba      int64_t temp0_26 = __pfadd_mmxq_mmxq(temp0_22, temp0_21);
006118be      int64_t temp0_27 = __pfadd_mmxq_mmxq(temp0_23, temp0_25);
006118c2      int64_t temp0_28 = __pfadd_mmxq_mmxq(temp0_24, temp0_26);
006118c6      *(uint64_t*)result = temp0_27;
006118c9      result[1] = temp0_28;
006118cd      __femms();
006118cf      return result;
0061180a  }


006118d2  struct D3DXVECTOR4* __stdcall x3d_D3DXVec4CatmullRom(struct D3DXVECTOR4* arg1, struct D3DXVECTOR4 const* arg2, struct D3DXVECTOR4 const* arg3, struct D3DXVECTOR4 const* arg4, struct D3DXVECTOR4 const* arg5, float arg6)

006118d2  {
006118d2      uint64_t st0 = ((uint64_t)arg6);
006118db      uint64_t st1 = st0;
006118de      st0 = _m_punpckldq(st0, st0);
006118e1      int64_t temp0_1 = __pfmul_mmxq_mmxq(st0, st0);
006118e5      st1 = __punpckldq_mmxq_memd(st1, 0x3f800000);
006118ec      int64_t temp0_3 = __pfmul_mmxq_mmxq(temp0_1, st1);
006118f0      uint64_t st3 = st1;
006118f3      int64_t temp0_4 = __pfmul_mmxq_mmxq(st1, st1);
006118fa      int64_t temp0_5 = __pfsub_mmxq_mmxq(temp0_3, temp0_4);
006118fe      st1 = _m_punpckldq(temp0_4, temp0_4);
00611904      st3 = _m_punpckldq(st3, st3);
00611907      int64_t temp0_8 = __pfmul_mmxq_memq(temp0_5, 0x4000000040400000);
00611912      st0 = _m_punpckldq(temp0_8, temp0_5);
0061191c      int64_t temp0_10 = _m_punpckhdq(temp0_8, 0);
00611923      int64_t temp0_12 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(st1, (st3 ^ 0x8000000000000000)), st0);
0061192b      int64_t temp0_13 = __pfsub_mmxq_mmxq(st0, temp0_10);
00611932      int64_t temp0_14 = _m_punpckhdq(temp0_12, temp0_12);
00611938      st0 = _m_punpckldq(temp0_13, temp0_13);
0061193f      uint64_t st2 = _m_punpckldq(temp0_12, temp0_12);
00611945      int64_t temp0_17 = __pfmul_mmxq_memq(temp0_14, arg2->x);
00611949      int64_t temp0_18 = _m_punpckhdq(temp0_13, temp0_13);
0061194f      int64_t temp0_19 = __pfmul_mmxq_memq(st0, arg3->x);
00611956      int64_t temp0_20 = __pfmul_mmxq_memq(st2, arg4->x);
0061195d      int64_t temp0_21 = __pfmul_mmxq_memq(temp0_14, arg2->z*(int32_t*)((char*)arg2 + 8));
00611966      int64_t temp0_22 = __pfmul_mmxq_memq(st0, arg3->z*(int32_t*)((char*)arg3 + 8));
0061196b      int64_t temp0_23 = __pfadd_mmxq_mmxq(temp0_19, temp0_17);
0061196f      int64_t temp0_24 = __pfmul_mmxq_memq(st2, arg4->z*(int32_t*)((char*)arg4 + 8));
00611974      uint64_t* result = arg1;
00611978      int64_t temp0_25 = __pfadd_mmxq_mmxq(temp0_21, temp0_22);
0061198b      int64_t temp0_28 = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_23, temp0_20), __pfmul_mmxq_memq(temp0_18, arg5->x));
0061198f      int64_t temp0_29 = __pfmul_mmxq_memq(temp0_18, arg5->z*(int32_t*)((char*)arg5 + 8));
00611994      int64_t temp0_30 = __pfadd_mmxq_mmxq(temp0_25, temp0_24);
00611998      int64_t temp0_31 = __pfmul_mmxq_mmxq(temp0_28, 0x3f0000003f000000);
0061199c      int64_t temp0_32 = __pfadd_mmxq_mmxq(temp0_30, temp0_29);
006119a0      *(uint64_t*)result = temp0_31;
006119a7      result[1] = __pfmul_mmxq_mmxq(temp0_32, 0x3f0000003f000000);
006119ab      __femms();
006119ad      return result;
006118d2  }


006119b0  struct D3DXPLANE* __stdcall x3d_D3DXPlaneFromPointNormal(struct D3DXPLANE* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3)

006119b0  {
006119b0      __femms();
006119be      int64_t st0;
006119be      st0 = arg3->x;
006119be      *(uint32_t*)((char*)st0)[4] = arg3->y;
006119c1      uint64_t z = ((uint64_t)arg3->z);
006119c5      int64_t st2;
006119c5      st2 = arg2->x;
006119c5      *(uint32_t*)((char*)st2)[4] = arg2->y;
006119c8      uint64_t z_1 = ((uint64_t)arg2->z);
006119cc      int64_t temp0 = __pfmul_mmxq_mmxq(st2, st0);
006119d0      int64_t temp0_1 = __pfmul_mmxq_mmxq(z_1, z);
006119d8      int64_t temp0_3 = __pfadd_mmxq_mmxq(__pfacc_mmxq_mmxq(temp0, temp0), temp0_1);
006119dc      arg1->a = st0;
006119dc      arg1->b = *(uint32_t*)((char*)st0)[4];
006119e6      arg1->c = z;
006119ea      arg1->d = (temp0_3 ^ 0x80000000);
006119ee      __femms();
006119f0      return arg1;
006119b0  }


006119f3  struct D3DXPLANE* __stdcall x3d_D3DXPlaneFromPoints(struct D3DXPLANE* arg1, struct D3DXVECTOR3 const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

006119f3  {
006119f3      __femms();
00611a08      int64_t st0;
00611a08      st0 = arg2->x;
00611a08      *(uint32_t*)((char*)st0)[4] = arg2->y;
00611a0b      uint64_t z = ((uint64_t)arg2->z);
00611a0f      uint64_t z_2 = z;
00611a15      uint64_t z_1 = ((uint64_t)arg4->z);
00611a19      z = _m_punpckldq(z, z);
00611a1c      z_1 = __punpckldq_mmxq_memd(z_1, arg3->z);
00611a20      int64_t temp0_2 = __pfsub_mmxq_memq(st0, arg3->x);
00611a24      int64_t temp0_3 = __pfsub_mmxq_mmxq(z, z_1);
00611a28      int64_t temp0_4 = __pfsub_mmxq_memq(st0, arg4->x);
00611a2f      int64_t temp0_5 = __pfsub_mmxq_mmxq(0, temp0_4);
00611a39      int64_t temp0_7 = __pfmul_mmxq_mmxq(_m_punpckhdq(temp0_2, temp0_5), temp0_3);
00611a40      z_1 = _m_punpckldq(temp0_5, temp0_3);
00611a51      st0 = (__pfacc_mmxq_mmxq(temp0_7, __pfmul_mmxq_mmxq(_m_punpckldq(_m_punpckhdq(temp0_3, 0), temp0_2), z_1)) ^ 0x8000000000000000);
00611a57      int64_t st4 = _m_punpckldq(temp0_4, temp0_5);
00611a5d      int64_t temp0_15 = __pfmul_mmxq_mmxq(_m_punpckhdq(temp0_4, st4), temp0_2);
00611a61      int64_t temp0_16 = __pfacc_mmxq_mmxq(temp0_15, temp0_15);
00611a6b      uint64_t temp0_17 = _m_psllqi(temp0_16, 0x20);
00611a77      int64_t temp0_20 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(st0, st0), __pfmul_mmxq_mmxq(temp0_17, temp0_17));
00611a7b      int64_t temp0_21 = __pfacc_mmxq_mmxq(temp0_20, temp0_20);
00611a82      int64_t temp0_22 = __pfrsqrt_mmxq_mmxq(st4, temp0_21);
00611a86      int64_t temp0_23 = __pfcmpgt_mmxq_memq(temp0_21, 0x80000000800000);
00611a9f      int64_t temp0_26 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(temp0_21, __pfmul_mmxq_mmxq(temp0_22, temp0_22)), temp0_22);
00611aa3      int64_t temp0_27 = __pfmul_mmxq_mmxq((st0 & temp0_23), temp0_26);
00611aa7      int64_t temp0_28 = __pfmul_mmxq_mmxq((temp0_16 & temp0_23), temp0_26);
00611aab      int64_t* result = arg1;
00611ab5      int64_t temp0_29 = __pfmul_mmxq_memq(temp0_27, arg2->x);
00611ab9      int64_t temp0_30 = __pfmul_mmxq_mmxq(temp0_28, z_2);
00611ac8      int64_t st5 = (_m_punpckldq(temp0_28, __pfadd_mmxq_mmxq(__pfacc_mmxq_mmxq(temp0_29, temp0_29), temp0_30)) ^ 0x8000000000000000);
00611acb      *(uint64_t*)result = temp0_27;
00611ace      result[1] = st5;
00611ad2      __femms();
00611ad4      return result;
006119f3  }


00611ad7  struct D3DXVECTOR3* __stdcall x3d_D3DXPlaneIntersectLine(struct D3DXVECTOR3* arg1, struct D3DXPLANE const* arg2, struct D3DXVECTOR3 const* arg3, struct D3DXVECTOR3 const* arg4)

00611ad7  {
00611adf      int64_t st0;
00611adf      st0 = arg2->a;
00611adf      *(uint32_t*)((char*)st0)[4] = arg2->b;
00611ae2      uint64_t st1;
00611ae2      st1 = arg2->c;
00611ae2      *(uint32_t*)((char*)st1)[4] = arg2->d;
00611aea      int64_t st4;
00611aea      st4 = arg4->x;
00611aea      *(uint32_t*)((char*)st4)[4] = arg4->y;
00611aed      uint64_t z = ((uint64_t)arg4->z);
00611af7      int64_t st6;
00611af7      st6 = arg3->x;
00611af7      *(uint32_t*)((char*)st6)[4] = arg3->y;
00611afa      int64_t temp0 = __pfmul_mmxq_mmxq(st0, st4);
00611afe      int64_t temp0_1 = __pfmul_mmxq_mmxq(st1, z);
00611b02      uint64_t z_1 = ((uint64_t)arg3->z);
00611b09      int64_t temp0_2 = __pfadd_mmxq_mmxq(temp0, temp0_1);
00611b10      int64_t temp0_3 = __pfmul_mmxq_mmxq(st0, st6);
00611b14      int64_t temp0_4 = __pfmul_mmxq_mmxq(st1, z_1);
00611b1f      int64_t temp0_6 = __pfsub_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_3, temp0_4), temp0_2);
00611b23      z_1 = __punpckldq_mmxq_memd(z_1, 0x3f800000);
00611b2d      int64_t temp0_8 = __pfacc_mmxq_mmxq(temp0_6, temp0_6);
00611b38      bool cond:0 = __pfcmpeq_mmxq_mmxq(0, temp0_8) == 0;
00611b3a      int64_t temp0_10 = __pfrcp_mmxq_mmxq(temp0_4, temp0_8);
00611b3e      int64_t* result = arg1;
00611b45      int64_t temp0_11 = __pfmul_mmxq_mmxq(st0, st6);
00611b45      
00611b49      if (!(cond:0))
00611b49      {
00611b4d          __femms();
00611b4f          return 0;
00611b49      }
00611b49      
00611b52      int64_t temp0_12 = __pfmul_mmxq_mmxq(st1, z_1);
00611b56      int64_t temp0_13 = __pfrcpit1_mmxq_mmxq(temp0_8, temp0_10);
00611b5a      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_11, temp0_12);
00611b5e      int64_t st3;
00611b5e      st3 = arg4->x;
00611b5e      *(uint32_t*)((char*)st3)[4] = arg4->y;
00611b61      int64_t temp0_15 = __pfrcpit2_mmxq_mmxq(temp0_13, temp0_10);
00611b65      int64_t temp0_16 = __pfacc_mmxq_mmxq(temp0_14, temp0_14);
00611b69      z = ((uint64_t)arg4->z);
00611b6d      int64_t temp0_17 = __pfsub_mmxq_mmxq(st3, st6);
00611b71      int64_t temp0_18 = __pfmul_mmxq_mmxq(temp0_16, temp0_15);
00611b75      int64_t temp0_19 = __pfsub_mmxq_mmxq(z, z_1);
00611b79      int64_t temp0_20 = __pfmul_mmxq_mmxq(temp0_17, temp0_18);
00611b7d      int64_t temp0_21 = __pfmul_mmxq_mmxq(temp0_19, temp0_18);
00611b81      int64_t temp0_22 = __pfadd_mmxq_mmxq(temp0_20, st6);
00611b85      int64_t temp0_23 = __pfadd_mmxq_mmxq(temp0_21, z_1);
00611b89      *(uint64_t*)result = temp0_22;
00611b8c      result[1] = temp0_23;
00611b90      __femms();
00611b92      return result;
00611ad7  }


00611b95  struct D3DXPLANE* __stdcall x3d_D3DXPlaneNormalize(struct D3DXPLANE* arg1, struct D3DXPLANE const* arg2)

00611b95  {
00611b99      int64_t st0;
00611b99      st0 = arg2->a;
00611b99      *(uint32_t*)((char*)st0)[4] = arg2->b;
00611b9c      int64_t st2;
00611b9c      st2 = arg2->c;
00611b9c      *(uint32_t*)((char*)st2)[4] = arg2->d;
00611ba3      int64_t st3 = st2;
00611ba6      st2 &= 0xffffffff;
00611bb5      int64_t temp0_2 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(st0, st0), __pfmul_mmxq_mmxq(st2, st2));
00611bb9      int64_t temp0_3 = __pfacc_mmxq_mmxq(temp0_2, temp0_2);
00611bc0      int64_t st4;
00611bc0      int64_t temp0_4 = __pfrsqrt_mmxq_mmxq(st4, temp0_3);
00611bc4      int64_t temp0_5 = __pfcmpgt_mmxq_memq(temp0_3, 0x80000000800000);
00611be1      int64_t temp0_8 = __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(temp0_3, __pfmul_mmxq_mmxq(temp0_4, temp0_4)), temp0_4);
00611be5      int64_t temp0_9 = __pfmul_mmxq_mmxq((st0 & temp0_5), temp0_8);
00611be9      int64_t temp0_10 = __pfmul_mmxq_mmxq((st3 & temp0_5), temp0_8);
00611bed      arg1->a = temp0_9;
00611bed      arg1->b = *(uint32_t*)((char*)temp0_9)[4];
00611bf0      arg1->c = temp0_10;
00611bf0      arg1->d = *(uint32_t*)((char*)temp0_10)[4];
00611bf4      __femms();
00611bf6      return arg1;
00611b95  }


00611bf9  uint32_t (*)[0x2] __stdcall _x3d_D3DXPlaneTransform@12(uint32_t (* arg1)[0x2], int64_t* arg2, int64_t* arg3)

00611bf9  {
00611bf9      __femms();
00611c03      uint32_t st0[0x2] = *(uint64_t*)arg2;
00611c06      int64_t st1 = st0;
00611c09      uint32_t temp0[0x2] = _m_punpckldq(st0, st0[0]);
00611c0c      int64_t temp0_1 = _m_punpckhdq(st1, st1);
00611c0f      uint32_t st2[0x2] = arg2[1];
00611c13      int64_t st3 = st2;
00611c16      uint32_t temp0_2[0x2] = _m_punpckldq(st2, st2[0]);
00611c19      int64_t temp0_3 = _m_punpckhdq(st3, st3);
00611c1f      st0 = __pfmul_mmxq_memq(temp0, *(uint64_t*)arg3);
00611c26      int64_t temp0_5 = __pfmul_mmxq_memq(temp0_1, arg3[2]);
00611c2e      st2 = __pfmul_mmxq_memq(temp0_2, arg3[4]);
00611c36      int64_t temp0_7 = __pfmul_mmxq_memq(temp0_3, arg3[6]);
00611c3b      st0 = __pfadd_mmxq_mmxq(st0, temp0_5);
00611c3f      uint32_t st4[0x2] = __pfmul_mmxq_memq(temp0, arg3[1]);
00611c44      st2 = __pfadd_mmxq_mmxq(st2, temp0_7);
00611c48      int64_t temp0_11 = __pfmul_mmxq_memq(temp0_1, arg3[3]);
00611c51      int64_t temp0_12 = __pfmul_mmxq_memq(temp0_2, arg3[5]);
00611c56      int64_t temp0_13 = __pfmul_mmxq_memq(temp0_3, arg3[7]);
00611c5b      st0 = __pfadd_mmxq_mmxq(st0, st2);
00611c67      st4 = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(st4, temp0_11), __pfadd_mmxq_mmxq(temp0_12, temp0_13));
00611c6b      *(uint64_t*)arg1 = st0;
00611c6e      arg1[1] = st4;
00611c72      __femms();
00611c74      return arg1;
00611bf9  }


00611c77  uint32_t __stdcall d3dx_adler32(uint32_t arg1, uint8_t const* arg2, uint32_t arg3)

00611c77  {
00611c7c      uint8_t const* ecx = arg2;
00611c80      int32_t edi;
00611c80      int32_t var_c = edi;
00611c86      uint32_t esi_1 = ((uint32_t)arg1);
00611c8c      uint32_t edi_2 = (arg1 >> 0x10);
00611c8c      
00611c91      if (ecx == 0)
00611c95          return 1;
00611c95      
00611c9f      while (arg3 > 0)
00611c9f      {
00611ca6          uint32_t j_3 = 0x15b0;
00611ca6          
00611cae          if (arg3 < 0x15b0)
00611cb0              j_3 = arg3;
00611cb0          
00611cb3          arg3 -= j_3;
00611cb3          
00611cb9          if (j_3 >= 0x10)
00611cb9          {
00611cc1              uint32_t j_2 = (j_3 >> 4);
00611ccb              j_3 += (-(j_2) << 4);
00611d50              uint32_t j;
00611d50              
00611d50              do
00611d50              {
00611cd0                  uint32_t esi_2 = (esi_1 + ((uint32_t)*(uint8_t*)ecx));
00611cd8                  uint32_t esi_3 = (esi_2 + ((uint32_t)ecx[1]));
00611ce0                  uint32_t esi_4 = (esi_3 + ((uint32_t)ecx[2]));
00611ce8                  uint32_t esi_5 = (esi_4 + ((uint32_t)ecx[3]));
00611cf0                  uint32_t esi_6 = (esi_5 + ((uint32_t)ecx[4]));
00611cf8                  uint32_t esi_7 = (esi_6 + ((uint32_t)ecx[5]));
00611d00                  uint32_t esi_8 = (esi_7 + ((uint32_t)ecx[6]));
00611d08                  uint32_t esi_9 = (esi_8 + ((uint32_t)ecx[7]));
00611d10                  uint32_t esi_10 = (esi_9 + ((uint32_t)ecx[8]));
00611d18                  uint32_t esi_11 = (esi_10 + ((uint32_t)ecx[9]));
00611d20                  uint32_t esi_12 = (esi_11 + ((uint32_t)ecx[0xa]));
00611d28                  uint32_t esi_13 = (esi_12 + ((uint32_t)ecx[0xb]));
00611d30                  uint32_t esi_14 = (esi_13 + ((uint32_t)ecx[0xc]));
00611d38                  uint32_t esi_15 = (esi_14 + ((uint32_t)ecx[0xd]));
00611d40                  uint32_t esi_16 = (esi_15 + ((uint32_t)ecx[0xe]));
00611d48                  esi_1 = (esi_16 + ((uint32_t)ecx[0xf]));
00611d4a                  edi_2 = ((((((((((((((((edi_2 + esi_2) + esi_3) + esi_4) + esi_5) + esi_6) + esi_7) + esi_8) + esi_9) + esi_10) + esi_11) + esi_12) + esi_13) + esi_14) + esi_15) + esi_16) + esi_1);
00611d4c                  ecx = &ecx[0x10];
00611d4f                  j = j_2;
00611d4f                  j_2 -= 1;
00611d50              } while (j != 1);
00611cb9          }
00611cb9          
00611d58          if (j_3 != 0)
00611d58          {
00611d63              uint32_t j_1;
00611d63              
00611d63              do
00611d63              {
00611d5d                  esi_1 += ((uint32_t)*(uint8_t*)ecx);
00611d5f                  ecx = &ecx[1];
00611d60                  edi_2 += esi_1;
00611d62                  j_1 = j_3;
00611d62                  j_3 -= 1;
00611d63              } while (j_1 != 1);
00611d58          }
00611d58          
00611d74          esi_1 = (COMBINE(0, esi_1) % 0xfff1);
00611d7e          edi_2 = (COMBINE(0, edi_2) % 0xfff1);
00611c9f      }
00611c9f      
00611d8c      return ((edi_2 << 0x10) | esi_1);
00611c77  }


00611d94  void __convention("regparm") init_block(struct internal_state* arg1)

00611d94  {
00611d97      void* eax;
00611d97      int16_t* ecx = ((char*)eax + 0x8c);
00611d9d      int32_t i_3 = 0x11e;
00611dab      int32_t i;
00611dab      
00611dab      do
00611dab      {
00611da4          *(uint16_t*)ecx = 0;
00611da7          ecx = &ecx[2];
00611daa          i = i_3;
00611daa          i_3 -= 1;
00611dab      } while (i != 1);
00611daf      void* ecx_1 = ((char*)eax + 0x980);
00611db5      int32_t i_4 = 0x1e;
00611dbd      int32_t i_1;
00611dbd      
00611dbd      do
00611dbd      {
00611db6          *(uint16_t*)ecx_1 = 0;
00611db9          ecx_1 += 4;
00611dbc          i_1 = i_4;
00611dbc          i_4 -= 1;
00611dbd      } while (i_1 != 1);
00611dc1      void* ecx_2 = ((char*)eax + 0xa74);
00611dc7      int32_t i_5 = 0x13;
00611dcf      int32_t i_2;
00611dcf      
00611dcf      do
00611dcf      {
00611dc8          *(uint16_t*)ecx_2 = 0;
00611dcb          ecx_2 += 4;
00611dce          i_2 = i_5;
00611dce          i_5 -= 1;
00611dcf      } while (i_2 != 1);
00611dd1      *(uint16_t*)((char*)eax + 0x48c) = 1;
00611dda      *(uint32_t*)((char*)eax + 0x16a4) = 0;
00611de0      *(uint32_t*)((char*)eax + 0x16a0) = 0;
00611de6      *(uint32_t*)((char*)eax + 0x16a8) = 0;
00611dec      *(uint32_t*)((char*)eax + 0x1698) = 0;
00611d94  }


00611df4  void __stdcall pqdownheap(struct internal_state* arg1, struct ct_data_s* arg2, int32_t arg3)

00611df4  {
00611df9      int32_t ecx;
00611df9      int32_t var_8 = ecx;
00611dfd      void* eax;
00611dfd      int32_t edx = *(uint32_t*)(((char*)eax + (arg1 << 2)) + 0xb54);
00611e07      int32_t edx_1 = *(uint32_t*)((char*)eax + 0x1448);
00611e0d      int32_t ecx_2 = (arg1 * 2);
00611e0f      bool cond:2 = ecx_2 >= edx_1;
00611e0f      
00611e11      if (ecx_2 <= edx_1)
00611e11      {
00611e17          int32_t ebx;
00611e17          int32_t var_c_1 = ebx;
00611e93          int32_t edx_6;
00611e93          
00611e93          do
00611e93          {
00611e19              int32_t edi;
00611e19              
00611e19              if (!(cond:2))
00611e19              {
00611e1b                  int32_t esi_1 = *(uint32_t*)(((char*)eax + (ecx_2 << 2)) + 0xb58);
00611e29                  ebx = *(uint16_t*)(edi + (esi_1 << 2));
00611e2d                  int32_t edx_2;
00611e2d                  edx_2 = *(uint16_t*)(edi + (*(uint32_t*)(((char*)eax + (ecx_2 << 2)) + 0xb54) << 2));
00611e2d                  
00611e34                  if (ebx < edx_2)
00611e4f                      ecx_2 += 1;
00611e34                  else if (ebx == edx_2)
00611e36                  {
00611e38                      edx_2 = *(uint8_t*)((esi_1 + eax) + 0x1450);
00611e38                      
00611e4d                      if (edx_2 <= *(uint8_t*)((*(uint32_t*)(((char*)eax + (ecx_2 << 2)) + 0xb54) + eax) + 0x1450))
00611e4f                          ecx_2 += 1;
00611e36                  }
00611e19              }
00611e19              
00611e50              int32_t esi_3 = *(uint32_t*)(((char*)eax + (ecx_2 << 2)) + 0xb54);
00611e5a              int32_t edx_3;
00611e5a              edx_3 = *(uint16_t*)(edi + (edx << 2));
00611e5e              ebx = *(uint16_t*)(edi + (esi_3 << 2));
00611e5e              
00611e65              if (edx_3 < ebx)
00611e65                  break;
00611e65              
00611e67              if (edx_3 == ebx)
00611e67              {
00611e6c                  int32_t edx_4;
00611e6c                  edx_4 = *(uint8_t*)((edx + eax) + 0x1450);
00611e6c                  
00611e7a                  if (edx_4 <= *(uint8_t*)((esi_3 + eax) + 0x1450))
00611e7a                      break;
00611e67              }
00611e67              
00611e7f              *(uint32_t*)(((char*)eax + (arg1 << 2)) + 0xb54) = esi_3;
00611e86              edx_6 = *(uint32_t*)((char*)eax + 0x1448);
00611e8c              arg1 = ecx_2;
00611e8f              ecx_2 <<= 1;
00611e91              cond:2 = ecx_2 >= edx_6;
00611e93          } while (ecx_2 <= edx_6);
00611e11      }
00611e11      
00611e9d      *(uint32_t*)(((char*)eax + (arg1 << 2)) + 0xb54) = edx;
00611df4  }


00611ea8  void __convention("regparm") gen_bitlen(struct internal_state* arg1, struct tree_desc_s* arg2)

00611ea8  {
00611eb0      int32_t* eax;
00611eb0      int32_t ecx = eax[1];
00611eb3      int32_t i_1 = 0;
00611ebb      int32_t ebx = *(uint32_t*)eax;
00611ebd      int32_t* eax_1 = eax[2];
00611ec0      int32_t ecx_1 = *(uint32_t*)eax_1;
00611ec5      int32_t ecx_2 = eax_1[1];
00611ecb      int32_t ecx_3 = eax_1[2];
00611ece      int32_t i_4 = eax_1[4];
00611ed1      int32_t edi;
00611ed1      int32_t var_34 = edi;
00611ee3      void* edx;
00611ee3      __builtin_memset(((char*)edx + 0xb34), 0, 0x20);
00611ef4      *(uint16_t*)((ebx + (*(uint32_t*)(((char*)edx + (*(uint32_t*)((char*)edx + 0x144c) << 2)) + 0xb54) << 2)) + 2) = 0;
00611efc      int32_t eax_4 = (*(uint32_t*)((char*)edx + 0x144c) + 1);
00611efc      
00611f04      if (eax_4 < 0x23d)
00611f04      {
00611f14          void* var_18_1 = (((char*)edx + (eax_4 << 2)) + 0xb54);
00611f17          int32_t i_3 = (0x23d - eax_4);
00611f1a          int32_t eax_5 = (0x23d + (eax_4 * 0));
00611fa0          int32_t i;
00611fa0          
00611fa0          do
00611fa0          {
00611f1f              int32_t esi_2 = *(uint32_t*)var_18_1;
00611f23              int32_t ecx_9 = (esi_2 << 2);
00611f33              int32_t i_5 = (((uint32_t)*(uint16_t*)((ebx + (((uint32_t)*(uint16_t*)((ecx_9 + ebx) + 2)) << 2)) + 2)) + 1);
00611f33              
00611f37              if (i_5 > i_4)
00611f37              {
00611f39                  i_5 = i_4;
00611f3c                  i_1 += 1;
00611f37              }
00611f37              
00611f45              *(uint16_t*)((ecx_9 + ebx) + 2) = i_5;
00611f45              
00611f4a              if (esi_2 <= ecx)
00611f4a              {
00611f4c                  *(uint16_t*)(((char*)edx + (i_5 << 1)) + 0xb34) += 1;
00611f54                  int32_t var_14_1 = 0;
00611f54                  
00611f5b                  if (esi_2 >= ecx_3)
00611f66                      var_14_1 = *(uint32_t*)(ecx_2 + ((esi_2 - ecx_3) << 2));
00611f66                  
00611f6c                  uint32_t edi_4 = ((uint32_t)*(uint16_t*)(ecx_9 + ebx));
00611f7b                  *(uint32_t*)((char*)edx + 0x16a0) += ((var_14_1 + i_5) * edi_4);
00611f7b                  
00611f83                  if (ecx_1 != 0)
00611f93                      *(uint32_t*)((char*)edx + 0x16a4) += ((((uint32_t)*(uint16_t*)((ecx_9 + ecx_1) + 2)) + var_14_1) * edi_4);
00611f4a              }
00611f4a              
00611f99              var_18_1 += 4;
00611f9d              i = i_3;
00611f9d              i_3 -= 1;
00611fa0          } while (i != 1);
00611fa0          
00611faa          if (i_1 != 0)
00611faa          {
00611fee              do
00611fee              {
00611fbd                  int32_t ecx_18 = (i_4 - 1);
00611fbe                  void* edi_5 = (((char*)edx + (ecx_18 << 1)) + 0xb34);
00611fbe                  
00611fce                  while (*(uint16_t*)edi_5 == 0)
00611fce                  {
00611fc7                      ecx_18 -= 1;
00611fc9                      edi_5 -= 2;
00611fce                  }
00611fce                  
00611fd0                  *(uint16_t*)(((char*)edx + (ecx_18 << 1)) + 0xb34) -= 1;
00611fd8                  i_1 -= 2;
00611fe3                  *(uint16_t*)(((char*)edx + (ecx_18 << 1)) + 0xb36) += 2;
00611fe7                  *(uint16_t*)(((char*)edx + (i_4 << 1)) + 0xb34) -= 1;
00611fee              } while (i_1 > 0);
00611fee              
00611ff5              int32_t i_2 = i_4;
00611ff5              
00611ff8              if (i_4 != 0)
00611ff8              {
00611ffa                  void* var_14_2 = (((char*)edx + (i_4 << 1)) + 0xb34);
00611ffa                  
0061205b                  do
0061205b                  {
00612000                      uint32_t j_1 = ((uint32_t)*(uint16_t*)var_14_2);
00612005                      uint32_t j = j_1;
00612005                      
00612008                      if (j_1 != 0)
00612008                      {
0061200a                          void* esi_11 = (((char*)edx + (eax_5 << 2)) + 0xb54);
0061200a                          
0061204e                          do
0061204e                          {
00612011                              esi_11 -= 4;
00612014                              int32_t ecx_22 = *(uint32_t*)esi_11;
00612016                              eax_5 -= 1;
00612016                              
0061201d                              if (ecx_22 <= ecx)
0061201d                              {
0061201f                                  int16_t* ecx_23 = (ebx + (ecx_22 << 2));
00612022                                  uint32_t esi_12 = ((uint32_t)ecx_23[1]);
00612022                                  
00612029                                  if (esi_12 != i_2)
00612029                                  {
00612036                                      uint32_t esi_13;
00612036                                      esi_13 = i_2;
0061203a                                      *(uint32_t*)((char*)edx + 0x16a0) += ((i_2 - esi_12) * ((uint32_t)*(uint16_t*)ecx_23));
00612040                                      ecx_23[1] = esi_13;
00612029                                  }
00612029                                  
00612044                                  j -= 1;
0061201d                              }
0061204e                          } while (j != 0);
00612008                      }
00612008                      
00612050                      i_2 -= 1;
00612053                      var_14_2 -= 2;
0061205b                  } while (i_2 != 0);
00611ff8              }
00611faa          }
00611f04      }
00611ea8  }


00612062  void __thiscall scan_tree(struct internal_state* arg1, struct ct_data_s* arg2, int32_t arg3)

00612062  {
00612067      int32_t ecx;
00612067      int32_t var_8 = ecx;
00612068      int32_t var_c = ecx;
00612069      uint32_t var_c_1 = 0xffffffff;
0061206f      int32_t edi;
0061206f      int32_t var_18 = edi;
00612074      void* eax;
00612074      uint32_t ecx_1 = ((uint32_t)*(uint16_t*)((char*)eax + 2));
00612078      int32_t edx = 7;
00612079      int32_t ebx = 0;
0061207f      int32_t edi_1 = 4;
0061207f      
00612080      if (ecx_1 == 0)
00612080      {
00612084          edx = 0x8a;
00612089          edi_1 = 3;
00612080      }
00612080      
0061208a      *(uint16_t*)(((char*)eax + (ecx << 2)) + 6) = 0xffff;
0061208a      
00612093      if (ecx >= 0)
00612093      {
0061209c          void* var_8_1 = ((char*)eax + 6);
0061209f          int32_t i_1 = (ecx + 1);
00612119          int32_t i;
00612119          
00612119          do
00612119          {
006120a0              uint32_t eax_2 = ecx_1;
006120a5              ecx_1 = ((uint32_t)*(uint16_t*)var_8_1);
006120a8              ebx += 1;
006120a8              
006120af              if ((ebx >= edx || eax_2 != ecx_1))
006120af              {
006120b6                  if (ebx < edi_1)
006120bf                      *(uint16_t*)(((char*)arg1 + (eax_2 << 2)) + 0xa74) += ebx;
006120b6                  else if (eax_2 != 0)
006120c6                  {
006120cb                      if (eax_2 != var_c_1)
006120cd                          *(uint16_t*)(((char*)arg1 + (eax_2 << 2)) + 0xa74) += 1;
006120cd                      
006120d5                      *(int32_t*)((char*)arg1 + 0xab4) += 1;
006120c6                  }
006120c6                  else if (ebx > 0xa)
006120ec                      *(int32_t*)((char*)arg1 + 0xabc) += 1;
006120e1                  else
006120e3                      *(int32_t*)((char*)arg1 + 0xab8) += 1;
006120e3                  
006120f3                  ebx = 0;
006120f7                  var_c_1 = eax_2;
006120fa                  int32_t var_1c_1;
006120fa                  
006120fa                  if (ecx_1 == 0)
006120fa                  {
006120fc                      edx = 0x8a;
0061210a                      var_1c_1 = 3;
006120fa                  }
006120fa                  else if (eax_2 != ecx_1)
00612105                  {
00612110                      edx = 7;
00612111                      var_1c_1 = 4;
00612105                  }
00612105                  else
00612105                  {
00612109                      edx = 6;
0061210a                      var_1c_1 = 3;
00612105                  }
00612105                  
00612113                  edi_1 = var_1c_1;
006120af              }
006120af              
00612114              var_8_1 += 4;
00612118              i = i_1;
00612118              i_1 -= 1;
00612119          } while (i != 1);
00612093      }
00612062  }


00612122  void __convention("regparm") send_tree(struct internal_state* arg1, struct ct_data_s* arg2, int32_t arg3)

00612122  {
0061212a      uint32_t var_18 = 0xffffffff;
00612134      int32_t edi;
00612134      int32_t var_28 = edi;
00612137      void* ecx;
00612137      uint32_t var_c = ((uint32_t)*(uint16_t*)((char*)ecx + 2));
0061213a      int32_t edi_1 = 7;
0061213b      int32_t j_1 = 0;
00612142      int32_t ebx = 4;
00612142      
00612143      if (var_c == 0)
00612143      {
00612147          edi_1 = 0x8a;
0061214c          ebx = 3;
00612143      }
00612143      
0061214f      int32_t edx;
0061214f      
0061214f      if (edx >= 0)
0061214f      {
00612159          void* var_10_1 = ((char*)ecx + 6);
0061215c          int32_t i_1 = (edx + 1);
006125b6          int32_t i;
006125b6          
006125b6          do
006125b6          {
00612162              uint32_t ecx_3 = ((uint32_t)*(uint16_t*)var_10_1);
00612165              uint32_t edx_2 = var_c;
00612168              j_1 += 1;
0061216b              uint32_t var_14_1 = edx_2;
0061216e              var_c = ecx_3;
00612171              int32_t j_2 = j_1;
00612171              
00612178              if ((j_1 >= edi_1 || edx_2 != ecx_3))
00612178              {
00612180                  void* eax;
00612180                  
00612180                  if (j_1 < ebx)
00612180                  {
00612218                      int32_t j;
00612218                      
00612218                      do
00612218                      {
00612186                          uint32_t edi_2 = ((uint32_t)*(uint16_t*)(((char*)eax + (edx_2 << 2)) + 0xa76));
0061218e                          int32_t ecx_4 = *(uint32_t*)((char*)eax + 0x16b4);
0061219b                          int32_t ecx_7;
0061219b                          int32_t ebx_1;
0061219b                          
0061219b                          if (ecx_4 <= (0x10 - edi_2))
0061219b                          {
006121f4                              ebx_1 = *(uint16_t*)(((char*)eax + (edx_2 << 2)) + 0xa74);
006121fc                              ebx_1 <<= ecx_4;
006121ff                              int32_t ecx_8 = *(uint32_t*)((char*)eax + 0x16b4);
00612205                              *(uint16_t*)((char*)eax + 0x16b0) |= ebx_1;
0061220c                              ecx_7 = (ecx_8 + edi_2);
0061219b                          }
0061219b                          else
0061219b                          {
0061219d                              uint32_t esi_1 = ((uint32_t)*(uint16_t*)(((char*)eax + (edx_2 << 2)) + 0xa74));
006121a9                              char* ecx_5 = *(uint32_t*)((char*)eax + 8);
006121ac                              *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_1 << ecx_4));
006121b6                              ebx_1 = *(uint8_t*)((char*)eax + 0x16b0);
006121bc                              ecx_5[*(uint32_t*)((char*)eax + 0x14)] = ebx_1;
006121bf                              *(uint32_t*)((char*)eax + 0x14) += 1;
006121c8                              ebx_1 = *(uint8_t*)((char*)eax + 0x16b1);
006121c2                              *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_1;
006121d1                              int32_t edx_7 = *(uint32_t*)((char*)eax + 0x16b4);
006121d7                              *(uint32_t*)((char*)eax + 0x14) += 1;
006121da                              char* ecx_6;
006121da                              ecx_6 = 0x10;
006121dc                              ecx_6 = (0x10 - edx_7);
006121de                              esi_1 u>>= ecx_6;
006121e1                              ecx_7 = ((edx_7 + edi_2) - 0x10);
006121e5                              edx_2 = var_14_1;
006121e8                              *(uint16_t*)((char*)eax + 0x16b0) = esi_1;
006121ef                              j_1 = j_2;
0061219b                          }
0061220e                          j = j_1;
0061220e                          j_1 -= 1;
0061220f                          *(uint32_t*)((char*)eax + 0x16b4) = ecx_7;
00612215                          j_2 = j_1;
00612218                      } while (j != 1);
00612180                  }
00612180                  else
00612180                  {
00612225                      int32_t esi_4;
00612225                      
00612225                      if (edx_2 == 0)
00612225                      {
006123b1                          int32_t ecx_22 = *(uint32_t*)((char*)eax + 0x16b4);
006123b1                          
006123ba                          if (j_1 > 0xa)
006123ba                          {
006124ac                              uint32_t edi_24 = ((uint32_t)*(uint16_t*)((char*)eax + 0xabe));
006124b7                              uint32_t var_14_4 = edi_24;
006124ba                              int32_t ecx_32;
006124ba                              int32_t ebx_8;
006124ba                              
006124ba                              if (ecx_22 <= (0x10 - edi_24))
006124ba                              {
00612512                                  edi_24 = *(uint16_t*)((char*)eax + 0xabc);
00612519                                  edi_24 <<= ecx_22;
0061251c                                  *(uint16_t*)((char*)eax + 0x16b0) |= edi_24;
00612526                                  ecx_32 = (ecx_22 + var_14_4);
006124ba                              }
006124ba                              else
006124ba                              {
006124bc                                  uint32_t esi_8 = ((uint32_t)*(uint16_t*)((char*)eax + 0xabc));
006124c7                                  char* ecx_29 = *(uint32_t*)((char*)eax + 8);
006124ca                                  *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_8 << ecx_22));
006124d4                                  ebx_8 = *(uint8_t*)((char*)eax + 0x16b0);
006124da                                  ecx_29[*(uint32_t*)((char*)eax + 0x14)] = ebx_8;
006124dd                                  *(uint32_t*)((char*)eax + 0x14) += 1;
006124e3                                  ebx_8 = *(uint8_t*)((char*)eax + 0x16b1);
006124e9                                  *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_8;
006124ef                                  ebx_8 = *(uint32_t*)((char*)eax + 0x16b4);
006124f5                                  *(uint32_t*)((char*)eax + 0x14) += 1;
006124f8                                  int32_t ecx_30;
006124f8                                  ecx_30 = 0x10;
006124fa                                  ecx_30 = (0x10 - ebx_8);
006124fc                                  esi_8 u>>= ecx_30;
00612502                                  ecx_32 = ((ebx_8 + var_14_4) - 0x10);
00612506                                  *(uint16_t*)((char*)eax + 0x16b0) = esi_8;
0061250d                                  j_1 = j_2;
006124ba                              }
006124ba                              
0061252e                              *(uint32_t*)((char*)eax + 0x16b4) = ecx_32;
0061252e                              
00612534                              if (ecx_32 <= 9)
00612534                              {
0061257c                                  *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)((j_1 - 0xb) << ecx_32));
00612586                                  *(uint32_t*)((char*)eax + 0x16b4) = (ecx_32 + 7);
00612534                              }
00612534                              else
00612534                              {
0061253a                                  char* ecx_33 = *(uint32_t*)((char*)eax + 8);
0061253d                                  *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)((j_1 - 0xb) << ecx_32));
00612547                                  ebx_8 = *(uint8_t*)((char*)eax + 0x16b0);
0061254d                                  ecx_33[*(uint32_t*)((char*)eax + 0x14)] = ebx_8;
00612550                                  *(uint32_t*)((char*)eax + 0x14) += 1;
00612559                                  ebx_8 = *(uint8_t*)((char*)eax + 0x16b1);
00612553                                  *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_8;
00612562                                  int32_t ebx_9 = *(uint32_t*)((char*)eax + 0x16b4);
00612568                                  *(uint32_t*)((char*)eax + 0x14) += 1;
0061256b                                  int32_t ecx_34;
0061256b                                  ecx_34 = 0x10;
0061256d                                  ecx_34 = (0x10 - ebx_9);
0061256f                                  esi_4 = ((j_1 - 0xb) >> ecx_34);
00612489                                  *(uint16_t*)((char*)eax + 0x16b0) = esi_4;
00612490                                  *(uint32_t*)((char*)eax + 0x16b4) = (ebx_9 - 9);
00612534                              }
006123ba                          }
006123ba                          else
006123ba                          {
006123c0                              uint32_t edi_14 = ((uint32_t)*(uint16_t*)((char*)eax + 0xaba));
006123cb                              uint32_t var_14_3 = edi_14;
006123ce                              int32_t ecx_26;
006123ce                              int32_t ebx_6;
006123ce                              
006123ce                              if (ecx_22 <= (0x10 - edi_14))
006123ce                              {
00612426                                  edi_14 = *(uint16_t*)((char*)eax + 0xab8);
0061242d                                  edi_14 <<= ecx_22;
00612430                                  *(uint16_t*)((char*)eax + 0x16b0) |= edi_14;
0061243a                                  ecx_26 = (ecx_22 + var_14_3);
006123ce                              }
006123ce                              else
006123ce                              {
006123d0                                  uint32_t esi_6 = ((uint32_t)*(uint16_t*)((char*)eax + 0xab8));
006123db                                  char* ecx_23 = *(uint32_t*)((char*)eax + 8);
006123de                                  *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_6 << ecx_22));
006123e8                                  ebx_6 = *(uint8_t*)((char*)eax + 0x16b0);
006123ee                                  ecx_23[*(uint32_t*)((char*)eax + 0x14)] = ebx_6;
006123f1                                  *(uint32_t*)((char*)eax + 0x14) += 1;
006123f7                                  ebx_6 = *(uint8_t*)((char*)eax + 0x16b1);
006123fd                                  *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_6;
00612403                                  ebx_6 = *(uint32_t*)((char*)eax + 0x16b4);
00612409                                  *(uint32_t*)((char*)eax + 0x14) += 1;
0061240c                                  int32_t ecx_24;
0061240c                                  ecx_24 = 0x10;
0061240e                                  ecx_24 = (0x10 - ebx_6);
00612410                                  esi_6 u>>= ecx_24;
00612416                                  ecx_26 = ((ebx_6 + var_14_3) - 0x10);
0061241a                                  *(uint16_t*)((char*)eax + 0x16b0) = esi_6;
00612421                                  j_1 = j_2;
006123ce                              }
006123ce                              
00612442                              *(uint32_t*)((char*)eax + 0x16b4) = ecx_26;
00612442                              
00612448                              if (ecx_26 <= 0xd)
00612448                              {
0061249d                                  *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)((j_1 - 3) << ecx_26));
00612586                                  *(uint32_t*)((char*)eax + 0x16b4) = (ecx_26 + 3);
00612448                              }
00612448                              else
00612448                              {
0061244e                                  char* ecx_27 = *(uint32_t*)((char*)eax + 8);
00612451                                  *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)((j_1 - 3) << ecx_26));
0061245b                                  ebx_6 = *(uint8_t*)((char*)eax + 0x16b0);
00612461                                  ecx_27[*(uint32_t*)((char*)eax + 0x14)] = ebx_6;
00612464                                  *(uint32_t*)((char*)eax + 0x14) += 1;
0061246d                                  ebx_6 = *(uint8_t*)((char*)eax + 0x16b1);
00612467                                  *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_6;
00612476                                  int32_t ebx_7 = *(uint32_t*)((char*)eax + 0x16b4);
0061247c                                  *(uint32_t*)((char*)eax + 0x14) += 1;
0061247f                                  int32_t ecx_28;
0061247f                                  ecx_28 = 0x10;
00612481                                  ecx_28 = (0x10 - ebx_7);
00612483                                  esi_4 = ((j_1 - 3) >> ecx_28);
00612489                                  *(uint16_t*)((char*)eax + 0x16b0) = esi_4;
00612490                                  *(uint32_t*)((char*)eax + 0x16b4) = (ebx_7 - 0xd);
00612448                              }
006123ba                          }
00612225                      }
00612225                      else
00612225                      {
0061222e                          if (edx_2 != var_18)
0061222e                          {
00612234                              uint32_t edi_3 = ((uint32_t)*(uint16_t*)(((char*)eax + (edx_2 << 2)) + 0xa76));
0061223c                              int32_t ecx_9 = *(uint32_t*)((char*)eax + 0x16b4);
00612249                              int32_t ecx_12;
00612249                              int32_t ebx_2;
00612249                              
00612249                              if (ecx_9 <= (0x10 - edi_3))
00612249                              {
006122a2                                  ebx_2 = *(uint16_t*)(((char*)eax + (edx_2 << 2)) + 0xa74);
006122aa                                  ebx_2 <<= ecx_9;
006122ad                                  int32_t ecx_13 = *(uint32_t*)((char*)eax + 0x16b4);
006122b3                                  *(uint16_t*)((char*)eax + 0x16b0) |= ebx_2;
006122ba                                  ecx_12 = (ecx_13 + edi_3);
00612249                              }
00612249                              else
00612249                              {
0061224b                                  uint32_t esi_2 = ((uint32_t)*(uint16_t*)(((char*)eax + (edx_2 << 2)) + 0xa74));
00612257                                  char* ecx_10 = *(uint32_t*)((char*)eax + 8);
0061225a                                  *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_2 << ecx_9));
00612264                                  ebx_2 = *(uint8_t*)((char*)eax + 0x16b0);
0061226a                                  ecx_10[*(uint32_t*)((char*)eax + 0x14)] = ebx_2;
0061226d                                  *(uint32_t*)((char*)eax + 0x14) += 1;
00612276                                  ebx_2 = *(uint8_t*)((char*)eax + 0x16b1);
00612270                                  *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_2;
0061227f                                  int32_t edx_12 = *(uint32_t*)((char*)eax + 0x16b4);
00612285                                  *(uint32_t*)((char*)eax + 0x14) += 1;
00612288                                  char* ecx_11;
00612288                                  ecx_11 = 0x10;
0061228a                                  ecx_11 = (0x10 - edx_12);
0061228c                                  esi_2 u>>= ecx_11;
0061228f                                  ecx_12 = ((edx_12 + edi_3) - 0x10);
00612293                                  edx_2 = var_14_1;
00612296                                  *(uint16_t*)((char*)eax + 0x16b0) = esi_2;
0061229d                                  j_1 = j_2;
00612249                              }
006122bc                              j_1 -= 1;
006122bd                              *(uint32_t*)((char*)eax + 0x16b4) = ecx_12;
006122c3                              j_2 = j_1;
0061222e                          }
0061222e                          
006122c6                          uint32_t edi_8 = ((uint32_t)*(uint16_t*)((char*)eax + 0xab6));
006122cd                          int32_t ecx_14 = *(uint32_t*)((char*)eax + 0x16b4);
006122da                          uint32_t var_14_2 = edi_8;
006122dd                          int32_t ecx_18;
006122dd                          int32_t ebx_3;
006122dd                          
006122dd                          if (ecx_14 <= (0x10 - edi_8))
006122dd                          {
00612335                              edi_8 = *(uint16_t*)((char*)eax + 0xab4);
0061233c                              edi_8 <<= ecx_14;
0061233f                              *(uint16_t*)((char*)eax + 0x16b0) |= edi_8;
00612349                              ecx_18 = (ecx_14 + var_14_2);
006122dd                          }
006122dd                          else
006122dd                          {
006122df                              uint32_t esi_3 = ((uint32_t)*(uint16_t*)((char*)eax + 0xab4));
006122ea                              char* ecx_15 = *(uint32_t*)((char*)eax + 8);
006122ed                              *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_3 << ecx_14));
006122f7                              ebx_3 = *(uint8_t*)((char*)eax + 0x16b0);
006122fd                              ecx_15[*(uint32_t*)((char*)eax + 0x14)] = ebx_3;
00612300                              *(uint32_t*)((char*)eax + 0x14) += 1;
00612306                              ebx_3 = *(uint8_t*)((char*)eax + 0x16b1);
0061230c                              *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_3;
00612312                              ebx_3 = *(uint32_t*)((char*)eax + 0x16b4);
00612318                              *(uint32_t*)((char*)eax + 0x14) += 1;
0061231b                              int32_t ecx_16;
0061231b                              ecx_16 = 0x10;
0061231d                              ecx_16 = (0x10 - ebx_3);
0061231f                              esi_3 u>>= ecx_16;
00612325                              ecx_18 = ((ebx_3 + var_14_2) - 0x10);
00612329                              *(uint16_t*)((char*)eax + 0x16b0) = esi_3;
00612330                              j_1 = j_2;
006122dd                          }
006122dd                          
00612351                          *(uint32_t*)((char*)eax + 0x16b4) = ecx_18;
00612351                          
00612357                          if (ecx_18 <= 0xe)
00612357                          {
0061239f                              *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)((j_1 - 3) << ecx_18));
00612586                              *(uint32_t*)((char*)eax + 0x16b4) = (ecx_18 + 2);
00612357                          }
00612357                          else
00612357                          {
0061235d                              char* ecx_19 = *(uint32_t*)((char*)eax + 8);
00612360                              *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)((j_1 - 3) << ecx_18));
0061236a                              ebx_3 = *(uint8_t*)((char*)eax + 0x16b0);
00612370                              ecx_19[*(uint32_t*)((char*)eax + 0x14)] = ebx_3;
00612373                              *(uint32_t*)((char*)eax + 0x14) += 1;
0061237c                              ebx_3 = *(uint8_t*)((char*)eax + 0x16b1);
00612376                              *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_3;
00612385                              int32_t ebx_4 = *(uint32_t*)((char*)eax + 0x16b4);
0061238b                              *(uint32_t*)((char*)eax + 0x14) += 1;
0061238e                              int32_t ecx_20;
0061238e                              ecx_20 = 0x10;
00612390                              ecx_20 = (0x10 - ebx_4);
00612392                              esi_4 = ((j_1 - 3) >> ecx_20);
00612489                              *(uint16_t*)((char*)eax + 0x16b0) = esi_4;
00612490                              *(uint32_t*)((char*)eax + 0x16b4) = (ebx_4 - 0xe);
00612357                          }
00612225                      }
00612180                  }
0061258c                  j_1 = 0;
00612591                  var_18 = edx_2;
00612594                  int32_t var_2c_1;
00612594                  
00612594                  if (var_c == 0)
00612594                  {
00612596                      edi_1 = 0x8a;
006125a5                      var_2c_1 = 3;
00612594                  }
00612594                  else if (edx_2 != var_c)
006125a0                  {
006125ab                      edi_1 = 7;
006125ac                      var_2c_1 = 4;
006125a0                  }
006125a0                  else
006125a0                  {
006125a4                      edi_1 = 6;
006125a5                      var_2c_1 = 3;
006125a0                  }
006125a0                  
006125ae                  ebx = var_2c_1;
00612178              }
00612178              
006125af              var_10_1 += 4;
006125b3              i = i_1;
006125b3              i_1 -= 1;
006125b6          } while (i != 1);
0061214f      }
00612122  }


006125c1  void __stdcall send_all_trees(struct internal_state* arg1, int32_t arg2, int32_t arg3, int32_t arg4)

006125c1  {
006125c6      int32_t ecx;
006125c6      int32_t var_8 = ecx;
006125c7      struct internal_state* eax;
006125c7      int32_t ecx_1 = *(int32_t*)((char*)eax + 0x16b4);
006125d1      int32_t ebx = arg3;
006125d5      int32_t edi;
006125d5      int32_t var_14 = edi;
006125d5      
006125d6      if (ecx_1 <= 0xb)
006125d6      {
00612640          *(int32_t*)((char*)eax + 0x16b0) |= ((int16_t)(((char*)arg1 - 0x101) << ecx_1));
0061264a          *(int32_t*)((char*)eax + 0x16b4) = (ecx_1 + 5);
006125d6      }
006125d6      else
006125d6      {
006125e5          char* blocks = eax->blocks;
006125e8          int32_t var_8_1 = ebx;
006125eb          *(int32_t*)((char*)eax + 0x16b0) |= ((int16_t)(((char*)arg1 - 0x101) << ecx_1));
006125f2          ebx = *(int32_t*)((char*)eax + 0x16b0);
006125fb          blocks[eax->sub] = ebx;
006125fe          eax->blocks = (&eax->blocks->dummy + 1);
00612604          ebx = *(int32_t*)((char*)eax + 0x16b1);
00612601          eax->blocks[eax->sub] = ebx;
00612610          int32_t edx_4 = *(int32_t*)((char*)eax + 0x16b4);
00612616          eax->blocks = (&eax->blocks->dummy + 1);
00612619          ebx = var_8_1;
0061261c          char* ecx_2;
0061261c          ecx_2 = 0x10;
0061261e          ecx_2 = (0x10 - edx_4);
00612620          void* __offset(internal_state, -0x101) esi_2;
00612620          esi_2 = (((char*)arg1 - 0x101) >> ecx_2);
00612626          *(int32_t*)((char*)eax + 0x16b4) = (edx_4 - 0xb);
0061262c          *(int32_t*)((char*)eax + 0x16b0) = esi_2;
006125d6      }
006125d6      
00612650      int32_t ecx_4 = *(int32_t*)((char*)eax + 0x16b4);
00612650      
00612659      if (ecx_4 <= 0xb)
00612659      {
006126b9          *(int32_t*)((char*)eax + 0x16b0) |= ((int16_t)((arg2 - 1) << ecx_4));
006126c3          *(int32_t*)((char*)eax + 0x16b4) = (ecx_4 + 5);
00612659      }
00612659      else
00612659      {
00612663          char* blocks_1 = eax->blocks;
00612666          int32_t var_8_2 = ebx;
00612669          *(int32_t*)((char*)eax + 0x16b0) |= ((int16_t)((arg2 - 1) << ecx_4));
00612670          ebx = *(int32_t*)((char*)eax + 0x16b0);
00612679          blocks_1[eax->sub] = ebx;
0061267c          eax->blocks = (&eax->blocks->dummy + 1);
00612682          ebx = *(int32_t*)((char*)eax + 0x16b1);
0061267f          eax->blocks[eax->sub] = ebx;
0061268e          int32_t edx_13 = *(int32_t*)((char*)eax + 0x16b4);
00612694          eax->blocks = (&eax->blocks->dummy + 1);
00612697          ebx = var_8_2;
0061269a          char* ecx_5;
0061269a          ecx_5 = 0x10;
0061269c          ecx_5 = (0x10 - edx_13);
0061269e          int32_t esi_4;
0061269e          esi_4 = ((arg2 - 1) >> ecx_5);
006126a4          *(int32_t*)((char*)eax + 0x16b4) = (edx_13 - 0xb);
006126aa          *(int32_t*)((char*)eax + 0x16b0) = esi_4;
00612659      }
00612659      
006126c9      int32_t ecx_7 = *(int32_t*)((char*)eax + 0x16b4);
006126c9      
006126d2      if (ecx_7 <= 0xc)
006126d2      {
00612730          *(int32_t*)((char*)eax + 0x16b0) |= ((int16_t)((ebx - 4) << ecx_7));
0061273a          *(int32_t*)((char*)eax + 0x16b4) = (ecx_7 + 4);
006126d2      }
006126d2      else
006126d2      {
006126d4          int32_t esi_5 = (ebx - 4);
006126db          char* blocks_2 = eax->blocks;
006126de          int32_t var_8_3 = ebx;
006126e1          *(int32_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_5 << ecx_7));
006126e8          ebx = *(int32_t*)((char*)eax + 0x16b0);
006126f1          blocks_2[eax->sub] = ebx;
006126f4          eax->blocks = (&eax->blocks->dummy + 1);
006126fa          ebx = *(int32_t*)((char*)eax + 0x16b1);
006126f7          eax->blocks[eax->sub] = ebx;
00612706          int32_t edx_22 = *(int32_t*)((char*)eax + 0x16b4);
0061270c          eax->blocks = (&eax->blocks->dummy + 1);
0061270f          ebx = var_8_3;
00612712          char* ecx_8;
00612712          ecx_8 = 0x10;
00612714          ecx_8 = (0x10 - edx_22);
00612716          esi_5 u>>= ecx_8;
0061271c          *(int32_t*)((char*)eax + 0x16b4) = (edx_22 - 0xc);
00612722          *(int32_t*)((char*)eax + 0x16b0) = esi_5;
006126d2      }
006126d2      
00612740      void* edi_1 = nullptr;
00612740      
00612744      if (ebx > 0)
00612744      {
006127d3          do
006127d3          {
0061274a              int32_t ecx_10 = *(int32_t*)((char*)eax + 0x16b4);
00612753              uint32_t edx_26 = ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x7f4b84));
00612753              
0061275a              if (ecx_10 <= 0xd)
0061275a              {
006127b5                  edx_26 = *(uint16_t*)(((char*)eax + (edx_26 << 2)) + 0xa76);
006127bd                  edx_26 <<= ecx_10;
006127c0                  *(int32_t*)((char*)eax + 0x16b0) |= edx_26;
006127ca                  *(int32_t*)((char*)eax + 0x16b4) = (ecx_10 + 3);
0061275a              }
0061275a              else
0061275a              {
0061275c                  uint32_t esi_6 = ((uint32_t)*(uint16_t*)(((char*)eax + (edx_26 << 2)) + 0xa76));
00612768                  char* blocks_3 = eax->blocks;
0061276b                  *(int32_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_6 << ecx_10));
00612772                  ebx = *(int32_t*)((char*)eax + 0x16b0);
0061277b                  blocks_3[eax->sub] = ebx;
0061277e                  eax->blocks = (&eax->blocks->dummy + 1);
00612784                  ebx = *(int32_t*)((char*)eax + 0x16b1);
00612781                  eax->blocks[eax->sub] = ebx;
00612790                  int32_t edx_31 = *(int32_t*)((char*)eax + 0x16b4);
00612796                  eax->blocks = (&eax->blocks->dummy + 1);
00612799                  ebx = arg3;
0061279c                  char* ecx_11;
0061279c                  ecx_11 = 0x10;
0061279e                  ecx_11 = (0x10 - edx_31);
006127a0                  esi_6 u>>= ecx_11;
006127a6                  *(int32_t*)((char*)eax + 0x16b4) = (edx_31 - 0xd);
006127ac                  *(int32_t*)((char*)eax + 0x16b0) = esi_6;
0061275a              }
0061275a              
006127d0              edi_1 += 1;
006127d3          } while (edi_1 < ebx);
00612744      }
00612744      
006127e3      send_tree(eax, ((char*)arg1 - 1), ((char*)eax + 0x8c));
006127f2      send_tree(eax, (arg2 - 1), ((char*)eax + 0x980));
006125c1  }


006127fe  void __stdcall compress_block(struct internal_state* arg1, struct ct_data_s* arg2, struct ct_data_s* arg3)

006127fe  {
00612807      struct internal_state* ebx = arg1;
0061280a      void* i = nullptr;
00612813      int32_t edi;
00612813      int32_t var_20 = edi;
00612814      void* eax;
00612814      
00612814      if (*(uint32_t*)((char*)eax + 0x1698) != 0)
00612814      {
00612b0f          do
00612b0f          {
00612820              uint32_t edi_1 = ((uint32_t)*(uint16_t*)(*(uint32_t*)((char*)eax + 0x169c) + (i << 1)));
0061282a              uint32_t esi_1 = ((uint32_t)*(uint8_t*)((char*)i + *(uint32_t*)((char*)eax + 0x1690)));
00612839              int32_t ecx_4;
00612839              
00612839              if (edi_1 != 0)
00612839              {
006128b5                  uint32_t edx_9 = ((uint32_t)*(uint8_t*)(esi_1 + 0x7f5290));
006128be                  int32_t ecx_6 = (edx_9 << 2);
006128c4                  uint32_t ecx_7 = ((uint32_t)*(uint16_t*)((ecx_6 + ebx) + 0x406));
006128d2                  int32_t ecx_8 = *(uint32_t*)((char*)eax + 0x16b4);
006128da                  int32_t ecx_12;
006128da                  
006128da                  if (ecx_8 <= (0x10 - ecx_7))
006128da                  {
00612939                      edx_9 = *(uint16_t*)(((char*)arg1 + (edx_9 << 2)) + 0x404);
00612941                      edx_9 <<= ecx_8;
00612944                      *(uint16_t*)((char*)eax + 0x16b0) |= edx_9;
0061294e                      ecx_12 = (ecx_8 + ecx_7);
006128da                  }
006128da                  else
006128da                  {
006128df                      uint32_t edi_4 = ((uint32_t)*(uint16_t*)(((char*)arg1 + (edx_9 << 2)) + 0x404));
006128eb                      char* ecx_9 = *(uint32_t*)((char*)eax + 8);
006128ee                      *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(edi_4 << ecx_8));
006128f8                      int32_t ebx_1;
006128f8                      ebx_1 = *(uint8_t*)((char*)eax + 0x16b0);
006128fe                      ecx_9[*(uint32_t*)((char*)eax + 0x14)] = ebx_1;
00612901                      *(uint32_t*)((char*)eax + 0x14) += 1;
0061290a                      ebx_1 = *(uint8_t*)((char*)eax + 0x16b1);
00612904                      *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_1;
00612913                      int32_t edx_14 = *(uint32_t*)((char*)eax + 0x16b4);
00612919                      *(uint32_t*)((char*)eax + 0x14) += 1;
0061291c                      char* ecx_10;
0061291c                      ecx_10 = 0x10;
0061291e                      ecx_10 = (0x10 - edx_14);
00612920                      edi_4 u>>= ecx_10;
00612926                      ecx_12 = ((edx_14 + ecx_7) - 0x10);
0061292a                      *(uint16_t*)((char*)eax + 0x16b0) = edi_4;
006128da                  }
006128da                  
00612950                  *(uint32_t*)((char*)eax + 0x16b4) = ecx_12;
00612959                  int32_t edx_16 = *(uint32_t*)(ecx_6 + 0x7f4a48);
00612959                  
00612964                  if (edx_16 != 0)
00612964                  {
00612966                      int32_t esi_4 = (esi_1 - *(uint32_t*)(ecx_6 + 0x7f5390));
0061296c                      int32_t ecx_14 = *(uint32_t*)((char*)eax + 0x16b4);
00612979                      int32_t ecx_18;
00612979                      
00612979                      if (ecx_14 <= (0x10 - edx_16))
00612979                      {
006129c9                          *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_4 << ecx_14));
006129d0                          ecx_18 = (ecx_14 + edx_16);
00612979                      }
00612979                      else
00612979                      {
0061297f                          char* ecx_15 = *(uint32_t*)((char*)eax + 8);
00612982                          *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_4 << ecx_14));
0061298c                          int32_t ebx_3;
0061298c                          ebx_3 = *(uint8_t*)((char*)eax + 0x16b0);
00612992                          ecx_15[*(uint32_t*)((char*)eax + 0x14)] = ebx_3;
00612995                          *(uint32_t*)((char*)eax + 0x14) += 1;
0061299e                          ebx_3 = *(uint8_t*)((char*)eax + 0x16b1);
00612998                          *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_3;
006129a7                          int32_t edx_21 = *(uint32_t*)((char*)eax + 0x16b4);
006129ad                          *(uint32_t*)((char*)eax + 0x14) += 1;
006129b0                          char* ecx_16;
006129b0                          ecx_16 = 0x10;
006129b2                          ecx_16 = (0x10 - edx_21);
006129b4                          esi_4 u>>= ecx_16;
006129ba                          ecx_18 = ((edx_21 + edx_16) - 0x10);
006129be                          *(uint16_t*)((char*)eax + 0x16b0) = esi_4;
00612979                      }
00612979                      
006129d2                      *(uint32_t*)((char*)eax + 0x16b4) = ecx_18;
00612964                  }
00612964                  
006129df                  uint32_t ecx_19;
006129df                  
006129df                  if ((edi_1 - 1) >= 0x100)
006129ef                      ecx_19 = ((uint32_t)*(uint8_t*)(((edi_1 - 1) >> 7) + 0x7f5190));
006129df                  else
006129e1                      ecx_19 = ((uint32_t)*(uint8_t*)(edi_1 + 0x7f508f));
006129e1                  
006129fb                  uint32_t esi_7 = (ecx_19 << 2);
006129fe                  void* edx_22 = (esi_7 + arg2);
00612a01                  uint32_t ecx_23 = ((uint32_t)*(uint16_t*)((char*)edx_22 + 2));
00612a0d                  int32_t ecx_24 = *(uint32_t*)((char*)eax + 0x16b4);
00612a18                  int32_t ecx_28;
00612a18                  
00612a18                  if (ecx_24 <= (0x10 - ecx_23))
00612a18                  {
00612a6c                      edx_22 = *(uint16_t*)edx_22;
00612a6f                      edx_22 <<= ecx_24;
00612a72                      *(uint16_t*)((char*)eax + 0x16b0) |= edx_22;
00612a7c                      ecx_28 = (ecx_24 + ecx_23);
00612a18                  }
00612a18                  else
00612a18                  {
00612a1a                      uint32_t esi_8 = ((uint32_t)*(uint16_t*)edx_22);
00612a21                      char* ecx_25 = *(uint32_t*)((char*)eax + 8);
00612a24                      *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_8 << ecx_24));
00612a2e                      int32_t ebx_4;
00612a2e                      ebx_4 = *(uint8_t*)((char*)eax + 0x16b0);
00612a34                      ecx_25[*(uint32_t*)((char*)eax + 0x14)] = ebx_4;
00612a37                      *(uint32_t*)((char*)eax + 0x14) += 1;
00612a40                      ebx_4 = *(uint8_t*)((char*)eax + 0x16b1);
00612a3a                      *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx_4;
00612a49                      int32_t edx_27 = *(uint32_t*)((char*)eax + 0x16b4);
00612a4f                      *(uint32_t*)((char*)eax + 0x14) += 1;
00612a52                      char* ecx_26;
00612a52                      ecx_26 = 0x10;
00612a54                      ecx_26 = (0x10 - edx_27);
00612a56                      esi_8 u>>= ecx_26;
00612a5c                      ecx_28 = ((edx_27 + ecx_23) - 0x10);
00612a60                      *(uint16_t*)((char*)eax + 0x16b0) = esi_8;
00612a18                  }
00612a18                  
00612a7e                  ebx = arg1;
00612a81                  *(uint32_t*)((char*)eax + 0x16b4) = ecx_28;
00612a87                  int32_t edx_29 = *(uint32_t*)(esi_7 + 0x7f4ac0);
00612a87                  
00612a92                  if (edx_29 != 0)
00612a92                  {
00612a94                      void* edi_6 = ((edi_1 - 1) - *(uint32_t*)(esi_7 + 0x7f5408));
00612a94                      
00612aa1                      if (ecx_28 <= (0x10 - edx_29))
00612aa1                      {
00612af7                          *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(edi_6 << ecx_28));
00612afe                          ecx_4 = (ecx_28 + edx_29);
00612aa1                      }
00612aa1                      else
00612aa1                      {
00612aa7                          char* ecx_29 = *(uint32_t*)((char*)eax + 8);
00612aaa                          struct internal_state* var_10_2 = ebx;
00612aad                          *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(edi_6 << ecx_28));
00612ab7                          ebx = *(uint8_t*)((char*)eax + 0x16b0);
00612abd                          ecx_29[*(uint32_t*)((char*)eax + 0x14)] = ebx;
00612ac0                          *(uint32_t*)((char*)eax + 0x14) += 1;
00612ac6                          int32_t edx_32;
00612ac6                          edx_32 = *(uint8_t*)((char*)eax + 0x16b1);
00612acf                          ebx = var_10_2;
00612acc                          *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = edx_32;
00612ad5                          int32_t edx_33 = *(uint32_t*)((char*)eax + 0x16b4);
00612adb                          *(uint32_t*)((char*)eax + 0x14) += 1;
00612ade                          int32_t ecx_30;
00612ade                          ecx_30 = 0x10;
00612ae0                          ecx_30 = (0x10 - edx_33);
00612ae2                          edi_6 u>>= ecx_30;
00612ae8                          ecx_4 = ((edx_33 + edx_29) - 0x10);
00612aec                          *(uint16_t*)((char*)eax + 0x16b0) = edi_6;
00612aa1                      }
00612aa1                      
00612b00                      *(uint32_t*)((char*)eax + 0x16b4) = ecx_4;
00612a92                  }
00612839              }
00612839              else
00612839              {
0061283b                  int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x16b4);
00612841                  void* esi_2 = ((char*)ebx + (esi_1 << 2));
00612844                  uint32_t edi_2 = ((uint32_t)*(uint16_t*)((char*)esi_2 + 2));
00612844                  
0061284d                  if (ecx_1 <= (0x10 - edi_2))
0061284d                  {
006128a1                      int32_t edx_3;
006128a1                      edx_3 = *(uint16_t*)esi_2;
006128a4                      edx_3 <<= ecx_1;
006128a7                      *(uint16_t*)((char*)eax + 0x16b0) |= edx_3;
006128ae                      ecx_4 = (ecx_1 + edi_2);
0061284d                  }
0061284d                  else
0061284d                  {
0061284f                      uint32_t esi_3 = ((uint32_t)*(uint16_t*)esi_2);
00612856                      char* ecx_2 = *(uint32_t*)((char*)eax + 8);
00612859                      *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_3 << ecx_1));
00612863                      ebx = *(uint8_t*)((char*)eax + 0x16b0);
00612869                      ecx_2[*(uint32_t*)((char*)eax + 0x14)] = ebx;
0061286c                      *(uint32_t*)((char*)eax + 0x14) += 1;
00612872                      ebx = *(uint8_t*)((char*)eax + 0x16b1);
0061286f                      *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ebx;
0061287e                      int32_t edx_8 = *(uint32_t*)((char*)eax + 0x16b4);
00612884                      *(uint32_t*)((char*)eax + 0x14) += 1;
00612887                      ebx = arg1;
0061288a                      char* ecx_3;
0061288a                      ecx_3 = 0x10;
0061288c                      ecx_3 = (0x10 - edx_8);
0061288e                      esi_3 u>>= ecx_3;
00612891                      ecx_4 = ((edx_8 + edi_2) - 0x10);
00612895                      *(uint16_t*)((char*)eax + 0x16b0) = esi_3;
0061284d                  }
0061284d                  
00612b00                  *(uint32_t*)((char*)eax + 0x16b4) = ecx_4;
00612839              }
00612b06              i += 1;
00612b0f          } while (i < *(uint32_t*)((char*)eax + 0x1698));
00612814      }
00612814      
00612b15      uint32_t edx_34 = ((uint32_t)*(int32_t*)((char*)ebx + 0x402));
00612b1c      int32_t ecx_32 = *(uint32_t*)((char*)eax + 0x16b4);
00612b2c      void* ecx_36;
00612b2c      
00612b2c      if (ecx_32 <= (0x10 - edx_34))
00612b2c      {
00612b87          int32_t esi_11;
00612b87          esi_11 = *(int32_t*)((char*)ebx + 0x400);
00612b8e          esi_11 <<= ecx_32;
00612b91          *(uint16_t*)((char*)eax + 0x16b0) |= esi_11;
00612b98          ecx_36 = (ecx_32 + edx_34);
00612b2c      }
00612b2c      else
00612b2c      {
00612b2e          uint32_t esi_12 = ((uint32_t)*(int32_t*)((char*)ebx + 0x400));
00612b39          char* ecx_33 = *(uint32_t*)((char*)eax + 8);
00612b3c          arg2 = ebx;
00612b3f          *(uint16_t*)((char*)eax + 0x16b0) |= ((int16_t)(esi_12 << ecx_32));
00612b49          ebx = *(uint8_t*)((char*)eax + 0x16b0);
00612b4f          ecx_33[*(uint32_t*)((char*)eax + 0x14)] = ebx;
00612b52          *(uint32_t*)((char*)eax + 0x14) += 1;
00612b58          int32_t edx_37;
00612b58          edx_37 = *(uint8_t*)((char*)eax + 0x16b1);
00612b61          ebx = arg2;
00612b5e          *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = edx_37;
00612b67          int32_t edx_38 = *(uint32_t*)((char*)eax + 0x16b4);
00612b6d          *(uint32_t*)((char*)eax + 0x14) += 1;
00612b70          int32_t ecx_34;
00612b70          ecx_34 = 0x10;
00612b72          ecx_34 = (0x10 - edx_38);
00612b74          esi_12 u>>= ecx_34;
00612b7a          ecx_36 = ((edx_38 + edx_34) - 0x10);
00612b7e          *(uint16_t*)((char*)eax + 0x16b0) = esi_12;
00612b2c      }
00612b2c      
00612b9a      *(uint32_t*)((char*)eax + 0x16b4) = ecx_36;
00612ba9      *(uint32_t*)((char*)eax + 0x16ac) = ((uint32_t)*(int32_t*)((char*)ebx + 0x402));
006127fe  }


00612bb4  void __fastcall set_data_type(struct internal_state* arg1)

00612bb4  {
00612bb8      int32_t edi;
00612bb8      int32_t var_c = edi;
00612bbb      int32_t edx = 0;
00612bbd      int32_t edi_1 = 0;
00612bbf      void* ecx;
00612bbf      int16_t* eax = ((char*)ecx + 0x8c);
00612bc5      int32_t i_3 = 7;
00612bcf      int32_t i;
00612bcf      
00612bcf      do
00612bcf      {
00612bc9          edi_1 += ((uint32_t)*(uint16_t*)eax);
00612bcb          eax = &eax[2];
00612bce          i = i_3;
00612bce          i_3 -= 1;
00612bcf      } while (i != 1);
00612bd3      void* eax_1 = ((char*)ecx + 0xa8);
00612bd9      int32_t i_4 = 0x79;
00612be3      int32_t i_1;
00612be3      
00612be3      do
00612be3      {
00612bdd          edx += ((uint32_t)*(uint16_t*)eax_1);
00612bdf          eax_1 += 4;
00612be2          i_1 = i_4;
00612be2          i_4 -= 1;
00612be3      } while (i_1 != 1);
00612be5      void* eax_2 = ((char*)ecx + 0x28c);
00612beb      int32_t i_5 = 0x80;
00612bf9      int32_t i_2;
00612bf9      
00612bf9      do
00612bf9      {
00612bf3          edi_1 += ((uint32_t)*(uint16_t*)eax_2);
00612bf5          eax_2 += 4;
00612bf8          i_2 = i_5;
00612bf8          i_5 -= 1;
00612bf9      } while (i_2 != 1);
00612c01      eax_2 = (eax_2 - eax_2);
00612c03      eax_2 += 1;
00612c06      *(uint8_t*)((char*)ecx + 0x1c) = eax_2;
00612bb4  }


00612c0b  void __convention("regparm") bi_windup(struct internal_state* arg1)

00612c0b  {
00612c0b      void* eax;
00612c0b      int32_t ecx_2 = *(uint32_t*)((char*)eax + 0x16b4);
00612c15      int32_t ebx;
00612c15      
00612c15      if (ecx_2 > 8)
00612c15      {
00612c24          ebx = *(uint8_t*)((char*)eax + 0x16b0);
00612c17          *(uint32_t*)((char*)eax + 8)[*(uint32_t*)((char*)eax + 0x14)] = ebx;
00612c29          *(uint32_t*)((char*)eax + 0x14) += 1;
00612c32          void* ecx;
00612c32          ecx = *(uint8_t*)((char*)eax + 0x16b1);
00612c2f          *(uint32_t*)((char*)eax + 0x14)[*(uint32_t*)((char*)eax + 8)] = ecx;
00612c4e          *(uint32_t*)((char*)eax + 0x14) += 1;
00612c15      }
00612c15      else if (ecx_2 > 0)
00612c3d      {
00612c45          ebx = *(uint8_t*)((char*)eax + 0x16b0);
00612c3f          *(uint32_t*)((char*)eax + 8)[*(uint32_t*)((char*)eax + 0x14)] = ebx;
00612c4e          *(uint32_t*)((char*)eax + 0x14) += 1;
00612c3d      }
00612c51      *(uint16_t*)((char*)eax + 0x16b0) = 0;
00612c59      *(uint32_t*)((char*)eax + 0x16b4) = 0;
00612c0b  }


00612c62  void __fastcall copy_block(struct internal_state* arg1, char* arg2, uint32_t arg3, int32_t arg4)

00612c62  {
00612c68      int32_t edi;
00612c68      int32_t var_c = edi;
00612c69      struct internal_state* ecx;
00612c69      struct internal_state* ebx = ecx;
00612c6b      char* edx;
00612c6b      char* edi_1 = edx;
00612c6d      struct internal_state* eax;
00612c6d      bi_windup(eax);
00612c76      *(int32_t*)((char*)eax + 0x16ac) = 8;
00612c76      
00612c80      if (arg1 != 0)
00612c80      {
00612c88          *(uint8_t*)(eax->blocks + eax->sub) = ebx;
00612c8b          eax->blocks = (&eax->blocks->dummy + 1);
00612c94          *(uint8_t*)(eax->blocks + eax->sub) = *(uint8_t*)((char*)ebx)[1];
00612c97          eax->blocks = (&eax->blocks->dummy + 1);
00612ca1          struct inflate_blocks_state* ecx_2;
00612ca1          ecx_2 = ebx;
00612ca3          ecx_2 = !(ecx_2);
00612c9e          eax->blocks[eax->sub] = ecx_2;
00612ca8          eax->blocks = (&eax->blocks->dummy + 1);
00612cb5          *(uint8_t*)(eax->blocks + eax->sub) = *(uint8_t*)((char*)((int16_t)!(ebx)))[1];
00612cb8          eax->blocks = (&eax->blocks->dummy + 1);
00612c80      }
00612c80      
00612cbe      if (ebx != 0)
00612cbe      {
00612cd6          do
00612cd6          {
00612cc6              arg1 = ebx;
00612cc9              ebx = *(uint8_t*)edi_1;
00612ccb              *(uint8_t*)(eax->blocks + eax->sub) = ebx;
00612cce              eax->blocks = (&eax->blocks->dummy + 1);
00612cd4              edi_1 = &edi_1[1];
00612cd5              ebx = ((char*)arg1 - 1);
00612cd6          } while (arg1 != 1);
00612cbe      }
00612c62  }


00612cde  void __stdcall gen_codes(struct ct_data_s* arg1, int32_t arg2, uint16_t* arg3)

00612cde  {
00612ce6      uint32_t __security_cookie_1 = __security_cookie;
00612cf8      int32_t ebx = 0;
00612cfa      uint16_t ecx = 0;
00612cfa      
00612d17      for (int32_t i = 1; i <= 0xf; i += 1)
00612d17      {
00612d07          void var_28;
00612d07          void var_26;
00612d07          uint32_t esi_2;
00612d07          esi_2 = (*(uint16_t*)(&var_28 + ((arg2 - &var_26) + (i << 1))) + ecx);
00612d0c          ecx = ((int16_t)(esi_2 << 1));
00612d0e          *(uint16_t*)(&var_28 + (i << 1)) = ecx;
00612d17      }
00612d17      
00612d1c      if (arg1 >= 0)
00612d1c      {
00612d53          do
00612d53          {
00612d1e              int32_t edi;
00612d1e              uint32_t i_1 = ((uint32_t)*(uint16_t*)((edi + (ebx << 2)) + 2));
00612d1e              
00612d25              if (i_1 != 0)
00612d25              {
00612d2d                  int32_t __saved_ebp;
00612d2d                  int16_t ecx_1 = *(uint16_t*)((&__saved_ebp + (i_1 << 1)) - 0x24);
00612d30                  uint32_t esi_4 = ((uint32_t)ecx_1);
00612d34                  *(uint16_t*)((&__saved_ebp + (i_1 << 1)) - 0x24) = (ecx_1 + 1);
00612d37                  int32_t eax_3 = 0;
00612d37                  
00612d47                  do
00612d47                  {
00612d3e                      int32_t eax_4 = (eax_3 | (esi_4 & 1));
00612d40                      esi_4 u>>= 1;
00612d42                      eax_3 = (eax_4 << 1);
00612d44                      i_1 -= 1;
00612d47                  } while (i_1 > 0);
00612d47                  
00612d4b                  *(uint16_t*)(edi + (ebx << 2)) = ((int16_t)(eax_3 >> 1));
00612d25              }
00612d25              
00612d4f              ebx += 1;
00612d53          } while (ebx <= arg1);
00612d1c      }
00612d1c      
00612d5a      __security_check_cookie(__security_cookie_1);
00612cde  }


00612d63  void __stdcall build_tree(struct internal_state* arg1, struct tree_desc_s* arg2)

00612d63  {
00612d6e      enum __unnamed var_c = fDwOfficeApp | fDwNoReporting | fDwCheckSig | fDwGiveAppResponse | fDwWhistler | fDwUseIE | fDwDeleteFiles | fDwHeadless | fDwUseHKLM | fDwUseLitePlea | fDwUsePrivacyHTA | fDwManifestDebug | fDwReportChoice | fDwSkipBucketLog | fDwNoDefaultCabLimit | fDwAllowSuspend | fDwMiniDumpWithUnloadedModules | fDwResponseLog | 0xfffc0000;
00612d76      int32_t* sub = arg1->sub;
00612d79      enum __unnamed ecx = sub[3];
00612d7c      int32_t ebx = *(uint32_t*)sub;
00612d7e      enum __unnamed eax_1 = 0;
00612d83      enum inflate_mode mode = arg1->mode;
00612d88      struct tree_desc_s* eax;
00612d88      *(int32_t*)((char*)eax + 0x1448) = 0;
00612d8e      *(int32_t*)((char*)eax + 0x144c) = 0x23d;
00612d8e      
00612d98      if (ecx > 0)
00612d98      {
00612dcf          do
00612dcf          {
00612da3              if (*(uint16_t*)(mode + (eax_1 << 2)) == 0)
00612dc5                  *(uint16_t*)((mode + (eax_1 << 2)) + 2) = 0;
00612da3              else
00612da3              {
00612da5                  *(int32_t*)((char*)eax + 0x1448) += 1;
00612db1                  *(uint32_t*)(((char*)eax + (*(int32_t*)((char*)eax + 0x1448) << 2)) + 0xb54) = eax_1;
00612db8                  var_c = eax_1;
00612dbb                  *(uint8_t*)((eax_1 + eax) + 0x1450) = 0;
00612da3              }
00612da3              
00612dcb              eax_1 += 1;
00612dcf          } while (eax_1 < ecx);
00612d98      }
00612d98      
00612e25      while (*(int32_t*)((char*)eax + 0x1448) < 2)
00612e25      {
00612dd7          enum __unnamed eax_2;
00612dd7          
00612dd7          if (var_c >= fDwNoReporting)
00612de1              eax_2 = 0;
00612dd7          else
00612dd7          {
00612dd9              var_c += 1;
00612ddc              eax_2 = var_c;
00612dd7          }
00612dd7          
00612de3          *(int32_t*)((char*)eax + 0x1448) += 1;
00612def          *(uint32_t*)(((char*)eax + (*(int32_t*)((char*)eax + 0x1448) << 2)) + 0xb54) = eax_2;
00612df8          int32_t ecx_4 = (eax_2 << 2);
00612dfb          *(uint16_t*)(ecx_4 + mode) = 1;
00612e01          *(uint8_t*)(((char*)eax + eax_2) + 0x1450) = 0;
00612e09          *(int32_t*)((char*)eax + 0x16a0) -= 1;
00612e09          
00612e11          if (ebx != 0)
00612e18              *(int32_t*)((char*)eax + 0x16a4) -= ((uint32_t)*(uint16_t*)((ecx_4 + ebx) + 2));
00612e25      }
00612e25      
00612e2a      arg1->sub = var_c;
00612e33      int32_t eax_6;
00612e33      int32_t edx_1;
00612e33      edx_1 = HIGHD(((int64_t)*(int32_t*)((char*)eax + 0x1448)));
00612e33      eax_6 = LOWD(((int64_t)*(int32_t*)((char*)eax + 0x1448)));
00612e48      int32_t esi;
00612e48      struct ct_data_s* edi;
00612e48      
00612e48      for (int32_t i = ((eax_6 - edx_1) >> 1); i >= 1; i -= 1)
00612e3f          pqdownheap(i, edi, esi);
00612e3f      
00612e4d      enum __unnamed var_10 = ecx;
00612e4d      
00612f0c      do
00612f0c      {
00612e50          int32_t eax_10 = *(int32_t*)((char*)eax + 0x1448);
00612e56          int32_t ecx_5 = *(uint32_t*)(((char*)eax + (eax_10 << 2)) + 0xb54);
00612e5d          int32_t ebx_2 = *(int32_t*)((char*)eax + 0xb58);
00612e64          *(int32_t*)((char*)eax + 0x1448) = (eax_10 - 1);
00612e6e          *(int32_t*)((char*)eax + 0xb58) = ecx_5;
00612e74          pqdownheap(1, edi, esi);
00612e79          *(int32_t*)((char*)eax + 0x144c) -= 1;
00612e85          int32_t eax_13 = *(int32_t*)((char*)eax + 0xb58);
00612e8b          *(uint32_t*)(((char*)eax + (*(int32_t*)((char*)eax + 0x144c) << 2)) + 0xb54) = ebx_2;
00612e92          *(int32_t*)((char*)eax + 0x144c) -= 1;
00612e9e          *(uint32_t*)(((char*)eax + (*(int32_t*)((char*)eax + 0x144c) << 2)) + 0xb54) = eax_13;
00612ea5          int16_t* ecx_8 = (mode + (eax_13 << 2));
00612ea8          int16_t* var_14_1 = ecx_8;
00612eab          ecx_8 = *(uint16_t*)ecx_8;
00612eae          int16_t* edx_2 = (mode + (ebx_2 << 2));
00612eb1          ecx_8 += *(uint16_t*)edx_2;
00612eb4          int16_t* var_18_1 = edx_2;
00612eb7          edx_2 = ecx_8;
00612ebd          *(uint16_t*)(mode + (var_10 << 2)) = edx_2;
00612ec1          ebx_2 = *(uint8_t*)(((char*)eax + ebx_2) + 0x1450);
00612ec8          eax_13 = *(uint8_t*)(((char*)eax + eax_13) + 0x1450);
00612ed1          char eax_14;
00612ed1          
00612ed1          if (ebx_2 < eax_13)
00612ed8              eax_14 = eax_13;
00612ed1          else
00612ed3              eax_14 = ebx_2;
00612ed3          
00612edd          *(uint8_t*)(((char*)eax + var_10) + 0x1450) = (eax_14 + 1);
00612ee7          var_14_1[1] = var_10;
00612eee          var_18_1[1] = var_10;
00612ef2          *(int32_t*)((char*)eax + 0xb58) = var_10;
00612efd          var_10 += 1;
00612f00          pqdownheap(1);
00612f0c      } while (*(int32_t*)((char*)eax + 0x1448) >= 2);
00612f0c      
00612f12      *(int32_t*)((char*)eax + 0x144c) -= 1;
00612f24      *(uint32_t*)(((char*)eax + (*(int32_t*)((char*)eax + 0x144c) << 2)) + 0xb54) = *(int32_t*)((char*)eax + 0xb58);
00612f30      gen_bitlen(arg1, eax);
00612f3f      gen_codes(var_c, &eax[0xef]);
00612d63  }


00612f4b  int32_t build_bl_tree(struct internal_state* arg1)

00612f4b  {
00612f58      struct ct_data_s* esi;
00612f58      scan_tree(*(int32_t*)((char*)esi + 0xb14), esi, __return_addr);
00612f6a      scan_tree(*(int32_t*)((char*)esi + 0xb20), esi);
00612f78      build_tree(&esi[0x2ca]);
00612f7f      void* result = 0x12;
00612f7f      
00612f90      while (*(uint16_t*)(&esi[((uint32_t)*(uint8_t*)((char*)result + 0x7f4b84))] + 0xa76) == 0)
00612f90      {
00612f92          result -= 1;
00612f92          
00612f96          if (result < 3)
00612f96              break;
00612f90      }
00612f90      
00612f9c      *(int32_t*)((char*)esi + 0x16a0) += ((result * 3) + 0x11);
00612fa2      return result;
00612f4b  }


00612fa3  void __stdcall d3dx__tr_stored_block(struct internal_state* arg1, char* arg2, uint32_t arg3, int32_t arg4)

00612fa3  {
00612fab      int32_t ecx = *(int32_t*)((char*)arg1 + 0x16b4);
00612fab      
00612fb4      if (ecx <= 0xd)
00612fb4      {
00613010          *(int32_t*)((char*)arg1 + 0x16b0) |= ((int16_t)(arg4 << ecx));
0061301a          *(int32_t*)((char*)arg1 + 0x16b4) = (ecx + 3);
00612fb4      }
00612fb4      else
00612fb4      {
00612fbf          char* sub = arg1->sub;
00612fc2          *(int32_t*)((char*)arg1 + 0x16b0) |= ((int16_t)(arg4 << ecx));
00612fcc          int32_t ebx;
00612fcc          ebx = *(int32_t*)((char*)arg1 + 0x16b0);
00612fd2          *(uint8_t*)(sub + arg1->blocks) = ebx;
00612fd5          arg1->blocks = (&arg1->blocks->dummy + 1);
00612fdb          ebx = *(int32_t*)((char*)arg1 + 0x16b1);
00612fe4          *(uint8_t*)(arg1->blocks + arg1->sub) = ebx;
00612fe7          int32_t edx_4 = *(int32_t*)((char*)arg1 + 0x16b4);
00612fed          arg1->blocks = (&arg1->blocks->dummy + 1);
00612ff0          struct inflate_blocks_state* ecx_1;
00612ff0          ecx_1 = 0x10;
00612ff2          ecx_1 = (0x10 - edx_4);
00612ff4          int32_t esi_1;
00612ff4          esi_1 = (arg4 >> ecx_1);
00612ffa          *(int32_t*)((char*)arg1 + 0x16b4) = (edx_4 - 0xd);
00613000          *(int32_t*)((char*)arg1 + 0x16b0) = esi_1;
00612fb4      }
00612fb4      
00613028      int32_t ebp;
00613028      copy_block(arg3, arg2, 1, ebp);
00612fa3  }


00613031  void __stdcall d3dx__tr_flush_block(struct internal_state* arg1, char* arg2, uint32_t arg3, int32_t arg4)

00613031  {
0061303a      int32_t eax = 0;
00613043      uint32_t ecx_4;
00613043      uint32_t edx_3;
00613043      
00613043      if (*(int32_t*)((char*)arg1 + 0x7c) <= 0)
00613043      {
00613091          ecx_4 = (arg3 + 5);
00613094          edx_3 = ecx_4;
00613043      }
00613043      else
00613043      {
00613049          if (*(int32_t*)((char*)arg1 + 0x1c) == 2)
0061304d              set_data_type(arg1);
0061304d          
0061305b          struct tree_desc_s* edi;
0061305b          build_tree(&arg1[0x76], edi);
00613069          build_tree(((char*)arg1 + 0xb1c));
0061306e          eax = build_bl_tree();
00613085          edx_3 = ((*(int32_t*)((char*)arg1 + 0x16a0) + 0xa) >> 3);
00613088          ecx_4 = ((*(int32_t*)((char*)arg1 + 0x16a4) + 0xa) >> 3);
00613088          
0061308d          if (ecx_4 <= edx_3)
00613094              edx_3 = ecx_4;
00613043      }
00613043      
006130a2      if (((arg3 + 4) > edx_3 || arg2 == 0))
006130a2      {
006130b8          int32_t ecx_5 = *(int32_t*)((char*)arg1 + 0x16b4);
006130be          void* __offset(internal_state, 0x8c) var_18_1;
006130be          struct ct_data_s* var_14_1;
006130be          struct ct_data_s* ebx;
006130be          int32_t ebx_1;
006130be          
006130be          if (ecx_4 != edx_3)
006130be          {
00613143              if (ecx_5 <= 0xd)
00613143              {
00613195                  *(int32_t*)((char*)arg1 + 0x16b0) |= ((int16_t)((arg4 + 4) << ecx_5));
0061319f                  *(int32_t*)((char*)arg1 + 0x16b4) = (ecx_5 + 3);
00613143              }
00613143              else
00613143              {
00613149                  char* sub_1 = arg1->sub;
0061314c                  *(int32_t*)((char*)arg1 + 0x16b0) |= ((int16_t)((arg4 + 4) << ecx_5));
00613156                  ebx_1 = *(int32_t*)((char*)arg1 + 0x16b0);
0061315c                  *(uint8_t*)(sub_1 + arg1->blocks) = ebx_1;
0061315f                  arg1->blocks = (&arg1->blocks->dummy + 1);
00613165                  ebx_1 = *(int32_t*)((char*)arg1 + 0x16b1);
0061316e                  *(uint8_t*)(arg1->blocks + arg1->sub) = ebx_1;
00613171                  int32_t ebx_2 = *(int32_t*)((char*)arg1 + 0x16b4);
00613177                  arg1->blocks = (&arg1->blocks->dummy + 1);
0061317a                  struct inflate_blocks_state* ecx_8;
0061317a                  ecx_8 = 0x10;
0061317c                  ecx_8 = (0x10 - ebx_2);
0061317e                  int32_t edx_11;
0061317e                  edx_11 = ((arg4 + 4) >> ecx_8);
00613184                  *(int32_t*)((char*)arg1 + 0x16b4) = (ebx_2 - 0xd);
0061318a                  *(int32_t*)((char*)arg1 + 0x16b0) = edx_11;
00613143              }
00613143              
006131b9              send_all_trees((*(int32_t*)((char*)arg1 + 0xb14) + 1), (*(int32_t*)((char*)arg1 + 0xb20) + 1), (eax + 1), ebx);
006131c4              var_14_1 = ((char*)arg1 + 0x980);
006131cb              var_18_1 = ((char*)arg1 + 0x8c);
006130be          }
006130be          else
006130be          {
006130c9              if (ecx_5 <= 0xd)
006130c9              {
0061311b                  *(int32_t*)((char*)arg1 + 0x16b0) |= ((int16_t)((arg4 + 2) << ecx_5));
00613125                  *(int32_t*)((char*)arg1 + 0x16b4) = (ecx_5 + 3);
006130c9              }
006130c9              else
006130c9              {
006130cf                  char* sub = arg1->sub;
006130d2                  *(int32_t*)((char*)arg1 + 0x16b0) |= ((int16_t)((arg4 + 2) << ecx_5));
006130dc                  ebx_1 = *(int32_t*)((char*)arg1 + 0x16b0);
006130e2                  *(uint8_t*)(sub + arg1->blocks) = ebx_1;
006130e5                  arg1->blocks = (&arg1->blocks->dummy + 1);
006130ee                  ebx_1 = *(int32_t*)((char*)arg1 + 0x16b1);
006130f4                  *(uint8_t*)(arg1->blocks + arg1->sub) = ebx_1;
006130f7                  int32_t edx_8 = *(int32_t*)((char*)arg1 + 0x16b4);
006130fd                  arg1->blocks = (&arg1->blocks->dummy + 1);
00613100                  struct inflate_blocks_state* ecx_6;
00613100                  ecx_6 = 0x10;
00613102                  ecx_6 = (0x10 - edx_8);
00613104                  int32_t eax_6;
00613104                  eax_6 = ((arg4 + 2) >> ecx_6);
0061310a                  *(int32_t*)((char*)arg1 + 0x16b4) = (edx_8 - 0xd);
00613110                  *(int32_t*)((char*)arg1 + 0x16b0) = eax_6;
006130c9              }
006130c9              
0061312b              var_14_1 = &static_dtree;
00613130              var_18_1 = &static_ltree;
006130be          }
006131ce          compress_block(var_18_1, var_14_1, ebx);
006130a2      }
006130a2      else
006130ac          d3dx__tr_stored_block(arg1, arg2, arg3, arg4);
006130ac      
006131d5      init_block(arg1);
006131d5      
006131df      if (arg4 != 0)
006131e1          bi_windup(arg1);
00613031  }


006131ec  void __stdcall sse_SinCos4(float const* const arg1, float* const arg2, float* const arg3)

006131ec  {
006131f4      uint32_t xmm0[0x4] = *(uint128_t*)arg1;
006131fe      uint32_t xmm0_1[0x4] = __andps_xmmxud_memxud(xmm0, data_8311f0);
00613205      uint32_t xmm1_1[0x4] = __andps_xmmxud_memxud(xmm0, data_8311e0);
00613212      float xmm0_2[0x4] = __mulps_xmmps_memps(xmm0_1, data_8311d0);
00613219      int128_t xmm4 = data_8311c0;
00613220      int128_t xmm5 = data_8311b0;
0061322f      int128_t xmm6 = data_8311a0;
00613236      int128_t xmm7 = data_831190;
0061323d      float xmm0_3[0x4] = __addps_xmmps_memps(xmm0_2, data_831180);
00613247      float xmm0_4[0x4] = __subps_xmmps_memps(xmm0_3, data_831180);
0061324e      float xmm4_1[0x4] = _mm_mul_ps(xmm4, xmm0_4);
00613251      float xmm5_1[0x4] = _mm_mul_ps(xmm5, xmm0_4);
00613254      float xmm6_1[0x4] = _mm_mul_ps(xmm6, xmm0_4);
00613257      float xmm7_1[0x4] = _mm_mul_ps(xmm7, xmm0_4);
0061325d      float xmm2_2[0x4] = _mm_sub_ps(_mm_sub_ps(xmm0_1, xmm4_1), xmm5_1);
00613260      int128_t xmm5_2 = data_831170;
00613267      float xmm2_3[0x4] = _mm_sub_ps(xmm2_2, xmm6_1);
0061326a      int128_t xmm6_2 = data_831160;
00613271      float xmm2_4[0x4] = _mm_sub_ps(xmm2_3, xmm7_1);
00613277      float xmm4_3[0x4] = _mm_mul_ps(xmm2_4, xmm2_4);
0061327a      uint32_t xmm3_1[0x4] = __andps_xmmxud_memxud(xmm0_3, data_831150);
00613287      uint32_t xmm0_6[0x4] = __andps_xmmxud_memxud(xmm3_1, data_831140);
006132a7      xmm3_1[0] = (((xmm3_1[0] - xmm0_6[0]) & data_831130) << 0x1e);
006132b9      xmm3_1[1] = (((xmm3_1[1] - xmm0_6[1]) & data_831130) << 0x1e);
006132cb      xmm3_1[2] = (((xmm3_1[2] - xmm0_6[2]) & data_831130) << 0x1e);
006132dd      int32_t var_44;
006132dd      xmm3_1[3] = (((xmm3_1[3] - var_44) & data_831130) << 0x1e);
006132ee      xmm3_1[0] = (((xmm3_1[0] + xmm0_6[0]) & data_831130) << 0x1e);
00613300      xmm3_1[1] = (((xmm3_1[1] + xmm0_6[1]) & data_831130) << 0x1e);
00613312      xmm3_1[2] = (((xmm3_1[2] + xmm0_6[2]) & data_831130) << 0x1e);
00613324      xmm3_1[3] = (((xmm3_1[3] + var_44) & data_831130) << 0x1e);
0061332c      xmm0_6[0] <<= 0x1e;
00613334      xmm0_6[1] <<= 0x1e;
0061333d      xmm0_6[2] <<= 0x1e;
00613346      int32_t var_44_1 = (var_44 << 0x1e);
0061335a      float xmm0_8[0x4] = _mm_cmpeq_ps(xmm0_6, {0}, 4);
0061335e      float xmm5_3[0x4] = _mm_mul_ps(xmm5_2, xmm4_3);
00613361      float xmm6_3[0x4] = _mm_mul_ps(xmm6_2, xmm4_3);
00613364      float xmm5_4[0x4] = __addps_xmmps_memps(xmm5_3, data_831120);
0061336b      float xmm6_4[0x4] = __addps_xmmps_memps(xmm6_3, data_831110);
00613372      float xmm5_5[0x4] = _mm_mul_ps(xmm5_4, xmm4_3);
00613375      float xmm6_5[0x4] = _mm_mul_ps(xmm6_4, xmm4_3);
00613378      float xmm5_6[0x4] = __addps_xmmps_memps(xmm5_5, data_831100);
0061337f      float xmm6_6[0x4] = __addps_xmmps_memps(xmm6_5, data_8310f0);
00613386      float xmm5_7[0x4] = _mm_mul_ps(xmm5_6, xmm4_3);
00613389      float xmm6_7[0x4] = _mm_mul_ps(xmm6_6, xmm4_3);
0061338c      float xmm5_8[0x4] = __addps_xmmps_memps(xmm5_7, data_8310e0);
00613393      float xmm6_8[0x4] = __addps_xmmps_memps(xmm6_7, data_8310d0);
0061339a      uint32_t xmm5_9[0x4] = _mm_mul_ps(xmm5_8, xmm2_4);
006133a0      float xmm6_10[0x4] = __addps_xmmps_memps(_mm_mul_ps(xmm6_8, xmm4_3), data_8310c0);
006133b3      uint32_t xmm1_4[0x4] = _mm_or_ps(_mm_andnot_ps(xmm0_8, xmm5_9), _mm_and_ps(xmm0_8, xmm6_10));
006133c2      int128_t xmm0_11 = (_mm_or_ps(_mm_and_ps(xmm0_8, xmm5_9), _mm_andnot_ps(xmm0_8, xmm6_10)) ^ xmm3_1);
006133ce      *(uint128_t*)arg2 = (xmm1_4 ^ (xmm3_1 ^ xmm1_1));
006133d1      *(uint128_t*)arg3 = xmm0_11;
006131ec  }


006133d8  void __stdcall sse2_SinCos4(float const* const arg1, float* const arg2, float* const arg3)

006133d8  {
006133e0      int128_t xmm0 = *(uint128_t*)arg1;
006133ea      float xmm0_1[0x4] = (xmm0 & data_831330);
006133f2      int128_t xmm1_1 = (xmm0 & data_831320);
00613400      float xmm0_2[0x4] = __mulps_xmmps_memps(xmm0_1, data_831310);
00613407      int128_t xmm4 = data_831300;
0061340e      int128_t xmm5 = data_8312f0;
00613415      int128_t xmm6 = data_8312e0;
0061341c      int128_t xmm7 = data_8312d0;
00613423      float xmm0_3[0x4] = __addps_xmmps_memps(xmm0_2, data_8312c0);
0061342d      float xmm0_4[0x4] = __subps_xmmps_memps(xmm0_3, data_8312c0);
00613434      float xmm4_1[0x4] = _mm_mul_ps(xmm4, xmm0_4);
00613437      float xmm5_1[0x4] = _mm_mul_ps(xmm5, xmm0_4);
0061343a      float xmm6_1[0x4] = _mm_mul_ps(xmm6, xmm0_4);
0061343d      float xmm7_1[0x4] = _mm_mul_ps(xmm7, xmm0_4);
00613443      float xmm2_2[0x4] = _mm_sub_ps(_mm_sub_ps(xmm0_1, xmm4_1), xmm5_1);
00613446      int128_t xmm5_2 = data_8312b0;
0061344d      float xmm2_3[0x4] = _mm_sub_ps(xmm2_2, xmm6_1);
00613450      int128_t xmm6_2 = data_8312a0;
00613457      float xmm2_4[0x4] = _mm_sub_ps(xmm2_3, xmm7_1);
0061345d      float xmm4_3[0x4] = _mm_mul_ps(xmm2_4, xmm2_4);
00613460      uint32_t xmm3_1[0x4] = __andps_xmmxud_memxud(xmm0_3, data_831290);
0061346d      int32_t xmm0_6[0x4] = __andps_xmmxud_memxud(xmm3_1, data_831280);
00613474      int32_t xmm3_2[0x4] = _mm_sub_epi32(xmm3_1, xmm0_6);
00613484      uint32_t xmm7_4[0x4] = (_mm_add_epi32(xmm3_1, xmm0_6) & data_831270);
0061348c      uint32_t xmm3_4[0x4] = _mm_slli_epi32((xmm3_2 & data_831270), 0x1e);
00613491      uint32_t xmm7_5[0x4] = _mm_slli_epi32(xmm7_4, 0x1e);
006134a3      float xmm0_8[0x4] = _mm_cmpeq_ps(_mm_slli_epi32(xmm0_6, 0x1e), {0}, 4);
006134a7      float xmm5_3[0x4] = _mm_mul_ps(xmm5_2, xmm4_3);
006134aa      float xmm6_3[0x4] = _mm_mul_ps(xmm6_2, xmm4_3);
006134ad      float xmm5_4[0x4] = __addps_xmmps_memps(xmm5_3, data_831260);
006134b4      float xmm6_4[0x4] = __addps_xmmps_memps(xmm6_3, data_831250);
006134bb      float xmm5_5[0x4] = _mm_mul_ps(xmm5_4, xmm4_3);
006134be      float xmm6_5[0x4] = _mm_mul_ps(xmm6_4, xmm4_3);
006134c1      float xmm5_6[0x4] = __addps_xmmps_memps(xmm5_5, data_831240);
006134c8      float xmm6_6[0x4] = __addps_xmmps_memps(xmm6_5, data_831230);
006134cf      float xmm5_7[0x4] = _mm_mul_ps(xmm5_6, xmm4_3);
006134d2      float xmm6_7[0x4] = _mm_mul_ps(xmm6_6, xmm4_3);
006134d5      float xmm5_8[0x4] = __addps_xmmps_memps(xmm5_7, data_831220);
006134dc      float xmm6_8[0x4] = __addps_xmmps_memps(xmm6_7, data_831210);
006134e3      uint32_t xmm5_9[0x4] = _mm_mul_ps(xmm5_8, xmm2_4);
006134e9      float xmm6_10[0x4] = __addps_xmmps_memps(_mm_mul_ps(xmm6_8, xmm4_3), data_831200);
006134fc      uint32_t xmm1_4[0x4] = _mm_or_ps(_mm_andnot_ps(xmm0_8, xmm5_9), _mm_and_ps(xmm0_8, xmm6_10));
0061350b      int128_t xmm0_11 = (_mm_or_ps(_mm_and_ps(xmm0_8, xmm5_9), _mm_andnot_ps(xmm0_8, xmm6_10)) ^ xmm7_5);
00613517      *(uint128_t*)arg2 = (xmm1_4 ^ (xmm3_4 ^ xmm1_1));
0061351a      *(uint128_t*)arg3 = xmm0_11;
006133d8  }

00613521     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc   ...............................
00613540  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613560  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613580  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006135a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006135c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006135e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613600  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613620  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613640  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613660  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613680  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006136a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006136c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006136e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613700  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613720  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613740  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613760  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613780  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006137a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006137c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006137e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613800  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613820  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613840  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613860  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613880  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006138a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006138c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006138e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613900  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613920  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613940  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613960  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613980  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006139a0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006139c0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
006139e0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613a00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613a20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613a40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613a60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613a80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613aa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613ac0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613ae0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613b00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613b20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613b40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613b60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613b80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613ba0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613bc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613be0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613c00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613c20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613c40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613c60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613c80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613ca0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613cc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613ce0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613d00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613d20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613d40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613d60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613d80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613da0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613dc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613de0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613e00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613e20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613e40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613e60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613e80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613ea0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613ec0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613ee0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613f00  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613f20  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613f40  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613f60  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613f80  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613fa0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613fc0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................
00613fe0  cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................................

00614000  void _a_atan()

00614000  {
00614000      sgn;
00614018      int64_t st0 = (st0 & ((uint64_t)mabs));
0061401b      uint64_t st6 = _m_pcmpgtd(((uint64_t)one), st0);
0061401e      int64_t st2;
0061401e      int64_t temp0_1 = __pfrcp_mmxq_mmxq(st2, st0);
00614025      int64_t temp0_2 = __pfrcpit1_mmxq_mmxq(st0, temp0_1);
00614029      int64_t qq2_1 = ((uint64_t)qq2);
00614030      int64_t temp0_3 = __pfrcpit2_mmxq_mmxq(temp0_2, temp0_1);
00614034      uint64_t st4 = ((uint64_t)pp2);
0061403b      int64_t temp0_4 = __pfmin_mmxq_mmxq(temp0_3, st0);
00614042      int64_t temp0_5 = __pfmul_mmxq_mmxq(temp0_4, temp0_4);
00614046      uint64_t st5 = ((uint64_t)pp1);
0061404d      int64_t temp0_6 = __pfadd_mmxq_mmxq(qq2_1, temp0_5);
00614051      int64_t temp0_7 = __pfmul_mmxq_mmxq(st4, temp0_5);
00614055      st2 = ((uint64_t)qq1);
0061405c      int64_t temp0_8 = __pfmul_mmxq_mmxq(temp0_6, temp0_5);
00614060      int64_t temp0_9 = __pfadd_mmxq_mmxq(temp0_7, st5);
00614064      st5 = ((uint64_t)pp0);
0061406b      int64_t temp0_10 = __pfadd_mmxq_mmxq(temp0_8, st2);
0061406f      int64_t temp0_11 = __pfmul_mmxq_mmxq(temp0_9, temp0_5);
00614073      st2 = ((uint64_t)qq0);
0061407a      int64_t temp0_12 = __pfmul_mmxq_mmxq(temp0_10, temp0_5);
0061407e      int64_t temp0_13 = __pfadd_mmxq_mmxq(temp0_11, st5);
00614082      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_12, st2);
0061408a      int64_t temp0_16 = __pfmul_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_5, temp0_13), temp0_4);
0061408e      int64_t temp0_17 = __pfrcp_mmxq_mmxq(st5, temp0_14);
00614092      st4 = ((uint64_t)pio2);
006140a5      int64_t temp0_21 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_16, __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_14, temp0_17), temp0_17)), temp0_4);
006140b0      __pfmax_mmxq_mmxq(temp0_21, (st6 & !(__pfsub_mmxq_mmxq(st4, temp0_21))));
00614000  }

006140b8                                                                          8d a4 24 00 00 00 00 90                          ..$.....

006140c0  void _a_atan2()

006140c0  {
006140ce      uint64_t st5 = ((uint64_t)mabs);
006140df      int64_t st0;
006140df      uint64_t st1;
006140df      uint64_t st7 = (_m_psrldi((((uint64_t)sgn) & st0), 1) | (((uint64_t)sgn) & st1));
006140e2      st1 &= st5;
006140e5      st0 &= st5;
006140ee      uint64_t st6 = _m_pcmpgtd(st1, st0);
006140f1      int64_t temp0_2 = __pfmax_mmxq_mmxq(st0, st1);
006140f5      st6 = _m_pslldi(st6, 0x1f);
006140f9      int64_t temp0_4 = __pfmin_mmxq_mmxq(st1, st0);
006140fd      int64_t temp0_5 = __pfrcp_mmxq_mmxq(st0, temp0_2);
00614101      st5 = ((uint64_t)pp1);
00614108      int64_t temp0_6 = __pfrcpit1_mmxq_mmxq(temp0_2, temp0_5);
0061410c      uint64_t pp2_1 = ((uint64_t)pp2);
00614113      int64_t temp0_7 = __pfrcpit2_mmxq_mmxq(temp0_6, temp0_5);
00614117      int64_t st3 = ((uint64_t)qq2);
0061411e      int64_t temp0_8 = __pfmul_mmxq_mmxq(temp0_7, temp0_4);
00614125      int64_t temp0_9 = __pfmul_mmxq_mmxq(temp0_8, temp0_8);
00614129      int64_t temp0_10 = __pfadd_mmxq_mmxq(st3, temp0_9);
0061412d      int64_t temp0_11 = __pfmul_mmxq_mmxq(pp2_1, temp0_9);
00614131      int64_t st2 = ((uint64_t)qq1);
00614138      int64_t temp0_12 = __pfmul_mmxq_mmxq(temp0_10, temp0_9);
0061413c      int64_t temp0_13 = __pfadd_mmxq_mmxq(temp0_11, st5);
00614140      st5 = ((uint64_t)pp0);
00614147      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_12, st2);
0061414b      int64_t temp0_15 = __pfmul_mmxq_mmxq(temp0_13, temp0_9);
0061414f      st2 = ((uint64_t)qq0);
00614156      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_14, temp0_9);
0061415a      int64_t temp0_17 = __pfadd_mmxq_mmxq(temp0_15, st5);
0061415e      int64_t temp0_18 = __pfadd_mmxq_mmxq(temp0_16, st2);
00614169      int64_t temp0_20 = __pfmul_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_9, temp0_17), temp0_8);
0061416d      int64_t temp0_21 = __pfrcp_mmxq_mmxq(st5, temp0_18);
00614171      st7 = _m_pslldi(st7, 1);
0061417d      st5 = st7;
00614180      st7 ^= st6;
00614183      int64_t temp0_25 = __pfmul_mmxq_mmxq(temp0_20, __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_18, temp0_21), temp0_21));
00614187      st3 = ((uint64_t)npio2);
00614191      st6 = _m_psradi(st6, 0x1f);
00614195      int64_t temp0_27 = __pfadd_mmxq_mmxq(temp0_25, temp0_8);
0061419c      sgn;
006141ad      __pfadd_mmxq_mmxq((temp0_27 | st7), __pfsub_mmxq_mmxq((st6 & !((st5 ^ st3))), st3));
006140c0  }

006141b5                                                                 8d a4 24 00 00 00 00 8d 64 24 00                       ..$.....d$.

006141c0  void __fastcall _a_acos()

006141c0  {
006141c7      uint64_t st7 = ((uint64_t)mabs);
006141ce      uint64_t bnd_2 = ((uint64_t)half);
006141d5      uint64_t st0;
006141d5      uint64_t st6 = (((uint64_t)sgn) & st0);
006141df      st0 &= st7;
006141e5      _m_pcmpgtd(st0, ((uint64_t)one));
006141e8      uint64_t st5 = st0;
006141eb      int64_t temp0_1 = __pfmul_mmxq_mmxq(st0, bnd_2);
006141ef      int64_t bnd_1 = ((uint64_t)bnd);
006141f6      int64_t temp0_2 = __pfsubr_mmxq_mmxq(temp0_1, bnd_2);
006141fa      int64_t temp0_3 = __pfrsqrt_mmxq_mmxq(st7, temp0_2);
00614201      int64_t temp0_4 = __pfmul_mmxq_mmxq(temp0_3, temp0_3);
00614205      bnd_1 = _m_pcmpgtd(bnd_1, st5);
00614208      int64_t temp0_6 = __pfrsqit1_mmxq_mmxq(temp0_4, temp0_2);
0061420c      bnd_2 = ((uint64_t)asq1);
00614221      st0 = (bnd_1 & !(__pfmul_mmxq_mmxq(__pfrcpit2_mmxq_mmxq(temp0_6, temp0_3), temp0_2)));
00614224      st7 = ((uint64_t)(*(uint32_t*)asp1));
0061422b      st0 |= (st5 & bnd_1);
00614231      int64_t temp0_9 = __pfmul_mmxq_mmxq(st0, st0);
00614235      st5 = ((uint64_t)asp0);
0061423c      int64_t temp0_10 = __pfmul_mmxq_mmxq(st7, temp0_9);
00614240      int64_t temp0_11 = __pfadd_mmxq_mmxq(bnd_2, temp0_9);
00614244      int64_t temp0_12 = __pfadd_mmxq_mmxq(temp0_10, st5);
00614248      st5 = ((uint64_t)asq0);
0061424f      int64_t temp0_13 = __pfmul_mmxq_mmxq(temp0_12, temp0_9);
00614257      int64_t temp0_15 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_9, temp0_11), st5);
0061425b      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_13, st0);
0061425f      int64_t temp0_17 = __pfrcp_mmxq_mmxq(temp0_11, temp0_15);
00614263      int64_t temp0_18 = __pfrcpit1_mmxq_mmxq(temp0_15, temp0_17);
00614267      st5 = ((uint64_t)npio2);
00614272      int64_t temp0_20 = __pfmul_mmxq_mmxq(__pfrcpit2_mmxq_mmxq(temp0_18, temp0_17), temp0_16);
00614276      bnd_2 = bnd_1;
00614279      bnd_1 &= !(st5);
0061427c      st5 = ((uint64_t)pio2);
00614289      int64_t temp0_21 = __pfadd_mmxq_mmxq(st0, temp0_20);
0061428d      oob;
00614294      int64_t temp0_22 = __pfadd_mmxq_mmxq((bnd_1 ^ st6), st5);
00614298      st7 = _m_pslldi(bnd_2, 0x1f);
006142ac      __pfadd_mmxq_mmxq(temp0_22, (__pfadd_mmxq_mmxq(temp0_21, (bnd_2 & !(temp0_21))) | (st7 ^ st6)));
006141c0  }

006142b7                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......

006142c0  void _a_asin()

006142c0  {
006142c7      uint64_t st7 = ((uint64_t)mabs);
006142ce      uint64_t st4 = ((uint64_t)half);
006142c0      sgn;
006142df      int64_t st0 = (st0 & st7);
006142e5      _m_pcmpgtd(st0, ((uint64_t)one));
006142e8      uint64_t st5 = st0;
006142eb      int64_t temp0_1 = __pfmul_mmxq_mmxq(st0, st4);
006142ef      uint64_t bnd_1 = ((uint64_t)bnd);
006142f6      int64_t temp0_2 = __pfsubr_mmxq_mmxq(temp0_1, st4);
006142fa      int64_t temp0_3 = __pfrsqrt_mmxq_mmxq(st7, temp0_2);
00614301      int64_t temp0_4 = __pfmul_mmxq_mmxq(temp0_3, temp0_3);
00614305      bnd_1 = _m_pcmpgtd(bnd_1, st5);
00614308      int64_t temp0_6 = __pfrsqit1_mmxq_mmxq(temp0_4, temp0_2);
0061430c      st4 = ((uint64_t)asq1);
00614321      st0 = (bnd_1 & !(__pfmul_mmxq_mmxq(__pfrcpit2_mmxq_mmxq(temp0_6, temp0_3), temp0_2)));
00614324      st7 = ((uint64_t)(*(uint32_t*)asp1));
0061432b      st0 |= (st5 & bnd_1);
00614331      int64_t temp0_9 = __pfmul_mmxq_mmxq(st0, st0);
00614335      st5 = ((uint64_t)asp0);
0061433c      int64_t temp0_10 = __pfmul_mmxq_mmxq(st7, temp0_9);
00614340      int64_t temp0_11 = __pfadd_mmxq_mmxq(st4, temp0_9);
00614344      int64_t temp0_12 = __pfadd_mmxq_mmxq(temp0_10, st5);
00614348      st5 = ((uint64_t)asq0);
0061434f      int64_t temp0_13 = __pfmul_mmxq_mmxq(temp0_12, temp0_9);
00614357      int64_t temp0_15 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_9, temp0_11), st5);
0061435b      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_13, st0);
0061435f      int64_t temp0_17 = __pfrcp_mmxq_mmxq(temp0_11, temp0_15);
00614367      int64_t temp0_19 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(temp0_15, temp0_17), temp0_17);
0061436b      st4 = ((uint64_t)pio2);
00614372      int64_t temp0_20 = __pfmul_mmxq_mmxq(temp0_16, temp0_19);
00614376      oob;
0061437d      int64_t temp0_21 = __pfadd_mmxq_mmxq(st0, temp0_20);
00614388      __pfsubr_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_21, temp0_21), st4);
006142c0  }

006143a2        8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8b ff    ..$......$......$......$......

006143c0  void _a_log()

006143c0  {
006143c7      int64_t st0;
006143c7      int64_t st4 = st0;
006143de      st0 = ((st0 & ((uint64_t)mant)) | ((uint64_t)one));
006143e1      int64_t st3 = ((uint64_t)rt2);
006143e8      st4 = _m_psrldi((st4 & ((uint64_t)expo)), 0x17);
006143ec      int64_t st2 = st0;
006143f2      uint64_t st6 = ((uint64_t)edec);
006143f9      st0 = _m_pcmpgtd(st0, st3);
006143fc      _m_pcmpeqd(0, st4);
006143ff      int64_t temp0_3 = _m_psubd(st4, st0);
00614402      st3 = ((uint64_t)bias);
00614409      st0 &= st6;
0061440c      st6 = ((uint64_t)one);
00614413      int64_t temp0_4 = _m_psubd(st2, st0);
00614416      int64_t temp0_5 = _m_psubd(temp0_3, st3);
0061441c      int64_t temp0_6 = __pfadd_mmxq_mmxq(temp0_4, st6);
00614420      int64_t temp0_7 = __pfsub_mmxq_mmxq(temp0_4, st6);
00614424      int64_t temp0_8 = __pi2fd_mmxq_mmxq(temp0_5, temp0_5);
00614428      uint64_t ln2lo_1 = ((uint64_t)ln2lo);
0061442f      int64_t temp0_9 = __pfrcp_mmxq_mmxq(st6, temp0_6);
00614433      st3 = ((uint64_t)ln2hi);
0061443a      int64_t temp0_10 = __pfrcpit1_mmxq_mmxq(temp0_6, temp0_9);
0061443e      int64_t temp0_11 = __pfmul_mmxq_mmxq(ln2lo_1, temp0_8);
00614442      int64_t temp0_12 = __pfmul_mmxq_mmxq(st3, temp0_8);
00614446      st4 = ((uint64_t)c2);
0061444d      int64_t temp0_13 = __pfrcpit2_mmxq_mmxq(temp0_10, temp0_9);
00614451      uint64_t c1_1 = ((uint64_t)c1);
00614458      int64_t temp0_14 = __pfmul_mmxq_mmxq(temp0_13, temp0_7);
0061445f      int64_t temp0_15 = __pfadd_mmxq_mmxq(temp0_14, temp0_14);
00614463      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_14, temp0_14);
0061446a      int64_t temp0_17 = __pfmul_mmxq_mmxq(temp0_16, st4);
0061446e      st4 = ((uint64_t)c0);
00614479      int64_t temp0_19 = __pfmul_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_17, c1_1), temp0_16);
0061447d      maxn;
00614484      int64_t temp0_20 = __pfmul_mmxq_mmxq(temp0_16, temp0_15);
0061449e      __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_19, st4), temp0_20), temp0_15), temp0_11), temp0_12);
006143c0  }

006144a9                             8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8b ff           ..$......$......$......

006144c0  void _a_log10()

006144c0  {
006144c0      _a_log();
006144cc      int64_t st0;
006144cc      __pfmul_mmxq_mmxq(st0, ((uint64_t)rle10));
006144c0  }

006144d1                                                     8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 90                   ..$......$.....

006144e0  void _a_exp()

006144e0  {
006144ea      uint64_t st1 = ((uint64_t)upper);
006144f4      uint64_t st3 = ((uint64_t)sgn);
006144fb      int64_t st0;
006144fb      int64_t temp0 = __pfmul_mmxq_mmxq(((uint64_t)ooln2), st0);
006144ff      __pfcmpge_mmxq_mmxq(st0, st1);
0061450d      int64_t lower_1 = ((uint64_t)lower);
00614514      st3 = ((st3 & st0) | ((uint64_t)half));
00614517      uint64_t st7 = ((uint64_t)ln2hi);
0061451e      int64_t temp0_2 = __pfadd_mmxq_mmxq(temp0, st3);
00614522      st1 = ((uint64_t)ln2lo);
00614529      int64_t temp0_3 = __pf2id_mmxq_mmxq(temp0_2, temp0_2);
0061452d      __pfcmpge_mmxq_mmxq(st0, lower_1);
00614531      int64_t temp0_5 = __pi2fd_mmxq_mmxq(st3, temp0_3);
00614535      int64_t temp0_6 = __pfmul_mmxq_mmxq(st7, temp0_5);
00614539      int64_t temp0_7 = __pfmul_mmxq_mmxq(st1, temp0_5);
0061453d      st3 = ((uint64_t)d0);
00614544      int64_t temp0_8 = __pfsub_mmxq_mmxq(st0, temp0_6);
00614548      st7 = ((uint64_t)n1);
0061454f      int64_t temp0_9 = __pfsub_mmxq_mmxq(temp0_8, temp0_7);
00614556      int64_t temp0_10 = __pfmul_mmxq_mmxq(temp0_9, temp0_9);
0061455d      int64_t temp0_11 = __pfadd_mmxq_mmxq(temp0_10, st3);
00614573      int64_t temp0_14 = __pfmul_mmxq_mmxq(__pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_10, st7), ((uint64_t)n0)), temp0_9);
00614577      int64_t temp0_15 = __pfsub_mmxq_mmxq(temp0_11, temp0_14);
0061457b      int64_t temp0_16 = __pfrcp_mmxq_mmxq(temp0_9, temp0_15);
0061457f      int64_t temp0_17 = __pfrcpit1_mmxq_mmxq(temp0_15, temp0_16);
00614583      int64_t temp0_18 = __pfadd_mmxq_mmxq(temp0_14, temp0_14);
00614587      st3 = ((uint64_t)one);
0061458e      int64_t temp0_19 = __pfrcpit2_mmxq_mmxq(temp0_17, temp0_16);
00614592      uint64_t st4 = _m_pslldi(temp0_3, 0x17);
00614596      int64_t temp0_21 = __pfmul_mmxq_mmxq(temp0_18, temp0_19);
0061459a      max;
006145a8      _m_paddd(__pfadd_mmxq_mmxq(temp0_21, st3), st4);
006144e0  }

006145b5                                                                 8d a4 24 00 00 00 00 8d 64 24 00                       ..$.....d$.

006145c0  void _a_sqrt()

006145c0  {
006145c0      int64_t st0;
006145c0      int64_t st1;
006145c0      int64_t temp0_4 = __pfrsqrt_mmxq_mmxq(st1, st0);
006145d3      __pfmul_mmxq_mmxq(st0, __pfrcpit2_mmxq_mmxq(__pfrsqit1_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_4, temp0_4), st0), temp0_4));
006145c0  }

006145d8                                                                          8d a4 24 00 00 00 00 90                          ..$.....

006145e0  void _a_fabs()

006145e0  {
006145e0      sign_mask;
006145e0  }

006145e8                          8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d 49 00          ..$......$......$.....I.

00614600  void _a_ceil()

00614600  {
00614603      int64_t sh_masks_1 = sh_masks;
0061460a      int64_t st0;
0061460a      int64_t st2;
0061460a      int64_t temp0 = __pf2id_mmxq_mmxq(st2, st0);
0061460e      int64_t ones_1 = ones;
00614615      int64_t temp0_1 = __pi2fd_mmxq_mmxq(temp0, temp0);
00614619      sh_masks_1 &= st0;
0061462d      __pfadd_mmxq_mmxq(((__pfcmpgt_mmxq_mmxq(__pfsub_mmxq_mmxq(st0, temp0_1), 0) & ones_1) | sh_masks_1), (temp0_1 | sh_masks_1));
00614600  }

00614632                                                        8d a4 24 00 00 00 00 8d a4 24 00 00 00 00                    ..$......$....

00614640  void _a_floor()

00614640  {
00614640      int64_t st0;
00614640      int64_t st2;
00614640      int64_t temp0_4 = __pf2id_mmxq_mmxq(st2, st0);
00614647      int64_t temp0 = __pi2fd_mmxq_mmxq(temp0_4, temp0_4);
00614652      int64_t temp0_2 = __pfcmpgt_mmxq_mmxq(0, __pfsubr_mmxq_mmxq(temp0, st0));
00614660      __pfsubr_mmxq_mmxq((ones & temp0_2), temp0);
00614640  }

00614665                 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d 9b 00 00 00 00       ..$......$......$..........

00614680  void _a_frexp()

00614680  {
00614687      int64_t st0;
00614687      int64_t st1 = st0;
0061469e      int64_t HalfVal_1 = HalfVal;
006146a5      st0 = ((st0 & smh_masks) | PMOne);
006146a8      int64_t two_126s_1 = two_126s;
006146af      st1 = _m_psrldi((st1 & pinfs), 0x17);
006146ba      _m_punpckldq(__pfmul_mmxq_mmxq(st0, HalfVal_1), _m_psubd(st1, two_126s_1));
00614680  }

006146be                                                                                            8b ff                                ..

006146c0  void _a_ldexp()

006146c0  {
006146c0      uint32_t st0[0x2];
006146c0      int64_t st2 = st0;
006146ce      int64_t st1;
006146ce      st0 = _m_paddd(_m_psrldi((st0 & sign_mask), 0x17), st1);
006146d1      uint32_t eax = st0[0];
006146d1      
006146e2      if ((eax & 0xffffff00) == 0)
006146e2      {
006146e8          _m_paddd(_m_pslldi(st0, 0x17), (st2 & smh_masks));
006146eb          return;
006146e2      }
006146e2      
00614709      if ((eax & 0x80000000) == 0)
00614709      {
0061470e          sh_masks;
00614715          pinfs;
00614709      }
006146c0  }

006146ec                                      8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d 9b 00 00 00 00              ..$......$..........
0061471e                                                                                            8b ff                                ..

00614720  void _a_modf()

00614720  {
00614720      int64_t st0;
00614720      int64_t st1;
00614720      int64_t temp0_3 = __pf2id_mmxq_mmxq(st1, st0);
00614724      int64_t temp0 = __pi2fd_mmxq_mmxq(temp0_3, temp0_3);
0061472c      _m_punpckldq(__pfsub_mmxq_mmxq(st0, temp0), temp0);
00614720  }

00614730                                                  8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8b ff                  ..$......$......

00614740  void _a_fmod()

00614740  {
00614746      int64_t st1;
00614746      
00614746      if (st1 == 0)
00614746      {
00614780          sign_mask;
00614787          return;
00614746      }
00614746      
0061474e      int64_t st0;
0061474e      int64_t temp0 = __pfrcp_mmxq_mmxq(st0, st1);
00614756      int64_t temp0_2 = __pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(st1, temp0), temp0);
0061475a      int64_t temp0_3 = __pfmul_mmxq_mmxq(st0, temp0_2);
0061475e      int64_t temp0_4 = __pf2id_mmxq_mmxq(temp0_2, temp0_3);
0061476d      __pfmul_mmxq_mmxq(st1, __pfsub_mmxq_mmxq(temp0_3, __pi2fd_mmxq_mmxq(temp0_4, temp0_4)));
00614740  }

00614772                                                        8d a4 24 00 00 00 00 8d a4 24 00 00 00 00                    ..$......$....
00614788                          8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 8d 49 00          ..$......$......$.....I.

006147a0  void _a_sincos()

006147a0  {
006147a0      int64_t st0;
006147a0      int32_t eax_1 = st0;
006147ae      st0 &= ((uint64_t)mabs);
006147c3      int64_t st1 = st0;
006147c6      int64_t temp0 = __pfmul_mmxq_mmxq(st0, ((uint64_t)fouropi));
006147ca      uint64_t st3 = pio4ht;
006147d1      int64_t temp0_1 = __pf2id_mmxq_mmxq(temp0, temp0);
006147d5      int64_t mo56_42_1 = mo56_42;
006147dc      int32_t ecx = temp0_1;
006147df      int64_t temp0_2 = __pi2fd_mmxq_mmxq(temp0_1, temp0_1);
006147e5      int64_t st6 = mo30_20;
006147ec      st0 = _m_punpckldq(temp0_2, temp0_2);
006147ef      int64_t ones_1 = ones;
006147f6      int64_t temp0_4 = __pfmul_mmxq_mmxq(st0, st3);
006147fa      st3 = pio4s;
0061480d      int64_t temp0_7 = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(st1, temp0_4), _m_punpckhdq(temp0_4, temp0_4));
00614817      st1 = _m_punpckldq(temp0_7, temp0_7);
00614817      
0061481a      if ((ecx & 1) != 0)
0061481c          st1 = __pfsubr_mmxq_mmxq(st1, st3);
0061481c      
00614826      uint64_t st2 = _m_punpckldq(ones_1, st1);
00614829      int64_t temp0_11 = __pfmul_mmxq_mmxq(st1, st1);
0061482f      int64_t mo12_6_1 = mo12_6;
00614838      int64_t temp0_12 = __pfmul_mmxq_mmxq(mo56_42_1, temp0_11);
0061483e      int64_t temp0_13 = __pfmul_mmxq_mmxq(st6, temp0_11);
00614845      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_12, ones_1);
0061484b      int64_t temp0_15 = __pfmul_mmxq_mmxq(mo12_6_1, temp0_11);
0061484f      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_14, temp0_13);
00614853      st6 = mo2s;
0061485a      int64_t temp0_17 = __pfadd_mmxq_mmxq(temp0_16, ones_1);
0061485e      int64_t temp0_18 = __pfmul_mmxq_mmxq(st6, temp0_11);
00614866      st0 = ((uint64_t)(((eax_1 >> 0x1f) ^ (ecx >> 2)) << 0x1f));
00614869      int64_t temp0_20 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_15, temp0_17), ones_1);
0061486d      st6 = _m_punpckldq(temp0_18, ones_1);
00614870      uint64_t temp0_22 = _m_psrlqi(ones_1, 0x20);
00614874      int64_t temp0_23 = __pfmul_mmxq_mmxq(temp0_20, st6);
00614878      _m_punpckldq(st0, st0);
00614888      mo12_6_1 = __pfmul_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_23, temp0_22), st2);
00614888      
0061488c      if (((ecx ^ (ecx >> 1)) & 1) != 0)
00614891          _m_punpckhdq(mo12_6_1, _m_punpckldq(temp0_22, mo12_6_1));
006147a0  }

0061489c                                                                                      8d 64 24 00                              .d$.

006148a0  void _a_sin()

006148a0  {
006148a0      int64_t st0;
006148a0      int32_t eax_1 = st0;
006148ae      st0 &= ((uint64_t)mabs);
006148c3      int64_t st1 = st0;
006148c6      int64_t temp0 = __pfmul_mmxq_mmxq(st0, ((uint64_t)fouropi));
006148ca      uint64_t st3 = pio4ht;
006148d1      int64_t temp0_1 = __pf2id_mmxq_mmxq(temp0, temp0);
006148d5      int64_t mo56_42_1 = mo56_42;
006148dc      int32_t ecx = temp0_1;
006148df      int64_t temp0_2 = __pi2fd_mmxq_mmxq(temp0_1, temp0_1);
006148e5      int64_t st6 = mo30_20;
006148ec      st0 = _m_punpckldq(temp0_2, temp0_2);
006148ef      int64_t ones_1 = ones;
006148f6      int64_t temp0_4 = __pfmul_mmxq_mmxq(st0, st3);
006148fa      st3 = pio4s;
0061490d      int64_t temp0_7 = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(st1, temp0_4), _m_punpckhdq(temp0_4, temp0_4));
00614917      st1 = _m_punpckldq(temp0_7, temp0_7);
00614917      
0061491a      if ((ecx & 1) != 0)
0061491c          st1 = __pfsubr_mmxq_mmxq(st1, st3);
0061491c      
00614926      uint64_t st2 = _m_punpckldq(ones_1, st1);
00614929      int64_t temp0_11 = __pfmul_mmxq_mmxq(st1, st1);
0061492f      int64_t mo12_6_1 = mo12_6;
00614936      uint32_t esi_3 = (ecx >> 1);
00614938      int64_t temp0_12 = __pfmul_mmxq_mmxq(mo56_42_1, temp0_11);
0061493e      int64_t temp0_13 = __pfmul_mmxq_mmxq(st6, temp0_11);
00614945      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_12, ones_1);
0061494b      int64_t temp0_15 = __pfmul_mmxq_mmxq(mo12_6_1, temp0_11);
0061494f      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_14, temp0_13);
00614953      st6 = mo2s;
0061495a      int64_t temp0_17 = __pfadd_mmxq_mmxq(temp0_16, ones_1);
0061495e      int64_t temp0_18 = __pfmul_mmxq_mmxq(st6, temp0_11);
00614966      st0 = ((uint64_t)(((eax_1 >> 0x1f) ^ (ecx >> 2)) << 0x1f));
00614969      int64_t temp0_20 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_15, temp0_17), ones_1);
0061496d      st6 = _m_punpckldq(temp0_18, ones_1);
00614970      uint64_t temp0_22 = _m_psrlqi(ones_1, 0x20);
00614974      int64_t temp0_23 = __pfmul_mmxq_mmxq(temp0_20, st6);
00614978      st0 = _m_punpckldq(st0, st0);
00614988      mo12_6_1 = __pfmul_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_23, temp0_22), st2);
00614988      
0061498c      if (((ecx ^ esi_3) & 1) != 0)
00614991          mo12_6_1 = _m_punpckhdq(mo12_6_1, _m_punpckldq(temp0_22, mo12_6_1));
00614991      
00614997      st0 ^= (mo12_6_1 ^ ((uint64_t)((eax_1 & 0x80000000) ^ (esi_3 << 0x1f))));
0061499a      _m_punpckhdq(st0, st0);
006148a0  }

0061499e                                                                                            8b ff                                ..

006149a0  void _a_tan()

006149a0  {
006149a0      int64_t st0;
006149a0      int32_t eax_1 = st0;
006149ae      st0 &= ((uint64_t)mabs);
006149c3      int64_t st1 = st0;
006149c6      int64_t temp0 = __pfmul_mmxq_mmxq(st0, ((uint64_t)fouropi));
006149ca      uint64_t st3 = pio4ht;
006149d1      int64_t temp0_1 = __pf2id_mmxq_mmxq(temp0, temp0);
006149d5      int64_t mo56_42_1 = mo56_42;
006149dc      int32_t ecx = temp0_1;
006149df      int64_t temp0_2 = __pi2fd_mmxq_mmxq(temp0_1, temp0_1);
006149e5      int64_t st6 = mo30_20;
006149ec      st0 = _m_punpckldq(temp0_2, temp0_2);
006149ef      int64_t ones_1 = ones;
006149f6      int64_t temp0_4 = __pfmul_mmxq_mmxq(st0, st3);
006149fa      st3 = pio4s;
00614a0d      int64_t temp0_7 = __pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(st1, temp0_4), _m_punpckhdq(temp0_4, temp0_4));
00614a17      st1 = _m_punpckldq(temp0_7, temp0_7);
00614a17      
00614a1a      if ((ecx & 1) != 0)
00614a1c          st1 = __pfsubr_mmxq_mmxq(st1, st3);
00614a1c      
00614a26      int64_t st2 = _m_punpckldq(ones_1, st1);
00614a29      int64_t temp0_11 = __pfmul_mmxq_mmxq(st1, st1);
00614a2f      int64_t mo12_6_1 = mo12_6;
00614a36      uint32_t esi_3 = (ecx >> 1);
00614a38      int64_t temp0_12 = __pfmul_mmxq_mmxq(mo56_42_1, temp0_11);
00614a3e      int64_t temp0_13 = __pfmul_mmxq_mmxq(st6, temp0_11);
00614a45      int64_t temp0_14 = __pfadd_mmxq_mmxq(temp0_12, ones_1);
00614a4b      int64_t temp0_15 = __pfmul_mmxq_mmxq(mo12_6_1, temp0_11);
00614a4f      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_14, temp0_13);
00614a53      st6 = mo2s;
00614a5a      int64_t temp0_17 = __pfadd_mmxq_mmxq(temp0_16, ones_1);
00614a5e      int64_t temp0_18 = __pfmul_mmxq_mmxq(st6, temp0_11);
00614a66      st0 = ((uint64_t)(((eax_1 >> 0x1f) ^ (ecx >> 2)) << 0x1f));
00614a69      int64_t temp0_20 = __pfadd_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_15, temp0_17), ones_1);
00614a6d      st6 = _m_punpckldq(temp0_18, ones_1);
00614a70      uint64_t temp0_22 = _m_psrlqi(ones_1, 0x20);
00614a74      int64_t temp0_23 = __pfmul_mmxq_mmxq(temp0_20, st6);
00614a78      st0 = _m_punpckldq(st0, st0);
00614a88      mo12_6_1 = __pfmul_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_23, temp0_22), st2);
00614a88      
00614a8c      if (((ecx ^ esi_3) & 1) != 0)
00614a91          mo12_6_1 = _m_punpckhdq(mo12_6_1, _m_punpckldq(temp0_22, mo12_6_1));
00614a91      
00614a97      st0 ^= (mo12_6_1 ^ ((uint64_t)((eax_1 & 0x80000000) ^ (esi_3 << 0x1f))));
00614a9d      int64_t temp0_29 = __pfrcp_mmxq_mmxq(st2, st0);
00614aa1      int64_t temp0_30 = _m_punpckhdq(st0, st0);
00614aac      __pfmul_mmxq_mmxq(__pfrcpit2_mmxq_mmxq(__pfrcpit1_mmxq_mmxq(st0, temp0_29), temp0_29), temp0_30);
006149a0  }

00614ab1                                                     8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 90                   ..$......$.....

00614ac0  void _a_pow()

00614ac0  {
00614ac7      int64_t maxe_1;
00614ac7      _m_pslldi(__pf2id_mmxq_mmxq(maxe_1, maxe_1), 0x1f);
00614ad5      int64_t st0;
00614ad5      int64_t st4 = st0;
00614aec      st0 = ((st0 & ((uint64_t)mant)) | ((uint64_t)one));
00614aef      uint64_t st3 = ((uint64_t)rt2);
00614af6      st4 = _m_psrldi((st4 & ((uint64_t)expo)), 0x17);
00614afa      uint64_t st2 = st0;
00614b00      st0 = _m_pcmpgtd(st0, st3);
00614b03      uint64_t st5 = _m_pcmpeqd(0, st4);
00614b06      st3 = ((uint64_t)edec);
00614b0d      int64_t temp0_5 = _m_psubd(st4, st0);
00614b10      st0 &= st3;
00614b13      st3 = ((uint64_t)bias);
00614b1a      int64_t temp0_6 = _m_psubd(st2, st0);
00614b1d      int64_t temp0_7 = _m_psubd(temp0_5, st3);
00614b20      st3 = ((uint64_t)one);
00614b2a      int64_t temp0_8 = __pfadd_mmxq_mmxq(temp0_6, st3);
00614b2e      int64_t temp0_9 = __pfsub_mmxq_mmxq(temp0_6, st3);
00614b32      uint64_t st7 = ((uint64_t)c2);
00614b39      int64_t temp0_10 = __pfrcp_mmxq_mmxq(st3, temp0_8);
00614b3d      int64_t temp0_11 = __pfrcpit1_mmxq_mmxq(temp0_8, temp0_10);
00614b41      int64_t temp0_12 = __pi2fd_mmxq_mmxq(temp0_7, temp0_7);
00614b49      int64_t temp0_14 = __pfmul_mmxq_mmxq(temp0_9, __pfrcpit2_mmxq_mmxq(temp0_11, temp0_10));
00614b50      int64_t temp0_15 = __pfmul_mmxq_mmxq(temp0_14, temp0_14);
00614b57      int64_t temp0_16 = __pfmul_mmxq_mmxq(temp0_15, st7);
00614b62      int64_t temp0_17 = __pfmul_mmxq_mmxq(temp0_14, ((uint64_t)tl2e));
00614b6d      int64_t temp0_18 = __pfadd_mmxq_mmxq(temp0_16, ((uint64_t)c1));
00614b71      st7 = ((uint64_t)c0);
00614b78      int64_t temp0_19 = __pfmul_mmxq_mmxq(temp0_18, temp0_15);
00614ba4      st0 = (__pfmul_mmxq_mmxq((st5 & !(__pfadd_mmxq_mmxq(__pfadd_mmxq_mmxq(temp0_17, __pfmul_mmxq_mmxq(__pfmul_mmxq_mmxq(temp0_15, temp0_17), __pfadd_mmxq_mmxq(temp0_19, st7))), temp0_12))), maxe_1) | (st5 & ((uint64_t)maxn)));
00614ba7      int64_t temp0_26 = __pf2id_mmxq_mmxq(temp0_12, st0);
00614bae      int64_t temp0_27 = __pi2fd_mmxq_mmxq(maxe_1, temp0_26);
00614bb2      st3 = ((uint64_t)q1);
00614bb9      int64_t temp0_28 = __pfsub_mmxq_mmxq(st0, temp0_27);
00614bc0      int64_t temp0_29 = __pfmul_mmxq_mmxq(temp0_28, temp0_28);
00614bc4      st7 = ((uint64_t)p1);
00614bce      int64_t temp0_30 = __pfadd_mmxq_mmxq(temp0_29, st3);
00614bd5      int64_t temp0_31 = __pfmul_mmxq_mmxq(temp0_29, st7);
00614bd9      st7 = ((uint64_t)p0);
00614be0      int64_t temp0_32 = __pfmul_mmxq_mmxq(temp0_30, temp0_29);
00614be4      st3 = ((uint64_t)q0);
00614beb      int64_t temp0_33 = __pfadd_mmxq_mmxq(temp0_31, st7);
00614bef      st7 = ((uint64_t)two);
00614bf6      int64_t temp0_34 = __pfadd_mmxq_mmxq(temp0_32, st3);
00614bfa      int64_t temp0_35 = __pfmul_mmxq_mmxq(temp0_33, temp0_28);
00614bfe      int64_t temp0_36 = __pfsub_mmxq_mmxq(temp0_34, temp0_35);
00614c02      int64_t temp0_37 = __pfmul_mmxq_mmxq(temp0_35, st7);
00614c06      int64_t temp0_38 = __pfrcp_mmxq_mmxq(temp0_28, temp0_36);
00614c0a      st7 = ((uint64_t)one);
00614c11      int64_t temp0_39 = __pfrcpit1_mmxq_mmxq(temp0_36, temp0_38);
00614c15      st4 = _m_pslldi(temp0_26, 0x17);
00614c19      int64_t temp0_41 = __pfrcpit2_mmxq_mmxq(temp0_39, temp0_38);
00614c1d      st3 = ((uint64_t)mine);
00614c24      int64_t temp0_42 = __pfmul_mmxq_mmxq(temp0_37, temp0_41);
00614c28      maxe_1 = ((uint64_t)maxe);
00614c2f      int64_t temp0_43 = __pfadd_mmxq_mmxq(temp0_42, st7);
00614c36      __pfcmpge_mmxq_mmxq(st0, st3);
00614c3a      __pfcmpge_mmxq_mmxq(st0, maxe_1);
00614c3e      max;
00614c45      _m_paddd(st4, temp0_43);
00614ac0  }

00614c58                                                                          cc cc cc cc cc cc cc cc                          ........

00614c60  int32_t __stdcall _ijlInit@4(void* arg1)

00614c60  {
00614c63      int32_t var_8 = 0xffffffff;
00614c65      int32_t var_c = 0x90600c;
00614c6a      int32_t (* var_10)() = j__except_handler3;
00614c75      TEB* fsbase;
00614c75      int32_t var_14 = *(uint32_t*)fsbase;
00614c76      *(uint32_t*)fsbase = &var_14;
00614c80      int32_t result_1;
00614c80      int32_t* var_1c = &result_1;
00614c8e      result_1 = 0;
00614c91      int32_t var_40 = 0;
00614c94      int32_t var_8_1 = 0;
00614ca4      int32_t* var_48 = &result_1;
00614caa      void* eax_3 = operator new(0x114);
00614caa      
00614cb7      if (eax_3 != 0)
00614cb7      {
00614cc7          __builtin_memset(((char*)eax_3 + 4), 0, 0x14);
00614cd9          *(uint32_t*)((char*)arg1 + 0x3848) = eax_3;
00614cdf          int32_t* var_48_1 = &result_1;
00614ce1          _ownInitializeLibrary(eax_3);
00614cee          __builtin_memset(arg1, 0, 0x14);
00614d01          *(uint32_t*)((char*)arg1 + 0x14) = 3;
00614d04          *(uint32_t*)((char*)arg1 + 0x18) = 2;
00614d0b          __builtin_memset(((char*)arg1 + 0x1c), 0, 0x18);
00614d1d          *(uint32_t*)((char*)arg1 + 0x34) = 3;
00614d20          *(uint32_t*)((char*)arg1 + 0x38) = 3;
00614d28          *(uint32_t*)((char*)arg1 + 0x3c) = 1;
00614d2b          *(uint32_t*)((char*)arg1 + 0x40) = 0;
00614d2e          *(uint32_t*)((char*)arg1 + 0x44) = 0;
00614d31          *(uint32_t*)((char*)arg1 + 0x48) = 1;
00614d34          *(uint32_t*)((char*)arg1 + 0x4c) = 1;
00614d37          *(uint32_t*)((char*)arg1 + 0x50) = 0x4b;
00614d41          *(uint32_t*)((char*)arg1 + 0xcc) = 0;
00614d44          *(uint32_t*)((char*)arg1 + 0x70) = 0;
00614d47          *(uint32_t*)((char*)arg1 + 0x74) = 0;
00614d4a          *(uint32_t*)((char*)arg1 + 0x58) = 0xffffffff;
00614d50          *(uint32_t*)((char*)arg1 + 0x5c) = 0;
00614d53          *(uint32_t*)((char*)arg1 + 0x60) = 0;
00614d56          *(uint32_t*)((char*)arg1 + 0x64) = 0;
00614d59          *(uint32_t*)((char*)arg1 + 0x68) = 0;
00614d5c          *(uint32_t*)((char*)arg1 + 0x6c) = 1;
00614d62          *(uint32_t*)((char*)arg1 + 0x78) = *(uint32_t*)((char*)arg1 + 4);
00614d68          *(uint32_t*)((char*)arg1 + 0x7c) = *(uint32_t*)((char*)arg1 + 8);
00614d6e          *(uint32_t*)((char*)arg1 + 0x80) = *(uint32_t*)((char*)arg1 + 0xc);
00614d74          *(uint32_t*)((char*)arg1 + 0x84) = *(uint32_t*)((char*)arg1 + 0x10);
00614d7a          *(uint32_t*)((char*)arg1 + 0x88) = *(uint32_t*)((char*)arg1 + 0x14);
00614d80          *(uint32_t*)((char*)arg1 + 0x8c) = *(uint32_t*)((char*)arg1 + 0x18);
00614d86          *(uint32_t*)((char*)arg1 + 0x90) = *(uint32_t*)((char*)arg1 + 0x1c);
00614d89          *(uint32_t*)((char*)arg1 + 0x94) = 0;
00614d8f          *(uint32_t*)((char*)arg1 + 0x9c) = *(uint32_t*)((char*)arg1 + 0x24);
00614d95          *(uint32_t*)((char*)arg1 + 0x98) = *(uint32_t*)((char*)arg1 + 0x20);
00614d9b          *(uint32_t*)((char*)arg1 + 0xa0) = *(uint32_t*)((char*)arg1 + 0x28);
00614da1          *(uint32_t*)((char*)arg1 + 0xa4) = *(uint32_t*)((char*)arg1 + 0x2c);
00614da7          *(uint32_t*)((char*)arg1 + 0xa8) = *(uint32_t*)((char*)arg1 + 0x30);
00614dad          *(uint32_t*)((char*)arg1 + 0xac) = *(uint32_t*)((char*)arg1 + 0x34);
00614db3          *(uint32_t*)((char*)arg1 + 0xb0) = *(uint32_t*)((char*)arg1 + 0x38);
00614db9          *(uint32_t*)((char*)arg1 + 0xb4) = *(uint32_t*)((char*)arg1 + 0x3c);
00614dbf          *(uint32_t*)((char*)arg1 + 0xb8) = *(uint32_t*)((char*)arg1 + 0x40);
00614dc5          *(uint32_t*)((char*)arg1 + 0xbc) = *(uint32_t*)((char*)arg1 + 0x44);
00614dcb          *(uint32_t*)((char*)arg1 + 0xc0) = *(uint32_t*)((char*)arg1 + 0x48);
00614dd1          *(uint32_t*)((char*)arg1 + 0xc4) = *(uint32_t*)((char*)arg1 + 0x4c);
00614dd7          *(uint32_t*)((char*)arg1 + 0xc8) = *(uint32_t*)((char*)arg1 + 0x50);
00614dda          *(uint32_t*)((char*)arg1 + 0xd0) = 0;
00614ddd          *(uint32_t*)((char*)arg1 + 0xd4) = 0;
00614dec          __builtin_memset(((char*)arg1 + 0x373c), 0, 0x38);
00614e3f          __g_memzero(((char*)arg1 + 0xec), 0xb4);
00614e56          __g_memzero(((char*)arg1 + 0x1a0), 0xb4);
00614e6d          __g_memzero(((char*)arg1 + 0x254), 0xb4);
00614e84          __g_memzero(((char*)arg1 + 0x308), 0xb4);
00614e96          void* var_38_1 = ((char*)arg1 + 0xf8);
00614e9f          void* var_34_1 = ((char*)arg1 + 0x1ac);
00614ea8          void* var_30_1 = ((char*)arg1 + 0x260);
00614eb1          void* var_2c_1 = ((char*)arg1 + 0x314);
00614ebd          *(uint32_t*)((char*)arg1 + 0xf4) = (((char*)arg1 + 0xff) & 0xfffffff8);
00614ecc          *(uint32_t*)((char*)arg1 + 0x1a8) = (((char*)arg1 + 0x1b3) & 0xfffffff8);
00614edb          *(uint32_t*)((char*)arg1 + 0x25c) = (((char*)arg1 + 0x267) & 0xfffffff8);
00614eea          *(uint32_t*)((char*)arg1 + 0x310) = (((char*)arg1 + 0x31b) & 0xfffffff8);
00614efb          __g_memzero(((char*)arg1 + 0x1d7c), 0x670);
00614f12          __g_memzero(((char*)arg1 + 0x23ec), 0x670);
00614f29          __g_memzero(((char*)arg1 + 0x2a5c), 0x670);
00614f40          __g_memzero(((char*)arg1 + 0x30cc), 0x670);
00614f57          __g_memzero(((char*)arg1 + 0x3bc), 0x670);
00614f6e          __g_memzero(((char*)arg1 + 0xa2c), 0x670);
00614f85          __g_memzero(((char*)arg1 + 0x109c), 0x670);
00614f9c          __g_memzero(((char*)arg1 + 0x170c), 0x670);
00614fa8          *(uint32_t*)((char*)arg1 + 0x3834) = 1;
00614fb4          __builtin_memset(((char*)arg1 + 0x37fc), 0, 0x1c);
00614fde          *(uint32_t*)((char*)arg1 + 0x3818) = 4;
00614fe8          *(uint32_t*)((char*)arg1 + 0x381c) = 0;
00614fee          *(uint32_t*)((char*)arg1 + 0x3820) = 0;
00614ff4          int32_t* var_48_2 = &result_1;
00614ff7          void* eax_28 = operator new(0x40);
00615002          *(uint32_t*)((char*)arg1 + 0x3824) = eax_28;
00615002          
0061500a          if (eax_28 != 0)
0061500a          {
00615023              __g_memzero(eax_28, (*(uint32_t*)((char*)arg1 + 0x3818) << 4));
00615031              *(uint32_t*)((char*)arg1 + 0x3828) = 0;
00615037              *(uint32_t*)((char*)arg1 + 0x382c) = 0;
0061503d              *(uint32_t*)((char*)arg1 + 0x3830) = 0;
00615043              *(uint32_t*)((char*)arg1 + 0x4880) = 0;
00615049              *(uint32_t*)((char*)arg1 + 0x4884) = 0;
0061504f              *(uint32_t*)((char*)arg1 + 0x3838) = 0;
00615055              *(uint32_t*)((char*)arg1 + 0x4888) = 0;
0061505b              *(uint32_t*)((char*)arg1 + 0x3774) = 0;
00615061              *(uint8_t*)((char*)arg1 + 0x3778) = 0;
00615067              *(uint32_t*)((char*)arg1 + 0x377c) = 0;
0061506d              *(uint8_t*)((char*)arg1 + 0x3780) = 0;
00615073              *(uint32_t*)((char*)arg1 + 0x3784) = 0;
00615079              *(uint8_t*)((char*)arg1 + 0x3788) = 0;
0061507f              *(uint32_t*)((char*)arg1 + 0x378c) = 0;
00615085              *(uint8_t*)((char*)arg1 + 0x3790) = 0;
0061508b              *(uint32_t*)((char*)arg1 + 0x3794) = 0;
00615091              *(uint32_t*)((char*)arg1 + 0x3798) = 0;
00615097              *(uint8_t*)((char*)arg1 + 0x379c) = 0;
0061509d              *(uint8_t*)((char*)arg1 + 0x379d) = 0;
006150a3              *(uint32_t*)((char*)arg1 + 0x37a0) = 0;
006150a9              *(uint32_t*)((char*)arg1 + 0x37a4) = 0;
006150af              *(uint8_t*)((char*)arg1 + 0x37a8) = 0;
006150b5              *(uint8_t*)((char*)arg1 + 0x37a9) = 0;
006150bb              *(uint32_t*)((char*)arg1 + 0x37ac) = 0;
006150c1              *(uint32_t*)((char*)arg1 + 0x37b0) = 0;
006150c7              *(uint8_t*)((char*)arg1 + 0x37b4) = 0;
006150cd              *(uint8_t*)((char*)arg1 + 0x37b5) = 0;
006150d3              *(uint32_t*)((char*)arg1 + 0x37b8) = 0;
006150d9              *(uint32_t*)((char*)arg1 + 0x37bc) = 0;
006150df              *(uint8_t*)((char*)arg1 + 0x37c0) = 0;
006150e5              *(uint8_t*)((char*)arg1 + 0x37c1) = 0;
006150eb              *(uint32_t*)((char*)arg1 + 0x37c4) = 0;
006150f1              *(uint32_t*)((char*)arg1 + 0x37c8) = 0;
006150f7              *(uint8_t*)((char*)arg1 + 0x37cc) = 0;
006150fd              *(uint8_t*)((char*)arg1 + 0x37cd) = 0;
00615103              *(uint32_t*)((char*)arg1 + 0x37d0) = 0;
00615109              *(uint32_t*)((char*)arg1 + 0x37d4) = 0;
0061510f              *(uint8_t*)((char*)arg1 + 0x37d8) = 0;
00615115              *(uint8_t*)((char*)arg1 + 0x37d9) = 0;
0061511b              *(uint32_t*)((char*)arg1 + 0x37dc) = 0;
00615121              *(uint32_t*)((char*)arg1 + 0x37e0) = 0;
00615127              *(uint8_t*)((char*)arg1 + 0x37e4) = 0;
0061512d              *(uint8_t*)((char*)arg1 + 0x37e5) = 0;
00615133              *(uint32_t*)((char*)arg1 + 0x37e8) = 0;
00615139              *(uint32_t*)((char*)arg1 + 0x37ec) = 0;
0061513f              *(uint8_t*)((char*)arg1 + 0x37f0) = 0;
00615145              *(uint8_t*)((char*)arg1 + 0x37f1) = 0;
00615163              __builtin_memset(((char*)arg1 + 0xd8), 0, 0x14);
00615169              *(uint8_t*)((char*)arg1 + 0x37f4) = 0;
0061516f              *(uint8_t*)((char*)arg1 + 0x37f8) = 0;
0061517a              *(uint8_t*)((char*)arg1 + 0x37f5) = 1;
00615180              *(uint8_t*)((char*)arg1 + 0x37f9) = 1;
00615186              *(uint8_t*)((char*)arg1 + 0x37f6) = 1;
0061518c              *(uint8_t*)((char*)arg1 + 0x37fa) = 1;
00615192              *(uint8_t*)((char*)arg1 + 0x37f7) = 1;
00615198              *(uint8_t*)((char*)arg1 + 0x37fb) = 1;
006151a4              *(uint32_t*)(*(uint32_t*)((char*)arg1 + 0x3824) + 0xc) = 0;
006151ad              *(uint32_t*)(*(uint32_t*)((char*)arg1 + 0x3824) + 0x1c) = 1;
006151b6              *(uint32_t*)(*(uint32_t*)((char*)arg1 + 0x3824) + 0x2c) = 1;
006151bf              *(uint32_t*)(*(uint32_t*)((char*)arg1 + 0x3824) + 0x3c) = 1;
006151c2              *(uint32_t*)((char*)arg1 + 0x387c) = 0;
006151c8              *(uint32_t*)((char*)arg1 + 0x3850) = 0;
006151ce              *(uint32_t*)((char*)arg1 + 0x3854) = 0;
006151d4              *(uint32_t*)((char*)arg1 + 0x3858) = 0;
006151da              *(uint32_t*)((char*)arg1 + 0x385c) = 0;
006151e0              *(uint32_t*)((char*)arg1 + 0x386c) = 0;
006151e6              *(uint32_t*)((char*)arg1 + 0x3864) = 0;
006151ec              *(uint32_t*)((char*)arg1 + 0x3868) = 0;
006151f5              int32_t* var_48_4 = &result_1;
006151f7              enum _PROCESSOR_TYPE eax_30 = ownGetProcessorType(eax_3);
00615204              *(uint32_t*)((char*)arg1 + 0x3874) = eax_30;
0061520c              *(uint32_t*)((char*)arg1 + 0x384c) = 0;
00615212              *(uint32_t*)((char*)arg1 + 0x3860) = 0;
00615218              *(uint32_t*)((char*)arg1 + 0x3840) = 0;
0061521e              *(uint32_t*)((char*)arg1 + 0x3844) = 0;
00615224              *(uint8_t*)((char*)arg1 + 0x3870) = 0;
0061522a              *(uint32_t*)((char*)arg1 + 0x3878) = 0;
00615230              *(uint32_t*)((char*)arg1 + 0x488c) = 0;
00615236              *(uint32_t*)((char*)arg1 + 0x4e30) = eax_30;
0061523c              __builtin_memset(((char*)arg1 + 0x4e34), 0, 0x14);
0061525f              *(uint16_t*)((char*)arg1 + 0x4e48) = 0x64;
00615266              *(uint16_t*)((char*)arg1 + 0x4e4a) = 0;
0061526d              *(uint16_t*)((char*)arg1 + 0x4e4c) = 0;
00615274              *(uint32_t*)((char*)arg1 + 0x4e50) = 0;
0061527f              *(uint16_t*)((char*)arg1 + 0x4e54) = 0x101;
00615286              *(uint8_t*)((char*)arg1 + 0x4e56) = 0;
00615291              *(uint16_t*)((char*)arg1 + 0x4e58) = 1;
00615298              *(uint16_t*)((char*)arg1 + 0x4e5a) = 1;
0061529f              *(uint32_t*)((char*)arg1 + 0x4e5c) = 0;
006152a5              *(uint16_t*)((char*)arg1 + 0x4e60) = 0;
006152ac              int32_t var_8_2 = 0xffffffff;
0061500a          }
0061500a          else
0061500c              result_1 = 0xfffffffb;
00614cb7      }
00614cb7      else
00614cb9          result_1 = 0xfffffffb;
00614cb9      
006152b8      if (result_1 < 0)
006152b8      {
006152f7          if (*(uint32_t*)((char*)arg1 + 0x3824) != 0)
006152f7          {
00615302              int32_t* var_48_5 = &result_1;
00615304              operator delete(*(uint32_t*)((char*)arg1 + 0x3824));
00615314              *(uint32_t*)((char*)arg1 + 0x3824) = 0;
0061531a              *(uint32_t*)((char*)arg1 + 0x3818) = 0;
006152f7          }
006152f7          
0061532b          if (*(uint32_t*)((char*)arg1 + 0x4e3c) != 0)
0061532b          {
00615336              int32_t* var_48_6 = &result_1;
00615338              operator delete(*(uint32_t*)((char*)arg1 + 0x4e3c));
00615343              *(uint32_t*)((char*)arg1 + 0x4e3c) = 0;
0061532b          }
0061532b          
00615358          if (*(uint32_t*)((char*)arg1 + 0x4888) != 0)
00615358          {
00615363              int32_t* var_48_7 = &result_1;
00615365              operator delete(*(uint32_t*)((char*)arg1 + 0x4888));
00615370              *(uint32_t*)((char*)arg1 + 0x4888) = 0;
00615358          }
00615358          
00615385          if (*(uint32_t*)((char*)arg1 + 0x3838) != 0)
00615385          {
00615399              if (*(uint32_t*)(*(uint32_t*)((char*)arg1 + 0x3838) + 0x34) != 0)
00615399              {
006153a7                  int32_t* var_48_8 = &result_1;
006153a9                  operator delete(*(uint32_t*)(*(uint32_t*)((char*)arg1 + 0x3838) + 0x34));
006153ba                  *(uint32_t*)(*(uint32_t*)((char*)arg1 + 0x3838) + 0x34) = 0;
00615399              }
00615399              
006153ca              int32_t* var_48_9 = &result_1;
006153cc              operator delete(*(uint32_t*)((char*)arg1 + 0x3838));
006153d7              *(uint32_t*)((char*)arg1 + 0x3838) = 0;
00615385          }
006152b8      }
006152b8      
006152ba      int32_t result = result_1;
006152cc      *(uint32_t*)fsbase = var_14;
006152d6      return result;
00614c60  }

006152d9                                                                             8b 65 e8 c7 45 c0 ff                           .e..E..
006152e0  ff ff ff c7 45 fc ff ff ff ff eb c7                                                              ....E.......
006153e6                    b8 01 00 00 00 c3 8d 74 26 00                                                        .......t&.

006153f0  int32_t __stdcall _ijlFree@4(void* arg1)

006153f0  {
006153f3      int32_t var_8 = 0xffffffff;
006153f5      int32_t var_c = 0x906024;
006153fa      int32_t (* var_10)() = j__except_handler3;
00615405      TEB* fsbase;
00615405      int32_t var_14 = *(uint32_t*)fsbase;
00615406      *(uint32_t*)fsbase = &var_14;
00615410      int32_t result_1;
00615410      int32_t* var_1c = &result_1;
0061541c      result_1 = 0;
00615423      int32_t var_8_1 = 0;
0061542d      void* eax_1 = ((char*)arg1 + 0x58);
00615430      void* var_38 = eax_1;
00615433      void* edx_1 = *(uint32_t*)((char*)arg1 + 0x387c);
00615433      
0061543b      if (edx_1 == 0)
0061543b          goto label_615466;
0061543b      
0061543d      int32_t* var_40_1 = &result_1;
0061543d      
00615449      if (ownCloseFile(edx_1) != 0)
00615449      {
00615457          eax_1 = var_38;
0061545a          *(uint32_t*)((char*)eax_1 + 0x3824) = 0;
00615466      label_615466:
00615466          *(uint32_t*)((char*)eax_1 + 0x36e4) = 0;
0061546c          *(uint32_t*)((char*)eax_1 + 0x36e8) = 0;
00615472          *(uint32_t*)((char*)eax_1 + 0x36ec) = 0;
00615478          *(uint32_t*)((char*)eax_1 + 0x36f0) = 0;
0061547e          int32_t var_34_1 = 4;
0061547e          
00615491          if (*(uint32_t*)((char*)eax_1 + 0x37c0) <= 0xff)
00615491          {
0061549f              void* edx_2 = *(uint32_t*)((char*)eax_1 + 0x37cc);
0061549f              
006154a7              if (edx_2 != 0)
006154a7              {
006154a9                  int32_t* var_40_2 = &result_1;
006154ab                  operator delete(edx_2);
006154b3                  eax_1 = var_38;
006154b8                  *(uint32_t*)((char*)eax_1 + 0x37cc) = 0;
006154be                  *(uint32_t*)((char*)eax_1 + 0x37c0) = 0;
006154a7              }
006154a7              
006154c4              void* edx_3 = *(uint32_t*)((char*)eax_1 + 0x4de4);
006154c4              
006154cc              if (edx_3 != 0)
006154cc              {
006154ce                  int32_t* var_40_3 = &result_1;
006154d0                  operator delete(edx_3);
006154d8                  eax_1 = var_38;
006154db                  *(uint32_t*)((char*)eax_1 + 0x4de4) = 0;
006154cc              }
006154cc              
006154ee              if (*(uint32_t*)((char*)eax_1 + 0x4de8) == 1)
006154ee              {
00615627                  int32_t* ecx_3 = *(uint32_t*)((char*)eax_1 + 0x4dec);
00615627                  
0061562f                  if (ecx_3 != 0)
0061562f                  {
00615635                      int32_t edx_11 = ecx_3[1];
00615638                      void* ebx_1 = *(uint32_t*)ecx_3;
00615638                      
0061563c                      if (ebx_1 > edx_11)
0061563c                      {
0061563e                          *(uint32_t*)ecx_3 = edx_11;
00615640                          ecx_3 = *(uint32_t*)((char*)eax_1 + 0x4dec);
00615646                          ebx_1 = *(uint32_t*)ecx_3;
0061563c                      }
0061563c                      
00615648                      int32_t edx_12 = ecx_3[2];
00615648                      
0061564d                      if (ebx_1 > edx_12)
0061564d                      {
0061564f                          *(uint32_t*)ecx_3 = edx_12;
00615651                          ecx_3 = *(uint32_t*)((char*)eax_1 + 0x4dec);
00615657                          ebx_1 = *(uint32_t*)ecx_3;
0061564d                      }
0061564d                      
00615659                      int32_t edx_13 = ecx_3[3];
00615659                      
0061565e                      if (ebx_1 > edx_13)
0061565e                      {
00615660                          *(uint32_t*)ecx_3 = edx_13;
00615668                          ebx_1 = **(uint32_t**)((char*)eax_1 + 0x4dec);
0061565e                      }
0061565e                      
0061566a                      int32_t* var_40_9 = &result_1;
0061566c                      operator delete(ebx_1);
0061567d                      int32_t* var_40_10 = &result_1;
0061567f                      operator delete(*(uint32_t*)((char*)var_38 + 0x4dec));
00615687                      eax_1 = var_38;
0061568a                      *(uint32_t*)((char*)eax_1 + 0x4dec) = 0;
0061562f                  }
006154ee              }
006154ee              
006154f4              void* edx_5 = *(uint32_t*)((char*)eax_1 + 0x4830);
006154f4              
006154fc              if (edx_5 != 0)
006154fc              {
006154fe                  int32_t* var_40_4 = &result_1;
00615500                  operator delete(edx_5);
00615508                  eax_1 = var_38;
0061550b                  *(uint32_t*)((char*)eax_1 + 0x4830) = 0;
006154fc              }
006154fc              
00615515              void* edx_7 = *(uint32_t*)((char*)eax_1 + 0x37e0);
00615515              
0061551d              if (edx_7 != 0)
0061551d              {
0061551f                  void* eax_3 = *(uint32_t*)((char*)edx_7 + 0x34);
0061551f                  
00615524                  if (eax_3 != 0)
00615524                  {
00615526                      int32_t* var_40_5 = &result_1;
00615528                      operator delete(eax_3);
00615539                      *(uint32_t*)(*(uint32_t*)((char*)var_38 + 0x37e0) + 0x34) = 0;
00615540                      edx_7 = *(uint32_t*)((char*)var_38 + 0x37e0);
00615524                  }
00615524                  
00615546                  int32_t* var_40_6 = &result_1;
00615548                  operator delete(edx_7);
00615550                  eax_1 = var_38;
00615553                  *(uint32_t*)((char*)eax_1 + 0x37e0) = 0;
0061551d              }
0061551d              
00615565              __g_memzero(((char*)eax_1 + 0x371c), 0x20);
00615579              __g_memzero(((char*)var_38 + 0x373c), 0x60);
00615587              __builtin_memset(((char*)var_38 + 0x80), 0, 0x14);
006155a5              *(uint32_t*)((char*)var_38 + 0x3714) = 0;
006155ab              *(uint32_t*)((char*)var_38 + 0x3718) = 0;
006155b1              int32_t var_8_2 = 0xffffffff;
00615491          }
00615491          else
00615493              result_1 = 0xfffffff8;
00615449      }
00615449      else
0061544b          result_1 = 0xfffffff7;
0061544b      
006155c1      int32_t* var_40_7 = &result_1;
006155c3      _ownFreeLibrary(*(uint32_t*)((char*)arg1 + 0x3848));
006155ce      void* edx_10 = *(uint32_t*)((char*)arg1 + 0x3848);
006155ce      
006155d9      if (edx_10 != 0)
006155d9      {
006155de          int32_t* var_40_8 = &result_1;
006155e0          operator delete(edx_10);
006155eb          *(uint32_t*)((char*)arg1 + 0x3848) = 0;
006155d9      }
006155d9      
006155f5      int32_t result = result_1;
00615607      *(uint32_t*)fsbase = var_14;
00615611      return result;
006153f0  }

00615614                                                              8b 65 e8 c7 45 c8 ff ff ff ff c7 45                      .e..E......E
00615620  fc ff ff ff ff eb 91                                                                             .......
00615699                                                                             b8 01 00 00 00 c3 90                           .......

006156a0  enum _IJLERR CheckParameters(struct _JPEG_CORE_PROPERTIES* arg1)

006156a0  {
006156ab      char ecx = 0;
006156ad      int32_t eax;
006156ad      eax = 0;
006156af      char edx = 0;
006156b1      char var_18 = 0;
006156b5      eax = 0;
006156b9      char var_1c = 0;
006156b9      
006156c2      if (arg1->UseJPEGPROPERTIES == 0)
006156c2      {
006156c8          enum _IJLIOTYPE iotype = arg1->jprops.iotype;
006156c8          
006156ce          if (iotype == ~IJL_JFILE_READPARAMS)
006159b6              return 0xfffffff8;
006159b6          
00615725          if ((((((((((((((((iotype != IJL_JFILE_READPARAMS && iotype != IJL_JBUFF_READPARAMS) && iotype != IJL_JFILE_READWHOLEIMAGE) && iotype != IJL_JBUFF_READWHOLEIMAGE) && iotype != IJL_JFILE_READHEADER) && iotype != IJL_JBUFF_READHEADER) && iotype != IJL_JFILE_READENTROPY) && iotype != IJL_JBUFF_READENTROPY) && iotype != IJL_JFILE_READONEHALF) && iotype != IJL_JBUFF_READONEHALF) && iotype != IJL_JFILE_READONEQUARTER) && iotype != IJL_JBUFF_READONEQUARTER) && iotype != IJL_JFILE_READONEEIGHTH) && iotype != IJL_JBUFF_READONEEIGHTH) && iotype != IJL_JFILE_READTHUMBNAIL) && iotype != IJL_JBUFF_READTHUMBNAIL))
00615725          {
00615743              if ((((((iotype != IJL_JFILE_WRITEWHOLEIMAGE && iotype != IJL_JBUFF_WRITEWHOLEIMAGE) && iotype != IJL_JFILE_WRITEHEADER) && iotype != IJL_JBUFF_WRITEHEADER) && iotype != IJL_JFILE_WRITEENTROPY) && iotype != IJL_JBUFF_WRITEENTROPY))
006159b6                  return 0xfffffff8;
006159b6              
0061574b              var_18 = 1;
00615725          }
00615725          else
006156d8              ecx = 1;
006156d8          
00615783          if (((((((((((iotype == IJL_JFILE_READPARAMS || iotype == IJL_JFILE_READWHOLEIMAGE) || iotype == IJL_JFILE_READHEADER) || iotype == IJL_JFILE_READENTROPY) || iotype == IJL_JFILE_READONEHALF) || iotype == IJL_JFILE_READONEQUARTER) || iotype == IJL_JFILE_READONEEIGHTH) || iotype == IJL_JFILE_READTHUMBNAIL) || iotype == IJL_JFILE_WRITEWHOLEIMAGE) || iotype == IJL_JFILE_WRITEHEADER) || iotype == IJL_JFILE_WRITEENTROPY))
00615785              edx = 1;
00615785          
0061580e          if ((((((((((((((((iotype == IJL_JFILE_READWHOLEIMAGE || iotype == IJL_JBUFF_READWHOLEIMAGE) || iotype == IJL_JFILE_READENTROPY) || iotype == IJL_JBUFF_READENTROPY) || iotype == IJL_JFILE_WRITEWHOLEIMAGE) || iotype == IJL_JBUFF_WRITEWHOLEIMAGE) || iotype == IJL_JFILE_WRITEENTROPY) || iotype == IJL_JBUFF_WRITEENTROPY) || iotype == IJL_JFILE_READONEEIGHTH) || iotype == IJL_JBUFF_READONEEIGHTH) || iotype == IJL_JFILE_READONEQUARTER) || iotype == IJL_JBUFF_READONEQUARTER) || iotype == IJL_JBUFF_READONEHALF) || iotype == IJL_JBUFF_READONEHALF) || iotype == IJL_JFILE_READTHUMBNAIL) || iotype == IJL_JBUFF_READTHUMBNAIL))
0061580e          {
00615d09              eax = 1;
00615d0b              struct _RAW_DATA_TYPES_STATE* raw_coefs = arg1->jprops.raw_coefs;
00615d0b              
00615d17              if (raw_coefs == 0)
00615d17              {
00615d22                  if (arg1->DIBBytes == 0)
006159b6                      return 0xfffffff8;
006159b6                  
00615d28                  int32_t DIBWidth = arg1->DIBWidth;
00615d28                  
00615d39                  if ((DIBWidth > 0xffff || DIBWidth <= 0))
006159b6                      return 0xfffffff8;
006159b6                  
00615d3f                  int32_t DIBHeight = arg1->DIBHeight;
00615d3f                  
00615d54                  if ((DIBHeight > 0xffff || DIBHeight < 0xffff0001))
006159b6                      return 0xfffffff8;
006159b6                  
00615d62                  if ((iotype == IJL_JFILE_READTHUMBNAIL || iotype == IJL_JBUFF_READTHUMBNAIL))
00615d62                  {
00615dbc                      enum _IJL_COLOR DIBColor_3 = arg1->DIBColor;
00615dbc                      
00615dc7                      if ((DIBColor_3 != IJL_RGB && DIBColor_3 != IJL_BGR))
00615dd5                          return 0xffffffe5;
00615d62                  }
00615d62                  
00615d6a                  if (raw_coefs == 0)
00615d6a                  {
00615d75                      if (arg1->DIBPadBytes < 0)
006159b6                          return 0xfffffff8;
006159b6                      
00615d7b                      int32_t DIBChannels = arg1->DIBChannels;
00615d7b                      
00615d8c                      if ((DIBChannels <= 0 || DIBChannels > 0xff))
006159b6                          return 0xfffffff8;
006159b6                      
00615d92                      enum _IJL_JPGSUBSAMPLING DIBSubsampling = arg1->DIBSubsampling;
00615d92                      
00615db5                      if ((DIBSubsampling != IJL_NONE && (DIBSubsampling != IJL_422 || arg1->DIBColor != IJL_YCBCR)))
00615dae                          return 0xfffffffd;
00615d6a                  }
00615d17              }
0061580e          }
0061580e          
00615816          if (edx == 0)
00615816          {
00615835              if ((arg1->JPGBytes == 0 || arg1->JPGSizeBytes == 0))
006159b6                  return 0xfffffff8;
00615816          }
00615816          else if (arg1->JPGFile == 0)
006159b6              return 0xfffffff8;
006159b6          
0061583b          int32_t JPGChannels = arg1->JPGChannels;
0061583b          
0061584c          if ((JPGChannels <= 0 || JPGChannels > 0x100))
006159b6              return 0xfffffff8;
006159b6          
00615852          char const* edx_1;
00615852          edx_1 = var_18;
00615852          
00615858          if (edx_1 != 0)
00615858          {
00615860              if (eax != 0)
00615860              {
00615862                  int32_t JPGWidth = arg1->JPGWidth;
00615862                  
00615872                  if ((JPGWidth <= 0 || JPGWidth > 0xffff))
006159b6                      return 0xfffffff8;
006159b6                  
00615878                  int32_t JPGHeight = arg1->JPGHeight;
00615878                  
00615888                  if ((JPGHeight <= 0 || JPGHeight > 0xffff))
006159b6                      return 0xfffffff8;
006159b6                  
006158a1                  if ((arg1->DIBColor != 4 && (arg1->JPGColor != 3 && JPGChannels > arg1->DIBChannels)))
006158af                      return 0xfffffff8;
00615860              }
00615860              
00615a1a              if ((JPGChannels == 1 && arg1->JPGSubsampling != 0))
00615a2c                  return 0xfffffffd;
00615a2c              
006158bc              if (JPGChannels == 3)
006158bc              {
006159eb                  eax = arg1->JPGSubsampling;
006159eb                  
00615a02                  if ((eax != 1 && (eax != 2 && eax != 0)))
00615a14                      return 0xfffffffd;
006158bc              }
006158bc              
006158c5              if (JPGChannels == 4)
006158c5              {
006159c1                  eax = arg1->JPGSubsampling;
006159c1                  
006159d8                  if ((eax != 3 && (eax != 4 && eax != 0)))
006159ea                      return 0xfffffffd;
006158c5              }
006158c5              
006158df              if ((JPGChannels != 1 && (JPGChannels != 3 && (JPGChannels != 4 && arg1->JPGSubsampling != 0))))
006158ed                  return 0xfffffffd;
00615858          }
00615858          
006158f0          if (ecx == 0)
006158f0          {
00615930              eax = arg1->DIBColor;
00615930              
00615cd7              if ((eax == 4 && arg1->DIBChannels == 1))
00615cd7              {
00615cdd                  enum _IJL_COLOR JPGColor_4 = arg1->JPGColor;
00615cdd                  
00615d05                  if ((JPGColor_4 == IJL_G && JPGChannels == 1))
00615cf9                      var_1c = 1;
00615d05                  else if ((JPGColor_4 == IJL_YCBCR && JPGChannels == 3))
00615cf9                      var_1c = 1;
00615cd7              }
00615cd7              
00615c93              if ((eax == 1 && arg1->DIBChannels == 3))
00615c93              {
00615c99                  enum _IJL_COLOR JPGColor_3 = arg1->JPGColor;
00615c99                  
00615cc6                  if (((JPGColor_3 == IJL_G && JPGChannels == 1) || (JPGColor_3 == IJL_RGB && JPGChannels == 3)))
00615cba                      var_1c = 1;
00615cc6                  else if ((JPGColor_3 == IJL_YCBCR && JPGChannels == 3))
00615cba                      var_1c = 1;
00615c93              }
00615c93              
00615c7c              if ((eax == 1 && (arg1->DIBChannels == 4 && (arg1->JPGColor == IJL_YCBCR && JPGChannels == 3))))
00615c84                  var_1c = 1;
00615c84              
00615c23              if ((eax == 2 && arg1->DIBChannels == 3))
00615c23              {
00615c29                  enum _IJL_COLOR JPGColor_2 = arg1->JPGColor;
00615c29                  
00615c56                  if (((JPGColor_2 == IJL_G && JPGChannels == 1) || (JPGColor_2 == IJL_RGB && JPGChannels == 3)))
00615c4a                      var_1c = 1;
00615c56                  else if ((JPGColor_2 == IJL_YCBCR && JPGChannels == 3))
00615c4a                      var_1c = 1;
00615c23              }
00615c23              
00615beb              if ((eax == 5 && arg1->DIBChannels == 4))
00615beb              {
00615bf1                  enum _IJL_COLOR JPGColor_1 = arg1->JPGColor;
00615bf1                  
00615c19                  if ((JPGColor_1 == IJL_RGBA_FPX && JPGChannels == 4))
00615c0d                      var_1c = 1;
00615c19                  else if ((JPGColor_1 == IJL_YCBCRA_FPX && JPGChannels == 4))
00615c0d                      var_1c = 1;
00615beb              }
00615beb              
00615bd4              if ((eax == 3 && (arg1->DIBChannels == 3 && (arg1->JPGColor == IJL_YCBCR && JPGChannels == 3))))
00615bdc                  var_1c = 1;
00615bdc              
00615bae              if (((eax != 0xff || JPGChannels > arg1->DIBChannels) || arg1->JPGColor != 0xff))
0061596e                  goto label_615974;
006158f0          }
006158f0          else
006158f0          {
006158f2              enum _IJL_COLOR JPGColor = arg1->JPGColor;
006158f2              
00615b47              if ((JPGColor == IJL_G && JPGChannels == 1))
00615b47              {
00615b4d                  enum _IJL_COLOR DIBColor_2 = arg1->DIBColor;
00615b4d                  
00615b85                  if ((((DIBColor_2 == IJL_G && arg1->DIBChannels == 1) || (DIBColor_2 == IJL_RGB && arg1->DIBChannels == 3)) || (DIBColor_2 == IJL_BGR && arg1->DIBChannels == 3)))
00615b85                  {
00615b74                      eax = 1;
00615b76                      var_1c = 1;
00615b85                  }
00615b85                  else if ((DIBColor_2 == IJL_RGBA_FPX && arg1->DIBChannels == 4))
00615b6e                  {
00615b74                      eax = 1;
00615b76                      var_1c = 1;
00615b6e                  }
00615b47              }
00615b47              
00615afd              if ((JPGColor == IJL_RGB && JPGChannels == 3))
00615afd              {
00615b03                  enum _IJL_COLOR DIBColor_1 = arg1->DIBColor;
00615b03                  
00615b36                  if (((DIBColor_1 == IJL_RGB && arg1->DIBChannels == 3) || (DIBColor_1 == IJL_BGR && arg1->DIBChannels == 3)))
00615b36                  {
00615b25                      eax = 1;
00615b27                      var_1c = 1;
00615b36                  }
00615b36                  else if ((DIBColor_1 == IJL_RGBA_FPX && arg1->DIBChannels == 4))
00615b1f                  {
00615b25                      eax = 1;
00615b27                      var_1c = 1;
00615b1f                  }
00615afd              }
00615afd              
00615ae9              if ((JPGColor == IJL_RGBA_FPX && (JPGChannels == 4 && (arg1->DIBColor == 5 && arg1->DIBChannels == 4))))
00615ae9              {
00615aef                  eax = 1;
00615af1                  var_1c = 1;
00615ae9              }
00615ae9              
00615a6f              if ((JPGColor == IJL_YCBCR && JPGChannels == 3))
00615a6f              {
00615a75                  enum _IJL_COLOR DIBColor = arg1->DIBColor;
00615a75                  
00615ab6                  if ((((DIBColor == IJL_G && arg1->DIBChannels == 1) || (DIBColor == IJL_RGB && arg1->DIBChannels == 3)) || (DIBColor == IJL_BGR && arg1->DIBChannels == 3)))
00615ab6                  {
00615aa8                      eax = 1;
00615aaa                      var_1c = 1;
00615ab6                  }
00615ab6                  else if ((DIBColor == IJL_RGBA_FPX && arg1->DIBChannels == 4))
00615aa6                  {
00615aa8                      eax = 1;
00615aaa                      var_1c = 1;
00615aa6                  }
00615aa6                  
00615a8f                  if (DIBColor == IJL_YCBCR)
00615a8f                  {
00615a95                      eax = 1;
00615a97                      var_1c = 1;
00615a8f                  }
00615a6f              }
00615a6f              
00615a5b              if ((JPGColor == IJL_YCBCRA_FPX && (JPGChannels == 4 && (arg1->DIBColor == 5 && arg1->DIBChannels == 4))))
00615a5b              {
00615a61                  eax = 1;
00615a63                  var_1c = 1;
00615a5b              }
00615a5b              
00615a35              if ((JPGColor != IJL_OTHER || arg1->DIBColor != 0xff))
00615a35              {
00615974              label_615974:
00615974                  eax = var_1c;
00615974                  
0061597a                  if (eax == 0)
006159b6                      return 0xfffffff8;
00615a35              }
006158f0          }
006158f0          
0061597c          enum _DCTTYPE dcttype = arg1->jprops.dcttype;
0061597c          
00615986          if ((dcttype != IJL_AAN && dcttype != IJL_IPP))
00615994              return 0xfffffff8;
00615994          
006159a8          if ((arg1->jprops.upsampling_type == IJL_TRIANGLE_FILTER && arg1->jprops.raw_coefs != 0))
006159b6              return 0xfffffff8;
006156c2      }
006156c2      
006159c0      return 0;
006156a0  }

00615dd6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

00615de0  enum _IJLERR __stdcall _ijlRead@8(int32_t* arg1, int32_t arg2)

00615de0  {
00615de3      int32_t var_8 = 0xffffffff;
00615de5      int32_t var_c = 0x90603c;
00615dea      int32_t (* var_10)() = j__except_handler3;
00615df5      TEB* fsbase;
00615df5      int32_t var_14 = *(uint32_t*)fsbase;
00615df6      *(uint32_t*)fsbase = &var_14;
00615e00      enum _IJLERR result_1;
00615e00      int32_t* var_1c = &result_1;
00615e0e      result_1 = IJL_OK;
00615e11      int32_t var_78 = 0;
00615e14      int32_t var_8_1 = 0;
00615e27      arg1[0x16] = arg2;
00615e2a      int32_t* ecx = arg1[0xe12];
00615e33      int32_t* var_80 = &result_1;
00615e35      enum _IJLERR result_2 = CheckParameters(arg1);
00615e3d      result_1 = result_2;
00615e3d      
00615e42      if (result_2 == IJL_OK)
00615e42      {
00615e4b          int32_t* var_38_1 = &arg1[0x16];
00615e4e          int32_t edx_1 = arg1[0x16];
00615e4e          
00615e6b          if ((((((edx_1 == 4 || edx_1 == 5) || edx_1 == 0) || edx_1 == 1) || edx_1 == 0x14) || edx_1 == 0x15))
00615e1e              arg1[0xe0d] = 1;
00615e1e          
00615ecb          int32_t* edx_2;
00615ecb          
00615ecb          if ((((((((((edx_1 == 6 || edx_1 == 7) || edx_1 == 2) || edx_1 == 3) || edx_1 == 0x12) || edx_1 == 0x13) || edx_1 == 0x10) || edx_1 == 0x11) || edx_1 == 0xe) || edx_1 == 0xf))
00615ecb          {
006166e7              if (arg1[0xddb] != 0)
006166e7              {
006166ef                  int32_t i_4 = 0;
006166f2                  int32_t var_70_1 = 0;
006166f2                  
00616704                  if (var_38_1[0x21] > 0)
00616704                  {
006168ba                      int32_t i;
006168ba                      
006168ba                      do
006168ba                      {
0061673c                          uint32_t* eax_41 = (i_4 * 0xb4);
0061674f                          *(uint32_t*)((char*)eax_41 + &var_38_1[0x26]) = ((uint32_t)var_38_1[(0xdc8 + (i_4 * 2))]);
00616757                          *(uint32_t*)(&var_38_1[0x25] + eax_41) = 0;
0061675c                          void* j_2 = nullptr;
0061675f                          int32_t var_6c_1 = 0;
006167ca                          void* j;
006167ca                          
006167ca                          do
006167ca                          {
0061677b                              *(uint16_t*)(*(uint32_t*)(&var_38_1[0x27] + eax_41) + (j_2 << 1)) = ((uint16_t)*(uint8_t*)((char*)j_2 + var_38_1[(0xdc7 + (i_4 * 2))]));
0061678d                              *(uint16_t*)((*(uint32_t*)(&var_38_1[0x27] + eax_41) + (j_2 << 1)) + 2) = ((uint16_t)*(uint8_t*)(((char*)j_2 + var_38_1[(0xdc7 + (i_4 * 2))]) + 1));
006167a0                              *(uint16_t*)((*(uint32_t*)(&var_38_1[0x27] + eax_41) + (j_2 << 1)) + 4) = ((uint16_t)*(uint8_t*)(((char*)j_2 + var_38_1[(0xdc7 + (i_4 * 2))]) + 2));
006167b9                              *(uint16_t*)((*(uint32_t*)(&var_38_1[0x27] + eax_41) + (j_2 << 1)) + 6) = ((uint16_t)*(uint8_t*)(((char*)j_2 + var_38_1[(0xdc7 + (i_4 * 2))]) + 3));
006167be                              j = ((char*)j_2 + 4);
006167c1                              j_2 = j;
006167c4                              void* j_1 = j;
006167ca                          } while (j < 0x40);
006168a8                          i = (i_4 + 1);
006168ab                          i_4 = i;
006168ae                          int32_t i_3 = i;
006168ba                      } while (i < var_38_1[0x21]);
00616704                  }
006166e7              }
006166e7              
006167dc              if (var_38_1[0xdc6] == 0)
0061689d                  edx_2 = arg1;
006167dc              else
006167dc              {
006167e2                  int32_t i_1 = 0;
006167e4                  int32_t i_2 = 0;
006167e4                  
006167f3                  if (var_38_1[0x24] <= 0)
006168e5                      edx_2 = arg1;
006167f3                  else
006167f3                  {
00616895                      do
00616895                      {
00616800                          int32_t eax_45 = (i_1 * 0xc);
00616806                          uint32_t ecx_27 = ((uint32_t)*(uint8_t*)((eax_45 + var_38_1) + 0x3744));
0061680e                          uint32_t var_68_1 = ecx_27;
00616811                          uint32_t edx_34 = ((uint32_t)*(uint8_t*)((eax_45 + var_38_1) + 0x3745));
00616819                          uint32_t var_64_1 = edx_34;
0061681c                          int32_t ebx_29 = *(uint32_t*)((eax_45 + var_38_1) + 0x373c);
00616823                          int32_t var_60_1 = ebx_29;
00616826                          void* eax_46 = *(uint32_t*)((eax_45 + var_38_1) + 0x3740);
0061682d                          void* var_5c_1 = eax_46;
0061682d                          
00616832                          if (ecx_27 == 0)
00616832                          {
0061686b                              enum _IJLERR* var_80_7 = &result_1;
00616871                              enum _IJLERR result_5 = _BuildDecoderHuffmanTable(ebx_29, eax_46, ecx_27, edx_34, &var_38_1[((edx_34 * 0x19c) + 0x749)]);
00616879                              result_1 = result_5;
00616879                              
0061687e                              if (result_5 != IJL_OK)
0061687e                              {
006168d9                                  result_1 = 0xfffffffa;
006168e0                                  goto label_61619d;
0061687e                              }
00616832                          }
00616832                          else
00616832                          {
00616844                              enum _IJLERR* var_80_6 = &result_1;
0061684a                              enum _IJLERR result_4 = _BuildDecoderHuffmanTable(ebx_29, eax_46, ecx_27, edx_34, &var_38_1[((edx_34 * 0x19c) + 0xd9)]);
00616852                              result_1 = result_4;
00616852                              
00616857                              if (result_4 != IJL_OK)
00616857                              {
006168c5                                  result_1 = 0xfffffffa;
006168cc                                  goto label_61619d;
00616857                              }
00616832                          }
00616832                          
00616883                          i_1 = (i_2 + 1);
00616886                          i_2 = i_1;
0061688c                          var_38_1 = &arg1[0x16];
00616895                      } while (i_1 < arg1[0x3a]);
00616895                      
006168d1                      edx_2 = arg1;
006167f3                  }
006167dc              }
00615ecb          }
00615ecb          else
00615ecb          {
00615ed1              edx_2 = arg1;
00615ed6              __builtin_memset(&edx_2[0x36], 0, 0x14);
00615ecb          }
00615ecb          
00615ef7          int32_t eax_4 = *(uint32_t*)var_38_1;
00615ef7          
00615f2c          if (((((((eax_4 != 2 && eax_4 != 4) && eax_4 != 6) && eax_4 != 0) && eax_4 != 0x12) && eax_4 != 0x10) && eax_4 != 0xe))
00615f2c          {
00615f31              if ((eax_4 == 0x14 && var_38_1[0xe09] == 0))
00615f31                  goto label_6161fd;
00615f31              
00615f31              goto label_615f35;
00615f2c          }
00615f2c          
00615f17          if (var_38_1[0xe09] != 0)
00615f17              goto label_615f35;
00615f17          
006161fd      label_6161fd:
006161fd          void* eax_29 = ownOpenFile(edx_2[8], 0x80000000);
00616205          void* var_58_1 = eax_29;
00616205          
0061620a          if (eax_29 == 0)
00616220              result_1 = 0xfffffff6;
0061620a          else
0061620a          {
0061620f              var_38_1 = &arg1[0x16];
00615e1e              arg1[0xe1f] = eax_29;
00616218              edx_2 = arg1;
00615f35          label_615f35:
00615f37              int32_t eax_7;
00615f37              
00615f37              if (*(uint32_t*)edx_2 != 0)
00615f37              {
00615fc1                  eax_7 = var_38_1[8];
00615fc4              label_615fc4:
00615fc4                  int32_t edx_3 = edx_2[3];
00615fc4                  
00615fc9                  if (edx_3 < 0)
00615fc9                  {
00615fd5                      eax_7 += ((edx_3 + 1) * var_38_1[0xf]);
00615fd7                      var_38_1[8] = eax_7;
00615fc9                  }
00615fc9                  
00615fdd                  var_38_1[0xe05] = eax_7;
00615fec                  var_38_1[0x120d] = (((char*)var_38_1 + 0x4857) & 0xffffffe0);
00615ff2                  enum _IJLERR* var_80_1 = &result_1;
00615ff4                  enum _IJLERR result_3 = IJL_Decode(var_38_1);
00615ffc                  result_1 = result_3;
00615ffc                  
00616001                  if (result_3 == IJL_OK)
00616001                  {
00616011                      void* ecx_7 = &arg1[0x16];
0061601c                      int32_t eax_12;
0061601c                      int32_t edx_7;
0061601c                      
0061601c                      if (*(uint32_t*)((char*)ecx_7 + 0x4828) == 0)
0061601c                      {
00616057                          int32_t edx_8 = *(uint32_t*)((char*)ecx_7 + 0x54);
00616057                          
0061605d                          if (edx_8 == 1)
0061605f                              *(uint32_t*)((char*)ecx_7 + 0x58) = 4;
0061605f                          
0061606e                          if (*(uint32_t*)((char*)ecx_7 + 0x4df8) == 0)
0061606e                          {
00616080                              edx_7 = *(uint32_t*)((char*)ecx_7 + 0x34);
00616083                              eax_12 = *(uint32_t*)ecx_7;
0061606e                          }
0061606e                          else if (edx_8 == 3)
00616073                          {
006163bd                              *(uint32_t*)((char*)ecx_7 + 0x58) = 3;
006163c4                              edx_7 = *(uint32_t*)((char*)ecx_7 + 0x34);
006163c7                              eax_12 = *(uint32_t*)ecx_7;
00616073                          }
00616073                          else
00616073                          {
00616079                              edx_7 = *(uint32_t*)((char*)ecx_7 + 0x34);
0061607c                              eax_12 = *(uint32_t*)ecx_7;
00616073                          }
0061601c                      }
0061601c                      else
0061601c                      {
0061601e                          eax_12 = *(uint32_t*)ecx_7;
0061601e                          
00616050                          if ((eax_12 != 0 && eax_12 != 1))
00616052                              edx_7 = *(uint32_t*)((char*)ecx_7 + 0x34);
00616050                          else
00616050                          {
00616024                              int32_t ebx_4 = *(uint32_t*)((char*)ecx_7 + 0x54);
00616027                              *(uint32_t*)((char*)ecx_7 + 0x30) = ebx_4;
00616027                              
0061602d                              if (ebx_4 == 1)
0061602f                                  *(uint32_t*)((char*)ecx_7 + 0x58) = 4;
0061602f                              
00616039                              if (ebx_4 == 3)
00616039                              {
006163a7                                  int32_t edx_21;
006163a7                                  
006163a7                                  if (*(uint32_t*)((char*)ecx_7 + 0x482c) == 0)
006163b0                                      edx_21 = 1;
006163a7                                  else
006163a9                                      edx_21 = 3;
006163a9                                  
006163b5                                  *(uint32_t*)((char*)ecx_7 + 0x58) = edx_21;
00616039                              }
00616039                              
00616042                              if (ebx_4 == 4)
00616042                              {
0061637d                                  int32_t edx_19;
0061637d                                  
0061637d                                  if (*(uint32_t*)((char*)ecx_7 + 0x482c) == 0)
00616386                                      edx_19 = 5;
0061637d                                  else
0061637f                                      edx_19 = 6;
0061637f                                  
0061638b                                  *(uint32_t*)((char*)ecx_7 + 0x58) = edx_19;
0061638e                                  edx_7 = 5;
00616393                                  *(uint32_t*)((char*)ecx_7 + 0x34) = 5;
00616042                              }
00616042                              else
00616048                                  edx_7 = *(uint32_t*)((char*)ecx_7 + 0x34);
00616050                          }
0061601c                      }
0061601c                      
006166cd                      if ((edx_7 == 3 && *(uint32_t*)((char*)ecx_7 + 0x58) == 3))
006166d3                          *(uint32_t*)((char*)ecx_7 + 0x38) = 2;
006166d3                      
006160e8                      if (((((((eax_12 != 4 && eax_12 != 6) && eax_12 != 0) && eax_12 != 0x12) && eax_12 != 0x10) && eax_12 != 0xe) && eax_12 != 0x14))
00616091                          goto label_6160f2;
00616091                      
006160af                      enum _IJLERR* var_80_2 = &result_1;
006160b4                      int32_t eax_17 = ownSeekFile(*(uint32_t*)((char*)ecx_7 + 0x3824), -((*(uint32_t*)((char*)ecx_7 + 0x380c) + *(uint32_t*)ecx)), 1);
006160bc                      int32_t var_54_1 = eax_17;
006160bc                      
006160c1                      if (eax_17 != 0)
006160c1                      {
006160cf                          ecx_7 = &arg1[0x16];
006160d2                          eax_12 = *(uint32_t*)ecx_7;
006160f2                      label_6160f2:
006160f2                          
006160f2                          if ((eax_12 == 1 || eax_12 == 0x15))
006160ff                              *(uint32_t*)((char*)ecx_7 + 0x37fc) = (*(uint32_t*)((char*)ecx_7 + 0x37f8) - *(uint32_t*)ecx);
006160ff                          
0061610b                          arg1[0xb] = *(uint32_t*)((char*)ecx_7 + 0x4c);
00616111                          arg1[0xc] = *(uint32_t*)((char*)ecx_7 + 0x50);
00616117                          arg1[0xd] = *(uint32_t*)((char*)ecx_7 + 0x54);
0061611d                          arg1[0x10] = *(uint32_t*)((char*)ecx_7 + 0x60);
00616123                          arg1[0x11] = *(uint32_t*)((char*)ecx_7 + 0x64);
00616129                          arg1[0x12] = *(uint32_t*)((char*)ecx_7 + 0x68);
0061612f                          arg1[0x13] = *(uint32_t*)((char*)ecx_7 + 0x6c);
00616132                          int32_t eax_23 = 0xff;
00616137                          arg1[0xf] = 0xff;
0061613e                          int32_t ebx_6 = *(uint32_t*)((char*)ecx_7 + 0x37c0);
0061613e                          
00616147                          if (ebx_6 == 1)
00616147                          {
006166b9                              eax_23 = 0;
006166bb                              arg1[0xf] = 0;
00616147                          }
00616147                          else if (ebx_6 == 2)
00616150                          {
00616675                              void* ebx_23 = *(uint32_t*)((char*)ecx_7 + 0x37cc);
00616675                              
006166a5                              if ((*(uint32_t*)((char*)ebx_23 + 4) == 1 && (*(uint32_t*)((char*)ebx_23 + 8) == 1 && (*(uint32_t*)((char*)ebx_23 + 0x14) == 1 && *(uint32_t*)((char*)ebx_23 + 0x18) == 1))))
006166a5                              {
006166ab                                  eax_23 = 0;
006166ad                                  arg1[0xf] = 0;
006166a5                              }
00616150                          }
00616150                          else if (ebx_6 == 3)
00616159                          {
00616585                              void* esi_13 = *(uint32_t*)((char*)ecx_7 + 0x37cc);
0061658b                              int32_t ebx_17 = *(uint32_t*)((char*)esi_13 + 4);
0061658b                              
00616661                              if ((((((ebx_17 == 1 && *(uint32_t*)((char*)esi_13 + 8) == 1) && *(uint32_t*)((char*)esi_13 + 0x14) == 1) && *(uint32_t*)((char*)esi_13 + 0x18) == 1) && *(uint32_t*)((char*)esi_13 + 0x24) == 1) && *(uint32_t*)((char*)esi_13 + 0x28) == 1))
00616661                              {
00616667                                  eax_23 = 0;
00616669                                  arg1[0xf] = 0;
00616661                              }
00616661                              else if ((((((ebx_17 == 2 && *(uint32_t*)((char*)esi_13 + 8) == 2) && *(uint32_t*)((char*)esi_13 + 0x14) == 1) && *(uint32_t*)((char*)esi_13 + 0x18) == 1) && *(uint32_t*)((char*)esi_13 + 0x24) == 1) && *(uint32_t*)((char*)esi_13 + 0x28) == 1))
00616618                              {
0061661a                                  eax_23 = 1;
0061661f                                  arg1[0xf] = 1;
00616618                              }
00616618                              else if ((ebx_17 == 2 && (*(uint32_t*)((char*)esi_13 + 8) == 1 && (*(uint32_t*)((char*)esi_13 + 0x14) == 1 && (*(uint32_t*)((char*)esi_13 + 0x18) == 1 && (*(uint32_t*)((char*)esi_13 + 0x24) == 1 && *(uint32_t*)((char*)esi_13 + 0x28) == 1))))))
006165db                              {
006165e1                                  eax_23 = 2;
006165e6                                  arg1[0xf] = 2;
006165db                              }
00616159                          }
00616159                          else if (ebx_6 == 4)
00616162                          {
00616441                              void* esi_12 = *(uint32_t*)((char*)ecx_7 + 0x37cc);
00616447                              int32_t ebx_9 = *(uint32_t*)((char*)esi_12 + 4);
00616447                              
00616571                              if ((((((((ebx_9 == 1 && *(uint32_t*)((char*)esi_12 + 8) == 1) && *(uint32_t*)((char*)esi_12 + 0x14) == 1) && *(uint32_t*)((char*)esi_12 + 0x18) == 1) && *(uint32_t*)((char*)esi_12 + 0x24) == 1) && *(uint32_t*)((char*)esi_12 + 0x28) == 1) && *(uint32_t*)((char*)esi_12 + 0x34) == 1) && *(uint32_t*)((char*)esi_12 + 0x38) == 1))
00616571                              {
00616577                                  eax_23 = 0;
00616579                                  arg1[0xf] = 0;
00616571                              }
00616571                              else if ((((((((ebx_9 == 2 && *(uint32_t*)((char*)esi_12 + 8) == 2) && *(uint32_t*)((char*)esi_12 + 0x14) == 1) && *(uint32_t*)((char*)esi_12 + 0x18) == 1) && *(uint32_t*)((char*)esi_12 + 0x24) == 1) && *(uint32_t*)((char*)esi_12 + 0x28) == 1) && *(uint32_t*)((char*)esi_12 + 0x34) == 2) && *(uint32_t*)((char*)esi_12 + 0x38) == 2))
0061650c                              {
00616512                                  eax_23 = 3;
00616517                                  arg1[0xf] = 3;
0061650c                              }
0061650c                              else if ((ebx_9 == 2 && (*(uint32_t*)((char*)esi_12 + 8) == 1 && (*(uint32_t*)((char*)esi_12 + 0x14) == 1 && (*(uint32_t*)((char*)esi_12 + 0x18) == 1 && (*(uint32_t*)((char*)esi_12 + 0x24) == 1 && (*(uint32_t*)((char*)esi_12 + 0x28) == 1 && (*(uint32_t*)((char*)esi_12 + 0x34) == 2 && *(uint32_t*)((char*)esi_12 + 0x38) == 1))))))))
006164af                              {
006164b5                                  eax_23 = 4;
006164ba                                  arg1[0xf] = 4;
006164af                              }
00616162                          }
00616162                          
00616168                          *(uint32_t*)((char*)ecx_7 + 0x5c) = eax_23;
0061616e                          arg1[0xe] = *(uint32_t*)((char*)ecx_7 + 0x58);
00616174                          arg1[6] = *(uint32_t*)((char*)ecx_7 + 0x34);
0061617a                          arg1[5] = *(uint32_t*)((char*)ecx_7 + 0x30);
0061617d                          int32_t eax_25 = *(uint32_t*)ecx_7;
0061617d                          
00616194                          if (((eax_25 == 2 || eax_25 == 4) || eax_25 == 6))
00616194                          {
00616404                              void* eax_37 = *(uint32_t*)((char*)ecx_7 + 0x3824);
00616404                              
0061640c                              if (eax_37 != 0)
0061640c                              {
00616412                                  enum _IJLERR* var_80_5 = &result_1;
00616414                                  int32_t eax_38 = ownCloseFile(eax_37);
0061641c                                  int32_t var_54_3 = eax_38;
0061641c                                  
00616421                                  if (eax_38 != 0)
00615e1e                                      arg1[0xe1f] = 0;
00616421                                  else
00616423                                      result_1 = 0xfffffff7;
0061640c                              }
00616194                          }
006160c1                      }
006160c1                      else
006160c3                          result_1 = 0xffffffe9;
00616001                  }
00616001                  else if (result_3 == IJL_INTERRUPT_OK)
00616006                  {
0061633a                      int32_t ecx_17 = (((arg1[0x19] << 3) + 8) * arg1[0xe04]);
00615e1e                      arg1[0x19] = ecx_17;
00616344                      int32_t edx_15 = arg1[0x29];
00616344                      
00616349                      if (ecx_17 > edx_15)
00615e1e                          arg1[0x19] = edx_15;
00615e1e                      
00616358                      int32_t ecx_19 = (((arg1[0x1a] << 3) + 8) * arg1[0xe05]);
00615e1e                      arg1[0x1a] = ecx_19;
00616362                      int32_t edx_17 = arg1[0x2a];
00616362                      
00616367                      if (ecx_19 > edx_17)
00615e1e                          arg1[0x1a] = edx_17;
00616006                  }
00615f37              }
00615f37              else
00615f37              {
00615f3d                  eax_7 = edx_2[1];
00615f43                  var_38_1[8] = eax_7;
00615f49                  var_38_1[9] = edx_2[2];
00615f4c                  int32_t ecx_2 = edx_2[3];
00615f4f                  var_38_1[0xa] = ecx_2;
00615f55                  var_38_1[0xb] = edx_2[4];
00615f5b                  var_38_1[0xc] = edx_2[5];
00615f61                  var_38_1[0xd] = edx_2[6];
00615f67                  var_38_1[0xe] = edx_2[7];
00615f71                  int32_t esi_7 = ((edx_2[2] * edx_2[5]) + edx_2[4]);
00615f74                  var_38_1[0xf] = esi_7;
00615f74                  
00615f79                  if (ecx_2 < 0)
00615f7f                      var_38_1[0xf] = -(esi_7);
00615f7f                  
00615f82                  int32_t esi_9 = edx_2[9];
00615f87                  var_38_1[0x11] = esi_9;
00615f8d                  var_38_1[0x10] = edx_2[8];
00615f90                  int32_t ebx_3 = edx_2[0xa];
00615f93                  var_38_1[0x12] = ebx_3;
00615f99                  var_38_1[0x16] = edx_2[0xe];
00615f9f                  var_38_1[0x1a] = edx_2[0x12];
00615fa5                  var_38_1[0x1b] = edx_2[0x13];
00615fab                  var_38_1[0x1c] = edx_2[0x14];
00615fab                  
00615fb6                  if (var_38_1[0xdf8] != 0)
00615fb6                      goto label_615fc4;
00615fb6                  
00616231                  var_38_1[0xdfa] = 0;
00616237                  var_38_1[0xdfb] = 0;
0061623d                  var_38_1[0xdfd] = 0;
00616243                  var_38_1[0xe06] = 0;
00616249                  int32_t ecx_10 = *(uint32_t*)var_38_1;
00616249                  
00616273                  if ((ecx_10 != 2 && (ecx_10 != 4 && (ecx_10 != 0 && (ecx_10 != 6 && (ecx_10 != 0x12 && (ecx_10 != 0x10 && (ecx_10 != 0xe && ecx_10 != 0x14))))))))
00616273                  {
00616275                      var_38_1[0xdff] = esi_9;
0061627e                      var_38_1[0xe00] = (esi_9 + ebx_3);
00616284                      var_38_1[0xdfe] = esi_9;
0061628a                      var_38_1[0xe03] = ebx_3;
00616290                      var_38_1[0xe02] = ebx_3;
00616273                  }
00616273                  
006162be                  if ((((((((ecx_10 == 2 || ecx_10 == 4) || ecx_10 == 0) || ecx_10 == 6) || ecx_10 == 0x12) || ecx_10 == 0x10) || ecx_10 == 0xe) || ecx_10 == 0x14))
006162be                  {
006162c6                      var_38_1[0xdff] = &var_38_1[0xe0a];
006162d2                      var_38_1[0xe00] = &var_38_1[0x120a];
006162d8                      var_38_1[0xdfe] = &var_38_1[0xe0a];
006162e3                      var_38_1[0xe03] = 0x1000;
006162e9                      var_38_1[0xe02] = 0x1000;
006162be                  }
006162be                  
006162f5                  if (ecx_10 != 0x14)
006162f5                      goto label_615fc4;
006162f5                  
00616305                  enum _IJLERR* var_80_3 = &result_1;
00616309                  int32_t eax_31 = ownSeekFile(var_38_1[0xe09], 0, 0);
00616311                  int32_t var_54_2 = eax_31;
00616311                  
00616316                  if (eax_31 != 0)
00616316                  {
0061631f                      edx_2 = arg1;
00616322                      var_38_1 = &arg1[0x16];
00616325                      eax_7 = arg1[0x1e];
00616328                      goto label_615fc4;
00616316                  }
00615f37              }
0061620a          }
00615e42      }
00615e42      
0061619d  label_61619d:
0061619d      ecx[6]();
006161a0      int32_t var_8_2 = 0xffffffff;
006161a0      
006163d9      if ((result_1 < IJL_OK && arg1[0xe1f] != 0))
006163d9      {
006163e8          enum _IJLERR* var_80_4 = &result_1;
006163ea          ownCloseFile(arg1[0xe1f]);
006163f5          arg1[0xe1f] = 0;
006163d9      }
006163d9      
006161b2      enum _IJLERR result = result_1;
006161c4      *(uint32_t*)fsbase = var_14;
006161ce      return result;
00615de0  }

006161d1                                                     8b 65 e8 c7 45 88 ff ff ff ff 8b 45 8c 85 c0                   .e..E......E...
006161e0  74 09 8b 40 18 85 c0 74 02 ff d0 c7 45 fc ff ff ff ff eb b3                                      t..@...t....E.......
006168ed                                         b8 01 00 00 00 c3 8d b6 00 00 00 00 8d bc 27 00 00 00 00               ..............'....

00616900  enum _IJLERR __stdcall _ijlWrite@8(int32_t* arg1, int32_t arg2)

00616900  {
00616903      int32_t var_8 = 0xffffffff;
00616905      int32_t var_c = 0x906054;
0061690a      int32_t (* var_10)() = j__except_handler3;
00616915      TEB* fsbase;
00616915      int32_t var_14 = *(uint32_t*)fsbase;
00616916      *(uint32_t*)fsbase = &var_14;
00616920      enum _IJLERR result_1;
00616920      int32_t* var_1c = &result_1;
0061692e      result_1 = IJL_OK;
00616931      int32_t var_50 = 0;
00616934      int32_t var_8_1 = 0;
00616944      int32_t var_48 = 0;
0061694e      arg1[0x16] = arg2;
00616951      int32_t* var_58 = &result_1;
00616953      enum _IJLERR result_2 = CheckParameters(arg1);
0061695b      result_1 = result_2;
0061695b      
00616960      if (result_2 == IJL_OK)
00616960      {
00616962          int32_t* esi_1 = &arg1[0x16];
00616965          int32_t eax_2 = *(uint32_t*)esi_1;
00616965          
00616973          if ((eax_2 != 8 && eax_2 != 0xa))
00616973          {
0061697c              if ((eax_2 == 0xc && esi_1[0xe09] == 0))
0061697c                  goto label_6172d9;
0061697c              
0061697c              goto label_616993;
00616973          }
00616973          
006172c7          if (esi_1[0xe09] != 0)
006172c7              goto label_616993;
006172c7          
006172d9      label_6172d9:
006172d9          void* eax_99 = ownOpenFile(arg1[8], 0xc0000000);
006172e1          void* var_50_1 = eax_99;
006172e1          
006172e6          if (eax_99 == 0)
006172f6              result_1 = 0xfffffff6;
006172e6          else
006172e6          {
006172e8              esi_1 = &arg1[0x16];
006172eb              esi_1[0xe09] = eax_99;
00616993          label_616993:
00616993              
00616993              if ((*(uint32_t*)arg1 == 0 && esi_1[0xdf8] == 0))
00616993              {
00616ffb                  esi_1[0x13] = arg1[0xb];
00617001                  esi_1[0x14] = arg1[0xc];
00617007                  esi_1[0x15] = arg1[0xd];
0061700a                  int32_t edi_14 = arg1[0xe];
00617010                  esi_1[0x16] = edi_14;
00617016                  esi_1[0x17] = arg1[0xf];
0061701c                  esi_1[0x11] = arg1[9];
00617022                  esi_1[0x12] = arg1[0xa];
00617028                  esi_1[0x10] = arg1[8];
0061702e                  esi_1[8] = arg1[1];
00617034                  esi_1[9] = arg1[2];
00617037                  int32_t ecx_4 = arg1[3];
0061703a                  esi_1[0xa] = ecx_4;
00617040                  esi_1[0xb] = arg1[4];
00617046                  esi_1[0xc] = arg1[5];
00617049                  int32_t eax_73 = arg1[6];
0061704f                  esi_1[0xd] = eax_73;
00617052                  int32_t edx_35 = arg1[7];
00617055                  esi_1[0xe] = edx_35;
00617058                  int32_t eax_74 = arg1[2];
0061705b                  int32_t edi_15 = arg1[4];
00617064                  int32_t edi_18;
00617064                  
00617064                  if (edx_35 == 2)
006170ba                      edi_18 = (edi_15 + (eax_74 << 1));
00617064                  else
0061706c                      edi_18 = ((arg1[5] * eax_74) + edi_15);
0061706c                  
0061706f                  esi_1[0xf] = edi_18;
0061706f                  
00617074                  if (ecx_4 < 0)
00617078                      esi_1[0xf] = -(edi_18);
00617078                  
0061707e                  esi_1[0x1a] = arg1[0x12];
00617084                  esi_1[0x1b] = arg1[0x13];
0061708a                  esi_1[0x1c] = arg1[0x14];
0061708a                  
006170a8                  if ((edx_35 == 2 && (eax_73 == 3 && edi_14 == 3)))
006170ae                      esi_1[0x17] = 2;
00616993              }
00616993              
00616999              enum _IJLERR* var_58_1 = &result_1;
0061699b              _SetDefaultTables(esi_1);
006169a3              result_1 = IJL_OK;
006169e3              int32_t* ecx_2 = &arg1[0x16];
006169e6              ecx_2[0x1a] = 1;
006169ed              int32_t eax_7 = ecx_2[0x16];
006169f8              int32_t eax_8;
006169f8              
006169f8              if ((eax_7 != 1 && eax_7 != 5))
006169fa                  eax_8 = ecx_2[0xd];
006169fa              
00616a0c              if (((((eax_7 == 1 || eax_7 == 5) || eax_8 == 4) || eax_8 == 0xff) || eax_8 == 3))
00616a0e                  ecx_2[0x1a] = 0;
00616a0e              
00616a1b              int32_t eax_9 = arg1[0xd];
00616a1e              int32_t var_20_1 = eax_9;
00616a21              ecx_2[0xdf0] = eax_9;
00616a27              int32_t eax_10 = arg1[0xf];
00616a27              
00616a2c              if (eax_10 == 0)
00616a2c              {
006171f3                  int32_t edx_43 = 0;
006171f5                  int32_t var_44_3 = 0;
006171f5                  
00617201                  if (var_20_1 > 0)
00617201                  {
0061723b                      int32_t eax_90;
0061723b                      
0061723b                      do
0061723b                      {
00617205                          int32_t eax_89 = (edx_43 << 4);
0061720e                          *(uint32_t*)(eax_89 + ecx_2[0xdf3]) = edx_43;
0061721c                          *(uint32_t*)((eax_89 + ecx_2[0xdf3]) + 4) = 1;
00617226                          *(uint32_t*)((eax_89 + ecx_2[0xdf3]) + 8) = 1;
0061722a                          edx_43 += 1;
0061722d                          int32_t var_44_4 = edx_43;
00617230                          eax_90 = ecx_2[0xdf0];
00617236                          var_20_1 = eax_90;
0061723b                      } while (edx_43 < eax_90);
00617201                  }
00617201                  
00617245                  if (ecx_2[0xdc5] == 0)
00617245                  {
00617251                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
00617251                      
0061725d                      if (ecx_2[0x1a] == 0)
006172b7                          var_20_1 = ecx_2[0xdf0];
0061725d                      else
0061725d                      {
0061725f                          int32_t eax_93 = ecx_2[0xdf0];
00617268                          var_20_1 = eax_93;
00617268                          
0061726b                          if (eax_93 >= 2)
0061726b                          {
00617271                              int32_t ebx_40 = 1;
00617276                              int32_t var_44_5 = 1;
00617276                              
00617280                              if (eax_93 > 1)
00617280                              {
006172aa                                  int32_t esi_16;
006172aa                                  
006172aa                                  do
006172aa                                  {
00617291                                      *(uint32_t*)(((ebx_40 << 4) + ecx_2[0xdf3]) + 0xc) = 1;
00617299                                      ebx_40 += 1;
0061729c                                      int32_t var_44_6 = ebx_40;
0061729f                                      esi_16 = ecx_2[0xdf0];
006172a5                                      var_20_1 = esi_16;
006172aa                                  } while (ebx_40 < esi_16);
00617280                              }
0061726b                          }
0061725d                      }
00617245                  }
00616a2c              }
00616a2c              else if (eax_10 == 1)
00616a35              {
0061711c                  *(uint32_t*)ecx_2[0xdf3] = 0;
0061712d                  *(uint32_t*)(ecx_2[0xdf3] + 4) = 2;
00617136                  *(uint32_t*)(ecx_2[0xdf3] + 8) = 2;
00617144                  *(uint32_t*)(ecx_2[0xdf3] + 0x10) = 1;
0061714d                  *(uint32_t*)(ecx_2[0xdf3] + 0x14) = 1;
00617156                  *(uint32_t*)(ecx_2[0xdf3] + 0x18) = 1;
0061715f                  *(uint32_t*)(ecx_2[0xdf3] + 0x20) = 2;
00617168                  *(uint32_t*)(ecx_2[0xdf3] + 0x24) = 1;
00617171                  *(uint32_t*)(ecx_2[0xdf3] + 0x28) = 1;
00617171                  
0061717c                  if (ecx_2[0xdc5] != 0)
006171eb                      var_20_1 = ecx_2[0xdf0];
0061717c                  else if (arg1[0x12] == 0)
00617186                  {
006171c2                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
006171cb                      *(uint32_t*)(ecx_2[0xdf3] + 0x1c) = 0;
006171d4                      *(uint32_t*)(ecx_2[0xdf3] + 0x2c) = 0;
006171dd                      var_20_1 = ecx_2[0xdf0];
00617186                  }
00617186                  else
00617186                  {
0061718e                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
006171a0                      *(uint32_t*)(ecx_2[0xdf3] + 0x1c) = 1;
006171a9                      *(uint32_t*)(ecx_2[0xdf3] + 0x2c) = 1;
006171b2                      var_20_1 = ecx_2[0xdf0];
00617186                  }
00616a35              }
00616a35              else if (eax_10 == 2)
00616a3e              {
00616c74                  *(uint32_t*)ecx_2[0xdf3] = 0;
00616c85                  *(uint32_t*)(ecx_2[0xdf3] + 4) = 2;
00616c93                  *(uint32_t*)(ecx_2[0xdf3] + 8) = 1;
00616c9c                  *(uint32_t*)(ecx_2[0xdf3] + 0x10) = 1;
00616ca5                  *(uint32_t*)(ecx_2[0xdf3] + 0x14) = 1;
00616cae                  *(uint32_t*)(ecx_2[0xdf3] + 0x18) = 1;
00616cb7                  *(uint32_t*)(ecx_2[0xdf3] + 0x20) = 2;
00616cc0                  *(uint32_t*)(ecx_2[0xdf3] + 0x24) = 1;
00616cc9                  *(uint32_t*)(ecx_2[0xdf3] + 0x28) = 1;
00616cc9                  
00616cd4                  if (ecx_2[0xdc5] != 0)
00616d3d                      var_20_1 = ecx_2[0xdf0];
00616cd4                  else if (arg1[0x12] == 0)
00616cde                  {
00616d17                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
00616d20                      *(uint32_t*)(ecx_2[0xdf3] + 0x1c) = 0;
00616d29                      *(uint32_t*)(ecx_2[0xdf3] + 0x2c) = 0;
00616d32                      var_20_1 = ecx_2[0xdf0];
00616cde                  }
00616cde                  else
00616cde                  {
00616ce6                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
00616cf8                      *(uint32_t*)(ecx_2[0xdf3] + 0x1c) = 1;
00616d01                      *(uint32_t*)(ecx_2[0xdf3] + 0x2c) = 1;
00616d0a                      var_20_1 = ecx_2[0xdf0];
00616cde                  }
00616a3e              }
00616a3e              else if (eax_10 == 3)
00616a47              {
00616a53                  *(uint32_t*)ecx_2[0xdf3] = 0;
00616a64                  *(uint32_t*)(ecx_2[0xdf3] + 4) = 2;
00616a6d                  *(uint32_t*)(ecx_2[0xdf3] + 8) = 2;
00616a7b                  *(uint32_t*)(ecx_2[0xdf3] + 0x10) = 1;
00616a84                  *(uint32_t*)(ecx_2[0xdf3] + 0x14) = 1;
00616a8d                  *(uint32_t*)(ecx_2[0xdf3] + 0x18) = 1;
00616a96                  *(uint32_t*)(ecx_2[0xdf3] + 0x20) = 2;
00616a9f                  *(uint32_t*)(ecx_2[0xdf3] + 0x24) = 1;
00616aa8                  *(uint32_t*)(ecx_2[0xdf3] + 0x28) = 1;
00616ab1                  *(uint32_t*)(ecx_2[0xdf3] + 0x30) = 3;
00616abe                  *(uint32_t*)(ecx_2[0xdf3] + 0x34) = 2;
00616ac7                  *(uint32_t*)(ecx_2[0xdf3] + 0x38) = 2;
00616ac7                  
00616ad2                  if (ecx_2[0xdc5] != 0)
00616b51                      var_20_1 = ecx_2[0xdf0];
00616ad2                  else if (arg1[0x12] == 0)
00616adc                  {
00616b1f                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
00616b28                      *(uint32_t*)(ecx_2[0xdf3] + 0x1c) = 0;
00616b31                      *(uint32_t*)(ecx_2[0xdf3] + 0x2c) = 0;
00616b3a                      *(uint32_t*)(ecx_2[0xdf3] + 0x3c) = 0;
00616b43                      var_20_1 = ecx_2[0xdf0];
00616adc                  }
00616adc                  else
00616adc                  {
00616ae6                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
00616af4                      *(uint32_t*)(ecx_2[0xdf3] + 0x1c) = 1;
00616afd                      *(uint32_t*)(ecx_2[0xdf3] + 0x2c) = 1;
00616b06                      *(uint32_t*)(ecx_2[0xdf3] + 0x3c) = 0;
00616b0f                      var_20_1 = ecx_2[0xdf0];
00616adc                  }
00616a47              }
00616a47              else if (eax_10 == 4)
00616b5c              {
00616b68                  *(uint32_t*)ecx_2[0xdf3] = 0;
00616b79                  *(uint32_t*)(ecx_2[0xdf3] + 4) = 2;
00616b87                  *(uint32_t*)(ecx_2[0xdf3] + 8) = 1;
00616b90                  *(uint32_t*)(ecx_2[0xdf3] + 0x10) = 1;
00616b99                  *(uint32_t*)(ecx_2[0xdf3] + 0x14) = 1;
00616ba2                  *(uint32_t*)(ecx_2[0xdf3] + 0x18) = 1;
00616bab                  *(uint32_t*)(ecx_2[0xdf3] + 0x20) = 2;
00616bb4                  *(uint32_t*)(ecx_2[0xdf3] + 0x24) = 1;
00616bbd                  *(uint32_t*)(ecx_2[0xdf3] + 0x28) = 1;
00616bc6                  *(uint32_t*)(ecx_2[0xdf3] + 0x30) = 3;
00616bd3                  *(uint32_t*)(ecx_2[0xdf3] + 0x34) = 2;
00616bdc                  *(uint32_t*)(ecx_2[0xdf3] + 0x38) = 1;
00616bdc                  
00616be7                  if (ecx_2[0xdc5] != 0)
00616c66                      var_20_1 = ecx_2[0xdf0];
00616be7                  else if (arg1[0x12] == 0)
00616bf1                  {
00616c34                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
00616c3d                      *(uint32_t*)(ecx_2[0xdf3] + 0x1c) = 0;
00616c46                      *(uint32_t*)(ecx_2[0xdf3] + 0x2c) = 0;
00616c4f                      *(uint32_t*)(ecx_2[0xdf3] + 0x3c) = 0;
00616c58                      var_20_1 = ecx_2[0xdf0];
00616bf1                  }
00616bf1                  else
00616bf1                  {
00616bfb                      *(uint32_t*)(ecx_2[0xdf3] + 0xc) = 0;
00616c09                      *(uint32_t*)(ecx_2[0xdf3] + 0x1c) = 1;
00616c12                      *(uint32_t*)(ecx_2[0xdf3] + 0x2c) = 1;
00616c1b                      *(uint32_t*)(ecx_2[0xdf3] + 0x3c) = 0;
00616c24                      var_20_1 = ecx_2[0xdf0];
00616bf1                  }
00616b5c              }
00616b5c              
00616d40              ecx_2[0xde9] = 8;
00616d50              ecx_2[0xdea] = arg1[0xb];
00616d59              ecx_2[0xdeb] = arg1[0xc];
00616d61              ecx_2[0x1b] = 0;
00616d66              int32_t var_28_1 = 0;
00616d69              ecx_2[0xdee] = 0;
00616d71              int32_t var_2c_1 = 0;
00616d74              ecx_2[0xdef] = 0;
00616d7a              int32_t ebx_28 = 0;
00616d7c              int32_t var_44_1 = 0;
00616d7c              
00616d84              if (var_20_1 > 0)
00616d84              {
00616d86                  int32_t edx_18 = ecx_2[0xdf3];
00616d86                  
00616dd8                  do
00616dd8                  {
00616d8e                      int32_t eax_34 = (ebx_28 << 4);
00616d91                      int32_t edi_10 = *(uint32_t*)((eax_34 + edx_18) + 4);
00616d91                      
00616d9a                      if (var_28_1 < edi_10)
00616d9a                      {
00616d9c                          var_28_1 = edi_10;
00616d9f                          ecx_2[0xdee] = edi_10;
00616d9a                      }
00616d9a                      
00616da5                      int32_t edi_11 = *(uint32_t*)((eax_34 + edx_18) + 8);
00616da5                      
00616dae                      if (var_2c_1 < edi_11)
00616dae                      {
00616db0                          var_2c_1 = edi_11;
00616db3                          ecx_2[0xdef] = edi_11;
00616dae                      }
00616dae                      
0061710b                      if ((*(uint32_t*)((eax_34 + edx_18) + 4) != 1 || *(uint32_t*)((eax_34 + edx_18) + 8) != 1))
00616dc6                          ecx_2[0x1b] = 1;
00616dc6                      
00616dcd                      ebx_28 += 1;
00616dd0                      int32_t var_44_2 = ebx_28;
00616dd8                  } while (ebx_28 < var_20_1);
00616d84              }
00616d84              
00616de0              int32_t var_2c_2;
00616de0              int32_t eax_40;
00616de0              
00616de0              if (ecx_2[0x1d] == 1)
00616de0              {
00616fc6                  eax_40 = 8;
00616fcb                  int32_t var_28_3 = 8;
00616fd3                  ecx_2[0xded] = 8;
00616fde                  var_2c_2 = 8;
00616fe1                  ecx_2[0xdec] = 8;
00616de0              }
00616de0              else
00616de0              {
00616ded                  eax_40 = (var_28_1 * 8);
00616def                  int32_t var_28_2 = eax_40;
00616df2                  ecx_2[0xded] = eax_40;
00616dff                  int32_t edx_22 = (var_2c_1 * 8);
00616e01                  var_2c_2 = edx_22;
00616e04                  ecx_2[0xdec] = edx_22;
00616de0              }
00616de0              
00616e14              int32_t temp0_1 = (((int64_t)((eax_40 + ecx_2[0x13]) - 1)) / eax_40);
00616e18              ecx_2[0x1e] = temp0_1;
00616e26              int32_t temp0_2 = (((int64_t)((var_2c_2 + ecx_2[0x14]) - 1)) / var_2c_2);
00616e28              ecx_2[0x1f] = temp0_2;
00616e2b              ecx_2[0xdf1] = temp0_1;
00616e34              ecx_2[0xdf2] = (temp0_2 * temp0_1);
00616e42              int32_t eax_48;
00616e42              
00616e42              if (ecx_2[0xdf8] == 0)
00616e42              {
00616f5c                  ecx_2[0xe01] = 0;
00616f69                  int32_t eax_59 = arg1[3];
00616f6e                  int32_t eax_60;
00616f6e                  
00616f6e                  if (eax_59 < 0)
00616f6e                  {
00616fbe                      eax_60 = (((eax_59 + 1) * ecx_2[0xf]) + ecx_2[8]);
00616fc1                      ecx_2[8] = eax_60;
00616f6e                  }
00616f6e                  else
00616f70                      eax_60 = ecx_2[8];
00616f70                  
00616f73                  ecx_2[0xe05] = eax_60;
00616f79                  enum _IJLERR* var_58_5 = &result_1;
00616f7b                  enum _IJLERR result_4 = Encode_Frame_Init(ecx_2);
00616f83                  result_1 = result_4;
00616f83                  
00616f88                  if (result_4 == IJL_OK)
00616f88                  {
00616f8e                      ecx_2 = &arg1[0x16];
00616f91                      eax_48 = *(uint32_t*)ecx_2;
00616f91                      
00616f9b                      if ((eax_48 == 0xa || eax_48 == 0xb))
00616f9b                      {
00616fa1                          int32_t eax_61 = ecx_2[0xe01];
00616fa7                          ecx_2[0x12] = eax_61;
00616fad                          arg1[0xa] = eax_61;
00616fb0                          eax_48 = *(uint32_t*)ecx_2;
00616f9b                      }
00616f9b                      
00616f9b                      goto label_616e68;
00616f88                  }
00616e42              }
00616e42              else
00616e42              {
00616e48                  eax_48 = *(uint32_t*)ecx_2;
00616e68              label_616e68:
00616e68                  enum _IJLERR result_3;
00616e68                  
00616e68                  if ((((eax_48 == 8 || eax_48 == 9) || eax_48 == 0xc) || eax_48 == 0xd))
00616e68                  {
00616f09                      ecx_2[0x120d] = (((char*)ecx_2 + 0x4857) & 0xffffffe0);
00616f09                      
00616f17                      if (ecx_2[0x1378] == 0)
00616f17                      {
00616f4d                          enum _IJLERR* var_58_4 = &result_1;
00616f4f                          result_3 = Encode_Frame(ecx_2);
00616f57                          result_1 = result_3;
00616f17                      }
00616f17                      else
00616f17                      {
00616f19                          enum _IJLERR* var_58_3 = &result_1;
00616f1b                          result_3 = Encode_Frame_P(ecx_2);
00616f23                          result_1 = result_3;
00616f17                      }
00616f17                      
00616f26                      ecx_2 = &arg1[0x16];
00616f29                      ecx_2[0xdf7] = 1;
00616f36                      int32_t edx_32 = (var_48 + ecx_2[0xe01]);
00616f3c                      int32_t var_48_1 = edx_32;
00616f3f                      ecx_2[0x12] = edx_32;
00616f45                      arg1[0xa] = edx_32;
00616e68                  }
00616e68                  else
00616e6e                      result_3 = result_1;
00616e6e                  
00616e79                  if ((result_3 == IJL_INTERRUPT_OK || result_3 == IJL_ROI_OK))
00616e79                  {
00616ec5                      int32_t edx_27 = (((ecx_2[3] << 3) + 8) * ecx_2[0xdee]);
00616ecc                      ecx_2[3] = edx_27;
00616ecf                      int32_t eax_53 = ecx_2[0x13];
00616ecf                      
00616ed4                      if (edx_27 > eax_53)
00616ed6                          ecx_2[3] = eax_53;
00616ed6                      
00616ee3                      int32_t edx_29 = (((ecx_2[4] << 3) + 8) * ecx_2[0xdef]);
00616eea                      ecx_2[4] = edx_29;
00616eed                      int32_t eax_55 = ecx_2[0x14];
00616eed                      
00616ef2                      if (edx_29 > eax_55)
00616ef8                          ecx_2[4] = eax_55;
00616e79                  }
00616e79                  else
00616e79                  {
00616e7b                      void* eax_49 = ecx_2[0xe09];
00616e7b                      
00616e83                      if (eax_49 == 0)
00616eaf                          int32_t var_8_2 = 0xffffffff;
00616e83                      else
00616e83                      {
00616e85                          enum _IJLERR* var_58_2 = &result_1;
00616e87                          int32_t eax_50 = ownCloseFile(eax_49);
00616e8f                          int32_t var_40_1 = eax_50;
00616e8f                          
00616e94                          if (eax_50 != 0)
00616e94                          {
0061693e                              arg1[0xe1f] = 0;
00616eaf                              var_8_2 = 0xffffffff;
00616e94                          }
00616e94                          else
00616e96                              result_1 = 0xfffffff7;
00616e83                      }
00616e79                  }
00616e42              }
006172e6          }
00616960      }
00616960      
006170ca      if ((result_1 < IJL_OK && arg1[0xe1f] != 0))
006170ca      {
006170d9          enum _IJLERR* var_58_6 = &result_1;
006170db          ownCloseFile(arg1[0xe1f]);
006170e6          arg1[0xe1f] = 0;
006170ca      }
006170ca      
006169b8      int32_t edx_1 = arg1[0xe12];
006169be      int32_t var_3c = edx_1;
006169c1      *(uint32_t*)(edx_1 + 0x18)();
006169c4      enum _IJLERR result = result_1;
006169d6      *(uint32_t*)fsbase = var_14;
006169e0      return result;
00616900  }

00616fec                                      c7 45 fc ff ff ff ff e9 b2 f9 ff ff                                      .E..........
006170f5                                                                 8b 65 e8 c7 45 b0 ff ff ff ff e9                       .e..E......
00617100  e8 fe ff ff                                                                                      ....
00617302        b8 01 00 00 00 c3 90 8d b4 26 00 00 00 00                                                    .........&....

00617310  int32_t __stdcall _ijlErrorStr@4(int32_t arg1)

00617310  {
0061731a      if ((arg1 + 0x63) > 0x65)
00617452          return "Unknown error code";
00617452      
00617327      /* jump -> &data_9061ec[arg1] */
00617310  }

00617329                             b8 40 62 90 00 e9 1f 01 00 00 b8 20 62 90 00 e9 15 01 00 00 b8 00 62           .@b........ b.........b
00617340  90 00 e9 0b 01 00 00 b8 60 62 90 00 e9 01 01 00 00 b8 80 62 90 00 e9 f7 00 00 00 b8 a0 62 90 00  ........`b.........b.........b..
00617360  e9 ed 00 00 00 b8 c0 62 90 00 e9 e3 00 00 00 b8 e0 62 90 00 e9 d9 00 00 00 b8 00 63 90 00 e9 cf  .......b.........b.........c....
00617380  00 00 00 b8 20 63 90 00 e9 c5 00 00 00 b8 40 63 90 00 e9 bb 00 00 00 b8 60 63 90 00 e9 b1 00 00  .... c........@c........`c......
006173a0  00 b8 80 63 90 00 e9 a7 00 00 00 b8 a0 63 90 00 e9 9d 00 00 00 b8 c0 63 90 00 e9 93 00 00 00 b8  ...c.........c.........c........
006173c0  e0 63 90 00 e9 89 00 00 00 b8 00 64 90 00 e9 7f 00 00 00 b8 20 64 90 00 e9 75 00 00 00 b8 40 64  .c.........d........ d...u....@d
006173e0  90 00 eb 6e b8 60 64 90 00 eb 67 b8 80 64 90 00 eb 60 b8 a0 64 90 00 eb 59 b8 c0 64 90 00 eb 52  ...n.`d...g..d...`..d...Y..d...R
00617400  b8 e0 64 90 00 eb 4b b8 00 65 90 00 eb 44 b8 20 65 90 00 eb 3d b8 40 65 90 00 eb 36 b8 60 65 90  ..d...K..e...D. e...=.@e...6.`e.
00617420  00 eb 2f b8 80 65 90 00 eb 28 b8 a0 65 90 00 eb 21 b8 c0 65 90 00 eb 1a b8 e0 65 90 00 eb 13 b8  ../..e...(..e...!..e......e.....
00617440  00 66 90 00 eb 0c b8 40 66 90 00 eb 05                                                           .f.....@f....
00617455                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
00617460  data_617460:
00617460  57 56 56 8b 7c 24 10 8b 74 24 14 8b 4c 24 18 f3 a4 83 c4 04 5e 5f c3 8b f6 8d bc 27 00 00 00 00  WVV.|$..t$..L$......^_.....'....
00617480  data_617480:
00617480  57 8b 7c 24 08 8b 4c 24 0c 33 c0 f3 aa 5f c3 90                                                  W.|$..L$.3..._..

00617490  int32_t (__stdcall*)(struct HWND__*, char const*, char const*, uint32_t) sub_617490(void* arg1)

00617490  {
00617495      int32_t (__stdcall* result)(struct HWND__*, char const*, char const*, uint32_t) = *(uint32_t*)((char*)arg1 + 4);
00617495      
0061749a      if (result == 0)
0061749a      {
006174fc          result = LoadLibraryA("user32");
00617502          *(uint32_t*)((char*)arg1 + 4) = result;
00617502          
00617507          if (result != 0)
00617507              goto label_6174a2;
0061749a      }
0061749a      else
0061749a      {
006174a2      label_6174a2:
006174a2          result = kernel32_GetProcAddress_Ptr(result, "MessageBoxA");
006174a8          gpfnMessageBox = result;
006174a8          
006174af          if (result != 0)
006174af          {
006174ba              result = kernel32_GetProcAddress_Ptr(*(uint32_t*)((char*)arg1 + 4), "PeekMessageA");
006174c0              gpfnPeekMessage = result;
006174c0              
006174c7              if (result != 0)
006174c7              {
006174d2                  result = kernel32_GetProcAddress_Ptr(*(uint32_t*)((char*)arg1 + 4), "PostQuitMessage");
006174d8                  gpfnPostQuitMessage = result;
006174d8                  
006174df                  if (result != 0)
006174df                  {
006174ea                      result = kernel32_GetProcAddress_Ptr(*(uint32_t*)((char*)arg1 + 4), "wsprintfA");
006174f0                      gpfnwsprintf = result;
006174df                  }
006174c7              }
006174af          }
0061749a      }
0061749a      
006174f6      return result;
00617490  }

0061750b                                   90 8d 74 26 00                                                             ..t&.

00617510  void sub_617510(void* arg1)

00617510  {
00617517      if (arg1 != 0)
00617517      {
00617519          BOOL hLibModule = *(uint32_t*)((char*)arg1 + 4);
00617519          
0061751e          if (hLibModule != 0)
0061751e          {
00617521              FreeLibrary(hLibModule);
00617527              *(uint32_t*)((char*)arg1 + 4) = 0;
0061751e          }
0061751e          
00617530          gpfnMessageBox = nullptr;
00617535          gpfnPeekMessage = nullptr;
0061753a          gpfnPostQuitMessage = nullptr;
0061753f          gpfnwsprintf = nullptr;
00617517      }
00617510  }

00617546                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

00617550  HINSTANCE sub_617550(void* arg1)

00617550  {
00617555      HINSTANCE result = *(uint32_t*)((char*)arg1 + 8);
00617555      
0061755a      if (result == 0)
0061755a      {
0061759e          result = LoadLibraryA("advapi32");
006175a4          *(uint32_t*)((char*)arg1 + 8) = result;
006175a4          
006175a9          if (result != 0)
006175a9              goto label_617562;
0061755a      }
0061755a      else
0061755a      {
00617562      label_617562:
00617562          result = kernel32_GetProcAddress_Ptr(result, "RegOpenKeyExA");
00617568          *(uint32_t*)((char*)arg1 + 0xc) = result;
00617568          
0061756d          if (result != 0)
0061756d          {
00617578              result = kernel32_GetProcAddress_Ptr(*(uint32_t*)((char*)arg1 + 8), "RegQueryValueExA");
0061757e              *(uint32_t*)((char*)arg1 + 0x10) = result;
0061757e              
00617583              if (result != 0)
00617583              {
0061758e                  result = kernel32_GetProcAddress_Ptr(*(uint32_t*)((char*)arg1 + 8), "RegCloseKey");
00617594                  *(uint32_t*)((char*)arg1 + 0x14) = result;
00617583              }
0061756d          }
0061755a      }
0061755a      
00617598      return result;
00617550  }

006175ad                                         8d 76 00                                                               .v.

006175b0  void sub_6175b0(void* arg1)

006175b0  {
006175b7      if (arg1 != 0)
006175b7      {
006175b9          BOOL hLibModule = *(uint32_t*)((char*)arg1 + 8);
006175b9          
006175be          if (hLibModule != 0)
006175be          {
006175c1              FreeLibrary(hLibModule);
006175c7              *(uint32_t*)((char*)arg1 + 8) = 0;
006175be          }
006175be          
006175d0          *(uint32_t*)((char*)arg1 + 0xc) = 0;
006175d3          *(uint32_t*)((char*)arg1 + 0x10) = 0;
006175d6          *(uint32_t*)((char*)arg1 + 0x14) = 0;
006175b7      }
006175b0  }

006175db                                                                                   90 8d 74 26 00                             ..t&.

006175e0  void sub_6175e0(void* arg1)

006175e0  {
006175e4      *(uint32_t*)((char*)arg1 + 0x1c) = _fDCT8x8_AAN_PX;
006175f5      *(uint32_t*)((char*)arg1 + 0x20) = _fDCT8x8_IPP_PX;
006175fc      *(uint32_t*)((char*)arg1 + 0xfc) = _fQnt8x8_AAN_PX;
00617602      *(uint32_t*)((char*)arg1 + 0x100) = _fQnt8x8_IPP_PX;
0061760c      *(uint32_t*)((char*)arg1 + 0x104) = _fQnt8x8_AAN_PX;
00617612      *(uint32_t*)((char*)arg1 + 0xf0) = _EncodeHuffman8x8_PX;
0061761c      *(uint32_t*)((char*)arg1 + 0xf4) = _DecodeHuffman8x8_PX;
00617626      *(uint32_t*)((char*)arg1 + 0xf8) = Decode_Block_Thumb_PX;
00617630      *(uint32_t*)((char*)arg1 + 0x108) = _iQnt8x8_AAN_PX;
00617636      *(uint32_t*)((char*)arg1 + 0x10c) = _iQnt8x8_IPP_PX;
00617640      *(uint32_t*)((char*)arg1 + 0x110) = _iQnt8x8_AAN_PX;
00617646      *(uint32_t*)((char*)arg1 + 0x24) = _iDCT8x8_AAN_PX;
0061764d      *(uint32_t*)((char*)arg1 + 0x28) = _iDCT4x4_AAN_PX;
00617654      *(uint32_t*)((char*)arg1 + 0x2c) = _iDCT2x2_AAN_PX;
0061765b      *(uint32_t*)((char*)arg1 + 0x30) = _iDCT1x1_AAN_PX;
00617662      *(uint32_t*)((char*)arg1 + 0x34) = _iDCT8x8_IPP_PX;
00617669      *(uint32_t*)((char*)arg1 + 0x38) = _iDCT4x4_IPP_PX;
00617670      *(uint32_t*)((char*)arg1 + 0x3c) = _iDCT2x2_IPP_PX;
00617677      *(uint32_t*)((char*)arg1 + 0x40) = _iDCT1x1_IPP_PX;
0061767e      __builtin_memset(((char*)arg1 + 0x44), 0, 0x14);
006176a1      *(uint32_t*)((char*)arg1 + 0x58) = EB_Init_PX;
006176a8      *(uint32_t*)((char*)arg1 + 0x5c) = _EB_Write_Bytes_PX;
006176af      *(uint32_t*)((char*)arg1 + 0x60) = 0;
006176b6      *(uint32_t*)((char*)arg1 + 0x64) = _Y_to_Y_111_Full_MCU_PX;
006176bd      *(uint32_t*)((char*)arg1 + 0x68) = _RGB_to_YCbCr_111_Full_MCU_PX;
006176c4      *(uint32_t*)((char*)arg1 + 0x6c) = _RGB_to_YCbCr_422_Full_MCU_PX;
006176cb      *(uint32_t*)((char*)arg1 + 0x70) = _RGB_to_YCbCr_411_Full_MCU_PX;
006176d2      *(uint32_t*)((char*)arg1 + 0x74) = _BGR_to_YCbCr_111_Full_MCU_PX;
006176d9      *(uint32_t*)((char*)arg1 + 0x78) = _BGR_to_YCbCr_422_Full_MCU_PX;
006176e0      *(uint32_t*)((char*)arg1 + 0x7c) = _BGR_to_YCbCr_411_Full_MCU_PX;
006176e7      *(uint32_t*)((char*)arg1 + 0x80) = _OTHER_to_OTHER_111_Full_MCU;
006176f1      *(uint32_t*)((char*)arg1 + 0x84) = _OTHER_to_OTHER_422_Full_MCU;
006176fb      *(uint32_t*)((char*)arg1 + 0x88) = _OTHER_to_OTHER_411_Full_MCU;
00617705      *(uint32_t*)((char*)arg1 + 0x8c) = _YCbYCr_to_YCbCr_422_Full_MCU_PX;
0061770f      *(uint32_t*)((char*)arg1 + 0x90) = _RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_PX;
00617719      *(uint32_t*)((char*)arg1 + 0x94) = _RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_PX;
00617723      *(uint32_t*)((char*)arg1 + 0x98) = _RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_PX;
0061772d      *(uint32_t*)((char*)arg1 + 0x9c) = _OTHER_to_OTHER_1111_Full_MCU;
00617737      *(uint32_t*)((char*)arg1 + 0xa0) = 0;
00617741      *(uint32_t*)((char*)arg1 + 0xa4) = _Y_111_to_Y_Full_MCU_PX;
0061774b      *(uint32_t*)((char*)arg1 + 0xa8) = _YCbCr_111_to_RGB_Full_MCU_PX;
00617755      *(uint32_t*)((char*)arg1 + 0xac) = _YCbCr_422_to_RGB_Full_MCU_PX;
0061775f      *(uint32_t*)((char*)arg1 + 0xb0) = _YCbCr_411_to_RGB_Full_MCU_PX;
00617769      *(uint32_t*)((char*)arg1 + 0xb4) = _YCbCr_111_to_BGR_Full_MCU_PX;
00617773      *(uint32_t*)((char*)arg1 + 0xb8) = _YCbCr_422_to_BGR_Full_MCU_PX;
0061777d      *(uint32_t*)((char*)arg1 + 0xbc) = _YCbCr_411_to_BGR_Full_MCU_PX;
00617787      *(uint32_t*)((char*)arg1 + 0xc0) = _YCbCr_111_to_RGBA_FPX_Full_MCU_PX;
00617791      *(uint32_t*)((char*)arg1 + 0xc4) = _YCbCr_422_to_RGBA_FPX_Full_MCU_PX;
0061779b      *(uint32_t*)((char*)arg1 + 0xc8) = _YCbCr_411_to_RGBA_FPX_Full_MCU_PX;
006177a5      *(uint32_t*)((char*)arg1 + 0xcc) = _OTHER_111_to_OTHER_Full_MCU_PX;
006177af      *(uint32_t*)((char*)arg1 + 0xd0) = _OTHER_422_to_OTHER_Full_MCU_PX;
006177b9      *(uint32_t*)((char*)arg1 + 0xd4) = _OTHER_411_to_OTHER_Full_MCU_PX;
006177c3      *(uint32_t*)((char*)arg1 + 0xd8) = _OTHER_111_to_OTHER4_Full_MCU_PX;
006177cd      *(uint32_t*)((char*)arg1 + 0xdc) = _YCbCr_422_to_YCbYCr_Full_MCU_PX;
006177d7      *(uint32_t*)((char*)arg1 + 0xe0) = _YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_PX;
006177e1      *(uint32_t*)((char*)arg1 + 0xe4) = _YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_PX;
006177eb      *(uint32_t*)((char*)arg1 + 0xe8) = _YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_PX;
006177f5      *(uint32_t*)((char*)arg1 + 0xec) = _OTHER_1111_to_OTHER_Full_MCU_PX;
006177ff      *(uint32_t*)((char*)arg1 + 0x18) = _ownEMMSs;
006175e0  }

00617807                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00617810  void sub_617810(void* arg1)

00617810  {
00617814      *(uint32_t*)((char*)arg1 + 0x1c) = _fDCT8x8_AAN_M5;
00617825      *(uint32_t*)((char*)arg1 + 0x20) = _fDCT8x8_IPP_M5;
0061782c      *(uint32_t*)((char*)arg1 + 0xfc) = _fQnt8x8_AAN_M5;
00617832      *(uint32_t*)((char*)arg1 + 0x100) = _fQnt8x8_IPP_M5;
0061783c      *(uint32_t*)((char*)arg1 + 0x104) = _fQnt8x8_AAN_M5;
00617842      *(uint32_t*)((char*)arg1 + 0xf0) = _EncodeHuffman8x8_M5;
0061784c      *(uint32_t*)((char*)arg1 + 0xf4) = _DecodeHuffman8x8_M5;
00617856      *(uint32_t*)((char*)arg1 + 0xf8) = Decode_Block_Skip_M5;
00617860      *(uint32_t*)((char*)arg1 + 0x108) = _iQnt8x8_AAN_PX;
00617866      *(uint32_t*)((char*)arg1 + 0x10c) = _iQnt8x8_IPP_M5;
00617870      *(uint32_t*)((char*)arg1 + 0x110) = _iQnt8x8_AAN_PX;
00617876      *(uint32_t*)((char*)arg1 + 0x24) = _iDCT8x8_AAN_M5;
0061787d      *(uint32_t*)((char*)arg1 + 0x28) = _iDCT4x4_AAN_PX;
00617884      *(uint32_t*)((char*)arg1 + 0x2c) = _iDCT2x2_AAN_PX;
0061788b      *(uint32_t*)((char*)arg1 + 0x30) = _iDCT1x1_AAN_PX;
00617892      *(uint32_t*)((char*)arg1 + 0x34) = _iDCT8x8_IPP_M5;
00617899      *(uint32_t*)((char*)arg1 + 0x38) = _iDCT4x4_IPP_PX;
006178a0      *(uint32_t*)((char*)arg1 + 0x3c) = _iDCT2x2_IPP_PX;
006178a7      *(uint32_t*)((char*)arg1 + 0x40) = _iDCT1x1_IPP_PX;
006178ae      __builtin_memset(((char*)arg1 + 0x44), 0, 0x14);
006178d1      *(uint32_t*)((char*)arg1 + 0x58) = EB_Init_M5;
006178d8      *(uint32_t*)((char*)arg1 + 0x5c) = _EB_Write_Bytes_M5;
006178df      *(uint32_t*)((char*)arg1 + 0x60) = 0;
006178e6      *(uint32_t*)((char*)arg1 + 0x64) = _Y_to_Y_111_Full_MCU_M5;
006178ed      *(uint32_t*)((char*)arg1 + 0x68) = _RGB_to_YCbCr_111_Full_MCU_M5;
006178f4      *(uint32_t*)((char*)arg1 + 0x6c) = _RGB_to_YCbCr_422_Full_MCU_M5;
006178fb      *(uint32_t*)((char*)arg1 + 0x70) = _RGB_to_YCbCr_411_Full_MCU_M5;
00617902      *(uint32_t*)((char*)arg1 + 0x74) = _BGR_to_YCbCr_111_Full_MCU_M5;
00617909      *(uint32_t*)((char*)arg1 + 0x78) = _BGR_to_YCbCr_422_Full_MCU_M5;
00617910      *(uint32_t*)((char*)arg1 + 0x7c) = _BGR_to_YCbCr_411_Full_MCU_M5;
00617917      *(uint32_t*)((char*)arg1 + 0x80) = _OTHER_to_OTHER_111_Full_MCU;
00617921      *(uint32_t*)((char*)arg1 + 0x84) = _OTHER_to_OTHER_422_Full_MCU;
0061792b      *(uint32_t*)((char*)arg1 + 0x88) = _OTHER_to_OTHER_411_Full_MCU;
00617935      *(uint32_t*)((char*)arg1 + 0x8c) = _YCbYCr_to_YCbCr_422_Full_MCU_M5;
0061793f      *(uint32_t*)((char*)arg1 + 0x90) = _RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5;
00617949      *(uint32_t*)((char*)arg1 + 0x94) = _RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5;
00617953      *(uint32_t*)((char*)arg1 + 0x98) = _RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5;
0061795d      *(uint32_t*)((char*)arg1 + 0x9c) = _OTHER_to_OTHER_1111_Full_MCU;
00617967      *(uint32_t*)((char*)arg1 + 0xa0) = 0;
00617971      *(uint32_t*)((char*)arg1 + 0xa4) = _Y_111_to_Y_Full_MCU_M5;
0061797b      *(uint32_t*)((char*)arg1 + 0xa8) = _YCbCr_111_to_RGB_Full_MCU_M5;
00617985      *(uint32_t*)((char*)arg1 + 0xac) = _YCbCr_422_to_RGB_Full_MCU_M5;
0061798f      *(uint32_t*)((char*)arg1 + 0xb0) = _YCbCr_411_to_RGB_Full_MCU_M5;
00617999      *(uint32_t*)((char*)arg1 + 0xb4) = _YCbCr_111_to_BGR_Full_MCU_M5;
006179a3      *(uint32_t*)((char*)arg1 + 0xb8) = _YCbCr_422_to_BGR_Full_MCU_M5;
006179ad      *(uint32_t*)((char*)arg1 + 0xbc) = _YCbCr_411_to_BGR_Full_MCU_M5;
006179b7      *(uint32_t*)((char*)arg1 + 0xc0) = _YCbCr_111_to_RGBA_FPX_Full_MCU_M5;
006179c1      *(uint32_t*)((char*)arg1 + 0xc4) = _YCbCr_422_to_RGBA_FPX_Full_MCU_M5;
006179cb      *(uint32_t*)((char*)arg1 + 0xc8) = _YCbCr_411_to_RGBA_FPX_Full_MCU_M5;
006179d5      *(uint32_t*)((char*)arg1 + 0xcc) = _OTHER_111_to_OTHER_Full_MCU_PX;
006179df      *(uint32_t*)((char*)arg1 + 0xd0) = _OTHER_422_to_OTHER_Full_MCU_PX;
006179e9      *(uint32_t*)((char*)arg1 + 0xd4) = _OTHER_411_to_OTHER_Full_MCU_PX;
006179f3      *(uint32_t*)((char*)arg1 + 0xd8) = _OTHER_111_to_OTHER4_Full_MCU_PX;
006179fd      *(uint32_t*)((char*)arg1 + 0xdc) = _YCbCr_422_to_YCbYCr_Full_MCU_M5;
00617a07      *(uint32_t*)((char*)arg1 + 0xe0) = _YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5;
00617a11      *(uint32_t*)((char*)arg1 + 0xe4) = _YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5;
00617a1b      *(uint32_t*)((char*)arg1 + 0xe8) = _YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5;
00617a25      *(uint32_t*)((char*)arg1 + 0xec) = _OTHER_1111_to_OTHER_Full_MCU_PX;
00617a2f      *(uint32_t*)((char*)arg1 + 0x18) = _ownEMMSh;
00617810  }

00617a37                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00617a40  void sub_617a40(void* arg1)

00617a40  {
00617a44      *(uint32_t*)((char*)arg1 + 0x1c) = _fDCT8x8_AAN_M5;
00617a55      *(uint32_t*)((char*)arg1 + 0x20) = _fDCT8x8_IPP_M5;
00617a5c      *(uint32_t*)((char*)arg1 + 0xfc) = _fQnt8x8_AAN_M5;
00617a62      *(uint32_t*)((char*)arg1 + 0x100) = _fQnt8x8_IPP_M5;
00617a6c      *(uint32_t*)((char*)arg1 + 0x104) = _fQnt8x8_AAN_M5;
00617a72      *(uint32_t*)((char*)arg1 + 0xf0) = _EncodeHuffman8x8_M5;
00617a7c      *(uint32_t*)((char*)arg1 + 0xf4) = _DecodeHuffman8x8_M6;
00617a86      *(uint32_t*)((char*)arg1 + 0xf8) = Decode_Block_Skip_M5;
00617a90      *(uint32_t*)((char*)arg1 + 0x108) = _iQnt8x8_AAN_PX;
00617a96      *(uint32_t*)((char*)arg1 + 0x10c) = _iQnt8x8_IPP_M5;
00617aa0      *(uint32_t*)((char*)arg1 + 0x110) = _iQnt8x8_AAN_PX;
00617aa6      *(uint32_t*)((char*)arg1 + 0x24) = _iDCT8x8_AAN_M5;
00617aad      *(uint32_t*)((char*)arg1 + 0x28) = _iDCT4x4_AAN_PX;
00617ab4      *(uint32_t*)((char*)arg1 + 0x2c) = _iDCT2x2_AAN_PX;
00617abb      *(uint32_t*)((char*)arg1 + 0x30) = _iDCT1x1_AAN_PX;
00617ac2      *(uint32_t*)((char*)arg1 + 0x34) = _iDCT8x8_IPP_M5;
00617ac9      *(uint32_t*)((char*)arg1 + 0x38) = _iDCT4x4_IPP_PX;
00617ad0      *(uint32_t*)((char*)arg1 + 0x3c) = _iDCT2x2_IPP_PX;
00617ad7      *(uint32_t*)((char*)arg1 + 0x40) = _iDCT1x1_IPP_PX;
00617ade      __builtin_memset(((char*)arg1 + 0x44), 0, 0x14);
00617b01      *(uint32_t*)((char*)arg1 + 0x58) = EB_Init_M5;
00617b08      *(uint32_t*)((char*)arg1 + 0x5c) = _EB_Write_Bytes_M5;
00617b0f      *(uint32_t*)((char*)arg1 + 0x60) = 0;
00617b16      *(uint32_t*)((char*)arg1 + 0x64) = _Y_to_Y_111_Full_MCU_M5;
00617b1d      *(uint32_t*)((char*)arg1 + 0x68) = _RGB_to_YCbCr_111_Full_MCU_M5;
00617b24      *(uint32_t*)((char*)arg1 + 0x6c) = _RGB_to_YCbCr_422_Full_MCU_M5;
00617b2b      *(uint32_t*)((char*)arg1 + 0x70) = _RGB_to_YCbCr_411_Full_MCU_M5;
00617b32      *(uint32_t*)((char*)arg1 + 0x74) = _BGR_to_YCbCr_111_Full_MCU_M5;
00617b39      *(uint32_t*)((char*)arg1 + 0x78) = _BGR_to_YCbCr_422_Full_MCU_M5;
00617b40      *(uint32_t*)((char*)arg1 + 0x7c) = _BGR_to_YCbCr_411_Full_MCU_M5;
00617b47      *(uint32_t*)((char*)arg1 + 0x80) = _OTHER_to_OTHER_111_Full_MCU;
00617b51      *(uint32_t*)((char*)arg1 + 0x84) = _OTHER_to_OTHER_422_Full_MCU;
00617b5b      *(uint32_t*)((char*)arg1 + 0x88) = _OTHER_to_OTHER_411_Full_MCU;
00617b65      *(uint32_t*)((char*)arg1 + 0x8c) = _YCbYCr_to_YCbCr_422_Full_MCU_M5;
00617b6f      *(uint32_t*)((char*)arg1 + 0x90) = _RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5;
00617b79      *(uint32_t*)((char*)arg1 + 0x94) = _RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5;
00617b83      *(uint32_t*)((char*)arg1 + 0x98) = _RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5;
00617b8d      *(uint32_t*)((char*)arg1 + 0x9c) = _OTHER_to_OTHER_1111_Full_MCU;
00617b97      *(uint32_t*)((char*)arg1 + 0xa0) = 0;
00617ba1      *(uint32_t*)((char*)arg1 + 0xa4) = _Y_111_to_Y_Full_MCU_M5;
00617bab      *(uint32_t*)((char*)arg1 + 0xa8) = _YCbCr_111_to_RGB_Full_MCU_M5;
00617bb5      *(uint32_t*)((char*)arg1 + 0xac) = _YCbCr_422_to_RGB_Full_MCU_M5;
00617bbf      *(uint32_t*)((char*)arg1 + 0xb0) = _YCbCr_411_to_RGB_Full_MCU_M5;
00617bc9      *(uint32_t*)((char*)arg1 + 0xb4) = _YCbCr_111_to_BGR_Full_MCU_M5;
00617bd3      *(uint32_t*)((char*)arg1 + 0xb8) = _YCbCr_422_to_BGR_Full_MCU_M5;
00617bdd      *(uint32_t*)((char*)arg1 + 0xbc) = _YCbCr_411_to_BGR_Full_MCU_M5;
00617be7      *(uint32_t*)((char*)arg1 + 0xc0) = _YCbCr_111_to_RGBA_FPX_Full_MCU_M5;
00617bf1      *(uint32_t*)((char*)arg1 + 0xc4) = _YCbCr_422_to_RGBA_FPX_Full_MCU_M5;
00617bfb      *(uint32_t*)((char*)arg1 + 0xc8) = _YCbCr_411_to_RGBA_FPX_Full_MCU_M5;
00617c05      *(uint32_t*)((char*)arg1 + 0xcc) = _OTHER_111_to_OTHER_Full_MCU_PX;
00617c0f      *(uint32_t*)((char*)arg1 + 0xd0) = _OTHER_422_to_OTHER_Full_MCU_PX;
00617c19      *(uint32_t*)((char*)arg1 + 0xd4) = _OTHER_411_to_OTHER_Full_MCU_PX;
00617c23      *(uint32_t*)((char*)arg1 + 0xd8) = _OTHER_111_to_OTHER4_Full_MCU_PX;
00617c2d      *(uint32_t*)((char*)arg1 + 0xdc) = _YCbCr_422_to_YCbYCr_Full_MCU_M5;
00617c37      *(uint32_t*)((char*)arg1 + 0xe0) = _YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5;
00617c41      *(uint32_t*)((char*)arg1 + 0xe4) = _YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5;
00617c4b      *(uint32_t*)((char*)arg1 + 0xe8) = _YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5;
00617c55      *(uint32_t*)((char*)arg1 + 0xec) = _OTHER_1111_to_OTHER_Full_MCU_PX;
00617c5f      *(uint32_t*)((char*)arg1 + 0x18) = _ownEMMSh;
00617a40  }

00617c67                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00617c70  void sub_617c70(void* arg1)

00617c70  {
00617c74      *(uint32_t*)((char*)arg1 + 0x1c) = _fDCT8x8_AAN_M5;
00617c85      *(uint32_t*)((char*)arg1 + 0x20) = _fDCT8x8_IPP_A6;
00617c8c      *(uint32_t*)((char*)arg1 + 0xfc) = _fQnt8x8_AAN_M5;
00617c92      *(uint32_t*)((char*)arg1 + 0x100) = _fQnt8x8_IPP_A6;
00617c9c      *(uint32_t*)((char*)arg1 + 0x104) = _fQnt8x8_AAN_M5;
00617ca2      *(uint32_t*)((char*)arg1 + 0xf0) = _EncodeHuffman8x8_A6;
00617cac      *(uint32_t*)((char*)arg1 + 0xf4) = _DecodeHuffman8x8_M6;
00617cb6      *(uint32_t*)((char*)arg1 + 0xf8) = Decode_Block_Skip_M5;
00617cc0      *(uint32_t*)((char*)arg1 + 0x108) = _iQnt8x8_AAN_PX;
00617cc6      *(uint32_t*)((char*)arg1 + 0x10c) = _iQnt8x8_IPP_M5;
00617cd0      *(uint32_t*)((char*)arg1 + 0x110) = _iQnt8x8_AAN_PX;
00617cd6      *(uint32_t*)((char*)arg1 + 0x24) = _iDCT8x8_AAN_M5;
00617cdd      *(uint32_t*)((char*)arg1 + 0x28) = _iDCT4x4_AAN_PX;
00617ce4      *(uint32_t*)((char*)arg1 + 0x2c) = _iDCT2x2_AAN_PX;
00617ceb      *(uint32_t*)((char*)arg1 + 0x30) = _iDCT1x1_AAN_PX;
00617cf2      *(uint32_t*)((char*)arg1 + 0x34) = _iDCT8x8_IPP_A6;
00617cf9      *(uint32_t*)((char*)arg1 + 0x38) = _iDCT4x4_IPP_PX;
00617d00      *(uint32_t*)((char*)arg1 + 0x3c) = _iDCT2x2_IPP_PX;
00617d07      *(uint32_t*)((char*)arg1 + 0x40) = _iDCT1x1_IPP_PX;
00617d0e      __builtin_memset(((char*)arg1 + 0x44), 0, 0x14);
00617d31      *(uint32_t*)((char*)arg1 + 0x58) = EB_Init_M5;
00617d38      *(uint32_t*)((char*)arg1 + 0x5c) = _EB_Write_Bytes_M5;
00617d3f      *(uint32_t*)((char*)arg1 + 0x60) = 0;
00617d46      *(uint32_t*)((char*)arg1 + 0x64) = _Y_to_Y_111_Full_MCU_M5;
00617d4d      *(uint32_t*)((char*)arg1 + 0x68) = _RGB_to_YCbCr_111_Full_MCU_M5;
00617d54      *(uint32_t*)((char*)arg1 + 0x6c) = _RGB_to_YCbCr_422_Full_MCU_M5;
00617d5b      *(uint32_t*)((char*)arg1 + 0x70) = _RGB_to_YCbCr_411_Full_MCU_M5;
00617d62      *(uint32_t*)((char*)arg1 + 0x74) = _BGR_to_YCbCr_111_Full_MCU_M5;
00617d69      *(uint32_t*)((char*)arg1 + 0x78) = _BGR_to_YCbCr_422_Full_MCU_M5;
00617d70      *(uint32_t*)((char*)arg1 + 0x7c) = _BGR_to_YCbCr_411_Full_MCU_M5;
00617d77      *(uint32_t*)((char*)arg1 + 0x80) = _OTHER_to_OTHER_111_Full_MCU;
00617d81      *(uint32_t*)((char*)arg1 + 0x84) = _OTHER_to_OTHER_422_Full_MCU;
00617d8b      *(uint32_t*)((char*)arg1 + 0x88) = _OTHER_to_OTHER_411_Full_MCU;
00617d95      *(uint32_t*)((char*)arg1 + 0x8c) = _YCbYCr_to_YCbCr_422_Full_MCU_A6;
00617d9f      *(uint32_t*)((char*)arg1 + 0x90) = _RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5;
00617da9      *(uint32_t*)((char*)arg1 + 0x94) = _RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5;
00617db3      *(uint32_t*)((char*)arg1 + 0x98) = _RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5;
00617dbd      *(uint32_t*)((char*)arg1 + 0x9c) = _OTHER_to_OTHER_1111_Full_MCU;
00617dc7      *(uint32_t*)((char*)arg1 + 0xa0) = 0;
00617dd1      *(uint32_t*)((char*)arg1 + 0xa4) = _Y_111_to_Y_Full_MCU_M5;
00617ddb      *(uint32_t*)((char*)arg1 + 0xa8) = _YCbCr_111_to_RGB_Full_MCU_M5;
00617de5      *(uint32_t*)((char*)arg1 + 0xac) = _YCbCr_422_to_RGB_Full_MCU_A6;
00617def      *(uint32_t*)((char*)arg1 + 0xb0) = _YCbCr_411_to_RGB_Full_MCU_M5;
00617df9      *(uint32_t*)((char*)arg1 + 0xb4) = _YCbCr_111_to_BGR_Full_MCU_M5;
00617e03      *(uint32_t*)((char*)arg1 + 0xb8) = _YCbCr_422_to_BGR_Full_MCU_A6;
00617e0d      *(uint32_t*)((char*)arg1 + 0xbc) = _YCbCr_411_to_BGR_Full_MCU_M5;
00617e17      *(uint32_t*)((char*)arg1 + 0xc0) = _YCbCr_111_to_RGBA_FPX_Full_MCU_M5;
00617e21      *(uint32_t*)((char*)arg1 + 0xc4) = _YCbCr_422_to_RGBA_FPX_Full_MCU_M5;
00617e2b      *(uint32_t*)((char*)arg1 + 0xc8) = _YCbCr_411_to_RGBA_FPX_Full_MCU_M5;
00617e35      *(uint32_t*)((char*)arg1 + 0xcc) = _OTHER_111_to_OTHER_Full_MCU_PX;
00617e3f      *(uint32_t*)((char*)arg1 + 0xd0) = _OTHER_422_to_OTHER_Full_MCU_PX;
00617e49      *(uint32_t*)((char*)arg1 + 0xd4) = _OTHER_411_to_OTHER_Full_MCU_PX;
00617e53      *(uint32_t*)((char*)arg1 + 0xd8) = _OTHER_111_to_OTHER4_Full_MCU_PX;
00617e5d      *(uint32_t*)((char*)arg1 + 0xdc) = _YCbCr_422_to_YCbYCr_Full_MCU_M5;
00617e67      *(uint32_t*)((char*)arg1 + 0xe0) = _YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5;
00617e71      *(uint32_t*)((char*)arg1 + 0xe4) = _YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5;
00617e7b      *(uint32_t*)((char*)arg1 + 0xe8) = _YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5;
00617e85      *(uint32_t*)((char*)arg1 + 0xec) = _OTHER_1111_to_OTHER_Full_MCU_PX;
00617e8f      *(uint32_t*)((char*)arg1 + 0x18) = _ownEMMSh;
00617c70  }

00617e97                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00617ea0  void sub_617ea0(void* arg1)

00617ea0  {
00617ea4      *(uint32_t*)((char*)arg1 + 0x1c) = _fDCT8x8_AAN_M5;
00617eb5      *(uint32_t*)((char*)arg1 + 0x20) = _fDCT8x8_IPP_W7;
00617ebc      *(uint32_t*)((char*)arg1 + 0xfc) = _fQnt8x8_AAN_M5;
00617ec2      *(uint32_t*)((char*)arg1 + 0x100) = _fQnt8x8_IPP_W7;
00617ecc      *(uint32_t*)((char*)arg1 + 0x104) = _fQnt8x8_AAN_M5;
00617ed2      *(uint32_t*)((char*)arg1 + 0xf0) = _EncodeHuffman8x8_M5;
00617edc      *(uint32_t*)((char*)arg1 + 0xf4) = _DecodeHuffman8x8_M6;
00617ee6      *(uint32_t*)((char*)arg1 + 0xf8) = Decode_Block_Skip_M5;
00617ef0      *(uint32_t*)((char*)arg1 + 0x108) = _iQnt8x8_AAN_PX;
00617ef6      *(uint32_t*)((char*)arg1 + 0x10c) = _iQnt8x8_IPP_W7;
00617f00      *(uint32_t*)((char*)arg1 + 0x110) = _iQnt8x8_AAN_PX;
00617f06      *(uint32_t*)((char*)arg1 + 0x24) = _iDCT8x8_AAN_M5;
00617f0d      *(uint32_t*)((char*)arg1 + 0x28) = _iDCT4x4_AAN_PX;
00617f14      *(uint32_t*)((char*)arg1 + 0x2c) = _iDCT2x2_AAN_PX;
00617f1b      *(uint32_t*)((char*)arg1 + 0x30) = _iDCT1x1_AAN_PX;
00617f22      *(uint32_t*)((char*)arg1 + 0x34) = _iDCT8x8_IPP_W7;
00617f29      *(uint32_t*)((char*)arg1 + 0x38) = _iDCT4x4_IPP_PX;
00617f30      *(uint32_t*)((char*)arg1 + 0x3c) = _iDCT2x2_IPP_PX;
00617f37      *(uint32_t*)((char*)arg1 + 0x40) = _iDCT1x1_IPP_PX;
00617f3e      __builtin_memset(((char*)arg1 + 0x44), 0, 0x14);
00617f61      *(uint32_t*)((char*)arg1 + 0x58) = EB_Init_M5;
00617f68      *(uint32_t*)((char*)arg1 + 0x5c) = _EB_Write_Bytes_M5;
00617f6f      *(uint32_t*)((char*)arg1 + 0x60) = 0;
00617f76      *(uint32_t*)((char*)arg1 + 0x64) = _Y_to_Y_111_Full_MCU_M5;
00617f7d      *(uint32_t*)((char*)arg1 + 0x68) = _RGB_to_YCbCr_111_Full_MCU_M5;
00617f84      *(uint32_t*)((char*)arg1 + 0x6c) = _RGB_to_YCbCr_422_Full_MCU_M5;
00617f8b      *(uint32_t*)((char*)arg1 + 0x70) = _RGB_to_YCbCr_411_Full_MCU_M5;
00617f92      *(uint32_t*)((char*)arg1 + 0x74) = _BGR_to_YCbCr_111_Full_MCU_M5;
00617f99      *(uint32_t*)((char*)arg1 + 0x78) = _BGR_to_YCbCr_422_Full_MCU_M5;
00617fa0      *(uint32_t*)((char*)arg1 + 0x7c) = _BGR_to_YCbCr_411_Full_MCU_M5;
00617fa7      *(uint32_t*)((char*)arg1 + 0x80) = _OTHER_to_OTHER_111_Full_MCU;
00617fb1      *(uint32_t*)((char*)arg1 + 0x84) = _OTHER_to_OTHER_422_Full_MCU;
00617fbb      *(uint32_t*)((char*)arg1 + 0x88) = _OTHER_to_OTHER_411_Full_MCU;
00617fc5      *(uint32_t*)((char*)arg1 + 0x8c) = _YCbYCr_to_YCbCr_422_Full_MCU_A6;
00617fcf      *(uint32_t*)((char*)arg1 + 0x90) = _RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5;
00617fd9      *(uint32_t*)((char*)arg1 + 0x94) = _RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5;
00617fe3      *(uint32_t*)((char*)arg1 + 0x98) = _RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5;
00617fed      *(uint32_t*)((char*)arg1 + 0x9c) = _OTHER_to_OTHER_1111_Full_MCU;
00617ff7      *(uint32_t*)((char*)arg1 + 0xa0) = 0;
00618001      *(uint32_t*)((char*)arg1 + 0xa4) = _Y_111_to_Y_Full_MCU_M5;
0061800b      *(uint32_t*)((char*)arg1 + 0xa8) = _YCbCr_111_to_RGB_Full_MCU_M5;
00618015      *(uint32_t*)((char*)arg1 + 0xac) = _YCbCr_422_to_RGB_Full_MCU_A6;
0061801f      *(uint32_t*)((char*)arg1 + 0xb0) = _YCbCr_411_to_RGB_Full_MCU_M5;
00618029      *(uint32_t*)((char*)arg1 + 0xb4) = _YCbCr_111_to_BGR_Full_MCU_M5;
00618033      *(uint32_t*)((char*)arg1 + 0xb8) = _YCbCr_422_to_BGR_Full_MCU_A6;
0061803d      *(uint32_t*)((char*)arg1 + 0xbc) = _YCbCr_411_to_BGR_Full_MCU_M5;
00618047      *(uint32_t*)((char*)arg1 + 0xc0) = _YCbCr_111_to_RGBA_FPX_Full_MCU_M5;
00618051      *(uint32_t*)((char*)arg1 + 0xc4) = _YCbCr_422_to_RGBA_FPX_Full_MCU_M5;
0061805b      *(uint32_t*)((char*)arg1 + 0xc8) = _YCbCr_411_to_RGBA_FPX_Full_MCU_M5;
00618065      *(uint32_t*)((char*)arg1 + 0xcc) = _OTHER_111_to_OTHER_Full_MCU_PX;
0061806f      *(uint32_t*)((char*)arg1 + 0xd0) = _OTHER_422_to_OTHER_Full_MCU_PX;
00618079      *(uint32_t*)((char*)arg1 + 0xd4) = _OTHER_411_to_OTHER_Full_MCU_PX;
00618083      *(uint32_t*)((char*)arg1 + 0xd8) = _OTHER_111_to_OTHER4_Full_MCU_PX;
0061808d      *(uint32_t*)((char*)arg1 + 0xdc) = _YCbCr_422_to_YCbYCr_Full_MCU_M5;
00618097      *(uint32_t*)((char*)arg1 + 0xe0) = _YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5;
006180a1      *(uint32_t*)((char*)arg1 + 0xe4) = _YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5;
006180ab      *(uint32_t*)((char*)arg1 + 0xe8) = _YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5;
006180b5      *(uint32_t*)((char*)arg1 + 0xec) = _OTHER_1111_to_OTHER_Full_MCU_PX;
006180bf      *(uint32_t*)((char*)arg1 + 0x18) = _ownEMMSh;
00617ea0  }

006180c7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

006180d0  int32_t _ownQueryProcessorType(void* arg1)

006180d0  {
006180df      int32_t eax = *(uint32_t*)((char*)arg1 + 0xc);
006180df      
006180f2      if ((eax == 0 || (*(uint32_t*)((char*)arg1 + 0x10) == 0 || *(uint32_t*)((char*)arg1 + 0x14) == 0)))
00618165          return 0xffffffff;
00618165      
00618101      int32_t var_1c = 4;
00618104      int32_t var_18 = 4;
00618108      int32_t var_14 = 0;
00618110      int32_t result = 0xffffffff;
00618110      
00618126      if (eax(0x80000002, "Software\Intel Corporation\PLSui…", 0, 1, &var_14) == 0)
00618144          *(uint32_t*)((char*)arg1 + 0x10)(var_14, usecpu, 0, &var_1c, &result, &var_18);
00618144      
00618147      int32_t eax_2 = var_14;
00618147      
0061814d      if (eax_2 == 0)
00618159          return result;
00618159      
00618150      *(uint32_t*)((char*)arg1 + 0x14)(eax_2);
00618153      return result;
006180d0  }

00618166                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

00618170  int32_t _ownInitializeLibrary(struct _IJL_CONTEXT* arg1)

00618170  {
0061817c      sub_617490(arg1);
00618184      sub_617550(arg1);
0061818c      enum _PROCESSOR_TYPE eax = ownGetProcessorType(arg1);
00618193      ownGetProcessorInfo();
00618198      __g_memcpy = &data_617460;
006181a5      bool cond:0 = (((int8_t)data_8f75d4) & 0x10) == 0;
006181a8      __g_memzero = &data_617480;
006181a8      
006181b2      if (cond:0)
006181c0          __g_rdtsc = _ownRDTSCs;
006181b2      else
006181b4          __g_rdtsc = _ownRDTSCh;
006181b4      
006181cd      if (eax == IJL_PENTIUM_PROC)
00618230          sub_6175e0(arg1);
006181cd      else if (eax == IJL_PENTIUM_PRO_PROC)
00618226          sub_6175e0(arg1);
006181d2      else if (eax == IJL_PENTIUM_PROC_MMX_TECH)
0061821c          sub_617810(arg1);
006181d7      else if (eax == IJL_PENTIUM_II_PROC)
00618209          sub_617a40(arg1);
006181dc      else if (eax == IJL_PENTIUM_III_PROC)
006181e6          sub_617c70(arg1);
006181e1      else if (eax != IJL_PENTIUM_4_PROC)
006181ff          sub_6175e0(arg1);
006181f0      else
006181f5          sub_617ea0(arg1);
006181f5      
00618218      return 1;
00618170  }

00618237                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00618240  int32_t _ownFreeLibrary(void* arg1)

00618240  {
0061824b      sub_617510(arg1);
0061825c      return sub_6175b0(arg1);
00618240  }

0061825d                                                                                         8d 76 00                               .v.

00618260  int32_t _ownRDTSCs()

00618260  {
00618264      return 0;
00618260  }

00618265                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....

00618270  int32_t _ownEMMSs()

00618270  {
00618270      return;
00618270  }

00618271                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

00618280  int32_t sub_618280()

00618280  {
00618283      int32_t var_8 = 0xffffffff;
00618285      int32_t var_c = 0x90682c;
0061828a      int32_t (* var_10)() = j__except_handler3;
00618295      TEB* fsbase;
00618295      int32_t var_14 = *(uint32_t*)fsbase;
00618296      *(uint32_t*)fsbase = &var_14;
006182a0      int32_t var_34;
006182a0      int32_t* var_1c = &var_34;
006182ac      int32_t var_8_1 = 0;
006182b5      int32_t result;
006182b5      result = 0x20;
006182b7      data_8f75d8 = 0x20;
006182bc      data_8f75d9 = 0x20;
006182c1      data_8f75da = 0x20;
006182c6      data_8f75db = 0x20;
006182cb      data_8f75dc = 0x20;
006182d0      data_8f75dd = 0x20;
006182d5      data_8f75de = 0x20;
006182da      data_8f75df = 0x20;
006182df      data_8f75e0 = 0x20;
006182e4      data_8f75e1 = 0x20;
006182e9      data_8f75e2 = 0x20;
006182ee      data_8f75e3 = 0x20;
006182f3      var_34 = 0xc;
006182fa      data_8f75e4 = 0;
00618300      data_8f75c0 = 0;
00618306      data_8f75c4 = 0;
0061830c      data_8f75c8 = 0;
00618312      data_8f75cc = 0;
00618318      data_8f75d0 = 0;
0061831e      data_8f75d4 = 0;
00618324      int32_t* var_38 = &var_34;
0061832a      int32_t ecx;
0061832a      _own_detect_processor_ia32(result, 0, ecx, &data_8f75c0);
00618332      int32_t var_8_2 = 0xffffffff;
00618348      *(uint32_t*)fsbase = var_14;
00618352      return result;
00618280  }

00618353                                                           8b 65 e8 33 d2 89 15 c0 75 8f 00 89 15                     .e.3....u....
00618360  c4 75 8f 00 89 15 c8 75 8f 00 89 15 cc 75 8f 00 89 15 d0 75 8f 00 89 15 d4 75 8f 00 b0 20 a2 d8  .u.....u.....u.....u.....u... ..
00618380  75 8f 00 a2 d9 75 8f 00 a2 da 75 8f 00 a2 db 75 8f 00 a2 dc 75 8f 00 a2 dd 75 8f 00 a2 de 75 8f  u....u....u....u....u....u....u.
006183a0  00 a2 df 75 8f 00 a2 e0 75 8f 00 a2 e1 75 8f 00 a2 e2 75 8f 00 a2 e3 75 8f 00 c7 45 d4 0c 00 00  ...u....u....u....u....u...E....
006183c0  00 88 15 e4 75 8f 00 c7 45 fc ff ff ff ff e9 66 ff ff ff b8 01 00 00 00 c3 8d b4 26 00 00 00 00  ....u...E......f...........&....

006183e0  struct IJL_PROCESSOR_INFO* ownGetProcessorInfo() __pure

006183e0  {
006183e5      return 0x8f75c0;
006183e0  }

006183e6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

006183f0  enum _PROCESSOR_TYPE ownGetProcessorType(struct _IJL_CONTEXT* arg1)

006183f0  {
006183f8      sub_618280();
00618400      int32_t result = _ownQueryProcessorType(arg1);
00618400      
0061843d      if ((result == 0 || (result == 1 || (result == 2 || (result == 3 || (result == 4 || (result == 5 || result == 6)))))))
006184d4          return result;
006184d4      
00618443      ownGetProcessorInfo();
00618448      int32_t edx_1 = data_8f75c8;
00618448      
0061844e      if (edx_1 == 5)
0061844e      {
006184bf          if ((data_8f75d4 & "activation type (%s) with '%s' b…") == 0)
006184cb              return 1;
006184cb          
006184ca          return 3;
0061844e      }
0061844e      
00618453      if (edx_1 != 6)
00618453      {
00618493          if (edx_1 != 0xf)
006184b6              return 0;
006184b6          
0061849d          if ((data_8f75d4 & 0x4000000) == 0)
006184af              return 0;
006184af          
006184a8          return 6;
00618453      }
00618453      
00618455      int32_t eax = data_8f75d4;
00618455      
00618464      if (((eax & "activation type (%s) with '%s' b…") != 0 && (eax & 0x2000000) == 0))
0061846f          return 4;
0061846f      
0061847a      if ((eax & 0x2800000) != 0x2800000)
0061848f          return 2;
0061848f      
00618485      return 5;
006183f0  }

006184d5                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

006184e0  void* ownOpenFile(char const* arg1, enum IJL_OPEN_MODE arg2)

006184e0  {
006184ef      enum FILE_CREATION_DISPOSITION dwCreationDisposition;
006184ef      
006184ef      if ((arg2 & 0x40000000) == 0)
006184f8          dwCreationDisposition = OPEN_EXISTING;
006184ef      else
006184f1          dwCreationDisposition = CREATE_ALWAYS;
006184f1      
00618507      HANDLE result = CreateFileA(arg1, arg2, FILE_SHARE_READ, nullptr, dwCreationDisposition, SECURITY_ANONYMOUS, nullptr);
00618507      
00618510      if (result != 0xffffffff)
00618515          return result;
00618515      
00618512      return nullptr;
006184e0  }

00618516                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

00618520  int32_t ownCloseFile(void* arg1)

00618520  {
0061852b      return CloseHandle(arg1);
00618520  }

0061852c                                      8d 74 26 00                                                              .t&.

00618530  BOOL _ownReadFile(HANDLE arg1, void* arg2, uint32_t arg3, uint32_t* arg4)

00618530  {
0061854e      return ReadFile(arg1, arg2, arg3, arg4, nullptr);
00618530  }

0061854f                                               90                                                                 .

00618550  BOOL _ownWriteFile(HANDLE arg1, void* arg2, uint32_t arg3, uint32_t* arg4)

00618550  {
0061856e      return WriteFile(arg1, arg2, arg3, arg4, nullptr);
00618550  }

0061856f                                               90                                                                 .

00618570  int32_t ownSeekFile(void* arg1, unsigned long arg2, unsigned long arg3)

00618570  {
00618590      if (SetFilePointer(arg1, arg2, nullptr, arg3) != 0xffffffff)
00618597          return 1;
00618597      
00618592      return 0;
00618570  }

00618598                                                                          90 8d b4 26 00 00 00 00                          ...&....

006185a0  enum _IJLERR Get_Scan(struct _STATE* arg1, struct _SCAN* arg2, struct _JPEG_PROPERTIES* arg3)

006185a0  {
006185b9      if (arg3->needframe != 0)
006185bb          return 0xffffffed;
006185bb      
006185db      enum _IJLERR result = DP_Parse_SOS(arg3, arg1, &arg3->jframe, arg2);
006185db      
006185e2      if (result == IJL_OK)
006185e2      {
006185e4          arg1->Prog_EndOfBlock_Run = 0;
006185eb          int32_t edx_1 = 0;
006185ed          int32_t ncomps = arg2->ncomps;
006185ed          
006185f1          if (ncomps > 0)
006185f1          {
006185f3              struct _SCAN_COMPONENT* comps = arg2->comps;
006185fb              int32_t ebx_1 = 0;
006185fb              
00618610              while (true)
00618610              {
00618610                  if ((*(uint32_t*)(&comps->dc_table + ebx_1) == 0 || *(uint32_t*)(&comps->ac_table + ebx_1) == 0))
0061862c                      return 0xffffffef;
0061862c                  
00618618                  if (*(uint32_t*)(&comps->quant_table + ebx_1) == 0)
0061863d                      return 0xffffffee;
0061863d                  
0061861a                  ebx_1 += 0x18;
0061861d                  edx_1 += 1;
0061861d                  
00618620                  if (edx_1 >= ncomps)
00618620                      break;
00618620                  
00618620                  continue;
00618610              }
006185f1          }
006185e2      }
006185e2      
006185c5      return result;
006185a0  }

00618647                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00618650  enum _IJLERR IJL_Decode(struct _JPEG_PROPERTIES* arg1)

00618650  {
00618657      struct _JPEG_PROPERTIES* esi = arg1;
0061865b      int32_t ebx;
0061865b      ebx = 0;
0061865d      struct _STATE* ebp = &esi->state;
00618663      void* ctx = esi->state.ctx;
00618669      enum IJL_MARKER var_24 = 0;
00618675      struct _SCAN* jscan = esi->jscan;
0061867d      int32_t jinterleaveType_1;
0061867d      
0061867d      if (jscan != 0)
00618683          jinterleaveType_1 = esi->jinterleaveType;
00618683      
00618689      if ((jscan == 0 || jinterleaveType_1 == 1))
00618689      {
006190c2          if (jscan == 0)
006190c2          {
006190fb              DB_Begin(ebp);
00619100              jscan = esi->jscan;
00619106              jinterleaveType_1 = esi->jinterleaveType;
006190c2          }
006190c2          else if (jscan->curxMCU != 0)
006190f0              jinterleaveType_1 = esi->jinterleaveType;
006190c9          else if (jscan->curyMCU == 0)
006190d0          {
006190dd              DB_Begin(ebp);
006190e2              jscan = esi->jscan;
006190e8              jinterleaveType_1 = esi->jinterleaveType;
006190d0          }
006190d0          else
006190d2              jinterleaveType_1 = esi->jinterleaveType;
00618689      }
00618689      
0061901e      if ((jinterleaveType_1 != 1 || (jscan != 0 && (jscan->curxMCU != 0 || jscan->curyMCU != 0))))
00618692          goto label_61869a;
00618692      
00619026      esi->state.bit_buffer_64 = 0;
0061902c      *(uint32_t*)((char*)esi->state.bit_buffer_64)[4] = 0;
00619032      enum _IJLIOTYPE iotype_2 = esi->iotype;
00619032      
0061904b      if (((((iotype_2 != IJL_JFILE_READWHOLEIMAGE && iotype_2 != IJL_JFILE_READENTROPY) && iotype_2 != IJL_JFILE_READONEHALF) && iotype_2 != IJL_JFILE_READONEEIGHTH) && iotype_2 != IJL_JFILE_READONEQUARTER))
0061904b      {
00619056          esi->state.cur_entropy_ptr = esi->JPGBytes;
0061905c          esi->state.entropy_bytes_processed = 0;
00619066          esi->state.entropy_bytes_left = esi->state.entropy_buf_maxsize;
0061906c          jscan = esi->jscan;
00619072          goto label_61869a;
0061904b      }
0061904b      
0061907f      esi->state.entropy_bytes_processed = 0;
0061907f      
00619097      if (ownSeekFile(esi->state.file, 0, 0) == 0)
00619099          return 0xffffffe9;
00619099      
006190ab      enum _IJLERR result = Buffer_Read_Bytes(ebp);
006190ab      
006190af      if (result == IJL_OK)
006190af      {
006190b5          jscan = esi->jscan;
0061869a      label_61869a:
0061869a          
0061869a          if (jscan != 0)
0061869c              ebx = 1;
0061869c          
0061869e          enum _IJLIOTYPE iotype = esi->iotype;
0061869e          
006186e2          if ((iotype != IJL_JFILE_READENTROPY && (iotype != IJL_JBUFF_READENTROPY && (iotype != IJL_JFILE_READONEHALF && (iotype != IJL_JBUFF_READONEHALF && (iotype != IJL_JBUFF_READONEQUARTER && (iotype != IJL_JFILE_READONEQUARTER && (iotype != IJL_JBUFF_READONEEIGHTH && (iotype != IJL_JFILE_READONEEIGHTH && (esi->roi.top == 0 && (esi->roi.bottom == 0 && (esi->roi.right == 0 && esi->roi.left == 0))))))))))))
006186e4              esi->state.entropy_bytes_processed = 0;
006186e4          
006186f6          if (esi->needframe == 0)
00618ffb              result = Set_Decode_Fast_Path(esi);
00618ffb          
00618fff          if ((esi->needframe != 0 || result == IJL_OK))
00618fff          {
006186fc              enum _IJLIOTYPE iotype_1 = esi->iotype;
006186fc              
00618748              if ((((((iotype_1 == IJL_JBUFF_READPARAMS || iotype_1 == IJL_JFILE_READPARAMS) || iotype_1 == IJL_JBUFF_READHEADER) || iotype_1 == IJL_JFILE_READHEADER) || iotype_1 == IJL_JBUFF_READTHUMBNAIL) || iotype_1 == IJL_JFILE_READTHUMBNAIL))
00618748              {
00618717                  result = DP_Get_Next_Marker(ebp, &var_24);
00618717                  
0061871b                  if (result == IJL_OK)
0061871b                  {
0061872a                      if (var_24 != 0xd8)
0061872c                          return 0xfffffff3;
0061872c                      
0061872a                      goto label_618752;
0061871b                  }
00618748              }
00618748              else
00618748              {
00618752              label_618752:
00618752                  
00618752                  if (esi->progressive_found == 0)
00618752                  {
00618756                      esi->jframe.SeenAllACScans = 0;
0061875c                      esi->jframe.SeenAllDCScans = 0;
00618752                  }
00618752                  
00618762                  struct _SCAN* jscan_1 = esi->jscan;
0061876e                  enum IJL_MARKER edx_19;
0061876e                  
0061876e                  if (jscan_1 == 0)
0061876e                  {
00618c4f                  label_618c4f:
00618c4f                      
00618c4f                      while (true)
00618c4f                      {
00618c4f                          result = DP_Get_Next_Marker(ebp, &var_24);
00618c4f                          
00618c53                          if (result != IJL_OK)
00618c70                              return result;
00618c70                          
00618c55                          edx_19 = var_24;
00618c55                          
00618c5f                          if (edx_19 == 0x100)
00618c65                              return IJL_OK;
00618c65                          
00618940                      label_618940:
00618940                          
00618946                          if (edx_19 <= 0x100)
00618946                              break;
00618946                          
00618c39                          result = DP_Skip(ebp);
00618c39                          
00618c3d                          if (result != IJL_OK)
00618c70                              return result;
00618c4f                      }
00618c4f                      
00618953                      /* jump -> &data_906860[edx_19] */
0061876e                  }
0061876e                  
00618774                  int32_t jinterleaveType = esi->jinterleaveType;
00618774                  
00618fe8                  if ((jinterleaveType == 1 && (jinterleaveType != 1 || (jscan_1->curxMCU == 0 && jscan_1->curyMCU == 0))))
0061877a                      goto label_618c4f;
0061877a                  
00618784                  struct _SCAN* jscan_3 = jscan_1;
00618784                  
00618792                  if ((jscan_3 == 0 || ebx == 0))
00618792                  {
00618d6c                      jscan_3 = operator new(0x38);
00618d6c                      
00618d70                      if (jscan_3 == 0)
00618ea0                          return 0xfffffffb;
00618ea0                      
00618d7c                      __builtin_memset(&jscan_3->curxMCU, 0, 0x18);
00618d9e                      result = Get_Scan(ebp, jscan_3, esi);
00618d9e                      
00618da2                      if (result == IJL_OK)
00618da2                      {
00618dad                          switch (esi->iotype)
00618dad                          {
00618db3                              case IJL_JFILE_READPARAMS:
00618db3                              {
00618fb5                                  struct _SCAN* jscan_8 = jscan_3;
00618fb9                                  goto label_618fa0;
00618db3                              }
00618daa                              case IJL_JBUFF_READPARAMS:
00618daa                              {
00619129                                  struct _SCAN* jscan_13 = jscan_3;
00618fa0                              label_618fa0:
00618fa0                                  esi->state.entropy_bytes_processed -= *(uint32_t*)ctx;
00618fab                                  operator delete(jscan_3);
00618c65                                  return IJL_OK;
00618daa                                  break;
00618daa                              }
00618dc4                              case IJL_JFILE_READHEADER:
00618dc4                              {
00619117                                  struct _SCAN* jscan_11 = jscan_3;
0061911b                                  goto label_618fa0;
00618dc4                              }
00618dbb                              case IJL_JBUFF_READHEADER:
00618dbb                              {
00619120                                  struct _SCAN* jscan_12 = jscan_3;
00619124                                  goto label_618fa0;
00618dbb                              }
00618dd6                              case IJL_JFILE_READTHUMBNAIL:
00618dd6                              {
00618f90                                  struct _SCAN* jscan_7 = jscan_3;
00618f90                                  goto label_618fa0;
00618dd6                              }
00618dcd                              case IJL_JBUFF_READTHUMBNAIL:
00618dcd                              {
0061910e                                  struct _SCAN* jscan_10 = jscan_3;
00619112                                  goto label_618fa0;
00618dcd                              }
00618dad                          }
00618dad                          
00618de5                          int32_t ncomps = jscan_3->ncomps;
00618de8                          jscan_3->restart_interv = esi->jframe.restart_interv;
00618de8                          
00618dfb                          if ((ncomps >= esi->jframe.ncomps || esi->progressive_found != 0))
00618e10                              esi->jinterleaveType = 0;
00618dfb                          else
00618dfd                              esi->jinterleaveType = 1;
00618dfd                          
00618e1a                          Set_Decode_Fast_Path(esi);
00618e1f                          int32_t start_spec = jscan_3->start_spec;
00618e24                          int32_t progressive_found;
00618e24                          int32_t approx_low;
00618e24                          
00618e24                          if (start_spec == 0)
00618e24                          {
00618e46                              if (jscan_3->end_spec != 0x3f)
00618e46                              {
00618e4c                                  progressive_found = esi->progressive_found;
00618e52                                  approx_low = jscan_3->approx_low;
00618e52                                  goto label_618e5e;
00618e46                              }
00618e46                              
00618f36                              if (jscan_3->approx_high != 0)
00618f36                              {
00618f38                                  progressive_found = esi->progressive_found;
00618f3e                                  approx_low = jscan_3->approx_low;
00618f41                                  goto label_618e5e;
00618f36                              }
00618f36                              
00618f50                              approx_low = jscan_3->approx_low;
00618f50                              
00618f55                              if (approx_low != 0)
00618f55                              {
00618f57                                  progressive_found = esi->progressive_found;
00618f5d                                  goto label_618e5e;
00618f55                              }
00618f55                              
00618f70                              progressive_found = esi->progressive_found;
00618f70                              
00618f78                              if (progressive_found != 0)
00618f78                                  goto label_618e5e;
00618e24                          }
00618e24                          else
00618e24                          {
00618e26                              progressive_found = esi->progressive_found;
00618e2c                              approx_low = jscan_3->approx_low;
00618e5e                          label_618e5e:
00618e5e                              
00618e5e                              if ((start_spec != 0 || jscan_3->end_spec != 0))
00618e5e                              {
00618e7a                                  if ((approx_low == 0 && jscan_3->end_spec == 0x3f))
00618e7c                                      esi->jframe.SeenAllACScans += 1;
00618e5e                              }
00618e5e                              else if (approx_low == 0)
00618e67                                  esi->jframe.SeenAllDCScans += jscan_3->ncomps;
00618e67                              
00618e86                              esi->progressive_found = (progressive_found + 1);
00618e86                              
00618e8c                              if (progressive_found == 0)
00618e8c                              {
00618eaa                                  int32_t edx_37 = 0;
00618eac                                  int32_t eax_17 = 0;
00618eae                                  int32_t ncomps_2 = esi->jframe.ncomps;
00618eae                                  
00618eb6                                  if (ncomps_2 > 0)
00618eb6                                  {
00618ebd                                      struct _FRAME_COMPONENT* comps_1 = esi->jframe.comps;
00618ebd                                      
00618ed2                                      do
00618ed2                                      {
00618ec6                                          eax_17 += 1;
00618ecb                                          edx_37 += (comps_1->hsampling * comps_1->vsampling);
00618ecd                                          comps_1 = &comps_1[1];
00618ed2                                      } while (eax_17 < ncomps_2);
00618ed2                                      
00618ed4                                      esi = arg1;
00618eb6                                  }
00618eb6                                  
00618ee8                                  void* eax_18 = operator new(((((edx_37 << 6) * esi->numxMCUs) * esi->numyMCUs) * 2));
00618eed                                  esi->coef_buffer = eax_18;
00618eed                                  
00618ef5                                  if (eax_18 == 0)
00618ef5                                  {
00618efb                                      struct _SCAN* jscan_6 = jscan_3;
00618f07                                      operator delete(jscan_3->comps);
00618f0e                                      jscan_3->comps = nullptr;
00618f18                                      operator delete(jscan_3);
00618f1d                                      esi->jscan = nullptr;
00618f27                                      return 0xfffffffb;
00618ef5                                  }
00618e8c                              }
00618e24                          }
00618dad                          goto label_618d4a;
00618da2                      }
00618da2                      
00618fbb                      struct _SCAN* jscan_9 = jscan_3;
00618fc4                      operator delete(jscan_3);
00618792                  }
00618792                  else
00618792                  {
00618798                      ebx = 0;
00618d4a                  label_618d4a:
00618d4a                      
00618d4a                      if ((esi->jinterleaveType == 1 && esi->progressive_found == 0))
00618d53                          esi->jframe.SeenAllACScans += jscan_3->ncomps;
00618d53                      
006187a6                      esi->jscan = jscan_3;
006187a6                      
006187b5                      if (esi->upsampling_type == IJL_TRIANGLE_FILTER)
006187b5                      {
006187bb                          int32_t edx_3 = 0;
006187bd                          int32_t eax_8 = 0;
006187bf                          int32_t ncomps_1 = esi->jframe.ncomps;
006187bf                          
006187c7                          if (ncomps_1 > 0)
006187c7                          {
006187ce                              struct _FRAME_COMPONENT* comps = esi->jframe.comps;
006187ce                              
006187ef                              do
006187ef                              {
006187e3                                  eax_8 += 1;
006187e8                                  edx_3 += (comps->hsampling * comps->vsampling);
006187ea                                  comps = &comps[1];
006187ef                              } while (eax_8 < ncomps_1);
006187ef                              
006187f1                              esi = arg1;
006187c7                          }
006187c7                          
00618801                          int32_t edi_4 = ((edx_3 << 7) + ((edx_3 << 6) * esi->numxMCUs));
00618801                          
0061880b                          if (esi->sampling_state_ptr == 0)
0061880b                          {
00618814                              void* eax_9 = operator new(0x14);
00618819                              esi->sampling_state_ptr = eax_9;
00618819                              
00618821                              if (eax_9 == 0)
00618c8a                                  return 0xfffffffb;
00618c8a                              
0061883c                              *(uint32_t*)esi->sampling_state_ptr = operator new((edi_4 * 8));
0061883e                              struct _SAMPLING_STATE* sampling_state_ptr_2 = esi->sampling_state_ptr;
00618844                              int16_t* top_row = sampling_state_ptr_2->top_row;
00618844                              
00618848                              if (top_row == 0)
00618848                              {
00618c74                                  operator delete(sampling_state_ptr_2);
00618c79                                  esi->sampling_state_ptr = nullptr;
00618c83                                  return 0xfffffffb;
00618848                              }
00618848                              
00618851                              sampling_state_ptr_2->cur_row = &top_row[edi_4];
00618854                              struct _SAMPLING_STATE* sampling_state_ptr = esi->sampling_state_ptr;
00618860                              sampling_state_ptr->bottom_row = &sampling_state_ptr->cur_row[edi_4];
00618863                              struct _SAMPLING_STATE* sampling_state_ptr_1 = esi->sampling_state_ptr;
0061886f                              sampling_state_ptr_1->last_row = &sampling_state_ptr_1->bottom_row[edi_4];
00618872                              esi->sampling_state_ptr->cur_row_number = 0;
0061880b                          }
006187b5                      }
006187b5                      
0061889b                      result = Decode_Scan(&var_24, ebp, jscan_3, esi);
0061889b                      
006188a0                      if (result == IJL_INTERRUPT_OK)
006188a0                      {
00618d39                          struct _SCAN* jscan_5 = jscan_3;
00618cba                      label_618cba:
00618cba                          
00618cc3                          if ((esi->progressive_found != 0 && esi->interrupt == 0))
00618cc3                          {
00618cc5                              esi->jframe.SeenAllACScans += 1;
00618ccd                              esi->jscan = jscan_3;
00618cd3                              esi->interrupt = 0;
00618cc3                          }
00618cc3                          else if ((esi->jinterleaveType == 1 && result == IJL_ROI_OK))
00618cfb                          {
00618d02                              if (esi->cconversion_reqd != 0)
00618d07                                  CConvert_Image(esi);
00618d07                              
00618d14                              operator delete(jscan_3->comps);
00618d1b                              jscan_3->comps = nullptr;
00618d25                              operator delete(jscan_3);
00618d2a                              esi->jscan = nullptr;
00618cfb                          }
00618cfb                          else
00618cfb                          {
00618ce6                              esi->jscan = jscan_3;
00618cec                              esi->interrupt = 0;
00618cfb                          }
006188a0                      }
006188a0                      else
006188a0                      {
006188a9                          if (result == IJL_ROI_OK)
006188a9                          {
00618cb0                              struct _SCAN* jscan_4 = jscan_3;
00618cb0                              goto label_618cba;
006188a9                          }
006188a9                          
006188b7                          if (esi->progressive_found == 0)
006188bc                              esi->state.cur_scan_comp += jscan_3->ncomps;
006188bc                          
006188c2                          struct _SCAN* jscan_2 = esi->jscan;
006188c2                          
006188ce                          if ((jscan_2 != 0 && result == IJL_OK))
006188ce                          {
006188e6                              operator delete(jscan_2->comps);
006188eb                              esi->jscan->comps = nullptr;
00618901                              operator delete(esi->jscan);
00618906                              esi->jscan = nullptr;
00618910                          label_618910:
00618910                              edx_19 = var_24;
00618910                              
00618916                              if (edx_19 != 0)
00618916                                  goto label_618940;
00618916                              
00618916                              goto label_618c4f;
006188ce                          }
006188ce                          
006188d2                          if (result >= IJL_OK)
006188d2                              goto label_618910;
006188a0                      }
00618792                  }
00618748              }
00618fff          }
006190af      }
006190af      
00618c70      return result;
00618650  }

006188da                                                                                8d b6 00 00 00 00                            ......
00618921     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
00618955                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
00618960  89 34 24 e8 e8 89 02 00 8b f8 85 ff 0f 85 f5 02 00 00 e9 c8 02 00 00 8b f6 8d bc 27 00 00 00 00  .4$........................'....
00618980  89 34 24 e8 b8 83 02 00 8b f8 85 ff 0f 85 d5 02 00 00 8b 86 dc 37 00 00 85 c0 0f 84 f1 02 00 00  .4$..................7..........
006189a0  e9 9a 02 00 00 8d 74 26 00 8d bc 27 00 00 00 00 83 3e 06 0f 84 86 02 00 00 89 34 24 e8 ef 84 02  ......t&...'.....>........4$....
006189c0  00 8b f8 85 ff 0f 85 9c 02 00 00 e9 6f 02 00 00 89 2c 24 8d 44 24 14 89 44 24 04 e8 50 80 02 00  ............o....,$.D$..D$..P...
006189e0  8b f8 85 ff 0f 85 7d 02 00 00 8b 44 24 14 89 86 d0 37 00 00 e9 46 02 00 00 8d b4 26 00 00 00 00  ......}....D$....7...F.....&....
00618a00  89 34 24 8b 46 14 89 6c 24 04 89 44 24 08 e8 fd 8a 02 00 8b f8 85 ff 0f 85 4a 02 00 00 e9 1d 02  .4$.F..l$..D$............J......
00618a20  00 00 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00 89 6c 24 18 8b ae e0 37 00 00 e9 49 fd ff ff 90  ....&......'.....l$....7...I....
00618a40  8b 16 83 fa 05 0f 84 1a 02 00 00 83 fa 04 0f 84 11 02 00 00 83 fa 01 0f 84 08 02 00 00 85 d2 0f  ................................
00618a60  84 00 02 00 00 83 fa 15 0f 84 f7 01 00 00 83 fa 14 0f 84 ee 01 00 00 8b 96 dc 37 00 00 85 d2 74  ..........................7....t
00618a80  34 89 2c 24 8d 44 24 10 89 44 24 04 e8 4f 7e 02 00 8b f8 85 ff 0f 85 cc 01 00 00 8b 54 24 10 81  4.,$.D$..D$..O~.............T$..
00618aa0  fa d8 00 00 00 0f 84 95 fe ff ff bf ea ff ff ff e9 b2 01 00 00 8b 56 74 85 d2 0f 84 a7 01 00 00  ......................Vt........
00618ac0  8b 56 68 85 d2 0f 84 9c 01 00 00 8b 96 e0 4d 00 00 85 d2 0f 85 8e 01 00 00 89 34 24 e8 9f 92 01  .Vh...........M...........4$....
00618ae0  00 e9 81 01 00 00 c7 86 d0 37 00 00 00 00 00 00 e9 4a 01 00 00 8d 74 26 00 8d bc 27 00 00 00 00  .........7.......J....t&...'....
00618b00  bf e3 ff ff ff e9 5d 01 00 00 bf e3 ff ff ff e9 53 01 00 00 bf e3 ff ff ff e9 49 01 00 00 bf e3  ......].........S.........I.....
00618b20  ff ff ff e9 3f 01 00 00 bf e3 ff ff ff e9 35 01 00 00 bf e3 ff ff ff e9 2b 01 00 00 bf e3 ff ff  ....?.........5.........+.......
00618b40  ff e9 21 01 00 00 bf e3 ff ff ff e9 17 01 00 00 bf e3 ff ff ff e9 0d 01 00 00 bf e3 ff ff ff e9  ..!.............................
00618b60  03 01 00 00 89 34 24 89 6c 24 04 e8 d0 8d 02 00 8b f8 85 ff 0f 85 ed 00 00 00 e9 c0 00 00 00 90  .....4$.l$......................
00618b80  bf e3 ff ff ff e9 dd 00 00 00 8b 86 dc 37 00 00 85 c0 75 1a e9 a6 00 00 00 8d b4 26 00 00 00 00  .............7....u........&....
00618ba0  8b 86 dc 37 00 00 85 c0 0f 84 91 00 00 00 8b 06 83 f8 05 74 6b 83 f8 04 74 66 89 2c 24 89 74 24  ...7...............tk...tf.,$.t$
00618bc0  04 e8 1a 7f 02 00 8b f8 85 ff 0f 85 97 00 00 00 c7 86 dc 37 00 00 00 00 00 00 8b 86 c0 37 00 00  ...................7.........7..
00618be0  85 c0 7e 07 3d ff 00 00 00 7e 07 bf f2 ff ff ff eb 75 89 46 54 8b 96 a8 37 00 00 8b 86 ac 37 00  ..~.=....~.......u.FT...7.....7.
00618c00  00 89 56 4c 89 46 50 89 34 24 e8 21 fb 02 00 8b f8 85 ff 75 52 eb 28 8b f6 8d bc 27 00 00 00 00  ..VL.FP.4$.!.......uR.(....'....
00618c20  8b 86 04 38 00 00 83 c0 fe 89 86 04 38 00 00 eb 34                                               ...8........8...4
00618c91                                                     89 34 24 e8 97 fa 02 00 8b f8 85 ff 75 c8 eb                   .4$.........u..
00618ca0  9e 90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                  ....&......'....
00618d5e                                                                                            8b f6                                ..
00618e06                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
00618e31                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00618e6f                                               90                                                                 .
00618e93                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
00618f46                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
00618f62        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
00618f83           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
00619132                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....

00619140  int32_t _SetDefaultTables(void* arg1)

00619140  {
00619145      int32_t edx = 0;
00619147      int32_t eax = 0;
00619147      
00619151      if (*(uint32_t*)((char*)arg1 + 0x371c) != 0)
00619153          edx = *(uint32_t*)((char*)arg1 + 0x3714);
00619153      
00619161      if (*(uint32_t*)((char*)arg1 + 0x3724) != 0)
00619163          edx = *(uint32_t*)((char*)arg1 + 0x3714);
00619163      
00619171      if (*(uint32_t*)((char*)arg1 + 0x372c) != 0)
00619173          edx = *(uint32_t*)((char*)arg1 + 0x3714);
00619173      
00619181      if (*(uint32_t*)((char*)arg1 + 0x3734) != 0)
00619183          edx = *(uint32_t*)((char*)arg1 + 0x3714);
00619183      
0061919b      if ((*(uint32_t*)((char*)arg1 + 0x373c) != 0 && *(uint32_t*)((char*)arg1 + 0x3740) != 0))
0061919d          eax = *(uint32_t*)((char*)arg1 + 0x3718);
0061919d      
006191b5      if ((*(uint32_t*)((char*)arg1 + 0x3748) != 0 && *(uint32_t*)((char*)arg1 + 0x374c) != 0))
006191b7          eax = *(uint32_t*)((char*)arg1 + 0x3718);
006191b7      
006191cf      if ((*(uint32_t*)((char*)arg1 + 0x3754) != 0 && *(uint32_t*)((char*)arg1 + 0x3758) != 0))
006191d1          eax = *(uint32_t*)((char*)arg1 + 0x3718);
006191d1      
006191e9      if ((*(uint32_t*)((char*)arg1 + 0x3760) != 0 && *(uint32_t*)((char*)arg1 + 0x3764) != 0))
006191eb          eax = *(uint32_t*)((char*)arg1 + 0x3718);
006191eb      
00619203      if ((*(uint32_t*)((char*)arg1 + 0x376c) != 0 && *(uint32_t*)((char*)arg1 + 0x3770) != 0))
00619205          eax = *(uint32_t*)((char*)arg1 + 0x3718);
00619205      
0061921d      if ((*(uint32_t*)((char*)arg1 + 0x3778) != 0 && *(uint32_t*)((char*)arg1 + 0x377c) != 0))
0061921f          eax = *(uint32_t*)((char*)arg1 + 0x3718);
0061921f      
00619237      if ((*(uint32_t*)((char*)arg1 + 0x3784) != 0 && *(uint32_t*)((char*)arg1 + 0x3788) != 0))
00619239          eax = *(uint32_t*)((char*)arg1 + 0x3718);
00619239      
00619251      if ((*(uint32_t*)((char*)arg1 + 0x3790) != 0 && *(uint32_t*)((char*)arg1 + 0x3794) != 0))
00619253          eax = *(uint32_t*)((char*)arg1 + 0x3718);
00619253      
0061925b      if (edx == 0)
0061925b      {
00619264          *(uint32_t*)((char*)arg1 + 0x84) = 2;
0061926a          *(uint32_t*)((char*)arg1 + 0x80) = 2;
00619270          *(uint32_t*)((char*)arg1 + 0x371c) = 0x906e40;
0061927a          *(uint8_t*)((char*)arg1 + 0x3720) = 0;
00619280          *(uint32_t*)((char*)arg1 + 0x3724) = 0x906e00;
0061928a          *(uint8_t*)((char*)arg1 + 0x3728) = 1;
00619291          *(uint32_t*)((char*)arg1 + 0x372c) = 0;
00619297          *(uint8_t*)((char*)arg1 + 0x3730) = 0;
0061929d          *(uint32_t*)((char*)arg1 + 0x3734) = 0;
006192a3          *(uint8_t*)((char*)arg1 + 0x3738) = 0;
0061925b      }
0061925b      
006192ab      if (eax == 0)
006192ab      {
006192ba          *(uint32_t*)((char*)arg1 + 0x88) = 2;
006192c0          *(uint32_t*)((char*)arg1 + 0x8c) = 2;
006192c6          *(uint32_t*)((char*)arg1 + 0x90) = 2;
006192cc          *(uint32_t*)((char*)arg1 + 0x373c) = 0x906ec8;
006192d6          *(uint32_t*)((char*)arg1 + 0x3740) = 0x906ebc;
006192e0          *(uint8_t*)((char*)arg1 + 0x3744) = 0;
006192e6          *(uint8_t*)((char*)arg1 + 0x3745) = 0;
006192ec          *(uint32_t*)((char*)arg1 + 0x3748) = 0x906eac;
006192f6          *(uint32_t*)((char*)arg1 + 0x374c) = 0x906d40;
00619300          *(uint8_t*)((char*)arg1 + 0x3750) = 1;
00619306          *(uint8_t*)((char*)arg1 + 0x3751) = 0;
0061930c          *(uint32_t*)((char*)arg1 + 0x3754) = 0x906e9c;
00619316          *(uint32_t*)((char*)arg1 + 0x3758) = 0x906e90;
00619320          *(uint8_t*)((char*)arg1 + 0x375c) = 0;
00619326          *(uint8_t*)((char*)arg1 + 0x375d) = 1;
0061932c          *(uint32_t*)((char*)arg1 + 0x3760) = 0x906e80;
00619336          *(uint32_t*)((char*)arg1 + 0x3764) = 0x906c80;
00619340          *(uint8_t*)((char*)arg1 + 0x3768) = 1;
00619346          *(uint8_t*)((char*)arg1 + 0x3769) = 1;
0061934c          *(uint32_t*)((char*)arg1 + 0x376c) = 0;
00619352          *(uint32_t*)((char*)arg1 + 0x3770) = 0;
00619358          *(uint8_t*)((char*)arg1 + 0x3774) = 0;
0061935e          *(uint8_t*)((char*)arg1 + 0x3775) = 0;
00619364          *(uint32_t*)((char*)arg1 + 0x3778) = 0;
0061936a          *(uint32_t*)((char*)arg1 + 0x377c) = 0;
00619370          *(uint8_t*)((char*)arg1 + 0x3780) = 0;
00619376          *(uint8_t*)((char*)arg1 + 0x3781) = 0;
0061937c          *(uint32_t*)((char*)arg1 + 0x3784) = 0;
00619382          *(uint32_t*)((char*)arg1 + 0x3788) = 0;
00619388          *(uint8_t*)((char*)arg1 + 0x378c) = 0;
0061938e          *(uint8_t*)((char*)arg1 + 0x378d) = 0;
00619394          *(uint32_t*)((char*)arg1 + 0x3790) = 0;
0061939a          *(uint32_t*)((char*)arg1 + 0x3794) = 0;
006193a0          *(uint8_t*)((char*)arg1 + 0x3798) = 0;
006193a6          *(uint8_t*)((char*)arg1 + 0x3799) = 0;
006193ac          *(uint8_t*)((char*)arg1 + 0x37a0) = 0;
006193b2          *(uint8_t*)((char*)arg1 + 0x37a1) = 1;
006193b8          *(uint8_t*)((char*)arg1 + 0x37a2) = 1;
006193be          *(uint8_t*)((char*)arg1 + 0x37a3) = 1;
006193c4          *(uint8_t*)((char*)arg1 + 0x379c) = 0;
006193ca          *(uint8_t*)((char*)arg1 + 0x379d) = 1;
006193d0          *(uint8_t*)((char*)arg1 + 0x379e) = 1;
006193d6          *(uint8_t*)((char*)arg1 + 0x379f) = 1;
006192ab      }
006192ab      
006193df      return 0;
00619140  }


006193e0  int32_t _Scale_Char_Matrix(int32_t arg1, int32_t arg2, int16_t* arg3)

006193e0  {
006193e0      int32_t edi;
006193e0      int32_t var_4 = edi;
006193e1      int32_t esi;
006193e1      int32_t var_8 = esi;
006193e4      int32_t var_14 = esi;
006193f3      int32_t ebx_1;
006193f3      
006193f3      if (arg1 <= 0)
00619403          ebx_1 = (COMBINE(0, 0x1388) / 1);
006193f3      else if (arg1 > 0x64)
00619419          ebx_1 = (-((0x64 * 2)) + 0xc8);
0061940a      else if (arg1 < 0x32)
00619403          ebx_1 = (COMBINE(0, 0x1388) / arg1);
00619495      else
00619419          ebx_1 = (-((arg1 * 2)) + 0xc8);
00619419      
00619488      int32_t result;
00619488      
00619488      for (void* i = nullptr; i < 0x40; i += 1)
00619488      {
00619437          int32_t edi_4 = ((((uint32_t)*(uint8_t*)((char*)i + arg2)) * ebx_1) + 0x32);
0061943f          int32_t edx_3;
0061943f          edx_3 = HIGHD((0x51eb851f * edi_4));
0061943f          result = LOWD((0x51eb851f * edi_4));
00619447          int32_t edx_5 = (edi_4 / 0x64);
00619447          
0061944b          if (edx_5 > 0)
0061944b          {
00619460              int32_t edi_6 = (i * 2);
00619460              
00619469              if (edx_5 <= 0xff)
00619480                  *(uint16_t*)((char*)arg3 + edi_6) = edx_5;
00619469              else
00619470                  *(uint16_t*)((char*)arg3 + edi_6) = 0xff;
0061944b          }
0061944b          else
00619452              arg3[i] = 1;
00619488      }
00619488      
00619491      return result;
006193e0  }

00619458                                                                          90 8d b4 26 00 00 00 00                          ...&....
00619476                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

006194a0  void _BuildEncoderHuffmanTable(int32_t arg1, void* arg2, int32_t arg3)

006194a0  {
006194fb      int32_t var_82c;
006194fb      void var_828;
006194fb      void var_41c;
006194fb      void var_418;
006194fb      
006194fb      for (int32_t i = 0; i < 0x100; i += 2)
006194fb      {
006194c5          &var_82c[i] = 0;
006194c8          *(uint32_t*)(&var_41c + (i << 2)) = 0;
006194cf          *(uint16_t*)((arg3 + (i << 1)) + 0x408) = 0;
006194d7          *(uint32_t*)((arg3 + (i << 2)) + 8) = 0;
006194db          *(uint32_t*)(&var_828 + (i << 2)) = 0;
006194df          *(uint32_t*)(&var_418 + (i << 2)) = 0;
006194e6          *(uint16_t*)((arg3 + (i << 1)) + 0x40a) = 0;
006194ee          *(uint32_t*)((arg3 + (i << 2)) + 0xc) = 0;
006194fb      }
006194fb      
006194fd      int32_t ebp = 0;
006194fd      
0061952b      for (int32_t i_1 = 1; i_1 < 0x11; i_1 += 1)
0061952b      {
00619504          int32_t ebx_1 = 1;
00619509          uint32_t edi_1 = ((uint32_t)*(uint8_t*)((arg1 + i_1) - 1));
00619509          
00619510          if (edi_1 > 0)
00619510          {
00619525              do
00619525              {
00619518                  if (ebp > 0x101)
00619681                      return;
00619681                  
0061951e                  &var_82c[ebp] = i_1;
00619521                  ebp += 1;
00619522                  ebx_1 += 1;
00619525              } while (ebx_1 <= edi_1);
00619510          }
0061952b      }
0061952b      
00619534      int32_t i_2 = 0;
00619536      int32_t edx = 0;
00619538      &var_82c[ebp] = 0;
0061953f      int32_t edi_2 = var_82c;
0061953f      
00619542      while (true)
00619542      {
00619542          *(uint32_t*)(&var_41c + (i_2 << 2)) = edx;
00619549          i_2 += 1;
0061954a          int32_t ebx_3 = &var_82c[i_2];
0061954d          edx += 1;
0061954d          
00619550          if (ebx_3 == edi_2)
00619550          {
00619558              while (i_2 < 0x101)
00619558              {
0061955a                  *(uint32_t*)(&var_41c + (i_2 << 2)) = edx;
00619561                  i_2 += 1;
00619562                  ebx_3 = &var_82c[i_2];
00619565                  edx += 1;
00619565                  
00619568                  if (ebx_3 != edi_2)
00619568                      break;
00619558              }
00619550          }
00619550          
0061956c          if (ebx_3 == 0)
0061956c              break;
0061956c          
00619573          do
00619573          {
0061956e              edx *= 2;
00619570              edi_2 += 1;
00619573          } while (ebx_3 != edi_2);
00619542      }
00619542      
00619587      int32_t i_3 = 0;
00619587      
0061958b      if (ebp <= 0)
00619661          return;
00619661      
00619594      if (ebp >= 4)
00619594      {
0061959a          int32_t var_18_1 = 0;
0061959a          
0061961e          do
0061961e          {
006195a1              uint32_t esi_1 = ((uint32_t)*(uint8_t*)((char*)arg2 + i_3));
006195a1              
006195ab              if (esi_1 > 0x101)
00619671                  return;
00619671              
006195b1              int32_t eax_1 = (i_3 * 2);
006195bb              *(uint16_t*)((arg3 + (esi_1 << 1)) + 0x408) = ((int16_t)*(uint32_t*)(&var_41c + (i_3 << 2)));
006195c6              *(uint32_t*)((arg3 + (esi_1 << 2)) + 8) = &var_82c[i_3];
006195ca              uint32_t esi_2 = ((uint32_t)*(uint8_t*)(((char*)arg2 + i_3) + 1));
006195ca              
006195d5              if (esi_2 > 0x101)
00619671                  return;
00619671              
006195e2              *(uint16_t*)((arg3 + (esi_2 << 1)) + 0x408) = ((int16_t)*(uint32_t*)(&var_418 + (eax_1 << 1)));
006195ee              *(uint32_t*)((arg3 + (esi_2 << 2)) + 8) = *(uint32_t*)(&var_828 + (eax_1 << 1));
006195f2              uint32_t esi_3 = ((uint32_t)*(uint8_t*)(((char*)arg2 + i_3) + 2));
006195f2              
006195fd              if (esi_3 > 0x101)
00619671                  return;
00619671              
00619606              void var_824;
00619606              int32_t eax_2 = *(uint32_t*)(&var_824 + (eax_1 << 1));
0061960a              i_3 += 3;
0061960d              void var_414;
0061960d              *(uint16_t*)((arg3 + (esi_3 << 1)) + 0x408) = *(uint32_t*)(&var_414 + (eax_1 << 1));
00619615              *(uint32_t*)((arg3 + (esi_3 << 2)) + 8) = eax_2;
0061961e          } while (i_3 <= (ebp - 4));
00619594      }
00619594      
00619630      while (true)
00619630      {
00619630          uint32_t esi_6 = ((uint32_t)*(uint8_t*)((char*)arg2 + i_3));
00619630          
0061963a          if (esi_6 > 0x101)
00619671              return;
00619671          
00619643          *(uint16_t*)((arg3 + (esi_6 << 1)) + 0x408) = ((int16_t)*(uint32_t*)(&var_41c + (i_3 << 2)));
0061964b          int32_t edi_10 = &var_82c[i_3];
0061964e          i_3 += 1;
00619651          *(uint32_t*)((arg3 + (esi_6 << 2)) + 8) = edi_10;
00619651          
00619655          if (i_3 >= ebp)
00619661              return;
00619630      }
006194a0  }

00619577                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
00619682        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....

00619690  int32_t _BuildDecoderHuffmanTable(int32_t arg1, void* arg2, int32_t arg3, int32_t arg4, int32_t* arg5)

00619690  {
006196b8      int32_t i = 1;
006196c4      *(uint32_t*)arg5 = arg3;
006196c6      arg5[1] = arg4;
006196c9      int32_t edx_1 = 0;
006196cb      int32_t result = 0;
0061979d      char i_5;
0061979d      
0061979d      do
0061979d      {
006196d2          uint32_t ebp_1 = ((uint32_t)*(uint8_t*)((i + arg1) - 1));
006196d7          int32_t j = 1;
006196d7          
006196df          if (ebp_1 >= 1)
006196df          {
006196eb              char ecx_2;
006196eb              
006196eb              if ((ebp_1 - 1) < 6)
00619cf5                  ecx_2 = i;
006196eb              else
006196eb              {
006196f1                  ecx_2 = i;
006196f1                  
00619776                  do
00619776                  {
00619700                      &i_5[edx_1] = ecx_2;
00619700                      
00619710                      if ((edx_1 + 1) > 0x101)
00619cee                          return 0xfffffffa;
00619cee                      
00619716                      void var_13f;
00619716                      *(uint8_t*)(&var_13f + edx_1) = ecx_2;
00619716                      
00619726                      if ((edx_1 + 2) > 0x101)
00619cee                          return 0xfffffffa;
00619cee                      
0061972c                      void var_13e;
0061972c                      *(uint8_t*)(&var_13e + edx_1) = ecx_2;
0061972c                      
0061973c                      if ((edx_1 + 3) > 0x101)
00619cee                          return 0xfffffffa;
00619cee                      
00619742                      void var_13d;
00619742                      *(uint8_t*)(&var_13d + edx_1) = ecx_2;
00619742                      
00619752                      if ((edx_1 + 4) > 0x101)
00619cee                          return 0xfffffffa;
00619cee                      
00619758                      void var_13c;
00619758                      *(uint8_t*)(&var_13c + edx_1) = ecx_2;
0061975f                      edx_1 += 5;
0061975f                      
00619768                      if (edx_1 > 0x101)
00619cee                          return 0xfffffffa;
00619cee                      
0061976e                      j += 5;
00619776                  } while (j <= (ebp_1 - 6));
006196eb              }
006196eb              
00619797              do
00619797              {
00619780                  &i_5[edx_1] = ecx_2;
00619787                  edx_1 += 1;
00619787                  
0061978e                  if (edx_1 > 0x101)
00619cee                      return 0xfffffffa;
00619cee                  
00619794                  j += 1;
00619797              } while (j <= ebp_1);
006196df          }
006196df          
00619799          i += 1;
0061979d      } while (i <= 0x10);
0061979d      
006197b8      &i_5[edx_1] = 0;
006197c0      int32_t edi_6 = 0;
006197c2      uint32_t i_6 = ((uint32_t)i_5);
006197ca      int32_t edx_2 = 0;
006197cc      i = i_5;
006197d5      void var_544;
006197d5      
006197d5      if (i != 0)
006197d5      {
006197d7          uint32_t i_1 = ((uint32_t)i_5);
006197d7          
00619805          do
00619805          {
006197e1              for (; i_1 == i_6; i_1 = ((uint32_t)&i_5[edx_2]))
006197e1              {
006197e3                  *(uint32_t*)(&var_544 + (edx_2 << 2)) = edi_6;
006197e6                  edi_6 += 1;
006197e7                  edx_2 += 1;
006197e7                  
006197ee                  if (edx_2 > 0x101)
00619ce7                      return 0xfffffffa;
006197e1              }
006197e1              
00619800              edi_6 *= 2;
00619802              i_6 += 1;
00619805          } while (i_1 != 0);
006197d5      }
006197d5      
00619809      int32_t i_2 = 1;
0061980e      __builtin_memset(((char*)arg5 + 0x64e), 0, 0x22);
00619815      __builtin_memset(&arg5[0x182], 0, 0x44);
00619973      int32_t j_1 = 0;
00619973      
00619ac1      do
00619ac1      {
00619983          uint32_t ebp_3 = ((uint32_t)*(uint8_t*)((i_2 + arg1) - 1));
00619983          
0061998a          if (ebp_3 == 0)
00619ab5              *(uint16_t*)(((char*)arg5 + (i_2 << 1)) + 0x62a) = 0xffff;
0061998a          else
0061998a          {
00619996              uint32_t edi_8 = (j_1 * 4);
00619998              *(uint16_t*)(((char*)arg5 + (i_2 << 1)) + 0x64e) = j_1;
006199a3              int32_t ebp_4 = (ebp_3 + j_1);
006199a5              *(uint16_t*)(((char*)arg5 + (i_2 << 1)) + 0x608) = ((int16_t)*(uint32_t*)(&var_544 + (j_1 << 2)));
006199a5              
006199af              if (j_1 < ebp_4)
006199af              {
006199bc                  if ((ebp_4 - j_1) >= 6)
006199bc                  {
00619a60                      do
00619a60                      {
006199d7                          *(uint16_t*)(((char*)arg5 + (j_1 << 1)) + 0x408) = ((uint16_t)*(uint8_t*)((char*)arg2 + j_1));
006199d7                          
006199e8                          if ((j_1 + 1) > 0x101)
00619cc2                              return 0xfffffffa;
00619cc2                          
006199f3                          *(uint16_t*)(((char*)arg5 + (j_1 << 1)) + 0x40a) = ((uint16_t)*(uint8_t*)(((char*)arg2 + j_1) + 1));
006199f3                          
00619a04                          if ((j_1 + 2) > 0x101)
00619cc2                              return 0xfffffffa;
00619cc2                          
00619a0f                          *(uint16_t*)(((char*)arg5 + (j_1 << 1)) + 0x40c) = ((uint16_t)*(uint8_t*)(((char*)arg2 + j_1) + 2));
00619a0f                          
00619a20                          if ((j_1 + 3) > 0x101)
00619cc2                              return 0xfffffffa;
00619cc2                          
00619a2b                          *(uint16_t*)(((char*)arg5 + (j_1 << 1)) + 0x40e) = ((uint16_t)*(uint8_t*)(((char*)arg2 + j_1) + 3));
00619a2b                          
00619a3c                          if ((j_1 + 4) > 0x101)
00619cc2                              return 0xfffffffa;
00619cc2                          
00619a47                          *(uint16_t*)(((char*)arg5 + (j_1 << 1)) + 0x410) = ((uint16_t)*(uint8_t*)(((char*)arg2 + j_1) + 4));
00619a4f                          j_1 += 5;
00619a4f                          
00619a58                          if (j_1 > 0x101)
00619cc2                              return 0xfffffffa;
00619a60                      } while (j_1 <= (ebp_4 - 6));
006199bc                  }
006199bc                  
00619a9b                  do
00619a9b                  {
00619a84                      *(uint16_t*)(((char*)arg5 + (j_1 << 1)) + 0x408) = ((uint16_t)*(uint8_t*)((char*)arg2 + j_1));
00619a8c                      j_1 += 1;
00619a8c                      
00619a93                      if (j_1 > 0x101)
00619cc2                          return 0xfffffffa;
00619a9b                  } while (j_1 < ebp_4);
00619a9b                  
00619aa0                  edi_8 = (j_1 * 4);
006199af              }
006199af              
00619aa6              void var_548;
00619aa6              *(uint16_t*)(((char*)arg5 + (i_2 * 2)) + 0x62a) = ((int16_t)*(uint32_t*)(&var_548 + edi_8));
0061998a          }
0061998a          
00619abd          i_2 += 1;
00619ac1      } while (i_2 <= 0x10);
00619ac1      
00619ada      arg5[0x193] = 0xffff;
00619ae9      int32_t* i_3 = arg5;
00619ae9      
00619b03      do
00619b03      {
00619af2          i_3[2] = 0;
00619af5          i_3[3] = 0;
00619af8          i_3[4] = 0;
00619afb          i_3[5] = 0;
00619afe          i_3 = &i_3[4];
00619b03      } while (&arg5[0x100] > i_3);
00619b03      
00619b07      int32_t i_4 = 1;
00619b0c      int32_t edx_3;
00619b0c      edx_3 = 0xff;
00619b15      void* var_18_2 = nullptr;
00619b1c      int32_t esi_4 = arg1;
00619b1c      
00619ca8      do
00619ca8      {
00619b23          uint32_t ecx_12 = ((uint32_t)*(uint8_t*)((i_4 + esi_4) - 1));
00619b28          int32_t ebx_2 = 1;
00619b30          uint32_t var_2c_1 = ecx_12;
00619b30          
00619b37          if (ecx_12 >= 1)
00619b37          {
00619b3d              ecx_12 = edx_3;
00619b3f              ecx_12 += 8;
00619b49              int32_t j_3 = (1 << ecx_12);
00619b4e              void* esi_5 = arg2;
00619b55              uint32_t var_1c_1 = (i_4 << 0x10);
00619b63              char var_20_1 = edx_3;
00619b6a              void* ebp_6 = var_18_2;
00619b6a              
00619c7f              do
00619c7f              {
00619b7e                  if (ebp_6 > 0x101)
00619ce0                      return 0xfffffffa;
00619ce0                  
00619b87                  int32_t j_2 = j_3;
00619b8e                  edx_3 = (*(uint32_t*)(&var_544 + (ebp_6 << 2)) << ecx_12);
00619b8e                  
00619b92                  if (j_2 > 0)
00619b92                  {
00619b9d                      char* edi_35;
00619b9d                      
00619b9d                      if (j_2 < 6)
00619cc9                          edi_35 = ((char*)ebp_6 + esi_5);
00619b9d                      else
00619b9d                      {
00619ba7                          char* var_38_1 = ((char*)ebp_6 + esi_5);
00619bae                          char var_24_1 = ecx_12;
00619bae                          
00619c0b                          do
00619c0b                          {
00619bd6                              j_2 -= 5;
00619bd9                              arg5[(edx_3 + 2)] = (((uint32_t)*(uint8_t*)((char*)esi_5 + ebp_6)) | var_1c_1);
00619be3                              arg5[(edx_3 + 3)] = (((uint32_t)*(uint8_t*)((char*)esi_5 + ebp_6)) | var_1c_1);
00619bed                              arg5[(edx_3 + 4)] = (((uint32_t)*(uint8_t*)((char*)esi_5 + ebp_6)) | var_1c_1);
00619bf7                              arg5[(edx_3 + 5)] = (((uint32_t)*(uint8_t*)((char*)esi_5 + ebp_6)) | var_1c_1);
00619c01                              arg5[(edx_3 + 6)] = (((uint32_t)*(uint8_t*)((char*)esi_5 + ebp_6)) | var_1c_1);
00619c05                              edx_3 += 5;
00619c0b                          } while (j_2 >= 6);
00619c0b                          
00619c14                          edi_35 = var_38_1;
00619c1b                          ecx_12 = var_24_1;
00619b9d                      }
00619b9d                      
00619c5d                      do
00619c5d                      {
00619c55                          j_2 -= 1;
00619c56                          arg5[(edx_3 + 2)] = (((uint32_t)*(uint8_t*)edi_35) | var_1c_1);
00619c5a                          edx_3 += 1;
00619c5d                      } while (j_2 > 0);
00619c5d                      
00619c6d                      esi_5 = arg2;
00619b92                  }
00619b92                  
00619c74                  ebp_6 += 1;
00619c75                  ebx_2 += 1;
00619c7f              } while (ebx_2 <= var_2c_1);
00619c7f              
00619c85              var_18_2 = ebp_6;
00619c8c              edx_3 = var_20_1;
00619c9a              esi_4 = arg1;
00619b37          }
00619b37          
00619ca1          edx_3 -= 1;
00619ca4          i_4 += 1;
00619ca8      } while (i_4 <= 8);
00619ca8      
00619cae      return result;
00619690  }

00619cd2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
00619cfd                                                                                         8d 76 00                               .v.

00619d00  enum _IJLERR _ownEncoderWriteJPEGTables(struct _JPEG_PROPERTIES* arg1)

00619d00  {
00619d15      int32_t esi = 0;
00619d17      int32_t ebp = 0;
00619d19      enum _IJLERR result_1 = IJL_OK;
00619d27      enum _IJLERR result;
00619d27      
00619d27      while (true)
00619d27      {
00619d27          if (ebp >= arg1->maxquantindex)
00619d27          {
00619ddd              result = result_1;
00619ddd              
00619ded              if (arg1->progressive_found == 0)
00619ded              {
00619dfe                  result = EP_Write_DHTs(&arg1->state, arg1);
00619dfe                  
00619e05                  if ((result == IJL_OK && (arg1->maxhuffindex * 2) > 0))
00619e05                  {
00619e32                      struct _HUFFMAN_TABLE (* esi_1)[0x4] = &arg1->jFmtDcHuffman;
00619e39                      int32_t i_1 = 0;
00619e3f                      struct _HUFFMAN_TABLE (* ebx_1)[0x4] = &arg1->jFmtAcHuffman;
00619e41                      int32_t ebp_1 = 0;
00619eef                      int32_t i;
00619eef                      
00619eef                      do
00619eef                      {
00619e4b                          arg1->jEncFmtDcHuffman[((uint32_t)&*(uint8_t*)((char*)arg1->rawhufftables[0])[9][ebp_1])] = esi_1;
00619e5a                          arg1->jEncFmtAcHuffman[((uint32_t)&*(uint8_t*)((char*)arg1->rawhufftables[1])[9][ebp_1])] = ebx_1;
00619e89                          result = _BuildEncoderHuffmanTable(*(uint32_t*)(&arg1->rawhufftables + ebp_1), *(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebp_1), arg1->jEncFmtDcHuffman[((uint32_t)&*(uint8_t*)((char*)arg1->rawhufftables[0])[9][ebp_1])]);
00619e89                          
00619e90                          if (result != IJL_OK)
00619e90                              break;
00619e90                          
00619ebe                          result = _BuildEncoderHuffmanTable(*(uint32_t*)(&arg1->rawhufftables[1] + ebp_1), *(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[1])[4] + ebp_1), arg1->jEncFmtAcHuffman[((uint32_t)&*(uint8_t*)((char*)arg1->rawhufftables[1])[9][ebp_1])]);
00619ebe                          
00619ec5                          if (result != IJL_OK)
00619ec5                              break;
00619ec5                          
00619ecb                          ebp_1 += 0x18;
00619ece                          ebx_1 = &*(uint6592_t*)ebx_1[2];
00619ed4                          esi_1 = &*(uint6592_t*)esi_1[2];
00619ede                          i = (i_1 + 2);
00619ee7                          i_1 = i;
00619eef                      } while (i < (arg1->maxhuffindex * 2));
00619e05                  }
00619ded              }
00619ded              
00619ded              break;
00619d27          }
00619d27          
00619d2d          int32_t edi_1 = (ebp * 2);
00619d31          int16_t* eax_1 = *(uint32_t*)(&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + esi);
00619d38          arg1->jEncFmtQuant[ebp] = eax_1;
00619d54          _Scale_Char_Matrix(arg1->jquality, arg1->rawquanttables[ebp].quantizer, eax_1);
00619d7f          result = EP_Write_DQT(&arg1->state, 0, ((uint32_t)&*(uint8_t*)((char*)arg1->rawquanttables[0])[4][(ebp << 3)]), *(uint32_t*)(&arg1->jEncFmtQuant + (edi_1 << 1)));
00619d84          result_1 = result;
00619d84          
00619d8a          if (result != IJL_OK)
00619d8a              break;
00619d8a          
00619d8c          enum _DCTTYPE dcttype = arg1->dcttype;
00619d8c          
00619d91          if (dcttype != IJL_AAN)
00619d91          {
00619db3              if (dcttype != IJL_IPP)
00619ddc                  return 0xfffffff8;
00619ddc              
00619dbf              _FillEncoderQuantTable_IPP(*(uint32_t*)(&arg1->jEncFmtQuant + (edi_1 << 1)));
00619d91          }
00619d91          else
00619d9d              _FillEncoderQuantTable_AAN(*(uint32_t*)(&arg1->jEncFmtQuant + (edi_1 << 1)));
00619d9d          
00619dc4          esi += 0xb4;
00619dca          ebp += 1;
00619d27      }
00619d27      
00619df6      return result;
00619d00  }

00619da4              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
00619efa                                                                                8d b6 00 00 00 00                            ......

00619f00  enum _IJLERR Encode_Frame_Init(struct _JPEG_PROPERTIES* arg1)

00619f00  {
00619f0b      struct _STATE* esi = &arg1->state;
00619f11      void* ctx = arg1->state.ctx;
00619f28      *(uint32_t*)((char*)ctx + 0x58)(esi, arg1->JPGBytes, arg1->JPGSizeBytes);
00619f2e      enum _IJLERR result = EP_Write_SOI(esi);
00619f2e      
00619f35      if (result == IJL_OK)
00619f35      {
00619f3b          enum _IJLIOTYPE iotype = arg1->iotype;
00619f3b          
00619f5b          if ((((iotype != IJL_JFILE_WRITEWHOLEIMAGE && iotype != IJL_JBUFF_WRITEWHOLEIMAGE) && iotype != IJL_JFILE_WRITEHEADER) && iotype != IJL_JBUFF_WRITEHEADER))
00619f40              goto label_619f6d;
00619f40          
0061a1cf          enum _IJL_COLOR JPGColor = arg1->JPGColor;
0061a1cf          
0061a1da          if ((JPGColor == IJL_RGB || JPGColor == IJL_RGBA_FPX))
0061a1da          {
0061a237              result = EP_Write_APP14(0, arg1);
0061a237              
0061a23e              if (result == IJL_OK)
0061a23e              {
0061a1f4              label_61a1f4:
0061a1f4                  result = EP_Write_COM(arg1);
0061a1f4                  
0061a1fb                  if (result == IJL_OK)
0061a1fb                  {
0061a204                      result = _ownEncoderWriteJPEGTables(arg1);
0061a204                      
0061a20b                      if (result == IJL_OK)
0061a20b                      {
0061a211                          iotype = arg1->iotype;
00619f6d                      label_619f6d:
00619f6d                          
00619f6d                          if ((iotype == IJL_JFILE_WRITEENTROPY || iotype == IJL_JBUFF_WRITEENTROPY))
00619f6d                          {
00619ff1                              int32_t edi_1 = 0;
00619ff7                              int32_t maxquantindex = arg1->maxquantindex;
00619ff7                              
0061a005                              for (int32_t i = 0; i < maxquantindex; i += 1)
0061a005                              {
0061a00b                                  int32_t ebp = (i * 2);
0061a00b                                  
0061a03c                                  if ((arg1->jEncFmtQuant[i] == 0 && arg1->rawquanttables[i].quantizer != 0))
0061a03c                                  {
0061a03e                                      int16_t* eax_1 = *(uint32_t*)(&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi_1);
0061a045                                      *(uint32_t*)(&arg1->jEncFmtQuant + (ebp << 1)) = eax_1;
0061a061                                      _Scale_Char_Matrix(arg1->jquality, arg1->rawquanttables[i].quantizer, eax_1);
0061a066                                      enum _DCTTYPE dcttype = arg1->dcttype;
0061a066                                      
0061a06b                                      if (dcttype != IJL_AAN)
0061a06b                                      {
0061a093                                          if (dcttype != IJL_IPP)
0061a0bc                                              return 0xfffffff8;
0061a0bc                                          
0061a09f                                          _FillEncoderQuantTable_IPP(*(uint32_t*)(&arg1->jEncFmtQuant + (ebp << 1)));
0061a0a4                                          maxquantindex = arg1->maxquantindex;
0061a06b                                      }
0061a06b                                      else
0061a06b                                      {
0061a077                                          _FillEncoderQuantTable_AAN(*(uint32_t*)(&arg1->jEncFmtQuant + (ebp << 1)));
0061a07c                                          maxquantindex = arg1->maxquantindex;
0061a06b                                      }
0061a03c                                  }
0061a03c                                  
0061a019                                  edi_1 += 0xb4;
0061a005                              }
0061a005                              
0061a0d5                              if ((arg1->maxhuffindex * 2) > 0)
0061a0d5                              {
0061a0f8                                  struct _HUFFMAN_TABLE (* edi_2)[0x4] = &arg1->jFmtDcHuffman;
0061a0ff                                  int32_t i_2 = 0;
0061a10b                                  struct _HUFFMAN_TABLE (* ebp_1)[0x4] = &arg1->jFmtAcHuffman;
0061a10d                                  int32_t esi_1 = 0;
0061a1bc                                  int32_t i_1;
0061a1bc                                  
0061a1bc                                  do
0061a1bc                                  {
0061a118                                      arg1->jEncFmtDcHuffman[((uint32_t)&*(uint8_t*)((char*)arg1->rawhufftables[0])[9][esi_1])] = edi_2;
0061a127                                      arg1->jEncFmtAcHuffman[((uint32_t)&*(uint8_t*)((char*)arg1->rawhufftables[1])[9][esi_1])] = ebp_1;
0061a156                                      result = _BuildEncoderHuffmanTable(*(uint32_t*)(&arg1->rawhufftables + esi_1), *(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + esi_1), arg1->jEncFmtDcHuffman[((uint32_t)&*(uint8_t*)((char*)arg1->rawhufftables[0])[9][esi_1])]);
0061a156                                      
0061a15d                                      if (result != IJL_OK)
00619fda                                          return result;
00619fda                                      
0061a18b                                      result = _BuildEncoderHuffmanTable(*(uint32_t*)(&arg1->rawhufftables[1] + esi_1), *(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[1])[4] + esi_1), arg1->jEncFmtAcHuffman[((uint32_t)&*(uint8_t*)((char*)arg1->rawhufftables[1])[9][esi_1])]);
0061a18b                                      
0061a192                                      if (result != IJL_OK)
00619fda                                          return result;
00619fda                                      
0061a198                                      esi_1 += 0x18;
0061a19b                                      ebp_1 = &*(uint6592_t*)ebp_1[2];
0061a1a1                                      edi_2 = &*(uint6592_t*)edi_2[2];
0061a1ab                                      i_1 = (i_2 + 2);
0061a1b4                                      i_2 = i_1;
0061a1bc                                  } while (i_1 < (arg1->maxhuffindex * 2));
0061a0d5                              }
00619f6d                          }
00619f6d                          
00619f6f                          enum _DCTTYPE dcttype_1 = arg1->dcttype;
00619f6f                          
00619f74                          if (dcttype_1 == IJL_AAN)
00619f74                          {
00619f79                              int32_t ecx_1 = *(uint32_t*)((char*)ctx + 0xfc);
00619f7f                              *(uint32_t*)((char*)ctx + 0x44) = *(uint32_t*)((char*)ctx + 0x1c);
00619f82                              *(uint32_t*)((char*)ctx + 0x104) = ecx_1;
00619f74                          }
00619f74                          else if (dcttype_1 != IJL_IPP)
00619f8d                          {
00619fa6                              int32_t ecx_3 = *(uint32_t*)((char*)ctx + 0xfc);
00619fac                              *(uint32_t*)((char*)ctx + 0x44) = *(uint32_t*)((char*)ctx + 0x1c);
00619faf                              *(uint32_t*)((char*)ctx + 0x104) = ecx_3;
00619f8d                          }
00619f8d                          else
00619f8d                          {
00619f92                              int32_t ecx_2 = *(uint32_t*)((char*)ctx + 0x100);
00619f98                              *(uint32_t*)((char*)ctx + 0x44) = *(uint32_t*)((char*)ctx + 0x20);
00619f9b                              *(uint32_t*)((char*)ctx + 0x104) = ecx_2;
00619f8d                          }
00619f8d                          
00619fb5                          enum _IJLIOTYPE iotype_1 = arg1->iotype;
00619fb5                          
00619fbf                          if ((iotype_1 == IJL_JBUFF_WRITEHEADER || iotype_1 == IJL_JFILE_WRITEHEADER))
00619fde                              result = EP_Write_EOI(esi);
00619fde                          
00619fc9                          if ((((iotype_1 != IJL_JBUFF_WRITEHEADER && iotype_1 != IJL_JFILE_WRITEHEADER) || result == IJL_OK) && arg1->state.file != 0))
00619fce                              return _Flush_Buffer_To_File(esi);
0061a20b                      }
0061a1fb                  }
0061a23e              }
0061a1da          }
0061a1da          else if (JPGColor == IJL_YCBCRA_FPX)
0061a1df          {
0061a220              result = EP_Write_APP14(2, arg1);
0061a220              
0061a227              if (result == IJL_OK)
0061a227                  goto label_61a1f4;
0061a1df          }
0061a1df          else
0061a1df          {
0061a1e4              result = EP_Write_APP0(arg1);
0061a1e4              
0061a1eb              if (result == IJL_OK)
0061a1eb                  goto label_61a1f4;
0061a1df          }
00619f35      }
00619f35      
00619fda      return result;
00619f00  }

0061a022        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
0061a084              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0061a0af                                               90                                                                 .
0061a246                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

0061a250  enum _IJLERR Encode_Frame(struct _JPEG_PROPERTIES* arg1)

0061a250  {
0061a253      int32_t var_8 = 0xffffffff;
0061a255      int32_t var_c = 0x90714c;
0061a25a      int32_t (* var_10)() = j__except_handler3;
0061a265      TEB* fsbase;
0061a265      int32_t var_14 = *(uint32_t*)fsbase;
0061a266      *(uint32_t*)fsbase = &var_14;
0061a270      struct _SCAN* jscan_2;
0061a270      int32_t* var_1c = &jscan_2;
0061a27c      jscan_2 = nullptr;
0061a283      int32_t var_8_1 = 0;
0061a28c      int32_t var_38 = 0;
0061a28f      struct _JPEG_PROPERTIES* ebx = arg1;
0061a292      struct _STATE* ecx = &ebx->state;
0061a298      struct _STATE* var_34 = ecx;
0061a29b      jscan_2 = nullptr;
0061a29e      struct _SCAN* jscan_1 = ebx->jscan;
0061a2a6      enum _IJLERR result;
0061a2a6      
0061a2a6      if (jscan_1 == 0)
0061a2a6      {
0061a45d          struct _SCAN** var_40_11 = &jscan_2;
0061a460          void* jscan_3 = operator new(0x38);
0061a468          jscan_2 = jscan_3;
0061a468          
0061a46d          if (jscan_3 != 0)
0061a46d          {
0061a47e              int32_t JPGChannels = arg1->JPGChannels;
0061a481              *(uint32_t*)jscan_3 = JPGChannels;
0061a485              *(uint32_t*)((char*)jscan_3 + 4) = 0;
0061a488              *(uint32_t*)((char*)jscan_3 + 8) = 1;
0061a48f              *(uint32_t*)((char*)jscan_3 + 0xc) = 0x3f;
0061a496              __builtin_memset(((char*)jscan_3 + 0x10), 0, 0x24);
0061a4b9              struct _SCAN** var_40_12 = &jscan_2;
0061a4bb              void* comps_2 = operator new((JPGChannels * 0x18));
0061a4c3              struct _SCAN* jscan_5 = jscan_2;
0061a4c6              jscan_5->comps = comps_2;
0061a4c6              
0061a4cb              if (comps_2 == 0)
0061a607                  result = 0xfffffffb;
0061a4cb              else
0061a4cb              {
0061a4d1                  int32_t ebx_1 = 0;
0061a4d3                  int32_t var_30_1 = 0;
0061a4de                  struct _JPEG_PROPERTIES* var_20_1;
0061a4de                  
0061a4de                  if (jscan_5->ncomps <= 0)
0061a5ff                      var_20_1 = arg1;
0061a4de                  else
0061a4de                  {
0061a4e7                      var_20_1 = arg1;
0061a4e7                      
0061a4ef                      while (true)
0061a4ef                      {
0061a4ef                          int32_t* ecx_2 = (ebx_1 * 0x18);
0061a4f2                          *(uint32_t*)((char*)ecx_2 + comps_2) = ebx_1;
0061a4f7                          int32_t edx_10 = (ebx_1 << 4);
0061a50a                          *(uint32_t*)(&jscan_5->comps->hsampling + ecx_2) = *(uint32_t*)(&var_20_1->jframe.comps->hsampling + edx_10);
0061a51e                          *(uint32_t*)(&jscan_5->comps->vsampling + ecx_2) = *(uint32_t*)(&var_20_1->jframe.comps->vsampling + edx_10);
0061a527                          *(uint32_t*)(&jscan_5->comps->dc_table + ecx_2) = 0;
0061a52e                          *(uint32_t*)(&jscan_5->comps->ac_table + ecx_2) = 0;
0061a535                          *(uint32_t*)(&jscan_5->comps->quant_table + ecx_2) = 0;
0061a539                          ebx_1 += 1;
0061a53c                          int32_t var_30_2 = ebx_1;
0061a53c                          
0061a541                          if (ebx_1 >= jscan_5->ncomps)
0061a541                              break;
0061a541                          
0061a543                          comps_2 = jscan_5->comps;
0061a4ef                      }
0061a4de                  }
0061a4de                  
0061a555                  enum _IJLERR result_3 = EP_Write_SOF(var_34, &var_20_1->jframe);
0061a55d                  result = result_3;
0061a55d                  
0061a562                  if (result_3 == IJL_OK)
0061a562                  {
0061a568                      struct _JPEG_PROPERTIES* ebx_2 = arg1;
0061a56b                      int32_t restart_interv = ebx_2->jframe.restart_interv;
0061a56b                      
0061a573                      if (restart_interv == 0)
0061a573                          goto label_61a58b;
0061a573                      
0061a5e1                      enum _IJLERR result_7 = EP_Write_DRI(restart_interv, var_34);
0061a5e9                      result = result_7;
0061a5e9                      
0061a5ee                      if (result_7 == IJL_OK)
0061a5ee                      {
0061a5f4                          ebx_2 = arg1;
0061a58b                      label_61a58b:
0061a58b                          enum _IJLERR result_4 = EP_Write_SOS(var_34, ebx_2->JPGChannels, &ebx_2->HuffIdentifierDC, &ebx_2->HuffIdentifierAC);
0061a593                          result = result_4;
0061a593                          
0061a598                          if (result_4 == IJL_OK)
0061a598                          {
0061a5a1                              struct _SCAN** var_40_15 = &jscan_2;
0061a5a3                              enum _IJLERR result_5 = _Flush_Buffer_To_File(var_34);
0061a5ab                              result = result_5;
0061a5ab                              
0061a5b0                              if (result_5 == IJL_OK)
0061a5b0                              {
0061a5b9                                  struct _SCAN** var_40_16 = &jscan_2;
0061a5bb                                  enum _IJLERR result_6 = Set_Encode_Fast_Path(arg1);
0061a5c3                                  result = result_6;
0061a5c3                                  
0061a5c8                                  if (result_6 == IJL_OK)
0061a5c8                                  {
0061a5ce                                      jscan_1 = jscan_2;
0061a5d1                                      ecx = var_34;
0061a5d4                                      ebx = arg1;
0061a5d7                                      goto label_61a2b7;
0061a5c8                                  }
0061a5b0                              }
0061a598                          }
0061a5ee                      }
0061a562                  }
0061a4cb              }
0061a46d          }
0061a46d          else
0061a46f              result = 0xfffffffb;
0061a2a6      }
0061a2a6      else
0061a2a6      {
0061a2ac          jscan_2 = jscan_1;
0061a2b7      label_61a2b7:
0061a2b7          enum _IJLERR result_1;
0061a2b7          
0061a2b7          if (ebx->jframe.restart_interv != 0)
0061a2b7          {
0061a449              struct _SCAN** var_40_10 = &jscan_2;
0061a44d              result_1 = Encode_Scan_WRst(ebx, ecx, jscan_1);
0061a455              result = result_1;
0061a2b7          }
0061a2b7          else
0061a2b7          {
0061a2bd              struct _SCAN** var_40_1 = &jscan_2;
0061a2c1              result_1 = Encode_Scan(ebx, ecx, jscan_1);
0061a2c9              result = result_1;
0061a2b7          }
0061a2b7          
0061a2d8          if ((result_1 == IJL_INTERRUPT_OK || result_1 == IJL_ROI_OK))
0061a2d8          {
0061a434              arg1->interrupt = 0;
0061a43e              arg1->jscan = jscan_2;
0061a2d8          }
0061a2d8          else if (result_1 == IJL_OK)
0061a2e0          {
0061a2e6              if (result_1 == IJL_OK)
0061a2e6              {
0061a2ec                  struct _SCAN* jscan_4 = jscan_2;
0061a2f1                  struct _SCAN* jscan;
0061a2f1                  
0061a2f1                  if (jscan_4 == 0)
0061a3c9                      jscan = arg1->jscan;
0061a2f1                  else
0061a2f1                  {
0061a2f7                      struct _SCAN_COMPONENT* comps = jscan_4->comps;
0061a2f7                      
0061a2fc                      if (comps != 0)
0061a2fc                      {
0061a2fe                          struct _SCAN** var_40_2 = &jscan_2;
0061a300                          operator delete(comps);
0061a308                          jscan_4 = jscan_2;
0061a30b                          jscan_4->comps = nullptr;
0061a2fc                      }
0061a2fc                      
0061a312                      struct _SCAN** var_40_3 = &jscan_2;
0061a314                      operator delete(jscan_4);
0061a31e                      jscan_2 = nullptr;
0061a324                      jscan = nullptr;
0061a326                      arg1->jscan = nullptr;
0061a2f1                  }
0061a2f1                  
0061a32e                  if (jscan != 0)
0061a32e                  {
0061a330                      struct _SCAN_COMPONENT* comps_1 = jscan->comps;
0061a330                      
0061a335                      if (comps_1 != 0)
0061a335                      {
0061a337                          struct _SCAN** var_40_4 = &jscan_2;
0061a339                          operator delete(comps_1);
0061a344                          arg1->jscan->comps = nullptr;
0061a351                          jscan = arg1->jscan;
0061a335                      }
0061a335                      
0061a357                      struct _SCAN** var_40_5 = &jscan_2;
0061a359                      operator delete(jscan);
0061a364                      arg1->jscan = nullptr;
0061a32e                  }
0061a2e6              }
0061a2e6              
0061a371              struct _SCAN** var_40_6 = &jscan_2;
0061a373              enum _IJLERR result_2 = EP_Write_EOI(var_34);
0061a37b              result = result_2;
0061a37b              
0061a380              if (result_2 == IJL_OK)
0061a380              {
0061a422                  struct _SCAN** var_40_9 = &jscan_2;
0061a42c                  result = _Flush_Buffer_To_File(var_34);
0061a3bd                  int32_t var_8_2 = 0xffffffff;
0061a380              }
0061a2e0          }
0061a2a6      }
0061a2a6      
0061a3d9      if ((result < IJL_OK && jscan_2 != 0))
0061a3d9      {
0061a3e3          if (jscan_2->comps != 0)
0061a3e3          {
0061a3eb              struct _SCAN** var_40_7 = &jscan_2;
0061a3ed              operator delete(jscan_2->comps);
0061a3f5              jscan_2->comps = nullptr;
0061a3e3          }
0061a3e3          
0061a402          struct _SCAN** var_40_8 = &jscan_2;
0061a404          operator delete(jscan_2);
0061a411          jscan_2 = nullptr;
0061a414          arg1->jscan = nullptr;
0061a3d9      }
0061a3d9      
0061a39f      *(uint32_t*)fsbase = var_14;
0061a3a9      return result;
0061a250  }

0061a3aa                                8b 65 e8 c7 45 cc ff ff ff ff c7 45 fc ff ff ff ff eb c9                     .e..E......E.......
0061a613                                                           b8 01 00 00 00 c3 8d b4 26 00 00 00 00                     ........&....

0061a620  int32_t sub_61a620(void* arg1, int32_t* arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7)

0061a620  {
0061a621      int32_t esi;
0061a621      int32_t var_8 = esi;
0061a622      int32_t var_c = esi;
0061a62b      int32_t* eax = arg2[0xd];
0061a62e      *(uint32_t*)arg2 = 1;
0061a634      *(uint32_t*)eax = arg3;
0061a636      int32_t edx_1 = (arg3 << 4);
0061a64a      *(uint32_t*)(arg2[0xd] + 4) = *(uint32_t*)((edx_1 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 4);
0061a65a      *(uint32_t*)(arg2[0xd] + 8) = *(uint32_t*)((edx_1 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 8);
0061a661      arg2[2] = arg4;
0061a668      arg2[3] = arg5;
0061a66f      arg2[4] = arg6;
0061a676      arg2[5] = arg7;
0061a67e      return arg7;
0061a620  }

0061a67f                                                                                               90                                 .

0061a680  void sub_61a680(void* arg1, int32_t* arg2, int32_t arg3, int32_t arg4, int32_t arg5)

0061a680  {
0061a681      int32_t esi;
0061a681      int32_t var_8 = esi;
0061a687      int32_t ecx = arg3;
0061a687      
0061a68e      if (ecx <= 4)
0061a68e      {
0061a694          int32_t i = 0;
0061a694          
0061a698          if (ecx > 0)
0061a698          {
0061a6a1              if (ecx >= 4)
0061a6a1              {
0061a6af                  int32_t* ebp_1 = nullptr;
0061a6b4                  int32_t ebx_1 = 0;
0061a6c1                  int32_t var_1c_1 = 2;
0061a6c5                  int32_t var_18_1 = 1;
0061a6c5                  
0061a76d                  do
0061a76d                  {
0061a6d4                      *(uint32_t*)((char*)ebp_1 + arg2[0xd]) = i;
0061a6e5                      *(uint32_t*)(((char*)ebp_1 + arg2[0xd]) + 4) = *(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 4);
0061a6f6                      i += 3;
0061a6f9                      *(uint32_t*)(((char*)ebp_1 + arg2[0xd]) + 8) = *(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 8);
0061a704                      *(uint32_t*)(((char*)ebp_1 + arg2[0xd]) + 0x18) = var_18_1;
0061a715                      *(uint32_t*)(((char*)ebp_1 + arg2[0xd]) + 0x1c) = *(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 0x14);
0061a726                      *(uint32_t*)(((char*)ebp_1 + arg2[0xd]) + 0x20) = *(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 0x18);
0061a731                      *(uint32_t*)(((char*)ebp_1 + arg2[0xd]) + 0x30) = var_1c_1;
0061a742                      *(uint32_t*)(((char*)ebp_1 + arg2[0xd]) + 0x34) = *(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 0x24);
0061a753                      *(uint32_t*)(((char*)ebp_1 + arg2[0xd]) + 0x38) = *(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 0x28);
0061a757                      ebp_1 = &ebp_1[0x12];
0061a75a                      ebx_1 += 0x30;
0061a75d                      var_18_1 += 3;
0061a766                      var_1c_1 += 3;
0061a76d                  } while (i <= (ecx - 4));
0061a6a1              }
0061a6a1              
0061a77c              int32_t ebp_2 = (i * 0x18);
0061a781              int32_t ebx_3 = (i << 4);
0061a781              
0061a7c6              do
0061a7c6              {
0061a793                  *(uint32_t*)(ebp_2 + arg2[0xd]) = i;
0061a7a4                  *(uint32_t*)((ebp_2 + arg2[0xd]) + 4) = *(uint32_t*)((ebx_3 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 4);
0061a7ae                  int32_t esi_20 = *(uint32_t*)((ebx_3 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 8);
0061a7b5                  ebx_3 += 0x10;
0061a7b8                  i += 1;
0061a7b9                  *(uint32_t*)((ebp_2 + arg2[0xd]) + 8) = esi_20;
0061a7bd                  ebp_2 += 0x18;
0061a7c6              } while (i < arg3);
0061a7c6              
0061a7c8              ecx = arg3;
0061a698          }
0061a698          
0061a7d8          *(uint32_t*)arg2 = ecx;
0061a7dc          arg2[2] = 0;
0061a7df          arg2[3] = 0;
0061a7e2          arg2[4] = arg4;
0061a7e5          arg2[5] = arg5;
0061a68e      }
0061a680  }


0061a7f0  int32_t sub_61a7f0(void* arg1, int32_t* arg2)

0061a7f0  {
0061a7fb      int32_t ecx = *(uint32_t*)((char*)arg1 + 0x54);
0061a7fb      
0061a801      if (ecx == 1)
0061a801      {
0061a8c1          if (*(uint32_t*)((char*)arg1 + 0x58) == 4)
0061a8c1          {
0061a8c3              *(uint32_t*)arg2 = 6;
0061a8ca              return 0;
0061a8c1          }
0061a8c1          
0061a8cb          *(uint32_t*)arg2 = 0;
0061a8d7          return 0xfffffff8;
0061a801      }
0061a801      
0061a80a      if (ecx == 2)
0061a80a      {
0061a8a4          if (*(uint32_t*)((char*)arg1 + 0x58) == 0xff)
0061a8a4          {
0061a8a6              *(uint32_t*)arg2 = 5;
0061a8ad              return 0;
0061a8a4          }
0061a8a4          
0061a8ae          *(uint32_t*)arg2 = 0;
0061a8ba          return 0xfffffff8;
0061a80a      }
0061a80a      
0061a813      if (ecx == 3)
0061a813      {
0061a815          int32_t ecx_1 = *(uint32_t*)((char*)arg1 + 0x58);
0061a815          
0061a81b          if (ecx_1 == 1)
0061a81b          {
0061a847              *(uint32_t*)arg2 = 8;
0061a84e              return 0;
0061a81b          }
0061a81b          
0061a820          if (ecx_1 != 3)
0061a820          {
0061a830              if (ecx_1 == 0xff)
0061a830              {
0061a832                  *(uint32_t*)arg2 = 8;
0061a839                  return 0;
0061a830              }
0061a830              
0061a83a              *(uint32_t*)arg2 = 0;
0061a846              return 0xfffffff8;
0061a820          }
0061a820          
0061a822          *(uint32_t*)arg2 = 0xa;
0061a829          return 0;
0061a813      }
0061a813      
0061a852      if (ecx != 4)
0061a852      {
0061a88e          *(uint32_t*)arg2 = 0;
0061a89a          return 0xfffffff8;
0061a852      }
0061a852      
0061a854      int32_t ecx_2 = *(uint32_t*)((char*)arg1 + 0x58);
0061a854      
0061a85a      if (ecx_2 == 5)
0061a85a      {
0061a886          *(uint32_t*)arg2 = 0xa;
0061a88d          return 0;
0061a85a      }
0061a85a      
0061a85f      if (ecx_2 == 6)
0061a85f      {
0061a861          *(uint32_t*)arg2 = 0xb;
0061a868          return 0;
0061a85f      }
0061a85f      
0061a86f      if (ecx_2 == 0xff)
0061a86f      {
0061a871          *(uint32_t*)arg2 = 0xa;
0061a878          return 0;
0061a86f      }
0061a86f      
0061a879      *(uint32_t*)arg2 = 0;
0061a885      return 0xfffffff8;
0061a7f0  }

0061a8d8                                                                          90 8d b4 26 00 00 00 00                          ...&....

0061a8e0  int32_t sub_61a8e0(void* arg1, int32_t arg2)

0061a8e0  {
0061a8f1      uint32_t ebx = (arg2 * 0x38);
0061a8f7      void* eax = operator new(ebx);
0061a8fc      *(uint32_t*)((char*)arg1 + 0x37e0) = eax;
0061a8fc      
0061a904      if (eax == 0)
0061a906          return 0xfffffffb;
0061a906      
0061a914      __g_memzero(eax, ebx);
0061a914      
0061a91e      if (arg2 <= 0)
0061a969          return 0;
0061a969      
0061a920      int32_t ebx_1 = 0;
0061a92b      int32_t ebp_1 = 0;
0061a92b      
0061a95a      do
0061a95a      {
0061a942          *(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37e0)) + 0x34) = operator new(0x60);
0061a942          
0061a952          if (*(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37e0)) + 0x34) == 0)
0061a96a              return 0xfffffffb;
0061a96a          
0061a954          ebx_1 += 0x38;
0061a957          ebp_1 += 1;
0061a95a      } while (ebp_1 < arg2);
0061a95a      
0061a95c      return 0;
0061a8e0  }

0061a971                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

0061a980  int32_t sub_61a980(void* arg1, int32_t* arg2)

0061a980  {
0061a99a      int32_t result = sub_61a7f0(arg1, arg2);
0061a99a      
0061a99e      if (result != 0)
0061a99e          goto label_61aa08;
0061a99e      
0061a9af      result = sub_61a8e0(arg1, *(uint32_t*)arg2);
0061a9af      
0061a9b3      if (result != 0)
0061a9b3          goto label_61aa08;
0061a9b3      
0061a9b5      int32_t edx_1 = *(uint32_t*)((char*)arg1 + 0x54);
0061a9b5      
0061b7e6      if ((edx_1 == 1 && *(uint32_t*)((char*)arg1 + 0x58) == 4))
0061b7e6      {
0061b80e          sub_61a680(arg1, *(uint32_t*)((char*)arg1 + 0x37e0), 1, 0, 1);
0061b845          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x38), 0, 1, 5, 0, 2);
0061b87c          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x70), 0, 6, 0x3f, 0, 2);
0061b8b9          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xa8), 0, 1, 0x3f, 2, 1);
0061b8e6          sub_61a680(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xe0), 1, 1, 0);
0061b91d          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x118), 0, 1, 0x3f, 1, 0);
0061b7e6      }
0061b7e6      else if ((edx_1 == 2 && *(uint32_t*)((char*)arg1 + 0x58) == 0xff))
0061b6da      {
0061b6ff          sub_61a680(arg1, *(uint32_t*)((char*)arg1 + 0x37e0), 2, 0, 0);
0061b732          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x38), 0, 1, 5, 0, 0);
0061b766          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x70), 1, 1, 5, 0, 0);
0061b79c          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xa8), 0, 6, 0x3f, 0, 0);
0061b7d6          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xe0), 1, 6, 0x3f, 0, 0);
0061b6da      }
0061b6da      else if ((edx_1 == 3 && *(uint32_t*)((char*)arg1 + 0x58) == 3))
0061b49e      {
0061b4c9          sub_61a680(arg1, *(uint32_t*)((char*)arg1 + 0x37e0), 3, 0, 1);
0061b500          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x38), 0, 1, 5, 0, 2);
0061b53a          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x70), 2, 1, 0x3f, 0, 1);
0061b573          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xa8), 1, 1, 0x3f, 0, 1);
0061b5ad          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xe0), 0, 6, 0x3f, 0, 2);
0061b5ea          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x118), 0, 1, 0x3f, 2, 1);
0061b61a          sub_61a680(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x150), 3, 1, 0);
0061b657          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x188), 2, 1, 0x3f, 1, 0);
0061b690          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x1c0), 1, 1, 0x3f, 1, 0);
0061b6c7          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x1f8), 0, 1, 0x3f, 1, 0);
0061b49e      }
0061b49e      else if ((edx_1 == 3 && *(uint32_t*)((char*)arg1 + 0x58) == 1))
0061b2e8      {
0061b313          sub_61a680(arg1, *(uint32_t*)((char*)arg1 + 0x37e0), 3, 0, 1);
0061b346          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x38), 0, 1, 5, 0, 0);
0061b37a          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x70), 1, 1, 5, 0, 0);
0061b3b4          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xa8), 2, 1, 5, 0, 0);
0061b3e4          sub_61a680(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xe0), 3, 1, 0);
0061b41a          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x118), 0, 6, 0x3f, 0, 0);
0061b454          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x150), 1, 6, 0x3f, 0, 0);
0061b48e          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x188), 2, 6, 0x3f, 0, 0);
0061b2e8      }
0061b2e8      else if ((edx_1 == 3 && *(uint32_t*)((char*)arg1 + 0x58) == 0xff))
0061b132      {
0061b15d          sub_61a680(arg1, *(uint32_t*)((char*)arg1 + 0x37e0), 3, 0, 1);
0061b190          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x38), 0, 1, 5, 0, 0);
0061b1c4          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x70), 1, 1, 5, 0, 0);
0061b1fe          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xa8), 2, 1, 5, 0, 0);
0061b22e          sub_61a680(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xe0), 3, 1, 0);
0061b264          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x118), 0, 6, 0x3f, 0, 0);
0061b29e          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x150), 1, 6, 0x3f, 0, 0);
0061b2d8          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x188), 2, 6, 0x3f, 0, 0);
0061b132      }
0061b132      else if ((edx_1 == 4 && *(uint32_t*)((char*)arg1 + 0x58) == 5))
0061af05      {
0061af30          sub_61a680(arg1, *(uint32_t*)((char*)arg1 + 0x37e0), 4, 0, 1);
0061af63          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x38), 0, 1, 5, 0, 0);
0061af97          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x70), 1, 1, 5, 0, 0);
0061afd1          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xa8), 2, 1, 5, 0, 0);
0061b00b          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xe0), 3, 1, 5, 0, 0);
0061b03b          sub_61a680(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x118), 4, 1, 0);
0061b071          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x150), 0, 6, 0x3f, 0, 0);
0061b0ab          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x188), 1, 6, 0x3f, 0, 0);
0061b0e5          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x1c0), 2, 6, 0x3f, 0, 0);
0061b11f          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x1f8), 3, 6, 0x3f, 0, 0);
0061af05      }
0061af05      else if ((edx_1 == 4 && *(uint32_t*)((char*)arg1 + 0x58) == 6))
0061ac92      {
0061acbd          sub_61a680(arg1, *(uint32_t*)((char*)arg1 + 0x37e0), 4, 0, 1);
0061acf4          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x38), 0, 1, 5, 0, 2);
0061ad2e          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x70), 2, 1, 0x3f, 0, 1);
0061ad67          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xa8), 1, 1, 0x3f, 0, 1);
0061ada1          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xe0), 3, 1, 0x3f, 0, 0);
0061addb          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x118), 0, 6, 0x3f, 0, 2);
0061ae18          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x150), 0, 1, 0x3f, 2, 1);
0061ae48          sub_61a680(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x188), 4, 1, 0);
0061ae85          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x1c0), 2, 1, 0x3f, 1, 0);
0061aebe          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x1f8), 1, 1, 0x3f, 1, 0);
0061aef5          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x230), 0, 1, 0x3f, 1, 0);
0061ac92      }
0061ac92      else if ((edx_1 == 4 && *(uint32_t*)((char*)arg1 + 0x58) == 0xff))
0061aa6c      {
0061aa93          sub_61a680(arg1, *(uint32_t*)((char*)arg1 + 0x37e0), 4, 0, 1);
0061aac6          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x38), 0, 1, 5, 0, 0);
0061aafa          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x70), 1, 1, 5, 0, 0);
0061ab34          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xa8), 2, 1, 5, 0, 0);
0061ab6e          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0xe0), 3, 1, 5, 0, 0);
0061ab9e          sub_61a680(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x118), 4, 1, 0);
0061abd4          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x150), 0, 6, 0x3f, 0, 0);
0061ac0e          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x188), 1, 6, 0x3f, 0, 0);
0061ac48          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x1c0), 2, 6, 0x3f, 0, 0);
0061ac82          sub_61a620(arg1, (*(uint32_t*)((char*)arg1 + 0x37e0) + 0x1f8), 3, 6, 0x3f, 0, 0);
0061aa6c      }
0061aa6c      else
0061aa6c      {
0061a9fc          result = 0xfffffff8;
0061aa08      label_61aa08:
0061aa08          
0061aa08          if (*(uint32_t*)arg2 > 0)
0061aa08          {
0061aa15              int32_t ebx_1 = 0;
0061aa19              int32_t i = 0;
0061aa19              
0061aa38              do
0061aa38              {
0061aa2d                  operator delete(*(uint32_t*)((ebx_1 + *(uint32_t*)((char*)arg1 + 0x37e0)) + 0x34));
0061aa32                  ebx_1 += 0x38;
0061aa35                  i += 1;
0061aa38              } while (i < *(uint32_t*)arg2);
0061aa08          }
0061aa08          
0061aa4b          operator delete(*(uint32_t*)((char*)arg1 + 0x37e0));
0061aa50          *(uint32_t*)((char*)arg1 + 0x37e0) = 0;
0061aa6c      }
0061aa6c      
0061aa62      return result;
0061a980  }

0061b927                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

0061b930  enum _IJLERR Encode_Frame_P(struct _JPEG_PROPERTIES* arg1)

0061b930  {
0061b933      int32_t var_8 = 0xffffffff;
0061b935      int32_t var_c = 0x907164;
0061b93a      int32_t (* var_10)() = j__except_handler3;
0061b945      TEB* fsbase;
0061b945      int32_t var_14 = *(uint32_t*)fsbase;
0061b946      *(uint32_t*)fsbase = &var_14;
0061b953      void var_9b4;
0061b953      void* var_1c = &var_9b4;
0061b961      int32_t var_1ac = 0;
0061b967      int32_t var_1a8 = 0;
0061b96d      int32_t var_1a4 = 0;
0061b985      int32_t var_19c = 0;
0061b98b      int32_t var_8_1 = 0;
0061b992      int32_t ecx = 0;
0061b996      int32_t var_198 = 0;
0061b99c      int32_t edx_1 = 0;
0061b99e      int32_t var_194 = 0;
0061b9a7      int32_t ncomps = arg1->jframe.ncomps;
0061b9a7      
0061b9af      if (ncomps > 0)
0061b9af      {
0061b9b1          struct _FRAME_COMPONENT* comps_2 = arg1->jframe.comps;
0061b9b1          
0061b9d8          do
0061b9d8          {
0061b9b9              int32_t ebx_2 = (ecx << 4);
0061b9c5              edx_1 += (*(uint32_t*)(&comps_2->hsampling + ebx_2) * *(uint32_t*)(&comps_2->vsampling + ebx_2));
0061b9c7              int32_t var_194_1 = edx_1;
0061b9cd              ecx += 1;
0061b9d0              int32_t var_198_1 = ecx;
0061b9d8          } while (ecx < ncomps);
0061b9af      }
0061b9af      
0061b9e0      int32_t ecx_2 = (arg1->numxMCUs * arg1->numyMCUs);
0061b9e4      int32_t var_190 = ecx_2;
0061b9ea      int32_t edx_2 = (edx_1 << 6);
0061b9ed      int32_t var_18c = edx_2;
0061b9f3      int32_t edx_3 = (edx_2 * ecx_2);
0061b9f6      int32_t var_188 = edx_3;
0061b9fe      void* var_9b8 = &var_9b4;
0061ba00      void* eax_3 = operator new((edx_3 * 2));
0061ba0b      arg1->coef_buffer = eax_3;
0061ba13      enum _IJLERR var_19c_1;
0061ba13      
0061ba13      if (eax_3 == 0)
0061c2ef          var_19c_1 = 0xfffffffb;
0061ba13      else if (arg1->jscan == 0)
0061ba21      {
0061bf46          int32_t eax_45 = sub_61a980(arg1, &var_1ac);
0061bf4e          int32_t var_19c_2 = eax_45;
0061bf4e          
0061bf56          if (eax_45 != 0)
0061bf56          {
0061c056              *(uint32_t*)fsbase = var_14;
0061c060              return eax_45;
0061bf56          }
0061bf56          
0061bf5c          struct _JPEG_PROPERTIES* edx_24 = arg1;
0061bf5f          enum _IJLIOTYPE iotype = edx_24->iotype;
0061bf5f          
0061bf69          if ((iotype == IJL_JBUFF_WRITEWHOLEIMAGE || iotype == IJL_JFILE_WRITEWHOLEIMAGE))
0061bf64              goto label_61bf7d;
0061bf64          
0061c02a          void* var_9b8_23 = &var_9b4;
0061c02c          enum _IJLERR eax_53 = EP_Write_SOI(&arg1->state);
0061c034          var_19c_1 = eax_53;
0061c034          
0061c03c          if (eax_53 == IJL_OK)
0061c03c          {
0061c2e7              edx_24 = arg1;
0061bf7d          label_61bf7d:
0061bf7d              enum _IJLERR eax_47 = EP_Write_SOF2(&arg1->state, &edx_24->jframe);
0061bf85              var_19c_1 = eax_47;
0061bf85              
0061bf8d              if (eax_47 == IJL_OK)
0061bf8d              {
0061bf93                  struct _JPEG_PROPERTIES* eax_48 = arg1;
0061bf96                  int32_t restart_interv = eax_48->jframe.restart_interv;
0061bf96                  
0061bf9e                  if (restart_interv == 0)
0061bf9e                      goto label_61bfa4;
0061bf9e                  
0061c2c9                  enum _IJLERR eax_73 = EP_Write_DRI(restart_interv, &arg1->state);
0061c2d1                  var_19c_1 = eax_73;
0061c2d1                  
0061c2d9                  if (eax_73 == IJL_OK)
0061c2d9                  {
0061c2df                      eax_48 = arg1;
0061bfa4                  label_61bfa4:
0061bfa4                      void* var_9b8_22 = &var_9b4;
0061bfa6                      enum _IJLERR eax_49 = Set_Encode_Fast_Path(eax_48);
0061bfae                      var_19c_1 = eax_49;
0061bfae                      
0061bfb6                      if (eax_49 == IJL_OK)
0061bfb6                      {
0061bfbf                          struct _JPEG_PROPERTIES* var_28_1 = arg1;
0061bfc2                          struct _RAW_DATA_TYPES_STATE* raw_coefs = arg1->raw_coefs;
0061bfc2                          
0061bfd4                          if ((raw_coefs == 0 || raw_coefs->data_type != 0))
0061bfd4                          {
0061c2a1                              void* var_9b8_25 = &var_9b4;
0061c2a6                              Fill_coeffs_buffer(var_28_1);
0061c2ae                              var_19c_1 = IJL_OK;
0061bfd4                          }
0061bfd4                          else
0061bfd4                          {
0061bfda                              int32_t ebx_5 = 0;
0061bfde                              int32_t var_184_1 = 0;
0061bfe4                              int32_t edx_26 = 0;
0061bfe6                              int32_t var_180_1 = 0;
0061bfef                              int32_t ncomps_1 = var_28_1->jframe.ncomps;
0061bfef                              
0061bff7                              if (ncomps_1 > 0)
0061bff7                              {
0061bff9                                  struct _FRAME_COMPONENT* comps_3 = var_28_1->jframe.comps;
0061bff9                                  
0061c020                                  do
0061c020                                  {
0061c001                                      int32_t ecx_13 = (edx_26 << 4);
0061c00d                                      ebx_5 += (*(uint32_t*)(&comps_3->vsampling + ecx_13) * *(uint32_t*)(&comps_3->hsampling + ecx_13));
0061c00f                                      int32_t var_184_2 = ebx_5;
0061c015                                      edx_26 += 1;
0061c018                                      int32_t var_180_2 = edx_26;
0061c020                                  } while (edx_26 < ncomps_1);
0061bff7                              }
0061bff7                              
0061c061                              int32_t ebx_6 = (ebx_5 << 6);
0061c06d                              int32_t numxMCUs = var_28_1->numxMCUs;
0061c070                              int32_t ebx_7 = (ebx_6 * numxMCUs);
0061c07b                              int32_t var_38_1 = 0;
0061c07e                              int32_t var_17c_1 = 0;
0061c088                              int32_t numyMCUs = var_28_1->numyMCUs;
0061c088                              
0061c08d                              if (numyMCUs > 0)
0061c08d                              {
0061c296                                  int32_t edx_38;
0061c296                                  
0061c296                                  do
0061c296                                  {
0061c095                                      int32_t var_34_1 = 0;
0061c098                                      int32_t var_178_1 = 0;
0061c098                                      
0061c0a4                                      if (numxMCUs > 0)
0061c0a4                                      {
0061c279                                          int32_t edx_35;
0061c279                                          
0061c279                                          do
0061c279                                          {
0061c0cd                                              void* ebx_12 = ((((var_38_1 * 2) * ebx_7) + var_28_1->coef_buffer) + ((var_34_1 * 2) * ebx_6));
0061c0cf                                              void* var_1a8_1 = ebx_12;
0061c0d5                                              int32_t edx_29 = 0;
0061c0d7                                              int32_t var_174_1 = 0;
0061c0d7                                              
0061c0e3                                              if (ncomps_1 > 0)
0061c0e3                                              {
0061c0f2                                                  struct _FRAME_COMPONENT* comps = var_28_1->jframe.comps;
0061c0f2                                                  
0061c262                                                  do
0061c262                                                  {
0061c0f7                                                      int32_t var_2c_1 = 0;
0061c0fa                                                      int32_t var_170_1 = 0;
0061c106                                                      int32_t edi_7 = (edx_29 << 4);
0061c10c                                                      int32_t esi_14 = *(uint32_t*)(&comps->vsampling + edi_7);
0061c10c                                                      
0061c112                                                      if (esi_14 > 0)
0061c112                                                      {
0061c11b                                                          int32_t edi_8 = *(uint32_t*)(&comps->hsampling + edi_7);
0061c248                                                          int32_t eax_69;
0061c248                                                          
0061c248                                                          do
0061c248                                                          {
0061c121                                                              int32_t var_30_1 = 0;
0061c124                                                              int32_t var_16c_1 = 0;
0061c124                                                              
0061c130                                                              if (edi_8 > 0)
0061c130                                                              {
0061c231                                                                  int32_t eax_67;
0061c231                                                                  
0061c231                                                                  do
0061c231                                                                  {
0061c177                                                                      int32_t esi_19 = (((((esi_14 * (((var_38_1 << 7) * numxMCUs) * edi_8)) + var_28_1->raw_coefs->raw_ptrs[edx_29]) + (numxMCUs * ((var_2c_1 << 7) * edi_8))) + (edi_8 * (var_34_1 << 4))) + (var_30_1 << 4));
0061c179                                                                      int32_t var_168_1 = esi_19;
0061c17f                                                                      int32_t i_1 = 0;
0061c189                                                                      void* var_160_1 = ebx_12;
0061c1f6                                                                      int32_t ebx_14;
0061c1f6                                                                      int32_t i;
0061c1f6                                                                      
0061c1f6                                                                      do
0061c1f6                                                                      {
0061c194                                                                          __g_memcpy(ebx_12, esi_19, 0x10, &var_9b4);
0061c1a3                                                                          i = (i_1 + 1);
0061c1a6                                                                          i_1 = i;
0061c1af                                                                          var_28_1 = arg1;
0061c1b2                                                                          numxMCUs = arg1->numxMCUs;
0061c1b5                                                                          struct _FRAME_COMPONENT* comps_1 = arg1->jframe.comps;
0061c1bb                                                                          comps = comps_1;
0061c1be                                                                          edx_29 = var_174_1;
0061c1c6                                                                          ebx_14 = (edx_29 << 4);
0061c1cc                                                                          edi_8 = *(uint32_t*)(&comps_1->hsampling + ebx_14);
0061c1d8                                                                          esi_19 = (((numxMCUs << 4) * edi_8) + var_168_1);
0061c1de                                                                          var_168_1 = esi_19;
0061c1ea                                                                          ebx_12 = ((char*)var_1a8_1 + 0x10);
0061c1ed                                                                          var_1a8_1 = ebx_12;
0061c1f6                                                                      } while (i < 8);
0061c1fe                                                                      var_38_1 = var_17c_1;
0061c207                                                                      var_34_1 = var_178_1;
0061c210                                                                      esi_14 = *(uint32_t*)(&comps->vsampling + ebx_14);
0061c21a                                                                      var_2c_1 = var_170_1;
0061c223                                                                      eax_67 = (var_16c_1 + 1);
0061c226                                                                      var_30_1 = eax_67;
0061c229                                                                      var_16c_1 = eax_67;
0061c231                                                                  } while (eax_67 < edi_8);
0061c130                                                              }
0061c130                                                              
0061c23a                                                              eax_69 = (var_2c_1 + 1);
0061c23d                                                              var_2c_1 = eax_69;
0061c240                                                              var_170_1 = eax_69;
0061c248                                                          } while (eax_69 < esi_14);
0061c251                                                          ncomps_1 = var_28_1->jframe.ncomps;
0061c112                                                      }
0061c112                                                      
0061c257                                                      edx_29 += 1;
0061c25a                                                      var_174_1 = edx_29;
0061c262                                                  } while (edx_29 < ncomps_1);
0061c0e3                                              }
0061c0e3                                              
0061c26b                                              edx_35 = (var_34_1 + 1);
0061c26e                                              var_34_1 = edx_35;
0061c271                                              var_178_1 = edx_35;
0061c279                                          } while (edx_35 < numxMCUs);
0061c282                                          numyMCUs = var_28_1->numyMCUs;
0061c0a4                                      }
0061c0a4                                      
0061c288                                      edx_38 = (var_38_1 + 1);
0061c28b                                      var_38_1 = edx_38;
0061c28e                                      var_17c_1 = edx_38;
0061c296                                  } while (edx_38 < numyMCUs);
0061c08d                              }
0061bfd4                          }
0061bfd4                          
0061bfd4                          goto label_61ba27;
0061bfb6                      }
0061c2d9                  }
0061bf8d              }
0061c03c          }
0061ba21      }
0061ba21      else
0061ba21      {
0061ba27      label_61ba27:
0061ba27          int32_t ecx_3 = 0;
0061ba2b          int32_t var_198_2 = 0;
0061ba31          int32_t var_15c_1 = 0;
0061ba31          
0061ba3f          if (var_1ac <= 0)
0061ba3f          {
0061bea9          label_61bea9:
0061bea9              void* var_9b8_17 = &var_9b4;
0061beab              enum _IJLERR eax_39 = EP_Write_EOI(&arg1->state);
0061beb3              var_19c_1 = eax_39;
0061beb3              
0061bebb              if (eax_39 == IJL_OK)
0061bebb              {
0061bec7                  void* var_9b8_18 = &var_9b4;
0061bec9                  enum _IJLERR eax_41 = _Flush_Buffer_To_File(&arg1->state);
0061bed1                  var_19c_1 = eax_41;
0061bed1                  
0061bed9                  if (eax_41 == IJL_OK)
0061bedf                      int32_t var_8_2 = 0xffffffff;
0061bebb              }
0061ba3f          }
0061ba3f          else
0061ba3f          {
0061ba51              while (true)
0061ba51              {
0061ba51                  void* edx_8 = &arg1->jscan[ecx_3];
0061ba69                  __g_memzero(&var_9b4, 0x404);
0061ba78                  void var_5b0;
0061ba78                  __g_memzero(&var_5b0, 0x404);
0061ba8a                  void var_158;
0061ba8a                  __g_memzero(&var_158, 0x10);
0061ba9f                  void var_148;
0061ba9f                  __g_memzero(&var_148, 0x100);
0061bac1                  Gather_statistics(arg1, &arg1->state, edx_8, &var_9b4);
0061bac9                  var_19c_1 = IJL_OK;
0061bad7                  void* eax_6 = edx_8;
0061baed                  struct _JPEG_PROPERTIES* esi_4;
0061baed                  
0061baed                  if ((*(uint32_t*)((char*)eax_6 + 8) != 0 || *(uint32_t*)((char*)eax_6 + 0xc) != 0))
0061baed                  {
0061bc77                      if (**(uint32_t**)((char*)eax_6 + 0x34) != 0)
0061bc77                      {
0061bd1d                          int32_t var_48_4 = 1;
0061bd36                          void* var_9b8_11 = &var_9b4;
0061bd3a                          Make_optimal_huff_table(&var_5b0, &var_158, &var_148);
0061bd56                          void* var_9b8_12 = &var_9b4;
0061bd5a                          enum _IJLERR eax_27 = _BuildEncoderHuffmanTable(&var_158, &var_148, &arg1->jFmtAcHuffman[1]);
0061bd62                          var_19c_1 = eax_27;
0061bd62                          
0061bd6a                          if (eax_27 != IJL_OK)
0061bd6a                              break;
0061bd6a                          
0061bd75                          arg1->jEncFmtAcHuffman[1] = &arg1->jFmtAcHuffman[1];
0061bd92                          void* var_9b8_13 = &var_9b4;
0061bd98                          enum _IJLERR eax_30 = EP_Write_DHT_Ex(&arg1->state, &var_158, &var_148, 1, 1);
0061bda0                          var_19c_1 = eax_30;
0061bda0                          
0061bda8                          if (eax_30 != IJL_OK)
0061bda8                              break;
0061bda8                          
0061bdaa                          eax_6 = edx_8;
0061bdb0                          esi_4 = arg1;
0061bc77                      }
0061bc77                      else
0061bc77                      {
0061bc7d                          int32_t var_48_3 = 0;
0061bc96                          void* var_9b8_8 = &var_9b4;
0061bc9a                          Make_optimal_huff_table(&var_9b4, &var_158, &var_148);
0061bcb6                          void* var_9b8_9 = &var_9b4;
0061bcba                          enum _IJLERR eax_22 = _BuildEncoderHuffmanTable(&var_158, &var_148, &arg1->jFmtAcHuffman);
0061bcc2                          var_19c_1 = eax_22;
0061bcc2                          
0061bcca                          if (eax_22 != IJL_OK)
0061bcca                              break;
0061bcca                          
0061bcd9                          arg1->jEncFmtAcHuffman[0] = &arg1->jFmtAcHuffman;
0061bcf1                          void* var_9b8_10 = &var_9b4;
0061bcf9                          enum _IJLERR eax_24 = EP_Write_DHT_Ex(&arg1->state, &var_158, &var_148, 1, 0);
0061bd01                          var_19c_1 = eax_24;
0061bd01                          
0061bd09                          if (eax_24 != IJL_OK)
0061bd09                              break;
0061bd09                          
0061bd0f                          eax_6 = edx_8;
0061bd15                          esi_4 = arg1;
0061bc77                      }
0061baed                  }
0061baed                  else if (*(uint32_t*)((char*)eax_6 + 0x10) != 0)
0061bf36                      esi_4 = arg1;
0061baf8                  else
0061baf8                  {
0061bb00                      *(uint32_t*)((char*)eax_6 + 0x24) = 0;
0061bb03                      *(uint32_t*)((char*)eax_6 + 0x28) = 0;
0061bb06                      *(uint32_t*)((char*)eax_6 + 0x2c) = 0;
0061bb09                      *(uint32_t*)((char*)eax_6 + 0x30) = 0;
0061bb0c                      int32_t var_48_1 = 0;
0061bb21                      void* var_9b8_2 = &var_9b4;
0061bb25                      Make_optimal_huff_table(&var_9b4, &var_158, &var_148);
0061bb41                      void* var_9b8_3 = &var_9b4;
0061bb45                      enum _IJLERR eax_9 = _BuildEncoderHuffmanTable(&var_158, &var_148, &arg1->jFmtDcHuffman);
0061bb4d                      var_19c_1 = eax_9;
0061bb4d                      
0061bb55                      if (eax_9 != IJL_OK)
0061bb55                          break;
0061bb55                      
0061bb64                      arg1->jEncFmtDcHuffman[0] = &arg1->jFmtDcHuffman;
0061bb7e                      void* var_9b8_4 = &var_9b4;
0061bb84                      enum _IJLERR eax_12 = EP_Write_DHT_Ex(&arg1->state, &var_158, &var_148, 0, 0);
0061bb8c                      var_19c_1 = eax_12;
0061bb8c                      
0061bb94                      if (eax_12 != IJL_OK)
0061bb94                          break;
0061bb94                      
0061bb9a                      esi_4 = arg1;
0061bb9a                      
0061bba3                      if (esi_4->JPGChannels == 1)
0061bf2b                          eax_6 = edx_8;
0061bba3                      else
0061bba3                      {
0061bbb2                          __g_memzero(&var_158, 0x10);
0061bbc7                          __g_memzero(&var_148, 0x100);
0061bbd0                          int32_t var_48_2 = 1;
0061bbe9                          void* var_9b8_5 = &var_9b4;
0061bbed                          Make_optimal_huff_table(&var_5b0, &var_158, &var_148);
0061bc09                          void* var_9b8_6 = &var_9b4;
0061bc0d                          enum _IJLERR eax_16 = _BuildEncoderHuffmanTable(&var_158, &var_148, &arg1->jFmtDcHuffman[1]);
0061bc15                          var_19c_1 = eax_16;
0061bc15                          
0061bc1d                          if (eax_16 != IJL_OK)
0061bc1d                              break;
0061bc1d                          
0061bc2c                          arg1->jEncFmtDcHuffman[1] = &arg1->jFmtDcHuffman[1];
0061bc44                          void* var_9b8_7 = &var_9b4;
0061bc4c                          enum _IJLERR eax_18 = EP_Write_DHT_Ex(&arg1->state, &var_158, &var_148, 0, 1);
0061bc54                          var_19c_1 = eax_18;
0061bc54                          
0061bc5c                          if (eax_18 != IJL_OK)
0061bc5c                              break;
0061bc5c                          
0061bc62                          eax_6 = edx_8;
0061bc68                          esi_4 = arg1;
0061bba3                      }
0061baf8                  }
0061baf8                  
0061bdc9                  enum _IJLERR eax_31 = EP_Write_SOS_Ex(&arg1->state, eax_6, &esi_4->HuffIdentifierDC, &esi_4->HuffIdentifierAC);
0061bdd1                  var_19c_1 = eax_31;
0061bdd1                  
0061bdd9                  if (eax_31 != IJL_OK)
0061bdd9                      break;
0061bdd9                  
0061be67                  void* var_9b8_16 = &var_9b4;
0061be6b                  enum _IJLERR eax_37 = Encode_Scan_P(arg1, &arg1->state, edx_8);
0061be73                  var_19c_1 = eax_37;
0061be73                  
0061be7b                  if (eax_37 < IJL_OK)
0061be7b                      break;
0061be7b                  
0061be81                  var_15c_1 += 1;
0061be8e                  ecx_3 = (var_198_2 + 1);
0061be91                  var_198_2 = ecx_3;
0061be91                  
0061be9d                  if (ecx_3 >= var_1ac)
0061be9d                      goto label_61bea9;
0061ba51              }
0061ba3f          }
0061ba21      }
0061ba21      
0061bde6      if (arg1->jscan != 0)
0061bde6      {
0061bdec          int32_t var_198_3 = 0;
0061bdec          
0061bdfe          if (var_1ac > 0)
0061bdfe          {
0061be51              bool cond:0_1;
0061be51              
0061be51              do
0061be51              {
0061be1a                  void* var_9b8_15 = &var_9b4;
0061be1c                  operator delete(arg1->jscan[var_198_3].comps);
0061be27                  arg1->jscan[var_198_3].comps = 0;
0061be45                  cond:0_1 = (var_198_3 + 1) < var_1ac;
0061be4b                  var_198_3 += 1;
0061be51              } while (cond:0_1);
0061bdfe          }
0061bdfe          
0061bef4          void* var_9b8_19 = &var_9b4;
0061bef6          operator delete(arg1->jscan);
0061bf01          arg1->jscan = nullptr;
0061bde6      }
0061bde6      
0061bf20      *(uint32_t*)fsbase = var_14;
0061bf2a      return var_19c_1;
0061b930  }

0061c2fe                                                                                            c7 45                                .E
0061c300  fc ff ff ff ff e9 d1 fa ff ff 8b 65 e8 c7 85 68 fe ff ff ff ff ff ff eb e5 b8 01 00 00 00 c3 90  ...........e...h................

0061c320  int32_t _ownGetLibVersion()

0061c320  {
0061c325      return 0x8322e0;
0061c320  }

0061c326                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

0061c330  int32_t _FillEncoderQuantTable_AAN(void* arg1)

0061c330  {
0061c330      int32_t esi;
0061c330      int32_t var_4 = esi;
0061c330      
0061c346      if (((int32_t)*(uint16_t*)((char*)arg1 + 0x7e)) < 2)
0061c34d          *(uint16_t*)((char*)arg1 + 0x7e) = 2;
0061c34d      
0061c394      void var_8c;
0061c394      void var_8a;
0061c394      
0061c394      for (int32_t i = 0; i < 0x40; i += 2)
0061c394      {
0061c360          int32_t esi_2 = ((int32_t)*(uint16_t*)((char*)arg1 + (i << 1)));
0061c372          int32_t esi_3 = ((int32_t)*(uint16_t*)(((char*)arg1 + (i << 1)) + 2));
0061c377          *(uint16_t*)(&var_8c + (i << 1)) = ((int16_t)(((int64_t)((esi_2 >> 1) + *(uint32_t*)((i << 2) + &data_907220))) / esi_2));
0061c389          *(uint16_t*)(&var_8a + (i << 1)) = ((int16_t)(((int64_t)((esi_3 >> 1) + *(uint32_t*)((i << 2) + &data_907224))) / esi_3));
0061c394      }
0061c394      
0061c3e5      int32_t i_1;
0061c3e5      
0061c3e5      for (i_1 = 0; i_1 < 0x40; i_1 += 4)
0061c3e5      {
0061c3ab          *(uint16_t*)((char*)arg1 + (*(uint32_t*)((i_1 << 2) + &data_906ee0) << 1)) = *(uint16_t*)(&var_8c + (i_1 << 1));
0061c3bb          *(uint16_t*)((char*)arg1 + (*(uint32_t*)((i_1 << 2) + &data_906ee4) << 1)) = *(uint16_t*)(&var_8a + (i_1 << 1));
0061c3cb          void var_88;
0061c3cb          *(uint16_t*)((char*)arg1 + (*(uint32_t*)((i_1 << 2) + &data_906ee8) << 1)) = *(uint16_t*)(&var_88 + (i_1 << 1));
0061c3db          void var_86;
0061c3db          *(uint16_t*)((char*)arg1 + (*(uint32_t*)((i_1 << 2) + &data_906eec) << 1)) = *(uint16_t*)(&var_86 + (i_1 << 1));
0061c3e5      }
0061c3e5      
0061c3ef      return i_1;
0061c330  }


0061c3f0  int32_t _fQnt8x8_AAN_PX(int32_t arg1, int32_t arg2)

0061c3f0  {
0061c3f0      int32_t esi;
0061c3f0      int32_t var_4 = esi;
0061c3f2      int32_t var_c = esi;
0061c46f      int32_t i;
0061c46f      
0061c46f      for (i = 0; i < 0x40; i += 4)
0061c46f      {
0061c414          int32_t ebx_2 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 2));
0061c419          *(uint16_t*)(arg1 + (i << 1)) = ((int16_t)(((((int32_t)*(uint16_t*)(arg2 + (i << 1))) * ((int32_t)*(uint16_t*)(arg1 + (i << 1)))) + 0x4000) >> 0xf));
0061c42e          int32_t ebx_3 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 4));
0061c433          *(uint16_t*)((arg1 + (i << 1)) + 2) = ((int16_t)(((((int32_t)*(uint16_t*)((arg2 + (i << 1)) + 2)) * ebx_2) + 0x4000) >> 0xf));
0061c449          int32_t ebx_4 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 6));
0061c44e          *(uint16_t*)((arg1 + (i << 1)) + 4) = ((int16_t)(((((int32_t)*(uint16_t*)((arg2 + (i << 1)) + 4)) * ebx_3) + 0x4000) >> 0xf));
0061c464          *(uint16_t*)((arg1 + (i << 1)) + 6) = ((int16_t)(((((int32_t)*(uint16_t*)((arg2 + (i << 1)) + 6)) * ebx_4) + 0x4000) >> 0xf));
0061c46f      }
0061c46f      
0061c476      return i;
0061c3f0  }

0061c477                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0061c480  int32_t _fDCT8x8_AAN_PX(int16_t* arg1)

0061c480  {
0061c498      void var_160;
0061c498      void* eax = &var_160;
0061c4a1      int32_t var_44 = 7;
0061c4a8      int16_t* var_38 = arg1;
0061c4af      void* var_3c = &var_160;
0061c629      bool cond:0_1;
0061c629      
0061c629      do
0061c629      {
0061c4ce          int32_t edx_1 = ((int32_t)*(uint16_t*)var_38);
0061c4d8          int32_t ecx_1 = ((int32_t)var_38[7]);
0061c4dc          int32_t edx_2 = (edx_1 + ecx_1);
0061c4e6          int32_t ebp_1 = ((int32_t)var_38[1]);
0061c4ea          int32_t esi_1 = ((int32_t)var_38[6]);
0061c4f5          int32_t edx_3 = (ebp_1 + esi_1);
0061c4f9          int32_t ecx_2 = ((int32_t)var_38[2]);
0061c504          int32_t ebx_1 = ((int32_t)var_38[5]);
0061c508          int32_t edx_4 = (ecx_2 + ebx_1);
0061c512          int32_t edx_5 = ((int32_t)var_38[3]);
0061c516          int32_t edi_1 = ((int32_t)var_38[4]);
0061c51a          int32_t eax_2 = (edx_5 + edi_1);
0061c51f          int32_t ecx_3 = (ecx_2 - ebx_1);
0061c528          int32_t ebp_2 = (ebp_1 - esi_1);
0061c53f          int32_t ebp_3 = (edx_2 + eax_2);
0061c542          int32_t ecx_5 = (edx_1 - ecx_1);
0061c549          int32_t esi_3 = (edx_2 - eax_2);
0061c560          int32_t ecx_6 = (edx_3 + edx_4);
0061c570          *(uint32_t*)eax = (ebp_3 + ecx_6);
0061c576          *(uint32_t*)((char*)eax + 0x10) = (ebp_3 - ecx_6);
0061c585          int32_t ebx_7 = (((((edx_3 - edx_4) + esi_3) * 0x5a82) + 0x4000) >> 0xf);
0061c58d          *(uint32_t*)((char*)eax + 8) = (esi_3 + ebx_7);
0061c597          int32_t edx_7 = ((edx_5 - edi_1) + ecx_3);
0061c599          *(uint32_t*)((char*)eax + 0x18) = (esi_3 - ebx_7);
0061c5ac          int32_t edi_4 = (ebp_2 + ecx_5);
0061c5be          int32_t ebx_12 = ((((edx_7 - edi_4) * 0x30fc) + 0x4000) >> 0xf);
0061c5d0          int32_t esi_8 = ((((edx_7 * 0x4546) + 0x4000) >> 0xf) + ebx_12);
0061c5e1          int32_t ebx_13 = (ebx_12 + (((edi_4 * 0xa73d) + 0x4000) >> 0xf));
0061c5ef          int32_t edx_13 = ((((ecx_3 + ebp_2) * 0x5a82) + 0x4000) >> 0xf);
0061c5f2          int32_t ebp_7 = (ecx_5 + edx_13);
0061c5f5          int32_t ecx_9 = (ecx_5 - edx_13);
0061c5fa          *(uint32_t*)((char*)eax + 0x14) = (esi_8 + ecx_9);
0061c602          *(uint32_t*)((char*)eax + 0xc) = (ecx_9 - esi_8);
0061c607          *(uint32_t*)((char*)eax + 4) = (ebx_13 + ebp_7);
0061c612          *(uint32_t*)((char*)eax + 0x1c) = (ebp_7 - ebx_13);
0061c615          eax += 0x20;
0061c618          var_38 = &var_38[8];
0061c620          cond:0_1 = (var_44 - 1) >= 0;
0061c622          var_44 -= 1;
0061c629      } while (cond:0_1);
0061c62f      void* edx_18 = var_3c;
0061c636      int16_t* ecx_11 = arg1;
0061c642      int32_t i_1 = 7;
0061c773      int32_t i;
0061c773      
0061c773      do
0061c773      {
0061c657          int32_t eax_5 = *(uint32_t*)edx_18;
0061c659          int32_t ebp_9 = *(uint32_t*)((char*)edx_18 + 0xe0);
0061c65f          int32_t ebx_14 = (eax_5 + ebp_9);
0061c662          int32_t eax_6 = (eax_5 - ebp_9);
0061c664          int32_t ebp_10 = *(uint32_t*)((char*)edx_18 + 0xc0);
0061c671          int32_t eax_7 = *(uint32_t*)((char*)edx_18 + 0x20);
0061c674          int32_t edi_5 = (eax_7 + ebp_10);
0061c677          int32_t eax_8 = (eax_7 - ebp_10);
0061c679          int32_t ebp_11 = *(uint32_t*)((char*)edx_18 + 0xa0);
0061c686          int32_t eax_9 = *(uint32_t*)((char*)edx_18 + 0x40);
0061c689          int32_t esi_10 = (eax_9 + ebp_11);
0061c68c          int32_t eax_10 = (eax_9 - ebp_11);
0061c68e          int32_t ebp_12 = *(uint32_t*)((char*)edx_18 + 0x80);
0061c69b          int32_t eax_11 = *(uint32_t*)((char*)edx_18 + 0x60);
0061c69e          int32_t edx_19 = (eax_11 + ebp_12);
0061c6a3          int16_t ebp_13 = (ebx_14 + edx_19);
0061c6a6          int32_t ebx_15 = (ebx_14 - edx_19);
0061c6a8          int16_t edx_20 = (edi_5 + esi_10);
0061c6b1          *(uint16_t*)ecx_11 = (ebp_13 + edx_20);
0061c6b8          ecx_11[0x20] = (ebp_13 - edx_20);
0061c6c8          int16_t edx_23 = ((int16_t)(((((edi_5 - esi_10) + ebx_15) * 0x5a82) + 0x4000) >> 0xf));
0061c6d0          ecx_11[0x10] = (ebx_15 + edx_23);
0061c6db          int32_t eax_13 = ((eax_11 - ebp_12) + eax_10);
0061c6dd          ecx_11[0x30] = (ebx_15 - edx_23);
0061c6f1          int32_t ebp_17 = (eax_8 + eax_6);
0061c703          int16_t edx_28 = ((int16_t)((((eax_13 - ebp_17) * 0x30fc) + 0x4000) >> 0xf));
0061c715          int16_t edi_11 = (((int16_t)(((eax_13 * 0x4546) + 0x4000) >> 0xf)) + edx_28);
0061c725          int16_t edx_29 = (edx_28 + ((int16_t)(((ebp_17 * 0xa73d) + 0x4000) >> 0xf)));
0061c733          int16_t ebp_20 = ((int16_t)((((eax_10 + eax_8) * 0x5a82) + 0x4000) >> 0xf));
0061c736          int16_t eax_17 = (eax_6 + ebp_20);
0061c739          int16_t ebx_18 = (eax_6 - ebp_20);
0061c73e          ecx_11[0x28] = (edi_11 + ebx_18);
0061c744          ecx_11[0x18] = (ebx_18 - edi_11);
0061c74d          ecx_11[8] = (edx_29 + eax_17);
0061c758          edx_18 += 4;
0061c75b          ecx_11[0x38] = (eax_17 - edx_29);
0061c75f          ecx_11 = &ecx_11[1];
0061c769          i = (i_1 - 1);
0061c76c          i_1 = i;
0061c773      } while (i >= 0);
0061c773      
0061c783      return i;
0061c480  }

0061c784              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

0061c790  int64_t* _fQnt8x8_AAN_M5(int64_t* arg1, int64_t* arg2)

0061c790  {
0061c7a2      _own_fqnt8x8_aan_m5(arg1, arg2);
0061c7aa      return arg1;
0061c790  }

0061c7ab                                   90 8d 74 26 00                                                             ..t&.

0061c7b0  int64_t* _fDCT8x8_AAN_M5(int64_t* arg1)

0061c7b0  {
0061c7ba      _own_fdct8x8_aan_m5(arg1);
0061c7c2      return arg1;
0061c7b0  }

0061c7c3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

0061c7d0  int32_t _FillDecoderQuantTable_AAN(int32_t arg1)

0061c7d0  {
0061c7d6      int32_t edi;
0061c7d6      int32_t var_c = edi;
0061c7d7      int32_t esi;
0061c7d7      int32_t var_10 = esi;
0061c7e2      int32_t i = 0;
0061c7e4      long double x87_r7 = ((long double)data_907550);
0061c7ea      long double x87_r6 = ((long double)data_907548);
0061c7f0      long double x87_r5 = ((long double)data_907540);
0061ca0a      void var_c0;
0061ca0a      
0061ca0a      do
0061ca0a      {
0061c81f          double var_28_1 = ((double)((((((long double)((int32_t)*(uint16_t*)(arg1 + (i << 1)))) * ((long double)*(uint64_t*)((i << 3) + &data_907340))) * x87_r6) * x87_r5) + x87_r7));
0061c82d          int32_t ebp_1 = *(uint32_t*)((char*)var_28_1)[4];
0061c839          int32_t ecx_4 = ((ebp_1 >> 0x14) & 0x7ff);
0061c845          uint32_t esi_5;
0061c845          
0061c845          if (ecx_4 <= 0x3fe)
0061c870              esi_5 = 0;
0061c845          else
0061c845          {
0061c85b              esi_5 = ((((ebp_1 << 0xb) | (var_28_1 >> 0xffffffeb)) | 0x80000000) >> (((int8_t)-(ecx_4)) + 0x1e));
0061c85b              
0061c85f              if (ebp_1 < 0)
0061c861                  esi_5 = -(esi_5);
0061c845          }
0061c845          
0061c872          uint32_t var_40_1 = esi_5;
0061c880          *(uint16_t*)(&var_c0 + (*(uint32_t*)((i << 2) + &data_906ee0) << 1)) = esi_5;
0061c8a4          double var_28_2 = ((double)((((((long double)((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 2))) * ((long double)*(uint64_t*)((i << 3) + &data_907348))) * x87_r6) * x87_r5) + x87_r7));
0061c8b2          int32_t ebp_2 = *(uint32_t*)((char*)var_28_2)[4];
0061c8be          int32_t ecx_10 = ((ebp_2 >> 0x14) & 0x7ff);
0061c8ca          uint32_t esi_10;
0061c8ca          
0061c8ca          if (ecx_10 <= 0x3fe)
0061c8f0              esi_10 = 0;
0061c8ca          else
0061c8ca          {
0061c8e0              esi_10 = ((((ebp_2 << 0xb) | (var_28_2 >> 0xffffffeb)) | 0x80000000) >> (((int8_t)-(ecx_10)) + 0x1e));
0061c8e0              
0061c8e4              if (ebp_2 < 0)
0061c8e6                  esi_10 = -(esi_10);
0061c8ca          }
0061c8ca          
0061c8f2          uint32_t var_40_2 = esi_10;
0061c900          *(uint16_t*)(&var_c0 + (*(uint32_t*)((i << 2) + &data_906ee4) << 1)) = esi_10;
0061c924          double var_28_3 = ((double)((((((long double)((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 4))) * ((long double)*(uint64_t*)((i << 3) + &data_907350))) * x87_r6) * x87_r5) + x87_r7));
0061c932          int32_t ebp_3 = *(uint32_t*)((char*)var_28_3)[4];
0061c93e          int32_t ecx_16 = ((ebp_3 >> 0x14) & 0x7ff);
0061c94a          uint32_t esi_15;
0061c94a          
0061c94a          if (ecx_16 <= 0x3fe)
0061c970              esi_15 = 0;
0061c94a          else
0061c94a          {
0061c960              esi_15 = ((((ebp_3 << 0xb) | (var_28_3 >> 0xffffffeb)) | 0x80000000) >> (((int8_t)-(ecx_16)) + 0x1e));
0061c960              
0061c964              if (ebp_3 < 0)
0061c966                  esi_15 = -(esi_15);
0061c94a          }
0061c94a          
0061c972          uint32_t var_40_3 = esi_15;
0061c980          *(uint16_t*)(&var_c0 + (*(uint32_t*)((i << 2) + &data_906ee8) << 1)) = esi_15;
0061c9a4          double var_28_4 = ((double)((((((long double)((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 6))) * ((long double)*(uint64_t*)((i << 3) + &data_907358))) * x87_r6) * x87_r5) + x87_r7));
0061c9b2          int32_t ebp_4 = *(uint32_t*)((char*)var_28_4)[4];
0061c9be          int32_t ecx_22 = ((ebp_4 >> 0x14) & 0x7ff);
0061c9ca          uint32_t esi_20;
0061c9ca          
0061c9ca          if (ecx_22 <= 0x3fe)
0061c9f0              esi_20 = 0;
0061c9ca          else
0061c9ca          {
0061c9e0              esi_20 = ((((ebp_4 << 0xb) | (var_28_4 >> 0xffffffeb)) | 0x80000000) >> (((int8_t)-(ecx_22)) + 0x1e));
0061c9e0              
0061c9e4              if (ebp_4 < 0)
0061c9e6                  esi_20 = -(esi_20);
0061c9ca          }
0061c9ca          
0061c9f2          uint32_t var_40_4 = esi_20;
0061c9f9          int32_t ecx_25 = *(uint32_t*)((i << 2) + &data_906eec);
0061ca00          i += 4;
0061ca03          *(uint16_t*)(&var_c0 + (ecx_25 << 1)) = esi_20;
0061ca0a      } while (i < 0x40);
0061ca0a      
0061ca4c      int32_t i_1;
0061ca4c      
0061ca4c      for (i_1 = 0; i_1 < 0x40; i_1 += 4)
0061ca4c      {
0061ca24          *(uint16_t*)(arg1 + (i_1 << 1)) = *(uint16_t*)(&var_c0 + (i_1 << 1));
0061ca2d          void var_be;
0061ca2d          *(uint16_t*)((arg1 + (i_1 << 1)) + 2) = *(uint16_t*)(&var_be + (i_1 << 1));
0061ca37          void var_bc;
0061ca37          *(uint16_t*)((arg1 + (i_1 << 1)) + 4) = *(uint16_t*)(&var_bc + (i_1 << 1));
0061ca41          void var_ba;
0061ca41          *(uint16_t*)((arg1 + (i_1 << 1)) + 6) = *(uint16_t*)(&var_ba + (i_1 << 1));
0061ca4c      }
0061ca4c      
0061ca50      __builtin_memset((arg1 + 0x80), 0, 0x20);
0061cacc      return i_1;
0061c7d0  }

0061c865                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
0061c8ea                                8d b6 00 00 00 00                                                            ......
0061c96a                                8d b6 00 00 00 00                                                            ......
0061c9ea                                8d b6 00 00 00 00                                                            ......
0061cacd                                         8d 76 00                                                               .v.

0061cad0  int32_t _iQnt8x8_AAN_PX(int32_t arg1, int32_t arg2)

0061cad0  {
0061cad0      int32_t esi;
0061cad0      int32_t var_4 = esi;
0061cad2      int32_t var_c = esi;
0061cb43      int32_t i;
0061cb43      
0061cb43      for (i = 0; i < 0x40; i += 4)
0061cb43      {
0061caf1          int32_t ebx_2 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 2));
0061caf6          *(uint16_t*)(arg1 + (i << 1)) = ((int16_t)(((((int32_t)*(uint16_t*)(arg2 + (i << 1))) * ((int32_t)*(uint16_t*)(arg1 + (i << 1)))) + 0x40) >> 7));
0061cb08          int32_t ebx_3 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 4));
0061cb0d          *(uint16_t*)((arg1 + (i << 1)) + 2) = ((int16_t)(((((int32_t)*(uint16_t*)((arg2 + (i << 1)) + 2)) * ebx_2) + 0x40) >> 7));
0061cb20          int32_t ebx_4 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 6));
0061cb25          *(uint16_t*)((arg1 + (i << 1)) + 4) = ((int16_t)(((((int32_t)*(uint16_t*)((arg2 + (i << 1)) + 4)) * ebx_3) + 0x40) >> 7));
0061cb38          *(uint16_t*)((arg1 + (i << 1)) + 6) = ((int16_t)(((((int32_t)*(uint16_t*)((arg2 + (i << 1)) + 6)) * ebx_4) + 0x40) >> 7));
0061cb43      }
0061cb43      
0061cb4a      return i;
0061cad0  }

0061cb4b                                   90 8d 74 26 00                                                             ..t&.

0061cb50  void* _iDCT8x8_AAN_PX(void* arg1)

0061cb50  {
0061cb51      int32_t esi;
0061cb51      int32_t var_8 = esi;
0061cb5b      int16_t* edx = arg1;
0061cb5d      void* eax = arg1;
0061cb64      int32_t i_1 = 8;
0061cc85      int32_t i;
0061cc85      
0061cc85      do
0061cc85      {
0061cb74          int32_t ebx_1 = ((int32_t)edx[0x28]);
0061cb78          int32_t ebp_1 = ((int32_t)edx[0x18]);
0061cb7e          int32_t ecx_2 = (ebx_1 - ebp_1);
0061cb80          int32_t ebx_2 = (ebx_1 + ebp_1);
0061cb82          int32_t edi_1 = ((int32_t)edx[8]);
0061cb86          int32_t esi_2 = ((int32_t)edx[0x38]);
0061cb8a          int32_t ebp_2 = (edi_1 + esi_2);
0061cb8d          int32_t edi_2 = (edi_1 - esi_2);
0061cb9f          int32_t esi_7 = ((((ecx_2 - edi_2) * 0x61f8) + 0x4000) >> 0xf);
0061cbc8          int32_t ebx_3 = (ebx_2 + ebp_2);
0061cbca          int32_t edi_7 = (((((edi_2 * 0x8a8c) + 0x4000) >> 0xf) - esi_7) - ebx_3);
0061cbdc          int16_t var_2c_1 = edi_7;
0061cbe3          int32_t ecx_11 = (((((ebp_2 - ebx_2) * 0xb505) + 0x4000) >> 0xf) - edi_7);
0061cbe9          int16_t esi_9 = ((esi_7 - ((int16_t)(((ecx_2 * 0x14e7b) + 0x4000) >> 0xf))) + ecx_11);
0061cbeb          int32_t ecx_12 = ((int32_t)edx[0x20]);
0061cbf3          int32_t esi_10 = ((int32_t)*(uint16_t*)edx);
0061cbf6          int16_t ebp_3 = (esi_10 + ecx_12);
0061cbf9          int32_t esi_11 = (esi_10 - ecx_12);
0061cbfb          int32_t ecx_13 = ((int32_t)edx[0x10]);
0061cbff          int32_t edx_1 = ((int32_t)edx[0x30]);
0061cc07          int32_t ecx_14 = (ecx_13 + edx_1);
0061cc18          int32_t edx_5 = (((((ecx_13 - edx_1) * 0xb505) + 0x4000) >> 0xf) - ecx_14);
0061cc1a          int16_t edi_10 = (ecx_14 + ebp_3);
0061cc1d          int16_t ebp_4 = (ebp_3 - ecx_14);
0061cc23          int16_t ecx_15 = (edx_5 + esi_11);
0061cc26          int32_t esi_12 = (esi_11 - edx_5);
0061cc2f          *(uint16_t*)eax = (ebx_3 + edi_10);
0061cc39          *(uint16_t*)((char*)eax + 0x10) = (ecx_15 + var_2c_1);
0061cc44          *(uint16_t*)((char*)eax + 0x20) = (esi_12 + ecx_11);
0061cc4c          *(uint16_t*)((char*)eax + 0x30) = (ebp_4 - esi_9);
0061cc54          *(uint16_t*)((char*)eax + 0x40) = (ebp_4 + esi_9);
0061cc5c          *(uint16_t*)((char*)eax + 0x50) = (esi_12 - ecx_11);
0061cc64          *(uint16_t*)((char*)eax + 0x60) = (ecx_15 - var_2c_1);
0061cc6c          i = (i_1 - 1);
0061cc71          *(uint16_t*)((char*)eax + 0x70) = (edi_10 - ebx_3);
0061cc79          edx = &edx[1];
0061cc7c          eax += 2;
0061cc7f          i_1 = i;
0061cc85      } while (i > 0);
0061cc8b      void* result_1 = arg1;
0061cc8f      void* result = result_1;
0061cc96      int32_t var_20 = 8;
0061ceb0      bool cond:0_1;
0061ceb0      
0061ceb0      do
0061ceb0      {
0061cca4          int32_t esi_15 = ((int32_t)*(uint16_t*)((char*)result_1 + 0xa));
0061cca8          int32_t eax_1 = ((int32_t)*(uint16_t*)((char*)result_1 + 6));
0061ccae          int32_t ebp_7 = (esi_15 - eax_1);
0061ccb0          int32_t esi_16 = (esi_15 + eax_1);
0061ccb2          int32_t ebx_7 = ((int32_t)*(uint16_t*)((char*)result_1 + 2));
0061ccb6          int32_t eax_2 = ((int32_t)*(uint16_t*)((char*)result_1 + 0xe));
0061ccba          int32_t edx_13 = (ebx_7 + eax_2);
0061ccbd          int32_t ebx_8 = (ebx_7 - eax_2);
0061ccce          int32_t eax_7 = ((((ebp_7 - ebx_8) * 0x61f8) + 0x4000) >> 0xf);
0061ccf7          int32_t esi_17 = (esi_16 + edx_13);
0061ccf9          int32_t edi_16 = (((((ebx_8 * 0x8a8c) + 0x4000) >> 0xf) - eax_7) - esi_17);
0061cd12          int32_t edx_17 = (((((edx_13 - esi_16) * 0xb505) + 0x4000) >> 0xf) - edi_16);
0061cd18          int32_t eax_9 = ((eax_7 - (((ebp_7 * 0x14e7b) + 0x4000) >> 0xf)) + edx_17);
0061cd1a          int32_t ebx_14 = ((int32_t)*(uint16_t*)result_1);
0061cd21          int32_t eax_10 = ((int32_t)*(uint16_t*)((char*)result_1 + 8));
0061cd25          int32_t edx_18 = (ebx_14 + eax_10);
0061cd28          int32_t ebx_15 = (ebx_14 - eax_10);
0061cd2a          int32_t edi_17 = ((int32_t)*(uint16_t*)((char*)result_1 + 4));
0061cd2e          int32_t ebp_8 = ((int32_t)*(uint16_t*)((char*)result_1 + 0xc));
0061cd36          int32_t edi_18 = (edi_17 + ebp_8);
0061cd46          int32_t eax_16 = (((((edi_17 - ebp_8) * 0xb505) + 0x4000) >> 0xf) - edi_18);
0061cd48          int32_t ebp_9 = (edi_18 + edx_18);
0061cd4b          int32_t edx_19 = (edx_18 - edi_18);
0061cd51          int32_t edx_20 = (eax_16 + ebx_15);
0061cd54          int32_t ebx_16 = (ebx_15 - eax_16);
0061cd5d          int32_t edi_21 = ((((esi_17 + ebp_9) + 8) >> 4) + 0x80);
0061cd5d          
0061cd6d          if (edi_21 < 0)
0061cf30              edi_21 = 0;
0061cd6d          else if (edi_21 > 0xff)
0061cd7b              edi_21 = 0xff;
0061cd7b          
0061cd80          *(uint16_t*)result = edi_21;
0061cd8e          int32_t edi_25 = ((((edx_20 + edi_16) + 8) >> 4) + 0x80);
0061cd8e          
0061cd96          if (edi_25 < 0)
0061cf20              edi_25 = 0;
0061cd96          else if (edi_25 > 0xff)
0061cda4              edi_25 = 0xff;
0061cda4          
0061cda9          *(uint16_t*)((char*)result + 2) = edi_25;
0061cdb8          int32_t edi_29 = ((((ebx_16 + edx_17) + 8) >> 4) + 0x80);
0061cdb8          
0061cdc0          if (edi_29 < 0)
0061cf10              edi_29 = 0;
0061cdc0          else if (edi_29 > 0xff)
0061cdce              edi_29 = 0xff;
0061cdce          
0061cdd3          *(uint16_t*)((char*)result + 4) = edi_29;
0061cde3          int32_t edi_34 = ((((edx_19 - eax_9) + 8) >> 4) + 0x80);
0061cde3          
0061cdeb          if (edi_34 < 0)
0061cf00              edi_34 = 0;
0061cdeb          else if (edi_34 > 0xff)
0061cdf9              edi_34 = 0xff;
0061cdf9          
0061cdfe          *(uint16_t*)((char*)result + 6) = edi_34;
0061ce0d          int32_t esi_21 = ((((edx_19 + eax_9) + 8) >> 4) + 0x80);
0061ce0d          
0061ce15          if (esi_21 < 0)
0061cef0              esi_21 = 0;
0061ce15          else if (esi_21 > 0xff)
0061ce23              esi_21 = 0xff;
0061ce23          
0061ce28          *(uint16_t*)((char*)result + 8) = esi_21;
0061ce36          int32_t ebx_20 = ((((ebx_16 - edx_17) + 8) >> 4) + 0x80);
0061ce36          
0061ce3e          if (ebx_20 < 0)
0061cee0              ebx_20 = 0;
0061ce3e          else if (ebx_20 > 0xff)
0061ce4c              ebx_20 = 0xff;
0061ce4c          
0061ce51          *(uint16_t*)((char*)result + 0xa) = ebx_20;
0061ce5f          int32_t edx_24 = ((((edx_20 - edi_16) + 8) >> 4) + 0x80);
0061ce5f          
0061ce67          if (edx_24 < 0)
0061ced0              edx_24 = 0;
0061ce67          else if (edx_24 > 0xff)
0061ce71              edx_24 = 0xff;
0061ce71          
0061ce76          *(uint16_t*)((char*)result + 0xc) = edx_24;
0061ce84          int32_t ebp_13 = ((((ebp_9 - esi_17) + 8) >> 4) + 0x80);
0061ce84          
0061ce8c          if (ebp_13 < 0)
0061cebe              ebp_13 = 0;
0061ce8c          else if (ebp_13 > 0xff)
0061ce96              ebp_13 = 0xff;
0061ce96          
0061ce9b          *(uint16_t*)((char*)result + 0xe) = ebp_13;
0061ce9f          result_1 += 0x10;
0061cea2          result += 0x10;
0061ceaa          cond:0_1 = (var_20 - 1) > 0;
0061ceac          var_20 -= 1;
0061ceb0      } while (cond:0_1);
0061cebd      return result;
0061cb50  }

0061cec2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
0061ced4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0061cee7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0061cef7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0061cf07                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0061cf17                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0061cf27                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0061cf37                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0061cf40  int64_t* _iDCT8x8_AAN_M5(int64_t* arg1)

0061cf40  {
0061cf4a      _own_idct8x8_aan_m5(arg1);
0061cf52      return arg1;
0061cf40  }

0061cf53                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

0061cf60  int16_t* _iDCT4x4_AAN_PX(int16_t* arg1)

0061cf60  {
0061cf6b      void* esi = arg1;
0061cf6f      int32_t i_1 = 0;
0061cf6f      
0061cf81      while (true)
0061cf81      {
0061cf81          int32_t ebp_2 = (((int32_t)*(uint16_t*)((char*)esi + 0x50)) - ((int32_t)*(uint16_t*)((char*)esi + 0x30)));
0061cf8b          int32_t ebx_2 = (((int32_t)*(uint16_t*)((char*)esi + 0x10)) - ((int32_t)*(uint16_t*)((char*)esi + 0x70)));
0061cf8d          int16_t ecx_1 = *(uint16_t*)esi;
0061cfa5          int32_t eax_5 = ((((((int32_t)*(uint16_t*)((char*)esi + 0x20)) - ((int32_t)*(uint16_t*)((char*)esi + 0x60))) * 0xb505) + 0x4000) >> 0xf);
0061cfb2          int16_t eax_8 = ((int16_t)(((eax_5 - 0x80000000) - 0x80000000) >> 1));
0061cfb4          int16_t edx_3 = (ecx_1 + eax_8);
0061cfb7          int16_t ecx_2 = (ecx_1 - eax_8);
0061cfcc          int16_t eax_11 = ((int16_t)((((ebp_2 * 0xffff9e08) + (ebx_2 * 0xec84)) + 0x8000) >> 0x10));
0061cfe2          int16_t ebp_5 = ((int16_t)((((ebp_2 * 0xec83) + (ebx_2 * 0x61f8)) + 0x8000) >> 0x10));
0061cfea          int32_t i = i_1;
0061cfee          *(uint16_t*)esi = (edx_3 + eax_11);
0061cff6          *(uint16_t*)((char*)esi + 0x10) = (ecx_2 + ebp_5);
0061cffa          *(uint16_t*)((char*)esi + 0x20) = (ecx_2 - ebp_5);
0061cffe          *(uint16_t*)((char*)esi + 0x30) = (edx_3 - eax_11);
0061cffe          
0061d00e          do
0061d00e          {
0061d002              esi += 2;
0061d005              i += 1;
0061d005              
0061d009              if (i >= 8)
0061d009              {
0061d02c                  int32_t edx_6 = (((int32_t)arg1[5]) - ((int32_t)arg1[3]));
0061d036                  int32_t ecx_6 = (((int32_t)arg1[1]) - ((int32_t)arg1[7]));
0061d038                  int32_t ebx_7 = ((int32_t)*(uint16_t*)arg1);
0061d051                  int32_t esi_4 = ((((((int32_t)arg1[2]) - ((int32_t)arg1[6])) * 0xb505) + 0x4000) >> 0xf);
0061d060                  int32_t esi_7 = (((esi_4 - 0x80000000) - 0x80000000) >> 1);
0061d062                  int32_t ebp_8 = (ebx_7 + esi_7);
0061d065                  int32_t ebx_8 = (ebx_7 - esi_7);
0061d07a                  int32_t esi_10 = ((((edx_6 * 0xffff9e08) + (ecx_6 * 0xec84)) + 0x8000) >> 0x10);
0061d090                  int32_t ecx_8 = ((((edx_6 * 0xec83) + (ecx_6 * 0x61f8)) + 0x8000) >> 0x10);
0061d09a                  int32_t edx_10 = ((((ebp_8 + esi_10) + 8) >> 4) + 0x80);
0061d09a                  
0061d0a2                  if (edx_10 < 0)
0061d4a6                      edx_10 = 0;
0061d0a2                  else if (edx_10 > 0xff)
0061d0b0                      edx_10 = 0xff;
0061d0b0                  
0061d0b5                  *(uint16_t*)arg1 = edx_10;
0061d0bf                  int32_t edx_13 = ((((ebx_8 + ecx_8) + 8) >> 4) + 0x80);
0061d0bf                  
0061d0c7                  if (edx_13 < 0)
0061d49f                      edx_13 = 0;
0061d0c7                  else if (edx_13 > 0xff)
0061d0d5                      edx_13 = 0xff;
0061d0d5                  
0061d0da                  arg1[1] = edx_13;
0061d0e6                  int32_t ebx_12 = ((((ebx_8 - ecx_8) + 8) >> 4) + 0x80);
0061d0e6                  
0061d0ee                  if (ebx_12 < 0)
0061d498                      ebx_12 = 0;
0061d0ee                  else if (ebx_12 > 0xff)
0061d0fc                      ebx_12 = 0xff;
0061d0fc                  
0061d101                  arg1[2] = ebx_12;
0061d10d                  int32_t ebp_12 = ((((ebp_8 - esi_10) + 8) >> 4) + 0x80);
0061d10d                  
0061d115                  if (ebp_12 < 0)
0061d491                      ebp_12 = 0;
0061d115                  else if (ebp_12 > 0xff)
0061d123                      ebp_12 = 0xff;
0061d123                  
0061d128                  arg1[3] = ebp_12;
0061d134                  int32_t edx_15 = (((int32_t)arg1[0xd]) - ((int32_t)arg1[0xb]));
0061d13e                  int32_t ecx_11 = (((int32_t)arg1[9]) - ((int32_t)arg1[0xf]));
0061d140                  int32_t ebx_14 = ((int32_t)arg1[8]);
0061d15a                  int32_t esi_14 = ((((((int32_t)arg1[0xa]) - ((int32_t)arg1[0xe])) * 0xb505) + 0x4000) >> 0xf);
0061d169                  int32_t esi_17 = (((esi_14 - 0x80000000) - 0x80000000) >> 1);
0061d16b                  int32_t ebp_15 = (ebx_14 + esi_17);
0061d16e                  int32_t ebx_15 = (ebx_14 - esi_17);
0061d183                  int32_t esi_20 = ((((edx_15 * 0xffff9e08) + (ecx_11 * 0xec84)) + 0x8000) >> 0x10);
0061d199                  int32_t ecx_13 = ((((edx_15 * 0xec83) + (ecx_11 * 0x61f8)) + 0x8000) >> 0x10);
0061d1a3                  int32_t edx_19 = ((((ebp_15 + esi_20) + 8) >> 4) + 0x80);
0061d1a3                  
0061d1ab                  if (edx_19 < 0)
0061d48a                      edx_19 = 0;
0061d1ab                  else if (edx_19 > 0xff)
0061d1b9                      edx_19 = 0xff;
0061d1b9                  
0061d1be                  arg1[8] = edx_19;
0061d1c9                  int32_t edx_22 = ((((ebx_15 + ecx_13) + 8) >> 4) + 0x80);
0061d1c9                  
0061d1d1                  if (edx_22 < 0)
0061d483                      edx_22 = 0;
0061d1d1                  else if (edx_22 > 0xff)
0061d1df                      edx_22 = 0xff;
0061d1df                  
0061d1e4                  arg1[9] = edx_22;
0061d1f0                  int32_t ebx_19 = ((((ebx_15 - ecx_13) + 8) >> 4) + 0x80);
0061d1f0                  
0061d1f8                  if (ebx_19 < 0)
0061d47c                      ebx_19 = 0;
0061d1f8                  else if (ebx_19 > 0xff)
0061d206                      ebx_19 = 0xff;
0061d206                  
0061d20b                  arg1[0xa] = ebx_19;
0061d217                  int32_t ebp_19 = ((((ebp_15 - esi_20) + 8) >> 4) + 0x80);
0061d217                  
0061d21f                  if (ebp_19 < 0)
0061d475                      ebp_19 = 0;
0061d21f                  else if (ebp_19 > 0xff)
0061d22d                      ebp_19 = 0xff;
0061d22d                  
0061d232                  arg1[0xb] = ebp_19;
0061d23e                  int32_t edx_24 = (((int32_t)arg1[0x15]) - ((int32_t)arg1[0x13]));
0061d248                  int32_t ecx_16 = (((int32_t)arg1[0x11]) - ((int32_t)arg1[0x17]));
0061d24a                  int32_t ebx_21 = ((int32_t)arg1[0x10]);
0061d264                  int32_t esi_24 = ((((((int32_t)arg1[0x12]) - ((int32_t)arg1[0x16])) * 0xb505) + 0x4000) >> 0xf);
0061d273                  int32_t esi_27 = (((esi_24 - 0x80000000) - 0x80000000) >> 1);
0061d275                  int32_t ebp_22 = (ebx_21 + esi_27);
0061d278                  int32_t ebx_22 = (ebx_21 - esi_27);
0061d28d                  int32_t esi_30 = ((((edx_24 * 0xffff9e08) + (ecx_16 * 0xec84)) + 0x8000) >> 0x10);
0061d2a3                  int32_t ecx_18 = ((((edx_24 * 0xec83) + (ecx_16 * 0x61f8)) + 0x8000) >> 0x10);
0061d2ad                  int32_t edx_28 = ((((ebp_22 + esi_30) + 8) >> 4) + 0x80);
0061d2ad                  
0061d2b5                  if (edx_28 < 0)
0061d46e                      edx_28 = 0;
0061d2b5                  else if (edx_28 > 0xff)
0061d2c3                      edx_28 = 0xff;
0061d2c3                  
0061d2c8                  arg1[0x10] = edx_28;
0061d2d3                  int32_t edx_31 = ((((ebx_22 + ecx_18) + 8) >> 4) + 0x80);
0061d2d3                  
0061d2db                  if (edx_31 < 0)
0061d467                      edx_31 = 0;
0061d2db                  else if (edx_31 > 0xff)
0061d2e9                      edx_31 = 0xff;
0061d2e9                  
0061d2ee                  arg1[0x11] = edx_31;
0061d2fa                  int32_t ebx_26 = ((((ebx_22 - ecx_18) + 8) >> 4) + 0x80);
0061d2fa                  
0061d302                  if (ebx_26 < 0)
0061d460                      ebx_26 = 0;
0061d302                  else if (ebx_26 > 0xff)
0061d310                      ebx_26 = 0xff;
0061d310                  
0061d315                  arg1[0x12] = ebx_26;
0061d321                  int32_t ebp_26 = ((((ebp_22 - esi_30) + 8) >> 4) + 0x80);
0061d321                  
0061d329                  if (ebp_26 < 0)
0061d459                      ebp_26 = 0;
0061d329                  else if (ebp_26 > 0xff)
0061d337                      ebp_26 = 0xff;
0061d337                  
0061d33c                  arg1[0x13] = ebp_26;
0061d348                  int32_t edx_33 = (((int32_t)arg1[0x1d]) - ((int32_t)arg1[0x1b]));
0061d352                  int32_t ecx_21 = (((int32_t)arg1[0x19]) - ((int32_t)arg1[0x1f]));
0061d354                  int32_t ebx_28 = ((int32_t)arg1[0x18]);
0061d36e                  int32_t esi_34 = ((((((int32_t)arg1[0x1a]) - ((int32_t)arg1[0x1e])) * 0xb505) + 0x4000) >> 0xf);
0061d37d                  int32_t esi_37 = (((esi_34 - 0x80000000) - 0x80000000) >> 1);
0061d37f                  int32_t ebp_29 = (ebx_28 + esi_37);
0061d382                  int32_t ebx_29 = (ebx_28 - esi_37);
0061d397                  int32_t esi_40 = ((((edx_33 * 0xffff9e08) + (ecx_21 * 0xec84)) + 0x8000) >> 0x10);
0061d3ad                  int32_t ecx_23 = ((((edx_33 * 0xec83) + (ecx_21 * 0x61f8)) + 0x8000) >> 0x10);
0061d3b7                  int32_t edx_37 = ((((ebp_29 + esi_40) + 8) >> 4) + 0x80);
0061d3b7                  
0061d3bf                  if (edx_37 < 0)
0061d452                      edx_37 = 0;
0061d3bf                  else if (edx_37 > 0xff)
0061d3cd                      edx_37 = 0xff;
0061d3cd                  
0061d3d2                  arg1[0x18] = edx_37;
0061d3dd                  int32_t edx_40 = ((((ebx_29 + ecx_23) + 8) >> 4) + 0x80);
0061d3dd                  
0061d3e5                  if (edx_40 < 0)
0061d44e                      edx_40 = 0;
0061d3e5                  else if (edx_40 > 0xff)
0061d3ef                      edx_40 = 0xff;
0061d3ef                  
0061d3f4                  arg1[0x19] = edx_40;
0061d400                  int32_t ebx_33 = ((((ebx_29 - ecx_23) + 8) >> 4) + 0x80);
0061d400                  
0061d408                  if (ebx_33 < 0)
0061d44a                      ebx_33 = 0;
0061d408                  else if (ebx_33 > 0xff)
0061d412                      ebx_33 = 0xff;
0061d412                  
0061d417                  arg1[0x1a] = ebx_33;
0061d423                  int32_t ebp_33 = ((((ebp_29 - esi_40) + 8) >> 4) + 0x80);
0061d423                  
0061d42b                  if (ebp_33 < 0)
0061d446                      ebp_33 = 0;
0061d42b                  else if (ebp_33 > 0xff)
0061d435                      ebp_33 = 0xff;
0061d435                  
0061d43a                  arg1[0x1b] = ebp_33;
0061d445                  return arg1;
0061d009              }
0061d00e          } while (i == 4);
0061d00e          
0061cf75          i_1 = i;
0061cf81      }
0061cf60  }

0061d015                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
0061d4ad                                         8d 76 00                                                               .v.

0061d4b0  int32_t _iDCT2x2_AAN_PX(int16_t* arg1)

0061d4b0  {
0061d4bb      int16_t eax = *(uint16_t*)arg1;
0061d4e6      int16_t ecx_4 = ((int16_t)(((((((int32_t)arg1[8]) - ((int32_t)arg1[0x38])) * 0x14e7b) + ((((int32_t)arg1[0x28]) - ((int32_t)arg1[0x18])) * 0x8a8c)) + 0x10000) >> 0x11));
0061d4ec      int32_t edx_4 = ((int32_t)(eax + ecx_4));
0061d4f1      int32_t eax_2 = ((int32_t)(eax - ecx_4));
0061d504      int16_t eax_3 = arg1[1];
0061d527      int16_t ecx_9 = ((int16_t)(((((((int32_t)arg1[9]) - ((int32_t)arg1[0x39])) * 0x14e7b) + ((((int32_t)arg1[0x29]) - ((int32_t)arg1[0x19])) * 0x8a8c)) + 0x10000) >> 0x11));
0061d52d      int32_t edx_9 = ((int32_t)(eax_3 + ecx_9));
0061d530      arg1[1] = edx_9;
0061d53d      int16_t ecx_10 = arg1[3];
0061d568      int16_t ebx_8 = ((int16_t)(((((((int32_t)arg1[0xb]) - ((int32_t)arg1[0x3b])) * 0x14e7b) + ((((int32_t)arg1[0x2b]) - ((int32_t)arg1[0x1b])) * 0x8a8c)) + 0x10000) >> 0x11));
0061d56e      int32_t eax_10 = ((int32_t)(ecx_10 + ebx_8));
0061d573      arg1[3] = eax_10;
0061d577      int32_t ecx_12 = ((int32_t)(ecx_10 - ebx_8));
0061d57a      int16_t esi_2 = arg1[5];
0061d582      int32_t ebx_9 = ((int32_t)arg1[0xd]);
0061d586      int32_t edi = ((int32_t)arg1[0x1d]);
0061d58a      arg1[0xb] = ecx_12;
0061d5ad      int16_t ebx_13 = ((int16_t)(((((ebx_9 - ((int32_t)arg1[0x3d])) * 0x14e7b) + ((((int32_t)arg1[0x2d]) - edi) * 0x8a8c)) + 0x10000) >> 0x11));
0061d5b3      int32_t ecx_18 = ((int32_t)(esi_2 + ebx_13));
0061d5bc      int32_t ebx_14 = ((int32_t)arg1[0x3f]);
0061d5c0      int32_t edi_1 = ((int32_t)arg1[0x2f]);
0061d5c4      arg1[5] = ecx_18;
0061d5c8      int32_t ecx_19 = ((int32_t)(esi_2 - ebx_13));
0061d5d3      int32_t esi_5 = (((int32_t)arg1[0xf]) - ebx_14);
0061d5d5      int32_t ebx_15 = ((int32_t)arg1[0x1f]);
0061d5d9      arg1[0xd] = ecx_19;
0061d5dd      int16_t ecx_20 = arg1[7];
0061d5f6      int16_t esi_8 = ((int16_t)((((esi_5 * 0x14e7b) + ((edi_1 - ebx_15) * 0x8a8c)) + 0x10000) >> 0x11));
0061d5fc      int32_t ebx_18 = ((int32_t)(ecx_20 + esi_8));
0061d5ff      arg1[7] = ebx_18;
0061d607      arg1[0xf] = (ecx_20 - esi_8);
0061d624      int32_t ebx_20 = (((((edx_9 - ebx_18) * 0x14e7b) + ((ecx_18 - eax_10) * 0x8a8c)) + 0x10000) >> 0x11);
0061d632      int32_t esi_11 = ((((edx_4 + ebx_20) + 8) >> 4) + 0x80);
0061d632      
0061d642      if (esi_11 < 0)
0061d6fb          esi_11 = 0;
0061d642      else if (esi_11 > 0xff)
0061d650          esi_11 = 0xff;
0061d650      
0061d655      *(uint16_t*)arg1 = esi_11;
0061d661      int32_t ecx_28 = ((((edx_4 - ebx_20) + 8) >> 4) + 0x80);
0061d661      
0061d669      if (ecx_28 < 0)
0061d6f7          ecx_28 = 0;
0061d669      else if (ecx_28 > 0xff)
0061d677          ecx_28 = 0xff;
0061d677      
0061d67c      arg1[1] = ecx_28;
0061d6a1      int32_t edx_16 = (((((((int32_t)(eax_3 - ecx_9)) - ((int32_t)arg1[0xf])) * 0x14e7b) + ((ecx_19 - ecx_12) * 0x8a8c)) + 0x10000) >> 0x11);
0061d6ab      int32_t ecx_33 = ((((eax_2 + edx_16) + 8) >> 4) + 0x80);
0061d6ab      
0061d6b3      if (ecx_33 < 0)
0061d6f3          ecx_33 = 0;
0061d6b3      else if (ecx_33 > 0xff)
0061d6bd          ecx_33 = 0xff;
0061d6bd      
0061d6c2      arg1[8] = ecx_33;
0061d6ce      int32_t result = ((((eax_2 - edx_16) + 8) >> 4) + 0x80);
0061d6ce      
0061d6d5      if (result < 0)
0061d6ef          result = 0;
0061d6d5      else if (result > 0xff)
0061d6de          result = 0xff;
0061d6de      
0061d6e3      arg1[9] = result;
0061d6ee      return result;
0061d4b0  }

0061d702        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....

0061d710  int16_t* _iDCT1x1_AAN_PX(int16_t* arg1)

0061d710  {
0061d71d      int32_t edx_3 = (((((int32_t)*(uint16_t*)arg1) + 8) >> 4) + 0x80);
0061d71d      
0061d725      if (edx_3 < 0)
0061d738          edx_3 = 0;
0061d725      else if (edx_3 > 0xff)
0061d72f          edx_3 = 0xff;
0061d72f      
0061d734      *(uint16_t*)arg1 = edx_3;
0061d737      return arg1;
0061d710  }

0061d73c                                                                                      8d 74 26 00                              .t&.

0061d740  int32_t _FillEncoderQuantTable_IPP(int32_t arg1)

0061d740  {
0061d7a3      void var_8c;
0061d7a3      void var_8a;
0061d7a3      void var_88;
0061d7a3      void var_86;
0061d7a3      
0061d7a3      for (int32_t i = 0; i < 0x40; i += 4)
0061d7a3      {
0061d760          int32_t esi_2 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 2));
0061d767          *(uint16_t*)(&var_8c + (i << 1)) = ((int16_t)(COMBINE(0, 0x8000) / ((int32_t)*(uint16_t*)(arg1 + (i << 1)))));
0061d772          int32_t esi_3 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 4));
0061d777          *(uint16_t*)(&var_8a + (i << 1)) = ((int16_t)(COMBINE(0, 0x8000) / esi_2));
0061d785          int32_t esi_4 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 6));
0061d78c          *(uint16_t*)(&var_88 + (i << 1)) = ((int16_t)(COMBINE(0, 0x8000) / esi_3));
0061d798          *(uint16_t*)(&var_86 + (i << 1)) = ((int16_t)(COMBINE(0, 0x8000) / esi_4));
0061d7a3      }
0061d7a3      
0061d7f5      int32_t i_1;
0061d7f5      
0061d7f5      for (i_1 = 0; i_1 < 0x40; i_1 += 4)
0061d7f5      {
0061d7bb          *(uint16_t*)(arg1 + (*(uint32_t*)((i_1 << 2) + &data_906ee0) << 1)) = *(uint16_t*)(&var_8c + (i_1 << 1));
0061d7cb          *(uint16_t*)(arg1 + (*(uint32_t*)((i_1 << 2) + &data_906ee4) << 1)) = *(uint16_t*)(&var_8a + (i_1 << 1));
0061d7db          *(uint16_t*)(arg1 + (*(uint32_t*)((i_1 << 2) + &data_906ee8) << 1)) = *(uint16_t*)(&var_88 + (i_1 << 1));
0061d7eb          *(uint16_t*)(arg1 + (*(uint32_t*)((i_1 << 2) + &data_906eec) << 1)) = *(uint16_t*)(&var_86 + (i_1 << 1));
0061d7f5      }
0061d7f5      
0061d7ff      return i_1;
0061d740  }


0061d800  int32_t _fQnt8x8_IPP_PX(int32_t arg1, int32_t arg2)

0061d800  {
0061d800      int32_t esi;
0061d800      int32_t var_4 = esi;
0061d802      int32_t var_c = esi;
0061d87f      int32_t i;
0061d87f      
0061d87f      for (i = 0; i < 0x40; i += 4)
0061d87f      {
0061d824          int32_t ebx_2 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 2));
0061d829          *(uint16_t*)(arg1 + (i << 1)) = ((int16_t)(((((uint32_t)*(uint16_t*)(arg2 + (i << 1))) * ((int32_t)*(uint16_t*)(arg1 + (i << 1)))) + 0x4000) >> 0xf));
0061d83e          int32_t ebx_3 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 4));
0061d843          *(uint16_t*)((arg1 + (i << 1)) + 2) = ((int16_t)(((((uint32_t)*(uint16_t*)((arg2 + (i << 1)) + 2)) * ebx_2) + 0x4000) >> 0xf));
0061d859          int32_t ebx_4 = ((int32_t)*(uint16_t*)((arg1 + (i << 1)) + 6));
0061d85e          *(uint16_t*)((arg1 + (i << 1)) + 4) = ((int16_t)(((((uint32_t)*(uint16_t*)((arg2 + (i << 1)) + 4)) * ebx_3) + 0x4000) >> 0xf));
0061d874          *(uint16_t*)((arg1 + (i << 1)) + 6) = ((int16_t)(((((uint32_t)*(uint16_t*)((arg2 + (i << 1)) + 6)) * ebx_4) + 0x4000) >> 0xf));
0061d87f      }
0061d87f      
0061d886      return i;
0061d800  }

0061d887                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

0061d890  int64_t* _fQnt8x8_IPP_M5(int64_t* arg1, int64_t* arg2)

0061d890  {
0061d8a2      int16_t x87_r6[0x4];
0061d8a2      _own_fqnt8x8_ipp_m5(x87_r6, arg1, arg2);
0061d8aa      return arg1;
0061d890  }

0061d8ab                                   90 8d 74 26 00                                                             ..t&.

0061d8b0  int64_t* _fQnt8x8_IPP_A6(int64_t* arg1, int64_t* arg2)

0061d8b0  {
0061d8c2      int16_t x87_r6[0x4];
0061d8c2      _own_fqnt8x8_ipp_a6(x87_r6, arg1, arg2);
0061d8ca      return arg1;
0061d8b0  }

0061d8cb                                   90 8d 74 26 00                                                             ..t&.

0061d8d0  int128_t* _fQnt8x8_IPP_W7(int128_t* arg1, int128_t* arg2)

0061d8d0  {
0061d8e2      int16_t xmm6[0x8];
0061d8e2      _own_fqnt8x8_ipp_w7(xmm6, arg1, arg2);
0061d8ea      return arg1;
0061d8d0  }

0061d8eb                                   90 8d 74 26 00                                                             ..t&.

0061d8f0  int16_t* _fDCT8x8_IPP_PX(int16_t* arg1)

0061d8f0  {
0061d8f1      int32_t esi;
0061d8f1      int32_t var_8 = esi;
0061d8fb      int16_t* edx = arg1;
0061d902      int32_t i_2 = 7;
0061da93      int32_t i;
0061da93      
0061da93      do
0061da93      {
0061d910          int16_t* var_30_1 = edx;
0061d914          int32_t eax_1 = ((int32_t)*(uint16_t*)edx);
0061d917          int32_t ecx_1 = ((int32_t)edx[7]);
0061d91f          int32_t eax_2 = (eax_1 + ecx_1);
0061d922          int32_t ebp_1 = ((int32_t)edx[1]);
0061d92a          int32_t esi_2 = ((int32_t)edx[6]);
0061d92e          int32_t ebx_1 = ((int32_t)edx[5]);
0061d936          int32_t eax_3 = (ebp_1 + esi_2);
0061d93a          int32_t edi_1 = ((int32_t)edx[4]);
0061d942          int32_t eax_4 = ((int32_t)edx[2]);
0061d946          int32_t ecx_2 = (eax_4 + ebx_1);
0061d94d          int32_t ecx_3 = ((int32_t)edx[3]);
0061d951          int32_t edx_1 = (ecx_3 + edi_1);
0061d956          int32_t eax_5 = (eax_4 - ebx_1);
0061d958          int32_t ebp_2 = (ebp_1 - esi_2);
0061d96e          int32_t esi_3 = (eax_2 + edx_1);
0061d976          int32_t ebp_4 = (eax_2 - edx_1);
0061d980          int32_t ecx_7 = (eax_3 + ecx_2);
0061d983          int32_t ebx_3 = (eax_3 - ecx_2);
0061d997          *(uint16_t*)var_30_1 = ((int16_t)(((esi_3 + ecx_7) << 0x13) >> 0x10));
0061d9a3          var_30_1[4] = ((int16_t)(((esi_3 - ecx_7) << 0x13) >> 0x10));
0061d9bd          var_30_1[2] = ((int16_t)((((ebp_4 * 0xa73d) + (ebx_3 * 0x4546)) + 0x800) >> 0xc));
0061d9d5          int32_t esi_8 = (eax_5 + ebp_2);
0061d9d8          var_30_1[6] = ((int16_t)((((ebp_4 * 0x4546) + (ebx_3 * 0xffff58c3)) + 0x800) >> 0xc));
0061d9e3          int32_t ebp_6 = (ebp_2 - eax_5);
0061d9fd          int32_t ebx_7 = ((((ecx_3 - edi_1) * 0xb505) + 0x800) >> 0xc);
0061da10          int32_t ecx_18 = ((((eax_1 - ecx_1) * 0xb505) + 0x800) >> 0xc);
0061da13          int32_t esi_9 = (ecx_18 + (esi_8 << 3));
0061da16          int32_t ecx_19 = (ecx_18 - (esi_8 * 8));
0061da18          int32_t ebp_7 = (ebx_7 + (ebp_6 << 3));
0061da1b          int32_t ebx_8 = (ebx_7 - (ebp_6 * 8));
0061da33          var_30_1[1] = ((int16_t)((((esi_9 * 0xfb1) + (ebp_7 * 0x31f)) + 0x800) >> 0xc));
0061da53          var_30_1[7] = ((int16_t)((((esi_9 * 0x31f) + (ebp_7 * 0xfffff04f)) + 0x800) >> 0xc));
0061da67          var_30_1[5] = ((int16_t)((((ecx_19 * 0x8e4) + (ebx_8 * 0xd4e)) + 0x800) >> 0xc));
0061da81          var_30_1[3] = ((int16_t)((((ecx_19 * 0xd4e) + (ebx_8 * 0xfffff71c)) + 0x800) >> 0xc));
0061da85          edx = &var_30_1[8];
0061da8c          i = (i_2 - 1);
0061da8d          i_2 = i;
0061da93      } while (i >= 0);
0061da99      int16_t* result = arg1;
0061daa2      int32_t i_3 = 7;
0061dc31      int32_t i_1;
0061dc31      
0061dc31      do
0061dc31      {
0061dab0          int16_t* result_1 = result;
0061dab4          int32_t ecx_21 = ((int32_t)*(uint16_t*)result);
0061dab7          int32_t edx_4 = ((int32_t)result[0x38]);
0061dabf          int32_t ebp_10 = ((int32_t)result[8]);
0061dac3          int32_t esi_11 = ((int32_t)result[0x30]);
0061dacb          int32_t edx_5 = (ecx_21 + edx_4);
0061dace          int32_t ebx_9 = ((int32_t)result[0x10]);
0061dad6          int32_t edx_6 = (ebp_10 + esi_11);
0061dada          int32_t ecx_22 = ((int32_t)result[0x28]);
0061dae2          int32_t edx_7 = (ebx_9 + ecx_22);
0061dae5          int32_t edi_10 = ((int32_t)result[0x20]);
0061daed          int32_t edx_8 = ((int32_t)result[0x18]);
0061daf1          int32_t eax_22 = (edx_8 + edi_10);
0061daf6          int32_t ebx_10 = (ebx_9 - ecx_22);
0061daf8          int32_t ebp_11 = (ebp_10 - esi_11);
0061db0e          int32_t ecx_23 = (edx_5 + eax_22);
0061db16          int32_t ebp_13 = (edx_5 - eax_22);
0061db20          int32_t edx_12 = (edx_6 + edx_7);
0061db23          int32_t esi_13 = (edx_6 - edx_7);
0061db30          *(uint16_t*)result_1 = ((int16_t)(((ecx_23 + edx_12) + 0x20) >> 6));
0061db41          result_1[0x20] = ((int16_t)(((ecx_23 - edx_12) + 0x20) >> 6));
0061db5f          result_1[0x10] = ((int16_t)((((ebp_13 * 0xa73d) + (esi_13 * 0x4546)) + 0x100000) >> 0x15));
0061db7d          result_1[0x30] = ((int16_t)((((ebp_13 * 0x4546) + (esi_13 * 0xffff58c3)) + 0x100000) >> 0x15));
0061db81          int32_t edx_19 = (ebx_10 + ebp_11);
0061db8b          int32_t ebp_15 = (ebp_11 - ebx_10);
0061db9b          int32_t edi_15 = ((((edx_8 - edi_10) * 0xb505) + 0x800) >> 0xc);
0061dbae          int32_t esi_18 = ((((ecx_21 - edx_4) * 0xb505) + 0x800) >> 0xc);
0061dbb1          int32_t edx_20 = (esi_18 + (edx_19 << 3));
0061dbb4          int32_t esi_19 = (esi_18 - (edx_19 * 8));
0061dbb6          int32_t ecx_32 = (edi_15 + (ebp_15 << 3));
0061dbb9          int32_t edi_16 = (edi_15 - (ebp_15 * 8));
0061dbd1          result_1[8] = ((int16_t)((((edx_20 * 0xfb1) + (ecx_32 * 0x31f)) + 0x100000) >> 0x15));
0061dbf1          result_1[0x38] = ((int16_t)((((edx_20 * 0x31f) + (ecx_32 * 0xfffff04f)) + 0x100000) >> 0x15));
0061dc0b          result_1[0x28] = ((int16_t)((((esi_19 * 0x8e4) + (edi_16 * 0xd4e)) + 0x100000) >> 0x15));
0061dc1f          result_1[0x18] = ((int16_t)((((esi_19 * 0xd4e) + (edi_16 * 0xfffff71c)) + 0x100000) >> 0x15));
0061dc23          result = &result_1[1];
0061dc2a          i_1 = (i_3 - 1);
0061dc2b          i_3 = i_1;
0061dc31      } while (i_1 >= 0);
0061dc3e      return result;
0061d8f0  }

0061dc3f                                                                                               90                                 .

0061dc40  int64_t* _fDCT8x8_IPP_M5(int64_t* arg1)

0061dc40  {
0061dc4a      _own_dct_2d_16s_8x8_frv_m5(arg1);
0061dc52      return arg1;
0061dc40  }

0061dc53                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

0061dc60  int64_t* _fDCT8x8_IPP_A6(int64_t* arg1)

0061dc60  {
0061dc6a      _own_dct_2d_16s_8x8_frv_a6(arg1);
0061dc72      return arg1;
0061dc60  }

0061dc73                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

0061dc80  int32_t _fDCT8x8_IPP_W7(int128_t* arg1)

0061dc80  {
0061dc92      return _own_dct_2d_16s_8x8_frv_w7(arg1);
0061dc80  }

0061dc93                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

0061dca0  int32_t sub_61dca0(void* arg1)

0061dca0  {
0061dcdc      int32_t var_c;
0061dcdc      
0061dcdc      if ((_ownWriteFile(*(uint32_t*)((char*)arg1 + 0x3c), ((char*)arg1 + 0x40), (*(uint32_t*)((char*)arg1 + 0x10) - *(uint32_t*)((char*)arg1 + 0x14)), &var_c) == 0 || var_c != 0x1000))
0061dcde          return 0xffffffe9;
0061dcde      
0061dce8      *(uint32_t*)((char*)arg1 + 0x10) = *(uint32_t*)((char*)arg1 + 0x14);
0061dcf2      return 0;
0061dca0  }

0061dcf3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

0061dd00  int32_t sub_61dd00(int32_t* arg1, int32_t arg2, int32_t arg3)

0061dd00  {
0061dd0f      int32_t ecx = arg3;
0061dd19      int32_t edx = arg1[3];
0061dd1e      int32_t ebx;
0061dd1e      int32_t ebp_5;
0061dd1e      
0061dd1e      if (ecx <= edx)
0061dd1e      {
0061ddd6          ebx = *(uint32_t*)arg1;
0061ddd8          ebp_5 = arg1[1];
0061dd1e      }
0061dd1e      else
0061dd1e      {
0061dd24          ebx = *(uint32_t*)arg1;
0061dd26          int32_t edi_1 = ecx;
0061dd26          
0061dd3e          while (true)
0061dd3e          {
0061dd3e              arg1[7] += 1;
0061dd41              edi_1 -= edx;
0061dd55              int32_t ebx_1 = (ebx | ((arg2 >> edi_1) & ((1 << edx) - 1)));
0061dd57              char* edx_3 = arg1[4];
0061dd57              
0061dd5d              if (edx_3 >= arg1[6])
0061dd64                  return 0xffffffe4;
0061dd64              
0061dd73              arg1[4] = &edx_3[1];
0061dd76              *(uint8_t*)edx_3 = ebx_1;
0061dd76              
0061dd78              if (ebx_1 == 0xff)
0061dd78              {
0061dd7a                  char* edx_4 = arg1[4];
0061dd7a                  
0061dd80                  if (edx_4 >= arg1[6])
0061dd87                      return 0xffffffe4;
0061dd87                  
0061dd9a                  arg1[4] = &edx_4[1];
0061dd9d                  *(uint8_t*)edx_4 = 0;
0061dda0                  arg1[7] += 1;
0061dd78              }
0061dd78              
0061dda3              ebx = 0;
0061dda5              ebp_5 = 0;
0061dda7              edx = 8;
0061dda7              
0061ddaf              if (edi_1 <= 8)
0061ddaf                  break;
0061ddaf              
0061dd30              arg1[3] = 8;
0061dd39              *(uint32_t*)arg1 = 0;
0061dd3b              arg1[1] = 0;
0061dd3e          }
0061dd3e          
0061ddb5          ecx = edi_1;
0061dd1e      }
0061dd1e      
0061ddb7      int32_t edx_5 = (edx - ecx);
0061ddbe      arg1[3] = edx_5;
0061ddc8      int32_t eax_3 = ((arg2 & ((1 << ecx) - 1)) << edx_5);
0061ddcc      int32_t eax_4;
0061ddcc      int32_t edx_6;
0061ddcc      edx_6 = HIGHD(((int64_t)eax_3));
0061ddcc      eax_4 = LOWD(((int64_t)eax_3));
0061ddcf      *(uint32_t*)arg1 = (ebx | eax_3);
0061ddd1      arg1[1] = (ebp_5 | edx_6);
0061dd96      return 0;
0061dd00  }

0061dd2a                                8d b6 00 00 00 00                                                            ......
0061dddd                                                                                         8d 76 00                               .v.

0061dde0  int32_t sub_61dde0(int32_t* arg1, int32_t arg2, int32_t arg3)

0061dde0  {
0061ddeb      int32_t eax = arg2;
0061ddef      int32_t ecx = arg3;
0061ddf3      int32_t edi = 0;
0061ddf5      int32_t edx = arg1[3];
0061ddfa      int32_t ebp_1;
0061ddfa      int32_t esi_1;
0061ddfa      
0061ddfa      if (ecx <= edx)
0061ddfa      {
0061dee4          ebp_1 = *(uint32_t*)arg1;
0061dee6          esi_1 = arg1[1];
0061ddfa      }
0061ddfa      else
0061ddfa      {
0061de00          int32_t ebp = ecx;
0061de02          int32_t esi = 0;
0061de02          
0061de1e          while (true)
0061de1e          {
0061de1e              char* edi_1 = arg1[4];
0061de1e              
0061de24              if (edi_1 >= arg1[6])
0061de24              {
0061de2e                  esi = sub_61dca0(arg1);
0061de2e                  
0061de32                  if (esi != 0)
0061dee0                      return esi;
0061dee0                  
0061de38                  edx = arg1[3];
0061de3b                  edi_1 = arg1[4];
0061de24              }
0061de24              
0061de3e              ebp -= edx;
0061de56              uint32_t edx_3 = ((uint32_t)((((int8_t)(arg2 >> ebp)) & (((int8_t)(1 << edx)) - 1)) | ((int8_t)*(uint32_t*)arg1)));
0061de5c              arg1[4] = &edi_1[1];
0061de5f              *(uint8_t*)edi_1 = edx_3;
0061de61              arg1[7] += 1;
0061de61              
0061de6a              if (edx_3 == 0xff)
0061de6a              {
0061deb1                  char* edx_6 = arg1[4];
0061deb1                  
0061deb7                  if (edx_6 >= arg1[6])
0061deb7                  {
0061dec1                      esi = sub_61dca0(arg1);
0061dec1                      
0061dec5                      if (esi != 0)
0061deeb                          return esi;
0061deeb                      
0061dec7                      edx_6 = arg1[4];
0061deb7                  }
0061deb7                  
0061decd                  arg1[4] = &edx_6[1];
0061ded0                  *(uint8_t*)edx_6 = 0;
0061ded3                  arg1[7] += 1;
0061de6a              }
0061de6a              
0061de6c              edx = 8;
0061de6c              
0061de74              if (ebp <= 8)
0061de74                  break;
0061de74              
0061de10              arg1[3] = 8;
0061de19              *(uint32_t*)arg1 = 0;
0061de1b              arg1[1] = 0;
0061de1e          }
0061de1e          
0061de76          ecx = ebp;
0061de78          edi = esi;
0061de7a          eax = arg2;
0061de7e          ebp_1 = 0;
0061de80          esi_1 = 0;
0061ddfa      }
0061ddfa      
0061de86      int32_t edx_4 = (edx - ecx);
0061de8d      arg1[3] = edx_4;
0061de9b      int32_t eax_8 = ((eax & ((1 << ecx) - 1)) << edx_4);
0061de9f      int32_t eax_9;
0061de9f      int32_t edx_5;
0061de9f      edx_5 = HIGHD(((int64_t)eax_8));
0061de9f      eax_9 = LOWD(((int64_t)eax_8));
0061dea2      *(uint32_t*)arg1 = (ebp_1 | eax_8);
0061dea4      arg1[1] = (esi_1 | edx_5);
0061deb0      return edi;
0061dde0  }

0061de06                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0061ded8                                                                          90 8d b4 26 00 00 00 00                          ...&....
0061deef                                               90                                                                 .

0061def0  void Make_optimal_huff_table(int32_t* const arg1, uint8_t* arg2, uint8_t* arg3)

0061def0  {
0061def1      int32_t esi;
0061def1      int32_t var_8 = esi;
0061df22      void var_c5c;
0061df22      __g_memcpy(&var_c5c, arg1, 0x404);
0061df3a      void var_84c;
0061df3a      __g_memzero(&var_84c, 0x404);
0061df52      void var_38;
0061df52      __g_memzero(&var_38, 0x21);
0061df97      void var_43c;
0061df97      int32_t i;
0061df97      
0061df97      for (i = 0; i < 0xfb; i += 6)
0061df65          __builtin_memset((&var_43c + (i << 2)), 0xff, 0x18);
0061df65      
0061df9e      __builtin_memset((&var_43c + (i << 2)), 0xff, 0x14);
0061dfc1      int32_t var_85c = 1;
0061dfcc      int32_t i_2;
0061dfcc      int32_t i_7;
0061dfcc      
0061dfcc      while (true)
0061dfcc      {
0061dfcc          i_7 = 0xffffffff;
0061dfd1          int32_t eax = 0x3b9aca00;
0061e01b          void var_c58;
0061e01b          int32_t i_1;
0061e01b          
0061e01b          for (i_1 = 0; i_1 <= 0xfd; i_1 += 3)
0061e01b          {
0061dfe0              int32_t ecx_1 = *(uint32_t*)(&var_c5c + (i_1 << 2));
0061dfe0              
0061dfea              if ((ecx_1 != 0 && ecx_1 <= eax))
0061dfea              {
0061dfec                  eax = ecx_1;
0061dfee                  i_7 = i_1;
0061dfea              }
0061dfea              
0061dff0              int32_t ecx_2 = *(uint32_t*)(&var_c58 + (i_1 << 2));
0061dff0              
0061dffa              if ((ecx_2 != 0 && ecx_2 <= eax))
0061dffa              {
0061dffc                  eax = ecx_2;
0061dffe                  i_7 = (i_1 + 1);
0061dffa              }
0061dffa              
0061e001              void var_c54;
0061e001              int32_t ecx_3 = *(uint32_t*)(&var_c54 + (i_1 << 2));
0061e001              
0061e00b              if ((ecx_3 != 0 && ecx_3 <= eax))
0061e00b              {
0061e00d                  eax = ecx_3;
0061e00f                  i_7 = (i_1 + 2);
0061e00b              }
0061e01b          }
0061e01b          
0061e020          int32_t esi_3 = *(uint32_t*)(&var_c5c + (i_1 << 2));
0061e020          
0061e02a          if ((esi_3 != 0 && esi_3 <= eax))
0061e02a          {
0061e02c              eax = esi_3;
0061e02e              i_7 = i_1;
0061e02a          }
0061e02a          
0061e030          int32_t ecx_5 = *(uint32_t*)(&var_c58 + (i_1 * 4));
0061e030          
0061e03a          if ((ecx_5 != 0 && ecx_5 <= eax))
0061e03c              i_7 = (i_1 + 1);
0061e03c          
0061e03f          int32_t i_6 = 0xffffffff;
0061e044          int32_t edx_1 = 0x3b9aca00;
0061e044          
0061e083          for (i_2 = 0; i_2 <= 0xfe; i_2 += 2)
0061e083          {
0061e050              int32_t esi_5 = *(uint32_t*)(&var_c5c + (i_2 << 2));
0061e050              
0061e05e              if ((esi_5 != 0 && (esi_5 <= edx_1 && i_2 != i_7)))
0061e05e              {
0061e060                  edx_1 = esi_5;
0061e062                  i_6 = i_2;
0061e05e              }
0061e05e              
0061e064              int32_t esi_6 = *(uint32_t*)(&var_c58 + (i_2 << 2));
0061e064              
0061e075              if ((esi_6 != 0 && (esi_6 <= edx_1 && (i_2 + 1) != i_7)))
0061e075              {
0061e077                  edx_1 = esi_6;
0061e079                  i_6 = (i_2 + 1);
0061e075              }
0061e083          }
0061e083          
0061e085          int32_t esi_7 = *(uint32_t*)(&var_c5c + (i_2 << 2));
0061e085          
0061e093          if ((esi_7 != 0 && (esi_7 <= edx_1 && i_2 != i_7)))
0061e095              i_6 = i_2;
0061e095          
0061e09a          if (i_6 == 0xffffffff)
0061e09a              break;
0061e09a          
0061e0a3          int32_t edx_3 = (i_7 * 4);
0061e0a8          int32_t eax_2 = (i_6 * 4);
0061e0ae          *(uint32_t*)(&var_c5c + (i_7 << 2)) += *(uint32_t*)(&var_c5c + (i_6 << 2));
0061e0b2          *(uint32_t*)(&var_c5c + (i_6 << 2)) = 0;
0061e0b2          
0061e0c5          while (true)
0061e0c5          {
0061e0c5              *(uint32_t*)(&var_84c + edx_3) += 1;
0061e0cc              int32_t ebx_2 = *(uint32_t*)(&var_43c + edx_3);
0061e0cc              
0061e0d6              if (ebx_2 == 0xffffffff)
0061e0d6                  break;
0061e0d6              
0061e0c2              edx_3 = (ebx_2 * 4);
0061e0c5          }
0061e0c5          
0061e0d8          *(uint32_t*)(&var_43c + edx_3) = i_6;
0061e0d8          
0061e0f4          while (true)
0061e0f4          {
0061e0f4              *(uint32_t*)(&var_84c + eax_2) += 1;
0061e0fb              int32_t eax_4 = *(uint32_t*)(&var_43c + eax_2);
0061e0fb              
0061e105              if (eax_4 == 0xffffffff)
0061e105                  break;
0061e105              
0061e0f2              eax_2 = (eax_4 * 4);
0061e0f4          }
0061dfcc      }
0061dfcc      
0061e17a      void var_848;
0061e17a      int32_t i_3;
0061e17a      
0061e17a      for (i_3 = 0; i_3 <= 0xfd; i_3 += 3)
0061e17a      {
0061e120          int32_t edx_4 = *(uint32_t*)(&var_84c + (i_3 << 2));
0061e120          
0061e129          if (edx_4 != 0)
0061e129          {
0061e12b              i_2 = *(uint8_t*)(&var_38 + edx_4);
0061e132              i_2 += 1;
0061e134              *(uint8_t*)(&var_38 + edx_4) = i_2;
0061e129          }
0061e129          
0061e13b          int32_t edx_5 = *(uint32_t*)(&var_848 + (i_3 << 2));
0061e13b          
0061e144          if (edx_5 != 0)
0061e144          {
0061e146              i_2 = *(uint8_t*)(&var_38 + edx_5);
0061e14d              i_2 += 1;
0061e14f              *(uint8_t*)(&var_38 + edx_5) = i_2;
0061e144          }
0061e144          
0061e156          void var_844;
0061e156          int32_t edx_6 = *(uint32_t*)(&var_844 + (i_3 << 2));
0061e156          
0061e15f          if (edx_6 != 0)
0061e15f          {
0061e161              i_2 = *(uint8_t*)(&var_38 + edx_6);
0061e168              i_2 += 1;
0061e16a              *(uint8_t*)(&var_38 + edx_6) = i_2;
0061e15f          }
0061e17a      }
0061e17a      
0061e17f      int32_t ecx_6 = *(uint32_t*)(&var_84c + (i_3 << 2));
0061e17f      
0061e188      if (ecx_6 != 0)
0061e188      {
0061e18a          i_2 = *(uint8_t*)(&var_38 + ecx_6);
0061e191          i_2 += 1;
0061e193          *(uint8_t*)(&var_38 + ecx_6) = i_2;
0061e188      }
0061e188      
0061e19a      int32_t edx_8 = *(uint32_t*)(&var_848 + (i_3 * 4));
0061e19a      
0061e1a3      if (edx_8 != 0)
0061e1a3      {
0061e1a5          i_2 = *(uint8_t*)(&var_38 + edx_8);
0061e1ac          i_2 += 1;
0061e1ae          *(uint8_t*)(&var_38 + edx_8) = i_2;
0061e1a3      }
0061e1a3      
0061e1b5      int32_t ecx_7 = 0x20;
0061e1ba      int32_t eax_5 = 0x1f;
0061e1ba      
0061e1bf      while (true)
0061e1bf      {
0061e1bf          edx_8 = *(uint8_t*)(&var_38 + ecx_7);
0061e1bf          
0061e1c8          if (edx_8 <= 0)
0061e1c8          {
0061e220              ecx_7 = eax_5;
0061e220              
0061e225              if (eax_5 == 0xf)
0061e225                  break;
0061e225              
0061e2ca              eax_5 -= 1;
0061e1c8          }
0061e1c8          else
0061e1c8          {
0061e1ca              int32_t ebp_1 = eax_5;
0061e1ca              
0061e1da              do
0061e1da              {
0061e1d0                  void var_39;
0061e1d0                  i_7 = *(uint8_t*)(&var_39 + ebp_1);
0061e1d7                  ebp_1 -= 1;
0061e1da              } while (i_7 <= 0);
0061e1da              
0061e1dc              edx_8 -= 2;
0061e1df              *(uint8_t*)(&var_38 + ecx_7) = edx_8;
0061e1e6              i_7 = *(uint8_t*)(&var_38 + eax_5);
0061e1ed              i_7 += 1;
0061e1ef              *(uint8_t*)(&var_38 + eax_5) = i_7;
0061e1f6              void var_37;
0061e1f6              edx_8 = *(uint8_t*)(&var_37 + ebp_1);
0061e1fd              edx_8 += 2;
0061e200              *(uint8_t*)(&var_37 + ebp_1) = edx_8;
0061e207              edx_8 = *(uint8_t*)(&var_38 + ebp_1);
0061e20e              edx_8 -= 1;
0061e210              *(uint8_t*)(&var_38 + ebp_1) = edx_8;
0061e1c8          }
0061e1bf      }
0061e1bf      
0061e240      void* edx_9 = (&var_38 + eax_5);
0061e24c      uint32_t i_4;
0061e24c      
0061e24c      for (i_4 = ((uint32_t)*(uint8_t*)(&var_38 + eax_5)); i_4 == 0; i_4 = ((uint32_t)*(uint8_t*)(&var_38 + ecx_7)))
0061e24c      {
0061e250          ecx_7 -= 1;
0061e258          edx_9 = (&var_38 + ecx_7);
0061e24c      }
0061e24c      
0061e266      i_4 -= 1;
0061e268      *(uint8_t*)edx_9 = i_4;
0061e280      __g_memcpy(arg2, &var_38, 0x10);
0061e286      int32_t i_5 = 1;
0061e28b      char* eax_6 = nullptr;
0061e28b      
0061e2bd      do
0061e2bd      {
0061e28d          int32_t j = 0;
0061e28f          char ecx_8 = 1;
0061e28f          
0061e2b7          do
0061e2b7          {
0061e298              if (i_5 == *(uint32_t*)(&var_84c + (j << 2)))
0061e298              {
0061e29a                  *(uint8_t*)(eax_6 + arg3) = j;
0061e29d                  eax_6 = &eax_6[1];
0061e298              }
0061e298              
0061e2a5              if (i_5 == *(uint32_t*)(&var_848 + (j << 2)))
0061e2a5              {
0061e2a7                  *(uint8_t*)(eax_6 + arg3) = ecx_8;
0061e2aa                  eax_6 = &eax_6[1];
0061e2a5              }
0061e2a5              
0061e2ab              ecx_8 += 2;
0061e2ae              j += 2;
0061e2b7          } while (j <= 0xff);
0061e2b7          
0061e2b9          i_5 += 1;
0061e2bd      } while (i_5 <= 0x20);
0061def0  }

0061e0bc                                                                                      8d 74 26 00                              .t&.
0061e0e1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
0061e10d                                         8d 76 00                                                               .v.
0061e219                                                                             8d b4 26 00 00 00 00                           ..&....

0061e2d0  int32_t _EncodeHuffman8x8_PX(int32_t* arg1, int32_t arg2, void* arg3, int16_t* arg4, int16_t* arg5)

0061e2d0  {
0061e2ec      int32_t result;
0061e2ec      
0061e2ec      if (arg1[0xf] == 0)
0061e2ec      {
0061e4eb          int32_t ecx_11 = ((int32_t)*(uint16_t*)arg5);
0061e4f4          int32_t edi_6 = (-(((int32_t)*(uint16_t*)arg4)) + ecx_11);
0061e4f8          *(uint16_t*)arg4 = ecx_11;
0061e4fb          int32_t esi_6;
0061e4fb          
0061e4fb          if (edi_6 < 0)
0061e4fb          {
0061e6d6              if (edi_6 <= 0xffffff00)
0061e6f2                  esi_6 = (((int32_t)*(uint8_t*)((-(edi_6) >> 8) + 0x907560)) + 8);
0061e6d6              else
0061e6df                  esi_6 = ((int32_t)*(uint8_t*)(0x907560 - edi_6));
0061e6df              
0061e6f5              edi_6 -= 1;
0061e4fb          }
0061e4fb          else if (edi_6 >= 0x100)
0061e51e              esi_6 = (((int32_t)*(uint8_t*)((edi_6 >> 8) + 0x907560)) + 8);
0061e507          else
0061e509              esi_6 = ((int32_t)*(uint8_t*)(edi_6 + 0x907560));
0061e509          
0061e538          result = sub_61dd00(arg1, ((uint32_t)*(uint16_t*)((arg2 + (esi_6 << 1)) + 0x408)), *(uint32_t*)((arg2 + (esi_6 << 2)) + 8));
0061e538          
0061e53f          if (result == 0)
0061e53f          {
0061e550              result = sub_61dd00(arg1, edi_6, esi_6);
0061e550              
0061e557              if (result == 0)
0061e557              {
0061e55d                  int32_t i_3 = 0;
0061e55f                  void* esi_8 = 4;
0061e55f                  
0061e572                  while (true)
0061e572                  {
0061e572                      int32_t ebp_4 = ((int32_t)arg5[*(uint32_t*)((char*)esi_8 + 0x906ee0)]);
0061e576                      esi_8 += 4;
0061e576                      
0061e57b                      if (ebp_4 != 0)
0061e57b                      {
0061e593                          if (i_3 > 0xf)
0061e593                          {
0061e59b                              int32_t i = i_3;
0061e59b                              
0061e5cb                              do
0061e5cb                              {
0061e5b8                                  result = sub_61dd00(arg1, ((uint32_t)*(uint16_t*)((char*)arg3 + 0x5e8)), *(uint32_t*)((char*)arg3 + 0x3c8));
0061e5b8                                  
0061e5bf                                  if (result != 0)
0061e34f                                      return result;
0061e34f                                  
0061e5c5                                  i -= 0x10;
0061e5cb                              } while (i > 0xf);
0061e5cb                              
0061e5cd                              i_3 = i;
0061e593                          }
0061e593                          
0061e5d7                          int32_t var_18_2;
0061e5d7                          
0061e5d7                          if (ebp_4 < 0)
0061e5d7                          {
0061e69c                              if (ebp_4 <= 0xffffff00)
0061e6c1                                  var_18_2 = (((int32_t)*(uint8_t*)((-(ebp_4) >> 8) + 0x907560)) + 8);
0061e69c                              else
0061e6a8                                  var_18_2 = ((int32_t)*(uint8_t*)(0x907560 - ebp_4));
0061e6a8                              
0061e6c5                              ebp_4 -= 1;
0061e5d7                          }
0061e5d7                          else if (ebp_4 >= 0x100)
0061e60f                              var_18_2 = (((int32_t)*(uint8_t*)((ebp_4 >> 8) + 0x907560)) + 8);
0061e5e3                          else
0061e5ec                              var_18_2 = ((int32_t)*(uint8_t*)(ebp_4 + 0x907560));
0061e5ec                          
0061e616                          int32_t edx_16 = ((i_3 << 4) + var_18_2);
0061e631                          result = sub_61dd00(arg1, ((uint32_t)*(uint16_t*)(((char*)arg3 + (edx_16 << 1)) + 0x408)), *(uint32_t*)(((char*)arg3 + (edx_16 << 2)) + 8));
0061e631                          
0061e638                          if (result != 0)
0061e638                              break;
0061e638                          
0061e64d                          result = sub_61dd00(arg1, ebp_4, var_18_2);
0061e64d                          
0061e654                          if (result != 0)
0061e654                              break;
0061e654                          
0061e65a                          i_3 = 0;
0061e57b                      }
0061e57b                      else
0061e57d                          i_3 += 1;
0061e57d                      
0061e662                      if (esi_8 >= 0x100)
0061e662                      {
0061e66a                          if (i_3 > 0)
0061e695                              return sub_61dd00(arg1, ((uint32_t)*(uint16_t*)((char*)arg3 + 0x408)), *(uint32_t*)((char*)arg3 + 8));
0061e695                          
0061e66a                          break;
0061e662                      }
0061e572                  }
0061e557              }
0061e53f          }
0061e2ec      }
0061e2ec      else
0061e2ec      {
0061e2f2          int32_t ecx_1 = ((int32_t)*(uint16_t*)arg5);
0061e2fb          int32_t edi_2 = (-(((int32_t)*(uint16_t*)arg4)) + ecx_1);
0061e2ff          *(uint16_t*)arg4 = ecx_1;
0061e302          int32_t esi;
0061e302          
0061e302          if (edi_2 < 0)
0061e302          {
0061e4c6              if (edi_2 <= 0xffffff00)
0061e4e2                  esi = (((int32_t)*(uint8_t*)((-(edi_2) >> 8) + 0x907560)) + 8);
0061e4c6              else
0061e4cf                  esi = ((int32_t)*(uint8_t*)(0x907560 - edi_2));
0061e4cf              
0061e4e5              edi_2 -= 1;
0061e302          }
0061e302          else if (edi_2 >= 0x100)
0061e325              esi = (((int32_t)*(uint8_t*)((edi_2 >> 8) + 0x907560)) + 8);
0061e30e          else
0061e310              esi = ((int32_t)*(uint8_t*)(edi_2 + 0x907560));
0061e310          
0061e33f          result = sub_61dde0(arg1, ((uint32_t)*(uint16_t*)((arg2 + (esi << 1)) + 0x408)), *(uint32_t*)((arg2 + (esi << 2)) + 8));
0061e33f          
0061e346          if (result == 0)
0061e346          {
0061e35b              result = sub_61dde0(arg1, edi_2, esi);
0061e35b              
0061e362              if (result == 0)
0061e362              {
0061e364                  int32_t i_2 = 0;
0061e366                  void* esi_2 = 4;
0061e366                  
0061e379                  while (true)
0061e379                  {
0061e379                      int32_t ebp_2 = ((int32_t)arg5[*(uint32_t*)((char*)esi_2 + 0x906ee0)]);
0061e37e                      esi_2 += 4;
0061e37e                      
0061e383                      if (ebp_2 != 0)
0061e383                      {
0061e393                          if (i_2 > 0xf)
0061e393                          {
0061e39b                              int32_t i_1 = i_2;
0061e39b                              
0061e3c7                              do
0061e3c7                              {
0061e3b8                                  result = sub_61dde0(arg1, ((uint32_t)*(uint16_t*)((char*)arg3 + 0x5e8)), *(uint32_t*)((char*)arg3 + 0x3c8));
0061e3b8                                  
0061e3bf                                  if (result != 0)
0061e34f                                      return result;
0061e34f                                  
0061e3c1                                  i_1 -= 0x10;
0061e3c7                              } while (i_1 > 0xf);
0061e3c7                              
0061e3c9                              i_2 = i_1;
0061e393                          }
0061e393                          
0061e3d3                          int32_t var_18_1;
0061e3d3                          
0061e3d3                          if (ebp_2 < 0)
0061e3d3                          {
0061e48c                              if (ebp_2 <= 0xffffff00)
0061e4b1                                  var_18_1 = (((int32_t)*(uint8_t*)((-(ebp_2) >> 8) + 0x907560)) + 8);
0061e48c                              else
0061e498                                  var_18_1 = ((int32_t)*(uint8_t*)(0x907560 - ebp_2));
0061e498                              
0061e4b5                              ebp_2 -= 1;
0061e3d3                          }
0061e3d3                          else if (ebp_2 >= 0x100)
0061e3ff                              var_18_1 = (((int32_t)*(uint8_t*)((ebp_2 >> 8) + 0x907560)) + 8);
0061e3df                          else
0061e3e8                              var_18_1 = ((int32_t)*(uint8_t*)(ebp_2 + 0x907560));
0061e3e8                          
0061e406                          int32_t edx_5 = ((i_2 << 4) + var_18_1);
0061e421                          result = sub_61dde0(arg1, ((uint32_t)*(uint16_t*)(((char*)arg3 + (edx_5 << 1)) + 0x408)), *(uint32_t*)(((char*)arg3 + (edx_5 << 2)) + 8));
0061e421                          
0061e428                          if (result != 0)
0061e428                              break;
0061e428                          
0061e43d                          result = sub_61dde0(arg1, ebp_2, var_18_1);
0061e43d                          
0061e444                          if (result != 0)
0061e444                              break;
0061e444                          
0061e44a                          i_2 = 0;
0061e383                      }
0061e383                      else
0061e385                          i_2 += 1;
0061e385                      
0061e452                      if (esi_2 >= 0x100)
0061e452                      {
0061e45a                          if (i_2 > 0)
0061e485                              return sub_61dde0(arg1, ((uint32_t)*(uint16_t*)((char*)arg3 + 0x408)), *(uint32_t*)((char*)arg3 + 8));
0061e485                          
0061e45a                          break;
0061e452                      }
0061e379                  }
0061e362              }
0061e346          }
0061e2ec      }
0061e2ec      
0061e34f      return result;
0061e2d0  }

0061e38b                                   90 8d 74 26 00                                                             ..t&.
0061e3ee                                            8b f6                                                                ..
0061e49e                                                                                            8b f6                                ..
0061e4bb                                                                                   90 8d 74 26 00                             ..t&.
0061e583           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0061e5f2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
0061e6ae                                            8b f6                                                                ..
0061e6cb                                   90 8d 74 26 00                                                             ..t&.
0061e6fb                                                                                   90 8d 74 26 00                             ..t&.

0061e700  enum _IJLERR _EncodeHuffman8x8_M5(struct _STATE* arg1, void* arg2, void* arg3, int16_t* arg4, int16_t* arg5)

0061e700  {
0061e72f      int32_t var_1c = 0;
0061e736      uint32_t var_18 = 0;
0061e73d      int16_t edx = *(uint16_t*)arg5;
0061e747      *(uint16_t*)arg5 = (((int16_t)-(((uint32_t)*(uint16_t*)arg4))) + edx);
0061e74a      *(uint16_t*)arg4 = edx;
0061e76a      int16_t var_400;
0061e76a      _own_count_zeros_m5(arg5, &var_400, &var_1c, &var_18);
0061e774      enum _IJLERR result;
0061e774      int32_t var_300;
0061e774      int16_t var_200;
0061e774      
0061e774      if (arg1->file == 0)
0061e774      {
0061e8f8          int32_t ebp_6;
0061e8f8          
0061e8f8          if (((uint32_t)*(uint16_t*)arg5) == 0)
0061e8f8          {
0061ea55              result = EB_Write_Bits_M5(((uint32_t)*(uint16_t*)((char*)arg2 + 0x408)), *(uint32_t*)((char*)arg2 + 8), arg1);
0061ea55              
0061ea5c              if (result == IJL_OK)
0061ea5c              {
0061ea62                  int32_t var_300_2 = (var_300 - 1);
0061ea68                  ebp_6 = 0;
0061e93a              label_61e93a:
0061e93a                  uint32_t edx_15 = var_18;
0061e93a                  
0061e943                  if (edx_15 == 0)
0061e945                      var_1c = 0x3f;
0061e945                  
0061e952                  if (ebp_6 < edx_15)
0061e952                  {
0061e958                      int16_t* var_14_2 = &var_400;
0061e958                      
0061e9ff                      do
0061e9ff                      {
0061e97d                          int32_t i;
0061e97d                          
0061e97d                          for (i = (*(uint32_t*)(((char*)var_14_2 + (ebp_6 << 2)) + 0x100) << 4); i > 0xf0; i -= 0x100)
0061e97d                          {
0061e998                              result = EB_Write_Bits_M5(((uint32_t)*(uint16_t*)((char*)arg3 + 0x5e8)), *(uint32_t*)((char*)arg3 + 0x3c8), arg1);
0061e998                              
0061e99f                              if (result != IJL_OK)
0061e8c7                                  return result;
0061e97d                          }
0061e97d                          
0061e9ba                          int32_t ecx_8 = ((int32_t)var_14_2[(ebp_6 + 0x100)]);
0061e9c2                          int32_t edi_3 = (i + ecx_8);
0061e9ea                          result = EB_Write_Bits_M5(((((int32_t)var_14_2[ebp_6]) & *(uint32_t*)((ecx_8 << 2) + &data_907020)) | (((uint32_t)*(uint16_t*)(((char*)arg3 + (edi_3 << 1)) + 0x408)) << ecx_8)), (ecx_8 + *(uint32_t*)(((char*)arg3 + (edi_3 << 2)) + 8)), arg1);
0061e9ea                          
0061e9f1                          if (result != IJL_OK)
0061e8c7                              return result;
0061e8c7                          
0061e9f7                          ebp_6 += 1;
0061e9ff                      } while (ebp_6 < var_18);
0061e952                  }
0061e952                  
0061ea0e                  if (var_1c > 0)
0061ea3f                      return EB_Write_Bits_M5(((uint32_t)*(uint16_t*)((char*)arg3 + 0x408)), *(uint32_t*)((char*)arg3 + 8), arg1);
0061ea5c              }
0061e8f8          }
0061e8f8          else
0061e8f8          {
0061e8fe              int32_t ecx_7 = ((int32_t)var_200);
0061e92c              result = EB_Write_Bits_M5(((((int32_t)var_400) & *(uint32_t*)((ecx_7 << 2) + &data_907020)) + (((uint32_t)*(uint16_t*)(((char*)arg2 + (ecx_7 << 1)) + 0x408)) << ecx_7)), (*(uint32_t*)(((char*)arg2 + (ecx_7 << 2)) + 8) + ecx_7), arg1);
0061e92c              
0061e933              if (result == IJL_OK)
0061e933              {
0061e935                  ebp_6 = 1;
0061e935                  goto label_61e93a;
0061e933              }
0061e8f8          }
0061e774      }
0061e774      else
0061e774      {
0061e77f          int32_t ebp_3;
0061e77f          
0061e77f          if (((uint32_t)*(uint16_t*)arg5) == 0)
0061e77f          {
0061e8dd              result = EB_Write_Bits_File_M5(((uint32_t)*(uint16_t*)((char*)arg2 + 0x408)), *(uint32_t*)((char*)arg2 + 8), arg1);
0061e8dd              
0061e8e4              if (result == IJL_OK)
0061e8e4              {
0061e8e6                  int32_t var_300_1 = (var_300 - 1);
0061e8ec                  ebp_3 = 0;
0061e7c5              label_61e7c5:
0061e7c5                  uint32_t edx_4 = var_18;
0061e7c5                  
0061e7ce                  if (edx_4 == 0)
0061e7d0                      var_1c = 0x3f;
0061e7d0                  
0061e7dd                  if (ebp_3 < edx_4)
0061e7dd                  {
0061e7e3                      int16_t* var_14_1 = &var_400;
0061e7e3                      
0061e88b                      do
0061e88b                      {
0061e808                          int32_t i_1;
0061e808                          
0061e808                          for (i_1 = (*(uint32_t*)(((char*)var_14_1 + (ebp_3 << 2)) + 0x100) << 4); i_1 > 0xf0; i_1 -= 0x100)
0061e808                          {
0061e828                              result = EB_Write_Bits_File_M5(((uint32_t)*(uint16_t*)((char*)arg3 + 0x5e8)), *(uint32_t*)((char*)arg3 + 0x3c8), arg1);
0061e828                              
0061e82f                              if (result != IJL_OK)
0061e8c7                                  return result;
0061e808                          }
0061e808                          
0061e84a                          int32_t ecx_4 = ((int32_t)var_14_1[(ebp_3 + 0x100)]);
0061e852                          int32_t esi_2 = (i_1 + ecx_4);
0061e87a                          result = EB_Write_Bits_File_M5(((((int32_t)var_14_1[ebp_3]) & *(uint32_t*)((ecx_4 << 2) + &data_907020)) | (((uint32_t)*(uint16_t*)(((char*)arg3 + (esi_2 << 1)) + 0x408)) << ecx_4)), (ecx_4 + *(uint32_t*)(((char*)arg3 + (esi_2 << 2)) + 8)), arg1);
0061e87a                          
0061e881                          if (result != IJL_OK)
0061e8c7                              return result;
0061e8c7                          
0061e883                          ebp_3 += 1;
0061e88b                      } while (ebp_3 < var_18);
0061e7dd                  }
0061e7dd                  
0061e89a                  if (var_1c > 0)
0061e8b8                      return EB_Write_Bits_File_M5(((uint32_t)*(uint16_t*)((char*)arg3 + 0x408)), *(uint32_t*)((char*)arg3 + 8), arg1);
0061e8e4              }
0061e77f          }
0061e77f          else
0061e77f          {
0061e785              int32_t ecx_3 = ((int32_t)var_200);
0061e7b3              result = EB_Write_Bits_File_M5(((((int32_t)var_400) & *(uint32_t*)((ecx_3 << 2) + &data_907020)) + (((uint32_t)*(uint16_t*)(((char*)arg2 + (ecx_3 << 1)) + 0x408)) << ecx_3)), (*(uint32_t*)(((char*)arg2 + (ecx_3 << 2)) + 8) + ecx_3), arg1);
0061e7b3              
0061e7ba              if (result == IJL_OK)
0061e7ba              {
0061e7c0                  ebp_3 = 1;
0061e7c0                  goto label_61e7c5;
0061e7ba              }
0061e77f          }
0061e774      }
0061e8c7      return result;
0061e700  }

0061ea6f                                               90                                                                 .

0061ea70  int32_t _EncodeHuffman8x8_A6(int64_t* arg1, int32_t arg2, void* arg3, int16_t* arg4, int16_t* arg5)

0061ea70  {
0061eaa6      return _own_encode_block_a6(arg1, arg2, arg3, arg4, arg5);
0061ea70  }

0061eaa7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

0061eab0  void Gather_Prog_DC_SA(int32_t* const arg1, int32_t* arg2, int16_t* arg3, int32_t arg4, int32_t arg5)

0061eab0  {
0061eacb      if (arg4 == 0)
0061eacb      {
0061ead0          int16_t edi_2 = ((int16_t)(((int32_t)*(uint16_t*)arg3) >> arg5));
0061ead6          int16_t ecx_3 = (((int16_t)-(*(uint32_t*)arg2)) + edi_2);
0061eadb          *(uint32_t*)arg2 = ((int32_t)edi_2);
0061eae1          int32_t eax_1 = sub_61ee70(ecx_3);
0061eae6          arg1[eax_1] += 1;
0061eacb      }
0061eab0  }

0061eaef                                               90                                                                 .

0061eaf0  void Encode_Prog_DC_SA(struct _STATE* arg1, struct _HUFFMAN_TABLE* arg2, int32_t* arg3, int16_t* arg4, int32_t arg5, int32_t arg6)

0061eaf0  {
0061eb0a      char ecx = arg6;
0061eb0a      
0061eb10      if (arg5 != 0)
0061eb10      {
0061ebc4          int32_t edx_8 = (((int32_t)*(uint16_t*)arg4) >> ecx);
0061ebc4          
0061ebc8          if (arg1->file == 0)
0061ebc8          {
0061ebd9              sub_61dd00(arg1, edx_8, 1);
0061ebe4              return;
0061ebc8          }
0061ebc8          
0061ebf4          sub_61dde0(arg1, edx_8, 1);
0061ebf4          return;
0061eb10      }
0061eb10      
0061eb1c      int32_t edx_2 = (((int32_t)*(uint16_t*)arg4) >> ecx);
0061eb20      int32_t esi_3 = (-(*(uint32_t*)arg3) + edx_2);
0061eb27      *(uint32_t*)arg3 = ((int32_t)edx_2);
0061eb2a      int32_t ebp_1;
0061eb2a      
0061eb2a      if (esi_3 < 0)
0061eb2a      {
0061ec06          if (esi_3 <= 0xffffff00)
0061ec22              ebp_1 = (((int32_t)*(uint8_t*)((-(esi_3) >> 8) + 0x907560)) + 8);
0061ec06          else
0061ec0f              ebp_1 = ((int32_t)*(uint8_t*)(0x907560 - esi_3));
0061ec0f          
0061ec25          esi_3 -= 1;
0061eb2a      }
0061eb2a      else if (esi_3 >= 0x100)
0061eb4d          ebp_1 = (((int32_t)*(uint8_t*)((esi_3 >> 8) + 0x907560)) + 8);
0061eb36      else
0061eb38          ebp_1 = ((int32_t)*(uint8_t*)(esi_3 + 0x907560));
0061eb38      
0061eb50      uint32_t edx_6 = ((uint32_t)arg2->huffval[ebp_1]);
0061eb58      int32_t ecx_1 = arg2->huffelem[ebp_1];
0061eb61      int32_t eax_2;
0061eb61      
0061eb61      if (arg1->file != 0)
0061eb80          eax_2 = sub_61dde0(arg1, edx_6, ecx_1);
0061eb61      else
0061eb6e          eax_2 = sub_61dd00(arg1, edx_6, ecx_1);
0061eb6e      
0061eb87      if (eax_2 == 0)
0061eb87      {
0061eb8e          if (arg1->file == 0)
0061eb8e          {
0061eb9b              sub_61dd00(arg1, esi_3, ebp_1);
0061eba6              return;
0061eb8e          }
0061eb8e          
0061ebb2          sub_61dde0(arg1, esi_3, ebp_1);
0061eb87      }
0061eaf0  }

0061ec2b                                   90 8d 74 26 00                                                             ..t&.

0061ec30  void Gather_EOBRUN(struct _STATE* arg1, int32_t* const arg2)

0061ec30  {
0061ec3d      int32_t Prog_EndOfBlock_Run = arg1->Prog_EndOfBlock_Run;
0061ec3d      
0061ec42      if (Prog_EndOfBlock_Run == 0)
0061ec82          return;
0061ec82      
0061ec47      if (Prog_EndOfBlock_Run == 1)
0061ec83          *(uint32_t*)arg2 += 1;
0061ec47      else
0061ec47      {
0061ec4e          if (Prog_EndOfBlock_Run > 0x7fff)
0061ec4e          {
0061ec50              arg2[0xe0] += 1;
0061ec59              Prog_EndOfBlock_Run = (arg1->Prog_EndOfBlock_Run - 0x7fff);
0061ec5e              arg1->Prog_EndOfBlock_Run = Prog_EndOfBlock_Run;
0061ec4e          }
0061ec4e          
0061ec69          int32_t eax_2 = (sub_61eea0(Prog_EndOfBlock_Run) << 4);
0061ec6c          arg2[eax_2] += 1;
0061ec47      }
0061ec47      
0061ec70      arg1->Prog_EndOfBlock_Run = 0;
0061ec30  }

0061ec88                          90 8d b4 26 00 00 00 00                                                          ...&....

0061ec90  void Encode_EOBRUN(struct _STATE* arg1, struct _HUFFMAN_TABLE* arg2)

0061ec90  {
0061ec9e      int32_t Prog_EndOfBlock_Run = arg1->Prog_EndOfBlock_Run;
0061ec9e      
0061eca3      if (Prog_EndOfBlock_Run != 0)
0061eca3      {
0061ecac          if (Prog_EndOfBlock_Run == 1)
0061ecac          {
0061edc8              uint32_t edx_4 = ((uint32_t)arg2->huffval[0]);
0061edcf              uint32_t ecx_5 = arg2->huffelem[0];
0061edd7              int32_t eax_9;
0061edd7              
0061edd7              if (arg1->file != 0)
0061edf6                  eax_9 = sub_61dde0(arg1, edx_4, ecx_5);
0061edd7              else
0061ede4                  eax_9 = sub_61dd00(arg1, edx_4, ecx_5);
0061ede4              
0061edfd              if (eax_9 == 0)
0061edba                  arg1->Prog_EndOfBlock_Run = 0;
0061ecac          }
0061ecac          else
0061ecac          {
0061ecb7              if (Prog_EndOfBlock_Run <= 0x7fff)
0061ecb7                  goto label_61ed45;
0061ecb7              
0061ecbd              uint32_t edx_1 = ((uint32_t)arg2->huffval[0xe0]);
0061ecc4              uint32_t ecx_1 = arg2->huffelem[0xe0];
0061eccf              int32_t eax_1;
0061eccf              
0061eccf              if (arg1->file != 0)
0061ecee                  eax_1 = sub_61dde0(arg1, edx_1, ecx_1);
0061eccf              else
0061ecdc                  eax_1 = sub_61dd00(arg1, edx_1, ecx_1);
0061ecdc              
0061ecf5              if (eax_1 == 0)
0061ecf5              {
0061ecfb                  int32_t Prog_EndOfBlock_Run_2 = arg1->Prog_EndOfBlock_Run;
0061ed03                  int32_t eax_3;
0061ed03                  
0061ed03                  if (arg1->file != 0)
0061ed2a                      eax_3 = sub_61dde0(arg1, Prog_EndOfBlock_Run_2, 0xe);
0061ed03                  else
0061ed14                      eax_3 = sub_61dd00(arg1, Prog_EndOfBlock_Run_2, 0xe);
0061ed14                  
0061ed31                  if (eax_3 == 0)
0061ed31                  {
0061ed3a                      Prog_EndOfBlock_Run = (arg1->Prog_EndOfBlock_Run - 0x7fff);
0061ed3f                      arg1->Prog_EndOfBlock_Run = Prog_EndOfBlock_Run;
0061ed45                  label_61ed45:
0061ed45                      int32_t eax_5 = sub_61eea0(Prog_EndOfBlock_Run);
0061ed4e                      int32_t ecx_3 = (eax_5 << 4);
0061ed51                      uint32_t edx_2 = ((uint32_t)arg2->huffval[ecx_3]);
0061ed59                      int32_t ecx_4 = arg2->huffelem[ecx_3];
0061ed62                      int32_t eax_6;
0061ed62                      
0061ed62                      if (arg1->file != 0)
0061ed81                          eax_6 = sub_61dde0(arg1, edx_2, ecx_4);
0061ed62                      else
0061ed6f                          eax_6 = sub_61dd00(arg1, edx_2, ecx_4);
0061ed6f                      
0061ed88                      if (eax_6 == 0)
0061ed88                      {
0061ed8a                          int32_t Prog_EndOfBlock_Run_1 = arg1->Prog_EndOfBlock_Run;
0061ed92                          int32_t eax_7;
0061ed92                          
0061ed92                          if (arg1->file != 0)
0061edb1                              eax_7 = sub_61dde0(arg1, Prog_EndOfBlock_Run_1, eax_5);
0061ed92                          else
0061ed9f                              eax_7 = sub_61dd00(arg1, Prog_EndOfBlock_Run_1, eax_5);
0061ed9f                          
0061edb8                          if (eax_7 == 0)
0061edba                              arg1->Prog_EndOfBlock_Run = 0;
0061ed88                      }
0061ed31                  }
0061ecf5              }
0061ecac          }
0061eca3      }
0061ec90  }

0061ee01     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

0061ee10  void Encode_ZRL(struct _STATE* arg1, struct _HUFFMAN_TABLE* arg2, int32_t* arg3)

0061ee10  {
0061ee21      uint32_t eax = ((uint32_t)arg2->huffval[0xf0]);
0061ee28      uint32_t esi = arg2->huffelem[0xf0];
0061ee33      int32_t eax_1;
0061ee33      
0061ee33      if (arg1->file != 0)
0061ee52          eax_1 = sub_61dde0(arg1, eax, esi);
0061ee33      else
0061ee40          eax_1 = sub_61dd00(arg1, eax, esi);
0061ee40      
0061ee59      if (eax_1 == 0)
0061ee5b          *(uint32_t*)arg3 -= 0x10;
0061ee10  }

0061ee64              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

0061ee70  int32_t sub_61ee70(int16_t arg1)

0061ee70  {
0061ee75      int32_t eax;
0061ee75      int32_t edx;
0061ee75      edx = HIGHD(((int64_t)arg1));
0061ee75      eax = LOWD(((int64_t)arg1));
0061ee78      void* eax_2 = ((eax ^ edx) - edx);
0061ee78      
0061ee7f      if (eax_2 >= 0x100)
0061ee96          return (((int32_t)*(uint8_t*)((eax_2 >> 8) + 0x907560)) + 8);
0061ee96      
0061ee88      return ((int32_t)*(uint8_t*)((char*)eax_2 + 0x907560));
0061ee70  }

0061ee97                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0061eea0  int32_t sub_61eea0(void* arg1)

0061eea0  {
0061eea9      if (arg1 >= 0x100)
0061eec0          return (((int32_t)*(uint8_t*)((arg1 >> 8) + 0x907660)) + 8);
0061eec0      
0061eeb2      return ((int32_t)*(uint8_t*)((char*)arg1 + 0x907660));
0061eea0  }

0061eec1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

0061eed0  void Append_BR_bits(struct _STATE* arg1, uint8_t* arg2, int32_t* arg3)

0061eed0  {
0061eeda      uint8_t* ebx = arg2;
0061eee2      int32_t ecx = *(uint32_t*)arg3;
0061eee2      
0061eee8      if ((ecx != 0 && ecx > 0))
0061eee8      {
0061ef33          int32_t i;
0061ef33          
0061ef33          do
0061ef33          {
0061eef5              int32_t eax_1;
0061eef5              
0061eef5              if (arg1->file != 0)
0061ef22                  eax_1 = sub_61dde0(arg1, ((uint32_t)*(uint8_t*)ebx), 1);
0061eef5              else
0061ef09                  eax_1 = sub_61dd00(arg1, ((uint32_t)*(uint8_t*)ebx), 1);
0061ef09              
0061ef29              if (eax_1 != 0)
0061ef29                  break;
0061ef29              
0061ef2b              ebx = &ebx[1];
0061ef2e              i = (*(uint32_t*)arg3 - 1);
0061ef2f              *(uint32_t*)arg3 = i;
0061ef33          } while (i > 0);
0061eee8      }
0061eed0  }

0061ef3c                                                                                      8d 74 26 00                              .t&.

0061ef40  void Gather_Prog_AC_first(struct _STATE* arg1, int16_t* arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t* const arg6)

0061ef40  {
0061ef5f      int32_t j = 0;
0061ef5f      
0061ef63      if (arg3 <= arg4)
0061ef63      {
0061ef6c          int32_t i = (arg3 * 4);
0061ef6c          
0061f025          do
0061f025          {
0061ef7e              int32_t edi_1 = ((int32_t)arg2[*(uint32_t*)(i + 0x906ee0)]);
0061ef82              i += 4;
0061ef82              
0061ef87              if (edi_1 != 0)
0061ef87              {
0061ef90                  int32_t edi_2;
0061ef90                  
0061ef90                  if (edi_1 < 0)
0061f076                      edi_2 = (-(edi_1) >> arg5);
0061ef90                  else
0061ef9a                      edi_2 = (edi_1 >> arg5);
0061ef9a                  
0061ef9e                  if (edi_2 != 0)
0061ef9e                  {
0061efbf                      Gather_EOBRUN(arg1, arg6);
0061efbf                      
0061efc7                      if (j > 0xf)
0061efc7                      {
0061efcf                          int32_t eax_5;
0061efcf                          
0061efcf                          if ((j - 0xf) < 0x60)
0061f05d                              eax_5 = arg6[0xf0];
0061efcf                          else
0061efcf                          {
0061efd9                              eax_5 = arg6[0xf0];
0061efd9                              
0061efe9                              do
0061efe9                              {
0061efe0                                  eax_5 += 5;
0061efe3                                  j -= 0x50;
0061efe9                              } while (j >= 0x6f);
0061efcf                          }
0061efcf                          
0061eff7                          do
0061eff7                          {
0061eff0                              eax_5 += 1;
0061eff1                              j -= 0x10;
0061eff7                          } while (j > 0xf);
0061eff7                          
0061effd                          arg6[0xf0] = eax_5;
0061efc7                      }
0061efc7                      
0061f003                      int32_t eax_6 = 1;
0061f003                      
0061f00c                      for (int32_t j_1 = (edi_2 >> 1); j_1 != 0; j_1 s>>= 1)
0061f010                          eax_6 += 1;
0061f010                      
0061f01a                      void* esi_1 = &arg6[(j * 0x10)];
0061f01e                      *(uint32_t*)((char*)esi_1 + (eax_6 << 2)) += 1;
0061f021                      j = 0;
0061ef9e                  }
0061ef9e                  else
0061efa0                      j += 1;
0061ef87              }
0061ef87              else
0061ef89                  j += 1;
0061f025          } while (i <= (arg4 * 4));
0061f025          
0061f035          if (j > 0)
0061f035          {
0061f03a              int32_t eax_8 = (arg1->Prog_EndOfBlock_Run + 1);
0061f040              arg1->Prog_EndOfBlock_Run = eax_8;
0061f040              
0061f043              if (eax_8 == 0x7fff)
0061f04c                  Gather_EOBRUN(arg1, arg6);
0061f035          }
0061ef63      }
0061ef40  }

0061ef8f                                               90                                                                 .
0061efa6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0061f065                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
0061f07d                                                                                         8d 76 00                               .v.

0061f080  void Gather_Prog_AC_refine(struct _STATE* arg1, int16_t* arg2, int32_t arg3, int32_t arg4, int32_t arg5, uint8_t* arg6, int32_t* arg7, int32_t* const arg8)

0061f080  {
0061f0ad      int32_t ecx = *(uint32_t*)arg7;
0061f0af      int32_t esi = 0;
0061f0b1      int32_t eax_1 = arg3;
0061f0b5      void var_124;
0061f0b5      
0061f0b5      if (arg3 <= arg4)
0061f0b5      {
0061f0e1          do
0061f0e1          {
0061f0c7              int32_t ebx_2 = ((int32_t)arg2[*(uint32_t*)((eax_1 << 2) + &data_906ee0)]);
0061f0c7              
0061f0cd              if (ebx_2 < 0)
0061f0cf                  ebx_2 = -(ebx_2);
0061f0cf              
0061f0d1              int32_t ebx_3 = (ebx_2 >> arg5);
0061f0d3              *(uint32_t*)(&var_124 + (eax_1 << 2)) = ebx_3;
0061f0d3              
0061f0da              if (ebx_3 == 1)
0061f0dc                  esi = eax_1;
0061f0dc              
0061f0de              eax_1 += 1;
0061f0e1          } while (eax_1 <= arg4);
0061f0b5      }
0061f0b5      
0061f0ea      int32_t i = 0;
0061f0ec      char* edx_1 = nullptr;
0061f0f5      void* eax_3 = &arg6[ecx];
0061f0f5      
0061f0fa      if (arg3 <= arg4)
0061f0fa      {
0061f100          int32_t var_18_1 = arg3;
0061f10e          int32_t var_24_2 = ecx;
0061f254          int32_t ecx_6;
0061f254          
0061f254          do
0061f254          {
0061f11c              int32_t ecx_2 = *(uint32_t*)(&var_124 + (var_18_1 << 2));
0061f11c              
0061f129              if (ecx_2 != 0)
0061f129              {
0061f143                  if (i > 0xf)
0061f143                  {
0061f150                      int32_t ecx_3 = var_24_2;
0061f150                      
0061f167                      while (true)
0061f167                      {
0061f167                          if (var_18_1 > esi)
0061f167                          {
0061f1e0                              var_24_2 = ecx_3;
0061f1e0                              break;
0061f167                          }
0061f167                          
0061f17b                          Gather_EOBRUN(arg1, arg8);
0061f180                          ecx_3 = 0;
0061f188                          int32_t eax_6;
0061f188                          
0061f188                          if ((i - 0xf) < 0x60)
0061f2b9                              eax_6 = arg8[0xf0];
0061f188                          else
0061f188                          {
0061f18e                              eax_6 = arg8[0xf0];
0061f18e                              
0061f1a9                              do
0061f1a9                              {
0061f1a0                                  eax_6 += 5;
0061f1a3                                  i -= 0x50;
0061f1a9                              } while (i >= 0x6f);
0061f188                          }
0061f188                          
0061f1b7                          do
0061f1b7                          {
0061f1b0                              eax_6 += 1;
0061f1b1                              i -= 0x10;
0061f1b7                          } while (i > 0xf);
0061f1b7                          
0061f1b9                          arg8[0xf0] = eax_6;
0061f1bf                          eax_3 = arg6;
0061f1c6                          edx_1 = nullptr;
0061f1c6                          
0061f1cb                          if (i <= 0xf)
0061f1cb                          {
0061f2d6                              var_24_2 = 0;
0061f2dd                              break;
0061f1cb                          }
0061f167                      }
0061f143                  }
0061f143                  
0061f1f1                  if (ecx_2 <= 1)
0061f1f1                  {
0061f215                      Gather_EOBRUN(arg1, arg8);
0061f21c                      int32_t ebx_4 = (i << 6);
0061f226                      var_24_2 = 0;
0061f22d                      eax_3 = arg6;
0061f234                      *(uint32_t*)((ebx_4 + arg8) + 4) += 1;
0061f238                      edx_1 = nullptr;
0061f23a                      i = 0;
0061f1f1                  }
0061f1f1                  else
0061f1f1                  {
0061f1f3                      int32_t ecx_4;
0061f1f3                      ecx_4 = (ecx_2 & 1);
0061f1f6                      *(uint8_t*)(edx_1 + eax_3) = ecx_4;
0061f1f9                      edx_1 = &edx_1[1];
0061f1f1                  }
0061f129              }
0061f129              else
0061f12b                  i += 1;
0061f12b              
0061f243              ecx_6 = (var_18_1 + 1);
0061f24b              var_18_1 = ecx_6;
0061f254          } while (ecx_6 <= arg4);
0061f25a          ecx = var_24_2;
0061f25a          
0061f2d2          if ((i > 0 || edx_1 > 0))
0061f2d2          {
0061f26f              int32_t ebx_6 = (arg1->Prog_EndOfBlock_Run + 1);
0061f270              arg1->Prog_EndOfBlock_Run = ebx_6;
0061f273              ecx = &edx_1[ecx];
0061f273              
0061f287              if ((ebx_6 == 0x7fff || ecx > (data_832300 - 0x3f)))
0061f287              {
0061f29e                  Gather_EOBRUN(arg1, arg8);
0061f2a3                  ecx = 0;
0061f287              }
0061f2d2          }
0061f0fa      }
0061f0fa      
0061f2ac      *(uint32_t*)arg7 = ecx;
0061f080  }

0061f131                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
0061f1d2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
0061f1fc                                                                                      8d 74 26 00                              .t&.
0061f2c4              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0061f2e2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....

0061f2f0  void Encode_Prog_AC_first(struct _STATE* arg1, struct _HUFFMAN_TABLE* arg2, int16_t* arg3, int32_t arg4, int32_t arg5, int32_t arg6)

0061f2f0  {
0061f2f7      struct _STATE* ebx = arg1;
0061f2fb      struct _HUFFMAN_TABLE* ecx = arg2;
0061f2ff      int16_t* edi = arg3;
0061f303      int32_t ebp = arg4;
0061f307      int32_t esi = arg5;
0061f30b      int32_t i_4 = 0;
0061f30d      int32_t i_3 = 0;
0061f311      int32_t i_2;
0061f311      
0061f311      if (ebp <= esi)
0061f311      {
0061f317          i_2 = 0;
0061f317          
0061f32c          while (true)
0061f32c          {
0061f32c              int32_t ebx_1 = ((int32_t)edi[*(uint32_t*)((ebp << 2) + &data_906ee0)]);
0061f32c              
0061f332              if (ebx_1 != 0)
0061f332              {
0061f340                  int32_t var_14_1;
0061f340                  int32_t ebx_2;
0061f340                  
0061f340                  if (ebx_1 < 0)
0061f340                  {
0061f4d5                      ebx_2 = (-(ebx_1) >> arg6);
0061f4dc                      var_14_1 = (ebx_2 ^ 0xffffffff);
0061f340                  }
0061f340                  else
0061f340                  {
0061f34a                      ebx_2 = (ebx_1 >> arg6);
0061f34c                      var_14_1 = ebx_2;
0061f340                  }
0061f340                  
0061f352                  if (ebx_2 != 0)
0061f352                  {
0061f36f                      Encode_EOBRUN(arg1, arg2);
0061f374                      int32_t i = i_2;
0061f374                      
0061f37b                      if (i > 0xf)
0061f37b                      {
0061f3ab                          do
0061f3ab                          {
0061f39f                              Encode_ZRL(arg1, arg2, &i_2);
0061f3a4                              i = i_2;
0061f3ab                          } while (i > 0xf);
0061f3ab                          
0061f3ad                          esi = arg5;
0061f3b1                          edi = arg3;
0061f37b                      }
0061f37b                      
0061f3b5                      int32_t edx_2 = 1;
0061f3ba                      int32_t i_1 = (ebx_2 >> 1);
0061f3be                      int32_t var_18_1 = 1;
0061f3be                      
0061f3c2                      if (i_1 != 0)
0061f3c2                      {
0061f3d5                          do
0061f3d5                          {
0061f3d0                              edx_2 += 1;
0061f3d1                              i_1 s>>= 1;
0061f3d5                          } while (i_1 != 0);
0061f3d5                          
0061f3d7                          var_18_1 = edx_2;
0061f3c2                      }
0061f3c2                      
0061f3e6                      int32_t eax_2 = ((i << 4) + var_18_1);
0061f3ea                      uint32_t edx_3 = ((uint32_t)arg2->huffval[eax_2]);
0061f3f2                      int32_t eax_3 = arg2->huffelem[eax_2];
0061f3fb                      int32_t eax_4;
0061f3fb                      
0061f3fb                      if (arg1->file != 0)
0061f42f                          eax_4 = sub_61dde0(arg1, edx_3, eax_3);
0061f3fb                      else
0061f40c                          eax_4 = sub_61dd00(arg1, edx_3, eax_3);
0061f40c                      
0061f436                      if (eax_4 != 0)
0061f4ce                          return;
0061f4ce                      
0061f445                      int32_t eax_7;
0061f445                      
0061f445                      if (arg1->file != 0)
0061f487                          eax_7 = sub_61dde0(arg1, var_14_1, var_18_1);
0061f445                      else
0061f45e                          eax_7 = sub_61dd00(arg1, var_14_1, var_18_1);
0061f45e                      
0061f48e                      if (eax_7 != 0)
0061f4ce                          return;
0061f4ce                      
0061f490                      i_4 = 0;
0061f492                      i_3 = 0;
0061f352                  }
0061f352                  else
0061f352                  {
0061f354                      i_4 += 1;
0061f355                      i_3 = i_4;
0061f352                  }
0061f332              }
0061f332              else
0061f332              {
0061f334                  i_4 += 1;
0061f335                  i_3 = i_4;
0061f332              }
0061f332              
0061f494              ebp += 1;
0061f494              
0061f497              if (ebp > esi)
0061f497                  break;
0061f497              
0061f321              i_2 = i_3;
0061f32c          }
0061f32c          
0061f49d          ecx = arg2;
0061f4a1          ebx = arg1;
0061f311      }
0061f311      
0061f4a7      if (i_4 > 0)
0061f4a7      {
0061f4ac          int32_t eax_10 = (ebx->Prog_EndOfBlock_Run + 1);
0061f4b2          ebx->Prog_EndOfBlock_Run = eax_10;
0061f4b2          
0061f4b5          if (eax_10 == 0x7fff)
0061f4b5          {
0061f4b7              i_2 = i_3;
0061f4c2              Encode_EOBRUN(ebx, ecx);
0061f4b5          }
0061f4a7      }
0061f2f0  }

0061f33c                                                                                      8d 74 26 00                              .t&.
0061f35c                                                                                      8d 74 26 00                              .t&.
0061f413                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0061f465                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
0061f4e5                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....

0061f4f0  void Encode_Prog_AC_refine(struct _STATE* arg1, struct _HUFFMAN_TABLE* arg2, int16_t* arg3, int32_t arg4, int32_t arg5, int32_t arg6, uint8_t* arg7, int32_t* arg8)

0061f4f0  {
0061f4fa      struct _STATE* ebp = arg1;
0061f501      int32_t ebx = arg4;
0061f516      int32_t* esi = arg8;
0061f51d      int32_t edi = *(uint32_t*)esi;
0061f521      int32_t var_134 = edi;
0061f527      int32_t var_20 = 0;
0061f52e      int32_t eax = ebx;
0061f530      void var_130;
0061f530      
0061f530      if (ebx <= arg5)
0061f530      {
0061f539          int32_t edi_1 = 0;
0061f539          
0061f572          do
0061f572          {
0061f557              int32_t esi_3 = ((int32_t)arg3[*(uint32_t*)((eax << 2) + &data_906ee0)]);
0061f557              
0061f55e              if (esi_3 < 0)
0061f560                  esi_3 = -(esi_3);
0061f560              
0061f562              int32_t esi_4 = (esi_3 >> arg6);
0061f564              *(uint32_t*)(&var_130 + (eax << 2)) = esi_4;
0061f564              
0061f56b              if (esi_4 == 1)
0061f56d                  edi_1 = eax;
0061f56d              
0061f56f              eax += 1;
0061f572          } while (eax <= arg5);
0061f572          
0061f574          var_20 = edi_1;
0061f582          esi = arg8;
0061f589          ebp = arg1;
0061f530      }
0061f530      
0061f590      int32_t ecx_1 = 0;
0061f592      int32_t edx_2 = 0;
0061f596      int32_t var_30 = 0;
0061f5a1      int32_t var_1c = 0;
0061f5c2      int32_t var_2c;
0061f5c2      
0061f5c2      if (ebx <= arg5)
0061f5c2      {
0061f5c8          void* esi_5 = &arg7[edi];
0061f5cf          int32_t edi_2 = 0;
0061f5cf          
0061f7f5          do
0061f7f5          {
0061f5d6              int32_t eax_5 = *(uint32_t*)(&var_130 + (ebx << 2));
0061f5d6              
0061f5dc              if (eax_5 != 0)
0061f5dc              {
0061f5f0                  var_2c = edi_2;
0061f5f0                  
0061f609                  if ((ecx_1 > 0xf && ebx <= var_20))
0061f609                  {
0061f69d                      bool cond:1_1;
0061f69d                      
0061f69d                      do
0061f69d                      {
0061f637                          Encode_EOBRUN(ebp, arg2);
0061f64b                          Append_BR_bits(ebp, arg7, &var_134);
0061f650                          var_134 = 0;
0061f66a                          Encode_ZRL(ebp, arg2, &var_30);
0061f681                          Append_BR_bits(ebp, esi_5, &var_2c);
0061f686                          esi_5 = arg7;
0061f68f                          cond:1_1 = var_30 > 0xf;
0061f692                          var_2c = 0;
0061f69d                      } while (cond:1_1);
0061f6ad                      edx_2 = 0;
0061f609                  }
0061f609                  
0061f6b2                  if (eax_5 <= 1)
0061f6b2                  {
0061f6de                      Encode_EOBRUN(ebp, arg2);
0061f6f9                      Append_BR_bits(ebp, arg7, &var_134);
0061f6fe                      var_134 = 0;
0061f70d                      int32_t edx_6 = (var_30 << 4);
0061f717                      uint32_t eax_7 = ((uint32_t)arg2->huffval[(1 + edx_6)]);
0061f71f                      int32_t edx_7 = arg2->huffelem[(1 + edx_6)];
0061f728                      int32_t eax_8;
0061f728                      
0061f728                      if (ebp->file != 0)
0061f74b                          eax_8 = sub_61dde0(ebp, eax_7, edx_7);
0061f728                      else
0061f735                          eax_8 = sub_61dd00(ebp, eax_7, edx_7);
0061f735                      
0061f752                      if (eax_8 != 0)
0061f752                      {
0061f8c0                          esi = arg8;
0061f8c7                          edi = var_134;
0061f8cb                          goto label_61f880;
0061f752                      }
0061f752                      
0061f76c                      int32_t eax_10;
0061f76c                      
0061f76c                      if (((int32_t)arg3[*(uint32_t*)((ebx << 2) + &data_906ee0)]) < 0)
0061f8ab                          eax_10 = 0;
0061f76c                      else
0061f772                          eax_10 = 1;
0061f772                      
0061f77c                      int32_t eax_11;
0061f77c                      
0061f77c                      if (ebp->file != 0)
0061f7af                          eax_11 = sub_61dde0(ebp, eax_10, 1);
0061f77c                      else
0061f78d                          eax_11 = sub_61dd00(ebp, eax_10, 1);
0061f78d                      
0061f7b6                      if (eax_11 != 0)
0061f7b6                      {
0061f875                          esi = arg8;
0061f87c                          edi = var_134;
0061f87c                          goto label_61f880;
0061f7b6                      }
0061f7b6                      
0061f7ce                      Append_BR_bits(ebp, esi_5, &var_2c);
0061f7d3                      esi_5 = arg7;
0061f7da                      edx_2 = 0;
0061f7dc                      edi_2 = 0;
0061f7de                      ecx_1 = 0;
0061f7e0                      var_30 = 0;
0061f6b2                  }
0061f6b2                  else
0061f6b2                  {
0061f6b4                      eax_5 &= 1;
0061f6b6                      *(uint8_t*)((char*)esi_5 + edx_2) = eax_5;
0061f6c0                      edx_2 = (var_2c + 1);
0061f6c1                      edi_2 = edx_2;
0061f6c3                      ecx_1 = var_30;
0061f6b2                  }
0061f5dc              }
0061f5dc              else
0061f5dc              {
0061f5de                  ecx_1 += 1;
0061f5df                  var_30 = ecx_1;
0061f5dc              }
0061f5dc              
0061f7eb              ebx += 1;
0061f7f5          } while (ebx <= arg5);
0061f7f5          
0061f7fb          var_1c = edi_2;
0061f802          esi = arg8;
0061f809          edi = var_134;
0061f5c2      }
0061f5c2      
0061f8a3      if ((ecx_1 > 0 || edx_2 > 0))
0061f8a3      {
0061f818          int32_t eax_14 = (ebp->Prog_EndOfBlock_Run + 1);
0061f819          edi += edx_2;
0061f81b          ebp->Prog_EndOfBlock_Run = eax_14;
0061f81b          
0061f823          if (eax_14 == 0x7fff)
0061f823          {
0061f894              var_2c = var_1c;
0061f89b              var_134 = edi;
0061f851          label_61f851:
0061f851              Encode_EOBRUN(ebp, arg2);
0061f86c              Append_BR_bits(ebp, arg7, &var_134);
0061f871              edi = 0;
0061f823          }
0061f823          else if (edi > (data_832300 - 0x3f))
0061f82f          {
0061f838              var_2c = var_1c;
0061f83f              var_134 = edi;
0061f83f              goto label_61f851;
0061f82f          }
0061f8a3      }
0061f8a3      
0061f880  label_61f880:
0061f880      *(uint32_t*)esi = edi;
0061f4f0  }

0061f5eb                                   90 8d 74 26 00                                                             ..t&.
0061f6cf                                               90                                                                 .
0061f73c                                                                                      8d 74 26 00                              .t&.
0061f794                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0061f8b2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
0061f8cd                                         8d 76 00                                                               .v.

0061f8d0  int32_t GET_BITS(struct _STATE* arg1, int32_t arg2)

0061f8d0  {
0061f8d2      int32_t esi;
0061f8d2      int32_t var_c = esi;
0061f8e0      arg1->bit_buffer_64;
0061f8e2      arg1->bit_buffer_64;
0061f8ef      arg1->bitbuf_bits_valid -= arg2;
0061f8fe      return (_aullshr() & ((1 << arg2) - 1));
0061f8d0  }

0061f8ff                                                                                               90                                 .

0061f900  int32_t PEEK_BITS(struct _STATE* arg1, int32_t arg2)

0061f900  {
0061f902      int32_t esi;
0061f902      int32_t var_c = esi;
0061f910      arg1->bit_buffer_64;
0061f912      arg1->bit_buffer_64;
0061f918      arg1->bitbuf_bits_valid;
0061f92b      return (_aullshr() & ((1 << arg2) - 1));
0061f900  }

0061f92c                                      8d 74 26 00                                                              .t&.

0061f930  enum _IJLERR Fill_Bit_Buffer(struct _STATE* arg1, int32_t arg2)

0061f930  {
0061f93e      int32_t bitbuf_bits_valid = arg1->bitbuf_bits_valid;
0061f93e      
0061f944      if (bitbuf_bits_valid < 0x19)
0061f944      {
0061f948          int32_t bitbuf_bits_valid_2 = bitbuf_bits_valid;
0061f948          
0061f94c          while (true)
0061f94c          {
0061f94c              bitbuf_bits_valid = arg1->unread_marker;
0061f951              int32_t bitbuf_bits_valid_1;
0061f951              int32_t edx_5;
0061f951              
0061f951              if (bitbuf_bits_valid != 0)
0061f951              {
0061fa40                  bitbuf_bits_valid_1 = bitbuf_bits_valid_2;
0061fa42                  edx_5 = arg2;
0061f951              }
0061f951              else
0061f951              {
0061f957                  int32_t entropy_bytes_left = arg1->entropy_bytes_left;
0061f957                  
0061f95c                  if (entropy_bytes_left <= 0)
0061f95c                  {
0061fa25                      if (arg1->file == 0)
0061fa68                          return 0;
0061fa68                      
0061fa2a                      enum _IJLERR eax_5 = Buffer_Read_Bytes(arg1);
0061fa2a                      
0061fa31                      if (eax_5 != IJL_OK)
0061fa5f                          return eax_5;
0061fa5f                      
0061fa33                      entropy_bytes_left = arg1->entropy_bytes_left;
0061f95c                  }
0061f95c                  
0061f962                  uint8_t* cur_entropy_ptr = arg1->cur_entropy_ptr;
0061f965                  void* cur_entropy_ptr_1 = &cur_entropy_ptr[1];
0061f968                  int32_t entropy_bytes_left_1 = (entropy_bytes_left - 1);
0061f969                  arg1->cur_entropy_ptr = cur_entropy_ptr_1;
0061f96c                  bitbuf_bits_valid = ((uint32_t)*(uint8_t*)cur_entropy_ptr);
0061f96f                  int32_t entropy_bytes_processed = arg1->entropy_bytes_processed;
0061f972                  arg1->entropy_bytes_left = entropy_bytes_left_1;
0061f975                  int32_t entropy_bytes_processed_1 = (entropy_bytes_processed + 1);
0061f97b                  arg1->entropy_bytes_processed = entropy_bytes_processed_1;
0061f97b                  
0061f97e                  if (bitbuf_bits_valid != 0xff)
0061f97e                      goto label_61f980;
0061f97e                  
0061f9c8                  uint32_t i;
0061f9c8                  
0061f9c8                  do
0061f9c8                  {
0061f9b2                      if (entropy_bytes_left_1 <= 0)
0061f9b2                      {
0061f9ff                          if (arg1->file == 0)
0061fa51                              return 0xffffffeb;
0061fa51                          
0061fa04                          enum _IJLERR eax_3 = Buffer_Read_Bytes(arg1);
0061fa04                          
0061fa0b                          if (eax_3 != IJL_OK)
0061fa58                              return eax_3;
0061fa58                          
0061fa0d                          entropy_bytes_left_1 = arg1->entropy_bytes_left;
0061fa10                          cur_entropy_ptr_1 = arg1->cur_entropy_ptr;
0061fa13                          entropy_bytes_processed_1 = arg1->entropy_bytes_processed;
0061f9b2                      }
0061f9b2                      
0061f9b4                      i = ((uint32_t)*(uint8_t*)cur_entropy_ptr_1);
0061f9b7                      cur_entropy_ptr_1 += 1;
0061f9b8                      entropy_bytes_left_1 -= 1;
0061f9b9                      arg1->cur_entropy_ptr = cur_entropy_ptr_1;
0061f9bc                      entropy_bytes_processed_1 += 1;
0061f9c2                      arg1->entropy_bytes_left = entropy_bytes_left_1;
0061f9c5                      arg1->entropy_bytes_processed = entropy_bytes_processed_1;
0061f9c8                  } while (i == 0xff);
0061f9c8                  
0061f9cc                  if (i != 0)
0061f9cc                  {
0061f9e0                      edx_5 = arg2;
0061f9e4                      arg1->unread_marker = i;
0061f9e7                      bitbuf_bits_valid_1 = arg1->bitbuf_bits_valid;
0061f9cc                  }
0061f9cc                  else
0061f9cc                  {
0061f9ce                      bitbuf_bits_valid = 0xff;
0061f980                  label_61f980:
0061f980                      int32_t edx_1 = arg1->bit_buffer_64;
0061f98e                      arg1->bit_buffer_64 = ((edx_1 << 8) | bitbuf_bits_valid);
0061f993                      bitbuf_bits_valid_2 = (arg1->bitbuf_bits_valid + 8);
0061f996                      *(uint32_t*)((char*)arg1->bit_buffer_64)[4] = ((*(uint32_t*)((char*)arg1->bit_buffer_64)[4] << 8) | (edx_1 >> 0xffffffe8));
0061f99c                      arg1->bitbuf_bits_valid = bitbuf_bits_valid_2;
0061f99c                      
0061f99f                      if (bitbuf_bits_valid_2 >= 0x19)
0061f99f                          break;
0061f99f                      
0061f99f                      continue;
0061f9cc                  }
0061f951              }
0061f951              
0061f9ec              if (bitbuf_bits_valid_1 >= edx_5)
0061f9ec                  break;
0061f9ec              
0061f9f9              return 0x64;
0061f94c          }
0061f944      }
0061f944      
0061f9a9      return 0;
0061f930  }

0061f9aa                                8d b6 00 00 00 00                                                            ......
0061f9d5                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
0061fa18                                                                          90 8d b4 26 00 00 00 00                          ...&....
0061fa3b                                                                                   90 8d 74 26 00                             ..t&.
0061fa69                             8d b4 26 00 00 00 00                                                           ..&....

0061fa70  enum _IJLERR sub_61fa70(struct _STATE* arg1, int32_t arg2, int32_t* arg3, int32_t arg4)

0061fa70  {
0061fa83      int32_t ebp = arg4;
0061fa83      
0061fa8a      if (ebp > arg1->bitbuf_bits_valid)
0061fa8a      {
0061fb42          enum _IJLERR eax_7 = Fill_Bit_Buffer(arg1, ebp);
0061fb42          
0061fb49          if (eax_7 != IJL_OK)
0061fb56              return eax_7;
0061fa8a      }
0061fa8a      
0061fa9c      int32_t ebx_1 = GET_BITS(arg1, ebp);
0061fa9c      
0061faa4      while (true)
0061faa4      {
0061faa4          int32_t edx_2 = ((int32_t)*(uint16_t*)((arg2 + (ebp << 1)) + 0x62a));
0061faa4          
0061fab7          if (((edx_2 & 0x8000) != 0 && edx_2 != 0xffffffff))
0061fab9              edx_2 = ((uint32_t)edx_2);
0061fab9          
0061fabe          if (ebx_1 <= edx_2)
0061fabe              break;
0061fabe          
0061fac7          if (arg1->bitbuf_bits_valid <= 0)
0061fac7          {
0061faeb              enum _IJLERR eax_3 = Fill_Bit_Buffer(arg1, 1);
0061faeb              
0061faf2              if (eax_3 != IJL_OK)
0061fafb                  return eax_3;
0061fac7          }
0061fac7          
0061fad9          ebx_1 = ((ebx_1 * 2) | GET_BITS(arg1, 1));
0061fadb          ebp += 1;
0061faa4      }
0061faa4      
0061fb09      if (ebp <= 0x10)
0061fb2f          *(uint32_t*)arg3 = ((uint32_t)*(uint16_t*)((arg2 + (((((uint32_t)*(uint16_t*)((arg2 + (ebp << 1)) + 0x64e)) - ((uint32_t)*(uint16_t*)((arg2 + (ebp << 1)) + 0x608))) + ebx_1) << 1)) + 0x408));
0061fb09      else
0061fb0b          *(uint32_t*)arg3 = 0;
0061fb0b      
0061fb3a      return 0;
0061fa70  }

0061fade                                                                                            8b f6                                ..
0061fb57                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0061fb60  enum _IJLERR sub_61fb60(struct _STATE* arg1, uint32_t* arg2, int32_t arg3)

0061fb60  {
0061fb78      int32_t eax_3;
0061fb78      
0061fb78      if (arg1->bitbuf_bits_valid < 8)
0061fb78      {
0061fbdc          enum _IJLERR eax_6 = Fill_Bit_Buffer(arg1, 0);
0061fbdc          
0061fbe3          if (eax_6 != IJL_OK)
0061fbfa              return eax_6;
0061fbfa          
0061fbeb          if (arg1->bitbuf_bits_valid >= 8)
0061fbeb              goto label_61fb85;
0061fbeb          
0061fbed          eax_3 = 1;
0061fbb8      label_61fbb8:
0061fbb8          enum _IJLERR eax_4 = sub_61fa70(arg1, arg3, arg2, eax_3);
0061fbb8          
0061fbbf          if (eax_4 != IJL_OK)
0061fbc7              return eax_4;
0061fb78      }
0061fb78      else
0061fb78      {
0061fb85      label_61fb85:
0061fb85          int32_t eax_1 = PEEK_BITS(arg1, 8);
0061fb8a          uint32_t edx_1 = ((uint32_t)*(uint16_t*)((arg3 + (eax_1 << 2)) + 0xa));
0061fb8a          
0061fb91          if (edx_1 == 0)
0061fb91          {
0061fba4              eax_3 = 9;
0061fba4              goto label_61fbb8;
0061fb91          }
0061fb91          
0061fb98          arg1->bitbuf_bits_valid -= edx_1;
0061fba0          *(uint32_t*)arg2 = ((uint32_t)*(uint16_t*)((arg3 + (eax_1 << 2)) + 8));
0061fb78      }
0061fbd0      return 0;
0061fb60  }

0061fbfb                                                                                   90 8d 74 26 00                             ..t&.

0061fc00  enum _IJLERR _DecodeHuffman8x8_PX(struct _STATE* arg1, int32_t arg2, int32_t arg3, int16_t* arg4, int16_t* arg5)

0061fc00  {
0061fc1e      __g_memzero(arg5, 0x80);
0061fc24      void* ebp = &data_906ee4;
0061fc38      int32_t var_14;
0061fc38      enum _IJLERR eax = sub_61fb60(arg1, &var_14, arg2);
0061fc38      
0061fc3f      if (eax != IJL_OK)
0061fc3f      {
0061fc41          if (eax < IJL_OK)
0061fdbf              return eax;
0061fdbf          
0061fc50          return 0;
0061fc3f      }
0061fc3f      
0061fc51      int32_t eax_2 = var_14;
0061fc57      int16_t eax_6;
0061fc57      
0061fc57      if (eax_2 == 0)
0061fca3          eax_6 = *(uint16_t*)arg4;
0061fc57      else
0061fc57      {
0061fc59          int32_t eax_3 = (eax_2 & 0xf);
0061fc5c          bool cond:1_1 = eax_3 > arg1->bitbuf_bits_valid;
0061fc5f          var_14 = eax_3;
0061fc5f          
0061fc63          if (cond:1_1)
0061fc63          {
0061fd68              enum _IJLERR eax_15 = Fill_Bit_Buffer(arg1, eax_3);
0061fd68              
0061fd6f              if (eax_15 != IJL_OK)
0061fd6f              {
0061fd71                  if (eax_15 < IJL_OK)
0061fdc7                      return eax_15;
0061fdc7                  
0061fd7c                  return 0;
0061fd6f              }
0061fd6f              
0061fd7d              eax_3 = var_14;
0061fc63          }
0061fc63          
0061fc70          int32_t eax_4 = GET_BITS(arg1, eax_3);
0061fc75          int32_t ebx_1 = var_14;
0061fc75          
0061fc85          if (((1 << (ebx_1 - 1)) & eax_4) == 0)
0061fc87              eax_4 += *(uint32_t*)((ebx_1 << 2) + &data_9070c0);
0061fc87          
0061fc97          eax_6 = (eax_4 + *(uint16_t*)arg4);
0061fc9a          *(uint16_t*)arg4 = eax_6;
0061fc57      }
0061fc57      
0061fca6      *(uint16_t*)arg5 = eax_6;
0061fca9      int32_t ebx_2 = 0x3f;
0061fcc3      enum _IJLERR eax_9;
0061fcc3      
0061fcc3      while (true)
0061fcc3      {
0061fcc3          eax_9 = sub_61fb60(arg1, &var_14, arg3);
0061fcc3          
0061fcca          if (eax_9 != IJL_OK)
0061fcca              break;
0061fcca          
0061fcd0          int32_t eax_10 = var_14;
0061fcd9          int32_t edx_5 = ((eax_10 >> 4) & 0xf);
0061fcdc          int32_t eax_11 = (eax_10 & 0xf);
0061fcdc          
0061fcdf          if (eax_11 == 0)
0061fcdf          {
0061fd43              if (edx_5 == 0xf)
0061fd43              {
0061fd45                  var_14 = eax_11;
0061fd49                  ebx_2 -= 0x10;
0061fd4c                  ebp += 0x40;
0061fd4f              label_61fd4f:
0061fd4f                  
0061fd51                  if (ebx_2 > 0)
0061fd51                      continue;
0061fd43              }
0061fd43              
0061fd60              return 0;
0061fcdf          }
0061fcdf          
0061fce1          var_14 = eax_11;
0061fce7          ebx_2 = ((ebx_2 - edx_5) - 1);
0061fce8          int32_t* edi_1 = ((char*)ebp + (edx_5 << 2));
0061fce8          
0061fcef          if (eax_11 > arg1->bitbuf_bits_valid)
0061fcef          {
0061fd8d              enum _IJLERR eax_17 = Fill_Bit_Buffer(arg1, eax_11);
0061fd8d              
0061fd94              if (eax_17 != IJL_OK)
0061fd94              {
0061fda0                  if (eax_17 < IJL_OK)
0061fdcf                      return eax_17;
0061fdcf                  
0061fdab                  return 0;
0061fd94              }
0061fd94              
0061fd96              eax_11 = var_14;
0061fcef          }
0061fcef          
0061fcfc          int32_t eax_12 = GET_BITS(arg1, eax_11);
0061fd01          int32_t ebp_1 = var_14;
0061fd01          
0061fd11          if (((1 << (ebp_1 - 1)) & eax_12) != 0)
0061fd11          {
0061fd30              ebp = &edi_1[1];
0061fd39              arg5[*(uint32_t*)edi_1] = eax_12;
0061fd11          }
0061fd11          else
0061fd11          {
0061fd1c              ebp = &edi_1[1];
0061fd25              arg5[*(uint32_t*)edi_1] = (((int16_t)*(uint32_t*)((ebp_1 << 2) + &data_9070c0)) + eax_12);
0061fd11          }
0061fd11          
0061fd11          goto label_61fd4f;
0061fcc3      }
0061fcc3      
0061fdac      if (eax_9 < IJL_OK)
0061fdd7          return eax_9;
0061fdd7      
0061fdb7      return 0;
0061fc00  }

0061fd2b                                   90 8d 74 26 00                                                             ..t&.
0061fd3f                                                                                               90                                 .
0061fd9f                                                                                               90                                 .
0061fdd8                                                                          90 8d b4 26 00 00 00 00                          ...&....

0061fde0  int32_t _DecodeHuffman8x8_M5(int64_t* arg1, int32_t arg2, int32_t arg3, int16_t* arg4, int16_t* arg5)

0061fde0  {
0061fe0c      _own_decodehuffman8x8_m5(arg1, arg2, arg3, arg4, arg5);
0061fe16      return 0;
0061fde0  }

0061fe17                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0061fe20  int32_t _DecodeHuffman8x8_M6(int64_t* arg1, int32_t arg2, int32_t arg3, int16_t* arg4, uint32_t* arg5)

0061fe20  {
0061fe4c      _own_decodehuffman8x8_m6(arg1, arg2, arg3, arg4, arg5);
0061fe56      return 0;
0061fe20  }

0061fe57                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0061fe60  enum _IJLERR Decode_Block_Skip_M5(struct _STATE* arg1, struct _HUFFMAN_TABLE* arg2, struct _HUFFMAN_TABLE* arg3, int16_t* arg4, int16_t* arg5)

0061fe60  {
0061fe83      int32_t var_c = 0;
0061fe8b      _own_decode_block_skip_m5(arg1, arg2, arg3, arg4);
0061fe94      return 0;
0061fe60  }

0061fe95                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

0061fea0  enum _IJLERR Decode_Block_Thumb_PX(struct _STATE* arg1, struct _HUFFMAN_TABLE* arg2, struct _HUFFMAN_TABLE* arg3, int16_t* arg4, int16_t* arg5)

0061fea0  {
0061fec6      int32_t var_14;
0061fec6      enum _IJLERR eax = sub_61fb60(arg1, &var_14, arg2);
0061fec6      
0061fecd      if (eax != IJL_OK)
0061fecd      {
0061fecf          if (eax < IJL_OK)
0062000f              return eax;
0062000f          
0061fede          return 0;
0061fecd      }
0061fecd      
0061fedf      int32_t eax_2 = var_14;
0061fee5      int16_t eax_6;
0061fee5      
0061fee5      if (eax_2 == 0)
0061ff31          eax_6 = *(uint16_t*)arg4;
0061fee5      else
0061fee5      {
0061fee7          int32_t eax_3 = (eax_2 & 0xf);
0061feea          bool cond:1_1 = eax_3 > arg1->bitbuf_bits_valid;
0061feed          var_14 = eax_3;
0061feed          
0061fef1          if (cond:1_1)
0061fef1          {
0061ffb1              enum _IJLERR eax_12 = Fill_Bit_Buffer(arg1, eax_3);
0061ffb1              
0061ffb8              if (eax_12 != IJL_OK)
0061ffb8              {
0061ffba                  if (eax_12 < IJL_OK)
00620017                      return eax_12;
00620017                  
0061ffc5                  return 0;
0061ffb8              }
0061ffb8              
0061ffc6              eax_3 = var_14;
0061fef1          }
0061fef1          
0061fefe          int32_t eax_4 = GET_BITS(arg1, eax_3);
0061ff03          int32_t edi_1 = var_14;
0061ff03          
0061ff13          if (((1 << (edi_1 - 1)) & eax_4) == 0)
0061ff15              eax_4 += *(uint32_t*)((edi_1 << 2) + &data_9070c0);
0061ff15          
0061ff25          eax_6 = (eax_4 + *(uint16_t*)arg4);
0061ff28          *(uint16_t*)arg4 = eax_6;
0061fee5      }
0061fee5      
0061ff34      *(uint16_t*)arg5 = eax_6;
0061ff3c      int32_t esi_1 = 0x3f;
0061ff4f      enum _IJLERR eax_8;
0061ff4f      
0061ff4f      while (true)
0061ff4f      {
0061ff4f          eax_8 = sub_61fb60(arg1, &var_14, arg3);
0061ff4f          
0061ff56          if (eax_8 != IJL_OK)
0061ff56              break;
0061ff56          
0061ff5c          int32_t eax_9 = var_14;
0061ff65          int32_t edx_5 = ((eax_9 >> 4) & 0xf);
0061ff68          int32_t eax_10 = (eax_9 & 0xf);
0061ff68          
0061ff6b          if (eax_10 == 0)
0061ff6b          {
0061ff93              if (edx_5 == 0xf)
0061ff93              {
0061ff95                  var_14 = eax_10;
0061ff99                  esi_1 -= 0x10;
0061ff9c              label_61ff9c:
0061ff9c                  
0061ff9e                  if (esi_1 > 0)
0061ff9e                      continue;
0061ff93              }
0061ff93              
0061ffa9              return 0;
0061ff6b          }
0061ff6b          
0061ff6d          var_14 = eax_10;
0061ff73          esi_1 = ((esi_1 - edx_5) - 1);
0061ff73          
0061ff77          if (eax_10 > arg1->bitbuf_bits_valid)
0061ff77          {
0061ffd6              enum _IJLERR eax_14 = Fill_Bit_Buffer(arg1, eax_10);
0061ffd6              
0061ffdd              if (eax_14 != IJL_OK)
0061ffdd              {
0061fff0                  if (eax_14 < IJL_OK)
0062001f                      return eax_14;
0062001f                  
0061fffb                  return 0;
0061ffdd              }
0061ffdd              
0061ffdf              eax_10 = var_14;
0061ff77          }
0061ff77          
0061ff80          GET_BITS(arg1, eax_10);
0061ff85          goto label_61ff9c;
0061ff4f      }
0061ff4f      
0061fffc      if (eax_8 < IJL_OK)
00620027          return eax_8;
00620027      
00620007      return 0;
0061fea0  }

0061ff87                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0061ffe5                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
00620028                          90 8d b4 26 00 00 00 00                                                          ...&....

00620030  enum _IJLERR Decode_Block_Prog_DC(struct _STATE* arg1, struct _HUFFMAN_TABLE* arg2, int16_t* arg3, int16_t* arg4, int32_t arg5)

00620030  {
0062004b      int32_t var_14 = 0;
00620062      enum _IJLERR eax = sub_61fb60(arg1, &var_14, arg2);
00620062      
00620069      if (eax != IJL_OK)
00620069      {
006200ee          if (eax < IJL_OK)
00620109              return eax;
00620109          
006200f9          return 0;
00620069      }
00620069      
0062006f      int32_t eax_1 = var_14;
00620075      int32_t eax_4;
00620075      
00620075      if (eax_1 == 0)
006200e8          eax_4 = ((int32_t)*(uint16_t*)arg4);
00620075      else
00620075      {
00620077          int32_t eax_2 = (eax_1 & 0xf);
0062007a          bool cond:1_1 = eax_2 > arg1->bitbuf_bits_valid;
0062007d          var_14 = eax_2;
0062007d          
00620081          if (cond:1_1)
00620081          {
006200cd              enum _IJLERR eax_7 = Fill_Bit_Buffer(arg1, eax_2);
006200cd              
006200d4              if (eax_7 != IJL_OK)
006200d4              {
006200d6                  if (eax_7 < IJL_OK)
00620101                      return eax_7;
00620101                  
006200e1                  return 0;
006200d4              }
006200d4              
006200e2              eax_2 = var_14;
00620081          }
00620081          
0062008a          int32_t eax_3 = GET_BITS(arg1, eax_2);
0062008f          int32_t edi_1 = var_14;
0062008f          
0062009f          if (((1 << (edi_1 - 1)) & eax_3) == 0)
006200a1              eax_3 += *(uint32_t*)((edi_1 << 2) + &data_9070c0);
006200a1          
006200ae          eax_4 = ((int32_t)(*(uint16_t*)arg4 + eax_3));
006200b1          *(uint16_t*)arg4 = eax_4;
00620075      }
00620075      
006200b9      *(uint16_t*)arg3 = ((int16_t)(eax_4 << arg5));
006200c5      return 0;
00620030  }

0062010a                                8d b6 00 00 00 00                                                            ......

00620110  enum _IJLERR Decode_Block_Prog_DC_SA(struct _STATE* arg1, int16_t* arg2, int32_t arg3)

00620110  {
0062012e      if (arg1->bitbuf_bits_valid <= 0)
0062012e      {
0062015c          enum _IJLERR result = Fill_Bit_Buffer(arg1, 1);
0062015c          
00620163          if (result != IJL_OK)
00620163          {
00620165              if (result < IJL_OK)
00620176                  return result;
00620176              
0062016f              return 0;
00620163          }
0062012e      }
0062012e      
00620142      if (GET_BITS(arg1, 1) != 0)
00620144          *(uint16_t*)arg2 |= ((int16_t)(1 << arg3));
00620144      
00620150      return 0;
00620110  }

00620177                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00620180  enum _IJLERR Decode_Block_Prog_AC(struct _STATE* arg1, int16_t* arg2, struct _HUFFMAN_TABLE* arg3, int32_t arg4, int32_t arg5, int32_t arg6)

00620180  {
00620193      int32_t i = arg4;
0062019f      int32_t Prog_EndOfBlock_Run = arg1->Prog_EndOfBlock_Run;
006201a4      int32_t ebx;
006201a4      
006201a4      if (Prog_EndOfBlock_Run > 0)
006201a7          arg1->Prog_EndOfBlock_Run = (Prog_EndOfBlock_Run - 1);
006201a4      else
006201a4      {
006201b6          for (; i <= arg5; i = (ebx + 1))
006201b6          {
006201cf              uint32_t var_14;
006201cf              enum _IJLERR eax_2 = sub_61fb60(arg1, &var_14, arg3);
006201cf              
006201d6              if (eax_2 != IJL_OK)
006201d6              {
006202cf                  if (eax_2 < IJL_OK)
0062031b                      return eax_2;
0062031b                  
006202da                  return 0;
006201d6              }
006201d6              
006201dc              uint32_t edx_1 = var_14;
006201e2              int32_t edi_2 = (edx_1 >> 4);
006201e5              uint32_t edx_2 = (edx_1 & 0xf);
006201e5              
006201e8              if (edx_2 == 0)
006201e8              {
00620263                  if (edi_2 != 0xf)
00620263                  {
00620287                      int32_t eax_7 = (1 << edi_2);
00620287                      
0062028b                      if (edi_2 != 0)
0062028b                      {
0062028d                          arg1->Prog_EndOfBlock_Run = eax_7;
00620290                          bool cond:1_1 = edi_2 > arg1->bitbuf_bits_valid;
00620293                          var_14 = edx_2;
00620293                          
00620297                          if (cond:1_1)
00620297                          {
006202ba                              enum _IJLERR eax_10 = Fill_Bit_Buffer(arg1, edi_2);
006202ba                              
006202c1                              if (eax_10 != IJL_OK)
006202c1                              {
006202c3                                  if (eax_10 < IJL_OK)
00620313                                      return eax_10;
00620313                                  
006202ce                                  return 0;
006202c1                              }
00620297                          }
00620297                          
006202a8                          eax_7 = (GET_BITS(arg1, edi_2) + arg1->Prog_EndOfBlock_Run);
0062028b                      }
0062028b                      
006202ab                      arg1->Prog_EndOfBlock_Run = (eax_7 - 1);
006202ae                      break;
00620263                  }
00620263                  
00620265                  var_14 = edx_2;
00620269                  ebx = (i + 0xf);
006201e8              }
006201e8              else
006201e8              {
006201ee                  var_14 = edx_2;
006201f2                  ebx = (i + edi_2);
006201f2                  
006201f7                  if (edx_2 > arg1->bitbuf_bits_valid)
006201f7                  {
006202e2                      enum _IJLERR eax_13 = Fill_Bit_Buffer(arg1, edx_2);
006202e2                      
006202e9                      if (eax_13 != IJL_OK)
006202e9                      {
00620300                          if (eax_13 < IJL_OK)
00620323                              return eax_13;
00620323                          
0062030b                          return 0;
006202e9                      }
006202e9                      
006202eb                      edx_2 = var_14;
006201f7                  }
006201f7                  
00620204                  int32_t eax_3 = GET_BITS(arg1, edx_2);
00620209                  uint32_t edi_3 = var_14;
00620209                  
00620219                  if (((1 << (edi_3 - 1)) & eax_3) != 0)
00620251                      arg2[*(uint32_t*)((ebx << 2) + &data_906ee0)] = ((int16_t)(eax_3 << arg6));
00620219                  else
00620235                      arg2[*(uint32_t*)((ebx << 2) + &data_906ee0)] = ((int16_t)((*(uint32_t*)((edi_3 << 2) + &data_9070c0) + eax_3) << arg6));
006201e8              }
006201b6          }
006201a4      }
006201b3      return 0;
00620180  }

0062023b                                                                                   90 8d 74 26 00                             ..t&.
00620257                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0062027e                                                                                            8b f6                                ..
006202f4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00620324              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

00620330  enum _IJLERR Decode_Block_Prog_AC_SA(struct _STATE* arg1, int16_t* arg2, struct _HUFFMAN_TABLE* arg3, int32_t arg4, int32_t arg5, int32_t arg6)

00620330  {
00620337      struct _STATE* edi = arg1;
0062033b      int32_t esi = arg4;
0062033f      int32_t ebx = arg5;
00620343      char ecx = arg6;
0062034c      int32_t eax = (1 << ecx);
00620357      int32_t Prog_EndOfBlock_Run = edi->Prog_EndOfBlock_Run;
0062035a      int32_t edx = (0xffffffff << ecx);
0062035a      
0062036a      if ((Prog_EndOfBlock_Run == 0 && esi <= ebx))
0062036a      {
00620387          while (true)
00620387          {
00620387              int32_t var_1c;
00620387              enum _IJLERR eax_2 = sub_61fb60(edi, &var_1c, arg3);
00620387              
0062038e              if (eax_2 != IJL_OK)
0062038e              {
006205d0                  if (eax_2 < IJL_OK)
0062061b                      return eax_2;
0062061b                  
006205db                  return 0;
0062038e              }
0062038e              
00620394              int32_t eax_3 = var_1c;
0062039a              int32_t ebp_2 = (eax_3 >> 4);
0062039d              int32_t eax_4 = (eax_3 & 0xf);
006203a0              var_1c = eax_4;
006203a0              
006203a4              if (eax_4 != 0)
006203a4              {
006203ab                  if (edi->bitbuf_bits_valid <= 0)
006203ab                  {
00620542                      enum _IJLERR eax_26 = Fill_Bit_Buffer(edi, 1);
00620542                      
00620549                      if (eax_26 != IJL_OK)
00620549                      {
0062054f                          if (eax_26 < IJL_OK)
00620623                              return eax_26;
00620623                          
0062055e                          return 0;
00620549                      }
006203ab                  }
006203ab                  
006203c3                  if (GET_BITS(edi, 1) == 0)
006203d4                      var_1c = edx;
006203c3                  else
006203c9                      var_1c = eax;
006203a4              }
006203a4              else if (ebp_2 != 0xf)
006203e3              {
006203e5                  ebx = arg5;
006203f0                  Prog_EndOfBlock_Run = (1 << ebp_2);
006203f2                  edi->Prog_EndOfBlock_Run = Prog_EndOfBlock_Run;
006203f2                  
006203f7                  if (ebp_2 != 0)
006203f7                  {
00620400                      if (ebp_2 > edi->bitbuf_bits_valid)
00620400                      {
00620566                          enum _IJLERR eax_28 = Fill_Bit_Buffer(edi, ebp_2);
00620566                          
0062056d                          if (eax_28 != IJL_OK)
0062056d                          {
00620573                              if (eax_28 < IJL_OK)
0062063b                                  return eax_28;
0062063b                              
00620582                              return 0;
0062056d                          }
00620400                      }
00620400                      
00620415                      Prog_EndOfBlock_Run = (GET_BITS(edi, ebp_2) + edi->Prog_EndOfBlock_Run);
00620417                      edi->Prog_EndOfBlock_Run = Prog_EndOfBlock_Run;
006203f7                  }
006203f7                  
006203f7                  break;
006203e3              }
006203e3              
00620420              while (true)
00620420              {
00620420                  int32_t edi_1 = *(uint32_t*)((esi << 2) + &data_906ee0);
00620420                  
0062042d                  if (((uint32_t)arg2[edi_1]) == 0)
0062042d                  {
00620480                      ebp_2 -= 1;
00620480                      
00620483                      if (ebp_2 < 0)
00620483                      {
006205bc                          edi = arg1;
006205c0                          break;
00620483                      }
0062042d                  }
0062042d                  else
0062042d                  {
00620438                      if (arg1->bitbuf_bits_valid <= 0)
00620438                      {
0062059f                          enum _IJLERR eax_31 = Fill_Bit_Buffer(arg1, 1);
0062059f                          
006205a6                          if (eax_31 != IJL_OK)
006205a6                          {
006205ac                              if (eax_31 < IJL_OK)
0062062b                                  return eax_31;
0062062b                              
006205bb                              return 0;
006205a6                          }
00620438                      }
00620438                      
00620454                      if (GET_BITS(arg1, 1) != 0)
00620454                      {
00620456                          int32_t edx_3 = ((int32_t)arg2[edi_1]);
00620456                          
00620460                          if ((edx_3 & eax) == 0)
00620460                          {
00620464                              if (edx_3 < 0)
00620587                                  arg2[edi_1] = (edx_3 + edx);
00620464                              else
0062046e                                  arg2[edi_1] = (edx_3 + eax);
00620460                          }
00620454                      }
0062042d                  }
0062042d                  
00620489                  esi += 1;
00620489                  
00620490                  if (esi > arg5)
00620490                  {
00620492                      edi = arg1;
00620492                      break;
00620490                  }
00620420              }
00620420              
00620496              int32_t edx_5 = var_1c;
00620496              
0062049c              if (edx_5 != 0)
006204a5                  arg2[*(uint32_t*)((esi << 2) + &data_906ee0)] = edx_5;
006204a5              
006204a9              esi += 1;
006204a9              
006204b0              if (esi > arg5)
006204b0              {
006204b6                  ebx = arg5;
006204ba                  Prog_EndOfBlock_Run = edi->Prog_EndOfBlock_Run;
006204ba                  break;
006204b0              }
00620387          }
0062036a      }
0062036a      
006204bf      if (Prog_EndOfBlock_Run > 0)
006204bf      {
006204c3          if (esi <= ebx)
006204c3          {
006204c9              int32_t esi_1 = esi;
006204c9              
00620524              do
00620524              {
006204d0                  int32_t ebx_2 = *(uint32_t*)((esi_1 << 2) + &data_906ee0);
006204d0                  
006204de                  if (((uint32_t)arg2[ebx_2]) != 0)
006204de                  {
006204e5                      if (edi->bitbuf_bits_valid <= 0)
006204e5                      {
006205fb                          enum _IJLERR eax_35 = Fill_Bit_Buffer(edi, 1);
006205fb                          
00620602                          if (eax_35 != IJL_OK)
00620602                          {
00620608                              if (eax_35 < IJL_OK)
00620633                                  return eax_35;
00620633                              
00620613                              return 0;
00620602                          }
006204e5                      }
006204e5                      
006204fd                      if (GET_BITS(edi, 1) != 0)
006204fd                      {
006204ff                          int32_t eax_21 = ((int32_t)arg2[ebx_2]);
006204ff                          
0062050a                          if ((eax_21 & eax) == 0)
0062050a                          {
0062050e                              if (eax_21 < 0)
006205e0                                  arg2[ebx_2] = (eax_21 + edx);
0062050e                              else
00620518                                  arg2[ebx_2] = (eax_21 + eax);
0062050a                          }
006204fd                      }
006204de                  }
006204de                  
0062051d                  esi_1 += 1;
00620524              } while (esi_1 <= arg5);
00620524              
00620526              Prog_EndOfBlock_Run = edi->Prog_EndOfBlock_Run;
006204c3          }
006204c3          
0062052a          edi->Prog_EndOfBlock_Run = (Prog_EndOfBlock_Run - 1);
006204bf      }
006204bf      
00620536      return 0;
00620330  }

006203cf                                               90                                                                 .
006203da                                                                                8d b6 00 00 00 00                            ......
0062041f                                                                                               90                                 .
00620474                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
006205c5                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
006205ea                                8d b6 00 00 00 00                                                            ......
0062063c                                                                                      8d 74 26 00                              .t&.

00620640  int32_t _FillDecoderQuantTable_IPP(int32_t arg1)

00620640  {
00620695      void var_84;
00620695      
00620695      for (int32_t i = 0; i < 0x40; i += 4)
00620695      {
0062065b          *(uint16_t*)(&var_84 + (*(uint32_t*)((i << 2) + &data_906ee0) << 1)) = *(uint16_t*)(arg1 + (i << 1));
0062066b          *(uint16_t*)(&var_84 + (*(uint32_t*)((i << 2) + &data_906ee4) << 1)) = *(uint16_t*)((arg1 + (i << 1)) + 2);
0062067b          *(uint16_t*)(&var_84 + (*(uint32_t*)((i << 2) + &data_906ee8) << 1)) = *(uint16_t*)((arg1 + (i << 1)) + 4);
0062068b          *(uint16_t*)(&var_84 + (*(uint32_t*)((i << 2) + &data_906eec) << 1)) = *(uint16_t*)((arg1 + (i << 1)) + 6);
00620695      }
00620695      
006206cc      int32_t i_1;
006206cc      
006206cc      for (i_1 = 0; i_1 < 0x40; i_1 += 4)
006206cc      {
006206a4          *(uint16_t*)(arg1 + (i_1 << 1)) = *(uint16_t*)(&var_84 + (i_1 << 1));
006206ad          void var_82;
006206ad          *(uint16_t*)((arg1 + (i_1 << 1)) + 2) = *(uint16_t*)(&var_82 + (i_1 << 1));
006206b7          void var_80;
006206b7          *(uint16_t*)((arg1 + (i_1 << 1)) + 4) = *(uint16_t*)(&var_80 + (i_1 << 1));
006206c1          void var_7e;
006206c1          *(uint16_t*)((arg1 + (i_1 << 1)) + 6) = *(uint16_t*)(&var_7e + (i_1 << 1));
006206cc      }
006206cc      
006206d0      __builtin_memset((arg1 + 0x80), 0, 0x20);
00620747      return i_1;
00620640  }

00620748                          90 8d b4 26 00 00 00 00                                                          ...&....

00620750  int32_t _iQnt8x8_IPP_PX(int32_t arg1, int32_t arg2)

00620750  {
00620750      int32_t esi;
00620750      int32_t var_4 = esi;
00620752      int32_t var_c = esi;
006207ab      int32_t i;
006207ab      
006207ab      for (i = 0; i < 0x40; i += 4)
006207ab      {
0062076b          *(uint16_t*)(arg1 + (i << 1)) *= *(uint16_t*)(arg2 + (i << 1));
0062077c          int16_t ebx_3 = *(uint16_t*)((arg1 + (i << 1)) + 4);
00620781          *(uint16_t*)((arg1 + (i << 1)) + 2) *= *(uint16_t*)((arg2 + (i << 1)) + 2);
0062078e          *(uint16_t*)((arg1 + (i << 1)) + 4) = (*(uint16_t*)((arg2 + (i << 1)) + 4) * ebx_3);
006207a0          *(uint16_t*)((arg1 + (i << 1)) + 6) *= *(uint16_t*)((arg2 + (i << 1)) + 6);
006207ab      }
006207ab      
006207b2      return i;
00620750  }

006207b3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

006207c0  int64_t* _iQnt8x8_IPP_M5(int64_t* arg1, int64_t* arg2)

006207c0  {
006207d2      _own_iqnt8x8_ipp_m5(arg1, arg2);
006207da      return arg1;
006207c0  }

006207db                                                                                   90 8d 74 26 00                             ..t&.

006207e0  int128_t* _iQnt8x8_IPP_W7(int128_t* arg1, int128_t* arg2)

006207e0  {
006207f2      _own_iqnt8x8_ipp_w7(arg1, arg2);
006207fa      return arg1;
006207e0  }

006207fb                                                                                   90 8d 74 26 00                             ..t&.

00620800  int16_t* _iDCT8x8_IPP_PX(int16_t* arg1)

00620800  {
00620818      int16_t* ebx = arg1;
0062081a      void var_140;
0062081a      void* ecx = &var_140;
0062081e      int32_t var_20 = 0;
00620825      void* var_18 = &var_140;
006209b2      bool cond:0_1;
006209b2      
006209b2      do
006209b2      {
0062083a          int32_t ebp_1 = ((int32_t)ebx[7]);
0062084b          int32_t ecx_1 = ((int32_t)ebx[1]);
00620855          int32_t eax_2 = ((ecx_1 * 0x7d8a) + (ebp_1 * 0x18f9));
00620863          int32_t ecx_3 = ((ecx_1 * 0x18f9) + (ebp_1 * 0xffff8276));
00620865          int32_t edi_1 = ((int32_t)ebx[5]);
00620869          int32_t edx_3 = ((int32_t)ebx[3]);
00620879          int32_t ebp_3 = ((edi_1 * 0x471d) + (edx_3 * 0x6a6e));
00620887          int32_t esi_3 = ((edi_1 * 0x6a6e) + (edx_3 * 0xffffb8e3));
0062088b          int32_t edi_3 = (eax_2 - ebp_3);
0062088f          int32_t edx_6 = (ecx_3 - esi_3);
0062089b          int32_t eax_5 = ((((eax_2 + ebp_3) + 0x800) >> 0xc) * 0x16a1);
006208ab          int32_t ecx_6 = ((((ecx_3 + esi_3) + 0x800) >> 0xc) * 0x16a1);
006208b1          int32_t esi_4 = ((int32_t)ebx[6]);
006208bc          int32_t ecx_7 = (edi_3 + edx_6);
006208bf          int32_t edi_4 = (edi_3 - edx_6);
006208c8          int32_t edx_7 = ((int32_t)*(uint16_t*)ebx);
006208cb          int32_t ecx_8 = ((int32_t)ebx[4]);
006208d9          int32_t ebp_5 = ((edx_7 + ecx_8) << 0xf);
006208de          int32_t edx_9 = ((edx_7 - ecx_8) << 0xf);
006208e1          int32_t ecx_9 = ((int32_t)ebx[2]);
006208f1          int32_t ebx_2 = ((ecx_9 * 0xa73d) + (esi_4 * 0x4546));
006208ff          int32_t ecx_11 = ((ecx_9 * 0x4546) + (esi_4 * 0xffff58c3));
00620901          int32_t esi_6 = (ebp_5 + ebx_2);
00620905          int32_t ebp_6 = (ebp_5 - ebx_2);
00620907          int32_t ebx_3 = (edx_9 + ecx_11);
0062090a          int32_t edx_10 = (edx_9 - ecx_11);
00620925          *(uint32_t*)ecx = (((eax_5 + esi_6) + 0x800) >> 0xc);
0062092a          *(uint32_t*)((char*)ecx + 0x1c) = (((esi_6 - eax_5) + 0x800) >> 0xc);
00620946          *(uint32_t*)((char*)ecx + 4) = (((ecx_7 + ebx_3) + 0x800) >> 0xc);
0062094c          *(uint32_t*)((char*)ecx + 0x18) = (((ebx_3 - ecx_7) + 0x800) >> 0xc);
00620968          *(uint32_t*)((char*)ecx + 8) = (((edi_4 + edx_10) + 0x800) >> 0xc);
00620975          *(uint32_t*)((char*)ecx + 0x14) = (((edx_10 - edi_4) + 0x800) >> 0xc);
00620991          *(uint32_t*)((char*)ecx + 0xc) = (((ecx_6 + ebp_6) + 0x800) >> 0xc);
00620997          ebx = &ebx[8];
0062099a          *(uint32_t*)((char*)ecx + 0x10) = (((ebp_6 - ecx_6) + 0x800) >> 0xc);
0062099d          ecx += 0x20;
006209a8          cond:0_1 = (var_20 + 1) < 8;
006209ab          var_20 += 1;
006209b2      } while (cond:0_1);
006209b8      void* edx_15 = var_18;
006209bf      int16_t* result = arg1;
006209c8      int32_t var_20_1 = 0;
00620c5c      bool cond:1_1;
00620c5c      
00620c5c      do
00620c5c      {
006209d7          int32_t ecx_13 = *(uint32_t*)((char*)edx_15 + 0x20);
006209da          int32_t ebx_9 = *(uint32_t*)((char*)edx_15 + 0xe0);
006209f3          int32_t eax_15 = ((ecx_13 * 0x7d8a) + (ebx_9 * 0x18f9));
00620a01          int32_t ecx_15 = ((ecx_13 * 0x18f9) + (ebx_9 * 0xffff8276));
00620a03          int32_t ebx_11 = *(uint32_t*)((char*)edx_15 + 0xa0);
00620a09          int32_t ebp_11 = *(uint32_t*)((char*)edx_15 + 0x60);
00620a18          int32_t edi_9 = ((ebx_11 * 0x471d) + (ebp_11 * 0x6a6e));
00620a26          int32_t ebx_13 = ((ebx_11 * 0x6a6e) + (ebp_11 * 0xffffb8e3));
00620a2a          int32_t ebp_14 = (eax_15 - edi_9);
00620a2e          int32_t esi_13 = (ecx_15 - ebx_13);
00620a3a          int32_t eax_18 = ((((eax_15 + edi_9) + 0x800) >> 0xc) * 0x16a1);
00620a51          int32_t ecx_18 = ((((ecx_15 + ebx_13) + 0x800) >> 0xc) * 0x16a1);
00620a5e          int32_t ecx_19 = (ebp_14 + esi_13);
00620a62          int32_t ebp_15 = (ebp_14 - esi_13);
00620a6b          int32_t ecx_20 = *(uint32_t*)((char*)edx_15 + 0x80);
00620a71          int32_t esi_14 = *(uint32_t*)((char*)edx_15 + 0x40);
00620a7b          int32_t ebp_16 = *(uint32_t*)edx_15;
00620a81          int32_t ebx_15 = ((ebp_16 + ecx_20) << 0xf);
00620a86          int32_t ebp_18 = ((ebp_16 - ecx_20) << 0xf);
00620a89          int32_t ecx_21 = *(uint32_t*)((char*)edx_15 + 0xc0);
00620a9b          int32_t edx_17 = ((esi_14 * 0xa73d) + (ecx_21 * 0x4546));
00620aa9          int32_t edi_12 = ((esi_14 * 0x4546) + (ecx_21 * 0xffff58c3));
00620aab          int32_t esi_15 = (ebx_15 + edx_17);
00620aae          int32_t ebx_16 = (ebx_15 - edx_17);
00620ab0          int32_t ecx_23 = (ebp_18 + edi_12);
00620ab4          int32_t ebp_19 = (ebp_18 - edi_12);
00620adc          int32_t edi_13;
00620adc          
00620adc          if (((((eax_18 + esi_15) + 0x100000) >> 0x15) + 0x80) < 0)
00620adc          {
00620ce0              edi_13 = 0;
00620ce2              int32_t var_30_4 = 0;
00620adc          }
00620adc          else
00620adc          {
00620ae2              edi_13 = ((((eax_18 + esi_15) + 0x100000) >> 0x15) + 0x80);
00620ae2              
00620aef              if (edi_13 > 0xff)
00620aef              {
00620af1                  edi_13 = 0xff;
00620af6                  int32_t var_30_3 = 0xff;
00620aef              }
00620adc          }
00620adc          
00620afd          *(uint16_t*)result = edi_13;
00620b10          int32_t esi_19 = ((((esi_15 - eax_18) + 0x100000) >> 0x15) + 0x80);
00620b10          
00620b18          if (esi_19 < 0)
00620cd0              esi_19 = 0;
00620b18          else if (esi_19 > 0xff)
00620b26              esi_19 = 0xff;
00620b26          
00620b2b          result[0x38] = esi_19;
00620b40          int32_t esi_23 = ((((ecx_19 + ecx_23) + 0x100000) >> 0x15) + 0x80);
00620b40          
00620b48          if (esi_23 < 0)
00620cc0              esi_23 = 0;
00620b48          else if (esi_23 > 0xff)
00620b56              esi_23 = 0xff;
00620b56          
00620b5b          result[8] = esi_23;
00620b6f          int32_t ecx_27 = ((((ecx_23 - ecx_19) + 0x100000) >> 0x15) + 0x80);
00620b6f          
00620b77          if (ecx_27 < 0)
00620cb0              ecx_27 = 0;
00620b77          else if (ecx_27 > 0xff)
00620b85              ecx_27 = 0xff;
00620b85          
00620b8a          result[0x30] = ecx_27;
00620b9f          int32_t ecx_31 = ((((ebp_15 + ebp_19) + 0x100000) >> 0x15) + 0x80);
00620b9f          
00620ba7          if (ecx_31 < 0)
00620ca0              ecx_31 = 0;
00620ba7          else if (ecx_31 > 0xff)
00620bb5              ecx_31 = 0xff;
00620bb5          
00620bba          result[0x10] = ecx_31;
00620bce          int32_t ebp_23 = ((((ebp_19 - ebp_15) + 0x100000) >> 0x15) + 0x80);
00620bce          
00620bd6          if (ebp_23 < 0)
00620c90              ebp_23 = 0;
00620bd6          else if (ebp_23 > 0xff)
00620be4              ebp_23 = 0xff;
00620be4          
00620be9          result[0x28] = ebp_23;
00620bfe          int32_t ecx_35 = ((((ecx_18 + ebx_16) + 0x100000) >> 0x15) + 0x80);
00620bfe          
00620c06          if (ecx_35 < 0)
00620c80              ecx_35 = 0;
00620c06          else if (ecx_35 > 0xff)
00620c10              ecx_35 = 0xff;
00620c10          
00620c15          result[0x18] = ecx_35;
00620c29          int32_t ebx_20 = ((((ebx_16 - ecx_18) + 0x100000) >> 0x15) + 0x80);
00620c29          
00620c31          if (ebx_20 < 0)
00620c6d              ebx_20 = 0;
00620c31          else if (ebx_20 > 0xff)
00620c3b              ebx_20 = 0xff;
00620c3b          
00620c40          result[0x20] = ebx_20;
00620c44          edx_15 += 4;
00620c47          result = &result[1];
00620c52          cond:1_1 = (var_20_1 + 1) < 8;
00620c55          var_20_1 += 1;
00620c5c      } while (cond:1_1);
00620c6c      return result;
00620800  }

00620c71                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00620c84              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
00620c97                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
00620ca7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
00620cb7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
00620cc7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
00620cd7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
00620cee                                            8b f6                                                                ..

00620cf0  int64_t* _iDCT8x8_IPP_M5(int64_t* arg1)

00620cf0  {
00620cfa      _own_dct_2d_16s_8x8_inv_m5(arg1);
00620d02      return arg1;
00620cf0  }

00620d03           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

00620d10  int64_t* _iDCT8x8_IPP_A6(int64_t* arg1)

00620d10  {
00620d1a      _own_dct_2d_16s_8x8_inv_a6(arg1);
00620d22      return arg1;
00620d10  }

00620d23           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

00620d30  int32_t _iDCT8x8_IPP_W7(int128_t* arg1)

00620d30  {
00620d42      return _own_dct_2d_16s_8x8_inv_w7(arg1);
00620d30  }

00620d43           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

00620d50  void* _iDCT4x4_IPP_PX(int16_t* arg1)

00620d50  {
00620d61      void* eax = arg1;
00620d63      void var_ac;
00620d63      void* ecx = &var_ac;
00620d6b      int32_t var_24 = 8;
00620d6b      
00620d82      while (true)
00620d82      {
00620d82          int32_t edx_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x10));
00620d8f          int32_t var_2c_1;
00620d8f          int32_t edx_2;
00620d8f          int32_t ebx_1;
00620d8f          int32_t ebp_1;
00620d8f          int32_t esi_1;
00620d8f          
00620d8f          if (edx_1 != 0)
00620d8f          {
00620e60              esi_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x20));
00620e64              edx_2 = ((int32_t)*(uint16_t*)((char*)eax + 0x60));
00620e6c              var_2c_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x70));
00620e73              ebp_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x50));
00620e77              ebx_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x30));
00620e85          label_620e85:
00620e85              int32_t ecx_2 = (((int32_t)*(uint16_t*)eax) << 0xe);
00620e9b              int32_t eax_2 = ((esi_1 * 0x3b21) + (edx_2 * 0xffffe782));
00620e9d              int32_t edx_7 = (ecx_2 + eax_2);
00620ea0              int32_t ecx_3 = (ecx_2 - eax_2);
00620ed3              int32_t eax_6 = ((((ebp_1 * 0x2e75) + (ebx_1 * 0xffffba79)) + (var_2c_1 * 0xfffff93e)) + (edx_1 * 0x21f9));
00620ef1              int32_t ebp_6 = ((((ebp_1 * 0xffffecc2) + (ebx_1 * 0x1ccd)) + (var_2c_1 * 0xffffefb0)) + (edx_1 * 0x5203));
00620f06              *(uint32_t*)ecx = (((ebp_6 + edx_7) + 0x800) >> 0xc);
00620f11              *(uint32_t*)((char*)ecx + 0x60) = (((edx_7 - ebp_6) + 0x800) >> 0xc);
00620f2d              *(uint32_t*)((char*)ecx + 0x20) = (((eax_6 + ecx_3) + 0x800) >> 0xc);
00620f3a              *(uint32_t*)((char*)ecx + 0x40) = (((ecx_3 - eax_6) + 0x800) >> 0xc);
00620f3d              eax += 2;
00620f40              ecx += 4;
00620d8f          }
00620d8f          else
00620d8f          {
00620d95              esi_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x20));
00620d95              
00620d9b              if (esi_1 != 0)
00620d9b              {
00620e40                  edx_2 = ((int32_t)*(uint16_t*)((char*)eax + 0x60));
00620e48                  ebp_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x50));
00620e4c                  var_2c_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x70));
00620e53                  ebx_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x30));
00620e57                  goto label_620e85;
00620d9b              }
00620d9b              
00620da1              ebx_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x30));
00620da1              
00620da7              if (ebx_1 != 0)
00620da7              {
00620e20                  edx_2 = ((int32_t)*(uint16_t*)((char*)eax + 0x60));
00620e28                  var_2c_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x70));
00620e2f                  ebp_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x50));
00620e33                  goto label_620e85;
00620da7              }
00620da7              
00620dad              ebp_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x50));
00620dad              
00620db3              if (ebp_1 != 0)
00620db3              {
00620e00                  edx_2 = ((int32_t)*(uint16_t*)((char*)eax + 0x60));
00620e08                  var_2c_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x70));
00620e0f                  goto label_620e85;
00620db3              }
00620db3              
00620db5              edx_2 = ((int32_t)*(uint16_t*)((char*)eax + 0x60));
00620db5              
00620dbb              if (edx_2 != 0)
00620dbb              {
00620df4                  var_2c_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x70));
00620dfb                  goto label_620e85;
00620dbb              }
00620dbb              
00620dbd              int32_t edi_1 = ((int32_t)*(uint16_t*)((char*)eax + 0x70));
00620dc3              var_2c_1 = edi_1;
00620dc3              
00620dca              if (edi_1 != 0)
00620dca                  goto label_620e85;
00620dca              
00620dd5              int32_t edx_5 = (((int32_t)*(uint16_t*)eax) * 4);
00620dd7              *(uint32_t*)ecx = edx_5;
00620dd9              eax += 2;
00620ddc              *(uint32_t*)((char*)ecx + 0x20) = edx_5;
00620ddf              *(uint32_t*)((char*)ecx + 0x40) = edx_5;
00620de2              *(uint32_t*)((char*)ecx + 0x60) = edx_5;
00620de5              ecx += 4;
00620d8f          }
00620f43          int32_t edx_13 = var_24;
00620f43          
00620f56          while (true)
00620f56          {
00620f56              edx_13 -= 1;
00620f56              
00620f59              if (edx_13 <= 0)
00620f59              {
00620f70                  int16_t* edx_14 = arg1;
00620f77                  void* result = &var_ac;
00620f77                  
006211ef                  for (int32_t i = 0; i < 4; )
006211ef                  {
00620f83                      int32_t ecx_11 = *(uint32_t*)((char*)result + 4);
00620f8d                      i += 1;
00620f96                      int32_t var_2c_2;
00620f96                      int32_t var_18_2;
00620f96                      int32_t ebx_10;
00620f96                      int32_t ebp_7;
00620f96                      int32_t esi_3;
00620f96                      
00620f96                      if (ecx_11 != 0)
00620f96                      {
00621090                          ebp_7 = *(uint32_t*)((char*)result + 8);
00621093                          esi_3 = *(uint32_t*)((char*)result + 0x18);
00621099                          var_2c_2 = *(uint32_t*)((char*)result + 0x1c);
006210a3                          var_18_2 = *(uint32_t*)((char*)result + 0x14);
006210aa                          ebx_10 = *(uint32_t*)((char*)result + 0xc);
006210af                      label_6210af:
006210af                          int32_t ecx_25 = (*(uint32_t*)result << 0xe);
006210be                          int32_t edi_7 = ((ebp_7 * 0x3b21) + (esi_3 * 0xffffe782));
006210c0                          int32_t ebp_9 = (ecx_25 + edi_7);
006210c3                          int32_t ecx_26 = (ecx_25 - edi_7);
006210f6                          int32_t esi_8 = ((((var_18_2 * 0x2e75) + (ebx_10 * 0xffffba79)) + (var_2c_2 * 0xfffff93e)) + (ecx_11 * 0x21f9));
00621130                          int32_t esi_13 = ((((var_18_2 * 0xffffecc2) + (ebx_10 * 0x1ccd)) + (var_2c_2 * 0xffffefb0)) + (ecx_11 * 0x5203));
0062113c                          int32_t ebx_20 = ((((esi_13 + ebp_9) + 0x40000) >> 0x13) + 0x80);
0062113c                          
00621144                          if (ebx_20 < 0)
00621240                              ebx_20 = 0;
00621144                          else if (ebx_20 > 0xff)
00621152                              ebx_20 = 0xff;
00621152                          
00621157                          *(uint16_t*)edx_14 = ebx_20;
00621165                          int32_t ebp_13 = ((((ebp_9 - esi_13) + 0x40000) >> 0x13) + 0x80);
00621165                          
0062116d                          if (ebp_13 < 0)
00621230                              ebp_13 = 0;
0062116d                          else if (ebp_13 > 0xff)
0062117b                              ebp_13 = 0xff;
0062117b                          
00621180                          edx_14[3] = ebp_13;
00621195                          int32_t ebx_24 = ((((esi_8 + ecx_26) + 0x40000) >> 0x13) + 0x80);
00621195                          
0062119d                          if (ebx_24 < 0)
00621220                              ebx_24 = 0;
0062119d                          else if (ebx_24 > 0xff)
006211ab                              ebx_24 = 0xff;
006211ab                          
006211b0                          edx_14[1] = ebx_24;
006211c4                          int32_t ecx_30 = ((((ecx_26 - esi_8) + 0x40000) >> 0x13) + 0x80);
006211c4                          
006211cc                          if (ecx_30 < 0)
00621210                              ecx_30 = 0;
006211cc                          else if (ecx_30 > 0xff)
006211d6                              ecx_30 = 0xff;
006211d6                          
006211db                          edx_14[2] = ecx_30;
006211df                          result += 0x20;
006211e2                          edx_14 = &edx_14[8];
00620f96                      }
00620f96                      else
00620f96                      {
00620f9c                          ebp_7 = *(uint32_t*)((char*)result + 8);
00620f9c                          
00620fa1                          if (ebp_7 != 0)
00620fa1                          {
00621070                              esi_3 = *(uint32_t*)((char*)result + 0x18);
00621079                              var_2c_2 = *(uint32_t*)((char*)result + 0x1c);
00621080                              var_18_2 = *(uint32_t*)((char*)result + 0x14);
00621087                              ebx_10 = *(uint32_t*)((char*)result + 0xc);
0062108a                              goto label_6210af;
00620fa1                          }
00620fa1                          
00620fa7                          ebx_10 = *(uint32_t*)((char*)result + 0xc);
00620fa7                          
00620fac                          if (ebx_10 != 0)
00620fac                          {
00621050                              esi_3 = *(uint32_t*)((char*)result + 0x18);
00621059                              var_2c_2 = *(uint32_t*)((char*)result + 0x1c);
00621060                              var_18_2 = *(uint32_t*)((char*)result + 0x14);
00621067                              goto label_6210af;
00620fac                          }
00620fac                          
00620fb2                          int32_t ecx_12 = *(uint32_t*)((char*)result + 0x14);
00620fb7                          var_18_2 = ecx_12;
00620fb7                          
00620fbe                          if (ecx_12 != 0)
00620fbe                          {
00621030                              esi_3 = *(uint32_t*)((char*)result + 0x18);
00621036                              var_2c_2 = *(uint32_t*)((char*)result + 0x1c);
0062103d                              goto label_6210af;
00620fbe                          }
00620fbe                          
00620fc4                          esi_3 = *(uint32_t*)((char*)result + 0x18);
00620fc4                          
00620fc9                          if (esi_3 != 0)
00620fc9                          {
00621023                              var_2c_2 = *(uint32_t*)((char*)result + 0x1c);
0062102a                              goto label_6210af;
00620fc9                          }
00620fc9                          
00620fcb                          int32_t ecx_13 = *(uint32_t*)((char*)result + 0x1c);
00620fd0                          var_2c_2 = ecx_13;
00620fd0                          
00620fd7                          if (ecx_13 != 0)
00620fd7                              goto label_6210af;
00620fd7                          
00620fe5                          int32_t ecx_17 = (((*(uint32_t*)result + 0x10) >> 5) + 0x80);
00620fe5                          
00620fed                          if (ecx_17 < 0)
00621200                              ecx_17 = 0;
00620fed                          else if (ecx_17 > 0xff)
00620ffb                              ecx_17 = 0xff;
00620ffb                          
00621000                          int16_t ecx_18 = ecx_17;
00621003                          result += 0x20;
00621006                          *(uint16_t*)edx_14 = ecx_18;
00621009                          edx_14[1] = ecx_18;
0062100d                          edx_14[2] = ecx_18;
00621011                          edx_14[3] = ecx_18;
00621015                          edx_14 = &edx_14[8];
00620f96                      }
006211ef                  }
006211ef                  
006211ff                  return result;
00620f59              }
00620f59              
00620f5e              if (edx_13 != 4)
00620f5e              {
00620d7b                  var_24 = edx_13;
00620d7b                  break;
00620f5e              }
00620f5e              
00620f50              eax += 2;
00620f53              ecx += 4;
00620f56          }
00620d82      }
00620d50  }

00620ded                                         8d 76 00                                                               .v.
00620e11                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00620e35                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
00620e59                                                                             8d b4 26 00 00 00 00                           ..&....
00620f4c                                      8d 74 26 00                                                              .t&.
00620f65                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
0062101d                                                                                         8d 76 00                               .v.
0062102f                                               90                                                                 .
00621042        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
00621069                             8d b4 26 00 00 00 00                                                           ..&....
0062108c                                      8d 74 26 00                                                              .t&.
00621207                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
00621214                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00621224              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
00621237                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
00621247                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00621250  int32_t _iDCT2x2_IPP_PX(void* arg1)

00621250  {
0062125b      void* edx = arg1;
0062125d      int32_t var_54;
0062125d      int32_t* eax = &var_54;
00621265      int32_t var_14 = 8;
00621265      
0062126f      while (true)
0062126f      {
0062126f          int32_t ebp_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x10));
00621275          int32_t ecx_1;
00621275          int32_t ebx_1;
00621275          int32_t edi_1;
00621275          
00621275          if (ebp_1 != 0)
00621275          {
006212d0              ecx_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x70));
006212d4              edi_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x50));
006212d8              ebx_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x30));
006212df          label_6212df:
006212df              int32_t esi_2 = (((int32_t)*(uint16_t*)edx) << 0xf);
006212fe              int32_t ecx_7 = ((ebp_1 * 0x73fc) + ((ebx_1 * 0xffffd746) + ((edi_1 * 0x1b37) + (ecx_1 * 0xffffe8ee))));
0062130c              *(uint32_t*)eax = (((esi_2 + ecx_7) + 0x1000) >> 0xd);
00621317              eax[8] = (((esi_2 - ecx_7) + 0x1000) >> 0xd);
0062131a              edx += 2;
0062131d              eax = &eax[1];
00621275          }
00621275          else
00621275          {
00621277              ebx_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x30));
00621277              
0062127d              if (ebx_1 != 0)
0062127d              {
006212c0                  ecx_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x70));
006212c4                  edi_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x50));
006212c8                  goto label_6212df;
0062127d              }
0062127d              
0062127f              edi_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x50));
0062127f              
00621285              if (edi_1 != 0)
00621285              {
006212b0                  ecx_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x70));
006212b4                  goto label_6212df;
00621285              }
00621285              
00621287              ecx_1 = ((int32_t)*(uint16_t*)((char*)edx + 0x70));
00621287              
0062128d              if (ecx_1 != 0)
0062128d                  goto label_6212df;
0062128d              
00621294              int32_t ecx_4 = (((int32_t)*(uint16_t*)edx) * 4);
00621296              *(uint32_t*)eax = ecx_4;
00621298              edx += 2;
0062129b              eax[8] = ecx_4;
0062129e              eax = &eax[1];
00621275          }
00621320          int32_t ecx_8 = var_14;
00621320          
00621336          while (true)
00621336          {
00621336              ecx_8 -= 1;
00621336              
00621339              if (ecx_8 <= 0)
00621339              {
0062135a                  int32_t var_50;
0062135a                  void* edi_5;
0062135a                  int32_t var_48;
0062135a                  int32_t var_40;
0062135a                  int32_t var_38;
0062135a                  int32_t eax_1;
0062135a                  int32_t edx_1;
0062135a                  int32_t edi_4;
0062135a                  
0062135a                  if (var_50 != 0)
0062135a                  {
006213bc                      edi_4 = var_38;
006213c0                      eax_1 = var_40;
006213c4                      edx_1 = var_48;
006213cb                  label_6213cb:
006213cb                      int32_t esi_7 = (var_54 << 0xf);
006213ea                      int32_t edi_9 = ((((edi_4 * 0xffffe8ee) + (eax_1 * 0x1b37)) + (edx_1 * 0xffffd746)) + (var_50 * 0x73fc));
006213f6                      int32_t eax_10 = ((((esi_7 + edi_9) + 0x80000) >> 0x14) + 0x80);
006213f6                      
006213fd                      if (eax_10 < 0)
00621537                          eax_10 = 0;
006213fd                      else if (eax_10 > 0xff)
0062140a                          eax_10 = 0xff;
0062140a                      
0062140f                      *(uint16_t*)arg1 = eax_10;
0062141d                      int32_t esi_11 = ((((esi_7 - edi_9) + 0x80000) >> 0x14) + 0x80);
0062141d                      
00621425                      if (esi_11 < 0)
00621530                          esi_11 = 0;
00621425                      else if (esi_11 > 0xff)
00621433                          esi_11 = 0xff;
00621433                      
00621438                      *(uint16_t*)((char*)arg1 + 2) = esi_11;
00621440                      edi_5 = ((char*)arg1 + 0x10);
0062135a                  }
0062135a                  else
0062135a                  {
0062135c                      edx_1 = var_48;
0062135c                      
00621362                      if (edx_1 != 0)
00621362                      {
006213b2                          edi_4 = var_38;
006213b6                          eax_1 = var_40;
006213ba                          goto label_6213cb;
00621362                      }
00621362                      
00621364                      eax_1 = var_40;
00621364                      
0062136a                      if (eax_1 != 0)
0062136a                      {
006213ac                          edi_4 = var_38;
006213b0                          goto label_6213cb;
0062136a                      }
0062136a                      
0062136c                      edi_4 = var_38;
0062136c                      
00621372                      if (edi_4 != 0)
00621372                          goto label_6213cb;
00621372                      
0062137d                      int32_t eax_5 = (((var_54 + 0x10) >> 5) + 0x80);
0062137d                      
00621384                      if (eax_5 < 0)
0062151a                          eax_5 = 0;
00621384                      else if (eax_5 > 0xff)
00621391                          eax_5 = 0xff;
00621391                      
00621396                      int16_t eax_6 = eax_5;
00621399                      edi_5 = ((char*)arg1 + 0x10);
0062139c                      *(uint16_t*)arg1 = eax_6;
0062139f                      *(uint16_t*)((char*)arg1 + 2) = eax_6;
0062135a                  }
00621448                  int32_t var_34;
00621448                  int32_t var_30;
00621448                  int32_t ecx_10;
00621448                  int32_t edx_3;
00621448                  int32_t ebp_6;
00621448                  int32_t var_28;
00621448                  int32_t var_20;
00621448                  int32_t var_18;
00621448                  
00621448                  if (var_30 != 0)
00621448                  {
0062149f                      edx_3 = var_18;
006214a2                      ecx_10 = var_20;
006214a5                      ebp_6 = var_28;
00621448                  }
00621448                  else
00621448                  {
0062144a                      ebp_6 = var_28;
0062144a                      
0062144f                      if (ebp_6 != 0)
0062144f                      {
00621497                          edx_3 = var_18;
0062149a                          ecx_10 = var_20;
0062144f                      }
0062144f                      else
0062144f                      {
00621451                          ecx_10 = var_20;
00621451                          
00621456                          if (ecx_10 != 0)
00621492                              edx_3 = var_18;
00621456                          else
00621456                          {
00621458                              edx_3 = var_18;
00621458                              
0062145d                              if (edx_3 == 0)
0062145d                              {
00621467                                  int32_t eax_14 = (((var_34 + 0x10) >> 5) + 0x80);
00621467                                  
0062146e                                  if (eax_14 < 0)
00621521                                      eax_14 = 0;
0062146e                                  else if (eax_14 > 0xff)
0062147b                                      eax_14 = 0xff;
0062147b                                  
00621480                                  int16_t eax_15 = eax_14;
00621483                                  *(uint16_t*)edi_5 = eax_15;
00621486                                  *(uint16_t*)((char*)edi_5 + 2) = eax_15;
00621491                                  return eax_15;
0062145d                              }
00621456                          }
0062144f                      }
00621448                  }
006214aa                  int32_t eax_17 = (var_34 << 0xf);
006214c9                  int32_t edx_7 = ((((edx_3 * 0xffffe8ee) + (ecx_10 * 0x1b37)) + (ebp_6 * 0xffffd746)) + (var_30 * 0x73fc));
006214d5                  int32_t ecx_14 = ((((eax_17 + edx_7) + 0x80000) >> 0x14) + 0x80);
006214d5                  
006214dd                  if (ecx_14 < 0)
0062152c                      ecx_14 = 0;
006214dd                  else if (ecx_14 > 0xff)
006214e7                      ecx_14 = 0xff;
006214e7                  
006214ec                  *(uint16_t*)edi_5 = ecx_14;
006214f9                  int32_t eax_21 = ((((eax_17 - edx_7) + 0x80000) >> 0x14) + 0x80);
006214f9                  
00621500                  if (eax_21 < 0)
00621528                      eax_21 = 0;
00621500                  else if (eax_21 > 0xff)
00621509                      eax_21 = 0xff;
00621509                  
0062150e                  *(uint16_t*)((char*)edi_5 + 2) = eax_21;
00621519                  return eax_21;
00621339              }
00621339              
00621348              if ((ecx_8 != 6 && (ecx_8 != 4 && ecx_8 != 2)))
00621348              {
0062126b                  var_14 = ecx_8;
0062126b                  break;
00621348              }
00621348              
00621330              edx += 2;
00621333              eax = &eax[1];
00621336          }
0062126f      }
00621250  }

006212a6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
006212b6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
006212ca                                8d b6 00 00 00 00                                                            ......
00621326                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0062134f                                               90                                                                 .
0062153e                                                                                            8b f6                                ..

00621540  int16_t* _iDCT1x1_IPP_PX(int16_t* arg1)

00621540  {
0062154d      int32_t edx_3 = (((((int32_t)*(uint16_t*)arg1) + 4) >> 3) + 0x80);
0062154d      
00621555      if (edx_3 < 0)
00621568          edx_3 = 0;
00621555      else if (edx_3 > 0xff)
0062155f          edx_3 = 0xff;
0062155f      
00621564      *(uint16_t*)arg1 = edx_3;
00621567      return arg1;
00621540  }

0062156c                                      8d 74 26 00                                                              .t&.

00621570  void EB_Init_PX(struct _STATE* arg1, uint8_t* arg2, unsigned long arg3)

00621570  {
00621582      if (arg1->file == 0)
00621582      {
006215b8          arg1->entropy_buf_maxsize = arg3;
006215be          arg1->start_entropy_ptr = arg2;
006215c1          arg1->end_entropy_ptr = &arg2[arg3];
006215c4          arg1->cur_entropy_ptr = arg2;
006215c7          arg1->entropy_bytes_left = arg3;
006215ca          arg1->entropy_bytes_processed = 0;
00621582      }
00621582      else
00621582      {
00621592          arg1->entropy_buf_maxsize = 0x1000;
00621595          arg1->start_entropy_ptr = &arg1->JPGBuffer;
00621598          arg1->end_entropy_ptr = &arg1[1];
0062159b          arg1->cur_entropy_ptr = &arg1->JPGBuffer;
0062159e          arg1->entropy_bytes_left = 0x1000;
006215a1          arg1->entropy_bytes_processed = 0;
00621582      }
00621582      
006215aa      arg1->bit_buffer_64 = 0;
006215ac      *(uint32_t*)((char*)arg1->bit_buffer_64)[4] = 0;
006215af      arg1->bitbuf_bits_valid = 8;
00621570  }

006215d3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

006215e0  void EB_Init_M5(struct _STATE* arg1, uint8_t* arg2, unsigned long arg3)

006215e0  {
006215f2      if (arg1->file == 0)
006215f2      {
00621619          arg1->entropy_buf_maxsize = arg3;
0062161f          arg1->start_entropy_ptr = arg2;
00621622          arg1->cur_entropy_ptr = arg2;
00621625          arg1->end_entropy_ptr = &arg2[arg3];
006215f2      }
006215f2      else
006215f2      {
006215f4          arg1->entropy_buf_maxsize = 0x1000;
00621604          arg1->start_entropy_ptr = &arg1->JPGBuffer;
00621607          arg1->cur_entropy_ptr = &arg1->JPGBuffer;
0062160a          arg1->end_entropy_ptr = &arg1[1];
006215f2      }
006215f2      
0062160f      arg1->bit_buffer_64 = 0;
00621611      *(uint32_t*)((char*)arg1->bit_buffer_64)[4] = 0;
00621614      arg1->bitbuf_bits_valid = 0;
006215e0  }

0062162a                                8d b6 00 00 00 00                                                            ......

00621630  int32_t _EB_Write_Bytes_PX(int32_t arg1, void* arg2, char* arg3)

00621630  {
0062163f      int32_t esi = 0;
00621641      HANDLE edx = *(uint32_t*)(arg3 + 0x3c);
00621641      
00621646      if (edx == 0)
00621646      {
0062179b          char* edx_7 = *(uint32_t*)(arg3 + 0x10);
0062179b          
006217a8          if (((char*)arg2 + edx_7) >= *(uint32_t*)(arg3 + 0x18))
006217aa              return 0xffffffe4;
006217aa          
006217b7          void* eax;
006217b7          
006217b7          if (*(uint32_t*)(arg3 + 0xc) < 8)
006217b7          {
006217b9              eax = *(uint8_t*)arg3;
006217be              *(uint32_t*)(arg3 + 0x10) = &edx_7[1];
006217c1              *(uint8_t*)edx_7 = eax;
006217c3              *(uint32_t*)(arg3 + 0x1c) += 1;
006217c6              uint32_t edi_6 = ((uint32_t)*(uint8_t*)arg3);
006217cb              *(uint32_t*)(arg3 + 0x24) -= 1;
006217cb              
006217d6              if (((edi_6 - 0xff) | 0) == 0)
006217d6              {
006217d8                  char* ecx_7 = *(uint32_t*)(arg3 + 0x10);
006217de                  *(uint32_t*)(arg3 + 0x10) = &ecx_7[1];
006217e1                  *(uint8_t*)ecx_7 = 0;
006217e4                  *(uint32_t*)(arg3 + 0x1c) += 1;
006217e7                  *(uint32_t*)(arg3 + 0x24) -= 1;
006217d6              }
006217d6              
006217ea              *(uint32_t*)(arg3 + 0xc) = 8;
006217f3              *(uint32_t*)arg3 = 0;
006217f5              *(uint32_t*)(arg3 + 4) = 0;
006217f8              edx_7 = *(uint32_t*)(arg3 + 0x10);
006217b7          }
006217b7          
006217fb          char* ecx_8 = nullptr;
006217fb          
00621803          if (arg2 > 0)
00621803          {
00621810              if (arg2 >= 6)
00621810              {
0062181d                  int32_t var_18_2 = 0;
0062181d                  
00621826                  while (true)
00621826                  {
00621826                      eax = ecx_8[arg1];
00621829                      *(uint8_t*)(edx_7 + ecx_8) = eax;
0062182c                      eax = ecx_8[(arg1 + 1)];
00621833                      ecx_8[(*(uint32_t*)(arg3 + 0x10) + 1)] = eax;
00621837                      eax = ecx_8[(arg1 + 2)];
0062183e                      ecx_8[(*(uint32_t*)(arg3 + 0x10) + 2)] = eax;
00621842                      eax = ecx_8[(arg1 + 3)];
00621849                      ecx_8[(*(uint32_t*)(arg3 + 0x10) + 3)] = eax;
0062184d                      int32_t edx_9;
0062184d                      edx_9 = ecx_8[(arg1 + 4)];
00621854                      ecx_8[(*(uint32_t*)(arg3 + 0x10) + 4)] = edx_9;
00621858                      ecx_8 = &ecx_8[5];
00621858                      
00621861                      if (ecx_8 > ((char*)arg2 - 6))
00621861                          break;
00621861                      
00621823                      edx_7 = *(uint32_t*)(arg3 + 0x10);
00621826                  }
00621826                  
00621863                  esi = var_18_2;
00621867                  edx_7 = *(uint32_t*)(arg3 + 0x10);
00621810              }
00621810              
00621873              while (true)
00621873              {
00621873                  eax = ecx_8[arg1];
00621876                  *(uint8_t*)(edx_7 + ecx_8) = eax;
00621879                  ecx_8 = &ecx_8[1];
00621879                  
0062187c                  if (ecx_8 >= arg2)
0062187c                      break;
0062187c                  
00621870                  edx_7 = *(uint32_t*)(arg3 + 0x10);
00621873              }
00621873              
0062187e              edx_7 = *(uint32_t*)(arg3 + 0x10);
00621803          }
00621803          
00621887          *(uint32_t*)(arg3 + 0x10) = (edx_7 + arg2);
0062188d          void* edx_12 = (*(uint32_t*)(arg3 + 0x24) - arg2);
0062188f          *(uint32_t*)(arg3 + 0x1c) += arg2;
00621892          *(uint32_t*)(arg3 + 0x24) = edx_12;
00621646      }
00621646      else
00621646      {
00621652          void* var_1c;
00621652          
00621652          if (*(uint32_t*)(arg3 + 0xc) < 8)
00621652          {
00621658              char* ecx_1 = *(uint32_t*)(arg3 + 0x10);
00621658              
0062165e              if (ecx_1 >= *(uint32_t*)(arg3 + 0x18))
0062165e              {
0062168c                  if ((_ownWriteFile(edx, &arg3[0x40], 0x1000, &var_1c) == 0 || var_1c != 0x1000))
0062168e                      return 0xffffffe9;
0062168e                  
00621698                  ecx_1 = *(uint32_t*)(arg3 + 0x14);
0062165e              }
0062165e              
0062169b              void* eax_1;
0062169b              eax_1 = *(uint8_t*)arg3;
006216a0              *(uint32_t*)(arg3 + 0x10) = &ecx_1[1];
006216a3              *(uint8_t*)ecx_1 = eax_1;
006216a5              *(uint32_t*)(arg3 + 0x1c) += 1;
006216a5              
006216b5              if (((((uint32_t)*(uint8_t*)arg3) - 0xff) | 0) == 0)
006216b5              {
006216b7                  char* edx_2 = *(uint32_t*)(arg3 + 0x10);
006216b7                  
006216bd                  if (edx_2 >= *(uint32_t*)(arg3 + 0x18))
006216bd                  {
006216ee                      if ((_ownWriteFile(*(uint32_t*)(arg3 + 0x3c), &arg3[0x40], 0x1000, &var_1c) == 0 || var_1c != 0x1000))
006216f0                          return 0xffffffe9;
006216f0                      
006216fa                      edx_2 = *(uint32_t*)(arg3 + 0x14);
006216bd                  }
006216bd                  
00621700                  *(uint32_t*)(arg3 + 0x10) = &edx_2[1];
00621703                  *(uint8_t*)edx_2 = 0;
00621706                  *(uint32_t*)(arg3 + 0x1c) += 1;
006216b5              }
006216b5              
0062170b              *(uint32_t*)arg3 = 0;
0062170d              *(uint32_t*)(arg3 + 4) = 0;
00621710              *(uint32_t*)(arg3 + 0xc) = 8;
00621652          }
00621652          
0062171f          if (arg2 > 0)
0062171f          {
00621721              int32_t var_18_1 = 0;
00621729              char* edi_4 = nullptr;
00621729              
00621784              do
00621784              {
00621730                  char* edx_5 = *(uint32_t*)(arg3 + 0x10);
00621730                  
00621736                  if (edx_5 >= *(uint32_t*)(arg3 + 0x18))
00621736                  {
00621767                      if ((_ownWriteFile(*(uint32_t*)(arg3 + 0x3c), &arg3[0x40], 0x1000, &var_1c) == 0 || var_1c != 0x1000))
00621794                          return 0xffffffe9;
00621794                      
00621769                      edx_5 = *(uint32_t*)(arg3 + 0x14);
0062176c                      *(uint32_t*)(arg3 + 0x10) = edx_5;
00621736                  }
00621736                  
0062176f                  void* eax_8;
0062176f                  eax_8 = edi_4[arg1];
00621775                  edi_4 = &edi_4[1];
00621776                  *(uint32_t*)(arg3 + 0x10) = &edx_5[1];
00621779                  *(uint8_t*)edx_5 = eax_8;
0062177b                  *(uint32_t*)(arg3 + 0x1c) += 1;
00621784              } while (edi_4 < arg2);
00621784              
00621786              return var_18_1;
0062171f          }
00621646      }
00621646      
00621793      return esi;
00621630  }

0062189a                                                                                8d b6 00 00 00 00                            ......

006218a0  int32_t _EB_Write_Bytes_M5(int32_t arg1, int32_t arg2, int64_t* arg3)

006218a0  {
006218b3      HANDLE edx = *(uint32_t*)((char*)arg3 + 0x3c);
006218b3      
006218b8      if (edx != 0)
006218b8      {
006218ba          int32_t ebx_1 = arg3[2];
006218ba          
006218c4          if (((arg2 + ebx_1) + 2) >= arg3[3])
006218c4          {
006218c9              uint32_t ebx_2 = (ebx_1 - *(uint32_t*)((char*)arg3 + 0x14));
006218ee              int32_t var_14;
006218ee              
006218ee              if ((_ownWriteFile(edx, &arg3[8], ebx_2, &var_14) == 0 || ebx_2 != var_14))
006218fc                  return 0xffffffe9;
006218fc              
00621900              edx = *(uint32_t*)((char*)arg3 + 0x3c);
00621903              arg3[2] = *(uint32_t*)((char*)arg3 + 0x14);
006218c4          }
006218b8      }
006218b8      
00621912      if ((edx == 0 && (arg3[2] + arg2) >= arg3[3]))
00621920          return 0xffffffe4;
00621920      
0062192c      _own_eb_write_bytes_m5(arg3, arg1, arg2);
00621931      *(uint32_t*)((char*)arg3 + 0x1c) += arg2;
0062193b      return 0;
006218a0  }

0062193c                                                                                      8d 74 26 00                              .t&.

00621940  enum _IJLERR EB_Write_Bits_M5(unsigned long arg1, int32_t arg2, struct _STATE* arg3)

00621940  {
00621962      char x87_r1[0x8];
00621962      return _own_eb_write_bits_m5(x87_r1, arg1, arg2, arg3);
00621940  }

00621963           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

00621970  enum _IJLERR EB_Write_Bits_File_M5(unsigned long arg1, int32_t arg2, struct _STATE* arg3)

00621970  {
00621992      char x87_r1[0x8];
00621992      return _own_eb_write_bits_file_m5(x87_r1, arg1, arg2, arg3);
00621970  }

00621993                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

006219a0  int32_t _Flush_Buffer_To_File(void* arg1)

006219a0  {
006219bd      int32_t result = *(uint32_t*)(*(uint32_t*)((char*)arg1 + 8) + 0x5c)(0, 0, arg1);
006219bd      
006219c1      if (result == 0)
006219c1      {
006219c3          HANDLE edx_1 = *(uint32_t*)((char*)arg1 + 0x3c);
006219c3          
006219c8          if (edx_1 != 0)
006219c8          {
006219d1              uint32_t esi_2 = (*(uint32_t*)((char*)arg1 + 0x10) - *(uint32_t*)((char*)arg1 + 0x14));
006219f3              int32_t var_14;
006219f3              
006219f3              if ((_ownWriteFile(edx_1, ((char*)arg1 + 0x40), esi_2, &var_14) == 0 || esi_2 != var_14))
006219f5                  return 0xffffffe9;
006219f5              
006219ff              *(uint32_t*)((char*)arg1 + 0x10) = *(uint32_t*)((char*)arg1 + 0x14);
006219c8          }
006219c1      }
006219c1      
00621a0a      return result;
006219a0  }

00621a0b                                   90 8d 74 26 00                                                             ..t&.

00621a10  int32_t _flush_mbuffer_to_file(void* arg1)

00621a10  {
00621a22      uint32_t ebx_1 = (*(uint32_t*)((char*)arg1 + 0x10) - *(uint32_t*)((char*)arg1 + 0x14));
00621a45      int32_t var_c;
00621a45      
00621a45      if ((_ownWriteFile(*(uint32_t*)((char*)arg1 + 0x3c), ((char*)arg1 + 0x40), ebx_1, &var_c) == 0 || ebx_1 != var_c))
00621a51          return 0xffffffe9;
00621a51      
00621a52      int32_t edx_1 = *(uint32_t*)((char*)arg1 + 0x14);
00621a57      *(uint32_t*)((char*)arg1 + 0x10) = edx_1;
00621a5d      *(uint32_t*)((char*)arg1 + 0x18) = (edx_1 + *(uint32_t*)((char*)arg1 + 0x20));
00621a65      return 0;
00621a10  }

00621a66                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

00621a70  enum _IJLERR Set_Encode_Fast_Path(struct _JPEG_PROPERTIES* arg1)

00621a70  {
00621a77      void* ctx = arg1->state.ctx;
00621a77      
00621a84      if (arg1->jinterleaveType != 0)
00621bb2          arg1->fast_processing = IJL_NO_CC_OR_US;
00621a84      else
00621a84      {
00621a8a          int32_t upsampling_reqd = arg1->upsampling_reqd;
00621a8a          
00621a96          if ((upsampling_reqd != 0 && arg1->cconversion_reqd != 0))
00621a96          {
00621a98              arg1->fast_processing = IJL_NO_CC_OR_US;
00621a9f              int32_t ncomps = arg1->jframe.ncomps;
00621a9f              
00621aaf              if ((ncomps <= 0 || ncomps > 0xff))
00621ab9                  return 0xfffffff2;
00621ab9              
00621abd              if (ncomps == 3)
00621abd              {
00621c78                  enum _IJL_COLOR DIBColor_1 = arg1->DIBColor;
00621c78                  
00621df2                  if ((DIBColor_1 == IJL_RGB && arg1->DIBChannels == 3))
00621df2                  {
00621df8                      struct _FRAME_COMPONENT* comps_3 = arg1->jframe.comps;
00621dfe                      int32_t hsampling_3 = comps_3->hsampling;
00621dfe                      
00621e83                      if ((hsampling_3 == 2 && (comps_3->vsampling == 2 && (*(int32_t*)((char*)comps_3 + 0x14) == 1 && (*(int32_t*)((char*)comps_3 + 0x18) == 1 && (*(int32_t*)((char*)comps_3 + 0x24) == 1 && *(int32_t*)((char*)comps_3 + 0x28) == 1))))))
00621e83                      {
00621e85                          arg1->fast_processing = IJL_411_YCBCR_111_RGB;
00621e8c                          *(uint32_t*)((char*)ctx + 0x60) = RGB_to_YCbCr_411_MCU;
00621e96                          return 0;
00621e83                      }
00621e83                      
00621e45                      if ((hsampling_3 == 2 && (comps_3->vsampling == 1 && (*(int32_t*)((char*)comps_3 + 0x14) == 1 && (*(int32_t*)((char*)comps_3 + 0x18) == 1 && (*(int32_t*)((char*)comps_3 + 0x24) == 1 && *(int32_t*)((char*)comps_3 + 0x28) == 1))))))
00621e45                      {
00621e4b                          arg1->fast_processing = IJL_422_YCBCR_111_RGB;
00621e52                          *(uint32_t*)((char*)ctx + 0x60) = RGB_to_YCbCr_422_MCU;
00621e45                      }
00621df2                  }
00621df2                  else if ((DIBColor_1 == IJL_RGB && arg1->DIBChannels == 4))
00621d47                  {
00621d4d                      struct _FRAME_COMPONENT* comps_2 = arg1->jframe.comps;
00621d53                      int32_t hsampling_2 = comps_2->hsampling;
00621d53                      
00621dd8                      if ((hsampling_2 == 2 && (comps_2->vsampling == 2 && (*(int32_t*)((char*)comps_2 + 0x14) == 1 && (*(int32_t*)((char*)comps_2 + 0x18) == 1 && (*(int32_t*)((char*)comps_2 + 0x24) == 1 && *(int32_t*)((char*)comps_2 + 0x28) == 1))))))
00621dd8                      {
00621dda                          arg1->fast_processing = IJL_NO_CC_OR_US;
00621de1                          *(uint32_t*)((char*)ctx + 0x60) = CC_SS_RGB_to_YCbCr_General_MCU;
00621deb                          return 0;
00621dd8                      }
00621dd8                      
00621d9a                      if ((hsampling_2 == 2 && (comps_2->vsampling == 1 && (*(int32_t*)((char*)comps_2 + 0x14) == 1 && (*(int32_t*)((char*)comps_2 + 0x18) == 1 && (*(int32_t*)((char*)comps_2 + 0x24) == 1 && *(int32_t*)((char*)comps_2 + 0x28) == 1))))))
00621d9a                      {
00621da0                          arg1->fast_processing = IJL_NO_CC_OR_US;
00621da7                          *(uint32_t*)((char*)ctx + 0x60) = CC_SS_RGB_to_YCbCr_General_MCU;
00621d9a                      }
00621d47                  }
00621d47                  else if ((DIBColor_1 == IJL_BGR && arg1->DIBChannels == 3))
00621c9c                  {
00621ca2                      struct _FRAME_COMPONENT* comps_1 = arg1->jframe.comps;
00621ca8                      int32_t hsampling_1 = comps_1->hsampling;
00621ca8                      
00621d2d                      if ((hsampling_1 == 2 && (comps_1->vsampling == 2 && (*(int32_t*)((char*)comps_1 + 0x14) == 1 && (*(int32_t*)((char*)comps_1 + 0x18) == 1 && (*(int32_t*)((char*)comps_1 + 0x24) == 1 && *(int32_t*)((char*)comps_1 + 0x28) == 1))))))
00621d2d                      {
00621d2f                          arg1->fast_processing = IJL_411_YCBCR_111_BGR;
00621d36                          *(uint32_t*)((char*)ctx + 0x60) = BGR_to_YCbCr_411_MCU;
00621d40                          return 0;
00621d2d                      }
00621d2d                      
00621cef                      if ((hsampling_1 == 2 && (comps_1->vsampling == 1 && (*(int32_t*)((char*)comps_1 + 0x14) == 1 && (*(int32_t*)((char*)comps_1 + 0x18) == 1 && (*(int32_t*)((char*)comps_1 + 0x24) == 1 && *(int32_t*)((char*)comps_1 + 0x28) == 1))))))
00621cef                      {
00621cf5                          arg1->fast_processing = IJL_422_YCBCR_111_BGR;
00621cfc                          *(uint32_t*)((char*)ctx + 0x60) = BGR_to_YCbCr_422_MCU;
00621cef                      }
00621c9c                  }
00621abd              }
00621abd              else if ((ncomps == 4 && (arg1->DIBColor == IJL_RGBA_FPX && arg1->DIBChannels == 4)))
00621bcb              {
00621bcd                  struct _FRAME_COMPONENT* comps = arg1->jframe.comps;
00621bd3                  int32_t hsampling = comps->hsampling;
00621bd3                  
00621c60                  if ((hsampling == 2 && (comps->vsampling == 2 && (*(int32_t*)((char*)comps + 0x14) == 1 && (*(int32_t*)((char*)comps + 0x18) == 1 && (*(int32_t*)((char*)comps + 0x24) == 1 && (*(int32_t*)((char*)comps + 0x28) == 1 && (*(int32_t*)((char*)comps + 0x34) == 2 && *(int32_t*)((char*)comps + 0x38) == 2))))))))
00621c60                  {
00621c66                      arg1->fast_processing = IJL_4114_YCBCRA_FPX_1111_RGBA_FPX;
00621c6d                      *(uint32_t*)((char*)ctx + 0x60) = RGBA_FPX_to_YCbCrA_FPX_4114_MCU;
00621c77                      return 0;
00621c60                  }
00621c60                  
00621c16                  if ((hsampling == 2 && (comps->vsampling == 1 && (*(int32_t*)((char*)comps + 0x14) == 1 && (*(int32_t*)((char*)comps + 0x18) == 1 && (*(int32_t*)((char*)comps + 0x24) == 1 && (*(int32_t*)((char*)comps + 0x28) == 1 && (*(int32_t*)((char*)comps + 0x34) == 2 && *(int32_t*)((char*)comps + 0x38) == 1))))))))
00621c16                  {
00621c18                      arg1->fast_processing = IJL_4224_YCBCRA_FPX_1111_RGBA_FPX;
00621c1f                      *(uint32_t*)((char*)ctx + 0x60) = RGBA_FPX_to_YCbCrA_FPX_4224_MCU;
00621c16                  }
00621bcb              }
00621a96          }
00621a96          else if ((upsampling_reqd == 0 || arg1->cconversion_reqd != 0))
00621ada          {
00621b0f              if ((upsampling_reqd == 0 && arg1->cconversion_reqd != 0))
00621b0f              {
00621b11                  int32_t ncomps_2 = arg1->jframe.ncomps;
00621b11                  
0062203d                  if ((ncomps_2 == 1 && arg1->DIBChannels == 3))
0062203d                  {
00622043                      arg1->fast_processing = IJL_NO_CC_OR_US;
0062204a                      *(uint32_t*)((char*)ctx + 0x60) = CC_RGB_to_YCbCr_General_MCU;
00622054                      return 0;
0062203d                  }
0062203d                  
00621ff5                  if ((ncomps_2 == 3 && arg1->DIBChannels == 3))
00621ff5                  {
00621ffb                      enum _IJL_COLOR DIBColor = arg1->DIBColor;
00621ffb                      
00622001                      if (DIBColor == IJL_RGB)
00622001                      {
00622025                          arg1->fast_processing = IJL_111_YCBCR_111_RGB;
0062202c                          *(uint32_t*)((char*)ctx + 0x60) = RGB_to_YCbCr_111_MCU;
00622036                          return 0;
00622001                      }
00622001                      
00622006                      if (DIBColor != IJL_BGR)
00622006                      {
00622008                          arg1->fast_processing = IJL_NO_CC_OR_US;
00622012                          return 0;
00622006                      }
00622006                      
00622013                      arg1->fast_processing = IJL_111_YCBCR_111_BGR;
0062201a                      *(uint32_t*)((char*)ctx + 0x60) = BGR_to_YCbCr_111_MCU;
00622024                      return 0;
00621ff5                  }
00621ff5                  
00621fd7                  if ((ncomps_2 == 3 && arg1->DIBChannels == 4))
00621fd7                  {
00621fdd                      arg1->fast_processing = IJL_NO_CC_OR_US;
00621fe4                      *(uint32_t*)((char*)ctx + 0x60) = CC_SS_RGB_to_YCbCr_General_MCU;
00621fee                      return 0;
00621fd7                  }
00621fd7                  
00621b35                  if (ncomps_2 != 4)
00621b35                  {
00621b3b                      arg1->fast_processing = IJL_NO_CC_OR_US;
00621b45                      return 0;
00621b35                  }
00621b35                  
00621f9f                  if (arg1->DIBChannels != 4)
00621f9f                  {
00621fa1                      arg1->fast_processing = IJL_NO_CC_OR_US;
00621fab                      return 0;
00621f9f                  }
00621f9f                  
00621fb2                  if (arg1->DIBColor != IJL_RGBA_FPX)
00621fb2                  {
00621fb4                      arg1->fast_processing = IJL_NO_CC_OR_US;
00621fbe                      return 0;
00621fb2                  }
00621fb2                  
00621fbf                  arg1->fast_processing = IJL_1111_YCBCRA_FPX_1111_RGBA_FPX;
00621fc6                  *(uint32_t*)((char*)ctx + 0x60) = RGBA_FPX_to_YCbCrA_FPX_1111_MCU;
00621fd0                  return 0;
00621b0f              }
00621b0f              
00621b48              if (upsampling_reqd != 0)
00621b48              {
00621ba7                  arg1->fast_processing = IJL_NO_CC_OR_US;
00621bb1                  return 0;
00621b48              }
00621b48              
00621b4f              if (arg1->cconversion_reqd != 0)
00621b4f              {
00621b9c                  arg1->fast_processing = IJL_NO_CC_OR_US;
00621ba6                  return 0;
00621b4f              }
00621b4f              
00621b51              int32_t ncomps_3 = arg1->jframe.ncomps;
00621b51              
00622113              if ((ncomps_3 == 1 && (arg1->DIBColor == IJL_G && arg1->JPGColor == IJL_G)))
00622113              {
00622119                  arg1->fast_processing = IJL_1_G_1_G;
00622120                  *(uint32_t*)((char*)ctx + 0x60) = Y_to_Y_111_MCU;
0062212a                  return 0;
00622113              }
00622113              
006220e9              if ((ncomps_3 == 3 && (arg1->DIBChannels == 1 && arg1->JPGColor == IJL_YCBCR)))
006220e9              {
006220ef                  arg1->fast_processing = IJL_NO_CC_OR_US;
006220f6                  *(uint32_t*)((char*)ctx + 0x60) = Input_Interleave_General_MCU;
00622100                  return 0;
006220e9              }
006220e9              
006220a5              if ((ncomps_3 == 3 && arg1->DIBChannels == 3))
006220a5              {
006220b1                  if (arg1->DIBColor != IJL_BGR)
006220b1                  {
006220b3                      arg1->fast_processing = IJL_111_OTHER_111_OTHER;
006220ba                      *(uint32_t*)((char*)ctx + 0x60) = OTHER_to_OTHER_111_MCU;
006220c4                      return 0;
006220b1                  }
006220b1                  
006220c5                  arg1->fast_processing = IJL_NO_CC_OR_US;
006220cc                  *(uint32_t*)((char*)ctx + 0x60) = Input_Interleave_General_MCU;
006220d6                  return 0;
006220a5              }
006220a5              
00622087              if ((ncomps_3 == 3 && arg1->DIBChannels == 4))
00622087              {
0062208d                  arg1->fast_processing = IJL_NO_CC_OR_US;
00622094                  *(uint32_t*)((char*)ctx + 0x60) = Input_Interleave_General_MCU;
0062209e                  return 0;
00622087              }
00622087              
00621b7e              if (ncomps_3 == 4)
00621b7e              {
0062206f                  arg1->fast_processing = IJL_1111_RGBA_FPX_1111_RGBA_FPX;
00622076                  *(uint32_t*)((char*)ctx + 0x60) = OTHER_to_OTHER_1111_MCU;
00622080                  return 0;
00621b7e              }
00621b7e              
00621b84              arg1->fast_processing = IJL_NO_CC_OR_US;
00621b84              
0062205e              if ((arg1->JPGColor == IJL_OTHER && arg1->DIBColor == IJL_OTHER))
00622064                  *(uint32_t*)((char*)ctx + 0x60) = Input_Interleave_General_MCU;
00621ada          }
00621ada          else
00621ada          {
00621adc              arg1->fast_processing = IJL_NO_CC_OR_US;
00621ae3              int32_t ncomps_1 = arg1->jframe.ncomps;
00621ae3              
00621f88              if ((ncomps_1 == 3 && arg1->DIBChannels == 1))
00621f88              {
00621f8e                  *(uint32_t*)((char*)ctx + 0x60) = SS_General_MCU;
00621f98                  return 0;
00621f88              }
00621f88              
00621ea9              if (((ncomps_1 != 3 || arg1->DIBChannels != 3) || arg1->DIBColor == IJL_BGR))
00621ea9              {
00621afb                  *(uint32_t*)((char*)ctx + 0x60) = SS_General_MCU;
00621b05                  return 0;
00621ea9              }
00621ea9              
00621eaf              struct _FRAME_COMPONENT* comps_4 = arg1->jframe.comps;
00621eb5              int32_t hsampling_4 = comps_4->hsampling;
00621eb5              
00621f60              if ((hsampling_4 == 2 && (comps_4->vsampling == 2 && (*(int32_t*)((char*)comps_4 + 0x14) == 1 && (*(int32_t*)((char*)comps_4 + 0x18) == 1 && (*(int32_t*)((char*)comps_4 + 0x24) == 1 && *(int32_t*)((char*)comps_4 + 0x28) == 1))))))
00621f60              {
00621f66                  arg1->fast_processing = IJL_411_OTHER_111_OTHER;
00621f6d                  *(uint32_t*)((char*)ctx + 0x60) = OTHER_to_OTHER_411_MCU;
00621f74                  comps_4 = arg1->jframe.comps;
00621f7a                  hsampling_4 = comps_4->hsampling;
00621f60              }
00621f60              
00621efc              if ((hsampling_4 == 2 && (comps_4->vsampling == 1 && (*(int32_t*)((char*)comps_4 + 0x14) == 1 && (*(int32_t*)((char*)comps_4 + 0x18) == 1 && (*(int32_t*)((char*)comps_4 + 0x24) == 1 && *(int32_t*)((char*)comps_4 + 0x28) == 1))))))
00621efc              {
00621f08                  if (arg1->DIBSubsampling != IJL_422)
00621f08                  {
00621f0a                      arg1->fast_processing = IJL_422_OTHER_111_OTHER;
00621f11                      *(uint32_t*)((char*)ctx + 0x60) = OTHER_to_OTHER_422_MCU;
00621f1b                      return 0;
00621f08                  }
00621f08                  
00621f1c                  arg1->fast_processing = IJL_YCBYCR_YCBCR;
00621f23                  *(uint32_t*)((char*)ctx + 0x60) = YCbYCr_to_YCbCr_422_MCU;
00621efc              }
00621ada          }
00621a84      }
00621a84      
00621bbc      return 0;
00621a70  }

0062212b                                   90 8d 74 26 00                                                             ..t&.

00622130  void* sub_622130(int32_t arg1, int32_t arg2, void* arg3, void* arg4, int32_t arg5)

00622130  {
0062214c      void var_1c0;
0062214c      void* result = &var_1c0;
0062214f      int32_t i_1 = 0;
00622153      void* esi;
00622153      
00622153      if (arg4 > 0)
00622153      {
0062215b          int32_t ecx_1 = 0;
00622163          int32_t ebx_1 = 0;
00622167          int32_t ebp_1 = 0;
0062216a          void* result_1 = &var_1c0;
0062216a          
006222f2          do
006222f2          {
00622171              int32_t i = 0;
00622171              
0062217c              if (arg3 > 0)
0062217c              {
00622185                  void* edi_1 = ecx_1;
00622198                  int32_t i_3 = 0;
006221ad                  esi = ebx_1;
006221ad                  
00622247                  do
00622247                  {
006221b7                      uint32_t ebx_2 = ((uint32_t)*(uint8_t*)((char*)edi_1 + arg1));
006221bb                      uint32_t ebp_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 1));
006221c0                      uint32_t ecx_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 2));
006221e4                      edi_1 += 3;
006221e7                      *(uint16_t*)((char*)result_1 + (esi << 1)) = ((int16_t)(((((ebx_2 * 0x4d) + (ebp_2 * 0x96)) + (ecx_2 * 0x1d)) - 0x7f80) >> 8));
00622209                      *(uint16_t*)(((char*)result_1 + (esi << 1)) + 0x80) = ((int16_t)(((((ebx_2 * 0xffffffd5) + (ebp_2 * 0xffffffab)) + (ecx_2 << 7)) + 0x80) >> 8));
00622226                      *(uint16_t*)(((char*)result_1 + (esi << 1)) + 0x100) = ((int16_t)(((((ebx_2 << 7) + (ebp_2 * 0xffffff95)) + (ecx_2 * 0xffffffeb)) + 0x80) >> 8));
0062222e                      esi += 1;
00622236                      i = (i_3 + 1);
00622240                      i_3 = i;
00622247                  } while (i < arg3);
0062217c              }
0062217c              
0062226c              if (i < 8)
0062226c              {
00622275                  void* edi_2 = ((char*)result_1 + ebp_1);
00622282                  esi = ((char*)result_1 + ((i + ebx_1) << 1));
00622282                  
006222cb                  do
006222cb                  {
006222a6                      i += 1;
006222a7                      *(uint16_t*)esi = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) - 2);
006222af                      *(uint16_t*)((char*)esi + 0x80) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0x7e);
006222be                      *(uint16_t*)((char*)esi + 0x100) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0xfe);
006222c5                      esi += 2;
006222cb                  } while (i < 8);
0062226c              }
0062226c              
006222db              ecx_1 += arg2;
006222e2              ebx_1 += 8;
006222e5              ebp_1 += 0x10;
006222e8              i_1 += 1;
006222f2          } while (i_1 < arg4);
006222f2          
006222f8          result = result_1;
00622153      }
00622153      
00622302      if (i_1 < 8)
00622302      {
0062230b          void* ecx_4 = ((char*)result + (i_1 * 0x10));
0062230b          
0062241e          do
0062241e          {
00622314              int16_t edi_7 = *(uint16_t*)((char*)ecx_4 + 0xfc);
0062231b              esi = ((uint32_t)*(uint16_t*)((char*)ecx_4 - 2));
0062231f              *(uint16_t*)ecx_4 = *(uint16_t*)((char*)ecx_4 - 0x10);
00622326              int16_t ebp_4 = *(uint16_t*)((char*)ecx_4 + 0x7e);
0062232a              *(uint16_t*)((char*)ecx_4 + 0x80) = *(uint16_t*)((char*)ecx_4 + 0x70);
00622338              i_1 += 1;
00622339              *(uint16_t*)((char*)ecx_4 + 0x100) = *(uint16_t*)((char*)ecx_4 + 0xf0);
00622344              *(uint16_t*)((char*)ecx_4 + 2) = *(uint16_t*)((char*)ecx_4 - 0xe);
0062234c              *(uint16_t*)((char*)ecx_4 + 0x82) = *(uint16_t*)((char*)ecx_4 + 0x72);
0062235a              *(uint16_t*)((char*)ecx_4 + 0x102) = *(uint16_t*)((char*)ecx_4 + 0xf2);
00622365              *(uint16_t*)((char*)ecx_4 + 4) = *(uint16_t*)((char*)ecx_4 - 0xc);
0062236d              *(uint16_t*)((char*)ecx_4 + 0x84) = *(uint16_t*)((char*)ecx_4 + 0x74);
0062237b              *(uint16_t*)((char*)ecx_4 + 0x104) = *(uint16_t*)((char*)ecx_4 + 0xf4);
00622386              *(uint16_t*)((char*)ecx_4 + 6) = *(uint16_t*)((char*)ecx_4 - 0xa);
0062238e              *(uint16_t*)((char*)ecx_4 + 0x86) = *(uint16_t*)((char*)ecx_4 + 0x76);
0062239c              *(uint16_t*)((char*)ecx_4 + 0x106) = *(uint16_t*)((char*)ecx_4 + 0xf6);
006223a7              *(uint16_t*)((char*)ecx_4 + 8) = *(uint16_t*)((char*)ecx_4 - 8);
006223af              *(uint16_t*)((char*)ecx_4 + 0x88) = *(uint16_t*)((char*)ecx_4 + 0x78);
006223bd              *(uint16_t*)((char*)ecx_4 + 0x108) = *(uint16_t*)((char*)ecx_4 + 0xf8);
006223c8              *(uint16_t*)((char*)ecx_4 + 0xa) = *(uint16_t*)((char*)ecx_4 - 6);
006223d0              *(uint16_t*)((char*)ecx_4 + 0x8a) = *(uint16_t*)((char*)ecx_4 + 0x7a);
006223de              *(uint16_t*)((char*)ecx_4 + 0x10a) = *(uint16_t*)((char*)ecx_4 + 0xfa);
006223e9              *(uint16_t*)((char*)ecx_4 + 0xc) = *(uint16_t*)((char*)ecx_4 - 4);
006223f1              *(uint16_t*)((char*)ecx_4 + 0x8c) = *(uint16_t*)((char*)ecx_4 + 0x7c);
006223f8              int16_t ebx_25 = *(uint16_t*)((char*)ecx_4 + 0xfe);
006223ff              *(uint16_t*)((char*)ecx_4 + 0x10c) = edi_7;
00622406              *(uint16_t*)((char*)ecx_4 + 0xe) = esi;
0062240a              *(uint16_t*)((char*)ecx_4 + 0x8e) = ebp_4;
00622411              *(uint16_t*)((char*)ecx_4 + 0x10e) = ebx_25;
00622418              ecx_4 += 0x10;
0062241e          } while (i_1 < 8);
00622302      }
00622302      
00622584      for (int32_t i_2 = 0; i_2 < 0x40; i_2 += 8)
00622584      {
00622434          *(uint16_t*)(arg5 + (i_2 << 1)) = *(uint16_t*)((char*)result + (i_2 << 1));
00622440          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x80) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x80);
00622450          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x100) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x100);
0062245d          *(uint16_t*)((arg5 + (i_2 << 1)) + 2) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 2);
0062246a          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x82) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x82);
0062247a          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x102) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x102);
00622487          *(uint16_t*)((arg5 + (i_2 << 1)) + 4) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 4);
00622494          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x84) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x84);
006224a4          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x104) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x104);
006224b1          *(uint16_t*)((arg5 + (i_2 << 1)) + 6) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 6);
006224be          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x86) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x86);
006224ce          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x106) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x106);
006224db          *(uint16_t*)((arg5 + (i_2 << 1)) + 8) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 8);
006224e8          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x88) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x88);
006224f8          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x108) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x108);
00622505          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xa) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0xa);
00622512          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x8a) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x8a);
00622522          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x10a) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x10a);
0062252f          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xc) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0xc);
0062253c          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x8c) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x8c);
0062254c          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x10c) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x10c);
00622559          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xe) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0xe);
00622566          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x8e) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x8e);
00622576          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x10e) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x10e);
00622584      }
00622584      
00622594      return result;
00622130  }

00622595                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

006225a0  int32_t _RGB_to_YCbCr_111_Full_MCU_PX(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

006225a0  {
006225a1      int32_t esi;
006225a1      int32_t var_8 = esi;
006225a4      int32_t var_14 = esi;
006225ad      int16_t* ebx = arg3;
006225b1      int16_t* ecx = arg4;
006225b5      int16_t* edx = arg5;
006225b9      int32_t i = 0;
006225bc      char* esi_2 = arg1;
006225bc      
0062295b      do
0062295b      {
006225e3          *(uint16_t*)ebx = ((int16_t)(((((((uint32_t)*(uint8_t*)esi_2) * 0x4d) + (((uint32_t)esi_2[1]) * 0x96)) + (((uint32_t)esi_2[2]) * 0x1d)) - 0x7f80) >> 8));
0062260a          i += 1;
0062260b          ebx[1] = ((int16_t)(((((((uint32_t)esi_2[3]) * 0x4d) + (((uint32_t)esi_2[4]) * 0x96)) + (((uint32_t)esi_2[5]) * 0x1d)) - 0x7f80) >> 8));
00622633          ebx[2] = ((int16_t)(((((((uint32_t)esi_2[6]) * 0x4d) + (((uint32_t)esi_2[7]) * 0x96)) + (((uint32_t)esi_2[8]) * 0x1d)) - 0x7f80) >> 8));
0062265b          ebx[3] = ((int16_t)(((((((uint32_t)esi_2[9]) * 0x4d) + (((uint32_t)esi_2[0xa]) * 0x96)) + (((uint32_t)esi_2[0xb]) * 0x1d)) - 0x7f80) >> 8));
00622683          ebx[4] = ((int16_t)(((((((uint32_t)esi_2[0xc]) * 0x4d) + (((uint32_t)esi_2[0xd]) * 0x96)) + (((uint32_t)esi_2[0xe]) * 0x1d)) - 0x7f80) >> 8));
006226ab          ebx[5] = ((int16_t)(((((((uint32_t)esi_2[0xf]) * 0x4d) + (((uint32_t)esi_2[0x10]) * 0x96)) + (((uint32_t)esi_2[0x11]) * 0x1d)) - 0x7f80) >> 8));
006226d3          ebx[6] = ((int16_t)(((((((uint32_t)esi_2[0x12]) * 0x4d) + (((uint32_t)esi_2[0x13]) * 0x96)) + (((uint32_t)esi_2[0x14]) * 0x1d)) - 0x7f80) >> 8));
006226fb          ebx[7] = ((int16_t)(((((((uint32_t)esi_2[0x15]) * 0x4d) + (((uint32_t)esi_2[0x16]) * 0x96)) + (((uint32_t)esi_2[0x17]) * 0x1d)) - 0x7f80) >> 8));
0062271f          ebx = &ebx[8];
00622722          *(uint16_t*)ecx = ((int16_t)(((((((uint32_t)*(uint8_t*)esi_2) * 0xffffffd5) + (((uint32_t)esi_2[1]) * 0xffffffab)) + (((uint32_t)esi_2[2]) << 7)) + 0x80) >> 8));
00622746          ecx[1] = ((int16_t)(((((((uint32_t)esi_2[3]) * 0xffffffd5) + (((uint32_t)esi_2[4]) * 0xffffffab)) + (((uint32_t)esi_2[5]) << 7)) + 0x80) >> 8));
0062276b          ecx[2] = ((int16_t)(((((((uint32_t)esi_2[6]) * 0xffffffd5) + (((uint32_t)esi_2[7]) * 0xffffffab)) + (((uint32_t)esi_2[8]) << 7)) + 0x80) >> 8));
00622790          ecx[3] = ((int16_t)(((((((uint32_t)esi_2[9]) * 0xffffffd5) + (((uint32_t)esi_2[0xa]) * 0xffffffab)) + (((uint32_t)esi_2[0xb]) << 7)) + 0x80) >> 8));
006227b5          ecx[4] = ((int16_t)(((((((uint32_t)esi_2[0xc]) * 0xffffffd5) + (((uint32_t)esi_2[0xd]) * 0xffffffab)) + (((uint32_t)esi_2[0xe]) << 7)) + 0x80) >> 8));
006227da          ecx[5] = ((int16_t)(((((((uint32_t)esi_2[0xf]) * 0xffffffd5) + (((uint32_t)esi_2[0x10]) * 0xffffffab)) + (((uint32_t)esi_2[0x11]) << 7)) + 0x80) >> 8));
006227ff          ecx[6] = ((int16_t)(((((((uint32_t)esi_2[0x12]) * 0xffffffd5) + (((uint32_t)esi_2[0x13]) * 0xffffffab)) + (((uint32_t)esi_2[0x14]) << 7)) + 0x80) >> 8));
00622824          ecx[7] = ((int16_t)(((((((uint32_t)esi_2[0x15]) * 0xffffffd5) + (((uint32_t)esi_2[0x16]) * 0xffffffab)) + (((uint32_t)esi_2[0x17]) << 7)) + 0x80) >> 8));
00622848          *(uint16_t*)edx = ((int16_t)(((((((uint32_t)*(uint8_t*)esi_2) << 7) + (((uint32_t)esi_2[1]) * 0xffffff95)) + (((uint32_t)esi_2[2]) * 0xffffffeb)) + 0x80) >> 8));
0062286c          ecx = &ecx[8];
0062286f          edx[1] = ((int16_t)(((((((uint32_t)esi_2[3]) << 7) + (((uint32_t)esi_2[4]) * 0xffffff95)) + (((uint32_t)esi_2[5]) * 0xffffffeb)) + 0x80) >> 8));
00622894          edx[2] = ((int16_t)(((((((uint32_t)esi_2[6]) << 7) + (((uint32_t)esi_2[7]) * 0xffffff95)) + (((uint32_t)esi_2[8]) * 0xffffffeb)) + 0x80) >> 8));
006228b9          edx[3] = ((int16_t)(((((((uint32_t)esi_2[9]) << 7) + (((uint32_t)esi_2[0xa]) * 0xffffff95)) + (((uint32_t)esi_2[0xb]) * 0xffffffeb)) + 0x80) >> 8));
006228de          edx[4] = ((int16_t)(((((((uint32_t)esi_2[0xc]) << 7) + (((uint32_t)esi_2[0xd]) * 0xffffff95)) + (((uint32_t)esi_2[0xe]) * 0xffffffeb)) + 0x80) >> 8));
00622903          edx[5] = ((int16_t)(((((((uint32_t)esi_2[0xf]) << 7) + (((uint32_t)esi_2[0x10]) * 0xffffff95)) + (((uint32_t)esi_2[0x11]) * 0xffffffeb)) + 0x80) >> 8));
00622928          edx[6] = ((int16_t)(((((((uint32_t)esi_2[0x12]) << 7) + (((uint32_t)esi_2[0x13]) * 0xffffff95)) + (((uint32_t)esi_2[0x14]) * 0xffffffeb)) + 0x80) >> 8));
0062294d          edx[7] = ((int16_t)(((((((uint32_t)esi_2[0x15]) << 7) + (((uint32_t)esi_2[0x16]) * 0xffffff95)) + (((uint32_t)esi_2[0x17]) * 0xffffffeb)) + 0x80) >> 8));
00622951          edx = &edx[8];
00622954          esi_2 = &esi_2[arg2];
0062295b      } while (i < 8);
0062295b      
00622968      return i;
006225a0  }

00622969                             8d b4 26 00 00 00 00                                                           ..&....

00622970  int64_t* _RGB_to_YCbCr_111_Full_MCU_M5(int64_t* arg1, int32_t arg2, int64_t* arg3, int64_t* arg4, int64_t* arg5)

00622970  {
0062299c      _own_rgb_to_ycbcr_111_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
006229a6      return arg1;
00622970  }

006229a7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

006229b0  void RGB_to_YCbCr_111_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

006229b0  {
006229bb      void* edi = 8;
006229c0      void* esi = 8;
006229c5      int32_t DIBLineBytes = arg1->DIBLineBytes;
006229c8      uint8_t* MCUBuf = arg1->MCUBuf;
006229ce      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
006229ce      
006229e6      if ((arg1->numxMCUs - 1) != arg2)
00622a25          arg1->state.DIB_ptr = &DIB_ptr[0x18];
006229e6      else
006229e6      {
006229ef          int32_t eax_5;
006229ef          int32_t edx_1;
006229ef          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
006229ef          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
006229f9          void* eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 7) ^ edx_1) - edx_1);
006229f9          
006229fd          if (eax_10 != 0)
006229ff              edi = eax_10;
006229ff          
00622a16          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
006229e6      }
006229e6      
00622a39      if (arg3 == (arg1->numyMCUs - 1))
00622a39      {
00622a42          int32_t eax_19;
00622a42          int32_t edx_7;
00622a42          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
00622a42          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
00622a47          int32_t eax_22;
00622a47          int32_t edx_8;
00622a47          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
00622a47          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
00622a51          void* eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
00622a51          
00622a55          if (eax_27 != 0)
00622a57              esi = eax_27;
00622a39      }
00622a39      
00622a81      if ((edi != 8 || esi != 8))
00622a81      {
00622a71          sub_622130(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
00622a7d          return;
00622a81      }
00622a81      
00622aa6      *(uint32_t*)(arg1->state.ctx + 0x68)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x80], &MCUBuf[0x100]);
006229b0  }

00622ab1                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

00622ac0  void* sub_622ac0(int32_t arg1, int32_t arg2, void* arg3, void* arg4, int32_t arg5)

00622ac0  {
00622adc      void var_1c0;
00622adc      void* result = &var_1c0;
00622adf      int32_t i_1 = 0;
00622ae3      void* esi;
00622ae3      
00622ae3      if (arg4 > 0)
00622ae3      {
00622aeb          int32_t ecx_1 = 0;
00622af3          int32_t ebx_1 = 0;
00622af7          int32_t ebp_1 = 0;
00622afa          void* result_1 = &var_1c0;
00622afa          
00622c91          do
00622c91          {
00622b01              int32_t i = 0;
00622b01              
00622b0c              if (arg3 > 0)
00622b0c              {
00622b15                  void* edi_1 = ecx_1;
00622b28                  int32_t i_3 = 0;
00622b3d                  esi = ebx_1;
00622b3d                  
00622bde                  do
00622bde                  {
00622b47                      uint32_t ebx_2 = ((uint32_t)*(uint8_t*)((char*)edi_1 + arg1));
00622b4b                      uint32_t ebp_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 1));
00622b50                      uint32_t ecx_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 2));
00622b74                      edi_1 += 3;
00622b77                      *(uint16_t*)((char*)result_1 + (esi << 1)) = ((int16_t)(((((ebx_2 * 0x1d) + (ebp_2 * 0x96)) + (ecx_2 * 0x4d)) - 0x7f80) >> 8));
00622b99                      *(uint16_t*)(((char*)result_1 + (esi << 1)) + 0x80) = ((int16_t)(((((ebx_2 << 7) + (ebp_2 * 0xffffffab)) + (ecx_2 * 0xffffffd5)) + 0x80) >> 8));
00622bbd                      *(uint16_t*)(((char*)result_1 + (esi << 1)) + 0x100) = ((int16_t)(((((ebx_2 * 0xffffffeb) + (ebp_2 * 0xffffff95)) + (ecx_2 << 7)) + 0x80) >> 8));
00622bc5                      esi += 1;
00622bcd                      i = (i_3 + 1);
00622bd7                      i_3 = i;
00622bde                  } while (i < arg3);
00622b0c              }
00622b0c              
00622c03              if (i < 8)
00622c03              {
00622c0c                  void* edi_2 = ((char*)result_1 + ebp_1);
00622c39                  esi = ((char*)result_1 + ((i + ebx_1) << 1));
00622c39                  
00622c6a                  do
00622c6a                  {
00622c45                      i += 1;
00622c46                      *(uint16_t*)esi = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) - 2);
00622c4e                      *(uint16_t*)((char*)esi + 0x80) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0x7e);
00622c5d                      *(uint16_t*)((char*)esi + 0x100) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0xfe);
00622c64                      esi += 2;
00622c6a                  } while (i < 8);
00622c03              }
00622c03              
00622c7a              ecx_1 += arg2;
00622c81              ebx_1 += 8;
00622c84              ebp_1 += 0x10;
00622c87              i_1 += 1;
00622c91          } while (i_1 < arg4);
00622c91          
00622c97          result = result_1;
00622ae3      }
00622ae3      
00622ca1      if (i_1 < 8)
00622ca1      {
00622caa          void* ecx_5 = ((char*)result + (i_1 * 0x10));
00622caa          
00622dbe          do
00622dbe          {
00622cb4              int16_t edi_7 = *(uint16_t*)((char*)ecx_5 + 0xfc);
00622cbb              esi = ((uint32_t)*(uint16_t*)((char*)ecx_5 - 2));
00622cbf              *(uint16_t*)ecx_5 = *(uint16_t*)((char*)ecx_5 - 0x10);
00622cc6              int16_t ebp_4 = *(uint16_t*)((char*)ecx_5 + 0x7e);
00622cca              *(uint16_t*)((char*)ecx_5 + 0x80) = *(uint16_t*)((char*)ecx_5 + 0x70);
00622cd8              i_1 += 1;
00622cd9              *(uint16_t*)((char*)ecx_5 + 0x100) = *(uint16_t*)((char*)ecx_5 + 0xf0);
00622ce4              *(uint16_t*)((char*)ecx_5 + 2) = *(uint16_t*)((char*)ecx_5 - 0xe);
00622cec              *(uint16_t*)((char*)ecx_5 + 0x82) = *(uint16_t*)((char*)ecx_5 + 0x72);
00622cfa              *(uint16_t*)((char*)ecx_5 + 0x102) = *(uint16_t*)((char*)ecx_5 + 0xf2);
00622d05              *(uint16_t*)((char*)ecx_5 + 4) = *(uint16_t*)((char*)ecx_5 - 0xc);
00622d0d              *(uint16_t*)((char*)ecx_5 + 0x84) = *(uint16_t*)((char*)ecx_5 + 0x74);
00622d1b              *(uint16_t*)((char*)ecx_5 + 0x104) = *(uint16_t*)((char*)ecx_5 + 0xf4);
00622d26              *(uint16_t*)((char*)ecx_5 + 6) = *(uint16_t*)((char*)ecx_5 - 0xa);
00622d2e              *(uint16_t*)((char*)ecx_5 + 0x86) = *(uint16_t*)((char*)ecx_5 + 0x76);
00622d3c              *(uint16_t*)((char*)ecx_5 + 0x106) = *(uint16_t*)((char*)ecx_5 + 0xf6);
00622d47              *(uint16_t*)((char*)ecx_5 + 8) = *(uint16_t*)((char*)ecx_5 - 8);
00622d4f              *(uint16_t*)((char*)ecx_5 + 0x88) = *(uint16_t*)((char*)ecx_5 + 0x78);
00622d5d              *(uint16_t*)((char*)ecx_5 + 0x108) = *(uint16_t*)((char*)ecx_5 + 0xf8);
00622d68              *(uint16_t*)((char*)ecx_5 + 0xa) = *(uint16_t*)((char*)ecx_5 - 6);
00622d70              *(uint16_t*)((char*)ecx_5 + 0x8a) = *(uint16_t*)((char*)ecx_5 + 0x7a);
00622d7e              *(uint16_t*)((char*)ecx_5 + 0x10a) = *(uint16_t*)((char*)ecx_5 + 0xfa);
00622d89              *(uint16_t*)((char*)ecx_5 + 0xc) = *(uint16_t*)((char*)ecx_5 - 4);
00622d91              *(uint16_t*)((char*)ecx_5 + 0x8c) = *(uint16_t*)((char*)ecx_5 + 0x7c);
00622d98              int16_t ebx_23 = *(uint16_t*)((char*)ecx_5 + 0xfe);
00622d9f              *(uint16_t*)((char*)ecx_5 + 0x10c) = edi_7;
00622da6              *(uint16_t*)((char*)ecx_5 + 0xe) = esi;
00622daa              *(uint16_t*)((char*)ecx_5 + 0x8e) = ebp_4;
00622db1              *(uint16_t*)((char*)ecx_5 + 0x10e) = ebx_23;
00622db8              ecx_5 += 0x10;
00622dbe          } while (i_1 < 8);
00622ca1      }
00622ca1      
00622f24      for (int32_t i_2 = 0; i_2 < 0x40; i_2 += 8)
00622f24      {
00622dd4          *(uint16_t*)(arg5 + (i_2 << 1)) = *(uint16_t*)((char*)result + (i_2 << 1));
00622de0          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x80) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x80);
00622df0          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x100) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x100);
00622dfd          *(uint16_t*)((arg5 + (i_2 << 1)) + 2) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 2);
00622e0a          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x82) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x82);
00622e1a          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x102) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x102);
00622e27          *(uint16_t*)((arg5 + (i_2 << 1)) + 4) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 4);
00622e34          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x84) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x84);
00622e44          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x104) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x104);
00622e51          *(uint16_t*)((arg5 + (i_2 << 1)) + 6) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 6);
00622e5e          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x86) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x86);
00622e6e          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x106) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x106);
00622e7b          *(uint16_t*)((arg5 + (i_2 << 1)) + 8) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 8);
00622e88          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x88) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x88);
00622e98          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x108) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x108);
00622ea5          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xa) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0xa);
00622eb2          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x8a) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x8a);
00622ec2          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x10a) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x10a);
00622ecf          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xc) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0xc);
00622edc          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x8c) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x8c);
00622eec          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x10c) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x10c);
00622ef9          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xe) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0xe);
00622f06          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x8e) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x8e);
00622f16          *(uint16_t*)((arg5 + (i_2 << 1)) + 0x10e) = *(uint16_t*)(((char*)result + (i_2 << 1)) + 0x10e);
00622f24      }
00622f24      
00622f34      return result;
00622ac0  }

00622f35                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

00622f40  int32_t _BGR_to_YCbCr_111_Full_MCU_PX(void* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

00622f40  {
00622f41      int32_t esi;
00622f41      int32_t var_8 = esi;
00622f44      int32_t var_14 = esi;
00622f4d      int16_t* ebx = arg3;
00622f51      int16_t* ecx = arg4;
00622f55      int16_t* edx = arg5;
00622f59      int32_t i = 0;
00622f5c      void* esi_2 = arg1;
00622f5c      
006232fb      do
006232fb      {
00622f83          *(uint16_t*)ebx = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 2)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 1)) * 0x96)) + (((uint32_t)*(uint8_t*)esi_2) * 0x1d)) - 0x7f80) >> 8));
00622faa          i += 1;
00622fab          ebx[1] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 5)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 4)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 3)) * 0x1d)) - 0x7f80) >> 8));
00622fd3          ebx[2] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 8)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 7)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 6)) * 0x1d)) - 0x7f80) >> 8));
00622ffb          ebx[3] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0xb)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xa)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 9)) * 0x1d)) - 0x7f80) >> 8));
00623023          ebx[4] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0xe)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xd)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xc)) * 0x1d)) - 0x7f80) >> 8));
0062304b          ebx[5] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x11)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x10)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xf)) * 0x1d)) - 0x7f80) >> 8));
00623073          ebx[6] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x14)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x13)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x12)) * 0x1d)) - 0x7f80) >> 8));
0062309b          ebx[7] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x17)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x16)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x15)) * 0x1d)) - 0x7f80) >> 8));
006230bf          ebx = &ebx[8];
006230c2          *(uint16_t*)ecx = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 2)) * 0xffffffd5) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 1)) * 0xffffffab)) + (((uint32_t)*(uint8_t*)esi_2) << 7)) + 0x80) >> 8));
006230e6          ecx[1] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 5)) * 0xffffffd5) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 4)) * 0xffffffab)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 3)) << 7)) + 0x80) >> 8));
0062310b          ecx[2] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 8)) * 0xffffffd5) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 7)) * 0xffffffab)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 6)) << 7)) + 0x80) >> 8));
00623130          ecx[3] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0xb)) * 0xffffffd5) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xa)) * 0xffffffab)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 9)) << 7)) + 0x80) >> 8));
00623155          ecx[4] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0xe)) * 0xffffffd5) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xd)) * 0xffffffab)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xc)) << 7)) + 0x80) >> 8));
0062317a          ecx[5] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x11)) * 0xffffffd5) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x10)) * 0xffffffab)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xf)) << 7)) + 0x80) >> 8));
0062319f          ecx[6] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x14)) * 0xffffffd5) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x13)) * 0xffffffab)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x12)) << 7)) + 0x80) >> 8));
006231c4          ecx[7] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x17)) * 0xffffffd5) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x16)) * 0xffffffab)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x15)) << 7)) + 0x80) >> 8));
006231e8          *(uint16_t*)edx = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 2)) << 7) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 1)) * 0xffffff95)) + (((uint32_t)*(uint8_t*)esi_2) * 0xffffffeb)) + 0x80) >> 8));
0062320c          ecx = &ecx[8];
0062320f          edx[1] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 5)) << 7) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 4)) * 0xffffff95)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 3)) * 0xffffffeb)) + 0x80) >> 8));
00623234          edx[2] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 8)) << 7) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 7)) * 0xffffff95)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 6)) * 0xffffffeb)) + 0x80) >> 8));
00623259          edx[3] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0xb)) << 7) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xa)) * 0xffffff95)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 9)) * 0xffffffeb)) + 0x80) >> 8));
0062327e          edx[4] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0xe)) << 7) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xd)) * 0xffffff95)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xc)) * 0xffffffeb)) + 0x80) >> 8));
006232a3          edx[5] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x11)) << 7) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x10)) * 0xffffff95)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0xf)) * 0xffffffeb)) + 0x80) >> 8));
006232c8          edx[6] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x14)) << 7) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x13)) * 0xffffff95)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x12)) * 0xffffffeb)) + 0x80) >> 8));
006232ed          edx[7] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)esi_2 + 0x17)) << 7) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x16)) * 0xffffff95)) + (((uint32_t)*(uint8_t*)((char*)esi_2 + 0x15)) * 0xffffffeb)) + 0x80) >> 8));
006232f1          edx = &edx[8];
006232f4          esi_2 += arg2;
006232fb      } while (i < 8);
006232fb      
00623308      return i;
00622f40  }

00623309                             8d b4 26 00 00 00 00                                                           ..&....

00623310  int64_t* _BGR_to_YCbCr_111_Full_MCU_M5(int64_t* arg1, int32_t arg2, int64_t* arg3, int64_t* arg4, int64_t* arg5)

00623310  {
0062333c      _own_bgr_to_ycbcr_111_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00623346      return arg1;
00623310  }

00623347                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00623350  void BGR_to_YCbCr_111_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

00623350  {
0062335b      void* edi = 8;
00623360      void* esi = 8;
00623365      int32_t DIBLineBytes = arg1->DIBLineBytes;
00623368      uint8_t* MCUBuf = arg1->MCUBuf;
0062336e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062336e      
00623386      if ((arg1->numxMCUs - 1) != arg2)
006233c5          arg1->state.DIB_ptr = &DIB_ptr[0x18];
00623386      else
00623386      {
0062338f          int32_t eax_5;
0062338f          int32_t edx_1;
0062338f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062338f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
00623399          void* eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 7) ^ edx_1) - edx_1);
00623399          
0062339d          if (eax_10 != 0)
0062339f              edi = eax_10;
0062339f          
006233b6          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
00623386      }
00623386      
006233d9      if (arg3 == (arg1->numyMCUs - 1))
006233d9      {
006233e2          int32_t eax_19;
006233e2          int32_t edx_7;
006233e2          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
006233e2          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
006233e7          int32_t eax_22;
006233e7          int32_t edx_8;
006233e7          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
006233e7          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
006233f1          void* eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
006233f1          
006233f5          if (eax_27 != 0)
006233f7              esi = eax_27;
006233d9      }
006233d9      
00623421      if ((edi != 8 || esi != 8))
00623421      {
00623411          sub_622ac0(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062341d          return;
00623421      }
00623421      
00623446      *(uint32_t*)(arg1->state.ctx + 0x74)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x80], &MCUBuf[0x100]);
00623350  }

00623451                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

00623460  void* sub_623460(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00623460  {
0062347c      void var_640;
0062347c      void* eax = &var_640;
0062347f      int32_t i_1 = 0;
0062347f      
00623483      if (arg4 > 0)
00623483      {
0062348b          int32_t ecx_1 = 0;
00623490          int32_t ebx_1 = 0;
00623495          int32_t ebp_1 = 0;
00623498          void* var_24_1 = &var_640;
00623498          
00623634          do
00623634          {
0062349f              int32_t i = 0;
0062349f              
006234aa              if (arg3 > 0)
006234aa              {
006234b3                  void* edi_1 = ecx_1;
006234c6                  int32_t i_3 = 0;
006234dc                  int32_t esi_3 = ebx_1;
006234dc                  
00623577                  do
00623577                  {
006234e7                      uint32_t ebx_2 = ((uint32_t)*(uint8_t*)((char*)edi_1 + arg1));
006234eb                      uint32_t ebp_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 1));
006234f0                      uint32_t ecx_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 2));
00623514                      edi_1 += 3;
00623517                      *(uint16_t*)((char*)var_24_1 + (esi_3 << 1)) = ((int16_t)(((((ebx_2 * 0x4d) + (ebp_2 * 0x96)) + (ecx_2 * 0x1d)) - 0x7f80) >> 8));
00623539                      *(uint16_t*)(((char*)var_24_1 + (esi_3 << 1)) + 0x200) = ((int16_t)(((((ebx_2 * 0xffffffd5) + (ebp_2 * 0xffffffab)) + (ecx_2 << 7)) + 0x80) >> 8));
00623556                      *(uint16_t*)(((char*)var_24_1 + (esi_3 << 1)) + 0x400) = ((int16_t)(((((ebx_2 << 7) + (ebp_2 * 0xffffff95)) + (ecx_2 * 0xffffffeb)) + 0x80) >> 8));
0062355e                      esi_3 += 1;
00623566                      i = (i_3 + 1);
00623570                      i_3 = i;
00623577                  } while (i < arg3);
006234aa              }
006234aa              
0062359c              if (i < 0x10)
0062359c              {
006235a9                  void* edi_2 = ((char*)var_24_1 + ebp_1);
006235d5                  void* esi_6 = ((char*)var_24_1 + ((i + ebx_1) << 1));
006235d5                  
0062360d                  do
0062360d                  {
006235e5                      i += 1;
006235e6                      *(uint16_t*)esi_6 = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) - 2);
006235f1                      *(uint16_t*)((char*)esi_6 + 0x200) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0x1fe);
00623600                      *(uint16_t*)((char*)esi_6 + 0x400) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0x3fe);
00623607                      esi_6 += 2;
0062360d                  } while (i < 0x10);
0062359c              }
0062359c              
0062361d              ecx_1 += arg2;
00623624              ebx_1 += 0x10;
00623627              ebp_1 += 0x20;
0062362a              i_1 += 1;
00623634          } while (i_1 < arg4);
00623634          
0062363a          eax = var_24_1;
00623483      }
00623483      
00623644      if (i_1 < 0x10)
00623644      {
0062364f          void* ecx_5 = ((char*)eax + (i_1 << 5));
0062364f          
00623898          do
00623898          {
00623656              int16_t edi_8 = *(uint16_t*)((char*)ecx_5 + 0x3fc);
0062365d              int16_t esi_7 = *(uint16_t*)((char*)ecx_5 - 2);
00623661              *(uint16_t*)ecx_5 = *(uint16_t*)((char*)ecx_5 - 0x20);
0062366b              int16_t ebp_4 = *(uint16_t*)((char*)ecx_5 + 0x1fe);
00623672              *(uint16_t*)((char*)ecx_5 + 0x200) = *(uint16_t*)((char*)ecx_5 + 0x1e0);
00623680              i_1 += 1;
00623681              *(uint16_t*)((char*)ecx_5 + 0x400) = *(uint16_t*)((char*)ecx_5 + 0x3e0);
0062368c              *(uint16_t*)((char*)ecx_5 + 2) = *(uint16_t*)((char*)ecx_5 - 0x1e);
00623697              *(uint16_t*)((char*)ecx_5 + 0x202) = *(uint16_t*)((char*)ecx_5 + 0x1e2);
006236a5              *(uint16_t*)((char*)ecx_5 + 0x402) = *(uint16_t*)((char*)ecx_5 + 0x3e2);
006236b0              *(uint16_t*)((char*)ecx_5 + 4) = *(uint16_t*)((char*)ecx_5 - 0x1c);
006236bb              *(uint16_t*)((char*)ecx_5 + 0x204) = *(uint16_t*)((char*)ecx_5 + 0x1e4);
006236c9              *(uint16_t*)((char*)ecx_5 + 0x404) = *(uint16_t*)((char*)ecx_5 + 0x3e4);
006236d4              *(uint16_t*)((char*)ecx_5 + 6) = *(uint16_t*)((char*)ecx_5 - 0x1a);
006236df              *(uint16_t*)((char*)ecx_5 + 0x206) = *(uint16_t*)((char*)ecx_5 + 0x1e6);
006236ed              *(uint16_t*)((char*)ecx_5 + 0x406) = *(uint16_t*)((char*)ecx_5 + 0x3e6);
006236f8              *(uint16_t*)((char*)ecx_5 + 8) = *(uint16_t*)((char*)ecx_5 - 0x18);
00623703              *(uint16_t*)((char*)ecx_5 + 0x208) = *(uint16_t*)((char*)ecx_5 + 0x1e8);
00623711              *(uint16_t*)((char*)ecx_5 + 0x408) = *(uint16_t*)((char*)ecx_5 + 0x3e8);
0062371c              *(uint16_t*)((char*)ecx_5 + 0xa) = *(uint16_t*)((char*)ecx_5 - 0x16);
00623727              *(uint16_t*)((char*)ecx_5 + 0x20a) = *(uint16_t*)((char*)ecx_5 + 0x1ea);
00623735              *(uint16_t*)((char*)ecx_5 + 0x40a) = *(uint16_t*)((char*)ecx_5 + 0x3ea);
00623740              *(uint16_t*)((char*)ecx_5 + 0xc) = *(uint16_t*)((char*)ecx_5 - 0x14);
0062374b              *(uint16_t*)((char*)ecx_5 + 0x20c) = *(uint16_t*)((char*)ecx_5 + 0x1ec);
00623759              *(uint16_t*)((char*)ecx_5 + 0x40c) = *(uint16_t*)((char*)ecx_5 + 0x3ec);
00623764              *(uint16_t*)((char*)ecx_5 + 0xe) = *(uint16_t*)((char*)ecx_5 - 0x12);
0062376f              *(uint16_t*)((char*)ecx_5 + 0x20e) = *(uint16_t*)((char*)ecx_5 + 0x1ee);
0062377d              *(uint16_t*)((char*)ecx_5 + 0x40e) = *(uint16_t*)((char*)ecx_5 + 0x3ee);
00623788              *(uint16_t*)((char*)ecx_5 + 0x10) = *(uint16_t*)((char*)ecx_5 - 0x10);
00623793              *(uint16_t*)((char*)ecx_5 + 0x210) = *(uint16_t*)((char*)ecx_5 + 0x1f0);
006237a1              *(uint16_t*)((char*)ecx_5 + 0x410) = *(uint16_t*)((char*)ecx_5 + 0x3f0);
006237ac              *(uint16_t*)((char*)ecx_5 + 0x12) = *(uint16_t*)((char*)ecx_5 - 0xe);
006237b7              *(uint16_t*)((char*)ecx_5 + 0x212) = *(uint16_t*)((char*)ecx_5 + 0x1f2);
006237c5              *(uint16_t*)((char*)ecx_5 + 0x412) = *(uint16_t*)((char*)ecx_5 + 0x3f2);
006237d0              *(uint16_t*)((char*)ecx_5 + 0x14) = *(uint16_t*)((char*)ecx_5 - 0xc);
006237db              *(uint16_t*)((char*)ecx_5 + 0x214) = *(uint16_t*)((char*)ecx_5 + 0x1f4);
006237e9              *(uint16_t*)((char*)ecx_5 + 0x414) = *(uint16_t*)((char*)ecx_5 + 0x3f4);
006237f4              *(uint16_t*)((char*)ecx_5 + 0x16) = *(uint16_t*)((char*)ecx_5 - 0xa);
006237ff              *(uint16_t*)((char*)ecx_5 + 0x216) = *(uint16_t*)((char*)ecx_5 + 0x1f6);
0062380d              *(uint16_t*)((char*)ecx_5 + 0x416) = *(uint16_t*)((char*)ecx_5 + 0x3f6);
00623818              *(uint16_t*)((char*)ecx_5 + 0x18) = *(uint16_t*)((char*)ecx_5 - 8);
00623823              *(uint16_t*)((char*)ecx_5 + 0x218) = *(uint16_t*)((char*)ecx_5 + 0x1f8);
00623831              *(uint16_t*)((char*)ecx_5 + 0x418) = *(uint16_t*)((char*)ecx_5 + 0x3f8);
0062383c              *(uint16_t*)((char*)ecx_5 + 0x1a) = *(uint16_t*)((char*)ecx_5 - 6);
00623847              *(uint16_t*)((char*)ecx_5 + 0x21a) = *(uint16_t*)((char*)ecx_5 + 0x1fa);
00623855              *(uint16_t*)((char*)ecx_5 + 0x41a) = *(uint16_t*)((char*)ecx_5 + 0x3fa);
00623860              *(uint16_t*)((char*)ecx_5 + 0x1c) = *(uint16_t*)((char*)ecx_5 - 4);
0062386b              *(uint16_t*)((char*)ecx_5 + 0x21c) = *(uint16_t*)((char*)ecx_5 + 0x1fc);
00623872              int16_t ebx_49 = *(uint16_t*)((char*)ecx_5 + 0x3fe);
00623879              *(uint16_t*)((char*)ecx_5 + 0x41c) = edi_8;
00623880              *(uint16_t*)((char*)ecx_5 + 0x1e) = esi_7;
00623884              *(uint16_t*)((char*)ecx_5 + 0x21e) = ebp_4;
0062388b              *(uint16_t*)((char*)ecx_5 + 0x41e) = ebx_49;
00623892              ecx_5 += 0x20;
00623898          } while (i_1 < 0x10);
00623644      }
00623644      
0062389e      int32_t edx_9 = 0;
006238a0      int32_t ecx_6 = 0;
00623997      void* result;
00623997      
00623997      for (int32_t i_2 = 0; i_2 < 0x100; i_2 += 0x20)
00623997      {
006238c0          void* ebp_6 = ((char*)eax + (i_2 << 1));
006238c3          result = (((char*)eax + (i_2 << 1)) + 0x20);
006238d5          void* esi_9 = ((char*)eax + (ecx_6 << 1));
006238d9          int16_t* edi_10 = (arg5 + (edx_9 << 1));
006238d9          
00623974          do
00623974          {
006238e3              *(uint16_t*)edi_10 = *(uint16_t*)esi_9;
006238ea              edi_10[0x40] = *(uint16_t*)((char*)esi_9 + 0x10);
006238f8              edi_10[0x80] = *(uint16_t*)((char*)esi_9 + 0x100);
006238ff              int16_t ecx_10 = *(uint16_t*)((char*)esi_9 + 0x110);
00623906              esi_9 += 2;
00623909              edi_10[0xc0] = ecx_10;
00623937              edi_10[0x100] = ((int16_t)(((((((int32_t)*(uint16_t*)((char*)ebp_6 + 0x200)) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x202))) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x220))) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x222))) + 2) >> 2));
00623965              edi_10[0x140] = ((int16_t)(((((((int32_t)*(uint16_t*)((char*)ebp_6 + 0x400)) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x402))) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x420))) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x422))) + 2) >> 2));
0062396c              edi_10 = &edi_10[1];
0062396f              ebp_6 += 4;
00623974          } while (result > ebp_6);
00623974          
00623988          edx_9 += 8;
0062398b          ecx_6 += 0x10;
00623997      }
00623997      
006239a7      return result;
00623460  }

006239a8                          90 8d b4 26 00 00 00 00                                                          ...&....

006239b0  int32_t sub_6239b0(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

006239b0  {
006239b7      char* edx = arg1;
006239c5      int16_t* ecx = arg3;
006239dc      int32_t i_1 = 0;
006239e0      int16_t* var_18 = arg5;
006239e4      int16_t* var_14 = arg4;
006243bc      int32_t i;
006243bc      
006243bc      do
006243bc      {
00623a13          *(uint16_t*)ecx = ((int16_t)(((((((uint32_t)*(uint8_t*)edx) * 0x4d) + (((uint32_t)edx[1]) * 0x96)) + (((uint32_t)edx[2]) * 0x1d)) - 0x7f80) >> 8));
00623a3a          ecx[1] = ((int16_t)(((((((uint32_t)edx[3]) * 0x4d) + (((uint32_t)edx[4]) * 0x96)) + (((uint32_t)edx[5]) * 0x1d)) - 0x7f80) >> 8));
00623a62          ecx[2] = ((int16_t)(((((((uint32_t)edx[6]) * 0x4d) + (((uint32_t)edx[7]) * 0x96)) + (((uint32_t)edx[8]) * 0x1d)) - 0x7f80) >> 8));
00623a8a          ecx[3] = ((int16_t)(((((((uint32_t)edx[9]) * 0x4d) + (((uint32_t)edx[0xa]) * 0x96)) + (((uint32_t)edx[0xb]) * 0x1d)) - 0x7f80) >> 8));
00623ab2          ecx[4] = ((int16_t)(((((((uint32_t)edx[0xc]) * 0x4d) + (((uint32_t)edx[0xd]) * 0x96)) + (((uint32_t)edx[0xe]) * 0x1d)) - 0x7f80) >> 8));
00623ada          ecx[5] = ((int16_t)(((((((uint32_t)edx[0xf]) * 0x4d) + (((uint32_t)edx[0x10]) * 0x96)) + (((uint32_t)edx[0x11]) * 0x1d)) - 0x7f80) >> 8));
00623b02          ecx[6] = ((int16_t)(((((((uint32_t)edx[0x12]) * 0x4d) + (((uint32_t)edx[0x13]) * 0x96)) + (((uint32_t)edx[0x14]) * 0x1d)) - 0x7f80) >> 8));
00623b2a          ecx[7] = ((int16_t)(((((((uint32_t)edx[0x15]) * 0x4d) + (((uint32_t)edx[0x16]) * 0x96)) + (((uint32_t)edx[0x17]) * 0x1d)) - 0x7f80) >> 8));
00623b52          ecx[0x40] = ((int16_t)(((((((uint32_t)edx[0x18]) * 0x4d) + (((uint32_t)edx[0x19]) * 0x96)) + (((uint32_t)edx[0x1a]) * 0x1d)) - 0x7f80) >> 8));
00623b7d          ecx[0x41] = ((int16_t)(((((((uint32_t)edx[0x1b]) * 0x4d) + (((uint32_t)edx[0x1c]) * 0x96)) + (((uint32_t)edx[0x1d]) * 0x1d)) - 0x7f80) >> 8));
00623ba8          ecx[0x42] = ((int16_t)(((((((uint32_t)edx[0x1e]) * 0x4d) + (((uint32_t)edx[0x1f]) * 0x96)) + (((uint32_t)edx[0x20]) * 0x1d)) - 0x7f80) >> 8));
00623bd3          ecx[0x43] = ((int16_t)(((((((uint32_t)edx[0x21]) * 0x4d) + (((uint32_t)edx[0x22]) * 0x96)) + (((uint32_t)edx[0x23]) * 0x1d)) - 0x7f80) >> 8));
00623bfe          ecx[0x44] = ((int16_t)(((((((uint32_t)edx[0x24]) * 0x4d) + (((uint32_t)edx[0x25]) * 0x96)) + (((uint32_t)edx[0x26]) * 0x1d)) - 0x7f80) >> 8));
00623c29          ecx[0x45] = ((int16_t)(((((((uint32_t)edx[0x27]) * 0x4d) + (((uint32_t)edx[0x28]) * 0x96)) + (((uint32_t)edx[0x29]) * 0x1d)) - 0x7f80) >> 8));
00623c54          ecx[0x46] = ((int16_t)(((((((uint32_t)edx[0x2a]) * 0x4d) + (((uint32_t)edx[0x2b]) * 0x96)) + (((uint32_t)edx[0x2c]) * 0x1d)) - 0x7f80) >> 8));
00623c7f          ecx[0x47] = ((int16_t)(((((((uint32_t)edx[0x2d]) * 0x4d) + (((uint32_t)edx[0x2e]) * 0x96)) + (((uint32_t)edx[0x2f]) * 0x1d)) - 0x7f80) >> 8));
00623c8d          uint32_t eax_114 = (((uint32_t)*(uint8_t*)edx) + ((uint32_t)edx[3]));
00623c97          uint32_t ebp_2 = (((uint32_t)edx[1]) + ((uint32_t)edx[4]));
00623ca5          uint32_t ebp_4 = (((uint32_t)edx[2]) + ((uint32_t)edx[5]));
00623cb3          uint32_t ebp_6 = (((uint32_t)edx[6]) + ((uint32_t)edx[9]));
00623cc1          uint32_t ebp_8 = (((uint32_t)edx[7]) + ((uint32_t)edx[0xa]));
00623ccf          uint32_t ebp_10 = (((uint32_t)edx[8]) + ((uint32_t)edx[0xb]));
00623cdd          uint32_t ebp_12 = (((uint32_t)edx[0xc]) + ((uint32_t)edx[0xf]));
00623ceb          uint32_t ebp_14 = (((uint32_t)edx[0xd]) + ((uint32_t)edx[0x10]));
00623cf9          uint32_t ebp_16 = (((uint32_t)edx[0xe]) + ((uint32_t)edx[0x11]));
00623d07          uint32_t ebp_18 = (((uint32_t)edx[0x12]) + ((uint32_t)edx[0x15]));
00623d15          uint32_t ebp_20 = (((uint32_t)edx[0x13]) + ((uint32_t)edx[0x16]));
00623d23          uint32_t ebp_22 = (((uint32_t)edx[0x14]) + ((uint32_t)edx[0x17]));
00623d31          uint32_t ebp_24 = (((uint32_t)edx[0x18]) + ((uint32_t)edx[0x1b]));
00623d3f          uint32_t ebp_26 = (((uint32_t)edx[0x19]) + ((uint32_t)edx[0x1c]));
00623d4d          uint32_t ebp_28 = (((uint32_t)edx[0x1a]) + ((uint32_t)edx[0x1d]));
00623d5b          uint32_t ebp_30 = (((uint32_t)edx[0x1e]) + ((uint32_t)edx[0x21]));
00623d69          uint32_t ebp_32 = (((uint32_t)edx[0x1f]) + ((uint32_t)edx[0x22]));
00623d77          uint32_t ebp_34 = (((uint32_t)edx[0x20]) + ((uint32_t)edx[0x23]));
00623d85          uint32_t ebp_36 = (((uint32_t)edx[0x24]) + ((uint32_t)edx[0x27]));
00623d93          uint32_t ebp_38 = (((uint32_t)edx[0x25]) + ((uint32_t)edx[0x28]));
00623da1          uint32_t ebp_40 = (((uint32_t)edx[0x26]) + ((uint32_t)edx[0x29]));
00623daf          uint32_t ebp_42 = (((uint32_t)edx[0x2a]) + ((uint32_t)edx[0x2d]));
00623dbd          uint32_t ebp_44 = (((uint32_t)edx[0x2b]) + ((uint32_t)edx[0x2e]));
00623dcb          uint32_t ebp_46 = (((uint32_t)edx[0x2c]) + ((uint32_t)edx[0x2f]));
00623dd1          void* edx_1 = &edx[arg2];
00623dfb          ecx[8] = ((int16_t)(((((((uint32_t)*(uint8_t*)edx_1) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 1)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 2)) * 0x1d)) - 0x7f80) >> 8));
00623e23          ecx[9] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 3)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 4)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 5)) * 0x1d)) - 0x7f80) >> 8));
00623e4b          ecx[0xa] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 6)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 7)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 8)) * 0x1d)) - 0x7f80) >> 8));
00623e73          ecx[0xb] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 9)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0xa)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0xb)) * 0x1d)) - 0x7f80) >> 8));
00623e9b          ecx[0xc] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xc)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0xd)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0xe)) * 0x1d)) - 0x7f80) >> 8));
00623ec3          ecx[0xd] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xf)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x10)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x11)) * 0x1d)) - 0x7f80) >> 8));
00623eeb          ecx[0xe] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x12)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x13)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x14)) * 0x1d)) - 0x7f80) >> 8));
00623f13          ecx[0xf] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x15)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x16)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x17)) * 0x1d)) - 0x7f80) >> 8));
00623f3b          ecx[0x48] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x18)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x19)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1a)) * 0x1d)) - 0x7f80) >> 8));
00623f66          ecx[0x49] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1b)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1c)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1d)) * 0x1d)) - 0x7f80) >> 8));
00623f91          ecx[0x4a] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1e)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1f)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x20)) * 0x1d)) - 0x7f80) >> 8));
00623fbc          ecx[0x4b] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x21)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x22)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x23)) * 0x1d)) - 0x7f80) >> 8));
00623fe7          ecx[0x4c] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x24)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x25)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x26)) * 0x1d)) - 0x7f80) >> 8));
00624012          ecx[0x4d] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x27)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x28)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x29)) * 0x1d)) - 0x7f80) >> 8));
0062403d          ecx[0x4e] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2a)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2b)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2c)) * 0x1d)) - 0x7f80) >> 8));
00624068          ecx[0x4f] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2d)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2e)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2f)) * 0x1d)) - 0x7f80) >> 8));
00624078          uint32_t esi_6 = ((((uint32_t)*(uint8_t*)edx_1) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 3))) + eax_114);
0062408c          uint32_t ebp_103 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 1)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 4))) + ebp_2);
00624095          uint32_t ebx_146 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 2)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 5))) + ebp_4);
006240b4          *(uint16_t*)var_14 = ((int16_t)(((((esi_6 * 0xffffffd5) + (ebp_103 * 0xffffffab)) + (ebx_146 << 7)) + 0x200) >> 0xa));
006240cd          ecx = &ecx[0x10];
006240d0          *(uint16_t*)var_18 = ((int16_t)(((((esi_6 << 7) + (ebp_103 * 0xffffff95)) + (ebx_146 * 0xffffffeb)) + 0x200) >> 0xa));
006240e5          uint32_t esi_11 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 6)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 9))) + ebp_6);
006240ef          uint32_t ebp_106 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 7)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0xa))) + ebp_8);
006240f9          uint32_t ebx_150 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 8)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0xb))) + ebp_10);
00624118          var_14[1] = ((int16_t)(((((esi_11 * 0xffffffd5) + (ebp_106 * 0xffffffab)) + (ebx_150 << 7)) + 0x200) >> 0xa));
00624135          var_18[1] = ((int16_t)(((((esi_11 << 7) + (ebp_106 * 0xffffff95)) + (ebx_150 * 0xffffffeb)) + 0x200) >> 0xa));
0062414b          uint32_t esi_16 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xc)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0xf))) + ebp_12);
00624155          uint32_t ebp_109 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xd)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x10))) + ebp_14);
0062415f          uint32_t ebx_154 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xe)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x11))) + ebp_16);
0062417e          var_14[2] = ((int16_t)(((((esi_16 * 0xffffffd5) + (ebp_109 * 0xffffffab)) + (ebx_154 << 7)) + 0x200) >> 0xa));
0062419b          var_18[2] = ((int16_t)(((((esi_16 << 7) + (ebp_109 * 0xffffff95)) + (ebx_154 * 0xffffffeb)) + 0x200) >> 0xa));
006241b1          uint32_t esi_21 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x12)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x15))) + ebp_18);
006241bb          uint32_t ebp_112 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x13)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x16))) + ebp_20);
006241c5          uint32_t ebx_158 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x14)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x17))) + ebp_22);
006241e4          var_14[3] = ((int16_t)(((((esi_21 * 0xffffffd5) + (ebp_112 * 0xffffffab)) + (ebx_158 << 7)) + 0x200) >> 0xa));
00624201          var_18[3] = ((int16_t)(((((esi_21 << 7) + (ebp_112 * 0xffffff95)) + (ebx_158 * 0xffffffeb)) + 0x200) >> 0xa));
00624217          uint32_t esi_26 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x18)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1b))) + ebp_24);
00624221          uint32_t ebp_115 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x19)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1c))) + ebp_26);
0062422b          uint32_t ebx_162 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1a)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1d))) + ebp_28);
0062424a          var_14[4] = ((int16_t)(((((esi_26 * 0xffffffd5) + (ebp_115 * 0xffffffab)) + (ebx_162 << 7)) + 0x200) >> 0xa));
00624267          var_18[4] = ((int16_t)(((((esi_26 << 7) + (ebp_115 * 0xffffff95)) + (ebx_162 * 0xffffffeb)) + 0x200) >> 0xa));
0062427d          uint32_t esi_31 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1e)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x21))) + ebp_30);
00624287          uint32_t ebp_118 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1f)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x22))) + ebp_32);
00624291          uint32_t ebx_166 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x20)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x23))) + ebp_34);
006242b0          var_14[5] = ((int16_t)(((((esi_31 * 0xffffffd5) + (ebp_118 * 0xffffffab)) + (ebx_166 << 7)) + 0x200) >> 0xa));
006242cd          var_18[5] = ((int16_t)(((((esi_31 << 7) + (ebp_118 * 0xffffff95)) + (ebx_166 * 0xffffffeb)) + 0x200) >> 0xa));
006242e3          uint32_t ebp_121 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x24)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x27))) + ebp_36);
006242ed          uint32_t ebx_170 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x25)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x28))) + ebp_38);
006242f7          uint32_t eax_184 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x26)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x29))) + ebp_40);
00624316          var_14[6] = ((int16_t)(((((ebp_121 * 0xffffffd5) + (ebx_170 * 0xffffffab)) + (eax_184 << 7)) + 0x200) >> 0xa));
00624333          var_18[6] = ((int16_t)(((((ebp_121 << 7) + (ebx_170 * 0xffffff95)) + (eax_184 * 0xffffffeb)) + 0x200) >> 0xa));
00624349          uint32_t esi_42 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2a)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2d))) + ebp_42);
00624353          uint32_t ebp_126 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2b)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2e))) + ebp_44);
0062435d          uint32_t ebx_175 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2c)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2f))) + ebp_46);
0062437c          var_14[7] = ((int16_t)(((((esi_42 * 0xffffffd5) + (ebp_126 * 0xffffffab)) + (ebx_175 << 7)) + 0x200) >> 0xa));
00624399          var_18[7] = ((int16_t)(((((esi_42 << 7) + (ebp_126 * 0xffffff95)) + (ebx_175 * 0xffffffeb)) + 0x200) >> 0xa));
006243a1          i = (i_1 + 2);
006243a4          var_14 = &var_14[8];
006243a9          var_18 = &var_18[8];
006243ae          edx = ((char*)edx_1 + arg2);
006243b8          i_1 = i;
006243bc      } while (i < 8);
006243bc      
006243c9      return i;
006239b0  }

006243ca                                8d b6 00 00 00 00                                                            ......

006243d0  int32_t _RGB_to_YCbCr_411_Full_MCU_PX(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

006243d0  {
006243fe      sub_6239b0(arg1, arg2, arg3, arg4, arg5);
00624435      return sub_6239b0(&arg1[(arg2 << 3)], arg2, &arg3[0x80], &arg4[0x20], &arg5[0x20]);
006243d0  }

00624436                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

00624440  void* _RGB_to_YCbCr_411_Full_MCU_M5(int64_t* arg1, uint64_t* arg2, uint8_t (* arg3)[0x8], uint8_t (* arg4)[0x8])

00624440  {
00624466      _own_rgb_to_ycbcr_411_one_quarter_mcu_m5(arg1, arg2, arg3, arg4);
00624486      _own_rgb_to_ycbcr_411_one_quarter_mcu_m5(&arg1[3], arg2, &arg3[0x10], &arg4[1]);
0062448b      int64_t* edi_1 = &arg1[arg2];
006244a6      _own_rgb_to_ycbcr_411_one_quarter_mcu_m5(edi_1, arg2, &arg3[0x20], &arg4[8]);
006244c6      _own_rgb_to_ycbcr_411_one_quarter_mcu_m5(&edi_1[3], arg2, &arg3[0x30], &arg4[9]);
006244d2      return &arg3[0x30];
00624440  }

006244d3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

006244e0  void RGB_to_YCbCr_411_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

006244e0  {
006244eb      int32_t edi = 0x10;
006244f0      int32_t esi = 0x10;
006244f5      int32_t DIBLineBytes = arg1->DIBLineBytes;
006244f8      uint8_t* MCUBuf = arg1->MCUBuf;
006244fe      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
006244fe      
00624516      if ((arg1->numxMCUs - 1) != arg2)
00624554          arg1->state.DIB_ptr = &DIB_ptr[0x30];
00624516      else
00624516      {
0062451f          int32_t eax_5;
0062451f          int32_t edx_1;
0062451f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062451f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
00624529          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
00624529          
0062452d          if (eax_10 != 0)
0062452f              edi = eax_10;
0062452f          
00624545          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 4) + 0x10) * DIBLineBytes)];
00624516      }
00624516      
00624568      if (arg3 == (arg1->numyMCUs - 1))
00624568      {
00624571          int32_t eax_22;
00624571          int32_t edx_5;
00624571          edx_5 = HIGHD(((int64_t)arg1->DIBHeight));
00624571          eax_22 = LOWD(((int64_t)arg1->DIBHeight));
00624576          int32_t eax_25;
00624576          int32_t edx_6;
00624576          edx_6 = HIGHD(((int64_t)((eax_22 ^ edx_5) - edx_5)));
00624576          eax_25 = LOWD(((int64_t)((eax_22 ^ edx_5) - edx_5)));
00624580          int32_t eax_30 = (((((eax_25 ^ edx_6) - edx_6) & 0xf) ^ edx_6) - edx_6);
00624580          
00624584          if (eax_30 != 0)
00624586              esi = eax_30;
00624568      }
00624568      
006245b0      if ((edi != 0x10 || esi != 0x10))
006245b0      {
006245a0          sub_623460(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
006245ac          return;
006245b0      }
006245b0      
006245d5      *(uint32_t*)(arg1->state.ctx + 0x70)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x200], &MCUBuf[0x280]);
006244e0  }


006245e0  void* sub_6245e0(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

006245e0  {
006245fc      void var_640;
006245fc      void* eax = &var_640;
006245ff      int32_t i_1 = 0;
006245ff      
00624603      if (arg4 > 0)
00624603      {
0062460b          int32_t ecx_1 = 0;
00624610          int32_t ebx_1 = 0;
00624615          int32_t ebp_1 = 0;
00624618          void* var_24_1 = &var_640;
00624618          
006247b4          do
006247b4          {
0062461f              int32_t i = 0;
0062461f              
0062462a              if (arg3 > 0)
0062462a              {
00624633                  void* edi_1 = ecx_1;
00624646                  int32_t i_3 = 0;
0062465c                  int32_t esi_3 = ebx_1;
0062465c                  
006246fe                  do
006246fe                  {
00624667                      uint32_t ebx_2 = ((uint32_t)*(uint8_t*)((char*)edi_1 + arg1));
0062466b                      uint32_t ebp_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 1));
00624670                      uint32_t ecx_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 2));
00624694                      edi_1 += 3;
00624697                      *(uint16_t*)((char*)var_24_1 + (esi_3 << 1)) = ((int16_t)(((((ebx_2 * 0x1d) + (ebp_2 * 0x96)) + (ecx_2 * 0x4d)) - 0x7f80) >> 8));
006246b9                      *(uint16_t*)(((char*)var_24_1 + (esi_3 << 1)) + 0x200) = ((int16_t)(((((ebx_2 << 7) + (ebp_2 * 0xffffffab)) + (ecx_2 * 0xffffffd5)) + 0x80) >> 8));
006246dd                      *(uint16_t*)(((char*)var_24_1 + (esi_3 << 1)) + 0x400) = ((int16_t)(((((ebx_2 * 0xffffffeb) + (ebp_2 * 0xffffff95)) + (ecx_2 << 7)) + 0x80) >> 8));
006246e5                      esi_3 += 1;
006246ed                      i = (i_3 + 1);
006246f7                      i_3 = i;
006246fe                  } while (i < arg3);
0062462a              }
0062462a              
00624723              if (i < 0x10)
00624723              {
00624730                  void* edi_2 = ((char*)var_24_1 + ebp_1);
0062475c                  void* esi_6 = ((char*)var_24_1 + ((i + ebx_1) << 1));
0062475c                  
0062478d                  do
0062478d                  {
00624765                      i += 1;
00624766                      *(uint16_t*)esi_6 = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) - 2);
00624771                      *(uint16_t*)((char*)esi_6 + 0x200) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0x1fe);
00624780                      *(uint16_t*)((char*)esi_6 + 0x400) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0x3fe);
00624787                      esi_6 += 2;
0062478d                  } while (i < 0x10);
00624723              }
00624723              
0062479d              ecx_1 += arg2;
006247a4              ebx_1 += 0x10;
006247a7              ebp_1 += 0x20;
006247aa              i_1 += 1;
006247b4          } while (i_1 < arg4);
006247b4          
006247ba          eax = var_24_1;
00624603      }
00624603      
006247c4      if (i_1 < 0x10)
006247c4      {
006247cf          void* ecx_6 = ((char*)eax + (i_1 << 5));
006247cf          
00624a18          do
00624a18          {
006247d6              int16_t edi_7 = *(uint16_t*)((char*)ecx_6 + 0x3fc);
006247dd              int16_t esi_7 = *(uint16_t*)((char*)ecx_6 - 2);
006247e1              *(uint16_t*)ecx_6 = *(uint16_t*)((char*)ecx_6 - 0x20);
006247eb              int16_t ebp_4 = *(uint16_t*)((char*)ecx_6 + 0x1fe);
006247f2              *(uint16_t*)((char*)ecx_6 + 0x200) = *(uint16_t*)((char*)ecx_6 + 0x1e0);
00624800              i_1 += 1;
00624801              *(uint16_t*)((char*)ecx_6 + 0x400) = *(uint16_t*)((char*)ecx_6 + 0x3e0);
0062480c              *(uint16_t*)((char*)ecx_6 + 2) = *(uint16_t*)((char*)ecx_6 - 0x1e);
00624817              *(uint16_t*)((char*)ecx_6 + 0x202) = *(uint16_t*)((char*)ecx_6 + 0x1e2);
00624825              *(uint16_t*)((char*)ecx_6 + 0x402) = *(uint16_t*)((char*)ecx_6 + 0x3e2);
00624830              *(uint16_t*)((char*)ecx_6 + 4) = *(uint16_t*)((char*)ecx_6 - 0x1c);
0062483b              *(uint16_t*)((char*)ecx_6 + 0x204) = *(uint16_t*)((char*)ecx_6 + 0x1e4);
00624849              *(uint16_t*)((char*)ecx_6 + 0x404) = *(uint16_t*)((char*)ecx_6 + 0x3e4);
00624854              *(uint16_t*)((char*)ecx_6 + 6) = *(uint16_t*)((char*)ecx_6 - 0x1a);
0062485f              *(uint16_t*)((char*)ecx_6 + 0x206) = *(uint16_t*)((char*)ecx_6 + 0x1e6);
0062486d              *(uint16_t*)((char*)ecx_6 + 0x406) = *(uint16_t*)((char*)ecx_6 + 0x3e6);
00624878              *(uint16_t*)((char*)ecx_6 + 8) = *(uint16_t*)((char*)ecx_6 - 0x18);
00624883              *(uint16_t*)((char*)ecx_6 + 0x208) = *(uint16_t*)((char*)ecx_6 + 0x1e8);
00624891              *(uint16_t*)((char*)ecx_6 + 0x408) = *(uint16_t*)((char*)ecx_6 + 0x3e8);
0062489c              *(uint16_t*)((char*)ecx_6 + 0xa) = *(uint16_t*)((char*)ecx_6 - 0x16);
006248a7              *(uint16_t*)((char*)ecx_6 + 0x20a) = *(uint16_t*)((char*)ecx_6 + 0x1ea);
006248b5              *(uint16_t*)((char*)ecx_6 + 0x40a) = *(uint16_t*)((char*)ecx_6 + 0x3ea);
006248c0              *(uint16_t*)((char*)ecx_6 + 0xc) = *(uint16_t*)((char*)ecx_6 - 0x14);
006248cb              *(uint16_t*)((char*)ecx_6 + 0x20c) = *(uint16_t*)((char*)ecx_6 + 0x1ec);
006248d9              *(uint16_t*)((char*)ecx_6 + 0x40c) = *(uint16_t*)((char*)ecx_6 + 0x3ec);
006248e4              *(uint16_t*)((char*)ecx_6 + 0xe) = *(uint16_t*)((char*)ecx_6 - 0x12);
006248ef              *(uint16_t*)((char*)ecx_6 + 0x20e) = *(uint16_t*)((char*)ecx_6 + 0x1ee);
006248fd              *(uint16_t*)((char*)ecx_6 + 0x40e) = *(uint16_t*)((char*)ecx_6 + 0x3ee);
00624908              *(uint16_t*)((char*)ecx_6 + 0x10) = *(uint16_t*)((char*)ecx_6 - 0x10);
00624913              *(uint16_t*)((char*)ecx_6 + 0x210) = *(uint16_t*)((char*)ecx_6 + 0x1f0);
00624921              *(uint16_t*)((char*)ecx_6 + 0x410) = *(uint16_t*)((char*)ecx_6 + 0x3f0);
0062492c              *(uint16_t*)((char*)ecx_6 + 0x12) = *(uint16_t*)((char*)ecx_6 - 0xe);
00624937              *(uint16_t*)((char*)ecx_6 + 0x212) = *(uint16_t*)((char*)ecx_6 + 0x1f2);
00624945              *(uint16_t*)((char*)ecx_6 + 0x412) = *(uint16_t*)((char*)ecx_6 + 0x3f2);
00624950              *(uint16_t*)((char*)ecx_6 + 0x14) = *(uint16_t*)((char*)ecx_6 - 0xc);
0062495b              *(uint16_t*)((char*)ecx_6 + 0x214) = *(uint16_t*)((char*)ecx_6 + 0x1f4);
00624969              *(uint16_t*)((char*)ecx_6 + 0x414) = *(uint16_t*)((char*)ecx_6 + 0x3f4);
00624974              *(uint16_t*)((char*)ecx_6 + 0x16) = *(uint16_t*)((char*)ecx_6 - 0xa);
0062497f              *(uint16_t*)((char*)ecx_6 + 0x216) = *(uint16_t*)((char*)ecx_6 + 0x1f6);
0062498d              *(uint16_t*)((char*)ecx_6 + 0x416) = *(uint16_t*)((char*)ecx_6 + 0x3f6);
00624998              *(uint16_t*)((char*)ecx_6 + 0x18) = *(uint16_t*)((char*)ecx_6 - 8);
006249a3              *(uint16_t*)((char*)ecx_6 + 0x218) = *(uint16_t*)((char*)ecx_6 + 0x1f8);
006249b1              *(uint16_t*)((char*)ecx_6 + 0x418) = *(uint16_t*)((char*)ecx_6 + 0x3f8);
006249bc              *(uint16_t*)((char*)ecx_6 + 0x1a) = *(uint16_t*)((char*)ecx_6 - 6);
006249c7              *(uint16_t*)((char*)ecx_6 + 0x21a) = *(uint16_t*)((char*)ecx_6 + 0x1fa);
006249d5              *(uint16_t*)((char*)ecx_6 + 0x41a) = *(uint16_t*)((char*)ecx_6 + 0x3fa);
006249e0              *(uint16_t*)((char*)ecx_6 + 0x1c) = *(uint16_t*)((char*)ecx_6 - 4);
006249eb              *(uint16_t*)((char*)ecx_6 + 0x21c) = *(uint16_t*)((char*)ecx_6 + 0x1fc);
006249f2              int16_t ebx_47 = *(uint16_t*)((char*)ecx_6 + 0x3fe);
006249f9              *(uint16_t*)((char*)ecx_6 + 0x41c) = edi_7;
00624a00              *(uint16_t*)((char*)ecx_6 + 0x1e) = esi_7;
00624a04              *(uint16_t*)((char*)ecx_6 + 0x21e) = ebp_4;
00624a0b              *(uint16_t*)((char*)ecx_6 + 0x41e) = ebx_47;
00624a12              ecx_6 += 0x20;
00624a18          } while (i_1 < 0x10);
006247c4      }
006247c4      
00624a1e      int32_t edx_11 = 0;
00624a20      int32_t ecx_7 = 0;
00624b17      void* result;
00624b17      
00624b17      for (int32_t i_2 = 0; i_2 < 0x100; i_2 += 0x20)
00624b17      {
00624a40          void* ebp_6 = ((char*)eax + (i_2 << 1));
00624a43          result = (((char*)eax + (i_2 << 1)) + 0x20);
00624a55          void* esi_9 = ((char*)eax + (ecx_7 << 1));
00624a59          int16_t* edi_9 = (arg5 + (edx_11 << 1));
00624a59          
00624af4          do
00624af4          {
00624a63              *(uint16_t*)edi_9 = *(uint16_t*)esi_9;
00624a6a              edi_9[0x40] = *(uint16_t*)((char*)esi_9 + 0x10);
00624a78              edi_9[0x80] = *(uint16_t*)((char*)esi_9 + 0x100);
00624a7f              int16_t ecx_11 = *(uint16_t*)((char*)esi_9 + 0x110);
00624a86              esi_9 += 2;
00624a89              edi_9[0xc0] = ecx_11;
00624ab7              edi_9[0x100] = ((int16_t)(((((((int32_t)*(uint16_t*)((char*)ebp_6 + 0x200)) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x202))) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x220))) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x222))) + 2) >> 2));
00624ae5              edi_9[0x140] = ((int16_t)(((((((int32_t)*(uint16_t*)((char*)ebp_6 + 0x400)) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x402))) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x420))) + ((int32_t)*(uint16_t*)((char*)ebp_6 + 0x422))) + 2) >> 2));
00624aec              edi_9 = &edi_9[1];
00624aef              ebp_6 += 4;
00624af4          } while (result > ebp_6);
00624af4          
00624b08          edx_11 += 8;
00624b0b          ecx_7 += 0x10;
00624b17      }
00624b17      
00624b27      return result;
006245e0  }

00624b28                          90 8d b4 26 00 00 00 00                                                          ...&....

00624b30  int32_t sub_624b30(void* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

00624b30  {
00624b37      void* edx = arg1;
00624b45      int16_t* ecx = arg3;
00624b5c      int32_t i_1 = 0;
00624b60      int16_t* var_18 = arg5;
00624b64      int16_t* var_14 = arg4;
0062553c      int32_t i;
0062553c      
0062553c      do
0062553c      {
00624b93          *(uint16_t*)ecx = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 2)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 1)) * 0x96)) + (((uint32_t)*(uint8_t*)edx) * 0x1d)) - 0x7f80) >> 8));
00624bba          ecx[1] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 5)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 4)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 3)) * 0x1d)) - 0x7f80) >> 8));
00624be2          ecx[2] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 8)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 7)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 6)) * 0x1d)) - 0x7f80) >> 8));
00624c0a          ecx[3] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0xb)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0xa)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 9)) * 0x1d)) - 0x7f80) >> 8));
00624c32          ecx[4] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0xe)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0xd)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0xc)) * 0x1d)) - 0x7f80) >> 8));
00624c5a          ecx[5] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x11)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x10)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0xf)) * 0x1d)) - 0x7f80) >> 8));
00624c82          ecx[6] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x14)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x13)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x12)) * 0x1d)) - 0x7f80) >> 8));
00624caa          ecx[7] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x17)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x16)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x15)) * 0x1d)) - 0x7f80) >> 8));
00624cd2          ecx[0x40] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x1a)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x19)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x18)) * 0x1d)) - 0x7f80) >> 8));
00624cfd          ecx[0x41] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x1d)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x1c)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x1b)) * 0x1d)) - 0x7f80) >> 8));
00624d28          ecx[0x42] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x20)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x1f)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x1e)) * 0x1d)) - 0x7f80) >> 8));
00624d53          ecx[0x43] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x23)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x22)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x21)) * 0x1d)) - 0x7f80) >> 8));
00624d7e          ecx[0x44] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x26)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x25)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x24)) * 0x1d)) - 0x7f80) >> 8));
00624da9          ecx[0x45] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x29)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x28)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x27)) * 0x1d)) - 0x7f80) >> 8));
00624dd4          ecx[0x46] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x2c)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x2b)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x2a)) * 0x1d)) - 0x7f80) >> 8));
00624dff          ecx[0x47] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x2f)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x2e)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x2d)) * 0x1d)) - 0x7f80) >> 8));
00624e0d          uint32_t eax_114 = (((uint32_t)*(uint8_t*)edx) + ((uint32_t)*(uint8_t*)((char*)edx + 3)));
00624e17          uint32_t ebp_2 = (((uint32_t)*(uint8_t*)((char*)edx + 1)) + ((uint32_t)*(uint8_t*)((char*)edx + 4)));
00624e25          uint32_t ebp_4 = (((uint32_t)*(uint8_t*)((char*)edx + 2)) + ((uint32_t)*(uint8_t*)((char*)edx + 5)));
00624e33          uint32_t ebp_6 = (((uint32_t)*(uint8_t*)((char*)edx + 6)) + ((uint32_t)*(uint8_t*)((char*)edx + 9)));
00624e41          uint32_t ebp_8 = (((uint32_t)*(uint8_t*)((char*)edx + 7)) + ((uint32_t)*(uint8_t*)((char*)edx + 0xa)));
00624e4f          uint32_t ebp_10 = (((uint32_t)*(uint8_t*)((char*)edx + 8)) + ((uint32_t)*(uint8_t*)((char*)edx + 0xb)));
00624e5d          uint32_t ebp_12 = (((uint32_t)*(uint8_t*)((char*)edx + 0xc)) + ((uint32_t)*(uint8_t*)((char*)edx + 0xf)));
00624e6b          uint32_t ebp_14 = (((uint32_t)*(uint8_t*)((char*)edx + 0xd)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x10)));
00624e79          uint32_t ebp_16 = (((uint32_t)*(uint8_t*)((char*)edx + 0xe)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x11)));
00624e87          uint32_t ebp_18 = (((uint32_t)*(uint8_t*)((char*)edx + 0x12)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x15)));
00624e95          uint32_t ebp_20 = (((uint32_t)*(uint8_t*)((char*)edx + 0x13)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x16)));
00624ea3          uint32_t ebp_22 = (((uint32_t)*(uint8_t*)((char*)edx + 0x14)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x17)));
00624eb1          uint32_t ebp_24 = (((uint32_t)*(uint8_t*)((char*)edx + 0x18)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x1b)));
00624ebf          uint32_t ebp_26 = (((uint32_t)*(uint8_t*)((char*)edx + 0x19)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x1c)));
00624ecd          uint32_t ebp_28 = (((uint32_t)*(uint8_t*)((char*)edx + 0x1a)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x1d)));
00624edb          uint32_t ebp_30 = (((uint32_t)*(uint8_t*)((char*)edx + 0x1e)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x21)));
00624ee9          uint32_t ebp_32 = (((uint32_t)*(uint8_t*)((char*)edx + 0x1f)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x22)));
00624ef7          uint32_t ebp_34 = (((uint32_t)*(uint8_t*)((char*)edx + 0x20)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x23)));
00624f05          uint32_t ebp_36 = (((uint32_t)*(uint8_t*)((char*)edx + 0x24)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x27)));
00624f13          uint32_t ebp_38 = (((uint32_t)*(uint8_t*)((char*)edx + 0x25)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x28)));
00624f21          uint32_t ebp_40 = (((uint32_t)*(uint8_t*)((char*)edx + 0x26)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x29)));
00624f2f          uint32_t ebp_42 = (((uint32_t)*(uint8_t*)((char*)edx + 0x2a)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x2d)));
00624f3d          uint32_t ebp_44 = (((uint32_t)*(uint8_t*)((char*)edx + 0x2b)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x2e)));
00624f4b          uint32_t ebp_46 = (((uint32_t)*(uint8_t*)((char*)edx + 0x2c)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x2f)));
00624f51          void* edx_1 = ((char*)edx + arg2);
00624f7b          ecx[8] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 2)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 1)) * 0x96)) + (((uint32_t)*(uint8_t*)edx_1) * 0x1d)) - 0x7f80) >> 8));
00624fa3          ecx[9] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 5)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 4)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 3)) * 0x1d)) - 0x7f80) >> 8));
00624fcb          ecx[0xa] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 8)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 7)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 6)) * 0x1d)) - 0x7f80) >> 8));
00624ff3          ecx[0xb] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xb)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0xa)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 9)) * 0x1d)) - 0x7f80) >> 8));
0062501b          ecx[0xc] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xe)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0xd)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0xc)) * 0x1d)) - 0x7f80) >> 8));
00625043          ecx[0xd] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x11)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x10)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0xf)) * 0x1d)) - 0x7f80) >> 8));
0062506b          ecx[0xe] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x14)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x13)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x12)) * 0x1d)) - 0x7f80) >> 8));
00625093          ecx[0xf] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x17)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x16)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x15)) * 0x1d)) - 0x7f80) >> 8));
006250bb          ecx[0x48] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1a)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x19)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x18)) * 0x1d)) - 0x7f80) >> 8));
006250e6          ecx[0x49] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1d)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1c)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1b)) * 0x1d)) - 0x7f80) >> 8));
00625111          ecx[0x4a] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x20)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1f)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1e)) * 0x1d)) - 0x7f80) >> 8));
0062513c          ecx[0x4b] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x23)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x22)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x21)) * 0x1d)) - 0x7f80) >> 8));
00625167          ecx[0x4c] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x26)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x25)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x24)) * 0x1d)) - 0x7f80) >> 8));
00625192          ecx[0x4d] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x29)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x28)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x27)) * 0x1d)) - 0x7f80) >> 8));
006251bd          ecx[0x4e] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2c)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2b)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2a)) * 0x1d)) - 0x7f80) >> 8));
006251e8          ecx[0x4f] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2f)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2e)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2d)) * 0x1d)) - 0x7f80) >> 8));
006251f8          uint32_t esi_6 = ((((uint32_t)*(uint8_t*)edx_1) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 3))) + eax_114);
0062520c          uint32_t ebp_103 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 1)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 4))) + ebp_2);
00625214          uint32_t ebx_146 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 2)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 5))) + ebp_4);
00625234          *(uint16_t*)var_14 = ((int16_t)(((((ebx_146 * 0xffffffd5) + (esi_6 << 7)) + (ebp_103 * 0xffffffab)) + 0x200) >> 0xa));
0062524d          ecx = &ecx[0x10];
00625250          *(uint16_t*)var_18 = ((int16_t)(((((ebx_146 << 7) + (esi_6 * 0xffffffeb)) + (ebp_103 * 0xffffff95)) + 0x200) >> 0xa));
00625265          uint32_t esi_9 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 6)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 9))) + ebp_6);
0062526f          uint32_t ebp_106 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 7)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0xa))) + ebp_8);
00625279          uint32_t ebx_152 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 8)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0xb))) + ebp_10);
00625298          var_14[1] = ((int16_t)(((((ebx_152 * 0xffffffd5) + (esi_9 << 7)) + (ebp_106 * 0xffffffab)) + 0x200) >> 0xa));
006252b5          var_18[1] = ((int16_t)(((((ebx_152 << 7) + (esi_9 * 0xffffffeb)) + (ebp_106 * 0xffffff95)) + 0x200) >> 0xa));
006252cb          uint32_t esi_12 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xc)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0xf))) + ebp_12);
006252d5          uint32_t ebp_109 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xd)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x10))) + ebp_14);
006252df          uint32_t ebx_158 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0xe)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x11))) + ebp_16);
006252fe          var_14[2] = ((int16_t)(((((ebx_158 * 0xffffffd5) + (esi_12 << 7)) + (ebp_109 * 0xffffffab)) + 0x200) >> 0xa));
0062531b          var_18[2] = ((int16_t)(((((ebx_158 << 7) + (esi_12 * 0xffffffeb)) + (ebp_109 * 0xffffff95)) + 0x200) >> 0xa));
00625331          uint32_t esi_15 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x12)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x15))) + ebp_18);
0062533b          uint32_t ebp_112 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x13)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x16))) + ebp_20);
00625345          uint32_t ebx_164 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x14)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x17))) + ebp_22);
00625364          var_14[3] = ((int16_t)(((((ebx_164 * 0xffffffd5) + (esi_15 << 7)) + (ebp_112 * 0xffffffab)) + 0x200) >> 0xa));
00625381          var_18[3] = ((int16_t)(((((ebx_164 << 7) + (esi_15 * 0xffffffeb)) + (ebp_112 * 0xffffff95)) + 0x200) >> 0xa));
00625397          uint32_t esi_18 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x18)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1b))) + ebp_24);
006253a1          uint32_t ebp_115 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x19)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1c))) + ebp_26);
006253ab          uint32_t ebx_170 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1a)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1d))) + ebp_28);
006253ca          var_14[4] = ((int16_t)(((((ebx_170 * 0xffffffd5) + (esi_18 << 7)) + (ebp_115 * 0xffffffab)) + 0x200) >> 0xa));
006253e7          var_18[4] = ((int16_t)(((((ebx_170 << 7) + (esi_18 * 0xffffffeb)) + (ebp_115 * 0xffffff95)) + 0x200) >> 0xa));
006253fd          uint32_t esi_21 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1e)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x21))) + ebp_30);
00625407          uint32_t ebp_118 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x1f)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x22))) + ebp_32);
00625411          uint32_t ebx_176 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x20)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x23))) + ebp_34);
00625430          var_14[5] = ((int16_t)(((((ebx_176 * 0xffffffd5) + (esi_21 << 7)) + (ebp_118 * 0xffffffab)) + 0x200) >> 0xa));
0062544d          var_18[5] = ((int16_t)(((((ebx_176 << 7) + (esi_21 * 0xffffffeb)) + (ebp_118 * 0xffffff95)) + 0x200) >> 0xa));
00625463          uint32_t ebp_121 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x24)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x27))) + ebp_36);
0062546d          uint32_t ebx_182 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x25)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x28))) + ebp_38);
00625477          uint32_t eax_184 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x26)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x29))) + ebp_40);
00625496          var_14[6] = ((int16_t)(((((eax_184 * 0xffffffd5) + (ebp_121 << 7)) + (ebx_182 * 0xffffffab)) + 0x200) >> 0xa));
006254b3          var_18[6] = ((int16_t)(((((eax_184 << 7) + (ebp_121 * 0xffffffeb)) + (ebx_182 * 0xffffff95)) + 0x200) >> 0xa));
006254c9          uint32_t esi_30 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2a)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2d))) + ebp_42);
006254d3          uint32_t ebp_125 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2b)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2e))) + ebp_44);
006254dd          uint32_t ebx_187 = ((((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2c)) + ((uint32_t)*(uint8_t*)((char*)edx_1 + 0x2f))) + ebp_46);
006254fc          var_14[7] = ((int16_t)(((((ebx_187 * 0xffffffd5) + (esi_30 << 7)) + (ebp_125 * 0xffffffab)) + 0x200) >> 0xa));
00625519          var_18[7] = ((int16_t)(((((ebx_187 << 7) + (esi_30 * 0xffffffeb)) + (ebp_125 * 0xffffff95)) + 0x200) >> 0xa));
00625521          i = (i_1 + 2);
00625524          var_14 = &var_14[8];
00625529          var_18 = &var_18[8];
0062552e          edx = ((char*)edx_1 + arg2);
00625538          i_1 = i;
0062553c      } while (i < 8);
0062553c      
00625549      return i;
00624b30  }

0062554a                                8d b6 00 00 00 00                                                            ......

00625550  int32_t _BGR_to_YCbCr_411_Full_MCU_PX(void* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

00625550  {
0062557e      sub_624b30(arg1, arg2, arg3, arg4, arg5);
006255b5      return sub_624b30(((char*)arg1 + (arg2 << 3)), arg2, &arg3[0x80], &arg4[0x20], &arg5[0x20]);
00625550  }

006255b6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

006255c0  void* _BGR_to_YCbCr_411_Full_MCU_M5(int64_t* arg1, uint64_t* arg2, uint8_t (* arg3)[0x8], uint8_t (* arg4)[0x8])

006255c0  {
006255e6      _own_bgr_to_ycbcr_411_one_quarter_mcu_m5(arg1, arg2, arg3, arg4);
00625606      _own_bgr_to_ycbcr_411_one_quarter_mcu_m5(&arg1[3], arg2, &arg3[0x10], &arg4[1]);
0062560b      int64_t* edi_1 = &arg1[arg2];
00625626      _own_bgr_to_ycbcr_411_one_quarter_mcu_m5(edi_1, arg2, &arg3[0x20], &arg4[8]);
00625646      _own_bgr_to_ycbcr_411_one_quarter_mcu_m5(&edi_1[3], arg2, &arg3[0x30], &arg4[9]);
00625652      return &arg3[0x30];
006255c0  }

00625653                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

00625660  void BGR_to_YCbCr_411_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

00625660  {
0062566b      int32_t edi = 0x10;
00625670      int32_t esi = 0x10;
00625675      int32_t DIBLineBytes = arg1->DIBLineBytes;
00625678      uint8_t* MCUBuf = arg1->MCUBuf;
0062567e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062567e      
00625696      if ((arg1->numxMCUs - 1) != arg2)
006256d4          arg1->state.DIB_ptr = &DIB_ptr[0x30];
00625696      else
00625696      {
0062569f          int32_t eax_5;
0062569f          int32_t edx_1;
0062569f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062569f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
006256a9          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
006256a9          
006256ad          if (eax_10 != 0)
006256af              edi = eax_10;
006256af          
006256c5          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 4) + 0x10) * DIBLineBytes)];
00625696      }
00625696      
006256e8      if (arg3 == (arg1->numyMCUs - 1))
006256e8      {
006256f1          int32_t eax_22;
006256f1          int32_t edx_5;
006256f1          edx_5 = HIGHD(((int64_t)arg1->DIBHeight));
006256f1          eax_22 = LOWD(((int64_t)arg1->DIBHeight));
006256f6          int32_t eax_25;
006256f6          int32_t edx_6;
006256f6          edx_6 = HIGHD(((int64_t)((eax_22 ^ edx_5) - edx_5)));
006256f6          eax_25 = LOWD(((int64_t)((eax_22 ^ edx_5) - edx_5)));
00625700          int32_t eax_30 = (((((eax_25 ^ edx_6) - edx_6) & 0xf) ^ edx_6) - edx_6);
00625700          
00625704          if (eax_30 != 0)
00625706              esi = eax_30;
006256e8      }
006256e8      
00625730      if ((edi != 0x10 || esi != 0x10))
00625730      {
00625720          sub_6245e0(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062572c          return;
00625730      }
00625730      
00625755      *(uint32_t*)(arg1->state.ctx + 0x7c)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x200], &MCUBuf[0x280]);
00625660  }


00625760  void* sub_625760(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00625760  {
0062577c      void var_340;
0062577c      void* result = &var_340;
0062577f      int32_t i_1 = 0;
0062577f      
00625783      if (arg4 > 0)
00625783      {
0062578b          int32_t ecx_1 = 0;
00625790          int32_t ebx_1 = 0;
00625795          int32_t ebp_1 = 0;
00625798          void* result_1 = &var_340;
00625798          
00625934          do
00625934          {
0062579f              int32_t i = 0;
0062579f              
006257aa              if (arg3 > 0)
006257aa              {
006257b3                  void* edi_1 = ecx_1;
006257c6                  int32_t i_3 = 0;
006257dc                  int32_t esi_3 = ebx_1;
006257dc                  
00625877                  do
00625877                  {
006257e7                      uint32_t ebx_2 = ((uint32_t)*(uint8_t*)((char*)edi_1 + arg1));
006257eb                      uint32_t ebp_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 1));
006257f0                      uint32_t ecx_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 2));
00625814                      edi_1 += 3;
00625817                      *(uint16_t*)((char*)result_1 + (esi_3 << 1)) = ((int16_t)(((((ebx_2 * 0x4d) + (ebp_2 * 0x96)) + (ecx_2 * 0x1d)) - 0x7f80) >> 8));
00625839                      *(uint16_t*)(((char*)result_1 + (esi_3 << 1)) + 0x100) = ((int16_t)(((((ebx_2 * 0xffffffd5) + (ebp_2 * 0xffffffab)) + (ecx_2 << 7)) + 0x80) >> 8));
00625856                      *(uint16_t*)(((char*)result_1 + (esi_3 << 1)) + 0x200) = ((int16_t)(((((ebx_2 << 7) + (ebp_2 * 0xffffff95)) + (ecx_2 * 0xffffffeb)) + 0x80) >> 8));
0062585e                      esi_3 += 1;
00625866                      i = (i_3 + 1);
00625870                      i_3 = i;
00625877                  } while (i < arg3);
006257aa              }
006257aa              
0062589c              if (i < 0x10)
0062589c              {
006258a9                  void* edi_2 = ((char*)result_1 + ebp_1);
006258d5                  void* esi_6 = ((char*)result_1 + ((i + ebx_1) << 1));
006258d5                  
0062590d                  do
0062590d                  {
006258e5                      i += 1;
006258e6                      *(uint16_t*)esi_6 = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) - 2);
006258f1                      *(uint16_t*)((char*)esi_6 + 0x100) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0xfe);
00625900                      *(uint16_t*)((char*)esi_6 + 0x200) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0x1fe);
00625907                      esi_6 += 2;
0062590d                  } while (i < 0x10);
0062589c              }
0062589c              
0062591d              ecx_1 += arg2;
00625924              ebx_1 += 0x10;
00625927              ebp_1 += 0x20;
0062592a              i_1 += 1;
00625934          } while (i_1 < arg4);
00625934          
0062593a          result = result_1;
00625783      }
00625783      
00625944      if (i_1 < 8)
00625944      {
0062594f          void* ecx_5 = ((char*)result + (i_1 << 5));
0062594f          
00625b98          do
00625b98          {
00625956              int16_t edi_8 = *(uint16_t*)((char*)ecx_5 + 0x1fc);
0062595d              int16_t esi_7 = *(uint16_t*)((char*)ecx_5 - 2);
00625961              *(uint16_t*)ecx_5 = *(uint16_t*)((char*)ecx_5 - 0x20);
0062596b              int16_t ebp_4 = *(uint16_t*)((char*)ecx_5 + 0xfe);
00625972              *(uint16_t*)((char*)ecx_5 + 0x100) = *(uint16_t*)((char*)ecx_5 + 0xe0);
00625980              i_1 += 1;
00625981              *(uint16_t*)((char*)ecx_5 + 0x200) = *(uint16_t*)((char*)ecx_5 + 0x1e0);
0062598c              *(uint16_t*)((char*)ecx_5 + 2) = *(uint16_t*)((char*)ecx_5 - 0x1e);
00625997              *(uint16_t*)((char*)ecx_5 + 0x102) = *(uint16_t*)((char*)ecx_5 + 0xe2);
006259a5              *(uint16_t*)((char*)ecx_5 + 0x202) = *(uint16_t*)((char*)ecx_5 + 0x1e2);
006259b0              *(uint16_t*)((char*)ecx_5 + 4) = *(uint16_t*)((char*)ecx_5 - 0x1c);
006259bb              *(uint16_t*)((char*)ecx_5 + 0x104) = *(uint16_t*)((char*)ecx_5 + 0xe4);
006259c9              *(uint16_t*)((char*)ecx_5 + 0x204) = *(uint16_t*)((char*)ecx_5 + 0x1e4);
006259d4              *(uint16_t*)((char*)ecx_5 + 6) = *(uint16_t*)((char*)ecx_5 - 0x1a);
006259df              *(uint16_t*)((char*)ecx_5 + 0x106) = *(uint16_t*)((char*)ecx_5 + 0xe6);
006259ed              *(uint16_t*)((char*)ecx_5 + 0x206) = *(uint16_t*)((char*)ecx_5 + 0x1e6);
006259f8              *(uint16_t*)((char*)ecx_5 + 8) = *(uint16_t*)((char*)ecx_5 - 0x18);
00625a03              *(uint16_t*)((char*)ecx_5 + 0x108) = *(uint16_t*)((char*)ecx_5 + 0xe8);
00625a11              *(uint16_t*)((char*)ecx_5 + 0x208) = *(uint16_t*)((char*)ecx_5 + 0x1e8);
00625a1c              *(uint16_t*)((char*)ecx_5 + 0xa) = *(uint16_t*)((char*)ecx_5 - 0x16);
00625a27              *(uint16_t*)((char*)ecx_5 + 0x10a) = *(uint16_t*)((char*)ecx_5 + 0xea);
00625a35              *(uint16_t*)((char*)ecx_5 + 0x20a) = *(uint16_t*)((char*)ecx_5 + 0x1ea);
00625a40              *(uint16_t*)((char*)ecx_5 + 0xc) = *(uint16_t*)((char*)ecx_5 - 0x14);
00625a4b              *(uint16_t*)((char*)ecx_5 + 0x10c) = *(uint16_t*)((char*)ecx_5 + 0xec);
00625a59              *(uint16_t*)((char*)ecx_5 + 0x20c) = *(uint16_t*)((char*)ecx_5 + 0x1ec);
00625a64              *(uint16_t*)((char*)ecx_5 + 0xe) = *(uint16_t*)((char*)ecx_5 - 0x12);
00625a6f              *(uint16_t*)((char*)ecx_5 + 0x10e) = *(uint16_t*)((char*)ecx_5 + 0xee);
00625a7d              *(uint16_t*)((char*)ecx_5 + 0x20e) = *(uint16_t*)((char*)ecx_5 + 0x1ee);
00625a88              *(uint16_t*)((char*)ecx_5 + 0x10) = *(uint16_t*)((char*)ecx_5 - 0x10);
00625a93              *(uint16_t*)((char*)ecx_5 + 0x110) = *(uint16_t*)((char*)ecx_5 + 0xf0);
00625aa1              *(uint16_t*)((char*)ecx_5 + 0x210) = *(uint16_t*)((char*)ecx_5 + 0x1f0);
00625aac              *(uint16_t*)((char*)ecx_5 + 0x12) = *(uint16_t*)((char*)ecx_5 - 0xe);
00625ab7              *(uint16_t*)((char*)ecx_5 + 0x112) = *(uint16_t*)((char*)ecx_5 + 0xf2);
00625ac5              *(uint16_t*)((char*)ecx_5 + 0x212) = *(uint16_t*)((char*)ecx_5 + 0x1f2);
00625ad0              *(uint16_t*)((char*)ecx_5 + 0x14) = *(uint16_t*)((char*)ecx_5 - 0xc);
00625adb              *(uint16_t*)((char*)ecx_5 + 0x114) = *(uint16_t*)((char*)ecx_5 + 0xf4);
00625ae9              *(uint16_t*)((char*)ecx_5 + 0x214) = *(uint16_t*)((char*)ecx_5 + 0x1f4);
00625af4              *(uint16_t*)((char*)ecx_5 + 0x16) = *(uint16_t*)((char*)ecx_5 - 0xa);
00625aff              *(uint16_t*)((char*)ecx_5 + 0x116) = *(uint16_t*)((char*)ecx_5 + 0xf6);
00625b0d              *(uint16_t*)((char*)ecx_5 + 0x216) = *(uint16_t*)((char*)ecx_5 + 0x1f6);
00625b18              *(uint16_t*)((char*)ecx_5 + 0x18) = *(uint16_t*)((char*)ecx_5 - 8);
00625b23              *(uint16_t*)((char*)ecx_5 + 0x118) = *(uint16_t*)((char*)ecx_5 + 0xf8);
00625b31              *(uint16_t*)((char*)ecx_5 + 0x218) = *(uint16_t*)((char*)ecx_5 + 0x1f8);
00625b3c              *(uint16_t*)((char*)ecx_5 + 0x1a) = *(uint16_t*)((char*)ecx_5 - 6);
00625b47              *(uint16_t*)((char*)ecx_5 + 0x11a) = *(uint16_t*)((char*)ecx_5 + 0xfa);
00625b55              *(uint16_t*)((char*)ecx_5 + 0x21a) = *(uint16_t*)((char*)ecx_5 + 0x1fa);
00625b60              *(uint16_t*)((char*)ecx_5 + 0x1c) = *(uint16_t*)((char*)ecx_5 - 4);
00625b6b              *(uint16_t*)((char*)ecx_5 + 0x11c) = *(uint16_t*)((char*)ecx_5 + 0xfc);
00625b72              int16_t ebx_49 = *(uint16_t*)((char*)ecx_5 + 0x1fe);
00625b79              *(uint16_t*)((char*)ecx_5 + 0x21c) = edi_8;
00625b80              *(uint16_t*)((char*)ecx_5 + 0x1e) = esi_7;
00625b84              *(uint16_t*)((char*)ecx_5 + 0x11e) = ebp_4;
00625b8b              *(uint16_t*)((char*)ecx_5 + 0x21e) = ebx_49;
00625b92              ecx_5 += 0x20;
00625b98          } while (i_1 < 8);
00625944      }
00625944      
00625b9e      int32_t ecx_6 = 0;
00625b9e      
00625c3e      for (int32_t i_2 = 0; i_2 < 0x80; i_2 += 0x10)
00625c3e      {
00625baf          void* j = ((char*)result + (i_2 << 1));
00625bc4          void* esi_9 = ((char*)result + (i_2 << 1));
00625bca          int16_t* edi_10 = (arg5 + (ecx_6 << 1));
00625bca          
00625c22          do
00625c22          {
00625bd3              *(uint16_t*)edi_10 = *(uint16_t*)esi_9;
00625bd6              int16_t eax_16 = *(uint16_t*)((char*)esi_9 + 0x10);
00625bda              esi_9 += 2;
00625bdd              edi_10[0x40] = eax_16;
00625bf8              edi_10[0x80] = ((int16_t)(((((int32_t)*(uint16_t*)((char*)j + 0x100)) + ((int32_t)*(uint16_t*)((char*)j + 0x102))) + 1) >> 1));
00625c11              int16_t eax_22 = ((int16_t)(((((int32_t)*(uint16_t*)((char*)j + 0x200)) + ((int32_t)*(uint16_t*)((char*)j + 0x202))) + 1) >> 1));
00625c13              j += 4;
00625c16              edi_10[0xc0] = eax_22;
00625c1d              edi_10 = &edi_10[1];
00625c22          } while ((((char*)result + (i_2 << 1)) + 0x20) > j);
00625c22          
00625c32          ecx_6 += 8;
00625c3e      }
00625c3e      
00625c4e      return result;
00625760  }

00625c4f                                               90                                                                 .

00625c50  int16_t* _RGB_to_YCbCr_422_Full_MCU_PX(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

00625c50  {
00625c57      char* edx = arg1;
00625c5f      int16_t* result = arg3;
00625c6d      int32_t i_1 = 0;
00625c71      int16_t* var_1c = arg5;
00625c75      int16_t* var_18 = arg4;
00626202      int32_t i;
00626202      
00626202      do
00626202      {
00625ca3          *(uint16_t*)result = ((int16_t)(((((((uint32_t)*(uint8_t*)edx) * 0x4d) + (((uint32_t)edx[1]) * 0x96)) + (((uint32_t)edx[2]) * 0x1d)) - 0x7f80) >> 8));
00625cca          result[1] = ((int16_t)(((((((uint32_t)edx[3]) * 0x4d) + (((uint32_t)edx[4]) * 0x96)) + (((uint32_t)edx[5]) * 0x1d)) - 0x7f80) >> 8));
00625cf2          result[2] = ((int16_t)(((((((uint32_t)edx[6]) * 0x4d) + (((uint32_t)edx[7]) * 0x96)) + (((uint32_t)edx[8]) * 0x1d)) - 0x7f80) >> 8));
00625d1a          result[3] = ((int16_t)(((((((uint32_t)edx[9]) * 0x4d) + (((uint32_t)edx[0xa]) * 0x96)) + (((uint32_t)edx[0xb]) * 0x1d)) - 0x7f80) >> 8));
00625d42          result[4] = ((int16_t)(((((((uint32_t)edx[0xc]) * 0x4d) + (((uint32_t)edx[0xd]) * 0x96)) + (((uint32_t)edx[0xe]) * 0x1d)) - 0x7f80) >> 8));
00625d6a          result[5] = ((int16_t)(((((((uint32_t)edx[0xf]) * 0x4d) + (((uint32_t)edx[0x10]) * 0x96)) + (((uint32_t)edx[0x11]) * 0x1d)) - 0x7f80) >> 8));
00625d92          result[6] = ((int16_t)(((((((uint32_t)edx[0x12]) * 0x4d) + (((uint32_t)edx[0x13]) * 0x96)) + (((uint32_t)edx[0x14]) * 0x1d)) - 0x7f80) >> 8));
00625dba          result[7] = ((int16_t)(((((((uint32_t)edx[0x15]) * 0x4d) + (((uint32_t)edx[0x16]) * 0x96)) + (((uint32_t)edx[0x17]) * 0x1d)) - 0x7f80) >> 8));
00625de2          result[0x40] = ((int16_t)(((((((uint32_t)edx[0x18]) * 0x4d) + (((uint32_t)edx[0x19]) * 0x96)) + (((uint32_t)edx[0x1a]) * 0x1d)) - 0x7f80) >> 8));
00625e0d          result[0x41] = ((int16_t)(((((((uint32_t)edx[0x1b]) * 0x4d) + (((uint32_t)edx[0x1c]) * 0x96)) + (((uint32_t)edx[0x1d]) * 0x1d)) - 0x7f80) >> 8));
00625e38          result[0x42] = ((int16_t)(((((((uint32_t)edx[0x1e]) * 0x4d) + (((uint32_t)edx[0x1f]) * 0x96)) + (((uint32_t)edx[0x20]) * 0x1d)) - 0x7f80) >> 8));
00625e63          result[0x43] = ((int16_t)(((((((uint32_t)edx[0x21]) * 0x4d) + (((uint32_t)edx[0x22]) * 0x96)) + (((uint32_t)edx[0x23]) * 0x1d)) - 0x7f80) >> 8));
00625e8e          result[0x44] = ((int16_t)(((((((uint32_t)edx[0x24]) * 0x4d) + (((uint32_t)edx[0x25]) * 0x96)) + (((uint32_t)edx[0x26]) * 0x1d)) - 0x7f80) >> 8));
00625eb9          result[0x45] = ((int16_t)(((((((uint32_t)edx[0x27]) * 0x4d) + (((uint32_t)edx[0x28]) * 0x96)) + (((uint32_t)edx[0x29]) * 0x1d)) - 0x7f80) >> 8));
00625ee4          result[0x46] = ((int16_t)(((((((uint32_t)edx[0x2a]) * 0x4d) + (((uint32_t)edx[0x2b]) * 0x96)) + (((uint32_t)edx[0x2c]) * 0x1d)) - 0x7f80) >> 8));
00625f0f          result[0x47] = ((int16_t)(((((((uint32_t)edx[0x2d]) * 0x4d) + (((uint32_t)edx[0x2e]) * 0x96)) + (((uint32_t)edx[0x2f]) * 0x1d)) - 0x7f80) >> 8));
00625f1d          uint32_t esi_3 = (((uint32_t)*(uint8_t*)edx) + ((uint32_t)edx[3]));
00625f27          uint32_t ebp_2 = (((uint32_t)edx[1]) + ((uint32_t)edx[4]));
00625f31          uint32_t ebx_34 = (((uint32_t)edx[2]) + ((uint32_t)edx[5]));
00625f51          *(uint16_t*)var_18 = ((int16_t)(((((esi_3 * 0xffffffd5) + (ebp_2 * 0xffffffab)) + (ebx_34 << 7)) + 0x100) >> 9));
00625f6a          result = &result[8];
00625f6d          *(uint16_t*)var_1c = ((int16_t)(((((esi_3 << 7) + (ebp_2 * 0xffffff95)) + (ebx_34 * 0xffffffeb)) + 0x100) >> 9));
00625f78          uint32_t esi_7 = (((uint32_t)edx[6]) + ((uint32_t)edx[9]));
00625f82          uint32_t ebp_4 = (((uint32_t)edx[7]) + ((uint32_t)edx[0xa]));
00625f8c          uint32_t ebx_37 = (((uint32_t)edx[8]) + ((uint32_t)edx[0xb]));
00625fa9          var_18[1] = ((int16_t)(((((esi_7 * 0xffffffd5) + (ebp_4 * 0xffffffab)) + (ebx_37 << 7)) + 0x100) >> 9));
00625fc6          var_1c[1] = ((int16_t)(((((esi_7 << 7) + (ebp_4 * 0xffffff95)) + (ebx_37 * 0xffffffeb)) + 0x100) >> 9));
00625fd2          uint32_t esi_11 = (((uint32_t)edx[0xc]) + ((uint32_t)edx[0xf]));
00625fdc          uint32_t ebp_6 = (((uint32_t)edx[0xd]) + ((uint32_t)edx[0x10]));
00625fe6          uint32_t ebx_40 = (((uint32_t)edx[0xe]) + ((uint32_t)edx[0x11]));
00626003          var_18[2] = ((int16_t)(((((esi_11 * 0xffffffd5) + (ebp_6 * 0xffffffab)) + (ebx_40 << 7)) + 0x100) >> 9));
00626020          var_1c[2] = ((int16_t)(((((esi_11 << 7) + (ebp_6 * 0xffffff95)) + (ebx_40 * 0xffffffeb)) + 0x100) >> 9));
0062602c          uint32_t esi_15 = (((uint32_t)edx[0x12]) + ((uint32_t)edx[0x15]));
00626036          uint32_t ebp_8 = (((uint32_t)edx[0x13]) + ((uint32_t)edx[0x16]));
00626040          uint32_t ebx_43 = (((uint32_t)edx[0x14]) + ((uint32_t)edx[0x17]));
0062605d          var_18[3] = ((int16_t)(((((esi_15 * 0xffffffd5) + (ebp_8 * 0xffffffab)) + (ebx_43 << 7)) + 0x100) >> 9));
0062607a          var_1c[3] = ((int16_t)(((((esi_15 << 7) + (ebp_8 * 0xffffff95)) + (ebx_43 * 0xffffffeb)) + 0x100) >> 9));
00626086          uint32_t esi_19 = (((uint32_t)edx[0x18]) + ((uint32_t)edx[0x1b]));
00626090          uint32_t ebp_10 = (((uint32_t)edx[0x19]) + ((uint32_t)edx[0x1c]));
0062609a          uint32_t ebx_46 = (((uint32_t)edx[0x1a]) + ((uint32_t)edx[0x1d]));
006260b7          var_18[4] = ((int16_t)(((((esi_19 * 0xffffffd5) + (ebp_10 * 0xffffffab)) + (ebx_46 << 7)) + 0x100) >> 9));
006260d4          var_1c[4] = ((int16_t)(((((esi_19 << 7) + (ebp_10 * 0xffffff95)) + (ebx_46 * 0xffffffeb)) + 0x100) >> 9));
006260e0          uint32_t esi_23 = (((uint32_t)edx[0x1e]) + ((uint32_t)edx[0x21]));
006260ea          uint32_t ebp_12 = (((uint32_t)edx[0x1f]) + ((uint32_t)edx[0x22]));
006260f4          uint32_t ebx_49 = (((uint32_t)edx[0x20]) + ((uint32_t)edx[0x23]));
00626111          var_18[5] = ((int16_t)(((((esi_23 * 0xffffffd5) + (ebp_12 * 0xffffffab)) + (ebx_49 << 7)) + 0x100) >> 9));
0062612e          var_1c[5] = ((int16_t)(((((esi_23 << 7) + (ebp_12 * 0xffffff95)) + (ebx_49 * 0xffffffeb)) + 0x100) >> 9));
0062613a          uint32_t ebp_14 = (((uint32_t)edx[0x24]) + ((uint32_t)edx[0x27]));
00626144          uint32_t ebx_52 = (((uint32_t)edx[0x25]) + ((uint32_t)edx[0x28]));
0062614e          uint32_t ecx_182 = (((uint32_t)edx[0x26]) + ((uint32_t)edx[0x29]));
0062616b          var_18[6] = ((int16_t)(((((ebp_14 * 0xffffffd5) + (ebx_52 * 0xffffffab)) + (ecx_182 << 7)) + 0x100) >> 9));
00626188          var_1c[6] = ((int16_t)(((((ebp_14 << 7) + (ebx_52 * 0xffffff95)) + (ecx_182 * 0xffffffeb)) + 0x100) >> 9));
00626194          uint32_t esi_33 = (((uint32_t)edx[0x2a]) + ((uint32_t)edx[0x2d]));
0062619e          uint32_t ebp_18 = (((uint32_t)edx[0x2b]) + ((uint32_t)edx[0x2e]));
006261a8          uint32_t ebx_56 = (((uint32_t)edx[0x2c]) + ((uint32_t)edx[0x2f]));
006261c5          var_18[7] = ((int16_t)(((((esi_33 * 0xffffffd5) + (ebp_18 * 0xffffffab)) + (ebx_56 << 7)) + 0x100) >> 9));
006261e2          var_1c[7] = ((int16_t)(((((esi_33 << 7) + (ebp_18 * 0xffffff95)) + (ebx_56 * 0xffffffeb)) + 0x100) >> 9));
006261ed          var_18 = &var_18[8];
006261f2          i = (i_1 + 1);
006261f3          var_1c = &var_1c[8];
006261f7          edx = &edx[arg2];
006261fb          i_1 = i;
00626202      } while (i < 8);
0062620f      return result;
00625c50  }


00626210  int64_t* _RGB_to_YCbCr_422_Full_MCU_M5(int64_t* arg1, int32_t arg2, uint8_t (* arg3)[0x8], void* arg4, void* arg5)

00626210  {
0062623c      _own_rgb_to_ycbcr_422_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00626246      return arg1;
00626210  }

00626247                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00626250  void RGB_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

00626250  {
0062625b      int32_t edi = 0x10;
00626260      int32_t esi = 8;
00626265      int32_t DIBLineBytes = arg1->DIBLineBytes;
00626268      uint8_t* MCUBuf = arg1->MCUBuf;
0062626e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062626e      
00626286      if ((arg1->numxMCUs - 1) != arg2)
006262c5          arg1->state.DIB_ptr = &DIB_ptr[0x30];
00626286      else
00626286      {
0062628f          int32_t eax_5;
0062628f          int32_t edx_1;
0062628f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062628f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
00626299          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
00626299          
0062629d          if (eax_10 != 0)
0062629f              edi = eax_10;
0062629f          
006262b6          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
00626286      }
00626286      
006262d9      if (arg3 == (arg1->numyMCUs - 1))
006262d9      {
006262e2          int32_t eax_19;
006262e2          int32_t edx_7;
006262e2          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
006262e2          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
006262e7          int32_t eax_22;
006262e7          int32_t edx_8;
006262e7          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
006262e7          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
006262f1          int32_t eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
006262f1          
006262f5          if (eax_27 != 0)
006262f7              esi = eax_27;
006262d9      }
006262d9      
00626321      if ((edi != 0x10 || esi != 8))
00626321      {
00626311          sub_625760(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062631d          return;
00626321      }
00626321      
00626346      *(uint32_t*)(arg1->state.ctx + 0x6c)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x100], &MCUBuf[0x180]);
00626250  }

00626351                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

00626360  void* sub_626360(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00626360  {
0062637c      void var_340;
0062637c      void* result = &var_340;
0062637f      int32_t i_1 = 0;
0062637f      
00626383      if (arg4 > 0)
00626383      {
0062638b          int32_t ecx_1 = 0;
00626390          int32_t ebx_1 = 0;
00626395          int32_t ebp_1 = 0;
00626398          void* result_1 = &var_340;
00626398          
00626534          do
00626534          {
0062639f              int32_t i = 0;
0062639f              
006263aa              if (arg3 > 0)
006263aa              {
006263b3                  void* edi_1 = ecx_1;
006263c6                  int32_t i_3 = 0;
006263dc                  int32_t esi_3 = ebx_1;
006263dc                  
0062647e                  do
0062647e                  {
006263e7                      uint32_t ebx_2 = ((uint32_t)*(uint8_t*)((char*)edi_1 + arg1));
006263eb                      uint32_t ebp_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 1));
006263f0                      uint32_t ecx_2 = ((uint32_t)*(uint8_t*)(((char*)edi_1 + arg1) + 2));
00626414                      edi_1 += 3;
00626417                      *(uint16_t*)((char*)result_1 + (esi_3 << 1)) = ((int16_t)(((((ebx_2 * 0x1d) + (ebp_2 * 0x96)) + (ecx_2 * 0x4d)) - 0x7f80) >> 8));
00626439                      *(uint16_t*)(((char*)result_1 + (esi_3 << 1)) + 0x100) = ((int16_t)(((((ebx_2 << 7) + (ebp_2 * 0xffffffab)) + (ecx_2 * 0xffffffd5)) + 0x80) >> 8));
0062645d                      *(uint16_t*)(((char*)result_1 + (esi_3 << 1)) + 0x200) = ((int16_t)(((((ebx_2 * 0xffffffeb) + (ebp_2 * 0xffffff95)) + (ecx_2 << 7)) + 0x80) >> 8));
00626465                      esi_3 += 1;
0062646d                      i = (i_3 + 1);
00626477                      i_3 = i;
0062647e                  } while (i < arg3);
006263aa              }
006263aa              
006264a3              if (i < 0x10)
006264a3              {
006264b0                  void* edi_2 = ((char*)result_1 + ebp_1);
006264dc                  void* esi_6 = ((char*)result_1 + ((i + ebx_1) << 1));
006264dc                  
0062650d                  do
0062650d                  {
006264e5                      i += 1;
006264e6                      *(uint16_t*)esi_6 = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) - 2);
006264f1                      *(uint16_t*)((char*)esi_6 + 0x100) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0xfe);
00626500                      *(uint16_t*)((char*)esi_6 + 0x200) = *(uint16_t*)(((char*)edi_2 + (arg3 << 1)) + 0x1fe);
00626507                      esi_6 += 2;
0062650d                  } while (i < 0x10);
006264a3              }
006264a3              
0062651d              ecx_1 += arg2;
00626524              ebx_1 += 0x10;
00626527              ebp_1 += 0x20;
0062652a              i_1 += 1;
00626534          } while (i_1 < arg4);
00626534          
0062653a          result = result_1;
00626383      }
00626383      
00626544      if (i_1 < 8)
00626544      {
0062654f          void* ecx_6 = ((char*)result + (i_1 << 5));
0062654f          
00626798          do
00626798          {
00626556              int16_t edi_7 = *(uint16_t*)((char*)ecx_6 + 0x1fc);
0062655d              int16_t esi_7 = *(uint16_t*)((char*)ecx_6 - 2);
00626561              *(uint16_t*)ecx_6 = *(uint16_t*)((char*)ecx_6 - 0x20);
0062656b              int16_t ebp_4 = *(uint16_t*)((char*)ecx_6 + 0xfe);
00626572              *(uint16_t*)((char*)ecx_6 + 0x100) = *(uint16_t*)((char*)ecx_6 + 0xe0);
00626580              i_1 += 1;
00626581              *(uint16_t*)((char*)ecx_6 + 0x200) = *(uint16_t*)((char*)ecx_6 + 0x1e0);
0062658c              *(uint16_t*)((char*)ecx_6 + 2) = *(uint16_t*)((char*)ecx_6 - 0x1e);
00626597              *(uint16_t*)((char*)ecx_6 + 0x102) = *(uint16_t*)((char*)ecx_6 + 0xe2);
006265a5              *(uint16_t*)((char*)ecx_6 + 0x202) = *(uint16_t*)((char*)ecx_6 + 0x1e2);
006265b0              *(uint16_t*)((char*)ecx_6 + 4) = *(uint16_t*)((char*)ecx_6 - 0x1c);
006265bb              *(uint16_t*)((char*)ecx_6 + 0x104) = *(uint16_t*)((char*)ecx_6 + 0xe4);
006265c9              *(uint16_t*)((char*)ecx_6 + 0x204) = *(uint16_t*)((char*)ecx_6 + 0x1e4);
006265d4              *(uint16_t*)((char*)ecx_6 + 6) = *(uint16_t*)((char*)ecx_6 - 0x1a);
006265df              *(uint16_t*)((char*)ecx_6 + 0x106) = *(uint16_t*)((char*)ecx_6 + 0xe6);
006265ed              *(uint16_t*)((char*)ecx_6 + 0x206) = *(uint16_t*)((char*)ecx_6 + 0x1e6);
006265f8              *(uint16_t*)((char*)ecx_6 + 8) = *(uint16_t*)((char*)ecx_6 - 0x18);
00626603              *(uint16_t*)((char*)ecx_6 + 0x108) = *(uint16_t*)((char*)ecx_6 + 0xe8);
00626611              *(uint16_t*)((char*)ecx_6 + 0x208) = *(uint16_t*)((char*)ecx_6 + 0x1e8);
0062661c              *(uint16_t*)((char*)ecx_6 + 0xa) = *(uint16_t*)((char*)ecx_6 - 0x16);
00626627              *(uint16_t*)((char*)ecx_6 + 0x10a) = *(uint16_t*)((char*)ecx_6 + 0xea);
00626635              *(uint16_t*)((char*)ecx_6 + 0x20a) = *(uint16_t*)((char*)ecx_6 + 0x1ea);
00626640              *(uint16_t*)((char*)ecx_6 + 0xc) = *(uint16_t*)((char*)ecx_6 - 0x14);
0062664b              *(uint16_t*)((char*)ecx_6 + 0x10c) = *(uint16_t*)((char*)ecx_6 + 0xec);
00626659              *(uint16_t*)((char*)ecx_6 + 0x20c) = *(uint16_t*)((char*)ecx_6 + 0x1ec);
00626664              *(uint16_t*)((char*)ecx_6 + 0xe) = *(uint16_t*)((char*)ecx_6 - 0x12);
0062666f              *(uint16_t*)((char*)ecx_6 + 0x10e) = *(uint16_t*)((char*)ecx_6 + 0xee);
0062667d              *(uint16_t*)((char*)ecx_6 + 0x20e) = *(uint16_t*)((char*)ecx_6 + 0x1ee);
00626688              *(uint16_t*)((char*)ecx_6 + 0x10) = *(uint16_t*)((char*)ecx_6 - 0x10);
00626693              *(uint16_t*)((char*)ecx_6 + 0x110) = *(uint16_t*)((char*)ecx_6 + 0xf0);
006266a1              *(uint16_t*)((char*)ecx_6 + 0x210) = *(uint16_t*)((char*)ecx_6 + 0x1f0);
006266ac              *(uint16_t*)((char*)ecx_6 + 0x12) = *(uint16_t*)((char*)ecx_6 - 0xe);
006266b7              *(uint16_t*)((char*)ecx_6 + 0x112) = *(uint16_t*)((char*)ecx_6 + 0xf2);
006266c5              *(uint16_t*)((char*)ecx_6 + 0x212) = *(uint16_t*)((char*)ecx_6 + 0x1f2);
006266d0              *(uint16_t*)((char*)ecx_6 + 0x14) = *(uint16_t*)((char*)ecx_6 - 0xc);
006266db              *(uint16_t*)((char*)ecx_6 + 0x114) = *(uint16_t*)((char*)ecx_6 + 0xf4);
006266e9              *(uint16_t*)((char*)ecx_6 + 0x214) = *(uint16_t*)((char*)ecx_6 + 0x1f4);
006266f4              *(uint16_t*)((char*)ecx_6 + 0x16) = *(uint16_t*)((char*)ecx_6 - 0xa);
006266ff              *(uint16_t*)((char*)ecx_6 + 0x116) = *(uint16_t*)((char*)ecx_6 + 0xf6);
0062670d              *(uint16_t*)((char*)ecx_6 + 0x216) = *(uint16_t*)((char*)ecx_6 + 0x1f6);
00626718              *(uint16_t*)((char*)ecx_6 + 0x18) = *(uint16_t*)((char*)ecx_6 - 8);
00626723              *(uint16_t*)((char*)ecx_6 + 0x118) = *(uint16_t*)((char*)ecx_6 + 0xf8);
00626731              *(uint16_t*)((char*)ecx_6 + 0x218) = *(uint16_t*)((char*)ecx_6 + 0x1f8);
0062673c              *(uint16_t*)((char*)ecx_6 + 0x1a) = *(uint16_t*)((char*)ecx_6 - 6);
00626747              *(uint16_t*)((char*)ecx_6 + 0x11a) = *(uint16_t*)((char*)ecx_6 + 0xfa);
00626755              *(uint16_t*)((char*)ecx_6 + 0x21a) = *(uint16_t*)((char*)ecx_6 + 0x1fa);
00626760              *(uint16_t*)((char*)ecx_6 + 0x1c) = *(uint16_t*)((char*)ecx_6 - 4);
0062676b              *(uint16_t*)((char*)ecx_6 + 0x11c) = *(uint16_t*)((char*)ecx_6 + 0xfc);
00626772              int16_t ebx_47 = *(uint16_t*)((char*)ecx_6 + 0x1fe);
00626779              *(uint16_t*)((char*)ecx_6 + 0x21c) = edi_7;
00626780              *(uint16_t*)((char*)ecx_6 + 0x1e) = esi_7;
00626784              *(uint16_t*)((char*)ecx_6 + 0x11e) = ebp_4;
0062678b              *(uint16_t*)((char*)ecx_6 + 0x21e) = ebx_47;
00626792              ecx_6 += 0x20;
00626798          } while (i_1 < 8);
00626544      }
00626544      
0062679e      int32_t ecx_7 = 0;
0062679e      
0062683e      for (int32_t i_2 = 0; i_2 < 0x80; i_2 += 0x10)
0062683e      {
006267af          void* j = ((char*)result + (i_2 << 1));
006267c4          void* esi_9 = ((char*)result + (i_2 << 1));
006267ca          int16_t* edi_9 = (arg5 + (ecx_7 << 1));
006267ca          
00626822          do
00626822          {
006267d3              *(uint16_t*)edi_9 = *(uint16_t*)esi_9;
006267d6              int16_t eax_16 = *(uint16_t*)((char*)esi_9 + 0x10);
006267da              esi_9 += 2;
006267dd              edi_9[0x40] = eax_16;
006267f8              edi_9[0x80] = ((int16_t)(((((int32_t)*(uint16_t*)((char*)j + 0x100)) + ((int32_t)*(uint16_t*)((char*)j + 0x102))) + 1) >> 1));
00626811              int16_t eax_22 = ((int16_t)(((((int32_t)*(uint16_t*)((char*)j + 0x200)) + ((int32_t)*(uint16_t*)((char*)j + 0x202))) + 1) >> 1));
00626813              j += 4;
00626816              edi_9[0xc0] = eax_22;
0062681d              edi_9 = &edi_9[1];
00626822          } while ((((char*)result + (i_2 << 1)) + 0x20) > j);
00626822          
00626832          ecx_7 += 8;
0062683e      }
0062683e      
0062684e      return result;
00626360  }

0062684f                                               90                                                                 .

00626850  int16_t* _BGR_to_YCbCr_422_Full_MCU_PX(void* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

00626850  {
00626857      void* edx = arg1;
0062685f      int16_t* result = arg3;
0062686d      int32_t i_1 = 0;
00626871      int16_t* var_1c = arg5;
00626875      int16_t* var_18 = arg4;
00626e02      int32_t i;
00626e02      
00626e02      do
00626e02      {
006268a3          *(uint16_t*)result = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 2)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 1)) * 0x96)) + (((uint32_t)*(uint8_t*)edx) * 0x1d)) - 0x7f80) >> 8));
006268ca          result[1] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 5)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 4)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 3)) * 0x1d)) - 0x7f80) >> 8));
006268f2          result[2] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 8)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 7)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 6)) * 0x1d)) - 0x7f80) >> 8));
0062691a          result[3] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0xb)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0xa)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 9)) * 0x1d)) - 0x7f80) >> 8));
00626942          result[4] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0xe)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0xd)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0xc)) * 0x1d)) - 0x7f80) >> 8));
0062696a          result[5] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x11)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x10)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0xf)) * 0x1d)) - 0x7f80) >> 8));
00626992          result[6] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x14)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x13)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x12)) * 0x1d)) - 0x7f80) >> 8));
006269ba          result[7] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x17)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x16)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x15)) * 0x1d)) - 0x7f80) >> 8));
006269e2          result[0x40] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x1a)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x19)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x18)) * 0x1d)) - 0x7f80) >> 8));
00626a0d          result[0x41] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x1d)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x1c)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x1b)) * 0x1d)) - 0x7f80) >> 8));
00626a38          result[0x42] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x20)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x1f)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x1e)) * 0x1d)) - 0x7f80) >> 8));
00626a63          result[0x43] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x23)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x22)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x21)) * 0x1d)) - 0x7f80) >> 8));
00626a8e          result[0x44] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x26)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x25)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x24)) * 0x1d)) - 0x7f80) >> 8));
00626ab9          result[0x45] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x29)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x28)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x27)) * 0x1d)) - 0x7f80) >> 8));
00626ae4          result[0x46] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x2c)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x2b)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x2a)) * 0x1d)) - 0x7f80) >> 8));
00626b0f          result[0x47] = ((int16_t)(((((((uint32_t)*(uint8_t*)((char*)edx + 0x2f)) * 0x4d) + (((uint32_t)*(uint8_t*)((char*)edx + 0x2e)) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)edx + 0x2d)) * 0x1d)) - 0x7f80) >> 8));
00626b1d          uint32_t esi_3 = (((uint32_t)*(uint8_t*)edx) + ((uint32_t)*(uint8_t*)((char*)edx + 3)));
00626b27          uint32_t ebp_2 = (((uint32_t)*(uint8_t*)((char*)edx + 1)) + ((uint32_t)*(uint8_t*)((char*)edx + 4)));
00626b31          uint32_t ebx_34 = (((uint32_t)*(uint8_t*)((char*)edx + 2)) + ((uint32_t)*(uint8_t*)((char*)edx + 5)));
00626b51          *(uint16_t*)var_18 = ((int16_t)(((((esi_3 << 7) + (ebp_2 * 0xffffffab)) + (ebx_34 * 0xffffffd5)) + 0x100) >> 9));
00626b6a          result = &result[8];
00626b6d          *(uint16_t*)var_1c = ((int16_t)(((((esi_3 * 0xffffffeb) + (ebp_2 * 0xffffff95)) + (ebx_34 << 7)) + 0x100) >> 9));
00626b78          uint32_t esi_7 = (((uint32_t)*(uint8_t*)((char*)edx + 6)) + ((uint32_t)*(uint8_t*)((char*)edx + 9)));
00626b82          uint32_t ebp_4 = (((uint32_t)*(uint8_t*)((char*)edx + 7)) + ((uint32_t)*(uint8_t*)((char*)edx + 0xa)));
00626b8c          uint32_t ebx_38 = (((uint32_t)*(uint8_t*)((char*)edx + 8)) + ((uint32_t)*(uint8_t*)((char*)edx + 0xb)));
00626ba9          var_18[1] = ((int16_t)(((((esi_7 << 7) + (ebp_4 * 0xffffffab)) + (ebx_38 * 0xffffffd5)) + 0x100) >> 9));
00626bc6          var_1c[1] = ((int16_t)(((((esi_7 * 0xffffffeb) + (ebp_4 * 0xffffff95)) + (ebx_38 << 7)) + 0x100) >> 9));
00626bd2          uint32_t esi_11 = (((uint32_t)*(uint8_t*)((char*)edx + 0xc)) + ((uint32_t)*(uint8_t*)((char*)edx + 0xf)));
00626bdc          uint32_t ebp_6 = (((uint32_t)*(uint8_t*)((char*)edx + 0xd)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x10)));
00626be6          uint32_t ebx_42 = (((uint32_t)*(uint8_t*)((char*)edx + 0xe)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x11)));
00626c03          var_18[2] = ((int16_t)(((((esi_11 << 7) + (ebp_6 * 0xffffffab)) + (ebx_42 * 0xffffffd5)) + 0x100) >> 9));
00626c20          var_1c[2] = ((int16_t)(((((esi_11 * 0xffffffeb) + (ebp_6 * 0xffffff95)) + (ebx_42 << 7)) + 0x100) >> 9));
00626c2c          uint32_t esi_15 = (((uint32_t)*(uint8_t*)((char*)edx + 0x12)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x15)));
00626c36          uint32_t ebp_8 = (((uint32_t)*(uint8_t*)((char*)edx + 0x13)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x16)));
00626c40          uint32_t ebx_46 = (((uint32_t)*(uint8_t*)((char*)edx + 0x14)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x17)));
00626c5d          var_18[3] = ((int16_t)(((((esi_15 << 7) + (ebp_8 * 0xffffffab)) + (ebx_46 * 0xffffffd5)) + 0x100) >> 9));
00626c7a          var_1c[3] = ((int16_t)(((((esi_15 * 0xffffffeb) + (ebp_8 * 0xffffff95)) + (ebx_46 << 7)) + 0x100) >> 9));
00626c86          uint32_t esi_19 = (((uint32_t)*(uint8_t*)((char*)edx + 0x18)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x1b)));
00626c90          uint32_t ebp_10 = (((uint32_t)*(uint8_t*)((char*)edx + 0x19)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x1c)));
00626c9a          uint32_t ebx_50 = (((uint32_t)*(uint8_t*)((char*)edx + 0x1a)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x1d)));
00626cb7          var_18[4] = ((int16_t)(((((esi_19 << 7) + (ebp_10 * 0xffffffab)) + (ebx_50 * 0xffffffd5)) + 0x100) >> 9));
00626cd4          var_1c[4] = ((int16_t)(((((esi_19 * 0xffffffeb) + (ebp_10 * 0xffffff95)) + (ebx_50 << 7)) + 0x100) >> 9));
00626ce0          uint32_t esi_23 = (((uint32_t)*(uint8_t*)((char*)edx + 0x1e)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x21)));
00626cea          uint32_t ebp_12 = (((uint32_t)*(uint8_t*)((char*)edx + 0x1f)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x22)));
00626cf4          uint32_t ebx_54 = (((uint32_t)*(uint8_t*)((char*)edx + 0x20)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x23)));
00626d11          var_18[5] = ((int16_t)(((((esi_23 << 7) + (ebp_12 * 0xffffffab)) + (ebx_54 * 0xffffffd5)) + 0x100) >> 9));
00626d2e          var_1c[5] = ((int16_t)(((((esi_23 * 0xffffffeb) + (ebp_12 * 0xffffff95)) + (ebx_54 << 7)) + 0x100) >> 9));
00626d3a          uint32_t ebp_14 = (((uint32_t)*(uint8_t*)((char*)edx + 0x24)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x27)));
00626d44          uint32_t ebx_58 = (((uint32_t)*(uint8_t*)((char*)edx + 0x25)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x28)));
00626d4e          uint32_t ecx_182 = (((uint32_t)*(uint8_t*)((char*)edx + 0x26)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x29)));
00626d6b          var_18[6] = ((int16_t)(((((ebp_14 << 7) + (ebx_58 * 0xffffffab)) + (ecx_182 * 0xffffffd5)) + 0x100) >> 9));
00626d88          var_1c[6] = ((int16_t)(((((ebp_14 * 0xffffffeb) + (ebx_58 * 0xffffff95)) + (ecx_182 << 7)) + 0x100) >> 9));
00626d94          uint32_t esi_32 = (((uint32_t)*(uint8_t*)((char*)edx + 0x2a)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x2d)));
00626d9e          uint32_t ebp_18 = (((uint32_t)*(uint8_t*)((char*)edx + 0x2b)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x2e)));
00626da8          uint32_t ebx_62 = (((uint32_t)*(uint8_t*)((char*)edx + 0x2c)) + ((uint32_t)*(uint8_t*)((char*)edx + 0x2f)));
00626dc5          var_18[7] = ((int16_t)(((((esi_32 << 7) + (ebp_18 * 0xffffffab)) + (ebx_62 * 0xffffffd5)) + 0x100) >> 9));
00626de2          var_1c[7] = ((int16_t)(((((esi_32 * 0xffffffeb) + (ebp_18 * 0xffffff95)) + (ebx_62 << 7)) + 0x100) >> 9));
00626ded          var_18 = &var_18[8];
00626df2          i = (i_1 + 1);
00626df3          var_1c = &var_1c[8];
00626df7          edx += arg2;
00626dfb          i_1 = i;
00626e02      } while (i < 8);
00626e0f      return result;
00626850  }


00626e10  int64_t* _BGR_to_YCbCr_422_Full_MCU_M5(int64_t* arg1, int32_t arg2, uint8_t (* arg3)[0x8], void* arg4, void* arg5)

00626e10  {
00626e3c      _own_bgr_to_ycbcr_422_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00626e46      return arg1;
00626e10  }

00626e47                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00626e50  void BGR_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

00626e50  {
00626e5b      int32_t edi = 0x10;
00626e60      int32_t esi = 8;
00626e65      int32_t DIBLineBytes = arg1->DIBLineBytes;
00626e68      uint8_t* MCUBuf = arg1->MCUBuf;
00626e6e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
00626e6e      
00626e86      if ((arg1->numxMCUs - 1) != arg2)
00626ec5          arg1->state.DIB_ptr = &DIB_ptr[0x30];
00626e86      else
00626e86      {
00626e8f          int32_t eax_5;
00626e8f          int32_t edx_1;
00626e8f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
00626e8f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
00626e99          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
00626e99          
00626e9d          if (eax_10 != 0)
00626e9f              edi = eax_10;
00626e9f          
00626eb6          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
00626e86      }
00626e86      
00626ed9      if (arg3 == (arg1->numyMCUs - 1))
00626ed9      {
00626ee2          int32_t eax_19;
00626ee2          int32_t edx_7;
00626ee2          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
00626ee2          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
00626ee7          int32_t eax_22;
00626ee7          int32_t edx_8;
00626ee7          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
00626ee7          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
00626ef1          int32_t eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
00626ef1          
00626ef5          if (eax_27 != 0)
00626ef7              esi = eax_27;
00626ed9      }
00626ed9      
00626f21      if ((edi != 0x10 || esi != 8))
00626f21      {
00626f11          sub_626360(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
00626f1d          return;
00626f21      }
00626f21      
00626f46      *(uint32_t*)(arg1->state.ctx + 0x78)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x100], &MCUBuf[0x180]);
00626e50  }

00626f51                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

00626f60  void* sub_626f60(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00626f60  {
00626f61      uint32_t esi;
00626f61      uint32_t var_8 = esi;
00626f7c      void var_240;
00626f7c      void* result = &var_240;
00626f7f      int32_t i_1 = 0;
00626f7f      
00626f83      if (arg4 > 0)
00626f83      {
00626f8b          void* ecx_1 = nullptr;
00626f93          esi = 0;
00626f97          int32_t edi_1 = 0;
00626f9a          void* result_1 = &var_240;
00626f9a          
00627180          do
00627180          {
00626fa1              int32_t i = 0;
00626fa1              
00626fac              if (arg3 > 0)
00626fac              {
00626fb2                  void* ebp_1 = ecx_1;
00626fb5                  int32_t ebx_2 = esi;
00626fc6                  int32_t i_3 = 0;
00626fcd                  int32_t esi_1 = arg1;
00626fcd                  
006270ba                  do
006270ba                  {
00626ff5                      int32_t eax_3 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)((char*)ebp_1 + esi_1)))) + 0xff));
00627005                      int32_t edx_3 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)(((char*)ebp_1 + esi_1) + 1)))) + 0xff));
00627015                      int32_t ecx_5 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)(((char*)ebp_1 + esi_1) + 2)))) + 0xff));
0062701d                      int16_t edi_3 = (((uint16_t)*(uint8_t*)(((char*)ebp_1 + esi_1) + 3)) - 0x80);
0062703f                      *(uint16_t*)((char*)result_1 + (ebx_2 << 1)) = ((int16_t)(((((eax_3 * 0x4d) + (edx_3 * 0x96)) + (ecx_5 * 0x1d)) - 0x7f80) >> 8));
00627061                      *(uint16_t*)(((char*)result_1 + (ebx_2 << 1)) + 0x80) = ((int16_t)(((((eax_3 * 0xffffffd5) + (edx_3 * 0xffffffab)) + (ecx_5 << 7)) + 0x80) >> 8));
00627087                      *(uint16_t*)(((char*)result_1 + (ebx_2 << 1)) + 0x100) = ((int16_t)(((((eax_3 << 7) + (edx_3 * 0xffffff95)) + (ecx_5 * 0xffffffeb)) + 0x80) >> 8));
0062708f                      ebp_1 += 4;
00627099                      *(uint16_t*)(((char*)result_1 + (ebx_2 << 1)) + 0x180) = edi_3;
006270a1                      ebx_2 += 1;
006270a2                      i = (i_3 + 1);
006270a3                      i_3 = i;
006270b3                      esi_1 = arg1;
006270ba                  } while (i < arg3);
00626fac              }
00626fac              
006270df              if (i < 8)
006270df              {
006270ec                  void* ebp_11 = ((char*)result_1 + edi_1);
006270f9                  void* ebx_4 = ((char*)result_1 + ((i + esi) << 1));
006270f9                  
00627159                  do
00627159                  {
00627125                      i += 1;
00627126                      *(uint16_t*)ebx_4 = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) - 2);
0062712e                      *(uint16_t*)((char*)ebx_4 + 0x80) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0x7e);
0062713d                      *(uint16_t*)((char*)ebx_4 + 0x100) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0xfe);
0062714c                      *(uint16_t*)((char*)ebx_4 + 0x180) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0x17e);
00627153                      ebx_4 += 2;
00627159                  } while (i < 8);
006270df              }
006270df              
00627169              ecx_1 += arg2;
00627170              esi += 8;
00627173              edi_1 += 0x10;
00627176              i_1 += 1;
00627180          } while (i_1 < arg4);
00627180          
00627186          result = result_1;
00626f83      }
00626f83      
00627190      if (i_1 < 8)
00627190      {
00627197          int32_t ecx_8 = (i_1 * 8);
0062719e          void* j_2 = ((i_1 << 4) + result);
0062719e          
006271fa          do
006271fa          {
006271a0              void* j = j_2;
006271a5              void* ebp_14 = ((char*)result + (ecx_8 << 1));
006271a5              
006271e7              do
006271e7              {
006271b4                  *(uint16_t*)ebp_14 = *(uint16_t*)((char*)j - 0x10);
006271bc                  *(uint16_t*)((char*)ebp_14 + 0x80) = *(uint16_t*)((char*)j + 0x70);
006271ca                  *(uint16_t*)((char*)ebp_14 + 0x100) = *(uint16_t*)((char*)j + 0xf0);
006271d1                  int16_t eax_13 = *(uint16_t*)((char*)j + 0x170);
006271d8                  j += 2;
006271db                  *(uint16_t*)((char*)ebp_14 + 0x180) = eax_13;
006271e2                  ebp_14 += 2;
006271e7              } while (((char*)j_2 + 0x10) > j);
006271e7              
006271f0              ecx_8 += 8;
006271f3              j_2 += 0x10;
006271f6              i_1 += 1;
006271fa          } while (i_1 < 8);
00627190      }
00627190      
00627254      for (int32_t i_2 = 0; i_2 < 0x40; i_2 += 8)
00627254      {
00627205          int32_t j_1 = i_2;
00627205          
0062724c          do
0062724c          {
00627214              *(uint16_t*)(arg5 + (j_1 << 1)) = *(uint16_t*)((char*)result + (j_1 << 1));
00627221              *(uint16_t*)((arg5 + (j_1 << 1)) + 0x80) = *(uint16_t*)(((char*)result + (j_1 << 1)) + 0x80);
00627231              *(uint16_t*)((arg5 + (j_1 << 1)) + 0x100) = *(uint16_t*)(((char*)result + (j_1 << 1)) + 0x100);
00627241              *(uint16_t*)((arg5 + (j_1 << 1)) + 0x180) = *(uint16_t*)(((char*)result + (j_1 << 1)) + 0x180);
00627249              j_1 += 1;
0062724c          } while ((i_2 + 8) > j_1);
00627254      }
00627254      
00627260      return result;
00626f60  }

00627261     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

00627270  int16_t* _RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_PX(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5, int16_t* arg6)

00627270  {
00627277      char* ebp = arg1;
0062727f      int16_t* ebx = arg3;
00627283      int16_t* ecx = arg4;
00627287      int16_t* edx = arg5;
0062728b      int16_t* result = arg6;
00627291      int32_t var_18 = 0;
00627770      bool cond:0_1;
00627770      
00627770      do
00627770      {
006272c8          *(uint16_t*)ebx = ((int16_t)(((((-(((uint32_t)*(uint8_t*)ebp)) * 0x4d) + (-(((uint32_t)ebp[1])) * 0x96)) + (((uint32_t)ebp[2]) * 0xffffffe3)) + 0x7f80) >> 8));
006272f3          ebx[1] = ((int16_t)(((((-(((uint32_t)ebp[4])) * 0x4d) + (-(((uint32_t)ebp[5])) * 0x96)) + (((uint32_t)ebp[6]) * 0xffffffe3)) + 0x7f80) >> 8));
0062731f          ebx[2] = ((int16_t)(((((-(((uint32_t)ebp[8])) * 0x4d) + (-(((uint32_t)ebp[9])) * 0x96)) + (((uint32_t)ebp[0xa]) * 0xffffffe3)) + 0x7f80) >> 8));
0062734b          ebx[3] = ((int16_t)(((((-(((uint32_t)ebp[0xc])) * 0x4d) + (-(((uint32_t)ebp[0xd])) * 0x96)) + (((uint32_t)ebp[0xe]) * 0xffffffe3)) + 0x7f80) >> 8));
00627377          ebx[4] = ((int16_t)(((((-(((uint32_t)ebp[0x10])) * 0x4d) + (-(((uint32_t)ebp[0x11])) * 0x96)) + (((uint32_t)ebp[0x12]) * 0xffffffe3)) + 0x7f80) >> 8));
006273a3          ebx[5] = ((int16_t)(((((-(((uint32_t)ebp[0x14])) * 0x4d) + (-(((uint32_t)ebp[0x15])) * 0x96)) + (((uint32_t)ebp[0x16]) * 0xffffffe3)) + 0x7f80) >> 8));
006273cf          ebx[6] = ((int16_t)(((((-(((uint32_t)ebp[0x18])) * 0x4d) + (-(((uint32_t)ebp[0x19])) * 0x96)) + (((uint32_t)ebp[0x1a]) * 0xffffffe3)) + 0x7f80) >> 8));
006273fb          ebx[7] = ((int16_t)(((((-(((uint32_t)ebp[0x1c])) * 0x4d) + (-(((uint32_t)ebp[0x1d])) * 0x96)) + (((uint32_t)ebp[0x1e]) * 0xffffffe3)) + 0x7f80) >> 8));
00627406          *(uint16_t*)result = (((uint16_t)ebp[3]) - 0x80);
00627410          result[1] = (((uint16_t)ebp[7]) - 0x80);
0062741b          result[2] = (((uint16_t)ebp[0xb]) - 0x80);
00627426          result[3] = (((uint16_t)ebp[0xf]) - 0x80);
00627431          result[4] = (((uint16_t)ebp[0x13]) - 0x80);
0062743c          result[5] = (((uint16_t)ebp[0x17]) - 0x80);
00627447          result[6] = (((uint16_t)ebp[0x1b]) - 0x80);
00627452          result[7] = (((uint16_t)ebp[0x1f]) - 0x80);
00627483          ebx = &ebx[8];
00627486          *(uint16_t*)ecx = ((int16_t)(((((-(((uint32_t)*(uint8_t*)ebp)) * 0xffffffd5) + (-(((uint32_t)ebp[1])) * 0xffffffab)) + ((-(((uint32_t)ebp[2])) + 0xff) << 7)) - 0x7f00) >> 8));
006274b6          result = &result[8];
006274b9          ecx[1] = ((int16_t)(((((-(((uint32_t)ebp[4])) * 0xffffffd5) + (-(((uint32_t)ebp[5])) * 0xffffffab)) + ((-(((uint32_t)ebp[6])) + 0xff) << 7)) - 0x7f00) >> 8));
006274ea          ecx[2] = ((int16_t)(((((-(((uint32_t)ebp[8])) * 0xffffffd5) + (-(((uint32_t)ebp[9])) * 0xffffffab)) + ((-(((uint32_t)ebp[0xa])) + 0xff) << 7)) - 0x7f00) >> 8));
0062751b          ecx[3] = ((int16_t)(((((-(((uint32_t)ebp[0xc])) * 0xffffffd5) + (-(((uint32_t)ebp[0xd])) * 0xffffffab)) + ((-(((uint32_t)ebp[0xe])) + 0xff) << 7)) - 0x7f00) >> 8));
0062754c          ecx[4] = ((int16_t)(((((-(((uint32_t)ebp[0x10])) * 0xffffffd5) + (-(((uint32_t)ebp[0x11])) * 0xffffffab)) + ((-(((uint32_t)ebp[0x12])) + 0xff) << 7)) - 0x7f00) >> 8));
0062757d          ecx[5] = ((int16_t)(((((-(((uint32_t)ebp[0x14])) * 0xffffffd5) + (-(((uint32_t)ebp[0x15])) * 0xffffffab)) + ((-(((uint32_t)ebp[0x16])) + 0xff) << 7)) - 0x7f00) >> 8));
006275ae          ecx[6] = ((int16_t)(((((-(((uint32_t)ebp[0x18])) * 0xffffffd5) + (-(((uint32_t)ebp[0x19])) * 0xffffffab)) + ((-(((uint32_t)ebp[0x1a])) + 0xff) << 7)) - 0x7f00) >> 8));
006275df          ecx[7] = ((int16_t)(((((-(((uint32_t)ebp[0x1c])) * 0xffffffd5) + (-(((uint32_t)ebp[0x1d])) * 0xffffffab)) + ((-(((uint32_t)ebp[0x1e])) + 0xff) << 7)) - 0x7f00) >> 8));
0062760e          ecx = &ecx[8];
00627611          *(uint16_t*)edx = ((int16_t)((((((-(((uint32_t)*(uint8_t*)ebp)) + 0xff) << 7) + (-(((uint32_t)ebp[1])) * 0xffffff95)) + (((uint32_t)ebp[2]) * 0x15)) - 0x7f00) >> 8));
0062763f          edx[1] = ((int16_t)((((((-(((uint32_t)ebp[4])) + 0xff) << 7) + (-(((uint32_t)ebp[5])) * 0xffffff95)) + (((uint32_t)ebp[6]) * 0x15)) - 0x7f00) >> 8));
0062766e          edx[2] = ((int16_t)((((((-(((uint32_t)ebp[8])) + 0xff) << 7) + (-(((uint32_t)ebp[9])) * 0xffffff95)) + (((uint32_t)ebp[0xa]) * 0x15)) - 0x7f00) >> 8));
0062769d          edx[3] = ((int16_t)((((((-(((uint32_t)ebp[0xc])) + 0xff) << 7) + (-(((uint32_t)ebp[0xd])) * 0xffffff95)) + (((uint32_t)ebp[0xe]) * 0x15)) - 0x7f00) >> 8));
006276cc          edx[4] = ((int16_t)((((((-(((uint32_t)ebp[0x10])) + 0xff) << 7) + (-(((uint32_t)ebp[0x11])) * 0xffffff95)) + (((uint32_t)ebp[0x12]) * 0x15)) - 0x7f00) >> 8));
006276fb          edx[5] = ((int16_t)((((((-(((uint32_t)ebp[0x14])) + 0xff) << 7) + (-(((uint32_t)ebp[0x15])) * 0xffffff95)) + (((uint32_t)ebp[0x16]) * 0x15)) - 0x7f00) >> 8));
0062772a          edx[6] = ((int16_t)((((((-(((uint32_t)ebp[0x18])) + 0xff) << 7) + (-(((uint32_t)ebp[0x19])) * 0xffffff95)) + (((uint32_t)ebp[0x1a]) * 0x15)) - 0x7f00) >> 8));
00627759          edx[7] = ((int16_t)((((((-(((uint32_t)ebp[0x1c])) + 0xff) << 7) + (-(((uint32_t)ebp[0x1d])) * 0xffffff95)) + (((uint32_t)ebp[0x1e]) * 0x15)) - 0x7f00) >> 8));
0062775d          edx = &edx[8];
00627765          ebp = &ebp[arg2];
00627769          cond:0_1 = (var_18 + 1) < 8;
0062776c          var_18 += 1;
00627770      } while (cond:0_1);
0062777d      return result;
00627270  }

0062777e                                                                                            8b f6                                ..

00627780  int64_t* _RGBA_FPX_to_YCbCrA_FPX_1111_Full_MCU_M5(int64_t* arg1, int32_t arg2, void* arg3, int16_t (* arg4)[0x4], int64_t* arg5, int32_t arg6)

00627780  {
006277b1      int32_t var_10 = arg6;
006277b5      _own_rgba_fpx_to_ycbcra_fpx_1111_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
006277c0      return arg1;
00627780  }

006277c1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

006277d0  void RGBA_FPX_to_YCbCrA_FPX_1111_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

006277d0  {
006277db      int32_t edi = 8;
006277e0      int32_t esi = 8;
006277e5      int32_t DIBLineBytes = arg1->DIBLineBytes;
006277e8      uint8_t* MCUBuf = arg1->MCUBuf;
006277ee      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
006277ee      
00627806      if ((arg1->numxMCUs - 1) != arg2)
00627845          arg1->state.DIB_ptr = &DIB_ptr[0x20];
00627806      else
00627806      {
0062780f          int32_t eax_5;
0062780f          int32_t edx_1;
0062780f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062780f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
00627819          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 7) ^ edx_1) - edx_1);
00627819          
0062781d          if (eax_10 != 0)
0062781f              edi = eax_10;
0062781f          
00627836          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
00627806      }
00627806      
00627859      if (arg3 == (arg1->numyMCUs - 1))
00627859      {
00627862          int32_t eax_19;
00627862          int32_t edx_7;
00627862          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
00627862          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
00627867          int32_t eax_22;
00627867          int32_t edx_8;
00627867          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
00627867          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
00627871          int32_t eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
00627871          
00627875          if (eax_27 != 0)
00627877              esi = eax_27;
00627859      }
00627859      
006278a1      if ((edi != 8 || esi != 8))
006278a1      {
00627891          sub_626f60(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062789d          return;
006278a1      }
006278a1      
006278d0      *(uint32_t*)(arg1->state.ctx + 0x90)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x80], &MCUBuf[0x100], &MCUBuf[0x180]);
006277d0  }

006278de                                                                                            8b f6                                ..

006278e0  void* sub_6278e0(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

006278e0  {
006278fc      void var_840;
006278fc      void* result = &var_840;
006278ff      int32_t i_1 = 0;
006278ff      
00627903      if (arg4 > 0)
00627903      {
0062790b          void* ecx_1 = nullptr;
00627910          int32_t esi_1 = 0;
00627915          int32_t edi_1 = 0;
00627918          void* result_1 = &var_840;
00627918          
00627b03          do
00627b03          {
0062791f              int32_t i = 0;
0062791f              
0062792a              if (arg3 > 0)
0062792a              {
00627930                  void* ebp_1 = ecx_1;
00627933                  int32_t ebx_2 = esi_1;
00627944                  int32_t i_3 = 0;
0062794b                  int32_t esi_2 = arg1;
0062794b                  
00627a38                  do
00627a38                  {
00627973                      int32_t eax_3 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)((char*)ebp_1 + esi_2)))) + 0xff));
00627983                      int32_t edx_3 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)(((char*)ebp_1 + esi_2) + 1)))) + 0xff));
00627993                      int32_t ecx_5 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)(((char*)ebp_1 + esi_2) + 2)))) + 0xff));
0062799b                      int16_t edi_3 = (((uint16_t)*(uint8_t*)(((char*)ebp_1 + esi_2) + 3)) - 0x80);
006279bd                      *(uint16_t*)((char*)result_1 + (ebx_2 << 1)) = ((int16_t)(((((eax_3 * 0x4d) + (edx_3 * 0x96)) + (ecx_5 * 0x1d)) - 0x7f80) >> 8));
006279df                      *(uint16_t*)(((char*)result_1 + (ebx_2 << 1)) + 0x100) = ((int16_t)(((((eax_3 * 0xffffffd5) + (edx_3 * 0xffffffab)) + (ecx_5 << 7)) + 0x80) >> 8));
00627a05                      *(uint16_t*)(((char*)result_1 + (ebx_2 << 1)) + 0x200) = ((int16_t)(((((eax_3 << 7) + (edx_3 * 0xffffff95)) + (ecx_5 * 0xffffffeb)) + 0x80) >> 8));
00627a0d                      ebp_1 += 4;
00627a17                      *(uint16_t*)(((char*)result_1 + (ebx_2 << 1)) + 0x300) = edi_3;
00627a1f                      ebx_2 += 1;
00627a20                      i = (i_3 + 1);
00627a21                      i_3 = i;
00627a31                      esi_2 = arg1;
00627a38                  } while (i < arg3);
0062792a              }
0062792a              
00627a5d              if (i < 0x10)
00627a5d              {
00627a6a                  void* ebp_11 = ((char*)result_1 + edi_1);
00627a77                  void* ebx_4 = ((char*)result_1 + ((i + esi_1) << 1));
00627a77                  
00627adc                  do
00627adc                  {
00627aa5                      i += 1;
00627aa6                      *(uint16_t*)ebx_4 = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) - 2);
00627ab1                      *(uint16_t*)((char*)ebx_4 + 0x100) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0xfe);
00627ac0                      *(uint16_t*)((char*)ebx_4 + 0x200) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0x1fe);
00627acf                      *(uint16_t*)((char*)ebx_4 + 0x300) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0x2fe);
00627ad6                      ebx_4 += 2;
00627adc                  } while (i < 0x10);
00627a5d              }
00627a5d              
00627aec              ecx_1 += arg2;
00627af3              esi_1 += 0x10;
00627af6              edi_1 += 0x20;
00627af9              i_1 += 1;
00627b03          } while (i_1 < arg4);
00627b03          
00627b09          result = result_1;
00627903      }
00627903      
00627b13      if (i_1 < 8)
00627b13      {
00627b17          int32_t ecx_7 = (i_1 << 4);
00627b1f          void* j_2 = ((i_1 << 5) + result);
00627b1f          
00627b7d          do
00627b7d          {
00627b21              void* j = j_2;
00627b26              void* ebp_14 = ((char*)result + (ecx_7 << 1));
00627b26              
00627b6a              do
00627b6a              {
00627b34                  *(uint16_t*)ebp_14 = *(uint16_t*)((char*)j - 0x20);
00627b3f                  *(uint16_t*)((char*)ebp_14 + 0x100) = *(uint16_t*)((char*)j + 0xe0);
00627b4d                  *(uint16_t*)((char*)ebp_14 + 0x200) = *(uint16_t*)((char*)j + 0x1e0);
00627b54                  int16_t eax_13 = *(uint16_t*)((char*)j + 0x2e0);
00627b5b                  j += 2;
00627b5e                  *(uint16_t*)((char*)ebp_14 + 0x300) = eax_13;
00627b65                  ebp_14 += 2;
00627b6a              } while (((char*)j_2 + 0x20) > j);
00627b6a              
00627b73              ecx_7 += 0x10;
00627b76              j_2 += 0x20;
00627b79              i_1 += 1;
00627b7d          } while (i_1 < 8);
00627b13      }
00627b13      
00627b7f      int32_t ecx_8 = 0;
00627b7f      
00627c3a      for (int32_t i_2 = 0; i_2 < 0x80; i_2 += 0x10)
00627c3a      {
00627b90          void* j_1 = ((char*)result + (i_2 << 1));
00627ba5          void* esi_12 = ((char*)result + (i_2 << 1));
00627ba9          int16_t* edi_10 = (arg5 + (ecx_8 << 1));
00627ba9          
00627c1e          do
00627c1e          {
00627bb3              *(uint16_t*)edi_10 = *(uint16_t*)esi_12;
00627bba              edi_10[0x40] = *(uint16_t*)((char*)esi_12 + 0x10);
00627bd5              edi_10[0x80] = ((int16_t)(((((int32_t)*(uint16_t*)((char*)j_1 + 0x100)) + ((int32_t)*(uint16_t*)((char*)j_1 + 0x102))) + 1) >> 1));
00627bee              int16_t eax_21 = ((int16_t)(((((int32_t)*(uint16_t*)((char*)j_1 + 0x200)) + ((int32_t)*(uint16_t*)((char*)j_1 + 0x202))) + 1) >> 1));
00627bf0              j_1 += 4;
00627bf3              edi_10[0xc0] = eax_21;
00627c01              edi_10[0x100] = *(uint16_t*)((char*)esi_12 + 0x300);
00627c08              int16_t eax_22 = *(uint16_t*)((char*)esi_12 + 0x310);
00627c0f              esi_12 += 2;
00627c12              edi_10[0x140] = eax_22;
00627c19              edi_10 = &edi_10[1];
00627c1e          } while ((((char*)result + (i_2 << 1)) + 0x20) > j_1);
00627c1e          
00627c2e          ecx_8 += 8;
00627c3a      }
00627c3a      
00627c4a      return result;
006278e0  }

00627c4b                                   90 8d 74 26 00                                                             ..t&.

00627c50  int16_t* _RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_PX(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5, int16_t* arg6)

00627c50  {
00627c57      char* edx = arg1;
00627c5f      int16_t* result = arg3;
00627c71      int32_t i_1 = 0;
00627c75      int16_t* var_1c = arg6;
00627c79      int16_t* var_18 = arg5;
00627c7d      int16_t* var_14 = arg4;
006283d1      int32_t i;
006283d1      
006283d1      do
006283d1      {
00627ca8          *(uint16_t*)result = ((int16_t)(((((-(((uint32_t)*(uint8_t*)edx)) * 0x4d) + (-(((uint32_t)edx[1])) * 0x96)) + (((uint32_t)edx[2]) * 0xffffffe3)) + 0x7f80) >> 8));
00627cd3          result[1] = ((int16_t)(((((-(((uint32_t)edx[4])) * 0x4d) + (-(((uint32_t)edx[5])) * 0x96)) + (((uint32_t)edx[6]) * 0xffffffe3)) + 0x7f80) >> 8));
00627cff          result[2] = ((int16_t)(((((-(((uint32_t)edx[8])) * 0x4d) + (-(((uint32_t)edx[9])) * 0x96)) + (((uint32_t)edx[0xa]) * 0xffffffe3)) + 0x7f80) >> 8));
00627d2b          result[3] = ((int16_t)(((((-(((uint32_t)edx[0xc])) * 0x4d) + (-(((uint32_t)edx[0xd])) * 0x96)) + (((uint32_t)edx[0xe]) * 0xffffffe3)) + 0x7f80) >> 8));
00627d57          result[4] = ((int16_t)(((((-(((uint32_t)edx[0x10])) * 0x4d) + (-(((uint32_t)edx[0x11])) * 0x96)) + (((uint32_t)edx[0x12]) * 0xffffffe3)) + 0x7f80) >> 8));
00627d83          result[5] = ((int16_t)(((((-(((uint32_t)edx[0x14])) * 0x4d) + (-(((uint32_t)edx[0x15])) * 0x96)) + (((uint32_t)edx[0x16]) * 0xffffffe3)) + 0x7f80) >> 8));
00627daf          result[6] = ((int16_t)(((((-(((uint32_t)edx[0x18])) * 0x4d) + (-(((uint32_t)edx[0x19])) * 0x96)) + (((uint32_t)edx[0x1a]) * 0xffffffe3)) + 0x7f80) >> 8));
00627ddb          result[7] = ((int16_t)(((((-(((uint32_t)edx[0x1c])) * 0x4d) + (-(((uint32_t)edx[0x1d])) * 0x96)) + (((uint32_t)edx[0x1e]) * 0xffffffe3)) + 0x7f80) >> 8));
00627e07          result[0x40] = ((int16_t)(((((-(((uint32_t)edx[0x20])) * 0x4d) + (-(((uint32_t)edx[0x21])) * 0x96)) + (((uint32_t)edx[0x22]) * 0xffffffe3)) + 0x7f80) >> 8));
00627e36          result[0x41] = ((int16_t)(((((-(((uint32_t)edx[0x24])) * 0x4d) + (-(((uint32_t)edx[0x25])) * 0x96)) + (((uint32_t)edx[0x26]) * 0xffffffe3)) + 0x7f80) >> 8));
00627e65          result[0x42] = ((int16_t)(((((-(((uint32_t)edx[0x28])) * 0x4d) + (-(((uint32_t)edx[0x29])) * 0x96)) + (((uint32_t)edx[0x2a]) * 0xffffffe3)) + 0x7f80) >> 8));
00627e94          result[0x43] = ((int16_t)(((((-(((uint32_t)edx[0x2c])) * 0x4d) + (-(((uint32_t)edx[0x2d])) * 0x96)) + (((uint32_t)edx[0x2e]) * 0xffffffe3)) + 0x7f80) >> 8));
00627ec3          result[0x44] = ((int16_t)(((((-(((uint32_t)edx[0x30])) * 0x4d) + (-(((uint32_t)edx[0x31])) * 0x96)) + (((uint32_t)edx[0x32]) * 0xffffffe3)) + 0x7f80) >> 8));
00627ef2          result[0x45] = ((int16_t)(((((-(((uint32_t)edx[0x34])) * 0x4d) + (-(((uint32_t)edx[0x35])) * 0x96)) + (((uint32_t)edx[0x36]) * 0xffffffe3)) + 0x7f80) >> 8));
00627f21          result[0x46] = ((int16_t)(((((-(((uint32_t)edx[0x38])) * 0x4d) + (-(((uint32_t)edx[0x39])) * 0x96)) + (((uint32_t)edx[0x3a]) * 0xffffffe3)) + 0x7f80) >> 8));
00627f50          result[0x47] = ((int16_t)(((((-(((uint32_t)edx[0x3c])) * 0x4d) + (-(((uint32_t)edx[0x3d])) * 0x96)) + (((uint32_t)edx[0x3e]) * 0xffffffe3)) + 0x7f80) >> 8));
00627f62          *(uint16_t*)var_1c = (((uint16_t)edx[3]) - 0x80);
00627f6c          var_1c[1] = (((uint16_t)edx[7]) - 0x80);
00627f77          var_1c[2] = (((uint16_t)edx[0xb]) - 0x80);
00627f82          var_1c[3] = (((uint16_t)edx[0xf]) - 0x80);
00627f8d          var_1c[4] = (((uint16_t)edx[0x13]) - 0x80);
00627f98          var_1c[5] = (((uint16_t)edx[0x17]) - 0x80);
00627fa3          var_1c[6] = (((uint16_t)edx[0x1b]) - 0x80);
00627fae          var_1c[7] = (((uint16_t)edx[0x1f]) - 0x80);
00627fb9          var_1c[0x40] = (((uint16_t)edx[0x23]) - 0x80);
00627fc7          var_1c[0x41] = (((uint16_t)edx[0x27]) - 0x80);
00627fd5          var_1c[0x42] = (((uint16_t)edx[0x2b]) - 0x80);
00627fe3          var_1c[0x43] = (((uint16_t)edx[0x2f]) - 0x80);
00627ff1          var_1c[0x44] = (((uint16_t)edx[0x33]) - 0x80);
00627fff          var_1c[0x45] = (((uint16_t)edx[0x37]) - 0x80);
0062800d          var_1c[0x46] = (((uint16_t)edx[0x3b]) - 0x80);
0062801b          var_1c[0x47] = (((uint16_t)edx[0x3f]) - 0x80);
0062802d          int32_t esi_4 = (-((((uint32_t)*(uint8_t*)edx) + ((uint32_t)edx[4]))) + 0x1fe);
0062803f          int32_t ebp_4 = (-((((uint32_t)edx[1]) + ((uint32_t)edx[5]))) + 0x1fe);
00628051          int32_t ebx_68 = (-((((uint32_t)edx[2]) + ((uint32_t)edx[6]))) + 0x1fe);
00628072          *(uint16_t*)var_14 = ((int16_t)(((((esi_4 * 0xffffffd5) + (ebp_4 * 0xffffffab)) + (ebx_68 << 7)) + 0x100) >> 9));
0062808e          *(uint16_t*)var_18 = ((int16_t)(((((esi_4 << 7) + (ebp_4 * 0xffffff95)) + (ebx_68 * 0xffffffeb)) + 0x100) >> 9));
0062809d          int32_t esi_10 = (-((((uint32_t)edx[8]) + ((uint32_t)edx[0xc]))) + 0x1fe);
006280af          int32_t ebp_8 = (-((((uint32_t)edx[9]) + ((uint32_t)edx[0xd]))) + 0x1fe);
006280c1          int32_t ebx_73 = (-((((uint32_t)edx[0xa]) + ((uint32_t)edx[0xe]))) + 0x1fe);
006280e2          var_14[1] = ((int16_t)(((((esi_10 * 0xffffffd5) + (ebp_8 * 0xffffffab)) + (ebx_73 << 7)) + 0x100) >> 9));
006280ff          var_18[1] = ((int16_t)(((((esi_10 << 7) + (ebp_8 * 0xffffff95)) + (ebx_73 * 0xffffffeb)) + 0x100) >> 9));
0062810f          int32_t esi_16 = (-((((uint32_t)edx[0x10]) + ((uint32_t)edx[0x14]))) + 0x1fe);
00628121          int32_t ebp_12 = (-((((uint32_t)edx[0x11]) + ((uint32_t)edx[0x15]))) + 0x1fe);
00628133          int32_t ebx_78 = (-((((uint32_t)edx[0x12]) + ((uint32_t)edx[0x16]))) + 0x1fe);
00628154          var_14[2] = ((int16_t)(((((esi_16 * 0xffffffd5) + (ebp_12 * 0xffffffab)) + (ebx_78 << 7)) + 0x100) >> 9));
00628171          var_18[2] = ((int16_t)(((((esi_16 << 7) + (ebp_12 * 0xffffff95)) + (ebx_78 * 0xffffffeb)) + 0x100) >> 9));
00628181          int32_t ebp_16 = (-((((uint32_t)edx[0x18]) + ((uint32_t)edx[0x1c]))) + 0x1fe);
00628193          int32_t ebx_83 = (-((((uint32_t)edx[0x19]) + ((uint32_t)edx[0x1d]))) + 0x1fe);
006281a5          int32_t ecx_184 = (-((((uint32_t)edx[0x1a]) + ((uint32_t)edx[0x1e]))) + 0x1fe);
006281c6          var_14[3] = ((int16_t)(((((ebp_16 * 0xffffffd5) + (ebx_83 * 0xffffffab)) + (ecx_184 << 7)) + 0x100) >> 9));
006281e3          var_18[3] = ((int16_t)(((((ebp_16 << 7) + (ebx_83 * 0xffffff95)) + (ecx_184 * 0xffffffeb)) + 0x100) >> 9));
006281f3          int32_t ecx_191 = (-((((uint32_t)edx[0x20]) + ((uint32_t)edx[0x24]))) + 0x1fe);
00628205          int32_t ebx_90 = (-((((uint32_t)edx[0x21]) + ((uint32_t)edx[0x25]))) + 0x1fe);
00628217          int32_t ebp_23 = (-((((uint32_t)edx[0x22]) + ((uint32_t)edx[0x26]))) + 0x1fe);
00628238          var_14[4] = ((int16_t)(((((ecx_191 * 0xffffffd5) + (ebx_90 * 0xffffffab)) + (ebp_23 << 7)) + 0x100) >> 9));
00628255          var_18[4] = ((int16_t)(((((ecx_191 << 7) + (ebx_90 * 0xffffff95)) + (ebp_23 * 0xffffffeb)) + 0x100) >> 9));
00628265          int32_t esi_33 = (-((((uint32_t)edx[0x28]) + ((uint32_t)edx[0x2c]))) + 0x1fe);
00628277          int32_t ebp_27 = (-((((uint32_t)edx[0x29]) + ((uint32_t)edx[0x2d]))) + 0x1fe);
00628289          int32_t ebx_97 = (-((((uint32_t)edx[0x2a]) + ((uint32_t)edx[0x2e]))) + 0x1fe);
006282aa          var_14[5] = ((int16_t)(((((esi_33 * 0xffffffd5) + (ebp_27 * 0xffffffab)) + (ebx_97 << 7)) + 0x100) >> 9));
006282c7          result = &result[8];
006282ca          var_18[5] = ((int16_t)(((((esi_33 << 7) + (ebp_27 * 0xffffff95)) + (ebx_97 * 0xffffffeb)) + 0x100) >> 9));
006282da          int32_t ebp_31 = (-((((uint32_t)edx[0x30]) + ((uint32_t)edx[0x34]))) + 0x1fe);
006282ec          int32_t ebx_102 = (-((((uint32_t)edx[0x31]) + ((uint32_t)edx[0x35]))) + 0x1fe);
006282fe          int32_t ecx_212 = (-((((uint32_t)edx[0x32]) + ((uint32_t)edx[0x36]))) + 0x1fe);
0062831f          var_14[6] = ((int16_t)(((((ebp_31 * 0xffffffd5) + (ebx_102 * 0xffffffab)) + (ecx_212 << 7)) + 0x100) >> 9));
0062833c          var_18[6] = ((int16_t)(((((ebp_31 << 7) + (ebx_102 * 0xffffff95)) + (ecx_212 * 0xffffffeb)) + 0x100) >> 9));
0062834c          int32_t esi_45 = (-((((uint32_t)edx[0x38]) + ((uint32_t)edx[0x3c]))) + 0x1fe);
0062835e          int32_t ebp_37 = (-((((uint32_t)edx[0x39]) + ((uint32_t)edx[0x3d]))) + 0x1fe);
00628370          int32_t ebx_108 = (-((((uint32_t)edx[0x3a]) + ((uint32_t)edx[0x3e]))) + 0x1fe);
00628391          var_14[7] = ((int16_t)(((((esi_45 * 0xffffffd5) + (ebp_37 * 0xffffffab)) + (ebx_108 << 7)) + 0x100) >> 9));
006283ae          var_18[7] = ((int16_t)(((((esi_45 << 7) + (ebp_37 * 0xffffff95)) + (ebx_108 * 0xffffffeb)) + 0x100) >> 9));
006283b6          i = (i_1 + 1);
006283b7          var_14 = &var_14[8];
006283bc          var_18 = &var_18[8];
006283c1          var_1c = &var_1c[8];
006283c6          edx = &edx[arg2];
006283ca          i_1 = i;
006283d1      } while (i < 8);
006283de      return result;
00627c50  }

006283df                                                                                               90                                 .

006283e0  int64_t* _RGBA_FPX_to_YCbCrA_FPX_4224_Full_MCU_M5(int64_t* arg1, int32_t arg2, int64_t* arg3, int32_t* arg4, void* arg5, uint64_t* arg6)

006283e0  {
00628415      _own_rgba_fpx_to_ycbcra_fpx_4224_full_mcu_m5(arg1, arg2, arg3, arg4, arg5, arg6);
00628420      return arg1;
006283e0  }

00628421     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

00628430  void RGBA_FPX_to_YCbCrA_FPX_4224_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

00628430  {
0062843b      int32_t edi = 0x10;
00628440      int32_t esi = 8;
00628445      int32_t DIBLineBytes = arg1->DIBLineBytes;
00628448      uint8_t* MCUBuf = arg1->MCUBuf;
0062844e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062844e      
00628466      if ((arg1->numxMCUs - 1) != arg2)
006284a5          arg1->state.DIB_ptr = &DIB_ptr[0x40];
00628466      else
00628466      {
0062846f          int32_t eax_5;
0062846f          int32_t edx_1;
0062846f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062846f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
00628479          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
00628479          
0062847d          if (eax_10 != 0)
0062847f              edi = eax_10;
0062847f          
00628496          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
00628466      }
00628466      
006284b9      if (arg3 == (arg1->numyMCUs - 1))
006284b9      {
006284c2          int32_t eax_19;
006284c2          int32_t edx_7;
006284c2          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
006284c2          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
006284c7          int32_t eax_22;
006284c7          int32_t edx_8;
006284c7          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
006284c7          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
006284d1          int32_t eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
006284d1          
006284d5          if (eax_27 != 0)
006284d7              esi = eax_27;
006284b9      }
006284b9      
00628501      if ((edi != 0x10 || esi != 8))
00628501      {
006284f1          sub_6278e0(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
006284fd          return;
00628501      }
00628501      
00628530      *(uint32_t*)(arg1->state.ctx + 0x94)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x100], &MCUBuf[0x180], &MCUBuf[0x200]);
00628430  }

0062853e                                                                                            8b f6                                ..

00628540  void* sub_628540(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00628540  {
0062855c      void var_840;
0062855c      void* eax = &var_840;
0062855f      int32_t i_1 = 0;
0062855f      
00628563      if (arg4 > 0)
00628563      {
0062856b          void* ecx_1 = nullptr;
00628570          int32_t esi_1 = 0;
00628575          int32_t edi_1 = 0;
00628578          void* var_2c_1 = &var_840;
00628578          
00628763          do
00628763          {
0062857f              int32_t i = 0;
0062857f              
0062858a              if (arg3 > 0)
0062858a              {
00628590                  void* ebp_1 = ecx_1;
00628593                  int32_t ebx_2 = esi_1;
006285a4                  int32_t i_3 = 0;
006285ab                  int32_t esi_2 = arg1;
006285ab                  
00628698                  do
00628698                  {
006285d3                      int32_t eax_4 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)((char*)ebp_1 + esi_2)))) + 0xff));
006285e3                      int32_t edx_3 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)(((char*)ebp_1 + esi_2) + 1)))) + 0xff));
006285f3                      int32_t ecx_5 = ((int32_t)(((int16_t)-(((uint32_t)*(uint8_t*)(((char*)ebp_1 + esi_2) + 2)))) + 0xff));
006285fb                      int16_t edi_3 = (((uint16_t)*(uint8_t*)(((char*)ebp_1 + esi_2) + 3)) - 0x80);
0062861d                      *(uint16_t*)((char*)var_2c_1 + (ebx_2 << 1)) = ((int16_t)(((((eax_4 * 0x4d) + (edx_3 * 0x96)) + (ecx_5 * 0x1d)) - 0x7f80) >> 8));
0062863f                      *(uint16_t*)(((char*)var_2c_1 + (ebx_2 << 1)) + 0x200) = ((int16_t)(((((eax_4 * 0xffffffd5) + (edx_3 * 0xffffffab)) + (ecx_5 << 7)) + 0x80) >> 8));
00628665                      *(uint16_t*)(((char*)var_2c_1 + (ebx_2 << 1)) + 0x400) = ((int16_t)(((((eax_4 << 7) + (edx_3 * 0xffffff95)) + (ecx_5 * 0xffffffeb)) + 0x80) >> 8));
0062866d                      ebp_1 += 4;
00628677                      *(uint16_t*)(((char*)var_2c_1 + (ebx_2 << 1)) + 0x600) = edi_3;
0062867f                      ebx_2 += 1;
00628680                      i = (i_3 + 1);
00628681                      i_3 = i;
00628691                      esi_2 = arg1;
00628698                  } while (i < arg3);
0062858a              }
0062858a              
006286bd              if (i < 0x10)
006286bd              {
006286ca                  void* ebp_11 = ((char*)var_2c_1 + edi_1);
006286d7                  void* ebx_4 = ((char*)var_2c_1 + ((i + esi_1) << 1));
006286d7                  
0062873c                  do
0062873c                  {
00628705                      i += 1;
00628706                      *(uint16_t*)ebx_4 = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) - 2);
00628711                      *(uint16_t*)((char*)ebx_4 + 0x200) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0x1fe);
00628720                      *(uint16_t*)((char*)ebx_4 + 0x400) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0x3fe);
0062872f                      *(uint16_t*)((char*)ebx_4 + 0x600) = *(uint16_t*)(((char*)ebp_11 + (arg3 << 1)) + 0x5fe);
00628736                      ebx_4 += 2;
0062873c                  } while (i < 0x10);
006286bd              }
006286bd              
0062874c              ecx_1 += arg2;
00628753              esi_1 += 0x10;
00628756              edi_1 += 0x20;
00628759              i_1 += 1;
00628763          } while (i_1 < arg4);
00628763          
00628769          eax = var_2c_1;
00628563      }
00628563      
00628773      if (i_1 < 0x10)
00628773      {
00628777          int32_t ecx_7 = (i_1 << 4);
0062877f          void* j_1 = ((i_1 << 5) + eax);
0062877f          
006287dd          do
006287dd          {
00628781              void* j = j_1;
00628786              void* ebp_14 = ((char*)eax + (ecx_7 << 1));
00628786              
006287ca              do
006287ca              {
00628794                  *(uint16_t*)ebp_14 = *(uint16_t*)((char*)j - 0x20);
0062879f                  *(uint16_t*)((char*)ebp_14 + 0x200) = *(uint16_t*)((char*)j + 0x1e0);
006287ad                  *(uint16_t*)((char*)ebp_14 + 0x400) = *(uint16_t*)((char*)j + 0x3e0);
006287b4                  int16_t eax_14 = *(uint16_t*)((char*)j + 0x5e0);
006287bb                  j += 2;
006287be                  *(uint16_t*)((char*)ebp_14 + 0x600) = eax_14;
006287c5                  ebp_14 += 2;
006287ca              } while (((char*)j_1 + 0x20) > j);
006287ca              
006287d3              ecx_7 += 0x10;
006287d6              j_1 += 0x20;
006287d9              i_1 += 1;
006287dd          } while (i_1 < 0x10);
00628773      }
00628773      
006287df      int32_t edx_9 = 0;
006287e1      int32_t ecx_8 = 0;
0062890f      void* result;
0062890f      
0062890f      for (int32_t i_2 = 0; i_2 < 0x100; i_2 += 0x20)
0062890f      {
00628801          void* ebp_16 = ((char*)eax + (i_2 << 1));
00628804          result = (((char*)eax + (i_2 << 1)) + 0x20);
00628816          void* esi_12 = ((char*)eax + (ecx_8 << 1));
00628819          int16_t* edi_10 = (arg5 + (edx_9 << 1));
00628819          
006288ec          do
006288ec          {
00628823              *(uint16_t*)edi_10 = *(uint16_t*)esi_12;
0062882a              edi_10[0x40] = *(uint16_t*)((char*)esi_12 + 0x10);
00628838              edi_10[0x80] = *(uint16_t*)((char*)esi_12 + 0x100);
00628846              edi_10[0xc0] = *(uint16_t*)((char*)esi_12 + 0x110);
00628874              edi_10[0x100] = ((int16_t)(((((((int32_t)*(uint16_t*)((char*)ebp_16 + 0x200)) + ((int32_t)*(uint16_t*)((char*)ebp_16 + 0x202))) + ((int32_t)*(uint16_t*)((char*)ebp_16 + 0x220))) + ((int32_t)*(uint16_t*)((char*)ebp_16 + 0x222))) + 2) >> 2));
006288a2              edi_10[0x140] = ((int16_t)(((((((int32_t)*(uint16_t*)((char*)ebp_16 + 0x400)) + ((int32_t)*(uint16_t*)((char*)ebp_16 + 0x402))) + ((int32_t)*(uint16_t*)((char*)ebp_16 + 0x420))) + ((int32_t)*(uint16_t*)((char*)ebp_16 + 0x422))) + 2) >> 2));
006288b0              ebp_16 += 4;
006288b3              edi_10[0x180] = *(uint16_t*)((char*)esi_12 + 0x600);
006288c1              edi_10[0x1c0] = *(uint16_t*)((char*)esi_12 + 0x610);
006288cf              edi_10[0x200] = *(uint16_t*)((char*)esi_12 + 0x700);
006288d6              int16_t ecx_26 = *(uint16_t*)((char*)esi_12 + 0x710);
006288dd              esi_12 += 2;
006288e0              edi_10[0x240] = ecx_26;
006288e7              edi_10 = &edi_10[1];
006288ec          } while (result > ebp_16);
006288ec          
00628900          edx_9 += 8;
00628903          ecx_8 += 0x10;
0062890f      }
0062890f      
0062891f      return result;
00628540  }


00628920  char* sub_628920(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5, void* arg6)

00628920  {
00628927      char* result = arg1;
00628935      int16_t* edx = arg3;
00628953      int16_t* var_18 = arg5;
00628957      int16_t* var_14 = arg4;
0062895b      int32_t var_80 = 0;
0062895f      void* var_1c = arg6;
00629615      bool cond:0_1;
00629615      
00629615      do
00629615      {
0062898a          *(uint16_t*)edx = ((int16_t)(((((-(((uint32_t)*(uint8_t*)result)) * 0x4d) + (-(((uint32_t)result[1])) * 0x96)) + (((uint32_t)result[2]) * 0xffffffe3)) + 0x7f80) >> 8));
006289b5          edx[1] = ((int16_t)(((((-(((uint32_t)result[4])) * 0x4d) + (-(((uint32_t)result[5])) * 0x96)) + (((uint32_t)result[6]) * 0xffffffe3)) + 0x7f80) >> 8));
006289e1          edx[2] = ((int16_t)(((((-(((uint32_t)result[8])) * 0x4d) + (-(((uint32_t)result[9])) * 0x96)) + (((uint32_t)result[0xa]) * 0xffffffe3)) + 0x7f80) >> 8));
00628a0d          edx[3] = ((int16_t)(((((-(((uint32_t)result[0xc])) * 0x4d) + (-(((uint32_t)result[0xd])) * 0x96)) + (((uint32_t)result[0xe]) * 0xffffffe3)) + 0x7f80) >> 8));
00628a39          edx[4] = ((int16_t)(((((-(((uint32_t)result[0x10])) * 0x4d) + (-(((uint32_t)result[0x11])) * 0x96)) + (((uint32_t)result[0x12]) * 0xffffffe3)) + 0x7f80) >> 8));
00628a65          edx[5] = ((int16_t)(((((-(((uint32_t)result[0x14])) * 0x4d) + (-(((uint32_t)result[0x15])) * 0x96)) + (((uint32_t)result[0x16]) * 0xffffffe3)) + 0x7f80) >> 8));
00628a91          edx[6] = ((int16_t)(((((-(((uint32_t)result[0x18])) * 0x4d) + (-(((uint32_t)result[0x19])) * 0x96)) + (((uint32_t)result[0x1a]) * 0xffffffe3)) + 0x7f80) >> 8));
00628abd          edx[7] = ((int16_t)(((((-(((uint32_t)result[0x1c])) * 0x4d) + (-(((uint32_t)result[0x1d])) * 0x96)) + (((uint32_t)result[0x1e]) * 0xffffffe3)) + 0x7f80) >> 8));
00628ae9          edx[0x40] = ((int16_t)(((((-(((uint32_t)result[0x20])) * 0x4d) + (-(((uint32_t)result[0x21])) * 0x96)) + (((uint32_t)result[0x22]) * 0xffffffe3)) + 0x7f80) >> 8));
00628b18          edx[0x41] = ((int16_t)(((((-(((uint32_t)result[0x24])) * 0x4d) + (-(((uint32_t)result[0x25])) * 0x96)) + (((uint32_t)result[0x26]) * 0xffffffe3)) + 0x7f80) >> 8));
00628b47          edx[0x42] = ((int16_t)(((((-(((uint32_t)result[0x28])) * 0x4d) + (-(((uint32_t)result[0x29])) * 0x96)) + (((uint32_t)result[0x2a]) * 0xffffffe3)) + 0x7f80) >> 8));
00628b76          edx[0x43] = ((int16_t)(((((-(((uint32_t)result[0x2c])) * 0x4d) + (-(((uint32_t)result[0x2d])) * 0x96)) + (((uint32_t)result[0x2e]) * 0xffffffe3)) + 0x7f80) >> 8));
00628ba5          edx[0x44] = ((int16_t)(((((-(((uint32_t)result[0x30])) * 0x4d) + (-(((uint32_t)result[0x31])) * 0x96)) + (((uint32_t)result[0x32]) * 0xffffffe3)) + 0x7f80) >> 8));
00628bd4          edx[0x45] = ((int16_t)(((((-(((uint32_t)result[0x34])) * 0x4d) + (-(((uint32_t)result[0x35])) * 0x96)) + (((uint32_t)result[0x36]) * 0xffffffe3)) + 0x7f80) >> 8));
00628c03          edx[0x46] = ((int16_t)(((((-(((uint32_t)result[0x38])) * 0x4d) + (-(((uint32_t)result[0x39])) * 0x96)) + (((uint32_t)result[0x3a]) * 0xffffffe3)) + 0x7f80) >> 8));
00628c32          edx[0x47] = ((int16_t)(((((-(((uint32_t)result[0x3c])) * 0x4d) + (-(((uint32_t)result[0x3d])) * 0x96)) + (((uint32_t)result[0x3e]) * 0xffffffe3)) + 0x7f80) >> 8));
00628c40          int16_t* ecx_140 = var_1c;
00628c44          *(uint16_t*)ecx_140 = (((uint16_t)result[3]) - 0x80);
00628c4e          ecx_140[1] = (((uint16_t)result[7]) - 0x80);
00628c59          ecx_140[2] = (((uint16_t)result[0xb]) - 0x80);
00628c64          ecx_140[3] = (((uint16_t)result[0xf]) - 0x80);
00628c6f          ecx_140[4] = (((uint16_t)result[0x13]) - 0x80);
00628c7a          ecx_140[5] = (((uint16_t)result[0x17]) - 0x80);
00628c85          ecx_140[6] = (((uint16_t)result[0x1b]) - 0x80);
00628c90          ecx_140[7] = (((uint16_t)result[0x1f]) - 0x80);
00628c9b          ecx_140[0x40] = (((uint16_t)result[0x23]) - 0x80);
00628ca9          ecx_140[0x41] = (((uint16_t)result[0x27]) - 0x80);
00628cb7          ecx_140[0x42] = (((uint16_t)result[0x2b]) - 0x80);
00628cc5          ecx_140[0x43] = (((uint16_t)result[0x2f]) - 0x80);
00628cd3          ecx_140[0x44] = (((uint16_t)result[0x33]) - 0x80);
00628ce1          ecx_140[0x45] = (((uint16_t)result[0x37]) - 0x80);
00628cef          ecx_140[0x46] = (((uint16_t)result[0x3b]) - 0x80);
00628cfd          ecx_140[0x47] = (((uint16_t)result[0x3f]) - 0x80);
00628d0b          uint32_t ebx_67 = (((uint32_t)*(uint8_t*)result) + ((uint32_t)result[4]));
00628d19          uint32_t ebx_69 = (((uint32_t)result[1]) + ((uint32_t)result[5]));
00628d27          uint32_t ebx_71 = (((uint32_t)result[2]) + ((uint32_t)result[6]));
00628d35          uint32_t ebx_73 = (((uint32_t)result[8]) + ((uint32_t)result[0xc]));
00628d43          uint32_t ebx_75 = (((uint32_t)result[9]) + ((uint32_t)result[0xd]));
00628d51          uint32_t ebx_77 = (((uint32_t)result[0xa]) + ((uint32_t)result[0xe]));
00628d5f          uint32_t ebx_79 = (((uint32_t)result[0x10]) + ((uint32_t)result[0x14]));
00628d6d          uint32_t ebx_81 = (((uint32_t)result[0x11]) + ((uint32_t)result[0x15]));
00628d7b          uint32_t ebx_83 = (((uint32_t)result[0x12]) + ((uint32_t)result[0x16]));
00628d89          uint32_t ebx_85 = (((uint32_t)result[0x18]) + ((uint32_t)result[0x1c]));
00628d97          uint32_t ebx_87 = (((uint32_t)result[0x19]) + ((uint32_t)result[0x1d]));
00628da5          uint32_t ebx_89 = (((uint32_t)result[0x1a]) + ((uint32_t)result[0x1e]));
00628db3          uint32_t ebx_91 = (((uint32_t)result[0x20]) + ((uint32_t)result[0x24]));
00628dc1          uint32_t ebx_93 = (((uint32_t)result[0x21]) + ((uint32_t)result[0x25]));
00628dcf          uint32_t ebx_95 = (((uint32_t)result[0x22]) + ((uint32_t)result[0x26]));
00628ddd          uint32_t ebx_97 = (((uint32_t)result[0x28]) + ((uint32_t)result[0x2c]));
00628deb          uint32_t ebx_99 = (((uint32_t)result[0x29]) + ((uint32_t)result[0x2d]));
00628df9          uint32_t ebx_101 = (((uint32_t)result[0x2a]) + ((uint32_t)result[0x2e]));
00628e07          uint32_t ebx_103 = (((uint32_t)result[0x30]) + ((uint32_t)result[0x34]));
00628e15          uint32_t ebx_105 = (((uint32_t)result[0x31]) + ((uint32_t)result[0x35]));
00628e23          uint32_t ebx_107 = (((uint32_t)result[0x32]) + ((uint32_t)result[0x36]));
00628e31          uint32_t ebx_109 = (((uint32_t)result[0x38]) + ((uint32_t)result[0x3c]));
00628e3f          uint32_t ebx_111 = (((uint32_t)result[0x39]) + ((uint32_t)result[0x3d]));
00628e4d          uint32_t ebx_113 = (((uint32_t)result[0x3a]) + ((uint32_t)result[0x3e]));
00628e53          void* eax = &result[arg2];
00628e81          edx[8] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)eax)) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 1))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 2)) * 0xffffffe3)) + 0x7f80) >> 8));
00628ead          edx[9] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 4))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 5))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 6)) * 0xffffffe3)) + 0x7f80) >> 8));
00628ed9          edx[0xa] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 8))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 9))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0xa)) * 0xffffffe3)) + 0x7f80) >> 8));
00628f05          edx[0xb] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0xc))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0xd))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0xe)) * 0xffffffe3)) + 0x7f80) >> 8));
00628f31          edx[0xc] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x10))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x11))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x12)) * 0xffffffe3)) + 0x7f80) >> 8));
00628f5d          edx[0xd] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x14))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x15))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x16)) * 0xffffffe3)) + 0x7f80) >> 8));
00628f89          edx[0xe] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x18))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x19))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x1a)) * 0xffffffe3)) + 0x7f80) >> 8));
00628fb5          edx[0xf] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x1c))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x1d))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x1e)) * 0xffffffe3)) + 0x7f80) >> 8));
00628fe1          edx[0x48] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x20))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x21))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x22)) * 0xffffffe3)) + 0x7f80) >> 8));
00629010          edx[0x49] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x24))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x25))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x26)) * 0xffffffe3)) + 0x7f80) >> 8));
0062903f          edx[0x4a] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x28))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x29))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x2a)) * 0xffffffe3)) + 0x7f80) >> 8));
0062906e          edx[0x4b] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x2c))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x2d))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x2e)) * 0xffffffe3)) + 0x7f80) >> 8));
0062909d          edx[0x4c] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x30))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x31))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x32)) * 0xffffffe3)) + 0x7f80) >> 8));
006290cc          edx[0x4d] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x34))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x35))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x36)) * 0xffffffe3)) + 0x7f80) >> 8));
006290fb          edx[0x4e] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x38))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x39))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x3a)) * 0xffffffe3)) + 0x7f80) >> 8));
0062912a          edx[0x4f] = ((int16_t)(((((-(((uint32_t)*(uint8_t*)((char*)eax + 0x3c))) * 0x4d) + (-(((uint32_t)*(uint8_t*)((char*)eax + 0x3d))) * 0x96)) + (((uint32_t)*(uint8_t*)((char*)eax + 0x3e)) * 0xffffffe3)) + 0x7f80) >> 8));
0062913c          *(uint16_t*)((char*)var_1c + 0x10) = (((uint16_t)*(uint8_t*)((char*)eax + 3)) - 0x80);
00629147          *(uint16_t*)((char*)var_1c + 0x12) = (((uint16_t)*(uint8_t*)((char*)eax + 7)) - 0x80);
00629152          *(uint16_t*)((char*)var_1c + 0x14) = (((uint16_t)*(uint8_t*)((char*)eax + 0xb)) - 0x80);
0062915d          *(uint16_t*)((char*)var_1c + 0x16) = (((uint16_t)*(uint8_t*)((char*)eax + 0xf)) - 0x80);
00629168          *(uint16_t*)((char*)var_1c + 0x18) = (((uint16_t)*(uint8_t*)((char*)eax + 0x13)) - 0x80);
00629173          *(uint16_t*)((char*)var_1c + 0x1a) = (((uint16_t)*(uint8_t*)((char*)eax + 0x17)) - 0x80);
0062917e          *(uint16_t*)((char*)var_1c + 0x1c) = (((uint16_t)*(uint8_t*)((char*)eax + 0x1b)) - 0x80);
00629189          *(uint16_t*)((char*)var_1c + 0x1e) = (((uint16_t)*(uint8_t*)((char*)eax + 0x1f)) - 0x80);
00629194          *(uint16_t*)((char*)var_1c + 0x90) = (((uint16_t)*(uint8_t*)((char*)eax + 0x23)) - 0x80);
006291a2          *(uint16_t*)((char*)var_1c + 0x92) = (((uint16_t)*(uint8_t*)((char*)eax + 0x27)) - 0x80);
006291b0          *(uint16_t*)((char*)var_1c + 0x94) = (((uint16_t)*(uint8_t*)((char*)eax + 0x2b)) - 0x80);
006291be          *(uint16_t*)((char*)var_1c + 0x96) = (((uint16_t)*(uint8_t*)((char*)eax + 0x2f)) - 0x80);
006291cc          *(uint16_t*)((char*)var_1c + 0x98) = (((uint16_t)*(uint8_t*)((char*)eax + 0x33)) - 0x80);
006291da          *(uint16_t*)((char*)var_1c + 0x9a) = (((uint16_t)*(uint8_t*)((char*)eax + 0x37)) - 0x80);
006291e8          *(uint16_t*)((char*)var_1c + 0x9c) = (((uint16_t)*(uint8_t*)((char*)eax + 0x3b)) - 0x80);
006291f6          *(uint16_t*)((char*)var_1c + 0x9e) = (((uint16_t)*(uint8_t*)((char*)eax + 0x3f)) - 0x80);
00629214          int32_t esi_6 = (-(((((uint32_t)*(uint8_t*)eax) + ((uint32_t)*(uint8_t*)((char*)eax + 4))) + ebx_67)) + 0x3fc);
0062922a          int32_t ebp_7 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 1)) + ((uint32_t)*(uint8_t*)((char*)eax + 5))) + ebx_69)) + 0x3fc);
0062923e          int32_t ebx_182 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 2)) + ((uint32_t)*(uint8_t*)((char*)eax + 6))) + ebx_71)) + 0x3fc);
00629259          *(uint16_t*)var_14 = ((int16_t)(((((esi_6 * 0xffffffd5) + (ebp_7 * 0xffffffab)) + (ebx_182 << 7)) + 0x200) >> 0xa));
00629275          *(uint16_t*)var_18 = ((int16_t)(((((esi_6 << 7) + (ebp_7 * 0xffffff95)) + (ebx_182 * 0xffffffeb)) + 0x200) >> 0xa));
00629290          int32_t esi_13 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 8)) + ((uint32_t)*(uint8_t*)((char*)eax + 0xc))) + ebx_73)) + 0x3fc);
006292a6          int32_t ebp_12 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 9)) + ((uint32_t)*(uint8_t*)((char*)eax + 0xd))) + ebx_75)) + 0x3fc);
006292ba          int32_t ebx_188 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0xa)) + ((uint32_t)*(uint8_t*)((char*)eax + 0xe))) + ebx_77)) + 0x3fc);
006292d5          var_14[1] = ((int16_t)(((((esi_13 * 0xffffffd5) + (ebp_12 * 0xffffffab)) + (ebx_188 << 7)) + 0x200) >> 0xa));
006292f2          var_18[1] = ((int16_t)(((((esi_13 << 7) + (ebp_12 * 0xffffff95)) + (ebx_188 * 0xffffffeb)) + 0x200) >> 0xa));
0062930e          int32_t esi_20 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x10)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x14))) + ebx_79)) + 0x3fc);
00629324          int32_t ebp_17 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x11)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x15))) + ebx_81)) + 0x3fc);
00629338          int32_t ebx_194 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x12)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x16))) + ebx_83)) + 0x3fc);
00629353          var_14[2] = ((int16_t)(((((esi_20 * 0xffffffd5) + (ebp_17 * 0xffffffab)) + (ebx_194 << 7)) + 0x200) >> 0xa));
00629370          var_18[2] = ((int16_t)(((((esi_20 << 7) + (ebp_17 * 0xffffff95)) + (ebx_194 * 0xffffffeb)) + 0x200) >> 0xa));
0062938c          int32_t esi_27 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x18)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x1c))) + ebx_85)) + 0x3fc);
006293a2          int32_t ebp_22 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x19)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x1d))) + ebx_87)) + 0x3fc);
006293b6          int32_t ebx_200 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x1a)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x1e))) + ebx_89)) + 0x3fc);
006293d1          var_14[3] = ((int16_t)(((((esi_27 * 0xffffffd5) + (ebp_22 * 0xffffffab)) + (ebx_200 << 7)) + 0x200) >> 0xa));
006293ee          var_18[3] = ((int16_t)(((((esi_27 << 7) + (ebp_22 * 0xffffff95)) + (ebx_200 * 0xffffffeb)) + 0x200) >> 0xa));
0062940a          int32_t esi_34 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x20)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x24))) + ebx_91)) + 0x3fc);
00629420          int32_t ebp_27 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x21)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x25))) + ebx_93)) + 0x3fc);
00629434          int32_t ebx_206 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x22)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x26))) + ebx_95)) + 0x3fc);
0062944f          var_14[4] = ((int16_t)(((((esi_34 * 0xffffffd5) + (ebp_27 * 0xffffffab)) + (ebx_206 << 7)) + 0x200) >> 0xa));
0062946c          var_18[4] = ((int16_t)(((((esi_34 << 7) + (ebp_27 * 0xffffff95)) + (ebx_206 * 0xffffffeb)) + 0x200) >> 0xa));
00629488          int32_t ebp_32 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x28)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x2c))) + ebx_97)) + 0x3fc);
0062949e          int32_t ebx_212 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x29)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x2d))) + ebx_99)) + 0x3fc);
006294b2          int32_t ecx_371 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x2a)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x2e))) + ebx_101)) + 0x3fc);
006294cd          var_14[5] = ((int16_t)(((((ebp_32 * 0xffffffd5) + (ebx_212 * 0xffffffab)) + (ecx_371 << 7)) + 0x200) >> 0xa));
006294ea          var_18[5] = ((int16_t)(((((ebp_32 << 7) + (ebx_212 * 0xffffff95)) + (ecx_371 * 0xffffffeb)) + 0x200) >> 0xa));
00629506          int32_t ecx_379 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x30)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x34))) + ebx_103)) + 0x3fc);
0062951c          int32_t ebx_220 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x31)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x35))) + ebx_105)) + 0x3fc);
00629530          int32_t ebp_40 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x32)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x36))) + ebx_107)) + 0x3fc);
0062954b          var_14[6] = ((int16_t)(((((ecx_379 * 0xffffffd5) + (ebx_220 * 0xffffffab)) + (ebp_40 << 7)) + 0x200) >> 0xa));
00629568          var_18[6] = ((int16_t)(((((ecx_379 << 7) + (ebx_220 * 0xffffff95)) + (ebp_40 * 0xffffffeb)) + 0x200) >> 0xa));
00629584          int32_t esi_52 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x38)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x3c))) + ebx_109)) + 0x3fc);
0062959a          int32_t ebp_45 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x39)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x3d))) + ebx_111)) + 0x3fc);
006295ae          int32_t ebx_228 = (-(((((uint32_t)*(uint8_t*)((char*)eax + 0x3a)) + ((uint32_t)*(uint8_t*)((char*)eax + 0x3e))) + ebx_113)) + 0x3fc);
006295cc          var_14[7] = ((int16_t)(((((esi_52 * 0xffffffd5) + (ebp_45 * 0xffffffab)) + (ebx_228 << 7)) + 0x200) >> 0xa));
006295e9          edx = &edx[0x10];
006295ec          var_18[7] = ((int16_t)(((((esi_52 << 7) + (ebp_45 * 0xffffff95)) + (ebx_228 * 0xffffffeb)) + 0x200) >> 0xa));
006295f3          var_14 = &var_14[8];
006295fe          var_18 = &var_18[8];
00629602          result = ((char*)eax + arg2);
00629609          var_1c += 0x20;
0062960e          cond:0_1 = (var_80 + 2) < 8;
00629611          var_80 += 2;
00629615      } while (cond:0_1);
00629622      return result;
00628920  }

00629623           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

00629630  char* _RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_PX(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5, void* arg6)

00629630  {
00629666      sub_628920(arg1, arg2, arg3, arg4, arg5, arg6);
006296ab      return sub_628920(&arg1[(arg2 << 3)], arg2, &arg3[0x80], &arg4[0x20], &arg5[0x20], ((char*)arg6 + 0x100));
00629630  }

006296ac                                      8d 74 26 00                                                              .t&.

006296b0  int64_t* _RGBA_FPX_to_YCbCrA_FPX_4114_Full_MCU_M5(int32_t arg1, int32_t arg2, int64_t* arg3, void* arg4, void* arg5, int32_t arg6)

006296b0  {
006296e2      int32_t var_18 = arg6;
006296e6      _own_rgba_fpx_to_ycbcra_fpx_4114_one_half_mcu_m5(arg1, arg2, arg3, arg4, arg5);
0062971b      int32_t var_18_1 = (arg6 + 0x100);
0062971f      _own_rgba_fpx_to_ycbcra_fpx_4114_one_half_mcu_m5((arg1 + (arg2 << 3)), arg2, &arg3[0x20], ((char*)arg4 + 0x40), ((char*)arg5 + 0x40));
0062972b      return &arg3[0x20];
006296b0  }

0062972c                                      8d 74 26 00                                                              .t&.

00629730  void RGBA_FPX_to_YCbCrA_FPX_4114_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

00629730  {
0062973b      int32_t edi = 0x10;
00629740      int32_t esi = 0x10;
00629745      int32_t DIBLineBytes = arg1->DIBLineBytes;
00629748      uint8_t* MCUBuf = arg1->MCUBuf;
0062974e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062974e      
00629766      if ((arg1->numxMCUs - 1) != arg2)
006297a4          arg1->state.DIB_ptr = &DIB_ptr[0x40];
00629766      else
00629766      {
0062976f          int32_t eax_5;
0062976f          int32_t edx_1;
0062976f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062976f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
00629779          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
00629779          
0062977d          if (eax_10 != 0)
0062977f              edi = eax_10;
0062977f          
00629795          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 4) + 0x10) * DIBLineBytes)];
00629766      }
00629766      
006297b8      if (arg3 == (arg1->numyMCUs - 1))
006297b8      {
006297c1          int32_t eax_22;
006297c1          int32_t edx_5;
006297c1          edx_5 = HIGHD(((int64_t)arg1->DIBHeight));
006297c1          eax_22 = LOWD(((int64_t)arg1->DIBHeight));
006297c6          int32_t eax_25;
006297c6          int32_t edx_6;
006297c6          edx_6 = HIGHD(((int64_t)((eax_22 ^ edx_5) - edx_5)));
006297c6          eax_25 = LOWD(((int64_t)((eax_22 ^ edx_5) - edx_5)));
006297d0          int32_t eax_30 = (((((eax_25 ^ edx_6) - edx_6) & 0xf) ^ edx_6) - edx_6);
006297d0          
006297d4          if (eax_30 != 0)
006297d6              esi = eax_30;
006297b8      }
006297b8      
00629800      if ((edi != 0x10 || esi != 0x10))
00629800      {
006297f0          sub_628540(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
006297fc          return;
00629800      }
00629800      
0062982f      *(uint32_t*)(arg1->state.ctx + 0x98)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x200], &MCUBuf[0x280], &MCUBuf[0x300]);
00629730  }

0062983d                                                                                         8d 76 00                               .v.

00629840  int16_t* sub_629840(void* arg1, int16_t* arg2, int32_t arg3, int16_t* arg4, int32_t arg5)

00629840  {
00629847      void* edx = arg1;
0062984b      int16_t* result = arg2;
00629853      int16_t* edi = arg4;
00629857      int32_t esi = arg5;
0062985b      int32_t i_1 = 0;
0062985b      
0062985f      if (edi > 0)
0062985f      {
0062986b          int32_t ecx_1 = 0;
0062986b          
00629925          do
00629925          {
0062986d              int32_t i = 0;
0062986d              
00629871              if (arg3 > 0)
00629871              {
0062987e                  int32_t esi_2 = ecx_1;
0062987e                  
006298c0                  do
006298c0                  {
00629887                      *(uint16_t*)(arg5 + (esi_2 << 1)) = (((uint16_t)*(uint8_t*)((char*)edx + (i << 2))) - 0x80);
00629894                      *(uint16_t*)((arg5 + (esi_2 << 1)) + 0x80) = (((uint16_t)*(uint8_t*)(((char*)edx + (i << 2)) + 1)) - 0x80);
006298a4                      *(uint16_t*)((arg5 + (esi_2 << 1)) + 0x100) = (((uint16_t)*(uint8_t*)(((char*)edx + (i << 2)) + 2)) - 0x80);
006298b4                      *(uint16_t*)((arg5 + (esi_2 << 1)) + 0x180) = (((uint16_t)*(uint8_t*)(((char*)edx + (i << 2)) + 3)) - 0x80);
006298bc                      esi_2 += 1;
006298bd                      i += 1;
006298c0                  } while (i < arg3);
00629871              }
00629871              
006298c9              if (i < 8)
006298c9              {
006298d5                  void* esi_5 = (arg5 + ((i + ecx_1) << 1));
006298d5                  
00629915                  do
00629915                  {
006298e4                      i += 1;
006298e5                      *(uint16_t*)esi_5 = *(uint16_t*)((char*)esi_5 - 2);
006298ec                      *(uint16_t*)((char*)esi_5 + 0x80) = *(uint16_t*)((char*)esi_5 + 0x7e);
006298fa                      *(uint16_t*)((char*)esi_5 + 0x100) = *(uint16_t*)((char*)esi_5 + 0xfe);
00629908                      *(uint16_t*)((char*)esi_5 + 0x180) = *(uint16_t*)((char*)esi_5 + 0x17e);
0062990f                      esi_5 += 2;
00629915                  } while (i < 8);
006298c9              }
006298c9              
00629917              edx += arg2;
0062991b              ecx_1 += 8;
0062991e              i_1 += 1;
0062991f              result = arg4;
00629925          } while (i_1 < result);
00629925          
0062992b          esi = arg5;
0062992f          edi = arg4;
0062985f      }
0062985f      
00629936      if (i_1 < 8)
00629936      {
0062993c          int32_t edx_1 = (edi * 2);
00629943          result = (esi + (i_1 * 0x10));
00629943          
00629aee          do
00629aee          {
00629955              i_1 += 1;
00629956              *(uint16_t*)result = *(uint16_t*)((esi + (edx_1 << 3)) - 0x10);
0062995e              result[0x40] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x70);
0062996d              result[0x80] = *(uint16_t*)((esi + (edx_1 << 3)) + 0xf0);
0062997c              result[0xc0] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x170);
00629988              result[1] = *(uint16_t*)((esi + (edx_1 << 3)) - 0xe);
00629991              result[0x41] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x72);
006299a0              result[0x81] = *(uint16_t*)((esi + (edx_1 << 3)) + 0xf2);
006299af              result[0xc1] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x172);
006299bb              result[2] = *(uint16_t*)((esi + (edx_1 << 3)) - 0xc);
006299c4              result[0x42] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x74);
006299d3              result[0x82] = *(uint16_t*)((esi + (edx_1 << 3)) + 0xf4);
006299e2              result[0xc2] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x174);
006299ee              result[3] = *(uint16_t*)((esi + (edx_1 << 3)) - 0xa);
006299f7              result[0x43] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x76);
00629a06              result[0x83] = *(uint16_t*)((esi + (edx_1 << 3)) + 0xf6);
00629a15              result[0xc3] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x176);
00629a21              result[4] = *(uint16_t*)((esi + (edx_1 << 3)) - 8);
00629a2a              result[0x44] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x78);
00629a39              result[0x84] = *(uint16_t*)((esi + (edx_1 << 3)) + 0xf8);
00629a48              result[0xc4] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x178);
00629a54              result[5] = *(uint16_t*)((esi + (edx_1 << 3)) - 6);
00629a5d              result[0x45] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x7a);
00629a6c              result[0x85] = *(uint16_t*)((esi + (edx_1 << 3)) + 0xfa);
00629a7b              result[0xc5] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x17a);
00629a87              result[6] = *(uint16_t*)((esi + (edx_1 << 3)) - 4);
00629a90              result[0x46] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x7c);
00629a9f              result[0x86] = *(uint16_t*)((esi + (edx_1 << 3)) + 0xfc);
00629aae              result[0xc6] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x17c);
00629aba              result[7] = *(uint16_t*)((esi + (edx_1 << 3)) - 2);
00629ac3              result[0x47] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x7e);
00629ad2              result[0x87] = *(uint16_t*)((esi + (edx_1 << 3)) + 0xfe);
00629ae1              result[0xc7] = *(uint16_t*)((esi + (edx_1 << 3)) + 0x17e);
00629ae8              result = &result[8];
00629aee          } while (i_1 < 8);
00629936      }
00629936      
00629afb      return result;
00629840  }

00629afc                                                                                      8d 74 26 00                              .t&.

00629b00  char* _OTHER_to_OTHER_1111_Full_MCU(char* arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6)

00629b00  {
00629b07      char* j_1 = arg1;
00629b8c      char* j;
00629b8c      
00629b8c      for (int32_t i = 0; i < 0x40; i += 8)
00629b8c      {
00629b21          int32_t i_1 = i;
00629b23          j = j_1;
00629b23          
00629b76          do
00629b76          {
00629b46              *(uint16_t*)(arg3 + (i_1 << 1)) = (((uint16_t)*(uint8_t*)j) - 0x80);
00629b51              *(uint16_t*)(arg4 + (i_1 << 1)) = (((uint16_t)j[1]) - 0x80);
00629b5d              *(uint16_t*)(arg5 + (i_1 << 1)) = (((uint16_t)j[2]) - 0x80);
00629b68              *(uint16_t*)(arg6 + (i_1 << 1)) = (((uint16_t)j[3]) - 0x80);
00629b6c              i_1 += 1;
00629b6d              j = &j[4];
00629b76          } while (&j_1[0x20] > j);
00629b76          
00629b84          j_1 = &j_1[arg2];
00629b8c      }
00629b8c      
00629b95      return j;
00629b00  }

00629b96                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

00629ba0  void OTHER_to_OTHER_1111_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

00629ba0  {
00629bab      int32_t edi = 8;
00629bb0      int16_t* esi = 8;
00629bb5      int32_t DIBLineBytes = arg1->DIBLineBytes;
00629bb8      uint8_t* MCUBuf = arg1->MCUBuf;
00629bbe      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
00629bbe      
00629bd6      if ((arg1->numxMCUs - 1) != arg2)
00629c15          arg1->state.DIB_ptr = &DIB_ptr[0x20];
00629bd6      else
00629bd6      {
00629bdf          int32_t eax_5;
00629bdf          int32_t edx_1;
00629bdf          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
00629bdf          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
00629be9          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 7) ^ edx_1) - edx_1);
00629be9          
00629bed          if (eax_10 != 0)
00629bef              edi = eax_10;
00629bef          
00629c06          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
00629bd6      }
00629bd6      
00629c29      if (arg3 == (arg1->numyMCUs - 1))
00629c29      {
00629c32          int32_t eax_19;
00629c32          int32_t edx_7;
00629c32          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
00629c32          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
00629c37          int32_t eax_22;
00629c37          int32_t edx_8;
00629c37          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
00629c37          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
00629c41          int16_t* eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
00629c41          
00629c45          if (eax_27 != 0)
00629c47              esi = eax_27;
00629c29      }
00629c29      
00629c71      if ((edi != 8 || esi != 8))
00629c71      {
00629c61          sub_629840(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
00629c6d          return;
00629c71      }
00629c71      
00629ca0      *(uint32_t*)(arg1->state.ctx + 0x9c)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x80], &MCUBuf[0x100], &MCUBuf[0x180]);
00629ba0  }

00629cae                                            8b f6                                                                ..

00629cb0  int32_t sub_629cb0(int32_t arg1, char* arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00629cb0  {
00629cb7      int32_t ebp = arg1;
00629cc7      int32_t result = 0;
00629cc7      
00629ccb      if (arg4 > 0)
00629ccb      {
00629cd3          void* edx_1 = nullptr;
00629cdb          int32_t ecx_1 = 0;
00629cdb          
00629e7d          do
00629e7d          {
00629cdd              int32_t i = 0;
00629cdd              
00629ce5              if (arg3 > 0)
00629ce5              {
00629cec                  int32_t ebp_2 = ecx_1;
00629d07                  void* esi_2 = edx_1;
00629d07                  
00629d42                  do
00629d42                  {
00629d17                      i += 1;
00629d18                      *(uint16_t*)(arg5 + (ebp_2 << 1)) = (((uint16_t)*(uint8_t*)((char*)esi_2 + arg1)) - 0x80);
00629d24                      *(uint16_t*)((arg5 + (ebp_2 << 1)) + 0x80) = (((uint16_t)*(uint8_t*)(((char*)esi_2 + arg1) + 1)) - 0x80);
00629d34                      *(uint16_t*)((arg5 + (ebp_2 << 1)) + 0x100) = (((uint16_t)*(uint8_t*)(((char*)esi_2 + arg1) + 2)) - 0x80);
00629d3c                      esi_2 += 3;
00629d3f                      ebp_2 += 1;
00629d42                  } while (i < arg3);
00629ce5              }
00629ce5              
00629d50              int32_t ebp_3 = (i * 3);
00629d53              void* esi_3 = ((char*)edx_1 + ebp_3);
00629d53              
00629d5d              if (i < 8)
00629d5d              {
00629d6d                  char* edi;
00629d6d                  
00629d6d                  if ((-(i) + 8) < 4)
0062a02f                      edi = &(((char*)edx_1 + ebp_3) - 3)[arg1];
00629d6d                  else
00629d6d                  {
00629d73                      edi = &(((char*)edx_1 + ebp_3) - 3)[arg1];
00629d77                      int32_t ebp_7 = (i + ecx_1);
00629d77                      
00629e1f                      do
00629e1f                      {
00629d98                          i += 3;
00629d9b                          *(uint16_t*)(arg5 + (ebp_7 << 1)) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 3)) - 0x80);
00629da7                          *(uint16_t*)((arg5 + (ebp_7 << 1)) + 0x80) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 2)) - 0x80);
00629db7                          *(uint16_t*)((arg5 + (ebp_7 << 1)) + 0x100) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 1)) - 0x80);
00629dc7                          *(uint16_t*)((arg5 + (ebp_7 << 1)) + 2) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 3)) - 0x80);
00629dd4                          *(uint16_t*)((arg5 + (ebp_7 << 1)) + 0x82) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 2)) - 0x80);
00629de4                          *(uint16_t*)((arg5 + (ebp_7 << 1)) + 0x102) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 1)) - 0x80);
00629df4                          *(uint16_t*)((arg5 + (ebp_7 << 1)) + 4) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 3)) - 0x80);
00629e01                          *(uint16_t*)((arg5 + (ebp_7 << 1)) + 0x84) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 2)) - 0x80);
00629e11                          *(uint16_t*)((arg5 + (ebp_7 << 1)) + 0x104) = (((uint16_t)*(uint8_t*)(((char*)esi_3 + arg1) - 1)) - 0x80);
00629e19                          ebp_7 += 3;
00629e1f                      } while (i < 4);
00629d6d                  }
00629d6d                  
00629e38                  int16_t* ebp_9 = (arg5 + ((i + ecx_1) << 1));
00629e38                  
00629e6d                  do
00629e6d                  {
00629e46                      i += 1;
00629e47                      *(uint16_t*)ebp_9 = (((uint16_t)*(uint8_t*)edi) - 0x80);
00629e52                      ebp_9[0x40] = (((uint16_t)edi[1]) - 0x80);
00629e60                      ebp_9[0x80] = (((uint16_t)edi[2]) - 0x80);
00629e67                      ebp_9 = &ebp_9[1];
00629e6d                  } while (i < 8);
00629d5d              }
00629d5d              
00629e6f              edx_1 += arg2;
00629e73              ecx_1 += 8;
00629e76              result += 1;
00629e7d          } while (result < arg4);
00629e7d          
00629e83          ebp = arg1;
00629ccb      }
00629ccb      
00629e8c      int32_t ecx_23 = (result * 8);
00629e8e      void* edx_4 = ((result << 3) + 0xfffffff8);
00629e8e      
00629e98      if (result < 8)
00629e98      {
00629ebe          while (true)
00629ebe          {
00629ebe              result += 1;
00629ebf              *(uint16_t*)(arg5 + (ecx_23 << 1)) = (((uint16_t)*(uint8_t*)((char*)edx_4 + ebp)) - 0x80);
00629ecb              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x80) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 1)) - 0x80);
00629edb              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x100) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 2)) - 0x80);
00629eeb              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 2) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 3)) - 0x80);
00629ef8              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x82) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 4)) - 0x80);
00629f08              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x102) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 5)) - 0x80);
00629f18              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 4) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 6)) - 0x80);
00629f25              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x84) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 7)) - 0x80);
00629f35              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x104) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 8)) - 0x80);
00629f45              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 6) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 9)) - 0x80);
00629f52              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x86) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0xa)) - 0x80);
00629f62              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x106) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0xb)) - 0x80);
00629f72              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 8) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0xc)) - 0x80);
00629f7f              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x88) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0xd)) - 0x80);
00629f8f              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x108) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0xe)) - 0x80);
00629f9f              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0xa) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0xf)) - 0x80);
00629fac              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x8a) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0x10)) - 0x80);
00629fbc              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x10a) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0x11)) - 0x80);
00629fcc              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0xc) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0x12)) - 0x80);
00629fd9              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x8c) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0x13)) - 0x80);
00629fe9              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x10c) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0x14)) - 0x80);
00629ff9              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0xe) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0x15)) - 0x80);
0062a006              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x8e) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0x16)) - 0x80);
0062a016              *(uint16_t*)((arg5 + (ecx_23 << 1)) + 0x10e) = (((uint16_t)*(uint8_t*)(((char*)edx_4 + ebp) + 0x17)) - 0x80);
0062a016              
0062a021              if (result >= 8)
0062a021                  break;
0062a021              
00629eb5              ecx_23 = (result * 8);
00629ebe          }
00629e98      }
00629e98      
0062a02e      return result;
00629cb0  }

00629ea4              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0062a038                                                                          90 8d b4 26 00 00 00 00                          ...&....

0062a040  void* _OTHER_to_OTHER_111_Full_MCU(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

0062a040  {
0062a041      int32_t esi;
0062a041      int32_t var_8 = esi;
0062a044      int32_t var_14 = esi;
0062a045      char* edi = arg1;
0062a051      int16_t* ebx = arg4;
0062a055      int16_t* ecx = arg5;
0062a059      int32_t i = 0;
0062a05c      int16_t* esi_2 = arg3;
0062a178      void* result;
0062a178      
0062a178      do
0062a178      {
0062a066          i += 1;
0062a067          *(uint16_t*)esi_2 = (((uint16_t)*(uint8_t*)edi) - 0x80);
0062a071          *(uint16_t*)ebx = (((uint16_t)edi[1]) - 0x80);
0062a07b          result = &ecx[1];
0062a07e          *(uint16_t*)ecx = (((uint16_t)edi[2]) - 0x80);
0062a088          esi_2[1] = (((uint16_t)edi[3]) - 0x80);
0062a093          ebx[1] = (((uint16_t)edi[4]) - 0x80);
0062a09e          ecx[1] = (((uint16_t)edi[5]) - 0x80);
0062a0a9          esi_2[2] = (((uint16_t)edi[6]) - 0x80);
0062a0b4          ebx[2] = (((uint16_t)edi[7]) - 0x80);
0062a0bf          ecx[2] = (((uint16_t)edi[8]) - 0x80);
0062a0ca          esi_2[3] = (((uint16_t)edi[9]) - 0x80);
0062a0d5          ebx[3] = (((uint16_t)edi[0xa]) - 0x80);
0062a0e0          ecx[3] = (((uint16_t)edi[0xb]) - 0x80);
0062a0eb          esi_2[4] = (((uint16_t)edi[0xc]) - 0x80);
0062a0f6          ebx[4] = (((uint16_t)edi[0xd]) - 0x80);
0062a101          ecx[4] = (((uint16_t)edi[0xe]) - 0x80);
0062a10c          esi_2[5] = (((uint16_t)edi[0xf]) - 0x80);
0062a117          ebx[5] = (((uint16_t)edi[0x10]) - 0x80);
0062a122          ecx[5] = (((uint16_t)edi[0x11]) - 0x80);
0062a12d          esi_2[6] = (((uint16_t)edi[0x12]) - 0x80);
0062a138          ebx[6] = (((uint16_t)edi[0x13]) - 0x80);
0062a143          ecx[6] = (((uint16_t)edi[0x14]) - 0x80);
0062a14e          esi_2[7] = (((uint16_t)edi[0x15]) - 0x80);
0062a159          ebx[7] = (((uint16_t)edi[0x16]) - 0x80);
0062a164          ecx = &ecx[8];
0062a167          esi_2 = &esi_2[8];
0062a16a          ebx = &ebx[8];
0062a16d          *(uint16_t*)((char*)result + 0xc) = (((uint16_t)edi[0x17]) - 0x80);
0062a171          edi = &edi[arg2];
0062a178      } while (i < 8);
0062a178      
0062a185      return result;
0062a040  }

0062a186                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

0062a190  void OTHER_to_OTHER_111_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062a190  {
0062a19b      int32_t edi = 8;
0062a1a0      int32_t esi = 8;
0062a1a5      int32_t DIBLineBytes = arg1->DIBLineBytes;
0062a1a8      uint8_t* MCUBuf = arg1->MCUBuf;
0062a1ae      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062a1ae      
0062a1c6      if ((arg1->numxMCUs - 1) != arg2)
0062a205          arg1->state.DIB_ptr = &DIB_ptr[0x18];
0062a1c6      else
0062a1c6      {
0062a1cf          int32_t eax_5;
0062a1cf          int32_t edx_1;
0062a1cf          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062a1cf          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
0062a1d9          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 7) ^ edx_1) - edx_1);
0062a1d9          
0062a1dd          if (eax_10 != 0)
0062a1df              edi = eax_10;
0062a1df          
0062a1f6          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
0062a1c6      }
0062a1c6      
0062a219      if (arg3 == (arg1->numyMCUs - 1))
0062a219      {
0062a222          int32_t eax_19;
0062a222          int32_t edx_7;
0062a222          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
0062a222          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
0062a227          int32_t eax_22;
0062a227          int32_t edx_8;
0062a227          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
0062a227          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
0062a231          int32_t eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
0062a231          
0062a235          if (eax_27 != 0)
0062a237              esi = eax_27;
0062a219      }
0062a219      
0062a261      if ((edi != 8 || esi != 8))
0062a261      {
0062a251          sub_629cb0(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062a25d          return;
0062a261      }
0062a261      
0062a286      *(uint32_t*)(arg1->state.ctx + 0x80)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x80], &MCUBuf[0x100]);
0062a190  }

0062a294                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............

0062a2a0  void* sub_62a2a0(int32_t arg1, uint32_t arg2, void* arg3, void* arg4, int32_t arg5)

0062a2a0  {
0062a2bc      void var_640;
0062a2bc      void* eax = &var_640;
0062a2bf      int32_t i_1 = 0;
0062a2bf      
0062a2c3      if (arg4 > 0)
0062a2c3      {
0062a2cb          int32_t ecx_1 = 0;
0062a2d0          int32_t ebx_1 = 0;
0062a2d5          int32_t ebp_1 = 0;
0062a2d8          void* var_24_1 = &var_640;
0062a2d8          
0062a407          do
0062a407          {
0062a2df              int32_t i = 0;
0062a2ea              void* esi;
0062a2ea              
0062a2ea              if (arg3 > 0)
0062a2ea              {
0062a2f3                  uint32_t edi = ecx_1;
0062a329                  esi = ebx_1;
0062a329                  
0062a359                  do
0062a359                  {
0062a334                      i += 1;
0062a335                      *(uint16_t*)((char*)var_24_1 + (esi << 1)) = ((uint16_t)*(uint8_t*)(edi + arg1));
0062a33e                      *(uint16_t*)(((char*)var_24_1 + (esi << 1)) + 0x200) = ((uint16_t)*(uint8_t*)((edi + arg1) + 1));
0062a346                      uint16_t ebp_4 = ((uint16_t)*(uint8_t*)((edi + arg1) + 2));
0062a34b                      edi += 3;
0062a34e                      *(uint16_t*)(((char*)var_24_1 + (esi << 1)) + 0x400) = ebp_4;
0062a356                      esi += 1;
0062a359                  } while (i < arg3);
0062a2ea              }
0062a2ea              
0062a37a              if (i < 0x10)
0062a37a              {
0062a387                  void* edi_1 = ((char*)var_24_1 + ebp_1);
0062a394                  esi = ((char*)var_24_1 + ((i + ebx_1) << 1));
0062a394                  
0062a3e0                  do
0062a3e0                  {
0062a3b8                      i += 1;
0062a3b9                      *(uint16_t*)esi = *(uint16_t*)(((char*)edi_1 + (arg3 << 1)) - 2);
0062a3c4                      *(uint16_t*)((char*)esi + 0x200) = *(uint16_t*)(((char*)edi_1 + (arg3 << 1)) + 0x1fe);
0062a3d3                      *(uint16_t*)((char*)esi + 0x400) = *(uint16_t*)(((char*)edi_1 + (arg3 << 1)) + 0x3fe);
0062a3da                      esi += 2;
0062a3e0                  } while (i < 0x10);
0062a37a              }
0062a37a              
0062a3f0              ecx_1 += arg2;
0062a3f7              ebx_1 += 0x10;
0062a3fa              ebp_1 += 0x20;
0062a3fd              i_1 += 1;
0062a407          } while (i_1 < arg4);
0062a407          
0062a40d          eax = var_24_1;
0062a2c3      }
0062a2c3      
0062a417      if (i_1 < 0x10)
0062a417      {
0062a422          void* ecx_5 = ((char*)eax + (i_1 << 5));
0062a422          
0062a676          do
0062a676          {
0062a434              int16_t edi_6 = *(uint16_t*)((char*)ecx_5 + 0x3fc);
0062a43b              int16_t esi_4 = *(uint16_t*)((char*)ecx_5 - 2);
0062a43f              *(uint16_t*)ecx_5 = *(uint16_t*)((char*)ecx_5 - 0x20);
0062a449              int16_t ebp_6 = *(uint16_t*)((char*)ecx_5 + 0x1fe);
0062a450              *(uint16_t*)((char*)ecx_5 + 0x200) = *(uint16_t*)((char*)ecx_5 + 0x1e0);
0062a45e              i_1 += 1;
0062a45f              *(uint16_t*)((char*)ecx_5 + 0x400) = *(uint16_t*)((char*)ecx_5 + 0x3e0);
0062a46a              *(uint16_t*)((char*)ecx_5 + 2) = *(uint16_t*)((char*)ecx_5 - 0x1e);
0062a475              *(uint16_t*)((char*)ecx_5 + 0x202) = *(uint16_t*)((char*)ecx_5 + 0x1e2);
0062a483              *(uint16_t*)((char*)ecx_5 + 0x402) = *(uint16_t*)((char*)ecx_5 + 0x3e2);
0062a48e              *(uint16_t*)((char*)ecx_5 + 4) = *(uint16_t*)((char*)ecx_5 - 0x1c);
0062a499              *(uint16_t*)((char*)ecx_5 + 0x204) = *(uint16_t*)((char*)ecx_5 + 0x1e4);
0062a4a7              *(uint16_t*)((char*)ecx_5 + 0x404) = *(uint16_t*)((char*)ecx_5 + 0x3e4);
0062a4b2              *(uint16_t*)((char*)ecx_5 + 6) = *(uint16_t*)((char*)ecx_5 - 0x1a);
0062a4bd              *(uint16_t*)((char*)ecx_5 + 0x206) = *(uint16_t*)((char*)ecx_5 + 0x1e6);
0062a4cb              *(uint16_t*)((char*)ecx_5 + 0x406) = *(uint16_t*)((char*)ecx_5 + 0x3e6);
0062a4d6              *(uint16_t*)((char*)ecx_5 + 8) = *(uint16_t*)((char*)ecx_5 - 0x18);
0062a4e1              *(uint16_t*)((char*)ecx_5 + 0x208) = *(uint16_t*)((char*)ecx_5 + 0x1e8);
0062a4ef              *(uint16_t*)((char*)ecx_5 + 0x408) = *(uint16_t*)((char*)ecx_5 + 0x3e8);
0062a4fa              *(uint16_t*)((char*)ecx_5 + 0xa) = *(uint16_t*)((char*)ecx_5 - 0x16);
0062a505              *(uint16_t*)((char*)ecx_5 + 0x20a) = *(uint16_t*)((char*)ecx_5 + 0x1ea);
0062a513              *(uint16_t*)((char*)ecx_5 + 0x40a) = *(uint16_t*)((char*)ecx_5 + 0x3ea);
0062a51e              *(uint16_t*)((char*)ecx_5 + 0xc) = *(uint16_t*)((char*)ecx_5 - 0x14);
0062a529              *(uint16_t*)((char*)ecx_5 + 0x20c) = *(uint16_t*)((char*)ecx_5 + 0x1ec);
0062a537              *(uint16_t*)((char*)ecx_5 + 0x40c) = *(uint16_t*)((char*)ecx_5 + 0x3ec);
0062a542              *(uint16_t*)((char*)ecx_5 + 0xe) = *(uint16_t*)((char*)ecx_5 - 0x12);
0062a54d              *(uint16_t*)((char*)ecx_5 + 0x20e) = *(uint16_t*)((char*)ecx_5 + 0x1ee);
0062a55b              *(uint16_t*)((char*)ecx_5 + 0x40e) = *(uint16_t*)((char*)ecx_5 + 0x3ee);
0062a566              *(uint16_t*)((char*)ecx_5 + 0x10) = *(uint16_t*)((char*)ecx_5 - 0x10);
0062a571              *(uint16_t*)((char*)ecx_5 + 0x210) = *(uint16_t*)((char*)ecx_5 + 0x1f0);
0062a57f              *(uint16_t*)((char*)ecx_5 + 0x410) = *(uint16_t*)((char*)ecx_5 + 0x3f0);
0062a58a              *(uint16_t*)((char*)ecx_5 + 0x12) = *(uint16_t*)((char*)ecx_5 - 0xe);
0062a595              *(uint16_t*)((char*)ecx_5 + 0x212) = *(uint16_t*)((char*)ecx_5 + 0x1f2);
0062a5a3              *(uint16_t*)((char*)ecx_5 + 0x412) = *(uint16_t*)((char*)ecx_5 + 0x3f2);
0062a5ae              *(uint16_t*)((char*)ecx_5 + 0x14) = *(uint16_t*)((char*)ecx_5 - 0xc);
0062a5b9              *(uint16_t*)((char*)ecx_5 + 0x214) = *(uint16_t*)((char*)ecx_5 + 0x1f4);
0062a5c7              *(uint16_t*)((char*)ecx_5 + 0x414) = *(uint16_t*)((char*)ecx_5 + 0x3f4);
0062a5d2              *(uint16_t*)((char*)ecx_5 + 0x16) = *(uint16_t*)((char*)ecx_5 - 0xa);
0062a5dd              *(uint16_t*)((char*)ecx_5 + 0x216) = *(uint16_t*)((char*)ecx_5 + 0x1f6);
0062a5eb              *(uint16_t*)((char*)ecx_5 + 0x416) = *(uint16_t*)((char*)ecx_5 + 0x3f6);
0062a5f6              *(uint16_t*)((char*)ecx_5 + 0x18) = *(uint16_t*)((char*)ecx_5 - 8);
0062a601              *(uint16_t*)((char*)ecx_5 + 0x218) = *(uint16_t*)((char*)ecx_5 + 0x1f8);
0062a60f              *(uint16_t*)((char*)ecx_5 + 0x418) = *(uint16_t*)((char*)ecx_5 + 0x3f8);
0062a61a              *(uint16_t*)((char*)ecx_5 + 0x1a) = *(uint16_t*)((char*)ecx_5 - 6);
0062a625              *(uint16_t*)((char*)ecx_5 + 0x21a) = *(uint16_t*)((char*)ecx_5 + 0x1fa);
0062a633              *(uint16_t*)((char*)ecx_5 + 0x41a) = *(uint16_t*)((char*)ecx_5 + 0x3fa);
0062a63e              *(uint16_t*)((char*)ecx_5 + 0x1c) = *(uint16_t*)((char*)ecx_5 - 4);
0062a649              *(uint16_t*)((char*)ecx_5 + 0x21c) = *(uint16_t*)((char*)ecx_5 + 0x1fc);
0062a650              int16_t ebx_47 = *(uint16_t*)((char*)ecx_5 + 0x3fe);
0062a657              *(uint16_t*)((char*)ecx_5 + 0x41c) = edi_6;
0062a65e              *(uint16_t*)((char*)ecx_5 + 0x1e) = esi_4;
0062a662              *(uint16_t*)((char*)ecx_5 + 0x21e) = ebp_6;
0062a669              *(uint16_t*)((char*)ecx_5 + 0x41e) = ebx_47;
0062a670              ecx_5 += 0x20;
0062a676          } while (i_1 < 0x10);
0062a417      }
0062a417      
0062a67c      int32_t edx_2 = 0;
0062a67e      int32_t ecx_6 = 0;
0062a77c      void* result;
0062a77c      
0062a77c      for (int32_t i_2 = 0; i_2 < 0x100; i_2 += 0x20)
0062a77c      {
0062a690          int16_t* edi_7 = (arg5 + (edx_2 << 1));
0062a69b          void* esi_5 = ((char*)eax + (ecx_6 << 1));
0062a69e          void* ebp_8 = ((char*)eax + (i_2 << 1));
0062a6a1          result = (((char*)eax + (i_2 << 1)) + 0x20);
0062a6a1          
0062a759          do
0062a759          {
0062a6b9              *(uint16_t*)edi_7 = (*(uint16_t*)esi_5 - 0x80);
0062a6c3              edi_7[0x40] = (*(uint16_t*)((char*)esi_5 + 0x10) - 0x80);
0062a6d4              edi_7[0x80] = (*(uint16_t*)((char*)esi_5 + 0x100) - 0x80);
0062a6e5              edi_7[0xc0] = (*(uint16_t*)((char*)esi_5 + 0x110) - 0x80);
0062a716              esi_5 += 2;
0062a719              edi_7[0x100] = (((int16_t)(((((((int32_t)*(uint16_t*)((char*)ebp_8 + 0x200)) + ((int32_t)*(uint16_t*)((char*)ebp_8 + 0x202))) + ((int32_t)*(uint16_t*)((char*)ebp_8 + 0x220))) + ((int32_t)*(uint16_t*)((char*)ebp_8 + 0x222))) + 2) >> 2)) - 0x80);
0062a747              int16_t ecx_26 = (((int16_t)(((((((int32_t)*(uint16_t*)((char*)ebp_8 + 0x400)) + ((int32_t)*(uint16_t*)((char*)ebp_8 + 0x402))) + ((int32_t)*(uint16_t*)((char*)ebp_8 + 0x420))) + ((int32_t)*(uint16_t*)((char*)ebp_8 + 0x422))) + 2) >> 2)) - 0x80);
0062a74a              ebp_8 += 4;
0062a74d              edi_7[0x140] = ecx_26;
0062a754              edi_7 = &edi_7[1];
0062a759          } while (result > ebp_8);
0062a759          
0062a76d          edx_2 += 8;
0062a770          ecx_6 += 0x10;
0062a77c      }
0062a77c      
0062a78c      return result;
0062a2a0  }

0062a78d                                         8d 76 00                                                               .v.

0062a790  void* sub_62a790(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, void* arg5)

0062a790  {
0062a79a      char* edi = arg1;
0062a7a8      int16_t* ecx = arg3;
0062a7af      int16_t* esi = arg4;
0062a7b6      void* result = arg5;
0062a7bf      int32_t i_1 = 0;
0062ac83      int32_t i;
0062ac83      
0062ac83      do
0062ac83      {
0062a7d1          *(uint16_t*)ecx = (((uint16_t)*(uint8_t*)edi) - 0x80);
0062a7db          ecx[1] = (((uint16_t)edi[3]) - 0x80);
0062a7e6          ecx[2] = (((uint16_t)edi[6]) - 0x80);
0062a7f1          ecx[3] = (((uint16_t)edi[9]) - 0x80);
0062a7fc          ecx[4] = (((uint16_t)edi[0xc]) - 0x80);
0062a807          ecx[5] = (((uint16_t)edi[0xf]) - 0x80);
0062a812          ecx[6] = (((uint16_t)edi[0x12]) - 0x80);
0062a81d          ecx[7] = (((uint16_t)edi[0x15]) - 0x80);
0062a828          ecx[0x40] = (((uint16_t)edi[0x18]) - 0x80);
0062a836          ecx[0x41] = (((uint16_t)edi[0x1b]) - 0x80);
0062a844          ecx[0x42] = (((uint16_t)edi[0x1e]) - 0x80);
0062a852          ecx[0x43] = (((uint16_t)edi[0x21]) - 0x80);
0062a860          ecx[0x44] = (((uint16_t)edi[0x24]) - 0x80);
0062a86e          ecx[0x45] = (((uint16_t)edi[0x27]) - 0x80);
0062a87c          ecx[0x46] = (((uint16_t)edi[0x2a]) - 0x80);
0062a88a          ecx[0x47] = (((uint16_t)edi[0x2d]) - 0x80);
0062a899          uint32_t eax_33 = (((uint32_t)edi[1]) + ((uint32_t)edi[4]));
0062a8a3          uint32_t edx_3 = (((uint32_t)edi[7]) + ((uint32_t)edi[0xa]));
0062a8ad          uint32_t ebp_2 = (((uint32_t)edi[0xd]) + ((uint32_t)edi[0x10]));
0062a8bb          uint32_t ebp_4 = (((uint32_t)edi[0x13]) + ((uint32_t)edi[0x16]));
0062a8c9          uint32_t ebp_6 = (((uint32_t)edi[0x19]) + ((uint32_t)edi[0x1c]));
0062a8d7          uint32_t ebp_8 = (((uint32_t)edi[0x1f]) + ((uint32_t)edi[0x22]));
0062a8e5          uint32_t ebp_10 = (((uint32_t)edi[0x25]) + ((uint32_t)edi[0x28]));
0062a8f3          uint32_t ebp_12 = (((uint32_t)edi[0x2b]) + ((uint32_t)edi[0x2e]));
0062a901          uint32_t ebp_14 = (((uint32_t)edi[2]) + ((uint32_t)edi[5]));
0062a90f          uint32_t ebp_16 = (((uint32_t)edi[8]) + ((uint32_t)edi[0xb]));
0062a91d          uint32_t ebp_18 = (((uint32_t)edi[0xe]) + ((uint32_t)edi[0x11]));
0062a92b          uint32_t ebp_20 = (((uint32_t)edi[0x14]) + ((uint32_t)edi[0x17]));
0062a939          uint32_t ebp_22 = (((uint32_t)edi[0x1a]) + ((uint32_t)edi[0x1d]));
0062a947          uint32_t ebp_24 = (((uint32_t)edi[0x20]) + ((uint32_t)edi[0x23]));
0062a955          uint32_t ebp_26 = (((uint32_t)edi[0x26]) + ((uint32_t)edi[0x29]));
0062a963          uint32_t ebp_28 = (((uint32_t)edi[0x2c]) + ((uint32_t)edi[0x2f]));
0062a969          void* edi_1 = &edi[arg2];
0062a97a          ecx[8] = (((uint16_t)*(uint8_t*)edi_1) - 0x80);
0062a985          ecx[9] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 3)) - 0x80);
0062a990          ecx[0xa] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 6)) - 0x80);
0062a99b          ecx[0xb] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 9)) - 0x80);
0062a9a6          ecx[0xc] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0xc)) - 0x80);
0062a9b1          ecx[0xd] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0xf)) - 0x80);
0062a9bc          ecx[0xe] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x12)) - 0x80);
0062a9c7          ecx[0xf] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x15)) - 0x80);
0062a9d2          ecx[0x48] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x18)) - 0x80);
0062a9e0          ecx[0x49] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x1b)) - 0x80);
0062a9ee          ecx[0x4a] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x1e)) - 0x80);
0062a9fc          ecx[0x4b] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x21)) - 0x80);
0062aa0a          ecx[0x4c] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x24)) - 0x80);
0062aa18          ecx[0x4d] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x27)) - 0x80);
0062aa26          ecx[0x4e] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x2a)) - 0x80);
0062aa34          ecx[0x4f] = (((uint16_t)*(uint8_t*)((char*)edi_1 + 0x2d)) - 0x80);
0062aa4d          uint32_t ebx_49 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 7)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0xa)));
0062aa5f          uint32_t ebx_51 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0xd)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x10)));
0062aa6d          uint32_t ebx_53 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x13)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x16)));
0062aa7e          uint32_t ebx_55 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x19)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x1c)));
0062aa8c          uint32_t ebx_57 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x1f)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x22)));
0062aa9d          uint32_t ebx_59 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x25)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x28)));
0062aaab          uint32_t ebx_61 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x2b)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x2e)));
0062aabd          uint32_t ebx_63 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 2)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 5)));
0062aacb          uint32_t ebx_65 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 8)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0xb)));
0062aad9          uint32_t ebx_67 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0xe)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x11)));
0062aae7          uint32_t ebx_69 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x14)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x17)));
0062aaf5          uint32_t ebx_71 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x1a)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x1d)));
0062ab03          uint32_t ebx_73 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x20)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x23)));
0062ab11          uint32_t ecx_16 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x26)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x29)));
0062ab1b          uint32_t ebx_76 = (((uint32_t)*(uint8_t*)((char*)edi_1 + 0x2c)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x2f)));
0062ab1d          *(uint16_t*)esi = (((int16_t)((((((uint32_t)*(uint8_t*)((char*)edi_1 + 1)) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 4))) + eax_33) + 2) >> 2)) - 0x80);
0062ab32          esi[1] = (((int16_t)(((ebx_49 + edx_3) + 2) >> 2)) - 0x80);
0062ab48          esi[2] = (((int16_t)(((ebx_51 + ebp_2) + 2) >> 2)) - 0x80);
0062ab5e          esi[3] = (((int16_t)(((ebx_53 + ebp_4) + 2) >> 2)) - 0x80);
0062ab74          esi[4] = (((int16_t)(((ebx_55 + ebp_6) + 2) >> 2)) - 0x80);
0062ab8a          esi[5] = (((int16_t)(((ebx_57 + ebp_8) + 2) >> 2)) - 0x80);
0062aba0          esi[6] = (((int16_t)(((ebx_59 + ebp_10) + 2) >> 2)) - 0x80);
0062abb6          esi[7] = (((int16_t)(((ebx_61 + ebp_12) + 2) >> 2)) - 0x80);
0062abc8          int16_t* result_1 = result;
0062abcc          *(uint16_t*)result_1 = (((int16_t)(((ebx_63 + ebp_14) + 2) >> 2)) - 0x80);
0062abe1          result_1[1] = (((int16_t)(((ebx_65 + ebp_16) + 2) >> 2)) - 0x80);
0062abf7          result_1[2] = (((int16_t)(((ebx_67 + ebp_18) + 2) >> 2)) - 0x80);
0062ac0d          result_1[3] = (((int16_t)(((ebx_69 + ebp_20) + 2) >> 2)) - 0x80);
0062ac23          result_1[4] = (((int16_t)(((ebx_71 + ebp_22) + 2) >> 2)) - 0x80);
0062ac35          esi = &esi[8];
0062ac38          result_1[5] = (((int16_t)(((ebx_73 + ebp_24) + 2) >> 2)) - 0x80);
0062ac4e          result_1[6] = (((int16_t)(((ecx_16 + ebp_26) + 2) >> 2)) - 0x80);
0062ac64          result_1[7] = (((int16_t)(((ebx_76 + ebp_28) + 2) >> 2)) - 0x80);
0062ac68          result = &result_1[8];
0062ac6b          ecx = &ecx[0x10];
0062ac6e          edi = ((char*)edi_1 + arg2);
0062ac79          i = (i_1 + 2);
0062ac7c          i_1 = i;
0062ac83      } while (i < 8);
0062ac93      return result;
0062a790  }

0062ac94                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............

0062aca0  void* _OTHER_to_OTHER_411_Full_MCU(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, void* arg5)

0062aca0  {
0062acce      sub_62a790(arg1, arg2, arg3, arg4, arg5);
0062ad05      return sub_62a790(&arg1[(arg2 << 3)], arg2, &arg3[0x80], &arg4[0x20], ((char*)arg5 + 0x40));
0062aca0  }

0062ad06                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

0062ad10  void OTHER_to_OTHER_411_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062ad10  {
0062ad1b      void* edi = 0x10;
0062ad20      void* esi = 0x10;
0062ad25      int32_t DIBLineBytes = arg1->DIBLineBytes;
0062ad28      uint8_t* MCUBuf = arg1->MCUBuf;
0062ad2e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062ad2e      
0062ad46      if ((arg1->numxMCUs - 1) != arg2)
0062ad84          arg1->state.DIB_ptr = &DIB_ptr[0x30];
0062ad46      else
0062ad46      {
0062ad4f          int32_t eax_5;
0062ad4f          int32_t edx_1;
0062ad4f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062ad4f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
0062ad59          void* eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
0062ad59          
0062ad5d          if (eax_10 != 0)
0062ad5f              edi = eax_10;
0062ad5f          
0062ad75          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 4) + 0x10) * DIBLineBytes)];
0062ad46      }
0062ad46      
0062ad98      if (arg3 == (arg1->numyMCUs - 1))
0062ad98      {
0062ada1          int32_t eax_22;
0062ada1          int32_t edx_5;
0062ada1          edx_5 = HIGHD(((int64_t)arg1->DIBHeight));
0062ada1          eax_22 = LOWD(((int64_t)arg1->DIBHeight));
0062ada6          int32_t eax_25;
0062ada6          int32_t edx_6;
0062ada6          edx_6 = HIGHD(((int64_t)((eax_22 ^ edx_5) - edx_5)));
0062ada6          eax_25 = LOWD(((int64_t)((eax_22 ^ edx_5) - edx_5)));
0062adb0          void* eax_30 = (((((eax_25 ^ edx_6) - edx_6) & 0xf) ^ edx_6) - edx_6);
0062adb0          
0062adb4          if (eax_30 != 0)
0062adb6              esi = eax_30;
0062ad98      }
0062ad98      
0062ade0      if ((edi != 0x10 || esi != 0x10))
0062ade0      {
0062add0          sub_62a2a0(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062addc          return;
0062ade0      }
0062ade0      
0062ae05      *(uint32_t*)(arg1->state.ctx + 0x88)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x200], &MCUBuf[0x280]);
0062ad10  }

0062ae13                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

0062ae20  void* sub_62ae20(int32_t arg1, uint32_t arg2, void* arg3, void* arg4, int32_t arg5)

0062ae20  {
0062ae3c      void var_340;
0062ae3c      void* result = &var_340;
0062ae3f      int32_t i_1 = 0;
0062ae3f      
0062ae43      if (arg4 > 0)
0062ae43      {
0062ae4b          int32_t ecx_1 = 0;
0062ae50          int32_t ebx_1 = 0;
0062ae55          int32_t ebp_1 = 0;
0062ae58          void* result_1 = &var_340;
0062ae58          
0062af87          do
0062af87          {
0062ae5f              int32_t i = 0;
0062ae6a              void* esi;
0062ae6a              
0062ae6a              if (arg3 > 0)
0062ae6a              {
0062ae73                  uint32_t edi = ecx_1;
0062aea9                  esi = ebx_1;
0062aea9                  
0062aed9                  do
0062aed9                  {
0062aeb4                      i += 1;
0062aeb5                      *(uint16_t*)((char*)result_1 + (esi << 1)) = ((uint16_t)*(uint8_t*)(edi + arg1));
0062aebe                      *(uint16_t*)(((char*)result_1 + (esi << 1)) + 0x100) = ((uint16_t)*(uint8_t*)((edi + arg1) + 1));
0062aec6                      uint16_t ebp_4 = ((uint16_t)*(uint8_t*)((edi + arg1) + 2));
0062aecb                      edi += 3;
0062aece                      *(uint16_t*)(((char*)result_1 + (esi << 1)) + 0x200) = ebp_4;
0062aed6                      esi += 1;
0062aed9                  } while (i < arg3);
0062ae6a              }
0062ae6a              
0062aefa              if (i < 0x10)
0062aefa              {
0062af07                  void* edi_1 = ((char*)result_1 + ebp_1);
0062af14                  esi = ((char*)result_1 + ((i + ebx_1) << 1));
0062af14                  
0062af60                  do
0062af60                  {
0062af38                      i += 1;
0062af39                      *(uint16_t*)esi = *(uint16_t*)(((char*)edi_1 + (arg3 << 1)) - 2);
0062af44                      *(uint16_t*)((char*)esi + 0x100) = *(uint16_t*)(((char*)edi_1 + (arg3 << 1)) + 0xfe);
0062af53                      *(uint16_t*)((char*)esi + 0x200) = *(uint16_t*)(((char*)edi_1 + (arg3 << 1)) + 0x1fe);
0062af5a                      esi += 2;
0062af60                  } while (i < 0x10);
0062aefa              }
0062aefa              
0062af70              ecx_1 += arg2;
0062af77              ebx_1 += 0x10;
0062af7a              ebp_1 += 0x20;
0062af7d              i_1 += 1;
0062af87          } while (i_1 < arg4);
0062af87          
0062af8d          result = result_1;
0062ae43      }
0062ae43      
0062af97      if (i_1 < 8)
0062af97      {
0062afa2          void* ecx_5 = ((char*)result + (i_1 << 5));
0062afa2          
0062b1f6          do
0062b1f6          {
0062afb4              int16_t edi_6 = *(uint16_t*)((char*)ecx_5 + 0x1fc);
0062afbb              int16_t esi_4 = *(uint16_t*)((char*)ecx_5 - 2);
0062afbf              *(uint16_t*)ecx_5 = *(uint16_t*)((char*)ecx_5 - 0x20);
0062afc9              int16_t ebp_6 = *(uint16_t*)((char*)ecx_5 + 0xfe);
0062afd0              *(uint16_t*)((char*)ecx_5 + 0x100) = *(uint16_t*)((char*)ecx_5 + 0xe0);
0062afde              i_1 += 1;
0062afdf              *(uint16_t*)((char*)ecx_5 + 0x200) = *(uint16_t*)((char*)ecx_5 + 0x1e0);
0062afea              *(uint16_t*)((char*)ecx_5 + 2) = *(uint16_t*)((char*)ecx_5 - 0x1e);
0062aff5              *(uint16_t*)((char*)ecx_5 + 0x102) = *(uint16_t*)((char*)ecx_5 + 0xe2);
0062b003              *(uint16_t*)((char*)ecx_5 + 0x202) = *(uint16_t*)((char*)ecx_5 + 0x1e2);
0062b00e              *(uint16_t*)((char*)ecx_5 + 4) = *(uint16_t*)((char*)ecx_5 - 0x1c);
0062b019              *(uint16_t*)((char*)ecx_5 + 0x104) = *(uint16_t*)((char*)ecx_5 + 0xe4);
0062b027              *(uint16_t*)((char*)ecx_5 + 0x204) = *(uint16_t*)((char*)ecx_5 + 0x1e4);
0062b032              *(uint16_t*)((char*)ecx_5 + 6) = *(uint16_t*)((char*)ecx_5 - 0x1a);
0062b03d              *(uint16_t*)((char*)ecx_5 + 0x106) = *(uint16_t*)((char*)ecx_5 + 0xe6);
0062b04b              *(uint16_t*)((char*)ecx_5 + 0x206) = *(uint16_t*)((char*)ecx_5 + 0x1e6);
0062b056              *(uint16_t*)((char*)ecx_5 + 8) = *(uint16_t*)((char*)ecx_5 - 0x18);
0062b061              *(uint16_t*)((char*)ecx_5 + 0x108) = *(uint16_t*)((char*)ecx_5 + 0xe8);
0062b06f              *(uint16_t*)((char*)ecx_5 + 0x208) = *(uint16_t*)((char*)ecx_5 + 0x1e8);
0062b07a              *(uint16_t*)((char*)ecx_5 + 0xa) = *(uint16_t*)((char*)ecx_5 - 0x16);
0062b085              *(uint16_t*)((char*)ecx_5 + 0x10a) = *(uint16_t*)((char*)ecx_5 + 0xea);
0062b093              *(uint16_t*)((char*)ecx_5 + 0x20a) = *(uint16_t*)((char*)ecx_5 + 0x1ea);
0062b09e              *(uint16_t*)((char*)ecx_5 + 0xc) = *(uint16_t*)((char*)ecx_5 - 0x14);
0062b0a9              *(uint16_t*)((char*)ecx_5 + 0x10c) = *(uint16_t*)((char*)ecx_5 + 0xec);
0062b0b7              *(uint16_t*)((char*)ecx_5 + 0x20c) = *(uint16_t*)((char*)ecx_5 + 0x1ec);
0062b0c2              *(uint16_t*)((char*)ecx_5 + 0xe) = *(uint16_t*)((char*)ecx_5 - 0x12);
0062b0cd              *(uint16_t*)((char*)ecx_5 + 0x10e) = *(uint16_t*)((char*)ecx_5 + 0xee);
0062b0db              *(uint16_t*)((char*)ecx_5 + 0x20e) = *(uint16_t*)((char*)ecx_5 + 0x1ee);
0062b0e6              *(uint16_t*)((char*)ecx_5 + 0x10) = *(uint16_t*)((char*)ecx_5 - 0x10);
0062b0f1              *(uint16_t*)((char*)ecx_5 + 0x110) = *(uint16_t*)((char*)ecx_5 + 0xf0);
0062b0ff              *(uint16_t*)((char*)ecx_5 + 0x210) = *(uint16_t*)((char*)ecx_5 + 0x1f0);
0062b10a              *(uint16_t*)((char*)ecx_5 + 0x12) = *(uint16_t*)((char*)ecx_5 - 0xe);
0062b115              *(uint16_t*)((char*)ecx_5 + 0x112) = *(uint16_t*)((char*)ecx_5 + 0xf2);
0062b123              *(uint16_t*)((char*)ecx_5 + 0x212) = *(uint16_t*)((char*)ecx_5 + 0x1f2);
0062b12e              *(uint16_t*)((char*)ecx_5 + 0x14) = *(uint16_t*)((char*)ecx_5 - 0xc);
0062b139              *(uint16_t*)((char*)ecx_5 + 0x114) = *(uint16_t*)((char*)ecx_5 + 0xf4);
0062b147              *(uint16_t*)((char*)ecx_5 + 0x214) = *(uint16_t*)((char*)ecx_5 + 0x1f4);
0062b152              *(uint16_t*)((char*)ecx_5 + 0x16) = *(uint16_t*)((char*)ecx_5 - 0xa);
0062b15d              *(uint16_t*)((char*)ecx_5 + 0x116) = *(uint16_t*)((char*)ecx_5 + 0xf6);
0062b16b              *(uint16_t*)((char*)ecx_5 + 0x216) = *(uint16_t*)((char*)ecx_5 + 0x1f6);
0062b176              *(uint16_t*)((char*)ecx_5 + 0x18) = *(uint16_t*)((char*)ecx_5 - 8);
0062b181              *(uint16_t*)((char*)ecx_5 + 0x118) = *(uint16_t*)((char*)ecx_5 + 0xf8);
0062b18f              *(uint16_t*)((char*)ecx_5 + 0x218) = *(uint16_t*)((char*)ecx_5 + 0x1f8);
0062b19a              *(uint16_t*)((char*)ecx_5 + 0x1a) = *(uint16_t*)((char*)ecx_5 - 6);
0062b1a5              *(uint16_t*)((char*)ecx_5 + 0x11a) = *(uint16_t*)((char*)ecx_5 + 0xfa);
0062b1b3              *(uint16_t*)((char*)ecx_5 + 0x21a) = *(uint16_t*)((char*)ecx_5 + 0x1fa);
0062b1be              *(uint16_t*)((char*)ecx_5 + 0x1c) = *(uint16_t*)((char*)ecx_5 - 4);
0062b1c9              *(uint16_t*)((char*)ecx_5 + 0x11c) = *(uint16_t*)((char*)ecx_5 + 0xfc);
0062b1d0              int16_t ebx_47 = *(uint16_t*)((char*)ecx_5 + 0x1fe);
0062b1d7              *(uint16_t*)((char*)ecx_5 + 0x21c) = edi_6;
0062b1de              *(uint16_t*)((char*)ecx_5 + 0x1e) = esi_4;
0062b1e2              *(uint16_t*)((char*)ecx_5 + 0x11e) = ebp_6;
0062b1e9              *(uint16_t*)((char*)ecx_5 + 0x21e) = ebx_47;
0062b1f0              ecx_5 += 0x20;
0062b1f6          } while (i_1 < 8);
0062af97      }
0062af97      
0062b1fc      int32_t ecx_6 = 0;
0062b1fc      
0062b29c      for (int32_t i_2 = 0; i_2 < 0x80; i_2 += 0x10)
0062b29c      {
0062b207          int16_t* edi_7 = (arg5 + (ecx_6 << 1));
0062b20a          void* esi_5 = ((char*)result + (i_2 << 1));
0062b20d          void* j = ((char*)result + (i_2 << 1));
0062b20d          
0062b280          do
0062b280          {
0062b228              *(uint16_t*)edi_7 = (*(uint16_t*)esi_5 - 0x80);
0062b232              edi_7[0x40] = (*(uint16_t*)((char*)esi_5 + 0x10) - 0x80);
0062b250              edi_7[0x80] = (((int16_t)(((((int32_t)*(uint16_t*)((char*)j + 0x100)) + ((int32_t)*(uint16_t*)((char*)j + 0x102))) + 1) >> 1)) - 0x80);
0062b26e              edi_7[0xc0] = (((int16_t)(((((int32_t)*(uint16_t*)((char*)j + 0x200)) + ((int32_t)*(uint16_t*)((char*)j + 0x202))) + 1) >> 1)) - 0x80);
0062b275              edi_7 = &edi_7[1];
0062b278              esi_5 += 2;
0062b27b              j += 4;
0062b280          } while ((((char*)result + (i_2 << 1)) + 0x20) > j);
0062b280          
0062b290          ecx_6 += 8;
0062b29c      }
0062b29c      
0062b2ac      return result;
0062ae20  }

0062b2ad                                         8d 76 00                                                               .v.

0062b2b0  int32_t _OTHER_to_OTHER_422_Full_MCU(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

0062b2b0  {
0062b2b1      int32_t esi;
0062b2b1      int32_t var_8 = esi;
0062b2b4      int32_t var_14 = esi;
0062b2bd      int16_t* ebx = arg3;
0062b2c1      int16_t* ecx = arg4;
0062b2c5      int16_t* edx = arg5;
0062b2c9      int32_t i = 0;
0062b2cc      char* esi_2 = arg1;
0062b2cc      
0062b4f5      do
0062b4f5      {
0062b2d6          i += 1;
0062b2d7          *(uint16_t*)ebx = (((uint16_t)*(uint8_t*)esi_2) - 0x80);
0062b2e1          ebx[1] = (((uint16_t)esi_2[3]) - 0x80);
0062b2ec          ebx[2] = (((uint16_t)esi_2[6]) - 0x80);
0062b2f7          ebx[3] = (((uint16_t)esi_2[9]) - 0x80);
0062b302          ebx[4] = (((uint16_t)esi_2[0xc]) - 0x80);
0062b30d          ebx[5] = (((uint16_t)esi_2[0xf]) - 0x80);
0062b318          ebx[6] = (((uint16_t)esi_2[0x12]) - 0x80);
0062b323          ebx[7] = (((uint16_t)esi_2[0x15]) - 0x80);
0062b32e          ebx[0x40] = (((uint16_t)esi_2[0x18]) - 0x80);
0062b33c          ebx[0x41] = (((uint16_t)esi_2[0x1b]) - 0x80);
0062b34a          ebx[0x42] = (((uint16_t)esi_2[0x1e]) - 0x80);
0062b358          ebx[0x43] = (((uint16_t)esi_2[0x21]) - 0x80);
0062b366          ebx[0x44] = (((uint16_t)esi_2[0x24]) - 0x80);
0062b374          ebx[0x45] = (((uint16_t)esi_2[0x27]) - 0x80);
0062b382          ebx[0x46] = (((uint16_t)esi_2[0x2a]) - 0x80);
0062b390          ebx[0x47] = (((uint16_t)esi_2[0x2d]) - 0x80);
0062b3a8          *(uint16_t*)ecx = (((int16_t)(((((uint32_t)esi_2[1]) + ((uint32_t)esi_2[4])) + 1) >> 1)) - 0x80);
0062b3bc          ecx[1] = (((int16_t)(((((uint32_t)esi_2[7]) + ((uint32_t)esi_2[0xa])) + 1) >> 1)) - 0x80);
0062b3d1          ecx[2] = (((int16_t)(((((uint32_t)esi_2[0xd]) + ((uint32_t)esi_2[0x10])) + 1) >> 1)) - 0x80);
0062b3e6          ecx[3] = (((int16_t)(((((uint32_t)esi_2[0x13]) + ((uint32_t)esi_2[0x16])) + 1) >> 1)) - 0x80);
0062b3fb          ecx[4] = (((int16_t)(((((uint32_t)esi_2[0x19]) + ((uint32_t)esi_2[0x1c])) + 1) >> 1)) - 0x80);
0062b410          ecx[5] = (((int16_t)(((((uint32_t)esi_2[0x1f]) + ((uint32_t)esi_2[0x22])) + 1) >> 1)) - 0x80);
0062b425          ecx[6] = (((int16_t)(((((uint32_t)esi_2[0x25]) + ((uint32_t)esi_2[0x28])) + 1) >> 1)) - 0x80);
0062b43a          ecx[7] = (((int16_t)(((((uint32_t)esi_2[0x2b]) + ((uint32_t)esi_2[0x2e])) + 1) >> 1)) - 0x80);
0062b44f          *(uint16_t*)edx = (((int16_t)(((((uint32_t)esi_2[2]) + ((uint32_t)esi_2[5])) + 1) >> 1)) - 0x80);
0062b463          edx[1] = (((int16_t)(((((uint32_t)esi_2[8]) + ((uint32_t)esi_2[0xb])) + 1) >> 1)) - 0x80);
0062b478          edx[2] = (((int16_t)(((((uint32_t)esi_2[0xe]) + ((uint32_t)esi_2[0x11])) + 1) >> 1)) - 0x80);
0062b48d          edx[3] = (((int16_t)(((((uint32_t)esi_2[0x14]) + ((uint32_t)esi_2[0x17])) + 1) >> 1)) - 0x80);
0062b4a2          edx[4] = (((int16_t)(((((uint32_t)esi_2[0x1a]) + ((uint32_t)esi_2[0x1d])) + 1) >> 1)) - 0x80);
0062b4b7          edx[5] = (((int16_t)(((((uint32_t)esi_2[0x20]) + ((uint32_t)esi_2[0x23])) + 1) >> 1)) - 0x80);
0062b4cc          edx[6] = (((int16_t)(((((uint32_t)esi_2[0x26]) + ((uint32_t)esi_2[0x29])) + 1) >> 1)) - 0x80);
0062b4e1          edx[7] = (((int16_t)(((((uint32_t)esi_2[0x2c]) + ((uint32_t)esi_2[0x2f])) + 1) >> 1)) - 0x80);
0062b4e5          ebx = &ebx[8];
0062b4e8          ecx = &ecx[8];
0062b4eb          edx = &edx[8];
0062b4ee          esi_2 = &esi_2[arg2];
0062b4f5      } while (i < 8);
0062b4f5      
0062b502      return i;
0062b2b0  }

0062b503           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

0062b510  void OTHER_to_OTHER_422_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062b510  {
0062b51b      void* edi = 0x10;
0062b520      void* esi = 8;
0062b525      int32_t DIBLineBytes = arg1->DIBLineBytes;
0062b528      uint8_t* MCUBuf = arg1->MCUBuf;
0062b52e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062b52e      
0062b546      if ((arg1->numxMCUs - 1) != arg2)
0062b585          arg1->state.DIB_ptr = &DIB_ptr[0x30];
0062b546      else
0062b546      {
0062b54f          int32_t eax_5;
0062b54f          int32_t edx_1;
0062b54f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062b54f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
0062b559          void* eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
0062b559          
0062b55d          if (eax_10 != 0)
0062b55f              edi = eax_10;
0062b55f          
0062b576          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
0062b546      }
0062b546      
0062b599      if (arg3 == (arg1->numyMCUs - 1))
0062b599      {
0062b5a2          int32_t eax_19;
0062b5a2          int32_t edx_7;
0062b5a2          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
0062b5a2          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
0062b5a7          int32_t eax_22;
0062b5a7          int32_t edx_8;
0062b5a7          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
0062b5a7          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
0062b5b1          void* eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
0062b5b1          
0062b5b5          if (eax_27 != 0)
0062b5b7              esi = eax_27;
0062b599      }
0062b599      
0062b5e1      if ((edi != 0x10 || esi != 8))
0062b5e1      {
0062b5d1          sub_62ae20(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062b5dd          return;
0062b5e1      }
0062b5e1      
0062b606      *(uint32_t*)(arg1->state.ctx + 0x84)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x100], &MCUBuf[0x180]);
0062b510  }

0062b614                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............

0062b620  int32_t sub_62b620(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

0062b620  {
0062b635      void var_340;
0062b635      void* ebp = &var_340;
0062b638      int32_t i_2 = 0;
0062b638      
0062b63c      if (arg4 > 0)
0062b63c      {
0062b668          void* eax_2 = nullptr;
0062b685          int32_t edx_2 = 0;
0062b690          int32_t ecx_2 = arg3;
0062b697          int32_t var_1c_1 = 0;
0062b6a5          int32_t i_4 = 0;
0062b6ac          void* var_38_1 = &var_340;
0062b6b3          int32_t ebp_1 = (arg3 << 1);
0062b6b3          
0062b891          do
0062b891          {
0062b6ba              int32_t i = 0;
0062b6ba              
0062b6c5              if ((arg3 - 1) > 0)
0062b6c5              {
0062b6d5                  int32_t ebx_2 = edx_2;
0062b6e6                  void* eax_3 = eax_2;
0062b6e6                  
0062b761                  do
0062b761                  {
0062b714                      i += 2;
0062b717                      *(uint16_t*)((char*)var_38_1 + (ebx_2 << 1)) = ((uint16_t)*(uint8_t*)((char*)eax_3 + arg1));
0062b720                      *(uint16_t*)(((char*)var_38_1 + (ebx_2 << 1)) + 2) = ((uint16_t)*(uint8_t*)(((char*)eax_3 + arg1) + 2));
0062b72a                      *(uint16_t*)(((char*)var_38_1 + (ebx_2 << 1)) + 0x100) = ((uint16_t)*(uint8_t*)(((char*)eax_3 + arg1) + 1));
0062b737                      *(uint16_t*)(((char*)var_38_1 + (ebx_2 << 1)) + 0x102) = ((uint16_t)*(uint8_t*)(((char*)eax_3 + arg1) + 1));
0062b744                      *(uint16_t*)(((char*)var_38_1 + (ebx_2 << 1)) + 0x200) = ((uint16_t)*(uint8_t*)(((char*)eax_3 + arg1) + 3));
0062b74c                      uint16_t edi_7 = ((uint16_t)*(uint8_t*)(((char*)eax_3 + arg1) + 3));
0062b751                      eax_3 += 4;
0062b754                      *(uint16_t*)(((char*)var_38_1 + (ebx_2 << 1)) + 0x202) = edi_7;
0062b75c                      ebx_2 += 2;
0062b761                  } while (i < (arg3 - 1));
0062b6c5              }
0062b6c5              
0062b788              if ((arg3 & 1) != 0)
0062b788              {
0062b79d                  *(uint16_t*)(((char*)var_38_1 + (ecx_2 << 1)) - 2) = ((uint16_t)*(uint8_t*)((ebp_1 + arg1) - 2));
0062b7ae                  *(uint16_t*)(((char*)var_38_1 + (ecx_2 << 1)) + 0xfe) = ((uint16_t)*(uint8_t*)((ebp_1 + arg1) - 1));
0062b7c2                  *(uint16_t*)(((char*)var_38_1 + (ecx_2 << 1)) + 0x1fe) = ((uint16_t)*(uint8_t*)((ebp_1 + arg1) - 3));
0062b7ca                  i = arg3;
0062b788              }
0062b788              
0062b7d4              if (i < 0x10)
0062b7d4              {
0062b7e8                  void* ebx_6 = ((char*)var_38_1 + var_1c_1);
0062b7fc                  void* ebx_8 = ((char*)var_38_1 + ((i + edx_2) << 1));
0062b81c                  int32_t i_1 = i;
0062b81c                  
0062b84d                  do
0062b84d                  {
0062b825                      i_1 += 1;
0062b826                      *(uint16_t*)ebx_8 = *(uint16_t*)(((char*)ebx_6 + (arg3 << 1)) - 2);
0062b831                      *(uint16_t*)((char*)ebx_8 + 0x100) = *(uint16_t*)(((char*)ebx_6 + (arg3 << 1)) + 0xfe);
0062b840                      *(uint16_t*)((char*)ebx_8 + 0x200) = *(uint16_t*)(((char*)ebx_6 + (arg3 << 1)) + 0x1fe);
0062b847                      ebx_8 += 2;
0062b84d                  } while (i_1 < 0x10);
0062b7d4              }
0062b7d4              
0062b85d              eax_2 += arg2;
0062b864              edx_2 += 0x10;
0062b867              ecx_2 += 0x10;
0062b86a              ebp_1 += arg2;
0062b878              i_2 = (i_4 + 1);
0062b879              var_1c_1 += 0x20;
0062b88a              i_4 = i_2;
0062b891          } while (i_2 < arg4);
0062b891          
0062b897          ebp = var_38_1;
0062b63c      }
0062b63c      
0062b8a1      if (i_2 < 8)
0062b8a1      {
0062b8ac          void* eax_6 = ((char*)ebp + (i_2 << 5));
0062b8ac          
0062baf6          do
0062baf6          {
0062b8b4              int16_t edi_14 = *(uint16_t*)((char*)eax_6 + 0x1fc);
0062b8bb              int16_t esi_10 = *(uint16_t*)((char*)eax_6 - 2);
0062b8bf              *(uint16_t*)eax_6 = *(uint16_t*)((char*)eax_6 - 0x20);
0062b8c9              int16_t ecx_5 = *(uint16_t*)((char*)eax_6 + 0xfe);
0062b8d0              *(uint16_t*)((char*)eax_6 + 0x100) = *(uint16_t*)((char*)eax_6 + 0xe0);
0062b8de              i_2 += 1;
0062b8df              *(uint16_t*)((char*)eax_6 + 0x200) = *(uint16_t*)((char*)eax_6 + 0x1e0);
0062b8ea              *(uint16_t*)((char*)eax_6 + 2) = *(uint16_t*)((char*)eax_6 - 0x1e);
0062b8f5              *(uint16_t*)((char*)eax_6 + 0x102) = *(uint16_t*)((char*)eax_6 + 0xe2);
0062b903              *(uint16_t*)((char*)eax_6 + 0x202) = *(uint16_t*)((char*)eax_6 + 0x1e2);
0062b90e              *(uint16_t*)((char*)eax_6 + 4) = *(uint16_t*)((char*)eax_6 - 0x1c);
0062b919              *(uint16_t*)((char*)eax_6 + 0x104) = *(uint16_t*)((char*)eax_6 + 0xe4);
0062b927              *(uint16_t*)((char*)eax_6 + 0x204) = *(uint16_t*)((char*)eax_6 + 0x1e4);
0062b932              *(uint16_t*)((char*)eax_6 + 6) = *(uint16_t*)((char*)eax_6 - 0x1a);
0062b93d              *(uint16_t*)((char*)eax_6 + 0x106) = *(uint16_t*)((char*)eax_6 + 0xe6);
0062b94b              *(uint16_t*)((char*)eax_6 + 0x206) = *(uint16_t*)((char*)eax_6 + 0x1e6);
0062b956              *(uint16_t*)((char*)eax_6 + 8) = *(uint16_t*)((char*)eax_6 - 0x18);
0062b961              *(uint16_t*)((char*)eax_6 + 0x108) = *(uint16_t*)((char*)eax_6 + 0xe8);
0062b96f              *(uint16_t*)((char*)eax_6 + 0x208) = *(uint16_t*)((char*)eax_6 + 0x1e8);
0062b97a              *(uint16_t*)((char*)eax_6 + 0xa) = *(uint16_t*)((char*)eax_6 - 0x16);
0062b985              *(uint16_t*)((char*)eax_6 + 0x10a) = *(uint16_t*)((char*)eax_6 + 0xea);
0062b993              *(uint16_t*)((char*)eax_6 + 0x20a) = *(uint16_t*)((char*)eax_6 + 0x1ea);
0062b99e              *(uint16_t*)((char*)eax_6 + 0xc) = *(uint16_t*)((char*)eax_6 - 0x14);
0062b9a9              *(uint16_t*)((char*)eax_6 + 0x10c) = *(uint16_t*)((char*)eax_6 + 0xec);
0062b9b7              *(uint16_t*)((char*)eax_6 + 0x20c) = *(uint16_t*)((char*)eax_6 + 0x1ec);
0062b9c2              *(uint16_t*)((char*)eax_6 + 0xe) = *(uint16_t*)((char*)eax_6 - 0x12);
0062b9cd              *(uint16_t*)((char*)eax_6 + 0x10e) = *(uint16_t*)((char*)eax_6 + 0xee);
0062b9db              *(uint16_t*)((char*)eax_6 + 0x20e) = *(uint16_t*)((char*)eax_6 + 0x1ee);
0062b9e6              *(uint16_t*)((char*)eax_6 + 0x10) = *(uint16_t*)((char*)eax_6 - 0x10);
0062b9f1              *(uint16_t*)((char*)eax_6 + 0x110) = *(uint16_t*)((char*)eax_6 + 0xf0);
0062b9ff              *(uint16_t*)((char*)eax_6 + 0x210) = *(uint16_t*)((char*)eax_6 + 0x1f0);
0062ba0a              *(uint16_t*)((char*)eax_6 + 0x12) = *(uint16_t*)((char*)eax_6 - 0xe);
0062ba15              *(uint16_t*)((char*)eax_6 + 0x112) = *(uint16_t*)((char*)eax_6 + 0xf2);
0062ba23              *(uint16_t*)((char*)eax_6 + 0x212) = *(uint16_t*)((char*)eax_6 + 0x1f2);
0062ba2e              *(uint16_t*)((char*)eax_6 + 0x14) = *(uint16_t*)((char*)eax_6 - 0xc);
0062ba39              *(uint16_t*)((char*)eax_6 + 0x114) = *(uint16_t*)((char*)eax_6 + 0xf4);
0062ba47              *(uint16_t*)((char*)eax_6 + 0x214) = *(uint16_t*)((char*)eax_6 + 0x1f4);
0062ba52              *(uint16_t*)((char*)eax_6 + 0x16) = *(uint16_t*)((char*)eax_6 - 0xa);
0062ba5d              *(uint16_t*)((char*)eax_6 + 0x116) = *(uint16_t*)((char*)eax_6 + 0xf6);
0062ba6b              *(uint16_t*)((char*)eax_6 + 0x216) = *(uint16_t*)((char*)eax_6 + 0x1f6);
0062ba76              *(uint16_t*)((char*)eax_6 + 0x18) = *(uint16_t*)((char*)eax_6 - 8);
0062ba81              *(uint16_t*)((char*)eax_6 + 0x118) = *(uint16_t*)((char*)eax_6 + 0xf8);
0062ba8f              *(uint16_t*)((char*)eax_6 + 0x218) = *(uint16_t*)((char*)eax_6 + 0x1f8);
0062ba9a              *(uint16_t*)((char*)eax_6 + 0x1a) = *(uint16_t*)((char*)eax_6 - 6);
0062baa5              *(uint16_t*)((char*)eax_6 + 0x11a) = *(uint16_t*)((char*)eax_6 + 0xfa);
0062bab3              *(uint16_t*)((char*)eax_6 + 0x21a) = *(uint16_t*)((char*)eax_6 + 0x1fa);
0062babe              *(uint16_t*)((char*)eax_6 + 0x1c) = *(uint16_t*)((char*)eax_6 - 4);
0062bac9              *(uint16_t*)((char*)eax_6 + 0x11c) = *(uint16_t*)((char*)eax_6 + 0xfc);
0062bad0              int16_t edx_48 = *(uint16_t*)((char*)eax_6 + 0x1fe);
0062bad7              *(uint16_t*)((char*)eax_6 + 0x21c) = edi_14;
0062bade              *(uint16_t*)((char*)eax_6 + 0x1e) = esi_10;
0062bae2              *(uint16_t*)((char*)eax_6 + 0x11e) = ecx_5;
0062bae9              *(uint16_t*)((char*)eax_6 + 0x21e) = edx_48;
0062baf0              eax_6 += 0x20;
0062baf6          } while (i_2 < 8);
0062b8a1      }
0062b8a1      
0062bafc      int32_t edx_49 = 0;
0062bba9      int32_t i_3;
0062bba9      
0062bba9      for (i_3 = 0; i_3 < 0x80; i_3 += 0x10)
0062bba9      {
0062bb0e          void* j = ((char*)ebp + (i_3 << 1));
0062bb24          void* esi_12 = ((char*)ebp + (i_3 << 1));
0062bb2a          int16_t* edi_16 = (arg5 + (edx_49 << 1));
0062bb2a          
0062bb8e          do
0062bb8e          {
0062bb36              *(uint16_t*)edi_16 = (*(uint16_t*)esi_12 - 0x80);
0062bb40              edi_16[0x40] = (*(uint16_t*)((char*)esi_12 + 0x10) - 0x80);
0062bb5e              edi_16[0x80] = (((int16_t)(((((int32_t)*(uint16_t*)((char*)j + 0x100)) + ((int32_t)*(uint16_t*)((char*)j + 0x102))) + 1) >> 1)) - 0x80);
0062bb7c              edi_16[0xc0] = (((int16_t)(((((int32_t)*(uint16_t*)((char*)j + 0x200)) + ((int32_t)*(uint16_t*)((char*)j + 0x202))) + 1) >> 1)) - 0x80);
0062bb83              edi_16 = &edi_16[1];
0062bb86              esi_12 += 2;
0062bb89              j += 4;
0062bb8e          } while ((((char*)ebp + (i_3 << 1)) + 0x20) > j);
0062bb8e          
0062bb9e          edx_49 += 8;
0062bba9      }
0062bba9      
0062bbb9      return i_3;
0062b620  }

0062bbba                                                                                8d b6 00 00 00 00                            ......

0062bbc0  int32_t _YCbYCr_to_YCbCr_422_Full_MCU_PX(char* arg1, int32_t arg2, int16_t* arg3, int16_t* arg4, int16_t* arg5)

0062bbc0  {
0062bbc1      int32_t esi;
0062bbc1      int32_t var_8 = esi;
0062bbc4      int32_t var_14 = esi;
0062bbc5      char* edi = arg1;
0062bbcd      int16_t* ebx = arg3;
0062bbd1      int16_t* ecx = arg4;
0062bbd5      int16_t* edx = arg5;
0062bd63      int32_t i;
0062bd63      
0062bd63      for (i = 0; i < 8; )
0062bd63      {
0062bbe6          i += 1;
0062bbe7          *(uint16_t*)ebx = (((uint16_t)*(uint8_t*)edi) - 0x80);
0062bbf1          ebx[1] = (((uint16_t)edi[2]) - 0x80);
0062bbfc          ebx[2] = (((uint16_t)edi[4]) - 0x80);
0062bc07          ebx[3] = (((uint16_t)edi[6]) - 0x80);
0062bc12          ebx[4] = (((uint16_t)edi[8]) - 0x80);
0062bc1d          ebx[5] = (((uint16_t)edi[0xa]) - 0x80);
0062bc28          ebx[6] = (((uint16_t)edi[0xc]) - 0x80);
0062bc33          ebx[7] = (((uint16_t)edi[0xe]) - 0x80);
0062bc3e          ebx[0x40] = (((uint16_t)edi[0x10]) - 0x80);
0062bc4c          ebx[0x41] = (((uint16_t)edi[0x12]) - 0x80);
0062bc5a          ebx[0x42] = (((uint16_t)edi[0x14]) - 0x80);
0062bc68          ebx[0x43] = (((uint16_t)edi[0x16]) - 0x80);
0062bc76          ebx[0x44] = (((uint16_t)edi[0x18]) - 0x80);
0062bc84          ebx[0x45] = (((uint16_t)edi[0x1a]) - 0x80);
0062bc92          ebx[0x46] = (((uint16_t)edi[0x1c]) - 0x80);
0062bca0          ebx[0x47] = (((uint16_t)edi[0x1e]) - 0x80);
0062bcae          *(uint16_t*)ecx = (((uint16_t)edi[1]) - 0x80);
0062bcb8          ecx[1] = (((uint16_t)edi[5]) - 0x80);
0062bcc3          ecx[2] = (((uint16_t)edi[9]) - 0x80);
0062bcce          ecx[3] = (((uint16_t)edi[0xd]) - 0x80);
0062bcd9          ecx[4] = (((uint16_t)edi[0x11]) - 0x80);
0062bce4          ecx[5] = (((uint16_t)edi[0x15]) - 0x80);
0062bcef          ecx[6] = (((uint16_t)edi[0x19]) - 0x80);
0062bcfa          ecx[7] = (((uint16_t)edi[0x1d]) - 0x80);
0062bd05          *(uint16_t*)edx = (((uint16_t)edi[3]) - 0x80);
0062bd0f          edx[1] = (((uint16_t)edi[7]) - 0x80);
0062bd1a          edx[2] = (((uint16_t)edi[0xb]) - 0x80);
0062bd25          edx[3] = (((uint16_t)edi[0xf]) - 0x80);
0062bd30          edx[4] = (((uint16_t)edi[0x13]) - 0x80);
0062bd3b          edx[5] = (((uint16_t)edi[0x17]) - 0x80);
0062bd46          edx[6] = (((uint16_t)edi[0x1b]) - 0x80);
0062bd51          edx[7] = (((uint16_t)edi[0x1f]) - 0x80);
0062bd55          ebx = &ebx[8];
0062bd58          ecx = &ecx[8];
0062bd5b          edx = &edx[8];
0062bd5e          edi = &edi[arg2];
0062bd63      }
0062bd63      
0062bd70      return i;
0062bbc0  }

0062bd71                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

0062bd80  int64_t* _YCbYCr_to_YCbCr_422_Full_MCU_M5(int64_t* arg1, int32_t arg2, uint8_t (* arg3)[0x8], void* arg4, void* arg5)

0062bd80  {
0062bdac      _own_ycbycr_to_ycbcr_422_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
0062bdb6      return arg1;
0062bd80  }

0062bdb7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0062bdc0  int64_t* _YCbYCr_to_YCbCr_422_Full_MCU_A6(int64_t* arg1, int32_t arg2, void* arg3, void* arg4, void* arg5)

0062bdc0  {
0062bdec      _own_ycbycr_to_ycbcr_422_full_mcu_a6(arg1, arg2, arg3, arg4, arg5);
0062bdf6      return arg1;
0062bdc0  }

0062bdf7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0062be00  void YCbYCr_to_YCbCr_422_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062be00  {
0062be0b      int32_t edi = 0x10;
0062be10      int32_t esi = 8;
0062be15      int32_t DIBLineBytes = arg1->DIBLineBytes;
0062be18      uint8_t* MCUBuf = arg1->MCUBuf;
0062be1e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062be1e      
0062be36      if ((arg1->numxMCUs - 1) != arg2)
0062be75          arg1->state.DIB_ptr = &DIB_ptr[0x20];
0062be36      else
0062be36      {
0062be3f          int32_t eax_5;
0062be3f          int32_t edx_1;
0062be3f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062be3f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
0062be49          int32_t eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 0xf) ^ edx_1) - edx_1);
0062be49          
0062be4d          if (eax_10 != 0)
0062be4f              edi = eax_10;
0062be4f          
0062be66          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
0062be36      }
0062be36      
0062be89      if (arg3 == (arg1->numyMCUs - 1))
0062be89      {
0062be92          int32_t eax_19;
0062be92          int32_t edx_7;
0062be92          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
0062be92          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
0062be97          int32_t eax_22;
0062be97          int32_t edx_8;
0062be97          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
0062be97          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
0062bea1          int32_t eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
0062bea1          
0062bea5          if (eax_27 != 0)
0062bea7              esi = eax_27;
0062be89      }
0062be89      
0062bed1      if ((edi != 0x10 || esi != 8))
0062bed1      {
0062bec1          sub_62b620(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062becd          return;
0062bed1      }
0062bed1      
0062bef6      *(uint32_t*)(arg1->state.ctx + 0x8c)(DIB_ptr, DIBLineBytes, MCUBuf, &MCUBuf[0x100], &MCUBuf[0x180]);
0062be00  }

0062bf04              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

0062bf10  void* sub_62bf10(int32_t arg1, int32_t arg2, void* arg3, int32_t arg4, int32_t arg5)

0062bf10  {
0062bf25      void var_e0;
0062bf25      void* result = &var_e0;
0062bf28      int32_t i_1 = 0;
0062bf28      
0062bf2c      if (arg4 > 0)
0062bf2c      {
0062bf79          void* ebx_3 = arg3;
0062bf87          int32_t ecx_2 = 0;
0062bf95          int32_t var_3c_1 = 0;
0062bfa0          void* var_50_1 = arg3;
0062bfa7          void* var_18_1 = &var_e0;
0062bfae          int32_t i_4 = 0;
0062bfb5          void* edx_3 = arg3;
0062bfb7          void* result_1 = &var_e0;
0062bfbe          int32_t eax = 0;
0062c266          int32_t i_3;
0062c266          
0062c266          do
0062c266          {
0062bfc5              void* i = nullptr;
0062bfc5              
0062bfd0              if (arg3 > 0)
0062bfd0              {
0062bfe0                  if (arg3 >= 5)
0062bfe0                  {
0062bff0                      int32_t ebp_6 = ecx_2;
0062c001                      void* eax_1 = eax;
0062c02c                      i = nullptr;
0062c02c                      
0062c061                      do
0062c061                      {
0062c034                          i += 4;
0062c037                          *(uint16_t*)((char*)result_1 + (ebp_6 << 1)) = ((uint16_t)*(uint8_t*)((char*)eax_1 + arg1));
0062c040                          *(uint16_t*)(((char*)result_1 + (ebp_6 << 1)) + 2) = ((uint16_t)*(uint8_t*)(((char*)eax_1 + arg1) + 1));
0062c04a                          *(uint16_t*)(((char*)result_1 + (ebp_6 << 1)) + 4) = ((uint16_t)*(uint8_t*)(((char*)eax_1 + arg1) + 2));
0062c04f                          uint16_t edi_4 = ((uint16_t)*(uint8_t*)(((char*)eax_1 + arg1) + 3));
0062c054                          eax_1 += 4;
0062c057                          *(uint16_t*)(((char*)result_1 + (ebp_6 << 1)) + 6) = edi_4;
0062c05c                          ebp_6 += 4;
0062c061                      } while (i <= ((char*)arg3 - 5));
0062bfe0                  }
0062bfe0                  
0062c090                  void* ebp_8 = ((char*)i + ecx_2);
0062c0a8                  void* edx_5 = ((char*)i + eax);
0062c0a8                  
0062c0dd                  do
0062c0dd                  {
0062c0d0                      uint16_t eax_2 = ((uint16_t)*(uint8_t*)((char*)edx_5 + arg1));
0062c0d4                      edx_5 += 1;
0062c0d5                      i += 1;
0062c0d6                      *(uint16_t*)((char*)result_1 + (ebp_8 << 1)) = eax_2;
0062c0da                      ebp_8 += 1;
0062c0dd                  } while (i < arg3);
0062bfd0              }
0062bfd0              
0062c104              if ((arg3 & 1) != 0)
0062c104              {
0062c119                  *(uint16_t*)(((char*)result_1 + (edx_3 << 1)) - 2) = ((uint16_t)*(uint8_t*)(((char*)ebx_3 + arg1) - 1));
0062c11e                  i = arg3;
0062c104              }
0062c104              
0062c128              if (i < 8)
0062c128              {
0062c138                  void* var_34_2;
0062c138                  
0062c138                  if ((-(i) + 8) < 5)
0062c35c                      var_34_2 = ((char*)var_18_1 + ((arg3 * 2) - 2));
0062c138                  else
0062c138                  {
0062c14c                      void* ebp_15 = ((char*)result_1 + var_3c_1);
0062c162                      var_34_2 = ((char*)ebp_15 + ((arg3 * 2) - 2));
0062c18f                      void* edx_6 = ((char*)i + ecx_2);
0062c18f                      
0062c1e0                      do
0062c1e0                      {
0062c1b5                          i += 4;
0062c1b8                          *(uint16_t*)((char*)result_1 + (edx_6 << 1)) = *(uint16_t*)(((char*)ebp_15 + (arg3 << 1)) - 2);
0062c1c1                          *(uint16_t*)(((char*)result_1 + (edx_6 << 1)) + 2) = *(uint16_t*)(((char*)ebp_15 + (arg3 << 1)) - 2);
0062c1cb                          *(uint16_t*)(((char*)result_1 + (edx_6 << 1)) + 4) = *(uint16_t*)(((char*)ebp_15 + (arg3 << 1)) - 2);
0062c1d5                          *(uint16_t*)(((char*)result_1 + (edx_6 << 1)) + 6) = *(uint16_t*)(((char*)ebp_15 + (arg3 << 1)) - 2);
0062c1da                          edx_6 += 4;
0062c1e0                      } while (i < 3);
0062c138                  }
0062c138                  
0062c201                  void* ebp_20 = ((char*)result_1 + (((char*)i + ecx_2) << 1));
0062c201                  
0062c221                  do
0062c221                  {
0062c216                      i += 1;
0062c217                      *(uint16_t*)ebp_20 = *(uint16_t*)var_34_2;
0062c21b                      ebp_20 += 2;
0062c221                  } while (i < 8);
0062c128              }
0062c128              
0062c22a              eax += arg2;
0062c231              ecx_2 += 8;
0062c234              edx_3 += 8;
0062c237              ebx_3 += arg2;
0062c245              i_3 = (i_4 + 1);
0062c246              var_18_1 += 0x10;
0062c255              var_3c_1 += 0x10;
0062c25f              i_4 = i_3;
0062c266          } while (i_3 < arg4);
0062c266          
0062c26c          i_1 = i_3;
0062c26e          result = result_1;
0062bf2c      }
0062bf2c      
0062c278      if (i_1 < 8)
0062c278      {
0062c27d          void* edx_8 = ((char*)result + (i_1 * 0x10));
0062c27d          
0062c2c6          do
0062c2c6          {
0062c284              int16_t edi_17 = *(uint16_t*)((char*)edx_8 - 8);
0062c288              int16_t ebp_22 = *(uint16_t*)((char*)edx_8 - 6);
0062c28c              *(uint16_t*)edx_8 = *(uint16_t*)((char*)edx_8 - 0x10);
0062c293              int16_t ebx_8 = *(uint16_t*)((char*)edx_8 - 4);
0062c297              *(uint16_t*)((char*)edx_8 + 2) = *(uint16_t*)((char*)edx_8 - 0xe);
0062c29f              i_1 += 1;
0062c2a0              *(uint16_t*)((char*)edx_8 + 4) = *(uint16_t*)((char*)edx_8 - 0xc);
0062c2a8              *(uint16_t*)((char*)edx_8 + 6) = *(uint16_t*)((char*)edx_8 - 0xa);
0062c2ac              int16_t ecx_10 = *(uint16_t*)((char*)edx_8 - 2);
0062c2b0              *(uint16_t*)((char*)edx_8 + 8) = edi_17;
0062c2b4              *(uint16_t*)((char*)edx_8 + 0xa) = ebp_22;
0062c2b8              *(uint16_t*)((char*)edx_8 + 0xc) = ebx_8;
0062c2bc              *(uint16_t*)((char*)edx_8 + 0xe) = ecx_10;
0062c2c0              edx_8 += 0x10;
0062c2c6          } while (i_1 < 8);
0062c278      }
0062c278      
0062c33d      for (int32_t i_2 = 0; i_2 < 0x40; i_2 += 8)
0062c33d      {
0062c2d8          *(uint16_t*)(arg5 + (i_2 << 1)) = (*(uint16_t*)((char*)result + (i_2 << 1)) - 0x80);
0062c2e4          *(uint16_t*)((arg5 + (i_2 << 1)) + 2) = (*(uint16_t*)(((char*)result + (i_2 << 1)) + 2) - 0x80);
0062c2f1          *(uint16_t*)((arg5 + (i_2 << 1)) + 4) = (*(uint16_t*)(((char*)result + (i_2 << 1)) + 4) - 0x80);
0062c2fe          *(uint16_t*)((arg5 + (i_2 << 1)) + 6) = (*(uint16_t*)(((char*)result + (i_2 << 1)) + 6) - 0x80);
0062c30b          *(uint16_t*)((arg5 + (i_2 << 1)) + 8) = (*(uint16_t*)(((char*)result + (i_2 << 1)) + 8) - 0x80);
0062c318          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xa) = (*(uint16_t*)(((char*)result + (i_2 << 1)) + 0xa) - 0x80);
0062c325          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xc) = (*(uint16_t*)(((char*)result + (i_2 << 1)) + 0xc) - 0x80);
0062c332          *(uint16_t*)((arg5 + (i_2 << 1)) + 0xe) = (*(uint16_t*)(((char*)result + (i_2 << 1)) + 0xe) - 0x80);
0062c33d      }
0062c33d      
0062c349      return result;
0062bf10  }

0062c368                          90 8d b4 26 00 00 00 00                                                          ...&....

0062c370  int32_t _Y_to_Y_111_Full_MCU_PX(char* arg1, int32_t arg2, int16_t* arg3)

0062c370  {
0062c370      int32_t esi;
0062c370      int32_t var_4 = esi;
0062c372      int32_t var_c = esi;
0062c373      char* ebx = arg1;
0062c37b      int16_t* edx = arg3;
0062c3e0      int32_t i;
0062c3e0      
0062c3e0      for (i = 0; i < 8; )
0062c3e0      {
0062c387          i += 1;
0062c388          *(uint16_t*)edx = (((uint16_t)*(uint8_t*)ebx) - 0x80);
0062c392          edx[1] = (((uint16_t)ebx[1]) - 0x80);
0062c39d          edx[2] = (((uint16_t)ebx[2]) - 0x80);
0062c3a8          edx[3] = (((uint16_t)ebx[3]) - 0x80);
0062c3b3          edx[4] = (((uint16_t)ebx[4]) - 0x80);
0062c3be          edx[5] = (((uint16_t)ebx[5]) - 0x80);
0062c3c9          edx[6] = (((uint16_t)ebx[6]) - 0x80);
0062c3d4          edx[7] = (((uint16_t)ebx[7]) - 0x80);
0062c3d8          ebx = &ebx[arg2];
0062c3da          edx = &edx[8];
0062c3e0      }
0062c3e0      
0062c3e7      return i;
0062c370  }

0062c3e8                          90 8d b4 26 00 00 00 00                                                          ...&....

0062c3f0  int64_t* _Y_to_Y_111_Full_MCU_M5(int64_t* arg1, int64_t* arg2, void* arg3)

0062c3f0  {
0062c40a      _own_y_to_y_111_full_mcu_m5(arg1, arg2, arg3);
0062c412      return arg1;
0062c3f0  }

0062c413                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

0062c420  void Y_to_Y_111_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062c420  {
0062c42b      void* edi = 8;
0062c430      int32_t esi = 8;
0062c435      int32_t DIBLineBytes = arg1->DIBLineBytes;
0062c438      uint8_t* MCUBuf = arg1->MCUBuf;
0062c43e      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062c43e      
0062c456      if ((arg1->numxMCUs - 1) != arg2)
0062c495          arg1->state.DIB_ptr = &DIB_ptr[8];
0062c456      else
0062c456      {
0062c45f          int32_t eax_5;
0062c45f          int32_t edx_1;
0062c45f          edx_1 = HIGHD(((int64_t)arg1->DIBWidth));
0062c45f          eax_5 = LOWD(((int64_t)arg1->DIBWidth));
0062c469          void* eax_10 = (((((eax_5 ^ edx_1) - edx_1) & 7) ^ edx_1) - edx_1);
0062c469          
0062c46d          if (eax_10 != 0)
0062c46f              edi = eax_10;
0062c46f          
0062c486          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 << 3) + 8) * DIBLineBytes)];
0062c456      }
0062c456      
0062c4a9      if (arg3 == (arg1->numyMCUs - 1))
0062c4a9      {
0062c4b2          int32_t eax_19;
0062c4b2          int32_t edx_7;
0062c4b2          edx_7 = HIGHD(((int64_t)arg1->DIBHeight));
0062c4b2          eax_19 = LOWD(((int64_t)arg1->DIBHeight));
0062c4b7          int32_t eax_22;
0062c4b7          int32_t edx_8;
0062c4b7          edx_8 = HIGHD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
0062c4b7          eax_22 = LOWD(((int64_t)((eax_19 ^ edx_7) - edx_7)));
0062c4c1          int32_t eax_27 = (((((eax_22 ^ edx_8) - edx_8) & 7) ^ edx_8) - edx_8);
0062c4c1          
0062c4c5          if (eax_27 != 0)
0062c4c7              esi = eax_27;
0062c4a9      }
0062c4a9      
0062c4f1      if ((edi != 8 || esi != 8))
0062c4f1      {
0062c4e1          sub_62bf10(DIB_ptr, DIBLineBytes, edi, esi, MCUBuf);
0062c4ed          return;
0062c4f1      }
0062c4f1      
0062c502      *(uint32_t*)(arg1->state.ctx + 0x64)(DIB_ptr, DIBLineBytes, MCUBuf);
0062c420  }

0062c50d                                         8d 76 00                                                               .v.

0062c510  void CC_SS_RGB_to_YCbCr_General_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062c510  {
0062c51a      struct _JPEG_PROPERTIES* ebx = arg1;
0062c52e      void var_a80;
0062c52e      void* var_30 = &var_a80;
0062c535      uint8_t* DIB_ptr = ebx->state.DIB_ptr;
0062c53b      int32_t max_hsampling_1 = ebx->jframe.max_hsampling;
0062c541      uint8_t* MCUBuf = ebx->MCUBuf;
0062c554      int32_t eax_2 = (max_hsampling_1 * 8);
0062c559      int32_t max_hsampling = max_hsampling_1;
0062c560      int32_t max_vsampling = ebx->jframe.max_vsampling;
0062c566      int32_t ebp = (max_vsampling * 2);
0062c569      int32_t var_54 = eax_2;
0062c574      int32_t var_24 = eax_2;
0062c57b      int32_t esi_1 = (ebp * 4);
0062c57b      
0062c585      if ((ebx->numxMCUs - 1) != arg2)
0062c5d4          ebx->state.DIB_ptr = ((ebx->DIBChannels * var_54) + DIB_ptr);
0062c585      else
0062c585      {
0062c592          int32_t temp1_1 = (((int64_t)ebx->DIBWidth) % var_54);
0062c592          
0062c596          if (temp1_1 != 0)
0062c598              var_24 = temp1_1;
0062c598          
0062c5ba          ebx->state.DIB_ptr = &ebx->DIBBytes[((((arg3 * 8) * max_vsampling) + (ebp << 2)) * ebx->DIBLineBytes)];
0062c585      }
0062c585      
0062c5e7      if (arg3 == (ebx->numyMCUs - 1))
0062c5e7      {
0062c5ec          int32_t eax_7;
0062c5ec          int32_t edx_13;
0062c5ec          edx_13 = HIGHD(((int64_t)ebx->DIBHeight));
0062c5ec          eax_7 = LOWD(((int64_t)ebx->DIBHeight));
0062c5f2          int32_t temp1_2 = (((int64_t)((eax_7 ^ edx_13) - edx_13)) % esi_1);
0062c5f2          
0062c5f6          if (temp1_2 != 0)
0062c5f8              esi_1 = temp1_2;
0062c5e7      }
0062c5e7      
0062c5fa      void* edx_16 = var_30;
0062c601      int32_t i = 0;
0062c608      int32_t var_2c;
0062c608      
0062c608      if (ebx->JPGChannels <= 0)
0062d475          var_2c = (max_vsampling << 7);
0062c608      else
0062c608      {
0062c610          int32_t edi_5 = (esi_1 << 4);
0062c94d          int32_t esi_8;
0062c94d          
0062c94d          do
0062c94d          {
0062c646              void* esi_4 = &DIB_ptr[i];
0062c649              int32_t edi_8 = 0;
0062c649              
0062c654              if (edi_5 > 0)
0062c654              {
0062c664                  int32_t eax_15 = 0;
0062c66e                  int32_t ebx_1 = var_54;
0062c675                  int32_t ecx_1 = var_24;
0062c68a                  int32_t max_hsampling_2 = max_hsampling;
0062c68a                  
0062c861                  do
0062c861                  {
0062c691                      int32_t j = 0;
0062c691                      
0062c695                      if (ecx_1 > 0)
0062c695                      {
0062c69e                          void* ebx_3;
0062c69e                          
0062c69e                          if (ecx_1 < 6)
0062d467                              ebx_3 = ((char*)edx_16 + eax_15);
0062c69e                          else
0062c69e                          {
0062c6ab                              ebx_3 = ((char*)edx_16 + eax_15);
0062c6c5                              int32_t ecx_2 = 2;
0062c6cc                              int32_t var_3c_1 = 3;
0062c6d6                              int32_t var_54_1 = 4;
0062c6eb                              int32_t eax_16 = 1;
0062c6eb                              
0062c776                              do
0062c776                              {
0062c70a                                  *(uint16_t*)((char*)ebx_3 + (j << 1)) = ((uint16_t)*(uint8_t*)((arg1->DIBChannels * j) + esi_4));
0062c714                                  uint16_t edi_14 = ((uint16_t)*(uint8_t*)((arg1->DIBChannels * eax_16) + esi_4));
0062c718                                  eax_16 += 5;
0062c71b                                  *(uint16_t*)(((char*)ebx_3 + (j << 1)) + 2) = edi_14;
0062c726                                  uint16_t edi_17 = ((uint16_t)*(uint8_t*)((arg1->DIBChannels * ecx_2) + esi_4));
0062c72a                                  ecx_2 += 5;
0062c72d                                  *(uint16_t*)(((char*)ebx_3 + (j << 1)) + 4) = edi_17;
0062c741                                  *(uint16_t*)(((char*)ebx_3 + (j << 1)) + 6) = ((uint16_t)*(uint8_t*)((arg1->DIBChannels * var_3c_1) + esi_4));
0062c755                                  *(uint16_t*)(((char*)ebx_3 + (j << 1)) + 8) = ((uint16_t)*(uint8_t*)((arg1->DIBChannels * var_54_1) + esi_4));
0062c75a                                  j += 5;
0062c764                                  var_3c_1 += 5;
0062c76c                                  var_54_1 += 5;
0062c776                              } while (j <= (var_24 - 6));
0062c776                              
0062c786                              ecx_1 = var_24;
0062c69e                          }
0062c69e                          
0062c7b1                          do
0062c7b1                          {
0062c7aa                              *(uint16_t*)((char*)ebx_3 + (j << 1)) = ((uint16_t)*(uint8_t*)((arg1->DIBChannels * j) + esi_4));
0062c7ae                              j += 1;
0062c7b1                          } while (j < ecx_1);
0062c7b1                          
0062c7c1                          max_hsampling_2 = arg1->jframe.max_hsampling;
0062c7cd                          ebx_1 = (max_hsampling_2 * 8);
0062c695                      }
0062c695                      
0062c7cf                      int32_t edx_18 = ecx_1;
0062c7cf                      
0062c7d3                      if (ecx_1 < ebx_1)
0062c7d3                      {
0062c82a                          do
0062c82a                          {
0062c815                              *(uint16_t*)(((char*)edx_16 + (edi_8 << 1)) + (edx_18 << 1)) = *(uint16_t*)((((char*)edx_16 + (var_24 * 2)) + (edi_8 * 2)) - 2);
0062c819                              edx_18 += 1;
0062c81a                              max_hsampling_2 = arg1->jframe.max_hsampling;
0062c826                              ebx_1 = (max_hsampling_2 * 8);
0062c82a                          } while (edx_18 < ebx_1);
0062c82a                          
0062c841                          ecx_1 = var_24;
0062c7d3                      }
0062c7d3                      
0062c84f                      eax_15 += 0x20;
0062c852                      edi_8 += 0x10;
0062c855                      esi_4 += arg1->DIBLineBytes;
0062c861                  } while (edi_8 < edi_5);
0062c861                  
0062c867                  var_54 = ebx_1;
0062c875                  ebx = arg1;
0062c87c                  max_hsampling = max_hsampling_2;
0062c88a                  max_vsampling = ebx->jframe.max_vsampling;
0062c654              }
0062c654              
0062c890              int32_t eax_18 = edi_5;
0062c899              esi_8 = (max_vsampling << 7);
0062c899              
0062c89e              if (eax_18 < esi_8)
0062c89e              {
0062c8b5                  int32_t edi_31 = (eax_18 * 2);
0062c8c6                  int32_t ebp_9 = var_54;
0062c8c6                  
0062c92c                  do
0062c92c                  {
0062c8cd                      int32_t edx_21 = 0;
0062c8cd                      
0062c8d1                      if (ebp_9 > 0)
0062c8d1                      {
0062c909                          int32_t max_hsampling_3;
0062c909                          
0062c909                          do
0062c909                          {
0062c8f5                              *(uint16_t*)(((char*)edx_16 + edi_31) + (edx_21 << 1)) = *(uint16_t*)((((char*)edx_16 + (esi_1 << 5)) + (edx_21 << 1)) - 0x20);
0062c8f9                              max_hsampling_3 = ebx->jframe.max_hsampling;
0062c904                              ebp_9 = (max_hsampling_3 * 8);
0062c906                              edx_21 += 1;
0062c909                          } while (edx_21 < ebp_9);
0062c909                          
0062c90b                          max_hsampling = max_hsampling_3;
0062c919                          max_vsampling = ebx->jframe.max_vsampling;
0062c921                          esi_8 = (max_vsampling << 7);
0062c8d1                      }
0062c8d1                      
0062c924                      edi_31 += 0x20;
0062c927                      eax_18 += 0x10;
0062c92c                  } while (eax_18 < esi_8);
0062c92c                  
0062c92e                  var_54 = ebp_9;
0062c89e              }
0062c89e              
0062c943              edx_16 += 0x400;
0062c949              i += 1;
0062c94d          } while (i < ebx->JPGChannels);
0062c94d          
0062c953          var_2c = esi_8;
0062c608      }
0062c608      
0062c95a      int32_t ebp_13 = 0;
0062c95a      
0062c965      if (var_2c > 0)
0062c965      {
0062c96b          void* eax_20 = nullptr;
0062c978          void* edi_32 = var_30;
0062c978          
0062caaa          do
0062caaa          {
0062c97f              int32_t ecx_6 = 0;
0062c97f              
0062c983              if (var_54 > 0)
0062c983              {
0062c98c                  void* i_5 = ((char*)eax_20 + edi_32);
0062c9a4                  uint8_t* MCUBuf_5 = MCUBuf;
0062c9a4                  
0062ca74                  do
0062ca74                  {
0062c9b2                      void* i_1 = i_5;
0062c9b2                      
0062ca51                      do
0062ca51                      {
0062ca43                          for (int32_t j_1 = 0; j_1 < 8; )
0062ca43                          {
0062c9e6                              int32_t eax_26;
0062c9e6                              int32_t ecx_10;
0062c9e6                              int32_t edx_27;
0062c9e6                              
0062c9e6                              if (arg1->DIBColor == IJL_RGB)
0062c9e6                              {
0062d440                                  eax_26 = ((int32_t)*(uint16_t*)((char*)i_1 + (j_1 << 1)));
0062d444                                  edx_27 = ((int32_t)*(uint16_t*)(((char*)i_1 + (j_1 << 1)) + 0x400));
0062d44c                                  ecx_10 = ((int32_t)*(uint16_t*)(((char*)i_1 + (j_1 << 1)) + 0x800));
0062c9e6                              }
0062c9e6                              else
0062c9e6                              {
0062c9f7                                  eax_26 = ((int32_t)(((int16_t)-(((int32_t)*(uint16_t*)((char*)i_1 + (j_1 << 1))))) + 0xff));
0062ca0a                                  edx_27 = ((int32_t)(((int16_t)-(((int32_t)*(uint16_t*)(((char*)i_1 + (j_1 << 1)) + 0x400)))) + 0xff));
0062ca1d                                  ecx_10 = ((int32_t)(((int16_t)-(((int32_t)*(uint16_t*)(((char*)i_1 + (j_1 << 1)) + 0x800)))) + 0xff));
0062c9e6                              }
0062c9e6                              
0062ca38                              *(uint16_t*)MCUBuf_5 = ((int16_t)(((((eax_26 * 0x4d) + (edx_27 * 0x96)) + (ecx_10 * 0x1d)) - 0x7f80) >> 8));
0062ca3c                              j_1 += 1;
0062ca3d                              MCUBuf_5 = &MCUBuf_5[2];
0062ca43                          }
0062ca43                          
0062ca4c                          i_1 += 0x20;
0062ca51                      } while (((char*)i_5 + 0x100) > i_1);
0062ca51                      
0062ca6c                      i_5 += 0x10;
0062ca6f                      ecx_6 += 8;
0062ca74                  } while (ecx_6 < var_54);
0062ca74                  
0062ca7a                  MCUBuf = MCUBuf_5;
0062ca96                  edi_32 = var_30;
0062c983              }
0062c983              
0062ca9d              eax_20 += 0x100;
0062caa2              ebp_13 += 0x80;
0062caaa          } while (ebp_13 < var_2c);
0062caaa          
0062cab0          var_2c = var_2c;
0062cab7          var_54 = var_54;
0062cabe          ebx = arg1;
0062cacb          max_vsampling = ebx->jframe.max_vsampling;
0062cad1          max_hsampling = ebx->jframe.max_hsampling;
0062c965      }
0062c965      
0062cad8      struct _FRAME_COMPONENT* comps_1 = ebx->jframe.comps;
0062cae9      int32_t temp0_3 = (((int64_t)max_hsampling) / *(int32_t*)((char*)comps_1 + 0x14));
0062cafa      int32_t temp0_4 = (((int64_t)max_vsampling) / *(int32_t*)((char*)comps_1 + 0x18));
0062cafe      int32_t edi_36 = (temp0_4 * temp0_3);
0062cb08      int32_t edi_37 = (edi_36 >> 1);
0062cb08      
0062cb1c      if (var_2c > 0)
0062cb1c      {
0062cb24          int32_t edx_35 = (temp0_4 << 7);
0062cb2e          int32_t ecx_17 = (temp0_3 * 8);
0062cb30          int32_t eax_36 = (temp0_4 << 4);
0062cb41          void* eax_37 = var_30;
0062cb5d          int32_t edi_38 = 0;
0062cb5d          
0062cdda          do
0062cdda          {
0062cb64              int32_t ebx_11 = 0;
0062cb64              
0062cb68              if (var_54 > 0)
0062cb68              {
0062cb7f                  int32_t edi_39 = temp0_3;
0062cb7f                  
0062cdbb                  do
0062cdbb                  {
0062cb86                      int32_t eax_38 = 0;
0062cb86                      
0062cb8a                      if (edx_35 > 0)
0062cb8a                      {
0062cb94                          int32_t edi_40 = ecx_17;
0062cbb0                          int32_t esi_14 = eax_36;
0062cbb0                          
0062cd94                          do
0062cd94                          {
0062cbb7                              int32_t ebp_16 = 0;
0062cbb7                              
0062cbbb                              if (edi_40 > 0)
0062cbbb                              {
0062cd67                                  do
0062cd67                                  {
0062cbe0                                      int32_t eax_39 = 0;
0062cbe6                                      int32_t var_40_4 = 0;
0062cbed                                      int32_t ecx_20 = 0;
0062cbf6                                      int32_t var_44_3 = 0;
0062cbf6                                      
0062cbff                                      if (eax_36 > 0)
0062cbff                                      {
0062cc0c                                          void* edx_37 = (((((char*)eax_37 + (edi_38 << 1)) + (ebx_11 << 1)) + (eax_38 << 1)) + (ebp_16 << 1));
0062cc0f                                          int32_t esi_15 = 0;
0062cc12                                          int32_t var_3c_4 = 0;
0062cc19                                          int32_t edi_41 = temp0_3;
0062cc27                                          int32_t ebp_17 = eax_36;
0062cc27                                          
0062ccb7                                          do
0062ccb7                                          {
0062cc2b                                              if (edi_41 > 0)
0062cc2b                                              {
0062cc34                                                  void* i_2 = ((char*)edx_37 + esi_15);
0062cc41                                                  int32_t edx_38 = var_40_4;
0062cc48                                                  int32_t ebp_18 = var_44_3;
0062cc56                                                  int32_t ecx_21 = var_3c_4;
0062cc56                                                  
0062cc7c                                                  do
0062cc7c                                                  {
0062cc63                                                      ecx_21 += ((int32_t)*(uint16_t*)i_2);
0062cc6c                                                      edx_38 += ((int32_t)*(uint16_t*)((char*)i_2 + 0x400));
0062cc75                                                      ebp_18 += ((int32_t)*(uint16_t*)((char*)i_2 + 0x800));
0062cc77                                                      i_2 += 2;
0062cc7c                                                  } while (i_2 < (((char*)edx_37 + esi_15) + (edi_41 << 1)));
0062cc7c                                                  
0062cc7e                                                  var_3c_4 = ecx_21;
0062cc8c                                                  edi_41 = temp0_3;
0062cc93                                                  var_40_4 = edx_38;
0062cca1                                                  var_44_3 = ebp_18;
0062cca8                                                  ebp_17 = eax_36;
0062cc2b                                              }
0062cc2b                                              
0062ccaf                                              esi_15 += 0x20;
0062ccb2                                              ecx_20 += 0x10;
0062ccb7                                          } while (ecx_20 < ebp_17);
0062ccb7                                          
0062ccbd                                          eax_39 = var_3c_4;
0062cbff                                      }
0062cbff                                      
0062ccde                                      int32_t ecx_22 = ((int32_t)((int16_t)(((int64_t)(eax_39 + edi_37)) / edi_36)));
0062cced                                      int32_t ebx_16 = ((int32_t)((int16_t)(((int64_t)(var_40_4 + edi_37)) / edi_36)));
0062ccfc                                      int32_t eax_51 = ((int32_t)((int16_t)(((int64_t)(var_44_3 + edi_37)) / edi_36)));
0062ccfc                                      
0062cd0c                                      if (arg1->DIBColor != IJL_RGB)
0062cd0c                                      {
0062cd16                                          ecx_22 = ((int32_t)(((int16_t)-(ecx_22)) + 0xff));
0062cd21                                          ebx_16 = ((int32_t)(((int16_t)-(ebx_16)) + 0xff));
0062cd2b                                          eax_51 = ((int32_t)(((int16_t)-(eax_51)) + 0xff));
0062cd0c                                      }
0062cd0c                                      
0062cd43                                      int16_t* MCUBuf_1 = MCUBuf;
0062cd51                                      *(uint16_t*)MCUBuf_1 = ((int16_t)(((((ecx_22 * 0xffffffd5) + (ebx_16 * 0xffffffab)) + (eax_51 << 7)) + 0x80) >> 8));
0062cd57                                      ebp_16 += temp0_3;
0062cd60                                      MCUBuf = &MCUBuf_1[1];
0062cd67                                  } while (ebp_16 < ecx_17);
0062cd67                                  
0062cd7b                                  esi_14 = eax_36;
0062cd82                                  edi_40 = ecx_17;
0062cbbb                              }
0062cbbb                              
0062cd90                              eax_38 += esi_14;
0062cd94                          } while (eax_38 < edx_35);
0062cd94                          
0062cda8                          edi_39 = temp0_3;
0062cb8a                      }
0062cb8a                      
0062cdb6                      ebx_11 += (edi_39 << 3);
0062cdbb                  } while (ebx_11 < var_54);
0062cdbb                  
0062cdcf                  eax_37 = var_30;
0062cb68              }
0062cb68              
0062cdd6              edi_38 += edx_35;
0062cdda          } while (edi_38 < var_2c);
0062cdda          
0062cde0          var_2c = var_2c;
0062cde7          ebx = arg1;
0062cdf4          var_54 = var_54;
0062cdfb          max_vsampling = ebx->jframe.max_vsampling;
0062ce01          comps_1 = ebx->jframe.comps;
0062ce07          max_hsampling = ebx->jframe.max_hsampling;
0062cb1c      }
0062cb1c      
0062ce1c      int32_t temp0_8 = (((int64_t)max_hsampling) / *(int32_t*)((char*)comps_1 + 0x24));
0062ce2a      int32_t temp0_9 = (((int64_t)max_vsampling) / *(int32_t*)((char*)comps_1 + 0x28));
0062ce2e      int32_t edi_48 = (temp0_9 * temp0_8);
0062ce33      int32_t esi_20 = (edi_48 >> 1);
0062ce35      int32_t edx_48 = 0;
0062ce35      
0062ce39      if (var_2c > 0)
0062ce39      {
0062ce41          int32_t ecx_28 = (temp0_9 << 7);
0062ce44          int32_t eax_64 = (temp0_9 << 4);
0062ce54          int32_t ecx_31 = (temp0_8 * 8);
0062ce64          int32_t eax_65 = ecx_28;
0062ce6b          void* ecx_32 = var_30;
0062ce6b          
0062d10a          do
0062d10a          {
0062ce95              int32_t ebx_20 = 0;
0062ce95              
0062ce99              if (var_54 > 0)
0062ce99              {
0062ceb0                  int32_t edi_50 = temp0_8;
0062ceb0                  
0062d0eb                  do
0062d0eb                  {
0062ceb7                      int32_t edx_49 = 0;
0062ceb7                      
0062cebb                      if (eax_65 > 0)
0062cebb                      {
0062cec5                          int32_t edi_51 = ecx_31;
0062cee1                          int32_t esi_22 = eax_64;
0062cee1                          
0062d0c4                          do
0062d0c4                          {
0062cee8                              int32_t ebp_21 = 0;
0062cee8                              
0062ceec                              if (edi_51 > 0)
0062ceec                              {
0062d097                                  do
0062d097                                  {
0062cf0a                                      int32_t eax_66 = 0;
0062cf10                                      int32_t var_38_4 = 0;
0062cf17                                      int32_t ecx_34 = 0;
0062cf20                                      int32_t var_3c_5 = 0;
0062cf20                                      
0062cf29                                      if (eax_64 > 0)
0062cf29                                      {
0062cf36                                          void* edx_51 = (((((char*)ecx_32 + (edx_48 << 1)) + (ebx_20 << 1)) + (edx_49 << 1)) + (ebp_21 << 1));
0062cf39                                          int32_t esi_23 = 0;
0062cf3c                                          int32_t var_34_4 = 0;
0062cf43                                          int32_t edi_52 = temp0_8;
0062cf51                                          int32_t ebp_22 = eax_64;
0062cf51                                          
0062cfe7                                          do
0062cfe7                                          {
0062cf55                                              if (edi_52 > 0)
0062cf55                                              {
0062cf5e                                                  void* i_3 = ((char*)edx_51 + esi_23);
0062cf6b                                                  int32_t edx_52 = var_38_4;
0062cf72                                                  int32_t ebp_23 = var_3c_5;
0062cf80                                                  int32_t ecx_35 = var_34_4;
0062cf80                                                  
0062cfac                                                  do
0062cfac                                                  {
0062cf93                                                      ecx_35 += ((int32_t)*(uint16_t*)i_3);
0062cf9c                                                      edx_52 += ((int32_t)*(uint16_t*)((char*)i_3 + 0x400));
0062cfa5                                                      ebp_23 += ((int32_t)*(uint16_t*)((char*)i_3 + 0x800));
0062cfa7                                                      i_3 += 2;
0062cfac                                                  } while (i_3 < (((char*)edx_51 + esi_23) + (edi_52 << 1)));
0062cfac                                                  
0062cfae                                                  var_34_4 = ecx_35;
0062cfbc                                                  edi_52 = temp0_8;
0062cfc3                                                  var_38_4 = edx_52;
0062cfd1                                                  var_3c_5 = ebp_23;
0062cfd8                                                  ebp_22 = eax_64;
0062cf55                                              }
0062cf55                                              
0062cfdf                                              esi_23 += 0x20;
0062cfe2                                              ecx_34 += 0x10;
0062cfe7                                          } while (ecx_34 < ebp_22);
0062cfe7                                          
0062cfed                                          eax_66 = var_34_4;
0062cf29                                      }
0062cf29                                      
0062d00e                                      int32_t ebx_25 = ((int32_t)((int16_t)(((int64_t)(eax_66 + esi_20)) / edi_48)));
0062d01d                                      int32_t ecx_36 = ((int32_t)((int16_t)(((int64_t)(var_38_4 + esi_20)) / edi_48)));
0062d02c                                      int32_t eax_78 = ((int32_t)((int16_t)(((int64_t)(var_3c_5 + esi_20)) / edi_48)));
0062d02c                                      
0062d03c                                      if (arg1->DIBColor != IJL_RGB)
0062d03c                                      {
0062d046                                          ebx_25 = ((int32_t)(((int16_t)-(ebx_25)) + 0xff));
0062d051                                          ecx_36 = ((int32_t)(((int16_t)-(ecx_36)) + 0xff));
0062d05b                                          eax_78 = ((int32_t)(((int16_t)-(eax_78)) + 0xff));
0062d03c                                      }
0062d03c                                      
0062d073                                      int16_t* MCUBuf_4 = MCUBuf;
0062d081                                      *(uint16_t*)MCUBuf_4 = ((int16_t)(((((ebx_25 << 7) + (ecx_36 * 0xffffff95)) + (eax_78 * 0xffffffeb)) + 0x80) >> 8));
0062d087                                      ebp_21 += temp0_8;
0062d090                                      MCUBuf = &MCUBuf_4[1];
0062d097                                  } while (ebp_21 < ecx_31);
0062d097                                  
0062d0ab                                  esi_22 = eax_64;
0062d0b2                                  edi_51 = ecx_31;
0062d0b9                                  eax_65 = ecx_28;
0062ceec                              }
0062ceec                              
0062d0c0                              edx_49 += esi_22;
0062d0c4                          } while (edx_49 < eax_65);
0062d0c4                          
0062d0d8                          edi_50 = temp0_8;
0062cebb                      }
0062cebb                      
0062d0e6                      ebx_20 += (edi_50 << 3);
0062d0eb                  } while (ebx_20 < var_54);
0062d0eb                  
0062d0ff                  ecx_32 = var_30;
0062ce99              }
0062ce99              
0062d106              edx_48 += eax_65;
0062d10a          } while (edx_48 < var_2c);
0062d10a          
0062d110          var_2c = var_2c;
0062d117          ebx = arg1;
0062d11e          var_54 = var_54;
0062ce39      }
0062ce39      
0062d12b      if (ebx->DIBColor != IJL_RGB)
0062d12b      {
0062d131          struct _FRAME_COMPONENT* comps = ebx->jframe.comps;
0062d148          int32_t temp0_13 = (((int64_t)ebx->jframe.max_hsampling) / *(int32_t*)((char*)comps + 0x34));
0062d156          int32_t temp0_14 = (((int64_t)ebx->jframe.max_vsampling) / *(int32_t*)((char*)comps + 0x38));
0062d15a          int32_t esi_29 = (temp0_14 * temp0_13);
0062d161          int32_t edx_61 = 0;
0062d161          
0062d165          if (var_2c > 0)
0062d165          {
0062d16d              int32_t edi_60 = (temp0_14 << 7);
0062d170              int32_t eax_89 = (temp0_14 << 4);
0062d17f              int32_t edi_63 = (temp0_13 * 8);
0062d1a0              void* eax_90 = var_30;
0062d1ae              int32_t ebp_26 = edi_60;
0062d1ae              
0062d3f7              do
0062d3f7              {
0062d1ca                  int32_t ecx_42 = 0;
0062d1ca                  
0062d1ce                  if (var_54 > 0)
0062d1ce                  {
0062d1e5                      int32_t edi_66 = temp0_13;
0062d1e5                      
0062d3d8                      do
0062d3d8                      {
0062d1ec                          int32_t eax_91 = 0;
0062d1ec                          
0062d1f0                          if (ebp_26 > 0)
0062d1f0                          {
0062d1f9                              int32_t edi_67 = edi_63;
0062d215                              int32_t ebx_32 = eax_89;
0062d215                              
0062d3b1                              do
0062d3b1                              {
0062d21c                                  int32_t ecx_43 = 0;
0062d21c                                  
0062d220                                  if (edi_67 > 0)
0062d220                                  {
0062d229                                      int32_t ebp_27 = temp0_13;
0062d229                                      
0062d38b                                      do
0062d38b                                      {
0062d245                                          int32_t eax_92 = 0;
0062d247                                          int32_t edi_68 = 0;
0062d247                                          
0062d24b                                          if (ebx_32 > 0)
0062d24b                                          {
0062d258                                              void* esi_32 = (((((char*)eax_90 + (edx_61 << 1)) + (ecx_42 << 1)) + (eax_91 << 1)) + (ecx_43 << 1));
0062d25b                                              int32_t edx_64 = 0;
0062d25e                                              int32_t var_4c_5 = 0;
0062d25e                                              
0062d32f                                              do
0062d32f                                              {
0062d26c                                                  int32_t i_4 = 0;
0062d26c                                                  
0062d270                                                  if (ebp_27 > 0)
0062d270                                                  {
0062d279                                                      void* ecx_44;
0062d279                                                      
0062d279                                                      if (ebp_27 < 6)
0062d430                                                          ecx_44 = ((char*)esi_32 + edx_64);
0062d279                                                      else
0062d279                                                      {
0062d27f                                                          ecx_44 = ((char*)esi_32 + edx_64);
0062d282                                                          int32_t ebx_33 = var_4c_5;
0062d282                                                          
0062d2d7                                                          do
0062d2d7                                                          {
0062d2c6                                                              int32_t ebx_37 = ((((ebx_33 + ((int32_t)*(uint16_t*)(((char*)ecx_44 + (i_4 << 1)) + 0xc00))) + ((int32_t)*(uint16_t*)(((char*)ecx_44 + (i_4 << 1)) + 0xc02))) + ((int32_t)*(uint16_t*)(((char*)ecx_44 + (i_4 << 1)) + 0xc04))) + ((int32_t)*(uint16_t*)(((char*)ecx_44 + (i_4 << 1)) + 0xc06)));
0062d2d0                                                              ebx_33 = (ebx_37 + ((int32_t)*(uint16_t*)(((char*)ecx_44 + (i_4 << 1)) + 0xc08)));
0062d2d2                                                              i_4 += 5;
0062d2d7                                                          } while (i_4 <= (temp0_13 - 6));
0062d2d7                                                          
0062d2d9                                                          var_4c_5 = ebx_33;
0062d2ee                                                          ebp_27 = temp0_13;
0062d279                                                      }
0062d279                                                      
0062d2fc                                                      int32_t edi_75 = var_4c_5;
0062d2fc                                                      
0062d310                                                      do
0062d310                                                      {
0062d30b                                                          edi_75 += ((int32_t)*(uint16_t*)(((char*)ecx_44 + (i_4 << 1)) + 0xc00));
0062d30d                                                          i_4 += 1;
0062d310                                                      } while (i_4 < ebp_27);
0062d310                                                      
0062d312                                                      var_4c_5 = edi_75;
0062d320                                                      ebx_32 = eax_89;
0062d270                                                  }
0062d270                                                  
0062d327                                                  edx_64 += 0x20;
0062d32a                                                  edi_68 += 0x10;
0062d32f                                              } while (edi_68 < ebx_32);
0062d32f                                              
0062d335                                              eax_92 = var_4c_5;
0062d24b                                          }
0062d24b                                          
0062d343                                          int32_t eax_93 = (eax_92 + (esi_29 >> 1));
0062d343                                          
0062d357                                          if (arg1->DIBColor == IJL_RGB)
0062d357                                          {
0062d419                                              uint8_t* MCUBuf_3 = MCUBuf;
0062d41e                                              MCUBuf = &MCUBuf[2];
0062d425                                              *(uint16_t*)MCUBuf_3 = ((int16_t)(((int64_t)eax_93) / esi_29));
0062d357                                          }
0062d357                                          else
0062d357                                          {
0062d371                                              uint8_t* MCUBuf_2 = MCUBuf;
0062d376                                              MCUBuf = &MCUBuf[2];
0062d37d                                              *(uint16_t*)MCUBuf_2 = (((int16_t)(((int64_t)eax_93) / esi_29)) - 0x80);
0062d357                                          }
0062d357                                          
0062d380                                          ecx_43 += ebp_27;
0062d38b                                      } while (ecx_43 < edi_63);
0062d38b                                      
0062d39f                                      edi_67 = edi_63;
0062d3a6                                      ebp_26 = edi_60;
0062d220                                  }
0062d220                                  
0062d3ad                                  eax_91 += ebx_32;
0062d3b1                              } while (eax_91 < ebp_26);
0062d3b1                              
0062d3c5                              edi_66 = temp0_13;
0062d1f0                          }
0062d1f0                          
0062d3d3                          ecx_42 += (edi_66 << 3);
0062d3d8                      } while (ecx_42 < var_54);
0062d3d8                      
0062d3ec                      eax_90 = var_30;
0062d1ce                  }
0062d1ce                  
0062d3f3                  edx_61 += ebp_26;
0062d3f7              } while (edx_61 < var_2c);
0062d165          }
0062d12b      }
0062c510  }

0062d42d                                         8d 76 00                                                               .v.
0062d438                                                                          90 8d b4 26 00 00 00 00                          ...&....
0062d459                                                                             8d b4 26 00 00 00 00                           ..&....
0062d46f                                               90                                                                 .
0062d481     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

0062d490  void CC_RGB_to_YCbCr_General_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062d490  {
0062d49b      uint8_t* MCUBuf = arg1->MCUBuf;
0062d4a1      uint8_t* DIB_ptr = arg1->state.DIB_ptr;
0062d4a7      int32_t i_3 = 8;
0062d4ac      int32_t ebx = 8;
0062d4ac      
0062d4b9      if ((arg1->numxMCUs - 1) != arg2)
0062d4f6          arg1->state.DIB_ptr = &DIB_ptr[(arg1->DIBChannels << 3)];
0062d4b9      else
0062d4b9      {
0062d4be          int32_t eax_3;
0062d4be          int32_t edx;
0062d4be          edx = HIGHD(((int64_t)arg1->DIBWidth));
0062d4be          eax_3 = LOWD(((int64_t)arg1->DIBWidth));
0062d4c8          int32_t i_4 = (((((eax_3 ^ edx) - edx) & 7) ^ edx) - edx);
0062d4c8          
0062d4cc          if (i_4 != 0)
0062d4ce              i_3 = i_4;
0062d4ce          
0062d4e8          arg1->state.DIB_ptr = &arg1->DIBBytes[(((arg3 * 8) * arg1->DIBLineBytes) + (arg1->DIBLineBytes << 3))];
0062d4b9      }
0062d4b9      
0062d506      if (arg3 == (arg1->numyMCUs - 1))
0062d506      {
0062d50b          int32_t eax_13;
0062d50b          int32_t edx_10;
0062d50b          edx_10 = HIGHD(((int64_t)arg1->DIBHeight));
0062d50b          eax_13 = LOWD(((int64_t)arg1->DIBHeight));
0062d510          int32_t eax_16;
0062d510          int32_t edx_11;
0062d510          edx_11 = HIGHD(((int64_t)((eax_13 ^ edx_10) - edx_10)));
0062d510          eax_16 = LOWD(((int64_t)((eax_13 ^ edx_10) - edx_10)));
0062d51a          int32_t eax_21 = (((((eax_16 ^ edx_11) - edx_11) & 7) ^ edx_11) - edx_11);
0062d51a          
0062d51e          if (eax_21 != 0)
0062d520              ebx = eax_21;
0062d506      }
0062d506      
0062d528      enum _IJL_COLOR DIBColor;
0062d528      
0062d528      if (arg1->JPGColor == IJL_G)
0062d980          DIBColor = arg1->DIBColor;
0062d980      
0062d98b      if ((arg1->JPGColor == IJL_G && (DIBColor == IJL_RGB || DIBColor == IJL_BGR)))
0062d98b      {
0062d991          int32_t edx_41 = 0;
0062d991          
0062d995          if (ebx > 0)
0062d995          {
0062d9a6              void* eax_28 = &MCUBuf[(i_3 << 1)];
0062d9b0              void* eax_29 = nullptr;
0062d9b3              int32_t var_48_2 = 0;
0062d9b7              int32_t var_4c_2 = ebx;
0062d9b7              
0062dae9              do
0062dae9              {
0062d9c3                  int32_t ebx_15 = 0;
0062d9c3                  
0062d9c7                  if (i_3 > 0)
0062d9c7                  {
0062da43                      do
0062da43                      {
0062d9f0                          int32_t DIBChannels = arg1->DIBChannels;
0062d9f3                          int32_t DIBLineBytes = arg1->DIBLineBytes;
0062d9fc                          uint32_t ecx_32;
0062d9fc                          uint32_t ebp_17;
0062d9fc                          uint32_t edi_20;
0062d9fc                          
0062d9fc                          if (arg1->DIBColor == IJL_RGB)
0062d9fc                          {
0062db95                              void* edx_48 = (DIBChannels * ebx_15);
0062db98                              void* eax_37 = ((DIBLineBytes * edx_41) + DIB_ptr);
0062db9c                              edi_20 = ((uint32_t)*(uint8_t*)((char*)edx_48 + eax_37));
0062dba0                              ecx_32 = ((uint32_t)*(uint8_t*)(((char*)edx_48 + eax_37) + 1));
0062dba5                              ebp_17 = ((uint32_t)*(uint8_t*)(((char*)edx_48 + eax_37) + 2));
0062d9fc                          }
0062d9fc                          else
0062d9fc                          {
0062da07                              void* edx_42 = (DIBChannels * ebx_15);
0062da0a                              void* eax_31 = ((DIBLineBytes * edx_41) + DIB_ptr);
0062da0e                              ebp_17 = ((uint32_t)*(uint8_t*)((char*)edx_42 + eax_31));
0062da12                              ecx_32 = ((uint32_t)*(uint8_t*)(((char*)edx_42 + eax_31) + 1));
0062da17                              edi_20 = ((uint32_t)*(uint8_t*)(((char*)edx_42 + eax_31) + 2));
0062d9fc                          }
0062d9fc                          
0062da3c                          *(uint16_t*)((MCUBuf + eax_29) + (ebx_15 << 1)) = ((int16_t)(((((edi_20 * 0x4d) + (ecx_32 * 0x96)) + (ebp_17 * 0x1d)) - 0x7f80) >> 8));
0062da40                          ebx_15 += 1;
0062da43                      } while (ebx_15 < i_3);
0062d9c7                  }
0062d9c7                  
0062da4f                  int32_t i = i_3;
0062da4f                  
0062da54                  if (i_3 < 8)
0062da54                  {
0062da61                      void* esi_22;
0062da61                      void* edi_25;
0062da61                      
0062da61                      if ((-(i_3) + 8) < 6)
0062da61                      {
0062db74                          edi_25 = (MCUBuf + eax_29);
0062db7b                          esi_22 = ((char*)eax_29 + eax_28);
0062da61                      }
0062da61                      else
0062da61                      {
0062da69                          int32_t ebx_18 = (edx_41 << 4);
0062da86                          esi_22 = (ebx_18 + eax_28);
0062da89                          edi_25 = &MCUBuf[ebx_18];
0062da89                          
0062dac7                          do
0062dac7                          {
0062da95                              *(uint16_t*)((char*)edi_25 + (i << 1)) = *(uint16_t*)(((char*)eax_28 + ebx_18) - 2);
0062da9e                              *(uint16_t*)(((char*)edi_25 + (i << 1)) + 2) = *(uint16_t*)(((char*)eax_28 + ebx_18) - 2);
0062daa8                              *(uint16_t*)(((char*)edi_25 + (i << 1)) + 4) = *(uint16_t*)(((char*)eax_28 + ebx_18) - 2);
0062dab2                              *(uint16_t*)(((char*)edi_25 + (i << 1)) + 6) = *(uint16_t*)(((char*)eax_28 + ebx_18) - 2);
0062dabc                              *(uint16_t*)(((char*)edi_25 + (i << 1)) + 8) = *(uint16_t*)(((char*)eax_28 + ebx_18) - 2);
0062dac1                              i += 5;
0062dac7                          } while (i < 2);
0062da61                      }
0062da61                      
0062dadd                      do
0062dadd                      {
0062dad5                          *(uint16_t*)((char*)edi_25 + (i << 1)) = *(uint16_t*)((char*)esi_22 - 2);
0062dad9                          i += 1;
0062dadd                      } while (i < 8);
0062da54                  }
0062da54                  
0062dadf                  eax_29 += 0x10;
0062dae2                  edx_41 += 1;
0062dae3                  ebx = var_4c_2;
0062dae9              } while (edx_41 < ebx);
0062d995          }
0062d995          
0062daf3          int32_t eax_35 = (ebx * 2);
0062daf3          
0062dafe          if ((eax_35 * 4) < 0x40)
0062dafe          {
0062db04              int32_t ebx_20 = (ebx << 4);
0062db07              void* i_1 = &MCUBuf[(eax_35 << 3)];
0062db07              
0062db5d              do
0062db5d              {
0062db16                  *(uint16_t*)i_1 = *(uint16_t*)((ebx_20 + MCUBuf) - 0x10);
0062db1e                  *(uint16_t*)((char*)i_1 + 2) = *(uint16_t*)((ebx_20 + MCUBuf) - 0xe);
0062db27                  *(uint16_t*)((char*)i_1 + 4) = *(uint16_t*)((ebx_20 + MCUBuf) - 0xc);
0062db30                  *(uint16_t*)((char*)i_1 + 6) = *(uint16_t*)((ebx_20 + MCUBuf) - 0xa);
0062db39                  *(uint16_t*)((char*)i_1 + 8) = *(uint16_t*)((ebx_20 + MCUBuf) - 8);
0062db42                  *(uint16_t*)((char*)i_1 + 0xa) = *(uint16_t*)((ebx_20 + MCUBuf) - 6);
0062db4b                  *(uint16_t*)((char*)i_1 + 0xc) = *(uint16_t*)((ebx_20 + MCUBuf) - 4);
0062db54                  *(uint16_t*)((char*)i_1 + 0xe) = *(uint16_t*)((ebx_20 + MCUBuf) - 2);
0062db58                  i_1 += 0x10;
0062db5d              } while (&MCUBuf[0x80] > i_1);
0062dafe          }
0062d98b      }
0062d98b      else
0062d98b      {
0062d52e          int32_t i_2 = 0;
0062d52e          
0062d539          if (arg1->JPGChannels > 0)
0062d539          {
0062d53f              int32_t edx_13 = (ebx * 2);
0062d551              int32_t edx_17 = (ebx << 4);
0062d579              uint8_t* MCUBuf_1 = MCUBuf;
0062d579              
0062d7e9              do
0062d7e9              {
0062d57d                  int32_t ecx = 0;
0062d57d                  
0062d581                  if (ebx > 0)
0062d581                  {
0062d591                      void* edx_24 = nullptr;
0062d594                      int32_t var_4c_1 = ebx;
0062d598                      void* var_3c_1 = &MCUBuf_1[(i_3 * 2)];
0062d5a4                      int32_t j_4 = i_3;
0062d5a4                      
0062d759                      do
0062d759                      {
0062d5ac                          int32_t j = 0;
0062d5b0                          void* edi_1;
0062d5b0                          
0062d5b0                          if (j_4 > 0)
0062d5b0                          {
0062d5b9                              void* var_48_1;
0062d5b9                              
0062d5b9                              if (j_4 < 5)
0062d968                                  var_48_1 = (MCUBuf_1 + edx_24);
0062d5b9                              else
0062d5b9                              {
0062d5ca                                  var_48_1 = (MCUBuf_1 + edx_24);
0062d5ce                                  int32_t ebp_1 = 2;
0062d5d1                                  int32_t ebx_2 = 3;
0062d5d4                                  int32_t var_38_1 = 1;
0062d5e9                                  j = 0;
0062d5e9                                  
0062d671                                  do
0062d671                                  {
0062d606                                      *(uint16_t*)((char*)var_48_1 + (j << 1)) = ((uint16_t)*(uint8_t*)((arg1->DIBLineBytes * ecx) + ((arg1->DIBChannels * j) + DIB_ptr)));
0062d622                                      *(uint16_t*)(((char*)var_48_1 + (j << 1)) + 2) = ((uint16_t)*(uint8_t*)((arg1->DIBLineBytes * ecx) + ((arg1->DIBChannels * var_38_1) + DIB_ptr)));
0062d62d                                      void* edi_10 = ((arg1->DIBChannels * ebp_1) + DIB_ptr);
0062d634                                      ebp_1 += 4;
0062d640                                      *(uint16_t*)(((char*)var_48_1 + (j << 1)) + 4) = ((uint16_t)*(uint8_t*)((arg1->DIBLineBytes * ecx) + edi_10));
0062d64b                                      edi_1 = ((arg1->DIBChannels * ebx_2) + DIB_ptr);
0062d652                                      ebx_2 += 4;
0062d65e                                      *(uint16_t*)(((char*)var_48_1 + (j << 1)) + 6) = ((uint16_t)*(uint8_t*)((arg1->DIBLineBytes * ecx) + edi_1));
0062d663                                      j += 4;
0062d66a                                      var_38_1 += 4;
0062d671                                  } while (j <= (i_3 - 5));
0062d671                                  
0062d67f                                  j_4 = i_3;
0062d5b9                              }
0062d5b9                              
0062d697                              int32_t j_5 = j;
0062d697                              
0062d6bb                              do
0062d6bb                              {
0062d6b4                                  *(uint16_t*)((char*)var_48_1 + (j_5 << 1)) = ((uint16_t)*(uint8_t*)((ecx * arg1->DIBLineBytes) + ((arg1->DIBChannels * j_5) + DIB_ptr)));
0062d6b8                                  j_5 += 1;
0062d6bb                              } while (j_5 < j_4);
0062d5b0                          }
0062d5b0                          
0062d6c5                          int32_t j_1 = j_4;
0062d6c5                          
0062d6ca                          if (j_4 < 8)
0062d6ca                          {
0062d6d7                              void* esi_2;
0062d6d7                              
0062d6d7                              if ((-(i_3) + 8) < 6)
0062d6d7                              {
0062d944                                  edi_1 = (MCUBuf_1 + edx_24);
0062d94b                                  esi_2 = ((char*)edx_24 + var_3c_1);
0062d6d7                              }
0062d6d7                              else
0062d6d7                              {
0062d6df                                  int32_t ebx_6 = (ecx << 4);
0062d6e6                                  edi_1 = &MCUBuf_1[ebx_6];
0062d6f9                                  esi_2 = (ebx_6 + var_3c_1);
0062d6f9                                  
0062d737                                  do
0062d737                                  {
0062d705                                      *(uint16_t*)((char*)edi_1 + (j_1 << 1)) = *(uint16_t*)(((char*)var_3c_1 + ebx_6) - 2);
0062d70e                                      *(uint16_t*)(((char*)edi_1 + (j_1 << 1)) + 2) = *(uint16_t*)(((char*)var_3c_1 + ebx_6) - 2);
0062d718                                      *(uint16_t*)(((char*)edi_1 + (j_1 << 1)) + 4) = *(uint16_t*)(((char*)var_3c_1 + ebx_6) - 2);
0062d722                                      *(uint16_t*)(((char*)edi_1 + (j_1 << 1)) + 6) = *(uint16_t*)(((char*)var_3c_1 + ebx_6) - 2);
0062d72c                                      *(uint16_t*)(((char*)edi_1 + (j_1 << 1)) + 8) = *(uint16_t*)(((char*)var_3c_1 + ebx_6) - 2);
0062d731                                      j_1 += 5;
0062d737                                  } while (j_1 < 2);
0062d737                                  
0062d73d                                  j_4 = i_3;
0062d6d7                              }
0062d6d7                              
0062d74d                              do
0062d74d                              {
0062d745                                  *(uint16_t*)((char*)edi_1 + (j_1 << 1)) = *(uint16_t*)((char*)esi_2 - 2);
0062d749                                  j_1 += 1;
0062d74d                              } while (j_1 < 8);
0062d6ca                          }
0062d6ca                          
0062d74f                          edx_24 += 0x10;
0062d752                          ecx += 1;
0062d753                          ebx = var_4c_1;
0062d759                      } while (ecx < ebx);
0062d581                  }
0062d581                  
0062d772                  if ((edx_13 * 4) < 0x40)
0062d772                  {
0062d778                      void* edi_16 = &MCUBuf_1[edx_17];
0062d780                      void* j_2 = &MCUBuf_1[(edx_13 << 3)];
0062d780                      
0062d7d4                      do
0062d7d4                      {
0062d794                          *(uint16_t*)j_2 = *(uint16_t*)((char*)edi_16 - 0x10);
0062d79b                          *(uint16_t*)((char*)j_2 + 2) = *(uint16_t*)((char*)edi_16 - 0xe);
0062d7a3                          *(uint16_t*)((char*)j_2 + 4) = *(uint16_t*)((char*)edi_16 - 0xc);
0062d7ab                          *(uint16_t*)((char*)j_2 + 6) = *(uint16_t*)((char*)edi_16 - 0xa);
0062d7b3                          *(uint16_t*)((char*)j_2 + 8) = *(uint16_t*)((char*)edi_16 - 8);
0062d7bb                          *(uint16_t*)((char*)j_2 + 0xa) = *(uint16_t*)((char*)edi_16 - 6);
0062d7c3                          *(uint16_t*)((char*)j_2 + 0xc) = *(uint16_t*)((char*)edi_16 - 4);
0062d7cb                          *(uint16_t*)((char*)j_2 + 0xe) = *(uint16_t*)((char*)edi_16 - 2);
0062d7cf                          j_2 += 0x10;
0062d7d4                      } while (&MCUBuf_1[0x80] > j_2);
0062d772                  }
0062d772                  
0062d7da                  MCUBuf_1 = &MCUBuf_1[0x80];
0062d7e0                  DIB_ptr = &DIB_ptr[1];
0062d7e1                  i_2 += 1;
0062d7e9              } while (i_2 < arg1->JPGChannels);
0062d539          }
0062d539          
0062d8e4          do
0062d8e4          {
0062d7fd              void* j_3 = nullptr;
0062d801              int32_t var_1c_2 = 0;
0062d801              
0062d8d1              do
0062d8d1              {
0062d814                  enum _IJL_COLOR DIBColor_1 = arg1->DIBColor;
0062d81a                  int32_t ecx_25;
0062d81a                  int32_t edx_38;
0062d81a                  int32_t ebx_11;
0062d81a                  int16_t* edi_19;
0062d81a                  
0062d81a                  if (DIBColor_1 == IJL_BGR)
0062d81a                  {
0062d918                      edi_19 = &MCUBuf[var_1c_2];
0062d91b                      edx_38 = ((int32_t)*(uint16_t*)(MCUBuf + (j_3 << 1)));
0062d91f                      ebx_11 = ((int32_t)*(uint16_t*)((MCUBuf + (j_3 << 1)) + 0x80));
0062d927                      ecx_25 = ((int32_t)*(uint16_t*)((MCUBuf + (j_3 << 1)) + 0x100));
0062d81a                  }
0062d81a                  else
0062d81a                  {
0062d820                      void* edi_18 = (j_3 * 2);
0062d820                      
0062d826                      if (DIBColor_1 == IJL_RGB)
0062d826                      {
0062d8f2                          edi_19 = ((char*)edi_18 + MCUBuf);
0062d8f6                          ecx_25 = ((int32_t)*(uint16_t*)edi_19);
0062d8f9                          ebx_11 = ((int32_t)edi_19[0x40]);
0062d900                          edx_38 = ((int32_t)edi_19[0x80]);
0062d826                      }
0062d826                      else
0062d826                      {
0062d82c                          edi_19 = ((char*)edi_18 + MCUBuf);
0062d83b                          ecx_25 = ((int32_t)(((int16_t)-(((int32_t)*(uint16_t*)edi_19))) + 0xff));
0062d84d                          ebx_11 = ((int32_t)(((int16_t)-(((int32_t)edi_19[0x40]))) + 0xff));
0062d85f                          edx_38 = ((int32_t)(((int16_t)-(((int32_t)edi_19[0x80]))) + 0xff));
0062d86c                          edi_19[0xc0] -= 0x80;
0062d826                      }
0062d81a                  }
0062d81a                  
0062d88b                  *(uint16_t*)edi_19 = ((int16_t)(((((ecx_25 * 0x4d) + (ebx_11 * 0x96)) + (edx_38 * 0x1d)) - 0x7f80) >> 8));
0062d8a8                  edi_19[0x40] = ((int16_t)(&(edx_38 << 7)[(((ecx_25 * 0xffffffd5) + (ebx_11 * 0xffffffab)) + 0x80)] >> 8));
0062d8c1                  edi_19[0x80] = ((int16_t)(((((ecx_25 << 7) + (ebx_11 * 0xffffff95)) + (edx_38 * 0xffffffeb)) + 0x80) >> 8));
0062d8c8                  j_3 += 1;
0062d8c9                  var_1c_2 += 2;
0062d8d1              } while (j_3 < 8);
0062d8d1              
0062d8df              MCUBuf = &MCUBuf[0x10];
0062d8e4          } while (&MCUBuf[0x80] > MCUBuf);
0062d98b      }
0062d490  }

0062d90c                                      8d 74 26 00                                                              .t&.
0062d934                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0062d953                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0062d971                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
0062db64              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0062db83           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0062dbaf                                               90                                                                 .

0062dbb0  void SS_General_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062dbb0  {
0062dbba      struct _JPEG_PROPERTIES* ebx = arg1;
0062dbc7      uint8_t* DIB_ptr = ebx->state.DIB_ptr;
0062dbcd      int32_t max_hsampling = ebx->jframe.max_hsampling;
0062dbd3      uint8_t* MCUBuf = ebx->MCUBuf;
0062dbe6      int32_t esi_2 = (max_hsampling * 8);
0062dbe8      int32_t edi_1 = esi_2;
0062dbea      int32_t max_hsampling_2 = max_hsampling;
0062dbf1      int32_t max_vsampling = ebx->jframe.max_vsampling;
0062dbf7      int32_t ebp = (max_vsampling * 2);
0062dbfa      int32_t max_vsampling_2 = max_vsampling;
0062dc05      int32_t ecx_1 = (ebp * 4);
0062dc05      
0062dc12      if ((ebx->numxMCUs - 1) != arg2)
0062dc55          ebx->state.DIB_ptr = ((ebx->DIBChannels * esi_2) + DIB_ptr);
0062dc12      else
0062dc12      {
0062dc18          int32_t temp1_1 = (((int64_t)ebx->DIBWidth) % esi_2);
0062dc18          
0062dc1c          if (temp1_1 != 0)
0062dc1e              edi_1 = temp1_1;
0062dc1e          
0062dc40          ebx->state.DIB_ptr = &ebx->DIBBytes[((((arg3 * 8) * max_vsampling_2) + (ebp << 2)) * ebx->DIBLineBytes)];
0062dc12      }
0062dc12      
0062dc68      if (arg3 == (ebx->numyMCUs - 1))
0062dc68      {
0062dc6d          int32_t eax_4;
0062dc6d          int32_t edx_14;
0062dc6d          edx_14 = HIGHD(((int64_t)ebx->DIBHeight));
0062dc6d          eax_4 = LOWD(((int64_t)ebx->DIBHeight));
0062dc73          int32_t temp1_2 = (((int64_t)((eax_4 ^ edx_14) - edx_14)) % ecx_1);
0062dc73          
0062dc77          if (temp1_2 != 0)
0062dc79              ecx_1 = temp1_2;
0062dc68      }
0062dc68      
0062dc7b      int32_t ebp_5 = 0;
0062dc7d      int32_t JPGChannels_1 = ebx->JPGChannels;
0062dc7d      
0062dc82      if (JPGChannels_1 <= 0)
0062e31a          return;
0062e31a      
0062dcb0      int32_t eax_13 = (ecx_1 << 4);
0062dcb2      int32_t ecx_3 = (max_vsampling_2 << 7);
0062dcb9      int32_t var_40_1 = esi_2;
0062dcc0      int32_t JPGChannels = JPGChannels_1;
0062dcce      enum _IJL_COLOR DIBColor = ebx->DIBColor;
0062dcce      
0062e366      while (true)
0062e366      {
0062e366          void* edx_18;
0062e366          
0062e366          if ((DIBColor == IJL_BGR && ebx->JPGColor == IJL_RGB))
0062e375              edx_18 = ((DIB_ptr - ebp_5) + 2);
0062e366          else
0062dce5              edx_18 = &DIB_ptr[ebp_5];
0062dce5          
0062dcec          void var_564;
0062dcec          void var_563;
0062dcec          void var_562;
0062dcec          void var_561;
0062dcec          
0062dcec          if (eax_13 > 0)
0062dcec          {
0062dcf2              int32_t DIBLineBytes = ebx->DIBLineBytes;
0062dd03              int32_t edi_2 = edi_1;
0062dd18              int32_t eax_14 = 0;
0062dd18              
0062dec7              do
0062dec7              {
0062dd1a                  int32_t i_3 = 0;
0062dd1a                  
0062dd1e                  if (edi_2 > 0)
0062dd1e                  {
0062dd27                      int32_t DIBChannels_1;
0062dd27                      
0062dd27                      if (edi_2 < 6)
0062e357                          DIBChannels_1 = arg1->DIBChannels;
0062dd27                      else
0062dd27                      {
0062dd34                          int32_t DIBChannels = arg1->DIBChannels;
0062dd43                          char* ecx_5 = nullptr;
0062dd54                          int32_t var_28_1 = 1;
0062dd5e                          int32_t var_2c_1 = 2;
0062dd68                          int32_t var_30_1 = 3;
0062dd72                          int32_t var_50_2 = 4;
0062dd87                          int32_t i_2 = 0;
0062dd8e                          int32_t eax_15 = eax_14;
0062de43                          int32_t i;
0062de43                          
0062de43                          do
0062de43                          {
0062dda0                              i = *(uint8_t*)(ecx_5 + edx_18);
0062ddd0                              *(uint8_t*)(&var_564 + eax_15) = i;
0062ddd3                              i = *(uint8_t*)((DIBChannels * var_28_1) + edx_18);
0062ddde                              *(uint8_t*)(&var_563 + eax_15) = i;
0062dde2                              i = *(uint8_t*)((DIBChannels * var_2c_1) + edx_18);
0062dde5                              *(uint8_t*)(&var_562 + eax_15) = i;
0062dde9                              i = *(uint8_t*)((DIBChannels * var_30_1) + edx_18);
0062ddec                              *(uint8_t*)(&var_561 + eax_15) = i;
0062ddff                              char* ebx_3;
0062ddff                              ebx_3 = *(uint8_t*)((DIBChannels * var_50_2) + edx_18);
0062de02                              void var_560;
0062de02                              *(uint8_t*)(&var_560 + eax_15) = ebx_3;
0062de06                              eax_15 += 5;
0062de10                              ecx_5 = &ecx_5[(DIBChannels * 5)];
0062de17                              i = (i_2 + 5);
0062de1a                              var_28_1 += 5;
0062de22                              var_2c_1 += 5;
0062de2a                              var_30_1 += 5;
0062de32                              var_50_2 += 5;
0062de3a                              i_2 = i;
0062de43                          } while (i <= (edi_1 - 6));
0062de43                          
0062de49                          DIBChannels_1 = DIBChannels;
0062de57                          i_3 = i;
0062de59                          edi_2 = edi_1;
0062dd27                      }
0062dd27                      
0062de62                      char* ebx_6 = (DIBChannels_1 * i_3);
0062de65                      int32_t ecx_6 = (i_3 + eax_14);
0062de68                      int32_t var_34_2 = eax_14;
0062de68                      
0062de7c                      do
0062de7c                      {
0062de70                          eax_14 = *(uint8_t*)(ebx_6 + edx_18);
0062de73                          ebx_6 = &ebx_6[DIBChannels_1];
0062de75                          i_3 += 1;
0062de76                          *(uint8_t*)(&var_564 + ecx_6) = eax_14;
0062de79                          ecx_6 += 1;
0062de7c                      } while (i_3 < edi_2);
0062de7c                      
0062de7e                      eax_14 = var_34_2;
0062dd1e                  }
0062dd1e                  
0062de90                  if (edi_2 < var_40_1)
0062de90                  {
0062de95                      int32_t ebx_7 = (edi_2 + eax_14);
0062de9a                      int32_t esi_7 = edi_2;
0062de9a                      
0062deab                      do
0062deab                      {
0062dea0                          void var_565;
0062dea0                          int32_t ecx_7;
0062dea0                          ecx_7 = *(uint8_t*)(&var_565 + (eax_14 + edi_2));
0062dea4                          esi_7 += 1;
0062dea5                          *(uint8_t*)(&var_564 + ebx_7) = ecx_7;
0062dea8                          ebx_7 += 1;
0062deab                      } while (esi_7 < var_40_1);
0062deab                      
0062dead                      edi_2 = edi_1;
0062de90                  }
0062de90                  
0062deb4                  edx_18 += DIBLineBytes;
0062debb                  eax_14 += 0x10;
0062dec7              } while (eax_14 < eax_13);
0062dcec          }
0062dcec          
0062dee9          int32_t edx_19 = eax_13;
0062dee9          
0062deed          if (eax_13 < ecx_3)
0062deed          {
0062df2a              do
0062df2a              {
0062defd                  int32_t esi_8 = 0;
0062defd                  
0062df01                  if (var_40_1 > 0)
0062df01                  {
0062df03                      int32_t ebp_11 = eax_13;
0062df06                      int32_t ebx_9 = edx_19;
0062df09                      int32_t var_20_2 = eax_13;
0062df09                      
0062df1c                      do
0062df1c                      {
0062df10                          void var_574;
0062df10                          eax_13 = *(uint8_t*)(&var_574 + ebp_11);
0062df14                          ebp_11 += 1;
0062df15                          esi_8 += 1;
0062df16                          *(uint8_t*)(&var_564 + ebx_9) = eax_13;
0062df19                          ebx_9 += 1;
0062df1c                      } while (esi_8 < var_40_1);
0062df1c                      
0062df1e                      eax_13 = var_20_2;
0062df01                  }
0062df01                  
0062df25                  edx_19 += 0x10;
0062df2a              } while (edx_19 < ecx_3);
0062deed          }
0062deed          
0062df41          int32_t var_24_3 = ebp_5;
0062df48          int32_t max_vsampling_1 = max_vsampling_2;
0062df48          
0062df5d          while (true)
0062df5d          {
0062df5d              int32_t esi_10 = (var_24_3 << 4);
0062df67              struct _FRAME_COMPONENT* comps = arg1->jframe.comps;
0062df7d              int32_t temp0_3 = (((int64_t)max_hsampling_2) / *(uint32_t*)(&comps->hsampling + esi_10));
0062df84              int32_t temp0_4 = (((int64_t)max_vsampling_1) / *(uint32_t*)(&comps->vsampling + esi_10));
0062df88              int32_t edx_23 = (temp0_4 * temp0_3);
0062df88              
0062dfa6              if (ecx_3 > 0)
0062dfa6              {
0062dfae                  int32_t edx_26 = (temp0_4 << 7);
0062dfb7                  int32_t esi_14 = (temp0_3 * 8);
0062dfc6                  int32_t var_50_3 = (temp0_4 << 4);
0062dfcd                  int32_t edi_9 = var_40_1;
0062dfdb                  int32_t esi_15 = 0;
0062dfe9                  struct _JPEG_PROPERTIES* ebp_14 = arg1;
0062dfe9                  
0062e241                  do
0062e241                  {
0062dff0                      int32_t eax_24 = 0;
0062dff0                      
0062dff4                      if (edi_9 > 0)
0062dff4                      {
0062e001                          int32_t ecx_9 = temp0_3;
0062e008                          int32_t max_hsampling_1 = max_hsampling_2;
0062e008                          
0062e21e                          do
0062e21e                          {
0062e00f                              int32_t esi_16 = 0;
0062e00f                              
0062e013                              if (edx_26 > 0)
0062e013                              {
0062e023                                  int32_t ebx_12 = var_50_3;
0062e031                                  int32_t eax_25 = esi_14;
0062e031                                  
0062e1ea                                  do
0062e1ea                                  {
0062e038                                      int32_t ecx_10 = 0;
0062e038                                      
0062e03c                                      if (eax_25 > 0)
0062e03c                                      {
0062e053                                          int32_t ebp_16 = temp0_3;
0062e05a                                          uint8_t* MCUBuf_1 = MCUBuf;
0062e05a                                          
0062e1c4                                          do
0062e1c4                                          {
0062e06f                                              int32_t eax_33 = 0;
0062e06f                                              
0062e07a                                              if (var_24_3 == 0)
0062e07a                                              {
0062e094                                              label_62e094:
0062e094                                                  int32_t edx_29 = 0;
0062e094                                                  
0062e098                                                  if (ebx_12 > 0)
0062e098                                                  {
0062e0a8                                                      int32_t var_58 = 0;
0062e0b1                                                      int32_t ebx_13 = (ecx_10 + (esi_16 + (esi_15 + eax_24)));
0062e0b1                                                      
0062e182                                                      do
0062e182                                                      {
0062e0c1                                                          int32_t i_1 = 0;
0062e0c1                                                          
0062e0c5                                                          if (ebp_16 > 0)
0062e0c5                                                          {
0062e0ce                                                              int32_t esi_18;
0062e0ce                                                              
0062e0ce                                                              if (ebp_16 < 5)
0062e31b                                                                  esi_18 = (edx_29 + ebx_13);
0062e0ce                                                              else
0062e0ce                                                              {
0062e0d4                                                                  int32_t esi_17 = (edx_29 + ebx_13);
0062e0d7                                                                  int32_t ecx_11 = esi_17;
0062e0ef                                                                  int32_t eax_27 = var_58;
0062e0f6                                                                  esi_18 = esi_17;
0062e0f9                                                                  i_1 = 0;
0062e0f9                                                                  
0062e126                                                                  do
0062e126                                                                  {
0062e11b                                                                      eax_27 = ((int32_t)(((uint16_t)*(uint8_t*)(&var_561 + ecx_11)) + (((uint16_t)*(uint8_t*)(&var_562 + ecx_11)) + (((uint16_t)*(uint8_t*)(&var_563 + ecx_11)) + (((uint16_t)*(uint8_t*)(&var_564 + ecx_11)) + eax_27)))));
0062e11e                                                                      ecx_11 += 4;
0062e121                                                                      i_1 += 4;
0062e126                                                                  } while (i_1 <= (temp0_3 - 5));
0062e126                                                                  
0062e128                                                                  var_58 = eax_27;
0062e13d                                                                  ebp_16 = temp0_3;
0062e0ce                                                              }
0062e0ce                                                              
0062e14d                                                              int32_t eax_32 = var_58;
0062e154                                                              int32_t esi_20 = (esi_18 + i_1);
0062e15a                                                              int32_t i_4 = i_1;
0062e15a                                                              
0062e16d                                                              do
0062e16d                                                              {
0062e166                                                                  eax_32 = ((int32_t)(((uint16_t)*(uint8_t*)(&var_564 + esi_20)) + eax_32));
0062e169                                                                  esi_20 += 1;
0062e16a                                                                  i_4 += 1;
0062e16d                                                              } while (i_4 < ebp_16);
0062e16d                                                              
0062e16f                                                              var_58 = eax_32;
0062e0c5                                                          }
0062e0c5                                                          
0062e17d                                                          edx_29 += 0x10;
0062e182                                                      } while (edx_29 < ebx_12);
0062e182                                                      
0062e188                                                      ebx_12 = ebx_12;
0062e18a                                                      eax_33 = var_58;
0062e098                                                  }
0062e098                                                  
0062e1b3                                                  *(uint16_t*)MCUBuf_1 = (((int16_t)(((int64_t)(eax_33 + (edx_23 >> 1))) / edx_23)) - 0x80);
0062e07a                                              }
0062e07a                                              else
0062e07a                                              {
0062e085                                                  *(uint16_t*)MCUBuf_1 = 0;
0062e085                                                  
0062e33d                                                  if ((arg1->DIBColor != IJL_G || arg1->JPGColor != IJL_YCBCR))
0062e08e                                                      goto label_62e094;
0062e07a                                              }
0062e07a                                              
0062e1b6                                              MCUBuf_1 = &MCUBuf_1[2];
0062e1b9                                              ecx_10 += ebp_16;
0062e1bb                                              eax_25 = esi_14;
0062e1c4                                          } while (ecx_10 < eax_25);
0062e1c4                                          
0062e1ca                                          MCUBuf = MCUBuf_1;
0062e03c                                      }
0062e03c                                      
0062e1e6                                      esi_16 += ebx_12;
0062e1ea                                  } while (esi_16 < edx_26);
0062e1ea                                  
0062e1f0                                  var_50_3 = ebx_12;
0062e1fe                                  ecx_9 = temp0_3;
0062e205                                  ebp_14 = arg1;
0062e20c                                  max_hsampling_1 = ebp_14->jframe.max_hsampling;
0062e217                                  edi_9 = (max_hsampling_1 * 8);
0062e013                              }
0062e013                              
0062e219                              eax_24 += (ecx_9 << 3);
0062e21e                          } while (eax_24 < edi_9);
0062e21e                          
0062e224                          max_hsampling_2 = max_hsampling_1;
0062e232                          max_vsampling_1 = ebp_14->jframe.max_vsampling;
0062e23a                          ecx_3 = (max_vsampling_1 << 7);
0062dff4                      }
0062dff4                      
0062e23d                      esi_15 += edx_26;
0062e241                  } while (esi_15 < ecx_3);
0062e241                  
0062e247                  var_40_1 = edi_9;
0062e258                  JPGChannels = arg1->JPGChannels;
0062dfa6              }
0062dfa6              
0062e266              int32_t eax_40 = (var_24_3 + 1);
0062e26e              var_24_3 = eax_40;
0062e26e              
0062e277              if (eax_40 >= JPGChannels)
0062e31a                  return;
0062e31a              
0062e27f              if (eax_40 == 0)
0062e27f              {
0062e281                  max_vsampling_2 = max_vsampling_1;
0062e288                  ebp_5 = eax_40;
0062e291                  ebx = arg1;
0062e298                  DIBColor = ebx->DIBColor;
0062e29b                  break;
0062e27f              }
0062e27f              
0062e2a7              DIBColor = arg1->DIBColor;
0062e2a7              
0062e2ad              if (DIBColor != IJL_G)
0062e2ad              {
0062e2af                  max_vsampling_2 = max_vsampling_1;
0062e2b6                  ebp_5 = var_24_3;
0062e2c4                  ebx = arg1;
0062e2cb                  break;
0062e2ad              }
0062e2ad              
0062e2dd              if (arg1->JPGColor != IJL_YCBCR)
0062e2dd              {
0062e2e3                  max_vsampling_2 = max_vsampling_1;
0062e2ea                  ebp_5 = var_24_3;
0062e2f8                  ebx = arg1;
0062e2ff                  break;
0062e2dd              }
0062df5d          }
0062e366      }
0062dbb0  }

0062e304              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0062e323           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0062e348                          90 8d b4 26 00 00 00 00                                                          ...&....
0062e35f                                                                                               90                                 .
0062e37d                                                                                         8d 76 00                               .v.

0062e380  void Input_Interleave_General_MCU(struct _JPEG_PROPERTIES* arg1, int32_t arg2, int32_t arg3)

0062e380  {
0062e387      struct _JPEG_PROPERTIES* ebx = arg1;
0062e391      uint8_t* DIB_ptr = ebx->state.DIB_ptr;
0062e397      int32_t j_3 = 8;
0062e3a0      int32_t ecx = 8;
0062e3a0      
0062e3ad      if ((ebx->numxMCUs - 1) != arg2)
0062e3eb          ebx->state.DIB_ptr = &DIB_ptr[(ebx->DIBChannels << 3)];
0062e3ad      else
0062e3ad      {
0062e3b2          int32_t eax_3;
0062e3b2          int32_t edx_1;
0062e3b2          edx_1 = HIGHD(((int64_t)ebx->DIBWidth));
0062e3b2          eax_3 = LOWD(((int64_t)ebx->DIBWidth));
0062e3bc          int32_t j_4 = (((((eax_3 ^ edx_1) - edx_1) & 7) ^ edx_1) - edx_1);
0062e3bc          
0062e3c0          if (j_4 != 0)
0062e3c2              j_3 = j_4;
0062e3c2          
0062e3dd          ebx->state.DIB_ptr = &ebx->DIBBytes[(((arg3 * 8) * ebx->DIBLineBytes) + (ebx->DIBLineBytes << 3))];
0062e3ad      }
0062e3ad      
0062e3fb      if (arg3 == (ebx->numyMCUs - 1))
0062e3fb      {
0062e400          int32_t eax_14;
0062e400          int32_t edx_5;
0062e400          edx_5 = HIGHD(((int64_t)ebx->DIBHeight));
0062e400          eax_14 = LOWD(((int64_t)ebx->DIBHeight));
0062e405          int32_t eax_17;
0062e405          int32_t edx_6;
0062e405          edx_6 = HIGHD(((int64_t)((eax_14 ^ edx_5) - edx_5)));
0062e405          eax_17 = LOWD(((int64_t)((eax_14 ^ edx_5) - edx_5)));
0062e40f          int32_t eax_22 = (((((eax_17 ^ edx_6) - edx_6) & 7) ^ edx_6) - edx_6);
0062e40f          
0062e413          if (eax_22 != 0)
0062e415              ecx = eax_22;
0062e3fb      }
0062e3fb      
0062e417      int32_t i = 0;
0062e417      
0062e41e      if (ebx->JPGChannels > 0)
0062e41e      {
0062e424          int32_t eax_24 = (ecx * 2);
0062e457          uint8_t* MCUBuf = ebx->MCUBuf;
0062e457          
0062e633          do
0062e633          {
0062e686              void* eax_30;
0062e686              
0062e686              if ((ebx->DIBColor == IJL_BGR && ebx->JPGColor == IJL_RGB))
0062e692                  eax_30 = ((DIB_ptr - i) + 2);
0062e686              else
0062e46f                  eax_30 = &DIB_ptr[i];
0062e46f              
0062e472              int32_t ecx_1 = 0;
0062e472              
0062e47a              if (ecx > 0)
0062e47a              {
0062e484                  void* edi = &MCUBuf[(j_3 * 2)];
0062e489                  void* edx_14 = nullptr;
0062e498                  int32_t j_2 = j_3;
0062e498                  
0062e5b4                  do
0062e5b4                  {
0062e49c                      int32_t ebx_1 = 0;
0062e49c                      
0062e4a0                      if (j_2 > 0)
0062e4a0                      {
0062e4a6                          void* ebp_7 = (MCUBuf + edx_14);
0062e4a6                          
0062e4e5                          do
0062e4e5                          {
0062e666                              if (((i == 0 || arg1->DIBColor != IJL_G) || arg1->JPGColor != IJL_YCBCR))
0062e4dd                                  *(uint16_t*)((char*)ebp_7 + (ebx_1 << 1)) = (((uint16_t)*(uint8_t*)((arg1->DIBChannels * ebx_1) + eax_30)) - 0x80);
0062e666                              else
0062e66e                                  *(uint16_t*)((char*)ebp_7 + (ebx_1 << 1)) = 0;
0062e66e                              
0062e4e2                              ebx_1 += 1;
0062e4e5                          } while (ebx_1 < j_2);
0062e4a0                      }
0062e4a0                      
0062e4ef                      int32_t j = j_2;
0062e4ef                      
0062e4f4                      if (j_2 < 8)
0062e4f4                      {
0062e501                          void* var_20_1;
0062e501                          void* var_1c_1;
0062e501                          
0062e501                          if ((-(j_3) + 8) < 6)
0062e501                          {
0062e64d                              var_20_1 = (MCUBuf + edx_14);
0062e654                              var_1c_1 = ((char*)edx_14 + edi);
0062e501                          }
0062e501                          else
0062e501                          {
0062e509                              int32_t ebp_10 = (ecx_1 << 4);
0062e51b                              var_20_1 = &MCUBuf[ebp_10];
0062e527                              var_1c_1 = (ebp_10 + edi);
0062e527                              
0062e577                              do
0062e577                              {
0062e545                                  *(uint16_t*)((char*)var_20_1 + (j << 1)) = *(uint16_t*)(((char*)edi + ebp_10) - 2);
0062e54e                                  *(uint16_t*)(((char*)var_20_1 + (j << 1)) + 2) = *(uint16_t*)(((char*)edi + ebp_10) - 2);
0062e558                                  *(uint16_t*)(((char*)var_20_1 + (j << 1)) + 4) = *(uint16_t*)(((char*)edi + ebp_10) - 2);
0062e562                                  *(uint16_t*)(((char*)var_20_1 + (j << 1)) + 6) = *(uint16_t*)(((char*)edi + ebp_10) - 2);
0062e56c                                  *(uint16_t*)(((char*)var_20_1 + (j << 1)) + 8) = *(uint16_t*)(((char*)edi + ebp_10) - 2);
0062e571                                  j += 5;
0062e577                              } while (j < 2);
0062e501                          }
0062e501                          
0062e59d                          do
0062e59d                          {
0062e594                              *(uint16_t*)((char*)var_20_1 + (j << 1)) = *(uint16_t*)((char*)var_1c_1 - 2);
0062e599                              j += 1;
0062e59d                          } while (j < 8);
0062e59d                          
0062e59f                          j_2 = j_3;
0062e4f4                      }
0062e4f4                      
0062e5a7                      edx_14 += 0x10;
0062e5aa                      ecx_1 += 1;
0062e5ab                      eax_30 += arg1->DIBLineBytes;
0062e5b4                  } while (ecx_1 < ecx);
0062e5b4                  
0062e5c2                  ebx = arg1;
0062e47a              }
0062e47a              
0062e5cd              if ((eax_24 * 4) < 0x40)
0062e5cd              {
0062e5d3                  void* ecx_5 = &MCUBuf[(ecx << 4)];
0062e5da                  void* j_1 = &MCUBuf[(eax_24 << 3)];
0062e5da                  
0062e627                  do
0062e627                  {
0062e5e7                      *(uint16_t*)j_1 = *(uint16_t*)((char*)ecx_5 - 0x10);
0062e5ee                      *(uint16_t*)((char*)j_1 + 2) = *(uint16_t*)((char*)ecx_5 - 0xe);
0062e5f6                      *(uint16_t*)((char*)j_1 + 4) = *(uint16_t*)((char*)ecx_5 - 0xc);
0062e5fe                      *(uint16_t*)((char*)j_1 + 6) = *(uint16_t*)((char*)ecx_5 - 0xa);
0062e606                      *(uint16_t*)((char*)j_1 + 8) = *(uint16_t*)((char*)ecx_5 - 8);
0062e60e                      *(uint16_t*)((char*)j_1 + 0xa) = *(uint16_t*)((char*)ecx_5 - 6);
0062e616                      *(uint16_t*)((char*)j_1 + 0xc) = *(uint16_t*)((char*)ecx_5 - 4);
0062e61e                      *(uint16_t*)((char*)j_1 + 0xe) = *(uint16_t*)((char*)ecx_5 - 2);
0062e622                      j_1 += 0x10;
0062e627                  } while (&MCUBuf[0x80] > j_1);
0062e5cd              }
0062e5cd              
0062e629              MCUBuf = &MCUBuf[0x80];
0062e62f              i += 1;
0062e633          } while (i < ebx->JPGChannels);
0062e41e      }
0062e380  }

0062e65d                                                                                         8d 76 00                               .v.
0062e678                                                                          90 8d b4 26 00 00 00 00                          ...&....
0062e69a                                                                                8d b6 00 00 00 00                            ......

0062e6a0  int32_t sub_62e6a0(int32_t* arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, int32_t arg8, int32_t arg9, int32_t arg10, int32_t* arg11, int32_t* arg12)

0062e6a0  {
0062e6ab      int32_t ecx = arg2;
0062e6af      int32_t ebx = arg3;
0062e6b7      int32_t edx = *(uint32_t*)arg1;
0062e6bc      int32_t esi;
0062e6bc      
0062e6bc      if (edx != 0)
0062e6bc      {
0062e744          esi = arg1[2];
0062e747      label_62e747:
0062e747          int32_t eax_7 = (arg4 * ecx);
0062e747          
0062e757          if ((eax_7 >= esi || (ecx + eax_7) < edx))
0062e85b              return 0xfffffff8;
0062e85b          
0062e761          int32_t esi_6 = (arg5 * ebx);
0062e761          
0062e76b          if (esi_6 >= arg1[3])
0062e85b              return 0xfffffff8;
0062e85b          
0062e771          int32_t esi_7 = arg1[1];
0062e77b          int32_t var_20_1 = esi_7;
0062e77b          
0062e781          if ((ebx + esi_6) < esi_7)
0062e85b              return 0xfffffff8;
0062e85b          
0062e7ad          *(uint32_t*)arg11 = (((arg6 * (-(edx) + eax_7)) + (arg7 * (-(esi_7) + esi_6))) + arg8);
0062e7b2          int32_t esi_11 = (*(uint32_t*)arg1 - eax_7);
0062e7b6          int32_t ebx_6 = ebx;
0062e7b6          
0062e7ba          if (esi_11 < 0)
0062e860              esi_11 = 0;
0062e860          
0062e7c4          *(uint32_t*)arg12 = esi_11;
0062e7c9          int32_t edi_8 = (arg1[2] - eax_7);
0062e7cd          int32_t edx_14;
0062e7cd          
0062e7cd          if (ecx >= edi_8)
0062e7d3              edx_14 = edi_8;
0062e7cd          else
0062e7cf              edx_14 = ecx;
0062e7cf          
0062e7da          int32_t esi_14 = ((*(uint32_t*)arg1 - eax_7) + arg9);
0062e7e0          int32_t var_20_2 = esi_14;
0062e7e0          
0062e7e4          if (edx_14 >= esi_14)
0062e7ee              ecx = esi_14;
0062e7e4          else if (ecx >= edi_8)
0062e7ea              ecx = edi_8;
0062e7ea          
0062e7f4          arg12[2] = ecx;
0062e7fa          int32_t eax_10 = (arg1[1] - esi_6);
0062e7fa          
0062e800          if (eax_10 < 0)
0062e85c              eax_10 = 0;
0062e85c          
0062e806          arg12[1] = eax_10;
0062e810          int32_t eax_12;
0062e810          int32_t edx_15;
0062e810          edx_15 = HIGHD(((int64_t)arg10));
0062e810          eax_12 = LOWD(((int64_t)arg10));
0062e813          int32_t eax_14 = ((eax_12 ^ edx_15) - edx_15);
0062e815          int32_t esi_16 = (arg1[3] - esi_6);
0062e81b          int32_t edx_16;
0062e81b          
0062e81b          if (ebx_6 >= esi_16)
0062e821              edx_16 = esi_16;
0062e81b          else
0062e81d              edx_16 = ebx_6;
0062e81d          
0062e826          int32_t ebp_4 = (arg1[1] - esi_6);
0062e826          
0062e830          if (edx_16 >= (ebp_4 + eax_14))
0062e83a              ebx_6 = (ebp_4 + eax_14);
0062e830          else if (ebx_6 >= esi_16)
0062e836              ebx_6 = esi_16;
0062e836          
0062e842          arg12[3] = ebx_6;
0062e6bc      }
0062e6bc      else
0062e6bc      {
0062e6c2          esi = arg1[2];
0062e6c2          
0062e6d9          if (((esi != 0 || arg1[1] != 0) || arg1[3] != 0))
0062e6c7              goto label_62e747;
0062e6c7          
0062e6db          int32_t eax_1 = (arg4 * ecx);
0062e6e2          int32_t ebp_2 = (arg5 * ebx);
0062e6fd          *(uint32_t*)arg11 = (((arg6 * eax_1) + (arg7 * ebp_2)) + arg8);
0062e703          *(uint32_t*)arg12 = 0;
0062e70d          int32_t edx_7 = (arg9 - eax_1);
0062e70d          
0062e711          if (ecx >= edx_7)
0062e713              ecx = edx_7;
0062e713          
0062e71d          arg12[2] = ecx;
0062e720          arg12[1] = 0;
0062e727          int32_t eax_3;
0062e727          int32_t edx_8;
0062e727          edx_8 = HIGHD(((int64_t)arg10));
0062e727          eax_3 = LOWD(((int64_t)arg10));
0062e72a          int32_t eax_5 = ((eax_3 ^ edx_8) - edx_8);
0062e72a          
0062e732          if (ebx >= (eax_5 - ebp_2))
0062e736              ebx = (eax_5 - ebp_2);
0062e736          
0062e73c          arg12[3] = ebx;
0062e6bc      }
0062e84e      return 0;
0062e6a0  }

0062e867                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

0062e870  struct _IJL_RECT operator&(struct _IJL_RECT const& arg1, struct _IJL_RECT const& arg2)

0062e870  {
0062e883      int32_t left_1 = arg2->left;
0062e885      int32_t ebx = arg_c[2];
0062e885      
0062e88a      if (left_1 <= ebx)
0062e88a      {
0062e894          int32_t right_1 = arg2->right;
0062e89b          int32_t edx_1 = *(uint32_t*)arg_c;
0062e89b          
0062e89f          if (right_1 >= edx_1)
0062e89f          {
0062e8a9              int32_t top = arg2->top;
0062e8b4              int32_t edi_3 = arg_c[3];
0062e8b4              
0062e8bd              if (top <= edi_3)
0062e8bd              {
0062e8c7                  int32_t bottom_1 = arg2->bottom;
0062e8d2                  int32_t edi_4 = arg_c[1];
0062e8d9                  int32_t var_20_1 = edi_4;
0062e8d9                  
0062e8df                  if (bottom_1 >= edi_4)
0062e8df                  {
0062e8e7                      int32_t left;
0062e8e7                      
0062e8e7                      if (left_1 <= edx_1)
0062e8f5                          left = *(uint32_t*)arg_c;
0062e8e7                      else
0062e8ed                          left = arg2->left;
0062e8ed                      
0062e902                      int32_t top_1;
0062e902                      
0062e902                      if (top <= edi_4)
0062e911                          top_1 = arg_c[1];
0062e902                      else
0062e908                          top_1 = arg2->top;
0062e908                      
0062e91a                      int32_t right;
0062e91a                      
0062e91a                      if (right_1 >= ebx)
0062e929                          right = arg_c[2];
0062e91a                      else
0062e920                          right = arg2->right;
0062e920                      
0062e93a                      int32_t bottom;
0062e93a                      
0062e93a                      if (bottom_1 >= edi_3)
0062e949                          bottom = arg_c[3];
0062e93a                      else
0062e940                          bottom = arg2->bottom;
0062e940                      
0062e955                      arg1->left = left;
0062e95d                      arg1->top = top_1;
0062e963                      arg1->right = right;
0062e968                      arg1->bottom = bottom;
0062e972                      return arg1;
0062e8df                  }
0062e8bd              }
0062e89f          }
0062e88a      }
0062e88a      
0062e97b      int32_t ecx_3 = data_9078e4;
0062e97e      arg1->left = data_9078e0;
0062e980      int32_t ebx_1 = data_9078e8;
0062e983      int32_t edi_5 = data_9078ec;
0062e986      arg1->top = ecx_3;
0062e98b      arg1->right = ebx_1;
0062e98e      arg1->bottom = edi_5;
0062e998      return arg1;
0062e870  }

0062e999                                                                             8d b4 26 00 00 00 00                           ..&....

0062e9a0  bool operator==(struct _IJL_RECT const& arg1, struct _IJL_RECT const& arg2)

0062e9a0  {
0062e9c4      if ((arg1->left == arg2->left && (arg1->right == arg2->right && (arg1->top == arg2->top && arg1->bottom == arg2->bottom))))
0062e9cb          return 1;
0062e9cb      
0062e9ce      return 0;
0062e9a0  }

0062e9cf                                               90                                                                 .

0062e9d0  bool operator!=(struct _IJL_RECT const& arg1, struct _IJL_RECT const& arg2)

0062e9d0  {
0062e9f4      if ((arg1->left == arg2->left && (arg1->right == arg2->right && (arg1->top == arg2->top && arg1->bottom == arg2->bottom))))
0062e9fe          return 0;
0062e9fe      
0062e9fb      return 1;
0062e9d0  }

0062e9ff                                                                                               90                                 .

0062ea00  struct _IJL_RECT operator-(struct _IJL_RECT const& arg1, struct tagPOINT const& arg2)

0062ea00  {
0062ea27      if (((uint32_t)operator==(arg2, &data_9078e0)) != 0)
0062ea27      {
0062ea30          int32_t ecx = data_9078e4;
0062ea33          arg1->left = data_9078e0;
0062ea35          int32_t eax_2 = data_9078e8;
0062ea38          int32_t ebp_1 = data_9078ec;
0062ea3b          arg1->top = ecx;
0062ea3e          arg1->right = eax_2;
0062ea41          arg1->bottom = ebp_1;
0062ea4c          return arg1;
0062ea27      }
0062ea27      
0062ea5b      int32_t ecx_2 = (*(int32_t*)((char*)arg2 + 8) - *(uint32_t*)arg_c);
0062ea6b      int32_t edx_4 = (arg2->y - arg_c[1]);
0062ea72      int32_t ebp_3 = (*(int32_t*)((char*)arg2 + 0xc) - arg_c[1]);
0062ea7e      arg1->left = (arg2->x - *(uint32_t*)arg_c);
0062ea80      arg1->top = edx_4;
0062ea86      arg1->right = ecx_2;
0062ea8c      arg1->bottom = ebp_3;
0062ea95      return arg1;
0062ea00  }

0062ea96                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

0062eaa0  int32_t sub_62eaa0(void* arg1, void* arg2, void** arg3, int32_t arg4, int32_t arg5, int32_t arg6, char arg7)

0062eaa0  {
0062eace      if ((arg3[2] != 0 || *(uint32_t*)((char*)arg1 + 0x4de0) == 0))
0062eace      {
0062eb19          char var_1c_1 = arg7;
0062eb1d          sub_630630(arg1, arg2, arg3, arg4, arg5, arg6);
0062eace      }
0062eace      else
0062eaf7          sub_62eb50(arg1, arg2, arg3, arg4, arg5, arg6, 1, arg7);
0062eaf7      
0062eb45      return sub_6317e0(arg1, arg2, arg4, arg5, arg6);
0062eaa0  }

0062eb46                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

0062eb50  void* sub_62eb50(void* arg1, void* arg2, void** arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, char arg8)

0062eb50  {
0062eb5a      void* ebp = arg1;
0062eb6d      void* var_34 = nullptr;
0062eb74      void* result;
0062eb74      int32_t var_18_1;
0062eb74      int32_t eax_1;
0062eb74      int32_t ecx_2;
0062eb74      int32_t esi_1;
0062eb74      
0062eb74      if (*(uint32_t*)arg3 == 1)
0062eb74      {
006305cb          int32_t edx_94;
006305cb          
006305cb          if (*(uint32_t*)((char*)ebp + 0x34) == 3)
0063061f              edx_94 = 3;
006305cb          else
006305cd              edx_94 = *(uint32_t*)((char*)ebp + 0x30);
006305cd          
006305d0          result = arg2;
006305d0          
006305da          if (edx_94 > *(uint32_t*)((char*)result + 0x38))
006305da          {
006305e0              esi_1 = *(uint32_t*)((char*)ebp + 0x37b8);
006305ed              void* ebx_53 = arg3[0xd];
006305fa              int32_t eax_115 = *(uint32_t*)((char*)ebp + 0x37bc);
0063060a              var_18_1 = eax_115;
00630611              ecx_2 = ((((int64_t)esi_1) / *(uint32_t*)((char*)ebx_53 + 4)) * arg6);
00630617              eax_1 = ((((int64_t)eax_115) / *(uint32_t*)((char*)ebx_53 + 8)) * arg6);
0063061a              goto label_630518;
006305da          }
0062eb74      }
0062eb74      else
0062eb74      {
0062eb7a          esi_1 = *(uint32_t*)((char*)ebp + 0x37b8);
0062eb89          ecx_2 = (esi_1 * arg6);
0062eb8c          int32_t eax = *(uint32_t*)((char*)ebp + 0x37bc);
0062eb92          var_18_1 = eax;
0062eb99          eax_1 = (eax * arg6);
00630518      label_630518:
00630518          void* var_48_1;
00630518          int32_t var_44_1;
00630518          
00630518          if (((*(uint32_t*)((char*)ebp + 0x4de8) == 1 && esi_1 == 2) && var_18_1 == 1))
00630518          {
00630523              int32_t var_48_4;
00630523              
00630523              if (*(uint32_t*)((char*)ebp + 0x74) == 0)
00630523              {
00630535                  int32_t edx_89 = *(uint32_t*)((char*)ebp + 0x37c0);
0063053d                  var_48_4 = 0;
00630544                  int32_t i = (edx_89 - 1);
00630544                  
00630547                  if (edx_89 != 0)
00630547                  {
00630549                      int32_t ebx_50 = *(uint32_t*)((char*)ebp + 0x37cc);
00630551                      int32_t edx_91 = (i << 4);
0063055b                      int32_t ecx_63 = 0;
0063055b                      
00630574                      do
00630574                      {
00630566                          i -= 1;
0063056c                          ecx_63 += (*(uint32_t*)((edx_91 + ebx_50) + 4) * *(uint32_t*)((edx_91 + ebx_50) + 8));
0063056e                          edx_91 -= 0x10;
00630574                      } while (i != 0xffffffff);
00630574                      
00630576                      var_48_4 = ecx_63;
00630584                      ebp = arg1;
00630547                  }
00630523              }
00630523              else
0063052a                  var_48_4 = 1;
0063052a              
006305ad              int32_t edi_69 = (((arg4 * 2) * (var_48_4 << 6)) + *(uint32_t*)(*(uint32_t*)((char*)ebp + 0x4dec) + 4));
006305b2              var_44_1 = edi_69;
006305b9              var_48_1 = ((var_48_4 << 8) + edi_69);
00630518          }
00630518          else
00630518          {
0062ebaf              var_44_1 = 0;
0062ebb6              var_48_1 = nullptr;
00630518          }
00630518          
0062ebc9          int32_t var_4c_1 = *(uint32_t*)((char*)ebp + 0x4834);
0062ec2a          int32_t var_94;
0062ec2a          result = sub_62e6a0(((char*)ebp + 4), ecx_2, eax_1, arg4, arg5, *(uint32_t*)((char*)ebp + 0x30), *(uint32_t*)((char*)ebp + 0x3c), *(uint32_t*)((char*)ebp + 0x20), *(uint32_t*)((char*)ebp + 0x24), *(uint32_t*)((char*)ebp + 0x28), ((char*)arg2 + 0x2c), &var_94);
0062ec2a          
0062ec31          if (result == 0)
0062ec31          {
0062ec40              void var_594;
0062ec40              int32_t var_90;
0062ec40              int32_t var_8c;
0062ec40              int32_t var_88;
0062ec40              
0062ec40              if (arg7 == 0)
0062ec40              {
0062f2b0                  int32_t ebx_17 = *(uint32_t*)((char*)ebp + 0x34);
006304c5                  int32_t var_50_3;
006304c5                  
006304c5                  if ((ebx_17 == 2 && *(uint32_t*)((char*)ebp + 0x58) == 1))
006304c5                  {
006304d5                      var_50_3 = *(uint32_t*)((char*)arg2 + 0x2c);
006304dc                      int32_t eax_110 = *(uint32_t*)((char*)arg2 + 0x38);
006304dc                      
006304e1                      if (eax_110 == 0)
006304e3                          var_50_3 += 2;
006304e1                      else if (eax_110 == 1)
006304f9                          var_50_3 += 1;
006304c5                  }
006304c5                  else
0062f2c9                      var_50_3 = (*(uint32_t*)((char*)arg2 + 0x2c) + *(uint32_t*)((char*)arg2 + 0x38));
0062f2c9                  
0062f2d9                  void* i_21 = *(uint32_t*)arg3;
0062f2db                  void* i_19 = *(uint32_t*)((char*)ebp + 0x30);
0062f2e5                  int32_t ecx_16 = (arg6 << 5);
0062f2ea                  void* ebp_9 = var_34;
0062f2f1                  void* i_18 = nullptr;
0062f2f8                  int32_t var_58_3 = 0;
0062f2f8                  
0062f308                  while (true)
0062f308                  {
0062f308                      void* i_20;
0062f308                      
0062f308                      if (i_21 >= i_19)
0062f310                          i_20 = i_19;
0062f308                      else
0062f30a                          i_20 = i_21;
0062f30a                      
0062f31b                      if (i_18 >= i_20)
0062f31b                          break;
0062f31b                      
006303f9                      if ((*(uint32_t*)((char*)arg1 + 0x58) != 4 || i_18 <= 0))
006303f9                      {
0062f33b                          void* edx_27 = arg3[0xd];
0062f341                          int32_t ebp_10;
0062f341                          int32_t esi_18;
0062f341                          
0062f341                          if (i_21 == 1)
0062f341                          {
006303e0                              ebp_10 = *(uint32_t*)((char*)edx_27 + 8);
006303e3                              esi_18 = *(uint32_t*)((char*)edx_27 + 4);
0062f341                          }
0062f341                          else
0062f341                          {
0062f34e                              ebp_10 = *(uint32_t*)((var_58_3 + edx_27) + 8);
0062f352                              esi_18 = *(uint32_t*)((var_58_3 + edx_27) + 4);
0062f341                          }
0062f341                          
0062f35d                          int32_t eax_37 = *(uint32_t*)((char*)arg1 + 0x37b8);
0062f36b                          int32_t temp0_3 = (((int64_t)eax_37) / esi_18);
0062f376                          int32_t eax_40 = *(uint32_t*)((char*)arg1 + 0x37bc);
0062f37c                          void* ecx_19;
0062f37c                          ecx_19 = arg8;
0062f38b                          int32_t temp0_4 = (((int64_t)eax_40) / ebp_10);
0062f38b                          
0062f38f                          if (ecx_19 != 0)
0062f38f                          {
0062f650                              int32_t edx_37 = 0;
0062f650                              
0062f654                              if (ebp_10 > 0)
0062f654                              {
0062f66b                                  int32_t eax_50 = (temp0_4 * arg6);
0062f66e                                  int32_t edi_23 = (temp0_3 * arg6);
0062f67d                                  int32_t ecx_31 = 0;
0062f67d                                  
0062f85b                                  do
0062f85b                                  {
0062f692                                      void* edi_24 = (&var_594 + ecx_31);
0062f694                                      int32_t eax_51 = 0;
0062f694                                      
0062f698                                      if (esi_18 > 0)
0062f698                                      {
0062f6a5                                          int32_t ecx_32 = eax_50;
0062f6c1                                          int32_t ebp_15 = edi_23;
0062f6cf                                          int32_t esi_28 = var_4c_1;
0062f6cf                                          
0062f826                                          do
0062f826                                          {
0062f6d6                                              int32_t edx_38 = 0;
0062f6d6                                              
0062f6da                                              if (ecx_32 > 0)
0062f6da                                              {
0062f6ee                                                  int32_t ebx_23 = 0;
0062f6f8                                                  int32_t eax_52 = 0;
0062f6f8                                                  
0062f7f9                                                  do
0062f7f9                                                  {
0062f70d                                                      int32_t i_1 = 0;
0062f70d                                                      
0062f711                                                      if (ebp_15 > 0)
0062f711                                                      {
0062f71a                                                          void* var_30_5;
0062f71a                                                          int32_t edi_28;
0062f71a                                                          
0062f71a                                                          if (ebp_15 < 6)
0062f71a                                                          {
006303ca                                                              var_30_5 = ((char*)edi_24 + eax_52);
006303d8                                                              edi_28 = (esi_28 + ebx_23);
0062f71a                                                          }
0062f71a                                                          else
0062f71a                                                          {
0062f72a                                                              var_30_5 = ((char*)edi_24 + eax_52);
0062f738                                                              edi_28 = (esi_28 + ebx_23);
0062f73b                                                              int32_t var_34_5 = ebx_23;
0062f742                                                              int32_t var_38_4 = eax_52;
0062f749                                                              int32_t var_3c_3 = edx_38;
0062f749                                                              
0062f78a                                                              do
0062f78a                                                              {
0062f750                                                                  eax_52 = *(uint8_t*)(edi_28 + (i_1 << 1));
0062f75a                                                                  *(uint8_t*)((char*)var_30_5 + i_1) = eax_52;
0062f75e                                                                  eax_52 = *(uint8_t*)((edi_28 + (i_1 << 1)) + 2);
0062f762                                                                  *(uint8_t*)(((char*)var_30_5 + i_1) + 1) = eax_52;
0062f766                                                                  ebx_23 = *(uint8_t*)((edi_28 + (i_1 << 1)) + 4);
0062f771                                                                  *(uint8_t*)(((char*)var_30_5 + i_1) + 2) = ebx_23;
0062f775                                                                  ecx_32 = *(uint8_t*)((edi_28 + (i_1 << 1)) + 6);
0062f779                                                                  *(uint8_t*)(((char*)var_30_5 + i_1) + 3) = ecx_32;
0062f77d                                                                  edx_38 = *(uint8_t*)((edi_28 + (i_1 << 1)) + 8);
0062f781                                                                  *(uint8_t*)(((char*)var_30_5 + i_1) + 4) = edx_38;
0062f785                                                                  i_1 += 5;
0062f78a                                                              } while (i_1 <= (edi_23 - 6));
0062f78a                                                              
0062f78c                                                              ebx_23 = var_34_5;
0062f793                                                              eax_52 = var_38_4;
0062f79a                                                              edx_38 = var_3c_3;
0062f7a1                                                              ebp_15 = edi_23;
0062f71a                                                          }
0062f71a                                                          
0062f7af                                                          int32_t var_38_5 = eax_52;
0062f7c4                                                          int32_t i_16 = i_1;
0062f7c4                                                          
0062f7d9                                                          do
0062f7d9                                                          {
0062f7d0                                                              eax_52 = *(uint8_t*)(edi_28 + (i_16 << 1));
0062f7d3                                                              *(uint8_t*)((char*)var_30_5 + i_16) = eax_52;
0062f7d6                                                              i_16 += 1;
0062f7d9                                                          } while (i_16 < ebp_15);
0062f7d9                                                          
0062f7db                                                          eax_52 = var_38_5;
0062f7e9                                                          ecx_32 = eax_50;
0062f711                                                      }
0062f711                                                      
0062f7f0                                                      eax_52 += 0x20;
0062f7f3                                                      ebx_23 += 0x10;
0062f7f6                                                      edx_38 += 1;
0062f7f9                                                  } while (edx_38 < ecx_32);
0062f6da                                              }
0062f6da                                              
0062f814                                              edi_24 += ebp_15;
0062f816                                              esi_28 += 0x80;
0062f81c                                              eax_51 += 1;
0062f826                                          } while (eax_51 < esi_18);
0062f826                                          
0062f82c                                          var_4c_1 = esi_28;
0062f698                                      }
0062f698                                      
0062f856                                      ecx_31 += (ecx_16 * temp0_4);
0062f858                                      edx_37 += 1;
0062f85b                                  } while (edx_37 < ebp_10);
0062f85b                                  
0062f868                                  ebx_17 = *(uint32_t*)((char*)arg1 + 0x34);
0062f654                              }
0062f38f                          }
0062f38f                          else if ((((*(uint32_t*)((char*)arg1 + 0x4de8) == 1 && eax_37 == 2) && eax_40 == 1) && arg6 != 1))
0062ff3a                          {
0062ff4c                              int32_t edx_72 = (arg6 * 8);
0062ff4c                              
0062ff64                              if (esi_18 > 0)
0062ff64                              {
0062ff7c                                  int32_t eax_81 = 0;
0062ff98                                  int32_t ebp_26 = var_4c_1;
0062ffa6                                  void* edx_73 = &var_594;
0062ffb4                                  int32_t edi_50 = var_44_1;
0062ffc2                                  void* esi_44 = var_48_1;
0062ffc2                                  
0063013d                                  do
0063013d                                  {
0062ffc9                                      int32_t ebx_44 = 0;
0062ffc9                                      
0062ffd4                                      if (edx_72 > 0)
0062ffd4                                      {
0062fff2                                          int32_t ecx_53 = (ebp_26 + (arg6 << 1));
0062fffd                                          int32_t ecx_54 = 0;
00630015                                          int32_t ebp_27 = arg6;
00630015                                          
006300f1                                          do
006300f1                                          {
0063002a                                              int32_t esi_45 = (ebx_44 * 2);
0063002a                                              
0063003a                                              if (temp0_3 == 2)
0063003a                                              {
00630177                                                  int32_t eax_85 = (ebx_44 * 2);
00630188                                                  int16_t* edi_54 = (ebp_26 + (ebx_44 << 1));
0063018b                                                  int16_t* var_40_7 = edi_54;
00630195                                                  int32_t edx_76 = (((int32_t)*(uint16_t*)edi_54) * 3);
0063019f                                                  void* esi_48 = ((char*)edx_73 + (esi_45 << 1));
006301a9                                                  void* var_3c_6 = esi_48;
006301bc                                                  *(uint8_t*)esi_48 = ((int8_t)(((((int32_t)*(uint16_t*)(((edi_50 + (arg6 << 1)) + (ebx_44 << 1)) - 2)) + edx_76) + 1) >> 2));
006301c9                                                  *(uint8_t*)((char*)esi_48 + 1) = ((int8_t)(((((int32_t)edi_54[1]) + edx_76) + 2) >> 2));
006301d6                                                  int32_t eax_95 = (esi_45 * 2);
006301d6                                                  
006301dd                                                  if ((arg6 - 1) > 1)
006301dd                                                  {
006301e1                                                      void* i_2 = &edi_54[1];
0063022d                                                      void* edi_56;
0063022d                                                      
0063022d                                                      do
0063022d                                                      {
00630200                                                          eax_95 += 2;
00630206                                                          int32_t ebx_45 = (((int32_t)*(uint16_t*)i_2) * 3);
00630209                                                          edi_56 = ((char*)edx_73 + eax_95);
00630218                                                          *(uint8_t*)edi_56 = ((int8_t)(((((int32_t)*(uint16_t*)((char*)i_2 - 2)) + ebx_45) + 1) >> 2));
00630225                                                          *(uint8_t*)((char*)edi_56 + 1) = ((int8_t)(((((int32_t)*(uint16_t*)((char*)i_2 + 2)) + ebx_45) + 2) >> 2));
00630228                                                          i_2 += 2;
0063022d                                                      } while (i_2 < &edi_54[(ebp_27 - 1)]);
0063022d                                                      
0063022f                                                      var_3c_6 = edi_56;
00630244                                                      ebp_27 = arg6;
006301dd                                                  }
006301dd                                                  
0063025e                                                  int32_t edi_57 = (((int32_t)*(uint16_t*)((ecx_53 + eax_85) - 2)) * 3);
00630274                                                  *(uint8_t*)((char*)var_3c_6 + 2) = ((int8_t)(((((int32_t)*(uint16_t*)((ecx_53 + eax_85) - 4)) + edi_57) + 1) >> 2));
00630289                                                  *(uint8_t*)((char*)var_3c_6 + 3) = ((int8_t)(((((int32_t)*(uint16_t*)((char*)esi_44 + eax_85)) + edi_57) + 2) >> 2));
0063003a                                              }
0063003a                                              else
0063003a                                              {
00630040                                                  int32_t i_3 = 0;
00630040                                                  
00630044                                                  if (ebp_27 > 0)
00630044                                                  {
0063004d                                                      int32_t edx_75;
0063004d                                                      int32_t esi_47;
0063004d                                                      void* edi_53;
0063004d                                                      
0063004d                                                      if (ebp_27 < 6)
0063004d                                                      {
006302a7                                                          edi_53 = ((char*)edx_73 + (esi_45 << 1));
006302b1                                                          esi_47 = (ebp_26 + ecx_54);
0063004d                                                      }
0063004d                                                      else
0063004d                                                      {
00630067                                                          int32_t var_7c_2 = ecx_54;
0063006e                                                          int32_t var_78_4 = ebx_44;
00630075                                                          esi_47 = (ebp_26 + ecx_54);
00630079                                                          edi_53 = ((char*)edx_73 + (esi_45 << 1));
00630079                                                          
006300b2                                                          do
006300b2                                                          {
00630080                                                              edx_75 = *(uint8_t*)(esi_47 + (i_3 << 1));
0063008a                                                              *(uint8_t*)((char*)edi_53 + i_3) = edx_75;
0063008d                                                              edx_75 = *(uint8_t*)((esi_47 + (i_3 << 1)) + 2);
00630091                                                              *(uint8_t*)(((char*)edi_53 + i_3) + 1) = edx_75;
00630095                                                              ebx_44 = *(uint8_t*)((esi_47 + (i_3 << 1)) + 4);
00630099                                                              *(uint8_t*)(((char*)edi_53 + i_3) + 2) = ebx_44;
0063009d                                                              ecx_54 = *(uint8_t*)((esi_47 + (i_3 << 1)) + 6);
006300a1                                                              *(uint8_t*)(((char*)edi_53 + i_3) + 3) = ecx_54;
006300a5                                                              edx_75 = *(uint8_t*)((esi_47 + (i_3 << 1)) + 8);
006300a9                                                              *(uint8_t*)(((char*)edi_53 + i_3) + 4) = edx_75;
006300ad                                                              i_3 += 5;
006300b2                                                          } while (i_3 <= (arg6 - 6));
006300b2                                                          
006300b4                                                          ecx_54 = var_7c_2;
006300bb                                                          ebx_44 = var_78_4;
006300c2                                                          ebp_27 = arg6;
0063004d                                                      }
0063004d                                                      
006300d9                                                      do
006300d9                                                      {
006300d0                                                          edx_75 = *(uint8_t*)(esi_47 + (i_3 << 1));
006300d3                                                          *(uint8_t*)((char*)edi_53 + i_3) = edx_75;
006300d6                                                          i_3 += 1;
006300d9                                                      } while (i_3 < ebp_27);
00630044                                                  }
0063003a                                              }
0063003a                                              
006300e2                                              ecx_54 += 0x10;
006300e5                                              ebx_44 += 8;
006300f1                                          } while (ebx_44 < edx_72);
0062ffd4                                      }
0062ffd4                                      
0063011a                                      edx_73 += (temp0_3 * arg6);
00630121                                      ebp_26 += 0x80;
00630127                                      esi_44 += 0x80;
0063012d                                      edi_50 += 0x80;
00630133                                      eax_81 += 1;
0063013d                                  } while (eax_81 < esi_18);
0063013d                                  
00630143                                  var_4c_1 = ebp_26;
00630151                                  ebx_17 = *(uint32_t*)((char*)arg1 + 0x34);
00630154                                  var_48_1 = esi_44;
0063015b                                  var_44_1 = edi_50;
0062ff64                              }
0062ff3a                          }
0062ff3a                          else
0062ff3a                          {
0062f3ab                              int32_t edx_33 = 0;
0062f3ab                              
0062f3af                              if (ebp_10 > 0)
0062f3af                              {
0062f3c1                                  int32_t eax_43 = (temp0_4 << 5);
0062f3df                                  int32_t ecx_24 = 0;
0062f3df                                  
0062f637                                  do
0062f637                                  {
0062f3f4                                      void* edi_18 = (&var_594 + ecx_24);
0062f3f6                                      int32_t eax_44 = 0;
0062f3f6                                      
0062f3fa                                      if (esi_18 > 0)
0062f3fa                                      {
0062f415                                          int32_t ebx_20 = eax_43;
0062f423                                          int32_t ebp_11 = arg6;
0062f431                                          int32_t esi_19 = var_4c_1;
0062f431                                          
0062f602                                          do
0062f602                                          {
0062f438                                              int32_t ecx_25 = 0;
0062f438                                              
0062f43c                                              if (ebp_11 > 0)
0062f43c                                              {
0062f444                                                  int32_t edx_34 = 0;
0062f44e                                                  int32_t eax_45 = temp0_3;
0062f44e                                                  
0062f5d0                                                  do
0062f5d0                                                  {
0062f463                                                      int32_t edi_19 = 0;
0062f463                                                      
0062f467                                                      if (ebp_11 > 0)
0062f467                                                      {
0062f480                                                          int32_t esi_22 = 0;
0062f480                                                          
0062f5b7                                                          do
0062f5b7                                                          {
0062f491                                                              void* edx_35 = nullptr;
0062f491                                                              
0062f495                                                              if (ebx_20 > 0)
0062f495                                                              {
0062f4a2                                                                  void* ecx_27 = (((char*)edi_18 + edx_34) + esi_22);
0062f4a2                                                                  
0062f597                                                                  do
0062f597                                                                  {
0062f4ba                                                                      int32_t i_15 = 0;
0062f4ba                                                                      
0062f4be                                                                      if (eax_45 > 0)
0062f4be                                                                      {
0062f4c7                                                                          char* ebp_14;
0062f4c7                                                                          char* esi_27;
0062f4c7                                                                          
0062f4c7                                                                          if (eax_45 < 5)
0062f4c7                                                                          {
0062fef9                                                                              esi_27 = (((ecx_25 << 4) + esi_19) + (edi_19 << 1));
0062ff03                                                                              ebp_14 = ((char*)edx_35 + ecx_27);
0062f4c7                                                                          }
0062f4c7                                                                          else
0062f4c7                                                                          {
0062f4d7                                                                              int32_t edi_22 = ((ecx_25 << 4) + esi_19);
0062f4f2                                                                              int32_t i_12 = 0;
0062f4f9                                                                              char* var_74_2 = ((char*)edx_35 + ecx_27);
0062f507                                                                              void* var_40_3 = edx_35;
0062f558                                                                              int32_t i_4;
0062f558                                                                              
0062f558                                                                              do
0062f558                                                                              {
0062f517                                                                                  edx_35 = *(uint8_t*)(edi_22 + (edi_19 << 1));
0062f51a                                                                                  ebp_14 = var_74_2;
0062f52a                                                                                  ebp_14[i_12] = edx_35;
0062f52e                                                                                  ebx_20 = *(uint8_t*)(edi_22 + (edi_19 << 1));
0062f531                                                                                  ebp_14[(i_12 + 1)] = ebx_20;
0062f535                                                                                  int32_t eax_46;
0062f535                                                                                  eax_46 = *(uint8_t*)(edi_22 + (edi_19 << 1));
0062f538                                                                                  ebp_14[(i_12 + 2)] = eax_46;
0062f53e                                                                                  int32_t eax_47;
0062f53e                                                                                  eax_47 = *(uint8_t*)(edi_22 + (edi_19 << 1));
0062f541                                                                                  ebp_14[(i_12 + 3)] = eax_47;
0062f545                                                                                  i_4 = (i_12 + 4);
0062f54f                                                                                  i_12 = i_4;
0062f558                                                                              } while (i_4 <= (temp0_3 - 5));
0062f558                                                                              
0062f55a                                                                              eax_45 = temp0_3;
0062f561                                                                              ebx_20 = eax_43;
0062f568                                                                              i_15 = i_4;
0062f56a                                                                              esi_27 = (edi_22 + (edi_19 << 1));
0062f571                                                                              edx_35 = var_40_3;
0062f4c7                                                                          }
0062f4c7                                                                          
0062f578                                                                          void* var_40_4 = edx_35;
0062f578                                                                          
0062f589                                                                          do
0062f589                                                                          {
0062f580                                                                              edx_35 = *(uint8_t*)esi_27;
0062f582                                                                              ebp_14[i_15] = edx_35;
0062f586                                                                              i_15 += 1;
0062f589                                                                          } while (i_15 < eax_45);
0062f589                                                                          
0062f58b                                                                          edx_35 = var_40_4;
0062f4be                                                                      }
0062f4be                                                                      
0062f592                                                                      edx_35 += 0x20;
0062f597                                                                  } while (edx_35 < ebx_20);
0062f597                                                                  
0062f5ab                                                                  ebp_11 = arg6;
0062f495                                                              }
0062f495                                                              
0062f5b2                                                              esi_22 += eax_45;
0062f5b4                                                              edi_19 += 1;
0062f5b7                                                          } while (edi_19 < ebp_11);
0062f467                                                      }
0062f467                                                      
0062f5cb                                                      edx_34 += ebx_20;
0062f5cd                                                      ecx_25 += 1;
0062f5d0                                                  } while (ecx_25 < ebp_11);
0062f43c                                              }
0062f43c                                              
0062f5eb                                              edi_18 += (temp0_3 * arg6);
0062f5f2                                              esi_19 += 0x80;
0062f5f8                                              eax_44 += 1;
0062f602                                          } while (eax_44 < esi_18);
0062f602                                          
0062f608                                          var_4c_1 = esi_19;
0062f3fa                                      }
0062f3fa                                      
0062f632                                      ecx_24 += (ecx_16 * temp0_4);
0062f634                                      edx_33 += 1;
0062f637                                  } while (edx_33 < ebp_10);
0062f637                                  
0062f644                                  ebx_17 = *(uint32_t*)((char*)arg1 + 0x34);
0062f3af                              }
0062ff3a                          }
0062ff3a                          
0062f86b                          ebp_9 = &var_594;
0062f872                          int32_t eax_105;
0062f872                          
0062f872                          if (ebx_17 == 3)
00630307                              eax_105 = *(uint32_t*)((char*)arg2 + 0x38);
00630307                          
0063030c                          if ((ebx_17 != 3 || eax_105 == 0))
0063030c                          {
0062f8a7                              sub_632140(arg1, &var_94, i_18, var_50_3, &var_594);
0062f8b3                              ebx_17 = *(uint32_t*)((char*)arg1 + 0x34);
0063030c                          }
0063030c                          else
0063030c                          {
00630315                              if (eax_105 == 2)
00630317                                  var_50_3 += 1;
00630317                              
0063031e                              int32_t ecx_60 = var_90;
00630325                              int32_t edx_84 = var_88;
00630325                              
0063032e                              if (ecx_60 < edx_84)
0063032e                              {
00630334                                  int32_t ebx_48 = var_8c;
0063033d                                  int32_t esi_55 = (ecx_60 << 5);
0063033d                                  
006303a7                                  do
006303a7                                  {
00630340                                      int32_t eax_106 = var_94;
00630340                                      
00630349                                      if (eax_106 < ebx_48)
00630349                                      {
0063038a                                          do
0063038a                                          {
00630370                                              ebx_48 = *(uint8_t*)(((char*)ebp_9 + esi_55) + eax_106);
0063037b                                              *(uint8_t*)(((ecx_60 * *(uint32_t*)((char*)arg1 + 0x3c)) + var_50_3) + (eax_106 << 1)) = ebx_48;
0063037e                                              eax_106 += 2;
00630381                                              ebx_48 = var_8c;
0063038a                                          } while (eax_106 < ebx_48);
0063038a                                          
0063039a                                          edx_84 = var_88;
00630349                                      }
00630349                                      
006303a1                                      esi_55 += 0x20;
006303a4                                      ecx_60 += 1;
006303a7                                  } while (ecx_60 < edx_84);
006303a7                                  
006303b0                                  ebx_17 = *(uint32_t*)((char*)arg1 + 0x34);
0063032e                              }
0063030c                          }
0063030c                          
006302cd                          if ((ebx_17 == 2 && *(uint32_t*)((char*)arg1 + 0x58) == 1))
006302cd                          {
006302d3                              var_50_3 -= 1;
006302e1                              i_21 = *(uint32_t*)arg3;
006302ea                              i_19 = *(uint32_t*)((char*)arg1 + 0x30);
006302cd                          }
006302cd                          else
006302cd                          {
0062f8bf                              var_50_3 += 1;
0062f8cd                              i_21 = *(uint32_t*)arg3;
0062f8d6                              i_19 = *(uint32_t*)((char*)arg1 + 0x30);
006302cd                          }
006303f9                      }
006303f9                      
0062f8d9                      var_58_3 += 0x18;
0062f8e1                      i_18 += 1;
0062f308                  }
0062f308                  
00630417                  void* i_17 = i_18;
00630420                  result = *(uint32_t*)((char*)arg1 + 0x74);
00630420                  
00630425                  if (result != 0)
00630425                  {
00630427                      i_17 = *(uint32_t*)((char*)arg1 + 0x54);
0063042a                      result = ((char*)i_17 - 1);
0063042a                      
00630437                      if (result != *(uint32_t*)((char*)arg2 + 0x38))
00630439                          i_17 = i_19;
00630425                  }
00630425                  
00630441                  if (ebx_17 == 0xff)
006304b0                      result = *(uint32_t*)((char*)arg1 + 0x58);
006304b0                  
00630449                  if (((ebx_17 != 0xff || result != 0xff) && i_17 < i_19))
00630449                  {
0063044f                      int32_t ebx_49 = var_50_3;
0063045d                      void* i_5 = i_17;
0063045d                      
0063048c                      do
0063048c                      {
0063047a                          sub_632140(arg1, &var_94, i_5, ebx_49, ebp_9);
0063047f                          result = *(uint32_t*)((char*)arg1 + 0x34);
0063047f                          
00630485                          if (result == 2)
00630485                          {
006304a0                              result = *(uint32_t*)((char*)arg1 + 0x58);
006304a0                              
006304a6                              if (result != 1)
00630487                                  ebx_49 += 1;
006304a6                              else
006304a8                                  ebx_49 -= 1;
00630485                          }
00630485                          else
00630487                              ebx_49 += 1;
00630487                          
00630488                          i_5 += 1;
0063048c                      } while (i_5 < *(uint32_t*)((char*)arg1 + 0x30));
00630449                  }
0062ec40              }
0062ec40              else
0062ec40              {
0062ec4d                  int32_t edi_2 = *(uint32_t*)((char*)arg2 + 0x2c);
0062ec50                  int32_t ebx_2 = *(uint32_t*)((char*)ebp + 0x34);
0062ec50                  
0062feb6                  if ((ebx_2 == 2 && *(uint32_t*)((char*)ebp + 0x58) == 1))
0062feb6                  {
0062fec3                      int32_t eax_80 = *(uint32_t*)((char*)arg2 + 0x38);
0062fec3                      
0062fec8                      if (eax_80 == 0)
0062feca                          edi_2 += 2;
0062fec8                      else if (eax_80 == 1)
0062fedb                          edi_2 += 1;
0062feb6                  }
0062feb6                  
0062ec65                  int32_t eax_11 = (arg6 << 5);
0062ec6a                  void* ebp_1 = var_34;
0062ec71                  int32_t var_84_1 = 0;
0062ec7f                  int32_t i_11 = 0;
0062ec86                  int32_t var_78_1 = edi_2;
0062ec86                  
0062ec90                  while (true)
0062ec90                  {
0062ec90                      if (ebx_2 == 3)
0062fe9c                          result = 3;
0062ec90                      else
0062ec90                      {
0062ec9d                          result = *(uint32_t*)arg3;
0062eca6                          void* result_1 = *(uint32_t*)((char*)arg1 + 0x30);
0062eca6                          
0062ecab                          if (result >= result_1)
0062ecad                              result = result_1;
0062ec90                      }
0062ec90                      
0062ecb8                      if (i_11 >= result)
0062ecb8                          break;
0062ecb8                      
0062fdf9                      if ((*(uint32_t*)((char*)arg1 + 0x58) != 4 || i_11 <= 0))
0062fdf9                      {
0062ecd8                          void* eax_14 = arg3[0xd];
0062ecde                          int32_t ebp_2;
0062ecde                          int32_t esi_3;
0062ecde                          
0062ecde                          if (*(uint32_t*)arg3 == 1)
0062ecde                          {
0062fde0                              ebp_2 = *(uint32_t*)((char*)eax_14 + 8);
0062fde3                              esi_3 = *(uint32_t*)((char*)eax_14 + 4);
0062ecde                          }
0062ecde                          else
0062ecde                          {
0062eceb                              ebp_2 = *(uint32_t*)((var_84_1 + eax_14) + 8);
0062ecef                              esi_3 = *(uint32_t*)((var_84_1 + eax_14) + 4);
0062ecde                          }
0062ecde                          
0062ecfa                          int32_t eax_15 = *(uint32_t*)((char*)arg1 + 0x37b8);
0062ed08                          int32_t temp0_1 = (((int64_t)eax_15) / esi_3);
0062ed13                          int32_t eax_18 = *(uint32_t*)((char*)arg1 + 0x37bc);
0062ed19                          void* ecx_4;
0062ed19                          ecx_4 = arg8;
0062ed28                          int32_t temp0_2 = (((int64_t)eax_18) / ebp_2);
0062ed28                          
0062ed2c                          if (ecx_4 != 0)
0062ed2c                          {
0062f010                              int32_t edx_19 = 0;
0062f010                              
0062f014                              if (ebp_2 > 0)
0062f014                              {
0062f02b                                  int32_t eax_29 = (temp0_2 * arg6);
0062f02e                                  int32_t edi_11 = (temp0_1 * arg6);
0062f03d                                  int32_t ecx_13 = 0;
0062f03d                                  
0062f22c                                  do
0062f22c                                  {
0062f052                                      void* edi_12 = (&var_594 + ecx_13);
0062f054                                      int32_t eax_30 = 0;
0062f054                                      
0062f058                                      if (esi_3 > 0)
0062f058                                      {
0062f073                                          int32_t ebx_15 = edi_11;
0062f081                                          int32_t ebp_5 = eax_29;
0062f08f                                          int32_t esi_11 = var_4c_1;
0062f08f                                          
0062f1f7                                          do
0062f1f7                                          {
0062f096                                              int32_t ecx_14 = 0;
0062f096                                              
0062f09a                                              if (ebp_5 > 0)
0062f09a                                              {
0062f0ae                                                  int32_t edx_20 = 0;
0062f0c6                                                  int32_t esi_12 = 0;
0062f0c6                                                  
0062f1ca                                                  do
0062f1ca                                                  {
0062f0cd                                                      int32_t i_6 = 0;
0062f0cd                                                      
0062f0d1                                                      if (ebx_15 > 0)
0062f0d1                                                      {
0062f0da                                                          void* var_5c_3;
0062f0da                                                          int32_t var_20_2;
0062f0da                                                          
0062f0da                                                          if (ebx_15 < 6)
0062f0da                                                          {
0062fdba                                                              var_5c_3 = ((char*)edi_12 + esi_12);
0062fdcb                                                              var_20_2 = (esi_11 + edx_20);
0062f0da                                                          }
0062f0da                                                          else
0062f0da                                                          {
0062f0ea                                                              var_5c_3 = ((char*)edi_12 + esi_12);
0062f0f8                                                              int32_t edi_16 = (esi_11 + edx_20);
0062f0fb                                                              var_20_2 = edi_16;
0062f112                                                              int32_t var_24_3 = ecx_14;
0062f112                                                              
0062f15a                                                              do
0062f15a                                                              {
0062f120                                                                  ecx_14 = *(uint8_t*)(edi_16 + (i_6 << 1));
0062f131                                                                  *(uint8_t*)((char*)var_5c_3 + i_6) = ecx_14;
0062f135                                                                  ebx_15 = *(uint8_t*)((edi_16 + (i_6 << 1)) + 2);
0062f139                                                                  *(uint8_t*)(((char*)var_5c_3 + i_6) + 1) = ebx_15;
0062f13d                                                                  ecx_14 = *(uint8_t*)((edi_16 + (i_6 << 1)) + 4);
0062f141                                                                  *(uint8_t*)(((char*)var_5c_3 + i_6) + 2) = ecx_14;
0062f145                                                                  ecx_14 = *(uint8_t*)((edi_16 + (i_6 << 1)) + 6);
0062f149                                                                  *(uint8_t*)(((char*)var_5c_3 + i_6) + 3) = ecx_14;
0062f14d                                                                  ecx_14 = *(uint8_t*)((edi_16 + (i_6 << 1)) + 8);
0062f151                                                                  *(uint8_t*)(((char*)var_5c_3 + i_6) + 4) = ecx_14;
0062f155                                                                  i_6 += 5;
0062f15a                                                              } while (i_6 <= (edi_11 - 6));
0062f15a                                                              
0062f16a                                                              ecx_14 = var_24_3;
0062f171                                                              ebx_15 = edi_11;
0062f0da                                                          }
0062f0da                                                          
0062f194                                                          int32_t var_24_4 = ecx_14;
0062f194                                                          
0062f1aa                                                          do
0062f1aa                                                          {
0062f1a0                                                              ecx_14 = *(uint8_t*)(var_20_2 + (i_6 << 1));
0062f1a3                                                              *(uint8_t*)((char*)var_5c_3 + i_6) = ecx_14;
0062f1a7                                                              i_6 += 1;
0062f1aa                                                          } while (i_6 < ebx_15);
0062f1aa                                                          
0062f1b3                                                          ecx_14 = var_24_4;
0062f1ba                                                          ebp_5 = eax_29;
0062f0d1                                                      }
0062f0d1                                                      
0062f1c1                                                      esi_12 += 0x20;
0062f1c4                                                      edx_20 += 0x10;
0062f1c7                                                      ecx_14 += 1;
0062f1ca                                                  } while (ecx_14 < ebp_5);
0062f09a                                              }
0062f09a                                              
0062f1e5                                              edi_12 += ebx_15;
0062f1e7                                              esi_11 += 0x80;
0062f1ed                                              eax_30 += 1;
0062f1f7                                          } while (eax_30 < esi_3);
0062f1f7                                          
0062f1fd                                          var_4c_1 = esi_11;
0062f058                                      }
0062f058                                      
0062f227                                      ecx_13 += (eax_11 * temp0_2);
0062f229                                      edx_19 += 1;
0062f22c                                  } while (edx_19 < ebp_2);
0062f22c                                  
0062f239                                  ebx_2 = *(uint32_t*)((char*)arg1 + 0x34);
0062f014                              }
0062ed2c                          }
0062ed2c                          else if ((((*(uint32_t*)((char*)arg1 + 0x4de8) == 1 && eax_15 == 2) && eax_18 == 1) && arg6 != 1))
0062f94a                          {
0062f95c                              int32_t edx_48 = (arg6 * 8);
0062f95c                              
0062f974                              if (esi_3 > 0)
0062f974                              {
0062f98c                                  int32_t eax_57 = 0;
0062f99a                                  int32_t ecx_37 = var_4c_1;
0062f9b6                                  void* edx_49 = &var_594;
0062f9c4                                  int32_t edi_31 = var_44_1;
0062f9d2                                  void* esi_32 = var_48_1;
0062f9d2                                  
0062fb4d                                  do
0062fb4d                                  {
0062f9d9                                      int32_t ebp_18 = 0;
0062f9d9                                      
0062f9e4                                      if (edx_48 > 0)
0062f9e4                                      {
0062fa02                                          int32_t ebx_32 = (ecx_37 + (arg6 << 1));
0062fa0c                                          int32_t ebx_33 = 0;
0062fa33                                          int32_t esi_33 = arg6;
0062fa33                                          
0062fb01                                          do
0062fb01                                          {
0062fa3a                                              int32_t eax_58 = (ebp_18 * 2);
0062fa3a                                              
0062fa4b                                              if (temp0_1 == 2)
0062fa4b                                              {
0062fb87                                                  int32_t edx_51 = (ebp_18 * 2);
0062fba0                                                  int16_t* edi_35 = (ecx_37 + (ebp_18 << 1));
0062fba3                                                  int16_t* var_3c_5 = edi_35;
0062fbad                                                  int32_t edx_54 = (((int32_t)*(uint16_t*)edi_35) * 3);
0062fbb0                                                  void* ecx_42 = ((char*)edx_49 + (eax_58 << 1));
0062fbbf                                                  void* var_38_6 = ecx_42;
0062fbcd                                                  *(uint8_t*)ecx_42 = ((int8_t)(((((int32_t)*(uint16_t*)(((edi_31 + (arg6 << 1)) + (ebp_18 << 1)) - 2)) + edx_54) + 1) >> 2));
0062fbe4                                                  *(uint8_t*)((char*)ecx_42 + 1) = ((int8_t)(((((int32_t)edi_35[1]) + edx_54) + 1) >> 2));
0062fbe7                                                  int32_t ecx_43 = (eax_58 * 2);
0062fbe7                                                  
0062fbee                                                  if ((arg6 - 1) > 1)
0062fbee                                                  {
0062fbf2                                                      void* i_7 = &edi_35[1];
0062fc3d                                                      void* esi_37;
0062fc3d                                                      
0062fc3d                                                      do
0062fc3d                                                      {
0062fc10                                                          ecx_43 += 2;
0062fc16                                                          int32_t edi_36 = (((int32_t)*(uint16_t*)i_7) * 3);
0062fc19                                                          esi_37 = ((char*)edx_49 + ecx_43);
0062fc28                                                          *(uint8_t*)esi_37 = ((int8_t)(((((int32_t)*(uint16_t*)((char*)i_7 - 2)) + edi_36) + 1) >> 2));
0062fc35                                                          *(uint8_t*)((char*)esi_37 + 1) = ((int8_t)(((((int32_t)*(uint16_t*)((char*)i_7 + 2)) + edi_36) + 2) >> 2));
0062fc38                                                          i_7 += 2;
0062fc3d                                                      } while (i_7 < &edi_35[(esi_33 - 1)]);
0062fc3d                                                      
0062fc3f                                                      var_38_6 = esi_37;
0062fc54                                                      esi_33 = arg6;
0062fbee                                                  }
0062fbee                                                  
0062fc6e                                                  int32_t edx_60 = (((int32_t)*(uint16_t*)((ebx_32 + edx_51) - 2)) * 3);
0062fc84                                                  *(uint8_t*)((char*)var_38_6 + 2) = ((int8_t)(((((int32_t)*(uint16_t*)((ebx_32 + edx_51) - 4)) + edx_60) + 2) >> 2));
0062fc99                                                  *(uint8_t*)((char*)var_38_6 + 3) = ((int8_t)(((((int32_t)*(uint16_t*)((char*)esi_32 + edx_51)) + edx_60) + 2) >> 2));
0062fa4b                                              }
0062fa4b                                              else
0062fa4b                                              {
0062fa51                                                  int32_t i_8 = 0;
0062fa51                                                  
0062fa55                                                  if (esi_33 > 0)
0062fa55                                                  {
0062fa5e                                                      int32_t ecx_40;
0062fa5e                                                      void* edi_34;
0062fa5e                                                      
0062fa5e                                                      if (esi_33 < 6)
0062fa5e                                                      {
0062fcb7                                                          ecx_40 = (ecx_37 + ebx_33);
0062fcc1                                                          edi_34 = ((char*)edx_49 + (eax_58 << 1));
0062fa5e                                                      }
0062fa5e                                                      else
0062fa5e                                                      {
0062fa6b                                                          ecx_40 = (ecx_37 + ebx_33);
0062fa78                                                          int32_t var_2c_4 = ebx_33;
0062fa89                                                          edi_34 = ((char*)edx_49 + (eax_58 << 1));
0062fa89                                                          
0062fac2                                                          do
0062fac2                                                          {
0062fa90                                                              eax_58 = *(uint8_t*)(ecx_40 + (i_8 << 1));
0062fa9a                                                              *(uint8_t*)((char*)edi_34 + i_8) = eax_58;
0062fa9d                                                              ebx_33 = *(uint8_t*)((ecx_40 + (i_8 << 1)) + 2);
0062faa1                                                              *(uint8_t*)(((char*)edi_34 + i_8) + 1) = ebx_33;
0062faa5                                                              eax_58 = *(uint8_t*)((ecx_40 + (i_8 << 1)) + 4);
0062faa9                                                              *(uint8_t*)(((char*)edi_34 + i_8) + 2) = eax_58;
0062faad                                                              eax_58 = *(uint8_t*)((ecx_40 + (i_8 << 1)) + 6);
0062fab1                                                              *(uint8_t*)(((char*)edi_34 + i_8) + 3) = eax_58;
0062fab5                                                              eax_58 = *(uint8_t*)((ecx_40 + (i_8 << 1)) + 8);
0062fab9                                                              *(uint8_t*)(((char*)edi_34 + i_8) + 4) = eax_58;
0062fabd                                                              i_8 += 5;
0062fac2                                                          } while (i_8 <= (arg6 - 6));
0062fac2                                                          
0062fac4                                                          ebx_33 = var_2c_4;
0062fad2                                                          esi_33 = arg6;
0062fa5e                                                      }
0062fa5e                                                      
0062fae9                                                      do
0062fae9                                                      {
0062fae0                                                          eax_58 = *(uint8_t*)(ecx_40 + (i_8 << 1));
0062fae3                                                          *(uint8_t*)((char*)edi_34 + i_8) = eax_58;
0062fae6                                                          i_8 += 1;
0062fae9                                                      } while (i_8 < esi_33);
0062fa55                                                  }
0062fa4b                                              }
0062fa4b                                              
0062faf2                                              ebx_33 += 0x10;
0062faf5                                              ebp_18 += 8;
0062fb01                                          } while (ebp_18 < edx_48);
0062f9e4                                      }
0062f9e4                                      
0062fb2a                                      edx_49 += (temp0_1 * arg6);
0062fb31                                      ecx_37 += 0x80;
0062fb37                                      esi_32 += 0x80;
0062fb3d                                      edi_31 += 0x80;
0062fb43                                      eax_57 += 1;
0062fb4d                                  } while (eax_57 < esi_3);
0062fb4d                                  
0062fb53                                  var_4c_1 = ecx_37;
0062fb61                                  ebx_2 = *(uint32_t*)((char*)arg1 + 0x34);
0062fb64                                  var_48_1 = esi_32;
0062fb6b                                  var_44_1 = edi_31;
0062f974                              }
0062f94a                          }
0062f94a                          else
0062f94a                          {
0062ed48                              int32_t ecx_6 = 0;
0062ed48                              
0062ed4c                              if (ebp_2 > 0)
0062ed4c                              {
0062ed5e                                  int32_t eax_21 = (temp0_2 << 5);
0062ed7f                                  int32_t var_24_1 = 0;
0062ed94                                  int32_t edi_4 = 0;
0062ed94                                  
0062eff6                                  do
0062eff6                                  {
0062ed9a                                      void* ebx_6 = (&var_594 + edi_4);
0062ed9c                                      int32_t eax_22 = 0;
0062ed9c                                      
0062eda0                                      if (esi_3 > 0)
0062eda0                                      {
0062edad                                          int32_t edi_5 = var_4c_1;
0062edc9                                          int32_t ebp_3 = eax_21;
0062edd7                                          int32_t esi_4 = arg6;
0062edd7                                          
0062efc1                                          do
0062efc1                                          {
0062edde                                              int32_t ecx_7 = 0;
0062edde                                              
0062ede2                                              if (esi_4 > 0)
0062ede2                                              {
0062edea                                                  int32_t edx_16 = 0;
0062edf4                                                  int32_t eax_23 = temp0_1;
0062edf4                                                  
0062ef8f                                                  do
0062ef8f                                                  {
0062ee09                                                      int32_t edi_6 = 0;
0062ee09                                                      
0062ee0d                                                      if (esi_4 > 0)
0062ee0d                                                      {
0062ee26                                                          int32_t ebx_9 = 0;
0062ee26                                                          
0062ef76                                                          do
0062ef76                                                          {
0062ee37                                                              void* edx_17 = nullptr;
0062ee37                                                              
0062ee3b                                                              if (ebp_3 > 0)
0062ee3b                                                              {
0062ee48                                                                  void* ecx_9 = (((char*)ebx_6 + edx_16) + ebx_9);
0062ee48                                                                  
0062ef56                                                                  do
0062ef56                                                                  {
0062ee60                                                                      int32_t i_14 = 0;
0062ee60                                                                      
0062ee64                                                                      if (eax_23 > 0)
0062ee64                                                                      {
0062ee6d                                                                          char* ebx_12;
0062ee6d                                                                          char* esi_9;
0062ee6d                                                                          
0062ee6d                                                                          if (eax_23 < 5)
0062ee6d                                                                          {
0062f908                                                                              esi_9 = (((ecx_7 << 4) + edi_5) + (edi_6 << 1));
0062f912                                                                              ebx_12 = ((char*)edx_17 + ecx_9);
0062ee6d                                                                          }
0062ee6d                                                                          else
0062ee6d                                                                          {
0062ee7d                                                                              int32_t edi_9 = ((ecx_7 << 4) + edi_5);
0062ee98                                                                              int32_t i_13 = 0;
0062ee9f                                                                              char* var_40_1 = ((char*)edx_17 + ecx_9);
0062eead                                                                              void* var_5c_1 = edx_17;
0062ef0f                                                                              int32_t i_9;
0062ef0f                                                                              
0062ef0f                                                                              do
0062ef0f                                                                              {
0062eec7                                                                                  int32_t eax_24;
0062eec7                                                                                  eax_24 = *(uint8_t*)(edi_9 + (edi_6 << 1));
0062eedf                                                                                  var_40_1[i_13] = eax_24;
0062eee5                                                                                  int32_t eax_25;
0062eee5                                                                                  eax_25 = *(uint8_t*)(edi_9 + (edi_6 << 1));
0062eee8                                                                                  var_40_1[(i_13 + 1)] = eax_25;
0062eeee                                                                                  void* ebx_11;
0062eeee                                                                                  ebx_11 = *(uint8_t*)(edi_9 + (edi_6 << 1));
0062eef1                                                                                  var_40_1[(i_13 + 2)] = ebx_11;
0062eef5                                                                                  edx_17 = *(uint8_t*)(edi_9 + (edi_6 << 1));
0062eeff                                                                                  var_40_1[(i_13 + 3)] = edx_17;
0062ef03                                                                                  i_9 = (i_13 + 4);
0062ef08                                                                                  i_13 = i_9;
0062ef0f                                                                              } while (i_9 <= (temp0_1 - 5));
0062ef0f                                                                              
0062ef11                                                                              eax_23 = temp0_1;
0062ef18                                                                              ebp_3 = eax_21;
0062ef1f                                                                              i_14 = i_9;
0062ef21                                                                              ebx_12 = var_40_1;
0062ef28                                                                              esi_9 = (edi_9 + (edi_6 << 1));
0062ef2f                                                                              edx_17 = var_5c_1;
0062ee6d                                                                          }
0062ee6d                                                                          
0062ef36                                                                          void* var_5c_2 = edx_17;
0062ef36                                                                          
0062ef48                                                                          do
0062ef48                                                                          {
0062ef40                                                                              edx_17 = *(uint8_t*)esi_9;
0062ef42                                                                              ebx_12[i_14] = edx_17;
0062ef45                                                                              i_14 += 1;
0062ef48                                                                          } while (i_14 < eax_23);
0062ef48                                                                          
0062ef4a                                                                          edx_17 = var_5c_2;
0062ee64                                                                      }
0062ee64                                                                      
0062ef51                                                                      edx_17 += 0x20;
0062ef56                                                                  } while (edx_17 < ebp_3);
0062ef56                                                                  
0062ef6a                                                                  esi_4 = arg6;
0062ee3b                                                              }
0062ee3b                                                              
0062ef71                                                              ebx_9 += eax_23;
0062ef73                                                              edi_6 += 1;
0062ef76                                                          } while (edi_6 < esi_4);
0062ee0d                                                      }
0062ee0d                                                      
0062ef8a                                                      edx_16 += ebp_3;
0062ef8c                                                      ecx_7 += 1;
0062ef8f                                                  } while (ecx_7 < esi_4);
0062ede2                                              }
0062ede2                                              
0062efaa                                              ebx_6 += (temp0_1 * arg6);
0062efb1                                              edi_5 += 0x80;
0062efb7                                              eax_22 += 1;
0062efc1                                          } while (eax_22 < esi_3);
0062efc1                                          
0062efc7                                          var_4c_1 = edi_5;
0062eda0                                      }
0062eda0                                      
0062eff1                                      edi_4 += (eax_11 * temp0_2);
0062eff3                                      ecx_6 += 1;
0062eff6                                  } while (ecx_6 < ebp_2);
0062eff6                                  
0062f003                                  ebx_2 = *(uint32_t*)((char*)arg1 + 0x34);
0062ed4c                              }
0062f94a                          }
0062f94a                          
0062f23c                          ebp_1 = &var_594;
0062f23c                          
0062fcf9                          if ((ebx_2 == 3 && i_11 != 0))
0062fcf9                          {
0062fd02                              if (i_11 == 2)
0062fd04                                  var_78_1 += 1;
0062fd04                              
0062fd0b                              int32_t ecx_46 = var_90;
0062fd12                              int32_t edx_64 = var_88;
0062fd12                              
0062fd1b                              if (ecx_46 < edx_64)
0062fd1b                              {
0062fd21                                  int32_t ebx_41 = var_8c;
0062fd2a                                  int32_t esi_39 = (ecx_46 << 5);
0062fd2a                                  
0062fd97                                  do
0062fd97                                  {
0062fd2d                                      int32_t eax_75 = var_94;
0062fd2d                                      
0062fd36                                      if (eax_75 < ebx_41)
0062fd36                                      {
0062fd7a                                          do
0062fd7a                                          {
0062fd60                                              ebx_41 = *(uint8_t*)(((char*)ebp_1 + esi_39) + eax_75);
0062fd6b                                              *(uint8_t*)(((ecx_46 * *(uint32_t*)((char*)arg1 + 0x3c)) + var_78_1) + (eax_75 << 1)) = ebx_41;
0062fd6e                                              eax_75 += 2;
0062fd71                                              ebx_41 = var_8c;
0062fd7a                                          } while (eax_75 < ebx_41);
0062fd7a                                          
0062fd8a                                          edx_64 = var_88;
0062fd36                                      }
0062fd36                                      
0062fd91                                      esi_39 += 0x20;
0062fd94                                      ecx_46 += 1;
0062fd97                                  } while (ecx_46 < edx_64);
0062fd97                                  
0062fda0                                  ebx_2 = *(uint32_t*)((char*)arg1 + 0x34);
0062fd1b                              }
0062fcf9                          }
0062fcf9                          else
0062fcf9                          {
0062f278                              sub_632140(arg1, &var_94, i_11, var_78_1, &var_594);
0062f284                              ebx_2 = *(uint32_t*)((char*)arg1 + 0x34);
0062fcf9                          }
0062fcf9                          
0062fcdd                          if ((ebx_2 == 2 && *(uint32_t*)((char*)arg1 + 0x58) == 1))
0062fce3                              var_78_1 -= 1;
0062fcdd                          else
0062f290                              var_78_1 += 1;
0062fdf9                      }
0062fdf9                      
0062f297                      var_84_1 += 0x18;
0062f29f                      i_11 += 1;
0062ec90                  }
0062ec90                  
0062fe19                  int32_t edi_46 = var_78_1;
0062fe19                  
0062fe2d                  if (ebx_2 == 0xff)
0062fe90                      result = *(uint32_t*)((char*)arg1 + 0x58);
0062fe90                  
0062fe32                  if (((ebx_2 != 0xff || result != 0xff) && i_11 < *(uint32_t*)((char*)arg1 + 0x30)))
0062fe32                  {
0062fe3c                      int32_t i_10 = i_11;
0062fe3c                      
0062fe6c                      do
0062fe6c                      {
0062fe5a                          sub_632140(arg1, &var_94, i_10, edi_46, ebp_1);
0062fe5f                          result = *(uint32_t*)((char*)arg1 + 0x34);
0062fe5f                          
0062fe65                          if (result == 2)
0062fe65                          {
0062fe79                              result = *(uint32_t*)((char*)arg1 + 0x58);
0062fe79                              
0062fe7f                              if (result != 1)
0062fe67                                  edi_46 += 1;
0062fe7f                              else
0062fe81                                  edi_46 -= 1;
0062fe65                          }
0062fe65                          else
0062fe67                              edi_46 += 1;
0062fe67                          
0062fe68                          i_10 += 1;
0062fe6c                      } while (i_10 < *(uint32_t*)((char*)arg1 + 0x30));
0062fe32                  }
0062ec40              }
0062ec31          }
0062eb74      }
0062fe78      return result;
0062eb50  }

0062f00b                                   90 8d 74 26 00                                                             ..t&.
0062f2ab                                   90 8d 74 26 00                                                             ..t&.
0062f30e                                            8b f6                                                                ..
0062f64c                                      8d 74 26 00                                                              .t&.
0062f8ed                                         8d 76 00                                                               .v.
0062f91a                                                                                8d b6 00 00 00 00                            ......
0062fb77                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0062fca1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
0062fcc9                             8d b4 26 00 00 00 00                                                           ..&....
0062fcef                                               90                                                                 .
0062fda8                          90 8d b4 26 00 00 00 00                                                          ...&....
0062fdd7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0062fdeb                                   90 8d 74 26 00                                                             ..t&.
0062fe04              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0062fe84              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0062fea6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0062ff0b                                   90 8d 74 26 00                                                             ..t&.
00630167                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
00630291                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
006302b9                                                                             8d b4 26 00 00 00 00                           ..&....
006302f2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
006303b8                                                                          90 8d b4 26 00 00 00 00                          ...&....
006303eb                                   90 8d 74 26 00                                                             ..t&.
00630404              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
00630493                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
006304ab                                   90 8d 74 26 00                                                             ..t&.
00630626                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

00630630  void* sub_630630(void* arg1, void* arg2, int32_t arg3, int32_t arg4, int32_t arg5, char arg6)

00630630  {
0063063a      void* esi = arg1;
00630641      int32_t edi = arg5;
00630648      void* ebx = nullptr;
00630653      void* var_74;
00630653      int32_t var_6c_1;
00630653      int32_t eax_1;
00630653      int32_t edx;
00630653      
00630653      if (*(uint32_t*)((char*)esi + 0x4de8) == 1)
00630653      {
0063136c          edx = *(uint32_t*)((char*)esi + 0x37b8);
0063136c          
00631375          if (edx == 2)
00631375          {
00631382              eax_1 = *(uint32_t*)((char*)esi + 0x37bc);
00631382              
0063138b              if (eax_1 != 1)
0063138b              {
00630667                  var_6c_1 = 0;
00630670                  var_74 = nullptr;
0063138b              }
0063138b              else
0063138b              {
00631393                  int32_t var_74_2 = 0;
0063139a                  int32_t ecx_34 = *(uint32_t*)((char*)esi + 0x37c0);
006313a0                  int32_t i = (ecx_34 - 1);
006313a0                  
006313a5                  if (ecx_34 != 0)
006313a5                  {
006313a7                      int32_t ecx_35 = *(uint32_t*)((char*)esi + 0x37cc);
006313bd                      int32_t ecx_37 = (i << 4);
006313d5                      int32_t esi_19 = 0;
006313d5                      
006313f2                      do
006313f2                      {
006313e4                          i -= 1;
006313ea                          esi_19 += (*(uint32_t*)((ecx_37 + ecx_35) + 4) * *(uint32_t*)((ecx_37 + ecx_35) + 8));
006313ec                          ecx_37 -= 0x10;
006313f2                      } while (i != 0xffffffff);
006313f2                      
006313f4                      var_74_2 = esi_19;
00631402                      ebx = nullptr;
00631409                      edi = arg5;
00631410                      esi = arg1;
006313a5                  }
006313a5                  
0063144e                  int32_t ecx_44 = (((arg3 * 2) * (var_74_2 << 6)) + *(uint32_t*)(*(uint32_t*)((char*)esi + 0x4dec) + 4));
0063145b                  var_6c_1 = ecx_44;
00631464                  var_74 = ((var_74_2 << 8) + ecx_44);
0063138b              }
00631375          }
00631375          else
00631375          {
00631377              eax_1 = *(uint32_t*)((char*)esi + 0x37bc);
00630667              var_6c_1 = 0;
00630670              var_74 = nullptr;
00631375          }
00630653      }
00630653      else
00630653      {
00630659          edx = *(uint32_t*)((char*)esi + 0x37b8);
0063065f          eax_1 = *(uint32_t*)((char*)esi + 0x37bc);
00630667          var_6c_1 = 0;
00630670          var_74 = nullptr;
00630653      }
00630653      
00630683      int32_t var_70 = *(uint32_t*)((char*)esi + 0x4834);
006306ea      int32_t var_8c;
006306ea      void* result = sub_62e6a0(((char*)esi + 4), (edx * edi), (eax_1 * edi), arg3, arg4, *(uint32_t*)((char*)esi + 0x30), *(uint32_t*)((char*)esi + 0x3c), *(uint32_t*)((char*)esi + 0x20), *(uint32_t*)((char*)esi + 0x24), *(uint32_t*)((char*)esi + 0x28), ((char*)arg2 + 0x2c), &var_8c);
006306ea      
006306f1      if (result == 0)
006306f1      {
00630701          int32_t ebp_1 = *(uint32_t*)((char*)esi + 0x34);
00630704          int32_t var_24_1 = *(uint32_t*)((char*)arg2 + 0x2c);
00630704          
00631336          if ((ebp_1 == 2 && *(uint32_t*)((char*)esi + 0x58) == 1))
00631336          {
00631343              int32_t eax_56 = *(uint32_t*)((char*)arg2 + 0x38);
00631343              
00631348              if (eax_56 == 0)
0063134a                  var_24_1 += 2;
00631348              else if (eax_56 == 1)
00631360                  var_24_1 += 1;
00631336          }
00631336          
00630716          int32_t eax_11 = *(uint32_t*)((char*)esi + 0x37c0);
0063071e          int32_t ecx_5 = (edi << 5);
00630721          int32_t i_6 = 0;
00630732          int32_t i_5;
00630732          
00630732          while (true)
00630732          {
00630732              int32_t edx_4;
00630732              
00630732              if (ebp_1 == 3)
00631320                  edx_4 = 3;
00630732              else
00630738                  edx_4 = *(uint32_t*)((char*)esi + 0x30);
00630738              
0063073d              int32_t ecx_6;
0063073d              
0063073d              if (eax_11 < edx_4)
0063073f                  ecx_6 = eax_11;
0063073d              else if (ebp_1 == 3)
0063130c                  ecx_6 = 3;
00630753              else
00630759                  ecx_6 = *(uint32_t*)((char*)esi + 0x30);
00630759              
0063075c              i_5 = i_6;
0063075c              
00630765              if (i_5 >= ecx_6)
00630765                  break;
00630765              
00631259              if ((*(uint32_t*)((char*)esi + 0x58) != 4 || i_6 <= 0))
00631259              {
00630777                  int32_t eax_12 = *(uint32_t*)((char*)esi + 0x37b8);
0063078b                  int32_t ecx_8 = (i_6 << 4);
00630795                  void* ecx_9 = (ecx_8 + *(uint32_t*)((char*)esi + 0x37cc));
0063079b                  int32_t ebx_1 = *(uint32_t*)((char*)ecx_9 + 4);
006307a5                  int32_t var_5c_1 = ebx_1;
006307ad                  int32_t temp0_1 = (((int64_t)eax_12) / ebx_1);
006307b1                  int32_t eax_15 = *(uint32_t*)((char*)esi + 0x37bc);
006307b7                  int32_t ecx_10 = *(uint32_t*)((char*)ecx_9 + 8);
006307c1                  ebx_1 = arg6;
006307c9                  int32_t temp0_2 = (((int64_t)eax_15) / ecx_10);
006307cd                  void var_58c;
006307cd                  
006307cd                  if (ebx_1 != 0)
006307cd                  {
00630adb                      if (ecx_10 > 0)
00630adb                      {
00630af2                          int32_t eax_27 = (temp0_2 * arg5);
00630af5                          int32_t edi_9 = (temp0_1 * arg5);
00630b04                          int32_t ebp_10 = 0;
00630b13                          int32_t var_4c_2 = 0;
00630b21                          int32_t esi_5 = 0;
00630b2a                          int32_t eax_28 = var_5c_1;
00630b38                          void* edx_19 = ecx_9;
00630b38                          
00630ced                          do
00630ced                          {
00630b45                              int32_t ebx_10 = 0;
00630b45                              
00630b49                              if (eax_28 > 0)
00630b49                              {
00630b4f                                  void* var_48_3 = (&var_58c + esi_5);
00630b56                                  int32_t ecx_17 = edi_9;
00630b5d                                  int32_t edi_11 = eax_27;
00630b72                                  int32_t ebp_11 = var_70;
00630b72                                  
00630cc5                                  do
00630cc5                                  {
00630b79                                      int32_t esi_6 = 0;
00630b79                                      
00630b7d                                      if (edi_11 > 0)
00630b7d                                      {
00630b85                                          int32_t eax_29 = 0;
00630b8a                                          int32_t edx_20 = 0;
00630b8a                                          
00630c8a                                          do
00630c8a                                          {
00630b9b                                              int32_t i_1 = 0;
00630b9b                                              
00630b9f                                              if (ecx_17 > 0)
00630b9f                                              {
00630ba8                                                  void* var_64_3;
00630ba8                                                  int32_t ebp_15;
00630ba8                                                  
00630ba8                                                  if (ecx_17 < 6)
00630ba8                                                  {
0063122b                                                      var_64_3 = ((char*)var_48_3 + eax_29);
00631239                                                      ebp_15 = (ebp_11 + edx_20);
00630ba8                                                  }
00630ba8                                                  else
00630ba8                                                  {
00630bb9                                                      var_64_3 = ((char*)var_48_3 + eax_29);
00630bc7                                                      ebp_15 = (ebp_11 + edx_20);
00630bcb                                                      int32_t var_60_4 = edx_20;
00630bd2                                                      int32_t var_5c_3 = eax_29;
00630bd2                                                      
00630c1a                                                      do
00630c1a                                                      {
00630be0                                                          eax_29 = *(uint8_t*)(ebp_15 + (i_1 << 1));
00630bf2                                                          *(uint8_t*)((char*)var_64_3 + i_1) = eax_29;
00630bf5                                                          eax_29 = *(uint8_t*)((ebp_15 + (i_1 << 1)) + 2);
00630bf9                                                          *(uint8_t*)(((char*)var_64_3 + i_1) + 1) = eax_29;
00630bfd                                                          ecx_17 = *(uint8_t*)((ebp_15 + (i_1 << 1)) + 4);
00630c01                                                          *(uint8_t*)(((char*)var_64_3 + i_1) + 2) = ecx_17;
00630c05                                                          edx_20 = *(uint8_t*)((ebp_15 + (i_1 << 1)) + 6);
00630c09                                                          *(uint8_t*)(((char*)var_64_3 + i_1) + 3) = edx_20;
00630c0d                                                          eax_29 = *(uint8_t*)((ebp_15 + (i_1 << 1)) + 8);
00630c11                                                          *(uint8_t*)(((char*)var_64_3 + i_1) + 4) = eax_29;
00630c15                                                          i_1 += 5;
00630c1a                                                      } while (i_1 <= (edi_9 - 6));
00630c1a                                                      
00630c1c                                                      edx_20 = var_60_4;
00630c23                                                      eax_29 = var_5c_3;
00630c31                                                      ecx_17 = edi_9;
00630ba8                                                  }
00630ba8                                                  
00630c3f                                                  int32_t var_5c_4 = eax_29;
00630c3f                                                  
00630c6a                                                  do
00630c6a                                                  {
00630c60                                                      eax_29 = *(uint8_t*)(ebp_15 + (i_1 << 1));
00630c64                                                      *(uint8_t*)((char*)var_64_3 + i_1) = eax_29;
00630c67                                                      i_1 += 1;
00630c6a                                                  } while (i_1 < ecx_17);
00630c6a                                                  
00630c6c                                                  eax_29 = var_5c_4;
00630c7a                                                  edi_11 = eax_27;
00630b9f                                              }
00630b9f                                              
00630c81                                              eax_29 += 0x20;
00630c84                                              edx_20 += 0x10;
00630c87                                              esi_6 += 1;
00630c8a                                          } while (esi_6 < edi_11);
00630c8a                                          
00630cab                                          edx_19 = (*(uint32_t*)((char*)arg1 + 0x37cc) + ecx_8);
00630cb2                                          eax_28 = *(uint32_t*)((char*)edx_19 + 4);
00630b7d                                      }
00630b7d                                      
00630cb5                                      var_48_3 += ecx_17;
00630cbc                                      ebp_11 += 0x80;
00630cc2                                      ebx_10 += 1;
00630cc5                                  } while (ebx_10 < eax_28);
00630cc5                                  
00630ccb                                  var_70 = ebp_11;
00630ce0                                  ecx_10 = *(uint32_t*)((char*)edx_19 + 8);
00630b49                              }
00630b49                              
00630ce3                              esi_5 += (ecx_5 * temp0_2);
00630cea                              ebp_10 += 1;
00630ced                          } while (ebp_10 < ecx_10);
00630ced                          
00630cf3                          esi = arg1;
00630cfa                          ebp_1 = *(uint32_t*)((char*)esi + 0x34);
00630adb                      }
006307cd                  }
006307cd                  else if ((((*(uint32_t*)((char*)esi + 0x4de8) == 1 && eax_12 == 2) && eax_15 == 1) && arg5 != 1))
00630dba                  {
00630dcc                      int32_t edx_29 = (arg5 * 8);
00630dd4                      void* var_4c_4 = &var_58c;
00630dd4                      
00630deb                      if (var_5c_1 > 0)
00630deb                      {
00630e03                          int32_t eax_31 = var_5c_1;
00630e11                          int32_t ecx_23 = var_70;
00630e18                          void* esi_10 = var_74;
00630e34                          int32_t edx_30 = 0;
00630e42                          int32_t edi_17 = var_6c_1;
00630e42                          
00630fc5                          do
00630fc5                          {
00630e49                              int32_t ebp_18 = 0;
00630e49                              
00630e54                              if (edx_29 > 0)
00630e54                              {
00630e6b                                  int32_t eax_33 = (ecx_23 + (arg5 << 1));
00630e6e                                  int32_t ebx_15 = 0;
00630e95                                  int32_t esi_11 = arg5;
00630e95                                  
00630f61                                  do
00630f61                                  {
00630e9c                                      int32_t eax_34 = (ebp_18 * 2);
00630e9c                                      
00630ead                                      if (temp0_1 == 2)
00630ead                                      {
00630ff7                                          int32_t edx_32 = (ebp_18 * 2);
00631010                                          int16_t* edi_19 = (ecx_23 + (ebp_18 << 1));
00631013                                          int16_t* var_3c_2 = edi_19;
0063101d                                          int32_t edx_35 = (((int32_t)*(uint16_t*)edi_19) * 3);
00631020                                          void* ecx_28 = ((char*)var_4c_4 + (eax_34 << 1));
0063102f                                          void* var_38_2 = ecx_28;
0063103d                                          *(uint8_t*)ecx_28 = ((int8_t)(((((int32_t)*(uint16_t*)(((edi_17 + (arg5 << 1)) + (ebp_18 << 1)) - 2)) + edx_35) + 1) >> 2));
00631054                                          *(uint8_t*)((char*)ecx_28 + 1) = ((int8_t)(((((int32_t)edi_19[1]) + edx_35) + 2) >> 2));
00631057                                          int32_t ecx_29 = (eax_34 * 2);
00631057                                          
0063105e                                          if ((arg5 - 1) > 1)
0063105e                                          {
00631062                                              void* i_2 = &edi_19[1];
006310ad                                              void* esi_15;
006310ad                                              
006310ad                                              do
006310ad                                              {
00631080                                                  ecx_29 += 2;
00631086                                                  int32_t edi_20 = (((int32_t)*(uint16_t*)i_2) * 3);
00631089                                                  esi_15 = ((char*)var_4c_4 + ecx_29);
00631098                                                  *(uint8_t*)esi_15 = ((int8_t)(((((int32_t)*(uint16_t*)((char*)i_2 - 2)) + edi_20) + 1) >> 2));
006310a5                                                  *(uint8_t*)((char*)esi_15 + 1) = ((int8_t)(((((int32_t)*(uint16_t*)((char*)i_2 + 2)) + edi_20) + 2) >> 2));
006310a8                                                  i_2 += 2;
006310ad                                              } while (i_2 < &edi_19[(esi_11 - 1)]);
006310ad                                              
006310af                                              var_38_2 = esi_15;
006310c4                                              esi_11 = arg5;
0063105e                                          }
0063105e                                          
006310de                                          int32_t edx_41 = (((int32_t)*(uint16_t*)((eax_33 + edx_32) - 2)) * 3);
006310f4                                          *(uint8_t*)((char*)var_38_2 + 2) = ((int8_t)(((((int32_t)*(uint16_t*)((eax_33 + edx_32) - 4)) + edx_41) + 1) >> 2));
00631109                                          *(uint8_t*)((char*)var_38_2 + 3) = ((int8_t)(((((int32_t)*(uint16_t*)((char*)esi_10 + edx_32)) + edx_41) + 2) >> 2));
00630ead                                      }
00630ead                                      else
00630ead                                      {
00630eb3                                          int32_t i_3 = 0;
00630eb3                                          
00630eb7                                          if (esi_11 > 0)
00630eb7                                          {
00630ec0                                              int32_t eax_35;
00630ec0                                              int32_t ecx_26;
00630ec0                                              void* edi_18;
00630ec0                                              
00630ec0                                              if (esi_11 < 6)
00630ec0                                              {
00631127                                                  edi_18 = ((char*)var_4c_4 + (eax_34 << 1));
00631131                                                  ecx_26 = (ecx_23 + ebx_15);
00630ec0                                              }
00630ec0                                              else
00630ec0                                              {
00630ecd                                                  edi_18 = ((char*)var_4c_4 + (eax_34 << 1));
00630ed7                                                  ecx_26 = (ecx_23 + ebx_15);
00630eda                                                  int32_t var_30_2 = ebx_15;
00630eda                                                  
00630f22                                                  do
00630f22                                                  {
00630ef0                                                      eax_35 = *(uint8_t*)(ecx_26 + (i_3 << 1));
00630efa                                                      *(uint8_t*)((char*)edi_18 + i_3) = eax_35;
00630efd                                                      ebx_15 = *(uint8_t*)((ecx_26 + (i_3 << 1)) + 2);
00630f01                                                      *(uint8_t*)(((char*)edi_18 + i_3) + 1) = ebx_15;
00630f05                                                      eax_35 = *(uint8_t*)((ecx_26 + (i_3 << 1)) + 4);
00630f09                                                      *(uint8_t*)(((char*)edi_18 + i_3) + 2) = eax_35;
00630f0d                                                      eax_35 = *(uint8_t*)((ecx_26 + (i_3 << 1)) + 6);
00630f11                                                      *(uint8_t*)(((char*)edi_18 + i_3) + 3) = eax_35;
00630f15                                                      eax_35 = *(uint8_t*)((ecx_26 + (i_3 << 1)) + 8);
00630f19                                                      *(uint8_t*)(((char*)edi_18 + i_3) + 4) = eax_35;
00630f1d                                                      i_3 += 5;
00630f22                                                  } while (i_3 <= (arg5 - 6));
00630f22                                                  
00630f24                                                  ebx_15 = var_30_2;
00630f32                                                  esi_11 = arg5;
00630ec0                                              }
00630ec0                                              
00630f49                                              do
00630f49                                              {
00630f40                                                  eax_35 = *(uint8_t*)(ecx_26 + (i_3 << 1));
00630f43                                                  *(uint8_t*)((char*)edi_18 + i_3) = eax_35;
00630f46                                                  i_3 += 1;
00630f49                                              } while (i_3 < esi_11);
00630eb7                                          }
00630ead                                      }
00630ead                                      
00630f52                                      ebx_15 += 0x10;
00630f55                                      ebp_18 += 8;
00630f61                                  } while (ebp_18 < edx_29);
00630f61                                  
00630f97                                  eax_31 = *(uint32_t*)((ecx_8 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 4);
00630e54                              }
00630e54                              
00630fa2                              ecx_23 += 0x80;
00630fa8                              esi_10 += 0x80;
00630fb5                              edi_17 += 0x80;
00630fbb                              edx_30 += 1;
00630fbc                              var_4c_4 += (temp0_1 * arg5);
00630fc5                          } while (edx_30 < eax_31);
00630fc5                          
00630fcb                          var_70 = ecx_23;
00630fd2                          var_74 = esi_10;
00630fd9                          var_6c_1 = edi_17;
00630fe0                          esi = arg1;
00630fe7                          ebp_1 = *(uint32_t*)((char*)esi + 0x34);
00630deb                      }
00630dba                  }
00630dba                  else if (ecx_10 > 0)
006307ed                  {
006307ff                      int32_t eax_18 = (temp0_2 << 5);
0063080d                      void* esi_1 = ecx_9;
0063082c                      int32_t var_44_2 = 0;
00630833                      int32_t ebp_3 = 0;
0063083c                      int32_t edi_2 = 0;
0063084a                      int32_t eax_19 = var_5c_1;
0063084a                      
00630ab9                      do
00630ab9                      {
0063085c                          void* ebx_4 = (&var_58c + ebp_3);
0063085e                          int32_t edx_12 = 0;
0063085e                          
00630862                          if (eax_19 > 0)
00630862                          {
0063086f                              int32_t ecx_11 = var_70;
0063087d                              void* var_60_2 = esi_1;
00630884                              int32_t esi_2 = eax_18;
00630884                              
00630a8a                              do
00630a8a                              {
0063088b                                  int32_t edi_3 = 0;
0063088b                                  
00630896                                  if (arg5 > 0)
00630896                                  {
0063089e                                      int32_t eax_20 = 0;
006308a1                                      int32_t ebp_5 = temp0_1;
006308bd                                      int32_t ebx_5 = arg5;
006308bd                                      
00630a41                                      do
00630a41                                      {
006308c4                                          int32_t ecx_12 = 0;
006308c4                                          
006308c8                                          if (ebx_5 > 0)
006308c8                                          {
006308e1                                              int32_t edx_15 = 0;
006308e1                                              
00630a28                                              do
00630a28                                              {
006308f2                                                  void* eax_21 = nullptr;
006308f2                                                  
006308f6                                                  if (esi_2 > 0)
006308f6                                                  {
00630903                                                      void* edi_5 = (((char*)ebx_4 + eax_20) + edx_15);
00630903                                                      
00630a08                                                      do
00630a08                                                      {
0063091b                                                          int32_t edx_16 = 0;
0063091b                                                          
0063091f                                                          if (ebp_5 > 0)
0063091f                                                          {
00630928                                                              char* ecx_16;
00630928                                                              char* ebx_8;
00630928                                                              
00630928                                                              if (ebp_5 < 5)
00630928                                                              {
00630d78                                                                  ebx_8 = (((edi_3 << 4) + ecx_11) + (ecx_12 << 1));
00630d82                                                                  ecx_16 = ((char*)eax_21 + edi_5);
00630928                                                              }
00630928                                                              else
00630928                                                              {
00630938                                                                  int32_t edi_8 = ((edi_3 << 4) + ecx_11);
00630953                                                                  int32_t var_58_1 = 0;
0063095a                                                                  char* var_5c_2 = ((char*)eax_21 + edi_5);
00630961                                                                  char* var_60_3 = (edi_8 + (ecx_12 << 1));
006309bf                                                                  bool cond:4_1;
006309bf                                                                  
006309bf                                                                  do
006309bf                                                                  {
00630977                                                                      int32_t eax_22;
00630977                                                                      eax_22 = *(uint8_t*)(edi_8 + (ecx_12 << 1));
0063098f                                                                      var_5c_2[var_58_1] = eax_22;
00630995                                                                      int32_t eax_23;
00630995                                                                      eax_23 = *(uint8_t*)(edi_8 + (ecx_12 << 1));
00630998                                                                      var_5c_2[(var_58_1 + 1)] = eax_23;
0063099e                                                                      char* ebx_7;
0063099e                                                                      ebx_7 = *(uint8_t*)(edi_8 + (ecx_12 << 1));
006309a1                                                                      var_5c_2[(var_58_1 + 2)] = ebx_7;
006309a5                                                                      edx_16 = *(uint8_t*)(edi_8 + (ecx_12 << 1));
006309af                                                                      var_5c_2[(var_58_1 + 3)] = edx_16;
006309b6                                                                      cond:4_1 = (var_58_1 + 4) <= (temp0_1 - 5);
006309b8                                                                      var_58_1 += 4;
006309bf                                                                  } while (cond:4_1);
006309c1                                                                  ebp_5 = temp0_1;
006309c8                                                                  esi_2 = eax_18;
006309cf                                                                  edx_16 = var_58_1;
006309d6                                                                  ecx_16 = var_5c_2;
006309dd                                                                  ebx_8 = var_60_3;
00630928                                                              }
00630928                                                              
006309eb                                                              void* var_64_2 = eax_21;
006309eb                                                              
006309fa                                                              do
006309fa                                                              {
006309f2                                                                  eax_21 = *(uint8_t*)ebx_8;
006309f4                                                                  ecx_16[edx_16] = eax_21;
006309f7                                                                  edx_16 += 1;
006309fa                                                              } while (edx_16 < ebp_5);
006309fa                                                              
006309fc                                                              eax_21 = var_64_2;
0063091f                                                          }
0063091f                                                          
00630a03                                                          eax_21 += 0x20;
00630a08                                                      } while (eax_21 < esi_2);
00630a08                                                      
00630a1c                                                      ebx_5 = arg5;
006308f6                                                  }
006308f6                                                  
00630a23                                                  edx_15 += ebp_5;
00630a25                                                  ecx_12 += 1;
00630a28                                              } while (ecx_12 < ebx_5);
006308c8                                          }
006308c8                                          
00630a3c                                          eax_20 += esi_2;
00630a3e                                          edi_3 += 1;
00630a41                                      } while (edi_3 < ebx_5);
00630a41                                      
00630a69                                      void* ebp_8 = (*(uint32_t*)((char*)arg1 + 0x37cc) + ecx_8);
00630a70                                      eax_19 = *(uint32_t*)((char*)ebp_8 + 4);
00630a73                                      var_60_2 = ebp_8;
00630896                                  }
00630896                                  
00630a7a                                  ebx_4 += (temp0_1 * arg5);
00630a81                                  ecx_11 += 0x80;
00630a87                                  edx_12 += 1;
00630a8a                              } while (edx_12 < eax_19);
00630a8a                              
00630a90                              var_70 = ecx_11;
00630aa5                              esi_1 = var_60_2;
00630aac                              ecx_10 = *(uint32_t*)((char*)esi_1 + 8);
00630862                          }
00630862                          
00630aaf                          ebp_3 += (ecx_5 * temp0_2);
00630ab6                          edi_2 += 1;
00630ab9                      } while (edi_2 < ecx_10);
00630ab9                      
00630abf                      esi = arg1;
00630ac6                      ebp_1 = *(uint32_t*)((char*)esi + 0x34);
006307ed                  }
006307ed                  
00630cfd                  ebx = &var_58c;
00630cfd                  
00631169                  if ((ebp_1 == 3 && i_6 != 0))
00631169                  {
00631172                      if (i_6 == 2)
00631174                          var_24_1 += 1;
00631174                      
0063117b                      int32_t var_88;
0063117b                      int32_t edx_44 = var_88;
00631182                      int32_t var_80;
00631182                      int32_t eax_52 = var_80;
00631182                      
0063118b                      if (edx_44 < eax_52)
0063118b                      {
00631191                          int32_t var_84;
00631191                          int32_t ebp_22 = var_84;
0063119a                          int32_t edi_23 = (edx_44 << 5);
0063119a                          
00631208                          do
00631208                          {
0063119d                              int32_t ecx_32 = var_8c;
0063119d                              
006311a6                              if (ecx_32 < ebp_22)
006311a6                              {
006311a8                                  char* eax_53 = ((char*)ebx + edi_23);
006311c0                                  void* var_7c_4 = ebx;
006311c0                                  
006311eb                                  do
006311eb                                  {
006311d0                                      ebx = eax_53[ecx_32];
006311db                                      *(uint8_t*)(((edx_44 * *(uint32_t*)((char*)arg1 + 0x3c)) + var_24_1) + (ecx_32 << 1)) = ebx;
006311df                                      ecx_32 += 2;
006311e2                                      ebp_22 = var_84;
006311eb                                  } while (ecx_32 < ebp_22);
006311eb                                  
006311f4                                  ebx = var_7c_4;
006311fb                                  eax_52 = var_80;
006311a6                              }
006311a6                              
00631202                              edi_23 += 0x20;
00631205                              edx_44 += 1;
00631208                          } while (edx_44 < eax_52);
00631208                          
0063120a                          esi = arg1;
00631211                          ebp_1 = *(uint32_t*)((char*)esi + 0x34);
0063118b                      }
00631169                  }
00631169                  else
00631169                  {
00630d32                      sub_632140(esi, &var_8c, i_6, var_24_1, &var_58c);
00630d37                      ebp_1 = *(uint32_t*)((char*)esi + 0x34);
00631169                  }
00631169                  
00631146                  if ((ebp_1 == 2 && *(uint32_t*)((char*)esi + 0x58) == 1))
00631146                  {
0063114c                      var_24_1 -= 1;
00631153                      eax_11 = *(uint32_t*)((char*)esi + 0x37c0);
00631146                  }
00631146                  else
00631146                  {
00630d43                      var_24_1 += 1;
00630d4a                      eax_11 = *(uint32_t*)((char*)esi + 0x37c0);
00631146                  }
00631259              }
00631259              
00630d50              i_6 += 1;
00630732          }
00630732          
00631270          result = *(uint32_t*)((char*)esi + 0x74);
00631270          
00631275          if (result != 0)
00631275          {
00631277              i_5 = *(uint32_t*)((char*)esi + 0x54);
0063127d              result = arg2;
0063127d              
00631287              if ((i_5 - 1) != *(uint32_t*)((char*)result + 0x38))
00631289                  i_5 = *(uint32_t*)((char*)esi + 0x30);
00631275          }
00631275          
00631292          if (ebp_1 == 0xff)
00631300              result = *(uint32_t*)((char*)esi + 0x58);
00631300          
00631297          if (((ebp_1 != 0xff || result != 0xff) && i_5 < *(uint32_t*)((char*)esi + 0x30)))
00631297          {
0063129b              int32_t i_4 = i_5;
006312aa              int32_t edi_27 = var_24_1;
006312aa              
006312dc              do
006312dc              {
006312ca                  sub_632140(esi, &var_8c, i_4, edi_27, ebx);
006312cf                  result = *(uint32_t*)((char*)esi + 0x34);
006312cf                  
006312d5                  if (result == 2)
006312d5                  {
006312e9                      result = *(uint32_t*)((char*)esi + 0x58);
006312e9                      
006312ef                      if (result != 1)
006312d7                          edi_27 += 1;
006312ef                      else
006312f1                          edi_27 -= 1;
006312d5                  }
006312d5                  else
006312d7                      edi_27 += 1;
006312d7                  
006312d8                  i_4 += 1;
006312dc              } while (i_4 < *(uint32_t*)((char*)esi + 0x30));
00631297          }
006306f1      }
006306f1      
006312e8      return result;
00630630  }

00630743           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
00630ace                                            8b f6                                                                ..
00630d5c                                                                                      8d 74 26 00                              .t&.
00630d8a                                8d b6 00 00 00 00                                                            ......
00630fef                                               90                                                                 .
00631111                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00631139                                                                             8d b4 26 00 00 00 00                           ..&....
0063115e                                                                                            8b f6                                ..
00631219                                                                             8d b4 26 00 00 00 00                           ..&....
00631242        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
00631264              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
006312f4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00631316                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063132a                                8d b6 00 00 00 00                                                            ......

00631470  int32_t sub_631470(void* arg1, void* arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00631470  {
00631494      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
006314e2      int32_t var_44;
006314e2      int32_t result = sub_62e6a0(((char*)arg1 + 4), arg5, arg5, arg3, arg4, *(uint32_t*)((char*)arg1 + 0x30), *(uint32_t*)((char*)arg1 + 0x3c), *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg2 + 0x2c), &var_44);
006314e2      
006314e9      if (result == 0)
006314e9      {
006314ef          int32_t esi_2 = *(uint32_t*)((char*)arg1 + 0x34);
006314ef          
006317b6          if ((esi_2 == 2 && *(uint32_t*)((char*)arg1 + 0x58) == 1))
006317bf              result = (*(uint32_t*)((char*)arg2 + 0x2c) + 2);
006317b6          else
006314fb              result = *(uint32_t*)((char*)arg2 + 0x2c);
006314fb          
006314fe          int32_t edx_2 = 0;
00631500          int32_t result_3 = *(uint32_t*)((char*)arg1 + 0x30);
00631500          
00631505          if (result_3 > 0)
00631505          {
0063150b              int32_t result_2 = result_3;
0063150f              int32_t result_1 = result;
00631513              int32_t var_24_1 = ebp;
00631513              
0063151d              while (true)
0063151d              {
0063151d                  int32_t var_40;
0063151d                  int32_t var_3c;
0063151d                  int32_t var_38;
0063151d                  
0063151d                  if (edx_2 < *(uint32_t*)((char*)arg1 + 0x37c0))
0063151d                  {
00631527                      int32_t ecx_3 = (edx_2 << 4);
0063152e                      void* eax_4 = *(uint32_t*)((char*)arg1 + 0x37cc);
00631534                      void* edi_1 = ((char*)eax_4 + ecx_3);
00631537                      int32_t ebp_1 = *(uint32_t*)((char*)edi_1 + 8);
00631537                      
0063153c                      if (ebp_1 > 0)
0063153c                      {
00631542                          int32_t eax_5 = *(uint32_t*)((ecx_3 + eax_4) + 4);
00631546                          int32_t esi_3 = 0;
00631552                          int32_t edx_3 = var_24_1;
00631552                          
0063166a                          do
0063166a                          {
00631556                              int32_t ecx_4 = 0;
00631556                              
0063155a                              if (eax_5 > 0)
0063155a                              {
00631560                                  int32_t ebp_2 = var_38;
00631560                                  
0063165a                                  do
0063165a                                  {
00631568                                      int32_t esi_4 = var_40;
00631568                                      
0063156e                                      if (esi_4 < ebp_2)
0063156e                                      {
00631574                                          int32_t eax_6 = var_3c;
0063157a                                          int32_t edi_3 = (esi_4 << 4);
00631581                                          int32_t result_5 = result_2;
00631581                                          
00631632                                          do
00631632                                          {
00631589                                              int32_t ecx_5 = var_44;
00631589                                              
0063158f                                              if (ecx_5 < eax_6)
0063158f                                              {
006315b3                                                  while (true)
006315b3                                                  {
006315b3                                                      eax_6 = *(uint8_t*)((edx_3 + edi_3) + (ecx_5 << 1));
006315b9                                                      char* edx_4 = (result_5 * ecx_5);
006315c0                                                      ecx_5 += 1;
006315c5                                                      edx_4[((esi_4 * *(uint32_t*)((char*)arg1 + 0x3c)) + result_1)] = eax_6;
006315c8                                                      eax_6 = var_3c;
006315c8                                                      
006315ce                                                      if (ecx_5 >= eax_6)
006315ce                                                          break;
006315ce                                                      
006315b0                                                      result_5 = *(uint32_t*)((char*)arg1 + 0x30);
006315b3                                                  }
006315b3                                                  
00631625                                                  result_5 = *(uint32_t*)((char*)arg1 + 0x30);
00631628                                                  ebp_2 = var_38;
0063158f                                              }
0063158f                                              
0063162c                                              edi_3 += 0x10;
0063162f                                              esi_4 += 1;
00631632                                          } while (esi_4 < ebp_2);
00631632                                          
00631638                                          result_2 = result_5;
0063164a                                          edi_1 = (*(uint32_t*)((char*)arg1 + 0x37cc) + ecx_3);
0063164e                                          eax_5 = *(uint32_t*)((char*)edi_1 + 4);
0063156e                                      }
0063156e                                      
00631651                                      edx_3 += 0x80;
00631657                                      ecx_4 += 1;
0063165a                                  } while (ecx_4 < eax_5);
0063165a                                  
00631664                                  ebp_1 = *(uint32_t*)((char*)edi_1 + 8);
0063155a                              }
0063155a                              
00631667                              esi_3 += 1;
0063166a                          } while (esi_3 < ebp_1);
0063166a                          
00631670                          var_24_1 = edx_3;
00631678                          esi_2 = *(uint32_t*)((char*)arg1 + 0x34);
0063153c                      }
0063151d                  }
0063151d                  else if ((edx_2 == 3 && esi_2 == 5))
00631733                  {
00631739                      int32_t ecx_6 = var_40;
0063173d                      int32_t ebp_8 = var_38;
0063173d                      
00631743                      if (ecx_6 < ebp_8)
00631743                      {
00631745                          int32_t eax_8 = var_3c;
00631749                          int32_t result_6 = result_2;
00631749                          
00631785                          do
00631785                          {
00631755                              int32_t edx_9 = var_44;
00631755                              
0063175b                              if (edx_9 < eax_8)
0063175b                              {
00631765                                  while (true)
00631765                                  {
00631765                                      char* esi_7 = (result_6 * edx_9);
00631768                                      edx_9 += 1;
0063176f                                      esi_7[((ecx_6 * *(uint32_t*)((char*)arg1 + 0x3c)) + result_1)] = 0xff;
00631773                                      eax_8 = var_3c;
00631773                                      
00631779                                      if (edx_9 >= eax_8)
00631779                                          break;
00631779                                      
00631760                                      result_6 = *(uint32_t*)((char*)arg1 + 0x30);
00631765                                  }
00631765                                  
0063177b                                  result_6 = *(uint32_t*)((char*)arg1 + 0x30);
0063177e                                  ebp_8 = var_38;
0063175b                              }
0063175b                              
00631782                              ecx_6 += 1;
00631785                          } while (ecx_6 < ebp_8);
00631785                          
00631787                          result_2 = result_6;
0063178f                          esi_2 = *(uint32_t*)((char*)arg1 + 0x34);
00631743                      }
00631743                      
00631796                      var_24_1 += 0x80;
00631733                  }
00631733                  
006315e9                  result = result_2;
006315ed                  int32_t result_4 = result_1;
006315ed                  
0063171e                  while (true)
0063171e                  {
0063171e                      if ((esi_2 == 2 && *(uint32_t*)((char*)arg1 + 0x58) == 1))
00631724                          result_4 -= 1;
0063171e                      else
006315fa                          result_4 += 1;
006315fa                      
006315fb                      edx_2 += 1;
006315fb                      
006315fe                      if (edx_2 >= result)
00631717                          return result;
00631717                      
00631606                      if (edx_2 <= 0)
00631606                      {
006317c7                          result_2 = result;
006317cb                          result_1 = result_4;
006317cf                          break;
00631606                      }
00631606                      
00631612                      if (*(uint32_t*)((char*)arg1 + 0x58) != 4)
00631612                      {
00631614                          result_2 = result;
00631618                          result_1 = result_4;
0063161c                          break;
00631612                      }
00631612                      
00631680                      int32_t ebp_5 = var_40;
00631684                      int32_t edi_8 = var_38;
00631684                      
0063168a                      if (ebp_5 < edi_8)
0063168a                      {
00631698                          int32_t edx_5 = var_3c;
00631698                          
006316f5                          do
006316f5                          {
0063169a                              int32_t esi_6 = var_44;
0063169a                              
006316a0                              if (esi_6 < edx_5)
006316a0                              {
006316b3                                  while (true)
006316b3                                  {
006316b3                                      char* eax_7 = (result * esi_6);
006316b3                                      
006316b9                                      if (edx_2 >= 3)
006316da                                          eax_7[((ebp_5 * *(uint32_t*)((char*)arg1 + 0x3c)) + result_4)] = 0xff;
006316b9                                      else
006316b9                                      {
006316c3                                          int32_t edi_11 = ((ebp_5 * *(uint32_t*)((char*)arg1 + 0x3c)) + result_4);
006316c5                                          edx_5 = eax_7[(edi_11 - 1)];
006316c9                                          eax_7[edi_11] = edx_5;
006316b9                                      }
006316b9                                      
006316de                                      esi_6 += 1;
006316df                                      edx_5 = var_3c;
006316df                                      
006316e5                                      if (esi_6 >= edx_5)
006316e5                                          break;
006316e5                                      
006316b0                                      result = *(uint32_t*)((char*)arg1 + 0x30);
006316b3                                  }
006316b3                                  
006316eb                                  result = *(uint32_t*)((char*)arg1 + 0x30);
006316ee                                  edi_8 = var_38;
006316a0                              }
006316a0                              
006316f2                              ebp_5 += 1;
006316f5                          } while (ebp_5 < edi_8);
006316f5                          
006316fb                          esi_2 = *(uint32_t*)((char*)arg1 + 0x34);
0063168a                      }
0063171e                  }
0063151d              }
00631505          }
006314e9      }
006314e9      
00631717      return result;
00631470  }

006315a2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
006315d2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
006316ac                                      8d 74 26 00                                                              .t&.
006316ce                                            8b f6                                                                ..
00631703           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063172a                                8d b6 00 00 00 00                                                            ......
0063175f                                                                                               90                                 .
006317a3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
006317d4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............

006317e0  int32_t sub_6317e0(void* arg1, void* arg2, int32_t arg3, int32_t arg4, int32_t arg5)

006317e0  {
006317fd      int32_t edx = *(uint32_t*)((char*)arg1 + 0x34);
006317fd      
0063180d      if ((edx != 1 && (edx != 2 && edx != 5)))
00631815          return arg5;
00631815      
00631870      int32_t var_3c;
00631870      int32_t eax_7 = sub_62e6a0(((char*)arg1 + 4), (*(uint32_t*)((char*)arg1 + 0x37b8) * arg5), (arg5 * *(uint32_t*)((char*)arg1 + 0x37bc)), arg3, arg4, *(uint32_t*)((char*)arg1 + 0x30), *(uint32_t*)((char*)arg1 + 0x3c), *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg2 + 0x2c), &var_3c);
00631870      
00631877      if (eax_7 == 0)
00631877      {
0063187d          int32_t ecx_1 = *(uint32_t*)((char*)arg2 + 0x2c);
00631880          int32_t edi_2 = *(uint32_t*)((char*)arg1 + 0x30);
00631886          int32_t var_38;
00631886          int32_t var_34;
00631886          int32_t var_30;
00631886          int32_t ebp;
00631886          
00631886          if (edi_2 == 3)
00631886          {
00631a40              int32_t esi_9 = var_38;
00631a44              int32_t edx_16 = var_30;
00631a44              
00631a4a              if (esi_9 < edx_16)
00631a4a              {
00631a50                  eax_7 = (var_34 * 3);
00631a57                  int32_t var_2c_2 = ebp;
00631a57                  
00631b65                  do
00631b65                  {
00631a5f                      int32_t ebp_7 = (var_3c * 3);
00631a5f                      
00631a64                      if (ebp_7 < eax_7)
00631a64                      {
00631b54                          do
00631b54                          {
00631a78                              char* esi_13 = ((esi_9 * *(uint32_t*)((char*)arg1 + 0x3c)) + ecx_1);
00631a7c                              uint32_t edx_17 = ((uint32_t)esi_13[ebp_7]);
00631a80                              uint32_t ecx_5 = ((uint32_t)esi_13[(ebp_7 + 1)]);
00631a85                              uint32_t edi_17 = ((uint32_t)esi_13[(ebp_7 + 2)]);
00631a98                              int32_t eax_26 = ((((edi_17 * 0x167) - 0xb2f5) >> 8) + edx_17);
00631a98                              
00631a9f                              if (eax_26 > 0xff)
00631aa1                                  eax_26 = 0xff;
00631a9f                              else if (eax_26 < 0)
00631ab4                                  eax_26 = 0;
00631ab4                              
00631ab6                              char eax_27 = eax_26;
00631ad0                              int32_t eax_31 = (((((ecx_5 * 0xffffffa8) + (edi_17 * 0xffffff49)) + 0x87f6) >> 8) + edx_17);
00631ad0                              
00631ad7                              if (eax_31 > 0xff)
00631ad9                                  eax_31 = 0xff;
00631ad7                              else if (eax_31 < 0)
00631ae4                                  eax_31 = 0;
00631ae4                              
00631ae6                              char eax_32 = eax_31;
00631af8                              int32_t edx_18 = (edx_17 + (((ecx_5 * 0x1c6) - 0xe251) >> 8));
00631af8                              
00631b00                              if (edx_18 > 0xff)
00631b02                                  edx_18 = 0xff;
00631b00                              else if (edx_18 < 0)
00631b14                                  edx_18 = 0;
00631b14                              
00631b16                              char edx_19 = edx_18;
00631b16                              
00631b1f                              if (*(uint32_t*)((char*)arg1 + 0x34) == 2)
00631b1f                              {
00631b74                                  esi_13[ebp_7] = edx_19;
00631b87                                  *(uint8_t*)((ebp_7 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_9) + ecx_1)) + 1) = eax_32;
00631b97                                  *(uint8_t*)((ebp_7 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_9) + ecx_1)) + 2) = eax_27;
00631b1f                              }
00631b1f                              else
00631b1f                              {
00631b29                                  esi_13[ebp_7] = eax_27;
00631b38                                  *(uint8_t*)((ebp_7 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_9) + ecx_1)) + 1) = eax_32;
00631b44                                  *(uint8_t*)((ebp_7 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_9) + ecx_1)) + 2) = edx_19;
00631b1f                              }
00631b1f                              
00631b48                              ebp_7 += 3;
00631b4f                              eax_7 = (var_34 * 3);
00631b54                          } while (ebp_7 < eax_7);
00631b54                          
00631b5e                          edx_16 = var_30;
00631a64                      }
00631a64                      
00631b62                      esi_9 += 1;
00631b65                  } while (esi_9 < edx_16);
00631a4a              }
00631886          }
00631886          else
00631886          {
0063188c              int32_t esi_1 = var_38;
00631890              int32_t edx_5 = var_30;
00631890              
00631896              if (esi_1 < edx_5)
00631896              {
006318a0                  eax_7 = (var_34 * edi_2);
006318a7                  int32_t var_2c_1 = ebp;
006318a7                  
006319e1                  do
006319e1                  {
006318ad                      int32_t ecx_3 = (edi_2 * var_3c);
006318ad                      
006318b4                      if (ecx_3 < eax_7)
006318b4                      {
006318ba                          int32_t var_1c_1 = eax_7;
006318c2                          int32_t var_18_1 = edi_2;
006318c2                          
006319cc                          do
006319cc                          {
006318d8                              char* ebp_3 = ((esi_1 * *(uint32_t*)((char*)arg1 + 0x3c)) + ecx_1);
006318dc                              uint32_t edx_6 = ((uint32_t)ebp_3[ecx_3]);
006318e1                              uint32_t esi_3 = ((uint32_t)ebp_3[(ecx_3 + 1)]);
006318e6                              uint32_t edi_4 = ((uint32_t)ebp_3[(ecx_3 + 2)]);
006318f9                              int32_t eax_12 = ((((edi_4 * 0x167) - 0xb2f5) >> 8) + edx_6);
006318f9                              
00631900                              if (eax_12 > 0xff)
00631902                                  eax_12 = 0xff;
00631900                              else if (eax_12 < 0)
00631914                                  eax_12 = 0;
00631914                              
00631916                              char eax_13 = eax_12;
00631930                              int32_t eax_17 = (((((esi_3 * 0xffffffa8) + (edi_4 * 0xffffff49)) + 0x87f6) >> 8) + edx_6);
00631930                              
00631937                              if (eax_17 > 0xff)
00631939                                  eax_17 = 0xff;
00631937                              else if (eax_17 < 0)
00631944                                  eax_17 = 0;
00631944                              
00631946                              char eax_18 = eax_17;
0063195c                              int32_t edx_7 = (edx_6 + (((esi_3 * 0x1c6) - 0xe251) >> 8));
0063195c                              
00631964                              if (edx_7 > 0xff)
00631966                                  edx_7 = 0xff;
00631964                              else if (edx_7 < 0)
00631974                                  edx_7 = 0;
00631974                              
00631976                              char eax_19 = edx_7;
00631979                              int32_t edx_8 = *(uint32_t*)((char*)arg1 + 0x58);
00631979                              
0063197f                              if (edx_8 == 6)
0063197f                              {
006319ff                                  ebp_3[ecx_3] = (-(eax_13) - 1);
00631a18                                  *(uint8_t*)((ecx_3 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_1) + ecx_1)) + 1) = (-(eax_18) - 1);
00631a28                                  *(uint8_t*)((ecx_3 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_1) + ecx_1)) + 2) = (-(eax_19) - 1);
00631a2c                                  int32_t edi_15 = *(uint32_t*)((char*)arg1 + 0x30);
00631a2f                                  var_18_1 = edi_15;
00631a38                                  var_1c_1 = (edi_15 * var_34);
0063197f                              }
0063197f                              else if (edx_8 == 3)
00631984                              {
0063198e                                  ebp_3[ecx_3] = eax_13;
006319a2                                  *(uint8_t*)((ecx_3 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_1) + ecx_1)) + 1) = eax_18;
006319ae                                  *(uint8_t*)((ecx_3 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_1) + ecx_1)) + 2) = eax_19;
006319b2                                  int32_t eax_20 = *(uint32_t*)((char*)arg1 + 0x30);
006319b5                                  var_18_1 = eax_20;
006319be                                  var_1c_1 = (eax_20 * var_34);
00631984                              }
00631984                              
006319c2                              ecx_3 += var_18_1;
006319c6                              eax_7 = var_1c_1;
006319cc                          } while (ecx_3 < eax_7);
006319cc                          
006319d6                          edi_2 = var_18_1;
006319da                          edx_5 = var_30;
006318b4                      }
006318b4                      
006319de                      esi_1 += 1;
006319e1                  } while (esi_1 < edx_5);
00631896              }
00631886          }
00631877      }
00631877      
006319f1      return eax_7;
006317e0  }

00631909                             8d b4 26 00 00 00 00                                                           ..&....
0063196d                                         8d 76 00                                                               .v.
00631a3e                                                                                            8b f6                                ..
00631aa8                          90 8d b4 26 00 00 00 00                                                          ...&....
00631b09                             8d b4 26 00 00 00 00                                                           ..&....
00631b9d                                                                                         8d 76 00                               .v.

00631ba0  void US_And_CC_MCU_Scaled(struct _JPEG_PROPERTIES* arg1, struct _STATE* arg2, struct _SCAN* arg3, int32_t arg4, int32_t arg5, int32_t arg6, bool arg7)

00631ba0  {
00631bca      if ((arg1->jinterleaveType != 0 && arg1->progressive_found == 0))
00631bca      {
00631d14          int32_t eax_1;
00631d14          eax_1 = arg7;
00631d38          sub_62eb50(arg1, arg2, arg3, arg4, arg5, arg6, 0, eax_1);
00631d44          return;
00631bca      }
00631bca      
00631bd0      int32_t upsampling_reqd = arg1->upsampling_reqd;
00631bd0      
00631bdc      if ((upsampling_reqd != 0 && arg1->cconversion_reqd != 0))
00631bdc      {
00631be5          upsampling_reqd = arg7;
00631c01          sub_62eaa0(arg1, arg2, arg3, arg4, arg5, arg6, upsampling_reqd);
00631c0d          return;
00631bdc      }
00631bdc      
00631c17      if ((upsampling_reqd == 0 && arg1->cconversion_reqd != 0))
00631c17      {
00631c30          sub_631470(arg1, arg2, arg4, arg5, arg6);
00631c4c          sub_6317e0(arg1, arg2, arg4, arg5, arg6);
00631c58          return;
00631c17      }
00631c17      
00631c66      if ((upsampling_reqd == 0 || arg1->cconversion_reqd != 0))
00631c66      {
00631ce7          if (arg1->DIBColor == IJL_YCBCR)
00631ce7          {
00631d4c              enum _IJL_COLOR eax_7;
00631d4c              eax_7 = arg7;
00631d68              sub_62eaa0(arg1, arg2, arg3, arg4, arg5, arg6, eax_7);
00631d74              return;
00631ce7          }
00631ce7          
00631d00          sub_631470(arg1, arg2, arg4, arg5, arg6);
00631d0c          return;
00631c66      }
00631c66      
00631c77      int32_t eax_5;
00631c77      
00631c77      if ((arg3->start_spec == 0 && arg1->progressive_found == 0))
00631c77      {
00631c80          eax_5 = arg7;
00631ca4          sub_62eb50(arg1, arg2, arg3, arg4, arg5, arg6, 1, eax_5);
00631cb0          return;
00631c77      }
00631c77      
00631cb8      eax_5 = arg7;
00631cd0      char var_1c = eax_5;
00631cd4      sub_630630(arg1, arg2, arg3, arg4, arg5, arg6);
00631ba0  }

00631d75                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

00631d80  void CConvert_Image(struct _JPEG_PROPERTIES* arg1)

00631d80  {
00631d8a      uint8_t* DIBBytes = arg1->DIBBytes;
00631d8d      enum _IJL_COLOR DIBColor = arg1->DIBColor;
00631d8d      
00631d9d      if ((DIBColor != IJL_BGR && (DIBColor != IJL_RGB && DIBColor != IJL_RGBA_FPX)))
00631da5          return;
00631da5      
00631dab      if (arg1->cconversion_reqd != 0)
00631dab      {
00631db1          int32_t bottom = arg1->roi.bottom;
00631db4          int32_t eax_1 = (bottom - arg1->roi.top);
00631db4          
00631db7          if (bottom == arg1->roi.top)
00631db7          {
00631dbc              int32_t eax_3;
00631dbc              int32_t edx_1;
00631dbc              edx_1 = HIGHD(((int64_t)arg1->DIBHeight));
00631dbc              eax_3 = LOWD(((int64_t)arg1->DIBHeight));
00631dbf              eax_1 = ((eax_3 ^ edx_1) - edx_1);
00631db7          }
00631db7          
00631dc1          int32_t DIBChannels_1 = arg1->DIBChannels;
00631dca          int32_t edx_4 = ((arg1->roi.right - arg1->roi.left) * DIBChannels_1);
00631dca          
00631dcf          if (edx_4 == 0)
00631dd4              edx_4 = (arg1->DIBWidth * DIBChannels_1);
00631dd4          
00631dda          int32_t ebp;
00631dda          
00631dda          if (DIBChannels_1 == 3)
00631dda          {
00631fc0              int32_t i = (eax_1 - 1);
00631fc0              
00631fc5              if (eax_1 != 0)
00631fc5              {
00631fcb                  int32_t var_30_2 = ebp;
00631fcb                  
006320f7                  do
006320f7                  {
00631fcf                      int32_t eax_6 = 0;
00631fcf                      
00631fd3                      if (edx_4 > 0)
00631fd3                      {
00631fdd                          int32_t var_2c_2 = edx_4;
00631fdd                          
006320e9                          do
006320e9                          {
00631fe9                              void* ebx_16 = ((i * arg1->DIBLineBytes) + DIBBytes);
00631ff1                              uint32_t edx_25 = ((uint32_t)*(uint8_t*)((char*)ebx_16 + eax_6));
00631ff5                              uint32_t ebp_6 = ((uint32_t)*(uint8_t*)(((char*)ebx_16 + eax_6) + 1));
00631ffe                              uint32_t ebp_7 = ((uint32_t)*(uint8_t*)(((char*)ebx_16 + eax_6) + 2));
00632012                              int32_t ebx_20 = ((((ebp_7 * 0x167) - 0xb2f5) >> 8) + edx_25);
00632012                              
0063201a                              if (ebx_20 > 0xff)
0063201c                                  ebx_20 = 0xff;
0063201a                              else if (ebx_20 < 0)
00632034                                  ebx_20 = 0;
00632034                              
00632036                              char ebx_21 = ebx_20;
00632054                              int32_t ebx_24 = (((((ebp_6 * 0xffffffa8) + (ebp_7 * 0xffffff49)) + 0x87f6) >> 8) + edx_25);
00632054                              
0063205c                              if (ebx_24 > 0xff)
0063205e                                  ebx_24 = 0xff;
0063205c                              else if (ebx_24 < 0)
00632074                                  ebx_24 = 0;
00632074                              
00632076                              char ebx_25 = ebx_24;
0063208e                              int32_t edx_26 = (edx_25 + (((ebp_6 * 0x1c6) - 0xe251) >> 8));
0063208e                              
00632096                              if (edx_26 > 0xff)
00632098                                  edx_26 = 0xff;
00632096                              else if (edx_26 < 0)
006320a4                                  edx_26 = 0;
006320a4                              
006320a6                              char edx_27 = edx_26;
006320a6                              
006320af                              if (arg1->DIBColor == IJL_BGR)
006320af                              {
00632112                                  *(uint8_t*)((char*)ebx_16 + eax_6) = edx_27;
00632122                                  *(uint8_t*)((eax_6 + ((arg1->DIBLineBytes * i) + DIBBytes)) + 1) = ebx_25;
00632132                                  *(uint8_t*)((eax_6 + ((arg1->DIBLineBytes * i) + DIBBytes)) + 2) = ebx_21;
006320af                              }
006320af                              else
006320af                              {
006320bd                                  *(uint8_t*)((char*)ebx_16 + eax_6) = ebx_21;
006320d0                                  *(uint8_t*)((eax_6 + ((arg1->DIBLineBytes * i) + DIBBytes)) + 1) = ebx_25;
006320dc                                  *(uint8_t*)((eax_6 + ((arg1->DIBLineBytes * i) + DIBBytes)) + 2) = edx_27;
006320af                              }
006320af                              
006320e0                              eax_6 += arg1->DIBChannels;
006320e3                              edx_4 = var_2c_2;
006320e9                          } while (eax_6 < edx_4);
00631fd3                      }
00631fd3                      
006320f3                      i -= 1;
006320f7                  } while (i != 0xffffffff);
00631fc5              }
00631dda          }
00631dda          else
00631dda          {
00631de0              int32_t i_1 = (eax_1 - 1);
00631de0              
00631de5              if (eax_1 != 0)
00631de5              {
00631deb                  int32_t DIBChannels = DIBChannels_1;
00631df3                  int32_t var_30_1 = ebp;
00631df3                  
00631f51                  do
00631f51                  {
00631df7                      int32_t eax_5 = 0;
00631df7                      
00631dfb                      if (edx_4 > 0)
00631dfb                      {
00631e05                          int32_t var_2c_1 = edx_4;
00631e05                          
00631f43                          do
00631f43                          {
00631e1c                              void* ebx_2 = ((i_1 * arg1->DIBLineBytes) + DIBBytes);
00631e24                              uint32_t edx_7 = ((uint32_t)*(uint8_t*)((char*)ebx_2 + eax_5));
00631e28                              uint32_t ecx_1 = ((uint32_t)*(uint8_t*)(((char*)ebx_2 + eax_5) + 1));
00631e2d                              uint32_t ebp_1 = ((uint32_t)*(uint8_t*)(((char*)ebx_2 + eax_5) + 2));
00631e41                              int32_t ebx_6 = ((((ebp_1 * 0x167) - 0xb2f5) >> 8) + edx_7);
00631e41                              
00631e49                              if (ebx_6 > 0xff)
00631e4b                                  ebx_6 = 0xff;
00631e49                              else if (ebx_6 < 0)
00631e64                                  ebx_6 = 0;
00631e64                              
00631e66                              char ebx_7 = ebx_6;
00631e80                              int32_t ebx_10 = (((((ecx_1 * 0xffffffa8) + (ebp_1 * 0xffffff49)) + 0x87f6) >> 8) + edx_7);
00631e80                              
00631e88                              if (ebx_10 > 0xff)
00631e8a                                  ebx_10 = 0xff;
00631e88                              else if (ebx_10 < 0)
00631ea4                                  ebx_10 = 0;
00631ea4                              
00631ea6                              char ebx_11 = ebx_10;
00631ebc                              int32_t edx_8 = (edx_7 + (((ecx_1 * 0x1c6) - 0xe251) >> 8));
00631ebc                              
00631ec4                              if (edx_8 > 0xff)
00631ec6                                  edx_8 = 0xff;
00631ec4                              else if (edx_8 < 0)
00631ed4                                  edx_8 = 0;
00631ed4                              
00631ed6                              char edx_9 = edx_8;
00631ee1                              enum _IJL_COLOR JPGColor = arg1->JPGColor;
00631ee1                              
00631ee7                              if (JPGColor == IJL_YCBCRA_FPX)
00631ee7                              {
00631f73                                  *(uint8_t*)((char*)ebx_2 + eax_5) = (-(ebx_7) - 1);
00631f8f                                  *(uint8_t*)((eax_5 + ((arg1->DIBLineBytes * i_1) + DIBBytes)) + 1) = (-(ebx_11) - 1);
00631fa4                                  *(uint8_t*)((eax_5 + ((arg1->DIBLineBytes * i_1) + DIBBytes)) + 2) = (-(edx_9) - 1);
00631fab                                  DIBChannels = arg1->DIBChannels;
00631ee7                              }
00631ee7                              else if (JPGColor == IJL_YCBCR)
00631eec                              {
00631efa                                  *(uint8_t*)((char*)ebx_2 + eax_5) = ebx_7;
00631f11                                  *(uint8_t*)((eax_5 + ((arg1->DIBLineBytes * i_1) + DIBBytes)) + 1) = ebx_11;
00631f21                                  *(uint8_t*)((eax_5 + ((arg1->DIBLineBytes * i_1) + DIBBytes)) + 2) = edx_9;
00631f2d                                  *(uint8_t*)((eax_5 + ((arg1->DIBLineBytes * i_1) + DIBBytes)) + 3) = 0xff;
00631f35                                  DIBChannels = arg1->DIBChannels;
00631eec                              }
00631eec                              
00631f39                              eax_5 += DIBChannels;
00631f3d                              edx_4 = var_2c_1;
00631f43                          } while (eax_5 < edx_4);
00631dfb                      }
00631dfb                      
00631f4d                      i_1 -= 1;
00631f51                  } while (i_1 != 0xffffffff);
00631de5              }
00631dda          }
00631dab      }
00631d80  }

00631e52                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
00631e91                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00631ecd                                         8d 76 00                                                               .v.
00631fb1                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00632023           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
00632065                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
0063209f                                                                                               90                                 .
00632138                                                                          90 8d b4 26 00 00 00 00                          ...&....

00632140  int32_t sub_632140(void* arg1, int32_t* arg2, int32_t arg3, int32_t arg4, void* arg5)

00632140  {
0063214b      int32_t* edx = arg2;
0063214b      
0063215a      if (arg3 >= *(uint32_t*)((char*)arg1 + 0x30))
0063215a      {
0063215c          int32_t eax_1 = *(uint32_t*)((char*)arg1 + 0x34);
0063215c          
00632162          if (eax_1 != 3)
0063216b              return eax_1;
0063215a      }
0063215a      
0063216c      int32_t eax_2 = *(uint32_t*)((char*)arg1 + 0x58);
0063216c      
006323a6      if ((eax_2 == 4 && *(uint32_t*)((char*)arg1 + 0x34) == 5))
006323a6      {
006323ac          eax_2 = edx[1];
006323af          int32_t ecx_16 = edx[3];
006323af          
006323b4          if (eax_2 < ecx_16)
006323b4          {
006323ba              int32_t ebx_13 = edx[2];
006323bf              int32_t esi_11 = (eax_2 << 5);
006323c2              int32_t ebp_4 = eax_2;
006323c4              eax_2 = ecx_16;
006323c6              void* edi_8 = arg5;
006323c6              
00632456              do
00632456              {
006323ca                  int32_t ecx_17 = *(uint32_t*)edx;
006323ca                  
006323ce                  if (ecx_17 < ebx_13)
006323ce                  {
006323d4                      void* eax_5 = ((char*)edi_8 + esi_11);
006323d4                      
0063243b                      do
0063243b                      {
006323f0                          edx = *(uint8_t*)((char*)eax_5 + ecx_17);
006323fd                          *(uint8_t*)(((*(uint32_t*)((char*)arg1 + 0x3c) * ebp_4) + arg4) + (ecx_17 << 2)) = edx;
00632400                          ebx_13 = *(uint8_t*)((char*)eax_5 + ecx_17);
0063240d                          *(uint8_t*)((((*(uint32_t*)((char*)arg1 + 0x3c) * ebp_4) + arg4) + (ecx_17 << 2)) + 1) = ebx_13;
00632411                          int32_t edx_10;
00632411                          edx_10 = *(uint8_t*)((char*)eax_5 + ecx_17);
0063241e                          *(uint8_t*)((((*(uint32_t*)((char*)arg1 + 0x3c) * ebp_4) + arg4) + (ecx_17 << 2)) + 2) = edx_10;
0063242c                          *(uint8_t*)((((*(uint32_t*)((char*)arg1 + 0x3c) * ebp_4) + arg4) + (ecx_17 << 2)) + 3) = 0xff;
00632431                          ecx_17 += 1;
00632436                          ebx_13 = arg2[2];
0063243b                      } while (ecx_17 < ebx_13);
0063243b                      
00632445                      edi_8 = arg5;
00632449                      edx = arg2;
0063244d                      eax_2 = edx[3];
006323ce                  }
006323ce                  
00632450                  esi_11 += 0x20;
00632453                  ebp_4 += 1;
00632456              } while (ebp_4 < eax_2);
006323b4          }
006323a6      }
006323a6      else if (((eax_2 == 3 || eax_2 == 1) && *(uint32_t*)((char*)arg1 + 0x34) == 5))
006322c7      {
006322d0          if (arg3 >= 3)
006322d0          {
00632350              eax_2 = edx[1];
00632353              int32_t esi_8 = edx[3];
00632353              
00632358              if (eax_2 < esi_8)
00632358              {
0063235e                  int32_t ebx_8 = edx[2];
0063235e                  
0063238a                  do
0063238a                  {
00632361                      int32_t ecx_15 = *(uint32_t*)edx;
00632361                      
00632365                      if (ecx_15 < ebx_8)
00632365                      {
00632382                          do
00632382                          {
00632378                              *(uint8_t*)(((eax_2 * *(uint32_t*)((char*)arg1 + 0x3c)) + arg4) + (ecx_15 << 2)) = 0xff;
0063237c                              ecx_15 += 1;
0063237d                              ebx_8 = edx[2];
00632382                          } while (ecx_15 < ebx_8);
00632382                          
00632384                          esi_8 = edx[3];
00632365                      }
00632365                      
00632387                      eax_2 += 1;
0063238a                  } while (eax_2 < esi_8);
00632358              }
006322d0          }
006322d0          else
006322d0          {
006322d6              int32_t esi_5 = edx[1];
006322d9              int32_t ebx_6 = edx[3];
006322d9              
006322de              if (esi_5 < ebx_6)
006322de              {
006322e4                  int32_t ecx_11 = edx[2];
006322e9                  eax_2 = (esi_5 << 5);
006322ec                  void* edi_6 = arg5;
006322ec                  
0063233d                  do
0063233d                  {
006322f0                      int32_t ebp_3 = *(uint32_t*)edx;
006322f0                      
006322f4                      if (ebp_3 < ecx_11)
006322f4                      {
006322f6                          void* ebx_7 = ((char*)edi_6 + eax_2);
006322fd                          int32_t var_14_3 = eax_2;
006322fd                          
00632326                          do
00632326                          {
00632310                              eax_2 = *(uint8_t*)((char*)ebx_7 + ebp_3);
0063231d                              *(uint8_t*)(((esi_5 * *(uint32_t*)((char*)arg1 + 0x3c)) + arg4) + (ebp_3 << 2)) = eax_2;
00632320                              ebp_3 += 1;
00632321                              ecx_11 = edx[2];
00632326                          } while (ebp_3 < ecx_11);
00632326                          
00632328                          eax_2 = var_14_3;
00632330                          edi_6 = arg5;
00632334                          ebx_6 = edx[3];
006322f4                      }
006322f4                      
00632337                      eax_2 += 0x20;
0063233a                      esi_5 += 1;
0063233d                  } while (esi_5 < ebx_6);
006322de              }
006322d0          }
006322c7      }
006322c7      else if ((eax_2 == 4 && *(uint32_t*)((char*)arg1 + 0x34) == 1))
006322b6      {
0063220a      label_63220a:
0063220a          int32_t ebx_3 = edx[1];
0063220d          int32_t esi_3 = edx[3];
0063220d          
00632212          if (ebx_3 < esi_3)
00632212          {
00632214              eax_2 = edx[2];
00632219              int32_t ecx_6 = (ebx_3 << 5);
0063221c              void* edi_4 = arg5;
0063221c              
006322a0              do
006322a0              {
00632220                  int32_t ebp_2 = *(uint32_t*)edx;
00632220                  
00632224                  if (ebp_2 < eax_2)
00632224                  {
0063222d                      char* esi_4 = (ebp_2 * 3);
0063223d                      int32_t ebx_4 = ((char*)edi_4 + ecx_6);
0063223d                      
00632285                      do
00632285                      {
00632240                          eax_2 = *(uint8_t*)(ebx_4 + ebp_2);
0063224f                          esi_4[((*(uint32_t*)((char*)arg1 + 0x3c) * ebx_3) + arg4)] = eax_2;
00632252                          int32_t edx_3;
00632252                          edx_3 = *(uint8_t*)(ebx_4 + ebp_2);
00632261                          esi_4[(((*(uint32_t*)((char*)arg1 + 0x3c) * ebx_3) + arg4) + 1)] = edx_3;
00632265                          int32_t ecx_9;
00632265                          ecx_9 = *(uint8_t*)(ebx_4 + ebp_2);
00632270                          ebp_2 += 1;
00632275                          esi_4[(((*(uint32_t*)((char*)arg1 + 0x3c) * ebx_3) + arg4) + 2)] = ecx_9;
00632279                          esi_4 = &esi_4[3];
00632280                          eax_2 = arg2[2];
00632285                      } while (ebp_2 < eax_2);
00632285                      
0063228f                      edi_4 = arg5;
00632293                      edx = arg2;
00632297                      esi_3 = edx[3];
00632224                  }
00632224                  
0063229a                  ecx_6 += 0x20;
0063229d                  ebx_3 += 1;
006322a0              } while (ebx_3 < esi_3);
00632212          }
006322b6      }
006322b6      else
006322b6      {
00632196          if (eax_2 == 4)
00632196          {
00632202              eax_2 = *(uint32_t*)((char*)arg1 + 0x34);
00632202              
00632208              if (eax_2 == 2)
00632208                  goto label_63220a;
00632196          }
00632196          
00632198          int32_t esi_1 = edx[1];
0063219b          int32_t ebx_1 = edx[3];
0063219b          
006321a0          if (esi_1 < ebx_1)
006321a0          {
006321a2              int32_t ecx_1 = edx[2];
006321a7              eax_2 = (esi_1 << 5);
006321aa              void* edi_1 = arg5;
006321aa              
006321f8              do
006321f8              {
006321ae                  int32_t ebp_1 = *(uint32_t*)edx;
006321ae                  
006321b2                  if (ebp_1 < ecx_1)
006321b2                  {
006321b4                      char* ebx_2 = ((char*)edi_1 + eax_2);
006321b7                      int32_t var_14_1 = eax_2;
006321b7                      
006321e1                      do
006321e1                      {
006321c3                          eax_2 = ebx_2[ebp_1];
006321d1                          char* edi_3 = (*(uint32_t*)((char*)arg1 + 0x30) * ebp_1);
006321d8                          ebp_1 += 1;
006321d9                          edi_3[((esi_1 * *(uint32_t*)((char*)arg1 + 0x3c)) + arg4)] = eax_2;
006321dc                          ecx_1 = edx[2];
006321e1                      } while (ebp_1 < ecx_1);
006321e1                      
006321e3                      eax_2 = var_14_1;
006321eb                      edi_1 = arg5;
006321ef                      ebx_1 = edx[3];
006321b2                  }
006321b2                  
006321f2                  eax_2 += 0x20;
006321f5                  esi_1 += 1;
006321f8              } while (esi_1 < ebx_1);
006321a0          }
006322b6      }
006322b6      
00632201      return eax_2;
00632140  }

006322ab                                   90 8d 74 26 00                                                             ..t&.
00632344              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
00632391                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00632461     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

00632470  int32_t _US_General_P_MCU(void* arg1, int32_t arg2, int32_t arg3)

00632470  {
0063247a      void* ebp = arg1;
00632481      void* ebx = nullptr;
00632485      int16_t* esi = nullptr;
00632492      void* var_64 = nullptr;
0063249b      void* s;
0063249b      __builtin_memset(&s, 0, 0x18);
006324c6      char var_2c = 0;
006324d6      void* var_24_1;
006324d6      int16_t* var_20_1;
006324d6      void* var_1c_1;
006324d6      void* var_18_1;
006324d6      void* var_14_1;
006324d6      int32_t ecx;
006324d6      int32_t edx;
006324d6      
006324d6      if (*(uint32_t*)((char*)ebp + 0x4de8) == 1)
006324d6      {
006334f1          edx = *(uint32_t*)((char*)ebp + 0x37b8);
006334f1          
006334fa          if (edx == 2)
006334fa          {
00633633              ecx = *(uint32_t*)((char*)ebp + 0x37bc);
00633633              
0063363c              if (ecx == 1)
0063363c              {
00633644                  int32_t esi_50 = 0;
00633646                  var_2c = 1;
0063364d                  int32_t eax_104 = *(uint32_t*)((char*)ebp + 0x37c0);
00633653                  int32_t i = (eax_104 - 1);
00633653                  
00633658                  if (eax_104 != 0)
00633658                  {
0063365a                      int32_t eax_105 = *(uint32_t*)((char*)ebp + 0x37cc);
00633669                      int32_t eax_107 = (i << 4);
00633669                      
00633693                      do
00633693                      {
00633685                          i -= 1;
0063368b                          esi_50 += (*(uint32_t*)((eax_107 + eax_105) + 4) * *(uint32_t*)((eax_107 + eax_105) + 8));
0063368d                          eax_107 -= 0x10;
00633693                      } while (i != 0xffffffff);
00633693                      
0063369c                      ebx = nullptr;
006336a3                      ebp = arg1;
00633658                  }
00633658                  
006336d3                  void* eax = (((arg2 * 2) * (esi_50 << 6)) + *(uint32_t*)(*(uint32_t*)((char*)ebp + 0x4dec) + 4));
006336d6                  esi = ((esi_50 << 8) + eax);
006336d8                  var_24_1 = eax;
0063363c              }
006334fa          }
006334fa          else
00633500              ecx = *(uint32_t*)((char*)ebp + 0x37bc);
00633500          
00633512          if ((edx == 2 && ecx == 2))
00633512          {
0063351a              int32_t esi_43 = *(uint32_t*)((char*)ebp + 0x37c0);
00633523              var_2c = 2;
0063352a              int32_t eax_97 = 0;
0063352a              
0063352e              if (esi_43 != 0)
0063352e              {
00633530                  int32_t esi_44 = *(uint32_t*)((char*)ebp + 0x37cc);
00633557                  int32_t esi_47 = ((esi_43 - 1) << 4);
00633559                  int32_t i_1 = (esi_43 - 1);
00633559                  
00633572                  do
00633572                  {
00633564                      i_1 -= 1;
0063356a                      eax_97 += (*(uint32_t*)((esi_47 + esi_44) + 4) * *(uint32_t*)((esi_47 + esi_44) + 8));
0063356c                      esi_47 -= 0x10;
00633572                  } while (i_1 != 0xffffffff);
00633572                  
00633582                  ebp = arg1;
0063352e              }
0063352e              
00633589              int32_t eax_98 = (eax_97 << 6);
0063359a              void** ebp_42 = *(uint32_t*)((char*)ebp + 0x4dec);
006335a0              void* esi_48 = *(uint32_t*)ebp_42;
006335b3              int32_t ecx_99 = (arg2 * eax_98);
006335b6              int32_t edx_37 = (ecx_99 + eax_98);
006335b9              int32_t ecx_100 = (ecx_99 + (eax_98 << 1));
006335bf              var_64 = ((char*)esi_48 + (edx_37 << 1));
006335c9              void* ebx_40 = ((arg2 * 2) * eax_98);
006335cf              var_14_1 = ((char*)esi_48 + ebx_40);
006335d9              int32_t esi_49 = ebp_42[1];
006335dc              int32_t ebp_43 = ebp_42[2];
006335df              var_18_1 = ((char*)esi_48 + (ecx_100 << 1));
006335e9              esi = (esi_49 + (ecx_100 << 1));
006335ec              var_24_1 = ((char*)ebx_40 + esi_49);
006335f9              s = (ebp_43 + (edx_37 << 1));
0063360b              var_1c_1 = ((char*)ebx_40 + ebp_43);
00633619              ebx = nullptr;
00633620              var_20_1 = (ebp_43 + (ecx_100 << 1));
00633627              ebp = arg1;
00633512          }
006324d6      }
006324d6      else
006324d6      {
006324dc          edx = *(uint32_t*)((char*)ebp + 0x37b8);
006324e2          ecx = *(uint32_t*)((char*)ebp + 0x37bc);
006324d6      }
006324d6      
006324f3      int16_t* var_60 = *(uint32_t*)((char*)ebp + 0x4834);
0063255d      void var_9c;
0063255d      int32_t result = sub_62e6a0(((char*)ebp + 4), (edx * 8), (ecx * 8), arg2, arg3, *(uint32_t*)((char*)ebp + 0x30), *(uint32_t*)((char*)ebp + 0x3c), *(uint32_t*)((char*)ebp + 0x20), *(uint32_t*)((char*)ebp + 0x24), *(uint32_t*)((char*)ebp + 0x28), ((char*)ebp + 0x3814), &var_9c);
0063255d      
00632564      if (result == 0)
00632564      {
0063256a          int32_t ecx_5 = *(uint32_t*)((char*)ebp + 0x34);
006334b2          int32_t var_48_1;
006334b2          
006334b2          if ((ecx_5 == 2 && *(uint32_t*)((char*)ebp + 0x58) == 1))
006334b2          {
006334be              var_48_1 = *(uint32_t*)((char*)ebp + 0x3814);
006334c5              int32_t eax_96 = *(uint32_t*)((char*)ebp + 0x3820);
006334c5              
006334cd              if (eax_96 == 0)
006334cf                  var_48_1 += 2;
006334cd              else if (eax_96 == 1)
006334e5                  var_48_1 += 1;
006334b2          }
006334b2          else
00632582              var_48_1 = (*(uint32_t*)((char*)ebp + 0x3814) + *(uint32_t*)((char*)ebp + 0x3820));
00632582          
0063258b          int32_t i_8 = *(uint32_t*)((char*)ebp + 0x30);
0063258e          int32_t i_10 = *(uint32_t*)((char*)ebp + 0x37c0);
00632594          int32_t i_7 = 0;
0063259b          int16_t* var_44_1 = esi;
0063259b          
006325a4          while (true)
006325a4          {
006325a4              int32_t i_9;
006325a4              
006325a4              if (i_10 >= i_8)
006325b0                  i_9 = i_8;
006325a4              else
006325a6                  i_9 = i_10;
006325a6              
006325bb              if (i_7 >= i_9)
006325bb                  break;
006325bb              
00633409              if ((*(uint32_t*)((char*)arg1 + 0x58) != 4 || i_7 <= 0))
00633409              {
006325db                  int32_t ecx_7 = (i_7 << 4);
006325ec                  void* ecx_8 = (ecx_7 + *(uint32_t*)((char*)arg1 + 0x37cc));
006325ff                  int32_t ecx_9 = *(uint32_t*)((char*)ecx_8 + 4);
00632605                  int32_t ebp_2 = (((int64_t)*(uint32_t*)((char*)arg1 + 0x37b8)) / ecx_9);
0063260e                  int32_t ebx_3 = *(uint32_t*)((char*)ecx_8 + 8);
0063261f                  int32_t temp0_2 = (((int64_t)*(uint32_t*)((char*)arg1 + 0x37bc)) / ebx_3);
0063262b                  void var_59c;
0063262b                  
0063262b                  if (var_2c == 1)
0063262b                  {
006331e0                      void* j_1 = &var_59c;
006331e4                      int32_t i_2 = 0;
006331e4                      
006331e8                      if (ecx_9 > 0)
006331e8                      {
006332c9                          do
006332c9                          {
006331fc                              void* j = j_1;
00633204                              int16_t* edx_33 = var_60;
00633212                              int16_t* ecx_96 = var_44_1;
00633212                              
00633288                              do
00633288                              {
0063323a                                  if (ebp_2 == 2)
0063323a                                  {
006332e3                                      int32_t ebp_32 = (((int32_t)*(uint16_t*)edx_33) * 3);
006332f8                                      *(uint8_t*)j = ((int8_t)(((((int32_t)*(uint16_t*)((char*)var_24_1 + 0xe)) + ebp_32) + 1) >> 2));
00633305                                      *(uint8_t*)((char*)j + 1) = ((int8_t)(((((int32_t)edx_33[1]) + ebp_32) + 2) >> 2));
0063330c                                      int32_t ebp_33 = (((int32_t)edx_33[1]) * 3);
00633319                                      *(uint8_t*)((char*)j + 2) = ((int8_t)(((ebp_33 + ((int32_t)*(uint16_t*)edx_33)) + 1) >> 2));
00633327                                      *(uint8_t*)((char*)j + 3) = ((int8_t)(((ebp_33 + ((int32_t)edx_33[2])) + 2) >> 2));
0063332e                                      int32_t ebp_34 = (((int32_t)edx_33[2]) * 3);
0063333c                                      *(uint8_t*)((char*)j + 4) = ((int8_t)(((ebp_34 + ((int32_t)edx_33[1])) + 1) >> 2));
0063334a                                      *(uint8_t*)((char*)j + 5) = ((int8_t)(((ebp_34 + ((int32_t)edx_33[3])) + 2) >> 2));
00633351                                      int32_t ebp_35 = (((int32_t)edx_33[3]) * 3);
0063335f                                      *(uint8_t*)((char*)j + 6) = ((int8_t)(((ebp_35 + ((int32_t)edx_33[2])) + 1) >> 2));
0063336d                                      *(uint8_t*)((char*)j + 7) = ((int8_t)(((ebp_35 + ((int32_t)edx_33[4])) + 2) >> 2));
00633374                                      int32_t ebp_36 = (((int32_t)edx_33[4]) * 3);
00633382                                      *(uint8_t*)((char*)j + 8) = ((int8_t)(((ebp_36 + ((int32_t)edx_33[3])) + 1) >> 2));
00633390                                      *(uint8_t*)((char*)j + 9) = ((int8_t)(((ebp_36 + ((int32_t)edx_33[5])) + 2) >> 2));
00633397                                      int32_t ebp_37 = (((int32_t)edx_33[5]) * 3);
006333a5                                      *(uint8_t*)((char*)j + 0xa) = ((int8_t)(((ebp_37 + ((int32_t)edx_33[4])) + 1) >> 2));
006333b3                                      *(uint8_t*)((char*)j + 0xb) = ((int8_t)(((ebp_37 + ((int32_t)edx_33[6])) + 2) >> 2));
006333ba                                      int32_t ebp_38 = (((int32_t)edx_33[6]) * 3);
006333c8                                      *(uint8_t*)((char*)j + 0xc) = ((int8_t)(((ebp_38 + ((int32_t)edx_33[5])) + 1) >> 2));
006333d6                                      *(uint8_t*)((char*)j + 0xd) = ((int8_t)(((ebp_38 + ((int32_t)edx_33[7])) + 2) >> 2));
006333dd                                      int32_t ebp_39 = (((int32_t)edx_33[7]) * 3);
006333eb                                      *(uint8_t*)((char*)j + 0xe) = ((int8_t)(((((int32_t)edx_33[6]) + ebp_39) + 1) >> 2));
006333f8                                      *(uint8_t*)((char*)j + 0xf) = ((int8_t)(((((int32_t)*(uint16_t*)ecx_96) + ebp_39) + 2) >> 2));
0063323a                                  }
0063323a                                  else
0063323a                                  {
00633240                                      int32_t eax_37;
00633240                                      eax_37 = *(uint8_t*)edx_33;
00633242                                      *(uint8_t*)j = eax_37;
00633244                                      eax_37 = edx_33[1];
00633247                                      *(uint8_t*)((char*)j + 1) = eax_37;
0063324a                                      eax_37 = edx_33[2];
0063324d                                      *(uint8_t*)((char*)j + 2) = eax_37;
00633250                                      eax_37 = edx_33[3];
00633253                                      *(uint8_t*)((char*)j + 3) = eax_37;
00633256                                      eax_37 = edx_33[4];
00633259                                      *(uint8_t*)((char*)j + 4) = eax_37;
0063325c                                      eax_37 = edx_33[5];
0063325f                                      *(uint8_t*)((char*)j + 5) = eax_37;
00633262                                      eax_37 = edx_33[6];
00633265                                      *(uint8_t*)((char*)j + 6) = eax_37;
00633268                                      eax_37 = edx_33[7];
0063326b                                      *(uint8_t*)((char*)j + 7) = eax_37;
0063323a                                  }
0063323a                                  
0063326e                                  edx_33 = &edx_33[8];
00633271                                  ecx_96 = &ecx_96[8];
00633274                                  j += 0x20;
00633277                                  var_24_1 += 0x10;
00633288                              } while (((char*)j_1 + 0x100) > j);
00633288                              
0063328a                              var_60 = edx_33;
0063329f                              var_44_1 = ecx_96;
006332bb                              j_1 += (ebp_2 << 3);
006332c4                              i_2 += 1;
006332c9                          } while (i_2 < *(uint32_t*)((ecx_7 + *(uint32_t*)((char*)arg1 + 0x37cc)) + 4));
006331e8                      }
0063262b                  }
0063262b                  else if (var_2c != 2)
00632634                  {
0063263a                      int32_t edx_8 = 0;
0063263a                      
0063263e                      if (ebx_3 > 0)
0063263e                      {
00632646                          int32_t esi_5 = (temp0_2 << 8);
00632649                          int32_t eax_16 = (temp0_2 << 5);
00632659                          int32_t esi_8 = (ebp_2 * 8);
00632673                          int32_t esi_9 = 0;
00632676                          int32_t var_40_1 = 0;
00632684                          int32_t eax_17 = esi_5;
00632692                          void* ebp_3 = ecx_8;
00632692                          
00632854                          do
00632854                          {
006326b4                              if (ecx_9 > 0)
006326b4                              {
006326c1                                  void* esi_10 = (&var_59c + esi_9);
006326c8                                  int32_t edi_4 = ebp_2;
006326d6                                  int32_t edx_9 = 0;
006326d6                                  
00632838                                  do
00632838                                  {
006326dd                                      int32_t ebx_4 = 0;
006326dd                                      
006326e1                                      if (eax_17 > 0)
006326e1                                      {
006326ee                                          int32_t ecx_10 = eax_16;
006326f5                                          int32_t edi_5 = esi_8;
006326f5                                          
00632807                                          do
00632807                                          {
006326fc                                              void* edx_10 = nullptr;
006326fc                                              
00632700                                              if (edi_5 > 0)
00632700                                              {
00632717                                                  int16_t* esi_11 = var_60;
0063271e                                                  int32_t ebp_5 = ebp_2;
0063271e                                                  
006327df                                                  do
006327df                                                  {
0063272c                                                      char eax_18 = ((int8_t)*(uint16_t*)esi_11);
0063272f                                                      void* ebx_5 = nullptr;
00632731                                                      esi_11 = &esi_11[1];
00632731                                                      
00632736                                                      if (ecx_10 > 0)
00632736                                                      {
00632743                                                          void* edi_7 = ((char*)edx_10 + ((char*)esi_10 + ebx_4));
00632746                                                          uint32_t eax_19 = ((uint32_t)eax_18);
00632749                                                          void* var_58_1 = edi_7;
00632750                                                          uint32_t var_5c_1 = eax_19;
00632750                                                          
006327c4                                                          do
006327c4                                                          {
00632765                                                              int32_t i_3 = 0;
00632765                                                              
00632769                                                              if (ebp_5 > 0)
00632769                                                              {
0063276e                                                                  void* esi_14;
0063276e                                                                  
0063276e                                                                  if (ebp_5 < 6)
00632900                                                                      esi_14 = ((char*)ebx_5 + edi_7);
0063276e                                                                  else
0063276e                                                                  {
00632774                                                                      void* esi_12 = ((char*)ebx_5 + edi_7);
00632774                                                                      
00632798                                                                      do
00632798                                                                      {
00632780                                                                          *(uint8_t*)((char*)esi_12 + i_3) = eax_19;
00632783                                                                          *(uint8_t*)(((char*)esi_12 + i_3) + 1) = eax_19;
00632787                                                                          *(uint8_t*)(((char*)esi_12 + i_3) + 2) = eax_19;
0063278b                                                                          *(uint8_t*)(((char*)esi_12 + i_3) + 3) = eax_19;
0063278f                                                                          *(uint8_t*)(((char*)esi_12 + i_3) + 4) = eax_19;
00632793                                                                          i_3 += 5;
00632798                                                                      } while (i_3 <= (ebp_2 - 6));
00632798                                                                      
006327a1                                                                      ebp_5 = ebp_2;
006327a9                                                                      esi_14 = esi_12;
0063276e                                                                  }
0063276e                                                                  
006327b6                                                                  do
006327b6                                                                  {
006327b0                                                                      *(uint8_t*)((char*)esi_14 + i_3) = eax_19;
006327b3                                                                      i_3 += 1;
006327b6                                                                  } while (i_3 < ebp_5);
006327b6                                                                  
006327b8                                                                  ecx_10 = eax_16;
00632769                                                              }
00632769                                                              
006327bf                                                              ebx_5 += 0x20;
006327c4                                                          } while (ebx_5 < ecx_10);
00632736                                                      }
00632736                                                      
006327d4                                                      edx_10 += ebp_5;
006327df                                                  } while (edx_10 < esi_8);
006327df                                                  
006327e5                                                  var_60 = esi_11;
006327fa                                                  edi_5 = esi_8;
006327fc                                                  eax_17 = esi_5;
00632700                                              }
00632700                                              
00632803                                              ebx_4 += ecx_10;
00632807                                          } while (ebx_4 < eax_17);
00632807                                          
00632814                                          edi_4 = ebp_2;
00632828                                          ebp_3 = (*(uint32_t*)((char*)arg1 + 0x37cc) + ecx_7);
0063282f                                          ecx_9 = *(uint32_t*)((char*)ebp_3 + 4);
006326e1                                      }
006326e1                                      
00632832                                      esi_10 += (edi_4 << 3);
00632835                                      edx_9 += 1;
00632838                                  } while (edx_9 < ecx_9);
00632838                                  
0063284c                                  ebx_3 = *(uint32_t*)((char*)ebp_3 + 8);
006326b4                              }
006326b4                              
0063284f                              esi_9 += eax_17;
00632851                              edx_8 += 1;
00632854                          } while (edx_8 < ebx_3);
0063263e                      }
00632634                  }
00632634                  else if (ebx_3 > 0)
0063291b                  {
00632923                      int32_t edx_14 = (temp0_2 << 8);
00632933                      int32_t edi_10 = (ebp_2 * 8);
0063293e                      int32_t esi_16 = (temp0_2 << 5);
0063294b                      int32_t edi_11 = 0;
00632959                      void* edx_16 = ecx_8;
00632967                      int32_t eax_26 = edx_14;
00632967                      
00632c34                      do
00632c34                      {
0063297e                          void* ebp_8 = (&var_59c + (eax_26 * edi_11));
00632980                          int32_t esi_19 = 0;
00632980                          
00632984                          if (ecx_9 > 0)
00632984                          {
0063298a                              void* var_6c_3 = edx_16;
00632991                              int32_t ebx_6 = ebp_2;
00632991                              
00632c21                              do
00632c21                              {
00632c4a                                  if ((ebx_6 == 2 && temp0_2 == 2))
00632c4a                                  {
00632c50                                      char* edx_23 = nullptr;
00632c57                                      int16_t* eax_32 = var_60;
00632c65                                      int32_t var_40_3 = 7;
006330ff                                      bool cond:5_1;
006330ff                                      
006330ff                                      do
006330ff                                      {
00632c7d                                          int32_t esi_24 = (((int32_t)*(uint16_t*)eax_32) * 9);
00632c8f                                          int32_t ebx_15 = ((int32_t)eax_32[1]);
00632c9f                                          int32_t var_78_3;
00632c9f                                          int32_t var_70_3;
00632c9f                                          int32_t ebx_17;
00632c9f                                          
00632c9f                                          if (edx_23 == 0)
00632c9f                                          {
00632cdb                                              ebx_17 = (((int32_t)*(uint16_t*)((char*)var_64 + 0x70)) * 3);
00632cf0                                              var_70_3 = ((int32_t)*(uint16_t*)((char*)var_14_1 + 0x7e));
00632cfb                                              var_78_3 = ((int32_t)*(uint16_t*)((char*)var_64 + 0x72));
00632c9f                                          }
00632c9f                                          else
00632c9f                                          {
00632ca5                                              ebx_17 = (((int32_t)eax_32[-8]) * 3);
00632cb7                                              var_70_3 = ((int32_t)*(uint16_t*)((char*)var_24_1 - 2));
00632cbe                                              var_78_3 = ((int32_t)eax_32[-7]);
00632c9f                                          }
00632c9f                                          
00632d0b                                          int32_t var_74_4;
00632d0b                                          int32_t var_6c_5;
00632d0b                                          int32_t var_54_3;
00632d0b                                          
00632d0b                                          if (var_40_3 == 0)
00632d0b                                          {
00632d4d                                              var_54_3 = (((int32_t)*(uint16_t*)s) * 3);
00632d5f                                              var_6c_5 = ((int32_t)*(uint16_t*)((char*)var_1c_1 + 0xe));
00632d71                                              var_74_4 = ((int32_t)*(uint16_t*)((char*)s + 2));
00632d0b                                          }
00632d0b                                          else
00632d0b                                          {
00632d14                                              var_54_3 = (((int32_t)eax_32[8]) * 3);
00632d26                                              var_6c_5 = ((int32_t)*(uint16_t*)((char*)var_24_1 + 0x1e));
00632d31                                              var_74_4 = ((int32_t)eax_32[9]);
00632d0b                                          }
00632d0b                                          
00632d78                                          int32_t edi_18 = ((((int32_t)*(uint16_t*)((char*)var_24_1 + 0xe)) * 3) + esi_24);
00632d92                                          *(uint8_t*)(edx_23 + ebp_8) = ((int8_t)((((edi_18 + ebx_17) + var_70_3) + 8) >> 4));
00632d9c                                          void* eax_33 = &eax_32[1];
00632d9f                                          int32_t esi_25 = (esi_24 + (ebx_15 * 3));
00632db6                                          *(uint8_t*)((edx_23 + ebp_8) + 1) = ((int8_t)((((ebx_17 + esi_25) + var_78_3) + 7) >> 4));
00632dcc                                          *(uint8_t*)((edx_23 + ebp_8) + 0x20) = ((int8_t)((((edi_18 + var_54_3) + var_6c_5) + 8) >> 4));
00632dde                                          void* i_4 = (((char*)ebp_8 + edx_23) + 2);
00632de2                                          *(uint8_t*)((edx_23 + ebp_8) + 0x21) = ((int8_t)((((var_54_3 + esi_25) + var_74_4) + 7) >> 4));
00632dea                                          void* var_64_2 = ((char*)var_64 + 2);
00632df2                                          void* var_28_1 = ((char*)s + 2);
00632df2                                          
00632f65                                          do
00632f65                                          {
00632e13                                              int32_t edx_25 = (((int32_t)*(uint16_t*)eax_33) * 9);
00632e1d                                              int32_t ecx_47 = ((int32_t)*(uint16_t*)((char*)eax_33 + 2));
00632e34                                              int32_t var_78_4;
00632e34                                              int32_t var_74_5;
00632e34                                              int32_t ebp_20;
00632e34                                              
00632e34                                              if (edx_23 == 0)
00632e34                                              {
00632e6b                                                  ebp_20 = (((int32_t)*(uint16_t*)((char*)var_64_2 + 0x70)) * 3);
00632e77                                                  var_78_4 = ((int32_t)*(uint16_t*)((char*)var_64_2 + 0x6e));
00632e7e                                                  var_74_5 = ((int32_t)*(uint16_t*)((char*)var_64_2 + 0x72));
00632e34                                              }
00632e34                                              else
00632e34                                              {
00632e3a                                                  ebp_20 = (((int32_t)*(uint16_t*)((char*)eax_33 - 0x10)) * 3);
00632e42                                                  var_78_4 = ((int32_t)*(uint16_t*)((char*)eax_33 - 0x12));
00632e4d                                                  var_74_5 = ((int32_t)*(uint16_t*)((char*)eax_33 - 0xe));
00632e34                                              }
00632e34                                              
00632e8e                                              int32_t var_7c_3;
00632e8e                                              int32_t var_70_4;
00632e8e                                              int32_t var_38_2;
00632e8e                                              
00632e8e                                              if (var_40_3 == 0)
00632e8e                                              {
00632ec0                                                  int16_t* ecx_55 = var_28_1;
00632ecd                                                  var_38_2 = (((int32_t)*(uint16_t*)ecx_55) * 3);
00632edc                                                  var_7c_3 = ((int32_t)ecx_55[-1]);
00632ee3                                                  var_70_4 = ((int32_t)ecx_55[1]);
00632e8e                                              }
00632e8e                                              else
00632e8e                                              {
00632e9b                                                  var_38_2 = (((int32_t)*(uint16_t*)((char*)eax_33 + 0x10)) * 3);
00632ea2                                                  var_7c_3 = ((int32_t)*(uint16_t*)((char*)eax_33 + 0xe));
00632ead                                                  var_70_4 = ((int32_t)*(uint16_t*)((char*)eax_33 + 0x12));
00632e8e                                              }
00632e8e                                              
00632eea                                              int32_t esi_30 = ((((int32_t)*(uint16_t*)((char*)eax_33 - 2)) * 3) + edx_25);
00632efd                                              eax_33 += 2;
00632f00                                              *(uint8_t*)i_4 = ((int8_t)((((esi_30 + ebp_20) + var_78_4) + 8) >> 4));
00632f09                                              int32_t edx_26 = (edx_25 + (ecx_47 * 3));
00632f22                                              *(uint8_t*)((char*)i_4 + 1) = ((int8_t)((((ebp_20 + edx_26) + var_74_5) + 7) >> 4));
00632f3c                                              *(uint8_t*)((char*)i_4 + 0x20) = ((int8_t)((((esi_30 + var_38_2) + var_7c_3) + 8) >> 4));
00632f46                                              *(uint8_t*)((char*)i_4 + 0x21) = ((int8_t)((((var_38_2 + edx_26) + var_70_4) + 7) >> 4));
00632f49                                              i_4 += 2;
00632f53                                              var_64_2 += 2;
00632f5b                                              var_28_1 += 2;
00632f65                                          } while ((((char*)ebp_8 + edx_23) + 0xe) > i_4);
00632f65                                          
00632f75                                          int32_t ebp_26 = (((int32_t)*(uint16_t*)eax_33) * 9);
00632f87                                          int32_t ebx_24 = ((int32_t)*(uint16_t*)var_44_1);
00632f96                                          int32_t var_78_5;
00632f96                                          int32_t var_6c_7;
00632f96                                          int32_t ebx_26;
00632f96                                          
00632f96                                          if (edx_23 == 0)
00632f96                                          {
00632fcb                                              ebx_26 = (((int32_t)*(uint16_t*)((char*)var_64_2 + 0x70)) * 3);
00632fd9                                              var_6c_7 = ((int32_t)*(uint16_t*)((char*)var_64_2 + 0x6e));
00632fe4                                              var_78_5 = ((int32_t)*(uint16_t*)((char*)var_18_1 + 0x70));
00632f96                                          }
00632f96                                          else
00632f96                                          {
00632f9c                                              ebx_26 = (((int32_t)*(uint16_t*)((char*)eax_33 - 0x10)) * 3);
00632fa3                                              var_6c_7 = ((int32_t)*(uint16_t*)((char*)eax_33 - 0x12));
00632fae                                              var_78_5 = ((int32_t)var_44_1[-8]);
00632f96                                          }
00632f96                                          
00632feb                                          var_44_1 = &var_44_1[8];
00632ffc                                          int32_t var_74_6;
00632ffc                                          int32_t var_70_5;
00632ffc                                          int32_t var_54_5;
00632ffc                                          
00632ffc                                          if (var_40_3 == 0)
00632ffc                                          {
0063303d                                              var_54_5 = (((int32_t)*(uint16_t*)var_28_1) * 3);
0063304f                                              var_70_5 = ((int32_t)*(uint16_t*)((char*)var_28_1 - 2));
00633060                                              var_74_6 = ((int32_t)*(uint16_t*)var_20_1);
00632ffc                                          }
00632ffc                                          else
00632ffc                                          {
0063300c                                              var_54_5 = (((int32_t)*(uint16_t*)((char*)eax_33 + 0x10)) * 3);
00633017                                              var_70_5 = ((int32_t)*(uint16_t*)((char*)eax_33 + 0xe));
00633021                                              var_74_6 = ((int32_t)*(uint16_t*)var_44_1);
00632ffc                                          }
00632ffc                                          
00633067                                          int32_t edi_30 = ((((int32_t)*(uint16_t*)((char*)eax_33 - 2)) * 3) + ebp_26);
00633081                                          *(uint8_t*)((edx_23 + ebp_8) + 0xe) = ((int8_t)((((edi_30 + ebx_26) + var_6c_7) + 8) >> 4));
0063308c                                          eax_32 = ((char*)eax_33 + 2);
0063308f                                          int32_t ebp_27 = (ebp_26 + (ebx_24 * 3));
006330a6                                          *(uint8_t*)((edx_23 + ebp_8) + 0xf) = ((int8_t)((((ebx_26 + ebp_27) + var_78_5) + 7) >> 4));
006330bc                                          *(uint8_t*)((edx_23 + ebp_8) + 0x2e) = ((int8_t)((((edi_30 + var_54_5) + var_70_5) + 8) >> 4));
006330d6                                          *(uint8_t*)((edx_23 + ebp_8) + 0x2f) = ((int8_t)((((var_54_5 + ebp_27) + var_74_6) + 7) >> 4));
006330da                                          edx_23 = &edx_23[0x40];
006330dd                                          var_24_1 += 0x10;
006330e5                                          var_64 = ((char*)var_64_2 - 0xe);
006330ed                                          s = ((char*)var_28_1 - 0xe);
006330f5                                          cond:5_1 = var_40_3 != 0;
006330f8                                          var_40_3 -= 1;
006330ff                                      } while (cond:5_1);
00633105                                      var_60 = eax_32;
0063311c                                      eax_26 = edx_14;
00633123                                      ebx_6 = ebp_2;
0063312a                                      ebp_8 += 0x10;
00633134                                      void* ecx_92 = *(uint32_t*)((char*)arg1 + 0x37cc);
0063313a                                      var_64 += 0x80;
00633145                                      s += 0x80;
00633150                                      var_14_1 += 0x80;
0063315b                                      var_18_1 += 0x80;
00633166                                      var_1c_1 += 0x80;
00633171                                      var_20_1 = &var_20_1[0x40];
0063317c                                      void* ecx_93 = ((char*)ecx_92 + ecx_7);
00633183                                      var_6c_3 = ecx_93;
0063318a                                      ecx_9 = *(uint32_t*)((char*)ecx_93 + 4);
00632c4a                                  }
00632c4a                                  else
00632c4a                                  {
006329a1                                      edi_11 = 0;
006329aa                                      int32_t edx_18 = *(uint32_t*)((char*)var_6c_3 + 8);
006329aa                                      
006329af                                      if (edx_18 > 0)
006329af                                      {
006329ba                                          int32_t ebx_7 = edx_18;
006329bc                                          int32_t edx_19 = 0;
006329bc                                          
00632c11                                          do
00632c11                                          {
006329c2                                              ebp_8 = (&var_59c + edx_19);
006329c4                                              esi_19 = 0;
006329c4                                              
006329c8                                              if (ecx_9 > 0)
006329c8                                              {
006329d5                                                  void* ebx_8 = var_64;
006329dc                                                  int16_t* edx_20 = var_44_1;
006329dc                                                  
00632be0                                                  do
00632be0                                                  {
006329ee                                                      int32_t var_74_2 = 0;
006329ee                                                      
006329f5                                                      if (eax_26 > 0)
006329f5                                                      {
00632a02                                                          int32_t ebx_9 = esi_16;
00632a10                                                          int32_t ebp_9 = edi_10;
00632a1e                                                          int32_t esi_20 = 0;
00632a27                                                          int16_t* edx_21 = var_60;
00632a27                                                          
00632b3d                                                          do
00632b3d                                                          {
00632a2e                                                              int32_t ecx_14 = 0;
00632a2e                                                              
00632a32                                                              if (ebp_9 > 0)
00632a32                                                              {
00632a3f                                                                  int32_t esi_21 = ebp_2;
00632a3f                                                                  
00632b25                                                                  do
00632b25                                                                  {
00632a46                                                                      char eax_27 = ((int8_t)*(uint16_t*)edx_21);
00632a49                                                                      int32_t edi_12 = 0;
00632a4b                                                                      edx_21 = &edx_21[1];
00632a4b                                                                      
00632a50                                                                      if (ebx_9 > 0)
00632a50                                                                      {
00632b04                                                                          do
00632b04                                                                          {
00632a6b                                                                              int32_t i_5 = 0;
00632a6b                                                                              
00632a6f                                                                              if (esi_21 > 0)
00632a6f                                                                              {
00632a78                                                                                  char* var_7c_1;
00632a78                                                                                  char var_78_2;
00632a78                                                                                  
00632a78                                                                                  if (esi_21 < 6)
00632a78                                                                                  {
006331c1                                                                                      var_7c_1 = ((((char*)ebp_8 + esi_20) + ecx_14) + edi_12);
006331cb                                                                                      var_78_2 = eax_27;
00632a78                                                                                  }
00632a78                                                                                  else
00632a78                                                                                  {
00632a96                                                                                      char* ebx_12 = ((((char*)ebp_8 + esi_20) + ecx_14) + edi_12);
00632a9f                                                                                      var_7c_1 = ebx_12;
00632aab                                                                                      var_78_2 = eax_27;
00632aab                                                                                      
00632ad8                                                                                      do
00632ad8                                                                                      {
00632ac0                                                                                          ebx_12[i_5] = eax_27;
00632ac3                                                                                          ebx_12[(i_5 + 1)] = eax_27;
00632ac7                                                                                          ebx_12[(i_5 + 2)] = eax_27;
00632acb                                                                                          ebx_12[(i_5 + 3)] = eax_27;
00632acf                                                                                          ebx_12[(i_5 + 4)] = eax_27;
00632ad3                                                                                          i_5 += 5;
00632ad8                                                                                      } while (i_5 <= (ebp_2 - 6));
00632ad8                                                                                      
00632ada                                                                                      esi_21 = ebp_2;
00632a78                                                                                  }
00632a78                                                                                  
00632af6                                                                                  do
00632af6                                                                                  {
00632af0                                                                                      var_7c_1[i_5] = var_78_2;
00632af3                                                                                      i_5 += 1;
00632af6                                                                                  } while (i_5 < esi_21);
00632a6f                                                                              }
00632a6f                                                                              
00632af8                                                                              edi_12 += 0x20;
00632b04                                                                          } while (edi_12 < esi_16);
00632b04                                                                          
00632b18                                                                          ebx_9 = esi_16;
00632b1a                                                                          ebp_9 = edi_10;
00632a50                                                                      }
00632a50                                                                      
00632b21                                                                      ecx_14 += esi_21;
00632b25                                                                  } while (ecx_14 < ebp_9);
00632b25                                                                  
00632b32                                                                  eax_26 = edx_14;
00632a32                                                              }
00632a32                                                              
00632b39                                                              esi_20 += ebx_9;
00632b3d                                                          } while (esi_20 < eax_26);
00632b3d                                                          
00632b43                                                          var_60 = edx_21;
00632b73                                                          void* edi_14 = (*(uint32_t*)((char*)arg1 + 0x37cc) + ecx_7);
00632b7a                                                          var_6c_3 = edi_14;
00632b81                                                          ecx_9 = *(uint32_t*)((char*)edi_14 + 4);
006329f5                                                      }
006329f5                                                      
00632b8b                                                      ebp_8 += (ebp_2 << 3);
00632b8f                                                      ebx_8 += 0x80;
00632b95                                                      var_24_1 += 0x80;
00632ba0                                                      edx_20 = &edx_20[0x40];
00632ba6                                                      esi_19 += 1;
00632ba7                                                      s += 0x80;
00632bb2                                                      var_14_1 += 0x80;
00632bbd                                                      var_18_1 += 0x80;
00632bc8                                                      var_1c_1 += 0x80;
00632bd3                                                      var_20_1 = &var_20_1[0x40];
00632be0                                                  } while (esi_19 < ecx_9);
00632be0                                                  
00632be6                                                  var_64 = ebx_8;
00632bfb                                                  var_44_1 = edx_20;
00632c09                                                  ebx_7 = *(uint32_t*)((char*)var_6c_3 + 8);
006329c8                                              }
006329c8                                              
00632c0c                                              edx_19 += eax_26;
00632c0e                                              edi_11 += 1;
00632c11                                          } while (edi_11 < ebx_7);
00632c11                                          
00632c17                                          ebx_6 = ebp_2;
006329af                                      }
00632c4a                                  }
00632c4a                                  
00632c1e                                  esi_19 += 1;
00632c21                              } while (esi_19 < ecx_9);
00632c21                              
00632c27                              edx_16 = var_6c_3;
00632c2e                              ebx_3 = *(uint32_t*)((char*)edx_16 + 8);
00632984                          }
00632984                          
00632c31                          edi_11 += 1;
00632c34                      } while (edi_11 < ebx_3);
0063291b                  }
0063291b                  
0063285a                  ebx = &var_59c;
0063288d                  sub_632140(arg1, &var_9c, i_7, var_48_1, &var_59c);
00632899                  ecx_5 = *(uint32_t*)((char*)arg1 + 0x34);
00632899                  
006328dd                  if ((ecx_5 == 2 && *(uint32_t*)((char*)arg1 + 0x58) == 1))
006328dd                  {
006328df                      var_48_1 -= 1;
006328ed                      i_8 = *(uint32_t*)((char*)arg1 + 0x30);
006328f0                      i_10 = *(uint32_t*)((char*)arg1 + 0x37c0);
006328dd                  }
006328dd                  else
006328dd                  {
006328a1                      var_48_1 += 1;
006328af                      i_8 = *(uint32_t*)((char*)arg1 + 0x30);
006328b2                      i_10 = *(uint32_t*)((char*)arg1 + 0x37c0);
006328dd                  }
00633409              }
00633409              
006328b8              i_7 += 1;
006325a4          }
006325a4          
00633420          int32_t i_6 = i_7;
00633429          result = *(uint32_t*)((char*)arg1 + 0x74);
00633429          
0063342e          if (result != 0)
0063342e          {
00633430              i_6 = *(uint32_t*)((char*)arg1 + 0x54);
00633433              result = (i_6 - 1);
00633433              
0063343c              if (result != *(uint32_t*)((char*)arg1 + 0x3820))
0063343e                  i_6 = i_8;
0063342e          }
0063342e          
00633446          if (ecx_5 == 0xff)
006334a0              result = *(uint32_t*)((char*)arg1 + 0x58);
006334a0          
0063344a          if (((ecx_5 != 0xff || result != 0xff) && i_6 < i_8))
0063344a          {
0063344c              int32_t esi_42 = var_48_1;
0063344c              
0063347f              do
0063347f              {
0063346d                  sub_632140(arg1, &var_9c, i_6, esi_42, ebx);
00633472                  result = *(uint32_t*)((char*)arg1 + 0x34);
00633472                  
00633478                  if (result == 2)
00633478                  {
0063348c                      result = *(uint32_t*)((char*)arg1 + 0x58);
0063348c                      
00633492                      if (result != 1)
0063347a                          esi_42 += 1;
00633492                      else
00633494                          esi_42 -= 1;
00633478                  }
00633478                  else
0063347a                      esi_42 += 1;
0063347a                  
0063347b                  i_6 += 1;
0063347f              } while (i_6 < *(uint32_t*)((char*)arg1 + 0x30));
0063344a          }
00632564      }
00632564      
0063348b      return result;
00632470  }

006325aa                                8d b6 00 00 00 00                                                            ......
006328c4              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
006328f8                                                                          90 8d b4 26 00 00 00 00                          ...&....
00632908                          90 8d b4 26 00 00 00 00                                                          ...&....
00632c3f                                                                                               90                                 .
00632cc7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
00632d3a                                                                                8d b6 00 00 00 00                            ......
00632e56                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
00632eb6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
00632fb7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0063302a                                8d b6 00 00 00 00                                                            ......
00633192                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
006331d7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
006332d4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00633414                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00633497                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
006336e4              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

006336f0  int32_t sub_6336f0(void* arg1, void* arg2, int32_t arg3, int32_t arg4)

006336f0  {
00633706      int32_t ecx = *(uint32_t*)((char*)arg1 + 0x34);
00633706      
00633716      if ((ecx != 2 && (ecx != 1 && ecx != 5)))
0063371e          return arg3;
0063371e      
0063377f      int32_t var_3c;
0063377f      int32_t eax_4 = sub_62e6a0(((char*)arg1 + 4), (*(uint32_t*)((char*)arg1 + 0x37b8) * 8), (*(uint32_t*)((char*)arg1 + 0x37bc) * 8), arg3, arg4, *(uint32_t*)((char*)arg1 + 0x30), *(uint32_t*)((char*)arg1 + 0x3c), *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg2 + 0x2c), &var_3c);
0063377f      
00633786      if (eax_4 == 0)
00633786      {
0063378c          int32_t ecx_11 = *(uint32_t*)((char*)arg2 + 0x2c);
0063378f          int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x30);
00633795          int32_t var_38;
00633795          int32_t var_34;
00633795          int32_t var_30;
00633795          int32_t ebp;
00633795          
00633795          if (edi_1 == 3)
00633795          {
00633950              int32_t esi_9 = var_38;
00633954              int32_t edx_13 = var_30;
00633954              
0063395a              if (esi_9 < edx_13)
0063395a              {
00633960                  eax_4 = (var_34 * 3);
00633967                  int32_t var_2c_2 = ebp;
00633967                  
00633a75                  do
00633a75                  {
0063396f                      int32_t ebp_7 = (var_3c * 3);
0063396f                      
00633974                      if (ebp_7 < eax_4)
00633974                      {
00633a64                          do
00633a64                          {
00633988                              char* esi_13 = ((esi_9 * *(uint32_t*)((char*)arg1 + 0x3c)) + ecx_11);
0063398c                              uint32_t edx_14 = ((uint32_t)esi_13[ebp_7]);
00633990                              uint32_t ecx_15 = ((uint32_t)esi_13[(ebp_7 + 1)]);
00633995                              uint32_t edi_16 = ((uint32_t)esi_13[(ebp_7 + 2)]);
006339a8                              int32_t eax_23 = ((((edi_16 * 0x167) - 0xb2f5) >> 8) + edx_14);
006339a8                              
006339af                              if (eax_23 > 0xff)
006339b1                                  eax_23 = 0xff;
006339af                              else if (eax_23 < 0)
006339c4                                  eax_23 = 0;
006339c4                              
006339c6                              char eax_24 = eax_23;
006339e0                              int32_t eax_28 = (((((ecx_15 * 0xffffffa8) + (edi_16 * 0xffffff49)) + 0x87f6) >> 8) + edx_14);
006339e0                              
006339e7                              if (eax_28 > 0xff)
006339e9                                  eax_28 = 0xff;
006339e7                              else if (eax_28 < 0)
006339f4                                  eax_28 = 0;
006339f4                              
006339f6                              char eax_29 = eax_28;
00633a08                              int32_t edx_15 = (edx_14 + (((ecx_15 * 0x1c6) - 0xe251) >> 8));
00633a08                              
00633a10                              if (edx_15 > 0xff)
00633a12                                  edx_15 = 0xff;
00633a10                              else if (edx_15 < 0)
00633a24                                  edx_15 = 0;
00633a24                              
00633a26                              char edx_16 = edx_15;
00633a26                              
00633a2f                              if (*(uint32_t*)((char*)arg1 + 0x34) == 2)
00633a2f                              {
00633a84                                  esi_13[ebp_7] = edx_16;
00633a97                                  *(uint8_t*)((ebp_7 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_9) + ecx_11)) + 1) = eax_29;
00633aa7                                  *(uint8_t*)((ebp_7 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_9) + ecx_11)) + 2) = eax_24;
00633a2f                              }
00633a2f                              else
00633a2f                              {
00633a39                                  esi_13[ebp_7] = eax_24;
00633a48                                  *(uint8_t*)((ebp_7 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_9) + ecx_11)) + 1) = eax_29;
00633a54                                  *(uint8_t*)((ebp_7 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_9) + ecx_11)) + 2) = edx_16;
00633a2f                              }
00633a2f                              
00633a58                              ebp_7 += 3;
00633a5f                              eax_4 = (var_34 * 3);
00633a64                          } while (ebp_7 < eax_4);
00633a64                          
00633a6e                          edx_13 = var_30;
00633974                      }
00633974                      
00633a72                      esi_9 += 1;
00633a75                  } while (esi_9 < edx_13);
0063395a              }
00633795          }
00633795          else
00633795          {
0063379b              int32_t esi_1 = var_38;
0063379f              int32_t edx_2 = var_30;
0063379f              
006337a5              if (esi_1 < edx_2)
006337a5              {
006337af                  eax_4 = (var_34 * edi_1);
006337b6                  int32_t var_2c_1 = ebp;
006337b6                  
006338f1                  do
006338f1                  {
006337bc                      int32_t ecx_13 = (edi_1 * var_3c);
006337bc                      
006337c3                      if (ecx_13 < eax_4)
006337c3                      {
006337c9                          int32_t var_1c_1 = eax_4;
006337d1                          int32_t var_18_1 = edi_1;
006337d1                          
006338dc                          do
006338dc                          {
006337e8                              char* ebp_3 = ((esi_1 * *(uint32_t*)((char*)arg1 + 0x3c)) + ecx_11);
006337ec                              uint32_t edx_3 = ((uint32_t)ebp_3[ecx_13]);
006337f1                              uint32_t esi_3 = ((uint32_t)ebp_3[(ecx_13 + 1)]);
006337f6                              uint32_t edi_3 = ((uint32_t)ebp_3[(ecx_13 + 2)]);
00633809                              int32_t eax_9 = ((((edi_3 * 0x167) - 0xb2f5) >> 8) + edx_3);
00633809                              
00633810                              if (eax_9 > 0xff)
00633812                                  eax_9 = 0xff;
00633810                              else if (eax_9 < 0)
00633824                                  eax_9 = 0;
00633824                              
00633826                              char eax_10 = eax_9;
00633840                              int32_t eax_14 = (((((esi_3 * 0xffffffa8) + (edi_3 * 0xffffff49)) + 0x87f6) >> 8) + edx_3);
00633840                              
00633847                              if (eax_14 > 0xff)
00633849                                  eax_14 = 0xff;
00633847                              else if (eax_14 < 0)
00633854                                  eax_14 = 0;
00633854                              
00633856                              char eax_15 = eax_14;
0063386c                              int32_t edx_4 = (edx_3 + (((esi_3 * 0x1c6) - 0xe251) >> 8));
0063386c                              
00633874                              if (edx_4 > 0xff)
00633876                                  edx_4 = 0xff;
00633874                              else if (edx_4 < 0)
00633884                                  edx_4 = 0;
00633884                              
00633886                              char eax_16 = edx_4;
00633889                              int32_t edx_5 = *(uint32_t*)((char*)arg1 + 0x58);
00633889                              
0063388f                              if (edx_5 == 6)
0063388f                              {
0063390f                                  ebp_3[ecx_13] = (-(eax_10) - 1);
00633928                                  *(uint8_t*)((ecx_13 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_1) + ecx_11)) + 1) = (-(eax_15) - 1);
00633938                                  *(uint8_t*)((ecx_13 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_1) + ecx_11)) + 2) = (-(eax_16) - 1);
0063393c                                  int32_t edi_14 = *(uint32_t*)((char*)arg1 + 0x30);
0063393f                                  var_18_1 = edi_14;
00633948                                  var_1c_1 = (edi_14 * var_34);
0063388f                              }
0063388f                              else if (edx_5 == 3)
00633894                              {
0063389e                                  ebp_3[ecx_13] = eax_10;
006338b2                                  *(uint8_t*)((ecx_13 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_1) + ecx_11)) + 1) = eax_15;
006338be                                  *(uint8_t*)((ecx_13 + ((*(uint32_t*)((char*)arg1 + 0x3c) * esi_1) + ecx_11)) + 2) = eax_16;
006338c2                                  int32_t eax_17 = *(uint32_t*)((char*)arg1 + 0x30);
006338c5                                  var_18_1 = eax_17;
006338ce                                  var_1c_1 = (eax_17 * var_34);
00633894                              }
00633894                              
006338d2                              ecx_13 += var_18_1;
006338d6                              eax_4 = var_1c_1;
006338dc                          } while (ecx_13 < eax_4);
006338dc                          
006338e6                          edi_1 = var_18_1;
006338ea                          edx_2 = var_30;
006337c3                      }
006337c3                      
006338ee                      esi_1 += 1;
006338f1                  } while (esi_1 < edx_2);
006337a5              }
00633795          }
00633786      }
00633786      
00633901      return eax_4;
006336f0  }

00633819                                                                             8d b4 26 00 00 00 00                           ..&....
0063387d                                                                                         8d 76 00                               .v.
0063394e                                            8b f6                                                                ..
006339b8                                                                          90 8d b4 26 00 00 00 00                          ...&....
00633a19                                                                             8d b4 26 00 00 00 00                           ..&....
00633aad                                         8d 76 00                                                               .v.

00633ab0  int32_t sub_633ab0(int32_t arg1, int16_t* arg2, int16_t* arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00633ab0  {
00633ab7      int16_t* ecx = arg2;
00633abe      int16_t* edx = arg3;
00633ad3      int32_t ebp = arg5[1];
00633adb      int32_t ebx_2 = ((ebp * arg6) + arg4);
00633c17      void var_8c;
00633c17      void var_6c;
00633c17      void var_4c;
00633c17      int32_t i;
00633c17      
00633c17      for (i = 0; i < 4; i += 1)
00633c17      {
00633af0          int32_t ebp_1 = ((int32_t)*(uint16_t*)edx);
00633b02          int32_t edi_1 = ((int32_t)*(uint16_t*)ecx);
00633b0b          *(uint16_t*)(&var_8c + (i << 3)) = ((int16_t)(((ebp_1 * 0x167) - 0xb2f5) >> 8));
00633b1c          *(uint16_t*)(&var_6c + (i << 3)) = ((int16_t)((((edi_1 * 0x58) + (ebp_1 * 0xb7)) - 0x87f6) >> 8));
00633b30          *(uint16_t*)(&var_4c + (i << 3)) = ((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8));
00633b35          int32_t ebp_8 = ((int32_t)edx[1]);
00633b48          int32_t edi_2 = ((int32_t)ecx[1]);
00633b4c          void var_8a;
00633b4c          *(uint16_t*)(&var_8a + (i << 3)) = ((int16_t)(((ebp_8 * 0x167) - 0xb2f5) >> 8));
00633b64          void var_6a;
00633b64          *(uint16_t*)(&var_6a + (i << 3)) = ((int16_t)((((edi_2 * 0x58) + (ebp_8 * 0xb7)) - 0x87f6) >> 8));
00633b78          int32_t edi_3 = ((int32_t)ecx[2]);
00633b7c          void var_4a;
00633b7c          *(uint16_t*)(&var_4a + (i << 3)) = ((int16_t)(((edi_2 * 0x1c6) - 0xe251) >> 8));
00633b81          int32_t ebp_15 = ((int32_t)edx[2]);
00633b9a          void var_88;
00633b9a          *(uint16_t*)(&var_88 + (i << 3)) = ((int16_t)(((ebp_15 * 0x167) - 0xb2f5) >> 8));
00633bac          void var_68;
00633bac          *(uint16_t*)(&var_68 + (i << 3)) = ((int16_t)((((edi_3 * 0x58) + (ebp_15 * 0xb7)) - 0x87f6) >> 8));
00633bc0          void var_48;
00633bc0          *(uint16_t*)(&var_48 + (i << 3)) = ((int16_t)(((edi_3 * 0x1c6) - 0xe251) >> 8));
00633bc5          int32_t ebp_22 = ((int32_t)edx[3]);
00633bd8          int32_t edi_4 = ((int32_t)ecx[3]);
00633bdc          void var_86;
00633bdc          *(uint16_t*)(&var_86 + (i << 3)) = ((int16_t)(((ebp_22 * 0x167) - 0xb2f5) >> 8));
00633bf4          ecx = &ecx[8];
00633bf7          void var_66;
00633bf7          *(uint16_t*)(&var_66 + (i << 3)) = ((int16_t)((((edi_4 * 0x58) + (ebp_22 * 0xb7)) - 0x87f6) >> 8));
00633c0b          edx = &edx[8];
00633c0e          void var_46;
00633c0e          *(uint16_t*)(&var_46 + (i << 3)) = ((int16_t)(((edi_4 * 0x1c6) - 0xe251) >> 8));
00633c17      }
00633c17      
00633c1d      int32_t ebp_29 = ebp;
00633c28      int32_t* esi_18 = arg5;
00633c2f      int32_t ecx_1 = esi_18[3];
00633c2f      
00633c34      if (ebp_29 < ecx_1)
00633c34      {
00633c3a          int32_t edx_1 = esi_18[2];
00633c3f          i = (ebp_29 << 4);
00633c3f          
00633d7e          do
00633d7e          {
00633c42              int32_t edi_6 = *(uint32_t*)esi_18;
00633c42              
00633c46              if (edi_6 < edx_1)
00633c46              {
00633c72                  int32_t var_1c_1 = ebx_2;
00633c72                  
00633d59                  do
00633d59                  {
00633c84                      int32_t eax_2 = ((int32_t)*(uint16_t*)((arg1 + i) + (edi_6 << 1)));
00633c9c                      int32_t edx_7 = ((((edi_6 - 0x80000000) - 0x80000000) >> 1) + ((((ebp_29 - 0x80000000) - 0x80000000) >> 1) << 2));
00633ca8                      int32_t ecx_4 = (((int32_t)*(uint16_t*)(&var_8c + (edx_7 << 1))) + eax_2);
00633caa                      int32_t var_18_1 = ecx_4;
00633cb4                      int32_t edx_8;
00633cb4                      
00633cb4                      if (ecx_4 <= 0xff)
00633cb4                      {
00633cd0                          edx_8 = ecx_4;
00633cd0                          
00633cd4                          if (edx_8 < 0)
00633cd4                          {
00633cd6                              edx_8 = 0;
00633cd8                              int32_t var_18_3 = 0;
00633cd4                          }
00633cb4                      }
00633cb4                      else
00633cb4                      {
00633cb6                          edx_8 = 0xff;
00633cbb                          int32_t var_18_2 = 0xff;
00633cb4                      }
00633cb4                      
00633cdc                      char* ecx_5 = (edi_6 * 3);
00633ce7                      int32_t ebx_3 = ((int32_t)*(uint16_t*)(&var_6c + (edx_7 << 1)));
00633cec                      ecx_5[var_1c_1] = edx_8;
00633cf1                      int32_t ebx_5 = (-(ebx_3) + eax_2);
00633cf3                      int32_t var_18_4 = ebx_5;
00633cfd                      int32_t edx_9;
00633cfd                      
00633cfd                      if (ebx_5 <= 0xff)
00633cfd                      {
00633d10                          edx_9 = ebx_5;
00633d10                          
00633d14                          if (edx_9 < 0)
00633d14                          {
00633d16                              edx_9 = 0;
00633d18                              int32_t var_18_6 = 0;
00633d14                          }
00633cfd                      }
00633cfd                      else
00633cfd                      {
00633cff                          edx_9 = 0xff;
00633d04                          int32_t var_18_5 = 0xff;
00633cfd                      }
00633cfd                      
00633d1c                      ebx_2 = var_1c_1;
00633d1e                      ecx_5[(ebx_2 + 1)] = edx_9;
00633d29                      int32_t eax_3 = (eax_2 + ((int32_t)*(uint16_t*)(&var_4c + (edx_7 << 1))));
00633d29                      
00633d30                      if (eax_3 > 0xff)
00633d32                          eax_3 = 0xff;
00633d30                      else if (eax_3 < 0)
00633d44                          eax_3 = 0;
00633d44                      
00633d48                      edi_6 += 1;
00633d49                      ecx_5[(ebx_2 + 2)] = eax_3;
00633d54                      edx_1 = arg5[2];
00633d59                  } while (edi_6 < edx_1);
00633d59                  
00633d67                  esi_18 = arg5;
00633d6e                  ecx_1 = esi_18[3];
00633c46              }
00633c46              
00633d71              ebx_2 += arg6;
00633d78              i += 0x10;
00633d7b              ebp_29 += 1;
00633d7e          } while (ebp_29 < ecx_1);
00633c34      }
00633c34      
00633d8b      return i;
00633ab0  }

00633cc1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
00633d0a                                8d b6 00 00 00 00                                                            ......
00633d39                                                                             8d b4 26 00 00 00 00                           ..&....
00633d8c                                      8d 74 26 00                                                              .t&.

00633d90  char* sub_633d90(int16_t* arg1, void* arg2, int16_t* arg3, char* arg4, int32_t arg5)

00633d90  {
00633d96      int16_t* edx = arg1;
00633da2      char* result = arg4;
00633dac      int32_t var_48 = 0;
00633db0      int16_t* var_34 = arg3;
00633db4      void* var_30 = arg2;
0063463e      bool cond:4_1;
0063463e      
0063463e      do
0063463e      {
00633dc4          int32_t ebx_1 = ((int32_t)*(uint16_t*)var_34);
00633dd3          int32_t ecx_4 = (((ebx_1 * 0x167) - 0xb2f5) >> 8);
00633dd6          int16_t* esi_2 = var_30;
00633dde          int32_t edi_1 = ((int32_t)*(uint16_t*)esi_2);
00633df1          int32_t ecx_7 = ((((edi_1 * 0x58) + (ebx_1 * 0xb7)) - 0x87f6) >> 8);
00633e04          int32_t ecx_10 = (((edi_1 * 0x1c6) - 0xe251) >> 8);
00633e07          int32_t edi_2 = ((int32_t)esi_2[1]);
00633e13          int32_t ebx_3 = ((int32_t)var_34[1]);
00633e23          int32_t ecx_14 = (((ebx_3 * 0x167) - 0xb2f5) >> 8);
00633e3a          int32_t ecx_17 = ((((edi_2 * 0x58) + (ebx_3 * 0xb7)) - 0x87f6) >> 8);
00633e4d          int32_t ecx_20 = (((edi_2 * 0x1c6) - 0xe251) >> 8);
00633e50          int32_t edi_3 = ((int32_t)esi_2[2]);
00633e5c          int32_t ebx_5 = ((int32_t)var_34[2]);
00633e6c          int32_t ecx_24 = (((ebx_5 * 0x167) - 0xb2f5) >> 8);
00633e83          int32_t ecx_27 = ((((edi_3 * 0x58) + (ebx_5 * 0xb7)) - 0x87f6) >> 8);
00633e96          int32_t ecx_30 = (((edi_3 * 0x1c6) - 0xe251) >> 8);
00633ea1          int32_t ecx_32 = ((int32_t)var_34[3]);
00633eb1          int32_t ebx_9 = (((ecx_32 * 0x167) - 0xb2f5) >> 8);
00633ebe          int32_t ebx_10 = ((int32_t)esi_2[3]);
00633ecc          int32_t ecx_35 = ((((ebx_10 * 0x58) + (ecx_32 * 0xb7)) - 0x87f6) >> 8);
00633ee2          int32_t ecx_38 = (((ebx_10 * 0x1c6) - 0xe251) >> 8);
00633eed          int32_t ecx_39 = ((int32_t)*(uint16_t*)edx);
00633ef0          int32_t ebx_12 = (ecx_4 + ecx_39);
00633ef3          var_30 = &esi_2[8];
00633ef7          var_34 = &var_34[8];
00633ef7          
00633f02          if (ebx_12 > 0xff)
00633f04              ebx_12 = 0xff;
00633f02          else if (ebx_12 < 0)
00633f14              ebx_12 = 0;
00633f14          
00633f16          *(uint8_t*)result = ebx_12;
00633f1a          int32_t ebx_14 = (ecx_39 - ecx_7);
00633f1a          
00633f24          if (ebx_14 > 0xff)
00633f26              ebx_14 = 0xff;
00633f24          else if (ebx_14 < 0)
00633f34              ebx_14 = 0;
00633f34          
00633f36          result[1] = ebx_14;
00633f39          int32_t ecx_40 = (ecx_39 + ecx_10);
00633f39          
00633f43          if (ecx_40 > 0xff)
00633f45              ecx_40 = 0xff;
00633f43          else if (ecx_40 < 0)
00633f54              ecx_40 = 0;
00633f54          
00633f5a          result[2] = ecx_40;
00633f5d          int32_t ecx_41 = ((int32_t)edx[1]);
00633f61          int32_t ebx_16 = (ecx_4 + ecx_41);
00633f61          
00633f6a          if (ebx_16 > 0xff)
00633f6c              ebx_16 = 0xff;
00633f6a          else if (ebx_16 < 0)
00633f84              ebx_16 = 0;
00633f84          
00633f86          result[3] = ebx_16;
00633f8b          int32_t ebx_18 = (ecx_41 - ecx_7);
00633f8b          
00633f95          if (ebx_18 > 0xff)
00633f97              ebx_18 = 0xff;
00633f95          else if (ebx_18 < 0)
00633fa4              ebx_18 = 0;
00633fa4          
00633fa6          result[4] = ebx_18;
00633fa9          int32_t ecx_42 = (ecx_41 + ecx_10);
00633fa9          
00633fb3          if (ecx_42 > 0xff)
00633fb5              ecx_42 = 0xff;
00633fb3          else if (ecx_42 < 0)
00633fc4              ecx_42 = 0;
00633fc4          
00633fca          result[5] = ecx_42;
00633fcd          int32_t ecx_43 = ((int32_t)edx[2]);
00633fd1          int32_t ebx_20 = (ecx_43 + ecx_14);
00633fd1          
00633fda          if (ebx_20 > 0xff)
00633fdc              ebx_20 = 0xff;
00633fda          else if (ebx_20 < 0)
00633ff4              ebx_20 = 0;
00633ff4          
00633ff6          result[6] = ebx_20;
00633ffb          int32_t ebx_22 = (ecx_43 - ecx_17);
00633ffb          
00634005          if (ebx_22 > 0xff)
00634007              ebx_22 = 0xff;
00634005          else if (ebx_22 < 0)
00634014              ebx_22 = 0;
00634014          
00634016          result[7] = ebx_22;
00634019          int32_t ecx_44 = (ecx_43 + ecx_20);
00634019          
00634023          if (ecx_44 > 0xff)
00634025              ecx_44 = 0xff;
00634023          else if (ecx_44 < 0)
00634034              ecx_44 = 0;
00634034          
0063403a          result[8] = ecx_44;
0063403d          int32_t ecx_45 = ((int32_t)edx[3]);
00634041          int32_t ebx_24 = (ecx_45 + ecx_14);
00634041          
0063404a          if (ebx_24 > 0xff)
0063404c              ebx_24 = 0xff;
0063404a          else if (ebx_24 < 0)
00634064              ebx_24 = 0;
00634064          
00634066          result[9] = ebx_24;
0063406b          int32_t ebx_26 = (ecx_45 - ecx_17);
0063406b          
00634075          if (ebx_26 > 0xff)
00634077              ebx_26 = 0xff;
00634075          else if (ebx_26 < 0)
00634084              ebx_26 = 0;
00634084          
00634086          result[0xa] = ebx_26;
00634089          int32_t ecx_46 = (ecx_45 + ecx_20);
00634089          
00634093          if (ecx_46 > 0xff)
00634095              ecx_46 = 0xff;
00634093          else if (ecx_46 < 0)
006340a4              ecx_46 = 0;
006340a4          
006340aa          result[0xb] = ecx_46;
006340ad          int32_t ecx_47 = ((int32_t)edx[4]);
006340b1          int32_t ebx_28 = (ecx_47 + ecx_24);
006340b1          
006340ba          if (ebx_28 > 0xff)
006340bc              ebx_28 = 0xff;
006340ba          else if (ebx_28 < 0)
006340d4              ebx_28 = 0;
006340d4          
006340d6          result[0xc] = ebx_28;
006340db          int32_t ebx_30 = (ecx_47 - ecx_27);
006340db          
006340e5          if (ebx_30 > 0xff)
006340e7              ebx_30 = 0xff;
006340e5          else if (ebx_30 < 0)
006340f4              ebx_30 = 0;
006340f4          
006340f6          result[0xd] = ebx_30;
006340f9          int32_t ecx_48 = (ecx_47 + ecx_30);
006340f9          
00634103          if (ecx_48 > 0xff)
00634105              ecx_48 = 0xff;
00634103          else if (ecx_48 < 0)
00634114              ecx_48 = 0;
00634114          
0063411a          result[0xe] = ecx_48;
0063411d          int32_t ecx_49 = ((int32_t)edx[5]);
00634121          int32_t ebx_32 = (ecx_49 + ecx_24);
00634121          
0063412a          if (ebx_32 > 0xff)
0063412c              ebx_32 = 0xff;
0063412a          else if (ebx_32 < 0)
00634144              ebx_32 = 0;
00634144          
00634146          result[0xf] = ebx_32;
0063414b          int32_t ebx_34 = (ecx_49 - ecx_27);
0063414b          
00634155          if (ebx_34 > 0xff)
00634157              ebx_34 = 0xff;
00634155          else if (ebx_34 < 0)
00634164              ebx_34 = 0;
00634164          
00634166          result[0x10] = ebx_34;
00634169          int32_t ecx_50 = (ecx_49 + ecx_30);
00634169          
00634173          if (ecx_50 > 0xff)
00634175              ecx_50 = 0xff;
00634173          else if (ecx_50 < 0)
00634184              ecx_50 = 0;
00634184          
0063418a          result[0x11] = ecx_50;
0063418d          int32_t ecx_51 = ((int32_t)edx[6]);
00634191          int32_t ebx_36 = (ecx_51 + ebx_9);
00634191          
0063419a          if (ebx_36 > 0xff)
0063419c              ebx_36 = 0xff;
0063419a          else if (ebx_36 < 0)
006341b4              ebx_36 = 0;
006341b4          
006341b6          result[0x12] = ebx_36;
006341bb          int32_t ebx_38 = (ecx_51 - ecx_35);
006341bb          
006341c5          if (ebx_38 > 0xff)
006341c7              ebx_38 = 0xff;
006341c5          else if (ebx_38 < 0)
006341d4              ebx_38 = 0;
006341d4          
006341d6          result[0x13] = ebx_38;
006341d9          int32_t ecx_52 = (ecx_51 + ecx_38);
006341d9          
006341e3          if (ecx_52 > 0xff)
006341e5              ecx_52 = 0xff;
006341e3          else if (ecx_52 < 0)
006341f4              ecx_52 = 0;
006341f4          
006341fa          result[0x14] = ecx_52;
006341fd          int32_t ecx_53 = ((int32_t)edx[7]);
00634201          int32_t ebx_40 = (ecx_53 + ebx_9);
00634201          
0063420a          if (ebx_40 > 0xff)
0063420c              ebx_40 = 0xff;
0063420a          else if (ebx_40 < 0)
00634224              ebx_40 = 0;
00634224          
00634226          result[0x15] = ebx_40;
0063422b          int32_t ebx_42 = (ecx_53 - ecx_35);
0063422b          
00634235          if (ebx_42 > 0xff)
00634237              ebx_42 = 0xff;
00634235          else if (ebx_42 < 0)
00634244              ebx_42 = 0;
00634244          
00634246          result[0x16] = ebx_42;
00634249          int32_t ecx_54 = (ecx_53 + ecx_38);
00634249          
00634253          if (ecx_54 > 0xff)
00634255              ecx_54 = 0xff;
00634253          else if (ecx_54 < 0)
00634264              ecx_54 = 0;
00634264          
0063426a          result[0x17] = ecx_54;
0063426d          int32_t ecx_55 = ((int32_t)edx[8]);
00634271          int32_t ebx_44 = (ecx_4 + ecx_55);
00634274          void* eax = &result[arg5];
00634274          
0063427e          if (ebx_44 > 0xff)
00634280              ebx_44 = 0xff;
0063427e          else if (ebx_44 < 0)
00634294              ebx_44 = 0;
00634294          
00634296          *(uint8_t*)eax = ebx_44;
0063429a          int32_t ebx_46 = (ecx_55 - ecx_7);
0063429a          
006342a4          if (ebx_46 > 0xff)
006342a6              ebx_46 = 0xff;
006342a4          else if (ebx_46 < 0)
006342b4              ebx_46 = 0;
006342b4          
006342b6          *(uint8_t*)((char*)eax + 1) = ebx_46;
006342b9          int32_t ecx_56 = (ecx_55 + ecx_10);
006342b9          
006342c3          if (ecx_56 > 0xff)
006342c5              ecx_56 = 0xff;
006342c3          else if (ecx_56 < 0)
006342d4              ecx_56 = 0;
006342d4          
006342da          *(uint8_t*)((char*)eax + 2) = ecx_56;
006342dd          int32_t ecx_57 = ((int32_t)edx[9]);
006342e1          int32_t ebx_48 = (ecx_4 + ecx_57);
006342e3          int32_t var_10_2 = ebx_48;
006342e3          
006342ed          if (ebx_48 > 0xff)
006342ed          {
006342ef              ebx_48 = 0xff;
006342f4              int32_t var_10_3 = 0xff;
006342ed          }
006342ed          else if (ebx_48 < 0)
00634302          {
00634304              ebx_48 = 0;
00634306              int32_t var_10_4 = 0;
00634302          }
00634302          
0063430a          *(uint8_t*)((char*)eax + 3) = ebx_48;
00634313          int32_t ebx_51 = (-(ecx_7) + ecx_57);
0063431b          int32_t var_1c_2 = ebx_51;
0063431b          
0063431f          if (ebx_51 > 0xff)
0063431f          {
00634321              ebx_51 = 0xff;
00634326              int32_t var_1c_3 = 0xff;
0063431f          }
0063431f          else if (ebx_51 < 0)
00634332          {
00634334              ebx_51 = 0;
00634336              int32_t var_1c_4 = 0;
00634332          }
00634332          
0063433a          *(uint8_t*)((char*)eax + 4) = ebx_51;
0063433d          int32_t ecx_58 = (ecx_57 + ecx_10);
0063433d          
00634347          if (ecx_58 > 0xff)
00634349              ecx_58 = 0xff;
00634347          else if (ecx_58 < 0)
00634354              ecx_58 = 0;
00634354          
0063435a          *(uint8_t*)((char*)eax + 5) = ecx_58;
0063435d          int32_t ecx_59 = ((int32_t)edx[0xa]);
00634361          int32_t ebx_53 = (ecx_59 + ecx_14);
00634361          
0063436a          if (ebx_53 > 0xff)
0063436c              ebx_53 = 0xff;
0063436a          else if (ebx_53 < 0)
00634384              ebx_53 = 0;
00634384          
00634386          *(uint8_t*)((char*)eax + 6) = ebx_53;
0063438b          int32_t ebx_55 = (ecx_59 - ecx_17);
0063438b          
00634395          if (ebx_55 > 0xff)
00634397              ebx_55 = 0xff;
00634395          else if (ebx_55 < 0)
006343a4              ebx_55 = 0;
006343a4          
006343a6          *(uint8_t*)((char*)eax + 7) = ebx_55;
006343a9          int32_t ecx_60 = (ecx_59 + ecx_20);
006343a9          
006343b3          if (ecx_60 > 0xff)
006343b5              ecx_60 = 0xff;
006343b3          else if (ecx_60 < 0)
006343c4              ecx_60 = 0;
006343c4          
006343ca          *(uint8_t*)((char*)eax + 8) = ecx_60;
006343cd          int32_t ecx_61 = ((int32_t)edx[0xb]);
006343d1          int32_t ebx_57 = (ecx_14 + ecx_61);
006343d3          int32_t var_14_2 = ebx_57;
006343d3          
006343dd          if (ebx_57 > 0xff)
006343dd          {
006343df              ebx_57 = 0xff;
006343e4              int32_t var_14_3 = 0xff;
006343dd          }
006343dd          else if (ebx_57 < 0)
006343f2          {
006343f4              ebx_57 = 0;
006343f6              int32_t var_14_4 = 0;
006343f2          }
006343f2          
006343fa          *(uint8_t*)((char*)eax + 9) = ebx_57;
00634403          int32_t ebx_60 = (-(ecx_17) + ecx_61);
0063440b          int32_t var_24_2 = ebx_60;
0063440b          
0063440f          if (ebx_60 > 0xff)
0063440f          {
00634411              ebx_60 = 0xff;
00634416              int32_t var_24_3 = 0xff;
0063440f          }
0063440f          else if (ebx_60 < 0)
00634422          {
00634424              ebx_60 = 0;
00634426              int32_t var_24_4 = 0;
00634422          }
00634422          
0063442a          *(uint8_t*)((char*)eax + 0xa) = ebx_60;
0063442d          int32_t ecx_62 = (ecx_61 + ecx_20);
0063442d          
00634437          if (ecx_62 > 0xff)
00634439              ecx_62 = 0xff;
00634437          else if (ecx_62 < 0)
00634444              ecx_62 = 0;
00634444          
0063444a          *(uint8_t*)((char*)eax + 0xb) = ecx_62;
0063444d          int32_t ecx_63 = ((int32_t)edx[0xc]);
00634451          int32_t ebx_62 = (ecx_63 + ecx_24);
00634451          
0063445a          if (ebx_62 > 0xff)
0063445c              ebx_62 = 0xff;
0063445a          else if (ebx_62 < 0)
00634474              ebx_62 = 0;
00634474          
00634476          *(uint8_t*)((char*)eax + 0xc) = ebx_62;
0063447b          int32_t ebx_64 = (ecx_63 - ecx_27);
0063447b          
00634485          if (ebx_64 > 0xff)
00634487              ebx_64 = 0xff;
00634485          else if (ebx_64 < 0)
00634494              ebx_64 = 0;
00634494          
00634496          *(uint8_t*)((char*)eax + 0xd) = ebx_64;
00634499          int32_t ecx_64 = (ecx_63 + ecx_30);
00634499          
006344a3          if (ecx_64 > 0xff)
006344a5              ecx_64 = 0xff;
006344a3          else if (ecx_64 < 0)
006344b4              ecx_64 = 0;
006344b4          
006344ba          *(uint8_t*)((char*)eax + 0xe) = ecx_64;
006344bd          int32_t ecx_65 = ((int32_t)edx[0xd]);
006344c1          int32_t ebx_66 = (ecx_24 + ecx_65);
006344c3          int32_t var_18_2 = ebx_66;
006344c3          
006344cd          if (ebx_66 > 0xff)
006344cd          {
006344cf              ebx_66 = 0xff;
006344d4              int32_t var_18_3 = 0xff;
006344cd          }
006344cd          else if (ebx_66 < 0)
006344e2          {
006344e4              ebx_66 = 0;
006344e6              int32_t var_18_4 = 0;
006344e2          }
006344e2          
006344ea          *(uint8_t*)((char*)eax + 0xf) = ebx_66;
006344f3          int32_t ebx_69 = (-(ecx_27) + ecx_65);
006344fb          int32_t var_28_2 = ebx_69;
006344fb          
006344ff          if (ebx_69 > 0xff)
006344ff          {
00634501              ebx_69 = 0xff;
00634506              int32_t var_28_3 = 0xff;
006344ff          }
006344ff          else if (ebx_69 < 0)
00634512          {
00634514              ebx_69 = 0;
00634516              int32_t var_28_4 = 0;
00634512          }
00634512          
0063451a          *(uint8_t*)((char*)eax + 0x10) = ebx_69;
0063451d          int32_t ecx_66 = (ecx_65 + ecx_30);
0063451d          
00634527          if (ecx_66 > 0xff)
00634529              ecx_66 = 0xff;
00634527          else if (ecx_66 < 0)
00634534              ecx_66 = 0;
00634534          
0063453a          *(uint8_t*)((char*)eax + 0x11) = ecx_66;
0063453d          int32_t ecx_67 = ((int32_t)edx[0xe]);
00634541          int32_t ebx_71 = (ecx_67 + ebx_9);
00634541          
0063454a          if (ebx_71 > 0xff)
0063454c              ebx_71 = 0xff;
0063454a          else if (ebx_71 < 0)
00634564              ebx_71 = 0;
00634564          
00634566          *(uint8_t*)((char*)eax + 0x12) = ebx_71;
0063456b          int32_t ebx_73 = (ecx_67 - ecx_35);
0063456b          
00634575          if (ebx_73 > 0xff)
00634577              ebx_73 = 0xff;
00634575          else if (ebx_73 < 0)
00634584              ebx_73 = 0;
00634584          
00634586          *(uint8_t*)((char*)eax + 0x13) = ebx_73;
00634589          int32_t ecx_68 = (ecx_67 + ecx_38);
00634589          
00634593          if (ecx_68 > 0xff)
00634595              ecx_68 = 0xff;
00634593          else if (ecx_68 < 0)
006345a4              ecx_68 = 0;
006345a4          
006345aa          *(uint8_t*)((char*)eax + 0x14) = ecx_68;
006345ad          int32_t ecx_69 = ((int32_t)edx[0xf]);
006345b1          int32_t ebx_75 = (ebx_9 + ecx_69);
006345b3          int32_t var_20_2 = ebx_75;
006345b3          
006345bd          if (ebx_75 > 0xff)
006345bd          {
006345bf              ebx_75 = 0xff;
006345c4              int32_t var_20_3 = 0xff;
006345bd          }
006345bd          else if (ebx_75 < 0)
006345d2          {
006345d4              ebx_75 = 0;
006345d6              int32_t var_20_4 = 0;
006345d2          }
006345d2          
006345da          *(uint8_t*)((char*)eax + 0x15) = ebx_75;
006345e3          int32_t ebx_78 = (-(ecx_35) + ecx_69);
006345eb          int32_t var_2c_2 = ebx_78;
006345eb          
006345ef          if (ebx_78 > 0xff)
006345ef          {
006345f1              ebx_78 = 0xff;
006345f6              int32_t var_2c_3 = 0xff;
006345ef          }
006345ef          else if (ebx_78 < 0)
00634602          {
00634604              ebx_78 = 0;
00634606              int32_t var_2c_4 = 0;
00634602          }
00634602          
0063460a          *(uint8_t*)((char*)eax + 0x16) = ebx_78;
0063460d          int32_t ecx_70 = (ecx_69 + ecx_38);
0063460d          
00634617          if (ecx_70 > 0xff)
00634619              ecx_70 = 0xff;
00634617          else if (ecx_70 < 0)
00634624              ecx_70 = 0;
00634624          
00634626          edx = &edx[0x10];
0063462d          *(uint8_t*)((char*)eax + 0x17) = ecx_70;
00634633          result = ((char*)eax + arg5);
00634637          cond:4_1 = (var_48 + 2) < 8;
0063463a          var_48 += 2;
0063463e      } while (cond:4_1);
0063464a      return result;
00633d90  }

00633f0b                                   90 8d 74 26 00                                                             ..t&.
00633f2d                                         8d 76 00                                                               .v.
00633f4c                                      8d 74 26 00                                                              .t&.
00633f73                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
00633f9e                                                                                            8b f6                                ..
00633fbc                                                                                      8d 74 26 00                              .t&.
00633fe3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063400e                                            8b f6                                                                ..
0063402c                                      8d 74 26 00                                                              .t&.
00634053                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063407e                                                                                            8b f6                                ..
0063409c                                                                                      8d 74 26 00                              .t&.
006340c3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
006340ee                                            8b f6                                                                ..
0063410c                                      8d 74 26 00                                                              .t&.
00634133                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063415e                                                                                            8b f6                                ..
0063417c                                                                                      8d 74 26 00                              .t&.
006341a3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
006341ce                                            8b f6                                                                ..
006341ec                                      8d 74 26 00                                                              .t&.
00634213                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063423e                                                                                            8b f6                                ..
0063425c                                                                                      8d 74 26 00                              .t&.
00634287                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
006342ad                                         8d 76 00                                                               .v.
006342cc                                      8d 74 26 00                                                              .t&.
006342fa                                                                                8d b6 00 00 00 00                            ......
0063432c                                      8d 74 26 00                                                              .t&.
00634373                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063439e                                                                                            8b f6                                ..
006343bc                                                                                      8d 74 26 00                              .t&.
006343ea                                8d b6 00 00 00 00                                                            ......
0063441c                                                                                      8d 74 26 00                              .t&.
00634463           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063448e                                            8b f6                                                                ..
006344ac                                      8d 74 26 00                                                              .t&.
006344da                                                                                8d b6 00 00 00 00                            ......
0063450c                                      8d 74 26 00                                                              .t&.
00634553                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063457e                                                                                            8b f6                                ..
0063459c                                                                                      8d 74 26 00                              .t&.
006345ca                                8d b6 00 00 00 00                                                            ......
006345fc                                                                                      8d 74 26 00                              .t&.
0063464b                                   90 8d 74 26 00                                                             ..t&.

00634650  char* _YCbCr_411_to_RGB_Full_MCU_PX(int16_t* arg1, void* arg2, int16_t* arg3, char* arg4, int32_t arg5)

00634650  {
0063467e      sub_633d90(arg1, arg2, arg3, arg4, arg5);
006346a9      sub_633d90(&arg1[0x40], ((char*)arg2 + 8), &arg3[4], &arg4[0x18], arg5);
006346ae      void* edi_1 = &arg4[(arg5 << 3)];
006346d4      sub_633d90(&arg1[0x80], ((char*)arg2 + 0x40), &arg3[0x20], edi_1, arg5);
0063470b      return sub_633d90(&arg1[0xc0], ((char*)arg2 + 0x48), &arg3[0x24], ((char*)edi_1 + 0x18), arg5);
00634650  }

0063470c                                      8d 74 26 00                                                              .t&.

00634710  int64_t* _YCbCr_411_to_RGB_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

00634710  {
0063473e      _own_ycbcr_411_to_rgb_one_half_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00634769      _own_ycbcr_411_to_rgb_one_half_mcu_m5(&arg1[0x20], &arg2[8], &arg3[8], &arg4[arg5], arg5);
00634775      return arg1;
00634710  }

00634776                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

00634780  int32_t _YCbCr_411_to_RGB_MCU(void* arg1, int32_t arg2, int32_t arg3)

00634780  {
0063479f      void* esi = *(uint32_t*)((char*)arg1 + 0x4834);
006347a5      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x3c);
006347ae      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
006347b4      int32_t var_b4 = data_907948;
006347be      int32_t var_b0 = data_90794c;
006347c8      int32_t var_ac = data_907950;
006347d2      int32_t var_a8 = data_907954;
00634823      void var_a4;
00634823      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 0x10, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), ebp, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_a4);
00634823      
0063482a      if (eax_6 != 0)
00634836          return eax_6;
00634836      
00634837      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
00634837      
00634856      if (((uint32_t)operator==(&var_a4, &var_b4)) != 0)
00634887          return *(uint32_t*)(ebx + 0xb0)(esi, ((char*)esi + 0x200), ((char*)esi + 0x280), edi_1, ebp);
00634887      
00634897      int32_t var_dc_1 = 0x907938;
0063489f      int32_t var_94;
0063489f      operator&(&var_94, &var_a4);
006348b0      int32_t var_84 = var_94;
006348bc      int32_t var_90;
006348bc      int32_t var_80 = var_90;
006348c0      int32_t var_8c;
006348c0      int32_t var_7c = var_8c;
006348c4      int32_t var_88;
006348c4      int32_t var_78 = var_88;
006348c4      
006348dd      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
00634906          sub_633ab0(esi, ((char*)esi + 0x200), ((char*)esi + 0x280), edi_1, &var_84, ebp);
00634906      
0063491a      int32_t var_dc_3 = 0x907928;
00634922      void var_74;
00634922      operator&(&var_74, &var_a4);
00634939      int32_t var_dc_4 = 0x907920;
00634941      int32_t var_64;
00634941      operator-(&var_64, &var_74);
0063495b      var_84 = var_64;
0063496a      int32_t var_60;
0063496a      int32_t var_80_1 = var_60;
0063496e      int32_t var_5c;
0063496e      int32_t var_7c_1 = var_5c;
00634972      int32_t var_58;
00634972      int32_t var_78_1 = var_58;
00634972      
0063498b      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
006349bd          sub_633ab0(((char*)esi + 0x80), ((char*)esi + 0x208), ((char*)esi + 0x288), (edi_1 + 0x18), &var_84, ebp);
006349bd      
006349d4      int32_t var_dc_6 = 0x907910;
006349dc      void var_54;
006349dc      operator&(&var_54, &var_a4);
006349f6      int32_t var_dc_7 = 0x907908;
006349fe      int32_t var_44;
006349fe      operator-(&var_44, &var_54);
00634a18      var_84 = var_44;
00634a27      int32_t var_40;
00634a27      int32_t var_80_2 = var_40;
00634a2b      int32_t var_3c;
00634a2b      int32_t var_7c_2 = var_3c;
00634a2f      int32_t var_38;
00634a2f      int32_t var_78_2 = var_38;
00634a2f      
00634a48      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
00634a7a          sub_633ab0(((char*)esi + 0x100), ((char*)esi + 0x240), ((char*)esi + 0x2c0), (edi_1 + (ebp << 3)), &var_84, ebp);
00634a7a      
00634a91      int32_t var_dc_9 = 0x9078f8;
00634a99      void var_34;
00634a99      operator&(&var_34, &var_a4);
00634ab3      int32_t var_dc_10 = 0x9078f0;
00634abb      int32_t var_24;
00634abb      operator-(&var_24, &var_34);
00634ad5      var_84 = var_24;
00634ae4      int32_t var_20;
00634ae4      int32_t var_80_3 = var_20;
00634ae8      int32_t var_1c;
00634ae8      int32_t var_7c_3 = var_1c;
00634aec      int32_t var_18;
00634aec      int32_t var_78_3 = var_18;
00634b00      int32_t eax_25 = ((uint32_t)operator!=(&var_84, &data_9078e0));
00634b00      
00634b05      if (eax_25 == 0)
00634b47          return eax_25;
00634b47      
00634b38      return sub_633ab0(((char*)esi + 0x180), ((char*)esi + 0x248), ((char*)esi + 0x2c8), ((edi_1 + (ebp << 3)) + 0x18), &var_84, ebp);
00634780  }

00634b48                          90 8d b4 26 00 00 00 00                                                          ...&....

00634b50  int32_t sub_634b50(int32_t arg1, int16_t* arg2, int16_t* arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00634b50  {
00634b57      int16_t* ecx = arg2;
00634b5e      int16_t* edx = arg3;
00634b73      int32_t ebp = arg5[1];
00634b7b      int32_t ebx_2 = ((ebp * arg6) + arg4);
00634cb7      void var_8c;
00634cb7      void var_6c;
00634cb7      void var_4c;
00634cb7      int32_t i;
00634cb7      
00634cb7      for (i = 0; i < 4; i += 1)
00634cb7      {
00634b90          int32_t ebp_1 = ((int32_t)*(uint16_t*)edx);
00634ba2          int32_t edi_1 = ((int32_t)*(uint16_t*)ecx);
00634bab          *(uint16_t*)(&var_8c + (i << 3)) = ((int16_t)(((ebp_1 * 0x167) - 0xb2f5) >> 8));
00634bbc          *(uint16_t*)(&var_6c + (i << 3)) = ((int16_t)((((edi_1 * 0x58) + (ebp_1 * 0xb7)) - 0x87f6) >> 8));
00634bd0          *(uint16_t*)(&var_4c + (i << 3)) = ((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8));
00634bd5          int32_t ebp_8 = ((int32_t)edx[1]);
00634be8          int32_t edi_2 = ((int32_t)ecx[1]);
00634bec          void var_8a;
00634bec          *(uint16_t*)(&var_8a + (i << 3)) = ((int16_t)(((ebp_8 * 0x167) - 0xb2f5) >> 8));
00634c04          void var_6a;
00634c04          *(uint16_t*)(&var_6a + (i << 3)) = ((int16_t)((((edi_2 * 0x58) + (ebp_8 * 0xb7)) - 0x87f6) >> 8));
00634c18          int32_t edi_3 = ((int32_t)ecx[2]);
00634c1c          void var_4a;
00634c1c          *(uint16_t*)(&var_4a + (i << 3)) = ((int16_t)(((edi_2 * 0x1c6) - 0xe251) >> 8));
00634c21          int32_t ebp_15 = ((int32_t)edx[2]);
00634c3a          void var_88;
00634c3a          *(uint16_t*)(&var_88 + (i << 3)) = ((int16_t)(((ebp_15 * 0x167) - 0xb2f5) >> 8));
00634c4c          void var_68;
00634c4c          *(uint16_t*)(&var_68 + (i << 3)) = ((int16_t)((((edi_3 * 0x58) + (ebp_15 * 0xb7)) - 0x87f6) >> 8));
00634c60          void var_48;
00634c60          *(uint16_t*)(&var_48 + (i << 3)) = ((int16_t)(((edi_3 * 0x1c6) - 0xe251) >> 8));
00634c65          int32_t ebp_22 = ((int32_t)edx[3]);
00634c78          int32_t edi_4 = ((int32_t)ecx[3]);
00634c7c          void var_86;
00634c7c          *(uint16_t*)(&var_86 + (i << 3)) = ((int16_t)(((ebp_22 * 0x167) - 0xb2f5) >> 8));
00634c94          ecx = &ecx[8];
00634c97          void var_66;
00634c97          *(uint16_t*)(&var_66 + (i << 3)) = ((int16_t)((((edi_4 * 0x58) + (ebp_22 * 0xb7)) - 0x87f6) >> 8));
00634cab          edx = &edx[8];
00634cae          void var_46;
00634cae          *(uint16_t*)(&var_46 + (i << 3)) = ((int16_t)(((edi_4 * 0x1c6) - 0xe251) >> 8));
00634cb7      }
00634cb7      
00634cbd      int32_t ebp_29 = ebp;
00634cc8      int32_t* esi_18 = arg5;
00634ccf      int32_t ecx_1 = esi_18[3];
00634ccf      
00634cd4      if (ebp_29 < ecx_1)
00634cd4      {
00634cda          int32_t edx_1 = esi_18[2];
00634cdf          i = (ebp_29 << 4);
00634cdf          
00634e1e          do
00634e1e          {
00634ce2              int32_t edi_6 = *(uint32_t*)esi_18;
00634ce2              
00634ce6              if (edi_6 < edx_1)
00634ce6              {
00634d12                  int32_t var_1c_1 = ebx_2;
00634d12                  
00634df9                  do
00634df9                  {
00634d24                      int32_t eax_2 = ((int32_t)*(uint16_t*)((arg1 + i) + (edi_6 << 1)));
00634d3c                      int32_t edx_7 = ((((edi_6 - 0x80000000) - 0x80000000) >> 1) + ((((ebp_29 - 0x80000000) - 0x80000000) >> 1) << 2));
00634d49                      int32_t ecx_4 = (((int32_t)*(uint16_t*)(&var_4c + (edx_7 << 1))) + eax_2);
00634d4b                      int32_t var_18_1 = ecx_4;
00634d55                      int32_t edx_8;
00634d55                      
00634d55                      if (ecx_4 <= 0xff)
00634d55                      {
00634d70                          edx_8 = ecx_4;
00634d70                          
00634d74                          if (edx_8 < 0)
00634d74                          {
00634d76                              edx_8 = 0;
00634d78                              int32_t var_18_3 = 0;
00634d74                          }
00634d55                      }
00634d55                      else
00634d55                      {
00634d57                          edx_8 = 0xff;
00634d5c                          int32_t var_18_2 = 0xff;
00634d55                      }
00634d55                      
00634d7c                      char* ecx_5 = (edi_6 * 3);
00634d87                      int32_t ebx_3 = ((int32_t)*(uint16_t*)(&var_6c + (edx_7 << 1)));
00634d8c                      ecx_5[var_1c_1] = edx_8;
00634d91                      int32_t ebx_5 = (-(ebx_3) + eax_2);
00634d93                      int32_t var_18_4 = ebx_5;
00634d9d                      int32_t edx_9;
00634d9d                      
00634d9d                      if (ebx_5 <= 0xff)
00634d9d                      {
00634db0                          edx_9 = ebx_5;
00634db0                          
00634db4                          if (edx_9 < 0)
00634db4                          {
00634db6                              edx_9 = 0;
00634db8                              int32_t var_18_6 = 0;
00634db4                          }
00634d9d                      }
00634d9d                      else
00634d9d                      {
00634d9f                          edx_9 = 0xff;
00634da4                          int32_t var_18_5 = 0xff;
00634d9d                      }
00634d9d                      
00634dbc                      ebx_2 = var_1c_1;
00634dbe                      ecx_5[(ebx_2 + 1)] = edx_9;
00634dc8                      int32_t eax_3 = (eax_2 + ((int32_t)*(uint16_t*)(&var_8c + (edx_7 << 1))));
00634dc8                      
00634dcf                      if (eax_3 > 0xff)
00634dd1                          eax_3 = 0xff;
00634dcf                      else if (eax_3 < 0)
00634de4                          eax_3 = 0;
00634de4                      
00634de8                      edi_6 += 1;
00634de9                      ecx_5[(ebx_2 + 2)] = eax_3;
00634df4                      edx_1 = arg5[2];
00634df9                  } while (edi_6 < edx_1);
00634df9                  
00634e07                  esi_18 = arg5;
00634e0e                  ecx_1 = esi_18[3];
00634ce6              }
00634ce6              
00634e11              ebx_2 += arg6;
00634e18              i += 0x10;
00634e1b              ebp_29 += 1;
00634e1e          } while (ebp_29 < ecx_1);
00634cd4      }
00634cd4      
00634e2b      return i;
00634b50  }

00634d62        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
00634daa                                8d b6 00 00 00 00                                                            ......
00634dd8                                                                          90 8d b4 26 00 00 00 00                          ...&....
00634e2c                                      8d 74 26 00                                                              .t&.

00634e30  char* sub_634e30(int16_t* arg1, int16_t* arg2, void* arg3, char* arg4, int32_t arg5)

00634e30  {
00634e36      int16_t* edx = arg1;
00634e42      char* result = arg4;
00634e4c      int32_t var_48 = 0;
00634e50      void* var_30 = arg3;
00634e54      int16_t* var_34 = arg2;
006356de      bool cond:4_1;
006356de      
006356de      do
006356de      {
00634e60          int16_t* esi_2 = var_30;
00634e64          int32_t ebx_1 = ((int32_t)*(uint16_t*)esi_2);
00634e73          int32_t ecx_3 = (((ebx_1 * 0x167) - 0xb2f5) >> 8);
00634e84          int32_t edi_1 = ((int32_t)*(uint16_t*)var_34);
00634e91          int32_t ecx_7 = ((((edi_1 * 0x58) + (ebx_1 * 0xb7)) - 0x87f6) >> 8);
00634ea4          int32_t ecx_10 = (((edi_1 * 0x1c6) - 0xe251) >> 8);
00634ea7          int32_t edi_2 = ((int32_t)esi_2[1]);
00634ebb          int32_t ecx_13 = (((edi_2 * 0x167) - 0xb2f5) >> 8);
00634ecc          int32_t ebx_3 = ((int32_t)var_34[1]);
00634eda          int32_t ecx_17 = ((((ebx_3 * 0x58) + (edi_2 * 0xb7)) - 0x87f6) >> 8);
00634eed          int32_t ecx_20 = (((ebx_3 * 0x1c6) - 0xe251) >> 8);
00634ef0          int32_t edi_4 = ((int32_t)esi_2[2]);
00634f04          int32_t ecx_23 = (((edi_4 * 0x167) - 0xb2f5) >> 8);
00634f15          int32_t ecx_25 = ((int32_t)var_34[2]);
00634f23          int32_t ebx_6 = ((((ecx_25 * 0x58) + (edi_4 * 0xb7)) - 0x87f6) >> 8);
00634f36          int32_t ecx_28 = (((ecx_25 * 0x1c6) - 0xe251) >> 8);
00634f39          int32_t edi_6 = ((int32_t)esi_2[3]);
00634f50          int32_t ecx_31 = (((edi_6 * 0x167) - 0xb2f5) >> 8);
00634f61          int32_t ebx_7 = ((int32_t)var_34[3]);
00634f6f          int32_t ecx_35 = ((((ebx_7 * 0x58) + (edi_6 * 0xb7)) - 0x87f6) >> 8);
00634f82          int32_t ecx_38 = (((ebx_7 * 0x1c6) - 0xe251) >> 8);
00634f8d          int32_t ecx_39 = ((int32_t)*(uint16_t*)edx);
00634f90          int32_t ebx_9 = (ecx_10 + ecx_39);
00634f93          var_34 = &var_34[8];
00634f9e          var_30 = &esi_2[8];
00634f9e          
00634fa2          if (ebx_9 > 0xff)
00634fa4              ebx_9 = 0xff;
00634fa2          else if (ebx_9 < 0)
00634fb4              ebx_9 = 0;
00634fb4          
00634fb6          *(uint8_t*)result = ebx_9;
00634fba          int32_t ebx_11 = (ecx_39 - ecx_7);
00634fba          
00634fc4          if (ebx_11 > 0xff)
00634fc6              ebx_11 = 0xff;
00634fc4          else if (ebx_11 < 0)
00634fd4              ebx_11 = 0;
00634fd4          
00634fd6          result[1] = ebx_11;
00634fd9          int32_t ecx_40 = (ecx_39 + ecx_3);
00634fd9          
00634fe3          if (ecx_40 > 0xff)
00634fe5              ecx_40 = 0xff;
00634fe3          else if (ecx_40 < 0)
00634ff4              ecx_40 = 0;
00634ff4          
00634ffa          result[2] = ecx_40;
00634ffd          int32_t ecx_41 = ((int32_t)edx[1]);
00635001          int32_t ebx_13 = (ecx_10 + ecx_41);
00635001          
0063500a          if (ebx_13 > 0xff)
0063500c              ebx_13 = 0xff;
0063500a          else if (ebx_13 < 0)
00635024              ebx_13 = 0;
00635024          
00635026          result[3] = ebx_13;
0063502b          int32_t ebx_15 = (ecx_41 - ecx_7);
0063502b          
00635035          if (ebx_15 > 0xff)
00635037              ebx_15 = 0xff;
00635035          else if (ebx_15 < 0)
00635044              ebx_15 = 0;
00635044          
00635046          result[4] = ebx_15;
00635049          int32_t ecx_42 = (ecx_41 + ecx_3);
00635049          
00635053          if (ecx_42 > 0xff)
00635055              ecx_42 = 0xff;
00635053          else if (ecx_42 < 0)
00635064              ecx_42 = 0;
00635064          
0063506a          result[5] = ecx_42;
0063506d          int32_t ecx_43 = ((int32_t)edx[2]);
00635071          int32_t ebx_17 = (ecx_43 + ecx_20);
00635071          
0063507a          if (ebx_17 > 0xff)
0063507c              ebx_17 = 0xff;
0063507a          else if (ebx_17 < 0)
00635094              ebx_17 = 0;
00635094          
00635096          result[6] = ebx_17;
0063509b          int32_t ebx_19 = (ecx_43 - ecx_17);
0063509b          
006350a5          if (ebx_19 > 0xff)
006350a7              ebx_19 = 0xff;
006350a5          else if (ebx_19 < 0)
006350b4              ebx_19 = 0;
006350b4          
006350b6          result[7] = ebx_19;
006350b9          int32_t ecx_44 = (ecx_43 + ecx_13);
006350b9          
006350c3          if (ecx_44 > 0xff)
006350c5              ecx_44 = 0xff;
006350c3          else if (ecx_44 < 0)
006350d4              ecx_44 = 0;
006350d4          
006350da          result[8] = ecx_44;
006350dd          int32_t ecx_45 = ((int32_t)edx[3]);
006350e1          int32_t ebx_21 = (ecx_45 + ecx_20);
006350e1          
006350ea          if (ebx_21 > 0xff)
006350ec              ebx_21 = 0xff;
006350ea          else if (ebx_21 < 0)
00635104              ebx_21 = 0;
00635104          
00635106          result[9] = ebx_21;
0063510b          int32_t ebx_23 = (ecx_45 - ecx_17);
0063510b          
00635115          if (ebx_23 > 0xff)
00635117              ebx_23 = 0xff;
00635115          else if (ebx_23 < 0)
00635124              ebx_23 = 0;
00635124          
00635126          result[0xa] = ebx_23;
00635129          int32_t ecx_46 = (ecx_45 + ecx_13);
00635129          
00635133          if (ecx_46 > 0xff)
00635135              ecx_46 = 0xff;
00635133          else if (ecx_46 < 0)
00635144              ecx_46 = 0;
00635144          
0063514a          result[0xb] = ecx_46;
0063514d          int32_t ecx_47 = ((int32_t)edx[4]);
00635151          int32_t ebx_25 = (ecx_47 + ecx_28);
00635151          
0063515a          if (ebx_25 > 0xff)
0063515c              ebx_25 = 0xff;
0063515a          else if (ebx_25 < 0)
00635174              ebx_25 = 0;
00635174          
00635176          result[0xc] = ebx_25;
0063517b          int32_t ebx_27 = (ecx_47 - ebx_6);
0063517b          
00635185          if (ebx_27 > 0xff)
00635187              ebx_27 = 0xff;
00635185          else if (ebx_27 < 0)
00635194              ebx_27 = 0;
00635194          
00635196          result[0xd] = ebx_27;
00635199          int32_t ecx_48 = (ecx_47 + ecx_23);
00635199          
006351a3          if (ecx_48 > 0xff)
006351a5              ecx_48 = 0xff;
006351a3          else if (ecx_48 < 0)
006351b4              ecx_48 = 0;
006351b4          
006351ba          result[0xe] = ecx_48;
006351bd          int32_t ecx_49 = ((int32_t)edx[5]);
006351c1          int32_t ebx_29 = (ecx_49 + ecx_28);
006351c1          
006351ca          if (ebx_29 > 0xff)
006351cc              ebx_29 = 0xff;
006351ca          else if (ebx_29 < 0)
006351e4              ebx_29 = 0;
006351e4          
006351e6          result[0xf] = ebx_29;
006351eb          int32_t ebx_31 = (ecx_49 - ebx_6);
006351eb          
006351f5          if (ebx_31 > 0xff)
006351f7              ebx_31 = 0xff;
006351f5          else if (ebx_31 < 0)
00635204              ebx_31 = 0;
00635204          
00635206          result[0x10] = ebx_31;
00635209          int32_t ecx_50 = (ecx_49 + ecx_23);
00635209          
00635213          if (ecx_50 > 0xff)
00635215              ecx_50 = 0xff;
00635213          else if (ecx_50 < 0)
00635224              ecx_50 = 0;
00635224          
0063522a          result[0x11] = ecx_50;
0063522d          int32_t ecx_51 = ((int32_t)edx[6]);
00635231          int32_t ebx_33 = (ecx_51 + ecx_38);
00635231          
0063523a          if (ebx_33 > 0xff)
0063523c              ebx_33 = 0xff;
0063523a          else if (ebx_33 < 0)
00635254              ebx_33 = 0;
00635254          
00635256          result[0x12] = ebx_33;
0063525b          int32_t ebx_35 = (ecx_51 - ecx_35);
0063525b          
00635265          if (ebx_35 > 0xff)
00635267              ebx_35 = 0xff;
00635265          else if (ebx_35 < 0)
00635274              ebx_35 = 0;
00635274          
00635276          result[0x13] = ebx_35;
00635279          int32_t ecx_52 = (ecx_51 + ecx_31);
00635279          
00635283          if (ecx_52 > 0xff)
00635285              ecx_52 = 0xff;
00635283          else if (ecx_52 < 0)
00635294              ecx_52 = 0;
00635294          
0063529a          result[0x14] = ecx_52;
0063529d          int32_t ecx_53 = ((int32_t)edx[7]);
006352a1          int32_t ebx_37 = (ecx_53 + ecx_38);
006352a1          
006352aa          if (ebx_37 > 0xff)
006352ac              ebx_37 = 0xff;
006352aa          else if (ebx_37 < 0)
006352c4              ebx_37 = 0;
006352c4          
006352c6          result[0x15] = ebx_37;
006352cb          int32_t ebx_39 = (ecx_53 - ecx_35);
006352cb          
006352d5          if (ebx_39 > 0xff)
006352d7              ebx_39 = 0xff;
006352d5          else if (ebx_39 < 0)
006352e4              ebx_39 = 0;
006352e4          
006352e6          result[0x16] = ebx_39;
006352e9          int32_t ecx_54 = (ecx_53 + ecx_31);
006352e9          
006352f3          if (ecx_54 > 0xff)
006352f5              ecx_54 = 0xff;
006352f3          else if (ecx_54 < 0)
00635304              ecx_54 = 0;
00635304          
0063530a          result[0x17] = ecx_54;
0063530d          int32_t ecx_55 = ((int32_t)edx[8]);
00635311          int32_t ebx_41 = (ecx_10 + ecx_55);
00635314          void* eax = &result[arg5];
00635314          
0063531e          if (ebx_41 > 0xff)
00635320              ebx_41 = 0xff;
0063531e          else if (ebx_41 < 0)
00635334              ebx_41 = 0;
00635334          
00635336          *(uint8_t*)eax = ebx_41;
0063533a          int32_t ebx_43 = (ecx_55 - ecx_7);
0063533a          
00635344          if (ebx_43 > 0xff)
00635346              ebx_43 = 0xff;
00635344          else if (ebx_43 < 0)
00635354              ebx_43 = 0;
00635354          
00635356          *(uint8_t*)((char*)eax + 1) = ebx_43;
00635359          int32_t ecx_56 = (ecx_55 + ecx_3);
00635359          
00635363          if (ecx_56 > 0xff)
00635365              ecx_56 = 0xff;
00635363          else if (ecx_56 < 0)
00635374              ecx_56 = 0;
00635374          
0063537a          *(uint8_t*)((char*)eax + 2) = ecx_56;
0063537d          int32_t ecx_57 = ((int32_t)edx[9]);
00635381          int32_t ebx_45 = (ecx_10 + ecx_57);
00635383          int32_t var_10_2 = ebx_45;
00635383          
0063538d          if (ebx_45 > 0xff)
0063538d          {
0063538f              ebx_45 = 0xff;
00635394              int32_t var_10_3 = 0xff;
0063538d          }
0063538d          else if (ebx_45 < 0)
006353a2          {
006353a4              ebx_45 = 0;
006353a6              int32_t var_10_4 = 0;
006353a2          }
006353a2          
006353aa          *(uint8_t*)((char*)eax + 3) = ebx_45;
006353b3          int32_t ebx_48 = (-(ecx_7) + ecx_57);
006353bb          int32_t var_1c_2 = ebx_48;
006353bb          
006353bf          if (ebx_48 > 0xff)
006353bf          {
006353c1              ebx_48 = 0xff;
006353c6              int32_t var_1c_3 = 0xff;
006353bf          }
006353bf          else if (ebx_48 < 0)
006353d2          {
006353d4              ebx_48 = 0;
006353d6              int32_t var_1c_4 = 0;
006353d2          }
006353d2          
006353da          *(uint8_t*)((char*)eax + 4) = ebx_48;
006353dd          int32_t ecx_58 = (ecx_57 + ecx_3);
006353dd          
006353e7          if (ecx_58 > 0xff)
006353e9              ecx_58 = 0xff;
006353e7          else if (ecx_58 < 0)
006353f4              ecx_58 = 0;
006353f4          
006353fa          *(uint8_t*)((char*)eax + 5) = ecx_58;
006353fd          int32_t ecx_59 = ((int32_t)edx[0xa]);
00635401          int32_t ebx_50 = (ecx_59 + ecx_20);
00635401          
0063540a          if (ebx_50 > 0xff)
0063540c              ebx_50 = 0xff;
0063540a          else if (ebx_50 < 0)
00635424              ebx_50 = 0;
00635424          
00635426          *(uint8_t*)((char*)eax + 6) = ebx_50;
0063542b          int32_t ebx_52 = (ecx_59 - ecx_17);
0063542b          
00635435          if (ebx_52 > 0xff)
00635437              ebx_52 = 0xff;
00635435          else if (ebx_52 < 0)
00635444              ebx_52 = 0;
00635444          
00635446          *(uint8_t*)((char*)eax + 7) = ebx_52;
00635449          int32_t ecx_60 = (ecx_59 + ecx_13);
00635449          
00635453          if (ecx_60 > 0xff)
00635455              ecx_60 = 0xff;
00635453          else if (ecx_60 < 0)
00635464              ecx_60 = 0;
00635464          
0063546a          *(uint8_t*)((char*)eax + 8) = ecx_60;
0063546d          int32_t ecx_61 = ((int32_t)edx[0xb]);
00635471          int32_t ebx_54 = (ecx_20 + ecx_61);
00635473          int32_t var_14_2 = ebx_54;
00635473          
0063547d          if (ebx_54 > 0xff)
0063547d          {
0063547f              ebx_54 = 0xff;
00635484              int32_t var_14_3 = 0xff;
0063547d          }
0063547d          else if (ebx_54 < 0)
00635492          {
00635494              ebx_54 = 0;
00635496              int32_t var_14_4 = 0;
00635492          }
00635492          
0063549a          *(uint8_t*)((char*)eax + 9) = ebx_54;
006354a3          int32_t ebx_57 = (-(ecx_17) + ecx_61);
006354ab          int32_t var_24_2 = ebx_57;
006354ab          
006354af          if (ebx_57 > 0xff)
006354af          {
006354b1              ebx_57 = 0xff;
006354b6              int32_t var_24_3 = 0xff;
006354af          }
006354af          else if (ebx_57 < 0)
006354c2          {
006354c4              ebx_57 = 0;
006354c6              int32_t var_24_4 = 0;
006354c2          }
006354c2          
006354ca          *(uint8_t*)((char*)eax + 0xa) = ebx_57;
006354cd          int32_t ecx_62 = (ecx_61 + ecx_13);
006354cd          
006354d7          if (ecx_62 > 0xff)
006354d9              ecx_62 = 0xff;
006354d7          else if (ecx_62 < 0)
006354e4              ecx_62 = 0;
006354e4          
006354ea          *(uint8_t*)((char*)eax + 0xb) = ecx_62;
006354ed          int32_t ecx_63 = ((int32_t)edx[0xc]);
006354f1          int32_t ebx_59 = (ecx_63 + ecx_28);
006354f1          
006354fa          if (ebx_59 > 0xff)
006354fc              ebx_59 = 0xff;
006354fa          else if (ebx_59 < 0)
00635514              ebx_59 = 0;
00635514          
00635516          *(uint8_t*)((char*)eax + 0xc) = ebx_59;
0063551b          int32_t ebx_61 = (ecx_63 - ebx_6);
0063551b          
00635525          if (ebx_61 > 0xff)
00635527              ebx_61 = 0xff;
00635525          else if (ebx_61 < 0)
00635534              ebx_61 = 0;
00635534          
00635536          *(uint8_t*)((char*)eax + 0xd) = ebx_61;
00635539          int32_t ecx_64 = (ecx_63 + ecx_23);
00635539          
00635543          if (ecx_64 > 0xff)
00635545              ecx_64 = 0xff;
00635543          else if (ecx_64 < 0)
00635554              ecx_64 = 0;
00635554          
0063555a          *(uint8_t*)((char*)eax + 0xe) = ecx_64;
0063555d          int32_t ecx_65 = ((int32_t)edx[0xd]);
00635561          int32_t ebx_63 = (ecx_28 + ecx_65);
00635563          int32_t var_18_2 = ebx_63;
00635563          
0063556d          if (ebx_63 > 0xff)
0063556d          {
0063556f              ebx_63 = 0xff;
00635574              int32_t var_18_3 = 0xff;
0063556d          }
0063556d          else if (ebx_63 < 0)
00635582          {
00635584              ebx_63 = 0;
00635586              int32_t var_18_4 = 0;
00635582          }
00635582          
0063558a          *(uint8_t*)((char*)eax + 0xf) = ebx_63;
00635593          int32_t ebx_66 = (-(ebx_6) + ecx_65);
0063559b          int32_t var_28_2 = ebx_66;
0063559b          
0063559f          if (ebx_66 > 0xff)
0063559f          {
006355a1              ebx_66 = 0xff;
006355a6              int32_t var_28_3 = 0xff;
0063559f          }
0063559f          else if (ebx_66 < 0)
006355b2          {
006355b4              ebx_66 = 0;
006355b6              int32_t var_28_4 = 0;
006355b2          }
006355b2          
006355ba          *(uint8_t*)((char*)eax + 0x10) = ebx_66;
006355bd          int32_t ecx_66 = (ecx_65 + ecx_23);
006355bd          
006355c7          if (ecx_66 > 0xff)
006355c9              ecx_66 = 0xff;
006355c7          else if (ecx_66 < 0)
006355d4              ecx_66 = 0;
006355d4          
006355da          *(uint8_t*)((char*)eax + 0x11) = ecx_66;
006355dd          int32_t ecx_67 = ((int32_t)edx[0xe]);
006355e1          int32_t ebx_68 = (ecx_67 + ecx_38);
006355e1          
006355ea          if (ebx_68 > 0xff)
006355ec              ebx_68 = 0xff;
006355ea          else if (ebx_68 < 0)
00635604              ebx_68 = 0;
00635604          
00635606          *(uint8_t*)((char*)eax + 0x12) = ebx_68;
0063560b          int32_t ebx_70 = (ecx_67 - ecx_35);
0063560b          
00635615          if (ebx_70 > 0xff)
00635617              ebx_70 = 0xff;
00635615          else if (ebx_70 < 0)
00635624              ebx_70 = 0;
00635624          
00635626          *(uint8_t*)((char*)eax + 0x13) = ebx_70;
00635629          int32_t ecx_68 = (ecx_67 + ecx_31);
00635629          
00635633          if (ecx_68 > 0xff)
00635635              ecx_68 = 0xff;
00635633          else if (ecx_68 < 0)
00635644              ecx_68 = 0;
00635644          
0063564a          *(uint8_t*)((char*)eax + 0x14) = ecx_68;
0063564d          int32_t ecx_69 = ((int32_t)edx[0xf]);
00635651          int32_t ebx_72 = (ecx_38 + ecx_69);
00635653          int32_t var_20_2 = ebx_72;
00635653          
0063565d          if (ebx_72 > 0xff)
0063565d          {
0063565f              ebx_72 = 0xff;
00635664              int32_t var_20_3 = 0xff;
0063565d          }
0063565d          else if (ebx_72 < 0)
00635672          {
00635674              ebx_72 = 0;
00635676              int32_t var_20_4 = 0;
00635672          }
00635672          
0063567a          *(uint8_t*)((char*)eax + 0x15) = ebx_72;
00635683          int32_t ebx_75 = (-(ecx_35) + ecx_69);
0063568b          int32_t var_2c_2 = ebx_75;
0063568b          
0063568f          if (ebx_75 > 0xff)
0063568f          {
00635691              ebx_75 = 0xff;
00635696              int32_t var_2c_3 = 0xff;
0063568f          }
0063568f          else if (ebx_75 < 0)
006356a2          {
006356a4              ebx_75 = 0;
006356a6              int32_t var_2c_4 = 0;
006356a2          }
006356a2          
006356aa          *(uint8_t*)((char*)eax + 0x16) = ebx_75;
006356ad          int32_t ecx_70 = (ecx_69 + ecx_31);
006356ad          
006356b7          if (ecx_70 > 0xff)
006356b9              ecx_70 = 0xff;
006356b7          else if (ecx_70 < 0)
006356c4              ecx_70 = 0;
006356c4          
006356c6          edx = &edx[0x10];
006356cd          *(uint8_t*)((char*)eax + 0x17) = ecx_70;
006356d3          result = ((char*)eax + arg5);
006356d7          cond:4_1 = (var_48 + 2) < 8;
006356da          var_48 += 2;
006356de      } while (cond:4_1);
006356ea      return result;
00634e30  }

00634fab                                   90 8d 74 26 00                                                             ..t&.
00634fcd                                         8d 76 00                                                               .v.
00634fec                                      8d 74 26 00                                                              .t&.
00635013                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063503e                                                                                            8b f6                                ..
0063505c                                                                                      8d 74 26 00                              .t&.
00635083           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
006350ae                                            8b f6                                                                ..
006350cc                                      8d 74 26 00                                                              .t&.
006350f3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063511e                                                                                            8b f6                                ..
0063513c                                                                                      8d 74 26 00                              .t&.
00635163           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063518e                                            8b f6                                                                ..
006351ac                                      8d 74 26 00                                                              .t&.
006351d3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
006351fe                                                                                            8b f6                                ..
0063521c                                                                                      8d 74 26 00                              .t&.
00635243           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063526e                                            8b f6                                                                ..
0063528c                                      8d 74 26 00                                                              .t&.
006352b3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
006352de                                                                                            8b f6                                ..
006352fc                                                                                      8d 74 26 00                              .t&.
00635327                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0063534d                                         8d 76 00                                                               .v.
0063536c                                      8d 74 26 00                                                              .t&.
0063539a                                                                                8d b6 00 00 00 00                            ......
006353cc                                      8d 74 26 00                                                              .t&.
00635413                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063543e                                                                                            8b f6                                ..
0063545c                                                                                      8d 74 26 00                              .t&.
0063548a                                8d b6 00 00 00 00                                                            ......
006354bc                                                                                      8d 74 26 00                              .t&.
00635503           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063552e                                            8b f6                                                                ..
0063554c                                      8d 74 26 00                                                              .t&.
0063557a                                                                                8d b6 00 00 00 00                            ......
006355ac                                      8d 74 26 00                                                              .t&.
006355f3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063561e                                                                                            8b f6                                ..
0063563c                                                                                      8d 74 26 00                              .t&.
0063566a                                8d b6 00 00 00 00                                                            ......
0063569c                                                                                      8d 74 26 00                              .t&.
006356eb                                   90 8d 74 26 00                                                             ..t&.

006356f0  char* _YCbCr_411_to_BGR_Full_MCU_PX(int16_t* arg1, int16_t* arg2, void* arg3, char* arg4, int32_t arg5)

006356f0  {
0063571e      sub_634e30(arg1, arg2, arg3, arg4, arg5);
00635749      sub_634e30(&arg1[0x40], &arg2[4], ((char*)arg3 + 8), &arg4[0x18], arg5);
0063574e      void* edi_1 = &arg4[(arg5 << 3)];
00635774      sub_634e30(&arg1[0x80], &arg2[0x20], ((char*)arg3 + 0x40), edi_1, arg5);
006357ab      return sub_634e30(&arg1[0xc0], &arg2[0x24], ((char*)arg3 + 0x48), ((char*)edi_1 + 0x18), arg5);
006356f0  }

006357ac                                      8d 74 26 00                                                              .t&.

006357b0  int64_t* _YCbCr_411_to_BGR_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

006357b0  {
006357de      _own_ycbcr_411_to_bgr_one_half_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00635809      _own_ycbcr_411_to_bgr_one_half_mcu_m5(&arg1[0x20], &arg2[8], &arg3[8], &arg4[arg5], arg5);
00635815      return arg1;
006357b0  }

00635816                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

00635820  int32_t _YCbCr_411_to_BGR_MCU(void* arg1, int32_t arg2, int32_t arg3)

00635820  {
0063583f      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
00635848      void* ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063584e      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
00635854      int32_t var_b4 = data_907958;
0063585e      int32_t var_b0 = data_90795c;
00635868      int32_t var_ac = data_907960;
00635872      int32_t var_a8 = data_907964;
006358c3      void var_a4;
006358c3      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 0x10, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_a4);
006358c3      
006358ca      if (eax_6 != 0)
006358d6          return eax_6;
006358d6      
006358d7      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
006358d7      
006358f6      if (((uint32_t)operator==(&var_a4, &var_b4)) != 0)
00635927          return *(uint32_t*)(ebx + 0xbc)(ebp, ((char*)ebp + 0x200), ((char*)ebp + 0x280), edi_1, esi);
00635927      
00635937      int32_t var_dc_1 = 0x907938;
0063593f      int32_t var_94;
0063593f      operator&(&var_94, &var_a4);
00635950      int32_t var_84 = var_94;
0063595c      int32_t var_90;
0063595c      int32_t var_80 = var_90;
00635960      int32_t var_8c;
00635960      int32_t var_7c = var_8c;
00635964      int32_t var_88;
00635964      int32_t var_78 = var_88;
00635964      
0063597d      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
006359a6          sub_634b50(ebp, ((char*)ebp + 0x200), ((char*)ebp + 0x280), edi_1, &var_84, esi);
006359a6      
006359ba      int32_t var_dc_3 = 0x907928;
006359c2      void var_74;
006359c2      operator&(&var_74, &var_a4);
006359d9      int32_t var_dc_4 = 0x907920;
006359e1      int32_t var_64;
006359e1      operator-(&var_64, &var_74);
006359fb      var_84 = var_64;
00635a0a      int32_t var_60;
00635a0a      int32_t var_80_1 = var_60;
00635a0e      int32_t var_5c;
00635a0e      int32_t var_7c_1 = var_5c;
00635a12      int32_t var_58;
00635a12      int32_t var_78_1 = var_58;
00635a12      
00635a2b      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
00635a5d          sub_634b50(((char*)ebp + 0x80), ((char*)ebp + 0x208), ((char*)ebp + 0x288), (edi_1 + 0x18), &var_84, esi);
00635a5d      
00635a74      int32_t var_dc_6 = 0x907910;
00635a7c      void var_54;
00635a7c      operator&(&var_54, &var_a4);
00635a96      int32_t var_dc_7 = 0x907908;
00635a9e      int32_t var_44;
00635a9e      operator-(&var_44, &var_54);
00635ab8      var_84 = var_44;
00635ac7      int32_t var_40;
00635ac7      int32_t var_80_2 = var_40;
00635acb      int32_t var_3c;
00635acb      int32_t var_7c_2 = var_3c;
00635acf      int32_t var_38;
00635acf      int32_t var_78_2 = var_38;
00635acf      
00635ae8      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
00635b1a          sub_634b50(((char*)ebp + 0x100), ((char*)ebp + 0x240), ((char*)ebp + 0x2c0), (edi_1 + (esi << 3)), &var_84, esi);
00635b1a      
00635b31      int32_t var_dc_9 = 0x9078f8;
00635b39      void var_34;
00635b39      operator&(&var_34, &var_a4);
00635b53      int32_t var_dc_10 = 0x9078f0;
00635b5b      int32_t var_24;
00635b5b      operator-(&var_24, &var_34);
00635b75      var_84 = var_24;
00635b84      int32_t var_20;
00635b84      int32_t var_80_3 = var_20;
00635b88      int32_t var_1c;
00635b88      int32_t var_7c_3 = var_1c;
00635b8c      int32_t var_18;
00635b8c      int32_t var_78_3 = var_18;
00635ba0      int32_t eax_25 = ((uint32_t)operator!=(&var_84, &data_9078e0));
00635ba0      
00635ba5      if (eax_25 == 0)
00635be7          return eax_25;
00635be7      
00635bd8      return sub_634b50(((char*)ebp + 0x180), ((char*)ebp + 0x248), ((char*)ebp + 0x2c8), ((edi_1 + (esi << 3)) + 0x18), &var_84, esi);
00635820  }

00635be8                          90 8d b4 26 00 00 00 00                                                          ...&....

00635bf0  void sub_635bf0(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00635bf0  {
00635bf7      int32_t* edi = arg5;
00635bff      int32_t esi = edi[1];
00635c07      int32_t ebx = edi[3];
00635c0a      int32_t ebp_2 = ((esi * arg6) + arg4);
00635c0a      
00635c10      if (esi < ebx)
00635c10      {
00635c16          int32_t eax = edi[2];
00635c1e          int32_t edx_3 = (esi * 8);
00635c1e          
00635d41          do
00635d41          {
00635c20              int32_t ecx_1 = *(uint32_t*)edi;
00635c20              
00635c24              if (ecx_1 < eax)
00635c24              {
00635c2d                  int32_t ebx_1 = (ecx_1 + edx_3);
00635c34                  int32_t var_20_1 = ecx_1;
00635c3c                  char* ebp_3 = (ecx_1 * 3);
00635d20                  int32_t edi_4;
00635d20                  
00635d20                  do
00635d20                  {
00635c46                      int32_t eax_2 = ((int32_t)*(uint16_t*)(arg3 + (ebx_1 << 1)));
00635c60                      int32_t edx_4 = ((int32_t)*(uint16_t*)(arg2 + (ebx_1 << 1)));
00635c90                      int32_t esi_8 = ((int32_t)*(uint16_t*)(arg1 + (ebx_1 << 1)));
00635c94                      int32_t ecx_4 = (((int32_t)((int16_t)(((eax_2 * 0x167) - 0xb2f5) >> 8))) + esi_8);
00635c94                      
00635ca0                      if (ecx_4 > 0xff)
00635ca2                          ecx_4 = 0xff;
00635ca0                      else if (ecx_4 < 0)
00635cb4                          ecx_4 = 0;
00635cb4                      
00635cbc                      ebp_3[ebp_2] = ecx_4;
00635cc0                      int32_t eax_5 = (-(((int32_t)((int16_t)((((edx_4 * 0x58) + (eax_2 * 0xb7)) - 0x87f6) >> 8)))) + esi_8);
00635cc0                      
00635cc9                      if (eax_5 > 0xff)
00635ccb                          eax_5 = 0xff;
00635cc9                      else if (eax_5 < 0)
00635ce4                          eax_5 = 0;
00635ce4                      
00635ce8                      ebp_3[(ebp_2 + 1)] = eax_5;
00635cec                      int32_t edx_9 = (((int32_t)((int16_t)(((edx_4 * 0x1c6) - 0xe251) >> 8))) + esi_8);
00635cec                      
00635cf6                      if (edx_9 > 0xff)
00635cf8                          edx_9 = 0xff;
00635cf6                      else if (edx_9 < 0)
00635d04                          edx_9 = 0;
00635d04                      
00635d06                      ebx_1 += 1;
00635d07                      ebp_3[(ebp_2 + 2)] = edx_9;
00635d0b                      ebp_3 = &ebp_3[3];
00635d12                      edi_4 = (var_20_1 + 1);
00635d17                      eax = arg5[2];
00635d1a                      var_20_1 = edi_4;
00635d20                  } while (edi_4 < eax);
00635d30                  edi = arg5;
00635d34                  ebx = edi[3];
00635c24              }
00635c24              
00635d37              ebp_2 += arg6;
00635d3b              edx_3 += 8;
00635d3e              esi += 1;
00635d41          } while (esi < ebx);
00635c10      }
00635bf0  }

00635ca9                             8d b4 26 00 00 00 00                                                           ..&....
00635cd2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
00635cff                                                                                               90                                 .
00635d4f                                               90                                                                 .

00635d50  int32_t _YCbCr_111_to_RGB_Full_MCU_PX(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00635d50  {
00635d63      int32_t ecx = arg4;
00635e69      int32_t i;
00635e69      
00635e69      for (i = 0; i < 0x40; i += 8)
00635e69      {
00635d6d          char* j = nullptr;
00635d6f          int32_t i_1 = i;
00635d6f          
00635e51          do
00635e51          {
00635d84              int32_t edx_1 = ((int32_t)*(uint16_t*)(arg3 + (i_1 << 1)));
00635d9e              int32_t ecx_1 = ((int32_t)*(uint16_t*)(arg2 + (i_1 << 1)));
00635dce              int32_t esi_7 = ((int32_t)*(uint16_t*)(arg1 + (i_1 << 1)));
00635dd2              int32_t eax_2 = (((int32_t)((int16_t)(((edx_1 * 0x167) - 0xb2f5) >> 8))) + esi_7);
00635dd2              
00635ddd              if (eax_2 > 0xff)
00635ddf                  eax_2 = 0xff;
00635ddd              else if (eax_2 < 0)
00635df4                  eax_2 = 0;
00635df4              
00635dfc              j[ecx] = eax_2;
00635e00              int32_t edx_7 = (-(((int32_t)((int16_t)((((ecx_1 * 0x58) + (edx_1 * 0xb7)) - 0x87f6) >> 8)))) + esi_7);
00635e00              
00635e0a              if (edx_7 > 0xff)
00635e0c                  edx_7 = 0xff;
00635e0a              else if (edx_7 < 0)
00635e24                  edx_7 = 0;
00635e24              
00635e28              j[(ecx + 1)] = edx_7;
00635e2c              int32_t ecx_6 = (((int32_t)((int16_t)(((ecx_1 * 0x1c6) - 0xe251) >> 8))) + esi_7);
00635e2c              
00635e36              if (ecx_6 > 0xff)
00635e38                  ecx_6 = 0xff;
00635e36              else if (ecx_6 < 0)
00635e44                  ecx_6 = 0;
00635e44              
00635e46              i_1 += 1;
00635e47              j[(ecx + 2)] = ecx_6;
00635e4b              j = &j[3];
00635e51          } while (j < 0x18);
00635e51          
00635e61          ecx += arg5;
00635e69      }
00635e69      
00635e76      return i;
00635d50  }

00635de6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
00635e13                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
00635e3f                                                                                               90                                 .
00635e77                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00635e80  uint32_t _YCbCr_111_to_RGB_MCU(void* arg1, int32_t arg2, int32_t arg3)

00635e80  {
00635e9c      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
00635ea5      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
00635eab      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
00635eb1      int32_t var_54 = data_907968;
00635ebb      int32_t var_50 = data_90796c;
00635ec5      int32_t var_4c = data_907970;
00635ecf      int32_t var_48 = data_907974;
00635f20      void var_44;
00635f20      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_44);
00635f20      
00635f27      if (eax_6 != 0)
00635f30          return eax_6;
00635f30      
00635f31      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
00635f31      
00635f50      if (((uint32_t)operator==(&var_44, &var_54)) != 0)
00635f7e          return *(uint32_t*)(ebx + 0xa8)(ebp, (ebp + 0x80), (ebp + 0x100), edi_1, esi);
00635f7e      
00635f8e      int32_t var_7c_1 = 0x907938;
00635f96      int32_t var_34;
00635f96      operator&(&var_34, &var_44);
00635fa7      int32_t var_24 = var_34;
00635fb3      int32_t var_30;
00635fb3      int32_t var_20 = var_30;
00635fb7      int32_t var_2c;
00635fb7      int32_t var_1c = var_2c;
00635fbb      int32_t var_28;
00635fbb      int32_t var_18 = var_28;
00635fcf      uint32_t eax_13 = ((uint32_t)operator!=(&var_24, &data_9078e0));
00635fcf      
00635fd4      if (eax_13 == 0)
00636009          return eax_13;
00636009      
00635ffd      return sub_635bf0(ebp, (ebp + 0x80), (ebp + 0x100), edi_1, &var_24, esi);
00635e80  }

0063600a                                8d b6 00 00 00 00                                                            ......

00636010  void sub_636010(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00636010  {
00636017      int32_t* edi = arg5;
0063601f      int32_t esi = edi[1];
00636027      int32_t ebx = edi[3];
0063602a      int32_t ebp_2 = ((esi * arg6) + arg4);
0063602a      
00636030      if (esi < ebx)
00636030      {
00636036          int32_t eax = edi[2];
0063603e          int32_t edx_3 = (esi * 8);
0063603e          
00636161          do
00636161          {
00636040              int32_t ecx_1 = *(uint32_t*)edi;
00636040              
00636044              if (ecx_1 < eax)
00636044              {
0063604d                  int32_t ebx_1 = (ecx_1 + edx_3);
00636054                  int32_t var_20_1 = ecx_1;
0063605c                  char* ebp_3 = (ecx_1 * 3);
00636140                  int32_t edi_4;
00636140                  
00636140                  do
00636140                  {
00636066                      int32_t eax_2 = ((int32_t)*(uint16_t*)(arg3 + (ebx_1 << 1)));
00636080                      int32_t ecx_2 = ((int32_t)*(uint16_t*)(arg2 + (ebx_1 << 1)));
006360b0                      int32_t esi_8 = ((int32_t)*(uint16_t*)(arg1 + (ebx_1 << 1)));
006360b4                      int32_t ecx_7 = (((int32_t)((int16_t)(((ecx_2 * 0x1c6) - 0xe251) >> 8))) + esi_8);
006360b4                      
006360c0                      if (ecx_7 > 0xff)
006360c2                          ecx_7 = 0xff;
006360c0                      else if (ecx_7 < 0)
006360d4                          ecx_7 = 0;
006360d4                      
006360dc                      ebp_3[ebp_2] = ecx_7;
006360e0                      int32_t eax_5 = (-(((int32_t)((int16_t)((((ecx_2 * 0x58) + (eax_2 * 0xb7)) - 0x87f6) >> 8)))) + esi_8);
006360e0                      
006360e9                      if (eax_5 > 0xff)
006360eb                          eax_5 = 0xff;
006360e9                      else if (eax_5 < 0)
00636104                          eax_5 = 0;
00636104                      
00636108                      ebp_3[(ebp_2 + 1)] = eax_5;
0063610c                      int32_t edx_6 = (((int32_t)((int16_t)(((eax_2 * 0x167) - 0xb2f5) >> 8))) + esi_8);
0063610c                      
00636116                      if (edx_6 > 0xff)
00636118                          edx_6 = 0xff;
00636116                      else if (edx_6 < 0)
00636124                          edx_6 = 0;
00636124                      
00636126                      ebx_1 += 1;
00636127                      ebp_3[(ebp_2 + 2)] = edx_6;
0063612b                      ebp_3 = &ebp_3[3];
00636132                      edi_4 = (var_20_1 + 1);
00636137                      eax = arg5[2];
0063613a                      var_20_1 = edi_4;
00636140                  } while (edi_4 < eax);
00636150                  edi = arg5;
00636154                  ebx = edi[3];
00636044              }
00636044              
00636157              ebp_2 += arg6;
0063615b              edx_3 += 8;
0063615e              esi += 1;
00636161          } while (esi < ebx);
00636030      }
00636010  }

006360c9                             8d b4 26 00 00 00 00                                                           ..&....
006360f2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
0063611f                                                                                               90                                 .
0063616f                                               90                                                                 .

00636170  int32_t _YCbCr_111_to_BGR_Full_MCU_PX(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5)

00636170  {
00636183      int32_t ecx = arg4;
00636289      int32_t i;
00636289      
00636289      for (i = 0; i < 0x40; i += 8)
00636289      {
0063618d          char* j = nullptr;
0063618f          int32_t i_1 = i;
0063618f          
00636271          do
00636271          {
006361a4              int32_t edx_1 = ((int32_t)*(uint16_t*)(arg3 + (i_1 << 1)));
006361be              int32_t eax = ((int32_t)*(uint16_t*)(arg2 + (i_1 << 1)));
006361ed              int32_t esi_7 = ((int32_t)*(uint16_t*)(arg1 + (i_1 << 1)));
006361f1              int32_t eax_5 = (((int32_t)((int16_t)(((eax * 0x1c6) - 0xe251) >> 8))) + esi_7);
006361f1              
006361fc              if (eax_5 > 0xff)
006361fe                  eax_5 = 0xff;
006361fc              else if (eax_5 < 0)
00636214                  eax_5 = 0;
00636214              
0063621c              j[ecx] = eax_5;
00636220              int32_t edx_7 = (-(((int32_t)((int16_t)((((eax * 0x58) + (edx_1 * 0xb7)) - 0x87f6) >> 8)))) + esi_7);
00636220              
0063622a              if (edx_7 > 0xff)
0063622c                  edx_7 = 0xff;
0063622a              else if (edx_7 < 0)
00636244                  edx_7 = 0;
00636244              
00636248              j[(ecx + 1)] = edx_7;
0063624c              int32_t ecx_3 = (((int32_t)((int16_t)(((edx_1 * 0x167) - 0xb2f5) >> 8))) + esi_7);
0063624c              
00636256              if (ecx_3 > 0xff)
00636258                  ecx_3 = 0xff;
00636256              else if (ecx_3 < 0)
00636264                  ecx_3 = 0;
00636264              
00636266              i_1 += 1;
00636267              j[(ecx + 2)] = ecx_3;
0063626b              j = &j[3];
00636271          } while (j < 0x18);
00636271          
00636281          ecx += arg5;
00636289      }
00636289      
00636296      return i;
00636170  }

00636205                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
00636233                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063625f                                                                                               90                                 .
00636297                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

006362a0  uint32_t _YCbCr_111_to_BGR_MCU(void* arg1, int32_t arg2, int32_t arg3)

006362a0  {
006362bc      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
006362c5      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
006362cb      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
006362d1      int32_t var_54 = data_907978;
006362db      int32_t var_50 = data_90797c;
006362e5      int32_t var_4c = data_907980;
006362ef      int32_t var_48 = data_907984;
00636340      void var_44;
00636340      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_44);
00636340      
00636347      if (eax_6 != 0)
00636350          return eax_6;
00636350      
00636351      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
00636351      
00636370      if (((uint32_t)operator==(&var_44, &var_54)) != 0)
0063639e          return *(uint32_t*)(ebx + 0xb4)(ebp, (ebp + 0x80), (ebp + 0x100), edi_1, esi);
0063639e      
006363ae      int32_t var_7c_1 = 0x907938;
006363b6      int32_t var_34;
006363b6      operator&(&var_34, &var_44);
006363c7      int32_t var_24 = var_34;
006363d3      int32_t var_30;
006363d3      int32_t var_20 = var_30;
006363d7      int32_t var_2c;
006363d7      int32_t var_1c = var_2c;
006363db      int32_t var_28;
006363db      int32_t var_18 = var_28;
006363ef      uint32_t eax_13 = ((uint32_t)operator!=(&var_24, &data_9078e0));
006363ef      
006363f4      if (eax_13 == 0)
00636429          return eax_13;
00636429      
0063641d      return sub_636010(ebp, (ebp + 0x80), (ebp + 0x100), edi_1, &var_24, esi);
006362a0  }

0063642a                                8d b6 00 00 00 00                                                            ......

00636430  int32_t sub_636430(int32_t arg1, int16_t* arg2, int16_t* arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00636430  {
0063643a      int16_t* ecx = arg2;
00636441      int16_t* edx = arg3;
00636456      int32_t ebp = arg5[1];
0063645e      int32_t ebx_2 = ((ebp * arg6) + arg4);
006365a3      void var_ec;
006365a3      void var_ac;
006365a3      void var_6c;
006365a3      int32_t i;
006365a3      
006365a3      for (i = 0; i < 8; i += 1)
006365a3      {
00636470          int32_t ebp_1 = ((int32_t)*(uint16_t*)edx);
00636482          int32_t edi_1 = ((int32_t)*(uint16_t*)ecx);
0063648b          *(uint16_t*)(&var_ec + (i << 3)) = ((int16_t)(((ebp_1 * 0x167) - 0xb2f5) >> 8));
0063649c          *(uint16_t*)(&var_ac + (i << 3)) = ((int16_t)((((edi_1 * 0x58) + (ebp_1 * 0xb7)) - 0x87f6) >> 8));
006364b0          *(uint16_t*)(&var_6c + (i << 3)) = ((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8));
006364b8          int32_t ebp_8 = ((int32_t)edx[1]);
006364cb          int32_t edi_2 = ((int32_t)ecx[1]);
006364cf          void var_ea;
006364cf          *(uint16_t*)(&var_ea + (i << 3)) = ((int16_t)(((ebp_8 * 0x167) - 0xb2f5) >> 8));
006364e7          void var_aa;
006364e7          *(uint16_t*)(&var_aa + (i << 3)) = ((int16_t)((((edi_2 * 0x58) + (ebp_8 * 0xb7)) - 0x87f6) >> 8));
006364fb          int32_t edi_3 = ((int32_t)ecx[2]);
006364ff          void var_6a;
006364ff          *(uint16_t*)(&var_6a + (i << 3)) = ((int16_t)(((edi_2 * 0x1c6) - 0xe251) >> 8));
00636507          int32_t ebp_15 = ((int32_t)edx[2]);
00636520          void var_e8;
00636520          *(uint16_t*)(&var_e8 + (i << 3)) = ((int16_t)(((ebp_15 * 0x167) - 0xb2f5) >> 8));
00636532          void var_a8;
00636532          *(uint16_t*)(&var_a8 + (i << 3)) = ((int16_t)((((edi_3 * 0x58) + (ebp_15 * 0xb7)) - 0x87f6) >> 8));
00636546          void var_68;
00636546          *(uint16_t*)(&var_68 + (i << 3)) = ((int16_t)(((edi_3 * 0x1c6) - 0xe251) >> 8));
0063654e          int32_t ebp_22 = ((int32_t)edx[3]);
00636561          int32_t edi_4 = ((int32_t)ecx[3]);
00636565          void var_e6;
00636565          *(uint16_t*)(&var_e6 + (i << 3)) = ((int16_t)(((ebp_22 * 0x167) - 0xb2f5) >> 8));
0063657d          ecx = &ecx[8];
00636580          void var_a6;
00636580          *(uint16_t*)(&var_a6 + (i << 3)) = ((int16_t)((((edi_4 * 0x58) + (ebp_22 * 0xb7)) - 0x87f6) >> 8));
00636594          edx = &edx[8];
00636597          void var_66;
00636597          *(uint16_t*)(&var_66 + (i << 3)) = ((int16_t)(((edi_4 * 0x1c6) - 0xe251) >> 8));
006365a3      }
006365a3      
006365a9      int32_t ebp_29 = ebp;
006365b7      int32_t* esi_18 = arg5;
006365be      int32_t ecx_1 = esi_18[3];
006365be      
006365c3      if (ebp_29 < ecx_1)
006365c3      {
006365c9          int32_t edx_1 = esi_18[2];
006365ce          i = (ebp_29 << 4);
006365ce          
00636724          do
00636724          {
006365d1              int32_t edi_6 = *(uint32_t*)esi_18;
006365d1              
006365d5              if (edi_6 < edx_1)
006365d5              {
006365fe                  int32_t var_1c_1 = ebx_2;
006365fe                  
006366f9                  do
006366f9                  {
00636617                      int32_t eax_2 = ((int32_t)*(uint16_t*)((arg1 + i) + (edi_6 << 1)));
00636632                      int32_t edx_4 = ((((edi_6 - 0x80000000) - 0x80000000) >> 1) + (ebp_29 * 4));
00636641                      int32_t ecx_4 = (((int32_t)*(uint16_t*)(&var_ec + (edx_4 << 1))) + eax_2);
00636643                      int32_t var_18_1 = ecx_4;
00636650                      int32_t edx_5;
00636650                      
00636650                      if (ecx_4 <= 0xff)
00636650                      {
00636660                          edx_5 = ecx_4;
00636660                          
00636664                          if (edx_5 < 0)
00636664                          {
00636666                              edx_5 = 0;
00636668                              int32_t var_18_3 = 0;
00636664                          }
00636650                      }
00636650                      else
00636650                      {
00636652                          edx_5 = 0xff;
00636657                          int32_t var_18_2 = 0xff;
00636650                      }
00636650                      
0063666f                      char* ecx_5 = (edi_6 * 3);
00636680                      int32_t ebx_3 = ((int32_t)*(uint16_t*)(&var_ac + (edx_4 << 1)));
00636685                      ecx_5[var_1c_1] = edx_5;
0063668a                      int32_t ebx_5 = (-(ebx_3) + eax_2);
0063668c                      int32_t var_18_4 = ebx_5;
00636699                      int32_t edx_6;
00636699                      
00636699                      if (ebx_5 <= 0xff)
00636699                      {
006366b0                          edx_6 = ebx_5;
006366b0                          
006366b4                          if (edx_6 < 0)
006366b4                          {
006366b6                              edx_6 = 0;
006366b8                              int32_t var_18_6 = 0;
006366b4                          }
00636699                      }
00636699                      else
00636699                      {
0063669b                          edx_6 = 0xff;
006366a0                          int32_t var_18_5 = 0xff;
00636699                      }
00636699                      
006366bf                      ebx_2 = var_1c_1;
006366c1                      ecx_5[(ebx_2 + 1)] = edx_6;
006366cf                      int32_t eax_3 = (eax_2 + ((int32_t)*(uint16_t*)(&var_6c + (edx_4 << 1))));
006366cf                      
006366d6                      if (eax_3 > 0xff)
006366d8                          eax_3 = 0xff;
006366d6                      else if (eax_3 < 0)
006366e4                          eax_3 = 0;
006366e4                      
006366e8                      edi_6 += 1;
006366e9                      ecx_5[(ebx_2 + 2)] = eax_3;
006366f4                      edx_1 = arg5[2];
006366f9                  } while (edi_6 < edx_1);
006366f9                  
0063670d                  esi_18 = arg5;
00636714                  ecx_1 = esi_18[3];
006365d5              }
006365d5              
00636717              ebx_2 += arg6;
0063671e              i += 0x10;
00636721              ebp_29 += 1;
00636724          } while (ebp_29 < ecx_1);
006365c3      }
006365c3      
00636734      return i;
00636430  }

006366a9                             8d b4 26 00 00 00 00                                                           ..&....
006366df                                                                                               90                                 .
00636735                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

00636740  char* sub_636740(int16_t* arg1, int16_t* arg2, void* arg3, char* arg4, int32_t arg5)

00636740  {
00636746      int16_t* edx = arg1;
00636752      char* result = arg4;
0063675c      int32_t var_50 = 0;
00636760      void* var_3c = arg3;
00636764      int16_t* var_38 = arg2;
00636c8c      bool cond:5_1;
00636c8c      
00636c8c      do
00636c8c      {
00636770          int16_t* esi_2 = var_3c;
00636774          int32_t edi_1 = ((int32_t)*(uint16_t*)esi_2);
00636783          int32_t ecx_3 = (((edi_1 * 0x167) - 0xb2f5) >> 8);
00636794          int32_t ebx_1 = ((int32_t)*(uint16_t*)var_38);
006367a1          int32_t ecx_7 = ((((ebx_1 * 0x58) + (edi_1 * 0xb7)) - 0x87f6) >> 8);
006367b4          int32_t ecx_10 = (((ebx_1 * 0x1c6) - 0xe251) >> 8);
006367b7          int32_t ebx_2 = ((int32_t)esi_2[1]);
006367cb          int32_t ecx_13 = (((ebx_2 * 0x167) - 0xb2f5) >> 8);
006367dc          int32_t edi_3 = ((int32_t)var_38[1]);
006367ea          int32_t ecx_17 = ((((edi_3 * 0x58) + (ebx_2 * 0xb7)) - 0x87f6) >> 8);
006367fd          int32_t ecx_20 = (((edi_3 * 0x1c6) - 0xe251) >> 8);
00636800          int32_t ebx_4 = ((int32_t)esi_2[2]);
00636814          int32_t ecx_23 = (((ebx_4 * 0x167) - 0xb2f5) >> 8);
00636825          int32_t edi_4 = ((int32_t)var_38[2]);
00636833          int32_t ecx_27 = ((((edi_4 * 0x58) + (ebx_4 * 0xb7)) - 0x87f6) >> 8);
00636846          int32_t ecx_30 = (((edi_4 * 0x1c6) - 0xe251) >> 8);
0063684d          int32_t ecx_31 = ((int32_t)esi_2[3]);
0063685d          int32_t ebx_8 = (((ecx_31 * 0x167) - 0xb2f5) >> 8);
00636871          int32_t ebx_10 = ((int32_t)var_38[3]);
0063687f          int32_t ecx_34 = ((((ebx_10 * 0x58) + (ecx_31 * 0xb7)) - 0x87f6) >> 8);
00636892          int32_t ecx_37 = (((ebx_10 * 0x1c6) - 0xe251) >> 8);
0063689d          int32_t ecx_38 = ((int32_t)*(uint16_t*)edx);
006368a0          int32_t ebx_12 = (ecx_3 + ecx_38);
006368a3          var_38 = &var_38[8];
006368ae          var_3c = &esi_2[8];
006368b2          int32_t var_1c_1 = ebx_12;
006368b2          
006368b6          if (ebx_12 > 0xff)
006368b6          {
006368b8              ebx_12 = 0xff;
006368bd              int32_t var_1c_2 = 0xff;
006368b6          }
006368b6          else if (ebx_12 < 0)
006368d2          {
006368d4              ebx_12 = 0;
006368d6              int32_t var_1c_3 = 0;
006368d2          }
006368d2          
006368da          *(uint8_t*)result = ebx_12;
006368de          int32_t ebx_14 = (ecx_38 - ecx_7);
006368e8          int32_t var_1c_4 = ebx_14;
006368e8          
006368ec          if (ebx_14 > 0xff)
006368ec          {
006368ee              ebx_14 = 0xff;
006368f3              int32_t var_1c_5 = 0xff;
006368ec          }
006368ec          else if (ebx_14 < 0)
00636902          {
00636904              ebx_14 = 0;
00636906              int32_t var_1c_6 = 0;
00636902          }
00636902          
0063690a          result[1] = ebx_14;
0063690d          int32_t ecx_39 = (ecx_38 + ecx_10);
0063690d          
00636917          if (ecx_39 > 0xff)
00636919              ecx_39 = 0xff;
00636917          else if (ecx_39 < 0)
00636924              ecx_39 = 0;
00636924          
0063692a          result[2] = ecx_39;
0063692d          int32_t ecx_40 = ((int32_t)edx[1]);
00636931          int32_t ebx_16 = (ecx_3 + ecx_40);
00636933          int32_t var_14_2 = ebx_16;
00636933          
0063693d          if (ebx_16 > 0xff)
0063693d          {
0063693f              ebx_16 = 0xff;
00636944              int32_t var_14_3 = 0xff;
0063693d          }
0063693d          else if (ebx_16 < 0)
00636952          {
00636954              ebx_16 = 0;
00636956              int32_t var_14_4 = 0;
00636952          }
00636952          
0063695a          result[3] = ebx_16;
00636963          int32_t ebx_19 = (-(ecx_7) + ecx_40);
0063696b          int32_t var_18_2 = ebx_19;
0063696b          
0063696f          if (ebx_19 > 0xff)
0063696f          {
00636971              ebx_19 = 0xff;
00636976              int32_t var_18_3 = 0xff;
0063696f          }
0063696f          else if (ebx_19 < 0)
00636982          {
00636984              ebx_19 = 0;
00636986              int32_t var_18_4 = 0;
00636982          }
00636982          
0063698a          result[4] = ebx_19;
0063698d          int32_t ecx_41 = (ecx_40 + ecx_10);
0063698d          
00636997          if (ecx_41 > 0xff)
00636999              ecx_41 = 0xff;
00636997          else if (ecx_41 < 0)
006369a4              ecx_41 = 0;
006369a4          
006369aa          result[5] = ecx_41;
006369ad          int32_t ecx_42 = ((int32_t)edx[2]);
006369b1          int32_t ebx_21 = (ecx_42 + ecx_13);
006369b1          
006369ba          if (ebx_21 > 0xff)
006369bc              ebx_21 = 0xff;
006369ba          else if (ebx_21 < 0)
006369d4              ebx_21 = 0;
006369d4          
006369d6          result[6] = ebx_21;
006369db          int32_t ebx_23 = (ecx_42 - ecx_17);
006369db          
006369e5          if (ebx_23 > 0xff)
006369e7              ebx_23 = 0xff;
006369e5          else if (ebx_23 < 0)
006369f4              ebx_23 = 0;
006369f4          
006369f6          result[7] = ebx_23;
006369f9          int32_t ecx_43 = (ecx_42 + ecx_20);
006369f9          
00636a03          if (ecx_43 > 0xff)
00636a05              ecx_43 = 0xff;
00636a03          else if (ecx_43 < 0)
00636a14              ecx_43 = 0;
00636a14          
00636a1a          result[8] = ecx_43;
00636a1d          int32_t ecx_44 = ((int32_t)edx[3]);
00636a21          int32_t ebx_25 = (ecx_13 + ecx_44);
00636a23          int32_t var_20_2 = ebx_25;
00636a23          
00636a2d          if (ebx_25 > 0xff)
00636a2d          {
00636a2f              ebx_25 = 0xff;
00636a34              int32_t var_20_3 = 0xff;
00636a2d          }
00636a2d          else if (ebx_25 < 0)
00636a42          {
00636a44              ebx_25 = 0;
00636a46              int32_t var_20_4 = 0;
00636a42          }
00636a42          
00636a4a          result[9] = ebx_25;
00636a53          int32_t ebx_28 = (-(ecx_17) + ecx_44);
00636a5b          int32_t var_24_2 = ebx_28;
00636a5b          
00636a5f          if (ebx_28 > 0xff)
00636a5f          {
00636a61              ebx_28 = 0xff;
00636a66              int32_t var_24_3 = 0xff;
00636a5f          }
00636a5f          else if (ebx_28 < 0)
00636a72          {
00636a74              ebx_28 = 0;
00636a76              int32_t var_24_4 = 0;
00636a72          }
00636a72          
00636a7a          result[0xa] = ebx_28;
00636a7d          int32_t ecx_45 = (ecx_44 + ecx_20);
00636a7d          
00636a87          if (ecx_45 > 0xff)
00636a89              ecx_45 = 0xff;
00636a87          else if (ecx_45 < 0)
00636a94              ecx_45 = 0;
00636a94          
00636a9a          result[0xb] = ecx_45;
00636a9d          int32_t ecx_46 = ((int32_t)edx[4]);
00636aa1          int32_t ebx_30 = (ecx_46 + ecx_23);
00636aa1          
00636aaa          if (ebx_30 > 0xff)
00636aac              ebx_30 = 0xff;
00636aaa          else if (ebx_30 < 0)
00636ac4              ebx_30 = 0;
00636ac4          
00636ac6          result[0xc] = ebx_30;
00636acb          int32_t ebx_32 = (ecx_46 - ecx_27);
00636acb          
00636ad5          if (ebx_32 > 0xff)
00636ad7              ebx_32 = 0xff;
00636ad5          else if (ebx_32 < 0)
00636ae4              ebx_32 = 0;
00636ae4          
00636ae6          result[0xd] = ebx_32;
00636ae9          int32_t ecx_47 = (ecx_46 + ecx_30);
00636ae9          
00636af3          if (ecx_47 > 0xff)
00636af5              ecx_47 = 0xff;
00636af3          else if (ecx_47 < 0)
00636b04              ecx_47 = 0;
00636b04          
00636b0a          result[0xe] = ecx_47;
00636b0d          int32_t ecx_48 = ((int32_t)edx[5]);
00636b11          int32_t ebx_34 = (ecx_23 + ecx_48);
00636b13          int32_t var_28_2 = ebx_34;
00636b13          
00636b1d          if (ebx_34 > 0xff)
00636b1d          {
00636b1f              ebx_34 = 0xff;
00636b24              int32_t var_28_3 = 0xff;
00636b1d          }
00636b1d          else if (ebx_34 < 0)
00636b32          {
00636b34              ebx_34 = 0;
00636b36              int32_t var_28_4 = 0;
00636b32          }
00636b32          
00636b3a          result[0xf] = ebx_34;
00636b43          int32_t ebx_37 = (-(ecx_27) + ecx_48);
00636b4b          int32_t var_2c_2 = ebx_37;
00636b4b          
00636b4f          if (ebx_37 > 0xff)
00636b4f          {
00636b51              ebx_37 = 0xff;
00636b56              int32_t var_2c_3 = 0xff;
00636b4f          }
00636b4f          else if (ebx_37 < 0)
00636b62          {
00636b64              ebx_37 = 0;
00636b66              int32_t var_2c_4 = 0;
00636b62          }
00636b62          
00636b6a          result[0x10] = ebx_37;
00636b6d          int32_t ecx_49 = (ecx_48 + ecx_30);
00636b6d          
00636b77          if (ecx_49 > 0xff)
00636b79              ecx_49 = 0xff;
00636b77          else if (ecx_49 < 0)
00636b84              ecx_49 = 0;
00636b84          
00636b8a          result[0x11] = ecx_49;
00636b8d          int32_t ecx_50 = ((int32_t)edx[6]);
00636b91          int32_t ebx_39 = (ecx_50 + ebx_8);
00636b91          
00636b9a          if (ebx_39 > 0xff)
00636b9c              ebx_39 = 0xff;
00636b9a          else if (ebx_39 < 0)
00636bb4              ebx_39 = 0;
00636bb4          
00636bb6          result[0x12] = ebx_39;
00636bbb          int32_t ebx_41 = (ecx_50 - ecx_34);
00636bbb          
00636bc5          if (ebx_41 > 0xff)
00636bc7              ebx_41 = 0xff;
00636bc5          else if (ebx_41 < 0)
00636bd4              ebx_41 = 0;
00636bd4          
00636bd6          result[0x13] = ebx_41;
00636bd9          int32_t ecx_51 = (ecx_50 + ecx_37);
00636bd9          
00636be3          if (ecx_51 > 0xff)
00636be5              ecx_51 = 0xff;
00636be3          else if (ecx_51 < 0)
00636bf4              ecx_51 = 0;
00636bf4          
00636bfa          result[0x14] = ecx_51;
00636bfd          int32_t ecx_52 = ((int32_t)edx[7]);
00636c01          int32_t ebx_43 = (ebx_8 + ecx_52);
00636c03          int32_t var_30_2 = ebx_43;
00636c03          
00636c0d          if (ebx_43 > 0xff)
00636c0d          {
00636c0f              ebx_43 = 0xff;
00636c14              int32_t var_30_3 = 0xff;
00636c0d          }
00636c0d          else if (ebx_43 < 0)
00636c22          {
00636c24              ebx_43 = 0;
00636c26              int32_t var_30_4 = 0;
00636c22          }
00636c22          
00636c2a          result[0x15] = ebx_43;
00636c33          int32_t ebx_46 = (-(ecx_34) + ecx_52);
00636c3b          int32_t var_34_2 = ebx_46;
00636c3b          
00636c3f          if (ebx_46 > 0xff)
00636c3f          {
00636c41              ebx_46 = 0xff;
00636c46              int32_t var_34_3 = 0xff;
00636c3f          }
00636c3f          else if (ebx_46 < 0)
00636c52          {
00636c54              ebx_46 = 0;
00636c56              int32_t var_34_4 = 0;
00636c52          }
00636c52          
00636c5a          result[0x16] = ebx_46;
00636c5d          int32_t ecx_53 = (ecx_52 + ecx_37);
00636c5d          
00636c67          if (ecx_53 > 0xff)
00636c69              ecx_53 = 0xff;
00636c67          else if (ecx_53 < 0)
00636c74              ecx_53 = 0;
00636c74          
00636c76          edx = &edx[8];
00636c7d          result[0x17] = ecx_53;
00636c81          result = &result[arg5];
00636c85          cond:5_1 = (var_50 + 1) < 8;
00636c88          var_50 += 1;
00636c8c      } while (cond:5_1);
00636c98      return result;
00636740  }

006368c3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
006368f9                                                                             8d b4 26 00 00 00 00                           ..&....
0063694a                                8d b6 00 00 00 00                                                            ......
0063697c                                                                                      8d 74 26 00                              .t&.
006369c3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
006369ee                                            8b f6                                                                ..
00636a0c                                      8d 74 26 00                                                              .t&.
00636a3a                                                                                8d b6 00 00 00 00                            ......
00636a6c                                      8d 74 26 00                                                              .t&.
00636ab3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
00636ade                                                                                            8b f6                                ..
00636afc                                                                                      8d 74 26 00                              .t&.
00636b2a                                8d b6 00 00 00 00                                                            ......
00636b5c                                                                                      8d 74 26 00                              .t&.
00636ba3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
00636bce                                            8b f6                                                                ..
00636bec                                      8d 74 26 00                                                              .t&.
00636c1a                                                                                8d b6 00 00 00 00                            ......
00636c4c                                      8d 74 26 00                                                              .t&.
00636c99                                                                             8d b4 26 00 00 00 00                           ..&....

00636ca0  char* _YCbCr_422_to_RGB_Full_MCU_PX(int16_t* arg1, int16_t* arg2, void* arg3, char* arg4, int32_t arg5)

00636ca0  {
00636cce      sub_636740(arg1, arg2, arg3, arg4, arg5);
00636d05      return sub_636740(&arg1[0x40], &arg2[4], ((char*)arg3 + 8), &arg4[0x18], arg5);
00636ca0  }

00636d06                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

00636d10  int32_t _YCbCr_422_to_RGB_MCU(void* arg1, int32_t arg2, int32_t arg3)

00636d10  {
00636d2f      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
00636d38      void* ebp = *(uint32_t*)((char*)arg1 + 0x4834);
00636d3e      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
00636d44      int32_t var_74 = data_907988;
00636d4e      int32_t var_70 = data_90798c;
00636d58      int32_t var_6c = data_907990;
00636d62      int32_t var_68 = data_907994;
00636db6      void var_64;
00636db6      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_64);
00636db6      
00636dbd      if (eax_6 != 0)
00636dc9          return eax_6;
00636dc9      
00636dca      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
00636dca      
00636de9      if (((uint32_t)operator==(&var_64, &var_74)) != 0)
00636e1a          return *(uint32_t*)(ebx + 0xac)(ebp, ((char*)ebp + 0x100), ((char*)ebp + 0x180), edi_1, esi);
00636e1a      
00636e2a      int32_t var_9c_1 = 0x907938;
00636e32      int32_t var_54;
00636e32      operator&(&var_54, &var_64);
00636e43      int32_t var_44 = var_54;
00636e4f      int32_t var_50;
00636e4f      int32_t var_40 = var_50;
00636e53      int32_t var_4c;
00636e53      int32_t var_3c = var_4c;
00636e57      int32_t var_48;
00636e57      int32_t var_38 = var_48;
00636e57      
00636e70      if (((uint32_t)operator!=(&var_44, &data_9078e0)) != 0)
00636e99          sub_636430(ebp, ((char*)ebp + 0x100), ((char*)ebp + 0x180), edi_1, &var_44, esi);
00636e99      
00636ead      int32_t var_9c_3 = 0x907928;
00636eb5      void var_34;
00636eb5      operator&(&var_34, &var_64);
00636ecc      int32_t var_9c_4 = 0x907920;
00636ed4      int32_t var_24;
00636ed4      operator-(&var_24, &var_34);
00636eee      var_44 = var_24;
00636efd      int32_t var_20;
00636efd      int32_t var_40_1 = var_20;
00636f01      int32_t var_1c;
00636f01      int32_t var_3c_1 = var_1c;
00636f05      int32_t var_18;
00636f05      int32_t var_38_1 = var_18;
00636f19      int32_t eax_17 = ((uint32_t)operator!=(&var_44, &data_9078e0));
00636f19      
00636f1e      if (eax_17 == 0)
00636f5f          return eax_17;
00636f5f      
00636f50      return sub_636430(((char*)ebp + 0x80), ((char*)ebp + 0x108), ((char*)ebp + 0x188), (edi_1 + 0x18), &var_44, esi);
00636d10  }


00636f60  int32_t sub_636f60(int32_t arg1, int16_t* arg2, int16_t* arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00636f60  {
00636f6a      int16_t* ecx = arg2;
00636f71      int16_t* edx = arg3;
00636f86      int32_t ebp = arg5[1];
00636f8e      int32_t ebx_2 = ((ebp * arg6) + arg4);
006370d3      void var_ec;
006370d3      void var_ac;
006370d3      void var_6c;
006370d3      int32_t i;
006370d3      
006370d3      for (i = 0; i < 8; i += 1)
006370d3      {
00636fa0          int32_t ebp_1 = ((int32_t)*(uint16_t*)edx);
00636fb2          int32_t edi_1 = ((int32_t)*(uint16_t*)ecx);
00636fbb          *(uint16_t*)(&var_ec + (i << 3)) = ((int16_t)(((ebp_1 * 0x167) - 0xb2f5) >> 8));
00636fcc          *(uint16_t*)(&var_ac + (i << 3)) = ((int16_t)((((edi_1 * 0x58) + (ebp_1 * 0xb7)) - 0x87f6) >> 8));
00636fe0          *(uint16_t*)(&var_6c + (i << 3)) = ((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8));
00636fe8          int32_t ebp_8 = ((int32_t)edx[1]);
00636ffb          int32_t edi_2 = ((int32_t)ecx[1]);
00636fff          void var_ea;
00636fff          *(uint16_t*)(&var_ea + (i << 3)) = ((int16_t)(((ebp_8 * 0x167) - 0xb2f5) >> 8));
00637017          void var_aa;
00637017          *(uint16_t*)(&var_aa + (i << 3)) = ((int16_t)((((edi_2 * 0x58) + (ebp_8 * 0xb7)) - 0x87f6) >> 8));
0063702b          int32_t edi_3 = ((int32_t)ecx[2]);
0063702f          void var_6a;
0063702f          *(uint16_t*)(&var_6a + (i << 3)) = ((int16_t)(((edi_2 * 0x1c6) - 0xe251) >> 8));
00637037          int32_t ebp_15 = ((int32_t)edx[2]);
00637050          void var_e8;
00637050          *(uint16_t*)(&var_e8 + (i << 3)) = ((int16_t)(((ebp_15 * 0x167) - 0xb2f5) >> 8));
00637062          void var_a8;
00637062          *(uint16_t*)(&var_a8 + (i << 3)) = ((int16_t)((((edi_3 * 0x58) + (ebp_15 * 0xb7)) - 0x87f6) >> 8));
00637076          void var_68;
00637076          *(uint16_t*)(&var_68 + (i << 3)) = ((int16_t)(((edi_3 * 0x1c6) - 0xe251) >> 8));
0063707e          int32_t ebp_22 = ((int32_t)edx[3]);
00637091          int32_t edi_4 = ((int32_t)ecx[3]);
00637095          void var_e6;
00637095          *(uint16_t*)(&var_e6 + (i << 3)) = ((int16_t)(((ebp_22 * 0x167) - 0xb2f5) >> 8));
006370ad          ecx = &ecx[8];
006370b0          void var_a6;
006370b0          *(uint16_t*)(&var_a6 + (i << 3)) = ((int16_t)((((edi_4 * 0x58) + (ebp_22 * 0xb7)) - 0x87f6) >> 8));
006370c4          edx = &edx[8];
006370c7          void var_66;
006370c7          *(uint16_t*)(&var_66 + (i << 3)) = ((int16_t)(((edi_4 * 0x1c6) - 0xe251) >> 8));
006370d3      }
006370d3      
006370d9      int32_t ebp_29 = ebp;
006370e7      int32_t* esi_18 = arg5;
006370ee      int32_t ecx_1 = esi_18[3];
006370ee      
006370f3      if (ebp_29 < ecx_1)
006370f3      {
006370f9          int32_t edx_1 = esi_18[2];
006370fe          i = (ebp_29 << 4);
006370fe          
00637264          do
00637264          {
00637101              int32_t edi_6 = *(uint32_t*)esi_18;
00637101              
00637105              if (edi_6 < edx_1)
00637105              {
0063712e                  int32_t var_1c_1 = ebx_2;
0063712e                  
00637239                  do
00637239                  {
00637147                      int32_t eax_2 = ((int32_t)*(uint16_t*)((arg1 + i) + (edi_6 << 1)));
00637162                      int32_t edx_4 = ((((edi_6 - 0x80000000) - 0x80000000) >> 1) + (ebp_29 * 4));
00637175                      int32_t ecx_4 = (((int32_t)*(uint16_t*)(&var_6c + (edx_4 << 1))) + eax_2);
00637177                      int32_t var_18_1 = ecx_4;
00637184                      int32_t edx_5;
00637184                      
00637184                      if (ecx_4 <= 0xff)
00637184                      {
006371a0                          edx_5 = ecx_4;
006371a0                          
006371a4                          if (edx_5 < 0)
006371a4                          {
006371a6                              edx_5 = 0;
006371a8                              int32_t var_18_3 = 0;
006371a4                          }
00637184                      }
00637184                      else
00637184                      {
00637186                          edx_5 = 0xff;
0063718b                          int32_t var_18_2 = 0xff;
00637184                      }
00637184                      
006371af                      char* ecx_5 = (edi_6 * 3);
006371c0                      int32_t ebx_3 = ((int32_t)*(uint16_t*)(&var_ac + (edx_4 << 1)));
006371c5                      ecx_5[var_1c_1] = edx_5;
006371ca                      int32_t ebx_5 = (-(ebx_3) + eax_2);
006371cc                      int32_t var_18_4 = ebx_5;
006371d9                      int32_t edx_6;
006371d9                      
006371d9                      if (ebx_5 <= 0xff)
006371d9                      {
006371f0                          edx_6 = ebx_5;
006371f0                          
006371f4                          if (edx_6 < 0)
006371f4                          {
006371f6                              edx_6 = 0;
006371f8                              int32_t var_18_6 = 0;
006371f4                          }
006371d9                      }
006371d9                      else
006371d9                      {
006371db                          edx_6 = 0xff;
006371e0                          int32_t var_18_5 = 0xff;
006371d9                      }
006371d9                      
006371ff                      ebx_2 = var_1c_1;
00637201                      ecx_5[(ebx_2 + 1)] = edx_6;
0063720b                      int32_t eax_3 = (eax_2 + ((int32_t)*(uint16_t*)(&var_ec + (edx_4 << 1))));
0063720b                      
00637212                      if (eax_3 > 0xff)
00637214                          eax_3 = 0xff;
00637212                      else if (eax_3 < 0)
00637224                          eax_3 = 0;
00637224                      
00637228                      edi_6 += 1;
00637229                      ecx_5[(ebx_2 + 2)] = eax_3;
00637234                      edx_1 = arg5[2];
00637239                  } while (edi_6 < edx_1);
00637239                  
0063724d                  esi_18 = arg5;
00637254                  ecx_1 = esi_18[3];
00637105              }
00637105              
00637257              ebx_2 += arg6;
0063725e              i += 0x10;
00637261              ebp_29 += 1;
00637264          } while (ebp_29 < ecx_1);
006370f3      }
006370f3      
00637274      return i;
00636f60  }

00637194                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
006371e9                             8d b4 26 00 00 00 00                                                           ..&....
0063721b                                                                                   90 8d 74 26 00                             ..t&.
00637275                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

00637280  char* sub_637280(int16_t* arg1, int16_t* arg2, void* arg3, char* arg4, int32_t arg5)

00637280  {
00637286      int16_t* edx = arg1;
00637292      char* result = arg4;
0063729c      int32_t var_50 = 0;
006372a0      void* var_38 = arg3;
006372a4      int16_t* var_3c = arg2;
006377cc      bool cond:5_1;
006377cc      
006377cc      do
006377cc      {
006372b0          int16_t* esi_2 = var_38;
006372b4          int32_t ebx_1 = ((int32_t)*(uint16_t*)esi_2);
006372c3          int32_t ecx_3 = (((ebx_1 * 0x167) - 0xb2f5) >> 8);
006372d4          int32_t edi_1 = ((int32_t)*(uint16_t*)var_3c);
006372e1          int32_t ecx_7 = ((((edi_1 * 0x58) + (ebx_1 * 0xb7)) - 0x87f6) >> 8);
006372f4          int32_t ecx_10 = (((edi_1 * 0x1c6) - 0xe251) >> 8);
006372f7          int32_t edi_2 = ((int32_t)esi_2[1]);
0063730b          int32_t ecx_13 = (((edi_2 * 0x167) - 0xb2f5) >> 8);
0063731c          int32_t ebx_3 = ((int32_t)var_3c[1]);
0063732a          int32_t ecx_17 = ((((ebx_3 * 0x58) + (edi_2 * 0xb7)) - 0x87f6) >> 8);
0063733d          int32_t ecx_20 = (((ebx_3 * 0x1c6) - 0xe251) >> 8);
00637340          int32_t edi_4 = ((int32_t)esi_2[2]);
00637354          int32_t ecx_23 = (((edi_4 * 0x167) - 0xb2f5) >> 8);
00637365          int32_t ecx_25 = ((int32_t)var_3c[2]);
00637373          int32_t ebx_6 = ((((ecx_25 * 0x58) + (edi_4 * 0xb7)) - 0x87f6) >> 8);
00637386          int32_t ecx_28 = (((ecx_25 * 0x1c6) - 0xe251) >> 8);
00637389          int32_t edi_6 = ((int32_t)esi_2[3]);
006373a0          int32_t ecx_31 = (((edi_6 * 0x167) - 0xb2f5) >> 8);
006373b1          int32_t ebx_7 = ((int32_t)var_3c[3]);
006373bf          int32_t ecx_35 = ((((ebx_7 * 0x58) + (edi_6 * 0xb7)) - 0x87f6) >> 8);
006373d2          int32_t ecx_38 = (((ebx_7 * 0x1c6) - 0xe251) >> 8);
006373dd          int32_t ecx_39 = ((int32_t)*(uint16_t*)edx);
006373e0          int32_t ebx_9 = (ecx_10 + ecx_39);
006373e3          var_3c = &var_3c[8];
006373ee          var_38 = &esi_2[8];
006373f2          int32_t var_1c_1 = ebx_9;
006373f2          
006373f6          if (ebx_9 > 0xff)
006373f6          {
006373f8              ebx_9 = 0xff;
006373fd              int32_t var_1c_2 = 0xff;
006373f6          }
006373f6          else if (ebx_9 < 0)
00637412          {
00637414              ebx_9 = 0;
00637416              int32_t var_1c_3 = 0;
00637412          }
00637412          
0063741a          *(uint8_t*)result = ebx_9;
0063741e          int32_t ebx_11 = (ecx_39 - ecx_7);
00637428          int32_t var_1c_4 = ebx_11;
00637428          
0063742c          if (ebx_11 > 0xff)
0063742c          {
0063742e              ebx_11 = 0xff;
00637433              int32_t var_1c_5 = 0xff;
0063742c          }
0063742c          else if (ebx_11 < 0)
00637442          {
00637444              ebx_11 = 0;
00637446              int32_t var_1c_6 = 0;
00637442          }
00637442          
0063744a          result[1] = ebx_11;
0063744d          int32_t ecx_40 = (ecx_39 + ecx_3);
0063744d          
00637457          if (ecx_40 > 0xff)
00637459              ecx_40 = 0xff;
00637457          else if (ecx_40 < 0)
00637464              ecx_40 = 0;
00637464          
0063746a          result[2] = ecx_40;
0063746d          int32_t ecx_41 = ((int32_t)edx[1]);
00637471          int32_t ebx_13 = (ecx_10 + ecx_41);
00637473          int32_t var_14_2 = ebx_13;
00637473          
0063747d          if (ebx_13 > 0xff)
0063747d          {
0063747f              ebx_13 = 0xff;
00637484              int32_t var_14_3 = 0xff;
0063747d          }
0063747d          else if (ebx_13 < 0)
00637492          {
00637494              ebx_13 = 0;
00637496              int32_t var_14_4 = 0;
00637492          }
00637492          
0063749a          result[3] = ebx_13;
006374a3          int32_t ebx_16 = (-(ecx_7) + ecx_41);
006374ab          int32_t var_18_2 = ebx_16;
006374ab          
006374af          if (ebx_16 > 0xff)
006374af          {
006374b1              ebx_16 = 0xff;
006374b6              int32_t var_18_3 = 0xff;
006374af          }
006374af          else if (ebx_16 < 0)
006374c2          {
006374c4              ebx_16 = 0;
006374c6              int32_t var_18_4 = 0;
006374c2          }
006374c2          
006374ca          result[4] = ebx_16;
006374cd          int32_t ecx_42 = (ecx_41 + ecx_3);
006374cd          
006374d7          if (ecx_42 > 0xff)
006374d9              ecx_42 = 0xff;
006374d7          else if (ecx_42 < 0)
006374e4              ecx_42 = 0;
006374e4          
006374ea          result[5] = ecx_42;
006374ed          int32_t ecx_43 = ((int32_t)edx[2]);
006374f1          int32_t ebx_18 = (ecx_43 + ecx_20);
006374f1          
006374fa          if (ebx_18 > 0xff)
006374fc              ebx_18 = 0xff;
006374fa          else if (ebx_18 < 0)
00637514              ebx_18 = 0;
00637514          
00637516          result[6] = ebx_18;
0063751b          int32_t ebx_20 = (ecx_43 - ecx_17);
0063751b          
00637525          if (ebx_20 > 0xff)
00637527              ebx_20 = 0xff;
00637525          else if (ebx_20 < 0)
00637534              ebx_20 = 0;
00637534          
00637536          result[7] = ebx_20;
00637539          int32_t ecx_44 = (ecx_43 + ecx_13);
00637539          
00637543          if (ecx_44 > 0xff)
00637545              ecx_44 = 0xff;
00637543          else if (ecx_44 < 0)
00637554              ecx_44 = 0;
00637554          
0063755a          result[8] = ecx_44;
0063755d          int32_t ecx_45 = ((int32_t)edx[3]);
00637561          int32_t ebx_22 = (ecx_20 + ecx_45);
00637563          int32_t var_20_2 = ebx_22;
00637563          
0063756d          if (ebx_22 > 0xff)
0063756d          {
0063756f              ebx_22 = 0xff;
00637574              int32_t var_20_3 = 0xff;
0063756d          }
0063756d          else if (ebx_22 < 0)
00637582          {
00637584              ebx_22 = 0;
00637586              int32_t var_20_4 = 0;
00637582          }
00637582          
0063758a          result[9] = ebx_22;
00637593          int32_t ebx_25 = (-(ecx_17) + ecx_45);
0063759b          int32_t var_28_2 = ebx_25;
0063759b          
0063759f          if (ebx_25 > 0xff)
0063759f          {
006375a1              ebx_25 = 0xff;
006375a6              int32_t var_28_3 = 0xff;
0063759f          }
0063759f          else if (ebx_25 < 0)
006375b2          {
006375b4              ebx_25 = 0;
006375b6              int32_t var_28_4 = 0;
006375b2          }
006375b2          
006375ba          result[0xa] = ebx_25;
006375bd          int32_t ecx_46 = (ecx_45 + ecx_13);
006375bd          
006375c7          if (ecx_46 > 0xff)
006375c9              ecx_46 = 0xff;
006375c7          else if (ecx_46 < 0)
006375d4              ecx_46 = 0;
006375d4          
006375da          result[0xb] = ecx_46;
006375dd          int32_t ecx_47 = ((int32_t)edx[4]);
006375e1          int32_t ebx_27 = (ecx_47 + ecx_28);
006375e1          
006375ea          if (ebx_27 > 0xff)
006375ec              ebx_27 = 0xff;
006375ea          else if (ebx_27 < 0)
00637604              ebx_27 = 0;
00637604          
00637606          result[0xc] = ebx_27;
0063760b          int32_t ebx_29 = (ecx_47 - ebx_6);
0063760b          
00637615          if (ebx_29 > 0xff)
00637617              ebx_29 = 0xff;
00637615          else if (ebx_29 < 0)
00637624              ebx_29 = 0;
00637624          
00637626          result[0xd] = ebx_29;
00637629          int32_t ecx_48 = (ecx_47 + ecx_23);
00637629          
00637633          if (ecx_48 > 0xff)
00637635              ecx_48 = 0xff;
00637633          else if (ecx_48 < 0)
00637644              ecx_48 = 0;
00637644          
0063764a          result[0xe] = ecx_48;
0063764d          int32_t ecx_49 = ((int32_t)edx[5]);
00637651          int32_t ebx_31 = (ecx_28 + ecx_49);
00637653          int32_t var_24_2 = ebx_31;
00637653          
0063765d          if (ebx_31 > 0xff)
0063765d          {
0063765f              ebx_31 = 0xff;
00637664              int32_t var_24_3 = 0xff;
0063765d          }
0063765d          else if (ebx_31 < 0)
00637672          {
00637674              ebx_31 = 0;
00637676              int32_t var_24_4 = 0;
00637672          }
00637672          
0063767a          result[0xf] = ebx_31;
00637683          int32_t ebx_34 = (-(ebx_6) + ecx_49);
0063768b          int32_t var_30_2 = ebx_34;
0063768b          
0063768f          if (ebx_34 > 0xff)
0063768f          {
00637691              ebx_34 = 0xff;
00637696              int32_t var_30_3 = 0xff;
0063768f          }
0063768f          else if (ebx_34 < 0)
006376a2          {
006376a4              ebx_34 = 0;
006376a6              int32_t var_30_4 = 0;
006376a2          }
006376a2          
006376aa          result[0x10] = ebx_34;
006376ad          int32_t ecx_50 = (ecx_49 + ecx_23);
006376ad          
006376b7          if (ecx_50 > 0xff)
006376b9              ecx_50 = 0xff;
006376b7          else if (ecx_50 < 0)
006376c4              ecx_50 = 0;
006376c4          
006376ca          result[0x11] = ecx_50;
006376cd          int32_t ecx_51 = ((int32_t)edx[6]);
006376d1          int32_t ebx_36 = (ecx_51 + ecx_38);
006376d1          
006376da          if (ebx_36 > 0xff)
006376dc              ebx_36 = 0xff;
006376da          else if (ebx_36 < 0)
006376f4              ebx_36 = 0;
006376f4          
006376f6          result[0x12] = ebx_36;
006376fb          int32_t ebx_38 = (ecx_51 - ecx_35);
006376fb          
00637705          if (ebx_38 > 0xff)
00637707              ebx_38 = 0xff;
00637705          else if (ebx_38 < 0)
00637714              ebx_38 = 0;
00637714          
00637716          result[0x13] = ebx_38;
00637719          int32_t ecx_52 = (ecx_51 + ecx_31);
00637719          
00637723          if (ecx_52 > 0xff)
00637725              ecx_52 = 0xff;
00637723          else if (ecx_52 < 0)
00637734              ecx_52 = 0;
00637734          
0063773a          result[0x14] = ecx_52;
0063773d          int32_t ecx_53 = ((int32_t)edx[7]);
00637741          int32_t ebx_40 = (ecx_38 + ecx_53);
00637743          int32_t var_2c_2 = ebx_40;
00637743          
0063774d          if (ebx_40 > 0xff)
0063774d          {
0063774f              ebx_40 = 0xff;
00637754              int32_t var_2c_3 = 0xff;
0063774d          }
0063774d          else if (ebx_40 < 0)
00637762          {
00637764              ebx_40 = 0;
00637766              int32_t var_2c_4 = 0;
00637762          }
00637762          
0063776a          result[0x15] = ebx_40;
00637773          int32_t ebx_43 = (-(ecx_35) + ecx_53);
0063777b          int32_t var_34_2 = ebx_43;
0063777b          
0063777f          if (ebx_43 > 0xff)
0063777f          {
00637781              ebx_43 = 0xff;
00637786              int32_t var_34_3 = 0xff;
0063777f          }
0063777f          else if (ebx_43 < 0)
00637792          {
00637794              ebx_43 = 0;
00637796              int32_t var_34_4 = 0;
00637792          }
00637792          
0063779a          result[0x16] = ebx_43;
0063779d          int32_t ecx_54 = (ecx_53 + ecx_31);
0063779d          
006377a7          if (ecx_54 > 0xff)
006377a9              ecx_54 = 0xff;
006377a7          else if (ecx_54 < 0)
006377b4              ecx_54 = 0;
006377b4          
006377b6          edx = &edx[8];
006377bd          result[0x17] = ecx_54;
006377c1          result = &result[arg5];
006377c5          cond:5_1 = (var_50 + 1) < 8;
006377c8          var_50 += 1;
006377cc      } while (cond:5_1);
006377d8      return result;
00637280  }

00637403           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
00637439                                                                             8d b4 26 00 00 00 00                           ..&....
0063748a                                8d b6 00 00 00 00                                                            ......
006374bc                                                                                      8d 74 26 00                              .t&.
00637503           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063752e                                            8b f6                                                                ..
0063754c                                      8d 74 26 00                                                              .t&.
0063757a                                                                                8d b6 00 00 00 00                            ......
006375ac                                      8d 74 26 00                                                              .t&.
006375f3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063761e                                                                                            8b f6                                ..
0063763c                                                                                      8d 74 26 00                              .t&.
0063766a                                8d b6 00 00 00 00                                                            ......
0063769c                                                                                      8d 74 26 00                              .t&.
006376e3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063770e                                            8b f6                                                                ..
0063772c                                      8d 74 26 00                                                              .t&.
0063775a                                                                                8d b6 00 00 00 00                            ......
0063778c                                      8d 74 26 00                                                              .t&.
006377d9                                                                             8d b4 26 00 00 00 00                           ..&....

006377e0  char* _YCbCr_422_to_BGR_Full_MCU_PX(int16_t* arg1, int16_t* arg2, void* arg3, char* arg4, int32_t arg5)

006377e0  {
0063780e      sub_637280(arg1, arg2, arg3, arg4, arg5);
00637845      return sub_637280(&arg1[0x40], &arg2[4], ((char*)arg3 + 8), &arg4[0x18], arg5);
006377e0  }

00637846                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

00637850  int32_t _YCbCr_422_to_BGR_MCU(void* arg1, int32_t arg2, int32_t arg3)

00637850  {
0063786f      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
00637878      void* ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063787e      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
00637884      int32_t var_74 = data_907998;
0063788e      int32_t var_70 = data_90799c;
00637898      int32_t var_6c = data_9079a0;
006378a2      int32_t var_68 = data_9079a4;
006378f6      void var_64;
006378f6      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_64);
006378f6      
006378fd      if (eax_6 != 0)
00637909          return eax_6;
00637909      
0063790a      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063790a      
00637929      if (((uint32_t)operator==(&var_64, &var_74)) != 0)
0063795a          return *(uint32_t*)(ebx + 0xb8)(ebp, ((char*)ebp + 0x100), ((char*)ebp + 0x180), edi_1, esi);
0063795a      
0063796a      int32_t var_9c_1 = 0x907938;
00637972      int32_t var_54;
00637972      operator&(&var_54, &var_64);
00637983      int32_t var_44 = var_54;
0063798f      int32_t var_50;
0063798f      int32_t var_40 = var_50;
00637993      int32_t var_4c;
00637993      int32_t var_3c = var_4c;
00637997      int32_t var_48;
00637997      int32_t var_38 = var_48;
00637997      
006379b0      if (((uint32_t)operator!=(&var_44, &data_9078e0)) != 0)
006379d9          sub_636f60(ebp, ((char*)ebp + 0x100), ((char*)ebp + 0x180), edi_1, &var_44, esi);
006379d9      
006379ed      int32_t var_9c_3 = 0x907928;
006379f5      void var_34;
006379f5      operator&(&var_34, &var_64);
00637a0c      int32_t var_9c_4 = 0x907920;
00637a14      int32_t var_24;
00637a14      operator-(&var_24, &var_34);
00637a2e      var_44 = var_24;
00637a3d      int32_t var_20;
00637a3d      int32_t var_40_1 = var_20;
00637a41      int32_t var_1c;
00637a41      int32_t var_3c_1 = var_1c;
00637a45      int32_t var_18;
00637a45      int32_t var_38_1 = var_18;
00637a59      int32_t eax_17 = ((uint32_t)operator!=(&var_44, &data_9078e0));
00637a59      
00637a5e      if (eax_17 == 0)
00637a9f          return eax_17;
00637a9f      
00637a90      return sub_636f60(((char*)ebp + 0x80), ((char*)ebp + 0x108), ((char*)ebp + 0x188), (edi_1 + 0x18), &var_44, esi);
00637850  }


00637aa0  void sub_637aa0(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00637aa0  {
00637aa7      int32_t* edi = arg5;
00637aaf      int32_t ebx = edi[1];
00637ab7      int32_t ebp = edi[3];
00637aba      int32_t ecx_2 = ((ebx * arg6) + arg4);
00637aba      
00637ac0      if (ebx < ebp)
00637ac0      {
00637ac6          int32_t edx_1 = edi[2];
00637ace          int32_t eax = (ebx * 8);
00637ace          
00637bdd          do
00637bdd          {
00637ad0              int32_t esi_1 = *(uint32_t*)edi;
00637ad0              
00637ad4              if (esi_1 < edx_1)
00637ad4              {
00637ada                  int32_t ebp_1 = (esi_1 + eax);
00637ae9                  int32_t esi_2 = esi_1;
00637ae9                  
00637bbc                  do
00637bbc                  {
00637af4                      int32_t eax_4 = ((int32_t)*(uint16_t*)(arg1 + (ebp_1 << 1)));
00637afc                      int32_t ebx_1 = ((int32_t)*(uint16_t*)(arg3 + (ebp_1 << 1)));
00637b16                      int32_t edi_1 = ((int32_t)*(uint16_t*)(arg2 + (ebp_1 << 1)));
00637b42                      int32_t ecx_5 = (((int32_t)((int16_t)(((ebx_1 * 0x167) - 0xb2f5) >> 8))) + eax_4);
00637b42                      
00637b4e                      if (ecx_5 > 0xff)
00637b50                          ecx_5 = 0xff;
00637b4e                      else if (ecx_5 < 0)
00637b64                          ecx_5 = 0;
00637b64                      
00637b6c                      *(uint8_t*)(ecx_2 + (esi_2 << 2)) = ecx_5;
00637b6f                      int32_t edx_11 = (-(((int32_t)((int16_t)((((edi_1 * 0x58) + (ebx_1 * 0xb7)) - 0x87f6) >> 8)))) + eax_4);
00637b6f                      
00637b77                      if (edx_11 > 0xff)
00637b79                          edx_11 = 0xff;
00637b77                      else if (edx_11 < 0)
00637b84                          edx_11 = 0;
00637b84                      
00637b88                      *(uint8_t*)((ecx_2 + (esi_2 << 2)) + 1) = edx_11;
00637b8c                      int32_t eax_5 = (eax_4 + ((int32_t)((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8))));
00637b8c                      
00637b95                      if (eax_5 > 0xff)
00637b97                          eax_5 = 0xff;
00637b95                      else if (eax_5 < 0)
00637ba4                          eax_5 = 0;
00637ba4                      
00637ba8                      ebp_1 += 1;
00637ba9                      *(uint8_t*)((ecx_2 + (esi_2 << 2)) + 2) = eax_5;
00637bb1                      *(uint8_t*)((ecx_2 + (esi_2 << 2)) + 3) = 0xff;
00637bb6                      esi_2 += 1;
00637bb7                      edx_1 = arg5[2];
00637bbc                  } while (esi_2 < edx_1);
00637bbc                  
00637bcc                  edi = arg5;
00637bd0                  ebp = edi[3];
00637ad4              }
00637ad4              
00637bd3              ecx_2 += arg6;
00637bd7              eax += 8;
00637bda              ebx += 1;
00637bdd          } while (ebx < ebp);
00637ac0      }
00637aa0  }

00637b57                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
00637b9e                                                                                            8b f6                                ..
00637beb                                   90 8d 74 26 00                                                             ..t&.

00637bf0  char* _YCbCr_111_to_RGBA_FPX_Full_MCU_PX(int16_t* arg1, int16_t* arg2, int16_t* arg3, char* arg4, int32_t arg5)

00637bf0  {
00637c04      int16_t* edx = arg3;
00637c0b      char* result = arg4;
00637c1b      int32_t i_1 = 0;
00637c1f      int16_t* var_10 = arg2;
00637c23      int16_t* var_14 = arg1;
0063828d      int32_t i;
0063828d      
0063828d      do
0063828d      {
00637c30          int32_t ebx_1 = ((int32_t)*(uint16_t*)edx);
00637c46          int32_t edi_2 = ((int32_t)*(uint16_t*)var_10);
00637c60          int32_t ebx_3 = ((int32_t)edx[1]);
00637c77          int32_t edi_3 = ((int32_t)var_10[1]);
00637ca5          int32_t ebx_5 = ((int32_t)edx[2]);
00637cbc          int32_t edi_4 = ((int32_t)var_10[2]);
00637cea          int32_t ebx_7 = ((int32_t)edx[3]);
00637d01          int32_t edi_5 = ((int32_t)var_10[3]);
00637d2f          int32_t ebx_9 = ((int32_t)edx[4]);
00637d46          int32_t edi_6 = ((int32_t)var_10[4]);
00637d74          int32_t ebx_11 = ((int32_t)edx[5]);
00637d8b          int32_t edi_7 = ((int32_t)var_10[5]);
00637dd0          int32_t ecx_55 = ((int32_t)edx[6]);
00637ded          int32_t ebx_16 = ((int32_t)var_10[6]);
00637e11          int32_t ebx_17 = ((int32_t)edx[7]);
00637e32          int32_t ecx_65 = ((int32_t)var_10[7]);
00637e5e          int32_t ecx_70 = ((int32_t)*(uint16_t*)var_14);
00637e65          int32_t ebx_22 = ((((ebx_1 * 0x167) - 0xb2f5) >> 8) + ecx_70);
00637e6d          int32_t var_54_2 = ebx_22;
00637e6d          
00637e71          if (ebx_22 > 0xff)
00637e71          {
00637e73              ebx_22 = 0xff;
00637e78              int32_t var_54_3 = 0xff;
00637e71          }
00637e71          else if (ebx_22 < 0)
00637e82          {
00637e84              ebx_22 = 0;
00637e86              int32_t var_54_4 = 0;
00637e82          }
00637e82          
00637e8a          *(uint8_t*)result = ebx_22;
00637e92          int32_t ebx_25 = (-(((((edi_2 * 0x58) + (ebx_1 * 0xb7)) - 0x87f6) >> 8)) + ecx_70);
00637e9a          int32_t var_18_2 = ebx_25;
00637e9a          
00637e9e          if (ebx_25 > 0xff)
00637e9e          {
00637ea0              ebx_25 = 0xff;
00637ea5              int32_t var_18_3 = 0xff;
00637e9e          }
00637e9e          else if (ebx_25 < 0)
00637eb2          {
00637eb4              ebx_25 = 0;
00637eb6              int32_t var_18_4 = 0;
00637eb2          }
00637eb2          
00637eba          result[1] = ebx_25;
00637ebd          int32_t ecx_71 = (ecx_70 + (((edi_2 * 0x1c6) - 0xe251) >> 8));
00637ebd          
00637ec7          if (ecx_71 > 0xff)
00637ec9              ecx_71 = 0xff;
00637ec7          else if (ecx_71 < 0)
00637ed4              ecx_71 = 0;
00637ed4          
00637ede          result[2] = ecx_71;
00637ee1          result[3] = 0xff;
00637ee5          int32_t ecx_72 = ((int32_t)var_14[1]);
00637ee9          int32_t ebx_27 = ((((ebx_3 * 0x167) - 0xb2f5) >> 8) + ecx_72);
00637ef1          int32_t var_4c_2 = ebx_27;
00637ef1          
00637ef5          if (ebx_27 > 0xff)
00637ef5          {
00637ef7              ebx_27 = 0xff;
00637efc              int32_t var_4c_3 = 0xff;
00637ef5          }
00637ef5          else if (ebx_27 < 0)
00637f12          {
00637f14              ebx_27 = 0;
00637f16              int32_t var_4c_4 = 0;
00637f12          }
00637f12          
00637f1a          result[4] = ebx_27;
00637f23          int32_t ebx_30 = (-(((((edi_3 * 0x58) + (ebx_3 * 0xb7)) - 0x87f6) >> 8)) + ecx_72);
00637f2b          int32_t var_30_2 = ebx_30;
00637f2b          
00637f2f          if (ebx_30 > 0xff)
00637f2f          {
00637f31              ebx_30 = 0xff;
00637f36              int32_t var_30_3 = 0xff;
00637f2f          }
00637f2f          else if (ebx_30 < 0)
00637f42          {
00637f44              ebx_30 = 0;
00637f46              int32_t var_30_4 = 0;
00637f42          }
00637f42          
00637f4a          result[5] = ebx_30;
00637f4d          int32_t ecx_73 = (ecx_72 + (((edi_3 * 0x1c6) - 0xe251) >> 8));
00637f4d          
00637f57          if (ecx_73 > 0xff)
00637f59              ecx_73 = 0xff;
00637f57          else if (ecx_73 < 0)
00637f64              ecx_73 = 0;
00637f64          
00637f6a          result[6] = ecx_73;
00637f6d          result[7] = 0xff;
00637f71          int32_t ecx_74 = ((int32_t)var_14[2]);
00637f75          int32_t ebx_32 = ((((ebx_5 * 0x167) - 0xb2f5) >> 8) + ecx_74);
00637f7d          int32_t var_48_2 = ebx_32;
00637f7d          
00637f81          if (ebx_32 > 0xff)
00637f81          {
00637f83              ebx_32 = 0xff;
00637f88              int32_t var_48_3 = 0xff;
00637f81          }
00637f81          else if (ebx_32 < 0)
00637f92          {
00637f94              ebx_32 = 0;
00637f96              int32_t var_48_4 = 0;
00637f92          }
00637f92          
00637f9a          result[8] = ebx_32;
00637fa3          int32_t ebx_35 = (-(((((edi_4 * 0x58) + (ebx_5 * 0xb7)) - 0x87f6) >> 8)) + ecx_74);
00637fab          int32_t var_24_2 = ebx_35;
00637fab          
00637faf          if (ebx_35 > 0xff)
00637faf          {
00637fb1              ebx_35 = 0xff;
00637fb6              int32_t var_24_3 = 0xff;
00637faf          }
00637faf          else if (ebx_35 < 0)
00637fc2          {
00637fc4              ebx_35 = 0;
00637fc6              int32_t var_24_4 = 0;
00637fc2          }
00637fc2          
00637fca          result[9] = ebx_35;
00637fcd          int32_t ecx_75 = (ecx_74 + (((edi_4 * 0x1c6) - 0xe251) >> 8));
00637fcd          
00637fd7          if (ecx_75 > 0xff)
00637fd9              ecx_75 = 0xff;
00637fd7          else if (ecx_75 < 0)
00637fe4              ecx_75 = 0;
00637fe4          
00637fea          result[0xa] = ecx_75;
00637fed          result[0xb] = 0xff;
00637ff1          int32_t ecx_76 = ((int32_t)var_14[3]);
00637ff5          int32_t ebx_37 = ((((ebx_7 * 0x167) - 0xb2f5) >> 8) + ecx_76);
00637ffd          int32_t var_44_2 = ebx_37;
00637ffd          
00638001          if (ebx_37 > 0xff)
00638001          {
00638003              ebx_37 = 0xff;
00638008              int32_t var_44_3 = 0xff;
00638001          }
00638001          else if (ebx_37 < 0)
00638012          {
00638014              ebx_37 = 0;
00638016              int32_t var_44_4 = 0;
00638012          }
00638012          
0063801a          result[0xc] = ebx_37;
00638023          int32_t ebx_40 = (-(((((edi_5 * 0x58) + (ebx_7 * 0xb7)) - 0x87f6) >> 8)) + ecx_76);
0063802b          int32_t var_20_2 = ebx_40;
0063802b          
0063802f          if (ebx_40 > 0xff)
0063802f          {
00638031              ebx_40 = 0xff;
00638036              int32_t var_20_3 = 0xff;
0063802f          }
0063802f          else if (ebx_40 < 0)
00638042          {
00638044              ebx_40 = 0;
00638046              int32_t var_20_4 = 0;
00638042          }
00638042          
0063804a          result[0xd] = ebx_40;
0063804d          int32_t ecx_77 = (ecx_76 + (((edi_5 * 0x1c6) - 0xe251) >> 8));
0063804d          
00638057          if (ecx_77 > 0xff)
00638059              ecx_77 = 0xff;
00638057          else if (ecx_77 < 0)
00638064              ecx_77 = 0;
00638064          
0063806a          result[0xe] = ecx_77;
0063806d          result[0xf] = 0xff;
00638071          int32_t ecx_78 = ((int32_t)var_14[4]);
00638075          int32_t ebx_42 = ((((ebx_9 * 0x167) - 0xb2f5) >> 8) + ecx_78);
0063807d          int32_t var_40_2 = ebx_42;
0063807d          
00638081          if (ebx_42 > 0xff)
00638081          {
00638083              ebx_42 = 0xff;
00638088              int32_t var_40_3 = 0xff;
00638081          }
00638081          else if (ebx_42 < 0)
00638092          {
00638094              ebx_42 = 0;
00638096              int32_t var_40_4 = 0;
00638092          }
00638092          
0063809a          result[0x10] = ebx_42;
006380a3          int32_t ebx_45 = (-(((((edi_6 * 0x58) + (ebx_9 * 0xb7)) - 0x87f6) >> 8)) + ecx_78);
006380ab          int32_t var_1c_2 = ebx_45;
006380ab          
006380af          if (ebx_45 > 0xff)
006380af          {
006380b1              ebx_45 = 0xff;
006380b6              int32_t var_1c_3 = 0xff;
006380af          }
006380af          else if (ebx_45 < 0)
006380c2          {
006380c4              ebx_45 = 0;
006380c6              int32_t var_1c_4 = 0;
006380c2          }
006380c2          
006380ca          result[0x11] = ebx_45;
006380cd          int32_t ecx_79 = (ecx_78 + (((edi_6 * 0x1c6) - 0xe251) >> 8));
006380cd          
006380d7          if (ecx_79 > 0xff)
006380d9              ecx_79 = 0xff;
006380d7          else if (ecx_79 < 0)
006380e4              ecx_79 = 0;
006380e4          
006380ea          result[0x12] = ecx_79;
006380ed          result[0x13] = 0xff;
006380f1          int32_t ecx_80 = ((int32_t)var_14[5]);
006380f5          int32_t ebx_47 = ((((ebx_11 * 0x167) - 0xb2f5) >> 8) + ecx_80);
006380fd          int32_t var_38_2 = ebx_47;
006380fd          
00638101          if (ebx_47 > 0xff)
00638101          {
00638103              ebx_47 = 0xff;
00638108              int32_t var_38_3 = 0xff;
00638101          }
00638101          else if (ebx_47 < 0)
00638112          {
00638114              ebx_47 = 0;
00638116              int32_t var_38_4 = 0;
00638112          }
00638112          
0063811a          result[0x14] = ebx_47;
00638123          int32_t ebx_50 = (-(((((edi_7 * 0x58) + (ebx_11 * 0xb7)) - 0x87f6) >> 8)) + ecx_80);
0063812b          int32_t var_28_2 = ebx_50;
0063812b          
0063812f          if (ebx_50 > 0xff)
0063812f          {
00638131              ebx_50 = 0xff;
00638136              int32_t var_28_3 = 0xff;
0063812f          }
0063812f          else if (ebx_50 < 0)
00638142          {
00638144              ebx_50 = 0;
00638146              int32_t var_28_4 = 0;
00638142          }
00638142          
0063814a          result[0x15] = ebx_50;
0063814d          int32_t ecx_81 = (ecx_80 + (((edi_7 * 0x1c6) - 0xe251) >> 8));
0063814d          
00638157          if (ecx_81 > 0xff)
00638159              ecx_81 = 0xff;
00638157          else if (ecx_81 < 0)
00638164              ecx_81 = 0;
00638164          
0063816a          result[0x16] = ecx_81;
0063816d          result[0x17] = 0xff;
00638171          int32_t ecx_82 = ((int32_t)var_14[6]);
00638175          int32_t ebx_52 = ((((ecx_55 * 0x167) - 0xb2f5) >> 8) + ecx_82);
0063817d          int32_t var_3c_2 = ebx_52;
0063817d          
00638181          if (ebx_52 > 0xff)
00638181          {
00638183              ebx_52 = 0xff;
00638188              int32_t var_3c_3 = 0xff;
00638181          }
00638181          else if (ebx_52 < 0)
00638192          {
00638194              ebx_52 = 0;
00638196              int32_t var_3c_4 = 0;
00638192          }
00638192          
0063819a          result[0x18] = ebx_52;
006381a3          int32_t ebx_55 = (-(((((ebx_16 * 0x58) + (ecx_55 * 0xb7)) - 0x87f6) >> 8)) + ecx_82);
006381ab          int32_t var_2c_2 = ebx_55;
006381ab          
006381af          if (ebx_55 > 0xff)
006381af          {
006381b1              ebx_55 = 0xff;
006381b6              int32_t var_2c_3 = 0xff;
006381af          }
006381af          else if (ebx_55 < 0)
006381c2          {
006381c4              ebx_55 = 0;
006381c6              int32_t var_2c_4 = 0;
006381c2          }
006381c2          
006381ca          result[0x19] = ebx_55;
006381cd          int32_t ecx_83 = (ecx_82 + (((ebx_16 * 0x1c6) - 0xe251) >> 8));
006381cd          
006381d7          if (ecx_83 > 0xff)
006381d9              ecx_83 = 0xff;
006381d7          else if (ecx_83 < 0)
006381e4              ecx_83 = 0;
006381e4          
006381ea          result[0x1a] = ecx_83;
006381ed          result[0x1b] = 0xff;
006381f1          int32_t ecx_84 = ((int32_t)var_14[7]);
006381f5          int32_t ebx_57 = ((((ebx_17 * 0x167) - 0xb2f5) >> 8) + ecx_84);
006381fd          int32_t var_50_2 = ebx_57;
006381fd          
00638201          if (ebx_57 > 0xff)
00638201          {
00638203              ebx_57 = 0xff;
00638208              int32_t var_50_3 = 0xff;
00638201          }
00638201          else if (ebx_57 < 0)
00638212          {
00638214              ebx_57 = 0;
00638216              int32_t var_50_4 = 0;
00638212          }
00638212          
0063821a          result[0x1c] = ebx_57;
00638223          int32_t ebx_60 = (-(((((ecx_65 * 0x58) + (ebx_17 * 0xb7)) - 0x87f6) >> 8)) + ecx_84);
0063822b          int32_t var_34_2 = ebx_60;
0063822b          
0063822f          if (ebx_60 > 0xff)
0063822f          {
00638231              ebx_60 = 0xff;
00638236              int32_t var_34_3 = 0xff;
0063822f          }
0063822f          else if (ebx_60 < 0)
00638242          {
00638244              ebx_60 = 0;
00638246              int32_t var_34_4 = 0;
00638242          }
00638242          
0063824a          result[0x1d] = ebx_60;
0063824d          int32_t ecx_85 = (ecx_84 + (((ecx_65 * 0x1c6) - 0xe251) >> 8));
0063824d          
00638257          if (ecx_85 > 0xff)
00638259              ecx_85 = 0xff;
00638257          else if (ecx_85 < 0)
00638264              ecx_85 = 0;
00638264          
00638266          edx = &edx[8];
0063826d          result[0x1e] = ecx_85;
00638270          i = (i_1 + 1);
00638271          result[0x1f] = 0xff;
00638275          var_14 = &var_14[8];
0063827a          var_10 = &var_10[8];
0063827f          result = &result[arg5];
00638286          i_1 = i;
0063828d      } while (i < 8);
00638299      return result;
00637bf0  }

00637e7e                                                                                            8b f6                                ..
00637eab                                   90 8d 74 26 00                                                             ..t&.
00637f02        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
00637f3c                                                                                      8d 74 26 00                              .t&.
00637f8e                                            8b f6                                                                ..
00637fbc                                                                                      8d 74 26 00                              .t&.
0063800e                                            8b f6                                                                ..
0063803c                                                                                      8d 74 26 00                              .t&.
0063808e                                            8b f6                                                                ..
006380bc                                                                                      8d 74 26 00                              .t&.
0063810e                                            8b f6                                                                ..
0063813c                                                                                      8d 74 26 00                              .t&.
0063818e                                            8b f6                                                                ..
006381bc                                                                                      8d 74 26 00                              .t&.
0063820e                                            8b f6                                                                ..
0063823c                                                                                      8d 74 26 00                              .t&.
0063829a                                                                                8d b6 00 00 00 00                            ......

006382a0  uint32_t _YCbCr_111_to_RGBA_FPX_MCU(void* arg1, int32_t arg2, int32_t arg3)

006382a0  {
006382bc      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
006382c5      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
006382cb      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
006382d1      int32_t var_54 = data_9079a8;
006382db      int32_t var_50 = data_9079ac;
006382e5      int32_t var_4c = data_9079b0;
006382ef      int32_t var_48 = data_9079b4;
00638340      void var_44;
00638340      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_44);
00638340      
00638347      if (eax_6 != 0)
00638350          return eax_6;
00638350      
00638351      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
00638351      
00638370      if (((uint32_t)operator==(&var_44, &var_54)) != 0)
0063839e          return *(uint32_t*)(ebx + 0xc0)(ebp, (ebp + 0x80), (ebp + 0x100), edi_1, esi);
0063839e      
006383ae      int32_t var_7c_1 = 0x907938;
006383b6      int32_t var_34;
006383b6      operator&(&var_34, &var_44);
006383c7      int32_t var_24 = var_34;
006383d3      int32_t var_30;
006383d3      int32_t var_20 = var_30;
006383d7      int32_t var_2c;
006383d7      int32_t var_1c = var_2c;
006383db      int32_t var_28;
006383db      int32_t var_18 = var_28;
006383ef      uint32_t eax_13 = ((uint32_t)operator!=(&var_24, &data_9078e0));
006383ef      
006383f4      if (eax_13 == 0)
00638429          return eax_13;
00638429      
0063841d      return sub_637aa0(ebp, (ebp + 0x80), (ebp + 0x100), edi_1, &var_24, esi);
006382a0  }

0063842a                                8d b6 00 00 00 00                                                            ......

00638430  int32_t sub_638430(int32_t arg1, int16_t* arg2, int16_t* arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00638430  {
0063843a      int16_t* ecx = arg2;
00638441      int16_t* edx = arg3;
00638456      int32_t ebp = arg5[1];
0063845e      int32_t ebx_2 = ((ebp * arg6) + arg4);
006385a3      void var_e4;
006385a3      void var_a4;
006385a3      void var_64;
006385a3      int32_t i;
006385a3      
006385a3      for (i = 0; i < 8; i += 1)
006385a3      {
00638470          int32_t ebp_1 = ((int32_t)*(uint16_t*)edx);
00638482          int32_t edi_1 = ((int32_t)*(uint16_t*)ecx);
0063848b          *(uint16_t*)(&var_e4 + (i << 3)) = ((int16_t)(((ebp_1 * 0x167) - 0xb2f5) >> 8));
0063849c          *(uint16_t*)(&var_a4 + (i << 3)) = ((int16_t)((((edi_1 * 0x58) + (ebp_1 * 0xb7)) - 0x87f6) >> 8));
006384b0          *(uint16_t*)(&var_64 + (i << 3)) = ((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8));
006384b8          int32_t ebp_8 = ((int32_t)edx[1]);
006384cb          int32_t edi_2 = ((int32_t)ecx[1]);
006384cf          void var_e2;
006384cf          *(uint16_t*)(&var_e2 + (i << 3)) = ((int16_t)(((ebp_8 * 0x167) - 0xb2f5) >> 8));
006384e7          void var_a2;
006384e7          *(uint16_t*)(&var_a2 + (i << 3)) = ((int16_t)((((edi_2 * 0x58) + (ebp_8 * 0xb7)) - 0x87f6) >> 8));
006384fb          int32_t edi_3 = ((int32_t)ecx[2]);
006384ff          void var_62;
006384ff          *(uint16_t*)(&var_62 + (i << 3)) = ((int16_t)(((edi_2 * 0x1c6) - 0xe251) >> 8));
00638507          int32_t ebp_15 = ((int32_t)edx[2]);
00638520          void var_e0;
00638520          *(uint16_t*)(&var_e0 + (i << 3)) = ((int16_t)(((ebp_15 * 0x167) - 0xb2f5) >> 8));
00638532          void var_a0;
00638532          *(uint16_t*)(&var_a0 + (i << 3)) = ((int16_t)((((edi_3 * 0x58) + (ebp_15 * 0xb7)) - 0x87f6) >> 8));
00638546          void var_60;
00638546          *(uint16_t*)(&var_60 + (i << 3)) = ((int16_t)(((edi_3 * 0x1c6) - 0xe251) >> 8));
0063854e          int32_t ebp_22 = ((int32_t)edx[3]);
00638561          int32_t edi_4 = ((int32_t)ecx[3]);
00638565          void var_de;
00638565          *(uint16_t*)(&var_de + (i << 3)) = ((int16_t)(((ebp_22 * 0x167) - 0xb2f5) >> 8));
0063857d          ecx = &ecx[8];
00638580          void var_9e;
00638580          *(uint16_t*)(&var_9e + (i << 3)) = ((int16_t)((((edi_4 * 0x58) + (ebp_22 * 0xb7)) - 0x87f6) >> 8));
00638594          edx = &edx[8];
00638597          void var_5e;
00638597          *(uint16_t*)(&var_5e + (i << 3)) = ((int16_t)(((edi_4 * 0x1c6) - 0xe251) >> 8));
006385a3      }
006385a3      
006385a9      int32_t ebp_29 = ebp;
006385b7      int32_t* esi_18 = arg5;
006385be      int32_t ecx_1 = esi_18[3];
006385be      
006385c3      if (ebp_29 < ecx_1)
006385c3      {
006385c9          int32_t edx_1 = esi_18[2];
006385ce          i = (ebp_29 << 4);
006385ce          
006386f9          do
006386f9          {
006385d1              int32_t edi_6 = *(uint32_t*)esi_18;
006385d1              
006385d5              if (edi_6 < edx_1)
006385d5              {
006385fe                  int32_t var_14_1 = ebx_2;
006385fe                  
006386ce                  do
006386ce                  {
00638617                      int32_t eax_2 = ((int32_t)*(uint16_t*)((arg1 + i) + (edi_6 << 1)));
00638632                      int32_t ecx_4 = ((((edi_6 - 0x80000000) - 0x80000000) >> 1) + (ebp_29 * 4));
00638639                      int32_t edx_9 = (((int32_t)*(uint16_t*)(&var_e4 + (ecx_4 << 1))) + eax_2);
00638639                      
00638641                      if (edx_9 > 0xff)
00638643                          edx_9 = 0xff;
00638641                      else if (edx_9 < 0)
00638654                          edx_9 = 0;
00638654                      
00638656                      ebx_2 = var_14_1;
0063865d                      *(uint8_t*)(ebx_2 + (edi_6 << 2)) = edx_9;
00638667                      int32_t edx_12 = (-(((int32_t)*(uint16_t*)(&var_a4 + (ecx_4 << 1)))) + eax_2);
00638667                      
0063866f                      if (edx_12 > 0xff)
00638671                          edx_12 = 0xff;
0063866f                      else if (edx_12 < 0)
00638684                          edx_12 = 0;
00638684                      
00638686                      int32_t ecx_5 = ((int32_t)*(uint16_t*)(&var_64 + (ecx_4 << 1)));
0063868e                      *(uint8_t*)((ebx_2 + (edi_6 << 2)) + 1) = edx_12;
00638692                      int32_t eax_3 = (eax_2 + ecx_5);
00638692                      
00638699                      if (eax_3 > 0xff)
0063869b                          eax_3 = 0xff;
00638699                      else if (eax_3 < 0)
006386b4                          eax_3 = 0;
006386b4                      
006386bf                      *(uint8_t*)((ebx_2 + (edi_6 << 2)) + 2) = eax_3;
006386c3                      *(uint8_t*)((ebx_2 + (edi_6 << 2)) + 3) = 0xff;
006386c8                      edi_6 += 1;
006386c9                      edx_1 = arg5[2];
006386ce                  } while (edi_6 < edx_1);
006386ce                  
006386e2                  esi_18 = arg5;
006386e9                  ecx_1 = esi_18[3];
006385d5              }
006385d5              
006386ec              ebx_2 += arg6;
006386f3              i += 0x10;
006386f6              ebp_29 += 1;
006386f9          } while (ebp_29 < ecx_1);
006385c3      }
006385c3      
00638709      return i;
00638430  }

0063864a                                8d b6 00 00 00 00                                                            ......
00638678                                                                          90 8d b4 26 00 00 00 00                          ...&....
006386a2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
0063870a                                8d b6 00 00 00 00                                                            ......

00638710  char* sub_638710(int16_t* arg1, int16_t* arg2, int16_t* arg3, char* arg4, int32_t arg5)

00638710  {
00638716      int16_t* edx = arg1;
00638722      char* result = arg4;
0063872c      int32_t i_1 = 0;
00638730      int16_t* var_3c = arg3;
00638734      int16_t* var_38 = arg2;
00638c5a      int32_t i;
00638c5a      
00638c5a      do
00638c5a      {
00638744          int32_t edi_1 = ((int32_t)*(uint16_t*)var_3c);
00638753          int32_t ecx_3 = (((edi_1 * 0x167) - 0xb2f5) >> 8);
00638764          int32_t ebx_1 = ((int32_t)*(uint16_t*)var_38);
00638771          int32_t ecx_7 = ((((ebx_1 * 0x58) + (edi_1 * 0xb7)) - 0x87f6) >> 8);
00638784          int32_t ecx_10 = (((ebx_1 * 0x1c6) - 0xe251) >> 8);
00638787          int32_t ebx_2 = ((int32_t)var_3c[1]);
0063879b          int32_t ecx_13 = (((ebx_2 * 0x167) - 0xb2f5) >> 8);
006387ac          int32_t edi_3 = ((int32_t)var_38[1]);
006387ba          int32_t ecx_17 = ((((edi_3 * 0x58) + (ebx_2 * 0xb7)) - 0x87f6) >> 8);
006387cd          int32_t ecx_20 = (((edi_3 * 0x1c6) - 0xe251) >> 8);
006387d4          int32_t ecx_21 = ((int32_t)var_3c[2]);
006387e4          int32_t ebx_6 = (((ecx_21 * 0x167) - 0xb2f5) >> 8);
006387f5          int32_t ebx_8 = ((int32_t)var_38[2]);
00638803          int32_t ecx_24 = ((((ebx_8 * 0x58) + (ecx_21 * 0xb7)) - 0x87f6) >> 8);
00638816          int32_t ecx_27 = (((ebx_8 * 0x1c6) - 0xe251) >> 8);
00638819          int32_t ebx_9 = ((int32_t)var_3c[3]);
0063882d          int32_t ecx_30 = (((ebx_9 * 0x167) - 0xb2f5) >> 8);
0063883e          int32_t ecx_32 = ((int32_t)var_38[3]);
0063884c          int32_t ebx_12 = ((((ecx_32 * 0x58) + (ebx_9 * 0xb7)) - 0x87f6) >> 8);
0063885f          int32_t ecx_35 = (((ecx_32 * 0x1c6) - 0xe251) >> 8);
0063886a          int32_t ecx_36 = ((int32_t)*(uint16_t*)edx);
0063886d          int32_t ebx_14 = (ecx_3 + ecx_36);
00638870          int32_t var_1c_1 = ebx_14;
00638870          
0063887a          if (ebx_14 > 0xff)
0063887a          {
0063887c              ebx_14 = 0xff;
00638881              int32_t var_1c_2 = 0xff;
0063887a          }
0063887a          else if (ebx_14 < 0)
00638892          {
00638894              ebx_14 = 0;
00638896              int32_t var_1c_3 = 0;
00638892          }
00638892          
0063889a          *(uint8_t*)result = ebx_14;
0063889e          int32_t ebx_16 = (ecx_36 - ecx_7);
006388a8          int32_t var_1c_4 = ebx_16;
006388a8          
006388ac          if (ebx_16 > 0xff)
006388ac          {
006388ae              ebx_16 = 0xff;
006388b3              int32_t var_1c_5 = 0xff;
006388ac          }
006388ac          else if (ebx_16 < 0)
006388c2          {
006388c4              ebx_16 = 0;
006388c6              int32_t var_1c_6 = 0;
006388c2          }
006388c2          
006388ca          result[1] = ebx_16;
006388cd          int32_t ecx_37 = (ecx_36 + ecx_10);
006388cd          
006388d7          if (ecx_37 > 0xff)
006388d9              ecx_37 = 0xff;
006388d7          else if (ecx_37 < 0)
006388e4              ecx_37 = 0;
006388e4          
006388ea          result[2] = ecx_37;
006388ed          result[3] = 0xff;
006388f1          int32_t ecx_38 = ((int32_t)edx[1]);
006388f5          int32_t ebx_18 = (ecx_3 + ecx_38);
006388fd          int32_t var_14_2 = ebx_18;
006388fd          
00638901          if (ebx_18 > 0xff)
00638901          {
00638903              ebx_18 = 0xff;
00638908              int32_t var_14_3 = 0xff;
00638901          }
00638901          else if (ebx_18 < 0)
00638912          {
00638914              ebx_18 = 0;
00638916              int32_t var_14_4 = 0;
00638912          }
00638912          
0063891a          result[4] = ebx_18;
00638923          int32_t ebx_21 = (-(ecx_7) + ecx_38);
0063892b          int32_t var_18_2 = ebx_21;
0063892b          
0063892f          if (ebx_21 > 0xff)
0063892f          {
00638931              ebx_21 = 0xff;
00638936              int32_t var_18_3 = 0xff;
0063892f          }
0063892f          else if (ebx_21 < 0)
00638942          {
00638944              ebx_21 = 0;
00638946              int32_t var_18_4 = 0;
00638942          }
00638942          
0063894a          result[5] = ebx_21;
0063894d          int32_t ecx_39 = (ecx_38 + ecx_10);
0063894d          
00638957          if (ecx_39 > 0xff)
00638959              ecx_39 = 0xff;
00638957          else if (ecx_39 < 0)
00638964              ecx_39 = 0;
00638964          
0063896a          result[6] = ecx_39;
0063896d          result[7] = 0xff;
00638971          int32_t ecx_40 = ((int32_t)edx[2]);
00638975          int32_t ebx_23 = (ecx_40 + ecx_13);
00638975          
0063897e          if (ebx_23 > 0xff)
00638980              ebx_23 = 0xff;
0063897e          else if (ebx_23 < 0)
00638994              ebx_23 = 0;
00638994          
00638996          result[8] = ebx_23;
0063899b          int32_t ebx_25 = (ecx_40 - ecx_17);
0063899b          
006389a5          if (ebx_25 > 0xff)
006389a7              ebx_25 = 0xff;
006389a5          else if (ebx_25 < 0)
006389b4              ebx_25 = 0;
006389b4          
006389b6          result[9] = ebx_25;
006389b9          int32_t ecx_41 = (ecx_40 + ecx_20);
006389b9          
006389c3          if (ecx_41 > 0xff)
006389c5              ecx_41 = 0xff;
006389c3          else if (ecx_41 < 0)
006389d4              ecx_41 = 0;
006389d4          
006389da          result[0xa] = ecx_41;
006389dd          result[0xb] = 0xff;
006389e1          int32_t ecx_42 = ((int32_t)edx[3]);
006389e5          int32_t ebx_27 = (ecx_13 + ecx_42);
006389ed          int32_t var_20_2 = ebx_27;
006389ed          
006389f1          if (ebx_27 > 0xff)
006389f1          {
006389f3              ebx_27 = 0xff;
006389f8              int32_t var_20_3 = 0xff;
006389f1          }
006389f1          else if (ebx_27 < 0)
00638a02          {
00638a04              ebx_27 = 0;
00638a06              int32_t var_20_4 = 0;
00638a02          }
00638a02          
00638a0a          result[0xc] = ebx_27;
00638a13          int32_t ebx_30 = (-(ecx_17) + ecx_42);
00638a1b          int32_t var_24_2 = ebx_30;
00638a1b          
00638a1f          if (ebx_30 > 0xff)
00638a1f          {
00638a21              ebx_30 = 0xff;
00638a26              int32_t var_24_3 = 0xff;
00638a1f          }
00638a1f          else if (ebx_30 < 0)
00638a32          {
00638a34              ebx_30 = 0;
00638a36              int32_t var_24_4 = 0;
00638a32          }
00638a32          
00638a3a          result[0xd] = ebx_30;
00638a3d          int32_t ecx_43 = (ecx_42 + ecx_20);
00638a3d          
00638a47          if (ecx_43 > 0xff)
00638a49              ecx_43 = 0xff;
00638a47          else if (ecx_43 < 0)
00638a54              ecx_43 = 0;
00638a54          
00638a5a          result[0xe] = ecx_43;
00638a5d          result[0xf] = 0xff;
00638a61          int32_t ecx_44 = ((int32_t)edx[4]);
00638a65          int32_t ebx_32 = (ecx_44 + ebx_6);
00638a65          
00638a6e          if (ebx_32 > 0xff)
00638a70              ebx_32 = 0xff;
00638a6e          else if (ebx_32 < 0)
00638a84              ebx_32 = 0;
00638a84          
00638a86          result[0x10] = ebx_32;
00638a8b          int32_t ebx_34 = (ecx_44 - ecx_24);
00638a8b          
00638a95          if (ebx_34 > 0xff)
00638a97              ebx_34 = 0xff;
00638a95          else if (ebx_34 < 0)
00638aa4              ebx_34 = 0;
00638aa4          
00638aa6          result[0x11] = ebx_34;
00638aa9          int32_t ecx_45 = (ecx_44 + ecx_27);
00638aa9          
00638ab3          if (ecx_45 > 0xff)
00638ab5              ecx_45 = 0xff;
00638ab3          else if (ecx_45 < 0)
00638ac4              ecx_45 = 0;
00638ac4          
00638aca          result[0x12] = ecx_45;
00638acd          result[0x13] = 0xff;
00638ad1          int32_t ecx_46 = ((int32_t)edx[5]);
00638ad5          int32_t ebx_36 = (ebx_6 + ecx_46);
00638add          int32_t var_28_2 = ebx_36;
00638add          
00638ae1          if (ebx_36 > 0xff)
00638ae1          {
00638ae3              ebx_36 = 0xff;
00638ae8              int32_t var_28_3 = 0xff;
00638ae1          }
00638ae1          else if (ebx_36 < 0)
00638af2          {
00638af4              ebx_36 = 0;
00638af6              int32_t var_28_4 = 0;
00638af2          }
00638af2          
00638afa          result[0x14] = ebx_36;
00638b03          int32_t ebx_39 = (-(ecx_24) + ecx_46);
00638b0b          int32_t var_2c_2 = ebx_39;
00638b0b          
00638b0f          if (ebx_39 > 0xff)
00638b0f          {
00638b11              ebx_39 = 0xff;
00638b16              int32_t var_2c_3 = 0xff;
00638b0f          }
00638b0f          else if (ebx_39 < 0)
00638b22          {
00638b24              ebx_39 = 0;
00638b26              int32_t var_2c_4 = 0;
00638b22          }
00638b22          
00638b2a          result[0x15] = ebx_39;
00638b2d          int32_t ecx_47 = (ecx_46 + ecx_27);
00638b2d          
00638b37          if (ecx_47 > 0xff)
00638b39              ecx_47 = 0xff;
00638b37          else if (ecx_47 < 0)
00638b44              ecx_47 = 0;
00638b44          
00638b4a          result[0x16] = ecx_47;
00638b4d          result[0x17] = 0xff;
00638b51          int32_t ecx_48 = ((int32_t)edx[6]);
00638b55          int32_t ebx_41 = (ecx_48 + ecx_30);
00638b55          
00638b5e          if (ebx_41 > 0xff)
00638b60              ebx_41 = 0xff;
00638b5e          else if (ebx_41 < 0)
00638b74              ebx_41 = 0;
00638b74          
00638b76          result[0x18] = ebx_41;
00638b7b          int32_t ebx_43 = (ecx_48 - ebx_12);
00638b7b          
00638b85          if (ebx_43 > 0xff)
00638b87              ebx_43 = 0xff;
00638b85          else if (ebx_43 < 0)
00638b94              ebx_43 = 0;
00638b94          
00638b96          result[0x19] = ebx_43;
00638b99          int32_t ecx_49 = (ecx_48 + ecx_35);
00638b99          
00638ba3          if (ecx_49 > 0xff)
00638ba5              ecx_49 = 0xff;
00638ba3          else if (ecx_49 < 0)
00638bb4              ecx_49 = 0;
00638bb4          
00638bba          result[0x1a] = ecx_49;
00638bbd          result[0x1b] = 0xff;
00638bc1          int32_t ecx_50 = ((int32_t)edx[7]);
00638bc5          int32_t ebx_45 = (ecx_30 + ecx_50);
00638bcd          int32_t var_30_2 = ebx_45;
00638bcd          
00638bd1          if (ebx_45 > 0xff)
00638bd1          {
00638bd3              ebx_45 = 0xff;
00638bd8              int32_t var_30_3 = 0xff;
00638bd1          }
00638bd1          else if (ebx_45 < 0)
00638be2          {
00638be4              ebx_45 = 0;
00638be6              int32_t var_30_4 = 0;
00638be2          }
00638be2          
00638bea          result[0x1c] = ebx_45;
00638bf3          int32_t ebx_48 = (-(ebx_12) + ecx_50);
00638bfb          int32_t var_34_2 = ebx_48;
00638bfb          
00638bff          if (ebx_48 > 0xff)
00638bff          {
00638c01              ebx_48 = 0xff;
00638c06              int32_t var_34_3 = 0xff;
00638bff          }
00638bff          else if (ebx_48 < 0)
00638c12          {
00638c14              ebx_48 = 0;
00638c16              int32_t var_34_4 = 0;
00638c12          }
00638c12          
00638c1a          result[0x1d] = ebx_48;
00638c1d          int32_t ecx_51 = (ecx_50 + ecx_35);
00638c1d          
00638c27          if (ecx_51 > 0xff)
00638c29              ecx_51 = 0xff;
00638c27          else if (ecx_51 < 0)
00638c34              ecx_51 = 0;
00638c34          
00638c36          edx = &edx[8];
00638c3d          result[0x1e] = ecx_51;
00638c40          i = (i_1 + 1);
00638c41          result[0x1f] = 0xff;
00638c45          var_38 = &var_38[8];
00638c4a          var_3c = &var_3c[8];
00638c4f          result = &result[arg5];
00638c53          i_1 = i;
00638c5a      } while (i < 8);
00638c66      return result;
00638710  }

00638887                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
006388b9                                                                             8d b4 26 00 00 00 00                           ..&....
0063890e                                            8b f6                                                                ..
0063893c                                                                                      8d 74 26 00                              .t&.
00638987                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
006389ae                                            8b f6                                                                ..
006389cc                                      8d 74 26 00                                                              .t&.
006389fe                                                                                            8b f6                                ..
00638a2c                                      8d 74 26 00                                                              .t&.
00638a77                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
00638a9e                                                                                            8b f6                                ..
00638abc                                                                                      8d 74 26 00                              .t&.
00638aee                                            8b f6                                                                ..
00638b1c                                                                                      8d 74 26 00                              .t&.
00638b67                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
00638b8e                                            8b f6                                                                ..
00638bac                                      8d 74 26 00                                                              .t&.
00638bde                                                                                            8b f6                                ..
00638c0c                                      8d 74 26 00                                                              .t&.
00638c67                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00638c70  char* _YCbCr_422_to_RGBA_FPX_Full_MCU_PX(int16_t* arg1, int16_t* arg2, int16_t* arg3, char* arg4, int32_t arg5)

00638c70  {
00638c9e      sub_638710(arg1, arg2, arg3, arg4, arg5);
00638cd5      return sub_638710(&arg1[0x40], &arg2[4], &arg3[4], &arg4[0x20], arg5);
00638c70  }

00638cd6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

00638ce0  int32_t _YCbCr_422_to_RGBA_FPX_MCU(void* arg1, int32_t arg2, int32_t arg3)

00638ce0  {
00638cff      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
00638d08      void* ebp = *(uint32_t*)((char*)arg1 + 0x4834);
00638d0e      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
00638d14      int32_t var_74 = data_9079b8;
00638d1e      int32_t var_70 = data_9079bc;
00638d28      int32_t var_6c = data_9079c0;
00638d32      int32_t var_68 = data_9079c4;
00638d86      void var_64;
00638d86      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_64);
00638d86      
00638d8d      if (eax_6 != 0)
00638d99          return eax_6;
00638d99      
00638d9a      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
00638d9a      
00638db9      if (((uint32_t)operator==(&var_64, &var_74)) != 0)
00638dea          return *(uint32_t*)(ebx + 0xc4)(ebp, ((char*)ebp + 0x100), ((char*)ebp + 0x180), edi_1, esi);
00638dea      
00638dfa      int32_t var_9c_1 = 0x907938;
00638e02      int32_t var_54;
00638e02      operator&(&var_54, &var_64);
00638e13      int32_t var_44 = var_54;
00638e1f      int32_t var_50;
00638e1f      int32_t var_40 = var_50;
00638e23      int32_t var_4c;
00638e23      int32_t var_3c = var_4c;
00638e27      int32_t var_48;
00638e27      int32_t var_38 = var_48;
00638e27      
00638e40      if (((uint32_t)operator!=(&var_44, &data_9078e0)) != 0)
00638e69          sub_638430(ebp, ((char*)ebp + 0x100), ((char*)ebp + 0x180), edi_1, &var_44, esi);
00638e69      
00638e7d      int32_t var_9c_3 = 0x907928;
00638e85      void var_34;
00638e85      operator&(&var_34, &var_64);
00638e9c      int32_t var_9c_4 = 0x907920;
00638ea4      int32_t var_24;
00638ea4      operator-(&var_24, &var_34);
00638ebe      var_44 = var_24;
00638ecd      int32_t var_20;
00638ecd      int32_t var_40_1 = var_20;
00638ed1      int32_t var_1c;
00638ed1      int32_t var_3c_1 = var_1c;
00638ed5      int32_t var_18;
00638ed5      int32_t var_38_1 = var_18;
00638ee9      int32_t eax_17 = ((uint32_t)operator!=(&var_44, &data_9078e0));
00638ee9      
00638eee      if (eax_17 == 0)
00638f2f          return eax_17;
00638f2f      
00638f20      return sub_638430(((char*)ebp + 0x80), ((char*)ebp + 0x108), ((char*)ebp + 0x188), (edi_1 + 0x20), &var_44, esi);
00638ce0  }


00638f30  int32_t sub_638f30(int32_t arg1, int16_t* arg2, int16_t* arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

00638f30  {
00638f37      int16_t* ecx = arg2;
00638f3e      int16_t* edx = arg3;
00638f53      int32_t ebp = arg5[1];
00638f5b      int32_t ebx_2 = ((ebp * arg6) + arg4);
00639097      void var_84;
00639097      void var_64;
00639097      void var_44;
00639097      int32_t i;
00639097      
00639097      for (i = 0; i < 4; i += 1)
00639097      {
00638f70          int32_t ebp_1 = ((int32_t)*(uint16_t*)edx);
00638f82          int32_t edi_1 = ((int32_t)*(uint16_t*)ecx);
00638f8b          *(uint16_t*)(&var_84 + (i << 3)) = ((int16_t)(((ebp_1 * 0x167) - 0xb2f5) >> 8));
00638f9c          *(uint16_t*)(&var_64 + (i << 3)) = ((int16_t)((((edi_1 * 0x58) + (ebp_1 * 0xb7)) - 0x87f6) >> 8));
00638fb0          *(uint16_t*)(&var_44 + (i << 3)) = ((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8));
00638fb5          int32_t ebp_8 = ((int32_t)edx[1]);
00638fc8          int32_t edi_2 = ((int32_t)ecx[1]);
00638fcc          void var_82;
00638fcc          *(uint16_t*)(&var_82 + (i << 3)) = ((int16_t)(((ebp_8 * 0x167) - 0xb2f5) >> 8));
00638fe4          void var_62;
00638fe4          *(uint16_t*)(&var_62 + (i << 3)) = ((int16_t)((((edi_2 * 0x58) + (ebp_8 * 0xb7)) - 0x87f6) >> 8));
00638ff8          int32_t edi_3 = ((int32_t)ecx[2]);
00638ffc          void var_42;
00638ffc          *(uint16_t*)(&var_42 + (i << 3)) = ((int16_t)(((edi_2 * 0x1c6) - 0xe251) >> 8));
00639001          int32_t ebp_15 = ((int32_t)edx[2]);
0063901a          void var_80;
0063901a          *(uint16_t*)(&var_80 + (i << 3)) = ((int16_t)(((ebp_15 * 0x167) - 0xb2f5) >> 8));
0063902c          void var_60;
0063902c          *(uint16_t*)(&var_60 + (i << 3)) = ((int16_t)((((edi_3 * 0x58) + (ebp_15 * 0xb7)) - 0x87f6) >> 8));
00639040          void var_40;
00639040          *(uint16_t*)(&var_40 + (i << 3)) = ((int16_t)(((edi_3 * 0x1c6) - 0xe251) >> 8));
00639045          int32_t ebp_22 = ((int32_t)edx[3]);
00639058          int32_t edi_4 = ((int32_t)ecx[3]);
0063905c          void var_7e;
0063905c          *(uint16_t*)(&var_7e + (i << 3)) = ((int16_t)(((ebp_22 * 0x167) - 0xb2f5) >> 8));
00639074          ecx = &ecx[8];
00639077          void var_5e;
00639077          *(uint16_t*)(&var_5e + (i << 3)) = ((int16_t)((((edi_4 * 0x58) + (ebp_22 * 0xb7)) - 0x87f6) >> 8));
0063908b          edx = &edx[8];
0063908e          void var_3e;
0063908e          *(uint16_t*)(&var_3e + (i << 3)) = ((int16_t)(((edi_4 * 0x1c6) - 0xe251) >> 8));
00639097      }
00639097      
0063909d      int32_t ebp_29 = ebp;
006390a8      int32_t* esi_18 = arg5;
006390af      int32_t ecx_1 = esi_18[3];
006390af      
006390b4      if (ebp_29 < ecx_1)
006390b4      {
006390ba          int32_t edx_1 = esi_18[2];
006390bf          i = (ebp_29 << 4);
006390bf          
006391d3          do
006391d3          {
006390c2              int32_t edi_6 = *(uint32_t*)esi_18;
006390c2              
006390c6              if (edi_6 < edx_1)
006390c6              {
006390f2                  int32_t var_14_1 = ebx_2;
006390f2                  
006391ae                  do
006391ae                  {
00639104                      int32_t eax_2 = ((int32_t)*(uint16_t*)((arg1 + i) + (edi_6 << 1)));
0063911c                      int32_t ecx_4 = ((((edi_6 - 0x80000000) - 0x80000000) >> 1) + ((((ebp_29 - 0x80000000) - 0x80000000) >> 1) << 2));
00639123                      int32_t edx_12 = (((int32_t)*(uint16_t*)(&var_84 + (ecx_4 << 1))) + eax_2);
00639123                      
0063912b                      if (edx_12 > 0xff)
0063912d                          edx_12 = 0xff;
0063912b                      else if (edx_12 < 0)
00639144                          edx_12 = 0;
00639144                      
00639146                      ebx_2 = var_14_1;
0063914a                      *(uint8_t*)(ebx_2 + (edi_6 << 2)) = edx_12;
00639154                      int32_t edx_15 = (-(((int32_t)*(uint16_t*)(&var_64 + (ecx_4 << 1)))) + eax_2);
00639154                      
0063915c                      if (edx_15 > 0xff)
0063915e                          edx_15 = 0xff;
0063915c                      else if (edx_15 < 0)
00639174                          edx_15 = 0;
00639174                      
00639176                      int32_t ecx_5 = ((int32_t)*(uint16_t*)(&var_44 + (ecx_4 << 1)));
0063917b                      *(uint8_t*)((ebx_2 + (edi_6 << 2)) + 1) = edx_15;
0063917f                      int32_t eax_3 = (eax_2 + ecx_5);
0063917f                      
00639186                      if (eax_3 > 0xff)
00639188                          eax_3 = 0xff;
00639186                      else if (eax_3 < 0)
00639194                          eax_3 = 0;
00639194                      
0063919f                      *(uint8_t*)((ebx_2 + (edi_6 << 2)) + 2) = eax_3;
006391a3                      *(uint8_t*)((ebx_2 + (edi_6 << 2)) + 3) = 0xff;
006391a8                      edi_6 += 1;
006391a9                      edx_1 = arg5[2];
006391ae                  } while (edi_6 < edx_1);
006391ae                  
006391bc                  esi_18 = arg5;
006391c3                  ecx_1 = esi_18[3];
006390c6              }
006390c6              
006391c6              ebx_2 += arg6;
006391cd              i += 0x10;
006391d0              ebp_29 += 1;
006391d3          } while (ebp_29 < ecx_1);
006390b4      }
006390b4      
006391e0      return i;
00638f30  }

00639134                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00639165                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
0063918f                                               90                                                                 .
006391e1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

006391f0  char* sub_6391f0(int16_t* arg1, void* arg2, int16_t* arg3, char* arg4, int32_t arg5)

006391f0  {
006391f6      int16_t* edx = arg1;
00639202      char* result = arg4;
0063920c      int32_t i_1 = 0;
00639210      int16_t* var_34 = arg3;
00639214      void* var_30 = arg2;
00639aa2      int32_t i;
00639aa2      
00639aa2      do
00639aa2      {
00639224          int32_t ebx_1 = ((int32_t)*(uint16_t*)var_34);
00639233          int32_t ecx_4 = (((ebx_1 * 0x167) - 0xb2f5) >> 8);
00639236          int16_t* esi_2 = var_30;
0063923e          int32_t edi_1 = ((int32_t)*(uint16_t*)esi_2);
00639251          int32_t ecx_7 = ((((edi_1 * 0x58) + (ebx_1 * 0xb7)) - 0x87f6) >> 8);
00639264          int32_t ecx_10 = (((edi_1 * 0x1c6) - 0xe251) >> 8);
00639267          int32_t edi_2 = ((int32_t)esi_2[1]);
00639273          int32_t ebx_3 = ((int32_t)var_34[1]);
00639283          int32_t ecx_14 = (((ebx_3 * 0x167) - 0xb2f5) >> 8);
0063929a          int32_t ecx_17 = ((((edi_2 * 0x58) + (ebx_3 * 0xb7)) - 0x87f6) >> 8);
006392ad          int32_t ecx_20 = (((edi_2 * 0x1c6) - 0xe251) >> 8);
006392b0          int32_t edi_3 = ((int32_t)esi_2[2]);
006392bc          int32_t ebx_5 = ((int32_t)var_34[2]);
006392cc          int32_t ecx_24 = (((ebx_5 * 0x167) - 0xb2f5) >> 8);
006392e3          int32_t ecx_27 = ((((edi_3 * 0x58) + (ebx_5 * 0xb7)) - 0x87f6) >> 8);
006392f6          int32_t ecx_30 = (((edi_3 * 0x1c6) - 0xe251) >> 8);
00639301          int32_t ecx_32 = ((int32_t)var_34[3]);
00639311          int32_t ebx_9 = (((ecx_32 * 0x167) - 0xb2f5) >> 8);
0063931e          int32_t ebx_10 = ((int32_t)esi_2[3]);
0063932c          int32_t ecx_35 = ((((ebx_10 * 0x58) + (ecx_32 * 0xb7)) - 0x87f6) >> 8);
00639342          int32_t ecx_38 = (((ebx_10 * 0x1c6) - 0xe251) >> 8);
0063934d          int32_t ecx_39 = ((int32_t)*(uint16_t*)edx);
00639350          int32_t ebx_12 = (ecx_4 + ecx_39);
00639353          var_30 = &esi_2[8];
00639357          var_34 = &var_34[8];
00639357          
00639362          if (ebx_12 > 0xff)
00639364              ebx_12 = 0xff;
00639362          else if (ebx_12 < 0)
00639374              ebx_12 = 0;
00639374          
00639376          *(uint8_t*)result = ebx_12;
0063937a          int32_t ebx_14 = (ecx_39 - ecx_7);
0063937a          
00639384          if (ebx_14 > 0xff)
00639386              ebx_14 = 0xff;
00639384          else if (ebx_14 < 0)
00639394              ebx_14 = 0;
00639394          
00639396          result[1] = ebx_14;
00639399          int32_t ecx_40 = (ecx_39 + ecx_10);
00639399          
006393a3          if (ecx_40 > 0xff)
006393a5              ecx_40 = 0xff;
006393a3          else if (ecx_40 < 0)
006393b4              ecx_40 = 0;
006393b4          
006393ba          result[2] = ecx_40;
006393bd          result[3] = 0xff;
006393c1          int32_t ecx_41 = ((int32_t)edx[1]);
006393c5          int32_t ebx_16 = (ecx_4 + ecx_41);
006393c5          
006393ce          if (ebx_16 > 0xff)
006393d0              ebx_16 = 0xff;
006393ce          else if (ebx_16 < 0)
006393e4              ebx_16 = 0;
006393e4          
006393e6          result[4] = ebx_16;
006393eb          int32_t ebx_18 = (ecx_41 - ecx_7);
006393eb          
006393f5          if (ebx_18 > 0xff)
006393f7              ebx_18 = 0xff;
006393f5          else if (ebx_18 < 0)
00639404              ebx_18 = 0;
00639404          
00639406          result[5] = ebx_18;
00639409          int32_t ecx_42 = (ecx_41 + ecx_10);
00639409          
00639413          if (ecx_42 > 0xff)
00639415              ecx_42 = 0xff;
00639413          else if (ecx_42 < 0)
00639424              ecx_42 = 0;
00639424          
0063942a          result[6] = ecx_42;
0063942d          result[7] = 0xff;
00639431          int32_t ecx_43 = ((int32_t)edx[2]);
00639435          int32_t ebx_20 = (ecx_43 + ecx_14);
00639435          
0063943e          if (ebx_20 > 0xff)
00639440              ebx_20 = 0xff;
0063943e          else if (ebx_20 < 0)
00639454              ebx_20 = 0;
00639454          
00639456          result[8] = ebx_20;
0063945b          int32_t ebx_22 = (ecx_43 - ecx_17);
0063945b          
00639465          if (ebx_22 > 0xff)
00639467              ebx_22 = 0xff;
00639465          else if (ebx_22 < 0)
00639474              ebx_22 = 0;
00639474          
00639476          result[9] = ebx_22;
00639479          int32_t ecx_44 = (ecx_43 + ecx_20);
00639479          
00639483          if (ecx_44 > 0xff)
00639485              ecx_44 = 0xff;
00639483          else if (ecx_44 < 0)
00639494              ecx_44 = 0;
00639494          
0063949a          result[0xa] = ecx_44;
0063949d          result[0xb] = 0xff;
006394a1          int32_t ecx_45 = ((int32_t)edx[3]);
006394a5          int32_t ebx_24 = (ecx_45 + ecx_14);
006394a5          
006394ae          if (ebx_24 > 0xff)
006394b0              ebx_24 = 0xff;
006394ae          else if (ebx_24 < 0)
006394c4              ebx_24 = 0;
006394c4          
006394c6          result[0xc] = ebx_24;
006394cb          int32_t ebx_26 = (ecx_45 - ecx_17);
006394cb          
006394d5          if (ebx_26 > 0xff)
006394d7              ebx_26 = 0xff;
006394d5          else if (ebx_26 < 0)
006394e4              ebx_26 = 0;
006394e4          
006394e6          result[0xd] = ebx_26;
006394e9          int32_t ecx_46 = (ecx_45 + ecx_20);
006394e9          
006394f3          if (ecx_46 > 0xff)
006394f5              ecx_46 = 0xff;
006394f3          else if (ecx_46 < 0)
00639504              ecx_46 = 0;
00639504          
0063950a          result[0xe] = ecx_46;
0063950d          result[0xf] = 0xff;
00639511          int32_t ecx_47 = ((int32_t)edx[4]);
00639515          int32_t ebx_28 = (ecx_47 + ecx_24);
00639515          
0063951e          if (ebx_28 > 0xff)
00639520              ebx_28 = 0xff;
0063951e          else if (ebx_28 < 0)
00639534              ebx_28 = 0;
00639534          
00639536          result[0x10] = ebx_28;
0063953b          int32_t ebx_30 = (ecx_47 - ecx_27);
0063953b          
00639545          if (ebx_30 > 0xff)
00639547              ebx_30 = 0xff;
00639545          else if (ebx_30 < 0)
00639554              ebx_30 = 0;
00639554          
00639556          result[0x11] = ebx_30;
00639559          int32_t ecx_48 = (ecx_47 + ecx_30);
00639559          
00639563          if (ecx_48 > 0xff)
00639565              ecx_48 = 0xff;
00639563          else if (ecx_48 < 0)
00639574              ecx_48 = 0;
00639574          
0063957a          result[0x12] = ecx_48;
0063957d          result[0x13] = 0xff;
00639581          int32_t ecx_49 = ((int32_t)edx[5]);
00639585          int32_t ebx_32 = (ecx_49 + ecx_24);
00639585          
0063958e          if (ebx_32 > 0xff)
00639590              ebx_32 = 0xff;
0063958e          else if (ebx_32 < 0)
006395a4              ebx_32 = 0;
006395a4          
006395a6          result[0x14] = ebx_32;
006395ab          int32_t ebx_34 = (ecx_49 - ecx_27);
006395ab          
006395b5          if (ebx_34 > 0xff)
006395b7              ebx_34 = 0xff;
006395b5          else if (ebx_34 < 0)
006395c4              ebx_34 = 0;
006395c4          
006395c6          result[0x15] = ebx_34;
006395c9          int32_t ecx_50 = (ecx_49 + ecx_30);
006395c9          
006395d3          if (ecx_50 > 0xff)
006395d5              ecx_50 = 0xff;
006395d3          else if (ecx_50 < 0)
006395e4              ecx_50 = 0;
006395e4          
006395ea          result[0x16] = ecx_50;
006395ed          result[0x17] = 0xff;
006395f1          int32_t ecx_51 = ((int32_t)edx[6]);
006395f5          int32_t ebx_36 = (ecx_51 + ebx_9);
006395f5          
006395fe          if (ebx_36 > 0xff)
00639600              ebx_36 = 0xff;
006395fe          else if (ebx_36 < 0)
00639614              ebx_36 = 0;
00639614          
00639616          result[0x18] = ebx_36;
0063961b          int32_t ebx_38 = (ecx_51 - ecx_35);
0063961b          
00639625          if (ebx_38 > 0xff)
00639627              ebx_38 = 0xff;
00639625          else if (ebx_38 < 0)
00639634              ebx_38 = 0;
00639634          
00639636          result[0x19] = ebx_38;
00639639          int32_t ecx_52 = (ecx_51 + ecx_38);
00639639          
00639643          if (ecx_52 > 0xff)
00639645              ecx_52 = 0xff;
00639643          else if (ecx_52 < 0)
00639654              ecx_52 = 0;
00639654          
0063965a          result[0x1a] = ecx_52;
0063965d          result[0x1b] = 0xff;
00639661          int32_t ecx_53 = ((int32_t)edx[7]);
00639665          int32_t ebx_40 = (ecx_53 + ebx_9);
00639665          
0063966e          if (ebx_40 > 0xff)
00639670              ebx_40 = 0xff;
0063966e          else if (ebx_40 < 0)
00639684              ebx_40 = 0;
00639684          
00639686          result[0x1c] = ebx_40;
0063968b          int32_t ebx_42 = (ecx_53 - ecx_35);
0063968b          
00639695          if (ebx_42 > 0xff)
00639697              ebx_42 = 0xff;
00639695          else if (ebx_42 < 0)
006396a4              ebx_42 = 0;
006396a4          
006396a6          result[0x1d] = ebx_42;
006396a9          int32_t ecx_54 = (ecx_53 + ecx_38);
006396a9          
006396b3          if (ecx_54 > 0xff)
006396b5              ecx_54 = 0xff;
006396b3          else if (ecx_54 < 0)
006396c4              ecx_54 = 0;
006396c4          
006396ca          result[0x1e] = ecx_54;
006396cd          result[0x1f] = 0xff;
006396d1          void* eax = &result[arg5];
006396d5          int32_t ecx_55 = ((int32_t)edx[8]);
006396d9          int32_t ebx_44 = (ecx_4 + ecx_55);
006396d9          
006396e2          if (ebx_44 > 0xff)
006396e4              ebx_44 = 0xff;
006396e2          else if (ebx_44 < 0)
006396f4              ebx_44 = 0;
006396f4          
006396f6          *(uint8_t*)eax = ebx_44;
006396fa          int32_t ebx_46 = (ecx_55 - ecx_7);
006396fa          
00639704          if (ebx_46 > 0xff)
00639706              ebx_46 = 0xff;
00639704          else if (ebx_46 < 0)
00639714              ebx_46 = 0;
00639714          
00639716          *(uint8_t*)((char*)eax + 1) = ebx_46;
00639719          int32_t ecx_56 = (ecx_55 + ecx_10);
00639719          
00639723          if (ecx_56 > 0xff)
00639725              ecx_56 = 0xff;
00639723          else if (ecx_56 < 0)
00639734              ecx_56 = 0;
00639734          
0063973a          *(uint8_t*)((char*)eax + 2) = ecx_56;
0063973d          *(uint8_t*)((char*)eax + 3) = 0xff;
00639741          int32_t ecx_57 = ((int32_t)edx[9]);
00639745          int32_t ebx_48 = (ecx_4 + ecx_57);
0063974d          int32_t var_10_2 = ebx_48;
0063974d          
00639751          if (ebx_48 > 0xff)
00639751          {
00639753              ebx_48 = 0xff;
00639758              int32_t var_10_3 = 0xff;
00639751          }
00639751          else if (ebx_48 < 0)
00639762          {
00639764              ebx_48 = 0;
00639766              int32_t var_10_4 = 0;
00639762          }
00639762          
0063976a          *(uint8_t*)((char*)eax + 4) = ebx_48;
00639773          int32_t ebx_51 = (-(ecx_7) + ecx_57);
0063977b          int32_t var_1c_2 = ebx_51;
0063977b          
0063977f          if (ebx_51 > 0xff)
0063977f          {
00639781              ebx_51 = 0xff;
00639786              int32_t var_1c_3 = 0xff;
0063977f          }
0063977f          else if (ebx_51 < 0)
00639792          {
00639794              ebx_51 = 0;
00639796              int32_t var_1c_4 = 0;
00639792          }
00639792          
0063979a          *(uint8_t*)((char*)eax + 5) = ebx_51;
0063979d          int32_t ecx_58 = (ecx_57 + ecx_10);
0063979d          
006397a7          if (ecx_58 > 0xff)
006397a9              ecx_58 = 0xff;
006397a7          else if (ecx_58 < 0)
006397b4              ecx_58 = 0;
006397b4          
006397ba          *(uint8_t*)((char*)eax + 6) = ecx_58;
006397bd          *(uint8_t*)((char*)eax + 7) = 0xff;
006397c1          int32_t ecx_59 = ((int32_t)edx[0xa]);
006397c5          int32_t ebx_53 = (ecx_59 + ecx_14);
006397c5          
006397ce          if (ebx_53 > 0xff)
006397d0              ebx_53 = 0xff;
006397ce          else if (ebx_53 < 0)
006397e4              ebx_53 = 0;
006397e4          
006397e6          *(uint8_t*)((char*)eax + 8) = ebx_53;
006397eb          int32_t ebx_55 = (ecx_59 - ecx_17);
006397eb          
006397f5          if (ebx_55 > 0xff)
006397f7              ebx_55 = 0xff;
006397f5          else if (ebx_55 < 0)
00639804              ebx_55 = 0;
00639804          
00639806          *(uint8_t*)((char*)eax + 9) = ebx_55;
00639809          int32_t ecx_60 = (ecx_59 + ecx_20);
00639809          
00639813          if (ecx_60 > 0xff)
00639815              ecx_60 = 0xff;
00639813          else if (ecx_60 < 0)
00639824              ecx_60 = 0;
00639824          
0063982a          *(uint8_t*)((char*)eax + 0xa) = ecx_60;
0063982d          *(uint8_t*)((char*)eax + 0xb) = 0xff;
00639831          int32_t ecx_61 = ((int32_t)edx[0xb]);
00639835          int32_t ebx_57 = (ecx_14 + ecx_61);
0063983d          int32_t var_14_2 = ebx_57;
0063983d          
00639841          if (ebx_57 > 0xff)
00639841          {
00639843              ebx_57 = 0xff;
00639848              int32_t var_14_3 = 0xff;
00639841          }
00639841          else if (ebx_57 < 0)
00639852          {
00639854              ebx_57 = 0;
00639856              int32_t var_14_4 = 0;
00639852          }
00639852          
0063985a          *(uint8_t*)((char*)eax + 0xc) = ebx_57;
00639863          int32_t ebx_60 = (-(ecx_17) + ecx_61);
0063986b          int32_t var_24_2 = ebx_60;
0063986b          
0063986f          if (ebx_60 > 0xff)
0063986f          {
00639871              ebx_60 = 0xff;
00639876              int32_t var_24_3 = 0xff;
0063986f          }
0063986f          else if (ebx_60 < 0)
00639882          {
00639884              ebx_60 = 0;
00639886              int32_t var_24_4 = 0;
00639882          }
00639882          
0063988a          *(uint8_t*)((char*)eax + 0xd) = ebx_60;
0063988d          int32_t ecx_62 = (ecx_61 + ecx_20);
0063988d          
00639897          if (ecx_62 > 0xff)
00639899              ecx_62 = 0xff;
00639897          else if (ecx_62 < 0)
006398a4              ecx_62 = 0;
006398a4          
006398aa          *(uint8_t*)((char*)eax + 0xe) = ecx_62;
006398ad          *(uint8_t*)((char*)eax + 0xf) = 0xff;
006398b1          int32_t ecx_63 = ((int32_t)edx[0xc]);
006398b5          int32_t ebx_62 = (ecx_63 + ecx_24);
006398b5          
006398be          if (ebx_62 > 0xff)
006398c0              ebx_62 = 0xff;
006398be          else if (ebx_62 < 0)
006398d4              ebx_62 = 0;
006398d4          
006398d6          *(uint8_t*)((char*)eax + 0x10) = ebx_62;
006398db          int32_t ebx_64 = (ecx_63 - ecx_27);
006398db          
006398e5          if (ebx_64 > 0xff)
006398e7              ebx_64 = 0xff;
006398e5          else if (ebx_64 < 0)
006398f4              ebx_64 = 0;
006398f4          
006398f6          *(uint8_t*)((char*)eax + 0x11) = ebx_64;
006398f9          int32_t ecx_64 = (ecx_63 + ecx_30);
006398f9          
00639903          if (ecx_64 > 0xff)
00639905              ecx_64 = 0xff;
00639903          else if (ecx_64 < 0)
00639914              ecx_64 = 0;
00639914          
0063991a          *(uint8_t*)((char*)eax + 0x12) = ecx_64;
0063991d          *(uint8_t*)((char*)eax + 0x13) = 0xff;
00639921          int32_t ecx_65 = ((int32_t)edx[0xd]);
00639925          int32_t ebx_66 = (ecx_24 + ecx_65);
0063992d          int32_t var_18_2 = ebx_66;
0063992d          
00639931          if (ebx_66 > 0xff)
00639931          {
00639933              ebx_66 = 0xff;
00639938              int32_t var_18_3 = 0xff;
00639931          }
00639931          else if (ebx_66 < 0)
00639942          {
00639944              ebx_66 = 0;
00639946              int32_t var_18_4 = 0;
00639942          }
00639942          
0063994a          *(uint8_t*)((char*)eax + 0x14) = ebx_66;
00639953          int32_t ebx_69 = (-(ecx_27) + ecx_65);
0063995b          int32_t var_28_2 = ebx_69;
0063995b          
0063995f          if (ebx_69 > 0xff)
0063995f          {
00639961              ebx_69 = 0xff;
00639966              int32_t var_28_3 = 0xff;
0063995f          }
0063995f          else if (ebx_69 < 0)
00639972          {
00639974              ebx_69 = 0;
00639976              int32_t var_28_4 = 0;
00639972          }
00639972          
0063997a          *(uint8_t*)((char*)eax + 0x15) = ebx_69;
0063997d          int32_t ecx_66 = (ecx_65 + ecx_30);
0063997d          
00639987          if (ecx_66 > 0xff)
00639989              ecx_66 = 0xff;
00639987          else if (ecx_66 < 0)
00639994              ecx_66 = 0;
00639994          
0063999a          *(uint8_t*)((char*)eax + 0x16) = ecx_66;
0063999d          *(uint8_t*)((char*)eax + 0x17) = 0xff;
006399a1          int32_t ecx_67 = ((int32_t)edx[0xe]);
006399a5          int32_t ebx_71 = (ecx_67 + ebx_9);
006399a5          
006399ae          if (ebx_71 > 0xff)
006399b0              ebx_71 = 0xff;
006399ae          else if (ebx_71 < 0)
006399c4              ebx_71 = 0;
006399c4          
006399c6          *(uint8_t*)((char*)eax + 0x18) = ebx_71;
006399cb          int32_t ebx_73 = (ecx_67 - ecx_35);
006399cb          
006399d5          if (ebx_73 > 0xff)
006399d7              ebx_73 = 0xff;
006399d5          else if (ebx_73 < 0)
006399e4              ebx_73 = 0;
006399e4          
006399e6          *(uint8_t*)((char*)eax + 0x19) = ebx_73;
006399e9          int32_t ecx_68 = (ecx_67 + ecx_38);
006399e9          
006399f3          if (ecx_68 > 0xff)
006399f5              ecx_68 = 0xff;
006399f3          else if (ecx_68 < 0)
00639a04              ecx_68 = 0;
00639a04          
00639a0a          *(uint8_t*)((char*)eax + 0x1a) = ecx_68;
00639a0d          *(uint8_t*)((char*)eax + 0x1b) = 0xff;
00639a11          int32_t ecx_69 = ((int32_t)edx[0xf]);
00639a15          int32_t ebx_75 = (ebx_9 + ecx_69);
00639a1d          int32_t var_20_2 = ebx_75;
00639a1d          
00639a21          if (ebx_75 > 0xff)
00639a21          {
00639a23              ebx_75 = 0xff;
00639a28              int32_t var_20_3 = 0xff;
00639a21          }
00639a21          else if (ebx_75 < 0)
00639a32          {
00639a34              ebx_75 = 0;
00639a36              int32_t var_20_4 = 0;
00639a32          }
00639a32          
00639a3a          *(uint8_t*)((char*)eax + 0x1c) = ebx_75;
00639a43          int32_t ebx_78 = (-(ecx_35) + ecx_69);
00639a4b          int32_t var_2c_2 = ebx_78;
00639a4b          
00639a4f          if (ebx_78 > 0xff)
00639a4f          {
00639a51              ebx_78 = 0xff;
00639a56              int32_t var_2c_3 = 0xff;
00639a4f          }
00639a4f          else if (ebx_78 < 0)
00639a62          {
00639a64              ebx_78 = 0;
00639a66              int32_t var_2c_4 = 0;
00639a62          }
00639a62          
00639a6a          *(uint8_t*)((char*)eax + 0x1d) = ebx_78;
00639a6d          int32_t ecx_70 = (ecx_69 + ecx_38);
00639a6d          
00639a77          if (ecx_70 > 0xff)
00639a79              ecx_70 = 0xff;
00639a77          else if (ecx_70 < 0)
00639a84              ecx_70 = 0;
00639a84          
00639a86          edx = &edx[0x10];
00639a8d          *(uint8_t*)((char*)eax + 0x1e) = ecx_70;
00639a90          i = (i_1 + 2);
00639a93          *(uint8_t*)((char*)eax + 0x1f) = 0xff;
00639a97          result = ((char*)eax + arg5);
00639a9b          i_1 = i;
00639aa2      } while (i < 8);
00639aae      return result;
006391f0  }

0063936b                                   90 8d 74 26 00                                                             ..t&.
0063938d                                         8d 76 00                                                               .v.
006393ac                                      8d 74 26 00                                                              .t&.
006393d7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
006393fe                                                                                            8b f6                                ..
0063941c                                                                                      8d 74 26 00                              .t&.
00639447                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0063946e                                            8b f6                                                                ..
0063948c                                      8d 74 26 00                                                              .t&.
006394b7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
006394de                                                                                            8b f6                                ..
006394fc                                                                                      8d 74 26 00                              .t&.
00639527                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0063954e                                            8b f6                                                                ..
0063956c                                      8d 74 26 00                                                              .t&.
00639597                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
006395be                                                                                            8b f6                                ..
006395dc                                                                                      8d 74 26 00                              .t&.
00639607                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0063962e                                            8b f6                                                                ..
0063964c                                      8d 74 26 00                                                              .t&.
00639677                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0063969e                                                                                            8b f6                                ..
006396bc                                                                                      8d 74 26 00                              .t&.
006396eb                                   90 8d 74 26 00                                                             ..t&.
0063970d                                         8d 76 00                                                               .v.
0063972c                                      8d 74 26 00                                                              .t&.
0063975e                                                                                            8b f6                                ..
0063978c                                      8d 74 26 00                                                              .t&.
006397d7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
006397fe                                                                                            8b f6                                ..
0063981c                                                                                      8d 74 26 00                              .t&.
0063984e                                            8b f6                                                                ..
0063987c                                                                                      8d 74 26 00                              .t&.
006398c7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
006398ee                                            8b f6                                                                ..
0063990c                                      8d 74 26 00                                                              .t&.
0063993e                                                                                            8b f6                                ..
0063996c                                      8d 74 26 00                                                              .t&.
006399b7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
006399de                                                                                            8b f6                                ..
006399fc                                                                                      8d 74 26 00                              .t&.
00639a2e                                            8b f6                                                                ..
00639a5c                                                                                      8d 74 26 00                              .t&.
00639aaf                                               90                                                                 .

00639ab0  char* _YCbCr_411_to_RGBA_FPX_Full_MCU_PX(int16_t* arg1, void* arg2, int16_t* arg3, char* arg4, int32_t arg5)

00639ab0  {
00639ade      sub_6391f0(arg1, arg2, arg3, arg4, arg5);
00639b09      sub_6391f0(&arg1[0x40], ((char*)arg2 + 8), &arg3[4], &arg4[0x20], arg5);
00639b0e      void* edi_1 = &arg4[(arg5 << 3)];
00639b34      sub_6391f0(&arg1[0x80], ((char*)arg2 + 0x40), &arg3[0x20], edi_1, arg5);
00639b6b      return sub_6391f0(&arg1[0xc0], ((char*)arg2 + 0x48), &arg3[0x24], ((char*)edi_1 + 0x20), arg5);
00639ab0  }

00639b6c                                      8d 74 26 00                                                              .t&.

00639b70  int32_t _YCbCr_411_to_RGBA_FPX_MCU(void* arg1, int32_t arg2, int32_t arg3)

00639b70  {
00639b8f      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
00639b98      void* ebp = *(uint32_t*)((char*)arg1 + 0x4834);
00639b9e      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
00639ba4      int32_t var_b4 = data_9079c8;
00639bae      int32_t var_b0 = data_9079cc;
00639bb8      int32_t var_ac = data_9079d0;
00639bc2      int32_t var_a8 = data_9079d4;
00639c13      void var_a4;
00639c13      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 0x10, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_a4);
00639c13      
00639c1a      if (eax_6 != 0)
00639c26          return eax_6;
00639c26      
00639c27      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
00639c27      
00639c46      if (((uint32_t)operator==(&var_a4, &var_b4)) != 0)
00639c77          return *(uint32_t*)(ebx + 0xc8)(ebp, ((char*)ebp + 0x200), ((char*)ebp + 0x280), edi_1, esi);
00639c77      
00639c87      int32_t var_dc_1 = 0x907938;
00639c8f      int32_t var_94;
00639c8f      operator&(&var_94, &var_a4);
00639ca0      int32_t var_84 = var_94;
00639cac      int32_t var_90;
00639cac      int32_t var_80 = var_90;
00639cb0      int32_t var_8c;
00639cb0      int32_t var_7c = var_8c;
00639cb4      int32_t var_88;
00639cb4      int32_t var_78 = var_88;
00639cb4      
00639ccd      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
00639cf6          sub_638f30(ebp, ((char*)ebp + 0x200), ((char*)ebp + 0x280), edi_1, &var_84, esi);
00639cf6      
00639d0a      int32_t var_dc_3 = 0x907928;
00639d12      void var_74;
00639d12      operator&(&var_74, &var_a4);
00639d29      int32_t var_dc_4 = 0x907920;
00639d31      int32_t var_64;
00639d31      operator-(&var_64, &var_74);
00639d4b      var_84 = var_64;
00639d5a      int32_t var_60;
00639d5a      int32_t var_80_1 = var_60;
00639d5e      int32_t var_5c;
00639d5e      int32_t var_7c_1 = var_5c;
00639d62      int32_t var_58;
00639d62      int32_t var_78_1 = var_58;
00639d62      
00639d7b      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
00639dad          sub_638f30(((char*)ebp + 0x80), ((char*)ebp + 0x208), ((char*)ebp + 0x288), (edi_1 + 0x20), &var_84, esi);
00639dad      
00639dc4      int32_t var_dc_6 = 0x907910;
00639dcc      void var_54;
00639dcc      operator&(&var_54, &var_a4);
00639de6      int32_t var_dc_7 = 0x907908;
00639dee      int32_t var_44;
00639dee      operator-(&var_44, &var_54);
00639e08      var_84 = var_44;
00639e17      int32_t var_40;
00639e17      int32_t var_80_2 = var_40;
00639e1b      int32_t var_3c;
00639e1b      int32_t var_7c_2 = var_3c;
00639e1f      int32_t var_38;
00639e1f      int32_t var_78_2 = var_38;
00639e1f      
00639e38      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
00639e6a          sub_638f30(((char*)ebp + 0x100), ((char*)ebp + 0x240), ((char*)ebp + 0x2c0), (edi_1 + (esi << 3)), &var_84, esi);
00639e6a      
00639e81      int32_t var_dc_9 = 0x9078f8;
00639e89      void var_34;
00639e89      operator&(&var_34, &var_a4);
00639ea3      int32_t var_dc_10 = 0x9078f0;
00639eab      int32_t var_24;
00639eab      operator-(&var_24, &var_34);
00639ec5      var_84 = var_24;
00639ed4      int32_t var_20;
00639ed4      int32_t var_80_3 = var_20;
00639ed8      int32_t var_1c;
00639ed8      int32_t var_7c_3 = var_1c;
00639edc      int32_t var_18;
00639edc      int32_t var_78_3 = var_18;
00639ef0      int32_t eax_25 = ((uint32_t)operator!=(&var_84, &data_9078e0));
00639ef0      
00639ef5      if (eax_25 == 0)
00639f37          return eax_25;
00639f37      
00639f28      return sub_638f30(((char*)ebp + 0x180), ((char*)ebp + 0x248), ((char*)ebp + 0x2c8), ((edi_1 + (esi << 3)) + 0x20), &var_84, esi);
00639b70  }

00639f38                                                                          90 8d b4 26 00 00 00 00                          ...&....

00639f40  void sub_639f40(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t* arg6, int32_t arg7)

00639f40  {
00639f4b      int32_t edi = arg6[1];
00639f50      int32_t ebx = arg6[3];
00639f58      int32_t esi_2 = ((edi * arg7) + arg5);
00639f58      
00639f5e      if (edi < ebx)
00639f5e      {
00639f64          int32_t ecx_1 = arg6[2];
00639f69          int32_t edx_2 = (edi << 4);
00639f71          int32_t eax = (edi * 8);
00639f71          
0063a0d6          do
0063a0d6          {
00639f77              int32_t ebp_2 = *(uint32_t*)arg6;
00639f77              
00639f7c              if (ebp_2 < ecx_1)
00639f7c              {
00639f8d                  int32_t var_18_1 = (ebp_2 + eax);
00639f8d                  
0063a0ac                  do
0063a0ac                  {
00639fb8                      int32_t ebx_3 = ((int32_t)*(uint16_t*)(arg1 + (var_18_1 << 1)));
00639fc0                      int32_t ecx_4 = ((int32_t)*(uint16_t*)(arg3 + (var_18_1 << 1)));
00639fd9                      int32_t esi_4 = ((int32_t)*(uint16_t*)(arg2 + (var_18_1 << 1)));
0063a004                      int32_t edx_5 = (((int32_t)((int16_t)(((ecx_4 * 0x167) - 0xb2f5) >> 8))) + ebx_3);
0063a004                      
0063a010                      if (edx_5 > 0xff)
0063a012                          edx_5 = 0xff;
0063a010                      else if (edx_5 < 0)
0063a024                          edx_5 = 0;
0063a024                      
0063a033                      *(uint8_t*)(esi_2 + (ebp_2 << 2)) = (-(edx_5) - 1);
0063a036                      int32_t ecx_8 = (-(((int32_t)((int16_t)((((esi_4 * 0x58) + (ecx_4 * 0xb7)) - 0x87f6) >> 8)))) + ebx_3);
0063a036                      
0063a03e                      if (ecx_8 > 0xff)
0063a040                          ecx_8 = 0xff;
0063a03e                      else if (ecx_8 < 0)
0063a054                          ecx_8 = 0;
0063a054                      
0063a05d                      *(uint8_t*)((esi_2 + (ebp_2 << 2)) + 1) = (-(ecx_8) - 1);
0063a061                      int32_t ebx_4 = (ebx_3 + ((int32_t)((int16_t)(((esi_4 * 0x1c6) - 0xe251) >> 8))));
0063a061                      
0063a06b                      if (ebx_4 > 0xff)
0063a06d                          ebx_4 = 0xff;
0063a06b                      else if (ebx_4 < 0)
0063a084                          ebx_4 = 0;
0063a084                      
0063a093                      *(uint8_t*)((esi_2 + (ebp_2 << 2)) + 2) = (-(ebx_4) - 1);
0063a097                      int32_t edx_6;
0063a097                      edx_6 = *(uint8_t*)((arg4 + edx_2) + (ebp_2 << 1));
0063a09e                      *(uint8_t*)((esi_2 + (ebp_2 << 2)) + 3) = edx_6;
0063a0a2                      ebp_2 += 1;
0063a0a3                      ecx_1 = arg6[2];
0063a0a6                      var_18_1 += 1;
0063a0ac                  } while (ebp_2 < ecx_1);
0063a0ac                  
0063a0c6                  ebx = arg6[3];
00639f7c              }
00639f7c              
0063a0c9              esi_2 += arg7;
0063a0cd              edx_2 += 0x10;
0063a0d0              eax += 8;
0063a0d3              edi += 1;
0063a0d6          } while (edi < ebx);
00639f5e      }
00639f40  }

0063a019                                                                             8d b4 26 00 00 00 00                           ..&....
0063a047                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0063a074                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063a0e4              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

0063a0f0  char* _YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_PX(void* arg1, int16_t* arg2, int16_t* arg3, void* arg4, char* arg5, int32_t arg6)

0063a0f0  {
0063a105      int16_t* edx = arg3;
0063a113      char* result = arg5;
0063a123      int32_t i_1 = 0;
0063a127      void* var_24 = arg4;
0063a12b      int16_t* var_40 = arg2;
0063a12f      void* var_44 = arg1;
0063a90e      int32_t i;
0063a90e      
0063a90e      do
0063a90e      {
0063a133          int32_t esi_1 = ((int32_t)*(uint16_t*)edx);
0063a149          int32_t ebx_1 = ((int32_t)*(uint16_t*)var_40);
0063a164          int32_t edi_1 = ((int32_t)var_40[5]);
0063a17b          int32_t ebx_2 = ((int32_t)edx[1]);
0063a19c          int32_t ecx_13 = ((int32_t)var_40[1]);
0063a1c4          int32_t esi_4 = ((int32_t)edx[2]);
0063a1d7          int32_t ebx_6 = ((int32_t)var_40[2]);
0063a1f2          int32_t esi_6 = ((int32_t)edx[3]);
0063a209          int32_t ebx_7 = ((int32_t)var_40[3]);
0063a237          int32_t esi_8 = ((int32_t)edx[4]);
0063a24e          int32_t ebx_8 = ((int32_t)var_40[4]);
0063a27c          int32_t esi_10 = ((int32_t)var_40[6]);
0063a280          int32_t ebp_2 = ((int32_t)var_40[7]);
0063a297          int32_t ebx_9 = ((int32_t)edx[5]);
0063a2c5          int32_t ebx_11 = ((int32_t)edx[6]);
0063a306          int32_t ebx_13 = ((int32_t)edx[7]);
0063a366          int32_t ecx_72 = ((int32_t)*(uint16_t*)var_44);
0063a369          int32_t ebx_16 = ((((esi_1 * 0x167) - 0xb2f5) >> 8) + ecx_72);
0063a36b          int32_t var_14_2 = ebx_16;
0063a36b          
0063a375          if (ebx_16 > 0xff)
0063a375          {
0063a377              ebx_16 = 0xff;
0063a37c              int32_t var_14_3 = 0xff;
0063a375          }
0063a375          else if (ebx_16 < 0)
0063a392          {
0063a394              ebx_16 = 0;
0063a396              int32_t var_14_4 = 0;
0063a392          }
0063a392          
0063a3a2          *(uint8_t*)result = (-(ebx_16) - 1);
0063a3aa          int32_t ebx_20 = (-(((((ebx_1 * 0x58) + (esi_1 * 0xb7)) - 0x87f6) >> 8)) + ecx_72);
0063a3b2          int32_t var_18_2 = ebx_20;
0063a3b2          
0063a3b6          if (ebx_20 > 0xff)
0063a3b6          {
0063a3b8              ebx_20 = 0xff;
0063a3bd              int32_t var_18_3 = 0xff;
0063a3b6          }
0063a3b6          else if (ebx_20 < 0)
0063a3d2          {
0063a3d4              ebx_20 = 0;
0063a3d6              int32_t var_18_4 = 0;
0063a3d2          }
0063a3d2          
0063a3e2          result[1] = (-(ebx_20) - 1);
0063a3e5          int32_t ecx_73 = (ecx_72 + (((ebx_1 * 0x1c6) - 0xe251) >> 8));
0063a3e5          
0063a3ef          if (ecx_73 > 0xff)
0063a3f1              ecx_73 = 0xff;
0063a3ef          else if (ecx_73 < 0)
0063a404              ecx_73 = 0;
0063a404          
0063a40e          char* ebp_3 = var_24;
0063a416          result[2] = (-(ecx_73) - 1);
0063a41c          result[3] = *(uint8_t*)ebp_3;
0063a41f          int32_t ecx_75 = ((int32_t)*(uint16_t*)((char*)var_44 + 2));
0063a427          int32_t ebx_23 = ((((ebx_2 * 0x167) - 0xb2f5) >> 8) + ecx_75);
0063a42f          int32_t var_20_2 = ebx_23;
0063a42f          
0063a433          if (ebx_23 > 0xff)
0063a433          {
0063a435              ebx_23 = 0xff;
0063a43a              int32_t var_20_3 = 0xff;
0063a433          }
0063a433          else if (ebx_23 < 0)
0063a442          {
0063a444              ebx_23 = 0;
0063a446              int32_t var_20_4 = 0;
0063a442          }
0063a442          
0063a452          result[4] = (-(ebx_23) - 1);
0063a45b          int32_t ebx_27 = (-(((((ecx_13 * 0x58) + (ebx_2 * 0xb7)) - 0x87f6) >> 8)) + ecx_75);
0063a463          int32_t var_1c_2 = ebx_27;
0063a463          
0063a467          if (ebx_27 > 0xff)
0063a467          {
0063a469              ebx_27 = 0xff;
0063a46e              int32_t var_1c_3 = 0xff;
0063a467          }
0063a467          else if (ebx_27 < 0)
0063a482          {
0063a484              ebx_27 = 0;
0063a486              int32_t var_1c_4 = 0;
0063a482          }
0063a482          
0063a492          result[5] = (-(ebx_27) - 1);
0063a495          int32_t ecx_76 = (ecx_75 + (((ecx_13 * 0x1c6) - 0xe251) >> 8));
0063a495          
0063a49f          if (ecx_76 > 0xff)
0063a4a1              ecx_76 = 0xff;
0063a49f          else if (ecx_76 < 0)
0063a4b4              ecx_76 = 0;
0063a4b4          
0063a4be          result[6] = (-(ecx_76) - 1);
0063a4c4          result[7] = ebp_3[2];
0063a4c7          int32_t ecx_78 = ((int32_t)*(uint16_t*)((char*)var_44 + 4));
0063a4cf          int32_t ebx_30 = ((((esi_4 * 0x167) - 0xb2f5) >> 8) + ecx_78);
0063a4d7          int32_t var_2c_2 = ebx_30;
0063a4d7          
0063a4db          if (ebx_30 > 0xff)
0063a4db          {
0063a4dd              ebx_30 = 0xff;
0063a4e2              int32_t var_2c_3 = 0xff;
0063a4db          }
0063a4db          else if (ebx_30 < 0)
0063a4f2          {
0063a4f4              ebx_30 = 0;
0063a4f6              int32_t var_2c_4 = 0;
0063a4f2          }
0063a4f2          
0063a502          result[8] = (-(ebx_30) - 1);
0063a50b          int32_t ebx_34 = (-(((((ebx_6 * 0x58) + (esi_4 * 0xb7)) - 0x87f6) >> 8)) + ecx_78);
0063a513          int32_t var_28_2 = ebx_34;
0063a513          
0063a517          if (ebx_34 > 0xff)
0063a517          {
0063a519              ebx_34 = 0xff;
0063a51e              int32_t var_28_3 = 0xff;
0063a517          }
0063a517          else if (ebx_34 < 0)
0063a532          {
0063a534              ebx_34 = 0;
0063a536              int32_t var_28_4 = 0;
0063a532          }
0063a532          
0063a542          result[9] = (-(ebx_34) - 1);
0063a545          int32_t ecx_79 = (ecx_78 + (((ebx_6 * 0x1c6) - 0xe251) >> 8));
0063a545          
0063a54f          if (ecx_79 > 0xff)
0063a551              ecx_79 = 0xff;
0063a54f          else if (ecx_79 < 0)
0063a564              ecx_79 = 0;
0063a564          
0063a56e          result[0xa] = (-(ecx_79) - 1);
0063a574          result[0xb] = ebp_3[4];
0063a577          int32_t ecx_81 = ((int32_t)*(uint16_t*)((char*)var_44 + 6));
0063a57f          int32_t ebx_37 = ((((esi_6 * 0x167) - 0xb2f5) >> 8) + ecx_81);
0063a587          int32_t var_34_2 = ebx_37;
0063a587          
0063a58b          if (ebx_37 > 0xff)
0063a58b          {
0063a58d              ebx_37 = 0xff;
0063a592              int32_t var_34_3 = 0xff;
0063a58b          }
0063a58b          else if (ebx_37 < 0)
0063a5a2          {
0063a5a4              ebx_37 = 0;
0063a5a6              int32_t var_34_4 = 0;
0063a5a2          }
0063a5a2          
0063a5b2          result[0xc] = (-(ebx_37) - 1);
0063a5bb          int32_t ebx_41 = (-(((((ebx_7 * 0x58) + (esi_6 * 0xb7)) - 0x87f6) >> 8)) + ecx_81);
0063a5c3          int32_t var_30_2 = ebx_41;
0063a5c3          
0063a5c7          if (ebx_41 > 0xff)
0063a5c7          {
0063a5c9              ebx_41 = 0xff;
0063a5ce              int32_t var_30_3 = 0xff;
0063a5c7          }
0063a5c7          else if (ebx_41 < 0)
0063a5e2          {
0063a5e4              ebx_41 = 0;
0063a5e6              int32_t var_30_4 = 0;
0063a5e2          }
0063a5e2          
0063a5f2          result[0xd] = (-(ebx_41) - 1);
0063a5f5          int32_t ecx_82 = (ecx_81 + (((ebx_7 * 0x1c6) - 0xe251) >> 8));
0063a5f5          
0063a5ff          if (ecx_82 > 0xff)
0063a601              ecx_82 = 0xff;
0063a5ff          else if (ecx_82 < 0)
0063a614              ecx_82 = 0;
0063a614          
0063a61e          result[0xe] = (-(ecx_82) - 1);
0063a624          result[0xf] = ebp_3[6];
0063a627          int32_t ecx_84 = ((int32_t)*(uint16_t*)((char*)var_44 + 8));
0063a62f          int32_t ebx_44 = ((((esi_8 * 0x167) - 0xb2f5) >> 8) + ecx_84);
0063a637          int32_t var_3c_2 = ebx_44;
0063a637          
0063a63b          if (ebx_44 > 0xff)
0063a63b          {
0063a63d              ebx_44 = 0xff;
0063a642              int32_t var_3c_3 = 0xff;
0063a63b          }
0063a63b          else if (ebx_44 < 0)
0063a652          {
0063a654              ebx_44 = 0;
0063a656              int32_t var_3c_4 = 0;
0063a652          }
0063a652          
0063a662          result[0x10] = (-(ebx_44) - 1);
0063a66b          int32_t ebx_48 = (-(((((ebx_8 * 0x58) + (esi_8 * 0xb7)) - 0x87f6) >> 8)) + ecx_84);
0063a673          int32_t var_38_2 = ebx_48;
0063a673          
0063a677          if (ebx_48 > 0xff)
0063a677          {
0063a679              ebx_48 = 0xff;
0063a67e              int32_t var_38_3 = 0xff;
0063a677          }
0063a677          else if (ebx_48 < 0)
0063a692          {
0063a694              ebx_48 = 0;
0063a696              int32_t var_38_4 = 0;
0063a692          }
0063a692          
0063a6a2          result[0x11] = (-(ebx_48) - 1);
0063a6a5          int32_t ecx_85 = (ecx_84 + (((ebx_8 * 0x1c6) - 0xe251) >> 8));
0063a6a5          
0063a6af          if (ecx_85 > 0xff)
0063a6b1              ecx_85 = 0xff;
0063a6af          else if (ecx_85 < 0)
0063a6c4              ecx_85 = 0;
0063a6c4          
0063a6ce          result[0x12] = (-(ecx_85) - 1);
0063a6d4          result[0x13] = ebp_3[8];
0063a6d7          int32_t ecx_87 = ((int32_t)*(uint16_t*)((char*)var_44 + 0xa));
0063a6df          int32_t ebx_51 = ((((ebx_9 * 0x167) - 0xb2f5) >> 8) + ecx_87);
0063a6e7          int32_t var_4c_2 = ebx_51;
0063a6e7          
0063a6eb          if (ebx_51 > 0xff)
0063a6eb          {
0063a6ed              ebx_51 = 0xff;
0063a6f2              int32_t var_4c_3 = 0xff;
0063a6eb          }
0063a6eb          else if (ebx_51 < 0)
0063a702          {
0063a704              ebx_51 = 0;
0063a706              int32_t var_4c_4 = 0;
0063a702          }
0063a702          
0063a712          result[0x14] = (-(ebx_51) - 1);
0063a71b          int32_t ebx_55 = (-(((((edi_1 * 0x58) + (ebx_9 * 0xb7)) - 0x87f6) >> 8)) + ecx_87);
0063a723          int32_t var_48_2 = ebx_55;
0063a723          
0063a727          if (ebx_55 > 0xff)
0063a727          {
0063a729              ebx_55 = 0xff;
0063a72e              int32_t var_48_3 = 0xff;
0063a727          }
0063a727          else if (ebx_55 < 0)
0063a742          {
0063a744              ebx_55 = 0;
0063a746              int32_t var_48_4 = 0;
0063a742          }
0063a742          
0063a752          result[0x15] = (-(ebx_55) - 1);
0063a755          int32_t ecx_88 = (ecx_87 + (((edi_1 * 0x1c6) - 0xe251) >> 8));
0063a755          
0063a75f          if (ecx_88 > 0xff)
0063a761              ecx_88 = 0xff;
0063a75f          else if (ecx_88 < 0)
0063a774              ecx_88 = 0;
0063a774          
0063a77e          result[0x16] = (-(ecx_88) - 1);
0063a784          result[0x17] = ebp_3[0xa];
0063a787          int32_t ecx_90 = ((int32_t)*(uint16_t*)((char*)var_44 + 0xc));
0063a78f          int32_t ebx_58 = ((((ebx_11 * 0x167) - 0xb2f5) >> 8) + ecx_90);
0063a797          int32_t var_54_2 = ebx_58;
0063a797          
0063a79b          if (ebx_58 > 0xff)
0063a79b          {
0063a79d              ebx_58 = 0xff;
0063a7a2              int32_t var_54_3 = 0xff;
0063a79b          }
0063a79b          else if (ebx_58 < 0)
0063a7b2          {
0063a7b4              ebx_58 = 0;
0063a7b6              int32_t var_54_4 = 0;
0063a7b2          }
0063a7b2          
0063a7c2          result[0x18] = (-(ebx_58) - 1);
0063a7cb          int32_t ebx_62 = (-(((((esi_10 * 0x58) + (ebx_11 * 0xb7)) - 0x87f6) >> 8)) + ecx_90);
0063a7d3          int32_t var_50_2 = ebx_62;
0063a7d3          
0063a7d7          if (ebx_62 > 0xff)
0063a7d7          {
0063a7d9              ebx_62 = 0xff;
0063a7de              int32_t var_50_3 = 0xff;
0063a7d7          }
0063a7d7          else if (ebx_62 < 0)
0063a7f2          {
0063a7f4              ebx_62 = 0;
0063a7f6              int32_t var_50_4 = 0;
0063a7f2          }
0063a7f2          
0063a802          result[0x19] = (-(ebx_62) - 1);
0063a805          int32_t ecx_91 = (ecx_90 + (((esi_10 * 0x1c6) - 0xe251) >> 8));
0063a805          
0063a80f          if (ecx_91 > 0xff)
0063a811              ecx_91 = 0xff;
0063a80f          else if (ecx_91 < 0)
0063a824              ecx_91 = 0;
0063a824          
0063a82e          result[0x1a] = (-(ecx_91) - 1);
0063a834          result[0x1b] = ebp_3[0xc];
0063a837          int32_t ecx_93 = ((int32_t)*(uint16_t*)((char*)var_44 + 0xe));
0063a83f          int32_t ebx_65 = ((((ebx_13 * 0x167) - 0xb2f5) >> 8) + ecx_93);
0063a847          int32_t var_5c_2 = ebx_65;
0063a847          
0063a84b          if (ebx_65 > 0xff)
0063a84b          {
0063a84d              ebx_65 = 0xff;
0063a852              int32_t var_5c_3 = 0xff;
0063a84b          }
0063a84b          else if (ebx_65 < 0)
0063a862          {
0063a864              ebx_65 = 0;
0063a866              int32_t var_5c_4 = 0;
0063a862          }
0063a862          
0063a872          result[0x1c] = (-(ebx_65) - 1);
0063a87b          int32_t ebx_69 = (-(((((ebp_2 * 0x58) + (ebx_13 * 0xb7)) - 0x87f6) >> 8)) + ecx_93);
0063a883          int32_t var_58_2 = ebx_69;
0063a883          
0063a887          if (ebx_69 > 0xff)
0063a887          {
0063a889              ebx_69 = 0xff;
0063a88e              int32_t var_58_3 = 0xff;
0063a887          }
0063a887          else if (ebx_69 < 0)
0063a8a2          {
0063a8a4              ebx_69 = 0;
0063a8a6              int32_t var_58_4 = 0;
0063a8a2          }
0063a8a2          
0063a8b2          result[0x1d] = (-(ebx_69) - 1);
0063a8b5          int32_t ecx_94 = (ecx_93 + (((ebp_2 * 0x1c6) - 0xe251) >> 8));
0063a8b5          
0063a8bf          if (ecx_94 > 0xff)
0063a8c1              ecx_94 = 0xff;
0063a8bf          else if (ecx_94 < 0)
0063a8d4              ecx_94 = 0;
0063a8d4          
0063a8de          edx = &edx[8];
0063a8e1          result[0x1e] = (-(ecx_94) - 1);
0063a8ea          result[0x1f] = ebp_3[0xe];
0063a8f1          i = (i_1 + 1);
0063a8f2          var_44 += 0x10;
0063a8f7          var_40 = &var_40[8];
0063a8fc          var_24 = &ebp_3[0x10];
0063a900          result = &result[arg6];
0063a907          i_1 = i;
0063a90e      } while (i < 8);
0063a91b      return result;
0063a0f0  }

0063a382        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
0063a3c3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063a3f8                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063a474                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063a4a8                          90 8d b4 26 00 00 00 00                                                          ...&....
0063a4e8                          90 8d b4 26 00 00 00 00                                                          ...&....
0063a524              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0063a558                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063a598                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063a5d4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063a608                          90 8d b4 26 00 00 00 00                                                          ...&....
0063a648                          90 8d b4 26 00 00 00 00                                                          ...&....
0063a684              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0063a6b8                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063a6f8                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063a734                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063a768                          90 8d b4 26 00 00 00 00                                                          ...&....
0063a7a8                          90 8d b4 26 00 00 00 00                                                          ...&....
0063a7e4              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0063a818                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063a858                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063a894                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063a8c8                          90 8d b4 26 00 00 00 00                                                          ...&....
0063a91c                                                                                      8d 74 26 00                              .t&.

0063a920  uint32_t _YCbCrA_FPX_1111_to_RGBA_FPX_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063a920  {
0063a93c      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063a945      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063a94b      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063a951      int32_t var_54 = data_9079d8;
0063a95b      int32_t var_50 = data_9079dc;
0063a965      int32_t var_4c = data_9079e0;
0063a96f      int32_t var_48 = data_9079e4;
0063a9c0      void var_44;
0063a9c0      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_44);
0063a9c0      
0063a9c7      if (eax_6 != 0)
0063a9d0          return eax_6;
0063a9d0      
0063a9d1      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063a9d1      
0063a9f0      if (((uint32_t)operator==(&var_44, &var_54)) != 0)
0063aa28          return *(uint32_t*)(ebx + 0xe0)(ebp, (ebp + 0x80), (ebp + 0x100), (ebp + 0x180), edi_1, esi);
0063aa28      
0063aa38      int32_t var_7c_1 = 0x907938;
0063aa40      int32_t var_34;
0063aa40      operator&(&var_34, &var_44);
0063aa51      int32_t var_24 = var_34;
0063aa5d      int32_t var_30;
0063aa5d      int32_t var_20 = var_30;
0063aa61      int32_t var_2c;
0063aa61      int32_t var_1c = var_2c;
0063aa65      int32_t var_28;
0063aa65      int32_t var_18 = var_28;
0063aa79      uint32_t eax_13 = ((uint32_t)operator!=(&var_24, &data_9078e0));
0063aa79      
0063aa7e      if (eax_13 == 0)
0063aabd          return eax_13;
0063aabd      
0063aab1      return sub_639f40(ebp, (ebp + 0x80), (ebp + 0x100), (ebp + 0x180), edi_1, &var_24, esi);
0063a920  }

0063aabe                                                                                            8b f6                                ..

0063aac0  int32_t sub_63aac0(int32_t arg1, int16_t* arg2, int16_t* arg3, int32_t arg4, int32_t arg5, int32_t* arg6, int32_t arg7)

0063aac0  {
0063aaca      int16_t* ecx = arg2;
0063aad1      int16_t* edx = arg3;
0063aae6      int32_t ebp = arg6[1];
0063aaee      int32_t ebx_2 = ((ebp * arg7) + arg5);
0063ac33      void var_ec;
0063ac33      void var_ac;
0063ac33      void var_6c;
0063ac33      int32_t i;
0063ac33      
0063ac33      for (i = 0; i < 8; i += 1)
0063ac33      {
0063ab00          int32_t ebp_1 = ((int32_t)*(uint16_t*)edx);
0063ab12          int32_t edi_1 = ((int32_t)*(uint16_t*)ecx);
0063ab1b          *(uint16_t*)(&var_ec + (i << 3)) = ((int16_t)(((ebp_1 * 0x167) - 0xb2f5) >> 8));
0063ab2c          *(uint16_t*)(&var_ac + (i << 3)) = ((int16_t)((((edi_1 * 0x58) + (ebp_1 * 0xb7)) - 0x87f6) >> 8));
0063ab40          *(uint16_t*)(&var_6c + (i << 3)) = ((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8));
0063ab48          int32_t ebp_8 = ((int32_t)edx[1]);
0063ab5b          int32_t edi_2 = ((int32_t)ecx[1]);
0063ab5f          void var_ea;
0063ab5f          *(uint16_t*)(&var_ea + (i << 3)) = ((int16_t)(((ebp_8 * 0x167) - 0xb2f5) >> 8));
0063ab77          void var_aa;
0063ab77          *(uint16_t*)(&var_aa + (i << 3)) = ((int16_t)((((edi_2 * 0x58) + (ebp_8 * 0xb7)) - 0x87f6) >> 8));
0063ab8b          int32_t edi_3 = ((int32_t)ecx[2]);
0063ab8f          void var_6a;
0063ab8f          *(uint16_t*)(&var_6a + (i << 3)) = ((int16_t)(((edi_2 * 0x1c6) - 0xe251) >> 8));
0063ab97          int32_t ebp_15 = ((int32_t)edx[2]);
0063abb0          void var_e8;
0063abb0          *(uint16_t*)(&var_e8 + (i << 3)) = ((int16_t)(((ebp_15 * 0x167) - 0xb2f5) >> 8));
0063abc2          void var_a8;
0063abc2          *(uint16_t*)(&var_a8 + (i << 3)) = ((int16_t)((((edi_3 * 0x58) + (ebp_15 * 0xb7)) - 0x87f6) >> 8));
0063abd6          void var_68;
0063abd6          *(uint16_t*)(&var_68 + (i << 3)) = ((int16_t)(((edi_3 * 0x1c6) - 0xe251) >> 8));
0063abde          int32_t ebp_22 = ((int32_t)edx[3]);
0063abf1          int32_t edi_4 = ((int32_t)ecx[3]);
0063abf5          void var_e6;
0063abf5          *(uint16_t*)(&var_e6 + (i << 3)) = ((int16_t)(((ebp_22 * 0x167) - 0xb2f5) >> 8));
0063ac0d          ecx = &ecx[8];
0063ac10          void var_a6;
0063ac10          *(uint16_t*)(&var_a6 + (i << 3)) = ((int16_t)((((edi_4 * 0x58) + (ebp_22 * 0xb7)) - 0x87f6) >> 8));
0063ac24          edx = &edx[8];
0063ac27          void var_66;
0063ac27          *(uint16_t*)(&var_66 + (i << 3)) = ((int16_t)(((edi_4 * 0x1c6) - 0xe251) >> 8));
0063ac33      }
0063ac33      
0063ac39      int32_t ebp_29 = ebp;
0063ac4e      int32_t ecx_1 = arg6[3];
0063ac4e      
0063ac53      if (ebp_29 < ecx_1)
0063ac53      {
0063ac59          int32_t edx_1 = arg6[2];
0063ac5e          i = (ebp_29 << 4);
0063ac5e          
0063adbc          do
0063adbc          {
0063ac68              int32_t esi_20 = *(uint32_t*)arg6;
0063ac68              
0063ac6c              if (esi_20 < edx_1)
0063ac6c              {
0063acb4                  int32_t esi_21 = esi_20;
0063acb4                  
0063ad8f                  do
0063ad8f                  {
0063acc7                      int32_t eax_2 = ((int32_t)*(uint16_t*)((i + arg1) + (esi_21 << 1)));
0063ace2                      int32_t ecx_5 = ((((esi_21 - 0x80000000) - 0x80000000) >> 1) + (ebp_29 * 4));
0063ace9                      int32_t edx_9 = (((int32_t)*(uint16_t*)(&var_ec + (ecx_5 << 1))) + eax_2);
0063ace9                      
0063acf1                      if (edx_9 > 0xff)
0063acf3                          edx_9 = 0xff;
0063acf1                      else if (edx_9 < 0)
0063ad04                          edx_9 = 0;
0063ad04                      
0063ad15                      *(uint8_t*)(ebx_2 + (esi_21 << 2)) = (-(edx_9) - 1);
0063ad1f                      int32_t edx_13 = (-(((int32_t)*(uint16_t*)(&var_ac + (ecx_5 << 1)))) + eax_2);
0063ad1f                      
0063ad27                      if (edx_13 > 0xff)
0063ad29                          edx_13 = 0xff;
0063ad27                      else if (edx_13 < 0)
0063ad34                          edx_13 = 0;
0063ad34                      
0063ad3e                      int32_t ecx_6 = ((int32_t)*(uint16_t*)(&var_6c + (ecx_5 << 1)));
0063ad46                      *(uint8_t*)((ebx_2 + (esi_21 << 2)) + 1) = (-(edx_13) - 1);
0063ad4a                      int32_t eax_3 = (eax_2 + ecx_6);
0063ad4a                      
0063ad51                      if (eax_3 > 0xff)
0063ad53                          eax_3 = 0xff;
0063ad51                      else if (eax_3 < 0)
0063ad64                          eax_3 = 0;
0063ad64                      
0063ad76                      *(uint8_t*)((ebx_2 + (esi_21 << 2)) + 2) = (-(eax_3) - 1);
0063ad85                      *(uint8_t*)((ebx_2 + (esi_21 << 2)) + 3) = *(uint8_t*)((arg4 + i) + (esi_21 << 1));
0063ad89                      esi_21 += 1;
0063ad8a                      edx_1 = arg6[2];
0063ad8f                  } while (esi_21 < edx_1);
0063ad8f                  
0063adac                  ecx_1 = arg6[3];
0063ac6c              }
0063ac6c              
0063adaf              ebx_2 += arg7;
0063adb6              i += 0x10;
0063adb9              ebp_29 += 1;
0063adbc          } while (ebp_29 < ecx_1);
0063ac53      }
0063ac53      
0063adcc      return i;
0063aac0  }

0063acfa                                                                                8d b6 00 00 00 00                            ......
0063ad5a                                                                                8d b6 00 00 00 00                            ......
0063adcd                                         8d 76 00                                                               .v.

0063add0  char* sub_63add0(int16_t* arg1, int16_t* arg2, int16_t* arg3, void* arg4, char* arg5, int32_t arg6)

0063add0  {
0063add7      int16_t* edx = arg1;
0063ade7      char* result = arg5;
0063adf1      int32_t var_50 = 0;
0063adf5      void* var_24 = arg4;
0063adf9      int16_t* var_3c = arg3;
0063adfd      int16_t* var_38 = arg2;
0063b481      bool cond:6_1;
0063b481      
0063b481      do
0063b481      {
0063ae05          int32_t esi_1 = ((int32_t)*(uint16_t*)var_3c);
0063ae14          int32_t ecx_4 = (((esi_1 * 0x167) - 0xb2f5) >> 8);
0063ae1b          int32_t ebp_1 = ((int32_t)*(uint16_t*)var_38);
0063ae2e          int32_t ebx_4 = ((((ebp_1 * 0x58) + (esi_1 * 0xb7)) - 0x87f6) >> 8);
0063ae41          int32_t ebx_7 = (((ebp_1 * 0x1c6) - 0xe251) >> 8);
0063ae4c          int32_t esi_3 = ((int32_t)var_3c[1]);
0063ae5c          int32_t ebx_11 = (((esi_3 * 0x167) - 0xb2f5) >> 8);
0063ae6d          int32_t ebp_2 = ((int32_t)var_38[1]);
0063ae7b          int32_t ebx_15 = ((((ebp_2 * 0x58) + (esi_3 * 0xb7)) - 0x87f6) >> 8);
0063ae8e          int32_t ebx_18 = (((ebp_2 * 0x1c6) - 0xe251) >> 8);
0063ae99          int32_t ebp_3 = ((int32_t)var_3c[2]);
0063aea9          int32_t ebx_22 = (((ebp_3 * 0x167) - 0xb2f5) >> 8);
0063aeba          int32_t edi_1 = ((int32_t)var_38[2]);
0063aec8          int32_t ebx_26 = ((((edi_1 * 0x58) + (ebp_3 * 0xb7)) - 0x87f6) >> 8);
0063aedb          int32_t ebx_29 = (((edi_1 * 0x1c6) - 0xe251) >> 8);
0063aee6          int32_t esi_5 = ((int32_t)var_3c[3]);
0063aef6          int32_t ebx_33 = (((esi_5 * 0x167) - 0xb2f5) >> 8);
0063af07          int32_t ebp_5 = ((int32_t)var_38[3]);
0063af15          int32_t ebx_37 = ((((ebp_5 * 0x58) + (esi_5 * 0xb7)) - 0x87f6) >> 8);
0063af28          int32_t ebx_40 = (((ebp_5 * 0x1c6) - 0xe251) >> 8);
0063af2f          var_38 = &var_38[8];
0063af34          int32_t ebx_41 = ((int32_t)*(uint16_t*)edx);
0063af37          var_3c = &var_3c[8];
0063af40          int32_t ebx_42 = (ecx_4 + ebx_41);
0063af40          
0063af49          if (ebx_42 > 0xff)
0063af4b              ebx_42 = 0xff;
0063af49          else if (ebx_42 < 0)
0063af64              ebx_42 = 0;
0063af64          
0063af6e          *(uint8_t*)result = (-(ebx_42) - 1);
0063af74          int32_t ebx_45 = (ebx_41 - ebx_4);
0063af74          
0063af7e          if (ebx_45 > 0xff)
0063af80              ebx_45 = 0xff;
0063af7e          else if (ebx_45 < 0)
0063af94              ebx_45 = 0;
0063af94          
0063af9e          result[1] = (-(ebx_45) - 1);
0063afa5          int32_t ebx_48 = (ebx_41 + ebx_7);
0063afa9          int32_t var_14_2 = ebx_48;
0063afa9          
0063afb3          if (ebx_48 > 0xff)
0063afb3          {
0063afb5              ebx_48 = 0xff;
0063afba              int32_t var_14_3 = 0xff;
0063afb3          }
0063afb3          else if (ebx_48 < 0)
0063afc2          {
0063afc4              ebx_48 = 0;
0063afc6              int32_t var_14_4 = 0;
0063afc2          }
0063afc2          
0063afd2          char* ebp_6 = var_24;
0063afd6          result[2] = (-(ebx_48) - 1);
0063afdc          result[3] = *(uint8_t*)ebp_6;
0063afdf          int32_t ebx_50 = ((int32_t)edx[1]);
0063afe3          int32_t ecx_5 = (ecx_4 + ebx_50);
0063afe3          
0063afeb          if (ecx_5 > 0xff)
0063afed              ecx_5 = 0xff;
0063afeb          else if (ecx_5 < 0)
0063b004              ecx_5 = 0;
0063b004          
0063b00e          result[4] = (-(ecx_5) - 1);
0063b017          int32_t ecx_9 = (-(ebx_4) + ebx_50);
0063b019          int32_t var_18_2 = ecx_9;
0063b019          
0063b023          if (ecx_9 > 0xff)
0063b023          {
0063b025              ecx_9 = 0xff;
0063b02a              int32_t var_18_3 = 0xff;
0063b023          }
0063b023          else if (ecx_9 < 0)
0063b032          {
0063b034              ecx_9 = 0;
0063b036              int32_t var_18_4 = 0;
0063b032          }
0063b032          
0063b042          result[5] = (-(ecx_9) - 1);
0063b045          int32_t ebx_51 = (ebx_50 + ebx_7);
0063b045          
0063b04f          if (ebx_51 > 0xff)
0063b051              ebx_51 = 0xff;
0063b04f          else if (ebx_51 < 0)
0063b064              ebx_51 = 0;
0063b064          
0063b06e          result[6] = (-(ebx_51) - 1);
0063b071          ebx_51 = ebp_6[2];
0063b074          result[7] = ebx_51;
0063b077          int32_t ecx_12 = ((int32_t)edx[2]);
0063b07f          int32_t ebx_53 = (ecx_12 + ebx_11);
0063b07f          
0063b088          if (ebx_53 > 0xff)
0063b08a              ebx_53 = 0xff;
0063b088          else if (ebx_53 < 0)
0063b0a4              ebx_53 = 0;
0063b0a4          
0063b0ae          result[8] = (-(ebx_53) - 1);
0063b0b3          int32_t ebx_56 = (ecx_12 - ebx_15);
0063b0b3          
0063b0bd          if (ebx_56 > 0xff)
0063b0bf              ebx_56 = 0xff;
0063b0bd          else if (ebx_56 < 0)
0063b0d4              ebx_56 = 0;
0063b0d4          
0063b0de          result[9] = (-(ebx_56) - 1);
0063b0e1          int32_t ecx_13 = (ecx_12 + ebx_18);
0063b0e1          
0063b0eb          if (ecx_13 > 0xff)
0063b0ed              ecx_13 = 0xff;
0063b0eb          else if (ecx_13 < 0)
0063b104              ecx_13 = 0;
0063b104          
0063b10e          result[0xa] = (-(ecx_13) - 1);
0063b114          result[0xb] = ebp_6[4];
0063b117          int32_t ecx_15 = ((int32_t)edx[3]);
0063b11f          int32_t ebx_59 = (ebx_11 + ecx_15);
0063b127          int32_t var_1c_2 = ebx_59;
0063b127          
0063b12b          if (ebx_59 > 0xff)
0063b12b          {
0063b12d              ebx_59 = 0xff;
0063b132              int32_t var_1c_3 = 0xff;
0063b12b          }
0063b12b          else if (ebx_59 < 0)
0063b142          {
0063b144              ebx_59 = 0;
0063b146              int32_t var_1c_4 = 0;
0063b142          }
0063b142          
0063b152          result[0xc] = (-(ebx_59) - 1);
0063b15b          int32_t ebx_63 = (-(ebx_15) + ecx_15);
0063b163          int32_t var_20_2 = ebx_63;
0063b163          
0063b167          if (ebx_63 > 0xff)
0063b167          {
0063b169              ebx_63 = 0xff;
0063b16e              int32_t var_20_3 = 0xff;
0063b167          }
0063b167          else if (ebx_63 < 0)
0063b182          {
0063b184              ebx_63 = 0;
0063b186              int32_t var_20_4 = 0;
0063b182          }
0063b182          
0063b192          result[0xd] = (-(ebx_63) - 1);
0063b195          int32_t ecx_16 = (ecx_15 + ebx_18);
0063b195          
0063b19f          if (ecx_16 > 0xff)
0063b1a1              ecx_16 = 0xff;
0063b19f          else if (ecx_16 < 0)
0063b1b4              ecx_16 = 0;
0063b1b4          
0063b1be          result[0xe] = (-(ecx_16) - 1);
0063b1c4          result[0xf] = ebp_6[6];
0063b1c7          int32_t ecx_18 = ((int32_t)edx[4]);
0063b1cf          int32_t ebx_66 = (ecx_18 + ebx_22);
0063b1cf          
0063b1d8          if (ebx_66 > 0xff)
0063b1da              ebx_66 = 0xff;
0063b1d8          else if (ebx_66 < 0)
0063b1f4              ebx_66 = 0;
0063b1f4          
0063b1fe          result[0x10] = (-(ebx_66) - 1);
0063b203          int32_t ebx_69 = (ecx_18 - ebx_26);
0063b203          
0063b20d          if (ebx_69 > 0xff)
0063b20f              ebx_69 = 0xff;
0063b20d          else if (ebx_69 < 0)
0063b224              ebx_69 = 0;
0063b224          
0063b22e          result[0x11] = (-(ebx_69) - 1);
0063b231          int32_t ecx_19 = (ecx_18 + ebx_29);
0063b231          
0063b23b          if (ecx_19 > 0xff)
0063b23d              ecx_19 = 0xff;
0063b23b          else if (ecx_19 < 0)
0063b254              ecx_19 = 0;
0063b254          
0063b25e          result[0x12] = (-(ecx_19) - 1);
0063b264          result[0x13] = ebp_6[8];
0063b267          int32_t ecx_21 = ((int32_t)edx[5]);
0063b26f          int32_t ebx_72 = (ebx_22 + ecx_21);
0063b277          int32_t var_28_2 = ebx_72;
0063b277          
0063b27b          if (ebx_72 > 0xff)
0063b27b          {
0063b27d              ebx_72 = 0xff;
0063b282              int32_t var_28_3 = 0xff;
0063b27b          }
0063b27b          else if (ebx_72 < 0)
0063b292          {
0063b294              ebx_72 = 0;
0063b296              int32_t var_28_4 = 0;
0063b292          }
0063b292          
0063b2a2          result[0x14] = (-(ebx_72) - 1);
0063b2ab          int32_t ebx_76 = (-(ebx_26) + ecx_21);
0063b2b3          int32_t var_2c_2 = ebx_76;
0063b2b3          
0063b2b7          if (ebx_76 > 0xff)
0063b2b7          {
0063b2b9              ebx_76 = 0xff;
0063b2be              int32_t var_2c_3 = 0xff;
0063b2b7          }
0063b2b7          else if (ebx_76 < 0)
0063b2d2          {
0063b2d4              ebx_76 = 0;
0063b2d6              int32_t var_2c_4 = 0;
0063b2d2          }
0063b2d2          
0063b2e2          result[0x15] = (-(ebx_76) - 1);
0063b2e5          int32_t ecx_22 = (ecx_21 + ebx_29);
0063b2e5          
0063b2ef          if (ecx_22 > 0xff)
0063b2f1              ecx_22 = 0xff;
0063b2ef          else if (ecx_22 < 0)
0063b304              ecx_22 = 0;
0063b304          
0063b30e          result[0x16] = (-(ecx_22) - 1);
0063b314          result[0x17] = ebp_6[0xa];
0063b317          int32_t ecx_24 = ((int32_t)edx[6]);
0063b31f          int32_t ebx_79 = (ecx_24 + ebx_33);
0063b31f          
0063b328          if (ebx_79 > 0xff)
0063b32a              ebx_79 = 0xff;
0063b328          else if (ebx_79 < 0)
0063b344              ebx_79 = 0;
0063b344          
0063b34e          result[0x18] = (-(ebx_79) - 1);
0063b353          int32_t ebx_82 = (ecx_24 - ebx_37);
0063b353          
0063b35d          if (ebx_82 > 0xff)
0063b35f              ebx_82 = 0xff;
0063b35d          else if (ebx_82 < 0)
0063b374              ebx_82 = 0;
0063b374          
0063b37e          result[0x19] = (-(ebx_82) - 1);
0063b381          int32_t ecx_25 = (ecx_24 + ebx_40);
0063b381          
0063b38b          if (ecx_25 > 0xff)
0063b38d              ecx_25 = 0xff;
0063b38b          else if (ecx_25 < 0)
0063b3a4              ecx_25 = 0;
0063b3a4          
0063b3ae          result[0x1a] = (-(ecx_25) - 1);
0063b3b4          result[0x1b] = ebp_6[0xc];
0063b3b7          int32_t ecx_27 = ((int32_t)edx[7]);
0063b3bf          int32_t ebx_85 = (ebx_33 + ecx_27);
0063b3c7          int32_t var_30_2 = ebx_85;
0063b3c7          
0063b3cb          if (ebx_85 > 0xff)
0063b3cb          {
0063b3cd              ebx_85 = 0xff;
0063b3d2              int32_t var_30_3 = 0xff;
0063b3cb          }
0063b3cb          else if (ebx_85 < 0)
0063b3e2          {
0063b3e4              ebx_85 = 0;
0063b3e6              int32_t var_30_4 = 0;
0063b3e2          }
0063b3e2          
0063b3f2          result[0x1c] = (-(ebx_85) - 1);
0063b3fb          int32_t ebx_89 = (-(ebx_37) + ecx_27);
0063b403          int32_t var_34_2 = ebx_89;
0063b403          
0063b407          if (ebx_89 > 0xff)
0063b407          {
0063b409              ebx_89 = 0xff;
0063b40e              int32_t var_34_3 = 0xff;
0063b407          }
0063b407          else if (ebx_89 < 0)
0063b422          {
0063b424              ebx_89 = 0;
0063b426              int32_t var_34_4 = 0;
0063b422          }
0063b422          
0063b432          result[0x1d] = (-(ebx_89) - 1);
0063b435          int32_t ecx_28 = (ecx_27 + ebx_40);
0063b435          
0063b43f          if (ecx_28 > 0xff)
0063b441              ecx_28 = 0xff;
0063b43f          else if (ecx_28 < 0)
0063b454              ecx_28 = 0;
0063b454          
0063b45e          edx = &edx[8];
0063b461          result[0x1e] = (-(ecx_28) - 1);
0063b46a          result[0x1f] = ebp_6[0xe];
0063b472          result = &result[arg6];
0063b476          cond:6_1 = (var_50 + 1) < 8;
0063b479          var_24 = &ebp_6[0x10];
0063b47d          var_50 += 1;
0063b481      } while (cond:6_1);
0063b48e      return result;
0063add0  }

0063af52                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
0063af87                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0063aff4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063b058                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063b091                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
0063b0c6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063b0f4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063b138                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063b174                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063b1a8                          90 8d b4 26 00 00 00 00                                                          ...&....
0063b1e1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
0063b216                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063b244              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0063b288                          90 8d b4 26 00 00 00 00                                                          ...&....
0063b2c4              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0063b2f8                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063b331                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
0063b366                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063b394                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063b3d8                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063b414                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063b448                          90 8d b4 26 00 00 00 00                                                          ...&....
0063b48f                                               90                                                                 .

0063b490  char* _YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_PX(int16_t* arg1, int16_t* arg2, int16_t* arg3, void* arg4, char* arg5, int32_t arg6)

0063b490  {
0063b4c6      sub_63add0(arg1, arg2, arg3, arg4, arg5, arg6);
0063b50b      return sub_63add0(&arg1[0x40], &arg2[4], &arg3[4], ((char*)arg4 + 0x80), &arg5[0x20], arg6);
0063b490  }

0063b50c                                      8d 74 26 00                                                              .t&.

0063b510  int32_t _YCbCrA_FPX_4224_to_RGBA_FPX_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063b510  {
0063b52f      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063b538      void* ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063b53e      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063b544      int32_t var_74 = data_9079e8;
0063b54e      int32_t var_70 = data_9079ec;
0063b558      int32_t var_6c = data_9079f0;
0063b562      int32_t var_68 = data_9079f4;
0063b5b6      void var_64;
0063b5b6      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_64);
0063b5b6      
0063b5bd      if (eax_6 != 0)
0063b5c9          return eax_6;
0063b5c9      
0063b5ca      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063b5ca      
0063b5e9      if (((uint32_t)operator==(&var_64, &var_74)) != 0)
0063b624          return *(uint32_t*)(ebx + 0xe4)(ebp, ((char*)ebp + 0x100), ((char*)ebp + 0x180), ((char*)ebp + 0x200), edi_1, esi);
0063b624      
0063b634      int32_t var_9c_1 = 0x907938;
0063b63c      int32_t var_54;
0063b63c      operator&(&var_54, &var_64);
0063b64d      int32_t var_44 = var_54;
0063b659      int32_t var_50;
0063b659      int32_t var_40 = var_50;
0063b65d      int32_t var_4c;
0063b65d      int32_t var_3c = var_4c;
0063b661      int32_t var_48;
0063b661      int32_t var_38 = var_48;
0063b661      
0063b67a      if (((uint32_t)operator!=(&var_44, &data_9078e0)) != 0)
0063b6ad          sub_63aac0(ebp, ((char*)ebp + 0x100), ((char*)ebp + 0x180), ((char*)ebp + 0x200), edi_1, &var_44, esi);
0063b6ad      
0063b6c1      int32_t var_9c_3 = 0x907928;
0063b6c9      void var_34;
0063b6c9      operator&(&var_34, &var_64);
0063b6e0      int32_t var_9c_4 = 0x907920;
0063b6e8      int32_t var_24;
0063b6e8      operator-(&var_24, &var_34);
0063b702      var_44 = var_24;
0063b711      int32_t var_20;
0063b711      int32_t var_40_1 = var_20;
0063b715      int32_t var_1c;
0063b715      int32_t var_3c_1 = var_1c;
0063b719      int32_t var_18;
0063b719      int32_t var_38_1 = var_18;
0063b72d      int32_t eax_17 = ((uint32_t)operator!=(&var_44, &data_9078e0));
0063b72d      
0063b732      if (eax_17 == 0)
0063b77d          return eax_17;
0063b77d      
0063b76e      return sub_63aac0(((char*)ebp + 0x80), ((char*)ebp + 0x108), ((char*)ebp + 0x188), ((char*)ebp + 0x280), (edi_1 + 0x20), &var_44, esi);
0063b510  }

0063b77e                                                                                            8b f6                                ..

0063b780  int32_t sub_63b780(int32_t arg1, int16_t* arg2, int16_t* arg3, int32_t arg4, int32_t arg5, int32_t* arg6, int32_t arg7)

0063b780  {
0063b787      int16_t* ecx = arg2;
0063b78e      int16_t* edx = arg3;
0063b7a3      int32_t ebp = arg6[1];
0063b7ab      int32_t ebx_2 = ((ebp * arg7) + arg5);
0063b8e7      void var_8c;
0063b8e7      void var_6c;
0063b8e7      void var_4c;
0063b8e7      int32_t i;
0063b8e7      
0063b8e7      for (i = 0; i < 4; i += 1)
0063b8e7      {
0063b7c0          int32_t ebp_1 = ((int32_t)*(uint16_t*)edx);
0063b7d2          int32_t edi_1 = ((int32_t)*(uint16_t*)ecx);
0063b7db          *(uint16_t*)(&var_8c + (i << 3)) = ((int16_t)(((ebp_1 * 0x167) - 0xb2f5) >> 8));
0063b7ec          *(uint16_t*)(&var_6c + (i << 3)) = ((int16_t)((((edi_1 * 0x58) + (ebp_1 * 0xb7)) - 0x87f6) >> 8));
0063b800          *(uint16_t*)(&var_4c + (i << 3)) = ((int16_t)(((edi_1 * 0x1c6) - 0xe251) >> 8));
0063b805          int32_t ebp_8 = ((int32_t)edx[1]);
0063b818          int32_t edi_2 = ((int32_t)ecx[1]);
0063b81c          void var_8a;
0063b81c          *(uint16_t*)(&var_8a + (i << 3)) = ((int16_t)(((ebp_8 * 0x167) - 0xb2f5) >> 8));
0063b834          void var_6a;
0063b834          *(uint16_t*)(&var_6a + (i << 3)) = ((int16_t)((((edi_2 * 0x58) + (ebp_8 * 0xb7)) - 0x87f6) >> 8));
0063b848          int32_t edi_3 = ((int32_t)ecx[2]);
0063b84c          void var_4a;
0063b84c          *(uint16_t*)(&var_4a + (i << 3)) = ((int16_t)(((edi_2 * 0x1c6) - 0xe251) >> 8));
0063b851          int32_t ebp_15 = ((int32_t)edx[2]);
0063b86a          void var_88;
0063b86a          *(uint16_t*)(&var_88 + (i << 3)) = ((int16_t)(((ebp_15 * 0x167) - 0xb2f5) >> 8));
0063b87c          void var_68;
0063b87c          *(uint16_t*)(&var_68 + (i << 3)) = ((int16_t)((((edi_3 * 0x58) + (ebp_15 * 0xb7)) - 0x87f6) >> 8));
0063b890          void var_48;
0063b890          *(uint16_t*)(&var_48 + (i << 3)) = ((int16_t)(((edi_3 * 0x1c6) - 0xe251) >> 8));
0063b895          int32_t ebp_22 = ((int32_t)edx[3]);
0063b8a8          int32_t edi_4 = ((int32_t)ecx[3]);
0063b8ac          void var_86;
0063b8ac          *(uint16_t*)(&var_86 + (i << 3)) = ((int16_t)(((ebp_22 * 0x167) - 0xb2f5) >> 8));
0063b8c4          ecx = &ecx[8];
0063b8c7          void var_66;
0063b8c7          *(uint16_t*)(&var_66 + (i << 3)) = ((int16_t)((((edi_4 * 0x58) + (ebp_22 * 0xb7)) - 0x87f6) >> 8));
0063b8db          edx = &edx[8];
0063b8de          void var_46;
0063b8de          *(uint16_t*)(&var_46 + (i << 3)) = ((int16_t)(((edi_4 * 0x1c6) - 0xe251) >> 8));
0063b8e7      }
0063b8e7      
0063b8ed      int32_t ebp_29 = ebp;
0063b8ff      int32_t ecx_1 = arg6[3];
0063b8ff      
0063b904      if (ebp_29 < ecx_1)
0063b904      {
0063b90a          int32_t edx_1 = arg6[2];
0063b90f          i = (ebp_29 << 4);
0063b90f          
0063ba53          do
0063ba53          {
0063b919              int32_t esi_20 = *(uint32_t*)arg6;
0063b919              
0063b91d              if (esi_20 < edx_1)
0063b91d              {
0063ba2c                  do
0063ba2c                  {
0063b964                      int32_t eax_2 = ((int32_t)*(uint16_t*)((i + arg1) + (esi_20 << 1)));
0063b97c                      int32_t ecx_8 = ((((esi_20 - 0x80000000) - 0x80000000) >> 1) + ((((ebp_29 - 0x80000000) - 0x80000000) >> 1) << 2));
0063b983                      int32_t edx_9 = (((int32_t)*(uint16_t*)(&var_8c + (ecx_8 << 1))) + eax_2);
0063b983                      
0063b98b                      if (edx_9 > 0xff)
0063b98d                          edx_9 = 0xff;
0063b98b                      else if (edx_9 < 0)
0063b9a4                          edx_9 = 0;
0063b9a4                      
0063b9b2                      *(uint8_t*)(ebx_2 + (esi_20 << 2)) = (-(edx_9) - 1);
0063b9bc                      int32_t edx_13 = (-(((int32_t)*(uint16_t*)(&var_6c + (ecx_8 << 1)))) + eax_2);
0063b9bc                      
0063b9c4                      if (edx_13 > 0xff)
0063b9c6                          edx_13 = 0xff;
0063b9c4                      else if (edx_13 < 0)
0063b9d4                          edx_13 = 0;
0063b9d4                      
0063b9de                      int32_t ecx_9 = ((int32_t)*(uint16_t*)(&var_4c + (ecx_8 << 1)));
0063b9e3                      *(uint8_t*)((ebx_2 + (esi_20 << 2)) + 1) = (-(edx_13) - 1);
0063b9e7                      int32_t eax_3 = (eax_2 + ecx_9);
0063b9e7                      
0063b9ee                      if (eax_3 > 0xff)
0063b9f0                          eax_3 = 0xff;
0063b9ee                      else if (eax_3 < 0)
0063ba04                          eax_3 = 0;
0063ba04                      
0063ba13                      *(uint8_t*)((ebx_2 + (esi_20 << 2)) + 2) = (-(eax_3) - 1);
0063ba22                      *(uint8_t*)((ebx_2 + (esi_20 << 2)) + 3) = *(uint8_t*)((arg4 + i) + (esi_20 << 1));
0063ba26                      esi_20 += 1;
0063ba27                      edx_1 = arg6[2];
0063ba2c                  } while (esi_20 < edx_1);
0063ba2c                  
0063ba43                  ecx_1 = arg6[3];
0063b91d              }
0063b91d              
0063ba46              ebx_2 += arg7;
0063ba4d              i += 0x10;
0063ba50              ebp_29 += 1;
0063ba53          } while (ebp_29 < ecx_1);
0063b904      }
0063b904      
0063ba60      return i;
0063b780  }

0063b994                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063b9cd                                         8d 76 00                                                               .v.
0063b9f7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0063ba61     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

0063ba70  char sub_63ba70(void* arg1, void* arg2, int16_t* arg3, char* arg4, char* arg5, int32_t arg6)

0063ba70  {
0063ba83      char* edi = arg4;
0063ba87      char* esi = arg5;
0063ba91      int32_t var_50 = 0;
0063ba95      int16_t* var_3c = arg3;
0063ba99      void* var_38 = arg2;
0063ba9d      void* var_14 = arg1;
0063c590      int32_t eax_82;
0063c590      bool cond:0_1;
0063c590      
0063c590      do
0063c590      {
0063baa5          int32_t ecx_1 = ((int32_t)*(uint16_t*)var_3c);
0063bab3          int32_t eax_4 = (((ecx_1 * 0x167) - 0xb2f5) >> 8);
0063bab6          int16_t* ebp_1 = var_38;
0063babe          int32_t edx_1 = ((int32_t)*(uint16_t*)ebp_1);
0063bad2          int32_t eax_7 = ((((edx_1 * 0x58) + (ecx_1 * 0xb7)) - 0x87f6) >> 8);
0063bae4          int32_t eax_10 = (((edx_1 * 0x1c6) - 0xe251) >> 8);
0063baef          int32_t edx_2 = ((int32_t)var_3c[1]);
0063bafe          int32_t eax_14 = (((edx_2 * 0x167) - 0xb2f5) >> 8);
0063bb0b          int32_t eax_15 = ((int32_t)ebp_1[1]);
0063bb19          int32_t edx_5 = ((((eax_15 * 0x58) + (edx_2 * 0xb7)) - 0x87f6) >> 8);
0063bb2b          int32_t eax_18 = (((eax_15 * 0x1c6) - 0xe251) >> 8);
0063bb36          int32_t edx_6 = ((int32_t)var_3c[2]);
0063bb45          int32_t eax_22 = (((edx_6 * 0x167) - 0xb2f5) >> 8);
0063bb4c          int32_t eax_23 = ((int32_t)ebp_1[2]);
0063bb60          int32_t ecx_6 = ((((eax_23 * 0x58) + (edx_6 * 0xb7)) - 0x87f6) >> 8);
0063bb72          int32_t eax_26 = (((eax_23 * 0x1c6) - 0xe251) >> 8);
0063bb7d          int32_t edx_8 = ((int32_t)var_3c[3]);
0063bb8c          int32_t eax_30 = (((edx_8 * 0x167) - 0xb2f5) >> 8);
0063bb99          int32_t eax_31 = ((int32_t)ebp_1[3]);
0063bba7          int32_t ebx_2 = ((((eax_31 * 0x58) + (edx_8 * 0xb7)) - 0x87f6) >> 8);
0063bbb9          int32_t eax_34 = (((eax_31 * 0x1c6) - 0xe251) >> 8);
0063bbc7          var_38 = &ebp_1[8];
0063bbcb          int32_t eax_36 = ((int32_t)*(uint16_t*)var_14);
0063bbd2          var_3c = &var_3c[8];
0063bbd7          int32_t edx_11 = (eax_4 + eax_36);
0063bbd7          
0063bbe0          if (edx_11 > 0xff)
0063bbe2              edx_11 = 0xff;
0063bbe0          else if (edx_11 < 0)
0063bbf4              edx_11 = 0;
0063bbf4          
0063bbfe          *(uint8_t*)esi = (-(edx_11) - 1);
0063bc02          int32_t edx_14 = (eax_36 - eax_7);
0063bc02          
0063bc0c          if (edx_14 > 0xff)
0063bc0e              edx_14 = 0xff;
0063bc0c          else if (edx_14 < 0)
0063bc24              edx_14 = 0;
0063bc24          
0063bc2e          esi[1] = (-(edx_14) - 1);
0063bc31          int32_t eax_37 = (eax_36 + eax_10);
0063bc31          
0063bc3a          if (eax_37 > 0xff)
0063bc3c              eax_37 = 0xff;
0063bc3a          else if (eax_37 < 0)
0063bc54              eax_37 = 0;
0063bc54          
0063bc65          esi[2] = (-(eax_37) - 1);
0063bc6a          esi[3] = *(uint8_t*)edi;
0063bc6d          int32_t eax_39 = ((int32_t)*(uint16_t*)((char*)var_14 + 2));
0063bc71          int32_t edx_16 = (eax_4 + eax_39);
0063bc71          
0063bc7a          if (edx_16 > 0xff)
0063bc7c              edx_16 = 0xff;
0063bc7a          else if (edx_16 < 0)
0063bc94              edx_16 = 0;
0063bc94          
0063bc9e          esi[4] = (-(edx_16) - 1);
0063bca3          int32_t edx_19 = (eax_39 - eax_7);
0063bca3          
0063bcad          if (edx_19 > 0xff)
0063bcaf              edx_19 = 0xff;
0063bcad          else if (edx_19 < 0)
0063bcc4              edx_19 = 0;
0063bcc4          
0063bcce          esi[5] = (-(edx_19) - 1);
0063bcd1          int32_t eax_40 = (eax_39 + eax_10);
0063bcd1          
0063bcda          if (eax_40 > 0xff)
0063bcdc              eax_40 = 0xff;
0063bcda          else if (eax_40 < 0)
0063bcf4              eax_40 = 0;
0063bcf4          
0063bd01          esi[6] = (-(eax_40) - 1);
0063bd07          esi[7] = edi[2];
0063bd0a          int32_t eax_42 = ((int32_t)*(uint16_t*)((char*)var_14 + 4));
0063bd0e          int32_t edx_21 = (eax_42 + eax_14);
0063bd0e          
0063bd17          if (edx_21 > 0xff)
0063bd19              edx_21 = 0xff;
0063bd17          else if (edx_21 < 0)
0063bd24              edx_21 = 0;
0063bd24          
0063bd2e          esi[8] = (-(edx_21) - 1);
0063bd33          int32_t edx_24 = (eax_42 - edx_5);
0063bd33          
0063bd3d          if (edx_24 > 0xff)
0063bd3f              edx_24 = 0xff;
0063bd3d          else if (edx_24 < 0)
0063bd54              edx_24 = 0;
0063bd54          
0063bd5e          esi[9] = (-(edx_24) - 1);
0063bd61          int32_t eax_43 = (eax_42 + eax_18);
0063bd61          
0063bd6a          if (eax_43 > 0xff)
0063bd6c              eax_43 = 0xff;
0063bd6a          else if (eax_43 < 0)
0063bd84              eax_43 = 0;
0063bd84          
0063bd8d          esi[0xa] = (-(eax_43) - 1);
0063bd93          esi[0xb] = edi[4];
0063bd96          int32_t eax_45 = ((int32_t)*(uint16_t*)((char*)var_14 + 6));
0063bd9a          int32_t edx_26 = (eax_45 + eax_14);
0063bd9a          
0063bda3          if (edx_26 > 0xff)
0063bda5              edx_26 = 0xff;
0063bda3          else if (edx_26 < 0)
0063bdb4              edx_26 = 0;
0063bdb4          
0063bdbe          esi[0xc] = (-(edx_26) - 1);
0063bdc3          int32_t edx_29 = (eax_45 - edx_5);
0063bdc3          
0063bdcd          if (edx_29 > 0xff)
0063bdcf              edx_29 = 0xff;
0063bdcd          else if (edx_29 < 0)
0063bde4              edx_29 = 0;
0063bde4          
0063bdee          esi[0xd] = (-(edx_29) - 1);
0063bdf1          int32_t eax_46 = (eax_45 + eax_18);
0063bdf1          
0063bdfa          if (eax_46 > 0xff)
0063bdfc              eax_46 = 0xff;
0063bdfa          else if (eax_46 < 0)
0063be14              eax_46 = 0;
0063be14          
0063be21          esi[0xe] = (-(eax_46) - 1);
0063be27          esi[0xf] = edi[6];
0063be2a          int32_t eax_48 = ((int32_t)*(uint16_t*)((char*)var_14 + 8));
0063be2e          int32_t edx_31 = (eax_48 + eax_22);
0063be2e          
0063be37          if (edx_31 > 0xff)
0063be39              edx_31 = 0xff;
0063be37          else if (edx_31 < 0)
0063be44              edx_31 = 0;
0063be44          
0063be4e          esi[0x10] = (-(edx_31) - 1);
0063be53          int32_t edx_34 = (eax_48 - ecx_6);
0063be53          
0063be5d          if (edx_34 > 0xff)
0063be5f              edx_34 = 0xff;
0063be5d          else if (edx_34 < 0)
0063be74              edx_34 = 0;
0063be74          
0063be7e          esi[0x11] = (-(edx_34) - 1);
0063be81          int32_t eax_49 = (eax_48 + eax_26);
0063be81          
0063be8a          if (eax_49 > 0xff)
0063be8c              eax_49 = 0xff;
0063be8a          else if (eax_49 < 0)
0063bea4              eax_49 = 0;
0063bea4          
0063bead          esi[0x12] = (-(eax_49) - 1);
0063beb3          esi[0x13] = edi[8];
0063beb6          int32_t eax_51 = ((int32_t)*(uint16_t*)((char*)var_14 + 0xa));
0063beba          int32_t edx_36 = (eax_51 + eax_22);
0063beba          
0063bec3          if (edx_36 > 0xff)
0063bec5              edx_36 = 0xff;
0063bec3          else if (edx_36 < 0)
0063bed4              edx_36 = 0;
0063bed4          
0063bede          esi[0x14] = (-(edx_36) - 1);
0063bee3          int32_t edx_39 = (eax_51 - ecx_6);
0063bee3          
0063beed          if (edx_39 > 0xff)
0063beef              edx_39 = 0xff;
0063beed          else if (edx_39 < 0)
0063bf04              edx_39 = 0;
0063bf04          
0063bf0e          esi[0x15] = (-(edx_39) - 1);
0063bf11          int32_t eax_52 = (eax_51 + eax_26);
0063bf11          
0063bf1a          if (eax_52 > 0xff)
0063bf1c              eax_52 = 0xff;
0063bf1a          else if (eax_52 < 0)
0063bf34              eax_52 = 0;
0063bf34          
0063bf41          esi[0x16] = (-(eax_52) - 1);
0063bf47          esi[0x17] = edi[0xa];
0063bf4a          int32_t eax_54 = ((int32_t)*(uint16_t*)((char*)var_14 + 0xc));
0063bf4e          int32_t edx_41 = (eax_54 + eax_30);
0063bf4e          
0063bf57          if (edx_41 > 0xff)
0063bf59              edx_41 = 0xff;
0063bf57          else if (edx_41 < 0)
0063bf64              edx_41 = 0;
0063bf64          
0063bf6e          esi[0x18] = (-(edx_41) - 1);
0063bf73          int32_t edx_44 = (eax_54 - ebx_2);
0063bf73          
0063bf7d          if (edx_44 > 0xff)
0063bf7f              edx_44 = 0xff;
0063bf7d          else if (edx_44 < 0)
0063bf94              edx_44 = 0;
0063bf94          
0063bf9e          esi[0x19] = (-(edx_44) - 1);
0063bfa1          int32_t eax_55 = (eax_54 + eax_34);
0063bfa1          
0063bfaa          if (eax_55 > 0xff)
0063bfac              eax_55 = 0xff;
0063bfaa          else if (eax_55 < 0)
0063bfc4              eax_55 = 0;
0063bfc4          
0063bfcd          esi[0x1a] = (-(eax_55) - 1);
0063bfd3          esi[0x1b] = edi[0xc];
0063bfd6          int32_t eax_57 = ((int32_t)*(uint16_t*)((char*)var_14 + 0xe));
0063bfda          int32_t edx_46 = (eax_57 + eax_30);
0063bfda          
0063bfe3          if (edx_46 > 0xff)
0063bfe5              edx_46 = 0xff;
0063bfe3          else if (edx_46 < 0)
0063bff4              edx_46 = 0;
0063bff4          
0063bffe          esi[0x1c] = (-(edx_46) - 1);
0063c003          int32_t edx_49 = (eax_57 - ebx_2);
0063c003          
0063c00d          if (edx_49 > 0xff)
0063c00f              edx_49 = 0xff;
0063c00d          else if (edx_49 < 0)
0063c024              edx_49 = 0;
0063c024          
0063c02e          esi[0x1d] = (-(edx_49) - 1);
0063c031          int32_t eax_58 = (eax_57 + eax_34);
0063c031          
0063c03a          if (eax_58 > 0xff)
0063c03c              eax_58 = 0xff;
0063c03a          else if (eax_58 < 0)
0063c054              eax_58 = 0;
0063c054          
0063c061          esi[0x1e] = (-(eax_58) - 1);
0063c067          esi[0x1f] = edi[0xe];
0063c06a          int32_t eax_60 = ((int32_t)*(uint16_t*)((char*)var_14 + 0x10));
0063c06e          int32_t edx_51 = (eax_4 + eax_60);
0063c071          void* esi_1 = &esi[arg6];
0063c071          
0063c07b          if (edx_51 > 0xff)
0063c07d              edx_51 = 0xff;
0063c07b          else if (edx_51 < 0)
0063c094              edx_51 = 0;
0063c094          
0063c09e          *(uint8_t*)esi_1 = (-(edx_51) - 1);
0063c0a2          int32_t edx_54 = (eax_60 - eax_7);
0063c0a2          
0063c0ac          if (edx_54 > 0xff)
0063c0ae              edx_54 = 0xff;
0063c0ac          else if (edx_54 < 0)
0063c0c4              edx_54 = 0;
0063c0c4          
0063c0ce          *(uint8_t*)((char*)esi_1 + 1) = (-(edx_54) - 1);
0063c0d1          int32_t eax_61 = (eax_60 + eax_10);
0063c0d1          
0063c0da          if (eax_61 > 0xff)
0063c0dc              eax_61 = 0xff;
0063c0da          else if (eax_61 < 0)
0063c0f4              eax_61 = 0;
0063c0f4          
0063c0fd          *(uint8_t*)((char*)esi_1 + 2) = (-(eax_61) - 1);
0063c103          *(uint8_t*)((char*)esi_1 + 3) = edi[0x10];
0063c106          int32_t eax_63 = ((int32_t)*(uint16_t*)((char*)var_14 + 0x12));
0063c10a          int32_t ecx_13 = (eax_4 + eax_63);
0063c10c          int32_t var_18_2 = ecx_13;
0063c116          int32_t edx_56;
0063c116          
0063c116          if (ecx_13 <= 0xff)
0063c116          {
0063c130              edx_56 = ecx_13;
0063c130              
0063c134              if (edx_56 < 0)
0063c134              {
0063c136                  edx_56 = 0;
0063c138                  int32_t var_18_4 = 0;
0063c134              }
0063c116          }
0063c116          else
0063c116          {
0063c118              edx_56 = 0xff;
0063c11d              int32_t var_18_3 = 0xff;
0063c116          }
0063c116          
0063c148          *(uint8_t*)((char*)esi_1 + 4) = (-(edx_56) - 1);
0063c14d          int32_t ebx_5 = (-(eax_7) + eax_63);
0063c14f          int32_t var_20_2 = ebx_5;
0063c159          int32_t edx_57;
0063c159          
0063c159          if (ebx_5 <= 0xff)
0063c159          {
0063c170              edx_57 = ebx_5;
0063c170              
0063c174              if (edx_57 < 0)
0063c174              {
0063c176                  edx_57 = 0;
0063c178                  int32_t var_20_4 = 0;
0063c174              }
0063c159          }
0063c159          else
0063c159          {
0063c15b              edx_57 = 0xff;
0063c160              int32_t var_20_3 = 0xff;
0063c159          }
0063c159          
0063c184          *(uint8_t*)((char*)esi_1 + 5) = (-(edx_57) - 1);
0063c187          int32_t eax_64 = (eax_63 + eax_10);
0063c187          
0063c190          if (eax_64 > 0xff)
0063c192              eax_64 = 0xff;
0063c190          else if (eax_64 < 0)
0063c1a4              eax_64 = 0;
0063c1a4          
0063c1b1          *(uint8_t*)((char*)esi_1 + 6) = (-(eax_64) - 1);
0063c1b4          edx_57 = edi[0x12];
0063c1b7          *(uint8_t*)((char*)esi_1 + 7) = edx_57;
0063c1ba          int32_t eax_66 = ((int32_t)*(uint16_t*)((char*)var_14 + 0x14));
0063c1be          int32_t edx_58 = (eax_66 + eax_14);
0063c1be          
0063c1c7          if (edx_58 > 0xff)
0063c1c9              edx_58 = 0xff;
0063c1c7          else if (edx_58 < 0)
0063c1d4              edx_58 = 0;
0063c1d4          
0063c1de          *(uint8_t*)((char*)esi_1 + 8) = (-(edx_58) - 1);
0063c1e3          int32_t edx_61 = (eax_66 - edx_5);
0063c1e3          
0063c1ed          if (edx_61 > 0xff)
0063c1ef              edx_61 = 0xff;
0063c1ed          else if (edx_61 < 0)
0063c204              edx_61 = 0;
0063c204          
0063c20e          *(uint8_t*)((char*)esi_1 + 9) = (-(edx_61) - 1);
0063c211          int32_t eax_67 = (eax_66 + eax_18);
0063c211          
0063c21a          if (eax_67 > 0xff)
0063c21c              eax_67 = 0xff;
0063c21a          else if (eax_67 < 0)
0063c234              eax_67 = 0;
0063c234          
0063c23d          *(uint8_t*)((char*)esi_1 + 0xa) = (-(eax_67) - 1);
0063c243          *(uint8_t*)((char*)esi_1 + 0xb) = edi[0x14];
0063c246          int32_t eax_69 = ((int32_t)*(uint16_t*)((char*)var_14 + 0x16));
0063c24a          int32_t ecx_17 = (eax_14 + eax_69);
0063c24c          int32_t var_1c_2 = ecx_17;
0063c256          int32_t edx_63;
0063c256          
0063c256          if (ecx_17 <= 0xff)
0063c256          {
0063c270              edx_63 = ecx_17;
0063c270              
0063c274              if (edx_63 < 0)
0063c274              {
0063c276                  edx_63 = 0;
0063c278                  int32_t var_1c_4 = 0;
0063c274              }
0063c256          }
0063c256          else
0063c256          {
0063c258              edx_63 = 0xff;
0063c25d              int32_t var_1c_3 = 0xff;
0063c256          }
0063c256          
0063c288          *(uint8_t*)((char*)esi_1 + 0xc) = (-(edx_63) - 1);
0063c28d          int32_t ebx_8 = (-(edx_5) + eax_69);
0063c28f          int32_t var_28_2 = ebx_8;
0063c299          int32_t edx_64;
0063c299          
0063c299          if (ebx_8 <= 0xff)
0063c299          {
0063c2b0              edx_64 = ebx_8;
0063c2b0              
0063c2b4              if (edx_64 < 0)
0063c2b4              {
0063c2b6                  edx_64 = 0;
0063c2b8                  int32_t var_28_4 = 0;
0063c2b4              }
0063c299          }
0063c299          else
0063c299          {
0063c29b              edx_64 = 0xff;
0063c2a0              int32_t var_28_3 = 0xff;
0063c299          }
0063c299          
0063c2c4          *(uint8_t*)((char*)esi_1 + 0xd) = (-(edx_64) - 1);
0063c2c7          int32_t eax_70 = (eax_69 + eax_18);
0063c2c7          
0063c2d0          if (eax_70 > 0xff)
0063c2d2              eax_70 = 0xff;
0063c2d0          else if (eax_70 < 0)
0063c2e4              eax_70 = 0;
0063c2e4          
0063c2f1          *(uint8_t*)((char*)esi_1 + 0xe) = (-(eax_70) - 1);
0063c2f4          edx_64 = edi[0x16];
0063c2f7          *(uint8_t*)((char*)esi_1 + 0xf) = edx_64;
0063c2fa          int32_t eax_72 = ((int32_t)*(uint16_t*)((char*)var_14 + 0x18));
0063c2fe          int32_t edx_65 = (eax_72 + eax_22);
0063c2fe          
0063c307          if (edx_65 > 0xff)
0063c309              edx_65 = 0xff;
0063c307          else if (edx_65 < 0)
0063c314              edx_65 = 0;
0063c314          
0063c31e          *(uint8_t*)((char*)esi_1 + 0x10) = (-(edx_65) - 1);
0063c323          int32_t edx_68 = (eax_72 - ecx_6);
0063c323          
0063c32d          if (edx_68 > 0xff)
0063c32f              edx_68 = 0xff;
0063c32d          else if (edx_68 < 0)
0063c344              edx_68 = 0;
0063c344          
0063c34e          *(uint8_t*)((char*)esi_1 + 0x11) = (-(edx_68) - 1);
0063c351          int32_t eax_73 = (eax_72 + eax_26);
0063c351          
0063c35a          if (eax_73 > 0xff)
0063c35c              eax_73 = 0xff;
0063c35a          else if (eax_73 < 0)
0063c374              eax_73 = 0;
0063c374          
0063c37d          *(uint8_t*)((char*)esi_1 + 0x12) = (-(eax_73) - 1);
0063c383          *(uint8_t*)((char*)esi_1 + 0x13) = edi[0x18];
0063c386          int32_t eax_75 = ((int32_t)*(uint16_t*)((char*)var_14 + 0x1a));
0063c38a          int32_t ecx_21 = (eax_22 + eax_75);
0063c38c          int32_t var_24_2 = ecx_21;
0063c396          int32_t edx_70;
0063c396          
0063c396          if (ecx_21 <= 0xff)
0063c396          {
0063c3b0              edx_70 = ecx_21;
0063c3b0              
0063c3b4              if (edx_70 < 0)
0063c3b4              {
0063c3b6                  edx_70 = 0;
0063c3b8                  int32_t var_24_4 = 0;
0063c3b4              }
0063c396          }
0063c396          else
0063c396          {
0063c398              edx_70 = 0xff;
0063c39d              int32_t var_24_3 = 0xff;
0063c396          }
0063c396          
0063c3c8          *(uint8_t*)((char*)esi_1 + 0x14) = (-(edx_70) - 1);
0063c3cd          int32_t ebx_11 = (-(ecx_6) + eax_75);
0063c3cf          int32_t var_30_2 = ebx_11;
0063c3d9          int32_t edx_71;
0063c3d9          
0063c3d9          if (ebx_11 <= 0xff)
0063c3d9          {
0063c3f0              edx_71 = ebx_11;
0063c3f0              
0063c3f4              if (edx_71 < 0)
0063c3f4              {
0063c3f6                  edx_71 = 0;
0063c3f8                  int32_t var_30_4 = 0;
0063c3f4              }
0063c3d9          }
0063c3d9          else
0063c3d9          {
0063c3db              edx_71 = 0xff;
0063c3e0              int32_t var_30_3 = 0xff;
0063c3d9          }
0063c3d9          
0063c404          *(uint8_t*)((char*)esi_1 + 0x15) = (-(edx_71) - 1);
0063c407          int32_t eax_76 = (eax_75 + eax_26);
0063c407          
0063c410          if (eax_76 > 0xff)
0063c412              eax_76 = 0xff;
0063c410          else if (eax_76 < 0)
0063c424              eax_76 = 0;
0063c424          
0063c431          *(uint8_t*)((char*)esi_1 + 0x16) = (-(eax_76) - 1);
0063c434          edx_71 = edi[0x1a];
0063c437          *(uint8_t*)((char*)esi_1 + 0x17) = edx_71;
0063c43a          int32_t eax_78 = ((int32_t)*(uint16_t*)((char*)var_14 + 0x1c));
0063c43e          int32_t edx_72 = (eax_78 + eax_30);
0063c43e          
0063c447          if (edx_72 > 0xff)
0063c449              edx_72 = 0xff;
0063c447          else if (edx_72 < 0)
0063c454              edx_72 = 0;
0063c454          
0063c45e          *(uint8_t*)((char*)esi_1 + 0x18) = (-(edx_72) - 1);
0063c463          int32_t edx_75 = (eax_78 - ebx_2);
0063c463          
0063c46d          if (edx_75 > 0xff)
0063c46f              edx_75 = 0xff;
0063c46d          else if (edx_75 < 0)
0063c484              edx_75 = 0;
0063c484          
0063c48e          *(uint8_t*)((char*)esi_1 + 0x19) = (-(edx_75) - 1);
0063c491          int32_t eax_79 = (eax_78 + eax_34);
0063c491          
0063c49a          if (eax_79 > 0xff)
0063c49c              eax_79 = 0xff;
0063c49a          else if (eax_79 < 0)
0063c4b4              eax_79 = 0;
0063c4b4          
0063c4bd          *(uint8_t*)((char*)esi_1 + 0x1a) = (-(eax_79) - 1);
0063c4c3          *(uint8_t*)((char*)esi_1 + 0x1b) = edi[0x1c];
0063c4c6          int32_t eax_81 = ((int32_t)*(uint16_t*)((char*)var_14 + 0x1e));
0063c4ca          int32_t ecx_25 = (eax_30 + eax_81);
0063c4cc          int32_t var_2c_2 = ecx_25;
0063c4d6          int32_t edx_77;
0063c4d6          
0063c4d6          if (ecx_25 <= 0xff)
0063c4d6          {
0063c4f0              edx_77 = ecx_25;
0063c4f0              
0063c4f4              if (edx_77 < 0)
0063c4f4              {
0063c4f6                  edx_77 = 0;
0063c4f8                  int32_t var_2c_4 = 0;
0063c4f4              }
0063c4d6          }
0063c4d6          else
0063c4d6          {
0063c4d8              edx_77 = 0xff;
0063c4dd              int32_t var_2c_3 = 0xff;
0063c4d6          }
0063c4d6          
0063c508          *(uint8_t*)((char*)esi_1 + 0x1c) = (-(edx_77) - 1);
0063c50d          int32_t ebx_14 = (-(ebx_2) + eax_81);
0063c50f          int32_t var_34_2 = ebx_14;
0063c519          int32_t edx_78;
0063c519          
0063c519          if (ebx_14 <= 0xff)
0063c519          {
0063c530              edx_78 = ebx_14;
0063c530              
0063c534              if (edx_78 < 0)
0063c534              {
0063c536                  edx_78 = 0;
0063c538                  int32_t var_34_4 = 0;
0063c534              }
0063c519          }
0063c519          else
0063c519          {
0063c51b              edx_78 = 0xff;
0063c520              int32_t var_34_3 = 0xff;
0063c519          }
0063c519          
0063c544          *(uint8_t*)((char*)esi_1 + 0x1d) = (-(edx_78) - 1);
0063c547          eax_82 = (eax_81 + eax_34);
0063c547          
0063c550          if (eax_82 > 0xff)
0063c552              eax_82 = 0xff;
0063c550          else if (eax_82 < 0)
0063c564              eax_82 = 0;
0063c564          
0063c574          *(uint8_t*)((char*)esi_1 + 0x1e) = (-(eax_82) - 1);
0063c577          edx_78 = edi[0x1e];
0063c57a          edi = &edi[0x20];
0063c57d          *(uint8_t*)((char*)esi_1 + 0x1f) = edx_78;
0063c580          esi = ((char*)esi_1 + arg6);
0063c584          var_14 += 0x20;
0063c589          cond:0_1 = (var_50 + 2) < 8;
0063c58c          var_50 += 2;
0063c590      } while (cond:0_1);
0063c59d      return (-(eax_82) - 1);
0063ba70  }

0063bbe9                             8d b4 26 00 00 00 00                                                           ..&....
0063bc15                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
0063bc43           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063bc83           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063bcb6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063bce3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063bd46                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063bd73                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063bdac                                      8d 74 26 00                                                              .t&.
0063bdd6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063be03           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063be66                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063be93                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063becc                                      8d 74 26 00                                                              .t&.
0063bef6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063bf23           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063bf86                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063bfb3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063bfec                                      8d 74 26 00                                                              .t&.
0063c016                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063c043           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c084              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............
0063c0b5                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
0063c0e3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c123           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c166                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063c199                                                                             8d b4 26 00 00 00 00                           ..&....
0063c1f6                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063c223           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c263           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c2a6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063c2d9                                                                             8d b4 26 00 00 00 00                           ..&....
0063c336                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063c363           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c3a3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c3e6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063c419                                                                             8d b4 26 00 00 00 00                           ..&....
0063c476                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0063c4a3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c4e3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063c526                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063c559                                                                             8d b4 26 00 00 00 00                           ..&....
0063c59e                                                                                            8b f6                                ..

0063c5a0  int32_t _YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_PX(void* arg1, void* arg2, int16_t* arg3, char* arg4, char* arg5, int32_t arg6)

0063c5a0  {
0063c5d6      sub_63ba70(arg1, arg2, arg3, arg4, arg5, arg6);
0063c60f      sub_63ba70(((char*)arg1 + 0x80), ((char*)arg2 + 8), &arg3[4], &arg4[0x80], &arg5[0x20], arg6);
0063c614      void* edi_1 = &arg5[(arg6 << 3)];
0063c648      sub_63ba70(((char*)arg1 + 0x100), ((char*)arg2 + 0x40), &arg3[0x20], &arg4[0x100], edi_1, arg6);
0063c68d      return sub_63ba70(((char*)arg1 + 0x180), ((char*)arg2 + 0x48), &arg3[0x24], &arg4[0x180], ((char*)edi_1 + 0x20), arg6);
0063c5a0  }

0063c68e                                            8b f6                                                                ..

0063c690  int32_t _YCbCrA_FPX_4114_to_RGBA_FPX_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063c690  {
0063c6af      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063c6b8      void* ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063c6be      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063c6c4      int32_t var_b4 = data_9079f8;
0063c6ce      int32_t var_b0 = data_9079fc;
0063c6d8      int32_t var_ac = data_907a00;
0063c6e2      int32_t var_a8 = data_907a04;
0063c733      void var_a4;
0063c733      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 0x10, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_a4);
0063c733      
0063c73a      if (eax_6 != 0)
0063c746          return eax_6;
0063c746      
0063c747      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063c747      
0063c766      if (((uint32_t)operator==(&var_a4, &var_b4)) != 0)
0063c7a1          return *(uint32_t*)(ebx + 0xe8)(ebp, ((char*)ebp + 0x200), ((char*)ebp + 0x280), ((char*)ebp + 0x300), edi_1, esi);
0063c7a1      
0063c7b1      int32_t var_dc_1 = 0x907938;
0063c7b9      int32_t var_94;
0063c7b9      operator&(&var_94, &var_a4);
0063c7ca      int32_t var_84 = var_94;
0063c7d6      int32_t var_90;
0063c7d6      int32_t var_80 = var_90;
0063c7da      int32_t var_8c;
0063c7da      int32_t var_7c = var_8c;
0063c7de      int32_t var_88;
0063c7de      int32_t var_78 = var_88;
0063c7de      
0063c7f7      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
0063c82a          sub_63b780(ebp, ((char*)ebp + 0x200), ((char*)ebp + 0x280), ((char*)ebp + 0x300), edi_1, &var_84, esi);
0063c82a      
0063c83e      int32_t var_dc_3 = 0x907928;
0063c846      void var_74;
0063c846      operator&(&var_74, &var_a4);
0063c85d      int32_t var_dc_4 = 0x907920;
0063c865      int32_t var_64;
0063c865      operator-(&var_64, &var_74);
0063c87f      var_84 = var_64;
0063c88e      int32_t var_60;
0063c88e      int32_t var_80_1 = var_60;
0063c892      int32_t var_5c;
0063c892      int32_t var_7c_1 = var_5c;
0063c896      int32_t var_58;
0063c896      int32_t var_78_1 = var_58;
0063c896      
0063c8af      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
0063c8eb          sub_63b780(((char*)ebp + 0x80), ((char*)ebp + 0x208), ((char*)ebp + 0x288), ((char*)ebp + 0x380), (edi_1 + 0x20), &var_84, esi);
0063c8eb      
0063c902      int32_t var_dc_6 = 0x907910;
0063c90a      void var_54;
0063c90a      operator&(&var_54, &var_a4);
0063c924      int32_t var_dc_7 = 0x907908;
0063c92c      int32_t var_44;
0063c92c      operator-(&var_44, &var_54);
0063c946      var_84 = var_44;
0063c955      int32_t var_40;
0063c955      int32_t var_80_2 = var_40;
0063c959      int32_t var_3c;
0063c959      int32_t var_7c_2 = var_3c;
0063c95d      int32_t var_38;
0063c95d      int32_t var_78_2 = var_38;
0063c95d      
0063c976      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
0063c9b2          sub_63b780(((char*)ebp + 0x100), ((char*)ebp + 0x240), ((char*)ebp + 0x2c0), ((char*)ebp + 0x400), (edi_1 + (esi << 3)), &var_84, esi);
0063c9b2      
0063c9c9      int32_t var_dc_9 = 0x9078f8;
0063c9d1      void var_34;
0063c9d1      operator&(&var_34, &var_a4);
0063c9eb      int32_t var_dc_10 = 0x9078f0;
0063c9f3      int32_t var_24;
0063c9f3      operator-(&var_24, &var_34);
0063ca0d      var_84 = var_24;
0063ca1c      int32_t var_20;
0063ca1c      int32_t var_80_3 = var_20;
0063ca20      int32_t var_1c;
0063ca20      int32_t var_7c_3 = var_1c;
0063ca24      int32_t var_18;
0063ca24      int32_t var_78_3 = var_18;
0063ca38      int32_t eax_27 = ((uint32_t)operator!=(&var_84, &data_9078e0));
0063ca38      
0063ca3d      if (eax_27 == 0)
0063ca89          return eax_27;
0063ca89      
0063ca7a      return sub_63b780(((char*)ebp + 0x180), ((char*)ebp + 0x248), ((char*)ebp + 0x2c8), ((char*)ebp + 0x480), ((edi_1 + (esi << 3)) + 0x20), &var_84, esi);
0063c690  }

0063ca8a                                8d b6 00 00 00 00                                                            ......

0063ca90  void sub_63ca90(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

0063ca90  {
0063ca97      int32_t* edi = arg5;
0063ca9f      int32_t esi = edi[1];
0063caa7      int32_t edx = edi[3];
0063caaa      int32_t ebp_2 = ((esi * arg6) + arg4);
0063caaa      
0063cab0      if (esi < edx)
0063cab0      {
0063cab6          int32_t eax = edi[2];
0063cabe          int32_t ebx_3 = (esi * 8);
0063cabe          
0063cb2c          do
0063cb2c          {
0063cac0              int32_t ecx_1 = *(uint32_t*)edi;
0063cac0              
0063cac4              if (ecx_1 < eax)
0063cac4              {
0063cac6                  int32_t edx_1 = (ecx_1 + ebx_3);
0063cacd                  int32_t var_18_1 = ebp_2;
0063cacd                  
0063cb11                  do
0063cb11                  {
0063cae4                      eax = *(uint8_t*)(arg1 + (edx_1 << 1));
0063cae7                      ebp_2 = var_18_1;
0063caeb                      *(uint8_t*)(ebp_2 + (ecx_1 << 2)) = eax;
0063caf3                      eax = *(uint8_t*)(arg2 + (edx_1 << 1));
0063caf6                      *(uint8_t*)((ebp_2 + (ecx_1 << 2)) + 1) = eax;
0063cafa                      eax = *(uint8_t*)(arg3 + (edx_1 << 1));
0063cafd                      edx_1 += 1;
0063cafe                      *(uint8_t*)((ebp_2 + (ecx_1 << 2)) + 2) = eax;
0063cb06                      *(uint8_t*)((ebp_2 + (ecx_1 << 2)) + 3) = 0xff;
0063cb0b                      ecx_1 += 1;
0063cb0c                      eax = arg5[2];
0063cb11                  } while (ecx_1 < eax);
0063cb11                  
0063cb1b                  edi = arg5;
0063cb1f                  edx = edi[3];
0063cac4              }
0063cac4              
0063cb22              ebp_2 += arg6;
0063cb26              ebx_3 += 8;
0063cb29              esi += 1;
0063cb2c          } while (esi < edx);
0063cab0      }
0063ca90  }

0063cb36                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

0063cb40  int32_t _OTHER_111_to_OTHER4_Full_MCU_PX(int32_t arg1, int32_t arg2, int32_t arg3, void* arg4, int32_t arg5)

0063cb40  {
0063cb5a      int32_t i = 0;
0063cb5c      void* var_10 = arg4;
0063cb5c      
0063cc96      do
0063cc96      {
0063cb63          char* esi_1 = var_10;
0063cb6b          *(uint8_t*)esi_1 = *(uint8_t*)(arg1 + (i << 1));
0063cb74          esi_1[1] = *(uint8_t*)(arg2 + (i << 1));
0063cb77          int32_t ecx_1;
0063cb77          ecx_1 = *(uint8_t*)(arg3 + (i << 1));
0063cb7a          esi_1[2] = ecx_1;
0063cb82          esi_1[3] = 0xff;
0063cb89          esi_1[4] = *(uint8_t*)((arg1 + (i << 1)) + 2);
0063cb90          int32_t ecx_3;
0063cb90          ecx_3 = *(uint8_t*)((arg2 + (i << 1)) + 2);
0063cb94          esi_1[5] = ecx_3;
0063cb9b          int32_t ecx_4;
0063cb9b          ecx_4 = *(uint8_t*)((arg3 + (i << 1)) + 2);
0063cb9f          esi_1[6] = ecx_4;
0063cba7          esi_1[7] = 0xff;
0063cbae          esi_1[8] = *(uint8_t*)((arg1 + (i << 1)) + 4);
0063cbb5          int32_t ecx_6;
0063cbb5          ecx_6 = *(uint8_t*)((arg2 + (i << 1)) + 4);
0063cbb9          esi_1[9] = ecx_6;
0063cbc0          int32_t ecx_7;
0063cbc0          ecx_7 = *(uint8_t*)((arg3 + (i << 1)) + 4);
0063cbc4          esi_1[0xa] = ecx_7;
0063cbcc          esi_1[0xb] = 0xff;
0063cbd3          esi_1[0xc] = *(uint8_t*)((arg1 + (i << 1)) + 6);
0063cbda          int32_t ecx_9;
0063cbda          ecx_9 = *(uint8_t*)((arg2 + (i << 1)) + 6);
0063cbde          esi_1[0xd] = ecx_9;
0063cbe5          int32_t ecx_10;
0063cbe5          ecx_10 = *(uint8_t*)((arg3 + (i << 1)) + 6);
0063cbe9          esi_1[0xe] = ecx_10;
0063cbf1          esi_1[0xf] = 0xff;
0063cbf8          esi_1[0x10] = *(uint8_t*)((arg1 + (i << 1)) + 8);
0063cbff          int32_t ecx_12;
0063cbff          ecx_12 = *(uint8_t*)((arg2 + (i << 1)) + 8);
0063cc03          esi_1[0x11] = ecx_12;
0063cc0a          int32_t ecx_13;
0063cc0a          ecx_13 = *(uint8_t*)((arg3 + (i << 1)) + 8);
0063cc0e          esi_1[0x12] = ecx_13;
0063cc16          esi_1[0x13] = 0xff;
0063cc1d          esi_1[0x14] = *(uint8_t*)((arg1 + (i << 1)) + 0xa);
0063cc24          int32_t ecx_15;
0063cc24          ecx_15 = *(uint8_t*)((arg2 + (i << 1)) + 0xa);
0063cc28          esi_1[0x15] = ecx_15;
0063cc2f          int32_t ecx_16;
0063cc2f          ecx_16 = *(uint8_t*)((arg3 + (i << 1)) + 0xa);
0063cc33          esi_1[0x16] = ecx_16;
0063cc3b          esi_1[0x17] = 0xff;
0063cc42          esi_1[0x18] = *(uint8_t*)((arg1 + (i << 1)) + 0xc);
0063cc49          int32_t ecx_18;
0063cc49          ecx_18 = *(uint8_t*)((arg2 + (i << 1)) + 0xc);
0063cc4d          esi_1[0x19] = ecx_18;
0063cc54          int32_t ecx_19;
0063cc54          ecx_19 = *(uint8_t*)((arg3 + (i << 1)) + 0xc);
0063cc58          esi_1[0x1a] = ecx_19;
0063cc60          esi_1[0x1b] = 0xff;
0063cc67          esi_1[0x1c] = *(uint8_t*)((arg1 + (i << 1)) + 0xe);
0063cc6e          int32_t ecx_21;
0063cc6e          ecx_21 = *(uint8_t*)((arg2 + (i << 1)) + 0xe);
0063cc72          esi_1[0x1d] = ecx_21;
0063cc79          int32_t ecx_22;
0063cc79          ecx_22 = *(uint8_t*)((arg3 + (i << 1)) + 0xe);
0063cc7d          esi_1[0x1e] = ecx_22;
0063cc85          i += 8;
0063cc88          esi_1[0x1f] = 0xff;
0063cc8f          var_10 = &esi_1[arg5];
0063cc96      } while (i < 0x40);
0063cc96      
0063cca2      return i;
0063cb40  }

0063cca3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

0063ccb0  uint32_t _OTHER_111_to_OTHER4_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063ccb0  {
0063cccc      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063ccd5      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063ccdb      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063cce1      int32_t var_54 = data_907a08;
0063cceb      int32_t var_50 = data_907a0c;
0063ccf5      int32_t var_4c = data_907a10;
0063ccff      int32_t var_48 = data_907a14;
0063cd50      void var_44;
0063cd50      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_44);
0063cd50      
0063cd57      if (eax_6 != 0)
0063cd60          return eax_6;
0063cd60      
0063cd61      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063cd61      
0063cd80      if (((uint32_t)operator==(&var_44, &var_54)) != 0)
0063cdae          return *(uint32_t*)(ebx + 0xd8)(ebp, (ebp + 0x80), (ebp + 0x100), edi_1, esi);
0063cdae      
0063cdbe      int32_t var_7c_1 = 0x907938;
0063cdc6      int32_t var_34;
0063cdc6      operator&(&var_34, &var_44);
0063cdd7      int32_t var_24 = var_34;
0063cde3      int32_t var_30;
0063cde3      int32_t var_20 = var_30;
0063cde7      int32_t var_2c;
0063cde7      int32_t var_1c = var_2c;
0063cdeb      int32_t var_28;
0063cdeb      int32_t var_18 = var_28;
0063cdff      uint32_t eax_13 = ((uint32_t)operator!=(&var_24, &data_9078e0));
0063cdff      
0063ce04      if (eax_13 == 0)
0063ce39          return eax_13;
0063ce39      
0063ce2d      return sub_63ca90(ebp, (ebp + 0x80), (ebp + 0x100), edi_1, &var_24, esi);
0063ccb0  }

0063ce3a                                                                                8d b6 00 00 00 00                            ......

0063ce40  void sub_63ce40(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t* arg6, int32_t arg7)

0063ce40  {
0063ce47      int32_t* ebp = arg6;
0063ce4f      int32_t ebx = ebp[1];
0063ce57      int32_t esi = ebp[3];
0063ce5a      int32_t ecx_2 = ((ebx * arg7) + arg5);
0063ce5a      
0063ce60      if (ebx < esi)
0063ce60      {
0063ce66          int32_t edx_1 = ebp[2];
0063ce6e          int32_t eax = (ebx * 8);
0063ce6e          
0063cee8          do
0063cee8          {
0063ce70              int32_t edi_1 = *(uint32_t*)ebp;
0063ce70              
0063ce75              if (edi_1 < edx_1)
0063ce75              {
0063ce82                  int32_t var_20_1 = ebx;
0063ce86                  int32_t esi_2 = (edi_1 + eax);
0063ce89                  int32_t edi_2 = edi_1;
0063ce89                  
0063cecb                  do
0063cecb                  {
0063ce94                      edx_1 = *(uint8_t*)(arg1 + (esi_2 << 1));
0063ce9b                      *(uint8_t*)(ecx_2 + (edi_2 << 2)) = edx_1;
0063cea3                      ebx = *(uint8_t*)(arg2 + (esi_2 << 1));
0063cea6                      *(uint8_t*)((ecx_2 + (edi_2 << 2)) + 1) = ebx;
0063ceae                      int32_t eax_4;
0063ceae                      eax_4 = *(uint8_t*)(arg3 + (esi_2 << 1));
0063ceb1                      *(uint8_t*)((ecx_2 + (edi_2 << 2)) + 2) = eax_4;
0063ceb9                      int32_t eax_5;
0063ceb9                      eax_5 = *(uint8_t*)(arg4 + (esi_2 << 1));
0063cebc                      *(uint8_t*)((ecx_2 + (edi_2 << 2)) + 3) = eax_5;
0063cec0                      esi_2 += 1;
0063cec1                      edi_2 += 1;
0063cec6                      edx_1 = arg6[2];
0063cecb                  } while (edi_2 < edx_1);
0063cecb                  
0063ced3                  ebx = var_20_1;
0063ced7                  ebp = arg6;
0063cedb                  esi = ebp[3];
0063ce75              }
0063ce75              
0063cede              ecx_2 += arg7;
0063cee2              eax += 8;
0063cee5              ebx += 1;
0063cee8          } while (ebx < esi);
0063ce60      }
0063ce40  }

0063cef2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....

0063cf00  int32_t _OTHER_1111_to_OTHER_Full_MCU_PX(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, void* arg5, int32_t arg6)

0063cf00  {
0063cf1f      int32_t i = 0;
0063cf21      void* var_18 = arg5;
0063cf21      
0063d07e      do
0063d07e      {
0063cf34          int32_t ecx;
0063cf34          ecx = *(uint8_t*)(arg1 + (i << 1));
0063cf37          char* ebp_1 = var_18;
0063cf3b          *(uint8_t*)ebp_1 = ecx;
0063cf45          ebp_1[1] = *(uint8_t*)(arg2 + (i << 1));
0063cf4c          int32_t ecx_1;
0063cf4c          ecx_1 = *(uint8_t*)(arg3 + (i << 1));
0063cf4f          ebp_1[2] = ecx_1;
0063cf52          ecx_1 = *(uint8_t*)(arg4 + (i << 1));
0063cf55          ebp_1[3] = ecx_1;
0063cf5c          int32_t ecx_2;
0063cf5c          ecx_2 = *(uint8_t*)((arg1 + (i << 1)) + 2);
0063cf60          ebp_1[4] = ecx_2;
0063cf67          int32_t ecx_3;
0063cf67          ecx_3 = *(uint8_t*)((arg2 + (i << 1)) + 2);
0063cf6b          ebp_1[5] = ecx_3;
0063cf72          int32_t ecx_4;
0063cf72          ecx_4 = *(uint8_t*)((arg3 + (i << 1)) + 2);
0063cf76          ebp_1[6] = ecx_4;
0063cf79          ecx_4 = *(uint8_t*)((arg4 + (i << 1)) + 2);
0063cf7d          ebp_1[7] = ecx_4;
0063cf84          int32_t ecx_5;
0063cf84          ecx_5 = *(uint8_t*)((arg1 + (i << 1)) + 4);
0063cf88          ebp_1[8] = ecx_5;
0063cf8f          int32_t ecx_6;
0063cf8f          ecx_6 = *(uint8_t*)((arg2 + (i << 1)) + 4);
0063cf93          ebp_1[9] = ecx_6;
0063cf9a          int32_t ecx_7;
0063cf9a          ecx_7 = *(uint8_t*)((arg3 + (i << 1)) + 4);
0063cf9e          ebp_1[0xa] = ecx_7;
0063cfa1          ecx_7 = *(uint8_t*)((arg4 + (i << 1)) + 4);
0063cfa5          ebp_1[0xb] = ecx_7;
0063cfac          int32_t ecx_8;
0063cfac          ecx_8 = *(uint8_t*)((arg1 + (i << 1)) + 6);
0063cfb0          ebp_1[0xc] = ecx_8;
0063cfb7          int32_t ecx_9;
0063cfb7          ecx_9 = *(uint8_t*)((arg2 + (i << 1)) + 6);
0063cfbb          ebp_1[0xd] = ecx_9;
0063cfc2          int32_t ecx_10;
0063cfc2          ecx_10 = *(uint8_t*)((arg3 + (i << 1)) + 6);
0063cfc6          ebp_1[0xe] = ecx_10;
0063cfc9          ecx_10 = *(uint8_t*)((arg4 + (i << 1)) + 6);
0063cfcd          ebp_1[0xf] = ecx_10;
0063cfd4          int32_t ecx_11;
0063cfd4          ecx_11 = *(uint8_t*)((arg1 + (i << 1)) + 8);
0063cfd8          ebp_1[0x10] = ecx_11;
0063cfdf          int32_t ecx_12;
0063cfdf          ecx_12 = *(uint8_t*)((arg2 + (i << 1)) + 8);
0063cfe3          ebp_1[0x11] = ecx_12;
0063cfea          int32_t ecx_13;
0063cfea          ecx_13 = *(uint8_t*)((arg3 + (i << 1)) + 8);
0063cfee          ebp_1[0x12] = ecx_13;
0063cff1          ecx_13 = *(uint8_t*)((arg4 + (i << 1)) + 8);
0063cff5          ebp_1[0x13] = ecx_13;
0063cffc          int32_t ecx_14;
0063cffc          ecx_14 = *(uint8_t*)((arg1 + (i << 1)) + 0xa);
0063d000          ebp_1[0x14] = ecx_14;
0063d007          int32_t ecx_15;
0063d007          ecx_15 = *(uint8_t*)((arg2 + (i << 1)) + 0xa);
0063d00b          ebp_1[0x15] = ecx_15;
0063d012          int32_t ecx_16;
0063d012          ecx_16 = *(uint8_t*)((arg3 + (i << 1)) + 0xa);
0063d016          ebp_1[0x16] = ecx_16;
0063d019          ecx_16 = *(uint8_t*)((arg4 + (i << 1)) + 0xa);
0063d01d          ebp_1[0x17] = ecx_16;
0063d024          int32_t ecx_17;
0063d024          ecx_17 = *(uint8_t*)((arg1 + (i << 1)) + 0xc);
0063d028          ebp_1[0x18] = ecx_17;
0063d02f          int32_t ecx_18;
0063d02f          ecx_18 = *(uint8_t*)((arg2 + (i << 1)) + 0xc);
0063d033          ebp_1[0x19] = ecx_18;
0063d03a          int32_t ecx_19;
0063d03a          ecx_19 = *(uint8_t*)((arg3 + (i << 1)) + 0xc);
0063d03e          ebp_1[0x1a] = ecx_19;
0063d041          ecx_19 = *(uint8_t*)((arg4 + (i << 1)) + 0xc);
0063d045          ebp_1[0x1b] = ecx_19;
0063d04c          int32_t ecx_20;
0063d04c          ecx_20 = *(uint8_t*)((arg1 + (i << 1)) + 0xe);
0063d050          ebp_1[0x1c] = ecx_20;
0063d057          int32_t ecx_21;
0063d057          ecx_21 = *(uint8_t*)((arg2 + (i << 1)) + 0xe);
0063d05b          ebp_1[0x1d] = ecx_21;
0063d062          ecx = *(uint8_t*)((arg3 + (i << 1)) + 0xe);
0063d066          ebp_1[0x1e] = ecx;
0063d069          ecx = *(uint8_t*)((arg4 + (i << 1)) + 0xe);
0063d06d          i += 8;
0063d070          ebp_1[0x1f] = ecx;
0063d077          var_18 = &ebp_1[arg6];
0063d07e      } while (i < 0x40);
0063d07e      
0063d08b      return i;
0063cf00  }

0063d08c                                      8d 74 26 00                                                              .t&.

0063d090  uint32_t _OTHER_1111_to_OTHER_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063d090  {
0063d0ac      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063d0b5      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063d0bb      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063d0c1      int32_t var_54 = data_907a18;
0063d0cb      int32_t var_50 = data_907a1c;
0063d0d5      int32_t var_4c = data_907a20;
0063d0df      int32_t var_48 = data_907a24;
0063d130      void var_44;
0063d130      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_44);
0063d130      
0063d137      if (eax_6 != 0)
0063d140          return eax_6;
0063d140      
0063d141      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063d141      
0063d160      if (((uint32_t)operator==(&var_44, &var_54)) != 0)
0063d198          return *(uint32_t*)(ebx + 0xec)(ebp, (ebp + 0x80), (ebp + 0x100), (ebp + 0x180), edi_1, esi);
0063d198      
0063d1a8      int32_t var_7c_1 = 0x907938;
0063d1b0      int32_t var_34;
0063d1b0      operator&(&var_34, &var_44);
0063d1c1      int32_t var_24 = var_34;
0063d1cd      int32_t var_30;
0063d1cd      int32_t var_20 = var_30;
0063d1d1      int32_t var_2c;
0063d1d1      int32_t var_1c = var_2c;
0063d1d5      int32_t var_28;
0063d1d5      int32_t var_18 = var_28;
0063d1e9      uint32_t eax_13 = ((uint32_t)operator!=(&var_24, &data_9078e0));
0063d1e9      
0063d1ee      if (eax_13 == 0)
0063d22d          return eax_13;
0063d22d      
0063d221      return sub_63ce40(ebp, (ebp + 0x80), (ebp + 0x100), (ebp + 0x180), edi_1, &var_24, esi);
0063d090  }

0063d22e                                            8b f6                                                                ..

0063d230  int32_t* sub_63d230(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

0063d230  {
0063d243      int32_t* result = arg5;
0063d247      int32_t ecx = result[1];
0063d24c      int32_t ebx = (ecx * 2);
0063d254      int32_t esi_1 = (arg1 + (ebx << 3));
0063d257      int32_t edx_1 = (arg2 + (ebx << 3));
0063d25a      int32_t edi_2 = ((ecx * arg6) + arg4);
0063d262      int32_t ebx_1 = result[3];
0063d262      
0063d267      if (ecx < ebx_1)
0063d267      {
0063d271          result = arg5[2];
0063d274          int32_t var_1c_1 = (arg3 + (ebx << 3));
0063d274          
0063d2dc          do
0063d2dc          {
0063d27c              int32_t ebp_3 = *(uint32_t*)arg5;
0063d27c              
0063d281              if (ebp_3 < result)
0063d281              {
0063d283                  char* ebx_2 = (ebp_3 * 3);
0063d287                  int32_t var_18_1 = edx_1;
0063d28b                  int32_t var_20_1 = ecx;
0063d28b                  
0063d2b9                  do
0063d2b9                  {
0063d290                      result = *(uint8_t*)(esi_1 + (ebp_3 << 1));
0063d293                      ebx_2[edi_2] = result;
0063d29a                      edx_1 = *(uint8_t*)(var_18_1 + (ebp_3 << 1));
0063d2a1                      ebx_2[(edi_2 + 1)] = edx_1;
0063d2a5                      ecx = *(uint8_t*)(var_1c_1 + (ebp_3 << 1));
0063d2a8                      ebp_3 += 1;
0063d2a9                      ebx_2[(edi_2 + 2)] = ecx;
0063d2ad                      ebx_2 = &ebx_2[3];
0063d2b4                      result = arg5[2];
0063d2b9                  } while (ebp_3 < result);
0063d2b9                  
0063d2bb                  edx_1 = var_18_1;
0063d2bf                  ecx = var_20_1;
0063d2c7                  ebx_1 = arg5[3];
0063d281              }
0063d281              
0063d2ca              esi_1 += 0x10;
0063d2cd              edx_1 += 0x10;
0063d2d0              ecx += 1;
0063d2d1              var_1c_1 += 0x10;
0063d2d6              edi_2 += arg6;
0063d2dc          } while (ecx < ebx_1);
0063d267      }
0063d267      
0063d2e5      return result;
0063d230  }

0063d2e6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

0063d2f0  char* _OTHER_111_to_OTHER_Full_MCU_PX(char* arg1, char* arg2, char* arg3, void* arg4, int32_t arg5)

0063d2f0  {
0063d2f6      char* edx = arg1;
0063d2fa      char* result = arg2;
0063d30c      int32_t var_14 = 0;
0063d310      void* var_18 = arg4;
0063d314      char* var_10 = arg3;
0063d3e1      bool cond:0_1;
0063d3e1      
0063d3e1      do
0063d3e1      {
0063d320          int32_t ecx;
0063d320          ecx = *(uint8_t*)edx;
0063d322          char* esi_2 = var_18;
0063d32a          *(uint8_t*)esi_2 = ecx;
0063d32c          char* ebx;
0063d32c          ebx = *(uint8_t*)result;
0063d32e          esi_2[1] = ebx;
0063d331          ecx = *(uint8_t*)var_10;
0063d333          esi_2[2] = ecx;
0063d336          ecx = edx[2];
0063d339          esi_2[3] = ecx;
0063d33c          ecx = result[2];
0063d33f          esi_2[4] = ecx;
0063d344          char* ecx_1;
0063d344          ecx_1 = var_10[2];
0063d347          esi_2[5] = ecx_1;
0063d34a          ecx_1 = edx[4];
0063d34d          esi_2[6] = ecx_1;
0063d350          ecx_1 = result[4];
0063d353          esi_2[7] = ecx_1;
0063d358          char* ecx_2;
0063d358          ecx_2 = var_10[4];
0063d35b          esi_2[8] = ecx_2;
0063d35e          ecx_2 = edx[6];
0063d361          esi_2[9] = ecx_2;
0063d364          ecx_2 = result[6];
0063d367          esi_2[0xa] = ecx_2;
0063d36c          char* ecx_3;
0063d36c          ecx_3 = var_10[6];
0063d36f          esi_2[0xb] = ecx_3;
0063d372          ecx_3 = edx[8];
0063d375          esi_2[0xc] = ecx_3;
0063d378          ecx_3 = result[8];
0063d37b          esi_2[0xd] = ecx_3;
0063d380          char* ecx_4;
0063d380          ecx_4 = var_10[8];
0063d383          esi_2[0xe] = ecx_4;
0063d386          ecx_4 = edx[0xa];
0063d389          esi_2[0xf] = ecx_4;
0063d38c          ecx_4 = result[0xa];
0063d38f          esi_2[0x10] = ecx_4;
0063d394          char* ecx_5;
0063d394          ecx_5 = var_10[0xa];
0063d397          esi_2[0x11] = ecx_5;
0063d39a          ecx_5 = edx[0xc];
0063d39d          esi_2[0x12] = ecx_5;
0063d3a0          ecx_5 = result[0xc];
0063d3a3          esi_2[0x13] = ecx_5;
0063d3a8          char* ecx_6;
0063d3a8          ecx_6 = var_10[0xc];
0063d3ab          esi_2[0x14] = ecx_6;
0063d3ae          ecx_6 = edx[0xe];
0063d3b1          edx = &edx[0x10];
0063d3b4          esi_2[0x15] = ecx_6;
0063d3b7          ecx_6 = result[0xe];
0063d3ba          result = &result[0x10];
0063d3bd          esi_2[0x16] = ecx_6;
0063d3c2          char* ecx_7;
0063d3c2          ecx_7 = var_10[0xe];
0063d3c5          esi_2[0x17] = ecx_7;
0063d3cd          var_10 = &var_10[0x10];
0063d3d6          var_18 = &esi_2[arg5];
0063d3da          cond:0_1 = (var_14 + 1) < 8;
0063d3dd          var_14 += 1;
0063d3e1      } while (cond:0_1);
0063d3ed      return result;
0063d2f0  }

0063d3ee                                            8b f6                                                                ..

0063d3f0  char* _OTHER_111_to_OTHER_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063d3f0  {
0063d40b      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063d414      int32_t var_4c = data_907a28;
0063d41e      char* edi = *(uint32_t*)((char*)arg1 + 0x4834);
0063d424      int32_t var_48 = data_907a2c;
0063d42e      int32_t var_44 = data_907a30;
0063d438      int32_t var_40 = data_907a34;
0063d489      void var_3c;
0063d489      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_3c);
0063d489      
0063d490      if (eax_6 != 0)
0063d498          return eax_6;
0063d498      
0063d499      void* ebx_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063d499      
0063d4b8      if (((uint32_t)operator==(&var_3c, &var_4c)) != 0)
0063d4e4          return _OTHER_111_to_OTHER_Full_MCU_PX(edi, &edi[0x80], &edi[0x100], ebx_1, esi);
0063d4e4      
0063d4f4      int32_t var_74_1 = 0x907938;
0063d4fc      int32_t var_2c;
0063d4fc      operator&(&var_2c, &var_3c);
0063d50d      int32_t var_1c = var_2c;
0063d515      int32_t var_28;
0063d515      int32_t var_18 = var_28;
0063d519      int32_t var_24;
0063d519      int32_t var_14 = var_24;
0063d51d      int32_t var_20;
0063d51d      int32_t var_10 = var_20;
0063d535      int32_t* eax_14 = ((uint32_t)operator!=(&var_1c, &data_9078e0));
0063d535      
0063d53a      if (eax_14 == 0)
0063d56e          return eax_14;
0063d56e      
0063d563      return sub_63d230(edi, &edi[0x80], &edi[0x100], ebx_1, &var_1c, esi);
0063d3f0  }

0063d56f                                               90                                                                 .

0063d570  int32_t* sub_63d570(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

0063d570  {
0063d583      int32_t ecx = arg5[1];
0063d598      int32_t ebp_4 = ((((ecx - 0x80000000) - 0x80000000) >> 1) * 2);
0063d5a4      int32_t edi_2 = ((ecx * arg6) + arg4);
0063d5ae      int32_t esi_2 = ((ecx << 4) + arg1);
0063d5b2      int32_t* result = arg5[3];
0063d5b2      
0063d5b7      if (ecx < result)
0063d5b7      {
0063d5c1          int32_t edx_2 = arg5[2];
0063d5c4          int32_t var_1c_1 = (arg3 + (ebp_4 << 3));
0063d5c8          int32_t var_18_1 = (arg2 + (ebp_4 << 3));
0063d5c8          
0063d64f          do
0063d64f          {
0063d5d0              int32_t ebp_6 = *(uint32_t*)arg5;
0063d5d0              
0063d5d4              if (ebp_6 < edx_2)
0063d5d4              {
0063d5d6                  char* ebx_3 = (ebp_6 * 3);
0063d5d6                  
0063d619                  do
0063d619                  {
0063d5e8                      result = *(uint8_t*)(esi_2 + (ebp_6 << 1));
0063d5f1                      int32_t ecx_4 = (((ebp_6 - 0x80000000) - 0x80000000) >> 1);
0063d5f3                      ebp_6 += 1;
0063d5f4                      ebx_3[edi_2] = result;
0063d5fb                      edx_2 = *(uint8_t*)(var_18_1 + (ecx_4 << 1));
0063d5fe                      ebx_3[(edi_2 + 1)] = edx_2;
0063d606                      ecx_4 = *(uint8_t*)(var_1c_1 + (ecx_4 << 1));
0063d609                      ebx_3[(edi_2 + 2)] = ecx_4;
0063d60d                      ebx_3 = &ebx_3[3];
0063d614                      edx_2 = arg5[2];
0063d619                  } while (ebp_6 < edx_2);
0063d619                  
0063d623                  result = arg5[3];
0063d5d4              }
0063d5d4              
0063d62b              int32_t ebx_6 = ((ecx & 1) * 2);
0063d62d              esi_2 += 0x10;
0063d638              var_18_1 += (ebx_6 << 3);
0063d644              var_1c_1 += (ebx_6 << 3);
0063d648              ecx += 1;
0063d649              edi_2 += arg6;
0063d64f          } while (ecx < result);
0063d5b7      }
0063d5b7      
0063d65c      return result;
0063d570  }

0063d65d                                                                                         8d 76 00                               .v.

0063d660  char* sub_63d660(char* arg1, char* arg2, char* arg3, void* arg4, int32_t arg5)

0063d660  {
0063d666      char* edx = arg1;
0063d66a      char* result = arg2;
0063d67c      int32_t var_14 = 0;
0063d680      void* var_18 = arg4;
0063d684      char* var_10 = arg3;
0063d7ee      bool cond:0_1;
0063d7ee      
0063d7ee      do
0063d7ee      {
0063d690          int32_t ecx;
0063d690          ecx = *(uint8_t*)edx;
0063d692          char* esi_2 = var_18;
0063d69a          *(uint8_t*)esi_2 = ecx;
0063d69c          char* ebx;
0063d69c          ebx = *(uint8_t*)result;
0063d69e          esi_2[1] = ebx;
0063d6a1          ecx = *(uint8_t*)var_10;
0063d6a3          esi_2[2] = ecx;
0063d6a6          ecx = edx[2];
0063d6a9          esi_2[3] = ecx;
0063d6ac          ecx = *(uint8_t*)result;
0063d6ae          esi_2[4] = ecx;
0063d6b3          char* ecx_1;
0063d6b3          ecx_1 = *(uint8_t*)var_10;
0063d6b5          esi_2[5] = ecx_1;
0063d6b8          ecx_1 = edx[4];
0063d6bb          esi_2[6] = ecx_1;
0063d6be          ecx_1 = result[2];
0063d6c1          esi_2[7] = ecx_1;
0063d6c6          char* ecx_2;
0063d6c6          ecx_2 = var_10[2];
0063d6c9          esi_2[8] = ecx_2;
0063d6cc          ecx_2 = edx[6];
0063d6cf          esi_2[9] = ecx_2;
0063d6d2          ecx_2 = result[2];
0063d6d5          esi_2[0xa] = ecx_2;
0063d6da          char* ecx_3;
0063d6da          ecx_3 = var_10[2];
0063d6dd          esi_2[0xb] = ecx_3;
0063d6e0          ecx_3 = edx[8];
0063d6e3          esi_2[0xc] = ecx_3;
0063d6e6          ecx_3 = result[4];
0063d6e9          esi_2[0xd] = ecx_3;
0063d6ee          char* ecx_4;
0063d6ee          ecx_4 = var_10[4];
0063d6f1          esi_2[0xe] = ecx_4;
0063d6f4          ecx_4 = edx[0xa];
0063d6f7          esi_2[0xf] = ecx_4;
0063d6fa          ecx_4 = result[4];
0063d6fd          esi_2[0x10] = ecx_4;
0063d702          char* ecx_5;
0063d702          ecx_5 = var_10[4];
0063d705          esi_2[0x11] = ecx_5;
0063d708          ecx_5 = edx[0xc];
0063d70b          esi_2[0x12] = ecx_5;
0063d70e          ecx_5 = result[6];
0063d711          esi_2[0x13] = ecx_5;
0063d716          char* ecx_6;
0063d716          ecx_6 = var_10[6];
0063d719          esi_2[0x14] = ecx_6;
0063d71c          ecx_6 = edx[0xe];
0063d71f          esi_2[0x15] = ecx_6;
0063d722          ecx_6 = result[6];
0063d725          esi_2[0x16] = ecx_6;
0063d72a          char* ecx_7;
0063d72a          ecx_7 = var_10[6];
0063d72d          esi_2[0x17] = ecx_7;
0063d730          ecx_7 = edx[0x10];
0063d733          void* esi_3 = &esi_2[arg5];
0063d737          *(uint8_t*)esi_3 = ecx_7;
0063d739          ecx_7 = *(uint8_t*)result;
0063d73b          *(uint8_t*)((char*)esi_3 + 1) = ecx_7;
0063d740          char* ecx_8;
0063d740          ecx_8 = *(uint8_t*)var_10;
0063d742          *(uint8_t*)((char*)esi_3 + 2) = ecx_8;
0063d745          ecx_8 = edx[0x12];
0063d748          *(uint8_t*)((char*)esi_3 + 3) = ecx_8;
0063d74b          ecx_8 = *(uint8_t*)result;
0063d74d          *(uint8_t*)((char*)esi_3 + 4) = ecx_8;
0063d752          char* ecx_9;
0063d752          ecx_9 = *(uint8_t*)var_10;
0063d754          *(uint8_t*)((char*)esi_3 + 5) = ecx_9;
0063d757          ecx_9 = edx[0x14];
0063d75a          *(uint8_t*)((char*)esi_3 + 6) = ecx_9;
0063d75d          ecx_9 = result[2];
0063d760          *(uint8_t*)((char*)esi_3 + 7) = ecx_9;
0063d765          char* ecx_10;
0063d765          ecx_10 = var_10[2];
0063d768          *(uint8_t*)((char*)esi_3 + 8) = ecx_10;
0063d76b          ecx_10 = edx[0x16];
0063d76e          *(uint8_t*)((char*)esi_3 + 9) = ecx_10;
0063d771          ecx_10 = result[2];
0063d774          *(uint8_t*)((char*)esi_3 + 0xa) = ecx_10;
0063d779          char* ecx_11;
0063d779          ecx_11 = var_10[2];
0063d77c          *(uint8_t*)((char*)esi_3 + 0xb) = ecx_11;
0063d77f          ecx_11 = edx[0x18];
0063d782          *(uint8_t*)((char*)esi_3 + 0xc) = ecx_11;
0063d785          ecx_11 = result[4];
0063d788          *(uint8_t*)((char*)esi_3 + 0xd) = ecx_11;
0063d78d          char* ecx_12;
0063d78d          ecx_12 = var_10[4];
0063d790          *(uint8_t*)((char*)esi_3 + 0xe) = ecx_12;
0063d793          ecx_12 = edx[0x1a];
0063d796          *(uint8_t*)((char*)esi_3 + 0xf) = ecx_12;
0063d799          ecx_12 = result[4];
0063d79c          *(uint8_t*)((char*)esi_3 + 0x10) = ecx_12;
0063d7a1          char* ecx_13;
0063d7a1          ecx_13 = var_10[4];
0063d7a4          *(uint8_t*)((char*)esi_3 + 0x11) = ecx_13;
0063d7a7          ecx_13 = edx[0x1c];
0063d7aa          *(uint8_t*)((char*)esi_3 + 0x12) = ecx_13;
0063d7ad          ecx_13 = result[6];
0063d7b0          *(uint8_t*)((char*)esi_3 + 0x13) = ecx_13;
0063d7b5          char* ecx_14;
0063d7b5          ecx_14 = var_10[6];
0063d7b8          *(uint8_t*)((char*)esi_3 + 0x14) = ecx_14;
0063d7bb          ecx_14 = edx[0x1e];
0063d7be          edx = &edx[0x20];
0063d7c1          *(uint8_t*)((char*)esi_3 + 0x15) = ecx_14;
0063d7c4          ecx_14 = result[6];
0063d7c7          result = &result[0x10];
0063d7ca          *(uint8_t*)((char*)esi_3 + 0x16) = ecx_14;
0063d7cf          char* ecx_15;
0063d7cf          ecx_15 = var_10[6];
0063d7d2          *(uint8_t*)((char*)esi_3 + 0x17) = ecx_15;
0063d7da          var_10 = &var_10[0x10];
0063d7e3          var_18 = ((char*)esi_3 + arg5);
0063d7e7          cond:0_1 = (var_14 + 1) < 4;
0063d7ea          var_14 += 1;
0063d7ee      } while (cond:0_1);
0063d7fa      return result;
0063d660  }

0063d7fb                                                                                   90 8d 74 26 00                             ..t&.

0063d800  char* _OTHER_411_to_OTHER_Full_MCU_PX(char* arg1, char* arg2, char* arg3, void* arg4, int32_t arg5)

0063d800  {
0063d82e      sub_63d660(arg1, arg2, arg3, arg4, arg5);
0063d859      sub_63d660(&arg1[0x80], &arg2[8], &arg3[8], ((char*)arg4 + 0x18), arg5);
0063d85e      void* edi_1 = ((char*)arg4 + (arg5 << 3));
0063d884      sub_63d660(&arg1[0x100], &arg2[0x40], &arg3[0x40], edi_1, arg5);
0063d8bb      return sub_63d660(&arg1[0x180], &arg2[0x48], &arg3[0x48], ((char*)edi_1 + 0x18), arg5);
0063d800  }

0063d8bc                                                                                      8d 74 26 00                              .t&.

0063d8c0  uint32_t _OTHER_411_to_OTHER_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063d8c0  {
0063d8df      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063d8e8      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063d8ee      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063d8f4      int32_t var_b4 = data_907a38;
0063d8fe      int32_t var_b0 = data_907a3c;
0063d908      int32_t var_ac = data_907a40;
0063d912      int32_t var_a8 = data_907a44;
0063d963      void var_a4;
0063d963      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 0x10, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_a4);
0063d963      
0063d96a      if (eax_6 != 0)
0063d976          return eax_6;
0063d976      
0063d977      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063d977      
0063d996      if (((uint32_t)operator==(&var_a4, &var_b4)) != 0)
0063d9c7          return *(uint32_t*)(ebx + 0xd4)(ebp, (ebp + 0x200), (ebp + 0x280), edi_1, esi);
0063d9c7      
0063d9d7      int32_t var_dc_1 = 0x907938;
0063d9df      int32_t var_94;
0063d9df      operator&(&var_94, &var_a4);
0063d9f0      int32_t var_84 = var_94;
0063d9fc      int32_t var_90;
0063d9fc      int32_t var_80 = var_90;
0063da00      int32_t var_8c;
0063da00      int32_t var_7c = var_8c;
0063da04      int32_t var_88;
0063da04      int32_t var_78 = var_88;
0063da04      
0063da1d      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
0063da46          sub_63d570(ebp, (ebp + 0x200), (ebp + 0x280), edi_1, &var_84, esi);
0063da46      
0063da5a      int32_t var_dc_3 = 0x907928;
0063da62      void var_74;
0063da62      operator&(&var_74, &var_a4);
0063da79      int32_t var_dc_4 = 0x907920;
0063da81      int32_t var_64;
0063da81      operator-(&var_64, &var_74);
0063da9b      var_84 = var_64;
0063daaa      int32_t var_60;
0063daaa      int32_t var_80_1 = var_60;
0063daae      int32_t var_5c;
0063daae      int32_t var_7c_1 = var_5c;
0063dab2      int32_t var_58;
0063dab2      int32_t var_78_1 = var_58;
0063dab2      
0063dacb      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
0063dafd          sub_63d570((ebp + 0x80), (ebp + 0x208), (ebp + 0x288), (edi_1 + 0x18), &var_84, esi);
0063dafd      
0063db14      int32_t var_dc_6 = 0x907910;
0063db1c      void var_54;
0063db1c      operator&(&var_54, &var_a4);
0063db36      int32_t var_dc_7 = 0x907908;
0063db3e      int32_t var_44;
0063db3e      operator-(&var_44, &var_54);
0063db58      var_84 = var_44;
0063db67      int32_t var_40;
0063db67      int32_t var_80_2 = var_40;
0063db6b      int32_t var_3c;
0063db6b      int32_t var_7c_2 = var_3c;
0063db6f      int32_t var_38;
0063db6f      int32_t var_78_2 = var_38;
0063db6f      
0063db88      if (((uint32_t)operator!=(&var_84, &data_9078e0)) != 0)
0063dbba          sub_63d570((ebp + 0x100), (ebp + 0x240), (ebp + 0x2c0), (edi_1 + (esi << 3)), &var_84, esi);
0063dbba      
0063dbd1      int32_t var_dc_9 = 0x9078f8;
0063dbd9      void var_34;
0063dbd9      operator&(&var_34, &var_a4);
0063dbf3      int32_t var_dc_10 = 0x9078f0;
0063dbfb      int32_t var_24;
0063dbfb      operator-(&var_24, &var_34);
0063dc15      var_84 = var_24;
0063dc24      int32_t var_20;
0063dc24      int32_t var_80_3 = var_20;
0063dc28      int32_t var_1c;
0063dc28      int32_t var_7c_3 = var_1c;
0063dc2c      int32_t var_18;
0063dc2c      int32_t var_78_3 = var_18;
0063dc40      uint32_t eax_25 = ((uint32_t)operator!=(&var_84, &data_9078e0));
0063dc40      
0063dc45      if (eax_25 == 0)
0063dc87          return eax_25;
0063dc87      
0063dc78      return sub_63d570((ebp + 0x180), (ebp + 0x248), (ebp + 0x2c8), ((edi_1 + (esi << 3)) + 0x18), &var_84, esi);
0063d8c0  }

0063dc88                          90 8d b4 26 00 00 00 00                                                          ...&....

0063dc90  int32_t* sub_63dc90(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

0063dc90  {
0063dca3      int32_t* result = arg5;
0063dca7      int32_t ecx = result[1];
0063dcac      int32_t ebx = (ecx * 2);
0063dcb4      int32_t esi_1 = (arg1 + (ebx << 3));
0063dcb7      int32_t edx_1 = (arg2 + (ebx << 3));
0063dcba      int32_t edi_2 = ((ecx * arg6) + arg4);
0063dcc2      int32_t ebx_1 = result[3];
0063dcc2      
0063dcc7      if (ecx < ebx_1)
0063dcc7      {
0063dcd1          result = arg5[2];
0063dcd4          int32_t var_1c_1 = (arg3 + (ebx << 3));
0063dcd4          
0063dd4c          do
0063dd4c          {
0063dcdc              int32_t ebp_3 = *(uint32_t*)arg5;
0063dcdc              
0063dce1              if (ebp_3 < result)
0063dce1              {
0063dce3                  char* ebx_2 = (ebp_3 * 3);
0063dce7                  int32_t var_18_1 = edx_1;
0063dce7                  
0063dd29                  do
0063dd29                  {
0063dcf8                      result = *(uint8_t*)(esi_1 + (ebp_3 << 1));
0063dd01                      int32_t ecx_4 = (((ebp_3 - 0x80000000) - 0x80000000) >> 1);
0063dd03                      ebp_3 += 1;
0063dd04                      ebx_2[edi_2] = result;
0063dd0b                      edx_1 = *(uint8_t*)(var_18_1 + (ecx_4 << 1));
0063dd0e                      ebx_2[(edi_2 + 1)] = edx_1;
0063dd16                      ecx_4 = *(uint8_t*)(var_1c_1 + (ecx_4 << 1));
0063dd19                      ebx_2[(edi_2 + 2)] = ecx_4;
0063dd1d                      ebx_2 = &ebx_2[3];
0063dd24                      result = arg5[2];
0063dd29                  } while (ebp_3 < result);
0063dd29                  
0063dd2b                  edx_1 = var_18_1;
0063dd37                  ebx_1 = arg5[3];
0063dce1              }
0063dce1              
0063dd3a              esi_1 += 0x10;
0063dd3d              edx_1 += 0x10;
0063dd40              ecx += 1;
0063dd41              var_1c_1 += 0x10;
0063dd46              edi_2 += arg6;
0063dd4c          } while (ecx < ebx_1);
0063dcc7      }
0063dcc7      
0063dd55      return result;
0063dc90  }

0063dd56                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

0063dd60  char* sub_63dd60(char* arg1, char* arg2, char* arg3, void* arg4, int32_t arg5)

0063dd60  {
0063dd66      char* edx = arg1;
0063dd6a      char* result = arg2;
0063dd7c      int32_t var_14 = 0;
0063dd80      void* var_18 = arg4;
0063dd84      char* var_10 = arg3;
0063de4f      bool cond:0_1;
0063de4f      
0063de4f      do
0063de4f      {
0063dd90          int32_t ecx;
0063dd90          ecx = *(uint8_t*)edx;
0063dd92          char* esi_2 = var_18;
0063dd9a          *(uint8_t*)esi_2 = ecx;
0063dd9c          char* ebx;
0063dd9c          ebx = *(uint8_t*)result;
0063dd9e          esi_2[1] = ebx;
0063dda1          ecx = *(uint8_t*)var_10;
0063dda3          esi_2[2] = ecx;
0063dda6          ecx = edx[2];
0063dda9          esi_2[3] = ecx;
0063ddac          ecx = *(uint8_t*)result;
0063ddae          esi_2[4] = ecx;
0063ddb3          char* ecx_1;
0063ddb3          ecx_1 = *(uint8_t*)var_10;
0063ddb5          esi_2[5] = ecx_1;
0063ddb8          ecx_1 = edx[4];
0063ddbb          esi_2[6] = ecx_1;
0063ddbe          ecx_1 = result[2];
0063ddc1          esi_2[7] = ecx_1;
0063ddc6          char* ecx_2;
0063ddc6          ecx_2 = var_10[2];
0063ddc9          esi_2[8] = ecx_2;
0063ddcc          ecx_2 = edx[6];
0063ddcf          esi_2[9] = ecx_2;
0063ddd2          ecx_2 = result[2];
0063ddd5          esi_2[0xa] = ecx_2;
0063ddda          char* ecx_3;
0063ddda          ecx_3 = var_10[2];
0063dddd          esi_2[0xb] = ecx_3;
0063dde0          ecx_3 = edx[8];
0063dde3          esi_2[0xc] = ecx_3;
0063dde6          ecx_3 = result[4];
0063dde9          esi_2[0xd] = ecx_3;
0063ddee          char* ecx_4;
0063ddee          ecx_4 = var_10[4];
0063ddf1          esi_2[0xe] = ecx_4;
0063ddf4          ecx_4 = edx[0xa];
0063ddf7          esi_2[0xf] = ecx_4;
0063ddfa          ecx_4 = result[4];
0063ddfd          esi_2[0x10] = ecx_4;
0063de02          char* ecx_5;
0063de02          ecx_5 = var_10[4];
0063de05          esi_2[0x11] = ecx_5;
0063de08          ecx_5 = edx[0xc];
0063de0b          esi_2[0x12] = ecx_5;
0063de0e          ecx_5 = result[6];
0063de11          esi_2[0x13] = ecx_5;
0063de16          char* ecx_6;
0063de16          ecx_6 = var_10[6];
0063de19          esi_2[0x14] = ecx_6;
0063de1c          ecx_6 = edx[0xe];
0063de1f          edx = &edx[0x10];
0063de22          esi_2[0x15] = ecx_6;
0063de25          ecx_6 = result[6];
0063de28          result = &result[0x10];
0063de2b          esi_2[0x16] = ecx_6;
0063de30          char* ecx_7;
0063de30          ecx_7 = var_10[6];
0063de33          esi_2[0x17] = ecx_7;
0063de3b          var_10 = &var_10[0x10];
0063de44          var_18 = &esi_2[arg5];
0063de48          cond:0_1 = (var_14 + 1) < 8;
0063de4b          var_14 += 1;
0063de4f      } while (cond:0_1);
0063de5b      return result;
0063dd60  }

0063de5c                                                                                      8d 74 26 00                              .t&.

0063de60  char* _OTHER_422_to_OTHER_Full_MCU_PX(char* arg1, char* arg2, char* arg3, void* arg4, int32_t arg5)

0063de60  {
0063de8e      sub_63dd60(arg1, arg2, arg3, arg4, arg5);
0063dec5      return sub_63dd60(&arg1[0x80], &arg2[8], &arg3[8], ((char*)arg4 + 0x18), arg5);
0063de60  }

0063dec6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

0063ded0  uint32_t _OTHER_422_to_OTHER_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063ded0  {
0063deef      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063def8      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063defe      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063df04      int32_t var_74 = data_907a48;
0063df0e      int32_t var_70 = data_907a4c;
0063df18      int32_t var_6c = data_907a50;
0063df22      int32_t var_68 = data_907a54;
0063df76      void var_64;
0063df76      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_64);
0063df76      
0063df7d      if (eax_6 != 0)
0063df89          return eax_6;
0063df89      
0063df8a      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063df8a      
0063dfa9      if (((uint32_t)operator==(&var_64, &var_74)) != 0)
0063dfda          return *(uint32_t*)(ebx + 0xd0)(ebp, (ebp + 0x100), (ebp + 0x180), edi_1, esi);
0063dfda      
0063dfea      int32_t var_9c_1 = 0x907938;
0063dff2      int32_t var_54;
0063dff2      operator&(&var_54, &var_64);
0063e003      int32_t var_44 = var_54;
0063e00f      int32_t var_50;
0063e00f      int32_t var_40 = var_50;
0063e013      int32_t var_4c;
0063e013      int32_t var_3c = var_4c;
0063e017      int32_t var_48;
0063e017      int32_t var_38 = var_48;
0063e017      
0063e030      if (((uint32_t)operator!=(&var_44, &data_9078e0)) != 0)
0063e059          sub_63dc90(ebp, (ebp + 0x100), (ebp + 0x180), edi_1, &var_44, esi);
0063e059      
0063e06d      int32_t var_9c_3 = 0x907928;
0063e075      void var_34;
0063e075      operator&(&var_34, &var_64);
0063e08c      int32_t var_9c_4 = 0x907920;
0063e094      int32_t var_24;
0063e094      operator-(&var_24, &var_34);
0063e0ae      var_44 = var_24;
0063e0bd      int32_t var_20;
0063e0bd      int32_t var_40_1 = var_20;
0063e0c1      int32_t var_1c;
0063e0c1      int32_t var_3c_1 = var_1c;
0063e0c5      int32_t var_18;
0063e0c5      int32_t var_38_1 = var_18;
0063e0d9      uint32_t eax_17 = ((uint32_t)operator!=(&var_44, &data_9078e0));
0063e0d9      
0063e0de      if (eax_17 == 0)
0063e11f          return eax_17;
0063e11f      
0063e110      return sub_63dc90((ebp + 0x80), (ebp + 0x108), (ebp + 0x188), (edi_1 + 0x18), &var_44, esi);
0063ded0  }


0063e120  int32_t* sub_63e120(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t* arg5, int32_t arg6)

0063e120  {
0063e133      int32_t* result = arg5;
0063e137      int32_t ebp = result[1];
0063e13c      int32_t esi = (ebp * 2);
0063e145      int32_t ecx_1 = (arg1 + (esi << 3));
0063e148      int32_t edx_1 = (arg2 + (esi << 3));
0063e14b      int32_t ebx_2 = ((ebp * arg6) + arg4);
0063e152      int32_t edi_1 = result[3];
0063e152      
0063e157      if (ebp < edi_1)
0063e157      {
0063e161          result = arg5[2];
0063e164          int32_t var_18_1 = (arg3 + (esi << 3));
0063e164          
0063e1ed          do
0063e1ed          {
0063e16c              int32_t esi_3 = *(uint32_t*)arg5;
0063e170              int32_t var_20_1 = esi_3;
0063e170              
0063e174              if (esi_3 < result)
0063e174              {
0063e17a                  int32_t edx_2 = esi_3;
0063e17a                  
0063e1ca                  do
0063e1ca                  {
0063e188                      result = *(uint8_t*)(ecx_1 + (edx_2 << 1));
0063e191                      int32_t esi_7 = (((edx_2 - 0x80000000) - 0x80000000) >> 1);
0063e196                      *(uint8_t*)(ebx_2 + (edx_2 << 1)) = result;
0063e199                      char eax_2;
0063e199                      
0063e199                      if ((edx_2 & 1) == 0)
0063e1b9                          eax_2 = ((int8_t)*(uint16_t*)(edx_1 + (esi_7 << 1)));
0063e199                      else
0063e1a4                          eax_2 = ((int8_t)*(uint16_t*)(var_18_1 + (esi_7 << 1)));
0063e1a4                      
0063e1bc                      *(uint8_t*)((ebx_2 + (edx_2 << 1)) + 1) = eax_2;
0063e1c0                      edx_2 += 1;
0063e1c5                      result = arg5[2];
0063e1ca                  } while (edx_2 < result);
0063e1ca                  
0063e1d8                  edi_1 = arg5[3];
0063e174              }
0063e174              
0063e1db              ecx_1 += 0x10;
0063e1de              edx_1 += 0x10;
0063e1e1              ebp += 1;
0063e1e2              var_18_1 += 0x10;
0063e1e7              ebx_2 += arg6;
0063e1ed          } while (ebp < edi_1);
0063e157      }
0063e157      
0063e1fa      return result;
0063e120  }

0063e1a9                             8d b4 26 00 00 00 00                                                           ..&....
0063e1fb                                                                                   90 8d 74 26 00                             ..t&.

0063e200  char* _YCbCr_422_to_YCbYCr_Full_MCU_PX(char* arg1, char* arg2, char* arg3, void* arg4, int32_t arg5)

0063e200  {
0063e206      char* edx = arg1;
0063e20a      char* result = arg2;
0063e21c      int32_t var_14 = 0;
0063e220      void* var_18 = arg4;
0063e224      char* var_10 = arg3;
0063e339      bool cond:0_1;
0063e339      
0063e339      do
0063e339      {
0063e230          int32_t ecx;
0063e230          ecx = *(uint8_t*)edx;
0063e232          char* esi_2 = var_18;
0063e23a          *(uint8_t*)esi_2 = ecx;
0063e23c          char* ebx;
0063e23c          ebx = *(uint8_t*)result;
0063e23e          esi_2[1] = ebx;
0063e241          ecx = edx[2];
0063e244          esi_2[2] = ecx;
0063e247          ecx = *(uint8_t*)var_10;
0063e249          esi_2[3] = ecx;
0063e24c          ecx = edx[4];
0063e24f          esi_2[4] = ecx;
0063e252          ecx = result[2];
0063e255          esi_2[5] = ecx;
0063e258          ecx = edx[6];
0063e25b          esi_2[6] = ecx;
0063e260          char* ecx_1;
0063e260          ecx_1 = var_10[2];
0063e263          esi_2[7] = ecx_1;
0063e266          ecx_1 = edx[8];
0063e269          esi_2[8] = ecx_1;
0063e26c          ecx_1 = result[4];
0063e26f          esi_2[9] = ecx_1;
0063e272          ecx_1 = edx[0xa];
0063e275          esi_2[0xa] = ecx_1;
0063e27a          char* ecx_2;
0063e27a          ecx_2 = var_10[4];
0063e27d          esi_2[0xb] = ecx_2;
0063e280          ecx_2 = edx[0xc];
0063e283          esi_2[0xc] = ecx_2;
0063e286          ecx_2 = result[6];
0063e289          esi_2[0xd] = ecx_2;
0063e28c          ecx_2 = edx[0xe];
0063e28f          esi_2[0xe] = ecx_2;
0063e294          char* ecx_3;
0063e294          ecx_3 = var_10[6];
0063e297          esi_2[0xf] = ecx_3;
0063e29a          ecx_3 = edx[0x80];
0063e2a0          esi_2[0x10] = ecx_3;
0063e2a3          ecx_3 = result[8];
0063e2a6          esi_2[0x11] = ecx_3;
0063e2a9          ecx_3 = edx[0x82];
0063e2af          esi_2[0x12] = ecx_3;
0063e2b4          char* ecx_4;
0063e2b4          ecx_4 = var_10[8];
0063e2b7          esi_2[0x13] = ecx_4;
0063e2ba          ecx_4 = edx[0x84];
0063e2c0          esi_2[0x14] = ecx_4;
0063e2c3          ecx_4 = result[0xa];
0063e2c6          esi_2[0x15] = ecx_4;
0063e2c9          ecx_4 = edx[0x86];
0063e2cf          esi_2[0x16] = ecx_4;
0063e2d4          char* ecx_5;
0063e2d4          ecx_5 = var_10[0xa];
0063e2d7          esi_2[0x17] = ecx_5;
0063e2da          ecx_5 = edx[0x88];
0063e2e0          esi_2[0x18] = ecx_5;
0063e2e3          ecx_5 = result[0xc];
0063e2e6          esi_2[0x19] = ecx_5;
0063e2e9          ecx_5 = edx[0x8a];
0063e2ef          esi_2[0x1a] = ecx_5;
0063e2f4          char* ecx_6;
0063e2f4          ecx_6 = var_10[0xc];
0063e2f7          esi_2[0x1b] = ecx_6;
0063e2fa          ecx_6 = edx[0x8c];
0063e300          esi_2[0x1c] = ecx_6;
0063e303          ecx_6 = result[0xe];
0063e306          result = &result[0x10];
0063e309          esi_2[0x1d] = ecx_6;
0063e30c          ecx_6 = edx[0x8e];
0063e312          edx = &edx[0x10];
0063e315          esi_2[0x1e] = ecx_6;
0063e31a          char* ecx_7;
0063e31a          ecx_7 = var_10[0xe];
0063e31d          esi_2[0x1f] = ecx_7;
0063e325          var_10 = &var_10[0x10];
0063e32e          var_18 = &esi_2[arg5];
0063e332          cond:0_1 = (var_14 + 1) < 8;
0063e335          var_14 += 1;
0063e339      } while (cond:0_1);
0063e345      return result;
0063e200  }

0063e346                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....

0063e350  uint32_t _YCbCr_422_to_YCbYCr_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063e350  {
0063e36f      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063e378      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063e37e      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063e384      int32_t var_74 = data_907a58;
0063e38e      int32_t var_70 = data_907a5c;
0063e398      int32_t var_6c = data_907a60;
0063e3a2      int32_t var_68 = data_907a64;
0063e3f6      void var_64;
0063e3f6      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 0x10, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_64);
0063e3f6      
0063e3fd      if (eax_6 != 0)
0063e409          return eax_6;
0063e409      
0063e40a      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063e40a      
0063e429      if (((uint32_t)operator==(&var_64, &var_74)) != 0)
0063e45a          return *(uint32_t*)(ebx + 0xdc)(ebp, (ebp + 0x100), (ebp + 0x180), edi_1, esi);
0063e45a      
0063e46a      int32_t var_9c_1 = 0x907938;
0063e472      int32_t var_54;
0063e472      operator&(&var_54, &var_64);
0063e483      int32_t var_44 = var_54;
0063e48f      int32_t var_50;
0063e48f      int32_t var_40 = var_50;
0063e493      int32_t var_4c;
0063e493      int32_t var_3c = var_4c;
0063e497      int32_t var_48;
0063e497      int32_t var_38 = var_48;
0063e497      
0063e4b0      if (((uint32_t)operator!=(&var_44, &data_9078e0)) != 0)
0063e4d9          sub_63e120(ebp, (ebp + 0x100), (ebp + 0x180), edi_1, &var_44, esi);
0063e4d9      
0063e4ed      int32_t var_9c_3 = 0x907928;
0063e4f5      void var_34;
0063e4f5      operator&(&var_34, &var_64);
0063e50c      int32_t var_9c_4 = 0x907920;
0063e514      int32_t var_24;
0063e514      operator-(&var_24, &var_34);
0063e52e      var_44 = var_24;
0063e53d      int32_t var_20;
0063e53d      int32_t var_40_1 = var_20;
0063e541      int32_t var_1c;
0063e541      int32_t var_3c_1 = var_1c;
0063e545      int32_t var_18;
0063e545      int32_t var_38_1 = var_18;
0063e559      uint32_t eax_17 = ((uint32_t)operator!=(&var_44, &data_9078e0));
0063e559      
0063e55e      if (eax_17 == 0)
0063e59f          return eax_17;
0063e59f      
0063e590      return sub_63e120((ebp + 0x80), (ebp + 0x108), (ebp + 0x188), (edi_1 + 0x10), &var_44, esi);
0063e350  }


0063e5a0  void sub_63e5a0(int32_t arg1, int32_t arg2, int32_t* arg3, int32_t arg4)

0063e5a0  {
0063e5af      int32_t edi = arg3[1];
0063e5b7      int32_t ecx = arg3[3];
0063e5ba      int32_t ebp_2 = ((edi * arg4) + arg2);
0063e5ba      
0063e5c0      if (edi < ecx)
0063e5c0      {
0063e5c2          int32_t eax = arg3[2];
0063e5c7          int32_t edx_2 = (edi << 4);
0063e5c7          
0063e622          do
0063e622          {
0063e5ca              char* ebx_1 = *(uint32_t*)arg3;
0063e5ca              
0063e5ce              if (ebx_1 < eax)
0063e5ce              {
0063e60f                  do
0063e60f                  {
0063e5e0                      int32_t eax_2 = ((int32_t)*(uint16_t*)((arg1 + edx_2) + (ebx_1 << 1)));
0063e5e0                      
0063e5e9                      if (eax_2 > 0xff)
0063e5eb                          eax_2 = 0xff;
0063e5e9                      else if (eax_2 < 0)
0063e604                          eax_2 = 0;
0063e604                      
0063e606                      ebx_1[ebp_2] = eax_2;
0063e609                      ebx_1 = &ebx_1[1];
0063e60a                      eax = arg3[2];
0063e60f                  } while (ebx_1 < eax);
0063e60f                  
0063e615                  ecx = arg3[3];
0063e5ce              }
0063e5ce              
0063e618              ebp_2 += arg4;
0063e61c              edx_2 += 0x10;
0063e61f              edi += 1;
0063e622          } while (edi < ecx);
0063e5c0      }
0063e5a0  }

0063e5f2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
0063e62c                                      8d 74 26 00                                                              .t&.

0063e630  int32_t _Y_111_to_Y_Full_MCU_PX(int16_t* arg1, void* arg2, int32_t arg3)

0063e630  {
0063e631      int16_t* ecx = arg1;
0063e635      void* edx = arg2;
0063e754      int32_t i;
0063e754      
0063e754      for (i = 0; i < 8; )
0063e754      {
0063e640          int32_t ebx_1 = ((int32_t)*(uint16_t*)ecx);
0063e640          
0063e649          if (ebx_1 > 0xff)
0063e64b              ebx_1 = 0xff;
0063e649          else if (ebx_1 < 0)
0063e664              ebx_1 = 0;
0063e664          
0063e666          *(uint8_t*)edx = ebx_1;
0063e668          int32_t ebx_2 = ((int32_t)ecx[1]);
0063e668          
0063e672          if (ebx_2 > 0xff)
0063e674              ebx_2 = 0xff;
0063e672          else if (ebx_2 < 0)
0063e684              ebx_2 = 0;
0063e684          
0063e686          *(uint8_t*)((char*)edx + 1) = ebx_2;
0063e689          int32_t ebx_3 = ((int32_t)ecx[2]);
0063e689          
0063e693          if (ebx_3 > 0xff)
0063e695              ebx_3 = 0xff;
0063e693          else if (ebx_3 < 0)
0063e6a4              ebx_3 = 0;
0063e6a4          
0063e6a6          *(uint8_t*)((char*)edx + 2) = ebx_3;
0063e6a9          int32_t ebx_4 = ((int32_t)ecx[3]);
0063e6a9          
0063e6b3          if (ebx_4 > 0xff)
0063e6b5              ebx_4 = 0xff;
0063e6b3          else if (ebx_4 < 0)
0063e6c4              ebx_4 = 0;
0063e6c4          
0063e6c6          *(uint8_t*)((char*)edx + 3) = ebx_4;
0063e6c9          int32_t ebx_5 = ((int32_t)ecx[4]);
0063e6c9          
0063e6d3          if (ebx_5 > 0xff)
0063e6d5              ebx_5 = 0xff;
0063e6d3          else if (ebx_5 < 0)
0063e6e4              ebx_5 = 0;
0063e6e4          
0063e6e6          *(uint8_t*)((char*)edx + 4) = ebx_5;
0063e6e9          int32_t ebx_6 = ((int32_t)ecx[5]);
0063e6e9          
0063e6f3          if (ebx_6 > 0xff)
0063e6f5              ebx_6 = 0xff;
0063e6f3          else if (ebx_6 < 0)
0063e704              ebx_6 = 0;
0063e704          
0063e706          *(uint8_t*)((char*)edx + 5) = ebx_6;
0063e709          int32_t ebx_7 = ((int32_t)ecx[6]);
0063e709          
0063e713          if (ebx_7 > 0xff)
0063e715              ebx_7 = 0xff;
0063e713          else if (ebx_7 < 0)
0063e724              ebx_7 = 0;
0063e724          
0063e726          *(uint8_t*)((char*)edx + 6) = ebx_7;
0063e729          int32_t ebx_8 = ((int32_t)ecx[7]);
0063e729          
0063e733          if (ebx_8 > 0xff)
0063e735              ebx_8 = 0xff;
0063e733          else if (ebx_8 < 0)
0063e744              ebx_8 = 0;
0063e744          
0063e746          ecx = &ecx[8];
0063e749          i += 1;
0063e74a          *(uint8_t*)((char*)edx + 7) = ebx_8;
0063e74d          edx += arg3;
0063e754      }
0063e754      
0063e75b      return i;
0063e630  }

0063e652                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
0063e67b                                                                                   90 8d 74 26 00                             ..t&.
0063e69c                                                                                      8d 74 26 00                              .t&.
0063e6bc                                                                                      8d 74 26 00                              .t&.
0063e6dc                                                                                      8d 74 26 00                              .t&.
0063e6fc                                                                                      8d 74 26 00                              .t&.
0063e71c                                                                                      8d 74 26 00                              .t&.
0063e73c                                                                                      8d 74 26 00                              .t&.
0063e75c                                                                                      8d 74 26 00                              .t&.

0063e760  uint32_t _Y_111_to_Y_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063e760  {
0063e77c      int32_t esi = *(uint32_t*)((char*)arg1 + 0x3c);
0063e785      int32_t ebp = *(uint32_t*)((char*)arg1 + 0x4834);
0063e78b      int32_t ebx = *(uint32_t*)((char*)arg1 + 0x37f0);
0063e791      int32_t var_54 = data_907a68;
0063e79b      int32_t var_50 = data_907a6c;
0063e7a5      int32_t var_4c = data_907a70;
0063e7af      int32_t var_48 = data_907a74;
0063e800      void var_44;
0063e800      int32_t eax_6 = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), esi, *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_44);
0063e800      
0063e807      if (eax_6 != 0)
0063e810          return eax_6;
0063e810      
0063e811      int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063e811      
0063e830      if (((uint32_t)operator==(&var_44, &var_54)) != 0)
0063e84a          return *(uint32_t*)(ebx + 0xa4)(ebp, edi_1, esi);
0063e84a      
0063e85a      int32_t var_7c_1 = 0x907938;
0063e862      int32_t var_34;
0063e862      operator&(&var_34, &var_44);
0063e873      int32_t var_24 = var_34;
0063e87f      int32_t var_30;
0063e87f      int32_t var_20 = var_30;
0063e883      int32_t var_2c;
0063e883      int32_t var_1c = var_2c;
0063e887      int32_t var_28;
0063e887      int32_t var_18 = var_28;
0063e89b      uint32_t eax_12 = ((uint32_t)operator!=(&var_24, &data_9078e0));
0063e89b      
0063e8a0      if (eax_12 == 0)
0063e8c1          return eax_12;
0063e8c1      
0063e8b5      return sub_63e5a0(ebp, edi_1, &var_24, esi);
0063e760  }

0063e8c2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....

0063e8d0  int32_t _Output_Interleave_General_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063e8d0  {
0063e935      int32_t var_44;
0063e935      int32_t result = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), *(uint32_t*)((char*)arg1 + 0x3c), *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_44);
0063e935      
0063e93c      if (result == 0)
0063e93c      {
0063e948          result = *(uint32_t*)((char*)arg1 + 0x34);
0063ec16          int32_t esi_1;
0063ec16          
0063ec16          if ((result == 2 && *(uint32_t*)((char*)arg1 + 0x58) == 1))
0063ec22              esi_1 = (*(uint32_t*)((char*)arg1 + 0x3814) + 2);
0063ec16          else
0063e954              esi_1 = *(uint32_t*)((char*)arg1 + 0x3814);
0063e954          
0063e95a          int32_t edx_2 = 0;
0063e95c          int32_t edi_1 = *(uint32_t*)((char*)arg1 + 0x30);
0063e95c          
0063e961          if (edi_1 > 0)
0063e961          {
0063e967              int32_t var_18_1 = edi_1;
0063e96b              int32_t var_1c_1 = esi_1;
0063e96f              int32_t var_24_1 = *(uint32_t*)((char*)arg1 + 0x4834);
0063e96f              
0063e97d              while (true)
0063e97d              {
0063e97d                  int32_t var_40;
0063e97d                  int32_t var_3c;
0063e97d                  int32_t var_38;
0063e97d                  
0063e97d                  if (edx_2 < *(uint32_t*)((char*)arg1 + 0x37c0))
0063e97d                  {
0063e985                      void* esi_2 = *(uint32_t*)((char*)arg1 + 0x37cc);
0063e991                      int32_t ecx_4 = (edx_2 << 4);
0063e994                      void* edi_2 = ((char*)esi_2 + ecx_4);
0063e997                      int32_t ebx_1 = *(uint32_t*)((char*)edi_2 + 8);
0063e997                      
0063e99c                      if (ebx_1 > 0)
0063e99c                      {
0063e9a2                          int32_t eax_3 = *(uint32_t*)((ecx_4 + esi_2) + 4);
0063e9a6                          int32_t esi_3 = 0;
0063e9b2                          int32_t edx_3 = var_24_1;
0063e9b2                          
0063eaca                          do
0063eaca                          {
0063e9b6                              int32_t ecx_5 = 0;
0063e9b6                              
0063e9ba                              if (eax_3 > 0)
0063e9ba                              {
0063e9c0                                  int32_t ebx_2 = var_38;
0063e9c0                                  
0063eaba                                  do
0063eaba                                  {
0063e9c8                                      int32_t esi_4 = var_40;
0063e9c8                                      
0063e9ce                                      if (esi_4 < ebx_2)
0063e9ce                                      {
0063e9d4                                          int32_t eax_4 = var_3c;
0063e9da                                          int32_t edi_4 = (esi_4 << 4);
0063e9e1                                          int32_t edx_4 = var_18_1;
0063e9e1                                          
0063ea92                                          do
0063ea92                                          {
0063e9e9                                              int32_t ecx_6 = var_44;
0063e9e9                                              
0063e9ef                                              if (ecx_6 < eax_4)
0063e9ef                                              {
0063ea13                                                  while (true)
0063ea13                                                  {
0063ea13                                                      eax_4 = *(uint8_t*)((edx_3 + edi_4) + (ecx_6 << 1));
0063ea18                                                      char* edx_5 = (edx_4 * ecx_6);
0063ea1f                                                      ecx_6 += 1;
0063ea24                                                      edx_5[((esi_4 * *(uint32_t*)((char*)arg1 + 0x3c)) + var_1c_1)] = eax_4;
0063ea27                                                      eax_4 = var_3c;
0063ea27                                                      
0063ea2d                                                      if (ecx_6 >= eax_4)
0063ea2d                                                          break;
0063ea2d                                                      
0063ea10                                                      edx_4 = *(uint32_t*)((char*)arg1 + 0x30);
0063ea13                                                  }
0063ea13                                                  
0063ea85                                                  edx_4 = *(uint32_t*)((char*)arg1 + 0x30);
0063ea88                                                  ebx_2 = var_38;
0063e9ef                                              }
0063e9ef                                              
0063ea8c                                              edi_4 += 0x10;
0063ea8f                                              esi_4 += 1;
0063ea92                                          } while (esi_4 < ebx_2);
0063ea92                                          
0063ea98                                          var_18_1 = edx_4;
0063eaaa                                          edi_2 = (*(uint32_t*)((char*)arg1 + 0x37cc) + ecx_4);
0063eaae                                          eax_3 = *(uint32_t*)((char*)edi_2 + 4);
0063e9ce                                      }
0063e9ce                                      
0063eab1                                      edx_3 += 0x80;
0063eab7                                      ecx_5 += 1;
0063eaba                                  } while (ecx_5 < eax_3);
0063eaba                                  
0063eac4                                  ebx_1 = *(uint32_t*)((char*)edi_2 + 8);
0063e9ba                              }
0063e9ba                              
0063eac7                              esi_3 += 1;
0063eaca                          } while (esi_3 < ebx_1);
0063eaca                          
0063ead0                          var_24_1 = edx_3;
0063ead8                          result = *(uint32_t*)((char*)arg1 + 0x34);
0063e99c                      }
0063e97d                  }
0063e97d                  else if ((edx_2 == 3 && result == 5))
0063eb93                  {
0063eb99                      int32_t ecx_9 = var_40;
0063eb9d                      int32_t ebx_5 = var_38;
0063eb9d                      
0063eba3                      if (ecx_9 < ebx_5)
0063eba3                      {
0063eba5                          int32_t eax_9 = var_3c;
0063eba9                          int32_t esi_9 = var_18_1;
0063eba9                          
0063ebe5                          do
0063ebe5                          {
0063ebb5                              int32_t edx_7 = var_44;
0063ebb5                              
0063ebbb                              if (edx_7 < eax_9)
0063ebbb                              {
0063ebc5                                  while (true)
0063ebc5                                  {
0063ebc5                                      char* esi_10 = (esi_9 * edx_7);
0063ebc8                                      edx_7 += 1;
0063ebcf                                      esi_10[((ecx_9 * *(uint32_t*)((char*)arg1 + 0x3c)) + var_1c_1)] = 0xff;
0063ebd3                                      eax_9 = var_3c;
0063ebd3                                      
0063ebd9                                      if (edx_7 >= eax_9)
0063ebd9                                          break;
0063ebd9                                      
0063ebc0                                      esi_9 = *(uint32_t*)((char*)arg1 + 0x30);
0063ebc5                                  }
0063ebc5                                  
0063ebdb                                  esi_9 = *(uint32_t*)((char*)arg1 + 0x30);
0063ebde                                  ebx_5 = var_38;
0063ebbb                              }
0063ebbb                              
0063ebe2                              ecx_9 += 1;
0063ebe5                          } while (ecx_9 < ebx_5);
0063ebe5                          
0063ebe7                          var_18_1 = esi_9;
0063ebef                          result = *(uint32_t*)((char*)arg1 + 0x34);
0063eba3                      }
0063eba3                      
0063ebf6                      var_24_1 += 0x80;
0063eb93                  }
0063eb93                  
0063ea49                  int32_t ecx_7 = var_18_1;
0063ea4d                  int32_t ebx_4 = var_1c_1;
0063ea4d                  
0063eb81                  while (true)
0063eb81                  {
0063eb81                      if ((result == 2 && *(uint32_t*)((char*)arg1 + 0x58) == 1))
0063eb87                          ebx_4 -= 1;
0063eb81                      else
0063ea5a                          ebx_4 += 1;
0063ea5a                      
0063ea5b                      edx_2 += 1;
0063ea5b                      
0063ea5e                      if (edx_2 >= ecx_7)
0063eb7a                          return result;
0063eb7a                      
0063ea66                      if (edx_2 <= 0)
0063ea66                      {
0063ec2a                          var_18_1 = ecx_7;
0063ec2e                          var_1c_1 = ebx_4;
0063ec32                          break;
0063ea66                      }
0063ea66                      
0063ea72                      if (*(uint32_t*)((char*)arg1 + 0x58) != 4)
0063ea72                      {
0063ea74                          var_18_1 = ecx_7;
0063ea78                          var_1c_1 = ebx_4;
0063ea7c                          break;
0063ea72                      }
0063ea72                      
0063eae0                      int32_t esi_6 = var_40;
0063eae4                      int32_t edi_9 = var_38;
0063eae4                      
0063eaea                      if (esi_6 < edi_9)
0063eaea                      {
0063eaf0                          int32_t eax_5 = var_3c;
0063eaf0                          
0063eb55                          do
0063eb55                          {
0063eaf8                              int32_t edx_6 = var_44;
0063eaf8                              
0063eafe                              if (edx_6 < eax_5)
0063eafe                              {
0063eb13                                  while (true)
0063eb13                                  {
0063eb13                                      char* ecx_8 = (ecx_7 * edx_6);
0063eb13                                      
0063eb19                                      if (edx_2 >= 3)
0063eb3a                                          ecx_8[((esi_6 * *(uint32_t*)((char*)arg1 + 0x3c)) + ebx_4)] = 0xff;
0063eb19                                      else
0063eb19                                      {
0063eb23                                          int32_t edi_12 = ((esi_6 * *(uint32_t*)((char*)arg1 + 0x3c)) + ebx_4);
0063eb25                                          eax_5 = ecx_8[(edi_12 - 1)];
0063eb29                                          ecx_8[edi_12] = eax_5;
0063eb19                                      }
0063eb19                                      
0063eb3e                                      edx_6 += 1;
0063eb3f                                      eax_5 = var_3c;
0063eb3f                                      
0063eb45                                      if (edx_6 >= eax_5)
0063eb45                                          break;
0063eb45                                      
0063eb10                                      ecx_7 = *(uint32_t*)((char*)arg1 + 0x30);
0063eb13                                  }
0063eb13                                  
0063eb4b                                  ecx_7 = *(uint32_t*)((char*)arg1 + 0x30);
0063eb4e                                  edi_9 = var_38;
0063eafe                              }
0063eafe                              
0063eb52                              esi_6 += 1;
0063eb55                          } while (esi_6 < edi_9);
0063eb55                          
0063eb5b                          result = *(uint32_t*)((char*)arg1 + 0x34);
0063eaea                      }
0063eb81                  }
0063e97d              }
0063e961          }
0063e93c      }
0063e93c      
0063eb7a      return result;
0063e8d0  }

0063ea02        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
0063ea31                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
0063eb0a                                8d b6 00 00 00 00                                                            ......
0063eb2e                                            8b f6                                                                ..
0063eb63           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063eb8d                                         8d 76 00                                                               .v.
0063ebbf                                                                                               90                                 .
0063ec03           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063ec37                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

0063ec40  int32_t* _US_General_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063ec40  {
0063ec4a      void* ebp = arg1;
0063ec51      void* ebx = nullptr;
0063ec53      int32_t* result = *(uint32_t*)((char*)ebp + 0x37e0);
0063ec5c      int32_t var_94;
0063ec5c      int32_t var_90_1;
0063ec5c      int32_t var_8c_1;
0063ec5c      int32_t eax_3;
0063ec5c      int32_t ecx_3;
0063ec5c      
0063ec5c      if (*(uint32_t*)result == 1)
0063ec5c      {
0063ff24          int32_t edx_49 = *(uint32_t*)((char*)ebp + 0x30);
0063ff2d          var_94 = edx_49;
0063ff2d          
0063ff34          if (edx_49 > *(uint32_t*)((char*)ebp + 0x3820))
0063ff34          {
0063ff3a              void* edi_46 = result[0xd];
0063ff3d              int32_t eax_102 = *(uint32_t*)((char*)ebp + 0x37b8);
0063ff46              void* var_88_5 = edi_46;
0063ff4d              var_90_1 = eax_102;
0063ff59              int32_t eax_105 = *(uint32_t*)((char*)ebp + 0x37bc);
0063ff62              var_8c_1 = eax_105;
0063ff6e              ecx_3 = ((((int64_t)eax_102) / *(uint32_t*)((char*)edi_46 + 4)) * 8);
0063ff76              eax_3 = ((((int64_t)eax_105) / *(uint32_t*)((char*)edi_46 + 8)) * 8);
0063ff78              goto label_63eca2;
0063ff34          }
0063ec5c      }
0063ec5c      else
0063ec5c      {
0063ec62          int32_t eax = *(uint32_t*)((char*)ebp + 0x37b8);
0063ec68          int32_t esi_1 = *(uint32_t*)((char*)ebp + 0x37bc);
0063ec71          var_90_1 = eax;
0063ec7a          ecx_3 = (eax * 8);
0063ec7c          var_8c_1 = esi_1;
0063ec88          eax_3 = (esi_1 * 8);
0063ec8d          var_94 = *(uint32_t*)((char*)ebp + 0x30);
0063eca2      label_63eca2:
0063eca2          int16_t* var_80_1 = *(uint32_t*)((char*)ebp + 0x4834);
0063ecab          bool cond:1_1 = *(uint32_t*)((char*)ebp + 0x4de8) == 1;
0063ecae          void* var_88_1 = nullptr;
0063ecd2          void* s;
0063ecd2          __builtin_memset(&s, 0, 0x1c);
0063ed06          char var_84_1 = 0;
0063ed0d          void* var_78_1;
0063ed0d          void* var_74_1;
0063ed0d          void* var_70_1;
0063ed0d          void* var_6c_1;
0063ed0d          int16_t* var_68_1;
0063ed0d          int16_t* var_64_1;
0063ed0d          
0063ed0d          if (cond:1_1)
0063ed0d          {
0063fe35              if ((var_90_1 == 2 && var_8c_1 == 1))
0063fe35              {
0063fe42                  var_84_1 = 1;
0063fe49                  int32_t var_68_3;
0063fe49                  
0063fe49                  if (*(uint32_t*)((char*)ebp + 0x74) == 0)
0063fe49                  {
0063fe5c                      int32_t edx_42 = *(uint32_t*)((char*)ebp + 0x37c0);
0063fe66                      var_68_3 = 0;
0063fe6d                      int32_t i = (edx_42 - 1);
0063fe6d                      
0063fe70                      if (edx_42 != 0)
0063fe70                      {
0063fe72                          int32_t edx_43 = *(uint32_t*)((char*)ebp + 0x37cc);
0063fe81                          int32_t edx_45 = (i << 4);
0063fe8b                          int32_t ecx_91 = 0;
0063fe8b                          
0063feb2                          do
0063feb2                          {
0063fea4                              i -= 1;
0063feaa                              ecx_91 += (*(uint32_t*)((edx_45 + edx_43) + 4) * *(uint32_t*)((edx_45 + edx_43) + 8));
0063feac                              edx_45 -= 0x10;
0063feb2                          } while (i != 0xffffffff);
0063feb2                          
0063feb4                          var_68_3 = ecx_91;
0063fec2                          ebx = nullptr;
0063fec9                          ebp = arg1;
0063fe70                      }
0063fe49                  }
0063fe49                  else
0063fe50                      var_68_3 = 1;
0063fe50                  
0063ff0c                  void* esi_48 = (((arg2 * 2) * (var_68_3 << 6)) + *(uint32_t*)(*(uint32_t*)((char*)ebp + 0x4dec) + 4));
0063ff11                  var_88_1 = esi_48;
0063ff18                  var_68_1 = ((var_68_3 << 8) + esi_48);
0063fe35              }
0063fe35              
0063fcdc              if ((var_90_1 == 2 && var_8c_1 == 2))
0063fcdc              {
0063fce9                  var_84_1 = 2;
0063fcf0                  int32_t edx_34;
0063fcf0                  
0063fcf0                  if (*(uint32_t*)((char*)ebp + 0x74) == 0)
0063fcf0                  {
0063fcf9                      int32_t esi_35 = *(uint32_t*)((char*)ebp + 0x37c0);
0063fcff                      edx_34 = 0;
0063fcff                      
0063fd0d                      if (esi_35 != 0)
0063fd0d                      {
0063fd0f                          int32_t edi_42 = *(uint32_t*)((char*)ebp + 0x37cc);
0063fd1c                          int32_t var_8c_3 = edi_42;
0063fd2d                          int32_t i_1 = (esi_35 - 1);
0063fd3d                          int32_t esi_38 = ((esi_35 - 1) << 4);
0063fd3d                          
0063fd52                          do
0063fd52                          {
0063fd44                              i_1 -= 1;
0063fd4a                              edx_34 += (*(uint32_t*)((esi_38 + edi_42) + 4) * *(uint32_t*)((esi_38 + edi_42) + 8));
0063fd4c                              esi_38 -= 0x10;
0063fd52                          } while (i_1 != 0xffffffff);
0063fd52                          
0063fd62                          ebp = arg1;
0063fd0d                      }
0063fcf0                  }
0063fcf0                  else
0063fcf2                      edx_34 = 1;
0063fcf2                  
0063fd69                  int32_t edx_35 = (edx_34 << 6);
0063fd6c                  void** ebp_45 = *(uint32_t*)((char*)ebp + 0x4dec);
0063fd79                  void* esi_39 = *(uint32_t*)ebp_45;
0063fd7c                  int32_t edi_43 = (edx_35 * 2);
0063fda8                  void* ebx_41 = ((arg2 + 1) * edi_43);
0063fdae                  void* eax_100 = ((arg2 * 2) * edx_35);
0063fdbe                  var_70_1 = ((char*)esi_39 + ebx_41);
0063fdc5                  int32_t edi_44 = (edi_43 * (arg2 + 2));
0063fdca                  var_6c_1 = ((char*)esi_39 + eax_100);
0063fdd1                  void* edx_37 = ebp_45[1];
0063fdd7                  var_78_1 = ((char*)esi_39 + edi_44);
0063fde0                  ebx = nullptr;
0063fde7                  var_88_1 = ((char*)edx_37 + eax_100);
0063fdf5                  var_68_1 = ((char*)edx_37 + edi_44);
0063fdfc                  void* edx_39 = ebp_45[2];
0063fe01                  s = ((char*)ebx_41 + edx_39);
0063fe0a                  ebp = arg1;
0063fe11                  var_74_1 = ((char*)eax_100 + edx_39);
0063fe1f                  var_64_1 = ((char*)edx_39 + edi_44);
0063fcdc              }
0063ed0d          }
0063ed0d          
0063ed73          void var_ac;
0063ed73          result = sub_62e6a0(((char*)ebp + 4), ecx_3, eax_3, arg2, arg3, var_94, *(uint32_t*)((char*)ebp + 0x3c), *(uint32_t*)((char*)ebp + 0x20), *(uint32_t*)((char*)ebp + 0x24), *(uint32_t*)((char*)ebp + 0x28), ((char*)ebp + 0x3814), &var_ac);
0063ed73          
0063ed7a          if (result == 0)
0063ed7a          {
0063ed80              int32_t edx_4 = *(uint32_t*)((char*)ebp + 0x34);
0063fc73              int32_t var_8c_2;
0063fc73              
0063fc73              if ((edx_4 == 2 && *(uint32_t*)((char*)ebp + 0x58) == 1))
0063fc73              {
0063fc7f                  var_8c_2 = *(uint32_t*)((char*)ebp + 0x3814);
0063fc86                  int32_t eax_96 = *(uint32_t*)((char*)ebp + 0x3820);
0063fc86                  
0063fc8e                  if (eax_96 == 0)
0063fc90                      var_8c_2 += 2;
0063fc8e                  else if (eax_96 == 1)
0063fca6                      var_8c_2 += 1;
0063fc73              }
0063fc73              else
0063ed98                  var_8c_2 = (*(uint32_t*)((char*)ebp + 0x3814) + *(uint32_t*)((char*)ebp + 0x3820));
0063ed98              
0063eda5              int32_t* result_2 = **(uint32_t**)((char*)ebp + 0x37e0);
0063eda7              int32_t* esi_4 = nullptr;
0063edab              int32_t var_18_1 = 0;
0063edab              
0063edb9              while (true)
0063edb9              {
0063edb9                  result = *(uint32_t*)((char*)ebp + 0x30);
0063edbc                  int32_t* result_1 = result_2;
0063edbc                  
0063edc5                  if (result_1 >= result)
0063edc7                      result_1 = result;
0063edc7                  
0063edcb                  if (esi_4 >= result_1)
0063edcb                      break;
0063edcb                  
0063fb98                  int32_t var_3c_1;
0063fb98                  int32_t var_30_1;
0063fb98                  int32_t ebx_1;
0063fb98                  int32_t edi_3;
0063fb98                  
0063fb98                  if ((result_2 == 1 && *(uint32_t*)((char*)ebp + 0x4de0) == 0))
0063fb98                  {
0063fbae                      var_3c_1 = 1;
0063fbb5                      int32_t edi_39 = *(uint32_t*)(*(uint32_t*)((char*)ebp + 0x37e0) + 0x34);
0063fbbf                      var_30_1 = 1;
0063fbc6                      ebx_1 = *(uint32_t*)((var_18_1 + edi_39) + 4);
0063fbca                      edi_3 = *(uint32_t*)((var_18_1 + edi_39) + 8);
0063fb98                  }
0063fb98                  else
0063fb98                  {
0063ede7                      int32_t edx_5 = *(uint32_t*)(*(uint32_t*)((char*)ebp + 0x37e0) + 0x34);
0063edf1                      edi_3 = *(uint32_t*)((var_18_1 + edx_5) + 8);
0063edf5                      ebx_1 = *(uint32_t*)((var_18_1 + edx_5) + 4);
0063edf9                      var_3c_1 = edi_3;
0063ee00                      var_30_1 = ebx_1;
0063fb98                  }
0063fb98                  
0063ee10                  int32_t ecx_5 = (((int64_t)*(uint32_t*)((char*)ebp + 0x37b8)) / ebx_1);
0063ee18                  ebx_1 = var_84_1;
0063ee20                  int32_t temp0_2 = (((int64_t)*(uint32_t*)((char*)ebp + 0x37bc)) / edi_3);
0063ee25                  void var_5ac;
0063ee25                  
0063ee25                  if (ebx_1 == 1)
0063ee25                  {
0063f970                      void* i_7 = &var_5ac;
0063f974                      int32_t edx_26 = 0;
0063f974                      
0063f97f                      if (var_30_1 > 0)
0063f97f                      {
0063fa4a                          do
0063fa4a                          {
0063f98e                              void* i_2 = i_7;
0063f99d                              int16_t* edx_27 = var_80_1;
0063f9b9                              int16_t* ecx_85 = var_68_1;
0063f9b9                              
0063fa18                              do
0063fa18                              {
0063f9ca                                  if (ecx_5 == 2)
0063f9ca                                  {
0063fa73                                      int32_t ebp_35 = (((int32_t)*(uint16_t*)edx_27) * 3);
0063fa88                                      *(uint8_t*)i_2 = ((int8_t)(((((int32_t)*(uint16_t*)((char*)var_88_1 + 0xe)) + ebp_35) + 1) >> 2));
0063fa95                                      *(uint8_t*)((char*)i_2 + 1) = ((int8_t)(((((int32_t)edx_27[1]) + ebp_35) + 2) >> 2));
0063fa9c                                      int32_t ebp_36 = (((int32_t)edx_27[1]) * 3);
0063faa9                                      *(uint8_t*)((char*)i_2 + 2) = ((int8_t)(((ebp_36 + ((int32_t)*(uint16_t*)edx_27)) + 1) >> 2));
0063fab7                                      *(uint8_t*)((char*)i_2 + 3) = ((int8_t)(((ebp_36 + ((int32_t)edx_27[2])) + 2) >> 2));
0063fabe                                      int32_t ebp_37 = (((int32_t)edx_27[2]) * 3);
0063facc                                      *(uint8_t*)((char*)i_2 + 4) = ((int8_t)(((ebp_37 + ((int32_t)edx_27[1])) + 1) >> 2));
0063fada                                      *(uint8_t*)((char*)i_2 + 5) = ((int8_t)(((ebp_37 + ((int32_t)edx_27[3])) + 2) >> 2));
0063fae1                                      int32_t ebp_38 = (((int32_t)edx_27[3]) * 3);
0063faef                                      *(uint8_t*)((char*)i_2 + 6) = ((int8_t)(((ebp_38 + ((int32_t)edx_27[2])) + 1) >> 2));
0063fafd                                      *(uint8_t*)((char*)i_2 + 7) = ((int8_t)(((ebp_38 + ((int32_t)edx_27[4])) + 2) >> 2));
0063fb04                                      int32_t ebp_39 = (((int32_t)edx_27[4]) * 3);
0063fb12                                      *(uint8_t*)((char*)i_2 + 8) = ((int8_t)(((ebp_39 + ((int32_t)edx_27[3])) + 1) >> 2));
0063fb20                                      *(uint8_t*)((char*)i_2 + 9) = ((int8_t)(((ebp_39 + ((int32_t)edx_27[5])) + 2) >> 2));
0063fb27                                      int32_t ebp_40 = (((int32_t)edx_27[5]) * 3);
0063fb35                                      *(uint8_t*)((char*)i_2 + 0xa) = ((int8_t)(((ebp_40 + ((int32_t)edx_27[4])) + 1) >> 2));
0063fb43                                      *(uint8_t*)((char*)i_2 + 0xb) = ((int8_t)(((ebp_40 + ((int32_t)edx_27[6])) + 2) >> 2));
0063fb4a                                      int32_t ebp_41 = (((int32_t)edx_27[6]) * 3);
0063fb58                                      *(uint8_t*)((char*)i_2 + 0xc) = ((int8_t)(((ebp_41 + ((int32_t)edx_27[5])) + 1) >> 2));
0063fb66                                      *(uint8_t*)((char*)i_2 + 0xd) = ((int8_t)(((ebp_41 + ((int32_t)edx_27[7])) + 2) >> 2));
0063fb6d                                      int32_t ebp_42 = (((int32_t)edx_27[7]) * 3);
0063fb7b                                      *(uint8_t*)((char*)i_2 + 0xe) = ((int8_t)(((((int32_t)edx_27[6]) + ebp_42) + 1) >> 2));
0063fb88                                      *(uint8_t*)((char*)i_2 + 0xf) = ((int8_t)(((((int32_t)*(uint16_t*)ecx_85) + ebp_42) + 2) >> 2));
0063f9ca                                  }
0063f9ca                                  else
0063f9ca                                  {
0063f9d0                                      int32_t eax_36;
0063f9d0                                      eax_36 = *(uint8_t*)edx_27;
0063f9d2                                      *(uint8_t*)i_2 = eax_36;
0063f9d4                                      eax_36 = edx_27[1];
0063f9d7                                      *(uint8_t*)((char*)i_2 + 1) = eax_36;
0063f9da                                      eax_36 = edx_27[2];
0063f9dd                                      *(uint8_t*)((char*)i_2 + 2) = eax_36;
0063f9e0                                      eax_36 = edx_27[3];
0063f9e3                                      *(uint8_t*)((char*)i_2 + 3) = eax_36;
0063f9e6                                      eax_36 = edx_27[4];
0063f9e9                                      *(uint8_t*)((char*)i_2 + 4) = eax_36;
0063f9ec                                      eax_36 = edx_27[5];
0063f9ef                                      *(uint8_t*)((char*)i_2 + 5) = eax_36;
0063f9f2                                      eax_36 = edx_27[6];
0063f9f5                                      *(uint8_t*)((char*)i_2 + 6) = eax_36;
0063f9f8                                      eax_36 = edx_27[7];
0063f9fb                                      *(uint8_t*)((char*)i_2 + 7) = eax_36;
0063f9ca                                  }
0063f9ca                                  
0063f9fe                                  edx_27 = &edx_27[8];
0063fa01                                  ecx_85 = &ecx_85[8];
0063fa04                                  i_2 += 0x20;
0063fa07                                  var_88_1 += 0x10;
0063fa18                              } while (((char*)i_7 + 0x100) > i_2);
0063fa18                              
0063fa1a                              var_80_1 = edx_27;
0063fa2f                              var_68_1 = ecx_85;
0063fa44                              i_7 += (ecx_5 << 3);
0063fa47                              edx_26 += 1;
0063fa4a                          } while (edx_26 < var_30_1);
0063fa4a                          
0063fa57                          ebp = arg1;
0063f97f                      }
0063ee25                  }
0063ee25                  else if (ebx_1 == 2)
0063ee30                  {
0063f0d0                      int32_t edx_15 = 0;
0063f0d0                      
0063f0db                      if (var_3c_1 > 0)
0063f0db                      {
0063f0e3                          int32_t ebx_9 = (temp0_2 << 8);
0063f0f2                          int32_t edi_14 = (ecx_5 * 8);
0063f0fd                          int32_t ebx_11 = (temp0_2 << 5);
0063f11f                          int32_t eax_24 = var_30_1;
0063f126                          int32_t esi_10 = var_3c_1;
0063f134                          int32_t ecx_10 = ebx_9;
0063f134                          
0063f3c1                          do
0063f3c1                          {
0063f144                              void* ebx_13 = (&var_5ac + (ecx_10 * edx_15));
0063f146                              int32_t ebp_6 = 0;
0063f146                              
0063f14a                              if (eax_24 > 0)
0063f14a                              {
0063f3b8                                  do
0063f3b8                                  {
0063f3ea                                      if ((ecx_5 == 2 && temp0_2 == 2))
0063f3ea                                      {
0063f3f2                                          int16_t* eax_32 = var_80_1;
0063f40c                                          int32_t var_28_2 = 7;
0063f421                                          char* edx_18 = nullptr;
0063f8af                                          bool cond:7_1;
0063f8af                                          
0063f8af                                          do
0063f8af                                          {
0063f42b                                              int32_t esi_16 = (((int32_t)*(uint16_t*)eax_32) * 9);
0063f43d                                              int32_t ebx_18 = ((int32_t)eax_32[1]);
0063f44d                                              int32_t var_9c_2;
0063f44d                                              int32_t var_5c_2;
0063f44d                                              int32_t ebx_20;
0063f44d                                              
0063f44d                                              if (edx_18 == 0)
0063f44d                                              {
0063f48b                                                  ebx_20 = (((int32_t)*(uint16_t*)((char*)var_70_1 + 0x70)) * 3);
0063f4a0                                                  var_5c_2 = ((int32_t)*(uint16_t*)((char*)var_6c_1 + 0x7e));
0063f4ab                                                  var_9c_2 = ((int32_t)*(uint16_t*)((char*)var_70_1 + 0x72));
0063f44d                                              }
0063f44d                                              else
0063f44d                                              {
0063f453                                                  ebx_20 = (((int32_t)eax_32[-8]) * 3);
0063f465                                                  var_5c_2 = ((int32_t)*(uint16_t*)((char*)var_88_1 - 2));
0063f46c                                                  var_9c_2 = ((int32_t)eax_32[-7]);
0063f44d                                              }
0063f44d                                              
0063f4bb                                              int32_t var_60_2;
0063f4bb                                              int32_t var_58_2;
0063f4bb                                              int32_t var_48_3;
0063f4bb                                              
0063f4bb                                              if (var_28_2 == 0)
0063f4bb                                              {
0063f4fd                                                  var_48_3 = (((int32_t)*(uint16_t*)s) * 3);
0063f50f                                                  var_58_2 = ((int32_t)*(uint16_t*)((char*)var_74_1 + 0xe));
0063f521                                                  var_60_2 = ((int32_t)*(uint16_t*)((char*)s + 2));
0063f4bb                                              }
0063f4bb                                              else
0063f4bb                                              {
0063f4c4                                                  var_48_3 = (((int32_t)eax_32[8]) * 3);
0063f4d6                                                  var_58_2 = ((int32_t)*(uint16_t*)((char*)var_88_1 + 0x1e));
0063f4e1                                                  var_60_2 = ((int32_t)eax_32[9]);
0063f4bb                                              }
0063f4bb                                              
0063f528                                              int32_t edi_22 = ((((int32_t)*(uint16_t*)((char*)var_88_1 + 0xe)) * 3) + esi_16);
0063f542                                              *(uint8_t*)(edx_18 + ebx_13) = ((int8_t)((((edi_22 + ebx_20) + var_5c_2) + 8) >> 4));
0063f54c                                              void* eax_33 = &eax_32[1];
0063f54f                                              int32_t esi_17 = (esi_16 + (ebx_18 * 3));
0063f566                                              *(uint8_t*)((edx_18 + ebx_13) + 1) = ((int8_t)((((ebx_20 + esi_17) + var_9c_2) + 7) >> 4));
0063f57c                                              *(uint8_t*)((edx_18 + ebx_13) + 0x20) = ((int8_t)((((edi_22 + var_48_3) + var_58_2) + 8) >> 4));
0063f58e                                              void* i_3 = (((char*)ebx_13 + edx_18) + 2);
0063f592                                              *(uint8_t*)((edx_18 + ebx_13) + 0x21) = ((int8_t)((((var_48_3 + esi_17) + var_60_2) + 7) >> 4));
0063f59a                                              void* var_70_3 = ((char*)var_70_1 + 2);
0063f5a2                                              void* var_7c_1 = ((char*)s + 2);
0063f5a2                                              
0063f715                                              do
0063f715                                              {
0063f5c3                                                  int32_t edx_20 = (((int32_t)*(uint16_t*)eax_33) * 9);
0063f5cd                                                  int32_t ecx_40 = ((int32_t)*(uint16_t*)((char*)eax_33 + 2));
0063f5e4                                                  int32_t var_60_3;
0063f5e4                                                  int32_t var_5c_3;
0063f5e4                                                  int32_t ebp_20;
0063f5e4                                                  
0063f5e4                                                  if (edx_18 == 0)
0063f5e4                                                  {
0063f61b                                                      ebp_20 = (((int32_t)*(uint16_t*)((char*)var_70_3 + 0x70)) * 3);
0063f627                                                      var_60_3 = ((int32_t)*(uint16_t*)((char*)var_70_3 + 0x6e));
0063f62e                                                      var_5c_3 = ((int32_t)*(uint16_t*)((char*)var_70_3 + 0x72));
0063f5e4                                                  }
0063f5e4                                                  else
0063f5e4                                                  {
0063f5ea                                                      ebp_20 = (((int32_t)*(uint16_t*)((char*)eax_33 - 0x10)) * 3);
0063f5f2                                                      var_60_3 = ((int32_t)*(uint16_t*)((char*)eax_33 - 0x12));
0063f5fd                                                      var_5c_3 = ((int32_t)*(uint16_t*)((char*)eax_33 - 0xe));
0063f5e4                                                  }
0063f5e4                                                  
0063f63e                                                  int32_t var_9c_3;
0063f63e                                                  int32_t var_58_3;
0063f63e                                                  int32_t var_24_2;
0063f63e                                                  
0063f63e                                                  if (var_28_2 == 0)
0063f63e                                                  {
0063f67d                                                      var_24_2 = (((int32_t)*(uint16_t*)var_7c_1) * 3);
0063f68c                                                      var_9c_3 = ((int32_t)*(uint16_t*)((char*)var_7c_1 - 2));
0063f693                                                      var_58_3 = ((int32_t)*(uint16_t*)((char*)var_7c_1 + 2));
0063f63e                                                  }
0063f63e                                                  else
0063f63e                                                  {
0063f64b                                                      var_24_2 = (((int32_t)*(uint16_t*)((char*)eax_33 + 0x10)) * 3);
0063f652                                                      var_9c_3 = ((int32_t)*(uint16_t*)((char*)eax_33 + 0xe));
0063f65d                                                      var_58_3 = ((int32_t)*(uint16_t*)((char*)eax_33 + 0x12));
0063f63e                                                  }
0063f63e                                                  
0063f69a                                                  int32_t esi_22 = ((((int32_t)*(uint16_t*)((char*)eax_33 - 2)) * 3) + edx_20);
0063f6ad                                                  eax_33 += 2;
0063f6b0                                                  *(uint8_t*)i_3 = ((int8_t)((((esi_22 + ebp_20) + var_60_3) + 8) >> 4));
0063f6b9                                                  int32_t edx_21 = (edx_20 + (ecx_40 * 3));
0063f6d2                                                  *(uint8_t*)((char*)i_3 + 1) = ((int8_t)((((ebp_20 + edx_21) + var_5c_3) + 7) >> 4));
0063f6ec                                                  *(uint8_t*)((char*)i_3 + 0x20) = ((int8_t)((((esi_22 + var_24_2) + var_9c_3) + 8) >> 4));
0063f6f6                                                  *(uint8_t*)((char*)i_3 + 0x21) = ((int8_t)((((var_24_2 + edx_21) + var_58_3) + 7) >> 4));
0063f6f9                                                  i_3 += 2;
0063f703                                                  var_70_3 += 2;
0063f70b                                                  var_7c_1 += 2;
0063f715                                              } while ((((char*)ebx_13 + edx_18) + 0xe) > i_3);
0063f715                                              
0063f725                                              int32_t ebp_26 = (((int32_t)*(uint16_t*)eax_33) * 9);
0063f737                                              int32_t ebx_27 = ((int32_t)*(uint16_t*)var_68_1);
0063f746                                              int32_t var_9c_4;
0063f746                                              int32_t var_58_4;
0063f746                                              int32_t ebx_29;
0063f746                                              
0063f746                                              if (edx_18 == 0)
0063f746                                              {
0063f77b                                                  ebx_29 = (((int32_t)*(uint16_t*)((char*)var_70_3 + 0x70)) * 3);
0063f789                                                  var_58_4 = ((int32_t)*(uint16_t*)((char*)var_70_3 + 0x6e));
0063f794                                                  var_9c_4 = ((int32_t)*(uint16_t*)((char*)var_78_1 + 0x70));
0063f746                                              }
0063f746                                              else
0063f746                                              {
0063f74c                                                  ebx_29 = (((int32_t)*(uint16_t*)((char*)eax_33 - 0x10)) * 3);
0063f753                                                  var_58_4 = ((int32_t)*(uint16_t*)((char*)eax_33 - 0x12));
0063f75e                                                  var_9c_4 = ((int32_t)var_68_1[-8]);
0063f746                                              }
0063f746                                              
0063f79b                                              var_68_1 = &var_68_1[8];
0063f7ac                                              int32_t var_60_4;
0063f7ac                                              int32_t var_5c_4;
0063f7ac                                              int32_t var_48_5;
0063f7ac                                              
0063f7ac                                              if (var_28_2 == 0)
0063f7ac                                              {
0063f7ed                                                  var_48_5 = (((int32_t)*(uint16_t*)var_7c_1) * 3);
0063f7ff                                                  var_5c_4 = ((int32_t)*(uint16_t*)((char*)var_7c_1 - 2));
0063f810                                                  var_60_4 = ((int32_t)*(uint16_t*)var_64_1);
0063f7ac                                              }
0063f7ac                                              else
0063f7ac                                              {
0063f7bc                                                  var_48_5 = (((int32_t)*(uint16_t*)((char*)eax_33 + 0x10)) * 3);
0063f7c7                                                  var_5c_4 = ((int32_t)*(uint16_t*)((char*)eax_33 + 0xe));
0063f7d1                                                  var_60_4 = ((int32_t)*(uint16_t*)var_68_1);
0063f7ac                                              }
0063f7ac                                              
0063f817                                              int32_t edi_34 = ((((int32_t)*(uint16_t*)((char*)eax_33 - 2)) * 3) + ebp_26);
0063f831                                              *(uint8_t*)((edx_18 + ebx_13) + 0xe) = ((int8_t)((((edi_34 + ebx_29) + var_58_4) + 8) >> 4));
0063f83c                                              eax_32 = ((char*)eax_33 + 2);
0063f83f                                              int32_t ebp_27 = (ebp_26 + (ebx_27 * 3));
0063f856                                              *(uint8_t*)((edx_18 + ebx_13) + 0xf) = ((int8_t)((((ebx_29 + ebp_27) + var_9c_4) + 7) >> 4));
0063f86c                                              *(uint8_t*)((edx_18 + ebx_13) + 0x2e) = ((int8_t)((((edi_34 + var_48_5) + var_5c_4) + 8) >> 4));
0063f886                                              *(uint8_t*)((edx_18 + ebx_13) + 0x2f) = ((int8_t)((((var_48_5 + ebp_27) + var_60_4) + 7) >> 4));
0063f88a                                              edx_18 = &edx_18[0x40];
0063f88d                                              var_88_1 += 0x10;
0063f895                                              var_70_1 = ((char*)var_70_3 - 0xe);
0063f89d                                              s = ((char*)var_7c_1 - 0xe);
0063f8a5                                              cond:7_1 = var_28_2 != 0;
0063f8a8                                              var_28_2 -= 1;
0063f8af                                          } while (cond:7_1);
0063f8b5                                          var_80_1 = eax_32;
0063f8cc                                          ecx_10 = ebx_9;
0063f8d3                                          eax_24 = var_30_1;
0063f8da                                          esi_10 = var_3c_1;
0063f8e1                                          ebx_13 += 0x10;
0063f8e4                                          var_70_1 += 0x80;
0063f8ef                                          s += 0x80;
0063f8fa                                          var_6c_1 += 0x80;
0063f905                                          var_78_1 += 0x80;
0063f910                                          var_74_1 += 0x80;
0063f91b                                          var_64_1 = &var_64_1[0x40];
0063f3ea                                      }
0063f3ea                                      else
0063f3ea                                      {
0063f160                                          edx_15 = 0;
0063f160                                          
0063f164                                          if (esi_10 > 0)
0063f164                                          {
0063f16c                                              int32_t edi_16 = 0;
0063f16c                                              
0063f3af                                              do
0063f3af                                              {
0063f173                                                  ebx_13 = (&var_5ac + edi_16);
0063f175                                                  ebp_6 = 0;
0063f175                                                  
0063f179                                                  if (eax_24 > 0)
0063f179                                                  {
0063f186                                                      void* esi_11 = var_70_1;
0063f18d                                                      int16_t* edi_17 = var_68_1;
0063f19b                                                      void* edx_16 = var_88_1;
0063f19b                                                      
0063f37a                                                      do
0063f37a                                                      {
0063f1a2                                                          int32_t eax_25 = 0;
0063f1a2                                                          
0063f1a6                                                          if (ecx_10 > 0)
0063f1a6                                                          {
0063f1b3                                                              int32_t esi_12 = edi_14;
0063f1cf                                                              int32_t ebp_7 = ebx_11;
0063f1dd                                                              int16_t* edx_17 = var_80_1;
0063f1dd                                                              
0063f2ed                                                              do
0063f2ed                                                              {
0063f1e4                                                                  int32_t ebx_14 = 0;
0063f1e4                                                                  
0063f1e8                                                                  if (esi_12 > 0)
0063f1e8                                                                  {
0063f1f5                                                                      int32_t edi_18 = ecx_5;
0063f1f5                                                                      
0063f2d5                                                                      do
0063f2d5                                                                      {
0063f1fc                                                                          char eax_26 = ((int8_t)*(uint16_t*)edx_17);
0063f1ff                                                                          int32_t ecx_11 = 0;
0063f201                                                                          edx_17 = &edx_17[1];
0063f201                                                                          
0063f206                                                                          if (ebp_7 > 0)
0063f206                                                                          {
0063f2b4                                                                              do
0063f2b4                                                                              {
0063f221                                                                                  int32_t i_4 = 0;
0063f221                                                                                  
0063f225                                                                                  if (edi_18 > 0)
0063f225                                                                                  {
0063f22e                                                                                      char* var_9c_1;
0063f22e                                                                                      char var_60_1;
0063f22e                                                                                      
0063f22e                                                                                      if (edi_18 < 6)
0063f22e                                                                                      {
0063f951                                                                                          var_9c_1 = ((((char*)ebx_13 + eax_25) + ebx_14) + ecx_11);
0063f95b                                                                                          var_60_1 = eax_26;
0063f22e                                                                                      }
0063f22e                                                                                      else
0063f22e                                                                                      {
0063f24c                                                                                          char* ebp_10 = ((((char*)ebx_13 + eax_25) + ebx_14) + ecx_11);
0063f255                                                                                          var_9c_1 = ebp_10;
0063f25f                                                                                          var_60_1 = eax_26;
0063f25f                                                                                          
0063f289                                                                                          do
0063f289                                                                                          {
0063f270                                                                                              ebp_10[i_4] = eax_26;
0063f274                                                                                              ebp_10[(i_4 + 1)] = eax_26;
0063f278                                                                                              ebp_10[(i_4 + 2)] = eax_26;
0063f27c                                                                                              ebp_10[(i_4 + 3)] = eax_26;
0063f280                                                                                              ebp_10[(i_4 + 4)] = eax_26;
0063f284                                                                                              i_4 += 5;
0063f289                                                                                          } while (i_4 <= (ecx_5 - 6));
0063f289                                                                                          
0063f28b                                                                                          edi_18 = ecx_5;
0063f22e                                                                                      }
0063f22e                                                                                      
0063f2a6                                                                                      do
0063f2a6                                                                                      {
0063f2a0                                                                                          var_9c_1[i_4] = var_60_1;
0063f2a3                                                                                          i_4 += 1;
0063f2a6                                                                                      } while (i_4 < edi_18);
0063f225                                                                                  }
0063f225                                                                                  
0063f2a8                                                                                  ecx_11 += 0x20;
0063f2b4                                                                              } while (ecx_11 < ebx_11);
0063f2b4                                                                              
0063f2c8                                                                              ebp_7 = ebx_11;
0063f2ca                                                                              esi_12 = edi_14;
0063f206                                                                          }
0063f206                                                                          
0063f2d1                                                                          ebx_14 += edi_18;
0063f2d5                                                                      } while (ebx_14 < esi_12);
0063f2d5                                                                      
0063f2e2                                                                      ecx_10 = ebx_9;
0063f1e8                                                                  }
0063f1e8                                                                  
0063f2e9                                                                  eax_25 += ebp_7;
0063f2ed                                                              } while (eax_25 < ecx_10);
0063f2ed                                                              
0063f2f3                                                              var_80_1 = edx_17;
0063f1a6                                                          }
0063f1a6                                                          
0063f324                                                          ebx_13 += (ecx_5 << 3);
0063f327                                                          esi_11 += 0x80;
0063f32d                                                          edx_16 += 0x80;
0063f333                                                          edi_17 = &edi_17[0x40];
0063f339                                                          ebp_6 += 1;
0063f33a                                                          s += 0x80;
0063f345                                                          eax_24 = var_30_1;
0063f34c                                                          var_6c_1 += 0x80;
0063f357                                                          var_78_1 += 0x80;
0063f362                                                          var_74_1 += 0x80;
0063f36d                                                          var_64_1 = &var_64_1[0x40];
0063f37a                                                      } while (ebp_6 < eax_24);
0063f37a                                                      
0063f380                                                      var_70_1 = esi_11;
0063f387                                                      esi_10 = var_3c_1;
0063f38e                                                      var_68_1 = edi_17;
0063f39c                                                      var_88_1 = edx_16;
0063f179                                                  }
0063f179                                                  
0063f3aa                                                  edi_16 += ecx_10;
0063f3ac                                                  edx_15 += 1;
0063f3af                                              } while (edx_15 < esi_10);
0063f164                                          }
0063f3ea                                      }
0063f3ea                                      
0063f3b5                                      ebp_6 += 1;
0063f3b8                                  } while (ebp_6 < eax_24);
0063f14a                              }
0063f14a                              
0063f3be                              edx_15 += 1;
0063f3c1                          } while (edx_15 < esi_10);
0063f3c1                          
0063f3ce                          ebp = arg1;
0063f0db                      }
0063ee30                  }
0063ee30                  else
0063ee30                  {
0063ee36                      int32_t edx_9 = 0;
0063ee36                      
0063ee41                      if (var_3c_1 > 0)
0063ee41                      {
0063ee49                          int32_t ebx_4 = (temp0_2 << 8);
0063ee58                          int32_t edi_6 = (ecx_5 * 8);
0063ee61                          int32_t eax_19 = (temp0_2 << 5);
0063ee78                          int32_t ebx_5 = ebx_4;
0063ee7f                          int32_t ebp_1 = var_30_1;
0063ee8d                          int32_t esi_5 = 0;
0063ee94                          int32_t edi_8 = var_3c_1;
0063ee94                          
0063f03d                          do
0063f03d                          {
0063eead                              void* ecx_6 = (&var_5ac + esi_5);
0063eeaf                              int32_t eax_20 = 0;
0063eeaf                              
0063eeb3                              if (ebp_1 > 0)
0063eeb3                              {
0063eec7                                  int32_t edx_10 = ecx_5;
0063eec7                                  
0063f01d                                  do
0063f01d                                  {
0063eece                                      int32_t esi_6 = 0;
0063eece                                      
0063eed2                                      if (ebx_5 > 0)
0063eed2                                      {
0063eedf                                          int32_t edx_11 = eax_19;
0063eee6                                          int32_t ebp_2 = edi_6;
0063eee6                                          
0063effc                                          do
0063effc                                          {
0063eeed                                              void* eax_21 = nullptr;
0063eeed                                              
0063eef1                                              if (ebp_2 > 0)
0063eef1                                              {
0063eefa                                                  int32_t ebp_3 = ecx_5;
0063ef16                                                  int16_t* esi_7 = var_80_1;
0063ef16                                                  
0063efcf                                                  do
0063efcf                                                  {
0063ef1d                                                      char ecx_7 = ((int8_t)*(uint16_t*)esi_7);
0063ef20                                                      void* ebx_6 = nullptr;
0063ef22                                                      esi_7 = &esi_7[1];
0063ef22                                                      
0063ef27                                                      if (edx_11 > 0)
0063ef27                                                      {
0063ef34                                                          void* edi_11 = ((char*)eax_21 + ((char*)ecx_6 + esi_6));
0063ef37                                                          uint32_t ecx_8 = ((uint32_t)ecx_7);
0063ef3a                                                          void* var_54_1 = edi_11;
0063ef41                                                          uint32_t var_50_1 = ecx_8;
0063ef56                                                          char eax_22 = ecx_8;
0063ef56                                                          
0063efb4                                                          do
0063efb4                                                          {
0063ef58                                                              int32_t i_5 = 0;
0063ef58                                                              
0063ef5c                                                              if (ebp_3 > 0)
0063ef5c                                                              {
0063ef61                                                                  char* esi_9;
0063ef61                                                                  
0063ef61                                                                  if (ebp_3 < 6)
0063f0c0                                                                      esi_9 = ((char*)ebx_6 + edi_11);
0063ef61                                                                  else
0063ef61                                                                  {
0063ef67                                                                      void* esi_8 = ((char*)ebx_6 + edi_11);
0063ef67                                                                      
0063ef89                                                                      do
0063ef89                                                                      {
0063ef71                                                                          *(uint8_t*)((char*)esi_8 + i_5) = eax_22;
0063ef74                                                                          *(uint8_t*)(((char*)esi_8 + i_5) + 1) = eax_22;
0063ef78                                                                          *(uint8_t*)(((char*)esi_8 + i_5) + 2) = eax_22;
0063ef7c                                                                          *(uint8_t*)(((char*)esi_8 + i_5) + 3) = eax_22;
0063ef80                                                                          *(uint8_t*)(((char*)esi_8 + i_5) + 4) = eax_22;
0063ef84                                                                          i_5 += 5;
0063ef89                                                                      } while (i_5 <= (ecx_5 - 6));
0063ef89                                                                      
0063ef92                                                                      ebp_3 = ecx_5;
0063ef99                                                                      esi_9 = esi_8;
0063ef61                                                                  }
0063ef61                                                                  
0063efa6                                                                  do
0063efa6                                                                  {
0063efa0                                                                      esi_9[i_5] = eax_22;
0063efa3                                                                      i_5 += 1;
0063efa6                                                                  } while (i_5 < ebp_3);
0063efa6                                                                  
0063efa8                                                                  edx_11 = eax_19;
0063ef5c                                                              }
0063ef5c                                                              
0063efaf                                                              ebx_6 += 0x20;
0063efb4                                                          } while (ebx_6 < edx_11);
0063ef27                                                      }
0063ef27                                                      
0063efc4                                                      eax_21 += ebp_3;
0063efcf                                                  } while (eax_21 < edi_6);
0063efcf                                                  
0063efd5                                                  var_80_1 = esi_7;
0063efea                                                  ebp_2 = edi_6;
0063eff1                                                  ebx_5 = ebx_4;
0063eef1                                              }
0063eef1                                              
0063eff8                                              esi_6 += edx_11;
0063effc                                          } while (esi_6 < ebx_5);
0063effc                                          
0063f009                                          edx_10 = ecx_5;
0063f010                                          ebp_1 = var_30_1;
0063eed2                                      }
0063eed2                                      
0063f017                                      ecx_6 += (edx_10 << 3);
0063f01a                                      eax_20 += 1;
0063f01d                                  } while (eax_20 < ebp_1);
0063f01d                                  
0063f031                                  edi_8 = var_3c_1;
0063eeb3                              }
0063eeb3                              
0063f038                              esi_5 += ebx_5;
0063f03a                              edx_9 += 1;
0063f03d                          } while (edx_9 < edi_8);
0063f03d                          
0063f04a                          ebp = arg1;
0063ee41                      }
0063ee30                  }
0063ee30                  
0063f051                  ebx = &var_5ac;
0063f076                  sub_632140(ebp, &var_ac, esi_4, var_8c_2, &var_5ac);
0063f07b                  edx_4 = *(uint32_t*)((char*)ebp + 0x34);
0063f07b                  
0063f0a6                  if ((edx_4 == 2 && *(uint32_t*)((char*)ebp + 0x58) == 1))
0063f0a8                      var_8c_2 -= 1;
0063f0a6                  else
0063f083                      var_8c_2 += 1;
0063f083                  
0063f08a                  var_18_1 += 0x18;
0063f092                  esi_4 += 1;
0063edb9              }
0063edb9              
0063fbe5              if (*(uint32_t*)((char*)ebp + 0x74) != 0)
0063fbe5              {
0063fbe7                  esi_4 = *(uint32_t*)((char*)ebp + 0x54);
0063fbe7                  
0063fbf3                  if (((char*)esi_4 - 1) != *(uint32_t*)((char*)ebp + 0x3820))
0063fbf5                      esi_4 = result;
0063fbe5              }
0063fbe5              
0063fc69              if (((edx_4 != 0xff || *(uint32_t*)((char*)ebp + 0x58) != 0xff) && esi_4 < result))
0063fc69              {
0063fc03                  int32_t edi_40 = var_8c_2;
0063fc0a                  int32_t* i_6 = esi_4;
0063fc0a                  
0063fc3c                  do
0063fc3c                  {
0063fc2a                      sub_632140(ebp, &var_ac, i_6, edi_40, ebx);
0063fc2f                      result = *(uint32_t*)((char*)ebp + 0x34);
0063fc2f                      
0063fc35                      if (result == 2)
0063fc35                      {
0063fc49                          result = *(uint32_t*)((char*)ebp + 0x58);
0063fc49                          
0063fc4f                          if (result != 1)
0063fc37                              edi_40 += 1;
0063fc4f                          else
0063fc51                              edi_40 -= 1;
0063fc35                      }
0063fc35                      else
0063fc37                          edi_40 += 1;
0063fc37                      
0063fc38                      i_6 += 1;
0063fc3c                  } while (i_6 < *(uint32_t*)((char*)ebp + 0x30));
0063fc69              }
0063ed7a          }
0063ec5c      }
0063fc48      return result;
0063ec40  }

0063f098                                                                          90 8d b4 26 00 00 00 00                          ...&....
0063f0b1                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
0063f0c8                          90 8d b4 26 00 00 00 00                                                          ...&....
0063f3da                                                                                8d b6 00 00 00 00                            ......
0063f475                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
0063f4ea                                8d b6 00 00 00 00                                                            ......
0063f606                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063f666                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
0063f767                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0063f7da                                                                                8d b6 00 00 00 00                            ......
0063f92b                                   90 8d 74 26 00                                                             ..t&.
0063f967                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0063fa63           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
0063fbd3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....
0063fc54                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
0063ff7d                                                                                         8d 76 00                               .v.

0063ff80  int32_t _US_CC_General_YCbCr_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063ff80  {
0063ff9a      if (*(uint32_t*)((char*)arg1 + 0x4de0) != 0)
0063ffb9          _US_General_P_MCU(arg1, arg2, arg3);
0063ff9a      else
0063ffa7          _US_General_MCU(arg1, arg2, arg3);
0063ffa7      
0063ffde      return sub_6336f0(arg1, ((char*)arg1 + 0x37e8), arg2, arg3);
0063ff80  }

0063ffdf                                                                                               90                                 .

0063ffe0  int32_t _YCbCr_422_to_YCbYCr_NI_MCU(void* arg1, int32_t arg2, int32_t arg3)

0063ffe0  {
0063ffe0      int32_t edi;
0063ffe0      int32_t var_4 = edi;
00640005      int32_t i = 0;
00640007      void* esi_1 = *(uint32_t*)((char*)arg1 + 0x4834);
0064004e      void var_64;
0064004e      
0064004e      do
0064004e      {
00640012          void* ebx;
00640012          ebx = *(uint8_t*)((char*)esi_1 + 0xc);
00640015          *(uint8_t*)(&var_64 + (i << 3)) = *(uint8_t*)esi_1;
0064001c          void var_63;
0064001c          *(uint8_t*)(&var_63 + (i << 3)) = *(uint8_t*)((char*)esi_1 + 2);
00640023          void var_62;
00640023          *(uint8_t*)(&var_62 + (i << 3)) = *(uint8_t*)((char*)esi_1 + 4);
0064002a          void var_61;
0064002a          *(uint8_t*)(&var_61 + (i << 3)) = *(uint8_t*)((char*)esi_1 + 6);
00640031          void var_60;
00640031          *(uint8_t*)(&var_60 + (i << 3)) = *(uint8_t*)((char*)esi_1 + 8);
00640038          void var_5f;
00640038          *(uint8_t*)(&var_5f + (i << 3)) = *(uint8_t*)((char*)esi_1 + 0xa);
0064003c          char edx = *(uint8_t*)((char*)esi_1 + 0xe);
0064003f          esi_1 += 0x10;
00640042          void var_5e;
00640042          *(uint8_t*)(&var_5e + (i << 3)) = ebx;
00640046          void var_5d;
00640046          *(uint8_t*)(&var_5d + (i << 3)) = edx;
0064004a          i += 1;
0064004e      } while (i < 8);
0064004e      
00640066      int32_t result;
00640066      int32_t var_24;
00640066      int32_t result_1;
00640066      int32_t var_1c;
00640066      int32_t var_18;
00640066      
00640066      if (*(uint32_t*)((char*)arg1 + 0x3820) == 0)
00640066      {
006401e0          result = sub_62e6a0(((char*)arg1 + 4), 8, 8, arg2, arg3, *(uint32_t*)((char*)arg1 + 0x30), *(uint32_t*)((char*)arg1 + 0x3c), *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_24);
006401e0          
006401e7          if (result == 0)
006401e7          {
006401ed              result = result_1;
006401f1              int32_t ecx_6 = var_18;
006401f1              
006401f7              if (result < ecx_6)
006401f7              {
006401fd                  int32_t edx_10 = var_1c;
006401fd                  
00640234                  do
00640234                  {
00640201                      int32_t esi_8 = var_24;
00640201                      
00640207                      if (esi_8 < edx_10)
00640207                      {
00640209                          int32_t ecx_7 = (esi_8 + (result << 3));
0064020c                          int32_t esi_9 = esi_8;
0064020c                          
0064022b                          do
0064022b                          {
00640210                              edx_10 = *(uint8_t*)(&var_64 + ecx_7);
00640216                              ecx_7 += 1;
00640221                              *(uint8_t*)(((result * *(uint32_t*)((char*)arg1 + 0x3c)) + *(uint32_t*)((char*)arg1 + 0x3814)) + (esi_9 << 1)) = edx_10;
00640224                              esi_9 += 1;
00640225                              edx_10 = var_1c;
0064022b                          } while (esi_9 < edx_10);
0064022b                          
0064022d                          ecx_6 = var_18;
00640207                      }
00640207                      
00640231                      result += 1;
00640234                  } while (result < ecx_6);
006401f7              }
006401e7          }
00640066      }
00640066      else
00640066      {
006400c0          result = sub_62e6a0(((char*)arg1 + 4), 0x10, 8, arg2, arg3, 2, *(uint32_t*)((char*)arg1 + 0x3c), *(uint32_t*)((char*)arg1 + 0x20), *(uint32_t*)((char*)arg1 + 0x24), *(uint32_t*)((char*)arg1 + 0x28), ((char*)arg1 + 0x3814), &var_24);
006400c0          
006400c7          if (result == 0)
006400c7          {
006400d2              if (*(uint32_t*)((char*)arg1 + 0x3820) == 2)
006400d2              {
0064012a                  result = result_1;
0064012e                  int32_t esi_4 = var_18;
0064012e                  
00640134                  if (result < esi_4)
00640134                  {
00640136                      int32_t edx_5 = var_1c;
00640136                      
0064017d                      do
0064017d                      {
0064013a                          int32_t ecx_4 = var_24;
0064013a                          
00640140                          if (ecx_4 < edx_5)
00640140                          {
00640174                              do
00640174                              {
00640157                                  int32_t edx_8;
00640157                                  edx_8 = *(uint8_t*)(&var_64 + ((ecx_4 >> 1) + (result * 8)));
00640167                                  *(uint8_t*)((((result * *(uint32_t*)((char*)arg1 + 0x3c)) + *(uint32_t*)((char*)arg1 + 0x3814)) + (ecx_4 << 1)) + 3) = edx_8;
0064016b                                  ecx_4 += 2;
0064016e                                  edx_5 = var_1c;
00640174                              } while (ecx_4 < edx_5);
00640174                              
00640176                              esi_4 = var_18;
00640140                          }
00640140                          
0064017a                          result += 1;
0064017d                      } while (result < esi_4);
00640134                  }
006400d2              }
006400d2              else
006400d2              {
006400d4                  result = result_1;
006400d8                  int32_t ecx_2 = var_18;
006400d8                  
006400de                  if (result < ecx_2)
006400de                  {
006400e0                      int32_t edx_3 = var_1c;
006400e0                      
0064011d                      do
0064011d                      {
006400e4                          int32_t esi_3 = var_24;
006400e4                          
006400ea                          if (esi_3 < edx_3)
006400ea                          {
00640114                              do
00640114                              {
006400f7                                  int32_t edx_4;
006400f7                                  edx_4 = *(uint8_t*)(&var_64 + ((esi_3 >> 1) + (result * 8)));
00640107                                  *(uint8_t*)((((result * *(uint32_t*)((char*)arg1 + 0x3c)) + *(uint32_t*)((char*)arg1 + 0x3814)) + (esi_3 << 1)) + 1) = edx_4;
0064010b                                  esi_3 += 2;
0064010e                                  edx_3 = var_1c;
00640114                              } while (esi_3 < edx_3);
00640114                              
00640116                              ecx_2 = var_18;
006400ea                          }
006400ea                          
0064011a                          result += 1;
0064011d                      } while (result < ecx_2);
006400de                  }
006400d2              }
006400c7          }
00640066      }
00640129      return result;
0063ffe0  }

00640181     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
0064023b                                                                                   90 8d 74 26 00                             ..t&.

00640240  int64_t* _Y_111_to_Y_Full_MCU_M5(int64_t* arg1, int16_t (* arg2)[0x4], int16_t (* arg3)[0x4])

00640240  {
0064025a      _own_y_111_to_y_full_mcu_m5(arg1, arg2, arg3);
00640262      return arg1;
00640240  }

00640263           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....

00640270  int64_t* _YCbCr_422_to_YCbYCr_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, int16_t (* arg4)[0x4], int32_t arg5)

00640270  {
0064029c      _own_ycbcr_422_to_ycbycr_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
006402a6      return arg1;
00640270  }

006402a7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

006402b0  int64_t* _YCbCrA_FPX_4114_to_RGBA_FPX_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5, int32_t arg6)

006402b0  {
006402e1      int32_t var_10 = arg6;
006402e5      _own_ycbcra_fpx_4114_to_rgba_fpx_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
006402f0      return arg1;
006402b0  }

006402f1                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

00640300  int64_t* _YCbCrA_FPX_4224_to_RGBA_FPX_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5, int32_t arg6)

00640300  {
00640331      int32_t var_10 = arg6;
00640335      _own_ycbcra_fpx_4224_to_rgba_fpx_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00640340      return arg1;
00640300  }

00640341     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....

00640350  int64_t* _YCbCrA_FPX_1111_to_RGBA_FPX_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5, int32_t arg6)

00640350  {
00640381      int32_t var_10 = arg6;
00640385      _own_ycbcra_fpx_1111_to_rgba_fpx_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00640390      return arg1;
00640350  }

00640391                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

006403a0  int64_t* _YCbCr_411_to_RGBA_FPX_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

006403a0  {
006403cc      _own_ycbcr_411_to_rgba_fpx_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
006403d6      return arg1;
006403a0  }

006403d7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

006403e0  int64_t* _YCbCr_422_to_RGBA_FPX_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, int64_t* arg4, int32_t arg5)

006403e0  {
0064040c      _own_ycbcr_422_to_rgba_fpx_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00640416      return arg1;
006403e0  }

00640417                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00640420  int64_t* _YCbCr_111_to_RGBA_FPX_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

00640420  {
0064044c      _own_ycbcr_111_to_rgba_fpx_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00640456      return arg1;
00640420  }

00640457                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00640460  int64_t* _YCbCr_422_to_BGR_Full_MCU_A6(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

00640460  {
0064048c      _own_ycbcr_422_to_bgr_full_mcu_a6(arg1, arg2, arg3, arg4, arg5);
00640496      return arg1;
00640460  }

00640497                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

006404a0  int64_t* _YCbCr_422_to_BGR_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

006404a0  {
006404cc      _own_ycbcr_422_to_bgr_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
006404d6      return arg1;
006404a0  }

006404d7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

006404e0  int64_t* _YCbCr_422_to_RGB_Full_MCU_A6(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

006404e0  {
0064050c      _own_ycbcr_422_to_rgb_full_mcu_a6(arg1, arg2, arg3, arg4, arg5);
00640516      return arg1;
006404e0  }

00640517                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00640520  int64_t* _YCbCr_422_to_RGB_Full_MCU_M5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

00640520  {
0064054c      _own_ycbcr_422_to_rgb_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00640556      return arg1;
00640520  }

00640557                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

00640560  uint16_t (*)[0x4] _YCbCr_111_to_BGR_Full_MCU_M5(uint16_t (* arg1)[0x4], int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

00640560  {
0064058c      _own_ycbcr_111_to_bgr_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
00640596      return arg1;
00640560  }

00640597                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

006405a0  uint16_t (*)[0x4] _YCbCr_111_to_RGB_Full_MCU_M5(uint16_t (* arg1)[0x4], int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

006405a0  {
006405cc      _own_ycbcr_111_to_rgb_full_mcu_m5(arg1, arg2, arg3, arg4, arg5);
006405d6      return arg1;
006405a0  }

006405d7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....

006405e0  int32_t __convention("regparm") _own_detect_processor_ia32(int32_t arg1, int32_t arg2, int32_t arg3, int32_t* arg4)

006405e0  {
006405e5      int32_t var_10 = arg3;
006405ed      int32_t result;
006405ed      int32_t ecx;
006405ed      int32_t edx;
006405ed      int32_t ebx;
006405ed      result = __cpuid(0, arg3);
006405f2      arg4[6] = ebx;
006405f5      arg4[7] = edx;
006405f8      arg4[8] = ecx;
006405f8      
006405fd      if (result != 0)
006405fd      {
00640604          int32_t eax;
00640604          int32_t ecx_1;
00640604          int32_t edx_1;
00640604          char ebx_1;
00640604          eax = __cpuid(1, ecx);
00640606          result = (eax & 0x3fff);
00640611          *(uint32_t*)arg4 = ((uint32_t)ebx_1);
0064061b          arg4[1] = ((result >> 0xc) & 3);
00640626          arg4[2] = ((result >> 8) & 0xf);
00640631          arg4[3] = ((result >> 4) & 0xf);
00640639          arg4[4] = (result & 0xf);
0064063c          arg4[5] = edx_1;
006405fd      }
006405fd      
00640645      return result;
006405e0  }

00640646                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.

00640650  int32_t _ownRDTSCh()

00640650  {
00640650      int32_t result;
00640650      int32_t edx;
00640650      int0_t tsc;
00640650      result = _rdtsc(tsc);
00640652      return result;
00640650  }

00640653                                                           8d a4 24 00 00 00 00 8d 9b 00 00 00 00                     ..$..........

00640660  int32_t _ownEMMSh()

00640660  {
00640662      return;
00640660  }

00640663           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

00640670  enum IJL_MARKER CONVERT_TO_MARKER(int32_t arg1) __pure

00640670  {
00640675      return ((uint32_t)arg1);
00640670  }

00640676                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....

00640680  enum _IJLERR Get_Marker_Data_Into_Contiguous_Buffer(struct _STATE* arg1, unsigned long arg2, uint8_t** arg3, uint8_t** arg4, int32_t* arg5)

00640680  {
00640683      int32_t var_8 = 0xffffffff;
00640685      int32_t var_c = 0x907aac;
0064068a      int32_t (* var_10)() = j__except_handler3;
00640695      TEB* fsbase;
00640695      int32_t var_14 = *(uint32_t*)fsbase;
00640696      *(uint32_t*)fsbase = &var_14;
006406a0      enum _IJLERR result_1;
006406a0      int32_t* var_1c = &result_1;
006406ac      int32_t var_8_1 = 0;
006406b5      result_1 = IJL_OK;
006406b8      int32_t var_38 = 0;
006406be      *(uint32_t*)arg3 = nullptr;
006406c9      int32_t var_8_2;
006406c9      
006406c9      if (arg2 <= arg1->entropy_bytes_left)
006406c9      {
00640832          enum _IJLERR* var_40_5 = &result_1;
00640836          enum _IJLERR result_3 = DB_Get_Data(arg1, arg2, arg4);
0064083e          result_1 = result_3;
0064083e          
00640843          if (result_3 == IJL_OK)
00640843          {
006407bd          label_6407bd:
006407bd              var_8_2 = 0xffffffff;
00640843          }
006406c9      }
006406c9      else
006406c9      {
006406cf          int32_t* var_40 = &result_1;
006406dc          *(uint32_t*)arg3 = operator new(arg2);
006406e1          uint8_t* eax_3 = *(uint32_t*)arg3;
006406e1          
006406e5          if (eax_3 == 0)
00640826              result_1 = 0xfffffffb;
006406e5          else
006406e5          {
006406ee              *(uint32_t*)arg4 = eax_3;
006406f3              uint8_t* ebx_1 = *(uint32_t*)arg3;
006406fb              *(uint32_t*)arg5 = 1;
00640701              unsigned long entropy_bytes_left_1 = arg2;
00640707              int32_t entropy_bytes_left = arg1->entropy_bytes_left;
00640707              
0064070c              if (entropy_bytes_left_1 >= entropy_bytes_left)
0064070e                  entropy_bytes_left_1 = entropy_bytes_left;
0064070e              
0064071a              __g_memcpy(ebx_1, arg1->cur_entropy_ptr, entropy_bytes_left_1, &result_1);
00640726              void* var_38_2 = &ebx_1[entropy_bytes_left_1];
0064072c              uint32_t eax_7 = (arg2 - entropy_bytes_left_1);
0064072f              arg2 = eax_7;
00640735              arg1->cur_entropy_ptr = &arg1->cur_entropy_ptr[entropy_bytes_left_1];
00640738              arg1->entropy_bytes_processed += entropy_bytes_left_1;
00640741              arg1->entropy_bytes_left -= entropy_bytes_left_1;
00640741              
00640746              if (eax_7 == 0)
00640746              {
006407bd              label_6407bd_1:
006407bd                  var_8_2 = 0xffffffff;
00640746              }
00640746              else
00640746              {
00640748                  uint32_t var_30_1 = eax_7;
00640748                  
00640750                  while (true)
00640750                  {
00640750                      if (eax_7 > 0xffff)
00640750                          goto label_6407bd_1;
00640750                      
00640757                      if (eax_7 >= 0x1000)
00640759                          eax_7 = 0x1000;
00640759                      
00640764                      enum _IJLERR* var_40_2 = &result_1;
00640768                      uint8_t* var_2c;
00640768                      enum _IJLERR result_2 = DB_Get_Data(arg1, eax_7, &var_2c);
00640770                      result_1 = result_2;
00640770                      
00640775                      if (result_2 != IJL_OK)
00640775                      {
00640805                          result_1 = 0xffffffeb;
00640811                          enum _IJLERR* var_40_4 = &result_1;
00640813                          operator delete(*(uint32_t*)arg3);
0064081e                          *(uint32_t*)arg3 = nullptr;
00640824                          break;
00640775                      }
00640775                      
0064077b                      unsigned long eax_8 = arg2;
0064077b                      
00640783                      if (eax_8 >= 0x1000)
00640785                          eax_8 = 0x1000;
00640785                      
00640794                      __g_memcpy(var_38_2, var_2c, eax_8, &result_1);
006407a5                      unsigned long edx_7;
006407a5                      
006407a5                      if (arg2 >= 0x1000)
006407ab                          edx_7 = 0x1000;
006407a5                      else
006407a7                          edx_7 = arg2;
006407a7                      
006407b0                      var_38_2 += edx_7;
006407b3                      eax_7 = (arg2 - 0x1000);
006407b3                      bool cond:0_1 = arg2 != 0x1000;
006407b8                      arg2 = eax_7;
006407b8                      
006407bb                      if (!(cond:0_1))
006407bb                          goto label_6407bd_1;
00640750                  }
00640746              }
006406e5          }
006406c9      }
006407c4      enum _IJLERR result = result_1;
006407d6      *(uint32_t*)fsbase = var_14;
006407e0      return result;
00640680  }

006407e1     c7 45 fc ff ff ff ff eb da 8b 65 e8 8b 45 10 8b 10 54 52 e8 35 d8 f9 ff 83 c4 08 c7 45 c8 ff   .E........e..E...TR.5.......E..
00640800  ff ff ff eb dc                                                                                   .....
0064084e                                            b8 01 00 00 00 c3 8d b6 00 00 00 00 8d bf 00 00 00 00                ..................

00640860  enum _IJLERR sub_640860(struct _STATE* arg1, uint32_t* arg2)

00640860  {
00640875      int32_t var_14 = 0;
00640898      uint8_t* var_10;
00640898      void* var_c;
00640898      enum _IJLERR result = Get_Marker_Data_Into_Contiguous_Buffer(arg1, 2, &var_c, &var_10, &var_14);
00640898      
006408a1      if (result == IJL_OK)
006408a1      {
006408a3          uint8_t* edx_1 = var_10;
006408b3          *(uint32_t*)arg2 = ((((uint32_t)*(uint8_t*)edx_1) << 8) + ((uint32_t)edx_1[1]));
006408a1      }
006408a1      
006408bb      if (var_14 != 0)
006408bb      {
006408bd          void* edx_3 = var_c;
006408bd          
006408c3          if (edx_3 != 0)
006408c8              operator delete(edx_3);
006408bb      }
006408bb      
006408d4      return result;
00640860  }

006408d5                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

006408e0  enum _IJLERR DP_Get_Next_Marker(struct _STATE* arg1, enum IJL_MARKER* arg2)

006408e0  {
006408ed      uint32_t unread_marker = ((uint32_t)arg1->unread_marker);
006408ed      
006408f3      if (unread_marker != 0)
006408f3      {
006408f5          arg1->unread_marker = 0;
00640901          *(uint32_t*)arg2 = CONVERT_TO_MARKER(unread_marker);
00640903          return IJL_OK;
006408f3      }
006408f3      
0064090e      enum _IJLERR result = DB_Skip_To_Next_Marker(arg1);
0064090e      
00640915      if (result != IJL_OK)
0064090a          return result;
0064090a      
00640931      char* var_c;
00640931      
00640931      if (DB_Get_Data(arg1, 1, &var_c) == IJL_OK)
00640931      {
00640950          *(uint32_t*)arg2 = CONVERT_TO_MARKER(((uint32_t)*(uint8_t*)var_c));
00640959          return 0;
00640931      }
00640931      
00640933      *(uint32_t*)arg2 = 0x100;
00640940      return 0;
006408e0  }

0064095a                                                                                8d b6 00 00 00 00                            ......

00640960  enum _IJLERR DP_Skip(struct _STATE* arg1)

00640960  {
00640974      unsigned long i_1;
00640974      enum _IJLERR result = sub_640860(arg1, &i_1);
00640974      
0064097b      if (result == IJL_OK)
0064097b      {
0064097d          unsigned long i_2 = i_1;
0064097d          
00640984          if (i_2 < 2)
00640990              return 0xffffffeb;
00640990          
00640991          unsigned long i = (i_2 - 2);
00640994          int32_t entropy_bytes_left = arg1->entropy_bytes_left;
00640999          void var_10;
00640999          
00640999          if (i >= entropy_bytes_left)
00640999          {
006409f0              i_1 = i;
00640a03              result = DB_Get_Data(arg1, entropy_bytes_left, &var_10);
00640a03              
00640a0a              if (result != IJL_OK)
00640a16                  return 0xffffffeb;
00640a16              
00640a1b              i = (i_1 - entropy_bytes_left);
00640999          }
00640999          
0064099d          if (i > 0)
0064099d          {
006409a6              while (i <= 0xffff)
006409a6              {
006409a8                  i_1 = i;
006409a8                  
006409b2                  if (i >= 0x1000)
006409b4                      i = 0x1000;
006409b4                  
006409c8                  result = DB_Get_Data(arg1, i, &var_10);
006409c8                  
006409cf                  if (result != IJL_OK)
006409ef                      return 0xffffffeb;
006409ef                  
006409d5                  i = (i_1 - 0x1000);
006409d5                  
006409dd                  if (i <= 0)
006409dd                      break;
006409a6              }
0064099d          }
0064097b      }
0064097b      
006409e4      return result;
00640960  }

00640a22        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....

00640a30  enum _IJLERR DP_Parse_DRI(struct _STATE* arg1, int32_t* arg2)

00640a30  {
00640a40      uint8_t* var_1c = nullptr;
00640a44      void* var_18 = nullptr;
00640a48      int32_t var_14 = 0;
00640a4c      *(uint32_t*)arg2 = 0;
00640a5e      unsigned long var_10;
00640a5e      enum _IJLERR result = sub_640860(arg1, &var_10);
00640a5e      
00640a62      if (result == IJL_OK)
00640a62      {
00640a64          unsigned long eax_1 = var_10;
00640a64          
00640a6b          if (eax_1 >= 2)
00640a6b          {
00640a9e              var_10 = (eax_1 - 2);
00640abe              result = Get_Marker_Data_Into_Contiguous_Buffer(arg1, (eax_1 - 2), &var_18, &var_1c, &var_14);
00640abe              
00640ac2              if (result == IJL_OK)
00640ac2              {
00640ac4                  uint8_t* edx_3 = var_1c;
00640ad4                  *(uint32_t*)arg2 = ((((uint32_t)*(uint8_t*)edx_3) << 8) + ((uint32_t)edx_3[1]));
00640ac2              }
00640a6b          }
00640a6b          else
00640a6d              result = 0xffffffeb;
00640a62      }
00640a62      
00640a78      if (var_14 != 0)
00640a78      {
00640a7a          void* edx_2 = var_18;
00640a7a          
00640a80          if (edx_2 != 0)
00640a85              operator delete(edx_2);
00640a78      }
00640a78      
00640a92      return result;
00640a30  }

00640ad8                                                                          90 8d b4 26 00 00 00 00                          ...&....

00640ae0  enum _IJLERR DP_Parse_SOF(struct _STATE* arg1, struct _JPEG_PROPERTIES* arg2)

00640ae0  {
00640af1      uint8_t* var_34 = nullptr;
00640af5      void* var_30 = nullptr;
00640af9      int32_t var_2c = 0;
00640b09      unsigned long var_28;
00640b09      enum _IJLERR result = sub_640860(arg1, &var_28);
00640b09      
00640b0d      if (result == IJL_OK)
00640b0d      {
00640b0f          unsigned long eax_1 = var_28;
00640b0f          
00640b16          if (eax_1 >= 2)
00640b16          {
00640b4a              var_28 = (eax_1 - 2);
00640b6a              result = Get_Marker_Data_Into_Contiguous_Buffer(arg1, (eax_1 - 2), &var_30, &var_34, &var_2c);
00640b6a              
00640b6e              if (result == IJL_OK)
00640b6e              {
00640b85                  __g_memzero(arg2->jframe.comps, 0x40);
00640b8b                  uint8_t* eax_5 = var_34;
00640b96                  var_34 = &eax_5[1];
00640b9a                  uint32_t edx_4 = ((uint32_t)*(uint8_t*)eax_5);
00640ba0                  arg2->jframe.precision = edx_4;
00640ba9                  var_34 = &eax_5[2];
00640bb1                  uint32_t esi_3 = (((uint32_t)eax_5[1]) << 8);
00640bb4                  arg2->jframe.height = esi_3;
00640bba                  var_34 = &eax_5[3];
00640bc2                  uint32_t height = (((uint32_t)eax_5[2]) + esi_3);
00640bc7                  arg2->jframe.height = height;
00640bcd                  var_34 = &eax_5[4];
00640bd5                  uint32_t edi_2 = (((uint32_t)eax_5[3]) << 8);
00640bdb                  arg2->jframe.width = edi_2;
00640be1                  var_34 = &eax_5[5];
00640be9                  uint32_t width = (((uint32_t)eax_5[4]) + edi_2);
00640beb                  void* edi_3 = &eax_5[6];
00640bee                  arg2->jframe.width = width;
00640bf7                  var_34 = edi_3;
00640bfb                  uint32_t eax_6 = ((uint32_t)eax_5[5]);
00640bff                  arg2->jframe.ncomps = eax_6;
00640bff                  
00640c05                  if (edx_4 != 8)
00640c07                      result = 0xffffffe3;
00640c05                  else if (height != 0)
00640c13                  {
00640c1f                      int32_t edx_5 = 0;
00640c25                      int32_t var_18_1 = 0;
00640c25                      
00640c32                      if (eax_6 > 0)
00640c32                      {
00640c3c                          struct _FRAME_COMPONENT* comps = arg2->jframe.comps;
00640c46                          int32_t* eax_7 = nullptr;
00640c49                          int32_t i = 0;
00640c4d                          int32_t var_24_1 = 0;
00640c4d                          
00640cdd                          do
00640cdd                          {
00640c63                              var_34 = ((char*)edi_3 + 1);
00640c6a                              *(uint32_t*)((char*)eax_7 + comps) = ((uint32_t)*(uint8_t*)edi_3);
00640c6d                              uint8_t* edx_8 = var_34;
00640c7d                              *(uint32_t*)(&arg2->jframe.comps->hsampling + eax_7) = (((uint32_t)*(uint8_t*)edx_8) >> 4);
00640c84                              struct _FRAME_COMPONENT* comps_2 = arg2->jframe.comps;
00640c8e                              var_34 = &edx_8[1];
00640c98                              *(uint32_t*)(&comps_2->vsampling + eax_7) = (((uint32_t)*(uint8_t*)edx_8) & 0xf);
00640c9c                              edi_3 = &edx_8[2];
00640c9f                              struct _FRAME_COMPONENT* comps_1 = arg2->jframe.comps;
00640ca5                              var_34 = edi_3;
00640cad                              *(uint32_t*)(&comps_1->quant_sel + eax_7) = ((uint32_t)edx_8[1]);
00640cb1                              comps = arg2->jframe.comps;
00640cb7                              int32_t edx_10 = *(uint32_t*)(&comps->hsampling + eax_7);
00640cb7                              
00640cbd                              if (var_24_1 < edx_10)
00640cbf                                  var_24_1 = edx_10;
00640cbf                              
00640cc3                              int32_t edx_11 = *(uint32_t*)(&comps->vsampling + eax_7);
00640cc3                              
00640ccd                              if (var_18_1 < edx_11)
00640ccf                                  var_18_1 = edx_11;
00640ccf                              
00640cd3                              eax_7 = &eax_7[4];
00640cd6                              i += 1;
00640cdd                          } while (i < arg2->jframe.ncomps);
00640cdd                          
00640cdf                          edx_5 = var_24_1;
00640ceb                          height = arg2->jframe.height;
00640cf1                          width = arg2->jframe.width;
00640c32                      }
00640c32                      
00640d03                      int32_t temp0_1 = (((int64_t)((width + (edx_5 << 3)) - 1)) / (edx_5 * 8));
00640d12                      arg2->jframe.horMCU = temp0_1;
00640d26                      arg2->jframe.totalMCU = ((((int64_t)((height + (var_18_1 << 3)) - 1)) / (var_18_1 * 8)) * temp0_1);
00640c13                  }
00640c13                  else
00640c15                      result = 0xfffffff0;
00640b6e              }
00640b16          }
00640b16          else
00640b18              result = 0xffffffeb;
00640b0d      }
00640b0d      
00640b23      if (var_2c != 0)
00640b23      {
00640b25          void* edx_2 = var_30;
00640b25          
00640b2b          if (edx_2 != 0)
00640b30              operator delete(edx_2);
00640b23      }
00640b23      
00640b3e      return result;
00640ae0  }

00640d31                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

00640d40  enum _IJLERR DP_Parse_APP14(struct _JPEG_PROPERTIES* arg1)

00640d40  {
00640d4c      uint8_t* var_1c = nullptr;
00640d5a      void* var_18 = nullptr;
00640d5e      int32_t var_14 = 0;
00640d6e      unsigned long var_10;
00640d6e      enum _IJLERR result = sub_640860(&arg1->state, &var_10);
00640d6e      
00640d72      if (result == IJL_OK)
00640d72      {
00640d74          unsigned long edx_1 = var_10;
00640d74          
00640d7b          if (edx_1 >= 2)
00640d7b          {
00640d8a              var_10 = (edx_1 - 2);
00640d8a              
00640d8e              if ((edx_1 - 2) >= 0xc)
00640d8e              {
00640dd5                  result = Get_Marker_Data_Into_Contiguous_Buffer(&arg1->state, (edx_1 - 2), &var_18, &var_1c, &var_14);
00640dd5                  
00640dd9                  if (result == IJL_OK)
00640dd9                  {
00640ddb                      uint8_t* edx_5 = var_1c;
00640de2                      var_1c = &edx_5[1];
00640de2                      
00640deb                      if (*(uint8_t*)edx_5 == 0x41)
00640deb                      {
00640df0                          var_1c = &edx_5[2];
00640df0                          
00640dfa                          if (edx_5[1] == 0x64)
00640dfa                          {
00640dff                              var_1c = &edx_5[3];
00640dff                              
00640e09                              if (edx_5[2] == 0x6f)
00640e09                              {
00640e0e                                  var_1c = &edx_5[4];
00640e0e                                  
00640e18                                  if (edx_5[3] == 0x62)
00640e18                                  {
00640e21                                      var_1c = &edx_5[5];
00640e21                                      
00640e2b                                      if (edx_5[4] == 0x65)
00640e2b                                      {
00640e34                                          var_1c = &edx_5[7];
00640e45                                          arg1->AdobeVersion = (((int16_t)(((uint32_t)edx_5[5]) << 8)) + ((uint16_t)edx_5[6]));
00640e4f                                          var_1c = &edx_5[9];
00640e63                                          arg1->AdobeFlags0 = (((int16_t)(((uint32_t)edx_5[7]) << 8)) + ((uint16_t)edx_5[8]));
00640e6a                                          var_1c = &edx_5[0xb];
00640e7e                                          arg1->AdobeFlags1 = (((int16_t)(((uint32_t)edx_5[9]) << 8)) + ((uint16_t)edx_5[0xa]));
00640e85                                          var_1c = &edx_5[0xc];
00640e8d                                          arg1->AdobeXform = ((uint32_t)edx_5[0xb]);
00640e93                                          arg1->SawAdobeMarker = 1;
00640e2b                                      }
00640e18                                  }
00640e09                              }
00640dfa                          }
00640deb                      }
00640dd9                  }
00640d8e              }
00640d7b          }
00640d7b          else
00640d7d              result = 0xffffffeb;
00640d72      }
00640d72      
00640d96      if (var_14 != 0)
00640d96      {
00640d98          void* edx_4 = var_18;
00640d98          
00640d9e          if (edx_4 != 0)
00640da3              operator delete(edx_4);
00640d96      }
00640d96      
00640db0      return result;
00640d40  }

00640ea2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....

00640eb0  enum _IJLERR DP_Parse_APP0(struct _JPEG_PROPERTIES* arg1)

00640eb0  {
00640ec7      void* var_34 = nullptr;
00640ecb      void* var_30 = nullptr;
00640ecf      int32_t var_2c = 0;
00640ee1      unsigned long var_28;
00640ee1      
00640ee1      if (sub_640860(&arg1->state, &var_28) == IJL_OK)
00640ee1      {
00640ee3          unsigned long eax_1 = var_28;
00640ee3          
00640eea          if (eax_1 >= 2)
00640eea          {
00640ef2              var_28 = (eax_1 - 2);
00640ef2              
00640efd              if (((eax_1 - 2) >= 0xe && (eax_1 - 2) <= 0x3000e))
00640efd              {
00640f47                  if (Get_Marker_Data_Into_Contiguous_Buffer(&arg1->state, (eax_1 - 2), &var_30, &var_34, &var_2c) != IJL_OK)
00640f47                  {
00640f4f                      if (var_2c != 0)
00640f4f                      {
00640f51                          void* eax_8 = var_30;
00640f51                          
00640f57                          if (eax_8 != 0)
00640f5c                              operator delete(eax_8);
00640f4f                      }
00640f4f                      
00640f6d                      return 0xffffffeb;
00640f47                  }
00640f47                  
00640f76                  if (arg1->needframe != 0)
00640f76                  {
00640f78                      char* ecx_1 = var_34;
00640f7c                      int32_t eax_10;
00640f7c                      eax_10 = *(uint8_t*)ecx_1;
00641179                      int32_t ecx_3;
00641179                      void* edx_4;
00641179                      
00641179                      if (((((eax_10 == 0x4a && ecx_1[1] == 0x46) && ecx_1[2] == 0x58) && ecx_1[3] == 0x58) && ecx_1[4] == 0))
00641179                      {
00641182                          var_34 = &ecx_1[5];
00641186                          void* eax_27;
00641186                          eax_27 = ecx_1[5];
00641186                          
0064118b                          if (eax_27 != 0x10)
0064118b                          {
00641193                              if (eax_27 == 0x11)
00641193                              {
006411b0                                  var_34 = &ecx_1[7];
006411b4                                  uint32_t esi_9 = ((uint32_t)ecx_1[6]);
006411b8                                  var_34 = &ecx_1[8];
006411bc                                  uint32_t ebx_2 = ((uint32_t)ecx_1[7]);
006411c0                                  enum _IJLIOTYPE iotype = arg1->iotype;
006411c0                                  
006411df                                  if (((iotype == IJL_JFILE_READTHUMBNAIL || iotype == IJL_JBUFF_READTHUMBNAIL) && ((esi_9 * ebx_2) + 0x308) <= var_28))
006411df                                  {
006411e5                                      arg1->JPGThumbHeight = ebx_2;
006411e8                                      arg1->JPGThumbWidth = esi_9;
006411f2                                      void* i_1 = operator new(0x300);
006411f2                                      
006411f9                                      if (i_1 != 0)
006411f9                                      {
006411ff                                          void* i = i_1;
006411ff                                          
00641255                                          do
00641255                                          {
00641210                                              void* ebx_3 = var_34;
00641217                                              var_34 = ((char*)ebx_3 + 1);
0064121b                                              ebx_3 = *(uint8_t*)ebx_3;
0064121d                                              *(uint8_t*)i = ebx_3;
0064121f                                              void* ebx_4 = var_34;
00641226                                              var_34 = ((char*)ebx_4 + 1);
0064122a                                              ebx_4 = *(uint8_t*)ebx_4;
0064122c                                              *(uint8_t*)((char*)i + 1) = ebx_4;
0064122f                                              void* edi_7 = var_34;
00641236                                              var_34 = ((char*)edi_7 + 1);
0064123a                                              void* ebx_5;
0064123a                                              ebx_5 = *(uint8_t*)edi_7;
0064123c                                              *(uint8_t*)((char*)i + 2) = ebx_5;
0064123f                                              void* ebp_3 = var_34;
00641246                                              var_34 = ((char*)ebp_3 + 1);
0064124a                                              ebx_5 = *(uint8_t*)ebp_3;
0064124d                                              *(uint8_t*)((char*)i + 3) = ebx_5;
00641250                                              i += 4;
00641255                                          } while (((char*)i_1 + 0x300) > i);
00641255                                          
00641257                                          uint32_t ebx_6 = ebx_2;
00641263                                          uint32_t edx_12 = 0;
00641263                                          
00641267                                          if (ebx_6 > 0)
00641267                                          {
0064126d                                              uint32_t edi_8 = (esi_9 * 3);
0064126d                                              
00641306                                              do
00641306                                              {
00641274                                                  if (edi_8 > 0)
00641274                                                  {
0064127a                                                      void* ecx_13 = var_34;
0064127e                                                      uint32_t var_1c_1 = edx_12;
00641286                                                      uint32_t var_24_3 = ebx_6;
0064128a                                                      char* esi_12 = nullptr;
0064128a                                                      
006412f5                                                      do
006412f5                                                      {
00641293                                                          uint32_t edi_9 = (((uint32_t)*(uint8_t*)ecx_13) * 3);
00641296                                                          ebx_6 = *(uint8_t*)(edi_9 + i_1);
00641299                                                          char var_18_1 = ebx_6;
0064129d                                                          edx_12 = *(uint8_t*)((edi_9 + i_1) + 1);
006412a1                                                          ebx_6 = *(uint8_t*)((edi_9 + i_1) + 2);
006412a5                                                          char var_14_1 = edx_12;
006412a5                                                          
006412af                                                          if (arg1->DIBColor == IJL_RGB)
006412af                                                          {
00641326                                                              enum _IJL_COLOR edx_13;
00641326                                                              edx_13 = var_18_1;
0064132a                                                              *(uint8_t*)(esi_12 + &arg1->DIBBytes[(arg1->DIBLineBytes * var_1c_1)]) = edx_13;
00641336                                                              void* ecx_19;
00641336                                                              ecx_19 = var_14_1;
0064133a                                                              *(uint8_t*)((esi_12 + &arg1->DIBBytes[(arg1->DIBLineBytes * var_1c_1)]) + 1) = ecx_19;
00641347                                                              *(uint8_t*)((esi_12 + &arg1->DIBBytes[(arg1->DIBLineBytes * var_1c_1)]) + 2) = ebx_6;
006412af                                                          }
006412af                                                          else
006412af                                                          {
006412be                                                              *(uint8_t*)(esi_12 + &arg1->DIBBytes[(arg1->DIBLineBytes * var_1c_1)]) = ebx_6;
006412c7                                                              ebx_6 = var_14_1;
006412ce                                                              *(uint8_t*)((esi_12 + &arg1->DIBBytes[(arg1->DIBLineBytes * var_1c_1)]) + 1) = ebx_6;
006412d8                                                              void* edx_16;
006412d8                                                              edx_16 = var_18_1;
006412df                                                              esi_12[&arg1->DIBBytes[((arg1->DIBLineBytes * var_1c_1) + 2)]] = edx_16;
006412af                                                          }
006412af                                                          
006412e3                                                          esi_12 = &esi_12[3];
006412ea                                                          ecx_13 = ((char*)var_34 + 1);
006412eb                                                          var_34 = ecx_13;
006412f5                                                      } while (esi_12 < edi_8);
006412f5                                                      
006412f7                                                      edx_12 = var_1c_1;
006412ff                                                      ebx_6 = var_24_3;
00641274                                                  }
00641274                                                  
00641303                                                  edx_12 += 1;
00641306                                              } while (edx_12 < ebx_6);
00641267                                          }
00641267                                          
0064130f                                          operator delete(i_1);
006411f9                                      }
006411df                                  }
00641193                              }
00641193                              else if (eax_27 == 0x13)
00641197                              {
0064119d                                  edx_4 = &ecx_1[6];
006411a0                                  ecx_3 = 8;
006411a5                                  goto label_64102d;
00641197                              }
0064118b                          }
00641179                      }
00641179                      else if (eax_10 == 0x4a)
00640f88                      {
00640f8e                          eax_10 = ecx_1[1];
00640f8e                          
00640f93                          if (eax_10 == 0x46)
00640f93                          {
00640f99                              eax_10 = ecx_1[2];
00640f99                              
00640f9e                              if (eax_10 == 0x49)
00640f9e                              {
00640fa4                                  eax_10 = ecx_1[3];
00640fa4                                  
00640fa9                                  if (eax_10 == 0x46)
00640fa9                                  {
00640faf                                      eax_10 = ecx_1[4];
00640faf                                      
00640fb4                                      if (eax_10 == 0)
00640fb4                                      {
00640fba                                          arg1->jfif_app0_detected = 1;
00640fc7                                          var_34 = &ecx_1[7];
00640fdb                                          arg1->jfif_app0_version = (((int16_t)(((uint32_t)ecx_1[5]) << 8)) | ((uint16_t)ecx_1[6]));
00640fe5                                          var_34 = &ecx_1[8];
00640fe9                                          struct _STATE* ebx;
00640fe9                                          ebx = ecx_1[7];
00640fec                                          arg1->jfif_app0_units = ebx;
00640ff2                                          var_34 = &ecx_1[0xa];
00641003                                          edx_4 = &ecx_1[0xc];
00641006                                          arg1->jfif_app0_Xdensity = (((int16_t)(((uint32_t)ecx_1[8]) << 8)) | ((uint16_t)ecx_1[9]));
0064100d                                          var_34 = edx_4;
0064101e                                          ecx_3 = 0xe;
00641023                                          arg1->jfif_app0_Ydensity = (((int16_t)(((uint32_t)ecx_1[0xa]) << 8)) | ((uint16_t)ecx_1[0xb]));
0064102d                                      label_64102d:
0064102d                                          var_34 = ((char*)edx_4 + 1);
00641031                                          uint32_t edi_4 = ((uint32_t)*(uint8_t*)edx_4);
00641034                                          void* eax_18 = ((char*)edx_4 + 2);
00641039                                          var_34 = eax_18;
0064103d                                          uint32_t edx_5 = ((uint32_t)*(uint8_t*)((char*)edx_4 + 1));
0064103d                                          
00641049                                          if ((edi_4 != 0 && edx_5 != 0))
00641049                                          {
0064104f                                              enum _IJLIOTYPE iotype_1 = arg1->iotype;
0064104f                                              
0064105a                                              if ((iotype_1 == IJL_JFILE_READTHUMBNAIL || iotype_1 == IJL_JBUFF_READTHUMBNAIL))
0064105a                                              {
00641067                                                  uint32_t ebx_1 = (edi_4 * 3);
00641067                                                  
00641075                                                  if ((ecx_3 + (edx_5 * ebx_1)) <= var_28)
00641075                                                  {
00641082                                                      arg1->JPGThumbHeight = edx_5;
00641088                                                      bool cond:2_1 = arg1->DIBColor == IJL_RGB;
0064108b                                                      arg1->JPGThumbWidth = edi_4;
0064108b                                                      
0064108e                                                      if (cond:2_1)
0064108e                                                      {
00641110                                                          int32_t edi_6 = 0;
00641110                                                          
00641114                                                          if (edx_5 > 0)
00641114                                                          {
00641147                                                              do
00641147                                                              {
00641134                                                                  __g_memcpy(&arg1->DIBBytes[(edi_6 * arg1->DIBLineBytes)], eax_18, ebx_1);
0064113e                                                                  eax_18 = ((char*)var_34 + ebx_1);
00641140                                                                  edi_6 += 1;
00641141                                                                  var_34 = eax_18;
00641147                                                              } while (edi_6 < edx_5);
00641114                                                          }
0064108e                                                      }
0064108e                                                      else
0064108e                                                      {
00641094                                                          int32_t esi_6 = 0;
00641094                                                          
00641098                                                          if (edx_5 > 0)
00641098                                                          {
00641105                                                              do
00641105                                                              {
0064109e                                                                  int32_t edi_5 = 0;
0064109e                                                                  
006410a2                                                                  if (ebx_1 > 0)
006410a2                                                                  {
006410fc                                                                      do
006410fc                                                                      {
006410b0                                                                          eax_18 = *(uint8_t*)((char*)eax_18 + 2);
006410be                                                                          *(uint8_t*)((arg1->DIBLineBytes * esi_6) + &arg1->DIBBytes[edi_5]) = eax_18;
006410c5                                                                          char* edx_7;
006410c5                                                                          edx_7 = *(uint8_t*)((char*)var_34 + 1);
006410c8                                                                          arg1->DIBBytes[((edi_5 + (arg1->DIBLineBytes * esi_6)) + 1)] = edx_7;
006410db                                                                          void* ecx_9;
006410db                                                                          ecx_9 = *(uint8_t*)var_34;
006410dd                                                                          arg1->DIBBytes[((edi_5 + (arg1->DIBLineBytes * esi_6)) + 2)] = ecx_9;
006410f0                                                                          eax_18 = ((char*)var_34 + 3);
006410f3                                                                          var_34 = eax_18;
006410f7                                                                          edi_5 += 3;
006410fc                                                                      } while (edi_5 < ebx_1);
006410a2                                                                  }
006410a2                                                                  
00641102                                                                  esi_6 += 1;
00641105                                                              } while (esi_6 < edx_5);
00641098                                                          }
0064108e                                                      }
00641075                                                  }
00641075                                                  else
00641075                                                  {
00641077                                                      arg1->JPGThumbWidth = edi_4;
0064107a                                                      arg1->JPGThumbHeight = edx_5;
00641075                                                  }
0064105a                                              }
0064105a                                              else
0064105a                                              {
0064105c                                                  arg1->JPGThumbWidth = edi_4;
0064105f                                                  arg1->JPGThumbHeight = edx_5;
0064105a                                              }
00641049                                          }
00640fb4                                      }
00640fa9                                  }
00640f9e                              }
00640f93                          }
00640f88                      }
00640f76                  }
00640efd              }
00640eea          }
00640ee1      }
00640ee1      
00640f05      if (var_2c != 0)
00640f05      {
00640f07          void* eax_4 = var_30;
00640f07          
00640f0d          if (eax_4 != 0)
00640f12              operator delete(eax_4);
00640f05      }
00640f05      
00640f20      return 0;
00640eb0  }

0064110c                                      8d 74 26 00                                                              .t&.
0064114e                                            8b f6                                                                ..
0064134d                                         8d 76 00                                                               .v.

00641350  enum _IJLERR DP_Parse_COM(struct _JPEG_PROPERTIES* arg1)

00641350  {
00641353      int32_t var_8 = 0xffffffff;
00641355      int32_t var_c = 0x907ac4;
0064135a      int32_t (* var_10)() = j__except_handler3;
00641365      TEB* fsbase;
00641365      int32_t var_14 = *(uint32_t*)fsbase;
00641366      *(uint32_t*)fsbase = &var_14;
00641370      unsigned long s;
00641370      int32_t* var_1c = &s;
0064137e      __builtin_memset(&s, 0, 0x14);
0064138d      int32_t var_8_1 = 0;
006413a2      enum _IJLERR result_1 = sub_640860(&arg1->state, &s);
006413aa      enum _IJLERR result = result_1;
006413af      void* var_38;
006413af      int32_t var_34;
006413af      
006413af      if (result_1 == IJL_OK)
006413af      {
006413b1          unsigned long s_1 = s;
006413b1          
006413b7          if (s_1 >= 2)
006413b7          {
0064141e              s = (s_1 - 2);
00641433              int32_t* var_48_2 = &s;
00641439              uint8_t* var_3c;
00641439              enum _IJLERR result_2 = Get_Marker_Data_Into_Contiguous_Buffer(&arg1->state, (s_1 - 2), &var_38, &var_3c, &var_34);
00641441              result = result_2;
00641441              
00641446              if (result_2 != IJL_OK)
00641448                  result = 0xffffffeb;
00641446              else if (arg1->needframe != 0)
0064145f              {
00641465                  char* jpeg_comment = arg1->jpeg_comment;
00641465                  
0064146d                  if (jpeg_comment != 0)
0064146d                  {
00641473                      unsigned long s_2 = s;
00641476                      uint32_t jpeg_comment_size = ((uint32_t)arg1->jpeg_comment_size);
00641476                      
0064147f                      if (s_2 <= jpeg_comment_size)
0064147f                      {
006414b5                          char* eax_7 = nullptr;
006414b7                          int32_t var_30_3 = 0;
006414b7                          
006414c0                          if (s_2 > 0)
006414c0                          {
006414c2                              while (true)
006414c2                              {
006414c2                                  char* edi_2 = var_3c;
006414c8                                  var_3c = &edi_2[1];
006414cb                                  jpeg_comment_size = *(uint8_t*)edi_2;
006414cd                                  *(uint8_t*)(eax_7 + jpeg_comment) = jpeg_comment_size;
006414d0                                  eax_7 = &eax_7[1];
006414d3                                  char* var_30_4 = eax_7;
006414d6                                  s_2 = s;
006414d6                                  
006414db                                  if (eax_7 >= s_2)
006414db                                      break;
006414db                                  
006414dd                                  jpeg_comment = arg1->jpeg_comment;
006414c2                              }
006414c0                          }
006414c0                          
006414fb                          arg1->jpeg_comment_size = s_2;
0064147f                      }
0064147f                      else
0064147f                      {
00641481                          char* eax_6 = nullptr;
00641483                          int32_t var_30_1 = 0;
00641483                          
0064148c                          if (jpeg_comment_size > 0)
0064148c                          {
0064148e                              while (true)
0064148e                              {
0064148e                                  uint8_t* edi_1 = var_3c;
00641494                                  var_3c = &edi_1[1];
00641497                                  jpeg_comment_size = *(uint8_t*)edi_1;
00641499                                  *(uint8_t*)(eax_6 + jpeg_comment) = jpeg_comment_size;
0064149c                                  eax_6 = &eax_6[1];
0064149f                                  char* var_30_2 = eax_6;
0064149f                                  
006414ab                                  if (eax_6 >= ((uint32_t)arg1->jpeg_comment_size))
006414ab                                      break;
006414ab                                  
006414ad                                  jpeg_comment = arg1->jpeg_comment;
0064148e                              }
0064148e                              
006414e5                              s_2 = s;
0064148c                          }
0064148c                          
006414e8                          arg1->jpeg_comment_size = s_2;
006414ef                          result = 0xffffffe2;
0064147f                      }
0064147f                      
00641412                      int32_t var_8_2 = 0xffffffff;
0064146d                  }
0064145f              }
006413b7          }
006413b7          else
006413b9              result = 0xffffffeb;
006413af      }
006413af      
006413cc      if ((var_34 != 0 && var_38 != 0))
006413cc      {
006413d1          int32_t* var_48_1 = &s;
006413d3          operator delete(var_38);
006413db          var_38 = nullptr;
006413cc      }
006413cc      
006413f4      *(uint32_t*)fsbase = var_14;
006413fe      return result;
00641350  }

006413ff                                                                                               8b                                 .
00641400  65 e8 c7 45 c4 e2 ff ff ff c7 45 fc ff ff ff ff eb ae                                            e..E......E.......
00641507                       b8 01 00 00 00 c3 8d 76 00                                                         .......v.

00641510  enum _IJLERR DP_Parse_DQT(struct _JPEG_PROPERTIES* arg1, struct _STATE* arg2, enum _DCTTYPE arg3)

00641510  {
00641525      uint8_t* var_3c = nullptr;
0064152d      void* var_38 = nullptr;
00641531      int32_t var_34 = 0;
00641541      unsigned long var_30;
00641541      enum _IJLERR result = sub_640860(arg2, &var_30);
00641541      
00641545      if (result == IJL_OK)
00641545      {
00641547          unsigned long eax_1 = var_30;
00641547          
0064154e          if (eax_1 >= 2)
0064154e          {
0064155f              var_30 = (eax_1 - 2);
0064155f              
00641563              if ((eax_1 - 2) <= 0x204)
00641563              {
006415b0                  result = Get_Marker_Data_Into_Contiguous_Buffer(arg2, (eax_1 - 2), &var_38, &var_3c, &var_34);
006415b0                  
006415b4                  if (result == IJL_OK)
006415b4                  {
006415b6                      int32_t ebp_1 = 0;
006415b6                      
006415c0                      while (ebp_1 < var_30)
006415c0                      {
006415ca                          uint32_t esi_1 = ((uint32_t)*(uint8_t*)var_3c);
006415cf                          int32_t eax_7 = (esi_1 & 0xf);
006415cf                          
006415d5                          if (eax_7 > 4)
006415d5                          {
00641920                              result = 0xfffffff9;
00641925                              break;
006415d5                          }
006415d5                          
006415db                          int32_t esi_2 = (esi_1 >> 4);
006415de                          int32_t edi = (eax_7 * 0xb4);
006415e7                          *(uint32_t*)(&arg1->jFmtQuant + edi) = esi_2;
006415f1                          uint8_t* edx_5 = &var_3c[1];
006415f2                          var_3c = edx_5;
006415f2                          
006415fe                          if (arg1->maxquantindex <= eax_7)
00641603                              arg1->maxquantindex = (eax_7 + 1);
00641603                          
0064160b                          uint8_t* var_1c_1 = edx_5;
0064160f                          void* ecx_3;
0064160f                          int32_t esi_14;
0064160f                          
0064160f                          if (esi_2 == 0)
0064160f                          {
00641696                              ecx_3 = (&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi);
006416a5                              int32_t ebp_3 = 0;
006416a5                              
006416bf                              while (true)
006416bf                              {
006416bf                                  *(uint16_t*)(*(uint32_t*)(&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi) + (ebp_3 << 1)) = ((uint16_t)edx_5[ebp_3]);
006416d3                                  *(uint16_t*)((*(uint32_t*)(&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi) + (ebp_3 << 1)) + 2) = ((uint16_t)var_3c[(ebp_3 + 1)]);
006416e8                                  *(uint16_t*)((*(uint32_t*)(&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi) + (ebp_3 << 1)) + 4) = ((uint16_t)var_3c[(ebp_3 + 2)]);
006416fd                                  *(uint16_t*)((*(uint32_t*)(&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi) + (ebp_3 << 1)) + 6) = ((uint16_t)var_3c[(ebp_3 + 3)]);
00641702                                  ebp_3 += 4;
00641702                                  
00641708                                  if (ebp_3 >= 0x40)
00641708                                      break;
00641708                                  
006416b0                                  edx_5 = var_3c;
006416bf                              }
006416bf                              
00641900                              esi_14 = esi_2;
0064190f                              ebp_1 += 0x41;
00641912                              var_3c = &var_3c[0x40];
0064160f                          }
0064160f                          else
0064160f                          {
0064161b                              ecx_3 = (&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi);
0064162a                              int32_t ebp_2 = 0;
0064162a                              
00641634                              while (true)
00641634                              {
00641634                                  uint32_t edx_6 = ((uint32_t)*(uint16_t*)(edx_5 + (ebp_2 << 1)));
0064164f                                  *(uint16_t*)(*(uint32_t*)(&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi) + (ebp_2 << 1)) = (((int16_t)((edx_6 & 0xff00) >> 8)) | ((int16_t)(edx_6 << 8)));
00641657                                  uint32_t esi_7 = ((uint32_t)*(uint16_t*)((var_3c + (ebp_2 << 1)) + 2));
00641673                                  *(uint16_t*)((*(uint32_t*)(&*(uint32_t*)((char*)arg1->jFmtQuant[0])[8] + edi) + (ebp_2 << 1)) + 2) = (((int16_t)((esi_7 & 0xff00) >> 8)) | ((int16_t)(esi_7 << 8)));
00641678                                  ebp_2 += 2;
00641678                                  
0064167e                                  if (ebp_2 >= 0x40)
0064167e                                      break;
0064167e                                  
00641630                                  edx_5 = var_3c;
00641634                              }
00641634                              
00641710                              esi_14 = esi_2;
00641722                              ebp_1 += 0x81;
00641728                              var_3c = &var_3c[0x80];
0064160f                          }
0064160f                          
0064172c                          char* quantizer = arg1->rawquanttables[eax_7].quantizer;
0064172c                          
00641735                          if (quantizer != 0)
00641735                          {
0064173b                              &*(uint8_t*)((char*)arg1->rawquanttables[0])[4][(eax_7 << 3)] = eax_7;
0064173b                              
00641744                              if (esi_14 == 0)
00641744                              {
006417d2                                  int32_t var_28_3 = 0;
006417de                                  int32_t var_2c_2 = eax_7;
006417de                                  
006417fb                                  while (true)
006417fb                                  {
006417fb                                      eax_7 = var_1c_1[var_28_3];
006417fe                                      quantizer[var_28_3] = eax_7;
00641801                                      quantizer = var_1c_1[(var_28_3 + 1)];
00641809                                      arg1->rawquanttables[var_2c_2].quantizer[(var_28_3 + 1)] = quantizer;
00641814                                      int32_t ecx_4;
00641814                                      ecx_4 = var_1c_1[(var_28_3 + 2)];
00641818                                      arg1->rawquanttables[var_2c_2].quantizer[(var_28_3 + 2)] = ecx_4;
00641823                                      int32_t edx_24;
00641823                                      edx_24 = var_1c_1[(var_28_3 + 3)];
00641827                                      arg1->rawquanttables[var_2c_2].quantizer[(var_28_3 + 3)] = edx_24;
00641835                                      bool cond:2_1 = (var_28_3 + 4) < 0x40;
00641838                                      var_28_3 += 4;
00641838                                      
0064183c                                      if (!(cond:2_1))
0064183c                                          break;
0064183c                                      
006417f0                                      quantizer = arg1->rawquanttables[var_2c_2].quantizer;
006417fb                                  }
00641744                              }
00641744                              else
00641744                              {
0064174c                                  int32_t var_18_1 = 0;
00641750                                  void* var_24_1 = ecx_3;
00641758                                  int32_t var_2c_1 = eax_7;
00641758                                  
0064177f                                  while (true)
0064177f                                  {
0064177f                                      eax_7 = var_1c_1[var_18_1];
00641782                                      quantizer[var_18_1] = eax_7;
00641785                                      quantizer = var_1c_1[(var_18_1 + 1)];
0064178d                                      arg1->rawquanttables[var_2c_1].quantizer[(var_18_1 + 1)] = quantizer;
00641798                                      ecx_3 = var_1c_1[(var_18_1 + 2)];
0064179c                                      arg1->rawquanttables[var_2c_1].quantizer[(var_18_1 + 2)] = ecx_3;
006417a7                                      int32_t edx_23;
006417a7                                      edx_23 = var_1c_1[(var_18_1 + 3)];
006417ab                                      arg1->rawquanttables[var_2c_1].quantizer[(var_18_1 + 3)] = edx_23;
006417b9                                      bool cond:3_1 = (var_18_1 + 4) < 0x80;
006417bf                                      var_18_1 += 4;
006417bf                                      
006417c3                                      if (!(cond:3_1))
006417c3                                          break;
006417c3                                      
00641774                                      quantizer = arg1->rawquanttables[var_2c_1].quantizer;
0064177f                                  }
0064177f                                  
00641850                                  ecx_3 = var_24_1;
00641744                              }
00641735                          }
00641735                          
0064185e                          if (arg3 == IJL_AAN)
0064185e                          {
00641865                              _FillDecoderQuantTable_AAN(*(uint32_t*)ecx_3);
0064186a                              int32_t nqtables = arg1->nqtables;
0064186a                              
00641873                              if (nqtables < 4)
0064187a                                  arg1->nqtables = (nqtables + 1);
0064185e                          }
0064185e                          else if (arg3 != IJL_IPP)
00641897                          {
006418c5                              _FillDecoderQuantTable_AAN(*(uint32_t*)ecx_3);
006418ca                              int32_t nqtables_2 = arg1->nqtables;
006418ca                              
006418d3                              if (nqtables_2 < 4)
006418da                                  arg1->nqtables = (nqtables_2 + 1);
00641897                          }
00641897                          else
00641897                          {
0064189e                              _FillDecoderQuantTable_IPP(*(uint32_t*)ecx_3);
006418a3                              int32_t nqtables_1 = arg1->nqtables;
006418a3                              
006418ac                              if (nqtables_1 < 4)
006418b3                                  arg1->nqtables = (nqtables_1 + 1);
00641897                          }
006415c0                      }
006415b4                  }
00641563              }
00641563              else
00641565                  result = 0xffffffeb;
0064154e          }
0064154e          else
00641550              result = 0xffffffeb;
00641545      }
00641545      
00641570      if (var_34 != 0)
00641570      {
00641572          void* edx_2 = var_38;
00641572          
00641578          if (edx_2 != 0)
0064157d              operator delete(edx_2);
00641570      }
00641570      
0064158b      return result;
00641510  }

00641685                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
006416ab                                   90 8d 74 26 00                                                             ..t&.
0064170f                                               90                                                                 .
00641762        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
006417ca                                8d b6 00 00 00 00                                                            ......
006417e8                          90 8d b4 26 00 00 00 00                                                          ...&....
00641843           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
00641885                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
006418be                                                                                            8b f6                                ..
006418e5                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
006418fd                                                                                         8d 76 00                               .v.
0064191b                                                                                   90 8d 74 26 00                             ..t&.
00641933                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

00641940  enum _IJLERR DP_Parse_DHT(struct _JPEG_PROPERTIES* arg1, struct _STATE* arg2)

00641940  {
00641954      uint8_t* var_3c = nullptr;
00641958      void* var_38 = nullptr;
0064195c      int32_t var_34 = 0;
0064196c      unsigned long var_30;
0064196c      enum _IJLERR result = sub_640860(arg2, &var_30);
0064196c      
00641970      if (result == IJL_OK)
00641970      {
00641972          unsigned long eax_1 = var_30;
00641972          
00641979          if (eax_1 >= 2)
00641979          {
0064198a              var_30 = (eax_1 - 2);
0064198a              
0064198e              if ((eax_1 - 2) <= 0x443)
0064198e              {
006419da                  result = Get_Marker_Data_Into_Contiguous_Buffer(arg2, (eax_1 - 2), &var_38, &var_3c, &var_34);
006419da                  
006419e6                  if ((result == IJL_OK && var_30 > 0))
006419e6                  {
006419e8                      uint8_t* ecx_1 = var_3c;
006419e8                      
006419f0                      while (true)
006419f0                      {
006419f0                          uint32_t eax_5 = ((uint32_t)*(uint8_t*)ecx_1);
006419fb                          int32_t edx_6 = ((eax_5 & 0xf0) >> 4);
006419fe                          int32_t eax_6 = (eax_5 & 0xf);
006419fe                          
00641a0c                          if ((edx_6 < 0 || edx_6 > 1))
00641a0c                          {
00641ec2                              result = 0xfffffffa;
00641ec7                              break;
00641a0c                          }
00641a0c                          
00641a15                          if (eax_6 > 3)
00641a15                          {
00641eb4                              result = 0xfffffffa;
00641eb9                              break;
00641a15                          }
00641a15                          
00641a25                          if (eax_6 >= arg1->maxhuffindex)
00641a2e                              arg1->maxhuffindex = (eax_6 + 1);
00641a2e                          
00641a3b                          int32_t ebx_4 = (eax_6 * 0xc);
00641a3b                          
00641a5e                          if ((*(uint32_t*)(&arg1->rawhufftables + ebx_4) != 0 && *(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebx_4) != 0))
00641a5e                          {
00641a6e                              int32_t ebx_7 = ((edx_6 + (eax_6 << 1)) * 0xc);
00641a79                              void* ebp_3 = ((char*)arg1 + ebx_7);
00641a7c                              *(uint8_t*)((char*)ebp_3 + 0x3744) = edx_6;
00641a82                              char* ebx_8 = *(uint32_t*)((char*)ebp_3 + 0x373c);
00641a88                              *(uint8_t*)((char*)ebp_3 + 0x3745) = eax_6;
00641a92                              uint8_t* ecx_4;
00641a92                              ecx_4 = var_3c[1];
00641a95                              *(uint8_t*)ebx_8 = ecx_4;
00641a97                              uint8_t* ebx_9 = var_3c;
00641a9b                              uint32_t ecx_5 = ((uint32_t)ebx_9[1]);
00641a9f                              ebx_9 = ebx_9[2];
00641aa8                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 1) = ebx_9;
00641aab                              uint8_t* esi_3 = var_3c;
00641ab3                              uint32_t ebx_11 = (((uint32_t)esi_3[2]) + ecx_5);
00641ab5                              ecx_5 = esi_3[3];
00641abe                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 2) = ecx_5;
00641ac1                              uint8_t* ecx_6 = var_3c;
00641ac9                              uint32_t esi_6 = (((uint32_t)ecx_6[3]) + ebx_11);
00641acb                              ecx_6 = ecx_6[4];
00641ad4                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 3) = ecx_6;
00641ad7                              uint8_t* ecx_7 = var_3c;
00641adf                              uint32_t ebx_14 = (((uint32_t)ecx_7[4]) + esi_6);
00641ae1                              ecx_7 = ecx_7[5];
00641aea                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 4) = ecx_7;
00641aed                              uint8_t* ecx_8 = var_3c;
00641af5                              uint32_t esi_9 = (((uint32_t)ecx_8[5]) + ebx_14);
00641af7                              ecx_8 = ecx_8[6];
00641b00                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 5) = ecx_8;
00641b03                              uint8_t* ecx_9 = var_3c;
00641b0b                              uint32_t ebx_17 = (((uint32_t)ecx_9[6]) + esi_9);
00641b0d                              ecx_9 = ecx_9[7];
00641b16                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 6) = ecx_9;
00641b19                              uint8_t* ecx_10 = var_3c;
00641b21                              uint32_t esi_12 = (((uint32_t)ecx_10[7]) + ebx_17);
00641b23                              ecx_10 = ecx_10[8];
00641b2c                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 7) = ecx_10;
00641b2f                              uint8_t* ecx_11 = var_3c;
00641b37                              uint32_t ebx_20 = (((uint32_t)ecx_11[8]) + esi_12);
00641b39                              ecx_11 = ecx_11[9];
00641b42                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 8) = ecx_11;
00641b45                              uint8_t* ecx_12 = var_3c;
00641b4d                              uint32_t esi_15 = (((uint32_t)ecx_12[9]) + ebx_20);
00641b4f                              ecx_12 = ecx_12[0xa];
00641b58                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 9) = ecx_12;
00641b5b                              uint8_t* ecx_13 = var_3c;
00641b63                              uint32_t ebx_23 = (((uint32_t)ecx_13[0xa]) + esi_15);
00641b65                              ecx_13 = ecx_13[0xb];
00641b6e                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 0xa) = ecx_13;
00641b71                              uint8_t* ecx_14 = var_3c;
00641b79                              uint32_t esi_18 = (((uint32_t)ecx_14[0xb]) + ebx_23);
00641b7b                              ecx_14 = ecx_14[0xc];
00641b84                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 0xb) = ecx_14;
00641b87                              uint8_t* ecx_15 = var_3c;
00641b8f                              uint32_t ebx_26 = (((uint32_t)ecx_15[0xc]) + esi_18);
00641b91                              ecx_15 = ecx_15[0xd];
00641b9a                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 0xc) = ecx_15;
00641b9d                              uint8_t* ecx_16 = var_3c;
00641ba5                              uint32_t edi_2 = (((uint32_t)ecx_16[0xd]) + ebx_26);
00641ba7                              ecx_16 = ecx_16[0xe];
00641bb0                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 0xd) = ecx_16;
00641bb3                              uint8_t* ecx_17 = var_3c;
00641bbb                              uint32_t esi_21 = (((uint32_t)ecx_17[0xe]) + edi_2);
00641bbd                              ecx_17 = ecx_17[0xf];
00641bc6                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 0xe) = ecx_17;
00641bc9                              uint8_t* ecx_18 = var_3c;
00641bd1                              uint32_t ebx_30 = (((uint32_t)ecx_18[0xf]) + esi_21);
00641bd3                              ecx_18 = ecx_18[0x10];
00641bdc                              *(uint8_t*)(*(uint32_t*)((char*)ebp_3 + 0x373c) + 0xf) = ecx_18;
00641bdf                              ecx_1 = var_3c;
00641be3                              uint32_t ebp_5 = ((uint32_t)ecx_1[0x10]);
00641be7                              uint32_t edi_3 = (ebp_5 + ebx_30);
00641bf3                              char* var_28_1 = nullptr;
00641bf3                              
00641bf7                              if (edi_3 > 0)
00641bf7                              {
00641c04                                  void* var_18_1;
00641c04                                  
00641c04                                  if ((ebp_5 + ebx_30) < 6)
00641e9a                                      var_18_1 = (&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebx_7);
00641c04                                  else
00641c04                                  {
00641c19                                      var_18_1 = (&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebx_7);
00641c2d                                      char* eax_7 = nullptr;
00641c2d                                      
00641c44                                      while (true)
00641c44                                      {
00641c44                                          ecx_1 = *(uint8_t*)((ecx_1 + eax_7) + 0x11);
00641c4f                                          eax_7[*(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebx_7)] = ecx_1;
00641c56                                          ecx_1 = *(uint8_t*)((eax_7 + var_3c) + 0x12);
00641c61                                          eax_7[(*(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebx_7) + 1)] = ecx_1;
00641c69                                          uint8_t* ecx_19;
00641c69                                          ecx_19 = *(uint8_t*)((eax_7 + var_3c) + 0x13);
00641c74                                          eax_7[(*(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebx_7) + 2)] = ecx_19;
00641c7c                                          uint8_t* ecx_20;
00641c7c                                          ecx_20 = *(uint8_t*)((eax_7 + var_3c) + 0x14);
00641c87                                          eax_7[(*(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebx_7) + 3)] = ecx_20;
00641c8f                                          uint8_t* ecx_21;
00641c8f                                          ecx_21 = *(uint8_t*)((eax_7 + var_3c) + 0x15);
00641c9a                                          eax_7[(*(uint32_t*)(&*(uint32_t*)((char*)arg1->rawhufftables[0])[4] + ebx_7) + 4)] = ecx_21;
00641c9e                                          eax_7 = &eax_7[5];
00641c9e                                          
00641ca7                                          if (eax_7 > ((ebp_5 + ebx_30) - 6))
00641ca7                                              break;
00641ca7                                          
00641c40                                          ecx_1 = var_3c;
00641c44                                      }
00641c44                                      
00641ca9                                      var_28_1 = eax_7;
00641cb5                                      ecx_1 = var_3c;
00641c04                                  }
00641c04                                  
00641cb9                                  char* ebx_33 = var_28_1;
00641cb9                                  
00641cd4                                  while (true)
00641cd4                                  {
00641cd4                                      ecx_1 = *(uint8_t*)((ecx_1 + ebx_33) + 0x11);
00641cdb                                      ebx_33[*(uint32_t*)var_18_1] = ecx_1;
00641cde                                      ebx_33 = &ebx_33[1];
00641cde                                      
00641ce1                                      if (ebx_33 >= edi_3)
00641ce1                                          break;
00641ce1                                      
00641cd0                                      ecx_1 = var_3c;
00641cd4                                  }
00641cd4                                  
00641ce3                                  ecx_1 = var_3c;
00641bf7                              }
00641a5e                          }
00641a5e                          
00641ce9                          if (edx_6 == 0)
00641ce9                          {
00641d6f                              result = _BuildDecoderHuffmanTable(&ecx_1[1], &ecx_1[0x11], edx_6, eax_6, &arg1->jFmtDcHuffman[eax_6]);
00641d6f                              
00641d73                              if (result != IJL_OK)
00641d73                              {
00641ee4                                  result = 0xfffffffa;
00641ee9                                  break;
00641d73                              }
00641d73                              
00641d7d                              int32_t nhuffDctables = arg1->nhuffDctables;
00641d7d                              
00641d86                              if (nhuffDctables < 4)
00641d8d                                  arg1->nhuffDctables = (nhuffDctables + 1);
00641ce9                          }
00641ce9                          else
00641ce9                          {
00641d1a                              result = _BuildDecoderHuffmanTable(&ecx_1[1], &ecx_1[0x11], edx_6, eax_6, &arg1->jFmtAcHuffman[eax_6]);
00641d1a                              
00641d1e                              if (result != IJL_OK)
00641d1e                              {
00641ed6                                  result = 0xfffffffa;
00641edb                                  break;
00641d1e                              }
00641d1e                              
00641d28                              int32_t nhuffActables = arg1->nhuffActables;
00641d28                              
00641d31                              if (nhuffActables < 4)
00641d38                                  arg1->nhuffActables = (nhuffActables + 1);
00641ce9                          }
00641ce9                          
00641d93                          uint8_t* ecx_27 = var_3c;
00641d9d                          var_3c = &ecx_27[2];
00641da1                          uint32_t esi_27 = ((uint32_t)ecx_27[1]);
00641da8                          var_3c = &ecx_27[3];
00641db0                          uint32_t edx_16 = (((uint32_t)ecx_27[2]) + esi_27);
00641db2                          var_3c = &ecx_27[4];
00641dba                          uint32_t ebx_38 = (((uint32_t)ecx_27[3]) + edx_16);
00641dbf                          var_3c = &ecx_27[5];
00641dc7                          uint32_t esi_29 = (((uint32_t)ecx_27[4]) + ebx_38);
00641dcc                          var_3c = &ecx_27[6];
00641dd4                          uint32_t ebx_40 = (((uint32_t)ecx_27[5]) + esi_29);
00641dd9                          var_3c = &ecx_27[7];
00641de1                          uint32_t esi_31 = (((uint32_t)ecx_27[6]) + ebx_40);
00641de6                          var_3c = &ecx_27[8];
00641dee                          uint32_t ebx_42 = (((uint32_t)ecx_27[7]) + esi_31);
00641df3                          var_3c = &ecx_27[9];
00641dfb                          uint32_t esi_33 = (((uint32_t)ecx_27[8]) + ebx_42);
00641e00                          var_3c = &ecx_27[0xa];
00641e08                          uint32_t ebx_44 = (((uint32_t)ecx_27[9]) + esi_33);
00641e0d                          var_3c = &ecx_27[0xb];
00641e15                          uint32_t esi_35 = (((uint32_t)ecx_27[0xa]) + ebx_44);
00641e1a                          var_3c = &ecx_27[0xc];
00641e22                          uint32_t ebx_46 = (((uint32_t)ecx_27[0xb]) + esi_35);
00641e27                          var_3c = &ecx_27[0xd];
00641e2f                          uint32_t esi_37 = (((uint32_t)ecx_27[0xc]) + ebx_46);
00641e34                          var_3c = &ecx_27[0xe];
00641e3c                          uint32_t ebx_48 = (((uint32_t)ecx_27[0xd]) + esi_37);
00641e41                          var_3c = &ecx_27[0xf];
00641e49                          uint32_t esi_39 = (((uint32_t)ecx_27[0xe]) + ebx_48);
00641e4e                          var_3c = &ecx_27[0x10];
00641e56                          uint32_t ebx_50 = (((uint32_t)ecx_27[0xf]) + esi_39);
00641e5b                          var_3c = &ecx_27[0x11];
00641e63                          uint32_t edx_31 = (((uint32_t)ecx_27[0x10]) + ebx_50);
00641e65                          ecx_1 = &ecx_27[(edx_31 + 0x11)];
00641e69                          var_3c = ecx_1;
00641e76                          bool cond:2_1 = ((var_30 - edx_31) - 0x11) > 0;
00641e78                          var_30 = ((var_30 - edx_31) - 0x11);
00641e78                          
00641e7c                          if (!(cond:2_1))
00641e7c                              break;
00641e7c                          
00641e7c                          continue;
006419f0                      }
006419e6                  }
0064198e              }
0064198e              else
00641990                  result = 0xffffffeb;
00641979          }
00641979          else
0064197b              result = 0xffffffeb;
00641970      }
00641970      
0064199b      if (var_34 != 0)
0064199b      {
0064199d          void* edx_2 = var_38;
0064199d          
006419a3          if (edx_2 != 0)
006419a8              operator delete(edx_2);
0064199b      }
0064199b      
006419b5      return result;
00641940  }

00641c39                                                                             8d b4 26 00 00 00 00                           ..&....
00641cc7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
00641ea3           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
00641eee                                            8b f6                                                                ..

00641ef0  enum _IJLERR DP_Parse_SOS(struct _JPEG_PROPERTIES* arg1, struct _STATE* arg2, struct _FRAME* arg3, struct _SCAN* arg4)

00641ef0  {
00641ef3      int32_t var_8 = 0xffffffff;
00641ef5      int32_t var_c = 0x907adc;
00641efa      int32_t (* var_10)() = j__except_handler3;
00641f05      TEB* fsbase;
00641f05      int32_t var_14 = *(uint32_t*)fsbase;
00641f06      *(uint32_t*)fsbase = &var_14;
00641f10      uint8_t* s;
00641f10      int32_t* var_1c = &s;
00641f1e      __builtin_memset(&s, 0, 0x14);
00641f30      void* ctx = arg2->ctx;
00641f36      int32_t var_8_1 = 0;
00641f42      unsigned long var_5c;
00641f42      enum _IJLERR result_1 = sub_640860(arg2, &var_5c);
00641f4a      enum _IJLERR result = result_1;
00641f4f      void* var_70;
00641f4f      int32_t var_6c;
00641f4f      
00641f4f      if (result_1 == IJL_OK)
00641f4f      {
00641f51          unsigned long eax_1 = var_5c;
00641f51          
00641f57          if (eax_1 >= 2)
00641f57          {
00641fdb              *(uint32_t*)ctx = (eax_1 + 2);
00641fe0              unsigned long esi_2 = (var_5c - 2);
00641fe3              var_5c = esi_2;
00641ff2              uint8_t** var_78_2 = &s;
00641ff8              enum _IJLERR result_2 = Get_Marker_Data_Into_Contiguous_Buffer(arg2, esi_2, &var_70, &s, &var_6c);
00642000              result = result_2;
00642000              
00642005              if (result_2 == IJL_OK)
00642005              {
0064200b                  uint8_t* s_2 = s;
00642011                  s = &s_2[1];
0064201a                  *(uint32_t*)arg4 = ((uint32_t)*(uint8_t*)s_2);
00642029                  uint8_t** var_78_3 = &s;
00642036                  arg4->comps = operator new((arg4->ncomps * 0x18));
0064203c                  struct _SCAN* var_30_1 = arg4;
0064203f                  struct _SCAN_COMPONENT* comps = arg4->comps;
0064203f                  
00642044                  if (comps == 0)
00642232                      result = 0xfffffffb;
00642044                  else
00642044                  {
0064204a                      struct _SCAN_COMPONENT* comps_1 = comps;
0064204f                      int32_t var_34_1 = 0;
00642052                      int32_t var_58_1 = 0;
00642052                      
00642060                      if (var_30_1->ncomps <= 0)
00642060                      {
0064219f                      label_64219f:
0064219f                          uint8_t* s_1 = s;
006421a5                          s = &s_1[1];
006421ae                          var_30_1->start_spec = ((uint32_t)*(uint8_t*)s_1);
006421b4                          s = &s_1[2];
006421be                          arg4->end_spec = ((uint32_t)s_1[1]);
006421cb                          arg4->approx_high = (((uint32_t)s_1[2]) >> 4);
006421d1                          s = &s_1[3];
006421de                          arg4->approx_low = (((uint32_t)s_1[2]) & 0xf);
00641fcc                          int32_t var_8_2 = 0xffffffff;
00642060                      }
00642060                      else
00642060                      {
00642066                          struct _SCAN_COMPONENT* comps_3 = comps;
00642066                          
00642075                          while (true)
00642075                          {
00642075                              uint8_t* s_3 = s;
0064207b                              s = &s_3[1];
0064207e                              uint32_t i = ((uint32_t)*(uint8_t*)s_3);
00642081                              uint32_t i_1 = i;
00642088                              int32_t eax_14 = (((uint32_t)s_3[1]) >> 4);
0064208e                              int32_t var_4c_1 = eax_14;
00642094                              s = &s_3[2];
0064209b                              int32_t ecx_6 = (((uint32_t)s_3[1]) & 0xf);
006420a1                              int32_t var_48_1 = ecx_6;
006420a1                              
006420ba                              if ((eax_14 < 0 || (eax_14 > 4 || ecx_6 > 4)))
006420ba                              {
0064220c                                  result = 0xffffffeb;
00642219                                  uint8_t** var_78_5 = &s;
0064221b                                  operator delete(var_30_1->comps);
00642226                                  arg4->comps = nullptr;
0064222d                                  break;
006420ba                              }
006420ba                              
006420c0                              int32_t ecx_7 = 0;
006420c2                              int32_t var_44_1 = 0;
006420cc                              int32_t ncomps = arg3->ncomps;
006420cc                              
006420d1                              if (ncomps > 0)
006420d1                              {
006420e1                                  while (i != *(uint32_t*)((ecx_7 << 4) + arg3->comps))
006420e1                                  {
006420e3                                      ecx_7 += 1;
006420e6                                      int32_t var_44_2 = ecx_7;
006420e6                                      
006420eb                                      if (ecx_7 >= ncomps)
006420eb                                          break;
006420e1                                  }
006420d1                              }
006420d1                              
006420ef                              if (ecx_7 < ncomps)
006420ef                              {
006420f7                                  int32_t eax_18 = (ecx_7 << 4);
00642100                                  int32_t ebx_5 = *(uint32_t*)(&arg3->comps->quant_sel + eax_18);
00642100                                  
0064210f                                  if ((ebx_5 >= 0 && ebx_5 <= 4))
0064210f                                  {
00642115                                      comps->comp = ecx_7;
00642121                                      comps->hsampling = *(uint32_t*)(&arg3->comps->hsampling + eax_18);
0064212b                                      comps->vsampling = *(uint32_t*)(&arg3->comps->vsampling + eax_18);
00642141                                      comps->dc_table = &arg1->jFmtDcHuffman[eax_14];
00642154                                      comps->ac_table = &arg1->jFmtAcHuffman[ecx_6];
0064216b                                      comps->quant_table = &arg1->jFmtQuant[*(uint32_t*)(&arg3->comps->quant_sel + eax_18)];
00642171                                      arg1->HuffIdentifierDC[var_34_1] = eax_14;
0064217b                                      arg1->HuffIdentifierAC[var_34_1] = ecx_6;
00642182                                      int32_t ebx_13 = (var_34_1 + 1);
00642185                                      var_34_1 = ebx_13;
00642188                                      int32_t var_58_2 = ebx_13;
0064218b                                      comps = &comps[1];
0064218e                                      struct _SCAN_COMPONENT* comps_2 = comps;
00642194                                      var_30_1 = arg4;
00642194                                      
00642199                                      if (ebx_13 >= arg4->ncomps)
00642199                                          goto label_64219f;
00642199                                      
00642199                                      continue;
0064210f                                  }
006420ef                              }
006420ef                              
006421e6                              result = 0xffffffeb;
006421f3                              uint8_t** var_78_4 = &s;
006421f5                              operator delete(var_30_1->comps);
00642200                              arg4->comps = nullptr;
00642207                              break;
00642075                          }
00642060                      }
00642044                  }
00642005              }
00641f57          }
00641f57          else
00641f59              result = 0xffffffeb;
00641f4f      }
00641f4f      
00641f6c      if ((var_6c != 0 && var_70 != 0))
00641f6c      {
00641f71          uint8_t** var_78_1 = &s;
00641f73          operator delete(var_70);
00641f7b          var_70 = nullptr;
00641f6c      }
00641f6c      
00641f94      *(uint32_t*)fsbase = var_14;
00641f9e      return result;
00641ef0  }

00641f9f                                                                                               8b                                 .
00641fa0  65 e8 8b 45 14 8b 50 34 54 52 e8 7f c0 f9 ff 83 c4 08 8b 45 14 c7 40 34 00 00 00 00 c7 45 9c ff  e..E..P4TR.........E..@4.....E..
00641fc0  ff ff ff c7 45 fc ff ff ff ff eb 94                                                              ....E.......
0064223e                                                                                            b8 01                                ..
00642240  00 00 00 c3 8d b6 00 00 00 00 8d bf 00 00 00 00                                                  ................

00642250  int32_t sub_642250(int32_t* arg1, struct _STATE* arg2, int32_t* arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7, int32_t arg8, int32_t arg9, int32_t arg10, char arg11)

00642250  {
0064225b      int32_t ecx = arg4;
00642262      int32_t edx = arg5;
00642270      int32_t var_28 = arg7;
00642274      int32_t ebp = arg10;
0064227b      void* ctx = arg2->ctx;
00642285      int32_t ebx_1;
00642285      
00642285      if (ebp == 1)
006436d2          ebx_1 = 8;
00642285      else if (ebp == 2)
006436c8          ebx_1 = 4;
0064228e      else if (ebp == 4)
006436be          ebx_1 = 2;
00642297      else
0064229d          ebx_1 = 1;
0064229d      
006422ac      int32_t i_24 = (arg6 << 6);
006422ac      
006422c8      if ((ecx != arg8 && edx != arg9))
006422c8      {
006422d2          int32_t esi_1 = arg1[0x1378];
006422de          int32_t var_2c_1;
006422de          
006422de          if (esi_1 == 0)
006422f9              var_2c_1 = *(uint32_t*)arg3;
006422de          else
006422ea              var_2c_1 = arg1[0xdf0];
006422ea          
00642300          if (ebp == 1)
00642300          {
00642959              if (arg6 > 0)
00642959              {
0064296c                  int32_t var_30_9 = var_28;
00642985                  int32_t esi_26 = var_28;
00642989                  int32_t edi_18 = 0;
00642989                  
0064299f                  do
0064299f                  {
00642993                      *(uint32_t*)((char*)ctx + 0x48)(esi_26);
00642996                      esi_26 += 0x80;
0064299c                      edi_18 += 1;
0064299f                  } while (edi_18 < arg6);
0064299f                  
006429ad                  ebp = arg10;
00642959              }
00642300          }
00642300          else
00642300          {
00642309              int32_t* eax_5;
00642309              
00642309              if (ebp == 2)
00642309              {
006425a9                  eax_5 = arg11;
006425a9                  
006425b2                  if (eax_5 == 0)
006425b2                  {
00642680                      int32_t esi_16 = 0;
00642680                      
0064268b                      if (arg6 > 0)
0064268b                      {
006426a1                          int32_t var_30_7 = var_28;
006426b1                          int32_t ebx_7 = var_28;
006426b1                          
006426c2                          do
006426c2                          {
006426b6                              *(uint32_t*)((char*)ctx + 0x4c)(ebx_7);
006426b9                              ebx_7 += 0x80;
006426bf                              esi_16 += 1;
006426c2                          } while (esi_16 < arg6);
006426c2                          
006426d0                          ebp = arg10;
0064268b                      }
006425b2                  }
006425b2                  else
006425b2                  {
006425c0                      int32_t var_30_5 = 0;
006425c0                      
006425ca                      if (var_2c_1 > 0)
006425ca                      {
006425d4                          int32_t esi_13 = 0;
006425d6                          int32_t eax_22 = esi_1;
006425de                          int32_t* edi_11 = arg1;
006425e6                          int32_t ebx_6 = 0;
006425f4                          int32_t i;
006425f4                          
006425f4                          while (true)
006425f4                          {
006425f4                              int32_t i_27;
006425f4                              
006425f4                              if (eax_22 == 0)
006425f4                              {
00642617                                  int32_t ebp_5 = arg3[0xd];
0064261f                                  int32_t ecx_6 = (esi_13 * 0x18);
00642626                                  i_27 = (*(uint32_t*)((ecx_6 + ebp_5) + 4) * *(uint32_t*)((ecx_6 + ebp_5) + 8));
006425f4                              }
006425f4                              else
006425f4                              {
006425f6                                  int32_t ecx_5 = edi_11[0xdf3];
006425fe                                  int32_t edx_14 = (esi_13 << 4);
00642605                                  i_27 = (*(uint32_t*)((edx_14 + ecx_5) + 4) * *(uint32_t*)((edx_14 + ecx_5) + 8));
006425f4                              }
006425f4                              
0064262b                              i = i_27;
0064262b                              
00642630                              if (i_27 == 1)
00642630                              {
006428c0                                  int32_t edx_28 = ebx_6;
006428c2                                  ebx_6 += 1;
006428d4                                  *(uint32_t*)((char*)ctx + 0x48)((var_28 + (edx_28 << 7)));
00642630                              }
00642630                              else
00642630                              {
00642636                                  i = (i_27 - 1);
00642636                                  
0064263b                                  if (i_27 != 0)
0064263b                                  {
00642663                                      do
00642663                                      {
00642650                                          int32_t edx_17 = ebx_6;
00642652                                          ebx_6 += 1;
0064265c                                          *(uint32_t*)((char*)ctx + 0x4c)((var_28 + (edx_17 << 7)));
0064265f                                          i -= 1;
00642663                                      } while (i != 0xffffffff);
00642663                                      
00642669                                      edi_11 = arg1;
0064263b                                  }
00642630                              }
00642630                              
0064266d                              esi_13 += 1;
0064266d                              
00642674                              if (esi_13 >= var_2c_1)
00642674                                  break;
00642674                              
006425ec                              eax_22 = edi_11[0x1378];
006425f4                          }
006425f4                          
00642932                          i_24 = i;
00642942                          ebp = arg10;
006425ca                      }
006425b2                  }
00642309              }
00642309              else if (ebp == 4)
00642312              {
00642318                  eax_5 = arg11;
00642318                  
00642321                  if (eax_5 != 0)
00642321                  {
00642335                      int32_t var_34_1 = 0;
00642335                      
00642339                      if (var_2c_1 > 0)
00642339                      {
00642343                          int32_t eax_6 = esi_1;
00642347                          int32_t ebp_1 = 0;
0064234d                          int32_t esi_4 = 0;
00642351                          int32_t* edi_2 = arg1;
00642363                          int32_t i_1;
00642363                          
00642363                          while (true)
00642363                          {
00642363                              int32_t i_25;
00642363                              
00642363                              if (eax_6 == 0)
00642363                              {
00642387                                  int32_t ebx_2 = arg3[0xd];
0064238f                                  int32_t ecx_2 = (esi_4 * 0x18);
00642396                                  i_25 = (*(uint32_t*)((ecx_2 + ebx_2) + 4) * *(uint32_t*)((ecx_2 + ebx_2) + 8));
00642363                              }
00642363                              else
00642363                              {
00642365                                  int32_t ecx_1 = edi_2[0xdf3];
0064236d                                  int32_t edx_2 = (esi_4 << 4);
00642374                                  i_25 = (*(uint32_t*)((edx_2 + ecx_1) + 4) * *(uint32_t*)((edx_2 + ecx_1) + 8));
00642363                              }
00642363                              
0064239b                              i_1 = i_25;
0064239b                              
006423a0                              if (i_25 == 1)
006423a0                              {
006428a0                                  int32_t edx_26 = ebp_1;
006428a2                                  ebp_1 += 1;
006428b4                                  *(uint32_t*)((char*)ctx + 0x4c)((var_28 + (edx_26 << 7)));
006423a0                              }
006423a0                              else
006423a0                              {
006423a6                                  i_1 = (i_25 - 1);
006423a6                                  
006423ab                                  if (i_25 != 0)
006423ab                                  {
006423d3                                      do
006423d3                                      {
006423c0                                          int32_t edx_5 = ebp_1;
006423c2                                          ebp_1 += 1;
006423cc                                          *(uint32_t*)((char*)ctx + 0x50)((var_28 + (edx_5 << 7)));
006423cf                                          i_1 -= 1;
006423d3                                      } while (i_1 != 0xffffffff);
006423d3                                      
006423d9                                      edi_2 = arg1;
006423ab                                  }
006423a0                              }
006423a0                              
006423dd                              esi_4 += 1;
006423dd                              
006423e4                              if (esi_4 >= var_2c_1)
006423e4                                  break;
006423e4                              
0064235b                              eax_6 = edi_2[0x1378];
00642363                          }
00642363                          
0064285c                          i_24 = i_1;
0064286c                          ebp = arg10;
00642339                      }
00642321                  }
00642321                  else if (arg6 > 0)
006423fb                  {
00642415                      int32_t var_30_2 = var_28;
00642425                      int32_t ebx_3 = var_28;
00642427                      int32_t esi_7 = 0;
00642427                      
0064243f                      do
0064243f                      {
00642433                          *(uint32_t*)((char*)ctx + 0x50)(ebx_3);
00642436                          ebx_3 += 0x80;
0064243c                          esi_7 += 1;
0064243f                      } while (esi_7 < arg6);
0064243f                      
0064244d                      ebp = arg10;
006423fb                  }
00642312              }
00642312              else if (ebp == 8)
0064245c              {
00642462                  eax_5 = arg11;
00642462                  
0064246b                  if (eax_5 == 0)
0064246b                  {
0064254b                      if (arg6 > 0)
0064254b                      {
0064255e                          int32_t var_30_4 = var_28;
00642577                          int32_t esi_12 = var_28;
00642579                          int32_t edi_9 = 0;
00642579                          
0064258f                          do
0064258f                          {
00642583                              *(uint32_t*)((char*)ctx + 0x54)(esi_12);
00642586                              esi_12 += 0x80;
0064258c                              edi_9 += 1;
0064258f                          } while (edi_9 < arg6);
0064258f                          
0064259d                          ebp = arg10;
0064254b                      }
0064246b                  }
0064246b                  else if (var_2c_1 > 0)
00642483                  {
0064248d                      int32_t eax_14 = esi_1;
00642491                      int32_t esi_8 = 0;
00642499                      int32_t* edi_7 = arg1;
006424a1                      int32_t ebx_4 = 0;
006424af                      int32_t i_2;
006424af                      
006424af                      while (true)
006424af                      {
006424af                          int32_t i_26;
006424af                          
006424af                          if (eax_14 == 0)
006424af                          {
006424d7                              int32_t ebp_3 = arg3[0xd];
006424df                              int32_t ecx_4 = (esi_8 * 0x18);
006424e6                              i_26 = (*(uint32_t*)((ecx_4 + ebp_3) + 4) * *(uint32_t*)((ecx_4 + ebp_3) + 8));
006424af                          }
006424af                          else
006424af                          {
006424b1                              int32_t ecx_3 = edi_7[0xdf3];
006424b9                              int32_t edx_8 = (esi_8 << 4);
006424c0                              i_26 = (*(uint32_t*)((edx_8 + ecx_3) + 4) * *(uint32_t*)((edx_8 + ecx_3) + 8));
006424af                          }
006424af                          
006424eb                          i_2 = i_26;
006424eb                          
006424f0                          if (i_26 == 1)
006424f0                          {
00642878                              int32_t edx_24 = ebx_4;
0064287a                              ebx_4 += 1;
0064288c                              *(uint32_t*)((char*)ctx + 0x50)((var_28 + (edx_24 << 7)));
006424f0                          }
006424f0                          else
006424f0                          {
006424f6                              i_2 = (i_26 - 1);
006424f6                              
006424fb                              if (i_26 != 0)
006424fb                              {
00642523                                  do
00642523                                  {
00642510                                      int32_t edx_11 = ebx_4;
00642512                                      ebx_4 += 1;
0064251c                                      *(uint32_t*)((char*)ctx + 0x54)((var_28 + (edx_11 << 7)));
0064251f                                      i_2 -= 1;
00642523                                  } while (i_2 != 0xffffffff);
00642523                                  
00642529                                  edi_7 = arg1;
006424fb                              }
006424f0                          }
006424f0                          
0064252d                          esi_8 += 1;
0064252d                          
00642534                          if (esi_8 >= var_2c_1)
00642534                              break;
00642534                          
006424a7                          eax_14 = edi_7[0x1378];
006424af                      }
006424af                      
006428e0                      i_24 = i_2;
006428f0                      ebp = arg10;
00642483                  }
0064245c              }
00642300          }
00642300          
006426e3          if (arg1[0x1377] != 0)
006426e3          {
006426ef              int32_t edi_14 = arg1[0xdf0];
006426ef              
006426f7              if (edi_14 > 0)
006426f7              {
00642701                  int32_t eax_33 = arg1[0xdf3];
00642729                  int32_t ecx_8 = 0;
00642729                  
00642922                  do
00642922                  {
0064272b                      int32_t ebp_9 = 0;
0064272f                      int32_t esi_21 = (ecx_8 << 4);
00642732                      int32_t ebx_8 = *(uint32_t*)((esi_21 + eax_33) + 8);
00642732                      
00642738                      if (ebx_8 > 0)
00642738                      {
0064273e                          int32_t edx_19 = *(uint32_t*)((esi_21 + eax_33) + 4);
0064273e                          
0064290b                          do
0064290b                          {
00642749                              int32_t ecx_9 = 0;
00642749                              
0064274d                              if (edx_19 > 0)
0064274d                              {
006427a1                                  while (true)
006427a1                                  {
006427a1                                      int32_t ebp_14 = ((((edx_19 * (ecx << 4)) + *(uint32_t*)((arg1[0x1377] + (ecx_8 * 4)) + 4)) + (((ebx_8 * edx) + ebp_9) * (edx_19 * (arg8 << 7)))) + (ecx_9 << 4));
006427a3                                      int32_t i_3 = 0;
006427ad                                      int32_t edi_16 = var_28;
006427ad                                      
006427e4                                      do
006427e4                                      {
006427c0                                          __g_memcpy(ebp_14, edi_16, 0x10);
006427c6                                          eax_33 = arg1[0xdf3];
006427d0                                          edx_19 = *(uint32_t*)((esi_21 + eax_33) + 4);
006427db                                          ebp_14 += ((arg8 << 4) * edx_19);
006427dd                                          edi_16 += 0x10;
006427e0                                          i_3 += 1;
006427e4                                      } while (i_3 < 8);
006427e4                                      
006427e6                                      var_28 = edi_16;
006427f2                                      ecx_9 += 1;
006427f2                                      
006427f5                                      if (ecx_9 >= edx_19)
006427f5                                          break;
006427f5                                      
00642774                                      ebx_8 = *(uint32_t*)((esi_21 + eax_33) + 8);
006427a1                                  }
006427a1                                  
00642904                                  ebx_8 = *(uint32_t*)((esi_21 + eax_33) + 8);
0064274d                              }
0064274d                              
00642908                              ebp_9 += 1;
0064290b                          } while (ebp_9 < ebx_8);
0064290b                          
00642919                          edi_14 = arg1[0xdf0];
00642738                      }
00642738                      
0064291f                      ecx_8 += 1;
00642922                  } while (ecx_8 < edi_14);
006426f7              }
006426f7              
00642931              return 0;
006426e3          }
006422c8      }
006422c8      
0064280d      int32_t* i_29;
0064280d      
0064280d      if (arg1[0x137a] == 1)
0064280d      {
006429db          int32_t edi_19 = arg1[0xdee];
006429db          
0064330d          if ((edi_19 == 2 && arg1[0xdef] == 1))
0064330d          {
00643322              int32_t temp0_2 = (((int64_t)arg1[1]) / (ebx_1 * 2));
00643322              
00643335              if (ecx != arg8)
00643335              {
00643347                  int16_t* var_48_5;
00643347                  
00643347                  if (ecx != (arg8 - 1))
0064345d                      var_48_5 = arg1[0x120d];
00643347                  else
00643347                  {
00643354                      int32_t eax_120 = (arg1[0x13] & 0xf);
00643354                      
00643357                      if (eax_120 == 0)
0064344d                          var_48_5 = arg1[0x120d];
00643357                      else
00643357                      {
0064336a                          int32_t j_12 = (((int64_t)((eax_120 + (ebp << 1)) - 1)) / (ebp * 2));
0064337e                          var_48_5 = arg1[0x120d];
0064337e                          
00643387                          if (arg1[0x1d] != 0)
00643387                          {
0064343b                              if (*(uint32_t*)(arg3[0xd] + 4) == 1)
0064343b                              {
00643620                                  int32_t i_4 = 0;
00643637                                  int16_t* ebx_32 = var_48_5;
00643637                                  
00643696                                  do
00643696                                  {
0064363f                                      int32_t j = j_12;
0064363f                                      
00643644                                      if (j_12 < 8)
00643644                                      {
00643649                                          if ((-(j_12) + 8) >= 6)
00643649                                          {
00643673                                              do
00643673                                              {
00643650                                                  int16_t edx_44 = ebx_32[(j - 1)];
00643655                                                  ebx_32[j] = edx_44;
00643659                                                  ebx_32[(j + 1)] = edx_44;
0064365e                                                  ebx_32[(j + 2)] = edx_44;
00643663                                                  ebx_32[(j + 3)] = edx_44;
00643668                                                  ebx_32[(j + 4)] = edx_44;
0064366d                                                  j += 5;
00643673                                              } while (j < 2);
00643649                                          }
00643649                                          
0064368d                                          do
0064368d                                          {
00643685                                              ebx_32[j] = ebx_32[(j - 1)];
00643689                                              j += 1;
0064368d                                          } while (j < 8);
00643644                                      }
00643644                                      
0064368f                                      ebx_32 = &ebx_32[8];
00643692                                      i_4 += 1;
00643696                                  } while (i_4 < 8);
00643696                                  
006436a4                                  ebp = arg10;
006436b5                                  var_48_5 = arg1[0x120d];
0064343b                              }
00643387                          }
00643387                          else
00643387                          {
00643393                              int32_t edi_67 = arg1[0x15];
00643393                              
006433a0                              if (edi_67 > 0)
006433a0                              {
006433c4                                  int32_t ebp_30 = 0;
006433cc                                  int32_t var_34_6 = 0;
006433d8                                  int32_t edi_71 = arg1[0xdf3];
006433dc                                  int32_t edx_43 = edi_67;
006433e4                                  int16_t* ecx_24 = var_48_5;
006433ec                                  int32_t ebx_27 = 0;
006433ec                                  
00643406                                  do
00643406                                  {
006433ee                                      int32_t eax_143 = *(uint32_t*)((ebx_27 + edi_71) + 4);
006433ee                                      
006433f5                                      if (eax_143 == 1)
006433f5                                      {
0064358d                                          int32_t i_5 = 0;
0064358f                                          int16_t* eax_142 = ecx_24;
0064358f                                          
006435f6                                          do
006435f6                                          {
006435a5                                              int32_t j_1 = j_12;
006435a5                                              
006435aa                                              if (j_12 < 8)
006435aa                                              {
006435af                                                  if ((-(j_12) + 8) >= 6)
006435af                                                  {
006435d4                                                      do
006435d4                                                      {
006435b1                                                          int32_t esi_127 = ((int32_t)eax_142[(j_1 - 1)]);
006435b6                                                          eax_142[j_1] = esi_127;
006435ba                                                          eax_142[(j_1 + 1)] = esi_127;
006435bf                                                          eax_142[(j_1 + 2)] = esi_127;
006435c4                                                          eax_142[(j_1 + 3)] = esi_127;
006435c9                                                          eax_142[(j_1 + 4)] = esi_127;
006435ce                                                          j_1 += 5;
006435d4                                                      } while (j_1 < 2);
006435af                                                  }
006435af                                                  
006435ed                                                  do
006435ed                                                  {
006435e5                                                      eax_142[j_1] = eax_142[(j_1 - 1)];
006435e9                                                      j_1 += 1;
006435ed                                                  } while (j_1 < 8);
006435aa                                              }
006435aa                                              
006435ef                                              eax_142 = &eax_142[8];
006435f2                                              i_5 += 1;
006435f6                                          } while (i_5 < 8);
006435f6                                          
00643608                                          edx_43 = arg1[0x15];
0064360b                                          edi_71 = arg1[0xdf3];
00643611                                          eax_143 = *(uint32_t*)((ebx_27 + edi_71) + 4);
006433f5                                      }
006433f5                                      
006433fe                                      ecx_24 = &ecx_24[(eax_143 * 0x40)];
00643400                                      ebx_27 += 0x10;
00643403                                      ebp_30 += 1;
00643406                                  } while (ebp_30 < edx_43);
00643406                                  
00643414                                  ebp = arg10;
00643425                                  var_48_5 = arg1[0x120d];
006433a0                              }
00643387                          }
00643357                      }
00643347                  }
00643347                  
00643478                  int16_t* eax_136 = ((((ecx * 2) * i_24) + *(uint32_t*)(arg1[0x137b] + 4)) + (i_24 << 1));
00643478                  
00643480                  if (i_24 != 0)
00643480                  {
00643486                      int16_t* ebp_31 = var_48_5;
0064348a                      int32_t i_6 = (i_24 - 1);
0064348a                      
006434a1                      do
006434a1                      {
00643490                          int16_t ebx_28 = *(uint16_t*)ebp_31;
00643494                          i_6 -= 1;
00643495                          ebp_31 = &ebp_31[1];
00643498                          *(uint16_t*)eax_136 = ebx_28;
0064349b                          eax_136 = &eax_136[1];
006434a1                      } while (i_6 != 0xffffffff);
006434a1                      
006434a7                      ebp = arg10;
00643480                  }
00643480                  
006434b0                  if (ecx == 0)
006434b0                  {
006434bf                      int16_t* esi_120 = ((*(uint32_t*)(arg1[0x137b] + 4) + (ebx_1 << 1)) - 2);
006434d4                      int32_t i_7 = (arg6 - 1);
006434d4                      
006434d9                      if (arg6 != 0)
006434d9                      {
006434e3                          int16_t* ebx_29 = arg1[0x120d];
006434e3                          
00643506                          do
00643506                          {
00643500                              for (int32_t j_2 = 7; j_2 != 0xffffffff; )
00643500                              {
006434f0                                  int16_t ecx_25 = *(uint16_t*)ebx_29;
006434f3                                  ebx_29 = &ebx_29[8];
006434f6                                  j_2 -= 1;
006434f7                                  *(uint16_t*)esi_120 = ecx_25;
006434fa                                  esi_120 = &esi_120[8];
00643500                              }
00643500                              
00643502                              i_7 -= 1;
00643506                          } while (i_7 != 0xffffffff);
00643506                          
00643510                          ebp = arg10;
006434d9                      }
006434b0                  }
00643335              }
00643335              
0064351d              if (ecx <= temp0_2)
00642931                  return 0;
00642931              
0064354e              int32_t i_8 = (i_24 - 1);
0064354e              
00643551              if (i_24 != 0)
00643551              {
00643557                  int16_t* ebx_30 = (((ecx * 2) * i_24) + *(uint32_t*)(arg1[0x137b] + 4));
0064355b                  int16_t* eax_141 = arg1[0x120d];
0064355b                  
00643570                  do
00643570                  {
00643560                      int16_t ebp_32 = *(uint16_t*)ebx_30;
00643563                      i_8 -= 1;
00643564                      ebx_30 = &ebx_30[1];
00643567                      *(uint16_t*)eax_141 = ebp_32;
0064356a                      eax_141 = &eax_141[1];
00643570                  } while (i_8 != 0xffffffff);
00643570                  
00643576                  ebp = arg10;
00643551              }
00643551              
0064357d              ecx -= 1;
00643582              edi_19 = arg1[0xdee];
0064330d          }
0064330d          
00642a00          if ((edi_19 != 2 || arg1[0xdef] != 2))
006429ed              goto label_642813;
006429ed          
00642a09          if (ebp == 1)
00642a09          {
00642a16              int32_t eax_47 = (arg1[1] >> 4);
00642a20              int32_t esi_29 = (arg1[2] >> 4);
00642a27              int32_t* edi_21 = arg1[0x137b];
00642a27              
00642a30              if (edx != edi_21[4])
00642a30              {
00642a32                  int32_t eax_48 = *(uint32_t*)edi_21;
00642a3b                  *(uint32_t*)edi_21 = edi_21[1];
00642a41                  void* esi_31 = arg1[0x137b];
00642a4a                  *(uint32_t*)((char*)esi_31 + 4) = *(uint32_t*)((char*)esi_31 + 8);
00642a4a                  
00642a56                  if (edx != arg9)
00642a56                  {
00642a8b                      *(uint32_t*)(arg1[0x137b] + 8) = eax_48;
00642a8e                      edi_21 = arg1[0x137b];
00642a56                  }
00642a56                  else
00642a56                  {
00642a5c                      void* edi_23 = arg1[0x137b];
00642a65                      *(uint32_t*)((char*)edi_23 + 8) = *(uint32_t*)((char*)edi_23 + 0xc);
00642a72                      *(uint32_t*)(arg1[0x137b] + 0xc) = eax_48;
00642a75                      edi_21 = arg1[0x137b];
00642a56                  }
00642a30              }
00642a30              
00642a94              edi_21[4] = edx;
00642a94              
00642aaf              if ((ecx != arg8 && edx != arg9))
00642aaf              {
00642ac5                  int16_t* var_50_2;
00642ac5                  
00642ac5                  if (ecx != (arg8 - 1))
00642be1                      var_50_2 = arg1[0x120d];
00642ac5                  else
00642ac5                  {
00642ad2                      int32_t eax_58 = (arg1[0x13] & 0xf);
00642ad2                      
00642ad5                      if (eax_58 == 0)
00642bd1                          var_50_2 = arg1[0x120d];
00642ad5                      else
00642ad5                      {
00642ae8                          int32_t j_11 = (((int64_t)((eax_58 + (ebp << 1)) - 1)) / (ebp * 2));
00642afc                          var_50_2 = arg1[0x120d];
00642afc                          
00642b05                          if (arg1[0x1d] != 0)
00642b05                          {
00642bbf                              if (*(uint32_t*)(arg3[0xd] + 4) == 1)
00642bbf                              {
006431d0                                  int32_t i_9 = 0;
006431e7                                  int16_t* ecx_22 = var_50_2;
006431e7                                  
00643246                                  do
00643246                                  {
006431ef                                      int32_t j_3 = j_11;
006431ef                                      
006431f4                                      if (j_11 < 8)
006431f4                                      {
006431f9                                          if ((-(j_11) + 8) >= 6)
006431f9                                          {
00643223                                              do
00643223                                              {
00643200                                                  int16_t ebp_28 = ecx_22[(j_3 - 1)];
00643205                                                  ecx_22[j_3] = ebp_28;
00643209                                                  ecx_22[(j_3 + 1)] = ebp_28;
0064320e                                                  ecx_22[(j_3 + 2)] = ebp_28;
00643213                                                  ecx_22[(j_3 + 3)] = ebp_28;
00643218                                                  ecx_22[(j_3 + 4)] = ebp_28;
0064321d                                                  j_3 += 5;
00643223                                              } while (j_3 < 2);
006431f9                                          }
006431f9                                          
0064323d                                          do
0064323d                                          {
00643235                                              ecx_22[j_3] = ecx_22[(j_3 - 1)];
00643239                                              j_3 += 1;
0064323d                                          } while (j_3 < 8);
006431f4                                      }
006431f4                                      
0064323f                                      ecx_22 = &ecx_22[8];
00643242                                      i_9 += 1;
00643246                                  } while (i_9 < 8);
00643246                                  
00643254                                  ebp = arg10;
00643265                                  var_50_2 = arg1[0x120d];
00642bbf                              }
00642b05                          }
00642b05                          else
00642b05                          {
00642b11                              int32_t edi_27 = arg1[0x15];
00642b1a                              int32_t var_2c_2 = edi_27;
00642b1a                              
00642b1e                              if (edi_27 > 0)
00642b1e                              {
00642b28                                  void* esi_38 = arg1[0xdf3];
00642b32                                  void* var_30_11 = esi_38;
00642b4a                                  void* eax_65 = esi_38;
00642b58                                  int16_t* edx_33 = var_50_2;
00642b5c                                  int32_t ecx_16 = 0;
00642b64                                  int32_t ebx_14 = 0;
00642b64                                  
00642b8a                                  do
00642b8a                                  {
00642b68                                      void* esi_39 = ((char*)eax_65 + ecx_16);
00642b6b                                      int32_t edi_31 = *(uint32_t*)((char*)esi_39 + 4);
00642b6b                                      
00642b71                                      if (edi_31 == 1)
00642b71                                      {
00643134                                          int32_t i_10 = 0;
00643136                                          int16_t* eax_107 = edx_33;
00643136                                          
006431a6                                          do
006431a6                                          {
0064314c                                              int32_t j_4 = j_11;
0064314c                                              
00643151                                              if (j_11 < 8)
00643151                                              {
00643156                                                  if ((-(j_11) + 8) >= 6)
00643156                                                  {
00643183                                                      do
00643183                                                      {
00643160                                                          int16_t edx_38 = eax_107[(j_4 - 1)];
00643165                                                          eax_107[j_4] = edx_38;
00643169                                                          eax_107[(j_4 + 1)] = edx_38;
0064316e                                                          eax_107[(j_4 + 2)] = edx_38;
00643173                                                          eax_107[(j_4 + 3)] = edx_38;
00643178                                                          eax_107[(j_4 + 4)] = edx_38;
0064317d                                                          j_4 += 5;
00643183                                                      } while (j_4 < 2);
00643156                                                  }
00643156                                                  
0064319d                                                  do
0064319d                                                  {
00643195                                                      eax_107[j_4] = eax_107[(j_4 - 1)];
00643199                                                      j_4 += 1;
0064319d                                                  } while (j_4 < 8);
00643151                                              }
00643151                                              
0064319f                                              eax_107 = &eax_107[8];
006431a2                                              i_10 += 1;
006431a6                                          } while (i_10 < 8);
006431a6                                          
006431bb                                          var_2c_2 = arg1[0x15];
006431bf                                          eax_65 = arg1[0xdf3];
006431c5                                          esi_39 = ((char*)eax_65 + ecx_16);
006431c8                                          edi_31 = *(uint32_t*)((char*)esi_39 + 4);
00642b71                                      }
00642b71                                      
00642b7a                                      ecx_16 += 0x10;
00642b7d                                      ebx_14 += 1;
00642b82                                      edx_33 += ((edi_31 << 7) * *(uint32_t*)((char*)esi_39 + 8));
00642b8a                                  } while (ebx_14 < var_2c_2);
00642b8a                                  
00642b98                                  ebp = arg10;
00642ba9                                  var_50_2 = arg1[0x120d];
00642b1e                              }
00642b05                          }
00642ad5                      }
00642ac5                  }
00642ac5                  
00642bf5                  if (edx == (arg9 - 1))
00642bf5                  {
00642c02                      int32_t eax_73 = (arg1[0x14] & 0xf);
00642c02                      
00642c05                      if (eax_73 != 0)
00642c05                      {
00642c20                          int32_t edx_36 = arg1[0x15];
00642c20                          
00642c31                          if (edx_36 > 0)
00642c31                          {
00642c3b                              void* edi_35 = arg1[0xdf3];
00642c43                              void* var_30_12 = edi_35;
00642c49                              int32_t j_10 = ((((int64_t)((eax_73 + (ebp << 1)) - 1)) / (ebp * 2)) * 8);
00642c5d                              int32_t ebp_18 = edx_36;
00642c61                              int32_t var_34_4 = 0;
00642c6d                              int16_t* eax_79 = var_50_2;
00642c71                              int32_t edx_37 = 0;
00642c79                              int32_t ecx_17 = 0;
00642c7f                              void* ebx_15 = edi_35;
00642c7f                              
00642ca1                              do
00642ca1                              {
00642c81                                  void* edi_64 = ((char*)ebx_15 + ecx_17);
00642c84                                  int32_t esi_51 = *(uint32_t*)((char*)edi_64 + 8);
00642c84                                  
00642c8a                                  if (esi_51 == 1)
00642c8a                                  {
0064326e                                      int32_t i_11 = 0;
00643270                                      int16_t* ebx_25 = eax_79;
00643270                                      
006432d8                                      do
006432d8                                      {
00643286                                          int32_t j_5 = j_10;
00643286                                          
0064328b                                          if (j_10 < 0x40)
0064328b                                          {
00643290                                              if ((-(j_10) + 0x40) >= 0x30)
00643290                                              {
006432b5                                                  do
006432b5                                                  {
00643292                                                      int32_t esi_103 = ((int32_t)ebx_25[(j_5 - 8)]);
00643297                                                      ebx_25[j_5] = esi_103;
0064329b                                                      ebx_25[(j_5 + 8)] = esi_103;
006432a0                                                      ebx_25[(j_5 + 0x10)] = esi_103;
006432a5                                                      ebx_25[(j_5 + 0x18)] = esi_103;
006432aa                                                      ebx_25[(j_5 + 0x20)] = esi_103;
006432af                                                      j_5 += 0x28;
006432b5                                                  } while (j_5 < 0x10);
00643290                                              }
00643290                                              
006432cf                                              do
006432cf                                              {
006432c5                                                  ebx_25[j_5] = ebx_25[(j_5 - 8)];
006432c9                                                  j_5 += 8;
006432cf                                              } while (j_5 < 0x40);
0064328b                                          }
0064328b                                          
006432d1                                          ebx_25 = &ebx_25[1];
006432d4                                          i_11 += 1;
006432d8                                      } while (i_11 < 8);
006432d8                                      
006432ea                                      ebp_18 = arg1[0x15];
006432ed                                      ebx_15 = arg1[0xdf3];
006432f3                                      edi_64 = ((char*)ebx_15 + ecx_17);
006432f6                                      esi_51 = *(uint32_t*)((char*)edi_64 + 8);
00642c8a                                  }
00642c8a                                  
00642c99                                  eax_79 += (esi_51 * (*(uint32_t*)((char*)edi_64 + 4) << 7));
00642c9b                                  ecx_17 += 0x10;
00642c9e                                  edx_37 += 1;
00642ca1                              } while (edx_37 < ebp_18);
00642ca1                              
00642caf                              ebp = arg10;
00642cc0                              var_50_2 = arg1[0x120d];
00642c31                          }
00642c05                      }
00642bf5                  }
00642bf5                  
00642ccb                  int32_t eax_82 = ((i_24 * 2) * ecx);
00642cd2                  int32_t edi_38 = (i_24 * 2);
00642cef                  int32_t i_12 = (i_24 - 1);
00642cef                  
00642cf4                  if (i_24 != 0)
00642cf4                  {
00642cfa                      int16_t* ebp_19 = var_50_2;
00642cfe                      int16_t* esi_60 = ((*(uint32_t*)(arg1[0x137b] + 8) + (i_24 << 1)) + eax_82);
00642cfe                      
00642d11                      do
00642d11                      {
00642d00                          int16_t ebx_16 = *(uint16_t*)ebp_19;
00642d04                          i_12 -= 1;
00642d05                          ebp_19 = &ebp_19[1];
00642d08                          *(uint16_t*)esi_60 = ebx_16;
00642d0b                          esi_60 = &esi_60[1];
00642d11                      } while (i_12 != 0xffffffff);
00642d11                      
00642d17                      ebp = arg10;
00642cf4                  }
00642cf4                  
00642d20                  if (ecx == 0)
00642d20                  {
00642d2f                      int16_t* esi_63 = (*(uint32_t*)(arg1[0x137b] + 8) + 0xe);
00642d43                      int32_t i_13 = (arg6 - 1);
00642d43                      
00642d48                      if (arg6 != 0)
00642d48                      {
00642d52                          int16_t* ebx_17 = arg1[0x120d];
00642d52                          
00642d76                          do
00642d76                          {
00642d70                              for (int32_t j_6 = 7; j_6 != 0xffffffff; )
00642d70                              {
00642d60                                  int16_t ebp_20 = *(uint16_t*)ebx_17;
00642d63                                  ebx_17 = &ebx_17[8];
00642d66                                  j_6 -= 1;
00642d67                                  *(uint16_t*)esi_63 = ebp_20;
00642d6a                                  esi_63 = &esi_63[8];
00642d70                              }
00642d70                              
00642d72                              i_13 -= 1;
00642d76                          } while (i_13 != 0xffffffff);
00642d76                          
00642d80                          ebp = arg10;
00642d48                      }
00642d20                  }
00642d20                  
00642d8d                  if (ecx == (arg8 - 1))
00642d8d                  {
00642dad                      int16_t* esi_66 = (arg1[0x120d] + 0xe);
00642dc7                      int32_t i_14 = (arg6 - 1);
00642dc7                      
00642dcc                      if (arg6 != 0)
00642dcc                      {
00642dd6                          int16_t* ebx_18 = ((((arg8 * 2) * i_24) + *(uint32_t*)(arg1[0x137b] + 8)) + edi_38);
00642dd6                          
00642df6                          do
00642df6                          {
00642df0                              for (int32_t j_7 = 7; j_7 != 0xffffffff; )
00642df0                              {
00642de0                                  int16_t ecx_18 = *(uint16_t*)esi_66;
00642de3                                  esi_66 = &esi_66[8];
00642de6                                  j_7 -= 1;
00642de7                                  *(uint16_t*)ebx_18 = ecx_18;
00642dea                                  ebx_18 = &ebx_18[8];
00642df0                              }
00642df0                              
00642df2                              i_14 -= 1;
00642df6                          } while (i_14 != 0xffffffff);
00642df6                          
00642e00                          ebp = arg10;
00642dcc                      }
00642d8d                  }
00642d8d                  
00642e09                  if (edx == 0)
00642e09                  {
00642e2d                      int16_t* esi_70 = ((*(uint32_t*)(arg1[0x137b] + 4) + edi_38) + eax_82);
00642e31                      int32_t i_15 = (arg6 - 1);
00642e41                      int32_t i_22 = i_15;
00642e41                      
00642e45                      if (arg6 != 0)
00642e45                      {
00642e4b                          int16_t* ecx_19 = arg1[0x120d];
00642e4b                          
00642e79                          do
00642e79                          {
00642e56                              int32_t j_8 = 7;
00642e5c                              esi_70 = &esi_70[0x38];
00642e5c                              
00642e70                              do
00642e70                              {
00642e60                                  int16_t ebp_21 = *(uint16_t*)ecx_19;
00642e63                                  ecx_19 = &ecx_19[1];
00642e66                                  j_8 -= 1;
00642e67                                  *(uint16_t*)esi_70 = ebp_21;
00642e6a                                  esi_70 = &esi_70[1];
00642e70                              } while (j_8 != 0xffffffff);
00642e70                              
00642e72                              ecx_19 = &ecx_19[0x38];
00642e75                              i_15 -= 1;
00642e79                          } while (i_15 != 0xffffffff);
00642e79                          
00642e83                          ebp = arg10;
00642e45                      }
00642e45                      
00642e8c                      if (ecx == 0)
00642e8c                      {
00642e9b                          int16_t* esi_74 = (*(uint32_t*)(arg1[0x137b] + 4) + 0x7e);
00642ea4                          int32_t i_16 = i_22;
00642ea4                          
00642eb5                          if (arg6 != 0)
00642eb5                          {
00642ebb                              int16_t* ebp_22 = arg1[0x120d];
00642ebb                              
00642ed7                              do
00642ed7                              {
00642ec0                                  int16_t ebx_19 = *(uint16_t*)ebp_22;
00642ec4                                  ebp_22 = &ebp_22[0x40];
00642eca                                  i_16 -= 1;
00642ecb                                  *(uint16_t*)esi_74 = ebx_19;
00642ece                                  esi_74 = &esi_74[0x40];
00642ed7                              } while (i_16 != 0xffffffff);
00642ed7                              
00642edd                              ebp = arg10;
00642eb5                          }
00642e8c                      }
00642e8c                      
00642eea                      if (ecx == (arg8 - 1))
00642eea                      {
00642f06                          int16_t* eax_92 = (arg1[0x120d] + 0xe);
00642f06                          
00642f22                          if (arg6 != 0)
00642f22                          {
00642f28                              int32_t i_17 = i_22;
00642f2c                              int16_t* esi_80 = (((((arg8 * 2) * i_24) + *(uint32_t*)(arg1[0x137b] + 4)) + edi_38) + 0x70);
00642f2c                              
00642f45                              do
00642f45                              {
00642f30                                  int16_t ebp_23 = *(uint16_t*)eax_92;
00642f33                                  eax_92 = &eax_92[0x40];
00642f38                                  i_17 -= 1;
00642f39                                  *(uint16_t*)esi_80 = ebp_23;
00642f3c                                  esi_80 = &esi_80[0x40];
00642f45                              } while (i_17 != 0xffffffff);
00642f45                              
00642f4b                              ebp = arg10;
00642f22                          }
00642eea                      }
00642e09                  }
00642e09                  
00642f58                  if (edx == (arg9 - 1))
00642f58                  {
00642f7c                      void* esi_84 = ((*(uint32_t*)(arg1[0x137b] + 0xc) + edi_38) + eax_82);
00642f80                      int32_t i_18 = (arg6 - 1);
00642f90                      int32_t i_23 = i_18;
00642f90                      
00642f94                      if (arg6 != 0)
00642f94                      {
00642f9e                          int16_t* ebx_20 = arg1[0x120d];
00642f9e                          
00642fc9                          do
00642fc9                          {
00642fa2                              ebx_20 = &ebx_20[0x38];
00642fa5                              int32_t j_9 = 7;
00642faa                              int16_t* esi_85 = esi_84;
00642faa                              
00642fc0                              do
00642fc0                              {
00642fb0                                  int16_t ecx_20 = *(uint16_t*)ebx_20;
00642fb3                                  ebx_20 = &ebx_20[1];
00642fb6                                  j_9 -= 1;
00642fb7                                  *(uint16_t*)esi_85 = ecx_20;
00642fba                                  esi_85 = &esi_85[1];
00642fc0                              } while (j_9 != 0xffffffff);
00642fc0                              
00642fc2                              esi_84 = &esi_85[0x38];
00642fc5                              i_18 -= 1;
00642fc9                          } while (i_18 != 0xffffffff);
00642fc9                          
00642fd3                          ebp = arg10;
00642f94                      }
00642f94                      
00642fdc                      if (ecx == 0)
00642fdc                      {
00642feb                          int16_t* eax_98 = (*(uint32_t*)(arg1[0x137b] + 0xc) + 0xe);
00642ff4                          int16_t* edi_58 = (arg1[0x120d] + 0x70);
00642ff7                          int16_t* var_2c_4 = edi_58;
00642ff7                          
0064300c                          if (arg6 != 0)
0064300c                          {
00643016                              int16_t* ebp_24 = edi_58;
00643019                              int32_t i_19 = i_23;
00643019                              
00643036                              do
00643036                              {
00643020                                  int16_t ebx_21 = *(uint16_t*)ebp_24;
00643024                                  ebp_24 = &ebp_24[0x40];
0064302a                                  i_19 -= 1;
0064302b                                  *(uint16_t*)eax_98 = ebx_21;
0064302e                                  eax_98 = &eax_98[0x40];
00643036                              } while (i_19 != 0xffffffff);
00643036                              
0064303c                              ebp = arg10;
0064300c                          }
00642fdc                      }
00642fdc                      
00643049                      if (ecx == (arg8 - 1))
00643049                      {
00643070                          int16_t* eax_104 = ((((arg8 * 2) * i_24) + *(uint32_t*)(arg1[0x137b] + 0xc)) + edi_38);
00643070                          
0064307d                          if (arg6 != 0)
0064307d                          {
00643083                              int32_t i_20 = i_23;
00643087                              int16_t* esi_93 = (arg1[0x120d] + 0x7e);
00643087                              
006430a5                              do
006430a5                              {
00643090                                  int16_t ebp_25 = *(uint16_t*)esi_93;
00643093                                  esi_93 = &esi_93[0x40];
00643099                                  i_20 -= 1;
0064309a                                  *(uint16_t*)eax_104 = ebp_25;
0064309d                                  eax_104 = &eax_104[0x40];
006430a5                              } while (i_20 != 0xffffffff);
006430a5                              
006430ab                              ebp = arg10;
0064307d                          }
00643049                      }
00642f58                  }
00642aaf              }
00642aaf              
006430c4              if ((ecx <= eax_47 || edx <= esi_29))
00642931                  return 0;
00642931              
006430d4              i_29 = i_24;
006430f5              void* i_28 = ((char*)i_29 - 1);
006430f5              
006430f8              if (i_29 != 0)
006430f8              {
006430fe                  int16_t* ebx_22 = (((i_29 * 2) * ecx) + *(uint32_t*)(arg1[0x137b] + 4));
00643102                  i_29 = arg1[0x120d];
00643106                  void* i_21 = i_28;
00643106                  
00643120                  do
00643120                  {
00643110                      int16_t ebp_26 = *(uint16_t*)ebx_22;
00643113                      i_21 -= 1;
00643114                      ebx_22 = &ebx_22[1];
00643117                      *(uint16_t*)i_29 = ebp_26;
0064311a                      i_29 += 2;
00643120                  } while (i_21 != 0xffffffff);
00643120                  
00643126                  ebp = arg10;
006430f8              }
006430f8              
0064312d              ecx -= 1;
0064312e              edx -= 1;
0064312f              goto label_642813;
00642a09          }
0064280d      }
0064280d      else
0064280d      {
00642813      label_642813:
00642813          
00642816          if (ebp == 1)
00642816          {
006429cc              *(uint32_t*)((char*)ctx + 0xa0)(arg1, ecx, edx);
0064285b              return 0;
00642816          }
0064280d      }
0064280d      
0064282e      i_29 = arg11;
0064284d      US_And_CC_MCU_Scaled(arg1, arg2, arg3, ecx, edx, ebx_1, i_29);
0064285b      return 0;
00642250  }

0064237b                                                                                   90 8d 74 26 00                             ..t&.
006423ef                                               90                                                                 .
006424c7                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0064253f                                                                                               90                                 .
0064260c                                      8d 74 26 00                                                              .t&.
0064267f                                                                                               90                                 .
00642761     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
00642894                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
006428bc                                                                                      8d 74 26 00                              .t&.
006428dc                                                                                      8d 74 26 00                              .t&.
006432fe                                                                                            8b f6                                ..
0064361a                                                                                8d b6 00 00 00 00                            ......
006436dc                                                                                      8d 74 26 00                              .t&.

006436e0  int32_t sub_6436e0(int32_t arg1, int32_t* arg2, void* arg3, int32_t* arg4)

006436e0  {
006436fb      int32_t ecx_2 = (arg1 * 0x28);
006436fe      int32_t eax_1 = arg4[0x120c];
00643708      int32_t eax_2 = *(uint32_t*)((eax_1 + ecx_2) + 0x1c);
0064370c      *(uint32_t*)arg2 = *(uint32_t*)((eax_1 + ecx_2) + 0x18);
0064370e      arg2[1] = eax_2;
0064371b      arg2[3] = *(uint32_t*)((arg4[0x120c] + ecx_2) + 0x20);
00643724      int32_t eax_5;
00643724      eax_5 = *(uint8_t*)((arg4[0x120c] + ecx_2) + 0x24);
00643728      arg2[0xc] = eax_5;
00643735      *(uint32_t*)((char*)arg3 + 0x24) = *(uint32_t*)((arg4[0x120c] + ecx_2) + 4);
00643742      *(uint32_t*)((char*)arg3 + 0x28) = *(uint32_t*)((arg4[0x120c] + ecx_2) + 8);
0064374f      *(uint32_t*)((char*)arg3 + 0x2c) = *(uint32_t*)((arg4[0x120c] + ecx_2) + 0xc);
0064375c      *(uint32_t*)((char*)arg3 + 0x30) = *(uint32_t*)((arg4[0x120c] + ecx_2) + 0x10);
0064375f      int32_t eax_14 = *(uint32_t*)arg4;
0064375f      
00643778      if (((((eax_14 == 2 || eax_14 == 6) || eax_14 == 0xe) || eax_14 == 0x12) || eax_14 == 0x10))
00643778      {
006437a5          unsigned long ecx_5 = arg4[0x120c][(arg1 * 0xa)];
006437a8          void* edx_3 = arg2[0xf];
006437ab          arg2[7] = ecx_5;
006437ab          
006437c4          if (ownSeekFile(edx_3, ecx_5, 0) == 0)
006437d1              return 0xffffffe9;
006437d1          
006437dc          if (Buffer_Read_Bytes(arg2) != IJL_OK)
006437e9              return 0xffffffe9;
00643778      }
00643778      else
00643778      {
00643780          int32_t edx_1 = arg4[0x120c][(arg1 * 0xa)];
00643783          int32_t ecx_3 = arg2[8];
00643786          arg2[4] = edx_1;
0064378c          int32_t edx_2 = (edx_1 - arg4[0x11]);
0064378e          arg2[7] = edx_2;
00643793          arg2[9] = (ecx_3 - edx_2);
00643778      }
00643778      
0064379e      return 0;
006436e0  }

006437ea                                8d b6 00 00 00 00                                                            ......

006437f0  int32_t sub_6437f0(int32_t arg1, int32_t* arg2, void* arg3, int32_t* arg4)

006437f0  {
00643808      int32_t edx_2 = (arg1 * 0x28);
00643814      *(uint32_t*)((arg4[0x120c] + edx_2) + 4) = *(uint32_t*)((char*)arg3 + 0x24);
00643821      *(uint32_t*)((arg4[0x120c] + edx_2) + 8) = *(uint32_t*)((char*)arg3 + 0x28);
0064382e      *(uint32_t*)((arg4[0x120c] + edx_2) + 0xc) = *(uint32_t*)((char*)arg3 + 0x2c);
0064383b      *(uint32_t*)((arg4[0x120c] + edx_2) + 0x10) = *(uint32_t*)((char*)arg3 + 0x30);
00643841      int32_t ecx_2 = arg2[1];
00643844      int32_t edi_3 = arg4[0x120c];
0064384a      *(uint32_t*)((edi_3 + edx_2) + 0x18) = *(uint32_t*)arg2;
0064384e      *(uint32_t*)((edi_3 + edx_2) + 0x1c) = ecx_2;
0064385b      *(uint32_t*)((arg4[0x120c] + edx_2) + 0x20) = arg2[3];
0064385f      int32_t eax_6;
0064385f      eax_6 = arg2[0xc];
00643868      *(uint8_t*)((arg4[0x120c] + edx_2) + 0x24) = eax_6;
0064386c      int32_t eax_7 = *(uint32_t*)arg4;
0064386c      
00643886      if ((eax_7 == 2 || (eax_7 == 0xe || (eax_7 == 0x10 || (eax_7 == 6 || eax_7 == 0x12)))))
00643886      {
00643898          int32_t eax_9 = arg2[7];
0064389b          arg4[0x120c][(arg1 * 0xa)] = eax_9;
006438a7          return eax_9;
00643886      }
00643886      
00643888      int32_t eax_8 = arg2[4];
0064388b      arg4[0x120c][(arg1 * 0xa)] = eax_8;
00643897      return eax_8;
006437f0  }

006438a8                          90 8d b4 26 00 00 00 00                                                          ...&....

006438b0  enum _IJLERR sub_6438b0(struct _STATE* arg1, void* arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6)

006438b0  {
006438cb      int32_t edi = *(uint32_t*)((char*)arg2 + 0x18);
006438cb      
006438ec      if ((edi != 0 && ((COMBINE(0, ((arg5 + (arg6 * arg3)) + 1)) % edi) == 0 && ((arg5 + (arg6 * arg3)) + 1) < (arg4 * arg3))))
006438ec      {
006438f0          *(uint32_t*)((char*)arg2 + 0x24) = 0;
006438f3          *(uint32_t*)((char*)arg2 + 0x28) = 0;
006438f6          *(uint32_t*)((char*)arg2 + 0x2c) = 0;
006438f9          *(uint32_t*)((char*)arg2 + 0x30) = 0;
006438ff          bool cond:0_1 = arg1->unread_marker == 0;
00643901          arg1->bitbuf_bits_valid = 0;
00643901          
00643904          if (cond:0_1)
00643904          {
0064391f              void var_14;
0064391f              enum _IJLERR result = DP_Get_Next_Marker(arg1, &var_14);
0064391f              
00643926              if (result != IJL_OK)
0064392f                  return result;
00643904          }
00643904          else
00643906              arg1->unread_marker = 0;
006438ec      }
006438ec      
00643913      return 0;
006438b0  }


00643930  int32_t sub_643930(struct _STATE* arg1, int32_t* arg2, int32_t* arg3, int32_t arg4)

00643930  {
00643931      int32_t esi;
00643931      int32_t var_8 = esi;
00643941      int32_t* edi = arg2;
00643948      int32_t* ebx = arg3;
00643952      void* ctx = arg1->ctx;
0064395b      int32_t ebp = 0;
0064395d      int32_t var_18 = 0;
00643964      int32_t ecx_1 = *(uint32_t*)edi;
00643968      struct _HUFFMAN_TABLE* var_94;
00643968      void var_84;
00643968      void var_74;
00643968      void* edx;
00643968      
00643968      if (ecx_1 > 0)
00643968      {
0064396a          edx = edi[0xd];
00643972          int32_t eax_1 = 0;
00643972          
006439a3          do
006439a3          {
00643984              &var_94[ebp] = *(uint32_t*)((eax_1 + edx) + 0x10);
0064398c              *(uint32_t*)(&var_84 + (ebp << 2)) = *(uint32_t*)((eax_1 + edx) + 0xc);
00643999              *(uint32_t*)(&var_74 + (ebp << 2)) = (*(uint32_t*)((eax_1 + edx) + 4) * *(uint32_t*)((eax_1 + edx) + 8));
0064399d              eax_1 += 0x18;
006439a0              ebp += 1;
006439a3          } while (ebp < ecx_1);
00643968      }
00643968      
006439a5      int32_t ebp_1 = 0;
006439a7      int32_t ecx_2 = ebx[0xdf0];
006439a7      
006439af      if (ecx_2 > 0)
006439af      {
006439b1          edx = ebx[0xdf3];
006439b9          int32_t eax_2 = 0;
006439bc          int32_t edi_1 = var_18;
006439bc          
006439d4          do
006439d4          {
006439c7              ebp_1 += 1;
006439cd              edi_1 += (*(uint32_t*)((eax_2 + edx) + 4) * *(uint32_t*)((eax_2 + edx) + 8));
006439cf              eax_2 += 0x10;
006439d4          } while (ebp_1 < ecx_2);
006439d4          
006439d6          var_18 = edi_1;
006439dd          edi = arg2;
006439af      }
006439af      
006439e4      int32_t eax_3 = ebx[0xdee];
00644ca9      char var_1c;
00644ca9      
00644ca9      if ((eax_3 == 1 && ebx[0xdef] == 1))
00644cb1          var_1c = 0;
00644ca9      else
00644ca9      {
006439f5          int32_t ebp_2 = 0;
006439f9          var_1c = 1;
006439f9          
00643a00          if (ecx_2 > 0)
00643a00          {
00643a04              int32_t edx_1 = 0;
00643a07              int32_t var_24_1 = eax_3;
00643a0e              eax_3 = 1;
00643a0e              
00643a22              while (true)
00643a22              {
00643a22                  if (eax_3 == 0)
00643a22                  {
00644c86                      var_1c = eax_3;
00644c8d                      eax_3 = var_24_1;
00644c94                      edi = arg2;
00644c9b                      break;
00643a22                  }
00643a22                  
00643a28                  int32_t esi_7 = ebx[0xdf3];
00643a2e                  int32_t edi_3 = *(uint32_t*)((esi_7 + edx_1) + 4);
00643a2e                  
00643a36                  if (edi_3 != *(uint32_t*)((esi_7 + edx_1) + 8))
00643a38                      eax_3 = 0;
00643a38                  
00643a42                  if ((edi_3 != 1 && edi_3 != 2))
00643a44                      eax_3 = 0;
00643a44                  
00643a46                  edx_1 += 0x10;
00643a49                  ebp_2 += 1;
00643a49                  
00643a4c                  if (ebp_2 >= ecx_2)
00643a4c                  {
00643a4e                      var_1c = eax_3;
00643a55                      eax_3 = var_24_1;
00643a5c                      edi = arg2;
00643a5c                      break;
00643a4c                  }
00643a22              }
00643a00          }
00644ca9      }
00644ca9      
00644c6f      int32_t var_44;
00644c6f      
00644c6f      if (((eax_3 == 2 && ebx[0xdef] <= 2) && ebx[0x137a] == 1))
00644c7a          var_44 = 1;
00644c6f      else
00643a6e          var_44 = 0;
00643a6e      
00644c40      int32_t var_14;
00644c40      
00644c40      if (((eax_3 == 2 && ebx[0xdef] == 2) && ebx[0x137a] == 1))
00644c4b          var_14 = 1;
00644c40      else
00643a80          var_14 = 0;
00643a80      
00643a97      int32_t var_b8;
00643a97      int32_t var_b4;
00643a97      int32_t var_b0;
00643a97      int32_t var_ac;
00643a97      int32_t* var_a8;
00643a97      int32_t var_a4;
00643a97      int32_t var_a0;
00643a97      char var_9c;
00643a97      
00643a97      if ((edi[2] == 0 || edi[3] == 0))
00643a97      {
00644050          int32_t ebp_21 = edi[8];
00644053          int32_t eax_45 = ebx[0x1f];
00644053          
00644058          if (ebp_21 < eax_45)
00644058          {
00644067              int32_t ecx_33 = (var_18 << 7);
00644075              int32_t var_48_2 = ebp_21;
0064453a              int32_t edx_73;
0064453a              
0064453a              do
0064453a              {
00644079                  int32_t esi_26 = edi[7];
0064407c                  int32_t* ecx_34 = ebx[0x1e];
00644081                  int32_t* var_bc;
00644081                  
00644081                  if (esi_26 < ecx_34)
00644081                  {
00644517                      do
00644517                      {
00644094                          int32_t eax_48 = 0;
006440a0                          int32_t edx_43 = *(uint32_t*)edi[0xd];
006440a7                          int32_t* ebp_26 = ((((ecx_34 * var_48_2) + esi_26) * ecx_33) + ebx[0x1379]);
006440a7                          
006440b6                          if (edx_43 > 0)
006440b6                          {
006440b8                              int32_t edx_44 = ebx[0xdf3];
006440cb                              int32_t var_40_4 = 0;
006440da                              int32_t ecx_35 = 0;
006440da                              
006440f7                              do
006440f7                              {
006440ea                                  eax_48 += 1;
006440f0                                  ebp_26 += ((*(uint32_t*)((ecx_35 + edx_44) + 4) << 7) * *(uint32_t*)((ecx_35 + edx_44) + 8));
006440f2                                  ecx_35 += 0x10;
006440f7                              } while (eax_48 < edx_43);
006440f7                              
00644101                              ebx = arg3;
00644108                              edi = arg2;
006440b6                          }
006440b6                          
00644114                          if (edi[4] != 0)
00644114                          {
006441c0                              int32_t eax_50 = 0;
006441c2                              int32_t edx_53 = *(uint32_t*)edi;
006441c2                              
006441c6                              if (edx_53 > 0)
006441c6                              {
0064421c                                  do
0064421c                                  {
006441cc                                      int32_t i = 0;
006441cc                                      
006441d4                                      if (*(uint32_t*)(&var_74 + (eax_50 << 2)) > 0)
006441d4                                      {
006441d6                                          int32_t var_3c_3 = eax_50;
006441d6                                          
00644215                                          do
00644215                                          {
006441fe                                              Decode_Block_Prog_DC_SA(arg1, ebp_26, edi[5]);
00644203                                              ebp_26 = &ebp_26[0x20];
00644209                                              i += 1;
0064420a                                              eax_50 = var_3c_3;
00644215                                          } while (i < *(uint32_t*)(&var_74 + (eax_50 << 2)));
00644215                                          
00644217                                          edx_53 = *(uint32_t*)edi;
006441d4                                      }
006441d4                                      
00644219                                      eax_50 += 1;
0064421c                                  } while (eax_50 < edx_53);
0064421c                                  
00644222                                  ebx = arg3;
00644229                                  ecx_34 = ebx[0x1e];
006441c6                              }
00644114                          }
00644114                          else
00644114                          {
0064411c                              int32_t edx_48 = *(uint32_t*)edi;
0064411c                              
00644120                              if (edx_48 > 0)
00644120                              {
0064412a                                  int32_t ebx_11 = 0;
0064412a                                  
0064419f                                  do
0064419f                                  {
00644134                                      if (*(uint32_t*)(&var_74 + (ebx_11 << 2)) > 0)
00644134                                      {
00644136                                          int32_t i_1 = 0;
00644136                                          
00644198                                          do
00644198                                          {
0064414b                                              __g_memzero(ebp_26, 0x80, var_bc, var_b8, var_b4, var_b0, var_ac, var_a8, var_a4, var_a0, var_9c);
0064415c                                              int16_t var_64 = ((int16_t)edi[(ebx_11 + 9)]);
0064416c                                              var_bc = ebp_26;
00644174                                              var_b8 = &var_64;
0064417b                                              var_b4 = edi[5];
0064417f                                              Decode_Block_Prog_DC(arg1, *(uint32_t*)(&var_84 + (ebx_11 << 2)), var_bc, var_b8, var_b4);
00644189                                              ebp_26 = &ebp_26[0x20];
0064418f                                              i_1 += 1;
00644190                                              edi[(ebx_11 + 9)] = ((int32_t)var_64);
00644198                                          } while (i_1 < *(uint32_t*)(&var_74 + (ebx_11 << 2)));
00644198                                          
0064419a                                          edx_48 = *(uint32_t*)edi;
00644134                                      }
00644134                                      
0064419c                                      ebx_11 += 1;
0064419f                                  } while (ebx_11 < edx_48);
0064419f                                  
006441a5                                  ebx = arg3;
006441ac                                  ecx_34 = ebx[0x1e];
00644120                              }
00644114                          }
00644114                          
0064423d                          var_bc = ecx_34;
00644245                          var_b8 = ebx[0x1f];
00644249                          var_b4 = esi_26;
0064424d                          var_b0 = var_48_2;
0064424d                          
00644258                          if (sub_6438b0(arg1, edi, var_bc, var_b8, var_b4, var_b0) != IJL_OK)
00644ccc                              return 0xffffffe7;
00644ccc                          
0064425e                          int32_t eax_54 = ebx[0xdf0];
0064425e                          
0064426a                          if (eax_54 > ebx[0xdf5])
006444e0                              ecx_34 = ebx[0x1e];
0064426a                          else if (eax_54 > ebx[0xdf6])
006444d0                              ecx_34 = ebx[0x1e];
00644276                          else
00644276                          {
0064427c                              ecx_34 = ebx[0x1e];
00644281                              int32_t* ebp_27 = ebx[0x1377];
00644293                              int32_t edx_59 = ((((ecx_34 * var_48_2) + esi_26) * ecx_33) + ebx[0x1379]);
00644293                              
006442a6                              if ((ebp_27 == 0 || *(uint32_t*)ebp_27 == 0))
006442a6                              {
00644410                                  int32_t eax_59 = ebx[0x120d];
00644429                                  __g_memcpy(eax_59, edx_59, (var_18 << 7));
00644433                                  int32_t eax_60 = 0;
00644435                                  int32_t edx_69 = ebx[0xdf0];
00644435                                  
0064443d                                  if (edx_69 > 0)
0064443d                                  {
00644443                                      int32_t var_60_4 = eax_59;
00644443                                      
00644994                                      do
00644994                                      {
0064444d                                          int32_t edi_33 = (eax_60 << 4);
00644452                                          void* ecx_47 = (edi_33 + ebx[0xdf3]);
0064445b                                          int32_t ebp_40 = 0;
0064445d                                          int32_t esi_36 = (*(uint32_t*)((char*)ecx_47 + 4) * *(uint32_t*)((char*)ecx_47 + 8));
0064445d                                          
00644463                                          if (esi_36 > 0)
00644463                                          {
00644470                                              int32_t edi_34 = var_60_4;
00644470                                              
006444ab                                              while (true)
006444ab                                              {
006444ab                                                  *(uint32_t*)((char*)ctx + 0x110)(edi_34, ebx[((*(uint32_t*)((char*)ecx_47 + 0xc) * 0x2d) + 0x27)]);
006444b1                                                  edi_34 += 0x80;
006444b7                                                  ebp_40 += 1;
006444b7                                                  
006444ba                                                  if (ebp_40 >= esi_36)
006444ba                                                      break;
006444ba                                                  
00644486                                                  ecx_47 = (ebx[0xdf3] + edi_33);
006444ab                                              }
006444ab                                              
00644980                                              var_60_4 = edi_34;
0064498b                                              edx_69 = ebx[0xdf0];
00644463                                          }
00644463                                          
00644991                                          eax_60 += 1;
00644994                                      } while (eax_60 < edx_69);
00644994                                      
0064499e                                      edi = arg2;
0064443d                                  }
0064443d                                  
006449bd                                  var_bc = edi;
006449c8                                  var_b8 = esi_26;
006449cc                                  var_b4 = var_48_2;
006449d7                                  var_b0 = var_18;
006449df                                  var_ac = eax_59;
006449e3                                  var_a8 = ebx[0x1e];
006449e7                                  int32_t eax_95;
006449e7                                  eax_95 = var_1c;
006449ee                                  var_a4 = ebx[0x1f];
006449f2                                  var_a0 = arg4;
006449f6                                  var_9c = eax_95;
006449fa                                  sub_642250(ebx, arg1, var_bc, var_b8, var_b4, var_b0, var_ac, var_a8, var_a4, var_a0, var_9c);
006449ff                                  ecx_34 = ebx[0x1e];
006442a6                              }
006442a6                              else if (eax_54 > 0)
006442b7                              {
006442c3                                  int32_t edi_26 = 0;
006442da                                  int32_t var_28_5 = edx_59;
006442e1                                  int32_t* var_60_3 = ecx_34;
006442e5                                  int32_t ecx_40 = eax_54;
006442e7                                  int32_t edx_60 = ebx[0xdf3];
006442e7                                  
00644966                                  do
00644966                                  {
006442ef                                      int32_t eax_55 = 0;
006442f3                                      int32_t ebp_33 = (edi_26 << 4);
006442f6                                      int32_t esi_30 = *(uint32_t*)((ebp_33 + edx_60) + 8);
006442f6                                      
006442fc                                      if (esi_30 > 0)
006442fc                                      {
0064430c                                          int32_t ecx_42 = *(uint32_t*)((ebp_33 + edx_60) + 4);
0064430c                                          
00644949                                          do
00644949                                          {
00644317                                              int32_t edi_27 = 0;
00644317                                              
0064431b                                              if (ecx_42 > 0)
0064431b                                              {
0064433b                                                  int32_t* eax_56 = var_60_3;
0064433b                                                  
00644389                                                  while (true)
00644389                                                  {
00644389                                                      int32_t i_2 = 0;
006443a0                                                      int32_t ebp_39 = (((((edi_27 << 4) + *(uint32_t*)((arg3[0x1377] + (edi_26 * 4)) + 4)) + (esi_30 * (((var_48_2 << 7) * eax_56) * ecx_42))) + (eax_56 * (ecx_42 * (eax_55 << 7)))) + (ecx_42 * (esi_26 << 4)));
006443a2                                                      int32_t esi_34 = var_28_5;
006443a2                                                      
006443f1                                                      do
006443f1                                                      {
006443b7                                                          var_bc = 0x10;
006443bf                                                          __g_memcpy(ebp_39, esi_34, 0x10);
006443cc                                                          edx_60 = arg3[0xdf3];
006443d2                                                          eax_56 = arg3[0x1e];
006443dc                                                          ecx_42 = *(uint32_t*)((ebp_33 + edx_60) + 4);
006443e8                                                          ebp_39 += ((eax_56 << 4) * ecx_42);
006443ea                                                          esi_34 += 0x10;
006443ed                                                          i_2 += 1;
006443f1                                                      } while (i_2 < 8);
006443f1                                                      
006443f3                                                      var_28_5 = esi_34;
00644401                                                      edi_27 += 1;
00644401                                                      
00644404                                                      if (edi_27 >= ecx_42)
00644404                                                          break;
00644404                                                      
00644357                                                      esi_30 = *(uint32_t*)((ebp_33 + edx_60) + 8);
00644389                                                  }
00644389                                                  
00644930                                                  var_60_3 = eax_56;
00644942                                                  esi_30 = *(uint32_t*)((ebp_33 + edx_60) + 8);
0064431b                                              }
0064431b                                              
00644946                                              eax_55 += 1;
00644949                                          } while (eax_55 < esi_30);
00644949                                          
00644956                                          ebx = arg3;
0064495d                                          ecx_40 = ebx[0xdf0];
006442fc                                      }
006442fc                                      
00644963                                      edi_26 += 1;
00644966                                  } while (edi_26 < ecx_40);
00644966                                  
0064496c                                  ecx_34 = var_60_3;
00644974                                  edi = arg2;
006442b7                              }
00644276                          }
00644276                          
006444f7                          if ((ebx[7] != 0 && (var_44 == 0 || esi_26 != 0)))
006444f7                          {
00644502                              int32_t ebp_44;
00644502                              
00644502                              if (var_14 == 0)
00644502                              {
00644a7d                                  ebp_44 = var_48_2;
00644a1c                              label_644a1c:
00644a1d                                  int32_t temp1_2 = (((int64_t)(esi_26 + 1)) % ((char*)ecx_34 + var_44));
00644a21                                  edi[7] = temp1_2;
00644a21                                  
00644a24                                  if (temp1_2 == 0)
00644a24                                  {
00644a35                                      edi[8] = (ebp_44 + 1);
00644a35                                      
00644a3d                                      if ((ebp_44 + 1) == (var_14 + ebx[0x1f]))
00644a3d                                      {
00644a3f                                          edi[8] = 0;
00644a52                                          return 0;
00644a3d                                      }
00644a24                                  }
00644a24                                  else
00644a26                                      edi[8] = ebp_44;
00644a26                                  
00644a53                                  int32_t esi_42 = (esi_26 - var_44);
00644a5f                                  ebx[3] = esi_42;
00644a62                                  int32_t ebp_45 = (ebp_44 - var_14);
00644a69                                  ebx[4] = ebp_45;
00644a6c                                  ebx[1] = esi_42;
00644a6f                                  ebx[2] = ebp_45;
00644a7c                                  return 1;
00644502                              }
00644502                              
0064450e                              if (var_48_2 != 0)
0064450e                              {
00644a10                                  ebp_44 = var_48_2;
00644a10                                  goto label_644a1c;
0064450e                              }
006444f7                          }
006444f7                          
00644514                          esi_26 += 1;
00644517                      } while (esi_26 < ecx_34);
00644517                      
0064451d                      eax_45 = ebx[0x1f];
00644081                  }
00644081                  
00644529                  if (var_44 != 0)
00644529                  {
00644b2a                      var_bc = edi;
00644b2e                      var_b8 = esi_26;
00644b32                      var_b4 = var_48_2;
00644b3c                      var_b0 = var_18;
00644b40                      var_ac = ebx[0x120d];
00644b44                      var_a8 = ecx_34;
00644b4f                      var_a4 = eax_45;
00644b53                      eax_45 = var_1c;
00644b5a                      var_a0 = arg4;
00644b5e                      var_9c = eax_45;
00644b62                      sub_642250(ebx, arg1, var_bc, var_b8, var_b4, var_b0, var_ac, var_a8, var_a4, var_a0, var_9c);
00644b62                      
00644b6c                      if (ebx[7] == 0)
00644ba0                          eax_45 = ebx[0x1f];
00644b6c                      else if (esi_26 != 0)
00644b70                      {
00644b89                          int32_t ebp_48;
00644b89                          
00644b89                          if (var_14 == 0)
00644b89                          {
00644c22                              ebp_48 = var_48_2;
00644bbf                          label_644bbf:
00644bc0                              int32_t temp1_4 = (((int64_t)(esi_26 + 1)) % (var_44 + ebx[0x1e]));
00644bc4                              edi[7] = temp1_4;
00644bc7                              int32_t edx_99;
00644bc7                              
00644bc7                              if (temp1_4 == 0)
00644bc7                              {
00644bd0                                  edx_99 = (ebp_48 + 1);
00644bd3                                  edi[8] = edx_99;
00644bc7                              }
00644bc7                              else
00644bc7                              {
00644bc9                                  edx_99 = ebp_48;
00644bcb                                  edi[8] = ebp_48;
00644bc7                              }
00644bc7                              
00644be2                              if (edx_99 == (var_14 + ebx[0x1f]))
00644be2                              {
00644be4                                  edi[8] = 0;
00644bf7                                  return 0;
00644be2                              }
00644be2                              
00644bf8                              int32_t esi_47 = (esi_26 - var_44);
00644c04                              ebx[3] = esi_47;
00644c07                              int32_t ebp_49 = (ebp_48 - var_14);
00644c0e                              ebx[4] = ebp_49;
00644c11                              ebx[1] = esi_47;
00644c14                              ebx[2] = ebp_49;
00644c21                              return 1;
00644b89                          }
00644b89                          
00644b95                          if (var_48_2 != 0)
00644b95                          {
00644bb0                              ebp_48 = var_48_2;
00644bb0                              goto label_644bbf;
00644b95                          }
00644b95                          
00644b97                          eax_45 = ebx[0x1f];
00644b70                      }
00644b70                      else
00644b72                          eax_45 = ebx[0x1f];
00644529                  }
00644529                  
00644533                  edx_73 = (var_48_2 + 1);
00644536                  var_48_2 = edx_73;
0064453a              } while (edx_73 < eax_45);
0064453a              
00644540              ebp_21 = edx_73;
00644058          }
00644058          
0064454b          if (var_14 != 0)
0064454b          {
00644551              int32_t ecx_50 = edi[7];
00644554              int32_t edx_75 = ebx[0x1e];
00644559              int32_t var_24_7 = ecx_50;
00644559              
00644560              if (ecx_50 <= edx_75)
00644560              {
00644566                  int32_t esi_37 = ecx_50;
00644566                  
006445a9                  while (true)
006445a9                  {
006445a9                      int32_t var_a8_1 = edx_75;
006445ad                      edx_75 = var_1c;
006445c7                      sub_642250(ebx, arg1, arg2, esi_37, ebp_21, var_18, ebx[0x120d], var_a8_1, eax_45, arg4, edx_75);
006445c7                      
006445e0                      if ((ebx[7] != 0 && (var_44 == 0 || esi_37 != 0)))
006445e0                      {
006445eb                          int32_t* edi_41;
006445eb                          
006445eb                          if (var_14 == 0)
006445eb                          {
00644b01                              int32_t var_24_9 = esi_37;
00644b08                              edi_41 = arg2;
00644a9e                          label_644a9e:
00644a9f                              int32_t temp1_3 = (((int64_t)(esi_37 + 1)) % (var_44 + ebx[0x1e]));
00644aa3                              edi_41[7] = temp1_3;
00644aa3                              
00644aa6                              if (temp1_3 == 0)
00644aa6                              {
00644ab7                                  edi_41[8] = (ebp_21 + 1);
00644ab7                                  
00644abf                                  if ((ebp_21 + 1) == (var_14 + ebx[0x1f]))
00644abf                                  {
00644ac1                                      edi_41[8] = 0;
00644ad4                                      return 0;
00644abf                                  }
00644aa6                              }
00644aa6                              else
00644aa8                                  edi_41[8] = ebp_21;
00644aa8                              
00644adc                              int32_t edx_93 = (esi_37 - var_44);
00644ae3                              ebx[3] = edx_93;
00644ae6                              int32_t ebp_46 = (ebp_21 - var_14);
00644aed                              ebx[4] = ebp_46;
00644af0                              ebx[1] = edx_93;
00644af3                              ebx[2] = ebp_46;
00644b00                              return 1;
006445eb                          }
006445eb                          
006445f3                          if (ebp_21 != 0)
006445f3                          {
00644a83                              int32_t var_24_8 = esi_37;
00644a8a                              edi_41 = arg2;
00644a8a                              goto label_644a9e;
006445f3                          }
006445e0                      }
006445e0                      
006445f9                      esi_37 += 1;
006445fa                      edx_75 = ebx[0x1e];
006445fa                      
006445ff                      if (esi_37 > edx_75)
006445ff                          break;
006445ff                      
00644570                      eax_45 = ebx[0x1f];
006445a9                  }
00644560              }
0064454b          }
00643a97      }
00643a97      else
00643a97      {
00643a9d          int32_t* esi_8 = edi[0xd];
00643ab1          int32_t temp0_1 = (((int64_t)(eax_3 * 8)) / esi_8[1]);
00643ab7          int32_t esi_9 = esi_8[2];
00643ace          int32_t temp0_2 = (((int64_t)(ebx[0xdef] * 8)) / esi_9);
00643ad9          int32_t eax_16;
00643ad9          int32_t edx_6;
00643ad9          edx_6 = HIGHD(((int64_t)((temp0_1 + ebx[0x13]) - 1)));
00643ad9          eax_16 = LOWD(((int64_t)((temp0_1 + ebx[0x13]) - 1)));
00643aea          int32_t eax_19;
00643aea          int32_t edx_7;
00643aea          edx_7 = HIGHD(((int64_t)((temp0_2 + ebx[0x14]) - 1)));
00643aea          eax_19 = LOWD(((int64_t)((temp0_2 + ebx[0x14]) - 1)));
00643aeb          int32_t esi_11 = edi[8];
00643af0          int32_t ebp_6 = ebx[0x1f];
00643af3          int32_t var_28_1 = ebp_6;
00643af3          
00643afc          if (esi_11 < ebp_6)
00643afc          {
00643b0b              int32_t ecx_6 = (var_18 << 7);
00643b11              int32_t* ebp_7 = esi_8;
00643b1c              int32_t edx_11 = esi_9;
00643b1c              
00643b44              while (true)
00643b44              {
00643b44                  if (edx_11 > 0)
00643b44                  {
00643b56                      int32_t edi_4 = 0;
00643b63                      int32_t esi_12 = 0;
00643b65                      int32_t eax_22 = edx_11;
00643b65                      
00643b73                      while (((eax_22 * (esi_11 * 8)) + edi_4) < ebx[0x14])
00643b73                      {
00643b80                          int32_t ecx_14 = arg2[7];
00643b83                          int32_t edx_12 = ebx[0x1e];
00643b83                          
00643b88                          if (ecx_14 < edx_12)
00643b88                          {
00643b8e                              int32_t eax_23 = ebp_7[1];
00643b91                              int32_t* var_2c_2 = ebp_7;
00643b91                              
00643d57                              do
00643d57                              {
00643ba2                                  int32_t ebp_8 = 0;
00643bb5                                  int32_t edi_6 = *(uint32_t*)var_2c_2;
00643bbf                                  int32_t esi_17 = ((((edx_12 * esi_11) + ecx_14) * ecx_6) + ebx[0x1379]);
00643bbf                                  
00643bce                                  if (edi_6 > 0)
00643bce                                  {
00643bd0                                      int32_t edi_7 = ebx[0xdf3];
00643be9                                      int32_t var_28_2 = 0;
00643bf8                                      int32_t edx_13 = 0;
00643bf8                                      
00643c24                                      do
00643c24                                      {
00643c17                                          ebp_8 += 1;
00643c1d                                          esi_17 += ((*(uint32_t*)((edx_13 + edi_7) + 4) << 7) * *(uint32_t*)((edx_13 + edi_7) + 8));
00643c1f                                          edx_13 += 0x10;
00643c24                                      } while (ebp_8 < edi_6);
00643c24                                      
00643c35                                      ebx = arg3;
00643bce                                  }
00643bce                                  
00643c48                                  int16_t* ebp_12 = (((eax_23 << 7) * esi_12) + esi_17);
00643c48                                  
00643c4c                                  if (eax_23 > 0)
00643c4c                                  {
00643c67                                      int32_t esi_18 = 0;
00643c69                                      int32_t edi_8 = 0;
00643c69                                      
00643c70                                      while (true)
00643c70                                      {
00643c8b                                          if ((((eax_23 * 8) * ecx_14) + esi_18) >= arg3[0x13])
00643c8b                                          {
00644907                                              ebx = arg3;
0064490e                                              edx_12 = ebx[0x1e];
00644911                                              break;
00643c8b                                          }
00643c8b                                          
00643c96                                          if (arg2[4] == 0)
00643c96                                          {
006448e1                                              Decode_Block_Prog_AC(arg1, ebp_12, var_94, arg2[2], arg2[3], arg2[5]);
006448e6                                              ebp_12 = &ebp_12[0x40];
00643c96                                          }
00643c96                                          else
00643c96                                          {
00643cc7                                              Decode_Block_Prog_AC_SA(arg1, ebp_12, var_94, arg2[2], arg2[3], arg2[5]);
00643ccc                                              ebp_12 = &ebp_12[0x40];
00643c96                                          }
00643c96                                          
00643cd2                                          void* eax_31 = arg2[0xd];
00643cf5                                          var_b8 = (COMBINE(edx_7, eax_19) / temp0_2);
00643d06                                          var_b4 = ((ecx_14 * *(uint32_t*)((char*)eax_31 + 4)) + edi_8);
00643d19                                          var_b0 = ((esi_11 * *(uint32_t*)((char*)eax_31 + 8)) + esi_12);
00643d19                                          
00643d24                                          if (sub_6438b0(arg1, arg2, (COMBINE(edx_6, eax_16) / temp0_1), var_b8, var_b4, var_b0) != IJL_OK)
00644cdc                                              return 0xffffffe7;
00644cdc                                          
00643d2a                                          esi_18 += 8;
00643d2d                                          edi_8 += 1;
00643d2e                                          int32_t* eax_33 = arg2[0xd];
00643d31                                          var_2c_2 = eax_33;
00643d38                                          eax_23 = eax_33[1];
00643d38                                          
00643d3d                                          if (edi_8 >= eax_23)
00643d3d                                          {
00643d4a                                              ebx = arg3;
00643d51                                              edx_12 = ebx[0x1e];
00643d51                                              break;
00643d3d                                          }
00643c70                                      }
00643c4c                                  }
00643c4c                                  
00643d54                                  ecx_14 += 1;
00643d57                              } while (ecx_14 < edx_12);
00643d57                              
00643d5d                              ebp_7 = var_2c_2;
00643d6c                              eax_22 = ebp_7[2];
00643b88                          }
00643b88                          
00643d6f                          edi_4 += 8;
00643d72                          esi_12 += 1;
00643d72                          
00643d75                          if (esi_12 >= eax_22)
00643d75                              break;
00643b73                      }
00643b44                  }
00643b44                  
00643d82                  int32_t edx_33 = ebx[0xdf0];
00643d82                  
00643d9a                  if ((edx_33 <= ebx[0xdf5] && edx_33 <= ebx[0xdf6]))
00643d9a                  {
00643da0                      int32_t* eax_34 = ebx[0x1377];
00643dae                      int32_t* ecx_20;
00643dae                      int32_t ebp_13;
00643dae                      
00643dae                      if ((eax_34 == 0 || *(uint32_t*)eax_34 != 0))
00643dae                      {
00643db4                          ebp_13 = 0;
00643db6                          ecx_20 = ebx[0x1e];
00643db6                          
00643dbb                          if (ecx_20 > 0)
00643dbb                          {
006446a3                              do
006446a3                              {
00643dc6                                  int32_t edi_9 = ebx[0x120d];
00643de9                                  __g_memcpy(edi_9, ((((ecx_20 * esi_11) + ebp_13) * ecx_6) + ebx[0x1379]), (var_18 << 7), var_b8, var_b4, var_b0, var_ac, var_a8, var_a4, var_a0, var_9c);
00643df1                                  int32_t eax_36 = 0;
00643df3                                  int32_t ecx_25 = ebx[0xdf0];
00643df3                                  
00643dfb                                  if (ecx_25 > 0)
00643dfb                                  {
00643e08                                      int32_t var_34_2 = edi_9;
00643e08                                      
00644629                                      do
00644629                                      {
00643e1f                                          int32_t edi_11 = (eax_36 << 4);
00643e24                                          void* edx_30 = (edi_11 + ebx[0xdf3]);
00643e2d                                          int32_t ebp_14 = 0;
00643e2f                                          int32_t esi_20 = (*(uint32_t*)((char*)edx_30 + 4) * *(uint32_t*)((char*)edx_30 + 8));
00643e2f                                          
00643e35                                          if (esi_20 > 0)
00643e35                                          {
00643e42                                              int32_t edi_12 = var_34_2;
00643e42                                              
00643e8b                                              while (true)
00643e8b                                              {
00643e8b                                                  *(uint32_t*)((char*)ctx + 0x110)(edi_12, ebx[((*(uint32_t*)((char*)edx_30 + 0xc) * 0x2d) + 0x27)]);
00643e91                                                  edi_12 += 0x80;
00643e97                                                  ebp_14 += 1;
00643e97                                                  
00643e9a                                                  if (ebp_14 >= esi_20)
00643e9a                                                      break;
00643e9a                                                  
00643e66                                                  edx_30 = (ebx[0xdf3] + edi_11);
00643e8b                                              }
00643e8b                                              
00644612                                              var_34_2 = edi_12;
00644620                                              ecx_25 = ebx[0xdf0];
00643e35                                          }
00643e35                                          
00644626                                          eax_36 += 1;
00644629                                      } while (eax_36 < ecx_25);
00643dfb                                  }
00643dfb                                  
0064466a                                  var_b8 = ebp_13;
0064466e                                  var_b4 = esi_11;
00644672                                  var_b0 = var_18;
00644676                                  int32_t eax_74;
00644676                                  eax_74 = var_1c;
0064467d                                  var_ac = edi_9;
00644688                                  var_a8 = ebx[0x1e];
0064468c                                  var_a4 = ebx[0x1f];
00644690                                  var_a0 = arg4;
00644694                                  var_9c = eax_74;
00644698                                  sub_642250(ebx, arg1, arg2, var_b8, var_b4, var_b0, var_ac, var_a8, var_a4, var_a0, var_9c);
0064469d                                  ebp_13 += 1;
0064469e                                  ecx_20 = ebx[0x1e];
006446a3                              } while (ebp_13 < ecx_20);
006446a3                              
006446a9                              eax_34 = ebx[0x1377];
00643dbb                          }
00643dae                      }
00643dae                      else
00643dae                      {
00643eb0                          ebp_13 = 0;
00643eb2                          ecx_20 = ebx[0x1e];
00643eb2                          
00643eb7                          if (ecx_20 > 0)
00643eb7                          {
00643ec2                              int32_t* var_24_5 = eax_34;
00643ec9                              int32_t* var_34_3 = ecx_20;
00643ec9                              
00644782                              do
00644782                              {
00643ee2                                  int32_t ecx_27 = 0;
00643ee2                                  
00643efe                                  if (edx_33 > 0)
00643efe                                  {
00643f04                                      int32_t eax_39 = ebx[0xdf3];
00643f13                                      int32_t var_2c_4 = ((((var_34_3 * esi_11) + ebp_13) * ecx_6) + ebx[0x1379]);
00643f13                                      
00644764                                      do
00644764                                      {
00643f21                                          int32_t esi_23 = 0;
00643f25                                          int32_t ebp_16 = (ecx_27 << 4);
00643f28                                          int32_t ebx_3 = *(uint32_t*)((ebp_16 + eax_39) + 8);
00643f28                                          
00643f2e                                          if (ebx_3 > 0)
00643f2e                                          {
00643f34                                              int32_t edi_20 = (ecx_27 * 2);
00643f37                                              int32_t edx_34 = *(uint32_t*)((ebp_16 + eax_39) + 4);
00643f4a                                              int32_t* ebp_17 = var_24_5;
00643f4a                                              
00644743                                              do
00644743                                              {
00643f58                                                  int32_t edi_21 = 0;
00643f58                                                  
00643f5c                                                  if (edx_34 > 0)
00643f5c                                                  {
00643f66                                                      int32_t esi_24 = edi_20;
00643f6d                                                      int32_t* ecx_29 = var_34_3;
00643f6d                                                      
00643fc1                                                      while (true)
00643fc1                                                      {
00643fc1                                                          int32_t ebx_9 = (((((ebx_3 * (((esi_11 << 7) * ecx_29) * edx_34)) + *(uint32_t*)(((char*)ebp_17 + (esi_24 << 1)) + 4)) + ((ebp_13 << 4) * edx_34)) + ((edx_34 * (ecx_29 << 7)) * esi_23)) + (edi_21 << 4));
00643fc3                                                          int32_t i_3 = 0;
00643fc9                                                          int32_t esi_25 = var_2c_4;
00643fc9                                                          
0064400e                                                          do
0064400e                                                          {
00643fdf                                                              __g_memcpy(ebx_9, esi_25, 0x10, var_b8, var_b4, var_b0, var_ac, var_a8, var_a4, var_a0, var_9c);
00643fec                                                              eax_39 = arg3[0xdf3];
00643ff2                                                              ecx_29 = arg3[0x1e];
00643ff9                                                              edx_34 = *(uint32_t*)((ebp_16 + eax_39) + 4);
00644005                                                              ebx_9 += ((ecx_29 << 4) * edx_34);
00644007                                                              esi_25 += 0x10;
0064400a                                                              i_3 += 1;
0064400e                                                          } while (i_3 < 8);
0064400e                                                          
00644010                                                          var_2c_4 = esi_25;
0064401b                                                          esi_24 = edi_20;
00644022                                                          edi_21 += 1;
00644022                                                          
00644025                                                          if (edi_21 >= edx_34)
00644025                                                              break;
00644025                                                          
00643f87                                                          ebp_17 = arg3[0x1377];
00643f91                                                          ebx_3 = *(uint32_t*)((ebp_16 + eax_39) + 8);
00643fc1                                                      }
00643fc1                                                      
00644720                                                      var_34_3 = ecx_29;
00644732                                                      ebp_17 = arg3[0x1377];
0064473c                                                      ebx_3 = *(uint32_t*)((ebp_16 + eax_39) + 8);
00643f5c                                                  }
00643f5c                                                  
00644740                                                  esi_23 += 1;
00644743                                              } while (esi_23 < ebx_3);
00644743                                              
00644749                                              var_24_5 = ebp_17;
0064475b                                              edx_33 = arg3[0xdf0];
00643f2e                                          }
00643f2e                                          
00644761                                          ecx_27 += 1;
00644764                                      } while (ecx_27 < edx_33);
00644764                                      
00644771                                      ebx = arg3;
00643efe                                  }
00643efe                                  
00644778                                  ebp_13 += 1;
00644782                              } while (ebp_13 < var_34_3);
00644782                              
00644788                              eax_34 = var_24_5;
0064478f                              ecx_20 = var_34_3;
00643eb7                          }
00643dae                      }
00643dae                      
006446b7                      if ((eax_34 == 0 || *(uint32_t*)eax_34 != 0))
006446b7                      {
006446e6                          var_b8 = ebp_13;
006446f1                          var_b4 = esi_11;
006446f5                          var_b0 = var_18;
006446f9                          var_ac = ebx[0x120d];
006446fd                          var_a8 = ecx_20;
00644701                          var_a4 = ebx[0x1f];
00644705                          ecx_20 = var_1c;
0064470c                          var_a0 = arg4;
00644710                          var_9c = ecx_20;
00644714                          sub_642250(ebx, arg1, arg2, var_b8, var_b4, var_b0, var_ac, var_a8, var_a4, var_a0, var_9c);
006446b7                      }
00643d9a                  }
00643d9a                  
00644035                  if (ebx[7] != 0)
00644035                  {
00644871                      arg2[8] = (esi_11 + 1);
00644874                      arg2[7] = 0;
00644874                      
00644880                      if ((esi_11 + 1) == (var_14 + ebx[0x1f]))
00644880                      {
00644882                          arg2[8] = 0;
00644895                          return 0;
00644880                      }
00644880                      
00644899                      int32_t edx_83 = (ebx[0x1e] - 1);
0064489f                      ebx[3] = edx_83;
006448a2                      ebx[4] = esi_11;
006448a5                      ebx[1] = edx_83;
006448a8                      ebx[2] = esi_11;
006448b5                      return 1;
00644035                  }
00644035                  
0064403b                  esi_11 += 1;
0064403c                  int32_t eax_44 = ebx[0x1f];
0064403c                  
00644041                  if (esi_11 >= eax_44)
00644041                  {
006447b0                      var_28_1 = eax_44;
006447b7                      break;
00644041                  }
00644041                  
00643b3a                  ebp_7 = arg2[0xd];
00643b3d                  edx_11 = ebp_7[2];
00643b44              }
00643afc          }
00643afc          
006447be          int32_t* eax_80 = ebx[0x1377];
006447be          
006447cc          if ((eax_80 == 0 || *(uint32_t*)eax_80 != 0))
006447cc          {
006447d2              int32_t ebp_42 = 0;
006447d4              int32_t edx_79 = ebx[0x1e];
006447d4              
006447dc              if ((edx_79 + 1) > 0)
006447dc              {
006447e2                  int32_t eax_83 = var_28_1;
006447e2                  
00644834                  while (true)
00644834                  {
00644834                      int32_t var_a4_2 = eax_83;
00644838                      eax_83 = var_1c;
00644847                      sub_642250(ebx, arg1, arg2, ebp_42, esi_11, var_18, ebx[0x120d], edx_79, var_a4_2, arg4, eax_83);
0064484c                      ebp_42 += 1;
0064484d                      edx_79 = ebx[0x1e];
0064484d                      
00644855                      if (ebp_42 >= (edx_79 + 1))
00644855                          break;
00644855                      
006447f0                      eax_83 = ebx[0x1f];
00644834                  }
006447dc              }
006447cc          }
00643a97      }
00644611      return 0;
00643930  }

00643e52                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
00643ea1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
00643f76                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0064404c                                      8d 74 26 00                                                              .t&.
006441b4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00644341     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
0064440f                                               90                                                                 .
0064447d                                                                                         8d 76 00                               .v.
006444c1     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
006444d5                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
0064456a                                8d b6 00 00 00 00                                                            ......
0064471e                                                                                            8b f6                                ..
006447a2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
006447eb                                   90 8d 74 26 00                                                             ..t&.
0064485c                                                                                      8d 74 26 00                              .t&.
006448f1                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00644916                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
0064492c                                      8d 74 26 00                                                              .t&.
00644a07                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
00644b7a                                                                                8d b6 00 00 00 00                            ......
00644b9f                                                                                               90                                 .
00644ba8                          90 8d b4 26 00 00 00 00                                                          ...&....
00644cdd                                                                                         8d 76 00                               .v.

00644ce0  int32_t sub_644ce0(struct _STATE* arg1, int32_t* arg2, int32_t* arg3, int32_t arg4)

00644ce0  {
00644cf1      int32_t* ebx = arg2;
00644cf8      int32_t* esi = arg3;
00644cff      void* ctx = arg1->ctx;
00644d0b      int32_t edx = 0;
00644d0d      int32_t i_14 = 0;
00644d14      int32_t ecx_1 = *(uint32_t*)ebx;
00644d18      struct _HUFFMAN_TABLE* var_ac;
00644d18      void var_9c;
00644d18      int32_t var_8c;
00644d18      
00644d18      if (ecx_1 > 0)
00644d18      {
00644d1f          int32_t eax_1 = 0;
00644d1f          
00644d56          do
00644d56          {
00644d2a              if (esi[0xdf8] == 0)
00644d2a              {
0064600e                  ebx[(edx + 9)] = 0;
00646016                  ecx_1 = *(uint32_t*)ebx;
00644d2a              }
00644d2a              
00644d30              int32_t ebp_2 = ebx[0xd];
00644d37              &var_ac[edx] = *(uint32_t*)((eax_1 + ebp_2) + 0x10);
00644d3f              *(uint32_t*)(&var_9c + (edx << 2)) = *(uint32_t*)((eax_1 + ebp_2) + 0xc);
00644d47              int32_t edi_4 = (*(uint32_t*)((eax_1 + ebp_2) + 4) * *(uint32_t*)((eax_1 + ebp_2) + 8));
00644d4c              eax_1 += 0x18;
00644d4f              &var_8c[edx] = edi_4;
00644d53              edx += 1;
00644d56          } while (edx < ecx_1);
00644d18      }
00644d18      
00644d5b      if (ecx_1 == 1)
00644d5d          var_8c = 1;
00644d5d      
00644d65      int32_t eax_2 = esi[0xdee];
00644d75      char var_3c;
00644d75      int32_t var_34;
00644d75      int32_t edi_5;
00644d75      int32_t eax_3;
00644d75      
00644d75      if (eax_2 == 1)
00644d75      {
00645fe4          eax_3 = esi[0xdef];
00645fed          var_34 = eax_3;
00645fed          
00645ff4          if (eax_3 != 1)
00645ff4              goto label_644d88;
00645ff4          
00645ffc          edi_5 = esi[0xdf0];
00646002          var_3c = 0;
00644d75      }
00644d75      else
00644d75      {
00644d81          var_34 = esi[0xdef];
00644d88      label_644d88:
00644d88          eax_3 = 1;
00644d8a          int32_t ecx_2 = 0;
00644d8c          edi_5 = esi[0xdf0];
00644d92          var_3c = 1;
00644d92          
00644d9b          if (edi_5 > 0)
00644d9b          {
00644d9f              int32_t edx_1 = 0;
00644d9f              
00644da4              while (true)
00644da4              {
00644da4                  if (eax_3 == 0)
00644da4                  {
00645fd1                      var_3c = eax_3;
00645fd8                      ebx = arg2;
00645fdf                      break;
00644da4                  }
00644da4                  
00644daa                  int32_t ebp_3 = esi[0xdf3];
00644db0                  int32_t ebx_1 = *(uint32_t*)((ebp_3 + edx_1) + 4);
00644db0                  
00644db8                  if (ebx_1 != *(uint32_t*)((ebp_3 + edx_1) + 8))
00644dba                      eax_3 = 0;
00644dba                  
00644dc4                  if ((ebx_1 != 1 && ebx_1 != 2))
00644dc6                      eax_3 = 0;
00644dc6                  
00644dc8                  edx_1 += 0x10;
00644dcb                  ecx_2 += 1;
00644dcb                  
00644dce                  if (ecx_2 >= edi_5)
00644dce                  {
00644dd0                      var_3c = eax_3;
00644dd7                      ebx = arg2;
00644dd7                      break;
00644dce                  }
00644da4              }
00644d9b          }
00644d75      }
00644dec      int32_t temp0 = (COMBINE(0, 8) / arg4);
00644dff      int32_t ecx_5 = (eax_2 * temp0);
00644e0a      int32_t i_6 = (((int64_t)esi[1]) / ecx_5);
00644e1b      int32_t var_44 = (((int64_t)((esi[3] + ecx_5) - 1)) / ecx_5);
00644e2c      int32_t ecx_7 = (var_34 * temp0);
00644e37      int32_t var_20 = (((int64_t)esi[2]) / ecx_7);
00644e48      int32_t edx_7 = esi[0x137a];
00644e51      int32_t var_1c = (((int64_t)((esi[4] + ecx_7) - 1)) / ecx_7);
00645fba      int32_t var_18;
00645fba      
00645fba      if ((edx_7 == 1 && eax_2 == 2))
00645fc5          var_18 = 1;
00645fba      else
00644e60          var_18 = 0;
00644e60      
00645f99      int32_t var_48;
00645f99      
00645f99      if ((edx_7 == 1 && var_34 == 2))
00645fa4          var_48 = 1;
00645f99      else
00644e72          var_48 = 0;
00644e72      
00644e82      if (i_6 != 0)
00644e8b          i_6 -= var_18;
00644e8b      
00644e9b      if (var_20 != 0)
00644ea4          var_20 -= var_48;
00644ea4      
00644eab      int32_t* ecx_8 = esi[0x1e];
00644eab      
00644eb7      if (var_44 < ecx_8)
00644ec0          var_44 += var_18;
00644ec0      
00644ec7      int32_t eax_24 = esi[0x1f];
00644ed3      int32_t var_60 = eax_24;
00644ed3      
00644ed7      if (var_1c < eax_24)
00644ee0          var_1c += var_48;
00644ee0      
00644ee7      int32_t ebp_6 = 0;
00644ee7      
00644eeb      if (edi_5 > 0)
00644eeb      {
00644eed          int32_t edx_9 = esi[0xdf3];
00644ef5          int32_t eax_26 = 0;
00644eff          int32_t i_15 = i_14;
00644eff          
00644f21          do
00644f21          {
00644f14              ebp_6 += 1;
00644f1a              i_15 += (*(uint32_t*)((eax_26 + edx_9) + 4) * *(uint32_t*)((eax_26 + edx_9) + 8));
00644f1c              eax_26 += 0x10;
00644f21          } while (ebp_6 < edi_5);
00644f21          
00644f23          i_14 = i_15;
00644f31          esi = arg3;
00644f38          ebx = arg2;
00644eeb      }
00644eeb      
00644f4f      int32_t i_5;
00644f4f      int32_t i_10;
00644f4f      int32_t i_13;
00644f4f      int32_t var_c4;
00644f4f      int32_t var_c0;
00644f4f      int32_t var_bc;
00644f4f      int32_t var_b8;
00644f4f      char var_b4;
00644f4f      
00644f4f      if ((ebx[2] == 0 || ebx[3] == 0))
00644f4f      {
00645560          int32_t i_12 = ebx[8];
00645560          
00645569          if (i_12 < var_60)
00645569          {
00645578              int32_t edx_56 = (i_14 << 7);
00645582              int32_t eax_98 = var_60;
00645582              
00645a91              do
00645a91              {
0064558a                  int32_t i_9 = ebx[7];
0064558a                  
0064558f                  if (i_9 < ecx_8)
0064558f                  {
006455a4                      while (true)
006455a4                      {
006455a4                          int32_t eax_101 = 0;
006455b0                          int32_t edx_58 = *(uint32_t*)ebx[0xd];
006455b7                          int16_t* ebp_34 = ((((ecx_8 * i_12) + i_9) * edx_56) + esi[0x1379]);
006455b7                          
006455c6                          if (edx_58 > 0)
006455c6                          {
006455c8                              int32_t edx_59 = esi[0xdf3];
006455e1                              int32_t var_34_4 = 0;
006455f6                              int32_t ecx_30 = 0;
006455f6                              
00645614                              do
00645614                              {
00645607                                  eax_101 += 1;
0064560d                                  ebp_34 += ((*(uint32_t*)((ecx_30 + edx_59) + 4) << 7) * *(uint32_t*)((ecx_30 + edx_59) + 8));
0064560f                                  ecx_30 += 0x10;
00645614                              } while (eax_101 < edx_58);
00645614                              
00645624                              esi = arg3;
0064562b                              ebx = arg2;
006455c6                          }
006455c6                          
00645637                          int32_t* var_d4;
00645637                          
00645637                          if (ebx[4] != 0)
00645637                          {
006456e0                              int32_t eax_103 = 0;
006456e2                              int32_t edx_68 = *(uint32_t*)ebx;
006456e2                              
006456e6                              if (edx_68 > 0)
006456e6                              {
0064573c                                  do
0064573c                                  {
006456f7                                      if (&var_8c[eax_103] > 0)
006456f7                                      {
006456f9                                          int32_t var_30_6 = eax_103;
00645707                                          int32_t i = 0;
00645707                                          
00645735                                          do
00645735                                          {
0064571e                                              Decode_Block_Prog_DC_SA(arg1, ebp_34, ebx[5]);
00645723                                              ebp_34 = &ebp_34[0x40];
00645729                                              i += 1;
0064572a                                              eax_103 = var_30_6;
00645735                                          } while (i < &var_8c[eax_103]);
00645735                                          
00645737                                          edx_68 = *(uint32_t*)ebx;
006456f7                                      }
006456f7                                      
00645739                                      eax_103 += 1;
0064573c                                  } while (eax_103 < edx_68);
0064573c                                  
00645745                                  esi = arg3;
0064574c                                  ecx_8 = esi[0x1e];
006456e6                              }
00645637                          }
00645637                          else
00645637                          {
0064563f                              int32_t edx_63 = *(uint32_t*)ebx;
0064563f                              
00645643                              if (edx_63 > 0)
00645643                              {
00645650                                  int32_t esi_13 = 0;
00645650                                  
006456bf                                  do
006456bf                                  {
00645652                                      int32_t i_1 = 0;
00645652                                      
0064565a                                      if (&var_8c[esi_13] > 0)
0064565a                                      {
006456b8                                          do
006456b8                                          {
0064566b                                              __g_memzero(ebp_34, 0x80, var_d4, i_5, i_10, i_13, var_c4, var_c0, var_bc, var_b8, var_b4);
0064567c                                              int16_t var_7c = ((int16_t)ebx[(esi_13 + 9)]);
0064568c                                              var_d4 = ebp_34;
00645694                                              i_5 = &var_7c;
0064569b                                              i_10 = ebx[5];
0064569f                                              Decode_Block_Prog_DC(arg1, *(uint32_t*)(&var_9c + (esi_13 << 2)), var_d4, i_5, i_10);
006456a9                                              ebp_34 = &ebp_34[0x40];
006456af                                              i_1 += 1;
006456b0                                              ebx[(esi_13 + 9)] = ((int32_t)var_7c);
006456b8                                          } while (i_1 < &var_8c[esi_13]);
006456b8                                          
006456ba                                          edx_63 = *(uint32_t*)ebx;
0064565a                                      }
0064565a                                      
006456bc                                      esi_13 += 1;
006456bf                                  } while (esi_13 < edx_63);
006456bf                                  
006456c8                                  esi = arg3;
006456cf                                  ecx_8 = esi[0x1e];
00645643                              }
00645637                          }
00645637                          
00645760                          var_d4 = ecx_8;
00645768                          i_5 = esi[0x1f];
0064576c                          i_10 = i_9;
00645770                          i_13 = i_12;
00645770                          
0064577b                          if (sub_6438b0(arg1, ebx, var_d4, i_5, i_10, i_13) != IJL_OK)
0064603f                              return 0xffffffe7;
0064603f                          
0064578a                          if (i_9 < i_6)
00645a70                              ecx_8 = esi[0x1e];
0064578a                          else if (i_9 >= var_44)
00645a60                              ecx_8 = esi[0x1e];
00645799                          else if (i_12 < var_20)
00645a50                              ecx_8 = esi[0x1e];
006457ac                          else if (i_12 >= var_1c)
00645a40                              ecx_8 = esi[0x1e];
006457bb                          else
006457bb                          {
006457c1                              int32_t edx_71 = esi[0xdf0];
006457c1                              
006457cd                              if (edx_71 > esi[0xdf5])
00645a30                                  ecx_8 = esi[0x1e];
006457cd                              else if (edx_71 > esi[0xdf6])
00645a20                                  ecx_8 = esi[0x1e];
006457d9                              else
006457d9                              {
006457df                                  ecx_8 = esi[0x1e];
006457f6                                  int32_t var_68_3 = ((((ecx_8 * i_12) + i_9) * edx_56) + esi[0x1379]);
006457fa                                  int32_t* eax_116 = esi[0x1377];
006457fa                                  
0064580c                                  if ((eax_116 == 0 || *(uint32_t*)eax_116 != 0))
0064580c                                  {
00645950                                      int32_t ebp_42 = esi[0x120d];
00645969                                      __g_memcpy(ebp_42, var_68_3, (i_14 << 7));
00645975                                      int32_t eax_127 = 0;
00645977                                      int32_t ecx_39 = esi[0xdf0];
00645977                                      
0064597f                                      if (ecx_39 > 0)
0064597f                                      {
00645985                                          int32_t var_34_6 = esi[0x120d];
00645985                                          
00645eb7                                          do
00645eb7                                          {
0064599c                                              int32_t edi_33 = (eax_127 << 4);
006459a1                                              void* edx_79 = (edi_33 + esi[0xdf3]);
006459aa                                              int32_t ebx_23 = 0;
006459ac                                              int32_t ebp_44 = (*(uint32_t*)((char*)edx_79 + 4) * *(uint32_t*)((char*)edx_79 + 8));
006459ac                                              
006459b2                                              if (ebp_44 > 0)
006459b2                                              {
006459bf                                                  int32_t edi_34 = var_34_6;
006459bf                                                  
006459fb                                                  while (true)
006459fb                                                  {
006459fb                                                      *(uint32_t*)((char*)ctx + 0x110)(edi_34, esi[((*(uint32_t*)((char*)edx_79 + 0xc) * 0x2d) + 0x27)]);
00645a01                                                      edi_34 += 0x80;
00645a07                                                      ebx_23 += 1;
00645a07                                                      
00645a0a                                                      if (ebx_23 >= ebp_44)
00645a0a                                                          break;
00645a0a                                                      
006459d6                                                      edx_79 = (esi[0xdf3] + edi_33);
006459fb                                                  }
006459fb                                                  
00645ea0                                                  var_34_6 = edi_34;
00645eae                                                  ecx_39 = esi[0xdf0];
006459b2                                              }
006459b2                                              
00645eb4                                              eax_127 += 1;
00645eb7                                          } while (eax_127 < ecx_39);
00645eb7                                          
00645ecb                                          ebx = arg2;
0064597f                                      }
0064597f                                      
00645eea                                      var_d4 = ebx;
00645eee                                      i_5 = i_9;
00645ef2                                      i_10 = i_12;
00645efd                                      i_13 = i_14;
00645f01                                      int32_t eax_161;
00645f01                                      eax_161 = var_3c;
00645f08                                      var_c4 = ebp_42;
00645f13                                      var_c0 = esi[0x1e];
00645f17                                      var_bc = esi[0x1f];
00645f1b                                      var_b8 = arg4;
00645f1f                                      var_b4 = eax_161;
00645f23                                      sub_642250(esi, arg1, var_d4, i_5, i_10, i_13, var_c4, var_c0, var_bc, var_b8, var_b4);
00645f28                                      ecx_8 = esi[0x1e];
0064580c                                  }
0064580c                                  else
0064580c                                  {
00645812                                      int32_t ebp_35 = 0;
00645812                                      
00645816                                      if (edx_71 > 0)
00645816                                      {
0064581c                                          int32_t eax_118 = esi[0xdf3];
00645822                                          int32_t* var_50_4 = ecx_8;
00645822                                          
00645e70                                          do
00645e70                                          {
00645830                                              int32_t ecx_35 = 0;
00645834                                              int32_t edi_27 = (ebp_35 << 4);
00645837                                              int32_t ebx_18 = *(uint32_t*)((edi_27 + eax_118) + 8);
00645837                                              
0064583d                                              if (ebx_18 > 0)
0064583d                                              {
00645843                                                  int32_t edx_72 = (ebp_35 * 2);
00645855                                                  int32_t edx_73 = *(uint32_t*)((edi_27 + eax_118) + 4);
00645855                                                  
00645e53                                                  do
00645e53                                                  {
0064586a                                                      int32_t esi_16 = 0;
0064586a                                                      
0064586e                                                      if (edx_73 > 0)
0064586e                                                      {
0064588b                                                          int32_t edi_28 = edx_72;
00645892                                                          int32_t* ecx_36 = var_50_4;
00645892                                                          
006458e2                                                          while (true)
006458e2                                                          {
006458e4                                                              int32_t ebp_41 = (((((esi_16 << 4) + *(uint32_t*)((arg3[0x1377] + (edi_28 << 1)) + 4)) + (ebx_18 * (((i_12 << 7) * ecx_36) * edx_73))) + (ecx_36 * (edx_73 * (ecx_35 << 7)))) + (edx_73 * (i_9 << 4)));
006458e6                                                              int32_t i_2 = 0;
006458ec                                                              int32_t esi_17 = var_68_3;
006458ec                                                              
0064592e                                                              do
0064592e                                                              {
006458f7                                                                  var_d4 = 0x10;
006458ff                                                                  __g_memcpy(ebp_41, esi_17, 0x10);
0064590c                                                                  eax_118 = arg3[0xdf3];
00645912                                                                  ecx_36 = arg3[0x1e];
00645919                                                                  edx_73 = *(uint32_t*)((edi_27 + eax_118) + 4);
00645925                                                                  ebp_41 += ((ecx_36 << 4) * edx_73);
00645927                                                                  esi_17 += 0x10;
0064592a                                                                  i_2 += 1;
0064592e                                                              } while (i_2 < 8);
0064592e                                                              
00645930                                                              var_68_3 = esi_17;
00645938                                                              edi_28 = edx_72;
0064593f                                                              esi_16 += 1;
0064593f                                                              
00645942                                                              if (esi_16 >= edx_73)
00645942                                                                  break;
00645942                                                              
006458a4                                                              ebx_18 = *(uint32_t*)((edi_27 + eax_118) + 8);
006458e2                                                          }
006458e2                                                          
00645e3a                                                          var_50_4 = ecx_36;
00645e4c                                                          ebx_18 = *(uint32_t*)((edi_27 + eax_118) + 8);
0064586e                                                      }
0064586e                                                      
00645e50                                                      ecx_35 += 1;
00645e53                                                  } while (ecx_35 < ebx_18);
00645e53                                                  
00645e67                                                  edx_71 = arg3[0xdf0];
0064583d                                              }
0064583d                                              
00645e6d                                              ebp_35 += 1;
00645e70                                          } while (ebp_35 < edx_71);
00645e70                                          
00645e76                                          ecx_8 = var_50_4;
00645e84                                          esi = arg3;
00645e8b                                          ebx = arg2;
00645816                                      }
0064580c                                  }
006457d9                              }
006457bb                          }
006457bb                          
00645a78                          if (esi[7] != 0)
00645a78                          {
00645f38                              int32_t temp1_2 = (((int64_t)(i_9 + 1)) % ecx_8);
00645f3c                              ebx[7] = temp1_2;
00645f3c                              
00645f3f                              if (temp1_2 == 0)
00645f3f                              {
00645f49                                  ebx[8] = (i_12 + 1);
00645f49                                  
00645f4f                                  if ((i_12 + 1) == esi[0x1f])
00645f4f                                  {
00645f51                                      ebx[8] = 0;
00645f64                                      return 0;
00645f4f                                  }
00645f3f                              }
00645f3f                              else
00645f41                                  ebx[8] = i_12;
00645f41                              
00645f65                              int32_t edi_38 = (i_9 - var_18);
00645f71                              esi[3] = edi_38;
00645f74                              int32_t ebp_48 = (i_12 - var_48);
00645f7b                              esi[4] = ebp_48;
00645f7e                              esi[1] = edi_38;
00645f81                              esi[2] = ebp_48;
00645f8e                              return 1;
00645a78                          }
00645a78                          
00645a7e                          i_9 += 1;
00645a7e                          
00645a81                          if (i_9 >= ecx_8)
00645a81                          {
00645a8b                              eax_98 = esi[0x1f];
00645a8b                              break;
00645a81                          }
006455a4                      }
0064558f                  }
0064558f                  
00645a8e                  i_12 += 1;
00645a91              } while (i_12 < eax_98);
00645a91              
00645a97              edi_5 = esi[0xdf0];
00645569          }
00644f4f      }
00644f4f      else
00644f4f      {
00644f55          void* ebp_7 = ebx[0xd];
00644f69          int32_t temp0_5 = (((int64_t)(eax_2 * 8)) / *(uint32_t*)((char*)ebp_7 + 4));
00644f83          int32_t temp0_6 = (((int64_t)(var_34 * 8)) / *(uint32_t*)((char*)ebp_7 + 8));
00644f9a          int32_t eax_42;
00644f9a          int32_t edx_12;
00644f9a          edx_12 = HIGHD(((int64_t)((temp0_5 + esi[0x13]) - 1)));
00644f9a          eax_42 = LOWD(((int64_t)((temp0_5 + esi[0x13]) - 1)));
00644fae          int32_t eax_45;
00644fae          int32_t edx_13;
00644fae          edx_13 = HIGHD(((int64_t)esi[0x14]));
00644fae          eax_45 = LOWD(((int64_t)esi[0x14]));
00644fbe          int32_t i_11 = ebx[8];
00644fbe          
00644fc3          if (i_11 < var_60)
00644fc3          {
00644fd2              int32_t edx_17 = (i_14 << 7);
00644fd2              
00644ffb              while (true)
00644ffb              {
00644ffb                  if (edi_5 >= esi[0xdf6])
00644ffb                  {
0064500a                      int32_t* ecx_16 = arg2[0xd];
0064500d                      int32_t edx_19 = ecx_16[2];
0064500d                      
00645012                      if (edx_19 > 0)
00645012                      {
00645025                          int32_t ebx_2 = 0;
0064502b                          int32_t edi_9 = 0;
0064502b                          
00645040                          while (true)
00645040                          {
00645040                              if (((edx_19 * (i_11 * 8)) + ebx_2) >= esi[0x14])
00645040                              {
00645b37                                  edi_5 = esi[0xdf0];
00645b3d                                  break;
00645040                              }
00645040                              
0064504d                              int32_t eax_51 = arg2[7];
00645050                              int32_t ebp_15 = esi[0x1e];
00645050                              
00645055                              if (eax_51 < ebp_15)
00645055                              {
0064505b                                  int32_t edx_20 = ecx_16[1];
0064505e                                  int32_t* var_74_1 = ecx_16;
0064505e                                  
006451fd                                  do
006451fd                                  {
0064506c                                      int32_t ecx_17 = 0;
0064507c                                      int32_t ebx_4 = *(uint32_t*)var_74_1;
00645086                                      int32_t edi_14 = ((((ebp_15 * i_11) + eax_51) * edx_17) + esi[0x1379]);
00645086                                      
00645095                                      if (ebx_4 > 0)
00645095                                      {
00645097                                          int32_t ebx_5 = esi[0xdf3];
006450bb                                          int32_t edx_21 = 0;
006450bb                                          
006450e5                                          do
006450e5                                          {
006450d8                                              ecx_17 += 1;
006450de                                              edi_14 += ((*(uint32_t*)((edx_21 + ebx_5) + 4) << 7) * *(uint32_t*)((edx_21 + ebx_5) + 8));
006450e0                                              edx_21 += 0x10;
006450e5                                          } while (ecx_17 < ebx_4);
006450e5                                          
006450f3                                          esi = arg3;
00645095                                      }
00645095                                      
00645104                                      int16_t* ebx_10 = (((edx_20 << 7) * edi_9) + edi_14);
00645106                                      int32_t edi_15 = 0;
00645106                                      
0064510a                                      if (edx_20 > 0)
0064510a                                      {
00645115                                          int32_t ebp_17 = 0;
00645115                                          
00645122                                          while (true)
00645122                                          {
0064513a                                              if ((((edx_20 * 8) * eax_51) + ebp_17) >= arg3[0x13])
0064513a                                              {
00645b14                                                  esi = arg3;
00645b1b                                                  ebp_15 = esi[0x1e];
00645b1e                                                  break;
0064513a                                              }
0064513a                                              
00645145                                              if (arg2[4] == 0)
00645145                                              {
00645af5                                                  Decode_Block_Prog_AC(arg1, ebx_10, var_ac, arg2[2], arg2[3], arg2[5]);
00645afa                                                  ebx_10 = &ebx_10[0x40];
00645145                                              }
00645145                                              else
00645145                                              {
00645176                                                  Decode_Block_Prog_AC_SA(arg1, ebx_10, var_ac, arg2[2], arg2[3], arg2[5]);
0064517b                                                  ebx_10 = &ebx_10[0x40];
00645145                                              }
00645145                                              
00645181                                              void* eax_64 = arg2[0xd];
006451a4                                              i_5 = (((int64_t)((temp0_6 + ((eax_45 ^ edx_13) - edx_13)) - 1)) / temp0_6);
006451b2                                              i_10 = ((eax_51 * *(uint32_t*)((char*)eax_64 + 4)) + edi_15);
006451c5                                              i_13 = ((i_11 * *(uint32_t*)((char*)eax_64 + 8)) + edi_9);
006451c5                                              
006451d0                                              if (sub_6438b0(arg1, arg2, (COMBINE(edx_12, eax_42) / temp0_5), i_5, i_10, i_13) != IJL_OK)
0064602f                                                  return 0xffffffe7;
0064602f                                              
006451d6                                              ebp_17 += 8;
006451d9                                              edi_15 += 1;
006451da                                              int32_t* eax_66 = arg2[0xd];
006451dd                                              var_74_1 = eax_66;
006451e1                                              edx_20 = eax_66[1];
006451e1                                              
006451e6                                              if (edi_15 >= edx_20)
006451e6                                              {
006451f0                                                  esi = arg3;
006451f7                                                  ebp_15 = esi[0x1e];
006451f7                                                  break;
006451e6                                              }
00645122                                          }
0064510a                                      }
0064510a                                      
006451fa                                      eax_51 += 1;
006451fd                                  } while (eax_51 < ebp_15);
006451fd                                  
00645203                                  ecx_16 = var_74_1;
0064520f                                  edx_19 = ecx_16[2];
00645055                              }
00645055                              
00645212                              ebx_2 += 8;
00645215                              edi_9 += 1;
00645215                              
00645218                              if (edi_9 >= edx_19)
00645218                              {
00645225                                  edi_5 = esi[0xdf0];
00645225                                  break;
00645218                              }
00645040                          }
00645012                      }
00644ffb                  }
00644ffb                  
0064525b                  if ((edi_5 <= esi[0xdf5] && (edi_5 <= esi[0xdf6] && (i_11 >= var_20 && i_11 < var_1c))))
0064525b                  {
00645261                      int32_t* eax_69 = esi[0x1377];
00645261                      
0064526f                      if ((eax_69 == 0 || *(uint32_t*)eax_69 != 0))
0064526f                      {
0064527f                          int32_t eax_73 = (arg2[7] - i_6);
0064527f                          
00645288                          if (eax_73 <= 0)
00645c70                              eax_73 = 0;
00645c70                          
006452a4                          int32_t i_3 = i_6;
006452d1                          arg1->DIB_ptr = ((((((i_11 - var_20) * esi[0xdef]) * esi[0xf]) + (eax_73 * (esi[0xc] * esi[0xdee]))) * temp0) + esi[8]);
006452d1                          
006452d6                          for (; i_3 < var_44; i_3 += 1)
006452d6                          {
006452de                              int32_t edi_16 = esi[0x120d];
0064530a                              __g_memcpy(edi_16, ((((i_11 * esi[0x1e]) + i_3) * edx_17) + esi[0x1379]), (i_14 << 7), i_5, i_10, i_13, var_c4, var_c0, var_bc, var_b8, var_b4);
00645312                              int32_t eax_81 = 0;
00645314                              int32_t ecx_22 = esi[0xdf0];
00645314                              
0064531c                              if (ecx_22 > 0)
0064531c                              {
00645322                                  int32_t var_30_3 = edi_16;
00645337                                  int32_t edi_17 = ecx_22;
00645337                                  
00645b64                                  do
00645b64                                  {
00645342                                      int32_t ecx_24 = (eax_81 << 4);
00645347                                      void* edx_41 = (ecx_24 + esi[0xdf3]);
00645350                                      int32_t ebx_13 = 0;
00645352                                      int32_t ebp_19 = (*(uint32_t*)((char*)edx_41 + 4) * *(uint32_t*)((char*)edx_41 + 8));
00645352                                      
00645358                                      if (ebp_19 > 0)
00645358                                      {
00645362                                          int32_t edi_18 = var_30_3;
00645362                                          
00645398                                          while (true)
00645398                                          {
00645398                                              *(uint32_t*)((char*)ctx + 0x110)(edi_18, esi[((*(uint32_t*)((char*)edx_41 + 0xc) * 0x2d) + 0x27)]);
0064539e                                              edi_18 += 0x80;
006453a4                                              ebx_13 += 1;
006453a4                                              
006453a7                                              if (ebx_13 >= ebp_19)
006453a7                                                  break;
006453a7                                              
00645376                                              edx_41 = (esi[0xdf3] + ecx_24);
00645398                                          }
00645398                                          
00645b50                                          var_30_3 = edi_18;
00645b5b                                          edi_17 = esi[0xdf0];
00645358                                      }
00645358                                      
00645b61                                      eax_81 += 1;
00645b64                                  } while (eax_81 < edi_17);
0064531c                              }
0064531c                              
00645ba2                              i_5 = i_3;
00645ba6                              i_10 = i_11;
00645baa                              i_13 = i_14;
00645bae                              var_c4 = edi_16;
00645bb5                              var_c0 = esi[0x1e];
00645bb9                              var_bc = esi[0x1f];
00645bc4                              var_b8 = arg4;
00645bc8                              int32_t eax_138;
00645bc8                              eax_138 = var_3c;
00645bcf                              var_b4 = eax_138;
00645bd3                              sub_642250(esi, arg1, arg2, i_5, i_10, i_13, var_c4, var_c0, var_bc, var_b8, var_b4);
006452d6                          }
006452d6                          
00645c00                          if ((var_18 != 0 && i_3 == var_44))
00645c00                          {
00645c2f                              i_5 = i_3;
00645c36                              i_10 = i_11;
00645c3a                              i_13 = i_14;
00645c3e                              var_c4 = esi[0x120d];
00645c42                              var_c0 = esi[0x1e];
00645c46                              var_bc = esi[0x1f];
00645c51                              var_b8 = arg4;
00645c55                              int32_t eax_144;
00645c55                              eax_144 = var_3c;
00645c5c                              var_b4 = eax_144;
00645c60                              sub_642250(esi, arg1, arg2, i_5, i_10, i_13, var_c4, var_c0, var_bc, var_b8, var_b4);
00645c00                          }
0064526f                      }
0064526f                      else
0064526f                      {
006453b0                          int32_t i_7 = i_6;
006453b0                          
006453c0                          if (i_7 < var_44)
006453c0                          {
006453c9                              int32_t var_64_3 = esi[0x1e];
006453c9                              
00645cc7                              do
00645cc7                              {
006453f7                                  int32_t eax_87 = 0;
006453f7                                  
006453fb                                  if (edi_5 > 0)
006453fb                                  {
00645408                                      int32_t ecx_27 = arg3[0xdf3];
00645425                                      int32_t var_68_2 = ((((var_64_3 * i_11) + i_7) * edx_17) + arg3[0x1379]);
00645425                                      
00645cb3                                      do
00645cb3                                      {
0064542d                                          int32_t ebx_14 = 0;
00645431                                          int32_t ebp_23 = (eax_87 << 4);
00645434                                          int32_t esi_5 = *(uint32_t*)((ebp_23 + ecx_27) + 8);
00645434                                          
0064543a                                          if (esi_5 > 0)
0064543a                                          {
00645440                                              int32_t edi_19 = (eax_87 * 2);
00645443                                              int32_t edx_49 = *(uint32_t*)((ebp_23 + ecx_27) + 4);
00645443                                              
00645c99                                              do
00645c99                                              {
0064544f                                                  int32_t eax_88 = 0;
0064544f                                                  
00645453                                                  if (edx_49 > 0)
00645453                                                  {
00645460                                                      int32_t ebx_15 = edi_19;
00645464                                                      int32_t edi_20 = var_64_3;
00645464                                                      
006454b8                                                      while (true)
006454b8                                                      {
006454b8                                                          int32_t i_4 = 0;
006454c2                                                          int32_t esi_9 = ((((esi_5 * (((i_11 << 7) * edi_20) * edx_49)) + *(uint32_t*)((arg3[0x1377] + (ebx_15 << 1)) + 4)) + ((i_7 << 4) * edx_49)) + ((edx_49 * (edi_20 << 7)) * ebx_14));
006454cb                                                          int32_t ebx_16 = var_68_2;
006454d6                                                          int32_t esi_11 = (esi_9 + (eax_88 << 4));
006454d6                                                          
00645521                                                          do
00645521                                                          {
006454ef                                                              __g_memcpy(esi_11, ebx_16, 0x10, i_5, i_10, i_13, var_c4, var_c0, var_bc, var_b8, var_b4);
006454fc                                                              ecx_27 = arg3[0xdf3];
00645502                                                              edi_20 = arg3[0x1e];
0064550c                                                              edx_49 = *(uint32_t*)((ebp_23 + ecx_27) + 4);
00645518                                                              esi_11 += ((edi_20 << 4) * edx_49);
0064551a                                                              ebx_16 += 0x10;
0064551d                                                              i_4 += 1;
00645521                                                          } while (i_4 < 8);
00645521                                                          
00645523                                                          var_68_2 = ebx_16;
0064552e                                                          ebx_15 = edi_19;
00645532                                                          eax_88 += 1;
00645532                                                          
00645535                                                          if (eax_88 >= edx_49)
00645535                                                              break;
00645535                                                          
00645487                                                          esi_5 = *(uint32_t*)((ebp_23 + ecx_27) + 8);
006454b8                                                      }
006454b8                                                      
00645c80                                                      var_64_3 = edi_20;
00645c92                                                      esi_5 = *(uint32_t*)((ebp_23 + ecx_27) + 8);
00645453                                                  }
00645453                                                  
00645c96                                                  ebx_14 += 1;
00645c99                                              } while (ebx_14 < esi_5);
00645c99                                              
00645caa                                              edi_5 = arg3[0xdf0];
0064543a                                          }
0064543a                                          
00645cb0                                          eax_87 += 1;
00645cb3                                      } while (eax_87 < edi_5);
006453fb                                  }
006453fb                                  
00645cbd                                  i_7 += 1;
00645cc7                              } while (i_7 < var_44);
00645cc7                              
00645cd4                              esi = arg3;
006453c0                          }
0064526f                      }
0064525b                  }
0064525b                  
00645545                  if (esi[7] != 0)
00645545                  {
00645dee                      arg2[8] = (i_11 + 1);
00645df1                      arg2[7] = 0;
00645df1                      
00645dfd                      if ((i_11 + 1) == (var_48 + esi[0x1f]))
00645dfd                      {
00645dff                          arg2[8] = 0;
00645e12                          return 0;
00645dfd                      }
00645dfd                      
00645e16                      int32_t edx_91 = (esi[0x1e] - 1);
00645e1c                      esi[3] = edx_91;
00645e1f                      int32_t ebp_45 = (i_11 - var_48);
00645e26                      esi[4] = ebp_45;
00645e29                      esi[1] = edx_91;
00645e2c                      esi[2] = ebp_45;
00645e39                      return 1;
00645545                  }
00645545                  
0064554b                  i_11 += 1;
0064554c                  int32_t eax_94 = esi[0x1f];
0064554c                  
00645551                  if (i_11 >= eax_94)
00645551                  {
00645ce0                      var_60 = eax_94;
00645ce4                      ebx = arg2;
00645ce4                      break;
00645551                  }
00645551                  
00644fef                  edi_5 = esi[0xdf0];
00644ffb              }
00644fc3          }
00644fc3          
00645ceb          int32_t* eax_146 = esi[0x1377];
00645ceb          
00645cf9          if ((eax_146 != 0 && *(uint32_t*)eax_146 == 0))
00645dab              edi_5 = esi[0xdf0];
00645cf9          else if (var_48 == 0)
00645da0              edi_5 = esi[0xdf0];
00645d08          else
00645d08          {
00645d1e              if (i_6 <= var_44)
00645d1e              {
00645d24                  int32_t eax_150 = var_60;
00645d28                  int32_t i_8 = i_6;
00645d28                  
00645d78                  while (true)
00645d78                  {
00645d78                      int32_t eax_151;
00645d78                      eax_151 = var_3c;
00645d83                      sub_642250(esi, arg1, ebx, i_8, eax_150, i_14, esi[0x120d], esi[0x1e], eax_150, arg4, eax_151);
00645d88                      i_8 += 1;
00645d88                      
00645d92                      if (i_8 > var_44)
00645d92                          break;
00645d92                      
00645d30                      eax_150 = esi[0x1f];
00645d78                  }
00645d1e              }
00645d1e              
00645dbb              if (esi[7] != 0)
00645dbb              {
00645dcc                  ebx[7] = 0;
00645dcf                  ebx[8] = 0;
00645ddc                  return 0;
00645dbb              }
00645dbb              
00645dbd              edi_5 = esi[0xdf0];
00645d08          }
00644f4f      }
00644f4f      
00645aab      if ((edi_5 <= esi[0xdf5] && edi_5 <= esi[0xdf6]))
00645abc          return 2;
00645abc      
00645ac9      return 0;
00644ce0  }

0064536f                                               90                                                                 .
006453ae                                            8b f6                                                                ..
00645471                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
0064555c                                                                                      8d 74 26 00                              .t&.
006456d7                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0064589b                                                                                   90 8d 74 26 00                             ..t&.
0064594d                                         8d 76 00                                                               .v.
006459cf                                               90                                                                 .
00645a11                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....
00645a25                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
00645a35                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
00645a45                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
00645a55                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
00645a65                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
00645b05                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
00645b23           8d b6 00 00 00 00 8d bc 27 00 00 00 00                                                     ........'....
00645b42        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
00645c6a                                8d b6 00 00 00 00                                                            ......
00645c77                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
00645d2c                                      8d 74 26 00                                                              .t&.
00645d96                                                                    8d 76 00 8d bc 27 00 00 00 00                        .v...'....
00645e97                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0064601d                                                                                         8d 76 00                               .v.

00646040  enum _IJLERR sub_646040(struct _STATE* arg1, int32_t* arg2, int32_t* arg3, int32_t arg4)

00646040  {
00646041      int32_t esi;
00646041      int32_t var_8 = esi;
00646051      int32_t* edi = arg2;
00646058      void* ctx = arg1->ctx;
00646064      int32_t ecx_1 = 0;
00646066      int32_t ebp = *(uint32_t*)edi;
00646068      int32_t var_58 = 0;
00646071      void var_ac;
00646071      void var_9c;
00646071      void var_8c;
00646071      int32_t var_7c;
00646071      
00646071      if (ebp > 0)
00646071      {
00646073          int32_t edx = edi[0xd];
0064607b          int32_t eax_1 = 0;
0064607e          int32_t ebx_1 = 0;
0064607e          
006460c0          do
006460c0          {
00646094              *(uint32_t*)(&var_ac + (ecx_1 << 2)) = *(uint32_t*)((eax_1 + edx) + 0x10);
0064609c              *(uint32_t*)(&var_9c + (ecx_1 << 2)) = *(uint32_t*)((eax_1 + edx) + 0xc);
006460a7              *(uint32_t*)(&var_8c + (ecx_1 << 2)) = *(uint32_t*)(*(uint32_t*)((eax_1 + edx) + 0x14) + 8);
006460af              int32_t esi_7 = (*(uint32_t*)((eax_1 + edx) + 4) * *(uint32_t*)((eax_1 + edx) + 8));
006460b4              ebx_1 += esi_7;
006460b6              eax_1 += 0x18;
006460b9              &var_7c[ecx_1] = esi_7;
006460bd              ecx_1 += 1;
006460c0          } while (ecx_1 < ebp);
006460c0          
006460c2          var_58 = ebx_1;
00646071      }
00646071      
006460d0      int32_t ecx_2 = arg3[0xdee];
006460d9      int32_t* var_18;
006460d9      int32_t ebx_2;
006460d9      
006460d9      if (ebp == 1)
006460d9      {
00646aa6          void* ebx_19 = edi[0xd];
00646ab4          int32_t temp0_5 = (((int64_t)(ecx_2 * 8)) / *(uint32_t*)((char*)ebx_19 + 4));
00646acf          int32_t temp0_6 = (((int64_t)(arg3[0xdef] * 8)) / *(uint32_t*)((char*)ebx_19 + 8));
00646ae4          ebx_2 = (((int64_t)((arg3[0x13] + temp0_5) - 1)) / temp0_5);
00646af0          int32_t eax_62;
00646af0          int32_t edx_86;
00646af0          edx_86 = HIGHD(((int64_t)arg3[0x14]));
00646af0          eax_62 = LOWD(((int64_t)arg3[0x14]));
00646b01          var_18 = (((int64_t)((((eax_62 ^ edx_86) - edx_86) + temp0_6) - 1)) / temp0_6);
00646b08          var_58 = 1;
00646b0f          var_7c = 1;
006460d9      }
006460d9      else
006460d9      {
006460e6          ebx_2 = arg3[0x1e];
006460ec          var_18 = arg3[0x1f];
006460d9      }
006460d9      
00646a92      char var_54;
00646a92      
00646a92      if ((ecx_2 == 1 && arg3[0xdef] == 1))
00646a9a          var_54 = 0;
00646a92      else
00646a92      {
006460fe          int32_t esi_8 = 0;
00646107          var_54 = 1;
0064610e          int32_t ebp_3 = arg3[0xdf0];
0064610e          
00646116          if (ebp_3 > 0)
00646116          {
0064611a              int32_t edx_2 = 0;
0064611d              int32_t* eax_2;
0064611d              eax_2 = 1;
0064611d              
00646135              while (true)
00646135              {
00646135                  if (eax_2 == 0)
00646135                  {
00646a67                      var_54 = eax_2;
00646a76                      edi = arg2;
00646a7d                      break;
00646135                  }
00646135                  
0064613b                  int32_t edi_1 = arg3[0xdf3];
00646141                  int32_t ebx_3 = *(uint32_t*)((edi_1 + edx_2) + 4);
00646141                  
00646149                  if (ebx_3 != *(uint32_t*)((edi_1 + edx_2) + 8))
0064614b                      eax_2 = 0;
0064614b                  
00646155                  if ((ebx_3 != 1 && ebx_3 != 2))
00646157                      eax_2 = 0;
00646157                  
00646159                  edx_2 += 0x10;
0064615c                  esi_8 += 1;
0064615c                  
0064615f                  if (esi_8 >= ebp_3)
0064615f                  {
00646161                      var_54 = eax_2;
00646170                      edi = arg2;
00646170                      break;
0064615f                  }
00646135              }
00646116          }
00646a92      }
00646a92      
00646a50      int32_t var_1c;
00646a50      
00646a50      if (((ecx_2 == 2 && arg3[0xdef] <= 2) && arg3[0x137a] == 1))
00646a5b          var_1c = 1;
00646a50      else
00646182          var_1c = 0;
00646182      
00646a13      int32_t var_28;
00646a13      
00646a13      if (((ecx_2 == 2 && arg3[0xdef] == 2) && arg3[0x137a] == 1))
00646a1e          var_28 = 1;
00646a13      else
00646194          var_28 = 0;
00646194      
0064619b      int32_t esi_9 = edi[8];
0064619b      
006461a7      if (esi_9 < var_18)
006461a7      {
006461c5          int32_t var_60_2 = esi_9;
006461cd          int32_t* ebx_4 = arg3;
006465e7          int32_t edx_36;
006465e7          
006465e7          do
006465e7          {
006461dd              int32_t var_c8;
006461dd              int32_t var_c4;
006461dd              int32_t var_c0;
006461dd              int32_t* var_bc;
006461dd              int32_t var_b8;
006461dd              char var_b4;
006461dd              int32_t i;
006461dd              
006461dd              for (i = edi[7]; i < ebx_2; i += 1)
006461dd              {
006461e9                  int32_t esi_10 = 0;
006461eb                  int32_t var_5c_1 = ebx_4[0x120d];
006461f2                  int32_t edx_8 = *(uint32_t*)edi;
006461f2                  
006461f6                  if (edx_8 > 0)
006461f6                  {
00646201                      int32_t* eax_3 = ebx_4;
00646201                      
006464ba                      do
006464ba                      {
00646211                          int32_t* ecx_8 = eax_3[0x1377];
00646211                          
00646223                          if ((ecx_8 == 0 || *(uint32_t*)ecx_8 != 0))
00646223                          {
00646400                              int32_t j = 0;
00646402                              int32_t ebx_12 = (esi_10 * 2);
00646402                              
0064640b                              if (&var_7c[esi_10] > 0)
0064640b                              {
00646411                                  int32_t edi_2 = var_5c_1;
00646411                                  
0064649e                                  do
0064649e                                  {
0064642b                                      int32_t ecx_19 = *(uint32_t*)(&var_ac + (esi_10 << 2));
0064642f                                      int16_t var_6c = ((int16_t)*(uint32_t*)(((char*)arg2 + (ebx_12 << 1)) + 0x24));
0064645d                                      int32_t eax_19 = *(uint32_t*)((char*)ctx + 0xf4)(arg1, *(uint32_t*)(&var_9c + (esi_10 << 2)), ecx_19, &var_6c, edi_2, var_c8, var_c4, var_c0, var_bc, var_b8, var_b4);
00646471                                      *(uint32_t*)(((char*)arg2 + (ebx_12 << 1)) + 0x24) = ((int32_t)var_6c);
00646471                                      
00646475                                      if (eax_19 < 0)
00646b3c                                          return eax_19;
00646b3c                                      
0064648d                                      *(uint32_t*)((char*)ctx + 0x110)(edi_2, *(uint32_t*)(&var_8c + (esi_10 << 2)));
00646493                                      edi_2 += 0x80;
00646499                                      j += 1;
0064649e                                  } while (j < &var_7c[esi_10]);
0064649e                                  
006464a0                                  var_5c_1 = edi_2;
006464a7                                  eax_3 = arg3;
006464ae                                  edi = arg2;
006464b5                                  edx_8 = *(uint32_t*)edi;
0064640b                              }
00646223                          }
00646223                          else
00646223                          {
00646237                              int32_t ebp_4 = edi[0xd];
0064623a                              int32_t ebx_5 = (esi_10 * 0x18);
0064623d                              int32_t ecx_12 = *(uint32_t*)((ebx_5 + ebp_4) + 8);
0064623d                              
00646243                              if (ecx_12 > 0)
00646243                              {
00646249                                  int32_t edx_9 = (esi_10 * 2);
00646250                                  int32_t eax_4 = 0;
0064625e                                  int32_t edx_10 = *(uint32_t*)((ebx_5 + ebp_4) + 4);
0064625e                                  
006463e1                                  do
006463e1                                  {
0064626b                                      if (edx_10 > 0)
0064626b                                      {
0064627d                                          int32_t var_3c_1 = 0;
00646284                                          int32_t var_40_1 = 0;
006463bf                                          int32_t eax_11;
006463bf                                          int32_t eax_13;
006463bf                                          
006463bf                                          do
006463bf                                          {
006462a4                                              int16_t var_68 = ((int16_t)*(uint32_t*)(((char*)edi + (edx_9 << 1)) + 0x24));
006462dd                                              int32_t eax_9 = *(uint32_t*)((char*)ctx + 0xf4)(arg1, *(uint32_t*)(&var_9c + (esi_10 << 2)), *(uint32_t*)(&var_ac + (esi_10 << 2)), &var_68, var_5c_1, var_c8, var_c4, var_c0, var_bc, var_b8, var_b4);
006462f1                                              *(uint32_t*)(((char*)edi + (edx_9 << 1)) + 0x24) = ((int32_t)var_68);
006462f1                                              
006462f5                                              if (eax_9 < 0)
00646b26                                                  return eax_9;
00646b26                                              
006462fb                                              int32_t eax_10 = edi[0xd];
00646305                                              int32_t edx_13 = *(uint32_t*)((ebx_5 + eax_10) + 4);
0064634d                                              int32_t ebp_11 = (((edx_13 * (i << 4)) + *(uint32_t*)((arg3[0x1377] + (edx_9 << 1)) + 4)) + (((var_60_2 * *(uint32_t*)((ebx_5 + eax_10) + 8)) + eax_4) * (edx_13 * (ebx_2 << 7))));
0064634f                                              int32_t j_1 = 0;
00646351                                              int32_t ebp_12 = (ebp_11 + var_3c_1);
00646359                                              int32_t esi_14 = var_5c_1;
00646359                                              
00646396                                              do
00646396                                              {
0064636f                                                  __g_memcpy(ebp_12, esi_14, 0x10);
00646375                                                  eax_11 = edi[0xd];
0064637f                                                  edx_10 = *(uint32_t*)((ebx_5 + eax_11) + 4);
0064638d                                                  ebp_12 += ((ebx_2 << 4) * edx_10);
0064638f                                                  esi_14 += 0x10;
00646392                                                  j_1 += 1;
00646396                                              } while (j_1 < 8);
00646396                                              
006463a6                                              eax_13 = (var_40_1 + 1);
006463a7                                              var_5c_1 = esi_14;
006463ae                                              var_3c_1 += 0x10;
006463b6                                              var_40_1 = eax_13;
006463bf                                          } while (eax_13 < edx_10);
006463da                                          ecx_12 = *(uint32_t*)((ebx_5 + eax_11) + 8);
0064626b                                      }
0064626b                                      
006463de                                      eax_4 += 1;
006463e1                                  } while (eax_4 < ecx_12);
006463e1                                  
006463ee                                  eax_3 = arg3;
006463f5                                  edx_8 = *(uint32_t*)edi;
00646243                              }
00646223                          }
00646223                          
006464b7                          esi_10 += 1;
006464ba                      } while (esi_10 < edx_8);
006464ba                      
006464c0                      ebx_4 = eax_3;
006461f6                  }
006461f6                  
006464f2                  var_c8 = var_60_2;
006464f6                  enum _IJLERR eax_21 = sub_6438b0(arg1, edi, ebx_2, var_18, i, var_c8);
006464f6                  
006464fd                  if (eax_21 != IJL_OK)
00646b31                      return eax_21;
00646b31                  
00646503                  int32_t* edx_20 = ebx_4[0x1377];
00646503                  
00646511                  if ((edx_20 == 0 || *(uint32_t*)edx_20 != 0))
00646511                  {
00646546                      var_c8 = var_58;
00646550                      var_c4 = ebx_4[0x120d];
00646558                      var_c0 = ebx_2;
0064655c                      int32_t edx_26;
0064655c                      edx_26 = var_54;
00646563                      var_bc = var_18;
00646567                      var_b8 = arg4;
0064656b                      var_b4 = edx_26;
0064656f                      sub_642250(ebx_4, arg1, edi, i, var_60_2, var_c8, var_c4, var_c0, var_bc, var_b8, var_b4);
00646511                  }
00646511                  
00646588                  if ((ebx_4[7] != 0 && (var_1c == 0 || i != 0)))
00646588                  {
00646593                      int32_t ebx_13;
00646593                      int32_t esi_19;
00646593                      
00646593                      if (var_28 == 0)
00646593                      {
00646769                          esi_19 = var_60_2;
0064676d                          ebx_13 = ebx_2;
006466fd                      label_6466fd:
006466fe                          int32_t temp1_1 = (((int64_t)(i + 1)) % (ebx_13 + var_1c));
00646702                          edi[7] = temp1_1;
00646702                          
00646705                          if (temp1_1 == 0)
00646705                          {
0064671f                              if ((esi_19 + 1) == ((char*)var_18 + var_28))
0064671f                              {
00646721                                  edi[8] = 0;
00646734                                  return 0;
0064671f                              }
0064671f                              
00646735                              edi[8] = (esi_19 + 1);
00646705                          }
00646705                          else
00646707                              edi[8] = esi_19;
00646707                          
00646738                          int32_t ebp_14 = (i - var_1c);
0064674b                          arg3[3] = ebp_14;
0064674e                          int32_t esi_21 = (esi_19 - var_28);
00646755                          arg3[4] = esi_21;
00646758                          arg3[1] = ebp_14;
0064675b                          arg3[2] = esi_21;
00646768                          return 1;
00646593                      }
00646593                      
0064659f                      if (var_60_2 != 0)
0064659f                      {
006466ed                          esi_19 = var_60_2;
006466ef                          ebx_13 = ebx_2;
006466ef                          goto label_6466fd;
0064659f                      }
00646588                  }
006461dd              }
006461dd              
006465bb              if (var_1c != 0)
006465bb              {
006465bd                  int32_t* edx_33 = ebx_4[0x1377];
006465bd                  
006465cf                  if ((edx_33 == 0 || *(uint32_t*)edx_33 != 0))
006465cf                  {
0064679e                      var_c8 = var_58;
006467a2                      var_c4 = ebx_4[0x120d];
006467aa                      var_c0 = ebx_2;
006467b5                      var_bc = var_18;
006467c0                      var_b8 = arg4;
006467c4                      int32_t edx_58;
006467c4                      edx_58 = var_54;
006467cb                      var_b4 = edx_58;
006467cf                      sub_642250(ebx_4, arg1, edi, i, var_60_2, var_c8, var_c4, var_c0, var_bc, var_b8, var_b4);
006467cf                      
006467d9                      if (ebx_4[7] != 0)
006467d9                      {
006467f2                          int32_t temp1_2 = (((int64_t)(i + 1)) % (ebx_2 + var_1c));
006467f6                          edi[7] = temp1_2;
006467f6                          
006467f9                          if (temp1_2 == 0)
006467f9                          {
00646813                              if ((var_60_2 + 1) == ((char*)var_18 + var_28))
00646813                              {
00646815                                  edi[8] = 0;
00646828                                  return 0;
00646813                              }
00646813                              
00646829                              edi[8] = (var_60_2 + 1);
006467f9                          }
006467f9                          else
006467fb                              edi[8] = var_60_2;
006467fb                          
0064682c                          int32_t ebp_15 = (i - var_1c);
0064683f                          arg3[3] = ebp_15;
00646842                          int32_t esi_26 = (var_60_2 - var_28);
00646849                          arg3[4] = esi_26;
0064684c                          arg3[1] = ebp_15;
0064684f                          arg3[2] = esi_26;
0064685c                          return 1;
006467d9                      }
006465cf                  }
006465bb              }
006465bb              
006465d9              edx_36 = (var_60_2 + 1);
006465e1              var_60_2 = edx_36;
006465e7          } while (edx_36 < var_18);
006465e7          
006465ed          esi_9 = edx_36;
006461a7      }
006461a7      
006465fc      if (var_28 != 0)
006465fc      {
00646602          int32_t edx_38 = edi[7];
00646607          int32_t var_5c_2 = edx_38;
00646607          
0064660e          if (edx_38 < ebx_2)
0064660e          {
00646618              int32_t ebp_13 = edx_38;
00646618              
006466b9              do
006466b9              {
0064666d                  int32_t edx_43;
0064666d                  edx_43 = var_54;
00646680                  sub_642250(arg3, arg1, arg2, ebp_13, esi_9, var_58, arg3[0x120d], ebx_2, var_18, arg4, edx_43);
00646680                  
00646699                  if ((arg3[7] != 0 && (var_1c == 0 || ebp_13 != 0)))
00646699                  {
006466a4                      int32_t esi_28;
006466a4                      int32_t* edi_4;
006466a4                      
006466a4                      if (var_28 == 0)
006466a4                      {
006468e5                          int32_t var_5c_4 = ebp_13;
006468ec                          esi_28 = esi_9;
006468f0                          edi_4 = arg2;
00646879                      label_646879:
0064687a                          int32_t temp1_3 = (((int64_t)(ebp_13 + 1)) % (ebx_2 + var_1c));
0064687e                          edi_4[7] = temp1_3;
0064687e                          
00646881                          if (temp1_3 == 0)
00646881                          {
0064689b                              if ((esi_28 + 1) == ((char*)var_18 + var_28))
0064689b                              {
0064689d                                  edi_4[8] = 0;
006468b0                                  return 0;
0064689b                              }
0064689b                              
006468b1                              edi_4[8] = (esi_28 + 1);
00646881                          }
00646881                          else
00646883                              edi_4[8] = esi_28;
00646883                          
006468c0                          int32_t ecx_27 = (ebp_13 - var_1c);
006468c7                          arg3[3] = ecx_27;
006468ca                          int32_t esi_30 = (esi_28 - var_28);
006468d1                          arg3[4] = esi_30;
006468d4                          arg3[1] = ecx_27;
006468d7                          arg3[2] = esi_30;
006468e4                          return 1;
006466a4                      }
006466a4                      
006466b0                      if (esi_9 != 0)
006466b0                      {
0064685d                          int32_t var_5c_3 = ebp_13;
00646864                          esi_28 = esi_9;
00646866                          edi_4 = arg2;
00646866                          goto label_646879;
006466b0                      }
00646699                  }
00646699                  
006466b6                  ebp_13 += 1;
006466b9              } while (ebp_13 < ebx_2);
006466b9              
006466bf              var_5c_2 = ebp_13;
006466ca              edi = arg2;
0064660e          }
0064660e          
006466da          if (var_1c != 0)
006466da          {
00646947              int32_t edx_71;
00646947              edx_71 = var_54;
0064695e              sub_642250(arg3, arg1, edi, var_5c_2, esi_9, var_58, arg3[0x120d], ebx_2, var_18, arg4, edx_71);
0064695e              
0064696f              if (arg3[7] != 0)
0064696f              {
00646987                  int32_t temp1_4 = (((int64_t)(var_5c_2 + 1)) % (ebx_2 + var_1c));
0064698b                  edi[7] = temp1_4;
0064698b                  
0064698e                  if (temp1_4 == 0)
0064698e                  {
006469a3                      if ((esi_9 + 1) == ((char*)var_18 + var_28))
006469a3                      {
006469a5                          edi[8] = 0;
006469b8                          return 0;
006469a3                      }
006469a3                      
006469b9                      edi[8] = (esi_9 + 1);
0064698e                  }
0064698e                  else
00646990                      edi[8] = esi_9;
00646990                  
006469c8                  int32_t ecx_34 = (var_5c_2 - var_1c);
006469cf                  arg3[3] = ecx_34;
006469d2                  int32_t esi_33 = (esi_9 - var_28);
006469d9                  arg3[4] = esi_33;
006469dc                  arg3[1] = ecx_34;
006469df                  arg3[2] = esi_33;
006469ec                  return 1;
0064696f              }
006466da          }
006465fc      }
006465fc      
006466ec      return 0;
00646040  }

006463fc                                                                                      8d 74 26 00                              .t&.
00646b3d                                                                                         8d 76 00                               .v.

00646b40  int32_t sub_646b40(struct _STATE* arg1, int32_t* arg2, int32_t* arg3, int32_t arg4)

00646b40  {
00646b40      int32_t edi;
00646b40      int32_t var_4 = edi;
00646b58      int32_t* ebx = arg3;
00646b5f      void* ctx = arg1->ctx;
00646b6b      int32_t ecx = *(uint32_t*)arg2;
00646b6d      int32_t var_18 = 0;
00646b74      int32_t edx = 0;
00646b78      void var_dc;
00646b78      void var_cc;
00646b78      void var_bc;
00646b78      int32_t var_ac;
00646b78      int32_t var_2c;
00646b78      
00646b78      if (ecx <= 0)
00647ec3          var_2c = ebx[0x1d];
00646b78      else
00646b78      {
00646b86          var_2c = ebx[0x1d];
00646b8d          int32_t eax_1 = 0;
00646b97          int32_t esi_1 = 0;
00646b97          
00646bf4          do
00646bf4          {
00646baf              int32_t ebp_4;
00646baf              
00646baf              if (arg3[0xdf8] == 0)
00646baf              {
00647e7e                  int32_t ebx_22 = (edx * 2);
00647e81                  ebp_4 = (ebx_22 * 2);
00647e81                  
00647e8e                  if (var_2c != 1)
00647e8e                  {
00647e9b                      *(uint32_t*)(((char*)arg2 + (ebx_22 << 1)) + 0x24) = 0;
00647ea3                      ecx = *(uint32_t*)arg2;
00647eaf                      var_2c = arg3[0x1d];
00647e8e                  }
00646baf              }
00646baf              else
00646bb8                  ebp_4 = (edx * 4);
00646bb8              
00646bc1              int32_t ebx_2 = arg2[0xd];
00646bc8              *(uint32_t*)(&var_dc + ebp_4) = *(uint32_t*)((eax_1 + ebx_2) + 0x10);
00646bd0              edx += 1;
00646bd1              *(uint32_t*)(&var_cc + ebp_4) = *(uint32_t*)((eax_1 + ebx_2) + 0xc);
00646bdc              *(uint32_t*)(&var_bc + ebp_4) = *(uint32_t*)(*(uint32_t*)((eax_1 + ebx_2) + 0x14) + 8);
00646be4              int32_t edi_8 = (*(uint32_t*)((eax_1 + ebx_2) + 4) * *(uint32_t*)((eax_1 + ebx_2) + 8));
00646be9              esi_1 += edi_8;
00646beb              eax_1 += 0x18;
00646bee              *(uint32_t*)(&var_ac + ebp_4) = edi_8;
00646bf4          } while (edx < ecx);
00646bf4          
00646bf6          var_18 = esi_1;
00646bfd          ebx = arg3;
00646b78      }
00646b78      
00646c04      int32_t* ebp_5 = ebx[0xdee];
00646c0a      int32_t* edx_1 = ebx[0xdef];
00646c10      int32_t eax_2 = ebx[0xf];
00646c2b      int32_t* var_6c;
00646c2b      int32_t* var_20;
00646c2b      int32_t var_1c_1;
00646c2b      int32_t ecx_3;
00646c2b      int32_t ebp_9;
00646c2b      
00646c2b      if (ecx == 1)
00646c2b      {
00647e02          void* esi_34 = arg2[0xd];
00647e05          void* var_50_2 = esi_34;
00647e12          ecx_3 = (((int64_t)(ebp_5 * 8)) / *(uint32_t*)((char*)esi_34 + 4));
00647e2b          ebp_9 = (((int64_t)(edx_1 * 8)) / *(uint32_t*)((char*)esi_34 + 8));
00647e3a          var_1c_1 = (eax_2 * ebp_9);
00647e48          var_6c = (((int64_t)((ebx[0x13] + ecx_3) - 1)) / ecx_3);
00647e57          int32_t eax_134;
00647e57          int32_t edx_101;
00647e57          edx_101 = HIGHD(((int64_t)ebx[0x14]));
00647e57          eax_134 = LOWD(((int64_t)ebx[0x14]));
00647e63          var_20 = (((int64_t)((((eax_134 ^ edx_101) - edx_101) + ebp_9) - 1)) / ebp_9);
00647e6a          var_18 = 1;
00647e71          var_ac = 1;
00646c2b      }
00646c2b      else
00646c2b      {
00646c38          ecx_3 = (ebp_5 * 8);
00646c42          ebp_9 = (edx_1 * 8);
00646c54          var_1c_1 = (eax_2 * ebp_9);
00646c5b          var_6c = ebx[0x1e];
00646c62          var_20 = ebx[0x1f];
00646c2b      }
00646c2b      
00647dde      char var_48;
00647dde      
00647dde      if ((ebp_5 == 1 && edx_1 == 1))
00647de6          var_48 = 0;
00647dde      else
00647dde      {
00646c7b          int32_t edi_11 = 0;
00646c7d          int32_t esi_3 = ebx[0xdf0];
00646c83          var_48 = 1;
00646c83          
00646c8c          if (esi_3 > 0)
00646c8c          {
00646c90              int32_t edx_4 = 0;
00646c93              int32_t* eax_3;
00646c93              eax_3 = 1;
00646c93              
00646cb2              while (true)
00646cb2              {
00646cb2                  if (eax_3 == 0)
00646cb2                  {
00647dba                      var_48 = eax_3;
00647dcf                      break;
00646cb2                  }
00646cb2                  
00646cb8                  int32_t ebp_10 = ebx[0xdf3];
00646cbe                  int32_t ecx_4 = *(uint32_t*)((ebp_10 + edx_4) + 4);
00646cbe                  
00646cc6                  if (ecx_4 != *(uint32_t*)((ebp_10 + edx_4) + 8))
00646cc8                      eax_3 = 0;
00646cc8                  
00646cd2                  if ((ecx_4 != 1 && ecx_4 != 2))
00646cd4                      eax_3 = 0;
00646cd4                  
00646cd6                  edx_4 += 0x10;
00646cd9                  edi_11 += 1;
00646cd9                  
00646cdc                  if (edi_11 >= esi_3)
00646cdc                  {
00646cde                      var_48 = eax_3;
00646cec                      break;
00646cdc                  }
00646cb2              }
00646c8c          }
00647dde      }
00647dde      
00646cfd      int32_t temp0_1 = (((int64_t)ecx_3) / arg4);
00646d13      int32_t var_28 = (((int64_t)ebx[1]) / temp0_1);
00646d24      int32_t esi_7 = (((int64_t)((temp0_1 + ebx[3]) - 1)) / temp0_1);
00646d30      int32_t temp0_4 = (((int64_t)ebp_9) / arg4);
00646d3a      int32_t edi_12 = (((int64_t)ebx[2]) / temp0_4);
00646d44      int32_t ecx_8 = ebx[0x137a];
00646d4a      int32_t temp0_6 = (((int64_t)((temp0_4 + ebx[4]) - 1)) / temp0_4);
00646d4f      int32_t var_50_1 = temp0_6;
00647da3      int32_t var_58;
00647da3      
00647da3      if ((ecx_8 == 1 && ebp_5 == 2))
00647dae          var_58 = 1;
00647da3      else
00646d5e          var_58 = 0;
00646d5e      
00647d82      int32_t var_4c_1;
00647d82      
00647d82      if ((ecx_8 == 1 && edx_1 == 2))
00647d8d          var_4c_1 = 1;
00647d82      else
00646d70          var_4c_1 = 0;
00646d70      
00646d80      if (var_28 != 0)
00646d89          var_28 -= var_58;
00646d89      
00646d92      if (edi_12 != 0)
00646d94          edi_12 -= var_4c_1;
00646d94      
00646da4      if (esi_7 < var_6c)
00646da6          esi_7 += var_58;
00646da6      
00646db8      if (temp0_6 < var_20)
00646dc3          var_50_1 = (temp0_6 + var_4c_1);
00646dc3      
00646dd1      int32_t ebp_12 = arg2[8];
00646dd1      
00646dd6      if (ebp_12 <= edi_12)
00646dd8          ebp_12 = edi_12;
00646dd8      
00647bec      struct _STATE* var_10c;
00647bec      int32_t* var_108;
00647bec      int32_t* var_104;
00647bec      int32_t* var_100;
00647bec      int32_t var_fc;
00647bec      int32_t var_f8;
00647bec      
00647bec      if ((var_2c == 1 && arg1->cur_scan_comp != 0))
00647bec      {
00647bf2          int32_t edx_92 = ebx[0x120d];
00647bf2          
00647c04          if (arg2[7] == 0)
00647c04          {
00647c0a              int32_t ecx_57 = 0;
00647c0a              
00647c0e              if (ebp_12 > 0)
00647c0e              {
00647c2b                  int32_t* edi_37 = arg2;
00647c32                  struct _STATE* ebp_21 = arg1;
00647c32                  
00647d4f                  do
00647d4f                  {
00647c40                      int32_t esi_32 = 0;
00647c40                      
00647c44                      if (var_6c > 0)
00647c44                      {
00647d38                          do
00647d38                          {
00647c5a                              int32_t edx_93 = *(uint32_t*)edi_37;
00647c5a                              
00647c5e                              if (edx_93 > 0)
00647c5e                              {
00647c79                                  int32_t ebx_21 = 0;
00647c79                                  
00647cec                                  do
00647cec                                  {
00647c7b                                      int32_t i = 0;
00647c7b                                      
00647c83                                      if (&var_ac[ebx_21] > 0)
00647c83                                      {
00647c85                                          int32_t edx_94 = edi_37[(ebx_21 + 9)];
00647c85                                          
00647cde                                          do
00647cde                                          {
00647c90                                              int16_t var_98 = edx_94;
00647cbb                                              int32_t eax_117 = *(uint32_t*)((char*)ctx + 0xf8)(arg1, *(uint32_t*)(&var_cc + (ebx_21 << 2)), *(uint32_t*)(&var_dc + (ebx_21 << 2)), &var_98, edx_92, var_f8);
00647cc1                                              edx_94 = ((int32_t)var_98);
00647ccf                                              arg2[(ebx_21 + 9)] = edx_94;
00647ccf                                              
00647cd3                                              if (eax_117 < 0)
00647f0e                                                  return 0xffffffeb;
00647f0e                                              
00647cd9                                              i += 1;
00647cde                                          } while (i < &var_ac[ebx_21]);
00647cde                                          
00647ce0                                          edi_37 = arg2;
00647ce7                                          edx_93 = *(uint32_t*)edi_37;
00647c83                                      }
00647c83                                      
00647ce9                                      ebx_21 += 1;
00647cec                                  } while (ebx_21 < edx_93);
00647cec                                  
00647cfc                                  ebp_21 = arg1;
00647c5e                              }
00647c5e                              
00647d03                              var_10c = ebp_21;
00647d14                              var_108 = edi_37;
00647d18                              var_104 = var_6c;
00647d1c                              var_100 = var_20;
00647d20                              var_fc = esi_32;
00647d24                              var_f8 = ecx_57;
00647d24                              
00647d2f                              if (sub_6438b0(var_10c, var_108, var_104, var_100, var_fc, var_f8) != IJL_OK)
00647f1e                                  return 0xffffffe7;
00647f1e                              
00647d35                              esi_32 += 1;
00647d38                          } while (esi_32 < var_6c);
00647c44                      }
00647c44                      
00647d4c                      ecx_57 += 1;
00647d4f                  } while (ecx_57 < ebp_12);
00647d4f                  
00647d55                  var_6c = var_6c;
00647d5c                  ebp_12 = ebp_12;
00647d6c                  ebx = arg3;
00647c0e              }
00647c04          }
00647bec      }
00647bec      else if (arg2[7] == 0)
00646df6      {
00646e04          int32_t* ecx_11 = ebx[0x120c];
00646e0a          int32_t edx_24 = ecx_11[(ebp_12 * 0xa)];
00646e0a          
00646e17          if (edx_24 != 0xffffffff)
00646e17          {
006478f7              var_10c = ebp_12;
00647908              var_108 = arg1;
0064790c              var_104 = arg2;
00647910              var_100 = ebx;
00647914              int32_t eax_97 = sub_6436e0(var_10c, var_108, var_104, var_100);
00647914              
0064791b              if (eax_97 != 0)
0064792b                  return eax_97;
00646e17          }
00646e17          else
00646e17          {
00646e1d              int32_t var_54_1 = ebp_12;
00646e1d              
00646e24              if (edx_24 == 0xffffffff)
00646e24              {
00646e2d                  int32_t eax_22 = (ebp_12 * 0x28);
00646e30                  int32_t ecx_14 = ebp_12;
00646e30                  
00646e48                  do
00646e48                  {
00646e40                      eax_22 -= 0x28;
00646e43                      ecx_14 -= 1;
00646e48                  } while (*(uint32_t*)((char*)ecx_11 + eax_22) == 0xffffffff);
00646e48                  
00646e4a                  var_54_1 = ecx_14;
00646e51                  ebx = arg3;
00646e24              }
00646e24              
00646e66              var_10c = var_54_1;
00646e70              var_108 = arg1;
00646e74              var_104 = arg2;
00646e78              var_100 = ebx;
00646e7c              int32_t eax_23 = sub_6436e0(var_10c, var_108, var_104, var_100);
00646e7c              
00646e83              if (eax_23 != 0)
00647032                  return eax_23;
00647032              
00646e89              int32_t ecx_16 = ebx[0x120d];
00646e89              
00646e98              if (var_54_1 < ebp_12)
00646e98              {
00646eb3                  int32_t* ebp_13 = arg2;
00646eba                  struct _STATE* edi_13 = arg1;
00646eba                  
00647009                  do
00647009                  {
00646ed3                      if (var_6c > 0)
00646ed3                      {
00646ed9                          int32_t ebx_3 = 0;
00646ed9                          
00646fc9                          do
00646fc9                          {
00646edd                              int32_t edx_30 = *(uint32_t*)ebp_13;
00646edd                              
00646ee2                              if (edx_30 > 0)
00646ee2                              {
00646eef                                  int32_t ebx_4 = 0;
00646eef                                  
00646f7d                                  do
00646f7d                                  {
00646f07                                      if (&var_ac[ebx_4] > 0)
00646f07                                      {
00646f09                                          int32_t edx_31 = ebp_13[(ebx_4 + 9)];
00646f14                                          int32_t i_1 = 0;
00646f14                                          
00646f6e                                          do
00646f6e                                          {
00646f20                                              int16_t var_9c = edx_31;
00646f4b                                              int32_t eax_24 = *(uint32_t*)((char*)ctx + 0xf8)(arg1, *(uint32_t*)(&var_cc + (ebx_4 << 2)), *(uint32_t*)(&var_dc + (ebx_4 << 2)), &var_9c, ecx_16, var_f8);
00646f51                                              edx_31 = ((int32_t)var_9c);
00646f5f                                              arg2[(ebx_4 + 9)] = edx_31;
00646f5f                                              
00646f63                                              if (eax_24 < 0)
00647f2e                                                  return 0xffffffeb;
00647f2e                                              
00646f69                                              i_1 += 1;
00646f6e                                          } while (i_1 < &var_ac[ebx_4]);
00646f6e                                          
00646f70                                          ebp_13 = arg2;
00646f77                                          edx_30 = *(uint32_t*)ebp_13;
00646f07                                      }
00646f07                                      
00646f7a                                      ebx_4 += 1;
00646f7d                                  } while (ebx_4 < edx_30);
00646f7d                                  
00646f8d                                  edi_13 = arg1;
00646ee2                              }
00646ee2                              
00646fb1                              var_fc = ebx_3;
00646fb5                              var_f8 = var_54_1;
00646fb5                              
00646fc0                              if (sub_6438b0(edi_13, ebp_13, var_6c, var_20, var_fc, var_f8) != IJL_OK)
00647ede                                  return 0xffffffe7;
00647ede                              
00646fc6                              ebx_3 += 1;
00646fc9                          } while (ebx_3 < var_6c);
00646fc9                          
00646fcf                          ebx = arg3;
00646ed3                      }
00646ed3                      
00646fdd                      int32_t eax_27 = (var_54_1 + 1);
00646fde                      var_54_1 = eax_27;
00646fe5                      var_10c = eax_27;
00646fe8                      var_108 = edi_13;
00646fec                      var_104 = ebp_13;
00646ff0                      var_100 = ebx;
00646ff4                      sub_6437f0(var_10c, var_108, var_104, var_100);
00647009                  } while (var_54_1 < ebp_12);
00647009                  
0064700f                  var_6c = var_6c;
00646e98              }
00646e17          }
00646df6      }
00646df6      
0064703c      int32_t var_f4;
0064703c      int32_t* var_f0;
0064703c      int32_t* var_ec;
0064703c      int32_t var_e8;
0064703c      char var_e4;
0064703c      
0064703c      if (ebp_12 < var_50_1)
0064703c      {
00647060          int32_t ecx_23 = (var_6c << 7);
00647063          int32_t eax_30 = (var_6c << 4);
0064707b          int32_t var_78_2 = ebp_12;
00647089          int32_t* ebp_15 = arg2;
00647801          struct _STATE* esi_23;
00647801          
00647801          do
00647801          {
00647097              int32_t edx_39 = ebx[0x120d];
0064709d              int32_t edi_16 = ebp_15[7];
0064709d              
006470a9              if (edi_16 < var_28)
006470a9              {
006470b6                  int32_t* esi_9 = var_6c;
006470bd                  struct _STATE* ebx_5 = arg1;
006470bd                  
006471b0                  do
006471b0                  {
006470c6                      int32_t edx_40 = *(uint32_t*)ebp_15;
006470c6                      
006470cb                      if (edx_40 > 0)
006470cb                      {
006470d8                          int32_t ebx_6 = 0;
006470d8                          
0064715d                          do
0064715d                          {
006470e9                              if (&var_ac[ebx_6] > 0)
006470e9                              {
006470eb                                  int32_t edx_41 = ebp_15[(ebx_6 + 9)];
006470f6                                  int32_t i_2 = 0;
006470f6                                  
0064714e                                  do
0064714e                                  {
00647100                                      int16_t var_94 = edx_41;
0064712b                                      int32_t eax_32 = *(uint32_t*)((char*)ctx + 0xf8)(arg1, *(uint32_t*)(&var_cc + (ebx_6 << 2)), *(uint32_t*)(&var_dc + (ebx_6 << 2)), &var_94, edx_39, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
00647131                                      edx_41 = ((int32_t)var_94);
0064713f                                      arg2[(ebx_6 + 9)] = edx_41;
0064713f                                      
00647143                                      if (eax_32 < 0)
00647fbc                                          return 0xffffffeb;
00647fbc                                      
00647149                                      i_2 += 1;
0064714e                                  } while (i_2 < &var_ac[ebx_6]);
0064714e                                  
00647150                                  ebp_15 = arg2;
00647157                                  edx_40 = *(uint32_t*)ebp_15;
006470e9                              }
006470e9                              
0064715a                              ebx_6 += 1;
0064715d                          } while (ebx_6 < edx_40);
0064715d                          
00647166                          esi_9 = var_6c;
0064716d                          ebx_5 = arg1;
006470cb                      }
006470cb                      
00647174                      var_10c = ebx_5;
00647185                      var_108 = ebp_15;
00647189                      var_104 = esi_9;
0064718d                      var_100 = var_20;
00647191                      var_fc = edi_16;
00647195                      var_f8 = var_78_2;
00647195                      
006471a0                      if (sub_6438b0(var_10c, var_108, var_104, var_100, var_fc, var_f8) != IJL_OK)
00647fac                          return 0xffffffe7;
00647fac                      
006471a6                      edi_16 += 1;
006471b0                  } while (edi_16 < var_28);
006471b0                  
006471b6                  ebx = arg3;
006471bd                  edi_16 = ebp_15[7];
006470a9              }
006470a9              
006471c8              if (ebx[0x1377] == 0)
006471c8              {
00647b70                  int32_t edi_34 = (edi_16 - var_28);
00647b70                  
00647b79                  if (edi_34 <= 0)
00647bd0                      edi_34 = 0;
00647bd0                  
00647bb7                  arg1->DIB_ptr = ((((var_78_2 - edi_12) * (((int64_t)var_1c_1) / arg4)) + ebx[8]) + (edi_34 * (ebx[0xc] * temp0_1)));
00647bba                  edi_16 = ebp_15[7];
006471c8              }
006471c8              
006471d7              if (edi_16 <= var_28)
006471d9                  edi_16 = var_28;
006471d9              
006471e4              if (edi_16 < esi_7)
006471e4              {
0064764e                  int32_t ecx_38;
0064764e                  
0064764e                  do
0064764e                  {
006471f0                      int32_t esi_10 = 0;
006471f2                      int32_t var_5c_2 = ebx[0x120d];
006471f9                      int32_t eax_40 = *(uint32_t*)ebp_15;
006471f9                      
006471fe                      if (eax_40 > 0)
006471fe                      {
006474df                          do
006474df                          {
00647217                              int32_t* edx_47 = ebx[0x1377];
00647217                              
00647229                              if ((edx_47 == 0 || *(uint32_t*)edx_47 != 0))
00647229                              {
00647410                                  int32_t i_3 = 0;
00647412                                  int32_t edx_60 = (esi_10 * 2);
00647412                                  
0064741b                                  if (&var_ac[esi_10] > 0)
0064741b                                  {
00647428                                      int32_t ebp_17 = var_5c_2;
00647428                                      
006474be                                      do
006474be                                      {
00647442                                          int16_t var_90 = ((int16_t)*(uint32_t*)(((char*)arg2 + (edx_60 << 1)) + 0x24));
00647474                                          int32_t eax_54 = *(uint32_t*)((char*)ctx + 0xf4)(arg1, *(uint32_t*)(&var_cc + (esi_10 << 2)), *(uint32_t*)(&var_dc + (esi_10 << 2)), &var_90, ebp_17, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
0064748f                                          *(uint32_t*)(((char*)arg2 + (edx_60 << 1)) + 0x24) = ((int32_t)var_90);
006474a5                                          *(uint32_t*)((char*)ctx + 0x110)(ebp_17, *(uint32_t*)(&var_bc + (esi_10 << 2)));
006474a5                                          
006474ad                                          if (eax_54 < 0)
00647efe                                              return 0xffffffeb;
00647efe                                          
006474b3                                          ebp_17 += 0x80;
006474b9                                          i_3 += 1;
006474be                                      } while (i_3 < &var_ac[esi_10]);
006474be                                      
006474c4                                      var_5c_2 = ebp_17;
006474cb                                      ebx = arg3;
006474d2                                      ebp_15 = arg2;
006474d9                                      eax_40 = *(uint32_t*)ebp_15;
0064741b                                  }
00647229                              }
00647229                              else
00647229                              {
0064723d                                  int32_t edi_18 = ebp_15[0xd];
00647240                                  int32_t ecx_27 = (esi_10 * 0x18);
00647243                                  int32_t edx_51 = *(uint32_t*)((ecx_27 + edi_18) + 8);
00647243                                  
00647249                                  if (edx_51 > 0)
00647249                                  {
0064724f                                      int32_t eax_41 = (esi_10 * 2);
00647256                                      int32_t ebx_7 = 0;
00647264                                      int32_t eax_42 = *(uint32_t*)((ecx_27 + edi_18) + 4);
00647264                                      
006473f1                                      do
006473f1                                      {
00647271                                          if (eax_42 > 0)
00647271                                          {
00647283                                              int32_t var_3c_1 = 0;
0064728a                                              int32_t var_40_1 = 0;
006473cf                                              int32_t edx_56;
006473cf                                              int32_t edx_58;
006473cf                                              
006473cf                                              do
006473cf                                              {
006472aa                                                  int16_t var_8c = ((int16_t)*(uint32_t*)(((char*)ebp_15 + (eax_41 << 1)) + 0x24));
006472e9                                                  int32_t eax_47 = *(uint32_t*)((char*)ctx + 0xf4)(arg1, *(uint32_t*)(&var_cc + (esi_10 << 2)), *(uint32_t*)(&var_dc + (esi_10 << 2)), &var_8c, var_5c_2, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
00647300                                                  *(uint32_t*)(((char*)ebp_15 + (eax_41 << 1)) + 0x24) = ((int32_t)var_8c);
00647300                                                  
00647304                                                  if (eax_47 < 0)
00647f7c                                                      return 0xffffffeb;
00647f7c                                                  
0064730a                                                  int32_t eax_48 = ebp_15[0xd];
00647314                                                  int32_t edx_54 = *(uint32_t*)((ecx_27 + eax_48) + 4);
00647346                                                  int32_t edi_22 = var_5c_2;
00647361                                                  int32_t i_4 = 0;
00647363                                                  int32_t esi_17 = ((((edx_54 * (edi_16 << 4)) + *(uint32_t*)((arg3[0x1377] + (eax_41 << 1)) + 4)) + (((var_78_2 * *(uint32_t*)((ecx_27 + eax_48) + 8)) + ebx_7) * (edx_54 * ecx_23))) + var_3c_1);
0064736a                                                  int32_t esi_18 = esi_17;
0064736a                                                  
006473a6                                                  do
006473a6                                                  {
0064737f                                                      __g_memcpy(esi_18, edi_22, 0x10);
00647385                                                      edx_56 = ebp_15[0xd];
0064738f                                                      eax_42 = *(uint32_t*)((ecx_27 + edx_56) + 4);
0064739d                                                      esi_18 += (eax_30 * eax_42);
0064739f                                                      edi_22 += 0x10;
006473a2                                                      i_4 += 1;
006473a6                                                  } while (i_4 < 8);
006473a6                                                  
006473b6                                                  edx_58 = (var_40_1 + 1);
006473b7                                                  var_5c_2 = edi_22;
006473be                                                  var_3c_1 += 0x10;
006473c6                                                  var_40_1 = edx_58;
006473cf                                              } while (edx_58 < eax_42);
006473ea                                              edx_51 = *(uint32_t*)((ecx_27 + edx_56) + 8);
00647271                                          }
00647271                                          
006473ee                                          ebx_7 += 1;
006473f1                                      } while (ebx_7 < edx_51);
006473f1                                      
006473fe                                      ebx = arg3;
00647405                                      eax_40 = *(uint32_t*)ebp_15;
00647249                                  }
00647229                              }
00647229                              
006474dc                              esi_10 += 1;
006474df                          } while (esi_10 < eax_40);
006471fe                      }
006471fe                      
00647501                      var_10c = arg1;
0064750b                      var_108 = ebp_15;
0064750f                      var_104 = var_6c;
00647513                      var_100 = var_20;
00647517                      var_fc = edi_16;
0064751b                      var_f8 = var_78_2;
0064751b                      
00647526                      if (sub_6438b0(var_10c, var_108, var_104, var_100, var_fc, var_f8) != IJL_OK)
00647eee                          return 0xffffffe7;
00647eee                      
0064752c                      int32_t* eax_58 = ebx[0x1377];
0064752c                      
0064753a                      if ((eax_58 == 0 || *(uint32_t*)eax_58 != 0))
0064753a                      {
0064753c                          var_10c = ebx;
0064754d                          var_108 = arg1;
0064755f                          var_104 = ebp_15;
0064756a                          var_100 = edi_16;
0064756e                          var_fc = var_78_2;
00647579                          var_f8 = var_18;
00647583                          var_f4 = ebx[0x120d];
00647587                          var_f0 = var_6c;
0064758b                          int32_t eax_63;
0064758b                          eax_63 = var_48;
00647592                          var_ec = var_20;
00647596                          var_e8 = arg4;
0064759a                          var_e4 = eax_63;
0064759e                          sub_642250(var_10c, var_108, var_104, var_100, var_fc, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
0064753a                      }
0064753a                      
006475a8                      if (ebx[7] == 0)
00647640                          ecx_38 = (edi_16 + 1);
006475a8                      else if (ebx[0x1d] == 1)
0064792c                          ecx_38 = (edi_16 + 1);
006475b4                      else if ((var_58 != 0 && edi_16 == var_28))
006475d0                          ecx_38 = (edi_16 + 1);
006475ce                      else if ((var_4c_1 == 0 || var_78_2 != edi_12))
006475fb                      {
00647610                          ecx_38 = (edi_16 + 1);
00647610                          
00647628                          if (edi_16 != ((var_58 + esi_7) - 1))
00647628                          {
00647f42                              arg2[7] = (((int64_t)ecx_38) % (var_58 + esi_7));
00647f45                              arg2[8] = var_78_2;
00647f48                              int32_t edi_51 = (edi_16 - var_58);
00647f4f                              ebx[3] = edi_51;
00647f52                              int32_t ebp_25 = (var_78_2 - var_4c_1);
00647f59                              ebx[4] = ebp_25;
00647f5c                              ebx[1] = edi_51;
00647f5f                              ebx[2] = ebp_25;
00647f6c                              return 1;
00647628                          }
00647628                          
00647630                          ebp_15[7] = 0;
00647633                          ebp_15[8] = 0;
006475fb                      }
006475fb                      else
006475fd                          ecx_38 = (edi_16 + 1);
006475fd                      
00647643                      edi_16 = ecx_38;
0064764e                  } while (ecx_38 < esi_7);
006471e4              }
006471e4              
0064765d              if (var_58 != 0)
0064765d              {
00647add                  var_10c = ebx;
00647aee                  var_108 = arg1;
00647aff                  var_104 = ebp_15;
00647b0a                  var_100 = edi_16;
00647b15                  var_fc = var_78_2;
00647b19                  int32_t eax_107;
00647b19                  eax_107 = var_48;
00647b20                  var_f8 = var_18;
00647b24                  var_f4 = ebx[0x120d];
00647b28                  var_f0 = var_20;
00647b2c                  var_ec = var_20;
00647b30                  var_e8 = arg4;
00647b34                  var_e4 = eax_107;
00647b38                  sub_642250(var_10c, var_108, var_104, var_100, var_fc, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
00647b38                  
00647b4e                  if ((ebx[7] != 0 && ebx[0x1d] != 1))
00647b4e                  {
00647b56                      ebp_15[7] = 0;
00647b59                      ebp_15[8] = 0;
00647b4e                  }
0064765d              }
0064765d              
0064766a              esi_23 = (var_78_2 + 1);
0064766a              
00647676              if (var_20 > esi_23)
00647676              {
0064797a                  if ((ebx[0x1d] == 1 && arg1->cur_scan_comp != 0))
0064797a                  {
00647980                      int32_t edx_82 = ebx[0x120d];
00647986                      int32_t edi_30 = esi_7;
00647986                      
00647996                      if (edi_30 < var_6c)
00647996                      {
006479a3                          struct _STATE* ebx_18 = arg1;
006479a3                          
00647aa6                          do
00647aa6                          {
006479b5                              int32_t edx_83 = *(uint32_t*)ebp_15;
006479b5                              
006479ba                              if (edx_83 > 0)
006479ba                              {
006479c7                                  int32_t ebx_19 = 0;
006479c7                                  
00647a56                                  do
00647a56                                  {
006479df                                      if (&var_ac[ebx_19] > 0)
006479df                                      {
006479e1                                          int32_t edx_84 = ebp_15[(ebx_19 + 9)];
006479ec                                          int32_t i_5 = 0;
006479ec                                          
00647a47                                          do
00647a47                                          {
006479f0                                              int16_t var_84 = edx_84;
00647a21                                              int32_t eax_102 = *(uint32_t*)((char*)ctx + 0xf8)(arg1, *(uint32_t*)(&var_cc + (ebx_19 << 2)), *(uint32_t*)(&var_dc + (ebx_19 << 2)), &var_84, edx_82, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
00647a27                                              edx_84 = ((int32_t)var_84);
00647a38                                              arg2[(ebx_19 + 9)] = edx_84;
00647a38                                              
00647a3c                                              if (eax_102 < 0)
00647f9c                                                  return 0xffffffeb;
00647f9c                                              
00647a42                                              i_5 += 1;
00647a47                                          } while (i_5 < &var_ac[ebx_19]);
00647a47                                          
00647a49                                          ebp_15 = arg2;
00647a50                                          edx_83 = *(uint32_t*)ebp_15;
006479df                                      }
006479df                                      
00647a53                                      ebx_19 += 1;
00647a56                                  } while (ebx_19 < edx_83);
00647a56                                  
00647a6a                                  ebx_18 = arg1;
006479ba                              }
006479ba                              
00647a71                              var_10c = ebx_18;
00647a82                              var_108 = ebp_15;
00647a86                              var_104 = var_6c;
00647a8a                              var_100 = var_20;
00647a8e                              var_fc = edi_30;
00647a92                              var_f8 = var_78_2;
00647a92                              
00647a9d                              if (sub_6438b0(var_10c, var_108, var_104, var_100, var_fc, var_f8) != IJL_OK)
00647fcc                                  return 0xffffffe7;
00647fcc                              
00647aa3                              edi_30 += 1;
00647aa6                          } while (edi_30 < var_6c);
00647aa6                          
00647aac                          var_6c = var_6c;
00647aba                          ebx = arg3;
00647996                      }
0064797a                  }
0064797a                  else if (*(uint32_t*)((ebx[0x120c] + (var_78_2 * 0x28)) + 0x28) != 0xffffffff)
006476a4                  {
00647940                      var_10c = esi_23;
0064794a                      var_108 = arg1;
0064794e                      var_104 = ebp_15;
00647952                      var_100 = ebx;
00647956                      int32_t eax_99 = sub_6436e0(var_10c, var_108, var_104, var_100);
00647956                      
0064795d                      if (eax_99 != 0)
0064796d                          return eax_99;
006476a4                  }
006476a4                  else
006476a4                  {
006476aa                      int32_t edx_72 = ebx[0x120d];
006476b0                      int32_t edi_24 = esi_7;
006476b0                      
006476c0                      if (edi_24 < var_6c)
006476c0                      {
006476cd                          struct _STATE* ebx_16 = arg1;
006476db                          int32_t* esi_24 = var_6c;
006476db                          
006477c2                          do
006477c2                          {
006476df                              int32_t edx_73 = *(uint32_t*)ebp_15;
006476df                              
006476e4                              if (edx_73 > 0)
006476e4                              {
006476f1                                  int32_t ebx_17 = 0;
006476f1                                  
00647776                                  do
00647776                                  {
006476fa                                      int32_t i_6 = 0;
006476fa                                      
00647702                                      if (&var_ac[ebx_17] > 0)
00647702                                      {
00647704                                          int32_t edx_74 = ebp_15[(ebx_17 + 9)];
00647704                                          
00647767                                          do
00647767                                          {
00647710                                              int16_t var_88 = edx_74;
00647741                                              int32_t eax_83 = *(uint32_t*)((char*)ctx + 0xf8)(arg1, *(uint32_t*)(&var_cc + (ebx_17 << 2)), *(uint32_t*)(&var_dc + (ebx_17 << 2)), &var_88, edx_72, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
00647747                                              edx_74 = ((int32_t)var_88);
00647758                                              arg2[(ebx_17 + 9)] = edx_74;
00647758                                              
0064775c                                              if (eax_83 < 0)
00647fdc                                                  return 0xffffffeb;
00647fdc                                              
00647762                                              i_6 += 1;
00647767                                          } while (i_6 < &var_ac[ebx_17]);
00647767                                          
00647769                                          ebp_15 = arg2;
00647770                                          edx_73 = *(uint32_t*)ebp_15;
00647702                                      }
00647702                                      
00647773                                      ebx_17 += 1;
00647776                                  } while (ebx_17 < edx_73);
00647776                                  
0064777f                                  esi_24 = var_6c;
00647786                                  ebx_16 = arg1;
006476e4                              }
006476e4                              
006477aa                              var_fc = edi_24;
006477ae                              var_f8 = var_78_2;
006477ae                              
006477b9                              if (sub_6438b0(ebx_16, ebp_15, esi_24, var_20, var_fc, var_f8) != IJL_OK)
00647f8c                                  return 0xffffffe7;
00647f8c                              
006477bf                              edi_24 += 1;
006477c2                          } while (edi_24 < esi_24);
006477c2                          
006477cf                          ebx = arg3;
006476c0                      }
006476c0                      
006477d6                      var_10c = esi_23;
006477e0                      var_108 = arg1;
006477e4                      var_104 = ebp_15;
006477e8                      var_100 = ebx;
006477ec                      sub_6437f0(var_10c, var_108, var_104, var_100);
006476a4                  }
00647676              }
00647676              
006477fa              var_78_2 = esi_23;
00647801          } while (esi_23 < var_50_1);
00647801          
00647807          ebp_12 = esi_23;
0064703c      }
0064703c      
00647819      if (var_4c_1 != 0)
00647819      {
00647826          int32_t edx_78 = (var_58 + esi_7);
00647826          
00647838          if (var_28 < edx_78)
00647838          {
00647845              int32_t ebp_19 = var_28;
00647845              
006478c1              do
006478c1              {
00647850                  var_10c = ebx;
00647861                  var_108 = arg1;
00647873                  var_104 = arg2;
0064787d                  var_100 = ebp_19;
00647881                  var_fc = ebp_12;
00647885                  var_f8 = var_18;
00647889                  var_f4 = ebx[0x120d];
0064788d                  var_f0 = var_6c;
00647898                  var_ec = var_20;
006478a3                  var_e8 = arg4;
006478a7                  int32_t eax_91;
006478a7                  eax_91 = var_48;
006478ae                  var_e4 = eax_91;
006478b2                  sub_642250(var_10c, var_108, var_104, var_100, var_fc, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
006478b7                  ebp_19 += 1;
006478c1              } while (ebp_19 < edx_78);
00647838          }
00647819      }
00647819      
006478ca      *(uint32_t*)((char*)ctx + 0x18)(var_10c, var_108, var_104, var_100, var_fc, var_f8, var_f4, var_f0, var_ec, var_e8, var_e4);
006478ca      
006478e1      if ((ebx[0xdf6] < ebx[0xdf0] && ebx[0x1d] == 1))
00647adc          return 0;
00647adc      
006478f6      return 2;
00646b40  }

0064740d                                         8d 76 00                                                               .v.
006475d5                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
00647602        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
00647638                                                                          90 8d b4 26 00 00 00 00                          ...&....
00647934                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00647ac6                    8d 76 00 8d bc 27 00 00 00 00                                                        .v...'....
00647b61     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
00647bc2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
00647bd4                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............
00647ebb                                                                                   90 8d 74 26 00                             ..t&.
00647fdd                                                                                         8d 76 00                               .v.

00647fe0  enum _IJLERR Decode_Scan(enum IJL_MARKER* arg1, struct _STATE* arg2, struct _SCAN* arg3, struct _JPEG_PROPERTIES* arg4)

00647fe0  {
00647ff3      void* ctx = arg2->ctx;
00647ffa      *(uint32_t*)arg1 = 0;
00648000      enum _DCTTYPE dcttype = arg4->dcttype;
00648000      
00648005      if (dcttype == IJL_AAN)
00648005      {
0064800e          int32_t ecx = *(uint32_t*)((char*)ctx + 0x28);
00648011          *(uint32_t*)((char*)ctx + 0x48) = *(uint32_t*)((char*)ctx + 0x24);
00648014          int32_t esi = *(uint32_t*)((char*)ctx + 0x2c);
00648017          int32_t edi = *(uint32_t*)((char*)ctx + 0x30);
0064801a          *(uint32_t*)((char*)ctx + 0x4c) = ecx;
0064801d          int32_t edx_2 = *(uint32_t*)((char*)ctx + 0x108);
00648023          *(uint32_t*)((char*)ctx + 0x50) = esi;
00648026          *(uint32_t*)((char*)ctx + 0x54) = edi;
00648029          *(uint32_t*)((char*)ctx + 0x110) = edx_2;
00648005      }
00648005      else if (dcttype != IJL_IPP)
00648034      {
00648067          int32_t ecx_2 = *(uint32_t*)((char*)ctx + 0x28);
0064806a          *(uint32_t*)((char*)ctx + 0x48) = *(uint32_t*)((char*)ctx + 0x24);
0064806d          int32_t esi_2 = *(uint32_t*)((char*)ctx + 0x2c);
00648070          int32_t edi_2 = *(uint32_t*)((char*)ctx + 0x30);
00648073          *(uint32_t*)((char*)ctx + 0x4c) = ecx_2;
00648076          int32_t edx_6 = *(uint32_t*)((char*)ctx + 0x108);
0064807c          *(uint32_t*)((char*)ctx + 0x50) = esi_2;
0064807f          *(uint32_t*)((char*)ctx + 0x54) = edi_2;
00648082          *(uint32_t*)((char*)ctx + 0x110) = edx_6;
00648034      }
00648034      else
00648034      {
0064803d          int32_t ecx_1 = *(uint32_t*)((char*)ctx + 0x38);
00648040          *(uint32_t*)((char*)ctx + 0x48) = *(uint32_t*)((char*)ctx + 0x34);
00648043          int32_t esi_1 = *(uint32_t*)((char*)ctx + 0x3c);
00648046          int32_t edi_1 = *(uint32_t*)((char*)ctx + 0x40);
00648049          *(uint32_t*)((char*)ctx + 0x4c) = ecx_1;
0064804c          int32_t edx_4 = *(uint32_t*)((char*)ctx + 0x10c);
00648052          *(uint32_t*)((char*)ctx + 0x50) = esi_1;
00648055          *(uint32_t*)((char*)ctx + 0x54) = edi_1;
00648058          *(uint32_t*)((char*)ctx + 0x110) = edx_4;
00648034      }
00648034      
00648088      int32_t right = arg4->roi.right;
0064808b      int32_t JPGWidth = arg4->JPGWidth;
00648094      struct _STATE* var_2c;
00648094      struct _SCAN* var_28;
00648094      struct _JPEG_PROPERTIES* var_24;
00648094      int32_t var_20;
00648094      enum _IJLERR result;
00648094      int32_t bottom;
00648094      int32_t left;
00648094      int32_t JPGHeight;
00648094      int32_t top;
00648094      
00648094      if ((right >= JPGWidth || right == 0))
00648094      {
006480a8          int32_t bottom_1 = arg4->roi.bottom;
006480ab          JPGHeight = arg4->JPGHeight;
006480b0          bottom = bottom_1;
006480b0          
006480b8          if ((bottom_1 < JPGHeight && bottom_1 != 0))
006480b8          {
006480ba              top = arg4->roi.top;
006480bd              left = arg4->roi.left;
006480c0              goto label_6480d2;
006480b8          }
006480b8          
006480c2          top = arg4->roi.top;
006480c2          
006480c7          if (top > 0)
006480c7          {
006480cd              left = arg4->roi.left;
006480cd              goto label_6480d2;
006480c7          }
006480c7          
0064839d          left = arg4->roi.left;
0064839d          
006483a2          if (left > 0)
006483a2              goto label_6480d2;
006483a2          
006483a8          enum _IJLIOTYPE iotype_1 = arg4->iotype;
006483a8          
006483b6          if ((iotype_1 == IJL_JFILE_READONEEIGHTH || iotype_1 == IJL_JBUFF_READONEEIGHTH))
006483b6          {
006484c8              if (arg4->progressive_found != 0)
006484c8              {
006484ed                  var_2c = arg2;
006484f4                  var_28 = arg3;
006484f8                  var_24 = arg4;
006484fc                  var_20 = 8;
00648509                  result = sub_643930(var_2c, var_28, var_24, 8);
006484c8              }
006484c8              else
006484c8              {
006484ca                  var_2c = arg2;
006484d1                  var_28 = arg3;
006484d5                  var_24 = arg4;
006484d9                  var_20 = 8;
006484e6                  result = sub_646040(var_2c, var_28, var_24, 8);
006484c8              }
006483b6          }
006483b6          else if ((iotype_1 == IJL_JFILE_READONEQUARTER || iotype_1 == IJL_JBUFF_READONEQUARTER))
006483c4          {
00648432              if (arg4->progressive_found != 0)
00648432              {
0064849d                  var_2c = arg2;
006484a4                  var_28 = arg3;
006484a8                  var_24 = arg4;
006484ac                  var_20 = 4;
006484b9                  result = sub_643930(var_2c, var_28, var_24, 4);
00648432              }
00648432              else
00648432              {
00648434                  var_2c = arg2;
0064843b                  var_28 = arg3;
0064843f                  var_24 = arg4;
00648443                  var_20 = 4;
00648450                  result = sub_646040(var_2c, var_28, var_24, 4);
00648432              }
006483c4          }
006483c4          else if ((iotype_1 == IJL_JFILE_READONEHALF || iotype_1 == IJL_JBUFF_READONEHALF))
006483ce          {
006483d8              if (arg4->progressive_found != 0)
006483d8              {
00648457                  var_2c = arg2;
0064845e                  var_28 = arg3;
00648462                  var_24 = arg4;
00648466                  var_20 = 2;
00648473                  result = sub_643930(var_2c, var_28, var_24, 2);
006483d8              }
006483d8              else
006483d8              {
006483da                  var_2c = arg2;
006483e1                  var_28 = arg3;
006483e5                  var_24 = arg4;
006483e9                  var_20 = 2;
006483f6                  result = sub_646040(var_2c, var_28, var_24, 2);
006483d8              }
006483ce          }
006483ce          else if (arg4->progressive_found != 0)
00648405          {
0064847a              var_2c = arg2;
00648481              var_28 = arg3;
00648485              var_24 = arg4;
00648489              var_20 = 1;
00648496              result = sub_643930(var_2c, var_28, var_24, 1);
00648405          }
00648405          else
00648405          {
00648407              var_2c = arg2;
0064840e              var_28 = arg3;
00648412              var_24 = arg4;
00648416              var_20 = 1;
00648423              result = sub_646040(var_2c, var_28, var_24, 1);
00648405          }
00648094      }
00648094      else
00648094      {
00648099          JPGHeight = arg4->JPGHeight;
0064809c          top = arg4->roi.top;
0064809f          bottom = arg4->roi.bottom;
006480a3          left = arg4->roi.left;
006480d2      label_6480d2:
006480d2          
006480d2          if (JPGWidth >= right)
006480d4              JPGWidth = right;
006480d4          
006480d6          arg4->roi.right = JPGWidth;
006480d6          
006480df          if (JPGHeight >= bottom)
006480e1              JPGHeight = bottom;
006480e1          
006480e3          arg4->roi.bottom = JPGHeight;
006480e3          
006480e8          if (left < 0)
00648396              left = 0;
00648396          
006480ee          arg4->roi.left = left;
006480ee          
006480f3          if (top < 0)
0064838f              top = 0;
0064838f          
006480f9          arg4->roi.top = top;
006480f9          
00648104          if (arg4->rowoffsets == 0)
00648104          {
0064828a              void* eax_26 = operator new(0x50000);
0064828f              arg4->rowoffsets = eax_26;
0064828f              
00648297              if (eax_26 == 0)
0064851c                  return 0xfffffffb;
0064851c              
0064829d              enum _IJLIOTYPE iotype_2 = arg4->iotype;
0064829d              
006482c6              if (((((iotype_2 == IJL_JFILE_READWHOLEIMAGE || iotype_2 == IJL_JFILE_READENTROPY) || iotype_2 == IJL_JFILE_READONEHALF) || iotype_2 == IJL_JFILE_READONEQUARTER) || iotype_2 == IJL_JFILE_READONEEIGHTH))
00648388                  *(uint32_t*)eax_26 = arg2->entropy_bytes_processed;
006482c6              else
006482cf                  *(uint32_t*)eax_26 = arg2->cur_entropy_ptr;
006482cf              
006482d1              arg4->rowoffsets->dcval1 = 0;
006482dc              arg4->rowoffsets->dcval2 = 0;
006482e5              arg4->rowoffsets->dcval3 = 0;
006482ee              arg4->rowoffsets->dcval4 = 0;
006482f7              struct _ENTROPYSTRUCT* rowoffsets = arg4->rowoffsets;
006482fd              rowoffsets->bit_buffer_64 = 0;
00648300              *(uint32_t*)((char*)rowoffsets->bit_buffer_64)[4] = 0;
00648303              arg4->rowoffsets->bitbuf_bits_valid = 0;
0064830c              struct _ENTROPYSTRUCT* eax_28;
0064830c              eax_28 = arg2->unread_marker;
0064830f              arg4->rowoffsets->unread_marker = eax_28;
00648318              int32_t i = 1;
0064831d              int32_t* eax_29 = 0x28;
0064831d              
00648369              do
00648369              {
0064832d                  i += 5;
00648330                  *(uint32_t*)((char*)eax_29 + arg4->rowoffsets) = 0xffffffff;
00648339                  *(uint32_t*)(((char*)eax_29 + arg4->rowoffsets) + 0x28) = 0xffffffff;
00648343                  *(uint32_t*)(((char*)eax_29 + arg4->rowoffsets) + 0x50) = 0xffffffff;
0064834d                  *(uint32_t*)(((char*)eax_29 + arg4->rowoffsets) + 0x78) = 0xffffffff;
00648357                  *(uint32_t*)(((char*)eax_29 + arg4->rowoffsets) + 0xa0) = 0xffffffff;
0064835e                  eax_29 = &eax_29[0x32];
00648369              } while (i < 0x1ffb);
00648369              
00648379              *(uint32_t*)((i * 0x28) + arg4->rowoffsets) = 0xffffffff;
00648104          }
00648104          
0064810a          enum _IJLIOTYPE iotype = arg4->iotype;
0064810a          
00648118          if ((iotype == IJL_JFILE_READONEEIGHTH || iotype == IJL_JBUFF_READONEEIGHTH))
00648118          {
0064823b              if (arg4->progressive_found != 0)
0064823b              {
00648260                  var_2c = arg2;
00648267                  var_28 = arg3;
0064826b                  var_24 = arg4;
0064826f                  var_20 = 8;
0064827c                  result = sub_644ce0(var_2c, var_28, var_24, 8);
0064823b              }
0064823b              else
0064823b              {
0064823d                  var_2c = arg2;
00648244                  var_28 = arg3;
00648248                  var_24 = arg4;
0064824c                  var_20 = 8;
00648259                  result = sub_646b40(var_2c, var_28, var_24, 8);
0064823b              }
00648118          }
00648118          else if ((iotype == IJL_JFILE_READONEQUARTER || iotype == IJL_JBUFF_READONEQUARTER))
00648126          {
00648196              if (arg4->progressive_found != 0)
00648196              {
00648213                  var_2c = arg2;
0064821a                  var_28 = arg3;
0064821e                  var_24 = arg4;
00648222                  var_20 = 4;
0064822f                  result = sub_644ce0(var_2c, var_28, var_24, 4);
00648196              }
00648196              else
00648196              {
00648198                  var_2c = arg2;
0064819f                  var_28 = arg3;
006481a3                  var_24 = arg4;
006481a7                  var_20 = 4;
006481b4                  result = sub_646b40(var_2c, var_28, var_24, 4);
00648196              }
00648126          }
00648126          else if ((iotype == IJL_JFILE_READONEHALF || iotype == IJL_JBUFF_READONEHALF))
00648130          {
0064813a              if (arg4->progressive_found != 0)
0064813a              {
006481d3                  var_2c = arg2;
006481da                  var_28 = arg3;
006481de                  var_24 = arg4;
006481e2                  var_20 = 2;
006481ef                  result = sub_644ce0(var_2c, var_28, var_24, 2);
0064813a              }
0064813a              else
0064813a              {
00648140                  var_2c = arg2;
00648147                  var_28 = arg3;
0064814b                  var_24 = arg4;
0064814f                  var_20 = 2;
0064815c                  result = sub_646b40(var_2c, var_28, var_24, 2);
0064813a              }
00648130          }
00648130          else if (arg4->progressive_found != 0)
00648168          {
006481f3              var_2c = arg2;
006481fa              var_28 = arg3;
006481fe              var_24 = arg4;
00648202              var_20 = 1;
0064820f              result = sub_644ce0(var_2c, var_28, var_24, 1);
00648168          }
00648168          else
00648168          {
0064816e              var_2c = arg2;
00648175              var_28 = arg3;
00648179              var_24 = arg4;
0064817d              var_20 = 1;
0064818a              result = sub_646b40(var_2c, var_28, var_24, 1);
00648168          }
00648094      }
00648094      
006481b8      if (result == IJL_OK)
006481b8      {
006481ba          var_2c = arg2;
006481bd          DB_Align_Byte(var_2c);
006481b8      }
006481b8      
006481c6      *(uint32_t*)((char*)ctx + 0x18)(var_2c, var_28, var_24, var_20);
006481d2      return result;
00647fe0  }

0064851d                                                                                         8d 76 00                               .v.

00648520  void DB_Begin(struct _STATE* arg1)

00648520  {
00648529      if (arg1->file == 0)
00648529      {
0064854f          uint8_t* start_entropy_ptr = arg1->start_entropy_ptr;
00648552          int32_t entropy_buf_maxsize = arg1->entropy_buf_maxsize;
00648555          arg1->cur_entropy_ptr = start_entropy_ptr;
0064855a          arg1->end_entropy_ptr = &start_entropy_ptr[entropy_buf_maxsize];
0064855d          arg1->entropy_bytes_left = entropy_buf_maxsize;
00648529      }
00648529      else
00648529      {
00648531          arg1->cur_entropy_ptr = &arg1[1];
00648534          arg1->end_entropy_ptr = &arg1[1];
00648537          arg1->entropy_bytes_left = 0;
00648529      }
00648529      
00648540      arg1->bitbuf_bits_valid = 0;
00648543      arg1->unread_marker = 0;
00648546      arg1->bit_buffer_64 = 0;
00648548      *(uint32_t*)((char*)arg1->bit_buffer_64)[4] = 0;
0064854b      arg1->cur_scan_comp = 0;
00648520  }

00648562        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....

00648570  enum _IJLERR Buffer_Read_Bytes(struct _STATE* arg1)

00648570  {
006485a0      int32_t var_14;
006485a0      int32_t eax_2;
006485a0      
006485a0      if (_ownReadFile(arg1->file, &arg1->JPGBuffer, 0x1000, &var_14) == 0)
006485b1          eax_2 = var_14;
006485a0      else
006485a0      {
006485a2          eax_2 = var_14;
006485a2          
006485a8          if (eax_2 == 0)
006485aa              return 0xffffffe9;
006485a0      }
006485a0      
006485b5      arg1->entropy_bytes_left = eax_2;
006485bc      arg1->cur_entropy_ptr = &arg1->JPGBuffer;
006485bf      arg1->end_entropy_ptr = &arg1->JPGBuffer[eax_2];
006485ca      return 0;
00648570  }

006485cb                                   90 8d 74 26 00                                                             ..t&.

006485d0  enum _IJLERR DB_Get_Data(struct _STATE* arg1, unsigned long arg2, uint8_t** arg3)

006485d0  {
006485e2      *(uint32_t*)arg3 = nullptr;
006485ed      enum _IJLERR result;
006485ed      int32_t entropy_bytes_left;
006485ed      
006485ed      if (arg1->file == 0)
006485ed      {
00648642          entropy_bytes_left = arg1->entropy_bytes_left;
006485f6      label_6485f6:
006485f6          uint8_t* cur_entropy_ptr = arg1->cur_entropy_ptr;
006485f6          
006485fb          if (arg2 > entropy_bytes_left)
00648608              return 0xfffffffb;
00648608          
0064860f          arg1->cur_entropy_ptr = &cur_entropy_ptr[arg2];
00648612          result = IJL_OK;
00648614          arg1->entropy_bytes_processed += arg2;
00648617          arg1->entropy_bytes_left = (entropy_bytes_left - arg2);
0064861a          *(uint32_t*)arg3 = cur_entropy_ptr;
006485ed      }
006485ed      else
006485ed      {
006485ef          entropy_bytes_left = arg1->entropy_bytes_left;
006485ef          
006485f4          if (arg2 <= entropy_bytes_left)
006485f4              goto label_6485f6;
006485f4          
00648626          result = Buffer_Read_Bytes(arg1);
00648626          
0064862d          if (result == IJL_OK)
0064862d          {
0064862f              entropy_bytes_left = arg1->entropy_bytes_left;
0064862f              
00648634              if (arg2 > entropy_bytes_left)
00648641                  return 0xffffffe8;
00648641              
00648634              goto label_6485f6;
0064862d          }
006485ed      }
00648622      return result;
006485d0  }

00648647                       8b f6 8d bc 27 00 00 00 00                                                         ....'....

00648650  void DB_Align_Byte(struct _STATE* arg1)

00648650  {
00648654      arg1->bitbuf_bits_valid = 0;
00648650  }

0064865c                                                                                      8d 74 26 00                              .t&.

00648660  enum _IJLERR DB_Skip_To_Next_Marker(struct _STATE* arg1)

00648660  {
00648663      uint32_t ebx;
00648663      uint32_t var_10 = ebx;
0064866b      enum _IJLERR result = IJL_OK;
0064866d      uint8_t* cur_entropy_ptr = arg1->cur_entropy_ptr;
0064866d      
00648675      while (true)
00648675      {
00648675          if (cur_entropy_ptr < arg1->end_entropy_ptr)
00648675          {
0064868e          label_64868e:
0064868e              ebx = 0;
00648690              int32_t entropy_bytes_left = arg1->entropy_bytes_left;
00648690              
00648695              if (entropy_bytes_left > 0)
00648695              {
0064869a                  int32_t entropy_bytes_processed = arg1->entropy_bytes_processed;
0064869d                  uint8_t* cur_entropy_ptr_1 = arg1->cur_entropy_ptr;
0064869d                  
006486c1                  do
006486c1                  {
006486a0                      entropy_bytes_left -= 1;
006486a1                      entropy_bytes_processed += 1;
006486a2                      uint8_t* cur_entropy_ptr_2 = cur_entropy_ptr_1;
006486a4                      arg1->entropy_bytes_left = entropy_bytes_left;
006486a7                      cur_entropy_ptr_1 = &cur_entropy_ptr_1[1];
006486a8                      arg1->entropy_bytes_processed = entropy_bytes_processed;
006486ab                      arg1->cur_entropy_ptr = cur_entropy_ptr_1;
006486ab                      
006486b7                      if (((uint32_t)*(uint8_t*)cur_entropy_ptr_2) == 0xff)
006486b9                          ebx = 1;
006486b9                      
006486bd                      if (entropy_bytes_left <= 0)
006486bd                          break;
006486c1                  } while (ebx == 0);
00648695              }
00648695              
006486c5              if (entropy_bytes_left <= 0)
006486c5              {
00648702                  if (arg1->file == 0)
00648702                      break;
00648702                  
00648707                  result = Buffer_Read_Bytes(arg1);
00648707                  
0064870e                  if (result == IJL_OK)
0064870e                  {
00648712                      if (ebx != 0)
00648712                          goto label_6486c7;
00648712                      
00648714                      cur_entropy_ptr = arg1->cur_entropy_ptr;
00648717                      continue;
0064870e                  }
006486c5              }
006486c5              else
006486c5              {
006486c7              label_6486c7:
006486c7                  cur_entropy_ptr = arg1->cur_entropy_ptr;
006486ca                  ebx = ((uint32_t)*(uint8_t*)cur_entropy_ptr);
006486ca                  
006486d3                  if (ebx == 0xff)
006486d3                      continue;
006486d3                  else if (ebx == 0)
006486d7                  {
006486d9                      arg1->entropy_bytes_processed += 1;
006486dc                      cur_entropy_ptr = &cur_entropy_ptr[1];
006486dd                      arg1->cur_entropy_ptr = cur_entropy_ptr;
006486e0                      arg1->entropy_bytes_left -= 1;
006486e3                      continue;
006486d7                  }
006486c5              }
00648675          }
00648675          else
00648675          {
0064867c              if (arg1->file == 0)
006486f0                  return 0xfffffffb;
006486f0              
00648685              result = Buffer_Read_Bytes(arg1);
00648685              
0064868c              if (result == IJL_OK)
0064868c                  goto label_64868e;
00648675          }
00648675          
006486fc          return result;
00648675      }
00648675      
0064872c      return 0xfffffffb;
00648660  }

006486e5                 8d 74 26 00 8d bc 27 00 00 00 00                                                       .t&...'....
0064871c                                                                                      8d 74 26 00                              .t&.
0064872d                                         8d 76 00                                                               .v.

00648730  enum _IJLERR Set_Decode_Fast_Path(struct _JPEG_PROPERTIES* arg1)

00648730  {
00648743      enum _IJL_COLOR JPGColor = arg1->JPGColor;
00648746      void* ctx = arg1->state.ctx;
0064874d      char var_18 = 1;
0064874d      
00648755      if (JPGColor == IJL_G)
00648755      {
006494a2          var_18 = 0;
006494a6          arg1->cconversion_reqd = 0;
00648755      }
00648755      else
00648755      {
0064875b          void* DIBColor = JPGColor;
0064875b          
00648774          if (((DIBColor == 1 || DIBColor == 5) || DIBColor == 0xff))
00648774          {
006494a2              var_18 = 0;
006494a6              arg1->cconversion_reqd = 0;
00648774          }
00648774          else
00648774          {
0064877a              DIBColor = arg1->DIBColor;
0064877a              
00648789              if ((DIBColor == 4 || DIBColor == 3))
00648789              {
006494a2                  var_18 = 0;
006494a6                  arg1->cconversion_reqd = 0;
00648789              }
00648789              else
0064878f                  arg1->cconversion_reqd = 1;
00648774          }
00648755      }
00648755      
0064879a      int32_t ebp = 0;
0064879c      char var_1c = 0;
006487a0      int32_t ebx = 0;
006487a2      int32_t ncomps = arg1->jframe.ncomps;
006487a8      arg1->upsampling_reqd = 0;
006487ad      arg1->jframe.max_hsampling = 0;
006487b3      arg1->jframe.max_vsampling = 0;
006487b3      
006487be      if (ncomps > 0)
006487be      {
006487c4          struct _FRAME_COMPONENT* comps_7 = arg1->jframe.comps;
006487cc          int32_t edx_1 = 0;
006487cf          int32_t var_28_1 = 0;
006487d7          int32_t ecx = 0;
006487d7          
00648836          do
00648836          {
006487e0              int32_t ebx_1 = *(uint32_t*)(&comps_7->hsampling + edx_1);
006487e0              
006487ea              if (var_28_1 < ebx_1)
006487ea              {
006487ec                  var_28_1 = ebx_1;
006487f0                  arg1->jframe.max_hsampling = ebx_1;
006487ea              }
006487ea              
006487f6              int32_t ebx_2 = *(uint32_t*)(&comps_7->vsampling + edx_1);
006487f6              
006487fc              if (ebp < ebx_2)
006487fc              {
006487fe                  ebp = ebx_2;
00648800                  arg1->jframe.max_vsampling = ebx_2;
006487fc              }
006487fc              
00649487              if ((*(uint32_t*)(&comps_7->hsampling + edx_1) != 1 || *(uint32_t*)(&comps_7->vsampling + edx_1) != 1))
00649487              {
00648819                  if (arg1->DIBColor == IJL_YCBCR)
00648819                  {
0064946a                      var_1c = 0;
0064946e                      arg1->upsampling_reqd = 0;
00648819                  }
00648819                  else
00648819                  {
00648821                      var_1c = 1;
00648825                      arg1->upsampling_reqd = 1;
00648819                  }
00649487              }
00649487              
0064882c              edx_1 += 0x10;
0064882f              ecx += 1;
00648836          } while (ecx < ncomps);
00648836          
00648838          ebx = var_28_1;
006487be      }
006487be      
00648840      int32_t jinterleaveType = arg1->jinterleaveType;
00648846      int32_t ebx_8;
00648846      int32_t ebp_3;
00648846      
00648846      if (jinterleaveType == 1)
00648846      {
0064944f          arg1->jframe.MCUheight = 8;
00649455          ebx_8 = (ebx * 8);
00649459          arg1->jframe.MCUwidth = 8;
00649461          ebp_3 = (ebp * 8);
00648846      }
00648846      else
00648846      {
00648850          ebx_8 = (ebx * 8);
00648852          arg1->jframe.MCUwidth = ebx_8;
0064885c          ebp_3 = (ebp * 8);
0064885e          arg1->jframe.MCUheight = ebp_3;
00648846      }
00648846      
0064886c      int32_t temp0 = (((int64_t)((arg1->JPGWidth + ebx_8) - 1)) / ebx_8);
00648873      int32_t eax_5 = ((arg1->JPGHeight + ebp_3) - 1);
00648877      arg1->numxMCUs = temp0;
0064887b      int32_t temp0_1 = (((int64_t)eax_5) / ebp_3);
0064887d      arg1->numyMCUs = temp0_1;
00648880      arg1->jframe.horMCU = temp0;
0064888c      arg1->jframe.totalMCU = (temp0_1 * temp0);
00648892      arg1->fast_processing = IJL_NO_CC_OR_US;
006493f4      enum _IJL_COLOR comps;
006493f4      
006493f4      if ((ncomps == 3 && (JPGColor == IJL_YCBCR && arg1->DIBColor == IJL_YCBCR)))
006493f4      {
006493fa          comps = arg1->jframe.comps;
00649406          enum _IJL_COLOR comps_8 = comps;
00649406          
0064943f          if ((((((*(uint32_t*)(comps + 4) != 2 || *(uint32_t*)(comps + 8) != 1) || *(uint32_t*)(comps + 0x14) != 1) || *(uint32_t*)(comps + 0x18) != 1) || *(uint32_t*)(comps + 0x24) != 1) || *(uint32_t*)(comps + 0x28) != 1))
00649418              return 0xfffffff8;
006493f4      }
006493f4      
006488ad      if ((ncomps <= 0 || ncomps > 0xff))
00648a16          return 0xfffffff2;
00648a16      
006488b5      int32_t progressive_found;
006488b5      
006488b5      if (jinterleaveType != 0)
006488b7          progressive_found = arg1->progressive_found;
006488b7      
006488bf      if ((jinterleaveType == 0 || progressive_found != 0))
006488bf      {
006488c5          comps = var_1c;
006488c5          
006488cb          if (comps == 0)
006488cb          {
006488f5          label_6488f5:
006488f5              comps = var_1c;
006488f5              
006488fb              if (comps == 0)
006488fb              {
00648937              label_648937:
00648937                  comps = var_1c;
00648937                  
0064893d                  if (comps != 0)
0064893d                  {
00648967                  label_648967:
00648967                      comps = var_1c;
00648967                      
0064896d                      if (comps == 0)
0064896d                      {
00648973                          comps = var_18;
00648973                          
00648979                          if (comps == 0)
00648979                          {
006493af                              if ((ncomps == 1 && arg1->DIBChannels == 1))
006493af                              {
006493b9                                  *(uint32_t*)((char*)ctx + 0xa0) = _Y_111_to_Y_MCU;
006493c3                                  ncomps = arg1->jframe.ncomps;
006493af                              }
006493af                              
00649390                              if ((ncomps == 1 && arg1->DIBChannels != 1))
0064939a                                  *(uint32_t*)((char*)ctx + 0xa0) = _Output_Interleave_General_MCU;
00649390                              else if (ncomps == 2)
0064937b                                  *(uint32_t*)((char*)ctx + 0xa0) = _Output_Interleave_General_MCU;
00648994                              else if ((ncomps == 3 && arg1->DIBChannels == 1))
00649368                                  *(uint32_t*)((char*)ctx + 0xa0) = _Output_Interleave_General_MCU;
0064935e                              else if ((ncomps == 3 && arg1->DIBChannels == 2))
006492ea                              {
006492f0                                  struct _FRAME_COMPONENT* comps_6 = arg1->jframe.comps;
006492f0                                  
00649338                                  if ((comps_6->hsampling == 2 && (comps_6->vsampling == 1 && (*(int32_t*)((char*)comps_6 + 0x14) == 1 && (*(int32_t*)((char*)comps_6 + 0x18) == 1 && (*(int32_t*)((char*)comps_6 + 0x24) == 1 && *(int32_t*)((char*)comps_6 + 0x28) == 1))))))
00649338                                  {
0064933e                                      arg1->fast_processing = IJL_YCBCR_YCBYCR;
00649349                                      *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_422_to_YCbYCr_MCU;
00649338                                  }
006492ea                              }
006492ea                              else if ((ncomps == 3 && arg1->DIBChannels == 3))
006492a2                              {
006492ae                                  if (arg1->DIBColor == IJL_BGR)
006492ae                                  {
006492ca                                      arg1->fast_processing = IJL_NO_CC_OR_US;
006492d5                                      *(uint32_t*)((char*)ctx + 0xa0) = _Output_Interleave_General_MCU;
006492ae                                  }
006492ae                                  else
006492ae                                  {
006492b0                                      arg1->fast_processing = IJL_111_OTHER_111_OTHER;
006492bb                                      *(uint32_t*)((char*)ctx + 0xa0) = _OTHER_111_to_OTHER_MCU;
006492ae                                  }
006492a2                              }
006492a2                              else if ((ncomps == 3 && arg1->DIBChannels == 4))
00649261                              {
0064926d                                  if (arg1->DIBColor == IJL_RGBA_FPX)
0064926d                                  {
00649282                                      arg1->fast_processing = IJL_111_RGB_1111_RGBA_FPX;
0064928d                                      *(uint32_t*)((char*)ctx + 0xa0) = _OTHER_111_to_OTHER4_MCU;
0064926d                                  }
0064926d                                  else
00649273                                      *(uint32_t*)((char*)ctx + 0xa0) = _Output_Interleave_General_MCU;
00649261                              }
00649261                              else if ((ncomps == 4 && arg1->DIBChannels == 3))
0064923b                              {
00649241                                  arg1->fast_processing = IJL_NO_CC_OR_US;
0064924c                                  *(uint32_t*)((char*)ctx + 0xa0) = _Output_Interleave_General_MCU;
0064923b                              }
0064923b                              else if ((ncomps == 4 && arg1->DIBChannels == 4))
00649215                              {
0064921b                                  arg1->fast_processing = IJL_1111_RGBA_FPX_1111_RGBA_FPX;
00649226                                  *(uint32_t*)((char*)ctx + 0xa0) = _OTHER_1111_to_OTHER_MCU;
00649215                              }
00648979                          }
0064896d                      }
0064893d                  }
0064893d                  else
0064893d                  {
0064893f                      comps = var_18;
0064893f                      
00648945                      if (comps == 0)
00648945                          goto label_648967;
00648945                      
006491c4                      if ((ncomps == 3 && arg1->DIBChannels == 3))
006491c4                      {
006491ca                          enum _IJL_COLOR DIBColor_2 = arg1->DIBColor;
006491ca                          
006491d0                          if (DIBColor_2 == IJL_RGB)
006491d0                          {
006491f5                              arg1->fast_processing = IJL_111_YCBCR_111_RGB;
00649200                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_111_to_RGB_MCU;
006491d0                          }
006491d0                          else if (DIBColor_2 == IJL_BGR)
006491d5                          {
006491db                              arg1->fast_processing = IJL_111_YCBCR_111_BGR;
006491e6                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_111_to_BGR_MCU;
006491d5                          }
006491c4                      }
006491c4                      else if ((ncomps == 3 && arg1->DIBChannels == 4))
00649192                      {
0064919e                          if (arg1->DIBColor == IJL_RGBA_FPX)
0064919e                          {
006491a4                              arg1->fast_processing = IJL_111_YCBCR_1111_RGBA_FPX;
006491af                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_111_to_RGBA_FPX_MCU;
0064919e                          }
00649192                      }
00649192                      else if ((ncomps == 4 && (arg1->DIBChannels == 4 && arg1->DIBColor == IJL_RGBA_FPX)))
0064916c                      {
00649172                          arg1->fast_processing = IJL_1111_YCBCRA_FPX_1111_RGBA_FPX;
0064917d                          *(uint32_t*)((char*)ctx + 0xa0) = _YCbCrA_FPX_1111_to_RGBA_FPX_MCU;
0064916c                      }
0064893d                  }
006488fb              }
006488fb              else
006488fb              {
006488fd                  comps = var_18;
006488fd                  
00648903                  if (comps != 0)
00648903                      goto label_648937;
00648903                  
00649124                  if ((ncomps == 3 && arg1->DIBChannels == 1))
00649124                  {
00649132                      if (arg1->progressive_found != 0)
0064914b                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
00649132                      else
00649138                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
00649124                  }
00649124                  else if ((ncomps == 3 && arg1->DIBChannels == 3))
00648f77                  {
00648f83                      if (arg1->DIBColor != IJL_BGR)
00648f83                      {
00648f89                          struct _FRAME_COMPONENT* comps_5 = arg1->jframe.comps;
00648f8f                          int32_t hsampling_4 = comps_5->hsampling;
00648f8f                          
0064908b                          if ((((((hsampling_4 == 2 && comps_5->vsampling == 2) && *(int32_t*)((char*)comps_5 + 0x14) == 1) && *(int32_t*)((char*)comps_5 + 0x18) == 1) && *(int32_t*)((char*)comps_5 + 0x24) == 1) && *(int32_t*)((char*)comps_5 + 0x28) == 1))
0064908b                          {
00649091                              arg1->fast_processing = IJL_411_OTHER_111_OTHER;
00649098                              enum _UPSAMPLING_TYPE upsampling_type_9 = arg1->upsampling_type;
00649098                              
006490a0                              if (upsampling_type_9 == IJL_BOX_FILTER)
006490a6                                  *(uint32_t*)((char*)ctx + 0xa0) = _OTHER_411_to_OTHER_MCU;
006490a0                              else if (upsampling_type_9 == IJL_TRIANGLE_FILTER)
006490b8                              {
006490c6                                  if (arg1->progressive_found != 0)
006490df                                      *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
006490c6                                  else
006490cc                                      *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
006490b8                              }
0064908b                          }
0064908b                          else if ((((((hsampling_4 == 2 && comps_5->vsampling == 1) && *(int32_t*)((char*)comps_5 + 0x14) == 1) && *(int32_t*)((char*)comps_5 + 0x18) == 1) && *(int32_t*)((char*)comps_5 + 0x24) == 1) && *(int32_t*)((char*)comps_5 + 0x28) == 1))
00648ff6                          {
00648ff8                              arg1->fast_processing = IJL_422_OTHER_111_OTHER;
00648fff                              enum _UPSAMPLING_TYPE upsampling_type_8 = arg1->upsampling_type;
00648fff                              
00649007                              if (upsampling_type_8 == IJL_BOX_FILTER)
0064900d                                  *(uint32_t*)((char*)ctx + 0xa0) = _OTHER_422_to_OTHER_MCU;
00649007                              else if (upsampling_type_8 == IJL_TRIANGLE_FILTER)
0064901f                              {
0064902d                                  if (arg1->progressive_found != 0)
00649046                                      *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
0064902d                                  else
00649033                                      *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
0064901f                              }
00648ff6                          }
00648ff6                          else if (arg1->progressive_found != 0)
00648fc1                              *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
00648fa8                          else
00648fae                              *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
00648f83                      }
00648f83                      else if (arg1->progressive_found != 0)
0064910f                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
006490f6                      else
006490fc                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
00648f77                  }
00648f77                  else if ((ncomps == 3 && arg1->DIBChannels == 4))
00648f3b                  {
00648f49                      if (arg1->progressive_found != 0)
00648f62                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
00648f49                      else
00648f4f                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
00648f3b                  }
00648f3b                  else if ((ncomps == 4 && arg1->DIBChannels == 3))
00648eff                  {
00648f0d                      if (arg1->progressive_found != 0)
00648f26                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
00648f0d                      else
00648f13                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
00648eff                  }
00648eff                  else if ((ncomps == 4 && arg1->DIBChannels == 4))
00648ec3                  {
00648ed1                      if (arg1->progressive_found != 0)
00648eea                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
00648ed1                      else
00648ed7                          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
00648ec3                  }
006488fb              }
006488cb          }
006488cb          else
006488cb          {
006488cd              comps = var_18;
006488cd              
006488d3              if (comps == 0)
006488d3                  goto label_6488f5;
006488d3              
00648c86              if ((ncomps == 3 && arg1->DIBChannels == 3))
00648c86              {
00648c8c                  enum _IJL_COLOR DIBColor_1 = arg1->DIBColor;
00648c8c                  
00648c92                  if (DIBColor_1 == IJL_RGB)
00648c92                  {
00648daf                      struct _FRAME_COMPONENT* comps_4 = arg1->jframe.comps;
00648db5                      int32_t hsampling_3 = comps_4->hsampling;
00648db5                      
00648e77                      if ((((((hsampling_3 == 2 && comps_4->vsampling == 2) && *(int32_t*)((char*)comps_4 + 0x14) == 1) && *(int32_t*)((char*)comps_4 + 0x18) == 1) && *(int32_t*)((char*)comps_4 + 0x24) == 1) && *(int32_t*)((char*)comps_4 + 0x28) == 1))
00648e77                      {
00648e7d                          enum _UPSAMPLING_TYPE upsampling_type_7 = arg1->upsampling_type;
00648e7d                          
00648e85                          if (upsampling_type_7 == IJL_BOX_FILTER)
00648e85                          {
00648e87                              arg1->fast_processing = IJL_411_YCBCR_111_RGB;
00648e92                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_411_to_RGB_MCU;
00648e85                          }
00648e85                          else if (upsampling_type_7 == IJL_TRIANGLE_FILTER)
00648eae                              *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648e77                      }
00648e77                      else if ((((((hsampling_3 == 2 && comps_4->vsampling == 1) && *(int32_t*)((char*)comps_4 + 0x14) == 1) && *(int32_t*)((char*)comps_4 + 0x18) == 1) && *(int32_t*)((char*)comps_4 + 0x24) == 1) && *(int32_t*)((char*)comps_4 + 0x28) == 1))
00648dff                      {
00648e01                          enum _UPSAMPLING_TYPE upsampling_type_6 = arg1->upsampling_type;
00648e01                          
00648e09                          if (upsampling_type_6 == IJL_BOX_FILTER)
00648e09                          {
00648e0b                              arg1->fast_processing = IJL_422_YCBCR_111_RGB;
00648e16                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_422_to_RGB_MCU;
00648e09                          }
00648e09                          else if (upsampling_type_6 == IJL_TRIANGLE_FILTER)
00648e32                              *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648dff                      }
00648dff                      else
00648dca                          *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648c92                  }
00648c92                  else if (DIBColor_1 == IJL_BGR)
00648c9b                  {
00648ca1                      struct _FRAME_COMPONENT* comps_3 = arg1->jframe.comps;
00648ca7                      int32_t hsampling_2 = comps_3->hsampling;
00648ca7                      
00648d69                      if ((((((hsampling_2 == 2 && comps_3->vsampling == 2) && *(int32_t*)((char*)comps_3 + 0x14) == 1) && *(int32_t*)((char*)comps_3 + 0x18) == 1) && *(int32_t*)((char*)comps_3 + 0x24) == 1) && *(int32_t*)((char*)comps_3 + 0x28) == 1))
00648d69                      {
00648d6f                          enum _UPSAMPLING_TYPE upsampling_type_5 = arg1->upsampling_type;
00648d6f                          
00648d77                          if (upsampling_type_5 == IJL_BOX_FILTER)
00648d77                          {
00648d79                              arg1->fast_processing = IJL_411_YCBCR_111_BGR;
00648d84                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_411_to_BGR_MCU;
00648d77                          }
00648d77                          else if (upsampling_type_5 == IJL_TRIANGLE_FILTER)
00648da0                              *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648d69                      }
00648d69                      else if ((((((hsampling_2 == 2 && comps_3->vsampling == 1) && *(int32_t*)((char*)comps_3 + 0x14) == 1) && *(int32_t*)((char*)comps_3 + 0x18) == 1) && *(int32_t*)((char*)comps_3 + 0x24) == 1) && *(int32_t*)((char*)comps_3 + 0x28) == 1))
00648cf1                      {
00648cf3                          enum _UPSAMPLING_TYPE upsampling_type_4 = arg1->upsampling_type;
00648cf3                          
00648cfb                          if (upsampling_type_4 == IJL_BOX_FILTER)
00648cfb                          {
00648cfd                              arg1->fast_processing = IJL_422_YCBCR_111_BGR;
00648d08                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_422_to_BGR_MCU;
00648cfb                          }
00648cfb                          else if (upsampling_type_4 == IJL_TRIANGLE_FILTER)
00648d24                              *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648cf1                      }
00648cf1                      else
00648cbc                          *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648c9b                  }
00648c86              }
00648c86              else if ((ncomps == 3 && arg1->DIBChannels == 4))
00648b60              {
00648b6c                  if (arg1->DIBColor == IJL_RGBA_FPX)
00648b6c                  {
00648b72                      struct _FRAME_COMPONENT* comps_2 = arg1->jframe.comps;
00648b78                      int32_t hsampling_1 = comps_2->hsampling;
00648b78                      
00648c3a                      if ((((((hsampling_1 == 2 && comps_2->vsampling == 2) && *(int32_t*)((char*)comps_2 + 0x14) == 1) && *(int32_t*)((char*)comps_2 + 0x18) == 1) && *(int32_t*)((char*)comps_2 + 0x24) == 1) && *(int32_t*)((char*)comps_2 + 0x28) == 1))
00648c3a                      {
00648c40                          enum _UPSAMPLING_TYPE upsampling_type_3 = arg1->upsampling_type;
00648c40                          
00648c48                          if (upsampling_type_3 == IJL_BOX_FILTER)
00648c48                          {
00648c4a                              arg1->fast_processing = IJL_411_YCBCR_1111_RGBA_FPX;
00648c55                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_411_to_RGBA_FPX_MCU;
00648c48                          }
00648c48                          else if (upsampling_type_3 == IJL_TRIANGLE_FILTER)
00648c71                              *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648c3a                      }
00648c3a                      else if ((((((hsampling_1 == 2 && comps_2->vsampling == 1) && *(int32_t*)((char*)comps_2 + 0x14) == 1) && *(int32_t*)((char*)comps_2 + 0x18) == 1) && *(int32_t*)((char*)comps_2 + 0x24) == 1) && *(int32_t*)((char*)comps_2 + 0x28) == 1))
00648bc2                      {
00648bc4                          enum _UPSAMPLING_TYPE upsampling_type_2 = arg1->upsampling_type;
00648bc4                          
00648bcc                          if (upsampling_type_2 == IJL_BOX_FILTER)
00648bcc                          {
00648bce                              arg1->fast_processing = IJL_422_YCBCR_1111_RGBA_FPX;
00648bd9                              *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_422_to_RGBA_FPX_MCU;
00648bcc                          }
00648bcc                          else if (upsampling_type_2 == IJL_TRIANGLE_FILTER)
00648bf5                              *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648bc2                      }
00648bc2                      else
00648b8d                          *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648b6c                  }
00648b60              }
00648b60              else if ((ncomps == 4 && (arg1->DIBChannels == 4 && arg1->DIBColor == IJL_RGBA_FPX)))
00648a25              {
00648a27                  struct _FRAME_COMPONENT* comps_1 = arg1->jframe.comps;
00648a2d                  int32_t hsampling = comps_1->hsampling;
00648a2d                  
00648b14                  if ((((((((hsampling == 2 && comps_1->vsampling == 1) && *(int32_t*)((char*)comps_1 + 0x14) == 1) && *(int32_t*)((char*)comps_1 + 0x18) == 1) && *(int32_t*)((char*)comps_1 + 0x24) == 1) && *(int32_t*)((char*)comps_1 + 0x28) == 1) && *(int32_t*)((char*)comps_1 + 0x34) == 2) && *(int32_t*)((char*)comps_1 + 0x38) == 1))
00648b14                  {
00648b1a                      enum _UPSAMPLING_TYPE upsampling_type_1 = arg1->upsampling_type;
00648b1a                      
00648b22                      if (upsampling_type_1 == IJL_BOX_FILTER)
00648b22                      {
00648b24                          arg1->fast_processing = IJL_4224_YCBCRA_FPX_1111_RGBA_FPX;
00648b2f                          *(uint32_t*)((char*)ctx + 0xa0) = _YCbCrA_FPX_4224_to_RGBA_FPX_MCU;
00648b22                      }
00648b22                      else if (upsampling_type_1 == IJL_TRIANGLE_FILTER)
00648b4b                          *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648b14                  }
00648b14                  else if ((((((((hsampling == 2 && comps_1->vsampling == 2) && *(int32_t*)((char*)comps_1 + 0x14) == 1) && *(int32_t*)((char*)comps_1 + 0x18) == 1) && *(int32_t*)((char*)comps_1 + 0x24) == 1) && *(int32_t*)((char*)comps_1 + 0x28) == 1) && *(int32_t*)((char*)comps_1 + 0x34) == 2) && *(int32_t*)((char*)comps_1 + 0x38) == 2))
00648a84                  {
00648a86                      enum _UPSAMPLING_TYPE upsampling_type = arg1->upsampling_type;
00648a86                      
00648a8e                      if (upsampling_type == IJL_BOX_FILTER)
00648a8e                      {
00648a90                          arg1->fast_processing = IJL_4114_YCBCRA_FPX_1111_RGBA_FPX;
00648a9b                          *(uint32_t*)((char*)ctx + 0xa0) = _YCbCrA_FPX_4114_to_RGBA_FPX_MCU;
00648a8e                      }
00648a8e                      else if (upsampling_type == IJL_TRIANGLE_FILTER)
00648ab7                          *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648a84                  }
00648a84                  else
00648a42                      *(uint32_t*)((char*)ctx + 0xa0) = _US_CC_General_YCbCr_MCU;
00648a25              }
006488cb          }
006488bf      }
006488bf      else if (arg1->DIBColor == IJL_YCBCR)
006493d2          *(uint32_t*)((char*)ctx + 0xa0) = _YCbCr_422_to_YCbYCr_NI_MCU;
006489d8      else if (progressive_found != 0)
006489f6          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_P_MCU;
006489e0      else
006489e6          *(uint32_t*)((char*)ctx + 0xa0) = _US_General_MCU;
006489e6      
00648a09      return 0;
00648730  }

0064947a                                                                                8d b6 00 00 00 00                            ......
00649492                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
006494b2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....

006494c0  char* sub_6494c0(char arg1, int32_t* arg2)

006494c0  {
006494c4      char* eax = *(uint32_t*)arg2;
006494c9      *(uint32_t*)arg2 = &eax[1];
006494cb      *(uint8_t*)eax = 0xff;
006494ce      char* result = *(uint32_t*)arg2;
006494d3      *(uint32_t*)arg2 = &result[1];
006494d5      int32_t* edx;
006494d5      edx = arg1;
006494d9      *(uint8_t*)result = edx;
006494db      return result;
006494c0  }

006494dc                                                                                      8d 74 26 00                              .t&.

006494e0  char** sub_6494e0(int32_t arg1, char** arg2)

006494e0  {
006494e1      int32_t esi;
006494e1      int32_t var_8 = esi;
006494e2      int32_t var_c = esi;
006494f0      char* edi = *(uint32_t*)arg2;
006494f5      *(uint32_t*)arg2 = &edi[1];
006494f7      *(uint8_t*)edi = ((int8_t)(arg1 >> 8));
006494f9      char* esi_2 = *(uint32_t*)arg2;
006494fe      *(uint32_t*)arg2 = &esi_2[1];
00649500      *(uint8_t*)esi_2 = arg1;
00649507      return arg2;
006494e0  }

00649508                          90 8d b4 26 00 00 00 00                                                          ...&....

00649510  enum _IJLERR EP_Write_APP0(struct _JPEG_PROPERTIES* arg1)

00649510  {
00649519      void* ctx = arg1->state.ctx;
00649523      void var_20;
00649523      void* var_24 = &var_20;
00649536      sub_6494c0(0xe0, &var_24);
0064954a      sub_6494e0(0x10, &var_24);
0064954f      void* ecx = var_24;
00649556      var_24 = ((char*)ecx + 1);
0064955a      *(uint8_t*)ecx = 0x4a;
0064955d      void* edx_1 = var_24;
00649564      var_24 = ((char*)edx_1 + 1);
0064956a      *(uint8_t*)edx_1 = 0x46;
0064956c      void* ecx_1 = var_24;
00649573      var_24 = ((char*)ecx_1 + 1);
00649577      *(uint8_t*)ecx_1 = 0x49;
0064957a      void* ecx_2 = var_24;
00649581      var_24 = ((char*)ecx_2 + 1);
00649585      *(uint8_t*)ecx_2 = 0x46;
00649587      void* edx_4 = var_24;
0064958e      var_24 = ((char*)edx_4 + 1);
00649592      *(uint8_t*)edx_4 = 0;
006495a7      sub_6494e0(((uint32_t)arg1->jfif_app0_version), &var_24);
006495ac      uint8_t jfif_app0_units = arg1->jfif_app0_units;
006495b2      uint8_t* ecx_3 = var_24;
006495b9      var_24 = &ecx_3[1];
006495bd      *(uint8_t*)ecx_3 = jfif_app0_units;
006495d1      sub_6494e0(((uint32_t)arg1->jfif_app0_Xdensity), &var_24);
006495e8      sub_6494e0(((uint32_t)arg1->jfif_app0_Ydensity), &var_24);
006495ed      void* ecx_4 = var_24;
006495f6      var_24 = ((char*)ecx_4 + 1);
00649600      *(uint8_t*)ecx_4 = 0;
00649602      void* ecx_5 = var_24;
00649609      var_24 = ((char*)ecx_5 + 1);
0064960d      *(uint8_t*)ecx_5 = 0;
0064962a      return *(uint32_t*)((char*)ctx + 0x5c)(&var_20, 0x12, &arg1->state);
00649510  }

0064962b                                   90 8d 74 26 00                                                             ..t&.

00649630  enum _IJLERR EP_Write_COM(struct _JPEG_PROPERTIES* arg1)

00649630  {
00649633      int32_t var_8 = 0xffffffff;
00649635      int32_t var_c = 0x907b0c;
0064963a      int32_t (* var_10)() = j__except_handler3;
00649645      TEB* fsbase;
00649645      int32_t var_14 = *(uint32_t*)fsbase;
00649646      *(uint32_t*)fsbase = &var_14;
00649653      void* ctx;
00649653      int32_t* var_1c = &ctx;
00649668      ctx = arg1->state.ctx;
0064966e      int32_t var_8_1 = 0;
00649677      void* var_a0 = nullptr;
0064967d      int32_t result = 0;
0064968b      int32_t var_8_2;
0064968b      
0064968b      if (arg1->jpeg_comment == 0)
0064968b      {
006497e6          char* lpString = "Intel(R) JPEG Library, version %…";
006497f6          void var_88;
006497f6          var_a0 = &var_88;
006497ff          __g_memzero(&var_88, 0x50);
00649808          _ownGetLibVersion();
0064980d          void* var_38_1 = &data_8322e0;
00649817          int32_t eax_7 = lstrlenA(lpString);
00649839          int32_t eax_9 = nullptr(((char*)var_a0 + 4), lpString, *(uint32_t*)((char*)var_38_1 + 0x14), &ctx);
0064985a          sub_6494c0(0xfe, &var_a0);
00649873          sub_6494e0((eax_9 + 3), &var_a0);
00649873          
00649881          if (eax_9 <= eax_7)
0064976b              var_8_2 = 0xffffffff;
00649881          else
00649881          {
006498a5              int32_t result_2 = *(uint32_t*)((char*)ctx + 0x5c)(&var_88, (eax_9 + 5), &arg1->state, &ctx);
006498ab              result = result_2;
006498ab              
006498b3              if (result_2 == 0)
0064976b                  var_8_2 = 0xffffffff;
00649881          }
0064968b      }
0064968b      else
0064968b      {
00649691          uint32_t jpeg_comment_size = ((uint32_t)arg1->jpeg_comment_size);
00649691          
0064969a          if (jpeg_comment_size == 0)
0064976b              var_8_2 = 0xffffffff;
0064969a          else
0064969a          {
006496a6              if (jpeg_comment_size > 0xfffb)
006496a6              {
006496ad                  arg1->jpeg_comment_size = 0xfffb;
006496b4                  jpeg_comment_size = 0xfffb;
006496a6              }
006496a6              
006496c2              void** var_a8_1 = &ctx;
006496c4              void* eax_2 = operator new((jpeg_comment_size + 4));
006496cc              var_a0 = eax_2;
006496cc              
006496d4              if (eax_2 != 0)
006496d4              {
006496e5                  void* var_94 = eax_2;
006496f3                  __g_memzero(eax_2, (jpeg_comment_size + 4));
00649708                  sub_6494c0(0xfe, &var_94);
00649721                  sub_6494e0((jpeg_comment_size + 2), &var_94);
00649729                  char* i = nullptr;
0064972b                  int32_t var_90_1 = 0;
0064972b                  
00649741                  if (((uint32_t)arg1->jpeg_comment_size) > 0)
00649741                  {
00649767                      do
00649767                      {
00649749                          uint32_t ecx_1;
00649749                          ecx_1 = *(uint8_t*)(i + arg1->jpeg_comment);
00649752                          *(uint8_t*)(i + var_94) = ecx_1;
00649755                          i = &i[1];
00649758                          char* i_1 = i;
00649767                      } while (i < ((uint32_t)arg1->jpeg_comment_size));
00649741                  }
00649741                  
006497c4                  int32_t result_1 = *(uint32_t*)((char*)ctx + 0x5c)(var_a0, (jpeg_comment_size + 4), &arg1->state, &ctx);
006497ca                  result = result_1;
006497ca                  
006497d2                  if (result_1 == 0)
006497d2                  {
006497da                      void** var_a8_6 = &ctx;
006497dc                      operator delete(var_a0);
0064976b                      var_8_2 = 0xffffffff;
006497d2                  }
006496d4              }
006496d4              else
006496d6                  result = 0xfffffffb;
0064969a          }
0064968b      }
00649787      *(uint32_t*)fsbase = var_14;
00649791      return result;
00649630  }

00649792                                                        8b 65 e8 c7 85 68 ff ff ff e2 ff ff ff c7                    .e...h........
006497a0  45 fc ff ff ff ff eb ca                                                                          E.......
006498be                                                                                            b8 01                                ..
006498c0  00 00 00 c3 8d b6 00 00 00 00 8d bf 00 00 00 00                                                  ................

006498d0  enum _IJLERR EP_Write_SOI(struct _STATE* arg1)

006498d0  {
006498d9      void* ctx = arg1->ctx;
006498e0      void var_10;
006498e0      void* var_14 = &var_10;
006498f3      sub_6494c0(0xd8, &var_14);
00649913      return *(uint32_t*)((char*)ctx + 0x5c)(&var_10, 2, arg1);
006498d0  }

00649914                                                              8d b6 00 00 00 00 8d bf 00 00 00 00                      ............

00649920  enum _IJLERR EP_Write_EOI(struct _STATE* arg1)

00649920  {
00649929      void* ctx = arg1->ctx;
00649930      void var_10;
00649930      void* var_14 = &var_10;
00649943      sub_6494c0(0xd9, &var_14);
00649963      return *(uint32_t*)((char*)ctx + 0x5c)(&var_10, 2, arg1);
00649920  }

00649964              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

00649970  enum _IJLERR EP_Write_SOF(struct _STATE* arg1, struct _FRAME* arg2)

00649970  {
00649988      void* ctx = arg1->ctx;
0064998f      void var_324;
0064998f      void* var_18 = &var_324;
00649996      int32_t ncomps = arg2->ncomps;
006499af      sub_6494c0(0xc0, &var_18);
006499c2      sub_6494e0(((ncomps * 3) + 8), &var_18);
006499c7      void* ecx = var_18;
006499d1      var_18 = ((char*)ecx + 1);
006499d8      *(uint8_t*)ecx = 8;
006499ec      sub_6494e0(arg2->height, &var_18);
00649a02      sub_6494e0(arg2->width, &var_18);
00649a07      char eax = arg2->ncomps;
00649a0a      void* ecx_1 = var_18;
00649a14      var_18 = ((char*)ecx_1 + 1);
00649a1b      *(uint8_t*)ecx_1 = eax;
00649a1b      
00649a23      if (arg2->ncomps == 1)
00649a23      {
00649b15          void* eax_8 = var_18;
00649b1f          var_18 = ((char*)eax_8 + 1);
00649b26          *(uint8_t*)eax_8 = 0;
00649b29          void* edi_4 = var_18;
00649b33          var_18 = ((char*)edi_4 + 1);
00649b3a          *(uint8_t*)edi_4 = 0x11;
00649b40          struct _FRAME* ebx;
00649b40          ebx = arg2->comps->quant_sel;
00649b43          void* eax_10 = var_18;
00649b4d          var_18 = ((char*)eax_10 + 1);
00649b54          *(uint8_t*)eax_10 = ebx;
00649a23      }
00649a23      else
00649a23      {
00649a29          void* eax_1 = var_18;
00649a33          var_18 = ((char*)eax_1 + 1);
00649a3a          *(uint8_t*)eax_1 = 1;
00649a3d          struct _FRAME_COMPONENT* comps_1 = arg2->comps;
00649a46          char eax_4 = (((int8_t)(comps_1->hsampling << 4)) + ((int8_t)comps_1->vsampling));
00649a49          char* edx_4 = var_18;
00649a53          var_18 = &edx_4[1];
00649a5a          *(uint8_t*)edx_4 = eax_4;
00649a5f          edx_4 = arg2->comps->quant_sel;
00649a62          void* edi_2 = var_18;
00649a6c          var_18 = ((char*)edi_2 + 1);
00649a73          *(uint8_t*)edi_2 = edx_4;
00649a75          int32_t i = 2;
00649a75          
00649a80          if (arg2->ncomps >= 2)
00649a80          {
00649a84              int32_t edi_3 = 0x20;
00649a84              
00649ae5              do
00649ae5              {
00649a90                  void* edx_5 = var_18;
00649a9a                  var_18 = ((char*)edx_5 + 1);
00649aa1                  *(uint8_t*)edx_5 = i;
00649aa3                  struct _FRAME_COMPONENT* comps = arg2->comps;
00649aad                  char edx_8 = (((int8_t)(*(uint32_t*)((edi_3 + comps) - 0xc) << 4)) + ((int8_t)*(uint32_t*)((edi_3 + comps) - 8)));
00649ab1                  char* esi_2 = var_18;
00649abb                  var_18 = &esi_2[1];
00649ac2                  i += 1;
00649ac3                  *(uint8_t*)esi_2 = edx_8;
00649ac8                  void* ecx_4;
00649ac8                  ecx_4 = *(uint8_t*)((edi_3 + arg2->comps) - 4);
00649acc                  void* esi_3 = var_18;
00649ad6                  edi_3 += 0x10;
00649ad9                  var_18 = ((char*)esi_3 + 1);
00649ae0                  *(uint8_t*)esi_3 = ecx_4;
00649ae5              } while (i <= arg2->ncomps);
00649a80          }
00649a23      }
00649a23      
00649b14      return *(uint32_t*)((char*)ctx + 0x5c)(&var_324, ((ncomps * 3) + 0xa), arg1);
00649970  }

00649b58                                                                          90 8d b4 26 00 00 00 00                          ...&....

00649b60  enum _IJLERR EP_Write_SOF2(struct _STATE* arg1, struct _FRAME* arg2)

00649b60  {
00649b78      void* ctx = arg1->ctx;
00649b7f      void var_324;
00649b7f      void* var_18 = &var_324;
00649b86      int32_t ncomps = arg2->ncomps;
00649b9f      sub_6494c0(0xc2, &var_18);
00649bb2      sub_6494e0(((ncomps * 3) + 8), &var_18);
00649bb7      void* ecx = var_18;
00649bc1      var_18 = ((char*)ecx + 1);
00649bc8      *(uint8_t*)ecx = 8;
00649bdc      sub_6494e0(arg2->height, &var_18);
00649bf2      sub_6494e0(arg2->width, &var_18);
00649bf7      char eax = arg2->ncomps;
00649bfa      void* edx_2 = var_18;
00649c04      var_18 = ((char*)edx_2 + 1);
00649c0b      *(uint8_t*)edx_2 = eax;
00649c0d      int32_t ncomps_1 = arg2->ncomps;
00649c0d      
00649c13      if (ncomps_1 == 1)
00649c13      {
00649cb5          void* eax_2 = var_18;
00649cbf          var_18 = ((char*)eax_2 + 1);
00649cc6          *(uint8_t*)eax_2 = 0;
00649cc9          void* edi_2 = var_18;
00649cd3          var_18 = ((char*)edi_2 + 1);
00649cda          *(uint8_t*)edi_2 = 0x11;
00649ce0          struct _FRAME* ebx;
00649ce0          ebx = arg2->comps->quant_sel;
00649ce3          void* eax_4 = var_18;
00649ced          var_18 = ((char*)eax_4 + 1);
00649cf4          *(uint8_t*)eax_4 = ebx;
00649c13      }
00649c13      else
00649c13      {
00649c19          int32_t i = 0;
00649c19          
00649c1d          if (ncomps_1 > 0)
00649c1d          {
00649c21              int32_t edi_1 = 0;
00649c21              
00649c85              do
00649c85              {
00649c30                  void* edx_3 = var_18;
00649c3a                  var_18 = ((char*)edx_3 + 1);
00649c41                  *(uint8_t*)edx_3 = i;
00649c43                  struct _FRAME_COMPONENT* comps = arg2->comps;
00649c4d                  char edx_6 = (((int8_t)(*(uint32_t*)(&comps->hsampling + edi_1) << 4)) + ((int8_t)*(uint32_t*)(&comps->vsampling + edi_1)));
00649c51                  char* esi_2 = var_18;
00649c5b                  var_18 = &esi_2[1];
00649c62                  i += 1;
00649c63                  *(uint8_t*)esi_2 = edx_6;
00649c68                  void* ecx_2;
00649c68                  ecx_2 = *(uint8_t*)(&arg2->comps->quant_sel + edi_1);
00649c6c                  void* esi_3 = var_18;
00649c76                  edi_1 += 0x10;
00649c79                  var_18 = ((char*)esi_3 + 1);
00649c80                  *(uint8_t*)esi_3 = ecx_2;
00649c85              } while (i < arg2->ncomps);
00649c1d          }
00649c13      }
00649c13      
00649cb4      return *(uint32_t*)((char*)ctx + 0x5c)(&var_324, ((ncomps * 3) + 0xa), arg1);
00649b60  }

00649cf8                                                                          90 8d b4 26 00 00 00 00                          ...&....

00649d00  enum _IJLERR EP_Write_DQT(struct _STATE* arg1, int32_t arg2, int32_t arg3, int16_t* const arg4)

00649d00  {
00649d18      int16_t* const i_1 = arg4;
00649d1f      void* ctx = arg1->ctx;
00649d24      int32_t ebp;
00649d24      
00649d24      if (arg2 != 0)
00649d2d          ebp = 0x83;
00649d24      else
00649d26          ebp = 0x43;
00649d26      
00649d36      void var_a0;
00649d36      void* var_a4 = &var_a0;
00649d49      sub_6494c0(0xdb, &var_a4);
00649d59      sub_6494e0(ebp, &var_a4);
00649d71      void* ecx = var_a4;
00649d78      var_a4 = ((char*)ecx + 1);
00649d7e      *(uint8_t*)ecx = (((int8_t)(arg2 << 4)) + arg3);
00649d80      void* ctx_1;
00649d80      
00649d80      if (arg2 == 0)
00649d80      {
00649e34          for (char* i = nullptr; i < 0x40; i = &i[4])
00649e34          {
00649e00              void* edx_1;
00649e00              edx_1 = i_1[i];
00649e07              *(uint8_t*)(i + var_a4) = edx_1;
00649e0a              edx_1 = i_1[&i[1]];
00649e12              *(uint8_t*)((i + var_a4) + 1) = edx_1;
00649e16              ecx = i_1[&i[2]];
00649e1e              *(uint8_t*)((i + var_a4) + 2) = ecx;
00649e22              edx_1 = i_1[&i[3]];
00649e2a              *(uint8_t*)((i + var_a4) + 3) = edx_1;
00649e34          }
00649e34          
00649e36          ctx_1 = ctx;
00649d80      }
00649d80      else
00649d80      {
00649de5          do
00649de5          {
00649d90              uint32_t eax_4 = ((uint32_t)*(uint16_t*)i_1);
00649d9e              char* ecx_1 = var_a4;
00649da5              var_a4 = &ecx_1[1];
00649da9              *(uint8_t*)ecx_1 = ((int8_t)((eax_4 & 0xff00) >> 8));
00649dab              char* edx_5 = var_a4;
00649db2              var_a4 = &edx_5[1];
00649db6              *(uint8_t*)edx_5 = eax_4;
00649db8              uint32_t ecx_3 = ((uint32_t)i_1[1]);
00649dc6              void* edx_6 = var_a4;
00649dcd              var_a4 = ((char*)edx_6 + 1);
00649dd1              i_1 = &i_1[2];
00649dd6              *(uint8_t*)edx_6 = ((int8_t)((ecx_3 & 0xff00) >> 8));
00649dd8              char* edi_2 = var_a4;
00649ddf              var_a4 = &edi_2[1];
00649de3              *(uint8_t*)edi_2 = ecx_3;
00649de5          } while (&i_1[0x40] > i_1);
00649de5          
00649de7          ctx_1 = ctx;
00649d80      }
00649d80      
00649e63      return *(uint32_t*)((char*)ctx_1 + 0x5c)(&var_a0, (ebp + 2), arg1);
00649d00  }

00649e64              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

00649e70  enum _IJLERR EP_Write_DHT_Ex(struct _STATE* arg1, uint8_t* arg2, uint8_t* arg3, int32_t arg4, int32_t arg5)

00649e70  {
00649e88      void* ctx = arg1->ctx;
00649e96      void var_168;
00649e96      void* var_16c = &var_168;
00649ea9      sub_6494c0(0xc4, &var_16c);
00649ef2      uint32_t edi_2 = (((uint32_t)arg2[0xb]) + (((uint32_t)arg2[0xa]) + (((uint32_t)arg2[9]) + (((uint32_t)arg2[8]) + (((uint32_t)arg2[7]) + (((uint32_t)arg2[6]) + (((uint32_t)arg2[5]) + (((uint32_t)arg2[4]) + (((uint32_t)arg2[3]) + (((uint32_t)arg2[2]) + (((uint32_t)arg2[1]) + ((uint32_t)*(uint8_t*)arg2))))))))))));
00649f04      uint32_t edx_11 = (((uint32_t)arg2[0xe]) + (((uint32_t)arg2[0xd]) + (((uint32_t)arg2[0xc]) + edi_2)));
00649f06      uint32_t esi_2 = ((uint32_t)arg2[0xf]);
00649f11      uint32_t ecx = (esi_2 + edx_11);
00649f14      int32_t ebx_2 = ((esi_2 + edx_11) + 0x13);
00649f2a      sub_6494e0(ebx_2, &var_16c);
00649f2a      
00649f35      if (ebx_2 > 0x144)
00649f46          return 0xfffffffa;
00649f46      
00649f58      void* eax_12 = var_16c;
00649f5f      var_16c = ((char*)eax_12 + 1);
00649f63      *(uint8_t*)eax_12 = (((int8_t)(arg4 << 4)) + arg5);
00649f65      eax_12 = *(uint8_t*)arg2;
00649f68      char* edx_13 = var_16c;
00649f6f      var_16c = &edx_13[1];
00649f73      *(uint8_t*)edx_13 = eax_12;
00649f75      edx_13 = arg2[1];
00649f78      char* eax_13 = var_16c;
00649f7f      var_16c = &eax_13[1];
00649f83      *(uint8_t*)eax_13 = edx_13;
00649f85      eax_13 = arg2[2];
00649f88      void* edx_14 = var_16c;
00649f8f      var_16c = ((char*)edx_14 + 1);
00649f93      *(uint8_t*)edx_14 = eax_13;
00649f95      eax_13 = arg2[3];
00649f98      void* edx_15 = var_16c;
00649f9f      var_16c = ((char*)edx_15 + 1);
00649fa3      *(uint8_t*)edx_15 = eax_13;
00649fa5      eax_13 = arg2[4];
00649fa8      void* edx_16 = var_16c;
00649faf      var_16c = ((char*)edx_16 + 1);
00649fb3      *(uint8_t*)edx_16 = eax_13;
00649fb5      eax_13 = arg2[5];
00649fb8      void* edx_17 = var_16c;
00649fbf      var_16c = ((char*)edx_17 + 1);
00649fc3      *(uint8_t*)edx_17 = eax_13;
00649fc5      eax_13 = arg2[6];
00649fc8      void* edx_18 = var_16c;
00649fcf      var_16c = ((char*)edx_18 + 1);
00649fd3      *(uint8_t*)edx_18 = eax_13;
00649fd5      eax_13 = arg2[7];
00649fd8      void* edx_19 = var_16c;
00649fdf      var_16c = ((char*)edx_19 + 1);
00649fe3      *(uint8_t*)edx_19 = eax_13;
00649fe5      eax_13 = arg2[8];
00649fe8      void* edx_20 = var_16c;
00649fef      var_16c = ((char*)edx_20 + 1);
00649ff3      *(uint8_t*)edx_20 = eax_13;
00649ff5      eax_13 = arg2[9];
00649ff8      void* edx_21 = var_16c;
00649fff      var_16c = ((char*)edx_21 + 1);
0064a003      *(uint8_t*)edx_21 = eax_13;
0064a005      eax_13 = arg2[0xa];
0064a008      void* edx_22 = var_16c;
0064a00f      var_16c = ((char*)edx_22 + 1);
0064a013      *(uint8_t*)edx_22 = eax_13;
0064a015      eax_13 = arg2[0xb];
0064a018      void* edx_23 = var_16c;
0064a01f      var_16c = ((char*)edx_23 + 1);
0064a023      *(uint8_t*)edx_23 = eax_13;
0064a025      eax_13 = arg2[0xc];
0064a028      void* edx_24 = var_16c;
0064a02f      var_16c = ((char*)edx_24 + 1);
0064a033      *(uint8_t*)edx_24 = eax_13;
0064a035      eax_13 = arg2[0xd];
0064a038      void* edx_25 = var_16c;
0064a03f      var_16c = ((char*)edx_25 + 1);
0064a043      *(uint8_t*)edx_25 = eax_13;
0064a045      eax_13 = arg2[0xe];
0064a048      void* edx_26 = var_16c;
0064a04f      var_16c = ((char*)edx_26 + 1);
0064a053      char* i = nullptr;
0064a055      *(uint8_t*)edx_26 = eax_13;
0064a057      eax_13 = arg2[0xf];
0064a05a      char* edi_3 = var_16c;
0064a06a      var_16c = &edi_3[1];
0064a06e      *(uint8_t*)edi_3 = eax_13;
0064a06e      
0064a070      if (ecx > 0)
0064a070      {
0064a083          uint32_t eax_14;
0064a083          
0064a083          if ((esi_2 + edx_11) >= 6)
0064a083          {
0064a08f              eax_14 = arg3;
0064a096              int32_t var_18_1 = ebx_2;
0064a096              
0064a0fa              do
0064a0fa              {
0064a0a0                  ebx_2 = i[eax_14];
0064a0a3                  void* esi_4 = var_16c;
0064a0aa                  var_16c = ((char*)esi_4 + 1);
0064a0ae                  *(uint8_t*)esi_4 = ebx_2;
0064a0b0                  ebx_2 = i[(eax_14 + 1)];
0064a0b4                  void* ebp_3 = var_16c;
0064a0bb                  var_16c = ((char*)ebp_3 + 1);
0064a0bf                  *(uint8_t*)ebp_3 = ebx_2;
0064a0c2                  ebx_2 = i[(eax_14 + 2)];
0064a0c6                  void* esi_5 = var_16c;
0064a0cd                  var_16c = ((char*)esi_5 + 1);
0064a0d1                  *(uint8_t*)esi_5 = ebx_2;
0064a0d3                  ebx_2 = i[(eax_14 + 3)];
0064a0d7                  void* esi_6 = var_16c;
0064a0de                  var_16c = ((char*)esi_6 + 1);
0064a0e2                  *(uint8_t*)esi_6 = ebx_2;
0064a0e4                  ebx_2 = i[(eax_14 + 4)];
0064a0e8                  void* esi_7 = var_16c;
0064a0ef                  var_16c = ((char*)esi_7 + 1);
0064a0f3                  i = &i[5];
0064a0f8                  *(uint8_t*)esi_7 = ebx_2;
0064a0fa              } while (i <= ((esi_2 + edx_11) - 6));
0064a0fa              
0064a0fc              ebx_2 = var_18_1;
0064a083          }
0064a083          
0064a125          do
0064a125          {
0064a111              eax_14 = *(uint8_t*)(i + arg3);
0064a114              char* ebp_7 = var_16c;
0064a11b              var_16c = &ebp_7[1];
0064a11f              i = &i[1];
0064a122              *(uint8_t*)ebp_7 = eax_14;
0064a125          } while (i < ecx);
0064a070      }
0064a070      
0064a154      return *(uint32_t*)((char*)ctx + 0x5c)(&var_168, (ebx_2 + 2), arg1);
00649e70  }

0064a155                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

0064a160  enum _IJLERR EP_Write_DHTs(struct _STATE* arg1, struct _JPEG_PROPERTIES* arg2)

0064a160  {
0064a171      struct _JPEG_PROPERTIES* ebp = arg2;
0064a178      void* ctx = arg1->ctx;
0064a17b      int32_t ecx = 0;
0064a17d      int32_t ebx = 0;
0064a17f      int32_t maxhuffindex = ebp->maxhuffindex;
0064a185      int32_t edx = (maxhuffindex * 2);
0064a185      
0064a18a      if (edx > 0)
0064a18a      {
0064a197          int32_t eax_1 = 0;
0064a197          
0064a21c          do
0064a21c          {
0064a1b0              char* esi_1 = *(uint32_t*)(&ebp->rawhufftables + eax_1);
0064a1fc              int32_t ebx_12 = ((((((((((((ebx + ((uint32_t)*(uint8_t*)esi_1)) + ((uint32_t)esi_1[1])) + ((uint32_t)esi_1[2])) + ((uint32_t)esi_1[3])) + ((uint32_t)esi_1[4])) + ((uint32_t)esi_1[5])) + ((uint32_t)esi_1[6])) + ((uint32_t)esi_1[7])) + ((uint32_t)esi_1[8])) + ((uint32_t)esi_1[9])) + ((uint32_t)esi_1[0xa])) + ((uint32_t)esi_1[0xb]));
0064a214              ebx = ((((ebx_12 + ((uint32_t)esi_1[0xc])) + ((uint32_t)esi_1[0xd])) + ((uint32_t)esi_1[0xe])) + ((uint32_t)esi_1[0xf]));
0064a216              eax_1 += 0xc;
0064a219              ecx += 1;
0064a21c          } while (ecx < edx);
0064a18a      }
0064a18a      
0064a23c      char var_170;
0064a23c      char* var_174 = &var_170;
0064a24f      sub_6494c0(0xc4, &var_174);
0064a25f      sub_6494e0((((maxhuffindex * 0x22) + ebx) + 2), &var_174);
0064a27e      int32_t result = *(uint32_t*)((char*)ctx + 0x5c)(&var_170, 4, arg1);
0064a27e      
0064a283      if ((result == 0 && (ebp->maxhuffindex * 2) > 0))
0064a283      {
0064a2a2          int32_t ebx_17 = 0;
0064a2b1          struct _JPEG_PROPERTIES* var_20_1 = ebp;
0064a2b8          int32_t i_1 = 0;
0064a63e          int32_t i;
0064a63e          
0064a63e          do
0064a63e          {
0064a2c6              char* edx_3 = *(uint32_t*)(&ebp->rawhufftables + ebx_17);
0064a310              uint32_t eax_16 = (((((((((((((uint32_t)*(uint8_t*)edx_3) + ((uint32_t)edx_3[1])) + ((uint32_t)edx_3[2])) + ((uint32_t)edx_3[3])) + ((uint32_t)edx_3[4])) + ((uint32_t)edx_3[5])) + ((uint32_t)edx_3[6])) + ((uint32_t)edx_3[7])) + ((uint32_t)edx_3[8])) + ((uint32_t)edx_3[9])) + ((uint32_t)edx_3[0xa])) + ((uint32_t)edx_3[0xb]));
0064a322              uint32_t eax_19 = (((eax_16 + ((uint32_t)edx_3[0xc])) + ((uint32_t)edx_3[0xd])) + ((uint32_t)edx_3[0xe]));
0064a324              uint32_t esi_2 = ((uint32_t)edx_3[0xf]);
0064a328              uint32_t edi_16 = (eax_19 + esi_2);
0064a328              
0064a34a              if (((eax_19 + esi_2) + 0x11) > 0x144)
0064a65e                  return 0xfffffffa;
0064a65e              
0064a354              var_174 = &var_170;
0064a36b              char edx_6 = ((&*(uint8_t*)((char*)ebp->rawhufftables[0])[8][ebx_17] << 4) + &*(uint8_t*)((char*)ebp->rawhufftables[0])[9][ebx_17]);
0064a371              char var_16f;
0064a371              var_174 = &var_16f;
0064a375              var_170 = edx_6;
0064a380              char ecx_19 = **(uint8_t**)(&ebp->rawhufftables + ebx_17);
0064a386              void var_16e;
0064a386              var_174 = &var_16e;
0064a38a              var_16f = ecx_19;
0064a395              void* edx_8;
0064a395              edx_8 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 1);
0064a398              char* ecx_20 = var_174;
0064a39f              var_174 = &ecx_20[1];
0064a3a3              *(uint8_t*)ecx_20 = edx_8;
0064a3ac              void* edx_9;
0064a3ac              edx_9 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 2);
0064a3af              char* ecx_21 = var_174;
0064a3b6              var_174 = &ecx_21[1];
0064a3ba              *(uint8_t*)ecx_21 = edx_9;
0064a3c3              void* edx_10;
0064a3c3              edx_10 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 3);
0064a3c6              char* ecx_22 = var_174;
0064a3cd              var_174 = &ecx_22[1];
0064a3d1              *(uint8_t*)ecx_22 = edx_10;
0064a3da              void* edx_11;
0064a3da              edx_11 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 4);
0064a3dd              char* ecx_23 = var_174;
0064a3e4              var_174 = &ecx_23[1];
0064a3e8              *(uint8_t*)ecx_23 = edx_11;
0064a3f1              void* edx_12;
0064a3f1              edx_12 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 5);
0064a3f4              char* ecx_24 = var_174;
0064a3fb              var_174 = &ecx_24[1];
0064a3ff              *(uint8_t*)ecx_24 = edx_12;
0064a408              void* edx_13;
0064a408              edx_13 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 6);
0064a40b              char* ecx_25 = var_174;
0064a412              var_174 = &ecx_25[1];
0064a416              *(uint8_t*)ecx_25 = edx_13;
0064a41f              void* edx_14;
0064a41f              edx_14 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 7);
0064a422              char* ecx_26 = var_174;
0064a429              var_174 = &ecx_26[1];
0064a42d              *(uint8_t*)ecx_26 = edx_14;
0064a436              void* edx_15;
0064a436              edx_15 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 8);
0064a439              char* ecx_27 = var_174;
0064a440              var_174 = &ecx_27[1];
0064a444              *(uint8_t*)ecx_27 = edx_15;
0064a44d              void* edx_16;
0064a44d              edx_16 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 9);
0064a450              char* ecx_28 = var_174;
0064a457              var_174 = &ecx_28[1];
0064a45b              *(uint8_t*)ecx_28 = edx_16;
0064a464              void* edx_17;
0064a464              edx_17 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 0xa);
0064a467              char* ecx_29 = var_174;
0064a46e              var_174 = &ecx_29[1];
0064a472              *(uint8_t*)ecx_29 = edx_17;
0064a47b              void* edx_18;
0064a47b              edx_18 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 0xb);
0064a47e              char* ecx_30 = var_174;
0064a485              var_174 = &ecx_30[1];
0064a489              *(uint8_t*)ecx_30 = edx_18;
0064a492              void* edx_19;
0064a492              edx_19 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 0xc);
0064a495              char* ecx_31 = var_174;
0064a49c              var_174 = &ecx_31[1];
0064a4a0              *(uint8_t*)ecx_31 = edx_19;
0064a4a9              void* edx_20;
0064a4a9              edx_20 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 0xd);
0064a4ac              char* ecx_32 = var_174;
0064a4b3              var_174 = &ecx_32[1];
0064a4b7              *(uint8_t*)ecx_32 = edx_20;
0064a4c0              void* edx_21;
0064a4c0              edx_21 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 0xe);
0064a4c3              char* ecx_33 = var_174;
0064a4ca              var_174 = &ecx_33[1];
0064a4d2              *(uint8_t*)ecx_33 = edx_21;
0064a4db              void* edx_22;
0064a4db              edx_22 = *(uint8_t*)(*(uint32_t*)(&ebp->rawhufftables + ebx_17) + 0xf);
0064a4de              char* edi_17 = var_174;
0064a4e5              var_174 = &edi_17[1];
0064a4e9              *(uint8_t*)edi_17 = edx_22;
0064a4eb              char* edx_23 = nullptr;
0064a4eb              
0064a4f0              if (edi_16 > 0)
0064a4f0              {
0064a503                  struct _JPEG_PROPERTIES* eax_20;
0064a503                  uint8_t** esi_26;
0064a503                  
0064a503                  if ((eax_19 + esi_2) < 6)
0064a666                      esi_26 = &var_20_1->rawhufftables[0].vals;
0064a503                  else
0064a503                  {
0064a521                      struct _JPEG_PROPERTIES* var_2c_3 = ((eax_19 + esi_2) - 6);
0064a521                      
0064a5b3                      do
0064a5b3                      {
0064a537                          eax_20 = edx_23[*(uint32_t*)(&*(uint32_t*)((char*)ebp->rawhufftables[0])[4] + ebx_17)];
0064a53a                          char* ecx_37 = var_174;
0064a541                          var_174 = &ecx_37[1];
0064a545                          *(uint8_t*)ecx_37 = eax_20;
0064a54e                          int32_t eax_21;
0064a54e                          eax_21 = edx_23[(*(uint32_t*)(&*(uint32_t*)((char*)ebp->rawhufftables[0])[4] + ebx_17) + 1)];
0064a552                          char* esi_22 = var_174;
0064a559                          var_174 = &esi_22[1];
0064a55d                          *(uint8_t*)esi_22 = eax_21;
0064a566                          int32_t eax_22;
0064a566                          eax_22 = edx_23[(*(uint32_t*)(&*(uint32_t*)((char*)ebp->rawhufftables[0])[4] + ebx_17) + 2)];
0064a56a                          char* esi_23 = var_174;
0064a571                          var_174 = &esi_23[1];
0064a575                          *(uint8_t*)esi_23 = eax_22;
0064a57e                          void* ecx_39;
0064a57e                          ecx_39 = edx_23[(*(uint32_t*)(&*(uint32_t*)((char*)ebp->rawhufftables[0])[4] + ebx_17) + 3)];
0064a582                          char* esi_24 = var_174;
0064a589                          var_174 = &esi_24[1];
0064a58d                          *(uint8_t*)esi_24 = ecx_39;
0064a596                          int32_t eax_25;
0064a596                          eax_25 = edx_23[(*(uint32_t*)(&*(uint32_t*)((char*)ebp->rawhufftables[0])[4] + ebx_17) + 4)];
0064a59a                          char* esi_25 = var_174;
0064a5a1                          edx_23 = &edx_23[5];
0064a5a4                          var_174 = &esi_25[1];
0064a5a8                          *(uint8_t*)esi_25 = eax_25;
0064a5b3                      } while (edx_23 <= var_2c_3);
0064a5b3                      
0064a5b9                      esi_26 = &var_20_1->rawhufftables[0].vals;
0064a503                  }
0064a503                  
0064a5e6                  do
0064a5e6                  {
0064a5d2                      eax_20 = *(uint8_t*)(edx_23 + ADJ(esi_26)->rawhufftables[0].vals);
0064a5d5                      char* ebp_2 = var_174;
0064a5dc                      edx_23 = &edx_23[1];
0064a5df                      var_174 = &ebp_2[1];
0064a5e3                      *(uint8_t*)ebp_2 = eax_20;
0064a5e6                  } while (edx_23 < edi_16);
0064a5e6                  
0064a5e8                  ebp = arg2;
0064a4f0              }
0064a4f0              
0064a613              result = *(uint32_t*)((char*)ctx + 0x5c)(&var_170, ((eax_19 + esi_2) + 0x11), arg1);
0064a613              
0064a618              if (result != 0)
0064a618                  break;
0064a618              
0064a61a              ebx_17 += 0xc;
0064a624              i = (i_1 + 1);
0064a625              var_20_1 = &var_20_1->roi.right;
0064a635              i_1 = i;
0064a63e          } while (i < (ebp->maxhuffindex * 2));
0064a283      }
0064a283      
0064a64e      return result;
0064a160  }

0064a671                                                     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                   ...&......'....

0064a680  enum _IJLERR EP_Write_SOS(struct _STATE* arg1, int32_t arg2, char* arg3, char* arg4)

0064a680  {
0064a68b      int32_t ebx = arg2;
0064a68f      void* ctx = arg1->ctx;
0064a692      int32_t ebp = ((ebx * 2) + 6);
0064a69e      void var_48;
0064a69e      void* var_4c = &var_48;
0064a6b1      sub_6494c0(0xda, &var_4c);
0064a6c1      sub_6494e0(ebp, &var_4c);
0064a6c6      void* edx = var_4c;
0064a6d0      var_4c = ((char*)edx + 1);
0064a6d4      *(uint8_t*)edx = ebx;
0064a6d4      
0064a6d6      if (ebx == 1)
0064a6d6      {
0064a881          void* ecx_5 = var_4c;
0064a88a          var_4c = ((char*)ecx_5 + 1);
0064a88e          *(uint8_t*)ecx_5 = 0;
0064a890          void* esi_13 = var_4c;
0064a897          var_4c = ((char*)esi_13 + 1);
0064a89b          *(uint8_t*)esi_13 = 0;
0064a6d6      }
0064a6d6      else
0064a6d6      {
0064a6dc          void* ecx = var_4c;
0064a6e7          var_4c = ((char*)ecx + 1);
0064a6ef          *(uint8_t*)ecx = 1;
0064a6fb          char eax_3 = ((*(uint8_t*)arg3 << 4) + *(uint8_t*)arg4);
0064a6fd          char* ecx_1 = var_4c;
0064a707          var_4c = &ecx_1[1];
0064a70b          *(uint8_t*)ecx_1 = eax_3;
0064a70d          void* i = 2;
0064a70d          
0064a712          if (ebx >= 2)
0064a712          {
0064a71e              if ((ebx - 2) >= 4)
0064a71e              {
0064a72d                  int32_t var_20_1 = 3;
0064a735                  int32_t var_24_1 = 4;
0064a735                  
0064a7e4                  do
0064a7e4                  {
0064a750                      void* esi_3 = var_4c;
0064a757                      var_4c = ((char*)esi_3 + 1);
0064a75b                      *(uint8_t*)esi_3 = i;
0064a76a                      char ebx_3 = ((*(uint8_t*)((arg3 + i) - 1) << 4) + *(uint8_t*)((arg4 + i) - 1));
0064a76c                      void* esi_4 = var_4c;
0064a773                      var_4c = ((char*)esi_4 + 1);
0064a777                      *(uint8_t*)esi_4 = ebx_3;
0064a77d                      void* esi_5 = var_4c;
0064a784                      var_4c = ((char*)esi_5 + 1);
0064a788                      *(uint8_t*)esi_5 = var_20_1;
0064a795                      char ebx_7 = ((*(uint8_t*)(arg3 + i) << 4) + *(uint8_t*)(arg4 + i));
0064a797                      void* esi_6 = var_4c;
0064a79e                      var_4c = ((char*)esi_6 + 1);
0064a7a2                      *(uint8_t*)esi_6 = ebx_7;
0064a7a8                      void* esi_7 = var_4c;
0064a7af                      var_4c = ((char*)esi_7 + 1);
0064a7b3                      *(uint8_t*)esi_7 = var_24_1;
0064a7c2                      char ebx_11 = ((*(uint8_t*)((arg3 + i) + 1) << 4) + *(uint8_t*)((arg4 + i) + 1));
0064a7c4                      void* esi = var_4c;
0064a7cb                      var_4c = ((char*)esi + 1);
0064a7cf                      i += 3;
0064a7d2                      *(uint8_t*)esi = ebx_11;
0064a7d8                      var_20_1 += 3;
0064a7dd                      var_24_1 += 3;
0064a7e4                  } while (i <= (ebx - 4));
0064a7e4                  
0064a7ee                  ebx = arg2;
0064a71e              }
0064a71e              
0064a82c              do
0064a82c              {
0064a800                  char* edx_6 = var_4c;
0064a807                  var_4c = &edx_6[1];
0064a80b                  *(uint8_t*)edx_6 = i;
0064a81a                  char edx_9 = ((*(uint8_t*)((arg3 + i) - 1) << 4) + *(uint8_t*)((arg4 + i) - 1));
0064a81c                  void* esi_11 = var_4c;
0064a823                  var_4c = ((char*)esi_11 + 1);
0064a827                  i += 1;
0064a82a                  *(uint8_t*)esi_11 = edx_9;
0064a82c              } while (i <= ebx);
0064a712          }
0064a6d6      }
0064a6d6      
0064a832      void* ecx_4 = var_4c;
0064a83b      var_4c = ((char*)ecx_4 + 1);
0064a842      *(uint8_t*)ecx_4 = 0;
0064a844      void* esi_12 = var_4c;
0064a84b      var_4c = ((char*)esi_12 + 1);
0064a84f      *(uint8_t*)esi_12 = 0x3f;
0064a852      void* edx_11 = var_4c;
0064a859      var_4c = ((char*)edx_11 + 1);
0064a85d      *(uint8_t*)edx_11 = 0;
0064a880      return *(uint32_t*)((char*)ctx + 0x5c)(&var_48, (ebp + 2), arg1);
0064a680  }

0064a89f                                                                                               90                                 .

0064a8a0  enum _IJLERR EP_Write_SOS_Ex(struct _STATE* arg1, struct _SCAN* arg2, uint8_t* arg3, uint8_t* arg4)

0064a8a0  {
0064a8a0      int32_t edi;
0064a8a0      int32_t var_4 = edi;
0064a8af      void* ctx = arg1->ctx;
0064a8b4      int32_t ebp_1 = ((arg2->ncomps * 2) + 6);
0064a8bc      void var_28;
0064a8bc      void* var_2c = &var_28;
0064a8cf      sub_6494c0(0xda, &var_2c);
0064a8df      sub_6494e0(ebp_1, &var_2c);
0064a8e4      char eax = arg2->ncomps;
0064a8e6      void* edx = var_2c;
0064a8ed      var_2c = ((char*)edx + 1);
0064a8f1      *(uint8_t*)edx = eax;
0064a8f3      int32_t ncomps = arg2->ncomps;
0064a8f8      uint32_t i;
0064a8f8      
0064a8f8      if (ncomps == 1)
0064a8f8      {
0064a9af          struct _SCAN_COMPONENT* eax_4;
0064a9af          eax_4 = arg2->comps->comp;
0064a9b1          char* edx_5 = var_2c;
0064a9b8          var_2c = &edx_5[1];
0064a9bc          *(uint8_t*)edx_5 = eax_4;
0064a9c1          int32_t comp = arg2->comps->comp;
0064a9d6          char edx_8 = ((arg3[comp] << 4) + arg4[comp]);
0064a9d8          void* ecx_9 = var_2c;
0064a9df          var_2c = ((char*)ecx_9 + 1);
0064a9e3          *(uint8_t*)ecx_9 = edx_8;
0064a8f8      }
0064a8f8      else
0064a8f8      {
0064a8fe          i = 0;
0064a8fe          
0064a902          if (ncomps > 0)
0064a902          {
0064a94b              do
0064a94b              {
0064a920                  void* edi_2 = var_2c;
0064a927                  var_2c = ((char*)edi_2 + 1);
0064a92b                  *(uint8_t*)edi_2 = i;
0064a939                  char edx_3 = ((arg3[i] << 4) + arg4[i]);
0064a93b                  void* edi_3 = var_2c;
0064a942                  var_2c = ((char*)edi_3 + 1);
0064a946                  i += 1;
0064a947                  *(uint8_t*)edi_3 = edx_3;
0064a94b              } while (i < arg2->ncomps);
0064a902          }
0064a8f8      }
0064a8f8      
0064a955      i = arg2->start_spec;
0064a958      void* edx_4 = var_2c;
0064a95f      var_2c = ((char*)edx_4 + 1);
0064a966      *(uint8_t*)edx_4 = i;
0064a968      edx_4 = arg2->end_spec;
0064a96b      char* eax_1 = var_2c;
0064a972      var_2c = &eax_1[1];
0064a976      *(uint8_t*)eax_1 = edx_4;
0064a97e      char ecx_7 = (((int8_t)(arg2->approx_high << 4)) + ((int8_t)arg2->approx_low));
0064a981      void* edi_4 = var_2c;
0064a988      var_2c = ((char*)edi_4 + 1);
0064a98c      *(uint8_t*)edi_4 = ecx_7;
0064a9ab      return *(uint32_t*)((char*)ctx + 0x5c)(&var_28, (ebp_1 + 2), arg1);
0064a8a0  }

0064a9ea                                8d b6 00 00 00 00                                                            ......

0064a9f0  enum _IJLERR EP_Write_DRI(int32_t arg1, struct _STATE* arg2)

0064a9f0  {
0064a9fe      void* ctx = arg2->ctx;
0064aa05      void var_18;
0064aa05      void* var_1c = &var_18;
0064aa18      sub_6494c0(0xdd, &var_1c);
0064aa2c      sub_6494e0(4, &var_1c);
0064aa3c      sub_6494e0(arg1, &var_1c);
0064aa5d      return *(uint32_t*)((char*)ctx + 0x5c)(&var_18, 6, arg2);
0064a9f0  }

0064aa5e                                                                                            8b f6                                ..

0064aa60  enum _IJLERR EP_Write_RST(int32_t arg1, struct _STATE* arg2)

0064aa60  {
0064aa6d      arg2->ctx;
0064aa6d      
0064aa73      if (arg1 > 7)
0064aaf2          return 0xffffffe7;
0064aaf2      
0064aa7c      /* jump -> &data_907b18[arg1] */
0064aa60  }

0064aa7e                                                                                            ba d7                                ..
0064aa80  00 00 00 eb 2f ba d6 00 00 00 eb 28 ba d5 00 00 00 eb 21 ba d4 00 00 00 eb 1a ba d3 00 00 00 eb  ..../......(......!.............
0064aaa0  13 ba d2 00 00 00 eb 0c ba d1 00 00 00 eb 05 ba d0 00 00 00 8d 44 24 14 89 44 24 10 89 14 24 8d  .....................D$..D$...$.
0064aac0  54 24 10 89 54 24 04 e8 f4 e9 ff ff 8d 44 24 14 89 04 24 c7 44 24 04 02 00 00 00 89 5c 24 08 ff  T$..T$.......D$...$.D$......\$..
0064aae0  55 5c 83 c4 1c 5b 5d c3                                                                          U\...[].
0064aaf3                                                           8d b6 00 00 00 00 8d bc 27 00 00 00 00                     ........'....

0064ab00  enum _IJLERR EP_Write_APP14(uint8_t arg1, struct _JPEG_PROPERTIES* arg2)

0064ab00  {
0064ab06      int32_t ebx;
0064ab06      ebx = arg1;
0064ab0e      void* ctx = arg2->state.ctx;
0064ab18      void var_20;
0064ab18      void* var_24 = &var_20;
0064ab2b      sub_6494c0(0xee, &var_24);
0064ab3f      sub_6494e0(0xe, &var_24);
0064ab44      void* edx = var_24;
0064ab4b      var_24 = ((char*)edx + 1);
0064ab4f      *(uint8_t*)edx = 0x41;
0064ab52      void* eax_1 = var_24;
0064ab59      var_24 = ((char*)eax_1 + 1);
0064ab5d      *(uint8_t*)eax_1 = 0x64;
0064ab60      void* edx_1 = var_24;
0064ab67      var_24 = ((char*)edx_1 + 1);
0064ab6b      *(uint8_t*)edx_1 = 0x6f;
0064ab6e      void* edx_2 = var_24;
0064ab75      var_24 = ((char*)edx_2 + 1);
0064ab79      *(uint8_t*)edx_2 = 0x62;
0064ab7c      void* edx_3 = var_24;
0064ab83      var_24 = ((char*)edx_3 + 1);
0064ab87      *(uint8_t*)edx_3 = 0x65;
0064ab9c      sub_6494e0(((uint32_t)arg2->AdobeVersion), &var_24);
0064abb3      sub_6494e0(((uint32_t)arg2->AdobeFlags0), &var_24);
0064abca      sub_6494e0(((uint32_t)arg2->AdobeFlags1), &var_24);
0064abcf      void* edx_4 = var_24;
0064abd6      var_24 = ((char*)edx_4 + 1);
0064abda      *(uint8_t*)edx_4 = ebx;
0064abfe      return *(uint32_t*)((char*)ctx + 0x5c)(&var_20, 0x10, &arg2->state);
0064ab00  }

0064abff                                                                                               90                                 .

0064ac00  enum _IJLERR Encode_Scan(struct _JPEG_PROPERTIES* arg1, struct _STATE* arg2, struct _SCAN* arg3)

0064ac00  {
0064ac0a      struct _JPEG_PROPERTIES* MCUBuf_6 = arg1;
0064ac18      struct _SCAN* ebx = arg3;
0064ac1f      int32_t result = 0;
0064ac21      void* ctx = arg2->ctx;
0064ac24      int32_t eax = 0;
0064ac28      int32_t var_54 = 0;
0064ac2c      int32_t ncomps_1 = ebx->ncomps;
0064ac30      void var_a4;
0064ac30      void var_94;
0064ac30      void var_84;
0064ac30      void var_74;
0064ac30      
0064ac30      if (ncomps_1 > 0)
0064ac30      {
0064ac38          int32_t esi_1 = 0;
0064ac40          int32_t edx = 0;
0064ac43          int32_t ebx_1 = 0;
0064ac47          int32_t result_1 = 0;
0064ac47          
0064ac58          while (true)
0064ac58          {
0064ac58              if (MCUBuf_6->jscan == 0)
0064ac61                  arg3->dc_diff[eax] = 0;
0064ac61              
0064ac70              struct _SCAN_COMPONENT* comps_1 = arg3->comps;
0064ac77              int32_t ecx_5 = (*(uint32_t*)(&comps_1->vsampling + edx) * *(uint32_t*)(&comps_1->hsampling + edx));
0064ac7c              ebx_1 += ecx_5;
0064ac7e              int32_t ebp = ((int32_t)MCUBuf_6->HuffIdentifierAC[eax]);
0064ac86              *(uint32_t*)(&var_a4 + (eax << 2)) = ecx_5;
0064ac92              int32_t ecx_7 = MCUBuf_6->jEncFmtDcHuffman[((int32_t)MCUBuf_6->HuffIdentifierDC[eax])];
0064ac99              *(uint32_t*)(&var_94 + (eax << 2)) = ecx_7;
0064ac9d              int32_t ebp_1 = MCUBuf_6->jEncFmtAcHuffman[ebp];
0064aca6              *(uint32_t*)(&var_84 + (eax << 2)) = ebp_1;
0064aca6              
0064acb2              if ((ecx_7 == 0 || ebp_1 == 0))
0064acb2              {
0064b185                  result = 0xffffffef;
0064b18a                  goto label_64b102;
0064acb2              }
0064acb2              
0064acc2              int32_t ecx_9 = MCUBuf_6->jEncFmtQuant[*(uint32_t*)(&MCUBuf_6->jframe.comps->quant_sel + esi_1)];
0064acc9              *(uint32_t*)(&var_74 + (eax << 2)) = ecx_9;
0064acc9              
0064accf              if (ecx_9 == 0)
0064accf              {
0064b17a                  result = 0xffffffee;
0064b17f                  goto label_64b102;
0064accf              }
0064accf              
0064acd5              esi_1 += 0x10;
0064acd8              edx += 0x18;
0064acdb              eax += 1;
0064ace3              int32_t ncomps_3 = *(uint32_t*)arg3;
0064ace3              
0064ace7              if (eax < ncomps_3)
0064ace7                  continue;
0064ace7              
0064aced              var_54 = ebx_1;
0064acf1              ncomps_1 = ncomps_3;
0064acf3              result = result_1;
0064acfb              ebx = arg3;
0064acfb              break;
0064ac58          }
0064ac30      }
0064ac30      
0064ad02      int32_t curyMCU = ebx->curyMCU;
0064ad05      int32_t numyMCUs = MCUBuf_6->numyMCUs;
0064ad0e      uint8_t* MCUBuf_4;
0064ad0e      int32_t curxMCU_2;
0064ad0e      int32_t curyMCU_3;
0064ad0e      int32_t (* var_b0)[0x4];
0064ad0e      uint8_t* MCUBuf_1;
0064ad0e      
0064ad0e      if (curyMCU < numyMCUs)
0064ad0e      {
0064ad17          int32_t result_2 = result;
0064ad1b          int32_t numxMCUs = MCUBuf_6->numxMCUs;
0064ad22          int32_t ncomps_2 = ncomps_1;
0064ad2d          int32_t numyMCUs_1 = numyMCUs;
0064ad2d          
0064ad31          while (true)
0064ad31          {
0064ad31              int32_t curxMCU = ebx->curxMCU;
0064ad31              
0064ad3d              if (curxMCU < numxMCUs)
0064ad3d              {
0064ad47                  int32_t edx_3 = (var_54 << 6);
0064ad4f                  int32_t ebp_4 = (curyMCU << 7);
0064ad64                  int32_t curxMCU_1 = curxMCU;
0064ad68                  int32_t curyMCU_1 = curyMCU;
0064ad6c                  int32_t ncomps = ncomps_2;
0064ad6c                  
0064ad73                  while (true)
0064ad73                  {
0064ad73                      uint8_t* MCUBuf = MCUBuf_6->MCUBuf;
0064ad79                      struct _RAW_DATA_TYPES_STATE* raw_coefs_1 = MCUBuf_6->raw_coefs;
0064ad79                      
0064ad81                      if (raw_coefs_1 == 0)
0064ad81                      {
0064b142                          MCUBuf_4 = MCUBuf_6;
0064b14d                          curxMCU_2 = curxMCU_1;
0064b155                          curyMCU_3 = curyMCU_1;
0064b159                          *(uint32_t*)((char*)ctx + 0x60)(MCUBuf_4, curxMCU_2, curyMCU_3, var_b0, MCUBuf_1);
0064b15c                          raw_coefs_1 = MCUBuf_6->raw_coefs;
0064ad81                      }
0064ad81                      else
0064ad81                      {
0064ad87                          int32_t edx_4 = 0;
0064ad87                          
0064ad8b                          if (ncomps > 0)
0064ad8b                          {
0064ad9f                              uint8_t* MCUBuf_2 = MCUBuf;
0064ada3                              struct _RAW_DATA_TYPES_STATE* raw_coefs_3 = raw_coefs_1;
0064adae                              struct _SCAN_COMPONENT* comps = ebx->comps;
0064adae                              
0064af51                              do
0064af51                              {
0064adb2                                  int32_t ebp_5 = 0;
0064adb9                                  curyMCU = (edx_4 * 0x18);
0064adbc                                  int32_t ebx_4 = *(uint32_t*)(&comps->vsampling + curyMCU);
0064adbc                                  
0064adc2                                  if (ebx_4 > 0)
0064adc2                                  {
0064aded                                      struct _RAW_DATA_TYPES_STATE* raw_coefs_2 = raw_coefs_3;
0064adf1                                      int32_t curyMCU_2 = curyMCU;
0064adff                                      int32_t edx_5 = *(uint32_t*)(&comps->hsampling + curyMCU);
0064adff                                      
0064af34                                      do
0064af34                                      {
0064ae03                                          curyMCU = 0;
0064ae03                                          
0064ae07                                          if (edx_5 > 0)
0064ae07                                          {
0064ae12                                              int32_t numxMCUs_1 = numxMCUs;
0064ae12                                              
0064ae92                                              while (true)
0064ae92                                              {
0064ae97                                                  int32_t curxMCU_4 = (((&raw_coefs_2->raw_ptrs[edx_4][(curyMCU * 8)] + (arg1->jframe.comps[edx_4].hsampling * (curxMCU_1 << 4))) + (ebx_4 * ((numxMCUs_1 * ebp_4) * edx_5))) + (edx_5 * (numxMCUs_1 * (ebp_5 << 7))));
0064ae99                                                  int32_t i = 0;
0064aea6                                                  uint8_t* MCUBuf_5 = MCUBuf_2;
0064aea6                                                  
0064aef5                                                  do
0064aef5                                                  {
0064aeb0                                                      MCUBuf_4 = MCUBuf_5;
0064aeb3                                                      curxMCU_2 = curxMCU_4;
0064aeb7                                                      curyMCU_3 = 0x10;
0064aebf                                                      __g_memcpy(MCUBuf_4, curxMCU_2, 0x10, var_b0, MCUBuf_1);
0064aecc                                                      numxMCUs_1 = arg1->numxMCUs;
0064aed6                                                      comps = arg3->comps;
0064aee0                                                      edx_5 = *(uint32_t*)(&comps->hsampling + curyMCU_2);
0064aeec                                                      curxMCU_4 += ((numxMCUs_1 << 4) * edx_5);
0064aeee                                                      MCUBuf_5 = &MCUBuf_5[0x10];
0064aef1                                                      i += 1;
0064aef5                                                  } while (i < 8);
0064aef5                                                  
0064aef7                                                  MCUBuf_2 = MCUBuf_5;
0064af02                                                  curyMCU += 1;
0064af02                                                  
0064af05                                                  if (curyMCU >= edx_5)
0064af05                                                      break;
0064af05                                                  
0064ae37                                                  raw_coefs_2 = arg1->raw_coefs;
0064ae44                                                  ebx_4 = *(uint32_t*)(&comps->vsampling + curyMCU_2);
0064ae92                                              }
0064ae92                                              
0064af0b                                              numxMCUs = numxMCUs_1;
0064af20                                              raw_coefs_2 = arg1->raw_coefs;
0064af2d                                              ebx_4 = *(uint32_t*)(&comps->vsampling + curyMCU_2);
0064ae07                                          }
0064ae07                                          
0064af31                                          ebp_5 += 1;
0064af34                                      } while (ebp_5 < ebx_4);
0064af34                                      
0064af3a                                      raw_coefs_3 = raw_coefs_2;
0064af4c                                      ncomps = arg3->ncomps;
0064adc2                                  }
0064adc2                                  
0064af4e                                  edx_4 += 1;
0064af51                              } while (edx_4 < ncomps);
0064af51                              
0064af57                              raw_coefs_1 = raw_coefs_3;
0064af5b                              ebx = arg3;
0064af62                              MCUBuf_6 = arg1;
0064af69                              MCUBuf = MCUBuf_6->MCUBuf;
0064ad8b                          }
0064ad8b                          
0064af73                          if (raw_coefs_1->data_type != 0)
0064af73                          {
0064af75                              int32_t i_1 = (edx_3 - 1);
0064af75                              
0064af82                              if (edx_3 != 0)
0064af82                              {
0064af9c                                  do
0064af9c                                  {
0064af90                                      *(uint16_t*)MCUBuf -= 0x80;
0064af95                                      MCUBuf = &MCUBuf[2];
0064af98                                      i_1 -= 1;
0064af9c                                  } while (i_1 != 0xffffffff);
0064af9c                                  
0064af9e                                  MCUBuf = MCUBuf_6->MCUBuf;
0064afa4                                  raw_coefs_1 = MCUBuf_6->raw_coefs;
0064af82                              }
0064af73                          }
0064ad81                      }
0064ad81                      
0064afbc                      if (((raw_coefs_1 == 0 || raw_coefs_1->data_type != 0) && var_54 > 0))
0064afbc                      {
0064afc3                          uint8_t* MCUBuf_3 = MCUBuf;
0064afc9                          int32_t ebx_8 = 0;
0064afc9                          
0064afe0                          do
0064afe0                          {
0064afd1                              MCUBuf_4 = MCUBuf_3;
0064afd4                              *(uint32_t*)((char*)ctx + 0x44)(MCUBuf_4, curxMCU_2, curyMCU_3, var_b0, MCUBuf_1);
0064afd7                              MCUBuf_3 = &MCUBuf_3[0x80];
0064afdd                              ebx_8 += 1;
0064afe0                          } while (ebx_8 < var_54);
0064afe0                          
0064afea                          ebx = arg3;
0064aff1                          MCUBuf_6 = arg1;
0064afbc                      }
0064afbc                      
0064aff8                      curyMCU = 0;
0064affa                      ncomps = ebx->ncomps;
0064affa                      
0064affe                      if (ncomps > 0)
0064affe                      {
0064b004                          struct _SCAN* edx_9 = ebx;
0064b004                          
0064b0b4                          do
0064b0b4                          {
0064b00f                              if (*(uint32_t*)(&var_a4 + (curyMCU << 2)) > 0)
0064b00f                              {
0064b02a                                  int32_t i_2 = 0;
0064b097                                  int32_t result_3;
0064b097                                  
0064b097                                  do
0064b097                                  {
0064b037                                      struct _RAW_DATA_TYPES_STATE* raw_coefs = arg1->raw_coefs;
0064b037                                      
0064b045                                      if ((raw_coefs == 0 || raw_coefs->data_type != 0))
0064b052                                          *(uint32_t*)((char*)ctx + 0x104)(MCUBuf, *(uint32_t*)(&var_74 + (curyMCU << 2)), curyMCU_3, var_b0, MCUBuf_1);
0064b052                                      
0064b063                                      MCUBuf_4 = arg2;
0064b06a                                      curxMCU_2 = *(uint32_t*)(&var_94 + (curyMCU << 2));
0064b072                                      curyMCU_3 = *(uint32_t*)(&var_84 + (curyMCU << 2));
0064b076                                      var_b0 = &edx_9->dc_diff;
0064b07a                                      MCUBuf_1 = MCUBuf;
0064b07e                                      result_3 = *(uint32_t*)((char*)ctx + 0xf0)(MCUBuf_4, curxMCU_2, curyMCU_3, var_b0, MCUBuf_1);
0064b07e                                      
0064b086                                      if (result_3 != 0)
0064b086                                      {
0064b170                                          result = result_3;
0064b172                                          ctx = ctx;
0064b174                                          goto label_64b102;
0064b086                                      }
0064b086                                      
0064b08c                                      MCUBuf = &MCUBuf[0x80];
0064b092                                      i_2 += 1;
0064b097                                  } while (i_2 < *(uint32_t*)(&var_a4 + (curyMCU << 2)));
0064b097                                  
0064b099                                  result_2 = result_3;
0064b0a5                                  ebx = arg3;
0064b0ac                                  ncomps = ebx->ncomps;
0064b00f                              }
0064b00f                              
0064b0ae                              edx_9 = &edx_9->gray_scale;
0064b0b1                              curyMCU += 1;
0064b0b4                          } while (curyMCU < ncomps);
0064b0b4                          
0064b0ba                          MCUBuf_6 = arg1;
0064affe                      }
0064affe                      
0064b0c6                      if (MCUBuf_6->interrupt != 0)
0064b0c6                      {
0064b11a                          ctx = ctx;
0064b11e                          MCUBuf_6->roi.right = curxMCU_1;
0064b125                          MCUBuf_6->roi.bottom = curyMCU_1;
0064b129                          int32_t temp1_1 = (((int64_t)(curxMCU_1 + 1)) % MCUBuf_6->numxMCUs);
0064b12d                          ebx->curxMCU = temp1_1;
0064b12d                          
0064b130                          if (temp1_1 != 0)
0064b138                              ebx->curyMCU = curyMCU_1;
0064b130                          else
0064b133                              ebx->curyMCU = (curyMCU_1 + 1);
0064b133                          
0064b13b                          result = 1;
0064b140                          break;
0064b0c6                      }
0064b0c6                      
0064b0cc                      int32_t curxMCU_3 = (curxMCU_1 + 1);
0064b0cd                      int32_t numxMCUs_2 = MCUBuf_6->numxMCUs;
0064b0d0                      curxMCU_1 = curxMCU_3;
0064b0d6                      numxMCUs = numxMCUs_2;
0064b0d6                      
0064b0dd                      if (curxMCU_3 >= numxMCUs_2)
0064b0dd                      {
0064b0e3                          ncomps_2 = ncomps;
0064b0ea                          curyMCU = curyMCU_1;
0064b0ee                          numyMCUs_1 = MCUBuf_6->numyMCUs;
0064b0ee                          goto label_64b0f1;
0064b0dd                      }
0064ad73                  }
0064ad73                  
0064b0c6                  break;
0064ad3d              }
0064ad3d              
0064b0f1          label_64b0f1:
0064b0f1              curyMCU += 1;
0064b0f1              
0064b0f4              if (curyMCU >= numyMCUs_1)
0064b0f4              {
0064b0fa                  result = result_2;
0064b0fe                  ctx = ctx;
0064b0fe                  break;
0064b0f4              }
0064ad31          }
0064ad0e      }
0064ad0e      
0064b102  label_64b102:
0064b102      *(uint32_t*)((char*)ctx + 0x18)(MCUBuf_4, curxMCU_2, curyMCU_3, var_b0, MCUBuf_1);
0064b111      return result;
0064ac00  }

0064ae29                             8d b4 26 00 00 00 00                                                           ..&....
0064b167                       8b f6 8d bc 27 00 00 00 00                                                         ....'....
0064b195                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....

0064b1a0  enum _IJLERR Fill_coeffs_buffer(struct _JPEG_PROPERTIES* arg1)

0064b1a0  {
0064b1a7      struct _JPEG_PROPERTIES* esi = arg1;
0064b1ae      void* ctx = esi->state.ctx;
0064b1ba      int32_t ebx = 0;
0064b1c0      int32_t eax = 0;
0064b1c2      int16_t* coef_buffer = esi->coef_buffer;
0064b1c6      int32_t ncomps_2 = esi->jframe.ncomps;
0064b1ce      void var_7c;
0064b1ce      void var_6c;
0064b1ce      
0064b1ce      if (ncomps_2 > 0)
0064b1ce      {
0064b1d5          struct _FRAME_COMPONENT* comps = esi->jframe.comps;
0064b1d5          
0064b201          do
0064b201          {
0064b1e3              int32_t quant_sel = comps->quant_sel;
0064b1e6              int32_t ebp_2 = (comps->vsampling * comps->hsampling);
0064b1ea              eax += ebp_2;
0064b1ec              comps = &comps[1];
0064b1ef              *(uint32_t*)(&var_7c + (ebx << 2)) = ebp_2;
0064b1fa              *(uint32_t*)(&var_6c + (ebx << 2)) = esi->jEncFmtQuant[quant_sel];
0064b1fe              ebx += 1;
0064b201          } while (ebx < ncomps_2);
0064b1ce      }
0064b1ce      
0064b208      int32_t ebx_1 = 0;
0064b20a      int32_t numyMCUs = esi->numyMCUs;
0064b20a      
0064b20f      if (numyMCUs > 0)
0064b20f      {
0064b215          int32_t numxMCUs_1 = esi->numxMCUs;
0064b21a          int32_t edi_2 = (eax << 6);
0064b21a          
0064b4cb          do
0064b4cb          {
0064b234              if (numxMCUs_1 > 0)
0064b234              {
0064b23e                  uint8_t* MCUBuf_3 = nullptr;
0064b23e                  
0064b4bb                  do
0064b4bb                  {
0064b242                      uint8_t* MCUBuf_1 = esi->MCUBuf;
0064b248                      struct _RAW_DATA_TYPES_STATE* raw_coefs = esi->raw_coefs;
0064b250                      uint8_t* MCUBuf;
0064b250                      int32_t var_84;
0064b250                      
0064b250                      if (raw_coefs == 0)
0064b250                      {
0064b4e6                          MCUBuf = MCUBuf_3;
0064b4ee                          var_84 = ebx_1;
0064b4f2                          *(uint32_t*)((char*)ctx + 0x60)(esi, MCUBuf, var_84);
0064b250                      }
0064b250                      else
0064b250                      {
0064b256                          int32_t ebp_4 = 0;
0064b258                          int32_t ncomps = esi->jframe.ncomps;
0064b258                          
0064b260                          if (ncomps > 0)
0064b260                          {
0064b277                              uint8_t* MCUBuf_2 = MCUBuf_1;
0064b27b                              int32_t numxMCUs_2 = numxMCUs_1;
0064b27f                              struct _RAW_DATA_TYPES_STATE* raw_coefs_2 = raw_coefs;
0064b283                              struct _FRAME_COMPONENT* comps_1 = esi->jframe.comps;
0064b283                              
0064b3bc                              do
0064b3bc                              {
0064b28b                                  int32_t ecx_3 = 0;
0064b28f                                  int32_t ebx_3 = (ebp_4 << 4);
0064b296                                  int32_t ebx_4 = *(uint32_t*)(&comps_1->vsampling + ebx_3);
0064b296                                  
0064b29c                                  if (ebx_4 > 0)
0064b29c                                  {
0064b2a6                                      int32_t eax_2 = *(uint32_t*)(&comps_1->hsampling + ebx_3);
0064b2aa                                      int32_t edi_7 = (ebp_4 * 2);
0064b2b6                                      struct _RAW_DATA_TYPES_STATE* raw_coefs_1 = raw_coefs_2;
0064b2b6                                      
0064b3a5                                      do
0064b3a5                                      {
0064b2ba                                          int32_t edi_8 = 0;
0064b2ba                                          
0064b2be                                          if (eax_2 > 0)
0064b2be                                          {
0064b2c8                                              int32_t numxMCUs = numxMCUs_2;
0064b2cc                                              int32_t esi_1 = edi_7;
0064b2cc                                              
0064b2f5                                              while (true)
0064b2f5                                              {
0064b2f5                                                  int32_t ecx_4 = (numxMCUs << 7);
0064b321                                                  uint8_t* MCUBuf_4 = (((((ebx_4 * ((ecx_4 * ebx_1) * eax_2)) + *(uint32_t*)(&raw_coefs_1->raw_ptrs + (esi_1 << 1))) + ((MCUBuf_3 << 4) * eax_2)) + ((eax_2 * ecx_4) * ecx_3)) + (edi_8 << 4));
0064b323                                                  int32_t j = 0;
0064b32d                                                  uint8_t* MCUBuf_6 = MCUBuf_2;
0064b32d                                                  
0064b36e                                                  do
0064b36e                                                  {
0064b333                                                      MCUBuf = MCUBuf_4;
0064b337                                                      var_84 = 0x10;
0064b33f                                                      __g_memcpy(MCUBuf_6, MCUBuf, 0x10);
0064b34c                                                      numxMCUs = arg1->numxMCUs;
0064b34f                                                      comps_1 = arg1->jframe.comps;
0064b359                                                      eax_2 = *(uint32_t*)(&comps_1->hsampling + ebx_3);
0064b365                                                      MCUBuf_4 = &MCUBuf_4[((numxMCUs << 4) * eax_2)];
0064b367                                                      MCUBuf_6 = &MCUBuf_6[0x10];
0064b36a                                                      j += 1;
0064b36e                                                  } while (j < 8);
0064b36e                                                  
0064b370                                                  MCUBuf_2 = MCUBuf_6;
0064b378                                                  esi_1 = edi_7;
0064b37c                                                  edi_8 += 1;
0064b37c                                                  
0064b37f                                                  if (edi_8 >= eax_2)
0064b37f                                                      break;
0064b37f                                                  
0064b2e7                                                  raw_coefs_1 = arg1->raw_coefs;
0064b2f1                                                  ebx_4 = *(uint32_t*)(&comps_1->vsampling + ebx_3);
0064b2f5                                              }
0064b2f5                                              
0064b385                                              numxMCUs_2 = numxMCUs;
0064b38d                                              esi = arg1;
0064b394                                              raw_coefs_1 = esi->raw_coefs;
0064b39e                                              ebx_4 = *(uint32_t*)(&comps_1->vsampling + ebx_3);
0064b2be                                          }
0064b2be                                          
0064b3a2                                          ecx_3 += 1;
0064b3a5                                      } while (ecx_3 < ebx_4);
0064b3a5                                      
0064b3ab                                      raw_coefs_2 = raw_coefs_1;
0064b3b3                                      ncomps = esi->jframe.ncomps;
0064b29c                                  }
0064b29c                                  
0064b3b9                                  ebp_4 += 1;
0064b3bc                              } while (ebp_4 < ncomps);
0064b3bc                              
0064b3c2                              raw_coefs = raw_coefs_2;
0064b3c6                              MCUBuf_1 = esi->MCUBuf;
0064b260                          }
0064b260                          
0064b3d0                          if (raw_coefs->data_type != 0)
0064b3d0                          {
0064b3d2                              int32_t j_1 = (edi_2 - 1);
0064b3d2                              
0064b3dc                              if (edi_2 != 0)
0064b3dc                              {
0064b3eb                                  do
0064b3eb                                  {
0064b3e0                                      *(uint16_t*)MCUBuf_1 -= 0x80;
0064b3e4                                      MCUBuf_1 = &MCUBuf_1[2];
0064b3e7                                      j_1 -= 1;
0064b3eb                                  } while (j_1 != 0xffffffff);
0064b3eb                                  
0064b3ed                                  MCUBuf_1 = esi->MCUBuf;
0064b3dc                              }
0064b3d0                          }
0064b250                      }
0064b250                      
0064b3f3                      int32_t edi_13 = 0;
0064b3f3                      
0064b3fb                      if (eax > 0)
0064b3fb                      {
0064b402                          uint8_t* MCUBuf_5 = MCUBuf_1;
0064b402                          
0064b41f                          do
0064b41f                          {
0064b413                              *(uint32_t*)((char*)ctx + 0x44)(MCUBuf_5, MCUBuf, var_84);
0064b416                              MCUBuf_5 = &MCUBuf_5[0x80];
0064b41c                              edi_13 += 1;
0064b41f                          } while (edi_13 < eax);
0064b41f                          
0064b425                          esi = arg1;
0064b3fb                      }
0064b3fb                      
0064b42c                      int32_t ebp_8 = 0;
0064b42e                      int32_t ncomps_1 = esi->jframe.ncomps;
0064b42e                      
0064b436                      if (ncomps_1 > 0)
0064b436                      {
0064b438                          struct _JPEG_PROPERTIES* edx_5 = esi;
0064b438                          
0064b47e                          do
0064b47e                          {
0064b43e                              int32_t j_2 = 0;
0064b43e                              
0064b446                              if (*(uint32_t*)(&var_7c + (ebp_8 << 2)) > 0)
0064b446                              {
0064b46c                                  do
0064b46c                                  {
0064b45b                                      *(uint32_t*)((char*)ctx + 0x104)(MCUBuf_1, *(uint32_t*)(&var_6c + (ebp_8 << 2)), var_84);
0064b461                                      MCUBuf_1 = &MCUBuf_1[0x80];
0064b467                                      j_2 += 1;
0064b46c                                  } while (j_2 < *(uint32_t*)(&var_7c + (ebp_8 << 2)));
0064b46c                                  
0064b46e                                  edx_5 = arg1;
0064b475                                  ncomps_1 = edx_5->jframe.ncomps;
0064b446                              }
0064b446                              
0064b47b                              ebp_8 += 1;
0064b47e                          } while (ebp_8 < ncomps_1);
0064b47e                          
0064b480                          esi = edx_5;
0064b436                      }
0064b436                      
0064b493                      MCUBuf = esi->MCUBuf;
0064b497                      var_84 = (eax << 7);
0064b49b                      __g_memcpy(coef_buffer, MCUBuf, var_84);
0064b4ae                      numxMCUs_1 = esi->numxMCUs;
0064b4b3                      coef_buffer = &coef_buffer[(eax * 0x40)];
0064b4b7                      MCUBuf_3 = &MCUBuf_3[1];
0064b4bb                  } while (&MCUBuf_3[1] < numxMCUs_1);
0064b4bb                  
0064b4c5                  numyMCUs = esi->numyMCUs;
0064b234              }
0064b234              
0064b4c8              ebx_1 += 1;
0064b4cb          } while (ebx_1 < numyMCUs);
0064b20f      }
0064b20f      
0064b4da      return 0;
0064b1a0  }

0064b2d2                                                        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                    ..&......'....
0064b4fa                                                                                8d b6 00 00 00 00                            ......

0064b500  enum _IJLERR Gather_statistics(struct _JPEG_PROPERTIES* arg1, struct _STATE* arg2, struct _SCAN* arg3, int32_t (* const arg4)[0x101])

0064b500  {
0064b500      int32_t edi;
0064b500      int32_t var_4 = edi;
0064b50a      struct _JPEG_PROPERTIES* eax = arg1;
0064b51d      void* ctx = arg2->ctx;
0064b524      int32_t ebp = 0;
0064b526      int32_t ncomps_1 = eax->jframe.ncomps;
0064b52c      int32_t var_64 = 0;
0064b539      void var_60;
0064b539      
0064b539      if (ncomps_1 > 0)
0064b539      {
0064b53b          struct _FRAME_COMPONENT* comps_1 = eax->jframe.comps;
0064b543          int32_t edx_1 = 0;
0064b546          int32_t esi_1 = 0;
0064b546          
0064b568          do
0064b568          {
0064b554              int32_t edi_3 = (*(uint32_t*)(&comps_1->vsampling + edx_1) * *(uint32_t*)(&comps_1->hsampling + edx_1));
0064b559              *(uint32_t*)(&var_60 + (esi_1 << 2)) = edi_3;
0064b560              ebp += edi_3;
0064b562              edx_1 += 0x10;
0064b565              esi_1 += 1;
0064b568          } while (esi_1 < ncomps_1);
0064b539      }
0064b539      
0064b56a      int32_t ebp_1 = (ebp << 6);
0064b56d      int32_t numxMCUs = eax->numxMCUs;
0064b572      int32_t edx_3 = (ebp_1 * numxMCUs);
0064b593      int32_t* var_46c;
0064b593      int32_t (* var_468)[0x4];
0064b593      int16_t* start_spec;
0064b593      int32_t end_spec;
0064b593      int32_t approx_low;
0064b593      int32_t* var_458;
0064b593      int32_t* var_454;
0064b593      int32_t* var_450;
0064b593      
0064b593      if ((arg3->start_spec != 0 || arg3->end_spec != 0))
0064b593      {
0064b717          struct _SCAN_COMPONENT* comps_2 = arg3->comps;
0064b71c          struct _SCAN_COMPONENT* comps_3 = comps_2;
0064b723          int32_t comp = comps_2->comp;
0064b725          int32_t ebx_5 = ((int32_t)eax->HuffIdentifierAC[comp]);
0064b734          int32_t ebx_6 = 0;
0064b738          int32_t var_34_2 = 0;
0064b738          
0064b73f          if (comp > 0)
0064b73f          {
0064b748              if (comp >= 6)
0064b748              {
0064b74a                  int32_t edi_11 = (comp - 6);
0064b74d                  int32_t eax_6 = 0;
0064b754                  int32_t var_28_1 = edi_11;
0064b754                  
0064b788                  do
0064b788                  {
0064b775                      void var_5c;
0064b775                      void var_58;
0064b775                      void var_54;
0064b775                      int32_t eax_10 = ((((eax_6 + *(uint32_t*)(&var_60 + (ebx_6 << 2))) + *(uint32_t*)(&var_5c + (ebx_6 << 2))) + *(uint32_t*)(&var_58 + (ebx_6 << 2))) + *(uint32_t*)(&var_54 + (ebx_6 << 2)));
0064b77c                      eax_6 = (eax_10 + &ctx[ebx_6]);
0064b783                      ebx_6 += 5;
0064b788                  } while (ebx_6 <= edi_11);
0064b788                  
0064b78a                  var_34_2 = eax_6;
0064b791                  eax = arg1;
0064b748              }
0064b748              
0064b798              int32_t edi_12 = var_34_2;
0064b798              
0064b7aa              do
0064b7aa              {
0064b7a0                  edi_12 += *(uint32_t*)(&var_60 + (ebx_6 << 2));
0064b7a7                  ebx_6 += 1;
0064b7aa              } while (ebx_6 < comp);
0064b7aa              
0064b7ac              var_34_2 = edi_12;
0064b73f          }
0064b73f          
0064b7bc          int32_t numyMCUs = eax->numyMCUs;
0064b7c1          int32_t* esi_18;
0064b7c1          
0064b7c1          if (numyMCUs <= 0)
0064bad6              esi_18 = &arg4[ebx_5];
0064b7c1          else
0064b7c1          {
0064b7f0              int32_t* esi_10 = &arg4[ebx_5];
0064b80d              int32_t esi_11 = 0;
0064b814              int32_t vsampling = comps_3->vsampling;
0064b81b              int32_t numxMCUs_2 = numxMCUs;
0064b81b              
0064ba33              do
0064ba33              {
0064b829                  int32_t ecx_4 = 0;
0064b829                  
0064b82d                  if (vsampling > 0)
0064b82d                  {
0064b83d                      int32_t ebp_5 = 0;
0064b846                      int32_t numxMCUs_1 = numxMCUs_2;
0064b846                      
0064b85b                      while (true)
0064b85b                      {
0064b86f                          if ((((vsampling * 8) * esi_11) + ebp_5) >= eax->JPGHeight)
0064b86f                          {
0064baa0                              numxMCUs_2 = numxMCUs_1;
0064bab5                              numyMCUs = eax->numyMCUs;
0064bab8                              break;
0064b86f                          }
0064b86f                          
0064b879                          if (numxMCUs_1 > 0)
0064b879                          {
0064b897                              int32_t edx_18 = 0;
0064b89a                              int32_t var_18_1 = 0;
0064b8af                              int32_t hsampling = comps_3->hsampling;
0064b9f8                              int32_t ebp_12;
0064b9f8                              
0064b9f8                              do
0064b9f8                              {
0064b8db                                  int32_t ebp_9 = 0;
0064b8db                                  
0064b8df                                  if (hsampling > 0)
0064b8df                                  {
0064b8eb                                      int32_t ebx_9 = 0;
0064b8fc                                      int16_t* esi_17 = ((((vsampling << 7) * ecx_4) + (var_34_2 << 7)) + ((eax->coef_buffer + ((edx_3 * 2) * esi_11)) + edx_18));
0064b8fc                                      
0064b900                                      while (true)
0064b900                                      {
0064b91b                                          if ((((hsampling * 8) * var_18_1) + ebx_9) >= arg1->JPGWidth)
0064b91b                                          {
0064ba7c                                              eax = arg1;
0064ba83                                              numxMCUs_1 = eax->numxMCUs;
0064ba8d                                              vsampling = comps_3->vsampling;
0064ba90                                              break;
0064b91b                                          }
0064b91b                                          
0064b926                                          if (arg3->approx_high != 0)
0064b926                                          {
0064b97c                                              start_spec = arg3->start_spec;
0064b983                                              end_spec = arg3->end_spec;
0064b98a                                              approx_low = arg3->approx_low;
0064b98e                                              void var_44c;
0064b98e                                              var_458 = &var_44c;
0064b999                                              var_454 = &var_64;
0064b99d                                              var_450 = esi_10;
0064b9a1                                              Gather_Prog_AC_refine(arg2, esi_17, start_spec, end_spec, approx_low, var_458, var_454, var_450);
0064b926                                          }
0064b926                                          else
0064b926                                          {
0064b93f                                              start_spec = arg3->start_spec;
0064b943                                              end_spec = arg3->end_spec;
0064b94e                                              approx_low = arg3->approx_low;
0064b952                                              var_458 = esi_10;
0064b956                                              Gather_Prog_AC_first(arg2, esi_17, start_spec, end_spec, approx_low, var_458);
0064b926                                          }
0064b926                                          
0064b9a6                                          esi_17 = &esi_17[0x40];
0064b9ac                                          ebx_9 += 8;
0064b9af                                          ebp_9 += 1;
0064b9b0                                          struct _SCAN_COMPONENT* comps = arg3->comps;
0064b9b3                                          hsampling = comps->hsampling;
0064b9b8                                          comps_3 = comps;
0064b9b8                                          
0064b9bf                                          if (ebp_9 >= hsampling)
0064b9bf                                          {
0064b9cc                                              eax = arg1;
0064b9d3                                              numxMCUs_1 = eax->numxMCUs;
0064b9dd                                              vsampling = comps_3->vsampling;
0064b9dd                                              break;
0064b9bf                                          }
0064b900                                      }
0064b8df                                  }
0064b8df                                  
0064b9e0                                  edx_18 += (ebp_1 * 2);
0064b9ee                                  ebp_12 = (var_18_1 + 1);
0064b9ef                                  var_18_1 = ebp_12;
0064b9f8                              } while (ebp_12 < numxMCUs_1);
0064b879                          }
0064b879                          
0064ba0c                          ebp_5 += 8;
0064ba0f                          ecx_4 += 1;
0064ba0f                          
0064ba12                          if (ecx_4 >= vsampling)
0064ba12                          {
0064ba18                              numxMCUs_2 = numxMCUs_1;
0064ba2d                              numyMCUs = eax->numyMCUs;
0064ba2d                              break;
0064ba12                          }
0064b85b                      }
0064b82d                  }
0064b82d                  
0064ba30                  esi_11 += 1;
0064ba33              } while (esi_11 < numyMCUs);
0064ba33              
0064ba39              esi_18 = esi_10;
0064b7c1          }
0064b7c1          
0064ba47          var_46c = arg2;
0064ba4a          var_468 = esi_18;
0064ba4e          Gather_EOBRUN(var_46c, var_468);
0064ba53          var_64 = 0;
0064b593      }
0064b593      else
0064b593      {
0064b599          int32_t ebx_2 = 0;
0064b59b          int32_t numyMCUs_1 = eax->numyMCUs;
0064b59b          
0064b5a0          if (numyMCUs_1 > 0)
0064b5a0          {
0064b703              do
0064b703              {
0064b5b8                  int32_t esi_4 = 0;
0064b5b8                  
0064b5bc                  if (numxMCUs > 0)
0064b5bc                  {
0064b5d3                      int32_t ncomps = arg3->ncomps;
0064b5dc                      int32_t ebp_3 = 0;
0064b5dc                      
0064b6f0                      do
0064b6f0                      {
0064b5f3                          int32_t ebx_3 = 0;
0064b5f3                          
0064b600                          if (ncomps > 0)
0064b600                          {
0064b60d                              struct _SCAN* ecx_2 = arg3;
0064b610                              void* start_spec_2 = ((eax->coef_buffer + ((edx_3 * 2) * ebx_2)) + ebp_3);
0064b625                              int32_t* esi_5 = arg3;
0064b625                              
0064b6cf                              do
0064b6cf                              {
0064b62c                                  int32_t i = 0;
0064b62c                                  
0064b637                                  if (*(uint32_t*)(&var_60 + (ebx_3 << 2)) > 0)
0064b637                                  {
0064b64a                                      void* start_spec_1 = start_spec_2;
0064b64a                                      
0064b6b0                                      do
0064b6b0                                      {
0064b687                                          var_46c = &arg4[((int32_t)eax->HuffIdentifierDC[ebx_3])];
0064b68d                                          var_468 = &ecx_2->dc_diff;
0064b691                                          start_spec = start_spec_1;
0064b695                                          end_spec = esi_5[4];
0064b699                                          approx_low = esi_5[5];
0064b69d                                          Gather_Prog_DC_SA(var_46c, var_468, start_spec, end_spec, approx_low);
0064b6a2                                          start_spec_1 += 0x80;
0064b6a8                                          i += 1;
0064b6b0                                      } while (i < *(uint32_t*)(&var_60 + (ebx_3 << 2)));
0064b6b0                                      
0064b6b2                                      start_spec_2 = start_spec_1;
0064b6c0                                      eax = arg1;
0064b6c7                                      ncomps = *(uint32_t*)esi_5;
0064b637                                  }
0064b637                                  
0064b6c9                                  ecx_2 = &ecx_2->gray_scale;
0064b6cc                                  ebx_3 += 1;
0064b6cf                              } while (ebx_3 < ncomps);
0064b6cf                              
0064b6e3                              numxMCUs = eax->numxMCUs;
0064b600                          }
0064b600                          
0064b6e6                          ebp_3 += (ebp_1 * 2);
0064b6ed                          esi_4 += 1;
0064b6f0                      } while (esi_4 < numxMCUs);
0064b6f0                      
0064b6fd                      numyMCUs_1 = eax->numyMCUs;
0064b5bc                  }
0064b5bc                  
0064b700                  ebx_2 += 1;
0064b703              } while (ebx_2 < numyMCUs_1);
0064b5a0          }
0064b593      }
0064b593      
0064ba65      *(uint32_t*)((char*)ctx + 0x18)(var_46c, var_468, start_spec, end_spec, approx_low, var_458, var_454, var_450);
0064ba74      return 0;
0064b500  }

0064b70e                                            8b f6                                                                ..
0064b95d                                                                                         8d 76 00                               .v.
0064ba95                                                                 8d 74 26 00 8d bc 27 00 00 00 00                       .t&...'....
0064babd                                                                                         8d 76 00                               .v.
0064bade                                                                                            8b f6                                ..

0064bae0  enum _IJLERR Encode_Scan_P(struct _JPEG_PROPERTIES* arg1, struct _STATE* arg2, struct _SCAN* arg3)

0064bae0  {
0064baea      struct _JPEG_PROPERTIES* ecx = arg1;
0064baf1      struct _STATE* file_2 = arg2;
0064bb01      int32_t result = 0;
0064bb08      void* ctx = file_2->ctx;
0064bb0b      int32_t ebp = 0;
0064bb14      int32_t esi = 0;
0064bb16      int32_t ncomps_1 = ecx->jframe.ncomps;
0064bb1c      int32_t var_64 = 0;
0064bb29      void var_60;
0064bb29      
0064bb29      if (ncomps_1 > 0)
0064bb29      {
0064bb2b          struct _FRAME_COMPONENT* comps = ecx->jframe.comps;
0064bb3a          int32_t eax = 0;
0064bb44          esi = 0;
0064bb44          
0064bb68          do
0064bb68          {
0064bb54              int32_t ecx_2 = (*(uint32_t*)(&comps->vsampling + eax) * *(uint32_t*)(&comps->hsampling + eax));
0064bb59              *(uint32_t*)(&var_60 + (ebp << 2)) = ecx_2;
0064bb60              esi += ecx_2;
0064bb62              eax += 0x10;
0064bb65              ebp += 1;
0064bb68          } while (ebp < ncomps_1);
0064bb68          
0064bb6a          file_2 = arg2;
0064bb71          ecx = arg1;
0064bb29      }
0064bb29      
0064bb78      int32_t esi_3 = (esi << 6);
0064bb7d      int32_t i = 0;
0064bb7f      int32_t ebp_2 = (esi_3 * ecx->numxMCUs);
0064bb7f      
0064bb87      if (arg3->ncomps > 0)
0064bb87      {
0064bb8e          int32_t* eax_2 = nullptr;
0064bb8e          
0064bbe0          do
0064bbe0          {
0064bba3              int32_t ebx_2 = *(uint32_t*)((char*)eax_2 + arg3->comps);
0064bba6              arg3->dc_diff[i] = 0;
0064bbc0              i += 1;
0064bbc1              *(uint32_t*)(&arg3->comps->dc_table + eax_2) = ecx->jEncFmtDcHuffman[((int32_t)ecx->HuffIdentifierDC[ebx_2])];
0064bbd7              *(uint32_t*)(&arg3->comps->ac_table + eax_2) = ecx->jEncFmtAcHuffman[((int32_t)ecx->HuffIdentifierAC[ebx_2])];
0064bbdb              eax_2 = &eax_2[6];
0064bbe0          } while (i < arg3->ncomps);
0064bbe0          
0064bbf0          file_2 = arg2;
0064bb87      }
0064bb87      
0064bbf7      int32_t bitbuf_bits_valid = 8;
0064bbfc      file_2->bitbuf_bits_valid = 8;
0064bc13      struct _STATE* file_1;
0064bc13      struct _HUFFMAN_TABLE* var_468;
0064bc13      int32_t (* var_464)[0x4];
0064bc13      void* start_spec;
0064bc13      int32_t end_spec;
0064bc13      int32_t approx_low;
0064bc13      uint8_t* var_454;
0064bc13      int32_t* var_450;
0064bc13      int32_t var_50;
0064bc13      
0064bc13      if ((arg3->start_spec != 0 || arg3->end_spec != 0))
0064bc13      {
0064bdad          int32_t* comps_1 = arg3->comps;
0064bdb2          int32_t* comps_3 = comps_1;
0064bdb9          int32_t eax_9 = *(uint32_t*)comps_1;
0064bdbd          int32_t i_3 = 0;
0064bdc4          int32_t edx_6 = 0;
0064bdc9          int32_t var_40_1 = 0;
0064bdc9          
0064bdd0          if (eax_9 > 0)
0064bdd0          {
0064bdd9              if (eax_9 >= 6)
0064bdd9              {
0064bdde                  int32_t i_1 = 0;
0064bdec                  edx_6 = 0;
0064bdec                  
0064be28                  do
0064be28                  {
0064be15                      void var_5c;
0064be15                      void var_58;
0064be15                      void var_54;
0064be15                      int32_t edx_11 = ((((edx_6 + *(uint32_t*)(&var_60 + (i_1 << 2))) + *(uint32_t*)(&var_5c + (i_1 << 2))) + *(uint32_t*)(&var_58 + (i_1 << 2))) + *(uint32_t*)(&var_54 + (i_1 << 2)));
0064be1c                      edx_6 = (edx_11 + &var_50[i_1]);
0064be23                      i_1 += 5;
0064be28                  } while (i_1 <= (eax_9 - 6));
0064be28                  
0064be2a                  int32_t var_40_2 = edx_6;
0064be31                  file_2 = arg2;
0064be38                  i_3 = i_1;
0064bdd9              }
0064bdd9              
0064be46              int32_t ecx_9 = edx_6;
0064be48              int32_t i_4 = i_3;
0064be48              
0064be5a              do
0064be5a              {
0064be50                  ecx_9 += *(uint32_t*)(&var_60 + (i_4 << 2));
0064be57                  i_4 += 1;
0064be5a              } while (i_4 < eax_9);
0064be5a              
0064be5c              var_40_1 = ecx_9;
0064be63              ecx = arg1;
0064bdd0          }
0064bdd0          
0064be73          int32_t numyMCUs_1 = ecx->numyMCUs;
0064be78          void var_44c;
0064be78          
0064be78          if (numyMCUs_1 > 0)
0064be78          {
0064be9d              int32_t ebx_8 = 0;
0064beab              int32_t edx_16 = comps_3[2];
0064beab              
0064c0d6              do
0064c0d6              {
0064beb9                  int32_t esi_7 = 0;
0064beb9                  
0064bebd                  if (edx_16 > 0)
0064bebd                  {
0064becd                      int32_t eax_10 = 0;
0064bed6                      int32_t* comps_2 = comps_3;
0064bed6                      
0064beeb                      while (true)
0064beeb                      {
0064beff                          if ((((edx_16 * 8) * ebx_8) + eax_10) >= ecx->JPGHeight)
0064beff                          {
0064c210                              comps_3 = comps_2;
0064c225                              numyMCUs_1 = ecx->numyMCUs;
0064c228                              break;
0064beff                          }
0064beff                          
0064bf07                          int32_t var_34_1 = 0;
0064bf0e                          int32_t numxMCUs_1 = ecx->numxMCUs;
0064bf0e                          
0064bf13                          if (numxMCUs_1 > 0)
0064bf13                          {
0064bf32                              int32_t var_30_2 = 0;
0064bf40                              int32_t eax_11 = comps_2[1];
0064c09b                              bool cond:3_1;
0064c09b                              
0064c09b                              do
0064c09b                              {
0064bf7c                                  int32_t var_1c_2 = 0;
0064bf7c                                  
0064bf83                                  if (eax_11 > 0)
0064bf83                                  {
0064bf90                                      int32_t ebp_15 = 0;
0064bf99                                      int16_t* esi_13 = ((((edx_16 << 7) * esi_7) + (var_40_1 << 7)) + ((ecx->coef_buffer + ((ebp_2 * 2) * ebx_8)) + var_30_2));
0064bf99                                      
0064bfa0                                      while (true)
0064bfa0                                      {
0064bfbb                                          if ((((eax_11 * 8) * var_34_1) + ebp_15) >= arg1->JPGWidth)
0064bfbb                                          {
0064c1ef                                              ecx = arg1;
0064c1f6                                              numxMCUs_1 = ecx->numxMCUs;
0064c1f9                                              edx_16 = comps_2[2];
0064c1fc                                              break;
0064bfbb                                          }
0064bfbb                                          
0064bfc6                                          if (arg3->approx_high != 0)
0064bfc6                                          {
0064c025                                              start_spec = arg3->start_spec;
0064c029                                              end_spec = arg3->end_spec;
0064c031                                              approx_low = arg3->approx_low;
0064c035                                              var_454 = &var_44c;
0064c039                                              var_450 = &var_64;
0064c03d                                              Encode_Prog_AC_refine(arg2, comps_2[4], esi_13, start_spec, end_spec, approx_low, var_454, var_450);
0064bfc6                                          }
0064bfc6                                          else
0064bfc6                                          {
0064bfe6                                              start_spec = arg3->start_spec;
0064bfea                                              end_spec = arg3->end_spec;
0064bfee                                              approx_low = arg3->approx_low;
0064bff2                                              Encode_Prog_AC_first(arg2, comps_2[4], esi_13, start_spec, end_spec, approx_low);
0064bfc6                                          }
0064bfc6                                          
0064c042                                          esi_13 = &esi_13[0x40];
0064c048                                          ebp_15 += 8;
0064c052                                          int32_t edx_21 = (var_1c_2 + 1);
0064c053                                          comps_2 = arg3->comps;
0064c056                                          eax_11 = comps_2[1];
0064c059                                          var_1c_2 = edx_21;
0064c059                                          
0064c062                                          if (edx_21 >= eax_11)
0064c062                                          {
0064c068                                              ecx = arg1;
0064c06f                                              numxMCUs_1 = ecx->numxMCUs;
0064c072                                              edx_16 = comps_2[2];
0064c072                                              break;
0064c062                                          }
0064bfa0                                      }
0064bf83                                  }
0064bf83                                  
0064c08b                                  cond:3_1 = (var_34_1 + 1) < numxMCUs_1;
0064c08d                                  var_30_2 += (esi_3 * 2);
0064c094                                  var_34_1 += 1;
0064c09b                              } while (cond:3_1);
0064bf13                          }
0064bf13                          
0064c0af                          eax_10 += 8;
0064c0b2                          esi_7 += 1;
0064c0b2                          
0064c0b5                          if (esi_7 >= edx_16)
0064c0b5                          {
0064c0bb                              comps_3 = comps_2;
0064c0d0                              numyMCUs_1 = ecx->numyMCUs;
0064c0d0                              break;
0064c0b5                          }
0064beeb                      }
0064bebd                  }
0064bebd                  
0064c0d3                  ebx_8 += 1;
0064c0d6              } while (ebx_8 < numyMCUs_1);
0064c0d6              
0064c0dc              file_2 = arg2;
0064be78          }
0064be78          
0064c0f4          Encode_EOBRUN(file_2, comps_3[4]);
0064c0f9          file_1 = file_2;
0064c107          var_468 = &var_44c;
0064c10b          var_464 = &var_64;
0064c10f          Append_BR_bits(file_1, var_468, var_464);
0064c114          var_64 = 0;
0064c11f          bitbuf_bits_valid = file_2->bitbuf_bits_valid;
0064bc13      }
0064bc13      else
0064bc13      {
0064bc22          int32_t numyMCUs_2 = ecx->numyMCUs;
0064bc22          
0064bc2e          if (numyMCUs_2 > 0)
0064bc2e          {
0064bc34              int32_t numxMCUs = ecx->numxMCUs;
0064bc42              int32_t numyMCUs = numyMCUs_2;
0064bc50              int32_t ebp_7 = 0;
0064bc50              
0064bd98              do
0064bd98              {
0064bc57                  int32_t edi_1 = 0;
0064bc57                  
0064bc5b                  if (numxMCUs > 0)
0064bc5b                  {
0064bc68                      int32_t ncomps = arg3->ncomps;
0064bc7b                      int32_t esi_5 = 0;
0064bc7b                      
0064bd85                      do
0064bd85                      {
0064bc92                          int32_t ebx_6 = 0;
0064bc9b                          void* start_spec_1 = ((ecx->coef_buffer + ((ebp_2 * 2) * ebp_7)) + esi_5);
0064bc9b                          
0064bc9f                          if (ncomps > 0)
0064bc9f                          {
0064bcac                              struct _SCAN* edx_3 = arg3;
0064bcbd                              int32_t* edi_2 = arg3;
0064bcbd                              
0064bd5d                              do
0064bd5d                              {
0064bccf                                  if (*(uint32_t*)(&var_60 + (ebx_6 << 2)) > 0)
0064bccf                                  {
0064bcf5                                      int32_t i_2 = 0;
0064bcf5                                      
0064bd4c                                      do
0064bd4c                                      {
0064bd15                                          file_1 = arg2;
0064bd1f                                          var_468 = *(uint32_t*)(((ebx_6 * 0x18) + edi_2[0xd]) + 0xc);
0064bd29                                          var_464 = &edx_3->dc_diff;
0064bd2d                                          start_spec = start_spec_1;
0064bd31                                          end_spec = edi_2[4];
0064bd35                                          approx_low = edi_2[5];
0064bd39                                          Encode_Prog_DC_SA(file_1, var_468, var_464, start_spec, end_spec, approx_low);
0064bd3e                                          start_spec_1 += 0x80;
0064bd44                                          i_2 += 1;
0064bd4c                                      } while (i_2 < *(uint32_t*)(&var_60 + (ebx_6 << 2)));
0064bd4c                                      
0064bd55                                      ncomps = *(uint32_t*)edi_2;
0064bccf                                  }
0064bccf                                  
0064bd57                                  edx_3 = &edx_3->gray_scale;
0064bd5a                                  ebx_6 += 1;
0064bd5d                              } while (ebx_6 < ncomps);
0064bd5d                              
0064bd71                              ecx = arg1;
0064bd78                              numxMCUs = ecx->numxMCUs;
0064bc9f                          }
0064bc9f                          
0064bd7b                          esi_5 += (esi_3 * 2);
0064bd82                          edi_1 += 1;
0064bd85                      } while (edi_1 < numxMCUs);
0064bd85                      
0064bd92                      numyMCUs = ecx->numyMCUs;
0064bc5b                  }
0064bc5b                  
0064bd95                  ebp_7 += 1;
0064bd98              } while (ebp_7 < numyMCUs);
0064bd98              
0064bd9e              file_2 = arg2;
0064bda5              bitbuf_bits_valid = file_2->bitbuf_bits_valid;
0064bc2e          }
0064bc13      }
0064bc13      
0064c125      if (bitbuf_bits_valid < 8)
0064c125      {
0064c12b          uint8_t* edx_23 = file_2->cur_entropy_ptr;
0064c12b          
0064c131          if (edx_23 < file_2->end_entropy_ptr)
0064c131              goto label_64c190;
0064c131          
0064c133          void* file = file_2->file;
0064c133          
0064c138          if (file != 0)
0064c138          {
0064c14b              file_1 = file;
0064c158              var_468 = &file_2->JPGBuffer;
0064c15c              var_464 = 0x1000;
0064c164              start_spec = &var_50;
0064c164              
0064c17d              if ((_ownWriteFile(file_1, var_468, 0x1000, start_spec) == 0 || var_50 != 0x1000))
0064c184                  result = 0xffffffe9;
0064c17d              else
0064c17d              {
0064c18d                  edx_23 = file_2->start_entropy_ptr;
0064c190              label_64c190:
0064c190                  uint32_t eax_21 = ((uint32_t)file_2->bit_buffer_64);
0064c196                  file_2->cur_entropy_ptr = &edx_23[1];
0064c199                  *(uint8_t*)edx_23 = eax_21;
0064c19b                  file_2->entropy_bytes_processed += 1;
0064c19b                  
0064c1a3                  if (eax_21 == 0xff)
0064c1a3                  {
0064c1a5                      uint8_t* cur_entropy_ptr = file_2->cur_entropy_ptr;
0064c1ab                      file_2->cur_entropy_ptr = &cur_entropy_ptr[1];
0064c1ae                      *(uint8_t*)cur_entropy_ptr = 0;
0064c1b1                      file_2->entropy_bytes_processed += 1;
0064c1a3                  }
0064c1a3                  
0064c1bc                  file_2->bit_buffer_64 = 0;
0064c1be                  *(uint32_t*)((char*)file_2->bit_buffer_64)[4] = 0;
0064c1be                  
0064c1c1                  if (file_2->processor_type <= IJL_PENTIUM_PRO_PROC)
0064c1cc                      file_2->bitbuf_bits_valid = 8;
0064c1c1                  else
0064c1c3                      file_2->bitbuf_bits_valid = 0;
0064c17d              }
0064c138          }
0064c138          else
0064c13f              result = 0xffffffe4;
0064c125      }
0064c125      
0064c1da      *(uint32_t*)((char*)ctx + 0x18)(file_1, var_468, var_464, start_spec, end_spec, approx_low, var_454, var_450);
0064c1ee      return result;
0064bae0  }

0064bff9                                                                             8d b4 26 00 00 00 00                           ..&....
0064c201     90 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                   ...&......'....
0064c22d                                         8d 76 00                                                               .v.

0064c230  enum _IJLERR Encode_Scan_WRst(struct _JPEG_PROPERTIES* arg1, struct _STATE* arg2, struct _SCAN* arg3)

0064c230  {
0064c23a      struct _JPEG_PROPERTIES* MCUBuf_7 = arg1;
0064c248      struct _SCAN* ebp = arg3;
0064c251      int32_t var_3c = 0;
0064c258      enum _IJLERR result = IJL_OK;
0064c25a      void* ctx = arg2->ctx;
0064c25d      int32_t eax = 0;
0064c25f      int32_t ncomps_1 = ebp->ncomps;
0064c264      int32_t ncomps_2 = ncomps_1;
0064c26b      void var_a4;
0064c26b      void var_94;
0064c26b      void var_84;
0064c26b      void var_74;
0064c26b      
0064c26b      if (ncomps_1 > 0)
0064c26b      {
0064c276          int32_t edi_1 = 0;
0064c27b          int32_t edx = 0;
0064c27e          enum _IJLERR result_1 = IJL_OK;
0064c286          int32_t ecx_1 = 0;
0064c286          
0064c302          do
0064c302          {
0064c298              if (MCUBuf_7->jscan == 0)
0064c298              {
0064c806                  int32_t* ebp_24 = arg3;
0064c80d                  ebp_24[(eax + 9)] = 0;
0064c818                  ncomps_2 = *(uint32_t*)ebp_24;
0064c298              }
0064c298              
0064c2a5              struct _SCAN_COMPONENT* comps = arg3->comps;
0064c2ac              int32_t ebp_4 = (*(uint32_t*)(&comps->vsampling + edi_1) * *(uint32_t*)(&comps->hsampling + edi_1));
0064c2b1              ecx_1 += ebp_4;
0064c2b3              edi_1 += 0x18;
0064c2b6              *(uint32_t*)(&var_a4 + (eax << 2)) = ebp_4;
0064c2c9              *(uint32_t*)(&var_94 + (eax << 2)) = MCUBuf_7->jEncFmtDcHuffman[((int32_t)MCUBuf_7->HuffIdentifierDC[eax])];
0064c2dc              *(uint32_t*)(&var_84 + (eax << 2)) = MCUBuf_7->jEncFmtAcHuffman[((int32_t)MCUBuf_7->HuffIdentifierAC[eax])];
0064c2ea              int32_t ebp_11 = MCUBuf_7->jEncFmtQuant[*(uint32_t*)(&MCUBuf_7->jframe.comps->quant_sel + edx)];
0064c2f1              edx += 0x10;
0064c2f4              *(uint32_t*)(&var_74 + (eax << 2)) = ebp_11;
0064c2f8              eax += 1;
0064c302          } while (eax < ncomps_2);
0064c302          
0064c304          var_3c = ecx_1;
0064c30b          result = result_1;
0064c313          ebp = arg3;
0064c26b      }
0064c26b      
0064c31a      int32_t curyMCU = ebp->curyMCU;
0064c31d      int32_t numyMCUs = MCUBuf_7->numyMCUs;
0064c322      uint8_t* MCUBuf_4;
0064c322      struct _STATE* curxMCU_2;
0064c322      int32_t curyMCU_1;
0064c322      int32_t (* var_b0)[0x4];
0064c322      uint8_t* MCUBuf_1;
0064c322      
0064c322      if (curyMCU < numyMCUs)
0064c322      {
0064c32b          enum _IJLERR result_2 = result;
0064c32f          int32_t numxMCUs = MCUBuf_7->numxMCUs;
0064c333          int32_t eax_2 = var_3c;
0064c333          
0064c76e          do
0064c76e          {
0064c33e              int32_t curxMCU = ebp->curxMCU;
0064c347              int32_t curxMCU_1 = curxMCU;
0064c347              
0064c34b              if (curxMCU < numxMCUs)
0064c34b              {
0064c353                  int32_t ecx_4 = (eax_2 << 6);
0064c373                  int32_t ncomps = ncomps_2;
0064c373                  
0064c381                  while (true)
0064c381                  {
0064c381                      uint8_t* MCUBuf = MCUBuf_7->MCUBuf;
0064c387                      struct _RAW_DATA_TYPES_STATE* raw_coefs = MCUBuf_7->raw_coefs;
0064c387                      
0064c38f                      if (raw_coefs == 0)
0064c38f                      {
0064c79a                          MCUBuf_4 = MCUBuf_7;
0064c7a8                          curxMCU_2 = curxMCU_1;
0064c7b0                          curyMCU_1 = curyMCU;
0064c7b4                          *(uint32_t*)((char*)ctx + 0x60)(MCUBuf_4, curxMCU_2, curyMCU_1, var_b0, MCUBuf_1);
0064c7b7                          raw_coefs = MCUBuf_7->raw_coefs;
0064c38f                      }
0064c38f                      else
0064c38f                      {
0064c395                          int32_t edx_3 = 0;
0064c395                          
0064c399                          if (ncomps > 0)
0064c399                          {
0064c3b0                              uint8_t* MCUBuf_2 = MCUBuf;
0064c3b4                              struct _RAW_DATA_TYPES_STATE* raw_coefs_3 = raw_coefs;
0064c3bf                              struct _SCAN_COMPONENT* comps_1 = ebp->comps;
0064c3bf                              
0064c548                              do
0064c548                              {
0064c3c6                                  int32_t eax_3 = 0;
0064c3cd                                  int32_t ebp_13 = (edx_3 * 0x18);
0064c3d0                                  int32_t ebx_2 = *(uint32_t*)(&comps_1->vsampling + ebp_13);
0064c3d0                                  
0064c3d6                                  if (ebx_2 > 0)
0064c3d6                                  {
0064c3f3                                      struct _RAW_DATA_TYPES_STATE* raw_coefs_2 = raw_coefs_3;
0064c406                                      int32_t edx_4 = *(uint32_t*)(&comps_1->hsampling + ebp_13);
0064c406                                      
0064c52b                                      do
0064c52b                                      {
0064c414                                          int32_t ecx_7 = 0;
0064c414                                          
0064c418                                          if (edx_4 > 0)
0064c418                                          {
0064c431                                              int32_t numxMCUs_1 = numxMCUs;
0064c431                                              
0064c496                                              while (true)
0064c496                                              {
0064c49b                                                  struct _STATE* curxMCU_4 = (((&raw_coefs_2->raw_ptrs[edx_3][(ecx_7 * 8)] + (arg1->jframe.comps[edx_3].hsampling * (curxMCU_1 << 4))) + (ebx_2 * ((numxMCUs_1 * (curyMCU << 7)) * edx_4))) + (edx_4 * (numxMCUs_1 * (eax_3 << 7))));
0064c49d                                                  int32_t i = 0;
0064c4aa                                                  uint8_t* MCUBuf_5 = MCUBuf_2;
0064c4aa                                                  
0064c4f2                                                  do
0064c4f2                                                  {
0064c4b0                                                      MCUBuf_4 = MCUBuf_5;
0064c4b3                                                      curxMCU_2 = curxMCU_4;
0064c4b7                                                      curyMCU_1 = 0x10;
0064c4bf                                                      __g_memcpy(MCUBuf_4, curxMCU_2, 0x10, var_b0, MCUBuf_1);
0064c4cc                                                      numxMCUs_1 = arg1->numxMCUs;
0064c4d6                                                      comps_1 = arg3->comps;
0064c4dd                                                      edx_4 = *(uint32_t*)(&comps_1->hsampling + ebp_13);
0064c4e9                                                      curxMCU_4 += ((numxMCUs_1 << 4) * edx_4);
0064c4eb                                                      MCUBuf_5 = &MCUBuf_5[0x10];
0064c4ee                                                      i += 1;
0064c4f2                                                  } while (i < 8);
0064c4f2                                                  
0064c4f4                                                  MCUBuf_2 = MCUBuf_5;
0064c4ff                                                  ecx_7 += 1;
0064c4ff                                                  
0064c502                                                  if (ecx_7 >= edx_4)
0064c502                                                      break;
0064c502                                                  
0064c447                                                  raw_coefs_2 = arg1->raw_coefs;
0064c451                                                  ebx_2 = *(uint32_t*)(&comps_1->vsampling + ebp_13);
0064c496                                              }
0064c496                                              
0064c508                                              numxMCUs = numxMCUs_1;
0064c51a                                              raw_coefs_2 = arg1->raw_coefs;
0064c524                                              ebx_2 = *(uint32_t*)(&comps_1->vsampling + ebp_13);
0064c418                                          }
0064c418                                          
0064c528                                          eax_3 += 1;
0064c52b                                      } while (eax_3 < ebx_2);
0064c52b                                      
0064c531                                      raw_coefs_3 = raw_coefs_2;
0064c543                                      ncomps = arg3->ncomps;
0064c3d6                                  }
0064c3d6                                  
0064c545                                  edx_3 += 1;
0064c548                              } while (edx_3 < ncomps);
0064c548                              
0064c54e                              raw_coefs = raw_coefs_3;
0064c555                              ebp = arg3;
0064c55c                              MCUBuf_7 = arg1;
0064c563                              MCUBuf = MCUBuf_7->MCUBuf;
0064c399                          }
0064c399                          
0064c56d                          if (raw_coefs->data_type != 0)
0064c56d                          {
0064c56f                              int32_t i_1 = (ecx_4 - 1);
0064c56f                              
0064c57f                              if (ecx_4 != 0)
0064c57f                              {
0064c58c                                  do
0064c58c                                  {
0064c581                                      *(uint16_t*)MCUBuf -= 0x80;
0064c585                                      MCUBuf = &MCUBuf[2];
0064c588                                      i_1 -= 1;
0064c58c                                  } while (i_1 != 0xffffffff);
0064c58c                                  
0064c58e                                  MCUBuf = MCUBuf_7->MCUBuf;
0064c594                                  raw_coefs = MCUBuf_7->raw_coefs;
0064c57f                              }
0064c56d                          }
0064c38f                      }
0064c38f                      
0064c5af                      if (((raw_coefs == 0 || raw_coefs->data_type != 0) && var_3c > 0))
0064c5af                      {
0064c5bc                          int32_t ebx_5 = 0;
0064c5ca                          uint8_t* MCUBuf_3 = MCUBuf;
0064c5ca                          
0064c5df                          do
0064c5df                          {
0064c5d0                              MCUBuf_4 = MCUBuf_3;
0064c5d3                              *(uint32_t*)((char*)ctx + 0x44)(MCUBuf_4, curxMCU_2, curyMCU_1, var_b0, MCUBuf_1);
0064c5d6                              MCUBuf_3 = &MCUBuf_3[0x80];
0064c5dc                              ebx_5 += 1;
0064c5df                          } while (ebx_5 < var_3c);
0064c5df                          
0064c5e9                          ebp = arg3;
0064c5f0                          MCUBuf_7 = arg1;
0064c5af                      }
0064c5af                      
0064c5f7                      int32_t edi_13 = 0;
0064c5f9                      ncomps = ebp->ncomps;
0064c5f9                      
0064c5fe                      if (ncomps > 0)
0064c5fe                      {
0064c604                          struct _SCAN* eax_8 = ebp;
0064c604                          
0064c6bb                          do
0064c6bb                          {
0064c608                              int32_t i_2 = 0;
0064c608                              
0064c610                              if (*(uint32_t*)(&var_a4 + (edi_13 << 2)) > 0)
0064c610                              {
0064c69a                                  enum _IJLERR result_3;
0064c69a                                  
0064c69a                                  do
0064c69a                                  {
0064c637                                      struct _RAW_DATA_TYPES_STATE* raw_coefs_1 = arg1->raw_coefs;
0064c637                                      
0064c645                                      if ((raw_coefs_1 == 0 || raw_coefs_1->data_type != 0))
0064c652                                          *(uint32_t*)((char*)ctx + 0x104)(MCUBuf, *(uint32_t*)(&var_74 + (edi_13 << 2)), curyMCU_1, var_b0, MCUBuf_1);
0064c652                                      
0064c663                                      MCUBuf_4 = arg2;
0064c66a                                      curxMCU_2 = *(uint32_t*)(&var_94 + (edi_13 << 2));
0064c66e                                      curyMCU_1 = *(uint32_t*)(&var_84 + (edi_13 << 2));
0064c679                                      var_b0 = &eax_8->dc_diff;
0064c67d                                      MCUBuf_1 = MCUBuf;
0064c681                                      result_3 = *(uint32_t*)((char*)ctx + 0xf0)(MCUBuf_4, curxMCU_2, curyMCU_1, var_b0, MCUBuf_1);
0064c681                                      
0064c689                                      if (result_3 != IJL_OK)
0064c689                                      {
0064c794                                          result = result_3;
0064c796                                          ctx = ctx;
0064c798                                          goto label_64c77c;
0064c689                                      }
0064c689                                      
0064c68f                                      MCUBuf = &MCUBuf[0x80];
0064c695                                      i_2 += 1;
0064c69a                                  } while (i_2 < *(uint32_t*)(&var_a4 + (edi_13 << 2)));
0064c69a                                  
0064c69c                                  result_2 = result_3;
0064c6ab                                  ebp = arg3;
0064c6b2                                  ncomps = ebp->ncomps;
0064c610                              }
0064c610                              
0064c6b5                              eax_8 = &eax_8->gray_scale;
0064c6b8                              edi_13 += 1;
0064c6bb                          } while (edi_13 < ncomps);
0064c6bb                          
0064c6c1                          MCUBuf_7 = arg1;
0064c5fe                      }
0064c5fe                      
0064c6cb                      uint32_t edi_15 = (ebp->restart_interv + 1);
0064c6ce                      ebp->restart_interv = edi_15;
0064c6d1                      int32_t restart_interv = MCUBuf_7->jframe.restart_interv;
0064c6d1                      
0064c6dd                      if ((COMBINE(0, edi_15) % restart_interv) == 0)
0064c6dd                      {
0064c6e6                          uint8_t* MCUBuf_6 = (((COMBINE(0, edi_15) / restart_interv) - 1) & 7);
0064c6e6                          
0064c6ec                          if (MCUBuf_6 == 7)
0064c6ee                              ebp->restart_interv = 0;
0064c6ee                          
0064c6f5                          MCUBuf_4 = MCUBuf_6;
0064c6ff                          curxMCU_2 = arg2;
0064c703                          enum _IJLERR result_4 = EP_Write_RST(MCUBuf_4, curxMCU_2);
0064c708                          result_2 = result_4;
0064c708                          
0064c70e                          if (result_4 != IJL_OK)
0064c70e                          {
0064c78c                              result = result_4;
0064c78e                              ctx = ctx;
0064c792                              goto label_64c77c;
0064c70e                          }
0064c70e                          
0064c714                          int32_t eax_21 = 0;
0064c716                          ncomps = ebp->ncomps;
0064c716                          
0064c71b                          if (ncomps > 0)
0064c71b                          {
0064c72e                              do
0064c72e                              {
0064c720                                  ebp->dc_diff[eax_21] = 0;
0064c728                                  ncomps = ebp->ncomps;
0064c72b                                  eax_21 += 1;
0064c72e                              } while (eax_21 < ncomps);
0064c71b                          }
0064c6dd                      }
0064c6dd                      
0064c735                      if (MCUBuf_7->interrupt != 0)
0064c735                      {
0064c7db                          ctx = ctx;
0064c7df                          MCUBuf_7->roi.right = curxMCU_1;
0064c7e3                          MCUBuf_7->roi.bottom = curyMCU;
0064c7ea                          int32_t temp1_3 = (((int64_t)(curxMCU_1 + 1)) % MCUBuf_7->numxMCUs);
0064c7ee                          ebp->curxMCU = temp1_3;
0064c7ee                          
0064c7f1                          if (temp1_3 != 0)
0064c7f9                              ebp->curyMCU = curyMCU;
0064c7f1                          else
0064c7f4                              ebp->curyMCU = (curyMCU + 1);
0064c7f4                          
0064c7fc                          result = IJL_INTERRUPT_OK;
0064c801                          goto label_64c77c;
0064c735                      }
0064c735                      
0064c73f                      int32_t curxMCU_3 = (curxMCU_1 + 1);
0064c740                      int32_t numxMCUs_2 = MCUBuf_7->numxMCUs;
0064c743                      curxMCU_1 = curxMCU_3;
0064c749                      numxMCUs = numxMCUs_2;
0064c749                      
0064c74d                      if (curxMCU_3 >= numxMCUs_2)
0064c74d                      {
0064c753                          ncomps_2 = ncomps;
0064c761                          eax_2 = var_3c;
0064c768                          numyMCUs = MCUBuf_7->numyMCUs;
0064c768                          break;
0064c74d                      }
0064c381                  }
0064c34b              }
0064c34b              
0064c76b              curyMCU += 1;
0064c76e          } while (curyMCU < numyMCUs);
0064c76e          
0064c774          result = result_2;
0064c778          ctx = ctx;
0064c322      }
0064c322      
0064c77c  label_64c77c:
0064c77c      *(uint32_t*)((char*)ctx + 0x18)(MCUBuf_4, curxMCU_2, curyMCU_1, var_b0, MCUBuf_1);
0064c78b      return result;
0064c230  }

0064c437                                                                       8b f6 8d bc 27 00 00 00 00                         ....'....
0064c7c2        8d b4 26 00 00 00 00 8d bc 27 00 00 00 00                                                    ..&......'....
0064c824              8d b6 00 00 00 00 8d bf 00 00 00 00                                                      ............

0064c830  int64_t* _own_fqnt8x8_aan_m5(int64_t* arg1, int64_t* arg2)

0064c830  {
0064c83f      int16_t st1[0x4] = arg2[0xf];
0064c843      int16_t st3[0x4] = arg2[0xe];
0064c847      int64_t st4 = data_832340;
0064c84e      int64_t st5 = data_832348;
0064c855      int64_t st6 = (*(uint64_t*)data_832350);
0064c85c      int64_t st7 = data_832358;
0064c867      int64_t st2 = arg1[0xe];
0064c86e      int64_t temp0_1 = _m_paddusw(_m_paddw(arg1[0xf], st4), st5);
0064c871      int64_t temp0_2 = _m_paddw(st2, st4);
0064c874      int64_t temp0_3 = _m_psubusw(temp0_1, st6);
0064c877      int64_t temp0_4 = _m_paddusw(temp0_2, st5);
0064c87a      int64_t temp0_5 = _m_paddw(temp0_3, st7);
0064c880      int64_t temp0_7 = _m_paddw(_m_psubusw(temp0_4, st6), st7);
0064c887      int64_t st0 = _m_pmulhw(_m_psllwi(temp0_5, 2), st1);
0064c892      st2 = _m_pmulhw(_m_psllwi(temp0_7, 2), st3);
0064c895      st1 = arg2[0xd];
0064c899      int64_t temp0_12 = __paddw_mmxq_memq(st0, data_832360);
0064c8a0      int64_t temp0_13 = __paddw_mmxq_memq(st2, data_832360);
0064c8a7      st0 = _m_psrawi(temp0_12, 1);
0064c8ab      st3 = arg2[0xc];
0064c8af      st2 = _m_psrawi(temp0_13, 1);
0064c8b3      arg1[0xf] = st0;
0064c8b7      arg1[0xe] = st2;
0064c8bf      st2 = arg1[0xc];
0064c8c6      int64_t temp0_17 = _m_paddusw(_m_paddw(arg1[0xd], st4), st5);
0064c8c9      int64_t temp0_18 = _m_paddw(st2, st4);
0064c8cc      int64_t temp0_19 = _m_psubusw(temp0_17, st6);
0064c8cf      int64_t temp0_20 = _m_paddusw(temp0_18, st5);
0064c8d2      int64_t temp0_21 = _m_paddw(temp0_19, st7);
0064c8d8      int64_t temp0_23 = _m_paddw(_m_psubusw(temp0_20, st6), st7);
0064c8df      st0 = _m_pmulhw(_m_psllwi(temp0_21, 2), st1);
0064c8ea      st2 = _m_pmulhw(_m_psllwi(temp0_23, 2), st3);
0064c8ed      st1 = arg2[0xb];
0064c8f1      int64_t temp0_28 = __paddw_mmxq_memq(st0, data_832360);
0064c8f8      int64_t temp0_29 = __paddw_mmxq_memq(st2, data_832360);
0064c8ff      st0 = _m_psrawi(temp0_28, 1);
0064c903      st3 = arg2[0xa];
0064c907      st2 = _m_psrawi(temp0_29, 1);
0064c90b      arg1[0xd] = st0;
0064c90f      arg1[0xc] = st2;
0064c917      st2 = arg1[0xa];
0064c91e      int64_t temp0_33 = _m_paddusw(_m_paddw(arg1[0xb], st4), st5);
0064c921      int64_t temp0_34 = _m_paddw(st2, st4);
0064c924      int64_t temp0_35 = _m_psubusw(temp0_33, st6);
0064c927      int64_t temp0_36 = _m_paddusw(temp0_34, st5);
0064c92a      int64_t temp0_37 = _m_paddw(temp0_35, st7);
0064c930      int64_t temp0_39 = _m_paddw(_m_psubusw(temp0_36, st6), st7);
0064c937      st0 = _m_pmulhw(_m_psllwi(temp0_37, 2), st1);
0064c942      st2 = _m_pmulhw(_m_psllwi(temp0_39, 2), st3);
0064c945      st1 = arg2[9];
0064c949      int64_t temp0_44 = __paddw_mmxq_memq(st0, data_832360);
0064c950      int64_t temp0_45 = __paddw_mmxq_memq(st2, data_832360);
0064c957      st0 = _m_psrawi(temp0_44, 1);
0064c95b      st3 = arg2[8];
0064c95f      st2 = _m_psrawi(temp0_45, 1);
0064c963      arg1[0xb] = st0;
0064c967      arg1[0xa] = st2;
0064c96f      st2 = arg1[8];
0064c976      int64_t temp0_49 = _m_paddusw(_m_paddw(arg1[9], st4), st5);
0064c979      int64_t temp0_50 = _m_paddw(st2, st4);
0064c97c      int64_t temp0_51 = _m_psubusw(temp0_49, st6);
0064c97f      int64_t temp0_52 = _m_paddusw(temp0_50, st5);
0064c982      int64_t temp0_53 = _m_paddw(temp0_51, st7);
0064c988      int64_t temp0_55 = _m_paddw(_m_psubusw(temp0_52, st6), st7);
0064c98f      st0 = _m_pmulhw(_m_psllwi(temp0_53, 2), st1);
0064c999      st2 = _m_pmulhw(_m_psllwi(temp0_55, 2), st3);
0064c99c      st1 = arg2[7];
0064c9a0      int64_t temp0_60 = __paddw_mmxq_memq(st0, data_832360);
0064c9a7      int64_t temp0_61 = __paddw_mmxq_memq(st2, data_832360);
0064c9ae      st0 = _m_psrawi(temp0_60, 1);
0064c9b2      st3 = arg2[6];
0064c9b6      st2 = _m_psrawi(temp0_61, 1);
0064c9ba      arg1[9] = st0;
0064c9be      arg1[8] = st2;
0064c9c6      st2 = arg1[6];
0064c9cd      int64_t temp0_65 = _m_paddusw(_m_paddw(arg1[7], st4), st5);
0064c9d0      int64_t temp0_66 = _m_paddw(st2, st4);
0064c9d3      int64_t temp0_67 = _m_psubusw(temp0_65, st6);
0064c9d6      int64_t temp0_68 = _m_paddusw(temp0_66, st5);
0064c9d9      int64_t temp0_69 = _m_paddw(temp0_67, st7);
0064c9df      int64_t temp0_71 = _m_paddw(_m_psubusw(temp0_68, st6), st7);
0064c9e6      st0 = _m_pmulhw(_m_psllwi(temp0_69, 2), st1);
0064c9ed      st2 = _m_pmulhw(_m_psllwi(temp0_71, 2), st3);
0064c9f0      st1 = arg2[5];
0064c9f4      int64_t temp0_76 = __paddw_mmxq_memq(st0, data_832360);
0064c9fb      int64_t temp0_77 = __paddw_mmxq_memq(st2, data_832360);
0064ca02      st0 = _m_psrawi(temp0_76, 1);
0064ca06      st3 = arg2[4];
0064ca0a      st2 = _m_psrawi(temp0_77, 1);
0064ca0e      arg1[7] = st0;
0064ca12      arg1[6] = st2;
0064ca1a      st2 = arg1[4];
0064ca21      int64_t temp0_81 = _m_paddusw(_m_paddw(arg1[5], st4), st5);
0064ca24      int64_t temp0_82 = _m_paddw(st2, st4);
0064ca27      int64_t temp0_83 = _m_psubusw(temp0_81, st6);
0064ca2a      int64_t temp0_84 = _m_paddusw(temp0_82, st5);
0064ca2d      int64_t temp0_85 = _m_paddw(temp0_83, st7);
0064ca33      int64_t temp0_87 = _m_paddw(_m_psubusw(temp0_84, st6), st7);
0064ca3a      st0 = _m_pmulhw(_m_psllwi(temp0_85, 2), st1);
0064ca41      st2 = _m_pmulhw(_m_psllwi(temp0_87, 2), st3);
0064ca44      st1 = arg2[3];
0064ca48      int64_t temp0_92 = __paddw_mmxq_memq(st0, data_832360);
0064ca4f      int64_t temp0_93 = __paddw_mmxq_memq(st2, data_832360);
0064ca56      st0 = _m_psrawi(temp0_92, 1);
0064ca5a      st3 = arg2[2];
0064ca5e      st2 = _m_psrawi(temp0_93, 1);
0064ca62      arg1[5] = st0;
0064ca66      arg1[4] = st2;
0064ca6e      st2 = arg1[2];
0064ca75      int64_t temp0_97 = _m_paddusw(_m_paddw(arg1[3], st4), st5);
0064ca78      int64_t temp0_98 = _m_paddw(st2, st4);
0064ca7b      int64_t temp0_99 = _m_psubusw(temp0_97, st6);
0064ca7e      int64_t temp0_100 = _m_paddusw(temp0_98, st5);
0064ca81      int64_t temp0_101 = _m_paddw(temp0_99, st7);
0064ca87      int64_t temp0_103 = _m_paddw(_m_psubusw(temp0_100, st6), st7);
0064ca8e      st0 = _m_pmulhw(_m_psllwi(temp0_101, 2), st1);
0064ca95      st2 = _m_pmulhw(_m_psllwi(temp0_103, 2), st3);
0064ca98      st1 = arg2[1];
0064ca9c      int64_t temp0_108 = __paddw_mmxq_memq(st0, data_832360);
0064caa3      int64_t temp0_109 = __paddw_mmxq_memq(st2, data_832360);
0064caaa      st0 = _m_psrawi(temp0_108, 1);
0064caae      st3 = *(uint64_t*)arg2;
0064cab1      st2 = _m_psrawi(temp0_109, 1);
0064cab5      arg1[3] = st0;
0064cab9      arg1[2] = st2;
0064cac1      st2 = *(uint64_t*)arg1;
0064cac7      int64_t temp0_113 = _m_paddusw(_m_paddw(arg1[1], st4), st5);
0064caca      int64_t temp0_114 = _m_paddw(st2, st4);
0064cacd      int64_t temp0_115 = _m_psubusw(temp0_113, st6);
0064cad0      int64_t temp0_116 = _m_paddusw(temp0_114, st5);
0064cad3      int64_t temp0_117 = _m_paddw(temp0_115, st7);
0064cad9      int64_t temp0_119 = _m_paddw(_m_psubusw(temp0_116, st6), st7);
0064cae0      st0 = _m_pmulhw(_m_psllwi(temp0_117, 2), st1);
0064cae7      st2 = _m_pmulhw(_m_psllwi(temp0_119, 2), st3);
0064caea      int64_t temp0_124 = __paddw_mmxq_memq(st0, data_832360);
0064caf1      int64_t temp0_125 = __paddw_mmxq_memq(st2, data_832360);
0064caf8      st0 = _m_psrawi(temp0_124, 1);
0064cafc      st2 = _m_psrawi(temp0_125, 1);
0064cb00      arg1[1] = st0;
0064cb04      *(uint64_t*)arg1 = st2;
0064cb0e      return arg1;
0064c830  }

0064cb0f                                               90                                                                 .

0064cb10  void _own_fdct8x8_aan_m5(int64_t* arg1)

0064cb10  {
0064cb1c      uint16_t st5[0x4] = arg1[9];
0064cb20      int64_t st6 = arg1[0xb];
0064cb27      uint16_t st3[0x4] = arg1[0xd];
0064cb2b      uint16_t temp0[0x4] = _m_punpcklwd(st5, st6);
0064cb2e      int64_t st1 = arg1[0xf];
0064cb32      int64_t temp0_1 = __punpckhwd_mmxq_mmxd(st5, st6);
0064cb38      uint16_t temp0_2[0x4] = _m_punpcklwd(st3, st1);
0064cb3b      uint16_t st2[0x4] = arg1[8];
0064cb42      uint16_t st0[0x4] = _m_punpckhdq(temp0, temp0_2[0]);
0064cb48      int64_t temp0_4 = __punpckhwd_mmxq_mmxd(st3, st1);
0064cb4b      arg1[0xb] = st0;
0064cb4f      st5 = _m_punpckldq(temp0, temp0_2[0]);
0064cb52      st3 = arg1[0xa];
0064cb56      int64_t st4 = _m_punpckldq(temp0_1, temp0_4);
0064cb59      arg1[9] = st5;
0064cb5d      int64_t temp0_7 = _m_punpckhdq(temp0_1, temp0_4);
0064cb60      st5 = arg1[0xe];
0064cb64      arg1[0xf] = temp0_7;
0064cb6b      st6 = arg1[0xc];
0064cb6f      uint16_t temp0_8[0x4] = _m_punpcklwd(st2, st3[0]);
0064cb72      arg1[0xd] = st4;
0064cb76      st0 = __punpckhwd_mmxq_mmxd(st2, st3[0]);
0064cb79      int64_t st7 = st6;
0064cb7c      st6 = _m_punpcklwd(st6, st5[0]);
0064cb7f      st3 = arg1[1];
0064cb83      int64_t temp0_11 = __punpckhwd_mmxq_mmxd(st7, st5[0]);
0064cb89      st2 = _m_punpckldq(temp0_8, st6);
0064cb8c      st5 = arg1[5];
0064cb90      int64_t temp0_13 = _m_punpckhdq(temp0_8, st6);
0064cb93      arg1[1] = st2;
0064cb97      st6 = st0;
0064cb9a      st4 = arg1[3];
0064cb9e      st0 = _m_punpckldq(st0, temp0_11);
0064cba1      arg1[3] = temp0_13;
0064cba5      int64_t temp0_15 = _m_punpckhdq(st6, temp0_11);
0064cba8      arg1[5] = st0;
0064cbaf      st2 = arg1[7];
0064cbb3      uint16_t temp0_16[0x4] = _m_punpcklwd(st3, st4);
0064cbb6      arg1[7] = temp0_15;
0064cbba      int64_t temp0_17 = __punpckhwd_mmxq_mmxd(st3, st4);
0064cbbd      st6 = *(uint64_t*)arg1;
0064cbc3      uint16_t temp0_18[0x4] = _m_punpcklwd(st5, st2[0]);
0064cbc9      st4 = arg1[2];
0064cbcd      int64_t temp0_19 = __punpckhwd_mmxq_mmxd(st5, st2[0]);
0064cbd0      st3 = _m_punpckldq(temp0_16, temp0_18[0]);
0064cbd3      st0 = _m_punpckhdq(temp0_16, temp0_18[0]);
0064cbd9      arg1[8] = st3;
0064cbdd      st1 = _m_punpckldq(temp0_17, temp0_19);
0064cbe0      st3 = arg1[4];
0064cbe4      st5 = _m_punpckhdq(temp0_17, temp0_19);
0064cbe7      arg1[0xa] = st0;
0064cbeb      arg1[0xe] = st5;
0064cbef      st5 = st6;
0064cbf2      arg1[0xc] = st1;
0064cbf6      st6 = _m_punpcklwd(st6, st4);
0064cbf9      st1 = arg1[6];
0064cbfd      st5 = __punpckhwd_mmxq_mmxd(st5, st4);
0064cc03      uint16_t temp0_26[0x4] = _m_punpcklwd(st3, st1);
0064cc06      st0 = st6;
0064cc09      st2 = __punpckhwd_mmxq_mmxd(st3, st1);
0064cc0c      st4 = arg1[0xe];
0064cc10      st6 = _m_punpckldq(st6, temp0_26[0]);
0064cc13      st1 = arg1[8];
0064cc17      st0 = _m_punpckhdq(st0, temp0_26[0]);
0064cc1a      *(uint64_t*)arg1 = st6;
0064cc1d      st3 = st5;
0064cc20      arg1[2] = st0;
0064cc24      st5 = _m_punpckldq(st5, st2[0]);
0064cc27      int64_t temp0_31 = _m_paddw(st6, st4);
0064cc2a      st3 = _m_punpckhdq(st3, st2[0]);
0064cc2d      arg1[4] = st5;
0064cc34      arg1[6] = st3;
0064cc38      st3 = _m_paddw(st3, st1);
0064cc3b      st0 = __paddw_mmxq_memq(st0, arg1[0xc]);
0064cc3f      int64_t temp0_35 = _m_psubw(temp0_31, st3);
0064cc42      st5 = __paddw_mmxq_memq(st5, arg1[0xa]);
0064cc46      st1 = st0;
0064cc49      st0 = _m_psubw(st0, st5);
0064cc4c      int64_t temp0_38 = _m_paddw(temp0_31, st3);
0064cc4f      st0 = _m_paddw(st0, temp0_35);
0064cc52      int64_t temp0_40 = _m_paddw(st1, st5);
0064cc5c      st0 = __pmulhw_mmxq_memq(_m_psllwi(st0, 1), data_832330);
0064cc63      int64_t temp0_43 = _m_paddw(temp0_38, temp0_40);
0064cc6d      st5 = __psubw_mmxq_memq(arg1[6], arg1[8]);
0064cc71      st3 = _m_psubw(temp0_38, temp0_40);
0064cc74      st2 = arg1[4];
0064cc78      int64_t temp0_46 = _m_paddw(temp0_35, st0);
0064cc7b      st2 = __psubw_mmxq_memq(st2, arg1[0xa]);
0064cc7f      int64_t temp0_48 = _m_psubw(temp0_35, st0);
0064cc82      st1 = arg1[2];
0064cc86      st5 = _m_paddw(st5, st2);
0064cc89      int64_t temp0_50 = __psubw_mmxq_memq(st1, arg1[0xc]);
0064cc8d      st0 = *(uint64_t*)arg1;
0064cc90      st2 = _m_paddw(st2, temp0_50);
0064cc93      st0 = __psubw_mmxq_memq(st0, arg1[0xe]);
0064cc97      uint16_t temp0_53[0x4] = _m_psllwi(st2, 1);
0064cc9b      *(uint64_t*)arg1 = temp0_43;
0064cca1      arg1[4] = temp0_46;
0064cca5      st7 = st5;
0064cca8      st2 = __pmulhw_mmxq_memq(temp0_53, data_832330);
0064ccaf      int64_t temp0_55 = _m_paddw(temp0_50, st0);
0064ccb2      arg1[8] = st3;
0064ccb9      st5 = __pmulhw_mmxq_memq(_m_psubw(st5, temp0_55), data_832320);
0064ccc4      st7 = __pmulhw_mmxq_memq(_m_psllwi(st7, 1), data_832328);
0064cccf      st1 = __pmulhw_mmxq_memq(_m_psllwi(temp0_55, 2), data_832338);
0064ccd6      int64_t temp0_62 = _m_psubw(st0, st2);
0064ccd9      arg1[0xc] = temp0_48;
0064ccdd      st0 = _m_paddw(st0, st2);
0064cce0      st2 = arg1[7];
0064cce4      int64_t temp0_64 = _m_paddw(st7, st5);
0064cce7      st2 = __paddw_mmxq_memq(st2, arg1[9]);
0064cceb      int64_t temp0_66 = _m_paddw(st1, st5);
0064ccf5      st5 = __paddw_mmxq_memq(arg1[1], arg1[0xf]);
0064ccf9      int64_t temp0_68 = _m_paddw(temp0_62, temp0_64);
0064ccfc      st3 = _m_psubw(temp0_62, temp0_64);
0064ccff      st7 = st5;
0064cd02      arg1[0xa] = temp0_68;
0064cd06      st4 = st0;
0064cd09      arg1[6] = st3;
0064cd0d      st0 = _m_paddw(st0, temp0_66);
0064cd10      st3 = arg1[3];
0064cd14      int64_t temp0_71 = _m_psubw(st4, temp0_66);
0064cd17      st3 = __paddw_mmxq_memq(st3, arg1[0xd]);
0064cd1b      st5 = _m_paddw(st5, st2);
0064cd1e      st1 = arg1[5];
0064cd22      int64_t temp0_74 = _m_psubw(st7, st2);
0064cd25      int64_t temp0_75 = __paddw_mmxq_memq(st1, arg1[0xb]);
0064cd29      st6 = st3;
0064cd2c      st3 = _m_paddw(st3, temp0_75);
0064cd2f      int64_t temp0_77 = _m_psubw(st6, temp0_75);
0064cd32      arg1[2] = st0;
0064cd36      int64_t temp0_78 = _m_paddw(temp0_77, temp0_74);
0064cd39      arg1[0xe] = temp0_71;
0064cd41      st6 = __pmulhw_mmxq_memq(_m_psllwi(temp0_78, 1), data_832330);
0064cd48      st1 = st5;
0064cd4b      st2 = arg1[7];
0064cd4f      st5 = _m_paddw(st5, st3);
0064cd52      st2 = __psubw_mmxq_memq(st2, arg1[9]);
0064cd59      st0 = arg1[5];
0064cd5d      int64_t temp0_83 = _m_psubw(st1, st3);
0064cd60      st0 = __psubw_mmxq_memq(st0, arg1[0xb]);
0064cd64      int64_t temp0_85 = _m_paddw(temp0_74, st6);
0064cd67      st3 = arg1[3];
0064cd6b      int64_t temp0_86 = _m_psubw(temp0_74, st6);
0064cd6e      st3 = __psubw_mmxq_memq(st3, arg1[0xd]);
0064cd72      st2 = _m_paddw(st2, st0);
0064cd75      st6 = arg1[1];
0064cd79      st0 = _m_paddw(st0, st3);
0064cd7c      int64_t temp0_90 = __psubw_mmxq_memq(st6, arg1[0xf]);
0064cd80      uint16_t temp0_91[0x4] = _m_psllwi(st0, 1);
0064cd84      arg1[1] = st5;
0064cd8b      arg1[5] = temp0_85;
0064cd8f      st7 = st2;
0064cd92      st0 = __pmulhw_mmxq_memq(temp0_91, data_832330);
0064cd99      st3 = _m_paddw(st3, temp0_90);
0064cd9c      arg1[9] = temp0_83;
0064cda3      st2 = __pmulhw_mmxq_memq(_m_psubw(st2, st3), data_832320);
0064cdae      st7 = __pmulhw_mmxq_memq(_m_psllwi(st7, 1), data_832328);
0064cdb5      int64_t temp0_98 = _m_paddw(temp0_90, st0);
0064cdb8      arg1[0xd] = temp0_86;
0064cdc0      st3 = __pmulhw_mmxq_memq(_m_psllwi(st3, 2), data_832338);
0064cdc7      st5 = _m_psubw(temp0_90, st0);
0064cdca      int64_t temp0_102 = _m_paddw(st7, st2);
0064cdcd      st1 = st5;
0064cdd0      st5 = _m_paddw(st5, temp0_102);
0064cdd3      int64_t temp0_104 = _m_psubw(st1, temp0_102);
0064cdd6      st7 = arg1[8];
0064cdda      st3 = _m_paddw(st3, st2);
0064cddd      arg1[0xb] = st5;
0064cde4      st2 = arg1[0xe];
0064cde8      int64_t temp0_106 = _m_paddw(temp0_98, st3);
0064cdeb      st5 = arg1[0xa];
0064cdef      int64_t temp0_107 = _m_psubw(temp0_98, st3);
0064cdf2      st0 = st7;
0064cdf5      st7 = _m_punpcklwd(st7, st5[0]);
0064cdf8      st3 = arg1[0xc];
0064cdfc      st0 = __punpckhwd_mmxq_mmxd(st0, st5[0]);
0064ce02      uint16_t temp0_110[0x4] = _m_punpcklwd(st3, st2[0]);
0064ce05      arg1[0xf] = temp0_107;
0064ce09      st5 = __punpckhwd_mmxq_mmxd(st3, st2[0]);
0064ce0c      st4 = st7;
0064ce0f      st7 = _m_punpckldq(st7, temp0_110[0]);
0064ce12      st2 = arg1[1];
0064ce16      int64_t temp0_113 = _m_punpckhdq(st4, temp0_110[0]);
0064ce19      arg1[1] = st7;
0064ce1d      st3 = st0;
0064ce20      arg1[3] = temp0_113;
0064ce24      st0 = _m_punpckldq(st0, st5[0]);
0064ce27      st7 = arg1[5];
0064ce2b      st3 = _m_punpckhdq(st3, st5[0]);
0064ce31      uint16_t temp0_116[0x4] = _m_punpcklwd(st2, temp0_106);
0064ce34      arg1[5] = st0;
0064ce38      st5 = __punpckhwd_mmxq_mmxd(st2, temp0_106);
0064ce3e      int64_t temp0_118 = __punpckhwd_mmxq_mmxd(st7, temp0_104);
0064ce41      arg1[7] = st3;
0064ce48      st6 = arg1[0xb];
0064ce4c      st4 = _m_punpcklwd(st7, temp0_104);
0064ce4f      st1 = arg1[9];
0064ce53      st0 = _m_punpckldq(temp0_116, st4);
0064ce56      st3 = arg1[0xd];
0064ce5a      st2 = _m_punpckhdq(temp0_116, st4);
0064ce5d      arg1[8] = st0;
0064ce61      st4 = st5;
0064ce64      arg1[0xa] = st2;
0064ce68      st5 = _m_punpckldq(st5, temp0_118);
0064ce6b      st2 = arg1[0xf];
0064ce6f      int64_t temp0_123 = _m_punpckhdq(st4, temp0_118);
0064ce72      st7 = st1;
0064ce75      st1 = _m_punpcklwd(st1, st6);
0064ce78      arg1[0xc] = st5;
0064ce7c      int64_t temp0_125 = __punpckhwd_mmxq_mmxd(st7, st6);
0064ce82      uint16_t temp0_126[0x4] = _m_punpcklwd(st3, st2[0]);
0064ce85      arg1[0xe] = temp0_123;
0064ce89      st5 = __punpckhwd_mmxq_mmxd(st3, st2[0]);
0064ce8c      st0 = *(uint64_t*)arg1;
0064ce8f      st4 = st1;
0064ce92      st6 = arg1[2];
0064ce96      st1 = _m_punpckldq(st1, temp0_126[0]);
0064ce99      int64_t temp0_129 = _m_punpckhdq(st4, temp0_126[0]);
0064ce9f      arg1[9] = st1;
0064cea3      st7 = _m_punpckldq(temp0_125, st5[0]);
0064cea6      arg1[0xb] = temp0_129;
0064ceaa      st3 = _m_punpckhdq(temp0_125, st5[0]);
0064cead      st1 = arg1[6];
0064ceb4      arg1[0xf] = st3;
0064ceb8      uint16_t temp0_132[0x4] = _m_punpcklwd(st0, st6);
0064cebb      st3 = arg1[4];
0064cebf      st2 = __punpckhwd_mmxq_mmxd(st0, st6);
0064cec5      uint16_t temp0_134[0x4] = _m_punpcklwd(st3, st1);
0064cec8      arg1[0xd] = st7;
0064cecc      st5 = __punpckhwd_mmxq_mmxd(st3, st1);
0064ced2      st0 = _m_punpckldq(temp0_132, temp0_134[0]);
0064ced5      st6 = arg1[8];
0064ced9      int64_t temp0_137 = _m_punpckhdq(temp0_132, temp0_134[0]);
0064cedc      *(uint64_t*)arg1 = st0;
0064cee2      st0 = __paddw_mmxq_memq(st0, arg1[0xe]);
0064cee6      st3 = _m_punpckhdq(st2, st5[0]);
0064cee9      arg1[2] = temp0_137;
0064ceed      st2 = _m_punpckldq(st2, st5[0]);
0064cef0      arg1[6] = st3;
0064cef4      st7 = st0;
0064cef7      int64_t temp0_141 = __paddw_mmxq_memq(temp0_137, arg1[0xc]);
0064cefb      st3 = _m_paddw(st3, st6);
0064cefe      arg1[4] = st2;
0064cf02      st0 = _m_paddw(st0, st3);
0064cf05      st2 = __paddw_mmxq_memq(st2, arg1[0xa]);
0064cf0c      int64_t temp0_145 = _m_psubw(st7, st3);
0064cf12      st5 = arg1[4];
0064cf16      int64_t temp0_146 = _m_paddw(temp0_141, st2);
0064cf19      st3 = _m_psubw(st0, temp0_146);
0064cf1c      int64_t temp0_148 = _m_psubw(temp0_141, st2);
0064cf1f      st2 = arg1[6];
0064cf23      st0 = _m_paddw(st0, temp0_146);
0064cf26      st2 = __psubw_mmxq_memq(st2, arg1[8]);
0064cf2a      int64_t temp0_151 = _m_paddw(temp0_148, temp0_145);
0064cf2d      arg1[8] = st3;
0064cf31      st6 = _m_psllwi(temp0_151, 1);
0064cf35      st1 = arg1[2];
0064cf3c      st6 = __pmulhw_mmxq_memq(st6, data_832330);
0064cf43      st5 = __psubw_mmxq_memq(st5, arg1[0xa]);
0064cf47      st3 = *(uint64_t*)arg1;
0064cf4a      st2 = _m_paddw(st2, st5);
0064cf4d      *(uint64_t*)arg1 = st0;
0064cf50      int64_t temp0_156 = _m_paddw(temp0_145, st6);
0064cf53      int64_t temp0_157 = __psubw_mmxq_memq(st1, arg1[0xc]);
0064cf57      int64_t temp0_158 = _m_psubw(temp0_145, st6);
0064cf5a      arg1[4] = temp0_156;
0064cf5e      st5 = _m_paddw(st5, temp0_157);
0064cf61      st3 = __psubw_mmxq_memq(st3, arg1[0xe]);
0064cf65      st7 = st2;
0064cf6f      st5 = __pmulhw_mmxq_memq(_m_psllwi(st5, 1), data_832330);
0064cf76      int64_t temp0_163 = _m_paddw(temp0_157, st3);
0064cf79      st2 = _m_psubw(st2, temp0_163);
0064cf7c      st7 = _m_psllwi(st7, 1);
0064cf80      st2 = __pmulhw_mmxq_memq(st2, data_832320);
0064cf87      st1 = _m_psllwi(temp0_163, 2);
0064cf8b      st7 = __pmulhw_mmxq_memq(st7, data_832328);
0064cf92      st0 = _m_psubw(st3, st5);
0064cf95      st1 = __pmulhw_mmxq_memq(st1, data_832338);
0064cf9f      arg1[0xc] = temp0_158;
0064cfa3      st3 = _m_paddw(st3, st5);
0064cfa6      st4 = st3;
0064cfa9      int64_t temp0_172 = _m_paddw(st7, st2);
0064cfac      int64_t temp0_173 = _m_psubw(st0, temp0_172);
0064cfaf      int64_t temp0_174 = _m_paddw(st1, st2);
0064cfb2      st0 = _m_paddw(st0, temp0_172);
0064cfb5      st3 = _m_paddw(st3, temp0_174);
0064cfb8      arg1[6] = temp0_173;
0064cfbc      int64_t temp0_177 = _m_psubw(st4, temp0_174);
0064cfc3      int64_t temp0_178 = __paddw_mmxq_memq(arg1[3], arg1[0xd]);
0064cfc7      arg1[0xa] = st0;
0064cfd2      st0 = __paddw_mmxq_memq(arg1[1], arg1[0xf]);
0064cfd6      arg1[2] = st3;
0064cfda      st7 = st0;
0064cfe1      st3 = __paddw_mmxq_memq(arg1[7], arg1[9]);
0064cfe5      st2 = arg1[5];
0064cfe9      st0 = _m_paddw(st0, st3);
0064cfec      st2 = __paddw_mmxq_memq(st2, arg1[0xb]);
0064cff0      int64_t temp0_183 = _m_psubw(st7, st3);
0064cff3      st3 = st0;
0064cff6      int64_t temp0_184 = _m_paddw(temp0_178, st2);
0064cff9      st0 = _m_paddw(st0, temp0_184);
0064cffc      st3 = _m_psubw(st3, temp0_184);
0064cfff      arg1[0xe] = temp0_177;
0064d003      int64_t temp0_187 = _m_psubw(temp0_178, st2);
0064d006      st2 = arg1[7];
0064d00a      int64_t temp0_188 = _m_paddw(temp0_187, temp0_183);
0064d00d      st2 = __psubw_mmxq_memq(st2, arg1[9]);
0064d015      st6 = __pmulhw_mmxq_memq(_m_psllwi(temp0_188, 1), data_832330);
0064d023      st5 = __psubw_mmxq_memq(arg1[5], arg1[0xb]);
0064d027      arg1[9] = st3;
0064d02b      int64_t temp0_193 = _m_paddw(temp0_183, st6);
0064d02e      int64_t temp0_194 = _m_psubw(temp0_183, st6);
0064d031      st2 = _m_paddw(st2, st5);
0064d034      st6 = arg1[1];
0064d038      arg1[1] = st0;
0064d040      int64_t temp0_196 = __psubw_mmxq_memq(arg1[3], arg1[0xd]);
0064d044      arg1[5] = temp0_193;
0064d048      st7 = st2;
0064d04b      int64_t temp0_197 = __psubw_mmxq_memq(st6, arg1[0xf]);
0064d04f      st5 = _m_paddw(st5, temp0_196);
0064d052      int64_t temp0_199 = _m_paddw(temp0_196, temp0_197);
0064d059      st5 = __pmulhw_mmxq_memq(_m_psllwi(st5, 1), data_832330);
0064d063      st2 = __pmulhw_mmxq_memq(_m_psubw(st2, temp0_199), data_832320);
0064d06e      st7 = __pmulhw_mmxq_memq(_m_psllwi(st7, 1), data_832328);
0064d075      st1 = _m_psllwi(temp0_199, 2);
0064d079      arg1[0xd] = temp0_194;
0064d080      st1 = __pmulhw_mmxq_memq(st1, data_832338);
0064d087      st0 = _m_psubw(temp0_197, st5);
0064d08a      int64_t temp0_209 = _m_paddw(st7, st2);
0064d08d      st3 = st0;
0064d090      st0 = _m_paddw(st0, temp0_209);
0064d093      st3 = _m_psubw(st3, temp0_209);
0064d096      int64_t temp0_212 = _m_paddw(temp0_197, st5);
0064d099      int64_t temp0_213 = _m_paddw(st1, st2);
0064d09c      arg1[0xb] = st0;
0064d0a3      arg1[7] = st3;
0064d0a7      int64_t temp0_214 = _m_paddw(temp0_212, temp0_213);
0064d0aa      int64_t temp0_215 = _m_psubw(temp0_212, temp0_213);
0064d0ad      arg1[3] = temp0_214;
0064d0b1      arg1[0xf] = temp0_215;
0064cb10  }

0064d0bd                                                                                         cc cc cc                               ...

0064d0c0  int64_t* _own_idct8x8_aan_m5(int64_t* arg1)

0064d0c0  {
0064d0cc      int64_t st0 = arg1[0xc];
0064d0d0      int64_t st1 = arg1[4];
0064d0d4      int64_t st3 = *(uint64_t*)arg1;
0064d0d7      int64_t st2 = st1;
0064d0da      int64_t st5 = arg1[8];
0064d0ec      st1 = _m_pmulhw(_m_psllwi(_m_psubw(st1, st0), 2), data_832370);
0064d0ef      int64_t temp0_3 = _m_paddw(st2, st0);
0064d0f8      int64_t temp0_4 = _m_paddw(st3, st5);
0064d0fb      int64_t temp0_5 = _m_psubw(st1, temp0_3);
0064d0fe      int64_t temp0_6 = _m_psubw(st3, st5);
0064d104      int64_t temp0_7 = _m_paddw(temp0_4, temp0_3);
0064d10a      int64_t temp0_8 = _m_paddw(temp0_5, temp0_6);
0064d10d      arg1[4] = temp0_7;
0064d111      int64_t temp0_9 = _m_psubw(temp0_6, temp0_5);
0064d114      arg1[0xc] = temp0_8;
0064d118      int64_t temp0_10 = _m_psubw(temp0_4, temp0_3);
0064d11b      *(uint64_t*)arg1 = temp0_9;
0064d11e      int64_t st7 = arg1[0xa];
0064d122      st0 = arg1[6];
0064d129      st5 = arg1[2];
0064d12d      int64_t temp0_11 = _m_psubw(st7, st0);
0064d130      int64_t st4 = arg1[0xe];
0064d134      int64_t temp0_12 = _m_paddw(st7, st0);
0064d148      st7 = _m_pmulhw(_m_psllwi(temp0_11, 3), data_832378);
0064d14b      int64_t temp0_15 = _m_paddw(st5, st4);
0064d155      int64_t temp0_16 = _m_psubw(st5, st4);
0064d15b      int64_t temp0_17 = _m_paddw(temp0_11, temp0_16);
0064d15e      st0 = _m_psllwi(temp0_16, 2);
0064d162      int64_t temp0_19 = _m_paddw(temp0_15, temp0_12);
0064d165      st0 = _m_pmulhw(st0, data_832380[0]);
0064d168      st2 = _m_psllwi(temp0_17, 2);
0064d176      st4 = _m_psllwi(_m_psubw(temp0_15, temp0_12), 2);
0064d17a      st1 = _m_pmulhw(data_832380[8][0], st2);
0064d184      st2 = arg1[0xc];
0064d188      st4 = _m_pmulhw(st4, data_832370);
0064d18b      int64_t temp0_26 = _m_psubw(st0, st1);
0064d18e      int64_t temp0_27 = _m_paddw(st1, st7);
0064d191      st7 = arg1[4];
0064d198      int64_t temp0_28 = _m_psubw(temp0_27, temp0_19);
0064d19b      int64_t temp0_29 = _m_psubw(st4, temp0_28);
0064d19e      int64_t temp0_30 = _m_paddw(temp0_26, temp0_29);
0064d1a1      int64_t temp0_31 = _m_psubw(temp0_10, temp0_30);
0064d1ad      arg1[8] = _m_paddw(temp0_10, temp0_30);
0064d1b1      int64_t temp0_33 = _m_paddw(st7, temp0_19);
0064d1b4      arg1[6] = temp0_31;
0064d1b8      int64_t temp0_34 = _m_psubw(st7, temp0_19);
0064d1bb      int64_t st6 = *(uint64_t*)arg1;
0064d1c1      *(uint64_t*)arg1 = temp0_33;
0064d1c4      int64_t temp0_35 = _m_paddw(st2, temp0_28);
0064d1c7      arg1[0xe] = temp0_34;
0064d1cb      int64_t temp0_36 = _m_psubw(st2, temp0_28);
0064d1ce      arg1[2] = temp0_35;
0064d1d5      arg1[0xc] = temp0_36;
0064d1d9      int64_t temp0_37 = _m_paddw(st6, temp0_29);
0064d1dc      st1 = arg1[5];
0064d1e0      int64_t temp0_38 = _m_psubw(st6, temp0_29);
0064d1e3      arg1[4] = temp0_37;
0064d1ea      st7 = arg1[0xd];
0064d1ee      arg1[0xa] = temp0_38;
0064d1f2      int64_t temp0_39 = _m_psubw(st1, st7);
0064d1f5      st3 = arg1[1];
0064d1f9      int64_t temp0_40 = _m_paddw(st1, st7);
0064d1fc      st5 = arg1[9];
0064d20b      st1 = _m_pmulhw(_m_psllwi(temp0_39, 2), data_832370);
0064d211      st0 = arg1[0xb];
0064d218      int64_t temp0_43 = _m_paddw(st3, st5);
0064d21b      int64_t temp0_44 = _m_psubw(st3, st5);
0064d221      int64_t temp0_45 = _m_psubw(st1, temp0_40);
0064d224      st6 = arg1[7];
0064d228      int64_t temp0_46 = _m_paddw(temp0_43, temp0_40);
0064d22e      int64_t temp0_47 = _m_paddw(temp0_44, temp0_45);
0064d231      arg1[5] = temp0_46;
0064d235      int64_t temp0_48 = _m_psubw(temp0_44, temp0_45);
0064d238      int64_t temp0_49 = _m_psubw(temp0_43, temp0_40);
0064d23b      arg1[0xd] = temp0_47;
0064d242      arg1[9] = temp0_48;
0064d246      int64_t temp0_50 = _m_paddw(st0, st6);
0064d249      st4 = arg1[0xf];
0064d24d      int64_t temp0_51 = _m_psubw(st0, st6);
0064d250      st5 = arg1[3];
0064d257      st2 = data_832378;
0064d261      st1 = _m_psllwi(temp0_51, 3);
0064d265      int64_t temp0_53 = _m_paddw(st5, st4);
0064d268      int64_t temp0_54 = _m_psubw(st5, st4);
0064d26b      st1 = _m_pmulhw(st1, st2);
0064d26e      st2 = data_832370;
0064d278      int64_t temp0_56 = _m_paddw(temp0_53, temp0_50);
0064d289      st4 = _m_pmulhw(_m_psllwi(_m_psubw(temp0_53, temp0_50), 2), st2);
0064d296      st3 = _m_psllwi(_m_paddw(temp0_51, temp0_54), 2);
0064d29a      st6 = _m_psllwi(temp0_54, 2);
0064d29e      st3 = _m_pmulhw(st3, data_832380[8][0]);
0064d2a1      st0 = arg1[5];
0064d2a8      int64_t temp0_65 = _m_psubw(_m_pmulhw(st6, data_832380[0]), st3);
0064d2ae      int64_t temp0_67 = _m_psubw(_m_paddw(st3, st1), temp0_56);
0064d2b4      int64_t temp0_68 = _m_psubw(st4, temp0_67);
0064d2b7      int64_t temp0_69 = _m_paddw(st0, temp0_56);
0064d2ba      int64_t temp0_70 = _m_paddw(temp0_65, temp0_68);
0064d2bd      st2 = arg1[0xd];
0064d2c1      int64_t temp0_71 = _m_psubw(st0, temp0_56);
0064d2c4      arg1[1] = temp0_69;
0064d2cb      st0 = arg1[9];
0064d2cf      int64_t temp0_72 = _m_psubw(temp0_49, temp0_70);
0064d2d2      int64_t temp0_73 = _m_paddw(temp0_49, temp0_70);
0064d2d8      arg1[7] = temp0_72;
0064d2df      int64_t temp0_74 = _m_psubw(st2, temp0_67);
0064d2e8      arg1[3] = _m_paddw(st2, temp0_67);
0064d2ec      int64_t temp0_76 = _m_paddw(st0, temp0_68);
0064d2ef      int64_t temp0_77 = _m_psubw(st0, temp0_68);
0064d2f2      arg1[5] = temp0_76;
0064d2f9      st5 = _m_punpcklwd(temp0_73, temp0_77);
0064d2fc      int64_t temp0_79 = __punpckhwd_mmxq_mmxd(temp0_73, temp0_77);
0064d2ff      st6 = *(uint64_t*)arg1;
0064d305      st7 = arg1[2];
0064d309      st3 = _m_punpcklwd(temp0_74, temp0_71);
0064d30c      int64_t temp0_81 = __punpckhwd_mmxq_mmxd(temp0_74, temp0_71);
0064d30f      st4 = st5;
0064d312      st5 = _m_punpckldq(st5, st3);
0064d315      int64_t temp0_83 = _m_punpckhdq(st4, st3);
0064d318      arg1[9] = st5;
0064d31f      arg1[0xb] = temp0_83;
0064d323      st0 = _m_punpckldq(temp0_79, temp0_81);
0064d326      int64_t temp0_85 = _m_punpckhdq(temp0_79, temp0_81);
0064d329      st5 = st6;
0064d32c      arg1[0xd] = st0;
0064d330      st6 = _m_punpcklwd(st6, st7);
0064d333      arg1[0xf] = temp0_85;
0064d337      int64_t temp0_87 = __punpckhwd_mmxq_mmxd(st5, st7);
0064d33a      st7 = arg1[4];
0064d33e      st4 = arg1[6];
0064d342      st3 = st7;
0064d345      st2 = st6;
0064d348      st7 = _m_punpcklwd(st7, st4);
0064d34b      int64_t temp0_89 = __punpckhwd_mmxq_mmxd(st3, st4);
0064d351      st6 = _m_punpckldq(st6, st7);
0064d357      int64_t temp0_91 = _m_punpckhdq(st2, st7);
0064d35a      *(uint64_t*)arg1 = st6;
0064d35d      st5 = _m_punpckldq(temp0_87, temp0_89);
0064d360      arg1[2] = temp0_91;
0064d364      int64_t temp0_93 = _m_punpckhdq(temp0_87, temp0_89);
0064d367      arg1[4] = st5;
0064d36b      arg1[6] = temp0_93;
0064d36f      st0 = arg1[1];
0064d373      st1 = arg1[3];
0064d377      st2 = st0;
0064d37a      st3 = arg1[5];
0064d37e      st0 = _m_punpcklwd(st0, st1);
0064d381      int64_t temp0_95 = __punpckhwd_mmxq_mmxd(st2, st1);
0064d384      st1 = arg1[7];
0064d388      st4 = st3;
0064d38b      st3 = _m_punpcklwd(st3, st1);
0064d38e      int64_t temp0_97 = __punpckhwd_mmxq_mmxd(st4, st1);
0064d391      st1 = st0;
0064d397      st0 = _m_punpckldq(st0, st3);
0064d39a      int64_t temp0_99 = _m_punpckhdq(st1, st3);
0064d39d      st3 = arg1[8];
0064d3a1      st2 = _m_punpckldq(temp0_95, temp0_97);
0064d3a4      arg1[8] = st0;
0064d3a8      int64_t temp0_101 = _m_punpckhdq(temp0_95, temp0_97);
0064d3ab      st4 = arg1[0xa];
0064d3af      arg1[0xa] = temp0_99;
0064d3b3      st1 = st3;
0064d3b6      st0 = arg1[0xc];
0064d3ba      st3 = _m_punpcklwd(st3, st4);
0064d3bd      int64_t temp0_103 = __punpckhwd_mmxq_mmxd(st1, st4);
0064d3c0      st4 = arg1[0xe];
0064d3c4      arg1[0xc] = st2;
0064d3c8      st2 = st0;
0064d3cb      arg1[0xe] = temp0_101;
0064d3cf      st0 = _m_punpcklwd(st0, st4);
0064d3d2      int64_t temp0_105 = __punpckhwd_mmxq_mmxd(st2, st4);
0064d3d5      st4 = st3;
0064d3db      st3 = _m_punpckldq(st3, st0);
0064d3de      int64_t temp0_107 = _m_punpckhdq(st4, st0);
0064d3e1      arg1[1] = st3;
0064d3e5      st1 = _m_punpckldq(temp0_103, temp0_105);
0064d3e8      arg1[3] = temp0_107;
0064d3ec      int64_t temp0_109 = _m_punpckhdq(temp0_103, temp0_105);
0064d3ef      arg1[5] = st1;
0064d3f3      arg1[7] = temp0_109;
0064d3f7      st0 = arg1[0xc];
0064d3fb      st1 = arg1[4];
0064d3ff      st3 = *(uint64_t*)arg1;
0064d405      st5 = arg1[8];
0064d409      int64_t temp0_110 = _m_psubw(st1, st0);
0064d40c      st6 = data_832370;
0064d413      int64_t temp0_111 = _m_paddw(st1, st0);
0064d41d      st1 = _m_pmulhw(_m_psllwi(temp0_110, 2), st6);
0064d423      int64_t temp0_114 = _m_paddw(st3, st5);
0064d426      int64_t temp0_115 = _m_psubw(st3, st5);
0064d42c      int64_t temp0_116 = _m_psubw(st1, temp0_111);
0064d42f      int64_t temp0_117 = _m_paddw(temp0_114, temp0_111);
0064d435      int64_t temp0_118 = _m_paddw(temp0_116, temp0_115);
0064d438      arg1[4] = temp0_117;
0064d43c      int64_t temp0_119 = _m_psubw(temp0_115, temp0_116);
0064d43f      arg1[0xc] = temp0_118;
0064d443      int64_t temp0_120 = _m_psubw(temp0_114, temp0_111);
0064d446      *(uint64_t*)arg1 = temp0_119;
0064d449      st7 = arg1[0xa];
0064d44d      st0 = arg1[6];
0064d454      st5 = arg1[2];
0064d458      int64_t temp0_121 = _m_psubw(st7, st0);
0064d45b      st4 = arg1[0xe];
0064d45f      int64_t temp0_122 = _m_paddw(st7, st0);
0064d473      st7 = _m_pmulhw(_m_psllwi(temp0_121, 3), data_832378);
0064d476      int64_t temp0_125 = _m_paddw(st5, st4);
0064d480      int64_t temp0_126 = _m_psubw(st5, st4);
0064d483      int64_t temp0_127 = _m_paddw(temp0_121, temp0_126);
0064d486      st0 = _m_psllwi(temp0_126, 2);
0064d48a      st1 = _m_psllwi(temp0_127, 2);
0064d48e      st0 = _m_pmulhw(st0, data_832380[0]);
0064d49b      st1 = _m_pmulhw(st1, data_832380[8][0]);
0064d49e      int64_t temp0_132 = _m_paddw(temp0_125, temp0_122);
0064d4a1      st2 = data_832370;
0064d4ab      st4 = _m_psllwi(_m_psubw(temp0_125, temp0_122), 2);
0064d4af      int64_t temp0_135 = _m_psubw(st0, st1);
0064d4b2      int64_t temp0_136 = _m_paddw(st1, st7);
0064d4b5      st4 = _m_pmulhw(st4, st2);
0064d4b8      st2 = arg1[0xc];
0064d4bc      int64_t temp0_138 = _m_psubw(temp0_136, temp0_132);
0064d4bf      st7 = arg1[4];
0064d4c6      int64_t temp0_139 = _m_psubw(st4, temp0_138);
0064d4c9      int64_t temp0_140 = _m_paddw(temp0_135, temp0_139);
0064d4cc      int64_t temp0_141 = _m_psubw(temp0_120, temp0_140);
0064d4d8      arg1[8] = _m_paddw(temp0_120, temp0_140);
0064d4dc      int64_t temp0_143 = _m_paddw(st7, temp0_132);
0064d4df      arg1[6] = temp0_141;
0064d4e3      int64_t temp0_144 = _m_psubw(st7, temp0_132);
0064d4e6      st6 = *(uint64_t*)arg1;
0064d4ec      *(uint64_t*)arg1 = temp0_143;
0064d4ef      int64_t temp0_145 = _m_paddw(st2, temp0_138);
0064d4f2      arg1[0xe] = temp0_144;
0064d4f6      int64_t temp0_146 = _m_psubw(st2, temp0_138);
0064d4f9      arg1[2] = temp0_145;
0064d500      arg1[0xc] = temp0_146;
0064d504      int64_t temp0_147 = _m_paddw(st6, temp0_139);
0064d507      st1 = arg1[5];
0064d50b      int64_t temp0_148 = _m_psubw(st6, temp0_139);
0064d50e      arg1[4] = temp0_147;
0064d515      arg1[0xa] = temp0_148;
0064d519      st7 = arg1[0xd];
0064d51d      st3 = arg1[1];
0064d521      int64_t temp0_149 = _m_psubw(st1, st7);
0064d524      st5 = arg1[9];
0064d528      int64_t temp0_150 = _m_paddw(st1, st7);
0064d539      st1 = _m_pmulhw(_m_psllwi(temp0_149, 2), data_832370);
0064d53c      int64_t temp0_153 = _m_paddw(st3, st5);
0064d53f      int64_t temp0_154 = _m_psubw(st3, st5);
0064d545      int64_t temp0_155 = _m_paddw(temp0_153, temp0_150);
0064d54b      int64_t temp0_156 = _m_psubw(st1, temp0_150);
0064d551      int64_t temp0_157 = _m_paddw(temp0_154, temp0_156);
0064d554      arg1[5] = temp0_155;
0064d558      int64_t temp0_158 = _m_psubw(temp0_154, temp0_156);
0064d55b      arg1[0xd] = temp0_157;
0064d55f      int64_t temp0_159 = _m_psubw(temp0_153, temp0_150);
0064d562      arg1[9] = temp0_158;
0064d566      st0 = arg1[0xb];
0064d56a      st6 = arg1[7];
0064d571      st4 = arg1[0xf];
0064d575      int64_t temp0_160 = _m_paddw(st0, st6);
0064d578      st5 = arg1[3];
0064d57c      int64_t temp0_161 = _m_psubw(st0, st6);
0064d58d      st1 = _m_pmulhw(_m_psllwi(temp0_161, 3), data_832378);
0064d593      int64_t temp0_164 = _m_paddw(st5, st4);
0064d596      int64_t temp0_165 = _m_psubw(st5, st4);
0064d59c      int64_t temp0_166 = _m_paddw(temp0_164, temp0_160);
0064d59f      st2 = data_832370;
0064d5a9      st4 = _m_psllwi(_m_psubw(temp0_164, temp0_160), 2);
0064d5ad      int64_t temp0_169 = _m_paddw(temp0_161, temp0_165);
0064d5b0      st4 = _m_pmulhw(st4, st2);
0064d5b3      st3 = _m_psllwi(temp0_169, 2);
0064d5be      st6 = _m_psllwi(temp0_165, 2);
0064d5c2      st0 = arg1[5];
0064d5c6      st3 = _m_pmulhw(st3, data_832380[8][0]);
0064d5d3      int64_t temp0_175 = _m_psubw(_m_pmulhw(st6, data_832380[0]), st3);
0064d5d9      int64_t temp0_177 = _m_psubw(_m_paddw(st3, st1), temp0_166);
0064d5df      int64_t temp0_178 = _m_psubw(st4, temp0_177);
0064d5e2      int64_t temp0_179 = _m_paddw(st0, temp0_166);
0064d5e5      st2 = arg1[0xd];
0064d5e9      int64_t temp0_180 = _m_paddw(temp0_175, temp0_178);
0064d5ec      arg1[1] = temp0_179;
0064d5f0      int64_t temp0_181 = _m_psubw(st0, temp0_166);
0064d5f6      int64_t temp0_182 = _m_psubw(temp0_159, temp0_180);
0064d5f9      int64_t temp0_183 = _m_paddw(temp0_159, temp0_180);
0064d5ff      st0 = arg1[9];
0064d606      arg1[7] = temp0_182;
0064d60a      int64_t temp0_184 = _m_psubw(st2, temp0_177);
0064d60d      int64_t temp0_185 = _m_paddw(st2, temp0_177);
0064d613      int64_t temp0_186 = _m_paddw(st0, temp0_178);
0064d616      int64_t temp0_187 = _m_psubw(st0, temp0_178);
0064d619      arg1[3] = temp0_185;
0064d61d      arg1[5] = temp0_186;
0064d624      st5 = _m_punpcklwd(temp0_183, temp0_187);
0064d627      int64_t temp0_189 = __punpckhwd_mmxq_mmxd(temp0_183, temp0_187);
0064d62d      st6 = *(uint64_t*)arg1;
0064d630      st3 = _m_punpcklwd(temp0_184, temp0_181);
0064d633      st7 = arg1[2];
0064d637      int64_t temp0_191 = __punpckhwd_mmxq_mmxd(temp0_184, temp0_181);
0064d63a      st4 = st5;
0064d63d      st5 = _m_punpckldq(st5, st3);
0064d640      st1 = data_8323b0;
0064d647      int64_t temp0_193 = _m_punpckhdq(st4, st3);
0064d651      int64_t temp0_195 = _m_paddsw(_m_psrawi(st5, 4), st1);
0064d657      st5 = _m_punpckhwd(_m_packuswb(temp0_195, temp0_195), 0);
0064d65d      st0 = _m_punpckldq(temp0_189, temp0_191);
0064d660      arg1[9] = st5;
0064d664      st5 = st6;
0064d66b      int64_t temp0_200 = _m_paddsw(_m_psrawi(temp0_193, 4), st1);
0064d66e      int64_t temp0_201 = _m_punpckhdq(temp0_189, temp0_191);
0064d674      st0 = _m_psrawi(st0, 4);
0064d67e      arg1[0xb] = _m_punpckhwd(_m_packuswb(temp0_200, temp0_200), 0);
0064d685      int64_t temp0_205 = _m_paddsw(st0, st1);
0064d688      st3 = _m_psrawi(temp0_201, 4);
0064d692      arg1[0xd] = _m_punpckhwd(_m_packuswb(temp0_205, temp0_205), 0);
0064d696      int64_t temp0_209 = _m_paddsw(st3, st1);
0064d699      st6 = _m_punpcklwd(st6, st7);
0064d69f      int64_t temp0_211 = __punpckhwd_mmxq_mmxd(st5, st7);
0064d6a8      arg1[0xf] = _m_punpckhwd(_m_packuswb(temp0_209, temp0_209), 0);
0064d6ac      st4 = arg1[6];
0064d6b0      st7 = arg1[4];
0064d6b4      st3 = st7;
0064d6b7      st7 = _m_punpcklwd(st7, st4);
0064d6ba      int64_t temp0_215 = __punpckhwd_mmxq_mmxd(st3, st4);
0064d6c7      int64_t temp0_218 = _m_paddsw(_m_psrawi(_m_punpckldq(st6, st7), 4), st1);
0064d6ca      int64_t temp0_219 = _m_punpckhdq(st6, st7);
0064d6d6      st7 = st1;
0064d6dc      *(uint64_t*)arg1 = _m_punpckhwd(_m_packuswb(temp0_218, temp0_218), 0);
0064d6e6      int64_t temp0_223 = _m_paddsw(_m_psrawi(temp0_219, 4), st7);
0064d6e9      st5 = _m_punpckldq(temp0_211, temp0_215);
0064d6f2      arg1[2] = _m_punpckhwd(_m_packuswb(temp0_223, temp0_223), 0);
0064d6fa      int64_t temp0_228 = _m_paddsw(_m_psrawi(st5, 4), st7);
0064d6fd      int64_t temp0_229 = _m_punpckhdq(temp0_211, temp0_215);
0064d706      arg1[4] = _m_punpckhwd(_m_packuswb(temp0_228, temp0_228), 0);
0064d70e      int64_t temp0_233 = _m_paddsw(_m_psrawi(temp0_229, 4), st7);
0064d711      st0 = arg1[1];
0064d715      st2 = st0;
0064d71e      arg1[6] = _m_punpckhwd(_m_packuswb(temp0_233, temp0_233), 0);
0064d722      st1 = arg1[3];
0064d726      st3 = arg1[5];
0064d72a      st0 = _m_punpcklwd(st0, st1);
0064d72d      int64_t temp0_237 = __punpckhwd_mmxq_mmxd(st2, st1);
0064d730      st4 = st3;
0064d733      st1 = arg1[7];
0064d73a      st3 = _m_punpcklwd(st3, st1);
0064d73d      int64_t temp0_239 = __punpckhwd_mmxq_mmxd(st4, st1);
0064d740      st1 = st0;
0064d743      st0 = _m_punpckldq(st0, st3);
0064d746      int64_t temp0_241 = _m_punpckhdq(st1, st3);
0064d749      st3 = arg1[8];
0064d751      int64_t temp0_243 = _m_paddsw(_m_psrawi(st0, 4), st7);
0064d754      st2 = _m_punpckldq(temp0_237, temp0_239);
0064d757      int64_t temp0_245 = _m_punpckhdq(temp0_237, temp0_239);
0064d760      arg1[8] = _m_punpckhwd(_m_packuswb(temp0_243, temp0_243), 0);
0064d764      st2 = _m_psrawi(st2, 4);
0064d768      st4 = arg1[0xa];
0064d76c      int64_t temp0_249 = _m_paddsw(st2, st7);
0064d76f      st0 = arg1[0xc];
0064d777      int64_t temp0_251 = _m_paddsw(_m_psrawi(temp0_241, 4), st7);
0064d77a      st2 = _m_packuswb(temp0_249, temp0_249);
0064d783      arg1[0xa] = _m_punpckhwd(_m_packuswb(temp0_251, temp0_251), 0);
0064d787      st1 = st3;
0064d78a      st3 = _m_punpcklwd(st3, st4);
0064d78d      int64_t temp0_256 = __punpckhwd_mmxq_mmxd(st1, st4);
0064d790      st4 = arg1[0xe];
0064d797      arg1[0xc] = _m_punpckhwd(st2, 0);
0064d79b      st2 = st0;
0064d7a2      int64_t temp0_259 = _m_paddsw(_m_psrawi(temp0_245, 4), st7);
0064d7a5      st0 = _m_punpcklwd(st0, st4);
0064d7a8      int64_t temp0_261 = __punpckhwd_mmxq_mmxd(st2, st4);
0064d7ab      st4 = st3;
0064d7b1      st5 = _m_punpckhwd(_m_packuswb(temp0_259, temp0_259), 0);
0064d7b4      st3 = _m_punpckldq(st3, st0);
0064d7b7      arg1[0xe] = st5;
0064d7c2      int64_t temp0_266 = _m_paddsw(_m_psrawi(st3, 4), st7);
0064d7c5      int64_t temp0_267 = _m_punpckhdq(st4, st0);
0064d7ce      arg1[1] = _m_punpckhwd(_m_packuswb(temp0_266, temp0_266), 0);
0064d7d6      int64_t temp0_271 = _m_paddsw(_m_psrawi(temp0_267, 4), st7);
0064d7d9      st1 = _m_punpckldq(temp0_256, temp0_261);
0064d7e2      arg1[3] = _m_punpckhwd(_m_packuswb(temp0_271, temp0_271), 0);
0064d7ea      int64_t temp0_276 = _m_paddsw(_m_psrawi(st1, 4), st7);
0064d7ed      int64_t temp0_277 = _m_punpckhdq(temp0_256, temp0_261);
0064d7f6      arg1[5] = _m_punpckhwd(_m_packuswb(temp0_276, temp0_276), 0);
0064d7fe      int64_t temp0_281 = _m_paddsw(_m_psrawi(temp0_277, 4), st7);
0064d807      arg1[7] = _m_punpckhwd(_m_packuswb(temp0_281, temp0_281), 0);
0064d812      return arg1;
0064d0c0  }

0064d813                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0064d820  int32_t _own_fqnt8x8_ipp_m5(int16_t arg1[0x4] @ st6, int64_t* arg2, int64_t* arg3)

0064d820  {
0064d831      int64_t temp0_1 = _m_psubw(0, _m_pcmpeqw(arg1, arg1));
0064d837      uint16_t st1[0x4] = *(uint64_t*)arg3;
0064d83a      int64_t st2 = arg2[1];
0064d83e      uint16_t st3[0x4] = arg3[1];
0064d842      uint16_t temp0_2[0x4] = _m_psllwi(*(uint64_t*)arg2, 3);
0064d846      uint16_t temp0_3[0x4] = _m_psrlwi(st1, 1);
0064d84a      st2 = _m_psllwi(st2, 3);
0064d84e      uint16_t temp0_5[0x4] = _m_psrlwi(st3, 1);
0064d852      uint16_t st0[0x4] = _m_pmulhw(temp0_2, temp0_3);
0064d855      st2 = _m_pmulhw(st2, temp0_5);
0064d858      st0 = _m_paddw(st0, temp0_1);
0064d85b      int64_t temp0_9 = _m_paddw(st2, temp0_1);
0064d85e      st0 = _m_psrawi(st0, 1);
0064d862      st2 = _m_psrawi(temp0_9, 1);
0064d866      *(uint64_t*)arg2 = st0;
0064d869      arg2[1] = st2;
0064d871      st1 = arg3[2];
0064d875      st2 = arg2[3];
0064d879      st3 = arg3[3];
0064d87d      uint16_t temp0_12[0x4] = _m_psllwi(arg2[2], 3);
0064d881      uint16_t temp0_13[0x4] = _m_psrlwi(st1, 1);
0064d885      st2 = _m_psllwi(st2, 3);
0064d889      uint16_t temp0_15[0x4] = _m_psrlwi(st3, 1);
0064d88d      st0 = _m_pmulhw(temp0_12, temp0_13);
0064d890      st2 = _m_pmulhw(st2, temp0_15);
0064d893      st0 = _m_paddw(st0, temp0_1);
0064d896      int64_t temp0_19 = _m_paddw(st2, temp0_1);
0064d899      st0 = _m_psrawi(st0, 1);
0064d89d      st2 = _m_psrawi(temp0_19, 1);
0064d8a1      arg2[2] = st0;
0064d8a5      arg2[3] = st2;
0064d8ad      st1 = arg3[4];
0064d8b1      st2 = arg2[5];
0064d8b5      st3 = arg3[5];
0064d8b9      uint16_t temp0_22[0x4] = _m_psllwi(arg2[4], 3);
0064d8bd      uint16_t temp0_23[0x4] = _m_psrlwi(st1, 1);
0064d8c1      st2 = _m_psllwi(st2, 3);
0064d8c5      uint16_t temp0_25[0x4] = _m_psrlwi(st3, 1);
0064d8c9      st0 = _m_pmulhw(temp0_22, temp0_23);
0064d8cc      st2 = _m_pmulhw(st2, temp0_25);
0064d8cf      st0 = _m_paddw(st0, temp0_1);
0064d8d2      int64_t temp0_29 = _m_paddw(st2, temp0_1);
0064d8d5      st0 = _m_psrawi(st0, 1);
0064d8d9      st2 = _m_psrawi(temp0_29, 1);
0064d8dd      arg2[4] = st0;
0064d8e1      arg2[5] = st2;
0064d8e9      st1 = arg3[6];
0064d8ed      st2 = arg2[7];
0064d8f1      st3 = arg3[7];
0064d8f5      uint16_t temp0_32[0x4] = _m_psllwi(arg2[6], 3);
0064d8f9      uint16_t temp0_33[0x4] = _m_psrlwi(st1, 1);
0064d8fd      st2 = _m_psllwi(st2, 3);
0064d901      uint16_t temp0_35[0x4] = _m_psrlwi(st3, 1);
0064d905      st0 = _m_pmulhw(temp0_32, temp0_33);
0064d908      st2 = _m_pmulhw(st2, temp0_35);
0064d90b      st0 = _m_paddw(st0, temp0_1);
0064d90e      int64_t temp0_39 = _m_paddw(st2, temp0_1);
0064d911      st0 = _m_psrawi(st0, 1);
0064d915      st2 = _m_psrawi(temp0_39, 1);
0064d919      arg2[6] = st0;
0064d91d      arg2[7] = st2;
0064d925      st1 = arg3[8];
0064d929      st2 = arg2[9];
0064d92d      st3 = arg3[9];
0064d931      uint16_t temp0_42[0x4] = _m_psllwi(arg2[8], 3);
0064d935      uint16_t temp0_43[0x4] = _m_psrlwi(st1, 1);
0064d939      st2 = _m_psllwi(st2, 3);
0064d93d      uint16_t temp0_45[0x4] = _m_psrlwi(st3, 1);
0064d941      st0 = _m_pmulhw(temp0_42, temp0_43);
0064d944      st2 = _m_pmulhw(st2, temp0_45);
0064d947      st0 = _m_paddw(st0, temp0_1);
0064d94a      int64_t temp0_49 = _m_paddw(st2, temp0_1);
0064d94d      st0 = _m_psrawi(st0, 1);
0064d951      st2 = _m_psrawi(temp0_49, 1);
0064d955      arg2[8] = st0;
0064d959      arg2[9] = st2;
0064d961      st1 = arg3[0xa];
0064d965      st2 = arg2[0xb];
0064d969      st3 = arg3[0xb];
0064d96d      uint16_t temp0_52[0x4] = _m_psllwi(arg2[0xa], 3);
0064d971      uint16_t temp0_53[0x4] = _m_psrlwi(st1, 1);
0064d975      st2 = _m_psllwi(st2, 3);
0064d979      uint16_t temp0_55[0x4] = _m_psrlwi(st3, 1);
0064d97d      st0 = _m_pmulhw(temp0_52, temp0_53);
0064d980      st2 = _m_pmulhw(st2, temp0_55);
0064d983      st0 = _m_paddw(st0, temp0_1);
0064d986      int64_t temp0_59 = _m_paddw(st2, temp0_1);
0064d989      st0 = _m_psrawi(st0, 1);
0064d98d      st2 = _m_psrawi(temp0_59, 1);
0064d991      arg2[0xa] = st0;
0064d995      arg2[0xb] = st2;
0064d99d      st1 = arg3[0xc];
0064d9a1      st2 = arg2[0xd];
0064d9a5      st3 = arg3[0xd];
0064d9a9      uint16_t temp0_62[0x4] = _m_psllwi(arg2[0xc], 3);
0064d9ad      uint16_t temp0_63[0x4] = _m_psrlwi(st1, 1);
0064d9b1      st2 = _m_psllwi(st2, 3);
0064d9b5      uint16_t temp0_65[0x4] = _m_psrlwi(st3, 1);
0064d9b9      st0 = _m_pmulhw(temp0_62, temp0_63);
0064d9bc      st2 = _m_pmulhw(st2, temp0_65);
0064d9bf      st0 = _m_paddw(st0, temp0_1);
0064d9c2      int64_t temp0_69 = _m_paddw(st2, temp0_1);
0064d9c5      st0 = _m_psrawi(st0, 1);
0064d9c9      st2 = _m_psrawi(temp0_69, 1);
0064d9cd      arg2[0xc] = st0;
0064d9d1      arg2[0xd] = st2;
0064d9d9      st1 = arg3[0xe];
0064d9dd      st2 = arg2[0xf];
0064d9e1      st3 = arg3[0xf];
0064d9e5      uint16_t temp0_72[0x4] = _m_psllwi(arg2[0xe], 3);
0064d9e9      uint16_t temp0_73[0x4] = _m_psrlwi(st1, 1);
0064d9ed      st2 = _m_psllwi(st2, 3);
0064d9f1      uint16_t temp0_75[0x4] = _m_psrlwi(st3, 1);
0064d9f5      st0 = _m_pmulhw(temp0_72, temp0_73);
0064d9f8      st2 = _m_pmulhw(st2, temp0_75);
0064d9fb      st0 = _m_paddw(st0, temp0_1);
0064d9fe      int64_t temp0_79 = _m_paddw(st2, temp0_1);
0064da01      st0 = _m_psrawi(st0, 1);
0064da05      st2 = _m_psrawi(temp0_79, 1);
0064da09      arg2[0xe] = st0;
0064da0d      arg2[0xf] = st2;
0064d820  }

0064da15                                                                 8d a4 24 00 00 00 00 8d 64 24 00                       ..$.....d$.

0064da20  int32_t _own_fqnt8x8_ipp_a6(int16_t arg1[0x4] @ st6, int64_t* arg2, int64_t* arg3)

0064da20  {
0064da31      int64_t temp0_1 = _m_psubw(0, _m_pcmpeqw(arg1, arg1));
0064da37      int64_t st2 = arg2[1];
0064da3b      uint16_t st1[0x4] = *(uint64_t*)arg3;
0064da3e      uint16_t st3[0x4] = arg3[1];
0064da42      uint16_t temp0_2[0x4] = _m_psllwi(*(uint64_t*)arg2, 3);
0064da46      st2 = _m_psllwi(st2, 3);
0064da4a      uint16_t temp0_4[0x4] = _m_psrlwi(st1, 1);
0064da4e      uint16_t temp0_5[0x4] = _m_psrlwi(st3, 1);
0064da52      uint16_t st0[0x4] = _m_pmulhw(temp0_2, temp0_4);
0064da55      st2 = _m_pmulhw(st2, temp0_5);
0064da58      st0 = _m_paddw(st0, temp0_1);
0064da5b      int64_t temp0_9 = _m_paddw(st2, temp0_1);
0064da5e      st0 = _m_psrawi(st0, 1);
0064da62      st2 = _m_psrawi(temp0_9, 1);
0064da66      *(uint64_t*)arg2 = st0;
0064da69      arg2[1] = st2;
0064da71      st2 = arg2[3];
0064da75      st1 = arg3[2];
0064da79      st3 = arg3[3];
0064da7d      uint16_t temp0_12[0x4] = _m_psllwi(arg2[2], 3);
0064da81      st2 = _m_psllwi(st2, 3);
0064da85      uint16_t temp0_14[0x4] = _m_psrlwi(st1, 1);
0064da89      uint16_t temp0_15[0x4] = _m_psrlwi(st3, 1);
0064da8d      st0 = _m_pmulhw(temp0_12, temp0_14);
0064da90      st2 = _m_pmulhw(st2, temp0_15);
0064da93      st0 = _m_paddw(st0, temp0_1);
0064da96      int64_t temp0_19 = _m_paddw(st2, temp0_1);
0064da99      st0 = _m_psrawi(st0, 1);
0064da9d      st2 = _m_psrawi(temp0_19, 1);
0064daa1      arg2[2] = st0;
0064daa5      arg2[3] = st2;
0064daad      st2 = arg2[5];
0064dab1      st1 = arg3[4];
0064dab5      st3 = arg3[5];
0064dab9      uint16_t temp0_22[0x4] = _m_psllwi(arg2[4], 3);
0064dabd      st2 = _m_psllwi(st2, 3);
0064dac1      uint16_t temp0_24[0x4] = _m_psrlwi(st1, 1);
0064dac5      uint16_t temp0_25[0x4] = _m_psrlwi(st3, 1);
0064dac9      st0 = _m_pmulhw(temp0_22, temp0_24);
0064dacc      st2 = _m_pmulhw(st2, temp0_25);
0064dacf      st0 = _m_paddw(st0, temp0_1);
0064dad2      int64_t temp0_29 = _m_paddw(st2, temp0_1);
0064dad5      st0 = _m_psrawi(st0, 1);
0064dad9      st2 = _m_psrawi(temp0_29, 1);
0064dadd      arg2[4] = st0;
0064dae1      arg2[5] = st2;
0064dae9      st2 = arg2[7];
0064daed      st1 = arg3[6];
0064daf1      st3 = arg3[7];
0064daf5      uint16_t temp0_32[0x4] = _m_psllwi(arg2[6], 3);
0064daf9      st2 = _m_psllwi(st2, 3);
0064dafd      uint16_t temp0_34[0x4] = _m_psrlwi(st1, 1);
0064db01      uint16_t temp0_35[0x4] = _m_psrlwi(st3, 1);
0064db05      st0 = _m_pmulhw(temp0_32, temp0_34);
0064db08      st2 = _m_pmulhw(st2, temp0_35);
0064db0b      st0 = _m_paddw(st0, temp0_1);
0064db0e      int64_t temp0_39 = _m_paddw(st2, temp0_1);
0064db11      st0 = _m_psrawi(st0, 1);
0064db15      st2 = _m_psrawi(temp0_39, 1);
0064db19      arg2[6] = st0;
0064db1d      arg2[7] = st2;
0064db25      st2 = arg2[9];
0064db29      st1 = arg3[8];
0064db2d      st3 = arg3[9];
0064db31      uint16_t temp0_42[0x4] = _m_psllwi(arg2[8], 3);
0064db35      st2 = _m_psllwi(st2, 3);
0064db39      uint16_t temp0_44[0x4] = _m_psrlwi(st1, 1);
0064db3d      uint16_t temp0_45[0x4] = _m_psrlwi(st3, 1);
0064db41      st0 = _m_pmulhw(temp0_42, temp0_44);
0064db44      st2 = _m_pmulhw(st2, temp0_45);
0064db47      st0 = _m_paddw(st0, temp0_1);
0064db4a      int64_t temp0_49 = _m_paddw(st2, temp0_1);
0064db4d      st0 = _m_psrawi(st0, 1);
0064db51      st2 = _m_psrawi(temp0_49, 1);
0064db55      arg2[8] = st0;
0064db59      arg2[9] = st2;
0064db61      st2 = arg2[0xb];
0064db65      st1 = arg3[0xa];
0064db69      st3 = arg3[0xb];
0064db6d      uint16_t temp0_52[0x4] = _m_psllwi(arg2[0xa], 3);
0064db71      st2 = _m_psllwi(st2, 3);
0064db75      uint16_t temp0_54[0x4] = _m_psrlwi(st1, 1);
0064db79      uint16_t temp0_55[0x4] = _m_psrlwi(st3, 1);
0064db7d      st0 = _m_pmulhw(temp0_52, temp0_54);
0064db80      st2 = _m_pmulhw(st2, temp0_55);
0064db83      st0 = _m_paddw(st0, temp0_1);
0064db86      int64_t temp0_59 = _m_paddw(st2, temp0_1);
0064db89      st0 = _m_psrawi(st0, 1);
0064db8d      st2 = _m_psrawi(temp0_59, 1);
0064db91      arg2[0xa] = st0;
0064db95      arg2[0xb] = st2;
0064db9d      st2 = arg2[0xd];
0064dba1      st1 = arg3[0xc];
0064dba5      st3 = arg3[0xd];
0064dba9      uint16_t temp0_62[0x4] = _m_psllwi(arg2[0xc], 3);
0064dbad      st2 = _m_psllwi(st2, 3);
0064dbb1      uint16_t temp0_64[0x4] = _m_psrlwi(st1, 1);
0064dbb5      uint16_t temp0_65[0x4] = _m_psrlwi(st3, 1);
0064dbb9      st0 = _m_pmulhw(temp0_62, temp0_64);
0064dbbc      st2 = _m_pmulhw(st2, temp0_65);
0064dbbf      st0 = _m_paddw(st0, temp0_1);
0064dbc2      int64_t temp0_69 = _m_paddw(st2, temp0_1);
0064dbc5      st0 = _m_psrawi(st0, 1);
0064dbc9      st2 = _m_psrawi(temp0_69, 1);
0064dbcd      arg2[0xc] = st0;
0064dbd1      arg2[0xd] = st2;
0064dbd9      st2 = arg2[0xf];
0064dbdd      st1 = arg3[0xe];
0064dbe1      st3 = arg3[0xf];
0064dbe5      uint16_t temp0_72[0x4] = _m_psllwi(arg2[0xe], 3);
0064dbe9      st2 = _m_psllwi(st2, 3);
0064dbed      uint16_t temp0_74[0x4] = _m_psrlwi(st1, 1);
0064dbf1      uint16_t temp0_75[0x4] = _m_psrlwi(st3, 1);
0064dbf5      st0 = _m_pmulhw(temp0_72, temp0_74);
0064dbf8      st2 = _m_pmulhw(st2, temp0_75);
0064dbfb      st0 = _m_paddw(st0, temp0_1);
0064dbfe      int64_t temp0_79 = _m_paddw(st2, temp0_1);
0064dc01      st0 = _m_psrawi(st0, 1);
0064dc05      st2 = _m_psrawi(temp0_79, 1);
0064dc09      arg2[0xe] = st0;
0064dc0d      arg2[0xf] = st2;
0064da20  }

0064dc15                                                                 8d a4 24 00 00 00 00 8d 64 24 00                       ..$.....d$.

0064dc20  int32_t _own_fqnt8x8_ipp_w7(int16_t arg1[0x8] @ xmm6, int128_t* arg2, int128_t* arg3)

0064dc20  {
0064dc33      int32_t xmm7[0x4] = _mm_sub_epi16({0}, _mm_cmpeq_epi16(arg1, arg1));
0064dc33      
0064dc3d      if ((arg2 & 0xf) == 0)
0064dc3d      {
0064deb9          if ((arg3 & 0xf) == 0)
0064deb9          {
0064dff5              uint16_t xmm2_60[0x8] = arg2[1];
0064dffa              uint16_t xmm1_24[0x8] = *(uint128_t*)arg3;
0064dffe              uint16_t xmm3_24[0x8] = arg3[1];
0064e003              uint16_t xmm0_61[0x8] = _mm_slli_epi16(*(uint128_t*)arg2, 3);
0064e008              uint16_t xmm2_61[0x8] = _mm_slli_epi16(xmm2_60, 3);
0064e00d              uint16_t xmm1_25[0x8] = _mm_srli_epi16(xmm1_24, 1);
0064e012              uint16_t xmm3_25[0x8] = _mm_srli_epi16(xmm3_24, 1);
0064e017              int16_t xmm0_62[0x8] = _mm_mulhi_epi16(xmm0_61, xmm1_25);
0064e01b              int16_t xmm2_62[0x8] = _mm_mulhi_epi16(xmm2_61, xmm3_25);
0064e01f              int16_t xmm0_63[0x8] = _mm_add_epi16(xmm0_62, xmm7);
0064e023              int16_t xmm2_63[0x8] = _mm_add_epi16(xmm2_62, xmm7);
0064e027              int16_t xmm0_64[0x8] = _mm_srai_epi16(xmm0_63, 1);
0064e02c              int16_t xmm2_64[0x8] = _mm_srai_epi16(xmm2_63, 1);
0064e031              *(uint128_t*)arg2 = xmm0_64;
0064e035              arg2[1] = xmm2_64;
0064e03f              uint16_t xmm2_65[0x8] = arg2[3];
0064e044              uint16_t xmm1_26[0x8] = arg3[2];
0064e049              uint16_t xmm3_26[0x8] = arg3[3];
0064e04e              uint16_t xmm0_66[0x8] = _mm_slli_epi16(arg2[2], 3);
0064e053              uint16_t xmm2_66[0x8] = _mm_slli_epi16(xmm2_65, 3);
0064e058              uint16_t xmm1_27[0x8] = _mm_srli_epi16(xmm1_26, 1);
0064e05d              uint16_t xmm3_27[0x8] = _mm_srli_epi16(xmm3_26, 1);
0064e062              int16_t xmm0_67[0x8] = _mm_mulhi_epi16(xmm0_66, xmm1_27);
0064e066              int16_t xmm2_67[0x8] = _mm_mulhi_epi16(xmm2_66, xmm3_27);
0064e06a              int16_t xmm0_68[0x8] = _mm_add_epi16(xmm0_67, xmm7);
0064e06e              int16_t xmm2_68[0x8] = _mm_add_epi16(xmm2_67, xmm7);
0064e072              int16_t xmm0_69[0x8] = _mm_srai_epi16(xmm0_68, 1);
0064e077              int16_t xmm2_69[0x8] = _mm_srai_epi16(xmm2_68, 1);
0064e07c              arg2[2] = xmm0_69;
0064e081              arg2[3] = xmm2_69;
0064e08b              uint16_t xmm2_70[0x8] = arg2[5];
0064e090              uint16_t xmm1_28[0x8] = arg3[4];
0064e095              uint16_t xmm3_28[0x8] = arg3[5];
0064e09a              uint16_t xmm0_71[0x8] = _mm_slli_epi16(arg2[4], 3);
0064e09f              uint16_t xmm2_71[0x8] = _mm_slli_epi16(xmm2_70, 3);
0064e0a4              uint16_t xmm1_29[0x8] = _mm_srli_epi16(xmm1_28, 1);
0064e0a9              uint16_t xmm3_29[0x8] = _mm_srli_epi16(xmm3_28, 1);
0064e0ae              int16_t xmm0_72[0x8] = _mm_mulhi_epi16(xmm0_71, xmm1_29);
0064e0b2              int16_t xmm2_72[0x8] = _mm_mulhi_epi16(xmm2_71, xmm3_29);
0064e0b6              int16_t xmm0_73[0x8] = _mm_add_epi16(xmm0_72, xmm7);
0064e0ba              int16_t xmm2_73[0x8] = _mm_add_epi16(xmm2_72, xmm7);
0064e0be              int16_t xmm0_74[0x8] = _mm_srai_epi16(xmm0_73, 1);
0064e0c3              int16_t xmm2_74[0x8] = _mm_srai_epi16(xmm2_73, 1);
0064e0c8              arg2[4] = xmm0_74;
0064e0cd              arg2[5] = xmm2_74;
0064e0d7              uint16_t xmm2_75[0x8] = arg2[7];
0064e0dc              uint16_t xmm1_30[0x8] = arg3[6];
0064e0e1              uint16_t xmm3_30[0x8] = arg3[7];
0064e0e6              uint16_t xmm0_76[0x8] = _mm_slli_epi16(arg2[6], 3);
0064e0eb              uint16_t xmm2_76[0x8] = _mm_slli_epi16(xmm2_75, 3);
0064e0f0              uint16_t xmm1_31[0x8] = _mm_srli_epi16(xmm1_30, 1);
0064e0f5              uint16_t xmm3_31[0x8] = _mm_srli_epi16(xmm3_30, 1);
0064e0fa              int16_t xmm0_77[0x8] = _mm_mulhi_epi16(xmm0_76, xmm1_31);
0064e0fe              int16_t xmm2_77[0x8] = _mm_mulhi_epi16(xmm2_76, xmm3_31);
0064e102              int16_t xmm0_78[0x8] = _mm_add_epi16(xmm0_77, xmm7);
0064e106              int16_t xmm2_78[0x8] = _mm_add_epi16(xmm2_77, xmm7);
0064e10a              int16_t xmm0_79[0x8] = _mm_srai_epi16(xmm0_78, 1);
0064e10f              int16_t xmm2_79[0x8] = _mm_srai_epi16(xmm2_78, 1);
0064e114              arg2[6] = xmm0_79;
0064e119              arg2[7] = xmm2_79;
0064deb9          }
0064deb9          else
0064deb9          {
0064dec3              uint16_t xmm2_40[0x8] = arg2[1];
0064dec8              uint16_t xmm1_16[0x8] = *(uint128_t*)arg3;
0064decc              uint16_t xmm3_16[0x8] = arg3[1];
0064ded1              uint16_t xmm0_41[0x8] = _mm_slli_epi16(*(uint128_t*)arg2, 3);
0064ded6              uint16_t xmm2_41[0x8] = _mm_slli_epi16(xmm2_40, 3);
0064dedb              uint16_t xmm1_17[0x8] = _mm_srli_epi16(xmm1_16, 1);
0064dee0              uint16_t xmm3_17[0x8] = _mm_srli_epi16(xmm3_16, 1);
0064dee5              int16_t xmm0_42[0x8] = _mm_mulhi_epi16(xmm0_41, xmm1_17);
0064dee9              int16_t xmm2_42[0x8] = _mm_mulhi_epi16(xmm2_41, xmm3_17);
0064deed              int16_t xmm0_43[0x8] = _mm_add_epi16(xmm0_42, xmm7);
0064def1              int16_t xmm2_43[0x8] = _mm_add_epi16(xmm2_42, xmm7);
0064def5              int16_t xmm0_44[0x8] = _mm_srai_epi16(xmm0_43, 1);
0064defa              int16_t xmm2_44[0x8] = _mm_srai_epi16(xmm2_43, 1);
0064deff              *(uint128_t*)arg2 = xmm0_44;
0064df03              arg2[1] = xmm2_44;
0064df0d              uint16_t xmm2_45[0x8] = arg2[3];
0064df12              uint16_t xmm1_18[0x8] = arg3[2];
0064df17              uint16_t xmm3_18[0x8] = arg3[3];
0064df1c              uint16_t xmm0_46[0x8] = _mm_slli_epi16(arg2[2], 3);
0064df21              uint16_t xmm2_46[0x8] = _mm_slli_epi16(xmm2_45, 3);
0064df26              uint16_t xmm1_19[0x8] = _mm_srli_epi16(xmm1_18, 1);
0064df2b              uint16_t xmm3_19[0x8] = _mm_srli_epi16(xmm3_18, 1);
0064df30              int16_t xmm0_47[0x8] = _mm_mulhi_epi16(xmm0_46, xmm1_19);
0064df34              int16_t xmm2_47[0x8] = _mm_mulhi_epi16(xmm2_46, xmm3_19);
0064df38              int16_t xmm0_48[0x8] = _mm_add_epi16(xmm0_47, xmm7);
0064df3c              int16_t xmm2_48[0x8] = _mm_add_epi16(xmm2_47, xmm7);
0064df40              int16_t xmm0_49[0x8] = _mm_srai_epi16(xmm0_48, 1);
0064df45              int16_t xmm2_49[0x8] = _mm_srai_epi16(xmm2_48, 1);
0064df4a              arg2[2] = xmm0_49;
0064df4f              arg2[3] = xmm2_49;
0064df59              uint16_t xmm2_50[0x8] = arg2[5];
0064df5e              uint16_t xmm1_20[0x8] = arg3[4];
0064df63              uint16_t xmm3_20[0x8] = arg3[5];
0064df68              uint16_t xmm0_51[0x8] = _mm_slli_epi16(arg2[4], 3);
0064df6d              uint16_t xmm2_51[0x8] = _mm_slli_epi16(xmm2_50, 3);
0064df72              uint16_t xmm1_21[0x8] = _mm_srli_epi16(xmm1_20, 1);
0064df77              uint16_t xmm3_21[0x8] = _mm_srli_epi16(xmm3_20, 1);
0064df7c              int16_t xmm0_52[0x8] = _mm_mulhi_epi16(xmm0_51, xmm1_21);
0064df80              int16_t xmm2_52[0x8] = _mm_mulhi_epi16(xmm2_51, xmm3_21);
0064df84              int16_t xmm0_53[0x8] = _mm_add_epi16(xmm0_52, xmm7);
0064df88              int16_t xmm2_53[0x8] = _mm_add_epi16(xmm2_52, xmm7);
0064df8c              int16_t xmm0_54[0x8] = _mm_srai_epi16(xmm0_53, 1);
0064df91              int16_t xmm2_54[0x8] = _mm_srai_epi16(xmm2_53, 1);
0064df96              arg2[4] = xmm0_54;
0064df9b              arg2[5] = xmm2_54;
0064dfa5              uint16_t xmm2_55[0x8] = arg2[7];
0064dfaa              uint16_t xmm1_22[0x8] = arg3[6];
0064dfaf              uint16_t xmm3_22[0x8] = arg3[7];
0064dfb4              uint16_t xmm0_56[0x8] = _mm_slli_epi16(arg2[6], 3);
0064dfb9              uint16_t xmm2_56[0x8] = _mm_slli_epi16(xmm2_55, 3);
0064dfbe              uint16_t xmm1_23[0x8] = _mm_srli_epi16(xmm1_22, 1);
0064dfc3              uint16_t xmm3_23[0x8] = _mm_srli_epi16(xmm3_22, 1);
0064dfc8              int16_t xmm0_57[0x8] = _mm_mulhi_epi16(xmm0_56, xmm1_23);
0064dfcc              int16_t xmm2_57[0x8] = _mm_mulhi_epi16(xmm2_56, xmm3_23);
0064dfd0              int16_t xmm0_58[0x8] = _mm_add_epi16(xmm0_57, xmm7);
0064dfd4              int16_t xmm2_58[0x8] = _mm_add_epi16(xmm2_57, xmm7);
0064dfd8              int16_t xmm0_59[0x8] = _mm_srai_epi16(xmm0_58, 1);
0064dfdd              int16_t xmm2_59[0x8] = _mm_srai_epi16(xmm2_58, 1);
0064dfe2              arg2[6] = xmm0_59;
0064dfe7              arg2[7] = xmm2_59;
0064deb9          }
0064dc3d      }
0064dc3d      else if ((arg3 & 0xf) == 0)
0064dc49      {
0064dd85          uint16_t xmm2_20[0x8] = arg2[1];
0064dd8a          uint16_t xmm1_8[0x8] = *(uint128_t*)arg3;
0064dd8e          uint16_t xmm3_8[0x8] = arg3[1];
0064dd93          uint16_t xmm0_21[0x8] = _mm_slli_epi16(*(uint128_t*)arg2, 3);
0064dd98          uint16_t xmm2_21[0x8] = _mm_slli_epi16(xmm2_20, 3);
0064dd9d          uint16_t xmm1_9[0x8] = _mm_srli_epi16(xmm1_8, 1);
0064dda2          uint16_t xmm3_9[0x8] = _mm_srli_epi16(xmm3_8, 1);
0064dda7          int16_t xmm0_22[0x8] = _mm_mulhi_epi16(xmm0_21, xmm1_9);
0064ddab          int16_t xmm2_22[0x8] = _mm_mulhi_epi16(xmm2_21, xmm3_9);
0064ddaf          int16_t xmm0_23[0x8] = _mm_add_epi16(xmm0_22, xmm7);
0064ddb3          int16_t xmm2_23[0x8] = _mm_add_epi16(xmm2_22, xmm7);
0064ddb7          int16_t xmm0_24[0x8] = _mm_srai_epi16(xmm0_23, 1);
0064ddbc          int16_t xmm2_24[0x8] = _mm_srai_epi16(xmm2_23, 1);
0064ddc1          *(uint128_t*)arg2 = xmm0_24;
0064ddc5          arg2[1] = xmm2_24;
0064ddcf          uint16_t xmm2_25[0x8] = arg2[3];
0064ddd4          uint16_t xmm1_10[0x8] = arg3[2];
0064ddd9          uint16_t xmm3_10[0x8] = arg3[3];
0064ddde          uint16_t xmm0_26[0x8] = _mm_slli_epi16(arg2[2], 3);
0064dde3          uint16_t xmm2_26[0x8] = _mm_slli_epi16(xmm2_25, 3);
0064dde8          uint16_t xmm1_11[0x8] = _mm_srli_epi16(xmm1_10, 1);
0064dded          uint16_t xmm3_11[0x8] = _mm_srli_epi16(xmm3_10, 1);
0064ddf2          int16_t xmm0_27[0x8] = _mm_mulhi_epi16(xmm0_26, xmm1_11);
0064ddf6          int16_t xmm2_27[0x8] = _mm_mulhi_epi16(xmm2_26, xmm3_11);
0064ddfa          int16_t xmm0_28[0x8] = _mm_add_epi16(xmm0_27, xmm7);
0064ddfe          int16_t xmm2_28[0x8] = _mm_add_epi16(xmm2_27, xmm7);
0064de02          int16_t xmm0_29[0x8] = _mm_srai_epi16(xmm0_28, 1);
0064de07          int16_t xmm2_29[0x8] = _mm_srai_epi16(xmm2_28, 1);
0064de0c          arg2[2] = xmm0_29;
0064de11          arg2[3] = xmm2_29;
0064de1b          uint16_t xmm2_30[0x8] = arg2[5];
0064de20          uint16_t xmm1_12[0x8] = arg3[4];
0064de25          uint16_t xmm3_12[0x8] = arg3[5];
0064de2a          uint16_t xmm0_31[0x8] = _mm_slli_epi16(arg2[4], 3);
0064de2f          uint16_t xmm2_31[0x8] = _mm_slli_epi16(xmm2_30, 3);
0064de34          uint16_t xmm1_13[0x8] = _mm_srli_epi16(xmm1_12, 1);
0064de39          uint16_t xmm3_13[0x8] = _mm_srli_epi16(xmm3_12, 1);
0064de3e          int16_t xmm0_32[0x8] = _mm_mulhi_epi16(xmm0_31, xmm1_13);
0064de42          int16_t xmm2_32[0x8] = _mm_mulhi_epi16(xmm2_31, xmm3_13);
0064de46          int16_t xmm0_33[0x8] = _mm_add_epi16(xmm0_32, xmm7);
0064de4a          int16_t xmm2_33[0x8] = _mm_add_epi16(xmm2_32, xmm7);
0064de4e          int16_t xmm0_34[0x8] = _mm_srai_epi16(xmm0_33, 1);
0064de53          int16_t xmm2_34[0x8] = _mm_srai_epi16(xmm2_33, 1);
0064de58          arg2[4] = xmm0_34;
0064de5d          arg2[5] = xmm2_34;
0064de67          uint16_t xmm2_35[0x8] = arg2[7];
0064de6c          uint16_t xmm1_14[0x8] = arg3[6];
0064de71          uint16_t xmm3_14[0x8] = arg3[7];
0064de76          uint16_t xmm0_36[0x8] = _mm_slli_epi16(arg2[6], 3);
0064de7b          uint16_t xmm2_36[0x8] = _mm_slli_epi16(xmm2_35, 3);
0064de80          uint16_t xmm1_15[0x8] = _mm_srli_epi16(xmm1_14, 1);
0064de85          uint16_t xmm3_15[0x8] = _mm_srli_epi16(xmm3_14, 1);
0064de8a          int16_t xmm0_37[0x8] = _mm_mulhi_epi16(xmm0_36, xmm1_15);
0064de8e          int16_t xmm2_37[0x8] = _mm_mulhi_epi16(xmm2_36, xmm3_15);
0064de92          int16_t xmm0_38[0x8] = _mm_add_epi16(xmm0_37, xmm7);
0064de96          int16_t xmm2_38[0x8] = _mm_add_epi16(xmm2_37, xmm7);
0064de9a          int16_t xmm0_39[0x8] = _mm_srai_epi16(xmm0_38, 1);
0064de9f          int16_t xmm2_39[0x8] = _mm_srai_epi16(xmm2_38, 1);
0064dea4          arg2[6] = xmm0_39;
0064dea9          arg2[7] = xmm2_39;
0064dc49      }
0064dc49      else
0064dc49      {
0064dc53          uint16_t xmm2[0x8] = arg2[1];
0064dc58          uint16_t xmm1[0x8] = *(uint128_t*)arg3;
0064dc5c          uint16_t xmm3[0x8] = arg3[1];
0064dc61          uint16_t xmm0_1[0x8] = _mm_slli_epi16(*(uint128_t*)arg2, 3);
0064dc66          uint16_t xmm2_1[0x8] = _mm_slli_epi16(xmm2, 3);
0064dc6b          uint16_t xmm1_1[0x8] = _mm_srli_epi16(xmm1, 1);
0064dc70          uint16_t xmm3_1[0x8] = _mm_srli_epi16(xmm3, 1);
0064dc75          int16_t xmm0_2[0x8] = _mm_mulhi_epi16(xmm0_1, xmm1_1);
0064dc79          int16_t xmm2_2[0x8] = _mm_mulhi_epi16(xmm2_1, xmm3_1);
0064dc7d          int16_t xmm0_3[0x8] = _mm_add_epi16(xmm0_2, xmm7);
0064dc81          int16_t xmm2_3[0x8] = _mm_add_epi16(xmm2_2, xmm7);
0064dc85          int16_t xmm0_4[0x8] = _mm_srai_epi16(xmm0_3, 1);
0064dc8a          int16_t xmm2_4[0x8] = _mm_srai_epi16(xmm2_3, 1);
0064dc8f          *(uint128_t*)arg2 = xmm0_4;
0064dc93          arg2[1] = xmm2_4;
0064dc9d          uint16_t xmm2_5[0x8] = arg2[3];
0064dca2          uint16_t xmm1_2[0x8] = arg3[2];
0064dca7          uint16_t xmm3_2[0x8] = arg3[3];
0064dcac          uint16_t xmm0_6[0x8] = _mm_slli_epi16(arg2[2], 3);
0064dcb1          uint16_t xmm2_6[0x8] = _mm_slli_epi16(xmm2_5, 3);
0064dcb6          uint16_t xmm1_3[0x8] = _mm_srli_epi16(xmm1_2, 1);
0064dcbb          uint16_t xmm3_3[0x8] = _mm_srli_epi16(xmm3_2, 1);
0064dcc0          int16_t xmm0_7[0x8] = _mm_mulhi_epi16(xmm0_6, xmm1_3);
0064dcc4          int16_t xmm2_7[0x8] = _mm_mulhi_epi16(xmm2_6, xmm3_3);
0064dcc8          int16_t xmm0_8[0x8] = _mm_add_epi16(xmm0_7, xmm7);
0064dccc          int16_t xmm2_8[0x8] = _mm_add_epi16(xmm2_7, xmm7);
0064dcd0          int16_t xmm0_9[0x8] = _mm_srai_epi16(xmm0_8, 1);
0064dcd5          int16_t xmm2_9[0x8] = _mm_srai_epi16(xmm2_8, 1);
0064dcda          arg2[2] = xmm0_9;
0064dcdf          arg2[3] = xmm2_9;
0064dce9          uint16_t xmm2_10[0x8] = arg2[5];
0064dcee          uint16_t xmm1_4[0x8] = arg3[4];
0064dcf3          uint16_t xmm3_4[0x8] = arg3[5];
0064dcf8          uint16_t xmm0_11[0x8] = _mm_slli_epi16(arg2[4], 3);
0064dcfd          uint16_t xmm2_11[0x8] = _mm_slli_epi16(xmm2_10, 3);
0064dd02          uint16_t xmm1_5[0x8] = _mm_srli_epi16(xmm1_4, 1);
0064dd07          uint16_t xmm3_5[0x8] = _mm_srli_epi16(xmm3_4, 1);
0064dd0c          int16_t xmm0_12[0x8] = _mm_mulhi_epi16(xmm0_11, xmm1_5);
0064dd10          int16_t xmm2_12[0x8] = _mm_mulhi_epi16(xmm2_11, xmm3_5);
0064dd14          int16_t xmm0_13[0x8] = _mm_add_epi16(xmm0_12, xmm7);
0064dd18          int16_t xmm2_13[0x8] = _mm_add_epi16(xmm2_12, xmm7);
0064dd1c          int16_t xmm0_14[0x8] = _mm_srai_epi16(xmm0_13, 1);
0064dd21          int16_t xmm2_14[0x8] = _mm_srai_epi16(xmm2_13, 1);
0064dd26          arg2[4] = xmm0_14;
0064dd2b          arg2[5] = xmm2_14;
0064dd35          uint16_t xmm2_15[0x8] = arg2[7];
0064dd3a          uint16_t xmm1_6[0x8] = arg3[6];
0064dd3f          uint16_t xmm3_6[0x8] = arg3[7];
0064dd44          uint16_t xmm0_16[0x8] = _mm_slli_epi16(arg2[6], 3);
0064dd49          int16_t xmm2_16[0x8] = _mm_slli_epi16(xmm2_15, 3);
0064dd4e          uint16_t xmm1_7[0x8] = _mm_srli_epi16(xmm1_6, 1);
0064dd53          int16_t xmm3_7[0x8] = _mm_srli_epi16(xmm3_6, 1);
0064dd58          int16_t xmm0_17[0x8] = _mm_mulhi_epi16(xmm0_16, xmm1_7);
0064dd5c          int16_t xmm2_17[0x8] = _mm_mulhi_epi16(xmm2_16, xmm3_7);
0064dd60          int16_t xmm0_18[0x8] = _mm_add_epi16(xmm0_17, xmm7);
0064dd64          int16_t xmm2_18[0x8] = _mm_add_epi16(xmm2_17, xmm7);
0064dd68          int16_t xmm0_19[0x8] = _mm_srai_epi16(xmm0_18, 1);
0064dd6d          int16_t xmm2_19[0x8] = _mm_srai_epi16(xmm2_18, 1);
0064dd72          arg2[6] = xmm0_19;
0064dd77          arg2[7] = xmm2_19;
0064dc49      }
0064dc20  }

0064e122        8d a4 24 00 00 00 00 8d a4 24 00 00 00 00                                                    ..$......$....

0064e130  int32_t _own_dct_2d_16s_8x8_frv_m5(int64_t* arg1)

0064e130  {
0064e130      int64_t* ecx = arg1;
0064e138      int64_t st0 = ecx[2];
0064e13c      int64_t st1 = ecx[0xc];
0064e140      int64_t st2 = st0;
0064e143      int64_t st3 = ecx[4];
0064e147      int64_t temp0 = _m_paddsw(st0, st1);
0064e14a      int32_t st4[0x2] = ecx[0xa];
0064e14e      st0 = _m_psllwi(temp0, 3);
0064e152      int64_t st5 = *(uint64_t*)ecx;
0064e155      st4 = _m_paddsw(st4, st3);
0064e158      int64_t temp0_3 = __paddsw_mmxq_memq(st5, ecx[0xe]);
0064e15c      st4 = _m_psllwi(st4, 3);
0064e163      int64_t temp0_5 = _m_psubsw(st2, st1);
0064e166      st1 = (*(uint64_t*)data_832400);
0064e16d      int64_t temp0_6 = _m_psubsw(st0, st4);
0064e170      int64_t st7 = ecx[6];
0064e174      st1 = _m_pmulhw(st1, temp0_6);
0064e177      int64_t temp0_8 = __paddsw_mmxq_memq(st7, ecx[8]);
0064e17b      st5 = _m_psllwi(temp0_3, 3);
0064e17f      int64_t temp0_10 = _m_paddsw(st0, st4);
0064e182      st7 = _m_psllwi(temp0_8, 3);
0064e189      int64_t temp0_12 = _m_psubsw(st5, st7);
0064e18c      int64_t temp0_13 = _m_paddsw(st1, temp0_12);
0064e18f      st4 = _m_paddsw(st5, st7);
0064e192      st1 = (temp0_13 | (*(uint64_t*)data_8323d0));
0064e199      st2 = _m_psllwi(temp0_5, 4);
0064e19d      st5 = __pmulhw_mmxq_memq(temp0_12, (*(uint64_t*)data_832400));
0064e1a4      st7 = st4;
0064e1a7      int64_t temp0_17 = __psubsw_mmxq_memq(st3, ecx[0xa]);
0064e1ab      st4 = _m_psubsw(st4, temp0_10);
0064e1ae      arg1[4] = st1;
0064e1b2      int64_t temp0_19 = _m_paddsw(st7, temp0_10);
0064e1b5      st1 = ecx[6];
0064e1b9      st3 = _m_psllwi(temp0_17, 4);
0064e1bd      int64_t temp0_21 = __psubsw_mmxq_memq(st1, ecx[8]);
0064e1c1      int64_t st6 = st2;
0064e1c4      arg1[8] = st4;
0064e1cb      st2 = __pmulhw_mmxq_memq(_m_paddsw(st2, st3), (*(uint64_t*)data_832430));
0064e1d5      st6 = __pmulhw_mmxq_memq(_m_psubsw(st6, st3), (*(uint64_t*)data_832430));
0064e1df      st5 = (_m_psubsw(st5, temp0_6) | (*(uint64_t*)data_8323d0));
0064e1e6      st1 = _m_psllwi(temp0_21, 3);
0064e1ea      st2 |= (*(uint64_t*)data_8323d0);
0064e1f4      st3 = *(uint64_t*)ecx;
0064e1f7      int64_t temp0_28 = _m_paddsw(st1, st6);
0064e1fa      int64_t temp0_29 = __psubsw_mmxq_memq(st3, ecx[0xe]);
0064e1fe      st4 = _m_psubsw(st1, st6);
0064e201      st0 = (*(uint64_t*)data_8323f0);
0064e208      st3 = _m_psllwi(temp0_29, 3);
0064e20c      st6 = (*(uint64_t*)data_832410);
0064e213      st0 = _m_pmulhw(st0, temp0_28);
0064e216      *(uint64_t*)arg1 = temp0_19;
0064e219      st6 = _m_pmulhw(st6, st4);
0064e21c      arg1[0xc] = st5;
0064e223      st5 = (*(uint64_t*)data_832410);
0064e22a      int64_t temp0_34 = _m_psubsw(st3, st2);
0064e22d      int64_t temp0_35 = _m_paddsw(st3, st2);
0064e230      st5 = _m_pmulhw(st5, temp0_34);
0064e233      int64_t temp0_37 = _m_paddsw(st0, temp0_35);
0064e236      int64_t temp0_38 = _m_paddsw(st6, st4);
0064e239      st3 = __pmulhw_mmxq_memq(temp0_35, (*(uint64_t*)data_8323f0));
0064e240      st0 = (temp0_37 | (*(uint64_t*)data_8323d0));
0064e247      int64_t temp0_40 = _m_paddsw(st5, temp0_34);
0064e24a      int64_t temp0_41 = _m_psubsw(temp0_34, temp0_38);
0064e24d      arg1[2] = st0;
0064e251      int64_t temp0_42 = _m_paddsw(temp0_40, st4);
0064e254      arg1[6] = temp0_41;
0064e258      int64_t temp0_43 = _m_psubsw(st3, temp0_28);
0064e25b      arg1[0xa] = temp0_42;
0064e25f      arg1[0xe] = temp0_43;
0064e263      st0 = ecx[3];
0064e267      st1 = ecx[0xd];
0064e26b      st2 = st0;
0064e26e      st3 = ecx[5];
0064e272      int64_t temp0_44 = _m_paddsw(st0, st1);
0064e275      st4 = ecx[0xb];
0064e279      st0 = _m_psllwi(temp0_44, 3);
0064e27d      st5 = ecx[1];
0064e281      st4 = _m_paddsw(st4, st3);
0064e284      int64_t temp0_47 = __paddsw_mmxq_memq(st5, ecx[0xf]);
0064e288      st4 = _m_psllwi(st4, 3);
0064e28f      int64_t temp0_49 = _m_psubsw(st2, st1);
0064e292      st1 = (*(uint64_t*)data_832400);
0064e299      int64_t temp0_50 = _m_psubsw(st0, st4);
0064e29c      st7 = ecx[7];
0064e2a0      st1 = _m_pmulhw(st1, temp0_50);
0064e2a3      int64_t temp0_52 = __paddsw_mmxq_memq(st7, ecx[9]);
0064e2a7      st5 = _m_psllwi(temp0_47, 3);
0064e2ab      int64_t temp0_54 = _m_paddsw(st0, st4);
0064e2ae      st7 = _m_psllwi(temp0_52, 3);
0064e2b5      int64_t temp0_56 = _m_psubsw(st5, st7);
0064e2b8      int64_t temp0_57 = _m_paddsw(st1, temp0_56);
0064e2bb      st4 = _m_paddsw(st5, st7);
0064e2be      st1 = (temp0_57 | (*(uint64_t*)data_8323d0));
0064e2c5      st2 = _m_psllwi(temp0_49, 4);
0064e2c9      st5 = __pmulhw_mmxq_memq(temp0_56, (*(uint64_t*)data_832400));
0064e2d0      st7 = st4;
0064e2d3      int64_t temp0_61 = __psubsw_mmxq_memq(st3, ecx[0xb]);
0064e2d7      st4 = _m_psubsw(st4, temp0_54);
0064e2da      arg1[5] = st1;
0064e2de      int64_t temp0_63 = _m_paddsw(st7, temp0_54);
0064e2e1      st1 = ecx[7];
0064e2e5      st3 = _m_psllwi(temp0_61, 4);
0064e2e9      int64_t temp0_65 = __psubsw_mmxq_memq(st1, ecx[9]);
0064e2ed      st6 = st2;
0064e2f0      arg1[9] = st4;
0064e2f7      st2 = __pmulhw_mmxq_memq(_m_paddsw(st2, st3), (*(uint64_t*)data_832430));
0064e301      st6 = __pmulhw_mmxq_memq(_m_psubsw(st6, st3), (*(uint64_t*)data_832430));
0064e30b      st5 = (_m_psubsw(st5, temp0_50) | (*(uint64_t*)data_8323d0));
0064e312      st1 = _m_psllwi(temp0_65, 3);
0064e316      st2 |= (*(uint64_t*)data_8323d0);
0064e320      st3 = ecx[1];
0064e324      int64_t temp0_72 = _m_paddsw(st1, st6);
0064e327      int64_t temp0_73 = __psubsw_mmxq_memq(st3, ecx[0xf]);
0064e32b      st4 = _m_psubsw(st1, st6);
0064e32e      st0 = (*(uint64_t*)data_8323f0);
0064e335      st3 = _m_psllwi(temp0_73, 3);
0064e339      st6 = (*(uint64_t*)data_832410);
0064e340      st0 = _m_pmulhw(st0, temp0_72);
0064e343      arg1[1] = temp0_63;
0064e347      st6 = _m_pmulhw(st6, st4);
0064e34a      arg1[0xd] = st5;
0064e351      st5 = (*(uint64_t*)data_832410);
0064e358      int64_t temp0_78 = _m_psubsw(st3, st2);
0064e35b      int64_t temp0_79 = _m_paddsw(st3, st2);
0064e35e      st5 = _m_pmulhw(st5, temp0_78);
0064e361      int64_t temp0_81 = _m_paddsw(st0, temp0_79);
0064e364      int64_t temp0_82 = _m_paddsw(st6, st4);
0064e367      st3 = __pmulhw_mmxq_memq(temp0_79, (*(uint64_t*)data_8323f0));
0064e36e      st0 = (temp0_81 | (*(uint64_t*)data_8323d0));
0064e375      int64_t temp0_84 = _m_paddsw(st5, temp0_78);
0064e378      int64_t temp0_85 = _m_psubsw(temp0_78, temp0_82);
0064e37b      arg1[3] = st0;
0064e37f      int64_t temp0_86 = _m_paddsw(temp0_84, st4);
0064e382      arg1[7] = temp0_85;
0064e386      int64_t temp0_87 = _m_psubsw(st3, temp0_72);
0064e389      arg1[0xb] = temp0_86;
0064e38d      arg1[0xf] = temp0_87;
0064e391      st7 = (*(uint64_t*)data_8323e0);
0064e398      st0 = *(uint64_t*)arg1;
0064e39b      st1 = arg1[1];
0064e3a5      uint64_t temp0_88 = _m_psrlqi(st1, 0x20);
0064e3a9      st4 = data_832440;
0064e3b0      st1 = _m_punpcklwd(temp0_88, st1);
0064e3b3      st5 = data_832448;
0064e3bd      uint64_t temp0_90 = _m_psrlqi(st1, 0x20);
0064e3c1      st6 = data_832450;
0064e3c8      st1 = _m_punpcklwd(temp0_90, st1);
0064e3cb      int64_t temp0_92 = _m_paddsw(st0, st1);
0064e3ce      int64_t temp0_93 = _m_psubsw(st0, st1);
0064e3d4      st0 = _m_punpckldq(temp0_92, temp0_93);
0064e3d7      st4 = _m_pmaddwd(st4, st0);
0064e3da      int64_t temp0_96 = _m_punpckhdq(temp0_92, temp0_93);
0064e3dd      st1 = data_832458;
0064e3e4      st5 = _m_pmaddwd(st5, temp0_96);
0064e3e7      st2 = data_832460;
0064e3ee      st6 = _m_pmaddwd(st6, st0);
0064e3f1      st1 = _m_pmaddwd(st1, temp0_96);
0064e3f4      st4 = _m_paddd(st4, st7);
0064e3f7      st2 = _m_pmaddwd(st2, st0);
0064e3fa      st4 = _m_paddd(st4, st5);
0064e3fd      st5 = data_832468;
0064e404      int64_t temp0_103 = _m_paddd(st6, st7);
0064e407      int32_t temp0_104[0x2] = _m_psradi(st4, 0x14);
0064e40b      int64_t temp0_105 = _m_paddd(temp0_103, st1);
0064e40e      st5 = _m_pmaddwd(st5, temp0_96);
0064e411      st6 = _m_psradi(temp0_105, 0x14);
0064e415      st0 = __pmaddwd_mmxq_memq(st0, data_832470);
0064e41c      int32_t temp0_109[0x2] = _m_packssdw(temp0_104, st6);
0064e41f      st3 = __pmaddwd_mmxq_memq(temp0_96, data_832478);
0064e429      int64_t temp0_112 = _m_paddd(_m_paddd(st2, st7), st5);
0064e42c      int64_t temp0_113 = _m_paddd(st0, st7);
0064e42f      st2 = _m_psradi(temp0_112, 0x14);
0064e436      st0 = _m_psradi(_m_paddd(temp0_113, st3), 0x14);
0064e43a      *(uint64_t*)arg1 = temp0_109;
0064e43d      st2 = _m_packssdw(st2, st0);
0064e440      st0 = arg1[2];
0064e444      arg1[1] = st2;
0064e448      st1 = arg1[3];
0064e452      uint64_t temp0_118 = _m_psrlqi(st1, 0x20);
0064e456      st4 = data_832480;
0064e45d      st1 = _m_punpcklwd(temp0_118, st1);
0064e460      st5 = (*(uint64_t*)data_832488);
0064e46a      uint64_t temp0_120 = _m_psrlqi(st1, 0x20);
0064e46e      st6 = data_832490;
0064e475      st1 = _m_punpcklwd(temp0_120, st1);
0064e478      int64_t temp0_122 = _m_paddsw(st0, st1);
0064e47b      int64_t temp0_123 = _m_psubsw(st0, st1);
0064e481      st0 = _m_punpckldq(temp0_122, temp0_123);
0064e484      st4 = _m_pmaddwd(st4, st0);
0064e487      int64_t temp0_126 = _m_punpckhdq(temp0_122, temp0_123);
0064e48a      st1 = data_832498;
0064e491      st5 = _m_pmaddwd(st5, temp0_126);
0064e494      st2 = data_8324a0;
0064e49b      st6 = _m_pmaddwd(st6, st0);
0064e49e      st1 = _m_pmaddwd(st1, temp0_126);
0064e4a1      st4 = _m_paddd(st4, st7);
0064e4a4      st2 = _m_pmaddwd(st2, st0);
0064e4a7      st4 = _m_paddd(st4, st5);
0064e4aa      st5 = data_8324a8;
0064e4b1      int64_t temp0_133 = _m_paddd(st6, st7);
0064e4b4      int32_t temp0_134[0x2] = _m_psradi(st4, 0x14);
0064e4b8      int64_t temp0_135 = _m_paddd(temp0_133, st1);
0064e4bb      st5 = _m_pmaddwd(st5, temp0_126);
0064e4be      st6 = _m_psradi(temp0_135, 0x14);
0064e4c2      st0 = __pmaddwd_mmxq_memq(st0, data_8324b0);
0064e4c9      int32_t temp0_139[0x2] = _m_packssdw(temp0_134, st6);
0064e4cc      st3 = __pmaddwd_mmxq_memq(temp0_126, data_8324b8);
0064e4d6      int64_t temp0_142 = _m_paddd(_m_paddd(st2, st7), st5);
0064e4d9      int64_t temp0_143 = _m_paddd(st0, st7);
0064e4dc      st2 = _m_psradi(temp0_142, 0x14);
0064e4e3      st0 = _m_psradi(_m_paddd(temp0_143, st3), 0x14);
0064e4e7      arg1[2] = temp0_139;
0064e4eb      st2 = _m_packssdw(st2, st0);
0064e4ee      st0 = arg1[4];
0064e4f2      arg1[3] = st2;
0064e4f6      st1 = arg1[5];
0064e500      uint64_t temp0_148 = _m_psrlqi(st1, 0x20);
0064e504      st4 = data_8324c0;
0064e50b      st1 = _m_punpcklwd(temp0_148, st1);
0064e50e      st5 = data_8324c8;
0064e518      uint64_t temp0_150 = _m_psrlqi(st1, 0x20);
0064e51c      st6 = (*(uint64_t*)data_8324d0);
0064e523      st1 = _m_punpcklwd(temp0_150, st1);
0064e526      int64_t temp0_152 = _m_paddsw(st0, st1);
0064e529      int64_t temp0_153 = _m_psubsw(st0, st1);
0064e52f      st0 = _m_punpckldq(temp0_152, temp0_153);
0064e532      st4 = _m_pmaddwd(st4, st0);
0064e535      int64_t temp0_156 = _m_punpckhdq(temp0_152, temp0_153);
0064e538      st1 = data_8324d8;
0064e53f      st5 = _m_pmaddwd(st5, temp0_156);
0064e542      st2 = data_8324e0;
0064e549      st6 = _m_pmaddwd(st6, st0);
0064e54c      st1 = _m_pmaddwd(st1, temp0_156);
0064e54f      st4 = _m_paddd(st4, st7);
0064e552      st2 = _m_pmaddwd(st2, st0);
0064e555      st4 = _m_paddd(st4, st5);
0064e558      st5 = data_8324e8;
0064e55f      int64_t temp0_163 = _m_paddd(st6, st7);
0064e562      int32_t temp0_164[0x2] = _m_psradi(st4, 0x14);
0064e566      int64_t temp0_165 = _m_paddd(temp0_163, st1);
0064e569      st5 = _m_pmaddwd(st5, temp0_156);
0064e56c      st6 = _m_psradi(temp0_165, 0x14);
0064e570      st0 = __pmaddwd_mmxq_memq(st0, (*(uint64_t*)data_8324f0));
0064e577      int32_t temp0_169[0x2] = _m_packssdw(temp0_164, st6);
0064e57a      st3 = __pmaddwd_mmxq_memq(temp0_156, data_8324f8);
0064e584      int64_t temp0_172 = _m_paddd(_m_paddd(st2, st7), st5);
0064e587      int64_t temp0_173 = _m_paddd(st0, st7);
0064e58a      st2 = _m_psradi(temp0_172, 0x14);
0064e591      st0 = _m_psradi(_m_paddd(temp0_173, st3), 0x14);
0064e595      arg1[4] = temp0_169;
0064e599      st2 = _m_packssdw(st2, st0);
0064e59c      st0 = arg1[6];
0064e5a0      arg1[5] = st2;
0064e5a4      st1 = arg1[7];
0064e5b9      st1 = _m_punpcklwd(_m_psrlqi(st1, 0x20), st1);
0064e5c6      uint64_t temp0_180 = _m_psrlqi(st1, 0x20);
0064e5ca      st6 = data_832510;
0064e5d1      st1 = _m_punpcklwd(temp0_180, st1);
0064e5d4      int64_t temp0_182 = _m_paddsw(st0, st1);
0064e5d7      int64_t temp0_183 = _m_psubsw(st0, st1);
0064e5dd      st0 = _m_punpckldq(temp0_182, temp0_183);
0064e5e0      st4 = _m_pmaddwd(data_832500[0], st0);
0064e5e3      int64_t temp0_186 = _m_punpckhdq(temp0_182, temp0_183);
0064e5e6      st1 = data_832518;
0064e5ed      st5 = _m_pmaddwd(data_832500[8][0], temp0_186);
0064e5f0      st2 = data_832520;
0064e5f7      st6 = _m_pmaddwd(st6, st0);
0064e5fa      st1 = _m_pmaddwd(st1, temp0_186);
0064e5fd      st4 = _m_paddd(st4, st7);
0064e600      st2 = _m_pmaddwd(st2, st0);
0064e603      st4 = _m_paddd(st4, st5);
0064e606      st5 = data_832528;
0064e60d      int64_t temp0_193 = _m_paddd(st6, st7);
0064e610      int32_t temp0_194[0x2] = _m_psradi(st4, 0x14);
0064e614      int64_t temp0_195 = _m_paddd(temp0_193, st1);
0064e617      st5 = _m_pmaddwd(st5, temp0_186);
0064e61a      st6 = _m_psradi(temp0_195, 0x14);
0064e61e      st0 = __pmaddwd_mmxq_memq(st0, data_832530);
0064e625      int32_t temp0_199[0x2] = _m_packssdw(temp0_194, st6);
0064e628      st3 = __pmaddwd_mmxq_memq(temp0_186, data_832538);
0064e632      int64_t temp0_202 = _m_paddd(_m_paddd(st2, st7), st5);
0064e635      int64_t temp0_203 = _m_paddd(st0, st7);
0064e638      st2 = _m_psradi(temp0_202, 0x14);
0064e63f      st0 = _m_psradi(_m_paddd(temp0_203, st3), 0x14);
0064e643      arg1[6] = temp0_199;
0064e647      st2 = _m_packssdw(st2, st0);
0064e64a      st0 = arg1[8];
0064e64e      arg1[7] = st2;
0064e652      st1 = arg1[9];
0064e65c      uint64_t temp0_208 = _m_psrlqi(st1, 0x20);
0064e660      st4 = data_832440;
0064e667      st1 = _m_punpcklwd(temp0_208, st1);
0064e66a      st5 = data_832448;
0064e674      uint64_t temp0_210 = _m_psrlqi(st1, 0x20);
0064e678      st6 = data_832450;
0064e67f      st1 = _m_punpcklwd(temp0_210, st1);
0064e682      int64_t temp0_212 = _m_paddsw(st0, st1);
0064e685      int64_t temp0_213 = _m_psubsw(st0, st1);
0064e68b      st0 = _m_punpckldq(temp0_212, temp0_213);
0064e68e      st4 = _m_pmaddwd(st4, st0);
0064e691      int64_t temp0_216 = _m_punpckhdq(temp0_212, temp0_213);
0064e694      st1 = data_832458;
0064e69b      st5 = _m_pmaddwd(st5, temp0_216);
0064e69e      st2 = data_832460;
0064e6a5      st6 = _m_pmaddwd(st6, st0);
0064e6a8      st1 = _m_pmaddwd(st1, temp0_216);
0064e6ab      st4 = _m_paddd(st4, st7);
0064e6ae      st2 = _m_pmaddwd(st2, st0);
0064e6b1      st4 = _m_paddd(st4, st5);
0064e6b4      st5 = data_832468;
0064e6bb      int64_t temp0_223 = _m_paddd(st6, st7);
0064e6be      int32_t temp0_224[0x2] = _m_psradi(st4, 0x14);
0064e6c2      int64_t temp0_225 = _m_paddd(temp0_223, st1);
0064e6c5      st5 = _m_pmaddwd(st5, temp0_216);
0064e6c8      st6 = _m_psradi(temp0_225, 0x14);
0064e6cc      st0 = __pmaddwd_mmxq_memq(st0, data_832470);
0064e6d3      int32_t temp0_229[0x2] = _m_packssdw(temp0_224, st6);
0064e6d6      st3 = __pmaddwd_mmxq_memq(temp0_216, data_832478);
0064e6e0      int64_t temp0_232 = _m_paddd(_m_paddd(st2, st7), st5);
0064e6e3      int64_t temp0_233 = _m_paddd(st0, st7);
0064e6e6      st2 = _m_psradi(temp0_232, 0x14);
0064e6ed      st0 = _m_psradi(_m_paddd(temp0_233, st3), 0x14);
0064e6f1      arg1[8] = temp0_229;
0064e6f5      st2 = _m_packssdw(st2, st0);
0064e6f8      st0 = arg1[0xa];
0064e6fc      arg1[9] = st2;
0064e700      st1 = arg1[0xb];
0064e715      st1 = _m_punpcklwd(_m_psrlqi(st1, 0x20), st1);
0064e722      uint64_t temp0_240 = _m_psrlqi(st1, 0x20);
0064e726      st6 = data_832510;
0064e72d      st1 = _m_punpcklwd(temp0_240, st1);
0064e730      int64_t temp0_242 = _m_paddsw(st0, st1);
0064e733      int64_t temp0_243 = _m_psubsw(st0, st1);
0064e739      st0 = _m_punpckldq(temp0_242, temp0_243);
0064e73c      st4 = _m_pmaddwd(data_832500[0], st0);
0064e73f      int64_t temp0_246 = _m_punpckhdq(temp0_242, temp0_243);
0064e742      st1 = data_832518;
0064e749      st5 = _m_pmaddwd(data_832500[8][0], temp0_246);
0064e74c      st2 = data_832520;
0064e753      st6 = _m_pmaddwd(st6, st0);
0064e756      st1 = _m_pmaddwd(st1, temp0_246);
0064e759      st4 = _m_paddd(st4, st7);
0064e75c      st2 = _m_pmaddwd(st2, st0);
0064e75f      st4 = _m_paddd(st4, st5);
0064e762      st5 = data_832528;
0064e769      int64_t temp0_253 = _m_paddd(st6, st7);
0064e76c      int32_t temp0_254[0x2] = _m_psradi(st4, 0x14);
0064e770      int64_t temp0_255 = _m_paddd(temp0_253, st1);
0064e773      st5 = _m_pmaddwd(st5, temp0_246);
0064e776      st6 = _m_psradi(temp0_255, 0x14);
0064e77a      st0 = __pmaddwd_mmxq_memq(st0, data_832530);
0064e781      int32_t temp0_259[0x2] = _m_packssdw(temp0_254, st6);
0064e784      st3 = __pmaddwd_mmxq_memq(temp0_246, data_832538);
0064e78e      int64_t temp0_262 = _m_paddd(_m_paddd(st2, st7), st5);
0064e791      int64_t temp0_263 = _m_paddd(st0, st7);
0064e794      st2 = _m_psradi(temp0_262, 0x14);
0064e79b      st0 = _m_psradi(_m_paddd(temp0_263, st3), 0x14);
0064e79f      arg1[0xa] = temp0_259;
0064e7a3      st2 = _m_packssdw(st2, st0);
0064e7a6      st0 = arg1[0xc];
0064e7aa      arg1[0xb] = st2;
0064e7ae      st1 = arg1[0xd];
0064e7b8      uint64_t temp0_268 = _m_psrlqi(st1, 0x20);
0064e7bc      st4 = data_8324c0;
0064e7c3      st1 = _m_punpcklwd(temp0_268, st1);
0064e7c6      st5 = data_8324c8;
0064e7d0      uint64_t temp0_270 = _m_psrlqi(st1, 0x20);
0064e7d4      st6 = (*(uint64_t*)data_8324d0);
0064e7db      st1 = _m_punpcklwd(temp0_270, st1);
0064e7de      int64_t temp0_272 = _m_paddsw(st0, st1);
0064e7e1      int64_t temp0_273 = _m_psubsw(st0, st1);
0064e7e7      st0 = _m_punpckldq(temp0_272, temp0_273);
0064e7ea      st4 = _m_pmaddwd(st4, st0);
0064e7ed      int64_t temp0_276 = _m_punpckhdq(temp0_272, temp0_273);
0064e7f0      st1 = data_8324d8;
0064e7f7      st5 = _m_pmaddwd(st5, temp0_276);
0064e7fa      st2 = data_8324e0;
0064e801      st6 = _m_pmaddwd(st6, st0);
0064e804      st1 = _m_pmaddwd(st1, temp0_276);
0064e807      st4 = _m_paddd(st4, st7);
0064e80a      st2 = _m_pmaddwd(st2, st0);
0064e80d      st4 = _m_paddd(st4, st5);
0064e810      st5 = data_8324e8;
0064e817      int64_t temp0_283 = _m_paddd(st6, st7);
0064e81a      int32_t temp0_284[0x2] = _m_psradi(st4, 0x14);
0064e81e      int64_t temp0_285 = _m_paddd(temp0_283, st1);
0064e821      st5 = _m_pmaddwd(st5, temp0_276);
0064e824      st6 = _m_psradi(temp0_285, 0x14);
0064e828      st0 = __pmaddwd_mmxq_memq(st0, (*(uint64_t*)data_8324f0));
0064e82f      int32_t temp0_289[0x2] = _m_packssdw(temp0_284, st6);
0064e832      st3 = __pmaddwd_mmxq_memq(temp0_276, data_8324f8);
0064e83c      int64_t temp0_292 = _m_paddd(_m_paddd(st2, st7), st5);
0064e83f      int64_t temp0_293 = _m_paddd(st0, st7);
0064e842      st2 = _m_psradi(temp0_292, 0x14);
0064e849      st0 = _m_psradi(_m_paddd(temp0_293, st3), 0x14);
0064e84d      arg1[0xc] = temp0_289;
0064e851      st2 = _m_packssdw(st2, st0);
0064e854      st0 = arg1[0xe];
0064e858      arg1[0xd] = st2;
0064e85c      st1 = arg1[0xf];
0064e866      uint64_t temp0_298 = _m_psrlqi(st1, 0x20);
0064e86a      st4 = data_832480;
0064e871      st1 = _m_punpcklwd(temp0_298, st1);
0064e874      st5 = (*(uint64_t*)data_832488);
0064e87e      uint64_t temp0_300 = _m_psrlqi(st1, 0x20);
0064e882      st6 = data_832490;
0064e889      st1 = _m_punpcklwd(temp0_300, st1);
0064e88c      int64_t temp0_302 = _m_paddsw(st0, st1);
0064e88f      int64_t temp0_303 = _m_psubsw(st0, st1);
0064e895      st0 = _m_punpckldq(temp0_302, temp0_303);
0064e898      st4 = _m_pmaddwd(st4, st0);
0064e89b      int64_t temp0_306 = _m_punpckhdq(temp0_302, temp0_303);
0064e89e      st1 = data_832498;
0064e8a5      st5 = _m_pmaddwd(st5, temp0_306);
0064e8a8      st2 = data_8324a0;
0064e8af      st6 = _m_pmaddwd(st6, st0);
0064e8b2      st1 = _m_pmaddwd(st1, temp0_306);
0064e8b5      st4 = _m_paddd(st4, st7);
0064e8b8      st2 = _m_pmaddwd(st2, st0);
0064e8bb      st4 = _m_paddd(st4, st5);
0064e8be      st5 = data_8324a8;
0064e8c5      int64_t temp0_313 = _m_paddd(st6, st7);
0064e8c8      int32_t temp0_314[0x2] = _m_psradi(st4, 0x14);
0064e8cc      int64_t temp0_315 = _m_paddd(temp0_313, st1);
0064e8cf      st5 = _m_pmaddwd(st5, temp0_306);
0064e8d2      st6 = _m_psradi(temp0_315, 0x14);
0064e8d6      st0 = __pmaddwd_mmxq_memq(st0, data_8324b0);
0064e8dd      int32_t temp0_319[0x2] = _m_packssdw(temp0_314, st6);
0064e8e0      st3 = __pmaddwd_mmxq_memq(temp0_306, data_8324b8);
0064e8ea      int64_t temp0_322 = _m_paddd(_m_paddd(st2, st7), st5);
0064e8ed      int64_t temp0_323 = _m_paddd(st0, st7);
0064e8f0      st2 = _m_psradi(temp0_322, 0x14);
0064e8f7      st0 = _m_psradi(_m_paddd(temp0_323, st3), 0x14);
0064e8fb      arg1[0xe] = temp0_319;
0064e902      arg1[0xf] = _m_packssdw(st2, st0);
0064e130  }

0064e907                       8d a4 24 00 00 00 00 8b ff                                                         ..$......

0064e910  int32_t _own_dct_2d_16s_8x8_frv_a6(int64_t* arg1)

0064e910  {
0064e910      int64_t* ecx = arg1;
0064e918      int64_t st0 = ecx[2];
0064e91c      int64_t st1 = ecx[0xc];
0064e920      int64_t st2 = st0;
0064e923      int64_t st3 = ecx[4];
0064e927      int64_t temp0 = _m_paddsw(st0, st1);
0064e92a      int64_t st4 = ecx[0xa];
0064e92e      st0 = _m_psllwi(temp0, 3);
0064e932      int64_t st5 = *(uint64_t*)ecx;
0064e935      int64_t temp0_2 = _m_paddsw(st4, st3);
0064e938      int64_t temp0_3 = __paddsw_mmxq_memq(st5, ecx[0xe]);
0064e93c      st4 = _m_psllwi(temp0_2, 3);
0064e943      int64_t temp0_5 = _m_psubsw(st2, st1);
0064e946      st1 = (*(uint64_t*)data_832400);
0064e94d      int64_t temp0_6 = _m_psubsw(st0, st4);
0064e950      int64_t st7 = ecx[6];
0064e954      st1 = _m_pmulhw(st1, temp0_6);
0064e957      int64_t temp0_8 = __paddsw_mmxq_memq(st7, ecx[8]);
0064e95b      st5 = _m_psllwi(temp0_3, 3);
0064e95f      int64_t temp0_10 = _m_paddsw(st0, st4);
0064e962      st7 = _m_psllwi(temp0_8, 3);
0064e969      int64_t temp0_12 = _m_psubsw(st5, st7);
0064e96c      int64_t temp0_13 = _m_paddsw(st1, temp0_12);
0064e96f      int64_t temp0_14 = _m_paddsw(st5, st7);
0064e972      st1 = (temp0_13 | (*(uint64_t*)data_8323d0));
0064e979      st2 = _m_psllwi(temp0_5, 4);
0064e97d      st5 = __pmulhw_mmxq_memq(temp0_12, (*(uint64_t*)data_832400));
0064e987      int64_t temp0_17 = __psubsw_mmxq_memq(st3, ecx[0xa]);
0064e98b      int64_t temp0_18 = _m_psubsw(temp0_14, temp0_10);
0064e98e      arg1[4] = st1;
0064e992      int64_t temp0_19 = _m_paddsw(temp0_14, temp0_10);
0064e995      st1 = ecx[6];
0064e999      st3 = _m_psllwi(temp0_17, 4);
0064e99d      int64_t temp0_21 = __psubsw_mmxq_memq(st1, ecx[8]);
0064e9a1      int64_t st6 = st2;
0064e9a4      arg1[8] = temp0_18;
0064e9ab      st2 = __pmulhw_mmxq_memq(_m_paddsw(st2, st3), (*(uint64_t*)data_832430));
0064e9b5      st6 = __pmulhw_mmxq_memq(_m_psubsw(st6, st3), (*(uint64_t*)data_832430));
0064e9bf      st5 = (_m_psubsw(st5, temp0_6) | (*(uint64_t*)data_8323d0));
0064e9c6      st1 = _m_psllwi(temp0_21, 3);
0064e9ca      st2 |= (*(uint64_t*)data_8323d0);
0064e9d4      st3 = *(uint64_t*)ecx;
0064e9d7      int64_t temp0_28 = _m_paddsw(st1, st6);
0064e9da      int64_t temp0_29 = __psubsw_mmxq_memq(st3, ecx[0xe]);
0064e9de      int64_t temp0_30 = _m_psubsw(st1, st6);
0064e9e1      st0 = (*(uint64_t*)data_8323f0);
0064e9e8      st3 = _m_psllwi(temp0_29, 3);
0064e9ec      st6 = (*(uint64_t*)data_832410);
0064e9f3      st0 = _m_pmulhw(st0, temp0_28);
0064e9f6      *(uint64_t*)arg1 = temp0_19;
0064e9f9      st6 = _m_pmulhw(st6, temp0_30);
0064e9fc      arg1[0xc] = st5;
0064ea03      st5 = (*(uint64_t*)data_832410);
0064ea0a      int64_t temp0_34 = _m_psubsw(st3, st2);
0064ea0d      int64_t temp0_35 = _m_paddsw(st3, st2);
0064ea10      st5 = _m_pmulhw(st5, temp0_34);
0064ea13      int64_t temp0_37 = _m_paddsw(st0, temp0_35);
0064ea16      int64_t temp0_38 = _m_paddsw(st6, temp0_30);
0064ea19      st3 = __pmulhw_mmxq_memq(temp0_35, (*(uint64_t*)data_8323f0));
0064ea20      st0 = (temp0_37 | (*(uint64_t*)data_8323d0));
0064ea27      int64_t temp0_40 = _m_paddsw(st5, temp0_34);
0064ea2a      int64_t temp0_41 = _m_psubsw(temp0_34, temp0_38);
0064ea2d      arg1[2] = st0;
0064ea31      int64_t temp0_42 = _m_paddsw(temp0_40, temp0_30);
0064ea34      arg1[6] = temp0_41;
0064ea38      int64_t temp0_43 = _m_psubsw(st3, temp0_28);
0064ea3b      arg1[0xa] = temp0_42;
0064ea3f      arg1[0xe] = temp0_43;
0064ea43      st0 = ecx[3];
0064ea47      st1 = ecx[0xd];
0064ea4b      st2 = st0;
0064ea4e      st3 = ecx[5];
0064ea52      int64_t temp0_44 = _m_paddsw(st0, st1);
0064ea55      st4 = ecx[0xb];
0064ea59      st0 = _m_psllwi(temp0_44, 3);
0064ea5d      st5 = ecx[1];
0064ea61      int64_t temp0_46 = _m_paddsw(st4, st3);
0064ea64      int64_t temp0_47 = __paddsw_mmxq_memq(st5, ecx[0xf]);
0064ea68      st4 = _m_psllwi(temp0_46, 3);
0064ea6f      int64_t temp0_49 = _m_psubsw(st2, st1);
0064ea72      st1 = (*(uint64_t*)data_832400);
0064ea79      int64_t temp0_50 = _m_psubsw(st0, st4);
0064ea7c      st7 = ecx[7];
0064ea80      st1 = _m_pmulhw(st1, temp0_50);
0064ea83      int64_t temp0_52 = __paddsw_mmxq_memq(st7, ecx[9]);
0064ea87      st5 = _m_psllwi(temp0_47, 3);
0064ea8b      int64_t temp0_54 = _m_paddsw(st0, st4);
0064ea8e      st7 = _m_psllwi(temp0_52, 3);
0064ea95      int64_t temp0_56 = _m_psubsw(st5, st7);
0064ea98      int64_t temp0_57 = _m_paddsw(st1, temp0_56);
0064ea9b      int64_t temp0_58 = _m_paddsw(st5, st7);
0064ea9e      st1 = (temp0_57 | (*(uint64_t*)data_8323d0));
0064eaa5      st2 = _m_psllwi(temp0_49, 4);
0064eaa9      st5 = __pmulhw_mmxq_memq(temp0_56, (*(uint64_t*)data_832400));
0064eab3      int64_t temp0_61 = __psubsw_mmxq_memq(st3, ecx[0xb]);
0064eab7      int64_t temp0_62 = _m_psubsw(temp0_58, temp0_54);
0064eaba      arg1[5] = st1;
0064eabe      int64_t temp0_63 = _m_paddsw(temp0_58, temp0_54);
0064eac1      st1 = ecx[7];
0064eac5      st3 = _m_psllwi(temp0_61, 4);
0064eac9      int64_t temp0_65 = __psubsw_mmxq_memq(st1, ecx[9]);
0064eacd      st6 = st2;
0064ead0      arg1[9] = temp0_62;
0064ead7      st2 = __pmulhw_mmxq_memq(_m_paddsw(st2, st3), (*(uint64_t*)data_832430));
0064eae1      st6 = __pmulhw_mmxq_memq(_m_psubsw(st6, st3), (*(uint64_t*)data_832430));
0064eaeb      st5 = (_m_psubsw(st5, temp0_50) | (*(uint64_t*)data_8323d0));
0064eaf2      st1 = _m_psllwi(temp0_65, 3);
0064eaf6      st2 |= (*(uint64_t*)data_8323d0);
0064eb00      st3 = ecx[1];
0064eb04      int64_t temp0_72 = _m_paddsw(st1, st6);
0064eb07      int64_t temp0_73 = __psubsw_mmxq_memq(st3, ecx[0xf]);
0064eb0b      int64_t temp0_74 = _m_psubsw(st1, st6);
0064eb0e      st0 = (*(uint64_t*)data_8323f0);
0064eb15      st3 = _m_psllwi(temp0_73, 3);
0064eb19      st6 = (*(uint64_t*)data_832410);
0064eb20      st0 = _m_pmulhw(st0, temp0_72);
0064eb23      arg1[1] = temp0_63;
0064eb27      st6 = _m_pmulhw(st6, temp0_74);
0064eb2a      arg1[0xd] = st5;
0064eb31      st5 = (*(uint64_t*)data_832410);
0064eb38      int64_t temp0_78 = _m_psubsw(st3, st2);
0064eb3b      int64_t temp0_79 = _m_paddsw(st3, st2);
0064eb3e      st5 = _m_pmulhw(st5, temp0_78);
0064eb41      int64_t temp0_81 = _m_paddsw(st0, temp0_79);
0064eb44      int64_t temp0_82 = _m_paddsw(st6, temp0_74);
0064eb47      st3 = __pmulhw_mmxq_memq(temp0_79, (*(uint64_t*)data_8323f0));
0064eb4e      st0 = (temp0_81 | (*(uint64_t*)data_8323d0));
0064eb55      int64_t temp0_84 = _m_paddsw(st5, temp0_78);
0064eb58      int64_t temp0_85 = _m_psubsw(temp0_78, temp0_82);
0064eb5b      arg1[3] = st0;
0064eb5f      int64_t temp0_86 = _m_paddsw(temp0_84, temp0_74);
0064eb62      arg1[7] = temp0_85;
0064eb66      int64_t temp0_87 = _m_psubsw(st3, temp0_72);
0064eb69      arg1[0xb] = temp0_86;
0064eb6d      arg1[0xf] = temp0_87;
0064eb71      st7 = (*(uint64_t*)data_8323e0);
0064eb78      st0 = *(uint64_t*)arg1;
0064eb82      st3 = data_832440;
0064eb89      st1 = _mm_shuffle_pi16(arg1[1], 0x1b);
0064eb8d      st4 = data_832448;
0064eb94      int64_t temp0_89 = _m_paddsw(st0, st1);
0064eb97      st5 = data_832450;
0064eb9e      int64_t temp0_90 = _m_psubsw(st0, st1);
0064eba4      st0 = _m_punpckldq(temp0_89, temp0_90);
0064eba7      st3 = _m_pmaddwd(st3, st0);
0064ebaa      int64_t temp0_93 = _m_punpckhdq(temp0_89, temp0_90);
0064ebad      st6 = data_832458;
0064ebb4      st4 = _m_pmaddwd(st4, temp0_93);
0064ebb7      st2 = data_832460;
0064ebbe      st5 = _m_pmaddwd(st5, st0);
0064ebc1      st6 = _m_pmaddwd(st6, temp0_93);
0064ebc7      int64_t temp0_98 = _m_paddd(_m_paddd(st3, st7), st4);
0064ebca      st2 = _m_pmaddwd(st2, st0);
0064ebcd      st4 = data_832468;
0064ebd4      int64_t temp0_100 = _m_paddd(st5, st7);
0064ebd7      st3 = _m_psradi(temp0_98, 0x14);
0064ebdb      int64_t temp0_102 = _m_paddd(temp0_100, st6);
0064ebde      st4 = _m_pmaddwd(st4, temp0_93);
0064ebe1      st5 = _m_psradi(temp0_102, 0x14);
0064ebe5      st0 = __pmaddwd_mmxq_memq(st0, data_832470);
0064ebec      st3 = _m_packssdw(st3, st5);
0064ebef      st1 = __pmaddwd_mmxq_memq(temp0_93, data_832478);
0064ebfc      st2 = _m_psradi(_m_paddd(_m_paddd(st2, st7), st4), 0x14);
0064ec06      st0 = _m_psradi(_m_paddd(_m_paddd(st0, st7), st1), 0x14);
0064ec0a      *(uint64_t*)arg1 = st3;
0064ec0d      st2 = _m_packssdw(st2, st0);
0064ec10      st0 = arg1[2];
0064ec14      arg1[1] = st2;
0064ec1f      st3 = data_832480;
0064ec26      st1 = _mm_shuffle_pi16(arg1[3], 0x1b);
0064ec2a      st4 = (*(uint64_t*)data_832488);
0064ec31      int64_t temp0_116 = _m_paddsw(st0, st1);
0064ec34      st5 = data_832490;
0064ec3b      int64_t temp0_117 = _m_psubsw(st0, st1);
0064ec41      st0 = _m_punpckldq(temp0_116, temp0_117);
0064ec44      st3 = _m_pmaddwd(st3, st0);
0064ec47      int64_t temp0_120 = _m_punpckhdq(temp0_116, temp0_117);
0064ec4a      st6 = data_832498;
0064ec51      st4 = _m_pmaddwd(st4, temp0_120);
0064ec54      st2 = data_8324a0;
0064ec5b      st5 = _m_pmaddwd(st5, st0);
0064ec5e      st6 = _m_pmaddwd(st6, temp0_120);
0064ec64      int64_t temp0_125 = _m_paddd(_m_paddd(st3, st7), st4);
0064ec67      st2 = _m_pmaddwd(st2, st0);
0064ec6a      st4 = data_8324a8;
0064ec71      int64_t temp0_127 = _m_paddd(st5, st7);
0064ec74      st3 = _m_psradi(temp0_125, 0x14);
0064ec78      int64_t temp0_129 = _m_paddd(temp0_127, st6);
0064ec7b      st4 = _m_pmaddwd(st4, temp0_120);
0064ec7e      st5 = _m_psradi(temp0_129, 0x14);
0064ec82      st0 = __pmaddwd_mmxq_memq(st0, data_8324b0);
0064ec89      st3 = _m_packssdw(st3, st5);
0064ec8c      st1 = __pmaddwd_mmxq_memq(temp0_120, data_8324b8);
0064ec99      st2 = _m_psradi(_m_paddd(_m_paddd(st2, st7), st4), 0x14);
0064eca3      st0 = _m_psradi(_m_paddd(_m_paddd(st0, st7), st1), 0x14);
0064eca7      arg1[2] = st3;
0064ecab      st2 = _m_packssdw(st2, st0);
0064ecae      st0 = arg1[4];
0064ecb2      arg1[3] = st2;
0064ecbd      st3 = data_8324c0;
0064ecc4      st1 = _mm_shuffle_pi16(arg1[5], 0x1b);
0064ecc8      st4 = data_8324c8;
0064eccf      int64_t temp0_143 = _m_paddsw(st0, st1);
0064ecd2      st5 = (*(uint64_t*)data_8324d0);
0064ecd9      int64_t temp0_144 = _m_psubsw(st0, st1);
0064ecdf      st0 = _m_punpckldq(temp0_143, temp0_144);
0064ece2      st3 = _m_pmaddwd(st3, st0);
0064ece5      int64_t temp0_147 = _m_punpckhdq(temp0_143, temp0_144);
0064ece8      st6 = data_8324d8;
0064ecef      st4 = _m_pmaddwd(st4, temp0_147);
0064ecf2      st2 = data_8324e0;
0064ecf9      st5 = _m_pmaddwd(st5, st0);
0064ecfc      st6 = _m_pmaddwd(st6, temp0_147);
0064ed02      int64_t temp0_152 = _m_paddd(_m_paddd(st3, st7), st4);
0064ed05      st2 = _m_pmaddwd(st2, st0);
0064ed08      st4 = data_8324e8;
0064ed0f      int64_t temp0_154 = _m_paddd(st5, st7);
0064ed12      st3 = _m_psradi(temp0_152, 0x14);
0064ed16      int64_t temp0_156 = _m_paddd(temp0_154, st6);
0064ed19      st4 = _m_pmaddwd(st4, temp0_147);
0064ed1c      st5 = _m_psradi(temp0_156, 0x14);
0064ed20      st0 = __pmaddwd_mmxq_memq(st0, (*(uint64_t*)data_8324f0));
0064ed27      st3 = _m_packssdw(st3, st5);
0064ed2a      st1 = __pmaddwd_mmxq_memq(temp0_147, data_8324f8);
0064ed37      st2 = _m_psradi(_m_paddd(_m_paddd(st2, st7), st4), 0x14);
0064ed41      st0 = _m_psradi(_m_paddd(_m_paddd(st0, st7), st1), 0x14);
0064ed45      arg1[4] = st3;
0064ed49      st2 = _m_packssdw(st2, st0);
0064ed4c      st0 = arg1[6];
0064ed50      arg1[5] = st2;
0064ed62      st1 = _mm_shuffle_pi16(arg1[7], 0x1b);
0064ed6d      int64_t temp0_170 = _m_paddsw(st0, st1);
0064ed70      st5 = data_832510;
0064ed77      int64_t temp0_171 = _m_psubsw(st0, st1);
0064ed7d      st0 = _m_punpckldq(temp0_170, temp0_171);
0064ed80      st3 = _m_pmaddwd(data_832500[0], st0);
0064ed83      int64_t temp0_174 = _m_punpckhdq(temp0_170, temp0_171);
0064ed86      st6 = data_832518;
0064ed8d      st4 = _m_pmaddwd(data_832500[8][0], temp0_174);
0064ed90      st2 = data_832520;
0064ed97      st5 = _m_pmaddwd(st5, st0);
0064ed9a      st6 = _m_pmaddwd(st6, temp0_174);
0064eda0      int64_t temp0_179 = _m_paddd(_m_paddd(st3, st7), st4);
0064eda3      st2 = _m_pmaddwd(st2, st0);
0064eda6      st4 = data_832528;
0064edad      int64_t temp0_181 = _m_paddd(st5, st7);
0064edb0      st3 = _m_psradi(temp0_179, 0x14);
0064edb4      int64_t temp0_183 = _m_paddd(temp0_181, st6);
0064edb7      st4 = _m_pmaddwd(st4, temp0_174);
0064edba      st5 = _m_psradi(temp0_183, 0x14);
0064edbe      st0 = __pmaddwd_mmxq_memq(st0, data_832530);
0064edc5      st3 = _m_packssdw(st3, st5);
0064edc8      st1 = __pmaddwd_mmxq_memq(temp0_174, data_832538);
0064edd5      st2 = _m_psradi(_m_paddd(_m_paddd(st2, st7), st4), 0x14);
0064eddf      st0 = _m_psradi(_m_paddd(_m_paddd(st0, st7), st1), 0x14);
0064ede3      arg1[6] = st3;
0064ede7      st2 = _m_packssdw(st2, st0);
0064edea      st0 = arg1[8];
0064edee      arg1[7] = st2;
0064edf9      st3 = data_832440;
0064ee00      st1 = _mm_shuffle_pi16(arg1[9], 0x1b);
0064ee04      st4 = data_832448;
0064ee0b      int64_t temp0_197 = _m_paddsw(st0, st1);
0064ee0e      st5 = data_832450;
0064ee15      int64_t temp0_198 = _m_psubsw(st0, st1);
0064ee1b      st0 = _m_punpckldq(temp0_197, temp0_198);
0064ee1e      st3 = _m_pmaddwd(st3, st0);
0064ee21      int64_t temp0_201 = _m_punpckhdq(temp0_197, temp0_198);
0064ee24      st6 = data_832458;
0064ee2b      st4 = _m_pmaddwd(st4, temp0_201);
0064ee2e      st2 = data_832460;
0064ee35      st5 = _m_pmaddwd(st5, st0);
0064ee38      st6 = _m_pmaddwd(st6, temp0_201);
0064ee3e      int64_t temp0_206 = _m_paddd(_m_paddd(st3, st7), st4);
0064ee41      st2 = _m_pmaddwd(st2, st0);
0064ee44      st4 = data_832468;
0064ee4b      int64_t temp0_208 = _m_paddd(st5, st7);
0064ee4e      st3 = _m_psradi(temp0_206, 0x14);
0064ee52      int64_t temp0_210 = _m_paddd(temp0_208, st6);
0064ee55      st4 = _m_pmaddwd(st4, temp0_201);
0064ee58      st5 = _m_psradi(temp0_210, 0x14);
0064ee5c      st0 = __pmaddwd_mmxq_memq(st0, data_832470);
0064ee63      st3 = _m_packssdw(st3, st5);
0064ee66      st1 = __pmaddwd_mmxq_memq(temp0_201, data_832478);
0064ee73      st2 = _m_psradi(_m_paddd(_m_paddd(st2, st7), st4), 0x14);
0064ee7d      st0 = _m_psradi(_m_paddd(_m_paddd(st0, st7), st1), 0x14);
0064ee81      arg1[8] = st3;
0064ee85      st2 = _m_packssdw(st2, st0);
0064ee88      st0 = arg1[0xa];
0064ee8c      arg1[9] = st2;
0064ee9e      st1 = _mm_shuffle_pi16(arg1[0xb], 0x1b);
0064eea9      int64_t temp0_224 = _m_paddsw(st0, st1);
0064eeac      st5 = data_832510;
0064eeb3      int64_t temp0_225 = _m_psubsw(st0, st1);
0064eeb9      st0 = _m_punpckldq(temp0_224, temp0_225);
0064eebc      st3 = _m_pmaddwd(data_832500[0], st0);
0064eebf      int64_t temp0_228 = _m_punpckhdq(temp0_224, temp0_225);
0064eec2      st6 = data_832518;
0064eec9      st4 = _m_pmaddwd(data_832500[8][0], temp0_228);
0064eecc      st2 = data_832520;
0064eed3      st5 = _m_pmaddwd(st5, st0);
0064eed6      st6 = _m_pmaddwd(st6, temp0_228);
0064eedc      int64_t temp0_233 = _m_paddd(_m_paddd(st3, st7), st4);
0064eedf      st2 = _m_pmaddwd(st2, st0);
0064eee2      st4 = data_832528;
0064eee9      int64_t temp0_235 = _m_paddd(st5, st7);
0064eeec      st3 = _m_psradi(temp0_233, 0x14);
0064eef0      int64_t temp0_237 = _m_paddd(temp0_235, st6);
0064eef3      st4 = _m_pmaddwd(st4, temp0_228);
0064eef6      st5 = _m_psradi(temp0_237, 0x14);
0064eefa      st0 = __pmaddwd_mmxq_memq(st0, data_832530);
0064ef01      st3 = _m_packssdw(st3, st5);
0064ef04      st1 = __pmaddwd_mmxq_memq(temp0_228, data_832538);
0064ef11      st2 = _m_psradi(_m_paddd(_m_paddd(st2, st7), st4), 0x14);
0064ef1b      st0 = _m_psradi(_m_paddd(_m_paddd(st0, st7), st1), 0x14);
0064ef1f      arg1[0xa] = st3;
0064ef23      st2 = _m_packssdw(st2, st0);
0064ef26      st0 = arg1[0xc];
0064ef2a      arg1[0xb] = st2;
0064ef35      st3 = data_8324c0;
0064ef3c      st1 = _mm_shuffle_pi16(arg1[0xd], 0x1b);
0064ef40      st4 = data_8324c8;
0064ef47      int64_t temp0_251 = _m_paddsw(st0, st1);
0064ef4a      st5 = (*(uint64_t*)data_8324d0);
0064ef51      int64_t temp0_252 = _m_psubsw(st0, st1);
0064ef57      st0 = _m_punpckldq(temp0_251, temp0_252);
0064ef5a      st3 = _m_pmaddwd(st3, st0);
0064ef5d      int64_t temp0_255 = _m_punpckhdq(temp0_251, temp0_252);
0064ef60      st6 = data_8324d8;
0064ef67      st4 = _m_pmaddwd(st4, temp0_255);
0064ef6a      st2 = data_8324e0;
0064ef71      st5 = _m_pmaddwd(st5, st0);
0064ef74      st6 = _m_pmaddwd(st6, temp0_255);
0064ef7a      int64_t temp0_260 = _m_paddd(_m_paddd(st3, st7), st4);
0064ef7d      st2 = _m_pmaddwd(st2, st0);
0064ef80      st4 = data_8324e8;
0064ef87      int64_t temp0_262 = _m_paddd(st5, st7);
0064ef8a      st3 = _m_psradi(temp0_260, 0x14);
0064ef8e      int64_t temp0_264 = _m_paddd(temp0_262, st6);
0064ef91      st4 = _m_pmaddwd(st4, temp0_255);
0064ef94      st5 = _m_psradi(temp0_264, 0x14);
0064ef98      st0 = __pmaddwd_mmxq_memq(st0, (*(uint64_t*)data_8324f0));
0064ef9f      st3 = _m_packssdw(st3, st5);
0064efa2      st1 = __pmaddwd_mmxq_memq(temp0_255, data_8324f8);
0064efaf      st2 = _m_psradi(_m_paddd(_m_paddd(st2, st7), st4), 0x14);
0064efb9      st0 = _m_psradi(_m_paddd(_m_paddd(st0, st7), st1), 0x14);
0064efbd      arg1[0xc] = st3;
0064efc1      st2 = _m_packssdw(st2, st0);
0064efc4      st0 = arg1[0xe];
0064efc8      arg1[0xd] = st2;
0064efd3      st3 = data_832480;
0064efda      st1 = _mm_shuffle_pi16(arg1[0xf], 0x1b);
0064efde      st4 = (*(uint64_t*)data_832488);
0064efe5      int64_t temp0_278 = _m_paddsw(st0, st1);
0064efe8      st5 = data_832490;
0064efef      int64_t temp0_279 = _m_psubsw(st0, st1);
0064eff5      st0 = _m_punpckldq(temp0_278, temp0_279);
0064eff8      st3 = _m_pmaddwd(st3, st0);
0064effb      int64_t temp0_282 = _m_punpckhdq(temp0_278, temp0_279);
0064effe      st6 = data_832498;
0064f005      st4 = _m_pmaddwd(st4, temp0_282);
0064f008      st2 = data_8324a0;
0064f00f      st5 = _m_pmaddwd(st5, st0);
0064f012      st6 = _m_pmaddwd(st6, temp0_282);
0064f018      int64_t temp0_287 = _m_paddd(_m_paddd(st3, st7), st4);
0064f01b      st2 = _m_pmaddwd(st2, st0);
0064f01e      st4 = data_8324a8;
0064f025      int64_t temp0_289 = _m_paddd(st5, st7);
0064f028      st3 = _m_psradi(temp0_287, 0x14);
0064f02c      int64_t temp0_291 = _m_paddd(temp0_289, st6);
0064f02f      st4 = _m_pmaddwd(st4, temp0_282);
0064f032      st5 = _m_psradi(temp0_291, 0x14);
0064f036      st0 = __pmaddwd_mmxq_memq(st0, data_8324b0);
0064f03d      st3 = _m_packssdw(st3, st5);
0064f040      st1 = __pmaddwd_mmxq_memq(temp0_282, data_8324b8);
0064f04d      st2 = _m_psradi(_m_paddd(_m_paddd(st2, st7), st4), 0x14);
0064f057      st0 = _m_psradi(_m_paddd(_m_paddd(st0, st7), st1), 0x14);
0064f05b      arg1[0xe] = st3;
0064f062      arg1[0xf] = _m_packssdw(st2, st0);
0064e910  }

0064f067                       8d a4 24 00 00 00 00 8b ff                                                         ..$......

0064f070  void _own_dct_2d_16s_8x8_frv_w7(int128_t* arg1)

0064f070  {
0064f074      void* edx = arg1;
0064f07e      void* esp;
0064f07e      
0064f07e      if ((edx & 0xf) != 0)
0064f07e      {
0064f088          void var_80;
0064f088          esp = &var_80;
0064f08b          edx = &var_80;
0064f07e      }
0064f07e      
0064f093      if ((arg1 & 0xf) != 0)
0064f093      {
0064f5ae          int32_t xmm0_41[0x4] = arg1[1];
0064f5b3          int32_t xmm1_46[0x4] = arg1[6];
0064f5bc          int32_t xmm3_18[0x4] = arg1[2];
0064f5c1          int32_t xmm0_42[0x4] = _mm_adds_epi16(xmm0_41, xmm1_46);
0064f5c5          int32_t xmm4_34[0x4] = arg1[5];
0064f5ca          uint16_t xmm0_43[0x8] = _mm_slli_epi16(xmm0_42, 3);
0064f5cf          int32_t xmm5_37[0x4] = *(uint128_t*)arg1;
0064f5d3          int32_t xmm4_35[0x4] = _mm_adds_epi16(xmm4_34, xmm3_18);
0064f5dc          int32_t xmm5_38[0x4] = _mm_adds_epi16(xmm5_37, arg1[7]);
0064f5e0          int32_t xmm2_19[0x4] = _mm_subs_epi16(xmm0_41, xmm1_46);
0064f5e4          int128_t xmm1_47 = data_832400;
0064f5ec          int32_t xmm4_36[0x4] = _mm_slli_epi16(xmm4_35, 3);
0064f5f5          int32_t xmm0_44[0x4] = _mm_subs_epi16(xmm0_43, xmm4_36);
0064f5f9          int32_t xmm7_17[0x4] = arg1[3];
0064f5fe          int32_t xmm6_18[0x4] = _mm_adds_epi16(xmm0_43, xmm4_36);
0064f607          int32_t xmm7_18[0x4] = _mm_adds_epi16(xmm7_17, arg1[4]);
0064f60b          int16_t xmm1_48[0x8] = _mm_mulhi_epi16(xmm1_47, xmm0_44);
0064f613          int32_t xmm5_39[0x4] = _mm_subs_epi16(xmm5_38, xmm7_18);
0064f617          int32_t xmm4_39[0x4] = _mm_adds_epi16(xmm5_38, xmm7_18);
0064f61b          int32_t xmm5_40[0x4] = _mm_slli_epi16(xmm5_39, 3);
0064f620          int32_t xmm1_49[0x4] = _mm_adds_epi16(xmm1_48, xmm5_40);
0064f624          uint16_t xmm4_40[0x8] = _mm_slli_epi16(xmm4_39, 3);
0064f629          uint16_t xmm1_50[0x8] = (xmm1_49 | data_8323d0);
0064f631          uint16_t xmm2_20[0x8] = _mm_slli_epi16(xmm2_19, 4);
0064f636          int16_t xmm5_41[0x8] = __pmulhw_xmmdq_memdq(xmm5_40, data_832400);
0064f647          *(uint128_t*)((char*)edx + 0x20) = _mm_shufflehi_epi16(xmm1_50, 0x1b);
0064f64c          int32_t xmm4_41[0x4] = _mm_subs_epi16(xmm4_40, xmm6_18);
0064f655          int32_t xmm3_19[0x4] = _mm_subs_epi16(xmm3_18, arg1[5]);
0064f659          int32_t xmm7_20[0x4] = _mm_adds_epi16(xmm4_40, xmm6_18);
0064f65d          int32_t xmm1_53[0x4] = arg1[3];
0064f662          int32_t xmm3_20[0x4] = _mm_slli_epi16(xmm3_19, 4);
0064f66c          int32_t xmm1_54[0x4] = _mm_subs_epi16(xmm1_53, arg1[4]);
0064f679          *(uint128_t*)((char*)edx + 0x40) = _mm_shufflehi_epi16(xmm4_41, 0x1b);
0064f682          int16_t xmm2_22[0x8] = __pmulhw_xmmdq_memdq(_mm_adds_epi16(xmm2_20, xmm3_20), data_832430);
0064f68e          int16_t xmm6_22[0x8] = __pmulhw_xmmdq_memdq(_mm_subs_epi16(xmm2_20, xmm3_20), data_832430);
0064f69a          uint16_t xmm5_43[0x8] = (_mm_subs_epi16(xmm5_41, xmm0_44) | data_8323d0);
0064f6a2          uint16_t xmm1_55[0x8] = _mm_slli_epi16(xmm1_54, 3);
0064f6a7          int32_t xmm2_23[0x4] = (xmm2_22 | data_8323d0);
0064f6b3          int32_t xmm3_21[0x4] = *(uint128_t*)arg1;
0064f6b7          int32_t xmm1_56[0x4] = _mm_adds_epi16(xmm1_55, xmm6_22);
0064f6c0          int32_t xmm3_22[0x4] = _mm_subs_epi16(xmm3_21, arg1[7]);
0064f6c4          int32_t xmm4_44[0x4] = _mm_subs_epi16(xmm1_55, xmm6_22);
0064f6c8          int128_t xmm0_46 = data_8323f0;
0064f6d0          uint16_t xmm3_23[0x8] = _mm_slli_epi16(xmm3_22, 3);
0064f6d5          int128_t xmm6_23 = data_832410;
0064f6dd          int16_t xmm0_47[0x8] = _mm_mulhi_epi16(xmm0_46, xmm1_56);
0064f6e6          *(uint128_t*)edx = _mm_shufflehi_epi16(xmm7_20, 0x1b);
0064f6ea          int16_t xmm6_24[0x8] = _mm_mulhi_epi16(xmm6_23, xmm4_44);
0064f6f3          *(uint128_t*)((char*)edx + 0x60) = _mm_shufflehi_epi16(xmm5_43, 0x1b);
0064f6fc          int128_t xmm5_45 = data_832410;
0064f704          int32_t xmm7_23[0x4] = _mm_subs_epi16(xmm3_23, xmm2_23);
0064f708          int32_t xmm3_24[0x4] = _mm_adds_epi16(xmm3_23, xmm2_23);
0064f70c          int16_t xmm5_46[0x8] = _mm_mulhi_epi16(xmm5_45, xmm7_23);
0064f710          int32_t xmm0_48[0x4] = _mm_adds_epi16(xmm0_47, xmm3_24);
0064f714          int32_t xmm6_25[0x4] = _mm_adds_epi16(xmm6_24, xmm4_44);
0064f718          int16_t xmm3_25[0x8] = __pmulhw_xmmdq_memdq(xmm3_24, data_8323f0);
0064f720          uint16_t xmm0_49[0x8] = (xmm0_48 | data_8323d0);
0064f728          int32_t xmm5_47[0x4] = _mm_adds_epi16(xmm5_46, xmm7_23);
0064f72c          int32_t xmm7_24[0x4] = _mm_subs_epi16(xmm7_23, xmm6_25);
0064f735          *(uint128_t*)((char*)edx + 0x10) = _mm_shufflehi_epi16(xmm0_49, 0x1b);
0064f73a          int32_t xmm5_48[0x4] = _mm_adds_epi16(xmm5_47, xmm4_44);
0064f743          *(uint128_t*)((char*)edx + 0x30) = _mm_shufflehi_epi16(xmm7_24, 0x1b);
0064f748          int32_t xmm3_26[0x4] = _mm_subs_epi16(xmm3_25, xmm1_56);
0064f751          *(uint128_t*)((char*)edx + 0x50) = _mm_shufflehi_epi16(xmm5_48, 0x1b);
0064f75b          *(uint128_t*)((char*)edx + 0x70) = _mm_shufflehi_epi16(xmm3_26, 0x1b);
0064f75b          
0064f762          if (edx == esp)
0064f762          {
0064f76a          label_64f76a:
0064f76a              int128_t xmm0_51 = *(uint128_t*)esp;
0064f779              uint128_t xmm2_24 = (xmm0_51 >> 0x40);
0064f77c              int32_t xmm0_52[0x4] = (xmm0_51 | (((int64_t)*(uint128_t*)((char*)esp + 0x40)) << 0x40));
0064f783              int32_t xmm0_53[0x4] = _mm_adds_epi16(xmm0_52, xmm2_24);
0064f787              int64_t xmm1_59 = _mm_subs_epi16(xmm0_52, xmm2_24);
0064f78f              int32_t xmm0_54[0x4] = _mm_unpacklo_epi32(xmm0_53, xmm1_59);
0064f793              int32_t xmm4_46[0x4] = _mm_unpackhi_epi32(xmm0_53, xmm1_59);
0064f797              uint32_t xmm2_25[0x4] = _mm_shuffle_epi32(xmm0_54, 0x4e);
0064f79c              uint32_t xmm6_26[0x4] = _mm_shuffle_epi32(xmm4_46, 0x4e);
0064f7a9              int16_t xmm1_61[0x8] = _mm_madd_epi16(data_832540, xmm0_54);
0064f7b5              int16_t xmm3_29[0x8] = _mm_madd_epi16(data_832550, xmm2_25);
0064f7b9              int16_t xmm0_55[0x8] = __pmaddwd_xmmdq_memdq(xmm0_54, data_832560);
0064f7c1              int16_t xmm2_26[0x8] = __pmaddwd_xmmdq_memdq(xmm2_25, data_832570);
0064f7c9              int32_t xmm1_62[0x4] = __paddd_xmmdq_memdq(xmm1_61, data_8323e0);
0064f7d1              int32_t xmm0_56[0x4] = __paddd_xmmdq_memdq(xmm0_55, data_8323e0);
0064f7eb              int64_t xmm1_65 = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_62, xmm3_29), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm0_56, xmm2_26), 0x14));
0064f7f7              int16_t xmm5_51[0x8] = _mm_madd_epi16(data_832540, xmm4_46);
0064f803              int16_t xmm7_27[0x8] = _mm_madd_epi16(data_832550, xmm6_26);
0064f807              int16_t xmm4_47[0x8] = __pmaddwd_xmmdq_memdq(xmm4_46, data_832560);
0064f80f              int16_t xmm6_27[0x8] = __pmaddwd_xmmdq_memdq(xmm6_26, data_832570);
0064f817              int32_t xmm5_52[0x4] = __paddd_xmmdq_memdq(xmm5_51, data_8323e0);
0064f81f              int32_t xmm4_48[0x4] = __paddd_xmmdq_memdq(xmm4_47, data_8323e0);
0064f839              int64_t xmm5_55 = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_52, xmm7_27), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm4_48, xmm6_27), 0x14));
0064f83d              *(uint64_t*)arg1 = xmm1_65;
0064f840              *(uint128_t*)((char*)arg1 + 8) = (*(uint64_t*)((char*)arg1 + 8) | (xmm1_65 << 0x40));
0064f844              arg1[4] = xmm5_55;
0064f848              *(uint128_t*)((char*)arg1 + 0x48) = (*(uint64_t*)((char*)arg1 + 0x48) | (xmm5_55 << 0x40));
0064f84c              int128_t xmm0_59 = *(uint128_t*)((char*)esp + 0x10);
0064f85c              uint128_t xmm2_27 = (xmm0_59 >> 0x40);
0064f85f              int32_t xmm0_60[0x4] = (xmm0_59 | (((int64_t)*(uint128_t*)((char*)esp + 0x70)) << 0x40));
0064f866              int32_t xmm0_61[0x4] = _mm_adds_epi16(xmm0_60, xmm2_27);
0064f86a              int64_t xmm1_68 = _mm_subs_epi16(xmm0_60, xmm2_27);
0064f872              int32_t xmm0_62[0x4] = _mm_unpacklo_epi32(xmm0_61, xmm1_68);
0064f876              int32_t xmm4_52[0x4] = _mm_unpackhi_epi32(xmm0_61, xmm1_68);
0064f87a              uint32_t xmm2_28[0x4] = _mm_shuffle_epi32(xmm0_62, 0x4e);
0064f87f              uint32_t xmm6_28[0x4] = _mm_shuffle_epi32(xmm4_52, 0x4e);
0064f88c              int16_t xmm1_70[0x8] = _mm_madd_epi16(data_832580, xmm0_62);
0064f898              int16_t xmm3_31[0x8] = _mm_madd_epi16(data_832590, xmm2_28);
0064f89c              int16_t xmm0_63[0x8] = __pmaddwd_xmmdq_memdq(xmm0_62, data_8325a0);
0064f8a4              int16_t xmm2_29[0x8] = __pmaddwd_xmmdq_memdq(xmm2_28, data_8325b0);
0064f8ac              int32_t xmm1_71[0x4] = __paddd_xmmdq_memdq(xmm1_70, data_8323e0);
0064f8b4              int32_t xmm0_64[0x4] = __paddd_xmmdq_memdq(xmm0_63, data_8323e0);
0064f8ce              int64_t xmm1_74 = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_71, xmm3_31), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm0_64, xmm2_29), 0x14));
0064f8da              int16_t xmm5_57[0x8] = _mm_madd_epi16(data_832580, xmm4_52);
0064f8e6              int16_t xmm7_29[0x8] = _mm_madd_epi16(data_832590, xmm6_28);
0064f8ea              int16_t xmm4_53[0x8] = __pmaddwd_xmmdq_memdq(xmm4_52, data_8325a0);
0064f8f2              int16_t xmm6_29[0x8] = __pmaddwd_xmmdq_memdq(xmm6_28, data_8325b0);
0064f8fa              int32_t xmm5_58[0x4] = __paddd_xmmdq_memdq(xmm5_57, data_8323e0);
0064f902              int32_t xmm4_54[0x4] = __paddd_xmmdq_memdq(xmm4_53, data_8323e0);
0064f91c              int64_t xmm5_61 = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_58, xmm7_29), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm4_54, xmm6_29), 0x14));
0064f920              arg1[1] = xmm1_74;
0064f924              *(uint128_t*)((char*)arg1 + 0x18) = (*(uint64_t*)((char*)arg1 + 0x18) | (xmm1_74 << 0x40));
0064f928              arg1[7] = xmm5_61;
0064f92c              *(uint128_t*)((char*)arg1 + 0x78) = (*(uint64_t*)((char*)arg1 + 0x78) | (xmm5_61 << 0x40));
0064f930              int128_t xmm0_67 = *(uint128_t*)((char*)esp + 0x20);
0064f940              uint128_t xmm2_30 = (xmm0_67 >> 0x40);
0064f943              int32_t xmm0_68[0x4] = (xmm0_67 | (((int64_t)*(uint128_t*)((char*)esp + 0x60)) << 0x40));
0064f94a              int32_t xmm0_69[0x4] = _mm_adds_epi16(xmm0_68, xmm2_30);
0064f94e              int64_t xmm1_77 = _mm_subs_epi16(xmm0_68, xmm2_30);
0064f956              int32_t xmm0_70[0x4] = _mm_unpacklo_epi32(xmm0_69, xmm1_77);
0064f95a              int32_t xmm4_58[0x4] = _mm_unpackhi_epi32(xmm0_69, xmm1_77);
0064f95e              uint32_t xmm2_31[0x4] = _mm_shuffle_epi32(xmm0_70, 0x4e);
0064f963              uint32_t xmm6_30[0x4] = _mm_shuffle_epi32(xmm4_58, 0x4e);
0064f970              int16_t xmm1_79[0x8] = _mm_madd_epi16(data_8325c0, xmm0_70);
0064f97c              int16_t xmm3_33[0x8] = _mm_madd_epi16(data_8325d0, xmm2_31);
0064f980              int16_t xmm0_71[0x8] = __pmaddwd_xmmdq_memdq(xmm0_70, data_8325e0);
0064f988              int16_t xmm2_32[0x8] = __pmaddwd_xmmdq_memdq(xmm2_31, data_8325f0);
0064f990              int32_t xmm1_80[0x4] = __paddd_xmmdq_memdq(xmm1_79, data_8323e0);
0064f998              int32_t xmm0_72[0x4] = __paddd_xmmdq_memdq(xmm0_71, data_8323e0);
0064f9b2              int64_t xmm1_83 = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_80, xmm3_33), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm0_72, xmm2_32), 0x14));
0064f9be              int16_t xmm5_63[0x8] = _mm_madd_epi16(data_8325c0, xmm4_58);
0064f9ca              int16_t xmm7_31[0x8] = _mm_madd_epi16(data_8325d0, xmm6_30);
0064f9ce              int16_t xmm4_59[0x8] = __pmaddwd_xmmdq_memdq(xmm4_58, data_8325e0);
0064f9d6              int16_t xmm6_31[0x8] = __pmaddwd_xmmdq_memdq(xmm6_30, data_8325f0);
0064f9de              int32_t xmm5_64[0x4] = __paddd_xmmdq_memdq(xmm5_63, data_8323e0);
0064f9e6              int32_t xmm4_60[0x4] = __paddd_xmmdq_memdq(xmm4_59, data_8323e0);
0064fa00              int64_t xmm5_67 = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_64, xmm7_31), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm4_60, xmm6_31), 0x14));
0064fa04              arg1[2] = xmm1_83;
0064fa08              *(uint128_t*)((char*)arg1 + 0x28) = (*(uint64_t*)((char*)arg1 + 0x28) | (xmm1_83 << 0x40));
0064fa0c              arg1[6] = xmm5_67;
0064fa10              *(uint128_t*)((char*)arg1 + 0x68) = (*(uint64_t*)((char*)arg1 + 0x68) | (xmm5_67 << 0x40));
0064fa14              int128_t xmm0_75 = *(uint128_t*)((char*)esp + 0x30);
0064fa24              uint128_t xmm2_33 = (xmm0_75 >> 0x40);
0064fa27              int32_t xmm0_76[0x4] = (xmm0_75 | (((int64_t)*(uint128_t*)((char*)esp + 0x50)) << 0x40));
0064fa2e              int32_t xmm0_77[0x4] = _mm_adds_epi16(xmm0_76, xmm2_33);
0064fa32              int64_t xmm1_86 = _mm_subs_epi16(xmm0_76, xmm2_33);
0064fa3a              int32_t xmm0_78[0x4] = _mm_unpacklo_epi32(xmm0_77, xmm1_86);
0064fa3e              int32_t xmm4_64[0x4] = _mm_unpackhi_epi32(xmm0_77, xmm1_86);
0064fa42              uint32_t xmm2_34[0x4] = _mm_shuffle_epi32(xmm0_78, 0x4e);
0064fa47              uint32_t xmm6_32[0x4] = _mm_shuffle_epi32(xmm4_64, 0x4e);
0064fa54              int16_t xmm1_88[0x8] = _mm_madd_epi16((*(uint128_t*)data_832600), xmm0_78);
0064fa60              int16_t xmm3_35[0x8] = _mm_madd_epi16((*(uint128_t*)data_832610), xmm2_34);
0064fa64              int16_t xmm0_79[0x8] = __pmaddwd_xmmdq_memdq(xmm0_78, data_832620);
0064fa6c              int16_t xmm2_35[0x8] = __pmaddwd_xmmdq_memdq(xmm2_34, data_832630);
0064fa74              int32_t xmm1_89[0x4] = __paddd_xmmdq_memdq(xmm1_88, data_8323e0);
0064fa7c              int32_t xmm0_80[0x4] = __paddd_xmmdq_memdq(xmm0_79, data_8323e0);
0064fa96              int64_t xmm1_92 = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_89, xmm3_35), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm0_80, xmm2_35), 0x14));
0064faa2              int16_t xmm5_69[0x8] = _mm_madd_epi16((*(uint128_t*)data_832600), xmm4_64);
0064faae              int16_t xmm7_33[0x8] = _mm_madd_epi16((*(uint128_t*)data_832610), xmm6_32);
0064fab2              int16_t xmm4_65[0x8] = __pmaddwd_xmmdq_memdq(xmm4_64, data_832620);
0064faba              int16_t xmm6_33[0x8] = __pmaddwd_xmmdq_memdq(xmm6_32, data_832630);
0064fac2              int32_t xmm5_70[0x4] = __paddd_xmmdq_memdq(xmm5_69, data_8323e0);
0064faca              int32_t xmm4_66[0x4] = __paddd_xmmdq_memdq(xmm4_65, data_8323e0);
0064fae4              int64_t xmm5_73 = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_70, xmm7_33), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm4_66, xmm6_33), 0x14));
0064fae8              arg1[3] = xmm1_92;
0064faec              *(uint128_t*)((char*)arg1 + 0x38) = (*(uint64_t*)((char*)arg1 + 0x38) | (xmm1_92 << 0x40));
0064faf0              arg1[5] = xmm5_73;
0064faf4              *(uint128_t*)((char*)arg1 + 0x58) = (*(uint64_t*)((char*)arg1 + 0x58) | (xmm5_73 << 0x40));
0064fafa              return;
0064f762          }
0064f093      }
0064f093      else
0064f093      {
0064f099          int32_t xmm0[0x4] = arg1[1];
0064f09e          int32_t xmm1[0x4] = arg1[6];
0064f0a7          int32_t xmm3[0x4] = arg1[2];
0064f0ac          int32_t xmm0_1[0x4] = _mm_adds_epi16(xmm0, xmm1);
0064f0b0          int32_t xmm4[0x4] = arg1[5];
0064f0b5          uint16_t xmm0_2[0x8] = _mm_slli_epi16(xmm0_1, 3);
0064f0ba          int32_t xmm5[0x4] = *(uint128_t*)arg1;
0064f0be          int32_t xmm4_1[0x4] = _mm_adds_epi16(xmm4, xmm3);
0064f0c2          int32_t xmm5_1[0x4] = __paddsw_xmmdq_memdq(xmm5, arg1[7]);
0064f0c7          int32_t xmm2_1[0x4] = _mm_subs_epi16(xmm0, xmm1);
0064f0cb          int128_t xmm1_1 = data_832400;
0064f0d3          int32_t xmm4_2[0x4] = _mm_slli_epi16(xmm4_1, 3);
0064f0dc          int32_t xmm0_3[0x4] = _mm_subs_epi16(xmm0_2, xmm4_2);
0064f0e0          int32_t xmm7[0x4] = arg1[3];
0064f0e5          int32_t xmm6_1[0x4] = _mm_adds_epi16(xmm0_2, xmm4_2);
0064f0e9          int32_t xmm7_1[0x4] = __paddsw_xmmdq_memdq(xmm7, arg1[4]);
0064f0ee          int16_t xmm1_2[0x8] = _mm_mulhi_epi16(xmm1_1, xmm0_3);
0064f0f6          int32_t xmm5_2[0x4] = _mm_subs_epi16(xmm5_1, xmm7_1);
0064f0fa          int32_t xmm4_4[0x4] = _mm_adds_epi16(xmm5_1, xmm7_1);
0064f0fe          int32_t xmm5_3[0x4] = _mm_slli_epi16(xmm5_2, 3);
0064f103          int32_t xmm1_3[0x4] = _mm_adds_epi16(xmm1_2, xmm5_3);
0064f107          int32_t xmm4_5[0x4] = _mm_slli_epi16(xmm4_4, 3);
0064f10c          uint16_t xmm1_4[0x8] = (xmm1_3 | data_8323d0);
0064f114          uint16_t xmm2_2[0x8] = _mm_slli_epi16(xmm2_1, 4);
0064f119          int16_t xmm5_4[0x8] = __pmulhw_xmmdq_memdq(xmm5_3, data_832400);
0064f125          int32_t xmm3_1[0x4] = __psubsw_xmmdq_memdq(xmm3, arg1[5]);
0064f12a          int32_t xmm4_6[0x4] = _mm_subs_epi16(xmm4_5, xmm6_1);
0064f133          *(uint128_t*)((char*)edx + 0x20) = _mm_shufflehi_epi16(xmm1_4, 0x1b);
0064f138          int32_t xmm7_3[0x4] = _mm_adds_epi16(xmm4_5, xmm6_1);
0064f13c          int32_t xmm1_6[0x4] = arg1[3];
0064f141          int32_t xmm3_2[0x4] = _mm_slli_epi16(xmm3_1, 4);
0064f146          int32_t xmm1_7[0x4] = __psubsw_xmmdq_memdq(xmm1_6, arg1[4]);
0064f154          *(uint128_t*)((char*)edx + 0x40) = _mm_shufflehi_epi16(xmm4_6, 0x1b);
0064f15d          int16_t xmm2_4[0x8] = __pmulhw_xmmdq_memdq(_mm_adds_epi16(xmm2_2, xmm3_2), data_832430);
0064f169          int16_t xmm6_4[0x8] = __pmulhw_xmmdq_memdq(_mm_subs_epi16(xmm2_2, xmm3_2), data_832430);
0064f175          uint16_t xmm5_6[0x8] = (_mm_subs_epi16(xmm5_4, xmm0_3) | data_8323d0);
0064f17d          int32_t xmm1_8[0x4] = _mm_slli_epi16(xmm1_7, 3);
0064f182          int32_t xmm2_5[0x4] = (xmm2_4 | data_8323d0);
0064f18e          int32_t xmm3_3[0x4] = *(uint128_t*)arg1;
0064f192          int32_t xmm1_9[0x4] = _mm_adds_epi16(xmm1_8, xmm6_4);
0064f196          int32_t xmm3_4[0x4] = __psubsw_xmmdq_memdq(xmm3_3, arg1[7]);
0064f19b          int32_t xmm4_9[0x4] = _mm_subs_epi16(xmm1_8, xmm6_4);
0064f19f          int128_t xmm0_4 = data_8323f0;
0064f1a7          uint16_t xmm3_5[0x8] = _mm_slli_epi16(xmm3_4, 3);
0064f1ac          int128_t xmm6_5 = data_832410;
0064f1b4          int16_t xmm0_5[0x8] = _mm_mulhi_epi16(xmm0_4, xmm1_9);
0064f1bd          *(uint128_t*)edx = _mm_shufflehi_epi16(xmm7_3, 0x1b);
0064f1c1          int16_t xmm6_6[0x8] = _mm_mulhi_epi16(xmm6_5, xmm4_9);
0064f1ca          *(uint128_t*)((char*)edx + 0x60) = _mm_shufflehi_epi16(xmm5_6, 0x1b);
0064f1d3          int128_t xmm5_8 = data_832410;
0064f1db          int32_t xmm7_6[0x4] = _mm_subs_epi16(xmm3_5, xmm2_5);
0064f1df          int16_t xmm3_6[0x8] = _mm_adds_epi16(xmm3_5, xmm2_5);
0064f1e3          int16_t xmm5_9[0x8] = _mm_mulhi_epi16(xmm5_8, xmm7_6);
0064f1e7          int32_t xmm0_6[0x4] = _mm_adds_epi16(xmm0_5, xmm3_6);
0064f1eb          int32_t xmm6_7[0x4] = _mm_adds_epi16(xmm6_6, xmm4_9);
0064f1ef          int32_t xmm3_7[0x4] = __pmulhw_xmmdq_memdq(xmm3_6, data_8323f0);
0064f1f7          uint16_t xmm0_7[0x8] = (xmm0_6 | data_8323d0);
0064f1ff          int32_t xmm5_10[0x4] = _mm_adds_epi16(xmm5_9, xmm7_6);
0064f203          int32_t xmm7_7[0x4] = _mm_subs_epi16(xmm7_6, xmm6_7);
0064f20c          *(uint128_t*)((char*)edx + 0x10) = _mm_shufflehi_epi16(xmm0_7, 0x1b);
0064f211          int32_t xmm5_11[0x4] = _mm_adds_epi16(xmm5_10, xmm4_9);
0064f21a          *(uint128_t*)((char*)edx + 0x30) = _mm_shufflehi_epi16(xmm7_7, 0x1b);
0064f21f          int32_t xmm3_8[0x4] = _mm_subs_epi16(xmm3_7, xmm1_9);
0064f228          *(uint128_t*)((char*)edx + 0x50) = _mm_shufflehi_epi16(xmm5_11, 0x1b);
0064f232          *(uint128_t*)((char*)edx + 0x70) = _mm_shufflehi_epi16(xmm3_8, 0x1b);
0064f232          
0064f239          if (edx == esp)
0064f239              goto label_64f76a;
0064f093      }
0064f093      
0064f23f      int128_t xmm0_9 = *(uint128_t*)edx;
0064f24c      uint128_t xmm2_6 = (xmm0_9 >> 0x40);
0064f24f      int32_t xmm0_10[0x4] = (xmm0_9 | (((int64_t)*(uint128_t*)((char*)edx + 0x40)) << 0x40));
0064f256      int32_t xmm0_11[0x4] = _mm_adds_epi16(xmm0_10, xmm2_6);
0064f25a      int64_t xmm1_12 = _mm_subs_epi16(xmm0_10, xmm2_6);
0064f262      int32_t xmm0_12[0x4] = _mm_unpacklo_epi32(xmm0_11, xmm1_12);
0064f266      int32_t xmm4_11[0x4] = _mm_unpackhi_epi32(xmm0_11, xmm1_12);
0064f26a      uint32_t xmm2_7[0x4] = _mm_shuffle_epi32(xmm0_12, 0x4e);
0064f26f      uint32_t xmm6_8[0x4] = _mm_shuffle_epi32(xmm4_11, 0x4e);
0064f27c      int16_t xmm1_14[0x8] = _mm_madd_epi16(data_832540, xmm0_12);
0064f288      int16_t xmm3_11[0x8] = _mm_madd_epi16(data_832550, xmm2_7);
0064f28c      int16_t xmm0_13[0x8] = __pmaddwd_xmmdq_memdq(xmm0_12, data_832560);
0064f294      int16_t xmm2_8[0x8] = __pmaddwd_xmmdq_memdq(xmm2_7, data_832570);
0064f29c      int32_t xmm1_15[0x4] = __paddd_xmmdq_memdq(xmm1_14, data_8323e0);
0064f2a4      int32_t xmm0_14[0x4] = __paddd_xmmdq_memdq(xmm0_13, data_8323e0);
0064f2be      int32_t xmm1_18[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_15, xmm3_11), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm0_14, xmm2_8), 0x14));
0064f2ca      int16_t xmm5_14[0x8] = _mm_madd_epi16(data_832540, xmm4_11);
0064f2d6      int16_t xmm7_10[0x8] = _mm_madd_epi16(data_832550, xmm6_8);
0064f2da      int16_t xmm4_12[0x8] = __pmaddwd_xmmdq_memdq(xmm4_11, data_832560);
0064f2e2      int16_t xmm6_9[0x8] = __pmaddwd_xmmdq_memdq(xmm6_8, data_832570);
0064f2ea      int32_t xmm5_15[0x4] = __paddd_xmmdq_memdq(xmm5_14, data_8323e0);
0064f2f2      int32_t xmm4_13[0x4] = __paddd_xmmdq_memdq(xmm4_12, data_8323e0);
0064f30c      int32_t xmm5_18[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_15, xmm7_10), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm4_13, xmm6_9), 0x14));
0064f310      *(uint128_t*)edx = xmm1_18;
0064f314      *(uint128_t*)((char*)edx + 0x40) = xmm5_18;
0064f319      int128_t xmm0_17 = *(uint128_t*)((char*)edx + 0x10);
0064f327      uint128_t xmm2_9 = (xmm0_17 >> 0x40);
0064f32a      int32_t xmm0_18[0x4] = (xmm0_17 | (((int64_t)*(uint128_t*)((char*)edx + 0x70)) << 0x40));
0064f331      int32_t xmm0_19[0x4] = _mm_adds_epi16(xmm0_18, xmm2_9);
0064f335      int64_t xmm1_21 = _mm_subs_epi16(xmm0_18, xmm2_9);
0064f33d      int32_t xmm0_20[0x4] = _mm_unpacklo_epi32(xmm0_19, xmm1_21);
0064f341      int32_t xmm4_17[0x4] = _mm_unpackhi_epi32(xmm0_19, xmm1_21);
0064f345      uint32_t xmm2_10[0x4] = _mm_shuffle_epi32(xmm0_20, 0x4e);
0064f34a      uint32_t xmm6_10[0x4] = _mm_shuffle_epi32(xmm4_17, 0x4e);
0064f357      int16_t xmm1_23[0x8] = _mm_madd_epi16(data_832580, xmm0_20);
0064f363      int16_t xmm3_13[0x8] = _mm_madd_epi16(data_832590, xmm2_10);
0064f367      int16_t xmm0_21[0x8] = __pmaddwd_xmmdq_memdq(xmm0_20, data_8325a0);
0064f36f      int16_t xmm2_11[0x8] = __pmaddwd_xmmdq_memdq(xmm2_10, data_8325b0);
0064f377      int32_t xmm1_24[0x4] = __paddd_xmmdq_memdq(xmm1_23, data_8323e0);
0064f37f      int32_t xmm0_22[0x4] = __paddd_xmmdq_memdq(xmm0_21, data_8323e0);
0064f399      int32_t xmm1_27[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_24, xmm3_13), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm0_22, xmm2_11), 0x14));
0064f3a5      int16_t xmm5_20[0x8] = _mm_madd_epi16(data_832580, xmm4_17);
0064f3b1      int16_t xmm7_12[0x8] = _mm_madd_epi16(data_832590, xmm6_10);
0064f3b5      int16_t xmm4_18[0x8] = __pmaddwd_xmmdq_memdq(xmm4_17, data_8325a0);
0064f3bd      int16_t xmm6_11[0x8] = __pmaddwd_xmmdq_memdq(xmm6_10, data_8325b0);
0064f3c5      int32_t xmm5_21[0x4] = __paddd_xmmdq_memdq(xmm5_20, data_8323e0);
0064f3cd      int32_t xmm4_19[0x4] = __paddd_xmmdq_memdq(xmm4_18, data_8323e0);
0064f3e7      int32_t xmm5_24[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_21, xmm7_12), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm4_19, xmm6_11), 0x14));
0064f3eb      *(uint128_t*)((char*)edx + 0x10) = xmm1_27;
0064f3f0      *(uint128_t*)((char*)edx + 0x70) = xmm5_24;
0064f3f5      int128_t xmm0_25 = *(uint128_t*)((char*)edx + 0x20);
0064f403      uint128_t xmm2_12 = (xmm0_25 >> 0x40);
0064f406      int32_t xmm0_26[0x4] = (xmm0_25 | (((int64_t)*(uint128_t*)((char*)edx + 0x60)) << 0x40));
0064f40d      int32_t xmm0_27[0x4] = _mm_adds_epi16(xmm0_26, xmm2_12);
0064f411      int64_t xmm1_30 = _mm_subs_epi16(xmm0_26, xmm2_12);
0064f419      int32_t xmm0_28[0x4] = _mm_unpacklo_epi32(xmm0_27, xmm1_30);
0064f41d      int32_t xmm4_23[0x4] = _mm_unpackhi_epi32(xmm0_27, xmm1_30);
0064f421      uint32_t xmm2_13[0x4] = _mm_shuffle_epi32(xmm0_28, 0x4e);
0064f426      uint32_t xmm6_12[0x4] = _mm_shuffle_epi32(xmm4_23, 0x4e);
0064f433      int16_t xmm1_32[0x8] = _mm_madd_epi16(data_8325c0, xmm0_28);
0064f43f      int16_t xmm3_15[0x8] = _mm_madd_epi16(data_8325d0, xmm2_13);
0064f443      int16_t xmm0_29[0x8] = __pmaddwd_xmmdq_memdq(xmm0_28, data_8325e0);
0064f44b      int16_t xmm2_14[0x8] = __pmaddwd_xmmdq_memdq(xmm2_13, data_8325f0);
0064f453      int32_t xmm1_33[0x4] = __paddd_xmmdq_memdq(xmm1_32, data_8323e0);
0064f45b      int32_t xmm0_30[0x4] = __paddd_xmmdq_memdq(xmm0_29, data_8323e0);
0064f475      int32_t xmm1_36[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_33, xmm3_15), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm0_30, xmm2_14), 0x14));
0064f481      int16_t xmm5_26[0x8] = _mm_madd_epi16(data_8325c0, xmm4_23);
0064f48d      int16_t xmm7_14[0x8] = _mm_madd_epi16(data_8325d0, xmm6_12);
0064f491      int16_t xmm4_24[0x8] = __pmaddwd_xmmdq_memdq(xmm4_23, data_8325e0);
0064f499      int16_t xmm6_13[0x8] = __pmaddwd_xmmdq_memdq(xmm6_12, data_8325f0);
0064f4a1      int32_t xmm5_27[0x4] = __paddd_xmmdq_memdq(xmm5_26, data_8323e0);
0064f4a9      int32_t xmm4_25[0x4] = __paddd_xmmdq_memdq(xmm4_24, data_8323e0);
0064f4c3      int32_t xmm5_30[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_27, xmm7_14), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm4_25, xmm6_13), 0x14));
0064f4c7      *(uint128_t*)((char*)edx + 0x20) = xmm1_36;
0064f4cc      *(uint128_t*)((char*)edx + 0x60) = xmm5_30;
0064f4d1      int128_t xmm0_33 = *(uint128_t*)((char*)edx + 0x30);
0064f4df      uint128_t xmm2_15 = (xmm0_33 >> 0x40);
0064f4e2      int32_t xmm0_34[0x4] = (xmm0_33 | (((int64_t)*(uint128_t*)((char*)edx + 0x50)) << 0x40));
0064f4e9      int32_t xmm0_35[0x4] = _mm_adds_epi16(xmm0_34, xmm2_15);
0064f4ed      int64_t xmm1_39 = _mm_subs_epi16(xmm0_34, xmm2_15);
0064f4f5      int32_t xmm0_36[0x4] = _mm_unpacklo_epi32(xmm0_35, xmm1_39);
0064f4f9      int32_t xmm4_29[0x4] = _mm_unpackhi_epi32(xmm0_35, xmm1_39);
0064f4fd      uint32_t xmm2_16[0x4] = _mm_shuffle_epi32(xmm0_36, 0x4e);
0064f502      uint32_t xmm6_14[0x4] = _mm_shuffle_epi32(xmm4_29, 0x4e);
0064f50f      int16_t xmm1_41[0x8] = _mm_madd_epi16((*(uint128_t*)data_832600), xmm0_36);
0064f51b      int16_t xmm3_17[0x8] = _mm_madd_epi16((*(uint128_t*)data_832610), xmm2_16);
0064f51f      int16_t xmm0_37[0x8] = __pmaddwd_xmmdq_memdq(xmm0_36, data_832620);
0064f527      int16_t xmm2_17[0x8] = __pmaddwd_xmmdq_memdq(xmm2_16, data_832630);
0064f52f      int32_t xmm1_42[0x4] = __paddd_xmmdq_memdq(xmm1_41, data_8323e0);
0064f537      int32_t xmm0_38[0x4] = __paddd_xmmdq_memdq(xmm0_37, data_8323e0);
0064f551      int32_t xmm1_45[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_42, xmm3_17), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm0_38, xmm2_17), 0x14));
0064f55d      int16_t xmm5_32[0x8] = _mm_madd_epi16((*(uint128_t*)data_832600), xmm4_29);
0064f569      int16_t xmm7_16[0x8] = _mm_madd_epi16((*(uint128_t*)data_832610), xmm6_14);
0064f56d      int16_t xmm4_30[0x8] = __pmaddwd_xmmdq_memdq(xmm4_29, data_832620);
0064f575      int16_t xmm6_15[0x8] = __pmaddwd_xmmdq_memdq(xmm6_14, data_832630);
0064f57d      int32_t xmm5_33[0x4] = __paddd_xmmdq_memdq(xmm5_32, data_8323e0);
0064f585      int32_t xmm4_31[0x4] = __paddd_xmmdq_memdq(xmm4_30, data_8323e0);
0064f59f      int32_t xmm5_36[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_33, xmm7_16), 0x14), _mm_srai_epi32(_mm_add_epi32(xmm4_31, xmm6_15), 0x14));
0064f5a3      *(uint128_t*)((char*)edx + 0x30) = xmm1_45;
0064f5a8      *(uint128_t*)((char*)edx + 0x50) = xmm5_36;
0064f070  }

0064fafb                                                                                   cc cc cc cc cc                             .....

0064fb00  int32_t _own_buffer_to_file_p5(void* arg1)

0064fb00  {
0064fb0e      void* ebx = *(uint32_t*)((char*)arg1 + 0x14);
0064fb14      uint32_t edx_1 = (*(uint32_t*)((char*)arg1 + 0x10) - ebx);
0064fb30      int32_t var_8;
0064fb30      
0064fb30      if ((_ownWriteFile(*(uint32_t*)((char*)arg1 + 0x3c), ebx, edx_1, &var_8) == 0 || edx_1 != var_8))
0064fb3f          return 0xffffffe9;
0064fb3f      
0064fb40      *(uint32_t*)((char*)arg1 + 0x10) = ebx;
0064fb4b      return 0;
0064fb00  }

0064fb4c                                      8d 64 24 00                                                              .d$.

0064fb50  int32_t _own_write_bits_a6(void* arg1 @ esi, char arg2[0x8] @ st4, uint64_t arg3 @ st7, int32_t arg4, int32_t arg5)

0064fb50  {
0064fb62      int32_t* ecx_2;
0064fb62      int32_t edx_3;
0064fb62      
0064fb62      while (true)
0064fb62      {
0064fb62          int32_t edx_2 = (arg5 + *(uint32_t*)((char*)arg1 + 0xc));
0064fb62          
0064fb66          if (edx_2 <= 0x40)
0064fb66          {
0064fb78              int64_t temp0_1 = _m_psubd(0, _m_pcmpeqb(arg2, arg2));
0064fb8a              _m_psllq((((uint64_t)arg4) & _m_psubd(_m_psllq(temp0_1, ((uint64_t)arg5)), temp0_1)), ((uint64_t)(0x40 - edx_2)));
0064fb92              *(uint32_t*)((char*)arg1 + 0xc) = edx_2;
0064fb9a              return 0;
0064fb66          }
0064fb66          
0064fb9c          edx_3 = (edx_2 - arg5);
0064fb9f          ecx_2 = *(uint32_t*)((char*)arg1 + 0x10);
0064fb9f          
0064fbaf          if ((*(uint32_t*)((char*)arg1 + 0x18) - &ecx_2[1]) >= 4)
0064fbaf              break;
0064fbaf          
0064fe81          if (*(uint32_t*)((char*)arg1 + 0x3c) == 0)
0064fe8d              return 0xffffffe4;
0064fe8d          
0064fe91          int32_t result = _own_buffer_to_file_p5(arg1);
0064fe91          
0064fe9b          if (result != 0)
0064fea7              return result;
0064fb62      }
0064fb62      
0064fbbb      uint64_t st0 = _m_psllwi(arg3, 8);
0064fbbf      int64_t st1 = _m_psrlwi(arg3, 8);
0064fbc6      st0 = _mm_shuffle_pi16((st0 | st1), 0x1b);
0064fbd3      int32_t eax_3 = _m_pcmpeqb(st0, _m_pcmpeqb(st1, st1));
0064fbd8      int32_t edx_4;
0064fbd8      
0064fbd8      switch (eax_3)
0064fbd8      {
0064fbd6          case 0:
0064fbd6          {
0064fbda              *(uint32_t*)ecx_2 = st0;
0064fbe2              edx_4 = (edx_3 - 0x20);
0064fbe7              _m_psllqi(arg3, 0x20);
0064fbeb              *(uint32_t*)((char*)arg1 + 0x10) = &ecx_2[1];
0064fbee              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fbd6              break;
0064fbd6          }
0064fc56          case 0xff:
0064fc56          case 0xff0000ff:
0064fc56          {
0064fd43              arg2 = data_832b40;
0064fd54              *(uint32_t*)ecx_2 = (_m_psllqi((st0 & data_832b60), 8) | arg2);
0064fd57              _m_psllqi(arg3, 0x18);
0064fd5b              edx_4 = (edx_3 - 0x18);
0064fd5e              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fd61              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fd64              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc56              break;
0064fc56          }
0064fc4b          case 0xff00:
0064fc4b          {
0064fd07              arg2 = data_832b88;
0064fd22              *(uint32_t*)ecx_2 = ((st0 & data_832b80) | _m_psllqi((st0 & arg2), 8));
0064fd25              _m_psllqi(arg3, 0x18);
0064fd29              edx_4 = (edx_3 - 0x18);
0064fd2c              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fd2f              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fd32              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc4b              break;
0064fc4b          }
0064fc98          case 0xffff:
0064fc98          case 0xff00ffff:
0064fc98          {
0064fe2f              *(uint32_t*)ecx_2 = data_832b50;
0064fe32              _m_psllqi(arg3, 0x10);
0064fe36              edx_4 = (edx_3 - 0x10);
0064fe39              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fe3c              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fe3f              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc98              break;
0064fc98          }
0064fc40          case 0xff0000:
0064fc40          {
0064fcea              *(uint32_t*)ecx_2 = (st0 & data_832b78);
0064fced              _m_psllqi(arg3, 0x18);
0064fcf1              edx_4 = (edx_3 - 0x18);
0064fcf4              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fcf7              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fcfa              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc40              break;
0064fc40          }
0064fc77          case 0xff00ff:
0064fc77          {
0064fda7              arg2 = data_832b40;
0064fdb8              *(uint32_t*)ecx_2 = (_m_psllqi((st0 & data_832b60), 8) | arg2);
0064fdbf              edx_4 = (edx_3 - 0x10);
0064fdc2              _m_psrlqi(_m_psllqi(arg3, 0x18), 8);
0064fdc6              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fdc9              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fdcc              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc77              break;
0064fc77          }
0064fc82          case 0xffff00:
0064fc82          {
0064fde8              *(uint32_t*)ecx_2 = ((st0 & data_832b80) | data_832b90);
0064fdef              edx_4 = (edx_3 - 0x10);
0064fdf2              _m_psrlqi(_m_psllqi(arg3, 0x18), 8);
0064fdf6              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fdf9              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fdfc              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc82              break;
0064fc82          }
0064fc35          case 0xff000000:
0064fc35          {
0064fcc4              *(uint32_t*)ecx_2 = st0;
0064fccb              edx_4 = (edx_3 - 0x18);
0064fcce              _m_psrlqi(_m_psllqi(arg3, 0x20), 8);
0064fcd2              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fcd5              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fcd8              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc35              break;
0064fc35          }
0064fc6c          case 0xff00ff00:
0064fc6c          {
0064fd72              int64_t st2 = data_832b88;
0064fd79              uint64_t st6 = _m_punpcklwd(st0, 0);
0064fd7f              arg2 = _m_psllqi((st0 & st2), 8);
0064fd86              *(uint32_t*)ecx_2 = (st6 | arg2);
0064fd89              _m_psllqi(arg3, 0x18);
0064fd8d              edx_4 = (edx_3 - 0x18);
0064fd90              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fd93              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fd96              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc6c              break;
0064fc6c          }
0064fc8d          case 0xffff0000:
0064fc8d          {
0064fe0e              *(uint32_t*)ecx_2 = (st0 & data_832b78);
0064fe11              _m_psllqi(arg3, 0x18);
0064fe15              edx_4 = (edx_3 - 0x18);
0064fe18              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fe1b              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fe1e              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fc8d              break;
0064fc8d          }
0064fbd8          default:
0064fbd8          {
0064fcb3              if (eax_3 != 0xffff00ff)
0064fcc3                  return 0xffffffe8;
0064fcc3              
0064fe4f              arg2 = data_832b40;
0064fe60              *(uint32_t*)ecx_2 = (_m_psllqi((st0 & data_832b60), 8) | arg2);
0064fe67              edx_4 = (edx_3 - 0x10);
0064fe6a              _m_psrlqi(_m_psllqi(arg3, 0x18), 8);
0064fe6e              *(uint32_t*)((char*)arg1 + 0x1c) += 4;
0064fe71              *(uint32_t*)((char*)arg1 + 0x10) += 4;
0064fe74              *(uint32_t*)((char*)arg1 + 0xc) = edx_4;
0064fbd8          }
0064fbd8      }
0064fbd8      
0064fbfd      int32_t edx_5 = (edx_4 + arg5);
0064fc07      int64_t temp0_12 = _m_psubd(0, _m_pcmpeqb(arg2, arg2));
0064fc1c      _m_psllq((((uint64_t)arg4) & _m_psubd(_m_psllq(temp0_12, ((uint64_t)arg5)), temp0_12)), ((uint64_t)(0x40 - edx_5)));
0064fc22      *(uint32_t*)((char*)arg1 + 0xc) = edx_5;
0064fc2c      return 0;
0064fb50  }

0064fb9b                                                                                   90                                         .
0064fc2d                                         8d 49 00                                                               .I.
0064fd02        8b ff                                                                                        ..
0064fd3a                                                                                8b ff                                        ..
0064fd9e                                                                                            8b ff                                ..
0064fe26                    8b ff                                                                                ..
0064fe47                       90                                                                                 .
0064fe8e                                            8b ff                                                                ..
0064fea8                          8d a4 24 00 00 00 00 90                                                          ..$.....

0064feb0  int32_t _own_encode_block_a6(int64_t* arg1, int32_t arg2, void* arg3, int16_t* arg4, int16_t* arg5)

0064feb0  {
0064fec1      int32_t eax = ((int32_t)*(uint16_t*)arg5);
0064fec4      int32_t ebx = ((int32_t)*(uint16_t*)arg4);
0064fec7      *(uint16_t*)arg4 = eax;
0064feca      int32_t eax_1 = (eax - ebx);
0064fecc      int32_t ecx = eax_1;
0064fece      int32_t edx = eax_1;
0064fece      
0064fed0      if (eax < ebx)
0064fed0      {
0064fed2          eax_1 = -(eax_1);
0064fed4          ecx = -(ecx);
0064fed6          edx -= 1;
0064fed0      }
0064fed0      
0064fee0      int32_t ebx_1 = eax_1;
0064fee0      
0064fee2      if (eax_1 >= 0x100)
0064fee2          eax_1 = (ecx >> 8);
0064fee2      
0064fee5      int32_t edi_1 = data_832740[eax_1];
0064feec      int32_t ecx_2 = edi_1;
0064feec      
0064fef7      if (ebx_1 >= 0x100)
0064fef7          ecx_2 = (edi_1 + 8);
0064fef7      
0064ff00      int64_t st7 = *(uint64_t*)arg1;
0064ff19      char x87_r4[0x8];
0064ff19      uint64_t x87_r7;
0064ff19      int32_t result = _own_write_bits_a6(arg1, x87_r4, x87_r7, ((uint32_t)*(uint16_t*)((arg2 + (ecx_2 << 1)) + 0x408)), *(uint32_t*)((arg2 + (ecx_2 << 2)) + 8));
0064ff19      
0064ff1b      if (result == 0)
0064ff1b      {
0064ff2b          result = _own_write_bits_a6(arg1, x87_r4, x87_r7, edx, ecx_2);
0064ff2b          
0064ff2d          if (result == 0)
0064ff2d          {
0064ff35              int32_t i = 0;
0064ff39              int32_t var_18_1 = 1;
0064ff39              
0064ff50              while (true)
0064ff50              {
0064ff50                  int32_t eax_7 = ((int32_t)arg5[*(uint32_t*)((var_18_1 << 2) + &data_832640)]);
0064ff50                  
0064ff52                  if (eax_7 != 0)
0064ff52                  {
0064ff60                      for (; i > 0xf; i -= 0x10)
0064ff60                      {
0064ff7b                          result = _own_write_bits_a6(arg1, x87_r4, x87_r7, ((uint32_t)*(uint16_t*)((char*)arg3 + 0x5e8)), *(uint32_t*)((char*)arg3 + 0x3c8));
0064ff7b                          
0064ff7d                          if (result != 0)
0064ff7d                              goto label_650027;
0064ff60                      }
0064ff60                      
0064ff8b                      int32_t eax_9 = eax_7;
0064ff8d                      int32_t ecx_5 = eax_9;
0064ff8f                      int32_t edx_2 = eax_9;
0064ff8f                      
0064ff93                      if (eax_9 < 0)
0064ff93                      {
0064ff95                          eax_9 = -(eax_9);
0064ff97                          ecx_5 = -(ecx_5);
0064ff99                          edx_2 -= 1;
0064ff93                      }
0064ff93                      
0064ffa4                      int32_t ebx_6 = eax_9;
0064ffa4                      
0064ffa6                      if (eax_9 >= 0x100)
0064ffa6                          eax_9 = (ecx_5 >> 8);
0064ffa6                      
0064ffac                      int32_t edi_5 = data_832740[eax_9];
0064ffb3                      int32_t ecx_7 = edi_5;
0064ffb3                      
0064ffbe                      if (ebx_6 >= 0x100)
0064ffbe                          ecx_7 = (edi_5 + 8);
0064ffbe                      
0064ffca                      int32_t ebx_9 = ((i << 4) + ecx_7);
0064ffe2                      result = _own_write_bits_a6(arg1, x87_r4, x87_r7, ((uint32_t)*(uint16_t*)(((char*)arg3 + (ebx_9 << 1)) + 0x408)), *(uint32_t*)(((char*)arg3 + (ebx_9 << 2)) + 8));
0064ffe2                      
0064ffe4                      if (result != 0)
0064ffe4                          break;
0064ffe4                      
0064fff0                      result = _own_write_bits_a6(arg1, x87_r4, x87_r7, edx_2, ecx_7);
0064fff0                      
0064fff2                      if (result != 0)
0064fff2                          break;
0064fff2                      
0064fff6                      i = 0;
0064ff52                  }
0064ff52                  else
0064ff54                      i += 1;
0064ff54                  
0064fff9                  var_18_1 += 1;
0064fff9                  
00650000                  if (var_18_1 >= 0x40)
00650000                  {
0065000b                      if (i == 0)
00650025                          result = 0;
0065000b                      else
0065000b                      {
00650021                          result = _own_write_bits_a6(arg1, x87_r4, x87_r7, ((uint32_t)*(uint16_t*)((char*)arg3 + 0x408)), *(uint32_t*)((char*)arg3 + 8));
00650021                          
00650023                          if (result == 0)
00650025                              result = 0;
0065000b                      }
0065000b                      
0065000b                      break;
00650000                  }
0064ff50              }
0064ff2d          }
0064ff1b      }
0064ff1b      
00650027  label_650027:
00650027      *(uint64_t*)arg1 = st7;
00650030      return result;
0064feb0  }

00650031                                                     8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 90                   ..$......$.....

00650040  int32_t _own_count_zeros_m5(int32_t arg1, void* arg2, int32_t* arg3, uint32_t* arg4)

00650040  {
0065004f      void* var_8 = arg2;
00650058      void* var_2c = &data_832640;
00650059      int32_t i_2 = 0x10;
00650060      int32_t result = 0;
00650468      uint64_t st0;
00650468      uint64_t st1;
00650468      int32_t i;
00650468      
00650468      do
00650468      {
00650067          int32_t* esi_1 = var_2c;
00650093          int32_t eax_4 = (((uint32_t)((int16_t)*(uint32_t*)(arg1 + (*(uint32_t*)esi_1 << 1)))) | (*(uint32_t*)(arg1 + (esi_1[1] << 1)) << 0x10));
00650095          int32_t ecx_4 = (((uint32_t)((int16_t)*(uint32_t*)(arg1 + (esi_1[2] << 1)))) | (*(uint32_t*)(arg1 + (esi_1[3] << 1)) << 0x10));
00650095          
0065009e          if ((eax_4 | ecx_4) == 0)
0065009e          {
0065017b              var_2c = &esi_1[4];
0065017c              result += 4;
0065009e          }
0065009e          else
0065009e          {
006500ad              st0 = _m_pcmpeqw(((uint64_t)eax_4), 0);
006500b0              st1 = _m_pcmpeqw(((uint64_t)ecx_4), 0);
006500bc              int16_t temp0_3[0x4] = _m_pcmpeqw(0, 0);
006500bc              
006500c2              if ((st0 | st1) != 0)
006500c2              {
006500e1                  int32_t eax_10 = ((!(st0) & 0x20001) | ((st1 & !(temp0_3)) & 0x80004));
006500e3                  void* var_2c_1 = &esi_1[4];
006500fe                  /* jump -> (((((uint32_t)(((int16_t)(eax_10 >> 0x10)) | eax_10)) - 1) << 3) + &data_650100) */
006500c2              }
006500c2              
00650184              int32_t* eax_18 = var_8;
00650187              int32_t result_1 = result;
0065018a              result = 0;
00650196              var_2c = &esi_1[4];
0065019c              eax_18[0x41] = 0;
006501a6              *(uint32_t*)eax_18 = eax_4;
006501aa              eax_18[1] = (eax_4 >> 0x10);
006501b3              eax_18[0x42] = 0;
006501bd              eax_18[0x40] = result_1;
006501c3              eax_18[2] = ecx_4;
006501c6              var_8 = &eax_18[4];
006501c9              eax_18[0x43] = 0;
006501d3              eax_18[3] = (ecx_4 >> 0x10);
0065009e          }
0065009e          
00650465          i = i_2;
00650465          i_2 -= 1;
00650468      } while (i != 1);
00650478      uint32_t eax_21 = (((char*)var_8 - arg2) >> 2);
0065047b      *(uint32_t*)arg4 = eax_21;
00650480      int32_t i_3 = ((eax_21 + 4) & 0xfc);
00650485      void* esi_8 = arg2;
00650488      int16_t (* edi_4)[0x4] = arg2;
00650585      int32_t i_1;
00650585      
00650585      do
00650585      {
0065048e          uint32_t st7[0x2] = *(uint64_t*)((char*)esi_8 + 8);
00650492          st0 = _m_pslldi(*(uint64_t*)esi_8, 0x10);
00650496          uint32_t temp0_5[0x2] = _m_pslldi(st7, 0x10);
006504a2          st0 = _m_packssdw(_m_psradi(st0, 0x10), _m_psradi(temp0_5, 0x10));
006504a8          st1 = st0;
006504ab          st0 = _m_pcmpgtw(st0, 0);
006504ae          uint64_t st3 = st1;
006504b1          st1 &= st0;
006504b7          int16_t st2[0x4] = st0;
006504c4          st0 = ((st0 & !(_m_psubw(0, st3))) | st1);
006504ca          st2 = ((st2 & !(__psubw_mmxq_memq(st3, data_832b98))) | st1);
006504cd          st3 = st0;
006504d3          st1 = __pcmpgtw_mmxq_memq(st0, data_832bc8);
006504da          st0 = _m_psrlwi(st0, 8);
006504de          *(uint64_t*)edi_4 = st2;
006504e1          st2 = st1;
006504e4          st1 &= data_832bb8;
006504eb          st0 &= st2;
006504ee          st2 &= !(st3);
006504f1          uint64_t st5 = st0;
006504f4          st0 |= st2;
006504fa          st5 = __pcmpgtw_mmxq_memq((st5 | st2), data_832bc0);
00650501          uint64_t st4 = st0;
00650504          st3 = st5;
00650507          st0 = _m_psrlwi(st0, 4);
0065050b          st5 &= data_832bb0;
00650512          st0 &= st3;
00650515          st2 = st0;
00650518          st3 &= !(st4);
0065051b          st0 |= st3;
00650521          int16_t temp0_16[0x4] = __pcmpgtw_mmxq_memq((st2 | st3), data_832ba8);
00650528          st4 = st0;
0065052b          st3 = temp0_16;
0065052e          st0 = _m_psrlwi(st0, 2);
00650532          st2 = (temp0_16 & data_832ba0);
00650539          st0 &= st3;
0065053c          uint64_t st6 = st0;
0065053f          st3 &= !(st4);
00650542          st0 |= st3;
00650548          st6 = __pcmpgtw_mmxq_memq((st6 | st3), data_832b98);
0065056f          edi_4 = &edi_4[1];
00650575          esi_8 += 0x10;
0065057b          edi_4[0x3f] = _m_paddw(((_m_psrlwi(st0, 1) & st6) | (st6 & !(st0))), ((st1 | st5) | ((st6 & data_832b98) | st2)));
00650582          i_1 = i_3;
00650582          i_3 -= 4;
00650585      } while (i_1 != 4);
00650591      *(uint32_t*)arg3 = result;
0065059a      return result;
00650040  }

00650100  data_650100:
00650100  e9 d6 00 00 00 8d 49 00 e9 eb 00 00 00 8d 49 00 e9 06 01 00 00 8d 49 00 e9 2d 01 00 00 8d 49 00  ......I.......I.......I..-....I.
00650120  e9 45 01 00 00 8d 49 00 e9 67 01 00 00 8d 49 00 e9 8f 01 00 00 8d 49 00 e9 c3 01 00 00 8d 49 00  .E....I..g....I.......I.......I.
00650140  e9 de 01 00 00 8d 49 00 e9 03 02 00 00 8d 49 00 e9 2c 02 00 00 8d 49 00 e9 63 02 00 00 8d 49 00  ......I.......I..,....I..c....I.
00650160  e9 8a 02 00 00 8d 49 00 e9 bb 02 00 00 8d 49 00 eb 12                                            ......I.......I...
006501db                                                                                   c7 45 f8 03 00                             .E...
006501e0  00 00 8b 45 fc 89 1e 83 c0 04 89 96 00 01 00 00 89 45 fc e9 6d 02 00 00 c1 eb 10 8b 45 fc 83 c2  ...E.............E..m.......E...
00650200  01 83 c0 04 c7 45 f8 02 00 00 00 89 1e 89 96 00 01 00 00 89 45 fc e9 4a 02 00 00 c7 45 f8 02 00  .....E..............E..J....E...
00650220  00 00 8b 45 fc 8b fb 83 c0 08 c1 eb 10 89 96 00 01 00 00 c7 86 04 01 00 00 00 00 00 00 89 3e 89  ...E..........................>.
00650240  5e 04 89 45 fc e9 1b 02 00 00 83 c2 02 8b 45 fc 83 c0 04 89 0e c7 45 f8 01 00 00 00 89 96 00 01  ^..E..........E.......E.........
00650260  00 00 89 45 fc e9 fb 01 00 00 8b 45 fc 89 1e 83 c0 08 89 4e 04 c7 86 04 01 00 00 01 00 00 00 89  ...E.......E.......N............
00650280  96 00 01 00 00 c7 45 f8 01 00 00 00 89 45 fc e9 d1 01 00 00 c7 86 04 01 00 00 00 00 00 00 83 c2  ......E......E..................
006502a0  01 c1 eb 10 8b 45 fc 89 4e 04 83 c0 08 c7 45 f8 01 00 00 00 89 96 00 01 00 00 89 1e 89 45 fc e9  .....E..N.....E..............E..
006502c0  a1 01 00 00 8b 45 fc 8b fb c7 45 f8 01 00 00 00 83 c0 0c c7 86 08 01 00 00 00 00 00 00 89 96 00  .....E....E.....................
006502e0  01 00 00 c1 eb 10 89 4e 08 c7 86 04 01 00 00 00 00 00 00 89 45 fc 89 5e 04 89 3e e9 65 01 00 00  .......N............E..^..>.e...
00650300  8b 45 fc 83 c2 03 c1 e9 10 83 c0 04 c7 45 f8 00 00 00 00 89 96 00 01 00 00 89 0e 89 45 fc e9 42  .E...........E..............E..B
00650320  01 00 00 c1 e9 10 8b 45 fc 89 1e 83 c0 08 89 4e 04 89 96 00 01 00 00 c7 86 04 01 00 00 02 00 00  .......E.......N................
00650340  00 89 45 fc c7 45 f8 00 00 00 00 e9 15 01 00 00 8b 45 fc 42 c1 e9 10 83 c0 08 c1 eb 10 89 96 00  ..E..E...........E.B............
00650360  01 00 00 89 45 fc 89 4e 04 c7 86 04 01 00 00 01 00 00 00 89 1e c7 45 f8 00 00 00 00 e9 e4 00 00  ....E..N..............E.........
00650380  00 c1 e9 10 8b 45 fc 8b fb 83 c0 0c c1 eb 10 89 96 00 01 00 00 89 3e 89 4e 08 c7 86 04 01 00 00  .....E................>.N.......
006503a0  00 00 00 00 89 45 fc c7 86 08 01 00 00 01 00 00 00 89 5e 04 c7 45 f8 00 00 00 00 e9 a5 00 00 00  .....E............^..E..........
006503c0  8b 45 fc 83 c2 02 8b f9 83 c0 08 c1 e9 10 89 96 00 01 00 00 c7 86 04 01 00 00 00 00 00 00 89 3e  .E.............................>
006503e0  c7 45 f8 00 00 00 00 89 4e 04 89 45 fc eb 76 c7 45 f8 00 00 00 00 8b 45 fc 8b f9 83 c0 0c c1 e9  .E......N..E..v.E......E........
00650400  10 89 1e 89 7e 04 89 96 00 01 00 00 c7 86 04 01 00 00 01 00 00 00 89 4e 08 c7 86 08 01 00 00 00  ....~..................N........
00650420  00 00 00 89 45 fc eb 3d 8b 45 fc 8b f9 c1 eb 10 42 c7 45 f8 00 00 00 00 83 c0 0c c1 e9 10 89 1e  ....E..=.E......B.E.............
00650440  c7 86 04 01 00 00 00 00 00 00 89 96 00 01 00 00 89 7e 04 89 4e 08 c7 86 08 01 00 00 00 00 00 00  .................~..N...........
00650460  89 45 fc eb 00                                                                                   .E...
0065059b                                                                                   cc cc cc cc cc                             .....

006505a0  int32_t _load_from_file(void* arg1)

006505a0  {
006505cb      int32_t var_14;
006505cb      BOOL eax_4 = _ownReadFile(*(uint32_t*)((char*)arg1 + 0x3c), ((char*)arg1 + 0x40), 0x1000, &var_14);
006505e2      *(uint32_t*)((char*)arg1 + 0x24) = var_14;
006505e2      
006505f4      if ((eax_4 != 0 && *(uint32_t*)((char*)arg1 + 0x24) == 0))
006505fc          return 0xfffffff5;
006505fc      
00650606      *(uint32_t*)((char*)arg1 + 0x10) = ((char*)arg1 + 0x40);
0065060c      return 0;
006505a0  }

0065060d                                         8d 76 00                                                               .v.

00650610  int32_t _own_decode_block_skip_m5(int64_t* arg1, int32_t arg2, int32_t arg3, int16_t* arg4)

00650610  {
00650611      int32_t __saved_ebp;
00650611      int32_t* ebp = &__saved_ebp;
00650622      int32_t eax_1 = *(uint32_t*)((char*)arg1 + 0x1c);
0065062b      int32_t eax_3 = *(uint32_t*)((char*)arg1 + 0x24);
00650634      int64_t* eax_4;
00650634      eax_4 = arg1[6];
00650637      char var_24 = eax_4;
0065063d      uint64_t st1 = *(uint64_t*)arg1;
00650640      int32_t edi = *(uint32_t*)((char*)arg1 + 0xc);
00650643      int32_t* esi = arg1[2];
00650663      uint32_t eax_10;
00650663      uint64_t x87_r1;
00650663      uint64_t x87_r4;
00650663      
00650663      if (edi < 8)
00650663      {
0065078f          if (sub_650895(ebp, esi, edi, x87_r1, x87_r4) == 0)
0065078f          {
00650861          label_650861:
00650861              uint64_t* eax_26 = arg1;
00650864              *(uint64_t*)eax_26 = st1;
00650867              *(uint32_t*)((char*)eax_26 + 0xc) = edi;
0065086a              eax_26[2] = esi;
00650873              *(uint32_t*)((char*)arg1 + 0x24) = eax_3;
00650879              int32_t edx_5;
00650879              edx_5 = var_24;
0065087c              arg1[6] = edx_5;
00650885              *(uint32_t*)((char*)arg1 + 0x1c) = eax_1;
00650894              return 0;
0065078f          }
0065078f          
00650798          if (edi >= 8)
00650798              goto label_650673;
00650798          
006507c6      label_6507c6:
006507c6          int32_t var_18_1 = arg2;
006507c9          eax_10 = sub_6509f3(ebp, edi, x87_r1, x87_r4);
006507c9          
006507d0          if (eax_10 < 0)
006507d0              goto label_650861;
00650663      }
00650663      else
00650663      {
00650673      label_650673:
00650679          int32_t ebx_2 = *(uint32_t*)((arg2 + 8) + (_m_psrlqi(st1, 0x38) << 2));
00650679          
00650684          if (ebx_2 <= 0xffff)
00650684              goto label_6507c6;
00650684          
0065068a          uint32_t ebx_3 = (ebx_2 >> 0x10);
0065068d          edi -= ebx_3;
00650692          st1 = _m_psllq(st1, ((uint64_t)ebx_3));
00650695          eax_10 = ((uint32_t)ebx_2);
00650663      }
00650663      
0065069c      if ((edi < eax_10 && sub_650895(ebp, esi, edi, x87_r1, x87_r4) == 0))
006507b1          goto label_650861;
006507b1      
006506a5      edi -= eax_10;
006506a7      uint64_t st2 = ((uint64_t)eax_10);
006506b3      uint64_t temp0_4 = _m_psrlq(st1, _m_psubd(0x40, st2));
006506b6      int32_t ebx_4 = *(uint32_t*)((eax_10 << 2) + &data_907100);
006506bd      int32_t ecx_2 = temp0_4;
006506c0      st1 = _m_psllq(st1, st2);
006506c0      
006506c5      if (ecx_2 < ebx_4)
006506cb          ecx_2 += *(uint32_t*)((eax_10 << 2) + &data_9070c0);
006506cb      
006506d2      int32_t edx_1 = 1;
006506d7      int80_t st7;
006506d7      st7 = 0;
006506dd      int32_t ebx_5 = (arg3 + 8);
006506e0      *(uint16_t*)arg4 += ecx_2;
006506e3      uint64_t st3 = st1;
006506e3      
006506e6      while (true)
006506e6      {
006506e6          st1 = _m_psrlqi(st1, 0x38);
006506e6          
006506ed          while (true)
006506ed          {
006506ed              if (edi < 8)
006506ed              {
00650810                  st1 = st3;
00650818                  ebx_5 = (arg3 + 8);
00650818                  
0065081d                  if (sub_650895(ebp, esi, edi, x87_r1, x87_r4) == 0)
0065081d                      goto label_650861;
0065081d                  
00650823                  st3 = st1;
00650826                  st1 = _m_psrlqi(st1, 0x38);
00650826                  
0065082d                  if (edi >= 8)
0065082d                      continue;
0065082d                  
0065081d                  goto label_650845;
006506ed              }
006506ed              
006506f3              int32_t ecx_3 = st1;
006506f6              st1 = st3;
006506f9              int32_t ebx_6 = *(uint32_t*)(ebx_5 + (ecx_3 << 2));
00650703              uint32_t ebx_7 = (ebx_6 >> 0x10);
00650706              int32_t eax_13 = ((uint32_t)ebx_6);
00650706              
00650711              if (ebx_7 == 0)
00650711              {
00650845              label_650845:
00650845                  int32_t var_18_2 = arg3;
00650848                  eax_13 = sub_6509f3(ebp, edi, x87_r1, x87_r4);
00650848                  
0065084f                  if (eax_13 < 0)
0065084f                      goto label_650861;
00650711              }
00650711              else
00650711              {
00650717                  edi -= ebx_7;
00650719                  st1 = _m_psllq(st1, ((uint64_t)ebx_7));
00650711              }
00650711              
0065071c              int32_t ecx_4 = (0xf & eax_13);
0065071e              st2 = ((uint64_t)ecx_4);
00650724              _m_psubd(0x40, st2);
00650724              
00650727              if (ecx_4 != 0)
00650727              {
00650734                  if ((edi < ecx_4 && sub_650895(ebp, esi, edi, x87_r1, x87_r4) == 0))
00650805                      goto label_650861;
00650805                  
0065073a                  edi -= ecx_4;
0065073c                  st1 = _m_psllq(st1, st2);
0065073f                  edx_1 = ((edx_1 + (eax_13 >> 4)) + 1);
0065073f                  
00650743                  if (edx_1 < 0x40)
00650743                  {
00650749                      ebx_5 = (arg3 + 8);
0065074c                      st3 = st1;
0065074f                      break;
00650743                  }
00650727              }
00650727              else if (eax_13 >= 0xf0)
006507e0              {
006507e6                  edx_1 += 0x10;
006507e9                  ebx_5 = (arg3 + 8);
006507e9                  
006507ef                  if (edx_1 < 0x40)
006507ef                  {
0065074c                      st3 = st1;
0065074f                      break;
006507ef                  }
006507e0              }
006507e0              
00650757              *(uint64_t*)arg1 = st1;
0065075a              *(uint32_t*)((char*)arg1 + 0xc) = edi;
0065075d              arg1[2] = esi;
00650766              *(uint32_t*)((char*)arg1 + 0x24) = eax_3;
0065076c              int32_t edx_3;
0065076c              edx_3 = var_24;
0065076f              arg1[6] = edx_3;
00650778              *(uint32_t*)((char*)arg1 + 0x1c) = eax_1;
00650787              return 0;
006506ed          }
006506e6      }
00650610  }


00650895  int32_t sub_650895(void* arg1 @ ebp, int32_t* arg2 @ esi, int32_t arg3 @ edi, uint64_t arg4 @ st1, uint64_t arg5 @ st4)

00650895  {
00650895      uint64_t st0 = ((uint64_t)arg3);
0065089b      int32_t ecx = *(uint32_t*)((char*)arg1 - 0x24);
0065089e      int64_t temp0 = _m_psubd(arg5, st0);
006508a1      st0 = _m_pcmpeqb(st0, st0);
006508a4      arg4 = _m_psrlq(arg4, temp0);
006508a4      
006508ab      if (*(uint8_t*)((char*)arg1 - 0x20) == 0)
006508ab      {
006508b4          if (ecx >= 4)
006508b4          {
006508be              int64_t st7 = ((uint64_t)_bswap(*(uint32_t*)arg2));
006508be              
006508c9              if (_m_pcmpeqb(st0, st7) == 0)
006508c9              {
006508d9                  arg4 = (_m_psllqi(arg4, 0x20) | st7);
006508df                  *(uint32_t*)((char*)arg1 - 0x28) += 4;
006508e3                  *(uint32_t*)((char*)arg1 - 0x24) = (ecx - 4);
006508f4                  _m_psllq(arg4, _m_psubd(arg5, ((uint64_t)(arg3 + 0x20))));
006508f7                  return 0xff;
006508c9              }
006508b4          }
006508b4          
006508fe          ecx = *(uint32_t*)((char*)arg1 - 0x24);
00650901          _m_psubd(arg5, ((uint64_t)arg3));
00650901          
00650904          while (true)
00650904          {
00650904              int32_t temp0_8 = ecx;
00650904              ecx -= 1;
00650905              int32_t var_10;
00650905              int32_t ebx;
00650905              
00650905              if (temp0_8 < 1)
00650905              {
0065099d                  void* ecx_4 = *(uint32_t*)((char*)arg1 + 8);
0065099d                  
006509a0                  if (*(uint32_t*)(*(uint32_t*)((char*)arg1 + 8) + 0x3c) != 0)
006509a0                  {
006509a6                      var_10 = ebx;
006509a6                      int32_t* var_14_1 = &var_10;
006509a6                      int32_t* var_1c_1 = arg2;
006509b0                      bool cond:1_1 = _load_from_file(ecx_4) != 0;
006509b2                      ebx = var_10;
006509b2                      
006509b3                      if (!(cond:1_1))
006509b3                      {
006509b9                          arg2 = *(uint32_t*)((char*)ecx_4 + 0x10);
006509bc                          ecx = *(uint32_t*)((char*)ecx_4 + 0x24);
006509bf                          continue;
006509b3                      }
006509a0                  }
006509a0                  
00650994                  return 0;
00650905              }
00650905              
0065090b              *(uint32_t*)((char*)arg1 - 0x28) += 1;
00650910              int32_t eax;
00650910              eax = *(uint8_t*)arg2;
00650912              arg2 += 1;
00650912              
00650918              if (eax == 0xff)
00650918              {
00650949                  while (true)
00650949                  {
00650949                      int32_t temp1_1 = ecx;
00650949                      ecx -= 1;
00650949                      
0065094a                      if (temp1_1 < 1)
0065094a                      {
006509cc                          void* ecx_8 = *(uint32_t*)((char*)arg1 + 8);
006509cc                          
006509cf                          if (*(uint32_t*)(*(uint32_t*)((char*)arg1 + 8) + 0x3c) == 0)
00650994                              return 0;
00650994                          
006509d5                          var_10 = ebx;
006509d5                          int32_t* var_14_2 = &var_10;
006509d5                          int32_t* var_1c_2 = arg2;
006509df                          bool cond:3_1 = _load_from_file(ecx_8) != 0;
006509e1                          ebx = var_10;
006509e1                          
006509e2                          if (cond:3_1)
00650994                              return 0;
00650994                          
006509e8                          arg2 = *(uint32_t*)((char*)ecx_8 + 0x10);
006509eb                          ecx = *(uint32_t*)((char*)ecx_8 + 0x24);
0065094a                      }
0065094a                      else
0065094a                      {
00650950                          *(uint32_t*)((char*)arg1 - 0x28) += 1;
00650955                          eax = *(uint8_t*)arg2;
00650957                          arg2 += 1;
00650957                          
0065095d                          if (eax != 0xff)
0065095d                              break;
0065094a                      }
00650949                  }
00650949                  
00650965                  if (eax != 0)
00650965                  {
00650975                      *(uint8_t*)((char*)arg1 - 0x20) = eax;
00650978                      arg4 = _m_psllqi(arg4, 8);
0065097c                      arg3 += 8;
00650982                      break;
00650965                  }
00650965                  
0065096b                  eax = 0xff;
00650918              }
00650918              
00650925              arg3 += 8;
00650928              arg4 = (_m_psllqi(arg4, 8) | ((uint64_t)eax));
00650928              
0065092e              if (arg3 > 0x38)
0065092e                  break;
00650904          }
006508ab      }
006508ab      
00650934      *(uint32_t*)((char*)arg1 - 0x24) = ecx;
00650945      _m_psllq(arg4, _m_psubd(arg5, ((uint64_t)arg3)));
00650948      return 0xff;
00650895  }


006509f3  int32_t sub_6509f3(void* arg1 @ ebp, int32_t arg2 @ edi, uint64_t arg3 @ st1, int64_t arg4 @ st4)

006509f3  {
006509f4      int32_t ebx;
006509f4      *(uint32_t*)((char*)arg1 - 0x10) = ebx;
006509f4      
006509f9      if (arg2 >= ebx)
006509f9          goto label_6509ff;
006509f9      
00650a6e      int32_t* esi;
00650a6e      uint64_t x87_r1;
00650a6e      uint64_t x87_r4;
00650a6e      
00650a6e      if (sub_650895(arg1, esi, arg2, x87_r1, x87_r4) != 0)
00650a6e      {
00650a76          ebx = *(uint32_t*)((char*)arg1 - 0x10);
006509ff      label_6509ff:
006509ff          int32_t edi = (arg2 - ebx);
00650a04          uint64_t st7 = ((uint64_t)ebx);
00650a07          uint64_t st2 = arg3;
00650a0a          int64_t temp0_1 = _m_psubd(arg4, st7);
00650a0d          arg3 = _m_psllq(arg3, st7);
00650a13          int32_t ecx_1 = _m_psrlq(st2, temp0_1);
00650a13          
00650a16          while (true)
00650a16          {
00650a16              int32_t eax_1 = *(uint32_t*)((char*)arg1 - 0x10);
00650a19              int32_t edx_1 = *(uint32_t*)((char*)arg1 - 0x14);
00650a1c              int32_t ebx_1 = ((int32_t)*(uint16_t*)((edx_1 + (eax_1 << 1)) + 0x62a));
00650a1c              
00650a27              if (ebx_1 != 0xffffffff)
00650a2d                  ebx_1 = ((uint32_t)*(uint16_t*)((edx_1 + (eax_1 << 1)) + 0x62a));
00650a2d              
00650a37              if (ebx_1 >= ecx_1)
00650a37              {
00650a97                  if (eax_1 > 0x10)
00650aa0                      return 0;
00650aa0                  
00650aa1                  int32_t eax_5 = *(uint32_t*)((char*)arg1 - 0x10);
00650aa4                  int32_t ebx_3 = *(uint32_t*)((char*)arg1 - 0x14);
00650aa7                  ecx_1 -= *(uint16_t*)((ebx_3 + (eax_5 << 1)) + 0x608);
00650aaf                  ecx_1 += *(uint16_t*)((ebx_3 + (eax_5 << 1)) + 0x64e);
00650ac2                  return ((int32_t)*(uint16_t*)((ebx_3 + (ecx_1 << 1)) + 0x408));
00650a37              }
00650a37              
00650a40              if ((edi < 1 && sub_650895(arg1, esi, edi, x87_r1, x87_r4) == 0))
00650a89                  break;
00650a89              
00650a46              edi -= 1;
00650a4a              uint64_t temp0_4 = _m_psrlqi(arg3, 0x3f);
00650a51              arg3 = _m_psllqi(arg3, 1);
00650a55              uint64_t temp0_6 = _m_psllqi(((uint64_t)ecx_1), 1);
00650a59              *(uint32_t*)((char*)arg1 - 0x10) += 1;
00650a5f              ecx_1 = (temp0_6 | temp0_4);
00650a16          }
00650a6e      }
00650a6e      
00650ac9      return 1;
006509f3  }

00650aca                                33 c0 8b 5d f4 8b 75 f8 8b 7d fc c9 c3 8b f6 8d bc 27 00 00 00 00            3..]..u..}.......'....

00650ae0  int32_t _own_decodehuffman8x8_m6(int64_t* arg1, int32_t arg2, int32_t arg3, int16_t* arg4, uint32_t* arg5)

00650ae0  {
00650ae1      int32_t __saved_ebp;
00650ae1      int32_t* ebp = &__saved_ebp;
00650af2      uint64_t st1 = *(uint64_t*)arg1;
00650af5      int32_t edi = *(uint32_t*)((char*)arg1 + 0xc);
00650af8      char* esi = arg1[2];
00650afe      int32_t var_2c = *(uint32_t*)((char*)arg1 + 0x1c);
00650b04      int32_t var_24 = *(uint32_t*)((char*)arg1 + 0x24);
00650b07      uint32_t ebx_2 = ((uint32_t)arg1[6]);
00650b13      int64_t st4 = 0x40;
00650b1c      __builtin_memset(arg5, 0, 0x80);
00650b70      uint64_t st0;
00650b70      char st7[0x8];
00650b70      uint64_t x87_r1;
00650b70      int64_t x87_r4;
00650b70      
00650b70      if (edi < 8)
00650b70      {
00650cbd          st0 = ((uint64_t)edi);
00650cc6          char temp0_11[0x8] = _m_psubd(0x40, st0);
00650cc9          st0 = _m_pcmpeqb(st0, st0);
00650ccc          st1 = _m_psrlq(st1, temp0_11);
00650ccc          
00650cd3          if (ebx_2 != 0)
00650cd3              goto label_650d17;
00650cd3          
00650cdc          if (var_24 >= 4)
00650cdc          {
00650ce6              st7 = ((uint64_t)_bswap(*(uint32_t*)esi));
00650ce6              
00650cf1              if (_m_pcmpeqb(st0, st7) != 0)
00650cf1                  goto label_650d30;
00650cf1              
00650cf7              esi = &esi[4];
00650cfe              edi += 0x20;
00650d01              st1 = (_m_psllqi(st1, 0x20) | st7);
00650d07              var_2c += 4;
00650d0b              var_24 -= 4;
00650d17          label_650d17:
00650d17              st1 = _m_psllq(st1, _m_psubd(0x40, ((uint64_t)edi)));
00650d1a              st4 = 0x40;
00650d1a              
00650d20              if (edi >= 8)
00650d20                  goto label_650b80;
00650d20              
00650d20              goto label_650dd5;
00650cdc          }
00650cdc          
00650d30      label_650d30:
00650d30          
00650d37          if (sub_650f88(ebp, esi, edi, x87_r1, x87_r4) != 0)
00650d37          {
00650d40              if (edi >= 8)
00650d40                  goto label_650b80;
00650d40              
00650d40              goto label_650dd5;
00650d37          }
00650d37          
00650f57      label_650f57:
00650f57          *(uint64_t*)arg1 = st1;
00650f5a          *(uint32_t*)((char*)arg1 + 0xc) = edi;
00650f5d          arg1[2] = esi;
00650f66          *(uint32_t*)((char*)arg1 + 0x24) = var_24;
00650f69          int64_t* eax_33;
00650f69          eax_33 = ebx_2;
00650f6f          arg1[6] = eax_33;
00650f78          *(uint32_t*)((char*)arg1 + 0x1c) = var_2c;
00650f87          return 0;
00650b70      }
00650b70      
00650b80  label_650b80:
00650b80      int32_t eax_4 = _m_psrlqi(st1, 0x38);
00650b86      uint32_t ebx_5 = ((uint32_t)*(uint16_t*)(((arg2 + 8) + (eax_4 << 2)) + 2));
00650b8b      uint32_t eax_5 = ((uint32_t)*(uint16_t*)((arg2 + 8) + (eax_4 << 2)));
00650b8b      
00650b91      if (ebx_5 == 0)
00650b91      {
00650dd5      label_650dd5:
00650dd5          int32_t var_18_1 = arg2;
00650dd8          eax_5 = sub_651085(ebp, esi, edi, x87_r1, x87_r4);
00650dd8          
00650ddf          if (eax_5 < 0)
00650ddf              goto label_650f57;
00650b91      }
00650b91      else
00650b91      {
00650b97          edi -= ebx_5;
00650b9c          st1 = _m_psllq(st1, ((uint64_t)ebx_5));
00650b91      }
00650b91      
00650ba1      if (edi < eax_5)
00650ba1      {
00650d52          st0 = ((uint64_t)edi);
00650d5b          st7 = _m_psubd(st4, st0);
00650d5e          st0 = _m_pcmpeqb(st0, st0);
00650d61          st1 = _m_psrlq(st1, st7);
00650d61          
00650d68          if (ebx_2 != 0)
00650dac              st1 = _m_psllq(st1, _m_psubd(st4, ((uint64_t)edi)));
00650d68          else if (var_24 < 4)
00650d71          {
00650db9          label_650db9:
00650db9              
00650dc0              if (sub_650f88(ebp, esi, edi, x87_r1, x87_r4) == 0)
00650dc0                  goto label_650f57;
00650d71          }
00650d71          else
00650d71          {
00650d7b              st7 = ((uint64_t)_bswap(*(uint32_t*)esi));
00650d7b              
00650d86              if (_m_pcmpeqb(st0, st7) != 0)
00650d86                  goto label_650db9;
00650d86              
00650d8c              esi = &esi[4];
00650d93              edi += 0x20;
00650d9c              var_2c += 4;
00650da0              var_24 -= 4;
00650dac              st1 = _m_psllq((_m_psllqi(st1, 0x20) | st7), _m_psubd(st4, ((uint64_t)edi)));
00650d71          }
00650ba1      }
00650ba1      
00650ba7      edi -= eax_5;
00650ba9      uint64_t st2 = ((uint64_t)eax_5);
00650bb8      int32_t ecx_2 = _m_psrlq(st1, _m_psubd(st4, st2));
00650bbb      st1 = _m_psllq(st1, st2);
00650bbe      int16_t edx_1 = 0;
00650bbe      
00650bce      if (ecx_2 < *(uint32_t*)((eax_5 << 2) + &data_907100))
00650bce          edx_1 = ((int16_t)*(uint32_t*)((eax_5 << 2) + &data_9070c0));
00650bce      
00650bd3      int32_t edx_2 = 1;
00650be1      uint32_t ecx_4;
00650be1      ecx_4 = ((ecx_2 + edx_1) + *(uint16_t*)arg4);
00650be4      *(uint16_t*)arg4 = ecx_4;
00650bea      uint64_t st3 = st1;
00650bf0      int32_t ebx_6 = (arg3 + 8);
00650bf3      *(uint32_t*)arg5 = ecx_4;
00650bf3      
00650bf6      while (true)
00650bf6      {
00650bf6          st1 = _m_psrlqi(st1, 0x38);
00650bf6          
00650bfd          while (true)
00650bfd          {
00650bfd              if (edi < 8)
00650bfd              {
00650e89                  st0 = ((uint64_t)edi);
00650e92                  st7 = _m_psubd(st4, st0);
00650e95                  st0 = _m_pcmpeqb(st0, st0);
00650e98                  st1 = _m_psrlq(st3, st7);
00650e98                  
00650e9f                  if (ebx_2 != 0)
00650e9f                      goto label_650ee3;
00650e9f                  
00650ea8                  if (var_24 < 4)
00650ea8                  {
00650f06                  label_650f06:
00650f06                      
00650f0d                      if (sub_650f88(ebp, esi, edi, x87_r1, x87_r4) == 0)
00650f0d                          goto label_650f57;
00650f0d                      
00650f13                      ebx_6 = (arg3 + 8);
00650f16                      st3 = st1;
00650f19                      st1 = _m_psrlqi(st1, 0x38);
00650f19                      
00650f20                      if (edi >= 8)
00650f20                          continue;
00650ea8                  }
00650ea8                  else
00650ea8                  {
00650eb2                      st7 = ((uint64_t)_bswap(*(uint32_t*)esi));
00650eb2                      
00650ebd                      if (_m_pcmpeqb(st0, st7) != 0)
00650ebd                          goto label_650f06;
00650ebd                      
00650ec3                      esi = &esi[4];
00650eca                      edi += 0x20;
00650ecd                      st1 = (_m_psllqi(st1, 0x20) | st7);
00650ed3                      var_2c += 4;
00650ed7                      var_24 -= 4;
00650ee3                  label_650ee3:
00650ee3                      uint64_t temp0_38 = _m_psllq(st1, _m_psubd(st4, ((uint64_t)edi)));
00650ee9                      ebx_6 = (arg3 + 8);
00650eec                      st3 = temp0_38;
00650eef                      st1 = _m_psrlqi(temp0_38, 0x38);
00650eef                      
00650ef6                      if (edi >= 8)
00650ef6                          continue;
00650ea8                  }
00650ea8                  
00650e9f                  goto label_650f38;
00650bfd              }
00650bfd              
00650c03              int32_t ecx_6 = st1;
00650c06              st1 = st3;
00650c09              int32_t eax_8 = ((uint32_t)*(uint16_t*)(ebx_6 + (ecx_6 << 2)));
00650c0d              uint32_t ebx_7 = ((uint32_t)*(uint16_t*)((ebx_6 + (ecx_6 << 2)) + 2));
00650c0d              
00650c1c              if (ebx_7 == 0)
00650c1c              {
00650f38              label_650f38:
00650f38                  int32_t var_18_2 = arg3;
00650f3b                  eax_8 = sub_651085(ebp, esi, edi, x87_r1, x87_r4);
00650f3b                  
00650f42                  if (eax_8 < 0)
00650f42                      goto label_650f57;
00650c1c              }
00650c1c              else
00650c1c              {
00650c22                  edi -= ebx_7;
00650c24                  st1 = _m_psllq(st1, ((uint64_t)ebx_7));
00650c1c              }
00650c1c              
00650c27              int32_t ecx_7 = (0xf & eax_8);
00650c29              st2 = ((uint64_t)ecx_7);
00650c2f              int64_t temp0_8 = _m_psubd(st4, st2);
00650c2f              
00650c32              if (ecx_7 != 0)
00650c32              {
00650c3b                  int32_t edx_3 = (edx_2 + (eax_8 >> 4));
00650c3b                  
00650c3f                  if (edi < ecx_7)
00650c3f                  {
00650e0b                      st0 = ((uint64_t)edi);
00650e14                      st7 = _m_psubd(st4, st0);
00650e17                      st0 = _m_pcmpeqb(st0, st0);
00650e1a                      st1 = _m_psrlq(st1, st7);
00650e1a                      
00650e21                      if (ebx_2 != 0)
00650e65                          st1 = _m_psllq(st1, _m_psubd(st4, ((uint64_t)edi)));
00650e21                      else if (var_24 < 4)
00650e2a                      {
00650e72                      label_650e72:
00650e72                          
00650e7b                          if (sub_650f88(ebp, esi, edi, x87_r1, x87_r4) == 0)
00650e7b                              goto label_650f57;
00650e2a                      }
00650e2a                      else
00650e2a                      {
00650e34                          st7 = ((uint64_t)_bswap(*(uint32_t*)esi));
00650e34                          
00650e3f                          if (_m_pcmpeqb(st0, st7) != 0)
00650e3f                              goto label_650e72;
00650e3f                          
00650e45                          esi = &esi[4];
00650e4c                          edi += 0x20;
00650e55                          var_2c += 4;
00650e59                          var_24 -= 4;
00650e65                          st1 = _m_psllq((_m_psllqi(st1, 0x20) | st7), _m_psubd(st4, ((uint64_t)edi)));
00650e2a                      }
00650c3f                  }
00650c3f                  
00650c4b                  edi -= ecx_7;
00650c4d                  int32_t eax_10 = 0;
00650c4f                  int32_t ebx_8 = _m_psrlq(st1, temp0_8);
00650c52                  uint64_t temp0_10 = _m_psllq(st1, st2);
00650c52                  
00650c63                  if (ebx_8 < *(uint32_t*)((ecx_7 << 2) + &data_907100))
00650c63                      eax_10 = *(uint32_t*)((ecx_7 << 2) + &data_9070c0);
00650c63                  
00650c72                  st1 = temp0_10;
00650c78                  edx_2 = (edx_3 + 1);
00650c79                  *(uint16_t*)((char*)arg5 + (*(uint32_t*)((edx_3 << 2) + &data_906ee0) << 1)) = (ebx_8 + eax_10);
00650c7d                  ebx_6 = (arg3 + 8);
00650c7d                  
00650c83                  if (edx_2 < 0x40)
00650c83                  {
00650c89                      st3 = st1;
00650c8c                      break;
00650c83                  }
00650c32              }
00650c32              else if (eax_8 >= 0xf0)
00650def              {
00650df5                  edx_2 += 0x10;
00650df8                  ebx_6 = (arg3 + 8);
00650df8                  
00650dfe                  if (edx_2 < 0x40)
00650dfe                  {
00650c89                      st3 = st1;
00650c8c                      break;
00650dfe                  }
00650def              }
00650def              
00650c94              *(uint64_t*)arg1 = st1;
00650c97              *(uint32_t*)((char*)arg1 + 0xc) = edi;
00650c9a              arg1[2] = esi;
00650ca7              arg1[6] = ebx_2;
00650caa              *(uint32_t*)((char*)arg1 + 0x24) = var_24;
00650cad              *(uint32_t*)((char*)arg1 + 0x1c) = var_2c;
00650cbc              return 0;
00650bfd          }
00650bf6      }
00650ae0  }


00650f88  int32_t sub_650f88(void* arg1 @ ebp, char* arg2 @ esi, int32_t arg3 @ edi, uint64_t arg4 @ st1, int64_t arg5 @ st4)

00650f88  {
00650f8e      int32_t ecx = *(uint32_t*)((char*)arg1 - 0x20);
00650f91      _m_psubd(arg5, ((uint64_t)arg3));
00650f91      
00650f94      while (true)
00650f94      {
00650f94          int32_t temp0_1 = ecx;
00650f94          ecx -= 1;
00650f95          int32_t var_10;
00650f95          int32_t ebx;
00650f95          
00650f95          if (temp0_1 < 1)
00650f95          {
0065102f              void* ecx_3 = *(uint32_t*)((char*)arg1 + 8);
0065102f              
00651032              if (*(uint32_t*)(*(uint32_t*)((char*)arg1 + 8) + 0x3c) != 0)
00651032              {
00651038                  var_10 = ebx;
00651038                  int32_t* var_14_1 = &var_10;
00651038                  char* var_1c_1 = arg2;
00651042                  bool cond:1_1 = _load_from_file(ecx_3) != 0;
00651044                  ebx = var_10;
00651044                  
00651045                  if (!(cond:1_1))
00651045                  {
0065104b                      arg2 = *(uint32_t*)((char*)ecx_3 + 0x10);
0065104e                      ecx = *(uint32_t*)((char*)ecx_3 + 0x24);
00651051                      continue;
00651045                  }
00651032              }
00651032              
00651026              return 0;
00650f95          }
00650f95          
00650f9b          *(uint32_t*)((char*)arg1 - 0x28) += 1;
00650fa0          uint32_t eax = ((uint32_t)*(uint8_t*)arg2);
00650fa3          arg2 = &arg2[1];
00650fa3          
00650fa9          if (eax == 0xff)
00650fa9          {
00650fda              while (true)
00650fda              {
00650fda                  int32_t temp1_1 = ecx;
00650fda                  ecx -= 1;
00650fda                  
00650fdb                  if (temp1_1 < 1)
00650fdb                  {
0065105e                      void* ecx_7 = *(uint32_t*)((char*)arg1 + 8);
0065105e                      
00651061                      if (*(uint32_t*)(*(uint32_t*)((char*)arg1 + 8) + 0x3c) == 0)
00651026                          return 0;
00651026                      
00651067                      var_10 = ebx;
00651067                      int32_t* var_14_2 = &var_10;
00651067                      char* var_1c_2 = arg2;
00651071                      bool cond:3_1 = _load_from_file(ecx_7) != 0;
00651073                      ebx = var_10;
00651073                      
00651074                      if (cond:3_1)
00651026                          return 0;
00651026                      
0065107a                      arg2 = *(uint32_t*)((char*)ecx_7 + 0x10);
0065107d                      ecx = *(uint32_t*)((char*)ecx_7 + 0x24);
00650fdb                  }
00650fdb                  else
00650fdb                  {
00650fe1                      *(uint32_t*)((char*)arg1 - 0x28) += 1;
00650fe6                      eax = ((uint32_t)*(uint8_t*)arg2);
00650fe9                      arg2 = &arg2[1];
00650fe9                      
00650fef                      if (eax != 0xff)
00650fef                          break;
00650fdb                  }
00650fda              }
00650fda              
00650ff7              if (eax != 0)
00650ff7              {
00651007                  *(uint32_t*)((char*)arg1 - 0x24) = eax;
0065100a                  arg4 = _m_psllqi(arg4, 8);
0065100e                  arg3 += 8;
00651014                  break;
00650ff7              }
00650ff7              
00650ffd              eax = 0xff;
00650fa9          }
00650fa9          
00650fb6          arg3 += 8;
00650fb9          arg4 = (_m_psllqi(arg4, 8) | ((uint64_t)eax));
00650fb9          
00650fbf          if (arg3 > 0x38)
00650fbf              break;
00650f94      }
00650f94      
00650fc5      *(uint32_t*)((char*)arg1 - 0x20) = ecx;
00650fd6      _m_psllq(arg4, _m_psubd(arg5, ((uint64_t)arg3)));
00650fd9      return 0xff;
00650f88  }


00651085  int32_t sub_651085(void* arg1 @ ebp, char* arg2 @ esi, int32_t arg3 @ edi, uint64_t arg4 @ st1, uint64_t arg5 @ st4)

00651085  {
00651086      int32_t ebx;
00651086      *(uint32_t*)((char*)arg1 - 0x10) = ebx;
00651086      
0065108b      if (arg3 >= ebx)
0065108b          goto label_651091;
0065108b      
006510f9      char st0[0x8] = ((uint64_t)arg3);
006510ff      int32_t ecx_2 = *(uint32_t*)((char*)arg1 - 0x20);
00651102      int64_t temp0_7 = _m_psubd(arg5, st0);
00651105      char temp0_8[0x8] = _m_pcmpeqb(st0, st0);
00651108      arg4 = _m_psrlq(arg4, temp0_7);
00651108      
0065110f      if (*(uint32_t*)((char*)arg1 - 0x24) != 0)
0065110f          goto label_651153;
0065110f      
00651118      int32_t eax_4;
00651118      uint64_t st7;
00651118      
00651118      if (ecx_2 >= 4)
00651118      {
00651122          st7 = ((uint64_t)_bswap(*(uint32_t*)arg2));
00651128          eax_4 = _m_pcmpeqb(temp0_8, st7)[0];
00651118      }
00651118      
0065112d      uint64_t x87_r1;
0065112d      int64_t x87_r4;
0065112d      
0065112d      if ((ecx_2 < 4 || eax_4 != 0))
0065112d      {
00651167          if (sub_650f88(arg1, arg2, arg3, x87_r1, x87_r4) != 0)
00651167          {
0065116f              ebx = *(uint32_t*)((char*)arg1 - 0x10);
00651172              goto label_651091;
00651167          }
0065112d      }
0065112d      else
0065112d      {
00651133          arg2 = &arg2[4];
0065113a          arg3 += 0x20;
0065113d          arg4 = (_m_psllqi(arg4, 0x20) | st7);
00651143          *(uint32_t*)((char*)arg1 - 0x28) += 4;
00651147          *(uint32_t*)((char*)arg1 - 0x20) = (ecx_2 - 4);
00651153      label_651153:
00651153          arg4 = _m_psllq(arg4, _m_psubd(arg5, ((uint64_t)arg3)));
00651158          ebx = *(uint32_t*)((char*)arg1 - 0x10);
00651091      label_651091:
00651091          int32_t edi = (arg3 - ebx);
00651096          st7 = ((uint64_t)ebx);
00651099          uint64_t st2 = arg4;
0065109c          int64_t temp0_1 = _m_psubd(arg5, st7);
0065109f          arg4 = _m_psllq(arg4, st7);
006510a5          int32_t ecx_1 = _m_psrlq(st2, temp0_1);
006510a5          
006510a8          while (true)
006510a8          {
006510a8              int32_t eax_1 = *(uint32_t*)((char*)arg1 - 0x10);
006510ab              int32_t edx_1 = *(uint32_t*)((char*)arg1 - 0x14);
006510ae              int32_t ebx_1 = ((int32_t)*(uint16_t*)((edx_1 + (eax_1 << 1)) + 0x62a));
006510ae              
006510b9              if (ebx_1 != 0xffffffff)
006510bf                  ebx_1 = ((uint32_t)*(uint16_t*)((edx_1 + (eax_1 << 1)) + 0x62a));
006510bf              
006510c9              if (ebx_1 >= ecx_1)
006510c9              {
006511f4                  if (eax_1 > 0x10)
006511fd                      return 0;
006511fd                  
006511fe                  int32_t eax_11 = *(uint32_t*)((char*)arg1 - 0x10);
00651201                  int32_t ebx_3 = *(uint32_t*)((char*)arg1 - 0x14);
00651204                  ecx_1 -= *(uint16_t*)((ebx_3 + (eax_11 << 1)) + 0x608);
0065120c                  ecx_1 += *(uint16_t*)((ebx_3 + (eax_11 << 1)) + 0x64e);
0065121d                  return ((int32_t)*(uint16_t*)((ebx_3 + (ecx_1 << 1)) + 0x408));
006510c9              }
006510c9              
006510d2              if (edi < 1)
006510d2              {
00651179                  st0 = ((uint64_t)edi);
0065117f                  int32_t ecx_4 = *(uint32_t*)((char*)arg1 - 0x20);
00651182                  int64_t temp0_14 = _m_psubd(arg5, st0);
00651185                  char temp0_15[0x8] = _m_pcmpeqb(st0, st0);
00651188                  arg4 = _m_psrlq(arg4, temp0_14);
00651188                  
0065118f                  if (*(uint32_t*)((char*)arg1 - 0x24) != 0)
006511d3                      arg4 = _m_psllq(arg4, _m_psubd(arg5, ((uint64_t)edi)));
0065118f                  else
0065118f                  {
00651198                      int32_t eax_8;
00651198                      
00651198                      if (ecx_4 >= 4)
00651198                      {
006511a2                          st7 = ((uint64_t)_bswap(*(uint32_t*)arg2));
006511a8                          eax_8 = _m_pcmpeqb(temp0_15, st7)[0];
00651198                      }
00651198                      
006511ad                      if ((ecx_4 < 4 || eax_8 != 0))
006511ad                      {
006511e6                          if (sub_650f88(arg1, arg2, edi, x87_r1, x87_r4) == 0)
006511e6                              break;
006511ad                      }
006511ad                      else
006511ad                      {
006511b3                          arg2 = &arg2[4];
006511ba                          edi += 0x20;
006511bd                          arg4 = (_m_psllqi(arg4, 0x20) | st7);
006511c3                          *(uint32_t*)((char*)arg1 - 0x28) += 4;
006511c7                          *(uint32_t*)((char*)arg1 - 0x20) = (ecx_4 - 4);
006511d3                          arg4 = _m_psllq(arg4, _m_psubd(arg5, ((uint64_t)edi)));
006511ad                      }
0065118f                  }
006510d2              }
006510d2              
006510d8              edi -= 1;
006510dc              uint64_t temp0_4 = _m_psrlqi(arg4, 0x3f);
006510e3              arg4 = _m_psllqi(arg4, 1);
006510e7              uint64_t temp0_6 = _m_psllqi(((uint64_t)ecx_1), 1);
006510eb              *(uint32_t*)((char*)arg1 - 0x10) += 1;
006510f1              ecx_1 = (temp0_6 | temp0_4);
006510a8          }
0065112d      }
00651224      return 1;
00651085  }

00651225                 33 c0 8b 5d f4 8b 75 f8 8b 7d fc c9 c3 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00       3..]..u..}.....&......'....

00651240  int32_t _own_decodehuffman8x8_m5(int64_t* arg1, int32_t arg2, int32_t arg3, int16_t* arg4, int16_t* arg5)

00651240  {
00651241      int32_t __saved_ebp;
00651241      int32_t* ebp = &__saved_ebp;
00651252      int32_t eax_1 = *(uint32_t*)((char*)arg1 + 0x1c);
0065125b      int32_t eax_3 = *(uint32_t*)((char*)arg1 + 0x24);
00651264      int64_t* eax_4;
00651264      eax_4 = arg1[6];
00651267      char var_24 = eax_4;
0065126d      uint64_t st1 = *(uint64_t*)arg1;
00651270      int32_t edi = *(uint32_t*)((char*)arg1 + 0xc);
00651273      char* esi = arg1[2];
00651284      __builtin_memset(arg5, 0, 0x80);
006512c3      int80_t st5;
006512c3      st5 = data_907b80;
006512ca      int80_t st6;
006512ca      st6 = data_907b88;
006512e6      uint32_t eax_11;
006512e6      uint64_t x87_r1;
006512e6      int64_t x87_r4;
006512e6      
006512e6      if (edi < 8)
006512e6      {
00651448          if (sub_65154e(ebp, esi, edi, x87_r1, x87_r4) == 0)
00651448          {
0065151d          label_65151d:
0065151d              *(uint64_t*)arg1 = st1;
00651520              *(uint32_t*)((char*)arg1 + 0xc) = edi;
00651523              arg1[2] = esi;
0065152c              *(uint32_t*)((char*)arg1 + 0x24) = eax_3;
00651532              int32_t edx_5;
00651532              edx_5 = var_24;
00651535              arg1[6] = edx_5;
0065153e              *(uint32_t*)((char*)arg1 + 0x1c) = eax_1;
0065154d              return 0;
00651448          }
00651448          
00651451          if (edi >= 8)
00651451              goto label_6512f6;
00651451          
0065147f      label_65147f:
0065147f          int32_t var_18_1 = arg2;
00651482          eax_11 = sub_651656(ebp, edi, x87_r1, x87_r4);
00651482          
00651489          if (eax_11 < 0)
00651489              goto label_65151d;
006512e6      }
006512e6      else
006512e6      {
006512f6      label_6512f6:
006512fc          int32_t ebx_2 = *(uint32_t*)((arg2 + 8) + (_m_psrlqi(st1, 0x38) << 2));
006512fc          
00651307          if (ebx_2 <= 0xffff)
00651307              goto label_65147f;
00651307          
0065130d          uint32_t ebx_3 = (ebx_2 >> 0x10);
00651310          edi -= ebx_3;
00651315          st1 = _m_psllq(st1, ((uint64_t)ebx_3));
00651318          eax_11 = ((uint32_t)ebx_2);
006512e6      }
006512e6      
0065131f      if ((edi < eax_11 && sub_65154e(ebp, esi, edi, x87_r1, x87_r4) == 0))
0065146a          goto label_65151d;
0065146a      
00651328      edi -= eax_11;
0065132a      uint64_t st2 = ((uint64_t)eax_11);
00651336      uint64_t temp0_4 = _m_psrlq(st1, _m_psubd(0x40, st2));
00651339      int32_t ebx_4 = *(uint32_t*)((eax_11 << 2) + &data_907100);
00651340      int32_t ecx_2 = temp0_4;
00651343      st1 = _m_psllq(st1, st2);
00651343      
00651348      if (ecx_2 < ebx_4)
0065134e          ecx_2 += *(uint32_t*)((eax_11 << 2) + &data_9070c0);
0065134e      
00651355      int32_t edx_1 = 1;
0065135d      ecx_2 += *(uint16_t*)arg4;
00651360      *(uint16_t*)arg4 = ecx_2;
00651366      *(uint16_t*)arg5 = ecx_2;
00651369      int32_t ebx_6 = (arg3 + 8);
0065136c      uint64_t st3 = st1;
0065136c      
0065136f      while (true)
0065136f      {
0065136f          st1 = _m_psrlqi(st1, 0x38);
0065136f          
00651376          while (true)
00651376          {
00651376              if (edi < 8)
00651376              {
006514c9                  st1 = st3;
006514d1                  ebx_6 = (arg3 + 8);
006514d1                  
006514d6                  if (sub_65154e(ebp, esi, edi, x87_r1, x87_r4) == 0)
006514d6                      goto label_65151d;
006514d6                  
006514dc                  st3 = st1;
006514df                  st1 = _m_psrlqi(st1, 0x38);
006514df                  
006514e6                  if (edi >= 8)
006514e6                      continue;
006514e6                  
006514d6                  goto label_6514fe;
00651376              }
00651376              
0065137c              int32_t ecx_3 = st1;
0065137f              st1 = st3;
00651382              int32_t ebx_7 = *(uint32_t*)(ebx_6 + (ecx_3 << 2));
0065138c              uint32_t ebx_8 = (ebx_7 >> 0x10);
0065138f              int32_t eax_14 = ((uint32_t)ebx_7);
0065138f              
0065139a              if (ebx_8 == 0)
0065139a              {
006514fe              label_6514fe:
006514fe                  int32_t var_18_2 = arg3;
00651501                  eax_14 = sub_651656(ebp, edi, x87_r1, x87_r4);
00651501                  
00651508                  if (eax_14 < 0)
00651508                      goto label_65151d;
0065139a              }
0065139a              else
0065139a              {
006513a0                  edi -= ebx_8;
006513a2                  st1 = _m_psllq(st1, ((uint64_t)ebx_8));
0065139a              }
0065139a              
006513a5              int32_t ecx_4 = (0xf & eax_14);
006513a7              st2 = ((uint64_t)ecx_4);
006513ad              int64_t temp0_8 = _m_psubd(0x40, st2);
006513ad              
006513b0              if (ecx_4 != 0)
006513b0              {
006513b9                  int32_t edx_2 = (edx_1 + (eax_14 >> 4));
006513b9                  
006513bd                  if ((edi < ecx_4 && sub_65154e(ebp, esi, edi, x87_r1, x87_r4) == 0))
006514be                      goto label_65151d;
006514be                  
006513c6                  uint64_t temp0_9 = _m_psrlq(st1, temp0_8);
006513c9                  int32_t eax_16 = *(uint32_t*)((ecx_4 << 2) + &data_907100);
006513d0                  edi -= ecx_4;
006513d2                  int32_t ebx_9 = temp0_9;
006513d5                  uint64_t temp0_10 = _m_psllq(st1, st2);
006513d5                  
006513da                  if (ebx_9 < eax_16)
006513e0                      ebx_9 += *(uint32_t*)((ecx_4 << 2) + &data_9070c0);
006513e0                  
006513ee                  st1 = temp0_10;
006513f1                  edx_1 = (edx_2 + 1);
006513f5                  arg5[*(uint32_t*)((edx_2 << 2) + &data_906ee0)] = ebx_9;
006513f9                  ebx_6 = (arg3 + 8);
006513f9                  
006513ff                  if (edx_1 < 0x40)
006513ff                  {
00651405                      st3 = st1;
00651408                      break;
006513ff                  }
006513b0              }
006513b0              else if (eax_14 >= 0xf0)
00651499              {
0065149f                  edx_1 += 0x10;
006514a2                  ebx_6 = (arg3 + 8);
006514a2                  
006514a8                  if (edx_1 < 0x40)
006514a8                  {
00651405                      st3 = st1;
00651408                      break;
006514a8                  }
00651499              }
00651499              
00651410              *(uint64_t*)arg1 = st1;
00651413              *(uint32_t*)((char*)arg1 + 0xc) = edi;
00651416              arg1[2] = esi;
0065141f              *(uint32_t*)((char*)arg1 + 0x24) = eax_3;
00651425              int32_t edx_3;
00651425              edx_3 = var_24;
00651428              arg1[6] = edx_3;
00651431              *(uint32_t*)((char*)arg1 + 0x1c) = eax_1;
00651440              return 0;
00651376          }
0065136f      }
00651240  }


0065154e  int32_t sub_65154e(void* arg1 @ ebp, char* arg2 @ esi, int32_t arg3 @ edi, uint64_t arg4 @ st1, int64_t arg5 @ st4)

0065154e  {
00651554      int32_t ecx = *(uint32_t*)((char*)arg1 - 0x24);
0065155a      arg4 = _m_psrlq(arg4, _m_psubd(arg5, ((uint64_t)arg3)));
0065155a      
00651561      if (*(uint8_t*)((char*)arg1 - 0x20) == 0)
00651561      {
00651567          while (true)
00651567          {
00651567              int32_t temp0_2 = ecx;
00651567              ecx -= 1;
00651568              int32_t var_10;
00651568              int32_t ebx;
00651568              
00651568              if (temp0_2 < 1)
00651568              {
00651600                  void* ecx_3 = *(uint32_t*)((char*)arg1 + 8);
00651600                  
00651603                  if (*(uint32_t*)(*(uint32_t*)((char*)arg1 + 8) + 0x3c) != 0)
00651603                  {
00651609                      var_10 = ebx;
00651609                      int32_t* var_14_1 = &var_10;
00651609                      char* var_1c_1 = arg2;
00651613                      bool cond:1_1 = _load_from_file(ecx_3) != 0;
00651615                      ebx = var_10;
00651615                      
00651616                      if (!(cond:1_1))
00651616                      {
0065161c                          arg2 = *(uint32_t*)((char*)ecx_3 + 0x10);
0065161f                          ecx = *(uint32_t*)((char*)ecx_3 + 0x24);
00651622                          continue;
00651616                      }
00651603                  }
00651603                  
006515f7                  return 0;
00651568              }
00651568              
0065156e              *(uint32_t*)((char*)arg1 - 0x28) += 1;
00651573              int32_t eax;
00651573              eax = *(uint8_t*)arg2;
00651575              arg2 = &arg2[1];
00651575              
0065157b              if (eax == 0xff)
0065157b              {
006515ac                  while (true)
006515ac                  {
006515ac                      int32_t temp1_1 = ecx;
006515ac                      ecx -= 1;
006515ac                      
006515ad                      if (temp1_1 < 1)
006515ad                      {
0065162f                          void* ecx_7 = *(uint32_t*)((char*)arg1 + 8);
0065162f                          
00651632                          if (*(uint32_t*)(*(uint32_t*)((char*)arg1 + 8) + 0x3c) == 0)
006515f7                              return 0;
006515f7                          
00651638                          var_10 = ebx;
00651638                          int32_t* var_14_2 = &var_10;
00651638                          char* var_1c_2 = arg2;
00651642                          bool cond:3_1 = _load_from_file(ecx_7) != 0;
00651644                          ebx = var_10;
00651644                          
00651645                          if (cond:3_1)
006515f7                              return 0;
006515f7                          
0065164b                          arg2 = *(uint32_t*)((char*)ecx_7 + 0x10);
0065164e                          ecx = *(uint32_t*)((char*)ecx_7 + 0x24);
006515ad                      }
006515ad                      else
006515ad                      {
006515b3                          *(uint32_t*)((char*)arg1 - 0x28) += 1;
006515b8                          eax = *(uint8_t*)arg2;
006515ba                          arg2 = &arg2[1];
006515ba                          
006515c0                          if (eax != 0xff)
006515c0                              break;
006515ad                      }
006515ac                  }
006515ac                  
006515c8                  if (eax != 0)
006515c8                  {
006515d8                      *(uint8_t*)((char*)arg1 - 0x20) = eax;
006515db                      arg4 = _m_psllqi(arg4, 8);
006515df                      arg3 += 8;
006515e5                      break;
006515c8                  }
006515c8                  
006515ce                  eax = 0xff;
0065157b              }
0065157b              
00651588              arg3 += 8;
0065158b              arg4 = (_m_psllqi(arg4, 8) | ((uint64_t)eax));
0065158b              
00651591              if (arg3 > 0x38)
00651591                  break;
00651567          }
00651561      }
00651561      
00651597      *(uint32_t*)((char*)arg1 - 0x24) = ecx;
006515a8      _m_psllq(arg4, _m_psubd(arg5, ((uint64_t)arg3)));
006515ab      return 0xff;
0065154e  }


00651656  int32_t sub_651656(void* arg1 @ ebp, int32_t arg2 @ edi, uint64_t arg3 @ st1, int64_t arg4 @ st4)

00651656  {
00651657      int32_t ebx;
00651657      *(uint32_t*)((char*)arg1 - 0x10) = ebx;
00651657      
0065165c      if (arg2 >= ebx)
0065165c          goto label_651662;
0065165c      
006516d1      char* esi;
006516d1      uint64_t x87_r1;
006516d1      int64_t x87_r4;
006516d1      
006516d1      if (sub_65154e(arg1, esi, arg2, x87_r1, x87_r4) != 0)
006516d1      {
006516d9          ebx = *(uint32_t*)((char*)arg1 - 0x10);
00651662      label_651662:
00651662          int32_t edi = (arg2 - ebx);
00651667          uint64_t st7 = ((uint64_t)ebx);
0065166a          uint64_t st2 = arg3;
0065166d          int64_t temp0_1 = _m_psubd(arg4, st7);
00651670          arg3 = _m_psllq(arg3, st7);
00651676          int32_t ecx_1 = _m_psrlq(st2, temp0_1);
00651676          
00651679          while (true)
00651679          {
00651679              int32_t eax_1 = *(uint32_t*)((char*)arg1 - 0x10);
0065167c              int32_t edx_1 = *(uint32_t*)((char*)arg1 - 0x14);
0065167f              int32_t ebx_1 = ((int32_t)*(uint16_t*)((edx_1 + (eax_1 << 1)) + 0x62a));
0065167f              
0065168a              if (ebx_1 != 0xffffffff)
00651690                  ebx_1 = ((uint32_t)*(uint16_t*)((edx_1 + (eax_1 << 1)) + 0x62a));
00651690              
0065169a              if (ebx_1 >= ecx_1)
0065169a              {
006516fa                  if (eax_1 > 0x10)
00651703                      return 0;
00651703                  
00651704                  int32_t eax_5 = *(uint32_t*)((char*)arg1 - 0x10);
00651707                  int32_t ebx_3 = *(uint32_t*)((char*)arg1 - 0x14);
0065170a                  ecx_1 -= *(uint16_t*)((ebx_3 + (eax_5 << 1)) + 0x608);
00651712                  ecx_1 += *(uint16_t*)((ebx_3 + (eax_5 << 1)) + 0x64e);
00651723                  return ((int32_t)*(uint16_t*)((ebx_3 + (ecx_1 << 1)) + 0x408));
0065169a              }
0065169a              
006516a3              if ((edi < 1 && sub_65154e(arg1, esi, edi, x87_r1, x87_r4) == 0))
006516ec                  break;
006516ec              
006516a9              edi -= 1;
006516ad              uint64_t temp0_4 = _m_psrlqi(arg3, 0x3f);
006516b4              arg3 = _m_psllqi(arg3, 1);
006516b8              uint64_t temp0_6 = _m_psllqi(((uint64_t)ecx_1), 1);
006516bc              *(uint32_t*)((char*)arg1 - 0x10) += 1;
006516c2              ecx_1 = (temp0_6 | temp0_4);
00651679          }
006516d1      }
006516d1      
0065172a      return 1;
00651656  }

0065172b                                   33 c0 8b 5d f4 8b 75 f8 8b 7d fc c9 c3 90 8d b4 26 00 00 00 00             3..]..u..}......&....

00651740  int32_t _own_iqnt8x8_ipp_m5(int64_t* arg1, int64_t* arg2)

00651740  {
00651751      int16_t st2[0x4] = arg1[1];
00651755      int16_t st3[0x4] = arg2[1];
00651759      int16_t temp0[0x4] = _m_pmullw(*(uint64_t*)arg1, *(uint64_t*)arg2);
0065175c      int16_t temp0_1[0x4] = _m_pmullw(st2, st3);
0065175f      *(uint64_t*)arg1 = temp0;
00651762      arg1[1] = temp0_1;
0065176e      st2 = arg1[3];
00651772      st3 = arg2[3];
00651776      int16_t temp0_2[0x4] = _m_pmullw(arg1[2], arg2[2]);
00651779      int16_t temp0_3[0x4] = _m_pmullw(st2, st3);
0065177c      arg1[2] = temp0_2;
00651780      arg1[3] = temp0_3;
0065178c      st2 = arg1[5];
00651790      st3 = arg2[5];
00651794      int16_t temp0_4[0x4] = _m_pmullw(arg1[4], arg2[4]);
00651797      int16_t temp0_5[0x4] = _m_pmullw(st2, st3);
0065179a      arg1[4] = temp0_4;
0065179e      arg1[5] = temp0_5;
006517aa      st2 = arg1[7];
006517ae      st3 = arg2[7];
006517b2      int16_t temp0_6[0x4] = _m_pmullw(arg1[6], arg2[6]);
006517b5      int16_t temp0_7[0x4] = _m_pmullw(st2, st3);
006517b8      arg1[6] = temp0_6;
006517bc      arg1[7] = temp0_7;
006517c8      st2 = arg1[9];
006517cc      st3 = arg2[9];
006517d0      int16_t temp0_8[0x4] = _m_pmullw(arg1[8], arg2[8]);
006517d3      int16_t temp0_9[0x4] = _m_pmullw(st2, st3);
006517d6      arg1[8] = temp0_8;
006517da      arg1[9] = temp0_9;
006517e6      st2 = arg1[0xb];
006517ea      st3 = arg2[0xb];
006517ee      int16_t temp0_10[0x4] = _m_pmullw(arg1[0xa], arg2[0xa]);
006517f1      int16_t temp0_11[0x4] = _m_pmullw(st2, st3);
006517f4      arg1[0xa] = temp0_10;
006517f8      arg1[0xb] = temp0_11;
00651804      st2 = arg1[0xd];
00651808      st3 = arg2[0xd];
0065180c      int16_t temp0_12[0x4] = _m_pmullw(arg1[0xc], arg2[0xc]);
0065180f      int16_t temp0_13[0x4] = _m_pmullw(st2, st3);
00651812      arg1[0xc] = temp0_12;
00651816      arg1[0xd] = temp0_13;
00651822      st2 = arg1[0xf];
00651826      st3 = arg2[0xf];
0065182a      int16_t temp0_14[0x4] = _m_pmullw(arg1[0xe], arg2[0xe]);
0065182d      int16_t temp0_15[0x4] = _m_pmullw(st2, st3);
00651830      arg1[0xe] = temp0_14;
00651834      arg1[0xf] = temp0_15;
00651740  }

0065183c                                                                                      8d 64 24 00                              .d$.

00651840  int32_t _own_iqnt8x8_ipp_w7(int128_t* arg1, int128_t* arg2)

00651840  {
00651851      if ((arg1 & 0xf) == 0)
00651851      {
0065199d          if ((arg2 & 0xf) == 0)
0065199d          {
00651a45              int32_t xmm2_24[0x4] = arg1[1];
00651a4a              int32_t xmm3_12[0x4] = arg2[1];
00651a4f              int32_t xmm0_25[0x4] = _mm_mullo_epi16(*(uint128_t*)arg1, *(uint128_t*)arg2);
00651a53              int32_t xmm2_25[0x4] = _mm_mullo_epi16(xmm2_24, xmm3_12);
00651a57              *(uint128_t*)arg1 = xmm0_25;
00651a5b              arg1[1] = xmm2_25;
00651a6a              int32_t xmm2_26[0x4] = arg1[3];
00651a6f              int32_t xmm3_13[0x4] = arg2[3];
00651a74              int32_t xmm0_27[0x4] = _mm_mullo_epi16(arg1[2], arg2[2]);
00651a78              int32_t xmm2_27[0x4] = _mm_mullo_epi16(xmm2_26, xmm3_13);
00651a7c              arg1[2] = xmm0_27;
00651a81              arg1[3] = xmm2_27;
00651a90              int32_t xmm2_28[0x4] = arg1[5];
00651a95              int32_t xmm3_14[0x4] = arg2[5];
00651a9a              int32_t xmm0_29[0x4] = _mm_mullo_epi16(arg1[4], arg2[4]);
00651a9e              int32_t xmm2_29[0x4] = _mm_mullo_epi16(xmm2_28, xmm3_14);
00651aa2              arg1[4] = xmm0_29;
00651aa7              arg1[5] = xmm2_29;
00651ab6              int32_t xmm2_30[0x4] = arg1[7];
00651abb              int32_t xmm3_15[0x4] = arg2[7];
00651ac0              int32_t xmm0_31[0x4] = _mm_mullo_epi16(arg1[6], arg2[6]);
00651ac4              int32_t xmm2_31[0x4] = _mm_mullo_epi16(xmm2_30, xmm3_15);
00651ac8              arg1[6] = xmm0_31;
00651acd              arg1[7] = xmm2_31;
0065199d          }
0065199d          else
0065199d          {
006519ab              int32_t xmm2_16[0x4] = arg1[1];
006519b0              int32_t xmm3_8[0x4] = arg2[1];
006519b5              int32_t xmm0_17[0x4] = _mm_mullo_epi16(*(uint128_t*)arg1, *(uint128_t*)arg2);
006519b9              int32_t xmm2_17[0x4] = _mm_mullo_epi16(xmm2_16, xmm3_8);
006519bd              *(uint128_t*)arg1 = xmm0_17;
006519c1              arg1[1] = xmm2_17;
006519d0              int32_t xmm2_18[0x4] = arg1[3];
006519d5              int32_t xmm3_9[0x4] = arg2[3];
006519da              int32_t xmm0_19[0x4] = _mm_mullo_epi16(arg1[2], arg2[2]);
006519de              int32_t xmm2_19[0x4] = _mm_mullo_epi16(xmm2_18, xmm3_9);
006519e2              arg1[2] = xmm0_19;
006519e7              arg1[3] = xmm2_19;
006519f6              int32_t xmm2_20[0x4] = arg1[5];
006519fb              int32_t xmm3_10[0x4] = arg2[5];
00651a00              int32_t xmm0_21[0x4] = _mm_mullo_epi16(arg1[4], arg2[4]);
00651a04              int32_t xmm2_21[0x4] = _mm_mullo_epi16(xmm2_20, xmm3_10);
00651a08              arg1[4] = xmm0_21;
00651a0d              arg1[5] = xmm2_21;
00651a1c              int32_t xmm2_22[0x4] = arg1[7];
00651a21              int32_t xmm3_11[0x4] = arg2[7];
00651a26              int32_t xmm0_23[0x4] = _mm_mullo_epi16(arg1[6], arg2[6]);
00651a2a              int32_t xmm2_23[0x4] = _mm_mullo_epi16(xmm2_22, xmm3_11);
00651a2e              arg1[6] = xmm0_23;
00651a33              arg1[7] = xmm2_23;
0065199d          }
00651851      }
00651851      else if ((arg2 & 0xf) == 0)
0065185d      {
00651905          int32_t xmm2_8[0x4] = arg1[1];
0065190a          int32_t xmm3_4[0x4] = arg2[1];
0065190f          int32_t xmm0_9[0x4] = _mm_mullo_epi16(*(uint128_t*)arg1, *(uint128_t*)arg2);
00651913          int32_t xmm2_9[0x4] = _mm_mullo_epi16(xmm2_8, xmm3_4);
00651917          *(uint128_t*)arg1 = xmm0_9;
0065191b          arg1[1] = xmm2_9;
0065192a          int32_t xmm2_10[0x4] = arg1[3];
0065192f          int32_t xmm3_5[0x4] = arg2[3];
00651934          int32_t xmm0_11[0x4] = _mm_mullo_epi16(arg1[2], arg2[2]);
00651938          int32_t xmm2_11[0x4] = _mm_mullo_epi16(xmm2_10, xmm3_5);
0065193c          arg1[2] = xmm0_11;
00651941          arg1[3] = xmm2_11;
00651950          int32_t xmm2_12[0x4] = arg1[5];
00651955          int32_t xmm3_6[0x4] = arg2[5];
0065195a          int32_t xmm0_13[0x4] = _mm_mullo_epi16(arg1[4], arg2[4]);
0065195e          int32_t xmm2_13[0x4] = _mm_mullo_epi16(xmm2_12, xmm3_6);
00651962          arg1[4] = xmm0_13;
00651967          arg1[5] = xmm2_13;
00651976          int32_t xmm2_14[0x4] = arg1[7];
0065197b          int32_t xmm3_7[0x4] = arg2[7];
00651980          int32_t xmm0_15[0x4] = _mm_mullo_epi16(arg1[6], arg2[6]);
00651984          int32_t xmm2_15[0x4] = _mm_mullo_epi16(xmm2_14, xmm3_7);
00651988          arg1[6] = xmm0_15;
0065198d          arg1[7] = xmm2_15;
0065185d      }
0065185d      else
0065185d      {
0065186b          int32_t xmm2[0x4] = arg1[1];
00651870          int32_t xmm3[0x4] = arg2[1];
00651875          int32_t xmm0_1[0x4] = _mm_mullo_epi16(*(uint128_t*)arg1, *(uint128_t*)arg2);
00651879          int32_t xmm2_1[0x4] = _mm_mullo_epi16(xmm2, xmm3);
0065187d          *(uint128_t*)arg1 = xmm0_1;
00651881          arg1[1] = xmm2_1;
00651890          int32_t xmm2_2[0x4] = arg1[3];
00651895          int32_t xmm3_1[0x4] = arg2[3];
0065189a          int32_t xmm0_3[0x4] = _mm_mullo_epi16(arg1[2], arg2[2]);
0065189e          int32_t xmm2_3[0x4] = _mm_mullo_epi16(xmm2_2, xmm3_1);
006518a2          arg1[2] = xmm0_3;
006518a7          arg1[3] = xmm2_3;
006518b6          int32_t xmm2_4[0x4] = arg1[5];
006518bb          int32_t xmm3_2[0x4] = arg2[5];
006518c0          int32_t xmm0_5[0x4] = _mm_mullo_epi16(arg1[4], arg2[4]);
006518c4          int32_t xmm2_5[0x4] = _mm_mullo_epi16(xmm2_4, xmm3_2);
006518c8          arg1[4] = xmm0_5;
006518cd          arg1[5] = xmm2_5;
006518dc          int32_t xmm2_6[0x4] = arg1[7];
006518e1          int32_t xmm3_3[0x4] = arg2[7];
006518e6          int32_t xmm0_7[0x4] = _mm_mullo_epi16(arg1[6], arg2[6]);
006518ea          int32_t xmm2_7[0x4] = _mm_mullo_epi16(xmm2_6, xmm3_3);
006518ee          arg1[6] = xmm0_7;
006518f3          arg1[7] = xmm2_7;
0065185d      }
00651840  }

00651ad6                                                                    8d a4 24 00 00 00 00 8d 49 00                        ..$.....I.

00651ae0  int32_t _own_dct_2d_16s_8x8_inv_m5(int64_t* arg1)

00651ae0  {
00651ae0      int64_t* ecx = arg1;
00651ae8      uint16_t st0[0x4] = *(uint64_t*)ecx;
00651aeb      int64_t st1 = ecx[1];
00651aef      int64_t st2 = st0;
00651af2      int64_t st3 = data_832c90;
00651af9      uint16_t temp0[0x4] = _m_punpcklwd(st0, st1);
00651aff      st0 = _m_punpckldq(temp0, temp0[0]);
00651b02      int64_t st4 = data_832c98;
00651b09      int64_t temp0_2 = __punpckhwd_mmxq_mmxd(st2, st1);
00651b0c      st3 = _m_pmaddwd(st3, st0);
00651b12      st1 = data_832cb0;
00651b19      st2 = _m_punpckldq(temp0_2, temp0_2);
00651b1c      st4 = _m_pmaddwd(st4, st2);
00651b1f      uint16_t st5[0x4] = _m_punpckhdq(temp0, temp0[0]);
00651b22      st0 = __pmaddwd_mmxq_memq(st0, data_832ca0);
00651b29      int64_t temp0_8 = _m_punpckhdq(temp0_2, temp0_2);
00651b2c      int64_t st7 = data_832cb8;
00651b33      st1 = _m_pmaddwd(st1, st5);
00651b36      int64_t temp0_10 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00651b3d      st7 = _m_pmaddwd(st7, temp0_8);
00651b40      st2 = __pmaddwd_mmxq_memq(st2, data_832ca8);
00651b47      int64_t temp0_13 = _m_paddd(temp0_10, st4);
00651b4a      st5 = __pmaddwd_mmxq_memq(st5, data_832cc0);
00651b54      int64_t st6 = __pmaddwd_mmxq_memq(temp0_8, data_832cc8);
00651b5b      int64_t temp0_16 = _m_paddd(st1, st7);
00651b5e      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00651b68      st3 = _m_psradi(_m_psubd(temp0_13, temp0_16), 0xc);
00651b6c      int64_t temp0_20 = _m_paddd(temp0_16, temp0_13);
00651b6f      st0 = _m_paddd(st0, st2);
00651b72      st1 = _m_psradi(temp0_20, 0xc);
00651b76      st5 = _m_paddd(st5, st6);
00651b79      st4 = st0;
00651b7c      st0 = _m_paddd(st0, st5);
00651b7f      int64_t temp0_25 = _m_psubd(st4, st5);
00651b82      st0 = _m_psradi(st0, 0xc);
00651b86      st4 = _m_psradi(temp0_25, 0xc);
00651b8a      st1 = _m_packssdw(st1, st0);
00651b8d      st4 = _m_packssdw(st4, st3);
00651b90      st7 = st4;
00651b93      st4 = _m_psrldi(st4, 0x10);
00651b97      st7 = _m_pslldi(st7, 0x10);
00651b9b      *(uint64_t*)arg1 = st1;
00651ba1      st0 = ecx[2];
00651ba5      st1 = ecx[3];
00651ba9      arg1[1] = (st7 | st4);
00651bad      st2 = st0;
00651bb0      st3 = data_832cd0;
00651bb7      uint16_t temp0_32[0x4] = _m_punpcklwd(st0, st1);
00651bbd      st0 = _m_punpckldq(temp0_32, temp0_32[0]);
00651bc0      st4 = data_832cd8;
00651bc7      int64_t temp0_34 = __punpckhwd_mmxq_mmxd(st2, st1);
00651bca      st3 = _m_pmaddwd(st3, st0);
00651bd0      st1 = data_832cf0;
00651bd7      st2 = _m_punpckldq(temp0_34, temp0_34);
00651bda      st4 = _m_pmaddwd(st4, st2);
00651bdd      st5 = _m_punpckhdq(temp0_32, temp0_32[0]);
00651be0      st0 = __pmaddwd_mmxq_memq(st0, data_832ce0);
00651be7      int64_t temp0_40 = _m_punpckhdq(temp0_34, temp0_34);
00651bea      st7 = data_832cf8;
00651bf1      st1 = _m_pmaddwd(st1, st5);
00651bf4      int64_t temp0_42 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00651bfb      st7 = _m_pmaddwd(st7, temp0_40);
00651bfe      st2 = __pmaddwd_mmxq_memq(st2, data_832ce8);
00651c05      int64_t temp0_45 = _m_paddd(temp0_42, st4);
00651c08      st5 = __pmaddwd_mmxq_memq(st5, data_832d00);
00651c12      st6 = __pmaddwd_mmxq_memq(temp0_40, data_832d08);
00651c19      int64_t temp0_48 = _m_paddd(st1, st7);
00651c1c      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00651c26      st3 = _m_psradi(_m_psubd(temp0_45, temp0_48), 0xc);
00651c2a      int64_t temp0_52 = _m_paddd(temp0_48, temp0_45);
00651c2d      st0 = _m_paddd(st0, st2);
00651c30      st1 = _m_psradi(temp0_52, 0xc);
00651c34      st5 = _m_paddd(st5, st6);
00651c37      st4 = st0;
00651c3a      st0 = _m_paddd(st0, st5);
00651c3d      int64_t temp0_57 = _m_psubd(st4, st5);
00651c40      st0 = _m_psradi(st0, 0xc);
00651c44      st4 = _m_psradi(temp0_57, 0xc);
00651c48      st1 = _m_packssdw(st1, st0);
00651c4b      st4 = _m_packssdw(st4, st3);
00651c4e      st7 = st4;
00651c51      st4 = _m_psrldi(st4, 0x10);
00651c55      st7 = _m_pslldi(st7, 0x10);
00651c59      arg1[2] = st1;
00651c60      st0 = ecx[4];
00651c64      st1 = ecx[5];
00651c68      arg1[3] = (st7 | st4);
00651c6c      st2 = st0;
00651c6f      st3 = data_832d10;
00651c76      uint16_t temp0_64[0x4] = _m_punpcklwd(st0, st1);
00651c7c      st0 = _m_punpckldq(temp0_64, temp0_64[0]);
00651c7f      st4 = (*(uint64_t*)data_832d18);
00651c86      int64_t temp0_66 = __punpckhwd_mmxq_mmxd(st2, st1);
00651c89      st3 = _m_pmaddwd(st3, st0);
00651c8f      st1 = data_832d30;
00651c96      st2 = _m_punpckldq(temp0_66, temp0_66);
00651c99      st4 = _m_pmaddwd(st4, st2);
00651c9c      st5 = _m_punpckhdq(temp0_64, temp0_64[0]);
00651c9f      st0 = __pmaddwd_mmxq_memq(st0, data_832d20);
00651ca6      int64_t temp0_72 = _m_punpckhdq(temp0_66, temp0_66);
00651ca9      st7 = data_832d38;
00651cb0      st1 = _m_pmaddwd(st1, st5);
00651cb3      int64_t temp0_74 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00651cba      st7 = _m_pmaddwd(st7, temp0_72);
00651cbd      st2 = __pmaddwd_mmxq_memq(st2, data_832d28);
00651cc4      int64_t temp0_77 = _m_paddd(temp0_74, st4);
00651cc7      st5 = __pmaddwd_mmxq_memq(st5, data_832d40);
00651cd1      st6 = __pmaddwd_mmxq_memq(temp0_72, data_832d48);
00651cd8      int64_t temp0_80 = _m_paddd(st1, st7);
00651cdb      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00651ce5      st3 = _m_psradi(_m_psubd(temp0_77, temp0_80), 0xc);
00651ce9      int64_t temp0_84 = _m_paddd(temp0_80, temp0_77);
00651cec      st0 = _m_paddd(st0, st2);
00651cef      st1 = _m_psradi(temp0_84, 0xc);
00651cf3      st5 = _m_paddd(st5, st6);
00651cf6      st4 = st0;
00651cf9      st0 = _m_paddd(st0, st5);
00651cfc      int64_t temp0_89 = _m_psubd(st4, st5);
00651cff      st0 = _m_psradi(st0, 0xc);
00651d03      st4 = _m_psradi(temp0_89, 0xc);
00651d07      st1 = _m_packssdw(st1, st0);
00651d0a      st4 = _m_packssdw(st4, st3);
00651d0d      st7 = st4;
00651d10      st4 = _m_psrldi(st4, 0x10);
00651d14      st7 = _m_pslldi(st7, 0x10);
00651d18      arg1[4] = st1;
00651d1f      st0 = ecx[6];
00651d23      st1 = ecx[7];
00651d27      arg1[5] = (st7 | st4);
00651d2b      st2 = st0;
00651d2e      st3 = (*(uint64_t*)data_832d50);
00651d35      uint16_t temp0_96[0x4] = _m_punpcklwd(st0, st1);
00651d3b      st0 = _m_punpckldq(temp0_96, temp0_96[0]);
00651d3e      st4 = data_832d58;
00651d45      int64_t temp0_98 = __punpckhwd_mmxq_mmxd(st2, st1);
00651d48      st3 = _m_pmaddwd(st3, st0);
00651d4e      st1 = (*(uint64_t*)data_832d70);
00651d55      st2 = _m_punpckldq(temp0_98, temp0_98);
00651d58      st4 = _m_pmaddwd(st4, st2);
00651d5b      st5 = _m_punpckhdq(temp0_96, temp0_96[0]);
00651d5e      st0 = __pmaddwd_mmxq_memq(st0, data_832d60);
00651d65      int64_t temp0_104 = _m_punpckhdq(temp0_98, temp0_98);
00651d68      st7 = data_832d78;
00651d6f      st1 = _m_pmaddwd(st1, st5);
00651d72      int64_t temp0_106 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00651d79      st7 = _m_pmaddwd(st7, temp0_104);
00651d7c      st2 = __pmaddwd_mmxq_memq(st2, (*(uint64_t*)data_832d68));
00651d83      int64_t temp0_109 = _m_paddd(temp0_106, st4);
00651d86      st5 = __pmaddwd_mmxq_memq(st5, data_832d80);
00651d90      st6 = __pmaddwd_mmxq_memq(temp0_104, data_832d88);
00651d97      int64_t temp0_112 = _m_paddd(st1, st7);
00651d9a      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00651da4      st3 = _m_psradi(_m_psubd(temp0_109, temp0_112), 0xc);
00651da8      int64_t temp0_116 = _m_paddd(temp0_112, temp0_109);
00651dab      st0 = _m_paddd(st0, st2);
00651dae      st1 = _m_psradi(temp0_116, 0xc);
00651db2      st5 = _m_paddd(st5, st6);
00651db5      st4 = st0;
00651db8      st0 = _m_paddd(st0, st5);
00651dbb      int64_t temp0_121 = _m_psubd(st4, st5);
00651dbe      st0 = _m_psradi(st0, 0xc);
00651dc2      st4 = _m_psradi(temp0_121, 0xc);
00651dc6      st1 = _m_packssdw(st1, st0);
00651dc9      st4 = _m_packssdw(st4, st3);
00651dcc      st7 = st4;
00651dcf      st4 = _m_psrldi(st4, 0x10);
00651dd3      st7 = _m_pslldi(st7, 0x10);
00651dd7      arg1[6] = st1;
00651dde      st0 = ecx[8];
00651de2      st1 = ecx[9];
00651de6      arg1[7] = (st7 | st4);
00651dea      st2 = st0;
00651ded      st3 = data_832c90;
00651df4      uint16_t temp0_128[0x4] = _m_punpcklwd(st0, st1);
00651dfa      st0 = _m_punpckldq(temp0_128, temp0_128[0]);
00651dfd      st4 = data_832c98;
00651e04      int64_t temp0_130 = __punpckhwd_mmxq_mmxd(st2, st1);
00651e07      st3 = _m_pmaddwd(st3, st0);
00651e0d      st1 = data_832cb0;
00651e14      st2 = _m_punpckldq(temp0_130, temp0_130);
00651e17      st4 = _m_pmaddwd(st4, st2);
00651e1a      st5 = _m_punpckhdq(temp0_128, temp0_128[0]);
00651e1d      st0 = __pmaddwd_mmxq_memq(st0, data_832ca0);
00651e24      int64_t temp0_136 = _m_punpckhdq(temp0_130, temp0_130);
00651e27      st7 = data_832cb8;
00651e2e      st1 = _m_pmaddwd(st1, st5);
00651e31      int64_t temp0_138 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00651e38      st7 = _m_pmaddwd(st7, temp0_136);
00651e3b      st2 = __pmaddwd_mmxq_memq(st2, data_832ca8);
00651e42      int64_t temp0_141 = _m_paddd(temp0_138, st4);
00651e45      st5 = __pmaddwd_mmxq_memq(st5, data_832cc0);
00651e4f      st6 = __pmaddwd_mmxq_memq(temp0_136, data_832cc8);
00651e56      int64_t temp0_144 = _m_paddd(st1, st7);
00651e59      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00651e63      st3 = _m_psradi(_m_psubd(temp0_141, temp0_144), 0xc);
00651e67      int64_t temp0_148 = _m_paddd(temp0_144, temp0_141);
00651e6a      st0 = _m_paddd(st0, st2);
00651e6d      st1 = _m_psradi(temp0_148, 0xc);
00651e71      st5 = _m_paddd(st5, st6);
00651e74      st4 = st0;
00651e77      st0 = _m_paddd(st0, st5);
00651e7a      int64_t temp0_153 = _m_psubd(st4, st5);
00651e7d      st0 = _m_psradi(st0, 0xc);
00651e81      st4 = _m_psradi(temp0_153, 0xc);
00651e85      st1 = _m_packssdw(st1, st0);
00651e88      st4 = _m_packssdw(st4, st3);
00651e8b      st7 = st4;
00651e8e      st4 = _m_psrldi(st4, 0x10);
00651e92      st7 = _m_pslldi(st7, 0x10);
00651e96      arg1[8] = st1;
00651e9d      st0 = ecx[0xa];
00651ea1      st1 = ecx[0xb];
00651ea5      arg1[9] = (st7 | st4);
00651ea9      st2 = st0;
00651eac      st3 = (*(uint64_t*)data_832d50);
00651eb3      uint16_t temp0_160[0x4] = _m_punpcklwd(st0, st1);
00651eb9      st0 = _m_punpckldq(temp0_160, temp0_160[0]);
00651ebc      st4 = data_832d58;
00651ec3      int64_t temp0_162 = __punpckhwd_mmxq_mmxd(st2, st1);
00651ec6      st3 = _m_pmaddwd(st3, st0);
00651ecc      st1 = (*(uint64_t*)data_832d70);
00651ed3      st2 = _m_punpckldq(temp0_162, temp0_162);
00651ed6      st4 = _m_pmaddwd(st4, st2);
00651ed9      st5 = _m_punpckhdq(temp0_160, temp0_160[0]);
00651edc      st0 = __pmaddwd_mmxq_memq(st0, data_832d60);
00651ee3      int64_t temp0_168 = _m_punpckhdq(temp0_162, temp0_162);
00651ee6      st7 = data_832d78;
00651eed      st1 = _m_pmaddwd(st1, st5);
00651ef0      int64_t temp0_170 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00651ef7      st7 = _m_pmaddwd(st7, temp0_168);
00651efa      st2 = __pmaddwd_mmxq_memq(st2, (*(uint64_t*)data_832d68));
00651f01      int64_t temp0_173 = _m_paddd(temp0_170, st4);
00651f04      st5 = __pmaddwd_mmxq_memq(st5, data_832d80);
00651f0e      st6 = __pmaddwd_mmxq_memq(temp0_168, data_832d88);
00651f15      int64_t temp0_176 = _m_paddd(st1, st7);
00651f18      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00651f22      st3 = _m_psradi(_m_psubd(temp0_173, temp0_176), 0xc);
00651f26      int64_t temp0_180 = _m_paddd(temp0_176, temp0_173);
00651f29      st0 = _m_paddd(st0, st2);
00651f2c      st1 = _m_psradi(temp0_180, 0xc);
00651f30      st5 = _m_paddd(st5, st6);
00651f33      st4 = st0;
00651f36      st0 = _m_paddd(st0, st5);
00651f39      int64_t temp0_185 = _m_psubd(st4, st5);
00651f3c      st0 = _m_psradi(st0, 0xc);
00651f40      st4 = _m_psradi(temp0_185, 0xc);
00651f44      st1 = _m_packssdw(st1, st0);
00651f47      st4 = _m_packssdw(st4, st3);
00651f4a      st7 = st4;
00651f4d      st4 = _m_psrldi(st4, 0x10);
00651f51      st7 = _m_pslldi(st7, 0x10);
00651f55      arg1[0xa] = st1;
00651f5c      st0 = ecx[0xc];
00651f60      st1 = ecx[0xd];
00651f64      arg1[0xb] = (st7 | st4);
00651f68      st2 = st0;
00651f6b      st3 = data_832d10;
00651f72      uint16_t temp0_192[0x4] = _m_punpcklwd(st0, st1);
00651f78      st0 = _m_punpckldq(temp0_192, temp0_192[0]);
00651f7b      st4 = (*(uint64_t*)data_832d18);
00651f82      int64_t temp0_194 = __punpckhwd_mmxq_mmxd(st2, st1);
00651f85      st3 = _m_pmaddwd(st3, st0);
00651f8b      st1 = data_832d30;
00651f92      st2 = _m_punpckldq(temp0_194, temp0_194);
00651f95      st4 = _m_pmaddwd(st4, st2);
00651f98      st5 = _m_punpckhdq(temp0_192, temp0_192[0]);
00651f9b      st0 = __pmaddwd_mmxq_memq(st0, data_832d20);
00651fa2      int64_t temp0_200 = _m_punpckhdq(temp0_194, temp0_194);
00651fa5      st7 = data_832d38;
00651fac      st1 = _m_pmaddwd(st1, st5);
00651faf      int64_t temp0_202 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00651fb6      st7 = _m_pmaddwd(st7, temp0_200);
00651fb9      st2 = __pmaddwd_mmxq_memq(st2, data_832d28);
00651fc0      int64_t temp0_205 = _m_paddd(temp0_202, st4);
00651fc3      st5 = __pmaddwd_mmxq_memq(st5, data_832d40);
00651fcd      st6 = __pmaddwd_mmxq_memq(temp0_200, data_832d48);
00651fd4      int64_t temp0_208 = _m_paddd(st1, st7);
00651fd7      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00651fe1      st3 = _m_psradi(_m_psubd(temp0_205, temp0_208), 0xc);
00651fe5      int64_t temp0_212 = _m_paddd(temp0_208, temp0_205);
00651fe8      st0 = _m_paddd(st0, st2);
00651feb      st1 = _m_psradi(temp0_212, 0xc);
00651fef      st5 = _m_paddd(st5, st6);
00651ff2      st4 = st0;
00651ff5      st0 = _m_paddd(st0, st5);
00651ff8      int64_t temp0_217 = _m_psubd(st4, st5);
00651ffb      st0 = _m_psradi(st0, 0xc);
00651fff      st4 = _m_psradi(temp0_217, 0xc);
00652003      st1 = _m_packssdw(st1, st0);
00652006      st4 = _m_packssdw(st4, st3);
00652009      st7 = st4;
0065200c      st4 = _m_psrldi(st4, 0x10);
00652010      st7 = _m_pslldi(st7, 0x10);
00652014      arg1[0xc] = st1;
0065201b      st0 = ecx[0xe];
0065201f      st1 = ecx[0xf];
00652023      arg1[0xd] = (st7 | st4);
00652027      st2 = st0;
0065202a      st3 = data_832cd0;
00652031      uint16_t temp0_224[0x4] = _m_punpcklwd(st0, st1);
00652037      st0 = _m_punpckldq(temp0_224, temp0_224[0]);
0065203a      st4 = data_832cd8;
00652041      int64_t temp0_226 = __punpckhwd_mmxq_mmxd(st2, st1);
00652044      st3 = _m_pmaddwd(st3, st0);
0065204a      st1 = data_832cf0;
00652051      st2 = _m_punpckldq(temp0_226, temp0_226);
00652054      st4 = _m_pmaddwd(st4, st2);
00652057      st5 = _m_punpckhdq(temp0_224, temp0_224[0]);
0065205a      st0 = __pmaddwd_mmxq_memq(st0, data_832ce0);
00652061      int64_t temp0_232 = _m_punpckhdq(temp0_226, temp0_226);
00652064      st7 = data_832cf8;
0065206b      st1 = _m_pmaddwd(st1, st5);
0065206e      int64_t temp0_234 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00652075      st7 = _m_pmaddwd(st7, temp0_232);
00652078      st2 = __pmaddwd_mmxq_memq(st2, data_832ce8);
0065207f      int64_t temp0_237 = _m_paddd(temp0_234, st4);
00652082      st5 = __pmaddwd_mmxq_memq(st5, data_832d00);
0065208c      st6 = __pmaddwd_mmxq_memq(temp0_232, data_832d08);
00652093      int64_t temp0_240 = _m_paddd(st1, st7);
00652096      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
006520a0      st3 = _m_psradi(_m_psubd(temp0_237, temp0_240), 0xc);
006520a4      int64_t temp0_244 = _m_paddd(temp0_240, temp0_237);
006520a7      st0 = _m_paddd(st0, st2);
006520aa      st1 = _m_psradi(temp0_244, 0xc);
006520ae      st5 = _m_paddd(st5, st6);
006520b1      st4 = st0;
006520b4      st0 = _m_paddd(st0, st5);
006520b7      int64_t temp0_249 = _m_psubd(st4, st5);
006520ba      st0 = _m_psradi(st0, 0xc);
006520be      st4 = _m_psradi(temp0_249, 0xc);
006520c2      st1 = _m_packssdw(st1, st0);
006520c5      st4 = _m_packssdw(st4, st3);
006520c8      st7 = st4;
006520cb      st4 = _m_psrldi(st4, 0x10);
006520cf      st7 = _m_pslldi(st7, 0x10);
006520d3      arg1[0xe] = st1;
006520da      st0 = arg1[0xa];
006520de      arg1[0xf] = (st7 | st4);
006520e2      st1 = (*(uint64_t*)data_832c60);
006520e9      st2 = st0;
006520ec      st3 = arg1[6];
006520f0      st0 = _m_pmulhw(st0, st1);
006520f3      st4 = arg1[0xe];
006520f7      st1 = _m_pmulhw(st1, st3);
006520fa      st5 = (*(uint64_t*)data_832c40);
00652101      st6 = st4;
00652104      st4 = _m_pmulhw(st4, st5);
00652107      st0 = _m_paddsw(st0, st2);
0065210a      st5 = __pmulhw_mmxq_memq(st5, arg1[2]);
0065210e      int64_t temp0_261 = _m_paddsw(st1, st3);
00652111      st7 = arg1[0xc];
00652115      st0 = _m_paddsw(st0, st3);
00652118      st3 = data_832c50[0];
0065211f      int64_t temp0_263 = _m_psubsw(st2, temp0_261);
00652122      st7 = _m_pmulhw(st7, st3);
00652125      st1 = st0;
00652128      st3 = __pmulhw_mmxq_memq(st3, arg1[4]);
0065212c      st5 = _m_psubsw(st5, st6);
0065212f      int64_t temp0_267 = __paddsw_mmxq_memq(st4, arg1[2]);
00652136      st0 = __paddsw_mmxq_memq(_m_paddsw(st0, temp0_267), (*(uint64_t*)data_832be0));
0065213d      int64_t temp0_270 = _m_psubsw(temp0_267, st1);
00652140      int64_t temp0_271 = __paddsw_mmxq_memq(st7, arg1[4]);
00652144      st6 = st5;
00652147      int64_t temp0_272 = __psubsw_mmxq_memq(st3, arg1[0xc]);
0065214e      st5 = __paddsw_mmxq_memq(_m_psubsw(st5, temp0_263), (*(uint64_t*)data_832be0));
00652155      int64_t temp0_275 = _m_paddsw(st6, temp0_263);
00652158      arg1[0xe] = st0;
0065215f      st2 = (*(uint64_t*)data_832c70);
00652166      int64_t temp0_276 = _m_paddsw(temp0_270, st5);
00652169      st0 = (*(uint64_t*)data_832c70);
00652170      st2 = _m_pmulhw(st2, temp0_276);
00652173      arg1[6] = temp0_275;
00652177      int64_t temp0_278 = _m_psubsw(temp0_270, st5);
0065217a      st6 = *(uint64_t*)arg1;
0065217d      st0 = _m_pmulhw(st0, temp0_278);
00652180      st5 = arg1[8];
00652187      st4 = (_m_paddsw(temp0_276, st2) | (*(uint64_t*)data_832be0));
0065218e      st5 = _m_paddsw(st5, st6);
00652191      int64_t temp0_282 = __psubsw_mmxq_memq(st6, arg1[8]);
00652198      st0 = (_m_paddsw(st0, temp0_278) | (*(uint64_t*)data_832be0));
0065219f      st2 = st5;
006521a8      st5 = __paddsw_mmxq_memq(_m_paddsw(st5, temp0_271), (*(uint64_t*)data_832c00));
006521af      int64_t temp0_286 = _m_psubsw(st2, temp0_271);
006521b2      st7 = arg1[0xe];
006521b9      int64_t temp0_288 = __paddsw_mmxq_memq(_m_paddsw(temp0_282, temp0_272), (*(uint64_t*)data_832c00));
006521c3      st7 = _m_psrawi(_m_paddsw(st7, st5), 5);
006521c7      int64_t temp0_291 = _m_psubsw(temp0_282, temp0_272);
006521ca      int64_t temp0_292 = __paddsw_mmxq_memq(temp0_286, (*(uint64_t*)data_832c10));
006521d4      int64_t temp0_293 = __paddsw_mmxq_memq(temp0_291, (*(uint64_t*)data_832c10));
006521db      int64_t temp0_294 = _m_paddsw(temp0_288, st4);
006521de      int64_t temp0_295 = __paddsw_mmxq_memq(st7, (*(uint64_t*)data_832c20));
006521ef      *(uint64_t*)arg1 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_295, temp0_295), (*(uint32_t*)data_832c30));
006521f9      int64_t temp0_299 = __paddsw_mmxq_memq(_m_psrawi(temp0_294, 5), (*(uint64_t*)data_832c20));
00652203      st6 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_299, temp0_299), (*(uint32_t*)data_832c30));
0065220a      int64_t temp0_302 = _m_paddsw(temp0_293, st0);
0065220d      arg1[2] = st6;
00652211      st1 = _m_psrawi(temp0_302, 5);
00652215      st6 = arg1[6];
00652219      int64_t temp0_304 = _m_psubsw(temp0_293, st0);
0065221c      int64_t temp0_305 = _m_paddsw(st6, temp0_292);
0065221f      int64_t temp0_306 = __psubsw_mmxq_memq(temp0_292, arg1[6]);
00652223      int64_t temp0_307 = __paddsw_mmxq_memq(st1, (*(uint64_t*)data_832c20));
0065222d      st1 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_307, temp0_307), (*(uint32_t*)data_832c30));
00652234      st7 = _m_psrawi(temp0_304, 5);
00652238      arg1[4] = st1;
0065223c      st6 = _m_psrawi(temp0_305, 5);
00652240      st5 = __psubsw_mmxq_memq(st5, arg1[0xe]);
00652244      int64_t temp0_313 = __paddsw_mmxq_memq(st6, (*(uint64_t*)data_832c20));
0065224e      st6 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_313, temp0_313), (*(uint32_t*)data_832c30));
00652255      st2 = _m_psrawi(temp0_306, 5);
00652259      arg1[6] = st6;
0065225d      int64_t temp0_317 = __paddsw_mmxq_memq(st2, (*(uint64_t*)data_832c20));
00652267      st2 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_317, temp0_317), (*(uint32_t*)data_832c30));
0065226e      int64_t temp0_320 = _m_psubsw(temp0_288, st4);
00652271      arg1[8] = st2;
00652275      int64_t temp0_321 = __paddsw_mmxq_memq(st7, (*(uint64_t*)data_832c20));
0065227f      st7 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_321, temp0_321), (*(uint32_t*)data_832c30));
00652286      st3 = _m_psrawi(temp0_320, 5);
0065228a      arg1[0xa] = st7;
0065228e      int64_t temp0_325 = __paddsw_mmxq_memq(st3, (*(uint64_t*)data_832c20));
00652298      st3 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_325, temp0_325), (*(uint32_t*)data_832c30));
0065229f      st5 = _m_psrawi(st5, 5);
006522a3      arg1[0xc] = st3;
006522a7      st5 = __paddsw_mmxq_memq(st5, (*(uint64_t*)data_832c20));
006522b8      arg1[0xe] = __punpcklbw_mmxq_memd(_m_packuswb(st5, st5), (*(uint32_t*)data_832c30));
006522bc      st0 = arg1[0xb];
006522c0      st1 = (*(uint64_t*)data_832c60);
006522c7      st2 = st0;
006522ca      st3 = arg1[7];
006522ce      st0 = _m_pmulhw(st0, st1);
006522d1      st4 = arg1[0xf];
006522d5      st1 = _m_pmulhw(st1, st3);
006522d8      st5 = (*(uint64_t*)data_832c40);
006522df      st6 = st4;
006522e2      st4 = _m_pmulhw(st4, st5);
006522e5      st0 = _m_paddsw(st0, st2);
006522e8      st5 = __pmulhw_mmxq_memq(st5, arg1[3]);
006522ec      int64_t temp0_337 = _m_paddsw(st1, st3);
006522ef      st7 = arg1[0xd];
006522f3      st0 = _m_paddsw(st0, st3);
006522f6      st3 = data_832c50[0];
006522fd      int64_t temp0_339 = _m_psubsw(st2, temp0_337);
00652300      st7 = _m_pmulhw(st7, st3);
00652303      st1 = st0;
00652306      st3 = __pmulhw_mmxq_memq(st3, arg1[5]);
0065230a      st5 = _m_psubsw(st5, st6);
0065230d      int64_t temp0_343 = __paddsw_mmxq_memq(st4, arg1[3]);
00652314      st0 = __paddsw_mmxq_memq(_m_paddsw(st0, temp0_343), (*(uint64_t*)data_832be0));
0065231b      int64_t temp0_346 = _m_psubsw(temp0_343, st1);
0065231e      int64_t temp0_347 = __paddsw_mmxq_memq(st7, arg1[5]);
00652322      st6 = st5;
00652325      int64_t temp0_348 = __psubsw_mmxq_memq(st3, arg1[0xd]);
0065232c      st5 = __paddsw_mmxq_memq(_m_psubsw(st5, temp0_339), (*(uint64_t*)data_832be0));
00652333      int64_t temp0_351 = _m_paddsw(st6, temp0_339);
00652336      arg1[0xf] = st0;
0065233d      st2 = (*(uint64_t*)data_832c70);
00652344      int64_t temp0_352 = _m_paddsw(temp0_346, st5);
00652347      st0 = (*(uint64_t*)data_832c70);
0065234e      st2 = _m_pmulhw(st2, temp0_352);
00652351      arg1[7] = temp0_351;
00652355      int64_t temp0_354 = _m_psubsw(temp0_346, st5);
00652358      st6 = arg1[1];
0065235c      st0 = _m_pmulhw(st0, temp0_354);
0065235f      st5 = arg1[9];
00652366      st4 = (_m_paddsw(temp0_352, st2) | (*(uint64_t*)data_832be0));
0065236d      st5 = _m_paddsw(st5, st6);
00652370      int64_t temp0_358 = __psubsw_mmxq_memq(st6, arg1[9]);
00652377      st0 = (_m_paddsw(st0, temp0_354) | (*(uint64_t*)data_832be0));
0065237e      st2 = st5;
00652387      st5 = __paddsw_mmxq_memq(_m_paddsw(st5, temp0_347), (*(uint64_t*)data_832c00));
0065238e      int64_t temp0_362 = _m_psubsw(st2, temp0_347);
00652391      st7 = arg1[0xf];
00652398      int64_t temp0_364 = __paddsw_mmxq_memq(_m_paddsw(temp0_358, temp0_348), (*(uint64_t*)data_832c00));
006523a2      st7 = _m_psrawi(_m_paddsw(st7, st5), 5);
006523a6      int64_t temp0_367 = _m_psubsw(temp0_358, temp0_348);
006523a9      int64_t temp0_368 = __paddsw_mmxq_memq(temp0_362, (*(uint64_t*)data_832c10));
006523b3      int64_t temp0_369 = __paddsw_mmxq_memq(temp0_367, (*(uint64_t*)data_832c10));
006523ba      int64_t temp0_370 = _m_paddsw(temp0_364, st4);
006523bd      int64_t temp0_371 = __paddsw_mmxq_memq(st7, (*(uint64_t*)data_832c20));
006523ce      arg1[1] = __punpcklbw_mmxq_memd(_m_packuswb(temp0_371, temp0_371), (*(uint32_t*)data_832c30));
006523d9      int64_t temp0_375 = __paddsw_mmxq_memq(_m_psrawi(temp0_370, 5), (*(uint64_t*)data_832c20));
006523e3      st6 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_375, temp0_375), (*(uint32_t*)data_832c30));
006523ea      int64_t temp0_378 = _m_paddsw(temp0_369, st0);
006523ed      arg1[3] = st6;
006523f1      st1 = _m_psrawi(temp0_378, 5);
006523f5      st6 = arg1[7];
006523f9      int64_t temp0_380 = _m_psubsw(temp0_369, st0);
006523fc      int64_t temp0_381 = _m_paddsw(st6, temp0_368);
006523ff      int64_t temp0_382 = __psubsw_mmxq_memq(temp0_368, arg1[7]);
00652403      int64_t temp0_383 = __paddsw_mmxq_memq(st1, (*(uint64_t*)data_832c20));
0065240d      st1 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_383, temp0_383), (*(uint32_t*)data_832c30));
00652414      st7 = _m_psrawi(temp0_380, 5);
00652418      arg1[5] = st1;
0065241c      st6 = _m_psrawi(temp0_381, 5);
00652420      st5 = __psubsw_mmxq_memq(st5, arg1[0xf]);
00652424      int64_t temp0_389 = __paddsw_mmxq_memq(st6, (*(uint64_t*)data_832c20));
0065242e      st6 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_389, temp0_389), (*(uint32_t*)data_832c30));
00652435      st2 = _m_psrawi(temp0_382, 5);
00652439      arg1[7] = st6;
0065243d      int64_t temp0_393 = __paddsw_mmxq_memq(st2, (*(uint64_t*)data_832c20));
00652447      st2 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_393, temp0_393), (*(uint32_t*)data_832c30));
0065244e      int64_t temp0_396 = _m_psubsw(temp0_364, st4);
00652451      arg1[9] = st2;
00652455      int64_t temp0_397 = __paddsw_mmxq_memq(st7, (*(uint64_t*)data_832c20));
0065245f      st7 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_397, temp0_397), (*(uint32_t*)data_832c30));
00652466      st3 = _m_psrawi(temp0_396, 5);
0065246a      arg1[0xb] = st7;
0065246e      int64_t temp0_401 = __paddsw_mmxq_memq(st3, (*(uint64_t*)data_832c20));
00652478      st3 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_401, temp0_401), (*(uint32_t*)data_832c30));
0065247f      st5 = _m_psrawi(st5, 5);
00652483      arg1[0xd] = st3;
00652487      st5 = __paddsw_mmxq_memq(st5, (*(uint64_t*)data_832c20));
00652498      arg1[0xf] = __punpcklbw_mmxq_memd(_m_packuswb(st5, st5), (*(uint32_t*)data_832c30));
00651ae0  }

0065249d                                                                                         8d 49 00                               .I.

006524a0  int32_t _own_dct_2d_16s_8x8_inv_a6(int64_t* arg1)

006524a0  {
006524a0      int64_t* ecx = arg1;
006524a8      uint16_t st0[0x4] = *(uint64_t*)ecx;
006524ab      uint16_t st1[0x4] = ecx[1];
006524b2      int64_t st3 = data_832d90;
006524b9      uint16_t temp0[0x4] = _mm_shuffle_pi16(st0, 0x88);
006524bd      int64_t st4 = data_832d98;
006524c7      st3 = _m_pmaddwd(st3, temp0);
006524ca      int64_t st6 = data_832db0;
006524d1      uint16_t temp0_2[0x4] = _mm_shuffle_pi16(st1, 0x88);
006524d5      st4 = _m_pmaddwd(st4, temp0_2);
006524d8      int64_t st7 = data_832db8;
006524df      uint16_t temp0_4[0x4] = _mm_shuffle_pi16(st0, 0xdd);
006524e3      st6 = _m_pmaddwd(st6, temp0_4);
006524e6      uint16_t temp0_6[0x4] = _mm_shuffle_pi16(st1, 0xdd);
006524ea      st7 = _m_pmaddwd(st7, temp0_6);
006524ed      int64_t temp0_8 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
006524f4      st0 = __pmaddwd_mmxq_memq(temp0, data_832da0);
006524fb      int64_t temp0_10 = _m_paddd(temp0_8, st4);
006524fe      st1 = __pmaddwd_mmxq_memq(temp0_2, data_832da8);
00652508      uint16_t st2[0x4] = __pmaddwd_mmxq_memq(temp0_4, data_832dc0);
0065250f      int64_t temp0_13 = _m_paddd(st6, st7);
00652512      uint16_t st5[0x4] = __pmaddwd_mmxq_memq(temp0_6, data_832dc8);
00652519      int64_t temp0_15 = _m_paddd(temp0_10, temp0_13);
0065251c      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00652523      st3 = _m_psradi(temp0_15, 0xc);
00652527      st0 = _m_paddd(st0, st1);
0065252a      int64_t temp0_19 = _m_psubd(temp0_10, temp0_13);
0065252d      st7 = st0;
00652530      st2 = _m_paddd(st2, st5);
00652533      st0 = _m_paddd(st0, st2);
00652536      st4 = _m_psradi(temp0_19, 0xc);
0065253a      int64_t temp0_23 = _m_psubd(st7, st2);
0065253d      st0 = _m_psradi(st0, 0xc);
00652541      st7 = _m_psradi(temp0_23, 0xc);
00652545      st3 = _m_packssdw(st3, st0);
00652548      st7 = _m_packssdw(st7, st4);
0065254b      *(uint64_t*)arg1 = st3;
0065254e      st7 = _mm_shuffle_pi16(st7, 0xb1);
00652552      st0 = ecx[2];
00652556      st1 = ecx[3];
0065255a      arg1[1] = st7;
00652561      st3 = data_832dd0;
00652568      uint16_t temp0_29[0x4] = _mm_shuffle_pi16(st0, 0x88);
0065256c      st4 = data_832dd8;
00652576      st3 = _m_pmaddwd(st3, temp0_29);
00652579      st6 = (*(uint64_t*)data_832df0);
00652580      uint16_t temp0_31[0x4] = _mm_shuffle_pi16(st1, 0x88);
00652584      st4 = _m_pmaddwd(st4, temp0_31);
00652587      st7 = data_832df8;
0065258e      uint16_t temp0_33[0x4] = _mm_shuffle_pi16(st0, 0xdd);
00652592      st6 = _m_pmaddwd(st6, temp0_33);
00652595      uint16_t temp0_35[0x4] = _mm_shuffle_pi16(st1, 0xdd);
00652599      st7 = _m_pmaddwd(st7, temp0_35);
0065259c      int64_t temp0_37 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
006525a3      st0 = __pmaddwd_mmxq_memq(temp0_29, data_832de0);
006525aa      int64_t temp0_39 = _m_paddd(temp0_37, st4);
006525ad      st1 = __pmaddwd_mmxq_memq(temp0_31, data_832de8);
006525b7      st2 = __pmaddwd_mmxq_memq(temp0_33, data_832e00);
006525be      int64_t temp0_42 = _m_paddd(st6, st7);
006525c1      st5 = __pmaddwd_mmxq_memq(temp0_35, data_832e08);
006525c8      int64_t temp0_44 = _m_paddd(temp0_39, temp0_42);
006525cb      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
006525d2      st3 = _m_psradi(temp0_44, 0xc);
006525d6      st0 = _m_paddd(st0, st1);
006525d9      int64_t temp0_48 = _m_psubd(temp0_39, temp0_42);
006525dc      st7 = st0;
006525df      st2 = _m_paddd(st2, st5);
006525e2      st0 = _m_paddd(st0, st2);
006525e5      st4 = _m_psradi(temp0_48, 0xc);
006525e9      int64_t temp0_52 = _m_psubd(st7, st2);
006525ec      st0 = _m_psradi(st0, 0xc);
006525f0      st7 = _m_psradi(temp0_52, 0xc);
006525f4      st3 = _m_packssdw(st3, st0);
006525f7      st7 = _m_packssdw(st7, st4);
006525fa      arg1[2] = st3;
006525fe      st7 = _mm_shuffle_pi16(st7, 0xb1);
00652602      st0 = ecx[4];
00652606      st1 = ecx[5];
0065260a      arg1[3] = st7;
00652611      st3 = data_832e10;
00652618      uint16_t temp0_58[0x4] = _mm_shuffle_pi16(st0, 0x88);
0065261c      st4 = data_832e18;
00652626      st3 = _m_pmaddwd(st3, temp0_58);
00652629      st6 = data_832e30;
00652630      uint16_t temp0_60[0x4] = _mm_shuffle_pi16(st1, 0x88);
00652634      st4 = _m_pmaddwd(st4, temp0_60);
00652637      st7 = data_832e38;
0065263e      uint16_t temp0_62[0x4] = _mm_shuffle_pi16(st0, 0xdd);
00652642      st6 = _m_pmaddwd(st6, temp0_62);
00652645      uint16_t temp0_64[0x4] = _mm_shuffle_pi16(st1, 0xdd);
00652649      st7 = _m_pmaddwd(st7, temp0_64);
0065264c      int64_t temp0_66 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00652653      st0 = __pmaddwd_mmxq_memq(temp0_58, data_832e20);
0065265a      int64_t temp0_68 = _m_paddd(temp0_66, st4);
0065265d      st1 = __pmaddwd_mmxq_memq(temp0_60, data_832e28);
00652667      st2 = __pmaddwd_mmxq_memq(temp0_62, data_832e40);
0065266e      int64_t temp0_71 = _m_paddd(st6, st7);
00652671      st5 = __pmaddwd_mmxq_memq(temp0_64, data_832e48);
00652678      int64_t temp0_73 = _m_paddd(temp0_68, temp0_71);
0065267b      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00652682      st3 = _m_psradi(temp0_73, 0xc);
00652686      st0 = _m_paddd(st0, st1);
00652689      int64_t temp0_77 = _m_psubd(temp0_68, temp0_71);
0065268c      st7 = st0;
0065268f      st2 = _m_paddd(st2, st5);
00652692      st0 = _m_paddd(st0, st2);
00652695      st4 = _m_psradi(temp0_77, 0xc);
00652699      int64_t temp0_81 = _m_psubd(st7, st2);
0065269c      st0 = _m_psradi(st0, 0xc);
006526a0      st7 = _m_psradi(temp0_81, 0xc);
006526a4      st3 = _m_packssdw(st3, st0);
006526a7      st7 = _m_packssdw(st7, st4);
006526aa      arg1[4] = st3;
006526ae      st7 = _mm_shuffle_pi16(st7, 0xb1);
006526b2      st0 = ecx[6];
006526b6      st1 = ecx[7];
006526ba      arg1[5] = st7;
006526c1      st3 = (*(uint64_t*)data_832e50);
006526c8      uint16_t temp0_87[0x4] = _mm_shuffle_pi16(st0, 0x88);
006526cc      st4 = data_832e58;
006526d6      st3 = _m_pmaddwd(st3, temp0_87);
006526d9      st6 = (*(uint64_t*)data_832e70);
006526e0      uint16_t temp0_89[0x4] = _mm_shuffle_pi16(st1, 0x88);
006526e4      st4 = _m_pmaddwd(st4, temp0_89);
006526e7      st7 = data_832e78;
006526ee      uint16_t temp0_91[0x4] = _mm_shuffle_pi16(st0, 0xdd);
006526f2      st6 = _m_pmaddwd(st6, temp0_91);
006526f5      uint16_t temp0_93[0x4] = _mm_shuffle_pi16(st1, 0xdd);
006526f9      st7 = _m_pmaddwd(st7, temp0_93);
006526fc      int64_t temp0_95 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00652703      st0 = __pmaddwd_mmxq_memq(temp0_87, data_832e60);
0065270a      int64_t temp0_97 = _m_paddd(temp0_95, st4);
0065270d      st1 = __pmaddwd_mmxq_memq(temp0_89, data_832e68);
00652717      st2 = __pmaddwd_mmxq_memq(temp0_91, data_832e80);
0065271e      int64_t temp0_100 = _m_paddd(st6, st7);
00652721      st5 = __pmaddwd_mmxq_memq(temp0_93, data_832e88);
00652728      int64_t temp0_102 = _m_paddd(temp0_97, temp0_100);
0065272b      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00652732      st3 = _m_psradi(temp0_102, 0xc);
00652736      st0 = _m_paddd(st0, st1);
00652739      int64_t temp0_106 = _m_psubd(temp0_97, temp0_100);
0065273c      st7 = st0;
0065273f      st2 = _m_paddd(st2, st5);
00652742      st0 = _m_paddd(st0, st2);
00652745      st4 = _m_psradi(temp0_106, 0xc);
00652749      int64_t temp0_110 = _m_psubd(st7, st2);
0065274c      st0 = _m_psradi(st0, 0xc);
00652750      st7 = _m_psradi(temp0_110, 0xc);
00652754      st3 = _m_packssdw(st3, st0);
00652757      st7 = _m_packssdw(st7, st4);
0065275a      arg1[6] = st3;
0065275e      st7 = _mm_shuffle_pi16(st7, 0xb1);
00652762      st0 = ecx[8];
00652766      st1 = ecx[9];
0065276a      arg1[7] = st7;
00652771      st3 = data_832d90;
00652778      uint16_t temp0_116[0x4] = _mm_shuffle_pi16(st0, 0x88);
0065277c      st4 = data_832d98;
00652786      st3 = _m_pmaddwd(st3, temp0_116);
00652789      st6 = data_832db0;
00652790      uint16_t temp0_118[0x4] = _mm_shuffle_pi16(st1, 0x88);
00652794      st4 = _m_pmaddwd(st4, temp0_118);
00652797      st7 = data_832db8;
0065279e      uint16_t temp0_120[0x4] = _mm_shuffle_pi16(st0, 0xdd);
006527a2      st6 = _m_pmaddwd(st6, temp0_120);
006527a5      uint16_t temp0_122[0x4] = _mm_shuffle_pi16(st1, 0xdd);
006527a9      st7 = _m_pmaddwd(st7, temp0_122);
006527ac      int64_t temp0_124 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
006527b3      st0 = __pmaddwd_mmxq_memq(temp0_116, data_832da0);
006527ba      int64_t temp0_126 = _m_paddd(temp0_124, st4);
006527bd      st1 = __pmaddwd_mmxq_memq(temp0_118, data_832da8);
006527c7      st2 = __pmaddwd_mmxq_memq(temp0_120, data_832dc0);
006527ce      int64_t temp0_129 = _m_paddd(st6, st7);
006527d1      st5 = __pmaddwd_mmxq_memq(temp0_122, data_832dc8);
006527d8      int64_t temp0_131 = _m_paddd(temp0_126, temp0_129);
006527db      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
006527e2      st3 = _m_psradi(temp0_131, 0xc);
006527e6      st0 = _m_paddd(st0, st1);
006527e9      int64_t temp0_135 = _m_psubd(temp0_126, temp0_129);
006527ec      st7 = st0;
006527ef      st2 = _m_paddd(st2, st5);
006527f2      st0 = _m_paddd(st0, st2);
006527f5      st4 = _m_psradi(temp0_135, 0xc);
006527f9      int64_t temp0_139 = _m_psubd(st7, st2);
006527fc      st0 = _m_psradi(st0, 0xc);
00652800      st7 = _m_psradi(temp0_139, 0xc);
00652804      st3 = _m_packssdw(st3, st0);
00652807      st7 = _m_packssdw(st7, st4);
0065280a      arg1[8] = st3;
0065280e      st7 = _mm_shuffle_pi16(st7, 0xb1);
00652812      st0 = ecx[0xa];
00652816      st1 = ecx[0xb];
0065281a      arg1[9] = st7;
00652821      st3 = (*(uint64_t*)data_832e50);
00652828      uint16_t temp0_145[0x4] = _mm_shuffle_pi16(st0, 0x88);
0065282c      st4 = data_832e58;
00652836      st3 = _m_pmaddwd(st3, temp0_145);
00652839      st6 = (*(uint64_t*)data_832e70);
00652840      uint16_t temp0_147[0x4] = _mm_shuffle_pi16(st1, 0x88);
00652844      st4 = _m_pmaddwd(st4, temp0_147);
00652847      st7 = data_832e78;
0065284e      uint16_t temp0_149[0x4] = _mm_shuffle_pi16(st0, 0xdd);
00652852      st6 = _m_pmaddwd(st6, temp0_149);
00652855      uint16_t temp0_151[0x4] = _mm_shuffle_pi16(st1, 0xdd);
00652859      st7 = _m_pmaddwd(st7, temp0_151);
0065285c      int64_t temp0_153 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00652863      st0 = __pmaddwd_mmxq_memq(temp0_145, data_832e60);
0065286a      int64_t temp0_155 = _m_paddd(temp0_153, st4);
0065286d      st1 = __pmaddwd_mmxq_memq(temp0_147, data_832e68);
00652877      st2 = __pmaddwd_mmxq_memq(temp0_149, data_832e80);
0065287e      int64_t temp0_158 = _m_paddd(st6, st7);
00652881      st5 = __pmaddwd_mmxq_memq(temp0_151, data_832e88);
00652888      int64_t temp0_160 = _m_paddd(temp0_155, temp0_158);
0065288b      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00652892      st3 = _m_psradi(temp0_160, 0xc);
00652896      st0 = _m_paddd(st0, st1);
00652899      int64_t temp0_164 = _m_psubd(temp0_155, temp0_158);
0065289c      st7 = st0;
0065289f      st2 = _m_paddd(st2, st5);
006528a2      st0 = _m_paddd(st0, st2);
006528a5      st4 = _m_psradi(temp0_164, 0xc);
006528a9      int64_t temp0_168 = _m_psubd(st7, st2);
006528ac      st0 = _m_psradi(st0, 0xc);
006528b0      st7 = _m_psradi(temp0_168, 0xc);
006528b4      st3 = _m_packssdw(st3, st0);
006528b7      st7 = _m_packssdw(st7, st4);
006528ba      arg1[0xa] = st3;
006528be      st7 = _mm_shuffle_pi16(st7, 0xb1);
006528c2      st0 = ecx[0xc];
006528c6      st1 = ecx[0xd];
006528ca      arg1[0xb] = st7;
006528d1      st3 = data_832e10;
006528d8      uint16_t temp0_174[0x4] = _mm_shuffle_pi16(st0, 0x88);
006528dc      st4 = data_832e18;
006528e6      st3 = _m_pmaddwd(st3, temp0_174);
006528e9      st6 = data_832e30;
006528f0      uint16_t temp0_176[0x4] = _mm_shuffle_pi16(st1, 0x88);
006528f4      st4 = _m_pmaddwd(st4, temp0_176);
006528f7      st7 = data_832e38;
006528fe      uint16_t temp0_178[0x4] = _mm_shuffle_pi16(st0, 0xdd);
00652902      st6 = _m_pmaddwd(st6, temp0_178);
00652905      uint16_t temp0_180[0x4] = _mm_shuffle_pi16(st1, 0xdd);
00652909      st7 = _m_pmaddwd(st7, temp0_180);
0065290c      int64_t temp0_182 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
00652913      st0 = __pmaddwd_mmxq_memq(temp0_174, data_832e20);
0065291a      int64_t temp0_184 = _m_paddd(temp0_182, st4);
0065291d      st1 = __pmaddwd_mmxq_memq(temp0_176, data_832e28);
00652927      st2 = __pmaddwd_mmxq_memq(temp0_178, data_832e40);
0065292e      int64_t temp0_187 = _m_paddd(st6, st7);
00652931      st5 = __pmaddwd_mmxq_memq(temp0_180, data_832e48);
00652938      int64_t temp0_189 = _m_paddd(temp0_184, temp0_187);
0065293b      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
00652942      st3 = _m_psradi(temp0_189, 0xc);
00652946      st0 = _m_paddd(st0, st1);
00652949      int64_t temp0_193 = _m_psubd(temp0_184, temp0_187);
0065294c      st7 = st0;
0065294f      st2 = _m_paddd(st2, st5);
00652952      st0 = _m_paddd(st0, st2);
00652955      st4 = _m_psradi(temp0_193, 0xc);
00652959      int64_t temp0_197 = _m_psubd(st7, st2);
0065295c      st0 = _m_psradi(st0, 0xc);
00652960      st7 = _m_psradi(temp0_197, 0xc);
00652964      st3 = _m_packssdw(st3, st0);
00652967      st7 = _m_packssdw(st7, st4);
0065296a      arg1[0xc] = st3;
0065296e      st7 = _mm_shuffle_pi16(st7, 0xb1);
00652972      st0 = ecx[0xe];
00652976      st1 = ecx[0xf];
0065297a      arg1[0xd] = st7;
00652981      st3 = data_832dd0;
00652988      uint16_t temp0_203[0x4] = _mm_shuffle_pi16(st0, 0x88);
0065298c      st4 = data_832dd8;
00652996      st3 = _m_pmaddwd(st3, temp0_203);
00652999      st6 = (*(uint64_t*)data_832df0);
006529a0      uint16_t temp0_205[0x4] = _mm_shuffle_pi16(st1, 0x88);
006529a4      st4 = _m_pmaddwd(st4, temp0_205);
006529a7      st7 = data_832df8;
006529ae      uint16_t temp0_207[0x4] = _mm_shuffle_pi16(st0, 0xdd);
006529b2      st6 = _m_pmaddwd(st6, temp0_207);
006529b5      uint16_t temp0_209[0x4] = _mm_shuffle_pi16(st1, 0xdd);
006529b9      st7 = _m_pmaddwd(st7, temp0_209);
006529bc      int64_t temp0_211 = __paddd_mmxq_memq(st3, (*(uint64_t*)data_832bf0));
006529c3      st0 = __pmaddwd_mmxq_memq(temp0_203, data_832de0);
006529ca      int64_t temp0_213 = _m_paddd(temp0_211, st4);
006529cd      st1 = __pmaddwd_mmxq_memq(temp0_205, data_832de8);
006529d7      st2 = __pmaddwd_mmxq_memq(temp0_207, data_832e00);
006529de      int64_t temp0_216 = _m_paddd(st6, st7);
006529e1      st5 = __pmaddwd_mmxq_memq(temp0_209, data_832e08);
006529e8      int64_t temp0_218 = _m_paddd(temp0_213, temp0_216);
006529eb      st0 = __paddd_mmxq_memq(st0, (*(uint64_t*)data_832bf0));
006529f2      st3 = _m_psradi(temp0_218, 0xc);
006529f6      st0 = _m_paddd(st0, st1);
006529f9      int64_t temp0_222 = _m_psubd(temp0_213, temp0_216);
006529fc      st7 = st0;
006529ff      st2 = _m_paddd(st2, st5);
00652a02      st0 = _m_paddd(st0, st2);
00652a05      st4 = _m_psradi(temp0_222, 0xc);
00652a09      int64_t temp0_226 = _m_psubd(st7, st2);
00652a0c      st0 = _m_psradi(st0, 0xc);
00652a10      st7 = _m_psradi(temp0_226, 0xc);
00652a14      st3 = _m_packssdw(st3, st0);
00652a17      st7 = _m_packssdw(st7, st4);
00652a1a      arg1[0xe] = st3;
00652a1e      st7 = _mm_shuffle_pi16(st7, 0xb1);
00652a22      st0 = arg1[0xa];
00652a26      arg1[0xf] = st7;
00652a2a      st1 = (*(uint64_t*)data_832c60);
00652a31      st2 = st0;
00652a34      st3 = arg1[6];
00652a38      st0 = _m_pmulhw(st0, st1);
00652a3b      st4 = arg1[0xe];
00652a3f      st1 = _m_pmulhw(st1, st3);
00652a42      st5 = (*(uint64_t*)data_832c40);
00652a49      st6 = st4;
00652a4c      st4 = _m_pmulhw(st4, st5);
00652a4f      st0 = _m_paddsw(st0, st2);
00652a52      st5 = __pmulhw_mmxq_memq(st5, arg1[2]);
00652a56      st1 = _m_paddsw(st1, st3);
00652a59      st7 = arg1[0xc];
00652a5d      st0 = _m_paddsw(st0, st3);
00652a60      st3 = data_832c50[0];
00652a67      st2 = _m_psubsw(st2, st1);
00652a6a      st7 = _m_pmulhw(st7, st3);
00652a6d      st1 = st0;
00652a70      st3 = __pmulhw_mmxq_memq(st3, arg1[4]);
00652a74      st5 = _m_psubsw(st5, st6);
00652a77      int64_t temp0_243 = __paddsw_mmxq_memq(st4, arg1[2]);
00652a7e      st0 = __paddsw_mmxq_memq(_m_paddsw(st0, temp0_243), (*(uint64_t*)data_832be0));
00652a85      int64_t temp0_246 = _m_psubsw(temp0_243, st1);
00652a88      int64_t temp0_247 = __paddsw_mmxq_memq(st7, arg1[4]);
00652a8c      st6 = st5;
00652a8f      int64_t temp0_248 = __psubsw_mmxq_memq(st3, arg1[0xc]);
00652a96      st5 = __paddsw_mmxq_memq(_m_psubsw(st5, st2), (*(uint64_t*)data_832be0));
00652a9d      int64_t temp0_251 = _m_paddsw(st6, st2);
00652aa0      arg1[0xe] = st0;
00652aa7      st2 = (*(uint64_t*)data_832c70);
00652aae      int64_t temp0_252 = _m_paddsw(temp0_246, st5);
00652ab1      st0 = (*(uint64_t*)data_832c70);
00652ab8      st2 = _m_pmulhw(st2, temp0_252);
00652abb      arg1[6] = temp0_251;
00652abf      st1 = _m_psubsw(temp0_246, st5);
00652ac2      st6 = *(uint64_t*)arg1;
00652ac5      st0 = _m_pmulhw(st0, st1);
00652ac8      st5 = arg1[8];
00652acf      st4 = (_m_paddsw(temp0_252, st2) | (*(uint64_t*)data_832be0));
00652ad6      st5 = _m_paddsw(st5, st6);
00652ad9      int64_t temp0_258 = __psubsw_mmxq_memq(st6, arg1[8]);
00652ae0      st0 = (_m_paddsw(st0, st1) | (*(uint64_t*)data_832be0));
00652ae7      st2 = st5;
00652af0      st5 = __paddsw_mmxq_memq(_m_paddsw(st5, temp0_247), (*(uint64_t*)data_832c00));
00652af7      st2 = _m_psubsw(st2, temp0_247);
00652afa      st7 = arg1[0xe];
00652b01      int64_t temp0_264 = __paddsw_mmxq_memq(_m_paddsw(temp0_258, temp0_248), (*(uint64_t*)data_832c00));
00652b0b      st7 = _m_psrawi(_m_paddsw(st7, st5), 5);
00652b0f      st1 = _m_psubsw(temp0_258, temp0_248);
00652b12      st2 = __paddsw_mmxq_memq(st2, (*(uint64_t*)data_832c10));
00652b1c      st1 = __paddsw_mmxq_memq(st1, (*(uint64_t*)data_832c10));
00652b23      int64_t temp0_270 = _m_paddsw(temp0_264, st4);
00652b26      int64_t temp0_271 = __paddsw_mmxq_memq(st7, (*(uint64_t*)data_832c20));
00652b37      *(uint64_t*)arg1 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_271, temp0_271), (*(uint32_t*)data_832c30));
00652b3e      st7 = st1;
00652b41      int64_t temp0_275 = __paddsw_mmxq_memq(_m_psrawi(temp0_270, 5), (*(uint64_t*)data_832c20));
00652b4b      st6 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_275, temp0_275), (*(uint32_t*)data_832c30));
00652b52      st1 = _m_paddsw(st1, st0);
00652b55      arg1[2] = st6;
00652b59      st1 = _m_psrawi(st1, 5);
00652b5d      st6 = arg1[6];
00652b61      int64_t temp0_280 = _m_psubsw(st7, st0);
00652b64      int64_t temp0_281 = _m_paddsw(st6, st2);
00652b67      st2 = __psubsw_mmxq_memq(st2, arg1[6]);
00652b6b      st1 = __paddsw_mmxq_memq(st1, (*(uint64_t*)data_832c20));
00652b75      st1 = __punpcklbw_mmxq_memd(_m_packuswb(st1, st1), (*(uint32_t*)data_832c30));
00652b7c      st7 = _m_psrawi(temp0_280, 5);
00652b80      arg1[4] = st1;
00652b84      st6 = _m_psrawi(temp0_281, 5);
00652b88      st5 = __psubsw_mmxq_memq(st5, arg1[0xe]);
00652b8c      int64_t temp0_289 = __paddsw_mmxq_memq(st6, (*(uint64_t*)data_832c20));
00652b96      st6 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_289, temp0_289), (*(uint32_t*)data_832c30));
00652b9d      st2 = _m_psrawi(st2, 5);
00652ba1      arg1[6] = st6;
00652ba5      st2 = __paddsw_mmxq_memq(st2, (*(uint64_t*)data_832c20));
00652baf      st2 = __punpcklbw_mmxq_memd(_m_packuswb(st2, st2), (*(uint32_t*)data_832c30));
00652bb6      int64_t temp0_296 = _m_psubsw(temp0_264, st4);
00652bb9      arg1[8] = st2;
00652bbd      int64_t temp0_297 = __paddsw_mmxq_memq(st7, (*(uint64_t*)data_832c20));
00652bc7      st7 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_297, temp0_297), (*(uint32_t*)data_832c30));
00652bce      st3 = _m_psrawi(temp0_296, 5);
00652bd2      arg1[0xa] = st7;
00652bd6      int64_t temp0_301 = __paddsw_mmxq_memq(st3, (*(uint64_t*)data_832c20));
00652be0      st3 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_301, temp0_301), (*(uint32_t*)data_832c30));
00652be7      st5 = _m_psrawi(st5, 5);
00652beb      arg1[0xc] = st3;
00652bef      st5 = __paddsw_mmxq_memq(st5, (*(uint64_t*)data_832c20));
00652c00      arg1[0xe] = __punpcklbw_mmxq_memd(_m_packuswb(st5, st5), (*(uint32_t*)data_832c30));
00652c04      st0 = arg1[0xb];
00652c08      st1 = (*(uint64_t*)data_832c60);
00652c0f      st2 = st0;
00652c12      st3 = arg1[7];
00652c16      st0 = _m_pmulhw(st0, st1);
00652c19      st4 = arg1[0xf];
00652c1d      st1 = _m_pmulhw(st1, st3);
00652c20      st5 = (*(uint64_t*)data_832c40);
00652c27      st6 = st4;
00652c2a      st4 = _m_pmulhw(st4, st5);
00652c2d      st0 = _m_paddsw(st0, st2);
00652c30      st5 = __pmulhw_mmxq_memq(st5, arg1[3]);
00652c34      st1 = _m_paddsw(st1, st3);
00652c37      st7 = arg1[0xd];
00652c3b      st0 = _m_paddsw(st0, st3);
00652c3e      st3 = data_832c50[0];
00652c45      st2 = _m_psubsw(st2, st1);
00652c48      st7 = _m_pmulhw(st7, st3);
00652c4b      st1 = st0;
00652c4e      st3 = __pmulhw_mmxq_memq(st3, arg1[5]);
00652c52      st5 = _m_psubsw(st5, st6);
00652c55      int64_t temp0_319 = __paddsw_mmxq_memq(st4, arg1[3]);
00652c5c      st0 = __paddsw_mmxq_memq(_m_paddsw(st0, temp0_319), (*(uint64_t*)data_832be0));
00652c63      int64_t temp0_322 = _m_psubsw(temp0_319, st1);
00652c66      int64_t temp0_323 = __paddsw_mmxq_memq(st7, arg1[5]);
00652c6a      st6 = st5;
00652c6d      int64_t temp0_324 = __psubsw_mmxq_memq(st3, arg1[0xd]);
00652c74      st5 = __paddsw_mmxq_memq(_m_psubsw(st5, st2), (*(uint64_t*)data_832be0));
00652c7b      int64_t temp0_327 = _m_paddsw(st6, st2);
00652c7e      arg1[0xf] = st0;
00652c85      st2 = (*(uint64_t*)data_832c70);
00652c8c      int64_t temp0_328 = _m_paddsw(temp0_322, st5);
00652c8f      st0 = (*(uint64_t*)data_832c70);
00652c96      st2 = _m_pmulhw(st2, temp0_328);
00652c99      arg1[7] = temp0_327;
00652c9d      st1 = _m_psubsw(temp0_322, st5);
00652ca0      st6 = arg1[1];
00652ca4      st0 = _m_pmulhw(st0, st1);
00652ca7      st5 = arg1[9];
00652cae      st4 = (_m_paddsw(temp0_328, st2) | (*(uint64_t*)data_832be0));
00652cb5      st5 = _m_paddsw(st5, st6);
00652cb8      int64_t temp0_334 = __psubsw_mmxq_memq(st6, arg1[9]);
00652cbf      st0 = (_m_paddsw(st0, st1) | (*(uint64_t*)data_832be0));
00652cc6      st2 = st5;
00652ccf      st5 = __paddsw_mmxq_memq(_m_paddsw(st5, temp0_323), (*(uint64_t*)data_832c00));
00652cd6      st2 = _m_psubsw(st2, temp0_323);
00652cd9      st7 = arg1[0xf];
00652ce0      int64_t temp0_340 = __paddsw_mmxq_memq(_m_paddsw(temp0_334, temp0_324), (*(uint64_t*)data_832c00));
00652cea      st7 = _m_psrawi(_m_paddsw(st7, st5), 5);
00652cee      st1 = _m_psubsw(temp0_334, temp0_324);
00652cf1      st2 = __paddsw_mmxq_memq(st2, (*(uint64_t*)data_832c10));
00652cfb      st1 = __paddsw_mmxq_memq(st1, (*(uint64_t*)data_832c10));
00652d02      int64_t temp0_346 = _m_paddsw(temp0_340, st4);
00652d05      int64_t temp0_347 = __paddsw_mmxq_memq(st7, (*(uint64_t*)data_832c20));
00652d16      arg1[1] = __punpcklbw_mmxq_memd(_m_packuswb(temp0_347, temp0_347), (*(uint32_t*)data_832c30));
00652d1e      st7 = st1;
00652d21      int64_t temp0_351 = __paddsw_mmxq_memq(_m_psrawi(temp0_346, 5), (*(uint64_t*)data_832c20));
00652d2b      st6 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_351, temp0_351), (*(uint32_t*)data_832c30));
00652d32      st1 = _m_paddsw(st1, st0);
00652d35      arg1[3] = st6;
00652d39      st1 = _m_psrawi(st1, 5);
00652d3d      st6 = arg1[7];
00652d41      int64_t temp0_356 = _m_psubsw(st7, st0);
00652d44      int64_t temp0_357 = _m_paddsw(st6, st2);
00652d47      st2 = __psubsw_mmxq_memq(st2, arg1[7]);
00652d4b      st1 = __paddsw_mmxq_memq(st1, (*(uint64_t*)data_832c20));
00652d55      st1 = __punpcklbw_mmxq_memd(_m_packuswb(st1, st1), (*(uint32_t*)data_832c30));
00652d5c      st7 = _m_psrawi(temp0_356, 5);
00652d60      arg1[5] = st1;
00652d64      st6 = _m_psrawi(temp0_357, 5);
00652d68      st5 = __psubsw_mmxq_memq(st5, arg1[0xf]);
00652d6c      int64_t temp0_365 = __paddsw_mmxq_memq(st6, (*(uint64_t*)data_832c20));
00652d76      st6 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_365, temp0_365), (*(uint32_t*)data_832c30));
00652d7d      st2 = _m_psrawi(st2, 5);
00652d81      arg1[7] = st6;
00652d85      st2 = __paddsw_mmxq_memq(st2, (*(uint64_t*)data_832c20));
00652d8f      st2 = __punpcklbw_mmxq_memd(_m_packuswb(st2, st2), (*(uint32_t*)data_832c30));
00652d96      int64_t temp0_372 = _m_psubsw(temp0_340, st4);
00652d99      arg1[9] = st2;
00652d9d      int64_t temp0_373 = __paddsw_mmxq_memq(st7, (*(uint64_t*)data_832c20));
00652da7      st7 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_373, temp0_373), (*(uint32_t*)data_832c30));
00652dae      st3 = _m_psrawi(temp0_372, 5);
00652db2      arg1[0xb] = st7;
00652db6      int64_t temp0_377 = __paddsw_mmxq_memq(st3, (*(uint64_t*)data_832c20));
00652dc0      st3 = __punpcklbw_mmxq_memd(_m_packuswb(temp0_377, temp0_377), (*(uint32_t*)data_832c30));
00652dc7      st5 = _m_psrawi(st5, 5);
00652dcb      arg1[0xd] = st3;
00652dcf      st5 = __paddsw_mmxq_memq(st5, (*(uint64_t*)data_832c20));
00652de0      arg1[0xf] = __punpcklbw_mmxq_memd(_m_packuswb(st5, st5), (*(uint32_t*)data_832c30));
006524a0  }

00652de5                 8d a4 24 00 00 00 00 8d 64 24 00                                                       ..$.....d$.

00652df0  void _own_dct_2d_16s_8x8_inv_w7(int128_t* arg1)

00652df0  {
00652df4      void* edx = arg1;
00652dfe      void* esp;
00652dfe      
00652dfe      if ((edx & 0xf) != 0)
00652dfe      {
00652e08          void var_80;
00652e08          esp = &var_80;
00652e0b          edx = &var_80;
00652dfe      }
00652dfe      
00652e13      if ((arg1 & 0xf) != 0)
00652e13      {
0065346d          uint16_t xmm0_32[0x8] = (*(uint64_t*)arg1 | (*(uint64_t*)((char*)arg1 + 8) << 0x40));
0065347a          uint16_t xmm4_29[0x8] = (arg1[4] | (*(uint64_t*)((char*)arg1 + 0x48) << 0x40));
0065347d          uint16_t xmm1_49[0x8] = _mm_shufflelo_epi16(xmm0_32, 0x88);
00653482          uint16_t xmm0_33[0x8] = _mm_shufflelo_epi16(xmm0_32, 0xdd);
00653487          uint16_t xmm1_50[0x8] = _mm_shufflehi_epi16(xmm1_49, 0x88);
00653494          int16_t xmm2_38[0x8] = _mm_madd_epi16(data_832e90, xmm1_50);
00653498          uint16_t xmm0_34[0x8] = _mm_shufflehi_epi16(xmm0_33, 0xdd);
006534a5          int16_t xmm3_23[0x8] = _mm_madd_epi16(data_832eb0, xmm0_34);
006534a9          int16_t xmm1_51[0x8] = __pmaddwd_xmmdq_memdq(xmm1_50, data_832ea0);
006534b1          int16_t xmm0_35[0x8] = __pmaddwd_xmmdq_memdq(xmm0_34, data_832ec0);
006534b9          int32_t xmm1_52[0x4] = _mm_shuffle_epi32(xmm1_51, 0x4e);
006534be          int32_t xmm0_36[0x4] = _mm_shuffle_epi32(xmm0_35, 0x4e);
006534c3          uint16_t xmm5_47[0x8] = _mm_shufflelo_epi16(xmm4_29, 0x88);
006534c8          uint16_t xmm4_30[0x8] = _mm_shufflelo_epi16(xmm4_29, 0xdd);
006534cd          uint16_t xmm5_48[0x8] = _mm_shufflehi_epi16(xmm5_47, 0x88);
006534da          int16_t xmm6_45[0x8] = _mm_madd_epi16(data_832e90, xmm5_48);
006534de          uint16_t xmm4_31[0x8] = _mm_shufflehi_epi16(xmm4_30, 0xdd);
006534eb          int16_t xmm7_29[0x8] = _mm_madd_epi16(data_832eb0, xmm4_31);
006534ef          int16_t xmm5_49[0x8] = __pmaddwd_xmmdq_memdq(xmm5_48, data_832ea0);
006534f7          int16_t xmm4_32[0x8] = __pmaddwd_xmmdq_memdq(xmm4_31, data_832ec0);
006534ff          int32_t xmm5_50[0x4] = _mm_shuffle_epi32(xmm5_49, 0x4e);
00653504          int32_t xmm4_33[0x4] = _mm_shuffle_epi32(xmm4_32, 0x4e);
00653509          int32_t xmm2_39[0x4] = __paddd_xmmdq_memdq(xmm2_38, data_832bf0);
00653511          int32_t xmm3_24[0x4] = _mm_add_epi32(xmm3_23, xmm0_36);
00653515          int32_t xmm1_53[0x4] = _mm_add_epi32(xmm1_52, xmm2_39);
00653521          int32_t xmm2_42[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm1_53, xmm3_24), 0xc);
0065352f          int32_t xmm1_56[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_53, xmm3_24), 0xc), xmm2_42);
00653533          int32_t xmm6_46[0x4] = __paddd_xmmdq_memdq(xmm6_45, data_832bf0);
0065353b          int32_t xmm7_30[0x4] = _mm_add_epi32(xmm7_29, xmm4_33);
0065353f          int32_t xmm5_51[0x4] = _mm_add_epi32(xmm5_50, xmm6_46);
0065354b          int32_t xmm6_49[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm5_51, xmm7_30), 0xc);
00653559          int32_t xmm5_54[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_51, xmm7_30), 0xc), xmm6_49);
0065355d          *(uint128_t*)edx = xmm1_56;
00653561          *(uint128_t*)((char*)edx + 0x40) = xmm5_54;
00653570          uint16_t xmm0_38[0x8] = (arg1[1] | (*(uint64_t*)((char*)arg1 + 0x18) << 0x40));
0065357d          uint16_t xmm4_35[0x8] = (arg1[7] | (*(uint64_t*)((char*)arg1 + 0x78) << 0x40));
00653580          uint16_t xmm1_59[0x8] = _mm_shufflelo_epi16(xmm0_38, 0x88);
00653585          uint16_t xmm0_39[0x8] = _mm_shufflelo_epi16(xmm0_38, 0xdd);
0065358a          uint16_t xmm1_60[0x8] = _mm_shufflehi_epi16(xmm1_59, 0x88);
00653597          int16_t xmm2_44[0x8] = _mm_madd_epi16(data_832ed0, xmm1_60);
0065359b          uint16_t xmm0_40[0x8] = _mm_shufflehi_epi16(xmm0_39, 0xdd);
006535a8          int16_t xmm3_26[0x8] = _mm_madd_epi16((*(uint128_t*)data_832ef0), xmm0_40);
006535ac          int16_t xmm1_61[0x8] = __pmaddwd_xmmdq_memdq(xmm1_60, data_832ee0);
006535b4          int16_t xmm0_41[0x8] = __pmaddwd_xmmdq_memdq(xmm0_40, data_832f00);
006535bc          int32_t xmm1_62[0x4] = _mm_shuffle_epi32(xmm1_61, 0x4e);
006535c1          uint32_t xmm0_42[0x4] = _mm_shuffle_epi32(xmm0_41, 0x4e);
006535c6          uint16_t xmm5_55[0x8] = _mm_shufflelo_epi16(xmm4_35, 0x88);
006535cb          uint16_t xmm4_36[0x8] = _mm_shufflelo_epi16(xmm4_35, 0xdd);
006535d0          uint16_t xmm5_56[0x8] = _mm_shufflehi_epi16(xmm5_55, 0x88);
006535dd          int16_t xmm6_51[0x8] = _mm_madd_epi16(data_832ed0, xmm5_56);
006535e1          uint16_t xmm4_37[0x8] = _mm_shufflehi_epi16(xmm4_36, 0xdd);
006535ee          int16_t xmm7_32[0x8] = _mm_madd_epi16((*(uint128_t*)data_832ef0), xmm4_37);
006535f2          int16_t xmm5_57[0x8] = __pmaddwd_xmmdq_memdq(xmm5_56, data_832ee0);
006535fa          int16_t xmm4_38[0x8] = __pmaddwd_xmmdq_memdq(xmm4_37, data_832f00);
00653602          int32_t xmm5_58[0x4] = _mm_shuffle_epi32(xmm5_57, 0x4e);
00653607          uint32_t xmm4_39[0x4] = _mm_shuffle_epi32(xmm4_38, 0x4e);
0065360c          int32_t xmm2_45[0x4] = __paddd_xmmdq_memdq(xmm2_44, data_832bf0);
00653614          int32_t xmm3_27[0x4] = _mm_add_epi32(xmm3_26, xmm0_42);
00653618          int32_t xmm1_63[0x4] = _mm_add_epi32(xmm1_62, xmm2_45);
00653624          int32_t xmm2_48[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm1_63, xmm3_27), 0xc);
00653632          int32_t xmm1_66[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_63, xmm3_27), 0xc), xmm2_48);
00653636          int32_t xmm6_52[0x4] = __paddd_xmmdq_memdq(xmm6_51, data_832bf0);
0065363e          int32_t xmm7_33[0x4] = _mm_add_epi32(xmm7_32, xmm4_39);
00653642          int32_t xmm5_59[0x4] = _mm_add_epi32(xmm5_58, xmm6_52);
0065364e          int32_t xmm6_55[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm5_59, xmm7_33), 0xc);
0065365c          int32_t xmm5_62[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_59, xmm7_33), 0xc), xmm6_55);
00653660          *(uint128_t*)((char*)edx + 0x10) = xmm1_66;
00653665          *(uint128_t*)((char*)edx + 0x70) = xmm5_62;
00653674          uint16_t xmm0_44[0x8] = (arg1[3] | (*(uint64_t*)((char*)arg1 + 0x38) << 0x40));
00653681          uint16_t xmm4_41[0x8] = (arg1[5] | (*(uint64_t*)((char*)arg1 + 0x58) << 0x40));
00653684          uint16_t xmm1_69[0x8] = _mm_shufflelo_epi16(xmm0_44, 0x88);
00653689          uint16_t xmm0_45[0x8] = _mm_shufflelo_epi16(xmm0_44, 0xdd);
0065368e          uint16_t xmm1_70[0x8] = _mm_shufflehi_epi16(xmm1_69, 0x88);
0065369b          int16_t xmm2_50[0x8] = _mm_madd_epi16((*(uint128_t*)data_832f50), xmm1_70);
0065369f          uint16_t xmm0_46[0x8] = _mm_shufflehi_epi16(xmm0_45, 0xdd);
006536ac          int16_t xmm3_29[0x8] = _mm_madd_epi16((*(uint128_t*)data_832f70), xmm0_46);
006536b0          int16_t xmm1_71[0x8] = __pmaddwd_xmmdq_memdq(xmm1_70, data_832f60);
006536b8          int16_t xmm0_47[0x8] = __pmaddwd_xmmdq_memdq(xmm0_46, data_832f80);
006536c0          uint32_t xmm1_72[0x4] = _mm_shuffle_epi32(xmm1_71, 0x4e);
006536c5          uint32_t xmm0_48[0x4] = _mm_shuffle_epi32(xmm0_47, 0x4e);
006536ca          uint16_t xmm5_63[0x8] = _mm_shufflelo_epi16(xmm4_41, 0x88);
006536cf          uint16_t xmm4_42[0x8] = _mm_shufflelo_epi16(xmm4_41, 0xdd);
006536d4          uint16_t xmm5_64[0x8] = _mm_shufflehi_epi16(xmm5_63, 0x88);
006536e1          int16_t xmm6_57[0x8] = _mm_madd_epi16((*(uint128_t*)data_832f50), xmm5_64);
006536e5          uint16_t xmm4_43[0x8] = _mm_shufflehi_epi16(xmm4_42, 0xdd);
006536f2          int16_t xmm7_35[0x8] = _mm_madd_epi16((*(uint128_t*)data_832f70), xmm4_43);
006536f6          int16_t xmm5_65[0x8] = __pmaddwd_xmmdq_memdq(xmm5_64, data_832f60);
006536fe          int16_t xmm4_44[0x8] = __pmaddwd_xmmdq_memdq(xmm4_43, data_832f80);
00653706          uint32_t xmm5_66[0x4] = _mm_shuffle_epi32(xmm5_65, 0x4e);
0065370b          uint32_t xmm4_45[0x4] = _mm_shuffle_epi32(xmm4_44, 0x4e);
00653710          int32_t xmm2_51[0x4] = __paddd_xmmdq_memdq(xmm2_50, data_832bf0);
00653718          int32_t xmm3_30[0x4] = _mm_add_epi32(xmm3_29, xmm0_48);
0065371c          int32_t xmm1_73[0x4] = _mm_add_epi32(xmm1_72, xmm2_51);
00653728          int32_t xmm2_54[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm1_73, xmm3_30), 0xc);
00653736          int32_t xmm1_76[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_73, xmm3_30), 0xc), xmm2_54);
0065373a          int32_t xmm6_58[0x4] = __paddd_xmmdq_memdq(xmm6_57, data_832bf0);
00653742          int32_t xmm7_36[0x4] = _mm_add_epi32(xmm7_35, xmm4_45);
00653746          int32_t xmm5_67[0x4] = _mm_add_epi32(xmm5_66, xmm6_58);
00653752          int32_t xmm6_61[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm5_67, xmm7_36), 0xc);
00653760          int32_t xmm5_70[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_67, xmm7_36), 0xc), xmm6_61);
00653764          *(uint128_t*)((char*)edx + 0x30) = xmm1_76;
00653769          *(uint128_t*)((char*)edx + 0x50) = xmm5_70;
00653778          uint16_t xmm0_50[0x8] = (arg1[2] | (*(uint64_t*)((char*)arg1 + 0x28) << 0x40));
00653785          uint16_t xmm4_47[0x8] = (arg1[6] | (*(uint64_t*)((char*)arg1 + 0x68) << 0x40));
00653788          uint16_t xmm1_79[0x8] = _mm_shufflelo_epi16(xmm0_50, 0x88);
0065378d          uint16_t xmm0_51[0x8] = _mm_shufflelo_epi16(xmm0_50, 0xdd);
00653792          uint16_t xmm1_80[0x8] = _mm_shufflehi_epi16(xmm1_79, 0x88);
0065379f          int16_t xmm2_56[0x8] = _mm_madd_epi16(data_832f10, xmm1_80);
006537a3          uint16_t xmm0_52[0x8] = _mm_shufflehi_epi16(xmm0_51, 0xdd);
006537b0          int16_t xmm3_32[0x8] = _mm_madd_epi16(data_832f30, xmm0_52);
006537b4          int16_t xmm1_81[0x8] = __pmaddwd_xmmdq_memdq(xmm1_80, data_832f20);
006537bc          int16_t xmm0_53[0x8] = __pmaddwd_xmmdq_memdq(xmm0_52, data_832f40);
006537c4          int32_t xmm1_82[0x4] = _mm_shuffle_epi32(xmm1_81, 0x4e);
006537c9          int32_t xmm0_54[0x4] = _mm_shuffle_epi32(xmm0_53, 0x4e);
006537ce          uint16_t xmm5_71[0x8] = _mm_shufflelo_epi16(xmm4_47, 0x88);
006537d3          uint16_t xmm4_48[0x8] = _mm_shufflelo_epi16(xmm4_47, 0xdd);
006537d8          uint16_t xmm5_72[0x8] = _mm_shufflehi_epi16(xmm5_71, 0x88);
006537e5          int16_t xmm6_63[0x8] = _mm_madd_epi16(data_832f10, xmm5_72);
006537e9          uint16_t xmm4_49[0x8] = _mm_shufflehi_epi16(xmm4_48, 0xdd);
006537f6          int16_t xmm7_38[0x8] = _mm_madd_epi16(data_832f30, xmm4_49);
006537fa          int16_t xmm5_73[0x8] = __pmaddwd_xmmdq_memdq(xmm5_72, data_832f20);
00653802          int16_t xmm4_50[0x8] = __pmaddwd_xmmdq_memdq(xmm4_49, data_832f40);
0065380a          int32_t xmm5_74[0x4] = _mm_shuffle_epi32(xmm5_73, 0x4e);
0065380f          int32_t xmm4_51[0x4] = _mm_shuffle_epi32(xmm4_50, 0x4e);
00653814          int32_t xmm2_57[0x4] = __paddd_xmmdq_memdq(xmm2_56, data_832bf0);
0065381c          int32_t xmm3_33[0x4] = _mm_add_epi32(xmm3_32, xmm0_54);
00653820          int32_t xmm1_83[0x4] = _mm_add_epi32(xmm1_82, xmm2_57);
0065382c          int32_t xmm2_60[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm1_83, xmm3_33), 0xc);
0065383a          int32_t xmm1_86[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_83, xmm3_33), 0xc), xmm2_60);
0065383e          int32_t xmm6_64[0x4] = __paddd_xmmdq_memdq(xmm6_63, data_832bf0);
00653846          int32_t xmm7_39[0x4] = _mm_add_epi32(xmm7_38, xmm4_51);
0065384a          int32_t xmm5_75[0x4] = _mm_add_epi32(xmm5_74, xmm6_64);
00653856          int32_t xmm6_67[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm5_75, xmm7_39), 0xc);
00653864          int32_t xmm5_78[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_75, xmm7_39), 0xc), xmm6_67);
00653868          *(uint128_t*)((char*)edx + 0x20) = xmm1_86;
0065386d          *(uint128_t*)((char*)edx + 0x60) = xmm5_78;
0065386d          
00653874          if (edx == esp)
00653874          {
0065387c          label_65387c:
0065387c              int16_t xmm0_55[0x8] = *(uint128_t*)((char*)esp + 0x50);
00653882              int16_t xmm1_87[0x8] = (*(uint128_t*)data_832c60);
0065388a              int32_t xmm2_61[0x4] = xmm0_55;
0065388e              int16_t xmm3_34[0x8] = *(uint128_t*)((char*)esp + 0x30);
00653894              int16_t xmm0_56[0x8] = _mm_mulhi_epi16(xmm0_55, xmm1_87);
00653898              int16_t xmm4_52[0x8] = *(uint128_t*)((char*)esp + 0x70);
0065389e              int16_t xmm1_88[0x8] = _mm_mulhi_epi16(xmm1_87, xmm3_34);
006538a2              int128_t xmm5_79 = data_832c40;
006538ae              int16_t xmm4_53[0x8] = _mm_mulhi_epi16(xmm4_52, xmm5_79);
006538b2              int32_t xmm0_57[0x4] = _mm_adds_epi16(xmm0_56, xmm2_61);
006538b6              int16_t xmm5_80[0x8] = __pmulhw_xmmdq_memdq(xmm5_79, *(uint128_t*)((char*)esp + 0x10));
006538bc              int32_t xmm1_89[0x4] = _mm_adds_epi16(xmm1_88, xmm3_34);
006538c0              int16_t xmm7_40[0x8] = *(uint128_t*)((char*)esp + 0x60);
006538c6              int32_t xmm0_58[0x4] = _mm_adds_epi16(xmm0_57, xmm3_34);
006538ca              int16_t xmm3_35[0x8] = data_832c50;
006538d2              int32_t xmm2_62[0x4] = _mm_subs_epi16(xmm2_61, xmm1_89);
006538d6              int16_t xmm7_41[0x8] = _mm_mulhi_epi16(xmm7_40, xmm3_35);
006538de              int16_t xmm3_36[0x8] = __pmulhw_xmmdq_memdq(xmm3_35, *(uint128_t*)((char*)esp + 0x20));
006538e4              int32_t xmm5_81[0x4] = _mm_subs_epi16(xmm5_80, xmm4_52);
006538e8              int32_t xmm4_54[0x4] = __paddsw_xmmdq_memdq(xmm4_53, *(uint128_t*)((char*)esp + 0x10));
006538f2              int32_t xmm0_60[0x4] = __paddsw_xmmdq_memdq(_mm_adds_epi16(xmm0_58, xmm4_54), data_832be0);
006538fa              int32_t xmm4_55[0x4] = _mm_subs_epi16(xmm4_54, xmm0_58);
006538fe              int32_t xmm7_42[0x4] = __paddsw_xmmdq_memdq(xmm7_41, *(uint128_t*)((char*)esp + 0x20));
00653908              int32_t xmm3_37[0x4] = __psubsw_xmmdq_memdq(xmm3_36, *(uint128_t*)((char*)esp + 0x60));
0065390e              int32_t xmm5_82[0x4] = _mm_subs_epi16(xmm5_81, xmm2_62);
00653912              uint16_t xmm0_61[0x8] = _mm_shufflehi_epi16(xmm0_60, 0x1b);
00653917              int32_t xmm5_83[0x4] = __paddsw_xmmdq_memdq(xmm5_82, data_832be0);
0065391f              int32_t xmm6_70[0x4] = _mm_adds_epi16(xmm5_81, xmm2_62);
00653923              *(uint128_t*)((char*)esp + 0x70) = xmm0_61;
0065392d              int128_t xmm2_63 = data_832c70;
00653935              int16_t xmm4_56[0x8] = _mm_adds_epi16(xmm4_55, xmm5_83);
00653939              uint16_t xmm6_71[0x8] = _mm_shufflehi_epi16(xmm6_70, 0x1b);
0065393e              int128_t xmm0_62 = data_832c70;
00653946              int16_t xmm2_64[0x8] = _mm_mulhi_epi16(xmm2_63, xmm4_56);
0065394a              *(uint128_t*)((char*)esp + 0x30) = xmm6_71;
00653950              int32_t xmm1_92[0x4] = _mm_subs_epi16(xmm4_55, xmm5_83);
00653954              int32_t xmm6_72[0x4] = *(uint128_t*)esp;
00653959              int32_t xmm0_63[0x4] = _mm_mulhi_epi16(xmm0_62, xmm1_92);
0065395d              int32_t xmm5_84[0x4] = *(uint128_t*)((char*)esp + 0x40);
00653967              uint16_t xmm4_58[0x8] = (_mm_adds_epi16(xmm4_56, xmm2_64) | data_832be0);
0065396f              int32_t xmm5_85[0x4] = _mm_adds_epi16(xmm5_84, xmm6_72);
00653973              int32_t xmm6_73[0x4] = __psubsw_xmmdq_memdq(xmm6_72, *(uint128_t*)((char*)esp + 0x40));
00653979              int32_t xmm0_64[0x4] = _mm_adds_epi16(xmm0_63, xmm1_92);
0065397d              uint16_t xmm4_59[0x8] = _mm_shufflehi_epi16(xmm4_58, 0x1b);
00653982              int32_t xmm0_65[0x4] = (xmm0_64 | data_832be0);
00653996              int32_t xmm5_87[0x4] = __paddsw_xmmdq_memdq(_mm_adds_epi16(xmm5_85, xmm7_42), data_832c00);
0065399e              int32_t xmm2_66[0x4] = _mm_subs_epi16(xmm5_85, xmm7_42);
006539a2              int32_t xmm7_43[0x4] = *(uint128_t*)((char*)esp + 0x70);
006539a8              int32_t xmm6_74[0x4] = _mm_adds_epi16(xmm6_73, xmm3_37);
006539ac              int32_t xmm5_88[0x4] = _mm_shufflehi_epi16(xmm5_87, 0x1b);
006539b1              int32_t xmm6_75[0x4] = __paddsw_xmmdq_memdq(xmm6_74, data_832c00);
006539bd              int16_t xmm7_45[0x8] = _mm_srai_epi16(_mm_adds_epi16(xmm7_43, xmm5_88), 5);
006539c2              int32_t xmm1_94[0x4] = _mm_subs_epi16(xmm6_73, xmm3_37);
006539c6              int32_t xmm6_76[0x4] = _mm_shufflehi_epi16(xmm6_75, 0x1b);
006539cb              int32_t xmm2_67[0x4] = __paddsw_xmmdq_memdq(xmm2_66, data_832c10);
006539d7              int32_t xmm1_95[0x4] = __paddsw_xmmdq_memdq(xmm1_94, data_832c10);
006539df              int32_t xmm6_77[0x4] = _mm_adds_epi16(xmm6_76, xmm4_59);
006539e3              uint16_t xmm2_68[0x8] = _mm_shufflehi_epi16(xmm2_67, 0x1b);
006539e8              int32_t xmm7_46[0x4] = __paddsw_xmmdq_memdq(xmm7_45, data_832c20);
006539fc              *(uint128_t*)arg1 = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm7_46, xmm7_46), data_832c30);
00653a00              int16_t xmm6_78[0x8] = _mm_srai_epi16(xmm6_77, 5);
00653a09              int32_t xmm1_96[0x4] = _mm_adds_epi16(xmm1_95, xmm0_65);
00653a0d              int32_t xmm6_79[0x4] = __paddsw_xmmdq_memdq(xmm6_78, data_832c20);
00653a21              arg1[1] = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm6_79, xmm6_79), data_832c30);
00653a26              int16_t xmm1_97[0x8] = _mm_srai_epi16(xmm1_96, 5);
00653a2b              int32_t xmm6_82[0x4] = *(uint128_t*)((char*)esp + 0x30);
00653a31              int32_t xmm7_50[0x4] = _mm_subs_epi16(xmm1_95, xmm0_65);
00653a35              uint16_t xmm1_98[0x8] = _mm_shufflehi_epi16(xmm1_97, 0x1b);
00653a3a              int32_t xmm6_83[0x4] = _mm_adds_epi16(xmm6_82, xmm2_68);
00653a3e              int32_t xmm2_69[0x4] = __psubsw_xmmdq_memdq(xmm2_68, *(uint128_t*)((char*)esp + 0x30));
00653a44              int16_t xmm7_51[0x8] = _mm_srai_epi16(xmm7_50, 5);
00653a49              int32_t xmm1_99[0x4] = __paddsw_xmmdq_memdq(xmm1_98, data_832c20);
00653a5d              arg1[2] = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm1_99, xmm1_99), data_832c30);
00653a62              int16_t xmm6_84[0x8] = _mm_srai_epi16(xmm6_83, 5);
00653a67              int32_t xmm5_89[0x4] = __psubsw_xmmdq_memdq(xmm5_88, *(uint128_t*)((char*)esp + 0x70));
00653a6d              int16_t xmm2_70[0x8] = _mm_srai_epi16(xmm2_69, 5);
00653a72              int32_t xmm6_85[0x4] = __paddsw_xmmdq_memdq(xmm6_84, data_832c20);
00653a86              arg1[3] = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm6_85, xmm6_85), data_832c30);
00653a8b              int32_t xmm3_39[0x4] = _mm_subs_epi16(xmm6_76, xmm4_59);
00653a8f              uint16_t xmm7_52[0x8] = _mm_shufflehi_epi16(xmm7_51, 0x1b);
00653a94              int32_t xmm2_71[0x4] = __paddsw_xmmdq_memdq(xmm2_70, data_832c20);
00653aa8              arg1[4] = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm2_71, xmm2_71), data_832c30);
00653aad              int16_t xmm3_40[0x8] = _mm_srai_epi16(xmm3_39, 5);
00653ab2              int32_t xmm7_53[0x4] = __paddsw_xmmdq_memdq(xmm7_52, data_832c20);
00653ac6              arg1[5] = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm7_53, xmm7_53), data_832c30);
00653acb              int16_t xmm5_90[0x8] = _mm_srai_epi16(xmm5_89, 5);
00653ad0              int32_t xmm3_41[0x4] = __paddsw_xmmdq_memdq(xmm3_40, data_832c20);
00653ae4              arg1[6] = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm3_41, xmm3_41), data_832c30);
00653ae9              int32_t xmm5_91[0x4] = __paddsw_xmmdq_memdq(xmm5_90, data_832c20);
00653afd              arg1[7] = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm5_91, xmm5_91), data_832c30);
00653b04              return;
00653874          }
00652e13      }
00652e13      else
00652e13      {
00652e19          uint16_t xmm0[0x8] = *(uint128_t*)arg1;
00652e1d          uint16_t xmm4[0x8] = arg1[4];
00652e22          uint16_t xmm1[0x8] = _mm_shufflelo_epi16(xmm0, 0x88);
00652e27          uint16_t xmm0_1[0x8] = _mm_shufflelo_epi16(xmm0, 0xdd);
00652e2c          uint16_t xmm1_1[0x8] = _mm_shufflehi_epi16(xmm1, 0x88);
00652e39          int16_t xmm2_1[0x8] = _mm_madd_epi16(data_832e90, xmm1_1);
00652e3d          uint16_t xmm0_2[0x8] = _mm_shufflehi_epi16(xmm0_1, 0xdd);
00652e4a          int16_t xmm3_1[0x8] = _mm_madd_epi16(data_832eb0, xmm0_2);
00652e4e          int16_t xmm1_2[0x8] = __pmaddwd_xmmdq_memdq(xmm1_1, data_832ea0);
00652e56          int16_t xmm0_3[0x8] = __pmaddwd_xmmdq_memdq(xmm0_2, data_832ec0);
00652e5e          int32_t xmm1_3[0x4] = _mm_shuffle_epi32(xmm1_2, 0x4e);
00652e63          int32_t xmm0_4[0x4] = _mm_shuffle_epi32(xmm0_3, 0x4e);
00652e68          uint16_t xmm5[0x8] = _mm_shufflelo_epi16(xmm4, 0x88);
00652e6d          uint16_t xmm4_1[0x8] = _mm_shufflelo_epi16(xmm4, 0xdd);
00652e72          uint16_t xmm5_1[0x8] = _mm_shufflehi_epi16(xmm5, 0x88);
00652e7f          int16_t xmm6_1[0x8] = _mm_madd_epi16(data_832e90, xmm5_1);
00652e83          uint16_t xmm4_2[0x8] = _mm_shufflehi_epi16(xmm4_1, 0xdd);
00652e90          int16_t xmm7_1[0x8] = _mm_madd_epi16(data_832eb0, xmm4_2);
00652e94          int16_t xmm5_2[0x8] = __pmaddwd_xmmdq_memdq(xmm5_1, data_832ea0);
00652e9c          int16_t xmm4_3[0x8] = __pmaddwd_xmmdq_memdq(xmm4_2, data_832ec0);
00652ea4          int32_t xmm5_3[0x4] = _mm_shuffle_epi32(xmm5_2, 0x4e);
00652ea9          int32_t xmm4_4[0x4] = _mm_shuffle_epi32(xmm4_3, 0x4e);
00652eae          int32_t xmm2_2[0x4] = __paddd_xmmdq_memdq(xmm2_1, data_832bf0);
00652eb6          int32_t xmm3_2[0x4] = _mm_add_epi32(xmm3_1, xmm0_4);
00652eba          int32_t xmm1_4[0x4] = _mm_add_epi32(xmm1_3, xmm2_2);
00652ec6          int32_t xmm2_5[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm1_4, xmm3_2), 0xc);
00652ed4          int32_t xmm1_7[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_4, xmm3_2), 0xc), xmm2_5);
00652ed8          int32_t xmm6_2[0x4] = __paddd_xmmdq_memdq(xmm6_1, data_832bf0);
00652ee0          int32_t xmm7_2[0x4] = _mm_add_epi32(xmm7_1, xmm4_4);
00652ee4          int32_t xmm5_4[0x4] = _mm_add_epi32(xmm5_3, xmm6_2);
00652ef0          int32_t xmm6_5[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm5_4, xmm7_2), 0xc);
00652efe          int32_t xmm5_7[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_4, xmm7_2), 0xc), xmm6_5);
00652f02          *(uint128_t*)edx = xmm1_7;
00652f06          *(uint128_t*)((char*)edx + 0x40) = xmm5_7;
00652f0b          uint16_t xmm0_5[0x8] = arg1[1];
00652f10          uint16_t xmm4_5[0x8] = arg1[7];
00652f15          uint16_t xmm1_8[0x8] = _mm_shufflelo_epi16(xmm0_5, 0x88);
00652f1a          uint16_t xmm0_6[0x8] = _mm_shufflelo_epi16(xmm0_5, 0xdd);
00652f1f          uint16_t xmm1_9[0x8] = _mm_shufflehi_epi16(xmm1_8, 0x88);
00652f2c          int16_t xmm2_7[0x8] = _mm_madd_epi16(data_832ed0, xmm1_9);
00652f30          uint16_t xmm0_7[0x8] = _mm_shufflehi_epi16(xmm0_6, 0xdd);
00652f3d          int16_t xmm3_4[0x8] = _mm_madd_epi16((*(uint128_t*)data_832ef0), xmm0_7);
00652f41          int16_t xmm1_10[0x8] = __pmaddwd_xmmdq_memdq(xmm1_9, data_832ee0);
00652f49          int16_t xmm0_8[0x8] = __pmaddwd_xmmdq_memdq(xmm0_7, data_832f00);
00652f51          int32_t xmm1_11[0x4] = _mm_shuffle_epi32(xmm1_10, 0x4e);
00652f56          uint32_t xmm0_9[0x4] = _mm_shuffle_epi32(xmm0_8, 0x4e);
00652f5b          uint16_t xmm5_8[0x8] = _mm_shufflelo_epi16(xmm4_5, 0x88);
00652f60          uint16_t xmm4_6[0x8] = _mm_shufflelo_epi16(xmm4_5, 0xdd);
00652f65          uint16_t xmm5_9[0x8] = _mm_shufflehi_epi16(xmm5_8, 0x88);
00652f72          int16_t xmm6_7[0x8] = _mm_madd_epi16(data_832ed0, xmm5_9);
00652f76          uint16_t xmm4_7[0x8] = _mm_shufflehi_epi16(xmm4_6, 0xdd);
00652f83          int16_t xmm7_4[0x8] = _mm_madd_epi16((*(uint128_t*)data_832ef0), xmm4_7);
00652f87          int16_t xmm5_10[0x8] = __pmaddwd_xmmdq_memdq(xmm5_9, data_832ee0);
00652f8f          int16_t xmm4_8[0x8] = __pmaddwd_xmmdq_memdq(xmm4_7, data_832f00);
00652f97          int32_t xmm5_11[0x4] = _mm_shuffle_epi32(xmm5_10, 0x4e);
00652f9c          uint32_t xmm4_9[0x4] = _mm_shuffle_epi32(xmm4_8, 0x4e);
00652fa1          int32_t xmm2_8[0x4] = __paddd_xmmdq_memdq(xmm2_7, data_832bf0);
00652fa9          int32_t xmm3_5[0x4] = _mm_add_epi32(xmm3_4, xmm0_9);
00652fad          int32_t xmm1_12[0x4] = _mm_add_epi32(xmm1_11, xmm2_8);
00652fb9          int32_t xmm2_11[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm1_12, xmm3_5), 0xc);
00652fc7          int32_t xmm1_15[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_12, xmm3_5), 0xc), xmm2_11);
00652fcb          int32_t xmm6_8[0x4] = __paddd_xmmdq_memdq(xmm6_7, data_832bf0);
00652fd3          int32_t xmm7_5[0x4] = _mm_add_epi32(xmm7_4, xmm4_9);
00652fd7          int32_t xmm5_12[0x4] = _mm_add_epi32(xmm5_11, xmm6_8);
00652fe3          int32_t xmm6_11[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm5_12, xmm7_5), 0xc);
00652ff1          int32_t xmm5_15[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_12, xmm7_5), 0xc), xmm6_11);
00652ff5          *(uint128_t*)((char*)edx + 0x10) = xmm1_15;
00652ffa          *(uint128_t*)((char*)edx + 0x70) = xmm5_15;
00652fff          uint16_t xmm0_10[0x8] = arg1[3];
00653004          uint16_t xmm4_10[0x8] = arg1[5];
00653009          uint16_t xmm1_16[0x8] = _mm_shufflelo_epi16(xmm0_10, 0x88);
0065300e          uint16_t xmm0_11[0x8] = _mm_shufflelo_epi16(xmm0_10, 0xdd);
00653013          uint16_t xmm1_17[0x8] = _mm_shufflehi_epi16(xmm1_16, 0x88);
00653020          int16_t xmm2_13[0x8] = _mm_madd_epi16((*(uint128_t*)data_832f50), xmm1_17);
00653024          uint16_t xmm0_12[0x8] = _mm_shufflehi_epi16(xmm0_11, 0xdd);
00653031          int16_t xmm3_7[0x8] = _mm_madd_epi16((*(uint128_t*)data_832f70), xmm0_12);
00653035          int16_t xmm1_18[0x8] = __pmaddwd_xmmdq_memdq(xmm1_17, data_832f60);
0065303d          int16_t xmm0_13[0x8] = __pmaddwd_xmmdq_memdq(xmm0_12, data_832f80);
00653045          uint32_t xmm1_19[0x4] = _mm_shuffle_epi32(xmm1_18, 0x4e);
0065304a          uint32_t xmm0_14[0x4] = _mm_shuffle_epi32(xmm0_13, 0x4e);
0065304f          uint16_t xmm5_16[0x8] = _mm_shufflelo_epi16(xmm4_10, 0x88);
00653054          uint16_t xmm4_11[0x8] = _mm_shufflelo_epi16(xmm4_10, 0xdd);
00653059          uint16_t xmm5_17[0x8] = _mm_shufflehi_epi16(xmm5_16, 0x88);
00653066          int16_t xmm6_13[0x8] = _mm_madd_epi16((*(uint128_t*)data_832f50), xmm5_17);
0065306a          uint16_t xmm4_12[0x8] = _mm_shufflehi_epi16(xmm4_11, 0xdd);
00653077          int16_t xmm7_7[0x8] = _mm_madd_epi16((*(uint128_t*)data_832f70), xmm4_12);
0065307b          int16_t xmm5_18[0x8] = __pmaddwd_xmmdq_memdq(xmm5_17, data_832f60);
00653083          int16_t xmm4_13[0x8] = __pmaddwd_xmmdq_memdq(xmm4_12, data_832f80);
0065308b          uint32_t xmm5_19[0x4] = _mm_shuffle_epi32(xmm5_18, 0x4e);
00653090          uint32_t xmm4_14[0x4] = _mm_shuffle_epi32(xmm4_13, 0x4e);
00653095          int32_t xmm2_14[0x4] = __paddd_xmmdq_memdq(xmm2_13, data_832bf0);
0065309d          int32_t xmm3_8[0x4] = _mm_add_epi32(xmm3_7, xmm0_14);
006530a1          int32_t xmm1_20[0x4] = _mm_add_epi32(xmm1_19, xmm2_14);
006530ad          int32_t xmm2_17[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm1_20, xmm3_8), 0xc);
006530bb          int32_t xmm1_23[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_20, xmm3_8), 0xc), xmm2_17);
006530bf          int32_t xmm6_14[0x4] = __paddd_xmmdq_memdq(xmm6_13, data_832bf0);
006530c7          int32_t xmm7_8[0x4] = _mm_add_epi32(xmm7_7, xmm4_14);
006530cb          int32_t xmm5_20[0x4] = _mm_add_epi32(xmm5_19, xmm6_14);
006530d7          int32_t xmm6_17[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm5_20, xmm7_8), 0xc);
006530e5          int32_t xmm5_23[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_20, xmm7_8), 0xc), xmm6_17);
006530e9          *(uint128_t*)((char*)edx + 0x30) = xmm1_23;
006530ee          *(uint128_t*)((char*)edx + 0x50) = xmm5_23;
006530f3          uint16_t xmm0_15[0x8] = arg1[2];
006530f8          uint16_t xmm4_15[0x8] = arg1[6];
006530fd          uint16_t xmm1_24[0x8] = _mm_shufflelo_epi16(xmm0_15, 0x88);
00653102          uint16_t xmm0_16[0x8] = _mm_shufflelo_epi16(xmm0_15, 0xdd);
00653107          uint16_t xmm1_25[0x8] = _mm_shufflehi_epi16(xmm1_24, 0x88);
00653114          int16_t xmm2_19[0x8] = _mm_madd_epi16(data_832f10, xmm1_25);
00653118          uint16_t xmm0_17[0x8] = _mm_shufflehi_epi16(xmm0_16, 0xdd);
00653125          int16_t xmm3_10[0x8] = _mm_madd_epi16(data_832f30, xmm0_17);
00653129          int16_t xmm1_26[0x8] = __pmaddwd_xmmdq_memdq(xmm1_25, data_832f20);
00653131          int16_t xmm0_18[0x8] = __pmaddwd_xmmdq_memdq(xmm0_17, data_832f40);
00653139          int32_t xmm1_27[0x4] = _mm_shuffle_epi32(xmm1_26, 0x4e);
0065313e          int32_t xmm0_19[0x4] = _mm_shuffle_epi32(xmm0_18, 0x4e);
00653143          uint16_t xmm5_24[0x8] = _mm_shufflelo_epi16(xmm4_15, 0x88);
00653148          uint16_t xmm4_16[0x8] = _mm_shufflelo_epi16(xmm4_15, 0xdd);
0065314d          uint16_t xmm5_25[0x8] = _mm_shufflehi_epi16(xmm5_24, 0x88);
0065315a          int16_t xmm6_19[0x8] = _mm_madd_epi16(data_832f10, xmm5_25);
0065315e          uint16_t xmm4_17[0x8] = _mm_shufflehi_epi16(xmm4_16, 0xdd);
0065316b          int16_t xmm7_10[0x8] = _mm_madd_epi16(data_832f30, xmm4_17);
0065316f          int16_t xmm5_26[0x8] = __pmaddwd_xmmdq_memdq(xmm5_25, data_832f20);
00653177          int16_t xmm4_18[0x8] = __pmaddwd_xmmdq_memdq(xmm4_17, data_832f40);
0065317f          int32_t xmm5_27[0x4] = _mm_shuffle_epi32(xmm5_26, 0x4e);
00653184          int32_t xmm4_19[0x4] = _mm_shuffle_epi32(xmm4_18, 0x4e);
00653189          int32_t xmm2_20[0x4] = __paddd_xmmdq_memdq(xmm2_19, data_832bf0);
00653191          int32_t xmm3_11[0x4] = _mm_add_epi32(xmm3_10, xmm0_19);
00653195          int32_t xmm1_28[0x4] = _mm_add_epi32(xmm1_27, xmm2_20);
006531a1          int32_t xmm2_23[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm1_28, xmm3_11), 0xc);
006531af          int32_t xmm1_31[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm1_28, xmm3_11), 0xc), xmm2_23);
006531b3          int32_t xmm6_20[0x4] = __paddd_xmmdq_memdq(xmm6_19, data_832bf0);
006531bb          int32_t xmm7_11[0x4] = _mm_add_epi32(xmm7_10, xmm4_19);
006531bf          int32_t xmm5_28[0x4] = _mm_add_epi32(xmm5_27, xmm6_20);
006531cb          int32_t xmm6_23[0x4] = _mm_srai_epi32(_mm_sub_epi32(xmm5_28, xmm7_11), 0xc);
006531d9          int32_t xmm5_31[0x4] = _mm_packs_epi32(_mm_srai_epi32(_mm_add_epi32(xmm5_28, xmm7_11), 0xc), xmm6_23);
006531dd          *(uint128_t*)((char*)edx + 0x20) = xmm1_31;
006531e2          *(uint128_t*)((char*)edx + 0x60) = xmm5_31;
006531e2          
006531e9          if (edx == esp)
006531e9              goto label_65387c;
00652e13      }
00652e13      
006531ef      int16_t xmm0_20[0x8] = *(uint128_t*)((char*)edx + 0x50);
006531f4      int16_t xmm1_32[0x8] = (*(uint128_t*)data_832c60);
006531fc      int32_t xmm2_24[0x4] = xmm0_20;
00653200      int16_t xmm3_12[0x8] = *(uint128_t*)((char*)edx + 0x30);
00653205      int16_t xmm0_21[0x8] = _mm_mulhi_epi16(xmm0_20, xmm1_32);
00653209      int16_t xmm4_20[0x8] = *(uint128_t*)((char*)edx + 0x70);
0065320e      int16_t xmm1_33[0x8] = _mm_mulhi_epi16(xmm1_32, xmm3_12);
00653212      int128_t xmm5_32 = data_832c40;
0065321e      int16_t xmm4_21[0x8] = _mm_mulhi_epi16(xmm4_20, xmm5_32);
00653222      int32_t xmm0_22[0x4] = _mm_adds_epi16(xmm0_21, xmm2_24);
00653226      int16_t xmm5_33[0x8] = __pmulhw_xmmdq_memdq(xmm5_32, *(uint128_t*)((char*)edx + 0x10));
0065322b      int32_t xmm1_34[0x4] = _mm_adds_epi16(xmm1_33, xmm3_12);
0065322f      int16_t xmm7_12[0x8] = *(uint128_t*)((char*)edx + 0x60);
00653234      int32_t xmm0_23[0x4] = _mm_adds_epi16(xmm0_22, xmm3_12);
00653238      int16_t xmm3_13[0x8] = data_832c50;
00653240      int32_t xmm2_25[0x4] = _mm_subs_epi16(xmm2_24, xmm1_34);
00653244      int16_t xmm7_13[0x8] = _mm_mulhi_epi16(xmm7_12, xmm3_13);
0065324c      int16_t xmm3_14[0x8] = __pmulhw_xmmdq_memdq(xmm3_13, *(uint128_t*)((char*)edx + 0x20));
00653251      int32_t xmm5_34[0x4] = _mm_subs_epi16(xmm5_33, xmm4_20);
00653255      int32_t xmm4_22[0x4] = __paddsw_xmmdq_memdq(xmm4_21, *(uint128_t*)((char*)edx + 0x10));
0065325e      int32_t xmm0_25[0x4] = __paddsw_xmmdq_memdq(_mm_adds_epi16(xmm0_23, xmm4_22), data_832be0);
00653266      int32_t xmm4_23[0x4] = _mm_subs_epi16(xmm4_22, xmm0_23);
0065326a      int32_t xmm7_14[0x4] = __paddsw_xmmdq_memdq(xmm7_13, *(uint128_t*)((char*)edx + 0x20));
00653273      int32_t xmm3_15[0x4] = __psubsw_xmmdq_memdq(xmm3_14, *(uint128_t*)((char*)edx + 0x60));
00653278      int32_t xmm5_35[0x4] = _mm_subs_epi16(xmm5_34, xmm2_25);
0065327c      uint16_t xmm0_26[0x8] = _mm_shufflehi_epi16(xmm0_25, 0x1b);
00653281      int32_t xmm5_36[0x4] = __paddsw_xmmdq_memdq(xmm5_35, data_832be0);
00653289      int32_t xmm6_26[0x4] = _mm_adds_epi16(xmm5_34, xmm2_25);
0065328d      *(uint128_t*)((char*)edx + 0x70) = xmm0_26;
00653296      int128_t xmm2_26 = data_832c70;
0065329e      int16_t xmm4_24[0x8] = _mm_adds_epi16(xmm4_23, xmm5_36);
006532a2      uint16_t xmm6_27[0x8] = _mm_shufflehi_epi16(xmm6_26, 0x1b);
006532a7      int128_t xmm0_27 = data_832c70;
006532af      int16_t xmm2_27[0x8] = _mm_mulhi_epi16(xmm2_26, xmm4_24);
006532b3      *(uint128_t*)((char*)edx + 0x30) = xmm6_27;
006532b8      int32_t xmm1_37[0x4] = _mm_subs_epi16(xmm4_23, xmm5_36);
006532bc      int32_t xmm6_28[0x4] = *(uint128_t*)edx;
006532c0      int32_t xmm0_28[0x4] = _mm_mulhi_epi16(xmm0_27, xmm1_37);
006532c4      int32_t xmm5_37[0x4] = *(uint128_t*)((char*)edx + 0x40);
006532cd      uint16_t xmm4_26[0x8] = (_mm_adds_epi16(xmm4_24, xmm2_27) | data_832be0);
006532d5      int32_t xmm5_38[0x4] = _mm_adds_epi16(xmm5_37, xmm6_28);
006532d9      int32_t xmm6_29[0x4] = __psubsw_xmmdq_memdq(xmm6_28, *(uint128_t*)((char*)edx + 0x40));
006532de      int32_t xmm0_29[0x4] = _mm_adds_epi16(xmm0_28, xmm1_37);
006532e2      uint16_t xmm4_27[0x8] = _mm_shufflehi_epi16(xmm4_26, 0x1b);
006532e7      int32_t xmm0_30[0x4] = (xmm0_29 | data_832be0);
006532fb      int32_t xmm5_40[0x4] = __paddsw_xmmdq_memdq(_mm_adds_epi16(xmm5_38, xmm7_14), data_832c00);
00653303      int32_t xmm2_29[0x4] = _mm_subs_epi16(xmm5_38, xmm7_14);
00653307      int32_t xmm7_15[0x4] = *(uint128_t*)((char*)edx + 0x70);
0065330c      int32_t xmm6_30[0x4] = _mm_adds_epi16(xmm6_29, xmm3_15);
00653310      int32_t xmm5_41[0x4] = _mm_shufflehi_epi16(xmm5_40, 0x1b);
00653315      int32_t xmm6_31[0x4] = __paddsw_xmmdq_memdq(xmm6_30, data_832c00);
00653321      int16_t xmm7_17[0x8] = _mm_srai_epi16(_mm_adds_epi16(xmm7_15, xmm5_41), 5);
00653326      int32_t xmm1_39[0x4] = _mm_subs_epi16(xmm6_29, xmm3_15);
0065332a      int32_t xmm6_32[0x4] = _mm_shufflehi_epi16(xmm6_31, 0x1b);
0065332f      int32_t xmm2_30[0x4] = __paddsw_xmmdq_memdq(xmm2_29, data_832c10);
0065333b      int32_t xmm1_40[0x4] = __paddsw_xmmdq_memdq(xmm1_39, data_832c10);
00653343      int32_t xmm6_33[0x4] = _mm_adds_epi16(xmm6_32, xmm4_27);
00653347      uint16_t xmm2_31[0x8] = _mm_shufflehi_epi16(xmm2_30, 0x1b);
0065334c      int32_t xmm7_18[0x4] = __paddsw_xmmdq_memdq(xmm7_17, data_832c20);
00653360      *(uint128_t*)edx = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm7_18, xmm7_18), data_832c30);
00653364      int16_t xmm6_34[0x8] = _mm_srai_epi16(xmm6_33, 5);
0065336d      int32_t xmm1_41[0x4] = _mm_adds_epi16(xmm1_40, xmm0_30);
00653371      int32_t xmm6_35[0x4] = __paddsw_xmmdq_memdq(xmm6_34, data_832c20);
00653385      *(uint128_t*)((char*)edx + 0x10) = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm6_35, xmm6_35), data_832c30);
0065338a      int16_t xmm1_42[0x8] = _mm_srai_epi16(xmm1_41, 5);
0065338f      int32_t xmm6_38[0x4] = *(uint128_t*)((char*)edx + 0x30);
00653394      int32_t xmm7_22[0x4] = _mm_subs_epi16(xmm1_40, xmm0_30);
00653398      uint16_t xmm1_43[0x8] = _mm_shufflehi_epi16(xmm1_42, 0x1b);
0065339d      int32_t xmm6_39[0x4] = _mm_adds_epi16(xmm6_38, xmm2_31);
006533a1      int32_t xmm2_32[0x4] = __psubsw_xmmdq_memdq(xmm2_31, *(uint128_t*)((char*)edx + 0x30));
006533a6      int16_t xmm7_23[0x8] = _mm_srai_epi16(xmm7_22, 5);
006533ab      int32_t xmm1_44[0x4] = __paddsw_xmmdq_memdq(xmm1_43, data_832c20);
006533bf      *(uint128_t*)((char*)edx + 0x20) = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm1_44, xmm1_44), data_832c30);
006533c4      int16_t xmm6_40[0x8] = _mm_srai_epi16(xmm6_39, 5);
006533c9      int32_t xmm5_42[0x4] = __psubsw_xmmdq_memdq(xmm5_41, *(uint128_t*)((char*)edx + 0x70));
006533ce      int16_t xmm2_33[0x8] = _mm_srai_epi16(xmm2_32, 5);
006533d3      int32_t xmm6_41[0x4] = __paddsw_xmmdq_memdq(xmm6_40, data_832c20);
006533e7      *(uint128_t*)((char*)edx + 0x30) = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm6_41, xmm6_41), data_832c30);
006533ec      int32_t xmm3_17[0x4] = _mm_subs_epi16(xmm6_32, xmm4_27);
006533f0      uint16_t xmm7_24[0x8] = _mm_shufflehi_epi16(xmm7_23, 0x1b);
006533f5      int32_t xmm2_34[0x4] = __paddsw_xmmdq_memdq(xmm2_33, data_832c20);
00653409      *(uint128_t*)((char*)edx + 0x40) = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm2_34, xmm2_34), data_832c30);
0065340e      int16_t xmm3_18[0x8] = _mm_srai_epi16(xmm3_17, 5);
00653413      int32_t xmm7_25[0x4] = __paddsw_xmmdq_memdq(xmm7_24, data_832c20);
00653427      *(uint128_t*)((char*)edx + 0x50) = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm7_25, xmm7_25), data_832c30);
0065342c      int16_t xmm5_43[0x8] = _mm_srai_epi16(xmm5_42, 5);
00653431      int32_t xmm3_19[0x4] = __paddsw_xmmdq_memdq(xmm3_18, data_832c20);
00653445      *(uint128_t*)((char*)edx + 0x60) = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm3_19, xmm3_19), data_832c30);
0065344a      int32_t xmm5_44[0x4] = __paddsw_xmmdq_memdq(xmm5_43, data_832c20);
0065345e      *(uint128_t*)((char*)edx + 0x70) = __punpcklbw_xmmdq_memdq(_mm_packus_epi16(xmm5_44, xmm5_44), data_832c30);
00652df0  }

00653b05                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00653b10  int32_t _own_eb_write_bytes_m5(int64_t* arg1, int32_t arg2, int32_t arg3)

00653b10  {
00653b1e      int32_t i_1 = *(uint32_t*)((char*)arg1 + 0xc);
00653b21      char* eax = arg1[2];
00653b21      
00653b26      if (i_1 != 0)
00653b26      {
00653b28          uint64_t st0 = *(uint64_t*)arg1;
00653b57          int32_t i;
00653b57          
00653b57          do
00653b57          {
00653b35              int32_t ecx_1 = _m_psrlqi(st0, 0x38);
00653b3b              *(uint8_t*)eax = ecx_1;
00653b3d              eax = &eax[1];
00653b3d              
00653b44              if (ecx_1 == 0xff)
00653b44              {
00653b46                  *(uint8_t*)eax = 0;
00653b49                  *(uint32_t*)((char*)arg1 + 0x1c) += 1;
00653b4c                  eax = &eax[1];
00653b44              }
00653b44              
00653b4d              *(uint32_t*)((char*)arg1 + 0x1c) += 1;
00653b50              st0 = _m_psllqi(st0, 8);
00653b54              i = i_1;
00653b54              i_1 -= 8;
00653b57          } while (i > 8);
00653b59          *(uint32_t*)((char*)arg1 + 0xc) = 0;
00653b60          *(uint64_t*)arg1 = 0;
00653b26      }
00653b26      
00653b65      char* ecx_2 = nullptr;
00653b65      
00653b69      if (arg2 != 0)
00653b69      {
00653b7a          do
00653b7a          {
00653b70              i_1 = ecx_2[arg2];
00653b73              ecx_2 = &ecx_2[1];
00653b74              *(uint8_t*)eax = i_1;
00653b76              eax = &eax[1];
00653b7a          } while (ecx_2 != arg3);
00653b69      }
00653b69      else
00653b6b          arg1[2] = eax;
00653b6b      
00653b7c      arg1[2] = eax;
00653b8a      return 0;
00653b10  }

00653b8b                                   05 00 00 00 00                                                             .....

00653b90  int32_t _own_eb_write_bits_m5(char arg1[0x8] @ st1, int32_t arg2, int32_t arg3, int64_t* arg4)

00653b90  {
00653ba3      int32_t esi_1 = (arg3 + *(uint32_t*)((char*)arg4 + 0xc));
00653ba6      uint64_t st7 = *(uint64_t*)arg4;
00653baf      arg1 = _m_pcmpeqb(arg1, arg1);
00653bb5      uint64_t temp0_1 = _m_psllq(((uint64_t)arg2), ((uint64_t)(0x40 - esi_1)));
00653bb8      *(uint32_t*)((char*)arg4 + 0xc) = esi_1;
00653bbb      int32_t result = 0;
00653bbd      st7 |= temp0_1;
00653bc3      uint64_t st0 = st7;
00653bc3      
00653bc6      if (esi_1 > 0x20)
00653bc6      {
00653bcc          void* edx_1 = arg4[2];
00653bd7          result = 0xffffffe4;
00653bd7          
00653bdc          if ((arg4[3] - edx_1) >= 4)
00653bdc          {
00653be2              while (true)
00653be2              {
00653be2                  *(uint32_t*)((char*)arg4 + 0x1c) += 4;
00653be6                  uint64_t temp0_2 = _m_psrlqi(st0, 0x20);
00653bea                  char temp0_3[0x8] = _m_pcmpeqb(arg1, temp0_2);
00653bf0                  uint64_t temp0_4 = _m_psrlqi(temp0_2, 8);
00653bf4                  edx_1 += 4;
00653bf7                  int32_t eax_1 = temp0_3[0];
00653bf7                  
00653bfc                  if (eax_1 == 0)
00653bfc                  {
00653bfe                      *(uint32_t*)((char*)edx_1 + 0x24);
00653c08                      esi_1 -= 0x20;
00653c0b                      st0 = _m_psradi(_m_pslldi(_m_punpckhwd(temp0_4, temp0_2), 0x10), 0x10);
00653c0f                      st0 = _m_packssdw(st0, st0);
00653c19                      st0 = _m_punpcklwd(_m_psrlqi(st0, 0x10), st0);
00653c1c                      st7 = _m_psllqi(st7, 0x20);
00653c20                      *(uint32_t*)((char*)edx_1 - 4) = st0;
00653c24                      break;
00653bfc                  }
00653bfc                  
00653c29                  uint32_t eax_2 = (eax_1 >> 8);
00653c31                  uint64_t st4;
00653c31                  uint64_t st5;
00653c31                  
00653c31                  if (eax_2 >= 0xff0000)
00653c31                  {
00653c59                      if (eax_2 == 0xff0000)
00653c59                      {
00653c70                          uint64_t temp0_12 = _m_psrlqi(st7, 0x28);
00653c7b                          esi_1 -= 0x18;
00653c84                          uint64_t temp0_15 = _m_psllqi(_m_punpckhwd(_m_psrlqi(temp0_12, 8), temp0_12), 0x10);
00653c88                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653c8b                          st5 = (temp0_15 | data_832f90);
00653c92                          st7 = _m_psllqi(st7, 0x18);
00653c96                          st0 = st7;
00653c9c                          *(uint32_t*)((char*)edx_1 - 4) = st5;
00653c9c                          
00653ca0                          if (esi_1 < 0x20)
00653ca0                              break;
00653c59                      }
00653c59                      else if (eax_2 != 0xffff00)
00653c62                      {
00653d2b                          uint64_t temp0_28 = _m_psllqi(st7, 0x18);
00653d37                          esi_1 -= 0x10;
00653d3a                          st4 = (_m_psllqi(_m_psrlqi(st7, 0x30), 0x10) | data_832f90);
00653d41                          st7 = _m_psrlqi(temp0_28, 8);
00653d45                          st0 = st7;
00653d4b                          *(uint32_t*)((char*)edx_1 - 4) = st4;
00653d4f                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653d4f                          
00653d52                          if (esi_1 < 0x20)
00653d52                              break;
00653c62                      }
00653c62                      else
00653c62                      {
00653dcf                          st5 = data_832fa0;
00653dd6                          st7 = _m_psllqi(st7, 0x10);
00653dda                          st0 = st7;
00653ddd                          esi_1 -= 0x10;
00653de0                          *(uint32_t*)((char*)edx_1 - 4) = st5;
00653de4                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653de4                          
00653dea                          if (esi_1 < 0x20)
00653dea                              break;
00653c62                      }
00653c31                  }
00653c31                  else if (eax_2 >= 0xff00)
00653c38                  {
00653c4c                      if (eax_2 == 0xffff)
00653c4c                      {
00653d60                          uint64_t temp0_33 = _m_psllqi(st7, 0x18);
00653d68                          st4 = (_m_psrlqi(st7, 0x38) | data_832fa8);
00653d6f                          st7 = _m_psrlqi(temp0_33, 8);
00653d73                          st0 = st7;
00653d76                          esi_1 -= 0x10;
00653d79                          *(uint32_t*)((char*)edx_1 - 4) = st4;
00653d7d                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653d7d                          
00653d83                          if (esi_1 < 0x20)
00653d83                              break;
00653c4c                      }
00653c4c                      else
00653c4c                      {
00653cab                          st4 = st7;
00653cae                          st7 = _m_psllqi(st7, 0x18);
00653cb2                          uint64_t temp0_19 = _m_psrlqi(st4, 0x28);
00653cb6                          st0 = st7;
00653cc0                          st4 = (_m_pslldi(temp0_19, 0x18) | data_832f98);
00653cce                          esi_1 -= 0x18;
00653cd1                          *(uint32_t*)((char*)edx_1 - 4) = (_m_psrlqi(temp0_19, 0x10) | st4);
00653cd5                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653cd5                          
00653cdb                          if (esi_1 < 0x20)
00653cdb                              break;
00653c4c                      }
00653c38                  }
00653c38                  else if (eax_2 == 0)
00653c3c                  {
00653d8d                      uint64_t temp0_37 = _m_psllqi(st7, 0x20);
00653d91                      uint64_t temp0_38 = _m_psrlqi(st7, 0x20);
00653d95                      arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653da6                      esi_1 -= 0x18;
00653da9                      st4 = _m_psradi(_m_pslldi(_m_punpckhwd(_m_psrlqi(temp0_38, 8), temp0_38), 0x10), 0x10);
00653dad                      st4 = _m_packssdw(st4, st4);
00653db7                      st4 = _m_punpcklwd(_m_psrlqi(st4, 0x10), st4);
00653dba                      st7 = _m_psrlqi(temp0_37, 8);
00653dc1                      *(uint32_t*)((char*)edx_1 - 4) = st4;
00653dc5                      st0 = st7;
00653dc5                      
00653dc8                      if (esi_1 < 0x20)
00653dc8                          break;
00653c3c                  }
00653c3c                  else
00653c3c                  {
00653cf0                      uint64_t temp0_23 = _m_psllqi(data_832f98, 0x18);
00653cf4                      uint64_t temp0_24 = _m_psrlqi(st7, 0x28);
00653cf8                      esi_1 -= 0x18;
00653d09                      st5 = (_m_psrlqi((temp0_23 | temp0_24), 0x10) | (temp0_24 & data_832f98));
00653d0c                      st7 = _m_psllqi(st7, 0x18);
00653d10                      arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653d16                      *(uint32_t*)((char*)edx_1 - 4) = st5;
00653d1a                      st0 = st7;
00653d1a                      
00653d1d                      if (esi_1 < 0x20)
00653d1d                          break;
00653c3c                  }
00653be2              }
00653be2              
00653df1              result = 0;
00653df3              arg4[2] = edx_1;
00653df6              *(uint32_t*)((char*)arg4 + 0xc) = esi_1;
00653bdc          }
00653bc6      }
00653bc6      
00653df9      *(uint64_t*)arg4 = st7;
00653e02      return result;
00653b90  }

00653e03           8d a4 24 00 00 00 00 8d 9b 00 00 00 00                                                     ..$..........

00653e10  int32_t _own_eb_write_bits_file_m5(char arg1[0x8] @ st1, int32_t arg2, int32_t arg3, int64_t* arg4)

00653e10  {
00653e23      int32_t esi_1 = (arg3 + *(uint32_t*)((char*)arg4 + 0xc));
00653e26      uint64_t st7 = *(uint64_t*)arg4;
00653e2f      arg1 = _m_pcmpeqb(arg1, arg1);
00653e35      uint64_t temp0_1 = _m_psllq(((uint64_t)arg2), ((uint64_t)(0x40 - esi_1)));
00653e38      *(uint32_t*)((char*)arg4 + 0xc) = esi_1;
00653e3e      st7 |= temp0_1;
00653e41      uint64_t st0 = st7;
00653e44      int32_t result;
00653e44      
00653e44      if (esi_1 <= 0x20)
0065408a          result = 0;
00653e44      else
00653e44      {
00653e4a          void* edx_1 = arg4[2];
00653e4a          
00653e55          if ((arg4[3] - edx_1) > 0x16)
00653e55              goto label_653e75;
00653e55          
00653e58          result = _flush_mbuffer_to_file(arg4);
00653e58          
00653e62          if (result == 0)
00653e62          {
00653e68              edx_1 = &arg4[8];
00653e72              arg4[3] = ((char*)edx_1 + 0x1000);
00653e75          label_653e75:
00653e75              
00653e75              while (true)
00653e75              {
00653e75                  *(uint32_t*)((char*)arg4 + 0x1c) += 4;
00653e79                  uint64_t temp0_2 = _m_psrlqi(st0, 0x20);
00653e7d                  char temp0_3[0x8] = _m_pcmpeqb(arg1, temp0_2);
00653e83                  uint64_t temp0_4 = _m_psrlqi(temp0_2, 8);
00653e87                  edx_1 += 4;
00653e8a                  int32_t eax_5 = temp0_3[0];
00653e8a                  
00653e8f                  if (eax_5 == 0)
00653e8f                  {
00653e91                      *(uint32_t*)((char*)edx_1 + 0x24);
00653e9b                      esi_1 -= 0x20;
00653e9e                      st0 = _m_psradi(_m_pslldi(_m_punpckhwd(temp0_4, temp0_2), 0x10), 0x10);
00653ea2                      st0 = _m_packssdw(st0, st0);
00653eac                      st0 = _m_punpcklwd(_m_psrlqi(st0, 0x10), st0);
00653eaf                      st7 = _m_psllqi(st7, 0x20);
00653eb3                      *(uint32_t*)((char*)edx_1 - 4) = st0;
00653eb7                      break;
00653e8f                  }
00653e8f                  
00653ebc                  uint32_t eax_6 = (eax_5 >> 8);
00653ec4                  uint64_t st4;
00653ec4                  uint64_t st5;
00653ec4                  
00653ec4                  if (eax_6 >= 0xff0000)
00653ec4                  {
00653eec                      if (eax_6 == 0xff0000)
00653eec                      {
00653f03                          uint64_t temp0_12 = _m_psrlqi(st7, 0x28);
00653f0e                          esi_1 -= 0x18;
00653f17                          uint64_t temp0_15 = _m_psllqi(_m_punpckhwd(_m_psrlqi(temp0_12, 8), temp0_12), 0x10);
00653f1b                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653f1e                          st5 = (temp0_15 | data_832f90);
00653f25                          st7 = _m_psllqi(st7, 0x18);
00653f29                          st0 = st7;
00653f2f                          *(uint32_t*)((char*)edx_1 - 4) = st5;
00653f2f                          
00653f33                          if (esi_1 < 0x20)
00653f33                              break;
00653eec                      }
00653eec                      else if (eax_6 != 0xffff00)
00653ef5                      {
00653fbe                          uint64_t temp0_28 = _m_psllqi(st7, 0x18);
00653fca                          esi_1 -= 0x10;
00653fcd                          st4 = (_m_psllqi(_m_psrlqi(st7, 0x30), 0x10) | data_832f90);
00653fd4                          st7 = _m_psrlqi(temp0_28, 8);
00653fd8                          st0 = st7;
00653fde                          *(uint32_t*)((char*)edx_1 - 4) = st4;
00653fe2                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653fe2                          
00653fe5                          if (esi_1 < 0x20)
00653fe5                              break;
00653ef5                      }
00653ef5                      else
00653ef5                      {
00654062                          st5 = data_832fa0;
00654069                          st7 = _m_psllqi(st7, 0x10);
0065406d                          st0 = st7;
00654070                          esi_1 -= 0x10;
00654073                          *(uint32_t*)((char*)edx_1 - 4) = st5;
00654077                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00654077                          
0065407d                          if (esi_1 < 0x20)
0065407d                              break;
00653ef5                      }
00653ec4                  }
00653ec4                  else if (eax_6 >= 0xff00)
00653ecb                  {
00653edf                      if (eax_6 == 0xffff)
00653edf                      {
00653ff3                          uint64_t temp0_33 = _m_psllqi(st7, 0x18);
00653ffb                          st4 = (_m_psrlqi(st7, 0x38) | data_832fa8);
00654002                          st7 = _m_psrlqi(temp0_33, 8);
00654006                          st0 = st7;
00654009                          esi_1 -= 0x10;
0065400c                          *(uint32_t*)((char*)edx_1 - 4) = st4;
00654010                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00654010                          
00654016                          if (esi_1 < 0x20)
00654016                              break;
00653edf                      }
00653edf                      else
00653edf                      {
00653f3e                          st4 = st7;
00653f41                          st7 = _m_psllqi(st7, 0x18);
00653f45                          uint64_t temp0_19 = _m_psrlqi(st4, 0x28);
00653f49                          st0 = st7;
00653f53                          st4 = (_m_pslldi(temp0_19, 0x18) | data_832f98);
00653f61                          esi_1 -= 0x18;
00653f64                          *(uint32_t*)((char*)edx_1 - 4) = (_m_psrlqi(temp0_19, 0x10) | st4);
00653f68                          arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653f68                          
00653f6e                          if (esi_1 < 0x20)
00653f6e                              break;
00653edf                      }
00653ecb                  }
00653ecb                  else if (eax_6 == 0)
00653ecf                  {
00654020                      uint64_t temp0_37 = _m_psllqi(st7, 0x20);
00654024                      uint64_t temp0_38 = _m_psrlqi(st7, 0x20);
00654028                      arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00654039                      esi_1 -= 0x18;
0065403c                      st4 = _m_psradi(_m_pslldi(_m_punpckhwd(_m_psrlqi(temp0_38, 8), temp0_38), 0x10), 0x10);
00654040                      st4 = _m_packssdw(st4, st4);
0065404a                      st4 = _m_punpcklwd(_m_psrlqi(st4, 0x10), st4);
0065404d                      st7 = _m_psrlqi(temp0_37, 8);
00654054                      *(uint32_t*)((char*)edx_1 - 4) = st4;
00654058                      st0 = st7;
00654058                      
0065405b                      if (esi_1 < 0x20)
0065405b                          break;
00653ecf                  }
00653ecf                  else
00653ecf                  {
00653f83                      uint64_t temp0_23 = _m_psllqi(data_832f98, 0x18);
00653f87                      uint64_t temp0_24 = _m_psrlqi(st7, 0x28);
00653f8b                      esi_1 -= 0x18;
00653f9c                      st5 = (_m_psrlqi((temp0_23 | temp0_24), 0x10) | (temp0_24 & data_832f98));
00653f9f                      st7 = _m_psllqi(st7, 0x18);
00653fa3                      arg1 = _m_pcmpeqb(temp0_3, temp0_3);
00653fa9                      *(uint32_t*)((char*)edx_1 - 4) = st5;
00653fad                      st0 = st7;
00653fad                      
00653fb0                      if (esi_1 < 0x20)
00653fb0                          break;
00653ecf                  }
00653e75              }
00653e75              
00654084              arg4[2] = edx_1;
00654087              *(uint32_t*)((char*)arg4 + 0xc) = esi_1;
0065408a              result = 0;
00653e62          }
00653e44      }
00653e44      
0065408c      *(uint64_t*)arg4 = st7;
00654095      return result;
00653e10  }

00654096                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

006540a0  int64_t* _own_rgb_to_ycbcr_111_full_mcu_m5(int64_t* arg1, int32_t arg2, int64_t* arg3, int64_t* arg4, int64_t* arg5)

006540a0  {
006540a9      int64_t* esi = arg1;
006540ac      int64_t* edi = arg3;
006540af      int64_t* result = arg4;
006540b2      int64_t* ebx = arg5;
006540b8      int32_t i_1 = 8;
00654355      int32_t i;
00654355      
00654355      do
00654355      {
006540bd          int64_t st1 = *(uint64_t*)esi;
006540c0          int64_t st7 = data_832fb0;
006540cd          uint64_t temp0_1 = _m_psrlqi(st1, 0x18);
006540d1          int64_t st0 = _m_punpckhwd(st1, 0);
006540d4          st1 = _m_punpckhwd(temp0_1, 0);
006540d7          int64_t st3 = st0;
006540da          int64_t st4 = st1;
006540dd          st0 = _m_pmaddwd(st0, st7);
006540e0          int64_t st5 = st3;
006540e3          st1 = _m_pmaddwd(st1, st7);
006540e6          int64_t st6 = st4;
006540e9          int64_t st2 = st0;
006540ec          st7 = data_832fb8;
006540f3          st0 = _m_punpckldq(st0, st1);
006540f6          st3 = _m_pmaddwd(st3, st7);
006540f9          st4 = _m_pmaddwd(st4, st7);
006540fc          int64_t temp0_9 = _m_punpckhdq(st2, st1);
006540ff          st7 = data_832fc0;
00654106          int64_t temp0_10 = _m_paddd(st0, temp0_9);
00654109          st5 = _m_pmaddwd(st5, st7);
0065410c          int64_t temp0_12 = __psubd_mmxq_memq(temp0_10, data_832fe0);
00654113          st6 = _m_pmaddwd(st6, st7);
00654116          st1 = st3;
00654119          st2 = st4;
0065411c          st0 = _m_psradi(temp0_12, 8);
00654120          st3 = _m_punpckldq(st3, st5);
00654123          st4 = _m_punpckldq(st4, st6);
00654126          st0 = _m_packssdw(st0, st0);
00654129          int64_t temp0_18 = _m_punpckhdq(st1, st5);
0065412c          int64_t temp0_19 = _m_punpckhdq(st2, st6);
0065412f          int64_t temp0_20 = _m_paddd(temp0_18, st3);
00654132          int64_t temp0_21 = _m_paddd(temp0_19, st4);
00654135          int64_t temp0_22 = __paddd_mmxq_memq(temp0_20, data_832fe8);
0065413c          int64_t temp0_23 = __paddd_mmxq_memq(temp0_21, data_832fe8);
00654143          st1 = _m_psradi(temp0_22, 8);
00654147          st2 = _m_psradi(temp0_23, 8);
00654151          st1 = _m_punpcklwd(_m_packssdw(st1, st1), _m_packssdw(st2, st2));
00654154          st3 = *(uint64_t*)((char*)esi + 6);
0065415e          st7 = data_832fb0;
00654165          uint64_t temp0_29 = _m_psrlqi(st3, 0x18);
00654169          st3 = _m_punpckhwd(st3, 0);
0065416c          st4 = _m_punpckhwd(temp0_29, 0);
00654175          st5 = _m_pmaddwd(st3, st7);
00654178          st6 = _m_pmaddwd(st4, st7);
0065417e          st2 = _m_punpckldq(st5, st6);
00654181          st7 = st4;
00654187          int64_t temp0_36 = _m_paddd(_m_punpckhdq(st5, st6), st2);
0065418a          st6 = st3;
0065418d          st2 = data_832fb8;
00654194          int64_t temp0_37 = __psubd_mmxq_memq(temp0_36, data_832fe0);
0065419b          st3 = _m_pmaddwd(st3, st2);
0065419e          st4 = _m_pmaddwd(st4, st2);
006541a1          st5 = _m_psradi(temp0_37, 8);
006541a5          st2 = data_832fc0;
006541ac          st5 = _m_packssdw(st5, st5);
006541af          st6 = _m_pmaddwd(st6, st2);
006541b2          st0 = _m_punpckldq(st0, st5);
006541b5          st7 = _m_pmaddwd(st7, st2);
006541b8          *(uint64_t*)edi = st0;
006541bb          st5 = st3;
006541be          st2 = st4;
006541c1          st3 = _m_punpckldq(st3, st6);
006541c4          st4 = _m_punpckldq(st4, st7);
006541c7          int64_t temp0_47 = _m_punpckhdq(st5, st6);
006541ca          int64_t temp0_48 = _m_punpckhdq(st2, st7);
006541cd          int64_t temp0_49 = _m_paddd(st3, temp0_47);
006541d0          int64_t temp0_50 = _m_paddd(st4, temp0_48);
006541d3          int64_t temp0_51 = __paddd_mmxq_memq(temp0_49, data_832fe8);
006541da          int64_t temp0_52 = __paddd_mmxq_memq(temp0_50, data_832fe8);
006541e1          st3 = _m_psradi(temp0_51, 8);
006541e5          st4 = _m_psradi(temp0_52, 8);
006541ef          st3 = _m_punpcklwd(_m_packssdw(st3, st3), _m_packssdw(st4, st4));
006541f5          st0 = _m_punpckldq(st1, st3);
006541f8          int64_t temp0_59 = _m_punpckhdq(st1, st3);
006541fb          *(uint64_t*)result = st0;
006541fe          *(uint64_t*)ebx = temp0_59;
00654201          st2 = *(uint64_t*)((char*)esi + 0xc);
00654205          st7 = data_832fb0;
00654212          uint64_t temp0_60 = _m_psrlqi(st2, 0x18);
00654216          st0 = _m_punpckhwd(st2, 0);
00654219          st2 = _m_punpckhwd(temp0_60, 0);
0065421c          st3 = st0;
0065421f          st4 = st2;
00654222          st0 = _m_pmaddwd(st0, st7);
00654225          st5 = st3;
00654228          st2 = _m_pmaddwd(st2, st7);
0065422b          st6 = st4;
0065422e          st1 = st0;
00654231          st7 = data_832fb8;
00654238          st0 = _m_punpckldq(st0, st2);
0065423b          st3 = _m_pmaddwd(st3, st7);
0065423e          st4 = _m_pmaddwd(st4, st7);
00654241          int64_t temp0_68 = _m_punpckhdq(st1, st2);
00654244          st7 = data_832fc0;
0065424b          int64_t temp0_69 = _m_paddd(st0, temp0_68);
0065424e          st5 = _m_pmaddwd(st5, st7);
00654251          int64_t temp0_71 = __psubd_mmxq_memq(temp0_69, data_832fe0);
00654258          st6 = _m_pmaddwd(st6, st7);
0065425b          st2 = st3;
0065425e          st1 = st4;
00654261          st0 = _m_psradi(temp0_71, 8);
00654265          st3 = _m_punpckldq(st3, st5);
00654268          st4 = _m_punpckldq(st4, st6);
0065426b          st0 = _m_packssdw(st0, st0);
0065426e          int64_t temp0_77 = _m_punpckhdq(st2, st5);
00654271          int64_t temp0_78 = _m_punpckhdq(st1, st6);
00654274          int64_t temp0_79 = _m_paddd(temp0_77, st3);
00654277          int64_t temp0_80 = _m_paddd(temp0_78, st4);
0065427a          int64_t temp0_81 = __paddd_mmxq_memq(temp0_79, data_832fe8);
00654281          int64_t temp0_82 = __paddd_mmxq_memq(temp0_80, data_832fe8);
00654288          st2 = _m_psradi(temp0_81, 8);
0065428c          st1 = _m_psradi(temp0_82, 8);
00654296          st2 = _m_punpcklwd(_m_packssdw(st2, st2), _m_packssdw(st1, st1));
00654299          st3 = *(uint64_t*)((char*)esi + 0x12);
006542a3          st7 = data_832fb0;
006542aa          uint64_t temp0_88 = _m_psrlqi(st3, 0x18);
006542ae          st3 = _m_punpckhwd(st3, 0);
006542b1          st4 = _m_punpckhwd(temp0_88, 0);
006542ba          st5 = _m_pmaddwd(st3, st7);
006542bd          st6 = _m_pmaddwd(st4, st7);
006542c3          st1 = _m_punpckldq(st5, st6);
006542c6          st7 = st4;
006542cc          int64_t temp0_95 = _m_paddd(_m_punpckhdq(st5, st6), st1);
006542cf          st6 = st3;
006542d2          st1 = data_832fb8;
006542d9          int64_t temp0_96 = __psubd_mmxq_memq(temp0_95, data_832fe0);
006542e0          st3 = _m_pmaddwd(st3, st1);
006542e3          st4 = _m_pmaddwd(st4, st1);
006542e6          st5 = _m_psradi(temp0_96, 8);
006542ea          st1 = data_832fc0;
006542f1          st5 = _m_packssdw(st5, st5);
006542f4          st6 = _m_pmaddwd(st6, st1);
006542f7          st0 = _m_punpckldq(st0, st5);
006542fa          st7 = _m_pmaddwd(st7, st1);
006542fd          edi[1] = st0;
00654301          st5 = st3;
00654304          st1 = st4;
00654307          st3 = _m_punpckldq(st3, st6);
0065430a          st4 = _m_punpckldq(st4, st7);
0065430d          int64_t temp0_106 = _m_punpckhdq(st5, st6);
00654310          int64_t temp0_107 = _m_punpckhdq(st1, st7);
00654313          int64_t temp0_108 = _m_paddd(st3, temp0_106);
00654316          int64_t temp0_109 = _m_paddd(st4, temp0_107);
00654319          int64_t temp0_110 = __paddd_mmxq_memq(temp0_108, data_832fe8);
00654320          int64_t temp0_111 = __paddd_mmxq_memq(temp0_109, data_832fe8);
00654327          st3 = _m_psradi(temp0_110, 8);
0065432b          st4 = _m_psradi(temp0_111, 8);
00654335          st3 = _m_punpcklwd(_m_packssdw(st3, st3), _m_packssdw(st4, st4));
0065433b          edi = &edi[2];
0065433e          st0 = _m_punpckldq(st2, st3);
00654341          int64_t temp0_118 = _m_punpckhdq(st2, st3);
00654344          result[1] = st0;
00654348          ebx[1] = temp0_118;
0065434c          result = &result[2];
0065434f          ebx = &ebx[2];
00654352          esi += arg2;
00654354          i = i_1;
00654354          i_1 -= 1;
00654355      } while (i != 1);
00654362      return result;
006540a0  }

00654363           8d a4 24 00 00 00 00 8d 9b 00 00 00 00                                                     ..$..........

00654370  int64_t* _own_bgr_to_ycbcr_111_full_mcu_m5(int64_t* arg1, int32_t arg2, int64_t* arg3, int64_t* arg4, int64_t* arg5)

00654370  {
00654379      int64_t* esi = arg1;
0065437c      int64_t* edi = arg3;
0065437f      int64_t* result = arg4;
00654382      int64_t* ebx = arg5;
00654388      int32_t i_1 = 8;
00654625      int32_t i;
00654625      
00654625      do
00654625      {
0065438d          int64_t st1 = *(uint64_t*)esi;
00654390          int64_t st7 = data_832fc8;
0065439d          uint64_t temp0_1 = _m_psrlqi(st1, 0x18);
006543a1          int64_t st0 = _m_punpckhwd(st1, 0);
006543a4          st1 = _m_punpckhwd(temp0_1, 0);
006543a7          int64_t st3 = st0;
006543aa          int64_t st4 = st1;
006543ad          st0 = _m_pmaddwd(st0, st7);
006543b0          int64_t st5 = st3;
006543b3          st1 = _m_pmaddwd(st1, st7);
006543b6          int64_t st6 = st4;
006543b9          int64_t st2 = st0;
006543bc          st7 = data_832fd0;
006543c3          st0 = _m_punpckldq(st0, st1);
006543c6          st3 = _m_pmaddwd(st3, st7);
006543c9          st4 = _m_pmaddwd(st4, st7);
006543cc          int64_t temp0_9 = _m_punpckhdq(st2, st1);
006543cf          st7 = data_832fd8;
006543d6          int64_t temp0_10 = _m_paddd(st0, temp0_9);
006543d9          st5 = _m_pmaddwd(st5, st7);
006543dc          int64_t temp0_12 = __psubd_mmxq_memq(temp0_10, data_832fe0);
006543e3          st6 = _m_pmaddwd(st6, st7);
006543e6          st1 = st3;
006543e9          st2 = st4;
006543ec          st0 = _m_psradi(temp0_12, 8);
006543f0          st3 = _m_punpckldq(st3, st5);
006543f3          st4 = _m_punpckldq(st4, st6);
006543f6          st0 = _m_packssdw(st0, st0);
006543f9          int64_t temp0_18 = _m_punpckhdq(st1, st5);
006543fc          int64_t temp0_19 = _m_punpckhdq(st2, st6);
006543ff          int64_t temp0_20 = _m_paddd(temp0_18, st3);
00654402          int64_t temp0_21 = _m_paddd(temp0_19, st4);
00654405          int64_t temp0_22 = __paddd_mmxq_memq(temp0_20, data_832fe8);
0065440c          int64_t temp0_23 = __paddd_mmxq_memq(temp0_21, data_832fe8);
00654413          st1 = _m_psradi(temp0_22, 8);
00654417          st2 = _m_psradi(temp0_23, 8);
00654421          st1 = _m_punpcklwd(_m_packssdw(st1, st1), _m_packssdw(st2, st2));
00654424          st3 = *(uint64_t*)((char*)esi + 6);
0065442e          st7 = data_832fc8;
00654435          uint64_t temp0_29 = _m_psrlqi(st3, 0x18);
00654439          st3 = _m_punpckhwd(st3, 0);
0065443c          st4 = _m_punpckhwd(temp0_29, 0);
00654445          st5 = _m_pmaddwd(st3, st7);
00654448          st6 = _m_pmaddwd(st4, st7);
0065444e          st2 = _m_punpckldq(st5, st6);
00654451          st7 = st4;
00654457          int64_t temp0_36 = _m_paddd(_m_punpckhdq(st5, st6), st2);
0065445a          st6 = st3;
0065445d          st2 = data_832fd0;
00654464          int64_t temp0_37 = __psubd_mmxq_memq(temp0_36, data_832fe0);
0065446b          st3 = _m_pmaddwd(st3, st2);
0065446e          st4 = _m_pmaddwd(st4, st2);
00654471          st5 = _m_psradi(temp0_37, 8);
00654475          st2 = data_832fd8;
0065447c          st5 = _m_packssdw(st5, st5);
0065447f          st6 = _m_pmaddwd(st6, st2);
00654482          st0 = _m_punpckldq(st0, st5);
00654485          st7 = _m_pmaddwd(st7, st2);
00654488          *(uint64_t*)edi = st0;
0065448b          st5 = st3;
0065448e          st2 = st4;
00654491          st3 = _m_punpckldq(st3, st6);
00654494          st4 = _m_punpckldq(st4, st7);
00654497          int64_t temp0_47 = _m_punpckhdq(st5, st6);
0065449a          int64_t temp0_48 = _m_punpckhdq(st2, st7);
0065449d          int64_t temp0_49 = _m_paddd(st3, temp0_47);
006544a0          int64_t temp0_50 = _m_paddd(st4, temp0_48);
006544a3          int64_t temp0_51 = __paddd_mmxq_memq(temp0_49, data_832fe8);
006544aa          int64_t temp0_52 = __paddd_mmxq_memq(temp0_50, data_832fe8);
006544b1          st3 = _m_psradi(temp0_51, 8);
006544b5          st4 = _m_psradi(temp0_52, 8);
006544bf          st3 = _m_punpcklwd(_m_packssdw(st3, st3), _m_packssdw(st4, st4));
006544c5          st0 = _m_punpckldq(st1, st3);
006544c8          int64_t temp0_59 = _m_punpckhdq(st1, st3);
006544cb          *(uint64_t*)result = st0;
006544ce          *(uint64_t*)ebx = temp0_59;
006544d1          st2 = *(uint64_t*)((char*)esi + 0xc);
006544d5          st7 = data_832fc8;
006544e2          uint64_t temp0_60 = _m_psrlqi(st2, 0x18);
006544e6          st0 = _m_punpckhwd(st2, 0);
006544e9          st2 = _m_punpckhwd(temp0_60, 0);
006544ec          st3 = st0;
006544ef          st4 = st2;
006544f2          st0 = _m_pmaddwd(st0, st7);
006544f5          st5 = st3;
006544f8          st2 = _m_pmaddwd(st2, st7);
006544fb          st6 = st4;
006544fe          st1 = st0;
00654501          st7 = data_832fd0;
00654508          st0 = _m_punpckldq(st0, st2);
0065450b          st3 = _m_pmaddwd(st3, st7);
0065450e          st4 = _m_pmaddwd(st4, st7);
00654511          int64_t temp0_68 = _m_punpckhdq(st1, st2);
00654514          st7 = data_832fd8;
0065451b          int64_t temp0_69 = _m_paddd(st0, temp0_68);
0065451e          st5 = _m_pmaddwd(st5, st7);
00654521          int64_t temp0_71 = __psubd_mmxq_memq(temp0_69, data_832fe0);
00654528          st6 = _m_pmaddwd(st6, st7);
0065452b          st2 = st3;
0065452e          st1 = st4;
00654531          st0 = _m_psradi(temp0_71, 8);
00654535          st3 = _m_punpckldq(st3, st5);
00654538          st4 = _m_punpckldq(st4, st6);
0065453b          st0 = _m_packssdw(st0, st0);
0065453e          int64_t temp0_77 = _m_punpckhdq(st2, st5);
00654541          int64_t temp0_78 = _m_punpckhdq(st1, st6);
00654544          int64_t temp0_79 = _m_paddd(temp0_77, st3);
00654547          int64_t temp0_80 = _m_paddd(temp0_78, st4);
0065454a          int64_t temp0_81 = __paddd_mmxq_memq(temp0_79, data_832fe8);
00654551          int64_t temp0_82 = __paddd_mmxq_memq(temp0_80, data_832fe8);
00654558          st2 = _m_psradi(temp0_81, 8);
0065455c          st1 = _m_psradi(temp0_82, 8);
00654566          st2 = _m_punpcklwd(_m_packssdw(st2, st2), _m_packssdw(st1, st1));
00654569          st3 = *(uint64_t*)((char*)esi + 0x12);
00654573          st7 = data_832fc8;
0065457a          uint64_t temp0_88 = _m_psrlqi(st3, 0x18);
0065457e          st3 = _m_punpckhwd(st3, 0);
00654581          st4 = _m_punpckhwd(temp0_88, 0);
0065458a          st5 = _m_pmaddwd(st3, st7);
0065458d          st6 = _m_pmaddwd(st4, st7);
00654593          st1 = _m_punpckldq(st5, st6);
00654596          st7 = st4;
0065459c          int64_t temp0_95 = _m_paddd(_m_punpckhdq(st5, st6), st1);
0065459f          st6 = st3;
006545a2          st1 = data_832fd0;
006545a9          int64_t temp0_96 = __psubd_mmxq_memq(temp0_95, data_832fe0);
006545b0          st3 = _m_pmaddwd(st3, st1);
006545b3          st4 = _m_pmaddwd(st4, st1);
006545b6          st5 = _m_psradi(temp0_96, 8);
006545ba          st1 = data_832fd8;
006545c1          st5 = _m_packssdw(st5, st5);
006545c4          st6 = _m_pmaddwd(st6, st1);
006545c7          st0 = _m_punpckldq(st0, st5);
006545ca          st7 = _m_pmaddwd(st7, st1);
006545cd          edi[1] = st0;
006545d1          st5 = st3;
006545d4          st1 = st4;
006545d7          st3 = _m_punpckldq(st3, st6);
006545da          st4 = _m_punpckldq(st4, st7);
006545dd          int64_t temp0_106 = _m_punpckhdq(st5, st6);
006545e0          int64_t temp0_107 = _m_punpckhdq(st1, st7);
006545e3          int64_t temp0_108 = _m_paddd(st3, temp0_106);
006545e6          int64_t temp0_109 = _m_paddd(st4, temp0_107);
006545e9          int64_t temp0_110 = __paddd_mmxq_memq(temp0_108, data_832fe8);
006545f0          int64_t temp0_111 = __paddd_mmxq_memq(temp0_109, data_832fe8);
006545f7          st3 = _m_psradi(temp0_110, 8);
006545fb          st4 = _m_psradi(temp0_111, 8);
00654605          st3 = _m_punpcklwd(_m_packssdw(st3, st3), _m_packssdw(st4, st4));
0065460b          edi = &edi[2];
0065460e          st0 = _m_punpckldq(st2, st3);
00654611          int64_t temp0_118 = _m_punpckhdq(st2, st3);
00654614          result[1] = st0;
00654618          ebx[1] = temp0_118;
0065461c          result = &result[2];
0065461f          ebx = &ebx[2];
00654622          esi += arg2;
00654624          i = i_1;
00654624          i_1 -= 1;
00654625      } while (i != 1);
00654632      return result;
00654370  }

00654633                                                           8d a4 24 00 00 00 00 8d 9b 00 00 00 00                     ..$..........

00654640  int16_t (*)[0x4] _own_rgba_fpx_to_ycbcra_fpx_1111_full_mcu_m5(int64_t* arg1, int32_t arg2, void* arg3, int16_t (* arg4)[0x4], int64_t* arg5)

00654640  {
0065464c      int64_t* esi = arg1;
0065464f      void* edi = arg3;
00654652      int16_t (* result)[0x4] = arg4;
00654655      int64_t* ebx = arg5;
0065465b      int32_t i_1 = 8;
0065496e      int32_t i;
0065496e      
0065496e      do
0065496e      {
00654663          int64_t st5 = data_833010;
0065466a          int64_t st6 = data_832fe8;
00654671          int64_t st1 = *(uint64_t*)esi;
00654674          int64_t st3 = esi[1];
00654684          uint64_t temp0_1 = _m_psrlqi((st1 & st5), 0x18);
00654688          uint64_t temp0_2 = _m_psrlqi((st3 & st5), 0x18);
0065468c          int64_t temp0_3 = _m_psubd(temp0_1, st6);
0065468f          int64_t temp0_4 = _m_psubd(temp0_2, st6);
00654698          int64_t st2 = _m_punpckldq(_m_packssdw(temp0_3, temp0_3), _m_packssdw(temp0_4, temp0_4));
0065469b          int16_t st7[0x4] = data_833008;
006546a2          *(uint64_t*)((char*)edi + 0x180) = st2;
006546a9          int16_t st0[0x4] = st7;
006546af          st7 = _m_psubusb(st7, st1);
006546b2          st0 = _m_psubusb(st0, st3);
006546bb          uint64_t temp0_10 = _m_psrlqi(st7, 0x20);
006546bf          uint64_t temp0_11 = _m_psrlqi(st0, 0x20);
006546c3          st7 = _m_punpckhwd(st7, 0);
006546c6          st2 = _m_punpckhwd(temp0_10, 0);
006546c9          st0 = _m_punpckhwd(st0, 0);
006546cc          uint64_t st4 = _m_punpckhwd(temp0_11, 0);
006546cf          st5 = data_832fb0;
006546d6          st1 = st7;
006546d9          st3 = st2;
006546dc          int16_t var_40_1[0x4] = st0;
006546df          uint64_t var_38_1 = st4;
006546e3          int16_t temp0_16[0x4] = _m_pmaddwd(st7, st5);
006546e6          st2 = _m_pmaddwd(st2, st5);
006546e9          int16_t temp0_18[0x4] = _m_pmaddwd(st0, st5);
006546ec          st4 = _m_pmaddwd(st4, st5);
006546f5          st7 = _m_punpckldq(temp0_16, st2);
006546f8          int64_t temp0_21 = _m_punpckhdq(temp0_16, st2);
006546fb          st0 = _m_punpckldq(temp0_18, st4);
006546fe          int64_t temp0_23 = _m_punpckhdq(temp0_18, st4);
00654701          st7 = _m_paddd(st7, temp0_21);
00654704          st0 = _m_paddd(st0, temp0_23);
00654707          st7 = __psubd_mmxq_memq(st7, data_832fe0);
0065470e          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654715          st7 = _m_psradi(st7, 8);
00654719          st0 = _m_psradi(st0, 8);
00654723          st5 = st1;
00654726          st6 = st3;
00654729          st7 = _m_punpckldq(_m_packssdw(st7, st7), _m_packssdw(st0, st0)[0]);
0065472c          st2 = data_832fb8;
00654733          st4 = data_832fc0;
0065473a          *(uint64_t*)edi = st7;
0065473d          st1 = _m_pmaddwd(st1, st2);
00654740          st3 = _m_pmaddwd(st3, st2);
00654743          st5 = _m_pmaddwd(st5, st4);
00654746          st6 = _m_pmaddwd(st6, st4);
00654749          st0 = st1;
0065474c          st7 = st3;
0065474f          st1 = _m_punpckldq(st1, st5);
00654752          st0 = _m_punpckhdq(st0, st5);
00654755          st3 = _m_punpckldq(st3, st6);
00654758          st7 = _m_punpckhdq(st7, st6);
0065475b          int64_t temp0_41 = _m_paddd(st1, st0);
0065475e          int64_t temp0_42 = _m_paddd(st3, st7);
00654761          int64_t temp0_43 = __paddd_mmxq_memq(temp0_41, data_832fe8);
00654768          int64_t temp0_44 = __paddd_mmxq_memq(temp0_42, data_832fe8);
0065476f          st1 = _m_psradi(temp0_43, 8);
00654773          st3 = _m_psradi(temp0_44, 8);
00654777          st5 = var_40_1;
00654784          st1 = _m_punpcklwd(_m_packssdw(st1, st1), _m_packssdw(st3, st3));
00654787          st0 = st5;
0065478d          st5 = _m_pmaddwd(st5, st2);
00654790          st6 = _m_pmaddwd(var_38_1, st2);
00654793          int16_t temp0_52[0x4] = _m_pmaddwd(st0, st4);
00654796          int16_t temp0_53[0x4] = _m_pmaddwd(var_38_1, st4);
00654799          st3 = st5;
0065479c          st2 = st6;
0065479f          st5 = _m_punpckldq(st5, temp0_52[0]);
006547a2          int64_t temp0_55 = _m_punpckhdq(st3, temp0_52[0]);
006547a5          st6 = _m_punpckldq(st6, temp0_53[0]);
006547a8          int64_t temp0_57 = _m_punpckhdq(st2, temp0_53[0]);
006547ab          int64_t temp0_58 = _m_paddd(st5, temp0_55);
006547ae          int64_t temp0_59 = _m_paddd(st6, temp0_57);
006547b1          int64_t temp0_60 = __paddd_mmxq_memq(temp0_58, data_832fe8);
006547b8          int64_t temp0_61 = __paddd_mmxq_memq(temp0_59, data_832fe8);
006547bf          st5 = _m_psradi(temp0_60, 8);
006547c3          st6 = _m_psradi(temp0_61, 8);
006547d0          st5 = _m_punpcklwd(_m_packssdw(st5, st5), _m_packssdw(st6, st6));
006547d3          st0 = _m_punpckldq(st1, st5);
006547d6          int64_t temp0_68 = _m_punpckhdq(st1, st5);
006547d9          *(uint64_t*)result = st0;
006547dc          *(uint64_t*)ebx = temp0_68;
006547df          st5 = data_833010;
006547e6          st6 = data_832fe8;
006547ed          st1 = esi[2];
006547f1          st3 = esi[3];
00654801          uint64_t temp0_69 = _m_psrlqi((st1 & st5), 0x18);
00654805          uint64_t temp0_70 = _m_psrlqi((st3 & st5), 0x18);
00654809          int64_t temp0_71 = _m_psubd(temp0_69, st6);
0065480c          int64_t temp0_72 = _m_psubd(temp0_70, st6);
00654815          st2 = _m_punpckldq(_m_packssdw(temp0_71, temp0_71), _m_packssdw(temp0_72, temp0_72));
00654818          st7 = data_833008;
0065481f          *(uint64_t*)((char*)edi + 0x188) = st2;
00654826          st0 = st7;
0065482c          st7 = _m_psubusb(st7, st1);
0065482f          st0 = _m_psubusb(st0, st3);
00654838          uint64_t temp0_78 = _m_psrlqi(st7, 0x20);
0065483c          uint64_t temp0_79 = _m_psrlqi(st0, 0x20);
00654840          st7 = _m_punpckhwd(st7, 0);
00654843          st0 = _m_punpckhwd(st0, 0);
00654846          st2 = _m_punpckhwd(temp0_78, 0);
00654849          st4 = _m_punpckhwd(temp0_79, 0);
0065484c          st5 = data_832fb0;
00654853          st1 = st7;
00654856          st3 = st2;
00654859          int16_t var_30_1[0x4] = st0;
0065485d          uint64_t var_28_1 = st4;
00654861          int16_t temp0_84[0x4] = _m_pmaddwd(st7, st5);
00654864          st2 = _m_pmaddwd(st2, st5);
00654867          int16_t temp0_86[0x4] = _m_pmaddwd(st0, st5);
0065486a          st4 = _m_pmaddwd(st4, st5);
00654873          st7 = _m_punpckldq(temp0_84, st2);
00654876          int64_t temp0_89 = _m_punpckhdq(temp0_84, st2);
00654879          st0 = _m_punpckldq(temp0_86, st4);
0065487c          int64_t temp0_91 = _m_punpckhdq(temp0_86, st4);
0065487f          st7 = _m_paddd(st7, temp0_89);
00654882          st0 = _m_paddd(st0, temp0_91);
00654885          st7 = __psubd_mmxq_memq(st7, data_832fe0);
0065488c          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654893          st7 = _m_psradi(st7, 8);
00654897          st0 = _m_psradi(st0, 8);
006548a1          st5 = st1;
006548a4          st6 = st3;
006548a7          st7 = _m_punpckldq(_m_packssdw(st7, st7), _m_packssdw(st0, st0)[0]);
006548aa          st2 = data_832fb8;
006548b1          st4 = data_832fc0;
006548b8          *(uint64_t*)((char*)edi + 8) = st7;
006548bc          st1 = _m_pmaddwd(st1, st2);
006548bf          st3 = _m_pmaddwd(st3, st2);
006548c2          st5 = _m_pmaddwd(st5, st4);
006548c5          st6 = _m_pmaddwd(st6, st4);
006548c8          st0 = st1;
006548cb          st7 = st3;
006548ce          st1 = _m_punpckldq(st1, st5);
006548d1          st0 = _m_punpckhdq(st0, st5);
006548d4          st3 = _m_punpckldq(st3, st6);
006548d7          st7 = _m_punpckhdq(st7, st6);
006548da          int64_t temp0_109 = _m_paddd(st1, st0);
006548dd          int64_t temp0_110 = _m_paddd(st3, st7);
006548e0          int64_t temp0_111 = __paddd_mmxq_memq(temp0_109, data_832fe8);
006548e7          int64_t temp0_112 = __paddd_mmxq_memq(temp0_110, data_832fe8);
006548ee          st1 = _m_psradi(temp0_111, 8);
006548f2          st3 = _m_psradi(temp0_112, 8);
006548f6          st5 = var_30_1;
00654904          st1 = _m_punpcklwd(_m_packssdw(st1, st1), _m_packssdw(st3, st3));
00654907          st0 = st5;
0065490d          st5 = _m_pmaddwd(st5, st2);
00654910          st6 = _m_pmaddwd(var_28_1, st2);
00654913          int16_t temp0_120[0x4] = _m_pmaddwd(st0, st4);
00654916          int16_t temp0_121[0x4] = _m_pmaddwd(var_28_1, st4);
00654919          st3 = st5;
0065491c          st2 = st6;
0065491f          st5 = _m_punpckldq(st5, temp0_120[0]);
00654922          int64_t temp0_123 = _m_punpckhdq(st3, temp0_120[0]);
00654925          st6 = _m_punpckldq(st6, temp0_121[0]);
00654928          int64_t temp0_125 = _m_punpckhdq(st2, temp0_121[0]);
0065492b          int64_t temp0_126 = _m_paddd(st5, temp0_123);
0065492e          int64_t temp0_127 = _m_paddd(st6, temp0_125);
00654931          int64_t temp0_128 = __paddd_mmxq_memq(temp0_126, data_832fe8);
00654938          int64_t temp0_129 = __paddd_mmxq_memq(temp0_127, data_832fe8);
0065493f          st5 = _m_psradi(temp0_128, 8);
00654943          st6 = _m_psradi(temp0_129, 8);
00654950          st5 = _m_punpcklwd(_m_packssdw(st5, st5), _m_packssdw(st6, st6));
00654953          st0 = _m_punpckldq(st1, st5);
00654956          int64_t temp0_136 = _m_punpckhdq(st1, st5);
00654959          edi += 0x10;
0065495c          esi += arg2;
0065495f          result[1] = st0;
00654963          ebx[1] = temp0_136;
00654967          result = &result[2];
0065496a          ebx = &ebx[2];
0065496d          i = i_1;
0065496d          i_1 -= 1;
0065496e      } while (i != 1);
0065497b      return result;
00654640  }

0065497c                                                                                      8d 64 24 00                              .d$.

00654980  void* _own_rgb_to_ycbcr_422_full_mcu_m5(int64_t* arg1, int32_t arg2, uint8_t (* arg3)[0x8], void* arg4, void* arg5)

00654980  {
0065498c      int64_t* esi = arg1;
0065498f      uint8_t (* edi)[0x8] = arg3;
00654992      void* result = arg4;
00654995      void* ebx = arg5;
0065499e      int32_t i_1 = 8;
00654d38      int32_t i;
00654d38      
00654d38      do
00654d38      {
006549a3          uint8_t st0[0x8] = *(uint64_t*)esi;
006549a6          int64_t st2 = *(uint64_t*)((char*)esi + 6);
006549aa          int64_t st7 = data_832fb0;
006549ba          uint64_t temp0_1 = _m_psrlqi(st0, 0x18);
006549be          uint64_t temp0_2 = _m_psrlqi(st2, 0x18);
006549c2          uint8_t temp0_3[0x8] = _m_punpckhwd(st0, 0);
006549c5          st2 = _m_punpckhwd(st2, 0);
006549c8          uint64_t st1 = _m_punpckhwd(temp0_1, 0);
006549cb          uint64_t st3 = _m_punpckhwd(temp0_2, 0);
006549d1          st0 = _m_pmaddwd(temp0_3, st7);
006549d4          int64_t st5 = st2;
006549d7          st2 = _m_pmaddwd(st2, st7);
006549da          int64_t temp0_9 = _m_paddw(temp0_3, st1);
006549dd          st1 = _m_pmaddwd(st1, st7);
006549e0          int64_t temp0_11 = _m_paddw(st5, st3);
006549e3          st3 = _m_pmaddwd(st3, st7);
006549e6          int64_t st6 = st0;
006549e9          st7 = st2;
006549ec          st0 = _m_punpckldq(st0, st1);
006549ef          int64_t temp0_14 = _m_punpckhdq(st6, st1);
006549f2          st2 = _m_punpckldq(st2, st3);
006549f5          int64_t temp0_16 = _m_punpckhdq(st7, st3);
006549f8          st0 = _m_paddd(st0, temp0_14);
006549fb          int64_t temp0_18 = _m_paddd(st2, temp0_16);
00654a04          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654a0b          int64_t temp0_20 = __psubd_mmxq_memq(temp0_18, data_832fe0);
00654a12          st6 = data_832fb8;
00654a19          st7 = data_832fc0;
00654a20          st0 = _m_psradi(st0, 8);
00654a24          st2 = _m_psradi(temp0_20, 8);
00654a28          st0 = _m_packssdw(st0, st0);
00654a2b          int64_t st4 = _m_pmaddwd(temp0_9, st6);
00654a2e          st2 = _m_packssdw(st2, st2);
00654a31          st5 = _m_pmaddwd(temp0_11, st6);
00654a34          st0 = _m_punpckldq(st0, st2);
00654a37          st1 = _m_pmaddwd(temp0_9, st7);
00654a3a          st3 = _m_pmaddwd(temp0_11, st7);
00654a3d          *(uint64_t*)edi = st0;
00654a40          st2 = st5;
00654a43          st0 = st4;
00654a46          st5 = _m_punpckldq(st5, st3);
00654a49          int64_t temp0_31 = _m_punpckhdq(st2, st3);
00654a4c          st4 = _m_punpckldq(st4, st1);
00654a4f          st0 = _m_punpckhdq(st0, st1);
00654a52          int64_t temp0_34 = _m_paddd(temp0_31, st5);
00654a55          st0 = _m_paddd(st0, st4);
00654a58          int64_t temp0_36 = __paddd_mmxq_memq(temp0_34, data_832ff0);
00654a5f          st0 = __paddd_mmxq_memq(st0, data_832ff0);
00654a66          st4 = *(uint64_t*)((char*)esi + 0xc);
00654a6a          st5 = *(uint64_t*)((char*)esi + 0x12);
00654a6e          st2 = _m_psradi(temp0_36, 9);
00654a72          st0 = _m_psradi(st0, 9);
00654a79          st7 = data_832fb0;
00654a8c          st0 = _m_punpcklwd(_m_packssdw(st0, st0), _m_packssdw(st2, st2));
00654a8f          uint64_t temp0_43 = _m_psrlqi(st4, 0x18);
00654a93          uint64_t temp0_44 = _m_psrlqi(st5, 0x18);
00654a97          uint8_t var_20_1[0x8] = st0;
00654a9a          st4 = _m_punpckhwd(st4, 0);
00654a9d          st5 = _m_punpckhwd(st5, 0);
00654aa0          st1 = _m_punpckhwd(temp0_43, 0);
00654aa3          st3 = _m_punpckhwd(temp0_44, 0);
00654aa9          st0 = _m_pmaddwd(st4, st7);
00654aaf          st2 = _m_pmaddwd(st5, st7);
00654ab2          int64_t temp0_51 = _m_paddw(st4, st1);
00654ab5          st1 = _m_pmaddwd(st1, st7);
00654ab8          int64_t temp0_53 = _m_paddw(st5, st3);
00654abb          st3 = _m_pmaddwd(st3, st7);
00654abe          st6 = st0;
00654ac1          st7 = st2;
00654ac4          st0 = _m_punpckldq(st0, st1);
00654ac7          int64_t temp0_56 = _m_punpckhdq(st6, st1);
00654aca          st2 = _m_punpckldq(st2, st3);
00654acd          int64_t temp0_58 = _m_punpckhdq(st7, st3);
00654ad6          st0 = _m_paddd(st0, temp0_56);
00654ad9          int64_t temp0_60 = _m_paddd(st2, temp0_58);
00654adc          st6 = data_832fb8;
00654ae3          st7 = data_832fc0;
00654aea          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654af1          int64_t temp0_62 = __psubd_mmxq_memq(temp0_60, data_832fe0);
00654af8          st0 = _m_psradi(st0, 8);
00654afc          st2 = _m_psradi(temp0_62, 8);
00654b00          st0 = _m_packssdw(st0, st0);
00654b03          st4 = _m_pmaddwd(temp0_51, st6);
00654b06          st2 = _m_packssdw(st2, st2);
00654b09          st5 = _m_pmaddwd(temp0_53, st6);
00654b0c          st0 = _m_punpckldq(st0, st2);
00654b0f          st1 = _m_pmaddwd(temp0_51, st7);
00654b12          st3 = _m_pmaddwd(temp0_53, st7);
00654b15          edi[1] = st0;
00654b19          st2 = st4;
00654b1c          st6 = st5;
00654b1f          st4 = _m_punpckldq(st4, st1);
00654b22          st5 = _m_punpckldq(st5, st3);
00654b25          int64_t temp0_74 = _m_punpckhdq(st2, st1);
00654b28          int64_t temp0_75 = _m_punpckhdq(st6, st3);
00654b2b          int64_t temp0_76 = _m_paddd(st4, temp0_74);
00654b2e          int64_t temp0_77 = _m_paddd(st5, temp0_75);
00654b31          int64_t temp0_78 = __paddd_mmxq_memq(temp0_76, data_832ff0);
00654b38          int64_t temp0_79 = __paddd_mmxq_memq(temp0_77, data_832ff0);
00654b3f          st4 = _m_psradi(temp0_78, 9);
00654b43          st5 = _m_psradi(temp0_79, 9);
00654b53          st4 = _m_punpcklwd(_m_packssdw(st4, st4), _m_packssdw(st5, st5));
00654b56          st0 = _m_punpckldq(var_20_1, st4);
00654b59          int64_t temp0_86 = _m_punpckhdq(var_20_1, st4);
00654b5c          *(uint64_t*)result = st0;
00654b5f          *(uint64_t*)ebx = temp0_86;
00654b65          st2 = *(uint64_t*)((char*)esi + 0x1e);
00654b69          st7 = data_832fb0;
00654b70          st0 = esi[3];
00654b7a          uint64_t temp0_87 = _m_psrlqi(st2, 0x18);
00654b7e          uint64_t temp0_88 = _m_psrlqi(st0, 0x18);
00654b82          uint8_t temp0_89[0x8] = _m_punpckhwd(st0, 0);
00654b85          st2 = _m_punpckhwd(st2, 0);
00654b88          st1 = _m_punpckhwd(temp0_88, 0);
00654b8b          st3 = _m_punpckhwd(temp0_87, 0);
00654b91          st0 = _m_pmaddwd(temp0_89, st7);
00654b94          st5 = st2;
00654b97          st2 = _m_pmaddwd(st2, st7);
00654b9a          int64_t temp0_95 = _m_paddw(temp0_89, st1);
00654b9d          st1 = _m_pmaddwd(st1, st7);
00654ba0          int64_t temp0_97 = _m_paddw(st5, st3);
00654ba3          st3 = _m_pmaddwd(st3, st7);
00654ba6          st6 = st0;
00654ba9          st7 = st2;
00654bac          st0 = _m_punpckldq(st0, st1);
00654baf          int64_t temp0_100 = _m_punpckhdq(st6, st1);
00654bb2          st2 = _m_punpckldq(st2, st3);
00654bb5          int64_t temp0_102 = _m_punpckhdq(st7, st3);
00654bbe          st0 = _m_paddd(st0, temp0_100);
00654bc1          int64_t temp0_104 = _m_paddd(st2, temp0_102);
00654bc4          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654bcb          int64_t temp0_106 = __psubd_mmxq_memq(temp0_104, data_832fe0);
00654bd2          st6 = data_832fb8;
00654bd9          st7 = data_832fc0;
00654be0          st0 = _m_psradi(st0, 8);
00654be4          st2 = _m_psradi(temp0_106, 8);
00654be8          st0 = _m_packssdw(st0, st0);
00654beb          st4 = _m_pmaddwd(temp0_95, st6);
00654bee          st2 = _m_packssdw(st2, st2);
00654bf1          st5 = _m_pmaddwd(temp0_97, st6);
00654bf4          st0 = _m_punpckldq(st0, st2);
00654bf7          st1 = _m_pmaddwd(temp0_95, st7);
00654bfa          st3 = _m_pmaddwd(temp0_97, st7);
00654bfd          edi[0x10] = st0;
00654c04          st0 = st4;
00654c07          st2 = st5;
00654c0a          st4 = _m_punpckldq(st4, st1);
00654c0d          st5 = _m_punpckldq(st5, st3);
00654c10          st0 = _m_punpckhdq(st0, st1);
00654c13          int64_t temp0_119 = _m_punpckhdq(st2, st3);
00654c16          st0 = _m_paddd(st0, st4);
00654c19          int64_t temp0_121 = _m_paddd(temp0_119, st5);
00654c1c          st0 = __paddd_mmxq_memq(st0, data_832ff0);
00654c23          int64_t temp0_123 = __paddd_mmxq_memq(temp0_121, data_832ff0);
00654c2a          st4 = *(uint64_t*)((char*)esi + 0x24);
00654c2e          st5 = *(uint64_t*)((char*)esi + 0x2a);
00654c32          st0 = _m_psradi(st0, 9);
00654c36          st2 = _m_psradi(temp0_123, 9);
00654c3d          st7 = data_832fb0;
00654c50          st0 = _m_punpcklwd(_m_packssdw(st0, st0), _m_packssdw(st2, st2));
00654c53          uint64_t temp0_129 = _m_psrlqi(st4, 0x18);
00654c57          uint64_t temp0_130 = _m_psrlqi(st5, 0x18);
00654c5b          uint8_t var_20_2[0x8] = st0;
00654c5e          st4 = _m_punpckhwd(st4, 0);
00654c61          st5 = _m_punpckhwd(st5, 0);
00654c64          st1 = _m_punpckhwd(temp0_129, 0);
00654c67          st3 = _m_punpckhwd(temp0_130, 0);
00654c6d          st0 = _m_pmaddwd(st4, st7);
00654c73          st2 = _m_pmaddwd(st5, st7);
00654c76          int64_t temp0_137 = _m_paddw(st4, st1);
00654c79          st1 = _m_pmaddwd(st1, st7);
00654c7c          int64_t temp0_139 = _m_paddw(st5, st3);
00654c7f          st3 = _m_pmaddwd(st3, st7);
00654c82          st6 = st0;
00654c85          st7 = st2;
00654c88          st0 = _m_punpckldq(st0, st1);
00654c8b          int64_t temp0_142 = _m_punpckhdq(st6, st1);
00654c8e          st2 = _m_punpckldq(st2, st3);
00654c91          int64_t temp0_144 = _m_punpckhdq(st7, st3);
00654c9a          st0 = _m_paddd(st0, temp0_142);
00654c9d          int64_t temp0_146 = _m_paddd(st2, temp0_144);
00654ca0          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654ca7          int64_t temp0_148 = __psubd_mmxq_memq(temp0_146, data_832fe0);
00654cae          st6 = data_832fb8;
00654cb5          st7 = data_832fc0;
00654cbc          st0 = _m_psradi(st0, 8);
00654cc0          st2 = _m_psradi(temp0_148, 8);
00654cc4          st0 = _m_packssdw(st0, st0);
00654cc7          st4 = _m_pmaddwd(temp0_137, st6);
00654cca          st2 = _m_packssdw(st2, st2);
00654ccd          st5 = _m_pmaddwd(temp0_139, st6);
00654cd0          st0 = _m_punpckldq(st0, st2);
00654cd3          st1 = _m_pmaddwd(temp0_137, st7);
00654cd6          st3 = _m_pmaddwd(temp0_139, st7);
00654cd9          esi += arg2;
00654cdc          edi[0x11] = st0;
00654ce3          st2 = st4;
00654ce6          st6 = st5;
00654ce9          st4 = _m_punpckldq(st4, st1);
00654cec          st5 = _m_punpckldq(st5, st3);
00654cef          int64_t temp0_160 = _m_punpckhdq(st2, st1);
00654cf2          int64_t temp0_161 = _m_punpckhdq(st6, st3);
00654cf5          int64_t temp0_162 = _m_paddd(st4, temp0_160);
00654cf8          int64_t temp0_163 = _m_paddd(st5, temp0_161);
00654cfb          int64_t temp0_164 = __paddd_mmxq_memq(temp0_162, data_832ff0);
00654d02          int64_t temp0_165 = __paddd_mmxq_memq(temp0_163, data_832ff0);
00654d09          st4 = _m_psradi(temp0_164, 9);
00654d0d          st5 = _m_psradi(temp0_165, 9);
00654d1d          st4 = _m_punpcklwd(_m_packssdw(st4, st4), _m_packssdw(st5, st5));
00654d20          edi = &edi[2];
00654d23          st0 = _m_punpckldq(var_20_2, st4);
00654d26          result += 0x10;
00654d29          int64_t temp0_172 = _m_punpckhdq(var_20_2, st4);
00654d2c          ebx += 0x10;
00654d2f          *(uint64_t*)((char*)result - 8) = st0;
00654d33          *(uint64_t*)((char*)ebx - 8) = temp0_172;
00654d37          i = i_1;
00654d37          i_1 -= 1;
00654d38      } while (i != 1);
00654d45      return result;
00654980  }

00654d46                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.

00654d50  void* _own_bgr_to_ycbcr_422_full_mcu_m5(int64_t* arg1, int32_t arg2, uint8_t (* arg3)[0x8], void* arg4, void* arg5)

00654d50  {
00654d5c      int64_t* esi = arg1;
00654d5f      uint8_t (* edi)[0x8] = arg3;
00654d62      void* result = arg4;
00654d65      void* ebx = arg5;
00654d6e      int32_t i_1 = 8;
00655108      int32_t i;
00655108      
00655108      do
00655108      {
00654d73          uint8_t st0[0x8] = *(uint64_t*)esi;
00654d76          int64_t st2 = *(uint64_t*)((char*)esi + 6);
00654d7a          int64_t st7 = data_832fc8;
00654d8a          uint64_t temp0_1 = _m_psrlqi(st0, 0x18);
00654d8e          uint64_t temp0_2 = _m_psrlqi(st2, 0x18);
00654d92          uint8_t temp0_3[0x8] = _m_punpckhwd(st0, 0);
00654d95          st2 = _m_punpckhwd(st2, 0);
00654d98          uint64_t st1 = _m_punpckhwd(temp0_1, 0);
00654d9b          uint64_t st3 = _m_punpckhwd(temp0_2, 0);
00654da1          st0 = _m_pmaddwd(temp0_3, st7);
00654da4          int64_t st5 = st2;
00654da7          st2 = _m_pmaddwd(st2, st7);
00654daa          int64_t temp0_9 = _m_paddw(temp0_3, st1);
00654dad          st1 = _m_pmaddwd(st1, st7);
00654db0          int64_t temp0_11 = _m_paddw(st5, st3);
00654db3          st3 = _m_pmaddwd(st3, st7);
00654db6          int64_t st6 = st0;
00654db9          st7 = st2;
00654dbc          st0 = _m_punpckldq(st0, st1);
00654dbf          int64_t temp0_14 = _m_punpckhdq(st6, st1);
00654dc2          st2 = _m_punpckldq(st2, st3);
00654dc5          int64_t temp0_16 = _m_punpckhdq(st7, st3);
00654dc8          st0 = _m_paddd(st0, temp0_14);
00654dcb          int64_t temp0_18 = _m_paddd(st2, temp0_16);
00654dd4          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654ddb          int64_t temp0_20 = __psubd_mmxq_memq(temp0_18, data_832fe0);
00654de2          st6 = data_832fd0;
00654de9          st7 = data_832fd8;
00654df0          st0 = _m_psradi(st0, 8);
00654df4          st2 = _m_psradi(temp0_20, 8);
00654df8          st0 = _m_packssdw(st0, st0);
00654dfb          int64_t st4 = _m_pmaddwd(temp0_9, st6);
00654dfe          st2 = _m_packssdw(st2, st2);
00654e01          st5 = _m_pmaddwd(temp0_11, st6);
00654e04          st0 = _m_punpckldq(st0, st2);
00654e07          st1 = _m_pmaddwd(temp0_9, st7);
00654e0a          st3 = _m_pmaddwd(temp0_11, st7);
00654e0d          *(uint64_t*)edi = st0;
00654e10          st2 = st5;
00654e13          st0 = st4;
00654e16          st5 = _m_punpckldq(st5, st3);
00654e19          int64_t temp0_31 = _m_punpckhdq(st2, st3);
00654e1c          st4 = _m_punpckldq(st4, st1);
00654e1f          st0 = _m_punpckhdq(st0, st1);
00654e22          int64_t temp0_34 = _m_paddd(temp0_31, st5);
00654e25          st0 = _m_paddd(st0, st4);
00654e28          int64_t temp0_36 = __paddd_mmxq_memq(temp0_34, data_832ff0);
00654e2f          st0 = __paddd_mmxq_memq(st0, data_832ff0);
00654e36          st4 = *(uint64_t*)((char*)esi + 0xc);
00654e3a          st5 = *(uint64_t*)((char*)esi + 0x12);
00654e3e          st2 = _m_psradi(temp0_36, 9);
00654e42          st0 = _m_psradi(st0, 9);
00654e49          st7 = data_832fc8;
00654e5c          st0 = _m_punpcklwd(_m_packssdw(st0, st0), _m_packssdw(st2, st2));
00654e5f          uint64_t temp0_43 = _m_psrlqi(st4, 0x18);
00654e63          uint64_t temp0_44 = _m_psrlqi(st5, 0x18);
00654e67          uint8_t var_20_1[0x8] = st0;
00654e6a          st4 = _m_punpckhwd(st4, 0);
00654e6d          st5 = _m_punpckhwd(st5, 0);
00654e70          st1 = _m_punpckhwd(temp0_43, 0);
00654e73          st3 = _m_punpckhwd(temp0_44, 0);
00654e79          st0 = _m_pmaddwd(st4, st7);
00654e7f          st2 = _m_pmaddwd(st5, st7);
00654e82          int64_t temp0_51 = _m_paddw(st4, st1);
00654e85          st1 = _m_pmaddwd(st1, st7);
00654e88          int64_t temp0_53 = _m_paddw(st5, st3);
00654e8b          st3 = _m_pmaddwd(st3, st7);
00654e8e          st6 = st0;
00654e91          st7 = st2;
00654e94          st0 = _m_punpckldq(st0, st1);
00654e97          int64_t temp0_56 = _m_punpckhdq(st6, st1);
00654e9a          st2 = _m_punpckldq(st2, st3);
00654e9d          int64_t temp0_58 = _m_punpckhdq(st7, st3);
00654ea6          st0 = _m_paddd(st0, temp0_56);
00654ea9          int64_t temp0_60 = _m_paddd(st2, temp0_58);
00654eac          st6 = data_832fd0;
00654eb3          st7 = data_832fd8;
00654eba          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654ec1          int64_t temp0_62 = __psubd_mmxq_memq(temp0_60, data_832fe0);
00654ec8          st0 = _m_psradi(st0, 8);
00654ecc          st2 = _m_psradi(temp0_62, 8);
00654ed0          st0 = _m_packssdw(st0, st0);
00654ed3          st4 = _m_pmaddwd(temp0_51, st6);
00654ed6          st2 = _m_packssdw(st2, st2);
00654ed9          st5 = _m_pmaddwd(temp0_53, st6);
00654edc          st0 = _m_punpckldq(st0, st2);
00654edf          st1 = _m_pmaddwd(temp0_51, st7);
00654ee2          st3 = _m_pmaddwd(temp0_53, st7);
00654ee5          edi[1] = st0;
00654ee9          st2 = st4;
00654eec          st6 = st5;
00654eef          st4 = _m_punpckldq(st4, st1);
00654ef2          st5 = _m_punpckldq(st5, st3);
00654ef5          int64_t temp0_74 = _m_punpckhdq(st2, st1);
00654ef8          int64_t temp0_75 = _m_punpckhdq(st6, st3);
00654efb          int64_t temp0_76 = _m_paddd(st4, temp0_74);
00654efe          int64_t temp0_77 = _m_paddd(st5, temp0_75);
00654f01          int64_t temp0_78 = __paddd_mmxq_memq(temp0_76, data_832ff0);
00654f08          int64_t temp0_79 = __paddd_mmxq_memq(temp0_77, data_832ff0);
00654f0f          st4 = _m_psradi(temp0_78, 9);
00654f13          st5 = _m_psradi(temp0_79, 9);
00654f23          st4 = _m_punpcklwd(_m_packssdw(st4, st4), _m_packssdw(st5, st5));
00654f26          st0 = _m_punpckldq(var_20_1, st4);
00654f29          int64_t temp0_86 = _m_punpckhdq(var_20_1, st4);
00654f2c          *(uint64_t*)result = st0;
00654f2f          *(uint64_t*)ebx = temp0_86;
00654f35          st2 = *(uint64_t*)((char*)esi + 0x1e);
00654f39          st7 = data_832fc8;
00654f40          st0 = esi[3];
00654f4a          uint64_t temp0_87 = _m_psrlqi(st2, 0x18);
00654f4e          uint64_t temp0_88 = _m_psrlqi(st0, 0x18);
00654f52          uint8_t temp0_89[0x8] = _m_punpckhwd(st0, 0);
00654f55          st2 = _m_punpckhwd(st2, 0);
00654f58          st1 = _m_punpckhwd(temp0_88, 0);
00654f5b          st3 = _m_punpckhwd(temp0_87, 0);
00654f61          st0 = _m_pmaddwd(temp0_89, st7);
00654f64          st5 = st2;
00654f67          st2 = _m_pmaddwd(st2, st7);
00654f6a          int64_t temp0_95 = _m_paddw(temp0_89, st1);
00654f6d          st1 = _m_pmaddwd(st1, st7);
00654f70          int64_t temp0_97 = _m_paddw(st5, st3);
00654f73          st3 = _m_pmaddwd(st3, st7);
00654f76          st6 = st0;
00654f79          st7 = st2;
00654f7c          st0 = _m_punpckldq(st0, st1);
00654f7f          int64_t temp0_100 = _m_punpckhdq(st6, st1);
00654f82          st2 = _m_punpckldq(st2, st3);
00654f85          int64_t temp0_102 = _m_punpckhdq(st7, st3);
00654f88          st0 = _m_paddd(st0, temp0_100);
00654f8b          int64_t temp0_104 = _m_paddd(st2, temp0_102);
00654f94          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00654f9b          int64_t temp0_106 = __psubd_mmxq_memq(temp0_104, data_832fe0);
00654fa2          st6 = data_832fd0;
00654fa9          st7 = data_832fd8;
00654fb0          st0 = _m_psradi(st0, 8);
00654fb4          st2 = _m_psradi(temp0_106, 8);
00654fb8          st0 = _m_packssdw(st0, st0);
00654fbb          st4 = _m_pmaddwd(temp0_95, st6);
00654fbe          st2 = _m_packssdw(st2, st2);
00654fc1          st5 = _m_pmaddwd(temp0_97, st6);
00654fc4          st0 = _m_punpckldq(st0, st2);
00654fc7          st1 = _m_pmaddwd(temp0_95, st7);
00654fca          st3 = _m_pmaddwd(temp0_97, st7);
00654fcd          edi[0x10] = st0;
00654fd4          st2 = st5;
00654fd7          st0 = st4;
00654fda          st5 = _m_punpckldq(st5, st3);
00654fdd          int64_t temp0_117 = _m_punpckhdq(st2, st3);
00654fe0          st4 = _m_punpckldq(st4, st1);
00654fe3          st0 = _m_punpckhdq(st0, st1);
00654fe6          int64_t temp0_120 = _m_paddd(temp0_117, st5);
00654fe9          st0 = _m_paddd(st0, st4);
00654fec          int64_t temp0_122 = __paddd_mmxq_memq(temp0_120, data_832ff0);
00654ff3          st0 = __paddd_mmxq_memq(st0, data_832ff0);
00654ffa          st4 = *(uint64_t*)((char*)esi + 0x24);
00654ffe          st5 = *(uint64_t*)((char*)esi + 0x2a);
00655002          st2 = _m_psradi(temp0_122, 9);
00655006          st0 = _m_psradi(st0, 9);
0065500d          st7 = data_832fc8;
00655020          st0 = _m_punpcklwd(_m_packssdw(st0, st0), _m_packssdw(st2, st2));
00655023          uint64_t temp0_129 = _m_psrlqi(st4, 0x18);
00655027          uint64_t temp0_130 = _m_psrlqi(st5, 0x18);
0065502b          uint8_t var_20_2[0x8] = st0;
0065502e          st4 = _m_punpckhwd(st4, 0);
00655031          st5 = _m_punpckhwd(st5, 0);
00655034          st1 = _m_punpckhwd(temp0_129, 0);
00655037          st3 = _m_punpckhwd(temp0_130, 0);
0065503d          st0 = _m_pmaddwd(st4, st7);
00655043          st2 = _m_pmaddwd(st5, st7);
00655046          int64_t temp0_137 = _m_paddw(st4, st1);
00655049          st1 = _m_pmaddwd(st1, st7);
0065504c          int64_t temp0_139 = _m_paddw(st5, st3);
0065504f          st3 = _m_pmaddwd(st3, st7);
00655052          st6 = st0;
00655055          st7 = st2;
00655058          st0 = _m_punpckldq(st0, st1);
0065505b          int64_t temp0_142 = _m_punpckhdq(st6, st1);
0065505e          st2 = _m_punpckldq(st2, st3);
00655061          int64_t temp0_144 = _m_punpckhdq(st7, st3);
0065506a          st0 = _m_paddd(st0, temp0_142);
0065506d          int64_t temp0_146 = _m_paddd(st2, temp0_144);
00655070          st0 = __psubd_mmxq_memq(st0, data_832fe0);
00655077          int64_t temp0_148 = __psubd_mmxq_memq(temp0_146, data_832fe0);
0065507e          st6 = data_832fd0;
00655085          st7 = data_832fd8;
0065508c          st0 = _m_psradi(st0, 8);
00655090          st2 = _m_psradi(temp0_148, 8);
00655094          st0 = _m_packssdw(st0, st0);
00655097          st4 = _m_pmaddwd(temp0_137, st6);
0065509a          st2 = _m_packssdw(st2, st2);
0065509d          st5 = _m_pmaddwd(temp0_139, st6);
006550a0          st0 = _m_punpckldq(st0, st2);
006550a3          st1 = _m_pmaddwd(temp0_137, st7);
006550a6          st3 = _m_pmaddwd(temp0_139, st7);
006550a9          esi += arg2;
006550ac          edi[0x11] = st0;
006550b3          st2 = st4;
006550b6          st6 = st5;
006550b9          st4 = _m_punpckldq(st4, st1);
006550bc          st5 = _m_punpckldq(st5, st3);
006550bf          int64_t temp0_160 = _m_punpckhdq(st2, st1);
006550c2          int64_t temp0_161 = _m_punpckhdq(st6, st3);
006550c5          int64_t temp0_162 = _m_paddd(st4, temp0_160);
006550c8          int64_t temp0_163 = _m_paddd(st5, temp0_161);
006550cb          int64_t temp0_164 = __paddd_mmxq_memq(temp0_162, data_832ff0);
006550d2          int64_t temp0_165 = __paddd_mmxq_memq(temp0_163, data_832ff0);
006550d9          st4 = _m_psradi(temp0_164, 9);
006550dd          st5 = _m_psradi(temp0_165, 9);
006550ed          st4 = _m_punpcklwd(_m_packssdw(st4, st4), _m_packssdw(st5, st5));
006550f0          edi = &edi[2];
006550f3          st0 = _m_punpckldq(var_20_2, st4);
006550f6          result += 0x10;
006550f9          int64_t temp0_172 = _m_punpckhdq(var_20_2, st4);
006550fc          ebx += 0x10;
006550ff          *(uint64_t*)((char*)result - 8) = st0;
00655103          *(uint64_t*)((char*)ebx - 8) = temp0_172;
00655107          i = i_1;
00655107          i_1 -= 1;
00655108      } while (i != 1);
00655115      return result;
00654d50  }

00655116                                                                    8d a4 24 00 00 00 00 8d 49 00                        ..$.....I.

00655120  int32_t* _own_rgba_fpx_to_ycbcra_fpx_4224_full_mcu_m5(int64_t* arg1, int32_t arg2, int64_t* arg3, int32_t* arg4, void* arg5, uint64_t* arg6)

00655120  {
00655129      int64_t* esi = arg1;
0065512c      int64_t* edi = arg3;
0065512f      int32_t* result = arg4;
00655132      void* ebx = arg5;
00655135      uint64_t* edx = arg6;
00655138      int32_t i_1 = 8;
00655611      int32_t i;
00655611      
00655611      do
00655611      {
0065513d          int64_t st1 = *(uint64_t*)esi;
00655140          int64_t st3 = esi[1];
00655144          int64_t st5 = data_833010;
0065514b          int64_t st6 = data_832fe8;
0065515e          uint64_t temp0_1 = _m_psrlqi((st1 & st5), 0x18);
00655162          uint64_t temp0_2 = _m_psrlqi((st3 & st5), 0x18);
00655166          int64_t temp0_3 = _m_psubd(temp0_1, st6);
00655169          int64_t temp0_4 = _m_psubd(temp0_2, st6);
0065516c          uint64_t st2 = _m_packssdw(temp0_3, temp0_3);
0065516f          int64_t st7 = data_833008;
0065517c          st2 = _m_punpckldq(st2, _m_packssdw(temp0_4, temp0_4));
00655182          int64_t temp0_8 = _m_psubusb(st7, st1);
00655185          *(uint64_t*)edx = st2;
00655188          int64_t temp0_9 = _m_psubusb(st7, st3);
00655191          uint64_t temp0_10 = _m_psrlqi(temp0_8, 0x20);
00655195          uint64_t temp0_11 = _m_psrlqi(temp0_9, 0x20);
00655199          st7 = _m_punpckhwd(temp0_8, 0);
0065519c          int64_t st0 = _m_punpckhwd(temp0_9, 0);
0065519f          st2 = _m_punpckhwd(temp0_10, 0);
006551a2          int64_t st4 = _m_punpckhwd(temp0_11, 0);
006551a5          st1 = st7;
006551a8          st3 = st0;
006551ab          st7 = __pmaddwd_mmxq_memq(st7, data_832fb0);
006551b2          st0 = __pmaddwd_mmxq_memq(st0, data_832fb0);
006551b9          st5 = st2;
006551bc          st6 = st4;
006551bf          st2 = __pmaddwd_mmxq_memq(st2, data_832fb0);
006551c6          st4 = __pmaddwd_mmxq_memq(st4, data_832fb0);
006551cd          int64_t temp0_20 = _m_paddw(st1, st5);
006551d0          int64_t temp0_21 = _m_paddw(st3, st6);
006551d3          st5 = st0;
006551d6          st6 = st7;
006551d9          st0 = _m_punpckldq(st0, st4);
006551dc          int64_t temp0_23 = _m_punpckhdq(st5, st4);
006551df          st7 = _m_punpckldq(st7, st2);
006551e2          int64_t temp0_25 = _m_punpckhdq(st6, st2);
006551e5          int64_t temp0_26 = _m_paddd(st0, temp0_23);
006551e8          int64_t temp0_27 = _m_paddd(st7, temp0_25);
006551eb          st4 = data_832fc0;
006551f2          st2 = data_832fb8;
006551f9          int64_t temp0_28 = __psubd_mmxq_memq(temp0_26, data_832fe0);
00655200          int64_t temp0_29 = __psubd_mmxq_memq(temp0_27, data_832fe0);
0065520d          st0 = _m_psradi(temp0_28, 8);
00655211          st7 = _m_psradi(temp0_29, 8);
00655215          st5 = _m_pmaddwd(temp0_20, st4);
00655218          st1 = _m_pmaddwd(temp0_20, st2);
0065521b          st6 = _m_pmaddwd(temp0_21, st4);
0065521e          st3 = _m_pmaddwd(temp0_21, st2);
00655224          st2 = st1;
0065522a          st4 = st3;
00655230          *(uint64_t*)edi = _m_punpckldq(_m_packssdw(st7, st7), _m_packssdw(st0, st0));
00655233          st1 = _m_punpckldq(st1, st5);
00655236          int64_t temp0_40 = _m_punpckhdq(st2, st5);
00655239          st3 = _m_punpckldq(st3, st6);
0065523c          int64_t temp0_42 = _m_punpckhdq(st4, st6);
0065523f          int64_t temp0_43 = _m_paddd(st1, temp0_40);
00655242          int64_t temp0_44 = _m_paddd(st3, temp0_42);
00655245          int64_t temp0_45 = __paddd_mmxq_memq(temp0_43, data_832ff0);
0065524c          int64_t temp0_46 = __paddd_mmxq_memq(temp0_44, data_832ff0);
00655253          st1 = _m_psradi(temp0_45, 9);
00655257          st5 = data_833010;
0065525e          st3 = _m_psradi(temp0_46, 9);
00655262          st6 = data_832fe8;
00655269          st1 = _m_packssdw(st1, st1);
0065526c          st2 = esi[2];
00655270          st3 = _m_packssdw(st3, st3);
00655273          st4 = esi[3];
00655277          st1 = _m_punpcklwd(st1, st3);
0065527d          *(uint32_t*)result = st1;
00655287          *(uint32_t*)ebx = _m_psrlqi(st1, 0x20);
00655290          uint64_t temp0_53 = _m_psrlqi((st4 & st5), 0x18);
00655294          uint64_t temp0_54 = _m_psrlqi((st2 & st5), 0x18);
00655298          int64_t temp0_55 = _m_psubd(temp0_53, st6);
0065529b          int64_t temp0_56 = _m_psubd(temp0_54, st6);
0065529e          st3 = _m_packssdw(temp0_55, temp0_55);
006552a1          st1 = data_833008;
006552b4          edx[1] = _m_punpckldq(_m_packssdw(temp0_56, temp0_56), st3);
006552b8          int64_t temp0_60 = _m_psubusb(st1, st2);
006552bb          int64_t temp0_61 = _m_psubusb(st1, st4);
006552c4          uint64_t temp0_62 = _m_psrlqi(temp0_60, 0x20);
006552c8          uint64_t temp0_63 = _m_psrlqi(temp0_61, 0x20);
006552cc          st1 = _m_punpckhwd(temp0_60, 0);
006552cf          st0 = _m_punpckhwd(temp0_61, 0);
006552d2          st7 = _m_punpckhwd(temp0_62, 0);
006552d5          st3 = _m_punpckhwd(temp0_63, 0);
006552e4          int64_t temp0_68 = _m_paddw(st1, st7);
006552e7          int64_t temp0_69 = _m_paddw(st0, st3);
006552ea          st5 = data_832fb0;
006552f1          st1 = _m_pmaddwd(st1, st5);
006552f4          st7 = _m_pmaddwd(st7, st5);
006552f7          st0 = _m_pmaddwd(st0, st5);
006552fa          st3 = _m_pmaddwd(st3, st5);
006552fd          st6 = st1;
00655300          st5 = st0;
00655303          st1 = _m_punpckldq(st1, st7);
00655306          int64_t temp0_75 = _m_punpckhdq(st6, st7);
00655309          st0 = _m_punpckldq(st0, st3);
0065530c          int64_t temp0_77 = _m_punpckhdq(st5, st3);
0065530f          int64_t temp0_78 = _m_paddd(st1, temp0_75);
00655312          int64_t temp0_79 = _m_paddd(st0, temp0_77);
00655315          int64_t temp0_80 = __psubd_mmxq_memq(temp0_78, data_832fe0);
0065531c          int64_t temp0_81 = __psubd_mmxq_memq(temp0_79, data_832fe0);
00655323          st1 = _m_psradi(temp0_80, 8);
00655327          st0 = _m_psradi(temp0_81, 8);
00655337          st1 = _m_punpckldq(_m_packssdw(st1, st1), _m_packssdw(st0, st0));
0065533a          st7 = data_832fb8;
00655341          st3 = data_832fc0;
00655348          edi[1] = st1;
0065534c          st2 = _m_pmaddwd(temp0_68, st7);
0065534f          st4 = _m_pmaddwd(temp0_69, st7);
00655352          st5 = _m_pmaddwd(temp0_68, st3);
00655355          st6 = _m_pmaddwd(temp0_69, st3);
00655358          st0 = st2;
0065535b          st1 = st4;
0065535e          st2 = _m_punpckldq(st2, st5);
00655361          int64_t temp0_92 = _m_punpckhdq(st0, st5);
00655364          st4 = _m_punpckldq(st4, st6);
00655367          int64_t temp0_94 = _m_punpckhdq(st1, st6);
0065536a          int64_t temp0_95 = _m_paddd(st2, temp0_92);
0065536d          int64_t temp0_96 = _m_paddd(st4, temp0_94);
00655370          int64_t temp0_97 = __paddd_mmxq_memq(temp0_95, data_832ff0);
00655377          int64_t temp0_98 = __paddd_mmxq_memq(temp0_96, data_832ff0);
0065537e          st2 = _m_psradi(temp0_97, 9);
00655382          st4 = _m_psradi(temp0_98, 9);
00655386          st2 = _m_packssdw(st2, st2);
00655389          st5 = data_833010;
00655390          st4 = _m_packssdw(st4, st4);
00655393          st6 = data_832fe8;
0065539a          st2 = _m_punpcklwd(st2, st4);
0065539d          result[1] = st2;
006553a5          *(uint32_t*)((char*)ebx + 4) = _m_psrlqi(st2, 0x20);
006553a9          st1 = esi[4];
006553ad          st3 = esi[5];
006553bd          uint64_t temp0_105 = _m_psrlqi((st1 & st5), 0x18);
006553c1          uint64_t temp0_106 = _m_psrlqi((st3 & st5), 0x18);
006553c5          int64_t temp0_107 = _m_psubd(temp0_105, st6);
006553c8          int64_t temp0_108 = _m_psubd(temp0_106, st6);
006553d1          st2 = _m_punpckldq(_m_packssdw(temp0_107, temp0_107), _m_packssdw(temp0_108, temp0_108));
006553d4          st7 = data_833008;
006553de          edx[0x10] = st2;
006553e8          int64_t temp0_112 = _m_psubusb(st7, st1);
006553eb          int64_t temp0_113 = _m_psubusb(st7, st3);
006553f4          uint64_t temp0_114 = _m_psrlqi(temp0_112, 0x20);
006553f8          uint64_t temp0_115 = _m_psrlqi(temp0_113, 0x20);
006553fc          st7 = _m_punpckhwd(temp0_112, 0);
006553ff          st0 = _m_punpckhwd(temp0_113, 0);
00655402          st2 = _m_punpckhwd(temp0_114, 0);
00655405          st4 = _m_punpckhwd(temp0_115, 0);
00655414          int64_t temp0_120 = _m_paddw(st7, st2);
00655417          int64_t temp0_121 = _m_paddw(st0, st4);
0065541a          st5 = data_832fb0;
00655421          st7 = _m_pmaddwd(st7, st5);
00655424          st2 = _m_pmaddwd(st2, st5);
00655427          st0 = _m_pmaddwd(st0, st5);
0065542a          st4 = _m_pmaddwd(st4, st5);
0065542d          st6 = st7;
00655430          st5 = st0;
00655433          st7 = _m_punpckldq(st7, st2);
00655436          int64_t temp0_127 = _m_punpckhdq(st6, st2);
00655439          st0 = _m_punpckldq(st0, st4);
0065543c          int64_t temp0_129 = _m_punpckhdq(st5, st4);
0065543f          int64_t temp0_130 = _m_paddd(st7, temp0_127);
00655442          int64_t temp0_131 = _m_paddd(st0, temp0_129);
00655445          int64_t temp0_132 = __psubd_mmxq_memq(temp0_130, data_832fe0);
0065544c          int64_t temp0_133 = __psubd_mmxq_memq(temp0_131, data_832fe0);
00655453          st7 = _m_psradi(temp0_132, 8);
00655457          st0 = _m_psradi(temp0_133, 8);
00655467          st7 = _m_punpckldq(_m_packssdw(st7, st7), _m_packssdw(st0, st0));
0065546a          st2 = data_832fb8;
00655471          st4 = data_832fc0;
00655478          edi[0x10] = st7;
0065547f          st1 = _m_pmaddwd(temp0_120, st2);
00655482          st3 = _m_pmaddwd(temp0_121, st2);
00655485          st5 = _m_pmaddwd(temp0_120, st4);
00655488          st6 = _m_pmaddwd(temp0_121, st4);
0065548b          st0 = st1;
0065548e          st7 = st3;
00655491          st1 = _m_punpckldq(st1, st5);
00655494          int64_t temp0_144 = _m_punpckhdq(st0, st5);
00655497          st3 = _m_punpckldq(st3, st6);
0065549a          int64_t temp0_146 = _m_punpckhdq(st7, st6);
0065549d          int64_t temp0_147 = _m_paddd(st1, temp0_144);
006554a0          int64_t temp0_148 = _m_paddd(st3, temp0_146);
006554a3          int64_t temp0_149 = __paddd_mmxq_memq(temp0_147, data_832ff0);
006554aa          int64_t temp0_150 = __paddd_mmxq_memq(temp0_148, data_832ff0);
006554b1          st1 = _m_psradi(temp0_149, 9);
006554b5          st3 = _m_psradi(temp0_150, 9);
006554b9          st1 = _m_packssdw(st1, st1);
006554bc          st5 = data_833010;
006554c3          st3 = _m_packssdw(st3, st3);
006554c6          st6 = data_832fe8;
006554cd          st1 = _m_punpcklwd(st1, st3);
006554d0          st2 = esi[6];
006554d4          st4 = esi[7];
006554d8          result[2] = st1;
006554e0          *(uint32_t*)((char*)ebx + 8) = _m_psrlqi(st1, 0x20);
006554f0          uint64_t temp0_157 = _m_psrlqi((st4 & st5), 0x18);
006554f4          uint64_t temp0_158 = _m_psrlqi((st2 & st5), 0x18);
006554f8          int64_t temp0_159 = _m_psubd(temp0_157, st6);
006554fb          int64_t temp0_160 = _m_psubd(temp0_158, st6);
006554fe          st3 = _m_packssdw(temp0_159, temp0_159);
00655501          st7 = data_833008;
00655514          edx[0x11] = _m_punpckldq(_m_packssdw(temp0_160, temp0_160), st3);
0065551b          int64_t temp0_164 = _m_psubusb(st7, st2);
0065551e          int64_t temp0_165 = _m_psubusb(st7, st4);
00655527          uint64_t temp0_166 = _m_psrlqi(temp0_164, 0x20);
0065552b          uint64_t temp0_167 = _m_psrlqi(temp0_165, 0x20);
0065552f          st7 = _m_punpckhwd(temp0_164, 0);
00655532          st0 = _m_punpckhwd(temp0_165, 0);
00655535          st1 = _m_punpckhwd(temp0_166, 0);
00655538          st3 = _m_punpckhwd(temp0_167, 0);
00655547          int64_t temp0_172 = _m_paddw(st7, st1);
0065554a          int64_t temp0_173 = _m_paddw(st0, st3);
0065554d          st5 = data_832fb0;
00655554          st7 = _m_pmaddwd(st7, st5);
00655557          st1 = _m_pmaddwd(st1, st5);
0065555a          st0 = _m_pmaddwd(st0, st5);
0065555d          st3 = _m_pmaddwd(st3, st5);
00655560          st6 = st7;
00655563          st5 = st0;
00655566          st7 = _m_punpckldq(st7, st1);
00655569          int64_t temp0_179 = _m_punpckhdq(st6, st1);
0065556c          st0 = _m_punpckldq(st0, st3);
0065556f          int64_t temp0_181 = _m_punpckhdq(st5, st3);
00655572          int64_t temp0_182 = _m_paddd(st7, temp0_179);
00655575          int64_t temp0_183 = _m_paddd(st0, temp0_181);
00655578          int64_t temp0_184 = __psubd_mmxq_memq(temp0_182, data_832fe0);
0065557f          int64_t temp0_185 = __psubd_mmxq_memq(temp0_183, data_832fe0);
00655586          st7 = _m_psradi(temp0_184, 8);
0065558a          st0 = _m_psradi(temp0_185, 8);
0065559a          st7 = _m_punpckldq(_m_packssdw(st7, st7), _m_packssdw(st0, st0));
0065559d          st1 = data_832fb8;
006555a4          st3 = data_832fc0;
006555ab          edi[0x11] = st7;
006555b2          st2 = _m_pmaddwd(temp0_172, st1);
006555b5          st4 = _m_pmaddwd(temp0_173, st1);
006555b8          st5 = _m_pmaddwd(temp0_172, st3);
006555bb          st6 = _m_pmaddwd(temp0_173, st3);
006555be          st0 = st2;
006555c1          st7 = st4;
006555c4          st2 = _m_punpckldq(st2, st5);
006555c7          int64_t temp0_196 = _m_punpckhdq(st0, st5);
006555ca          st4 = _m_punpckldq(st4, st6);
006555cd          int64_t temp0_198 = _m_punpckhdq(st7, st6);
006555d0          int64_t temp0_199 = _m_paddd(st2, temp0_196);
006555d3          int64_t temp0_200 = _m_paddd(st4, temp0_198);
006555d6          int64_t temp0_201 = __paddd_mmxq_memq(temp0_199, data_832ff0);
006555dd          int64_t temp0_202 = __paddd_mmxq_memq(temp0_200, data_832ff0);
006555e4          st2 = _m_psradi(temp0_201, 9);
006555e8          st4 = _m_psradi(temp0_202, 9);
006555ef          edi = &edi[2];
006555f5          result = &result[4];
006555f8          st2 = _m_punpcklwd(_m_packssdw(st2, st2), _m_packssdw(st4, st4));
006555fb          ebx += 0x10;
006555fe          result[-1] = st2;
00655602          edx = &edx[2];
00655609          esi += arg2;
0065560c          *(uint32_t*)((char*)ebx - 4) = _m_psrlqi(st2, 0x20);
00655610          i = i_1;
00655610          i_1 -= 1;
00655611      } while (i != 1);
0065561e      return result;
00655120  }

0065561f                                                                                               90                                 .

00655620  uint64_t* _own_rgb_to_ycbcr_411_one_quarter_mcu_m5(int64_t* arg1, uint64_t* arg2, uint8_t (* arg3)[0x8], uint8_t (* arg4)[0x8])

00655620  {
0065562c      int64_t* esi = arg1;
0065562f      uint8_t (* edi)[0x8] = arg3;
00655632      uint8_t (* ebx)[0x8] = arg4;
00655635      int32_t ecx = 3;
0065563d      int32_t edx = 1;
00655642      int64_t s_7 = data_832fb0;
00655649      uint64_t st6 = 0;
0065564c      uint64_t s_1 = *(uint64_t*)esi;
0065565a      uint64_t temp0 = _m_psrlqi(s_1, 0x18);
00655662      uint8_t s_4[0x8] = _m_punpckhwd(s_1, 0);
00655665      int64_t s;
00655665      __builtin_memset(&s, 0, 0x20);
00655669      s_1 = _m_punpckhwd(temp0, 0);
0065566c      int64_t s_9;
0065566c      uint64_t s_5;
0065566c      int64_t s_6;
0065566c      int64_t s_2;
0065566c      
0065566c      while (true)
0065566c      {
0065566c          s_5 = *(uint64_t*)esi;
00655672          int64_t s_8;
00655672          int64_t temp0_3 = __paddw_mmxq_memq(s_4, s_8);
00655676          uint64_t temp0_4 = _m_psrlqi(s_5, 0x30);
0065567a          int64_t s_11 = _m_paddw(temp0_3, s_1);
0065567d          s_4 = _m_pmaddwd(s_4, s_7);
00655680          s_2 = esi[1];
00655684          s_1 = _m_pmaddwd(s_1, s_7);
00655687          s_8 = s_11;
0065568b          s_9 = s_4;
0065568e          s_6 = s_2;
00655691          s_4 = _m_punpckldq(s_4, s_1);
00655694          int64_t temp0_8 = _m_punpckhdq(s_9, s_1);
00655697          uint64_t temp0_9 = _m_psrlqi(s_2, 8);
0065569e          s_4 = __psubd_mmxq_memq(_m_paddd(s_4, temp0_8), data_832fe0);
006556a5          s_2 = _m_punpckhwd(temp0_9, st6);
006556ac          s_4 = _m_psradi(s_4, 8);
006556b0          s_1 = esi[2];
006556b4          uint64_t temp0_14 = _m_psllqi(s_6, 0x10);
006556b8          s_4 = _m_packssdw(s_4, s_4);
006556be          int64_t var_14_1;
006556be          int64_t temp0_16 = _m_paddw(var_14_1, s_2);
006556c1          s_5 = _m_punpckhwd((temp0_4 | temp0_14), st6);
006556c4          s_6 = esi[1];
006556c8          int64_t temp0_18 = _m_paddw(temp0_16, s_5);
006556cb          s_5 = _m_pmaddwd(s_5, s_7);
006556ce          uint64_t temp0_20 = _m_psllqi(s_1, 8);
006556d2          var_14_1 = temp0_18;
006556da          s_6 = _m_punpckhwd(_m_psrlqi(s_6, 0x20), st6);
006556dd          s_2 = _m_pmaddwd(s_2, s_7);
006556e4          s_9 = s_5;
006556ef          s_1 = (temp0_20 | _m_psrlqi(esi[1], 0x38));
006556f2          s_5 = _m_punpckldq(s_5, s_2);
006556f5          int64_t var_1c_1;
006556f5          int64_t temp0_26 = _m_paddw(var_1c_1, s_6);
006556f8          int64_t temp0_27 = _m_punpckhdq(s_9, s_2);
006556fb          s_1 = __punpcklbw_mmxq_memd(s_1, data_833040);
00655705          int64_t temp0_30 = __psubd_mmxq_memq(_m_paddd(s_5, temp0_27), data_832fe0);
0065570c          int64_t temp0_31 = _m_paddw(temp0_26, s_1);
0065570f          s_2 = data_832fb0;
00655716          s_5 = _m_psradi(temp0_30, 8);
0065571a          var_1c_1 = temp0_31;
0065571e          s_5 = _m_packssdw(s_5, s_5);
00655721          s_6 = _m_pmaddwd(s_6, s_2);
00655724          s_4 = _m_punpckldq(s_4, s_5);
00655727          s_5 = esi[2];
0065572b          s_1 = _m_pmaddwd(s_1, s_2);
0065572e          *(uint64_t*)edi = s_4;
00655731          uint64_t temp0_37 = _m_psrlqi(s_5, 0x10);
00655735          s_4 = esi[2];
0065573c          s_7 = data_832fb0;
00655743          int64_t temp0_38 = _m_punpckhdq(s_6, s_1);
00655746          s_2 = s;
0065574a          s_6 = _m_punpckldq(s_6, s_1);
0065574d          s_4 = _m_psrlqi(s_4, 0x28);
00655754          int64_t temp0_42 = __psubd_mmxq_memq(_m_paddd(s_6, temp0_38), data_832fe0);
0065575e          s_5 = _m_punpckhwd(temp0_37, 0);
00655761          s_6 = _m_psradi(temp0_42, 8);
00655765          int64_t temp0_45 = _m_paddw(s_2, s_5);
00655768          uint8_t temp0_46[0x8] = _m_punpckhwd(s_4, 0);
0065576b          s_5 = _m_pmaddwd(s_5, s_7);
0065576e          s_6 = _m_packssdw(s_6, s_6);
00655771          int64_t s_3 = _m_paddw(temp0_45, temp0_46);
00655774          s_1 = *(uint64_t*)((char*)arg2 + esi);
00655778          s_4 = _m_pmaddwd(temp0_46, s_7);
0065577b          s = s_3;
00655782          st6 = 0;
00655785          esi += arg2;
00655793          int64_t temp0_53 = __psubd_mmxq_memq(_m_paddd(_m_punpckldq(s_5, s_4[0]), _m_punpckhdq(s_5, s_4[0])), data_832fe0);
0065579a          uint64_t temp0_54 = _m_psrlqi(s_1, 0x18);
0065579e          s_5 = _m_psradi(temp0_53, 8);
006557a5          s_6 = _m_punpckldq(s_6, _m_packssdw(s_5, s_5));
006557a8          s_4 = _m_punpckhwd(s_1, 0);
006557ab          edi[1] = s_6;
006557af          s_1 = _m_punpckhwd(temp0_54, 0);
006557b2          edi = &edi[2];
006557b5          edx ^= 1;
006557b5          
006557b8          if (edx != 0)
006557b8          {
006557bf              s_4 = s_8;
006557c3              s_2 = data_832fb8;
006557ca              s_1 = s_4;
006557cd              st6 = data_832fc0;
006557d4              s_4 = _m_pmaddwd(s_4, s_2);
006557db              s_1 = _m_pmaddwd(s_1, st6);
006557e5              s_9 = s_4;
006557e8              s_5 = _m_pmaddwd(var_14_1, s_2);
006557eb              s_4 = _m_punpckldq(s_4, s_1);
006557ee              s_7 = _m_pmaddwd(var_1c_1, s_2);
006557f1              int64_t temp0_65 = _m_punpckhdq(s_9, s_1);
006557f4              s_6 = _m_pmaddwd(var_14_1, st6);
006557f7              s_1 = s_5;
0065580c              s_4 = (_m_psradi(__paddd_mmxq_memq(_m_paddd(s_4, temp0_65), data_832ff8), 0xa) & data_833020);
00655813              s_5 = _m_punpckldq(s_5, s_6);
00655816              int64_t temp0_71 = _m_punpckhdq(s_1, s_6);
00655819              s_9 = _m_pmaddwd(var_1c_1, st6);
0065581c              s_6 = s_7;
00655822              int64_t temp0_74 = __paddd_mmxq_memq(_m_paddd(s_5, temp0_71), data_832ff8);
00655829              s_1 = s;
00655831              s_5 = (_m_psradi(temp0_74, 0xa) & data_833020);
00655838              s_7 = _m_punpckldq(s_7, s_9);
0065583f              s_4 |= _m_psllqi(s_5, 0x10);
00655845              s_5 = s_1;
0065584b              int64_t temp0_80 = __paddd_mmxq_memq(_m_paddd(s_7, _m_punpckhdq(s_6, s_9)), data_832ff8);
00655852              s_1 = _m_pmaddwd(s_1, s_2);
00655859              s_7 = (_m_psradi(temp0_80, 0xa) & data_833020);
00655860              s_5 = _m_pmaddwd(s_5, st6);
00655863              s_2 = s_7;
00655866              st6 = 0;
00655869              s_7 = data_832fb0;
00655888              int64_t temp0_87 = __paddd_mmxq_memq(_m_paddd(_m_punpckldq(s_1, s_5), _m_punpckhdq(s_1, s_5)), data_832ff8);
0065588f              __builtin_memset(&s, 0, 0x20);
00655897              s_1 = (_m_psradi(temp0_87, 0xa) & data_833020);
0065589e              s_6 = s_4;
006558a1              s_5 = *(uint64_t*)esi;
006558a8              s_1 = (_m_psllqi(s_1, 0x10) | s_2);
006558ae              uint64_t temp0_90 = _m_psrlqi(s_5, 0x18);
006558b2              s_4 = _m_punpckldq(s_4, s_1);
006558b5              int64_t temp0_92 = _m_punpckhdq(s_6, s_1);
006558b8              s_9 = _m_punpckhwd(s_5, 0);
006558be              *(uint64_t*)ebx = s_4;
006558c1              s_1 = _m_punpckhwd(temp0_90, 0);
006558c4              ebx[0x10] = temp0_92;
006558cb              s_4 = s_9;
006558ce              ebx = &ebx[2];
006558d1              int32_t temp0_95 = ecx;
006558d1              ecx -= 1;
006558d1              
006558d2              if (temp0_95 == 1)
006558d2                  break;
006557b8          }
0065566c      }
0065566c      
006558d8      s_5 = *(uint64_t*)esi;
006558de      int64_t temp0_96 = __paddw_mmxq_memq(s_4, 0);
006558e2      uint64_t temp0_97 = _m_psrlqi(s_5, 0x30);
006558e6      int64_t temp0_98 = _m_paddw(temp0_96, s_1);
006558e9      s_4 = _m_pmaddwd(s_4, s_7);
006558ec      s_2 = esi[1];
006558f0      s_1 = _m_pmaddwd(s_1, s_7);
006558f7      s_9 = s_4;
006558fa      s_6 = s_2;
006558fd      s_4 = _m_punpckldq(s_4, s_1);
00655900      int64_t temp0_102 = _m_punpckhdq(s_9, s_1);
00655903      uint64_t temp0_103 = _m_psrlqi(s_2, 8);
0065590a      s_4 = __psubd_mmxq_memq(_m_paddd(s_4, temp0_102), data_832fe0);
00655911      s_2 = _m_punpckhwd(temp0_103, 0);
00655918      s_4 = _m_psradi(s_4, 8);
0065591c      s_1 = esi[2];
00655920      uint64_t temp0_108 = _m_psllqi(s_6, 0x10);
00655924      s_4 = _m_packssdw(s_4, s_4);
0065592a      int64_t temp0_110 = _m_paddw(0, s_2);
0065592d      s_5 = _m_punpckhwd((temp0_97 | temp0_108), 0);
00655930      s_6 = esi[1];
00655934      int64_t temp0_112 = _m_paddw(temp0_110, s_5);
00655937      s_5 = _m_pmaddwd(s_5, s_7);
0065593a      uint64_t temp0_114 = _m_psllqi(s_1, 8);
00655946      s_6 = _m_punpckhwd(_m_psrlqi(s_6, 0x20), 0);
00655949      s_2 = _m_pmaddwd(s_2, s_7);
00655950      s_9 = s_5;
0065595b      s_1 = (temp0_114 | _m_psrlqi(esi[1], 0x38));
0065595e      s_5 = _m_punpckldq(s_5, s_2);
00655961      int64_t temp0_120 = _m_paddw(0, s_6);
00655964      int64_t temp0_121 = _m_punpckhdq(s_9, s_2);
00655967      s_1 = __punpcklbw_mmxq_memd(s_1, data_833040);
00655971      int64_t temp0_124 = __psubd_mmxq_memq(_m_paddd(s_5, temp0_121), data_832fe0);
00655978      int64_t temp0_125 = _m_paddw(temp0_120, s_1);
0065597b      s_2 = data_832fb0;
00655982      s_5 = _m_psradi(temp0_124, 8);
0065598a      s_5 = _m_packssdw(s_5, s_5);
0065598d      s_6 = _m_pmaddwd(s_6, s_2);
00655990      s_4 = _m_punpckldq(s_4, s_5);
00655993      s_5 = esi[2];
00655997      s_1 = _m_pmaddwd(s_1, s_2);
0065599a      *(uint64_t*)edi = s_4;
0065599d      uint64_t temp0_131 = _m_psrlqi(s_5, 0x10);
006559a1      s_4 = esi[2];
006559a8      s_7 = data_832fb0;
006559af      int64_t temp0_132 = _m_punpckhdq(s_6, s_1);
006559b6      s_6 = _m_punpckldq(s_6, s_1);
006559b9      s_4 = _m_psrlqi(s_4, 0x28);
006559c0      int64_t temp0_136 = __psubd_mmxq_memq(_m_paddd(s_6, temp0_132), data_832fe0);
006559ca      s_5 = _m_punpckhwd(temp0_131, 0);
006559cd      s_6 = _m_psradi(temp0_136, 8);
006559d1      int64_t temp0_139 = _m_paddw(0, s_5);
006559d4      uint8_t temp0_140[0x8] = _m_punpckhwd(s_4, 0);
006559d7      s_5 = _m_pmaddwd(s_5, s_7);
006559da      s_6 = _m_packssdw(s_6, s_6);
006559dd      int64_t temp0_143 = _m_paddw(temp0_139, temp0_140);
006559e0      s_1 = *(uint64_t*)((char*)arg2 + esi);
006559e4      s_4 = _m_pmaddwd(temp0_140, s_7);
006559f1      void* esi_1 = ((char*)esi + arg2);
006559ff      int64_t temp0_148 = __psubd_mmxq_memq(_m_paddd(_m_punpckldq(s_5, s_4[0]), _m_punpckhdq(s_5, s_4[0])), data_832fe0);
00655a06      uint64_t temp0_149 = _m_psrlqi(s_1, 0x18);
00655a0a      s_5 = _m_psradi(temp0_148, 8);
00655a11      s_6 = _m_punpckldq(s_6, _m_packssdw(s_5, s_5));
00655a14      uint8_t temp0_153[0x8] = _m_punpckhwd(s_1, 0);
00655a17      edi[1] = s_6;
00655a1b      s_1 = _m_punpckhwd(temp0_149, 0);
00655a21      s_5 = *(uint64_t*)esi_1;
00655a27      int64_t temp0_155 = __paddw_mmxq_memq(temp0_153, temp0_98);
00655a2b      uint64_t temp0_156 = _m_psrlqi(s_5, 0x30);
00655a2f      int64_t s_10 = _m_paddw(temp0_155, s_1);
00655a32      s_4 = _m_pmaddwd(temp0_153, s_7);
00655a35      s_2 = *(uint64_t*)((char*)esi_1 + 8);
00655a39      s_1 = _m_pmaddwd(s_1, s_7);
00655a40      s_9 = s_4;
00655a43      s_6 = s_2;
00655a46      s_4 = _m_punpckldq(s_4, s_1);
00655a49      int64_t temp0_160 = _m_punpckhdq(s_9, s_1);
00655a4c      uint64_t temp0_161 = _m_psrlqi(s_2, 8);
00655a53      s_4 = __psubd_mmxq_memq(_m_paddd(s_4, temp0_160), data_832fe0);
00655a5a      s_2 = _m_punpckhwd(temp0_161, 0);
00655a61      s_4 = _m_psradi(s_4, 8);
00655a65      s_1 = *(uint64_t*)((char*)esi_1 + 0x10);
00655a69      uint64_t temp0_166 = _m_psllqi(s_6, 0x10);
00655a6d      s_4 = _m_packssdw(s_4, s_4);
00655a73      int64_t temp0_168 = _m_paddw(temp0_112, s_2);
00655a76      s_5 = _m_punpckhwd((temp0_156 | temp0_166), 0);
00655a79      s_6 = *(uint64_t*)((char*)esi_1 + 8);
00655a7d      int64_t temp0_170 = _m_paddw(temp0_168, s_5);
00655a80      s_5 = _m_pmaddwd(s_5, s_7);
00655a83      uint64_t temp0_172 = _m_psllqi(s_1, 8);
00655a8f      s_6 = _m_punpckhwd(_m_psrlqi(s_6, 0x20), 0);
00655a92      s_2 = _m_pmaddwd(s_2, s_7);
00655a99      s_9 = s_5;
00655aa4      s_1 = (temp0_172 | _m_psrlqi(*(uint64_t*)((char*)esi_1 + 8), 0x38));
00655aa7      s_5 = _m_punpckldq(s_5, s_2);
00655aaa      int64_t temp0_178 = _m_paddw(temp0_125, s_6);
00655aad      int64_t temp0_179 = _m_punpckhdq(s_9, s_2);
00655ab0      s_1 = __punpcklbw_mmxq_memd(s_1, data_833040);
00655aba      int64_t temp0_182 = __psubd_mmxq_memq(_m_paddd(s_5, temp0_179), data_832fe0);
00655ac1      int64_t temp0_183 = _m_paddw(temp0_178, s_1);
00655ac4      s_2 = data_832fb0;
00655acb      s_5 = _m_psradi(temp0_182, 8);
00655ad3      s_5 = _m_packssdw(s_5, s_5);
00655ad6      s_6 = _m_pmaddwd(s_6, s_2);
00655ad9      s_4 = _m_punpckldq(s_4, s_5);
00655adc      s_5 = *(uint64_t*)((char*)esi_1 + 0x10);
00655ae0      s_1 = _m_pmaddwd(s_1, s_2);
00655a1e      edi[2] = s_4;
00655ae6      uint64_t temp0_189 = _m_psrlqi(s_5, 0x10);
00655aea      s_4 = *(uint64_t*)((char*)esi_1 + 0x10);
00655af1      s_7 = data_832fb0;
00655af8      int64_t temp0_190 = _m_punpckhdq(s_6, s_1);
00655aff      s_6 = _m_punpckldq(s_6, s_1);
00655b02      s_4 = _m_psrlqi(s_4, 0x28);
00655b09      int64_t temp0_194 = __psubd_mmxq_memq(_m_paddd(s_6, temp0_190), data_832fe0);
00655b13      s_5 = _m_punpckhwd(temp0_189, 0);
00655b16      s_6 = _m_psradi(temp0_194, 8);
00655b1a      int64_t temp0_197 = _m_paddw(temp0_143, s_5);
00655b1d      uint8_t temp0_198[0x8] = _m_punpckhwd(s_4, 0);
00655b20      s_5 = _m_pmaddwd(s_5, s_7);
00655b23      s_6 = _m_packssdw(s_6, s_6);
00655b26      int64_t temp0_201 = _m_paddw(temp0_197, temp0_198);
00655b29      s_4 = _m_pmaddwd(temp0_198, s_7);
00655b48      s_5 = _m_psradi(__psubd_mmxq_memq(_m_paddd(_m_punpckldq(s_5, s_4[0]), _m_punpckhdq(s_5, s_4[0])), data_832fe0), 8);
00655a1e      edi[3] = _m_punpckldq(s_6, _m_packssdw(s_5, s_5));
00655b56      s_4 = s_10;
00655b5a      s_2 = data_832fb8;
00655b61      s_1 = s_4;
00655b64      st6 = data_832fc0;
00655b6b      s_4 = _m_pmaddwd(s_4, s_2);
00655b72      s_1 = _m_pmaddwd(s_1, st6);
00655b7c      s_9 = s_4;
00655b7f      s_5 = _m_pmaddwd(temp0_170, s_2);
00655b82      s_4 = _m_punpckldq(s_4, s_1);
00655b85      s_7 = _m_pmaddwd(temp0_183, s_2);
00655b88      int64_t temp0_215 = _m_punpckhdq(s_9, s_1);
00655b8b      s_6 = _m_pmaddwd(temp0_170, st6);
00655b8e      s_1 = s_5;
00655ba3      s_4 = (_m_psradi(__paddd_mmxq_memq(_m_paddd(s_4, temp0_215), data_832ff8), 0xa) & data_833020);
00655baa      s_5 = _m_punpckldq(s_5, s_6);
00655bad      int64_t temp0_221 = _m_punpckhdq(s_1, s_6);
00655bb0      s_9 = _m_pmaddwd(temp0_183, st6);
00655bb3      s_6 = s_7;
00655bc8      s_5 = (_m_psradi(__paddd_mmxq_memq(_m_paddd(s_5, temp0_221), data_832ff8), 0xa) & data_833020);
00655bcf      s_7 = _m_punpckldq(s_7, s_9);
00655bd6      s_4 |= _m_psllqi(s_5, 0x10);
00655be2      int64_t temp0_230 = __paddd_mmxq_memq(_m_paddd(s_7, _m_punpckhdq(s_6, s_9)), data_832ff8);
00655be9      s_1 = _m_pmaddwd(temp0_201, s_2);
00655bf0      s_7 = (_m_psradi(temp0_230, 0xa) & data_833020);
00655bf7      s_5 = _m_pmaddwd(temp0_201, st6);
00655c18      s_6 = s_4;
00655c1f      s_1 = (_m_psllqi((_m_psradi(__paddd_mmxq_memq(_m_paddd(_m_punpckldq(s_1, s_5), _m_punpckhdq(s_1, s_5)), data_832ff8), 0xa) & data_833020), 0x10) | s_7);
00655c22      s_4 = _m_punpckldq(s_4, s_1);
00655c25      int64_t temp0_241 = _m_punpckhdq(s_6, s_1);
00655c28      *(uint64_t*)ebx = s_4;
00655c2b      ebx[0x10] = temp0_241;
00655c39      return arg2;
00655620  }

00655c3a                                                                                8d 9b 00 00 00 00                            ......

00655c40  uint64_t* _own_bgr_to_ycbcr_411_one_quarter_mcu_m5(int64_t* arg1, uint64_t* arg2, uint8_t (* arg3)[0x8], uint8_t (* arg4)[0x8])

00655c40  {
00655c4c      int64_t* esi = arg1;
00655c4f      uint8_t (* edi)[0x8] = arg3;
00655c52      uint8_t (* ebx)[0x8] = arg4;
00655c55      int32_t ecx = 3;
00655c5d      int32_t edx = 1;
00655c62      int64_t s_7 = data_832fc8;
00655c69      uint64_t st6 = 0;
00655c6c      uint64_t s_1 = *(uint64_t*)esi;
00655c7a      uint64_t temp0 = _m_psrlqi(s_1, 0x18);
00655c82      uint8_t s_4[0x8] = _m_punpckhwd(s_1, 0);
00655c85      int64_t s;
00655c85      __builtin_memset(&s, 0, 0x20);
00655c89      s_1 = _m_punpckhwd(temp0, 0);
00655c8c      int64_t s_9;
00655c8c      uint64_t s_5;
00655c8c      int64_t s_6;
00655c8c      int64_t s_2;
00655c8c      
00655c8c      while (true)
00655c8c      {
00655c8c          s_5 = *(uint64_t*)esi;
00655c92          int64_t s_8;
00655c92          int64_t temp0_3 = __paddw_mmxq_memq(s_4, s_8);
00655c96          uint64_t temp0_4 = _m_psrlqi(s_5, 0x30);
00655c9a          int64_t s_11 = _m_paddw(temp0_3, s_1);
00655c9d          s_4 = _m_pmaddwd(s_4, s_7);
00655ca0          s_2 = esi[1];
00655ca4          s_1 = _m_pmaddwd(s_1, s_7);
00655ca7          s_8 = s_11;
00655cab          s_9 = s_4;
00655cae          s_6 = s_2;
00655cb1          s_4 = _m_punpckldq(s_4, s_1);
00655cb4          int64_t temp0_8 = _m_punpckhdq(s_9, s_1);
00655cb7          uint64_t temp0_9 = _m_psrlqi(s_2, 8);
00655cbe          s_4 = __psubd_mmxq_memq(_m_paddd(s_4, temp0_8), data_832fe0);
00655cc5          s_2 = _m_punpckhwd(temp0_9, st6);
00655ccc          s_4 = _m_psradi(s_4, 8);
00655cd0          s_1 = esi[2];
00655cd4          uint64_t temp0_14 = _m_psllqi(s_6, 0x10);
00655cd8          s_4 = _m_packssdw(s_4, s_4);
00655cde          int64_t var_14_1;
00655cde          int64_t temp0_16 = _m_paddw(var_14_1, s_2);
00655ce1          s_5 = _m_punpckhwd((temp0_4 | temp0_14), st6);
00655ce4          s_6 = esi[1];
00655ce8          int64_t temp0_18 = _m_paddw(temp0_16, s_5);
00655ceb          s_5 = _m_pmaddwd(s_5, s_7);
00655cee          uint64_t temp0_20 = _m_psllqi(s_1, 8);
00655cf2          var_14_1 = temp0_18;
00655cfa          s_6 = _m_punpckhwd(_m_psrlqi(s_6, 0x20), st6);
00655cfd          s_2 = _m_pmaddwd(s_2, s_7);
00655d04          s_9 = s_5;
00655d0f          s_1 = (temp0_20 | _m_psrlqi(esi[1], 0x38));
00655d12          s_5 = _m_punpckldq(s_5, s_2);
00655d15          int64_t var_1c_1;
00655d15          int64_t temp0_26 = _m_paddw(var_1c_1, s_6);
00655d18          int64_t temp0_27 = _m_punpckhdq(s_9, s_2);
00655d1b          s_1 = __punpcklbw_mmxq_memd(s_1, data_833040);
00655d25          int64_t temp0_30 = __psubd_mmxq_memq(_m_paddd(s_5, temp0_27), data_832fe0);
00655d2c          int64_t temp0_31 = _m_paddw(temp0_26, s_1);
00655d2f          s_2 = data_832fc8;
00655d36          s_5 = _m_psradi(temp0_30, 8);
00655d3a          var_1c_1 = temp0_31;
00655d3e          s_5 = _m_packssdw(s_5, s_5);
00655d41          s_6 = _m_pmaddwd(s_6, s_2);
00655d44          s_4 = _m_punpckldq(s_4, s_5);
00655d47          s_5 = esi[2];
00655d4b          s_1 = _m_pmaddwd(s_1, s_2);
00655d4e          *(uint64_t*)edi = s_4;
00655d51          uint64_t temp0_37 = _m_psrlqi(s_5, 0x10);
00655d55          s_4 = esi[2];
00655d5c          s_7 = data_832fc8;
00655d63          int64_t temp0_38 = _m_punpckhdq(s_6, s_1);
00655d66          s_2 = s;
00655d6a          s_6 = _m_punpckldq(s_6, s_1);
00655d6d          s_4 = _m_psrlqi(s_4, 0x28);
00655d74          int64_t temp0_42 = __psubd_mmxq_memq(_m_paddd(s_6, temp0_38), data_832fe0);
00655d7e          s_5 = _m_punpckhwd(temp0_37, 0);
00655d81          s_6 = _m_psradi(temp0_42, 8);
00655d85          int64_t temp0_45 = _m_paddw(s_2, s_5);
00655d88          uint8_t temp0_46[0x8] = _m_punpckhwd(s_4, 0);
00655d8b          s_5 = _m_pmaddwd(s_5, s_7);
00655d8e          s_6 = _m_packssdw(s_6, s_6);
00655d91          int64_t s_3 = _m_paddw(temp0_45, temp0_46);
00655d94          s_1 = *(uint64_t*)((char*)arg2 + esi);
00655d98          s_4 = _m_pmaddwd(temp0_46, s_7);
00655d9b          s = s_3;
00655da2          st6 = 0;
00655da5          esi += arg2;
00655daa          edi = &edi[2];
00655db6          int64_t temp0_53 = __psubd_mmxq_memq(_m_paddd(_m_punpckldq(s_5, s_4[0]), _m_punpckhdq(s_5, s_4[0])), data_832fe0);
00655dbd          uint64_t temp0_54 = _m_psrlqi(s_1, 0x18);
00655dc1          s_5 = _m_psradi(temp0_53, 8);
00655dc5          edx ^= 1;
00655dcb          s_6 = _m_punpckldq(s_6, _m_packssdw(s_5, s_5));
00655dce          s_4 = _m_punpckhwd(s_1, 0);
00655dd1          edi[-1] = s_6;
00655dd1          
00655dd5          if (edx != 0)
00655dd5          {
00655ddf              s_4 = s_8;
00655de3              s_2 = data_832fd0;
00655dea              s_1 = s_4;
00655ded              st6 = data_832fd8;
00655df4              s_4 = _m_pmaddwd(s_4, s_2);
00655dfb              s_1 = _m_pmaddwd(s_1, st6);
00655e05              s_9 = s_4;
00655e08              s_5 = _m_pmaddwd(var_14_1, s_2);
00655e0b              s_4 = _m_punpckldq(s_4, s_1);
00655e0e              s_7 = _m_pmaddwd(var_1c_1, s_2);
00655e11              int64_t temp0_65 = _m_punpckhdq(s_9, s_1);
00655e14              s_6 = _m_pmaddwd(var_14_1, st6);
00655e17              s_1 = s_5;
00655e2c              s_4 = (_m_psradi(__paddd_mmxq_memq(_m_paddd(s_4, temp0_65), data_832ff8), 0xa) & data_833020);
00655e33              s_5 = _m_punpckldq(s_5, s_6);
00655e36              int64_t temp0_71 = _m_punpckhdq(s_1, s_6);
00655e39              s_9 = _m_pmaddwd(var_1c_1, st6);
00655e3c              s_6 = s_7;
00655e42              int64_t temp0_74 = __paddd_mmxq_memq(_m_paddd(s_5, temp0_71), data_832ff8);
00655e49              s_1 = s;
00655e51              s_5 = (_m_psradi(temp0_74, 0xa) & data_833020);
00655e58              s_7 = _m_punpckldq(s_7, s_9);
00655e5f              s_4 |= _m_psllqi(s_5, 0x10);
00655e65              s_5 = s_1;
00655e6b              int64_t temp0_80 = __paddd_mmxq_memq(_m_paddd(s_7, _m_punpckhdq(s_6, s_9)), data_832ff8);
00655e72              s_1 = _m_pmaddwd(s_1, s_2);
00655e79              s_7 = (_m_psradi(temp0_80, 0xa) & data_833020);
00655e80              s_5 = _m_pmaddwd(s_5, st6);
00655e83              s_2 = s_7;
00655e86              st6 = 0;
00655e89              s_7 = data_832fc8;
00655ea8              int64_t temp0_87 = __paddd_mmxq_memq(_m_paddd(_m_punpckldq(s_1, s_5), _m_punpckhdq(s_1, s_5)), data_832ff8);
00655eaf              __builtin_memset(&s, 0, 0x20);
00655eb7              s_1 = (_m_psradi(temp0_87, 0xa) & data_833020);
00655ebe              s_6 = s_4;
00655ec1              s_5 = *(uint64_t*)esi;
00655ec8              s_1 = (_m_psllqi(s_1, 0x10) | s_2);
00655ece              uint64_t temp0_90 = _m_psrlqi(s_5, 0x18);
00655ed2              s_4 = _m_punpckldq(s_4, s_1);
00655ed5              int64_t temp0_92 = _m_punpckhdq(s_6, s_1);
00655ed8              s_9 = _m_punpckhwd(s_5, 0);
00655ede              *(uint64_t*)ebx = s_4;
00655ee1              s_1 = _m_punpckhwd(temp0_90, 0);
00655ee4              ebx[0x10] = temp0_92;
00655eeb              s_4 = s_9;
00655eee              ebx = &ebx[2];
00655ef1              int32_t temp0_95 = ecx;
00655ef1              ecx -= 1;
00655ef1              
00655ef2              if (temp0_95 == 1)
00655ef2                  break;
00655dd5          }
00655dd5          else
00655dd7              s_1 = _m_punpckhwd(temp0_54, 0);
00655c8c      }
00655c8c      
00655ef8      s_5 = *(uint64_t*)esi;
00655efe      int64_t temp0_96 = __paddw_mmxq_memq(s_4, 0);
00655f02      uint64_t temp0_97 = _m_psrlqi(s_5, 0x30);
00655f06      int64_t temp0_98 = _m_paddw(temp0_96, s_1);
00655f09      s_4 = _m_pmaddwd(s_4, s_7);
00655f0c      s_2 = esi[1];
00655f10      s_1 = _m_pmaddwd(s_1, s_7);
00655f17      s_9 = s_4;
00655f1a      s_6 = s_2;
00655f1d      s_4 = _m_punpckldq(s_4, s_1);
00655f20      int64_t temp0_102 = _m_punpckhdq(s_9, s_1);
00655f23      uint64_t temp0_103 = _m_psrlqi(s_2, 8);
00655f2a      s_4 = __psubd_mmxq_memq(_m_paddd(s_4, temp0_102), data_832fe0);
00655f31      s_2 = _m_punpckhwd(temp0_103, 0);
00655f38      s_4 = _m_psradi(s_4, 8);
00655f3c      s_1 = esi[2];
00655f40      uint64_t temp0_108 = _m_psllqi(s_6, 0x10);
00655f44      s_4 = _m_packssdw(s_4, s_4);
00655f4a      int64_t temp0_110 = _m_paddw(0, s_2);
00655f4d      s_5 = _m_punpckhwd((temp0_97 | temp0_108), 0);
00655f50      s_6 = esi[1];
00655f54      int64_t temp0_112 = _m_paddw(temp0_110, s_5);
00655f57      s_5 = _m_pmaddwd(s_5, s_7);
00655f5a      uint64_t temp0_114 = _m_psllqi(s_1, 8);
00655f66      s_6 = _m_punpckhwd(_m_psrlqi(s_6, 0x20), 0);
00655f69      s_2 = _m_pmaddwd(s_2, s_7);
00655f70      s_9 = s_5;
00655f7b      s_1 = (temp0_114 | _m_psrlqi(esi[1], 0x38));
00655f7e      s_5 = _m_punpckldq(s_5, s_2);
00655f81      int64_t temp0_120 = _m_paddw(0, s_6);
00655f84      int64_t temp0_121 = _m_punpckhdq(s_9, s_2);
00655f87      s_1 = __punpcklbw_mmxq_memd(s_1, data_833040);
00655f91      int64_t temp0_124 = __psubd_mmxq_memq(_m_paddd(s_5, temp0_121), data_832fe0);
00655f98      int64_t temp0_125 = _m_paddw(temp0_120, s_1);
00655f9b      s_2 = data_832fc8;
00655fa2      s_5 = _m_psradi(temp0_124, 8);
00655faa      s_5 = _m_packssdw(s_5, s_5);
00655fad      s_6 = _m_pmaddwd(s_6, s_2);
00655fb0      s_4 = _m_punpckldq(s_4, s_5);
00655fb3      s_5 = esi[2];
00655fb7      s_1 = _m_pmaddwd(s_1, s_2);
00655fba      *(uint64_t*)edi = s_4;
00655fbd      uint64_t temp0_131 = _m_psrlqi(s_5, 0x10);
00655fc1      s_4 = esi[2];
00655fc8      s_7 = data_832fc8;
00655fcf      int64_t temp0_132 = _m_punpckhdq(s_6, s_1);
00655fd6      s_6 = _m_punpckldq(s_6, s_1);
00655fd9      s_4 = _m_psrlqi(s_4, 0x28);
00655fe0      int64_t temp0_136 = __psubd_mmxq_memq(_m_paddd(s_6, temp0_132), data_832fe0);
00655fea      s_5 = _m_punpckhwd(temp0_131, 0);
00655fed      s_6 = _m_psradi(temp0_136, 8);
00655ff1      int64_t temp0_139 = _m_paddw(0, s_5);
00655ff4      uint8_t temp0_140[0x8] = _m_punpckhwd(s_4, 0);
00655ff7      s_5 = _m_pmaddwd(s_5, s_7);
00655ffa      s_6 = _m_packssdw(s_6, s_6);
00655ffd      int64_t temp0_143 = _m_paddw(temp0_139, temp0_140);
00656000      s_1 = *(uint64_t*)((char*)arg2 + esi);
00656004      s_4 = _m_pmaddwd(temp0_140, s_7);
00656011      void* esi_1 = ((char*)esi + arg2);
0065601f      int64_t temp0_148 = __psubd_mmxq_memq(_m_paddd(_m_punpckldq(s_5, s_4[0]), _m_punpckhdq(s_5, s_4[0])), data_832fe0);
00656026      uint64_t temp0_149 = _m_psrlqi(s_1, 0x18);
0065602a      s_5 = _m_psradi(temp0_148, 8);
00656031      s_6 = _m_punpckldq(s_6, _m_packssdw(s_5, s_5));
00656034      uint8_t temp0_153[0x8] = _m_punpckhwd(s_1, 0);
00656037      edi[1] = s_6;
0065603b      s_1 = _m_punpckhwd(temp0_149, 0);
0065603e      s_5 = *(uint64_t*)esi_1;
00656044      int64_t temp0_155 = __paddw_mmxq_memq(temp0_153, temp0_98);
00656048      uint64_t temp0_156 = _m_psrlqi(s_5, 0x30);
0065604c      int64_t s_10 = _m_paddw(temp0_155, s_1);
0065604f      s_4 = _m_pmaddwd(temp0_153, s_7);
00656052      s_2 = *(uint64_t*)((char*)esi_1 + 8);
00656056      s_1 = _m_pmaddwd(s_1, s_7);
0065605d      s_9 = s_4;
00656060      s_6 = s_2;
00656063      s_4 = _m_punpckldq(s_4, s_1);
00656066      int64_t temp0_160 = _m_punpckhdq(s_9, s_1);
00656069      uint64_t temp0_161 = _m_psrlqi(s_2, 8);
00656070      s_4 = __psubd_mmxq_memq(_m_paddd(s_4, temp0_160), data_832fe0);
00656077      s_2 = _m_punpckhwd(temp0_161, 0);
0065607e      s_4 = _m_psradi(s_4, 8);
00656082      s_1 = *(uint64_t*)((char*)esi_1 + 0x10);
00656086      uint64_t temp0_166 = _m_psllqi(s_6, 0x10);
0065608a      s_4 = _m_packssdw(s_4, s_4);
00656090      int64_t temp0_168 = _m_paddw(temp0_112, s_2);
00656093      s_5 = _m_punpckhwd((temp0_156 | temp0_166), 0);
00656096      s_6 = *(uint64_t*)((char*)esi_1 + 8);
0065609a      int64_t temp0_170 = _m_paddw(temp0_168, s_5);
0065609d      s_5 = _m_pmaddwd(s_5, s_7);
006560a0      uint64_t temp0_172 = _m_psllqi(s_1, 8);
006560ac      s_6 = _m_punpckhwd(_m_psrlqi(s_6, 0x20), 0);
006560af      s_2 = _m_pmaddwd(s_2, s_7);
006560b6      s_9 = s_5;
006560c1      s_1 = (temp0_172 | _m_psrlqi(*(uint64_t*)((char*)esi_1 + 8), 0x38));
006560c4      s_5 = _m_punpckldq(s_5, s_2);
006560c7      int64_t temp0_178 = _m_paddw(temp0_125, s_6);
006560ca      int64_t temp0_179 = _m_punpckhdq(s_9, s_2);
006560cd      s_1 = __punpcklbw_mmxq_memd(s_1, data_833040);
006560d7      int64_t temp0_182 = __psubd_mmxq_memq(_m_paddd(s_5, temp0_179), data_832fe0);
006560de      int64_t temp0_183 = _m_paddw(temp0_178, s_1);
006560e1      s_2 = data_832fc8;
006560e8      s_5 = _m_psradi(temp0_182, 8);
006560f0      s_5 = _m_packssdw(s_5, s_5);
006560f3      s_6 = _m_pmaddwd(s_6, s_2);
006560f6      s_4 = _m_punpckldq(s_4, s_5);
006560f9      s_5 = *(uint64_t*)((char*)esi_1 + 0x10);
006560fd      s_1 = _m_pmaddwd(s_1, s_2);
00656100      edi[2] = s_4;
00656104      uint64_t temp0_189 = _m_psrlqi(s_5, 0x10);
00656108      s_4 = *(uint64_t*)((char*)esi_1 + 0x10);
0065610f      s_7 = data_832fc8;
00656116      int64_t temp0_190 = _m_punpckhdq(s_6, s_1);
0065611d      s_6 = _m_punpckldq(s_6, s_1);
00656120      s_4 = _m_psrlqi(s_4, 0x28);
00656127      int64_t temp0_194 = __psubd_mmxq_memq(_m_paddd(s_6, temp0_190), data_832fe0);
00656131      s_5 = _m_punpckhwd(temp0_189, 0);
00656134      s_6 = _m_psradi(temp0_194, 8);
00656138      int64_t temp0_197 = _m_paddw(temp0_143, s_5);
0065613b      uint8_t temp0_198[0x8] = _m_punpckhwd(s_4, 0);
0065613e      s_5 = _m_pmaddwd(s_5, s_7);
00656141      s_6 = _m_packssdw(s_6, s_6);
00656144      int64_t temp0_201 = _m_paddw(temp0_197, temp0_198);
00656147      s_4 = _m_pmaddwd(temp0_198, s_7);
00656164      s_5 = _m_psradi(__psubd_mmxq_memq(_m_paddd(_m_punpckldq(s_5, s_4[0]), _m_punpckhdq(s_5, s_4[0])), data_832fe0), 8);
0065616e      edi[3] = _m_punpckldq(s_6, _m_packssdw(s_5, s_5));
00656172      _m_punpckhwd(s_1, 0);
00656175      s_4 = s_10;
00656179      s_2 = data_832fd0;
00656180      s_1 = s_4;
00656183      st6 = data_832fd8;
0065618a      s_4 = _m_pmaddwd(s_4, s_2);
00656191      s_1 = _m_pmaddwd(s_1, st6);
0065619b      s_9 = s_4;
0065619e      s_5 = _m_pmaddwd(temp0_170, s_2);
006561a1      s_4 = _m_punpckldq(s_4, s_1);
006561a4      s_7 = _m_pmaddwd(temp0_183, s_2);
006561a7      int64_t temp0_216 = _m_punpckhdq(s_9, s_1);
006561aa      s_6 = _m_pmaddwd(temp0_170, st6);
006561ad      s_1 = s_5;
006561c2      s_4 = (_m_psradi(__paddd_mmxq_memq(_m_paddd(s_4, temp0_216), data_832ff8), 0xa) & data_833020);
006561c9      s_5 = _m_punpckldq(s_5, s_6);
006561cc      int64_t temp0_222 = _m_punpckhdq(s_1, s_6);
006561cf      s_9 = _m_pmaddwd(temp0_183, st6);
006561d2      s_6 = s_7;
006561e7      s_5 = (_m_psradi(__paddd_mmxq_memq(_m_paddd(s_5, temp0_222), data_832ff8), 0xa) & data_833020);
006561ee      s_7 = _m_punpckldq(s_7, s_9);
006561f5      s_4 |= _m_psllqi(s_5, 0x10);
00656201      int64_t temp0_231 = __paddd_mmxq_memq(_m_paddd(s_7, _m_punpckhdq(s_6, s_9)), data_832ff8);
00656208      s_1 = _m_pmaddwd(temp0_201, s_2);
0065620f      s_7 = (_m_psradi(temp0_231, 0xa) & data_833020);
00656216      s_5 = _m_pmaddwd(temp0_201, st6);
00656237      s_6 = s_4;
0065623e      s_1 = (_m_psllqi((_m_psradi(__paddd_mmxq_memq(_m_paddd(_m_punpckldq(s_1, s_5), _m_punpckhdq(s_1, s_5)), data_832ff8), 0xa) & data_833020), 0x10) | s_7);
00656241      s_4 = _m_punpckldq(s_4, s_1);
00656244      int64_t temp0_242 = _m_punpckhdq(s_6, s_1);
00656247      *(uint64_t*)ebx = s_4;
0065624a      ebx[0x10] = temp0_242;
00656258      return arg2;
00655c40  }

00656259                                                                             8d a4 24 00 00 00 00                           ..$....

00656260  void _own_rgba_fpx_to_ycbcra_fpx_4114_one_half_mcu_m5(int32_t arg1, int32_t arg2, int64_t* arg3, void* arg4, void* arg5)

00656260  {
0065626f      int64_t* ebx = nullptr;
00656274      int32_t ecx = 8;
00656279      int32_t edx = 0;
0065627e      int32_t esi = arg1;
00656281      int32_t edi = 4;
00656281      
00656292      while (true)
00656292      {
00656292          int64_t st6 = data_833048;
006562a7          int64_t st0 = *(uint64_t*)((char*)ebx + esi);
006562b5          int64_t temp0_2 = _m_psubd(_m_psrlqi((st0 & data_833050), 0x18), data_833060);
006562b8          uint64_t st4 = _m_packssdw(temp0_2, temp0_2);
006562bb          int64_t temp0_4 = _m_psubusb(st6, st0);
006562c1          int64_t var_60;
006562c1          *(uint32_t*)(&var_60 + edx) = st4;
006562c9          int64_t st1 = _m_punpckhwd(temp0_4, 0);
006562cc          int64_t st3 = data_833070;
006562d3          int16_t st2[0x4] = st3;
006562d6          st3 = _m_pmaddwd(st3, st1);
006562d9          int64_t temp0_7 = _m_punpckhbw(temp0_4, 0);
006562dc          int16_t temp0_8[0x4] = _m_pmaddwd(st2, temp0_7);
006562e5          uint64_t temp0_9 = _m_psrlqi(st3, 0x20);
006562e9          uint64_t temp0_10 = _m_psrlqi(temp0_8, 0x20);
006562ed          int64_t temp0_11 = _m_paddd(temp0_9, st3);
006562f0          int64_t temp0_12 = _m_paddd(temp0_10, temp0_8);
006562f3          uint64_t temp0_13 = _m_psllqi(temp0_11, 0x20);
006562f7          uint64_t temp0_14 = _m_psllqi(temp0_12, 0x20);
00656309          int64_t st5 = _m_psradi(__psubd_mmxq_memq((_m_psrlqi(temp0_13, 0x20) | temp0_14), data_833058), 8);
00656310          int64_t var_120;
00656310          *(uint32_t*)(edx + &var_120) = _m_packssdw(st5, st5);
00656314          st3 = data_833078;
0065631b          st2 = st3;
0065631e          st3 = _m_pmaddwd(st3, st1);
00656321          int16_t temp0_20[0x4] = _m_pmaddwd(st2, temp0_7);
0065632a          uint64_t temp0_21 = _m_psrlqi(st3, 0x20);
0065632e          uint64_t temp0_22 = _m_psrlqi(temp0_20, 0x20);
0065633b          uint64_t var_e0;
0065633b          *(uint32_t*)(&var_e0 + edx) = _m_paddd(_m_paddd(temp0_21, st3), _m_paddd(temp0_22, temp0_20));
00656340          st3 = data_833080;
00656347          st2 = st3;
0065634a          st3 = _m_pmaddwd(st3, st1);
0065634d          int16_t temp0_27[0x4] = _m_pmaddwd(st2, temp0_7);
00656356          uint64_t temp0_28 = _m_psrlqi(st3, 0x20);
0065635a          uint64_t temp0_29 = _m_psrlqi(temp0_27, 0x20);
00656367          uint64_t var_a0;
00656367          *(uint32_t*)(&var_a0 + edx) = _m_paddd(_m_paddd(temp0_28, st3), _m_paddd(temp0_29, temp0_27));
0065636f          int32_t temp0_33 = ecx;
0065636f          ecx -= 1;
0065636f          
00656370          if (temp0_33 == 1)
00656370          {
0065637d              int64_t* ebx_1 = nullptr;
00656382              int32_t edx_1 = (edx + 4);
00656385              int32_t ecx_1 = 8;
0065638a              int32_t esi_1 = (esi + arg2);
0065638a              
00656390              while (true)
00656390              {
00656390                  st6 = data_833048;
006563a5                  st0 = *(uint64_t*)((char*)ebx_1 + esi_1);
006563b3                  int64_t temp0_35 = _m_psubd(_m_psrlqi((st0 & data_833050), 0x18), data_833060);
006563b6                  st4 = _m_packssdw(temp0_35, temp0_35);
006563b9                  int64_t temp0_37 = _m_psubusb(st6, st0);
006563bf                  *(uint32_t*)(&var_60 + edx_1) = st4;
006563c7                  st1 = _m_punpckhwd(temp0_37, 0);
006563ca                  st3 = data_833070;
006563d1                  st2 = st3;
006563d4                  st3 = _m_pmaddwd(st3, st1);
006563d7                  int64_t temp0_40 = _m_punpckhbw(temp0_37, 0);
006563da                  int16_t temp0_41[0x4] = _m_pmaddwd(st2, temp0_40);
006563e3                  uint64_t temp0_42 = _m_psrlqi(st3, 0x20);
006563e7                  uint64_t temp0_43 = _m_psrlqi(temp0_41, 0x20);
006563eb                  int64_t temp0_44 = _m_paddd(temp0_42, st3);
006563ee                  int64_t temp0_45 = _m_paddd(temp0_43, temp0_41);
006563f1                  uint64_t temp0_46 = _m_psllqi(temp0_44, 0x20);
006563f5                  uint64_t temp0_47 = _m_psllqi(temp0_45, 0x20);
00656407                  st5 = _m_psradi(__psubd_mmxq_memq((_m_psrlqi(temp0_46, 0x20) | temp0_47), data_833058), 8);
0065640e                  *(uint32_t*)(edx_1 + &var_120) = _m_packssdw(st5, st5);
00656412                  st3 = data_833078;
00656419                  st2 = st3;
0065641c                  st3 = _m_pmaddwd(st3, st1);
0065641f                  int16_t temp0_53[0x4] = _m_pmaddwd(st2, temp0_40);
00656428                  uint64_t temp0_54 = _m_psrlqi(st3, 0x20);
0065642c                  uint64_t temp0_55 = _m_psrlqi(temp0_53, 0x20);
00656439                  *(uint32_t*)(&var_e0 + edx_1) = _m_paddd(_m_paddd(temp0_54, st3), _m_paddd(temp0_55, temp0_53));
0065643e                  st3 = data_833080;
00656445                  st2 = st3;
00656448                  st3 = _m_pmaddwd(st3, st1);
0065644b                  int16_t temp0_60[0x4] = _m_pmaddwd(st2, temp0_40);
00656454                  uint64_t temp0_61 = _m_psrlqi(st3, 0x20);
00656458                  uint64_t temp0_62 = _m_psrlqi(temp0_60, 0x20);
00656465                  *(uint32_t*)(&var_a0 + edx_1) = _m_paddd(_m_paddd(temp0_61, st3), _m_paddd(temp0_62, temp0_60));
0065646d                  int32_t temp1_1 = ecx_1;
0065646d                  ecx_1 -= 1;
0065646d                  
0065646e                  if (temp1_1 == 1)
0065646e                      break;
0065646e                  
00656470                  ebx_1 = &ebx_1[1];
00656473                  edx_1 += 4;
00656390              }
00656390              
0065647e              int64_t* ebx_2 = arg4;
00656481              int64_t* edx_2 = arg5;
00656484              int64_t st7 = data_833068;
0065649a              *(uint64_t*)arg3 = var_120;
0065649d              int64_t var_118;
0065649d              arg3[1] = var_118;
006564a1              int16_t var_110[0x4];
006564a1              arg3[0x10] = var_110;
006564a8              int64_t var_108;
006564a8              arg3[0x11] = var_108;
006564bf              int64_t var_100;
006564bf              arg3[2] = var_100;
006564c3              int64_t var_f8;
006564c3              arg3[3] = var_f8;
006564c7              int16_t var_f0[0x4];
006564c7              arg3[0x12] = var_f0;
006564ce              int64_t var_e8;
006564ce              arg3[0x13] = var_e8;
006564fc              int64_t var_d8;
006564fc              int64_t var_c0;
006564fc              int64_t var_b8;
006564fc              *(uint64_t*)ebx_2 = _m_packssdw(_m_psradi(_m_paddd(_m_paddd(var_c0, var_e0), st7), 0xa), _m_psradi(_m_paddd(_m_paddd(var_d8, var_b8), st7), 0xa));
00656526              uint64_t var_d0;
00656526              int64_t var_c8;
00656526              int64_t var_b0;
00656526              int64_t var_a8;
00656526              ebx_2[1] = _m_packssdw(_m_psradi(_m_paddd(_m_paddd(var_b0, var_d0), st7), 0xa), _m_psradi(_m_paddd(_m_paddd(var_c8, var_a8), st7), 0xa));
0065655d              int64_t var_98;
0065655d              int64_t var_80;
0065655d              int64_t var_78;
0065655d              ebx_2[0x10] = _m_packssdw(_m_psradi(_m_paddd(_m_paddd(var_80, var_a0), st7), 0xa), _m_psradi(_m_paddd(_m_paddd(var_98, var_78), st7), 0xa));
00656597              uint64_t var_90;
00656597              int64_t var_88;
00656597              int64_t var_70;
00656597              int64_t var_68;
00656597              ebx_2[0x11] = _m_packssdw(_m_psradi(_m_paddd(_m_paddd(var_70, var_90), st7), 0xa), _m_psradi(_m_paddd(_m_paddd(var_88, var_68), st7), 0xa));
006565ba              *(uint64_t*)edx_2 = var_60;
006565bd              int64_t var_58;
006565bd              edx_2[1] = var_58;
006565c1              int16_t var_50[0x4];
006565c1              edx_2[0x10] = var_50;
006565c8              int64_t var_48;
006565c8              edx_2[0x11] = var_48;
006565eb              int64_t var_40;
006565eb              edx_2[2] = var_40;
006565ef              int64_t var_38;
006565ef              edx_2[3] = var_38;
006565f3              int16_t var_30[0x4];
006565f3              edx_2[0x12] = var_30;
006565fa              int64_t var_28;
006565fa              edx_2[0x13] = var_28;
00656601              int32_t temp2_1 = edi;
00656601              edi -= 1;
00656601              
00656602              if (temp2_1 == 1)
00656602                  break;
00656602              
00656604              ebx = nullptr;
00656609              edx = 0;
0065660e              ecx = 8;
00656613              esi = (esi_1 + arg2);
00656616              arg3 = &arg3[4];
0065661a              arg4 += 0x10;
0065661e              arg5 += 0x20;
00656370          }
00656370          else
00656370          {
00656372              ebx = &ebx[1];
00656375              edx += 4;
00656370          }
00656292      }
00656260  }

0065662f                                               90                                                                 .

00656630  void* _own_ycbycr_to_ycbcr_422_full_mcu_m5(int64_t* arg1, int32_t arg2, uint8_t (* arg3)[0x8], void* arg4, void* arg5)

00656630  {
00656638      int64_t* esi = arg1;
0065663b      uint8_t (* edi)[0x8] = arg3;
0065663e      void* result = arg4;
00656641      void* ebx = arg5;
00656644      int32_t i_1 = 8;
00656649      int64_t st6 = data_833000;
00656766      int32_t i;
00656766      
00656766      do
00656766      {
00656653          uint8_t st0[0x8] = *(uint64_t*)esi;
00656656          int64_t st4 = esi[1];
0065665d          int64_t st5 = st4;
00656660          uint8_t temp0_1[0x8] = _m_punpckhwd(st0, 0);
00656663          int64_t temp0_2 = _m_punpckhbw(st0, 0);
00656666          st4 = _m_punpckhwd(st4, 0);
00656669          int64_t temp0_4 = _m_punpckhbw(st5, 0);
00656672          uint8_t st2[0x8] = _m_psrlqi(temp0_1, 0x20);
00656676          uint64_t temp0_6 = _m_psrlqi(temp0_2, 0x20);
0065667a          st0 = _m_punpcklwd(temp0_1, st2[0]);
0065667d          int64_t st1 = _m_punpcklwd(temp0_2, temp0_6);
00656680          st2 = st0;
00656683          st0 = _m_punpckldq(st0, st1);
00656686          st2 = _m_punpckhdq(st2, st1);
0065668f          uint64_t temp0_11 = _m_psrlqi(st4, 0x20);
00656693          uint64_t temp0_12 = _m_psrlqi(temp0_4, 0x20);
00656697          st4 = _m_punpcklwd(st4, temp0_11);
0065669a          st5 = _m_punpcklwd(temp0_4, temp0_12);
0065669d          st1 = st4;
006566a0          int64_t st3 = st2;
006566a3          st4 = _m_punpckldq(st4, st5);
006566a6          int64_t temp0_16 = _m_punpckhdq(st1, st5);
006566a9          st0 = _m_psubw(st0, st6);
006566ac          int64_t temp0_18 = _m_psubw(st4, st6);
006566af          *(uint64_t*)edi = st0;
006566b2          edi[1] = temp0_18;
006566b6          st2 = _m_punpcklwd(st2, temp0_16);
006566b9          int64_t temp0_20 = __punpckhwd_mmxq_mmxd(st3, temp0_16);
006566bc          st5 = st2;
006566bf          st2 = _m_punpcklwd(st2, temp0_20);
006566c2          int64_t temp0_22 = __punpckhwd_mmxq_mmxd(st5, temp0_20);
006566c5          st2 = _m_psubw(st2, st6);
006566c8          int64_t temp0_24 = _m_psubw(temp0_22, st6);
006566cb          *(uint64_t*)result = st2;
006566ce          *(uint64_t*)ebx = temp0_24;
006566d1          st0 = esi[2];
006566d5          st4 = esi[3];
006566dc          st5 = st4;
006566df          uint8_t temp0_25[0x8] = _m_punpckhwd(st0, 0);
006566e2          int64_t temp0_26 = _m_punpckhbw(st0, 0);
006566e5          st4 = _m_punpckhwd(st4, 0);
006566e8          int64_t temp0_28 = _m_punpckhbw(st5, 0);
006566f1          st2 = _m_psrlqi(temp0_25, 0x20);
006566f5          uint64_t temp0_30 = _m_psrlqi(temp0_26, 0x20);
006566f9          st0 = _m_punpcklwd(temp0_25, st2[0]);
006566fc          st1 = _m_punpcklwd(temp0_26, temp0_30);
006566ff          st2 = st0;
00656702          st0 = _m_punpckldq(st0, st1);
00656705          st2 = _m_punpckhdq(st2, st1);
0065670e          uint64_t temp0_35 = _m_psrlqi(st4, 0x20);
00656712          uint64_t temp0_36 = _m_psrlqi(temp0_28, 0x20);
00656716          st4 = _m_punpcklwd(st4, temp0_35);
00656719          st5 = _m_punpcklwd(temp0_28, temp0_36);
0065671c          st1 = st4;
0065671f          st3 = st2;
00656722          st4 = _m_punpckldq(st4, st5);
00656725          int64_t temp0_40 = _m_punpckhdq(st1, st5);
00656728          st0 = _m_psubw(st0, st6);
0065672b          int64_t temp0_42 = _m_psubw(st4, st6);
0065672e          edi[0x10] = st0;
00656735          edi[0x11] = temp0_42;
0065673c          st2 = _m_punpcklwd(st2, temp0_40);
0065673f          int64_t temp0_44 = __punpckhwd_mmxq_mmxd(st3, temp0_40);
00656742          st5 = st2;
00656745          st2 = _m_punpcklwd(st2, temp0_44);
00656748          int64_t temp0_46 = __punpckhwd_mmxq_mmxd(st5, temp0_44);
0065674b          st2 = _m_psubw(st2, st6);
0065674e          int64_t temp0_48 = _m_psubw(temp0_46, st6);
00656751          *(uint64_t*)((char*)result + 8) = st2;
00656755          *(uint64_t*)((char*)ebx + 8) = temp0_48;
00656759          edi = &edi[2];
0065675c          result += 0x10;
0065675f          ebx += 0x10;
00656762          esi += arg2;
00656765          i = i_1;
00656765          i_1 -= 1;
00656766      } while (i != 1);
00656772      return result;
00656630  }

00656773                                                           8d a4 24 00 00 00 00 8d 9b 00 00 00 00                     ..$..........

00656780  void* _own_ycbycr_to_ycbcr_422_full_mcu_a6(int64_t* arg1, int32_t arg2, void* arg3, void* arg4, void* arg5)

00656780  {
00656788      int64_t* esi = arg1;
0065678b      void* edi = arg3;
0065678e      void* result = arg4;
00656791      void* ebx = arg5;
00656794      int32_t i_1 = 8;
00656799      int64_t st6 = data_833000;
00656884      int32_t i;
00656884      
00656884      do
00656884      {
006567a3          int64_t st0 = *(uint64_t*)esi;
006567a6          uint8_t st1[0x8] = esi[1];
006567aa          int64_t st2 = st0;
006567b0          st0 = _m_punpckhwd(st0, 0);
006567b3          int64_t temp0_2 = _m_punpckhbw(st2, 0);
006567b6          uint8_t temp0_3[0x8] = _m_punpckhwd(st1, 0);
006567b9          int64_t temp0_4 = _m_punpckhbw(st1, 0);
006567bc          st0 = _mm_shuffle_pi16(st0, 0xd8);
006567c0          st2 = _mm_shuffle_pi16(temp0_2, 0xd8);
006567c4          st1 = _mm_shuffle_pi16(temp0_3, 0xd8);
006567c8          int64_t st3 = _mm_shuffle_pi16(temp0_4, 0xd8);
006567cc          int64_t st4 = st0;
006567cf          int64_t st5 = st1;
006567d2          st0 = _m_punpckldq(st0, st2);
006567d5          int64_t temp0_10 = _m_punpckhdq(st4, st2);
006567d8          st1 = _m_punpckldq(st1, st3);
006567db          int64_t temp0_12 = _m_punpckhdq(st5, st3);
006567de          int64_t temp0_13 = _m_psubw(st0, st6);
006567e1          st1 = _m_psubw(st1, st6);
006567e4          *(uint64_t*)edi = temp0_13;
006567e7          *(uint64_t*)((char*)edi + 8) = st1;
006567eb          st4 = _mm_shuffle_pi16(temp0_10, 0xd8);
006567ef          st5 = _mm_shuffle_pi16(temp0_12, 0xd8);
006567f3          st2 = st4;
006567f6          st4 = _m_punpckldq(st4, st5);
006567f9          int64_t temp0_18 = _m_punpckhdq(st2, st5);
006567fc          int64_t temp0_19 = _m_psubw(st4, st6);
006567ff          int64_t temp0_20 = _m_psubw(temp0_18, st6);
00656802          *(uint64_t*)result = temp0_19;
00656805          *(uint64_t*)ebx = temp0_20;
00656808          st0 = esi[2];
0065680c          st1 = esi[3];
00656810          st2 = st0;
00656816          st0 = _m_punpckhwd(st0, 0);
00656819          int64_t temp0_22 = _m_punpckhbw(st2, 0);
0065681c          uint8_t temp0_23[0x8] = _m_punpckhwd(st1, 0);
0065681f          int64_t temp0_24 = _m_punpckhbw(st1, 0);
00656822          st0 = _mm_shuffle_pi16(st0, 0xd8);
00656826          st2 = _mm_shuffle_pi16(temp0_22, 0xd8);
0065682a          st1 = _mm_shuffle_pi16(temp0_23, 0xd8);
0065682e          st3 = _mm_shuffle_pi16(temp0_24, 0xd8);
00656832          st4 = st0;
00656835          st5 = st1;
00656838          st0 = _m_punpckldq(st0, st2);
0065683b          int64_t temp0_30 = _m_punpckhdq(st4, st2);
0065683e          st1 = _m_punpckldq(st1, st3);
00656841          int64_t temp0_32 = _m_punpckhdq(st5, st3);
00656844          int64_t temp0_33 = _m_psubw(st0, st6);
00656847          st1 = _m_psubw(st1, st6);
0065684a          *(uint64_t*)((char*)edi + 0x80) = temp0_33;
00656851          *(uint64_t*)((char*)edi + 0x88) = st1;
00656858          st4 = _mm_shuffle_pi16(temp0_30, 0xd8);
0065685c          st5 = _mm_shuffle_pi16(temp0_32, 0xd8);
00656860          st2 = st4;
00656863          st4 = _m_punpckldq(st4, st5);
00656866          int64_t temp0_38 = _m_punpckhdq(st2, st5);
00656869          int64_t temp0_39 = _m_psubw(st4, st6);
0065686c          int64_t temp0_40 = _m_psubw(temp0_38, st6);
0065686f          *(uint64_t*)((char*)result + 8) = temp0_39;
00656873          *(uint64_t*)((char*)ebx + 8) = temp0_40;
00656877          edi += 0x10;
0065687a          result += 0x10;
0065687d          ebx += 0x10;
00656880          esi += arg2;
00656883          i = i_1;
00656883          i_1 -= 1;
00656884      } while (i != 1);
00656890      return result;
00656780  }

00656891                                                     8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 90                   ..$......$.....

006568a0  int32_t _own_y_to_y_111_full_mcu_m5(int64_t* arg1, int64_t* arg2, void* arg3)

006568a0  {
006568a7      int64_t* esi = arg1;
006568ad      void* edi = arg3;
006568b0      int32_t i_1 = 4;
006568b5      int64_t st6 = data_833000;
006568fb      int32_t i;
006568fb      
006568fb      do
006568fb      {
006568bf          uint8_t st0[0x8] = *(uint64_t*)esi;
006568c2          int64_t st4 = *(uint64_t*)((char*)arg2 + esi);
006568c9          int64_t st5 = st4;
006568cc          uint8_t temp0_1[0x8] = _m_punpckhwd(st0, 0);
006568cf          int64_t temp0_2 = _m_punpckhbw(st0, 0);
006568d2          st4 = _m_punpckhwd(st4, 0);
006568d5          int64_t temp0_4 = _m_punpckhbw(st5, 0);
006568d8          st0 = _m_psubw(temp0_1, st6);
006568db          int64_t temp0_6 = _m_psubw(temp0_2, st6);
006568de          int64_t temp0_7 = _m_psubw(st4, st6);
006568e1          int64_t temp0_8 = _m_psubw(temp0_4, st6);
006568e4          *(uint64_t*)edi = st0;
006568e7          *(uint64_t*)((char*)edi + 8) = temp0_6;
006568eb          *(uint64_t*)((char*)edi + 0x10) = temp0_7;
006568ef          *(uint64_t*)((char*)edi + 0x18) = temp0_8;
006568f5          edi += 0x20;
006568f8          esi += (arg2 * 2);
006568fa          i = i_1;
006568fa          i_1 -= 1;
006568fb      } while (i != 1);
006568a0  }

00656903           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

00656910  int32_t _own_y_111_to_y_full_mcu_m5(int64_t* arg1, int16_t (* arg2)[0x4], int16_t (* arg3)[0x4])

00656910  {
00656917      int64_t* esi = arg1;
0065691a      int16_t (* edi)[0x4] = arg2;
00656920      int32_t i_1 = 4;
00656949      int32_t i;
00656949      
00656949      do
00656949      {
0065692c          int16_t st2[0x4] = esi[2];
00656930          int16_t st3[0x4] = esi[3];
00656934          int16_t temp0_1[0x4] = _m_packuswb(*(uint64_t*)esi, esi[1]);
00656937          int16_t temp0_2[0x4] = _m_packuswb(st2, st3);
0065693a          *(uint64_t*)edi = temp0_1;
0065693d          *(uint64_t*)((char*)arg3 + edi) = temp0_2;
00656943          esi = &esi[4];
00656946          edi += (arg3 * 2);
00656948          i = i_1;
00656948          i_1 -= 1;
00656949      } while (i != 1);
00656910  }

00656951                                                     8d a4 24 00 00 00 00 8d a4 24 00 00 00 00 90                   ..$......$.....

00656960  int64_t* _own_ycbcr_111_to_rgb_full_mcu_m5(uint16_t (* arg1)[0x4], int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

00656960  {
0065696c      uint16_t (* esi)[0x4] = arg1;
0065696f      int64_t* ebx = arg2;
00656972      int64_t* result = arg3;
00656975      void* edi = arg4;
00656978      int32_t i_1 = 7;
00656b7e      int32_t i;
00656b7e      
00656b7e      do
00656b7e      {
00656986          uint16_t st2[0x4] = result[1];
0065698a          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)result, 4);
0065698e          uint16_t st3[0x4] = *(uint64_t*)ebx;
00656991          uint16_t temp0_2[0x4] = _m_psllwi(st2, 4);
00656995          uint16_t st4[0x4] = ebx[1];
00656999          uint16_t temp0_3[0x4] = _m_psllwi(st3, 4);
0065699d          uint16_t temp0_4[0x4] = _m_psllwi(st4, 4);
006569a4          int64_t st6 = data_833098;
006569ae          int64_t st5 = data_833090;
006569b5          uint16_t st1[0x4] = _m_pmulhw(temp0_1, st5);
006569b8          st5 = _m_pmulhw(st5, temp0_2);
006569bb          st3 = _m_pmulhw(temp0_3, st6);
006569be          st1 = __psubw_mmxq_memq(st1, data_8330c0);
006569c5          st6 = _m_pmulhw(st6, temp0_4);
006569c8          int64_t temp0_10 = __psubw_mmxq_memq(st5, data_8330c0);
006569d3          st3 = __psubw_mmxq_memq(st3, data_8330b8);
006569da          int64_t temp0_12 = __psubw_mmxq_memq(st6, data_8330b8);
006569e8          st5 = _m_punpcklwd(temp0_1, temp0_3[0]);
006569eb          st6 = data_8330a0;
006569f2          uint16_t st0[0x4] = __punpckhwd_mmxq_mmxd(temp0_1, temp0_3[0]);
006569f5          st5 = _m_pmaddwd(st5, st6);
006569fb          st0 = _m_pmaddwd(st0, st6);
006569fe          uint16_t temp0_17[0x4] = _m_punpcklwd(temp0_2, temp0_4[0]);
00656a01          st2 = __punpckhwd_mmxq_mmxd(temp0_2, temp0_4[0]);
00656a04          uint16_t st7[0x4] = _m_pmaddwd(temp0_17, st6);
00656a07          int64_t temp0_20 = __psubd_mmxq_memq(st5, data_8330c8);
00656a0e          st2 = _m_pmaddwd(st2, st6);
00656a11          st0 = __psubd_mmxq_memq(st0, data_8330c8);
00656a18          st7 = __psubd_mmxq_memq(st7, data_8330c8);
00656a1f          st5 = _m_psradi(temp0_20, 0xc);
00656a23          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00656a2e          st5 = _m_packssdw(st5, _m_psradi(st0, 0xc));
00656a3c          result = &result[2];
00656a42          uint16_t var_20_1[0x4] = _m_packssdw(_m_psradi(st7, 0xc), _m_psradi(st2, 0xc));
00656a46          st0 = *(uint64_t*)esi;
00656a49          st1 = _m_paddw(st1, st0);
00656a4c          st3 = _m_paddw(st3, st0);
00656a52          st1 = _m_packuswb(st1, _m_psubw(st0, st5));
00656a55          st3 = _m_packuswb(st3, st3);
00656a58          st0 = st1;
00656a5b          st1 = _m_punpckhwd(st1, 0);
00656a5e          ebx = &ebx[2];
00656a61          st3 = _m_punpckhwd(st3, 0);
00656a6b          st6 = st3;
00656a6e          st1 |= _m_psllqi(_m_punpckhbw(st0, 0), 8);
00656a71          st7 = data_8330f0;
00656a78          st5 = st1;
00656a7b          st1 &= data_8330d8;
00656a85          st3 = _m_psllqi((st3 & st7), 8);
00656a89          st4 = st5;
00656a8c          st5 &= data_8330e0;
00656a96          st1 = _m_psllqi(st1, 0x10);
00656a9a          st7 = ((st7 & !(st6)) | st3);
00656a9d          uint64_t temp0_42 = _m_psllqi(st5, 8);
00656aa1          st6 = st7;
00656aa4          st7 = _m_psrlqi(st7, 0x20);
00656aa8          st2 = st4;
00656aab          st4 &= data_8330e8;
00656ab6          uint64_t temp0_45 = _m_psrlqi(_m_psllqi(st6, 0x20), 0x10);
00656ac7          st0 = esi[1];
00656acb          st2 = _m_psrlqi((st2 & data_8330d0), 0x28);
00656ad5          *(uint64_t*)edi = ((temp0_42 | (st1 | st4)) | temp0_45);
00656ad8          st2 |= st7;
00656ae3          st1 = _m_paddw(temp0_10, st0);
00656aea          st3 = _m_paddw(temp0_12, st0);
00656af0          st1 = _m_packuswb(st1, _m_psubw(st0, var_20_1));
00656af3          st3 = _m_packuswb(st3, st3);
00656af6          st0 = st1;
00656af9          st1 = _m_punpckhwd(st1, 0);
00656afc          st3 = _m_punpckhwd(st3, 0);
00656b06          esi = &esi[2];
00656b09          st0 = (_m_punpckhbw(st0, 0) | _m_psllqi(st3, 8));
00656b0c          st4 = data_8330f0;
00656b2a          st4 = ((st4 & !(st1)) | _m_psllqi((st1 & st4), 8));
00656b2d          uint64_t temp0_57 = _m_psllqi((st0 & data_8330e8), 0x28);
00656b34          st7 = (st0 & data_8330d8);
00656b3e          st3 = _m_psrlqi(st4, 0x20);
00656b45          st4 = _m_psllqi(st4, 0x20);
00656b49          st3 = _m_psllqi(st3, 0x10);
00656b6f          st0 = ((((st0 & data_8330d0) | _m_psrlqi(st7, 8)) | st3) | _m_psrldi((st0 & data_8330e0), 0x10));
00656b72          *(uint64_t*)((char*)edi + 8) = (st2 | (temp0_57 | st4));
00656b76          *(uint64_t*)((char*)edi + 0x10) = st0;
00656b7a          edi += arg5;
00656b7d          i = i_1;
00656b7d          i_1 -= 1;
00656b7e      } while (i >= 1);
00656b8b      return result;
00656960  }

00656b8c                                      8d 64 24 00                                                              .d$.

00656b90  int64_t* _own_ycbcr_111_to_bgr_full_mcu_m5(uint16_t (* arg1)[0x4], int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

00656b90  {
00656b9c      uint16_t (* esi)[0x4] = arg1;
00656b9f      int64_t* result = arg2;
00656ba2      int64_t* ebx = arg3;
00656ba5      void* edi = arg4;
00656ba8      int32_t i_1 = 7;
00656dae      int32_t i;
00656dae      
00656dae      do
00656dae      {
00656bb6          uint16_t st2[0x4] = result[1];
00656bba          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)result, 4);
00656bbe          uint16_t st3[0x4] = *(uint64_t*)ebx;
00656bc1          uint16_t temp0_2[0x4] = _m_psllwi(st2, 4);
00656bc5          uint16_t st4[0x4] = ebx[1];
00656bc9          uint16_t temp0_3[0x4] = _m_psllwi(st3, 4);
00656bcd          uint16_t temp0_4[0x4] = _m_psllwi(st4, 4);
00656bd4          int64_t st6 = data_833090;
00656bde          int64_t st5 = data_833098;
00656be5          st3 = _m_pmulhw(temp0_3, st6);
00656be8          uint16_t st1[0x4] = _m_pmulhw(temp0_1, st5);
00656beb          st5 = _m_pmulhw(st5, temp0_2);
00656bee          st3 = __psubw_mmxq_memq(st3, data_8330c0);
00656bf5          st6 = _m_pmulhw(st6, temp0_4);
00656bf8          st1 = __psubw_mmxq_memq(st1, data_8330b8);
00656bff          int64_t temp0_11 = __psubw_mmxq_memq(st5, data_8330b8);
00656c06          int64_t temp0_12 = __psubw_mmxq_memq(st6, data_8330c0);
00656c15          st6 = data_8330a0;
00656c1f          st5 = _m_punpcklwd(temp0_3, temp0_1[0]);
00656c22          uint16_t st7[0x4] = __punpckhwd_mmxq_mmxd(temp0_3, temp0_1[0]);
00656c25          st5 = _m_pmaddwd(st5, st6);
00656c28          st7 = _m_pmaddwd(st7, st6);
00656c2b          int64_t temp0_17 = __psubd_mmxq_memq(st5, data_8330c8);
00656c32          st7 = __psubd_mmxq_memq(st7, data_8330c8);
00656c41          st5 = _m_packssdw(_m_psradi(temp0_17, 0xc), _m_psradi(st7, 0xc));
00656c47          uint16_t temp0_22[0x4] = _m_punpcklwd(temp0_4, temp0_2[0]);
00656c4a          st4 = __punpckhwd_mmxq_mmxd(temp0_4, temp0_2[0]);
00656c4d          st7 = _m_pmaddwd(temp0_22, st6);
00656c50          st4 = _m_pmaddwd(st4, st6);
00656c53          st7 = __psubd_mmxq_memq(st7, data_8330c8);
00656c5a          st4 = __psubd_mmxq_memq(st4, data_8330c8);
00656c6c          uint16_t var_20_1[0x4] = _m_packssdw(_m_psradi(st7, 0xc), _m_psradi(st4, 0xc));
00656c70          uint16_t st0[0x4] = *(uint64_t*)esi;
00656c73          st1 = _m_paddw(st1, st0);
00656c76          st3 = _m_paddw(st3, st0);
00656c7f          st1 = _m_packuswb(st1, _m_psubw(st0, st5));
00656c82          st3 = _m_packuswb(st3, st3);
00656c85          st0 = st1;
00656c88          st1 = _m_punpckhwd(st1, 0);
00656c8b          st3 = _m_punpckhwd(st3, 0);
00656c95          st6 = st3;
00656c98          st1 |= _m_psllqi(_m_punpckhbw(st0, 0), 8);
00656c9b          st7 = data_8330f0;
00656ca2          st5 = st1;
00656ca5          st1 &= data_8330d8;
00656caf          st3 = _m_psllqi((st3 & st7), 8);
00656cb3          st4 = st5;
00656cb6          st5 &= data_8330e0;
00656cc0          st1 = _m_psllqi(st1, 0x10);
00656cc4          st7 = ((st7 & !(st6)) | st3);
00656cc7          uint64_t temp0_42 = _m_psllqi(st5, 8);
00656ccb          st6 = st7;
00656cce          st7 = _m_psrlqi(st7, 0x20);
00656cd2          st2 = st4;
00656cd5          st4 &= data_8330e8;
00656ce0          uint64_t temp0_45 = _m_psrlqi(_m_psllqi(st6, 0x20), 0x10);
00656cf1          st0 = esi[1];
00656cf5          st2 = _m_psrlqi((st2 & data_8330d0), 0x28);
00656cfc          *(uint64_t*)edi = ((temp0_42 | (st1 | st4)) | temp0_45);
00656cff          st2 |= st7;
00656d0a          st1 = _m_paddw(temp0_11, st0);
00656d11          st3 = _m_paddw(temp0_12, st0);
00656d1a          st1 = _m_packuswb(st1, _m_psubw(st0, var_20_1));
00656d1d          st3 = _m_packuswb(st3, st3);
00656d20          st0 = st1;
00656d23          st1 = _m_punpckhwd(st1, 0);
00656d26          st3 = _m_punpckhwd(st3, 0);
00656d30          st0 = (_m_punpckhbw(st0, 0) | _m_psllqi(st3, 8));
00656d33          st4 = data_8330f0;
00656d51          st4 = ((st4 & !(st1)) | _m_psllqi((st1 & st4), 8));
00656d54          uint64_t temp0_57 = _m_psllqi((st0 & data_8330e8), 0x28);
00656d5b          st7 = (st0 & data_8330d8);
00656d65          st3 = _m_psrlqi(st4, 0x20);
00656d6c          st4 = _m_psllqi(st4, 0x20);
00656d70          st3 = _m_psllqi(st3, 0x10);
00656d96          st0 = ((((st0 & data_8330d0) | _m_psrlqi(st7, 8)) | st3) | _m_psrldi((st0 & data_8330e0), 0x10));
00656d99          *(uint64_t*)((char*)edi + 8) = (st2 | (temp0_57 | st4));
00656d9d          *(uint64_t*)((char*)edi + 0x10) = st0;
00656da1          edi += arg5;
00656da4          esi = &esi[2];
00656da7          result = &result[2];
00656daa          ebx = &ebx[2];
00656dad          i = i_1;
00656dad          i_1 -= 1;
00656dae      } while (i >= 1);
00656dbb      return result;
00656b90  }

00656dbc                                                                                      8d 64 24 00                              .d$.

00656dc0  int64_t* _own_ycbcr_111_to_rgba_fpx_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

00656dc0  {
00656dc9      int64_t* esi = arg1;
00656dcc      int64_t* result = arg2;
00656dcf      int64_t* ebx = arg3;
00656dd2      void* edi = arg4;
00656dd5      int32_t i_1 = 8;
00656f77      int32_t i;
00656f77      
00656f77      do
00656f77      {
00656ddd          uint16_t st3[0x4] = *(uint64_t*)result;
00656de0          int64_t st0 = data_833108;
00656de7          int64_t st2 = data_833110;
00656dee          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
00656df2          uint16_t temp0_2[0x4] = _m_psllwi(st3, 4);
00656df6          st0 = _m_pmulhw(st0, temp0_1);
00656df9          st2 = _m_pmulhw(st2, temp0_2);
00656dfc          int16_t st4[0x4] = (*(uint64_t*)data_833120);
00656e03          int16_t st5[0x4] = data_833118;
00656e0a          int64_t temp0_5 = __psubw_mmxq_memq(st0, data_833130);
00656e11          int64_t temp0_6 = __psubw_mmxq_memq(st2, data_833128);
00656e18          uint16_t temp0_7[0x4] = _m_psrlwi(temp0_1, 4);
00656e1c          uint16_t temp0_8[0x4] = _m_psrlwi(temp0_2, 4);
00656e20          int16_t temp0_9[0x4] = _m_pmullw(st4, temp0_7);
00656e23          int16_t temp0_10[0x4] = _m_pmullw(st5, temp0_8);
00656e26          int64_t st6 = *(uint64_t*)esi;
00656e2c          int80_t st7;
00656e2c          st7 = 0;
00656e2f          st4 = __psubw_mmxq_memq(_m_paddw(temp0_9, temp0_10), data_833138);
00656e36          uint16_t st1[0x4] = data_833140;
00656e3d          int16_t temp0_13[0x4] = _m_psrawi(st4, 8);
00656e41          int64_t temp0_14 = _m_paddsw(temp0_5, st6);
00656e44          int64_t temp0_15 = _m_paddsw(temp0_6, st6);
00656e47          int64_t temp0_16 = _m_psubsw(st6, temp0_13);
00656e4a          st0 = _m_packuswb(temp0_14, 0);
00656e4d          st2 = _m_packuswb(temp0_15, 0);
00656e50          st6 = _m_packuswb(temp0_16, 0);
00656e53          st0 = _m_punpckhwd(st0, 0);
00656e56          st2 = _m_punpckhwd(st2, 0);
00656e59          st6 = _m_punpckhwd(st6, 0);
00656e65          uint16_t temp0_23[0x4] = _m_punpcklwd(st0, 0);
00656e68          st4 = _m_punpcklwd(st2, 0);
00656e6b          st5 = _m_punpcklwd(st6, 0);
00656e6e          int64_t temp0_26 = __punpckhwd_mmxq_mmxd(st0, 0);
00656e71          int64_t temp0_27 = __punpckhwd_mmxq_mmxd(st2, 0);
00656e74          int64_t temp0_28 = __punpckhwd_mmxq_mmxd(st6, 0);
00656e77          st4 = _m_pslldi(st4, 0x10);
00656e7b          st5 = _m_pslldi(st5, 8);
00656e96          st0 = (((temp0_26 | _m_pslldi(temp0_27, 0x10)) | _m_pslldi(temp0_28, 8)) | st1);
00656e99          *(uint64_t*)edi = (((temp0_23 | st4) | st5) | st1);
00656e9c          *(uint64_t*)((char*)edi + 8) = st0;
00656ea4          st5 = result[1];
00656ea8          st6 = data_833108;
00656eaf          st2 = data_833110;
00656eb6          st4 = _m_psllwi(ebx[1], 4);
00656eba          st5 = _m_psllwi(st5, 4);
00656ebe          st6 = _m_pmulhw(st6, st4);
00656ec1          st2 = _m_pmulhw(st2, st5);
00656ec4          st1 = (*(uint64_t*)data_833120);
00656ecb          st3 = data_833118;
00656ed2          int64_t temp0_37 = __psubw_mmxq_memq(st6, data_833130);
00656ed9          int64_t temp0_38 = __psubw_mmxq_memq(st2, data_833128);
00656ee0          st4 = _m_psrlwi(st4, 4);
00656ee4          st5 = _m_psrlwi(st5, 4);
00656ee8          st1 = _m_pmullw(st1, st4);
00656eeb          st3 = _m_pmullw(st3, st5);
00656eee          st0 = esi[1];
00656ef5          st7 = 0;
00656ef8          st3 = __psubw_mmxq_memq(_m_paddw(st3, st1), data_833138);
00656eff          st1 = data_833140;
00656f06          st3 = _m_psrawi(st3, 8);
00656f0a          int64_t temp0_46 = _m_paddsw(temp0_37, st0);
00656f0d          int64_t temp0_47 = _m_paddsw(temp0_38, st0);
00656f10          int64_t temp0_48 = _m_psubsw(st0, st3);
00656f13          st6 = _m_packuswb(temp0_46, 0);
00656f16          st2 = _m_packuswb(temp0_47, 0);
00656f19          st0 = _m_packuswb(temp0_48, 0);
00656f1c          st6 = _m_punpckhwd(st6, 0);
00656f1f          st2 = _m_punpckhwd(st2, 0);
00656f22          st0 = _m_punpckhwd(st0, 0);
00656f2e          uint16_t temp0_55[0x4] = _m_punpcklwd(st6, 0);
00656f31          st4 = _m_punpcklwd(st2, 0);
00656f34          st5 = _m_punpcklwd(st0, 0);
00656f37          int64_t temp0_58 = __punpckhwd_mmxq_mmxd(st6, 0);
00656f3a          int64_t temp0_59 = __punpckhwd_mmxq_mmxd(st2, 0);
00656f3d          int64_t temp0_60 = __punpckhwd_mmxq_mmxd(st0, 0);
00656f40          st4 = _m_pslldi(st4, 0x10);
00656f44          st5 = _m_pslldi(st5, 8);
00656f5f          st6 = (((temp0_58 | _m_pslldi(temp0_59, 0x10)) | _m_pslldi(temp0_60, 8)) | st1);
00656f62          esi = &esi[2];
00656f65          result = &result[2];
00656f68          ebx = &ebx[2];
00656f6b          *(uint64_t*)((char*)edi + 0x10) = (((temp0_55 | st4) | st5) | st1);
00656f6f          *(uint64_t*)((char*)edi + 0x18) = st6;
00656f73          edi += arg5;
00656f76          i = i_1;
00656f76          i_1 -= 1;
00656f77      } while (i != 1);
00656f84      return result;
00656dc0  }

00656f85                 8d a4 24 00 00 00 00 8d 64 24 00                                                       ..$.....d$.

00656f90  int64_t* _own_ycbcra_fpx_1111_to_rgba_fpx_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

00656f90  {
00656f99      int64_t* esi = arg1;
00656f9c      int64_t* result = arg2;
00656f9f      int64_t* ebx = arg3;
00656fa2      uint16_t (* edi)[0x4] = arg4;
00656fa5      int32_t i_1 = 8;
00657195      int32_t i;
00657195      
00657195      do
00657195      {
00656fad          uint16_t st3[0x4] = *(uint64_t*)result;
00656fb0          int64_t st0 = data_833108;
00656fb7          int64_t st2 = data_833110;
00656fbe          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
00656fc2          uint16_t temp0_2[0x4] = _m_psllwi(st3, 4);
00656fc6          st0 = _m_pmulhw(st0, temp0_1);
00656fc9          st2 = _m_pmulhw(st2, temp0_2);
00656fcc          int16_t st4[0x4] = (*(uint64_t*)data_833120);
00656fd3          int16_t st5[0x4] = data_833118;
00656fda          int64_t temp0_5 = __psubw_mmxq_memq(st0, data_833130);
00656fe1          int64_t temp0_6 = __psubw_mmxq_memq(st2, data_833128);
00656fe8          uint16_t temp0_7[0x4] = _m_psrlwi(temp0_1, 4);
00656fec          uint16_t temp0_8[0x4] = _m_psrlwi(temp0_2, 4);
00656ff0          int16_t temp0_9[0x4] = _m_pmullw(st4, temp0_7);
00656ff3          int16_t temp0_10[0x4] = _m_pmullw(st5, temp0_8);
00656ff6          int64_t st6 = *(uint64_t*)esi;
00656fff          st4 = __psubw_mmxq_memq(_m_paddw(temp0_9, temp0_10), data_833138);
00657006          uint16_t st1[0x4] = data_833148;
0065700d          int16_t temp0_13[0x4] = _m_psrawi(st4, 8);
00657011          int64_t temp0_14 = _m_paddsw(temp0_5, st6);
00657014          int64_t temp0_15 = _m_paddsw(temp0_6, st6);
00657017          int64_t temp0_16 = _m_psubsw(st6, temp0_13);
0065701a          st0 = _m_packuswb(temp0_14, 0);
0065701d          st2 = _m_packuswb(temp0_15, 0);
00657020          st6 = _m_packuswb(temp0_16, 0);
00657023          st0 = _m_punpckhwd(st0, 0);
00657026          st2 = _m_punpckhwd(st2, 0);
00657029          st6 = _m_punpckhwd(st6, 0);
0065702c          st3 = st1;
0065702f          st5 = st1;
00657032          st4 = esi[0x30];
00657039          st1 = _m_psubw(st1, st0);
0065703c          st3 = _m_psubw(st3, st2);
0065703f          st5 = _m_psubw(st5, st6);
00657048          st6 = st5;
0065704b          uint16_t temp0_26[0x4] = _m_punpcklwd(st1, 0);
0065704e          uint16_t temp0_27[0x4] = _m_punpcklwd(st3, 0);
00657051          st5 = _m_punpcklwd(st5, 0);
00657054          int64_t temp0_29 = __punpckhwd_mmxq_mmxd(st1, 0);
00657057          int64_t temp0_30 = __punpckhwd_mmxq_mmxd(st3, 0);
0065705a          int64_t temp0_31 = __punpckhwd_mmxq_mmxd(st6, 0);
00657070          st1 = ((temp0_26 | _m_pslldi(temp0_27, 0x10)) | _m_pslldi(st5, 8));
00657079          st0 = ((temp0_29 | _m_pslldi(temp0_30, 0x10)) | _m_pslldi(temp0_31, 8));
0065707c          uint16_t temp0_36[0x4] = _m_punpcklwd(0, st4[0]);
0065707f          st3 = __punpckhwd_mmxq_mmxd(0, st4[0]);
00657082          uint16_t st7[0x4] = _m_pslldi(temp0_36, 8);
0065708d          st0 |= _m_pslldi(st3, 8);
00657090          *(uint64_t*)edi = (st1 | st7);
00657093          edi[1] = st0;
0065709b          st3 = result[1];
0065709f          st0 = data_833108;
006570a6          st2 = data_833110;
006570ad          uint16_t temp0_40[0x4] = _m_psllwi(ebx[1], 4);
006570b1          uint16_t temp0_41[0x4] = _m_psllwi(st3, 4);
006570b5          st0 = _m_pmulhw(st0, temp0_40);
006570b8          st2 = _m_pmulhw(st2, temp0_41);
006570bb          st4 = (*(uint64_t*)data_833120);
006570c2          st5 = data_833118;
006570c9          int64_t temp0_44 = __psubw_mmxq_memq(st0, data_833130);
006570d0          int64_t temp0_45 = __psubw_mmxq_memq(st2, data_833128);
006570d7          uint16_t temp0_46[0x4] = _m_psrlwi(temp0_40, 4);
006570db          uint16_t temp0_47[0x4] = _m_psrlwi(temp0_41, 4);
006570df          int16_t temp0_48[0x4] = _m_pmullw(st4, temp0_46);
006570e2          int16_t temp0_49[0x4] = _m_pmullw(st5, temp0_47);
006570e5          st6 = esi[1];
006570ef          st4 = __psubw_mmxq_memq(_m_paddw(temp0_48, temp0_49), data_833138);
006570f6          st1 = data_833148;
006570fd          int16_t temp0_52[0x4] = _m_psrawi(st4, 8);
00657101          int64_t temp0_53 = _m_paddsw(temp0_44, st6);
00657104          int64_t temp0_54 = _m_paddsw(temp0_45, st6);
00657107          int64_t temp0_55 = _m_psubsw(st6, temp0_52);
0065710a          st0 = _m_packuswb(temp0_53, 0);
0065710d          st2 = _m_packuswb(temp0_54, 0);
00657110          st6 = _m_packuswb(temp0_55, 0);
00657113          st0 = _m_punpckhwd(st0, 0);
00657116          st2 = _m_punpckhwd(st2, 0);
00657119          st6 = _m_punpckhwd(st6, 0);
0065711c          st3 = st1;
0065711f          st5 = st1;
00657122          st4 = esi[0x31];
00657129          st1 = _m_psubw(st1, st0);
0065712c          st3 = _m_psubw(st3, st2);
0065712f          st5 = _m_psubw(st5, st6);
00657138          st6 = st5;
0065713b          uint16_t temp0_65[0x4] = _m_punpcklwd(st1, 0);
0065713e          uint16_t temp0_66[0x4] = _m_punpcklwd(st3, 0);
00657141          st5 = _m_punpcklwd(st5, 0);
00657144          int64_t temp0_68 = __punpckhwd_mmxq_mmxd(st1, 0);
00657147          int64_t temp0_69 = __punpckhwd_mmxq_mmxd(st3, 0);
0065714a          int64_t temp0_70 = __punpckhwd_mmxq_mmxd(st6, 0);
00657160          st1 = ((temp0_65 | _m_pslldi(temp0_66, 0x10)) | _m_pslldi(st5, 8));
00657169          st0 = ((temp0_68 | _m_pslldi(temp0_69, 0x10)) | _m_pslldi(temp0_70, 8));
0065716c          uint16_t temp0_75[0x4] = _m_punpcklwd(0, st4[0]);
0065716f          st3 = __punpckhwd_mmxq_mmxd(0, st4[0]);
00657172          st7 = _m_pslldi(temp0_75, 8);
0065717d          st0 |= _m_pslldi(st3, 8);
00657180          esi = &esi[2];
00657183          result = &result[2];
00657186          ebx = &ebx[2];
00657189          edi[2] = (st1 | st7);
0065718d          edi[3] = st0;
00657191          edi += arg5;
00657194          i = i_1;
00657194          i_1 -= 1;
00657195      } while (i != 1);
006571a2      return result;
00656f90  }

006571a3           8d a4 24 00 00 00 00 8d 9b 00 00 00 00                                                     ..$..........

006571b0  int64_t* _own_ycbcr_422_to_rgb_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

006571b0  {
006571bc      int64_t* esi = arg1;
006571bf      int64_t* result = arg2;
006571c2      int64_t* ebx = arg3;
006571c5      uint16_t (* edi)[0x4] = arg4;
006571ce      int32_t i_1 = 8;
00657518      int32_t i;
00657518      
00657518      do
00657518      {
006571d6          uint16_t st1[0x4] = *(uint64_t*)result;
006571d9          int64_t st4 = data_833098;
006571e0          int64_t st3 = data_833090;
006571e7          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
006571eb          uint16_t temp0_2[0x4] = _m_psllwi(st1, 4);
006571f2          int64_t st0 = data_8330a0;
006571f9          st4 = _m_pmulhw(st4, temp0_2);
006571fc          st3 = _m_pmulhw(st3, temp0_1);
006571ff          uint16_t temp0_5[0x4] = _m_punpcklwd(temp0_1, temp0_2[0]);
00657202          uint16_t st2[0x4] = __punpckhwd_mmxq_mmxd(temp0_1, temp0_2[0]);
00657205          int64_t temp0_7 = __psubw_mmxq_memq(st4, data_8330b8);
0065720c          int64_t temp0_8 = __psubw_mmxq_memq(st3, data_8330c0);
00657213          uint16_t st5[0x4] = _m_pmaddwd(temp0_5, st0);
00657216          st2 = _m_pmaddwd(st2, st0);
0065721f          int64_t st6 = _m_punpcklwd(temp0_7, temp0_7);
00657222          int64_t st7 = _m_punpcklwd(temp0_8, temp0_8);
00657225          int64_t temp0_13 = __punpckhwd_mmxq_mmxd(temp0_7, temp0_7);
00657228          int64_t temp0_14 = __punpckhwd_mmxq_mmxd(temp0_8, temp0_8);
0065722b          st5 = __psubd_mmxq_memq(st5, data_8330c8);
00657232          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00657239          st5 = _m_psradi(st5, 0xc);
0065723d          st2 = _m_psradi(st2, 0xc);
00657248          st5 = _m_packssdw(st5, st5);
0065724b          st2 = _m_packssdw(st2, st2);
0065724e          uint16_t temp0_21[0x4] = _m_punpcklwd(st5, st5[0]);
00657251          uint16_t temp0_22[0x4] = _m_punpcklwd(st2, st2[0]);
00657254          st0 = *(uint64_t*)esi;
0065725e          int64_t temp0_23 = _m_paddsw(st7, st0);
00657261          int64_t temp0_24 = _m_paddsw(st6, st0);
00657264          int64_t temp0_25 = _m_psubsw(st0, temp0_21);
00657267          st7 = _m_packuswb(temp0_23, 0);
0065726a          st6 = _m_packuswb(temp0_24, 0);
0065726d          st0 = _m_packuswb(temp0_25, 0);
00657270          st7 = _m_punpckhwd(st7, 0);
00657273          st6 = _m_punpckhwd(st6, 0);
00657276          st0 = _m_punpckhwd(st0, 0);
00657282          st5 = _m_psrlqi(st7, 8);
00657286          st2 = _m_psllqi(st6, 8);
006572a5          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
006572ac          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
006572b5          st1 = _m_psllqi(st7, 0x10);
006572c0          uint64_t temp0_37 = _m_psrlqi(_m_psllqi(st0, 0x20), 0x10);
006572c4          st1 = ((st1 | st7) & data_833100);
006572cb          st5 = _m_psrlqi(st0, 0x20);
006572d6          *(uint64_t*)edi = (st1 | temp0_37);
006572dd          st0 = esi[1];
006572e7          st2 = _m_paddsw(temp0_13, st0);
006572ea          st1 = _m_paddsw(temp0_14, st0);
006572ed          int64_t temp0_41 = _m_psubsw(st0, temp0_22);
006572f0          st2 = _m_packuswb(st2, 0);
006572f3          st1 = _m_packuswb(st1, 0);
006572f6          st0 = _m_packuswb(temp0_41, 0);
006572f9          st2 = _m_punpckhwd(st2, 0);
006572fc          st1 = _m_punpckhwd(st1, 0);
006572ff          st0 = _m_punpckhwd(st0, 0);
0065730b          uint64_t temp0_48 = _m_psllqi(st2, 8);
0065730f          uint64_t temp0_49 = _m_psrlqi(st1, 8);
00657313          uint64_t temp0_50 = _m_psllqi(st0, 8);
00657320          st0 = ((st0 | temp0_48) & data_8330f0);
0065733c          st2 = (_m_psllqi(((st2 | temp0_49) & data_8330f8), 0x10) | ((st1 | temp0_50) & data_8330f8));
00657343          st6 = st2;
00657346          st0 |= _m_psrlqi(st0, 0x10);
00657349          st2 = _m_psllqi(st2, 0x20);
00657354          uint64_t temp0_55 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00657358          st0 &= data_833100;
0065735f          edi[1] = (st5 | st2);
00657366          edi[2] = (temp0_55 | st0);
0065736e          st1 = result[1];
00657372          st4 = data_833098;
00657379          st3 = data_833090;
00657380          uint16_t temp0_56[0x4] = _m_psllwi(ebx[1], 4);
00657384          uint16_t temp0_57[0x4] = _m_psllwi(st1, 4);
0065738b          st0 = data_8330a0;
00657392          st4 = _m_pmulhw(st4, temp0_57);
00657395          st3 = _m_pmulhw(st3, temp0_56);
00657398          uint16_t temp0_60[0x4] = _m_punpcklwd(temp0_56, temp0_57[0]);
0065739b          st2 = __punpckhwd_mmxq_mmxd(temp0_56, temp0_57[0]);
0065739e          int64_t temp0_62 = __psubw_mmxq_memq(st4, data_8330b8);
006573a5          int64_t temp0_63 = __psubw_mmxq_memq(st3, data_8330c0);
006573ac          st5 = _m_pmaddwd(temp0_60, st0);
006573af          st2 = _m_pmaddwd(st2, st0);
006573b8          st6 = _m_punpcklwd(temp0_62, temp0_62);
006573bb          st7 = _m_punpcklwd(temp0_63, temp0_63);
006573be          int64_t temp0_68 = __punpckhwd_mmxq_mmxd(temp0_62, temp0_62);
006573c1          int64_t temp0_69 = __punpckhwd_mmxq_mmxd(temp0_63, temp0_63);
006573c4          st5 = __psubd_mmxq_memq(st5, data_8330c8);
006573cb          st2 = __psubd_mmxq_memq(st2, data_8330c8);
006573d2          st5 = _m_psradi(st5, 0xc);
006573d6          st2 = _m_psradi(st2, 0xc);
006573e1          st5 = _m_packssdw(st5, st5);
006573e4          result = &result[2];
006573e7          st2 = _m_packssdw(st2, st2);
006573ea          ebx = &ebx[2];
006573ed          uint16_t temp0_76[0x4] = _m_punpcklwd(st5, st5[0]);
006573f0          uint16_t temp0_77[0x4] = _m_punpcklwd(st2, st2[0]);
006573f3          st0 = esi[0x10];
00657401          int64_t temp0_78 = _m_paddsw(st7, st0);
00657404          int64_t temp0_79 = _m_paddsw(st6, st0);
00657407          int64_t temp0_80 = _m_psubsw(st0, temp0_76);
0065740a          st7 = _m_packuswb(temp0_78, 0);
0065740d          st6 = _m_packuswb(temp0_79, 0);
00657410          st0 = _m_packuswb(temp0_80, 0);
00657413          st7 = _m_punpckhwd(st7, 0);
00657416          st6 = _m_punpckhwd(st6, 0);
00657419          st0 = _m_punpckhwd(st0, 0);
00657425          st5 = _m_psrlqi(st7, 8);
00657429          st2 = _m_psllqi(st6, 8);
00657448          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
0065744f          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00657458          st1 = _m_psllqi(st7, 0x10);
00657463          uint64_t temp0_92 = _m_psrlqi(_m_psllqi(st0, 0x20), 0x10);
00657467          st1 = ((st1 | st7) & data_833100);
0065746e          st5 = _m_psrlqi(st0, 0x20);
00657479          edi[3] = (st1 | temp0_92);
00657484          st0 = esi[0x11];
0065748e          st1 = _m_paddsw(temp0_69, st0);
00657491          st2 = _m_paddsw(temp0_68, st0);
00657494          int64_t temp0_96 = _m_psubsw(st0, temp0_77);
00657497          st1 = _m_packuswb(st1, 0);
0065749a          st2 = _m_packuswb(st2, 0);
0065749d          st0 = _m_packuswb(temp0_96, 0);
006574a0          st1 = _m_punpckhwd(st1, 0);
006574a3          st2 = _m_punpckhwd(st2, 0);
006574a6          st0 = _m_punpckhwd(st0, 0);
006574b2          uint64_t temp0_103 = _m_psrlqi(st1, 8);
006574b6          uint64_t temp0_104 = _m_psllqi(st2, 8);
006574ba          uint64_t temp0_105 = _m_psllqi(st0, 8);
006574ce          st0 = ((st0 | temp0_104) & data_8330f0);
006574e3          st2 = (_m_psllqi(((st2 | temp0_103) & data_8330f8), 0x10) | ((st1 | temp0_105) & data_8330f8));
006574ea          st4 = st2;
006574ed          st0 |= _m_psrlqi(st0, 0x10);
006574f0          st2 = _m_psllqi(st2, 0x20);
006574fb          uint64_t temp0_110 = _m_psllqi(_m_psrlqi(st4, 0x20), 0x10);
006574ff          st0 &= data_833100;
00657506          edi[4] = (st5 | st2);
0065750d          edi[5] = (temp0_110 | st0);
00657511          edi += arg5;
00657514          esi = &esi[2];
00657517          i = i_1;
00657517          i_1 -= 1;
00657518      } while (i != 1);
00657525      return result;
006571b0  }

00657526                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.

00657530  int64_t* _own_ycbcr_422_to_bgr_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

00657530  {
0065753c      int64_t* esi = arg1;
0065753f      int64_t* result = arg2;
00657542      int64_t* ebx = arg3;
00657545      uint16_t (* edi)[0x4] = arg4;
0065754e      int32_t i_1 = 8;
00657898      int32_t i;
00657898      
00657898      do
00657898      {
00657556          uint16_t st1[0x4] = *(uint64_t*)result;
00657559          int64_t st4 = data_833098;
00657560          int64_t st3 = data_833090;
00657567          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
0065756b          uint16_t temp0_2[0x4] = _m_psllwi(st1, 4);
00657572          int64_t st0 = data_8330a0;
00657579          st4 = _m_pmulhw(st4, temp0_2);
0065757c          st3 = _m_pmulhw(st3, temp0_1);
0065757f          uint16_t temp0_5[0x4] = _m_punpcklwd(temp0_1, temp0_2[0]);
00657582          uint16_t st2[0x4] = __punpckhwd_mmxq_mmxd(temp0_1, temp0_2[0]);
00657585          int64_t temp0_7 = __psubw_mmxq_memq(st4, data_8330b8);
0065758c          int64_t temp0_8 = __psubw_mmxq_memq(st3, data_8330c0);
00657593          uint16_t st5[0x4] = _m_pmaddwd(temp0_5, st0);
00657596          st2 = _m_pmaddwd(st2, st0);
0065759f          int64_t st7 = _m_punpcklwd(temp0_7, temp0_7);
006575a2          int64_t st6 = _m_punpcklwd(temp0_8, temp0_8);
006575a5          int64_t temp0_13 = __punpckhwd_mmxq_mmxd(temp0_7, temp0_7);
006575a8          int64_t temp0_14 = __punpckhwd_mmxq_mmxd(temp0_8, temp0_8);
006575ab          st5 = __psubd_mmxq_memq(st5, data_8330c8);
006575b2          st2 = __psubd_mmxq_memq(st2, data_8330c8);
006575b9          st5 = _m_psradi(st5, 0xc);
006575bd          st2 = _m_psradi(st2, 0xc);
006575c8          st5 = _m_packssdw(st5, st5);
006575cb          st2 = _m_packssdw(st2, st2);
006575ce          uint16_t temp0_21[0x4] = _m_punpcklwd(st5, st5[0]);
006575d1          uint16_t temp0_22[0x4] = _m_punpcklwd(st2, st2[0]);
006575d4          st0 = *(uint64_t*)esi;
006575de          int64_t temp0_23 = _m_paddsw(st7, st0);
006575e1          int64_t temp0_24 = _m_paddsw(st6, st0);
006575e4          int64_t temp0_25 = _m_psubsw(st0, temp0_21);
006575e7          st7 = _m_packuswb(temp0_23, 0);
006575ea          st6 = _m_packuswb(temp0_24, 0);
006575ed          st0 = _m_packuswb(temp0_25, 0);
006575f0          st7 = _m_punpckhwd(st7, 0);
006575f3          st6 = _m_punpckhwd(st6, 0);
006575f6          st0 = _m_punpckhwd(st0, 0);
00657602          st5 = _m_psrlqi(st7, 8);
00657606          st2 = _m_psllqi(st6, 8);
0065761e          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
0065762f          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00657639          st1 = (_m_psllqi(st7, 0x10) | st7);
0065763c          uint64_t temp0_36 = _m_psllqi(st0, 0x20);
00657640          st1 &= data_833100;
00657647          uint64_t temp0_37 = _m_psrlqi(temp0_36, 0x10);
0065764b          st5 = _m_psrlqi(st0, 0x20);
00657656          *(uint64_t*)edi = (st1 | temp0_37);
0065765d          st0 = esi[1];
00657667          st2 = _m_paddw(temp0_14, st0);
0065766a          st1 = _m_paddw(temp0_13, st0);
0065766d          int64_t temp0_41 = _m_psubw(st0, temp0_22);
00657670          st2 = _m_packuswb(st2, 0);
00657673          st1 = _m_packuswb(st1, 0);
00657676          st0 = _m_packuswb(temp0_41, 0);
00657679          st2 = _m_punpckhwd(st2, 0);
0065767c          st1 = _m_punpckhwd(st1, 0);
0065767f          st0 = _m_punpckhwd(st0, 0);
0065768b          uint64_t temp0_48 = _m_psrlqi(st1, 8);
0065768f          uint64_t temp0_49 = _m_psllqi(st0, 8);
006576ae          st0 = ((st0 | _m_psllqi(st2, 8)) & data_8330f0);
006576bc          st2 = (_m_psllqi(((st2 | temp0_48) & data_8330f8), 0x10) | ((st1 | temp0_49) & data_8330f8));
006576bf          uint64_t temp0_52 = _m_psrlqi(st0, 0x10);
006576c3          st6 = st2;
006576c6          st2 = _m_psllqi(st2, 0x20);
006576d4          uint64_t temp0_55 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
006576d8          st0 = ((st0 | temp0_52) & data_833100);
006576df          edi[1] = (st5 | st2);
006576e6          edi[2] = (temp0_55 | st0);
006576ee          st1 = result[1];
006576f2          st4 = data_833098;
006576f9          st3 = data_833090;
00657700          uint16_t temp0_56[0x4] = _m_psllwi(ebx[1], 4);
00657704          uint16_t temp0_57[0x4] = _m_psllwi(st1, 4);
0065770b          st0 = data_8330a0;
00657712          st4 = _m_pmulhw(st4, temp0_57);
00657715          st3 = _m_pmulhw(st3, temp0_56);
00657718          uint16_t temp0_60[0x4] = _m_punpcklwd(temp0_56, temp0_57[0]);
0065771b          st2 = __punpckhwd_mmxq_mmxd(temp0_56, temp0_57[0]);
0065771e          int64_t temp0_62 = __psubw_mmxq_memq(st4, data_8330b8);
00657725          int64_t temp0_63 = __psubw_mmxq_memq(st3, data_8330c0);
0065772c          st5 = _m_pmaddwd(temp0_60, st0);
0065772f          st2 = _m_pmaddwd(st2, st0);
00657738          st7 = _m_punpcklwd(temp0_62, temp0_62);
0065773b          st6 = _m_punpcklwd(temp0_63, temp0_63);
0065773e          int64_t temp0_68 = __punpckhwd_mmxq_mmxd(temp0_62, temp0_62);
00657741          int64_t temp0_69 = __punpckhwd_mmxq_mmxd(temp0_63, temp0_63);
00657744          st5 = __psubd_mmxq_memq(st5, data_8330c8);
0065774b          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00657752          st5 = _m_psradi(st5, 0xc);
00657756          st2 = _m_psradi(st2, 0xc);
00657761          st5 = _m_packssdw(st5, st5);
00657764          result = &result[2];
00657767          st2 = _m_packssdw(st2, st2);
0065776a          ebx = &ebx[2];
0065776d          uint16_t temp0_76[0x4] = _m_punpcklwd(st5, st5[0]);
00657770          uint16_t temp0_77[0x4] = _m_punpcklwd(st2, st2[0]);
00657773          st0 = esi[0x10];
00657781          int64_t temp0_78 = _m_paddsw(st7, st0);
00657784          int64_t temp0_79 = _m_paddsw(st6, st0);
00657787          int64_t temp0_80 = _m_psubsw(st0, temp0_76);
0065778a          st7 = _m_packuswb(temp0_78, 0);
0065778d          st6 = _m_packuswb(temp0_79, 0);
00657790          st0 = _m_packuswb(temp0_80, 0);
00657793          st7 = _m_punpckhwd(st7, 0);
00657796          st6 = _m_punpckhwd(st6, 0);
00657799          st0 = _m_punpckhwd(st0, 0);
006577a5          st5 = _m_psrlqi(st7, 8);
006577a9          st2 = _m_psllqi(st6, 8);
006577c1          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
006577d2          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
006577dc          st1 = (_m_psllqi(st7, 0x10) | st7);
006577df          uint64_t temp0_91 = _m_psllqi(st0, 0x20);
006577e3          st1 &= data_833100;
006577ea          uint64_t temp0_92 = _m_psrlqi(temp0_91, 0x10);
006577ee          st5 = _m_psrlqi(st0, 0x20);
006577f9          edi[3] = (st1 | temp0_92);
00657801          st0 = esi[0x11];
0065780e          st2 = _m_paddw(temp0_69, st0);
00657811          st1 = _m_paddw(temp0_68, st0);
00657814          int64_t temp0_96 = _m_psubw(st0, temp0_77);
00657817          st2 = _m_packuswb(st2, 0);
0065781a          st1 = _m_packuswb(st1, 0);
0065781d          st0 = _m_packuswb(temp0_96, 0);
00657820          st2 = _m_punpckhwd(st2, 0);
00657823          st1 = _m_punpckhwd(st1, 0);
00657826          st0 = _m_punpckhwd(st0, 0);
00657832          uint64_t temp0_103 = _m_psrlqi(st1, 8);
00657836          uint64_t temp0_104 = _m_psllqi(st0, 8);
00657855          st0 = ((st0 | _m_psllqi(st2, 8)) & data_8330f0);
00657863          st2 = (_m_psllqi(((st2 | temp0_103) & data_8330f8), 0x10) | ((st1 | temp0_104) & data_8330f8));
00657866          uint64_t temp0_107 = _m_psrlqi(st0, 0x10);
0065786a          st6 = st2;
0065786d          st2 = _m_psllqi(st2, 0x20);
0065787b          uint64_t temp0_110 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
0065787f          st0 = ((st0 | temp0_107) & data_833100);
00657886          edi[4] = (st5 | st2);
0065788d          edi[5] = (temp0_110 | st0);
00657891          edi += arg5;
00657894          esi = &esi[2];
00657897          i = i_1;
00657897          i_1 -= 1;
00657898      } while (i != 1);
006578a5      return result;
00657530  }

006578a6                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.

006578b0  int64_t* _own_ycbcr_422_to_rgb_full_mcu_a6(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

006578b0  {
006578bc      int64_t* esi = arg1;
006578bf      int64_t* result = arg2;
006578c2      int64_t* ebx = arg3;
006578c5      uint16_t (* edi)[0x4] = arg4;
006578ce      int32_t i_1 = 8;
00657bfe      int32_t i;
00657bfe      
00657bfe      do
00657bfe      {
006578d6          uint16_t st1[0x4] = *(uint64_t*)result;
006578d9          int64_t st4 = data_833098;
006578e0          int64_t st3 = data_833090;
006578e7          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
006578eb          uint16_t temp0_2[0x4] = _m_psllwi(st1, 4);
006578f2          int64_t st0 = data_8330a0;
006578f9          st4 = _m_pmulhw(st4, temp0_2);
006578fc          st3 = _m_pmulhw(st3, temp0_1);
006578ff          uint16_t temp0_5[0x4] = _m_punpcklwd(temp0_1, temp0_2[0]);
00657902          uint16_t st2[0x4] = __punpckhwd_mmxq_mmxd(temp0_1, temp0_2[0]);
00657905          int64_t temp0_7 = __psubw_mmxq_memq(st4, data_8330b8);
0065790c          int64_t temp0_8 = __psubw_mmxq_memq(st3, data_8330c0);
00657913          uint16_t st5[0x4] = _m_pmaddwd(temp0_5, st0);
00657916          st2 = _m_pmaddwd(st2, st0);
0065791f          int64_t st6 = _m_punpcklwd(temp0_7, temp0_7);
00657922          int64_t st7 = _m_punpcklwd(temp0_8, temp0_8);
00657925          int64_t temp0_13 = __punpckhwd_mmxq_mmxd(temp0_7, temp0_7);
00657928          int64_t temp0_14 = __punpckhwd_mmxq_mmxd(temp0_8, temp0_8);
0065792b          st5 = __psubd_mmxq_memq(st5, data_8330c8);
00657932          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00657939          st5 = _m_psradi(st5, 0xc);
0065793d          st2 = _m_psradi(st2, 0xc);
00657948          st5 = _m_packssdw(st5, st5);
0065794b          st2 = _m_packssdw(st2, st2);
0065794e          uint16_t temp0_21[0x4] = _m_punpcklwd(st5, st5[0]);
00657951          uint16_t temp0_22[0x4] = _m_punpcklwd(st2, st2[0]);
00657954          st0 = *(uint64_t*)esi;
0065795e          int64_t temp0_23 = _m_paddsw(st7, st0);
00657961          int64_t temp0_24 = _m_paddsw(st6, st0);
00657964          int64_t temp0_25 = _m_psubsw(st0, temp0_21);
00657967          st7 = _m_packuswb(temp0_23, 0);
0065796a          st6 = _m_packuswb(temp0_24, 0);
0065796d          st0 = _m_packuswb(temp0_25, 0);
00657970          st7 = _m_punpckhwd(st7, 0);
00657973          st6 = _m_punpckhwd(st6, 0);
00657976          st0 = _m_punpckhwd(st0, 0);
00657982          st5 = _m_psrlqi(st7, 8);
00657986          st2 = _m_psllqi(st6, 8);
0065798a          uint64_t temp0_34 = _m_psllqi(st0, 8);
006579ac          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
006579af          uint16_t temp0_35[0x4] = _mm_shuffle_pi16(((st7 | temp0_34) & data_8330f8), 0x94);
006579b6          uint64_t temp0_36 = _m_psllqi(st0, 0x20);
006579ba          st5 = _m_psrlqi(st0, 0x20);
006579c9          *(uint64_t*)edi = (temp0_35 | _m_psrlqi(temp0_36, 0x10));
006579d0          st0 = esi[1];
006579da          st2 = _m_paddsw(temp0_13, st0);
006579dd          st1 = _m_paddsw(temp0_14, st0);
006579e0          int64_t temp0_41 = _m_psubsw(st0, temp0_22);
006579e3          st2 = _m_packuswb(st2, 0);
006579e6          st1 = _m_packuswb(st1, 0);
006579e9          st0 = _m_packuswb(temp0_41, 0);
006579ec          st2 = _m_punpckhwd(st2, 0);
006579ef          st1 = _m_punpckhwd(st1, 0);
006579f2          st0 = _m_punpckhwd(st0, 0);
006579fe          uint64_t temp0_48 = _m_psllqi(st2, 8);
00657a02          uint64_t temp0_49 = _m_psrlqi(st1, 8);
00657a06          uint64_t temp0_50 = _m_psllqi(st0, 8);
00657a13          st0 = ((st0 | temp0_48) & data_8330f0);
00657a2f          st2 = (_m_psllqi(((st2 | temp0_49) & data_8330f8), 0x10) | ((st1 | temp0_50) & data_8330f8));
00657a36          st6 = st2;
00657a39          st0 |= _m_psrlqi(st0, 0x10);
00657a3c          st2 = _m_psllqi(st2, 0x20);
00657a47          uint64_t temp0_55 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00657a4b          st0 &= data_833100;
00657a52          edi[1] = (st5 | st2);
00657a59          edi[2] = (temp0_55 | st0);
00657a61          st1 = result[1];
00657a65          st4 = data_833098;
00657a6c          st3 = data_833090;
00657a73          uint16_t temp0_56[0x4] = _m_psllwi(ebx[1], 4);
00657a77          uint16_t temp0_57[0x4] = _m_psllwi(st1, 4);
00657a7e          st0 = data_8330a0;
00657a85          st4 = _m_pmulhw(st4, temp0_57);
00657a88          st3 = _m_pmulhw(st3, temp0_56);
00657a8b          uint16_t temp0_60[0x4] = _m_punpcklwd(temp0_56, temp0_57[0]);
00657a8e          st2 = __punpckhwd_mmxq_mmxd(temp0_56, temp0_57[0]);
00657a91          int64_t temp0_62 = __psubw_mmxq_memq(st4, data_8330b8);
00657a98          int64_t temp0_63 = __psubw_mmxq_memq(st3, data_8330c0);
00657a9f          st5 = _m_pmaddwd(temp0_60, st0);
00657aa2          st2 = _m_pmaddwd(st2, st0);
00657aab          st6 = _m_punpcklwd(temp0_62, temp0_62);
00657aae          st7 = _m_punpcklwd(temp0_63, temp0_63);
00657ab1          int64_t temp0_68 = __punpckhwd_mmxq_mmxd(temp0_62, temp0_62);
00657ab4          int64_t temp0_69 = __punpckhwd_mmxq_mmxd(temp0_63, temp0_63);
00657ab7          st5 = __psubd_mmxq_memq(st5, data_8330c8);
00657abe          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00657ac5          st5 = _m_psradi(st5, 0xc);
00657ac9          st2 = _m_psradi(st2, 0xc);
00657ad4          st5 = _m_packssdw(st5, st5);
00657ad7          result = &result[2];
00657ada          st2 = _m_packssdw(st2, st2);
00657add          ebx = &ebx[2];
00657ae0          uint16_t temp0_76[0x4] = _m_punpcklwd(st5, st5[0]);
00657ae3          uint16_t temp0_77[0x4] = _m_punpcklwd(st2, st2[0]);
00657ae6          st0 = esi[0x10];
00657af4          int64_t temp0_78 = _m_paddsw(st7, st0);
00657af7          int64_t temp0_79 = _m_paddsw(st6, st0);
00657afa          int64_t temp0_80 = _m_psubsw(st0, temp0_76);
00657afd          st7 = _m_packuswb(temp0_78, 0);
00657b00          st6 = _m_packuswb(temp0_79, 0);
00657b03          st0 = _m_packuswb(temp0_80, 0);
00657b06          st7 = _m_punpckhwd(st7, 0);
00657b09          st6 = _m_punpckhwd(st6, 0);
00657b0c          st0 = _m_punpckhwd(st0, 0);
00657b18          st5 = _m_psrlqi(st7, 8);
00657b1c          st2 = _m_psllqi(st6, 8);
00657b20          uint64_t temp0_89 = _m_psllqi(st0, 8);
00657b42          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00657b45          uint16_t temp0_90[0x4] = _mm_shuffle_pi16(((st7 | temp0_89) & data_8330f8), 0x94);
00657b4c          uint64_t temp0_91 = _m_psllqi(st0, 0x20);
00657b50          st5 = _m_psrlqi(st0, 0x20);
00657b5f          edi[3] = (temp0_90 | _m_psrlqi(temp0_91, 0x10));
00657b6a          st0 = esi[0x11];
00657b74          st1 = _m_paddsw(temp0_69, st0);
00657b77          st2 = _m_paddsw(temp0_68, st0);
00657b7a          int64_t temp0_96 = _m_psubsw(st0, temp0_77);
00657b7d          st1 = _m_packuswb(st1, 0);
00657b80          st2 = _m_packuswb(st2, 0);
00657b83          st0 = _m_packuswb(temp0_96, 0);
00657b86          st1 = _m_punpckhwd(st1, 0);
00657b89          st2 = _m_punpckhwd(st2, 0);
00657b8c          st0 = _m_punpckhwd(st0, 0);
00657b98          uint64_t temp0_103 = _m_psrlqi(st1, 8);
00657b9c          uint64_t temp0_104 = _m_psllqi(st2, 8);
00657ba0          uint64_t temp0_105 = _m_psllqi(st0, 8);
00657bb4          st0 = ((st0 | temp0_104) & data_8330f0);
00657bc9          st2 = (_m_psllqi(((st2 | temp0_103) & data_8330f8), 0x10) | ((st1 | temp0_105) & data_8330f8));
00657bd0          st4 = st2;
00657bd3          st0 |= _m_psrlqi(st0, 0x10);
00657bd6          st2 = _m_psllqi(st2, 0x20);
00657be1          uint64_t temp0_110 = _m_psllqi(_m_psrlqi(st4, 0x20), 0x10);
00657be5          st0 &= data_833100;
00657bec          edi[4] = (st5 | st2);
00657bf3          edi[5] = (temp0_110 | st0);
00657bf7          edi += arg5;
00657bfa          esi = &esi[2];
00657bfd          i = i_1;
00657bfd          i_1 -= 1;
00657bfe      } while (i != 1);
00657c0b      return result;
006578b0  }

00657c0c                                      8d 64 24 00                                                              .d$.

00657c10  int64_t* _own_ycbcr_422_to_bgr_full_mcu_a6(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

00657c10  {
00657c1c      int64_t* esi = arg1;
00657c1f      int64_t* result = arg2;
00657c22      int64_t* ebx = arg3;
00657c25      uint16_t (* edi)[0x4] = arg4;
00657c2e      int32_t i_1 = 8;
00657f5e      int32_t i;
00657f5e      
00657f5e      do
00657f5e      {
00657c36          uint16_t st1[0x4] = *(uint64_t*)result;
00657c39          int64_t st4 = data_833098;
00657c40          int64_t st3 = data_833090;
00657c47          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
00657c4b          uint16_t temp0_2[0x4] = _m_psllwi(st1, 4);
00657c52          int64_t st0 = data_8330a0;
00657c59          st4 = _m_pmulhw(st4, temp0_2);
00657c5c          st3 = _m_pmulhw(st3, temp0_1);
00657c5f          uint16_t temp0_5[0x4] = _m_punpcklwd(temp0_1, temp0_2[0]);
00657c62          uint16_t st2[0x4] = __punpckhwd_mmxq_mmxd(temp0_1, temp0_2[0]);
00657c65          int64_t temp0_7 = __psubw_mmxq_memq(st4, data_8330b8);
00657c6c          int64_t temp0_8 = __psubw_mmxq_memq(st3, data_8330c0);
00657c73          uint16_t st5[0x4] = _m_pmaddwd(temp0_5, st0);
00657c76          st2 = _m_pmaddwd(st2, st0);
00657c7f          int64_t st7 = _m_punpcklwd(temp0_7, temp0_7);
00657c82          int64_t st6 = _m_punpcklwd(temp0_8, temp0_8);
00657c85          int64_t temp0_13 = __punpckhwd_mmxq_mmxd(temp0_7, temp0_7);
00657c88          int64_t temp0_14 = __punpckhwd_mmxq_mmxd(temp0_8, temp0_8);
00657c8b          st5 = __psubd_mmxq_memq(st5, data_8330c8);
00657c92          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00657c99          st5 = _m_psradi(st5, 0xc);
00657c9d          st2 = _m_psradi(st2, 0xc);
00657ca8          st5 = _m_packssdw(st5, st5);
00657cab          st2 = _m_packssdw(st2, st2);
00657cae          uint16_t temp0_21[0x4] = _m_punpcklwd(st5, st5[0]);
00657cb1          uint16_t temp0_22[0x4] = _m_punpcklwd(st2, st2[0]);
00657cb4          st0 = *(uint64_t*)esi;
00657cbe          int64_t temp0_23 = _m_paddsw(st7, st0);
00657cc1          int64_t temp0_24 = _m_paddsw(st6, st0);
00657cc4          int64_t temp0_25 = _m_psubsw(st0, temp0_21);
00657cc7          st7 = _m_packuswb(temp0_23, 0);
00657cca          st6 = _m_packuswb(temp0_24, 0);
00657ccd          st0 = _m_packuswb(temp0_25, 0);
00657cd0          st7 = _m_punpckhwd(st7, 0);
00657cd3          st6 = _m_punpckhwd(st6, 0);
00657cd6          st0 = _m_punpckhwd(st0, 0);
00657ce2          st5 = _m_psrlqi(st7, 8);
00657ce6          st2 = _m_psllqi(st6, 8);
00657cf1          st7 |= _m_psllqi(st0, 8);
00657cf7          st6 = ((st6 | st5) & data_8330f8);
00657d05          st0 = ((st0 | st2) & data_8330f0);
00657d0c          uint16_t temp0_35[0x4] = _mm_shuffle_pi16((st7 & data_8330f8), 0x94);
00657d10          st0 |= st6;
00657d16          uint64_t temp0_36 = _m_psllqi(st0, 0x20);
00657d1a          st5 = _m_psrlqi(st0, 0x20);
00657d29          *(uint64_t*)edi = (temp0_35 | _m_psrlqi(temp0_36, 0x10));
00657d30          st0 = esi[1];
00657d3a          st2 = _m_paddw(temp0_14, st0);
00657d3d          st1 = _m_paddw(temp0_13, st0);
00657d40          int64_t temp0_41 = _m_psubw(st0, temp0_22);
00657d43          st2 = _m_packuswb(st2, 0);
00657d46          st1 = _m_packuswb(st1, 0);
00657d49          st0 = _m_packuswb(temp0_41, 0);
00657d4c          st2 = _m_punpckhwd(st2, 0);
00657d4f          st1 = _m_punpckhwd(st1, 0);
00657d52          st0 = _m_punpckhwd(st0, 0);
00657d5e          uint64_t temp0_48 = _m_psrlqi(st1, 8);
00657d62          uint64_t temp0_49 = _m_psllqi(st0, 8);
00657d81          st0 = ((st0 | _m_psllqi(st2, 8)) & data_8330f0);
00657d8f          st2 = (_m_psllqi(((st2 | temp0_48) & data_8330f8), 0x10) | ((st1 | temp0_49) & data_8330f8));
00657d92          uint64_t temp0_52 = _m_psrlqi(st0, 0x10);
00657d96          st6 = st2;
00657d99          st2 = _m_psllqi(st2, 0x20);
00657da7          uint64_t temp0_55 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00657dab          st0 = ((st0 | temp0_52) & data_833100);
00657db2          edi[1] = (st5 | st2);
00657db9          edi[2] = (temp0_55 | st0);
00657dc1          st1 = result[1];
00657dc5          st4 = data_833098;
00657dcc          st3 = data_833090;
00657dd3          uint16_t temp0_56[0x4] = _m_psllwi(ebx[1], 4);
00657dd7          uint16_t temp0_57[0x4] = _m_psllwi(st1, 4);
00657dde          st0 = data_8330a0;
00657de5          st4 = _m_pmulhw(st4, temp0_57);
00657de8          st3 = _m_pmulhw(st3, temp0_56);
00657deb          uint16_t temp0_60[0x4] = _m_punpcklwd(temp0_56, temp0_57[0]);
00657dee          st2 = __punpckhwd_mmxq_mmxd(temp0_56, temp0_57[0]);
00657df1          int64_t temp0_62 = __psubw_mmxq_memq(st4, data_8330b8);
00657df8          int64_t temp0_63 = __psubw_mmxq_memq(st3, data_8330c0);
00657dff          st5 = _m_pmaddwd(temp0_60, st0);
00657e02          st2 = _m_pmaddwd(st2, st0);
00657e0b          st7 = _m_punpcklwd(temp0_62, temp0_62);
00657e0e          st6 = _m_punpcklwd(temp0_63, temp0_63);
00657e11          int64_t temp0_68 = __punpckhwd_mmxq_mmxd(temp0_62, temp0_62);
00657e14          int64_t temp0_69 = __punpckhwd_mmxq_mmxd(temp0_63, temp0_63);
00657e17          st5 = __psubd_mmxq_memq(st5, data_8330c8);
00657e1e          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00657e25          st5 = _m_psradi(st5, 0xc);
00657e29          st2 = _m_psradi(st2, 0xc);
00657e34          st5 = _m_packssdw(st5, st5);
00657e37          result = &result[2];
00657e3a          st2 = _m_packssdw(st2, st2);
00657e3d          ebx = &ebx[2];
00657e40          uint16_t temp0_76[0x4] = _m_punpcklwd(st5, st5[0]);
00657e43          uint16_t temp0_77[0x4] = _m_punpcklwd(st2, st2[0]);
00657e46          st0 = esi[0x10];
00657e54          int64_t temp0_78 = _m_paddsw(st7, st0);
00657e57          int64_t temp0_79 = _m_paddsw(st6, st0);
00657e5a          int64_t temp0_80 = _m_psubsw(st0, temp0_76);
00657e5d          st7 = _m_packuswb(temp0_78, 0);
00657e60          st6 = _m_packuswb(temp0_79, 0);
00657e63          st0 = _m_packuswb(temp0_80, 0);
00657e66          st7 = _m_punpckhwd(st7, 0);
00657e69          st6 = _m_punpckhwd(st6, 0);
00657e6c          st0 = _m_punpckhwd(st0, 0);
00657e78          st5 = _m_psrlqi(st7, 8);
00657e7c          st2 = _m_psllqi(st6, 8);
00657e87          st7 |= _m_psllqi(st0, 8);
00657e8d          st6 = ((st6 | st5) & data_8330f8);
00657e9b          st0 = ((st0 | st2) & data_8330f0);
00657ea2          uint16_t temp0_90[0x4] = _mm_shuffle_pi16((st7 & data_8330f8), 0x94);
00657ea6          st0 |= st6;
00657eac          uint64_t temp0_91 = _m_psllqi(st0, 0x20);
00657eb0          st5 = _m_psrlqi(st0, 0x20);
00657ebf          edi[3] = (temp0_90 | _m_psrlqi(temp0_91, 0x10));
00657ec7          st0 = esi[0x11];
00657ed4          st2 = _m_paddw(temp0_69, st0);
00657ed7          st1 = _m_paddw(temp0_68, st0);
00657eda          int64_t temp0_96 = _m_psubw(st0, temp0_77);
00657edd          st2 = _m_packuswb(st2, 0);
00657ee0          st1 = _m_packuswb(st1, 0);
00657ee3          st0 = _m_packuswb(temp0_96, 0);
00657ee6          st2 = _m_punpckhwd(st2, 0);
00657ee9          st1 = _m_punpckhwd(st1, 0);
00657eec          st0 = _m_punpckhwd(st0, 0);
00657ef8          uint64_t temp0_103 = _m_psrlqi(st1, 8);
00657efc          uint64_t temp0_104 = _m_psllqi(st0, 8);
00657f1b          st0 = ((st0 | _m_psllqi(st2, 8)) & data_8330f0);
00657f29          st2 = (_m_psllqi(((st2 | temp0_103) & data_8330f8), 0x10) | ((st1 | temp0_104) & data_8330f8));
00657f2c          uint64_t temp0_107 = _m_psrlqi(st0, 0x10);
00657f30          st6 = st2;
00657f33          st2 = _m_psllqi(st2, 0x20);
00657f41          uint64_t temp0_110 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00657f45          st0 = ((st0 | temp0_107) & data_833100);
00657f4c          edi[4] = (st5 | st2);
00657f53          edi[5] = (temp0_110 | st0);
00657f57          edi += arg5;
00657f5a          esi = &esi[2];
00657f5d          i = i_1;
00657f5d          i_1 -= 1;
00657f5e      } while (i != 1);
00657f6b      return result;
00657c10  }

00657f6c                                      8d 64 24 00                                                              .d$.

00657f70  int64_t* _own_ycbcr_422_to_rgba_fpx_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, int64_t* arg4, int32_t arg5)

00657f70  {
00657f7c      int64_t* esi = arg1;
00657f7f      int64_t* result = arg2;
00657f82      int64_t* ebx = arg3;
00657f85      int64_t* edi = arg4;
00657f88      int32_t i_1 = 8;
00658278      int32_t i;
00658278      
00658278      do
00658278      {
00657f96          uint16_t st1[0x4] = *(uint64_t*)result;
00657f99          int64_t st2 = data_833108;
00657fa0          int64_t st3 = data_833110;
00657fa7          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
00657fab          uint16_t temp0_2[0x4] = _m_psllwi(st1, 4);
00657faf          st2 = _m_pmulhw(st2, temp0_1);
00657fb2          st3 = _m_pmulhw(st3, temp0_2);
00657fbc          int64_t st5 = data_833128;
00657fc3          int64_t temp0_5 = _m_psubw(st2, data_833130);
00657fc6          int64_t temp0_6 = _m_psubw(st3, st5);
00657fd0          uint16_t temp0_7[0x4] = _m_psrlwi(temp0_1, 4);
00657fd4          uint16_t temp0_8[0x4] = _m_psrlwi(temp0_2, 4);
00657fec          int64_t temp0_11 = _m_paddw(_m_pmullw((*(uint64_t*)data_833120), temp0_7), _m_pmullw(data_833118, temp0_8));
00657fef          int64_t st6 = *(uint64_t*)esi;
00657ff9          int80_t st7;
00657ff9          st7 = 0;
00657ffc          st2 = _m_psrawi(__psubw_mmxq_memq(temp0_11, data_833138), 8);
00658000          st1 = data_833140;
00658007          int64_t var_10_1 = st2;
0065800b          uint16_t st0[0x4] = ((uint64_t)temp0_5);
0065800e          st2 = ((uint64_t)temp0_6);
00658012          int64_t st4 = ((uint64_t)var_10_1);
00658016          uint16_t temp0_14[0x4] = _m_punpcklwd(st0, st0[0]);
00658019          st2 = _m_punpcklwd(st2, st2);
0065801c          st4 = _m_punpcklwd(st4, st4);
0065801f          st0 = _m_paddsw(temp0_14, st6);
00658022          int64_t temp0_18 = _m_paddsw(st2, st6);
00658025          int64_t temp0_19 = _m_psubsw(st6, st4);
00658028          st0 = _m_packuswb(st0, 0);
0065802b          st2 = _m_packuswb(temp0_18, 0);
0065802e          st6 = _m_packuswb(temp0_19, 0);
00658031          st0 = _m_punpckhwd(st0, 0);
00658034          st2 = _m_punpckhwd(st2, 0);
00658037          st6 = _m_punpckhwd(st6, 0);
00658043          st3 = _m_punpcklwd(st0, 0);
00658046          st4 = _m_punpcklwd(st2, 0);
00658049          st5 = _m_punpcklwd(st6, 0);
0065804c          st0 = __punpckhwd_mmxq_mmxd(st0, 0);
0065804f          int64_t temp0_30 = __punpckhwd_mmxq_mmxd(st2, 0);
00658052          int64_t temp0_31 = __punpckhwd_mmxq_mmxd(st6, 0);
00658055          st4 = _m_pslldi(st4, 0x10);
00658059          st5 = _m_pslldi(st5, 8);
00658074          st0 = (((st0 | _m_pslldi(temp0_30, 0x10)) | _m_pslldi(temp0_31, 8)) | st1);
00658077          *(uint64_t*)edi = (((st3 | st4) | st5) | st1);
0065807a          edi[1] = st0;
0065807e          st6 = esi[1];
00658082          st7 = 0;
00658085          int32_t var_1c;
00658085          st0 = ((uint64_t)var_1c);
00658089          st2 = ((uint64_t)*(uint32_t*)((char*)temp0_6)[4]);
0065808d          st4 = ((uint64_t)*(uint32_t*)((char*)var_10_1)[4]);
00658091          uint16_t temp0_36[0x4] = _m_punpcklwd(st0, st0[0]);
00658094          st2 = _m_punpcklwd(st2, st2);
00658097          st4 = _m_punpcklwd(st4, st4);
0065809a          st0 = _m_paddsw(temp0_36, st6);
0065809d          int64_t temp0_40 = _m_paddsw(st2, st6);
006580a0          int64_t temp0_41 = _m_psubsw(st6, st4);
006580a3          st0 = _m_packuswb(st0, 0);
006580a6          st2 = _m_packuswb(temp0_40, 0);
006580a9          st6 = _m_packuswb(temp0_41, 0);
006580ac          st0 = _m_punpckhwd(st0, 0);
006580af          st2 = _m_punpckhwd(st2, 0);
006580b2          st6 = _m_punpckhwd(st6, 0);
006580be          st3 = _m_punpcklwd(st0, 0);
006580c1          st4 = _m_punpcklwd(st2, 0);
006580c4          st5 = _m_punpcklwd(st6, 0);
006580c7          st0 = __punpckhwd_mmxq_mmxd(st0, 0);
006580ca          int64_t temp0_52 = __punpckhwd_mmxq_mmxd(st2, 0);
006580cd          int64_t temp0_53 = __punpckhwd_mmxq_mmxd(st6, 0);
006580d0          st4 = _m_pslldi(st4, 0x10);
006580d4          st5 = _m_pslldi(st5, 8);
006580ef          st0 = (((st0 | _m_pslldi(temp0_52, 0x10)) | _m_pslldi(temp0_53, 8)) | st1);
006580f2          edi[2] = (((st3 | st4) | st5) | st1);
006580f6          edi[3] = st0;
006580fe          st1 = result[1];
00658102          st2 = data_833108;
00658109          st3 = data_833110;
00658110          uint16_t temp0_58[0x4] = _m_psllwi(ebx[1], 4);
00658114          uint16_t temp0_59[0x4] = _m_psllwi(st1, 4);
00658118          st2 = _m_pmulhw(st2, temp0_58);
0065811b          st3 = _m_pmulhw(st3, temp0_59);
00658125          st5 = data_833128;
0065812c          int64_t temp0_62 = _m_psubw(st2, data_833130);
0065812f          int64_t temp0_63 = _m_psubw(st3, st5);
00658139          uint16_t temp0_64[0x4] = _m_psrlwi(temp0_58, 4);
0065813d          uint16_t temp0_65[0x4] = _m_psrlwi(temp0_59, 4);
00658155          int64_t temp0_68 = _m_paddw(_m_pmullw((*(uint64_t*)data_833120), temp0_64), _m_pmullw(data_833118, temp0_65));
00658158          st6 = esi[0x10];
00658166          st7 = 0;
00658169          st2 = _m_psrawi(__psubw_mmxq_memq(temp0_68, data_833138), 8);
0065816d          st1 = data_833140;
00658174          int64_t var_10_2 = st2;
00658178          st0 = ((uint64_t)temp0_62);
0065817b          st2 = ((uint64_t)temp0_63);
0065817f          st4 = ((uint64_t)var_10_2);
00658183          uint16_t temp0_71[0x4] = _m_punpcklwd(st0, st0[0]);
00658186          st2 = _m_punpcklwd(st2, st2);
00658189          st4 = _m_punpcklwd(st4, st4);
0065818c          st0 = _m_paddsw(temp0_71, st6);
0065818f          int64_t temp0_75 = _m_paddsw(st2, st6);
00658192          int64_t temp0_76 = _m_psubsw(st6, st4);
00658195          st0 = _m_packuswb(st0, 0);
00658198          st2 = _m_packuswb(temp0_75, 0);
0065819b          st6 = _m_packuswb(temp0_76, 0);
0065819e          st0 = _m_punpckhwd(st0, 0);
006581a1          st2 = _m_punpckhwd(st2, 0);
006581a4          st6 = _m_punpckhwd(st6, 0);
006581b0          st3 = _m_punpcklwd(st0, 0);
006581b3          st4 = _m_punpcklwd(st2, 0);
006581b6          st5 = _m_punpcklwd(st6, 0);
006581b9          st0 = __punpckhwd_mmxq_mmxd(st0, 0);
006581bc          int64_t temp0_87 = __punpckhwd_mmxq_mmxd(st2, 0);
006581bf          int64_t temp0_88 = __punpckhwd_mmxq_mmxd(st6, 0);
006581c2          st4 = _m_pslldi(st4, 0x10);
006581c6          st5 = _m_pslldi(st5, 8);
006581e1          st0 = (((st0 | _m_pslldi(temp0_87, 0x10)) | _m_pslldi(temp0_88, 8)) | st1);
006581e4          edi[4] = (((st3 | st4) | st5) | st1);
006581e8          edi[5] = st0;
006581ec          st6 = esi[0x11];
006581f3          st7 = 0;
006581f6          st0 = ((uint64_t)var_1c);
006581fa          st2 = ((uint64_t)*(uint32_t*)((char*)temp0_63)[4]);
006581fe          st4 = ((uint64_t)*(uint32_t*)((char*)var_10_2)[4]);
00658202          uint16_t temp0_93[0x4] = _m_punpcklwd(st0, st0[0]);
00658205          st2 = _m_punpcklwd(st2, st2);
00658208          st4 = _m_punpcklwd(st4, st4);
0065820b          st0 = _m_paddsw(temp0_93, st6);
0065820e          int64_t temp0_97 = _m_paddsw(st2, st6);
00658211          int64_t temp0_98 = _m_psubsw(st6, st4);
00658214          st0 = _m_packuswb(st0, 0);
00658217          st2 = _m_packuswb(temp0_97, 0);
0065821a          st6 = _m_packuswb(temp0_98, 0);
0065821d          st0 = _m_punpckhwd(st0, 0);
00658220          st2 = _m_punpckhwd(st2, 0);
00658223          st6 = _m_punpckhwd(st6, 0);
0065822f          st3 = _m_punpcklwd(st0, 0);
00658232          st4 = _m_punpcklwd(st2, 0);
00658235          st5 = _m_punpcklwd(st6, 0);
00658238          st0 = __punpckhwd_mmxq_mmxd(st0, 0);
0065823b          int64_t temp0_109 = __punpckhwd_mmxq_mmxd(st2, 0);
0065823e          int64_t temp0_110 = __punpckhwd_mmxq_mmxd(st6, 0);
00658241          st4 = _m_pslldi(st4, 0x10);
00658245          st5 = _m_pslldi(st5, 8);
00658260          st0 = (((st0 | _m_pslldi(temp0_109, 0x10)) | _m_pslldi(temp0_110, 8)) | st1);
00658263          edi[6] = (((st3 | st4) | st5) | st1);
00658267          edi[7] = st0;
0065826b          esi = &esi[2];
0065826e          result = &result[2];
00658271          ebx = &ebx[2];
00658274          edi += arg5;
00658277          i = i_1;
00658277          i_1 -= 1;
00658278      } while (i != 1);
00658285      return result;
00657f70  }

00658286                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.

00658290  int64_t* _own_ycbcra_fpx_4224_to_rgba_fpx_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

00658290  {
0065829c      int64_t* esi = arg1;
0065829f      int64_t* result = arg2;
006582a2      int64_t* ebx = arg3;
006582a5      void* edi = arg4;
006582a8      int32_t i_1 = 8;
00658642      int32_t i;
00658642      
00658642      do
00658642      {
006582b6          uint16_t st1[0x4] = *(uint64_t*)result;
006582b9          int64_t st2 = data_833108;
006582c0          int64_t st3 = data_833110;
006582c7          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
006582cb          uint16_t temp0_2[0x4] = _m_psllwi(st1, 4);
006582cf          st2 = _m_pmulhw(st2, temp0_1);
006582d2          st3 = _m_pmulhw(st3, temp0_2);
006582dc          int64_t st5 = data_833128;
006582e3          int64_t temp0_5 = _m_psubw(st2, data_833130);
006582e6          int64_t temp0_6 = _m_psubw(st3, st5);
006582f0          uint16_t temp0_7[0x4] = _m_psrlwi(temp0_1, 4);
006582f4          uint16_t temp0_8[0x4] = _m_psrlwi(temp0_2, 4);
0065830c          int64_t temp0_11 = _m_paddw(_m_pmullw((*(uint64_t*)data_833120), temp0_7), _m_pmullw(data_833118, temp0_8));
0065830f          int64_t st6 = *(uint64_t*)esi;
0065831c          st2 = _m_psrawi(__psubw_mmxq_memq(temp0_11, data_833138), 8);
00658320          st1 = data_833148;
00658327          int64_t var_10_1 = st2;
0065832b          uint16_t st0[0x4] = ((uint64_t)temp0_5);
0065832e          st2 = ((uint64_t)temp0_6);
00658332          int64_t st4 = ((uint64_t)var_10_1);
00658336          uint16_t temp0_14[0x4] = _m_punpcklwd(st0, st0[0]);
00658339          st2 = _m_punpcklwd(st2, st2);
0065833c          st4 = _m_punpcklwd(st4, st4);
0065833f          st0 = _m_paddsw(temp0_14, st6);
00658342          int64_t temp0_18 = _m_paddsw(st2, st6);
00658345          int64_t temp0_19 = _m_psubsw(st6, st4);
00658348          st0 = _m_packuswb(st0, 0);
0065834b          st2 = _m_packuswb(temp0_18, 0);
0065834e          st6 = _m_packuswb(temp0_19, 0);
00658351          st0 = _m_punpckhwd(st0, 0);
00658354          st2 = _m_punpckhwd(st2, 0);
00658357          st6 = _m_punpckhwd(st6, 0);
0065835a          st3 = st1;
0065835d          st5 = st1;
00658360          st4 = esi[0x40];
00658367          st1 = _m_psubw(st1, st0);
0065836a          int64_t temp0_27 = _m_psubw(st3, st2);
0065836d          int64_t temp0_28 = _m_psubw(st5, st6);
00658379          uint16_t temp0_29[0x4] = _m_punpcklwd(st1, 0);
0065837c          st3 = _m_punpcklwd(temp0_27, 0);
0065837f          st5 = _m_punpcklwd(temp0_28, 0);
00658382          st0 = __punpckhwd_mmxq_mmxd(st1, 0);
00658385          int64_t temp0_33 = __punpckhwd_mmxq_mmxd(temp0_27, 0);
00658388          int64_t temp0_34 = __punpckhwd_mmxq_mmxd(temp0_28, 0);
0065838b          st3 = _m_pslldi(st3, 0x10);
0065838f          st5 = _m_pslldi(st5, 8);
006583a7          st0 = ((st0 | _m_pslldi(temp0_33, 0x10)) | _m_pslldi(temp0_34, 8));
006583aa          uint16_t temp0_39[0x4] = _m_punpcklwd(0, st4);
006583ad          int64_t temp0_40 = __punpckhwd_mmxq_mmxd(0, st4);
006583b0          uint16_t st7[0x4] = _m_pslldi(temp0_39, 8);
006583bb          st0 |= _m_pslldi(temp0_40, 8);
006583be          *(uint64_t*)edi = (((temp0_29 | st3) | st5) | st7);
006583c1          *(uint64_t*)((char*)edi + 8) = st0;
006583c5          st6 = esi[1];
006583cc          st1 = data_833148;
006583d3          int32_t var_1c;
006583d3          st0 = ((uint64_t)var_1c);
006583d7          st2 = ((uint64_t)*(uint32_t*)((char*)temp0_6)[4]);
006583db          st4 = ((uint64_t)*(uint32_t*)((char*)var_10_1)[4]);
006583df          uint16_t temp0_43[0x4] = _m_punpcklwd(st0, st0[0]);
006583e2          st2 = _m_punpcklwd(st2, st2);
006583e5          st4 = _m_punpcklwd(st4, st4);
006583e8          st0 = _m_paddsw(temp0_43, st6);
006583eb          int64_t temp0_47 = _m_paddsw(st2, st6);
006583ee          int64_t temp0_48 = _m_psubsw(st6, st4);
006583f1          st0 = _m_packuswb(st0, 0);
006583f4          st2 = _m_packuswb(temp0_47, 0);
006583f7          st6 = _m_packuswb(temp0_48, 0);
006583fa          st0 = _m_punpckhwd(st0, 0);
006583fd          st2 = _m_punpckhwd(st2, 0);
00658400          st6 = _m_punpckhwd(st6, 0);
00658403          st3 = st1;
00658406          st5 = st1;
00658409          st4 = esi[0x41];
00658410          st1 = _m_psubw(st1, st0);
00658413          int64_t temp0_56 = _m_psubw(st3, st2);
00658416          int64_t temp0_57 = _m_psubw(st5, st6);
00658422          uint16_t temp0_58[0x4] = _m_punpcklwd(st1, 0);
00658425          st3 = _m_punpcklwd(temp0_56, 0);
00658428          st5 = _m_punpcklwd(temp0_57, 0);
0065842b          st0 = __punpckhwd_mmxq_mmxd(st1, 0);
0065842e          int64_t temp0_62 = __punpckhwd_mmxq_mmxd(temp0_56, 0);
00658431          int64_t temp0_63 = __punpckhwd_mmxq_mmxd(temp0_57, 0);
00658434          st3 = _m_pslldi(st3, 0x10);
00658438          st5 = _m_pslldi(st5, 8);
00658450          st0 = ((st0 | _m_pslldi(temp0_62, 0x10)) | _m_pslldi(temp0_63, 8));
00658453          uint16_t temp0_68[0x4] = _m_punpcklwd(0, st4);
00658456          int64_t temp0_69 = __punpckhwd_mmxq_mmxd(0, st4);
00658459          st7 = _m_pslldi(temp0_68, 8);
00658464          st0 |= _m_pslldi(temp0_69, 8);
00658467          *(uint64_t*)((char*)edi + 0x10) = (((temp0_58 | st3) | st5) | st7);
0065846b          *(uint64_t*)((char*)edi + 0x18) = st0;
0065846f          st2 = data_833108;
00658476          st3 = data_833110;
00658481          st1 = result[1];
00658485          uint16_t temp0_72[0x4] = _m_psllwi(ebx[1], 4);
00658489          uint16_t temp0_73[0x4] = _m_psllwi(st1, 4);
0065848d          st2 = _m_pmulhw(st2, temp0_72);
00658490          st3 = _m_pmulhw(st3, temp0_73);
0065849a          st5 = data_833128;
006584a1          int64_t temp0_76 = _m_psubw(st2, data_833130);
006584a4          int64_t temp0_77 = _m_psubw(st3, st5);
006584ae          uint16_t temp0_78[0x4] = _m_psrlwi(temp0_72, 4);
006584b2          uint16_t temp0_79[0x4] = _m_psrlwi(temp0_73, 4);
006584ca          int64_t temp0_82 = _m_paddw(_m_pmullw((*(uint64_t*)data_833120), temp0_78), _m_pmullw(data_833118, temp0_79));
006584cd          st6 = esi[0x10];
006584de          st2 = _m_psrawi(__psubw_mmxq_memq(temp0_82, data_833138), 8);
006584e2          st1 = data_833148;
006584e9          int64_t var_10_2 = st2;
006584ed          st0 = ((uint64_t)temp0_76);
006584f0          st2 = ((uint64_t)temp0_77);
006584f4          st4 = ((uint64_t)var_10_2);
006584f8          uint16_t temp0_85[0x4] = _m_punpcklwd(st0, st0[0]);
006584fb          st2 = _m_punpcklwd(st2, st2);
006584fe          st4 = _m_punpcklwd(st4, st4);
00658501          st0 = _m_paddsw(temp0_85, st6);
00658504          int64_t temp0_89 = _m_paddsw(st2, st6);
00658507          int64_t temp0_90 = _m_psubsw(st6, st4);
0065850a          st0 = _m_packuswb(st0, 0);
0065850d          st2 = _m_packuswb(temp0_89, 0);
00658510          st6 = _m_packuswb(temp0_90, 0);
00658513          st0 = _m_punpckhwd(st0, 0);
00658516          st2 = _m_punpckhwd(st2, 0);
00658519          st6 = _m_punpckhwd(st6, 0);
0065851c          st3 = st1;
0065851f          st5 = st1;
00658522          st4 = esi[0x50];
00658529          st1 = _m_psubw(st1, st0);
0065852c          int64_t temp0_98 = _m_psubw(st3, st2);
0065852f          int64_t temp0_99 = _m_psubw(st5, st6);
0065853b          uint16_t temp0_100[0x4] = _m_punpcklwd(st1, 0);
0065853e          st3 = _m_punpcklwd(temp0_98, 0);
00658541          st5 = _m_punpcklwd(temp0_99, 0);
00658544          st0 = __punpckhwd_mmxq_mmxd(st1, 0);
00658547          int64_t temp0_104 = __punpckhwd_mmxq_mmxd(temp0_98, 0);
0065854a          int64_t temp0_105 = __punpckhwd_mmxq_mmxd(temp0_99, 0);
0065854d          st3 = _m_pslldi(st3, 0x10);
00658551          st5 = _m_pslldi(st5, 8);
00658569          st0 = ((st0 | _m_pslldi(temp0_104, 0x10)) | _m_pslldi(temp0_105, 8));
0065856c          uint16_t temp0_110[0x4] = _m_punpcklwd(0, st4);
0065856f          int64_t temp0_111 = __punpckhwd_mmxq_mmxd(0, st4);
00658572          st7 = _m_pslldi(temp0_110, 8);
0065857d          st0 |= _m_pslldi(temp0_111, 8);
00658580          *(uint64_t*)((char*)edi + 0x20) = (((temp0_100 | st3) | st5) | st7);
00658584          *(uint64_t*)((char*)edi + 0x28) = st0;
00658588          st6 = esi[0x11];
00658592          st1 = data_833148;
00658599          st0 = ((uint64_t)var_1c);
0065859d          st2 = ((uint64_t)*(uint32_t*)((char*)temp0_77)[4]);
006585a1          st4 = ((uint64_t)*(uint32_t*)((char*)var_10_2)[4]);
006585a5          uint16_t temp0_114[0x4] = _m_punpcklwd(st0, st0[0]);
006585a8          st2 = _m_punpcklwd(st2, st2);
006585ab          st4 = _m_punpcklwd(st4, st4);
006585ae          st0 = _m_paddsw(temp0_114, st6);
006585b1          int64_t temp0_118 = _m_paddsw(st2, st6);
006585b4          int64_t temp0_119 = _m_psubsw(st6, st4);
006585b7          st0 = _m_packuswb(st0, 0);
006585ba          st2 = _m_packuswb(temp0_118, 0);
006585bd          st6 = _m_packuswb(temp0_119, 0);
006585c0          st0 = _m_punpckhwd(st0, 0);
006585c3          st2 = _m_punpckhwd(st2, 0);
006585c6          st6 = _m_punpckhwd(st6, 0);
006585c9          st3 = st1;
006585cc          st5 = st1;
006585cf          st4 = esi[0x51];
006585d6          st1 = _m_psubw(st1, st0);
006585d9          int64_t temp0_127 = _m_psubw(st3, st2);
006585dc          int64_t temp0_128 = _m_psubw(st5, st6);
006585e8          uint16_t temp0_129[0x4] = _m_punpcklwd(st1, 0);
006585eb          st3 = _m_punpcklwd(temp0_127, 0);
006585ee          st5 = _m_punpcklwd(temp0_128, 0);
006585f1          st0 = __punpckhwd_mmxq_mmxd(st1, 0);
006585f4          int64_t temp0_133 = __punpckhwd_mmxq_mmxd(temp0_127, 0);
006585f7          int64_t temp0_134 = __punpckhwd_mmxq_mmxd(temp0_128, 0);
006585fa          st3 = _m_pslldi(st3, 0x10);
006585fe          st5 = _m_pslldi(st5, 8);
00658616          st0 = ((st0 | _m_pslldi(temp0_133, 0x10)) | _m_pslldi(temp0_134, 8));
00658619          uint16_t temp0_139[0x4] = _m_punpcklwd(0, st4);
0065861c          int64_t temp0_140 = __punpckhwd_mmxq_mmxd(0, st4);
0065861f          st7 = _m_pslldi(temp0_139, 8);
0065862a          st0 |= _m_pslldi(temp0_140, 8);
0065862d          esi = &esi[2];
00658630          result = &result[2];
00658633          ebx = &ebx[2];
00658636          *(uint64_t*)((char*)edi + 0x30) = (((temp0_129 | st3) | st5) | st7);
0065863a          *(uint64_t*)((char*)edi + 0x38) = st0;
0065863e          edi += arg5;
00658641          i = i_1;
00658641          i_1 -= 1;
00658642      } while (i != 1);
0065864f      return result;
00658290  }


00658650  int64_t* _own_ycbcr_411_to_rgb_one_half_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

00658650  {
0065865c      int64_t* esi = arg1;
0065865f      int64_t* result = arg2;
00658662      int64_t* ebx = arg3;
00658665      uint16_t (* edi)[0x4] = arg4;
0065866e      int32_t i_1 = 4;
00658c1a      int32_t i;
00658c1a      
00658c1a      do
00658c1a      {
00658676          uint16_t st1[0x4] = *(uint64_t*)result;
00658679          int64_t st4 = data_833098;
00658680          int64_t st3 = data_833090;
00658687          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
0065868b          uint16_t temp0_2[0x4] = _m_psllwi(st1, 4);
00658692          int64_t st0 = data_8330a0;
00658699          st4 = _m_pmulhw(st4, temp0_2);
0065869c          st3 = _m_pmulhw(st3, temp0_1);
0065869f          uint16_t temp0_5[0x4] = _m_punpcklwd(temp0_1, temp0_2[0]);
006586a2          uint16_t st2[0x4] = __punpckhwd_mmxq_mmxd(temp0_1, temp0_2[0]);
006586a5          int64_t temp0_7 = __psubw_mmxq_memq(st4, data_8330b8);
006586ac          int64_t temp0_8 = __psubw_mmxq_memq(st3, data_8330c0);
006586b3          uint16_t st5[0x4] = _m_pmaddwd(temp0_5, st0);
006586b6          st2 = _m_pmaddwd(st2, st0);
006586bf          st5 = __psubd_mmxq_memq(st5, data_8330c8);
006586c6          st2 = __psubd_mmxq_memq(st2, data_8330c8);
006586cd          int64_t st6 = _m_punpcklwd(temp0_7, temp0_7);
006586d0          int64_t st7 = _m_punpcklwd(temp0_8, temp0_8);
006586d3          st5 = _m_psradi(st5, 0xc);
006586d7          st2 = _m_psradi(st2, 0xc);
006586db          int64_t temp0_17 = __punpckhwd_mmxq_mmxd(temp0_7, temp0_7);
006586de          int64_t temp0_18 = __punpckhwd_mmxq_mmxd(temp0_8, temp0_8);
006586e1          int64_t var_30_1 = st6;
006586e5          int64_t var_40_1 = st7;
006586e8          st5 = _m_packssdw(st5, st5);
006586eb          st2 = _m_packssdw(st2, st2);
006586f6          uint16_t temp0_21[0x4] = _m_punpcklwd(st5, st5[0]);
006586f9          uint16_t temp0_22[0x4] = _m_punpcklwd(st2, st2[0]);
006586fc          st0 = *(uint64_t*)esi;
0065870a          int64_t temp0_23 = _m_paddsw(st7, st0);
0065870d          int64_t temp0_24 = _m_paddsw(st6, st0);
00658710          int64_t temp0_25 = _m_psubsw(st0, temp0_21);
00658713          st7 = _m_packuswb(temp0_23, 0);
00658716          st6 = _m_packuswb(temp0_24, 0);
00658719          st0 = _m_packuswb(temp0_25, 0);
0065871c          st7 = _m_punpckhwd(st7, 0);
0065871f          st6 = _m_punpckhwd(st6, 0);
00658722          st0 = _m_punpckhwd(st0, 0);
0065872e          st5 = _m_psrlqi(st7, 8);
00658732          st2 = _m_psllqi(st6, 8);
00658751          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
00658758          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00658761          st1 = _m_psllqi(st7, 0x10);
0065876c          uint64_t temp0_37 = _m_psrlqi(_m_psllqi(st0, 0x20), 0x10);
00658770          st1 = ((st1 | st7) & data_833100);
00658777          st5 = _m_psrlqi(st0, 0x20);
00658786          *(uint64_t*)edi = (st1 | temp0_37);
00658789          st0 = esi[1];
00658794          st2 = _m_paddsw(temp0_17, st0);
00658797          st1 = _m_paddsw(temp0_18, st0);
0065879a          int64_t temp0_41 = _m_psubsw(st0, temp0_22);
0065879d          st2 = _m_packuswb(st2, 0);
006587a0          st1 = _m_packuswb(st1, 0);
006587a3          st0 = _m_packuswb(temp0_41, 0);
006587a6          st2 = _m_punpckhwd(st2, 0);
006587a9          st1 = _m_punpckhwd(st1, 0);
006587ac          st0 = _m_punpckhwd(st0, 0);
006587b8          uint64_t temp0_48 = _m_psllqi(st2, 8);
006587bc          uint64_t temp0_49 = _m_psrlqi(st1, 8);
006587c0          uint64_t temp0_50 = _m_psllqi(st0, 8);
006587cd          st0 = ((st0 | temp0_48) & data_8330f0);
006587e9          st2 = (_m_psllqi(((st2 | temp0_49) & data_8330f8), 0x10) | ((st1 | temp0_50) & data_8330f8));
006587f0          st6 = st2;
006587f3          st0 |= _m_psrlqi(st0, 0x10);
006587f6          st2 = _m_psllqi(st2, 0x20);
00658801          uint64_t temp0_55 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00658805          st0 &= data_833100;
0065880c          edi[1] = (st5 | st2);
00658813          edi[2] = (temp0_55 | st0);
00658817          void* edi_1 = ((char*)edi + arg5);
0065881a          st0 = esi[2];
00658829          int64_t temp0_56 = _m_paddsw(var_40_1, st0);
0065882c          int64_t temp0_57 = _m_paddsw(var_30_1, st0);
0065882f          int64_t temp0_58 = _m_psubsw(st0, temp0_21);
00658832          st7 = _m_packuswb(temp0_56, 0);
00658835          st6 = _m_packuswb(temp0_57, 0);
00658838          st0 = _m_packuswb(temp0_58, 0);
0065883b          st7 = _m_punpckhwd(st7, 0);
0065883e          st6 = _m_punpckhwd(st6, 0);
00658841          st0 = _m_punpckhwd(st0, 0);
0065884d          st5 = _m_psrlqi(st7, 8);
00658851          st2 = _m_psllqi(st6, 8);
00658870          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
00658877          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00658880          st1 = _m_psllqi(st7, 0x10);
0065888b          uint64_t temp0_70 = _m_psrlqi(_m_psllqi(st0, 0x20), 0x10);
0065888f          st1 = ((st1 | st7) & data_833100);
00658896          st5 = _m_psrlqi(st0, 0x20);
006588a5          *(uint64_t*)edi_1 = (st1 | temp0_70);
006588a8          st0 = esi[3];
006588b3          st2 = _m_paddsw(temp0_17, st0);
006588b6          st1 = _m_paddsw(temp0_18, st0);
006588b9          int64_t temp0_74 = _m_psubsw(st0, temp0_22);
006588bc          st2 = _m_packuswb(st2, 0);
006588bf          st1 = _m_packuswb(st1, 0);
006588c2          st0 = _m_packuswb(temp0_74, 0);
006588c5          st2 = _m_punpckhwd(st2, 0);
006588c8          st1 = _m_punpckhwd(st1, 0);
006588cb          st0 = _m_punpckhwd(st0, 0);
006588d7          uint64_t temp0_81 = _m_psllqi(st2, 8);
006588db          uint64_t temp0_82 = _m_psrlqi(st1, 8);
006588df          uint64_t temp0_83 = _m_psllqi(st0, 8);
006588ec          st0 = ((st0 | temp0_81) & data_8330f0);
00658908          st2 = (_m_psllqi(((st2 | temp0_82) & data_8330f8), 0x10) | ((st1 | temp0_83) & data_8330f8));
0065890f          st6 = st2;
00658912          st0 |= _m_psrlqi(st0, 0x10);
00658915          st2 = _m_psllqi(st2, 0x20);
00658920          uint64_t temp0_88 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00658924          st0 &= data_833100;
0065892b          *(uint64_t*)((char*)edi_1 + 8) = (st5 | st2);
00658932          *(uint64_t*)((char*)edi_1 + 0x10) = (temp0_88 | st0);
00658936          void* edi_2 = ((char*)edi_1 - arg5);
0065893d          st1 = result[1];
00658941          st4 = data_833098;
00658948          st3 = data_833090;
0065894f          uint16_t temp0_89[0x4] = _m_psllwi(ebx[1], 4);
00658953          uint16_t temp0_90[0x4] = _m_psllwi(st1, 4);
0065895a          st0 = data_8330a0;
00658961          st4 = _m_pmulhw(st4, temp0_90);
00658964          st3 = _m_pmulhw(st3, temp0_89);
00658967          uint16_t temp0_93[0x4] = _m_punpcklwd(temp0_89, temp0_90[0]);
0065896a          st2 = __punpckhwd_mmxq_mmxd(temp0_89, temp0_90[0]);
0065896d          int64_t temp0_95 = __psubw_mmxq_memq(st4, data_8330b8);
00658974          int64_t temp0_96 = __psubw_mmxq_memq(st3, data_8330c0);
0065897b          st5 = _m_pmaddwd(temp0_93, st0);
0065897e          st2 = _m_pmaddwd(st2, st0);
00658987          st5 = __psubd_mmxq_memq(st5, data_8330c8);
0065898e          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00658995          st6 = _m_punpcklwd(temp0_95, temp0_95);
00658998          st7 = _m_punpcklwd(temp0_96, temp0_96);
0065899b          st5 = _m_psradi(st5, 0xc);
0065899f          st2 = _m_psradi(st2, 0xc);
006589a3          int64_t temp0_105 = __punpckhwd_mmxq_mmxd(temp0_95, temp0_95);
006589a6          int64_t temp0_106 = __punpckhwd_mmxq_mmxd(temp0_96, temp0_96);
006589a9          int64_t var_30_2 = st6;
006589ad          int64_t var_40_2 = st7;
006589b0          st5 = _m_packssdw(st5, st5);
006589b3          st2 = _m_packssdw(st2, st2);
006589be          uint16_t temp0_109[0x4] = _m_punpcklwd(st5, st5[0]);
006589c1          uint16_t temp0_110[0x4] = _m_punpcklwd(st2, st2[0]);
006589c4          st0 = esi[0x10];
006589d6          int64_t temp0_111 = _m_paddsw(st7, st0);
006589d9          int64_t temp0_112 = _m_paddsw(st6, st0);
006589dc          int64_t temp0_113 = _m_psubsw(st0, temp0_109);
006589df          st7 = _m_packuswb(temp0_111, 0);
006589e2          st6 = _m_packuswb(temp0_112, 0);
006589e5          st0 = _m_packuswb(temp0_113, 0);
006589e8          st7 = _m_punpckhwd(st7, 0);
006589eb          st6 = _m_punpckhwd(st6, 0);
006589ee          st0 = _m_punpckhwd(st0, 0);
006589fa          st5 = _m_psrlqi(st7, 8);
006589fe          st2 = _m_psllqi(st6, 8);
00658a1d          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
00658a24          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00658a2d          st1 = _m_psllqi(st7, 0x10);
00658a38          uint64_t temp0_125 = _m_psrlqi(_m_psllqi(st0, 0x20), 0x10);
00658a3c          st1 = ((st1 | st7) & data_833100);
00658a43          st5 = _m_psrlqi(st0, 0x20);
00658a52          *(uint64_t*)((char*)edi_2 + 0x18) = (st1 | temp0_125);
00658a56          st0 = esi[0x11];
00658a64          st2 = _m_paddsw(temp0_105, st0);
00658a67          st1 = _m_paddsw(temp0_106, st0);
00658a6a          int64_t temp0_129 = _m_psubsw(st0, temp0_110);
00658a6d          st2 = _m_packuswb(st2, 0);
00658a70          st1 = _m_packuswb(st1, 0);
00658a73          st0 = _m_packuswb(temp0_129, 0);
00658a76          st2 = _m_punpckhwd(st2, 0);
00658a79          st1 = _m_punpckhwd(st1, 0);
00658a7c          st0 = _m_punpckhwd(st0, 0);
00658a88          uint64_t temp0_136 = _m_psllqi(st2, 8);
00658a8c          uint64_t temp0_137 = _m_psrlqi(st1, 8);
00658a90          uint64_t temp0_138 = _m_psllqi(st0, 8);
00658a9d          st0 = ((st0 | temp0_136) & data_8330f0);
00658ab9          st2 = (_m_psllqi(((st2 | temp0_137) & data_8330f8), 0x10) | ((st1 | temp0_138) & data_8330f8));
00658ac0          st6 = st2;
00658ac3          st0 |= _m_psrlqi(st0, 0x10);
00658ac6          st2 = _m_psllqi(st2, 0x20);
00658ad1          uint64_t temp0_143 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00658ad5          st0 &= data_833100;
00658adc          *(uint64_t*)((char*)edi_2 + 0x20) = (st5 | st2);
00658ae3          *(uint64_t*)((char*)edi_2 + 0x28) = (temp0_143 | st0);
00658ae7          result = &result[2];
00658aea          ebx = &ebx[2];
00658aed          void* edi_3 = ((char*)edi_2 + arg5);
00658af0          st0 = esi[0x12];
00658b02          int64_t temp0_144 = _m_paddsw(var_40_2, st0);
00658b05          int64_t temp0_145 = _m_paddsw(var_30_2, st0);
00658b08          int64_t temp0_146 = _m_psubsw(st0, temp0_109);
00658b0b          st7 = _m_packuswb(temp0_144, 0);
00658b0e          st6 = _m_packuswb(temp0_145, 0);
00658b11          st0 = _m_packuswb(temp0_146, 0);
00658b14          st7 = _m_punpckhwd(st7, 0);
00658b17          st6 = _m_punpckhwd(st6, 0);
00658b1a          st0 = _m_punpckhwd(st0, 0);
00658b26          st5 = _m_psrlqi(st7, 8);
00658b2a          st2 = _m_psllqi(st6, 8);
00658b49          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
00658b50          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00658b59          st1 = _m_psllqi(st7, 0x10);
00658b64          uint64_t temp0_158 = _m_psrlqi(_m_psllqi(st0, 0x20), 0x10);
00658b68          st1 = ((st1 | st7) & data_833100);
00658b6f          st5 = _m_psrlqi(st0, 0x20);
00658b7e          *(uint64_t*)((char*)edi_3 + 0x18) = (st1 | temp0_158);
00658b82          st0 = esi[0x13];
00658b90          st2 = _m_paddsw(temp0_105, st0);
00658b93          st1 = _m_paddsw(temp0_106, st0);
00658b96          int64_t temp0_162 = _m_psubsw(st0, temp0_110);
00658b99          st2 = _m_packuswb(st2, 0);
00658b9c          st1 = _m_packuswb(st1, 0);
00658b9f          st0 = _m_packuswb(temp0_162, 0);
00658ba2          st2 = _m_punpckhwd(st2, 0);
00658ba5          st1 = _m_punpckhwd(st1, 0);
00658ba8          st0 = _m_punpckhwd(st0, 0);
00658bb4          uint64_t temp0_169 = _m_psllqi(st2, 8);
00658bb8          uint64_t temp0_170 = _m_psrlqi(st1, 8);
00658bbc          uint64_t temp0_171 = _m_psllqi(st0, 8);
00658bc9          st0 = ((st0 | temp0_169) & data_8330f0);
00658be5          st2 = (_m_psllqi(((st2 | temp0_170) & data_8330f8), 0x10) | ((st1 | temp0_171) & data_8330f8));
00658bec          st6 = st2;
00658bef          st0 |= _m_psrlqi(st0, 0x10);
00658bf2          st2 = _m_psllqi(st2, 0x20);
00658bfd          uint64_t temp0_176 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00658c01          st0 &= data_833100;
00658c08          *(uint64_t*)((char*)edi_3 + 0x20) = (st5 | st2);
00658c0f          *(uint64_t*)((char*)edi_3 + 0x28) = (temp0_176 | st0);
00658c13          esi = &esi[4];
00658c16          edi = ((char*)edi_3 + arg5);
00658c19          i = i_1;
00658c19          i_1 -= 1;
00658c1a      } while (i != 1);
00658c27      return result;
00658650  }

00658c28                          8d a4 24 00 00 00 00 90                                                          ..$.....

00658c30  int64_t* _own_ycbcr_411_to_bgr_one_half_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, uint16_t (* arg4)[0x4], int32_t arg5)

00658c30  {
00658c3c      int64_t* esi = arg1;
00658c3f      int64_t* result = arg2;
00658c42      int64_t* ebx = arg3;
00658c45      uint16_t (* edi)[0x4] = arg4;
00658c4e      int32_t i_1 = 4;
006591fa      int32_t i;
006591fa      
006591fa      do
006591fa      {
00658c56          uint16_t st1[0x4] = *(uint64_t*)result;
00658c59          int64_t st4 = data_833098;
00658c60          int64_t st3 = data_833090;
00658c67          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
00658c6b          uint16_t temp0_2[0x4] = _m_psllwi(st1, 4);
00658c72          int64_t st0 = data_8330a0;
00658c79          st4 = _m_pmulhw(st4, temp0_2);
00658c7c          st3 = _m_pmulhw(st3, temp0_1);
00658c7f          uint16_t temp0_5[0x4] = _m_punpcklwd(temp0_1, temp0_2[0]);
00658c82          uint16_t st2[0x4] = __punpckhwd_mmxq_mmxd(temp0_1, temp0_2[0]);
00658c85          int64_t temp0_7 = __psubw_mmxq_memq(st4, data_8330b8);
00658c8c          int64_t temp0_8 = __psubw_mmxq_memq(st3, data_8330c0);
00658c93          uint16_t st5[0x4] = _m_pmaddwd(temp0_5, st0);
00658c96          st2 = _m_pmaddwd(st2, st0);
00658c9f          int64_t st7 = _m_punpcklwd(temp0_7, temp0_7);
00658ca2          int64_t st6 = _m_punpcklwd(temp0_8, temp0_8);
00658ca5          int64_t temp0_13 = __punpckhwd_mmxq_mmxd(temp0_7, temp0_7);
00658ca8          int64_t temp0_14 = __punpckhwd_mmxq_mmxd(temp0_8, temp0_8);
00658cab          st5 = __psubd_mmxq_memq(st5, data_8330c8);
00658cb2          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00658cb9          st5 = _m_psradi(st5, 0xc);
00658cbd          st2 = _m_psradi(st2, 0xc);
00658cc1          st5 = _m_packssdw(st5, st5);
00658cc4          int64_t var_30_1 = st7;
00658cc8          st2 = _m_packssdw(st2, st2);
00658ccb          int64_t var_40_1 = st6;
00658cce          uint16_t temp0_21[0x4] = _m_punpcklwd(st5, st5[0]);
00658cd5          uint16_t temp0_22[0x4] = _m_punpcklwd(st2, st2[0]);
00658ce0          st0 = *(uint64_t*)esi;
00658cea          int64_t temp0_23 = _m_paddsw(st7, st0);
00658ced          int64_t temp0_24 = _m_paddsw(st6, st0);
00658cf0          int64_t temp0_25 = _m_psubsw(st0, temp0_21);
00658cf3          st7 = _m_packuswb(temp0_23, 0);
00658cf6          st6 = _m_packuswb(temp0_24, 0);
00658cf9          st0 = _m_packuswb(temp0_25, 0);
00658cfc          st7 = _m_punpckhwd(st7, 0);
00658cff          st6 = _m_punpckhwd(st6, 0);
00658d02          st0 = _m_punpckhwd(st0, 0);
00658d0e          st5 = _m_psrlqi(st7, 8);
00658d12          st2 = _m_psllqi(st6, 8);
00658d2a          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
00658d3b          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00658d45          st1 = (_m_psllqi(st7, 0x10) | st7);
00658d48          uint64_t temp0_36 = _m_psllqi(st0, 0x20);
00658d4c          st1 &= data_833100;
00658d53          uint64_t temp0_37 = _m_psrlqi(temp0_36, 0x10);
00658d57          st5 = _m_psrlqi(st0, 0x20);
00658d62          *(uint64_t*)edi = (st1 | temp0_37);
00658d69          st0 = esi[1];
00658d74          st2 = _m_paddw(temp0_14, st0);
00658d77          st1 = _m_paddw(temp0_13, st0);
00658d7a          int64_t temp0_41 = _m_psubw(st0, temp0_22);
00658d7d          st2 = _m_packuswb(st2, 0);
00658d80          st1 = _m_packuswb(st1, 0);
00658d83          st0 = _m_packuswb(temp0_41, 0);
00658d86          st2 = _m_punpckhwd(st2, 0);
00658d89          st1 = _m_punpckhwd(st1, 0);
00658d8c          st0 = _m_punpckhwd(st0, 0);
00658d98          uint64_t temp0_48 = _m_psrlqi(st1, 8);
00658d9c          uint64_t temp0_49 = _m_psllqi(st0, 8);
00658dbb          st0 = ((st0 | _m_psllqi(st2, 8)) & data_8330f0);
00658dc9          st2 = (_m_psllqi(((st2 | temp0_48) & data_8330f8), 0x10) | ((st1 | temp0_49) & data_8330f8));
00658dcc          uint64_t temp0_52 = _m_psrlqi(st0, 0x10);
00658dd0          st6 = st2;
00658dd3          st2 = _m_psllqi(st2, 0x20);
00658de1          uint64_t temp0_55 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00658de5          st0 = ((st0 | temp0_52) & data_833100);
00658dec          edi[1] = (st5 | st2);
00658df3          edi[2] = (temp0_55 | st0);
00658df7          void* edi_1 = ((char*)edi + arg5);
00658dfa          st0 = esi[2];
00658e09          int64_t temp0_56 = _m_paddsw(var_30_1, st0);
00658e0c          int64_t temp0_57 = _m_paddsw(var_40_1, st0);
00658e0f          int64_t temp0_58 = _m_psubsw(st0, temp0_21);
00658e12          st7 = _m_packuswb(temp0_56, 0);
00658e15          st6 = _m_packuswb(temp0_57, 0);
00658e18          st0 = _m_packuswb(temp0_58, 0);
00658e1b          st7 = _m_punpckhwd(st7, 0);
00658e1e          st6 = _m_punpckhwd(st6, 0);
00658e21          st0 = _m_punpckhwd(st0, 0);
00658e2d          st5 = _m_psrlqi(st7, 8);
00658e31          st2 = _m_psllqi(st6, 8);
00658e49          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
00658e5a          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00658e64          st1 = (_m_psllqi(st7, 0x10) | st7);
00658e67          uint64_t temp0_69 = _m_psllqi(st0, 0x20);
00658e6b          st1 &= data_833100;
00658e72          uint64_t temp0_70 = _m_psrlqi(temp0_69, 0x10);
00658e76          st5 = _m_psrlqi(st0, 0x20);
00658e81          *(uint64_t*)edi_1 = (st1 | temp0_70);
00658e88          st0 = esi[3];
00658e93          st2 = _m_paddw(temp0_14, st0);
00658e96          st1 = _m_paddw(temp0_13, st0);
00658e99          int64_t temp0_74 = _m_psubw(st0, temp0_22);
00658e9c          st2 = _m_packuswb(st2, 0);
00658e9f          st1 = _m_packuswb(st1, 0);
00658ea2          st0 = _m_packuswb(temp0_74, 0);
00658ea5          st2 = _m_punpckhwd(st2, 0);
00658ea8          st1 = _m_punpckhwd(st1, 0);
00658eab          st0 = _m_punpckhwd(st0, 0);
00658eb7          uint64_t temp0_81 = _m_psrlqi(st1, 8);
00658ebb          uint64_t temp0_82 = _m_psllqi(st0, 8);
00658eda          st0 = ((st0 | _m_psllqi(st2, 8)) & data_8330f0);
00658ee8          st2 = (_m_psllqi(((st2 | temp0_81) & data_8330f8), 0x10) | ((st1 | temp0_82) & data_8330f8));
00658eeb          uint64_t temp0_85 = _m_psrlqi(st0, 0x10);
00658eef          st6 = st2;
00658ef2          st2 = _m_psllqi(st2, 0x20);
00658f00          uint64_t temp0_88 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
00658f04          st0 = ((st0 | temp0_85) & data_833100);
00658f0b          *(uint64_t*)((char*)edi_1 + 8) = (st5 | st2);
00658f12          *(uint64_t*)((char*)edi_1 + 0x10) = (temp0_88 | st0);
00658f16          void* edi_2 = ((char*)edi_1 - arg5);
00658f1d          st1 = result[1];
00658f21          st4 = data_833098;
00658f28          st3 = data_833090;
00658f2f          uint16_t temp0_89[0x4] = _m_psllwi(ebx[1], 4);
00658f33          uint16_t temp0_90[0x4] = _m_psllwi(st1, 4);
00658f3a          st0 = data_8330a0;
00658f41          st4 = _m_pmulhw(st4, temp0_90);
00658f44          st3 = _m_pmulhw(st3, temp0_89);
00658f47          uint16_t temp0_93[0x4] = _m_punpcklwd(temp0_89, temp0_90[0]);
00658f4a          st2 = __punpckhwd_mmxq_mmxd(temp0_89, temp0_90[0]);
00658f4d          int64_t temp0_95 = __psubw_mmxq_memq(st4, data_8330b8);
00658f54          int64_t temp0_96 = __psubw_mmxq_memq(st3, data_8330c0);
00658f5b          st5 = _m_pmaddwd(temp0_93, st0);
00658f5e          st2 = _m_pmaddwd(st2, st0);
00658f67          st7 = _m_punpcklwd(temp0_95, temp0_95);
00658f6a          st6 = _m_punpcklwd(temp0_96, temp0_96);
00658f6d          int64_t temp0_101 = __punpckhwd_mmxq_mmxd(temp0_95, temp0_95);
00658f70          int64_t temp0_102 = __punpckhwd_mmxq_mmxd(temp0_96, temp0_96);
00658f73          st5 = __psubd_mmxq_memq(st5, data_8330c8);
00658f7a          st2 = __psubd_mmxq_memq(st2, data_8330c8);
00658f81          st5 = _m_psradi(st5, 0xc);
00658f85          st2 = _m_psradi(st2, 0xc);
00658f89          st5 = _m_packssdw(st5, st5);
00658f8c          int64_t var_30_2 = st7;
00658f90          st2 = _m_packssdw(st2, st2);
00658f93          int64_t var_40_2 = st6;
00658f96          uint16_t temp0_109[0x4] = _m_punpcklwd(st5, st5[0]);
00658f9d          uint16_t temp0_110[0x4] = _m_punpcklwd(st2, st2[0]);
00658fa8          st0 = esi[0x10];
00658fb6          int64_t temp0_111 = _m_paddsw(st7, st0);
00658fb9          int64_t temp0_112 = _m_paddsw(st6, st0);
00658fbc          int64_t temp0_113 = _m_psubsw(st0, temp0_109);
00658fbf          st7 = _m_packuswb(temp0_111, 0);
00658fc2          st6 = _m_packuswb(temp0_112, 0);
00658fc5          st0 = _m_packuswb(temp0_113, 0);
00658fc8          st7 = _m_punpckhwd(st7, 0);
00658fcb          st6 = _m_punpckhwd(st6, 0);
00658fce          st0 = _m_punpckhwd(st0, 0);
00658fda          st5 = _m_psrlqi(st7, 8);
00658fde          st2 = _m_psllqi(st6, 8);
00658ff6          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
00659007          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
00659011          st1 = (_m_psllqi(st7, 0x10) | st7);
00659014          uint64_t temp0_124 = _m_psllqi(st0, 0x20);
00659018          st1 &= data_833100;
0065901f          uint64_t temp0_125 = _m_psrlqi(temp0_124, 0x10);
00659023          st5 = _m_psrlqi(st0, 0x20);
0065902e          *(uint64_t*)((char*)edi_2 + 0x18) = (st1 | temp0_125);
00659036          st0 = esi[0x11];
00659044          st2 = _m_paddw(temp0_102, st0);
00659047          st1 = _m_paddw(temp0_101, st0);
0065904a          int64_t temp0_129 = _m_psubw(st0, temp0_110);
0065904d          st2 = _m_packuswb(st2, 0);
00659050          st1 = _m_packuswb(st1, 0);
00659053          st0 = _m_packuswb(temp0_129, 0);
00659056          st2 = _m_punpckhwd(st2, 0);
00659059          st1 = _m_punpckhwd(st1, 0);
0065905c          st0 = _m_punpckhwd(st0, 0);
00659068          uint64_t temp0_136 = _m_psrlqi(st1, 8);
0065906c          uint64_t temp0_137 = _m_psllqi(st0, 8);
0065908b          st0 = ((st0 | _m_psllqi(st2, 8)) & data_8330f0);
00659099          st2 = (_m_psllqi(((st2 | temp0_136) & data_8330f8), 0x10) | ((st1 | temp0_137) & data_8330f8));
0065909c          uint64_t temp0_140 = _m_psrlqi(st0, 0x10);
006590a0          st6 = st2;
006590a3          st2 = _m_psllqi(st2, 0x20);
006590b1          uint64_t temp0_143 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
006590b5          st0 = ((st0 | temp0_140) & data_833100);
006590bc          *(uint64_t*)((char*)edi_2 + 0x20) = (st5 | st2);
006590c3          result = &result[2];
006590c6          ebx = &ebx[2];
006590c9          *(uint64_t*)((char*)edi_2 + 0x28) = (temp0_143 | st0);
006590cd          st0 = esi[0x12];
006590d4          void* edi_3 = ((char*)edi_2 + arg5);
006590e2          int64_t temp0_144 = _m_paddsw(var_30_2, st0);
006590e5          int64_t temp0_145 = _m_paddsw(var_40_2, st0);
006590e8          int64_t temp0_146 = _m_psubsw(st0, temp0_109);
006590eb          st7 = _m_packuswb(temp0_144, 0);
006590ee          st6 = _m_packuswb(temp0_145, 0);
006590f1          st0 = _m_packuswb(temp0_146, 0);
006590f4          st7 = _m_punpckhwd(st7, 0);
006590f7          st6 = _m_punpckhwd(st6, 0);
006590fa          st0 = _m_punpckhwd(st0, 0);
00659106          st5 = _m_psrlqi(st7, 8);
0065910a          st2 = _m_psllqi(st6, 8);
00659122          st7 = ((st7 | _m_psllqi(st0, 8)) & data_8330f8);
00659133          st0 = (((st0 | st2) & data_8330f0) | ((st6 | st5) & data_8330f8));
0065913d          st1 = (_m_psllqi(st7, 0x10) | st7);
00659140          uint64_t temp0_157 = _m_psllqi(st0, 0x20);
00659144          st1 &= data_833100;
0065914b          uint64_t temp0_158 = _m_psrlqi(temp0_157, 0x10);
0065914f          st5 = _m_psrlqi(st0, 0x20);
0065915a          *(uint64_t*)((char*)edi_3 + 0x18) = (st1 | temp0_158);
00659162          st0 = esi[0x13];
00659170          st2 = _m_paddw(temp0_102, st0);
00659173          st1 = _m_paddw(temp0_101, st0);
00659176          int64_t temp0_162 = _m_psubw(st0, temp0_110);
00659179          st2 = _m_packuswb(st2, 0);
0065917c          st1 = _m_packuswb(st1, 0);
0065917f          st0 = _m_packuswb(temp0_162, 0);
00659182          st2 = _m_punpckhwd(st2, 0);
00659185          st1 = _m_punpckhwd(st1, 0);
00659188          st0 = _m_punpckhwd(st0, 0);
00659194          uint64_t temp0_169 = _m_psrlqi(st1, 8);
00659198          uint64_t temp0_170 = _m_psllqi(st0, 8);
006591b7          st0 = ((st0 | _m_psllqi(st2, 8)) & data_8330f0);
006591c5          st2 = (_m_psllqi(((st2 | temp0_169) & data_8330f8), 0x10) | ((st1 | temp0_170) & data_8330f8));
006591c8          uint64_t temp0_173 = _m_psrlqi(st0, 0x10);
006591cc          st6 = st2;
006591cf          st2 = _m_psllqi(st2, 0x20);
006591dd          uint64_t temp0_176 = _m_psllqi(_m_psrlqi(st6, 0x20), 0x10);
006591e1          st0 = ((st0 | temp0_173) & data_833100);
006591e8          *(uint64_t*)((char*)edi_3 + 0x20) = (st5 | st2);
006591ef          esi = &esi[4];
006591f2          *(uint64_t*)((char*)edi_3 + 0x28) = (temp0_176 | st0);
006591f6          edi = ((char*)edi_3 + arg5);
006591f9          i = i_1;
006591f9          i_1 -= 1;
006591fa      } while (i != 1);
00659207      return result;
00658c30  }

00659208                          8d a4 24 00 00 00 00 90                                                          ..$.....

00659210  void _own_ycbcr_411_to_rgba_fpx_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

00659210  {
0065921c      int32_t ecx = 8;
00659221      int64_t* esi = arg1;
00659224      int64_t* ebx = arg2;
00659227      int64_t* edx = arg3;
0065922a      void* edi = arg4;
0065922a      
00659233      while (true)
00659233      {
00659233          uint16_t st0[0x4] = *(uint64_t*)edx;
00659239          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
0065923d          int64_t st2 = data_833090;
00659244          int64_t st3 = data_833098;
0065924b          uint16_t temp0_2[0x4] = _m_psllwi(st0, 4);
0065924f          st3 = _m_pmulhw(st3, temp0_1);
00659252          st2 = _m_pmulhw(st2, temp0_2);
0065925f          int64_t st5 = data_8330b8;
00659266          int64_t temp0_5 = _m_psubw(st2, data_8330c0);
0065926f          int32_t var_38_1 = _m_psubw(st3, st5);
00659273          st3 = data_8330a8;
0065927a          st2 = (*(uint64_t*)data_8330b0);
00659281          uint16_t temp0_7[0x4] = _m_psrlwi(temp0_2, 4);
00659289          st3 = _m_pmullw(st3, _m_psrlwi(temp0_1, 4));
0065929d          int64_t var_30_1 = _m_psrawi(__psubw_mmxq_memq(_m_paddw(_m_pmullw(st2, temp0_7), st3), data_833138), 8);
006592a1          st0 = edx[1];
006592a9          uint16_t temp0_14[0x4] = _m_psllwi(ebx[1], 4);
006592ad          st2 = data_833090;
006592b4          st3 = data_833098;
006592bb          uint16_t temp0_15[0x4] = _m_psllwi(st0, 4);
006592bf          st3 = _m_pmulhw(st3, temp0_14);
006592c2          st2 = _m_pmulhw(st2, temp0_15);
006592c5          int64_t st6 = *(uint64_t*)esi;
006592cf          st5 = data_8330b8;
006592d6          int64_t temp0_18 = _m_psubw(st2, data_8330c0);
006592d9          int64_t temp0_19 = _m_psubw(st3, st5);
006592e4          st3 = data_8330a8;
006592eb          st2 = (*(uint64_t*)data_8330b0);
006592f2          uint16_t temp0_20[0x4] = _m_psrlwi(temp0_15, 4);
006592fa          st3 = _m_pmullw(st3, _m_psrlwi(temp0_14, 4));
0065930e          int64_t var_18_1 = _m_psrawi(__psubw_mmxq_memq(_m_paddw(_m_pmullw(st2, temp0_20), st3), data_833138), 8);
00659315          st0 = ((uint64_t)temp0_5);
00659318          uint16_t temp0_27[0x4] = _m_punpcklwd(st0, st0[0]);
0065931b          st2 = ((uint64_t)var_38_1);
0065931f          st2 = _m_punpcklwd(st2, st2);
00659322          int64_t st4 = ((uint64_t)var_30_1);
00659326          st4 = _m_punpcklwd(st4, st4);
00659329          st0 = _m_paddsw(temp0_27, st6);
0065932c          int64_t temp0_31 = _m_paddsw(st2, st6);
0065932f          int64_t temp0_32 = _m_psubsw(st6, st4);
00659332          st0 = _m_packuswb(st0, 0);
00659335          st2 = _m_packuswb(temp0_31, 0);
00659338          st6 = _m_packuswb(temp0_32, 0);
0065933b          st0 = _m_punpckhwd(st0, 0);
0065933e          st2 = _m_punpckhwd(st2, 0);
00659341          st6 = _m_punpckhwd(st6, 0);
0065936e          *(uint64_t*)edi = (((_m_punpcklwd(st0, 0) | _m_pslldi(_m_punpcklwd(st2, 0), 0x10)) | _m_psllwi(_m_punpcklwd(st6, 0), 8)) | data_833140);
00659395          *(uint64_t*)((char*)edi + 8) = (((__punpckhwd_mmxq_mmxd(st0, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(st2, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(st6, 0), 8)) | data_833140);
0065939c          st6 = esi[1];
006593a0          st0 = ((uint64_t)*(uint32_t*)((char*)temp0_5)[4]);
006593a4          uint16_t temp0_49[0x4] = _m_punpcklwd(st0, st0[0]);
006593a7          int32_t var_34;
006593a7          st2 = ((uint64_t)var_34);
006593ab          st2 = _m_punpcklwd(st2, st2);
006593ae          st4 = ((uint64_t)*(uint32_t*)((char*)var_30_1)[4]);
006593b2          st4 = _m_punpcklwd(st4, st4);
006593b5          st0 = _m_paddsw(temp0_49, st6);
006593b8          int64_t temp0_53 = _m_paddsw(st2, st6);
006593bb          int64_t temp0_54 = _m_psubsw(st6, st4);
006593be          st0 = _m_packuswb(st0, 0);
006593c1          st2 = _m_packuswb(temp0_53, 0);
006593c4          st6 = _m_packuswb(temp0_54, 0);
006593c7          st0 = _m_punpckhwd(st0, 0);
006593ca          st2 = _m_punpckhwd(st2, 0);
006593cd          st6 = _m_punpckhwd(st6, 0);
006593fa          *(uint64_t*)((char*)edi + 0x10) = (((_m_punpcklwd(st0, 0) | _m_pslldi(_m_punpcklwd(st2, 0), 0x10)) | _m_psllwi(_m_punpcklwd(st6, 0), 8)) | data_833140);
00659422          *(uint64_t*)((char*)edi + 0x18) = (((__punpckhwd_mmxq_mmxd(st0, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(st2, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(st6, 0), 8)) | data_833140);
00659429          st6 = esi[0x10];
00659430          st0 = ((uint64_t)temp0_18);
00659434          uint16_t temp0_71[0x4] = _m_punpcklwd(st0, st0[0]);
00659437          st2 = ((uint64_t)temp0_19);
0065943b          st2 = _m_punpcklwd(st2, st2);
0065943e          st4 = ((uint64_t)var_18_1);
00659442          st4 = _m_punpcklwd(st4, st4);
00659445          st0 = _m_paddsw(temp0_71, st6);
00659448          int64_t temp0_75 = _m_paddsw(st2, st6);
0065944b          int64_t temp0_76 = _m_psubsw(st6, st4);
0065944e          st0 = _m_packuswb(st0, 0);
00659451          st2 = _m_packuswb(temp0_75, 0);
00659454          st6 = _m_packuswb(temp0_76, 0);
00659457          st0 = _m_punpckhwd(st0, 0);
0065945a          st2 = _m_punpckhwd(st2, 0);
0065945d          st6 = _m_punpckhwd(st6, 0);
0065948a          *(uint64_t*)((char*)edi + 0x20) = (((_m_punpcklwd(st0, 0) | _m_pslldi(_m_punpcklwd(st2, 0), 0x10)) | _m_psllwi(_m_punpcklwd(st6, 0), 8)) | data_833140);
006594b2          *(uint64_t*)((char*)edi + 0x28) = (((__punpckhwd_mmxq_mmxd(st0, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(st2, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(st6, 0), 8)) | data_833140);
006594b9          st6 = esi[0x11];
006594c0          st0 = ((uint64_t)*(uint32_t*)((char*)temp0_18)[4]);
006594c4          uint16_t temp0_93[0x4] = _m_punpcklwd(st0, st0[0]);
006594c7          st2 = ((uint64_t)*(uint32_t*)((char*)temp0_19)[4]);
006594cb          st2 = _m_punpcklwd(st2, st2);
006594ce          st4 = ((uint64_t)*(uint32_t*)((char*)var_18_1)[4]);
006594d2          st4 = _m_punpcklwd(st4, st4);
006594d5          st0 = _m_paddsw(temp0_93, st6);
006594d8          int64_t temp0_97 = _m_paddsw(st2, st6);
006594db          int64_t temp0_98 = _m_psubsw(st6, st4);
006594de          st0 = _m_packuswb(st0, 0);
006594e1          st2 = _m_packuswb(temp0_97, 0);
006594e4          st6 = _m_packuswb(temp0_98, 0);
006594e7          st0 = _m_punpckhwd(st0, 0);
006594ea          st2 = _m_punpckhwd(st2, 0);
006594ed          st6 = _m_punpckhwd(st6, 0);
0065951a          *(uint64_t*)((char*)edi + 0x30) = (((_m_punpcklwd(st0, 0) | _m_pslldi(_m_punpcklwd(st2, 0), 0x10)) | _m_psllwi(_m_punpcklwd(st6, 0), 8)) | data_833140);
00659542          *(uint64_t*)((char*)edi + 0x38) = (((__punpckhwd_mmxq_mmxd(st0, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(st2, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(st6, 0), 8)) | data_833140);
00659546          void* edi_1 = ((char*)edi + arg5);
00659549          void* esi_1 = &esi[2];
0065954c          st6 = *(uint64_t*)esi_1;
0065954f          st0 = ((uint64_t)temp0_5);
00659555          uint16_t temp0_115[0x4] = _m_punpcklwd(st0, st0[0]);
00659558          st2 = ((uint64_t)var_38_1);
0065955c          st2 = _m_punpcklwd(st2, st2);
0065955f          st4 = ((uint64_t)var_30_1);
00659563          st4 = _m_punpcklwd(st4, st4);
00659566          st0 = _m_paddsw(temp0_115, st6);
00659569          int64_t temp0_119 = _m_paddsw(st2, st6);
0065956c          int64_t temp0_120 = _m_psubsw(st6, st4);
0065956f          st0 = _m_packuswb(st0, 0);
00659572          st2 = _m_packuswb(temp0_119, 0);
00659575          st6 = _m_packuswb(temp0_120, 0);
00659578          st0 = _m_punpckhwd(st0, 0);
0065957b          st2 = _m_punpckhwd(st2, 0);
0065957e          st6 = _m_punpckhwd(st6, 0);
006595ab          *(uint64_t*)edi_1 = (((_m_punpcklwd(st0, 0) | _m_pslldi(_m_punpcklwd(st2, 0), 0x10)) | _m_psllwi(_m_punpcklwd(st6, 0), 8)) | data_833140);
006595d2          *(uint64_t*)((char*)edi_1 + 8) = (((__punpckhwd_mmxq_mmxd(st0, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(st2, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(st6, 0), 8)) | data_833140);
006595d9          st6 = *(uint64_t*)((char*)esi_1 + 8);
006595dd          st0 = ((uint64_t)*(uint32_t*)((char*)temp0_5)[4]);
006595e1          uint16_t temp0_137[0x4] = _m_punpcklwd(st0, st0[0]);
006595e4          st2 = ((uint64_t)var_34);
006595e8          st2 = _m_punpcklwd(st2, st2);
006595eb          st4 = ((uint64_t)*(uint32_t*)((char*)var_30_1)[4]);
006595ef          st4 = _m_punpcklwd(st4, st4);
006595f2          st0 = _m_paddsw(temp0_137, st6);
006595f5          int64_t temp0_141 = _m_paddsw(st2, st6);
006595f8          int64_t temp0_142 = _m_psubsw(st6, st4);
006595fb          st0 = _m_packuswb(st0, 0);
006595fe          st2 = _m_packuswb(temp0_141, 0);
00659601          st6 = _m_packuswb(temp0_142, 0);
00659604          st0 = _m_punpckhwd(st0, 0);
00659607          st2 = _m_punpckhwd(st2, 0);
0065960a          st6 = _m_punpckhwd(st6, 0);
00659637          *(uint64_t*)((char*)edi_1 + 0x10) = (((_m_punpcklwd(st0, 0) | _m_pslldi(_m_punpcklwd(st2, 0), 0x10)) | _m_psllwi(_m_punpcklwd(st6, 0), 8)) | data_833140);
0065965f          *(uint64_t*)((char*)edi_1 + 0x18) = (((__punpckhwd_mmxq_mmxd(st0, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(st2, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(st6, 0), 8)) | data_833140);
00659666          st6 = *(uint64_t*)((char*)esi_1 + 0x80);
0065966d          st0 = ((uint64_t)temp0_18);
00659671          uint16_t temp0_159[0x4] = _m_punpcklwd(st0, st0[0]);
00659674          st2 = ((uint64_t)temp0_19);
00659678          st2 = _m_punpcklwd(st2, st2);
0065967b          st4 = ((uint64_t)var_18_1);
0065967f          st4 = _m_punpcklwd(st4, st4);
00659682          st0 = _m_paddsw(temp0_159, st6);
00659685          int64_t temp0_163 = _m_paddsw(st2, st6);
00659688          int64_t temp0_164 = _m_psubsw(st6, st4);
0065968b          st0 = _m_packuswb(st0, 0);
0065968e          st2 = _m_packuswb(temp0_163, 0);
00659691          st6 = _m_packuswb(temp0_164, 0);
00659694          st0 = _m_punpckhwd(st0, 0);
00659697          st2 = _m_punpckhwd(st2, 0);
0065969a          st6 = _m_punpckhwd(st6, 0);
006596c7          *(uint64_t*)((char*)edi_1 + 0x20) = (((_m_punpcklwd(st0, 0) | _m_pslldi(_m_punpcklwd(st2, 0), 0x10)) | _m_psllwi(_m_punpcklwd(st6, 0), 8)) | data_833140);
006596ef          *(uint64_t*)((char*)edi_1 + 0x28) = (((__punpckhwd_mmxq_mmxd(st0, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(st2, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(st6, 0), 8)) | data_833140);
006596f6          st6 = *(uint64_t*)((char*)esi_1 + 0x88);
006596fd          st0 = ((uint64_t)*(uint32_t*)((char*)temp0_18)[4]);
00659701          uint16_t temp0_181[0x4] = _m_punpcklwd(st0, st0[0]);
00659704          st2 = ((uint64_t)*(uint32_t*)((char*)temp0_19)[4]);
00659708          st2 = _m_punpcklwd(st2, st2);
0065970b          st4 = ((uint64_t)*(uint32_t*)((char*)var_18_1)[4]);
0065970f          st4 = _m_punpcklwd(st4, st4);
00659712          st0 = _m_paddsw(temp0_181, st6);
00659715          int64_t temp0_185 = _m_paddsw(st2, st6);
00659718          int64_t temp0_186 = _m_psubsw(st6, st4);
0065971b          st0 = _m_packuswb(st0, 0);
0065971e          st2 = _m_packuswb(temp0_185, 0);
00659721          st6 = _m_packuswb(temp0_186, 0);
00659724          st0 = _m_punpckhwd(st0, 0);
00659727          st2 = _m_punpckhwd(st2, 0);
0065972a          st6 = _m_punpckhwd(st6, 0);
00659757          *(uint64_t*)((char*)edi_1 + 0x30) = (((_m_punpcklwd(st0, 0) | _m_pslldi(_m_punpcklwd(st2, 0), 0x10)) | _m_psllwi(_m_punpcklwd(st6, 0), 8)) | data_833140);
0065977f          *(uint64_t*)((char*)edi_1 + 0x38) = (((__punpckhwd_mmxq_mmxd(st0, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(st2, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(st6, 0), 8)) | data_833140);
00659783          int32_t temp0_203 = ecx;
00659783          ecx -= 1;
00659783          
00659784          if (temp0_203 == 1)
00659784              break;
00659784          
00659789          if (ecx == 4)
0065978b              esi_1 += 0x80;
0065978b          
00659791          esi = ((char*)esi_1 + 0x10);
00659794          ebx = &ebx[2];
00659797          edx = &edx[2];
0065979a          edi = ((char*)edi_1 + arg5);
00659233      }
00659210  }

006597aa                                8d 9b 00 00 00 00                                                            ......

006597b0  void _own_ycbcra_fpx_4114_to_rgba_fpx_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, void* arg4, int32_t arg5)

006597b0  {
006597bc      int32_t ecx = 8;
006597c1      int64_t* esi = arg1;
006597c4      int64_t* ebx = arg2;
006597c7      int64_t* edx = arg3;
006597ca      void* edi = arg4;
006597ca      
006597d3      while (true)
006597d3      {
006597d3          uint16_t st0[0x4] = *(uint64_t*)edx;
006597d9          uint16_t temp0_1[0x4] = _m_psllwi(*(uint64_t*)ebx, 4);
006597dd          int64_t st2 = data_833090;
006597e4          int64_t st3 = data_833098;
006597eb          uint16_t temp0_2[0x4] = _m_psllwi(st0, 4);
006597ef          st3 = _m_pmulhw(st3, temp0_1);
006597f2          st2 = _m_pmulhw(st2, temp0_2);
006597ff          int64_t st5 = data_8330b8;
00659806          int64_t temp0_5 = _m_psubw(st2, data_8330c0);
0065980f          int32_t var_38_1 = _m_psubw(st3, st5);
00659813          st3 = data_8330a8;
0065981a          st2 = (*(uint64_t*)data_8330b0);
00659821          uint16_t temp0_7[0x4] = _m_psrlwi(temp0_2, 4);
00659829          st3 = _m_pmullw(st3, _m_psrlwi(temp0_1, 4));
0065983d          int64_t var_30_1 = _m_psrawi(__psubw_mmxq_memq(_m_paddw(_m_pmullw(st2, temp0_7), st3), data_833138), 8);
00659841          st0 = edx[1];
00659849          uint16_t temp0_14[0x4] = _m_psllwi(ebx[1], 4);
0065984d          st2 = data_833090;
00659854          st3 = data_833098;
0065985b          uint16_t temp0_15[0x4] = _m_psllwi(st0, 4);
0065985f          st3 = _m_pmulhw(st3, temp0_14);
00659862          st2 = _m_pmulhw(st2, temp0_15);
00659865          int64_t st6 = *(uint64_t*)esi;
0065986f          st5 = data_8330b8;
00659876          int64_t temp0_18 = _m_psubw(st2, data_8330c0);
00659879          int64_t temp0_19 = _m_psubw(st3, st5);
00659884          st3 = data_8330a8;
0065988b          st2 = (*(uint64_t*)data_8330b0);
00659892          uint16_t temp0_20[0x4] = _m_psrlwi(temp0_15, 4);
0065989a          st3 = _m_pmullw(st3, _m_psrlwi(temp0_14, 4));
006598ae          int64_t var_18_1 = _m_psrawi(__psubw_mmxq_memq(_m_paddw(_m_pmullw(st2, temp0_20), st3), data_833138), 8);
006598b5          st0 = ((uint64_t)temp0_5);
006598b8          uint16_t temp0_27[0x4] = _m_punpcklwd(st0, st0[0]);
006598bb          st2 = ((uint64_t)var_38_1);
006598bf          st2 = _m_punpcklwd(st2, st2);
006598c2          int64_t st4 = ((uint64_t)var_30_1);
006598c6          st4 = _m_punpcklwd(st4, st4);
006598c9          st0 = _m_paddsw(temp0_27, st6);
006598cc          int64_t temp0_31 = _m_paddsw(st2, st6);
006598cf          int64_t temp0_32 = _m_psubsw(st6, st4);
006598d2          st0 = _m_packuswb(st0, 0);
006598d5          st2 = _m_packuswb(temp0_31, 0);
006598d8          st6 = _m_packuswb(temp0_32, 0);
006598db          st0 = _m_punpckhwd(st0, 0);
006598de          st2 = _m_punpckhwd(st2, 0);
006598e1          st6 = _m_punpckhwd(st6, 0);
006598e4          uint16_t st1[0x4] = data_833148;
006598eb          st3 = st1;
006598ee          st5 = st1;
006598f1          st1 = _m_psubw(st1, st0);
006598f4          int64_t temp0_40 = _m_psubw(st3, st2);
006598f7          int64_t temp0_41 = _m_psubw(st5, st6);
006598fa          st4 = esi[0x60];
0065992b          *(uint64_t*)edi = (((_m_punpcklwd(st1, 0) | _m_pslldi(_m_punpcklwd(temp0_40, 0), 0x10)) | _m_psllwi(_m_punpcklwd(temp0_41, 0), 8)) | _m_pslldi(_m_punpcklwd(0, st4), 8));
00659952          *(uint64_t*)((char*)edi + 8) = (((__punpckhwd_mmxq_mmxd(st1, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(temp0_40, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(temp0_41, 0), 8)) | _m_psllwi(__punpckhwd_mmxq_mmxd(0, st4), 8));
00659959          st6 = esi[1];
0065995d          st0 = ((uint64_t)*(uint32_t*)((char*)temp0_5)[4]);
00659961          uint16_t temp0_56[0x4] = _m_punpcklwd(st0, st0[0]);
00659964          int32_t var_34;
00659964          st2 = ((uint64_t)var_34);
00659968          st2 = _m_punpcklwd(st2, st2);
0065996b          st4 = ((uint64_t)*(uint32_t*)((char*)var_30_1)[4]);
0065996f          st4 = _m_punpcklwd(st4, st4);
00659972          st0 = _m_paddsw(temp0_56, st6);
00659975          int64_t temp0_60 = _m_paddsw(st2, st6);
00659978          int64_t temp0_61 = _m_psubsw(st6, st4);
0065997b          st0 = _m_packuswb(st0, 0);
0065997e          st2 = _m_packuswb(temp0_60, 0);
00659981          st6 = _m_packuswb(temp0_61, 0);
00659984          st0 = _m_punpckhwd(st0, 0);
00659987          st2 = _m_punpckhwd(st2, 0);
0065998a          st6 = _m_punpckhwd(st6, 0);
0065998d          st1 = data_833148;
00659994          st3 = st1;
00659997          st5 = st1;
0065999a          st1 = _m_psubw(st1, st0);
0065999d          int64_t temp0_69 = _m_psubw(st3, st2);
006599a0          int64_t temp0_70 = _m_psubw(st5, st6);
006599a3          st4 = esi[0x61];
006599d4          *(uint64_t*)((char*)edi + 0x10) = (((_m_punpcklwd(st1, 0) | _m_pslldi(_m_punpcklwd(temp0_69, 0), 0x10)) | _m_psllwi(_m_punpcklwd(temp0_70, 0), 8)) | _m_pslldi(_m_punpcklwd(0, st4), 8));
006599fc          *(uint64_t*)((char*)edi + 0x18) = (((__punpckhwd_mmxq_mmxd(st1, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(temp0_69, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(temp0_70, 0), 8)) | _m_pslldi(__punpckhwd_mmxq_mmxd(0, st4), 8));
00659a03          st6 = esi[0x10];
00659a0a          st0 = ((uint64_t)temp0_18);
00659a0e          uint16_t temp0_85[0x4] = _m_punpcklwd(st0, st0[0]);
00659a11          st2 = ((uint64_t)temp0_19);
00659a15          st2 = _m_punpcklwd(st2, st2);
00659a18          st4 = ((uint64_t)var_18_1);
00659a1c          st4 = _m_punpcklwd(st4, st4);
00659a1f          st0 = _m_paddsw(temp0_85, st6);
00659a22          int64_t temp0_89 = _m_paddsw(st2, st6);
00659a25          int64_t temp0_90 = _m_psubsw(st6, st4);
00659a28          st0 = _m_packuswb(st0, 0);
00659a2b          st2 = _m_packuswb(temp0_89, 0);
00659a2e          st6 = _m_packuswb(temp0_90, 0);
00659a31          st0 = _m_punpckhwd(st0, 0);
00659a34          st2 = _m_punpckhwd(st2, 0);
00659a37          st6 = _m_punpckhwd(st6, 0);
00659a3a          st1 = data_833148;
00659a41          st3 = st1;
00659a44          st5 = st1;
00659a47          st1 = _m_psubw(st1, st0);
00659a4a          int64_t temp0_98 = _m_psubw(st3, st2);
00659a4d          int64_t temp0_99 = _m_psubw(st5, st6);
00659a50          st4 = esi[0x70];
00659a81          *(uint64_t*)((char*)edi + 0x20) = (((_m_punpcklwd(st1, 0) | _m_pslldi(_m_punpcklwd(temp0_98, 0), 0x10)) | _m_psllwi(_m_punpcklwd(temp0_99, 0), 8)) | _m_pslldi(_m_punpcklwd(0, st4), 8));
00659aa9          *(uint64_t*)((char*)edi + 0x28) = (((__punpckhwd_mmxq_mmxd(st1, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(temp0_98, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(temp0_99, 0), 8)) | _m_psllwi(__punpckhwd_mmxq_mmxd(0, st4), 8));
00659ab0          st6 = esi[0x11];
00659ab7          st0 = ((uint64_t)*(uint32_t*)((char*)temp0_18)[4]);
00659abb          uint16_t temp0_114[0x4] = _m_punpcklwd(st0, st0[0]);
00659abe          st2 = ((uint64_t)*(uint32_t*)((char*)temp0_19)[4]);
00659ac2          st2 = _m_punpcklwd(st2, st2);
00659ac5          st4 = ((uint64_t)*(uint32_t*)((char*)var_18_1)[4]);
00659ac9          st4 = _m_punpcklwd(st4, st4);
00659acc          st0 = _m_paddsw(temp0_114, st6);
00659acf          int64_t temp0_118 = _m_paddsw(st2, st6);
00659ad2          int64_t temp0_119 = _m_psubsw(st6, st4);
00659ad5          st0 = _m_packuswb(st0, 0);
00659ad8          st2 = _m_packuswb(temp0_118, 0);
00659adb          st6 = _m_packuswb(temp0_119, 0);
00659ade          st0 = _m_punpckhwd(st0, 0);
00659ae1          st2 = _m_punpckhwd(st2, 0);
00659ae4          st6 = _m_punpckhwd(st6, 0);
00659ae7          st1 = data_833148;
00659aee          st3 = st1;
00659af1          st5 = st1;
00659af4          st1 = _m_psubw(st1, st0);
00659af7          int64_t temp0_127 = _m_psubw(st3, st2);
00659afa          int64_t temp0_128 = _m_psubw(st5, st6);
00659afd          st4 = esi[0x71];
00659b2e          *(uint64_t*)((char*)edi + 0x30) = (((_m_punpcklwd(st1, 0) | _m_pslldi(_m_punpcklwd(temp0_127, 0), 0x10)) | _m_psllwi(_m_punpcklwd(temp0_128, 0), 8)) | _m_pslldi(_m_punpcklwd(0, st4), 8));
00659b56          *(uint64_t*)((char*)edi + 0x38) = (((__punpckhwd_mmxq_mmxd(st1, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(temp0_127, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(temp0_128, 0), 8)) | _m_psllwi(__punpckhwd_mmxq_mmxd(0, st4), 8));
00659b5a          void* edi_1 = ((char*)edi + arg5);
00659b5d          void* esi_1 = &esi[2];
00659b60          st6 = *(uint64_t*)esi_1;
00659b63          st0 = ((uint64_t)temp0_5);
00659b69          uint16_t temp0_143[0x4] = _m_punpcklwd(st0, st0[0]);
00659b6c          st2 = ((uint64_t)var_38_1);
00659b70          st2 = _m_punpcklwd(st2, st2);
00659b73          st4 = ((uint64_t)var_30_1);
00659b77          st4 = _m_punpcklwd(st4, st4);
00659b7a          st0 = _m_paddsw(temp0_143, st6);
00659b7d          int64_t temp0_147 = _m_paddsw(st2, st6);
00659b80          int64_t temp0_148 = _m_psubsw(st6, st4);
00659b83          st0 = _m_packuswb(st0, 0);
00659b86          st2 = _m_packuswb(temp0_147, 0);
00659b89          st6 = _m_packuswb(temp0_148, 0);
00659b8c          st0 = _m_punpckhwd(st0, 0);
00659b8f          st2 = _m_punpckhwd(st2, 0);
00659b92          st6 = _m_punpckhwd(st6, 0);
00659b95          st1 = data_833148;
00659b9c          st3 = st1;
00659b9f          st5 = st1;
00659ba2          st1 = _m_psubw(st1, st0);
00659ba5          int64_t temp0_156 = _m_psubw(st3, st2);
00659ba8          int64_t temp0_157 = _m_psubw(st5, st6);
00659bab          st4 = *(uint64_t*)((char*)esi_1 + 0x300);
00659bdc          *(uint64_t*)edi_1 = (((_m_punpcklwd(st1, 0) | _m_pslldi(_m_punpcklwd(temp0_156, 0), 0x10)) | _m_psllwi(_m_punpcklwd(temp0_157, 0), 8)) | _m_pslldi(_m_punpcklwd(0, st4), 8));
00659c03          *(uint64_t*)((char*)edi_1 + 8) = (((__punpckhwd_mmxq_mmxd(st1, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(temp0_156, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(temp0_157, 0), 8)) | _m_psllwi(__punpckhwd_mmxq_mmxd(0, st4), 8));
00659c0a          st6 = *(uint64_t*)((char*)esi_1 + 8);
00659c0e          st0 = ((uint64_t)*(uint32_t*)((char*)temp0_5)[4]);
00659c12          uint16_t temp0_172[0x4] = _m_punpcklwd(st0, st0[0]);
00659c15          st2 = ((uint64_t)var_34);
00659c19          st2 = _m_punpcklwd(st2, st2);
00659c1c          st4 = ((uint64_t)*(uint32_t*)((char*)var_30_1)[4]);
00659c20          st4 = _m_punpcklwd(st4, st4);
00659c23          st0 = _m_paddsw(temp0_172, st6);
00659c26          int64_t temp0_176 = _m_paddsw(st2, st6);
00659c29          int64_t temp0_177 = _m_psubsw(st6, st4);
00659c2c          st0 = _m_packuswb(st0, 0);
00659c2f          st2 = _m_packuswb(temp0_176, 0);
00659c32          st6 = _m_packuswb(temp0_177, 0);
00659c35          st0 = _m_punpckhwd(st0, 0);
00659c38          st2 = _m_punpckhwd(st2, 0);
00659c3b          st6 = _m_punpckhwd(st6, 0);
00659c3e          st1 = data_833148;
00659c45          st3 = st1;
00659c48          st5 = st1;
00659c4b          st1 = _m_psubw(st1, st0);
00659c4e          int64_t temp0_185 = _m_psubw(st3, st2);
00659c51          int64_t temp0_186 = _m_psubw(st5, st6);
00659c54          st4 = *(uint64_t*)((char*)esi_1 + 0x308);
00659c85          *(uint64_t*)((char*)edi_1 + 0x10) = (((_m_punpcklwd(st1, 0) | _m_pslldi(_m_punpcklwd(temp0_185, 0), 0x10)) | _m_psllwi(_m_punpcklwd(temp0_186, 0), 8)) | _m_pslldi(_m_punpcklwd(0, st4), 8));
00659cad          *(uint64_t*)((char*)edi_1 + 0x18) = (((__punpckhwd_mmxq_mmxd(st1, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(temp0_185, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(temp0_186, 0), 8)) | _m_psllwi(__punpckhwd_mmxq_mmxd(0, st4), 8));
00659cb4          st6 = *(uint64_t*)((char*)esi_1 + 0x80);
00659cbb          st0 = ((uint64_t)temp0_18);
00659cbf          uint16_t temp0_201[0x4] = _m_punpcklwd(st0, st0[0]);
00659cc2          st2 = ((uint64_t)temp0_19);
00659cc6          st2 = _m_punpcklwd(st2, st2);
00659cc9          st4 = ((uint64_t)var_18_1);
00659ccd          st4 = _m_punpcklwd(st4, st4);
00659cd0          st0 = _m_paddsw(temp0_201, st6);
00659cd3          int64_t temp0_205 = _m_paddsw(st2, st6);
00659cd6          int64_t temp0_206 = _m_psubsw(st6, st4);
00659cd9          st0 = _m_packuswb(st0, 0);
00659cdc          st2 = _m_packuswb(temp0_205, 0);
00659cdf          st6 = _m_packuswb(temp0_206, 0);
00659ce2          st0 = _m_punpckhwd(st0, 0);
00659ce5          st2 = _m_punpckhwd(st2, 0);
00659ce8          st6 = _m_punpckhwd(st6, 0);
00659ceb          st1 = data_833148;
00659cf2          st3 = st1;
00659cf5          st5 = st1;
00659cf8          st1 = _m_psubw(st1, st0);
00659cfb          int64_t temp0_214 = _m_psubw(st3, st2);
00659cfe          int64_t temp0_215 = _m_psubw(st5, st6);
00659d01          st4 = *(uint64_t*)((char*)esi_1 + 0x380);
00659d32          *(uint64_t*)((char*)edi_1 + 0x20) = (((_m_punpcklwd(st1, 0) | _m_pslldi(_m_punpcklwd(temp0_214, 0), 0x10)) | _m_psllwi(_m_punpcklwd(temp0_215, 0), 8)) | _m_pslldi(_m_punpcklwd(0, st4), 8));
00659d5a          *(uint64_t*)((char*)edi_1 + 0x28) = (((__punpckhwd_mmxq_mmxd(st1, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(temp0_214, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(temp0_215, 0), 8)) | _m_psllwi(__punpckhwd_mmxq_mmxd(0, st4), 8));
00659d61          st6 = *(uint64_t*)((char*)esi_1 + 0x88);
00659d68          st0 = ((uint64_t)*(uint32_t*)((char*)temp0_18)[4]);
00659d6c          uint16_t temp0_230[0x4] = _m_punpcklwd(st0, st0[0]);
00659d6f          st2 = ((uint64_t)*(uint32_t*)((char*)temp0_19)[4]);
00659d73          st2 = _m_punpcklwd(st2, st2);
00659d76          st4 = ((uint64_t)*(uint32_t*)((char*)var_18_1)[4]);
00659d7a          st4 = _m_punpcklwd(st4, st4);
00659d7d          st0 = _m_paddsw(temp0_230, st6);
00659d80          int64_t temp0_234 = _m_paddsw(st2, st6);
00659d83          int64_t temp0_235 = _m_psubsw(st6, st4);
00659d86          st0 = _m_packuswb(st0, 0);
00659d89          st2 = _m_packuswb(temp0_234, 0);
00659d8c          st6 = _m_packuswb(temp0_235, 0);
00659d8f          st0 = _m_punpckhwd(st0, 0);
00659d92          st2 = _m_punpckhwd(st2, 0);
00659d95          st6 = _m_punpckhwd(st6, 0);
00659d98          st1 = data_833148;
00659d9f          st3 = st1;
00659da2          st5 = st1;
00659da5          st1 = _m_psubw(st1, st0);
00659da8          int64_t temp0_243 = _m_psubw(st3, st2);
00659dab          int64_t temp0_244 = _m_psubw(st5, st6);
00659dae          st4 = *(uint64_t*)((char*)esi_1 + 0x388);
00659ddf          *(uint64_t*)((char*)edi_1 + 0x30) = (((_m_punpcklwd(st1, 0) | _m_pslldi(_m_punpcklwd(temp0_243, 0), 0x10)) | _m_psllwi(_m_punpcklwd(temp0_244, 0), 8)) | _m_pslldi(_m_punpcklwd(0, st4), 8));
00659e07          *(uint64_t*)((char*)edi_1 + 0x38) = (((__punpckhwd_mmxq_mmxd(st1, 0) | _m_pslldi(__punpckhwd_mmxq_mmxd(temp0_243, 0), 0x10)) | _m_psllwi(__punpckhwd_mmxq_mmxd(temp0_244, 0), 8)) | _m_psllwi(__punpckhwd_mmxq_mmxd(0, st4), 8));
00659e0b          int32_t temp0_259 = ecx;
00659e0b          ecx -= 1;
00659e0b          
00659e0c          if (temp0_259 == 1)
00659e0c              break;
00659e0c          
00659e11          if (ecx == 4)
00659e13              esi_1 += 0x80;
00659e13          
00659e19          esi = ((char*)esi_1 + 0x10);
00659e1c          ebx = &ebx[2];
00659e1f          edx = &edx[2];
00659e22          edi = ((char*)edi_1 + arg5);
006597d3      }
006597b0  }

00659e32                                                        8d a4 24 00 00 00 00 8d a4 24 00 00 00 00                    ..$......$....

00659e40  int64_t* _own_ycbcr_422_to_ycbycr_full_mcu_m5(int64_t* arg1, int64_t* arg2, int64_t* arg3, int16_t (* arg4)[0x4], int32_t arg5)

00659e40  {
00659e49      int64_t* esi = arg1;
00659e4c      int64_t* result = arg2;
00659e4f      int64_t* ebx = arg3;
00659e52      int16_t (* edi)[0x4] = arg4;
00659e58      int32_t i_1 = 8;
00659edd      int32_t i;
00659edd      
00659edd      do
00659edd      {
00659e5d          int16_t st0[0x4] = *(uint64_t*)esi;
00659e60          int16_t st1[0x4] = esi[1];
00659e64          uint16_t st2[0x4] = *(uint64_t*)result;
00659e67          int32_t st3 = ((int32_t)*(uint64_t*)ebx);
00659e6a          int64_t st6 = st0;
00659e6d          int64_t st5 = st1;
00659e73          uint16_t temp0_1[0x4] = _m_punpcklwd(st2, st3);
00659e76          int64_t temp0_2 = __punpckhwd_mmxq_mmxd(st2, st3);
00659e79          st0 = _m_punpcklwd(st0, temp0_1[0]);
00659e7c          int64_t temp0_4 = __punpckhwd_mmxq_mmxd(st6, temp0_1[0]);
00659e7f          st1 = _m_punpcklwd(st1, temp0_2);
00659e82          int64_t temp0_6 = __punpckhwd_mmxq_mmxd(st5, temp0_2);
00659e85          int16_t temp0_7[0x4] = _m_packuswb(st0, temp0_4);
00659e88          int16_t temp0_8[0x4] = _m_packuswb(st1, temp0_6);
00659e8b          *(uint64_t*)edi = temp0_7;
00659e8e          edi[1] = temp0_8;
00659e92          st0 = esi[0x10];
00659e99          st1 = esi[0x11];
00659ea0          st2 = result[1];
00659ea4          st3 = ((int32_t)ebx[1]);
00659ea8          st6 = st0;
00659eab          st5 = st1;
00659eb1          uint16_t temp0_9[0x4] = _m_punpcklwd(st2, st3);
00659eb4          int64_t temp0_10 = __punpckhwd_mmxq_mmxd(st2, st3);
00659eb7          st0 = _m_punpcklwd(st0, temp0_9[0]);
00659eba          int64_t temp0_12 = __punpckhwd_mmxq_mmxd(st6, temp0_9[0]);
00659ebd          st1 = _m_punpcklwd(st1, temp0_10);
00659ec0          int64_t temp0_14 = __punpckhwd_mmxq_mmxd(st5, temp0_10);
00659ec3          int16_t temp0_15[0x4] = _m_packuswb(st0, temp0_12);
00659ec6          int16_t temp0_16[0x4] = _m_packuswb(st1, temp0_14);
00659ec9          edi[2] = temp0_15;
00659ecd          edi[3] = temp0_16;
00659ed1          esi = &esi[2];
00659ed4          result = &result[2];
00659ed7          ebx = &ebx[2];
00659eda          edi += arg5;
00659edc          i = i_1;
00659edc          i_1 -= 1;
00659edd      } while (i != 1);
00659eea      return result;
00659e40  }

00659eeb                                   cc cc cc cc cc                                                             .....

00659ef0  void __stdcall IError::ReportGenericError(char const* arg1, ...)

00659ef0  {
00659f03      Logger::LogVAList(sev_Error, 0, arg1, &arg_8);
00659ef0  }

00659f0c                                      cc cc cc cc                                                              ....

00659f10  void __stdcall IError::ReportDataError(char const* arg1, ...)

00659f10  {
00659f23      Logger::LogVAList(sev_Error, 0, arg1, &arg_8);
00659f10  }

00659f2c                                      cc cc cc cc                                                              ....

00659f30  void IError::DefaultAllIErrorCategoriesToProvidedHandler(class Logger::ILoggingOutputHandler* arg1)

00659f30  {
00659f3c      Logger::AddCategoryHandler(0, arg1);
00659f49      Logger::AddCategoryHandler(0, arg1);
00659f56      Logger::AddCategoryHandler(0, arg1);
00659f62      Logger::AddCategoryHandler(0, arg1);
00659f30  }

00659f6c                                      cc cc cc cc                                                              ....

00659f70  void IError::ReportDataError(class PStringBase<char> const* arg1)

00659f70  {
00659f80      Logger::Log(sev_Error, 0, arg1->m_charbuffer);
00659f70  }

00659f89                             cc cc cc cc cc cc cc                                                           .......

00659f90  enum NodeNameType IFileNodeName::GetNameType(class IFileNodeName* arg1)

00659f90  {
00659f96      if (arg1 == 0)
00659fa2          return 0xff;
00659fa2      
00659f9a      /* jump -> arg1->vtable->GetType */
00659f90  }

00659fa3           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

00659fb0  uint8_t __thiscall FileNodeName_UInt32::operator==(class FileNodeName_UInt32 const* this, class IFileNodeName const* arg2)

00659fb0  {
00659fcb      if (arg2->vtable->GetType() != this->vtable->GetType())
00659fcb      {
00659fcf          int32_t eax_2;
00659fcf          eax_2 = 0;
00659fd2          return 0;
00659fcb      }
00659fcb      
00659fe2      uint32_t eax_3;
00659fe2      eax_3 = this->m_name == *(int32_t*)((char*)arg2 + 4);
00659fe5      return eax_3;
00659fb0  }

00659fe8                          cc cc cc cc cc cc cc cc                                                          ........

00659ff0  uint8_t __thiscall FileNodeName_Int64::operator==(class FileNodeName_Int64 const* this, class IFileNodeName const* arg2)

00659ff0  {
0065a00b      if (arg2->vtable->GetType() != this->vtable->GetType())
0065a00b      {
0065a00f          int32_t eax_2;
0065a00f          eax_2 = 0;
0065a012          return 0;
0065a00b      }
0065a00b      
0065a023      if ((this->m_name == *(int32_t*)((char*)arg2 + 8) && *(uint32_t*)((char*)this->m_name)[4] == *(int32_t*)((char*)arg2 + 0xc)))
0065a02d          return 1;
0065a02d      
0065a035      return 0;
00659ff0  }

0065a038                                                                          cc cc cc cc cc cc cc cc                          ........

0065a040  uint8_t __thiscall FileNodeName_Double::operator==(class FileNodeName_Double const* this, class IFileNodeName const* arg2)

0065a040  {
0065a05b      int32_t eax_2;
0065a05b      
0065a05b      if (arg2->vtable->GetType() != this->vtable->GetType())
0065a05b      {
0065a05f          eax_2 = 0;
0065a062          return 0;
0065a05b      }
0065a05b      
0065a06b      long double x87_r7_2 = fabsl((((long double)this->m_name) - ((long double)*(int32_t*)((char*)arg2 + 8))));
0065a06d      long double temp1 = ((long double)3.9999997979030039e-08);
0065a06d      (x87_r7_2 - temp1);
0065a073      eax_2 = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
0065a075      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0065a075      
0065a078      if (p)
0065a08a          return 0;
0065a08a      
0065a082      return 1;
0065a040  }

0065a08d                                         cc cc cc                                                               ...

0065a090  uint8_t __thiscall FileNodeName_InstanceID::operator==(class FileNodeName_InstanceID const* this, class IFileNodeName const* arg2)

0065a090  {
0065a0ab      if (arg2->vtable->GetType() != this->vtable->GetType())
0065a0ab      {
0065a0af          int32_t eax_2;
0065a0af          eax_2 = 0;
0065a0b2          return 0;
0065a0ab      }
0065a0ab      
0065a0c7      if ((this->m_name.id == *(int32_t*)((char*)arg2 + 8) && *(uint32_t*)((char*)this->m_name.id)[4] == *(int32_t*)((char*)arg2 + 0xc)))
0065a0d1          return 1;
0065a0d1      
0065a0d9      return 0;
0065a090  }

0065a0dc                                                                                      cc cc cc cc                              ....

0065a0e0  uint8_t __thiscall FileNodeName_Bool::operator==(class FileNodeName_Bool const* this, class IFileNodeName const* arg2)

0065a0e0  {
0065a0fb      int32_t eax_2;
0065a0fb      
0065a0fb      if (arg2->vtable->GetType() != this->vtable->GetType())
0065a0fb      {
0065a0ff          eax_2 = 0;
0065a102          return 0;
0065a0fb      }
0065a0fb      
0065a105      eax_2 = this->m_name;
0065a112      eax_2 = eax_2 == *(int32_t*)((char*)arg2 + 4);
0065a115      return eax_2;
0065a0e0  }

0065a118                                                                          cc cc cc cc cc cc cc cc                          ........

0065a120  uint8_t __thiscall FileNodeName_Binary::operator==(class FileNodeName_Binary const* this, class IFileNodeName const* arg2)

0065a120  {
0065a13b      if (arg2->vtable->GetType() != this->vtable->GetType())
0065a13b      {
0065a13f          int32_t eax_2;
0065a13f          eax_2 = 0;
0065a142          return 0;
0065a13b      }
0065a13b      
0065a14e      uint32_t i_1 = SmartBuffer::GetSize(&this->m_name);
0065a14e      
0065a15e      if (i_1 != SmartBuffer::GetSize(&arg2[1]))
0065a15e      {
0065a163          uint32_t eax_3;
0065a163          eax_3 = 0;
0065a166          return 0;
0065a15e      }
0065a15e      
0065a172      uint8_t* edi_1 = SmartBuffer::GetBuffer(&arg2[1]);
0065a179      uint8_t* esi_2 = SmartBuffer::GetBuffer(&this->m_name);
0065a17b      uint32_t i = i_1;
0065a17d      bool result = true;
0065a17d      
0065a17f      while (i != 0)
0065a17f      {
0065a17f          uint8_t temp1_1 = *(uint8_t*)esi_2;
0065a17f          uint8_t temp2_1 = *(uint8_t*)edi_1;
0065a17f          result = temp1_1 == temp2_1;
0065a17f          esi_2 = &esi_2[1];
0065a17f          edi_1 = &edi_1[1];
0065a17f          i -= 1;
0065a17f          
0065a17f          if (temp1_1 != temp2_1)
0065a17f              break;
0065a17f      }
0065a17f      
0065a188      return result;
0065a120  }

0065a18b                                   cc cc cc cc cc                                                             .....

0065a190  enum NodeNameType FileNodeName_UInt64::GetType(class FileNodeName_UInt64 const* this @ ecx) __pure

0065a190  {
0065a195      return 0xb;
0065a190  }

0065a196                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0065a1a0  class IFileNodeName* __fastcall FileNodeName_UInt64::Clone(class FileNodeName_UInt64 const* this)

0065a1a0  {
0065a1a5      void* result = operator new(0x10);
0065a1a5      
0065a1af      if (result == 0)
0065a1c8          return 0;
0065a1c8      
0065a1b1      *(uint32_t*)result = 0x7fd868;
0065a1ba      *(uint32_t*)((char*)result + 8) = this->m_name;
0065a1c0      *(uint32_t*)((char*)result + 0xc) = *(uint32_t*)((char*)this->m_name)[4];
0065a1c4      return result;
0065a1a0  }

0065a1c9                             cc cc cc cc cc cc cc                                                           .......

0065a1d0  void* __thiscall FileNodeName_CellID::`scalar deleting destructor'(class FileNodeName_CellID* this, uint32_t arg2)

0065a1d0  {
0065a1d8      this->vtable = 0x79602c;
0065a1d8      
0065a1de      if ((arg2 & 1) != 0)
0065a1e1          operator delete(this);
0065a1e1      
0065a1ec      return this;
0065a1d0  }

0065a1ef                                               cc                                                                 .

0065a1f0  enum NodeNameType FileNodeName_Int64::GetType(class FileNodeName_Int64 const* this @ ecx) __pure

0065a1f0  {
0065a1f5      return 0xc;
0065a1f0  }

0065a1f6                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0065a200  class IFileNodeName* __fastcall FileNodeName_Int64::Clone(class FileNodeName_Int64 const* this)

0065a200  {
0065a205      void* result = operator new(0x10);
0065a205      
0065a20f      if (result == 0)
0065a228          return 0;
0065a228      
0065a211      *(uint32_t*)result = 0x7fd884;
0065a21a      *(uint32_t*)((char*)result + 8) = this->m_name;
0065a220      *(uint32_t*)((char*)result + 0xc) = *(uint32_t*)((char*)this->m_name)[4];
0065a224      return result;
0065a200  }

0065a229                             cc cc cc cc cc cc cc                                                           .......

0065a230  enum NodeNameType FileNodeName_CellID::GetType(class FileNodeName_CellID const* this @ ecx) __pure

0065a230  {
0065a235      return 5;
0065a230  }

0065a236                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0065a240  class IFileNodeName* __fastcall FileNodeName_CellID::Clone(class FileNodeName_CellID const* this)

0065a240  {
0065a245      void* result = operator new(8);
0065a245      
0065a24f      if (result == 0)
0065a264          return 0;
0065a264      
0065a251      *(uint32_t*)result = 0x7fd8a0;
0065a25b      *(uint16_t*)((char*)result + 4) = this->m_name.id;
0065a260      return result;
0065a240  }

0065a265                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0065a270  enum NodeNameType FileNodeName_InstanceID::GetType(class FileNodeName_InstanceID const* this @ ecx) __pure

0065a270  {
0065a275      return 6;
0065a270  }

0065a276                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0065a280  class IFileNodeName* __fastcall FileNodeName_InstanceID::Clone(class FileNodeName_InstanceID const* this)

0065a280  {
0065a285      void* result = operator new(0x10);
0065a285      
0065a28f      if (result == 0)
0065a2a8          return 0;
0065a2a8      
0065a291      *(uint32_t*)result = 0x7fd8bc;
0065a29a      *(uint32_t*)((char*)result + 8) = this->m_name.id;
0065a2a0      *(uint32_t*)((char*)result + 0xc) = *(uint32_t*)((char*)this->m_name.id)[4];
0065a2a4      return result;
0065a280  }

0065a2a9                             cc cc cc cc cc cc cc                                                           .......

0065a2b0  enum NodeNameType FileNodeName_Guid::GetType(class FileNodeName_Guid const* this @ ecx) __pure

0065a2b0  {
0065a2b5      return 0xe;
0065a2b0  }

0065a2b6                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0065a2c0  class IFileNodeName* __fastcall FileNodeName_Guid::Clone(class FileNodeName_Guid const* this)

0065a2c0  {
0065a2c5      void* result = operator new(0x14);
0065a2c5      
0065a2cf      if (result == 0)
0065a2f8          return 0;
0065a2f8      
0065a2d4      *(uint32_t*)result = 0x7fd8d8;
0065a2df      *(uint32_t*)((char*)result + 4) = this->m_name.m_data1;
0065a2e1      int32_t edx_1;
0065a2e1      edx_1 = this->m_name.m_data2;
0065a2e1      *(uint16_t*)((char*)edx_1)[2] = this->m_name.m_data3;
0065a2e4      *(uint32_t*)((char*)result + 8) = edx_1;
0065a2e7      int32_t edx_2;
0065a2e7      edx_2 = this->m_name.m_data4[0];
0065a2e7      *(uint8_t*)((char*)edx_2)[1] = this->m_name.m_data4[1];
0065a2e7      *(uint8_t*)((char*)edx_2)[2] = this->m_name.m_data4[2];
0065a2e7      *(uint8_t*)((char*)edx_2)[3] = this->m_name.m_data4[3];
0065a2ea      *(uint32_t*)((char*)result + 0xc) = edx_2;
0065a2ed      int32_t edx_3;
0065a2ed      edx_3 = this->m_name.m_data4[4];
0065a2ed      *(uint8_t*)((char*)edx_3)[1] = this->m_name.m_data4[5];
0065a2ed      *(uint8_t*)((char*)edx_3)[2] = this->m_name.m_data4[6];
0065a2ed      *(uint8_t*)((char*)edx_3)[3] = this->m_name.m_data4[7];
0065a2f0      *(uint32_t*)((char*)result + 0x10) = edx_3;
0065a2f4      return result;
0065a2c0  }

0065a2f9                                                                             cc cc cc cc cc cc cc                           .......

0065a300  enum NodeNameType FileNodeName_LongHex::GetType(class FileNodeName_LongHex const* this @ ecx) __pure

0065a300  {
0065a305      return 0xd;
0065a300  }

0065a306                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0065a310  class IFileNodeName* __fastcall FileNodeName_LongHex::Clone(class FileNodeName_LongHex const* this)

0065a310  {
0065a315      void* result = operator new(0x10);
0065a315      
0065a31f      if (result == 0)
0065a33e          return 0;
0065a33e      
0065a321      *(uint32_t*)result = 0x7fd868;
0065a32a      *(uint32_t*)((char*)result + 8) = this->m_name;
0065a330      *(uint32_t*)((char*)result + 0xc) = *(uint32_t*)((char*)this->m_name)[4];
0065a333      *(uint32_t*)result = 0x7fd8f4;
0065a33a      return result;
0065a310  }

0065a33f                                                                                               cc                                 .

0065a340  uint8_t __thiscall FileNodeName_Float::operator==(class FileNodeName_Float const* this, class IFileNodeName const* arg2)

0065a340  {
0065a35b      int32_t eax_2;
0065a35b      
0065a35b      if (arg2->vtable->GetType() != this->vtable->GetType())
0065a35b      {
0065a35f          eax_2 = 0;
0065a362          return 0;
0065a35b      }
0065a35b      
0065a36b      long double x87_r7_2 = fabsl((((long double)this->m_name) - ((long double)*(int32_t*)((char*)arg2 + 4))));
0065a36d      long double temp1 = ((long double)0.000199999995f);
0065a36d      (x87_r7_2 - temp1);
0065a373      eax_2 = ((((x87_r7_2 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp1) ? 1 : 0) << 0xe) | 0))));
0065a375      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0065a375      
0065a378      if (p)
0065a38a          return 0;
0065a38a      
0065a382      return 1;
0065a340  }

0065a38d                                         cc cc cc                                                               ...

0065a390  uint8_t __thiscall FileNodeName_CellID::operator==(class FileNodeName_CellID const* this, class IFileNodeName const* arg2)

0065a390  {
0065a3ab      if (arg2->vtable->GetType() != this->vtable->GetType())
0065a3ab      {
0065a3af          int32_t eax_2;
0065a3af          eax_2 = 0;
0065a3b2          return 0;
0065a3ab      }
0065a3ab      
0065a3b5      class IFileNodeName* edi;
0065a3b5      edi = *(int32_t*)((char*)arg2 + 4);
0065a3c5      return this->m_name.id == edi;
0065a390  }

0065a3c8                          cc cc cc cc cc cc cc cc                                                          ........

0065a3d0  uint8_t __thiscall FileNodeName_PString::operator==(class FileNodeName_PString const* this, class IFileNodeName const* arg2)

0065a3d0  {
0065a3eb      if (arg2->vtable->GetType() == this->vtable->GetType())
0065a404          return PStringBase<char>::operator==(&this->m_name, &arg2[1]);
0065a404      
0065a3ef      int32_t eax_2;
0065a3ef      eax_2 = 0;
0065a3f2      return 0;
0065a3d0  }

0065a407                       cc cc cc cc cc cc cc cc cc                                                         .........

0065a410  uint8_t __thiscall FileNodeName_Guid::operator==(class FileNodeName_Guid const* this, class IFileNodeName const* arg2)

0065a410  {
0065a42b      if (arg2->vtable->GetType() != this->vtable->GetType())
0065a42b      {
0065a42f          int32_t eax_2;
0065a42f          eax_2 = 0;
0065a432          return 0;
0065a42b      }
0065a42b      
0065a43b      if (this->m_name.m_data1 == *(int32_t*)((char*)arg2 + 4))
0065a43b      {
0065a43d          int32_t ecx_2;
0065a43d          ecx_2 = this->m_name.m_data2;
0065a43d          *(uint16_t*)((char*)ecx_2)[2] = this->m_name.m_data3;
0065a43d          
0065a443          if (ecx_2 == *(int32_t*)((char*)arg2 + 8))
0065a443          {
0065a445              int32_t edx_1;
0065a445              edx_1 = this->m_name.m_data4[0];
0065a445              *(uint8_t*)((char*)edx_1)[1] = this->m_name.m_data4[1];
0065a445              *(uint8_t*)((char*)edx_1)[2] = this->m_name.m_data4[2];
0065a445              *(uint8_t*)((char*)edx_1)[3] = this->m_name.m_data4[3];
0065a445              
0065a44b              if (edx_1 == *(int32_t*)((char*)arg2 + 0xc))
0065a44b              {
0065a44d                  int32_t eax_4;
0065a44d                  eax_4 = this->m_name.m_data4[4];
0065a44d                  *(uint8_t*)((char*)eax_4)[1] = this->m_name.m_data4[5];
0065a44d                  *(uint8_t*)((char*)eax_4)[2] = this->m_name.m_data4[6];
0065a44d                  *(uint8_t*)((char*)eax_4)[3] = this->m_name.m_data4[7];
0065a44d                  
0065a453                  if (eax_4 == *(int32_t*)((char*)arg2 + 0x10))
0065a45d                      return 1;
0065a44b              }
0065a443          }
0065a43b      }
0065a43b      
0065a465      return 0;
0065a410  }

0065a468                          cc cc cc cc cc cc cc cc                                                          ........

0065a470  uint8_t __thiscall FileNodeName_Guid::FromPString(class FileNodeName_Guid* this, class PStringBase<char> const* arg2)

0065a470  {
0065a47d      /* tailcall */
0065a47d      return Turbine_GUID::Convert(&this->m_name, arg2->m_charbuffer);
0065a470  }

0065a482        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065a490  void __thiscall FileNodeName_Int64::Serialize(class FileNodeName_Int64* this, class Archive* arg2)

0065a490  {
0065a499      Serializer::SerializePrimitive<__int64>(&this->m_name, arg2);
0065a490  }

0065a4a4              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0065a4b0  uint8_t __convention("regparm") PSUtils::is_uint32<char>(class PStringBase<char> arg1)

0065a4b0  {
0065a4b0      char* ecx;
0065a4b0      char* var_4 = ecx;
0065a4ba      var_4 = nullptr;
0065a4c8      *(uint32_t*)_errno() = 0;
0065a4d6      strtoul(arg1, &var_4, 0);
0065a4e6      int32_t ebx;
0065a4e6      
0065a4e6      if (*(uint8_t*)var_4 != 0)
0065a4f3          ebx = 0;
0065a4e6      else if (*(uint32_t*)_errno() == 0x22)
0065a4f3          ebx = 0;
0065a4ed      else
0065a4ef          ebx = 1;
0065a4ef      
0065a508      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
0065a510          **(uint32_t**)(arg1 - 0x14)(1);
0065a510      
0065a514      int32_t eax_2;
0065a514      eax_2 = ebx;
0065a518      return eax_2;
0065a4b0  }

0065a519                                                                             cc cc cc cc cc cc cc                           .......

0065a520  uint8_t __convention("regparm") PSUtils::is_int32<char>(class PStringBase<char> arg1)

0065a520  {
0065a520      char* ecx;
0065a520      char* var_4 = ecx;
0065a52a      var_4 = nullptr;
0065a538      *(uint32_t*)_errno() = 0;
0065a546      strtol(arg1, &var_4, 0);
0065a556      int32_t ebx;
0065a556      
0065a556      if (*(uint8_t*)var_4 != 0)
0065a563          ebx = 0;
0065a556      else if (*(uint32_t*)_errno() == 0x22)
0065a563          ebx = 0;
0065a55d      else
0065a55f          ebx = 1;
0065a55f      
0065a578      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
0065a580          **(uint32_t**)(arg1 - 0x14)(1);
0065a580      
0065a584      int32_t eax_2;
0065a584      eax_2 = ebx;
0065a588      return eax_2;
0065a520  }

0065a589                             cc cc cc cc cc cc cc                                                           .......

0065a590  uint8_t __convention("regparm") PSUtils::is_uint64<char>(class PStringBase<char> arg1)

0065a590  {
0065a590      char* ecx;
0065a590      char* var_4 = ecx;
0065a59a      var_4 = nullptr;
0065a5a8      *(uint32_t*)_errno() = 0;
0065a5b6      strtouint64(arg1, &var_4, 0);
0065a5c5      int32_t ebx;
0065a5c5      
0065a5c5      if (*(uint8_t*)var_4 != 0)
0065a5d2          ebx = 0;
0065a5c5      else if (*(uint32_t*)_errno() == 0x22)
0065a5d2          ebx = 0;
0065a5cc      else
0065a5ce          ebx = 1;
0065a5ce      
0065a5e7      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
0065a5ef          **(uint32_t**)(arg1 - 0x14)(1);
0065a5ef      
0065a5f3      int32_t eax_2;
0065a5f3      eax_2 = ebx;
0065a5f7      return eax_2;
0065a590  }

0065a5f8                                                                          cc cc cc cc cc cc cc cc                          ........

0065a600  uint8_t __convention("regparm") PSUtils::is_int64<char>(class PStringBase<char> arg1)

0065a600  {
0065a600      char* ecx;
0065a600      char* var_4 = ecx;
0065a60a      var_4 = nullptr;
0065a618      *(uint32_t*)_errno() = 0;
0065a626      strtoint64(arg1, &var_4, 0);
0065a635      int32_t ebx;
0065a635      
0065a635      if (*(uint8_t*)var_4 != 0)
0065a642          ebx = 0;
0065a635      else if (*(uint32_t*)_errno() == 0x22)
0065a642          ebx = 0;
0065a63c      else
0065a63e          ebx = 1;
0065a63e      
0065a657      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
0065a65f          **(uint32_t**)(arg1 - 0x14)(1);
0065a65f      
0065a663      int32_t eax_2;
0065a663      eax_2 = ebx;
0065a667      return eax_2;
0065a600  }

0065a668                          cc cc cc cc cc cc cc cc                                                          ........

0065a670  uint8_t __convention("regparm") PSUtils::is_float<char>(class PStringBase<char> arg1)

0065a670  {
0065a670      char* ecx;
0065a670      char* var_4 = ecx;
0065a67a      var_4 = nullptr;
0065a688      *(uint32_t*)_errno() = 0;
0065a694      strtod(arg1, &var_4);
0065a6a6      int32_t ebx;
0065a6a6      
0065a6a6      if (*(uint8_t*)var_4 != 0)
0065a6b3          ebx = 0;
0065a6a6      else if (*(uint32_t*)_errno() == 0x22)
0065a6b3          ebx = 0;
0065a6ad      else
0065a6af          ebx = 1;
0065a6af      
0065a6c8      if ((InterlockedDecrement((arg1 - 0x10)) == 0 && arg1 != 0x14))
0065a6d0          **(uint32_t**)(arg1 - 0x14)(1);
0065a6d0      
0065a6d4      int32_t eax_2;
0065a6d4      eax_2 = ebx;
0065a6d8      return eax_2;
0065a670  }

0065a6d9                                                                             cc cc cc cc cc cc cc                           .......

0065a6e0  void __thiscall FileNodeName_CellID::Serialize(class FileNodeName_CellID* this, class Archive* arg2)

0065a6e0  {
0065a6ec      Archive::CheckAlignment(arg2, 2);
0065a6f5      uint16_t* eax = Archive::GetBytes(arg2, 2);
0065a6f5      
0065a6fc      if (eax != 0)
0065a6fc      {
0065a702          if ((arg2->m_flags & 1) != 0)
0065a702          {
0065a709              *(uint16_t*)eax = this->m_name.id;
0065a70d              return;
0065a702          }
0065a702          
0065a713          this->m_name.id = *(uint16_t*)eax;
0065a6fc      }
0065a6e0  }

0065a71c                                                                                      cc cc cc cc                              ....

0065a720  void Serializer::SerializePrimitive<__int64>(int64_t* arg1, class Archive* arg2)

0065a720  {
0065a729      Archive::CheckAlignment(arg2, 8);
0065a732      uint8_t* eax = Archive::GetBytes(arg2, 8);
0065a732      
0065a739      if (eax != 0)
0065a739      {
0065a743          if ((arg2->m_flags & 1) != 0)
0065a743          {
0065a747              *(uint32_t*)eax = *(uint32_t*)arg1;
0065a74c              *(uint32_t*)(eax + 4) = *(uint32_t*)((char*)arg1 + 4);
0065a750              return;
0065a743          }
0065a743          
0065a753          *(uint32_t*)arg1 = *(uint32_t*)eax;
0065a758          *(uint32_t*)((char*)arg1 + 4) = *(uint32_t*)(eax + 4);
0065a739      }
0065a720  }

0065a75d                                                                                         cc cc cc                               ...

0065a760  void __thiscall FileNodeName_Guid::Serialize(class FileNodeName_Guid* this, class Archive* arg2)

0065a760  {
0065a76d      Archive::CheckAlignment(arg2, 0x10);
0065a776      uint8_t* eax = Archive::GetBytes(arg2, 0x10);
0065a776      
0065a77d      if (eax != 0)
0065a77d      {
0065a783          if ((arg2->m_flags & 1) != 0)
0065a783          {
0065a787              *(uint32_t*)eax = this->m_name.m_data1;
0065a789              int32_t edx;
0065a789              edx = this->m_name.m_data2;
0065a789              *(uint16_t*)((char*)edx)[2] = this->m_name.m_data3;
0065a78c              *(uint32_t*)(eax + 4) = edx;
0065a78f              int32_t ecx_3;
0065a78f              ecx_3 = this->m_name.m_data4[0];
0065a78f              *(uint8_t*)((char*)ecx_3)[1] = this->m_name.m_data4[1];
0065a78f              *(uint8_t*)((char*)ecx_3)[2] = this->m_name.m_data4[2];
0065a78f              *(uint8_t*)((char*)ecx_3)[3] = this->m_name.m_data4[3];
0065a792              *(uint32_t*)(eax + 8) = ecx_3;
0065a795              int32_t edx_1;
0065a795              edx_1 = this->m_name.m_data4[4];
0065a795              *(uint8_t*)((char*)edx_1)[1] = this->m_name.m_data4[5];
0065a795              *(uint8_t*)((char*)edx_1)[2] = this->m_name.m_data4[6];
0065a795              *(uint8_t*)((char*)edx_1)[3] = this->m_name.m_data4[7];
0065a799              *(uint32_t*)(eax + 0xc) = edx_1;
0065a79d              return;
0065a783          }
0065a783          
0065a766          this->m_name.m_data1 = *(uint32_t*)eax;
0065a7a4          int32_t edx_2 = *(uint32_t*)(eax + 4);
0065a766          this->m_name.m_data2 = edx_2;
0065a766          this->m_name.m_data3 = *(uint16_t*)((char*)edx_2)[2];
0065a7aa          int32_t ecx_5 = *(uint32_t*)(eax + 8);
0065a766          this->m_name.m_data4[0] = ecx_5;
0065a766          this->m_name.m_data4[1] = *(uint8_t*)((char*)ecx_5)[1];
0065a766          this->m_name.m_data4[2] = *(uint8_t*)((char*)ecx_5)[2];
0065a766          this->m_name.m_data4[3] = *(uint8_t*)((char*)ecx_5)[3];
0065a7b0          int32_t edx_3 = *(uint32_t*)(eax + 0xc);
0065a766          this->m_name.m_data4[4] = edx_3;
0065a766          this->m_name.m_data4[5] = *(uint8_t*)((char*)edx_3)[1];
0065a766          this->m_name.m_data4[6] = *(uint8_t*)((char*)edx_3)[2];
0065a766          this->m_name.m_data4[7] = *(uint8_t*)((char*)edx_3)[3];
0065a77d      }
0065a760  }

0065a7bb                                                                                   cc cc cc cc cc                             .....

0065a7c0  class IFileNodeName* IFileNodeName::CreateFromEnum(enum NodeNameType arg1)

0065a7c0  {
0065a7d8      if ((arg1 <= Null_NAMETYPE && (arg1 != Null_NAMETYPE && arg1 <= Guid_NAMETYPE)))
0065a7d8          switch (arg1)
0065a7d8          {
0065a903              case PString_NAMETYPE:
0065a903              {
0065a903                  void* eax_13 = operator new(8);
0065a903                  
0065a90d                  if (eax_13 != 0)
0065a911                      /* tailcall */
0065a911                      return FileNodeName_PString::FileNodeName_PString(eax_13);
0065a903                  break;
0065a903              }
0065a7e7              case UInt32_NAMETYPE:
0065a7e7              {
0065a7e7                  void* eax = operator new(8);
0065a7e7                  
0065a7f1                  if (eax != 0)
0065a7f1                  {
0065a7f7                      *(uint32_t*)eax = 0x797108;
0065a7fd                      return eax;
0065a7f1                  }
0065a7e7                  break;
0065a7e7              }
0065a800              case Int32_NAMETYPE:
0065a800              {
0065a800                  void* eax_1 = operator new(8);
0065a800                  
0065a80a                  if (eax_1 != 0)
0065a80a                  {
0065a810                      *(uint32_t*)eax_1 = 0x797124;
0065a816                      return eax_1;
0065a80a                  }
0065a800                  break;
0065a800              }
0065a84b              case Double_NAMETYPE:
0065a84b              {
0065a84b                  void* eax_4 = operator new(0x10);
0065a84b                  
0065a855                  if (eax_4 != 0)
0065a855                  {
0065a85b                      *(uint32_t*)eax_4 = 0x796e28;
0065a861                      return eax_4;
0065a855                  }
0065a84b                  break;
0065a84b              }
0065a864              case Float_NAMETYPE:
0065a864              {
0065a864                  void* eax_5 = operator new(8);
0065a864                  
0065a86e                  if (eax_5 != 0)
0065a86e                  {
0065a874                      *(uint32_t*)eax_5 = 0x7970d0;
0065a87a                      return eax_5;
0065a86e                  }
0065a864                  break;
0065a864              }
0065a87d              case CellID_NAMETYPE:
0065a87d              {
0065a87d                  void* eax_6 = operator new(8);
0065a87d                  
0065a887                  if (eax_6 != 0)
0065a887                  {
0065a88d                      *(uint32_t*)eax_6 = 0x7fd8a0;
0065a893                      return eax_6;
0065a887                  }
0065a87d                  break;
0065a87d              }
0065a896              case InstanceID_NAMETYPE:
0065a896              {
0065a896                  void* eax_7 = operator new(0x10);
0065a896                  
0065a8a0                  if (eax_7 != 0)
0065a8a0                  {
0065a8a6                      *(uint32_t*)eax_7 = 0x7fd8bc;
0065a8ac                      return eax_7;
0065a8a0                  }
0065a896                  break;
0065a896              }
0065a8d9              case Bool_NAMETYPE:
0065a8d9              {
0065a8d9                  void* eax_10 = operator new(8);
0065a8d9                  
0065a8e3                  if (eax_10 != 0)
0065a8e3                  {
0065a8e5                      *(uint32_t*)eax_10 = 0x796010;
0065a8eb                      return eax_10;
0065a8e3                  }
0065a8d9                  break;
0065a8d9              }
0065a8af              case Hex_NAMETYPE:
0065a8af              {
0065a8af                  void* eax_8 = operator new(8);
0065a8af                  
0065a8b9                  if (eax_8 != 0)
0065a8b9                  {
0065a8bb                      *(uint32_t*)eax_8 = 0x7970ec;
0065a8c1                      return eax_8;
0065a8b9                  }
0065a8af                  break;
0065a8af              }
0065a8ee              case Binary_NAMETYPE:
0065a8ee              {
0065a8ee                  void* eax_11 = operator new(0x10);
0065a8ee                  
0065a8f8                  if (eax_11 != 0)
0065a8fc                      /* tailcall */
0065a8fc                      return FileNodeName_Binary::FileNodeName_Binary(eax_11);
0065a8ee                  break;
0065a8ee              }
0065a819              case UInt64_NAMETYPE:
0065a819              {
0065a819                  void* eax_2 = operator new(0x10);
0065a819                  
0065a823                  if (eax_2 != 0)
0065a823                  {
0065a829                      *(uint32_t*)eax_2 = 0x7fd868;
0065a82f                      return eax_2;
0065a823                  }
0065a819                  break;
0065a819              }
0065a832              case Int64_NAMETYPE:
0065a832              {
0065a832                  void* eax_3 = operator new(0x10);
0065a832                  
0065a83c                  if (eax_3 != 0)
0065a83c                  {
0065a842                      *(uint32_t*)eax_3 = 0x7fd884;
0065a848                      return eax_3;
0065a83c                  }
0065a832                  break;
0065a832              }
0065a8c4              case LongHex_NAMETYPE:
0065a8c4              {
0065a8c4                  void* eax_9 = operator new(0x10);
0065a8c4                  
0065a8ce                  if (eax_9 != 0)
0065a8ce                  {
0065a8d0                      *(uint32_t*)eax_9 = 0x7fd8f4;
0065a8d6                      return eax_9;
0065a8ce                  }
0065a8c4                  break;
0065a8c4              }
0065a918              case Guid_NAMETYPE:
0065a918              {
0065a918                  void* eax_15 = operator new(0x14);
0065a918                  
0065a922                  if (eax_15 != 0)
0065a922                  {
0065a924                      *(uint32_t*)eax_15 = 0x7fd8d8;
0065a92a                      return eax_15;
0065a922                  }
0065a918                  break;
0065a918              }
0065a7d8          }
0065a7d8      
0065a92d      return 0;
0065a7c0  }

0065a92e                                            8b ff                                                                ..
0065a930  uint32_t jump_table_65a930[0xf] = 
0065a930  {
0065a930      [0x0] =  0x0065a901
0065a934      [0x1] =  0x0065a7e5
0065a938      [0x2] =  0x0065a7fe
0065a93c      [0x3] =  0x0065a849
0065a940      [0x4] =  0x0065a862
0065a944      [0x5] =  0x0065a87b
0065a948      [0x6] =  0x0065a894
0065a94c      [0x7] =  0x0065a8d7
0065a950      [0x8] =  0x0065a8ad
0065a954      [0x9] =  0x0065a8ec
0065a958      [0xa] =  0x0065a92b
0065a95c      [0xb] =  0x0065a817
0065a960      [0xc] =  0x0065a830
0065a964      [0xd] =  0x0065a8c2
0065a968      [0xe] =  0x0065a916
0065a96c  }

0065a96c                                      cc cc cc cc                                                              ....

0065a970  uint8_t __thiscall FileNodeName_UInt32::FromPString(class FileNodeName_UInt32* this, class PStringBase<char> const* arg2)

0065a970  {
0065a977      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065a979      class FileNodeName_UInt32* this_1 = this;
0065a97e      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0065a97e      
0065a996      if (PSUtils::is_uint32<char>(InterlockedIncrement(&m_charbuffer[-1])) == 0)
0065a9c4          return 0;
0065a9c4      
0065a998      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0065a9a5      *(uint32_t*)_errno() = 0;
0065a9b1      this->m_name = strtoul(m_charbuffer_1, 0, 0);
0065a9b7      uint32_t eax_4;
0065a9b7      eax_4 = 1;
0065a9bc      return 1;
0065a970  }

0065a9c7                       cc cc cc cc cc cc cc cc cc                                                         .........

0065a9d0  uint8_t __thiscall FileNodeName_Int32::FromPString(class FileNodeName_Int32* this, class PStringBase<char> const* arg2)

0065a9d0  {
0065a9d7      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065a9d9      class FileNodeName_Int32* this_1 = this;
0065a9de      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0065a9de      
0065a9f6      if (PSUtils::is_int32<char>(InterlockedIncrement(&m_charbuffer[-1])) == 0)
0065aa24          return 0;
0065aa24      
0065a9f8      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0065aa05      *(uint32_t*)_errno() = 0;
0065aa11      this->m_name = strtol(m_charbuffer_1, 0, 0);
0065aa17      int32_t eax_4;
0065aa17      eax_4 = 1;
0065aa1c      return 1;
0065a9d0  }

0065aa27                       cc cc cc cc cc cc cc cc cc                                                         .........

0065aa30  uint8_t __thiscall FileNodeName_UInt64::FromPString(class FileNodeName_UInt64* this, class PStringBase<char> const* arg2)

0065aa30  {
0065aa37      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065aa39      class FileNodeName_UInt64* this_1 = this;
0065aa3e      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0065aa3e      
0065aa56      if (PSUtils::is_uint64<char>(InterlockedIncrement(&m_charbuffer[-1])) == 0)
0065aa86          return 0;
0065aa86      
0065aa58      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0065aa65      *(uint32_t*)_errno() = 0;
0065aa6b      int32_t eax_4;
0065aa6b      int32_t edx;
0065aa6b      eax_4 = strtouint64(m_charbuffer_1, nullptr, 0);
0065aa70      this->m_name = eax_4;
0065aa76      *(uint32_t*)((char*)this->m_name)[4] = edx;
0065aa79      eax_4 = 1;
0065aa7e      return 1;
0065aa30  }

0065aa89                             cc cc cc cc cc cc cc                                                           .......

0065aa90  uint8_t __thiscall FileNodeName_Int64::FromPString(class FileNodeName_Int64* this, class PStringBase<char> const* arg2)

0065aa90  {
0065aa97      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065aa99      class FileNodeName_Int64* this_1 = this;
0065aa9e      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0065aa9e      
0065aab6      if (PSUtils::is_int64<char>(InterlockedIncrement(&m_charbuffer[-1])) == 0)
0065aae6          return 0;
0065aae6      
0065aab8      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0065aac5      *(uint32_t*)_errno() = 0;
0065aacb      int32_t eax_4;
0065aacb      int32_t edx;
0065aacb      eax_4 = strtoint64(m_charbuffer_1, nullptr, 0);
0065aad0      this->m_name = eax_4;
0065aad6      *(uint32_t*)((char*)this->m_name)[4] = edx;
0065aad9      eax_4 = 1;
0065aade      return 1;
0065aa90  }

0065aae9                             cc cc cc cc cc cc cc                                                           .......

0065aaf0  uint8_t __thiscall FileNodeName_Double::FromPString(class FileNodeName_Double* this, class PStringBase<char> const* arg2)

0065aaf0  {
0065aaf7      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065aaf9      class FileNodeName_Double* this_1 = this;
0065aafe      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0065aafe      
0065ab16      if (PSUtils::is_float<char>(InterlockedIncrement(&m_charbuffer[-1])) == 0)
0065ab42          return 0;
0065ab42      
0065ab18      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0065ab23      *(uint32_t*)_errno() = 0;
0065ab29      strtod(m_charbuffer_1, 0);
0065ab2f      long double x87_r0;
0065ab2f      this->m_name = ((double)x87_r0);
0065ab35      int32_t eax_4;
0065ab35      eax_4 = 1;
0065ab3a      return 1;
0065aaf0  }

0065ab45                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0065ab50  uint8_t __thiscall FileNodeName_Float::FromPString(class FileNodeName_Float* this, class PStringBase<char> const* arg2)

0065ab50  {
0065ab57      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065ab59      class FileNodeName_Float* this_1 = this;
0065ab5e      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0065ab5e      
0065ab76      if (PSUtils::is_float<char>(InterlockedIncrement(&m_charbuffer[-1])) == 0)
0065aba2          return 0;
0065aba2      
0065ab78      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0065ab83      *(uint32_t*)_errno() = 0;
0065ab89      strtod(m_charbuffer_1, 0);
0065ab8f      long double x87_r0;
0065ab8f      this->m_name = ((float)x87_r0);
0065ab95      int32_t eax_4;
0065ab95      eax_4 = 1;
0065ab9a      return 1;
0065ab50  }

0065aba5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0065abb0  uint8_t __thiscall FileNodeName_CellID::FromPString(class FileNodeName_CellID* this, class PStringBase<char> const* arg2)

0065abb0  {
0065abb6      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065abb9      class FileNodeName_CellID* this_1 = this;
0065abbe      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
0065abd6      int32_t eax_2;
0065abd6      
0065abd6      if (PSUtils::is_uint32<char>(InterlockedIncrement(&m_charbuffer[-1])) != 0)
0065abd6      {
0065abd8          class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
0065abe5          *(uint32_t*)_errno() = 0;
0065abeb          eax_2 = strtoul(m_charbuffer_1, 0, 0);
0065abeb          
0065abf9          if (eax_2 <= 0xffff)
0065abf9          {
0065abfb              this->m_name.id = eax_2;
0065abff              eax_2 = 1;
0065ac04              return 1;
0065abf9          }
0065abd6      }
0065abd6      
0065ac09      eax_2 = 0;
0065ac0c      return 0;
0065abb0  }

0065ac0f                                               cc                                                                 .

0065ac10  uint8_t __thiscall FileNodeName_Bool::FromPString(class FileNodeName_Bool* this, class PStringBase<char> const* arg2)

0065ac10  {
0065ac29      int32_t eax_1 = _stricmp(arg2->m_charbuffer, TRUE_PSTRING.m_charbuffer);
0065ac29      
0065ac30      if (eax_1 != 0)
0065ac30      {
0065ac3c          eax_1 = _stricmp(arg2->m_charbuffer, ONE_PSTRING.m_charbuffer);
0065ac3c          
0065ac43          if (eax_1 != 0)
0065ac43          {
0065ac48              this->m_name = 0;
0065ac4c              int32_t eax_2;
0065ac4c              eax_2 = 1;
0065ac4f              return 1;
0065ac43          }
0065ac30      }
0065ac30      
0065ac58      this->m_name = 1;
0065ac5d      return eax_1;
0065ac10  }


0065ac60  class PStringBase<char>* __thiscall FileNodeName_Bool::ToPString(class FileNodeName_Bool const* this, class PStringBase<char>* __return)

0065ac60  {
0065ac64      int32_t* eax = &TRUE_PSTRING;
0065ac64      
0065ac69      if (this->m_name == 0)
0065ac6b          eax = &FALSE_PSTRING;
0065ac6b      
0065ac70      class PStringBase<char> eax_1 = *(uint32_t*)eax;
0065ac77      __return->m_charbuffer = eax_1;
0065ac7d      InterlockedIncrement((eax_1 - 0x10));
0065ac86      return __return;
0065ac60  }

0065ac89                             cc cc cc cc cc cc cc                                                           .......

0065ac90  uint8_t __thiscall FileNodeName_Binary::FromPString(class FileNodeName_Binary* this, class PStringBase<char> const* arg2)

0065ac90  {
0065ac97      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065ac9a      arg2 = m_charbuffer;
0065acae      class PStringBase<char> const** var_14_1 = &arg2;
0065acaf      PSUtils::unwrap_string(InterlockedIncrement(&m_charbuffer[-1]));
0065acca      void __return;
0065acca      SmartBuffer::operator=(&this->m_name, PSUtils::get_binary_buffer_from_string(&__return, &arg2));
0065acd3      SmartBuffer::~SmartBuffer(&__return);
0065acdc      void* __offset(PStringBase<char>, -0x14) esi_2 = &arg2[-5];
0065acdc      
0065acef      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0065acf7          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0065acf7      
0065acf9      int32_t eax_4;
0065acf9      eax_4 = 1;
0065acff      return 1;
0065ac90  }

0065ad02        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065ad10  class PStringBase<char>* __thiscall FileNodeName_Binary::ToPString(class FileNodeName_Binary const* this, class PStringBase<char>* __return)

0065ad10  {
0065ad10      class FileNodeName_Binary* __return_1 = this;
0065ad1c      PSUtils::stringify_buffer(&__return_1, &this->m_name);
0065ad28      PSUtils::linewrap_string(&__return_1, 0x64);
0065ad2d      class FileNodeName_Binary* __return_2 = __return_1;
0065ad35      __return->m_charbuffer = __return_2;
0065ad3e      InterlockedIncrement(&__return_2[-1]);
0065ad48      void* __offset(FileNodeName_Binary, -0x14) esi_1 = ((char*)__return_1 - 0x14);
0065ad48      
0065ad5b      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0065ad63          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0065ad63      
0065ad6a      return __return;
0065ad10  }

0065ad6d                                         cc cc cc                                                               ...

0065ad70  class PStringBase<char>* __thiscall FileNodeName_Guid::ToPString(class FileNodeName_Guid const* this, class PStringBase<char>* __return)

0065ad70  {
0065ad79      Turbine_GUID::ToString(&this->m_name, __return);
0065ad81      return __return;
0065ad70  }

0065ad84              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0065ad90  void SB_As32Bit_Compressed::Serialize<int32_t,unsigned long>(int32_t const& arg1, unsigned long& arg2, class Archive& arg3)

0065ad90  {
0065ad94      class Archive& esi = arg3;
0065ad98      char eax = esi->m_flags;
0065ad9d      uint8_t var_8;
0065ad9d      
0065ad9d      if ((eax & 1) != 0)
0065ad9d      {
0065ada7          unsigned long eax_1 = *(uint32_t*)arg2;
0065ada7          
0065adad          if (eax_1 > 0x7f)
0065adad          {
0065adca              if (eax_1 <= 0x3fff)
0065adca              {
0065adcf                  eax_1 = *(uint8_t*)arg2;
0065add9                  arg3 = (*(uint8_t*)((char*)arg2 + 1) | 0x80);
0065addd                  var_8 = eax_1;
0065ade1                  Serializer::SerializePrimitive<unsigned char>(&arg3, esi);
0065adec                  Serializer::SerializePrimitive<unsigned char>(&var_8, esi);
0065adf8                  return;
0065adca              }
0065adca              
0065ae00              unsigned long var_4 = eax_1;
0065ae0f              arg3 = (((int8_t)(eax_1 >> 0x18)) | 0xc0);
0065ae13              var_8 = ((int8_t)(eax_1 >> 0x10));
0065ae17              Serializer::SerializePrimitive<unsigned char>(&arg3, esi);
0065ae22              Serializer::SerializePrimitive<unsigned char>(&var_8, esi);
0065ae2d              Serializer::SerializePrimitive<unsigned short>(&var_4, esi);
0065ae39              return;
0065adad          }
0065adad          
0065adb4          arg3 = eax_1;
0065adb8          Serializer::SerializePrimitive<unsigned char>(&arg3, esi);
0065adc4          return;
0065ad9d      }
0065ad9d      
0065ae3e      if ((!(eax) & 1) != 0)
0065ae3e      {
0065ae47          Serializer::SerializePrimitive<unsigned char>(&arg3, esi);
0065ae4c          int32_t ebx;
0065ae4c          ebx = arg3;
0065ae4c          
0065ae55          if (ebx < 0)
0065ae55          {
0065ae5d              Serializer::SerializePrimitive<unsigned char>(&arg3, esi);
0065ae5d              
0065ae68              if ((ebx & 0x40) == 0)
0065ae68              {
0065ae9d                  ebx &= 0x7f;
0065aea2                  unsigned long eax_5;
0065aea2                  *(uint8_t*)((char*)eax_5)[1] = ebx;
0065aea6                  eax_5 = arg3;
0065aeaa                  *(uint32_t*)arg2 = eax_5;
0065aeaf                  return;
0065ae68              }
0065ae68              
0065ae70              ebx &= 0x3f;
0065ae73              Serializer::SerializePrimitive<unsigned short>(&var_8, esi);
0065ae83              int32_t eax_2;
0065ae83              *(uint8_t*)((char*)eax_2)[1] = ebx;
0065ae8a              eax_2 = arg3;
0065ae93              *(uint32_t*)arg2 = ((eax_2 << 0x10) | ((uint32_t)var_8));
0065ae98              return;
0065ae55          }
0065ae55          
0065aeb7          *(uint32_t*)arg2 = ((uint32_t)ebx);
0065ae3e      }
0065ad90  }

0065aebf                                                                                               cc                                 .

0065aec0  void Serializer::SerializePrimitive<unsigned short>(uint16_t* arg1, class Archive* arg2)

0065aec0  {
0065aec9      Archive::CheckAlignment(arg2, 2);
0065aed2      uint8_t* eax = Archive::GetBytes(arg2, 2);
0065aed2      
0065aed9      if (eax != 0)
0065aed9      {
0065aedf          int16_t* ecx_2 = arg1;
0065aedf          
0065aee3          if ((arg2->m_flags & 1) != 0)
0065aee3          {
0065aee8              *(uint16_t*)eax = *(uint16_t*)ecx_2;
0065aeec              return;
0065aee3          }
0065aee3          
0065aeed          eax = *(uint16_t*)eax;
0065aef0          *(uint16_t*)ecx_2 = eax;
0065aed9      }
0065aec0  }

0065aef5                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0065af00  class PStringBase<char>* __thiscall FileNodeName_UInt32::ToPString(class FileNodeName_UInt32 const* this, class PStringBase<char>* __return)

0065af00  {
0065af00      class FileNodeName_UInt32* var_4 = this;
0065af01      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065af0f      var_4 = PStringBase<char>::s_NullBuffer_1;
0065af19      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065af1e      uint32_t m_name = this->m_name;
0065af29      PStringBase<char>::sprintf(&var_4, &data_79459c);
0065af2e      class FileNodeName_UInt32* esi_1 = var_4;
0065af3d      __return->m_charbuffer = esi_1;
0065af3f      InterlockedIncrement(&esi_1[-2]);
0065af3f      
0065af54      if ((InterlockedDecrement(&esi_1[-2]) == 0 && esi_1 != 0x14))
0065af5c          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065af5c      
0065af64      return __return;
0065af00  }

0065af67                       cc cc cc cc cc cc cc cc cc                                                         .........

0065af70  class PStringBase<char>* __thiscall FileNodeName_Int32::ToPString(class FileNodeName_Int32 const* this, class PStringBase<char>* __return)

0065af70  {
0065af70      class FileNodeName_Int32* var_4 = this;
0065af71      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065af7f      var_4 = PStringBase<char>::s_NullBuffer_1;
0065af89      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065af8e      int32_t m_name = this->m_name;
0065af99      PStringBase<char>::sprintf(&var_4, "%ld");
0065af9e      class FileNodeName_Int32* esi_1 = var_4;
0065afad      __return->m_charbuffer = esi_1;
0065afaf      InterlockedIncrement(&esi_1[-2]);
0065afaf      
0065afc4      if ((InterlockedDecrement(&esi_1[-2]) == 0 && esi_1 != 0x14))
0065afcc          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065afcc      
0065afd4      return __return;
0065af70  }

0065afd7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0065afe0  class PStringBase<char>* __thiscall FileNodeName_UInt64::ToPString(class FileNodeName_UInt64 const* this, class PStringBase<char>* __return)

0065afe0  {
0065afe0      class FileNodeName_UInt64* var_4 = this;
0065afe1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065afef      var_4 = PStringBase<char>::s_NullBuffer_1;
0065aff9      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065b001      int32_t var_14_1 = *(uint32_t*)((char*)this->m_name)[4];
0065b002      int32_t var_18 = this->m_name;
0065b00d      PStringBase<char>::sprintf(&var_4, "%I64u");
0065b012      class FileNodeName_UInt64* esi_1 = var_4;
0065b021      __return->m_charbuffer = esi_1;
0065b023      InterlockedIncrement(&esi_1[-1]);
0065b023      
0065b038      if ((InterlockedDecrement(&esi_1[-1]) == 0 && esi_1 != 0x14))
0065b040          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065b040      
0065b048      return __return;
0065afe0  }

0065b04b                                   cc cc cc cc cc                                                             .....

0065b050  class PStringBase<char>* __thiscall FileNodeName_Int64::ToPString(class FileNodeName_Int64 const* this, class PStringBase<char>* __return)

0065b050  {
0065b050      class FileNodeName_Int64* var_4 = this;
0065b051      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065b05f      var_4 = PStringBase<char>::s_NullBuffer_1;
0065b069      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065b071      int32_t var_14_1 = *(uint32_t*)((char*)this->m_name)[4];
0065b072      int32_t var_18 = this->m_name;
0065b07d      PStringBase<char>::sprintf(&var_4, "%I64d");
0065b082      class FileNodeName_Int64* esi_1 = var_4;
0065b091      __return->m_charbuffer = esi_1;
0065b093      InterlockedIncrement(&esi_1[-1]);
0065b093      
0065b0a8      if ((InterlockedDecrement(&esi_1[-1]) == 0 && esi_1 != 0x14))
0065b0b0          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065b0b0      
0065b0b8      return __return;
0065b050  }

0065b0bb                                                                                   cc cc cc cc cc                             .....

0065b0c0  class PStringBase<char>* __thiscall FileNodeName_Double::ToPString(class FileNodeName_Double const* this, class PStringBase<char>* __return)

0065b0c0  {
0065b0c0      class FileNodeName_Double* var_4 = this;
0065b0c1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065b0c6      int32_t __saved_ebx_1;
0065b0c6      int32_t __saved_ebx = __saved_ebx_1;
0065b0c7      int32_t __saved_esi_1;
0065b0c7      int32_t __saved_esi = __saved_esi_1;
0065b0c8      int32_t __saved_edi_1;
0065b0c8      int32_t __saved_edi = __saved_edi_1;
0065b0cf      var_4 = PStringBase<char>::s_NullBuffer_1;
0065b0d6      void* __offset(PSRefBufferCharData<char>, -0x10) var_14 = &PStringBase<char>::s_NullBuffer_1[-1];
0065b0d9      InterlockedIncrement();
0065b0e1      double var_18_1 = ((double)((long double)this->m_name));
0065b0e8      char const* const var_1c = "%.16g";
0065b0ee      PStringBase<char>::sprintf(&var_4, "%.16g");
0065b0f3      class FileNodeName_Double* esi_1 = var_4;
0065b101      void* __offset(FileNodeName_Double, -0x10) var_14_1 = &esi_1[-1];
0065b102      __return->m_charbuffer = esi_1;
0065b104      InterlockedIncrement();
0065b10c      void* __offset(FileNodeName_Double, -0x10) var_14_2 = &esi_1[-1];
0065b10c      
0065b119      if ((InterlockedDecrement() == 0 && esi_1 != 0x14))
0065b119      {
0065b11d          int32_t var_14_3 = 1;
0065b121          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)();
0065b119      }
0065b119      
0065b129      return __return;
0065b0c0  }

0065b12c                                      cc cc cc cc                                                              ....

0065b130  class PStringBase<char>* __thiscall FileNodeName_Float::ToPString(class FileNodeName_Float const* this, class PStringBase<char>* __return)

0065b130  {
0065b130      class FileNodeName_Float* var_4 = this;
0065b131      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065b136      int32_t __saved_ebx_1;
0065b136      int32_t __saved_ebx = __saved_ebx_1;
0065b137      int32_t __saved_esi_1;
0065b137      int32_t __saved_esi = __saved_esi_1;
0065b138      int32_t __saved_edi_1;
0065b138      int32_t __saved_edi = __saved_edi_1;
0065b13f      var_4 = PStringBase<char>::s_NullBuffer_1;
0065b146      void* __offset(PSRefBufferCharData<char>, -0x10) var_14 = &PStringBase<char>::s_NullBuffer_1[-1];
0065b149      InterlockedIncrement();
0065b151      double var_18_1 = ((double)((long double)this->m_name));
0065b158      char const* const var_1c = "%.8g";
0065b15e      PStringBase<char>::sprintf(&var_4, "%.8g");
0065b163      class FileNodeName_Float* esi_1 = var_4;
0065b171      void* __offset(FileNodeName_Float, -0x10) var_14_1 = &esi_1[-2];
0065b172      __return->m_charbuffer = esi_1;
0065b174      InterlockedIncrement();
0065b17c      void* __offset(FileNodeName_Float, -0x10) var_14_2 = &esi_1[-2];
0065b17c      
0065b189      if ((InterlockedDecrement() == 0 && esi_1 != 0x14))
0065b189      {
0065b18d          int32_t var_14_3 = 1;
0065b191          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)();
0065b189      }
0065b189      
0065b199      return __return;
0065b130  }

0065b19c                                                                                      cc cc cc cc                              ....

0065b1a0  class PStringBase<char>* __thiscall FileNodeName_CellID::ToPString(class FileNodeName_CellID const* this, class PStringBase<char>* __return)

0065b1a0  {
0065b1a0      class FileNodeName_CellID* var_4 = this;
0065b1a1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065b1af      var_4 = PStringBase<char>::s_NullBuffer_1;
0065b1b9      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065b1bf      uint32_t id = ((uint32_t)this->m_name.id);
0065b1ca      PStringBase<char>::sprintf(&var_4, "0x%04X");
0065b1cf      class FileNodeName_CellID* esi_1 = var_4;
0065b1de      __return->m_charbuffer = esi_1;
0065b1e0      InterlockedIncrement(&esi_1[-2]);
0065b1e0      
0065b1f5      if ((InterlockedDecrement(&esi_1[-2]) == 0 && esi_1 != 0x14))
0065b1fd          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065b1fd      
0065b205      return __return;
0065b1a0  }

0065b208                          cc cc cc cc cc cc cc cc                                                          ........

0065b210  class PStringBase<char>* __thiscall FileNodeName_InstanceID::ToPString(class FileNodeName_InstanceID const* this, class PStringBase<char>* __return)

0065b210  {
0065b210      class FileNodeName_InstanceID* var_4 = this;
0065b211      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065b21f      var_4 = PStringBase<char>::s_NullBuffer_1;
0065b229      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065b231      int32_t var_14_1 = *(uint32_t*)((char*)this->m_name.id)[4];
0065b232      int32_t var_18 = this->m_name.id;
0065b23d      PStringBase<char>::sprintf(&var_4, "0x%016I64X");
0065b242      class FileNodeName_InstanceID* esi_1 = var_4;
0065b251      __return->m_charbuffer = esi_1;
0065b253      InterlockedIncrement(&esi_1[-1]);
0065b253      
0065b268      if ((InterlockedDecrement(&esi_1[-1]) == 0 && esi_1 != 0x14))
0065b270          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065b270      
0065b278      return __return;
0065b210  }

0065b27b                                                                                   cc cc cc cc cc                             .....

0065b280  class PStringBase<char>* __thiscall FileNodeName_Hex::ToPString(class FileNodeName_Hex const* this, class PStringBase<char>* __return)

0065b280  {
0065b280      class FileNodeName_Hex* var_4 = this;
0065b281      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065b28f      var_4 = PStringBase<char>::s_NullBuffer_1;
0065b299      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065b29e      uint32_t m_name = this->m_name;
0065b2a9      PStringBase<char>::sprintf(&var_4, "0x%08x");
0065b2ae      class FileNodeName_Hex* esi_1 = var_4;
0065b2bd      __return->m_charbuffer = esi_1;
0065b2bf      InterlockedIncrement(&esi_1[-2]);
0065b2bf      
0065b2d4      if ((InterlockedDecrement(&esi_1[-2]) == 0 && esi_1 != 0x14))
0065b2dc          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065b2dc      
0065b2e4      return __return;
0065b280  }

0065b2e7                       cc cc cc cc cc cc cc cc cc                                                         .........

0065b2f0  class PStringBase<char>* __thiscall FileNodeName_LongHex::ToPString(class FileNodeName_LongHex const* this, class PStringBase<char>* __return)

0065b2f0  {
0065b2f0      class FileNodeName_LongHex* var_4 = this;
0065b2f1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065b2ff      var_4 = PStringBase<char>::s_NullBuffer_1;
0065b309      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065b311      int32_t var_14_1 = *(uint32_t*)((char*)this->m_name)[4];
0065b312      int32_t var_18 = this->m_name;
0065b31d      PStringBase<char>::sprintf(&var_4, "0x%16x");
0065b322      class FileNodeName_LongHex* esi_1 = var_4;
0065b331      __return->m_charbuffer = esi_1;
0065b333      InterlockedIncrement(&esi_1[-1]);
0065b333      
0065b348      if ((InterlockedDecrement(&esi_1[-1]) == 0 && esi_1 != 0x14))
0065b350          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065b350      
0065b358      return __return;
0065b2f0  }

0065b35b                                                                                   cc cc cc cc cc                             .....

0065b360  uint8_t __fastcall RGBAColor::IsValid(class RGBAColor const* this)

0065b360  {
0065b363      (((long double)this->a) - ((long double)-0.000199999995f));
0065b36b      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0065b36e      int16_t eax;
0065b36e      
0065b36e      if (p)
0065b36e      {
0065b372          (((long double)this->r) - ((long double)-0.000199999995f));
0065b37a          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
0065b37a          
0065b37d          if (p_1)
0065b37d          {
0065b382              (((long double)this->g) - ((long double)-0.000199999995f));
0065b38a              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
0065b38a              
0065b38d              if (p_2)
0065b38d              {
0065b392                  (((long double)this->b) - ((long double)-0.000199999995f));
0065b39a                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
0065b39a                  
0065b39d                  if (p_3)
0065b39d                  {
0065b39f                      long double x87_r7_4 = ((long double)this->a);
0065b3a2                      long double temp4_1 = ((long double)1.00020003f);
0065b3a2                      (x87_r7_4 - temp4_1);
0065b3a2                      
0065b3ad                      if ((*(uint8_t*)((char*)((((x87_r7_4 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp4_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0065b3ad                      {
0065b3af                          long double x87_r7_5 = ((long double)this->r);
0065b3b1                          long double temp5_1 = ((long double)1.00020003f);
0065b3b1                          (x87_r7_5 - temp5_1);
0065b3b1                          
0065b3bc                          if ((*(uint8_t*)((char*)((((x87_r7_5 < temp5_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp5_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp5_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0065b3bc                          {
0065b3be                              long double x87_r7_6 = ((long double)this->g);
0065b3c1                              long double temp6_1 = ((long double)1.00020003f);
0065b3c1                              (x87_r7_6 - temp6_1);
0065b3c1                              
0065b3cc                              if ((*(uint8_t*)((char*)((((x87_r7_6 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp6_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0065b3cc                              {
0065b3ce                                  long double x87_r7_7 = ((long double)this->b);
0065b3d1                                  long double temp7_1 = ((long double)1.00020003f);
0065b3d1                                  (x87_r7_7 - temp7_1);
0065b3d1                                  
0065b3dc                                  if ((*(uint8_t*)((char*)((((x87_r7_7 < temp7_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp7_1))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp7_1) ? 1 : 0) << 0xe) | 0)))))[1] & 0x41) != 0)
0065b3dc                                  {
0065b3e1                                      eax = 1;
0065b3e3                                      return 1;
0065b3dc                                  }
0065b3cc                              }
0065b3bc                          }
0065b3ad                      }
0065b39d                  }
0065b38d              }
0065b37d          }
0065b36e      }
0065b36e      
0065b3de      eax = 0;
0065b3e0      return 0;
0065b360  }

0065b3e4              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0065b3f0  void __thiscall RGBAColor::Serialize(class RGBAColor* this, class Archive* arg2)

0065b3f0  {
0065b3fd      uint32_t ebp;
0065b3fd      
0065b3fd      if ((arg2->m_flags & 1) == 0)
0065b41a          ebp = arg2;
0065b3fd      else
0065b416          ebp = RGBAColor::MakeRGBA(this->r, this->g, this->b, this->a);
0065b416      
0065b422      Archive::CheckAlignment(arg2, 4);
0065b42b      uint32_t* eax_4 = Archive::GetBytes(arg2, 4);
0065b42b      
0065b432      if (eax_4 != 0)
0065b432      {
0065b438          if ((arg2->m_flags & 1) == 0)
0065b43e              ebp = *(uint32_t*)eax_4;
0065b438          else
0065b43a              *(uint32_t*)eax_4 = ebp;
0065b432      }
0065b432      
0065b453      if (((!(arg2->m_flags) & 1) != 0 && (((int8_t)(arg2->m_flags >> 2)) & 1) == 0))
0065b458          RGBAColor::SetColor32(this, ebp);
0065b3f0  }

0065b463           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0065b470  uint8_t __thiscall RGBAColor::ToFileNode(class RGBAColor const* this, class PFileNode* arg2)

0065b470  {
0065b472      class PFileNode* edi = arg2;
0065b472      
0065b47a      if (edi != 0)
0065b47a      {
0065b47c          float r = this->r;
0065b483          arg2 = r;
0065b483          
0065b48e          if (PFileNode::MakeSubNodeAsFloat(edi, r) != 0)
0065b48e          {
0065b490              float g = this->g;
0065b498              arg2 = g;
0065b498              
0065b4a3              if (PFileNode::MakeSubNodeAsFloat(edi, g) != 0)
0065b4a3              {
0065b4a5                  float b = this->b;
0065b4aa                  arg2 = b;
0065b4aa                  
0065b4b8                  if (PFileNode::MakeSubNodeAsFloat(edi, b) != 0)
0065b4b8                  {
0065b4ba                      float a = this->a;
0065b4c2                      arg2 = a;
0065b4ce                      class PFileNode* eax_2;
0065b4ce                      eax_2 = PFileNode::MakeSubNodeAsFloat(edi, a) != 0;
0065b4d2                      return eax_2;
0065b4b8                  }
0065b4a3              }
0065b48e          }
0065b47a      }
0065b47a      
0065b4d6      class PFileNode* eax;
0065b4d6      eax = 0;
0065b4d9      return 0;
0065b470  }

0065b4dc                                                                                      cc cc cc cc                              ....

0065b4e0  uint8_t __thiscall RGBAColor::FromFileNode(class RGBAColor* this, class PFileNode const* arg2, uint8_t arg3, uint8_t arg4)

0065b4e0  {
0065b4e0      int32_t ebx;
0065b4e0      int32_t var_4 = ebx;
0065b4e1      int32_t esi;
0065b4e1      int32_t var_8 = esi;
0065b4e8      int32_t edi;
0065b4e8      int32_t var_c = edi;
0065b4e8      int32_t* esp_1 = &var_c;
0065b4e8      
0065b4eb      if (arg2 != 0)
0065b4eb      {
0065b4ed          ebx = arg4;
0065b4f3          uint32_t eax_1 = PFileNode::GetNumSubNodes(arg2);
0065b4fa          uint32_t** ecx_1;
0065b4fa          uint32_t** esp_2;
0065b4fa          uint32_t* this_1;
0065b4fa          class PFileNode* var_10;
0065b4fa          
0065b4fa          if (ebx != 0)
0065b4fa          {
0065b4ff              if (eax_1 == 4)
0065b4ff                  goto label_65b52e;
0065b4ff              
0065b501              var_10 = arg2;
0065b502              ecx_1 = &var_10;
0065b504              this_1 = "alpha color needs 4 arguments";
0065b504              esp_2 = &this_1;
0065b4fa          }
0065b4fa          else if (eax_1 == 3)
0065b522          {
0065b52e          label_65b52e:
0065b52e              bool cond:1_1 = arg3 == 0;
0065b535              var_10 = nullptr;
0065b537              uint32_t var_18;
0065b537              
0065b537              if (cond:1_1)
0065b537              {
0065b5ab                  class PFileNode* eax_5;
0065b5ab                  uint32_t* this_3;
0065b5ab                  eax_5 = arg2->vtable->GetSubNode();
0065b5ab                  
0065b5b0                  if (eax_5 != 0)
0065b5b0                  {
0065b5ba                      this_1 = &arg3;
0065b5bd                      eax_5 = PFileNode::GetNameAsUInt32(eax_5, this_1);
0065b5b0                  }
0065b5b0                  else
0065b5b2                      eax_5 = 0;
0065b5b2                  
0065b5c6                  long double x87_r7_1 = ((long double)arg3);
0065b5c6                  
0065b5cc                  if (arg3 < 0)
0065b5ce                      x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
0065b5ce                  
0065b5dc                  this->r = ((float)(x87_r7_1 * ((long double)0.00392156886f)));
0065b5dc                  
0065b5de                  if (eax_5 == 0)
0065b601                      eax_5 = 0;
0065b5de                  else
0065b5de                  {
0065b5e0                      struct PFileNode::VTable* vtable = arg2->vtable;
0065b5e2                      this_1 = 1;
0065b5e6                      eax_5 = vtable->GetSubNode(this_1);
0065b5e6                      
0065b5eb                      if (eax_5 == 0)
0065b601                          eax_5 = 0;
0065b5eb                      else
0065b5eb                      {
0065b5f1                          this_1 = &arg3;
0065b5f4                          eax_5 = PFileNode::GetNameAsUInt32(eax_5, this_1);
0065b5f4                          
0065b5fb                          if (eax_5 == 0)
0065b601                              eax_5 = 0;
0065b5fb                          else
0065b5fd                              eax_5 = 1;
0065b5eb                      }
0065b5de                  }
0065b5de                  
0065b607                  long double x87_r7_3 = ((long double)arg3);
0065b607                  
0065b60d                  if (arg3 < 0)
0065b60f                      x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
0065b60f                  
0065b61d                  this->g = ((float)(x87_r7_3 * ((long double)0.00392156886f)));
0065b61d                  
0065b620                  if (eax_5 == 0)
0065b643                      eax_5 = 0;
0065b620                  else
0065b620                  {
0065b622                      struct PFileNode::VTable* vtable_1 = arg2->vtable;
0065b624                      this_1 = 2;
0065b628                      eax_5 = vtable_1->GetSubNode(this_1);
0065b628                      
0065b62d                      if (eax_5 == 0)
0065b643                          eax_5 = 0;
0065b62d                      else
0065b62d                      {
0065b633                          this_1 = &arg3;
0065b636                          eax_5 = PFileNode::GetNameAsUInt32(eax_5, this_1);
0065b636                          
0065b63d                          if (eax_5 == 0)
0065b643                              eax_5 = 0;
0065b63d                          else
0065b63f                              eax_5 = 1;
0065b62d                      }
0065b620                  }
0065b620                  
0065b649                  long double x87_r7_5 = ((long double)arg3);
0065b649                  
0065b64f                  if (arg3 < 0)
0065b651                      x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
0065b651                  
0065b65f                  this->b = ((float)(x87_r7_5 * ((long double)0.00392156886f)));
0065b65f                  
0065b662                  if (ebx == 0)
0065b69d                      this->a = 1f;
0065b662                  else
0065b662                  {
0065b666                      if (eax_5 == 0)
0065b67e                          eax_5 = 0;
0065b666                      else
0065b666                      {
0065b66c                          this_1 = &arg3;
0065b66d                          var_18 = 3;
0065b66d                          
0065b678                          if (PFileNode::GetSubName(arg2, var_18, this_1) == 0)
0065b67e                              eax_5 = 0;
0065b678                          else
0065b67a                              eax_5 = 1;
0065b666                      }
0065b666                      
0065b680                      this_3 = arg3;
0065b684                      long double x87_r7_7 = ((long double)arg3);
0065b684                      
0065b68a                      if (this_3 < 0)
0065b68c                          x87_r7_7 = (x87_r7_7 + ((long double)4.2949673e+09f));
0065b68c                      
0065b698                      this->a = ((float)(x87_r7_7 * ((long double)0.00392156886f)));
0065b662                  }
0065b662                  
0065b6a6                  if (eax_5 != 0)
0065b6a6                      goto label_65b6b7;
0065b6a6                  
0065b6a8                  this_1 = this_3;
0065b6a9                  ecx_1 = &this_1;
0065b6ab                  var_18 = "reading as integers failed for c…";
0065b6ab                  esp_2 = &var_18;
0065b537              }
0065b537              else
0065b537              {
0065b53b                  class PFileNode* eax_3;
0065b53b                  uint32_t* this_2;
0065b53b                  eax_3 = arg2->vtable->GetSubNode();
0065b53b                  
0065b540                  if (eax_3 == 0)
0065b574                      eax_3 = 0;
0065b540                  else
0065b540                  {
0065b542                      this_1 = this;
0065b545                      eax_3 = PFileNode::GetNameAsFloat(eax_3, this_1);
0065b545                      
0065b54c                      if (eax_3 == 0)
0065b574                          eax_3 = 0;
0065b54c                      else
0065b54c                      {
0065b551                          this_1 = &this->g;
0065b552                          var_18 = 1;
0065b556                          eax_3 = PFileNode::GetSubName(arg2, var_18, this_1);
0065b556                          
0065b55d                          if (eax_3 == 0)
0065b574                              eax_3 = 0;
0065b55d                          else
0065b55d                          {
0065b562                              this_1 = &this->b;
0065b563                              var_18 = 2;
0065b567                              eax_3 = PFileNode::GetSubName(arg2, var_18, this_1);
0065b567                              
0065b56e                              if (eax_3 == 0)
0065b574                                  eax_3 = 0;
0065b56e                              else
0065b570                                  eax_3 = 1;
0065b55d                          }
0065b54c                      }
0065b540                  }
0065b540                  
0065b578                  if (ebx == 0)
0065b578                  {
0065b58d                      this->a = 1f;
0065b594                  label_65b594:
0065b594                      
0065b596                      if (eax_3 == 0)
0065b596                          goto label_65b59c;
0065b596                      
0065b6b7                  label_65b6b7:
0065b6b7                      
0065b6be                      if (RGBAColor::IsValid(this) != 0)
0065b6d2                          return 1;
0065b6d2                      
0065b6c0                      this_1 = this;
0065b6c1                      ecx_1 = &this_1;
0065b6c3                      var_18 = "Not a valid color";
0065b6c3                      esp_2 = &var_18;
0065b578                  }
0065b578                  else
0065b578                  {
0065b57c                      if (eax_3 != 0)
0065b57c                      {
0065b581                          this_1 = &this->a;
0065b582                          var_18 = 3;
0065b586                          eax_3 = PFileNode::GetSubName(arg2, var_18, this_1);
0065b58b                          goto label_65b594;
0065b57c                      }
0065b57c                      
0065b59c                  label_65b59c:
0065b59c                      this_1 = this_2;
0065b59d                      ecx_1 = &this_1;
0065b59f                      var_18 = "read failed for color";
0065b59f                      esp_2 = &var_18;
0065b578                  }
0065b537              }
0065b522          }
0065b522          else
0065b522          {
0065b524              var_10 = arg2;
0065b525              ecx_1 = &var_10;
0065b527              this_1 = "non-alpha color needs 3 argument…";
0065b527              esp_2 = &this_1;
0065b522          }
0065b509          PStringBase<char>::PStringBase<char>(ecx_1);
0065b50e          *(uint32_t*)esp_2 = arg2;
0065b50f          PFileNode::ReportError();
0065b514          esp_1 = &esp_2[2];
0065b4eb      }
0065b4eb      
0065b517      int32_t eax;
0065b517      eax = 0;
0065b519      *(uint32_t*)esp_1;
0065b519      esp_1[1];
0065b519      esp_1[2];
0065b51c      return 0;
0065b4e0  }

0065b6d5                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0065b6e0  uint8_t __thiscall Vector3::ToFileNode(class Vector3 const* this, class PFileNode* arg2)

0065b6e0  {
0065b6e2      class PFileNode* edi = arg2;
0065b6e2      
0065b6ea      if ((edi != 0 && Vector3Math::IsValid(this) != 0))
0065b6ea      {
0065b6f9          float x = this->x;
0065b700          arg2 = x;
0065b700          
0065b70b          if (PFileNode::MakeSubNodeAsFloat(edi, x) != 0)
0065b70b          {
0065b70d              float y = this->y;
0065b715              arg2 = y;
0065b715              
0065b720              if (PFileNode::MakeSubNodeAsFloat(edi, y) != 0)
0065b720              {
0065b722                  float z = this->z;
0065b727                  arg2 = z;
0065b736                  class PFileNode* eax_2;
0065b736                  eax_2 = PFileNode::MakeSubNodeAsFloat(edi, z) != 0;
0065b73a                  return eax_2;
0065b720              }
0065b70b          }
0065b6ea      }
0065b6ea      
0065b73e      class PFileNode* eax;
0065b73e      eax = 0;
0065b741      return 0;
0065b6e0  }

0065b744              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0065b750  uint8_t __thiscall Vector3::FromFileNode(class Vector3* this, class PFileNode const* arg2)

0065b750  {
0065b75a      if (arg2 != 0)
0065b75a      {
0065b76a          char* var_10_1;
0065b76a          class Vector3* this_1;
0065b76a          class Vector3** ecx_1;
0065b76a          
0065b76a          if (PFileNode::GetNumSubNodes(arg2) == 3)
0065b76a          {
0065b776              struct PFileNode::VTable* vtable = arg2->vtable;
0065b778              this_1 = nullptr;
0065b77c              class PFileNode* eax_2 = vtable->GetSubNode(this_1);
0065b77f              this_1 = this;
0065b782              uint8_t eax_3;
0065b782              class Vector3* this_2;
0065b782              eax_3 = PFileNode::GetNameAsFloat(eax_2, this_1);
0065b782              
0065b789              if (eax_3 != 0)
0065b789              {
0065b78b                  struct PFileNode::VTable* vtable_1 = arg2->vtable;
0065b78d                  this_1 = 1;
0065b791                  class PFileNode* eax_4 = vtable_1->GetSubNode(this_1);
0065b797                  this_1 = &this->y;
0065b79a                  uint8_t eax_5;
0065b79a                  eax_5 = PFileNode::GetNameAsFloat(eax_4, this_1);
0065b79a                  
0065b7a1                  if (eax_5 != 0)
0065b7a1                  {
0065b7a3                      struct PFileNode::VTable* vtable_2 = arg2->vtable;
0065b7a5                      this_1 = 2;
0065b7a9                      class PFileNode* eax_6 = vtable_2->GetSubNode(this_1);
0065b7af                      this_1 = &this->z;
0065b7b2                      uint8_t eax_7;
0065b7b2                      eax_7 = PFileNode::GetNameAsFloat(eax_6, this_1);
0065b7b2                      
0065b7b9                      if (eax_7 != 0)
0065b7b9                      {
0065b7bb                          this_1 = this;
0065b7cb                          return Vector3Math::IsValid(this_1) != 0;
0065b7b9                      }
0065b7a1                  }
0065b789              }
0065b789              
0065b7ce              this_1 = this_2;
0065b7cf              ecx_1 = &this_1;
0065b7d1              var_10_1 = "Invalid vector";
0065b76a          }
0065b76a          else
0065b76a          {
0065b76c              this_1 = arg2;
0065b76d              ecx_1 = &this_1;
0065b76f              var_10_1 = "Invalid number of components in …";
0065b76a          }
0065b76a          
0065b7d6          PStringBase<char>::PStringBase<char>(ecx_1, var_10_1);
0065b7dc          PFileNode::ReportError(arg2, this_1);
0065b75a      }
0065b75a      
0065b7e5      int32_t eax;
0065b7e5      eax = 0;
0065b7e8      return 0;
0065b750  }

0065b7eb                                   cc cc cc cc cc                                                             .....

0065b7f0  void __thiscall PFileNode::SetLineNumber(class PFileNode* this, uint16_t arg2)

0065b7f0  {
0065b7f5      this->line_number = arg2;
0065b7f0  }

0065b7fc                                                                                      cc cc cc cc                              ....

0065b800  void __thiscall PFileNode::SetColumnNumber(class PFileNode* this, uint16_t arg2)

0065b800  {
0065b805      this->column_number = arg2;
0065b800  }

0065b80c                                      cc cc cc cc                                                              ....

0065b810  class PFileNode const* __fastcall PFileNodeIter::Curr(class PFileNodeIter const* this)

0065b810  {
0065b810      class PFileNode* file_node = this->file_node;
0065b810      
0065b814      if (file_node != 0)
0065b822          return file_node->vtable->GetSubNode(this->curr_index);
0065b822      
0065b816      return file_node;
0065b810  }

0065b823           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0065b830  uint8_t __thiscall SmartArray<PFileNode *,1>::RemoveOrderedByIndex(class SmartArray<PFileNode *,1>* this, uint32_t arg2)

0065b830  {
0065b832      uint32_t m_num = this->m_num;
0065b832      
0065b83c      if (arg2 >= m_num)
0065b83c      {
0065b874          m_num = 0;
0065b877          return 0;
0065b83c      }
0065b83c      
0065b83e      class PFileNode** m_data = this->m_data;
0065b844      void* edi = &m_data[arg2];
0065b847      void* ecx = &m_data[(m_num - 1)];
0065b84c      this->m_num = (m_num - 1);
0065b84c      
0065b84f      if (edi < ecx)
0065b85f          __builtin_memcpy(edi, ((char*)edi + 4), ((((((char*)ecx - edi) - 1) >> 2) + 1) << 2));
0065b85f      
0065b864      this->m_data[this->m_num] = 0;
0065b86e      uint32_t eax_1;
0065b86e      eax_1 = 1;
0065b871      return 1;
0065b830  }

0065b87a                                                                                cc cc cc cc cc cc                            ......

0065b880  class PFileNode** _STL::__find<PFileNode * const *,PFileNode const *>(class PFileNode** arg1, class PFileNode** arg2, class PFileNode const** arg3, struct _STL::random_access_iterator_tag const* arg4)

0065b880  {
0065b880      class PFileNode** eax = arg1;
0065b88d      int32_t i = (((char*)arg2 - eax) >> 4);
0065b88d      
0065b897      if (i > 0)
0065b897      {
0065b899          class PFileNode* edx_1 = *(uint32_t*)arg3;
0065b899          
0065b8c1          do
0065b8c1          {
0065b8a2              if (*(uint32_t*)eax == edx_1)
0065b8f5                  return eax;
0065b8f5              
0065b8a4              eax = &eax[1];
0065b8a4              
0065b8a9              if (*(uint32_t*)eax == edx_1)
0065b8f5                  return eax;
0065b8f5              
0065b8ab              eax = &eax[1];
0065b8ab              
0065b8b0              if (*(uint32_t*)eax == edx_1)
0065b8f5                  return eax;
0065b8f5              
0065b8b2              eax = &eax[1];
0065b8b2              
0065b8b7              if (*(uint32_t*)eax == edx_1)
0065b8f5                  return eax;
0065b8f5              
0065b8b9              i -= 1;
0065b8bc              eax = &eax[1];
0065b8c1          } while (i > 0);
0065b897      }
0065b897      
0065b8c7      int32_t ecx_4 = (((char*)arg2 - eax) >> 2);
0065b8c7      
0065b8cd      if (ecx_4 == 1)
0065b8cd          goto label_65b8ed;
0065b8cd      
0065b8d2      if (ecx_4 == 2)
0065b8d2          goto label_65b8e4;
0065b8d2      
0065b8d7      if (ecx_4 != 3)
0065b8f1          return arg2;
0065b8f1      
0065b8dd      if (*(uint32_t*)eax != *(uint32_t*)arg3)
0065b8dd      {
0065b8df          eax = &eax[1];
0065b8e4      label_65b8e4:
0065b8e4          
0065b8e6          if (*(uint32_t*)eax != *(uint32_t*)arg3)
0065b8e6          {
0065b8e8              eax = &eax[1];
0065b8ed          label_65b8ed:
0065b8ed              
0065b8ef              if (*(uint32_t*)eax != *(uint32_t*)arg3)
0065b8f1                  return arg2;
0065b8e6          }
0065b8dd      }
0065b8dd      
0065b8f5      return eax;
0065b880  }

0065b89d                                                                                         8d 49 00                               .I.
0065b8f6                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0065b900  class PFileNode** _STL::__median<PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, class PFileNode** arg3, uint8_t (* arg4)(class PFileNode const*, class PFileNode const*))

0065b900  {
0065b921      if (arg4(*(uint32_t*)arg1, *(uint32_t*)arg2) == 0)
0065b921      {
0065b95f          if (arg4(*(uint32_t*)arg1, *(uint32_t*)arg3) == 0)
0065b95f          {
0065b971              if (arg4(*(uint32_t*)arg2, *(uint32_t*)arg3) != 0)
0065b979                  return arg3;
0065b979              
0065b973              return arg2;
0065b95f          }
0065b921      }
0065b921      else
0065b921      {
0065b931          if (arg4(*(uint32_t*)arg2, *(uint32_t*)arg3) != 0)
0065b973              return arg2;
0065b973          
0065b941          if (arg4(*(uint32_t*)arg1, *(uint32_t*)arg3) != 0)
0065b949              return arg3;
0065b921      }
0065b921      
0065b950      return arg1;
0065b900  }

0065b97a                                                                                cc cc cc cc cc cc                            ......

0065b980  void _STL::__unguarded_linear_insert<PFileNode * *,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode* arg2, uint8_t (* arg3)(class PFileNode const*, class PFileNode const*))

0065b980  {
0065b98c      class PFileNode** edi = arg1;
0065b993      void* esi = &edi[-1];
0065b993      
0065b99f      if (arg3(arg2, edi[-1]) != 0)
0065b99f      {
0065b9b6          char i;
0065b9b6          
0065b9b6          do
0065b9b6          {
0065b9a3              *(uint32_t*)edi = *(uint32_t*)esi;
0065b9a5              int32_t edx_1 = *(uint32_t*)((char*)esi - 4);
0065b9a8              edi = esi;
0065b9aa              esi -= 4;
0065b9af              i = arg3(arg2, edx_1);
0065b9b6          } while (i != 0);
0065b99f      }
0065b99f      
0065b9b8      *(uint32_t*)edi = arg2;
0065b980  }

0065b9bf                                                                                               cc                                 .

0065b9c0  void _STL::__push_heap<PFileNode * *,int,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, int32_t arg2, int32_t arg3, class PFileNode* arg4, uint8_t (* arg5)(class PFileNode const*, class PFileNode const*))

0065b9c0  {
0065b9c2      int32_t edi = arg2;
0065b9c9      int32_t eax_1;
0065b9c9      int32_t edx;
0065b9c9      edx = HIGHD(((int64_t)(edi - 1)));
0065b9c9      eax_1 = LOWD(((int64_t)(edi - 1)));
0065b9ce      int32_t esi_1 = ((eax_1 - edx) >> 1);
0065b9ce      
0065b9d4      if (edi <= arg3)
0065b9d4      {
0065ba18          arg1[edi] = arg4;
0065ba1d          return;
0065b9d4      }
0065b9d4      
0065ba06      do
0065ba06      {
0065b9ee          if (arg5(arg1[esi_1], arg4) == 0)
0065b9ee              break;
0065b9ee          
0065b9f6          int32_t eax_6;
0065b9f6          int32_t edx_1;
0065b9f6          edx_1 = HIGHD(((int64_t)(esi_1 - 1)));
0065b9f6          eax_6 = LOWD(((int64_t)(esi_1 - 1)));
0065b9f9          arg1[edi] = arg1[esi_1];
0065b9fc          edi = esi_1;
0065ba04          esi_1 = ((eax_6 - edx_1) >> 1);
0065ba06      } while (edi > arg3);
0065ba06      
0065ba08      arg1[edi] = arg4;
0065b9c0  }

0065ba1e                                                                                            cc cc                                ..

0065ba20  struct FileNodeFileInfo* __fastcall PFileNode::GetFileInfo(class PFileNode const* this)

0065ba20  {
0065ba27      class PFileNode* this_1;
0065ba27      
0065ba27      do
0065ba27      {
0065ba20          this_1 = this;
0065ba22          this = this_1->m_pcParent;
0065ba27      } while (this != 0);
0065ba27      
0065ba2c      return this_1->m_fileInfo.m_data;
0065ba20  }

0065ba32                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0065ba40  uint32_t __fastcall PFileNode::GetNumSubNodes(class PFileNode const* this)

0065ba40  {
0065ba43      return this->sub_nodes.m_num;
0065ba40  }

0065ba44              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0065ba50  class PFileNode* __thiscall PFileNode::GetSubNode(class PFileNode* this, uint32_t arg2)

0065ba50  {
0065ba57      if (arg2 < this->sub_nodes.m_num)
0065ba64          return this->sub_nodes.m_data[arg2];
0065ba64      
0065ba5b      return 0;
0065ba50  }

0065ba67                       cc cc cc cc cc cc cc cc cc                                                         .........

0065ba70  class PFileNode const* __fastcall PFileNode::GetOnlyChild(class PFileNode const* this)

0065ba70  {
0065ba74      if (this->sub_nodes.m_num == 1)
0065ba80          return this->vtable->GetSubNode(0);
0065ba80      
0065ba78      return 0;
0065ba70  }

0065ba81     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065ba90  class PFileNode const* __fastcall PFileNode::GetLeaf(class PFileNode const* this)

0065ba90  {
0065ba94      void* const result;
0065ba94      
0065ba94      if (this->sub_nodes.m_num == 1)
0065ba9e          result = this->vtable->GetSubNode(0);
0065ba94      else
0065ba96          result = nullptr;
0065ba96      
0065baa9      if ((result != 0 && *(uint32_t*)((char*)result + 0x20) > 0))
0065baab          return nullptr;
0065baab      
0065baad      return result;
0065ba90  }

0065baae                                            cc cc                                                                ..

0065bab0  class PFileNode* __thiscall PFileNode::RemoveSubNode(class PFileNode* this, uint32_t arg2)

0065bab0  {
0065babd      if (arg2 >= this->sub_nodes.m_num)
0065badd          return nullptr;
0065badd      
0065bac3      void* result = *(int32_t*)((char*)this->vtable + 8)(arg2);
0065bacc      SmartArray<PFileNode *,1>::RemoveOrderedByIndex(&this->sub_nodes, arg2);
0065bad1      *(uint32_t*)((char*)result + 0x2c) = 0;
0065bad8      return result;
0065bab0  }


0065bae0  void __fastcall PFileNodeIter::~PFileNodeIter(class PFileNodeIter* this)

0065bae0  {
0065bae4      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->search_string.m_charbuffer - 0x14);
0065bae4      
0065baf7      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0065baff          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0065bae0  }

0065bb03           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0065bb10  class PFileNode const* __fastcall PFileNodeIter::Next(class PFileNodeIter* this)

0065bb10  {
0065bb13      class PFileNode* file_node = this->file_node;
0065bb13      
0065bb17      if ((file_node != 0 && file_node->vtable->GetSubNode(this->curr_index) != 0))
0065bb17      {
0065bb26          this->curr_index += 1;
0065bb2a          class PFileNode* file_node_1 = this->file_node;
0065bb2a          
0065bb31          if (file_node_1 != 0)
0065bb3e              return file_node_1->vtable->GetSubNode(this->curr_index);
0065bb17      }
0065bb17      
0065bb36      return 0;
0065bb10  }

0065bb3f                                                                                               cc                                 .

0065bb40  void* __thiscall FileNodeFileInfo::`scalar deleting destructor'(struct FileNodeFileInfo* this, uint32_t arg2)

0065bb40  {
0065bb46      PStringBase<unsigned short>::~PStringBase<unsigned short>(&this->m_filename);
0065bb50      this->vtable = 0x7ca074;
0065bb50      
0065bb56      if ((arg2 & 1) != 0)
0065bb59          operator delete(this);
0065bb59      
0065bb64      return this;
0065bb40  }

0065bb67                       cc cc cc cc cc cc cc cc cc                                                         .........

0065bb70  void _STL::__unguarded_insertion_sort_aux<PFileNode * *,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, class PFileNode** arg3, uint8_t (* arg4)(class PFileNode const*, class PFileNode const*))

0065bb70  {
0065bb71      class PFileNode** ebp = arg1;
0065bb71      
0065bb79      if (ebp != arg2)
0065bb79      {
0065bb7d          int32_t edi;
0065bb7d          int32_t var_10_1 = edi;
0065bb7d          
0065bbba          do
0065bbba          {
0065bb83              class PFileNode* ebx_1 = *(uint32_t*)ebp;
0065bb86              class PFileNode** esi_1 = &ebp[-1];
0065bb8b              class PFileNode** edi_2 = ebp;
0065bb8b              
0065bb96              if (arg4(ebx_1, ebp[-1]) != 0)
0065bb96              {
0065bbaf                  char i;
0065bbaf                  
0065bbaf                  do
0065bbaf                  {
0065bb9a                      *(uint32_t*)edi_2 = *(uint32_t*)esi_1;
0065bb9c                      int32_t edx_1 = esi_1[-1];
0065bb9f                      edi_2 = esi_1;
0065bba1                      esi_1 -= 4;
0065bba6                      i = arg4(ebx_1, edx_1);
0065bbaf                  } while (i != 0);
0065bb96              }
0065bb96              
0065bbb1              ebp = &ebp[1];
0065bbb8              *(uint32_t*)edi_2 = ebx_1;
0065bbba          } while (ebp != arg2);
0065bb79      }
0065bb70  }

0065bbc1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065bbd0  void _STL::__adjust_heap<PFileNode * *,int,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, int32_t arg2, int32_t arg3, class PFileNode* arg4, uint8_t (* arg5)(class PFileNode const*, class PFileNode const*))

0065bbd0  {
0065bbd1      int32_t ebx = arg2;
0065bbdb      int32_t esi = ((ebx * 2) + 2);
0065bbdf      bool cond:1 = esi != arg3;
0065bbe6      arg2 = ebx;
0065bbe6      
0065bbea      while (esi < arg3)
0065bbea      {
0065bc02          if (arg5(arg1[esi], arg1[(esi - 1)]) != 0)
0065bc04              esi -= 1;
0065bc04          
0065bc0a          arg1[ebx] = arg1[esi];
0065bc0d          ebx = esi;
0065bc0f          esi = ((esi * 2) + 2);
0065bc13          cond:1 = esi != arg3;
0065bbea      }
0065bbea      
0065bc17      if (!(cond:1))
0065bc17      {
0065bc1d          arg1[ebx] = arg1[(esi - 1)];
0065bc20          ebx = (esi - 1);
0065bc17      }
0065bc17      
0065bc34      _STL::__push_heap<PFileNode * *,int,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, ebx, arg2, arg4, arg5);
0065bbd0  }

0065bc41     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065bc50  uint8_t __thiscall PFileNode::IsKeyword(class PFileNode const* this, class PStringBase<char> const* arg2)

0065bc50  {
0065bc50      class PFileNode* var_4 = this;
0065bc51      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065bc58      var_4 = PStringBase<char>::s_NullBuffer_1;
0065bc62      int32_t ebx;
0065bc62      ebx = 0;
0065bc64      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065bc76      bool cond:0 = PFileNode::GetNameAsPString(this, &var_4) == 0;
0065bc78      class PFileNode* esi_1 = var_4;
0065bc78      
0065bc7c      if ((!(cond:0) && _stricmp(esi_1, arg2->m_charbuffer) == 0))
0065bc93          ebx = 1;
0065bc93      
0065bca8      if ((InterlockedDecrement(&esi_1[0]) == 0 && esi_1 != 0x14))
0065bcb0          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065bcb0      
0065bcb3      int32_t eax_4;
0065bcb3      eax_4 = ebx;
0065bcb7      return eax_4;
0065bc50  }

0065bcba                                                                                cc cc cc cc cc cc                            ......

0065bcc0  uint8_t PFileNodeSorter(class PFileNode const* arg1, class PFileNode const* arg2)

0065bcc0  {
0065bcc2      class PFileNode* ebx = arg1;
0065bcc8      int32_t eax;
0065bcc8      
0065bcc8      if (ebx == 0)
0065bcc8      {
0065bd77          eax = 0;
0065bd7b          return 0;
0065bcc8      }
0065bcc8      
0065bcd5      if (arg2 == 0)
0065bcd5      {
0065bd72          eax = 1;
0065bd76          return 1;
0065bcd5      }
0065bcd5      
0065bcdb      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065bcf0      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065bcf2      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0065bcf7      arg1 = PStringBase<char>::s_NullBuffer_2;
0065bcff      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0065bd08      int32_t __saved_ecx;
0065bd08      PFileNode::GetNameAsPString(ebx, &__saved_ecx);
0065bd14      PFileNode::GetNameAsPString(arg2, &arg1);
0065bd19      class PFileNode* esi = arg1;
0065bd34      ebx = _stricmp(PStringBase<char>::s_NullBuffer_1, esi) < 0;
0065bd34      
0065bd46      if ((InterlockedDecrement(&esi[0]) == 0 && esi != 0x14))
0065bd4e          *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
0065bd4e      
0065bd5f      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_1[-1]) == 0 && PStringBase<char>::s_NullBuffer_1 != 0x14))
0065bd67          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_1 + -0x14)(1);
0065bd67      
0065bd6c      int32_t eax_6;
0065bd6c      eax_6 = ebx;
0065bd70      return eax_6;
0065bcc0  }

0065bd7c                                                                                      cc cc cc cc                              ....

0065bd80  class PFileNode* __thiscall PFileNode::FindSubNode(class PFileNode* this, class PStringBase<char> const* arg2)

0065bd80  {
0065bd80      int32_t ebx;
0065bd80      int32_t var_4 = ebx;
0065bd81      int32_t esi;
0065bd81      int32_t var_8 = esi;
0065bd81      int32_t* esp_1 = &var_8;
0065bd84      int32_t esi_1 = 0;
0065bd86      int32_t result = 0;
0065bd86      
0065bd8b      if (this->sub_nodes.m_num > 0)
0065bd8b      {
0065bd91          int32_t ebp;
0065bd91          int32_t var_c_1 = ebp;
0065bd96          int32_t edi;
0065bd96          int32_t var_10 = edi;
0065bd96          int32_t* esp_2 = &var_10;
0065bda0          void* edi_1;
0065bda0          
0065bda0          while (true)
0065bda0          {
0065bda0              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065bda5              esp_2[5] = PStringBase<char>::s_NullBuffer_1;
0065bdac              *(uint32_t*)((char*)esp_2 - 4) = &PStringBase<char>::s_NullBuffer_1[-1];
0065bdad              InterlockedIncrement();
0065bdb6              int32_t ecx_1 = this->sub_nodes.m_data[esi_1];
0065bdbd              *(uint32_t*)((char*)esp_2 - 4) = &esp_2[5];
0065bdbe              PFileNode::GetNameAsPString(ecx_1);
0065bdc6              edi_1 = esp_2[5];
0065bdca              *(uint32_t*)((char*)esp_2 - 4) = arg2->m_charbuffer;
0065bdcb              *(uint32_t*)((char*)esp_2 - 8) = edi_1;
0065bdd8              bool cond:0_1 = _stricmp() == 0;
0065bddd              *(uint32_t*)((char*)esp_2 - 4) = ((char*)edi_1 - 0x10);
0065bddd              esp_2 -= 4;
0065bddd              
0065bdde              if (cond:0_1)
0065bdde                  break;
0065bdde              
0065bdec              if ((InterlockedDecrement() == 0 && edi_1 != 0x14))
0065bdec              {
0065bdee                  int32_t eax_5 = *(uint32_t*)((char*)edi_1 - 0x14);
0065bdf0                  *(uint32_t*)((char*)esp_2 - 4) = 1;
0065bdf4                  *(uint32_t*)eax_5();
0065bdec              }
0065bdec              
0065bdf6              esi_1 += 1;
0065bdf6              
0065bdfc              if (esi_1 >= this->sub_nodes.m_num)
0065bdfc              {
0065bdfe                  *(uint32_t*)esp_2;
0065bdfe                  esp_2[1];
0065bdfe                  esp_2[2];
0065bdfe                  esp_2[3];
0065be04                  return 0;
0065bdfc              }
0065bda0          }
0065bda0          
0065be0a          int32_t result_1 = this->sub_nodes.m_data[esi_1];
0065be0a          
0065be19          if ((InterlockedDecrement() == 0 && edi_1 != 0x14))
0065be19          {
0065be1b              int32_t eax_8 = *(uint32_t*)((char*)edi_1 - 0x14);
0065be1d              *(uint32_t*)((char*)esp_2 - 4) = 1;
0065be21              *(uint32_t*)eax_8();
0065be19          }
0065be19          
0065be23          *(uint32_t*)esp_2;
0065be24          result = result_1;
0065be23          esp_2[1];
0065be26          esp_1 = &esp_2[2];
0065bd8b      }
0065bd8b      
0065be27      *(uint32_t*)esp_1;
0065be27      esp_1[1];
0065be29      return result;
0065bd80  }

0065bd99                                                                             8d a4 24 00 00 00 00                           ..$....
0065be2c                                      cc cc cc cc                                                              ....

0065be30  class PFileNode const* __thiscall PFileNode::FindSubNode(class PFileNode const* this, class PStringBase<char> const* arg2)

0065be30  {
0065be30      /* tailcall */
0065be30      return PFileNode::FindSubNode(this, arg2);
0065be30  }

0065be35                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0065be40  uint8_t __thiscall PFileNode::ClearComments(class PFileNode* this, uint8_t arg2)

0065be40  {
0065be40      class PFileNode* this_1 = this;
0065be45      class PSRefBufferCharData<char>* m_charbuffer = this->comment_string.m_charbuffer;
0065be4f      *(uint8_t*)((char*)this_1)[3] = 1;
0065be4f      
0065be54      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0065be54      {
0065be69          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0065be71              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0065be71          
0065be73          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065be7e          this->comment_string.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0065be81          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0065be54      }
0065be54      
0065be87      int32_t ebx = arg2;
0065be87      
0065be8d      if (ebx != 0)
0065be8d      {
0065be8f          int32_t i = 0;
0065be8f          
0065be94          if (this->sub_nodes.m_num > 0)
0065be94          {
0065beb4              do
0065beb4              {
0065bea1                  uint8_t edi;
0065bea1                  m_charbuffer = PFileNode::ClearComments(*(int32_t*)((char*)this->vtable + 8)(i, ebx), edi);
0065bea1                  
0065bea8                  if (m_charbuffer == 0)
0065beaa                      *(uint8_t*)((char*)this_1)[3] = m_charbuffer;
0065beaa                  
0065beae                  i += 1;
0065beb4              } while (i < this->sub_nodes.m_num);
0065be94          }
0065be8d      }
0065be8d      
0065beb6      m_charbuffer = *(uint8_t*)((char*)this_1)[3];
0065bebe      return m_charbuffer;
0065be40  }

0065bec1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065bed0  void __fastcall PFileNode::ReportErrorInternal(class PFileNode const* this, class PStringBase<char> const* arg2)

0065bed0  {
0065bed0      class PFileNode* var_4 = this;
0065bed1      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065bed7      var_4 = PStringBase<char>::s_NullBuffer_1;
0065bee1      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065beee      PFileNode::GetNameAsPString(this, &var_4);
0065bef3      class PFileNode* m_pcParent = this->m_pcParent;
0065bef8      struct FileNodeFileInfo* m_data;
0065bef8      
0065bef8      if (m_pcParent != 0)
0065beff          m_data = PFileNode::GetFileInfo(m_pcParent);
0065bef8      else
0065befa          m_data = this->m_fileInfo.m_data;
0065befa      
0065bf04      class PFileNode* esi_1 = var_4;
0065bf08      m_data->m_errorCount += 1;
0065bf08      
0065bf20      if ((InterlockedDecrement(&esi_1[0]) == 0 && esi_1 != 0x14))
0065bf28          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065bed0  }

0065bf2f                                               cc                                                                 .

0065bf30  void __fastcall PFileNode::ReportWarningInternal(class PFileNode const* this, class PStringBase<char> const* arg2)

0065bf30  {
0065bf30      class PFileNode* var_4 = this;
0065bf31      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065bf37      var_4 = PStringBase<char>::s_NullBuffer_1;
0065bf41      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0065bf4e      PFileNode::GetNameAsPString(this, &var_4);
0065bf53      class PFileNode* m_pcParent = this->m_pcParent;
0065bf58      struct FileNodeFileInfo* m_data;
0065bf58      
0065bf58      if (m_pcParent != 0)
0065bf5f          m_data = PFileNode::GetFileInfo(m_pcParent);
0065bf58      else
0065bf5a          m_data = this->m_fileInfo.m_data;
0065bf5a      
0065bf64      class PFileNode* esi_1 = var_4;
0065bf68      m_data->m_warningCount += 1;
0065bf68      
0065bf80      if ((InterlockedDecrement(&esi_1[0]) == 0 && esi_1 != 0x14))
0065bf88          *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0065bf30  }

0065bf8f                                               cc                                                                 .

0065bf90  void __thiscall PFileNodeIter::PFileNodeIter(class PFileNodeIter* this, class PFileNode const* arg2)

0065bf90  {
0065bf95      class PFileNode** this_1 = this;
0065bf97      *(uint32_t*)this_1 = arg2;
0065bf99      this_1[1] = 0;
0065bfa0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065bfac      this_1[2] = PStringBase<char>::s_NullBuffer_1;
0065bfaf      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0065bf90  }

0065bfbb                                                                                   cc cc cc cc cc                             .....

0065bfc0  void __fastcall IntrusiveSmartPointer<FileNodeFileInfo>::create(class IntrusiveSmartPointer<FileNodeFileInfo>* this)

0065bfc0  {
0065bfc4      struct FileNodeFileInfo* m_data = this->m_data;
0065bfc4      
0065bfc8      if ((m_data != 0 && (InterlockedDecrement(&m_data->m_cRef) == 0 && m_data != 0)))
0065bfdc          m_data->vtable->__vecDelDtor(1);
0065bfdc      
0065bfeb      class IntrusiveSmartPointer<FileNodeFileInfo> esi = operator new(0x14);
0065bfeb      
0065bff2      if (esi == 0)
0065bff2      {
0065c02f          this->m_data = 0;
0065c033          return;
0065bff2      }
0065bff2      
0065bff4      *(uint32_t*)(esi + 4) = 1;
0065bffb      *(uint32_t*)esi = 0x7fda1c;
0065c001      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065c00c      *(uint32_t*)(esi + 8) = PStringBase<char>::s_NullBuffer_1;
0065c00f      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0065c015      *(uint16_t*)(esi + 0xc) = 0;
0065c01b      *(uint16_t*)(esi + 0xe) = 0;
0065c021      *(uint32_t*)(esi + 0x10) = 0;
0065c028      this->m_data = esi;
0065bfc0  }

0065c034                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0065c040  uint8_t __fastcall SmartArray<PFileNode *,1>::shrink(class SmartArray<PFileNode *,1>* this)

0065c040  {
0065c046      uint32_t m_num = this->m_num;
0065c046      
0065c051      if (m_num == (this->m_sizeAndDeallocate & 0x7fffffff))
0065c051      {
0065c053          m_num = 0;
0065c056          return 0;
0065c051      }
0065c051      
0065c05a      void* edi;
0065c05a      
0065c05a      if (m_num <= 0)
0065c096          edi = nullptr;
0065c05a      else
0065c05a      {
0065c069          edi = operator new[]((m_num << 2));
0065c069          
0065c070          if (edi == 0)
0065c070          {
0065c092              void* eax;
0065c092              eax = 0;
0065c095              return 0;
0065c070          }
0065c070          
0065c072          uint32_t m_num_1 = this->m_num;
0065c075          int32_t eax_1 = (m_num_1 - 1);
0065c075          
0065c078          if ((m_num_1 - 1) >= 0)
0065c078          {
0065c08d              int32_t temp1_1;
0065c08d              
0065c08d              do
0065c08d              {
0065c080                  temp1_1 = eax_1;
0065c080                  eax_1 -= 1;
0065c089                  *(uint32_t*)(((char*)edi + (eax_1 << 2)) + 4) = this->m_data[(eax_1 + 1)];
0065c08d              } while ((temp1_1 - 1) >= 0);
0065c078          }
0065c05a      }
0065c05a      
0065c0a5      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0065c0aa          operator delete[](this->m_data);
0065c0aa      
0065c0b2      uint32_t m_num_2 = this->m_num;
0065c0b5      this->m_data = edi;
0065c0be      this->m_sizeAndDeallocate = (m_num_2 | 0x80000000);
0065c0c1      int32_t eax_3;
0065c0c1      eax_3 = 1;
0065c0c4      return 1;
0065c040  }

0065c0c5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0065c0d0  class PFileNode** _STL::__unguarded_partition<PFileNode * *,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, class PFileNode* arg3, uint8_t (* arg4)(class PFileNode const*, class PFileNode const*))

0065c0d0  {
0065c0db      class PFileNode** esi = arg2;
0065c0e0      class PFileNode** result = arg1;
0065c0e0      
0065c0e8      while (true)
0065c0e8      {
0065c0ef          if (arg4(*(uint32_t*)result, arg3) != 0)
0065c0ef          {
0065c100              char i;
0065c100              
0065c100              do
0065c100              {
0065c0f1                  int32_t ecx_1 = result[1];
0065c0f4                  result = &result[1];
0065c0f9                  i = arg4(ecx_1, arg3);
0065c100              } while (i != 0);
0065c0ef          }
0065c0ef          
0065c102          int32_t edx_1 = esi[-1];
0065c105          esi -= 4;
0065c105          
0065c111          if (arg4(arg3, edx_1) != 0)
0065c111          {
0065c122              char i_1;
0065c122              
0065c122              do
0065c122              {
0065c113                  int32_t eax_4 = esi[-1];
0065c116                  esi -= 4;
0065c11b                  i_1 = arg4(arg3, eax_4);
0065c122              } while (i_1 != 0);
0065c111          }
0065c111          
0065c126          if (result >= esi)
0065c126              break;
0065c126          
0065c128          class PFileNode* eax_5 = *(uint32_t*)result;
0065c12c          *(uint32_t*)result = *(uint32_t*)esi;
0065c12e          *(uint32_t*)esi = eax_5;
0065c130          result = &result[1];
0065c0e8      }
0065c0e8      
0065c13b      return result;
0065c0d0  }

0065c13c                                                                                      cc cc cc cc                              ....

0065c140  void _STL::__make_heap<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *),PFileNode *,int>(class PFileNode** arg1, class PFileNode** arg2, uint8_t (* arg3)(class PFileNode const*, class PFileNode const*), class PFileNode** arg4, int32_t* arg5)

0065c140  {
0065c14c      int32_t ebx_2 = (((char*)arg2 - arg1) >> 2);
0065c14c      
0065c152      if (ebx_2 >= 2)
0065c152      {
0065c15d          int32_t eax_2;
0065c15d          int32_t edx_1;
0065c15d          edx_1 = HIGHD(((int64_t)(ebx_2 - 2)));
0065c15d          eax_2 = LOWD(((int64_t)(ebx_2 - 2)));
0065c162          int32_t i = ((eax_2 - edx_1) >> 1);
0065c16c          _STL::__adjust_heap<PFileNode * *,int,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, i, ebx_2, arg1[i], arg3);
0065c16c          
0065c176          while (i != 0)
0065c176          {
0065c178              class PFileNode* ecx_1 = arg1[(i - 1)];
0065c17c              i -= 1;
0065c184              _STL::__adjust_heap<PFileNode * *,int,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, i, ebx_2, ecx_1, arg3);
0065c176          }
0065c152      }
0065c140  }

0065c195                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0065c1a0  void __fastcall PFileNode::PFileNode(class PFileNode* this)

0065c1a0  {
0065c1a6      this->m_cRef = 1;
0065c1ad      this->vtable = 0x7fda20;
0065c1b3      this->m_pcName = nullptr;
0065c1b6      this->line_number = 0;
0065c1ba      this->column_number = 0;
0065c1be      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065c1d0      this->comment_string.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0065c1d3      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0065c1d5      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0065c1e1      this->m_filename.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0065c1e4      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0065c1e6      this->sub_nodes.m_data = 0;
0065c1e9      this->sub_nodes.m_sizeAndDeallocate = 0;
0065c1ec      this->sub_nodes.m_num = 0;
0065c1ef      this->m_bProcessed = 0;
0065c1f2      this->m_fileInfo.m_data = 0;
0065c1f6      this->m_pcParent = nullptr;
0065c1f9      this->user_data = 0;
0065c1a0  }

0065c201     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065c210  void __fastcall PFileNode::Destroy(class PFileNode* this)

0065c210  {
0065c210      class PFileNode* this_1 = this;
0065c215      class IFileNodeName* m_pcName = this->m_pcName;
0065c215      
0065c21c      if (m_pcName != 0)
0065c21e          m_pcName->vtable->__vecDelDtor(1);
0065c21e      
0065c224      uint32_t m_num_1 = this->sub_nodes.m_num;
0065c229      this->m_pcName = nullptr;
0065c229      
0065c230      while (m_num_1 > 0)
0065c230      {
0065c232          m_num_1 -= 1;
0065c232          
0065c238          if (m_num_1 < this->sub_nodes.m_num)
0065c238          {
0065c243              class PFileNode* esi_1 = *(int32_t*)((char*)this->vtable + 8)(m_num_1);
0065c245              uint32_t m_num = this->sub_nodes.m_num;
0065c245              
0065c24e              if (m_num_1 < m_num)
0065c24e              {
0065c250                  class PFileNode** m_data = this->sub_nodes.m_data;
0065c256                  void* edi_1 = &m_data[m_num_1];
0065c259                  void* ecx_1 = &m_data[(m_num - 1)];
0065c25e                  this->sub_nodes.m_num = (m_num - 1);
0065c25e                  
0065c261                  if (edi_1 < ecx_1)
0065c271                      __builtin_memcpy(edi_1, ((char*)edi_1 + 4), ((((((char*)ecx_1 - edi_1) - 1) >> 2) + 1) << 2));
0065c271                  
0065c27a                  this->sub_nodes.m_data[this->sub_nodes.m_num] = 0;
0065c24e              }
0065c24e              
0065c288              esi_1->m_pcParent = nullptr;
0065c288              
0065c297              if (InterlockedDecrement(&esi_1->m_cRef) == 0)
0065c299                  esi_1->vtable->__vecDelDtor(1);
0065c238          }
0065c230      }
0065c230      
0065c2b1      this->line_number = 0;
0065c2b7      this->column_number = 0;
0065c2bd      class PSRefBufferCharData<char>* m_charbuffer = this->comment_string.m_charbuffer;
0065c2bd      
0065c2c6      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
0065c2c6      {
0065c2d7          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0065c2df              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0065c2df          
0065c2e1          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0065c2ec          this->comment_string.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0065c2ef          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0065c2c6      }
0065c2c6      
0065c2f1      this->m_bProcessed = 0;
0065c2f5      struct FileNodeFileInfo* m_data_1 = this->m_fileInfo.m_data;
0065c2f5      
0065c2fa      if ((m_data_1 != 0 && (InterlockedDecrement(&m_data_1->m_cRef) == 0 && m_data_1 != 0)))
0065c30a          m_data_1->vtable->__vecDelDtor(1);
0065c30a      
0065c312      this->m_fileInfo.m_data = 0;
0065c319      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_filename.m_charbuffer;
0065c319      
0065c322      if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer)
0065c322      {
0065c333          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
0065c33b              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0065c33b          
0065c33d          class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0065c348          this->m_filename.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0065c34b          InterlockedIncrement((PStringBase<char>::s_NullBuffer_2 - 0x10));
0065c322      }
0065c210  }

0065c353                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0065c360  uint8_t __thiscall PFileNode::RemoveSubNodePtr(class PFileNode* this, class PFileNode* arg2)

0065c360  {
0065c369      class PFileNode** m_data = this->sub_nodes.m_data;
0065c374      arg2 = arg2;
0065c387      class PFileNode** eax_1 = _STL::__find<PFileNode * const *,PFileNode const *>(m_data, &m_data[this->sub_nodes.m_num], &arg2, &arg2);
0065c387      
0065c399      if (eax_1 != &m_data[this->sub_nodes.m_num])
0065c399      {
0065c39d          eax_1 = (((char*)eax_1 - m_data) >> 2);
0065c39d          
0065c3a5          if (eax_1 != 0xffffffff)
0065c3a5          {
0065c3b2              if (eax_1 < this->sub_nodes.m_num)
0065c3b2              {
0065c3b9                  int32_t* eax_3 = *(int32_t*)((char*)this->vtable + 8)(eax_1);
0065c3c1                  SmartArray<PFileNode *,1>::RemoveOrderedByIndex(&this->sub_nodes, eax_1);
0065c3ca                  eax_3[0xb] = 0;
0065c3ca                  
0065c3d9                  if (InterlockedDecrement(&eax_3[1]) == 0)
0065c3e1                      **(uint32_t**)eax_3(1);
0065c3b2              }
0065c3b2              
0065c3e5              eax_1 = 1;
0065c3e8              return 1;
0065c3a5          }
0065c399      }
0065c399      
0065c3a9      eax_1 = 0;
0065c3ac      return 0;
0065c360  }

0065c3eb                                   cc cc cc cc cc                                                             .....

0065c3f0  void __thiscall PFileNode::InitFileInfo(class PFileNode const* this, class PStringBase<char> const* arg2)

0065c3f0  {
0065c3f8      if (this->m_fileInfo.m_data == 0)
0065c3fc          IntrusiveSmartPointer<FileNodeFileInfo>::create(&this->m_fileInfo);
0065c3fc      
0065c401      struct FileNodeFileInfo* m_data = this->m_fileInfo.m_data;
0065c401      
0065c405      if (m_data != 0)
0065c405      {
0065c407          class PSRefBufferCharData<char>* m_charbuffer = m_data->m_filename.m_charbuffer;
0065c407          
0065c411          if (m_charbuffer != arg2->m_charbuffer)
0065c411          {
0065c427              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0065c42f                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0065c42f              
0065c431              class PStringBase<char> m_charbuffer_1 = arg2->m_charbuffer;
0065c434              m_data->m_filename.m_charbuffer = m_charbuffer_1;
0065c43c              arg2 = (m_charbuffer_1 - 0x10);
0065c440              /* tailcall */
0065c440              return InterlockedIncrement();
0065c411          }
0065c405      }
0065c3f0  }

0065c44b                                   cc cc cc cc cc                                                             .....

0065c450  void SB_TypeAlloc<IFileNodeNameResolver,SB_Default>::Serialize<int,IFileNodeName *>(int32_t const* arg1, class IFileNodeName** arg2, class Archive* arg3)

0065c450  {
0065c452      class Archive* esi = arg3;
0065c45f      enum NodeNameType ebx;
0065c45f      
0065c45f      if ((esi->m_flags & 1) == 0)
0065c470          ebx = arg3;
0065c45f      else
0065c46c          ebx = IFileNodeName::GetNameType(*(uint32_t*)arg2);
0065c46c      
0065c478      arg3 = ebx;
0065c47c      Archive::CheckAlignment(esi, 1);
0065c485      char* eax_3 = Archive::GetBytes(esi, 1);
0065c485      
0065c48c      if (eax_3 != 0)
0065c48c      {
0065c492          if ((esi->m_flags & 1) == 0)
0065c492          {
0065c498              eax_3 = *(uint8_t*)eax_3;
0065c49a              arg3 = eax_3;
0065c492          }
0065c492          else
0065c494              *(uint8_t*)eax_3 = ebx;
0065c48c      }
0065c48c      
0065c4a2      if ((esi->m_flags & 5) == 0)
0065c4a4          ebx = ((uint32_t)arg3);
0065c4a4      
0065c4b1      if ((!(esi->m_flags) & 1) != 0)
0065c4bc          *(uint32_t*)arg2 = IFileNodeName::CreateFromEnum(ebx);
0065c4bc      
0065c4be      class IFileNodeName* ecx_3 = *(uint32_t*)arg2;
0065c4be      
0065c4c2      if (ecx_3 != 0)
0065c4c4          ecx_3->vtable->Serialize(esi);
0065c450  }

0065c4ce                                            cc cc                                                                ..

0065c4d0  void __fastcall PFileNode::~PFileNode(class PFileNode* this)

0065c4d0  {
0065c4d5      this->vtable = 0x7fda20;
0065c4db      PFileNode::Destroy(this);
0065c4e0      struct FileNodeFileInfo* m_data = this->m_fileInfo.m_data;
0065c4e0      
0065c4eb      if ((m_data != 0 && (InterlockedDecrement(&m_data->m_cRef) == 0 && m_data != 0)))
0065c4fb          m_data->vtable->__vecDelDtor(1);
0065c4fb      
0065c510      if ((this->sub_nodes.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0065c516          operator delete[](this->sub_nodes.m_data);
0065c516      
0065c521      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_filename.m_charbuffer - 0x14);
0065c521      
0065c530      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0065c538          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0065c538      
0065c53d      void* __offset(PSRefBufferCharData<char>, -0x14) edi_3 = (this->comment_string.m_charbuffer - 0x14);
0065c53d      
0065c54c      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0065c554          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0065c554      
0065c557      this->vtable = 0x7942f4;
0065c4d0  }


0065c560  class PStringBase<char> const* __fastcall PFileNode::GetSourceFileName(class PFileNode const* this)

0065c560  {
0065c56e      if (((*(uint8_t*)$S76) & 1) == 0)
0065c56e      {
0065c570          $S76 |= 1;
0065c580          PStringBase<char>::PStringBase<char>(&unknown_file, "<unknown>");
0065c58a          atexit($E77);
0065c56e      }
0065c56e      
0065c592      class PFileNode* m_pcParent = this->m_pcParent;
0065c597      struct FileNodeFileInfo* m_data;
0065c597      
0065c597      if (m_pcParent != 0)
0065c59e          m_data = PFileNode::GetFileInfo(m_pcParent);
0065c597      else
0065c599          m_data = this->m_fileInfo.m_data;
0065c599      
0065c5a6      if (m_data == 0)
0065c5b1          return 0x8f761c;
0065c5b1      
0065c5ab      return &m_data->m_filename;
0065c560  }

0065c5b2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0065c5c0  uint8_t __thiscall PFileNode::AddComment(class PFileNode* this, class PStringBase<char> const* arg2)

0065c5c0  {
0065c5c2      class PStringBase<char>* edi = arg2;
0065c5c6      class PSRefBufferCharData<char>* m_charbuffer = edi->m_charbuffer;
0065c5ca      int32_t ecx = m_charbuffer->m_data[-4];
0065c5ca      
0065c5d0      if (ecx != 1)
0065c5d0      {
0065c5d8          if (ecx != 1)
0065c5e2              PStringBase<char>::append_n_chars(&this->comment_string, m_charbuffer, (ecx - 1));
0065c5e2          
0065c5e7          class PSRefBufferCharData<char>* m_charbuffer_1 = edi->m_charbuffer;
0065c5e9          int32_t edx_1 = m_charbuffer_1->m_data[-4];
0065c5e9          
0065c5f2          if ((ecx - 2) < edx_1)
0065c5fa              m_charbuffer = &m_charbuffer_1->m_data[(ecx - 2)];
0065c5f2          else
0065c5f4              m_charbuffer = &m_charbuffer_1->m_data[(edx_1 - 1)];
0065c5f4          
0065c5ff          if (m_charbuffer->m_data[0] != 0xa)
0065c5ff          {
0065c60b              arg2 = 0xa;
0065c610              PStringBase<char>::append_n_chars(&this->comment_string, &arg2, 1);
0065c5ff          }
0065c5d0      }
0065c5d0      
0065c616      m_charbuffer = 1;
0065c619      return 1;
0065c5c0  }

0065c61c                                                                                      cc cc cc cc                              ....

0065c620  void PFileNode::ReportError(class PFileNode const* this, class PStringBase<char> arg2)

0065c620  {
0065c63c      class PStringBase<char>* var_8_1 = &arg2;
0065c63d      PFileNode::ReportErrorInternal(this, PStringBase<char>::vsprintf(&arg2, arg2, &arg_c));
0065c646      int32_t* esi_1 = (arg2 - 0x14);
0065c646      
0065c659      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0065c661          **(uint32_t**)esi_1(1);
0065c620  }

0065c665                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0065c670  void PFileNode::ReportWarning(class PFileNode const* this, class PStringBase<char> arg2)

0065c670  {
0065c68c      class PStringBase<char>* var_8_1 = &arg2;
0065c68d      PFileNode::ReportWarningInternal(this, PStringBase<char>::vsprintf(&arg2, arg2, &arg_c));
0065c696      int32_t* esi_1 = (arg2 - 0x14);
0065c696      
0065c6a9      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0065c6b1          **(uint32_t**)esi_1(1);
0065c670  }

0065c6b5                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0065c6c0  void _STL::__insertion_sort<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, uint8_t (* arg3)(class PFileNode const*, class PFileNode const*))

0065c6c0  {
0065c6cb      if (arg1 != arg2)
0065c6cb      {
0065c6ce          void* esi_1 = &arg1[1];
0065c6ce          
0065c6d3          if (esi_1 != arg2)
0065c6d3          {
0065c6d9              int32_t edi_2 = ((char*)esi_1 - arg1);
0065c6d9              
0065c727              do
0065c727              {
0065c6e3                  class PFileNode* ebx_1 = *(uint32_t*)esi_1;
0065c6e3                  
0065c6f0                  if (arg3(ebx_1, *(uint32_t*)arg1) == 0)
0065c715                      _STL::__unguarded_linear_insert<PFileNode * *,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(esi_1, ebx_1, arg3);
0065c6f0                  else
0065c6f0                  {
0065c6f4                      if (edi_2 > 0)
0065c700                          memmove((((char*)esi_1 - edi_2) + 4), arg1, edi_2);
0065c700                      
0065c709                      *(uint32_t*)arg1 = ebx_1;
0065c6f0                  }
0065c6f0                  
0065c71d                  esi_1 += 4;
0065c720                  edi_2 += 4;
0065c727              } while (esi_1 != arg2);
0065c6d3          }
0065c6cb      }
0065c6c0  }

0065c6dd                                                                                         8d 49 00                               .I.
0065c72e                                            cc cc                                                                ..

0065c730  void _STL::sort_heap<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, uint8_t (* arg3)(class PFileNode const*, class PFileNode const*))

0065c730  {
0065c739      void* eax = ((char*)arg2 - arg1);
0065c739      
0065c743      if ((eax & 0xfffffffc) > 4)
0065c743      {
0065c77a          void* edi_1;
0065c77a          
0065c77a          do
0065c77a          {
0065c750              class PFileNode* ecx_2 = *(uint32_t*)(((char*)arg1 + eax) - 4);
0065c756              edi_1 = ((char*)eax - 4);
0065c759              *(uint32_t*)(((char*)arg1 + eax) - 4) = *(uint32_t*)arg1;
0065c768              _STL::__adjust_heap<PFileNode * *,int,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, 0, (edi_1 >> 2), ecx_2, arg3);
0065c76d              eax = edi_1;
0065c77a          } while ((edi_1 & 0xfffffffc) > 4);
0065c743      }
0065c730  }

0065c74d                                         8d 49 00                                                               .I.

0065c780  void* __thiscall PFileNode::`scalar deleting destructor'(class PFileNode* this, uint32_t arg2)

0065c780  {
0065c783      PFileNode::~PFileNode(this);
0065c783      
0065c78d      if ((arg2 & 1) != 0)
0065c78d      {
0065c794          this->vtable = PFileNode::s_fallocPool.m_firstFreeChunk;
0065c796          PFileNode::s_fallocPool.m_firstFreeChunk = this;
0065c78d      }
0065c78d      
0065c79f      return this;
0065c780  }

0065c7a2        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065c7b0  void __thiscall PFileNode::AdoptSubNode(class PFileNode* this, class PFileNode* arg2)

0065c7b0  {
0065c7ba      if (arg2 != 0)
0065c7ba      {
0065c7c3          int32_t eax_2 = (this->sub_nodes.m_sizeAndDeallocate & 0x7fffffff);
0065c7cb          uint8_t eax_5;
0065c7cb          
0065c7cb          if (this->sub_nodes.m_num >= eax_2)
0065c7db              eax_5 = SmartArray<PFileNode *,1>::grow(&this->sub_nodes, SmartArray<PFileNode *,1>::get_new_size(&this->sub_nodes, (eax_2 + 1)));
0065c7db          
0065c7e2          if ((this->sub_nodes.m_num < eax_2 || eax_5 != 0))
0065c7e2          {
0065c7c0              this->sub_nodes.m_data[this->sub_nodes.m_num] = arg2;
0065c7c0              this->sub_nodes.m_num += 1;
0065c7e2          }
0065c7e2          
0065c7f0          arg2->m_pcParent = this;
0065c7ba      }
0065c7b0  }

0065c7f9                                                                             cc cc cc cc cc cc cc                           .......

0065c800  void SB_Container<SB_Alloc<SB_DefaultAllocator,0,SB_Default>,&SB_DEFAULT_ITEM_NAME>::Serialize<int,SmartArray<PFileNode *,1> >(int32_t const* arg1, class SmartArray<PFileNode *,1>* arg2, class Archive* arg3)

0065c800  {
0065c80c      class SmartArray<PFileNode *,1>* edi = arg2;
0065c81a      arg2 = edi->m_num;
0065c81e      SB_As32Bit_Compressed::Serialize<int32_t,unsigned long>(arg1, &arg2, arg3);
0065c82b      int32_t ebx;
0065c82b      ebx = 0;
0065c82b      
0065c82f      if ((!(arg3->m_flags) & 1) != 0)
0065c82f      {
0065c833          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
0065c838          class SmartArray<PFileNode *,1>* esi_1 = arg2;
0065c838          
0065c83e          if (esi_1 > eax_2)
0065c846              /* tailcall */
0065c846              return Archive::RaiseError(arg3);
0065c846          
0065c84b          uint32_t m_num = edi->m_num;
0065c84b          
0065c850          if (esi_1 > m_num)
0065c850          {
0065c855              SmartArray<PFileNode *,1>::grow(edi, esi_1);
0065c85a              edi->m_num = esi_1;
0065c850          }
0065c850          else if (esi_1 < m_num)
0065c85f          {
0065c863              edi->m_num = esi_1;
0065c866              SmartArray<PFileNode *,1>::shrink(edi);
0065c85f          }
0065c85f          
0065c86b          ebx = 1;
0065c82f      }
0065c82f      
0065c86d      class PFileNode** m_data = edi->m_data;
0065c86d      
0065c877      if (m_data != &m_data[edi->m_num])
0065c877      {
0065c8e9          do
0065c8e9          {
0065c888              if ((((int8_t)(arg3->m_flags >> 2)) & 1) == 0)
0065c888              {
0065c88a                  uint32_t ecx_5;
0065c88a                  ecx_5 = arg3->m_flags;
0065c88d                  ecx_5 = !(ecx_5);
0065c88d                  
0065c892                  if ((ecx_5 & 1) != 0)
0065c892                  {
0065c89b                      if (PFileNode::s_fallocPool.m_firstFreeChunk == 0)
0065c8a2                          FallocPool::AllocateNewPool(&PFileNode::s_fallocPool);
0065c8a2                      
0065c8a7                      uint8_t* m_firstFreeChunk = PFileNode::s_fallocPool.m_firstFreeChunk;
0065c8af                      PFileNode::s_fallocPool.m_firstFreeChunk = *(uint32_t*)m_firstFreeChunk;
0065c8ba                      *(uint32_t*)m_data = PFileNode::PFileNode(m_firstFreeChunk);
0065c892                  }
0065c892                  
0065c8bc                  class PFileNode* ecx_6 = *(uint32_t*)m_data;
0065c8bc                  
0065c8c0                  if (ecx_6 != 0)
0065c8cb                      ecx_6->vtable->Serialize(arg3);
0065c8c0                  else
0065c8c4                      Archive::RaiseError(arg3);
0065c888              }
0065c888              
0065c8da              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
0065c8da              {
0065c8f8                  if ((ebx == 0 || edi->m_num <= 0))
0065c8f8                      break;
0065c8f8                  
0065c8fa                  edi->m_num = 0;
0065c907                  /* tailcall */
0065c907                  return SmartArray<PFileNode *,1>::shrink(edi);
0065c8da              }
0065c8da              
0065c8e1              m_data = &m_data[1];
0065c8e9          } while (m_data != &edi->m_data[edi->m_num]);
0065c877      }
0065c800  }

0065c90c                                      cc cc cc cc                                                              ....

0065c910  void _STL::__final_insertion_sort<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, uint8_t (* arg3)(class PFileNode const*, class PFileNode const*))

0065c910  {
0065c923      if ((((char*)arg2 - arg1) & 0xfffffffc) <= 0x40)
0065c923      {
0065c94e          _STL::__insertion_sort<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, arg2, arg3);
0065c957          return;
0065c923      }
0065c923      
0065c931      _STL::__insertion_sort<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, &arg1[0x10], arg3);
0065c93b      _STL::__unguarded_insertion_sort_aux<PFileNode * *,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(&arg1[0x10], arg2, nullptr, arg3);
0065c910  }

0065c958                                                                          cc cc cc cc cc cc cc cc                          ........

0065c960  void _STL::__partial_sort<PFileNode * *,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, class PFileNode** arg3, class PFileNode** arg4, uint8_t (* arg5)(class PFileNode const*, class PFileNode const*))

0065c960  {
0065c977      _STL::__make_heap<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *),PFileNode *,int>(arg1, arg2, arg5, nullptr, nullptr);
0065c983      class PFileNode** esi = arg2;
0065c983      
0065c985      if (arg2 < arg3)
0065c985      {
0065c9b8          do
0065c9b8          {
0065c994              if (arg5(*(uint32_t*)esi, *(uint32_t*)arg1) != 0)
0065c994              {
0065c996                  class PFileNode* eax_3 = *(uint32_t*)esi;
0065c9a7                  *(uint32_t*)esi = *(uint32_t*)arg1;
0065c9a9                  _STL::__adjust_heap<PFileNode * *,int,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, 0, (((char*)arg2 - arg1) >> 2), eax_3, arg5);
0065c994              }
0065c994              
0065c9b1              esi = &esi[1];
0065c9b8          } while (esi < arg3);
0065c985      }
0065c985      
0065c9bd      _STL::sort_heap<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, arg2, arg5);
0065c960  }

0065c9ca                                cc cc cc cc cc cc                                                            ......

0065c9d0  class PFileNode* __fastcall PFileNode::MakeSubNode(class PFileNode* this)

0065c9d0  {
0065c9db      if (PFileNode::s_fallocPool.m_firstFreeChunk == 0)
0065c9e2          FallocPool::AllocateNewPool(&PFileNode::s_fallocPool);
0065c9e2      
0065c9e7      uint8_t* m_firstFreeChunk = PFileNode::s_fallocPool.m_firstFreeChunk;
0065c9ef      PFileNode::s_fallocPool.m_firstFreeChunk = *(uint32_t*)m_firstFreeChunk;
0065c9f4      class PFileNode* result = PFileNode::PFileNode(m_firstFreeChunk);
0065c9f4      
0065c9fd      if (result != 0)
0065ca02          PFileNode::AdoptSubNode(this, result);
0065ca02      
0065ca0b      return result;
0065c9d0  }

0065ca0c                                      cc cc cc cc                                                              ....

0065ca10  void __thiscall PFileNode::Serialize(class PFileNode* this, class Archive* arg2)

0065ca10  {
0065ca11      class Archive* ebx = arg2;
0065ca11      
0065ca20      if ((!(ebx->m_flags) & 1) != 0)
0065ca20      {
0065ca22          PFileNode::Destroy(this);
0065ca27          this->m_pcParent = nullptr;
0065ca20      }
0065ca20      
0065ca38      SB_TypeAlloc<IFileNodeNameResolver,SB_Default>::Serialize<int,IFileNodeName *>(&arg2, &this->m_pcName, ebx);
0065ca47      SB_Container<SB_Alloc<SB_DefaultAllocator,0,SB_Default>,&SB_DEFAULT_ITEM_NAME>::Serialize<int,SmartArray<PFileNode *,1> >(&arg2, &this->sub_nodes, ebx);
0065ca47      
0065ca57      if ((!(ebx->m_flags) & 1) != 0)
0065ca57      {
0065ca59          uint32_t m_num = this->sub_nodes.m_num;
0065ca5c          int32_t eax_1 = 0;
0065ca5c          
0065ca60          if (m_num > 0)
0065ca60          {
0065ca6f              do
0065ca6f              {
0065ca64                  void* edx_2 = this->sub_nodes.m_data[eax_1];
0065ca67                  eax_1 += 1;
0065ca6c                  *(uint32_t*)((char*)edx_2 + 0x2c) = this;
0065ca6f              } while (eax_1 < m_num);
0065ca60          }
0065ca57      }
0065ca10  }

0065ca77                                                                       cc cc cc cc cc cc cc cc cc                         .........

0065ca80  void _STL::__introsort_loop<PFileNode * *,PFileNode *,int,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, class PFileNode** arg3, int32_t arg4, uint8_t (* arg5)(class PFileNode const*, class PFileNode const*))

0065ca80  {
0065ca86      class PFileNode** edi = arg2;
0065ca8e      int32_t eax_1;
0065ca8e      eax_1 = (((char*)edi - arg1) & 0xfc);
0065ca8e      
0065ca93      if (eax_1 > 0x40)
0065ca93      {
0065caa6          while (arg4 != 0)
0065caa6          {
0065caa8              arg4 -= 1;
0065cab4              int32_t eax_5;
0065cab4              int32_t edx_1;
0065cab4              edx_1 = HIGHD(((int64_t)(((char*)edi - arg1) >> 2)));
0065cab4              eax_5 = LOWD(((int64_t)(((char*)edi - arg1) >> 2)));
0065cacd              class PFileNode** eax_10 = _STL::__unguarded_partition<PFileNode * *,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, edi, *(uint32_t*)_STL::__median<PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, &arg1[((eax_5 - edx_1) >> 1)], &edi[-1], arg5), arg5);
0065cade              _STL::__introsort_loop<PFileNode * *,PFileNode *,int,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(eax_10, edi, nullptr, arg4, arg5);
0065cae3              edi = eax_10;
0065cae3              
0065caf0              if ((((char*)eax_10 - arg1) & 0xfffffffc) <= 0x40)
0065caf6                  return;
0065caa6          }
0065caa6          
0065cafc          _STL::__partial_sort<PFileNode * *,PFileNode *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, edi, edi, nullptr, arg5);
0065ca93      }
0065ca80  }

0065ca9d                                                                                         8d 49 00                               .I.
0065cb09                             cc cc cc cc cc cc cc                                                           .......

0065cb10  void _STL::sort<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(class PFileNode** arg1, class PFileNode** arg2, uint8_t (* arg3)(class PFileNode const*, class PFileNode const*))

0065cb10  {
0065cb1c      if (arg1 != arg2)
0065cb1c      {
0065cb22          int32_t i = (((char*)arg2 - arg1) >> 2);
0065cb25          int32_t ecx_1 = 0;
0065cb25          
0065cb2a          while (i != 1)
0065cb2a          {
0065cb30              i s>>= 1;
0065cb32              ecx_1 += 1;
0065cb2a          }
0065cb2a          
0065cb48          _STL::__introsort_loop<PFileNode * *,PFileNode *,int,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, arg2, nullptr, (ecx_1 * 2), arg3);
0065cb50          _STL::__final_insertion_sort<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(arg1, arg2, arg3);
0065cb1c      }
0065cb10  }

0065cb5c                                                                                      cc cc cc cc                              ....

0065cb60  void __fastcall PFileNode::SortSubNodes(class PFileNode* this)

0065cb60  {
0065cb63      class PFileNode** m_data = this->sub_nodes.m_data;
0065cb72      _STL::sort<PFileNode * *,bool (__cdecl*)(PFileNode const *,PFileNode const *)>(m_data, &m_data[this->sub_nodes.m_num], PFileNodeSorter);
0065cb60  }

0065cb7b                                                                                   cc cc cc cc cc                             .....

0065cb80  int32_t strtoxint64(char const* arg1, char const** arg2, int32_t arg3, int32_t arg4)

0065cb80  {
0065cb91      int32_t ebx;
0065cb91      ebx = *(uint8_t*)arg1;
0065cb96      int32_t ebp = 0;
0065cb99      int32_t result = 0;
0065cb9d      char var_21 = ebx;
0065cba1      void* edi_1 = &arg1[1];
0065cba4      int32_t i;
0065cba4      int32_t ecx;
0065cba4      i = isspace(((uint32_t)ebx));
0065cba4      
0065cbab      if (i != 0)
0065cbab      {
0065cbc4          do
0065cbc4          {
0065cbb0              i = *(uint8_t*)edi_1;
0065cbb6              var_21 = i;
0065cbba              edi_1 += 1;
0065cbbd              i = isspace(((uint32_t)i));
0065cbc4          } while (i != 0);
0065cbc4          
0065cbc6          ebx = var_21;
0065cbab      }
0065cbab      
0065cbcd      if (ebx == 0x2d)
0065cbcd      {
0065cbd1          arg4 |= 2;
0065cbd6          var_21 = *(uint8_t*)edi_1;
0065cbe7          ebx = var_21;
0065cbeb          edi_1 += 1;
0065cbcd      }
0065cbcd      else if (ebx == 0x2b)
0065cbdf      {
0065cbe1          i = *(uint8_t*)edi_1;
0065cbe3          var_21 = i;
0065cbe7          ebx = var_21;
0065cbeb          edi_1 += 1;
0065cbdf      }
0065cbdf      
0065cbee      int32_t ecx_3 = arg3;
0065cbee      
0065cc06      if ((ecx_3 < 0 || (ecx_3 == 1 || ecx_3 > 0x24)))
0065cc06      {
0065ce12          if (arg2 != 0)
0065ce18              *(uint32_t*)arg2 = arg1;
0065ce18          
0065ce25          return 0;
0065cc06      }
0065cc06      
0065cc0e      if (ecx_3 != 0)
0065cc0e      {
0065cc51          if ((ecx_3 == 0x10 && ebx == 0x30))
0065cc51              goto label_65cc53;
0065cc0e      }
0065cc0e      else if (ebx == 0x30)
0065cc13      {
0065cc23          i = *(uint8_t*)edi_1;
0065cc23          
0065cc2b          if ((i == 0x78 || i == 0x58))
0065cc2b          {
0065cc3b              arg3 = 0x10;
0065cc43              ecx_3 = 0x10;
0065cc53          label_65cc53:
0065cc53              i = *(uint8_t*)edi_1;
0065cc53              
0065cc5b              if ((i == 0x78 || i == 0x58))
0065cc5b              {
0065cc63                  var_21 = *(uint8_t*)((char*)edi_1 + 1);
0065cc67                  edi_1 += 2;
0065cc5b              }
0065cc2b          }
0065cc2b          else
0065cc2b          {
0065cc2d              arg3 = 8;
0065cc35              ecx_3 = 8;
0065cc2b          }
0065cc13      }
0065cc13      else
0065cc13      {
0065cc15          arg3 = 0xa;
0065cc1d          ecx_3 = 0xa;
0065cc13      }
0065cc13      
0065cc6c      int32_t eax_2;
0065cc6c      int32_t edx_2;
0065cc6c      edx_2 = HIGHD(((int64_t)ecx_3));
0065cc6c      eax_2 = LOWD(((int64_t)ecx_3));
0065cc6d      int32_t var_38_2 = edx_2;
0065cc6e      int32_t var_3c = eax_2;
0065cc6f      int32_t var_40 = 0xffffffff;
0065cc71      int32_t var_44 = 0xffffffff;
0065cc7b      int32_t eax_3;
0065cc7b      int32_t ecx_4;
0065cc7b      int32_t edx_3;
0065cc7b      eax_3 = _aulldvrm();
0065cc84      int32_t var_c = ebx;
0065cc84      
0065cc90      while (true)
0065cc90      {
0065cc90          ebx = var_21;
0065cc94          uint32_t esi_1 = ((uint32_t)ebx);
0065cca3          int32_t esi_3;
0065cca3          
0065cca3          if (isdigit(esi_1) == 0)
0065cca3          {
0065ccb9              if (isalpha(esi_1) == 0)
0065ccb9                  break;
0065ccb9              
0065ccce              esi_3 = (toupper(((int32_t)ebx)) - 0x37);
0065cca3          }
0065cca3          else
0065cca8              esi_3 = (((int32_t)ebx) - 0x30);
0065cca8          
0065ccd5          if (esi_3 >= arg3)
0065ccd5              break;
0065ccd5          
0065ccdb          arg4 |= 8;
0065ccdb          
0065ccee          if ((ebp >= edx_3 && (ebp > edx_3 || result >= eax_3)))
0065ccee          {
0065ccfc              if ((result != eax_3 || ebp != edx_3))
0065ccfc              {
0065cd0e              label_65cd0e:
0065cd0e                  int32_t edx_4;
0065cd0e                  edx_4 = *(uint8_t*)edi_1;
0065cd10                  arg4 |= 4;
0065cd15                  var_21 = edx_4;
0065cd19                  edi_1 += 1;
0065cd1c                  continue;
0065ccfc              }
0065ccfc              else if ((0 >= var_c && (0 > var_c || esi_3 > ecx_4)))
0065cd06                  goto label_65cd0e;
0065ccee          }
0065ccee          
0065cd2d          int32_t var_38_6 = ebp;
0065cd2e          int32_t result_1 = result;
0065cd2f          int32_t var_40_1 = edx_2;
0065cd30          int32_t var_44_1 = eax_2;
0065cd31          int32_t eax_10;
0065cd31          int32_t edx_6;
0065cd31          eax_10 = _allmul();
0065cd3c          ebp = (edx_6 + 0);
0065cd3e          int32_t edx_7;
0065cd3e          edx_7 = *(uint8_t*)edi_1;
0065cd40          result = (eax_10 + esi_3);
0065cd44          var_21 = edx_7;
0065cd48          edi_1 += 1;
0065cc90      }
0065cc90      
0065cd54      void* edi_3 = ((char*)edi_1 - 1);
0065cd54      
0065cd5a      if ((arg4 & 8) == 0)
0065cd5a      {
0065cd62          if (arg2 != 0)
0065cd64              edi_3 = arg1;
0065cd64          
0065cd68          result = 0;
0065cd5a      }
0065cd5a      else if ((arg4 & 4) != 0)
0065cd71      {
0065cdae      label_65cdae:
0065cdae          *(uint32_t*)_errno() = 0x22;
0065cdae          
0065cdb4          if ((arg4 & 1) != 0)
0065cdb9              result = 0xffffffff;
0065cdb4          else if ((arg4 & 2) == 0)
0065cdd3              result = 0xffffffff;
0065cdc2          else
0065cdc4              result = 0;
0065cd71      }
0065cd71      else if ((arg4 & 1) == 0)
0065cd76      {
0065cd7a          int32_t eax_13 = (arg4 & 2);
0065cd7a          
0065cd8e          if ((eax_13 != 0 && (ebp > 0x80000000 || (ebp >= 0x80000000 && result > 0))))
0065cd7d              goto label_65cdae;
0065cd7d          
0065cda3          if ((eax_13 == 0 && (ebp >= 0x7fffffff && (ebp > 0x7fffffff || result > 0xffffffff))))
0065cd9c              goto label_65cdae;
0065cd76      }
0065cd76      
0065cde0      void** eax_15 = arg2;
0065cde0      
0065cde6      if (eax_15 != 0)
0065cde8          *(uint32_t*)eax_15 = edi_3;
0065cde8      
0065cded      if ((arg4 & 2) == 0)
0065ce0b          return result;
0065ce0b      
0065cdfa      return -(result);
0065cb80  }

0065ce26                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0065ce30  int32_t strtoint64(char const* arg1, char const** arg2, int32_t arg3)

0065ce30  {
0065ce49      return strtoxint64(arg1, arg2, arg3, 0);
0065ce30  }

0065ce4a                                cc cc cc cc cc cc                                                            ......

0065ce50  int32_t strtouint64(char const* arg1, char const** arg2, int32_t arg3)

0065ce50  {
0065ce69      return strtoxint64(arg1, arg2, arg3, 1);
0065ce50  }

0065ce6a                                cc cc cc cc cc cc                                                            ......

0065ce70  float __fastcall Matrix4::CalcDeterminant(class Matrix4 const* this)

0065ce70  {
0065ce73      long double x87_r7 = ((long double)this->_44);
0065ce76      float _32 = this->_32;
0065ce79      long double x87_r6 = ((long double)this->_34);
0065ce7c      float _42 = this->_42;
0065ce7f      long double x87_r5 = ((long double)this->_43);
0065ce85      long double x87_r4 = ((long double)this->_33);
0065ce8e      float _34 = this->_34;
0065ce93      float _44 = this->_44;
0065ce9e      float _33 = this->_33;
0065cea5      float _43 = this->_43;
0065ceae      float _31 = this->_31;
0065cebb      float _41 = this->_41;
0065cec8      float _44_1 = this->_44;
0065ced1      float _34_1 = this->_34;
0065ceda      float _42_1 = this->_42;
0065cee1      float _32_1 = this->_32;
0065ceeb      float _41_1 = this->_41;
0065cef7      float _31_1 = this->_31;
0065cf04      float _43_1 = this->_43;
0065cf0d      float _33_1 = this->_33;
0065cf16      float _42_2 = this->_42;
0065cf1d      float _32_2 = this->_32;
0065cf27      float _41_2 = this->_41;
0065cf2a      long double x87_r3_5 = (((((x87_r4 * x87_r7) - (x87_r5 * x87_r6)) * ((long double)this->_22)) - (((((long double)_32) * x87_r7) - (((long double)_42) * x87_r6)) * ((long double)this->_23))) + (((((long double)_32) * x87_r5) - (((long double)_42) * x87_r4)) * ((long double)this->_24)));
0065cf30      float _31_2 = this->_31;
0065cf7e      long double x87_r2_15 = (((((((long double)_33) * ((long double)_44)) - (((long double)_43) * ((long double)_34))) * ((long double)this->_21)) - (((((long double)_31) * ((long double)_44)) - (((long double)_41) * ((long double)_34))) * ((long double)this->_23))) + (((((long double)_31) * ((long double)_43)) - (((long double)_33) * ((long double)_41))) * ((long double)this->_24)));
0065cfc6      long double x87_r2_22 = (((((((long double)_32_1) * ((long double)_44_1)) - (((long double)_42_1) * ((long double)_34_1))) * ((long double)this->_21)) - (((((long double)_31_1) * ((long double)_44_1)) - (((long double)_41_1) * ((long double)_34_1))) * ((long double)this->_22))) + (((((long double)_31_1) * ((long double)_42_1)) - (((long double)_32_1) * ((long double)_41_1))) * ((long double)this->_24)));
0065d00e      long double x87_r2_29 = (((((((long double)_32_2) * ((long double)_43_1)) - (((long double)_42_2) * ((long double)_33_1))) * ((long double)this->_21)) - (((((long double)_31_2) * ((long double)_43_1)) - (((long double)_41_2) * ((long double)_33_1))) * ((long double)this->_22))) + (((((long double)_31_2) * ((long double)_42_2)) - (((long double)_32_2) * ((long double)_41_2))) * ((long double)this->_23)));
0065d013      ((((x87_r3_5 * ((long double)this->_11)) - (x87_r2_15 * ((long double)this->_12))) + (x87_r2_22 * ((long double)this->_13))) - (x87_r2_29 * ((long double)this->_14)));
0065d020      return _41_2;
0065ce70  }

0065d021     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065d030  void __thiscall Matrix4::Translate(class Matrix4* this, float arg2, float arg3, float arg4)

0065d030  {
0065d036      this->_14 = 0f;
0065d039      this->_13 = 0f;
0065d03c      this->_12 = 0f;
0065d03f      this->_24 = 0f;
0065d042      this->_23 = 0f;
0065d045      this->_21 = 0f;
0065d048      this->_34 = 0f;
0065d04b      this->_32 = 0f;
0065d04e      this->_31 = 0f;
0065d056      this->_44 = 1f;
0065d059      this->_33 = 1f;
0065d05c      this->_22 = 1f;
0065d05f      this->_11 = 0x3f800000;
0065d065      this->_41 = arg2;
0065d06c      this->_42 = arg3;
0065d06f      this->_43 = arg4;
0065d030  }

0065d075                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0065d080  void __thiscall Matrix4::Translate3(class Matrix4* this, float arg2, float arg3)

0065d080  {
0065d086      this->_14 = 0f;
0065d089      this->_13 = 0f;
0065d08c      this->_12 = 0f;
0065d08f      this->_24 = 0f;
0065d092      this->_23 = 0f;
0065d095      this->_21 = 0f;
0065d098      this->_34 = 0f;
0065d09b      this->_43 = 0f;
0065d09e      this->_42 = 0f;
0065d0a1      this->_41 = 0f;
0065d0a9      this->_44 = 1f;
0065d0ac      this->_33 = 1f;
0065d0af      this->_22 = 1f;
0065d0b2      this->_11 = 0x3f800000;
0065d0b8      this->_31 = arg2;
0065d0bb      this->_32 = arg3;
0065d080  }

0065d0c1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065d0d0  void __thiscall Matrix4::RotateX(class Matrix4* this, float arg2)

0065d0d0  {
0065d0d6      long double st0;
0065d0d6      bool c2;
0065d0d6      st0 = __fcos(((long double)arg2));
0065d0d8      this->_14 = 0f;
0065d0db      this->_13 = 0f;
0065d0de      this->_12 = 0f;
0065d0e1      this->_24 = 0f;
0065d0e4      this->_21 = 0f;
0065d0e7      this->_34 = 0f;
0065d0ea      this->_31 = 0f;
0065d0ed      this->_43 = 0f;
0065d0f0      this->_42 = 0f;
0065d0f3      this->_41 = 0f;
0065d0f6      this->_44 = 1f;
0065d0fd      this->_11 = 0x3f800000;
0065d107      long double st0_1;
0065d107      bool c2_1;
0065d107      st0_1 = __fsin(((long double)arg2));
0065d10b      this->_22 = ((float)st0);
0065d10e      this->_23 = ((float)st0_1);
0065d113      this->_32 = ((float)-(st0_1));
0065d116      this->_33 = ((float)st0);
0065d0d0  }

0065d11c                                                                                      cc cc cc cc                              ....

0065d120  void __thiscall Matrix4::RotateY(class Matrix4* this, float arg2)

0065d120  {
0065d126      long double st0;
0065d126      bool c2;
0065d126      st0 = __fcos(((long double)arg2));
0065d128      this->_14 = 0f;
0065d12b      this->_12 = 0f;
0065d12e      this->_24 = 0f;
0065d131      this->_23 = 0f;
0065d134      this->_21 = 0f;
0065d137      this->_34 = 0f;
0065d13a      this->_32 = 0f;
0065d13d      this->_43 = 0f;
0065d140      this->_42 = 0f;
0065d143      this->_41 = 0f;
0065d14b      this->_44 = 1f;
0065d14e      this->_22 = 1f;
0065d155      long double st0_1;
0065d155      bool c2_1;
0065d155      st0_1 = __fsin(((long double)arg2));
0065d159      this->_11 = ((float)st0);
0065d15f      this->_13 = ((float)-(st0_1));
0065d162      this->_31 = ((float)st0_1);
0065d165      this->_33 = ((float)st0);
0065d120  }

0065d16b                                   cc cc cc cc cc                                                             .....

0065d170  void __thiscall Matrix4::RotateZ(class Matrix4* this, float arg2)

0065d170  {
0065d176      long double st0;
0065d176      bool c2;
0065d176      st0 = __fcos(((long double)arg2));
0065d178      this->_14 = 0f;
0065d17b      this->_13 = 0f;
0065d17e      this->_24 = 0f;
0065d181      this->_23 = 0f;
0065d184      this->_34 = 0f;
0065d187      this->_32 = 0f;
0065d18a      this->_31 = 0f;
0065d18d      this->_43 = 0f;
0065d190      this->_42 = 0f;
0065d193      this->_41 = 0f;
0065d19b      this->_44 = 1f;
0065d19e      this->_33 = 1f;
0065d1a5      long double st0_1;
0065d1a5      bool c2_1;
0065d1a5      st0_1 = __fsin(((long double)arg2));
0065d1a9      this->_11 = ((float)st0);
0065d1ab      this->_12 = ((float)st0_1);
0065d1b0      this->_21 = ((float)-(st0_1));
0065d1b3      this->_22 = ((float)st0);
0065d170  }

0065d1b9                                                                             cc cc cc cc cc cc cc                           .......

0065d1c0  void __thiscall Matrix4::Scale(class Matrix4* this, float arg2, float arg3, float arg4)

0065d1c0  {
0065d1c6      this->_14 = 0f;
0065d1c9      this->_13 = 0f;
0065d1cc      this->_12 = 0f;
0065d1cf      this->_24 = 0f;
0065d1d2      this->_23 = 0f;
0065d1d5      this->_21 = 0f;
0065d1d8      this->_34 = 0f;
0065d1db      this->_32 = 0f;
0065d1de      this->_31 = 0f;
0065d1e1      this->_43 = 0f;
0065d1e4      this->_42 = 0f;
0065d1e7      this->_41 = 0f;
0065d1ee      this->_11 = arg2;
0065d1f4      this->_44 = 1f;
0065d1fb      this->_22 = arg3;
0065d1fe      this->_33 = arg4;
0065d1c0  }

0065d204              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0065d210  void __thiscall Matrix4::Adjoint(class Matrix4* this, class Matrix4 const* arg2)

0065d210  {
0065d213      class Matrix4* eax = arg2;
0065d217      float _23 = eax->_23;
0065d21a      long double x87_r7 = ((long double)eax->_11);
0065d21c      long double x87_r6 = ((long double)eax->_12);
0065d225      long double x87_r5 = ((long double)eax->_13);
0065d228      long double x87_r4 = ((long double)eax->_14);
0065d22b      arg2 = eax->_24;
0065d22f      float _31 = eax->_31;
0065d232      long double x87_r3 = ((long double)eax->_21);
0065d235      long double x87_r2 = ((long double)eax->_22);
0065d23c      float _32 = eax->_32;
0065d243      float _33 = eax->_33;
0065d24a      float _34 = eax->_34;
0065d251      float _41 = eax->_41;
0065d258      float _42 = eax->_42;
0065d25f      float _43 = eax->_43;
0065d262      float _44 = eax->_44;
0065d27f      float var_18 = ((float)((((long double)_44) * ((long double)_33)) - (((long double)_43) * ((long double)_34))));
0065d295      float var_14 = ((float)((((long double)_44) * ((long double)_32)) - (((long double)_42) * ((long double)_34))));
0065d2ab      float var_c = ((float)((((long double)_43) * ((long double)_32)) - (((long double)_42) * ((long double)_33))));
0065d2c8      this->_11 = ((float)(((((long double)var_18) * x87_r2) - (((long double)var_14) * ((long double)_23))) + (((long double)var_c) * ((long double)arg2))));
0065d2dc      float var_10 = ((float)((((long double)_44) * ((long double)_31)) - (((long double)_41) * ((long double)_34))));
0065d2f2      float var_8 = ((float)((((long double)_43) * ((long double)_31)) - (((long double)_41) * ((long double)_33))));
0065d311      this->_21 = ((float)-((((((long double)var_18) * x87_r3) - (((long double)var_10) * ((long double)_23))) + (((long double)var_8) * ((long double)arg2)))));
0065d326      float var_4 = ((float)((((long double)_42) * ((long double)_31)) - (((long double)_41) * ((long double)_32))));
0065d342      this->_31 = ((float)(((((long double)var_14) * x87_r3) - (((long double)var_10) * x87_r2)) + (((long double)var_4) * ((long double)arg2))));
0065d35e      this->_41 = ((float)-((((((long double)var_c) * x87_r3) - (((long double)var_8) * x87_r2)) + (((long double)var_4) * ((long double)_23)))));
0065d379      this->_12 = ((float)-((((((long double)var_18) * x87_r6) - (((long double)var_14) * x87_r5)) + (((long double)var_c) * x87_r4))));
0065d392      this->_22 = ((float)(((((long double)var_18) * x87_r7) - (((long double)var_10) * x87_r5)) + (((long double)var_8) * x87_r4)));
0065d3ad      this->_32 = ((float)-((((((long double)var_14) * x87_r7) - (((long double)var_10) * x87_r6)) + (((long double)var_4) * x87_r4))));
0065d3c6      this->_42 = ((float)(((((long double)var_c) * x87_r7) - (((long double)var_8) * x87_r6)) + (((long double)var_4) * x87_r5)));
0065d3da      float var_4_1 = ((float)((((long double)_44) * ((long double)_23)) - (((long double)_43) * ((long double)arg2))));
0065d3ee      float var_8_1 = ((float)((((long double)_44) * x87_r2) - (((long double)_42) * ((long double)arg2))));
0065d401      float var_10_1 = ((float)((((long double)_43) * x87_r2) - (((long double)_42) * ((long double)_23))));
0065d41b      this->_13 = ((float)(((((long double)var_4_1) * x87_r6) - (((long double)var_8_1) * x87_r5)) + (((long double)var_10_1) * x87_r4)));
0065d42e      float var_c_1 = ((float)((((long double)_44) * x87_r3) - (((long double)_41) * ((long double)arg2))));
0065d441      float var_14_1 = ((float)((((long double)_43) * x87_r3) - (((long double)_41) * ((long double)_23))));
0065d45d      this->_23 = ((float)-((((((long double)var_4_1) * x87_r7) - (((long double)var_c_1) * x87_r5)) + (((long double)var_14_1) * x87_r4))));
0065d46e      float var_4_2 = ((float)((((long double)_42) * x87_r3) - (((long double)_41) * x87_r2)));
0065d488      this->_33 = ((float)(((((long double)var_8_1) * x87_r7) - (((long double)var_c_1) * x87_r6)) + (((long double)var_4_2) * x87_r4)));
0065d4a3      this->_43 = ((float)-((((((long double)var_10_1) * x87_r7) - (((long double)var_14_1) * x87_r6)) + (((long double)var_4_2) * x87_r5))));
0065d4b7      float var_4_3 = ((float)((((long double)_34) * ((long double)_23)) - (((long double)_33) * ((long double)arg2))));
0065d4cb      float var_8_2 = ((float)((((long double)_34) * x87_r2) - (((long double)_32) * ((long double)arg2))));
0065d4de      float var_c_2 = ((float)((((long double)_33) * x87_r2) - (((long double)_32) * ((long double)_23))));
0065d4fa      this->_14 = ((float)-((((((long double)var_4_3) * x87_r6) - (((long double)var_8_2) * x87_r5)) + (((long double)var_c_2) * x87_r4))));
0065d50d      arg2 = ((float)((((long double)_34) * x87_r3) - (((long double)_31) * ((long double)arg2))));
0065d520      float var_10_2 = ((float)((((long double)_33) * x87_r3) - (((long double)_31) * ((long double)_23))));
0065d53a      this->_24 = ((float)(((((long double)var_4_3) * x87_r7) - (((long double)arg2) * x87_r5)) + (((long double)var_10_2) * x87_r4)));
0065d54b      float var_4_4 = ((float)((((long double)_32) * x87_r3) - (((long double)_31) * x87_r2)));
0065d56b      this->_34 = ((float)-((((((long double)var_8_2) * x87_r7) - (((long double)arg2) * x87_r6)) + (((long double)var_4_4) * x87_r2))));
0065d586      this->_44 = ((float)(((((long double)var_c_2) * x87_r7) - (((long double)var_10_2) * x87_r6)) + (((long double)var_4_4) * x87_r2)));
0065d210  }

0065d595                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0065d5a0  uint8_t Matrix4::AreEqual(class Matrix4 const* arg1, class Matrix4 const* arg2)

0065d5a0  {
0065d5a8      float* edi = arg2;
0065d5ae      long double x87_r7_2 = fabsl((((long double)arg1->_11) - ((long double)*(uint32_t*)edi)));
0065d5b0      long double temp0 = ((long double)0.000199999995f);
0065d5b0      (x87_r7_2 - temp0);
0065d5b6      int32_t eax;
0065d5b6      eax = ((((x87_r7_2 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0) ? 1 : 0) << 0xe) | 0))));
0065d5b8      bool p = /* bool p = unimplemented  {test ah, 0x41} */;
0065d5b8      
0065d5bb      if (!(p))
0065d5bb      {
0065d5c7          long double x87_r7_5 = fabsl((((long double)arg1->_21) - ((long double)edi[4])));
0065d5c9          long double temp1_1 = ((long double)0.000199999995f);
0065d5c9          (x87_r7_5 - temp1_1);
0065d5cf          eax = ((((x87_r7_5 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp1_1) ? 1 : 0) << 0xe) | 0))));
0065d5d1          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
0065d5d1          
0065d5d4          if (!(p_1))
0065d5d4          {
0065d5e0              long double x87_r7_8 = fabsl((((long double)arg1->_31) - ((long double)edi[8])));
0065d5e2              long double temp2_1 = ((long double)0.000199999995f);
0065d5e2              (x87_r7_8 - temp2_1);
0065d5e8              eax = ((((x87_r7_8 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_8, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_8 == temp2_1) ? 1 : 0) << 0xe) | 0))));
0065d5ea              bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
0065d5ea              
0065d5ed              if (!(p_2))
0065d5ed              {
0065d5f9                  long double x87_r7_11 = fabsl((((long double)arg1->_41) - ((long double)edi[0xc])));
0065d5fb                  long double temp3_1 = ((long double)0.000199999995f);
0065d5fb                  (x87_r7_11 - temp3_1);
0065d601                  eax = ((((x87_r7_11 < temp3_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_11, temp3_1))) ? 1 : 0) << 0xa) | ((((x87_r7_11 == temp3_1) ? 1 : 0) << 0xe) | 0))));
0065d603                  bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x41} */;
0065d603                  
0065d606                  if (!(p_3))
0065d606                  {
0065d612                      long double x87_r7_14 = fabsl((((long double)arg1->_12) - ((long double)edi[1])));
0065d614                      long double temp4_1 = ((long double)0.000199999995f);
0065d614                      (x87_r7_14 - temp4_1);
0065d61a                      eax = ((((x87_r7_14 < temp4_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_14, temp4_1))) ? 1 : 0) << 0xa) | ((((x87_r7_14 == temp4_1) ? 1 : 0) << 0xe) | 0))));
0065d61c                      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x41} */;
0065d61c                      
0065d61f                      if (((((((!(p_4) && AreFloatEqual(arg1->_22, edi[5], 0.000199999995f) != 0) && AreFloatEqual(arg1->_32, edi[9], 0.000199999995f) != 0) && AreFloatEqual(arg1->_42, edi[0xd], 0.000199999995f) != 0) && (AreFloatEqual(arg1->_13, edi[2], 0.000199999995f) != 0 && AreFloatEqual(arg1->_23, edi[6], 0.000199999995f) != 0)) && (AreFloatEqual(arg1->_33, edi[0xa], 0.000199999995f) != 0 && AreFloatEqual(arg1->_43, edi[0xe], 0.000199999995f) != 0)) && (((AreFloatEqual(arg1->_14, edi[3], 0.000199999995f) != 0 && AreFloatEqual(arg1->_24, edi[7], 0.000199999995f) != 0) && AreFloatEqual(arg1->_34, edi[0xb], 0.000199999995f) != 0) && AreFloatEqual(arg1->_44, edi[0xf], 0.000199999995f) != 0)))
0065d757                          return 1;
0065d606                  }
0065d5ed              }
0065d5d4          }
0065d5bb      }
0065d5bb      
0065d75c      return 0;
0065d5a0  }

0065d75d                                                                                         cc cc cc                               ...

0065d760  float __thiscall Matrix4::Inverse(class Matrix4* this, class Matrix4 const* arg2)

0065d760  {
0065d765      Matrix4::Adjoint(this, arg2);
0065d76a      float eax;
0065d76a      long double st0;
0065d76a      eax = Matrix4::CalcDeterminant(this);
0065d773      long double x87_r5_1 = fabsl(st0);
0065d775      long double temp1 = ((long double)0.000199999995f);
0065d775      (x87_r5_1 - temp1);
0065d77b      eax = ((((x87_r5_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r5_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r5_1 == temp1) ? 1 : 0) << 0xe) | 0x3000))));
0065d77d      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
0065d77d      
0065d780      if (!(p))
0065d78c          return eax;
0065d78c      
0065d78f      long double x87_r6_1 = (((long double)1.0) / st0);
0065d795      float* eax_1 = &this->_13;
0065d79d      int32_t i_1 = 4;
0065d7c6      int32_t i;
0065d7c6      
0065d7c6      do
0065d7c6      {
0065d7a2          eax_1 = &eax_1[4];
0065d7a5          i = i_1;
0065d7a5          i_1 -= 1;
0065d7ab          *(int32_t*)((char*)ADJ(eax_1) + -0x10) = ((float)(x87_r6_1 * ((long double)*(int32_t*)((char*)ADJ(eax_1) + -0x10))));
0065d7b3          *(int32_t*)((char*)ADJ(eax_1) + -0xc) = ((float)(x87_r6_1 * ((long double)*(int32_t*)((char*)ADJ(eax_1) + -0xc))));
0065d7bb          *(int32_t*)((char*)ADJ(eax_1) + -8) = ((float)(x87_r6_1 * ((long double)*(int32_t*)((char*)ADJ(eax_1) + -8))));
0065d7c8          ADJ(eax_1)->_11 = ((float)(x87_r6_1 * ((long double)ADJ(eax_1)->_11)));
0065d7c6      } while (i != 1);
0065d7ca      return eax_1;
0065d760  }

0065d7cd                                         cc cc cc                                                               ...

0065d7d0  uint8_t __fastcall AutoStoreVersionArchive::tagSerializeVersionRow::InitializeArchive(class AutoStoreVersionArchive::tagSerializeVersionRow const* this, class Archive* arg2)

0065d7d0  {
0065d7d0      class AutoStoreVersionArchive::tagSerializeVersionRow* __return = this;
0065d7d5      class Archive* edi = arg2;
0065d7e9      uint32_t id = Archive::PushVersionRow(edi, &__return, &this->m_rowInitialData)->id;
0065d7ed      this->m_hVersionRow.id = id;
0065d7f0      this->m_hSerialize = 0;
0065d7f0      
0065d7fd      if ((id != INVALID_VERSIONHANDLE.id && Archive::GetVersionRowByHandle(edi, id, &arg2) != 0))
0065d81a          this->m_hSerialize = ArchiveVersionRow::SerializeHeader(arg2, edi);
0065d81a      
0065d82d      if (((!(((int8_t)(edi->m_flags >> 2))) & 1) != 0 && this->m_hSerialize != 0xffffffff))
0065d837          return 1;
0065d837      
0065d83f      return 0;
0065d7d0  }

0065d842        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065d850  void __fastcall AutoStoreVersionArchive::OnSerializingDone(class AutoStoreVersionArchive* this)

0065d850  {
0065d850      class AutoStoreVersionArchive* this_1 = this;
0065d85c      bool cond:0 = (!(((int8_t)(this->m_flags >> 2))) & 1) == 0;
0065d85e      this->m_bOnSerializingDoneCalled = 1;
0065d85e      
0065d865      if ((!(cond:0) && Archive::GetVersionRowByHandle(this, this->m_SerializeVersionRow.m_hVersionRow.id, &this_1) != 0))
0065d884          ArchiveVersionRow::SerializeFooter(this_1, this->m_SerializeVersionRow.m_hSerialize, this);
0065d850  }

0065d88c                                      cc cc cc cc                                                              ....

0065d890  void __thiscall Vector2::Vector2(class Vector2* this, float arg2, float arg3)

0065d890  {
0065d89a      this->x = arg2;
0065d89c      this->y = arg3;
0065d890  }

0065d8a2        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065d8b0  void __fastcall SharedCriticalSection::SharedCriticalSection(class SharedCriticalSection* this)

0065d8b0  {
0065d8b5      this->lockHolder_ = 0;
0065d8b8      this->lockCount_ = 0;
0065d8bf      this->vtable = 0x7fda4c;
0065d8c5      InitializeCriticalSection(&this->myCritSection_);
0065d8b0  }

0065d8cf                                               cc                                                                 .

0065d8d0  void __fastcall SharedCriticalSection::~SharedCriticalSection(class SharedCriticalSection* this)

0065d8d0  {
0065d8d0      this->vtable = 0x7fda4c;
0065d8da      DeleteCriticalSection(&this->myCritSection_);
0065d8d0  }

0065d8e1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065d8f0  void __fastcall SharedCriticalSection::EnterCriticalSection(class SharedCriticalSection* this)

0065d8f0  {
0065d8f7      EnterCriticalSection(&this->myCritSection_);
0065d8fd      uint32_t eax_1 = GetCurrentThreadId();
0065d903      this->lockCount_ += 1;
0065d907      this->lockHolder_ = eax_1;
0065d8f0  }

0065d90c                                      cc cc cc cc                                                              ....

0065d910  void __fastcall SharedCriticalSection::LeaveCriticalSection(class SharedCriticalSection* this)

0065d910  {
0065d910      int32_t lockCount_ = this->lockCount_;
0065d910      this->lockCount_ -= 1;
0065d910      
0065d914      if (lockCount_ == 1)
0065d916          this->lockHolder_ = 0;
0065d916      
0065d921      LeaveCriticalSection(&this->myCritSection_);
0065d910  }

0065d928                          cc cc cc cc cc cc cc cc                                                          ........

0065d930  void* __thiscall SharedCriticalSection::`scalar deleting destructor'(class SharedCriticalSection* this, uint32_t arg2)

0065d930  {
0065d937      this->vtable = 0x7fda4c;
0065d93d      DeleteCriticalSection(&this->myCritSection_);
0065d93d      
0065d948      if ((arg2 & 1) != 0)
0065d94b          operator delete(this);
0065d94b      
0065d956      return this;
0065d930  }

0065d959                                                                             cc cc cc cc cc cc cc                           .......

0065d960  void __fastcall PortalThread::~PortalThread(class PortalThread* this)

0065d960  {
0065d960      class PortalThread* lpExitCode = this;
0065d964      bool cond:0 = this->m_fThreadRunning == 0;
0065d968      this->vtable = 0x7fda54;
0065d968      
0065d96e      if (!(cond:0))
0065d96e      {
0065d978          HANDLE m_hThread = this->m_hThread;
0065d979          lpExitCode = nullptr;
0065d981          GetExitCodeThread(m_hThread, &lpExitCode);
0065d96e      }
0065d96e      
0065d98b      CloseHandle(this->m_hThread);
0065d960  }

0065d994                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0065d9a0  uint8_t __fastcall PortalThread::Resume(class PortalThread* this)

0065d9a0  {
0065d9b0      uint32_t eax_1;
0065d9b0      
0065d9b0      if (ResumeThread(this->m_hThread) != 1)
0065d9b0      {
0065d9cf          eax_1 = 0;
0065d9d2          return 0;
0065d9b0      }
0065d9b0      
0065d9b6      while (this->m_fThreadHasEverRun == 0)
0065d9c2          Sleep(0);
0065d9c2      
0065d9cb      eax_1 = 1;
0065d9ce      return 1;
0065d9a0  }

0065d9d3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0065d9e0  uint8_t __fastcall PortalThread::Join(class PortalThread* this)

0065d9e0  {
0065d9e4      if (this->m_fThreadRunning == 0)
0065d9e4      {
0065d9e6          int32_t eax;
0065d9e6          eax = 1;
0065d9e8          return 1;
0065d9e4      }
0065d9e4      
0065d9f7      uint32_t eax_2;
0065d9f7      eax_2 = WaitForSingleObject(this->m_hThread, 0xffffffff) == 0;
0065d9fa      return eax_2;
0065d9e0  }

0065d9fb                                                                                   cc cc cc cc cc                             .....

0065da00  void* __thiscall PortalThread::`scalar deleting destructor'(class PortalThread* this, uint32_t arg2)

0065da00  {
0065da00      class PortalThread* lpExitCode = this;
0065da04      bool cond:0 = this->m_fThreadRunning == 0;
0065da08      this->vtable = 0x7fda54;
0065da08      
0065da0e      if (!(cond:0))
0065da0e      {
0065da10          void* m_hThread = this->m_hThread;
0065da19          lpExitCode = nullptr;
0065da21          GetExitCodeThread(m_hThread, &lpExitCode);
0065da0e      }
0065da0e      
0065da2b      CloseHandle(this->m_hThread);
0065da2b      
0065da36      if ((arg2 & 1) != 0)
0065da39          operator delete(this);
0065da39      
0065da45      return this;
0065da00  }

0065da48                          cc cc cc cc cc cc cc cc                                                          ........

0065da50  uint32_t __stdcall PortalThread::_portal_startup(void* arg1)

0065da50  {
0065da5a      *(uint8_t*)((char*)arg1 + 0xc) = 1;
0065da5e      *(uint8_t*)((char*)arg1 + 0xe) = 1;
0065da5e      
0065da6c      if (Turbine::Debug::IsDebugFlagSet(0x400) != 0)
0065da72          Turbine::Debug::SetFloatingPointException(1, 8);
0065da72      
0065da7e      int32_t result = *(uint32_t*)(*(uint32_t*)arg1 + 4)();
0065da81      *(uint8_t*)((char*)arg1 + 0xc) = 0;
0065da86      return result;
0065da50  }

0065da89                             cc cc cc cc cc cc cc                                                           .......

0065da90  void __thiscall PortalThread::PortalThread(class PortalThread* this, uint32_t arg2)

0065da90  {
0065daa8      this->vtable = 0x7fda54;
0065daae      this->m_hThread = nullptr;
0065dab1      this->m_fThreadRunning = 0;
0065dab4      this->m_fShouldExit = 0;
0065dab7      this->m_fThreadHasEverRun = 0;
0065daba      HANDLE eax_1 = CreateThread(nullptr, arg2, PortalThread::_portal_startup, this, THREAD_CREATE_SUSPENDED, &this->m_idThread);
0065dac2      this->m_hThread = eax_1;
0065dac2      
0065dac5      if (eax_1 == 0)
0065dac5      {
0065dac7          GetLastError();
0065dacd          PortalThreadErrorDump::DumpLastError();
0065dac5      }
0065da90  }

0065dad9                                                                             cc cc cc cc cc cc cc                           .......

0065dae0  void __fastcall PortalEvent::PortalEvent(class PortalEvent* this)

0065dae0  {
0065daeb      this->eventHandle_ = 0;
0065daf7      this->eventHandle_ = CreateEventA(nullptr, 0, 0, nullptr);
0065dae0  }

0065dafd                                                                                         cc cc cc                               ...

0065db00  void __fastcall PortalEvent::~PortalEvent(class PortalEvent* this)

0065db00  {
0065db03      void* eventHandle_ = this->eventHandle_;
0065db03      
0065db07      if (eventHandle_ != 0)
0065db07      {
0065db0a          CloseHandle(eventHandle_);
0065db10          this->eventHandle_ = 0;
0065db07      }
0065db00  }

0065db18                                                                          cc cc cc cc cc cc cc cc                          ........

0065db20  uint8_t __fastcall PortalEvent::Signal(class PortalEvent* this)

0065db20  {
0065db2b      BOOL eax;
0065db2b      eax = SetEvent(this->eventHandle_) != 0;
0065db2e      return eax;
0065db20  }

0065db2f                                               cc                                                                 .

0065db30  uint8_t __thiscall PortalEvent::WaitForSignal(class PortalEvent* this, uint32_t arg2)

0065db30  {
0065db40      uint32_t eax;
0065db40      
0065db40      if (WaitForSingleObject(this->eventHandle_, arg2) != 0)
0065db40      {
0065db42          eax = 0;
0065db44          return 0;
0065db40      }
0065db40      
0065db47      eax = 1;
0065db49      return 1;
0065db30  }

0065db4c                                      cc cc cc cc                                                              ....

0065db50  enum AsyncStateMachineStatus __thiscall CAsyncStateHandler::EndStateOK(class CAsyncStateHandler* this, class AsyncContext arg2, int32_t arg3)

0065db50  {
0065db55      /* jump -> this->m_pMachine->vtable->OnHandlerDoneOK */
0065db50  }

0065db58                                                                          cc cc cc cc cc cc cc cc                          ........

0065db60  void __thiscall CAsyncStateHandler::EndStateFailed(class CAsyncStateHandler* this, class AsyncContext arg2)

0065db60  {
0065db65      /* jump -> this->m_pMachine->vtable->OnHandlerFailed */
0065db60  }

0065db68                          cc cc cc cc cc cc cc cc                                                          ........

0065db70  void __thiscall CAsyncStateMachine::SetTimerInstance(class CAsyncStateMachine* this, class PreciseTimerInstance const* arg2)

0065db70  {
0065db79      class PreciseTimerInstance* m_pTimer = this->m_pTimer;
0065db79      
0065db81      if (m_pTimer != arg2)
0065db81      {
0065db85          if (m_pTimer != 0)
0065db85          {
0065db97              if ((InterlockedDecrement(&m_pTimer->m_cRef) == 0 && m_pTimer != 0))
0065db99                  m_pTimer->vtable->__vecDelDtor(1);
0065db99              
0065dba1              this->m_pTimer = nullptr;
0065db85          }
0065db85          
0065dbab          this->m_pTimer = arg2;
0065dbb5          InterlockedIncrement(&arg2->m_cRef);
0065db81      }
0065db70  }

0065dbc1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0065dbd0  void* __thiscall IntrusiveHashTable<int,CAsyncStateHandler *,1>::`scalar deleting destructor'(class IntrusiveHashTable<int,CAsyncStateHandler *,1>* this, uint32_t arg2)

0065dbd0  {
0065dbd3      class CAsyncStateHandler** m_buckets = this->m_buckets;
0065dbdb      this->vtable = 0x7fda64;
0065dbdb      
0065dbe1      if (m_buckets != &this->m_aInplaceBuckets)
0065dbe4          operator delete[](m_buckets);
0065dbe4      
0065dbf3      this->m_buckets = nullptr;
0065dbf6      this->m_firstInterestingBucket = nullptr;
0065dbf9      this->m_numBuckets = 0;
0065dbfc      this->m_numElements = 0;
0065dbfc      
0065dbff      if ((arg2 & 1) != 0)
0065dc02          operator delete(this);
0065dc02      
0065dc0d      return this;
0065dbd0  }


0065dc10  void* __thiscall IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this, uint32_t arg2)

0065dc10  {
0065dc13      struct CAsyncStateMachine::CAsyncStateData** m_buckets = this->m_buckets;
0065dc1b      this->vtable = 0x7fda68;
0065dc1b      
0065dc21      if (m_buckets != &this->m_aInplaceBuckets)
0065dc24          operator delete[](m_buckets);
0065dc24      
0065dc33      this->m_buckets = nullptr;
0065dc36      this->m_firstInterestingBucket = nullptr;
0065dc39      this->m_numBuckets = 0;
0065dc3c      this->m_numElements = 0;
0065dc3c      
0065dc3f      if ((arg2 & 1) != 0)
0065dc42          operator delete(this);
0065dc42      
0065dc4d      return this;
0065dc10  }


0065dc50  void* __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* this, uint32_t arg2)

0065dc50  {
0065dc53      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_buckets;
0065dc5b      this->vtable = 0x7fda6c;
0065dc5b      
0065dc61      if (m_buckets != &this->m_aInplaceBuckets)
0065dc64          operator delete[](m_buckets);
0065dc64      
0065dc73      this->m_buckets = nullptr;
0065dc76      this->m_firstInterestingBucket = nullptr;
0065dc79      this->m_numBuckets = 0;
0065dc7c      this->m_numElements = 0;
0065dc7c      
0065dc7f      if ((arg2 & 1) != 0)
0065dc82          operator delete(this);
0065dc82      
0065dc8d      return this;
0065dc50  }


0065dc90  void __thiscall CAsyncStateHandler::CAsyncStateHandler(class CAsyncStateHandler* this, int32_t arg2)

0065dc90  {
0065dc96      this->m_hashKey = arg2;
0065dc9b      this->m_hashNext = nullptr;
0065dc9e      this->dllist_next = nullptr;
0065dca1      this->dllist_prev = nullptr;
0065dca4      this->vtable = 0x7fda70;
0065dcaa      this->m_pMachine = nullptr;
0065dc90  }


0065dcb0  void __thiscall CAsyncStateMachine::CAsyncStateData::CAsyncStateData(struct CAsyncStateMachine::CAsyncStateData* this, class AsyncContext arg2)

0065dcb0  {
0065dcbc      this->m_hashKey.m_id = arg2;
0065dcc1      __builtin_memset(&this->m_hashNext, 0, 0x18);
0065dcca      this->m_cRef = 1;
0065dcd1      this->vtable = 0x7fda90;
0065dce0      this->tContextBegan = ((double)((long double)-1.0));
0065dcee      this->tCurStateBegan = ((double)((long double)-1.0));
0065dcf1      this->eStatus = AsyncStateMachine_Unknown;
0065dcf4      this->bAdvancing = 0;
0065dcf7      this->iDelayedNextStateNumber = 0x80000001;
0065dcfa      this->pCurrentState = nullptr;
0065dcfd      this->iMaxStateNumber = 0x80000001;
0065dcb0  }

0065dd03           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0065dd10  struct CAsyncStateMachine::CAsyncStateData* __stdcall CAsyncStateMachine::AllocateStateData(class CAsyncStateMachine* this @ ecx, class AsyncContext arg2)

0065dd10  {
0065dd12      void* eax = operator new(0x48);
0065dd12      
0065dd1c      if (eax == 0)
0065dd27          return 0;
0065dd27      
0065dd20      /* tailcall */
0065dd20      return CAsyncStateMachine::CAsyncStateData::CAsyncStateData(eax, arg2);
0065dd10  }

0065dd2a                                cc cc cc cc cc cc                                                            ......

0065dd30  class IntrusiveHashIterator<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::find_internal(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1> const* this, class IntrusiveHashIterator<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* __return, class PStringBase<char> const* arg3)

0065dd30  {
0065dd37      class PSRefBufferCharData<char>* m_charbuffer = arg3->m_charbuffer;
0065dd3a      uint32_t eax = *(int32_t*)((char*)m_charbuffer + -8);
0065dd43      uint32_t m_numBuckets = this->m_numBuckets;
0065dd43      
0065dd46      if (eax == 0xffffffff)
0065dd46      {
0065dd49          eax = compute_str_hash<char>(m_charbuffer);
0065dd51          *(uint32_t*)((char*)m_charbuffer - 8) = eax;
0065dd46      }
0065dd46      
0065dd56      uint32_t temp1 = (COMBINE(0, eax) % m_numBuckets);
0065dd58      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_buckets;
0065dd63      class PStringBase<char>* i;
0065dd63      
0065dd63      for (i = m_buckets[temp1]; i != 0; i = *(int32_t*)((char*)i + 4))
0065dd63      {
0065dd6f          if (PStringBase<char>::operator==(i, arg3) != 0)
0065dd6f              break;
0065dd63      }
0065dd63      
0065dd78      class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>** result = __return;
0065dd7c      *(uint32_t*)result = this;
0065dd7f      result[2] = i;
0065dd84      result[1] = &m_buckets[temp1];
0065dd88      return result;
0065dd30  }

0065dd8b                                   cc cc cc cc cc                                                             .....

0065dd90  uint8_t __thiscall IntrusiveHashTable<int,CAsyncStateHandler *,1>::contains(class IntrusiveHashTable<int,CAsyncStateHandler *,1> const* this, int32_t const* arg2)

0065dd90  {
0065dd95      int32_t const i = *(uint32_t*)arg2;
0065dda1      void* edx_2 = this->m_buckets[(COMBINE(0, i) % this->m_numBuckets)];
0065dda1      
0065dda6      if (edx_2 == 0)
0065ddba          return edx_2 != 0;
0065ddba      
0065ddab      while (*(uint32_t*)((char*)edx_2 + 4) != i)
0065ddab      {
0065ddad          edx_2 = *(uint32_t*)((char*)edx_2 + 8);
0065ddad          
0065ddb2          if (edx_2 == 0)
0065ddb2              break;
0065ddab      }
0065ddab      
0065ddb4      return edx_2 != 0;
0065dd90  }

0065ddbd                                                                                         cc cc cc                               ...

0065ddc0  void* __thiscall CAsyncStateMachine::CAsyncStateData::`scalar deleting destructor'(struct CAsyncStateMachine::CAsyncStateData* this, uint32_t arg2)

0065ddc0  {
0065ddc6      SmartArray<unsigned long,1>::~SmartArray<unsigned long,1>(&this->Data);
0065ddd0      this->vtable = 0x7942f4;
0065ddd0      
0065ddd6      if ((arg2 & 1) != 0)
0065ddd9          operator delete(this);
0065ddd9      
0065dde4      return this;
0065ddc0  }

0065dde7                       cc cc cc cc cc cc cc cc cc                                                         .........

0065ddf0  enum AsyncStateMachineStatus __thiscall CAsyncStateMachine::BeginContext(class CAsyncStateMachine* this, class AsyncContext arg2, int32_t arg3)

0065ddf0  {
0065de08      void* edx_2 = this->m_ContextHash.m_hash.m_buckets[(COMBINE(0, arg2) % this->m_ContextHash.m_hash.m_numBuckets)];
0065de08      
0065de0d      if (edx_2 != 0)
0065de0d      {
0065de13          while (*(uint32_t*)((char*)edx_2 + 8) != arg2)
0065de13          {
0065de15              edx_2 = *(uint32_t*)((char*)edx_2 + 0xc);
0065de15              
0065de1a              if (edx_2 == 0)
0065de23                  return 5;
0065de13          }
0065de13          
0065de28          if (edx_2 != 0)
0065de28          {
0065de3a              long double x87_r7 = ((long double)this->m_pTimer->m_tElapsedTime);
0065de3d              *(uint32_t*)((char*)edx_2 + 0x24) = 1;
0065de44              *(uint64_t*)((char*)edx_2 + 0x38) = ((double)x87_r7);
0065de47              this->vtable->OnContextBegun(arg2);
0065de47              
0065de53              if (this->m_States.m_hash.m_numElements > 0)
0065de53              {
0065de55                  class DLListData* head_ = this->m_States.m_list.head_;
0065de55                  
0065de5a                  if (head_ != 0)
0065de5a                  {
0065de62                      class DLListData* dllist_next;
0065de62                      
0065de62                      for (void* __offset(DLListData, -0xc) i = ((char*)head_ - 0xc); i != 0; i = ((char*)dllist_next - 0xc))
0065de62                      {
0065de69                          *(uint32_t*)(*(int32_t*)((char*)ADJ(i) + -0xc) + 4)(arg2);
0065de6c                          dllist_next = ADJ(i)->dllist_next;
0065de6c                          
0065de71                          if (dllist_next == 0)
0065de71                              break;
0065de71                          
0065de78                          if (dllist_next == 8)
0065de78                              break;
0065de62                      }
0065de5a                  }
0065de53              }
0065de53              
0065de91              return this->vtable->OnHandlerDoneOK(arg2, arg3);
0065de28          }
0065de0d      }
0065de0d      
0065de31      return 5;
0065ddf0  }

0065de94                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0065dea0  int32_t __thiscall CAsyncStateMachine::GetContextData(class CAsyncStateMachine const* this, class AsyncContext arg2, uint32_t arg3)

0065dea0  {
0065deba      for (void* i = this->m_ContextHash.m_hash.m_buckets[(COMBINE(0, arg2) % this->m_ContextHash.m_hash.m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 0xc))
0065deba      {
0065dec3          if (*(uint32_t*)((char*)i + 8) == arg2)
0065dec3          {
0065ded4              if (i != 0)
0065dee1                  return *(uint32_t*)(*(uint32_t*)((char*)i + 0x18) + (arg3 << 2));
0065dee1              
0065ded4              break;
0065dec3          }
0065deba      }
0065deba      
0065decf      return 0;
0065dea0  }

0065dee4              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0065def0  uint8_t __thiscall CAsyncStateMachine::SetContextData(class CAsyncStateMachine* this, class AsyncContext arg2, uint32_t arg3, int32_t arg4)

0065def0  {
0065df0a      for (void* i = this->m_ContextHash.m_hash.m_buckets[(COMBINE(0, arg2) % this->m_ContextHash.m_hash.m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 0xc))
0065df0a      {
0065df13          if (*(uint32_t*)((char*)i + 8) == arg2)
0065df13          {
0065df24              if (i == 0)
0065df24                  break;
0065df24              
0065df31              *(uint32_t*)(*(uint32_t*)((char*)i + 0x18) + (arg3 << 2)) = arg4;
0065df34              uint32_t eax_2;
0065df34              eax_2 = 1;
0065df37              return 1;
0065df13          }
0065df0a      }
0065df0a      
0065df1c      struct CAsyncStateMachine::CAsyncStateData** eax_1;
0065df1c      eax_1 = 0;
0065df1f      return 0;
0065def0  }

0065df3a                                                                                cc cc cc cc cc cc                            ......

0065df40  enum AsyncStateMachineStatus __thiscall CAsyncStateMachine::Advance(class CAsyncStateMachine* this, class AsyncContext arg2, int32_t arg3)

0065df40  {
0065df40      class CAsyncStateMachine* this_1 = this;
0065df59      int32_t result = 5;
0065df61      int32_t* esi = this->m_ContextHash.m_hash.m_buckets[(COMBINE(0, arg2) % this->m_ContextHash.m_hash.m_numBuckets)];
0065df61      
0065df66      if (esi != 0)
0065df66      {
0065df73          while (esi[2] != arg2)
0065df73          {
0065df75              esi = esi[3];
0065df75              
0065df7a              if (esi == 0)
0065df7a                  break;
0065df73          }
0065df73          
0065df7e          if (esi != 0)
0065df7e          {
0065df88              if (esi[0xa] != 0)
0065df88              {
0065df8e                  esi[0xb] = arg3;
0065df99                  return 1;
0065df88              }
0065df88              
0065dfa1              esi[0xa] = 1;
0065dfa5              InterlockedIncrement(&esi[1]);
0065dfab              int32_t i = arg3;
0065dfab              
0065e047              do
0065e047              {
0065dfb0                  int32_t* ecx_3 = esi[0xc];
0065dfb0                  
0065dfb5                  if (ecx_3 != 0)
0065dfb5                  {
0065dfc0                      *(uint32_t*)(*(uint32_t*)ecx_3 + 0xc)(arg2, 1);
0065dfc0                      
0065dfc7                      if (esi[9] != 1)
0065dfc7                      {
0065e114                          result = esi[9];
0065e118                          break;
0065dfc7                      }
0065dfb5                  }
0065dfb5                  
0065dfd3                  esi[0xb] = 0x80000001;
0065dfda                  result = 1;
0065dfe2                  int32_t* eax_8;
0065dfe2                  
0065dfe2                  if (i != 0x7ffffffe)
0065dfe2                  {
0065e05c                      void* edx_6 = this->m_States.m_hash.m_buckets[(COMBINE(0, i) % this->m_States.m_hash.m_numBuckets)];
0065e05c                      
0065e061                      if (edx_6 != 0)
0065e061                      {
0065e066                          while (*(uint32_t*)((char*)edx_6 + 4) != i)
0065e066                          {
0065e068                              edx_6 = *(uint32_t*)((char*)edx_6 + 8);
0065e068                              
0065e06d                              if (edx_6 == 0)
0065e06d                                  goto label_65e06f;
0065e066                          }
0065e066                          
0065e09b                          if (edx_6 == 0)
0065e09b                              goto label_65e06f;
0065e09b                          
0065e0a7                          int32_t* edx_9 = this->m_States.m_hash.m_buckets[(COMBINE(0, i) % this->m_States.m_hash.m_numBuckets)];
0065e0a7                          
0065e0ac                          if (edx_9 != 0)
0065e0ac                          {
0065e0b3                              while (edx_9[1] != i)
0065e0b3                              {
0065e0b5                                  edx_9 = edx_9[2];
0065e0b5                                  
0065e0ba                                  if (edx_9 == 0)
0065e0ba                                      break;
0065e0b3                              }
0065e0ac                          }
0065e0ac                          
0065e0bc                          eax_8 = edx_9;
0065e0be                          goto label_65e006;
0065e061                      }
0065e061                      
0065e06f                  label_65e06f:
0065e06f                      eax_8 = esi[0xc];
0065e06f                      
0065e079                      if ((eax_8 != 0 && eax_8[1] < i))
0065e074                          goto label_65e08b;
0065e074                      
0065e07f                      if (this->m_States.m_hash.m_numElements <= 0)
0065e08f                          result = 5;
0065e07f                      else
0065e07f                      {
0065e081                          class DLListData* head_ = this->m_States.m_list.head_;
0065e081                          
0065e086                          if (head_ == 0)
0065e08f                              result = 5;
0065e086                          else
0065e086                          {
0065e088                              eax_8 = ((char*)head_ - 0xc);
0065e08b                          label_65e08b:
0065e08b                              
0065e08d                              if (eax_8 != 0)
0065e08d                              {
0065e0c6                                  while (eax_8[1] < i)
0065e0c6                                  {
0065e0cc                                      void* eax_13 = eax_8[3];
0065e0cc                                      
0065e0d1                                      if (eax_13 == 0)
0065e0d1                                          goto label_65e0dd;
0065e0d1                                      
0065e0d6                                      if (eax_13 == 8)
0065e0d6                                          goto label_65e0dd;
0065e0d6                                      
0065e0d8                                      eax_8 = ((char*)eax_13 - 0xc);
0065e0d8                                      
0065e0db                                      if (eax_13 == 0xc)
0065e0db                                          goto label_65e0dd;
0065e0c6                                  }
0065e0c6                                  
0065e0c6                                  goto label_65e006;
0065e08d                              }
0065e08d                              
0065e08f                              result = 5;
0065e086                          }
0065e07f                      }
0065dfe2                  }
0065dfe2                  else
0065dfe2                  {
0065dfe4                      void* eax_5 = esi[0xc];
0065dfe4                      
0065dfe9                      if (eax_5 == 0)
0065e08f                          result = 5;
0065dfe9                      else
0065dfe9                      {
0065dfef                          void* eax_6 = *(uint32_t*)((char*)eax_5 + 0xc);
0065dfef                          
0065dffd                          if ((eax_6 == 0 || eax_6 == 8))
0065dffd                          {
0065e0dd                          label_65e0dd:
0065e0dd                              esi[0xc] = 0;
0065e0e4                              result = 2;
0065e0e4                              break;
0065dffd                          }
0065dffd                          
0065e003                          eax_8 = ((char*)eax_6 - 0xc);
0065e006                      label_65e006:
0065e006                          
0065e008                          if (eax_8 == 0)
0065e008                              goto label_65e0dd;
0065e008                          
0065e00e                          esi[0xc] = eax_8;
0065e011                          int32_t ecx_4 = eax_8[1];
0065e011                          
0065e017                          if (ecx_4 > esi[0xd])
0065e019                              esi[0xd] = ecx_4;
0065e019                          
0065e029                          *(uint64_t*)((char*)esi + 0x40) = ((double)((long double)this->m_pTimer->m_tElapsedTime));
0065e031                          *(uint32_t*)(*(uint32_t*)eax_8 + 8)(arg2);
0065dfe9                      }
0065dfe2                  }
0065e034                  i = esi[0xb];
0065e034                  
0065e03d                  if (i == 0x80000001)
0065e03d                      break;
0065e047              } while (esi[9] == 1);
0065e047              
0065e0f0              esi[0xa] = 0;
0065e0f0              
0065e0fd              if (InterlockedDecrement(&esi[1]) == 0)
0065e105                  **(uint32_t**)esi(1);
0065df7e          }
0065df66      }
0065df66      
0065e10e      return result;
0065df40  }

0065e11a                                                                                cc cc cc cc cc cc                            ......

0065e120  uint8_t __fastcall IntrusiveHashTable<int,CAsyncStateHandler *,1>::grow(class IntrusiveHashTable<int,CAsyncStateHandler *,1>* this)

0065e120  {
0065e124      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0065e141      uint32_t m_numBuckets = this->m_numBuckets;
0065e14c      uint32_t* eax_2 = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, 0, nullptr);
0065e14c      
0065e156      if (eax_2 != bucketSizesEnd_1)
0065e15f          eax_2 = &eax_2[1];
0065e156      else
0065e156      {
0065e158          eax_2 -= 4;
0065e158          
0065e15d          if (eax_2 != bucketSizesEnd_1)
0065e15f              eax_2 = &eax_2[1];
0065e156      }
0065e156      
0065e171      return IntrusiveHashTable<int,CAsyncStateHandler *,1>::resize_internal(this, *(uint32_t*)eax_2);
0065e120  }

0065e172                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0065e180  uint8_t __fastcall IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::grow(class IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this)

0065e180  {
0065e184      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0065e1a1      uint32_t m_numBuckets = this->m_numBuckets;
0065e1ac      uint32_t* eax_2 = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, 0, nullptr);
0065e1ac      
0065e1b6      if (eax_2 != bucketSizesEnd_1)
0065e1bf          eax_2 = &eax_2[1];
0065e1b6      else
0065e1b6      {
0065e1b8          eax_2 -= 4;
0065e1b8          
0065e1bd          if (eax_2 != bucketSizesEnd_1)
0065e1bf              eax_2 = &eax_2[1];
0065e1b6      }
0065e1b6      
0065e1d1      return IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::resize_internal(this, *(uint32_t*)eax_2);
0065e180  }

0065e1d2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0065e1e0  int32_t __thiscall CAsyncStateHandler::GetContextData(class CAsyncStateHandler const* this, class AsyncContext arg2, uint32_t arg3)

0065e1e0  {
0065e1e3      /* tailcall */
0065e1e3      return CAsyncStateMachine::GetContextData(this->m_pMachine, arg2, arg3);
0065e1e0  }

0065e1e8                          cc cc cc cc cc cc cc cc                                                          ........

0065e1f0  uint8_t __thiscall CAsyncStateHandler::SetContextData(class CAsyncStateHandler* this, class AsyncContext arg2, uint32_t arg3, int32_t arg4)

0065e1f0  {
0065e1f3      /* tailcall */
0065e1f3      return CAsyncStateMachine::SetContextData(this->m_pMachine, arg2, arg3, arg4);
0065e1f0  }

0065e1f8                                                                          cc cc cc cc cc cc cc cc                          ........

0065e200  class AsyncContext* __thiscall CAsyncStateMachine::AllocateAndBeginContext(class CAsyncStateMachine* this, class AsyncContext* __return)

0065e200  {
0065e200      class CAsyncStateMachine* this_1 = this;
0065e204      this->vtable->AllocateContext(&this_1);
0065e210      class CAsyncStateMachine* this_2 = this_1;
0065e210      
0065e21a      if (this_2 != INVALID_ASYNCCONTEXT.m_id)
0065e21a      {
0065e224          CAsyncStateMachine::BeginContext(this, this_2, 0x80000100);
0065e231          __return->m_id = this_1;
0065e235          return __return;
0065e21a      }
0065e21a      
0065e238      class CAsyncStateMachine** __return_1 = __return;
0065e23c      *(uint32_t*)__return_1 = this_2;
0065e240      return __return_1;
0065e200  }

0065e243           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0065e250  void __thiscall IntrusiveHashTable<int,CAsyncStateHandler *,1>::IntrusiveHashTable<int,CAsyncStateHandler *,1>(class IntrusiveHashTable<int,CAsyncStateHandler *,1>* this, uint32_t arg2)

0065e250  {
0065e250      class IntrusiveHashTable<int,CAsyncStateHandler *,1>* this_1 = this;
0065e264      this->m_buckets = nullptr;
0065e267      this->m_firstInterestingBucket = nullptr;
0065e26a      this->m_numBuckets = 0;
0065e26d      this->m_numElements = 0;
0065e271      this->vtable = 0x7fda64;
0065e277      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0065e282      this_1 = arg2;
0065e28e      uint32_t* eax = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &this_1, 0, nullptr);
0065e28e      
0065e298      if (eax == bucketSizesEnd_1)
0065e29a          eax -= 4;
0065e29a      
0065e29d      uint32_t eax_1 = *(uint32_t*)eax;
0065e2a2      this->m_numBuckets = eax_1;
0065e2a2      
0065e2a5      if (eax_1 > 0x17)
0065e2bc          this->m_buckets = operator new[]((eax_1 * 4));
0065e2a5      else
0065e2aa          this->m_buckets = &this->m_aInplaceBuckets;
0065e2aa      
0065e2c2      class CAsyncStateHandler** m_buckets = this->m_buckets;
0065e2c7      uint32_t ecx_4 = (this->m_numBuckets * 4);
0065e2cc      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0065e2dd      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
0065e250  }

0065e2e7                       cc cc cc cc cc cc cc cc cc                                                         .........

0065e2f0  void __thiscall IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>(class IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this, uint32_t arg2)

0065e2f0  {
0065e2f0      class IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this_1 = this;
0065e304      this->m_buckets = nullptr;
0065e307      this->m_firstInterestingBucket = nullptr;
0065e30a      this->m_numBuckets = 0;
0065e30d      this->m_numElements = 0;
0065e311      this->vtable = 0x7fda68;
0065e317      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0065e322      this_1 = arg2;
0065e32e      uint32_t* eax = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &this_1, 0, nullptr);
0065e32e      
0065e338      if (eax == bucketSizesEnd_1)
0065e33a          eax -= 4;
0065e33a      
0065e33d      uint32_t eax_1 = *(uint32_t*)eax;
0065e342      this->m_numBuckets = eax_1;
0065e342      
0065e345      if (eax_1 > 0x17)
0065e35c          this->m_buckets = operator new[]((eax_1 * 4));
0065e345      else
0065e34a          this->m_buckets = &this->m_aInplaceBuckets;
0065e34a      
0065e362      struct CAsyncStateMachine::CAsyncStateData** m_buckets = this->m_buckets;
0065e367      uint32_t ecx_4 = (this->m_numBuckets * 4);
0065e36c      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0065e37d      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
0065e2f0  }

0065e387                       cc cc cc cc cc cc cc cc cc                                                         .........

0065e390  void __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* this, uint32_t arg2)

0065e390  {
0065e390      class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* this_1 = this;
0065e3a4      this->m_buckets = nullptr;
0065e3a7      this->m_firstInterestingBucket = nullptr;
0065e3aa      this->m_numBuckets = 0;
0065e3ad      this->m_numElements = 0;
0065e3b1      this->vtable = 0x7fda6c;
0065e3b7      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0065e3c2      this_1 = arg2;
0065e3ce      uint32_t* eax = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &this_1, 0, nullptr);
0065e3ce      
0065e3d8      if (eax == bucketSizesEnd_1)
0065e3da          eax -= 4;
0065e3da      
0065e3dd      uint32_t eax_1 = *(uint32_t*)eax;
0065e3e2      this->m_numBuckets = eax_1;
0065e3e2      
0065e3e5      if (eax_1 > 0x17)
0065e3fc          this->m_buckets = operator new[]((eax_1 * 4));
0065e3e5      else
0065e3ea          this->m_buckets = &this->m_aInplaceBuckets;
0065e3ea      
0065e402      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_buckets;
0065e407      uint32_t ecx_4 = (this->m_numBuckets * 4);
0065e40c      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0065e41d      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_4 >> 2) << 2)), 0, (ecx_4 & 3));
0065e390  }

0065e427                       cc cc cc cc cc cc cc cc cc                                                         .........

0065e430  uint8_t __fastcall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::grow(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* this)

0065e430  {
0065e434      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0065e451      uint32_t m_numBuckets = this->m_numBuckets;
0065e45c      uint32_t* eax_2 = _STL::__lower_bound<unsigned long const *,unsigned long,_STL::__less_2<unsigned long,unsigned long>,int>(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, 0, nullptr);
0065e45c      
0065e466      if (eax_2 != bucketSizesEnd_1)
0065e46f          eax_2 = &eax_2[1];
0065e466      else
0065e466      {
0065e468          eax_2 -= 4;
0065e468          
0065e46d          if (eax_2 != bucketSizesEnd_1)
0065e46f              eax_2 = &eax_2[1];
0065e466      }
0065e466      
0065e481      return IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::resize_internal(this, *(uint32_t*)eax_2);
0065e430  }

0065e482        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065e490  void __thiscall IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::remove(class IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this, class IntrusiveHashIterator<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1> arg2)

0065e490  {
0065e491      struct CAsyncStateMachine::CAsyncStateData* m_currElement = arg2.m_currElement;
0065e496      struct CAsyncStateMachine::CAsyncStateData** m_currBucket = arg2.m_currBucket;
0065e49a      struct CAsyncStateMachine::CAsyncStateData* m_hashNext = *(uint32_t*)m_currBucket;
0065e49a      
0065e49e      if (m_hashNext != m_currElement)
0065e49e      {
0065e4a7          struct CAsyncStateMachine::CAsyncStateData* m_hashNext_1;
0065e4a7          
0065e4a7          do
0065e4a7          {
0065e4a0              m_hashNext_1 = m_hashNext;
0065e4a2              m_hashNext = m_hashNext->m_hashNext;
0065e4a7          } while (m_hashNext != m_currElement);
0065e4a7          
0065e4ab          if (m_hashNext_1 != 0)
0065e4ab          {
0065e4bf              m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0065e4c2              this->m_numElements -= 1;
0065e4c7              return;
0065e4ab          }
0065e49e      }
0065e49e      
0065e4b0      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
0065e4b2      this->m_numElements -= 1;
0065e490  }

0065e4ca                                cc cc cc cc cc cc                                                            ......

0065e4d0  uint8_t __thiscall IntrusiveHashTable<int,CAsyncStateHandler *,1>::resize_internal(class IntrusiveHashTable<int,CAsyncStateHandler *,1>* this, uint32_t arg2)

0065e4d0  {
0065e4dd      if (arg2 == this->m_numBuckets)
0065e4dd      {
0065e4df          uint32_t eax;
0065e4df          eax = 0;
0065e4e5          return 0;
0065e4dd      }
0065e4dd      
0065e4ea      class CAsyncStateHandler* m_hashNext_2 = nullptr;
0065e4ea      
0065e4ef      while (this->m_numElements != 0)
0065e4ef      {
0065e4f7          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0065e4fd          class CAsyncStateHandler** m_firstInterestingBucket_2;
0065e4fd          class CAsyncStateHandler* m_hashNext_3;
0065e4fd          
0065e4fd          if (this->m_firstInterestingBucket == ecx_1)
0065e4fd          {
0065e511          label_65e511:
0065e511              m_firstInterestingBucket_2 = nullptr;
0065e513              m_hashNext_3 = nullptr;
0065e4fd          }
0065e4fd          else
0065e4fd          {
0065e500              while (true)
0065e500              {
0065e500                  class CAsyncStateHandler** m_firstInterestingBucket = this->m_firstInterestingBucket;
0065e500                  
0065e505                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0065e505                  {
0065e517                      class CAsyncStateHandler** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0065e51a                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
0065e51c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0065e51c                      break;
0065e505                  }
0065e505                  
0065e50c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0065e50c                  
0065e50f                  if (&m_firstInterestingBucket[1] == ecx_1)
0065e50f                      goto label_65e511;
0065e500              }
0065e4fd          }
0065e4fd          
0065e523          class CAsyncStateHandler** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
0065e52a          class CAsyncStateHandler* m_hashNext_4 = m_hashNext_3;
0065e52d          IntrusiveHashTable<int,CAsyncStateHandler *,1>::remove(this, this);
0065e532          m_hashNext_3->m_hashNext = m_hashNext_2;
0065e538          m_hashNext_2 = m_hashNext_3;
0065e4ef      }
0065e4ef      
0065e53c      class CAsyncStateHandler** m_buckets = this->m_buckets;
0065e53c      
0065e544      if (m_buckets != &this->m_aInplaceBuckets)
0065e547          operator delete[](m_buckets);
0065e547      
0065e556      this->m_buckets = nullptr;
0065e559      this->m_firstInterestingBucket = nullptr;
0065e55c      this->m_numBuckets = 0;
0065e55f      this->m_numElements = 0;
0065e562      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::init(this, arg2);
0065e569      class CAsyncStateHandler* m_hashNext_1 = m_hashNext_2;
0065e570      class CAsyncStateHandler** eax_2;
0065e570      
0065e570      if (m_hashNext_2 != 0)
0065e570      {
0065e5b0          class CAsyncStateHandler* m_hashNext;
0065e5b0          
0065e5b0          do
0065e5b0          {
0065e578              m_hashNext = m_hashNext_1->m_hashNext;
0065e578              
0065e581              if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
0065e585                  IntrusiveHashTable<int,CAsyncStateHandler *,1>::grow(this);
0065e585              
0065e58f              uint32_t temp1_1 = (COMBINE(0, m_hashNext_1->m_hashKey) % this->m_numBuckets);
0065e592              class CAsyncStateHandler** m_buckets_1 = this->m_buckets;
0065e598              m_hashNext_1->m_hashNext = m_buckets_1[temp1_1];
0065e59b              m_buckets_1[temp1_1] = m_hashNext_1;
0065e59e              eax_2 = &m_buckets_1[temp1_1];
0065e59e              
0065e5a4              if (eax_2 < this->m_firstInterestingBucket)
0065e5a6                  this->m_firstInterestingBucket = eax_2;
0065e5a6              
0065e5a9              this->m_numElements += 1;
0065e5ae              m_hashNext_1 = m_hashNext;
0065e5b0          } while (m_hashNext != 0);
0065e570      }
0065e570      
0065e5b5      eax_2 = 1;
0065e5b8      return 1;
0065e4d0  }

0065e5bb                                                                                   cc cc cc cc cc                             .....

0065e5c0  uint8_t __thiscall IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::resize_internal(class IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this, uint32_t arg2)

0065e5c0  {
0065e5ca      if (arg2 == this->m_numBuckets)
0065e5ca      {
0065e5cc          uint32_t eax;
0065e5cc          eax = 0;
0065e5cf          return 0;
0065e5ca      }
0065e5ca      
0065e5d4      struct CAsyncStateMachine::CAsyncStateData* m_hashNext_3 = nullptr;
0065e5d4      
0065e5d9      while (this->m_numElements != 0)
0065e5d9      {
0065e5e6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0065e5ec          struct CAsyncStateMachine::CAsyncStateData* m_hashNext_4;
0065e5ec          struct CAsyncStateMachine::CAsyncStateData** m_firstInterestingBucket_2;
0065e5ec          
0065e5ec          if (this->m_firstInterestingBucket == ecx_1)
0065e5ec          {
0065e602          label_65e602:
0065e602              m_firstInterestingBucket_2 = nullptr;
0065e604              m_hashNext_4 = nullptr;
0065e5ec          }
0065e5ec          else
0065e5ec          {
0065e5f0              while (true)
0065e5f0              {
0065e5f0                  int32_t* m_firstInterestingBucket = this->m_firstInterestingBucket;
0065e5f0                  
0065e5f6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0065e5f6                  {
0065e608                      struct CAsyncStateMachine::CAsyncStateData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0065e60b                      m_hashNext_4 = *(uint32_t*)m_firstInterestingBucket_1;
0065e60d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0065e60d                      break;
0065e5f6                  }
0065e5f6                  
0065e5fd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0065e5fd                  
0065e600                  if (&m_firstInterestingBucket[1] == ecx_1)
0065e600                      goto label_65e602;
0065e5f0              }
0065e5ec          }
0065e5ec          
0065e60f          struct CAsyncStateMachine::CAsyncStateData* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0065e60f          
0065e614          if (m_hashNext == m_hashNext_4)
0065e626              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0065e614          else
0065e614          {
0065e61d              struct CAsyncStateMachine::CAsyncStateData* m_hashNext_2;
0065e61d              
0065e61d              do
0065e61d              {
0065e616                  m_hashNext_2 = m_hashNext;
0065e618                  m_hashNext = m_hashNext->m_hashNext;
0065e61d              } while (m_hashNext != m_hashNext_4);
0065e61d              
0065e621              if (m_hashNext_2 != 0)
0065e62e                  m_hashNext_2->m_hashNext = m_hashNext->m_hashNext;
0065e621              else
0065e626                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0065e614          }
0065e614          
0065e631          this->m_numElements -= 1;
0065e635          m_hashNext_4->m_hashNext = m_hashNext_3;
0065e63c          m_hashNext_3 = m_hashNext_4;
0065e5d9      }
0065e5d9      
0065e640      struct CAsyncStateMachine::CAsyncStateData** m_buckets = this->m_buckets;
0065e640      
0065e648      if (m_buckets != &this->m_aInplaceBuckets)
0065e64b          operator delete[](m_buckets);
0065e64b      
0065e65c      this->m_buckets = nullptr;
0065e65f      this->m_firstInterestingBucket = nullptr;
0065e662      this->m_numBuckets = 0;
0065e665      this->m_numElements = 0;
0065e668      IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::init(this, arg2);
0065e66f      void* eax_4;
0065e66f      
0065e66f      if (m_hashNext_3 != 0)
0065e66f      {
0065e6b1          struct CAsyncStateMachine::CAsyncStateData* m_hashNext_1;
0065e6b1          
0065e6b1          do
0065e6b1          {
0065e677              m_hashNext_1 = m_hashNext_3->m_hashNext;
0065e677              
0065e681              if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
0065e685                  IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::grow(this);
0065e685              
0065e68f              uint32_t temp1_1 = (COMBINE(0, m_hashNext_3->m_hashKey.m_id) % this->m_numBuckets);
0065e692              struct CAsyncStateMachine::CAsyncStateData** m_buckets_1 = this->m_buckets;
0065e698              m_hashNext_3->m_hashNext = m_buckets_1[temp1_1];
0065e69b              m_buckets_1[temp1_1] = m_hashNext_3;
0065e69e              eax_4 = &m_buckets_1[temp1_1];
0065e69e              
0065e6a4              if (eax_4 < this->m_firstInterestingBucket)
0065e6a6                  this->m_firstInterestingBucket = eax_4;
0065e6a6              
0065e6a9              this->m_numElements += 1;
0065e6af              m_hashNext_3 = m_hashNext_1;
0065e6b1          } while (m_hashNext_1 != 0);
0065e66f      }
0065e66f      
0065e6b5      eax_4 = 1;
0065e6b8      return 1;
0065e5c0  }

0065e5dd                                                                                         8d 49 00                               .I.
0065e6bb                                                                                   cc cc cc cc cc                             .....

0065e6c0  void __fastcall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::delete_contents(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* this)

0065e6c0  {
0065e6c7      while (this->m_numElements != 0)
0065e6c7      {
0065e6dc          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0065e6e2          class HashTableData<PStringBase<char>,unsigned long>** m_firstInterestingBucket_2;
0065e6e2          int32_t* ebx_1;
0065e6e2          
0065e6e2          if (this->m_firstInterestingBucket == ecx_1)
0065e6e2          {
0065e6f6          label_65e6f6:
0065e6f6              m_firstInterestingBucket_2 = nullptr;
0065e6f8              ebx_1 = nullptr;
0065e6e2          }
0065e6e2          else
0065e6e2          {
0065e6e4              while (true)
0065e6e4              {
0065e6e4                  int32_t* m_firstInterestingBucket = this->m_firstInterestingBucket;
0065e6e4                  
0065e6ea                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0065e6ea                  {
0065e6fc                      class HashTableData<PStringBase<char>,unsigned long>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0065e6ff                      ebx_1 = *(uint32_t*)m_firstInterestingBucket_1;
0065e701                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0065e701                      break;
0065e6ea                  }
0065e6ea                  
0065e6f1                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0065e6f1                  
0065e6f4                  if (&m_firstInterestingBucket[1] == ecx_1)
0065e6f4                      goto label_65e6f6;
0065e6e4              }
0065e6e2          }
0065e6e2          
0065e703          class HashTableData<PStringBase<char>,unsigned long>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0065e703          
0065e707          if (m_hashNext == ebx_1)
0065e720              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0065e707          else
0065e707          {
0065e717              class HashTableData<PStringBase<char>,unsigned long>* m_hashNext_1;
0065e717              
0065e717              do
0065e717              {
0065e710                  m_hashNext_1 = m_hashNext;
0065e712                  m_hashNext = m_hashNext->m_hashNext;
0065e717              } while (m_hashNext != ebx_1);
0065e717              
0065e71b              if (m_hashNext_1 != 0)
0065e727                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0065e71b              else
0065e720                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0065e707          }
0065e707          
0065e72a          this->m_numElements -= 1;
0065e72a          
0065e730          if (ebx_1 != 0)
0065e730          {
0065e734              int32_t* edi_2 = (*(uint32_t*)ebx_1 - 0x14);
0065e734              
0065e743              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0065e74b                  **(uint32_t**)edi_2(1);
0065e74b              
0065e74e              operator delete(ebx_1);
0065e730          }
0065e6c7      }
0065e6c0  }

0065e765                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0065e770  void __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::add_internal(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* this, class HashTableData<PStringBase<char>,unsigned long>* arg2)

0065e770  {
0065e780      if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
0065e784          IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::grow(this);
0065e784      
0065e78f      uint32_t m_numBuckets = this->m_numBuckets;
0065e793      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_hashKey.m_charbuffer;
0065e795      uint32_t eax_2 = *(int32_t*)((char*)m_charbuffer + -8);
0065e795      
0065e79b      if (eax_2 == 0xffffffff)
0065e79b      {
0065e79e          eax_2 = compute_str_hash<char>(m_charbuffer);
0065e7a6          *(uint32_t*)((char*)m_charbuffer - 8) = eax_2;
0065e79b      }
0065e79b      
0065e7ab      uint32_t temp1 = (COMBINE(0, eax_2) % m_numBuckets);
0065e7ad      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_buckets;
0065e7b3      arg2->m_hashNext = m_buckets[temp1];
0065e7b7      m_buckets[temp1] = arg2;
0065e7bc      class HashTableData<PStringBase<char>,unsigned long>** eax_3 = &m_buckets[temp1];
0065e7bc      
0065e7c2      if (eax_3 < this->m_firstInterestingBucket)
0065e7c4          this->m_firstInterestingBucket = eax_3;
0065e7c4      
0065e7c7      this->m_numElements += 1;
0065e770  }

0065e7cf                                               cc                                                                 .

0065e7d0  uint8_t __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::resize_internal(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* this, uint32_t arg2)

0065e7d0  {
0065e7da      if (arg2 == this->m_numBuckets)
0065e7da      {
0065e7dc          uint32_t eax;
0065e7dc          eax = 0;
0065e7df          return 0;
0065e7da      }
0065e7da      
0065e7e7      int32_t* i = nullptr;
0065e7e7      
0065e7ec      if (this->m_numElements != 0)
0065e7ec      {
0065e7ee          i = nullptr;
0065e7ee          
0065e84c          do
0065e84c          {
0065e7f6              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0065e7fc              int32_t* i_2;
0065e7fc              int32_t* m_firstInterestingBucket_2;
0065e7fc              
0065e7fc              if (this->m_firstInterestingBucket == ecx_1)
0065e7fc              {
0065e811              label_65e811:
0065e811                  m_firstInterestingBucket_2 = nullptr;
0065e813                  i_2 = nullptr;
0065e7fc              }
0065e7fc              else
0065e7fc              {
0065e800                  while (true)
0065e800                  {
0065e800                      class HashTableData<PStringBase<char>,unsigned long>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0065e800                      
0065e805                      if (*(uint32_t*)m_firstInterestingBucket != 0)
0065e805                      {
0065e817                          int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0065e81a                          i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0065e81c                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0065e81c                          break;
0065e805                      }
0065e805                      
0065e80c                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0065e80c                      
0065e80f                      if (&m_firstInterestingBucket[1] == ecx_1)
0065e80f                          goto label_65e811;
0065e800                  }
0065e7fc              }
0065e7fc              
0065e81e              void* eax_2 = *(uint32_t*)m_firstInterestingBucket_2;
0065e81e              
0065e823              if (eax_2 == i_2)
0065e835                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_2 + 4);
0065e823              else
0065e823              {
0065e82c                  void* edx_2;
0065e82c                  
0065e82c                  do
0065e82c                  {
0065e825                      edx_2 = eax_2;
0065e827                      eax_2 = *(uint32_t*)((char*)eax_2 + 4);
0065e82c                  } while (eax_2 != i_2);
0065e82c                  
0065e830                  if (edx_2 != 0)
0065e83d                      *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_2 + 4);
0065e830                  else
0065e835                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_2 + 4);
0065e823              }
0065e823              
0065e840              this->m_numElements -= 1;
0065e844              i_2[1] = i;
0065e84a              i = i_2;
0065e84c          } while (this->m_numElements != 0);
0065e7ec      }
0065e7ec      
0065e84e      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_buckets;
0065e84e      
0065e856      if (m_buckets != &this->m_aInplaceBuckets)
0065e859          operator delete[](m_buckets);
0065e859      
0065e868      this->m_buckets = nullptr;
0065e86b      this->m_firstInterestingBucket = nullptr;
0065e86e      this->m_numBuckets = 0;
0065e871      this->m_numElements = 0;
0065e874      class HashTableData<PStringBase<char>,unsigned long>** eax_5;
0065e874      int32_t ecx_4;
0065e874      eax_5 = IntrusiveHashTable<Turbine_GUID,HashTableData<Turbine_GUID,Interface *> *,1>::init(this, arg2);
0065e874      
0065e87b      while (i != 0)
0065e87b      {
0065e886          uint32_t i_1 = i[1];
0065e886          
0065e894          if ((this->m_numBuckets * 2) < (this->m_numElements + 1))
0065e898              IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::grow(this);
0065e898          
0065e89d          char* ebp_1 = *(uint32_t*)i;
0065e89f          uint32_t eax_6 = *(uint32_t*)(ebp_1 - 8);
0065e8a5          uint32_t m_numBuckets = this->m_numBuckets;
0065e8a5          
0065e8a8          if (eax_6 == 0xffffffff)
0065e8a8          {
0065e8ab              eax_6 = compute_str_hash<char>(ebp_1);
0065e8b3              *(uint32_t*)(ebp_1 - 8) = eax_6;
0065e8a8          }
0065e8a8          
0065e8b8          uint32_t temp1_1 = (COMBINE(0, eax_6) % m_numBuckets);
0065e8ba          class HashTableData<PStringBase<char>,unsigned long>** m_buckets_1 = this->m_buckets;
0065e8c0          i[1] = m_buckets_1[temp1_1];
0065e8c3          m_buckets_1[temp1_1] = i;
0065e8c6          eax_5 = &m_buckets_1[temp1_1];
0065e8c6          
0065e8cc          if (eax_5 < this->m_firstInterestingBucket)
0065e8ce              this->m_firstInterestingBucket = eax_5;
0065e8ce          
0065e8d1          i = i_1;
0065e8d5          this->m_numElements += 1;
0065e87b      }
0065e87b      
0065e8e0      eax_5 = 1;
0065e8e3      return 1;
0065e7d0  }

0065e8e6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0065e8f0  uint8_t __thiscall IntrusiveHashTable<int,CAsyncStateHandler *,1>::add(class IntrusiveHashTable<int,CAsyncStateHandler *,1>* this, class CAsyncStateHandler* arg2)

0065e8f0  {
0065e8f8      int32_t m_hashKey = arg2->m_hashKey;
0065e8fe      uint32_t m_numBuckets = this->m_numBuckets;
0065e8fe      
0065e90d      for (void* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 8))
0065e90d      {
0065e913          if (*(uint32_t*)((char*)i + 4) == m_hashKey)
0065e913          {
0065e95d              if (i == 0)
0065e95d                  break;
0065e95d              
0065e961              class CAsyncStateHandler** eax_1;
0065e961              eax_1 = 0;
0065e964              return 0;
0065e913          }
0065e90d      }
0065e90d      
0065e927      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0065e92b          IntrusiveHashTable<int,CAsyncStateHandler *,1>::grow(this);
0065e92b      
0065e935      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0065e938      class CAsyncStateHandler** m_buckets = this->m_buckets;
0065e93e      arg2->m_hashNext = m_buckets[temp1_1];
0065e941      m_buckets[temp1_1] = arg2;
0065e944      class CAsyncStateHandler** eax_3 = &m_buckets[temp1_1];
0065e944      
0065e94a      if (eax_3 < this->m_firstInterestingBucket)
0065e94c          this->m_firstInterestingBucket = eax_3;
0065e94c      
0065e94f      this->m_numElements += 1;
0065e955      eax_3 = 1;
0065e958      return 1;
0065e8f0  }

0065e967                       cc cc cc cc cc cc cc cc cc                                                         .........

0065e970  uint8_t __thiscall IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::add(class IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this, struct CAsyncStateMachine::CAsyncStateData* arg2)

0065e970  {
0065e978      uint32_t m_id = arg2->m_hashKey.m_id;
0065e97e      uint32_t m_numBuckets = this->m_numBuckets;
0065e97e      
0065e98d      for (void* i = this->m_buckets[(COMBINE(0, m_id) % m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 0xc))
0065e98d      {
0065e993          if (*(uint32_t*)((char*)i + 8) == m_id)
0065e993          {
0065e9dd              if (i == 0)
0065e9dd                  break;
0065e9dd              
0065e9e1              struct CAsyncStateMachine::CAsyncStateData** eax_1;
0065e9e1              eax_1 = 0;
0065e9e4              return 0;
0065e993          }
0065e98d      }
0065e98d      
0065e9a7      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0065e9ab          IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::grow(this);
0065e9ab      
0065e9b5      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.m_id) % this->m_numBuckets);
0065e9b8      struct CAsyncStateMachine::CAsyncStateData** m_buckets = this->m_buckets;
0065e9be      arg2->m_hashNext = m_buckets[temp1_1];
0065e9c1      m_buckets[temp1_1] = arg2;
0065e9c4      struct CAsyncStateMachine::CAsyncStateData** eax_3 = &m_buckets[temp1_1];
0065e9c4      
0065e9ca      if (eax_3 < this->m_firstInterestingBucket)
0065e9cc          this->m_firstInterestingBucket = eax_3;
0065e9cc      
0065e9cf      this->m_numElements += 1;
0065e9d5      eax_3 = 1;
0065e9d8      return 1;
0065e970  }

0065e9e7                       cc cc cc cc cc cc cc cc cc                                                         .........

0065e9f0  struct CAsyncStateMachine::CAsyncStateData* __thiscall IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::remove(class IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this, class AsyncContext* arg2)

0065e9f0  {
0065e9f7      uint32_t m_id = arg2->m_id;
0065e9fd      uint32_t temp1 = (COMBINE(0, m_id) % this->m_numBuckets);
0065ea00      struct CAsyncStateMachine::CAsyncStateData** m_buckets = this->m_buckets;
0065ea00      
0065ea0d      for (void* i = m_buckets[temp1]; i != 0; i = *(uint32_t*)((char*)i + 0xc))
0065ea0d      {
0065ea13          if (*(uint32_t*)((char*)i + 8) == m_id)
0065ea13          {
0065ea26              if (i == 0)
0065ea26                  break;
0065ea26              
0065ea2f              void* var_14 = &m_buckets[temp1];
0065ea32              void* i_1 = i;
0065ea35              IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::remove(this, this);
0065ea3f              return i;
0065ea13          }
0065ea0d      }
0065ea0d      
0065ea21      return 0;
0065e9f0  }

0065ea42        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065ea50  uint8_t __thiscall IntrusiveHashList<int,CAsyncStateHandler *,1>::push_head(class IntrusiveHashList<int,CAsyncStateHandler *,1>* this, class CAsyncStateHandler* arg2)

0065ea50  {
0065ea59      int32_t m_hashKey = arg2->m_hashKey;
0065ea59      
0065ea6e      for (void* i = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 8))
0065ea6e      {
0065ea73          if (*(uint32_t*)((char*)i + 4) == m_hashKey)
0065ea73          {
0065ea8f              if (i == 0)
0065ea8f                  break;
0065ea8f              
0065ea93              class CAsyncStateHandler** eax_1;
0065ea93              eax_1 = 0;
0065ea96              return 0;
0065ea73          }
0065ea6e      }
0065ea6e      
0065ea7f      IntrusiveHashTable<int,CAsyncStateHandler *,1>::add(this, arg2);
0065ea86      class DLListData** eax_2;
0065ea86      
0065ea86      if (arg2 == 0xfffffffc)
0065ea99          eax_2 = nullptr;
0065ea86      else
0065ea88          eax_2 = &arg2->dllist_next;
0065ea88      
0065eaa7      ADJ(eax_2)->dllist_next = this->m_list.head_;
0065eaa0      class DLListData* head_ = this->m_list.head_;
0065eaa0      
0065eaa5      if (head_ != 0)
0065eaa5      {
0065eaa7          head_->dllist_prev = eax_2;
0065eaaa          this->m_list.head_ = eax_2;
0065eaa7          ADJ(eax_2)->dllist_prev = nullptr;
0065eab6          eax_2 = 1;
0065eab9          return 1;
0065eaa5      }
0065eaa5      
0065eabc      this->m_list.tail_ = eax_2;
0065eabf      this->m_list.head_ = eax_2;
0065eaa7      ADJ(eax_2)->dllist_prev = nullptr;
0065eacb      eax_2 = 1;
0065eace      return 1;
0065ea50  }

0065ead1                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

0065eae0  uint8_t __thiscall IntrusiveHashList<int,CAsyncStateHandler *,1>::push_tail(class IntrusiveHashList<int,CAsyncStateHandler *,1>* this, class CAsyncStateHandler* arg2)

0065eae0  {
0065eae9      int32_t m_hashKey = arg2->m_hashKey;
0065eae9      
0065eafe      for (void* i = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 8))
0065eafe      {
0065eb03          if (*(uint32_t*)((char*)i + 4) == m_hashKey)
0065eb03          {
0065eb1f              if (i == 0)
0065eb1f                  break;
0065eb1f              
0065eb23              class CAsyncStateHandler** eax_1;
0065eb23              eax_1 = 0;
0065eb26              return 0;
0065eb03          }
0065eafe      }
0065eafe      
0065eb0f      IntrusiveHashTable<int,CAsyncStateHandler *,1>::add(this, arg2);
0065eb16      class DLListData** eax_2;
0065eb16      
0065eb16      if (arg2 == 0xfffffffc)
0065eb29          eax_2 = nullptr;
0065eb16      else
0065eb18          eax_2 = &arg2->dllist_next;
0065eb18      
0065eb33      DLListBase::InsertAfter(&this->m_list, eax_2, this->m_list.tail_);
0065eb3a      int32_t eax_3;
0065eb3a      eax_3 = 1;
0065eb3d      return 1;
0065eae0  }


0065eb40  uint8_t __thiscall IntrusiveHashList<int,CAsyncStateHandler *,1>::insert_after(class IntrusiveHashList<int,CAsyncStateHandler *,1>* this, class CAsyncStateHandler* arg2, class CAsyncStateHandler* arg3)

0065eb40  {
0065eb4a      if (arg2 == 0)
0065eb58          return IntrusiveHashList<int,CAsyncStateHandler *,1>::push_head(this, arg3);
0065eb58      
0065eb6c      if (IntrusiveHashTable<int,CAsyncStateHandler *,1>::contains(this, &arg3->m_hashKey) != 0)
0065eb74          return 0;
0065eb74      
0065eb7a      IntrusiveHashTable<int,CAsyncStateHandler *,1>::add(this, arg3);
0065eb84      class DLListData** ecx_1;
0065eb84      
0065eb84      if (arg2 == 0xfffffffc)
0065eb8b          ecx_1 = nullptr;
0065eb84      else
0065eb86          ecx_1 = &arg2->dllist_next;
0065eb86      
0065eb8f      if (arg3 != 0xfffffffc)
0065eb8f      {
0065eb99          DLListBase::InsertAfter(&this->m_list, &arg3->dllist_next, ecx_1);
0065eba1          int32_t eax_5;
0065eba1          eax_5 = 1;
0065eba4          return 1;
0065eb8f      }
0065eb8f      
0065ebae      DLListBase::InsertAfter(&this->m_list, nullptr, ecx_1);
0065ebb6      int32_t eax_6;
0065ebb6      eax_6 = 1;
0065ebb9      return 1;
0065eb40  }

0065ebbc                                                                                      cc cc cc cc                              ....

0065ebc0  uint8_t __thiscall IntrusiveHashList<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::push_tail(class IntrusiveHashList<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this, struct CAsyncStateMachine::CAsyncStateData* arg2)

0065ebc0  {
0065ebc9      uint32_t m_id = arg2->m_hashKey.m_id;
0065ebc9      
0065ebde      for (void* i = this->m_hash.m_buckets[(COMBINE(0, m_id) % this->m_hash.m_numBuckets)]; i != 0; i = *(uint32_t*)((char*)i + 0xc))
0065ebde      {
0065ebe3          if (*(uint32_t*)((char*)i + 8) == m_id)
0065ebe3          {
0065ebff              if (i == 0)
0065ebff                  break;
0065ebff              
0065ec03              struct CAsyncStateMachine::CAsyncStateData** eax_1;
0065ec03              eax_1 = 0;
0065ec06              return 0;
0065ebe3          }
0065ebde      }
0065ebde      
0065ebef      IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::add(this, arg2);
0065ebf6      class DLListData** eax_2;
0065ebf6      
0065ebf6      if (arg2 == 0xfffffff8)
0065ec09          eax_2 = nullptr;
0065ebf6      else
0065ebf8          eax_2 = &arg2->dllist_next;
0065ebf8      
0065ec13      DLListBase::InsertAfter(&this->m_list, eax_2, this->m_list.tail_);
0065ec1a      int32_t eax_3;
0065ec1a      eax_3 = 1;
0065ec1d      return 1;
0065ebc0  }


0065ec20  struct CAsyncStateMachine::CAsyncStateData* __thiscall IntrusiveHashList<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::remove(class IntrusiveHashList<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* this, class AsyncContext* arg2)

0065ec20  {
0065ec29      uint32_t m_id = arg2->m_id;
0065ec35      void* result = this->m_hash.m_buckets[(COMBINE(0, m_id) % this->m_hash.m_numBuckets)];
0065ec35      
0065ec3a      if (result != 0)
0065ec3a      {
0065ec43          while (*(uint32_t*)((char*)result + 8) != m_id)
0065ec43          {
0065ec45              result = *(uint32_t*)((char*)result + 0xc);
0065ec45              
0065ec4a              if (result == 0)
0065ec51                  return result;
0065ec43          }
0065ec43          
0065ec56          if (result != 0)
0065ec56          {
0065ec5d              void* eax_4;
0065ec5d              
0065ec5d              if (result == 0xfffffff8)
0065ec64                  eax_4 = nullptr;
0065ec5d              else
0065ec5f                  eax_4 = ((char*)result + 0x10);
0065ec5f              
0065ec6a              DLListBase::Remove(&this->m_list, eax_4);
0065ec72              IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::remove(this, arg2);
0065ec56          }
0065ec3a      }
0065ec3a      
0065ec7c      return result;
0065ec20  }

0065ec7f                                                                                               cc                                 .

0065ec80  void __thiscall IntrusiveHashTable<int,CAsyncStateHandler *,1>::remove(class IntrusiveHashTable<int,CAsyncStateHandler *,1>* this, class IntrusiveHashIterator<int,CAsyncStateHandler *,1> arg2)

0065ec80  {
0065ec81      class CAsyncStateHandler* m_currElement = arg2.m_currElement;
0065ec86      class CAsyncStateHandler** m_currBucket = arg2.m_currBucket;
0065ec8a      class CAsyncStateHandler* m_hashNext = *(uint32_t*)m_currBucket;
0065ec8a      
0065ec8e      if (m_hashNext != m_currElement)
0065ec8e      {
0065ec97          class CAsyncStateHandler* m_hashNext_1;
0065ec97          
0065ec97          do
0065ec97          {
0065ec90              m_hashNext_1 = m_hashNext;
0065ec92              m_hashNext = m_hashNext->m_hashNext;
0065ec97          } while (m_hashNext != m_currElement);
0065ec97          
0065ec9b          if (m_hashNext_1 != 0)
0065ec9b          {
0065ecaf              m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0065ecb2              this->m_numElements -= 1;
0065ecb7              return;
0065ec9b          }
0065ec8e      }
0065ec8e      
0065eca0      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
0065eca2      this->m_numElements -= 1;
0065ec80  }

0065ecba                                                                                cc cc cc cc cc cc                            ......

0065ecc0  uint8_t __thiscall CAsyncStateMachine::AddStateHandler(class CAsyncStateMachine* this, class CAsyncStateHandler* arg2)

0065ecc0  {
0065ecc9      char ebx = 0;
0065ecd3      class DLListData* var_10 = nullptr;
0065ecd7      class DLListData* eax;
0065ecd7      
0065ecd7      if (this->m_States.m_hash.m_numElements > 0)
0065ecd7      {
0065ecd9          eax = this->m_States.m_list.head_;
0065ecd9          
0065ecde          if (eax == 0)
0065ece9              var_10 = nullptr;
0065ecde          else
0065ece3              var_10 = ((char*)eax - 0xc);
0065ecd7      }
0065ecd7      
0065eced      void* __offset(DLListData, -0xc) edi = nullptr;
0065eced      
0065ecf2      if (this->m_States.m_hash.m_numElements > 0)
0065ecf2      {
0065ecf4          eax = this->m_States.m_list.tail_;
0065ecf4          
0065ecf9          if (eax == 0)
0065ed00              edi = nullptr;
0065ecf9          else
0065ecfb              edi = ((char*)eax - 0xc);
0065ecf2      }
0065ecf2      
0065ed06      int32_t m_hashKey = arg2->m_hashKey;
0065ed06      
0065ed0f      if (m_hashKey >= 0x80000100)
0065ed0f      {
0065ed1b          if (m_hashKey <= 0x7ffffeff)
0065ed1b          {
0065ed6a          label_65ed6a:
0065ed6a              void* edx_3 = *(uint32_t*)(this->m_States.m_hash.m_buckets + ((COMBINE(0, m_hashKey) % this->m_States.m_hash.m_numBuckets) << 2));
0065ed6a              
0065ed6f              if (edx_3 == 0)
0065ed6f              {
0065ed7d              label_65ed7d:
0065ed84                  void* __offset(DLListData, -0xc) eax_4;
0065ed84                  
0065ed84                  if ((edi == 0 || *(int32_t*)((char*)ADJ(edi) + -8) < m_hashKey))
0065ed84                  {
0065ede5                      IntrusiveHashList<int,CAsyncStateHandler *,1>::push_tail(&this->m_States, arg2);
0065edee                  label_65edee:
0065edee                      struct CAsyncStateHandler::VTable* vtable = arg2->vtable;
0065edf1                      arg2->m_pMachine = this;
0065edf6                      ebx = 1;
0065edf8                      vtable->OnStateHandlerInit();
0065ed84                  }
0065ed84                  else
0065ed84                  {
0065ed8d                      if (var_10->dllist_prev > m_hashKey)
0065ed8d                      {
0065ed90                          IntrusiveHashList<int,CAsyncStateHandler *,1>::push_head(&this->m_States, arg2);
0065ed95                          goto label_65edee;
0065ed8d                      }
0065ed8d                      
0065eda7                      eax_4 = edi;
0065edab                      class IntrusiveHashList<int,CAsyncStateHandler *,1>* var_4_2 = &this->m_States;
0065edab                      
0065edaf                      if (var_10 != eax_4)
0065edaf                      {
0065edb1                          while (true)
0065edb1                          {
0065edb1                              class DLListData* dllist_prev = ADJ(eax_4)->dllist_prev;
0065edb1                              
0065edbd                              if ((dllist_prev == 0 || dllist_prev == 8))
0065edc4                                  eax_4 = nullptr;
0065edbd                              else
0065edbf                                  eax_4 = ((char*)dllist_prev - 0xc);
0065edbf                              
0065edc9                              if (*(int32_t*)((char*)ADJ(eax_4) + -8) < m_hashKey)
0065edc9                              {
0065eddd                                  IntrusiveHashList<int,CAsyncStateHandler *,1>::insert_after(&this->m_States, eax_4, arg2);
0065ede2                                  break;
0065edc9                              }
0065edc9                              
0065edcd                              if (var_10 == eax_4)
0065edcd                              {
0065edd2                                  eax_4 = 0;
0065edd8                                  return 0;
0065edcd                              }
0065edb1                          }
0065edb1                          
0065edc9                          goto label_65edee;
0065edaf                      }
0065ed84                  }
0065ed84                  
0065edfe                  eax_4 = ebx;
0065ee04                  return eax_4;
0065ed6f              }
0065ed6f              
0065ed74              while (*(uint32_t*)((char*)edx_3 + 4) != m_hashKey)
0065ed74              {
0065ed76                  edx_3 = *(uint32_t*)((char*)edx_3 + 8);
0065ed76                  
0065ed7b                  if (edx_3 == 0)
0065ed7b                      goto label_65ed7d;
0065ed74              }
0065ed74              
0065ed99              if (edx_3 == 0)
0065ed99                  goto label_65ed7d;
0065ed1b          }
0065ed1b          else
0065ed1b          {
0065ed23              if (m_hashKey == 0x7ffffffd)
0065ed23              {
0065ed25                  eax = edi;
0065ed29                  m_hashKey = 0x7ffffeff;
0065ed2e                  class IntrusiveHashList<int,CAsyncStateHandler *,1>* var_4_1 = &this->m_States;
0065ed2e                  
0065ed32                  if (eax != 0)
0065ed32                  {
0065ed37                      while (eax->dllist_prev == m_hashKey)
0065ed37                      {
0065ed39                          void* eax_1 = *(int32_t*)((char*)eax + 0x10);
0065ed39                          
0065ed45                          if ((eax_1 == 0 || eax_1 == 8))
0065ed4c                              eax = nullptr;
0065ed45                          else
0065ed47                              eax = ((char*)eax_1 - 0xc);
0065ed47                          
0065ed4e                          m_hashKey -= 1;
0065ed4e                          
0065ed53                          if (eax == 0)
0065ed53                              break;
0065ed37                      }
0065ed32                  }
0065ed32                  
0065ed55                  arg2->m_hashKey = m_hashKey;
0065ed23              }
0065ed23              
0065ed5e              if (m_hashKey <= 0x7ffffeff)
0065ed5e                  goto label_65ed6a;
0065ed1b          }
0065ed0f      }
0065ed0f      
0065ed9e      eax = 0;
0065eda4      return 0;
0065ecc0  }

0065ee07                       cc cc cc cc cc cc cc cc cc                                                         .........

0065ee10  class AsyncContext* __thiscall CAsyncStateMachine::AllocateContext(class CAsyncStateMachine* this, class AsyncContext* __return)

0065ee10  {
0065ee1c      if (this->m_dwNextContextNumber == 0)
0065ee1e          this->m_dwNextContextNumber = 1;
0065ee1e      
0065ee28      uint32_t m_dwNextContextNumber = this->m_dwNextContextNumber;
0065ee2e      struct CAsyncStateMachine::VTable* vtable = this->vtable;
0065ee36      this->m_dwNextContextNumber = (m_dwNextContextNumber + 1);
0065ee3c      struct CAsyncStateMachine::CAsyncStateData* eax_1 = vtable->AllocateStateData(m_dwNextContextNumber);
0065ee3c      
0065ee43      if (eax_1 == 0)
0065ee43      {
0065ee51          __return->m_id = INVALID_ASYNCCONTEXT.m_id;
0065ee54          return __return;
0065ee43      }
0065ee43      
0065ee5f      IntrusiveHashList<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::push_tail(&this->m_ContextHash, eax_1);
0065ee67      uint32_t m_numElements = this->m_DataNames.m_intrusiveTable.m_numElements;
0065ee67      
0065ee78      if ((eax_1->Data.m_sizeAndDeallocate & 0x7fffffff) >= m_numElements)
0065ee78      {
0065ee8b          uint32_t i = m_numElements;
0065ee8b          
0065ee8d          if (m_numElements < eax_1->Data.m_num)
0065ee8d          {
0065ee9f              do
0065ee9f              {
0065ee6d                  eax_1->Data.m_data[i] = 0;
0065ee99                  i += 1;
0065ee9f              } while (i < eax_1->Data.m_num);
0065ee8d          }
0065ee8d          
0065ee6d          eax_1->Data.m_num = m_numElements;
0065ee78      }
0065ee78      else if (SmartArray<unsigned long,1>::grow(&eax_1->Data.m_data, m_numElements) != 0)
0065ee6d          eax_1->Data.m_num = m_numElements;
0065ee6d      
0065eea4      int32_t i_1 = 0;
0065eea4      
0065eead      if (this->m_DataNames.m_intrusiveTable.m_numElements > 0)
0065eead      {
0065eec2          do
0065eec2          {
0065ee6d              eax_1->Data.m_data[i_1] = 0;
0065eeb9              i_1 += 1;
0065eec2          } while (i_1 < this->m_DataNames.m_intrusiveTable.m_numElements);
0065eead      }
0065eead      
0065eec4      uint32_t* __return_1 = __return;
0065eeca      *(uint32_t*)__return_1 = m_dwNextContextNumber;
0065eecd      return __return_1;
0065ee10  }


0065eed0  void __thiscall CAsyncStateMachine::EndAndReleaseContext(class CAsyncStateMachine* this, class AsyncContext arg2, enum AsyncStateMachineStatus arg3)

0065eed0  {
0065eed4      class AsyncContext i = arg2;
0065eef1      int32_t* ebp = this->m_ContextHash.m_hash.m_buckets[(COMBINE(0, i) % this->m_ContextHash.m_hash.m_numBuckets)];
0065eef1      
0065eef6      if (ebp != 0)
0065eef6      {
0065ef03          while (ebp[2] != i)
0065ef03          {
0065ef05              ebp = ebp[3];
0065ef05              
0065ef0a              if (ebp == 0)
0065ef11                  return;
0065ef03          }
0065ef03          
0065ef16          if (ebp != 0)
0065ef16          {
0065ef1c              int32_t eax_2 = ebp[9];
0065ef1c              
0065ef22              if (eax_2 <= 1)
0065ef22              {
0065ef2a                  enum AsyncStateMachineStatus edi_1 = arg3;
0065ef2e                  eax_2 = eax_2 == 1;
0065ef33                  ebp[9] = edi_1;
0065ef33                  
0065ef36                  if (eax_2 != 0)
0065ef36                  {
0065ef38                      int32_t* ecx_1 = ebp[0xc];
0065ef38                      
0065ef3d                      if (ecx_1 != 0)
0065ef43                          *(uint32_t*)(*(uint32_t*)ecx_1 + 0xc)(i, edi_1);
0065ef36                  }
0065ef36                  
0065ef4d                  void* __offset(DLListData, -0xc) i_1 = nullptr;
0065ef52                  arg3 = &this->m_States;
0065ef52                  
0065ef56                  if (this->m_States.m_hash.m_numElements > 0)
0065ef56                  {
0065ef58                      class DLListData* head_ = this->m_States.m_list.head_;
0065ef58                      
0065ef5d                      if (head_ == 0)
0065ef64                          i_1 = nullptr;
0065ef5d                      else
0065ef5f                          i_1 = ((char*)head_ - 0xc);
0065ef56                  }
0065ef56                  
0065ef66                  this->vtable->OnContextEnded(i, edi_1);
0065ef6f                  class DLListData* dllist_next;
0065ef6f                  
0065ef6f                  for (; i_1 != 0; i_1 = ((char*)dllist_next - 0xc))
0065ef6f                  {
0065ef77                      *(uint32_t*)(*(int32_t*)((char*)ADJ(i_1) + -0xc) + 0x10)(i, edi_1);
0065ef7a                      dllist_next = ADJ(i_1)->dllist_next;
0065ef7a                      
0065ef7f                      if (dllist_next == 0)
0065ef7f                          break;
0065ef7f                      
0065ef86                      if (dllist_next == 8)
0065ef86                          break;
0065ef6f                  }
0065ef6f                  
0065ef93                  this->vtable->CleanupContextData(i);
0065ef9d                  int32_t* i_2 = nullptr;
0065ef9d                  
0065efa2                  if (*(uint32_t*)(arg3 + 0x6c) > 0)
0065efa2                  {
0065efa4                      void* eax_7 = *(uint32_t*)(arg3 + 0x70);
0065efa4                      
0065efa9                      if (eax_7 == 0)
0065efb0                          i_2 = nullptr;
0065efa9                      else
0065efab                          i_2 = ((char*)eax_7 - 0xc);
0065efa2                  }
0065efa2                  
0065efb4                  enum AsyncStateMachineStatus var_8_1 = arg3;
0065efb8                  void* esi_1;
0065efb8                  
0065efb8                  for (; i_2 != 0; i_2 = ((char*)esi_1 - 0xc))
0065efb8                  {
0065efc5                      *(uint32_t*)(*(uint32_t*)i_2 + 0x14)(i);
0065efc8                      esi_1 = i_2[3];
0065efc8                      
0065efcd                      if (esi_1 == 0)
0065efcd                          break;
0065efcd                      
0065efd4                      if (esi_1 == 8)
0065efd4                          break;
0065efb8                  }
0065efb8                  
0065efe6                  IntrusiveHashList<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::remove(&this->m_ContextHash, &arg2);
0065efe6                  
0065eff9                  if (InterlockedDecrement(&ebp[1]) == 0)
0065f002                      **(uint32_t**)ebp(1);
0065ef22              }
0065ef16          }
0065eef6      }
0065eed0  }

0065f00c                                      cc cc cc cc                                                              ....

0065f010  enum AsyncStateMachineStatus __thiscall CAsyncStateMachine::OnHandlerDoneOK(class CAsyncStateMachine* this, class AsyncContext arg2, int32_t arg3)

0065f010  {
0065f023      enum AsyncStateMachineStatus result = this->vtable->Advance(arg2, arg3);
0065f023      
0065f02b      if (result != AsyncStateMachine_Running)
0065f031          CAsyncStateMachine::EndAndReleaseContext(this, arg2, result);
0065f031      
0065f03b      return result;
0065f010  }

0065f03e                                                                                            cc cc                                ..

0065f040  void __thiscall CAsyncStateMachine::OnHandlerFailed(class CAsyncStateMachine* this, class AsyncContext arg2)

0065f040  {
0065f047      CAsyncStateMachine::EndAndReleaseContext(this, arg2, AsyncStateMachine_Failed);
0065f040  }

0065f04f                                               cc                                                                 .

0065f050  uint8_t __thiscall HashTable<PStringBase<char>,unsigned long,1>::add(class HashTable<PStringBase<char>,unsigned long,1>* this, class PStringBase<char> const* arg2, uint32_t const* arg3)

0065f050  {
0065f05e      void* esi = operator new(0xc);
0065f05e      
0065f065      if (esi == 0)
0065f08b          esi = nullptr;
0065f065      else
0065f065      {
0065f06b          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0065f06d          *(uint32_t*)esi = m_charbuffer;
0065f073          InterlockedIncrement(&m_charbuffer[-1]);
0065f07d          *(uint32_t*)((char*)esi + 4) = 0;
0065f086          *(uint32_t*)((char*)esi + 8) = *(uint32_t*)arg3;
0065f065      }
0065f065      
0065f098      void __return;
0065f098      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::find_internal(&this->m_intrusiveTable, &__return, esi);
0065f0a2      int32_t var_4;
0065f0a2      
0065f0a2      if (var_4 == 0)
0065f0a2      {
0065f0a7          IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::add_internal(&this->m_intrusiveTable, esi);
0065f0ad          int32_t eax_4;
0065f0ad          eax_4 = 1;
0065f0b3          return 1;
0065f0a2      }
0065f0a2      
0065f0b8      if (esi != 0)
0065f0b8      {
0065f0bc          int32_t* edi_3 = (*(uint32_t*)esi - 0x14);
0065f0bc          
0065f0cf          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
0065f0d7              **(uint32_t**)edi_3(1);
0065f0d7          
0065f0da          operator delete(esi);
0065f0b8      }
0065f0b8      
0065f0e3      class IntrusiveHashIterator<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>* eax_3;
0065f0e3      eax_3 = 0;
0065f0e9      return 0;
0065f050  }

0065f0ec                                      cc cc cc cc                                                              ....

0065f0f0  class CAsyncStateHandler* __thiscall IntrusiveHashTable<int,CAsyncStateHandler *,1>::remove(class IntrusiveHashTable<int,CAsyncStateHandler *,1>* this, int32_t const* arg2)

0065f0f0  {
0065f0f7      int32_t const edi = *(uint32_t*)arg2;
0065f0fd      uint32_t temp1 = (COMBINE(0, edi) % this->m_numBuckets);
0065f100      class CAsyncStateHandler** m_buckets = this->m_buckets;
0065f100      
0065f10d      for (void* i = m_buckets[temp1]; i != 0; i = *(uint32_t*)((char*)i + 8))
0065f10d      {
0065f113          if (*(uint32_t*)((char*)i + 4) == edi)
0065f113          {
0065f126              if (i == 0)
0065f126                  break;
0065f126              
0065f12f              void* var_14 = &m_buckets[temp1];
0065f132              void* i_1 = i;
0065f135              IntrusiveHashTable<int,CAsyncStateHandler *,1>::remove(this, this);
0065f13f              return i;
0065f113          }
0065f10d      }
0065f10d      
0065f121      return 0;
0065f0f0  }

0065f142        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065f150  uint32_t __thiscall CAsyncStateMachine::RegisterContextDataName(class CAsyncStateMachine* this, class PStringBase<char> const* arg2)

0065f150  {
0065f154      class PStringBase<char>* ebx = arg2;
0065f167      void __return;
0065f167      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::find_internal(&this->m_DataNames.m_intrusiveTable, &__return, ebx);
0065f172      void* var_4;
0065f172      
0065f172      if (var_4 != 0)
0065f17c          return *(uint32_t*)((char*)var_4 + 8);
0065f17c      
0065f180      uint32_t m_numElements = this->m_DataNames.m_intrusiveTable.m_numElements;
0065f192      arg2 = m_numElements;
0065f196      HashTable<PStringBase<char>,unsigned long,1>::add(&this->m_DataNames.vtable, ebx, &arg2);
0065f1a3      return m_numElements;
0065f150  }

0065f1a6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0065f1b0  void* __thiscall HashTable<PStringBase<char>,unsigned long,1>::`scalar deleting destructor'(class HashTable<PStringBase<char>,unsigned long,1>* this, uint32_t arg2)

0065f1b0  {
0065f1b9      this->vtable = 0x7fda94;
0065f1bf      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::delete_contents(&this->m_intrusiveTable);
0065f1c4      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_intrusiveTable.m_buckets;
0065f1b4      this->m_intrusiveTable.vtable = 0x7fda6c;
0065f1b4      
0065f1d2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0065f1d5          operator delete[](m_buckets);
0065f1d5      
0065f1b4      this->m_intrusiveTable.m_buckets = nullptr;
0065f1b4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0065f1b4      this->m_intrusiveTable.m_numBuckets = 0;
0065f1b4      this->m_intrusiveTable.m_numElements = 0;
0065f1b4      
0065f1f0      if ((arg2 & 1) != 0)
0065f1f3          operator delete(this);
0065f1f3      
0065f1ff      return this;
0065f1b0  }

0065f202        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065f210  class CAsyncStateHandler* __thiscall IntrusiveHashList<int,CAsyncStateHandler *,1>::remove(class IntrusiveHashList<int,CAsyncStateHandler *,1>* this, int32_t const* arg2)

0065f210  {
0065f219      int32_t const i = *(uint32_t*)arg2;
0065f225      void* result = this->m_hash.m_buckets[(COMBINE(0, i) % this->m_hash.m_numBuckets)];
0065f225      
0065f22a      if (result != 0)
0065f22a      {
0065f233          while (*(uint32_t*)((char*)result + 4) != i)
0065f233          {
0065f235              result = *(uint32_t*)((char*)result + 8);
0065f235              
0065f23a              if (result == 0)
0065f241                  return result;
0065f233          }
0065f233          
0065f246          if (result != 0)
0065f246          {
0065f24d              void* eax_4;
0065f24d              
0065f24d              if (result == 0xfffffffc)
0065f254                  eax_4 = nullptr;
0065f24d              else
0065f24f                  eax_4 = ((char*)result + 0xc);
0065f24f              
0065f25a              DLListBase::Remove(&this->m_list, eax_4);
0065f262              IntrusiveHashTable<int,CAsyncStateHandler *,1>::remove(this, arg2);
0065f246          }
0065f22a      }
0065f22a      
0065f26c      return result;
0065f210  }

0065f26f                                               cc                                                                 .

0065f270  uint32_t __thiscall CAsyncStateHandler::RegisterContextDataName(class CAsyncStateHandler* this, class PStringBase<char> const* arg2)

0065f270  {
0065f273      /* tailcall */
0065f273      return CAsyncStateMachine::RegisterContextDataName(this->m_pMachine, arg2);
0065f270  }

0065f278                                                                          cc cc cc cc cc cc cc cc                          ........

0065f280  void __fastcall CAsyncStateMachine::CAsyncStateMachine(class CAsyncStateMachine* this)

0065f280  {
0065f28d      this->vtable = 0x7fda98;
0065f293      IntrusiveHashTable<int,CAsyncStateHandler *,1>::IntrusiveHashTable<int,CAsyncStateHandler *,1>(&this->m_States, 0);
0065f285      this->m_States.m_list.head_ = 0;
0065f285      this->m_States.m_list.tail_ = nullptr;
0065f2a7      IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>::IntrusiveHashTable<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>(&this->m_ContextHash, 0);
0065f29e      this->m_ContextHash.m_list.head_ = 0;
0065f29e      this->m_ContextHash.m_list.tail_ = nullptr;
0065f2b9      this->m_DataNames.vtable = 0x7fda94;
0065f2c3      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>(&this->m_DataNames.m_intrusiveTable, 0);
0065f2c8      this->m_DataNames.vtable = 0x7fda94;
0065f2d2      this->m_dwNextContextNumber = 1;
0065f2dc      this->m_pTimer = nullptr;
0065f2ea      CAsyncStateMachine::SetTimerInstance(this, Timer::GetTimerInstance());
0065f280  }

0065f2f5                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0065f300  void CAsyncStateMachine::OnContextBegun(class CAsyncStateMachine* this @ ecx, class AsyncContext arg2) __pure

0065f300  {
0065f300      return;
0065f300  }

0065f303           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0065f310  void CAsyncStateMachine::OnContextEnded(class CAsyncStateMachine* this @ ecx, class AsyncContext arg2, enum AsyncStateMachineStatus arg3) __pure

0065f310  {
0065f310      return;
0065f310  }

0065f313                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0065f320  void __fastcall CAsyncStateMachine::~CAsyncStateMachine(class CAsyncStateMachine* this)

0065f320  {
0065f328      class IntrusiveHashList<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* esi = &this->m_ContextHash;
0065f330      this->vtable = 0x7fda98;
0065f330      
0065f339      if (esi->m_hash.m_numElements > 0)
0065f339      {
0065f33b          class DLListData* head_ = esi->m_list.head_;
0065f33b          
0065f340          if (head_ != 0)
0065f340          {
0065f342              void* __offset(DLListData, -0x10) i = &head_[-2];
0065f342              
0065f347              while (i != 0)
0065f347              {
0065f350                  class AsyncContext ecx = *(int32_t*)((char*)ADJ(i) + -8);
0065f350                  
0065f362                  for (void* j = esi->m_hash.m_buckets[(COMBINE(0, ecx) % esi->m_hash.m_numBuckets)]; j != 0; j = *(uint32_t*)((char*)j + 0xc))
0065f362                  {
0065f367                      if (*(uint32_t*)((char*)j + 8) == ecx)
0065f367                      {
0065f374                          if (j != 0)
0065f37b                              CAsyncStateMachine::EndAndReleaseContext(this, ecx, AsyncStateMachine_Failed);
0065f37b                          
0065f374                          break;
0065f367                      }
0065f362                  }
0065f362                  
0065f380                  esi = &this->m_ContextHash;
0065f386                  i = nullptr;
0065f386                  
0065f38b                  if (esi->m_hash.m_numElements > 0)
0065f38b                  {
0065f38d                      class DLListData* head__1 = esi->m_list.head_;
0065f38d                      
0065f392                      if (head__1 == 0)
0065f399                          i = nullptr;
0065f392                      else
0065f394                          i = &head__1[-2];
0065f38b                  }
0065f38b                  
0065f39d                  class IntrusiveHashList<AsyncContext,CAsyncStateMachine::CAsyncStateData *,1>* var_4_1 = esi;
0065f347              }
0065f340          }
0065f339      }
0065f339      
0065f3a6      if (this->m_States.m_hash.m_numElements > 0)
0065f3a6      {
0065f3ac          class DLListData* head__2 = this->m_States.m_list.head_;
0065f3ac          
0065f3b1          if (head__2 != 0)
0065f3b1          {
0065f3b8              void* __offset(DLListData, -0xc) i_1 = ((char*)head__2 - 0xc);
0065f3b8              
0065f3bd              while (i_1 != 0)
0065f3bd              {
0065f3c3                  int32_t edx_3 = *(int32_t*)((char*)ADJ(i_1) + -0xc);
0065f3c8                  *(int32_t*)((char*)ADJ(i_1) + 8) = 0;
0065f3cb                  *(uint32_t*)(edx_3 + 0x1c)();
0065f3ce                  class DLListData* dllist_next = ADJ(i_1)->dllist_next;
0065f3d3                  void* __offset(DLListData, -0xc) i_2 = i_1;
0065f3d3                  
0065f3dc                  if ((dllist_next == 0 || dllist_next == 8))
0065f3e3                      i_1 = nullptr;
0065f3dc                  else
0065f3de                      i_1 = ((char*)dllist_next - 0xc);
0065f3de                  
0065f3ea                  class DLListData* eax_4;
0065f3ea                  
0065f3ea                  if (i_2 == 0xfffffffc)
0065f3f1                      eax_4 = nullptr;
0065f3ea                  else
0065f3ec                      eax_4 = ((char*)i_2 + 0xc);
0065f3ec                  
0065f3f3                  class DLListData* dllist_prev = eax_4->dllist_prev;
0065f3f3                  
0065f3f8                  if (dllist_prev == 0)
0065f3f8                  {
0065f403                      class DLListData* dllist_next_1 = this->m_States.m_list.head_->dllist_next;
0065f407                      this->m_States.m_list.head_ = dllist_next_1;
0065f407                      
0065f40a                      if (dllist_next_1 != 0)
0065f40c                          dllist_next_1->dllist_prev = nullptr;
0065f3f8                  }
0065f3f8                  else
0065f3fc                      dllist_prev->dllist_next = eax_4->dllist_next;
0065f3fc                  
0065f40f                  class DLListData* dllist_next_2 = eax_4->dllist_next;
0065f40f                  
0065f413                  if (dllist_next_2 == 0)
0065f413                  {
0065f420                      class DLListData* dllist_prev_1 = this->m_States.m_list.tail_->dllist_prev;
0065f425                      this->m_States.m_list.tail_ = dllist_prev_1;
0065f425                      
0065f428                      if (dllist_prev_1 != 0)
0065f42a                          dllist_prev_1->dllist_next = 0;
0065f413                  }
0065f413                  else
0065f418                      dllist_next_2->dllist_prev = eax_4->dllist_prev;
0065f418                  
0065f42c                  eax_4->dllist_next = 0;
0065f42e                  eax_4->dllist_prev = nullptr;
0065f431                  int32_t esi_3 = *(int32_t*)((char*)((char*)i_2 + 0xc) + -8);
0065f437                  uint32_t temp1_2 = (COMBINE(0, esi_3) % this->m_States.m_hash.m_numBuckets);
0065f43a                  class CAsyncStateHandler** m_buckets = this->m_States.m_hash.m_buckets;
0065f43d                  void* j_2 = m_buckets[temp1_2];
0065f43d                  
0065f447                  for (void* j_1 = j_2; j_1 != 0; j_1 = *(uint32_t*)((char*)j_1 + 8))
0065f447                  {
0065f453                      if (*(uint32_t*)((char*)j_1 + 4) == esi_3)
0065f453                      {
0065f460                          if (j_1 != 0)
0065f460                          {
0065f464                              if (j_2 == j_1)
0065f440                                  m_buckets[temp1_2] = *(uint32_t*)((char*)j_2 + 8);
0065f464                              else
0065f464                              {
0065f46d                                  void* j_3;
0065f46d                                  
0065f46d                                  do
0065f46d                                  {
0065f466                                      j_3 = j_2;
0065f468                                      j_2 = *(uint32_t*)((char*)j_2 + 8);
0065f46d                                  } while (j_2 != j_1);
0065f46d                                  
0065f471                                  if (j_3 != 0)
0065f47d                                      *(uint32_t*)((char*)j_3 + 8) = *(uint32_t*)((char*)j_2 + 8);
0065f471                                  else
0065f440                                      m_buckets[temp1_2] = *(uint32_t*)((char*)j_2 + 8);
0065f464                              }
0065f464                              
0065f480                              this->m_States.m_hash.m_numElements -= 1;
0065f460                          }
0065f460                          
0065f460                          break;
0065f453                      }
0065f447                  }
0065f3bd              }
0065f3b1          }
0065f3a6      }
0065f3a6      
0065f497      this->m_DataNames.vtable = 0x7fda94;
0065f4a1      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,1>::delete_contents(&this->m_DataNames.m_intrusiveTable);
0065f4a6      class HashTableData<PStringBase<char>,unsigned long>** m_buckets_1 = this->m_DataNames.m_intrusiveTable.m_buckets;
0065f48f      this->m_DataNames.m_intrusiveTable.vtable = 0x7fda6c;
0065f48f      
0065f4b4      if (m_buckets_1 != &this->m_DataNames.m_intrusiveTable.m_aInplaceBuckets)
0065f4b7          operator delete[](m_buckets_1);
0065f4b7      
0065f48f      this->m_DataNames.m_intrusiveTable.m_buckets = nullptr;
0065f48f      this->m_DataNames.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0065f48f      this->m_DataNames.m_intrusiveTable.m_numBuckets = 0;
0065f48f      this->m_DataNames.m_intrusiveTable.m_numElements = 0;
0065f4cb      struct CAsyncStateMachine::CAsyncStateData** m_buckets_2 = this->m_ContextHash.m_hash.m_buckets;
0065f4d9      this->m_ContextHash.m_hash.vtable = 0x7fda68;
0065f4d9      
0065f4e3      if (m_buckets_2 != &this->m_ContextHash.m_hash.m_aInplaceBuckets)
0065f4e6          operator delete[](m_buckets_2);
0065f4e6      
0065f4ee      this->m_ContextHash.m_hash.m_buckets = nullptr;
0065f4f4      this->m_ContextHash.m_hash.m_firstInterestingBucket = nullptr;
0065f4fa      this->m_ContextHash.m_hash.m_numBuckets = 0;
0065f500      this->m_ContextHash.m_hash.m_numElements = 0;
0065f506      class CAsyncStateHandler** m_buckets_3 = this->m_States.m_hash.m_buckets;
0065f50e      this->m_States.m_hash.vtable = 0x7fda64;
0065f50e      
0065f515      if (m_buckets_3 != &this->m_States.m_hash.m_aInplaceBuckets)
0065f518          operator delete[](m_buckets_3);
0065f518      
0065f520      this->m_States.m_hash.m_buckets = nullptr;
0065f523      this->m_States.m_hash.m_firstInterestingBucket = nullptr;
0065f526      this->m_States.m_hash.m_numBuckets = 0;
0065f529      this->m_States.m_hash.m_numElements = 0;
0065f320  }

0065f533                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0065f540  uint8_t __thiscall CAsyncStateMachine::RemoveStateHandler(class CAsyncStateMachine* this, int32_t arg2)

0065f540  {
0065f548      int32_t ecx = arg2;
0065f54c      class IntrusiveHashList<int,CAsyncStateHandler *,1>* ebx = &this->m_States;
0065f54c      
0065f566      for (int32_t* i = ebx->m_hash.m_buckets[(COMBINE(0, ecx) % ebx->m_hash.m_numBuckets)]; i != 0; i = i[2])
0065f566      {
0065f56b          if (i[1] == ecx)
0065f56b          {
0065f581              if (i == 0)
0065f581                  break;
0065f581              
0065f58a              if (this->m_ContextHash.m_hash.m_numElements > 0)
0065f58a              {
0065f599                  int32_t var_8_1 = 0;
0065f599                  
0065f5a1                  if (this->m_ContextHash.m_hash.m_numElements > 0)
0065f5a1                  {
0065f5a3                      class DLListData* head_ = this->m_ContextHash.m_list.head_;
0065f5a3                      
0065f5a8                      if (head_ != 0)
0065f5a8                      {
0065f5aa                          void* __offset(DLListData, -0x10) j = &head_[-2];
0065f5aa                          
0065f5ad                          if (head_ != 0x10)
0065f5ad                          {
0065f5df                              do
0065f5df                              {
0065f5b2                                  class DLListData* dllist_next = ADJ(j)->dllist_next;
0065f5bc                                  void* __offset(DLListData, -0x10) j_1;
0065f5bc                                  
0065f5bc                                  if ((dllist_next == 0 || dllist_next == 8))
0065f5c3                                      j_1 = nullptr;
0065f5bc                                  else
0065f5be                                      j_1 = &dllist_next[-2];
0065f5be                                  
0065f5c8                                  if (*(int32_t*)((char*)ADJ(j) + 0x20) == i)
0065f5d4                                      CAsyncStateMachine::EndAndReleaseContext(this, *(int32_t*)((char*)ADJ(j) + -8), AsyncStateMachine_InternalError);
0065f5d4                                  
0065f5d9                                  j = j_1;
0065f5df                              } while (j != 0);
0065f5ad                          }
0065f5a8                      }
0065f5a1                  }
0065f58a              }
0065f58a              
0065f5e5              int32_t edx_2 = *(uint32_t*)i;
0065f5e9              i[5] = 0;
0065f5f0              *(uint32_t*)(edx_2 + 0x1c)();
0065f5fa              IntrusiveHashList<int,CAsyncStateHandler *,1>::remove(ebx, &arg2);
0065f601              class CAsyncStateHandler* eax_2;
0065f601              eax_2 = 1;
0065f607              return 1;
0065f56b          }
0065f566      }
0065f566      
0065f576      class CAsyncStateHandler** eax_1;
0065f576      eax_1 = 0;
0065f57c      return 0;
0065f540  }

0065f60a                                cc cc cc cc cc cc                                                            ......

0065f610  void __fastcall CAsyncStateHandler::~CAsyncStateHandler(class CAsyncStateHandler* this)

0065f610  {
0065f613      class CAsyncStateMachine* m_pMachine = this->m_pMachine;
0065f618      this->vtable = 0x7fda70;
0065f618      
0065f61e      if (m_pMachine != 0)
0065f624          CAsyncStateMachine::RemoveStateHandler(m_pMachine, this->m_hashKey);
0065f624      
0065f629      this->m_pMachine = nullptr;
0065f610  }

0065f632                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

0065f640  void* __thiscall CAsyncStateMachine::`scalar deleting destructor'(class CAsyncStateMachine* this, uint32_t arg2)

0065f640  {
0065f643      CAsyncStateMachine::~CAsyncStateMachine(this);
0065f643      
0065f64d      if ((arg2 & 1) != 0)
0065f650          operator delete(this);
0065f650      
0065f65b      return this;
0065f640  }

0065f65e                                                                                            cc cc                                ..

0065f660  void* __thiscall CAsyncStateHandler::`scalar deleting destructor'(class CAsyncStateHandler* this, uint32_t arg2)

0065f660  {
0065f663      class CAsyncStateMachine* m_pMachine = this->m_pMachine;
0065f668      this->vtable = 0x7fda70;
0065f668      
0065f66e      if (m_pMachine != 0)
0065f674          CAsyncStateMachine::RemoveStateHandler(m_pMachine, this->m_hashKey);
0065f674      
0065f67e      this->m_pMachine = nullptr;
0065f67e      
0065f685      if ((arg2 & 1) != 0)
0065f688          operator delete(this);
0065f688      
0065f693      return this;
0065f660  }

0065f696                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0065f6a0  uint32_t PortalChecksum::CalcChecksum32(uint8_t const* arg1, uint32_t arg2)

0065f6a0  {
0065f6a6      if (arg1 == 0)
0065f6aa          return 0;
0065f6aa      
0065f6b9      void* edx_2 = &arg1[((arg2 >> 2) << 2)];
0065f6bc      int32_t edi_1 = (arg2 << 0x10);
0065f6c1      uint8_t const* i = arg1;
0065f6c1      
0065f6c3      if (arg1 < edx_2)
0065f6c3      {
0065f6cc          do
0065f6cc          {
0065f6c5              edi_1 += *(uint32_t*)i;
0065f6c7              i = &i[4];
0065f6cc          } while (i < edx_2);
0065f6c3      }
0065f6c3      
0065f6d0      int32_t ebx = 0;
0065f6d4      int32_t edx_3 = 3;
0065f6d4      
0065f6d9      while (i < &arg1[arg2])
0065f6d9      {
0065f6ea          uint32_t ebp_2 = (((uint32_t)*(uint8_t*)i) << ((int8_t)(edx_3 << 3)));
0065f6ec          i = &i[1];
0065f6ef          edx_3 -= 1;
0065f6f2          ebx += ebp_2;
0065f6d9      }
0065f6d9      
0065f6ff      return (ebx + edi_1);
0065f6a0  }


0065f700  void __fastcall CryptoSystem::~CryptoSystem(class CryptoSystem* this)

0065f700  {
0065f703      class QTIsaac<8,unsigned long>* pGenerator_ = this->pGenerator_;
0065f703      
0065f708      if (pGenerator_ != 0)
0065f70a          pGenerator_->vtable->__vecDelDtor(1);
0065f70a      
0065f710      this->pGenerator_ = nullptr;
0065f700  }

0065f719                                                                             cc cc cc cc cc cc cc                           .......

0065f720  void __thiscall QTIsaac<8,unsigned long>::srand(class QTIsaac<8,unsigned long>* this, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t* arg5)

0065f720  {
0065f720      class QTIsaac<8,unsigned long>* this_1 = this;
0065f724      uint32_t* esi = arg5;
0065f738      void* edx_1 = (0xfffffff8 - esi);
0065f73b      int32_t* ebx = 8;
0065f740      void* eax = &esi[2];
0065f743      arg5 = edx_1;
0065f743      
0065f752      while (true)
0065f752      {
0065f752          int32_t edi_1;
0065f752          
0065f752          if (esi == 0)
0065f759              edi_1 = 0;
0065f752          else
0065f754              edi_1 = *(uint32_t*)((char*)eax - 8);
0065f754          
0065f75e          void* edx_2 = ((char*)edx_1 + eax);
0065f762          *(uint32_t*)((char*)edx_2 + this->m_rc.randrsl) = edi_1;
0065f765          int32_t edi_2;
0065f765          
0065f765          if (esi == 0)
0065f76c              edi_2 = 0;
0065f765          else
0065f767              edi_2 = *(uint32_t*)((char*)eax - 4);
0065f767          
0065f773          *(uint32_t*)(((char*)edx_2 + this->m_rc.randrsl) + 4) = edi_2;
0065f777          int32_t edx_3;
0065f777          
0065f777          if (esi == 0)
0065f77d              edx_3 = 0;
0065f777          else
0065f779              edx_3 = *(uint32_t*)eax;
0065f779          
0065f784          *(uint32_t*)((char*)ebx + this->m_rc.randrsl) = edx_3;
0065f787          int32_t edx_4;
0065f787          
0065f787          if (esi == 0)
0065f78e              edx_4 = 0;
0065f787          else
0065f789              edx_4 = *(uint32_t*)((char*)eax + 4);
0065f789          
0065f797          ebx = &ebx[4];
0065f79a          *(uint32_t*)((this->m_rc.randrsl + (4 - esi)) + eax) = edx_4;
0065f79d          eax += 0x10;
0065f79d          
0065f7a6          if (ebx >= 0x408)
0065f7a6              break;
0065f7a6          
0065f749          edx_1 = arg5;
0065f752      }
0065f752      
0065f7b0      this->m_rc.randa = arg2;
0065f7b7      this->m_rc.randc = arg4;
0065f7bf      this->m_rc.randb = arg3;
0065f7c2      this->vtable->randinit(&this->m_rc, 1);
0065f720  }


0065f7d0  void __fastcall QTIsaac<8,unsigned long>::randctx::~randctx(struct QTIsaac<8,unsigned long>::randctx* this)

0065f7d0  {
0065f7d7      operator delete[](this->randrsl);
0065f7e0      operator delete[](this->randmem);
0065f7d0  }

0065f7ea                                cc cc cc cc cc cc                                                            ......

0065f7f0  void __thiscall QTIsaac<8,unsigned long>::QTIsaac<8,unsigned long>(class QTIsaac<8,unsigned long>* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

0065f7f0  {
0065f7f9      this->vtable = 0x7fdabc;
0065f7ff      this->m_rc.randrsl = operator new[](0x400);
0065f7ff      this->m_rc.randmem = operator new[](0x400);
0065f7ff      
0065f843      for (int32_t* i = nullptr; i < 0x400; i = &i[4])
0065f843      {
0065f823          *(uint32_t*)((char*)i + this->m_rc.randrsl) = 0;
0065f829          *(uint32_t*)(((char*)i + this->m_rc.randrsl) + 4) = 0;
0065f830          *(uint32_t*)(((char*)i + this->m_rc.randrsl) + 8) = 0;
0065f837          *(uint32_t*)(((char*)i + this->m_rc.randrsl) + 0xc) = 0;
0065f843      }
0065f843      
0065f853      this->m_rc.randa = arg2;
0065f858      this->m_rc.randb = arg3;
0065f85e      this->m_rc.randc = arg4;
0065f856      this->vtable->randinit(&this->m_rc, 1);
0065f7f0  }

0065f86b                                   cc cc cc cc cc                                                             .....

0065f870  void __thiscall QTIsaac<8,unsigned long>::randinit(class QTIsaac<8,unsigned long>* this, struct QTIsaac<8,unsigned long>::randctx* arg2, uint8_t arg3)

0065f870  {
0065f881      struct QTIsaac<8,unsigned long>::randctx* edi = arg2;
0065f885      uint32_t* randmem = edi->randmem;
0065f888      uint32_t* randrsl = edi->randrsl;
0065f8a9      int32_t var_2c;
0065f8a9      __builtin_memcpy(&var_2c, "\xb9\x79\x37\x9e\xb9\x79\x37\x9e\xb9\x79\x37\x9e\xb9\x79\x37\x9e\xb9\x79\x37\x9e\xb9\x79\x37\x9e\xb9\x79\x37\x9e\xb9\x79\x37\x9e", 0x20);
0065f8a9      
0065f8b5      if (arg3 == 0)
0065f8b5      {
0065f8b9          edi->randa = 0;
0065f8bc          edi->randb = 0;
0065f8bf          edi->randc = 0;
0065f8b5      }
0065f8b5      
0065f8c2      int32_t i_3 = 4;
0065f905      int32_t var_28;
0065f905      int32_t var_24;
0065f905      int32_t var_20;
0065f905      int32_t var_1c;
0065f905      int32_t var_18;
0065f905      int32_t var_14;
0065f905      int32_t var_10;
0065f905      int32_t i;
0065f905      
0065f905      do
0065f905      {
0065f8d0          this->vtable->shuffle(&var_2c, &var_28, &var_24, &var_20, &var_1c, &var_18, &var_14, &var_10);
0065f900          i = i_3;
0065f900          i_3 -= 1;
0065f905      } while (i != 1);
0065f905      
0065f90c      if (arg3 == 0)
0065f90c      {
0065fa90          this->vtable->shuffle(&var_2c, &var_28, &var_24, &var_20, &var_1c, &var_18, &var_14, &var_10);
0065fac4          randmem[4] = var_2c;
0065facb          randmem[5] = var_28;
0065fad2          randmem[6] = var_24;
0065fad9          randmem[7] = var_20;
0065fae0          randmem[8] = var_1c;
0065fae7          randmem[9] = var_18;
0065faee          randmem[0xa] = var_14;
0065faf5          randmem[0xb] = var_10;
0065f90c      }
0065f90c      else
0065f90c      {
0065f912          void* edi_1 = &randmem[3];
0065f915          void* esi = &randrsl[2];
0065f91c          arg3 = 0x20;
0065f9cd          int32_t i_1;
0065f9cd          
0065f9cd          do
0065f9cd          {
0065f927              var_2c += *(uint32_t*)((char*)esi - 8);
0065f92e              var_28 += *(uint32_t*)((char*)esi - 4);
0065f934              var_24 += *(uint32_t*)esi;
0065f93b              var_20 += *(uint32_t*)((char*)esi + 4);
0065f942              var_1c += *(uint32_t*)((char*)esi + 8);
0065f949              var_18 += *(uint32_t*)((char*)esi + 0xc);
0065f950              var_14 += *(uint32_t*)((char*)esi + 0x10);
0065f957              var_10 += *(uint32_t*)((char*)esi + 0x14);
0065f95b              this->vtable->shuffle(&var_2c, &var_28, &var_24, &var_20, &var_1c, &var_18, &var_14, &var_10);
0065f98f              *(uint32_t*)((char*)edi_1 - 0xc) = var_2c;
0065f996              *(uint32_t*)((char*)edi_1 - 8) = var_28;
0065f99d              *(uint32_t*)(((char*)randmem - randrsl) + esi) = var_24;
0065f9a4              *(uint32_t*)edi_1 = var_20;
0065f9aa              *(uint32_t*)((char*)edi_1 + 4) = var_1c;
0065f9b1              *(uint32_t*)((char*)edi_1 + 8) = var_18;
0065f9b8              *(uint32_t*)((char*)edi_1 + 0xc) = var_14;
0065f9bf              *(uint32_t*)((char*)edi_1 + 0x10) = var_10;
0065f9c2              esi += 0x20;
0065f9c5              edi_1 += 0x20;
0065f9c8              i_1 = arg3;
0065f9c8              arg3 -= 1;
0065f9cd          } while (i_1 != 1);
0065f9d7          void* esi_2 = &randmem[2];
0065f9da          int32_t i_4 = 0x20;
0065fa84          int32_t i_2;
0065fa84          
0065fa84          do
0065fa84          {
0065f9e3              var_2c += *(uint32_t*)((char*)esi_2 - 8);
0065f9ea              var_28 += *(uint32_t*)((char*)esi_2 - 4);
0065f9f0              var_24 += *(uint32_t*)esi_2;
0065f9f7              var_20 += *(uint32_t*)((char*)esi_2 + 4);
0065f9fe              var_1c += *(uint32_t*)((char*)esi_2 + 8);
0065fa05              var_18 += *(uint32_t*)((char*)esi_2 + 0xc);
0065fa0c              var_14 += *(uint32_t*)((char*)esi_2 + 0x10);
0065fa13              var_10 += *(uint32_t*)((char*)esi_2 + 0x14);
0065fa17              this->vtable->shuffle(&var_2c, &var_28, &var_24, &var_20, &var_1c, &var_18, &var_14, &var_10);
0065fa4b              *(uint32_t*)((char*)esi_2 - 8) = var_2c;
0065fa52              *(uint32_t*)((char*)esi_2 - 4) = var_28;
0065fa59              *(uint32_t*)esi_2 = var_24;
0065fa5f              *(uint32_t*)((char*)esi_2 + 4) = var_20;
0065fa66              *(uint32_t*)((char*)esi_2 + 8) = var_1c;
0065fa6d              *(uint32_t*)((char*)esi_2 + 0xc) = var_18;
0065fa74              *(uint32_t*)((char*)esi_2 + 0x10) = var_14;
0065fa7b              *(uint32_t*)((char*)esi_2 + 0x14) = var_10;
0065fa7e              esi_2 += 0x20;
0065fa81              i_2 = i_4;
0065fa81              i_4 -= 1;
0065fa84          } while (i_2 != 1);
0065fa8a          edi = arg2;
0065f90c      }
0065f90c      
0065faf8      this->vtable->isaac(edi);
0065fb01      edi->randcnt = 0x100;
0065f870  }

0065fb11                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

0065fb20  void __stdcall QTIsaac<8,unsigned long>::shuffle(class QTIsaac<8,unsigned long>* this @ ecx, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4, uint32_t* arg5, uint32_t* arg6, uint32_t* arg7, uint32_t* arg8, uint32_t* arg9)

0065fb20  {
0065fb2f      *(uint32_t*)arg2 ^= (*(uint32_t*)arg3 << 0xb);
0065fb38      *(uint32_t*)arg5 += *(uint32_t*)arg2;
0065fb41      *(uint32_t*)arg3 += *(uint32_t*)arg4;
0065fb4a      uint32_t ebx_2 = ((*(uint32_t*)arg4 >> 2) ^ *(uint32_t*)arg3);
0065fb4c      *(uint32_t*)arg3 = ebx_2;
0065fb4e      int32_t* edi_2 = arg6;
0065fb52      *(uint32_t*)edi_2 += ebx_2;
0065fb56      *(uint32_t*)arg4 += *(uint32_t*)arg5;
0065fb5f      uint32_t ebx_6 = ((*(uint32_t*)arg5 << 8) ^ *(uint32_t*)arg4);
0065fb61      *(uint32_t*)arg4 = ebx_6;
0065fb67      *(uint32_t*)arg7 += ebx_6;
0065fb6c      *(uint32_t*)arg5 += *(uint32_t*)edi_2;
0065fb74      uint32_t ebx_9 = (((uint32_t)*(uint16_t*)((char*)edi_2 + 2)) ^ *(uint32_t*)arg5);
0065fb76      *(uint32_t*)arg5 = ebx_9;
0065fb78      int32_t* edx_3 = arg8;
0065fb7c      *(uint32_t*)edx_3 += ebx_9;
0065fb84      *(uint32_t*)edi_2 += *(uint32_t*)arg7;
0065fb8d      int32_t ebx_13 = ((*(uint32_t*)arg7 << 0xa) ^ *(uint32_t*)edi_2);
0065fb8f      *(uint32_t*)edi_2 = ebx_13;
0065fb95      *(uint32_t*)arg9 += ebx_13;
0065fb9d      *(uint32_t*)arg7 += *(uint32_t*)edx_3;
0065fba6      uint32_t ebx_17 = ((*(uint32_t*)edx_3 >> 4) ^ *(uint32_t*)arg7);
0065fbac      *(uint32_t*)arg7 = ebx_17;
0065fbaf      *(uint32_t*)arg2 += ebx_17;
0065fbb3      *(uint32_t*)edx_3 += *(uint32_t*)arg9;
0065fbbc      int32_t ebx_21 = ((*(uint32_t*)arg9 << 8) ^ *(uint32_t*)edx_3);
0065fbbe      *(uint32_t*)edx_3 = ebx_21;
0065fbc0      *(uint32_t*)arg3 += ebx_21;
0065fbc4      *(uint32_t*)arg9 += *(uint32_t*)arg2;
0065fbcd      uint32_t edx_7 = ((*(uint32_t*)arg2 >> 9) ^ *(uint32_t*)arg9);
0065fbcf      *(uint32_t*)arg9 = edx_7;
0065fbd1      *(uint32_t*)arg4 += edx_7;
0065fbd5      *(uint32_t*)arg2 += *(uint32_t*)arg3;
0065fb20  }

0065fbde                                                                                            cc cc                                ..

0065fbe0  void* __thiscall QTIsaac<8,unsigned long>::`scalar deleting destructor'(class QTIsaac<8,unsigned long>* this, uint32_t arg2)

0065fbe0  {
0065fbe6      this->vtable = 0x7fdabc;
0065fbec      QTIsaac<8,unsigned long>::randctx::~randctx(&this->m_rc);
0065fbec      
0065fbf6      if ((arg2 & 1) != 0)
0065fbf9          operator delete(this);
0065fbf9      
0065fc04      return this;
0065fbe0  }

0065fc07                       cc cc cc cc cc cc cc cc cc                                                         .........

0065fc10  void __thiscall CryptoSystem::CryptoSystem(class CryptoSystem* this, uint32_t arg2)

0065fc10  {
0065fc19      this->lastIter_ = 1;
0065fc1f      this->seed_ = arg2;
0065fc22      this->pGenerator_ = nullptr;
0065fc29      void* eax = operator new(0x1c);
0065fc29      
0065fc33      if (eax == 0)
0065fc33      {
0065fc4d          this->pGenerator_ = nullptr;
0065fc53          return;
0065fc33      }
0065fc33      
0065fc35      uint32_t seed_ = this->seed_;
0065fc42      this->pGenerator_ = QTIsaac<8,unsigned long>::QTIsaac<8,unsigned long>(eax, seed_, seed_, seed_);
0065fc10  }

0065fc56                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

0065fc60  void __stdcall QTIsaac<8,unsigned long>::isaac(class QTIsaac<8,unsigned long>* this @ ecx, struct QTIsaac<8,unsigned long>::randctx* arg2)

0065fc60  {
0065fc67      struct QTIsaac<8,unsigned long>::randctx* edi = arg2;
0065fc6b      uint32_t* randmem = edi->randmem;
0065fc6e      edi->randc += 1;
0065fc78      uint32_t* randrsl = edi->randrsl;
0065fc7b      uint32_t randa = edi->randa;
0065fc80      void* ebx = &randmem[0x80];
0065fc88      uint32_t var_8 = (edi->randb + edi->randc);
0065fc8c      uint32_t* randmem_1 = randmem;
0065fc8e      void* var_4 = ebx;
0065fc8e      
0065fc92      if (randmem < ebx)
0065fc92      {
0065fda3          do
0065fda3          {
0065fca0              uint32_t esi_1 = *(uint32_t*)randmem_1;
0065fcba              int32_t edi_4 = (((randa << 0xd) ^ randa) + *(uint32_t*)ebx);
0065fcbf              int32_t esi_5 = ((*(uint32_t*)((esi_1 & 0x3fc) + randmem) + var_8) + edi_4);
0065fcc1              *(uint32_t*)randmem_1 = esi_5;
0065fcd0              uint32_t esi_9 = (*(uint32_t*)(((esi_5 >> 8) & 0x3fc) + randmem) + esi_1);
0065fcd7              *(uint32_t*)randrsl = esi_9;
0065fcd9              int32_t ebp = randmem_1[1];
0065fce6              int32_t ebp_4 = (((edi_4 >> 6) ^ edi_4) + *(uint32_t*)((char*)ebx + 4));
0065fcf7              int32_t edi_9 = ((*(uint32_t*)((ebp & 0x3fc) + randmem) + esi_9) + ebp_4);
0065fcbc              randmem_1[1] = edi_9;
0065fd07              int32_t edi_13 = (*(uint32_t*)(((edi_9 >> 8) & 0x3fc) + randmem) + ebp);
0065fd0b              randrsl[1] = edi_13;
0065fd10              int32_t esi_10 = randmem_1[2];
0065fd34              int32_t edi_16 = (((ebp_4 << 2) ^ ebp_4) + *(uint32_t*)((char*)ebx + 8));
0065fd3a              int32_t esi_14 = ((*(uint32_t*)((esi_10 & 0x3fc) + randmem) + edi_13) + edi_16);
0065fcbc              randmem_1[2] = esi_14;
0065fd4a              int32_t esi_18 = (*(uint32_t*)(((esi_14 >> 8) & 0x3fc) + randmem) + esi_10);
0065fd0b              randrsl[2] = esi_18;
0065fd53              int32_t ebp_5 = randmem_1[3];
0065fd68              randa = (((edi_16 >> 0x10) ^ edi_16) + *(uint32_t*)((char*)ebx + 0xc));
0065fd79              int32_t edi_21 = ((*(uint32_t*)((ebp_5 & 0x3fc) + randmem) + esi_18) + randa);
0065fcbc              randmem_1[3] = edi_21;
0065fd89              uint32_t esi_20 = (*(uint32_t*)(((edi_21 >> 8) & 0x3fc) + randmem) + ebp_5);
0065fd90              randmem_1 = &randmem_1[4];
0065fd0b              randrsl[3] = esi_20;
0065fd95              ebx += 0x10;
0065fd98              randrsl = &randrsl[4];
0065fd9f              var_8 = esi_20;
0065fda3          } while (randmem_1 < var_4);
0065fda3          
0065fda9          edi = arg2;
0065fc92      }
0065fc92      
0065fdb1      uint32_t* randmem_2 = randmem;
0065fdb1      
0065fdb3      if (randmem >= var_4)
0065fdb3      {
0065fee3          edi->randa = randa;
0065fee6          edi->randb = var_8;
0065fef0          return;
0065fdb3      }
0065fdb3      
0065fec3      uint32_t edi_43;
0065fec3      
0065fec3      do
0065fec3      {
0065fdc0          uint32_t edi_24 = *(uint32_t*)randmem_1;
0065fdda          uint32_t ebx_7 = (((randa << 0xd) ^ randa) + *(uint32_t*)randmem_2);
0065fddf          int32_t edi_28 = ((*(uint32_t*)((edi_24 & 0x3fc) + randmem) + var_8) + ebx_7);
0065fde1          *(uint32_t*)randmem_1 = edi_28;
0065fdf0          uint32_t edi_32 = (*(uint32_t*)(((edi_28 >> 8) & 0x3fc) + randmem) + edi_24);
0065fdf7          *(uint32_t*)randrsl = edi_32;
0065fdf9          int32_t ebp_9 = randmem_1[1];
0065fe06          int32_t ebp_13 = (((ebx_7 >> 6) ^ ebx_7) + randmem_2[1]);
0065fe17          int32_t ebx_12 = ((*(uint32_t*)((ebp_9 & 0x3fc) + randmem) + edi_32) + ebp_13);
0065fddc          randmem_1[1] = ebx_12;
0065fe27          int32_t ebx_16 = (*(uint32_t*)(((ebx_12 >> 8) & 0x3fc) + randmem) + ebp_9);
0065fe2b          randrsl[1] = ebx_16;
0065fe30          int32_t edi_33 = randmem_1[2];
0065fe54          int32_t ebx_19 = (((ebp_13 << 2) ^ ebp_13) + randmem_2[2]);
0065fe5a          int32_t edi_37 = ((*(uint32_t*)((edi_33 & 0x3fc) + randmem) + ebx_16) + ebx_19);
0065fddc          randmem_1[2] = edi_37;
0065fe6a          int32_t edi_41 = (*(uint32_t*)(((edi_37 >> 8) & 0x3fc) + randmem) + edi_33);
0065fe2b          randrsl[2] = edi_41;
0065fe73          int32_t ebp_14 = randmem_1[3];
0065fe88          randa = (((ebx_19 >> 0x10) ^ ebx_19) + randmem_2[3]);
0065fe99          int32_t ebx_24 = ((*(uint32_t*)((ebp_14 & 0x3fc) + randmem) + edi_41) + randa);
0065fddc          randmem_1[3] = ebx_24;
0065fea9          edi_43 = (*(uint32_t*)(((ebx_24 >> 8) & 0x3fc) + randmem) + ebp_14);
0065feb0          randmem_2 = &randmem_2[4];
0065fe2b          randrsl[3] = edi_43;
0065feb5          randmem_1 = &randmem_1[4];
0065feb8          randrsl = &randrsl[4];
0065febf          var_8 = edi_43;
0065fec3      } while (randmem_2 < var_4);
0065fec3      
0065fed1      arg2->randa = randa;
0065fed5      arg2->randb = edi_43;
0065fc60  }

0065fc9a                                                                                8d 9b 00 00 00 00                            ......
0065fef3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0065ff00  uint32_t __fastcall CryptoSystem::GetNextCryptoSeed(class CryptoSystem* this, uint32_t arg2)

0065ff00  {
0065ff00      this->lastIter_ += 1;
0065ff04      class QTIsaac<8,unsigned long>* pGenerator_ = this->pGenerator_;
0065ff07      uint32_t randcnt = pGenerator_->m_rc.randcnt;
0065ff0d      pGenerator_->m_rc.randcnt = (randcnt - 1);
0065ff0d      
0065ff15      if (randcnt != 0)
0065ff3b          return pGenerator_->m_rc.randrsl[(randcnt - 1)];
0065ff3b      
0065ff17      pGenerator_->vtable->isaac(&pGenerator_->m_rc);
0065ff0d      pGenerator_->m_rc.randcnt = 0xff;
0065ff30      return pGenerator_->m_rc.randrsl[0xff];
0065ff00  }

0065ff3e                                                                                            cc cc                                ..

0065ff40  uint32_t __thiscall CryptoSystem::EncryptData(class CryptoSystem* this, uint32_t arg2, uint8_t* arg3, uint32_t arg4, uint32_t* arg5)

0065ff40  {
0065ff46      uint32_t result;
0065ff46      
0065ff46      if (arg5 == 0)
0065ff46      {
0065ff4c          this->lastIter_ += 1;
0065ff50          class QTIsaac<8,unsigned long>* pGenerator_ = this->pGenerator_;
0065ff53          uint32_t randcnt = pGenerator_->m_rc.randcnt;
0065ff59          pGenerator_->m_rc.randcnt = (randcnt - 1);
0065ff59          
0065ff61          if (randcnt != 0)
0065ff7f              result = pGenerator_->m_rc.randrsl[(randcnt - 1)];
0065ff61          else
0065ff61          {
0065ff63              pGenerator_->vtable->isaac(&pGenerator_->m_rc);
0065ff59              pGenerator_->m_rc.randcnt = 0xff;
0065ff74              result = pGenerator_->m_rc.randrsl[0xff];
0065ff61          }
0065ff46      }
0065ff46      else
0065ff48          result = *(uint32_t*)arg5;
0065ff48      
0065ff94      for (int32_t* i = arg3; i < &i[(arg4 >> 2)]; i = &i[1])
0065ff96          *(uint32_t*)i ^= result;
0065ff96      
0065ff9f      return result;
0065ff40  }

0065ffa2        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0065ffb0  void __thiscall _STL::vector<unsigned short const *,_STL::allocator<unsigned short const *> >::_M_insert_overflow(class _STL::vector<unsigned short const *,_STL::allocator<unsigned short const *> >* this, uint16_t const** arg2, uint16_t const** arg3, struct _STL::__true_type const* arg4, uint32_t arg5, uint8_t arg6)

0065ffb0  {
0065ffb0      class _STL::vector<unsigned short const *,_STL::allocator<unsigned short const *> >* this_1 = this;
0065ffbb      uint32_t i_2 = arg5;
0065ffbf      int32_t this_2 = ((this->_M_finish - this->_M_start) >> 2);
0065ffc4      this_1 = this_2;
0065ffc8      uint32_t* ecx = &arg5;
0065ffc8      
0065ffcc      if (this_2 >= i_2)
0065ffce          ecx = &this_1;
0065ffce      
0065ffd2      uint32_t ecx_1 = *(uint32_t*)ecx;
0065ffd4      int32_t this_3 = (ecx_1 + this_2);
0065ffd6      this_1 = this_3;
0065ffd6      
0065ffda      if (ecx_1 == -(this_2))
00660007          arg5 = 0;
0065ffda      else
0065ffda      {
0065ffdc          int32_t eax_2 = (this_3 << 2);
0065ffdc          
0065ffe9          if (eax_2 <= 0x80)
00660001              arg5 = _STL::__node_alloc<1,0>::_M_allocate(eax_2);
0065ffe9          else
0065fff3              arg5 = operator new(eax_2);
0065ffda      }
0065ffda      
0066000f      uint16_t const** _M_start = this->_M_start;
0066001a      uint32_t eax_5;
0066001a      
0066001a      if (arg2 != _M_start)
0066001a      {
00660024          int32_t esi_2 = ((char*)arg2 - _M_start);
00660036          eax_5 = (memmove(arg5, _M_start, esi_2) + esi_2);
0066001a      }
0066001a      else
0066001c          eax_5 = arg5;
0066001c      
0066003a      if (i_2 > 0)
0066003a      {
00660040          uint32_t i_1 = i_2;
0066004c          uint32_t i;
0066004c          
0066004c          do
0066004c          {
00660044              *(uint32_t*)eax_5 = *(uint32_t*)arg3;
00660046              eax_5 += 4;
00660049              i = i_1;
00660049              i_1 -= 1;
0066004c          } while (i != 1);
0066003a      }
0066003a      
00660053      uint32_t edi = eax_5;
00660053      
00660055      if (arg6 == 0)
00660055      {
00660057          uint16_t const** _M_finish = this->_M_finish;
00660057          
0066005c          if (_M_finish != arg2)
0066005c          {
0066005e              int32_t esi_4 = ((char*)_M_finish - arg2);
0066006e              edi = (memmove(eax_5, arg2, esi_4) + esi_4);
0066005c          }
00660055      }
00660055      
00660070      uint16_t const** _M_start_1 = this->_M_start;
00660070      
00660077      if (_M_start_1 != 0)
00660087          _STL::__node_alloc<1,0>::deallocate(_M_start_1, (((this->_M_end_of_storage._M_data - _M_start_1) >> 2) * 4));
00660087      
0066008f      uint32_t eax_9 = arg5;
00660093      class _STL::vector<unsigned short const *,_STL::allocator<unsigned short const *> >* this_4 = this_1;
00660097      this->_M_start = eax_9;
0066009a      this->_M_finish = edi;
006600a1      this->_M_end_of_storage._M_data = (eax_9 + (this_4 << 2));
0065ffb0  }

006600a9                             cc cc cc cc cc cc cc                                                           .......

006600b0  void __thiscall FallocPool::FallocPool(class FallocPool* this, uint32_t arg2, uint32_t arg3, void (* arg4)(uint8_t*, uint32_t))

006600b0  {
006600ba      this->m_chunkSize = arg2;
006600be      this->m_chunksPerPool = arg3;
006600c7      this->m_poolArray._M_start = 0;
006600ca      this->m_poolArray._M_finish = nullptr;
006600cd      this->m_poolArray._M_end_of_storage._M_data = 0;
006600d0      this->m_firstFreeChunk = nullptr;
006600d0      
006600d3      if (arg4 != 0)
006600d3      {
006600d5          this->m_dumpFunction = arg4;
006600d8          return;
006600d3      }
006600d3      
006600db      this->m_dumpFunction = CAsyncStateHandler::OnStateHandlerInit;
006600b0  }

006600e5                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

006600f0  void __fastcall FallocPool::~FallocPool(class FallocPool* this)

006600f0  {
006600fa      for (uint8_t** _M_start = this->m_poolArray._M_start; _M_start != this->m_poolArray._M_finish; _M_start = &_M_start[1])
00660103          operator delete[](*(uint32_t*)_M_start);
00660103      
00660113      uint8_t** _M_start_1 = this->m_poolArray._M_start;
00660113      
00660118      if (_M_start_1 != 0)
00660118      {
00660124          int32_t eax_6 = (((this->m_poolArray._M_end_of_storage._M_data - _M_start_1) >> 2) * 4);
00660124          
0066012b          if (eax_6 > 0x80)
0066012b          {
0066012e              operator delete(_M_start_1);
00660138              return;
0066012b          }
0066012b          
0066014b          _STL::_STLP_mutex_spin<0>::_M_do_lock(&_STL::_Node_Alloc_Lock<1,0>::_S_lock);
00660152          *(uint32_t*)_M_start_1 = _STL::__node_alloc<1,0>::_S_free_list[((eax_6 - 1) >> 3)];
00660144          _STL::__node_alloc<1,0>::_S_free_list[((eax_6 - 1) >> 3)] = _M_start_1;
00660156          _STL::_Node_Alloc_Lock<1,0>::_S_lock._M_lock = 0;
00660118      }
006600f0  }

00660166                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

00660170  void __fastcall FallocPool::AllocateNewPool(class FallocPool* this)

00660170  {
0066017e      void* eax_2 = operator new[]((this->m_chunkSize * this->m_chunksPerPool));
00660186      uint32_t const m_chunkSize = this->m_chunkSize;
0066018e      void* ecx_3 = (((this->m_chunksPerPool - 1) * m_chunkSize) + eax_2);
00660195      void* var_4 = eax_2;
00660199      void* edx = eax_2;
00660199      
0066019b      if (eax_2 != ecx_3)
0066019b      {
006601aa          do
006601aa          {
006601a2              *(uint32_t*)edx = (m_chunkSize + edx);
006601a4              m_chunkSize = this->m_chunkSize;
006601a6              edx += m_chunkSize;
006601aa          } while (edx != ecx_3);
0066019b      }
0066019b      
006601af      *(uint32_t*)edx = this->m_firstFreeChunk;
006601b4      this->m_firstFreeChunk = eax_2;
006601b7      void** _M_finish = this->m_poolArray._M_finish;
006601b7      
006601bf      if (_M_finish == this->m_poolArray._M_end_of_storage._M_data)
006601bf      {
006601de          void var_5;
006601de          _STL::vector<unsigned short const *,_STL::allocator<unsigned short const *> >::_M_insert_overflow(&this->m_poolArray, _M_finish, &var_4, &var_5, 1, 1);
006601e6          return;
006601bf      }
006601bf      
006601c3      if (_M_finish != 0)
006601c5          *(uint32_t*)_M_finish = eax_2;
006601c5      
006601b1      this->m_poolArray._M_finish = &this->m_poolArray._M_finish[1];
00660170  }

006601e7                       cc cc cc cc cc cc cc cc cc                                                         .........

006601f0  void __fastcall PortalThreadErrorDump::DumpLastError()

006601f0  {
006601f0      int32_t* ecx;
006601f0      int32_t* var_4 = ecx;
0066020d      FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, GetLastError(), 0x400, &var_4, 0, nullptr);
00660217      LocalFree(var_4);
006601f0  }

0066021f                                                                                               cc                                 .

00660220  uint8_t IsSSEAvailable()

00660220  {
00660223      int32_t var_8 = 0xffffffff;
00660225      int32_t var_c = 0x7fdb30;
0066022a      int32_t (* var_10)() = j__except_handler3;
00660235      TEB* fsbase;
00660235      int32_t var_14 = *(uint32_t*)fsbase;
00660236      *(uint32_t*)fsbase = &var_14;
00660243      int32_t __saved_edi;
00660243      int32_t* var_1c = &__saved_edi;
00660243      
0066024e      if (s_CheckedForSSE == 0)
0066024e      {
00660252          s_CheckedForSSE = 1;
00660258          s_bUseSSE = 1;
0066025e          int32_t var_8_1 = 0;
00660261          int32_t var_20_1 = 0;
00660264          int32_t st0[0x2];
00660264          float xmm0[0x2];
00660264          _mm_cvtpi32_ps(xmm0, st0);
0066027b          int32_t var_8_2 = 0xffffffff;
0066024e      }
0066024e      
00660282      uint8_t s_bUseSSE_1 = s_bUseSSE;
0066028a      *(uint32_t*)fsbase = var_14;
00660297      return s_bUseSSE_1;
00660220  }

0066026b                                   b8 01 00 00 00 c3 8b 65 e8 c6 05 ac 76 8f 00 00                            .......e....v...
00660298                                                                          cc cc cc cc cc cc cc cc                          ........

006602a0  void AlphaConvert<ACvtFormat_A,ACvtFormat_A>(struct AlphaConvertArgs const* arg1)

006602a0  {
006602a0      struct AlphaConvertArgs* eax_1 = arg1;
006602a4      uint32_t nHeight = eax_1->nHeight;
006602a7      union __inner1 = eax_1->cSrcArgs.__inner1;
006602b0      union __inner1_1 = eax_1->cDstArgs.__inner1;
006602b0      
006602b3      if (nHeight > 0)
006602b3      {
006602ba          arg1 = eax_1->nWidth;
006602be          uint32_t iStride_1 = eax_1->cSrcArgs.iStride;
006602c1          uint32_t iStride = eax_1->cDstArgs.iStride;
006602cd          uint32_t eax = nHeight;
006602f3          uint32_t i;
006602f3          
006602f3          do
006602f3          {
006602dd              int32_t esi_3;
006602dd              int32_t edi_2;
006602dd              edi_2 = __builtin_memcpy(__inner1_1, __inner1, ((arg1 >> 2) << 2));
006602e4              __builtin_memcpy(edi_2, esi_3, (arg1 & 3));
006602ee              __inner1 += iStride_1;
006602f0              __inner1_1 += iStride;
006602f2              i = eax;
006602f2              eax -= 1;
006602f3          } while (i != 1);
006602b3      }
006602a0  }

006602fd                                                                                         cc cc cc                               ...

00660300  void SoftwareBlitAndColor(struct BlitArgs const* arg1, struct ColorArgs* arg2)

00660300  {
0066030e      if (arg1->cSrcArgs.__inner1 != 0)
0066030e      {
00660310          enum BlitMode eMode = arg1->eMode;
00660310          
00660315          if (eMode != Blit_NOP)
00660315          {
00660327              int32_t eax_5 = g_aBlitFunctions[0][0][((((eMode * 3) + arg1->cSrcArgs.__inner0) * 3) + arg1->cDstArgs.__inner0)];
00660327              
00660330              if (eax_5 != 0)
00660333                  eax_5(arg1);
00660315          }
0066030e      }
0066030e      
0066033e      if (arg2 != 0)
0066033e      {
00660344          enum BlitMode eMode_1 = arg2->eMode;
00660344          
00660349          if (eMode_1 != Blit_NOP)
00660349          {
00660350              union __inner0 = arg2->cMaskArgs.__inner0;
00660361              int32_t ebp_1 = g_aColoringFunctions[0][0][((((eMode_1 * 3) + __inner0) * 3) + arg1->cDstArgs.__inner0)];
00660361              
0066036a              if (ebp_1 != 0)
0066036a              {
0066036e                  union edx_2;
0066036e                  *(uint8_t*)((char*)edx_2 + 0) = *(uint8_t*)((char*)arg2->__inner1 + 2);
00660371                  int32_t ecx_4;
00660371                  ecx_4 = *(uint8_t*)((char*)arg2->__inner1 + 1);
00660374                  *(uint32_t*)((char*)g_SourceColor.__inner0 + 1) = ecx_4;
0066037a                  *(uint32_t*)((char*)g_SourceColor.__inner0 + 2) = *(uint8_t*)((char*)edx_2 + 0);
00660380                  *(uint8_t*)((char*)edx_2 + 0) = *(uint8_t*)((char*)arg2->__inner1 + 0);
0066038c                  void var_28;
0066038c                  __builtin_memcpy(&var_28, arg1, 0x28);
00660391                  *(uint8_t*)((char*)g_SourceColor.__inner0 + 0) = *(uint8_t*)((char*)edx_2 + 0);
0066039a                  uint32_t nWidth = arg2->nWidth;
0066039e                  uint32_t nHeight = arg2->nHeight;
0066039e                  
006603a2                  if (__inner0 != 0)
006603a2                  {
006603a4                      uint32_t edx_3;
006603a4                      edx_3 = *(uint8_t*)((char*)arg2->__inner1 + 3);
006603ad                      char var_4_1 = edx_3;
006603b6                      *(uint32_t*)((char*)g_SourceColor.__inner0 + 3) = 0;
006603bd                      union __inner1 = arg2->cMaskArgs.__inner1;
006603c1                      uint32_t iStride = arg2->cMaskArgs.iStride;
006603c5                      ebp_1(&var_28);
006603d1                      return;
006603a2                  }
006603a2                  
006603d2                  uint32_t ecx_6;
006603d2                  ecx_6 = *(uint8_t*)((char*)arg2->__inner1 + 3);
006603da                  char var_4_2 = 0xff;
006603df                  *(uint32_t*)((char*)g_SourceColor.__inner0 + 3) = ecx_6;
006603e5                  ebp_1(&var_28);
0066036a              }
00660349          }
0066033e      }
00660300  }

006603f2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

00660400  void AlphaConvert(struct AlphaConvertArgs const* arg1)

00660400  {
0066040e      int32_t eax_3 = g_aAlphaConvertFunctions[0][((arg1->cSrcArgs.__inner0 * 3) + arg1->cDstArgs.__inner0)];
0066040e      
00660417      if (eax_3 == 0)
0066041f          return;
0066041f      
0066041d      /* jump -> eax_3 */
00660400  }


00660420  void BlitLoopNoScale<&BlitOp_SrcCopy<BlitFormat_ARGB,BlitFormat_ARGB>,BlitFormat_ARGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00660420  {
0066042d      union __inner1 = arg1->cSrcArgs.__inner1;
00660431      union __inner1_1 = arg1->cDstArgs.__inner1;
00660431      
00660434      if (arg1->i8AlphaModifier != 0)
00660434      {
00660436          uint32_t nHeight = arg1->nHeight;
00660436          
0066043b          if (nHeight > 0)
0066043b          {
0066043d              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00660442              uint32_t nWidth = arg1->nWidth;
00660445              uint32_t iStride = arg1->cDstArgs.iStride;
00660450              arg1 = nHeight;
00660482              bool cond:1_1;
00660482              
00660482              do
00660482              {
00660456                  if (nWidth > 0)
00660456                  {
0066045a                      int32_t* eax = (__inner1_1 + (nWidth << 2));
0066045f                      uint32_t edx_1 = nWidth;
0066046b                      uint32_t i;
0066046b                      
0066046b                      do
0066046b                      {
00660461                          int32_t ebp_1 = *(uint32_t*)(((__inner1 - __inner1_1) + eax) - 4);
00660465                          eax -= 4;
00660468                          i = edx_1;
00660468                          edx_1 -= 1;
00660469                          *(uint32_t*)eax = ebp_1;
0066046b                      } while (i != 1);
00660456                  }
00660456                  
00660479                  __inner1 += iStride_1;
0066047b                  __inner1_1 += iStride;
0066047d                  cond:1_1 = arg1 != 1;
0066047e                  arg1 -= 1;
00660482              } while (cond:1_1);
0066043b          }
00660434      }
00660420  }

0066048e                                            cc cc                                                                ..

00660490  void BlitLoopNoScale<&BlitOp_SrcCopy<BlitFormat_ARGB,BlitFormat_RGB>,BlitFormat_ARGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00660490  {
0066049d      union __inner1 = arg1->cSrcArgs.__inner1;
006604a1      union __inner1_1 = arg1->cDstArgs.__inner1;
006604a1      
006604a4      if (arg1->i8AlphaModifier != 0)
006604a4      {
006604a6          uint32_t nHeight = arg1->nHeight;
006604a6          
006604ab          if (nHeight > 0)
006604ab          {
006604b1              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006604b4              uint32_t iStride = arg1->cDstArgs.iStride;
006604b8              arg1 = arg1->nWidth;
006604c0              uint32_t ebp_1 = nHeight;
006604f5              uint32_t i;
006604f5              
006604f5              do
006604f5              {
006604c2                  struct BlitArgs* j = arg1;
006604c2                  
006604c8                  if (j > 0)
006604c8                  {
006604cd                      void* eax = (((j * 3) + __inner1_1) + 2);
006604cd                      
006604ea                      do
006604ea                      {
006604d1                          int32_t edx_3 = *(uint32_t*)((__inner1 + (j << 2)) - 4);
006604d5                          j -= 1;
006604d6                          eax -= 3;
006604d9                          int32_t var_8_1 = edx_3;
006604dd                          *(uint8_t*)((char*)eax - 2) = edx_3;
006604e0                          *(uint8_t*)((char*)eax - 1) = *(uint8_t*)((char*)edx_3)[1];
006604e8                          *(uint8_t*)eax = ((int8_t)(edx_3 >> 0x10));
006604ea                      } while (j > 0);
006604c8                  }
006604c8                  
006604f0                  __inner1 += iStride_1;
006604f2                  __inner1_1 += iStride;
006604f4                  i = ebp_1;
006604f4                  ebp_1 -= 1;
006604f5              } while (i != 1);
006604ab          }
006604a4      }
00660490  }

00660501     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00660510  void BlitLoopNoScale<&BlitOp_SrcCopy<BlitFormat_XRGB,BlitFormat_XRGB>,BlitFormat_XRGB,BlitFormat_XRGB>(struct BlitArgs const* arg1)

00660510  {
0066051d      union __inner1 = arg1->cSrcArgs.__inner1;
00660521      union __inner1_1 = arg1->cDstArgs.__inner1;
00660521      
00660524      if (arg1->i8AlphaModifier != 0)
00660524      {
00660526          uint32_t nHeight = arg1->nHeight;
00660526          
0066052b          if (nHeight > 0)
0066052b          {
0066052d              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00660532              uint32_t nWidth = arg1->nWidth;
00660535              uint32_t iStride = arg1->cDstArgs.iStride;
00660540              uint32_t nHeight_1 = nHeight;
0066057f              bool cond:1_1;
0066057f              
0066057f              do
0066057f              {
00660546                  if (nWidth > 0)
00660546                  {
0066054a                      struct BlitArgs** eax = (__inner1_1 + (nWidth << 2));
0066054f                      uint32_t edx_1 = nWidth;
00660568                      uint32_t i;
00660568                      
00660568                      do
00660568                      {
00660551                          struct BlitArgs* ebx_1 = *(uint32_t*)(((__inner1 - __inner1_1) + eax) - 4);
00660555                          eax -= 4;
00660558                          i = edx_1;
00660558                          edx_1 -= 1;
00660559                          arg1 = ebx_1;
0066055d                          *(uint8_t*)((char*)arg1)[3] = 0xff;
00660566                          *(uint32_t*)eax = arg1;
00660568                      } while (i != 1);
00660546                  }
00660546                  
00660576                  __inner1 += iStride_1;
00660578                  __inner1_1 += iStride;
0066057a                  cond:1_1 = nHeight_1 != 1;
0066057b                  nHeight_1 -= 1;
0066057f              } while (cond:1_1);
0066052b          }
00660524      }
00660510  }

0066058b                                   cc cc cc cc cc                                                             .....

00660590  void BlitLoopNoScale<&BlitOp_SrcCopy<BlitFormat_RGB,BlitFormat_ARGB>,BlitFormat_RGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00660590  {
0066059d      union __inner1 = arg1->cDstArgs.__inner1;
006605a1      union __inner1_1 = arg1->cSrcArgs.__inner1;
006605a1      
006605a4      if (arg1->i8AlphaModifier != 0)
006605a4      {
006605a6          uint32_t nHeight = arg1->nHeight;
006605a6          
006605ab          if (nHeight > 0)
006605ab          {
006605ad              uint32_t nWidth = arg1->nWidth;
006605b4              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006605b7              uint32_t iStride = arg1->cDstArgs.iStride;
006605ba              struct BlitArgs* ebx;
006605ba              struct BlitArgs* var_14_1 = ebx;
006605c0              uint32_t ebp_1 = nHeight;
00660602              uint32_t i;
00660602              
00660602              do
00660602              {
006605c2                  uint32_t j = nWidth;
006605c2                  
006605c8                  if (j > 0)
006605c8                  {
006605cd                      *(uint8_t*)((char*)arg1)[3] = 0xff;
006605d2                      char* ecx_2 = (((j * 3) + __inner1_1) + 2);
006605d2                      
006605f7                      do
006605f7                      {
006605d6                          ebx = ecx_2[0xfffffffb];
006605d9                          ecx_2 -= 3;
006605dc                          arg1 = ebx;
006605e0                          ebx = ecx_2[0xffffffff];
006605e3                          *(uint8_t*)((char*)arg1)[1] = ebx;
006605e7                          ebx = *(uint8_t*)ecx_2;
006605e9                          j -= 1;
006605ec                          *(uint8_t*)((char*)arg1)[2] = ebx;
006605f4                          *(uint32_t*)(__inner1 + (j << 2)) = arg1;
006605f7                      } while (j > 0);
006605c8                  }
006605c8                  
006605fd                  __inner1_1 += iStride_1;
006605ff                  __inner1 += iStride;
00660601                  i = ebp_1;
00660601                  ebp_1 -= 1;
00660602              } while (i != 1);
006605ab          }
006605a4      }
00660590  }

0066060e                                            cc cc                                                                ..

00660610  void BlitLoopNoScale<&BlitOp_SrcCopy<BlitFormat_RGB,BlitFormat_RGB>,BlitFormat_RGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00660610  {
00660613      struct BlitArgs* eax = arg1;
0066061c      union __inner1 = eax->cSrcArgs.__inner1;
00660620      union __inner1_1 = eax->cDstArgs.__inner1;
00660623      arg1 = __inner1;
00660627      union __inner1_2 = __inner1_1;
00660627      
0066062b      if (eax->i8AlphaModifier != 0)
0066062b      {
00660631          uint32_t nHeight = eax->nHeight;
00660631          
00660636          if (nHeight > 0)
00660636          {
00660638              int32_t ebx;
00660638              int32_t var_1c_1 = ebx;
0066063a              uint32_t nWidth = eax->nWidth;
0066063e              uint32_t iStride_1 = eax->cSrcArgs.iStride;
00660641              uint32_t iStride = eax->cDstArgs.iStride;
0066064c              uint32_t nHeight_1 = nHeight;
006606a9              bool cond:1_1;
006606a9              
006606a9              do
006606a9              {
00660652                  if (nWidth > 0)
00660652                  {
00660654                      uint32_t eax_1 = (nWidth * 3);
00660658                      void* ecx_1 = (eax_1 + __inner1_1);
0066065b                      void* eax_2 = ((eax_1 + __inner1) + 2);
0066065f                      char* esi = (__inner1_1 - __inner1);
00660661                      uint32_t edi_1 = nWidth;
00660682                      uint32_t i;
00660682                      
00660682                      do
00660682                      {
00660663                          ebx = *(uint8_t*)((char*)eax_2 - 4);
00660666                          *(uint8_t*)((char*)__inner1 + 0) = *(uint8_t*)((char*)eax_2 - 5);
00660669                          eax_2 -= 3;
0066066c                          ecx_1 -= 3;
0066066f                          i = edi_1;
0066066f                          edi_1 -= 1;
00660670                          char var_b_1 = ebx;
00660674                          ebx = *(uint8_t*)eax_2;
00660676                          *(uint8_t*)ecx_1 = *(uint8_t*)((char*)__inner1 + 0);
00660678                          *(uint8_t*)((char*)__inner1 + 0) = var_b_1;
0066067c                          *(uint8_t*)((char*)ecx_1 + 1) = *(uint8_t*)((char*)__inner1 + 0);
0066067f                          *(uint8_t*)(esi + eax_2) = ebx;
00660682                      } while (i != 1);
00660684                      __inner1_1 = __inner1_2;
00660688                      __inner1 = arg1;
00660652                  }
00660652                  
00660698                  __inner1 += iStride_1;
0066069a                  __inner1_1 += iStride;
0066069c                  cond:1_1 = nHeight_1 != 1;
0066069d                  arg1 = __inner1;
006606a1                  __inner1_2 = __inner1_1;
006606a5                  nHeight_1 -= 1;
006606a9              } while (cond:1_1);
00660636          }
0066062b      }
00660610  }

006606b5                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

006606c0  void BlitLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_ARGB,BlitFormat_ARGB>,BlitFormat_ARGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

006606c0  {
006606cf      union __inner1_1 = arg1->cDstArgs.__inner1;
006606d3      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006606db      union __inner1 = arg1->cSrcArgs.__inner1;
006606df      union __inner1_2 = __inner1_1;
006606df      
006606e3      if (i8AlphaModifier != 0)
006606e3      {
006606e9          uint32_t nHeight = arg1->nHeight;
006606ec          int32_t ebx = (i8AlphaModifier + 1);
006606ef          int32_t var_18_1 = ebx;
006606ef          
006606f3          if (nHeight > 0)
006606f3          {
006606f9              uint32_t nWidth = arg1->nWidth;
006606fc              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006606ff              uint32_t iStride = arg1->cDstArgs.iStride;
00660702              uint32_t nWidth_1 = nWidth;
0066070e              uint32_t nHeight_1 = nHeight;
00660803              bool cond:2_1;
00660803              
00660803              do
00660803              {
00660714                  if (nWidth > 0)
00660714                  {
0066071e                      int32_t* ecx_1 = (__inner1_1 + (nWidth << 2));
00660723                      uint32_t var_28_1 = nWidth;
006607d4                      uint32_t i;
006607d4                      
006607d4                      do
006607d4                      {
00660727                          int32_t esi_1 = *(uint32_t*)(((__inner1 - __inner1_1) + ecx_1) - 4);
0066072b                          ecx_1 -= 4;
00660730                          uint32_t eax_2 = (esi_1 >> 0x18);
00660739                          int32_t var_1c_1 = esi_1;
00660739                          
0066073d                          if (ebx != 0x100)
0066073d                          {
00660742                              int32_t eax_4;
00660742                              char edx;
00660742                              edx = HIGHD(((int64_t)(eax_2 * ebx)));
00660742                              eax_4 = LOWD(((int64_t)(eax_2 * ebx)));
0066074b                              eax_2 = ((eax_4 + ((uint32_t)edx)) >> 8);
0066073d                          }
0066073d                          
00660750                          if (eax_2 != 0)
00660750                          {
00660756                              int32_t edx_2 = *(uint32_t*)ecx_1;
00660756                              
0066075e                              if (eax_2 != 0xff)
0066075e                              {
00660774                                  int80_t st1;
00660774                                  st1 = 0;
0066077a                                  ebx = var_18_1;
00660781                                  int64_t st2 = _m_punpckhwd(0xffffff, 0);
0066078a                                  uint64_t st0 = _m_punpckhwd(((uint64_t)edx_2), 0);
0066079c                                  st2 = ((_m_punpckhwd(((uint64_t)esi_1), 0) & st2) | (st2 & !(st0)));
0066079f                                  int16_t st3[0x4] = ((uint64_t)(eax_2 + 1));
006607a5                                  int64_t st4 = _m_punpcklwd(st3, st3[0]);
006607ae                                  st3 = _m_punpcklwd(st4, st4[0]);
006607b7                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
006607ce                                  *(uint32_t*)ecx_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066075e                              }
0066075e                              else
0066076b                                  *(uint32_t*)ecx_1 = (((edx_2 ^ esi_1) & 0xffffff) ^ edx_2);
00660750                          }
00660750                          
006607d0                          i = var_28_1;
006607d0                          var_28_1 -= 1;
006607d4                      } while (i != 1);
006607da                      __inner1_1 = __inner1_2;
006607de                      nWidth = nWidth_1;
00660714                  }
00660714                  
006607f4                  __inner1_1 += iStride;
006607f6                  cond:2_1 = nHeight_1 != 1;
006607f7                  __inner1 += iStride_1;
006607fb                  __inner1_2 = __inner1_1;
006607ff                  nHeight_1 -= 1;
00660803              } while (cond:2_1);
006606f3          }
006606e3      }
006606c0  }

00660812                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

00660820  void BlitLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_ARGB,BlitFormat_RGB>,BlitFormat_ARGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00660820  {
0066082f      union __inner1_1 = arg1->cDstArgs.__inner1;
00660833      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066083a      int32_t edi;
0066083a      int32_t var_38 = edi;
0066083b      union __inner1 = arg1->cSrcArgs.__inner1;
0066083f      union __inner1_2 = __inner1_1;
0066083f      
00660843      if (i8AlphaModifier != 0)
00660843      {
00660849          uint32_t nHeight = arg1->nHeight;
00660849          
0066084f          if (nHeight > 0)
0066084f          {
00660855              uint32_t nWidth = arg1->nWidth;
0066085c              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066085f              uint32_t iStride = arg1->cDstArgs.iStride;
0066086a              uint32_t nHeight_1 = nHeight;
0066099a              bool cond:1_1;
0066099a              
0066099a              do
0066099a              {
00660870                  uint32_t i = nWidth;
00660870                  
00660876                  if (i > 0)
00660876                  {
0066087f                      char* ecx_2 = (((i * 3) + __inner1_1) + 2);
0066087f                      
0066096f                      do
0066096f                      {
00660887                          int32_t edi_2 = *(uint32_t*)((__inner1 + (i << 2)) - 4);
0066088b                          i -= 1;
0066088e                          ecx_2 -= 3;
00660891                          uint32_t eax_2 = (edi_2 >> 0x18);
0066089a                          int32_t var_14_1 = edi_2;
0066089a                          
0066089e                          if (i8AlphaModifier != 0xff)
0066089e                          {
006608a3                              int32_t eax_4;
006608a3                              char edx;
006608a3                              edx = HIGHD(((int64_t)(eax_2 * (i8AlphaModifier + 1))));
006608a3                              eax_4 = LOWD(((int64_t)(eax_2 * (i8AlphaModifier + 1))));
006608ac                              eax_2 = ((eax_4 + ((uint32_t)edx)) >> 8);
0066089e                          }
0066089e                          
006608b1                          if (eax_2 != 0)
006608b1                          {
006608b7                              union edx_1;
006608b7                              *(uint8_t*)((char*)edx_1 + 0) = ecx_2[0xfffffffe];
006608ba                              char var_28_1 = *(uint8_t*)((char*)edx_1 + 0);
006608be                              *(uint8_t*)((char*)edx_1 + 0) = ecx_2[0xffffffff];
006608c7                              char var_27_1 = *(uint8_t*)((char*)edx_1 + 0);
006608cb                              *(uint8_t*)((char*)edx_1 + 0) = *(uint8_t*)ecx_2;
006608cd                              char var_26_1 = *(uint8_t*)((char*)edx_1 + 0);
006608d1                              char var_25_1 = 0xff;
006608d1                              
006608d6                              if (eax_2 != 0xff)
006608d6                              {
00660908                                  int80_t st1;
00660908                                  st1 = 0;
0066090b                                  int64_t st2 = _m_punpckhwd(0xffffff, 0);
00660911                                  uint64_t st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
00660923                                  st2 = ((_m_punpckhwd(((uint64_t)edi_2), 0) & st2) | (st2 & !(st0)));
00660926                                  int16_t st3[0x4] = ((uint64_t)(eax_2 + 1));
0066092c                                  int64_t st4 = _m_punpcklwd(st3, st3[0]);
00660935                                  st3 = _m_punpcklwd(st4, st4[0]);
0066093e                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00660952                                  int32_t eax_12 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00660957                                  var_28_1 = eax_12;
0066095b                                  ecx_2[0xfffffffe] = eax_12;
00660968                                  ecx_2[0xffffffff] = ((int8_t)(eax_12 >> 8));
0066096b                                  *(uint8_t*)ecx_2 = ((int8_t)(var_28_1 >> 0x10));
006608d6                              }
006608d6                              else
006608d6                              {
006608d8                                  int32_t edx_2 = var_28_1;
006608e5                                  int32_t eax_10 = (((edx_2 ^ edi_2) & 0xffffff) ^ edx_2);
006608e7                                  int32_t var_14_2 = eax_10;
006608eb                                  ecx_2[0xfffffffe] = eax_10;
006608ee                                  ecx_2[0xffffffff] = *(uint8_t*)((char*)eax_10)[1];
006608f4                                  *(uint8_t*)ecx_2 = ((int8_t)(eax_10 >> 0x10));
006608d6                              }
006608b1                          }
0066096f                      } while (i > 0);
00660876                  }
00660876                  
00660987                  __inner1 += iStride_1;
0066098f                  __inner1_1 = (__inner1_2 + iStride);
00660991                  cond:1_1 = nHeight_1 != 1;
00660992                  __inner1_2 = __inner1_1;
00660996                  nHeight_1 -= 1;
0066099a              } while (cond:1_1);
0066084f          }
00660843      }
00660820  }

006609a9                             cc cc cc cc cc cc cc                                                           .......

006609b0  void BlitLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_XRGB,BlitFormat_ARGB>,BlitFormat_XRGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

006609b0  {
006609bf      union __inner1_1 = arg1->cDstArgs.__inner1;
006609c5      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006609cb      union __inner1 = arg1->cSrcArgs.__inner1;
006609cf      union __inner1_2 = __inner1_1;
006609cf      
006609d3      if (i8AlphaModifier != 0)
006609d3      {
006609d9          uint32_t nHeight = arg1->nHeight;
006609d9          
006609df          if (nHeight > 0)
006609df          {
006609e5              uint32_t nWidth = arg1->nWidth;
006609e8              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006609eb              uint32_t iStride = arg1->cDstArgs.iStride;
006609ee              uint32_t nWidth_1 = nWidth;
006609fa              uint32_t nHeight_1 = nHeight;
00660b02              bool cond:1_1;
00660b02              
00660b02              do
00660b02              {
00660a02                  if (nWidth > 0)
00660a02                  {
00660a0c                      int32_t* ecx_1 = (__inner1_1 + (nWidth << 2));
00660a11                      uint32_t var_20_1 = nWidth;
00660ad7                      uint32_t i;
00660ad7                      
00660ad7                      do
00660ad7                      {
00660a20                          int32_t edx = *(uint32_t*)(((__inner1 - __inner1_1) + ecx_1) - 4);
00660a24                          ecx_1 -= 4;
00660a2d                          int32_t var_28_1 = edx;
00660a31                          *(uint8_t*)((char*)var_28_1)[3] = 0xff;
00660a36                          int32_t eax_1 = 0xff;
00660a36                          
00660a3b                          if (i8AlphaModifier != 0xff)
00660a3b                          {
00660a45                              int32_t eax_4;
00660a45                              char edx_1;
00660a45                              edx_1 = HIGHD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00660a45                              eax_4 = LOWD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00660a4e                              eax_1 = ((eax_4 + ((uint32_t)edx_1)) >> 8);
00660a3b                          }
00660a3b                          
00660a53                          if ((i8AlphaModifier == 0xff || eax_1 != 0))
00660a53                          {
00660a55                              int32_t edx_3 = *(uint32_t*)ecx_1;
00660a55                              
00660a5d                              if (eax_1 != 0xff)
00660a5d                              {
00660a7a                                  int80_t st1;
00660a7a                                  st1 = 0;
00660a80                                  nWidth = nWidth_1;
00660a87                                  uint64_t st2 = _m_punpckhwd(0xffffff, 0);
00660a90                                  int64_t st0 = _m_punpckhwd(((uint64_t)edx_3), 0);
00660a9f                                  st2 = ((_m_punpckhwd(((uint64_t)var_28_1), 0) & st2) | (st2 & !(st0)));
00660aa2                                  uint64_t st3 = ((uint64_t)(eax_1 + 1));
00660aa8                                  uint64_t st4 = _m_punpcklwd(st3, st3);
00660ab1                                  st3 = _m_punpcklwd(st4, st4);
00660aba                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00660ad1                                  *(uint32_t*)ecx_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00660a5d                              }
00660a5d                              else
00660a6c                                  *(uint32_t*)ecx_1 = (((edx_3 ^ var_28_1) & 0xffffff) ^ edx_3);
00660a53                          }
00660a53                          
00660ad3                          i = var_20_1;
00660ad3                          var_20_1 -= 1;
00660ad7                      } while (i != 1);
00660add                      __inner1_1 = __inner1_2;
00660a02                  }
00660a02                  
00660af3                  __inner1_1 += iStride;
00660af5                  cond:1_1 = nHeight_1 != 1;
00660af6                  __inner1 += iStride_1;
00660afa                  __inner1_2 = __inner1_1;
00660afe                  nHeight_1 -= 1;
00660b02              } while (cond:1_1);
006609df          }
006609d3      }
006609b0  }

00660a17                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
00660b11                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

00660b20  void BlitLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_XRGB,BlitFormat_RGB>,BlitFormat_XRGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00660b20  {
00660b2c      union __inner1 = arg1->cDstArgs.__inner1;
00660b35      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00660b3b      union __inner1_2 = __inner1;
00660b3b      
00660b3f      if (i8AlphaModifier != 0)
00660b3f      {
00660b45          uint32_t nHeight = arg1->nHeight;
00660b45          
00660b4b          if (nHeight > 0)
00660b4b          {
00660b51              uint32_t nWidth = arg1->nWidth;
00660b58              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00660b5b              uint32_t iStride = arg1->cDstArgs.iStride;
00660b66              uint32_t nHeight_1 = nHeight;
00660b6a              union __inner1_1 = arg1->cSrcArgs.__inner1;
00660c9c              bool cond:1_1;
00660c9c              
00660c9c              do
00660c9c              {
00660b70                  uint32_t i = nWidth;
00660b70                  
00660b76                  if (i > 0)
00660b76                  {
00660b7f                      char* ecx_2 = (((i * 3) + __inner1) + 2);
00660b7f                      
00660c79                      do
00660c79                      {
00660b83                          uint32_t edx_1 = *(uint32_t*)((__inner1_1 + (i << 2)) - 4);
00660b87                          i -= 1;
00660b88                          ecx_2 -= 3;
00660b91                          uint32_t var_20_1 = edx_1;
00660b95                          *(uint8_t*)((char*)var_20_1)[3] = 0xff;
00660b9a                          int32_t eax_1 = 0xff;
00660b9a                          
00660b9f                          if (i8AlphaModifier != 0xff)
00660b9f                          {
00660ba9                              int32_t eax_4;
00660ba9                              char edx;
00660ba9                              edx = HIGHD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00660ba9                              eax_4 = LOWD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00660bb2                              eax_1 = ((eax_4 + ((uint32_t)edx)) >> 8);
00660b9f                          }
00660b9f                          
00660bb7                          if ((i8AlphaModifier == 0xff || eax_1 != 0))
00660bb7                          {
00660bbd                              edx_1 = ecx_2[0xfffffffe];
00660bc0                              char var_24_1 = edx_1;
00660bc4                              edx_1 = ecx_2[0xffffffff];
00660bcd                              char var_23_1 = edx_1;
00660bd1                              edx_1 = *(uint8_t*)ecx_2;
00660bd3                              char var_22_1 = edx_1;
00660bd7                              char var_21_1 = 0xff;
00660bd7                              
00660bdc                              if (eax_1 != 0xff)
00660bdc                              {
00660c15                                  int80_t st1;
00660c15                                  st1 = 0;
00660c18                                  int64_t st2 = _m_punpckhwd(0xffffff, 0);
00660c1e                                  int64_t st0 = _m_punpckhwd(((uint64_t)var_24_1), 0);
00660c2d                                  st2 = ((_m_punpckhwd(((uint64_t)var_20_1), 0) & st2) | (st2 & !(st0)));
00660c30                                  int16_t st3[0x4] = ((uint64_t)(eax_1 + 1));
00660c36                                  uint64_t st4 = _m_punpcklwd(st3, st3[0]);
00660c3f                                  st3 = _m_punpcklwd(st4, st4[0]);
00660c48                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00660c5c                                  int32_t eax_12 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00660c61                                  var_24_1 = eax_12;
00660c65                                  ecx_2[0xfffffffe] = eax_12;
00660c72                                  ecx_2[0xffffffff] = ((int8_t)(eax_12 >> 8));
00660c75                                  *(uint8_t*)ecx_2 = ((int8_t)(var_24_1 >> 0x10));
00660bdc                              }
00660bdc                              else
00660bdc                              {
00660bde                                  int32_t edx_2 = var_24_1;
00660bed                                  int32_t eax_10 = (((edx_2 ^ var_20_1) & 0xffffff) ^ edx_2);
00660bef                                  int32_t var_20_2 = eax_10;
00660bf3                                  ecx_2[0xfffffffe] = eax_10;
00660bf6                                  ecx_2[0xffffffff] = *(uint8_t*)((char*)eax_10)[1];
00660bfc                                  *(uint8_t*)ecx_2 = ((int8_t)(eax_10 >> 0x10));
00660bdc                              }
00660bb7                          }
00660c79                      } while (i > 0);
00660b76                  }
00660b76                  
00660c8b                  __inner1_1 += iStride_1;
00660c91                  __inner1 = (__inner1_2 + iStride);
00660c93                  cond:1_1 = nHeight_1 != 1;
00660c94                  __inner1_2 = __inner1;
00660c98                  nHeight_1 -= 1;
00660c9c              } while (cond:1_1);
00660b4b          }
00660b3f      }
00660b20  }

00660cab                                   cc cc cc cc cc                                                             .....

00660cb0  void BlitLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_RGB,BlitFormat_ARGB>,BlitFormat_RGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00660cb0  {
00660cbc      union __inner1 = arg1->cSrcArgs.__inner1;
00660cc0      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00660ccb      union __inner1_2 = __inner1;
00660ccb      
00660ccf      if (i8AlphaModifier != 0)
00660ccf      {
00660cd5          uint32_t nHeight = arg1->nHeight;
00660cd8          int32_t ebx = (i8AlphaModifier + 1);
00660cdb          int32_t var_14_1 = ebx;
00660cdb          
00660cdf          if (nHeight > 0)
00660cdf          {
00660ce5              uint32_t nWidth = arg1->nWidth;
00660cec              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00660cf6              uint32_t iStride = arg1->cDstArgs.iStride;
00660cfa              uint32_t nHeight_1 = nHeight;
00660cfe              union __inner1_1 = arg1->cDstArgs.__inner1;
00660e07              bool cond:2_1;
00660e07              
00660e07              do
00660e07              {
00660d00                  uint32_t i = nWidth;
00660d00                  
00660d06                  if (i > 0)
00660d06                  {
00660d0f                      char var_21_1 = 0xff;
00660d14                      char* esi_1 = (((i * 3) + __inner1) + 2);
00660d14                      
00660de4                      do
00660de4                      {
00660d20                          uint32_t eax_1;
00660d20                          eax_1 = esi_1[0xfffffffb];
00660d23                          uint32_t edx;
00660d23                          edx = esi_1[0xfffffffc];
00660d26                          esi_1 -= 3;
00660d29                          char var_24_1 = eax_1;
00660d2d                          eax_1 = *(uint8_t*)esi_1;
00660d2f                          i -= 1;
00660d36                          char var_22_1 = eax_1;
00660d3a                          char var_23_1 = edx;
00660d3e                          eax_1 = 0xff;
00660d3e                          
00660d43                          if (ebx != 0x100)
00660d43                          {
00660d4d                              int32_t eax_4;
00660d4d                              char edx_1;
00660d4d                              edx_1 = HIGHD(((int64_t)(ebx * 0xff)));
00660d4d                              eax_4 = LOWD(((int64_t)(ebx * 0xff)));
00660d56                              eax_1 = ((eax_4 + ((uint32_t)edx_1)) >> 8);
00660d43                          }
00660d43                          
00660d5b                          if ((ebx == 0x100 || eax_1 != 0))
00660d5b                          {
00660d61                              edx = *(uint32_t*)(__inner1_1 + (i << 2));
00660d61                              
00660d6a                              if (eax_1 != 0xff)
00660d6a                              {
00660d88                                  int80_t st1;
00660d88                                  st1 = 0;
00660d8e                                  ebx = var_14_1;
00660d95                                  int64_t st2 = _m_punpckhwd(0xffffff, 0);
00660d9e                                  uint64_t st0 = _m_punpckhwd(((uint64_t)edx), 0);
00660dad                                  st2 = ((_m_punpckhwd(((uint64_t)var_24_1), 0) & st2) | (st2 & !(st0)));
00660db0                                  int16_t st3[0x4] = ((uint64_t)(eax_1 + 1));
00660db6                                  int64_t st4 = _m_punpcklwd(st3, st3[0]);
00660dbf                                  st3 = _m_punpcklwd(st4, st4[0]);
00660dc8                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00660ddf                                  *(uint32_t*)(__inner1_1 + (i << 2)) = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00660d6a                              }
00660d6a                              else
00660d79                                  *(uint32_t*)(__inner1_1 + (i << 2)) = (((edx ^ var_24_1) & 0xffffff) ^ edx);
00660d5b                          }
00660de4                      } while (i > 0);
00660d06                  }
00660d06                  
00660dfa                  __inner1 = (__inner1_2 + iStride_1);
00660dfc                  __inner1_1 += iStride;
00660dfe                  cond:2_1 = nHeight_1 != 1;
00660dff                  __inner1_2 = __inner1;
00660e03                  nHeight_1 -= 1;
00660e07              } while (cond:2_1);
00660cdf          }
00660ccf      }
00660cb0  }

00660d1a                                                                                8d 9b 00 00 00 00                            ......
00660e16                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00660e20  void BlitLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_RGB,BlitFormat_RGB>,BlitFormat_RGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00660e20  {
00660e30      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00660e37      union __inner1_1 = arg1->cSrcArgs.__inner1;
00660e3b      union __inner1_2 = __inner1_1;
00660e3f      union __inner1 = arg1->cDstArgs.__inner1;
00660e3f      
00660e43      if (i8AlphaModifier != 0)
00660e43      {
00660e49          uint32_t nHeight = arg1->nHeight;
00660e49          
00660e4f          if (nHeight > 0)
00660e4f          {
00660e55              uint32_t nWidth = arg1->nWidth;
00660e58              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00660e5b              uint32_t iStride = arg1->cDstArgs.iStride;
00660e5e              uint32_t nWidth_1 = nWidth;
00660e6a              uint32_t nHeight_1 = nHeight;
00660fc7              bool cond:1_1;
00660fc7              
00660fc7              do
00660fc7              {
00660e72                  if (nWidth > 0)
00660e72                  {
00660e7c                      uint32_t eax_1 = (nWidth * 3);
00660e7f                      void* edi_2 = (eax_1 + __inner1_1);
00660e82                      char* ecx_2 = ((eax_1 + __inner1) + 2);
00660e8a                      char var_29_1 = 0xff;
00660e8f                      char* esi = (__inner1_1 - __inner1);
00660e91                      uint32_t var_24_1 = nWidth;
00660f98                      uint32_t i;
00660f98                      
00660f98                      do
00660f98                      {
00660e95                          nWidth = *(uint8_t*)((char*)edi_2 - 3);
00660e98                          union eax_2;
00660e98                          *(uint8_t*)((char*)eax_2 + 0) = *(uint8_t*)((esi + ecx_2) - 4);
00660e9c                          edi_2 -= 3;
00660e9f                          ecx_2 -= 3;
00660ea8                          char var_2c_1 = nWidth;
00660eac                          nWidth = *(uint8_t*)(esi + ecx_2);
00660eaf                          char var_2b_1 = *(uint8_t*)((char*)eax_2 + 0);
00660eb3                          char var_2a_1 = nWidth;
00660eb7                          eax_2 = 0xff;
00660eb7                          
00660ebc                          if (i8AlphaModifier != 0xff)
00660ebc                          {
00660ec6                              int32_t eax_5;
00660ec6                              char edx_1;
00660ec6                              edx_1 = HIGHD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00660ec6                              eax_5 = LOWD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00660ecf                              eax_2 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
00660ebc                          }
00660ebc                          
00660ed4                          if ((i8AlphaModifier == 0xff || eax_2 != 0))
00660ed4                          {
00660eda                              nWidth = ecx_2[0xfffffffe];
00660edd                              char var_30_1 = nWidth;
00660ee1                              nWidth = ecx_2[0xffffffff];
00660eea                              char var_2f_1 = nWidth;
00660eee                              nWidth = *(uint8_t*)ecx_2;
00660ef0                              char var_2e_1 = nWidth;
00660ef4                              char var_2d_1 = 0xff;
00660ef4                              
00660ef9                              if (eax_2 != 0xff)
00660ef9                              {
00660f32                                  int80_t st1;
00660f32                                  st1 = 0;
00660f35                                  uint64_t st2 = _m_punpckhwd(0xffffff, 0);
00660f3b                                  int64_t st0 = _m_punpckhwd(((uint64_t)var_30_1), 0);
00660f4a                                  st2 = ((_m_punpckhwd(((uint64_t)var_2c_1), 0) & st2) | (st2 & !(st0)));
00660f4d                                  uint64_t st3 = ((uint64_t)(eax_2 + 1));
00660f53                                  uint64_t st4 = _m_punpcklwd(st3, st3);
00660f5c                                  st3 = _m_punpcklwd(st4, st4);
00660f65                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00660f79                                  int32_t eax_12 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00660f7e                                  var_30_1 = eax_12;
00660f82                                  ecx_2[0xfffffffe] = eax_12;
00660f8f                                  ecx_2[0xffffffff] = *(uint8_t*)((char*)(eax_12 >> 8) + 0);
00660f92                                  *(uint8_t*)ecx_2 = (var_30_1 >> 0x10);
00660ef9                              }
00660ef9                              else
00660ef9                              {
00660efb                                  nWidth = var_30_1;
00660f0a                                  int32_t eax_11 = (((nWidth ^ var_2c_1) & 0xffffff) ^ nWidth);
00660f0c                                  int32_t var_18_1 = eax_11;
00660f10                                  ecx_2[0xfffffffe] = eax_11;
00660f13                                  ecx_2[0xffffffff] = *(uint8_t*)((char*)eax_11)[1];
00660f19                                  *(uint8_t*)ecx_2 = *(uint8_t*)((char*)(eax_11 >> 0x10) + 0);
00660ef9                              }
00660ed4                          }
00660ed4                          
00660f94                          i = var_24_1;
00660f94                          var_24_1 -= 1;
00660f98                      } while (i != 1);
00660f9e                      __inner1_1 = __inner1_2;
00660fa2                      nWidth = nWidth_1;
00660e72                  }
00660e72                  
00660fb8                  __inner1_1 += iStride_1;
00660fba                  cond:1_1 = nHeight_1 != 1;
00660fbb                  __inner1_2 = __inner1_1;
00660fbf                  __inner1 += iStride;
00660fc3                  nHeight_1 -= 1;
00660fc7              } while (cond:1_1);
00660e4f          }
00660e43      }
00660e20  }

00660fd6                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00660fe0  void BlitLoopNoScale<&BlitOp_Colorize<BlitFormat_ARGB,BlitFormat_ARGB>,BlitFormat_ARGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00660fe0  {
00660fe7      union __inner1 = arg1->cDstArgs.__inner1;
00660feb      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00660ff2      union __inner1_1 = arg1->cSrcArgs.__inner1;
00660ff5      union __inner1_2 = __inner1_1;
00660ff9      union __inner1_3 = __inner1;
00660ff9      
00660ffd      if (i8AlphaModifier != 0)
00660ffd      {
00661004          uint32_t nHeight = arg1->nHeight;
00661007          int32_t ebp = (i8AlphaModifier + 1);
0066100a          int32_t var_18_1 = ebp;
0066100a          
0066100e          if (nHeight > 0)
0066100e          {
00661014              uint32_t nWidth = arg1->nWidth;
00661018              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066101b              uint32_t iStride = arg1->cDstArgs.iStride;
0066101e              uint32_t nWidth_1 = nWidth;
0066102a              uint32_t nHeight_1 = nHeight;
0066102e              union __inner1_4 = __inner1_1;
00661454              bool cond:2_1;
00661454              
00661454              do
00661454              {
00661032                  if (nWidth > 0)
00661032                  {
00661038                      int32_t edi = (__inner1_4 - __inner1);
0066103a                      int32_t* esi_1 = (__inner1 + (nWidth << 2));
0066103d                      int32_t var_1c_1 = edi;
00661041                      uint32_t var_38_1 = nWidth;
00661425                      uint32_t i;
00661425                      
00661425                      do
00661425                      {
00661045                          int32_t ecx = *(uint32_t*)((edi + esi_1) - 4);
00661049                          esi_1 -= 4;
0066104e                          uint16_t ebx_2 = ((int16_t)(ecx >> 0x10));
00661051                          uint32_t eax_1 = ((uint32_t)*(uint8_t*)((char*)ebx_2)[1]);
00661058                          int32_t edx_1;
00661058                          edx_1 = eax_1 != 0;
0066105f                          int32_t var_8_1 = ecx;
00661063                          int32_t eax_2 = (eax_1 + edx_1);
0066106b                          int32_t var_40_1 = eax_2;
0066106b                          
0066106f                          if (ebp != 0x100)
0066106f                          {
00661074                              int32_t eax_4;
00661074                              char edx_2;
00661074                              edx_2 = HIGHD(((int64_t)(eax_2 * ebp)));
00661074                              eax_4 = LOWD(((int64_t)(eax_2 * ebp)));
0066107d                              eax_2 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
00661080                              var_40_1 = eax_2;
0066106f                          }
0066106f                          
00661086                          if (eax_2 != 0)
00661086                          {
0066108c                              struct BlitArgs* eax_6 = *(uint32_t*)esi_1;
00661090                              uint32_t edi_1 = ((uint32_t)ecx);
00661093                              uint32_t esi_2 = ((uint32_t)*(uint8_t*)((char*)ecx)[1]);
00661096                              uint32_t ecx_1 = ((uint32_t)ebx_2);
0066109b                              int32_t edx_4;
0066109b                              edx_4 = ecx_1 != 0;
006610a4                              int32_t ecx_2 = (ecx_1 + edx_4);
006610a8                              int32_t eax_7;
006610a8                              eax_7 = esi_2 != 0;
006610ad                              int32_t ebx_3 = ecx_2;
006610af                              int32_t esi_3 = (esi_2 + eax_7);
006610b3                              int32_t edx_5;
006610b3                              edx_5 = edi_1 != 0;
006610b6                              int32_t edi_2 = (edi_1 + edx_5);
006610ba                              int32_t edx_6 = ecx_2;
006610ba                              
006610bc                              if (esi_3 > ecx_2)
006610be                                  ebx_3 = esi_3;
006610bc                              else if (esi_3 < ecx_2)
006610c4                                  edx_6 = esi_3;
006610c4                              
006610c8                              if (edi_2 > ebx_3)
006610ca                                  ebx_3 = edi_2;
006610c8                              else if (edi_2 < edx_6)
006610d2                                  edx_6 = edi_2;
006610d2                              
006610d6                              int32_t eax_9 = (ebx_3 - edx_6);
006610dc                              int32_t ebp_1;
006610dc                              int32_t esi_4;
006610dc                              
006610dc                              if (ebx_3 != edx_6)
006610dc                              {
006610ea                                  int32_t ebp_2 = 0;
006610f2                                  int32_t ecx_3;
006610f2                                  
006610f2                                  if (ecx_2 == ebx_3)
006610f2                                  {
006610f6                                      ecx_3 = (esi_3 - edi_2);
006610f6                                      
006610f8                                      if ((esi_3 - edi_2) < 0)
006610fa                                          ebp_2 = 0x6000;
006610f2                                  }
006610f2                                  else if (esi_3 != ebx_3)
00661103                                  {
00661110                                      ecx_3 = (ecx_2 - esi_3);
00661112                                      ebp_2 = 0x4000;
00661103                                  }
00661103                                  else
00661103                                  {
00661107                                      ecx_3 = (edi_2 - ecx_2);
00661109                                      ebp_2 = 0x2000;
00661103                                  }
00661103                                  
00661123                                  esi_4 = ((((int64_t)(ecx_3 << 0xc)) / eax_9) + ebp_2);
00661125                                  ebp_1 = (((int64_t)(eax_9 << 8)) / ebx_3);
006610dc                              }
006610dc                              else
006610dc                              {
006610de                                  esi_4 = 0;
006610e0                                  ebp_1 = 0;
006610dc                              }
006610dc                              
00661129                              uint32_t eax_17 = ((uint32_t)*(uint8_t*)((char*)eax_6)[1]);
0066112e                              uint32_t edi_4 = ((uint32_t)eax_6);
00661133                              uint32_t ecx_4 = ((uint32_t)*(uint8_t*)((char*)eax_6)[2]);
0066113c                              int32_t edx_11;
0066113c                              edx_11 = eax_17 != 0;
0066114b                              int32_t eax_18 = (eax_17 + edx_11);
00661151                              int32_t edx_12;
00661151                              edx_12 = edi_4 != 0;
00661154                              int32_t edi_5 = (edi_4 + edx_12);
0066115a                              int32_t edx_13;
0066115a                              edx_13 = ecx_4 != 0;
0066115d                              int32_t ecx_5 = (ecx_4 + edx_13);
0066115d                              
00661161                              if (eax_18 > ecx_5)
00661163                                  ecx_5 = eax_18;
00661163                              
00661167                              if (edi_5 > ecx_5)
00661169                                  ecx_5 = edi_5;
00661169                              
00661173                              if (var_40_1 != 0x100)
00661173                              {
006612a1                                  int32_t var_4c;
006612a1                                  int32_t var_48;
006612a1                                  int32_t var_44;
006612a1                                  
006612a1                                  if (ebp_1 != 0)
006612a1                                  {
006612b5                                      int32_t eax_39;
006612b5                                      char edx_24;
006612b5                                      edx_24 = HIGHD(((int64_t)(ecx_5 * ebp_1)));
006612b5                                      eax_39 = LOWD(((int64_t)(ecx_5 * ebp_1)));
006612c2                                      int32_t eax_42;
006612c2                                      int32_t edx_26;
006612c2                                      edx_26 = HIGHD(((int64_t)esi_4));
006612c2                                      eax_42 = LOWD(((int64_t)esi_4));
006612cd                                      int32_t ebx_8 = ((eax_42 + (edx_26 & 0xfff)) >> 0xc);
006612d3                                      int32_t eax_45;
006612d3                                      int32_t edx_28;
006612d3                                      edx_28 = HIGHD(((int64_t)(ebx_8 + 1)));
006612d3                                      eax_45 = LOWD(((int64_t)(ebx_8 + 1)));
006612d8                                      int32_t ebp_10 = ((eax_39 + ((uint32_t)edx_24)) >> 8);
006612e0                                      int32_t esi_10 = ((esi_4 - (((eax_45 - edx_28) >> 1) << 0xd)) * ebp_10);
006612e5                                      int32_t edi_16 = (ecx_5 - ebp_10);
006612e9                                      int32_t ebp_12 = (esi_10 & 0x80000fff);
006612e9                                      
006612ef                                      if (ebp_12 < 0)
006612f8                                          ebp_12 = (((ebp_12 - 1) | 0xfffff000) + 1);
006612f8                                      
006612fb                                      int32_t eax_50;
006612fb                                      int32_t edx_29;
006612fb                                      edx_29 = HIGHD(((int64_t)esi_10));
006612fb                                      eax_50 = LOWD(((int64_t)esi_10));
00661304                                      int32_t eax_52 = ((eax_50 + (edx_29 & 0xfff)) >> 0xc);
00661304                                      
0066130d                                      if (ebp_12 < 0xfffff800)
0066130f                                          eax_52 -= 1;
0066130f                                      
00661316                                      if (ebp_12 > 0x800)
00661318                                          eax_52 += 1;
00661318                                      
0066131e                                      switch (ebx_8)
0066131e                                      {
00661325                                          case 0:
00661325                                          {
00661325                                              var_44 = edi_16;
0066132b                                              var_48 = (edi_16 + eax_52);
0066137b                                              var_4c = ecx_5;
00661325                                              break;
00661325                                          }
00661331                                          case 1:
00661331                                          {
00661331                                              var_44 = edi_16;
00661337                                              var_48 = ecx_5;
0066133b                                              var_4c = (edi_16 - eax_52);
00661331                                              break;
00661331                                          }
00661341                                          case 2:
00661341                                          {
00661341                                              var_4c = edi_16;
00661347                                              var_48 = ecx_5;
0066134b                                              var_44 = (edi_16 + eax_52);
00661341                                              break;
00661341                                          }
00661351                                          case 3:
00661351                                          {
00661351                                              var_4c = edi_16;
00661357                                              var_44 = ecx_5;
0066135b                                              var_48 = (edi_16 - eax_52);
00661351                                              break;
00661351                                          }
00661361                                          case 4:
00661361                                          {
00661361                                              var_48 = edi_16;
00661367                                              var_44 = ecx_5;
0066136b                                              var_4c = (edi_16 + eax_52);
00661361                                              break;
00661361                                          }
00661371                                          case 5:
00661371                                          {
00661371                                              var_48 = edi_16;
00661377                                              var_44 = (edi_16 - eax_52);
0066137b                                              var_4c = ecx_5;
00661371                                              break;
00661371                                          }
0066131e                                      }
006612a1                                  }
006612a1                                  else
006612a1                                  {
006612a3                                      var_48 = ecx_5;
006612a7                                      var_44 = ecx_5;
0066137b                                      var_4c = ecx_5;
006612a1                                  }
006612a1                                  
0066138f                                  int32_t eax_53;
0066138f                                  eax_53 = var_4c != 0;
00661398                                  int32_t edx_32 = (var_4c - eax_53);
0066139c                                  int32_t ecx_9;
0066139c                                  ecx_9 = var_48 != 0;
006613a1                                  var_4c = edx_32;
006613a5                                  int32_t esi_12 = (var_48 - ecx_9);
006613ad                                  int32_t eax_54;
006613ad                                  eax_54 = var_44 != 0;
006613b0                                  var_48 = esi_12;
006613b4                                  int32_t edi_24 = (var_44 - eax_54);
006613bd                                  int32_t eax_58;
006613bd                                  char edx_33;
006613bd                                  edx_33 = HIGHD(((int64_t)((ecx_4 - edx_32) * var_40_1)));
006613bd                                  eax_58 = LOWD(((int64_t)((ecx_4 - edx_32) * var_40_1)));
006613c9                                  uint32_t ecx_10;
006613c9                                  ecx_10 = (ecx_4 - ((int8_t)((eax_58 + ((uint32_t)edx_33)) >> 8)));
006613cb                                  *(uint8_t*)((char*)arg1)[2] = ecx_10;
006613da                                  int32_t eax_64;
006613da                                  char edx_35;
006613da                                  edx_35 = HIGHD(((int64_t)((eax_17 - esi_12) * var_40_1)));
006613da                                  eax_64 = LOWD(((int64_t)((eax_17 - esi_12) * var_40_1)));
006613e6                                  uint32_t ecx_11;
006613e6                                  ecx_11 = (eax_17 - ((int8_t)((eax_64 + ((uint32_t)edx_35)) >> 8)));
006613e8                                  *(uint8_t*)((char*)arg1)[1] = ecx_11;
006613f7                                  int32_t eax_70;
006613f7                                  char edx_37;
006613f7                                  edx_37 = HIGHD(((int64_t)((edi_4 - edi_24) * var_40_1)));
006613f7                                  eax_70 = LOWD(((int64_t)((edi_4 - edi_24) * var_40_1)));
00661403                                  uint32_t ecx_12;
00661403                                  ecx_12 = (edi_4 - ((int8_t)((eax_70 + ((uint32_t)edx_37)) >> 8)));
00661405                                  var_44 = edi_24;
00661409                                  arg1 = ecx_12;
00661173                              }
00661173                              else
00661173                              {
0066117b                                  int32_t var_58;
0066117b                                  int32_t var_54;
0066117b                                  int32_t var_50;
0066117b                                  
0066117b                                  if (ebp_1 != 0)
0066117b                                  {
0066118f                                      int32_t eax_21;
0066118f                                      char edx_14;
0066118f                                      edx_14 = HIGHD(((int64_t)(ecx_5 * ebp_1)));
0066118f                                      eax_21 = LOWD(((int64_t)(ecx_5 * ebp_1)));
0066119c                                      int32_t eax_24;
0066119c                                      int32_t edx_16;
0066119c                                      edx_16 = HIGHD(((int64_t)esi_4));
0066119c                                      eax_24 = LOWD(((int64_t)esi_4));
006611a7                                      int32_t ebx_5 = ((eax_24 + (edx_16 & 0xfff)) >> 0xc);
006611ad                                      int32_t eax_27;
006611ad                                      int32_t edx_18;
006611ad                                      edx_18 = HIGHD(((int64_t)(ebx_5 + 1)));
006611ad                                      eax_27 = LOWD(((int64_t)(ebx_5 + 1)));
006611b2                                      int32_t ebp_4 = ((eax_21 + ((uint32_t)edx_14)) >> 8);
006611ba                                      int32_t esi_8 = ((esi_4 - (((eax_27 - edx_18) >> 1) << 0xd)) * ebp_4);
006611bf                                      int32_t edi_7 = (ecx_5 - ebp_4);
006611c3                                      int32_t ebp_6 = (esi_8 & 0x80000fff);
006611c3                                      
006611c9                                      if (ebp_6 < 0)
006611d2                                          ebp_6 = (((ebp_6 - 1) | 0xfffff000) + 1);
006611d2                                      
006611d5                                      int32_t eax_32;
006611d5                                      int32_t edx_19;
006611d5                                      edx_19 = HIGHD(((int64_t)esi_8));
006611d5                                      eax_32 = LOWD(((int64_t)esi_8));
006611de                                      int32_t eax_34 = ((eax_32 + (edx_19 & 0xfff)) >> 0xc);
006611de                                      
006611e7                                      if (ebp_6 < 0xfffff800)
006611e9                                          eax_34 -= 1;
006611e9                                      
006611f0                                      if (ebp_6 > 0x800)
006611f2                                          eax_34 += 1;
006611f2                                      
006611f8                                      switch (ebx_5)
006611f8                                      {
006611ff                                          case 0:
006611ff                                          {
006611ff                                              var_58 = edi_7;
00661205                                              var_50 = (edi_7 + eax_34);
00661255                                              var_54 = ecx_5;
006611ff                                              break;
006611ff                                          }
0066120b                                          case 1:
0066120b                                          {
0066120b                                              var_58 = edi_7;
00661211                                              var_50 = ecx_5;
00661215                                              var_54 = (edi_7 - eax_34);
0066120b                                              break;
0066120b                                          }
0066121b                                          case 2:
0066121b                                          {
0066121b                                              var_54 = edi_7;
00661221                                              var_50 = ecx_5;
00661225                                              var_58 = (edi_7 + eax_34);
0066121b                                              break;
0066121b                                          }
0066122b                                          case 3:
0066122b                                          {
0066122b                                              var_54 = edi_7;
00661231                                              var_58 = ecx_5;
00661235                                              var_50 = (edi_7 - eax_34);
0066122b                                              break;
0066122b                                          }
0066123b                                          case 4:
0066123b                                          {
0066123b                                              var_50 = edi_7;
00661241                                              var_58 = ecx_5;
00661245                                              var_54 = (edi_7 + eax_34);
0066123b                                              break;
0066123b                                          }
0066124b                                          case 5:
0066124b                                          {
0066124b                                              var_50 = edi_7;
00661251                                              var_58 = (edi_7 - eax_34);
00661255                                              var_54 = ecx_5;
0066124b                                              break;
0066124b                                          }
006611f8                                      }
0066117b                                  }
0066117b                                  else
0066117b                                  {
0066117d                                      var_50 = ecx_5;
00661181                                      var_58 = ecx_5;
00661255                                      var_54 = ecx_5;
0066117b                                  }
0066117b                                  
00661265                                  int32_t ecx_6;
00661265                                  ecx_6 = var_54 != 0;
0066126a                                  int32_t eax_36 = (var_54 - ecx_6);
00661272                                  int32_t edx_21;
00661272                                  edx_21 = var_50 != 0;
00661277                                  var_54 = eax_36;
0066127b                                  *(uint8_t*)((char*)arg1)[2] = eax_36;
0066127f                                  int32_t ecx_8 = (var_50 - edx_21);
00661283                                  int32_t ebx_6;
00661283                                  ebx_6 = var_58 != 0;
00661288                                  var_50 = ecx_8;
0066128c                                  *(uint8_t*)((char*)arg1)[1] = ecx_8;
00661290                                  int32_t edx_23 = (var_58 - ebx_6);
00661292                                  var_58 = edx_23;
00661296                                  arg1 = edx_23;
00661173                              }
00661173                              
00661415                              edi = var_1c_1;
00661419                              ebp = var_18_1;
0066141d                              *(uint32_t*)esi_1 = arg1;
00661086                          }
00661086                          
00661421                          i = var_38_1;
00661421                          var_38_1 -= 1;
00661425                      } while (i != 1);
0066142b                      __inner1 = __inner1_3;
0066142f                      nWidth = nWidth_1;
00661032                  }
00661032                  
00661443                  __inner1_4 = (__inner1_2 + iStride_1);
00661445                  __inner1 += iStride;
00661447                  cond:2_1 = nHeight_1 != 1;
00661448                  __inner1_2 = __inner1_4;
0066144c                  __inner1_3 = __inner1;
00661450                  nHeight_1 -= 1;
00661454              } while (cond:2_1);
0066100e          }
00660ffd      }
00660fe0  }

00661464  uint32_t jump_table_661464[0x6] = 
00661464  {
00661464      [0x0] =  0x006611ff
00661468      [0x1] =  0x0066120b
0066146c      [0x2] =  0x0066121b
00661470      [0x3] =  0x0066122b
00661474      [0x4] =  0x0066123b
00661478      [0x5] =  0x0066124b
0066147c  }
0066147c  uint32_t jump_table_66147c[0x6] = 
0066147c  {
0066147c      [0x0] =  0x00661325
00661480      [0x1] =  0x00661331
00661484      [0x2] =  0x00661341
00661488      [0x3] =  0x00661351
0066148c      [0x4] =  0x00661361
00661490      [0x5] =  0x00661371
00661494  }

00661494                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

006614a0  void BlitLoopNoScale<&BlitOp_Colorize<BlitFormat_ARGB,BlitFormat_RGB>,BlitFormat_ARGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

006614a0  {
006614ad      union __inner1_1 = arg1->cDstArgs.__inner1;
006614b1      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006614b7      union __inner1 = arg1->cSrcArgs.__inner1;
006614b7      
006614bb      if (i8AlphaModifier != 0)
006614bb      {
006614c1          uint32_t nHeight = arg1->nHeight;
006614c4          int32_t edx_1 = (i8AlphaModifier + 1);
006614c7          int32_t var_28_1 = edx_1;
006614c7          
006614cb          if (nHeight > 0)
006614cb          {
006614d4              uint32_t nWidth = arg1->nWidth;
006614db              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006614de              uint32_t iStride = arg1->cDstArgs.iStride;
006614e1              int32_t edi;
006614e1              int32_t var_64_1 = edi;
006614ea              uint32_t nHeight_1 = nHeight;
0066191b              bool cond:2_1;
0066191b              
0066191b              do
0066191b              {
006614f0                  uint32_t i = nWidth;
006614f0                  
006614f6                  if (i > 0)
006614f6                  {
00661503                      char* esi_1 = (((i * 3) + __inner1_1) + 2);
00661503                      
006618f0                      do
006618f0                      {
0066150b                          int32_t ecx_3 = *(uint32_t*)((__inner1 + (i << 2)) - 4);
0066150f                          i -= 1;
00661512                          uint16_t ebx_2 = ((int16_t)(ecx_3 >> 0x10));
00661515                          uint32_t ebp_1 = ((uint32_t)*(uint8_t*)((char*)ebx_2)[1]);
0066151a                          esi_1 -= 3;
0066151f                          int32_t eax_2;
0066151f                          eax_2 = ebp_1 != 0;
0066152a                          int32_t var_8_1 = ecx_3;
0066152e                          int32_t ebp_2 = (ebp_1 + eax_2);
00661536                          int32_t var_3c_1 = ebp_2;
00661536                          
0066153a                          if (edx_1 != 0x100)
0066153a                          {
00661541                              int32_t eax_5;
00661541                              char edx_2;
00661541                              edx_2 = HIGHD(((int64_t)(ebp_2 * edx_1)));
00661541                              eax_5 = LOWD(((int64_t)(ebp_2 * edx_1)));
0066154a                              edx_1 = var_28_1;
0066154e                              eax_2 = ((eax_5 + ((uint32_t)edx_2)) >> 8);
00661551                              var_3c_1 = eax_2;
00661555                              ebp_2 = eax_2;
0066153a                          }
0066153a                          
00661559                          if (ebp_2 != 0)
00661559                          {
0066155f                              edx_1 = esi_1[0xfffffffe];
00661562                              eax_2 = esi_1[0xffffffff];
00661565                              char var_40_1 = edx_1;
00661569                              edx_1 = *(uint8_t*)esi_1;
0066156b                              uint32_t edi_2 = ((uint32_t)ecx_3);
0066156e                              uint32_t esi_2 = ((uint32_t)*(uint8_t*)((char*)ecx_3)[1]);
00661577                              uint32_t ecx_4 = ((uint32_t)ebx_2);
0066157c                              int32_t eax_7;
0066157c                              eax_7 = ecx_4 != 0;
00661585                              int32_t ecx_5 = (ecx_4 + eax_7);
00661589                              int32_t edx_4;
00661589                              edx_4 = esi_2 != 0;
0066158e                              int32_t ebp_3 = ecx_5;
00661590                              int32_t esi_3 = (esi_2 + edx_4);
00661594                              int32_t eax_8;
00661594                              eax_8 = edi_2 != 0;
00661597                              int32_t edx_5 = ecx_5;
00661599                              int32_t edi_3 = (edi_2 + eax_8);
00661599                              
0066159d                              if (esi_3 > ecx_5)
0066159f                                  ebp_3 = esi_3;
0066159d                              else if (esi_3 < ecx_5)
006615a5                                  edx_5 = esi_3;
006615a5                              
006615a9                              if (edi_3 > ebp_3)
006615ab                                  ebp_3 = edi_3;
006615a9                              else if (edi_3 < edx_5)
006615b3                                  edx_5 = edi_3;
006615b3                              
006615b7                              int32_t eax_10 = (ebp_3 - edx_5);
006615bd                              int32_t ebp_4;
006615bd                              int32_t esi_4;
006615bd                              
006615bd                              if (ebp_3 != edx_5)
006615bd                              {
006615cb                                  int32_t ebx_3 = 0;
006615d3                                  int32_t ecx_6;
006615d3                                  
006615d3                                  if (ecx_5 == ebp_3)
006615d3                                  {
006615d7                                      ecx_6 = (esi_3 - edi_3);
006615d7                                      
006615d9                                      if ((esi_3 - edi_3) < 0)
006615db                                          ebx_3 = 0x6000;
006615d3                                  }
006615d3                                  else if (esi_3 != ebp_3)
006615e4                                  {
006615f1                                      ecx_6 = (ecx_5 - esi_3);
006615f3                                      ebx_3 = 0x4000;
006615e4                                  }
006615e4                                  else
006615e4                                  {
006615e8                                      ecx_6 = (edi_3 - ecx_5);
006615ea                                      ebx_3 = 0x2000;
006615e4                                  }
006615e4                                  
00661602                                  ebp_4 = (((int64_t)(eax_10 << 8)) / ebp_3);
00661608                                  esi_4 = ((((int64_t)(ecx_6 << 0xc)) / eax_10) + ebx_3);
006615bd                              }
006615bd                              else
006615bd                              {
006615bf                                  esi_4 = 0;
006615c1                                  ebp_4 = 0;
006615bd                              }
006615bd                              
0066160a                              uint32_t eax_18 = ((uint32_t)eax_2);
0066160f                              uint32_t edi_5 = ((uint32_t)var_40_1);
00661614                              uint32_t ecx_7 = ((uint32_t)edx_1);
0066161d                              int32_t edx_10;
0066161d                              edx_10 = eax_18 != 0;
0066162c                              struct BlitArgs* eax_19 = (eax_18 + edx_10);
00661632                              int32_t edx_11;
00661632                              edx_11 = edi_5 != 0;
00661635                              struct BlitArgs* edi_6 = (edi_5 + edx_11);
0066163b                              int32_t edx_12;
0066163b                              edx_12 = ecx_7 != 0;
0066163e                              struct BlitArgs* ecx_8 = (ecx_7 + edx_12);
0066163e                              
00661642                              if (eax_19 > ecx_8)
00661644                                  ecx_8 = eax_19;
00661644                              
00661648                              if (edi_6 > ecx_8)
0066164a                                  ecx_8 = edi_6;
0066164a                              
00661654                              void* eax_39;
00661654                              void* ecx_10;
00661654                              uint32_t ebx_6;
00661654                              
00661654                              if (var_3c_1 != 0x100)
00661654                              {
00661778                                  void* var_4c;
00661778                                  void* var_48;
00661778                                  struct BlitArgs* var_44;
00661778                                  
00661778                                  if (ebp_4 != 0)
00661778                                  {
0066178c                                      int32_t eax_42;
0066178c                                      char edx_22;
0066178c                                      edx_22 = HIGHD(((int64_t)(ecx_8 * ebp_4)));
0066178c                                      eax_42 = LOWD(((int64_t)(ecx_8 * ebp_4)));
00661799                                      int32_t eax_45;
00661799                                      int32_t edx_24;
00661799                                      edx_24 = HIGHD(((int64_t)esi_4));
00661799                                      eax_45 = LOWD(((int64_t)esi_4));
006617a4                                      int32_t ebx_8 = ((eax_45 + (edx_24 & 0xfff)) >> 0xc);
006617aa                                      int32_t eax_48;
006617aa                                      int32_t edx_26;
006617aa                                      edx_26 = HIGHD(((int64_t)(ebx_8 + 1)));
006617aa                                      eax_48 = LOWD(((int64_t)(ebx_8 + 1)));
006617af                                      int32_t ebp_12 = ((eax_42 + ((uint32_t)edx_22)) >> 8);
006617b7                                      int32_t esi_10 = ((esi_4 - (((eax_48 - edx_26) >> 1) << 0xd)) * ebp_12);
006617bc                                      void* edi_17 = ((char*)ecx_8 - ebp_12);
006617c0                                      int32_t ebp_14 = (esi_10 & 0x80000fff);
006617c0                                      
006617c6                                      if (ebp_14 < 0)
006617cf                                          ebp_14 = (((ebp_14 - 1) | 0xfffff000) + 1);
006617cf                                      
006617d2                                      int32_t eax_53;
006617d2                                      int32_t edx_27;
006617d2                                      edx_27 = HIGHD(((int64_t)esi_10));
006617d2                                      eax_53 = LOWD(((int64_t)esi_10));
006617db                                      int32_t eax_55 = ((eax_53 + (edx_27 & 0xfff)) >> 0xc);
006617db                                      
006617e4                                      if (ebp_14 < 0xfffff800)
006617e6                                          eax_55 -= 1;
006617e6                                      
006617ed                                      if (ebp_14 > 0x800)
006617ef                                          eax_55 += 1;
006617ef                                      
006617f5                                      switch (ebx_8)
006617f5                                      {
006617fc                                          case 0:
006617fc                                          {
006617fc                                              var_44 = edi_17;
00661802                                              var_48 = ((char*)edi_17 + eax_55);
00661852                                              var_4c = ecx_8;
006617fc                                              break;
006617fc                                          }
00661808                                          case 1:
00661808                                          {
00661808                                              var_44 = edi_17;
0066180e                                              var_48 = ecx_8;
00661812                                              var_4c = ((char*)edi_17 - eax_55);
00661808                                              break;
00661808                                          }
00661818                                          case 2:
00661818                                          {
00661818                                              var_4c = edi_17;
0066181e                                              var_48 = ecx_8;
00661822                                              var_44 = ((char*)edi_17 + eax_55);
00661818                                              break;
00661818                                          }
00661828                                          case 3:
00661828                                          {
00661828                                              var_4c = edi_17;
0066182e                                              var_44 = ecx_8;
00661832                                              var_48 = ((char*)edi_17 - eax_55);
00661828                                              break;
00661828                                          }
00661838                                          case 4:
00661838                                          {
00661838                                              var_48 = edi_17;
0066183e                                              var_44 = ecx_8;
00661842                                              var_4c = ((char*)edi_17 + eax_55);
00661838                                              break;
00661838                                          }
00661848                                          case 5:
00661848                                          {
00661848                                              var_48 = edi_17;
0066184e                                              var_44 = ((char*)edi_17 - eax_55);
00661852                                              var_4c = ecx_8;
00661848                                              break;
00661848                                          }
006617f5                                      }
00661778                                  }
00661778                                  else
00661778                                  {
0066177a                                      var_48 = ecx_8;
0066177e                                      var_44 = ecx_8;
00661852                                      var_4c = ecx_8;
00661778                                  }
00661778                                  
00661866                                  int32_t ecx_11;
00661866                                  ecx_11 = var_4c != 0;
00661873                                  void* edx_30 = ((char*)var_4c - ecx_11);
00661877                                  int32_t eax_56;
00661877                                  eax_56 = var_48 != 0;
0066187c                                  var_4c = edx_30;
00661880                                  void* esi_12 = ((char*)var_48 - eax_56);
00661884                                  int32_t ecx_12;
00661884                                  ecx_12 = var_44 != 0;
00661887                                  var_48 = esi_12;
0066188b                                  void* edi_25 = ((char*)var_44 - ecx_12);
0066188d                                  ecx_10 = ecx_7;
00661898                                  int32_t eax_60;
00661898                                  char edx_31;
00661898                                  edx_31 = HIGHD(((int64_t)(((char*)ecx_10 - edx_30) * var_3c_1)));
00661898                                  eax_60 = LOWD(((int64_t)(((char*)ecx_10 - edx_30) * var_3c_1)));
006618a4                                  ecx_10 -= ((int8_t)((eax_60 + ((uint32_t)edx_31)) >> 8));
006618ad                                  int32_t eax_66;
006618ad                                  char edx_33;
006618ad                                  edx_33 = HIGHD(((int64_t)((eax_18 - esi_12) * var_3c_1)));
006618ad                                  eax_66 = LOWD(((int64_t)((eax_18 - esi_12) * var_3c_1)));
006618b9                                  ebx_6 = (eax_18 - ((int8_t)((eax_66 + ((uint32_t)edx_33)) >> 8)));
006618c4                                  char edx_35;
006618c4                                  edx_35 = HIGHD(((int64_t)((edi_5 - edi_25) * var_3c_1)));
006618c4                                  eax_39 = LOWD(((int64_t)((edi_5 - edi_25) * var_3c_1)));
006618cb                                  void* edx_37 = (((uint32_t)edx_35) + eax_39);
006618cd                                  eax_39 = edi_5;
006618d4                                  var_44 = edi_25;
006618d8                                  eax_39 -= ((int8_t)(edx_37 >> 8));
00661654                              }
00661654                              else
00661654                              {
0066165c                                  struct BlitArgs* var_54;
0066165c                                  struct BlitArgs* var_50;
0066165c                                  
0066165c                                  if (ebp_4 != 0)
0066165c                                  {
00661670                                      int32_t eax_22;
00661670                                      char edx_13;
00661670                                      edx_13 = HIGHD(((int64_t)(ecx_8 * ebp_4)));
00661670                                      eax_22 = LOWD(((int64_t)(ecx_8 * ebp_4)));
0066167d                                      int32_t eax_25;
0066167d                                      int32_t edx_15;
0066167d                                      edx_15 = HIGHD(((int64_t)esi_4));
0066167d                                      eax_25 = LOWD(((int64_t)esi_4));
00661688                                      int32_t ebx_5 = ((eax_25 + (edx_15 & 0xfff)) >> 0xc);
0066168e                                      int32_t eax_28;
0066168e                                      int32_t edx_17;
0066168e                                      edx_17 = HIGHD(((int64_t)(ebx_5 + 1)));
0066168e                                      eax_28 = LOWD(((int64_t)(ebx_5 + 1)));
00661693                                      int32_t ebp_6 = ((eax_22 + ((uint32_t)edx_13)) >> 8);
0066169b                                      int32_t esi_8 = ((esi_4 - (((eax_28 - edx_17) >> 1) << 0xd)) * ebp_6);
006616a0                                      struct BlitArgs* edi_8 = ((char*)ecx_8 - ebp_6);
006616a4                                      int32_t ebp_8 = (esi_8 & 0x80000fff);
006616a4                                      
006616aa                                      if (ebp_8 < 0)
006616b3                                          ebp_8 = (((ebp_8 - 1) | 0xfffff000) + 1);
006616b3                                      
006616b6                                      int32_t eax_33;
006616b6                                      int32_t edx_18;
006616b6                                      edx_18 = HIGHD(((int64_t)esi_8));
006616b6                                      eax_33 = LOWD(((int64_t)esi_8));
006616bf                                      int32_t eax_35 = ((eax_33 + (edx_18 & 0xfff)) >> 0xc);
006616bf                                      
006616c8                                      if (ebp_8 < 0xfffff800)
006616ca                                          eax_35 -= 1;
006616ca                                      
006616d1                                      if (ebp_8 > 0x800)
006616d3                                          eax_35 += 1;
006616d3                                      
006616d9                                      switch (ebx_5)
006616d9                                      {
006616e0                                          case 0:
006616e0                                          {
006616e0                                              arg1 = edi_8;
006616e6                                              var_50 = ((char*)edi_8 + eax_35);
00661736                                              var_54 = ecx_8;
006616e0                                              break;
006616e0                                          }
006616ec                                          case 1:
006616ec                                          {
006616ec                                              arg1 = edi_8;
006616f2                                              var_50 = ecx_8;
006616f6                                              var_54 = ((char*)edi_8 - eax_35);
006616ec                                              break;
006616ec                                          }
006616fc                                          case 2:
006616fc                                          {
006616fc                                              var_54 = edi_8;
00661702                                              var_50 = ecx_8;
00661706                                              arg1 = ((char*)edi_8 + eax_35);
006616fc                                              break;
006616fc                                          }
0066170c                                          case 3:
0066170c                                          {
0066170c                                              var_54 = edi_8;
00661712                                              arg1 = ecx_8;
00661716                                              var_50 = ((char*)edi_8 - eax_35);
0066170c                                              break;
0066170c                                          }
0066171c                                          case 4:
0066171c                                          {
0066171c                                              var_50 = edi_8;
00661722                                              arg1 = ecx_8;
00661726                                              var_54 = ((char*)edi_8 + eax_35);
0066171c                                              break;
0066171c                                          }
0066172c                                          case 5:
0066172c                                          {
0066172c                                              var_50 = edi_8;
00661732                                              arg1 = ((char*)edi_8 - eax_35);
00661736                                              var_54 = ecx_8;
0066172c                                              break;
0066172c                                          }
006616d9                                      }
0066165c                                  }
0066165c                                  else
0066165c                                  {
0066165e                                      var_50 = ecx_8;
00661662                                      arg1 = ecx_8;
00661736                                      var_54 = ecx_8;
0066165c                                  }
0066165c                                  
0066174a                                  int32_t eax_36;
0066174a                                  eax_36 = var_54 != 0;
0066174d                                  ecx_10 = ((char*)var_54 - eax_36);
00661753                                  int32_t eax_37;
00661753                                  eax_37 = var_50 != 0;
00661758                                  var_54 = ecx_10;
0066175c                                  void* edx_21 = ((char*)var_50 - eax_37);
00661760                                  ebx_6 = arg1 != 0;
00661765                                  var_50 = edx_21;
00661769                                  eax_39 = ((char*)arg1 - ebx_6);
0066176b                                  arg1 = eax_39;
0066176f                                  ebx_6 = edx_21;
00661654                              }
00661654                              
006618e2                              edx_1 = var_28_1;
006618e6                              esi_1[0xfffffffe] = eax_39;
006618e9                              esi_1[0xffffffff] = ebx_6;
006618ec                              *(uint8_t*)esi_1 = ecx_10;
00661559                          }
006618f0                      } while (i > 0);
006614f6                  }
006614f6                  
0066190e                  cond:2_1 = nHeight_1 != 1;
0066190f                  __inner1 += iStride_1;
00661913                  __inner1_1 += iStride;
00661917                  nHeight_1 -= 1;
0066191b              } while (cond:2_1);
006614cb          }
006614bb      }
006614a0  }

0066192b                                   90                                                                         .
0066192c  uint32_t jump_table_66192c[0x6] = 
0066192c  {
0066192c      [0x0] =  0x006616e0
00661930      [0x1] =  0x006616ec
00661934      [0x2] =  0x006616fc
00661938      [0x3] =  0x0066170c
0066193c      [0x4] =  0x0066171c
00661940      [0x5] =  0x0066172c
00661944  }
00661944  uint32_t jump_table_661944[0x6] = 
00661944  {
00661944      [0x0] =  0x006617fc
00661948      [0x1] =  0x00661808
0066194c      [0x2] =  0x00661818
00661950      [0x3] =  0x00661828
00661954      [0x4] =  0x00661838
00661958      [0x5] =  0x00661848
0066195c  }

0066195c                                                                                      cc cc cc cc                              ....

00661960  void BlitLoopNoScale<&BlitOp_Colorize<BlitFormat_XRGB,BlitFormat_ARGB>,BlitFormat_XRGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00661960  {
00661967      union __inner1 = arg1->cDstArgs.__inner1;
0066196b      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00661972      union __inner1_1 = arg1->cSrcArgs.__inner1;
00661975      union __inner1_2 = __inner1_1;
00661979      union __inner1_3 = __inner1;
00661979      
0066197d      if (i8AlphaModifier != 0)
0066197d      {
00661983          uint32_t nHeight = arg1->nHeight;
00661986          int32_t ebx = (i8AlphaModifier + 1);
00661989          int32_t var_c_1 = ebx;
00661989          
0066198d          if (nHeight > 0)
0066198d          {
00661994              uint32_t nWidth = arg1->nWidth;
00661998              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066199b              uint32_t iStride = arg1->cDstArgs.iStride;
0066199e              uint32_t nWidth_1 = nWidth;
006619aa              uint32_t nHeight_1 = nHeight;
006619ae              union __inner1_4 = __inner1_1;
00661ddd              bool cond:2_1;
00661ddd              
00661ddd              do
00661ddd              {
006619b2                  if (nWidth > 0)
006619b2                  {
006619b8                      int32_t edi = (__inner1_4 - __inner1);
006619ba                      int32_t* esi_1 = (__inner1 + (nWidth << 2));
006619bd                      int32_t var_14_1 = edi;
006619c1                      uint32_t var_30_1 = nWidth;
00661db2                      uint32_t i;
00661db2                      
00661db2                      do
00661db2                      {
006619d0                          int32_t ecx_1 = *(uint32_t*)((edi + esi_1) - 4);
006619d4                          esi_1 -= 4;
006619e5                          int32_t var_38_1 = 0x100;
006619ed                          int32_t eax_5;
006619ed                          
006619ed                          if (ebx != 0x100)
006619ed                          {
006619f4                              int32_t eax_3;
006619f4                              char edx;
006619f4                              edx = HIGHD(((int64_t)(ebx << 8)));
006619f4                              eax_3 = LOWD(((int64_t)(ebx << 8)));
006619fd                              eax_5 = ((eax_3 + ((uint32_t)edx)) >> 8);
00661a02                              var_38_1 = eax_5;
006619ed                          }
006619ed                          
00661a06                          if ((ebx == 0x100 || eax_5 != 0))
00661a06                          {
00661a0c                              struct BlitArgs* edx_2 = *(uint32_t*)esi_1;
00661a0e                              uint32_t edi_1 = ((uint32_t)ecx_1);
00661a11                              uint32_t esi_2 = ((uint32_t)*(uint8_t*)((char*)ecx_1)[1]);
00661a1d                              uint32_t ecx_4 = ((uint32_t)((int8_t)(ecx_1 >> 0x10)));
00661a22                              int32_t eax_6;
00661a22                              eax_6 = ecx_4 != 0;
00661a2b                              int32_t ecx_5 = (ecx_4 + eax_6);
00661a2f                              int32_t edx_3;
00661a2f                              edx_3 = esi_2 != 0;
00661a34                              int32_t ebx_1 = ecx_5;
00661a36                              int32_t esi_3 = (esi_2 + edx_3);
00661a3a                              int32_t eax_7;
00661a3a                              eax_7 = edi_1 != 0;
00661a3d                              int32_t edx_4 = ecx_5;
00661a3f                              int32_t edi_2 = (edi_1 + eax_7);
00661a3f                              
00661a43                              if (esi_3 > ecx_5)
00661a45                                  ebx_1 = esi_3;
00661a43                              else if (esi_3 < ecx_5)
00661a4b                                  edx_4 = esi_3;
00661a4b                              
00661a4f                              if (edi_2 > ebx_1)
00661a51                                  ebx_1 = edi_2;
00661a4f                              else if (edi_2 < edx_4)
00661a59                                  edx_4 = edi_2;
00661a59                              
00661a5d                              int32_t eax_9 = (ebx_1 - edx_4);
00661a63                              int32_t ebp_1;
00661a63                              int32_t esi_4;
00661a63                              
00661a63                              if (ebx_1 != edx_4)
00661a63                              {
00661a71                                  int32_t ebp_2 = 0;
00661a79                                  int32_t ecx_6;
00661a79                                  
00661a79                                  if (ecx_5 == ebx_1)
00661a79                                  {
00661a7d                                      ecx_6 = (esi_3 - edi_2);
00661a7d                                      
00661a7f                                      if ((esi_3 - edi_2) < 0)
00661a81                                          ebp_2 = 0x6000;
00661a79                                  }
00661a79                                  else if (esi_3 != ebx_1)
00661a8a                                  {
00661a97                                      ecx_6 = (ecx_5 - esi_3);
00661a99                                      ebp_2 = 0x4000;
00661a8a                                  }
00661a8a                                  else
00661a8a                                  {
00661a8e                                      ecx_6 = (edi_2 - ecx_5);
00661a90                                      ebp_2 = 0x2000;
00661a8a                                  }
00661a8a                                  
00661aaa                                  esi_4 = ((((int64_t)(ecx_6 << 0xc)) / eax_9) + ebp_2);
00661aac                                  ebp_1 = (((int64_t)(eax_9 << 8)) / ebx_1);
00661a63                              }
00661a63                              else
00661a63                              {
00661a65                                  esi_4 = 0;
00661a67                                  ebp_1 = 0;
00661a63                              }
00661a63                              
00661ab0                              uint32_t eax_17 = ((uint32_t)*(uint8_t*)((char*)edx_2)[1]);
00661ab5                              uint32_t edi_4 = ((uint32_t)edx_2);
00661aba                              uint32_t ecx_7 = ((uint32_t)*(uint8_t*)((char*)edx_2)[2]);
00661ac3                              int32_t edx_9;
00661ac3                              edx_9 = eax_17 != 0;
00661ad2                              int32_t eax_18 = (eax_17 + edx_9);
00661ad8                              int32_t edx_10;
00661ad8                              edx_10 = edi_4 != 0;
00661adb                              int32_t edi_5 = (edi_4 + edx_10);
00661ae1                              int32_t edx_11;
00661ae1                              edx_11 = ecx_7 != 0;
00661ae4                              int32_t ecx_8 = (ecx_7 + edx_11);
00661ae4                              
00661ae8                              if (eax_18 > ecx_8)
00661aea                                  ecx_8 = eax_18;
00661aea                              
00661aee                              if (edi_5 > ecx_8)
00661af0                                  ecx_8 = edi_5;
00661af0                              
00661afa                              if (var_38_1 != 0x100)
00661afa                              {
00661c28                                  int32_t var_44;
00661c28                                  int32_t var_40;
00661c28                                  int32_t var_3c;
00661c28                                  
00661c28                                  if (ebp_1 != 0)
00661c28                                  {
00661c3c                                      int32_t eax_39;
00661c3c                                      char edx_22;
00661c3c                                      edx_22 = HIGHD(((int64_t)(ecx_8 * ebp_1)));
00661c3c                                      eax_39 = LOWD(((int64_t)(ecx_8 * ebp_1)));
00661c49                                      int32_t eax_42;
00661c49                                      int32_t edx_24;
00661c49                                      edx_24 = HIGHD(((int64_t)esi_4));
00661c49                                      eax_42 = LOWD(((int64_t)esi_4));
00661c54                                      int32_t ebx_6 = ((eax_42 + (edx_24 & 0xfff)) >> 0xc);
00661c5a                                      int32_t eax_45;
00661c5a                                      int32_t edx_26;
00661c5a                                      edx_26 = HIGHD(((int64_t)(ebx_6 + 1)));
00661c5a                                      eax_45 = LOWD(((int64_t)(ebx_6 + 1)));
00661c5f                                      int32_t ebp_10 = ((eax_39 + ((uint32_t)edx_22)) >> 8);
00661c67                                      int32_t esi_10 = ((esi_4 - (((eax_45 - edx_26) >> 1) << 0xd)) * ebp_10);
00661c6c                                      int32_t edi_16 = (ecx_8 - ebp_10);
00661c70                                      int32_t ebp_12 = (esi_10 & 0x80000fff);
00661c70                                      
00661c76                                      if (ebp_12 < 0)
00661c7f                                          ebp_12 = (((ebp_12 - 1) | 0xfffff000) + 1);
00661c7f                                      
00661c82                                      int32_t eax_50;
00661c82                                      int32_t edx_27;
00661c82                                      edx_27 = HIGHD(((int64_t)esi_10));
00661c82                                      eax_50 = LOWD(((int64_t)esi_10));
00661c8b                                      int32_t eax_52 = ((eax_50 + (edx_27 & 0xfff)) >> 0xc);
00661c8b                                      
00661c94                                      if (ebp_12 < 0xfffff800)
00661c96                                          eax_52 -= 1;
00661c96                                      
00661c9d                                      if (ebp_12 > 0x800)
00661c9f                                          eax_52 += 1;
00661c9f                                      
00661ca5                                      switch (ebx_6)
00661ca5                                      {
00661cac                                          case 0:
00661cac                                          {
00661cac                                              var_3c = edi_16;
00661cb2                                              var_40 = (edi_16 + eax_52);
00661d02                                              var_44 = ecx_8;
00661cac                                              break;
00661cac                                          }
00661cb8                                          case 1:
00661cb8                                          {
00661cb8                                              var_3c = edi_16;
00661cbe                                              var_40 = ecx_8;
00661cc2                                              var_44 = (edi_16 - eax_52);
00661cb8                                              break;
00661cb8                                          }
00661cc8                                          case 2:
00661cc8                                          {
00661cc8                                              var_44 = edi_16;
00661cce                                              var_40 = ecx_8;
00661cd2                                              var_3c = (edi_16 + eax_52);
00661cc8                                              break;
00661cc8                                          }
00661cd8                                          case 3:
00661cd8                                          {
00661cd8                                              var_44 = edi_16;
00661cde                                              var_3c = ecx_8;
00661ce2                                              var_40 = (edi_16 - eax_52);
00661cd8                                              break;
00661cd8                                          }
00661ce8                                          case 4:
00661ce8                                          {
00661ce8                                              var_40 = edi_16;
00661cee                                              var_3c = ecx_8;
00661cf2                                              var_44 = (edi_16 + eax_52);
00661ce8                                              break;
00661ce8                                          }
00661cf8                                          case 5:
00661cf8                                          {
00661cf8                                              var_40 = edi_16;
00661cfe                                              var_3c = (edi_16 - eax_52);
00661d02                                              var_44 = ecx_8;
00661cf8                                              break;
00661cf8                                          }
00661ca5                                      }
00661c28                                  }
00661c28                                  else
00661c28                                  {
00661c2a                                      var_40 = ecx_8;
00661c2e                                      var_3c = ecx_8;
00661d02                                      var_44 = ecx_8;
00661c28                                  }
00661c28                                  
00661d16                                  int32_t eax_53;
00661d16                                  eax_53 = var_44 != 0;
00661d1f                                  int32_t edx_30 = (var_44 - eax_53);
00661d23                                  int32_t ecx_12;
00661d23                                  ecx_12 = var_40 != 0;
00661d28                                  var_44 = edx_30;
00661d2c                                  int32_t esi_12 = (var_40 - ecx_12);
00661d34                                  int32_t eax_54;
00661d34                                  eax_54 = var_3c != 0;
00661d37                                  var_40 = esi_12;
00661d3b                                  int32_t edi_24 = (var_3c - eax_54);
00661d46                                  int32_t eax_58;
00661d46                                  char edx_31;
00661d46                                  edx_31 = HIGHD(((int64_t)((ecx_7 - edx_30) * var_38_1)));
00661d46                                  eax_58 = LOWD(((int64_t)((ecx_7 - edx_30) * var_38_1)));
00661d52                                  uint32_t ecx_13;
00661d52                                  ecx_13 = (ecx_7 - ((int8_t)((eax_58 + ((uint32_t)edx_31)) >> 8)));
00661d58                                  *(uint8_t*)((char*)arg1)[2] = ecx_13;
00661d63                                  int32_t eax_64;
00661d63                                  char edx_33;
00661d63                                  edx_33 = HIGHD(((int64_t)((eax_17 - esi_12) * var_38_1)));
00661d63                                  eax_64 = LOWD(((int64_t)((eax_17 - esi_12) * var_38_1)));
00661d6f                                  uint32_t ebx_7;
00661d6f                                  ebx_7 = (eax_17 - ((int8_t)((eax_64 + ((uint32_t)edx_33)) >> 8)));
00661d71                                  *(uint8_t*)((char*)arg1)[1] = ebx_7;
00661d80                                  int32_t eax_70;
00661d80                                  char edx_35;
00661d80                                  edx_35 = HIGHD(((int64_t)((edi_4 - edi_24) * var_38_1)));
00661d80                                  eax_70 = LOWD(((int64_t)((edi_4 - edi_24) * var_38_1)));
00661d8c                                  uint32_t ebx_8;
00661d8c                                  ebx_8 = (edi_4 - ((int8_t)((eax_70 + ((uint32_t)edx_35)) >> 8)));
00661d8e                                  var_3c = edi_24;
00661d92                                  arg1 = ebx_8;
00661afa                              }
00661afa                              else
00661afa                              {
00661b02                                  int32_t var_50;
00661b02                                  int32_t var_4c;
00661b02                                  int32_t var_48;
00661b02                                  
00661b02                                  if (ebp_1 != 0)
00661b02                                  {
00661b16                                      int32_t eax_21;
00661b16                                      char edx_12;
00661b16                                      edx_12 = HIGHD(((int64_t)(ecx_8 * ebp_1)));
00661b16                                      eax_21 = LOWD(((int64_t)(ecx_8 * ebp_1)));
00661b23                                      int32_t eax_24;
00661b23                                      int32_t edx_14;
00661b23                                      edx_14 = HIGHD(((int64_t)esi_4));
00661b23                                      eax_24 = LOWD(((int64_t)esi_4));
00661b2e                                      int32_t ebx_3 = ((eax_24 + (edx_14 & 0xfff)) >> 0xc);
00661b34                                      int32_t eax_27;
00661b34                                      int32_t edx_16;
00661b34                                      edx_16 = HIGHD(((int64_t)(ebx_3 + 1)));
00661b34                                      eax_27 = LOWD(((int64_t)(ebx_3 + 1)));
00661b39                                      int32_t ebp_4 = ((eax_21 + ((uint32_t)edx_12)) >> 8);
00661b41                                      int32_t esi_8 = ((esi_4 - (((eax_27 - edx_16) >> 1) << 0xd)) * ebp_4);
00661b46                                      int32_t edi_7 = (ecx_8 - ebp_4);
00661b4a                                      int32_t ebp_6 = (esi_8 & 0x80000fff);
00661b4a                                      
00661b50                                      if (ebp_6 < 0)
00661b59                                          ebp_6 = (((ebp_6 - 1) | 0xfffff000) + 1);
00661b59                                      
00661b5c                                      int32_t eax_32;
00661b5c                                      int32_t edx_17;
00661b5c                                      edx_17 = HIGHD(((int64_t)esi_8));
00661b5c                                      eax_32 = LOWD(((int64_t)esi_8));
00661b65                                      int32_t eax_34 = ((eax_32 + (edx_17 & 0xfff)) >> 0xc);
00661b65                                      
00661b6e                                      if (ebp_6 < 0xfffff800)
00661b70                                          eax_34 -= 1;
00661b70                                      
00661b77                                      if (ebp_6 > 0x800)
00661b79                                          eax_34 += 1;
00661b79                                      
00661b7f                                      switch (ebx_3)
00661b7f                                      {
00661b86                                          case 0:
00661b86                                          {
00661b86                                              var_50 = edi_7;
00661b8c                                              var_48 = (edi_7 + eax_34);
00661bdc                                              var_4c = ecx_8;
00661b86                                              break;
00661b86                                          }
00661b92                                          case 1:
00661b92                                          {
00661b92                                              var_50 = edi_7;
00661b98                                              var_48 = ecx_8;
00661b9c                                              var_4c = (edi_7 - eax_34);
00661b92                                              break;
00661b92                                          }
00661ba2                                          case 2:
00661ba2                                          {
00661ba2                                              var_4c = edi_7;
00661ba8                                              var_48 = ecx_8;
00661bac                                              var_50 = (edi_7 + eax_34);
00661ba2                                              break;
00661ba2                                          }
00661bb2                                          case 3:
00661bb2                                          {
00661bb2                                              var_4c = edi_7;
00661bb8                                              var_50 = ecx_8;
00661bbc                                              var_48 = (edi_7 - eax_34);
00661bb2                                              break;
00661bb2                                          }
00661bc2                                          case 4:
00661bc2                                          {
00661bc2                                              var_48 = edi_7;
00661bc8                                              var_50 = ecx_8;
00661bcc                                              var_4c = (edi_7 + eax_34);
00661bc2                                              break;
00661bc2                                          }
00661bd2                                          case 5:
00661bd2                                          {
00661bd2                                              var_48 = edi_7;
00661bd8                                              var_50 = (edi_7 - eax_34);
00661bdc                                              var_4c = ecx_8;
00661bd2                                              break;
00661bd2                                          }
00661b7f                                      }
00661b02                                  }
00661b02                                  else
00661b02                                  {
00661b04                                      var_48 = ecx_8;
00661b08                                      var_50 = ecx_8;
00661bdc                                      var_4c = ecx_8;
00661b02                                  }
00661b02                                  
00661bec                                  int32_t ecx_9;
00661bec                                  ecx_9 = var_4c != 0;
00661bf1                                  int32_t eax_36 = (var_4c - ecx_9);
00661bf9                                  int32_t edx_19;
00661bf9                                  edx_19 = var_48 != 0;
00661bfe                                  var_4c = eax_36;
00661c02                                  *(uint8_t*)((char*)arg1)[2] = eax_36;
00661c06                                  int32_t ecx_11 = (var_48 - edx_19);
00661c0a                                  int32_t ebx_4;
00661c0a                                  ebx_4 = var_50 != 0;
00661c0f                                  var_48 = ecx_11;
00661c13                                  *(uint8_t*)((char*)arg1)[1] = ecx_11;
00661c17                                  int32_t edx_21 = (var_50 - ebx_4);
00661c19                                  var_50 = edx_21;
00661c1d                                  arg1 = edx_21;
00661afa                              }
00661afa                              
00661d9e                              edi = var_14_1;
00661da2                              nWidth = nWidth_1;
00661da6                              ebx = var_c_1;
00661daa                              *(uint32_t*)esi_1 = arg1;
00661a06                          }
00661a06                          
00661dae                          i = var_30_1;
00661dae                          var_30_1 -= 1;
00661db2                      } while (i != 1);
00661db8                      __inner1 = __inner1_3;
006619b2                  }
006619b2                  
00661dcc                  __inner1_4 = (__inner1_2 + iStride_1);
00661dce                  __inner1 += iStride;
00661dd0                  cond:2_1 = nHeight_1 != 1;
00661dd1                  __inner1_2 = __inner1_4;
00661dd5                  __inner1_3 = __inner1;
00661dd9                  nHeight_1 -= 1;
00661ddd              } while (cond:2_1);
0066198d          }
0066197d      }
00661960  }

006619c7                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
00661ded                                         8d 49 00                                                               .I.
00661df0  uint32_t jump_table_661df0[0x6] = 
00661df0  {
00661df0      [0x0] =  0x00661b86
00661df4      [0x1] =  0x00661b92
00661df8      [0x2] =  0x00661ba2
00661dfc      [0x3] =  0x00661bb2
00661e00      [0x4] =  0x00661bc2
00661e04      [0x5] =  0x00661bd2
00661e08  }
00661e08  uint32_t jump_table_661e08[0x6] = 
00661e08  {
00661e08      [0x0] =  0x00661cac
00661e0c      [0x1] =  0x00661cb8
00661e10      [0x2] =  0x00661cc8
00661e14      [0x3] =  0x00661cd8
00661e18      [0x4] =  0x00661ce8
00661e1c      [0x5] =  0x00661cf8
00661e20  }

00661e20  void BlitLoopNoScale<&BlitOp_Colorize<BlitFormat_XRGB,BlitFormat_RGB>,BlitFormat_XRGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00661e20  {
00661e2a      union __inner1_1 = arg1->cDstArgs.__inner1;
00661e2e      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00661e34      union __inner1 = arg1->cSrcArgs.__inner1;
00661e38      union __inner1_2 = __inner1_1;
00661e38      
00661e3c      if (i8AlphaModifier != 0)
00661e3c      {
00661e42          uint32_t nHeight = arg1->nHeight;
00661e45          int32_t ebx = (i8AlphaModifier + 1);
00661e48          int32_t var_10_1 = ebx;
00661e48          
00661e4c          if (nHeight > 0)
00661e4c          {
00661e54              uint32_t nWidth = arg1->nWidth;
00661e5b              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00661e61              int32_t edi;
00661e61              int32_t var_5c_1 = edi;
00661e66              uint32_t iStride = arg1->cDstArgs.iStride;
00661e6a              uint32_t nHeight_1 = nHeight;
0066228b              bool cond:2_1;
0066228b              
0066228b              do
0066228b              {
00661e70                  uint32_t i = nWidth;
00661e70                  
00661e76                  if (i > 0)
00661e76                  {
00661e7f                      char* esi_1 = (((i * 3) + __inner1_1) + 2);
00661e7f                      
00662260                      do
00662260                      {
00661e87                          int32_t ecx_2 = *(uint32_t*)((__inner1 + (i << 2)) - 4);
00661e8b                          i -= 1;
00661e8c                          esi_1 -= 3;
00661ea1                          uint32_t var_34_1 = 0x100;
00661ea9                          uint32_t eax_1;
00661ea9                          
00661ea9                          if (ebx != 0x100)
00661ea9                          {
00661eb0                              int32_t eax_4;
00661eb0                              char edx;
00661eb0                              edx = HIGHD(((int64_t)(ebx << 8)));
00661eb0                              eax_4 = LOWD(((int64_t)(ebx << 8)));
00661eb9                              eax_1 = ((eax_4 + ((uint32_t)edx)) >> 8);
00661ebe                              var_34_1 = eax_1;
00661ea9                          }
00661ea9                          
00661ec2                          if ((ebx == 0x100 || eax_1 != 0))
00661ec2                          {
00661ec8                              eax_1 = esi_1[0xfffffffe];
00661ecb                              union edx_1;
00661ecb                              *(uint8_t*)((char*)edx_1 + 0) = esi_1[0xffffffff];
00661ece                              uint32_t edi_2 = ((uint32_t)ecx_2);
00661ed1                              char var_38_1 = eax_1;
00661ed5                              eax_1 = *(uint8_t*)esi_1;
00661ed7                              uint32_t esi_2 = ((uint32_t)*(uint8_t*)((char*)ecx_2)[1]);
00661ee7                              uint32_t ecx_5 = ((uint32_t)((int8_t)(ecx_2 >> 0x10)));
00661eec                              int32_t edx_2;
00661eec                              edx_2 = ecx_5 != 0;
00661ef5                              int32_t ecx_6 = (ecx_5 + edx_2);
00661ef9                              int32_t eax_6;
00661ef9                              eax_6 = esi_2 != 0;
00661efe                              int32_t ebp_1 = ecx_6;
00661f00                              int32_t esi_3 = (esi_2 + eax_6);
00661f04                              int32_t edx_3;
00661f04                              edx_3 = edi_2 != 0;
00661f07                              int32_t edi_3 = (edi_2 + edx_3);
00661f0b                              int32_t edx_4 = ecx_6;
00661f0b                              
00661f0d                              if (esi_3 > ecx_6)
00661f0f                                  ebp_1 = esi_3;
00661f0d                              else if (esi_3 < ecx_6)
00661f15                                  edx_4 = esi_3;
00661f15                              
00661f19                              if (edi_3 > ebp_1)
00661f1b                                  ebp_1 = edi_3;
00661f19                              else if (edi_3 < edx_4)
00661f23                                  edx_4 = edi_3;
00661f23                              
00661f27                              int32_t eax_8 = (ebp_1 - edx_4);
00661f2d                              int32_t ebp_2;
00661f2d                              int32_t esi_4;
00661f2d                              
00661f2d                              if (ebp_1 != edx_4)
00661f2d                              {
00661f3b                                  int32_t ebx_1 = 0;
00661f43                                  int32_t ecx_7;
00661f43                                  
00661f43                                  if (ecx_6 == ebp_1)
00661f43                                  {
00661f47                                      ecx_7 = (esi_3 - edi_3);
00661f47                                      
00661f49                                      if ((esi_3 - edi_3) < 0)
00661f4b                                          ebx_1 = 0x6000;
00661f43                                  }
00661f43                                  else if (esi_3 != ebp_1)
00661f54                                  {
00661f61                                      ecx_7 = (ecx_6 - esi_3);
00661f63                                      ebx_1 = 0x4000;
00661f54                                  }
00661f54                                  else
00661f54                                  {
00661f58                                      ecx_7 = (edi_3 - ecx_6);
00661f5a                                      ebx_1 = 0x2000;
00661f54                                  }
00661f54                                  
00661f72                                  ebp_2 = (((int64_t)(eax_8 << 8)) / ebp_1);
00661f78                                  esi_4 = ((((int64_t)(ecx_7 << 0xc)) / eax_8) + ebx_1);
00661f2d                              }
00661f2d                              else
00661f2d                              {
00661f2f                                  esi_4 = 0;
00661f31                                  ebp_2 = 0;
00661f2d                              }
00661f2d                              
00661f7a                              uint32_t eax_16 = ((uint32_t)*(uint8_t*)((char*)edx_1 + 0));
00661f7f                              uint32_t edi_5 = ((uint32_t)var_38_1);
00661f84                              uint32_t ecx_8 = ((uint32_t)eax_1);
00661f8d                              int32_t edx_9;
00661f8d                              edx_9 = eax_16 != 0;
00661f9c                              struct BlitArgs* eax_17 = (eax_16 + edx_9);
00661fa2                              int32_t edx_10;
00661fa2                              edx_10 = edi_5 != 0;
00661fa5                              struct BlitArgs* edi_6 = (edi_5 + edx_10);
00661fab                              int32_t edx_11;
00661fab                              edx_11 = ecx_8 != 0;
00661fae                              struct BlitArgs* ecx_9 = (ecx_8 + edx_11);
00661fae                              
00661fb2                              if (eax_17 > ecx_9)
00661fb4                                  ecx_9 = eax_17;
00661fb4                              
00661fb8                              if (edi_6 > ecx_9)
00661fba                                  ecx_9 = edi_6;
00661fba                              
00661fc4                              void* ecx_11;
00661fc4                              uint32_t ebx_4;
00661fc4                              
00661fc4                              if (var_34_1 != 0x100)
00661fc4                              {
006620e8                                  void* var_44;
006620e8                                  void* var_40;
006620e8                                  struct BlitArgs* var_3c;
006620e8                                  
006620e8                                  if (ebp_2 != 0)
006620e8                                  {
006620fc                                      int32_t eax_39;
006620fc                                      char edx_21;
006620fc                                      edx_21 = HIGHD(((int64_t)(ecx_9 * ebp_2)));
006620fc                                      eax_39 = LOWD(((int64_t)(ecx_9 * ebp_2)));
00662109                                      int32_t eax_42;
00662109                                      int32_t edx_23;
00662109                                      edx_23 = HIGHD(((int64_t)esi_4));
00662109                                      eax_42 = LOWD(((int64_t)esi_4));
00662114                                      int32_t ebx_6 = ((eax_42 + (edx_23 & 0xfff)) >> 0xc);
0066211a                                      int32_t eax_45;
0066211a                                      int32_t edx_25;
0066211a                                      edx_25 = HIGHD(((int64_t)(ebx_6 + 1)));
0066211a                                      eax_45 = LOWD(((int64_t)(ebx_6 + 1)));
0066211f                                      int32_t ebp_10 = ((eax_39 + ((uint32_t)edx_21)) >> 8);
00662127                                      int32_t esi_10 = ((esi_4 - (((eax_45 - edx_25) >> 1) << 0xd)) * ebp_10);
0066212c                                      void* edi_17 = ((char*)ecx_9 - ebp_10);
00662130                                      int32_t ebp_12 = (esi_10 & 0x80000fff);
00662130                                      
00662136                                      if (ebp_12 < 0)
0066213f                                          ebp_12 = (((ebp_12 - 1) | 0xfffff000) + 1);
0066213f                                      
00662142                                      int32_t eax_50;
00662142                                      int32_t edx_26;
00662142                                      edx_26 = HIGHD(((int64_t)esi_10));
00662142                                      eax_50 = LOWD(((int64_t)esi_10));
0066214b                                      int32_t eax_52 = ((eax_50 + (edx_26 & 0xfff)) >> 0xc);
0066214b                                      
00662154                                      if (ebp_12 < 0xfffff800)
00662156                                          eax_52 -= 1;
00662156                                      
0066215d                                      if (ebp_12 > 0x800)
0066215f                                          eax_52 += 1;
0066215f                                      
00662165                                      switch (ebx_6)
00662165                                      {
0066216c                                          case 0:
0066216c                                          {
0066216c                                              var_3c = edi_17;
00662172                                              var_40 = ((char*)edi_17 + eax_52);
006621c2                                              var_44 = ecx_9;
0066216c                                              break;
0066216c                                          }
00662178                                          case 1:
00662178                                          {
00662178                                              var_3c = edi_17;
0066217e                                              var_40 = ecx_9;
00662182                                              var_44 = ((char*)edi_17 - eax_52);
00662178                                              break;
00662178                                          }
00662188                                          case 2:
00662188                                          {
00662188                                              var_44 = edi_17;
0066218e                                              var_40 = ecx_9;
00662192                                              var_3c = ((char*)edi_17 + eax_52);
00662188                                              break;
00662188                                          }
00662198                                          case 3:
00662198                                          {
00662198                                              var_44 = edi_17;
0066219e                                              var_3c = ecx_9;
006621a2                                              var_40 = ((char*)edi_17 - eax_52);
00662198                                              break;
00662198                                          }
006621a8                                          case 4:
006621a8                                          {
006621a8                                              var_40 = edi_17;
006621ae                                              var_3c = ecx_9;
006621b2                                              var_44 = ((char*)edi_17 + eax_52);
006621a8                                              break;
006621a8                                          }
006621b8                                          case 5:
006621b8                                          {
006621b8                                              var_40 = edi_17;
006621be                                              var_3c = ((char*)edi_17 - eax_52);
006621c2                                              var_44 = ecx_9;
006621b8                                              break;
006621b8                                          }
00662165                                      }
006620e8                                  }
006620e8                                  else
006620e8                                  {
006620ea                                      var_40 = ecx_9;
006620ee                                      var_3c = ecx_9;
006621c2                                      var_44 = ecx_9;
006620e8                                  }
006620e8                                  
006621d6                                  int32_t ecx_12;
006621d6                                  ecx_12 = var_44 != 0;
006621e3                                  void* edx_29 = ((char*)var_44 - ecx_12);
006621e7                                  int32_t eax_53;
006621e7                                  eax_53 = var_40 != 0;
006621ec                                  var_44 = edx_29;
006621f0                                  void* esi_12 = ((char*)var_40 - eax_53);
006621f4                                  int32_t ecx_13;
006621f4                                  ecx_13 = var_3c != 0;
006621f7                                  var_40 = esi_12;
006621fb                                  void* edi_25 = ((char*)var_3c - ecx_13);
006621fd                                  ecx_11 = ecx_8;
00662208                                  int32_t eax_57;
00662208                                  char edx_30;
00662208                                  edx_30 = HIGHD(((int64_t)(((char*)ecx_11 - edx_29) * var_34_1)));
00662208                                  eax_57 = LOWD(((int64_t)(((char*)ecx_11 - edx_29) * var_34_1)));
00662214                                  ecx_11 -= ((int8_t)((eax_57 + ((uint32_t)edx_30)) >> 8));
0066221d                                  int32_t eax_63;
0066221d                                  char edx_32;
0066221d                                  edx_32 = HIGHD(((int64_t)((eax_16 - esi_12) * var_34_1)));
0066221d                                  eax_63 = LOWD(((int64_t)((eax_16 - esi_12) * var_34_1)));
00662229                                  ebx_4 = (eax_16 - ((int8_t)((eax_63 + ((uint32_t)edx_32)) >> 8)));
00662234                                  char edx_34;
00662234                                  edx_34 = HIGHD(((int64_t)((edi_5 - edi_25) * var_34_1)));
00662234                                  eax_1 = LOWD(((int64_t)((edi_5 - edi_25) * var_34_1)));
0066223b                                  uint32_t edx_36 = (((uint32_t)edx_34) + eax_1);
0066223d                                  eax_1 = edi_5;
00662244                                  var_3c = edi_25;
00662248                                  eax_1 -= ((int8_t)(edx_36 >> 8));
00661fc4                              }
00661fc4                              else
00661fc4                              {
00661fcc                                  struct BlitArgs* var_4c;
00661fcc                                  struct BlitArgs* var_48;
00661fcc                                  
00661fcc                                  if (ebp_2 != 0)
00661fcc                                  {
00661fe0                                      int32_t eax_20;
00661fe0                                      char edx_12;
00661fe0                                      edx_12 = HIGHD(((int64_t)(ecx_9 * ebp_2)));
00661fe0                                      eax_20 = LOWD(((int64_t)(ecx_9 * ebp_2)));
00661fed                                      int32_t eax_23;
00661fed                                      int32_t edx_14;
00661fed                                      edx_14 = HIGHD(((int64_t)esi_4));
00661fed                                      eax_23 = LOWD(((int64_t)esi_4));
00661ff8                                      int32_t ebx_3 = ((eax_23 + (edx_14 & 0xfff)) >> 0xc);
00661ffe                                      int32_t eax_26;
00661ffe                                      int32_t edx_16;
00661ffe                                      edx_16 = HIGHD(((int64_t)(ebx_3 + 1)));
00661ffe                                      eax_26 = LOWD(((int64_t)(ebx_3 + 1)));
00662003                                      int32_t ebp_4 = ((eax_20 + ((uint32_t)edx_12)) >> 8);
0066200b                                      int32_t esi_8 = ((esi_4 - (((eax_26 - edx_16) >> 1) << 0xd)) * ebp_4);
00662010                                      struct BlitArgs* edi_8 = ((char*)ecx_9 - ebp_4);
00662014                                      int32_t ebp_6 = (esi_8 & 0x80000fff);
00662014                                      
0066201a                                      if (ebp_6 < 0)
00662023                                          ebp_6 = (((ebp_6 - 1) | 0xfffff000) + 1);
00662023                                      
00662026                                      int32_t eax_31;
00662026                                      int32_t edx_17;
00662026                                      edx_17 = HIGHD(((int64_t)esi_8));
00662026                                      eax_31 = LOWD(((int64_t)esi_8));
0066202f                                      int32_t eax_33 = ((eax_31 + (edx_17 & 0xfff)) >> 0xc);
0066202f                                      
00662038                                      if (ebp_6 < 0xfffff800)
0066203a                                          eax_33 -= 1;
0066203a                                      
00662041                                      if (ebp_6 > 0x800)
00662043                                          eax_33 += 1;
00662043                                      
00662049                                      switch (ebx_3)
00662049                                      {
00662050                                          case 0:
00662050                                          {
00662050                                              arg1 = edi_8;
00662056                                              var_48 = ((char*)edi_8 + eax_33);
006620a6                                              var_4c = ecx_9;
00662050                                              break;
00662050                                          }
0066205c                                          case 1:
0066205c                                          {
0066205c                                              arg1 = edi_8;
00662062                                              var_48 = ecx_9;
00662066                                              var_4c = ((char*)edi_8 - eax_33);
0066205c                                              break;
0066205c                                          }
0066206c                                          case 2:
0066206c                                          {
0066206c                                              var_4c = edi_8;
00662072                                              var_48 = ecx_9;
00662076                                              arg1 = ((char*)edi_8 + eax_33);
0066206c                                              break;
0066206c                                          }
0066207c                                          case 3:
0066207c                                          {
0066207c                                              var_4c = edi_8;
00662082                                              arg1 = ecx_9;
00662086                                              var_48 = ((char*)edi_8 - eax_33);
0066207c                                              break;
0066207c                                          }
0066208c                                          case 4:
0066208c                                          {
0066208c                                              var_48 = edi_8;
00662092                                              arg1 = ecx_9;
00662096                                              var_4c = ((char*)edi_8 + eax_33);
0066208c                                              break;
0066208c                                          }
0066209c                                          case 5:
0066209c                                          {
0066209c                                              var_48 = edi_8;
006620a2                                              arg1 = ((char*)edi_8 - eax_33);
006620a6                                              var_4c = ecx_9;
0066209c                                              break;
0066209c                                          }
00662049                                      }
00661fcc                                  }
00661fcc                                  else
00661fcc                                  {
00661fce                                      var_48 = ecx_9;
00661fd2                                      arg1 = ecx_9;
006620a6                                      var_4c = ecx_9;
00661fcc                                  }
00661fcc                                  
006620ba                                  int32_t eax_34;
006620ba                                  eax_34 = var_4c != 0;
006620bd                                  ecx_11 = ((char*)var_4c - eax_34);
006620c3                                  int32_t eax_35;
006620c3                                  eax_35 = var_48 != 0;
006620c8                                  var_4c = ecx_11;
006620cc                                  void* edx_20 = ((char*)var_48 - eax_35);
006620d0                                  ebx_4 = arg1 != 0;
006620d5                                  var_48 = edx_20;
006620d9                                  eax_1 = ((char*)arg1 - ebx_4);
006620db                                  arg1 = eax_1;
006620df                                  ebx_4 = edx_20;
00661fc4                              }
00661fc4                              
00662252                              esi_1[0xffffffff] = ebx_4;
00662255                              ebx = var_10_1;
00662259                              esi_1[0xfffffffe] = eax_1;
0066225c                              *(uint8_t*)esi_1 = ecx_11;
00661ec2                          }
00662260                      } while (i > 0);
00661e76                  }
00661e76                  
00662278                  __inner1 += iStride_1;
00662280                  __inner1_1 = (__inner1_2 + iStride);
00662282                  cond:2_1 = nHeight_1 != 1;
00662283                  __inner1_2 = __inner1_1;
00662287                  nHeight_1 -= 1;
0066228b              } while (cond:2_1);
00661e4c          }
00661e3c      }
00661e20  }

0066229b                                                                                   90                                         .
0066229c  uint32_t jump_table_66229c[0x6] = 
0066229c  {
0066229c      [0x0] =  0x00662050
006622a0      [0x1] =  0x0066205c
006622a4      [0x2] =  0x0066206c
006622a8      [0x3] =  0x0066207c
006622ac      [0x4] =  0x0066208c
006622b0      [0x5] =  0x0066209c
006622b4  }
006622b4  uint32_t jump_table_6622b4[0x6] = 
006622b4  {
006622b4      [0x0] =  0x0066216c
006622b8      [0x1] =  0x00662178
006622bc      [0x2] =  0x00662188
006622c0      [0x3] =  0x00662198
006622c4      [0x4] =  0x006621a8
006622c8      [0x5] =  0x006621b8
006622cc  }

006622cc                                      cc cc cc cc                                                              ....

006622d0  void BlitLoopNoScale<&BlitOp_Colorize<BlitFormat_RGB,BlitFormat_ARGB>,BlitFormat_RGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

006622d0  {
006622d7      union __inner1_1 = arg1->cSrcArgs.__inner1;
006622de      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006622e4      union __inner1_2 = __inner1_1;
006622e8      union __inner1 = arg1->cDstArgs.__inner1;
006622e8      
006622ec      if (i8AlphaModifier != 0)
006622ec      {
006622f2          uint32_t nHeight = arg1->nHeight;
006622f2          
006622fc          if (nHeight > 0)
006622fc          {
00662302              uint32_t ebx;
00662302              uint32_t var_58_1 = ebx;
00662305              uint32_t nWidth = arg1->nWidth;
0066230c              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00662316              uint32_t iStride = arg1->cDstArgs.iStride;
0066231a              uint32_t nHeight_1 = nHeight;
0066231e              int32_t edi_1 = (i8AlphaModifier + 1);
0066274f              bool cond:2_1;
0066274f              
0066274f              do
0066274f              {
00662320                  uint32_t i = nWidth;
00662320                  
00662326                  if (i > 0)
00662326                  {
0066232f                      void* ecx_2 = (((i * 3) + __inner1_1) + 2);
0066232f                      
00662724                      do
00662724                      {
00662333                          *(uint8_t*)((char*)__inner1_1 + 0) = *(uint8_t*)((char*)ecx_2 - 4);
00662336                          uint32_t eax_1;
00662336                          eax_1 = *(uint8_t*)((char*)ecx_2 - 3);
00662339                          ebx = *(uint8_t*)((char*)ecx_2 - 5);
0066233c                          ecx_2 -= 3;
0066233f                          i -= 1;
00662352                          char var_2e_1 = eax_1;
00662356                          uint32_t var_38_1 = 0x100;
00662356                          
0066235e                          if (edi_1 != 0x100)
0066235e                          {
00662365                              int32_t eax_4;
00662365                              char edx;
00662365                              edx = HIGHD(((int64_t)(edi_1 << 8)));
00662365                              eax_4 = LOWD(((int64_t)(edi_1 << 8)));
0066236e                              eax_1 = ((eax_4 + ((uint32_t)edx)) >> 8);
00662373                              var_38_1 = eax_1;
0066235e                          }
0066235e                          
00662377                          if ((edi_1 == 0x100 || eax_1 != 0))
00662377                          {
00662381                              struct BlitArgs* edx_1 = *(uint32_t*)(__inner1 + (i << 2));
00662384                              uint32_t ecx_4 = ((uint32_t)var_2e_1);
00662389                              uint32_t esi_1 = ((uint32_t)*(uint8_t*)((char*)__inner1_1 + 0));
00662392                              int32_t eax_6;
00662392                              eax_6 = ecx_4 != 0;
0066239b                              uint32_t edi_2 = ((uint32_t)ebx);
0066239e                              int32_t ecx_5 = (ecx_4 + eax_6);
006623a2                              int32_t edx_2;
006623a2                              edx_2 = esi_1 != 0;
006623a7                              int32_t ebx_1 = ecx_5;
006623a9                              int32_t esi_2 = (esi_1 + edx_2);
006623ad                              int32_t eax_7;
006623ad                              eax_7 = edi_2 != 0;
006623b0                              int32_t edx_3 = ecx_5;
006623b2                              int32_t edi_3 = (edi_2 + eax_7);
006623b2                              
006623b6                              if (esi_2 > ecx_5)
006623b8                                  ebx_1 = esi_2;
006623b6                              else if (esi_2 < ecx_5)
006623be                                  edx_3 = esi_2;
006623be                              
006623c2                              if (edi_3 > ebx_1)
006623c4                                  ebx_1 = edi_3;
006623c2                              else if (edi_3 < edx_3)
006623cc                                  edx_3 = edi_3;
006623cc                              
006623d0                              int32_t eax_9 = (ebx_1 - edx_3);
006623d6                              int32_t ebp_1;
006623d6                              int32_t esi_3;
006623d6                              
006623d6                              if (ebx_1 != edx_3)
006623d6                              {
006623e4                                  int32_t ebp_2 = 0;
006623ec                                  int32_t ecx_6;
006623ec                                  
006623ec                                  if (ecx_5 == ebx_1)
006623ec                                  {
006623f0                                      ecx_6 = (esi_2 - edi_3);
006623f0                                      
006623f2                                      if ((esi_2 - edi_3) < 0)
006623f4                                          ebp_2 = 0x6000;
006623ec                                  }
006623ec                                  else if (esi_2 != ebx_1)
006623fd                                  {
0066240a                                      ecx_6 = (ecx_5 - esi_2);
0066240c                                      ebp_2 = 0x4000;
006623fd                                  }
006623fd                                  else
006623fd                                  {
00662401                                      ecx_6 = (edi_3 - ecx_5);
00662403                                      ebp_2 = 0x2000;
006623fd                                  }
006623fd                                  
0066241d                                  esi_3 = ((((int64_t)(ecx_6 << 0xc)) / eax_9) + ebp_2);
0066241f                                  ebp_1 = (((int64_t)(eax_9 << 8)) / ebx_1);
006623d6                              }
006623d6                              else
006623d6                              {
006623d8                                  esi_3 = 0;
006623da                                  ebp_1 = 0;
006623d6                              }
006623d6                              
00662423                              uint32_t eax_17 = ((uint32_t)*(uint8_t*)((char*)edx_1)[1]);
00662428                              uint32_t edi_5 = ((uint32_t)edx_1);
0066242d                              uint32_t ecx_7 = ((uint32_t)*(uint8_t*)((char*)edx_1)[2]);
00662436                              int32_t edx_8;
00662436                              edx_8 = eax_17 != 0;
00662445                              int32_t eax_18 = (eax_17 + edx_8);
0066244b                              int32_t edx_9;
0066244b                              edx_9 = edi_5 != 0;
0066244e                              int32_t edi_6 = (edi_5 + edx_9);
00662454                              int32_t edx_10;
00662454                              edx_10 = ecx_7 != 0;
00662457                              int32_t ecx_8 = (ecx_7 + edx_10);
00662457                              
0066245b                              if (eax_18 > ecx_8)
0066245d                                  ecx_8 = eax_18;
0066245d                              
00662461                              if (edi_6 > ecx_8)
00662463                                  ecx_8 = edi_6;
00662463                              
0066246d                              if (var_38_1 != 0x100)
0066246d                              {
0066259b                                  int32_t var_44;
0066259b                                  int32_t var_40;
0066259b                                  int32_t var_3c;
0066259b                                  
0066259b                                  if (ebp_1 != 0)
0066259b                                  {
006625af                                      int32_t eax_39;
006625af                                      char edx_21;
006625af                                      edx_21 = HIGHD(((int64_t)(ecx_8 * ebp_1)));
006625af                                      eax_39 = LOWD(((int64_t)(ecx_8 * ebp_1)));
006625bc                                      int32_t eax_42;
006625bc                                      int32_t edx_23;
006625bc                                      edx_23 = HIGHD(((int64_t)esi_3));
006625bc                                      eax_42 = LOWD(((int64_t)esi_3));
006625c7                                      int32_t ebx_5 = ((eax_42 + (edx_23 & 0xfff)) >> 0xc);
006625cd                                      int32_t eax_45;
006625cd                                      int32_t edx_25;
006625cd                                      edx_25 = HIGHD(((int64_t)(ebx_5 + 1)));
006625cd                                      eax_45 = LOWD(((int64_t)(ebx_5 + 1)));
006625d2                                      int32_t ebp_10 = ((eax_39 + ((uint32_t)edx_21)) >> 8);
006625da                                      int32_t esi_9 = ((esi_3 - (((eax_45 - edx_25) >> 1) << 0xd)) * ebp_10);
006625df                                      int32_t edi_17 = (ecx_8 - ebp_10);
006625e3                                      int32_t ebp_12 = (esi_9 & 0x80000fff);
006625e3                                      
006625e9                                      if (ebp_12 < 0)
006625f2                                          ebp_12 = (((ebp_12 - 1) | 0xfffff000) + 1);
006625f2                                      
006625f5                                      int32_t eax_50;
006625f5                                      int32_t edx_26;
006625f5                                      edx_26 = HIGHD(((int64_t)esi_9));
006625f5                                      eax_50 = LOWD(((int64_t)esi_9));
006625fe                                      int32_t eax_52 = ((eax_50 + (edx_26 & 0xfff)) >> 0xc);
006625fe                                      
00662607                                      if (ebp_12 < 0xfffff800)
00662609                                          eax_52 -= 1;
00662609                                      
00662610                                      if (ebp_12 > 0x800)
00662612                                          eax_52 += 1;
00662612                                      
00662618                                      switch (ebx_5)
00662618                                      {
0066261f                                          case 0:
0066261f                                          {
0066261f                                              var_3c = edi_17;
00662625                                              var_40 = (edi_17 + eax_52);
00662675                                              var_44 = ecx_8;
0066261f                                              break;
0066261f                                          }
0066262b                                          case 1:
0066262b                                          {
0066262b                                              var_3c = edi_17;
00662631                                              var_40 = ecx_8;
00662635                                              var_44 = (edi_17 - eax_52);
0066262b                                              break;
0066262b                                          }
0066263b                                          case 2:
0066263b                                          {
0066263b                                              var_44 = edi_17;
00662641                                              var_40 = ecx_8;
00662645                                              var_3c = (edi_17 + eax_52);
0066263b                                              break;
0066263b                                          }
0066264b                                          case 3:
0066264b                                          {
0066264b                                              var_44 = edi_17;
00662651                                              var_3c = ecx_8;
00662655                                              var_40 = (edi_17 - eax_52);
0066264b                                              break;
0066264b                                          }
0066265b                                          case 4:
0066265b                                          {
0066265b                                              var_40 = edi_17;
00662661                                              var_3c = ecx_8;
00662665                                              var_44 = (edi_17 + eax_52);
0066265b                                              break;
0066265b                                          }
0066266b                                          case 5:
0066266b                                          {
0066266b                                              var_40 = edi_17;
00662671                                              var_3c = (edi_17 - eax_52);
00662675                                              var_44 = ecx_8;
0066266b                                              break;
0066266b                                          }
00662618                                      }
0066259b                                  }
0066259b                                  else
0066259b                                  {
0066259d                                      var_40 = ecx_8;
006625a1                                      var_3c = ecx_8;
00662675                                      var_44 = ecx_8;
0066259b                                  }
0066259b                                  
00662689                                  int32_t eax_53;
00662689                                  eax_53 = var_44 != 0;
00662692                                  int32_t edx_29 = (var_44 - eax_53);
00662696                                  int32_t ecx_12;
00662696                                  ecx_12 = var_40 != 0;
0066269b                                  var_44 = edx_29;
0066269f                                  int32_t esi_11 = (var_40 - ecx_12);
006626a7                                  int32_t eax_54;
006626a7                                  eax_54 = var_3c != 0;
006626aa                                  var_40 = esi_11;
006626ae                                  int32_t edi_25 = (var_3c - eax_54);
006626b9                                  int32_t eax_58;
006626b9                                  char edx_30;
006626b9                                  edx_30 = HIGHD(((int64_t)((ecx_7 - edx_29) * var_38_1)));
006626b9                                  eax_58 = LOWD(((int64_t)((ecx_7 - edx_29) * var_38_1)));
006626c5                                  uint32_t ecx_13;
006626c5                                  ecx_13 = (ecx_7 - ((int8_t)((eax_58 + ((uint32_t)edx_30)) >> 8)));
006626cb                                  *(uint8_t*)((char*)arg1)[2] = ecx_13;
006626d6                                  int32_t eax_64;
006626d6                                  char edx_32;
006626d6                                  edx_32 = HIGHD(((int64_t)((eax_17 - esi_11) * var_38_1)));
006626d6                                  eax_64 = LOWD(((int64_t)((eax_17 - esi_11) * var_38_1)));
006626e2                                  uint32_t ebx_6;
006626e2                                  ebx_6 = (eax_17 - ((int8_t)((eax_64 + ((uint32_t)edx_32)) >> 8)));
006626e4                                  *(uint8_t*)((char*)arg1)[1] = ebx_6;
006626f3                                  int32_t eax_70;
006626f3                                  char edx_34;
006626f3                                  edx_34 = HIGHD(((int64_t)((edi_5 - edi_25) * var_38_1)));
006626f3                                  eax_70 = LOWD(((int64_t)((edi_5 - edi_25) * var_38_1)));
006626ff                                  ebx = (edi_5 - ((int8_t)((eax_70 + ((uint32_t)edx_34)) >> 8)));
00662701                                  var_3c = edi_25;
00662705                                  arg1 = ebx;
0066246d                              }
0066246d                              else
0066246d                              {
00662475                                  int32_t var_50;
00662475                                  int32_t var_4c;
00662475                                  int32_t var_48;
00662475                                  
00662475                                  if (ebp_1 != 0)
00662475                                  {
00662489                                      int32_t eax_21;
00662489                                      char edx_11;
00662489                                      edx_11 = HIGHD(((int64_t)(ecx_8 * ebp_1)));
00662489                                      eax_21 = LOWD(((int64_t)(ecx_8 * ebp_1)));
00662496                                      int32_t eax_24;
00662496                                      int32_t edx_13;
00662496                                      edx_13 = HIGHD(((int64_t)esi_3));
00662496                                      eax_24 = LOWD(((int64_t)esi_3));
006624a1                                      int32_t ebx_3 = ((eax_24 + (edx_13 & 0xfff)) >> 0xc);
006624a7                                      int32_t eax_27;
006624a7                                      int32_t edx_15;
006624a7                                      edx_15 = HIGHD(((int64_t)(ebx_3 + 1)));
006624a7                                      eax_27 = LOWD(((int64_t)(ebx_3 + 1)));
006624ac                                      int32_t ebp_4 = ((eax_21 + ((uint32_t)edx_11)) >> 8);
006624b4                                      int32_t esi_7 = ((esi_3 - (((eax_27 - edx_15) >> 1) << 0xd)) * ebp_4);
006624b9                                      int32_t edi_8 = (ecx_8 - ebp_4);
006624bd                                      int32_t ebp_6 = (esi_7 & 0x80000fff);
006624bd                                      
006624c3                                      if (ebp_6 < 0)
006624cc                                          ebp_6 = (((ebp_6 - 1) | 0xfffff000) + 1);
006624cc                                      
006624cf                                      int32_t eax_32;
006624cf                                      int32_t edx_16;
006624cf                                      edx_16 = HIGHD(((int64_t)esi_7));
006624cf                                      eax_32 = LOWD(((int64_t)esi_7));
006624d8                                      int32_t eax_34 = ((eax_32 + (edx_16 & 0xfff)) >> 0xc);
006624d8                                      
006624e1                                      if (ebp_6 < 0xfffff800)
006624e3                                          eax_34 -= 1;
006624e3                                      
006624ea                                      if (ebp_6 > 0x800)
006624ec                                          eax_34 += 1;
006624ec                                      
006624f2                                      switch (ebx_3)
006624f2                                      {
006624f9                                          case 0:
006624f9                                          {
006624f9                                              var_50 = edi_8;
006624ff                                              var_48 = (edi_8 + eax_34);
0066254f                                              var_4c = ecx_8;
006624f9                                              break;
006624f9                                          }
00662505                                          case 1:
00662505                                          {
00662505                                              var_50 = edi_8;
0066250b                                              var_48 = ecx_8;
0066250f                                              var_4c = (edi_8 - eax_34);
00662505                                              break;
00662505                                          }
00662515                                          case 2:
00662515                                          {
00662515                                              var_4c = edi_8;
0066251b                                              var_48 = ecx_8;
0066251f                                              var_50 = (edi_8 + eax_34);
00662515                                              break;
00662515                                          }
00662525                                          case 3:
00662525                                          {
00662525                                              var_4c = edi_8;
0066252b                                              var_50 = ecx_8;
0066252f                                              var_48 = (edi_8 - eax_34);
00662525                                              break;
00662525                                          }
00662535                                          case 4:
00662535                                          {
00662535                                              var_48 = edi_8;
0066253b                                              var_50 = ecx_8;
0066253f                                              var_4c = (edi_8 + eax_34);
00662535                                              break;
00662535                                          }
00662545                                          case 5:
00662545                                          {
00662545                                              var_48 = edi_8;
0066254b                                              var_50 = (edi_8 - eax_34);
0066254f                                              var_4c = ecx_8;
00662545                                              break;
00662545                                          }
006624f2                                      }
00662475                                  }
00662475                                  else
00662475                                  {
00662477                                      var_48 = ecx_8;
0066247b                                      var_50 = ecx_8;
0066254f                                      var_4c = ecx_8;
00662475                                  }
00662475                                  
0066255f                                  int32_t ecx_9;
0066255f                                  ecx_9 = var_4c != 0;
00662564                                  int32_t eax_36 = (var_4c - ecx_9);
0066256c                                  int32_t edx_18;
0066256c                                  edx_18 = var_48 != 0;
00662571                                  var_4c = eax_36;
00662575                                  *(uint8_t*)((char*)arg1)[2] = eax_36;
00662579                                  int32_t ecx_11 = (var_48 - edx_18);
0066257d                                  ebx = var_50 != 0;
00662582                                  var_48 = ecx_11;
00662586                                  *(uint8_t*)((char*)arg1)[1] = ecx_11;
0066258a                                  int32_t edx_20 = (var_50 - ebx);
0066258c                                  var_50 = edx_20;
00662590                                  arg1 = edx_20;
0066246d                              }
0066246d                              
00662715                              edi_1 = (i8AlphaModifier + 1);
00662719                              *(uint32_t*)(__inner1 + (i << 2)) = arg1;
00662377                          }
00662724                      } while (i > 0);
00662326                  }
00662326                  
0066273e                  __inner1_1 = (__inner1_2 + iStride_1);
00662742                  cond:2_1 = nHeight_1 != 1;
00662743                  __inner1_2 = __inner1_1;
00662747                  __inner1 += iStride;
0066274b                  nHeight_1 -= 1;
0066274f              } while (cond:2_1);
006622fc          }
006622ec      }
006622d0  }

0066275f                                                                                               90                                 .
00662760  uint32_t jump_table_662760[0x6] = 
00662760  {
00662760      [0x0] =  0x006624f9
00662764      [0x1] =  0x00662505
00662768      [0x2] =  0x00662515
0066276c      [0x3] =  0x00662525
00662770      [0x4] =  0x00662535
00662774      [0x5] =  0x00662545
00662778  }
00662778  uint32_t jump_table_662778[0x6] = 
00662778  {
00662778      [0x0] =  0x0066261f
0066277c      [0x1] =  0x0066262b
00662780      [0x2] =  0x0066263b
00662784      [0x3] =  0x0066264b
00662788      [0x4] =  0x0066265b
0066278c      [0x5] =  0x0066266b
00662790  }

00662790  void BlitLoopNoScale<&BlitOp_Colorize<BlitFormat_RGB,BlitFormat_RGB>,BlitFormat_RGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00662790  {
00662797      union __inner1 = arg1->cDstArgs.__inner1;
0066279b      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006627a2      union __inner1_1 = arg1->cSrcArgs.__inner1;
006627a5      union __inner1_3 = __inner1_1;
006627a9      union __inner1_4 = __inner1;
006627a9      
006627ad      if (i8AlphaModifier != 0)
006627ad      {
006627b4          uint32_t nHeight = arg1->nHeight;
006627b7          int32_t ebp = (i8AlphaModifier + 1);
006627ba          int32_t var_18_1 = ebp;
006627ba          
006627be          if (nHeight > 0)
006627be          {
006627c4              uint32_t nWidth = arg1->nWidth;
006627cb              uint32_t iStride_1 = arg1->cDstArgs.iStride;
006627ce              uint32_t nWidth_2 = nWidth;
006627d2              uint32_t iStride = arg1->cSrcArgs.iStride;
006627da              uint32_t nHeight_1 = nHeight;
00662c1c              bool cond:2_1;
00662c1c              
00662c1c              do
00662c1c              {
006627e2                  if (nWidth > 0)
006627e2                  {
006627e8                      uint32_t ecx_1 = (nWidth * 3);
006627eb                      void* edi_2 = (ecx_1 + __inner1_1);
006627ee                      int32_t esi = (__inner1_1 - __inner1);
006627f0                      void* ecx_2 = ((ecx_1 + __inner1) + 2);
006627f4                      int32_t var_10_1 = esi;
006627f8                      uint32_t var_30_1 = nWidth;
00662bed                      uint32_t i;
00662bed                      
00662bed                      do
00662bed                      {
00662800                          *(uint8_t*)((char*)__inner1 + 0) = *(uint8_t*)((esi + ecx_2) - 4);
00662804                          nWidth = *(uint8_t*)((esi + ecx_2) - 3);
00662808                          uint32_t ebx_1;
00662808                          ebx_1 = *(uint8_t*)((char*)edi_2 - 3);
0066280b                          ecx_2 -= 3;
0066280e                          edi_2 -= 3;
0066281b                          void* var_34_1 = ecx_2;
0066281f                          char var_3b_1 = *(uint8_t*)((char*)__inner1 + 0);
00662823                          char var_3a_1 = nWidth;
00662827                          uint32_t nWidth_1 = 0x100;
00662827                          
0066282f                          if (ebp != 0x100)
0066282f                          {
00662836                              int32_t eax_3;
00662836                              char edx;
00662836                              edx = HIGHD(((int64_t)(ebp << 8)));
00662836                              eax_3 = LOWD(((int64_t)(ebp << 8)));
0066283f                              nWidth = ((eax_3 + ((uint32_t)edx)) >> 8);
00662844                              nWidth_1 = nWidth;
0066282f                          }
0066282f                          
00662848                          if ((ebp == 0x100 || nWidth != 0))
00662848                          {
0066284e                              *(uint8_t*)((char*)__inner1 + 0) = *(uint8_t*)((char*)ecx_2 - 2);
00662851                              nWidth = *(uint8_t*)((char*)ecx_2 - 1);
00662854                              ecx_2 = *(uint8_t*)ecx_2;
00662856                              uint32_t esi_1 = ((uint32_t)var_3b_1);
00662865                              uint32_t ecx_3 = ((uint32_t)var_3a_1);
0066286c                              int32_t edx_1;
0066286c                              edx_1 = ecx_3 != 0;
00662875                              uint32_t edi_3 = ((uint32_t)ebx_1);
00662878                              int32_t ecx_4 = (ecx_3 + edx_1);
0066287c                              int32_t eax_5;
0066287c                              eax_5 = esi_1 != 0;
00662881                              int32_t ebp_1 = ecx_4;
00662883                              int32_t esi_2 = (esi_1 + eax_5);
00662887                              int32_t edx_2;
00662887                              edx_2 = edi_3 != 0;
0066288a                              int32_t edi_4 = (edi_3 + edx_2);
0066288e                              int32_t edx_3 = ecx_4;
0066288e                              
00662890                              if (esi_2 > ecx_4)
00662892                                  ebp_1 = esi_2;
00662890                              else if (esi_2 < ecx_4)
00662898                                  edx_3 = esi_2;
00662898                              
0066289c                              if (edi_4 > ebp_1)
0066289e                                  ebp_1 = edi_4;
0066289c                              else if (edi_4 < edx_3)
006628a6                                  edx_3 = edi_4;
006628a6                              
006628aa                              int32_t eax_7 = (ebp_1 - edx_3);
006628b0                              int32_t ebp_2;
006628b0                              int32_t esi_3;
006628b0                              
006628b0                              if (ebp_1 != edx_3)
006628b0                              {
006628be                                  int32_t ebx_2 = 0;
006628c6                                  int32_t ecx_5;
006628c6                                  
006628c6                                  if (ecx_4 == ebp_1)
006628c6                                  {
006628ca                                      ecx_5 = (esi_2 - edi_4);
006628ca                                      
006628cc                                      if ((esi_2 - edi_4) < 0)
006628ce                                          ebx_2 = 0x6000;
006628c6                                  }
006628c6                                  else if (esi_2 != ebp_1)
006628d7                                  {
006628e4                                      ecx_5 = (ecx_4 - esi_2);
006628e6                                      ebx_2 = 0x4000;
006628d7                                  }
006628d7                                  else
006628d7                                  {
006628db                                      ecx_5 = (edi_4 - ecx_4);
006628dd                                      ebx_2 = 0x2000;
006628d7                                  }
006628d7                                  
006628f5                                  ebp_2 = (((int64_t)(eax_7 << 8)) / ebp_1);
006628fb                                  esi_3 = ((((int64_t)(ecx_5 << 0xc)) / eax_7) + ebx_2);
006628b0                              }
006628b0                              else
006628b0                              {
006628b2                                  esi_3 = 0;
006628b4                                  ebp_2 = 0;
006628b0                              }
006628b0                              
006628fd                              uint32_t eax_15 = ((uint32_t)nWidth);
00662902                              uint32_t edi_6 = ((uint32_t)*(uint8_t*)((char*)__inner1 + 0));
00662907                              uint32_t __inner1_18 = ((uint32_t)ecx_2);
00662910                              int32_t edx_8;
00662910                              edx_8 = eax_15 != 0;
0066291f                              struct BlitArgs* __inner1_11 = (eax_15 + edx_8);
00662925                              int32_t edx_9;
00662925                              edx_9 = edi_6 != 0;
00662928                              struct BlitArgs* __inner1_12 = (edi_6 + edx_9);
0066292e                              int32_t edx_10;
0066292e                              edx_10 = __inner1_18 != 0;
00662931                              struct BlitArgs* __inner1_5 = (__inner1_18 + edx_10);
00662931                              
00662935                              if (__inner1_11 > __inner1_5)
00662937                                  __inner1_5 = __inner1_11;
00662937                              
0066293b                              if (__inner1_12 > __inner1_5)
0066293d                                  __inner1_5 = __inner1_12;
0066293d                              
00662947                              void* __inner1_13;
00662947                              
00662947                              if (nWidth_1 != 0x100)
00662947                              {
00662a6b                                  void* __inner1_8;
00662a6b                                  void* __inner1_9;
00662a6b                                  struct BlitArgs* __inner1_10;
00662a6b                                  
00662a6b                                  if (ebp_2 != 0)
00662a6b                                  {
00662a7f                                      int32_t eax_37;
00662a7f                                      char edx_19;
00662a7f                                      edx_19 = HIGHD(((int64_t)(__inner1_5 * ebp_2)));
00662a7f                                      eax_37 = LOWD(((int64_t)(__inner1_5 * ebp_2)));
00662a8c                                      int32_t eax_40;
00662a8c                                      int32_t edx_21;
00662a8c                                      edx_21 = HIGHD(((int64_t)esi_3));
00662a8c                                      eax_40 = LOWD(((int64_t)esi_3));
00662a97                                      int32_t ebx_6 = ((eax_40 + (edx_21 & 0xfff)) >> 0xc);
00662a9d                                      int32_t eax_43;
00662a9d                                      int32_t edx_23;
00662a9d                                      edx_23 = HIGHD(((int64_t)(ebx_6 + 1)));
00662a9d                                      eax_43 = LOWD(((int64_t)(ebx_6 + 1)));
00662aa2                                      int32_t ebp_10 = ((eax_37 + ((uint32_t)edx_19)) >> 8);
00662aaa                                      int32_t esi_9 = ((esi_3 - (((eax_43 - edx_23) >> 1) << 0xd)) * ebp_10);
00662aaf                                      void* __inner1_16 = ((char*)__inner1_5 - ebp_10);
00662ab3                                      int32_t ebp_12 = (esi_9 & 0x80000fff);
00662ab3                                      
00662ab9                                      if (ebp_12 < 0)
00662ac2                                          ebp_12 = (((ebp_12 - 1) | 0xfffff000) + 1);
00662ac2                                      
00662ac5                                      int32_t eax_48;
00662ac5                                      int32_t edx_24;
00662ac5                                      edx_24 = HIGHD(((int64_t)esi_9));
00662ac5                                      eax_48 = LOWD(((int64_t)esi_9));
00662ace                                      int32_t eax_50 = ((eax_48 + (edx_24 & 0xfff)) >> 0xc);
00662ace                                      
00662ad7                                      if (ebp_12 < 0xfffff800)
00662ad9                                          eax_50 -= 1;
00662ad9                                      
00662ae0                                      if (ebp_12 > 0x800)
00662ae2                                          eax_50 += 1;
00662ae2                                      
00662ae8                                      switch (ebx_6)
00662ae8                                      {
00662aef                                          case 0:
00662aef                                          {
00662aef                                              __inner1_10 = __inner1_16;
00662af5                                              __inner1_9 = ((char*)__inner1_16 + eax_50);
00662b45                                              __inner1_8 = __inner1_5;
00662aef                                              break;
00662aef                                          }
00662afb                                          case 1:
00662afb                                          {
00662afb                                              __inner1_10 = __inner1_16;
00662b01                                              __inner1_9 = __inner1_5;
00662b05                                              __inner1_8 = ((char*)__inner1_16 - eax_50);
00662afb                                              break;
00662afb                                          }
00662b0b                                          case 2:
00662b0b                                          {
00662b0b                                              __inner1_8 = __inner1_16;
00662b11                                              __inner1_9 = __inner1_5;
00662b15                                              __inner1_10 = ((char*)__inner1_16 + eax_50);
00662b0b                                              break;
00662b0b                                          }
00662b1b                                          case 3:
00662b1b                                          {
00662b1b                                              __inner1_8 = __inner1_16;
00662b21                                              __inner1_10 = __inner1_5;
00662b25                                              __inner1_9 = ((char*)__inner1_16 - eax_50);
00662b1b                                              break;
00662b1b                                          }
00662b2b                                          case 4:
00662b2b                                          {
00662b2b                                              __inner1_9 = __inner1_16;
00662b31                                              __inner1_10 = __inner1_5;
00662b35                                              __inner1_8 = ((char*)__inner1_16 + eax_50);
00662b2b                                              break;
00662b2b                                          }
00662b3b                                          case 5:
00662b3b                                          {
00662b3b                                              __inner1_9 = __inner1_16;
00662b41                                              __inner1_10 = ((char*)__inner1_16 - eax_50);
00662b45                                              __inner1_8 = __inner1_5;
00662b3b                                              break;
00662b3b                                          }
00662ae8                                      }
00662a6b                                  }
00662a6b                                  else
00662a6b                                  {
00662a6d                                      __inner1_9 = __inner1_5;
00662a71                                      __inner1_10 = __inner1_5;
00662b45                                      __inner1_8 = __inner1_5;
00662a6b                                  }
00662a6b                                  
00662b59                                  int32_t ecx_7;
00662b59                                  ecx_7 = __inner1_8 != 0;
00662b62                                  void* __inner1_14 = ((char*)__inner1_8 - ecx_7);
00662b66                                  int32_t eax_51;
00662b66                                  eax_51 = __inner1_9 != 0;
00662b6b                                  __inner1_8 = __inner1_14;
00662b6f                                  void* __inner1_15 = ((char*)__inner1_9 - eax_51);
00662b73                                  int32_t ecx_8;
00662b73                                  ecx_8 = __inner1_10 != 0;
00662b76                                  __inner1_9 = __inner1_15;
00662b7a                                  void* __inner1_17 = ((char*)__inner1_10 - ecx_8);
00662b7c                                  __inner1_13 = __inner1_18;
00662b89                                  int32_t eax_55;
00662b89                                  char edx_27;
00662b89                                  edx_27 = HIGHD(((int64_t)(((char*)__inner1_13 - __inner1_14) * nWidth_1)));
00662b89                                  eax_55 = LOWD(((int64_t)(((char*)__inner1_13 - __inner1_14) * nWidth_1)));
00662b95                                  __inner1_13 -= ((int8_t)((eax_55 + ((uint32_t)edx_27)) >> 8));
00662ba0                                  int32_t eax_61;
00662ba0                                  char edx_29;
00662ba0                                  edx_29 = HIGHD(((int64_t)((eax_15 - __inner1_15) * nWidth_1)));
00662ba0                                  eax_61 = LOWD(((int64_t)((eax_15 - __inner1_15) * nWidth_1)));
00662bac                                  ebx_1 = (eax_15 - ((int8_t)((eax_61 + ((uint32_t)edx_29)) >> 8)));
00662bb9                                  char edx_31;
00662bb9                                  edx_31 = HIGHD(((int64_t)((edi_6 - __inner1_17) * nWidth_1)));
00662bb9                                  nWidth = LOWD(((int64_t)((edi_6 - __inner1_17) * nWidth_1)));
00662bc0                                  uint32_t edx_33 = (((uint32_t)edx_31) + nWidth);
00662bc2                                  nWidth = edi_6;
00662bc9                                  __inner1_10 = __inner1_17;
00662bcd                                  nWidth -= *(uint8_t*)((char*)(edx_33 >> 8) + 0);
00662947                              }
00662947                              else
00662947                              {
0066294f                                  struct BlitArgs* __inner1_7;
0066294f                                  struct BlitArgs* __inner1_2;
0066294f                                  
0066294f                                  if (ebp_2 != 0)
0066294f                                  {
00662963                                      int32_t eax_18;
00662963                                      char edx_11;
00662963                                      edx_11 = HIGHD(((int64_t)(__inner1_5 * ebp_2)));
00662963                                      eax_18 = LOWD(((int64_t)(__inner1_5 * ebp_2)));
00662970                                      int32_t eax_21;
00662970                                      int32_t edx_13;
00662970                                      edx_13 = HIGHD(((int64_t)esi_3));
00662970                                      eax_21 = LOWD(((int64_t)esi_3));
0066297b                                      int32_t ebx_4 = ((eax_21 + (edx_13 & 0xfff)) >> 0xc);
00662981                                      int32_t eax_24;
00662981                                      int32_t edx_15;
00662981                                      edx_15 = HIGHD(((int64_t)(ebx_4 + 1)));
00662981                                      eax_24 = LOWD(((int64_t)(ebx_4 + 1)));
00662986                                      int32_t ebp_4 = ((eax_18 + ((uint32_t)edx_11)) >> 8);
0066298e                                      int32_t esi_7 = ((esi_3 - (((eax_24 - edx_15) >> 1) << 0xd)) * ebp_4);
00662993                                      struct BlitArgs* __inner1_6 = ((char*)__inner1_5 - ebp_4);
00662997                                      int32_t ebp_6 = (esi_7 & 0x80000fff);
00662997                                      
0066299d                                      if (ebp_6 < 0)
006629a6                                          ebp_6 = (((ebp_6 - 1) | 0xfffff000) + 1);
006629a6                                      
006629a9                                      int32_t eax_29;
006629a9                                      int32_t edx_16;
006629a9                                      edx_16 = HIGHD(((int64_t)esi_7));
006629a9                                      eax_29 = LOWD(((int64_t)esi_7));
006629b2                                      int32_t eax_31 = ((eax_29 + (edx_16 & 0xfff)) >> 0xc);
006629b2                                      
006629bb                                      if (ebp_6 < 0xfffff800)
006629bd                                          eax_31 -= 1;
006629bd                                      
006629c4                                      if (ebp_6 > 0x800)
006629c6                                          eax_31 += 1;
006629c6                                      
006629cc                                      switch (ebx_4)
006629cc                                      {
006629d3                                          case 0:
006629d3                                          {
006629d3                                              arg1 = __inner1_6;
006629d9                                              __inner1_2 = ((char*)__inner1_6 + eax_31);
00662a29                                              __inner1_7 = __inner1_5;
006629d3                                              break;
006629d3                                          }
006629df                                          case 1:
006629df                                          {
006629df                                              arg1 = __inner1_6;
006629e5                                              __inner1_2 = __inner1_5;
006629e9                                              __inner1_7 = ((char*)__inner1_6 - eax_31);
006629df                                              break;
006629df                                          }
006629ef                                          case 2:
006629ef                                          {
006629ef                                              __inner1_7 = __inner1_6;
006629f5                                              __inner1_2 = __inner1_5;
006629f9                                              arg1 = ((char*)__inner1_6 + eax_31);
006629ef                                              break;
006629ef                                          }
006629ff                                          case 3:
006629ff                                          {
006629ff                                              __inner1_7 = __inner1_6;
00662a05                                              arg1 = __inner1_5;
00662a09                                              __inner1_2 = ((char*)__inner1_6 - eax_31);
006629ff                                              break;
006629ff                                          }
00662a0f                                          case 4:
00662a0f                                          {
00662a0f                                              __inner1_2 = __inner1_6;
00662a15                                              arg1 = __inner1_5;
00662a19                                              __inner1_7 = ((char*)__inner1_6 + eax_31);
00662a0f                                              break;
00662a0f                                          }
00662a1f                                          case 5:
00662a1f                                          {
00662a1f                                              __inner1_2 = __inner1_6;
00662a25                                              arg1 = ((char*)__inner1_6 - eax_31);
00662a29                                              __inner1_7 = __inner1_5;
00662a1f                                              break;
00662a1f                                          }
006629cc                                      }
0066294f                                  }
0066294f                                  else
0066294f                                  {
00662951                                      __inner1_2 = __inner1_5;
00662955                                      arg1 = __inner1_5;
00662a29                                      __inner1_7 = __inner1_5;
0066294f                                  }
0066294f                                  
00662a3d                                  int32_t eax_32;
00662a3d                                  eax_32 = __inner1_7 != 0;
00662a40                                  __inner1_13 = ((char*)__inner1_7 - eax_32);
00662a46                                  int32_t eax_33;
00662a46                                  eax_33 = __inner1_2 != 0;
00662a4b                                  __inner1_7 = __inner1_13;
00662a4f                                  __inner1 = ((char*)__inner1_2 - eax_33);
00662a53                                  ebx_1 = arg1 != 0;
00662a58                                  __inner1_2 = __inner1;
00662a5c                                  nWidth = ((char*)arg1 - ebx_1);
00662a5e                                  arg1 = nWidth;
00662a62                                  ebx_1 = *(uint8_t*)((char*)__inner1 + 0);
00662947                              }
00662947                              
00662bd3                              ebp = var_18_1;
00662bdb                              *(uint8_t*)var_34_1 = __inner1_13;
00662bdd                              *(uint8_t*)((char*)var_34_1 - 2) = nWidth;
00662be0                              *(uint8_t*)((char*)var_34_1 - 1) = ebx_1;
00662be3                              ecx_2 = var_34_1;
00662be5                              esi = var_10_1;
00662848                          }
00662848                          
00662be9                          i = var_30_1;
00662be9                          var_30_1 -= 1;
00662bed                      } while (i != 1);
00662bf3                      __inner1 = __inner1_4;
00662bf7                      nWidth = nWidth_2;
00662bfb                      __inner1_1 = __inner1_3;
006627e2                  }
006627e2                  
00662c0b                  __inner1_1 += iStride;
00662c0d                  __inner1 += iStride_1;
00662c0f                  cond:2_1 = nHeight_1 != 1;
00662c10                  __inner1_3 = __inner1_1;
00662c14                  __inner1_4 = __inner1;
00662c18                  nHeight_1 -= 1;
00662c1c              } while (cond:2_1);
006627be          }
006627ad      }
00662790  }

00662c2c  uint32_t jump_table_662c2c[0x6] = 
00662c2c  {
00662c2c      [0x0] =  0x006629d3
00662c30      [0x1] =  0x006629df
00662c34      [0x2] =  0x006629ef
00662c38      [0x3] =  0x006629ff
00662c3c      [0x4] =  0x00662a0f
00662c40      [0x5] =  0x00662a1f
00662c44  }
00662c44  uint32_t jump_table_662c44[0x6] = 
00662c44  {
00662c44      [0x0] =  0x00662aef
00662c48      [0x1] =  0x00662afb
00662c4c      [0x2] =  0x00662b0b
00662c50      [0x3] =  0x00662b1b
00662c54      [0x4] =  0x00662b2b
00662c58      [0x5] =  0x00662b3b
00662c5c  }

00662c5c                                                                                      cc cc cc cc                              ....

00662c60  void BlitLoopNoScale<&BlitOp_Multiply<BlitFormat_ARGB,BlitFormat_ARGB>,BlitFormat_ARGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00662c60  {
00662c6f      union __inner1_1 = arg1->cDstArgs.__inner1;
00662c73      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00662c7b      union __inner1 = arg1->cSrcArgs.__inner1;
00662c7f      union __inner1_2 = __inner1_1;
00662c7f      
00662c83      if (i8AlphaModifier != 0)
00662c83      {
00662c89          uint32_t nHeight = arg1->nHeight;
00662c89          
00662c8f          if (nHeight > 0)
00662c8f          {
00662c95              uint32_t nWidth = arg1->nWidth;
00662c98              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00662c9b              uint32_t iStride = arg1->cDstArgs.iStride;
00662c9e              uint32_t nWidth_1 = nWidth;
00662caa              uint32_t nHeight_1 = nHeight;
00662da2              bool cond:1_1;
00662da2              
00662da2              do
00662da2              {
00662cb2                  if (nWidth > 0)
00662cb2                  {
00662cbc                      int32_t* ecx_1 = (__inner1_1 + (nWidth << 2));
00662cc1                      uint32_t var_24_1 = nWidth;
00662d75                      uint32_t i;
00662d75                      
00662d75                      do
00662d75                      {
00662cc5                          int32_t esi_1 = *(uint32_t*)(((__inner1 - __inner1_1) + ecx_1) - 4);
00662cc9                          ecx_1 -= 4;
00662cce                          uint32_t eax_2 = (esi_1 >> 0x18);
00662cd5                          int32_t edx;
00662cd5                          edx = eax_2 != 0;
00662cd8                          int32_t var_18_1 = esi_1;
00662cdc                          int32_t eax_3 = (eax_2 + edx);
00662cdc                          
00662ce4                          if (i8AlphaModifier != 0xff)
00662ce4                          {
00662ce9                              int32_t eax_5;
00662ce9                              char edx_1;
00662ce9                              edx_1 = HIGHD(((int64_t)(eax_3 * (i8AlphaModifier + 1))));
00662ce9                              eax_5 = LOWD(((int64_t)(eax_3 * (i8AlphaModifier + 1))));
00662cf2                              eax_3 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
00662ce4                          }
00662ce4                          
00662cf7                          if (eax_3 != 0)
00662cf7                          {
00662d06                              int32_t edx_3 = *(uint32_t*)ecx_1;
00662d08                              int80_t st2;
00662d08                              st2 = 0;
00662d0e                              uint64_t st3 = _m_punpckhwd(0xffffff, 0);
00662d14                              int64_t st0 = _m_punpckhwd(((uint64_t)edx_3), 0);
00662d1a                              uint64_t st1 = _m_punpckhwd(((uint64_t)esi_1), 0);
00662d36                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
00662d36                              
00662d39                              if (eax_3 != 0x100)
00662d39                              {
00662d40                                  st3 = ((uint64_t)eax_3);
00662d46                                  int16_t st4[0x4] = _m_punpcklwd(st3, st3);
00662d4f                                  st3 = _m_punpcklwd(st4, st4);
00662d55                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00662d66                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00662d39                              }
00662d39                              else
00662d3b                                  st0 = st1;
00662d3b                              
00662d6f                              *(uint32_t*)ecx_1 = _m_packuswb(st0, 0);
00662cf7                          }
00662cf7                          
00662d71                          i = var_24_1;
00662d71                          var_24_1 -= 1;
00662d75                      } while (i != 1);
00662d7b                      __inner1_1 = __inner1_2;
00662d7f                      nWidth = nWidth_1;
00662cb2                  }
00662cb2                  
00662d91                  __inner1_1 += iStride;
00662d95                  cond:1_1 = nHeight_1 != 1;
00662d96                  __inner1 += iStride_1;
00662d9a                  __inner1_2 = __inner1_1;
00662d9e                  nHeight_1 -= 1;
00662da2              } while (cond:1_1);
00662c8f          }
00662c83      }
00662c60  }

00662db1                                                     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                   ...............

00662dc0  void BlitLoopNoScale<&BlitOp_Multiply<BlitFormat_ARGB,BlitFormat_RGB>,BlitFormat_ARGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00662dc0  {
00662dcf      union __inner1_1 = arg1->cDstArgs.__inner1;
00662dd3      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00662dda      int32_t edi;
00662dda      int32_t var_38 = edi;
00662ddb      union __inner1 = arg1->cSrcArgs.__inner1;
00662ddf      union __inner1_2 = __inner1_1;
00662ddf      
00662de3      if (i8AlphaModifier != 0)
00662de3      {
00662de9          uint32_t nHeight = arg1->nHeight;
00662de9          
00662def          if (nHeight > 0)
00662def          {
00662df5              uint32_t nWidth = arg1->nWidth;
00662dfc              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00662dff              uint32_t iStride = arg1->cDstArgs.iStride;
00662e0a              uint32_t nHeight_1 = nHeight;
00662f34              bool cond:1_1;
00662f34              
00662f34              do
00662f34              {
00662e10                  uint32_t i = nWidth;
00662e10                  
00662e16                  if (i > 0)
00662e16                  {
00662e1f                      char* ecx_2 = (((i * 3) + __inner1_1) + 2);
00662e1f                      
00662f09                      do
00662f09                      {
00662e27                          int32_t edi_2 = *(uint32_t*)((__inner1 + (i << 2)) - 4);
00662e2b                          i -= 1;
00662e2e                          uint32_t eax_2 = (edi_2 >> 0x18);
00662e33                          ecx_2 -= 3;
00662e38                          uint32_t edx_1;
00662e38                          edx_1 = eax_2 != 0;
00662e3b                          int32_t var_14_1 = edi_2;
00662e3f                          int32_t eax_3 = (eax_2 + edx_1);
00662e3f                          
00662e47                          if (i8AlphaModifier != 0xff)
00662e47                          {
00662e4c                              int32_t eax_5;
00662e4c                              char edx_2;
00662e4c                              edx_2 = HIGHD(((int64_t)(eax_3 * (i8AlphaModifier + 1))));
00662e4c                              eax_5 = LOWD(((int64_t)(eax_3 * (i8AlphaModifier + 1))));
00662e55                              eax_3 = ((eax_5 + ((uint32_t)edx_2)) >> 8);
00662e47                          }
00662e47                          
00662e5a                          if (eax_3 != 0)
00662e5a                          {
00662e65                              edx_1 = ecx_2[0xfffffffe];
00662e68                              char var_28_1 = edx_1;
00662e6c                              edx_1 = ecx_2[0xffffffff];
00662e6f                              char var_27_1 = edx_1;
00662e73                              edx_1 = *(uint8_t*)ecx_2;
00662e75                              char var_26_1 = edx_1;
00662e79                              int80_t st2;
00662e79                              st2 = 0;
00662e87                              uint64_t st3 = _m_punpckhwd(0xffffff, 0);
00662e8a                              char var_25_1 = 0xff;
00662e94                              int64_t st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
00662e9a                              int16_t st1[0x4] = _m_punpckhwd(((uint64_t)edi_2), 0);
00662eb6                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
00662eb6                              
00662eb9                              if (eax_3 != 0x100)
00662eb9                              {
00662ec0                                  st3 = ((uint64_t)eax_3);
00662ec6                                  int16_t st4[0x4] = _m_punpcklwd(st3, st3);
00662ecf                                  st3 = _m_punpcklwd(st4, st4);
00662ed5                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00662ee6                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00662eb9                              }
00662eb9                              else
00662ebb                                  st0 = st1;
00662ebb                              
00662eec                              int32_t eax_7 = _m_packuswb(st0, 0);
00662ef1                              var_28_1 = eax_7;
00662ef5                              ecx_2[0xfffffffe] = eax_7;
00662f02                              ecx_2[0xffffffff] = ((int8_t)(eax_7 >> 8));
00662f05                              *(uint8_t*)ecx_2 = ((int8_t)(var_28_1 >> 0x10));
00662e5a                          }
00662f09                      } while (i > 0);
00662e16                  }
00662e16                  
00662f21                  __inner1 += iStride_1;
00662f29                  __inner1_1 = (__inner1_2 + iStride);
00662f2b                  cond:1_1 = nHeight_1 != 1;
00662f2c                  __inner1_2 = __inner1_1;
00662f30                  nHeight_1 -= 1;
00662f34              } while (cond:1_1);
00662def          }
00662de3      }
00662dc0  }

00662f43           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

00662f50  void BlitLoopNoScale<&BlitOp_Multiply<BlitFormat_XRGB,BlitFormat_ARGB>,BlitFormat_XRGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00662f50  {
00662f65      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00662f6b      union __inner1 = arg1->cSrcArgs.__inner1;
00662f6b      
00662f6f      if (i8AlphaModifier != 0)
00662f6f      {
00662f75          uint32_t nHeight = arg1->nHeight;
00662f75          
00662f7b          if (nHeight > 0)
00662f7b          {
00662f81              uint32_t nWidth = arg1->nWidth;
00662f84              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00662f87              uint32_t iStride = arg1->cDstArgs.iStride;
00662f8a              uint32_t nWidth_1 = nWidth;
00662f96              uint32_t nHeight_1 = nHeight;
00662f9a              union __inner1_1 = arg1->cDstArgs.__inner1;
00663091              bool cond:1_1;
00663091              
00663091              do
00663091              {
00662fa2                  if (nWidth > 0)
00662fa2                  {
00662fac                      int32_t* ecx_1 = (__inner1_1 + (nWidth << 2));
00662fb1                      uint32_t var_1c_1 = nWidth;
0066306c                      uint32_t i;
0066306c                      
0066306c                      do
0066306c                      {
00662fc0                          int32_t edx_1 = *(uint32_t*)(((__inner1 - __inner1_1) + ecx_1) - 4);
00662fc4                          ecx_1 -= 4;
00662fc7                          int32_t eax_1 = 0x100;
00662fce                          int32_t var_20_1 = edx_1;
00662fd2                          *(uint8_t*)((char*)var_20_1)[3] = 0xff;
00662fd2                          
00662fd7                          if (i8AlphaModifier != 0xff)
00662fd7                          {
00662fde                              int32_t eax_4;
00662fde                              char edx_2;
00662fde                              edx_2 = HIGHD(((int64_t)((i8AlphaModifier + 1) << 8)));
00662fde                              eax_4 = LOWD(((int64_t)((i8AlphaModifier + 1) << 8)));
00662fe7                              eax_1 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
00662fd7                          }
00662fd7                          
00662fec                          if ((i8AlphaModifier == 0xff || eax_1 != 0))
00662fec                          {
00663000                              int32_t edx_4 = *(uint32_t*)ecx_1;
00663002                              int80_t st2;
00663002                              st2 = 0;
00663008                              uint64_t st3 = _m_punpckhwd(0xffffff, 0);
0066300e                              uint64_t st0 = _m_punpckhwd(((uint64_t)edx_4), 0);
00663011                              uint64_t st1 = _m_punpckhwd(((uint64_t)var_20_1), 0);
0066302d                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
0066302d                              
00663030                              if (eax_1 != 0x100)
00663030                              {
00663037                                  st3 = ((uint64_t)eax_1);
0066303d                                  int16_t st4[0x4] = _m_punpcklwd(st3, st3);
00663046                                  st3 = _m_punpcklwd(st4, st4);
0066304c                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066305d                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00663030                              }
00663030                              else
00663032                                  st0 = st1;
00663032                              
00663066                              *(uint32_t*)ecx_1 = _m_packuswb(st0, 0);
00662fec                          }
00662fec                          
00663068                          i = var_1c_1;
00663068                          var_1c_1 -= 1;
0066306c                      } while (i != 1);
00663072                      nWidth = nWidth_1;
00662fa2                  }
00662fa2                  
00663084                  __inner1_1 += iStride;
00663088                  cond:1_1 = nHeight_1 != 1;
00663089                  __inner1 += iStride_1;
0066308d                  nHeight_1 -= 1;
00663091              } while (cond:1_1);
00662f7b          }
00662f6f      }
00662f50  }

00662fb7                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......

006630a0  void BlitLoopNoScale<&BlitOp_Multiply<BlitFormat_XRGB,BlitFormat_RGB>,BlitFormat_XRGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

006630a0  {
006630ac      union __inner1 = arg1->cDstArgs.__inner1;
006630b5      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006630bb      union __inner1_2 = __inner1;
006630bb      
006630bf      if (i8AlphaModifier != 0)
006630bf      {
006630c5          uint32_t nHeight = arg1->nHeight;
006630c5          
006630cb          if (nHeight > 0)
006630cb          {
006630d1              uint32_t nWidth = arg1->nWidth;
006630d8              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006630db              uint32_t iStride = arg1->cDstArgs.iStride;
006630e6              uint32_t nHeight_1 = nHeight;
006630ea              union __inner1_1 = arg1->cSrcArgs.__inner1;
00663204              bool cond:1_1;
00663204              
00663204              do
00663204              {
006630f0                  uint32_t i = nWidth;
006630f0                  
006630f6                  if (i > 0)
006630f6                  {
006630ff                      char* ecx_2 = (((i * 3) + __inner1) + 2);
006630ff                      
006631e1                      do
006631e1                      {
00663103                          uint32_t edx_1 = *(uint32_t*)((__inner1_1 + (i << 2)) - 4);
00663107                          i -= 1;
00663108                          int32_t eax_1 = 0x100;
0066310d                          ecx_2 -= 3;
00663112                          uint32_t var_20_1 = edx_1;
00663116                          *(uint8_t*)((char*)var_20_1)[3] = 0xff;
00663116                          
0066311b                          if (i8AlphaModifier != 0xff)
0066311b                          {
00663122                              int32_t eax_4;
00663122                              char edx;
00663122                              edx = HIGHD(((int64_t)((i8AlphaModifier + 1) << 8)));
00663122                              eax_4 = LOWD(((int64_t)((i8AlphaModifier + 1) << 8)));
0066312b                              eax_1 = ((eax_4 + ((uint32_t)edx)) >> 8);
0066311b                          }
0066311b                          
00663130                          if ((i8AlphaModifier == 0xff || eax_1 != 0))
00663130                          {
0066313b                              edx_1 = ecx_2[0xfffffffe];
00663143                              char var_24_1 = edx_1;
00663147                              edx_1 = ecx_2[0xffffffff];
0066314a                              char var_23_1 = edx_1;
0066314e                              edx_1 = *(uint8_t*)ecx_2;
00663150                              char var_22_1 = edx_1;
00663154                              int80_t st2;
00663154                              st2 = 0;
00663162                              uint64_t st3 = _m_punpckhwd(0xffffff, 0);
00663165                              char var_21_1 = 0xff;
0066316f                              uint64_t st0 = _m_punpckhwd(((uint64_t)var_24_1), 0);
00663172                              uint64_t st1 = _m_punpckhwd(((uint64_t)var_20_1), 0);
0066318e                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
0066318e                              
00663191                              if (eax_1 != 0x100)
00663191                              {
00663198                                  st3 = ((uint64_t)eax_1);
0066319e                                  int16_t st4[0x4] = _m_punpcklwd(st3, st3);
006631a7                                  st3 = _m_punpcklwd(st4, st4);
006631ad                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
006631be                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00663191                              }
00663191                              else
00663193                                  st0 = st1;
00663193                              
006631c4                              int32_t eax_6 = _m_packuswb(st0, 0);
006631c9                              var_24_1 = eax_6;
006631cd                              ecx_2[0xfffffffe] = eax_6;
006631da                              ecx_2[0xffffffff] = ((int8_t)(eax_6 >> 8));
006631dd                              *(uint8_t*)ecx_2 = ((int8_t)(var_24_1 >> 0x10));
00663130                          }
006631e1                      } while (i > 0);
006630f6                  }
006630f6                  
006631f3                  __inner1_1 += iStride_1;
006631f9                  __inner1 = (__inner1_2 + iStride);
006631fb                  cond:1_1 = nHeight_1 != 1;
006631fc                  __inner1_2 = __inner1;
00663200                  nHeight_1 -= 1;
00663204              } while (cond:1_1);
006630cb          }
006630bf      }
006630a0  }

00663213                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

00663220  void BlitLoopNoScale<&BlitOp_Multiply<BlitFormat_RGB,BlitFormat_ARGB>,BlitFormat_RGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00663220  {
0066322c      union __inner1 = arg1->cSrcArgs.__inner1;
00663235      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066323b      union __inner1_2 = __inner1;
0066323b      
0066323f      if (i8AlphaModifier != 0)
0066323f      {
00663245          uint32_t nHeight = arg1->nHeight;
00663245          
0066324b          if (nHeight > 0)
0066324b          {
00663251              uint32_t nWidth = arg1->nWidth;
00663258              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00663262              uint32_t iStride = arg1->cDstArgs.iStride;
00663266              uint32_t nHeight_1 = nHeight;
0066326a              union __inner1_1 = arg1->cDstArgs.__inner1;
00663367              bool cond:1_1;
00663367              
00663367              do
00663367              {
00663270                  uint32_t i = nWidth;
00663270                  
00663276                  if (i > 0)
00663276                  {
0066327f                      char var_1d_1 = 0xff;
00663284                      char* esi_1 = (((i * 3) + __inner1) + 2);
00663284                      
00663344                      do
00663344                      {
00663290                          uint32_t eax_1;
00663290                          eax_1 = esi_1[0xfffffffb];
00663293                          uint32_t edx;
00663293                          edx = esi_1[0xfffffffc];
00663296                          esi_1 -= 3;
00663299                          char var_20_1 = eax_1;
0066329d                          eax_1 = *(uint8_t*)esi_1;
0066329f                          char var_1e_1 = eax_1;
006632a3                          eax_1 = 0x100;
006632a8                          i -= 1;
006632ab                          char var_1f_1 = edx;
006632ab                          
006632af                          if (i8AlphaModifier != 0xff)
006632af                          {
006632b6                              int32_t eax_4;
006632b6                              char edx_1;
006632b6                              edx_1 = HIGHD(((int64_t)((i8AlphaModifier + 1) << 8)));
006632b6                              eax_4 = LOWD(((int64_t)((i8AlphaModifier + 1) << 8)));
006632bf                              eax_1 = ((eax_4 + ((uint32_t)edx_1)) >> 8);
006632af                          }
006632af                          
006632c4                          if ((i8AlphaModifier == 0xff || eax_1 != 0))
006632c4                          {
006632d8                              edx = *(uint32_t*)(__inner1_1 + (i << 2));
006632db                              int80_t st2;
006632db                              st2 = 0;
006632e1                              int16_t st3[0x4] = _m_punpckhwd(0xffffff, 0);
006632e7                              uint64_t st0 = _m_punpckhwd(((uint64_t)edx), 0);
006632ea                              uint64_t st1 = _m_punpckhwd(((uint64_t)var_20_1), 0);
00663306                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
00663306                              
00663309                              if (eax_1 != 0x100)
00663309                              {
00663310                                  st3 = ((uint64_t)eax_1);
00663316                                  int64_t st4 = _m_punpcklwd(st3, st3[0]);
0066331f                                  st3 = _m_punpcklwd(st4, st4[0]);
00663325                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00663336                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00663309                              }
00663309                              else
0066330b                                  st0 = st1;
0066330b                              
0066333f                              *(uint32_t*)(__inner1_1 + (i << 2)) = _m_packuswb(st0, 0);
006632c4                          }
00663344                      } while (i > 0);
00663276                  }
00663276                  
0066335a                  __inner1 = (__inner1_2 + iStride_1);
0066335c                  __inner1_1 += iStride;
0066335e                  cond:1_1 = nHeight_1 != 1;
0066335f                  __inner1_2 = __inner1;
00663363                  nHeight_1 -= 1;
00663367              } while (cond:1_1);
0066324b          }
0066323f      }
00663220  }

0066328a                                8d 9b 00 00 00 00                                                            ......
00663376                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00663380  void BlitLoopNoScale<&BlitOp_Multiply<BlitFormat_RGB,BlitFormat_RGB>,BlitFormat_RGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00663380  {
00663390      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00663397      union __inner1_1 = arg1->cSrcArgs.__inner1;
0066339b      union __inner1_2 = __inner1_1;
0066339f      union __inner1 = arg1->cDstArgs.__inner1;
0066339f      
006633a3      if (i8AlphaModifier != 0)
006633a3      {
006633a9          uint32_t nHeight = arg1->nHeight;
006633a9          
006633af          if (nHeight > 0)
006633af          {
006633b5              uint32_t nWidth = arg1->nWidth;
006633b8              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006633bb              uint32_t iStride = arg1->cDstArgs.iStride;
006633be              uint32_t nWidth_1 = nWidth;
006633ca              uint32_t nHeight_1 = nHeight;
0066350f              bool cond:1_1;
0066350f              
0066350f              do
0066350f              {
006633d2                  if (nWidth > 0)
006633d2                  {
006633dc                      uint32_t eax_1 = (nWidth * 3);
006633df                      void* edi_2 = (eax_1 + __inner1_1);
006633e2                      char* ecx_2 = ((eax_1 + __inner1) + 2);
006633ea                      char var_25_1 = 0xff;
006633ef                      char* esi = (__inner1_1 - __inner1);
006633f1                      uint32_t var_20_1 = nWidth;
006634e0                      uint32_t i;
006634e0                      
006634e0                      do
006634e0                      {
006633f5                          union eax_2;
006633f5                          *(uint8_t*)((char*)eax_2 + 0) = *(uint8_t*)((esi + ecx_2) - 4);
006633f9                          nWidth = *(uint8_t*)((char*)edi_2 - 3);
006633fc                          ecx_2 -= 3;
006633ff                          edi_2 -= 3;
00663402                          char var_27_1 = *(uint8_t*)((char*)eax_2 + 0);
00663406                          char var_28_1 = nWidth;
0066340a                          nWidth = *(uint8_t*)(esi + ecx_2);
0066340d                          eax_2 = 0x100;
00663414                          char var_26_1 = nWidth;
00663414                          
00663418                          if (i8AlphaModifier != 0xff)
00663418                          {
0066341f                              int32_t eax_5;
0066341f                              char edx_1;
0066341f                              edx_1 = HIGHD(((int64_t)((i8AlphaModifier + 1) << 8)));
0066341f                              eax_5 = LOWD(((int64_t)((i8AlphaModifier + 1) << 8)));
00663428                              eax_2 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
00663418                          }
00663418                          
0066342d                          if ((i8AlphaModifier == 0xff || eax_2 != 0))
0066342d                          {
00663438                              nWidth = ecx_2[0xfffffffe];
00663440                              char var_2c_1 = nWidth;
00663444                              nWidth = ecx_2[0xffffffff];
00663447                              char var_2b_1 = nWidth;
0066344b                              nWidth = *(uint8_t*)ecx_2;
0066344d                              char var_2a_1 = nWidth;
00663451                              int80_t st2;
00663451                              st2 = 0;
0066345f                              uint64_t st3 = _m_punpckhwd(0xffffff, 0);
00663462                              char var_29_1 = 0xff;
0066346c                              uint64_t st0 = _m_punpckhwd(((uint64_t)var_2c_1), 0);
0066346f                              uint64_t st1 = _m_punpckhwd(((uint64_t)var_28_1), 0);
0066348b                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
0066348b                              
0066348e                              if (eax_2 != 0x100)
0066348e                              {
00663495                                  st3 = ((uint64_t)eax_2);
0066349b                                  int64_t st4 = _m_punpcklwd(st3, st3);
006634a4                                  st3 = _m_punpcklwd(st4, st4);
006634aa                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
006634bb                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066348e                              }
0066348e                              else
00663490                                  st0 = st1;
00663490                              
006634c1                              int32_t eax_7 = _m_packuswb(st0, 0);
006634c6                              var_2c_1 = eax_7;
006634ca                              ecx_2[0xfffffffe] = eax_7;
006634d7                              ecx_2[0xffffffff] = *(uint8_t*)((char*)(eax_7 >> 8) + 0);
006634da                              *(uint8_t*)ecx_2 = (var_2c_1 >> 0x10);
0066342d                          }
0066342d                          
006634dc                          i = var_20_1;
006634dc                          var_20_1 -= 1;
006634e0                      } while (i != 1);
006634e6                      nWidth = nWidth_1;
006634ea                      __inner1_1 = __inner1_2;
006633d2                  }
006633d2                  
00663500                  __inner1_1 += iStride_1;
00663502                  cond:1_1 = nHeight_1 != 1;
00663503                  __inner1_2 = __inner1_1;
00663507                  __inner1 += iStride;
0066350b                  nHeight_1 -= 1;
0066350f              } while (cond:1_1);
006633af          }
006633a3      }
00663380  }

0066351e                                                                                            cc cc                                ..

00663520  void BlitLoopNoScale<&BlitOp_Screen<BlitFormat_ARGB,BlitFormat_ARGB>,BlitFormat_ARGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00663520  {
0066352f      union __inner1_1 = arg1->cDstArgs.__inner1;
00663533      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066353b      union __inner1 = arg1->cSrcArgs.__inner1;
0066353f      union __inner1_2 = __inner1_1;
0066353f      
00663543      if (i8AlphaModifier != 0)
00663543      {
00663549          uint32_t nHeight = arg1->nHeight;
00663549          
0066354f          if (nHeight > 0)
0066354f          {
00663555              uint32_t nWidth = arg1->nWidth;
00663558              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066355b              uint32_t iStride = arg1->cDstArgs.iStride;
0066355e              uint32_t nWidth_1 = nWidth;
0066356a              uint32_t nHeight_1 = nHeight;
0066366d              bool cond:1_1;
0066366d              
0066366d              do
0066366d              {
00663572                  if (nWidth > 0)
00663572                  {
0066357c                      int32_t* ecx_1 = (__inner1_1 + (nWidth << 2));
00663581                      uint32_t var_24_1 = nWidth;
00663640                      uint32_t i;
00663640                      
00663640                      do
00663640                      {
00663585                          int32_t esi_1 = *(uint32_t*)(((__inner1 - __inner1_1) + ecx_1) - 4);
00663589                          ecx_1 -= 4;
0066358e                          uint32_t eax_2 = (esi_1 >> 0x18);
00663597                          int32_t var_18_1 = esi_1;
00663597                          
0066359b                          if (i8AlphaModifier != 0xff)
0066359b                          {
006635a0                              int32_t eax_4;
006635a0                              char edx;
006635a0                              edx = HIGHD(((int64_t)(eax_2 * (i8AlphaModifier + 1))));
006635a0                              eax_4 = LOWD(((int64_t)(eax_2 * (i8AlphaModifier + 1))));
006635a9                              eax_2 = ((eax_4 + ((uint32_t)edx)) >> 8);
0066359b                          }
0066359b                          
006635ae                          if (eax_2 != 0)
006635ae                          {
006635bc                              int32_t edx_2 = *(uint32_t*)ecx_1;
006635be                              int80_t st2;
006635be                              st2 = 0;
006635c4                              int64_t st3 = _m_punpckhwd(0xffffff, 0);
006635ca                              uint64_t st0 = _m_punpckhwd(((uint64_t)edx_2), 0);
006635d0                              uint64_t st1 = _m_punpckhwd(((uint64_t)esi_1), 0);
006635e8                              uint64_t st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00663601                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00663601                              
00663604                              if (eax_2 != 0xff)
00663604                              {
0066360b                                  st3 = ((uint64_t)(eax_2 + 1));
00663611                                  int64_t st4 = _m_punpcklwd(st3, st3);
0066361a                                  st3 = _m_punpcklwd(st4, st4);
00663620                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00663631                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00663604                              }
00663604                              else
00663606                                  st0 = st1;
00663606                              
0066363a                              *(uint32_t*)ecx_1 = _m_packuswb(st0, 0);
006635ae                          }
006635ae                          
0066363c                          i = var_24_1;
0066363c                          var_24_1 -= 1;
00663640                      } while (i != 1);
00663646                      nWidth = nWidth_1;
0066364a                      __inner1_1 = __inner1_2;
00663572                  }
00663572                  
0066365c                  __inner1_1 += iStride;
00663660                  cond:1_1 = nHeight_1 != 1;
00663661                  __inner1 += iStride_1;
00663665                  __inner1_2 = __inner1_1;
00663669                  nHeight_1 -= 1;
0066366d              } while (cond:1_1);
0066354f          }
00663543      }
00663520  }

0066367c                                                                                      cc cc cc cc                              ....

00663680  void BlitLoopNoScale<&BlitOp_Screen<BlitFormat_ARGB,BlitFormat_RGB>,BlitFormat_ARGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00663680  {
0066368f      union __inner1_1 = arg1->cDstArgs.__inner1;
00663693      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066369a      int32_t edi;
0066369a      int32_t var_38 = edi;
0066369b      union __inner1 = arg1->cSrcArgs.__inner1;
0066369f      union __inner1_2 = __inner1_1;
0066369f      
006636a3      if (i8AlphaModifier != 0)
006636a3      {
006636a9          uint32_t nHeight = arg1->nHeight;
006636a9          
006636af          if (nHeight > 0)
006636af          {
006636b5              uint32_t nWidth = arg1->nWidth;
006636bc              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006636bf              uint32_t iStride = arg1->cDstArgs.iStride;
006636ca              uint32_t nHeight_1 = nHeight;
006637fb              bool cond:1_1;
006637fb              
006637fb              do
006637fb              {
006636d0                  uint32_t i = nWidth;
006636d0                  
006636d6                  if (i > 0)
006636d6                  {
006636df                      char* ecx_2 = (((i * 3) + __inner1_1) + 2);
006636df                      
006637d0                      do
006637d0                      {
006636e7                          int32_t edi_2 = *(uint32_t*)((__inner1 + (i << 2)) - 4);
006636eb                          i -= 1;
006636ee                          ecx_2 -= 3;
006636f1                          uint32_t eax_2 = (edi_2 >> 0x18);
006636fa                          int32_t var_14_1 = edi_2;
006636fa                          
006636fe                          if (i8AlphaModifier != 0xff)
006636fe                          {
00663703                              int32_t eax_4;
00663703                              char edx;
00663703                              edx = HIGHD(((int64_t)(eax_2 * (i8AlphaModifier + 1))));
00663703                              eax_4 = LOWD(((int64_t)(eax_2 * (i8AlphaModifier + 1))));
0066370c                              eax_2 = ((eax_4 + ((uint32_t)edx)) >> 8);
006636fe                          }
006636fe                          
00663711                          if (eax_2 != 0)
00663711                          {
00663717                              union edx_1;
00663717                              *(uint8_t*)((char*)edx_1 + 0) = ecx_2[0xfffffffe];
0066371a                              char var_28_1 = *(uint8_t*)((char*)edx_1 + 0);
0066371e                              *(uint8_t*)((char*)edx_1 + 0) = ecx_2[0xffffffff];
00663721                              char var_27_1 = *(uint8_t*)((char*)edx_1 + 0);
00663725                              *(uint8_t*)((char*)edx_1 + 0) = *(uint8_t*)ecx_2;
00663727                              char var_26_1 = *(uint8_t*)((char*)edx_1 + 0);
0066372b                              int80_t st2;
0066372b                              st2 = 0;
00663739                              int64_t st3 = _m_punpckhwd(0xffffff, 0);
0066373c                              char var_25_1 = 0xff;
00663746                              uint64_t st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
0066374c                              uint64_t st1 = _m_punpckhwd(((uint64_t)edi_2), 0);
00663764                              uint64_t st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066377d                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066377d                              
00663780                              if (eax_2 != 0xff)
00663780                              {
00663787                                  st3 = ((uint64_t)(eax_2 + 1));
0066378d                                  int64_t st4 = _m_punpcklwd(st3, st3);
00663796                                  st3 = _m_punpcklwd(st4, st4);
0066379c                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
006637ad                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00663780                              }
00663780                              else
00663782                                  st0 = st1;
00663782                              
006637b3                              int32_t eax_7 = _m_packuswb(st0, 0);
006637b8                              var_28_1 = eax_7;
006637bc                              ecx_2[0xfffffffe] = eax_7;
006637c9                              ecx_2[0xffffffff] = ((int8_t)(eax_7 >> 8));
006637cc                              *(uint8_t*)ecx_2 = ((int8_t)(var_28_1 >> 0x10));
00663711                          }
006637d0                      } while (i > 0);
006636d6                  }
006636d6                  
006637e8                  __inner1 += iStride_1;
006637f0                  __inner1_1 = (__inner1_2 + iStride);
006637f2                  cond:1_1 = nHeight_1 != 1;
006637f3                  __inner1_2 = __inner1_1;
006637f7                  nHeight_1 -= 1;
006637fb              } while (cond:1_1);
006636af          }
006636a3      }
00663680  }

0066380a                                cc cc cc cc cc cc                                                            ......

00663810  void BlitLoopNoScale<&BlitOp_Screen<BlitFormat_XRGB,BlitFormat_ARGB>,BlitFormat_XRGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00663810  {
00663825      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066382b      union __inner1 = arg1->cSrcArgs.__inner1;
0066382b      
0066382f      if (i8AlphaModifier != 0)
0066382f      {
00663835          uint32_t nHeight = arg1->nHeight;
00663835          
0066383b          if (nHeight > 0)
0066383b          {
00663841              uint32_t nWidth = arg1->nWidth;
00663844              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00663847              uint32_t iStride = arg1->cDstArgs.iStride;
0066384a              uint32_t nWidth_1 = nWidth;
00663856              uint32_t nHeight_1 = nHeight;
0066385a              union __inner1_1 = arg1->cDstArgs.__inner1;
0066396c              bool cond:1_1;
0066396c              
0066396c              do
0066396c              {
00663862                  if (nWidth > 0)
00663862                  {
0066386c                      int32_t* ecx_1 = (__inner1_1 + (nWidth << 2));
00663871                      uint32_t var_1c_1 = nWidth;
00663947                      uint32_t i;
00663947                      
00663947                      do
00663947                      {
00663880                          int32_t edx_1 = *(uint32_t*)(((__inner1 - __inner1_1) + ecx_1) - 4);
00663884                          ecx_1 -= 4;
0066388d                          int32_t var_20_1 = edx_1;
00663891                          *(uint8_t*)((char*)var_20_1)[3] = 0xff;
00663896                          int32_t eax_1 = 0xff;
00663896                          
0066389b                          if (i8AlphaModifier != 0xff)
0066389b                          {
006638a5                              int32_t eax_4;
006638a5                              char edx_2;
006638a5                              edx_2 = HIGHD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
006638a5                              eax_4 = LOWD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
006638ae                              eax_1 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066389b                          }
0066389b                          
006638b3                          if ((i8AlphaModifier == 0xff || eax_1 != 0))
006638b3                          {
006638c6                              int32_t edx_4 = *(uint32_t*)ecx_1;
006638c8                              int80_t st2;
006638c8                              st2 = 0;
006638ce                              int64_t st3 = _m_punpckhwd(0xffffff, 0);
006638d4                              uint64_t st0 = _m_punpckhwd(((uint64_t)edx_4), 0);
006638d7                              uint64_t st1 = _m_punpckhwd(((uint64_t)var_20_1), 0);
006638ef                              uint64_t st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00663908                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00663908                              
0066390b                              if (eax_1 != 0xff)
0066390b                              {
00663912                                  st3 = ((uint64_t)(eax_1 + 1));
00663918                                  int64_t st4 = _m_punpcklwd(st3, st3);
00663921                                  st3 = _m_punpcklwd(st4, st4);
00663927                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00663938                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066390b                              }
0066390b                              else
0066390d                                  st0 = st1;
0066390d                              
00663941                              *(uint32_t*)ecx_1 = _m_packuswb(st0, 0);
006638b3                          }
006638b3                          
00663943                          i = var_1c_1;
00663943                          var_1c_1 -= 1;
00663947                      } while (i != 1);
0066394d                      nWidth = nWidth_1;
00663862                  }
00663862                  
0066395f                  __inner1_1 += iStride;
00663963                  cond:1_1 = nHeight_1 != 1;
00663964                  __inner1 += iStride_1;
00663968                  nHeight_1 -= 1;
0066396c              } while (cond:1_1);
0066383b          }
0066382f      }
00663810  }

00663877                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
0066397b                                                                                   cc cc cc cc cc                             .....

00663980  void BlitLoopNoScale<&BlitOp_Screen<BlitFormat_XRGB,BlitFormat_RGB>,BlitFormat_XRGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00663980  {
0066398c      union __inner1 = arg1->cDstArgs.__inner1;
00663995      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066399b      union __inner1_2 = __inner1;
0066399b      
0066399f      if (i8AlphaModifier != 0)
0066399f      {
006639a5          uint32_t nHeight = arg1->nHeight;
006639a5          
006639ab          if (nHeight > 0)
006639ab          {
006639b1              uint32_t nWidth = arg1->nWidth;
006639b8              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006639bb              uint32_t iStride = arg1->cDstArgs.iStride;
006639c6              uint32_t nHeight_1 = nHeight;
006639ca              union __inner1_1 = arg1->cSrcArgs.__inner1;
00663afb              bool cond:1_1;
00663afb              
00663afb              do
00663afb              {
006639d0                  uint32_t i = nWidth;
006639d0                  
006639d6                  if (i > 0)
006639d6                  {
006639df                      char* ecx_2 = (((i * 3) + __inner1) + 2);
006639df                      
00663ad8                      do
00663ad8                      {
006639e3                          uint32_t edx_1 = *(uint32_t*)((__inner1_1 + (i << 2)) - 4);
006639e7                          i -= 1;
006639e8                          ecx_2 -= 3;
006639f1                          uint32_t var_20_1 = edx_1;
006639f5                          *(uint8_t*)((char*)var_20_1)[3] = 0xff;
006639fa                          int32_t eax_1 = 0xff;
006639fa                          
006639ff                          if (i8AlphaModifier != 0xff)
006639ff                          {
00663a09                              int32_t eax_4;
00663a09                              char edx;
00663a09                              edx = HIGHD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00663a09                              eax_4 = LOWD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00663a12                              eax_1 = ((eax_4 + ((uint32_t)edx)) >> 8);
006639ff                          }
006639ff                          
00663a17                          if ((i8AlphaModifier == 0xff || eax_1 != 0))
00663a17                          {
00663a1d                              edx_1 = ecx_2[0xfffffffe];
00663a25                              char var_24_1 = edx_1;
00663a29                              edx_1 = ecx_2[0xffffffff];
00663a2c                              char var_23_1 = edx_1;
00663a30                              edx_1 = *(uint8_t*)ecx_2;
00663a32                              char var_22_1 = edx_1;
00663a36                              int80_t st2;
00663a36                              st2 = 0;
00663a44                              int16_t st3[0x4] = _m_punpckhwd(0xffffff, 0);
00663a47                              char var_21_1 = 0xff;
00663a51                              uint64_t st0 = _m_punpckhwd(((uint64_t)var_24_1), 0);
00663a54                              uint64_t st1 = _m_punpckhwd(((uint64_t)var_20_1), 0);
00663a6c                              int64_t st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00663a85                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00663a85                              
00663a88                              if (eax_1 != 0xff)
00663a88                              {
00663a8f                                  st3 = ((uint64_t)(eax_1 + 1));
00663a95                                  int64_t st4 = _m_punpcklwd(st3, st3[0]);
00663a9e                                  st3 = _m_punpcklwd(st4, st4[0]);
00663aa4                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00663ab5                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00663a88                              }
00663a88                              else
00663a8a                                  st0 = st1;
00663a8a                              
00663abb                              int32_t eax_7 = _m_packuswb(st0, 0);
00663ac0                              var_24_1 = eax_7;
00663ac4                              ecx_2[0xfffffffe] = eax_7;
00663ad1                              ecx_2[0xffffffff] = ((int8_t)(eax_7 >> 8));
00663ad4                              *(uint8_t*)ecx_2 = ((int8_t)(var_24_1 >> 0x10));
00663a17                          }
00663ad8                      } while (i > 0);
006639d6                  }
006639d6                  
00663aea                  __inner1_1 += iStride_1;
00663af0                  __inner1 = (__inner1_2 + iStride);
00663af2                  cond:1_1 = nHeight_1 != 1;
00663af3                  __inner1_2 = __inner1;
00663af7                  nHeight_1 -= 1;
00663afb              } while (cond:1_1);
006639ab          }
0066399f      }
00663980  }

00663b0a                                cc cc cc cc cc cc                                                            ......

00663b10  void BlitLoopNoScale<&BlitOp_Screen<BlitFormat_RGB,BlitFormat_ARGB>,BlitFormat_RGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00663b10  {
00663b1c      union __inner1 = arg1->cSrcArgs.__inner1;
00663b25      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00663b2b      union __inner1_2 = __inner1;
00663b2b      
00663b2f      if (i8AlphaModifier != 0)
00663b2f      {
00663b35          uint32_t nHeight = arg1->nHeight;
00663b35          
00663b3b          if (nHeight > 0)
00663b3b          {
00663b41              uint32_t nWidth = arg1->nWidth;
00663b48              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00663b52              uint32_t iStride = arg1->cDstArgs.iStride;
00663b56              uint32_t nHeight_1 = nHeight;
00663b5a              union __inner1_1 = arg1->cDstArgs.__inner1;
00663c72              bool cond:1_1;
00663c72              
00663c72              do
00663c72              {
00663b60                  uint32_t i = nWidth;
00663b60                  
00663b66                  if (i > 0)
00663b66                  {
00663b6f                      char var_1d_1 = 0xff;
00663b74                      char* ecx_2 = (((i * 3) + __inner1) + 2);
00663b74                      
00663c4f                      do
00663c4f                      {
00663b80                          *(uint8_t*)((char*)__inner1 + 0) = ecx_2[0xfffffffb];
00663b83                          uint32_t eax_1;
00663b83                          eax_1 = ecx_2[0xfffffffc];
00663b86                          ecx_2 -= 3;
00663b89                          char var_20_1 = *(uint8_t*)((char*)__inner1 + 0);
00663b8d                          *(uint8_t*)((char*)__inner1 + 0) = *(uint8_t*)ecx_2;
00663b8f                          i -= 1;
00663b96                          char var_1f_1 = eax_1;
00663b9a                          char var_1e_1 = *(uint8_t*)((char*)__inner1 + 0);
00663b9e                          eax_1 = 0xff;
00663b9e                          
00663ba3                          if (i8AlphaModifier != 0xff)
00663ba3                          {
00663bad                              int32_t eax_4;
00663bad                              char edx;
00663bad                              edx = HIGHD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00663bad                              eax_4 = LOWD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00663bb6                              eax_1 = ((eax_4 + ((uint32_t)edx)) >> 8);
00663ba3                          }
00663ba3                          
00663bbb                          if ((i8AlphaModifier == 0xff || eax_1 != 0))
00663bbb                          {
00663bce                              __inner1 = *(uint32_t*)(__inner1_1 + (i << 2));
00663bd1                              int80_t st2;
00663bd1                              st2 = 0;
00663bd7                              int64_t st3 = _m_punpckhwd(0xffffff, 0);
00663bdd                              uint64_t st0 = _m_punpckhwd(((uint64_t)__inner1), 0);
00663be0                              uint64_t st1 = _m_punpckhwd(((uint64_t)var_20_1), 0);
00663bf8                              uint64_t st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00663c11                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00663c11                              
00663c14                              if (eax_1 != 0xff)
00663c14                              {
00663c1b                                  st3 = ((uint64_t)(eax_1 + 1));
00663c21                                  int64_t st4 = _m_punpcklwd(st3, st3);
00663c2a                                  st3 = _m_punpcklwd(st4, st4);
00663c30                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00663c41                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00663c14                              }
00663c14                              else
00663c16                                  st0 = st1;
00663c16                              
00663c4a                              *(uint32_t*)(__inner1_1 + (i << 2)) = _m_packuswb(st0, 0);
00663bbb                          }
00663c4f                      } while (i > 0);
00663b66                  }
00663b66                  
00663c65                  __inner1 = (__inner1_2 + iStride_1);
00663c67                  __inner1_1 += iStride;
00663c69                  cond:1_1 = nHeight_1 != 1;
00663c6a                  __inner1_2 = __inner1;
00663c6e                  nHeight_1 -= 1;
00663c72              } while (cond:1_1);
00663b3b          }
00663b2f      }
00663b10  }

00663b7a                                                                                8d 9b 00 00 00 00                            ......
00663c81     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00663c90  void BlitLoopNoScale<&BlitOp_Screen<BlitFormat_RGB,BlitFormat_RGB>,BlitFormat_RGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

00663c90  {
00663ca0      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00663ca7      union __inner1_1 = arg1->cSrcArgs.__inner1;
00663cab      union __inner1_2 = __inner1_1;
00663caf      union __inner1 = arg1->cDstArgs.__inner1;
00663caf      
00663cb3      if (i8AlphaModifier != 0)
00663cb3      {
00663cb9          uint32_t nHeight = arg1->nHeight;
00663cb9          
00663cbf          if (nHeight > 0)
00663cbf          {
00663cc5              uint32_t nWidth = arg1->nWidth;
00663cc8              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00663ccb              uint32_t iStride = arg1->cDstArgs.iStride;
00663cce              uint32_t nWidth_1 = nWidth;
00663cda              uint32_t nHeight_1 = nHeight;
00663e36              bool cond:1_1;
00663e36              
00663e36              do
00663e36              {
00663ce2                  if (nWidth > 0)
00663ce2                  {
00663cec                      uint32_t eax_1 = (nWidth * 3);
00663cef                      void* edi_2 = (eax_1 + __inner1_1);
00663cf2                      char* ecx_2 = ((eax_1 + __inner1) + 2);
00663cfa                      char var_25_1 = 0xff;
00663cff                      char* esi = (__inner1_1 - __inner1);
00663d01                      uint32_t var_20_1 = nWidth;
00663e07                      uint32_t i;
00663e07                      
00663e07                      do
00663e07                      {
00663d05                          nWidth = *(uint8_t*)((char*)edi_2 - 3);
00663d08                          union eax_2;
00663d08                          *(uint8_t*)((char*)eax_2 + 0) = *(uint8_t*)((esi + ecx_2) - 4);
00663d0c                          edi_2 -= 3;
00663d0f                          ecx_2 -= 3;
00663d18                          char var_28_1 = nWidth;
00663d1c                          nWidth = *(uint8_t*)(esi + ecx_2);
00663d1f                          char var_27_1 = *(uint8_t*)((char*)eax_2 + 0);
00663d23                          char var_26_1 = nWidth;
00663d27                          eax_2 = 0xff;
00663d27                          
00663d2c                          if (i8AlphaModifier != 0xff)
00663d2c                          {
00663d36                              int32_t eax_5;
00663d36                              char edx_1;
00663d36                              edx_1 = HIGHD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00663d36                              eax_5 = LOWD(((int64_t)((i8AlphaModifier + 1) * 0xff)));
00663d3f                              eax_2 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
00663d2c                          }
00663d2c                          
00663d44                          if ((i8AlphaModifier == 0xff || eax_2 != 0))
00663d44                          {
00663d4a                              nWidth = ecx_2[0xfffffffe];
00663d52                              char var_2c_1 = nWidth;
00663d56                              nWidth = ecx_2[0xffffffff];
00663d59                              char var_2b_1 = nWidth;
00663d5d                              nWidth = *(uint8_t*)ecx_2;
00663d5f                              char var_2a_1 = nWidth;
00663d63                              int80_t st2;
00663d63                              st2 = 0;
00663d71                              int16_t st3[0x4] = _m_punpckhwd(0xffffff, 0);
00663d74                              char var_29_1 = 0xff;
00663d7e                              uint64_t st0 = _m_punpckhwd(((uint64_t)var_2c_1), 0);
00663d81                              uint64_t st1 = _m_punpckhwd(((uint64_t)var_28_1), 0);
00663d99                              int64_t st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00663db2                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00663db2                              
00663db5                              if (eax_2 != 0xff)
00663db5                              {
00663dbc                                  st3 = ((uint64_t)(eax_2 + 1));
00663dc2                                  int64_t st4 = _m_punpcklwd(st3, st3[0]);
00663dcb                                  st3 = _m_punpcklwd(st4, st4[0]);
00663dd1                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00663de2                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00663db5                              }
00663db5                              else
00663db7                                  st0 = st1;
00663db7                              
00663de8                              int32_t eax_8 = _m_packuswb(st0, 0);
00663ded                              var_2c_1 = eax_8;
00663df1                              ecx_2[0xfffffffe] = eax_8;
00663dfe                              ecx_2[0xffffffff] = *(uint8_t*)((char*)(eax_8 >> 8) + 0);
00663e01                              *(uint8_t*)ecx_2 = (var_2c_1 >> 0x10);
00663d44                          }
00663d44                          
00663e03                          i = var_20_1;
00663e03                          var_20_1 -= 1;
00663e07                      } while (i != 1);
00663e0d                      nWidth = nWidth_1;
00663e11                      __inner1_1 = __inner1_2;
00663ce2                  }
00663ce2                  
00663e27                  __inner1_1 += iStride_1;
00663e29                  cond:1_1 = nHeight_1 != 1;
00663e2a                  __inner1_2 = __inner1_1;
00663e2e                  __inner1 += iStride;
00663e32                  nHeight_1 -= 1;
00663e36              } while (cond:1_1);
00663cbf          }
00663cb3      }
00663c90  }

00663e45                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

00663e50  void ColoringLoopNoScale<&BlitOp_SrcCopy<BlitFormat_Fill,BlitFormat_ARGB>,BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00663e50  {
00663e50      struct BlitArgs* eax = arg1;
00663e59      union __inner1 = eax->cDstArgs.__inner1;
00663e59      
00663e5f      if (eax->cSrcArgs.__inner1 == 0)
00663e5f      {
00663e93          arg1 = g_SourceColor.__inner0;
00663e97          union ecx_2;
00663e97          *(uint8_t*)((char*)ecx_2 + 0) = eax->i8AlphaModifier;
00663e9a          *(uint8_t*)((char*)arg1)[3] = *(uint8_t*)((char*)ecx_2 + 0);
00663e9e          uint32_t nHeight_1 = eax->nHeight;
00663e9e          
00663ea3          if (nHeight_1 > 0)
00663ea3          {
00663ea5              uint32_t nWidth_1 = eax->nWidth;
00663ea8              uint32_t iStride_1 = eax->cDstArgs.iStride;
00663eaf              uint32_t edi_2 = nHeight_1;
00663ec0              uint32_t i;
00663ec0              
00663ec0              do
00663ec0              {
00663eb1                  uint32_t ecx_3 = nWidth_1;
00663eb1                  
00663eb5                  if (ecx_3 > 0)
00663eb5                  {
00663ebb                      uint32_t j;
00663ebb                      
00663ebb                      do
00663ebb                      {
00663eb7                          j = ecx_3;
00663eb7                          ecx_3 -= 1;
00663eb8                          *(uint32_t*)(__inner1 + (ecx_3 << 2)) = arg1;
00663ebb                      } while (j != 1);
00663eb5                  }
00663eb5                  
00663ebd                  __inner1 -= iStride_1;
00663ebf                  i = edi_2;
00663ebf                  edi_2 -= 1;
00663ec0              } while (i != 1);
00663ea3          }
00663e5f      }
00663e5f      else
00663e5f      {
00663e61          uint32_t nHeight = eax->nHeight;
00663e61          
00663e66          if (nHeight > 0)
00663e66          {
00663e68              uint32_t nWidth = eax->nWidth;
00663e6b              uint32_t iStride = eax->cDstArgs.iStride;
00663e74              uint32_t edi_1 = nHeight;
00663e89              uint32_t i_1;
00663e89              
00663e89              do
00663e89              {
00663e76                  uint32_t ecx_1 = nWidth;
00663e76                  
00663e7a                  if (ecx_1 > 0)
00663e7a                  {
00663e84                      uint32_t j_1;
00663e84                      
00663e84                      do
00663e84                      {
00663e80                          j_1 = ecx_1;
00663e80                          ecx_1 -= 1;
00663e81                          *(uint32_t*)(__inner1 + (ecx_1 << 2)) = g_SourceColor.__inner0;
00663e84                      } while (j_1 != 1);
00663e7a                  }
00663e7a                  
00663e86                  __inner1 += iStride;
00663e88                  i_1 = edi_1;
00663e88                  edi_1 -= 1;
00663e89              } while (i_1 != 1);
00663e66          }
00663e5f      }
00663e50  }

00663ec8                          cc cc cc cc cc cc cc cc                                                          ........

00663ed0  void ColoringLoopNoScale<&BlitOp_SrcCopy<BlitFormat_Fill,BlitFormat_RGB>,BlitFormat_Fill,BlitFormat_RGB>(struct BlitArgs const* arg1)

00663ed0  {
00663ed0      union ecx;
00663ed0      union var_4 = ecx;
00663ed0      
00663ede      if (arg1->cSrcArgs.__inner1 == 0)
00663ede      {
00663f2a          uint32_t nHeight_1 = arg1->nHeight;
00663f2f          union __inner0_1 = g_SourceColor.__inner0;
00663f35          union __inner1_1 = arg1->cDstArgs.__inner1;
00663f35          
00663f3c          if (nHeight_1 > 0)
00663f3c          {
00663f3e              uint32_t nWidth_1 = arg1->nWidth;
00663f44              int32_t ebx;
00663f44              ebx = *(uint8_t*)((char*)__inner0_1 + 2);
00663f48              arg1 = arg1->cDstArgs.iStride;
00663f73              uint32_t i;
00663f73              
00663f73              do
00663f73              {
00663f52                  if (nWidth_1 > 0)
00663f52                  {
00663f58                      void* eax_6 = (((nWidth_1 * 3) + __inner1_1) + 2);
00663f5c                      uint32_t esi_2 = nWidth_1;
00663f6c                      uint32_t j;
00663f6c                      
00663f6c                      do
00663f6c                      {
00663f60                          eax_6 -= 3;
00663f63                          j = esi_2;
00663f63                          esi_2 -= 1;
00663f64                          *(uint8_t*)((char*)eax_6 - 2) = *(uint8_t*)((char*)__inner0_1 + 0);
00663f67                          *(uint8_t*)((char*)eax_6 - 1) = *(uint8_t*)((char*)__inner0_1 + 1);
00663f6a                          *(uint8_t*)eax_6 = ebx;
00663f6c                      } while (j != 1);
00663f52                  }
00663f52                  
00663f6e                  __inner1_1 -= arg1;
00663f72                  i = nHeight_1;
00663f72                  nHeight_1 -= 1;
00663f73              } while (i != 1);
00663f3c          }
00663ede      }
00663ede      else
00663ede      {
00663ee0          uint32_t nHeight = arg1->nHeight;
00663ee5          union __inner1 = arg1->cDstArgs.__inner1;
00663ee5          
00663ee8          if (nHeight > 0)
00663ee8          {
00663eee              uint32_t nWidth = arg1->nWidth;
00663ef4              char edx = *(uint32_t*)((char*)g_SourceColor.__inner0 + 2);
00663efa              uint32_t ebp_1 = nHeight;
00663efc              int16_t __inner0 = ((int16_t)g_SourceColor.__inner0);
00663f02              arg1 = arg1->cDstArgs.iStride;
00663f26              uint32_t i_1;
00663f26              
00663f26              do
00663f26              {
00663f08                  if (nWidth > 0)
00663f08                  {
00663f0d                      char* eax_3 = (((nWidth * 3) + __inner1) + 2);
00663f11                      uint32_t esi_1 = nWidth;
00663f1f                      uint32_t j_1;
00663f1f                      
00663f1f                      do
00663f1f                      {
00663f13                          eax_3 -= 3;
00663f16                          j_1 = esi_1;
00663f16                          esi_1 -= 1;
00663f17                          eax_3[0xfffffffe] = __inner0;
00663f1a                          eax_3[0xffffffff] = *(uint8_t*)((char*)__inner0)[1];
00663f1d                          *(uint8_t*)eax_3 = edx;
00663f1f                      } while (j_1 != 1);
00663f08                  }
00663f08                  
00663f21                  __inner1 += arg1;
00663f25                  i_1 = ebp_1;
00663f25                  ebp_1 -= 1;
00663f26              } while (i_1 != 1);
00663ee8          }
00663ede      }
00663ed0  }

00663f7d                                                                                         cc cc cc                               ...

00663f80  void ColoringLoopNoScale_FromA8<&BlitOp_SrcCopy<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00663f80  {
00663f83      struct BlitArgs* ecx = arg1;
00663f87      uint32_t nHeight = ecx->nHeight;
00663f8d      union __inner1 = ecx->cDstArgs.__inner1;
00663f91      union __inner1_1 = ecx->cSrcArgs.__inner1;
00663f94      arg1 = __inner1;
00663f94      
00663f98      if (nHeight > 0)
00663f98      {
00663f9e          uint32_t nWidth = ecx->nWidth;
00663fa5          uint32_t iStride_1 = ecx->cSrcArgs.iStride;
00663fa8          uint32_t iStride = ecx->cDstArgs.iStride;
00663fab          uint32_t i_3 = (nWidth >> 2);
00663fae          int32_t i_1 = (nWidth & 3);
00663fb1          uint32_t nHeight_1 = nHeight;
00663fb5          union __inner0 = g_SourceColor.__inner0;
00663fbb          int32_t i_2 = i_1;
00664066          bool cond:1_1;
00664066          
00664066          do
00664066          {
00663fc9              uint32_t i = i_3;
00663fc9              
00663fcb              if (i_3 > 0)
00663fcb              {
00663fd2                  int32_t* ecx_3 = ((i_3 << 4) + __inner1);
00663fd2                  
00664017                  do
00664017                  {
00663fd4                      int32_t eax_1 = *(uint32_t*)((__inner1_1 + (i << 2)) - 4);
00663fd8                      i -= 1;
00663fe3                      ecx_3 -= 0x10;
00663fe6                      int32_t eax_2 = (eax_1 << 8);
00663fe9                      ecx_3[3] = ((eax_1 & 0xff000000) | __inner0);
00663ff6                      int32_t eax_3 = (eax_2 << 8);
00663ff9                      ecx_3[2] = ((eax_2 & 0xff000000) | __inner0);
00664012                      ecx_3[1] = ((eax_3 & 0xff000000) | __inner0);
00664015                      *(uint32_t*)ecx_3 = (((eax_3 & 0xffff0000) << 8) | __inner0);
00664017                  } while (i > 0);
00664017                  
00664019                  i_1 = i_2;
00663fcb              }
00663fcb              
00664031              if ((i_1 != 0 && i_1 > 0))
00664031              {
00664043                  do
00664043                  {
00664033                      uint32_t ebp_10 = ((uint32_t)*(uint8_t*)((i_1 + (__inner1_1 + (i_3 << 2))) - 1));
00664038                      i_1 -= 1;
00664040                      *(uint32_t*)(((i_3 << 4) + arg1) + (i_1 << 2)) = ((ebp_10 << 0x18) | __inner0);
00664043                  } while (i_1 > 0);
00664043                  
00664045                  i_1 = i_2;
00664031              }
00664031              
00664055              __inner1_1 += iStride_1;
0066405b              __inner1 = ((char*)arg1 + iStride);
0066405d              cond:1_1 = nHeight_1 != 1;
0066405e              arg1 = __inner1;
00664062              nHeight_1 -= 1;
00664066          } while (cond:1_1);
00663f98      }
00663f80  }

00664076                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00664080  void ColoringLoopNoScale_FromA8<&BlitOp_SrcCopy<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_RGB>(struct BlitArgs const* arg1)

00664080  {
00664087      uint32_t nHeight = arg1->nHeight;
00664090      union __inner1_1 = arg1->cSrcArgs.__inner1;
00664093      union __inner1 = arg1->cDstArgs.__inner1;
00664093      
00664097      if (nHeight > 0)
00664097      {
0066409d          uint32_t nWidth = arg1->nWidth;
006640a2          uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006640a5          uint32_t iStride = arg1->cDstArgs.iStride;
006640aa          uint32_t i_3 = (nWidth >> 2);
006640ad          int32_t i_2 = (nWidth & 3);
006640b4          union __inner0 = g_SourceColor.__inner0;
006640bb          int32_t i_4 = i_2;
006640c3          uint32_t nHeight_1 = nHeight;
006641c2          bool cond:2_1;
006641c2          
006641c2          do
006641c2          {
006640d2              uint32_t i = i_3;
006640d2              
006640d4              if (i_3 > 0)
006640d4              {
006640e1                  uint8_t* eax_1 = ((__inner1 + (i_3 * 0xc)) + 0xb);
006640e1                  
0066415d                  do
0066415d                  {
006640e5                      int32_t ecx_2 = *(uint32_t*)((__inner1_1 + (i << 2)) - 4);
006640e9                      eax_1 -= 0xc;
006640f4                      struct BlitArgs* edx_3 = ((ecx_2 & 0xff000000) | __inner0);
006640f6                      i -= 1;
006640f7                      eax_1[0xfffffffe] = edx_3;
006640fa                      eax_1[0xffffffff] = *(uint8_t*)((char*)edx_3)[1];
006640fd                      arg1 = edx_3;
00664104                      *(uint8_t*)eax_1 = ((int8_t)(edx_3 >> 0x10));
00664106                      int32_t ecx_3 = (ecx_2 << 8);
00664111                      struct BlitArgs* edx_7 = ((ecx_3 & 0xff000000) | __inner0);
00664113                      eax_1[0xfffffffb] = edx_7;
00664116                      eax_1[0xfffffffc] = *(uint8_t*)((char*)edx_7)[1];
00664119                      arg1 = edx_7;
00664120                      int32_t ecx_4 = (ecx_3 << 8);
00664123                      eax_1[0xfffffffd] = ((int8_t)(edx_7 >> 0x10));
00664134                      struct BlitArgs* edx_11 = ((ecx_4 & 0xff000000) | __inner0);
00664139                      struct BlitArgs* ecx_7 = (((ecx_4 & 0xffff0000) << 8) | __inner0);
0066413b                      arg1 = edx_11;
0066413f                      eax_1[0xfffffff8] = edx_11;
00664142                      eax_1[0xfffffff9] = *(uint8_t*)((char*)edx_11)[1];
00664148                      arg1 = ecx_7;
0066414c                      eax_1[0xfffffff5] = ecx_7;
0066414f                      eax_1[0xfffffff6] = *(uint8_t*)((char*)ecx_7)[1];
00664157                      eax_1[0xfffffffa] = ((int8_t)(edx_11 >> 0x10));
0066415a                      eax_1[0xfffffff7] = ((int8_t)(ecx_7 >> 0x10));
0066415d                  } while (i > 0);
0066415d                  
0066415f                  i_2 = i_4;
006640d4              }
006640d4              
00664165              if (i_2 != 0)
00664165              {
00664175                  int32_t i_1 = i_2;
00664175                  
00664177                  if (i_2 > 0)
00664177                  {
0066417c                      uint8_t* ecx_9 = (((i_2 * 3) + (__inner1 + (i_3 * 0xc))) + 2);
0066417c                      
0066419f                      do
0066419f                      {
00664180                          uint32_t eax_5 = ((uint32_t)*(uint8_t*)((i_1 + (__inner1_1 + (i_3 << 2))) - 1));
00664185                          i_1 -= 1;
00664189                          struct BlitArgs* eax_7 = ((eax_5 << 0x18) | __inner0);
0066418b                          ecx_9 -= 3;
0066418e                          arg1 = eax_7;
00664192                          ecx_9[0xfffffffe] = eax_7;
00664195                          ecx_9[0xffffffff] = *(uint8_t*)((char*)eax_7)[1];
0066419d                          *(uint8_t*)ecx_9 = ((int8_t)(eax_7 >> 0x10));
0066419f                      } while (i_1 > 0);
0066419f                      
006641a1                      i_2 = i_4;
00664177                  }
00664165              }
00664165              
006641b1              __inner1_1 += iStride_1;
006641b9              cond:2_1 = nHeight_1 != 1;
006641ba              __inner1 += iStride;
006641be              nHeight_1 -= 1;
006641c2          } while (cond:2_1);
00664097      }
00664080  }

006640c9                             8d a4 24 00 00 00 00                                                           ..$....
006641d2                                                        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                    ..............

006641e0  void ColoringLoopNoScale<&BlitOp_SrcCopy<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

006641e0  {
006641e0      struct BlitArgs* eax_3 = arg1;
006641e4      union __inner1 = eax_3->cSrcArgs.__inner1;
006641e4      
006641ef      if (__inner1 == 0)
006641ef      {
00664268          union __inner1_1 = eax_3->cDstArgs.__inner1;
0066426b          arg1 = g_SourceColor.__inner0;
0066426f          union ecx_3;
0066426f          *(uint8_t*)((char*)ecx_3 + 0) = eax_3->i8AlphaModifier;
00664272          *(uint8_t*)((char*)arg1)[3] = *(uint8_t*)((char*)ecx_3 + 0);
00664276          uint32_t nHeight_1 = eax_3->nHeight;
00664276          
0066427b          if (nHeight_1 > 0)
0066427b          {
0066427d              uint32_t nWidth = eax_3->nWidth;
00664280              uint32_t iStride_1 = eax_3->cDstArgs.iStride;
00664287              uint32_t edi_1 = nHeight_1;
0066429f              uint32_t i;
0066429f              
0066429f              do
0066429f              {
00664290                  uint32_t ecx_4 = nWidth;
00664290                  
00664294                  if (ecx_4 > 0)
00664294                  {
0066429a                      uint32_t j;
0066429a                      
0066429a                      do
0066429a                      {
00664296                          j = ecx_4;
00664296                          ecx_4 -= 1;
00664297                          *(uint32_t*)(__inner1_1 + (ecx_4 << 2)) = arg1;
0066429a                      } while (j != 1);
00664294                  }
00664294                  
0066429c                  __inner1_1 -= iStride_1;
0066429e                  i = edi_1;
0066429e                  edi_1 -= 1;
0066429f              } while (i != 1);
0066427b          }
006641ef      }
006641ef      else
006641ef      {
006641f1          union __inner1_2 = eax_3->cDstArgs.__inner1;
006641f4          union __inner1_3 = __inner1;
006641f6          uint32_t nHeight = eax_3->nHeight;
006641f6          
006641fb          if (nHeight > 0)
006641fb          {
00664201              uint32_t iStride_2 = eax_3->cSrcArgs.iStride;
00664204              uint32_t nWidth_1 = eax_3->nWidth;
00664207              uint32_t iStride = eax_3->cDstArgs.iStride;
00664212              arg1 = nHeight;
0066425d              bool cond:2_1;
0066425d              
0066425d              do
0066425d              {
00664219                  if (nWidth_1 > 0)
00664219                  {
0066421d                      int32_t* eax = (__inner1_2 + (nWidth_1 << 2));
00664222                      uint32_t edx_1 = nWidth_1;
00664246                      uint32_t i_1;
00664246                      
00664246                      do
00664246                      {
00664230                          int32_t ebp_1 = *(uint32_t*)(((__inner1_3 - __inner1_2) + eax) - 4);
00664234                          eax -= 4;
00664243                          i_1 = edx_1;
00664243                          edx_1 -= 1;
00664244                          *(uint32_t*)eax = ((ebp_1 & 0xff000000) | g_SourceColor.__inner0);
00664246                      } while (i_1 != 1);
00664219                  }
00664219                  
00664254                  __inner1_3 += iStride_2;
00664256                  __inner1_2 += iStride;
00664258                  cond:2_1 = arg1 != 1;
00664259                  arg1 -= 1;
0066425d              } while (cond:2_1);
006641fb          }
006641ef      }
006641e0  }

00664226                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.
006642aa                                cc cc cc cc cc cc                                                            ......

006642b0  void ColoringLoopNoScale<&BlitOp_SrcCopy<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_AXXX,BlitFormat_RGB>(struct BlitArgs const* arg1)

006642b0  {
006642b9      union __inner1 = arg1->cDstArgs.__inner1;
006642bd      union __inner1_1 = arg1->cSrcArgs.__inner1;
006642bd      
006642c3      if (__inner1_1 == 0)
006642c3      {
00664333          uint32_t nHeight_1 = arg1->nHeight;
00664338          int24_t __inner0 = ((int3_t)g_SourceColor.__inner0);
00664338          
00664342          if (nHeight_1 > 0)
00664342          {
00664344              uint32_t nWidth_1 = arg1->nWidth;
0066434a              int32_t ebx;
0066434a              ebx = *(uint8_t*)((char*)__inner0)[2];
0066434e              arg1 = arg1->cDstArgs.iStride;
00664373              uint32_t i;
00664373              
00664373              do
00664373              {
00664354                  if (nWidth_1 > 0)
00664354                  {
0066435a                      void* eax_7 = (((nWidth_1 * 3) + __inner1) + 2);
0066435e                      uint32_t esi = nWidth_1;
0066436c                      uint32_t j;
0066436c                      
0066436c                      do
0066436c                      {
00664360                          eax_7 -= 3;
00664363                          j = esi;
00664363                          esi -= 1;
00664364                          *(uint8_t*)((char*)eax_7 - 2) = __inner0;
00664367                          *(uint8_t*)((char*)eax_7 - 1) = *(uint8_t*)((char*)__inner0)[1];
0066436a                          *(uint8_t*)eax_7 = ebx;
0066436c                      } while (j != 1);
00664354                  }
00664354                  
0066436e                  __inner1 -= arg1;
00664372                  i = nHeight_1;
00664372                  nHeight_1 -= 1;
00664373              } while (i != 1);
00664342          }
006642c3      }
006642c3      else
006642c3      {
006642c5          uint32_t nHeight = arg1->nHeight;
006642c5          
006642ca          if (nHeight > 0)
006642ca          {
006642d0              uint32_t nWidth = arg1->nWidth;
006642dd              uint32_t iStride = arg1->cSrcArgs.iStride;
006642e7              arg1 = arg1->cDstArgs.iStride;
006642eb              uint32_t ebx_1 = nHeight;
0066432f              uint32_t i_1;
0066432f              
0066432f              do
0066432f              {
006642f0                  uint32_t j_1 = nWidth;
006642f0                  
006642f6                  if (j_1 > 0)
006642f6                  {
006642fc                      char* ecx_2 = (((j_1 * 3) + __inner1) + 2);
006642fc                      
00664320                      do
00664320                      {
00664300                          int32_t eax_1 = *(uint32_t*)((__inner1_1 + (j_1 << 2)) - 4);
00664304                          j_1 -= 1;
0066430a                          int32_t eax_3 = ((eax_1 & 0xff000000) | g_SourceColor.__inner0);
0066430c                          ecx_2 -= 3;
0066430f                          int32_t var_8_1 = eax_3;
00664313                          ecx_2[0xfffffffe] = eax_3;
00664316                          ecx_2[0xffffffff] = *(uint8_t*)((char*)eax_3)[1];
0066431e                          *(uint8_t*)ecx_2 = ((int8_t)(eax_3 >> 0x10));
00664320                      } while (j_1 > 0);
006642f6                  }
006642f6                  
0066432a                  __inner1_1 += iStride;
0066432c                  __inner1 += arg1;
0066432e                  i_1 = ebx_1;
0066432e                  ebx_1 -= 1;
0066432f              } while (i_1 != 1);
006642ca          }
006642c3      }
006642b0  }

0066437f                                                                                               cc                                 .

00664380  void ColoringLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_Fill,BlitFormat_ARGB>,BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00664380  {
00664393      union __inner1 = arg1->cDstArgs.__inner1;
00664397      int64_t st0;
00664397      int80_t st1;
00664397      int64_t st2;
00664397      int16_t st3[0x4];
00664397      uint64_t st4;
00664397      
00664397      if (arg1->cSrcArgs.__inner1 == 0)
00664397      {
006644b8          union __inner0 = g_SourceColor.__inner0;
006644bc          uint32_t nHeight_1 = arg1->nHeight;
006644c1          *(uint8_t*)((char*)__inner0 + 3) = arg1->i8AlphaModifier;
006644c1          
006644c5          if (nHeight_1 > 0)
006644c5          {
006644cb              uint32_t nWidth_1 = arg1->nWidth;
006644ce              uint32_t iStride_1 = arg1->cDstArgs.iStride;
006644dd              uint32_t nHeight_3 = nHeight_1;
00664593              bool cond:3_1;
00664593              
00664593              do
00664593              {
006644e1                  uint32_t i = nWidth_1;
006644e1                  
006644e7                  if (i > 0)
006644e7                  {
006644f1                      uint32_t ecx_5 = (__inner0 >> 0x18);
006644f1                      
0066457e                      do
0066457e                      {
006644fc                          i -= 1;
006644fc                          
006644ff                          if (ecx_5 != 0)
006644ff                          {
00664501                              int32_t edx_6 = *(uint32_t*)(__inner1 + (i << 2));
00664501                              
0066450b                              if (ecx_5 != 0xff)
0066450b                              {
0066451e                                  st1 = 0;
0066452c                                  st2 = _m_punpckhwd(0xffffff, 0);
00664535                                  st0 = _m_punpckhwd(((uint64_t)edx_6), 0);
00664547                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066454a                                  st3 = ((uint64_t)(ecx_5 + 1));
00664550                                  st4 = _m_punpcklwd(st3, st3[0]);
00664559                                  st3 = _m_punpcklwd(st4, st4[0]);
00664562                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00664579                                  *(uint32_t*)(__inner1 + (i << 2)) = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066450b                              }
0066450b                              else
00664519                                  *(uint32_t*)(__inner1 + (i << 2)) = (((edx_6 ^ __inner0) & 0xffffff) ^ edx_6);
006644ff                          }
0066457e                      } while (i > 0);
006644e7                  }
006644e7                  
0066458c                  __inner1 -= iStride_1;
0066458e                  cond:3_1 = nHeight_3 != 1;
0066458f                  nHeight_3 -= 1;
00664593              } while (cond:3_1);
006644c5          }
00664397      }
00664397      else
00664397      {
0066439d          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006643a5          int32_t ecx_1;
006643a5          ecx_1 = i8AlphaModifier != 0;
006643a8          int32_t ebx_1 = (i8AlphaModifier + ecx_1);
006643aa          uint32_t nHeight = arg1->nHeight;
006643af          int32_t var_c_1 = ebx_1;
006643af          
006643b3          if (nHeight > 0)
006643b3          {
006643b9              uint32_t nWidth = arg1->nWidth;
006643bc              uint32_t iStride = arg1->cDstArgs.iStride;
006643bf              union __inner0_1 = g_SourceColor.__inner0;
006643cd              uint32_t nHeight_2 = nHeight;
006644a4              bool cond:4_1;
006644a4              
006644a4              do
006644a4              {
006643d1                  uint32_t i_1 = nWidth;
006643d1                  
006643d7                  if (i_1 > 0)
006643d7                  {
006643dd                      uint32_t edx_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
006643dd                      
0066448f                      do
0066448f                      {
006643f0                          uint32_t eax_4 = edx_1;
006643f4                          i_1 -= 1;
006643f4                          
006643fb                          if (ebx_1 != 0x100)
006643fb                          {
00664400                              int32_t eax_2;
00664400                              char edx_2;
00664400                              edx_2 = HIGHD(((int64_t)(eax_4 * ebx_1)));
00664400                              eax_2 = LOWD(((int64_t)(eax_4 * ebx_1)));
00664409                              eax_4 = ((eax_2 + ((uint32_t)edx_2)) >> 8);
006643fb                          }
006643fb                          
0066440e                          if (eax_4 != 0)
0066440e                          {
00664410                              int32_t edx_4 = *(uint32_t*)(__inner1 + (i_1 << 2));
00664410                              
00664419                              if (eax_4 != 0xff)
00664419                              {
00664430                                  st1 = 0;
00664436                                  ebx_1 = var_c_1;
0066443d                                  st2 = _m_punpckhwd(0xffffff, 0);
00664446                                  st0 = _m_punpckhwd(((uint64_t)edx_4), 0);
00664458                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0_1), 0) & st2) | (st2 & !(st0)));
0066445b                                  st3 = ((uint64_t)(eax_4 + 1));
00664461                                  st4 = _m_punpcklwd(st3, st3[0]);
0066446a                                  st3 = _m_punpcklwd(st4, st4[0]);
00664473                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066448a                                  *(uint32_t*)(__inner1 + (i_1 << 2)) = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00664419                              }
00664419                              else
00664426                                  *(uint32_t*)(__inner1 + (i_1 << 2)) = (((__inner0_1 ^ edx_4) & 0xffffff) ^ edx_4);
0066440e                          }
0066448f                      } while (i_1 > 0);
006643d7                  }
006643d7                  
0066449d                  __inner1 += iStride;
0066449f                  cond:4_1 = nHeight_2 != 1;
006644a0                  nHeight_2 -= 1;
006644a4              } while (cond:4_1);
006643b3          }
00664397      }
00664380  }

006643ea                                8d 9b 00 00 00 00                                                            ......
006645a2        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

006645b0  void ColoringLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_Fill,BlitFormat_RGB>,BlitFormat_Fill,BlitFormat_RGB>(struct BlitArgs const* arg1)

006645b0  {
006645c4      int64_t st0;
006645c4      int80_t st1;
006645c4      int64_t st2;
006645c4      int16_t st3[0x4];
006645c4      uint64_t st4;
006645c4      
006645c4      if (arg1->cSrcArgs.__inner1 == 0)
006645c4      {
00664733          union __inner1_1 = arg1->cDstArgs.__inner1;
00664736          union __inner0 = g_SourceColor.__inner0;
0066473a          union ecx_6;
0066473a          *(uint8_t*)((char*)ecx_6 + 0) = arg1->i8AlphaModifier;
0066473d          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_6 + 0);
00664741          uint32_t nHeight_1 = arg1->nHeight;
00664746          union __inner1_2 = __inner1_1;
00664746          
0066474a          if (nHeight_1 > 0)
0066474a          {
00664750              uint32_t nWidth_1 = arg1->nWidth;
00664753              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066475e              uint32_t nHeight_3 = nHeight_1;
00664869              bool cond:2_1;
00664869              
00664869              do
00664869              {
00664764                  if (nWidth_1 > 0)
00664764                  {
00664771                      uint32_t edi_3 = (__inner0 >> 0x18);
00664774                      char* eax_17 = (((nWidth_1 * 3) + __inner1_1) + 2);
00664778                      uint32_t var_14_1 = nWidth_1;
0066484c                      uint32_t i;
0066484c                      
0066484c                      do
0066484c                      {
00664782                          eax_17 -= 3;
00664782                          
00664787                          if (edi_3 != 0)
00664787                          {
0066478d                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_17[0xfffffffe];
00664790                              char var_24_2 = *(uint8_t*)((char*)__inner1_1 + 0);
00664794                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_17[0xffffffff];
0066479e                              char var_23_2 = *(uint8_t*)((char*)__inner1_1 + 0);
006647a2                              *(uint8_t*)((char*)__inner1_1 + 0) = *(uint8_t*)eax_17;
006647a4                              char var_22_2 = *(uint8_t*)((char*)__inner1_1 + 0);
006647a8                              char var_21_2 = 0xff;
006647a8                              
006647ad                              if (edi_3 != 0xff)
006647ad                              {
006647e3                                  st1 = 0;
006647e6                                  st2 = _m_punpckhwd(0xffffff, 0);
006647ec                                  st0 = _m_punpckhwd(((uint64_t)var_24_2), 0);
006647fe                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
00664801                                  st3 = ((uint64_t)(edi_3 + 1));
00664807                                  st4 = _m_punpcklwd(st3, st3[0]);
00664810                                  st3 = _m_punpcklwd(st4, st4[0]);
00664819                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066482d                                  int32_t ecx_15 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00664832                                  var_24_2 = ecx_15;
00664836                                  eax_17[0xfffffffe] = ecx_15;
00664843                                  eax_17[0xffffffff] = ((int8_t)(ecx_15 >> 8));
00664846                                  *(uint8_t*)eax_17 = *(uint8_t*)((char*)(var_24_2 >> 0x10) + 0);
006647ad                              }
006647ad                              else
006647ad                              {
006647af                                  __inner1_1 = var_24_2;
006647bd                                  int32_t ecx_13 = (((__inner1_1 ^ __inner0) & 0xffffff) ^ __inner1_1);
006647bf                                  int32_t var_c_1 = ecx_13;
006647c3                                  eax_17[0xfffffffe] = ecx_13;
006647c6                                  eax_17[0xffffffff] = *(uint8_t*)((char*)ecx_13)[1];
006647cc                                  *(uint8_t*)eax_17 = ((int8_t)(ecx_13 >> 0x10));
006647ad                              }
00664787                          }
00664787                          
00664848                          i = var_14_1;
00664848                          var_14_1 -= 1;
0066484c                      } while (i != 1);
00664764                  }
00664764                  
0066485e                  __inner1_1 = (__inner1_2 - iStride_1);
00664860                  cond:2_1 = nHeight_3 != 1;
00664861                  __inner1_2 = __inner1_1;
00664865                  nHeight_3 -= 1;
00664869              } while (cond:2_1);
0066474a          }
006645c4      }
006645c4      else
006645c4      {
006645ca          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006645d5          int32_t edx;
006645d5          edx = i8AlphaModifier != 0;
006645d8          union __inner1 = arg1->cDstArgs.__inner1;
006645dc          uint32_t nHeight = arg1->nHeight;
006645df          int32_t esi_1 = (i8AlphaModifier + edx);
006645df          
006645e3          if (nHeight > 0)
006645e3          {
006645e9              uint32_t nWidth = arg1->nWidth;
006645ec              uint32_t iStride = arg1->cDstArgs.iStride;
006645ef              union __inner0_1 = g_SourceColor.__inner0;
006645f5              uint32_t nWidth_2 = nWidth;
006645fd              uint32_t nHeight_2 = nHeight;
00664722              bool cond:3_1;
00664722              
00664722              do
00664722              {
00664603                  if (nWidth > 0)
00664603                  {
0066460d                      uint32_t edi_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
00664617                      char* ecx_3 = (((nWidth * 3) + __inner1) + 2);
0066461b                      uint32_t var_18_1 = nWidth;
00664701                      uint32_t i_1;
00664701                      
00664701                      do
00664701                      {
00664620                          ecx_3 -= 3;
00664629                          uint32_t eax_2 = edi_1;
00664629                          
0066462b                          if (esi_1 != 0x100)
0066462b                          {
00664630                              int32_t eax_4;
00664630                              char edx_1;
00664630                              edx_1 = HIGHD(((int64_t)(eax_2 * esi_1)));
00664630                              eax_4 = LOWD(((int64_t)(eax_2 * esi_1)));
00664639                              eax_2 = ((eax_4 + ((uint32_t)edx_1)) >> 8);
0066462b                          }
0066462b                          
0066463e                          if (eax_2 != 0)
0066463e                          {
00664644                              nWidth = ecx_3[0xfffffffe];
00664647                              char var_24_1 = nWidth;
0066464b                              nWidth = ecx_3[0xffffffff];
00664654                              char var_23_1 = nWidth;
00664658                              nWidth = *(uint8_t*)ecx_3;
0066465a                              char var_22_1 = nWidth;
0066465e                              char var_21_1 = 0xff;
0066465e                              
00664663                              if (eax_2 != 0xff)
00664663                              {
00664698                                  st1 = 0;
0066469b                                  st2 = _m_punpckhwd(0xffffff, 0);
006646a1                                  st0 = _m_punpckhwd(((uint64_t)var_24_1), 0);
006646b3                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0_1), 0) & st2) | (st2 & !(st0)));
006646b6                                  st3 = ((uint64_t)(eax_2 + 1));
006646bc                                  st4 = _m_punpcklwd(st3, st3[0]);
006646c5                                  st3 = _m_punpcklwd(st4, st4[0]);
006646ce                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
006646e2                                  int32_t eax_12 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
006646e7                                  var_24_1 = eax_12;
006646eb                                  ecx_3[0xfffffffe] = eax_12;
006646f8                                  ecx_3[0xffffffff] = ((int8_t)(eax_12 >> 8));
006646fb                                  *(uint8_t*)ecx_3 = (var_24_1 >> 0x10);
00664663                              }
00664663                              else
00664663                              {
00664665                                  nWidth = var_24_1;
00664672                                  int32_t eax_10 = (((__inner0_1 ^ nWidth) & 0xffffff) ^ nWidth);
00664674                                  int32_t var_10_1 = eax_10;
00664678                                  ecx_3[0xfffffffe] = eax_10;
0066467b                                  ecx_3[0xffffffff] = *(uint8_t*)((char*)eax_10)[1];
00664681                                  *(uint8_t*)ecx_3 = ((int8_t)(eax_10 >> 0x10));
00664663                              }
0066463e                          }
0066463e                          
006646fd                          i_1 = var_18_1;
006646fd                          var_18_1 -= 1;
00664701                      } while (i_1 != 1);
00664707                      nWidth = nWidth_2;
00664603                  }
00664603                  
00664719                  cond:3_1 = nHeight_2 != 1;
0066471a                  __inner1 += iStride;
0066471e                  nHeight_2 -= 1;
00664722              } while (cond:3_1);
006645e3          }
006645c4      }
006645b0  }

00664878                                                                          cc cc cc cc cc cc cc cc                          ........

00664880  void ColoringLoopNoScale_FromA8<&BlitOp_ThreeChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00664880  {
00664893      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00664897      union __inner1 = arg1->cSrcArgs.__inner1;
0066489f      int32_t ecx_1;
0066489f      ecx_1 = i8AlphaModifier != 0;
006648a2      union __inner1_1 = arg1->cDstArgs.__inner1;
006648a6      uint32_t nHeight = arg1->nHeight;
006648ab      int32_t ebx = (i8AlphaModifier + ecx_1);
006648af      int32_t var_20 = ebx;
006648af      
006648b3      if (nHeight > 0)
006648b3      {
006648b9          uint32_t nWidth = arg1->nWidth;
006648bc          uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006648bf          uint32_t iStride = arg1->cDstArgs.iStride;
006648c4          uint32_t i_5 = (nWidth >> 2);
006648c7          int32_t i_2 = (nWidth & 3);
006648ce          int32_t i_4 = i_2;
006648da          uint32_t nHeight_1 = nHeight;
006648de          uint32_t i_3 = i_5;
00664afe          bool cond:1_1;
00664afe          
00664afe          do
00664afe          {
006648e2              uint32_t i = i_3;
006648e4              uint64_t st0;
006648e4              int80_t st1;
006648e4              int64_t st2;
006648e4              int16_t st3[0x4];
006648e4              int64_t st4;
006648e4              
006648e4              if (i_3 > 0)
006648e4              {
006648f1                  int32_t edi_3 = ((i_3 << 4) + __inner1_1);
006648f1                  
006649da                  do
006649da                  {
006648f7                      int32_t ecx_4 = *(uint32_t*)((__inner1 + (i << 2)) - 4);
00664900                      edi_3 -= 0x10;
00664903                      int32_t var_24_1 = ecx_4;
00664907                      int32_t esi_1 = 3;
006649ce                      int32_t temp1_1;
006649ce                      
006649ce                      do
006649ce                      {
0066491b                          int32_t ecx_6 = ((ecx_4 & 0xff000000) | g_SourceColor.__inner0);
0066491f                          uint32_t eax_4 = (ecx_6 >> 0x18);
00664928                          int32_t var_2c_1 = ecx_6;
00664928                          
0066492c                          if (ebx != 0x100)
0066492c                          {
00664931                              int32_t eax_6;
00664931                              char edx_1;
00664931                              edx_1 = HIGHD(((int64_t)(eax_4 * ebx)));
00664931                              eax_6 = LOWD(((int64_t)(eax_4 * ebx)));
0066493a                              eax_4 = ((eax_6 + ((uint32_t)edx_1)) >> 8);
0066492c                          }
0066492c                          
0066493f                          if (eax_4 != 0)
0066493f                          {
00664945                              int32_t edx_3 = *(uint32_t*)(edi_3 + (esi_1 << 2));
00664945                              
0066494e                              if (eax_4 != 0xff)
0066494e                              {
00664965                                  st1 = 0;
0066496b                                  ebx = var_20;
00664972                                  st2 = _m_punpckhwd(0xffffff, 0);
0066497b                                  st0 = _m_punpckhwd(((uint64_t)edx_3), 0);
0066498d                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_6), 0) & st2) | (st2 & !(st0)));
00664990                                  st3 = ((uint64_t)(eax_4 + 1));
00664996                                  st4 = _m_punpcklwd(st3, st3[0]);
0066499f                                  st3 = _m_punpcklwd(st4, st4[0]);
006649a8                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
006649bf                                  *(uint32_t*)(edi_3 + (esi_1 << 2)) = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066494e                              }
0066494e                              else
0066495b                                  *(uint32_t*)(edi_3 + (esi_1 << 2)) = (((edx_3 ^ ecx_6) & 0xffffff) ^ edx_3);
0066493f                          }
0066493f                          
006649c6                          ecx_4 = (var_24_1 << 8);
006649c9                          temp1_1 = esi_1;
006649c9                          esi_1 -= 1;
006649ca                          var_24_1 = ecx_4;
006649ce                      } while ((temp1_1 - 1) >= 0);
006649d4                      i -= 1;
006649da                  } while (i > 0);
006649da                  
006649e0                  i_3 = i_5;
006649e4                  i_2 = i_4;
006648e4              }
006648e4              
006649ea              if (i_2 != 0)
006649ea              {
006649fe                  int32_t edi_5 = ((i_3 << 4) + __inner1_1);
00664a06                  int32_t i_1 = i_2;
00664a06                  
00664a08                  if (i_2 > 0)
00664a08                  {
00664acb                      do
00664acb                      {
00664a14                          uint32_t ecx_10 = ((uint32_t)*(uint8_t*)((i_1 + (__inner1 + (i_3 << 2))) - 1));
00664a1e                          i_1 -= 1;
00664a22                          int32_t ecx_12 = ((ecx_10 << 0x18) | g_SourceColor.__inner0);
00664a26                          uint32_t eax_16 = (ecx_12 >> 0x18);
00664a2f                          int32_t var_2c_2 = ecx_12;
00664a2f                          
00664a33                          if (ebx != 0x100)
00664a33                          {
00664a38                              int32_t eax_18;
00664a38                              char edx_6;
00664a38                              edx_6 = HIGHD(((int64_t)(eax_16 * ebx)));
00664a38                              eax_18 = LOWD(((int64_t)(eax_16 * ebx)));
00664a41                              eax_16 = ((eax_18 + ((uint32_t)edx_6)) >> 8);
00664a33                          }
00664a33                          
00664a46                          if (eax_16 != 0)
00664a46                          {
00664a4c                              int32_t edx_8 = *(uint32_t*)(edi_5 + (i_1 << 2));
00664a4c                              
00664a55                              if (eax_16 != 0xff)
00664a55                              {
00664a6c                                  st1 = 0;
00664a72                                  ebx = var_20;
00664a79                                  st2 = _m_punpckhwd(0xffffff, 0);
00664a82                                  st0 = _m_punpckhwd(((uint64_t)edx_8), 0);
00664a94                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_12), 0) & st2) | (st2 & !(st0)));
00664a97                                  st3 = ((uint64_t)(eax_16 + 1));
00664a9d                                  st4 = _m_punpcklwd(st3, st3[0]);
00664aa6                                  st3 = _m_punpcklwd(st4, st4[0]);
00664aaf                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00664ac6                                  *(uint32_t*)(edi_5 + (i_1 << 2)) = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00664a55                              }
00664a55                              else
00664a62                                  *(uint32_t*)(edi_5 + (i_1 << 2)) = (((edx_8 ^ ecx_12) & 0xffffff) ^ edx_8);
00664a46                          }
00664acb                      } while (i_1 > 0);
00664acb                      
00664ad1                      i_2 = i_4;
00664a08                  }
00664a08                  
00664ad5                  i_3 = i_5;
006649ea              }
006649ea              
00664af1              cond:1_1 = nHeight_1 != 1;
00664af2              __inner1 += iStride_1;
00664af6              __inner1_1 += iStride;
00664afa              nHeight_1 -= 1;
00664afe          } while (cond:1_1);
006648b3      }
00664880  }

00664b0d                                         cc cc cc                                                               ...

00664b10  void ColoringLoopNoScale_FromA8<&BlitOp_ThreeChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_RGB>(struct BlitArgs const* arg1)

00664b10  {
00664b1f      union __inner1 = arg1->cSrcArgs.__inner1;
00664b23      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00664b2b      int32_t edx;
00664b2b      edx = i8AlphaModifier != 0;
00664b31      union __inner1_1 = arg1->cDstArgs.__inner1;
00664b34      union __inner1_2 = __inner1_1;
00664b38      uint32_t ecx_1 = (i8AlphaModifier + edx);
00664b3a      uint32_t nHeight = arg1->nHeight;
00664b3a      
00664b43      if (nHeight > 0)
00664b43      {
00664b49          uint32_t nWidth = arg1->nWidth;
00664b4c          uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00664b4f          uint32_t iStride = arg1->cDstArgs.iStride;
00664b54          uint32_t esi_2 = (nWidth >> 2);
00664b57          int32_t i_2 = (nWidth & 3);
00664b5a          uint32_t var_1c_1 = esi_2;
00664b5e          int32_t i_4 = i_2;
00664b6a          uint32_t nHeight_1 = nHeight;
00664b6e          union __inner1_3 = __inner1_1;
00664e1a          bool cond:1_1;
00664e1a          
00664e1a          do
00664e1a          {
00664b72              uint32_t eax_1 = esi_2;
00664b74              uint64_t st0;
00664b74              int80_t st1;
00664b74              int64_t st2;
00664b74              int16_t st3[0x4];
00664b74              int64_t st4;
00664b74              
00664b74              if (esi_2 > 0)
00664b74              {
00664b7d                  char* ecx_3 = ((__inner1_3 + (esi_2 * 0xc)) + 0xb);
00664b7d                  
00664b94                  while (true)
00664b94                  {
00664b94                      int32_t edi = *(uint32_t*)((__inner1 + (eax_1 << 2)) - 4);
00664b99                      char* ecx_4 = (ecx_3 - 0xc);
00664ba0                      char* var_14_1 = ecx_4;
00664ba4                      int32_t i_3 = 4;
00664ca8                      int32_t i;
00664ca8                      
00664ca8                      do
00664ca8                      {
00664bc1                          int32_t esi_5 = ((edi & 0xff000000) | g_SourceColor.__inner0);
00664bc5                          uint32_t eax_5 = (esi_5 >> 0x18);
00664bce                          int32_t var_30_1 = esi_5;
00664bce                          
00664bd2                          if (ecx_1 != 0x100)
00664bd2                          {
00664bd7                              int32_t eax_7;
00664bd7                              char edx_3;
00664bd7                              edx_3 = HIGHD(((int64_t)(eax_5 * ecx_1)));
00664bd7                              eax_7 = LOWD(((int64_t)(eax_5 * ecx_1)));
00664be0                              eax_5 = ((eax_7 + ((uint32_t)edx_3)) >> 8);
00664bd2                          }
00664bd2                          
00664be5                          if (eax_5 != 0)
00664be5                          {
00664beb                              uint32_t edx_2;
00664beb                              edx_2 = ecx_4[0xfffffffe];
00664bee                              char var_3c_1 = edx_2;
00664bf2                              edx_2 = ecx_4[0xffffffff];
00664bfb                              char var_3b_1 = edx_2;
00664bff                              edx_2 = *(uint8_t*)ecx_4;
00664c01                              char var_3a_1 = edx_2;
00664c05                              char var_39_1 = 0xff;
00664c05                              
00664c0a                              if (eax_5 != 0xff)
00664c0a                              {
00664c3c                                  st1 = 0;
00664c3f                                  st2 = _m_punpckhwd(0xffffff, 0);
00664c45                                  st0 = _m_punpckhwd(((uint64_t)var_3c_1), 0);
00664c57                                  st2 = ((_m_punpckhwd(((uint64_t)esi_5), 0) & st2) | (st2 & !(st0)));
00664c5a                                  st3 = ((uint64_t)(eax_5 + 1));
00664c60                                  st4 = _m_punpcklwd(st3, st3[0]);
00664c69                                  st3 = _m_punpcklwd(st4, st4[0]);
00664c72                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00664c86                                  int32_t eax_15 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00664c8b                                  var_3c_1 = eax_15;
00664c8f                                  ecx_4[0xfffffffe] = eax_15;
00664c9c                                  ecx_4[0xffffffff] = ((int8_t)(eax_15 >> 8));
00664c9f                                  *(uint8_t*)ecx_4 = ((int8_t)(var_3c_1 >> 0x10));
00664c0a                              }
00664c0a                              else
00664c0a                              {
00664c0c                                  int32_t edx_4 = var_3c_1;
00664c19                                  int32_t eax_13 = (((edx_4 ^ esi_5) & 0xffffff) ^ edx_4);
00664c1b                                  int32_t var_30_2 = eax_13;
00664c1f                                  ecx_4[0xfffffffe] = eax_13;
00664c22                                  ecx_4[0xffffffff] = *(uint8_t*)((char*)eax_13)[1];
00664c28                                  *(uint8_t*)ecx_4 = ((int8_t)(eax_13 >> 0x10));
00664c0a                              }
00664be5                          }
00664be5                          
00664ca1                          edi <<= 8;
00664ca4                          ecx_4 -= 3;
00664ca7                          i = i_3;
00664ca7                          i_3 -= 1;
00664ca8                      } while (i != 1);
00664ca8                      
00664cb4                      if ((eax_1 - 1) <= 0)
00664cb4                          break;
00664cb4                      
00664b83                      ecx_3 = var_14_1;
00664b87                      eax_1 -= 1;
00664b94                  }
00664b94                  
00664cba                  i_2 = i_4;
00664cbe                  esi_2 = var_1c_1;
00664b74              }
00664b74              
00664cc4              if (i_2 != 0)
00664cc4              {
00664cdb                  int32_t i_1 = i_2;
00664cdb                  
00664cdd                  if (i_2 > 0)
00664cdd                  {
00664ce6                      char* ecx_5 = (((i_2 * 3) + (__inner1_2 + (esi_2 * 0xc))) + 2);
00664ce6                      
00664de7                      do
00664de7                      {
00664cf0                          uint32_t esi_6 = ((uint32_t)*(uint8_t*)((i_1 + (__inner1 + (esi_2 << 2))) - 1));
00664cfe                          i_1 -= 1;
00664d02                          int32_t esi_8 = ((esi_6 << 0x18) | g_SourceColor.__inner0);
00664d06                          ecx_5 -= 3;
00664d09                          uint32_t eax_23 = (esi_8 >> 0x18);
00664d12                          int32_t var_30_3 = esi_8;
00664d12                          
00664d16                          if (ecx_1 != 0x100)
00664d16                          {
00664d1b                              int32_t eax_25;
00664d1b                              char edx_11;
00664d1b                              edx_11 = HIGHD(((int64_t)(eax_23 * ecx_1)));
00664d1b                              eax_25 = LOWD(((int64_t)(eax_23 * ecx_1)));
00664d24                              eax_23 = ((eax_25 + ((uint32_t)edx_11)) >> 8);
00664d16                          }
00664d16                          
00664d29                          if (eax_23 != 0)
00664d29                          {
00664d2f                              uint32_t edx_10;
00664d2f                              edx_10 = ecx_5[0xfffffffe];
00664d32                              char var_38_1 = edx_10;
00664d36                              edx_10 = ecx_5[0xffffffff];
00664d3f                              char var_37_1 = edx_10;
00664d43                              edx_10 = *(uint8_t*)ecx_5;
00664d45                              char var_36_1 = edx_10;
00664d49                              char var_35_1 = 0xff;
00664d49                              
00664d4e                              if (eax_23 != 0xff)
00664d4e                              {
00664d80                                  st1 = 0;
00664d83                                  st2 = _m_punpckhwd(0xffffff, 0);
00664d89                                  st0 = _m_punpckhwd(((uint64_t)var_38_1), 0);
00664d9b                                  st2 = ((_m_punpckhwd(((uint64_t)esi_8), 0) & st2) | (st2 & !(st0)));
00664d9e                                  st3 = ((uint64_t)(eax_23 + 1));
00664da4                                  st4 = _m_punpcklwd(st3, st3[0]);
00664dad                                  st3 = _m_punpcklwd(st4, st4[0]);
00664db6                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00664dca                                  int32_t eax_33 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00664dcf                                  var_38_1 = eax_33;
00664dd3                                  ecx_5[0xfffffffe] = eax_33;
00664de0                                  ecx_5[0xffffffff] = ((int8_t)(eax_33 >> 8));
00664de3                                  *(uint8_t*)ecx_5 = ((int8_t)(var_38_1 >> 0x10));
00664d4e                              }
00664d4e                              else
00664d4e                              {
00664d50                                  int32_t edx_12 = var_38_1;
00664d5d                                  int32_t eax_31 = (((edx_12 ^ esi_8) & 0xffffff) ^ edx_12);
00664d5f                                  int32_t var_14_2 = eax_31;
00664d63                                  ecx_5[0xfffffffe] = eax_31;
00664d66                                  ecx_5[0xffffffff] = *(uint8_t*)((char*)eax_31)[1];
00664d6c                                  *(uint8_t*)ecx_5 = ((int8_t)(eax_31 >> 0x10));
00664d4e                              }
00664d29                          }
00664de7                      } while (i_1 > 0);
00664de7                      
00664ded                      i_2 = i_4;
00664df1                      esi_2 = var_1c_1;
00664cdd                  }
00664cc4              }
00664cc4              
00664e07              __inner1 += iStride_1;
00664e0f              __inner1_3 = (__inner1_2 + iStride);
00664e11              cond:1_1 = nHeight_1 != 1;
00664e12              __inner1_2 = __inner1_3;
00664e16              nHeight_1 -= 1;
00664e1a          } while (cond:1_1);
00664b43      }
00664b10  }

00664b8d                                         8d 49 00                                                               .I.
00664e29                             cc cc cc cc cc cc cc                                                           .......

00664e30  void ColoringLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00664e30  {
00664e3c      union __inner1 = arg1->cSrcArgs.__inner1;
00664e44      uint64_t st0;
00664e44      int80_t st1;
00664e44      int64_t st2;
00664e44      int16_t st3[0x4];
00664e44      int64_t st4;
00664e44      
00664e44      if (__inner1 == 0)
00664e44      {
00664fa9          union __inner1_2 = arg1->cDstArgs.__inner1;
00664fac          union __inner0 = g_SourceColor.__inner0;
00664fb0          uint32_t nHeight_1 = arg1->nHeight;
00664fb5          *(uint8_t*)((char*)__inner0 + 3) = arg1->i8AlphaModifier;
00664fb5          
00664fb9          if (nHeight_1 > 0)
00664fb9          {
00664fbf              uint32_t nWidth = arg1->nWidth;
00664fc2              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00664fd1              uint32_t nHeight_3 = nHeight_1;
00665092              bool cond:4_1;
00665092              
00665092              do
00665092              {
00664fe0                  uint32_t i = nWidth;
00664fe0                  
00664fe6                  if (i > 0)
00664fe6                  {
00664ff0                      uint32_t ecx_9 = (__inner0 >> 0x18);
00664ff0                      
0066507d                      do
0066507d                      {
00664ffb                          i -= 1;
00664ffb                          
00664ffe                          if (ecx_9 != 0)
00664ffe                          {
00665000                              int32_t edx_4 = *(uint32_t*)(__inner1_2 + (i << 2));
00665000                              
0066500a                              if (ecx_9 != 0xff)
0066500a                              {
0066501d                                  st1 = 0;
0066502b                                  st2 = _m_punpckhwd(0xffffff, 0);
00665034                                  st0 = _m_punpckhwd(((uint64_t)edx_4), 0);
00665046                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
00665049                                  st3 = ((uint64_t)(ecx_9 + 1));
0066504f                                  st4 = _m_punpcklwd(st3, st3[0]);
00665058                                  st3 = _m_punpcklwd(st4, st4[0]);
00665061                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00665078                                  *(uint32_t*)(__inner1_2 + (i << 2)) = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066500a                              }
0066500a                              else
00665018                                  *(uint32_t*)(__inner1_2 + (i << 2)) = (((edx_4 ^ __inner0) & 0xffffff) ^ edx_4);
00664ffe                          }
0066507d                      } while (i > 0);
00664fe6                  }
00664fe6                  
0066508b                  __inner1_2 -= iStride_1;
0066508d                  cond:4_1 = nHeight_3 != 1;
0066508e                  nHeight_3 -= 1;
00665092              } while (cond:4_1);
00664fb9          }
00664e44      }
00664e44      else
00664e44      {
00664e4a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00664e4e          union __inner1_1 = arg1->cDstArgs.__inner1;
00664e51          union __inner1_3 = __inner1;
00664e59          int32_t ecx;
00664e59          ecx = i8AlphaModifier != 0;
00664e5c          union __inner1_4 = __inner1_1;
00664e60          int32_t ebx_1 = (i8AlphaModifier + ecx);
00664e62          uint32_t nHeight = arg1->nHeight;
00664e62          
00664e6b          if (nHeight > 0)
00664e6b          {
00664e71              uint32_t nWidth_1 = arg1->nWidth;
00664e74              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
00664e77              uint32_t iStride = arg1->cDstArgs.iStride;
00664e7a              uint32_t nWidth_2 = nWidth_1;
00664e86              uint32_t nHeight_2 = nHeight;
00664e8a              int32_t ebx_2 = ebx_1;
00664f95              bool cond:3_1;
00664f95              
00664f95              do
00664f95              {
00664e92                  if (nWidth_1 > 0)
00664e92                  {
00664ea0                      int32_t* esi_1 = (__inner1_1 + (nWidth_1 << 2));
00664ea5                      uint32_t i_2 = nWidth_2;
00664f66                      uint32_t i_1;
00664f66                      
00664f66                      do
00664f66                      {
00664eb0                          int32_t ecx_2 = *(uint32_t*)(((__inner1_3 - __inner1_1) + esi_1) - 4);
00664eb9                          esi_1 -= 4;
00664ec2                          int32_t ecx_4 = ((ecx_2 & 0xff000000) | g_SourceColor.__inner0);
00664ec6                          uint32_t eax_3 = (ecx_4 >> 0x18);
00664ecf                          int32_t var_14_1 = ecx_4;
00664ecf                          
00664ed3                          if (ebx_2 != 0x100)
00664ed3                          {
00664ed8                              int32_t eax_5;
00664ed8                              char edx_1;
00664ed8                              edx_1 = HIGHD(((int64_t)(eax_3 * ebx_2)));
00664ed8                              eax_5 = LOWD(((int64_t)(eax_3 * ebx_2)));
00664ee1                              eax_3 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
00664ed3                          }
00664ed3                          
00664ee6                          if (eax_3 != 0)
00664ee6                          {
00664ee8                              int32_t edx_3 = *(uint32_t*)esi_1;
00664ee8                              
00664ef0                              if (eax_3 != 0xff)
00664ef0                              {
00664f06                                  st1 = 0;
00664f0c                                  ebx_2 = ebx_1;
00664f13                                  st2 = _m_punpckhwd(0xffffff, 0);
00664f1c                                  st0 = _m_punpckhwd(((uint64_t)edx_3), 0);
00664f2e                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_4), 0) & st2) | (st2 & !(st0)));
00664f31                                  st3 = ((uint64_t)(eax_3 + 1));
00664f37                                  st4 = _m_punpcklwd(st3, st3[0]);
00664f40                                  st3 = _m_punpcklwd(st4, st4[0]);
00664f49                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
00664f60                                  *(uint32_t*)esi_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00664ef0                              }
00664ef0                              else
00664efd                                  *(uint32_t*)esi_1 = (((edx_3 ^ ecx_4) & 0xffffff) ^ edx_3);
00664ee6                          }
00664ee6                          
00664f62                          i_1 = i_2;
00664f62                          i_2 -= 1;
00664f66                      } while (i_1 != 1);
00664f6c                      __inner1_1 = __inner1_4;
00664f70                      nWidth_1 = nWidth_2;
00664e92                  }
00664e92                  
00664f86                  __inner1_1 += iStride;
00664f88                  cond:3_1 = nHeight_2 != 1;
00664f89                  __inner1_3 += iStride_2;
00664f8d                  __inner1_4 = __inner1_1;
00664f91                  nHeight_2 -= 1;
00664f95              } while (cond:3_1);
00664e6b          }
00664e44      }
00664e30  }

00664fd7                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
006650a1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

006650b0  void ColoringLoopNoScale<&BlitOp_ThreeChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_AXXX,BlitFormat_RGB>(struct BlitArgs const* arg1)

006650b0  {
006650bc      union __inner1 = arg1->cSrcArgs.__inner1;
006650c4      uint64_t st0;
006650c4      int80_t st1;
006650c4      int64_t st2;
006650c4      int16_t st3[0x4];
006650c4      int64_t st4;
006650c4      
006650c4      if (__inner1 == 0)
006650c4      {
00665258          union __inner1_1 = arg1->cDstArgs.__inner1;
0066525b          union __inner0 = g_SourceColor.__inner0;
0066525f          union ecx_4;
0066525f          *(uint8_t*)((char*)ecx_4 + 0) = arg1->i8AlphaModifier;
00665262          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_4 + 0);
00665266          uint32_t nHeight_1 = arg1->nHeight;
0066526b          union __inner1_5 = __inner1_1;
0066526b          
0066526f          if (nHeight_1 > 0)
0066526f          {
00665275              uint32_t nWidth_1 = arg1->nWidth;
00665278              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00665283              uint32_t nHeight_3 = nHeight_1;
00665387              bool cond:2_1;
00665387              
00665387              do
00665387              {
00665289                  if (nWidth_1 > 0)
00665289                  {
00665296                      uint32_t edi_2 = (__inner0 >> 0x18);
00665299                      char* eax_18 = (((nWidth_1 * 3) + __inner1_1) + 2);
0066529d                      uint32_t var_18_1 = nWidth_1;
0066536a                      uint32_t i;
0066536a                      
0066536a                      do
0066536a                      {
006652a3                          eax_18 -= 3;
006652a3                          
006652a8                          if (edi_2 != 0)
006652a8                          {
006652ae                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_18[0xfffffffe];
006652b1                              char var_28_2 = *(uint8_t*)((char*)__inner1_1 + 0);
006652b5                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_18[0xffffffff];
006652bf                              char var_27_2 = *(uint8_t*)((char*)__inner1_1 + 0);
006652c3                              *(uint8_t*)((char*)__inner1_1 + 0) = *(uint8_t*)eax_18;
006652c5                              char var_26_2 = *(uint8_t*)((char*)__inner1_1 + 0);
006652c9                              char var_25_2 = 0xff;
006652c9                              
006652ce                              if (edi_2 != 0xff)
006652ce                              {
00665301                                  st1 = 0;
00665304                                  st2 = _m_punpckhwd(0xffffff, 0);
0066530a                                  st0 = _m_punpckhwd(((uint64_t)var_28_2), 0);
0066531c                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066531f                                  st3 = ((uint64_t)(edi_2 + 1));
00665325                                  st4 = _m_punpcklwd(st3, st3[0]);
0066532e                                  st3 = _m_punpcklwd(st4, st4[0]);
00665337                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066534b                                  int32_t ecx_13 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00665350                                  var_28_2 = ecx_13;
00665354                                  eax_18[0xfffffffe] = ecx_13;
00665361                                  eax_18[0xffffffff] = ((int8_t)(ecx_13 >> 8));
00665364                                  *(uint8_t*)eax_18 = *(uint8_t*)((char*)(var_28_2 >> 0x10) + 0);
006652ce                              }
006652ce                              else
006652ce                              {
006652d0                                  __inner1_1 = var_28_2;
006652de                                  int32_t ecx_11 = (((__inner1_1 ^ __inner0) & 0xffffff) ^ __inner1_1);
006652e0                                  int32_t var_c_2 = ecx_11;
006652e4                                  eax_18[0xfffffffe] = ecx_11;
006652e7                                  eax_18[0xffffffff] = *(uint8_t*)((char*)ecx_11)[1];
006652ed                                  *(uint8_t*)eax_18 = ((int8_t)(ecx_11 >> 0x10));
006652ce                              }
006652a8                          }
006652a8                          
00665366                          i = var_18_1;
00665366                          var_18_1 -= 1;
0066536a                      } while (i != 1);
00665289                  }
00665289                  
0066537c                  __inner1_1 = (__inner1_5 - iStride_1);
0066537e                  cond:2_1 = nHeight_3 != 1;
0066537f                  __inner1_5 = __inner1_1;
00665383                  nHeight_3 -= 1;
00665387              } while (cond:2_1);
0066526f          }
006650c4      }
006650c4      else
006650c4      {
006650ca          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006650ce          union __inner1_2 = arg1->cDstArgs.__inner1;
006650d1          union __inner1_3 = __inner1;
006650d9          int32_t ecx;
006650d9          ecx = i8AlphaModifier != 0;
006650dc          union __inner1_4 = __inner1_2;
006650e0          int32_t ebx_1 = (i8AlphaModifier + ecx);
006650e2          uint32_t nHeight = arg1->nHeight;
006650e2          
006650e7          if (nHeight > 0)
006650e7          {
006650ed              uint32_t nWidth = arg1->nWidth;
006650f4              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
006650f7              uint32_t iStride = arg1->cDstArgs.iStride;
00665102              uint32_t nHeight_2 = nHeight;
00665247              bool cond:4_1;
00665247              
00665247              do
00665247              {
00665110                  uint32_t i_1 = nWidth;
00665110                  
00665116                  if (i_1 > 0)
00665116                  {
0066511f                      char* ecx_2 = (((i_1 * 3) + __inner1_2) + 2);
0066511f                      
0066521c                      do
0066521c                      {
00665127                          int32_t esi_1 = *(uint32_t*)((__inner1_3 + (i_1 << 2)) - 4);
00665130                          i_1 -= 1;
00665137                          int32_t esi_3 = ((esi_1 & 0xff000000) | g_SourceColor.__inner0);
0066513b                          ecx_2 -= 3;
0066513e                          uint32_t eax_3 = (esi_3 >> 0x18);
00665147                          int32_t var_10_1 = esi_3;
00665147                          
0066514b                          if (ebx_1 != 0x100)
0066514b                          {
00665150                              int32_t eax_5;
00665150                              char edx_1;
00665150                              edx_1 = HIGHD(((int64_t)(eax_3 * ebx_1)));
00665150                              eax_5 = LOWD(((int64_t)(eax_3 * ebx_1)));
00665159                              eax_3 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
0066514b                          }
0066514b                          
0066515e                          if (eax_3 != 0)
0066515e                          {
00665164                              union edx_2;
00665164                              *(uint8_t*)((char*)edx_2 + 0) = ecx_2[0xfffffffe];
00665167                              char var_28_1 = *(uint8_t*)((char*)edx_2 + 0);
0066516b                              *(uint8_t*)((char*)edx_2 + 0) = ecx_2[0xffffffff];
00665174                              char var_27_1 = *(uint8_t*)((char*)edx_2 + 0);
00665178                              *(uint8_t*)((char*)edx_2 + 0) = *(uint8_t*)ecx_2;
0066517a                              char var_26_1 = *(uint8_t*)((char*)edx_2 + 0);
0066517e                              char var_25_1 = 0xff;
0066517e                              
00665183                              if (eax_3 != 0xff)
00665183                              {
006651b5                                  st1 = 0;
006651b8                                  st2 = _m_punpckhwd(0xffffff, 0);
006651be                                  st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
006651d0                                  st2 = ((_m_punpckhwd(((uint64_t)esi_3), 0) & st2) | (st2 & !(st0)));
006651d3                                  st3 = ((uint64_t)(eax_3 + 1));
006651d9                                  st4 = _m_punpcklwd(st3, st3[0]);
006651e2                                  st3 = _m_punpcklwd(st4, st4[0]);
006651eb                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
006651ff                                  int32_t eax_13 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
00665204                                  var_28_1 = eax_13;
00665208                                  ecx_2[0xfffffffe] = eax_13;
00665215                                  ecx_2[0xffffffff] = ((int8_t)(eax_13 >> 8));
00665218                                  *(uint8_t*)ecx_2 = ((int8_t)(var_28_1 >> 0x10));
00665183                              }
00665183                              else
00665183                              {
00665185                                  int32_t edx_3 = var_28_1;
00665192                                  int32_t eax_11 = (((edx_3 ^ esi_3) & 0xffffff) ^ edx_3);
00665194                                  int32_t var_10_2 = eax_11;
00665198                                  ecx_2[0xfffffffe] = eax_11;
0066519b                                  ecx_2[0xffffffff] = *(uint8_t*)((char*)eax_11)[1];
006651a1                                  *(uint8_t*)ecx_2 = ((int8_t)(eax_11 >> 0x10));
00665183                              }
0066515e                          }
0066521c                      } while (i_1 > 0);
00665116                  }
00665116                  
00665238                  __inner1_2 = (__inner1_4 + iStride);
0066523a                  cond:4_1 = nHeight_2 != 1;
0066523b                  __inner1_3 += iStride_2;
0066523f                  __inner1_4 = __inner1_2;
00665243                  nHeight_2 -= 1;
00665247              } while (cond:4_1);
006650e7          }
006650c4      }
006650b0  }

00665108                          8d a4 24 00 00 00 00 90                                                          ..$.....
00665396                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

006653a0  void ColoringLoopNoScale<&BlitOp_Colorize<BlitFormat_Fill,BlitFormat_ARGB>,BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

006653a0  {
006653b0      int32_t var_48;
006653b0      int32_t var_38;
006653b0      int32_t var_34;
006653b0      int32_t var_30;
006653b0      int32_t var_2c;
006653b0      
006653b0      if (arg1->cSrcArgs.__inner1 == 0)
006653b0      {
0066581c          union __inner0 = g_SourceColor.__inner0;
00665820          uint32_t nHeight_1 = arg1->nHeight;
00665825          union __inner1_1 = arg1->cDstArgs.__inner1;
00665829          union edx_42;
00665829          *(uint8_t*)((char*)edx_42 + 0) = arg1->i8AlphaModifier;
0066582c          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)edx_42 + 0);
0066582c          
00665830          if (nHeight_1 > 0)
00665830          {
00665836              uint32_t nWidth_1 = arg1->nWidth;
00665839              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00665844              uint32_t nHeight_3 = nHeight_1;
00665b78              bool cond:4_1;
00665b78              
00665b78              do
00665b78              {
00665850                  uint32_t i = nWidth_1;
00665850                  
00665856                  if (i > 0)
00665856                  {
00665860                      uint32_t ecx_16 = (__inner0 >> 0x18);
00665860                      
00665b5b                      do
00665b5b                      {
0066586b                          i -= 1;
00665870                          int32_t edx_43;
00665870                          edx_43 = ecx_16 != 0;
00665877                          int32_t ecx_18 = (ecx_16 + edx_43);
00665877                          
0066587d                          if (ecx_16 != -(edx_43))
0066587d                          {
00665887                              struct BlitArgs* edx_44 = *(uint32_t*)(__inner1_1 + (i << 2));
0066588a                              uint32_t ecx_20 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 2));
0066588f                              uint32_t esi_13 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 1));
00665894                              uint32_t edi_18 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 0));
0066589d                              int32_t eax_79;
0066589d                              eax_79 = ecx_20 != 0;
006658a6                              int32_t ecx_21 = (ecx_20 + eax_79);
006658aa                              int32_t edx_45;
006658aa                              edx_45 = esi_13 != 0;
006658af                              int32_t ebx_10 = ecx_21;
006658b1                              int32_t esi_14 = (esi_13 + edx_45);
006658b5                              int32_t eax_80;
006658b5                              eax_80 = edi_18 != 0;
006658b8                              int32_t edi_19 = (edi_18 + eax_80);
006658bc                              int32_t eax_81 = ecx_21;
006658bc                              
006658be                              if (esi_14 > ecx_21)
006658c0                                  ebx_10 = esi_14;
006658be                              else if (esi_14 < ecx_21)
006658c6                                  eax_81 = esi_14;
006658c6                              
006658ca                              if (edi_19 > ebx_10)
006658cc                                  ebx_10 = edi_19;
006658ca                              else if (edi_19 < eax_81)
006658d4                                  eax_81 = edi_19;
006658d4                              
006658d8                              int32_t edx_47 = (ebx_10 - eax_81);
006658de                              int32_t var_40_1;
006658de                              int32_t ebp_16;
006658de                              int32_t esi_15;
006658de                              
006658de                              if (ebx_10 != eax_81)
006658de                              {
006658f4                                  int32_t ebp_17 = 0;
006658f8                                  var_40_1 = (((int64_t)(edx_47 << 8)) / ebx_10);
006658fc                                  int32_t ecx_22;
006658fc                                  
006658fc                                  if (ecx_21 == ebx_10)
006658fc                                  {
00665900                                      ecx_22 = (esi_14 - edi_19);
00665900                                      
00665902                                      if ((esi_14 - edi_19) < 0)
00665904                                          ebp_17 = 0x6000;
006658fc                                  }
006658fc                                  else if (esi_14 != ebx_10)
0066590d                                  {
0066591a                                      ecx_22 = (ecx_21 - esi_14);
0066591c                                      ebp_17 = 0x4000;
0066590d                                  }
0066590d                                  else
0066590d                                  {
00665911                                      ecx_22 = (edi_19 - ecx_21);
00665913                                      ebp_17 = 0x2000;
0066590d                                  }
0066590d                                  
0066592d                                  esi_15 = ((((int64_t)(ecx_22 << 0xc)) / edx_47) + ebp_17);
0066592f                                  ebp_16 = var_40_1;
006658de                              }
006658de                              else
006658de                              {
006658e0                                  esi_15 = 0;
006658e2                                  ebp_16 = 0;
006658e4                                  var_40_1 = 0;
006658de                              }
006658de                              
00665933                              uint32_t eax_90 = ((uint32_t)*(uint8_t*)((char*)edx_44)[1]);
00665938                              uint32_t edx_52 = ((uint32_t)edx_44);
0066593d                              uint32_t edi_21 = ((uint32_t)*(uint8_t*)((char*)edx_44)[2]);
00665946                              int32_t ecx_23;
00665946                              ecx_23 = eax_90 != 0;
00665955                              int32_t eax_91 = (eax_90 + ecx_23);
0066595b                              int32_t ecx_24;
0066595b                              ecx_24 = edx_52 != 0;
0066595e                              int32_t edx_53 = (edx_52 + ecx_24);
00665964                              int32_t ecx_25;
00665964                              ecx_25 = edi_21 != 0;
00665967                              int32_t ecx_26 = (ecx_25 + edi_21);
00665967                              
0066596b                              if (eax_91 > ecx_26)
0066596d                                  ecx_26 = eax_91;
0066596d                              
00665971                              if (edx_53 > ecx_26)
00665973                                  ecx_26 = edx_53;
00665973                              
0066597d                              if (ecx_18 != 0x100)
0066597d                              {
00665aaa                                  int32_t edx_63;
00665aaa                                  int32_t esi_20;
00665aaa                                  
00665aaa                                  if (ebp_16 != 0)
00665aaa                                  {
00665b8f                                      int32_t eax_137;
00665b8f                                      char edx_74;
00665b8f                                      edx_74 = HIGHD(((int64_t)(ecx_26 * var_40_1)));
00665b8f                                      eax_137 = LOWD(((int64_t)(ecx_26 * var_40_1)));
00665b9c                                      int32_t eax_140;
00665b9c                                      int32_t edx_76;
00665b9c                                      edx_76 = HIGHD(((int64_t)esi_15));
00665b9c                                      eax_140 = LOWD(((int64_t)esi_15));
00665ba7                                      int32_t ebx_17 = ((eax_140 + (edx_76 & 0xfff)) >> 0xc);
00665bad                                      int32_t eax_143;
00665bad                                      int32_t edx_78;
00665bad                                      edx_78 = HIGHD(((int64_t)(ebx_17 + 1)));
00665bad                                      eax_143 = LOWD(((int64_t)(ebx_17 + 1)));
00665bb5                                      int32_t ebp_25 = ((eax_137 + ((uint32_t)edx_74)) >> 8);
00665bba                                      int32_t esi_23 = ((esi_15 - (((eax_143 - edx_78) >> 1) << 0xd)) * ebp_25);
00665bbf                                      int32_t edi_31 = (ecx_26 - ebp_25);
00665bc5                                      int32_t ebp_27 = (esi_23 & 0x80000fff);
00665bc5                                      
00665bcb                                      if (ebp_27 < 0)
00665bd4                                          ebp_27 = (((ebp_27 - 1) | 0xfffff000) + 1);
00665bd4                                      
00665bd5                                      int32_t eax_148;
00665bd5                                      int32_t edx_79;
00665bd5                                      edx_79 = HIGHD(((int64_t)esi_23));
00665bd5                                      eax_148 = LOWD(((int64_t)esi_23));
00665bde                                      int32_t eax_150 = ((eax_148 + (edx_79 & 0xfff)) >> 0xc);
00665bde                                      
00665be7                                      if (ebp_27 < 0xfffff800)
00665be9                                          eax_150 -= 1;
00665be9                                      
00665bf0                                      if (ebp_27 > 0x800)
00665bf2                                          eax_150 += 1;
00665bf2                                      
00665bf6                                      if (ebx_17 > 5)
00665bf6                                          goto label_665abc;
00665bf6                                      
00665bfc                                      switch (ebx_17)
00665bfc                                      {
00665c03                                          case 0:
00665c03                                          {
00665c03                                              edx_63 = ecx_26;
00665c05                                              esi_20 = edi_31;
00665c07                                              ecx_26 = (edi_31 + eax_150);
00665c03                                              break;
00665c03                                          }
00665c0f                                          case 1:
00665c0f                                          {
00665c0f                                              esi_20 = edi_31;
00665c13                                              edx_63 = (edi_31 - eax_150);
00665c0f                                              break;
00665c0f                                          }
00665c1a                                          case 2:
00665c1a                                          {
00665c1a                                              edx_63 = edi_31;
00665c1c                                              esi_20 = (edi_31 + eax_150);
00665c1a                                              break;
00665c1a                                          }
00665c24                                          case 3:
00665c24                                          {
00665c24                                              edx_63 = edi_31;
00665c28                                              esi_20 = ecx_26;
00665c2a                                              ecx_26 = (edi_31 - eax_150);
00665c24                                              break;
00665c24                                          }
00665c31                                          case 4:
00665c31                                          {
00665c31                                              esi_20 = ecx_26;
00665c33                                              ecx_26 = edi_31;
00665c35                                              edx_63 = (edi_31 + eax_150);
00665c31                                              break;
00665c31                                          }
00665c3d                                          case 5:
00665c3d                                          {
00665c3d                                              edx_63 = ecx_26;
00665c3f                                              ecx_26 = edi_31;
00665c43                                              esi_20 = (edi_31 - eax_150);
00665c3d                                              break;
00665c3d                                          }
00665bfc                                      }
00665aaa                                  }
00665aaa                                  else
00665aaa                                  {
00665ab0                                      var_30 = ecx_26;
00665ab4                                      var_34 = ecx_26;
00665ab8                                      var_38 = ecx_26;
00665abc                                  label_665abc:
00665abc                                      esi_20 = var_38;
00665ac0                                      ecx_26 = var_34;
00665ac4                                      edx_63 = var_30;
00665aaa                                  }
00665aaa                                  
00665acc                                  int32_t eax_112;
00665acc                                  eax_112 = edx_63 != 0;
00665ad7                                  int32_t edx_64 = (edx_63 - eax_112);
00665add                                  int32_t eax_113;
00665add                                  eax_113 = ecx_26 != 0;
00665ae0                                  var_30 = edx_64;
00665ae4                                  int32_t ecx_28 = (ecx_26 - eax_113);
00665aea                                  int32_t eax_114;
00665aea                                  eax_114 = esi_20 != 0;
00665aed                                  var_34 = ecx_28;
00665af1                                  int32_t esi_21 = (esi_20 - eax_114);
00665afa                                  int32_t eax_118;
00665afa                                  char edx_65;
00665afa                                  edx_65 = HIGHD(((int64_t)((edi_21 - edx_64) * ecx_18)));
00665afa                                  eax_118 = LOWD(((int64_t)((edi_21 - edx_64) * ecx_18)));
00665b06                                  uint32_t ebx_14;
00665b06                                  ebx_14 = (edi_21 - ((int8_t)((eax_118 + ((uint32_t)edx_65)) >> 8)));
00665b08                                  *(uint8_t*)((char*)arg1)[2] = ebx_14;
00665b1b                                  int32_t eax_124;
00665b1b                                  char edx_67;
00665b1b                                  edx_67 = HIGHD(((int64_t)((eax_90 - ecx_28) * ecx_18)));
00665b1b                                  eax_124 = LOWD(((int64_t)((eax_90 - ecx_28) * ecx_18)));
00665b27                                  uint32_t ebx_15;
00665b27                                  ebx_15 = (eax_90 - ((int8_t)((eax_124 + ((uint32_t)edx_67)) >> 8)));
00665b30                                  int32_t eax_130;
00665b30                                  char edx_69;
00665b30                                  edx_69 = HIGHD(((int64_t)((edx_52 - esi_21) * ecx_18)));
00665b30                                  eax_130 = LOWD(((int64_t)((edx_52 - esi_21) * ecx_18)));
00665b3c                                  uint32_t ecx_29;
00665b3c                                  ecx_29 = (edx_52 - ((int8_t)((eax_130 + ((uint32_t)edx_69)) >> 8)));
00665b3e                                  var_38 = esi_21;
00665b42                                  *(uint8_t*)((char*)arg1)[1] = ebx_15;
00665b46                                  arg1 = ecx_29;
0066597d                              }
0066597d                              else
0066597d                              {
00665985                                  int32_t var_28;
00665985                                  int32_t edx_54;
00665985                                  
00665985                                  if (ebp_16 != 0)
00665985                                  {
006659e0                                      int32_t eax_98;
006659e0                                      char edx_56;
006659e0                                      edx_56 = HIGHD(((int64_t)(ecx_26 * var_40_1)));
006659e0                                      eax_98 = LOWD(((int64_t)(ecx_26 * var_40_1)));
006659ed                                      int32_t eax_101;
006659ed                                      int32_t edx_58;
006659ed                                      edx_58 = HIGHD(((int64_t)esi_15));
006659ed                                      eax_101 = LOWD(((int64_t)esi_15));
006659f8                                      int32_t ebx_13 = ((eax_101 + (edx_58 & 0xfff)) >> 0xc);
006659fe                                      int32_t eax_104;
006659fe                                      int32_t edx_60;
006659fe                                      edx_60 = HIGHD(((int64_t)(ebx_13 + 1)));
006659fe                                      eax_104 = LOWD(((int64_t)(ebx_13 + 1)));
00665a03                                      int32_t ebp_19 = ((eax_98 + ((uint32_t)edx_56)) >> 8);
00665a0b                                      int32_t esi_19 = ((esi_15 - (((eax_104 - edx_60) >> 1) << 0xd)) * ebp_19);
00665a10                                      int32_t edi_24 = (ecx_26 - ebp_19);
00665a14                                      int32_t ebp_21 = (esi_19 & 0x80000fff);
00665a14                                      
00665a1a                                      if (ebp_21 < 0)
00665a23                                          ebp_21 = (((ebp_21 - 1) | 0xfffff000) + 1);
00665a23                                      
00665a26                                      int32_t eax_109;
00665a26                                      int32_t edx_61;
00665a26                                      edx_61 = HIGHD(((int64_t)esi_19));
00665a26                                      eax_109 = LOWD(((int64_t)esi_19));
00665a2f                                      int32_t eax_111 = ((eax_109 + (edx_61 & 0xfff)) >> 0xc);
00665a2f                                      
00665a38                                      if (ebp_21 < 0xfffff800)
00665a3a                                          eax_111 -= 1;
00665a3a                                      
00665a41                                      if (ebp_21 > 0x800)
00665a43                                          eax_111 += 1;
00665a43                                      
00665a47                                      if (ebx_13 > 5)
00665a47                                      {
00665993                                          edx_54 = var_28;
00665997                                          ecx_26 = var_2c;
00665a47                                      }
00665a47                                      else
00665a4d                                          switch (ebx_13)
00665a4d                                          {
00665a54                                              case 0:
00665a54                                              {
00665a54                                                  edx_54 = ecx_26;
00665a56                                                  var_48 = edi_24;
00665a5a                                                  ecx_26 = (edi_24 + eax_111);
00665a54                                                  break;
00665a54                                              }
00665a62                                              case 1:
00665a62                                              {
00665a62                                                  var_48 = edi_24;
00665a68                                                  edx_54 = (edi_24 - eax_111);
00665a62                                                  break;
00665a62                                              }
00665a6f                                              case 2:
00665a6f                                              {
00665a6f                                                  edx_54 = edi_24;
00665a73                                                  var_48 = (edi_24 + eax_111);
00665a6f                                                  break;
00665a6f                                              }
00665a7c                                              case 3:
00665a7c                                              {
00665a7c                                                  edx_54 = edi_24;
00665a80                                                  var_48 = ecx_26;
00665a84                                                  ecx_26 = (edi_24 - eax_111);
00665a7c                                                  break;
00665a7c                                              }
00665a8b                                              case 4:
00665a8b                                              {
00665a8b                                                  var_48 = ecx_26;
00665a8f                                                  ecx_26 = edi_24;
00665a91                                                  edx_54 = (edi_24 + eax_111);
00665a8b                                                  break;
00665a8b                                              }
00665a99                                              case 5:
00665a99                                              {
00665a99                                                  edx_54 = ecx_26;
00665a9b                                                  ecx_26 = edi_24;
00665a9f                                                  var_48 = (edi_24 - eax_111);
00665a99                                                  break;
00665a99                                              }
00665a4d                                          }
00665985                                  }
00665985                                  else
00665985                                  {
0066598f                                      var_48 = ecx_26;
00665993                                      edx_54 = ecx_26;
00665997                                      ecx_26 = ecx_26;
00665985                                  }
00665985                                  
006659a3                                  int32_t eax_92;
006659a3                                  eax_92 = edx_54 != 0;
006659a6                                  int32_t edx_55 = (edx_54 - eax_92);
006659ac                                  int32_t eax_93;
006659ac                                  eax_93 = ecx_26 != 0;
006659b1                                  var_28 = edx_55;
006659b5                                  *(uint8_t*)((char*)arg1)[2] = edx_55;
006659b9                                  int32_t ecx_27 = (ecx_26 - eax_93);
006659bd                                  int32_t ebx_11;
006659bd                                  ebx_11 = var_48 != 0;
006659c2                                  var_2c = ecx_27;
006659c6                                  *(uint8_t*)((char*)arg1)[1] = ecx_27;
006659ca                                  int32_t eax_95 = (var_48 - ebx_11);
006659cc                                  var_48 = eax_95;
006659d0                                  arg1 = eax_95;
0066597d                              }
0066597d                              
00665b56                              *(uint32_t*)(__inner1_1 + (i << 2)) = arg1;
0066587d                          }
00665b5b                      } while (i > 0);
00665856                  }
00665856                  
00665b6f                  cond:4_1 = nHeight_3 != 1;
00665b70                  __inner1_1 -= iStride_1;
00665b74                  nHeight_3 -= 1;
00665b78              } while (cond:4_1);
00665830          }
006653b0      }
006653b0      else
006653b0      {
006653b6          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006653c1          int32_t edx;
006653c1          edx = i8AlphaModifier != 0;
006653c4          union __inner1 = arg1->cDstArgs.__inner1;
006653c8          uint32_t nHeight = arg1->nHeight;
006653cb          int32_t esi_1 = (i8AlphaModifier + edx);
006653cf          int32_t var_4_1 = esi_1;
006653cf          
006653d3          if (nHeight > 0)
006653d3          {
006653d9              uint32_t nWidth = arg1->nWidth;
006653dc              uint32_t iStride = arg1->cDstArgs.iStride;
006653df              int16_t __inner0_1 = ((int16_t)g_SourceColor.__inner0);
006653ed              uint32_t nHeight_2 = nHeight;
00665746              bool cond:3_1;
00665746              
00665746              do
00665746              {
006653f1                  uint32_t i_1 = nWidth;
006653f1                  
006653f7                  if (i_1 > 0)
006653f7                  {
006653fd                      uint32_t edx_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
006653fd                      
00665729                      do
00665729                      {
0066540e                          i_1 -= 1;
00665411                          int32_t eax;
00665411                          eax = edx_1 != 0;
00665418                          int32_t ebp_2 = (edx_1 + eax);
00665420                          int32_t var_28_1 = ebp_2;
00665420                          
00665424                          if (esi_1 != 0x100)
00665424                          {
0066542b                              int32_t eax_3;
0066542b                              char edx_2;
0066542b                              edx_2 = HIGHD(((int64_t)(ebp_2 * esi_1)));
0066542b                              eax_3 = LOWD(((int64_t)(ebp_2 * esi_1)));
00665437                              ebp_2 = ((eax_3 + ((uint32_t)edx_2)) >> 8);
00665439                              var_28_1 = ebp_2;
00665424                          }
00665424                          
0066543f                          if (ebp_2 != 0)
0066543f                          {
00665449                              struct BlitArgs* eax_6 = *(uint32_t*)(__inner1 + (i_1 << 2));
0066544c                              uint32_t ecx_2 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 2));
00665457                              int32_t edx_5;
00665457                              edx_5 = ecx_2 != 0;
0066545a                              uint32_t esi_2 = ((uint32_t)*(uint8_t*)((char*)__inner0_1)[1]);
00665463                              uint32_t edi_1 = ((uint32_t)__inner0_1);
00665466                              int32_t ecx_3 = (ecx_2 + edx_5);
0066546a                              int32_t eax_7;
0066546a                              eax_7 = esi_2 != 0;
0066546f                              int32_t ebx_1 = ecx_3;
00665471                              int32_t esi_3 = (esi_2 + eax_7);
00665475                              int32_t edx_6;
00665475                              edx_6 = edi_1 != 0;
00665478                              int32_t eax_8 = ecx_3;
0066547a                              int32_t edi_2 = (edi_1 + edx_6);
0066547a                              
0066547e                              if (esi_3 > ecx_3)
00665480                                  ebx_1 = esi_3;
0066547e                              else if (esi_3 < ecx_3)
00665486                                  eax_8 = esi_3;
00665486                              
0066548a                              if (edi_2 > ebx_1)
0066548c                                  ebx_1 = edi_2;
0066548a                              else if (edi_2 < eax_8)
00665494                                  eax_8 = edi_2;
00665494                              
00665498                              int32_t edx_8 = (ebx_1 - eax_8);
0066549e                              int32_t var_44_1;
0066549e                              int32_t ebx_2;
0066549e                              int32_t esi_4;
0066549e                              
0066549e                              if (ebx_1 != eax_8)
0066549e                              {
006654b4                                  int32_t ebp_3 = 0;
006654b8                                  var_44_1 = (((int64_t)(edx_8 << 8)) / ebx_1);
006654bc                                  int32_t ecx_4;
006654bc                                  
006654bc                                  if (ecx_3 == ebx_1)
006654bc                                  {
006654c0                                      ecx_4 = (esi_3 - edi_2);
006654c0                                      
006654c2                                      if ((esi_3 - edi_2) < 0)
006654c4                                          ebp_3 = 0x6000;
006654bc                                  }
006654bc                                  else if (esi_3 != ebx_1)
006654cd                                  {
006654da                                      ecx_4 = (ecx_3 - esi_3);
006654dc                                      ebp_3 = 0x4000;
006654cd                                  }
006654cd                                  else
006654cd                                  {
006654d1                                      ecx_4 = (edi_2 - ecx_3);
006654d3                                      ebp_3 = 0x2000;
006654cd                                  }
006654cd                                  
006654eb                                  ebx_2 = var_44_1;
006654f1                                  esi_4 = ((((int64_t)(ecx_4 << 0xc)) / edx_8) + ebp_3);
006654f3                                  ebp_2 = var_28_1;
0066549e                              }
0066549e                              else
0066549e                              {
006654a0                                  esi_4 = 0;
006654a2                                  ebx_2 = 0;
006654a4                                  var_44_1 = 0;
0066549e                              }
0066549e                              
006654f7                              uint32_t eax_17 = ((uint32_t)*(uint8_t*)((char*)eax_6)[1]);
006654fc                              uint32_t edx_13 = ((uint32_t)eax_6);
00665501                              uint32_t edi_4 = ((uint32_t)*(uint8_t*)((char*)eax_6)[2]);
0066550a                              int32_t ecx_5;
0066550a                              ecx_5 = eax_17 != 0;
00665519                              int32_t eax_18 = (eax_17 + ecx_5);
0066551f                              int32_t ecx_6;
0066551f                              ecx_6 = edx_13 != 0;
00665522                              int32_t edx_14 = (edx_13 + ecx_6);
00665528                              int32_t ecx_7;
00665528                              ecx_7 = edi_4 != 0;
0066552b                              int32_t ecx_8 = (ecx_7 + edi_4);
0066552b                              
0066552f                              if (eax_18 > ecx_8)
00665531                                  ecx_8 = eax_18;
00665531                              
00665535                              if (edx_14 > ecx_8)
00665537                                  ecx_8 = edx_14;
00665537                              
0066553f                              if (ebp_2 != 0x100)
0066553f                              {
0066566c                                  int32_t edx_24;
0066566c                                  int32_t esi_9;
0066566c                                  
0066566c                                  if (ebx_2 != 0)
0066566c                                  {
00665758                                      int32_t eax_65;
00665758                                      char edx_35;
00665758                                      edx_35 = HIGHD(((int64_t)(ecx_8 * var_44_1)));
00665758                                      eax_65 = LOWD(((int64_t)(ecx_8 * var_44_1)));
00665765                                      int32_t eax_68;
00665765                                      int32_t edx_37;
00665765                                      edx_37 = HIGHD(((int64_t)esi_4));
00665765                                      eax_68 = LOWD(((int64_t)esi_4));
00665770                                      int32_t ebx_9 = ((eax_68 + (edx_37 & 0xfff)) >> 0xc);
00665776                                      int32_t eax_71;
00665776                                      int32_t edx_39;
00665776                                      edx_39 = HIGHD(((int64_t)(ebx_9 + 1)));
00665776                                      eax_71 = LOWD(((int64_t)(ebx_9 + 1)));
0066577b                                      int32_t ebp_11 = ((eax_65 + ((uint32_t)edx_35)) >> 8);
00665783                                      int32_t esi_12 = ((esi_4 - (((eax_71 - edx_39) >> 1) << 0xd)) * ebp_11);
00665788                                      int32_t edi_14 = (ecx_8 - ebp_11);
0066578c                                      int32_t ebp_13 = (esi_12 & 0x80000fff);
0066578c                                      
00665792                                      if (ebp_13 < 0)
0066579b                                          ebp_13 = (((ebp_13 - 1) | 0xfffff000) + 1);
0066579b                                      
0066579e                                      int32_t eax_76;
0066579e                                      int32_t edx_40;
0066579e                                      edx_40 = HIGHD(((int64_t)esi_12));
0066579e                                      eax_76 = LOWD(((int64_t)esi_12));
006657a7                                      int32_t eax_78 = ((eax_76 + (edx_40 & 0xfff)) >> 0xc);
006657a7                                      
006657b0                                      if (ebp_13 < 0xfffff800)
006657b2                                          eax_78 -= 1;
006657b2                                      
006657b9                                      if (ebp_13 > 0x800)
006657bb                                          eax_78 += 1;
006657bb                                      
006657bf                                      if (ebx_9 > 5)
006657bf                                          goto label_66567e;
006657bf                                      
006657c5                                      switch (ebx_9)
006657c5                                      {
006657cc                                          case 0:
006657cc                                          {
006657cc                                              edx_24 = ecx_8;
006657ce                                              esi_9 = edi_14;
006657d0                                              ecx_8 = (edi_14 + eax_78);
006657cc                                              break;
006657cc                                          }
006657d8                                          case 1:
006657d8                                          {
006657d8                                              esi_9 = edi_14;
006657dc                                              edx_24 = (edi_14 - eax_78);
006657d8                                              break;
006657d8                                          }
006657e3                                          case 2:
006657e3                                          {
006657e3                                              edx_24 = edi_14;
006657e5                                              esi_9 = (edi_14 + eax_78);
006657e3                                              break;
006657e3                                          }
006657ed                                          case 3:
006657ed                                          {
006657ed                                              edx_24 = edi_14;
006657f1                                              esi_9 = ecx_8;
006657f3                                              ecx_8 = (edi_14 - eax_78);
006657ed                                              break;
006657ed                                          }
006657fa                                          case 4:
006657fa                                          {
006657fa                                              esi_9 = ecx_8;
006657fc                                              ecx_8 = edi_14;
006657fe                                              edx_24 = (edi_14 + eax_78);
006657fa                                              break;
006657fa                                          }
00665806                                          case 5:
00665806                                          {
00665806                                              edx_24 = ecx_8;
00665808                                              ecx_8 = edi_14;
0066580c                                              esi_9 = (edi_14 - eax_78);
00665806                                              break;
00665806                                          }
006657c5                                      }
0066566c                                  }
0066566c                                  else
0066566c                                  {
00665672                                      var_34 = ecx_8;
00665676                                      var_30 = ecx_8;
0066567a                                      var_2c = ecx_8;
0066567e                                  label_66567e:
0066567e                                      edx_24 = var_34;
00665682                                      ecx_8 = var_30;
00665686                                      esi_9 = var_2c;
0066566c                                  }
0066566c                                  
0066568e                                  int32_t eax_39;
0066568e                                  eax_39 = edx_24 != 0;
00665699                                  int32_t edx_25 = (edx_24 - eax_39);
0066569f                                  int32_t eax_40;
0066569f                                  eax_40 = ecx_8 != 0;
006656a2                                  var_34 = edx_25;
006656a6                                  int32_t ecx_10 = (ecx_8 - eax_40);
006656ac                                  int32_t eax_41;
006656ac                                  eax_41 = esi_9 != 0;
006656af                                  var_30 = ecx_10;
006656b3                                  int32_t esi_10 = (esi_9 - eax_41);
006656bc                                  int32_t eax_45;
006656bc                                  char edx_26;
006656bc                                  edx_26 = HIGHD(((int64_t)((edi_4 - edx_25) * var_28_1)));
006656bc                                  eax_45 = LOWD(((int64_t)((edi_4 - edx_25) * var_28_1)));
006656c8                                  uint32_t ebx_6;
006656c8                                  ebx_6 = (edi_4 - ((int8_t)((eax_45 + ((uint32_t)edx_26)) >> 8)));
006656ca                                  *(uint8_t*)((char*)arg1)[2] = ebx_6;
006656dd                                  int32_t eax_51;
006656dd                                  char edx_28;
006656dd                                  edx_28 = HIGHD(((int64_t)((eax_17 - ecx_10) * var_28_1)));
006656dd                                  eax_51 = LOWD(((int64_t)((eax_17 - ecx_10) * var_28_1)));
006656e9                                  uint32_t ebx_7;
006656e9                                  ebx_7 = (eax_17 - ((int8_t)((eax_51 + ((uint32_t)edx_28)) >> 8)));
006656f2                                  int32_t eax_57;
006656f2                                  char edx_30;
006656f2                                  edx_30 = HIGHD(((int64_t)((edx_13 - esi_10) * var_28_1)));
006656f2                                  eax_57 = LOWD(((int64_t)((edx_13 - esi_10) * var_28_1)));
006656fe                                  uint32_t ecx_11;
006656fe                                  ecx_11 = (edx_13 - ((int8_t)((eax_57 + ((uint32_t)edx_30)) >> 8)));
00665700                                  var_2c = esi_10;
00665704                                  *(uint8_t*)((char*)arg1)[1] = ebx_7;
00665708                                  arg1 = ecx_11;
0066553f                              }
0066553f                              else
0066553f                              {
00665547                                  int32_t var_3c;
00665547                                  int32_t edx_15;
00665547                                  
00665547                                  if (ebx_2 != 0)
00665547                                  {
006655a2                                      int32_t eax_25;
006655a2                                      char edx_17;
006655a2                                      edx_17 = HIGHD(((int64_t)(ecx_8 * var_44_1)));
006655a2                                      eax_25 = LOWD(((int64_t)(ecx_8 * var_44_1)));
006655af                                      int32_t eax_28;
006655af                                      int32_t edx_19;
006655af                                      edx_19 = HIGHD(((int64_t)esi_4));
006655af                                      eax_28 = LOWD(((int64_t)esi_4));
006655ba                                      int32_t ebx_5 = ((eax_28 + (edx_19 & 0xfff)) >> 0xc);
006655c0                                      int32_t eax_31;
006655c0                                      int32_t edx_21;
006655c0                                      edx_21 = HIGHD(((int64_t)(ebx_5 + 1)));
006655c0                                      eax_31 = LOWD(((int64_t)(ebx_5 + 1)));
006655c5                                      int32_t ebp_5 = ((eax_25 + ((uint32_t)edx_17)) >> 8);
006655cd                                      int32_t esi_8 = ((esi_4 - (((eax_31 - edx_21) >> 1) << 0xd)) * ebp_5);
006655d2                                      int32_t edi_7 = (ecx_8 - ebp_5);
006655d6                                      int32_t ebp_7 = (esi_8 & 0x80000fff);
006655d6                                      
006655dc                                      if (ebp_7 < 0)
006655e5                                          ebp_7 = (((ebp_7 - 1) | 0xfffff000) + 1);
006655e5                                      
006655e8                                      int32_t eax_36;
006655e8                                      int32_t edx_22;
006655e8                                      edx_22 = HIGHD(((int64_t)esi_8));
006655e8                                      eax_36 = LOWD(((int64_t)esi_8));
006655f1                                      int32_t eax_38 = ((eax_36 + (edx_22 & 0xfff)) >> 0xc);
006655f1                                      
006655fa                                      if (ebp_7 < 0xfffff800)
006655fc                                          eax_38 -= 1;
006655fc                                      
00665603                                      if (ebp_7 > 0x800)
00665605                                          eax_38 += 1;
00665605                                      
00665609                                      if (ebx_5 > 5)
00665609                                      {
00665555                                          edx_15 = var_3c;
00665559                                          ecx_8 = var_38;
00665609                                      }
00665609                                      else
0066560f                                          switch (ebx_5)
0066560f                                          {
00665616                                              case 0:
00665616                                              {
00665616                                                  edx_15 = ecx_8;
00665618                                                  var_48 = edi_7;
0066561c                                                  ecx_8 = (edi_7 + eax_38);
00665616                                                  break;
00665616                                              }
00665624                                              case 1:
00665624                                              {
00665624                                                  var_48 = edi_7;
0066562a                                                  edx_15 = (edi_7 - eax_38);
00665624                                                  break;
00665624                                              }
00665631                                              case 2:
00665631                                              {
00665631                                                  edx_15 = edi_7;
00665635                                                  var_48 = (edi_7 + eax_38);
00665631                                                  break;
00665631                                              }
0066563e                                              case 3:
0066563e                                              {
0066563e                                                  edx_15 = edi_7;
00665642                                                  var_48 = ecx_8;
00665646                                                  ecx_8 = (edi_7 - eax_38);
0066563e                                                  break;
0066563e                                              }
0066564d                                              case 4:
0066564d                                              {
0066564d                                                  var_48 = ecx_8;
00665651                                                  ecx_8 = edi_7;
00665653                                                  edx_15 = (edi_7 + eax_38);
0066564d                                                  break;
0066564d                                              }
0066565b                                              case 5:
0066565b                                              {
0066565b                                                  edx_15 = ecx_8;
0066565d                                                  ecx_8 = edi_7;
00665661                                                  var_48 = (edi_7 - eax_38);
0066565b                                                  break;
0066565b                                              }
0066560f                                          }
00665547                                  }
00665547                                  else
00665547                                  {
00665551                                      var_48 = ecx_8;
00665555                                      edx_15 = ecx_8;
00665559                                      ecx_8 = ecx_8;
00665547                                  }
00665547                                  
00665565                                  int32_t eax_19;
00665565                                  eax_19 = edx_15 != 0;
00665568                                  int32_t edx_16 = (edx_15 - eax_19);
0066556e                                  int32_t eax_20;
0066556e                                  eax_20 = ecx_8 != 0;
00665573                                  var_3c = edx_16;
00665577                                  *(uint8_t*)((char*)arg1)[2] = edx_16;
0066557b                                  int32_t ecx_9 = (ecx_8 - eax_20);
0066557f                                  int32_t ebx_3;
0066557f                                  ebx_3 = var_48 != 0;
00665584                                  var_38 = ecx_9;
00665588                                  *(uint8_t*)((char*)arg1)[1] = ecx_9;
0066558c                                  int32_t eax_22 = (var_48 - ebx_3);
0066558e                                  var_48 = eax_22;
00665592                                  arg1 = eax_22;
0066553f                              }
0066553f                              
00665718                              esi_1 = var_4_1;
0066571c                              __inner0_1 = ((int16_t)g_SourceColor.__inner0);
00665722                              *(uint32_t*)(__inner1 + (i_1 << 2)) = arg1;
0066543f                          }
00665729                      } while (i_1 > 0);
006653f7                  }
006653f7                  
0066573d                  cond:3_1 = nHeight_2 != 1;
0066573e                  __inner1 += iStride;
00665742                  nHeight_2 -= 1;
00665746              } while (cond:3_1);
006653d3          }
006653b0      }
006653a0  }

0066584a                                8d 9b 00 00 00 00                                                            ......
00665c4a                                8b ff                                                                        ..
00665c4c  uint32_t jump_table_665c4c[0x6] = 
00665c4c  {
00665c4c      [0x0] =  0x00665616
00665c50      [0x1] =  0x00665624
00665c54      [0x2] =  0x00665631
00665c58      [0x3] =  0x0066563e
00665c5c      [0x4] =  0x0066564d
00665c60      [0x5] =  0x0066565b
00665c64  }
00665c64  uint32_t jump_table_665c64[0x6] = 
00665c64  {
00665c64      [0x0] =  0x006657cc
00665c68      [0x1] =  0x006657d8
00665c6c      [0x2] =  0x006657e3
00665c70      [0x3] =  0x006657ed
00665c74      [0x4] =  0x006657fa
00665c78      [0x5] =  0x00665806
00665c7c  }
00665c7c  uint32_t jump_table_665c7c[0x6] = 
00665c7c  {
00665c7c      [0x0] =  0x00665a54
00665c80      [0x1] =  0x00665a62
00665c84      [0x2] =  0x00665a6f
00665c88      [0x3] =  0x00665a7c
00665c8c      [0x4] =  0x00665a8b
00665c90      [0x5] =  0x00665a99
00665c94  }
00665c94  uint32_t jump_table_665c94[0x6] = 
00665c94  {
00665c94      [0x0] =  0x00665c03
00665c98      [0x1] =  0x00665c0f
00665c9c      [0x2] =  0x00665c1a
00665ca0      [0x3] =  0x00665c24
00665ca4      [0x4] =  0x00665c31
00665ca8      [0x5] =  0x00665c3d
00665cac  }

00665cac                                      cc cc cc cc                                                              ....

00665cb0  void ColoringLoopNoScale<&BlitOp_Colorize<BlitFormat_Fill,BlitFormat_RGB>,BlitFormat_Fill,BlitFormat_RGB>(struct BlitArgs const* arg1)

00665cb0  {
00665cbf      struct BlitArgs* edi;
00665cbf      struct BlitArgs* var_60 = edi;
00665cc0      struct BlitArgs* var_44;
00665cc0      void* var_40;
00665cc0      void* var_3c;
00665cc0      void* var_38;
00665cc0      
00665cc0      if (arg1->cSrcArgs.__inner1 == 0)
00665cc0      {
00666134          union __inner1_1 = arg1->cDstArgs.__inner1;
00666137          union __inner0 = g_SourceColor.__inner0;
0066613b          *(uint8_t*)((char*)__inner0 + 3) = arg1->i8AlphaModifier;
0066613f          uint32_t nHeight_1 = arg1->nHeight;
00666144          union __inner1_2 = __inner1_1;
00666144          
00666148          if (nHeight_1 > 0)
00666148          {
0066614e              uint32_t nWidth = arg1->nWidth;
00666151              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00666154              uint32_t nWidth_3 = nWidth;
0066615c              uint32_t nHeight_3 = nHeight_1;
0066649d              bool cond:3_1;
0066649d              
0066649d              do
0066649d              {
00666162                  if (nWidth > 0)
00666162                  {
0066616c                      uint32_t edx_37 = (__inner0 >> 0x18);
00666176                      char* eax_78 = (((nWidth * 3) + __inner1_1) + 2);
0066617a                      uint32_t var_28_2 = nWidth;
00666480                      uint32_t i;
00666480                      
00666480                      do
00666480                      {
00666184                          eax_78 -= 3;
0066618b                          int32_t edx_38;
0066618b                          edx_38 = edx_37 != 0;
0066618e                          char* var_24_2 = eax_78;
00666192                          struct BlitArgs* ebx_9 = (edx_37 + edx_38);
00666194                          struct BlitArgs* var_20_1 = ebx_9;
00666194                          
00666198                          if (edx_37 != -(edx_38))
00666198                          {
0066619e                              nWidth = eax_78[0xfffffffe];
006661a1                              edx_38 = eax_78[0xffffffff];
006661a4                              eax_78 = *(uint8_t*)eax_78;
006661a6                              uint32_t esi_14 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 1));
006661ab                              uint32_t edi_19 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 0));
006661b4                              uint32_t ecx_15 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 2));
006661c1                              int32_t edx_39;
006661c1                              edx_39 = ecx_15 != 0;
006661ca                              int32_t ecx_16 = (ecx_15 + edx_39);
006661ce                              int32_t eax_79;
006661ce                              eax_79 = esi_14 != 0;
006661d3                              int32_t ebp_15 = ecx_16;
006661d5                              int32_t esi_15 = (esi_14 + eax_79);
006661d9                              int32_t edx_40;
006661d9                              edx_40 = edi_19 != 0;
006661dc                              int32_t eax_80 = ecx_16;
006661de                              int32_t edi_20 = (edi_19 + edx_40);
006661de                              
006661e2                              if (esi_15 > ecx_16)
006661e4                                  ebp_15 = esi_15;
006661e2                              else if (esi_15 < ecx_16)
006661ea                                  eax_80 = esi_15;
006661ea                              
006661ee                              if (edi_20 > ebp_15)
006661f0                                  ebp_15 = edi_20;
006661ee                              else if (edi_20 < eax_80)
006661f8                                  eax_80 = edi_20;
006661f8                              
006661fc                              int32_t edx_42 = (ebp_15 - eax_80);
00666202                              int32_t var_48_1;
00666202                              int32_t ebp_16;
00666202                              int32_t esi_16;
00666202                              
00666202                              if (ebp_15 != eax_80)
00666202                              {
00666218                                  int32_t ebx_10 = 0;
0066621c                                  var_48_1 = (((int64_t)(edx_42 << 8)) / ebp_15);
00666220                                  int32_t ecx_17;
00666220                                  
00666220                                  if (ecx_16 == ebp_15)
00666220                                  {
00666224                                      ecx_17 = (esi_15 - edi_20);
00666224                                      
00666226                                      if ((esi_15 - edi_20) < 0)
00666228                                          ebx_10 = 0x6000;
00666220                                  }
00666220                                  else if (esi_15 != ebp_15)
00666231                                  {
0066623e                                      ecx_17 = (ecx_16 - esi_15);
00666240                                      ebx_10 = 0x4000;
00666231                                  }
00666231                                  else
00666231                                  {
00666235                                      ecx_17 = (edi_20 - ecx_16);
00666237                                      ebx_10 = 0x2000;
00666231                                  }
00666231                                  
0066624f                                  ebp_16 = var_48_1;
00666255                                  esi_16 = ((((int64_t)(ecx_17 << 0xc)) / edx_42) + ebx_10);
00666257                                  ebx_9 = var_20_1;
00666202                              }
00666202                              else
00666202                              {
00666204                                  esi_16 = 0;
00666206                                  ebp_16 = 0;
00666208                                  var_48_1 = 0;
00666202                              }
00666202                              
0066625b                              uint32_t eax_89 = ((uint32_t)edx_38);
00666260                              uint32_t edx_47 = ((uint32_t)nWidth);
00666265                              uint32_t edi_22 = ((uint32_t)eax_78);
0066626e                              int32_t ecx_18;
0066626e                              ecx_18 = eax_89 != 0;
0066627d                              struct BlitArgs* eax_90 = (eax_89 + ecx_18);
00666283                              int32_t ecx_19;
00666283                              ecx_19 = edx_47 != 0;
00666286                              struct BlitArgs* edx_48 = (edx_47 + ecx_19);
0066628c                              int32_t ecx_20;
0066628c                              ecx_20 = edi_22 != 0;
0066628f                              struct BlitArgs* ecx_21 = (ecx_20 + edi_22);
0066628f                              
00666293                              if (eax_90 > ecx_21)
00666295                                  ecx_21 = eax_90;
00666295                              
00666299                              if (edx_48 > ecx_21)
0066629b                                  ecx_21 = edx_48;
0066629b                              
006662a3                              int32_t ecx_23;
006662a3                              void* edx_50;
006662a3                              void* ebx_12;
006662a3                              
006662a3                              if (ebx_9 != 0x100)
006662a3                              {
006663ce                                  void* edx_58;
006663ce                                  struct BlitArgs* ebp_23;
006663ce                                  void* esi_21;
006663ce                                  
006663ce                                  if (ebp_16 != 0)
006663ce                                  {
006664b4                                      int32_t eax_134;
006664b4                                      char edx_66;
006664b4                                      edx_66 = HIGHD(((int64_t)(ecx_21 * var_48_1)));
006664b4                                      eax_134 = LOWD(((int64_t)(ecx_21 * var_48_1)));
006664c1                                      int32_t eax_137;
006664c1                                      int32_t edx_68;
006664c1                                      edx_68 = HIGHD(((int64_t)esi_16));
006664c1                                      eax_137 = LOWD(((int64_t)esi_16));
006664cc                                      int32_t ebx_18 = ((eax_137 + (edx_68 & 0xfff)) >> 0xc);
006664d2                                      int32_t eax_140;
006664d2                                      int32_t edx_70;
006664d2                                      edx_70 = HIGHD(((int64_t)(ebx_18 + 1)));
006664d2                                      eax_140 = LOWD(((int64_t)(ebx_18 + 1)));
006664da                                      int32_t ebp_26 = ((eax_134 + ((uint32_t)edx_66)) >> 8);
006664df                                      int32_t esi_25 = ((esi_16 - (((eax_140 - edx_70) >> 1) << 0xd)) * ebp_26);
006664e4                                      void* edi_31 = ((char*)ecx_21 - ebp_26);
006664ea                                      int32_t ebp_28 = (esi_25 & 0x80000fff);
006664ea                                      
006664f0                                      if (ebp_28 < 0)
006664f9                                          ebp_28 = (((ebp_28 - 1) | 0xfffff000) + 1);
006664f9                                      
006664fa                                      int32_t eax_145;
006664fa                                      int32_t edx_71;
006664fa                                      edx_71 = HIGHD(((int64_t)esi_25));
006664fa                                      eax_145 = LOWD(((int64_t)esi_25));
00666503                                      int32_t eax_147 = ((eax_145 + (edx_71 & 0xfff)) >> 0xc);
00666503                                      
0066650c                                      if (ebp_28 < 0xfffff800)
0066650e                                          eax_147 -= 1;
0066650e                                      
00666515                                      if (ebp_28 > 0x800)
00666517                                          eax_147 += 1;
00666517                                      
0066651b                                      if (ebx_18 > 5)
0066651b                                          goto label_6663e0;
0066651b                                      
00666521                                      switch (ebx_18)
00666521                                      {
00666528                                          case 0:
00666528                                          {
00666528                                              edx_58 = ecx_21;
0066652a                                              ebp_23 = edi_31;
0066652c                                              esi_21 = ((char*)edi_31 + eax_147);
00666528                                              break;
00666528                                          }
00666534                                          case 1:
00666534                                          {
00666534                                              ebp_23 = edi_31;
00666538                                              esi_21 = ecx_21;
0066653a                                              edx_58 = ((char*)edi_31 - eax_147);
00666534                                              break;
00666534                                          }
00666541                                          case 2:
00666541                                          {
00666541                                              esi_21 = ecx_21;
00666543                                              edx_58 = edi_31;
00666545                                              ebp_23 = ((char*)edi_31 + eax_147);
00666541                                              break;
00666541                                          }
0066654d                                          case 3:
0066654d                                          {
0066654d                                              edx_58 = edi_31;
00666551                                              ebp_23 = ecx_21;
00666553                                              esi_21 = ((char*)edi_31 - eax_147);
0066654d                                              break;
0066654d                                          }
0066655a                                          case 4:
0066655a                                          {
0066655a                                              ebp_23 = ecx_21;
0066655c                                              esi_21 = edi_31;
0066655e                                              edx_58 = ((char*)edi_31 + eax_147);
0066655a                                              break;
0066655a                                          }
00666566                                          case 5:
00666566                                          {
00666566                                              esi_21 = edi_31;
0066656a                                              edx_58 = ecx_21;
0066656c                                              ebp_23 = ((char*)edi_31 - eax_147);
00666566                                              break;
00666566                                          }
00666521                                      }
006663ce                                  }
006663ce                                  else
006663ce                                  {
006663d4                                      var_3c = ecx_21;
006663d8                                      var_40 = ecx_21;
006663dc                                      var_44 = ecx_21;
006663e0                                  label_6663e0:
006663e0                                      ebp_23 = var_44;
006663e4                                      esi_21 = var_40;
006663e8                                      edx_58 = var_3c;
006663ce                                  }
006663ce                                  
006663f0                                  int32_t eax_110;
006663f0                                  eax_110 = edx_58 != 0;
006663fd                                  void* edx_59 = ((char*)edx_58 - eax_110);
00666401                                  ecx_23 = esi_21 != 0;
00666406                                  var_3c = edx_59;
0066640a                                  void* esi_22 = ((char*)esi_21 - ecx_23);
0066640e                                  int32_t eax_111;
0066640e                                  eax_111 = ebp_23 != 0;
00666411                                  var_40 = esi_22;
00666415                                  void* ebp_24 = ((char*)ebp_23 - eax_111);
0066641e                                  int32_t eax_115;
0066641e                                  char edx_60;
0066641e                                  edx_60 = HIGHD(((int64_t)((edi_22 - edx_59) * var_20_1)));
0066641e                                  eax_115 = LOWD(((int64_t)((edi_22 - edx_59) * var_20_1)));
0066642a                                  uint32_t ebx_15;
0066642a                                  ebx_15 = (edi_22 - ((int8_t)((eax_115 + ((uint32_t)edx_60)) >> 8)));
0066642c                                  ecx_23 = ebx_15;
00666439                                  int32_t eax_121;
00666439                                  char edx_62;
00666439                                  edx_62 = HIGHD(((int64_t)((eax_89 - esi_22) * var_20_1)));
00666439                                  eax_121 = LOWD(((int64_t)((eax_89 - esi_22) * var_20_1)));
00666445                                  uint32_t ebx_16;
00666445                                  ebx_16 = (eax_89 - ((int8_t)((eax_121 + ((uint32_t)edx_62)) >> 8)));
0066644b                                  ebx_12 = edx_47;
00666456                                  void* eax_127;
00666456                                  char edx_64;
00666456                                  edx_64 = HIGHD(((int64_t)(((char*)ebx_12 - ebp_24) * var_20_1)));
00666456                                  eax_127 = LOWD(((int64_t)(((char*)ebx_12 - ebp_24) * var_20_1)));
0066645f                                  edx_50 = ebx_16;
00666466                                  var_44 = ebp_24;
0066646a                                  ebx_12 -= ((int8_t)(((char*)eax_127 + ((uint32_t)edx_64)) >> 8));
006662a3                              }
006662a3                              else
006662a3                              {
006662ab                                  void* var_34;
006662ab                                  struct BlitArgs* edx_49;
006662ab                                  void* ebx_11;
006662ab                                  
006662ab                                  if (ebp_16 != 0)
006662ab                                  {
00666300                                      int32_t eax_96;
00666300                                      char edx_51;
00666300                                      edx_51 = HIGHD(((int64_t)(ecx_21 * var_48_1)));
00666300                                      eax_96 = LOWD(((int64_t)(ecx_21 * var_48_1)));
0066630d                                      int32_t eax_99;
0066630d                                      int32_t edx_53;
0066630d                                      edx_53 = HIGHD(((int64_t)esi_16));
0066630d                                      eax_99 = LOWD(((int64_t)esi_16));
00666318                                      int32_t ebx_14 = ((eax_99 + (edx_53 & 0xfff)) >> 0xc);
0066631e                                      int32_t eax_102;
0066631e                                      int32_t edx_55;
0066631e                                      edx_55 = HIGHD(((int64_t)(ebx_14 + 1)));
0066631e                                      eax_102 = LOWD(((int64_t)(ebx_14 + 1)));
00666323                                      int32_t ebp_18 = ((eax_96 + ((uint32_t)edx_51)) >> 8);
0066632b                                      int32_t esi_20 = ((esi_16 - (((eax_102 - edx_55) >> 1) << 0xd)) * ebp_18);
00666330                                      void* edi_24 = ((char*)ecx_21 - ebp_18);
00666334                                      int32_t ebp_20 = (esi_20 & 0x80000fff);
00666334                                      
0066633a                                      if (ebp_20 < 0)
00666343                                          ebp_20 = (((ebp_20 - 1) | 0xfffff000) + 1);
00666343                                      
00666346                                      int32_t eax_107;
00666346                                      int32_t edx_56;
00666346                                      edx_56 = HIGHD(((int64_t)esi_20));
00666346                                      eax_107 = LOWD(((int64_t)esi_20));
0066634f                                      int32_t eax_109 = ((eax_107 + (edx_56 & 0xfff)) >> 0xc);
0066634f                                      
00666358                                      if (ebp_20 < 0xfffff800)
0066635a                                          eax_109 -= 1;
0066635a                                      
00666361                                      if (ebp_20 > 0x800)
00666363                                          eax_109 += 1;
00666363                                      
00666367                                      if (ebx_14 > 5)
00666367                                      {
006662b9                                          edx_49 = var_34;
006662bd                                          ebx_11 = var_38;
00666367                                      }
00666367                                      else
0066636d                                          switch (ebx_14)
0066636d                                          {
00666374                                              case 0:
00666374                                              {
00666374                                                  edx_49 = ecx_21;
00666376                                                  arg1 = edi_24;
0066637a                                                  ebx_11 = ((char*)edi_24 + eax_109);
00666374                                                  break;
00666374                                              }
00666382                                              case 1:
00666382                                              {
00666382                                                  arg1 = edi_24;
00666388                                                  ebx_11 = ecx_21;
0066638a                                                  edx_49 = ((char*)edi_24 - eax_109);
00666382                                                  break;
00666382                                              }
00666391                                              case 2:
00666391                                              {
00666391                                                  edx_49 = edi_24;
00666395                                                  ebx_11 = ecx_21;
00666397                                                  arg1 = ((char*)edi_24 + eax_109);
00666391                                                  break;
00666391                                              }
006663a0                                              case 3:
006663a0                                              {
006663a0                                                  edx_49 = edi_24;
006663a4                                                  arg1 = ecx_21;
006663a8                                                  ebx_11 = ((char*)edi_24 - eax_109);
006663a0                                                  break;
006663a0                                              }
006663af                                              case 4:
006663af                                              {
006663af                                                  arg1 = ecx_21;
006663b3                                                  ebx_11 = edi_24;
006663b5                                                  edx_49 = ((char*)edi_24 + eax_109);
006663af                                                  break;
006663af                                              }
006663bd                                              case 5:
006663bd                                              {
006663bd                                                  ebx_11 = edi_24;
006663c1                                                  edx_49 = ecx_21;
006663c3                                                  arg1 = ((char*)edi_24 - eax_109);
006663bd                                                  break;
006663bd                                              }
0066636d                                          }
006662ab                                  }
006662ab                                  else
006662ab                                  {
006662b5                                      arg1 = ecx_21;
006662b9                                      edx_49 = ecx_21;
006662bd                                      ebx_11 = ecx_21;
006662ab                                  }
006662ab                                  
006662c9                                  int32_t eax_91;
006662c9                                  eax_91 = edx_49 != 0;
006662ce                                  edx_50 = ((char*)edx_49 - eax_91);
006662d2                                  int32_t ecx_22;
006662d2                                  ecx_22 = ebx_11 != 0;
006662d7                                  var_34 = edx_50;
006662db                                  ebx_12 = ((char*)ebx_11 - ecx_22);
006662e1                                  ecx_23 = arg1 != 0;
006662e4                                  var_38 = ebx_12;
006662e8                                  void* eax_93 = ((char*)arg1 - ecx_23);
006662ea                                  ecx_23 = edx_50;
006662ec                                  edx_50 = ebx_12;
006662ee                                  arg1 = eax_93;
006662f2                                  ebx_12 = eax_93;
006662a3                              }
006662a3                              
0066646c                              eax_78 = var_24_2;
00666470                              *(uint8_t*)eax_78 = ecx_23;
00666472                              nWidth = nWidth_3;
00666476                              eax_78[0xfffffffe] = ebx_12;
00666479                              eax_78[0xffffffff] = edx_50;
00666198                          }
00666198                          
0066647c                          i = var_28_2;
0066647c                          var_28_2 -= 1;
00666480                      } while (i != 1);
00666162                  }
00666162                  
00666492                  __inner1_1 = (__inner1_2 - iStride_1);
00666494                  cond:3_1 = nHeight_3 != 1;
00666495                  __inner1_2 = __inner1_1;
00666499                  nHeight_3 -= 1;
0066649d              } while (cond:3_1);
00666148          }
00665cc0      }
00665cc0      else
00665cc0      {
00665cc6          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00665cca          union __inner1 = arg1->cDstArgs.__inner1;
00665cd1          int32_t ecx_1;
00665cd1          ecx_1 = i8AlphaModifier != 0;
00665cd4          union __inner1_3 = __inner1;
00665cd8          int32_t edi_1 = (i8AlphaModifier + ecx_1);
00665cda          uint32_t nHeight = arg1->nHeight;
00665cdf          int32_t var_c_1 = edi_1;
00665cdf          
00665ce3          if (nHeight > 0)
00665ce3          {
00665ce9              uint32_t nWidth_1 = arg1->nWidth;
00665cec              uint32_t iStride = arg1->cDstArgs.iStride;
00665cef              int16_t __inner0_1 = ((int16_t)g_SourceColor.__inner0);
00665cf5              uint32_t nWidth_2 = nWidth_1;
00665cfd              uint32_t nHeight_2 = nHeight;
0066605e              bool cond:4_1;
0066605e              
0066605e              do
0066605e              {
00665d03                  if (nWidth_1 > 0)
00665d03                  {
00665d09                      uint32_t ecx_2 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
00665d17                      char* ecx_3 = (((nWidth_1 * 3) + __inner1) + 2);
00665d1b                      uint32_t var_24_1 = nWidth_1;
00666041                      uint32_t i_1;
00666041                      
00666041                      do
00666041                      {
00665d26                          ecx_3 -= 3;
00665d2b                          int32_t eax;
00665d2b                          eax = ecx_2 != 0;
00665d2e                          char* var_28_1 = ecx_3;
00665d32                          int32_t esi_2 = (ecx_2 + eax);
00665d3a                          int32_t var_34_1 = esi_2;
00665d3a                          
00665d3e                          if (edi_1 != 0x100)
00665d3e                          {
00665d45                              int32_t eax_3;
00665d45                              char edx_2;
00665d45                              edx_2 = HIGHD(((int64_t)(esi_2 * edi_1)));
00665d45                              eax_3 = LOWD(((int64_t)(esi_2 * edi_1)));
00665d51                              esi_2 = ((eax_3 + ((uint32_t)edx_2)) >> 8);
00665d53                              var_34_1 = esi_2;
00665d3e                          }
00665d3e                          
00665d59                          if (esi_2 != 0)
00665d59                          {
00665d5f                              uint32_t edx_1;
00665d5f                              edx_1 = ecx_3[0xfffffffe];
00665d62                              eax = ecx_3[0xffffffff];
00665d65                              ecx_3 = *(uint8_t*)ecx_3;
00665d6b                              uint32_t ecx_4 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 2));
00665d7a                              int32_t edx_3;
00665d7a                              edx_3 = ecx_4 != 0;
00665d7d                              uint32_t esi_3 = ((uint32_t)*(uint8_t*)((char*)__inner0_1)[1]);
00665d86                              uint32_t edi_2 = ((uint32_t)__inner0_1);
00665d89                              int32_t ecx_5 = (ecx_4 + edx_3);
00665d8d                              int32_t eax_5;
00665d8d                              eax_5 = esi_3 != 0;
00665d92                              int32_t ebp_1 = ecx_5;
00665d94                              int32_t esi_4 = (esi_3 + eax_5);
00665d98                              int32_t edx_4;
00665d98                              edx_4 = edi_2 != 0;
00665d9b                              int32_t eax_6 = ecx_5;
00665d9d                              int32_t edi_3 = (edi_2 + edx_4);
00665d9d                              
00665da1                              if (esi_4 > ecx_5)
00665da3                                  ebp_1 = esi_4;
00665da1                              else if (esi_4 < ecx_5)
00665da9                                  eax_6 = esi_4;
00665da9                              
00665dad                              if (edi_3 > ebp_1)
00665daf                                  ebp_1 = edi_3;
00665dad                              else if (edi_3 < eax_6)
00665db7                                  eax_6 = edi_3;
00665db7                              
00665dbb                              int32_t edx_6 = (ebp_1 - eax_6);
00665dc1                              int32_t var_4c_1;
00665dc1                              int32_t ebp_2;
00665dc1                              int32_t esi_5;
00665dc1                              
00665dc1                              if (ebp_1 != eax_6)
00665dc1                              {
00665dd7                                  int32_t ebx_1 = 0;
00665ddb                                  var_4c_1 = (((int64_t)(edx_6 << 8)) / ebp_1);
00665ddf                                  int32_t ecx_6;
00665ddf                                  
00665ddf                                  if (ecx_5 == ebp_1)
00665ddf                                  {
00665de3                                      ecx_6 = (esi_4 - edi_3);
00665de3                                      
00665de5                                      if ((esi_4 - edi_3) < 0)
00665de7                                          ebx_1 = 0x6000;
00665ddf                                  }
00665ddf                                  else if (esi_4 != ebp_1)
00665df0                                  {
00665dfd                                      ecx_6 = (ecx_5 - esi_4);
00665dff                                      ebx_1 = 0x4000;
00665df0                                  }
00665df0                                  else
00665df0                                  {
00665df4                                      ecx_6 = (edi_3 - ecx_5);
00665df6                                      ebx_1 = 0x2000;
00665df0                                  }
00665df0                                  
00665e0e                                  ebp_2 = var_4c_1;
00665e14                                  esi_5 = ((((int64_t)(ecx_6 << 0xc)) / edx_6) + ebx_1);
00665dc1                              }
00665dc1                              else
00665dc1                              {
00665dc3                                  esi_5 = 0;
00665dc5                                  ebp_2 = 0;
00665dc7                                  var_4c_1 = 0;
00665dc1                              }
00665dc1                              
00665e16                              uint32_t eax_15 = ((uint32_t)eax);
00665e1b                              uint32_t edx_11 = ((uint32_t)edx_1);
00665e20                              uint32_t edi_5 = ((uint32_t)ecx_3);
00665e29                              int32_t ecx_7;
00665e29                              ecx_7 = eax_15 != 0;
00665e38                              struct BlitArgs* eax_16 = (eax_15 + ecx_7);
00665e3e                              int32_t ecx_8;
00665e3e                              ecx_8 = edx_11 != 0;
00665e41                              struct BlitArgs* edx_12 = (edx_11 + ecx_8);
00665e47                              int32_t ecx_9;
00665e47                              ecx_9 = edi_5 != 0;
00665e4a                              struct BlitArgs* ecx_10 = (ecx_9 + edi_5);
00665e4a                              
00665e4e                              if (eax_16 > ecx_10)
00665e50                                  ecx_10 = eax_16;
00665e50                              
00665e54                              if (edx_12 > ecx_10)
00665e56                                  ecx_10 = edx_12;
00665e56                              
00665e60                              uint32_t ecx_11;
00665e60                              uint32_t ebx_2;
00665e60                              
00665e60                              if (var_34_1 != 0x100)
00665e60                              {
00665f85                                  void* edx_21;
00665f85                                  void* esi_10;
00665f85                                  
00665f85                                  if (ebp_2 != 0)
00665f85                                  {
00666070                                      int32_t eax_63;
00666070                                      char edx_29;
00666070                                      edx_29 = HIGHD(((int64_t)(ecx_10 * var_4c_1)));
00666070                                      eax_63 = LOWD(((int64_t)(ecx_10 * var_4c_1)));
0066607d                                      int32_t eax_66;
0066607d                                      int32_t edx_31;
0066607d                                      edx_31 = HIGHD(((int64_t)esi_5));
0066607d                                      eax_66 = LOWD(((int64_t)esi_5));
00666088                                      int32_t ebx_7 = ((eax_66 + (edx_31 & 0xfff)) >> 0xc);
0066608e                                      int32_t eax_69;
0066608e                                      int32_t edx_33;
0066608e                                      edx_33 = HIGHD(((int64_t)(ebx_7 + 1)));
0066608e                                      eax_69 = LOWD(((int64_t)(ebx_7 + 1)));
00666093                                      int32_t ebp_10 = ((eax_63 + ((uint32_t)edx_29)) >> 8);
0066609b                                      int32_t esi_13 = ((esi_5 - (((eax_69 - edx_33) >> 1) << 0xd)) * ebp_10);
006660a0                                      struct BlitArgs* edi_15 = ((char*)ecx_10 - ebp_10);
006660a4                                      int32_t ebp_12 = (esi_13 & 0x80000fff);
006660a4                                      
006660aa                                      if (ebp_12 < 0)
006660b3                                          ebp_12 = (((ebp_12 - 1) | 0xfffff000) + 1);
006660b3                                      
006660b6                                      int32_t eax_74;
006660b6                                      int32_t edx_34;
006660b6                                      edx_34 = HIGHD(((int64_t)esi_13));
006660b6                                      eax_74 = LOWD(((int64_t)esi_13));
006660bf                                      int32_t eax_76 = ((eax_74 + (edx_34 & 0xfff)) >> 0xc);
006660bf                                      
006660c8                                      if (ebp_12 < 0xfffff800)
006660ca                                          eax_76 -= 1;
006660ca                                      
006660d1                                      if (ebp_12 > 0x800)
006660d3                                          eax_76 += 1;
006660d3                                      
006660d7                                      if (ebx_7 > 5)
006660d7                                          goto label_665f97;
006660d7                                      
006660dd                                      switch (ebx_7)
006660dd                                      {
006660e4                                          case 0:
006660e4                                          {
006660e4                                              edx_21 = ecx_10;
006660e6                                              esi_10 = edi_15;
006660e8                                              ecx_10 = ((char*)edi_15 + eax_76);
006660e4                                              break;
006660e4                                          }
006660f0                                          case 1:
006660f0                                          {
006660f0                                              esi_10 = edi_15;
006660f4                                              edx_21 = ((char*)edi_15 - eax_76);
006660f0                                              break;
006660f0                                          }
006660fb                                          case 2:
006660fb                                          {
006660fb                                              edx_21 = edi_15;
006660fd                                              esi_10 = ((char*)edi_15 + eax_76);
006660fb                                              break;
006660fb                                          }
00666105                                          case 3:
00666105                                          {
00666105                                              edx_21 = edi_15;
00666109                                              esi_10 = ecx_10;
0066610b                                              ecx_10 = ((char*)edi_15 - eax_76);
00666105                                              break;
00666105                                          }
00666112                                          case 4:
00666112                                          {
00666112                                              esi_10 = ecx_10;
00666114                                              ecx_10 = edi_15;
00666116                                              edx_21 = ((char*)edi_15 + eax_76);
00666112                                              break;
00666112                                          }
0066611e                                          case 5:
0066611e                                          {
0066611e                                              edx_21 = ecx_10;
00666120                                              ecx_10 = edi_15;
00666124                                              esi_10 = ((char*)edi_15 - eax_76);
0066611e                                              break;
0066611e                                          }
006660dd                                      }
00665f85                                  }
00665f85                                  else
00665f85                                  {
00665f8b                                      var_40 = ecx_10;
00665f8f                                      var_3c = ecx_10;
00665f93                                      var_38 = ecx_10;
00665f97                                  label_665f97:
00665f97                                      edx_21 = var_40;
00665f9b                                      ecx_10 = var_3c;
00665f9f                                      esi_10 = var_38;
00665f85                                  }
00665f85                                  
00665fa7                                  int32_t eax_37;
00665fa7                                  eax_37 = edx_21 != 0;
00665fb2                                  void* edx_22 = ((char*)edx_21 - eax_37);
00665fb8                                  int32_t eax_38;
00665fb8                                  eax_38 = ecx_10 != 0;
00665fbb                                  var_40 = edx_22;
00665fbf                                  void* ecx_12 = ((char*)ecx_10 - eax_38);
00665fc5                                  int32_t eax_39;
00665fc5                                  eax_39 = esi_10 != 0;
00665fc8                                  var_3c = ecx_12;
00665fcc                                  void* esi_11 = ((char*)esi_10 - eax_39);
00665fd5                                  int32_t eax_43;
00665fd5                                  char edx_23;
00665fd5                                  edx_23 = HIGHD(((int64_t)((edi_5 - edx_22) * var_34_1)));
00665fd5                                  eax_43 = LOWD(((int64_t)((edi_5 - edx_22) * var_34_1)));
00665fe1                                  uint32_t ebx_5;
00665fe1                                  ebx_5 = (edi_5 - ((int8_t)((eax_43 + ((uint32_t)edx_23)) >> 8)));
00665ff6                                  int32_t eax_49;
00665ff6                                  char edx_25;
00665ff6                                  edx_25 = HIGHD(((int64_t)((eax_15 - ecx_12) * var_34_1)));
00665ff6                                  eax_49 = LOWD(((int64_t)((eax_15 - ecx_12) * var_34_1)));
00666002                                  ebx_2 = (eax_15 - ((int8_t)((eax_49 + ((uint32_t)edx_25)) >> 8)));
0066600b                                  int32_t eax_55;
0066600b                                  char edx_27;
0066600b                                  edx_27 = HIGHD(((int64_t)((edx_11 - esi_11) * var_34_1)));
0066600b                                  eax_55 = LOWD(((int64_t)((edx_11 - esi_11) * var_34_1)));
00666014                                  edx_1 = ebx_5;
0066601b                                  var_38 = esi_11;
0066601f                                  ecx_11 = (edx_11 - ((int8_t)((eax_55 + ((uint32_t)edx_27)) >> 8)));
00665e60                              }
00665e60                              else
00665e60                              {
00665e68                                  struct BlitArgs* var_48;
00665e68                                  struct BlitArgs* edx_13;
00665e68                                  
00665e68                                  if (ebp_2 != 0)
00665e68                                  {
00665ebb                                      int32_t eax_23;
00665ebb                                      char edx_14;
00665ebb                                      edx_14 = HIGHD(((int64_t)(ecx_10 * var_4c_1)));
00665ebb                                      eax_23 = LOWD(((int64_t)(ecx_10 * var_4c_1)));
00665ec8                                      int32_t eax_26;
00665ec8                                      int32_t edx_16;
00665ec8                                      edx_16 = HIGHD(((int64_t)esi_5));
00665ec8                                      eax_26 = LOWD(((int64_t)esi_5));
00665ed3                                      int32_t ebx_4 = ((eax_26 + (edx_16 & 0xfff)) >> 0xc);
00665ed9                                      int32_t eax_29;
00665ed9                                      int32_t edx_18;
00665ed9                                      edx_18 = HIGHD(((int64_t)(ebx_4 + 1)));
00665ed9                                      eax_29 = LOWD(((int64_t)(ebx_4 + 1)));
00665ede                                      int32_t ebp_4 = ((eax_23 + ((uint32_t)edx_14)) >> 8);
00665ee6                                      int32_t esi_9 = ((esi_5 - (((eax_29 - edx_18) >> 1) << 0xd)) * ebp_4);
00665eeb                                      struct BlitArgs* edi_8 = ((char*)ecx_10 - ebp_4);
00665eef                                      int32_t ebp_6 = (esi_9 & 0x80000fff);
00665eef                                      
00665ef5                                      if (ebp_6 < 0)
00665efe                                          ebp_6 = (((ebp_6 - 1) | 0xfffff000) + 1);
00665efe                                      
00665f01                                      int32_t eax_34;
00665f01                                      int32_t edx_19;
00665f01                                      edx_19 = HIGHD(((int64_t)esi_9));
00665f01                                      eax_34 = LOWD(((int64_t)esi_9));
00665f0a                                      int32_t eax_36 = ((eax_34 + (edx_19 & 0xfff)) >> 0xc);
00665f0a                                      
00665f13                                      if (ebp_6 < 0xfffff800)
00665f15                                          eax_36 -= 1;
00665f15                                      
00665f1c                                      if (ebp_6 > 0x800)
00665f1e                                          eax_36 += 1;
00665f1e                                      
00665f22                                      if (ebx_4 > 5)
00665f22                                      {
00665e76                                          ecx_10 = var_44;
00665e7a                                          edx_13 = var_48;
00665f22                                      }
00665f22                                      else
00665f28                                          switch (ebx_4)
00665f28                                          {
00665f2f                                              case 0:
00665f2f                                              {
00665f2f                                                  edx_13 = ecx_10;
00665f31                                                  arg1 = edi_8;
00665f35                                                  ecx_10 = ((char*)edi_8 + eax_36);
00665f2f                                                  break;
00665f2f                                              }
00665f3d                                              case 1:
00665f3d                                              {
00665f3d                                                  arg1 = edi_8;
00665f43                                                  edx_13 = ((char*)edi_8 - eax_36);
00665f3d                                                  break;
00665f3d                                              }
00665f4a                                              case 2:
00665f4a                                              {
00665f4a                                                  edx_13 = edi_8;
00665f4e                                                  arg1 = ((char*)edi_8 + eax_36);
00665f4a                                                  break;
00665f4a                                              }
00665f57                                              case 3:
00665f57                                              {
00665f57                                                  edx_13 = edi_8;
00665f5b                                                  arg1 = ecx_10;
00665f5f                                                  ecx_10 = ((char*)edi_8 - eax_36);
00665f57                                                  break;
00665f57                                              }
00665f66                                              case 4:
00665f66                                              {
00665f66                                                  arg1 = ecx_10;
00665f6a                                                  ecx_10 = edi_8;
00665f6c                                                  edx_13 = ((char*)edi_8 + eax_36);
00665f66                                                  break;
00665f66                                              }
00665f74                                              case 5:
00665f74                                              {
00665f74                                                  edx_13 = ecx_10;
00665f76                                                  ecx_10 = edi_8;
00665f7a                                                  arg1 = ((char*)edi_8 - eax_36);
00665f74                                                  break;
00665f74                                              }
00665f28                                          }
00665e68                                  }
00665e68                                  else
00665e68                                  {
00665e6a                                      var_48 = ecx_10;
00665e72                                      arg1 = ecx_10;
00665e76                                      ecx_10 = ecx_10;
00665e7a                                      edx_13 = var_48;
00665e68                                  }
00665e68                                  
00665e86                                  int32_t eax_17;
00665e86                                  eax_17 = edx_13 != 0;
00665e89                                  edx_1 = ((char*)edx_13 - eax_17);
00665e8f                                  int32_t eax_18;
00665e8f                                  eax_18 = ecx_10 != 0;
00665e94                                  var_48 = edx_1;
00665e98                                  ecx_11 = ((char*)ecx_10 - eax_18);
00665e9c                                  ebx_2 = arg1 != 0;
00665ea1                                  var_44 = ecx_11;
00665ea5                                  void* eax_20 = ((char*)arg1 - ebx_2);
00665ea7                                  ebx_2 = ecx_11;
00665ea9                                  arg1 = eax_20;
00665ead                                  ecx_11 = eax_20;
00665e60                              }
00665e60                              
00666025                              edi_1 = var_c_1;
00666029                              nWidth_1 = nWidth_2;
0066602d                              var_28_1[0xfffffffe] = ecx_11;
00666030                              var_28_1[0xffffffff] = ebx_2;
00666033                              __inner0_1 = ((int16_t)g_SourceColor.__inner0);
00666039                              *(uint8_t*)var_28_1 = edx_1;
0066603b                              ecx_3 = var_28_1;
00665d59                          }
00665d59                          
0066603d                          i_1 = var_24_1;
0066603d                          var_24_1 -= 1;
00666041                      } while (i_1 != 1);
00665d03                  }
00665d03                  
00666053                  __inner1 = (__inner1_3 + iStride);
00666055                  cond:4_1 = nHeight_2 != 1;
00666056                  __inner1_3 = __inner1;
0066605a                  nHeight_2 -= 1;
0066605e              } while (cond:4_1);
00665ce3          }
00665cc0      }
00665cb0  }

00666573                                                           90                                                         .
00666574  uint32_t jump_table_666574[0x6] = 
00666574  {
00666574      [0x0] =  0x00665f2f
00666578      [0x1] =  0x00665f3d
0066657c      [0x2] =  0x00665f4a
00666580      [0x3] =  0x00665f57
00666584      [0x4] =  0x00665f66
00666588      [0x5] =  0x00665f74
0066658c  }
0066658c  uint32_t jump_table_66658c[0x6] = 
0066658c  {
0066658c      [0x0] =  0x006660e4
00666590      [0x1] =  0x006660f0
00666594      [0x2] =  0x006660fb
00666598      [0x3] =  0x00666105
0066659c      [0x4] =  0x00666112
006665a0      [0x5] =  0x0066611e
006665a4  }
006665a4  uint32_t jump_table_6665a4[0x6] = 
006665a4  {
006665a4      [0x0] =  0x00666374
006665a8      [0x1] =  0x00666382
006665ac      [0x2] =  0x00666391
006665b0      [0x3] =  0x006663a0
006665b4      [0x4] =  0x006663af
006665b8      [0x5] =  0x006663bd
006665bc  }
006665bc  uint32_t jump_table_6665bc[0x6] = 
006665bc  {
006665bc      [0x0] =  0x00666528
006665c0      [0x1] =  0x00666534
006665c4      [0x2] =  0x00666541
006665c8      [0x3] =  0x0066654d
006665cc      [0x4] =  0x0066655a
006665d0      [0x5] =  0x00666566
006665d4  }

006665d4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

006665e0  void ColoringLoopNoScale_FromA8<&BlitOp_Colorize<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_ARGB>(struct BlitArgs const* arg1)

006665e0  {
006665f4      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006665f8      union __inner1 = arg1->cSrcArgs.__inner1;
00666600      int32_t ecx_1;
00666600      ecx_1 = i8AlphaModifier != 0;
00666603      union __inner1_1 = arg1->cDstArgs.__inner1;
00666607      int32_t edi = (i8AlphaModifier + ecx_1);
00666609      uint32_t nHeight = arg1->nHeight;
0066660e      int32_t var_20 = edi;
00666612      uint32_t nHeight_1 = nHeight;
00666612      
00666616      if (nHeight > 0)
00666616      {
0066661c          uint32_t nWidth = arg1->nWidth;
0066661f          uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00666622          uint32_t iStride = arg1->cDstArgs.iStride;
0066662a          uint32_t i_3 = (nWidth >> 2);
0066662d          int32_t i_2 = (nWidth & 3);
00666630          uint32_t i_4 = i_3;
00666630          
00666657          while (true)
00666657          {
00666657              nHeight_1 -= 1;
0066665b              uint32_t i = i_3;
0066665b              
0066665d              if (i_3 > 0)
0066665d              {
0066666a                  int32_t esi_3 = ((i_3 << 4) + __inner1_1);
0066666a                  
006669d9                  do
006669d9                  {
00666674                      int32_t ecx_4 = *(uint32_t*)((__inner1 + (i << 2)) - 4);
00666679                      esi_3 -= 0x10;
00666680                      int32_t var_30_1 = esi_3;
00666684                      int32_t var_2c_1 = ecx_4;
00666688                      int32_t var_70_1 = 3;
006669cd                      bool cond:5_1;
006669cd                      
006669cd                      do
006669cd                      {
0066669c                          int32_t ecx_6 = ((ecx_4 & 0xff000000) | g_SourceColor.__inner0);
006666a0                          uint16_t ebx_2 = ((int16_t)(ecx_6 >> 0x10));
006666a3                          uint32_t ebp_1 = ((uint32_t)*(uint8_t*)((char*)ebx_2)[1]);
006666aa                          int32_t edx_4;
006666aa                          edx_4 = ebp_1 != 0;
006666ad                          int32_t var_8_1 = ecx_6;
006666b4                          int32_t ebp_2 = (ebp_1 + edx_4);
006666bc                          int32_t var_50_1 = ebp_2;
006666bc                          
006666c0                          if (edi != 0x100)
006666c0                          {
006666c7                              int32_t eax_4;
006666c7                              char edx_5;
006666c7                              edx_5 = HIGHD(((int64_t)(ebp_2 * edi)));
006666c7                              eax_4 = LOWD(((int64_t)(ebp_2 * edi)));
006666d3                              ebp_2 = ((eax_4 + ((uint32_t)edx_5)) >> 8);
006666d5                              var_50_1 = ebp_2;
006666c0                          }
006666c0                          
006666db                          if (ebp_2 != 0)
006666db                          {
006666e5                              int32_t edx_7 = *(uint32_t*)(esi_3 + (var_70_1 << 2));
006666ea                              uint32_t edi_1 = ((uint32_t)ecx_6);
006666ed                              uint32_t esi_4 = ((uint32_t)*(uint8_t*)((char*)ecx_6)[1]);
006666f0                              uint32_t ecx_7 = ((uint32_t)ebx_2);
006666f5                              int32_t eax_8;
006666f5                              eax_8 = ecx_7 != 0;
006666fe                              int32_t ecx_8 = (ecx_7 + eax_8);
00666702                              int32_t edx_8;
00666702                              edx_8 = esi_4 != 0;
00666707                              int32_t ebx_3 = ecx_8;
00666709                              int32_t esi_5 = (esi_4 + edx_8);
0066670d                              int32_t eax_9;
0066670d                              eax_9 = edi_1 != 0;
00666710                              int32_t edi_2 = (edi_1 + eax_9);
00666714                              int32_t eax_10 = ecx_8;
00666714                              
00666716                              if (esi_5 > ecx_8)
00666718                                  ebx_3 = esi_5;
00666716                              else if (esi_5 < ecx_8)
0066671e                                  eax_10 = esi_5;
0066671e                              
00666722                              if (edi_2 > ebx_3)
00666724                                  ebx_3 = edi_2;
00666722                              else if (edi_2 < eax_10)
0066672c                                  eax_10 = edi_2;
0066672c                              
00666730                              int32_t edx_10 = (ebx_3 - eax_10);
00666736                              int32_t var_74_1;
00666736                              int32_t ebx_4;
00666736                              int32_t esi_6;
00666736                              
00666736                              if (ebx_3 != eax_10)
00666736                              {
0066674c                                  int32_t ebp_3 = 0;
00666750                                  var_74_1 = (((int64_t)(edx_10 << 8)) / ebx_3);
00666754                                  int32_t ecx_9;
00666754                                  
00666754                                  if (ecx_8 == ebx_3)
00666754                                  {
00666758                                      ecx_9 = (esi_5 - edi_2);
00666758                                      
0066675a                                      if ((esi_5 - edi_2) < 0)
0066675c                                          ebp_3 = 0x6000;
00666754                                  }
00666754                                  else if (esi_5 != ebx_3)
00666765                                  {
00666772                                      ecx_9 = (ecx_8 - esi_5);
00666774                                      ebp_3 = 0x4000;
00666765                                  }
00666765                                  else
00666765                                  {
00666769                                      ecx_9 = (edi_2 - ecx_8);
0066676b                                      ebp_3 = 0x2000;
00666765                                  }
00666765                                  
00666783                                  ebx_4 = var_74_1;
00666789                                  esi_6 = ((((int64_t)(ecx_9 << 0xc)) / edx_10) + ebp_3);
0066678b                                  ebp_2 = var_50_1;
00666736                              }
00666736                              else
00666736                              {
00666738                                  esi_6 = 0;
0066673a                                  ebx_4 = 0;
0066673c                                  var_74_1 = 0;
00666736                              }
00666736                              
0066678f                              uint32_t eax_19 = ((uint32_t)*(uint8_t*)((char*)edx_7)[1]);
00666794                              uint32_t edx_15 = ((uint32_t)edx_7);
00666799                              uint32_t edi_4 = ((uint32_t)*(uint8_t*)((char*)edx_7)[2]);
006667a2                              int32_t ecx_10;
006667a2                              ecx_10 = eax_19 != 0;
006667b1                              int32_t eax_20 = (eax_19 + ecx_10);
006667b7                              int32_t ecx_11;
006667b7                              ecx_11 = edx_15 != 0;
006667ba                              int32_t edx_16 = (edx_15 + ecx_11);
006667c0                              int32_t ecx_12;
006667c0                              ecx_12 = edi_4 != 0;
006667c3                              int32_t ecx_13 = (ecx_12 + edi_4);
006667c3                              
006667c7                              if (eax_20 > ecx_13)
006667c9                                  ecx_13 = eax_20;
006667c9                              
006667cd                              if (edx_16 > ecx_13)
006667cf                                  ecx_13 = edx_16;
006667cf                              
006667d7                              int32_t var_80_1;
006667d7                              
006667d7                              if (ebp_2 != 0x100)
006667d7                              {
00666904                                  int32_t var_5c;
00666904                                  int32_t var_58;
00666904                                  int32_t var_54;
00666904                                  int32_t edx_26;
00666904                                  int32_t esi_11;
00666904                                  
00666904                                  if (ebx_4 != 0)
00666904                                  {
00666ab9                                      int32_t eax_77;
00666ab9                                      char edx_42;
00666ab9                                      edx_42 = HIGHD(((int64_t)(ecx_13 * var_74_1)));
00666ab9                                      eax_77 = LOWD(((int64_t)(ecx_13 * var_74_1)));
00666ac6                                      int32_t eax_80;
00666ac6                                      int32_t edx_44;
00666ac6                                      edx_44 = HIGHD(((int64_t)esi_6));
00666ac6                                      eax_80 = LOWD(((int64_t)esi_6));
00666ad1                                      int32_t ebx_16 = ((eax_80 + (edx_44 & 0xfff)) >> 0xc);
00666ad7                                      int32_t eax_83;
00666ad7                                      int32_t edx_46;
00666ad7                                      edx_46 = HIGHD(((int64_t)(ebx_16 + 1)));
00666ad7                                      eax_83 = LOWD(((int64_t)(ebx_16 + 1)));
00666adf                                      int32_t ebp_14 = ((eax_77 + ((uint32_t)edx_42)) >> 8);
00666ae4                                      int32_t esi_16 = ((esi_6 - (((eax_83 - edx_46) >> 1) << 0xd)) * ebp_14);
00666ae9                                      int32_t edi_16 = (ecx_13 - ebp_14);
00666aef                                      int32_t ebp_16 = (esi_16 & 0x80000fff);
00666aef                                      
00666af5                                      if (ebp_16 < 0)
00666afe                                          ebp_16 = (((ebp_16 - 1) | 0xfffff000) + 1);
00666afe                                      
00666aff                                      int32_t eax_88;
00666aff                                      int32_t edx_47;
00666aff                                      edx_47 = HIGHD(((int64_t)esi_16));
00666aff                                      eax_88 = LOWD(((int64_t)esi_16));
00666b08                                      int32_t eax_90 = ((eax_88 + (edx_47 & 0xfff)) >> 0xc);
00666b08                                      
00666b11                                      if (ebp_16 < 0xfffff800)
00666b13                                          eax_90 -= 1;
00666b13                                      
00666b1a                                      if (ebp_16 > 0x800)
00666b1c                                          eax_90 += 1;
00666b1c                                      
00666b20                                      if (ebx_16 > 5)
00666b20                                          goto label_666916;
00666b20                                      
00666b26                                      switch (ebx_16)
00666b26                                      {
00666b2d                                          case 0:
00666b2d                                          {
00666b2d                                              edx_26 = ecx_13;
00666b2f                                              esi_11 = edi_16;
00666b31                                              ecx_13 = (edi_16 + eax_90);
00666b2d                                              break;
00666b2d                                          }
00666b39                                          case 1:
00666b39                                          {
00666b39                                              esi_11 = edi_16;
00666b3d                                              edx_26 = (edi_16 - eax_90);
00666b39                                              break;
00666b39                                          }
00666b44                                          case 2:
00666b44                                          {
00666b44                                              edx_26 = edi_16;
00666b46                                              esi_11 = (edi_16 + eax_90);
00666b44                                              break;
00666b44                                          }
00666b4e                                          case 3:
00666b4e                                          {
00666b4e                                              edx_26 = edi_16;
00666b52                                              esi_11 = ecx_13;
00666b54                                              ecx_13 = (edi_16 - eax_90);
00666b4e                                              break;
00666b4e                                          }
00666b5b                                          case 4:
00666b5b                                          {
00666b5b                                              esi_11 = ecx_13;
00666b5d                                              ecx_13 = edi_16;
00666b5f                                              edx_26 = (edi_16 + eax_90);
00666b5b                                              break;
00666b5b                                          }
00666b67                                          case 5:
00666b67                                          {
00666b67                                              edx_26 = ecx_13;
00666b69                                              ecx_13 = edi_16;
00666b6d                                              esi_11 = (edi_16 - eax_90);
00666b67                                              break;
00666b67                                          }
00666b26                                      }
00666904                                  }
00666904                                  else
00666904                                  {
0066690a                                      var_5c = ecx_13;
0066690e                                      var_58 = ecx_13;
00666912                                      var_54 = ecx_13;
00666916                                  label_666916:
00666916                                      esi_11 = var_54;
0066691a                                      ecx_13 = var_58;
0066691e                                      edx_26 = var_5c;
00666904                                  }
00666904                                  
00666926                                  int32_t eax_41;
00666926                                  eax_41 = edx_26 != 0;
00666931                                  int32_t edx_27 = (edx_26 - eax_41);
00666937                                  int32_t eax_42;
00666937                                  eax_42 = ecx_13 != 0;
0066693a                                  var_5c = edx_27;
0066693e                                  int32_t ecx_15 = (ecx_13 - eax_42);
00666944                                  int32_t eax_43;
00666944                                  eax_43 = esi_11 != 0;
00666947                                  var_58 = ecx_15;
0066694b                                  int32_t esi_12 = (esi_11 - eax_43);
00666954                                  int32_t eax_47;
00666954                                  char edx_28;
00666954                                  edx_28 = HIGHD(((int64_t)((edi_4 - edx_27) * var_50_1)));
00666954                                  eax_47 = LOWD(((int64_t)((edi_4 - edx_27) * var_50_1)));
00666960                                  uint32_t ebx_8;
00666960                                  ebx_8 = (edi_4 - ((int8_t)((eax_47 + ((uint32_t)edx_28)) >> 8)));
00666962                                  *(uint8_t*)((char*)var_80_1)[2] = ebx_8;
00666971                                  int32_t eax_53;
00666971                                  char edx_30;
00666971                                  edx_30 = HIGHD(((int64_t)((eax_19 - ecx_15) * var_50_1)));
00666971                                  eax_53 = LOWD(((int64_t)((eax_19 - ecx_15) * var_50_1)));
0066697d                                  uint32_t ebx_9;
0066697d                                  ebx_9 = (eax_19 - ((int8_t)((eax_53 + ((uint32_t)edx_30)) >> 8)));
0066697f                                  *(uint8_t*)((char*)var_80_1)[1] = ebx_9;
0066698e                                  int32_t eax_59;
0066698e                                  char edx_32;
0066698e                                  edx_32 = HIGHD(((int64_t)((edx_15 - esi_12) * var_50_1)));
0066698e                                  eax_59 = LOWD(((int64_t)((edx_15 - esi_12) * var_50_1)));
0066699a                                  uint32_t ebx_10;
0066699a                                  ebx_10 = (edx_15 - ((int8_t)((eax_59 + ((uint32_t)edx_32)) >> 8)));
0066699c                                  var_54 = esi_12;
006669a0                                  var_80_1 = ebx_10;
006667d7                              }
006667d7                              else
006667d7                              {
006667df                                  int32_t var_7c;
006667df                                  int32_t var_64;
006667df                                  int32_t var_60;
006667df                                  int32_t edx_17;
006667df                                  
006667df                                  if (ebx_4 != 0)
006667df                                  {
0066683a                                      int32_t eax_27;
0066683a                                      char edx_19;
0066683a                                      edx_19 = HIGHD(((int64_t)(ecx_13 * var_74_1)));
0066683a                                      eax_27 = LOWD(((int64_t)(ecx_13 * var_74_1)));
00666847                                      int32_t eax_30;
00666847                                      int32_t edx_21;
00666847                                      edx_21 = HIGHD(((int64_t)esi_6));
00666847                                      eax_30 = LOWD(((int64_t)esi_6));
00666852                                      int32_t ebx_7 = ((eax_30 + (edx_21 & 0xfff)) >> 0xc);
00666858                                      int32_t eax_33;
00666858                                      int32_t edx_23;
00666858                                      edx_23 = HIGHD(((int64_t)(ebx_7 + 1)));
00666858                                      eax_33 = LOWD(((int64_t)(ebx_7 + 1)));
0066685d                                      int32_t ebp_5 = ((eax_27 + ((uint32_t)edx_19)) >> 8);
00666865                                      int32_t esi_10 = ((esi_6 - (((eax_33 - edx_23) >> 1) << 0xd)) * ebp_5);
0066686a                                      int32_t edi_7 = (ecx_13 - ebp_5);
0066686e                                      int32_t ebp_7 = (esi_10 & 0x80000fff);
0066686e                                      
00666874                                      if (ebp_7 < 0)
0066687d                                          ebp_7 = (((ebp_7 - 1) | 0xfffff000) + 1);
0066687d                                      
00666880                                      int32_t eax_38;
00666880                                      int32_t edx_24;
00666880                                      edx_24 = HIGHD(((int64_t)esi_10));
00666880                                      eax_38 = LOWD(((int64_t)esi_10));
00666889                                      int32_t eax_40 = ((eax_38 + (edx_24 & 0xfff)) >> 0xc);
00666889                                      
00666892                                      if (ebp_7 < 0xfffff800)
00666894                                          eax_40 -= 1;
00666894                                      
0066689b                                      if (ebp_7 > 0x800)
0066689d                                          eax_40 += 1;
0066689d                                      
006668a1                                      if (ebx_7 > 5)
006668a1                                      {
006667ed                                          edx_17 = var_64;
006667f1                                          ecx_13 = var_60;
006668a1                                      }
006668a1                                      else
006668a7                                          switch (ebx_7)
006668a7                                          {
006668ae                                              case 0:
006668ae                                              {
006668ae                                                  edx_17 = ecx_13;
006668b0                                                  var_7c = edi_7;
006668b4                                                  ecx_13 = (edi_7 + eax_40);
006668ae                                                  break;
006668ae                                              }
006668bc                                              case 1:
006668bc                                              {
006668bc                                                  var_7c = edi_7;
006668c2                                                  edx_17 = (edi_7 - eax_40);
006668bc                                                  break;
006668bc                                              }
006668c9                                              case 2:
006668c9                                              {
006668c9                                                  edx_17 = edi_7;
006668cd                                                  var_7c = (edi_7 + eax_40);
006668c9                                                  break;
006668c9                                              }
006668d6                                              case 3:
006668d6                                              {
006668d6                                                  edx_17 = edi_7;
006668da                                                  var_7c = ecx_13;
006668de                                                  ecx_13 = (edi_7 - eax_40);
006668d6                                                  break;
006668d6                                              }
006668e5                                              case 4:
006668e5                                              {
006668e5                                                  var_7c = ecx_13;
006668e9                                                  ecx_13 = edi_7;
006668eb                                                  edx_17 = (edi_7 + eax_40);
006668e5                                                  break;
006668e5                                              }
006668f3                                              case 5:
006668f3                                              {
006668f3                                                  edx_17 = ecx_13;
006668f5                                                  ecx_13 = edi_7;
006668f9                                                  var_7c = (edi_7 - eax_40);
006668f3                                                  break;
006668f3                                              }
006668a7                                          }
006667df                                  }
006667df                                  else
006667df                                  {
006667e9                                      var_7c = ecx_13;
006667ed                                      edx_17 = ecx_13;
006667f1                                      ecx_13 = ecx_13;
006667df                                  }
006667df                                  
006667fd                                  int32_t eax_21;
006667fd                                  eax_21 = edx_17 != 0;
00666800                                  int32_t edx_18 = (edx_17 - eax_21);
00666806                                  int32_t eax_22;
00666806                                  eax_22 = ecx_13 != 0;
0066680b                                  var_64 = edx_18;
0066680f                                  *(uint8_t*)((char*)var_80_1)[2] = edx_18;
00666813                                  int32_t ecx_14 = (ecx_13 - eax_22);
00666817                                  int32_t ebx_5;
00666817                                  ebx_5 = var_7c != 0;
0066681c                                  var_60 = ecx_14;
00666820                                  *(uint8_t*)((char*)var_80_1)[1] = ecx_14;
00666824                                  int32_t eax_24 = (var_7c - ebx_5);
00666826                                  var_7c = eax_24;
0066682a                                  var_80_1 = eax_24;
006667d7                              }
006667d7                              
006669b0                              edi = var_20;
006669b4                              *(uint32_t*)(var_30_1 + (var_70_1 << 2)) = var_80_1;
006669b7                              esi_3 = var_30_1;
006666db                          }
006666db                          
006669c1                          ecx_4 = (var_2c_1 << 8);
006669c4                          cond:5_1 = (var_70_1 - 1) >= 0;
006669c5                          var_2c_1 = ecx_4;
006669c9                          var_70_1 -= 1;
006669cd                      } while (cond:5_1);
006669d3                      i -= 1;
006669d9                  } while (i > 0);
0066665d              }
0066665d              
006669e5              if (i_2 != 0)
006669e5              {
006669fd                  int32_t ebx_13 = ((i_4 << 4) + __inner1_1);
006669ff                  int32_t i_1 = i_2;
00666a07                  int32_t var_30_2 = ebx_13;
00666a07                  
00666a0b                  while (i_1 > 0)
00666a0b                  {
00666a15                      uint32_t ecx_20 = ((uint32_t)*(uint8_t*)((i_1 + (__inner1 + (i_4 << 2))) - 1));
00666a20                      i_1 -= 1;
00666a24                      int32_t ecx_22 = ((ecx_20 << 0x18) | g_SourceColor.__inner0);
00666a28                      uint32_t ebp_11 = (ecx_22 >> 0x18);
00666a2f                      int32_t edx_37;
00666a2f                      edx_37 = ebp_11 != 0;
00666a3d                      int32_t ebp_12 = (ebp_11 + edx_37);
00666a45                      int32_t var_50_2 = ebp_12;
00666a45                      
00666a49                      if (edi != 0x100)
00666a49                      {
00666a50                          int32_t eax_69;
00666a50                          char edx_38;
00666a50                          edx_38 = HIGHD(((int64_t)(ebp_12 * edi)));
00666a50                          eax_69 = LOWD(((int64_t)(ebp_12 * edi)));
00666a5c                          ebp_12 = ((eax_69 + ((uint32_t)edx_38)) >> 8);
00666a5e                          var_50_2 = ebp_12;
00666a49                      }
00666a49                      
00666a64                      if (ebp_12 != 0)
00666a64                      {
00666a6a                          int32_t eax_72 = *(uint32_t*)(ebx_13 + (i_1 << 2));
00666a6d                          uint32_t edi_13 = ((uint32_t)ecx_22);
00666a70                          uint32_t esi_13 = ((uint32_t)*(uint8_t*)((char*)ecx_22)[1]);
00666a7f                          uint32_t ecx_25 = ((uint32_t)((int8_t)(ecx_22 >> 0x10)));
00666a84                          int32_t edx_40;
00666a84                          edx_40 = ecx_25 != 0;
00666a8d                          int32_t ecx_26 = (ecx_25 + edx_40);
00666a91                          int32_t eax_73;
00666a91                          eax_73 = esi_13 != 0;
00666a96                          int32_t ebx_14 = ecx_26;
00666a98                          int32_t esi_14 = (esi_13 + eax_73);
00666a9c                          int32_t edx_41;
00666a9c                          edx_41 = edi_13 != 0;
00666a9f                          int32_t eax_74 = ecx_26;
00666aa1                          int32_t edi_14 = (edi_13 + edx_41);
00666aa1                          
00666aa5                          if (esi_14 > ecx_26)
00666aab                              ebx_14 = esi_14;
00666aa5                          else if (esi_14 < ecx_26)
00666b76                              eax_74 = esi_14;
00666b76                          
00666b7a                          if (edi_14 > ebx_14)
00666b7c                              ebx_14 = edi_14;
00666b7a                          else if (edi_14 < eax_74)
00666b84                              eax_74 = edi_14;
00666b84                          
00666b88                          int32_t edx_50 = (ebx_14 - eax_74);
00666b8e                          int32_t var_70_2;
00666b8e                          int32_t ebx_17;
00666b8e                          int32_t esi_17;
00666b8e                          
00666b8e                          if (ebx_14 != eax_74)
00666b8e                          {
00666ba4                              int32_t ebp_19 = 0;
00666ba8                              var_70_2 = (((int64_t)(edx_50 << 8)) / ebx_14);
00666bac                              int32_t ecx_27;
00666bac                              
00666bac                              if (ecx_26 == ebx_14)
00666bac                              {
00666bb0                                  ecx_27 = (esi_14 - edi_14);
00666bb0                                  
00666bb2                                  if ((esi_14 - edi_14) < 0)
00666bb4                                      ebp_19 = 0x6000;
00666bac                              }
00666bac                              else if (esi_14 != ebx_14)
00666bbd                              {
00666bca                                  ecx_27 = (ecx_26 - esi_14);
00666bcc                                  ebp_19 = 0x4000;
00666bbd                              }
00666bbd                              else
00666bbd                              {
00666bc1                                  ecx_27 = (edi_14 - ecx_26);
00666bc3                                  ebp_19 = 0x2000;
00666bbd                              }
00666bbd                              
00666bdb                              ebx_17 = var_70_2;
00666be1                              esi_17 = ((((int64_t)(ecx_27 << 0xc)) / edx_50) + ebp_19);
00666be3                              ebp_12 = var_50_2;
00666b8e                          }
00666b8e                          else
00666b8e                          {
00666b90                              esi_17 = 0;
00666b92                              ebx_17 = 0;
00666b94                              var_70_2 = 0;
00666b8e                          }
00666b8e                          
00666be7                          uint32_t eax_99 = ((uint32_t)*(uint8_t*)((char*)eax_72)[1]);
00666bec                          uint32_t edx_55 = ((uint32_t)eax_72);
00666bf1                          uint32_t edi_21 = ((uint32_t)*(uint8_t*)((char*)eax_72)[2]);
00666bfa                          int32_t ecx_28;
00666bfa                          ecx_28 = eax_99 != 0;
00666c09                          int32_t eax_100 = (eax_99 + ecx_28);
00666c0f                          int32_t ecx_29;
00666c0f                          ecx_29 = edx_55 != 0;
00666c12                          int32_t edx_56 = (edx_55 + ecx_29);
00666c18                          int32_t ecx_30;
00666c18                          ecx_30 = edi_21 != 0;
00666c1b                          int32_t ecx_31 = (ecx_30 + edi_21);
00666c1b                          
00666c1f                          if (eax_100 > ecx_31)
00666c21                              ecx_31 = eax_100;
00666c21                          
00666c25                          if (edx_56 > ecx_31)
00666c27                              ecx_31 = edx_56;
00666c27                          
00666c2f                          int32_t var_80_2;
00666c2f                          
00666c2f                          if (ebp_12 != 0x100)
00666c2f                          {
00666d5c                              int32_t var_44;
00666d5c                              int32_t var_40;
00666d5c                              int32_t var_3c;
00666d5c                              int32_t edx_66;
00666d5c                              int32_t esi_22;
00666d5c                              
00666d5c                              if (ebx_17 != 0)
00666d5c                              {
00666e5d                                  int32_t eax_146;
00666e5d                                  char edx_78;
00666e5d                                  edx_78 = HIGHD(((int64_t)(ecx_31 * var_70_2)));
00666e5d                                  eax_146 = LOWD(((int64_t)(ecx_31 * var_70_2)));
00666e6a                                  int32_t eax_149;
00666e6a                                  int32_t edx_80;
00666e6a                                  edx_80 = HIGHD(((int64_t)esi_17));
00666e6a                                  eax_149 = LOWD(((int64_t)esi_17));
00666e75                                  int32_t ebx_24 = ((eax_149 + (edx_80 & 0xfff)) >> 0xc);
00666e7b                                  int32_t eax_152;
00666e7b                                  int32_t edx_82;
00666e7b                                  edx_82 = HIGHD(((int64_t)(ebx_24 + 1)));
00666e7b                                  eax_152 = LOWD(((int64_t)(ebx_24 + 1)));
00666e80                                  int32_t ebp_27 = ((eax_146 + ((uint32_t)edx_78)) >> 8);
00666e88                                  int32_t esi_25 = ((esi_17 - (((eax_152 - edx_82) >> 1) << 0xd)) * ebp_27);
00666e8d                                  int32_t edi_31 = (ecx_31 - ebp_27);
00666e91                                  int32_t ebp_29 = (esi_25 & 0x80000fff);
00666e91                                  
00666e97                                  if (ebp_29 < 0)
00666ea0                                      ebp_29 = (((ebp_29 - 1) | 0xfffff000) + 1);
00666ea0                                  
00666ea3                                  int32_t eax_157;
00666ea3                                  int32_t edx_83;
00666ea3                                  edx_83 = HIGHD(((int64_t)esi_25));
00666ea3                                  eax_157 = LOWD(((int64_t)esi_25));
00666eac                                  int32_t eax_159 = ((eax_157 + (edx_83 & 0xfff)) >> 0xc);
00666eac                                  
00666eb5                                  if (ebp_29 < 0xfffff800)
00666eb7                                      eax_159 -= 1;
00666eb7                                  
00666ebe                                  if (ebp_29 > 0x800)
00666ec0                                      eax_159 += 1;
00666ec0                                  
00666ec4                                  if (ebx_24 > 5)
00666ec4                                      goto label_666d6e;
00666ec4                                  
00666eca                                  switch (ebx_24)
00666eca                                  {
00666ed1                                      case 0:
00666ed1                                      {
00666ed1                                          edx_66 = ecx_31;
00666ed3                                          esi_22 = edi_31;
00666ed5                                          ecx_31 = (edi_31 + eax_159);
00666ed1                                          break;
00666ed1                                      }
00666edd                                      case 1:
00666edd                                      {
00666edd                                          esi_22 = edi_31;
00666ee1                                          edx_66 = (edi_31 - eax_159);
00666edd                                          break;
00666edd                                      }
00666ee8                                      case 2:
00666ee8                                      {
00666ee8                                          edx_66 = edi_31;
00666eea                                          esi_22 = (edi_31 + eax_159);
00666ee8                                          break;
00666ee8                                      }
00666ef2                                      case 3:
00666ef2                                      {
00666ef2                                          edx_66 = edi_31;
00666ef6                                          esi_22 = ecx_31;
00666ef8                                          ecx_31 = (edi_31 - eax_159);
00666ef2                                          break;
00666ef2                                      }
00666eff                                      case 4:
00666eff                                      {
00666eff                                          esi_22 = ecx_31;
00666f01                                          ecx_31 = edi_31;
00666f03                                          edx_66 = (edi_31 + eax_159);
00666eff                                          break;
00666eff                                      }
00666f0b                                      case 5:
00666f0b                                      {
00666f0b                                          edx_66 = ecx_31;
00666f0d                                          ecx_31 = edi_31;
00666f11                                          esi_22 = (edi_31 - eax_159);
00666f0b                                          break;
00666f0b                                      }
00666eca                                  }
00666d5c                              }
00666d5c                              else
00666d5c                              {
00666d62                                  var_44 = ecx_31;
00666d66                                  var_40 = ecx_31;
00666d6a                                  var_3c = ecx_31;
00666d6e                              label_666d6e:
00666d6e                                  esi_22 = var_3c;
00666d72                                  ecx_31 = var_40;
00666d76                                  edx_66 = var_44;
00666d5c                              }
00666d5c                              
00666d7e                              int32_t eax_121;
00666d7e                              eax_121 = edx_66 != 0;
00666d89                              int32_t edx_67 = (edx_66 - eax_121);
00666d8f                              int32_t eax_122;
00666d8f                              eax_122 = ecx_31 != 0;
00666d92                              var_44 = edx_67;
00666d96                              int32_t ecx_33 = (ecx_31 - eax_122);
00666d9c                              int32_t eax_123;
00666d9c                              eax_123 = esi_22 != 0;
00666d9f                              var_40 = ecx_33;
00666da3                              int32_t esi_23 = (esi_22 - eax_123);
00666dac                              int32_t eax_127;
00666dac                              char edx_68;
00666dac                              edx_68 = HIGHD(((int64_t)((edi_21 - edx_67) * var_50_2)));
00666dac                              eax_127 = LOWD(((int64_t)((edi_21 - edx_67) * var_50_2)));
00666db8                              uint32_t ebx_21;
00666db8                              ebx_21 = (edi_21 - ((int8_t)((eax_127 + ((uint32_t)edx_68)) >> 8)));
00666dba                              *(uint8_t*)((char*)var_80_2)[2] = ebx_21;
00666dcd                              int32_t eax_133;
00666dcd                              char edx_70;
00666dcd                              edx_70 = HIGHD(((int64_t)((eax_99 - ecx_33) * var_50_2)));
00666dcd                              eax_133 = LOWD(((int64_t)((eax_99 - ecx_33) * var_50_2)));
00666dd9                              uint32_t ebx_22;
00666dd9                              ebx_22 = (eax_99 - ((int8_t)((eax_133 + ((uint32_t)edx_70)) >> 8)));
00666de2                              int32_t eax_139;
00666de2                              char edx_72;
00666de2                              edx_72 = HIGHD(((int64_t)((edx_55 - esi_23) * var_50_2)));
00666de2                              eax_139 = LOWD(((int64_t)((edx_55 - esi_23) * var_50_2)));
00666dee                              uint32_t ecx_34;
00666dee                              ecx_34 = (edx_55 - ((int8_t)((eax_139 + ((uint32_t)edx_72)) >> 8)));
00666df0                              var_3c = esi_23;
00666df4                              *(uint8_t*)((char*)var_80_2)[1] = ebx_22;
00666df8                              var_80_2 = ecx_34;
00666c2f                          }
00666c2f                          else
00666c2f                          {
00666c37                              int32_t var_78;
00666c37                              int32_t var_4c;
00666c37                              int32_t var_48;
00666c37                              int32_t edx_57;
00666c37                              
00666c37                              if (ebx_17 != 0)
00666c37                              {
00666c92                                  int32_t eax_107;
00666c92                                  char edx_59;
00666c92                                  edx_59 = HIGHD(((int64_t)(ecx_31 * var_70_2)));
00666c92                                  eax_107 = LOWD(((int64_t)(ecx_31 * var_70_2)));
00666c9f                                  int32_t eax_110;
00666c9f                                  int32_t edx_61;
00666c9f                                  edx_61 = HIGHD(((int64_t)esi_17));
00666c9f                                  eax_110 = LOWD(((int64_t)esi_17));
00666caa                                  int32_t ebx_20 = ((eax_110 + (edx_61 & 0xfff)) >> 0xc);
00666cb0                                  int32_t eax_113;
00666cb0                                  int32_t edx_63;
00666cb0                                  edx_63 = HIGHD(((int64_t)(ebx_20 + 1)));
00666cb0                                  eax_113 = LOWD(((int64_t)(ebx_20 + 1)));
00666cb5                                  int32_t ebp_21 = ((eax_107 + ((uint32_t)edx_59)) >> 8);
00666cbd                                  int32_t esi_21 = ((esi_17 - (((eax_113 - edx_63) >> 1) << 0xd)) * ebp_21);
00666cc2                                  int32_t edi_24 = (ecx_31 - ebp_21);
00666cc6                                  int32_t ebp_23 = (esi_21 & 0x80000fff);
00666cc6                                  
00666ccc                                  if (ebp_23 < 0)
00666cd5                                      ebp_23 = (((ebp_23 - 1) | 0xfffff000) + 1);
00666cd5                                  
00666cd8                                  int32_t eax_118;
00666cd8                                  int32_t edx_64;
00666cd8                                  edx_64 = HIGHD(((int64_t)esi_21));
00666cd8                                  eax_118 = LOWD(((int64_t)esi_21));
00666ce1                                  int32_t eax_120 = ((eax_118 + (edx_64 & 0xfff)) >> 0xc);
00666ce1                                  
00666cea                                  if (ebp_23 < 0xfffff800)
00666cec                                      eax_120 -= 1;
00666cec                                  
00666cf3                                  if (ebp_23 > 0x800)
00666cf5                                      eax_120 += 1;
00666cf5                                  
00666cf9                                  if (ebx_20 > 5)
00666cf9                                  {
00666c45                                      edx_57 = var_4c;
00666c49                                      ecx_31 = var_48;
00666cf9                                  }
00666cf9                                  else
00666cff                                      switch (ebx_20)
00666cff                                      {
00666d06                                          case 0:
00666d06                                          {
00666d06                                              edx_57 = ecx_31;
00666d08                                              var_78 = edi_24;
00666d0c                                              ecx_31 = (edi_24 + eax_120);
00666d06                                              break;
00666d06                                          }
00666d14                                          case 1:
00666d14                                          {
00666d14                                              var_78 = edi_24;
00666d1a                                              edx_57 = (edi_24 - eax_120);
00666d14                                              break;
00666d14                                          }
00666d21                                          case 2:
00666d21                                          {
00666d21                                              edx_57 = edi_24;
00666d25                                              var_78 = (edi_24 + eax_120);
00666d21                                              break;
00666d21                                          }
00666d2e                                          case 3:
00666d2e                                          {
00666d2e                                              edx_57 = edi_24;
00666d32                                              var_78 = ecx_31;
00666d36                                              ecx_31 = (edi_24 - eax_120);
00666d2e                                              break;
00666d2e                                          }
00666d3d                                          case 4:
00666d3d                                          {
00666d3d                                              var_78 = ecx_31;
00666d41                                              ecx_31 = edi_24;
00666d43                                              edx_57 = (edi_24 + eax_120);
00666d3d                                              break;
00666d3d                                          }
00666d4b                                          case 5:
00666d4b                                          {
00666d4b                                              edx_57 = ecx_31;
00666d4d                                              ecx_31 = edi_24;
00666d51                                              var_78 = (edi_24 - eax_120);
00666d4b                                              break;
00666d4b                                          }
00666cff                                      }
00666c37                              }
00666c37                              else
00666c37                              {
00666c41                                  var_78 = ecx_31;
00666c45                                  edx_57 = ecx_31;
00666c49                                  ecx_31 = ecx_31;
00666c37                              }
00666c37                              
00666c55                              int32_t eax_101;
00666c55                              eax_101 = edx_57 != 0;
00666c58                              int32_t edx_58 = (edx_57 - eax_101);
00666c5e                              int32_t eax_102;
00666c5e                              eax_102 = ecx_31 != 0;
00666c63                              var_4c = edx_58;
00666c67                              *(uint8_t*)((char*)var_80_2)[2] = edx_58;
00666c6b                              int32_t ecx_32 = (ecx_31 - eax_102);
00666c6f                              int32_t ebx_18;
00666c6f                              ebx_18 = var_78 != 0;
00666c74                              var_48 = ecx_32;
00666c78                              *(uint8_t*)((char*)var_80_2)[1] = ecx_32;
00666c7c                              int32_t eax_104 = (var_78 - ebx_18);
00666c7e                              var_78 = eax_104;
00666c82                              var_80_2 = eax_104;
00666c2f                          }
00666c2f                          
00666e08                          edi = var_20;
00666e0c                          *(uint32_t*)(var_30_2 + (i_1 << 2)) = var_80_2;
00666e0f                          ebx_13 = var_30_2;
00666a64                      }
00666a0b                  }
006669e5              }
006669e5              
00666e30              __inner1 += iStride_1;
00666e3f              __inner1_1 += iStride;
00666e3f              
00666e43              if (nHeight_1 <= 0)
00666e43                  break;
00666e43              
00666648              i_3 = i_4;
00666657          }
00666616      }
006665e0  }

00666f18  uint32_t jump_table_666f18[0x6] = 
00666f18  {
00666f18      [0x0] =  0x006668ae
00666f1c      [0x1] =  0x006668bc
00666f20      [0x2] =  0x006668c9
00666f24      [0x3] =  0x006668d6
00666f28      [0x4] =  0x006668e5
00666f2c      [0x5] =  0x006668f3
00666f30  }
00666f30  uint32_t jump_table_666f30[0x6] = 
00666f30  {
00666f30      [0x0] =  0x00666b2d
00666f34      [0x1] =  0x00666b39
00666f38      [0x2] =  0x00666b44
00666f3c      [0x3] =  0x00666b4e
00666f40      [0x4] =  0x00666b5b
00666f44      [0x5] =  0x00666b67
00666f48  }
00666f48  uint32_t jump_table_666f48[0x6] = 
00666f48  {
00666f48      [0x0] =  0x00666d06
00666f4c      [0x1] =  0x00666d14
00666f50      [0x2] =  0x00666d21
00666f54      [0x3] =  0x00666d2e
00666f58      [0x4] =  0x00666d3d
00666f5c      [0x5] =  0x00666d4b
00666f60  }
00666f60  uint32_t jump_table_666f60[0x6] = 
00666f60  {
00666f60      [0x0] =  0x00666ed1
00666f64      [0x1] =  0x00666edd
00666f68      [0x2] =  0x00666ee8
00666f6c      [0x3] =  0x00666ef2
00666f70      [0x4] =  0x00666eff
00666f74      [0x5] =  0x00666f0b
00666f78  }

00666f78                                                                          cc cc cc cc cc cc cc cc                          ........

00666f80  void ColoringLoopNoScale_FromA8<&BlitOp_Colorize<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_RGB>(struct BlitArgs const* arg1)

00666f80  {
00666f94      uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00666f98      union __inner1_1 = arg1->cSrcArgs.__inner1;
00666fa0      int32_t eax_1;
00666fa0      eax_1 = i8AlphaModifier != 0;
00666fa3      union __inner1 = arg1->cDstArgs.__inner1;
00666fa7      int32_t ebp = (i8AlphaModifier + eax_1);
00666fa9      uint32_t nHeight = arg1->nHeight;
00666fae      int32_t var_64 = ebp;
00666fb2      uint32_t nHeight_1 = nHeight;
00666fb2      
00666fb6      if (nHeight > 0)
00666fb6      {
00666fbc          uint32_t nWidth = arg1->nWidth;
00666fc1          uint32_t eax_3 = (nWidth >> 2);
00666fc4          int32_t i_1 = (nWidth & 3);
00666fcc          uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00666fcf          uint32_t iStride = arg1->cDstArgs.iStride;
00666fd4          uint32_t var_14_1 = eax_3;
00666fd4          
00666ffd          while (true)
00666ffd          {
00666ffd              nHeight_1 -= 1;
00667001              uint32_t ecx_1 = eax_3;
00667001              
00667003              if (eax_3 > 0)
00667003              {
00667010                  char* esi_3 = ((__inner1 + (eax_3 * 0xc)) + 0xb);
00667010                  
00667029                  while (true)
00667029                  {
00667029                      int32_t ecx_3 = *(uint32_t*)(__inner1_1 + ((ecx_1 - 1) << 2));
0066702c                      char* esi_4 = (esi_3 - 0xc);
0066702f                      char* var_28_1 = esi_4;
00667033                      int32_t var_6c_1 = ecx_3;
00667037                      char* var_4c_1 = esi_4;
0066703b                      int32_t var_68_1 = 4;
0066739a                      bool cond:5_1;
0066739a                      
0066739a                      do
0066739a                      {
0066705c                          int32_t ecx_5 = ((ecx_3 & 0xff000000) | g_SourceColor.__inner0);
00667060                          uint32_t ebx_3 = (ecx_5 >> 0x10);
00667063                          uint32_t edi_2 = ((uint32_t)*(uint8_t*)((char*)ebx_3)[1]);
0066706a                          int32_t eax_5;
0066706a                          eax_5 = edi_2 != 0;
0066706d                          int32_t var_10_1 = ecx_5;
00667074                          int32_t edi_3 = (edi_2 + eax_5);
0066707c                          int32_t var_7c_1 = edi_3;
0066707c                          
00667080                          if (ebp != 0x100)
00667080                          {
00667087                              int32_t eax_8;
00667087                              char edx_3;
00667087                              edx_3 = HIGHD(((int64_t)(edi_3 * ebp)));
00667087                              eax_8 = LOWD(((int64_t)(edi_3 * ebp)));
00667093                              edi_3 = ((eax_8 + ((uint32_t)edx_3)) >> 8);
00667095                              var_7c_1 = edi_3;
00667080                          }
00667080                          
0066709b                          if (edi_3 != 0)
0066709b                          {
006670a1                              union edx_2;
006670a1                              *(uint8_t*)((char*)edx_2 + 0) = esi_4[0xfffffffe];
006670a4                              eax_5 = esi_4[0xffffffff];
006670a7                              char var_74_1 = *(uint8_t*)((char*)edx_2 + 0);
006670ab                              *(uint8_t*)((char*)edx_2 + 0) = *(uint8_t*)esi_4;
006670ad                              uint32_t edi_4 = ((uint32_t)ecx_5);
006670b0                              uint32_t esi_5 = ((uint32_t)*(uint8_t*)((char*)ecx_5)[1]);
006670b9                              uint32_t ecx_6 = ((uint32_t)ebx_3);
006670be                              int32_t eax_10;
006670be                              eax_10 = ecx_6 != 0;
006670c7                              int32_t ecx_7 = (ecx_6 + eax_10);
006670cb                              int32_t edx_4;
006670cb                              edx_4 = esi_5 != 0;
006670d0                              int32_t ebp_1 = ecx_7;
006670d2                              int32_t esi_6 = (esi_5 + edx_4);
006670d6                              int32_t eax_11;
006670d6                              eax_11 = edi_4 != 0;
006670d9                              int32_t edi_5 = (edi_4 + eax_11);
006670dd                              int32_t eax_12 = ecx_7;
006670dd                              
006670df                              if (esi_6 > ecx_7)
006670e1                                  ebp_1 = esi_6;
006670df                              else if (esi_6 < ecx_7)
006670e7                                  eax_12 = esi_6;
006670e7                              
006670eb                              if (edi_5 > ebp_1)
006670ed                                  ebp_1 = edi_5;
006670eb                              else if (edi_5 < eax_12)
006670f5                                  eax_12 = edi_5;
006670f5                              
006670f9                              int32_t edx_6 = (ebp_1 - eax_12);
006670ff                              int32_t var_88_1;
006670ff                              int32_t ebp_2;
006670ff                              int32_t esi_7;
006670ff                              
006670ff                              if (ebp_1 != eax_12)
006670ff                              {
00667115                                  int32_t ebx_4 = 0;
00667119                                  var_88_1 = (((int64_t)(edx_6 << 8)) / ebp_1);
0066711d                                  int32_t ecx_8;
0066711d                                  
0066711d                                  if (ecx_7 == ebp_1)
0066711d                                  {
00667121                                      ecx_8 = (esi_6 - edi_5);
00667121                                      
00667123                                      if ((esi_6 - edi_5) < 0)
00667125                                          ebx_4 = 0x6000;
0066711d                                  }
0066711d                                  else if (esi_6 != ebp_1)
0066712e                                  {
0066713b                                      ecx_8 = (ecx_7 - esi_6);
0066713d                                      ebx_4 = 0x4000;
0066712e                                  }
0066712e                                  else
0066712e                                  {
00667132                                      ecx_8 = (edi_5 - ecx_7);
00667134                                      ebx_4 = 0x2000;
0066712e                                  }
0066712e                                  
0066714c                                  ebp_2 = var_88_1;
00667152                                  esi_7 = ((((int64_t)(ecx_8 << 0xc)) / edx_6) + ebx_4);
006670ff                              }
006670ff                              else
006670ff                              {
00667101                                  esi_7 = 0;
00667103                                  ebp_2 = 0;
00667105                                  var_88_1 = 0;
006670ff                              }
006670ff                              
00667154                              uint32_t eax_21 = ((uint32_t)eax_5);
00667159                              uint32_t edx_11 = ((uint32_t)var_74_1);
0066715e                              uint32_t edi_7 = ((uint32_t)*(uint8_t*)((char*)edx_2 + 0));
00667167                              int32_t ecx_9;
00667167                              ecx_9 = eax_21 != 0;
00667179                              uint32_t eax_22 = (eax_21 + ecx_9);
0066717f                              int32_t ecx_10;
0066717f                              ecx_10 = edx_11 != 0;
00667182                              uint32_t edx_12 = (edx_11 + ecx_10);
00667188                              int32_t ecx_11;
00667188                              ecx_11 = edi_7 != 0;
0066718b                              uint32_t ecx_12 = (ecx_11 + edi_7);
0066718b                              
0066718f                              if (eax_22 > ecx_12)
00667191                                  ecx_12 = eax_22;
00667191                              
00667195                              if (edx_12 > ecx_12)
00667197                                  ecx_12 = edx_12;
00667197                              
006671a1                              int32_t ecx_14;
006671a1                              
006671a1                              if (var_7c_1 != 0x100)
006671a1                              {
006672cc                                  uint32_t var_50;
006672cc                                  uint32_t var_48;
006672cc                                  uint32_t var_2c;
006672cc                                  uint32_t edx_21;
006672cc                                  uint32_t ebp_9;
006672cc                                  uint32_t esi_12;
006672cc                                  
006672cc                                  if (ebp_2 != 0)
006672cc                                  {
006674aa                                      int32_t eax_79;
006674aa                                      char edx_35;
006674aa                                      edx_35 = HIGHD(((int64_t)(ecx_12 * var_88_1)));
006674aa                                      eax_79 = LOWD(((int64_t)(ecx_12 * var_88_1)));
006674b7                                      int32_t eax_82;
006674b7                                      int32_t edx_37;
006674b7                                      edx_37 = HIGHD(((int64_t)esi_7));
006674b7                                      eax_82 = LOWD(((int64_t)esi_7));
006674c2                                      int32_t ebx_13 = ((eax_82 + (edx_37 & 0xfff)) >> 0xc);
006674c8                                      int32_t eax_85;
006674c8                                      int32_t edx_39;
006674c8                                      edx_39 = HIGHD(((int64_t)(ebx_13 + 1)));
006674c8                                      eax_85 = LOWD(((int64_t)(ebx_13 + 1)));
006674d0                                      int32_t ebp_15 = ((eax_79 + ((uint32_t)edx_35)) >> 8);
006674d5                                      int32_t esi_19 = ((esi_7 - (((eax_85 - edx_39) >> 1) << 0xd)) * ebp_15);
006674da                                      uint32_t edi_19 = (ecx_12 - ebp_15);
006674e0                                      int32_t ebp_17 = (esi_19 & 0x80000fff);
006674e0                                      
006674e6                                      if (ebp_17 < 0)
006674ef                                          ebp_17 = (((ebp_17 - 1) | 0xfffff000) + 1);
006674ef                                      
006674f0                                      int32_t eax_90;
006674f0                                      int32_t edx_40;
006674f0                                      edx_40 = HIGHD(((int64_t)esi_19));
006674f0                                      eax_90 = LOWD(((int64_t)esi_19));
006674f9                                      int32_t eax_92 = ((eax_90 + (edx_40 & 0xfff)) >> 0xc);
006674f9                                      
00667502                                      if (ebp_17 < 0xfffff800)
00667504                                          eax_92 -= 1;
00667504                                      
0066750b                                      if (ebp_17 > 0x800)
0066750d                                          eax_92 += 1;
0066750d                                      
00667511                                      if (ebx_13 > 5)
00667511                                          goto label_6672de;
00667511                                      
00667517                                      switch (ebx_13)
00667517                                      {
0066751e                                          case 0:
0066751e                                          {
0066751e                                              edx_21 = ecx_12;
00667520                                              ebp_9 = edi_19;
00667522                                              esi_12 = (edi_19 + eax_92);
0066751e                                              break;
0066751e                                          }
0066752a                                          case 1:
0066752a                                          {
0066752a                                              ebp_9 = edi_19;
0066752e                                              esi_12 = ecx_12;
00667530                                              edx_21 = (edi_19 - eax_92);
0066752a                                              break;
0066752a                                          }
00667537                                          case 2:
00667537                                          {
00667537                                              esi_12 = ecx_12;
00667539                                              edx_21 = edi_19;
0066753b                                              ebp_9 = (edi_19 + eax_92);
00667537                                              break;
00667537                                          }
00667543                                          case 3:
00667543                                          {
00667543                                              edx_21 = edi_19;
00667547                                              ebp_9 = ecx_12;
00667549                                              esi_12 = (edi_19 - eax_92);
00667543                                              break;
00667543                                          }
00667550                                          case 4:
00667550                                          {
00667550                                              ebp_9 = ecx_12;
00667552                                              esi_12 = edi_19;
00667554                                              edx_21 = (edi_19 + eax_92);
00667550                                              break;
00667550                                          }
0066755c                                          case 5:
0066755c                                          {
0066755c                                              esi_12 = edi_19;
00667560                                              edx_21 = ecx_12;
00667562                                              ebp_9 = (edi_19 - eax_92);
0066755c                                              break;
0066755c                                          }
00667517                                      }
006672cc                                  }
006672cc                                  else
006672cc                                  {
006672d2                                      var_50 = ecx_12;
006672d6                                      var_48 = ecx_12;
006672da                                      var_2c = ecx_12;
006672de                                  label_6672de:
006672de                                      ebp_9 = var_2c;
006672e2                                      esi_12 = var_48;
006672e6                                      edx_21 = var_50;
006672cc                                  }
006672cc                                  
006672ee                                  int32_t eax_42;
006672ee                                  eax_42 = edx_21 != 0;
006672fb                                  uint32_t edx_22 = (edx_21 - eax_42);
006672ff                                  ecx_14 = esi_12 != 0;
00667304                                  var_50 = edx_22;
00667308                                  uint32_t esi_13 = (esi_12 - ecx_14);
0066730c                                  int32_t eax_43;
0066730c                                  eax_43 = ebp_9 != 0;
0066730f                                  var_48 = esi_13;
00667313                                  uint32_t ebp_10 = (ebp_9 - eax_43);
0066731c                                  int32_t eax_47;
0066731c                                  char edx_23;
0066731c                                  edx_23 = HIGHD(((int64_t)((edi_7 - edx_22) * var_7c_1)));
0066731c                                  eax_47 = LOWD(((int64_t)((edi_7 - edx_22) * var_7c_1)));
00667328                                  uint32_t ebx_8;
00667328                                  ebx_8 = (edi_7 - ((int8_t)((eax_47 + ((uint32_t)edx_23)) >> 8)));
0066732a                                  ecx_14 = ebx_8;
00667337                                  int32_t eax_53;
00667337                                  char edx_25;
00667337                                  edx_25 = HIGHD(((int64_t)((eax_21 - esi_13) * var_7c_1)));
00667337                                  eax_53 = LOWD(((int64_t)((eax_21 - esi_13) * var_7c_1)));
00667343                                  uint32_t ebx_9;
00667343                                  ebx_9 = (eax_21 - ((int8_t)((eax_53 + ((uint32_t)edx_25)) >> 8)));
00667357                                  int32_t eax_59;
00667357                                  char edx_27;
00667357                                  edx_27 = HIGHD(((int64_t)((edx_11 - ebp_10) * var_7c_1)));
00667357                                  eax_59 = LOWD(((int64_t)((edx_11 - ebp_10) * var_7c_1)));
00667360                                  *(uint8_t*)((char*)edx_2 + 0) = ebx_9;
00667367                                  var_2c = ebp_10;
0066736b                                  ebx_3 = (edx_11 - ((int8_t)((eax_59 + ((uint32_t)edx_27)) >> 8)));
006671a1                              }
006671a1                              else
006671a1                              {
006671a9                                  uint32_t var_80;
006671a9                                  uint32_t var_54;
006671a9                                  uint32_t var_44;
006671a9                                  uint32_t edx_13;
006671a9                                  uint32_t ebx_5;
006671a9                                  
006671a9                                  if (ebp_2 != 0)
006671a9                                  {
006671fe                                      int32_t eax_28;
006671fe                                      char edx_14;
006671fe                                      edx_14 = HIGHD(((int64_t)(ecx_12 * var_88_1)));
006671fe                                      eax_28 = LOWD(((int64_t)(ecx_12 * var_88_1)));
0066720b                                      int32_t eax_31;
0066720b                                      int32_t edx_16;
0066720b                                      edx_16 = HIGHD(((int64_t)esi_7));
0066720b                                      eax_31 = LOWD(((int64_t)esi_7));
00667216                                      int32_t ebx_7 = ((eax_31 + (edx_16 & 0xfff)) >> 0xc);
0066721c                                      int32_t eax_34;
0066721c                                      int32_t edx_18;
0066721c                                      edx_18 = HIGHD(((int64_t)(ebx_7 + 1)));
0066721c                                      eax_34 = LOWD(((int64_t)(ebx_7 + 1)));
00667221                                      int32_t ebp_4 = ((eax_28 + ((uint32_t)edx_14)) >> 8);
00667229                                      int32_t esi_11 = ((esi_7 - (((eax_34 - edx_18) >> 1) << 0xd)) * ebp_4);
0066722e                                      uint32_t edi_10 = (ecx_12 - ebp_4);
00667232                                      int32_t ebp_6 = (esi_11 & 0x80000fff);
00667232                                      
00667238                                      if (ebp_6 < 0)
00667241                                          ebp_6 = (((ebp_6 - 1) | 0xfffff000) + 1);
00667241                                      
00667244                                      int32_t eax_39;
00667244                                      int32_t edx_19;
00667244                                      edx_19 = HIGHD(((int64_t)esi_11));
00667244                                      eax_39 = LOWD(((int64_t)esi_11));
0066724d                                      int32_t eax_41 = ((eax_39 + (edx_19 & 0xfff)) >> 0xc);
0066724d                                      
00667256                                      if (ebp_6 < 0xfffff800)
00667258                                          eax_41 -= 1;
00667258                                      
0066725f                                      if (ebp_6 > 0x800)
00667261                                          eax_41 += 1;
00667261                                      
00667265                                      if (ebx_7 > 5)
00667265                                      {
006671b7                                          edx_13 = var_44;
006671bb                                          ebx_5 = var_54;
00667265                                      }
00667265                                      else
0066726b                                          switch (ebx_7)
0066726b                                          {
00667272                                              case 0:
00667272                                              {
00667272                                                  edx_13 = ecx_12;
00667274                                                  var_80 = edi_10;
00667278                                                  ebx_5 = (edi_10 + eax_41);
00667272                                                  break;
00667272                                              }
00667280                                              case 1:
00667280                                              {
00667280                                                  var_80 = edi_10;
00667286                                                  ebx_5 = ecx_12;
00667288                                                  edx_13 = (edi_10 - eax_41);
00667280                                                  break;
00667280                                              }
0066728f                                              case 2:
0066728f                                              {
0066728f                                                  edx_13 = edi_10;
00667293                                                  ebx_5 = ecx_12;
00667295                                                  var_80 = (edi_10 + eax_41);
0066728f                                                  break;
0066728f                                              }
0066729e                                              case 3:
0066729e                                              {
0066729e                                                  edx_13 = edi_10;
006672a2                                                  var_80 = ecx_12;
006672a6                                                  ebx_5 = (edi_10 - eax_41);
0066729e                                                  break;
0066729e                                              }
006672ad                                              case 4:
006672ad                                              {
006672ad                                                  var_80 = ecx_12;
006672b1                                                  ebx_5 = edi_10;
006672b3                                                  edx_13 = (edi_10 + eax_41);
006672ad                                                  break;
006672ad                                              }
006672bb                                              case 5:
006672bb                                              {
006672bb                                                  ebx_5 = edi_10;
006672bf                                                  edx_13 = ecx_12;
006672c1                                                  var_80 = (edi_10 - eax_41);
006672bb                                                  break;
006672bb                                              }
0066726b                                          }
006671a9                                  }
006671a9                                  else
006671a9                                  {
006671b3                                      var_80 = ecx_12;
006671b7                                      edx_13 = ecx_12;
006671bb                                      ebx_5 = ecx_12;
006671a9                                  }
006671a9                                  
006671c7                                  int32_t eax_23;
006671c7                                  eax_23 = edx_13 != 0;
006671cc                                  edx_2 = (edx_13 - eax_23);
006671d0                                  int32_t ecx_13;
006671d0                                  ecx_13 = ebx_5 != 0;
006671d5                                  var_44 = edx_2;
006671d9                                  ebx_3 = (ebx_5 - ecx_13);
006671df                                  ecx_14 = var_80 != 0;
006671e2                                  var_54 = ebx_3;
006671e6                                  uint32_t eax_25 = (var_80 - ecx_14);
006671e8                                  ecx_14 = *(uint8_t*)((char*)edx_2 + 0);
006671ea                                  *(uint8_t*)((char*)edx_2 + 0) = ebx_3;
006671ec                                  var_80 = eax_25;
006671f0                                  ebx_3 = eax_25;
006671a1                              }
006671a1                              
00667371                              ebp = var_64;
00667375                              var_4c_1[0xfffffffe] = ebx_3;
00667378                              var_4c_1[0xffffffff] = *(uint8_t*)((char*)edx_2 + 0);
0066737b                              *(uint8_t*)var_4c_1 = ecx_14;
0066737d                              esi_4 = var_4c_1;
0066709b                          }
0066709b                          
00667387                          ecx_3 = (var_6c_1 << 8);
0066738a                          esi_4 -= 3;
0066738d                          cond:5_1 = var_68_1 != 1;
0066738e                          var_6c_1 = ecx_3;
00667392                          var_4c_1 = esi_4;
00667396                          var_68_1 -= 1;
0066739a                      } while (cond:5_1);
006673a0                      ecx_1 -= 1;
006673a0                      
006673a6                      if (ecx_1 <= 0)
006673a6                          break;
006673a6                      
00667016                      esi_3 = var_28_1;
00667029                  }
00667003              }
00667003              
006673b2              if (i_1 != 0)
006673b2              {
006673c3                  int32_t i = i_1;
006673c3                  
006673da                  if (i > 0)
006673da                  {
006673e5                      char* esi_15 = (((i * 3) + (__inner1 + (var_14_1 * 0xc))) + 2);
006673e5                      
00667805                      do
00667805                      {
006673f4                          uint32_t ecx_18 = ((uint32_t)*(uint8_t*)((i + (__inner1_1 + (var_14_1 << 2))) - 1));
00667403                          i -= 1;
00667407                          int32_t ecx_20 = ((ecx_18 << 0x18) | g_SourceColor.__inner0);
0066740b                          uint16_t ebx_11 = ((int16_t)(ecx_20 >> 0x10));
0066740e                          uint32_t ebp_11 = ((uint32_t)*(uint8_t*)((char*)ebx_11)[1]);
00667413                          esi_15 -= 3;
00667418                          uint32_t edx_31;
00667418                          edx_31 = ebp_11 != 0;
00667423                          int32_t var_10_2 = ecx_20;
0066742a                          int32_t ebp_12 = (ebp_11 + edx_31);
00667431                          int32_t var_7c_2 = ebp_12;
00667435                          int32_t eax_70;
00667435                          
00667435                          if (var_64 != 0x100)
00667435                          {
0066743e                              int32_t eax_73;
0066743e                              char edx_32;
0066743e                              edx_32 = HIGHD(((int64_t)(ebp_12 * var_64)));
0066743e                              eax_73 = LOWD(((int64_t)(ebp_12 * var_64)));
00667447                              eax_70 = ((eax_73 + ((uint32_t)edx_32)) >> 8);
0066744a                              var_7c_2 = eax_70;
0066744e                              ebp_12 = eax_70;
00667435                          }
00667435                          
00667452                          if (ebp_12 != 0)
00667452                          {
00667458                              eax_70 = esi_15[0xfffffffe];
0066745b                              edx_31 = esi_15[0xffffffff];
0066745e                              char var_78_1 = eax_70;
00667462                              eax_70 = *(uint8_t*)esi_15;
00667464                              uint32_t edi_16 = ((uint32_t)ecx_20);
00667467                              uint32_t esi_16 = ((uint32_t)*(uint8_t*)((char*)ecx_20)[1]);
00667470                              uint32_t ecx_21 = ((uint32_t)ebx_11);
00667475                              int32_t edx_33;
00667475                              edx_33 = ecx_21 != 0;
0066747e                              int32_t ecx_22 = (ecx_21 + edx_33);
00667482                              int32_t eax_75;
00667482                              eax_75 = esi_16 != 0;
00667487                              int32_t ebp_13 = ecx_22;
00667489                              int32_t esi_17 = (esi_16 + eax_75);
0066748d                              int32_t edx_34;
0066748d                              edx_34 = edi_16 != 0;
00667490                              int32_t eax_76 = ecx_22;
00667492                              int32_t edi_17 = (edi_16 + edx_34);
00667492                              
00667496                              if (esi_17 > ecx_22)
0066749c                                  ebp_13 = esi_17;
00667496                              else if (esi_17 < ecx_22)
0066756b                                  eax_76 = esi_17;
0066756b                              
0066756f                              if (edi_17 > ebp_13)
00667571                                  ebp_13 = edi_17;
0066756f                              else if (edi_17 < eax_76)
00667579                                  eax_76 = edi_17;
00667579                              
0066757d                              int32_t edx_43 = (ebp_13 - eax_76);
00667583                              int32_t var_88_2;
00667583                              int32_t ebp_20;
00667583                              int32_t esi_20;
00667583                              
00667583                              if (ebp_13 != eax_76)
00667583                              {
00667599                                  int32_t ebx_14 = 0;
0066759d                                  var_88_2 = (((int64_t)(edx_43 << 8)) / ebp_13);
006675a1                                  int32_t ecx_23;
006675a1                                  
006675a1                                  if (ecx_22 == ebp_13)
006675a1                                  {
006675a5                                      ecx_23 = (esi_17 - edi_17);
006675a5                                      
006675a7                                      if ((esi_17 - edi_17) < 0)
006675a9                                          ebx_14 = 0x6000;
006675a1                                  }
006675a1                                  else if (esi_17 != ebp_13)
006675b2                                  {
006675bf                                      ecx_23 = (ecx_22 - esi_17);
006675c1                                      ebx_14 = 0x4000;
006675b2                                  }
006675b2                                  else
006675b2                                  {
006675b6                                      ecx_23 = (edi_17 - ecx_22);
006675b8                                      ebx_14 = 0x2000;
006675b2                                  }
006675b2                                  
006675d0                                  ebp_20 = var_88_2;
006675d6                                  esi_20 = ((((int64_t)(ecx_23 << 0xc)) / edx_43) + ebx_14);
00667583                              }
00667583                              else
00667583                              {
00667585                                  esi_20 = 0;
00667587                                  ebp_20 = 0;
00667589                                  var_88_2 = 0;
00667583                              }
00667583                              
006675d8                              uint32_t eax_101 = ((uint32_t)edx_31);
006675dd                              uint32_t edx_48 = ((uint32_t)var_78_1);
006675e2                              uint32_t edi_24 = ((uint32_t)eax_70);
006675eb                              int32_t ecx_24;
006675eb                              ecx_24 = eax_101 != 0;
006675fd                              uint32_t eax_102 = (eax_101 + ecx_24);
00667603                              int32_t ecx_25;
00667603                              ecx_25 = edx_48 != 0;
00667606                              uint32_t edx_49 = (edx_48 + ecx_25);
0066760c                              int32_t ecx_26;
0066760c                              ecx_26 = edi_24 != 0;
0066760f                              uint32_t ecx_27 = (ecx_26 + edi_24);
0066760f                              
00667613                              if (eax_102 > ecx_27)
00667615                                  ecx_27 = eax_102;
00667615                              
00667619                              if (edx_49 > ecx_27)
0066761b                                  ecx_27 = edx_49;
0066761b                              
00667625                              int32_t ecx_29;
00667625                              uint32_t edx_51;
00667625                              uint32_t ebx_16;
00667625                              
00667625                              if (var_7c_2 != 0x100)
00667625                              {
00667750                                  uint32_t var_34;
00667750                                  uint32_t var_30;
00667750                                  uint32_t var_1c;
00667750                                  uint32_t edx_59;
00667750                                  uint32_t ebp_27;
00667750                                  uint32_t esi_25;
00667750                                  
00667750                                  if (ebp_20 != 0)
00667750                                  {
0066784d                                      int32_t eax_146;
0066784d                                      char edx_69;
0066784d                                      edx_69 = HIGHD(((int64_t)(ecx_27 * var_88_2)));
0066784d                                      eax_146 = LOWD(((int64_t)(ecx_27 * var_88_2)));
0066785a                                      int32_t eax_149;
0066785a                                      int32_t edx_71;
0066785a                                      edx_71 = HIGHD(((int64_t)esi_20));
0066785a                                      eax_149 = LOWD(((int64_t)esi_20));
00667865                                      int32_t ebx_22 = ((eax_149 + (edx_71 & 0xfff)) >> 0xc);
0066786b                                      int32_t eax_152;
0066786b                                      int32_t edx_73;
0066786b                                      edx_73 = HIGHD(((int64_t)(ebx_22 + 1)));
0066786b                                      eax_152 = LOWD(((int64_t)(ebx_22 + 1)));
00667870                                      int32_t ebp_30 = ((eax_146 + ((uint32_t)edx_69)) >> 8);
00667878                                      int32_t esi_28 = ((esi_20 - (((eax_152 - edx_73) >> 1) << 0xd)) * ebp_30);
0066787d                                      uint32_t edi_34 = (ecx_27 - ebp_30);
00667881                                      int32_t ebp_32 = (esi_28 & 0x80000fff);
00667881                                      
00667887                                      if (ebp_32 < 0)
00667890                                          ebp_32 = (((ebp_32 - 1) | 0xfffff000) + 1);
00667890                                      
00667893                                      int32_t eax_157;
00667893                                      int32_t edx_74;
00667893                                      edx_74 = HIGHD(((int64_t)esi_28));
00667893                                      eax_157 = LOWD(((int64_t)esi_28));
0066789c                                      int32_t eax_159 = ((eax_157 + (edx_74 & 0xfff)) >> 0xc);
0066789c                                      
006678a5                                      if (ebp_32 < 0xfffff800)
006678a7                                          eax_159 -= 1;
006678a7                                      
006678ae                                      if (ebp_32 > 0x800)
006678b0                                          eax_159 += 1;
006678b0                                      
006678b4                                      if (ebx_22 > 5)
006678b4                                          goto label_667762;
006678b4                                      
006678ba                                      switch (ebx_22)
006678ba                                      {
006678c1                                          case 0:
006678c1                                          {
006678c1                                              edx_59 = ecx_27;
006678c3                                              ebp_27 = edi_34;
006678c5                                              esi_25 = (edi_34 + eax_159);
006678c1                                              break;
006678c1                                          }
006678cd                                          case 1:
006678cd                                          {
006678cd                                              ebp_27 = edi_34;
006678d1                                              esi_25 = ecx_27;
006678d3                                              edx_59 = (edi_34 - eax_159);
006678cd                                              break;
006678cd                                          }
006678da                                          case 2:
006678da                                          {
006678da                                              esi_25 = ecx_27;
006678dc                                              edx_59 = edi_34;
006678de                                              ebp_27 = (edi_34 + eax_159);
006678da                                              break;
006678da                                          }
006678e6                                          case 3:
006678e6                                          {
006678e6                                              edx_59 = edi_34;
006678ea                                              ebp_27 = ecx_27;
006678ec                                              esi_25 = (edi_34 - eax_159);
006678e6                                              break;
006678e6                                          }
006678f3                                          case 4:
006678f3                                          {
006678f3                                              ebp_27 = ecx_27;
006678f5                                              esi_25 = edi_34;
006678f7                                              edx_59 = (edi_34 + eax_159);
006678f3                                              break;
006678f3                                          }
006678ff                                          case 5:
006678ff                                          {
006678ff                                              esi_25 = edi_34;
00667903                                              edx_59 = ecx_27;
00667905                                              ebp_27 = (edi_34 - eax_159);
006678ff                                              break;
006678ff                                          }
006678ba                                      }
00667750                                  }
00667750                                  else
00667750                                  {
00667756                                      var_30 = ecx_27;
0066775a                                      var_1c = ecx_27;
0066775e                                      var_34 = ecx_27;
00667762                                  label_667762:
00667762                                      ebp_27 = var_34;
00667766                                      esi_25 = var_1c;
0066776a                                      edx_59 = var_30;
00667750                                  }
00667750                                  
00667772                                  int32_t eax_122;
00667772                                  eax_122 = edx_59 != 0;
00667782                                  uint32_t edx_60 = (edx_59 - eax_122);
00667786                                  ecx_29 = esi_25 != 0;
0066778b                                  var_30 = edx_60;
0066778f                                  uint32_t esi_26 = (esi_25 - ecx_29);
00667793                                  int32_t eax_123;
00667793                                  eax_123 = ebp_27 != 0;
00667796                                  var_1c = esi_26;
0066779a                                  uint32_t ebp_28 = (ebp_27 - eax_123);
006677a3                                  int32_t eax_127;
006677a3                                  char edx_61;
006677a3                                  edx_61 = HIGHD(((int64_t)((edi_24 - edx_60) * var_7c_2)));
006677a3                                  eax_127 = LOWD(((int64_t)((edi_24 - edx_60) * var_7c_2)));
006677af                                  uint32_t ebx_19;
006677af                                  ebx_19 = (edi_24 - ((int8_t)((eax_127 + ((uint32_t)edx_61)) >> 8)));
006677b1                                  ecx_29 = ebx_19;
006677be                                  int32_t eax_133;
006677be                                  char edx_63;
006677be                                  edx_63 = HIGHD(((int64_t)((eax_101 - esi_26) * var_7c_2)));
006677be                                  eax_133 = LOWD(((int64_t)((eax_101 - esi_26) * var_7c_2)));
006677ca                                  uint32_t ebx_20;
006677ca                                  ebx_20 = (eax_101 - ((int8_t)((eax_133 + ((uint32_t)edx_63)) >> 8)));
006677db                                  int32_t eax_139;
006677db                                  char edx_65;
006677db                                  edx_65 = HIGHD(((int64_t)((edx_48 - ebp_28) * var_7c_2)));
006677db                                  eax_139 = LOWD(((int64_t)((edx_48 - ebp_28) * var_7c_2)));
006677e4                                  edx_51 = ebx_20;
006677eb                                  var_34 = ebp_28;
006677ef                                  ebx_16 = (edx_48 - ((int8_t)((eax_139 + ((uint32_t)edx_65)) >> 8)));
00667625                              }
00667625                              else
00667625                              {
0066762d                                  uint32_t var_84;
0066762d                                  uint32_t var_58;
0066762d                                  uint32_t var_38;
0066762d                                  uint32_t edx_50;
0066762d                                  uint32_t ebx_15;
0066762d                                  
0066762d                                  if (ebp_20 != 0)
0066762d                                  {
00667682                                      int32_t eax_108;
00667682                                      char edx_52;
00667682                                      edx_52 = HIGHD(((int64_t)(ecx_27 * var_88_2)));
00667682                                      eax_108 = LOWD(((int64_t)(ecx_27 * var_88_2)));
0066768f                                      int32_t eax_111;
0066768f                                      int32_t edx_54;
0066768f                                      edx_54 = HIGHD(((int64_t)esi_20));
0066768f                                      eax_111 = LOWD(((int64_t)esi_20));
0066769a                                      int32_t ebx_18 = ((eax_111 + (edx_54 & 0xfff)) >> 0xc);
006676a0                                      int32_t eax_114;
006676a0                                      int32_t edx_56;
006676a0                                      edx_56 = HIGHD(((int64_t)(ebx_18 + 1)));
006676a0                                      eax_114 = LOWD(((int64_t)(ebx_18 + 1)));
006676a5                                      int32_t ebp_22 = ((eax_108 + ((uint32_t)edx_52)) >> 8);
006676ad                                      int32_t esi_24 = ((esi_20 - (((eax_114 - edx_56) >> 1) << 0xd)) * ebp_22);
006676b2                                      uint32_t edi_27 = (ecx_27 - ebp_22);
006676b6                                      int32_t ebp_24 = (esi_24 & 0x80000fff);
006676b6                                      
006676bc                                      if (ebp_24 < 0)
006676c5                                          ebp_24 = (((ebp_24 - 1) | 0xfffff000) + 1);
006676c5                                      
006676c8                                      int32_t eax_119;
006676c8                                      int32_t edx_57;
006676c8                                      edx_57 = HIGHD(((int64_t)esi_24));
006676c8                                      eax_119 = LOWD(((int64_t)esi_24));
006676d1                                      int32_t eax_121 = ((eax_119 + (edx_57 & 0xfff)) >> 0xc);
006676d1                                      
006676da                                      if (ebp_24 < 0xfffff800)
006676dc                                          eax_121 -= 1;
006676dc                                      
006676e3                                      if (ebp_24 > 0x800)
006676e5                                          eax_121 += 1;
006676e5                                      
006676e9                                      if (ebx_18 > 5)
006676e9                                      {
0066763b                                          edx_50 = var_58;
0066763f                                          ebx_15 = var_38;
006676e9                                      }
006676e9                                      else
006676ef                                          switch (ebx_18)
006676ef                                          {
006676f6                                              case 0:
006676f6                                              {
006676f6                                                  edx_50 = ecx_27;
006676f8                                                  var_84 = edi_27;
006676fc                                                  ebx_15 = (edi_27 + eax_121);
006676f6                                                  break;
006676f6                                              }
00667704                                              case 1:
00667704                                              {
00667704                                                  var_84 = edi_27;
0066770a                                                  ebx_15 = ecx_27;
0066770c                                                  edx_50 = (edi_27 - eax_121);
00667704                                                  break;
00667704                                              }
00667713                                              case 2:
00667713                                              {
00667713                                                  edx_50 = edi_27;
00667717                                                  ebx_15 = ecx_27;
00667719                                                  var_84 = (edi_27 + eax_121);
00667713                                                  break;
00667713                                              }
00667722                                              case 3:
00667722                                              {
00667722                                                  edx_50 = edi_27;
00667726                                                  var_84 = ecx_27;
0066772a                                                  ebx_15 = (edi_27 - eax_121);
00667722                                                  break;
00667722                                              }
00667731                                              case 4:
00667731                                              {
00667731                                                  var_84 = ecx_27;
00667735                                                  ebx_15 = edi_27;
00667737                                                  edx_50 = (edi_27 + eax_121);
00667731                                                  break;
00667731                                              }
0066773f                                              case 5:
0066773f                                              {
0066773f                                                  ebx_15 = edi_27;
00667743                                                  edx_50 = ecx_27;
00667745                                                  var_84 = (edi_27 - eax_121);
0066773f                                                  break;
0066773f                                              }
006676ef                                          }
0066762d                                  }
0066762d                                  else
0066762d                                  {
00667637                                      var_84 = ecx_27;
0066763b                                      edx_50 = ecx_27;
0066763f                                      ebx_15 = ecx_27;
0066762d                                  }
0066762d                                  
0066764b                                  int32_t eax_103;
0066764b                                  eax_103 = edx_50 != 0;
00667650                                  edx_51 = (edx_50 - eax_103);
00667654                                  int32_t ecx_28;
00667654                                  ecx_28 = ebx_15 != 0;
00667659                                  var_58 = edx_51;
0066765d                                  ebx_16 = (ebx_15 - ecx_28);
00667663                                  ecx_29 = var_84 != 0;
00667666                                  var_38 = ebx_16;
0066766a                                  uint32_t eax_105 = (var_84 - ecx_29);
0066766c                                  ecx_29 = edx_51;
0066766e                                  edx_51 = ebx_16;
00667670                                  var_84 = eax_105;
00667674                                  ebx_16 = eax_105;
00667625                              }
00667625                              
006677f9                              esi_15[0xfffffffe] = ebx_16;
006677fc                              esi_15[0xffffffff] = edx_51;
006677ff                              *(uint8_t*)esi_15 = ecx_29;
00667452                          }
00667805                      } while (i > 0);
006673da                  }
006673b2              }
006673b2              
00667820              __inner1_1 += iStride_1;
0066782f              __inner1 += iStride;
0066782f              
00667833              if (nHeight_1 <= 0)
00667833                  break;
00667833              
00666feb              ebp = var_64;
00666fef              eax_3 = var_14_1;
00666ffd          }
00666fb6      }
00666f80  }

00667045                 8d a4 24 00 00 00 00 8d 64 24 00                                                       ..$.....d$.
0066790c  uint32_t jump_table_66790c[0x6] = 
0066790c  {
0066790c      [0x0] =  0x00667272
00667910      [0x1] =  0x00667280
00667914      [0x2] =  0x0066728f
00667918      [0x3] =  0x0066729e
0066791c      [0x4] =  0x006672ad
00667920      [0x5] =  0x006672bb
00667924  }
00667924  uint32_t jump_table_667924[0x6] = 
00667924  {
00667924      [0x0] =  0x0066751e
00667928      [0x1] =  0x0066752a
0066792c      [0x2] =  0x00667537
00667930      [0x3] =  0x00667543
00667934      [0x4] =  0x00667550
00667938      [0x5] =  0x0066755c
0066793c  }
0066793c  uint32_t jump_table_66793c[0x6] = 
0066793c  {
0066793c      [0x0] =  0x006676f6
00667940      [0x1] =  0x00667704
00667944      [0x2] =  0x00667713
00667948      [0x3] =  0x00667722
0066794c      [0x4] =  0x00667731
00667950      [0x5] =  0x0066773f
00667954  }
00667954  uint32_t jump_table_667954[0x6] = 
00667954  {
00667954      [0x0] =  0x006678c1
00667958      [0x1] =  0x006678cd
0066795c      [0x2] =  0x006678da
00667960      [0x3] =  0x006678e6
00667964      [0x4] =  0x006678f3
00667968      [0x5] =  0x006678ff
0066796c  }

0066796c                                      cc cc cc cc                                                              ....

00667970  void ColoringLoopNoScale<&BlitOp_Colorize<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00667970  {
00667974      union __inner1_1 = arg1->cSrcArgs.__inner1;
00667980      int32_t var_5c;
00667980      int32_t var_4c;
00667980      int32_t var_48;
00667980      int32_t var_44;
00667980      
00667980      if (__inner1_1 == 0)
00667980      {
00667e15          union __inner1 = arg1->cDstArgs.__inner1;
00667e19          union ecx_16;
00667e19          *(uint8_t*)((char*)ecx_16 + 0) = arg1->i8AlphaModifier;
00667e1c          union __inner0 = g_SourceColor.__inner0;
00667e20          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_16 + 0);
00667e24          uint32_t nHeight_1 = arg1->nHeight;
00667e24          
00667e29          if (nHeight_1 > 0)
00667e29          {
00667e2f              uint32_t nWidth = arg1->nWidth;
00667e32              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00667e3d              uint32_t nHeight_2 = nHeight_1;
00668169              bool cond:2_1;
00668169              
00668169              do
00668169              {
00667e41                  uint32_t i = nWidth;
00667e41                  
00667e47                  if (i > 0)
00667e47                  {
00667e51                      uint32_t ecx_18 = (__inner0 >> 0x18);
00667e51                      
0066814c                      do
0066814c                      {
00667e5c                          i -= 1;
00667e61                          int32_t edx_40;
00667e61                          edx_40 = ecx_18 != 0;
00667e68                          int32_t ecx_20 = (ecx_18 + edx_40);
00667e68                          
00667e6e                          if (ecx_18 != -(edx_40))
00667e6e                          {
00667e78                              struct BlitArgs* edx_41 = *(uint32_t*)(__inner1 + (i << 2));
00667e7b                              uint32_t ecx_22 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 2));
00667e80                              uint32_t esi_15 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 1));
00667e85                              uint32_t edi_20 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 0));
00667e8e                              int32_t eax_78;
00667e8e                              eax_78 = ecx_22 != 0;
00667e97                              int32_t ecx_23 = (ecx_22 + eax_78);
00667e9b                              int32_t edx_42;
00667e9b                              edx_42 = esi_15 != 0;
00667ea0                              int32_t ebx_12 = ecx_23;
00667ea2                              int32_t esi_16 = (esi_15 + edx_42);
00667ea6                              int32_t eax_79;
00667ea6                              eax_79 = edi_20 != 0;
00667ea9                              int32_t edi_21 = (edi_20 + eax_79);
00667ead                              int32_t eax_80 = ecx_23;
00667ead                              
00667eaf                              if (esi_16 > ecx_23)
00667eb1                                  ebx_12 = esi_16;
00667eaf                              else if (esi_16 < ecx_23)
00667eb7                                  eax_80 = esi_16;
00667eb7                              
00667ebb                              if (edi_21 > ebx_12)
00667ebd                                  ebx_12 = edi_21;
00667ebb                              else if (edi_21 < eax_80)
00667ec5                                  eax_80 = edi_21;
00667ec5                              
00667ec9                              int32_t edx_44 = (ebx_12 - eax_80);
00667ecf                              int32_t var_54_1;
00667ecf                              int32_t ebp_16;
00667ecf                              int32_t esi_17;
00667ecf                              
00667ecf                              if (ebx_12 != eax_80)
00667ecf                              {
00667ee5                                  int32_t ebp_17 = 0;
00667ee9                                  var_54_1 = (((int64_t)(edx_44 << 8)) / ebx_12);
00667eed                                  int32_t ecx_24;
00667eed                                  
00667eed                                  if (ecx_23 == ebx_12)
00667eed                                  {
00667ef1                                      ecx_24 = (esi_16 - edi_21);
00667ef1                                      
00667ef3                                      if ((esi_16 - edi_21) < 0)
00667ef5                                          ebp_17 = 0x6000;
00667eed                                  }
00667eed                                  else if (esi_16 != ebx_12)
00667efe                                  {
00667f0b                                      ecx_24 = (ecx_23 - esi_16);
00667f0d                                      ebp_17 = 0x4000;
00667efe                                  }
00667efe                                  else
00667efe                                  {
00667f02                                      ecx_24 = (edi_21 - ecx_23);
00667f04                                      ebp_17 = 0x2000;
00667efe                                  }
00667efe                                  
00667f1e                                  esi_17 = ((((int64_t)(ecx_24 << 0xc)) / edx_44) + ebp_17);
00667f20                                  ebp_16 = var_54_1;
00667ecf                              }
00667ecf                              else
00667ecf                              {
00667ed1                                  esi_17 = 0;
00667ed3                                  ebp_16 = 0;
00667ed5                                  var_54_1 = 0;
00667ecf                              }
00667ecf                              
00667f24                              uint32_t eax_89 = ((uint32_t)*(uint8_t*)((char*)edx_41)[1]);
00667f29                              uint32_t edx_49 = ((uint32_t)edx_41);
00667f2e                              uint32_t edi_23 = ((uint32_t)*(uint8_t*)((char*)edx_41)[2]);
00667f37                              int32_t ecx_25;
00667f37                              ecx_25 = eax_89 != 0;
00667f46                              int32_t eax_90 = (eax_89 + ecx_25);
00667f4c                              int32_t ecx_26;
00667f4c                              ecx_26 = edx_49 != 0;
00667f4f                              int32_t edx_50 = (edx_49 + ecx_26);
00667f55                              int32_t ecx_27;
00667f55                              ecx_27 = edi_23 != 0;
00667f58                              int32_t ecx_28 = (ecx_27 + edi_23);
00667f58                              
00667f5c                              if (eax_90 > ecx_28)
00667f5e                                  ecx_28 = eax_90;
00667f5e                              
00667f62                              if (edx_50 > ecx_28)
00667f64                                  ecx_28 = edx_50;
00667f64                              
00667f6e                              if (ecx_20 != 0x100)
00667f6e                              {
0066809b                                  int32_t var_3c;
0066809b                                  int32_t edx_60;
0066809b                                  int32_t esi_22;
0066809b                                  
0066809b                                  if (ebp_16 != 0)
0066809b                                  {
00668180                                      int32_t eax_136;
00668180                                      char edx_71;
00668180                                      edx_71 = HIGHD(((int64_t)(ecx_28 * var_54_1)));
00668180                                      eax_136 = LOWD(((int64_t)(ecx_28 * var_54_1)));
0066818d                                      int32_t eax_139;
0066818d                                      int32_t edx_73;
0066818d                                      edx_73 = HIGHD(((int64_t)esi_17));
0066818d                                      eax_139 = LOWD(((int64_t)esi_17));
00668198                                      int32_t ebx_19 = ((eax_139 + (edx_73 & 0xfff)) >> 0xc);
0066819e                                      int32_t eax_142;
0066819e                                      int32_t edx_75;
0066819e                                      edx_75 = HIGHD(((int64_t)(ebx_19 + 1)));
0066819e                                      eax_142 = LOWD(((int64_t)(ebx_19 + 1)));
006681a6                                      int32_t ebp_25 = ((eax_136 + ((uint32_t)edx_71)) >> 8);
006681ab                                      int32_t esi_25 = ((esi_17 - (((eax_142 - edx_75) >> 1) << 0xd)) * ebp_25);
006681b0                                      int32_t edi_33 = (ecx_28 - ebp_25);
006681b6                                      int32_t ebp_27 = (esi_25 & 0x80000fff);
006681b6                                      
006681bc                                      if (ebp_27 < 0)
006681c5                                          ebp_27 = (((ebp_27 - 1) | 0xfffff000) + 1);
006681c5                                      
006681c6                                      int32_t eax_147;
006681c6                                      int32_t edx_76;
006681c6                                      edx_76 = HIGHD(((int64_t)esi_25));
006681c6                                      eax_147 = LOWD(((int64_t)esi_25));
006681cf                                      int32_t eax_149 = ((eax_147 + (edx_76 & 0xfff)) >> 0xc);
006681cf                                      
006681d8                                      if (ebp_27 < 0xfffff800)
006681da                                          eax_149 -= 1;
006681da                                      
006681e1                                      if (ebp_27 > 0x800)
006681e3                                          eax_149 += 1;
006681e3                                      
006681e7                                      if (ebx_19 > 5)
006681e7                                          goto label_6680ad;
006681e7                                      
006681ed                                      switch (ebx_19)
006681ed                                      {
006681f4                                          case 0:
006681f4                                          {
006681f4                                              edx_60 = ecx_28;
006681f6                                              esi_22 = edi_33;
006681f8                                              ecx_28 = (edi_33 + eax_149);
006681f4                                              break;
006681f4                                          }
00668200                                          case 1:
00668200                                          {
00668200                                              esi_22 = edi_33;
00668204                                              edx_60 = (edi_33 - eax_149);
00668200                                              break;
00668200                                          }
0066820b                                          case 2:
0066820b                                          {
0066820b                                              edx_60 = edi_33;
0066820d                                              esi_22 = (edi_33 + eax_149);
0066820b                                              break;
0066820b                                          }
00668215                                          case 3:
00668215                                          {
00668215                                              edx_60 = edi_33;
00668219                                              esi_22 = ecx_28;
0066821b                                              ecx_28 = (edi_33 - eax_149);
00668215                                              break;
00668215                                          }
00668222                                          case 4:
00668222                                          {
00668222                                              esi_22 = ecx_28;
00668224                                              ecx_28 = edi_33;
00668226                                              edx_60 = (edi_33 + eax_149);
00668222                                              break;
00668222                                          }
0066822e                                          case 5:
0066822e                                          {
0066822e                                              edx_60 = ecx_28;
00668230                                              ecx_28 = edi_33;
00668234                                              esi_22 = (edi_33 - eax_149);
0066822e                                              break;
0066822e                                          }
006681ed                                      }
0066809b                                  }
0066809b                                  else
0066809b                                  {
006680a1                                      var_48 = ecx_28;
006680a5                                      var_4c = ecx_28;
006680a9                                      var_3c = ecx_28;
006680ad                                  label_6680ad:
006680ad                                      esi_22 = var_3c;
006680b1                                      ecx_28 = var_4c;
006680b5                                      edx_60 = var_48;
0066809b                                  }
0066809b                                  
006680bd                                  int32_t eax_111;
006680bd                                  eax_111 = edx_60 != 0;
006680c8                                  int32_t edx_61 = (edx_60 - eax_111);
006680ce                                  int32_t eax_112;
006680ce                                  eax_112 = ecx_28 != 0;
006680d1                                  var_48 = edx_61;
006680d5                                  int32_t ecx_30 = (ecx_28 - eax_112);
006680db                                  int32_t eax_113;
006680db                                  eax_113 = esi_22 != 0;
006680de                                  var_4c = ecx_30;
006680e2                                  int32_t esi_23 = (esi_22 - eax_113);
006680eb                                  int32_t eax_117;
006680eb                                  char edx_62;
006680eb                                  edx_62 = HIGHD(((int64_t)((edi_23 - edx_61) * ecx_20)));
006680eb                                  eax_117 = LOWD(((int64_t)((edi_23 - edx_61) * ecx_20)));
006680f7                                  uint32_t ebx_16;
006680f7                                  ebx_16 = (edi_23 - ((int8_t)((eax_117 + ((uint32_t)edx_62)) >> 8)));
006680f9                                  *(uint8_t*)((char*)arg1)[2] = ebx_16;
0066810c                                  int32_t eax_123;
0066810c                                  char edx_64;
0066810c                                  edx_64 = HIGHD(((int64_t)((eax_89 - ecx_30) * ecx_20)));
0066810c                                  eax_123 = LOWD(((int64_t)((eax_89 - ecx_30) * ecx_20)));
00668118                                  uint32_t ebx_17;
00668118                                  ebx_17 = (eax_89 - ((int8_t)((eax_123 + ((uint32_t)edx_64)) >> 8)));
00668121                                  int32_t eax_129;
00668121                                  char edx_66;
00668121                                  edx_66 = HIGHD(((int64_t)((edx_49 - esi_23) * ecx_20)));
00668121                                  eax_129 = LOWD(((int64_t)((edx_49 - esi_23) * ecx_20)));
0066812d                                  uint32_t ecx_31;
0066812d                                  ecx_31 = (edx_49 - ((int8_t)((eax_129 + ((uint32_t)edx_66)) >> 8)));
0066812f                                  var_3c = esi_23;
00668133                                  *(uint8_t*)((char*)arg1)[1] = ebx_17;
00668137                                  arg1 = ecx_31;
00667f6e                              }
00667f6e                              else
00667f6e                              {
00667f76                                  int32_t var_40;
00667f76                                  int32_t edx_51;
00667f76                                  
00667f76                                  if (ebp_16 != 0)
00667f76                                  {
00667fd1                                      int32_t eax_97;
00667fd1                                      char edx_53;
00667fd1                                      edx_53 = HIGHD(((int64_t)(ecx_28 * var_54_1)));
00667fd1                                      eax_97 = LOWD(((int64_t)(ecx_28 * var_54_1)));
00667fde                                      int32_t eax_100;
00667fde                                      int32_t edx_55;
00667fde                                      edx_55 = HIGHD(((int64_t)esi_17));
00667fde                                      eax_100 = LOWD(((int64_t)esi_17));
00667fe9                                      int32_t ebx_15 = ((eax_100 + (edx_55 & 0xfff)) >> 0xc);
00667fef                                      int32_t eax_103;
00667fef                                      int32_t edx_57;
00667fef                                      edx_57 = HIGHD(((int64_t)(ebx_15 + 1)));
00667fef                                      eax_103 = LOWD(((int64_t)(ebx_15 + 1)));
00667ff4                                      int32_t ebp_19 = ((eax_97 + ((uint32_t)edx_53)) >> 8);
00667ffc                                      int32_t esi_21 = ((esi_17 - (((eax_103 - edx_57) >> 1) << 0xd)) * ebp_19);
00668001                                      int32_t edi_26 = (ecx_28 - ebp_19);
00668005                                      int32_t ebp_21 = (esi_21 & 0x80000fff);
00668005                                      
0066800b                                      if (ebp_21 < 0)
00668014                                          ebp_21 = (((ebp_21 - 1) | 0xfffff000) + 1);
00668014                                      
00668017                                      int32_t eax_108;
00668017                                      int32_t edx_58;
00668017                                      edx_58 = HIGHD(((int64_t)esi_21));
00668017                                      eax_108 = LOWD(((int64_t)esi_21));
00668020                                      int32_t eax_110 = ((eax_108 + (edx_58 & 0xfff)) >> 0xc);
00668020                                      
00668029                                      if (ebp_21 < 0xfffff800)
0066802b                                          eax_110 -= 1;
0066802b                                      
00668032                                      if (ebp_21 > 0x800)
00668034                                          eax_110 += 1;
00668034                                      
00668038                                      if (ebx_15 > 5)
00668038                                      {
00667f84                                          edx_51 = var_40;
00667f88                                          ecx_28 = var_44;
00668038                                      }
00668038                                      else
0066803e                                          switch (ebx_15)
0066803e                                          {
00668045                                              case 0:
00668045                                              {
00668045                                                  edx_51 = ecx_28;
00668047                                                  var_5c = edi_26;
0066804b                                                  ecx_28 = (edi_26 + eax_110);
00668045                                                  break;
00668045                                              }
00668053                                              case 1:
00668053                                              {
00668053                                                  var_5c = edi_26;
00668059                                                  edx_51 = (edi_26 - eax_110);
00668053                                                  break;
00668053                                              }
00668060                                              case 2:
00668060                                              {
00668060                                                  edx_51 = edi_26;
00668064                                                  var_5c = (edi_26 + eax_110);
00668060                                                  break;
00668060                                              }
0066806d                                              case 3:
0066806d                                              {
0066806d                                                  edx_51 = edi_26;
00668071                                                  var_5c = ecx_28;
00668075                                                  ecx_28 = (edi_26 - eax_110);
0066806d                                                  break;
0066806d                                              }
0066807c                                              case 4:
0066807c                                              {
0066807c                                                  var_5c = ecx_28;
00668080                                                  ecx_28 = edi_26;
00668082                                                  edx_51 = (edi_26 + eax_110);
0066807c                                                  break;
0066807c                                              }
0066808a                                              case 5:
0066808a                                              {
0066808a                                                  edx_51 = ecx_28;
0066808c                                                  ecx_28 = edi_26;
00668090                                                  var_5c = (edi_26 - eax_110);
0066808a                                                  break;
0066808a                                              }
0066803e                                          }
00667f76                                  }
00667f76                                  else
00667f76                                  {
00667f80                                      var_5c = ecx_28;
00667f84                                      edx_51 = ecx_28;
00667f88                                      ecx_28 = ecx_28;
00667f76                                  }
00667f76                                  
00667f94                                  int32_t eax_91;
00667f94                                  eax_91 = edx_51 != 0;
00667f97                                  int32_t edx_52 = (edx_51 - eax_91);
00667f9d                                  int32_t eax_92;
00667f9d                                  eax_92 = ecx_28 != 0;
00667fa2                                  var_40 = edx_52;
00667fa6                                  *(uint8_t*)((char*)arg1)[2] = edx_52;
00667faa                                  int32_t ecx_29 = (ecx_28 - eax_92);
00667fae                                  int32_t ebx_13;
00667fae                                  ebx_13 = var_5c != 0;
00667fb3                                  var_44 = ecx_29;
00667fb7                                  *(uint8_t*)((char*)arg1)[1] = ecx_29;
00667fbb                                  int32_t eax_94 = (var_5c - ebx_13);
00667fbd                                  var_5c = eax_94;
00667fc1                                  arg1 = eax_94;
00667f6e                              }
00667f6e                              
00668147                              *(uint32_t*)(__inner1 + (i << 2)) = arg1;
00667e6e                          }
0066814c                      } while (i > 0);
00667e47                  }
00667e47                  
00668160                  cond:2_1 = nHeight_2 != 1;
00668161                  __inner1 -= iStride_1;
00668165                  nHeight_2 -= 1;
00668169              } while (cond:2_1);
00667e29          }
00667980      }
00667980      else
00667980      {
00667986          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066798a          union __inner1_2 = arg1->cDstArgs.__inner1;
0066798d          union __inner1_4 = __inner1_1;
00667993          int32_t ecx;
00667993          ecx = i8AlphaModifier != 0;
00667996          union __inner1_5 = __inner1_4;
0066799a          union __inner1_3 = __inner1_2;
0066799e          int32_t esi_1 = (i8AlphaModifier + ecx);
006679a0          uint32_t nHeight = arg1->nHeight;
006679a0          
006679a9          if (nHeight > 0)
006679a9          {
006679af              uint32_t nWidth_1 = arg1->nWidth;
006679b2              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
006679b5              uint32_t iStride = arg1->cDstArgs.iStride;
006679b8              uint32_t nWidth_2 = nWidth_1;
006679c4              uint32_t nHeight_3 = nHeight;
00667d3f              bool cond:3_1;
00667d3f              
00667d3f              do
00667d3f              {
006679ca                  if (nWidth_1 > 0)
006679ca                  {
006679d0                      int32_t edi_1 = (__inner1_4 - __inner1_2);
006679d2                      int32_t* esi_2 = (__inner1_2 + (nWidth_1 << 2));
006679d5                      int32_t var_14_1 = edi_1;
006679d9                      uint32_t var_2c_1 = nWidth_1;
00667d10                      uint32_t i_1;
00667d10                      
00667d10                      do
00667d10                      {
006679e0                          int32_t ecx_2 = *(uint32_t*)((edi_1 + esi_2) - 4);
006679ee                          esi_2 -= 4;
006679f7                          int32_t ecx_4 = ((ecx_2 & 0xff000000) | g_SourceColor.__inner0);
006679fb                          uint16_t ebx_2 = ((int16_t)(ecx_4 >> 0x10));
006679fe                          uint32_t ebp_1 = ((uint32_t)*(uint8_t*)((char*)ebx_2)[1]);
00667a05                          int32_t edx_1;
00667a05                          edx_1 = ebp_1 != 0;
00667a0c                          int32_t var_8_1 = ecx_4;
00667a10                          int32_t ebp_2 = (ebp_1 + edx_1);
00667a17                          int32_t var_40_1 = ebp_2;
00667a17                          
00667a1b                          if (esi_1 != 0x100)
00667a1b                          {
00667a24                              int32_t eax_3;
00667a24                              char edx_2;
00667a24                              edx_2 = HIGHD(((int64_t)(ebp_2 * esi_1)));
00667a24                              eax_3 = LOWD(((int64_t)(ebp_2 * esi_1)));
00667a30                              ebp_2 = ((eax_3 + ((uint32_t)edx_2)) >> 8);
00667a32                              var_40_1 = ebp_2;
00667a1b                          }
00667a1b                          
00667a38                          if (ebp_2 != 0)
00667a38                          {
00667a3e                              struct BlitArgs* eax_6 = *(uint32_t*)esi_2;
00667a40                              uint32_t edi_2 = ((uint32_t)ecx_4);
00667a43                              uint32_t esi_3 = ((uint32_t)*(uint8_t*)((char*)ecx_4)[1]);
00667a48                              uint32_t ecx_5 = ((uint32_t)ebx_2);
00667a4d                              int32_t edx_4;
00667a4d                              edx_4 = ecx_5 != 0;
00667a56                              int32_t ecx_6 = (ecx_5 + edx_4);
00667a5a                              int32_t eax_7;
00667a5a                              eax_7 = esi_3 != 0;
00667a5f                              int32_t ebx_3 = ecx_6;
00667a61                              int32_t esi_4 = (esi_3 + eax_7);
00667a65                              int32_t edx_5;
00667a65                              edx_5 = edi_2 != 0;
00667a68                              int32_t eax_8 = ecx_6;
00667a6a                              int32_t edi_3 = (edi_2 + edx_5);
00667a6a                              
00667a6e                              if (esi_4 > ecx_6)
00667a70                                  ebx_3 = esi_4;
00667a6e                              else if (esi_4 < ecx_6)
00667a76                                  eax_8 = esi_4;
00667a76                              
00667a7a                              if (edi_3 > ebx_3)
00667a7c                                  ebx_3 = edi_3;
00667a7a                              else if (edi_3 < eax_8)
00667a84                                  eax_8 = edi_3;
00667a84                              
00667a88                              int32_t edx_7 = (ebx_3 - eax_8);
00667a8e                              int32_t var_58_1;
00667a8e                              int32_t ebx_4;
00667a8e                              int32_t esi_5;
00667a8e                              
00667a8e                              if (ebx_3 != eax_8)
00667a8e                              {
00667aa4                                  int32_t ebp_3 = 0;
00667aa8                                  var_58_1 = (((int64_t)(edx_7 << 8)) / ebx_3);
00667aac                                  int32_t ecx_7;
00667aac                                  
00667aac                                  if (ecx_6 == ebx_3)
00667aac                                  {
00667ab0                                      ecx_7 = (esi_4 - edi_3);
00667ab0                                      
00667ab2                                      if ((esi_4 - edi_3) < 0)
00667ab4                                          ebp_3 = 0x6000;
00667aac                                  }
00667aac                                  else if (esi_4 != ebx_3)
00667abd                                  {
00667aca                                      ecx_7 = (ecx_6 - esi_4);
00667acc                                      ebp_3 = 0x4000;
00667abd                                  }
00667abd                                  else
00667abd                                  {
00667ac1                                      ecx_7 = (edi_3 - ecx_6);
00667ac3                                      ebp_3 = 0x2000;
00667abd                                  }
00667abd                                  
00667adb                                  ebx_4 = var_58_1;
00667ae1                                  esi_5 = ((((int64_t)(ecx_7 << 0xc)) / edx_7) + ebp_3);
00667ae3                                  ebp_2 = var_40_1;
00667a8e                              }
00667a8e                              else
00667a8e                              {
00667a90                                  esi_5 = 0;
00667a92                                  ebx_4 = 0;
00667a94                                  var_58_1 = 0;
00667a8e                              }
00667a8e                              
00667ae7                              uint32_t eax_17 = ((uint32_t)*(uint8_t*)((char*)eax_6)[1]);
00667aec                              uint32_t edx_12 = ((uint32_t)eax_6);
00667af1                              uint32_t edi_5 = ((uint32_t)*(uint8_t*)((char*)eax_6)[2]);
00667afa                              int32_t ecx_8;
00667afa                              ecx_8 = eax_17 != 0;
00667b09                              int32_t eax_18 = (eax_17 + ecx_8);
00667b0f                              int32_t ecx_9;
00667b0f                              ecx_9 = edx_12 != 0;
00667b12                              int32_t edx_13 = (edx_12 + ecx_9);
00667b18                              int32_t ecx_10;
00667b18                              ecx_10 = edi_5 != 0;
00667b1b                              int32_t ecx_11 = (ecx_10 + edi_5);
00667b1b                              
00667b1f                              if (eax_18 > ecx_11)
00667b21                                  ecx_11 = eax_18;
00667b21                              
00667b25                              if (edx_13 > ecx_11)
00667b27                                  ecx_11 = edx_13;
00667b27                              
00667b2f                              if (ebp_2 != 0x100)
00667b2f                              {
00667c5c                                  int32_t edx_23;
00667c5c                                  int32_t esi_10;
00667c5c                                  
00667c5c                                  if (ebx_4 != 0)
00667c5c                                  {
00667d51                                      int32_t eax_64;
00667d51                                      char edx_32;
00667d51                                      edx_32 = HIGHD(((int64_t)(ecx_11 * var_58_1)));
00667d51                                      eax_64 = LOWD(((int64_t)(ecx_11 * var_58_1)));
00667d5e                                      int32_t eax_67;
00667d5e                                      int32_t edx_34;
00667d5e                                      edx_34 = HIGHD(((int64_t)esi_5));
00667d5e                                      eax_67 = LOWD(((int64_t)esi_5));
00667d69                                      int32_t ebx_11 = ((eax_67 + (edx_34 & 0xfff)) >> 0xc);
00667d6f                                      int32_t eax_70;
00667d6f                                      int32_t edx_36;
00667d6f                                      edx_36 = HIGHD(((int64_t)(ebx_11 + 1)));
00667d6f                                      eax_70 = LOWD(((int64_t)(ebx_11 + 1)));
00667d74                                      int32_t ebp_11 = ((eax_64 + ((uint32_t)edx_32)) >> 8);
00667d7c                                      int32_t esi_14 = ((esi_5 - (((eax_70 - edx_36) >> 1) << 0xd)) * ebp_11);
00667d81                                      int32_t edi_16 = (ecx_11 - ebp_11);
00667d85                                      int32_t ebp_13 = (esi_14 & 0x80000fff);
00667d85                                      
00667d8b                                      if (ebp_13 < 0)
00667d94                                          ebp_13 = (((ebp_13 - 1) | 0xfffff000) + 1);
00667d94                                      
00667d97                                      int32_t eax_75;
00667d97                                      int32_t edx_37;
00667d97                                      edx_37 = HIGHD(((int64_t)esi_14));
00667d97                                      eax_75 = LOWD(((int64_t)esi_14));
00667da0                                      int32_t eax_77 = ((eax_75 + (edx_37 & 0xfff)) >> 0xc);
00667da0                                      
00667da9                                      if (ebp_13 < 0xfffff800)
00667dab                                          eax_77 -= 1;
00667dab                                      
00667db2                                      if (ebp_13 > 0x800)
00667db4                                          eax_77 += 1;
00667db4                                      
00667db8                                      if (ebx_11 > 5)
00667db8                                          goto label_667c6e;
00667db8                                      
00667dbe                                      switch (ebx_11)
00667dbe                                      {
00667dc5                                          case 0:
00667dc5                                          {
00667dc5                                              edx_23 = ecx_11;
00667dc7                                              esi_10 = edi_16;
00667dc9                                              ecx_11 = (edi_16 + eax_77);
00667dc5                                              break;
00667dc5                                          }
00667dd1                                          case 1:
00667dd1                                          {
00667dd1                                              esi_10 = edi_16;
00667dd5                                              edx_23 = (edi_16 - eax_77);
00667dd1                                              break;
00667dd1                                          }
00667ddc                                          case 2:
00667ddc                                          {
00667ddc                                              edx_23 = edi_16;
00667dde                                              esi_10 = (edi_16 + eax_77);
00667ddc                                              break;
00667ddc                                          }
00667de6                                          case 3:
00667de6                                          {
00667de6                                              edx_23 = edi_16;
00667dea                                              esi_10 = ecx_11;
00667dec                                              ecx_11 = (edi_16 - eax_77);
00667de6                                              break;
00667de6                                          }
00667df3                                          case 4:
00667df3                                          {
00667df3                                              esi_10 = ecx_11;
00667df5                                              ecx_11 = edi_16;
00667df7                                              edx_23 = (edi_16 + eax_77);
00667df3                                              break;
00667df3                                          }
00667dff                                          case 5:
00667dff                                          {
00667dff                                              edx_23 = ecx_11;
00667e01                                              ecx_11 = edi_16;
00667e05                                              esi_10 = (edi_16 - eax_77);
00667dff                                              break;
00667dff                                          }
00667dbe                                      }
00667c5c                                  }
00667c5c                                  else
00667c5c                                  {
00667c62                                      var_4c = ecx_11;
00667c66                                      var_48 = ecx_11;
00667c6a                                      var_44 = ecx_11;
00667c6e                                  label_667c6e:
00667c6e                                      edx_23 = var_4c;
00667c72                                      ecx_11 = var_48;
00667c76                                      esi_10 = var_44;
00667c5c                                  }
00667c5c                                  
00667c7e                                  int32_t eax_39;
00667c7e                                  eax_39 = edx_23 != 0;
00667c89                                  int32_t edx_24 = (edx_23 - eax_39);
00667c8f                                  int32_t eax_40;
00667c8f                                  eax_40 = ecx_11 != 0;
00667c92                                  var_4c = edx_24;
00667c96                                  int32_t ecx_13 = (ecx_11 - eax_40);
00667c9c                                  int32_t eax_41;
00667c9c                                  eax_41 = esi_10 != 0;
00667c9f                                  var_48 = ecx_13;
00667ca3                                  int32_t esi_11 = (esi_10 - eax_41);
00667cac                                  int32_t eax_45;
00667cac                                  char edx_25;
00667cac                                  edx_25 = HIGHD(((int64_t)((edi_5 - edx_24) * var_40_1)));
00667cac                                  eax_45 = LOWD(((int64_t)((edi_5 - edx_24) * var_40_1)));
00667cb8                                  uint32_t ebx_8;
00667cb8                                  ebx_8 = (edi_5 - ((int8_t)((eax_45 + ((uint32_t)edx_25)) >> 8)));
00667cba                                  *(uint8_t*)((char*)arg1)[2] = ebx_8;
00667ccd                                  int32_t eax_51;
00667ccd                                  char edx_27;
00667ccd                                  edx_27 = HIGHD(((int64_t)((eax_17 - ecx_13) * var_40_1)));
00667ccd                                  eax_51 = LOWD(((int64_t)((eax_17 - ecx_13) * var_40_1)));
00667cd9                                  uint32_t ebx_9;
00667cd9                                  ebx_9 = (eax_17 - ((int8_t)((eax_51 + ((uint32_t)edx_27)) >> 8)));
00667ce2                                  int32_t eax_57;
00667ce2                                  char edx_29;
00667ce2                                  edx_29 = HIGHD(((int64_t)((edx_12 - esi_11) * var_40_1)));
00667ce2                                  eax_57 = LOWD(((int64_t)((edx_12 - esi_11) * var_40_1)));
00667cee                                  uint32_t ecx_14;
00667cee                                  ecx_14 = (edx_12 - ((int8_t)((eax_57 + ((uint32_t)edx_29)) >> 8)));
00667cf0                                  var_44 = esi_11;
00667cf4                                  *(uint8_t*)((char*)arg1)[1] = ebx_9;
00667cf8                                  arg1 = ecx_14;
00667b2f                              }
00667b2f                              else
00667b2f                              {
00667b37                                  int32_t var_54;
00667b37                                  int32_t var_50;
00667b37                                  int32_t edx_14;
00667b37                                  
00667b37                                  if (ebx_4 != 0)
00667b37                                  {
00667b92                                      int32_t eax_25;
00667b92                                      char edx_16;
00667b92                                      edx_16 = HIGHD(((int64_t)(ecx_11 * var_58_1)));
00667b92                                      eax_25 = LOWD(((int64_t)(ecx_11 * var_58_1)));
00667b9f                                      int32_t eax_28;
00667b9f                                      int32_t edx_18;
00667b9f                                      edx_18 = HIGHD(((int64_t)esi_5));
00667b9f                                      eax_28 = LOWD(((int64_t)esi_5));
00667baa                                      int32_t ebx_7 = ((eax_28 + (edx_18 & 0xfff)) >> 0xc);
00667bb0                                      int32_t eax_31;
00667bb0                                      int32_t edx_20;
00667bb0                                      edx_20 = HIGHD(((int64_t)(ebx_7 + 1)));
00667bb0                                      eax_31 = LOWD(((int64_t)(ebx_7 + 1)));
00667bb5                                      int32_t ebp_5 = ((eax_25 + ((uint32_t)edx_16)) >> 8);
00667bbd                                      int32_t esi_9 = ((esi_5 - (((eax_31 - edx_20) >> 1) << 0xd)) * ebp_5);
00667bc2                                      int32_t edi_8 = (ecx_11 - ebp_5);
00667bc6                                      int32_t ebp_7 = (esi_9 & 0x80000fff);
00667bc6                                      
00667bcc                                      if (ebp_7 < 0)
00667bd5                                          ebp_7 = (((ebp_7 - 1) | 0xfffff000) + 1);
00667bd5                                      
00667bd8                                      int32_t eax_36;
00667bd8                                      int32_t edx_21;
00667bd8                                      edx_21 = HIGHD(((int64_t)esi_9));
00667bd8                                      eax_36 = LOWD(((int64_t)esi_9));
00667be1                                      int32_t eax_38 = ((eax_36 + (edx_21 & 0xfff)) >> 0xc);
00667be1                                      
00667bea                                      if (ebp_7 < 0xfffff800)
00667bec                                          eax_38 -= 1;
00667bec                                      
00667bf3                                      if (ebp_7 > 0x800)
00667bf5                                          eax_38 += 1;
00667bf5                                      
00667bf9                                      if (ebx_7 > 5)
00667bf9                                      {
00667b45                                          edx_14 = var_50;
00667b49                                          ecx_11 = var_54;
00667bf9                                      }
00667bf9                                      else
00667bff                                          switch (ebx_7)
00667bff                                          {
00667c06                                              case 0:
00667c06                                              {
00667c06                                                  edx_14 = ecx_11;
00667c08                                                  var_5c = edi_8;
00667c0c                                                  ecx_11 = (edi_8 + eax_38);
00667c06                                                  break;
00667c06                                              }
00667c14                                              case 1:
00667c14                                              {
00667c14                                                  var_5c = edi_8;
00667c1a                                                  edx_14 = (edi_8 - eax_38);
00667c14                                                  break;
00667c14                                              }
00667c21                                              case 2:
00667c21                                              {
00667c21                                                  edx_14 = edi_8;
00667c25                                                  var_5c = (edi_8 + eax_38);
00667c21                                                  break;
00667c21                                              }
00667c2e                                              case 3:
00667c2e                                              {
00667c2e                                                  edx_14 = edi_8;
00667c32                                                  var_5c = ecx_11;
00667c36                                                  ecx_11 = (edi_8 - eax_38);
00667c2e                                                  break;
00667c2e                                              }
00667c3d                                              case 4:
00667c3d                                              {
00667c3d                                                  var_5c = ecx_11;
00667c41                                                  ecx_11 = edi_8;
00667c43                                                  edx_14 = (edi_8 + eax_38);
00667c3d                                                  break;
00667c3d                                              }
00667c4b                                              case 5:
00667c4b                                              {
00667c4b                                                  edx_14 = ecx_11;
00667c4d                                                  ecx_11 = edi_8;
00667c51                                                  var_5c = (edi_8 - eax_38);
00667c4b                                                  break;
00667c4b                                              }
00667bff                                          }
00667b37                                  }
00667b37                                  else
00667b37                                  {
00667b41                                      var_5c = ecx_11;
00667b45                                      edx_14 = ecx_11;
00667b49                                      ecx_11 = ecx_11;
00667b37                                  }
00667b37                                  
00667b55                                  int32_t eax_19;
00667b55                                  eax_19 = edx_14 != 0;
00667b58                                  int32_t edx_15 = (edx_14 - eax_19);
00667b5e                                  int32_t eax_20;
00667b5e                                  eax_20 = ecx_11 != 0;
00667b63                                  var_50 = edx_15;
00667b67                                  *(uint8_t*)((char*)arg1)[2] = edx_15;
00667b6b                                  int32_t ecx_12 = (ecx_11 - eax_20);
00667b6f                                  int32_t ebx_5;
00667b6f                                  ebx_5 = var_5c != 0;
00667b74                                  var_54 = ecx_12;
00667b78                                  *(uint8_t*)((char*)arg1)[1] = ecx_12;
00667b7c                                  int32_t eax_22 = (var_5c - ebx_5);
00667b7e                                  var_5c = eax_22;
00667b82                                  arg1 = eax_22;
00667b2f                              }
00667b2f                              
00667d04                              edi_1 = var_14_1;
00667d08                              *(uint32_t*)esi_2 = arg1;
00667a38                          }
00667a38                          
00667d0c                          i_1 = var_2c_1;
00667d0c                          var_2c_1 -= 1;
00667d10                      } while (i_1 != 1);
00667d16                      __inner1_2 = __inner1_3;
00667d1a                      nWidth_1 = nWidth_2;
006679ca                  }
006679ca                  
00667d2e                  __inner1_4 = (__inner1_5 + iStride_2);
00667d30                  __inner1_2 += iStride;
00667d32                  cond:3_1 = nHeight_3 != 1;
00667d33                  __inner1_5 = __inner1_4;
00667d37                  __inner1_3 = __inner1_2;
00667d3b                  nHeight_3 -= 1;
00667d3f              } while (cond:3_1);
006679a9          }
00667980      }
00667970  }

0066823b                                                                                   90                                         .
0066823c  uint32_t jump_table_66823c[0x6] = 
0066823c  {
0066823c      [0x0] =  0x00667c06
00668240      [0x1] =  0x00667c14
00668244      [0x2] =  0x00667c21
00668248      [0x3] =  0x00667c2e
0066824c      [0x4] =  0x00667c3d
00668250      [0x5] =  0x00667c4b
00668254  }
00668254  uint32_t jump_table_668254[0x6] = 
00668254  {
00668254      [0x0] =  0x00667dc5
00668258      [0x1] =  0x00667dd1
0066825c      [0x2] =  0x00667ddc
00668260      [0x3] =  0x00667de6
00668264      [0x4] =  0x00667df3
00668268      [0x5] =  0x00667dff
0066826c  }
0066826c  uint32_t jump_table_66826c[0x6] = 
0066826c  {
0066826c      [0x0] =  0x00668045
00668270      [0x1] =  0x00668053
00668274      [0x2] =  0x00668060
00668278      [0x3] =  0x0066806d
0066827c      [0x4] =  0x0066807c
00668280      [0x5] =  0x0066808a
00668284  }
00668284  uint32_t jump_table_668284[0x6] = 
00668284  {
00668284      [0x0] =  0x006681f4
00668288      [0x1] =  0x00668200
0066828c      [0x2] =  0x0066820b
00668290      [0x3] =  0x00668215
00668294      [0x4] =  0x00668222
00668298      [0x5] =  0x0066822e
0066829c  }

0066829c                                                                                      cc cc cc cc                              ....

006682a0  void ColoringLoopNoScale<&BlitOp_Colorize<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_AXXX,BlitFormat_RGB>(struct BlitArgs const* arg1)

006682a0  {
006682a4      union __inner1 = arg1->cSrcArgs.__inner1;
006682af      union __inner1_1 = arg1->cDstArgs.__inner1;
006682b2      struct BlitArgs* edi;
006682b2      struct BlitArgs* var_68 = edi;
006682b3      void* var_48;
006682b3      struct BlitArgs* var_44;
006682b3      struct BlitArgs* var_40;
006682b3      
006682b3      if (__inner1 == 0)
006682b3      {
00668754          *(uint8_t*)((char*)__inner1 + 0) = arg1->i8AlphaModifier;
00668757          union __inner0 = g_SourceColor.__inner0;
0066875b          uint32_t nHeight_1 = arg1->nHeight;
00668760          union __inner1_3 = __inner1_1;
00668764          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)__inner1 + 0);
00668764          
00668768          if (nHeight_1 > 0)
00668768          {
0066876e              uint32_t nWidth = arg1->nWidth;
00668771              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00668774              uint32_t nWidth_2 = nWidth;
0066877c              uint32_t nHeight_2 = nHeight_1;
00668abd              bool cond:2_1;
00668abd              
00668abd              do
00668abd              {
00668782                  if (nWidth > 0)
00668782                  {
0066878c                      uint32_t edx_39 = (__inner0 >> 0x18);
00668796                      char* eax_79 = (((nWidth * 3) + __inner1_1) + 2);
0066879a                      uint32_t var_2c_3 = nWidth;
00668aa0                      uint32_t i;
00668aa0                      
00668aa0                      do
00668aa0                      {
006687a4                          eax_79 -= 3;
006687ab                          int32_t edx_40;
006687ab                          edx_40 = edx_39 != 0;
006687ae                          char* var_28_2 = eax_79;
006687b2                          struct BlitArgs* ebx_12 = (edx_39 + edx_40);
006687b4                          struct BlitArgs* var_24_1 = ebx_12;
006687b4                          
006687b8                          if (edx_39 != -(edx_40))
006687b8                          {
006687be                              nWidth = eax_79[0xfffffffe];
006687c1                              edx_40 = eax_79[0xffffffff];
006687c4                              eax_79 = *(uint8_t*)eax_79;
006687c6                              uint32_t esi_13 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 1));
006687cb                              uint32_t edi_18 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 0));
006687d4                              uint32_t ecx_15 = ((uint32_t)*(uint8_t*)((char*)__inner0 + 2));
006687e1                              int32_t edx_41;
006687e1                              edx_41 = ecx_15 != 0;
006687ea                              int32_t ecx_16 = (ecx_15 + edx_41);
006687ee                              int32_t eax_80;
006687ee                              eax_80 = esi_13 != 0;
006687f3                              int32_t ebp_17 = ecx_16;
006687f5                              int32_t esi_14 = (esi_13 + eax_80);
006687f9                              int32_t edx_42;
006687f9                              edx_42 = edi_18 != 0;
006687fc                              int32_t eax_81 = ecx_16;
006687fe                              int32_t edi_19 = (edi_18 + edx_42);
006687fe                              
00668802                              if (esi_14 > ecx_16)
00668804                                  ebp_17 = esi_14;
00668802                              else if (esi_14 < ecx_16)
0066880a                                  eax_81 = esi_14;
0066880a                              
0066880e                              if (edi_19 > ebp_17)
00668810                                  ebp_17 = edi_19;
0066880e                              else if (edi_19 < eax_81)
00668818                                  eax_81 = edi_19;
00668818                              
0066881c                              int32_t edx_44 = (ebp_17 - eax_81);
00668822                              int32_t var_50_1;
00668822                              int32_t ebp_18;
00668822                              int32_t esi_15;
00668822                              
00668822                              if (ebp_17 != eax_81)
00668822                              {
00668838                                  int32_t ebx_13 = 0;
0066883c                                  var_50_1 = (((int64_t)(edx_44 << 8)) / ebp_17);
00668840                                  int32_t ecx_17;
00668840                                  
00668840                                  if (ecx_16 == ebp_17)
00668840                                  {
00668844                                      ecx_17 = (esi_14 - edi_19);
00668844                                      
00668846                                      if ((esi_14 - edi_19) < 0)
00668848                                          ebx_13 = 0x6000;
00668840                                  }
00668840                                  else if (esi_14 != ebp_17)
00668851                                  {
0066885e                                      ecx_17 = (ecx_16 - esi_14);
00668860                                      ebx_13 = 0x4000;
00668851                                  }
00668851                                  else
00668851                                  {
00668855                                      ecx_17 = (edi_19 - ecx_16);
00668857                                      ebx_13 = 0x2000;
00668851                                  }
00668851                                  
0066886f                                  ebp_18 = var_50_1;
00668875                                  esi_15 = ((((int64_t)(ecx_17 << 0xc)) / edx_44) + ebx_13);
00668877                                  ebx_12 = var_24_1;
00668822                              }
00668822                              else
00668822                              {
00668824                                  esi_15 = 0;
00668826                                  ebp_18 = 0;
00668828                                  var_50_1 = 0;
00668822                              }
00668822                              
0066887b                              uint32_t eax_90 = ((uint32_t)edx_40);
00668880                              uint32_t edx_49 = ((uint32_t)nWidth);
00668885                              uint32_t edi_21 = ((uint32_t)eax_79);
0066888e                              int32_t ecx_18;
0066888e                              ecx_18 = eax_90 != 0;
0066889d                              void* eax_91 = (eax_90 + ecx_18);
006688a3                              int32_t ecx_19;
006688a3                              ecx_19 = edx_49 != 0;
006688a6                              void* edx_50 = (edx_49 + ecx_19);
006688ac                              int32_t ecx_20;
006688ac                              ecx_20 = edi_21 != 0;
006688af                              void* ecx_21 = (ecx_20 + edi_21);
006688af                              
006688b3                              if (eax_91 > ecx_21)
006688b5                                  ecx_21 = eax_91;
006688b5                              
006688b9                              if (edx_50 > ecx_21)
006688bb                                  ecx_21 = edx_50;
006688bb                              
006688c3                              int32_t ecx_23;
006688c3                              void* edx_52;
006688c3                              uint32_t ebx_15;
006688c3                              
006688c3                              if (ebx_12 != 0x100)
006688c3                              {
006689ee                                  struct BlitArgs* edx_60;
006689ee                                  void* ebp_25;
006689ee                                  void* esi_20;
006689ee                                  
006689ee                                  if (ebp_18 != 0)
006689ee                                  {
00668ad4                                      int32_t eax_135;
00668ad4                                      char edx_68;
00668ad4                                      edx_68 = HIGHD(((int64_t)(ecx_21 * var_50_1)));
00668ad4                                      eax_135 = LOWD(((int64_t)(ecx_21 * var_50_1)));
00668ae1                                      int32_t eax_138;
00668ae1                                      int32_t edx_70;
00668ae1                                      edx_70 = HIGHD(((int64_t)esi_15));
00668ae1                                      eax_138 = LOWD(((int64_t)esi_15));
00668aec                                      int32_t ebx_21 = ((eax_138 + (edx_70 & 0xfff)) >> 0xc);
00668af2                                      int32_t eax_141;
00668af2                                      int32_t edx_72;
00668af2                                      edx_72 = HIGHD(((int64_t)(ebx_21 + 1)));
00668af2                                      eax_141 = LOWD(((int64_t)(ebx_21 + 1)));
00668afa                                      int32_t ebp_28 = ((eax_135 + ((uint32_t)edx_68)) >> 8);
00668aff                                      int32_t esi_24 = ((esi_15 - (((eax_141 - edx_72) >> 1) << 0xd)) * ebp_28);
00668b04                                      void* edi_30 = ((char*)ecx_21 - ebp_28);
00668b0a                                      int32_t ebp_30 = (esi_24 & 0x80000fff);
00668b0a                                      
00668b10                                      if (ebp_30 < 0)
00668b19                                          ebp_30 = (((ebp_30 - 1) | 0xfffff000) + 1);
00668b19                                      
00668b1a                                      int32_t eax_146;
00668b1a                                      int32_t edx_73;
00668b1a                                      edx_73 = HIGHD(((int64_t)esi_24));
00668b1a                                      eax_146 = LOWD(((int64_t)esi_24));
00668b23                                      int32_t eax_148 = ((eax_146 + (edx_73 & 0xfff)) >> 0xc);
00668b23                                      
00668b2c                                      if (ebp_30 < 0xfffff800)
00668b2e                                          eax_148 -= 1;
00668b2e                                      
00668b35                                      if (ebp_30 > 0x800)
00668b37                                          eax_148 += 1;
00668b37                                      
00668b3b                                      if (ebx_21 > 5)
00668b3b                                          goto label_668a00;
00668b3b                                      
00668b41                                      switch (ebx_21)
00668b41                                      {
00668b48                                          case 0:
00668b48                                          {
00668b48                                              edx_60 = ecx_21;
00668b4a                                              ebp_25 = edi_30;
00668b4c                                              esi_20 = ((char*)edi_30 + eax_148);
00668b48                                              break;
00668b48                                          }
00668b54                                          case 1:
00668b54                                          {
00668b54                                              ebp_25 = edi_30;
00668b58                                              esi_20 = ecx_21;
00668b5a                                              edx_60 = ((char*)edi_30 - eax_148);
00668b54                                              break;
00668b54                                          }
00668b61                                          case 2:
00668b61                                          {
00668b61                                              esi_20 = ecx_21;
00668b63                                              edx_60 = edi_30;
00668b65                                              ebp_25 = ((char*)edi_30 + eax_148);
00668b61                                              break;
00668b61                                          }
00668b6d                                          case 3:
00668b6d                                          {
00668b6d                                              edx_60 = edi_30;
00668b71                                              ebp_25 = ecx_21;
00668b73                                              esi_20 = ((char*)edi_30 - eax_148);
00668b6d                                              break;
00668b6d                                          }
00668b7a                                          case 4:
00668b7a                                          {
00668b7a                                              ebp_25 = ecx_21;
00668b7c                                              esi_20 = edi_30;
00668b7e                                              edx_60 = ((char*)edi_30 + eax_148);
00668b7a                                              break;
00668b7a                                          }
00668b86                                          case 5:
00668b86                                          {
00668b86                                              esi_20 = edi_30;
00668b8a                                              edx_60 = ecx_21;
00668b8c                                              ebp_25 = ((char*)edi_30 - eax_148);
00668b86                                              break;
00668b86                                          }
00668b41                                      }
006689ee                                  }
006689ee                                  else
006689ee                                  {
006689f4                                      var_40 = ecx_21;
006689f8                                      var_44 = ecx_21;
006689fc                                      var_48 = ecx_21;
00668a00                                  label_668a00:
00668a00                                      ebp_25 = var_48;
00668a04                                      esi_20 = var_44;
00668a08                                      edx_60 = var_40;
006689ee                                  }
006689ee                                  
00668a10                                  int32_t eax_111;
00668a10                                  eax_111 = edx_60 != 0;
00668a1d                                  void* edx_61 = ((char*)edx_60 - eax_111);
00668a21                                  ecx_23 = esi_20 != 0;
00668a26                                  var_40 = edx_61;
00668a2a                                  void* esi_21 = ((char*)esi_20 - ecx_23);
00668a2e                                  int32_t eax_112;
00668a2e                                  eax_112 = ebp_25 != 0;
00668a31                                  var_44 = esi_21;
00668a35                                  void* ebp_26 = ((char*)ebp_25 - eax_112);
00668a3e                                  int32_t eax_116;
00668a3e                                  char edx_62;
00668a3e                                  edx_62 = HIGHD(((int64_t)((edi_21 - edx_61) * var_24_1)));
00668a3e                                  eax_116 = LOWD(((int64_t)((edi_21 - edx_61) * var_24_1)));
00668a4a                                  uint32_t ebx_18;
00668a4a                                  ebx_18 = (edi_21 - ((int8_t)((eax_116 + ((uint32_t)edx_62)) >> 8)));
00668a4c                                  ecx_23 = ebx_18;
00668a59                                  int32_t eax_122;
00668a59                                  char edx_64;
00668a59                                  edx_64 = HIGHD(((int64_t)((eax_90 - esi_21) * var_24_1)));
00668a59                                  eax_122 = LOWD(((int64_t)((eax_90 - esi_21) * var_24_1)));
00668a65                                  uint32_t ebx_19;
00668a65                                  ebx_19 = (eax_90 - ((int8_t)((eax_122 + ((uint32_t)edx_64)) >> 8)));
00668a76                                  void* eax_128;
00668a76                                  char edx_66;
00668a76                                  edx_66 = HIGHD(((int64_t)((edx_49 - ebp_26) * var_24_1)));
00668a76                                  eax_128 = LOWD(((int64_t)((edx_49 - ebp_26) * var_24_1)));
00668a7f                                  edx_52 = ebx_19;
00668a86                                  var_48 = ebp_26;
00668a8a                                  ebx_15 = (edx_49 - ((int8_t)(((char*)eax_128 + ((uint32_t)edx_66)) >> 8)));
006688c3                              }
006688c3                              else
006688c3                              {
006688cb                                  void* var_3c;
006688cb                                  void* var_38;
006688cb                                  void* edx_51;
006688cb                                  void* ebx_14;
006688cb                                  
006688cb                                  if (ebp_18 != 0)
006688cb                                  {
00668920                                      int32_t eax_97;
00668920                                      char edx_53;
00668920                                      edx_53 = HIGHD(((int64_t)(ecx_21 * var_50_1)));
00668920                                      eax_97 = LOWD(((int64_t)(ecx_21 * var_50_1)));
0066892d                                      int32_t eax_100;
0066892d                                      int32_t edx_55;
0066892d                                      edx_55 = HIGHD(((int64_t)esi_15));
0066892d                                      eax_100 = LOWD(((int64_t)esi_15));
00668938                                      int32_t ebx_17 = ((eax_100 + (edx_55 & 0xfff)) >> 0xc);
0066893e                                      int32_t eax_103;
0066893e                                      int32_t edx_57;
0066893e                                      edx_57 = HIGHD(((int64_t)(ebx_17 + 1)));
0066893e                                      eax_103 = LOWD(((int64_t)(ebx_17 + 1)));
00668943                                      int32_t ebp_20 = ((eax_97 + ((uint32_t)edx_53)) >> 8);
0066894b                                      int32_t esi_19 = ((esi_15 - (((eax_103 - edx_57) >> 1) << 0xd)) * ebp_20);
00668950                                      void* edi_23 = ((char*)ecx_21 - ebp_20);
00668954                                      int32_t ebp_22 = (esi_19 & 0x80000fff);
00668954                                      
0066895a                                      if (ebp_22 < 0)
00668963                                          ebp_22 = (((ebp_22 - 1) | 0xfffff000) + 1);
00668963                                      
00668966                                      int32_t eax_108;
00668966                                      int32_t edx_58;
00668966                                      edx_58 = HIGHD(((int64_t)esi_19));
00668966                                      eax_108 = LOWD(((int64_t)esi_19));
0066896f                                      int32_t eax_110 = ((eax_108 + (edx_58 & 0xfff)) >> 0xc);
0066896f                                      
00668978                                      if (ebp_22 < 0xfffff800)
0066897a                                          eax_110 -= 1;
0066897a                                      
00668981                                      if (ebp_22 > 0x800)
00668983                                          eax_110 += 1;
00668983                                      
00668987                                      if (ebx_17 > 5)
00668987                                      {
006688d9                                          edx_51 = var_38;
006688dd                                          ebx_14 = var_3c;
00668987                                      }
00668987                                      else
0066898d                                          switch (ebx_17)
0066898d                                          {
00668994                                              case 0:
00668994                                              {
00668994                                                  edx_51 = ecx_21;
00668996                                                  arg1 = edi_23;
0066899a                                                  ebx_14 = ((char*)edi_23 + eax_110);
00668994                                                  break;
00668994                                              }
006689a2                                              case 1:
006689a2                                              {
006689a2                                                  arg1 = edi_23;
006689a8                                                  ebx_14 = ecx_21;
006689aa                                                  edx_51 = ((char*)edi_23 - eax_110);
006689a2                                                  break;
006689a2                                              }
006689b1                                              case 2:
006689b1                                              {
006689b1                                                  edx_51 = edi_23;
006689b5                                                  ebx_14 = ecx_21;
006689b7                                                  arg1 = ((char*)edi_23 + eax_110);
006689b1                                                  break;
006689b1                                              }
006689c0                                              case 3:
006689c0                                              {
006689c0                                                  edx_51 = edi_23;
006689c4                                                  arg1 = ecx_21;
006689c8                                                  ebx_14 = ((char*)edi_23 - eax_110);
006689c0                                                  break;
006689c0                                              }
006689cf                                              case 4:
006689cf                                              {
006689cf                                                  arg1 = ecx_21;
006689d3                                                  ebx_14 = edi_23;
006689d5                                                  edx_51 = ((char*)edi_23 + eax_110);
006689cf                                                  break;
006689cf                                              }
006689dd                                              case 5:
006689dd                                              {
006689dd                                                  ebx_14 = edi_23;
006689e1                                                  edx_51 = ecx_21;
006689e3                                                  arg1 = ((char*)edi_23 - eax_110);
006689dd                                                  break;
006689dd                                              }
0066898d                                          }
006688cb                                  }
006688cb                                  else
006688cb                                  {
006688d5                                      arg1 = ecx_21;
006688d9                                      edx_51 = ecx_21;
006688dd                                      ebx_14 = ecx_21;
006688cb                                  }
006688cb                                  
006688e9                                  int32_t eax_92;
006688e9                                  eax_92 = edx_51 != 0;
006688ee                                  edx_52 = ((char*)edx_51 - eax_92);
006688f2                                  int32_t ecx_22;
006688f2                                  ecx_22 = ebx_14 != 0;
006688f7                                  var_38 = edx_52;
006688fb                                  ebx_15 = ((char*)ebx_14 - ecx_22);
00668901                                  ecx_23 = arg1 != 0;
00668904                                  var_3c = ebx_15;
00668908                                  void* eax_94 = ((char*)arg1 - ecx_23);
0066890a                                  ecx_23 = edx_52;
0066890c                                  edx_52 = ebx_15;
0066890e                                  arg1 = eax_94;
00668912                                  ebx_15 = eax_94;
006688c3                              }
006688c3                              
00668a8c                              eax_79 = var_28_2;
00668a90                              *(uint8_t*)eax_79 = ecx_23;
00668a92                              nWidth = nWidth_2;
00668a96                              eax_79[0xfffffffe] = ebx_15;
00668a99                              eax_79[0xffffffff] = edx_52;
006687b8                          }
006687b8                          
00668a9c                          i = var_2c_3;
00668a9c                          var_2c_3 -= 1;
00668aa0                      } while (i != 1);
00668782                  }
00668782                  
00668ab2                  __inner1_1 = (__inner1_3 - iStride_1);
00668ab4                  cond:2_1 = nHeight_2 != 1;
00668ab5                  __inner1_3 = __inner1_1;
00668ab9                  nHeight_2 -= 1;
00668abd              } while (cond:2_1);
00668768          }
006682b3      }
006682b3      else
006682b3      {
006682b9          union __inner1_2 = __inner1;
006682bd          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006682c5          int32_t edx;
006682c5          edx = i8AlphaModifier != 0;
006682c8          union __inner1_4 = __inner1_1;
006682cc          int32_t ecx = (i8AlphaModifier + edx);
006682d2          uint32_t nHeight = arg1->nHeight;
006682d2          
006682d7          if (nHeight > 0)
006682d7          {
006682dd              uint32_t nWidth_1 = arg1->nWidth;
006682e4              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
006682e7              uint32_t iStride = arg1->cDstArgs.iStride;
006682f2              uint32_t nHeight_3 = nHeight;
00668681              bool cond:3_1;
00668681              
00668681              do
00668681              {
00668300                  uint32_t i_1 = nWidth_1;
00668300                  
00668306                  if (i_1 > 0)
00668306                  {
0066830f                      char* esi = (((i_1 * 3) + __inner1_1) + 2);
0066830f                      
00668658                      do
00668658                      {
00668324                          int32_t ecx_2 = *(uint32_t*)((__inner1_2 + (i_1 << 2)) - 4);
0066832e                          i_1 -= 1;
00668335                          int32_t ecx_4 = ((ecx_2 & 0xff000000) | g_SourceColor.__inner0);
00668339                          uint16_t ebx_3 = ((int16_t)(ecx_4 >> 0x10));
0066833c                          uint32_t ebp_1 = ((uint32_t)*(uint8_t*)((char*)ebx_3)[1]);
00668341                          esi -= 3;
00668346                          int32_t eax;
00668346                          eax = ebp_1 != 0;
00668351                          int32_t var_8_1 = ecx_4;
00668355                          int32_t ebp_2 = (ebp_1 + eax);
0066835f                          int32_t var_3c_1 = ebp_2;
0066835f                          
00668363                          if (ecx != 0x100)
00668363                          {
0066836c                              int32_t eax_3;
0066836c                              char edx_1;
0066836c                              edx_1 = HIGHD(((int64_t)(ebp_2 * ecx)));
0066836c                              eax_3 = LOWD(((int64_t)(ebp_2 * ecx)));
00668378                              ebp_2 = ((eax_3 + ((uint32_t)edx_1)) >> 8);
0066837a                              var_3c_1 = ebp_2;
00668363                          }
00668363                          
00668380                          if (ebp_2 != 0)
00668380                          {
00668386                              union edx_2;
00668386                              *(uint8_t*)((char*)edx_2 + 0) = esi[0xfffffffe];
00668389                              eax = esi[0xffffffff];
0066838c                              char var_58_1 = *(uint8_t*)((char*)edx_2 + 0);
00668390                              *(uint8_t*)((char*)edx_2 + 0) = *(uint8_t*)esi;
00668392                              uint32_t edi_1 = ((uint32_t)ecx_4);
00668395                              uint32_t esi_1 = ((uint32_t)*(uint8_t*)((char*)ecx_4)[1]);
0066839e                              uint32_t ecx_5 = ((uint32_t)ebx_3);
006683a3                              int32_t eax_5;
006683a3                              eax_5 = ecx_5 != 0;
006683ac                              int32_t ecx_6 = (ecx_5 + eax_5);
006683b0                              int32_t edx_3;
006683b0                              edx_3 = esi_1 != 0;
006683b5                              int32_t ebp_3 = ecx_6;
006683b7                              int32_t esi_2 = (esi_1 + edx_3);
006683bb                              int32_t eax_6;
006683bb                              eax_6 = edi_1 != 0;
006683be                              int32_t edi_2 = (edi_1 + eax_6);
006683c2                              int32_t eax_7 = ecx_6;
006683c2                              
006683c4                              if (esi_2 > ecx_6)
006683c6                                  ebp_3 = esi_2;
006683c4                              else if (esi_2 < ecx_6)
006683cc                                  eax_7 = esi_2;
006683cc                              
006683d0                              if (edi_2 > ebp_3)
006683d2                                  ebp_3 = edi_2;
006683d0                              else if (edi_2 < eax_7)
006683da                                  eax_7 = edi_2;
006683da                              
006683de                              int32_t edx_5 = (ebp_3 - eax_7);
006683e4                              int32_t var_54_1;
006683e4                              int32_t ebp_4;
006683e4                              int32_t esi_3;
006683e4                              
006683e4                              if (ebp_3 != eax_7)
006683e4                              {
006683fa                                  int32_t ebx_4 = 0;
006683fe                                  var_54_1 = (((int64_t)(edx_5 << 8)) / ebp_3);
00668402                                  int32_t ecx_7;
00668402                                  
00668402                                  if (ecx_6 == ebp_3)
00668402                                  {
00668406                                      ecx_7 = (esi_2 - edi_2);
00668406                                      
00668408                                      if ((esi_2 - edi_2) < 0)
0066840a                                          ebx_4 = 0x6000;
00668402                                  }
00668402                                  else if (esi_2 != ebp_3)
00668413                                  {
00668420                                      ecx_7 = (ecx_6 - esi_2);
00668422                                      ebx_4 = 0x4000;
00668413                                  }
00668413                                  else
00668413                                  {
00668417                                      ecx_7 = (edi_2 - ecx_6);
00668419                                      ebx_4 = 0x2000;
00668413                                  }
00668413                                  
00668431                                  ebp_4 = var_54_1;
00668437                                  esi_3 = ((((int64_t)(ecx_7 << 0xc)) / edx_5) + ebx_4);
006683e4                              }
006683e4                              else
006683e4                              {
006683e6                                  esi_3 = 0;
006683e8                                  ebp_4 = 0;
006683ea                                  var_54_1 = 0;
006683e4                              }
006683e4                              
00668439                              uint32_t eax_16 = ((uint32_t)eax);
0066843e                              uint32_t edx_10 = ((uint32_t)var_58_1);
00668443                              uint32_t edi_4 = ((uint32_t)*(uint8_t*)((char*)edx_2 + 0));
0066844c                              int32_t ecx_8;
0066844c                              ecx_8 = eax_16 != 0;
0066845b                              struct BlitArgs* eax_17 = (eax_16 + ecx_8);
00668461                              int32_t ecx_9;
00668461                              ecx_9 = edx_10 != 0;
00668464                              struct BlitArgs* edx_11 = (edx_10 + ecx_9);
0066846a                              int32_t ecx_10;
0066846a                              ecx_10 = edi_4 != 0;
0066846d                              struct BlitArgs* ecx_11 = (ecx_10 + edi_4);
0066846d                              
00668471                              if (eax_17 > ecx_11)
00668473                                  ecx_11 = eax_17;
00668473                              
00668477                              if (edx_11 > ecx_11)
00668479                                  ecx_11 = edx_11;
00668479                              
00668483                              uint32_t ecx_12;
00668483                              void* edx_13;
00668483                              uint32_t ebx_5;
00668483                              
00668483                              if (var_3c_1 != 0x100)
00668483                              {
006685a8                                  struct BlitArgs* edx_21;
006685a8                                  struct BlitArgs* esi_8;
006685a8                                  
006685a8                                  if (ebp_4 != 0)
006685a8                                  {
00668693                                      int32_t eax_64;
00668693                                      char edx_30;
00668693                                      edx_30 = HIGHD(((int64_t)(ecx_11 * var_54_1)));
00668693                                      eax_64 = LOWD(((int64_t)(ecx_11 * var_54_1)));
006686a0                                      int32_t eax_67;
006686a0                                      int32_t edx_32;
006686a0                                      edx_32 = HIGHD(((int64_t)esi_3));
006686a0                                      eax_67 = LOWD(((int64_t)esi_3));
006686ab                                      int32_t ebx_10 = ((eax_67 + (edx_32 & 0xfff)) >> 0xc);
006686b1                                      int32_t eax_70;
006686b1                                      int32_t edx_34;
006686b1                                      edx_34 = HIGHD(((int64_t)(ebx_10 + 1)));
006686b1                                      eax_70 = LOWD(((int64_t)(ebx_10 + 1)));
006686b6                                      int32_t ebp_12 = ((eax_64 + ((uint32_t)edx_30)) >> 8);
006686be                                      int32_t esi_12 = ((esi_3 - (((eax_70 - edx_34) >> 1) << 0xd)) * ebp_12);
006686c3                                      struct BlitArgs* edi_14 = ((char*)ecx_11 - ebp_12);
006686c7                                      int32_t ebp_14 = (esi_12 & 0x80000fff);
006686c7                                      
006686cd                                      if (ebp_14 < 0)
006686d6                                          ebp_14 = (((ebp_14 - 1) | 0xfffff000) + 1);
006686d6                                      
006686d9                                      int32_t eax_75;
006686d9                                      int32_t edx_35;
006686d9                                      edx_35 = HIGHD(((int64_t)esi_12));
006686d9                                      eax_75 = LOWD(((int64_t)esi_12));
006686e2                                      int32_t eax_77 = ((eax_75 + (edx_35 & 0xfff)) >> 0xc);
006686e2                                      
006686eb                                      if (ebp_14 < 0xfffff800)
006686ed                                          eax_77 -= 1;
006686ed                                      
006686f4                                      if (ebp_14 > 0x800)
006686f6                                          eax_77 += 1;
006686f6                                      
006686fa                                      if (ebx_10 > 5)
006686fa                                          goto label_6685ba;
006686fa                                      
00668700                                      switch (ebx_10)
00668700                                      {
00668707                                          case 0:
00668707                                          {
00668707                                              edx_21 = ecx_11;
00668709                                              esi_8 = edi_14;
0066870b                                              ecx_11 = ((char*)edi_14 + eax_77);
00668707                                              break;
00668707                                          }
00668713                                          case 1:
00668713                                          {
00668713                                              esi_8 = edi_14;
00668717                                              edx_21 = ((char*)edi_14 - eax_77);
00668713                                              break;
00668713                                          }
0066871e                                          case 2:
0066871e                                          {
0066871e                                              edx_21 = edi_14;
00668720                                              esi_8 = ((char*)edi_14 + eax_77);
0066871e                                              break;
0066871e                                          }
00668728                                          case 3:
00668728                                          {
00668728                                              edx_21 = edi_14;
0066872c                                              esi_8 = ecx_11;
0066872e                                              ecx_11 = ((char*)edi_14 - eax_77);
00668728                                              break;
00668728                                          }
00668735                                          case 4:
00668735                                          {
00668735                                              esi_8 = ecx_11;
00668737                                              ecx_11 = edi_14;
00668739                                              edx_21 = ((char*)edi_14 + eax_77);
00668735                                              break;
00668735                                          }
00668741                                          case 5:
00668741                                          {
00668741                                              edx_21 = ecx_11;
00668743                                              ecx_11 = edi_14;
00668747                                              esi_8 = ((char*)edi_14 - eax_77);
00668741                                              break;
00668741                                          }
00668700                                      }
006685a8                                  }
006685a8                                  else
006685a8                                  {
006685ae                                      var_48 = ecx_11;
006685b2                                      var_44 = ecx_11;
006685b6                                      var_40 = ecx_11;
006685ba                                  label_6685ba:
006685ba                                      edx_21 = var_48;
006685be                                      ecx_11 = var_44;
006685c2                                      esi_8 = var_40;
006685a8                                  }
006685a8                                  
006685ca                                  int32_t eax_38;
006685ca                                  eax_38 = edx_21 != 0;
006685d5                                  void* edx_22 = ((char*)edx_21 - eax_38);
006685db                                  int32_t eax_39;
006685db                                  eax_39 = ecx_11 != 0;
006685de                                  var_48 = edx_22;
006685e2                                  void* ecx_13 = ((char*)ecx_11 - eax_39);
006685e8                                  int32_t eax_40;
006685e8                                  eax_40 = esi_8 != 0;
006685eb                                  var_44 = ecx_13;
006685ef                                  void* esi_9 = ((char*)esi_8 - eax_40);
006685f8                                  int32_t eax_44;
006685f8                                  char edx_23;
006685f8                                  edx_23 = HIGHD(((int64_t)((edi_4 - edx_22) * var_3c_1)));
006685f8                                  eax_44 = LOWD(((int64_t)((edi_4 - edx_22) * var_3c_1)));
00668604                                  uint32_t ebx_8;
00668604                                  ebx_8 = (edi_4 - ((int8_t)((eax_44 + ((uint32_t)edx_23)) >> 8)));
00668619                                  int32_t eax_50;
00668619                                  char edx_25;
00668619                                  edx_25 = HIGHD(((int64_t)((eax_16 - ecx_13) * var_3c_1)));
00668619                                  eax_50 = LOWD(((int64_t)((eax_16 - ecx_13) * var_3c_1)));
00668625                                  ebx_5 = (eax_16 - ((int8_t)((eax_50 + ((uint32_t)edx_25)) >> 8)));
0066862e                                  void* eax_56;
0066862e                                  char edx_27;
0066862e                                  edx_27 = HIGHD(((int64_t)((edx_10 - esi_9) * var_3c_1)));
0066862e                                  eax_56 = LOWD(((int64_t)((edx_10 - esi_9) * var_3c_1)));
00668637                                  edx_13 = ebx_8;
0066863e                                  var_40 = esi_9;
00668642                                  ecx_12 = (edx_10 - ((int8_t)(((char*)eax_56 + ((uint32_t)edx_27)) >> 8)));
00668483                              }
00668483                              else
00668483                              {
0066848b                                  void* var_50;
0066848b                                  struct BlitArgs* var_4c;
0066848b                                  struct BlitArgs* edx_12;
0066848b                                  
0066848b                                  if (ebp_4 != 0)
0066848b                                  {
006684de                                      int32_t eax_24;
006684de                                      char edx_14;
006684de                                      edx_14 = HIGHD(((int64_t)(ecx_11 * var_54_1)));
006684de                                      eax_24 = LOWD(((int64_t)(ecx_11 * var_54_1)));
006684eb                                      int32_t eax_27;
006684eb                                      int32_t edx_16;
006684eb                                      edx_16 = HIGHD(((int64_t)esi_3));
006684eb                                      eax_27 = LOWD(((int64_t)esi_3));
006684f6                                      int32_t ebx_7 = ((eax_27 + (edx_16 & 0xfff)) >> 0xc);
006684fc                                      int32_t eax_30;
006684fc                                      int32_t edx_18;
006684fc                                      edx_18 = HIGHD(((int64_t)(ebx_7 + 1)));
006684fc                                      eax_30 = LOWD(((int64_t)(ebx_7 + 1)));
00668501                                      int32_t ebp_6 = ((eax_24 + ((uint32_t)edx_14)) >> 8);
00668509                                      int32_t esi_7 = ((esi_3 - (((eax_30 - edx_18) >> 1) << 0xd)) * ebp_6);
0066850e                                      struct BlitArgs* edi_7 = ((char*)ecx_11 - ebp_6);
00668512                                      int32_t ebp_8 = (esi_7 & 0x80000fff);
00668512                                      
00668518                                      if (ebp_8 < 0)
00668521                                          ebp_8 = (((ebp_8 - 1) | 0xfffff000) + 1);
00668521                                      
00668524                                      int32_t eax_35;
00668524                                      int32_t edx_19;
00668524                                      edx_19 = HIGHD(((int64_t)esi_7));
00668524                                      eax_35 = LOWD(((int64_t)esi_7));
0066852d                                      int32_t eax_37 = ((eax_35 + (edx_19 & 0xfff)) >> 0xc);
0066852d                                      
00668536                                      if (ebp_8 < 0xfffff800)
00668538                                          eax_37 -= 1;
00668538                                      
0066853f                                      if (ebp_8 > 0x800)
00668541                                          eax_37 += 1;
00668541                                      
00668545                                      if (ebx_7 > 5)
00668545                                      {
00668499                                          ecx_11 = var_4c;
0066849d                                          edx_12 = var_50;
00668545                                      }
00668545                                      else
0066854b                                          switch (ebx_7)
0066854b                                          {
00668552                                              case 0:
00668552                                              {
00668552                                                  edx_12 = ecx_11;
00668554                                                  arg1 = edi_7;
00668558                                                  ecx_11 = ((char*)edi_7 + eax_37);
00668552                                                  break;
00668552                                              }
00668560                                              case 1:
00668560                                              {
00668560                                                  arg1 = edi_7;
00668566                                                  edx_12 = ((char*)edi_7 - eax_37);
00668560                                                  break;
00668560                                              }
0066856d                                              case 2:
0066856d                                              {
0066856d                                                  edx_12 = edi_7;
00668571                                                  arg1 = ((char*)edi_7 + eax_37);
0066856d                                                  break;
0066856d                                              }
0066857a                                              case 3:
0066857a                                              {
0066857a                                                  edx_12 = edi_7;
0066857e                                                  arg1 = ecx_11;
00668582                                                  ecx_11 = ((char*)edi_7 - eax_37);
0066857a                                                  break;
0066857a                                              }
00668589                                              case 4:
00668589                                              {
00668589                                                  arg1 = ecx_11;
0066858d                                                  ecx_11 = edi_7;
0066858f                                                  edx_12 = ((char*)edi_7 + eax_37);
00668589                                                  break;
00668589                                              }
00668597                                              case 5:
00668597                                              {
00668597                                                  edx_12 = ecx_11;
00668599                                                  ecx_11 = edi_7;
0066859d                                                  arg1 = ((char*)edi_7 - eax_37);
00668597                                                  break;
00668597                                              }
0066854b                                          }
0066848b                                  }
0066848b                                  else
0066848b                                  {
0066848d                                      var_50 = ecx_11;
00668495                                      arg1 = ecx_11;
00668499                                      ecx_11 = ecx_11;
0066849d                                      edx_12 = var_50;
0066848b                                  }
0066848b                                  
006684a9                                  int32_t eax_18;
006684a9                                  eax_18 = edx_12 != 0;
006684ac                                  edx_13 = ((char*)edx_12 - eax_18);
006684b2                                  int32_t eax_19;
006684b2                                  eax_19 = ecx_11 != 0;
006684b7                                  var_50 = edx_13;
006684bb                                  ecx_12 = ((char*)ecx_11 - eax_19);
006684bf                                  ebx_5 = arg1 != 0;
006684c4                                  var_4c = ecx_12;
006684c8                                  void* eax_21 = ((char*)arg1 - ebx_5);
006684ca                                  ebx_5 = ecx_12;
006684cc                                  arg1 = eax_21;
006684d0                                  ecx_12 = eax_21;
00668483                              }
00668483                              
0066864c                              esi[0xfffffffe] = ecx_12;
0066864f                              esi[0xffffffff] = ebx_5;
00668652                              *(uint8_t*)esi = edx_13;
00668380                          }
00668658                      } while (i_1 > 0);
00668306                  }
00668306                  
00668670                  __inner1_1 = (__inner1_4 + iStride);
00668674                  cond:3_1 = nHeight_3 != 1;
00668675                  __inner1_2 += iStride_2;
00668679                  __inner1_4 = __inner1_1;
0066867d                  nHeight_3 -= 1;
00668681              } while (cond:3_1);
006682d7          }
006682b3      }
006682a0  }

006682f8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
00668315                                                                 8d a4 24 00 00 00 00 8d 64 24 00                       ..$.....d$.
00668b93                                                           90                                                         .
00668b94  uint32_t jump_table_668b94[0x6] = 
00668b94  {
00668b94      [0x0] =  0x00668552
00668b98      [0x1] =  0x00668560
00668b9c      [0x2] =  0x0066856d
00668ba0      [0x3] =  0x0066857a
00668ba4      [0x4] =  0x00668589
00668ba8      [0x5] =  0x00668597
00668bac  }
00668bac  uint32_t jump_table_668bac[0x6] = 
00668bac  {
00668bac      [0x0] =  0x00668707
00668bb0      [0x1] =  0x00668713
00668bb4      [0x2] =  0x0066871e
00668bb8      [0x3] =  0x00668728
00668bbc      [0x4] =  0x00668735
00668bc0      [0x5] =  0x00668741
00668bc4  }
00668bc4  uint32_t jump_table_668bc4[0x6] = 
00668bc4  {
00668bc4      [0x0] =  0x00668994
00668bc8      [0x1] =  0x006689a2
00668bcc      [0x2] =  0x006689b1
00668bd0      [0x3] =  0x006689c0
00668bd4      [0x4] =  0x006689cf
00668bd8      [0x5] =  0x006689dd
00668bdc  }
00668bdc  uint32_t jump_table_668bdc[0x6] = 
00668bdc  {
00668bdc      [0x0] =  0x00668b48
00668be0      [0x1] =  0x00668b54
00668be4      [0x2] =  0x00668b61
00668be8      [0x3] =  0x00668b6d
00668bec      [0x4] =  0x00668b7a
00668bf0      [0x5] =  0x00668b86
00668bf4  }

00668bf4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

00668c00  void ColoringLoopNoScale<&BlitOp_Multiply<BlitFormat_Fill,BlitFormat_ARGB>,BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00668c00  {
00668c14      int64_t st0;
00668c14      uint64_t st1;
00668c14      int80_t st2;
00668c14      uint64_t st3;
00668c14      int16_t st4[0x4];
00668c14      
00668c14      if (arg1->cSrcArgs.__inner1 == 0)
00668c14      {
00668d33          union __inner1 = arg1->cDstArgs.__inner1;
00668d36          union __inner0 = g_SourceColor.__inner0;
00668d3a          uint32_t nHeight_1 = arg1->nHeight;
00668d3f          *(uint8_t*)((char*)__inner0 + 3) = arg1->i8AlphaModifier;
00668d3f          
00668d43          if (nHeight_1 > 0)
00668d43          {
00668d49              uint32_t nWidth_1 = arg1->nWidth;
00668d4c              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00668d5b              uint32_t nHeight_3 = nHeight_1;
00668e12              bool cond:2_1;
00668e12              
00668e12              do
00668e12              {
00668d60                  uint32_t i = nWidth_1;
00668d60                  
00668d66                  if (i > 0)
00668d66                  {
00668d70                      uint32_t edi_2 = (__inner0 >> 0x18);
00668d70                      
00668dfd                      do
00668dfd                      {
00668d77                          i -= 1;
00668d7a                          int32_t ebx_2;
00668d7a                          ebx_2 = edi_2 != 0;
00668d7d                          int32_t eax_10 = (edi_2 + ebx_2);
00668d7d                          
00668d7f                          if (edi_2 != -(ebx_2))
00668d7f                          {
00668d8e                              int32_t ebx_3 = *(uint32_t*)(__inner1 + (i << 2));
00668d91                              st2 = 0;
00668d97                              st3 = _m_punpckhwd(0xffffff, 0);
00668d9d                              st0 = _m_punpckhwd(((uint64_t)ebx_3), 0);
00668da3                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
00668dbf                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
00668dbf                              
00668dc2                              if (eax_10 != 0x100)
00668dc2                              {
00668dc9                                  st3 = ((uint64_t)eax_10);
00668dcf                                  st4 = _m_punpcklwd(st3, st3);
00668dd8                                  st3 = _m_punpcklwd(st4, st4);
00668dde                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00668def                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00668dc2                              }
00668dc2                              else
00668dc4                                  st0 = st1;
00668dc4                              
00668df8                              *(uint32_t*)(__inner1 + (i << 2)) = _m_packuswb(st0, 0);
00668d7f                          }
00668dfd                      } while (i > 0);
00668d66                  }
00668d66                  
00668e0b                  __inner1 -= iStride_1;
00668e0d                  cond:2_1 = nHeight_3 != 1;
00668e0e                  nHeight_3 -= 1;
00668e12              } while (cond:2_1);
00668d43          }
00668c14      }
00668c14      else
00668c14      {
00668c1a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00668c1e          union __inner1_1 = arg1->cDstArgs.__inner1;
00668c25          int32_t ecx_1;
00668c25          ecx_1 = i8AlphaModifier != 0;
00668c28          int32_t esi = (i8AlphaModifier + ecx_1);
00668c2a          uint32_t nHeight = arg1->nHeight;
00668c2a          
00668c2f          if (nHeight > 0)
00668c2f          {
00668c35              uint32_t nWidth = arg1->nWidth;
00668c38              uint32_t iStride = arg1->cDstArgs.iStride;
00668c43              uint32_t nHeight_2 = nHeight;
00668d1f              bool cond:4_1;
00668d1f              
00668d1f              do
00668d1f              {
00668c50                  uint32_t i_1 = nWidth;
00668c50                  
00668c56                  if (i_1 > 0)
00668c56                  {
00668c5c                      uint32_t ebx_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
00668c5c                      
00668d0a                      do
00668d0a                      {
00668c67                          i_1 -= 1;
00668c6a                          int32_t edx_1;
00668c6a                          edx_1 = ebx_1 != 0;
00668c6d                          int32_t eax_2 = (ebx_1 + edx_1);
00668c6d                          
00668c75                          if (esi != 0x100)
00668c75                          {
00668c7a                              int32_t eax_4;
00668c7a                              char edx_2;
00668c7a                              edx_2 = HIGHD(((int64_t)(eax_2 * esi)));
00668c7a                              eax_4 = LOWD(((int64_t)(eax_2 * esi)));
00668c83                              eax_2 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
00668c75                          }
00668c75                          
00668c88                          if (eax_2 != 0)
00668c88                          {
00668c9e                              int32_t edx_4 = *(uint32_t*)(__inner1_1 + (i_1 << 2));
00668ca1                              st2 = 0;
00668ca7                              st3 = _m_punpckhwd(0xffffff, 0);
00668cad                              st0 = _m_punpckhwd(((uint64_t)edx_4), 0);
00668cb0                              st1 = _m_punpckhwd(((uint64_t)g_SourceColor.__inner0), 0);
00668ccc                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
00668ccc                              
00668ccf                              if (eax_2 != 0x100)
00668ccf                              {
00668cd6                                  st3 = ((uint64_t)eax_2);
00668cdc                                  st4 = _m_punpcklwd(st3, st3);
00668ce5                                  st3 = _m_punpcklwd(st4, st4);
00668ceb                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00668cfc                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00668ccf                              }
00668ccf                              else
00668cd1                                  st0 = st1;
00668cd1                              
00668d05                              *(uint32_t*)(__inner1_1 + (i_1 << 2)) = _m_packuswb(st0, 0);
00668c88                          }
00668d0a                      } while (i_1 > 0);
00668c56                  }
00668c56                  
00668d18                  __inner1_1 += iStride;
00668d1a                  cond:4_1 = nHeight_2 != 1;
00668d1b                  nHeight_2 -= 1;
00668d1f              } while (cond:4_1);
00668c2f          }
00668c14      }
00668c00  }

00668c49                             8d a4 24 00 00 00 00                                                           ..$....
00668e21     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00668e30  void ColoringLoopNoScale<&BlitOp_Multiply<BlitFormat_Fill,BlitFormat_RGB>,BlitFormat_Fill,BlitFormat_RGB>(struct BlitArgs const* arg1)

00668e30  {
00668e44      int64_t st0;
00668e44      uint64_t st1;
00668e44      int80_t st2;
00668e44      uint64_t st3;
00668e44      int16_t st4[0x4];
00668e44      
00668e44      if (arg1->cSrcArgs.__inner1 == 0)
00668e44      {
00668f9b          union __inner1_1 = arg1->cDstArgs.__inner1;
00668fa1          union __inner0 = g_SourceColor.__inner0;
00668fa5          uint32_t nHeight_1 = arg1->nHeight;
00668faa          union __inner1_3 = __inner1_1;
00668fae          *(uint8_t*)((char*)__inner0 + 3) = arg1->i8AlphaModifier;
00668fae          
00668fb2          if (nHeight_1 > 0)
00668fb2          {
00668fb8              uint32_t nWidth_1 = arg1->nWidth;
00668fbb              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00668fc6              uint32_t nHeight_3 = nHeight_1;
00668fca              union __inner1_4 = __inner1_1;
006690cb              bool cond:2_1;
006690cb              
006690cb              do
006690cb              {
00668fd2                  if (nWidth_1 > 0)
00668fd2                  {
00668fdf                      uint32_t esi_3 = (__inner0 >> 0x18);
00668fe2                      char* eax_10 = (((nWidth_1 * 3) + __inner1_4) + 2);
00668fe6                      uint32_t var_10_1 = nWidth_1;
006690ae                      uint32_t i;
006690ae                      
006690ae                      do
006690ae                      {
00668ff4                          eax_10 -= 3;
00668ff9                          int32_t ebx_2;
00668ff9                          ebx_2 = esi_3 != 0;
00668ffc                          int32_t ecx_8 = (esi_3 + ebx_2);
00668ffc                          
00668ffe                          if (esi_3 != -(ebx_2))
00668ffe                          {
0066900a                              ebx_2 = eax_10[0xfffffffe];
0066900d                              char var_20_2 = ebx_2;
00669011                              ebx_2 = eax_10[0xffffffff];
00669014                              char var_1f_2 = ebx_2;
00669018                              ebx_2 = *(uint8_t*)eax_10;
0066901a                              char var_1e_2 = ebx_2;
0066901e                              st2 = 0;
0066902c                              st3 = _m_punpckhwd(0xffffff, 0);
0066902f                              char var_1d_2 = 0xff;
00669039                              st0 = _m_punpckhwd(((uint64_t)var_20_2), 0);
0066903f                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066905b                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
0066905b                              
0066905e                              if (ecx_8 != 0x100)
0066905e                              {
00669065                                  st3 = ((uint64_t)ecx_8);
0066906b                                  st4 = _m_punpcklwd(st3, st3);
00669074                                  st3 = _m_punpcklwd(st4, st4);
0066907a                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066908b                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066905e                              }
0066905e                              else
00669060                                  st0 = st1;
00669060                              
00669091                              int32_t ecx_9 = _m_packuswb(st0, 0);
00669094                              var_20_2 = ecx_9;
00669098                              eax_10[0xfffffffe] = ecx_9;
0066909e                              eax_10[0xffffffff] = ((int8_t)(ecx_9 >> 8));
006690a8                              *(uint8_t*)eax_10 = ((int8_t)(var_20_2 >> 0x10));
00668ffe                          }
00668ffe                          
006690aa                          i = var_10_1;
006690aa                          var_10_1 -= 1;
006690ae                      } while (i != 1);
00668fd2                  }
00668fd2                  
006690c0                  __inner1_4 = (__inner1_3 - iStride_1);
006690c2                  cond:2_1 = nHeight_3 != 1;
006690c3                  __inner1_3 = __inner1_4;
006690c7                  nHeight_3 -= 1;
006690cb              } while (cond:2_1);
00668fb2          }
00668e44      }
00668e44      else
00668e44      {
00668e4a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00668e4e          union __inner1 = arg1->cDstArgs.__inner1;
00668e55          int32_t ecx_1;
00668e55          ecx_1 = i8AlphaModifier != 0;
00668e58          union __inner1_2 = __inner1;
00668e5c          int32_t esi_1 = (i8AlphaModifier + ecx_1);
00668e5e          uint32_t nHeight = arg1->nHeight;
00668e5e          
00668e63          if (nHeight > 0)
00668e63          {
00668e69              uint32_t nWidth = arg1->nWidth;
00668e6c              uint32_t iStride = arg1->cDstArgs.iStride;
00668e73              uint32_t nHeight_2 = nHeight;
00668f8a              bool cond:3_1;
00668f8a              
00668f8a              do
00668f8a              {
00668e79                  if (nWidth > 0)
00668e79                  {
00668e7f                      uint32_t edi_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
00668e89                      char* ecx_3 = (((nWidth * 3) + __inner1) + 2);
00668e8d                      uint32_t var_1c_1 = nWidth;
00668f6d                      uint32_t i_1;
00668f6d                      
00668f6d                      do
00668f6d                      {
00668e95                          ecx_3 -= 3;
00668e9a                          uint32_t edx_1;
00668e9a                          edx_1 = edi_1 != 0;
00668e9d                          int32_t eax_2 = (edi_1 + edx_1);
00668e9d                          
00668ea5                          if (esi_1 != 0x100)
00668ea5                          {
00668eaa                              int32_t eax_4;
00668eaa                              char edx_2;
00668eaa                              edx_2 = HIGHD(((int64_t)(eax_2 * esi_1)));
00668eaa                              eax_4 = LOWD(((int64_t)(eax_2 * esi_1)));
00668eb3                              eax_2 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
00668ea5                          }
00668ea5                          
00668eb8                          if (eax_2 != 0)
00668eb8                          {
00668ec3                              edx_1 = ecx_3[0xfffffffe];
00668ecd                              char var_20_1 = edx_1;
00668ed1                              edx_1 = ecx_3[0xffffffff];
00668ed4                              char var_1f_1 = edx_1;
00668ed8                              edx_1 = *(uint8_t*)ecx_3;
00668eda                              char var_1e_1 = edx_1;
00668ede                              st2 = 0;
00668eec                              st3 = _m_punpckhwd(0xffffff, 0);
00668eef                              char var_1d_1 = 0xff;
00668ef9                              st0 = _m_punpckhwd(((uint64_t)var_20_1), 0);
00668efc                              st1 = _m_punpckhwd(((uint64_t)g_SourceColor.__inner0), 0);
00668f18                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
00668f18                              
00668f1b                              if (eax_2 != 0x100)
00668f1b                              {
00668f22                                  st3 = ((uint64_t)eax_2);
00668f28                                  st4 = _m_punpcklwd(st3, st3);
00668f31                                  st3 = _m_punpcklwd(st4, st4);
00668f37                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00668f48                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00668f1b                              }
00668f1b                              else
00668f1d                                  st0 = st1;
00668f1d                              
00668f4e                              int32_t eax_6 = _m_packuswb(st0, 0);
00668f53                              var_20_1 = eax_6;
00668f57                              ecx_3[0xfffffffe] = eax_6;
00668f64                              ecx_3[0xffffffff] = ((int8_t)(eax_6 >> 8));
00668f67                              *(uint8_t*)ecx_3 = ((int8_t)(var_20_1 >> 0x10));
00668eb8                          }
00668eb8                          
00668f69                          i_1 = var_1c_1;
00668f69                          var_1c_1 -= 1;
00668f6d                      } while (i_1 != 1);
00668e79                  }
00668e79                  
00668f7f                  __inner1 = (__inner1_2 + iStride);
00668f81                  cond:3_1 = nHeight_2 != 1;
00668f82                  __inner1_2 = __inner1;
00668f86                  nHeight_2 -= 1;
00668f8a              } while (cond:3_1);
00668e63          }
00668e44      }
00668e30  }

006690da                                                                                cc cc cc cc cc cc                            ......

006690e0  void ColoringLoopNoScale<&BlitOp_Multiply<BlitFormat_A,BlitFormat_ARGB>,BlitFormat_A,BlitFormat_ARGB>(struct BlitArgs const* arg1)

006690e0  {
006690ec      union __inner1_1 = arg1->cSrcArgs.__inner1;
006690f4      int64_t st0;
006690f4      uint64_t st1;
006690f4      int80_t st2;
006690f4      uint64_t st3;
006690f4      int16_t st4[0x4];
006690f4      
006690f4      if (__inner1_1 == 0)
006690f4      {
0066923c          union __inner1_2 = arg1->cDstArgs.__inner1;
0066923f          union __inner0 = g_SourceColor.__inner0;
00669243          uint32_t nHeight_1 = arg1->nHeight;
00669248          *(uint8_t*)((char*)__inner0 + 3) = arg1->i8AlphaModifier;
00669248          
0066924c          if (nHeight_1 > 0)
0066924c          {
00669252              uint32_t nWidth_1 = arg1->nWidth;
00669255              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00669264              uint32_t nHeight_3 = nHeight_1;
00669326              bool cond:3_1;
00669326              
00669326              do
00669326              {
00669270                  uint32_t i = nWidth_1;
00669270                  
00669276                  if (i > 0)
00669276                  {
00669280                      uint32_t edi_3 = (__inner0 >> 0x18);
00669280                      
00669311                      do
00669311                      {
00669287                          i -= 1;
0066928a                          int32_t ebx_1;
0066928a                          ebx_1 = edi_3 != 0;
0066928d                          int32_t eax_12 = (edi_3 + ebx_1);
0066928d                          
0066928f                          if (edi_3 != -(ebx_1))
0066928f                          {
006692a2                              int32_t ebx_2 = *(uint32_t*)(__inner1_2 + (i << 2));
006692a5                              st2 = 0;
006692ab                              st3 = _m_punpckhwd(0xffffff, 0);
006692b1                              st0 = _m_punpckhwd(((uint64_t)ebx_2), 0);
006692b7                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
006692d3                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
006692d3                              
006692d6                              if (eax_12 != 0x100)
006692d6                              {
006692dd                                  st3 = ((uint64_t)eax_12);
006692e3                                  st4 = _m_punpcklwd(st3, st3);
006692ec                                  st3 = _m_punpcklwd(st4, st4);
006692f2                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00669303                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
006692d6                              }
006692d6                              else
006692d8                                  st0 = st1;
006692d8                              
0066930c                              *(uint32_t*)(__inner1_2 + (i << 2)) = _m_packuswb(st0, 0);
0066928f                          }
00669311                      } while (i > 0);
00669276                  }
00669276                  
0066931f                  __inner1_2 -= iStride_1;
00669321                  cond:3_1 = nHeight_3 != 1;
00669322                  nHeight_3 -= 1;
00669326              } while (cond:3_1);
0066924c          }
006690f4      }
006690f4      else
006690f4      {
006690fa          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00669102          int32_t edx_1;
00669102          edx_1 = i8AlphaModifier != 0;
00669105          union __inner1_3 = __inner1_1;
0066910a          union __inner1 = arg1->cDstArgs.__inner1;
0066910e          uint32_t nHeight = arg1->nHeight;
00669111          int32_t edi_1 = (i8AlphaModifier + edx_1);
00669111          
00669115          if (nHeight > 0)
00669115          {
0066911b              uint32_t nWidth = arg1->nWidth;
00669122              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
00669125              uint32_t iStride = arg1->cDstArgs.iStride;
00669130              uint32_t nHeight_2 = nHeight;
00669228              bool cond:2_1;
00669228              
00669228              do
00669228              {
00669134                  uint32_t i_1 = nWidth;
00669134                  
0066913a                  while (i_1 > 0)
0066913a                  {
00669140                      uint32_t ecx_1 = ((uint32_t)*(uint8_t*)((i_1 + __inner1_3) - 1));
0066914a                      i_1 -= 1;
0066914e                      int32_t ecx_3 = ((ecx_1 << 0x18) | g_SourceColor.__inner0);
00669152                      uint32_t eax_3 = (ecx_3 >> 0x18);
00669159                      int32_t edx_2;
00669159                      edx_2 = eax_3 != 0;
0066915c                      int32_t var_10_1 = ecx_3;
00669160                      int32_t eax_4 = (eax_3 + edx_2);
00669160                      
00669168                      if (edi_1 != 0x100)
00669168                      {
0066916d                          int32_t eax_6;
0066916d                          char edx_3;
0066916d                          edx_3 = HIGHD(((int64_t)(eax_4 * edi_1)));
0066916d                          eax_6 = LOWD(((int64_t)(eax_4 * edi_1)));
00669176                          eax_4 = ((eax_6 + ((uint32_t)edx_3)) >> 8);
00669168                      }
00669168                      
0066917b                      if (eax_4 != 0)
0066917b                      {
00669192                          int32_t edx_6 = *(uint32_t*)(__inner1 + (i_1 << 2));
00669195                          st2 = 0;
0066919b                          st3 = _m_punpckhwd(0xffffff, 0);
006691a1                          st0 = _m_punpckhwd(((uint64_t)edx_6), 0);
006691a7                          st1 = _m_punpckhwd(((uint64_t)ecx_3), 0);
006691c3                          st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
006691c3                          
006691c6                          if (eax_4 != 0x100)
006691c6                          {
006691cd                              st3 = ((uint64_t)eax_4);
006691d3                              st4 = _m_punpcklwd(st3, st3);
006691dc                              st3 = _m_punpcklwd(st4, st4);
006691e2                              st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
006691f3                              st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
006691c6                          }
006691c6                          else
006691c8                              st0 = st1;
006691c8                          
00669200                          *(uint32_t*)(__inner1 + (i_1 << 2)) = _m_packuswb(st0, 0);
0066917b                      }
0066913a                  }
0066913a                  
00669217                  __inner1_3 += iStride_2;
0066921f                  cond:2_1 = nHeight_2 != 1;
00669220                  __inner1 += iStride;
00669224                  nHeight_2 -= 1;
00669228              } while (cond:2_1);
00669115          }
006690f4      }
006690e0  }

0066926a                                8d 9b 00 00 00 00                                                            ......
00669335                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

00669340  void ColoringLoopNoScale<&BlitOp_Multiply<BlitFormat_A,BlitFormat_RGB>,BlitFormat_A,BlitFormat_RGB>(struct BlitArgs const* arg1)

00669340  {
0066934c      union __inner1 = arg1->cSrcArgs.__inner1;
00669354      int64_t st0;
00669354      int16_t st1[0x4];
00669354      int80_t st2;
00669354      uint64_t st3;
00669354      int16_t st4[0x4];
00669354      
00669354      if (__inner1 == 0)
00669354      {
006694e9          *(uint8_t*)((char*)__inner1 + 0) = arg1->i8AlphaModifier;
006694ec          union __inner1_1 = arg1->cDstArgs.__inner1;
006694ef          union __inner0 = g_SourceColor.__inner0;
006694f3          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)__inner1 + 0);
006694f7          uint32_t nHeight_1 = arg1->nHeight;
006694fc          union __inner1_5 = __inner1_1;
006694fc          
00669500          if (nHeight_1 > 0)
00669500          {
00669506              uint32_t iStride_2 = arg1->cDstArgs.iStride;
00669509              uint32_t nWidth_1 = arg1->nWidth;
00669514              uint32_t nHeight_3 = nHeight_1;
0066960d              bool cond:2_1;
0066960d              
0066960d              do
0066960d              {
0066951a                  if (nWidth_1 > 0)
0066951a                  {
00669527                      uint32_t esi_4 = (__inner0 >> 0x18);
0066952a                      char* eax_13 = (((nWidth_1 * 3) + __inner1_1) + 2);
0066952e                      uint32_t var_18_1 = nWidth_1;
006695f0                      uint32_t i;
006695f0                      
006695f0                      do
006695f0                      {
00669536                          eax_13 -= 3;
0066953b                          int32_t ebx_1;
0066953b                          ebx_1 = esi_4 != 0;
0066953e                          int32_t ecx_7 = (esi_4 + ebx_1);
0066953e                          
00669540                          if (esi_4 != -(ebx_1))
00669540                          {
0066954c                              ebx_1 = eax_13[0xfffffffe];
0066954f                              char var_28_2 = ebx_1;
00669553                              ebx_1 = eax_13[0xffffffff];
00669556                              char var_27_2 = ebx_1;
0066955a                              ebx_1 = *(uint8_t*)eax_13;
0066955c                              char var_26_2 = ebx_1;
00669560                              st2 = 0;
0066956e                              st3 = _m_punpckhwd(0xffffff, 0);
00669571                              char var_25_2 = 0xff;
0066957b                              st0 = _m_punpckhwd(((uint64_t)var_28_2), 0);
00669581                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066959d                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
0066959d                              
006695a0                              if (ecx_7 != 0x100)
006695a0                              {
006695a7                                  st3 = ((uint64_t)ecx_7);
006695ad                                  st4 = _m_punpcklwd(st3, st3);
006695b6                                  st3 = _m_punpcklwd(st4, st4);
006695bc                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
006695cd                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
006695a0                              }
006695a0                              else
006695a2                                  st0 = st1;
006695a2                              
006695d3                              int32_t ecx_8 = _m_packuswb(st0, 0);
006695d6                              var_28_2 = ecx_8;
006695da                              eax_13[0xfffffffe] = ecx_8;
006695e0                              eax_13[0xffffffff] = ((int8_t)(ecx_8 >> 8));
006695ea                              *(uint8_t*)eax_13 = ((int8_t)(var_28_2 >> 0x10));
00669540                          }
00669540                          
006695ec                          i = var_18_1;
006695ec                          var_18_1 -= 1;
006695f0                      } while (i != 1);
0066951a                  }
0066951a                  
00669602                  __inner1_1 = (__inner1_5 - iStride_2);
00669604                  cond:2_1 = nHeight_3 != 1;
00669605                  __inner1_5 = __inner1_1;
00669609                  nHeight_3 -= 1;
0066960d              } while (cond:2_1);
00669500          }
00669354      }
00669354      else
00669354      {
0066935a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066935e          union __inner1_2 = arg1->cDstArgs.__inner1;
00669361          union __inner1_3 = __inner1;
00669369          int32_t ecx;
00669369          ecx = i8AlphaModifier != 0;
0066936c          union __inner1_4 = __inner1_2;
00669370          int32_t ebx = (i8AlphaModifier + ecx);
00669372          uint32_t nHeight = arg1->nHeight;
00669372          
00669377          if (nHeight > 0)
00669377          {
0066937d              uint32_t nWidth = arg1->nWidth;
00669384              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
00669387              uint32_t iStride = arg1->cDstArgs.iStride;
00669392              uint32_t nHeight_2 = nHeight;
006694d8              bool cond:4_1;
006694d8              
006694d8              do
006694d8              {
006693a0                  uint32_t i_1 = nWidth;
006693a0                  
006693a6                  if (i_1 > 0)
006693a6                  {
006693af                      char* esi_1 = (((i_1 * 3) + __inner1_2) + 2);
006693af                      
006694af                      do
006694af                      {
006693c4                          uint32_t ecx_2 = ((uint32_t)*(uint8_t*)((i_1 + __inner1_3) - 1));
006693ce                          i_1 -= 1;
006693d2                          int32_t ecx_4 = ((ecx_2 << 0x18) | g_SourceColor.__inner0);
006693d6                          uint32_t eax_3 = (ecx_4 >> 0x18);
006693db                          esi_1 -= 3;
006693e0                          uint32_t edx_2;
006693e0                          edx_2 = eax_3 != 0;
006693e3                          int32_t var_10_1 = ecx_4;
006693e7                          int32_t eax_4 = (eax_3 + edx_2);
006693e7                          
006693ef                          if (ebx != 0x100)
006693ef                          {
006693f4                              int32_t eax_6;
006693f4                              char edx_3;
006693f4                              edx_3 = HIGHD(((int64_t)(eax_4 * ebx)));
006693f4                              eax_6 = LOWD(((int64_t)(eax_4 * ebx)));
006693fd                              eax_4 = ((eax_6 + ((uint32_t)edx_3)) >> 8);
006693ef                          }
006693ef                          
00669402                          if (eax_4 != 0)
00669402                          {
0066940d                              edx_2 = esi_1[0xfffffffe];
00669410                              char var_28_1 = edx_2;
00669414                              edx_2 = esi_1[0xffffffff];
00669417                              char var_27_1 = edx_2;
0066941b                              edx_2 = *(uint8_t*)esi_1;
0066941d                              char var_26_1 = edx_2;
00669421                              st2 = 0;
0066942f                              st3 = _m_punpckhwd(0xffffff, 0);
00669432                              char var_25_1 = 0xff;
0066943c                              st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
00669442                              st1 = _m_punpckhwd(((uint64_t)ecx_4), 0);
0066945e                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
0066945e                              
00669461                              if (eax_4 != 0x100)
00669461                              {
00669468                                  st3 = ((uint64_t)eax_4);
0066946e                                  st4 = _m_punpcklwd(st3, st3);
00669477                                  st3 = _m_punpcklwd(st4, st4);
0066947d                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066948e                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00669461                              }
00669461                              else
00669463                                  st0 = st1;
00669463                              
00669494                              int32_t eax_8 = _m_packuswb(st0, 0);
00669499                              ecx_4 = eax_8;
0066949e                              var_28_1 = eax_8;
006694a5                              esi_1[0xfffffffe] = ecx_4;
006694a8                              esi_1[0xffffffff] = ((int8_t)(eax_8 >> 8));
006694ab                              *(uint8_t*)esi_1 = ((int8_t)(eax_8 >> 0x10));
00669402                          }
006694af                      } while (i_1 > 0);
006693a6                  }
006693a6                  
006694c7                  __inner1_2 = (__inner1_4 + iStride);
006694cb                  cond:4_1 = nHeight_2 != 1;
006694cc                  __inner1_3 += iStride_1;
006694d0                  __inner1_4 = __inner1_2;
006694d4                  nHeight_2 -= 1;
006694d8              } while (cond:4_1);
00669377          }
00669354      }
00669340  }

00669398                                                                          8d a4 24 00 00 00 00 90                          ..$.....
006693b5                                                                 8d a4 24 00 00 00 00 8d 64 24 00                       ..$.....d$.
0066961c                                                                                      cc cc cc cc                              ....

00669620  void ColoringLoopNoScale<&BlitOp_Multiply<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00669620  {
0066962c      union __inner1 = arg1->cSrcArgs.__inner1;
00669634      int64_t st0;
00669634      uint64_t st1;
00669634      int80_t st2;
00669634      uint64_t st3;
00669634      int16_t st4[0x4];
00669634      
00669634      if (__inner1 == 0)
00669634      {
00669790          union __inner1_2 = arg1->cDstArgs.__inner1;
00669793          union __inner0 = g_SourceColor.__inner0;
00669797          uint32_t nHeight = arg1->nHeight;
0066979c          *(uint8_t*)((char*)__inner0 + 3) = arg1->i8AlphaModifier;
0066979c          
006697a0          if (nHeight > 0)
006697a0          {
006697a6              uint32_t nWidth_1 = arg1->nWidth;
006697a9              uint32_t iStride_1 = arg1->cDstArgs.iStride;
006697b8              uint32_t nHeight_3 = nHeight;
00669872              bool cond:2_1;
00669872              
00669872              do
00669872              {
006697c0                  uint32_t i = nWidth_1;
006697c0                  
006697c6                  if (i > 0)
006697c6                  {
006697d0                      uint32_t edi_6 = (__inner0 >> 0x18);
006697d0                      
0066985d                      do
0066985d                      {
006697d7                          i -= 1;
006697da                          int32_t ebx_2;
006697da                          ebx_2 = edi_6 != 0;
006697dd                          int32_t eax_13 = (edi_6 + ebx_2);
006697dd                          
006697df                          if (edi_6 != -(ebx_2))
006697df                          {
006697ee                              int32_t ebx_3 = *(uint32_t*)(__inner1_2 + (i << 2));
006697f1                              st2 = 0;
006697f7                              st3 = _m_punpckhwd(0xffffff, 0);
006697fd                              st0 = _m_punpckhwd(((uint64_t)ebx_3), 0);
00669803                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066981f                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
0066981f                              
00669822                              if (eax_13 != 0x100)
00669822                              {
00669829                                  st3 = ((uint64_t)eax_13);
0066982f                                  st4 = _m_punpcklwd(st3, st3);
00669838                                  st3 = _m_punpcklwd(st4, st4);
0066983e                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066984f                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00669822                              }
00669822                              else
00669824                                  st0 = st1;
00669824                              
00669858                              *(uint32_t*)(__inner1_2 + (i << 2)) = _m_packuswb(st0, 0);
006697df                          }
0066985d                      } while (i > 0);
006697c6                  }
006697c6                  
0066986b                  __inner1_2 -= iStride_1;
0066986d                  cond:2_1 = nHeight_3 != 1;
0066986e                  nHeight_3 -= 1;
00669872              } while (cond:2_1);
006697a0          }
00669634      }
00669634      else
00669634      {
0066963a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066963e          uint32_t nHeight_1 = arg1->nHeight;
00669645          int32_t edx_1;
00669645          edx_1 = i8AlphaModifier != 0;
00669648          union __inner1_3 = __inner1;
0066964c          union __inner1_1 = arg1->cDstArgs.__inner1;
0066964f          union __inner1_4 = __inner1_1;
00669653          int32_t ebx_1 = (i8AlphaModifier + edx_1);
00669653          
00669657          if (nHeight_1 > 0)
00669657          {
0066965d              uint32_t nWidth = arg1->nWidth;
00669660              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
00669663              uint32_t iStride = arg1->cDstArgs.iStride;
00669666              uint32_t nWidth_2 = nWidth;
00669672              uint32_t nHeight_2 = nHeight_1;
0066977c              bool cond:3_1;
0066977c              
0066977c              do
0066977c              {
00669678                  if (nWidth > 0)
00669678                  {
00669682                      int32_t* esi = (__inner1_1 + (nWidth << 2));
00669687                      uint32_t var_20_1 = nWidth;
0066974d                      uint32_t i_1;
0066974d                      
0066974d                      do
0066974d                      {
00669690                          int32_t ecx = *(uint32_t*)(((__inner1_3 - __inner1_1) + esi) - 4);
00669699                          esi -= 4;
006696a2                          int32_t ecx_2 = ((ecx & 0xff000000) | g_SourceColor.__inner0);
006696a6                          uint32_t eax_3 = (ecx_2 >> 0x18);
006696ad                          int32_t edx_2;
006696ad                          edx_2 = eax_3 != 0;
006696b0                          int32_t var_14_1 = ecx_2;
006696b4                          int32_t eax_4 = (eax_3 + edx_2);
006696b4                          
006696bc                          if (ebx_1 != 0x100)
006696bc                          {
006696c1                              int32_t eax_6;
006696c1                              char edx_3;
006696c1                              edx_3 = HIGHD(((int64_t)(eax_4 * ebx_1)));
006696c1                              eax_6 = LOWD(((int64_t)(eax_4 * ebx_1)));
006696ca                              eax_4 = ((eax_6 + ((uint32_t)edx_3)) >> 8);
006696bc                          }
006696bc                          
006696cf                          if (eax_4 != 0)
006696cf                          {
006696de                              int32_t edx_5 = *(uint32_t*)esi;
006696e0                              st2 = 0;
006696e6                              st3 = _m_punpckhwd(0xffffff, 0);
006696ec                              st0 = _m_punpckhwd(((uint64_t)edx_5), 0);
006696f2                              st1 = _m_punpckhwd(((uint64_t)ecx_2), 0);
0066970e                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
0066970e                              
00669711                              if (eax_4 != 0x100)
00669711                              {
00669718                                  st3 = ((uint64_t)eax_4);
0066971e                                  st4 = _m_punpcklwd(st3, st3);
00669727                                  st3 = _m_punpcklwd(st4, st4);
0066972d                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066973e                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00669711                              }
00669711                              else
00669713                                  st0 = st1;
00669713                              
00669747                              *(uint32_t*)esi = _m_packuswb(st0, 0);
006696cf                          }
006696cf                          
00669749                          i_1 = var_20_1;
00669749                          var_20_1 -= 1;
0066974d                      } while (i_1 != 1);
00669753                      __inner1_1 = __inner1_4;
00669757                      nWidth = nWidth_2;
00669678                  }
00669678                  
0066976d                  __inner1_1 += iStride;
0066976f                  cond:3_1 = nHeight_2 != 1;
00669770                  __inner1_3 += iStride_2;
00669774                  __inner1_4 = __inner1_1;
00669778                  nHeight_2 -= 1;
0066977c              } while (cond:3_1);
00669657          }
00669634      }
00669620  }

0066968d                                         8d 49 00                                                               .I.
00669881     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

00669890  void ColoringLoopNoScale<&BlitOp_Multiply<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_AXXX,BlitFormat_RGB>(struct BlitArgs const* arg1)

00669890  {
0066989c      union __inner1 = arg1->cSrcArgs.__inner1;
006698a4      int64_t st0;
006698a4      int16_t st1[0x4];
006698a4      int80_t st2;
006698a4      uint64_t st3;
006698a4      int16_t st4[0x4];
006698a4      
006698a4      if (__inner1 == 0)
006698a4      {
00669a2e          *(uint8_t*)((char*)__inner1 + 0) = arg1->i8AlphaModifier;
00669a31          union __inner1_1 = arg1->cDstArgs.__inner1;
00669a34          union __inner0 = g_SourceColor.__inner0;
00669a38          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)__inner1 + 0);
00669a3c          uint32_t nHeight_1 = arg1->nHeight;
00669a41          union __inner1_5 = __inner1_1;
00669a41          
00669a45          if (nHeight_1 > 0)
00669a45          {
00669a4b              uint32_t iStride_2 = arg1->cDstArgs.iStride;
00669a4e              uint32_t nWidth_1 = arg1->nWidth;
00669a59              uint32_t nHeight_3 = nHeight_1;
00669b5b              bool cond:2_1;
00669b5b              
00669b5b              do
00669b5b              {
00669a62                  if (nWidth_1 > 0)
00669a62                  {
00669a6f                      uint32_t esi_4 = (__inner0 >> 0x18);
00669a72                      char* eax_13 = (((nWidth_1 * 3) + __inner1_1) + 2);
00669a76                      uint32_t var_18_1 = nWidth_1;
00669b3e                      uint32_t i;
00669b3e                      
00669b3e                      do
00669b3e                      {
00669a84                          eax_13 -= 3;
00669a89                          int32_t ebx_2;
00669a89                          ebx_2 = esi_4 != 0;
00669a8c                          int32_t ecx_8 = (esi_4 + ebx_2);
00669a8c                          
00669a8e                          if (esi_4 != -(ebx_2))
00669a8e                          {
00669a9a                              ebx_2 = eax_13[0xfffffffe];
00669a9d                              char var_28_2 = ebx_2;
00669aa1                              ebx_2 = eax_13[0xffffffff];
00669aa4                              char var_27_2 = ebx_2;
00669aa8                              ebx_2 = *(uint8_t*)eax_13;
00669aaa                              char var_26_2 = ebx_2;
00669aae                              st2 = 0;
00669abc                              st3 = _m_punpckhwd(0xffffff, 0);
00669abf                              char var_25_2 = 0xff;
00669ac9                              st0 = _m_punpckhwd(((uint64_t)var_28_2), 0);
00669acf                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
00669aeb                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
00669aeb                              
00669aee                              if (ecx_8 != 0x100)
00669aee                              {
00669af5                                  st3 = ((uint64_t)ecx_8);
00669afb                                  st4 = _m_punpcklwd(st3, st3);
00669b04                                  st3 = _m_punpcklwd(st4, st4);
00669b0a                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00669b1b                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00669aee                              }
00669aee                              else
00669af0                                  st0 = st1;
00669af0                              
00669b21                              int32_t ecx_9 = _m_packuswb(st0, 0);
00669b24                              var_28_2 = ecx_9;
00669b28                              eax_13[0xfffffffe] = ecx_9;
00669b2e                              eax_13[0xffffffff] = ((int8_t)(ecx_9 >> 8));
00669b38                              *(uint8_t*)eax_13 = ((int8_t)(var_28_2 >> 0x10));
00669a8e                          }
00669a8e                          
00669b3a                          i = var_18_1;
00669b3a                          var_18_1 -= 1;
00669b3e                      } while (i != 1);
00669a62                  }
00669a62                  
00669b50                  __inner1_1 = (__inner1_5 - iStride_2);
00669b52                  cond:2_1 = nHeight_3 != 1;
00669b53                  __inner1_5 = __inner1_1;
00669b57                  nHeight_3 -= 1;
00669b5b              } while (cond:2_1);
00669a45          }
006698a4      }
006698a4      else
006698a4      {
006698aa          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
006698ae          union __inner1_2 = arg1->cDstArgs.__inner1;
006698b1          union __inner1_3 = __inner1;
006698b9          int32_t ecx;
006698b9          ecx = i8AlphaModifier != 0;
006698bc          union __inner1_4 = __inner1_2;
006698c0          int32_t ebx = (i8AlphaModifier + ecx);
006698c2          uint32_t nHeight = arg1->nHeight;
006698c2          
006698c7          if (nHeight > 0)
006698c7          {
006698cd              uint32_t nWidth = arg1->nWidth;
006698d4              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
006698d7              uint32_t iStride = arg1->cDstArgs.iStride;
006698e2              uint32_t nHeight_2 = nHeight;
00669a1d              bool cond:4_1;
00669a1d              
00669a1d              do
00669a1d              {
006698f0                  uint32_t i_1 = nWidth;
006698f0                  
006698f6                  if (i_1 > 0)
006698f6                  {
006698ff                      char* esi_1 = (((i_1 * 3) + __inner1_2) + 2);
006698ff                      
006699f4                      do
006699f4                      {
00669907                          int32_t ecx_2 = *(uint32_t*)((__inner1_3 + (i_1 << 2)) - 4);
00669910                          i_1 -= 1;
00669917                          int32_t ecx_4 = ((ecx_2 & 0xff000000) | g_SourceColor.__inner0);
0066991b                          uint32_t eax_3 = (ecx_4 >> 0x18);
00669920                          esi_1 -= 3;
00669925                          uint32_t edx_2;
00669925                          edx_2 = eax_3 != 0;
00669928                          int32_t var_10_1 = ecx_4;
0066992c                          int32_t eax_4 = (eax_3 + edx_2);
0066992c                          
00669934                          if (ebx != 0x100)
00669934                          {
00669939                              int32_t eax_6;
00669939                              char edx_3;
00669939                              edx_3 = HIGHD(((int64_t)(eax_4 * ebx)));
00669939                              eax_6 = LOWD(((int64_t)(eax_4 * ebx)));
00669942                              eax_4 = ((eax_6 + ((uint32_t)edx_3)) >> 8);
00669934                          }
00669934                          
00669947                          if (eax_4 != 0)
00669947                          {
00669952                              edx_2 = esi_1[0xfffffffe];
00669955                              char var_28_1 = edx_2;
00669959                              edx_2 = esi_1[0xffffffff];
0066995c                              char var_27_1 = edx_2;
00669960                              edx_2 = *(uint8_t*)esi_1;
00669962                              char var_26_1 = edx_2;
00669966                              st2 = 0;
00669974                              st3 = _m_punpckhwd(0xffffff, 0);
00669977                              char var_25_1 = 0xff;
00669981                              st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
00669987                              st1 = _m_punpckhwd(((uint64_t)ecx_4), 0);
006699a3                              st1 = ((_m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8) & st3) | (st3 & !(st0)));
006699a3                              
006699a6                              if (eax_4 != 0x100)
006699a6                              {
006699ad                                  st3 = ((uint64_t)eax_4);
006699b3                                  st4 = _m_punpcklwd(st3, st3);
006699bc                                  st3 = _m_punpcklwd(st4, st4);
006699c2                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
006699d3                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
006699a6                              }
006699a6                              else
006699a8                                  st0 = st1;
006699a8                              
006699d9                              int32_t eax_8 = _m_packuswb(st0, 0);
006699de                              ecx_4 = eax_8;
006699e3                              var_28_1 = eax_8;
006699ea                              esi_1[0xfffffffe] = ecx_4;
006699ed                              esi_1[0xffffffff] = ((int8_t)(eax_8 >> 8));
006699f0                              *(uint8_t*)esi_1 = ((int8_t)(eax_8 >> 0x10));
00669947                          }
006699f4                      } while (i_1 > 0);
006698f6                  }
006698f6                  
00669a0c                  __inner1_2 = (__inner1_4 + iStride);
00669a10                  cond:4_1 = nHeight_2 != 1;
00669a11                  __inner1_3 += iStride_1;
00669a15                  __inner1_4 = __inner1_2;
00669a19                  nHeight_2 -= 1;
00669a1d              } while (cond:4_1);
006698c7          }
006698a4      }
00669890  }

006698e8                          8d a4 24 00 00 00 00 90                                                          ..$.....
00669b6a                                cc cc cc cc cc cc                                                            ......

00669b70  void ColoringLoopNoScale<&BlitOp_Screen<BlitFormat_Fill,BlitFormat_ARGB>,BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

00669b70  {
00669b81      int32_t ebx;
00669b81      int32_t var_20 = ebx;
00669b84      uint64_t st0;
00669b84      uint64_t st1;
00669b84      int80_t st2;
00669b84      int16_t st3[0x4];
00669b84      int64_t st4;
00669b84      int64_t st6;
00669b84      
00669b84      if (arg1->cSrcArgs.__inner1 == 0)
00669b84      {
00669cab          union __inner1 = arg1->cDstArgs.__inner1;
00669cae          union __inner0 = g_SourceColor.__inner0;
00669cb2          union ecx_3;
00669cb2          *(uint8_t*)((char*)ecx_3 + 0) = arg1->i8AlphaModifier;
00669cb5          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_3 + 0);
00669cb9          uint32_t nHeight_1 = arg1->nHeight;
00669cb9          
00669cbe          if (nHeight_1 > 0)
00669cbe          {
00669cc4              uint32_t nWidth_1 = arg1->nWidth;
00669cc7              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00669cd6              uint32_t nHeight_3 = nHeight_1;
00669d9f              bool cond:1_1;
00669d9f              
00669d9f              do
00669d9f              {
00669ce0                  uint32_t i = nWidth_1;
00669ce0                  
00669ce6                  if (i > 0)
00669ce6                  {
00669cf0                      uint32_t esi_3 = (__inner0 >> 0x18);
00669cf0                      
00669d8a                      do
00669d8a                      {
00669cf5                          i -= 1;
00669cf5                          
00669cf8                          if (esi_3 != 0)
00669cf8                          {
00669d06                              int32_t ebx_3 = *(uint32_t*)(__inner1 + (i << 2));
00669d09                              st2 = 0;
00669d0f                              st3 = _m_punpckhwd(0xffffff, 0);
00669d15                              st0 = _m_punpckhwd(((uint64_t)ebx_3), 0);
00669d1b                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
00669d33                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00669d4c                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00669d4c                              
00669d4f                              if (esi_3 != 0xff)
00669d4f                              {
00669d56                                  st3 = ((uint64_t)(esi_3 + 1));
00669d5c                                  st4 = _m_punpcklwd(st3, st3[0]);
00669d65                                  st3 = _m_punpcklwd(st4, st4[0]);
00669d6b                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00669d7c                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00669d4f                              }
00669d4f                              else
00669d51                                  st0 = st1;
00669d51                              
00669d85                              *(uint32_t*)(__inner1 + (i << 2)) = _m_packuswb(st0, 0);
00669cf8                          }
00669d8a                      } while (i > 0);
00669ce6                  }
00669ce6                  
00669d98                  __inner1 -= iStride_1;
00669d9a                  cond:1_1 = nHeight_3 != 1;
00669d9b                  nHeight_3 -= 1;
00669d9f              } while (cond:1_1);
00669cbe          }
00669b84      }
00669b84      else
00669b84      {
00669b8a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00669b8e          union __inner1_1 = arg1->cDstArgs.__inner1;
00669b95          int32_t ecx_1;
00669b95          ecx_1 = i8AlphaModifier != 0;
00669b98          int32_t esi_1 = (i8AlphaModifier + ecx_1);
00669b9a          uint32_t nHeight = arg1->nHeight;
00669b9a          
00669b9f          if (nHeight > 0)
00669b9f          {
00669ba5              uint32_t nWidth = arg1->nWidth;
00669ba8              uint32_t iStride = arg1->cDstArgs.iStride;
00669bb3              uint32_t nHeight_2 = nHeight;
00669c9a              bool cond:3_1;
00669c9a              
00669c9a              do
00669c9a              {
00669bc0                  uint32_t i_1 = nWidth;
00669bc0                  
00669bc6                  if (i_1 > 0)
00669bc6                  {
00669bcc                      uint32_t ebx_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
00669bcc                      
00669c85                      do
00669c85                      {
00669bd3                          i_1 -= 1;
00669bda                          uint32_t eax_1 = ebx_1;
00669bda                          
00669bdc                          if (esi_1 != 0x100)
00669bdc                          {
00669be1                              int32_t eax_3;
00669be1                              char edx_1;
00669be1                              edx_1 = HIGHD(((int64_t)(eax_1 * esi_1)));
00669be1                              eax_3 = LOWD(((int64_t)(eax_1 * esi_1)));
00669bea                              eax_1 = ((eax_3 + ((uint32_t)edx_1)) >> 8);
00669bdc                          }
00669bdc                          
00669bef                          if (eax_1 != 0)
00669bef                          {
00669c04                              int32_t edx_3 = *(uint32_t*)(__inner1_1 + (i_1 << 2));
00669c07                              st2 = 0;
00669c0d                              st3 = _m_punpckhwd(0xffffff, 0);
00669c13                              st0 = _m_punpckhwd(((uint64_t)edx_3), 0);
00669c16                              st1 = _m_punpckhwd(((uint64_t)g_SourceColor.__inner0), 0);
00669c2e                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00669c47                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00669c47                              
00669c4a                              if (eax_1 != 0xff)
00669c4a                              {
00669c51                                  st3 = ((uint64_t)(eax_1 + 1));
00669c57                                  st4 = _m_punpcklwd(st3, st3[0]);
00669c60                                  st3 = _m_punpcklwd(st4, st4[0]);
00669c66                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00669c77                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00669c4a                              }
00669c4a                              else
00669c4c                                  st0 = st1;
00669c4c                              
00669c80                              *(uint32_t*)(__inner1_1 + (i_1 << 2)) = _m_packuswb(st0, 0);
00669bef                          }
00669c85                      } while (i_1 > 0);
00669bc6                  }
00669bc6                  
00669c93                  __inner1_1 += iStride;
00669c95                  cond:3_1 = nHeight_2 != 1;
00669c96                  nHeight_2 -= 1;
00669c9a              } while (cond:3_1);
00669b9f          }
00669b84      }
00669b70  }

00669bb9                                                                             8d a4 24 00 00 00 00                           ..$....
00669dae                                            cc cc                                                                ..

00669db0  void ColoringLoopNoScale<&BlitOp_Screen<BlitFormat_Fill,BlitFormat_RGB>,BlitFormat_Fill,BlitFormat_RGB>(struct BlitArgs const* arg1)

00669db0  {
00669dc4      uint64_t st0;
00669dc4      uint64_t st1;
00669dc4      int80_t st2;
00669dc4      int16_t st3[0x4];
00669dc4      int64_t st4;
00669dc4      int64_t st6;
00669dc4      
00669dc4      if (arg1->cSrcArgs.__inner1 == 0)
00669dc4      {
00669f22          union __inner1_1 = arg1->cDstArgs.__inner1;
00669f28          union __inner0 = g_SourceColor.__inner0;
00669f2c          uint32_t nHeight_1 = arg1->nHeight;
00669f31          union __inner1_3 = __inner1_1;
00669f35          *(uint8_t*)((char*)__inner0 + 3) = arg1->i8AlphaModifier;
00669f35          
00669f39          if (nHeight_1 > 0)
00669f39          {
00669f3f              uint32_t nWidth_1 = arg1->nWidth;
00669f42              uint32_t iStride_1 = arg1->cDstArgs.iStride;
00669f4d              uint32_t nHeight_3 = nHeight_1;
0066a054              bool cond:2_1;
0066a054              
0066a054              do
0066a054              {
00669f53                  if (nWidth_1 > 0)
00669f53                  {
00669f60                      uint32_t esi_3 = (__inner0 >> 0x18);
00669f63                      char* eax_10 = (((nWidth_1 * 3) + __inner1_1) + 2);
00669f67                      uint32_t var_10_1 = nWidth_1;
0066a037                      uint32_t i;
0066a037                      
0066a037                      do
0066a037                      {
00669f72                          eax_10 -= 3;
00669f72                          
00669f77                          if (esi_3 != 0)
00669f77                          {
00669f7d                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_10[0xfffffffe];
00669f80                              char var_20_2 = *(uint8_t*)((char*)__inner1_1 + 0);
00669f84                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_10[0xffffffff];
00669f87                              char var_1f_2 = *(uint8_t*)((char*)__inner1_1 + 0);
00669f8b                              *(uint8_t*)((char*)__inner1_1 + 0) = *(uint8_t*)eax_10;
00669f8d                              char var_1e_2 = *(uint8_t*)((char*)__inner1_1 + 0);
00669f91                              st2 = 0;
00669f9f                              st3 = _m_punpckhwd(0xffffff, 0);
00669fa2                              char var_1d_2 = 0xff;
00669fac                              st0 = _m_punpckhwd(((uint64_t)var_20_2), 0);
00669fb2                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
00669fca                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00669fe4                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00669fe4                              
00669fe7                              if (esi_3 != 0xff)
00669fe7                              {
00669fee                                  st3 = ((uint64_t)(esi_3 + 1));
00669ff4                                  st4 = _m_punpcklwd(st3, st3[0]);
00669ffd                                  st3 = _m_punpcklwd(st4, st4[0]);
0066a003                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066a014                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00669fe7                              }
00669fe7                              else
00669fe9                                  st0 = st1;
00669fe9                              
0066a01a                              int32_t ecx_9 = _m_packuswb(st0, 0);
0066a01d                              var_20_2 = ecx_9;
0066a021                              eax_10[0xfffffffe] = ecx_9;
0066a027                              eax_10[0xffffffff] = ((int8_t)(ecx_9 >> 8));
0066a031                              *(uint8_t*)eax_10 = ((int8_t)(var_20_2 >> 0x10));
00669f77                          }
00669f77                          
0066a033                          i = var_10_1;
0066a033                          var_10_1 -= 1;
0066a037                      } while (i != 1);
00669f53                  }
00669f53                  
0066a049                  __inner1_1 = (__inner1_3 - iStride_1);
0066a04b                  cond:2_1 = nHeight_3 != 1;
0066a04c                  __inner1_3 = __inner1_1;
0066a050                  nHeight_3 -= 1;
0066a054              } while (cond:2_1);
00669f39          }
00669dc4      }
00669dc4      else
00669dc4      {
00669dca          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
00669dce          union __inner1 = arg1->cDstArgs.__inner1;
00669dd5          int32_t ecx_1;
00669dd5          ecx_1 = i8AlphaModifier != 0;
00669dd8          union __inner1_2 = __inner1;
00669ddc          int32_t esi_1 = (i8AlphaModifier + ecx_1);
00669dde          uint32_t nHeight = arg1->nHeight;
00669dde          
00669de3          if (nHeight > 0)
00669de3          {
00669de9              uint32_t nWidth = arg1->nWidth;
00669dec              uint32_t iStride = arg1->cDstArgs.iStride;
00669df3              uint32_t nHeight_2 = nHeight;
00669f11              bool cond:3_1;
00669f11              
00669f11              do
00669f11              {
00669df9                  if (nWidth > 0)
00669df9                  {
00669dff                      uint32_t edi_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
00669e09                      char* ecx_3 = (((nWidth * 3) + __inner1) + 2);
00669e0d                      uint32_t var_1c_1 = nWidth;
00669ef4                      uint32_t i_1;
00669ef4                      
00669ef4                      do
00669ef4                      {
00669e11                          ecx_3 -= 3;
00669e1a                          uint32_t eax_1 = edi_1;
00669e1a                          
00669e1c                          if (esi_1 != 0x100)
00669e1c                          {
00669e21                              int32_t eax_3;
00669e21                              char edx_1;
00669e21                              edx_1 = HIGHD(((int64_t)(eax_1 * esi_1)));
00669e21                              eax_3 = LOWD(((int64_t)(eax_1 * esi_1)));
00669e2a                              eax_1 = ((eax_3 + ((uint32_t)edx_1)) >> 8);
00669e1c                          }
00669e1c                          
00669e2f                          if (eax_1 != 0)
00669e2f                          {
00669e35                              *(uint8_t*)((char*)__inner1 + 0) = ecx_3[0xfffffffe];
00669e3f                              char var_20_1 = *(uint8_t*)((char*)__inner1 + 0);
00669e43                              *(uint8_t*)((char*)__inner1 + 0) = ecx_3[0xffffffff];
00669e46                              char var_1f_1 = *(uint8_t*)((char*)__inner1 + 0);
00669e4a                              *(uint8_t*)((char*)__inner1 + 0) = *(uint8_t*)ecx_3;
00669e4c                              char var_1e_1 = *(uint8_t*)((char*)__inner1 + 0);
00669e50                              st2 = 0;
00669e5e                              st3 = _m_punpckhwd(0xffffff, 0);
00669e61                              char var_1d_1 = 0xff;
00669e6b                              st0 = _m_punpckhwd(((uint64_t)var_20_1), 0);
00669e6e                              st1 = _m_punpckhwd(((uint64_t)g_SourceColor.__inner0), 0);
00669e86                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
00669e9f                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
00669e9f                              
00669ea2                              if (eax_1 != 0xff)
00669ea2                              {
00669ea9                                  st3 = ((uint64_t)(eax_1 + 1));
00669eaf                                  st4 = _m_punpcklwd(st3, st3[0]);
00669eb8                                  st3 = _m_punpcklwd(st4, st4[0]);
00669ebe                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
00669ecf                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
00669ea2                              }
00669ea2                              else
00669ea4                                  st0 = st1;
00669ea4                              
00669ed5                              int32_t eax_6 = _m_packuswb(st0, 0);
00669eda                              var_20_1 = eax_6;
00669ede                              ecx_3[0xfffffffe] = eax_6;
00669eeb                              ecx_3[0xffffffff] = ((int8_t)(eax_6 >> 8));
00669eee                              *(uint8_t*)ecx_3 = *(uint8_t*)((char*)(var_20_1 >> 0x10) + 0);
00669e2f                          }
00669e2f                          
00669ef0                          i_1 = var_1c_1;
00669ef0                          var_1c_1 -= 1;
00669ef4                      } while (i_1 != 1);
00669df9                  }
00669df9                  
00669f06                  __inner1 = (__inner1_2 + iStride);
00669f08                  cond:3_1 = nHeight_2 != 1;
00669f09                  __inner1_2 = __inner1;
00669f0d                  nHeight_2 -= 1;
00669f11              } while (cond:3_1);
00669de3          }
00669dc4      }
00669db0  }

00669f6d                                         8d 49 00                                                               .I.
0066a063           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0066a070  void ColoringLoopNoScale<&BlitOp_Screen<BlitFormat_A,BlitFormat_ARGB>,BlitFormat_A,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066a070  {
0066a07c      union __inner1 = arg1->cSrcArgs.__inner1;
0066a084      uint64_t st0;
0066a084      uint64_t st1;
0066a084      int80_t st2;
0066a084      int64_t st3;
0066a084      int64_t st4;
0066a084      uint64_t st6;
0066a084      
0066a084      if (__inner1 == 0)
0066a084      {
0066a1ca          union __inner1_1 = arg1->cDstArgs.__inner1;
0066a1cd          union __inner0 = g_SourceColor.__inner0;
0066a1d1          union ecx_6;
0066a1d1          *(uint8_t*)((char*)ecx_6 + 0) = arg1->i8AlphaModifier;
0066a1d4          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_6 + 0);
0066a1d8          uint32_t nHeight_1 = arg1->nHeight;
0066a1d8          
0066a1dd          if (nHeight_1 > 0)
0066a1dd          {
0066a1e3              uint32_t nWidth_1 = arg1->nWidth;
0066a1e6              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066a1f5              uint32_t nHeight_3 = nHeight_1;
0066a2bf              bool cond:1_1;
0066a2bf              
0066a2bf              do
0066a2bf              {
0066a200                  uint32_t i = nWidth_1;
0066a200                  
0066a206                  if (i > 0)
0066a206                  {
0066a210                      uint32_t esi_2 = (__inner0 >> 0x18);
0066a210                      
0066a2aa                      do
0066a2aa                      {
0066a215                          i -= 1;
0066a215                          
0066a218                          if (esi_2 != 0)
0066a218                          {
0066a226                              int32_t ebx_1 = *(uint32_t*)(__inner1_1 + (i << 2));
0066a229                              st2 = 0;
0066a22f                              st3 = _m_punpckhwd(0xffffff, 0);
0066a235                              st0 = _m_punpckhwd(((uint64_t)ebx_1), 0);
0066a23b                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066a253                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066a26c                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066a26c                              
0066a26f                              if (esi_2 != 0xff)
0066a26f                              {
0066a276                                  st3 = ((uint64_t)(esi_2 + 1));
0066a27c                                  st4 = _m_punpcklwd(st3, st3);
0066a285                                  st3 = _m_punpcklwd(st4, st4);
0066a28b                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066a29c                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066a26f                              }
0066a26f                              else
0066a271                                  st0 = st1;
0066a271                              
0066a2a5                              *(uint32_t*)(__inner1_1 + (i << 2)) = _m_packuswb(st0, 0);
0066a218                          }
0066a2aa                      } while (i > 0);
0066a206                  }
0066a206                  
0066a2b8                  __inner1_1 -= iStride_1;
0066a2ba                  cond:1_1 = nHeight_3 != 1;
0066a2bb                  nHeight_3 -= 1;
0066a2bf              } while (cond:1_1);
0066a1dd          }
0066a084      }
0066a084      else
0066a084      {
0066a08a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066a08e          union __inner1_2 = arg1->cDstArgs.__inner1;
0066a091          union __inner1_3 = __inner1;
0066a099          int32_t ecx;
0066a099          ecx = i8AlphaModifier != 0;
0066a09c          int32_t edi_1 = (i8AlphaModifier + ecx);
0066a09e          uint32_t nHeight = arg1->nHeight;
0066a09e          
0066a0a3          if (nHeight > 0)
0066a0a3          {
0066a0a9              uint32_t nWidth = arg1->nWidth;
0066a0b0              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
0066a0b3              uint32_t iStride = arg1->cDstArgs.iStride;
0066a0be              uint32_t nHeight_2 = nHeight;
0066a1b9              bool cond:2_1;
0066a1b9              
0066a1b9              do
0066a1b9              {
0066a0c2                  uint32_t i_1 = nWidth;
0066a0c2                  
0066a0c8                  while (i_1 > 0)
0066a0c8                  {
0066a0d4                      uint32_t ecx_2 = ((uint32_t)*(uint8_t*)((i_1 + __inner1_3) - 1));
0066a0de                      i_1 -= 1;
0066a0e2                      int32_t ecx_4 = ((ecx_2 << 0x18) | g_SourceColor.__inner0);
0066a0e6                      uint32_t eax_3 = (ecx_4 >> 0x18);
0066a0ef                      int32_t var_10_1 = ecx_4;
0066a0ef                      
0066a0f3                      if (edi_1 != 0x100)
0066a0f3                      {
0066a0f8                          int32_t eax_5;
0066a0f8                          char edx_1;
0066a0f8                          edx_1 = HIGHD(((int64_t)(eax_3 * edi_1)));
0066a0f8                          eax_5 = LOWD(((int64_t)(eax_3 * edi_1)));
0066a101                          eax_3 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
0066a0f3                      }
0066a0f3                      
0066a106                      if (eax_3 != 0)
0066a106                      {
0066a114                          int32_t edx_3 = *(uint32_t*)(__inner1_2 + (i_1 << 2));
0066a117                          st2 = 0;
0066a11d                          st3 = _m_punpckhwd(0xffffff, 0);
0066a123                          st0 = _m_punpckhwd(((uint64_t)edx_3), 0);
0066a129                          st1 = _m_punpckhwd(((uint64_t)ecx_4), 0);
0066a141                          st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066a15a                          st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066a15a                          
0066a15d                          if (eax_3 != 0xff)
0066a15d                          {
0066a164                              st3 = ((uint64_t)(eax_3 + 1));
0066a16a                              st4 = _m_punpcklwd(st3, st3);
0066a173                              st3 = _m_punpcklwd(st4, st4);
0066a179                              st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066a18a                              st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066a15d                          }
0066a15d                          else
0066a15f                              st0 = st1;
0066a15f                          
0066a193                          *(uint32_t*)(__inner1_2 + (i_1 << 2)) = _m_packuswb(st0, 0);
0066a106                      }
0066a0c8                  }
0066a0c8                  
0066a1ac                  __inner1_2 += iStride;
0066a1b0                  cond:2_1 = nHeight_2 != 1;
0066a1b1                  __inner1_3 += iStride_2;
0066a1b5                  nHeight_2 -= 1;
0066a1b9              } while (cond:2_1);
0066a0a3          }
0066a084      }
0066a070  }

0066a2ce                                            cc cc                                                                ..

0066a2d0  void ColoringLoopNoScale<&BlitOp_Screen<BlitFormat_A,BlitFormat_RGB>,BlitFormat_A,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066a2d0  {
0066a2dc      union __inner1 = arg1->cSrcArgs.__inner1;
0066a2e4      uint64_t st0;
0066a2e4      uint64_t st1;
0066a2e4      int80_t st2;
0066a2e4      int64_t st3;
0066a2e4      int64_t st4;
0066a2e4      uint64_t st6;
0066a2e4      
0066a2e4      if (__inner1 == 0)
0066a2e4      {
0066a480          *(uint8_t*)((char*)__inner1 + 0) = arg1->i8AlphaModifier;
0066a483          union __inner1_1 = arg1->cDstArgs.__inner1;
0066a486          union __inner0 = g_SourceColor.__inner0;
0066a48a          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)__inner1 + 0);
0066a48e          uint32_t nHeight_1 = arg1->nHeight;
0066a493          union __inner1_5 = __inner1_1;
0066a493          
0066a497          if (nHeight_1 > 0)
0066a497          {
0066a49d              uint32_t iStride_2 = arg1->cDstArgs.iStride;
0066a4a0              uint32_t nWidth_1 = arg1->nWidth;
0066a4ab              uint32_t nHeight_3 = nHeight_1;
0066a5b4              bool cond:2_1;
0066a5b4              
0066a5b4              do
0066a5b4              {
0066a4b2                  if (nWidth_1 > 0)
0066a4b2                  {
0066a4bf                      uint32_t esi_4 = (__inner0 >> 0x18);
0066a4c2                      char* eax_13 = (((nWidth_1 * 3) + __inner1_1) + 2);
0066a4c6                      uint32_t var_18_1 = nWidth_1;
0066a597                      uint32_t i;
0066a597                      
0066a597                      do
0066a597                      {
0066a4d2                          eax_13 -= 3;
0066a4d2                          
0066a4d7                          if (esi_4 != 0)
0066a4d7                          {
0066a4e0                              char var_28_2 = eax_13[0xfffffffe];
0066a4e7                              char var_27_2 = eax_13[0xffffffff];
0066a4ed                              char var_26_2 = *(uint8_t*)eax_13;
0066a4f1                              st2 = 0;
0066a4ff                              st3 = _m_punpckhwd(0xffffff, 0);
0066a502                              char var_25_2 = 0xff;
0066a50c                              st0 = _m_punpckhwd(((uint64_t)var_28_2), 0);
0066a512                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066a52a                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066a544                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066a544                              
0066a547                              if (esi_4 != 0xff)
0066a547                              {
0066a54e                                  st3 = ((uint64_t)(esi_4 + 1));
0066a554                                  st4 = _m_punpcklwd(st3, st3);
0066a55d                                  st3 = _m_punpcklwd(st4, st4);
0066a563                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066a574                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066a547                              }
0066a547                              else
0066a549                                  st0 = st1;
0066a549                              
0066a57a                              int32_t ecx_8 = _m_packuswb(st0, 0);
0066a57d                              var_28_2 = ecx_8;
0066a581                              eax_13[0xfffffffe] = ecx_8;
0066a587                              eax_13[0xffffffff] = ((int8_t)(ecx_8 >> 8));
0066a591                              *(uint8_t*)eax_13 = ((int8_t)(var_28_2 >> 0x10));
0066a4d7                          }
0066a4d7                          
0066a593                          i = var_18_1;
0066a593                          var_18_1 -= 1;
0066a597                      } while (i != 1);
0066a4b2                  }
0066a4b2                  
0066a5a9                  __inner1_1 = (__inner1_5 - iStride_2);
0066a5ab                  cond:2_1 = nHeight_3 != 1;
0066a5ac                  __inner1_5 = __inner1_1;
0066a5b0                  nHeight_3 -= 1;
0066a5b4              } while (cond:2_1);
0066a497          }
0066a2e4      }
0066a2e4      else
0066a2e4      {
0066a2ea          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066a2ee          union __inner1_2 = arg1->cDstArgs.__inner1;
0066a2f1          union __inner1_3 = __inner1;
0066a2f9          int32_t ecx;
0066a2f9          ecx = i8AlphaModifier != 0;
0066a2fc          union __inner1_4 = __inner1_2;
0066a300          int32_t ebx = (i8AlphaModifier + ecx);
0066a302          uint32_t nHeight = arg1->nHeight;
0066a302          
0066a307          if (nHeight > 0)
0066a307          {
0066a30d              uint32_t nWidth = arg1->nWidth;
0066a314              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066a317              uint32_t iStride = arg1->cDstArgs.iStride;
0066a322              uint32_t nHeight_2 = nHeight;
0066a46f              bool cond:4_1;
0066a46f              
0066a46f              do
0066a46f              {
0066a330                  uint32_t i_1 = nWidth;
0066a330                  
0066a336                  if (i_1 > 0)
0066a336                  {
0066a33f                      char* esi_1 = (((i_1 * 3) + __inner1_2) + 2);
0066a33f                      
0066a446                      do
0066a446                      {
0066a354                          uint32_t ecx_2 = ((uint32_t)*(uint8_t*)((i_1 + __inner1_3) - 1));
0066a35e                          i_1 -= 1;
0066a362                          int32_t ecx_4 = ((ecx_2 << 0x18) | g_SourceColor.__inner0);
0066a366                          esi_1 -= 3;
0066a369                          uint32_t eax_3 = (ecx_4 >> 0x18);
0066a372                          int32_t var_10_1 = ecx_4;
0066a372                          
0066a376                          if (ebx != 0x100)
0066a376                          {
0066a37b                              int32_t eax_5;
0066a37b                              char edx_1;
0066a37b                              edx_1 = HIGHD(((int64_t)(eax_3 * ebx)));
0066a37b                              eax_5 = LOWD(((int64_t)(eax_3 * ebx)));
0066a384                              eax_3 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
0066a376                          }
0066a376                          
0066a389                          if (eax_3 != 0)
0066a389                          {
0066a38f                              union edx_2;
0066a38f                              *(uint8_t*)((char*)edx_2 + 0) = esi_1[0xfffffffe];
0066a392                              char var_28_1 = *(uint8_t*)((char*)edx_2 + 0);
0066a396                              *(uint8_t*)((char*)edx_2 + 0) = esi_1[0xffffffff];
0066a399                              char var_27_1 = *(uint8_t*)((char*)edx_2 + 0);
0066a39d                              *(uint8_t*)((char*)edx_2 + 0) = *(uint8_t*)esi_1;
0066a39f                              char var_26_1 = *(uint8_t*)((char*)edx_2 + 0);
0066a3a3                              st2 = 0;
0066a3b1                              st3 = _m_punpckhwd(0xffffff, 0);
0066a3b4                              char var_25_1 = 0xff;
0066a3be                              st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
0066a3c4                              st1 = _m_punpckhwd(((uint64_t)ecx_4), 0);
0066a3dc                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066a3f5                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066a3f5                              
0066a3f8                              if (eax_3 != 0xff)
0066a3f8                              {
0066a3ff                                  st3 = ((uint64_t)(eax_3 + 1));
0066a405                                  st4 = _m_punpcklwd(st3, st3);
0066a40e                                  st3 = _m_punpcklwd(st4, st4);
0066a414                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066a425                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066a3f8                              }
0066a3f8                              else
0066a3fa                                  st0 = st1;
0066a3fa                              
0066a42b                              int32_t eax_8 = _m_packuswb(st0, 0);
0066a430                              ecx_4 = eax_8;
0066a435                              var_28_1 = eax_8;
0066a43c                              esi_1[0xfffffffe] = ecx_4;
0066a43f                              esi_1[0xffffffff] = ((int8_t)(eax_8 >> 8));
0066a442                              *(uint8_t*)esi_1 = ((int8_t)(eax_8 >> 0x10));
0066a389                          }
0066a446                      } while (i_1 > 0);
0066a336                  }
0066a336                  
0066a45e                  __inner1_2 = (__inner1_4 + iStride);
0066a462                  cond:4_1 = nHeight_2 != 1;
0066a463                  __inner1_3 += iStride_1;
0066a467                  __inner1_4 = __inner1_2;
0066a46b                  nHeight_2 -= 1;
0066a46f              } while (cond:4_1);
0066a307          }
0066a2e4      }
0066a2d0  }

0066a328                          8d a4 24 00 00 00 00 90                                                          ..$.....
0066a345                 8d a4 24 00 00 00 00 8d 64 24 00                                                       ..$.....d$.
0066a5c3           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0066a5d0  void ColoringLoopNoScale<&BlitOp_Screen<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066a5d0  {
0066a5dc      union __inner1 = arg1->cSrcArgs.__inner1;
0066a5e1      union __inner1_1 = arg1->cDstArgs.__inner1;
0066a5e7      uint64_t st0;
0066a5e7      uint64_t st1;
0066a5e7      int80_t st2;
0066a5e7      int64_t st3;
0066a5e7      int64_t st4;
0066a5e7      uint64_t st6;
0066a5e7      
0066a5e7      if (__inner1 == 0)
0066a5e7      {
0066a746          union __inner0 = g_SourceColor.__inner0;
0066a74a          union ecx_6;
0066a74a          *(uint8_t*)((char*)ecx_6 + 0) = arg1->i8AlphaModifier;
0066a74d          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_6 + 0);
0066a751          uint32_t nHeight_1 = arg1->nHeight;
0066a751          
0066a756          if (nHeight_1 > 0)
0066a756          {
0066a75c              uint32_t nWidth_1 = arg1->nWidth;
0066a75f              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066a76e              uint32_t nHeight_3 = nHeight_1;
0066a831              bool cond:1_1;
0066a831              
0066a831              do
0066a831              {
0066a772                  uint32_t i = nWidth_1;
0066a772                  
0066a778                  if (i > 0)
0066a778                  {
0066a782                      uint32_t esi_3 = (__inner0 >> 0x18);
0066a782                      
0066a81c                      do
0066a81c                      {
0066a787                          i -= 1;
0066a787                          
0066a78a                          if (esi_3 != 0)
0066a78a                          {
0066a798                              int32_t ebx_2 = *(uint32_t*)(__inner1_1 + (i << 2));
0066a79b                              st2 = 0;
0066a7a1                              st3 = _m_punpckhwd(0xffffff, 0);
0066a7a7                              st0 = _m_punpckhwd(((uint64_t)ebx_2), 0);
0066a7ad                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066a7c5                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066a7de                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066a7de                              
0066a7e1                              if (esi_3 != 0xff)
0066a7e1                              {
0066a7e8                                  st3 = ((uint64_t)(esi_3 + 1));
0066a7ee                                  st4 = _m_punpcklwd(st3, st3);
0066a7f7                                  st3 = _m_punpcklwd(st4, st4);
0066a7fd                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066a80e                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066a7e1                              }
0066a7e1                              else
0066a7e3                                  st0 = st1;
0066a7e3                              
0066a817                              *(uint32_t*)(__inner1_1 + (i << 2)) = _m_packuswb(st0, 0);
0066a78a                          }
0066a81c                      } while (i > 0);
0066a778                  }
0066a778                  
0066a82a                  __inner1_1 -= iStride_1;
0066a82c                  cond:1_1 = nHeight_3 != 1;
0066a82d                  nHeight_3 -= 1;
0066a831              } while (cond:1_1);
0066a756          }
0066a5e7      }
0066a5e7      else
0066a5e7      {
0066a5ed          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066a5f1          union __inner1_2 = __inner1;
0066a5f9          int32_t ecx;
0066a5f9          ecx = i8AlphaModifier != 0;
0066a5fc          union __inner1_3 = __inner1_1;
0066a600          int32_t ebx_1 = (i8AlphaModifier + ecx);
0066a602          uint32_t nHeight = arg1->nHeight;
0066a602          
0066a607          if (nHeight > 0)
0066a607          {
0066a60d              uint32_t nWidth = arg1->nWidth;
0066a610              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
0066a613              uint32_t iStride = arg1->cDstArgs.iStride;
0066a616              uint32_t nWidth_2 = nWidth;
0066a622              uint32_t nHeight_2 = nHeight;
0066a735              bool cond:2_1;
0066a735              
0066a735              do
0066a735              {
0066a628                  if (nWidth > 0)
0066a628                  {
0066a636                      int32_t* esi_1 = (__inner1_1 + (nWidth << 2));
0066a63b                      uint32_t i_2 = nWidth_2;
0066a708                      uint32_t i_1;
0066a708                      
0066a708                      do
0066a708                      {
0066a640                          int32_t ecx_2 = *(uint32_t*)(((__inner1_2 - __inner1_1) + esi_1) - 4);
0066a649                          esi_1 -= 4;
0066a652                          int32_t ecx_4 = ((ecx_2 & 0xff000000) | g_SourceColor.__inner0);
0066a656                          uint32_t eax_3 = (ecx_4 >> 0x18);
0066a65f                          int32_t var_10_1 = ecx_4;
0066a65f                          
0066a663                          if (ebx_1 != 0x100)
0066a663                          {
0066a668                              int32_t eax_5;
0066a668                              char edx;
0066a668                              edx = HIGHD(((int64_t)(eax_3 * ebx_1)));
0066a668                              eax_5 = LOWD(((int64_t)(eax_3 * ebx_1)));
0066a671                              eax_3 = ((eax_5 + ((uint32_t)edx)) >> 8);
0066a663                          }
0066a663                          
0066a676                          if (eax_3 != 0)
0066a676                          {
0066a684                              int32_t edx_2 = *(uint32_t*)esi_1;
0066a686                              st2 = 0;
0066a68c                              st3 = _m_punpckhwd(0xffffff, 0);
0066a692                              st0 = _m_punpckhwd(((uint64_t)edx_2), 0);
0066a698                              st1 = _m_punpckhwd(((uint64_t)ecx_4), 0);
0066a6b0                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066a6c9                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066a6c9                              
0066a6cc                              if (eax_3 != 0xff)
0066a6cc                              {
0066a6d3                                  st3 = ((uint64_t)(eax_3 + 1));
0066a6d9                                  st4 = _m_punpcklwd(st3, st3);
0066a6e2                                  st3 = _m_punpcklwd(st4, st4);
0066a6e8                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066a6f9                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066a6cc                              }
0066a6cc                              else
0066a6ce                                  st0 = st1;
0066a6ce                              
0066a702                              *(uint32_t*)esi_1 = _m_packuswb(st0, 0);
0066a676                          }
0066a676                          
0066a704                          i_1 = i_2;
0066a704                          i_2 -= 1;
0066a708                      } while (i_1 != 1);
0066a70e                      __inner1_1 = __inner1_3;
0066a712                      nWidth = nWidth_2;
0066a628                  }
0066a628                  
0066a724                  __inner1_1 += iStride;
0066a728                  cond:2_1 = nHeight_2 != 1;
0066a729                  __inner1_2 += iStride_2;
0066a72d                  __inner1_3 = __inner1_1;
0066a731                  nHeight_2 -= 1;
0066a735              } while (cond:2_1);
0066a607          }
0066a5e7      }
0066a5d0  }


0066a840  void ColoringLoopNoScale<&BlitOp_Screen<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_AXXX,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066a840  {
0066a84c      union __inner1 = arg1->cSrcArgs.__inner1;
0066a854      uint64_t st0;
0066a854      uint64_t st1;
0066a854      int80_t st2;
0066a854      int64_t st3;
0066a854      int64_t st4;
0066a854      uint64_t st6;
0066a854      
0066a854      if (__inner1 == 0)
0066a854      {
0066a9e5          *(uint8_t*)((char*)__inner1 + 0) = arg1->i8AlphaModifier;
0066a9e8          union __inner1_1 = arg1->cDstArgs.__inner1;
0066a9eb          union __inner0 = g_SourceColor.__inner0;
0066a9ef          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)__inner1 + 0);
0066a9f3          uint32_t nHeight_1 = arg1->nHeight;
0066a9f8          union __inner1_5 = __inner1_1;
0066a9f8          
0066a9fc          if (nHeight_1 > 0)
0066a9fc          {
0066aa02              uint32_t iStride_2 = arg1->cDstArgs.iStride;
0066aa05              uint32_t nWidth_1 = arg1->nWidth;
0066aa10              uint32_t nHeight_3 = nHeight_1;
0066ab14              bool cond:2_1;
0066ab14              
0066ab14              do
0066ab14              {
0066aa16                  if (nWidth_1 > 0)
0066aa16                  {
0066aa23                      uint32_t esi_4 = (__inner0 >> 0x18);
0066aa26                      char* eax_13 = (((nWidth_1 * 3) + __inner1_1) + 2);
0066aa2a                      uint32_t var_18_1 = nWidth_1;
0066aaf7                      uint32_t i;
0066aaf7                      
0066aaf7                      do
0066aaf7                      {
0066aa32                          eax_13 -= 3;
0066aa32                          
0066aa37                          if (esi_4 != 0)
0066aa37                          {
0066aa3d                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_13[0xfffffffe];
0066aa40                              char var_28_2 = *(uint8_t*)((char*)__inner1_1 + 0);
0066aa44                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_13[0xffffffff];
0066aa47                              char var_27_2 = *(uint8_t*)((char*)__inner1_1 + 0);
0066aa4b                              *(uint8_t*)((char*)__inner1_1 + 0) = *(uint8_t*)eax_13;
0066aa4d                              char var_26_2 = *(uint8_t*)((char*)__inner1_1 + 0);
0066aa51                              st2 = 0;
0066aa5f                              st3 = _m_punpckhwd(0xffffff, 0);
0066aa62                              char var_25_2 = 0xff;
0066aa6c                              st0 = _m_punpckhwd(((uint64_t)var_28_2), 0);
0066aa72                              st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066aa8a                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066aaa4                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066aaa4                              
0066aaa7                              if (esi_4 != 0xff)
0066aaa7                              {
0066aaae                                  st3 = ((uint64_t)(esi_4 + 1));
0066aab4                                  st4 = _m_punpcklwd(st3, st3);
0066aabd                                  st3 = _m_punpcklwd(st4, st4);
0066aac3                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066aad4                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066aaa7                              }
0066aaa7                              else
0066aaa9                                  st0 = st1;
0066aaa9                              
0066aada                              int32_t ecx_8 = _m_packuswb(st0, 0);
0066aadd                              var_28_2 = ecx_8;
0066aae1                              eax_13[0xfffffffe] = ecx_8;
0066aae7                              eax_13[0xffffffff] = ((int8_t)(ecx_8 >> 8));
0066aaf1                              *(uint8_t*)eax_13 = ((int8_t)(var_28_2 >> 0x10));
0066aa37                          }
0066aa37                          
0066aaf3                          i = var_18_1;
0066aaf3                          var_18_1 -= 1;
0066aaf7                      } while (i != 1);
0066aa16                  }
0066aa16                  
0066ab09                  __inner1_1 = (__inner1_5 - iStride_2);
0066ab0b                  cond:2_1 = nHeight_3 != 1;
0066ab0c                  __inner1_5 = __inner1_1;
0066ab10                  nHeight_3 -= 1;
0066ab14              } while (cond:2_1);
0066a9fc          }
0066a854      }
0066a854      else
0066a854      {
0066a85a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066a85e          union __inner1_2 = arg1->cDstArgs.__inner1;
0066a861          union __inner1_3 = __inner1;
0066a869          int32_t ecx;
0066a869          ecx = i8AlphaModifier != 0;
0066a86c          union __inner1_4 = __inner1_2;
0066a870          int32_t ebx = (i8AlphaModifier + ecx);
0066a872          uint32_t nHeight = arg1->nHeight;
0066a872          
0066a877          if (nHeight > 0)
0066a877          {
0066a87d              uint32_t nWidth = arg1->nWidth;
0066a884              uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066a887              uint32_t iStride = arg1->cDstArgs.iStride;
0066a892              uint32_t nHeight_2 = nHeight;
0066a9d4              bool cond:4_1;
0066a9d4              
0066a9d4              do
0066a9d4              {
0066a8a0                  uint32_t i_1 = nWidth;
0066a8a0                  
0066a8a6                  if (i_1 > 0)
0066a8a6                  {
0066a8af                      char* esi_1 = (((i_1 * 3) + __inner1_2) + 2);
0066a8af                      
0066a9ab                      do
0066a9ab                      {
0066a8b7                          int32_t ecx_2 = *(uint32_t*)((__inner1_3 + (i_1 << 2)) - 4);
0066a8c0                          i_1 -= 1;
0066a8c7                          int32_t ecx_4 = ((ecx_2 & 0xff000000) | g_SourceColor.__inner0);
0066a8cb                          esi_1 -= 3;
0066a8ce                          uint32_t eax_3 = (ecx_4 >> 0x18);
0066a8d7                          int32_t var_10_1 = ecx_4;
0066a8d7                          
0066a8db                          if (ebx != 0x100)
0066a8db                          {
0066a8e0                              int32_t eax_5;
0066a8e0                              char edx_1;
0066a8e0                              edx_1 = HIGHD(((int64_t)(eax_3 * ebx)));
0066a8e0                              eax_5 = LOWD(((int64_t)(eax_3 * ebx)));
0066a8e9                              eax_3 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
0066a8db                          }
0066a8db                          
0066a8ee                          if (eax_3 != 0)
0066a8ee                          {
0066a8f4                              union edx_2;
0066a8f4                              *(uint8_t*)((char*)edx_2 + 0) = esi_1[0xfffffffe];
0066a8f7                              char var_28_1 = *(uint8_t*)((char*)edx_2 + 0);
0066a8fb                              *(uint8_t*)((char*)edx_2 + 0) = esi_1[0xffffffff];
0066a8fe                              char var_27_1 = *(uint8_t*)((char*)edx_2 + 0);
0066a902                              *(uint8_t*)((char*)edx_2 + 0) = *(uint8_t*)esi_1;
0066a904                              char var_26_1 = *(uint8_t*)((char*)edx_2 + 0);
0066a908                              st2 = 0;
0066a916                              st3 = _m_punpckhwd(0xffffff, 0);
0066a919                              char var_25_1 = 0xff;
0066a923                              st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
0066a929                              st1 = _m_punpckhwd(((uint64_t)ecx_4), 0);
0066a941                              st6 = _m_psrlwi(_m_pmullw(_m_psubw(st1, _m_pcmpgtw(st1, 0)), st0), 8);
0066a95a                              st1 = ((_m_psubw(_m_paddw(st0, st1), st6) & st3) | (st3 & !(st0)));
0066a95a                              
0066a95d                              if (eax_3 != 0xff)
0066a95d                              {
0066a964                                  st3 = ((uint64_t)(eax_3 + 1));
0066a96a                                  st4 = _m_punpcklwd(st3, st3);
0066a973                                  st3 = _m_punpcklwd(st4, st4);
0066a979                                  st1 = _m_psrlwi(_m_pmullw(st1, st3), 8);
0066a98a                                  st0 = _m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st1));
0066a95d                              }
0066a95d                              else
0066a95f                                  st0 = st1;
0066a95f                              
0066a990                              int32_t eax_8 = _m_packuswb(st0, 0);
0066a995                              ecx_4 = eax_8;
0066a99a                              var_28_1 = eax_8;
0066a9a1                              esi_1[0xfffffffe] = ecx_4;
0066a9a4                              esi_1[0xffffffff] = ((int8_t)(eax_8 >> 8));
0066a9a7                              *(uint8_t*)esi_1 = ((int8_t)(eax_8 >> 0x10));
0066a8ee                          }
0066a9ab                      } while (i_1 > 0);
0066a8a6                  }
0066a8a6                  
0066a9c3                  __inner1_2 = (__inner1_4 + iStride);
0066a9c7                  cond:4_1 = nHeight_2 != 1;
0066a9c8                  __inner1_3 += iStride_1;
0066a9cc                  __inner1_4 = __inner1_2;
0066a9d0                  nHeight_2 -= 1;
0066a9d4              } while (cond:4_1);
0066a877          }
0066a854      }
0066a840  }

0066a898                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0066ab23           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0066ab30  void ColoringLoopNoScale<&BlitOp_Grayscale<BlitFormat_Fill,BlitFormat_ARGB>,BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066ab30  {
0066ab44      uint64_t st0;
0066ab44      uint64_t st1;
0066ab44      uint64_t st2;
0066ab44      int64_t st3;
0066ab44      uint64_t st4;
0066ab44      int80_t st5;
0066ab44      
0066ab44      if (arg1->cSrcArgs.__inner1 == 0)
0066ab44      {
0066ac82          union ecx;
0066ac82          *(uint8_t*)((char*)ecx + 0) = arg1->i8AlphaModifier;
0066ac85          union __inner1 = arg1->cDstArgs.__inner1;
0066ac8c          uint32_t nHeight_1 = arg1->nHeight;
0066ac8c          
0066ac91          if (nHeight_1 > 0)
0066ac91          {
0066ac97              uint32_t nWidth_1 = arg1->nWidth;
0066ac9a              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066aca5              uint32_t edi_1 = nHeight_1;
0066ad84              uint32_t i;
0066ad84              
0066ad84              do
0066ad84              {
0066acb0                  uint32_t j = nWidth_1;
0066acb0                  
0066acb6                  if (j > 0)
0066acb6                  {
0066acbc                      uint32_t esi_2 = ((uint32_t)*(uint8_t*)((char*)ecx + 0));
0066acbc                      
0066ad79                      do
0066ad79                      {
0066acc3                          j -= 1;
0066acc3                          
0066acc6                          if (esi_2 != 0)
0066acc6                          {
0066acd4                              int32_t ebx_2 = *(uint32_t*)(__inner1 + (j << 2));
0066acda                              st5 = 0;
0066acdd                              st2 = _m_punpckhwd(0xffffff, 0);
0066ace6                              st1 = _m_punpckhwd(((uint64_t)ebx_2), 0);
0066acec                              st0 = (st1 & st2);
0066acf5                              st3 = _m_psllqi(st0, 0x10);
0066acf9                              st4 = _m_pcmpgtw(st0, st3);
0066ad05                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066ad0e                              st3 = _m_psrlqi(st0, 0x20);
0066ad19                              st3 |= _m_psllqi(st0, 0x20);
0066ad1f                              st4 = _m_pcmpgtw(st0, st3);
0066ad3d                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066ad3d                              
0066ad40                              if (esi_2 != 0xff)
0066ad40                              {
0066ad42                                  st2 = ((uint64_t)(esi_2 + 1));
0066ad48                                  st3 = _m_punpcklwd(st2, st2);
0066ad51                                  st2 = _m_punpcklwd(st3, st3);
0066ad57                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066ad6b                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066ad40                              }
0066ad40                              
0066ad74                              *(uint32_t*)(__inner1 + (j << 2)) = _m_packuswb(st0, 0);
0066acc6                          }
0066ad79                      } while (j > 0);
0066acb6                  }
0066acb6                  
0066ad7f                  __inner1 -= iStride_1;
0066ad83                  i = edi_1;
0066ad83                  edi_1 -= 1;
0066ad84              } while (i != 1);
0066ac91          }
0066ab44      }
0066ab44      else
0066ab44      {
0066ab4a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066ab4e          union __inner1_1 = arg1->cDstArgs.__inner1;
0066ab55          int32_t ecx_1;
0066ab55          ecx_1 = i8AlphaModifier != 0;
0066ab58          int32_t esi_1 = (i8AlphaModifier + ecx_1);
0066ab5a          uint32_t nHeight = arg1->nHeight;
0066ab5a          
0066ab5f          if (nHeight > 0)
0066ab5f          {
0066ab65              uint32_t nWidth = arg1->nWidth;
0066ab68              uint32_t iStride = arg1->cDstArgs.iStride;
0066ab73              uint32_t nHeight_2 = nHeight;
0066ac77              bool cond:1_1;
0066ac77              
0066ac77              do
0066ac77              {
0066ab80                  uint32_t i_1 = nWidth;
0066ab80                  
0066ab86                  if (i_1 > 0)
0066ab86                  {
0066ab8c                      uint32_t ebx_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
0066ab8c                      
0066ac62                      do
0066ac62                      {
0066ab93                          i_1 -= 1;
0066ab9a                          uint32_t eax_1 = ebx_1;
0066ab9a                          
0066ab9c                          if (esi_1 != 0x100)
0066ab9c                          {
0066aba1                              int32_t eax_3;
0066aba1                              char edx_1;
0066aba1                              edx_1 = HIGHD(((int64_t)(eax_1 * esi_1)));
0066aba1                              eax_3 = LOWD(((int64_t)(eax_1 * esi_1)));
0066abaa                              eax_1 = ((eax_3 + ((uint32_t)edx_1)) >> 8);
0066ab9c                          }
0066ab9c                          
0066abaf                          if (eax_1 != 0)
0066abaf                          {
0066abbd                              int32_t edx_3 = *(uint32_t*)(__inner1_1 + (i_1 << 2));
0066abc3                              st5 = 0;
0066abc6                              st2 = _m_punpckhwd(0xffffff, 0);
0066abcf                              st1 = _m_punpckhwd(((uint64_t)edx_3), 0);
0066abd5                              st0 = (st1 & st2);
0066abde                              st3 = _m_psllqi(st0, 0x10);
0066abe2                              st4 = _m_pcmpgtw(st0, st3);
0066abee                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066abf7                              st3 = _m_psrlqi(st0, 0x20);
0066ac02                              st3 |= _m_psllqi(st0, 0x20);
0066ac08                              st4 = _m_pcmpgtw(st0, st3);
0066ac26                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066ac26                              
0066ac29                              if (eax_1 != 0xff)
0066ac29                              {
0066ac2b                                  st2 = ((uint64_t)(eax_1 + 1));
0066ac31                                  st3 = _m_punpcklwd(st2, st2);
0066ac3a                                  st2 = _m_punpcklwd(st3, st3);
0066ac40                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066ac54                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066ac29                              }
0066ac29                              
0066ac5d                              *(uint32_t*)(__inner1_1 + (i_1 << 2)) = _m_packuswb(st0, 0);
0066abaf                          }
0066ac62                      } while (i_1 > 0);
0066ab86                  }
0066ab86                  
0066ac70                  __inner1_1 += iStride;
0066ac72                  cond:1_1 = nHeight_2 != 1;
0066ac73                  nHeight_2 -= 1;
0066ac77              } while (cond:1_1);
0066ab5f          }
0066ab44      }
0066ab30  }

0066ab79                                                                             8d a4 24 00 00 00 00                           ..$....
0066aca9                             8d a4 24 00 00 00 00                                                           ..$....
0066ad93                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0066ada0  void ColoringLoopNoScale<&BlitOp_Grayscale<BlitFormat_Fill,BlitFormat_RGB>,BlitFormat_Fill,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066ada0  {
0066adb1      union __inner1 = arg1->cDstArgs.__inner1;
0066adb4      int32_t ebx;
0066adb4      int32_t var_20 = ebx;
0066adb7      uint64_t st0;
0066adb7      uint64_t st1;
0066adb7      uint64_t st2;
0066adb7      int64_t st3;
0066adb7      uint64_t st4;
0066adb7      int80_t st5;
0066adb7      
0066adb7      if (arg1->cSrcArgs.__inner1 == 0)
0066adb7      {
0066af29          union ecx;
0066af29          *(uint8_t*)((char*)ecx + 0) = arg1->i8AlphaModifier;
0066af30          uint32_t nHeight_1 = arg1->nHeight;
0066af35          union __inner1_2 = __inner1;
0066af35          
0066af39          if (nHeight_1 > 0)
0066af39          {
0066af3f              uint32_t nWidth_1 = arg1->nWidth;
0066af42              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066af49              uint32_t nHeight_2 = nHeight_1;
0066b068              bool cond:2_1;
0066b068              
0066b068              do
0066b068              {
0066af52                  if (nWidth_1 > 0)
0066af52                  {
0066af58                      uint32_t esi_2 = ((uint32_t)*(uint8_t*)((char*)ecx + 0));
0066af60                      char* eax_10 = (((nWidth_1 * 3) + __inner1) + 2);
0066af64                      uint32_t edx_4 = nWidth_1;
0066b04b                      uint32_t i;
0066b04b                      
0066b04b                      do
0066b04b                      {
0066af68                          eax_10 -= 3;
0066af68                          
0066af6d                          if (esi_2 != 0)
0066af6d                          {
0066af73                              ebx = eax_10[0xfffffffe];
0066af76                              char var_1c_2 = ebx;
0066af7a                              ebx = eax_10[0xffffffff];
0066af7d                              char var_1b_2 = ebx;
0066af81                              ebx = *(uint8_t*)eax_10;
0066af83                              char var_1a_2 = ebx;
0066af92                              char var_19_2 = 0xff;
0066af9f                              st5 = 0;
0066afa2                              st2 = _m_punpckhwd(0xffffff, 0);
0066afa5                              st1 = _m_punpckhwd(((uint64_t)var_1c_2), 0);
0066afab                              st0 = (st1 & st2);
0066afb4                              st3 = _m_psllqi(st0, 0x10);
0066afb8                              st4 = _m_pcmpgtw(st0, st3);
0066afc4                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066afcd                              st3 = _m_psrlqi(st0, 0x20);
0066afd8                              st3 |= _m_psllqi(st0, 0x20);
0066afde                              st4 = _m_pcmpgtw(st0, st3);
0066affd                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066affd                              
0066b000                              if (esi_2 != 0xff)
0066b000                              {
0066b002                                  st2 = ((uint64_t)(esi_2 + 1));
0066b008                                  st3 = _m_punpcklwd(st2, st2);
0066b011                                  st2 = _m_punpcklwd(st3, st3);
0066b017                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066b02b                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066b000                              }
0066b000                              
0066b031                              int32_t ecx_9 = _m_packuswb(st0, 0);
0066b034                              var_1c_2 = ecx_9;
0066b038                              eax_10[0xfffffffe] = ecx_9;
0066b03e                              eax_10[0xffffffff] = ((int8_t)(ecx_9 >> 8));
0066b048                              *(uint8_t*)eax_10 = ((int8_t)(var_1c_2 >> 0x10));
0066af6d                          }
0066af6d                          
0066b04a                          i = edx_4;
0066b04a                          edx_4 -= 1;
0066b04b                      } while (i != 1);
0066af52                  }
0066af52                  
0066b05d                  __inner1 = (__inner1_2 - iStride_1);
0066b05f                  cond:2_1 = nHeight_2 != 1;
0066b060                  __inner1_2 = __inner1;
0066b064                  nHeight_2 -= 1;
0066b068              } while (cond:2_1);
0066af39          }
0066adb7      }
0066adb7      else
0066adb7      {
0066adbd          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066adc5          int32_t ecx_1;
0066adc5          ecx_1 = i8AlphaModifier != 0;
0066adc8          union __inner1_1 = __inner1;
0066adcc          int32_t esi_1 = (i8AlphaModifier + ecx_1);
0066adce          uint32_t nHeight = arg1->nHeight;
0066adce          
0066add3          if (nHeight > 0)
0066add3          {
0066add9              uint32_t nWidth = arg1->nWidth;
0066addc              uint32_t iStride = arg1->cDstArgs.iStride;
0066ade3              uint32_t nHeight_3 = nHeight;
0066af1e              bool cond:3_1;
0066af1e              
0066af1e              do
0066af1e              {
0066ade9                  if (nWidth > 0)
0066ade9                  {
0066adef                      uint32_t edi_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
0066adf9                      char* ecx_3 = (((nWidth * 3) + __inner1) + 2);
0066adfd                      uint32_t var_14_1 = nWidth;
0066af01                      uint32_t i_1;
0066af01                      
0066af01                      do
0066af01                      {
0066ae01                          ecx_3 -= 3;
0066ae0a                          uint32_t eax_1 = edi_1;
0066ae0a                          
0066ae0c                          if (esi_1 != 0x100)
0066ae0c                          {
0066ae11                              int32_t eax_3;
0066ae11                              char edx;
0066ae11                              edx = HIGHD(((int64_t)(eax_1 * esi_1)));
0066ae11                              eax_3 = LOWD(((int64_t)(eax_1 * esi_1)));
0066ae1a                              eax_1 = ((eax_3 + ((uint32_t)edx)) >> 8);
0066ae0c                          }
0066ae0c                          
0066ae1f                          if (eax_1 != 0)
0066ae1f                          {
0066ae25                              *(uint8_t*)((char*)__inner1 + 0) = ecx_3[0xfffffffe];
0066ae28                              char var_1c_1 = *(uint8_t*)((char*)__inner1 + 0);
0066ae2c                              *(uint8_t*)((char*)__inner1 + 0) = ecx_3[0xffffffff];
0066ae2f                              char var_1b_1 = *(uint8_t*)((char*)__inner1 + 0);
0066ae33                              *(uint8_t*)((char*)__inner1 + 0) = *(uint8_t*)ecx_3;
0066ae35                              char var_1a_1 = *(uint8_t*)((char*)__inner1 + 0);
0066ae44                              char var_19_1 = 0xff;
0066ae51                              st5 = 0;
0066ae54                              st2 = _m_punpckhwd(0xffffff, 0);
0066ae57                              st1 = _m_punpckhwd(((uint64_t)var_1c_1), 0);
0066ae5d                              st0 = (st1 & st2);
0066ae66                              st3 = _m_psllqi(st0, 0x10);
0066ae6a                              st4 = _m_pcmpgtw(st0, st3);
0066ae76                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066ae7f                              st3 = _m_psrlqi(st0, 0x20);
0066ae8a                              st3 |= _m_psllqi(st0, 0x20);
0066ae90                              st4 = _m_pcmpgtw(st0, st3);
0066aeae                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066aeae                              
0066aeb1                              if (eax_1 != 0xff)
0066aeb1                              {
0066aeb3                                  st2 = ((uint64_t)(eax_1 + 1));
0066aeb9                                  st3 = _m_punpcklwd(st2, st2);
0066aec2                                  st2 = _m_punpcklwd(st3, st3);
0066aec8                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066aedc                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066aeb1                              }
0066aeb1                              
0066aee2                              int32_t eax_6 = _m_packuswb(st0, 0);
0066aee7                              var_1c_1 = eax_6;
0066aeeb                              ecx_3[0xfffffffe] = eax_6;
0066aef8                              ecx_3[0xffffffff] = ((int8_t)(eax_6 >> 8));
0066aefb                              *(uint8_t*)ecx_3 = *(uint8_t*)((char*)(var_1c_1 >> 0x10) + 0);
0066ae1f                          }
0066ae1f                          
0066aefd                          i_1 = var_14_1;
0066aefd                          var_14_1 -= 1;
0066af01                      } while (i_1 != 1);
0066ade9                  }
0066ade9                  
0066af13                  __inner1 = (__inner1_1 + iStride);
0066af15                  cond:3_1 = nHeight_3 != 1;
0066af16                  __inner1_1 = __inner1;
0066af1a                  nHeight_3 -= 1;
0066af1e              } while (cond:3_1);
0066add3          }
0066adb7      }
0066ada0  }

0066b077                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066b080  void ColoringLoopNoScale<&BlitOp_Grayscale<BlitFormat_A,BlitFormat_ARGB>,BlitFormat_A,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066b080  {
0066b08c      union __inner1 = arg1->cSrcArgs.__inner1;
0066b094      uint64_t st0;
0066b094      uint64_t st1;
0066b094      uint64_t st2;
0066b094      int64_t st3;
0066b094      uint64_t st4;
0066b094      int80_t st5;
0066b094      
0066b094      if (__inner1 == 0)
0066b094      {
0066b1eb          *(uint8_t*)((char*)__inner1 + 0) = arg1->i8AlphaModifier;
0066b1ee          union __inner1_1 = arg1->cDstArgs.__inner1;
0066b1f5          uint32_t nHeight_1 = arg1->nHeight;
0066b1f5          
0066b1fa          if (nHeight_1 > 0)
0066b1fa          {
0066b200              uint32_t nWidth_1 = arg1->nWidth;
0066b203              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066b20e              uint32_t edi_1 = nHeight_1;
0066b2e4              uint32_t i;
0066b2e4              
0066b2e4              do
0066b2e4              {
0066b210                  uint32_t j = nWidth_1;
0066b210                  
0066b216                  if (j > 0)
0066b216                  {
0066b21c                      uint32_t esi_2 = ((uint32_t)*(uint8_t*)((char*)__inner1 + 0));
0066b21c                      
0066b2d9                      do
0066b2d9                      {
0066b223                          j -= 1;
0066b223                          
0066b226                          if (esi_2 != 0)
0066b226                          {
0066b234                              int32_t ebx_1 = *(uint32_t*)(__inner1_1 + (j << 2));
0066b23a                              st5 = 0;
0066b23d                              st2 = _m_punpckhwd(0xffffff, 0);
0066b246                              st1 = _m_punpckhwd(((uint64_t)ebx_1), 0);
0066b24c                              st0 = (st1 & st2);
0066b255                              st3 = _m_psllqi(st0, 0x10);
0066b259                              st4 = _m_pcmpgtw(st0, st3);
0066b265                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066b26e                              st3 = _m_psrlqi(st0, 0x20);
0066b279                              st3 |= _m_psllqi(st0, 0x20);
0066b27f                              st4 = _m_pcmpgtw(st0, st3);
0066b29d                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066b29d                              
0066b2a0                              if (esi_2 != 0xff)
0066b2a0                              {
0066b2a2                                  st2 = ((uint64_t)(esi_2 + 1));
0066b2a8                                  st3 = _m_punpcklwd(st2, st2);
0066b2b1                                  st2 = _m_punpcklwd(st3, st3);
0066b2b7                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066b2cb                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066b2a0                              }
0066b2a0                              
0066b2d4                              *(uint32_t*)(__inner1_1 + (j << 2)) = _m_packuswb(st0, 0);
0066b226                          }
0066b2d9                      } while (j > 0);
0066b216                  }
0066b216                  
0066b2df                  __inner1_1 -= iStride_1;
0066b2e3                  i = edi_1;
0066b2e3                  edi_1 -= 1;
0066b2e4              } while (i != 1);
0066b1fa          }
0066b094      }
0066b094      else
0066b094      {
0066b09a          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066b09e          union __inner1_2 = arg1->cDstArgs.__inner1;
0066b0a1          union __inner1_3 = __inner1;
0066b0a7          int32_t ecx;
0066b0a7          ecx = i8AlphaModifier != 0;
0066b0aa          int32_t esi_1 = (i8AlphaModifier + ecx);
0066b0ac          uint32_t nHeight = arg1->nHeight;
0066b0ac          
0066b0b1          if (nHeight > 0)
0066b0b1          {
0066b0b7              uint32_t nWidth = arg1->nWidth;
0066b0be              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
0066b0c1              uint32_t iStride = arg1->cDstArgs.iStride;
0066b0cc              uint32_t nHeight_2 = nHeight;
0066b1e0              bool cond:1_1;
0066b1e0              
0066b1e0              do
0066b1e0              {
0066b0d0                  uint32_t i_1 = nWidth;
0066b0d0                  
0066b0d6                  while (i_1 > 0)
0066b0d6                  {
0066b0e0                      uint32_t edx_1 = ((uint32_t)*(uint8_t*)((i_1 + __inner1_3) - 1));
0066b0ea                      i_1 -= 1;
0066b0ee                      int32_t edx_3 = ((edx_1 << 0x18) | g_SourceColor.__inner0);
0066b0f2                      uint32_t eax_3 = (edx_3 >> 0x18);
0066b0fb                      int32_t var_10_1 = edx_3;
0066b0fb                      
0066b0ff                      if (esi_1 != 0x100)
0066b0ff                      {
0066b104                          int32_t eax_5;
0066b104                          char edx_4;
0066b104                          edx_4 = HIGHD(((int64_t)(eax_3 * esi_1)));
0066b104                          eax_5 = LOWD(((int64_t)(eax_3 * esi_1)));
0066b10d                          eax_3 = ((eax_5 + ((uint32_t)edx_4)) >> 8);
0066b0ff                      }
0066b0ff                      
0066b112                      if (eax_3 != 0)
0066b112                      {
0066b120                          int32_t edx_6 = *(uint32_t*)(__inner1_2 + (i_1 << 2));
0066b126                          st5 = 0;
0066b129                          st2 = _m_punpckhwd(0xffffff, 0);
0066b132                          st1 = _m_punpckhwd(((uint64_t)edx_6), 0);
0066b138                          st0 = (st1 & st2);
0066b141                          st3 = _m_psllqi(st0, 0x10);
0066b145                          st4 = _m_pcmpgtw(st0, st3);
0066b151                          st0 = ((st0 & st4) | (st4 & !(st3)));
0066b15a                          st3 = _m_psrlqi(st0, 0x20);
0066b165                          st3 |= _m_psllqi(st0, 0x20);
0066b16b                          st4 = _m_pcmpgtw(st0, st3);
0066b189                          st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066b189                          
0066b18c                          if (eax_3 != 0xff)
0066b18c                          {
0066b18e                              st2 = ((uint64_t)(eax_3 + 1));
0066b194                              st3 = _m_punpcklwd(st2, st2);
0066b19d                              st2 = _m_punpcklwd(st3, st3);
0066b1a3                              st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066b1b7                              st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066b18c                          }
0066b18c                          
0066b1c0                          *(uint32_t*)(__inner1_2 + (i_1 << 2)) = _m_packuswb(st0, 0);
0066b112                      }
0066b0d6                  }
0066b0d6                  
0066b1d7                  __inner1_3 += iStride_2;
0066b1d9                  __inner1_2 += iStride;
0066b1db                  cond:1_1 = nHeight_2 != 1;
0066b1dc                  nHeight_2 -= 1;
0066b1e0              } while (cond:1_1);
0066b0b1          }
0066b094      }
0066b080  }

0066b2f3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0066b300  void ColoringLoopNoScale<&BlitOp_Grayscale<BlitFormat_A,BlitFormat_RGB>,BlitFormat_A,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066b300  {
0066b30c      union __inner1 = arg1->cSrcArgs.__inner1;
0066b311      union __inner1_1 = arg1->cDstArgs.__inner1;
0066b314      int32_t ebx;
0066b314      int32_t var_28 = ebx;
0066b317      uint64_t st0;
0066b317      uint64_t st1;
0066b317      uint64_t st2;
0066b317      int64_t st3;
0066b317      uint64_t st4;
0066b317      int80_t st5;
0066b317      
0066b317      if (__inner1 == 0)
0066b317      {
0066b4b3          *(uint8_t*)((char*)__inner1 + 0) = arg1->i8AlphaModifier;
0066b4ba          uint32_t nHeight_1 = arg1->nHeight;
0066b4bf          union __inner1_3 = __inner1_1;
0066b4bf          
0066b4c3          if (nHeight_1 > 0)
0066b4c3          {
0066b4c9              uint32_t nWidth_1 = arg1->nWidth;
0066b4cc              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066b4d3              uint32_t nHeight_2 = nHeight_1;
0066b5f2              bool cond:2_1;
0066b5f2              
0066b5f2              do
0066b5f2              {
0066b4d9                  if (nWidth_1 > 0)
0066b4d9                  {
0066b4df                      uint32_t esi_1 = ((uint32_t)*(uint8_t*)((char*)__inner1 + 0));
0066b4e7                      char* eax_12 = (((nWidth_1 * 3) + __inner1_1) + 2);
0066b4eb                      uint32_t edx_9 = nWidth_1;
0066b5d5                      uint32_t i;
0066b5d5                      
0066b5d5                      do
0066b5d5                      {
0066b4f2                          eax_12 -= 3;
0066b4f2                          
0066b4f7                          if (esi_1 != 0)
0066b4f7                          {
0066b4fd                              ebx = eax_12[0xfffffffe];
0066b500                              char var_24_2 = ebx;
0066b504                              ebx = eax_12[0xffffffff];
0066b507                              char var_23_2 = ebx;
0066b50b                              ebx = *(uint8_t*)eax_12;
0066b50d                              char var_22_2 = ebx;
0066b51c                              char var_21_2 = 0xff;
0066b529                              st5 = 0;
0066b52c                              st2 = _m_punpckhwd(0xffffff, 0);
0066b52f                              st1 = _m_punpckhwd(((uint64_t)var_24_2), 0);
0066b535                              st0 = (st1 & st2);
0066b53e                              st3 = _m_psllqi(st0, 0x10);
0066b542                              st4 = _m_pcmpgtw(st0, st3);
0066b54e                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066b557                              st3 = _m_psrlqi(st0, 0x20);
0066b562                              st3 |= _m_psllqi(st0, 0x20);
0066b568                              st4 = _m_pcmpgtw(st0, st3);
0066b587                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066b587                              
0066b58a                              if (esi_1 != 0xff)
0066b58a                              {
0066b58c                                  st2 = ((uint64_t)(esi_1 + 1));
0066b592                                  st3 = _m_punpcklwd(st2, st2);
0066b59b                                  st2 = _m_punpcklwd(st3, st3);
0066b5a1                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066b5b5                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066b58a                              }
0066b58a                              
0066b5bb                              int32_t ecx_8 = _m_packuswb(st0, 0);
0066b5be                              var_24_2 = ecx_8;
0066b5c2                              eax_12[0xfffffffe] = ecx_8;
0066b5c8                              eax_12[0xffffffff] = ((int8_t)(ecx_8 >> 8));
0066b5d2                              *(uint8_t*)eax_12 = ((int8_t)(var_24_2 >> 0x10));
0066b4f7                          }
0066b4f7                          
0066b5d4                          i = edx_9;
0066b5d4                          edx_9 -= 1;
0066b5d5                      } while (i != 1);
0066b4d9                  }
0066b4d9                  
0066b5e7                  __inner1_1 = (__inner1_3 - iStride_1);
0066b5e9                  cond:2_1 = nHeight_2 != 1;
0066b5ea                  __inner1_3 = __inner1_1;
0066b5ee                  nHeight_2 -= 1;
0066b5f2              } while (cond:2_1);
0066b4c3          }
0066b317      }
0066b317      else
0066b317      {
0066b31d          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066b321          union __inner1_4 = __inner1;
0066b327          int32_t ecx;
0066b327          ecx = i8AlphaModifier != 0;
0066b32a          union __inner1_2 = __inner1_1;
0066b32e          int32_t edi_1 = (i8AlphaModifier + ecx);
0066b330          uint32_t nHeight = arg1->nHeight;
0066b330          
0066b335          if (nHeight > 0)
0066b335          {
0066b33b              uint32_t nWidth = arg1->nWidth;
0066b342              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
0066b345              uint32_t iStride = arg1->cDstArgs.iStride;
0066b350              uint32_t nHeight_3 = nHeight;
0066b4a8              bool cond:3_1;
0066b4a8              
0066b4a8              do
0066b4a8              {
0066b354                  uint32_t i_1 = nWidth;
0066b354                  
0066b35a                  if (i_1 > 0)
0066b35a                  {
0066b363                      char* ecx_2 = (((i_1 * 3) + __inner1_1) + 2);
0066b363                      
0066b485                      do
0066b485                      {
0066b370                          uint32_t edx = ((uint32_t)*(uint8_t*)((i_1 + __inner1_4) - 1));
0066b37a                          i_1 -= 1;
0066b37e                          uint32_t edx_2 = ((edx << 0x18) | g_SourceColor.__inner0);
0066b382                          ecx_2 -= 3;
0066b385                          uint32_t eax_3 = (edx_2 >> 0x18);
0066b38e                          uint32_t var_10_1 = edx_2;
0066b38e                          
0066b392                          if (edi_1 != 0x100)
0066b392                          {
0066b397                              int32_t eax_5;
0066b397                              char edx_3;
0066b397                              edx_3 = HIGHD(((int64_t)(eax_3 * edi_1)));
0066b397                              eax_5 = LOWD(((int64_t)(eax_3 * edi_1)));
0066b3a0                              eax_3 = ((eax_5 + ((uint32_t)edx_3)) >> 8);
0066b392                          }
0066b392                          
0066b3a5                          if (eax_3 != 0)
0066b3a5                          {
0066b3ab                              edx_2 = ecx_2[0xfffffffe];
0066b3ae                              char var_24_1 = edx_2;
0066b3b2                              edx_2 = ecx_2[0xffffffff];
0066b3b5                              char var_23_1 = edx_2;
0066b3b9                              edx_2 = *(uint8_t*)ecx_2;
0066b3bb                              char var_22_1 = edx_2;
0066b3ca                              char var_21_1 = 0xff;
0066b3d7                              st5 = 0;
0066b3da                              st2 = _m_punpckhwd(0xffffff, 0);
0066b3dd                              st1 = _m_punpckhwd(((uint64_t)var_24_1), 0);
0066b3e3                              st0 = (st1 & st2);
0066b3ec                              st3 = _m_psllqi(st0, 0x10);
0066b3f0                              st4 = _m_pcmpgtw(st0, st3);
0066b3fc                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066b405                              st3 = _m_psrlqi(st0, 0x20);
0066b410                              st3 |= _m_psllqi(st0, 0x20);
0066b416                              st4 = _m_pcmpgtw(st0, st3);
0066b434                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066b434                              
0066b437                              if (eax_3 != 0xff)
0066b437                              {
0066b439                                  st2 = ((uint64_t)(eax_3 + 1));
0066b43f                                  st3 = _m_punpcklwd(st2, st2);
0066b448                                  st2 = _m_punpcklwd(st3, st3);
0066b44e                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066b462                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066b437                              }
0066b437                              
0066b468                              int32_t eax_8 = _m_packuswb(st0, 0);
0066b46d                              var_24_1 = eax_8;
0066b471                              ecx_2[0xfffffffe] = eax_8;
0066b47e                              ecx_2[0xffffffff] = ((int8_t)(eax_8 >> 8));
0066b481                              *(uint8_t*)ecx_2 = ((int8_t)(var_24_1 >> 0x10));
0066b3a5                          }
0066b485                      } while (i_1 > 0);
0066b35a                  }
0066b35a                  
0066b497                  __inner1_4 += iStride_2;
0066b49d                  __inner1_1 = (__inner1_2 + iStride);
0066b49f                  cond:3_1 = nHeight_3 != 1;
0066b4a0                  __inner1_2 = __inner1_1;
0066b4a4                  nHeight_3 -= 1;
0066b4a8              } while (cond:3_1);
0066b335          }
0066b317      }
0066b300  }

0066b369                             8d a4 24 00 00 00 00                                                           ..$....
0066b601     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

0066b610  void ColoringLoopNoScale<&BlitOp_Grayscale<BlitFormat_AXXX,BlitFormat_ARGB>,BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066b610  {
0066b61c      union __inner1 = arg1->cSrcArgs.__inner1;
0066b621      union __inner1_1 = arg1->cDstArgs.__inner1;
0066b627      uint64_t st0;
0066b627      uint64_t st1;
0066b627      uint64_t st2;
0066b627      int64_t st3;
0066b627      uint64_t st4;
0066b627      int80_t st5;
0066b627      
0066b627      if (__inner1 == 0)
0066b627      {
0066b7ab          *(uint8_t*)((char*)__inner1 + 0) = arg1->i8AlphaModifier;
0066b7b2          uint32_t nHeight_1 = arg1->nHeight;
0066b7b2          
0066b7b7          if (nHeight_1 > 0)
0066b7b7          {
0066b7bd              uint32_t nWidth_1 = arg1->nWidth;
0066b7c0              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066b7cb              uint32_t edi_2 = nHeight_1;
0066b8a4              uint32_t i;
0066b8a4              
0066b8a4              do
0066b8a4              {
0066b7d0                  uint32_t j = nWidth_1;
0066b7d0                  
0066b7d6                  if (j > 0)
0066b7d6                  {
0066b7dc                      uint32_t esi_3 = ((uint32_t)*(uint8_t*)((char*)__inner1 + 0));
0066b7dc                      
0066b899                      do
0066b899                      {
0066b7e3                          j -= 1;
0066b7e3                          
0066b7e6                          if (esi_3 != 0)
0066b7e6                          {
0066b7f4                              int32_t ebx_2 = *(uint32_t*)(__inner1_1 + (j << 2));
0066b7fa                              st5 = 0;
0066b7fd                              st2 = _m_punpckhwd(0xffffff, 0);
0066b806                              st1 = _m_punpckhwd(((uint64_t)ebx_2), 0);
0066b80c                              st0 = (st1 & st2);
0066b815                              st3 = _m_psllqi(st0, 0x10);
0066b819                              st4 = _m_pcmpgtw(st0, st3);
0066b825                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066b82e                              st3 = _m_psrlqi(st0, 0x20);
0066b839                              st3 |= _m_psllqi(st0, 0x20);
0066b83f                              st4 = _m_pcmpgtw(st0, st3);
0066b85d                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066b85d                              
0066b860                              if (esi_3 != 0xff)
0066b860                              {
0066b862                                  st2 = ((uint64_t)(esi_3 + 1));
0066b868                                  st3 = _m_punpcklwd(st2, st2);
0066b871                                  st2 = _m_punpcklwd(st3, st3);
0066b877                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066b88b                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066b860                              }
0066b860                              
0066b894                              *(uint32_t*)(__inner1_1 + (j << 2)) = _m_packuswb(st0, 0);
0066b7e6                          }
0066b899                      } while (j > 0);
0066b7d6                  }
0066b7d6                  
0066b89f                  __inner1_1 -= iStride_1;
0066b8a3                  i = edi_2;
0066b8a3                  edi_2 -= 1;
0066b8a4              } while (i != 1);
0066b7b7          }
0066b627      }
0066b627      else
0066b627      {
0066b62d          uint32_t i8AlphaModifier = ((uint32_t)arg1->i8AlphaModifier);
0066b631          union __inner1_2 = __inner1;
0066b639          int32_t ecx;
0066b639          ecx = i8AlphaModifier != 0;
0066b63c          union __inner1_3 = __inner1_1;
0066b640          int32_t edi_1 = (i8AlphaModifier + ecx);
0066b642          uint32_t nHeight = arg1->nHeight;
0066b642          
0066b647          if (nHeight > 0)
0066b647          {
0066b64d              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
0066b650              uint32_t nWidth = arg1->nWidth;
0066b653              uint32_t iStride = arg1->cDstArgs.iStride;
0066b660              uint32_t nWidth_2 = nWidth;
0066b668              uint32_t nHeight_2 = nHeight;
0066b7a0              bool cond:1_1;
0066b7a0              
0066b7a0              do
0066b7a0              {
0066b672                  if (nWidth > 0)
0066b672                  {
0066b678                      int32_t* ecx_1 = (__inner1_1 + (nWidth << 2));
0066b685                      uint32_t i_2 = nWidth_2;
0066b771                      uint32_t i_1;
0066b771                      
0066b771                      do
0066b771                      {
0066b690                          int32_t eax_1 = *(uint32_t*)(((__inner1_2 - __inner1_1) + ecx_1) - 4);
0066b694                          ecx_1 -= 4;
0066b69c                          int32_t eax_3 = ((eax_1 & 0xff000000) | g_SourceColor.__inner0);
0066b69e                          int32_t var_10_1 = eax_3;
0066b6a2                          uint32_t eax_4 = (eax_3 >> 0x18);
0066b6a2                          
0066b6ab                          if (edi_1 != 0x100)
0066b6ab                          {
0066b6b0                              int32_t eax_6;
0066b6b0                              char edx_1;
0066b6b0                              edx_1 = HIGHD(((int64_t)(eax_4 * edi_1)));
0066b6b0                              eax_6 = LOWD(((int64_t)(eax_4 * edi_1)));
0066b6b9                              eax_4 = ((eax_6 + ((uint32_t)edx_1)) >> 8);
0066b6ab                          }
0066b6ab                          
0066b6be                          if (eax_4 != 0)
0066b6be                          {
0066b6cc                              int32_t edx_3 = *(uint32_t*)ecx_1;
0066b6d1                              st5 = 0;
0066b6d4                              st2 = _m_punpckhwd(0xffffff, 0);
0066b6dd                              st1 = _m_punpckhwd(((uint64_t)edx_3), 0);
0066b6e3                              st0 = (st1 & st2);
0066b6ec                              st3 = _m_psllqi(st0, 0x10);
0066b6f0                              st4 = _m_pcmpgtw(st0, st3);
0066b6fc                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066b705                              st3 = _m_psrlqi(st0, 0x20);
0066b710                              st3 |= _m_psllqi(st0, 0x20);
0066b716                              st4 = _m_pcmpgtw(st0, st3);
0066b734                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066b734                              
0066b737                              if (eax_4 != 0xff)
0066b737                              {
0066b739                                  st2 = ((uint64_t)(eax_4 + 1));
0066b73f                                  st3 = _m_punpcklwd(st2, st2);
0066b748                                  st2 = _m_punpcklwd(st3, st3);
0066b74e                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066b762                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066b737                              }
0066b737                              
0066b76b                              *(uint32_t*)ecx_1 = _m_packuswb(st0, 0);
0066b6be                          }
0066b6be                          
0066b76d                          i_1 = i_2;
0066b76d                          i_2 -= 1;
0066b771                      } while (i_1 != 1);
0066b777                      __inner1_1 = __inner1_3;
0066b77b                      nWidth = nWidth_2;
0066b672                  }
0066b672                  
0066b78d                  __inner1_2 += iStride_2;
0066b795                  __inner1_1 += iStride;
0066b797                  cond:1_1 = nHeight_2 != 1;
0066b798                  __inner1_3 = __inner1_1;
0066b79c                  nHeight_2 -= 1;
0066b7a0              } while (cond:1_1);
0066b647          }
0066b627      }
0066b610  }

0066b8b3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

0066b8c0  void ColoringLoopNoScale<&BlitOp_Grayscale<BlitFormat_AXXX,BlitFormat_RGB>,BlitFormat_AXXX,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066b8c0  {
0066b8cc      union __inner1 = arg1->cDstArgs.__inner1;
0066b8d0      union __inner1_1 = arg1->cSrcArgs.__inner1;
0066b8d7      uint64_t st0;
0066b8d7      uint64_t st1;
0066b8d7      uint64_t st2;
0066b8d7      int64_t st3;
0066b8d7      uint64_t st4;
0066b8d7      int80_t st5;
0066b8d7      
0066b8d7      if (__inner1_1 == 0)
0066b8d7      {
0066ba6a          uint8_t i8AlphaModifier = arg1->i8AlphaModifier;
0066ba71          uint32_t nHeight_1 = arg1->nHeight;
0066ba76          union __inner1_3 = __inner1;
0066ba76          
0066ba7a          if (nHeight_1 > 0)
0066ba7a          {
0066ba80              uint32_t nWidth_1 = arg1->nWidth;
0066ba83              uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066ba8a              uint32_t nHeight_2 = nHeight_1;
0066bba8              bool cond:2_1;
0066bba8              
0066bba8              do
0066bba8              {
0066ba92                  if (nWidth_1 > 0)
0066ba92                  {
0066ba98                      uint32_t i8AlphaModifier_2 = ((uint32_t)i8AlphaModifier);
0066baa0                      char* eax_12 = (((nWidth_1 * 3) + __inner1) + 2);
0066baa4                      uint32_t edx_9 = nWidth_1;
0066bb8b                      uint32_t i;
0066bb8b                      
0066bb8b                      do
0066bb8b                      {
0066baa8                          eax_12 -= 3;
0066baa8                          
0066baad                          if (i8AlphaModifier_2 != 0)
0066baad                          {
0066bab3                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_12[0xfffffffe];
0066bab6                              char var_24_2 = *(uint8_t*)((char*)__inner1_1 + 0);
0066baba                              *(uint8_t*)((char*)__inner1_1 + 0) = eax_12[0xffffffff];
0066babd                              char var_23_2 = *(uint8_t*)((char*)__inner1_1 + 0);
0066bac1                              *(uint8_t*)((char*)__inner1_1 + 0) = *(uint8_t*)eax_12;
0066bac3                              char var_22_2 = *(uint8_t*)((char*)__inner1_1 + 0);
0066bad2                              char var_21_2 = 0xff;
0066badf                              st5 = 0;
0066bae2                              st2 = _m_punpckhwd(0xffffff, 0);
0066bae5                              st1 = _m_punpckhwd(((uint64_t)var_24_2), 0);
0066baeb                              st0 = (st1 & st2);
0066baf4                              st3 = _m_psllqi(st0, 0x10);
0066baf8                              st4 = _m_pcmpgtw(st0, st3);
0066bb04                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066bb0d                              st3 = _m_psrlqi(st0, 0x20);
0066bb18                              st3 |= _m_psllqi(st0, 0x20);
0066bb1e                              st4 = _m_pcmpgtw(st0, st3);
0066bb3d                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066bb3d                              
0066bb40                              if (i8AlphaModifier_2 != 0xff)
0066bb40                              {
0066bb42                                  st2 = ((uint64_t)(i8AlphaModifier_2 + 1));
0066bb48                                  st3 = _m_punpcklwd(st2, st2);
0066bb51                                  st2 = _m_punpcklwd(st3, st3);
0066bb57                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066bb6b                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066bb40                              }
0066bb40                              
0066bb71                              int32_t ecx_7 = _m_packuswb(st0, 0);
0066bb74                              var_24_2 = ecx_7;
0066bb78                              eax_12[0xfffffffe] = ecx_7;
0066bb7e                              eax_12[0xffffffff] = ((int8_t)(ecx_7 >> 8));
0066bb88                              *(uint8_t*)eax_12 = ((int8_t)(var_24_2 >> 0x10));
0066baad                          }
0066baad                          
0066bb8a                          i = edx_9;
0066bb8a                          edx_9 -= 1;
0066bb8b                      } while (i != 1);
0066ba92                  }
0066ba92                  
0066bb9d                  __inner1 = (__inner1_3 - iStride_1);
0066bb9f                  cond:2_1 = nHeight_2 != 1;
0066bba0                  __inner1_3 = __inner1;
0066bba4                  nHeight_2 -= 1;
0066bba8              } while (cond:2_1);
0066ba7a          }
0066b8d7      }
0066b8d7      else
0066b8d7      {
0066b8dd          uint32_t i8AlphaModifier_1 = ((uint32_t)arg1->i8AlphaModifier);
0066b8e5          int32_t ecx;
0066b8e5          ecx = i8AlphaModifier_1 != 0;
0066b8e8          union __inner1_2 = __inner1;
0066b8ec          int32_t edi_1 = (i8AlphaModifier_1 + ecx);
0066b8ee          uint32_t nHeight = arg1->nHeight;
0066b8ee          
0066b8f3          if (nHeight > 0)
0066b8f3          {
0066b8f9              uint32_t nWidth = arg1->nWidth;
0066b900              uint32_t iStride_2 = arg1->cSrcArgs.iStride;
0066b903              uint32_t iStride = arg1->cDstArgs.iStride;
0066b90e              uint32_t nHeight_3 = nHeight;
0066ba5f              bool cond:3_1;
0066ba5f              
0066ba5f              do
0066ba5f              {
0066b912                  uint32_t i_1 = nWidth;
0066b912                  
0066b918                  if (i_1 > 0)
0066b918                  {
0066b921                      char* ecx_2 = (((i_1 * 3) + __inner1) + 2);
0066b921                      
0066ba3c                      do
0066ba3c                      {
0066b925                          int32_t edx = *(uint32_t*)((__inner1_1 + (i_1 << 2)) - 4);
0066b92e                          i_1 -= 1;
0066b935                          uint32_t edx_2 = ((edx & 0xff000000) | g_SourceColor.__inner0);
0066b939                          ecx_2 -= 3;
0066b93c                          uint32_t eax_3 = (edx_2 >> 0x18);
0066b945                          uint32_t var_10_1 = edx_2;
0066b945                          
0066b949                          if (edi_1 != 0x100)
0066b949                          {
0066b94e                              int32_t eax_5;
0066b94e                              char edx_3;
0066b94e                              edx_3 = HIGHD(((int64_t)(eax_3 * edi_1)));
0066b94e                              eax_5 = LOWD(((int64_t)(eax_3 * edi_1)));
0066b957                              eax_3 = ((eax_5 + ((uint32_t)edx_3)) >> 8);
0066b949                          }
0066b949                          
0066b95c                          if (eax_3 != 0)
0066b95c                          {
0066b962                              edx_2 = ecx_2[0xfffffffe];
0066b965                              char var_24_1 = edx_2;
0066b969                              edx_2 = ecx_2[0xffffffff];
0066b96c                              char var_23_1 = edx_2;
0066b970                              edx_2 = *(uint8_t*)ecx_2;
0066b972                              char var_22_1 = edx_2;
0066b981                              char var_21_1 = 0xff;
0066b98e                              st5 = 0;
0066b991                              st2 = _m_punpckhwd(0xffffff, 0);
0066b994                              st1 = _m_punpckhwd(((uint64_t)var_24_1), 0);
0066b99a                              st0 = (st1 & st2);
0066b9a3                              st3 = _m_psllqi(st0, 0x10);
0066b9a7                              st4 = _m_pcmpgtw(st0, st3);
0066b9b3                              st0 = ((st0 & st4) | (st4 & !(st3)));
0066b9bc                              st3 = _m_psrlqi(st0, 0x20);
0066b9c7                              st3 |= _m_psllqi(st0, 0x20);
0066b9cd                              st4 = _m_pcmpgtw(st0, st3);
0066b9eb                              st0 = ((((st0 & st4) | (st4 & !(st3))) & st2) | (st2 & !(st1)));
0066b9eb                              
0066b9ee                              if (eax_3 != 0xff)
0066b9ee                              {
0066b9f0                                  st2 = ((uint64_t)(eax_3 + 1));
0066b9f6                                  st3 = _m_punpcklwd(st2, st2);
0066b9ff                                  st2 = _m_punpcklwd(st3, st3);
0066ba05                                  st0 = _m_psrlwi(_m_pmullw(st0, st2), 8);
0066ba19                                  st0 = _m_psubw(st1, _m_psubw(_m_psrlwi(_m_pmullw(st1, st2), 8), st0));
0066b9ee                              }
0066b9ee                              
0066ba1f                              int32_t eax_8 = _m_packuswb(st0, 0);
0066ba24                              var_24_1 = eax_8;
0066ba28                              ecx_2[0xfffffffe] = eax_8;
0066ba35                              ecx_2[0xffffffff] = ((int8_t)(eax_8 >> 8));
0066ba38                              *(uint8_t*)ecx_2 = ((int8_t)(var_24_1 >> 0x10));
0066b95c                          }
0066ba3c                      } while (i_1 > 0);
0066b918                  }
0066b918                  
0066ba4e                  __inner1_1 += iStride_2;
0066ba54                  __inner1 = (__inner1_2 + iStride);
0066ba56                  cond:3_1 = nHeight_3 != 1;
0066ba57                  __inner1_2 = __inner1;
0066ba5b                  nHeight_3 -= 1;
0066ba5f              } while (cond:3_1);
0066b8f3          }
0066b8d7      }
0066b8c0  }

0066bbb7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066bbc0  void AlphaConvert<ACvtFormat_Fill,ACvtFormat_A>(struct AlphaConvertArgs const* arg1)

0066bbc0  {
0066bbc4      uint32_t nHeight = arg1->nHeight;
0066bbc9      union __inner1 = arg1->cDstArgs.__inner1;
0066bbcd      union __inner1_1 = arg1->cSrcArgs.__inner1;
0066bbcd      
0066bbd0      if (nHeight > 0)
0066bbd0      {
0066bbd3          uint32_t iStride = arg1->cSrcArgs.iStride;
0066bbd7          uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066bbde          arg1 = arg1->nWidth;
0066bbe2          uint32_t edi_2 = nHeight;
0066bbfd          uint32_t i;
0066bbfd          
0066bbfd          do
0066bbfd          {
0066bbe4              char* j = arg1;
0066bbe4              
0066bbea              if (j > 0)
0066bbea              {
0066bbec                  nHeight = *(uint8_t*)__inner1_1;
0066bbec                  
0066bbf6                  do
0066bbf6                  {
0066bbf0                      j -= 1;
0066bbf3                      j[__inner1] = nHeight;
0066bbf6                  } while (j > 0);
0066bbea              }
0066bbea              
0066bbf8              __inner1_1 += iStride;
0066bbfa              __inner1 += iStride_1;
0066bbfc              i = edi_2;
0066bbfc              edi_2 -= 1;
0066bbfd          } while (i != 1);
0066bbd0      }
0066bbc0  }

0066bc04              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

0066bc10  void AlphaConvert<ACvtFormat_Fill,ACvtFormat_AXXX>(struct AlphaConvertArgs const* arg1)

0066bc10  {
0066bc17      uint32_t nHeight = arg1->nHeight;
0066bc1a      int32_t ecx_1 = (arg1->cDstArgs.__inner1 + 3);
0066bc20      char* __inner1 = arg1->cSrcArgs.__inner1;
0066bc20      
0066bc23      if (nHeight > 0)
0066bc23      {
0066bc26          uint32_t iStride = arg1->cSrcArgs.iStride;
0066bc2a          uint32_t iStride_1 = arg1->cDstArgs.iStride;
0066bc31          arg1 = arg1->nWidth;
0066bc35          uint32_t edi_2 = nHeight;
0066bc4e          uint32_t i;
0066bc4e          
0066bc4e          do
0066bc4e          {
0066bc37              struct AlphaConvertArgs* j = arg1;
0066bc37              
0066bc3d              if (j > 0)
0066bc3d              {
0066bc3f                  nHeight = *(uint8_t*)__inner1;
0066bc3f                  
0066bc47                  do
0066bc47                  {
0066bc41                      j -= 1;
0066bc44                      *(uint8_t*)(ecx_1 + (j << 2)) = nHeight;
0066bc47                  } while (j > 0);
0066bc3d              }
0066bc3d              
0066bc49              __inner1 = &__inner1[iStride];
0066bc4b              ecx_1 += iStride_1;
0066bc4d              i = edi_2;
0066bc4d              edi_2 -= 1;
0066bc4e          } while (i != 1);
0066bc23      }
0066bc10  }

0066bc55                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0066bc60  void AlphaConvert<ACvtFormat_A,ACvtFormat_AXXX>(struct AlphaConvertArgs const* arg1)

0066bc60  {
0066bc67      uint32_t nHeight = arg1->nHeight;
0066bc6a      int32_t ecx_1 = (arg1->cDstArgs.__inner1 + 3);
0066bc70      union __inner1 = arg1->cSrcArgs.__inner1;
0066bc70      
0066bc73      if (nHeight > 0)
0066bc73      {
0066bc76          uint32_t iStride = arg1->cDstArgs.iStride;
0066bc7a          uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066bc81          arg1 = arg1->nWidth;
0066bc85          uint32_t edi_2 = nHeight;
0066bca1          uint32_t i;
0066bca1          
0066bca1          do
0066bca1          {
0066bc87              struct AlphaConvertArgs* j = arg1;
0066bc87              
0066bc8d              while (j > 0)
0066bc8d              {
0066bc90                  nHeight = *(uint8_t*)(((char*)j + __inner1) - 1);
0066bc94                  j -= 1;
0066bc97                  *(uint8_t*)(ecx_1 + (j << 2)) = nHeight;
0066bc8d              }
0066bc8d              
0066bc9c              __inner1 += iStride_1;
0066bc9e              ecx_1 += iStride;
0066bca0              i = edi_2;
0066bca0              edi_2 -= 1;
0066bca1          } while (i != 1);
0066bc73      }
0066bc60  }

0066bca8                          cc cc cc cc cc cc cc cc                                                          ........

0066bcb0  void AlphaConvert<ACvtFormat_AXXX,ACvtFormat_A>(struct AlphaConvertArgs const* arg1)

0066bcb0  {
0066bcb7      uint32_t nHeight = arg1->nHeight;
0066bcba      int32_t ecx_1 = (arg1->cSrcArgs.__inner1 + 3);
0066bcc0      union __inner1 = arg1->cDstArgs.__inner1;
0066bcc0      
0066bcc3      if (nHeight > 0)
0066bcc3      {
0066bcc6          uint32_t iStride = arg1->cDstArgs.iStride;
0066bcca          uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066bcd1          arg1 = arg1->nWidth;
0066bcd5          uint32_t edi_2 = nHeight;
0066bcf1          uint32_t i;
0066bcf1          
0066bcf1          do
0066bcf1          {
0066bcd7              char* j = arg1;
0066bcd7              
0066bcdd              while (j > 0)
0066bcdd              {
0066bce0                  nHeight = *(uint8_t*)((ecx_1 + (j << 2)) - 4);
0066bce4                  j -= 1;
0066bce7                  j[__inner1] = nHeight;
0066bcdd              }
0066bcdd              
0066bcec              ecx_1 += iStride_1;
0066bcee              __inner1 += iStride;
0066bcf0              i = edi_2;
0066bcf0              edi_2 -= 1;
0066bcf1          } while (i != 1);
0066bcc3      }
0066bcb0  }

0066bcf8                                                                          cc cc cc cc cc cc cc cc                          ........

0066bd00  void AlphaConvert<ACvtFormat_AXXX,ACvtFormat_AXXX>(struct AlphaConvertArgs const* arg1)

0066bd00  {
0066bd04      uint32_t nHeight = arg1->nHeight;
0066bd12      int32_t ebp_1 = (arg1->cSrcArgs.__inner1 + 3);
0066bd15      int32_t esi_1 = (arg1->cDstArgs.__inner1 + 3);
0066bd15      
0066bd1a      if (nHeight > 0)
0066bd1a      {
0066bd1c          uint32_t nWidth = arg1->nWidth;
0066bd1f          int32_t ebx;
0066bd1f          int32_t var_14_1 = ebx;
0066bd21          uint32_t iStride_1 = arg1->cSrcArgs.iStride;
0066bd24          uint32_t iStride = arg1->cDstArgs.iStride;
0066bd2f          arg1 = nHeight;
0066bd61          bool cond:0_1;
0066bd61          
0066bd61          do
0066bd61          {
0066bd35              if (nWidth > 0)
0066bd35              {
0066bd39                  char* eax = (esi_1 + (nWidth << 2));
0066bd3e                  uint32_t edi_1 = nWidth;
0066bd4a                  uint32_t i;
0066bd4a                  
0066bd4a                  do
0066bd4a                  {
0066bd40                      ebx = eax[((ebp_1 - esi_1) - 4)];
0066bd44                      eax -= 4;
0066bd47                      i = edi_1;
0066bd47                      edi_1 -= 1;
0066bd48                      *(uint8_t*)eax = ebx;
0066bd4a                  } while (i != 1);
0066bd35              }
0066bd35              
0066bd58              ebp_1 += iStride_1;
0066bd5a              esi_1 += iStride;
0066bd5c              cond:0_1 = arg1 != 1;
0066bd5d              arg1 -= 1;
0066bd61          } while (cond:0_1);
0066bd1a      }
0066bd00  }

0066bd6b                                   cc cc cc cc cc                                                             .....

0066bd70  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_ARGB,1>,BlitFormat_ARGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066bd70  {
0066bd79      void* eax;
0066bd79      uint32_t edx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066bd84      int32_t esi = *(uint32_t*)((char*)eax + 0x14);
0066bd88      int32_t var_48 = *(uint32_t*)((char*)eax + 8);
0066bd8c      int32_t var_3c = esi;
0066bd8c      
0066bd90      if (edx != 0)
0066bd90      {
0066bd96          uint32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066bd99          int32_t edx_1 = (edx + 1);
0066bd9c          int32_t var_44_1 = edx_1;
0066bd9c          
0066bda0          if (ecx_1 > 0)
0066bda0          {
0066bda6              int32_t i_2 = *(uint32_t*)((char*)eax + 0x1c);
0066bda9              int32_t ebx_1 = *(uint32_t*)((char*)eax + 0xc);
0066bdaf              float var_20[0x4];
0066bdaf              float xmm0_1[0x2] = var_20[0];
0066bdb4              float xmm1_1[0x4] = var_20;
0066bdc3              int32_t i_3 = i_2;
0066bdcb              uint32_t var_24_1 = *(uint32_t*)((char*)eax + 0x18);
0066bdcf              uint32_t var_38_1 = ecx_1;
0066bf98              bool cond:2_1;
0066bf98              
0066bf98              do
0066bf98              {
0066bdd5                  if (i_2 > 0)
0066bdd5                  {
0066bddf                      int32_t ebx_3 = (var_48 - esi);
0066bde1                      int32_t* ecx_2 = (esi + (i_2 << 2));
0066bde4                      int32_t var_30_1 = ebx_3;
0066bde8                      int32_t i_1 = i_2;
0066bf6b                      int32_t i;
0066bf6b                      
0066bf6b                      do
0066bf6b                      {
0066bdf0                          uint32_t edi_1 = *(uint32_t*)((ebx_3 + ecx_2) - 4);
0066bdf4                          ecx_2 -= 4;
0066bdf9                          uint32_t esi_2 = (edi_1 >> 0x18);
0066be06                          uint32_t var_4c_1 = edi_1;
0066be06                          
0066be0a                          if (edx_1 != 0x100)
0066be0a                          {
0066be11                              int32_t eax_4;
0066be11                              char edx_2;
0066be11                              edx_2 = HIGHD(((int64_t)(esi_2 * edx_1)));
0066be11                              eax_4 = LOWD(((int64_t)(esi_2 * edx_1)));
0066be1a                              edx_1 = var_44_1;
0066be21                              esi_2 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066be0a                          }
0066be0a                          
0066be25                          if (esi_2 != 0)
0066be25                          {
0066be32                              if (esi_2 != 0xff)
0066be32                              {
0066be38                                  int32_t ebx_4 = *(uint32_t*)ecx_2;
0066be3e                                  uint32_t eax_1;
0066be3e                                  eax_1 = *(uint8_t*)((char*)ebx_4)[3];
0066be3e                                  
0066be44                                  if (eax_1 != 0)
0066be44                                  {
0066be4c                                      if (eax_1 != 0xff)
0066be4c                                      {
0066bebd                                          int32_t st1[0x2] = _m_punpckhwd(((uint64_t)ebx_4), 0);
0066bec6                                          float xmm0_2[0x2] = _mm_cvtpi32_ps(xmm0_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066bed5                                          float xmm0_4[0x4] = _mm_cvtpi32_ps((xmm0_2 | ((int64_t)(xmm0_2 << 0x40))), _m_punpcklwd(st1, 0));
0066bed8                                          int32_t eax_8;
0066bed8                                          char edx_4;
0066bed8                                          edx_4 = HIGHD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_2 + 1))));
0066bed8                                          eax_8 = LOWD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_2 + 1))));
0066bee4                                          st1 = _m_punpckhwd(((uint64_t)edi_1), 0);
0066beed                                          float xmm1_2[0x2] = _mm_cvtpi32_ps(xmm1_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066bf00                                          float xmm2_2[0x4] = ((float)(esi_2 + 1));
0066bf04                                          int32_t ecx_5 = ((((uint32_t)eax_1) + 1) + ((esi_2 + 1) - ((eax_8 + ((uint32_t)edx_4)) >> 8)));
0066bf06                                          float xmm3_2[0x4] = ((float)ecx_5);
0066bf0d                                          float xmm4_6[0x4] = _mm_shuffle_ps(xmm2_2, xmm2_2, 0);
0066bf14                                          st1 = _m_punpcklwd(st1, 0);
0066bf1a                                          float xmm4_8[0x4] = _mm_shuffle_ps(xmm3_2, xmm3_2, 0);
0066bf21                                          xmm1_1 = _mm_cvtpi32_ps((xmm1_2 | ((int64_t)(xmm1_2 << 0x40))), st1);
0066bf30                                          float xmm0_5[0x4] = _mm_sub_ps(xmm0_4, _mm_div_ps(_mm_mul_ps(_mm_sub_ps(xmm0_4, xmm1_1), xmm4_6), xmm4_8));
0066bf3c                                          xmm0_1 = ((int64_t)(xmm0_5 >> 0x40));
0066bf48                                          ecx_5 -= 1;
0066bf4d                                          uint32_t var_4c_3 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm0_5), _mm_cvtps_pi32(xmm0_1)), 0)[0];
0066bf51                                          *(uint8_t*)((char*)var_4c_3)[3] = ecx_5;
0066bf55                                          edi_1 = var_4c_3;
0066be4c                                      }
0066be4c                                      else
0066be4c                                      {
0066be5c                                          uint64_t st2 = _m_punpckhwd(0xffffff, 0);
0066be65                                          int64_t st0 = _m_punpckhwd(((uint64_t)ebx_4), 0);
0066be77                                          st2 = ((_m_punpckhwd(((uint64_t)edi_1), 0) & st2) | (st2 & !(st0)));
0066be7a                                          uint64_t st3 = ((uint64_t)(esi_2 + 1));
0066be80                                          uint64_t st4 = _m_punpcklwd(st3, st3);
0066be89                                          st3 = _m_punpcklwd(st4, st4);
0066be92                                          st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066bea6                                          edi_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066be4c                                      }
0066be44                                  }
0066be32                              }
0066be32                              
0066bf5d                              ebx_3 = var_30_1;
0066bf61                              edx_1 = var_44_1;
0066bf65                              *(uint32_t*)ecx_2 = edi_1;
0066be25                          }
0066be25                          
0066bf67                          i = i_1;
0066bf67                          i_1 -= 1;
0066bf6b                      } while (i != 1);
0066bf71                      esi = var_3c;
0066bf75                      i_2 = i_3;
0066bdd5                  }
0066bdd5                  
0066bf87                  esi += var_24_1;
0066bf8b                  cond:2_1 = var_38_1 != 1;
0066bf8c                  var_48 += ebx_1;
0066bf90                  var_3c = esi;
0066bf94                  var_38_1 -= 1;
0066bf98              } while (cond:2_1);
0066bda0          }
0066bd90      }
0066bd70  }

0066bfa7                       cc cc cc cc cc cc cc cc cc                                                         .........

0066bfb0  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_ARGB,0>,BlitFormat_ARGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066bfb0  {
0066bfb9      void* eax;
0066bfb9      uint32_t edx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066bfc4      int32_t esi = *(uint32_t*)((char*)eax + 0x14);
0066bfc8      int32_t var_3c = *(uint32_t*)((char*)eax + 8);
0066bfcc      int32_t var_30 = esi;
0066bfcc      
0066bfd0      if (edx != 0)
0066bfd0      {
0066bfd6          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066bfd9          int32_t edx_1 = (edx + 1);
0066bfdc          int32_t var_34_1 = edx_1;
0066bfdc          
0066bfe0          if (ecx_1 > 0)
0066bfe0          {
0066bfe6              int32_t ebx_1 = *(uint32_t*)((char*)eax + 0x1c);
0066bfe9              int32_t edi_1 = *(uint32_t*)((char*)eax + 0xc);
0066bfef              int32_t var_1c_1 = ebx_1;
0066bff7              int32_t var_14_1 = *(uint32_t*)((char*)eax + 0x18);
0066bffb              int32_t var_2c_1 = ecx_1;
0066c1a1              bool cond:2_1;
0066c1a1              
0066c1a1              do
0066c1a1              {
0066c002                  if (ebx_1 > 0)
0066c002                  {
0066c00c                      int32_t ecx_3 = (var_3c - esi);
0066c00e                      int32_t* edi_2 = (esi + (ebx_1 << 2));
0066c011                      int32_t var_20_1 = ecx_3;
0066c015                      int32_t var_38_1 = ebx_1;
0066c172                      bool cond:3_1;
0066c172                      
0066c172                      do
0066c172                      {
0066c020                          int32_t ebx_2 = *(uint32_t*)((ecx_3 + edi_2) - 4);
0066c024                          edi_2 -= 4;
0066c029                          uint32_t esi_2 = (ebx_2 >> 0x18);
0066c032                          int24_t var_40_1 = ebx_2;
0066c032                          
0066c036                          if (edx_1 != 0x100)
0066c036                          {
0066c03d                              int32_t eax_4;
0066c03d                              char edx_2;
0066c03d                              edx_2 = HIGHD(((int64_t)(esi_2 * edx_1)));
0066c03d                              eax_4 = LOWD(((int64_t)(esi_2 * edx_1)));
0066c049                              esi_2 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066c036                          }
0066c036                          
0066c04d                          if (esi_2 != 0)
0066c04d                          {
0066c05a                              int32_t eax_6;
0066c05a                              
0066c05a                              if (esi_2 != 0xff)
0066c05a                              {
0066c063                                  int32_t ecx_4 = *(uint32_t*)edi_2;
0066c069                                  int32_t eax_1;
0066c069                                  eax_1 = *(uint8_t*)((char*)ecx_4)[3];
0066c069                                  
0066c06f                                  if (eax_1 == 0)
0066c071                                      eax_6 = ebx_2;
0066c06f                                  else if (eax_1 != 0xff)
0066c07a                                  {
0066c0df                                      uint32_t ebx_3 = ((uint32_t)*(uint8_t*)((char*)ecx_4)[2]);
0066c0ea                                      int32_t eax_9;
0066c0ea                                      char edx_4;
0066c0ea                                      edx_4 = HIGHD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_2 + 1))));
0066c0ea                                      eax_9 = LOWD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_2 + 1))));
0066c0fa                                      uint32_t eax_12 = ((uint32_t)*(uint8_t*)((char*)ecx_4)[1]);
0066c0ff                                      int32_t ecx_7 = ((((uint32_t)eax_1) + 1) + ((esi_2 + 1) - ((eax_9 + ((uint32_t)edx_4)) >> 8)));
0066c101                                      uint32_t edx_8 = ((uint32_t)ecx_4);
0066c122                                      ebx_3 -= ((int8_t)(((int64_t)((ebx_3 - ((uint32_t)*(uint8_t*)((char*)var_40_1)[2])) * (esi_2 + 1))) / ecx_7));
0066c124                                      int32_t var_44_1;
0066c124                                      *(uint8_t*)((char*)var_44_1)[2] = ebx_3;
0066c13b                                      uint32_t ebx_4;
0066c13b                                      ebx_4 = (eax_12 - ((int8_t)(((int64_t)((eax_12 - ((uint32_t)*(uint8_t*)((char*)var_40_1)[1])) * (esi_2 + 1))) / ecx_7)));
0066c13d                                      *(uint8_t*)((char*)var_44_1)[1] = ebx_4;
0066c14f                                      uint32_t ebx_5;
0066c14f                                      ebx_5 = (edx_8 - ((int8_t)(((int64_t)((edx_8 - ((uint32_t)var_40_1)) * (esi_2 + 1))) / ecx_7)));
0066c151                                      ecx_7 -= 1;
0066c153                                      var_44_1 = ebx_5;
0066c157                                      *(uint8_t*)((char*)var_44_1)[3] = ecx_7;
0066c15b                                      eax_6 = var_44_1;
0066c07a                                  }
0066c07a                                  else
0066c07a                                  {
0066c07c                                      int80_t st1;
0066c07c                                      st1 = 0;
0066c08a                                      int64_t st2 = _m_punpckhwd(0xffffff, 0);
0066c093                                      uint64_t st0 = _m_punpckhwd(((uint64_t)ecx_4), 0);
0066c0a5                                      st2 = ((_m_punpckhwd(((uint64_t)ebx_2), 0) & st2) | (st2 & !(st0)));
0066c0a8                                      int16_t st3[0x4] = ((uint64_t)(esi_2 + 1));
0066c0ae                                      int64_t st4 = _m_punpcklwd(st3, st3[0]);
0066c0b7                                      st3 = _m_punpcklwd(st4, st4[0]);
0066c0c0                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066c0d4                                      eax_6 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066c07a                                  }
0066c05a                              }
0066c05a                              else
0066c05c                                  eax_6 = ebx_2;
0066c05c                              
0066c15f                              ecx_3 = var_20_1;
0066c163                              *(uint32_t*)edi_2 = eax_6;
0066c04d                          }
0066c04d                          
0066c169                          edx_1 = var_34_1;
0066c16d                          cond:3_1 = var_38_1 != 1;
0066c16e                          var_38_1 -= 1;
0066c172                      } while (cond:3_1);
0066c178                      esi = var_30;
0066c17c                      ebx_1 = var_1c_1;
0066c002                  }
0066c002                  
0066c192                  esi += var_14_1;
0066c194                  cond:2_1 = var_2c_1 != 1;
0066c195                  var_3c += edi_1;
0066c199                  var_30 = esi;
0066c19d                  var_2c_1 -= 1;
0066c1a1              } while (cond:2_1);
0066bfe0          }
0066bfd0      }
0066bfb0  }


0066c1b0  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_XRGB,0>,BlitFormat_ARGB,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066c1b0  {
0066c1bc      void* eax;
0066c1bc      int32_t edx = *(uint32_t*)((char*)eax + 0x14);
0066c1c0      uint32_t ebx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066c1c8      int32_t var_30 = *(uint32_t*)((char*)eax + 8);
0066c1cc      int32_t var_24 = edx;
0066c1cc      
0066c1d0      if (ebx != 0)
0066c1d0      {
0066c1d6          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066c1d6          
0066c1dc          if (ecx_1 > 0)
0066c1dc          {
0066c1e2              int32_t i_2 = *(uint32_t*)((char*)eax + 0x1c);
0066c1e5              int32_t edi_1 = *(uint32_t*)((char*)eax + 0xc);
0066c1e8              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066c1eb              int32_t i_3 = i_2;
0066c1f7              int32_t var_20_1 = ecx_1;
0066c2e5              bool cond:1_1;
0066c2e5              
0066c2e5              do
0066c2e5              {
0066c202                  if (i_2 > 0)
0066c202                  {
0066c20c                      int32_t* ecx_2 = (edx + (i_2 << 2));
0066c211                      int32_t i_1 = i_2;
0066c2b6                      int32_t i;
0066c2b6                      
0066c2b6                      do
0066c2b6                      {
0066c215                          int32_t esi_1 = *(uint32_t*)(((var_30 - edx) + ecx_2) - 4);
0066c219                          ecx_2 -= 4;
0066c21e                          uint32_t eax_3 = (esi_1 >> 0x18);
0066c227                          int32_t var_2c_1 = esi_1;
0066c227                          
0066c22b                          if (ebx != 0xff)
0066c22b                          {
0066c230                              int32_t eax_5;
0066c230                              char edx_1;
0066c230                              edx_1 = HIGHD(((int64_t)(eax_3 * (ebx + 1))));
0066c230                              eax_5 = LOWD(((int64_t)(eax_3 * (ebx + 1))));
0066c239                              eax_3 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
0066c22b                          }
0066c22b                          
0066c23e                          if (eax_3 != 0)
0066c23e                          {
0066c246                              if (eax_3 != 0xff)
0066c246                              {
0066c24a                                  int32_t var_2c_2 = *(uint32_t*)ecx_2;
0066c24e                                  int80_t st1;
0066c24e                                  st1 = 0;
0066c25c                                  int64_t st2 = _m_punpckhwd(0xffffff, 0);
0066c262                                  *(uint8_t*)((char*)var_2c_2)[3] = 0xff;
0066c26c                                  uint64_t st0 = _m_punpckhwd(((uint64_t)var_2c_2), 0);
0066c27e                                  st2 = ((_m_punpckhwd(((uint64_t)esi_1), 0) & st2) | (st2 & !(st0)));
0066c281                                  int16_t st3[0x4] = ((uint64_t)(eax_3 + 1));
0066c287                                  int64_t st4 = _m_punpcklwd(st3, st3[0]);
0066c290                                  st3 = _m_punpcklwd(st4, st4[0]);
0066c299                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066c2ad                                  esi_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066c246                              }
0066c246                              
0066c2b0                              *(uint32_t*)ecx_2 = esi_1;
0066c23e                          }
0066c23e                          
0066c2b2                          i = i_1;
0066c2b2                          i_1 -= 1;
0066c2b6                      } while (i != 1);
0066c2bc                      i_2 = i_3;
0066c2c0                      edx = var_24;
0066c202                  }
0066c202                  
0066c2d6                  edx += eax_1;
0066c2d8                  cond:1_1 = var_20_1 != 1;
0066c2d9                  var_30 += edi_1;
0066c2dd                  var_24 = edx;
0066c2e1                  var_20_1 -= 1;
0066c2e5              } while (cond:1_1);
0066c1dc          }
0066c1d0      }
0066c1b0  }

0066c1fd                                                                                         8d 49 00                               .I.
0066c2f4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

0066c300  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_RGB,1>,BlitFormat_ARGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066c300  {
0066c30c      void* eax;
0066c30c      int32_t edx = *(uint32_t*)((char*)eax + 0x14);
0066c310      uint32_t ebx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066c318      uint32_t var_2c = *(uint32_t*)((char*)eax + 8);
0066c31c      int32_t var_28 = edx;
0066c31c      
0066c320      if (ebx != 0)
0066c320      {
0066c326          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066c326          
0066c32c          if (ecx_1 > 0)
0066c32c          {
0066c332              int32_t i_1 = *(uint32_t*)((char*)eax + 0x1c);
0066c339              int32_t esi_1 = *(uint32_t*)((char*)eax + 0xc);
0066c33c              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066c347              int32_t var_24_1 = ecx_1;
0066c466              bool cond:1_1;
0066c466              
0066c466              do
0066c466              {
0066c350                  int32_t i = i_1;
0066c350                  
0066c356                  if (i > 0)
0066c356                  {
0066c35f                      char* ecx_3 = (((i * 3) + edx) + 2);
0066c35f                      
0066c43b                      do
0066c43b                      {
0066c367                          int32_t edi_1 = *(uint32_t*)((var_2c + (i << 2)) - 4);
0066c36b                          i -= 1;
0066c36e                          ecx_3 -= 3;
0066c371                          uint32_t eax_3 = (edi_1 >> 0x18);
0066c37a                          int32_t var_1c_1 = edi_1;
0066c37a                          
0066c37e                          if (ebx != 0xff)
0066c37e                          {
0066c383                              int32_t eax_5;
0066c383                              char edx_1;
0066c383                              edx_1 = HIGHD(((int64_t)(eax_3 * (ebx + 1))));
0066c383                              eax_5 = LOWD(((int64_t)(eax_3 * (ebx + 1))));
0066c38c                              eax_3 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
0066c37e                          }
0066c37e                          
0066c391                          if (eax_3 != 0)
0066c391                          {
0066c39d                              char var_30;
0066c39d                              uint32_t edx_2;
0066c39d                              
0066c39d                              if (eax_3 != 0xff)
0066c39d                              {
0066c3a5                                  edx_2 = ecx_3[0xfffffffe];
0066c3a8                                  var_30 = edx_2;
0066c3ac                                  edx_2 = ecx_3[0xffffffff];
0066c3af                                  char var_2f_1 = edx_2;
0066c3b3                                  edx_2 = *(uint8_t*)ecx_3;
0066c3b5                                  char var_2e_1 = edx_2;
0066c3b9                                  int80_t st1;
0066c3b9                                  st1 = 0;
0066c3c7                                  int64_t st2 = _m_punpckhwd(0xffffff, 0);
0066c3cd                                  char var_2d_1 = 0xff;
0066c3d7                                  uint64_t st0 = _m_punpckhwd(((uint64_t)var_30), 0);
0066c3e9                                  st2 = ((_m_punpckhwd(((uint64_t)edi_1), 0) & st2) | (st2 & !(st0)));
0066c3ec                                  uint64_t st3 = ((uint64_t)(eax_3 + 1));
0066c3f2                                  int64_t st4 = _m_punpcklwd(st3, st3);
0066c3fb                                  st3 = _m_punpcklwd(st4, st4);
0066c404                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066c41b                                  var_30 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066c39d                              }
0066c39d                              else
0066c39f                                  var_30 = edi_1;
0066c39f                              
0066c41f                              edx_2 = var_30;
0066c427                              ecx_3[0xfffffffe] = edx_2;
0066c434                              ecx_3[0xffffffff] = ((int8_t)(var_30 >> 8));
0066c437                              *(uint8_t*)ecx_3 = ((int8_t)(var_30 >> 0x10));
0066c391                          }
0066c43b                      } while (i > 0);
0066c356                  }
0066c356                  
0066c453                  var_2c += esi_1;
0066c45b                  edx = (var_28 + eax_1);
0066c45d                  cond:1_1 = var_24_1 != 1;
0066c45e                  var_28 = edx;
0066c462                  var_24_1 -= 1;
0066c466              } while (cond:1_1);
0066c32c          }
0066c320      }
0066c300  }

0066c34d                                         8d 49 00                                                               .I.
0066c475                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

0066c480  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_ARGB,1>,BlitFormat_XRGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066c480  {
0066c48e      void* eax;
0066c48e      int32_t esi = *(uint32_t*)((char*)eax + 0x14);
0066c492      uint32_t edi = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066c498      int32_t var_44 = *(uint32_t*)((char*)eax + 8);
0066c49c      int32_t var_38 = esi;
0066c49c      
0066c4a0      if (edi != 0)
0066c4a0      {
0066c4a6          int32_t edx_1 = *(uint32_t*)((char*)eax + 0x20);
0066c4a9          int32_t edi_1 = (edi + 1);
0066c4ac          int32_t var_2c_1 = edi_1;
0066c4ac          
0066c4b0          if (edx_1 > 0)
0066c4b0          {
0066c4b6              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066c4b9              int32_t ebx_1 = *(uint32_t*)((char*)eax + 0xc);
0066c4bc              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066c4bf              float var_20[0x4];
0066c4bf              float xmm0_1[0x2] = var_20[0];
0066c4c4              float xmm1_1[0x4] = var_20;
0066c4d3              int32_t i_2 = i_3;
0066c4df              int32_t var_34_1 = edx_1;
0066c6ae              bool cond:2_1;
0066c6ae              
0066c6ae              do
0066c6ae              {
0066c4e5                  if (i_3 > 0)
0066c4e5                  {
0066c4ef                      int32_t* ebx_2 = (esi + (i_3 << 2));
0066c4f6                      int32_t ecx_2 = (var_44 - esi);
0066c4f8                      int32_t var_30_1 = ecx_2;
0066c4fc                      int32_t i_1 = i_2;
0066c681                      int32_t i;
0066c681                      
0066c681                      do
0066c681                      {
0066c500                          int32_t eax_5 = *(uint32_t*)((ecx_2 + ebx_2) - 4);
0066c504                          ebx_2 -= 4;
0066c50d                          int32_t var_4c_1 = eax_5;
0066c511                          *(uint8_t*)((char*)var_4c_1)[3] = 0xff;
0066c516                          int32_t esi_1 = 0xff;
0066c516                          
0066c51b                          if (edi_1 != 0x100)
0066c51b                          {
0066c525                              int32_t eax_4;
0066c525                              char edx_3;
0066c525                              edx_3 = HIGHD(((int64_t)(edi_1 * 0xff)));
0066c525                              eax_4 = LOWD(((int64_t)(edi_1 * 0xff)));
0066c52c                              esi_1 = ((eax_4 + ((uint32_t)edx_3)) >> 8);
0066c51b                          }
0066c51b                          
0066c531                          if ((edi_1 == 0x100 || esi_1 != 0))
0066c531                          {
0066c53e                              int32_t eax_6;
0066c53e                              
0066c53e                              if (esi_1 != 0xff)
0066c53e                              {
0066c549                                  int32_t edi_2 = *(uint32_t*)ebx_2;
0066c54f                                  eax_5 = *(uint8_t*)((char*)edi_2)[3];
0066c54f                                  
0066c555                                  if (eax_5 == 0)
0066c557                                      eax_6 = var_4c_1;
0066c555                                  else if (eax_5 != 0xff)
0066c562                                  {
0066c5d5                                      uint64_t st1 = _m_punpckhwd(((uint64_t)edi_2), 0);
0066c5de                                      float xmm0_2[0x2] = _mm_cvtpi32_ps(xmm0_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066c5ed                                      float xmm0_4[0x4] = _mm_cvtpi32_ps((xmm0_2 | ((int64_t)(xmm0_2 << 0x40))), _m_punpcklwd(st1, 0));
0066c5f5                                      int32_t eax_9;
0066c5f5                                      char edx_5;
0066c5f5                                      edx_5 = HIGHD(((int64_t)((((uint32_t)eax_5) + 1) * (esi_1 + 1))));
0066c5f5                                      eax_9 = LOWD(((int64_t)((((uint32_t)eax_5) + 1) * (esi_1 + 1))));
0066c5f6                                      st1 = _m_punpckhwd(((uint64_t)var_4c_1), 0);
0066c60a                                      float xmm1_2[0x2] = _mm_cvtpi32_ps(xmm1_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066c61a                                      float xmm2_2[0x4] = ((float)(esi_1 + 1));
0066c61e                                      int32_t ecx_5 = ((((uint32_t)eax_5) + 1) + ((esi_1 + 1) - ((eax_9 + ((uint32_t)edx_5)) >> 8)));
0066c620                                      float xmm3_2[0x4] = ((float)ecx_5);
0066c627                                      float xmm4_6[0x4] = _mm_shuffle_ps(xmm2_2, xmm2_2, 0);
0066c62e                                      st1 = _m_punpcklwd(st1, 0);
0066c634                                      float xmm4_8[0x4] = _mm_shuffle_ps(xmm3_2, xmm3_2, 0);
0066c63b                                      xmm1_1 = _mm_cvtpi32_ps((xmm1_2 | ((int64_t)(xmm1_2 << 0x40))), st1);
0066c64a                                      float xmm0_5[0x4] = _mm_sub_ps(xmm0_4, _mm_div_ps(_mm_mul_ps(_mm_sub_ps(xmm0_4, xmm1_1), xmm4_6), xmm4_8));
0066c656                                      xmm0_1 = ((int64_t)(xmm0_5 >> 0x40));
0066c665                                      ecx_5 -= 1;
0066c667                                      int32_t var_48_2 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm0_5), _mm_cvtps_pi32(xmm0_1)), 0);
0066c66b                                      *(uint8_t*)((char*)var_48_2)[3] = ecx_5;
0066c66f                                      eax_6 = var_48_2;
0066c673                                      ecx_2 = var_30_1;
0066c562                                  }
0066c562                                  else
0066c562                                  {
0066c577                                      uint64_t st2 = _m_punpckhwd(0xffffff, 0);
0066c580                                      int64_t st0 = _m_punpckhwd(((uint64_t)edi_2), 0);
0066c58f                                      st2 = ((_m_punpckhwd(((uint64_t)var_4c_1), 0) & st2) | (st2 & !(st0)));
0066c592                                      uint64_t st3 = ((uint64_t)(esi_1 + 1));
0066c598                                      uint64_t st4 = _m_punpcklwd(st3, st3);
0066c5a1                                      st3 = _m_punpcklwd(st4, st4);
0066c5aa                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066c5be                                      eax_6 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066c562                                  }
0066c53e                              }
0066c53e                              else
0066c540                                  eax_6 = var_4c_1;
0066c540                              
0066c677                              edi_1 = var_2c_1;
0066c67b                              *(uint32_t*)ebx_2 = eax_6;
0066c531                          }
0066c531                          
0066c67d                          i = i_1;
0066c67d                          i_1 -= 1;
0066c681                      } while (i != 1);
0066c687                      esi = var_38;
0066c68b                      i_3 = i_2;
0066c4e5                  }
0066c4e5                  
0066c69d                  esi += eax_1;
0066c6a1                  cond:2_1 = var_34_1 != 1;
0066c6a2                  var_44 += ebx_1;
0066c6a6                  var_38 = esi;
0066c6aa                  var_34_1 -= 1;
0066c6ae              } while (cond:2_1);
0066c4b0          }
0066c4a0      }
0066c480  }

0066c6bd                                                                                         cc cc cc                               ...

0066c6c0  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_ARGB,0>,BlitFormat_XRGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066c6c0  {
0066c6c9      void* eax;
0066c6c9      uint32_t edx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066c6d4      int32_t esi = *(uint32_t*)((char*)eax + 0x14);
0066c6d8      int32_t var_3c = *(uint32_t*)((char*)eax + 8);
0066c6dc      int32_t var_2c = esi;
0066c6dc      
0066c6e0      if (edx != 0)
0066c6e0      {
0066c6e6          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066c6e9          int32_t edx_1 = (edx + 1);
0066c6ec          int32_t var_34_1 = edx_1;
0066c6ec          
0066c6f0          if (ecx_1 > 0)
0066c6f0          {
0066c6f6              int32_t edi_1 = *(uint32_t*)((char*)eax + 0x1c);
0066c6f9              int32_t ebx_1 = *(uint32_t*)((char*)eax + 0xc);
0066c6fc              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066c6ff              int32_t var_30_1 = edi_1;
0066c70b              int32_t var_28_1 = ecx_1;
0066c8bb              bool cond:2_1;
0066c8bb              
0066c8bb              do
0066c8bb              {
0066c712                  if (edi_1 > 0)
0066c712                  {
0066c720                      int32_t ebx_3 = (var_3c - esi);
0066c722                      int32_t* edi_2 = (esi + (edi_1 << 2));
0066c725                      int32_t var_1c_1 = ebx_3;
0066c729                      int32_t var_38_1 = var_30_1;
0066c88c                      bool cond:3_1;
0066c88c                      
0066c88c                      do
0066c88c                      {
0066c730                          int32_t eax_5 = *(uint32_t*)((ebx_3 + edi_2) - 4);
0066c734                          edi_2 -= 4;
0066c73d                          int32_t var_40_1 = eax_5;
0066c741                          *(uint8_t*)((char*)var_40_1)[3] = 0xff;
0066c746                          int32_t esi_1 = 0xff;
0066c746                          
0066c74b                          if (edx_1 != 0x100)
0066c74b                          {
0066c755                              int32_t eax_4;
0066c755                              char edx_2;
0066c755                              edx_2 = HIGHD(((int64_t)(edx_1 * 0xff)));
0066c755                              eax_4 = LOWD(((int64_t)(edx_1 * 0xff)));
0066c75c                              esi_1 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066c74b                          }
0066c74b                          
0066c761                          if ((edx_1 == 0x100 || esi_1 != 0))
0066c761                          {
0066c76e                              int32_t eax_6;
0066c76e                              
0066c76e                              if (esi_1 != 0xff)
0066c76e                              {
0066c779                                  int32_t ecx_4 = *(uint32_t*)edi_2;
0066c77f                                  eax_5 = *(uint8_t*)((char*)ecx_4)[3];
0066c77f                                  
0066c785                                  if (eax_5 == 0)
0066c787                                      eax_6 = var_40_1;
0066c785                                  else if (eax_5 != 0xff)
0066c792                                  {
0066c7f9                                      uint32_t ebx_4 = ((uint32_t)*(uint8_t*)((char*)ecx_4)[2]);
0066c804                                      int32_t eax_9;
0066c804                                      char edx_4;
0066c804                                      edx_4 = HIGHD(((int64_t)((((uint32_t)eax_5) + 1) * (esi_1 + 1))));
0066c804                                      eax_9 = LOWD(((int64_t)((((uint32_t)eax_5) + 1) * (esi_1 + 1))));
0066c814                                      uint32_t eax_12 = ((uint32_t)*(uint8_t*)((char*)ecx_4)[1]);
0066c819                                      int32_t ecx_7 = ((((uint32_t)eax_5) + 1) + ((esi_1 + 1) - ((eax_9 + ((uint32_t)edx_4)) >> 8)));
0066c81b                                      uint32_t edx_8 = ((uint32_t)ecx_4);
0066c83c                                      ebx_4 -= ((int8_t)(((int64_t)((ebx_4 - ((uint32_t)*(uint8_t*)((char*)var_40_1)[2])) * (esi_1 + 1))) / ecx_7));
0066c83e                                      int32_t var_44_1;
0066c83e                                      *(uint8_t*)((char*)var_44_1)[2] = ebx_4;
0066c855                                      uint32_t ebx_5;
0066c855                                      ebx_5 = (eax_12 - ((int8_t)(((int64_t)((eax_12 - ((uint32_t)*(uint8_t*)((char*)var_40_1)[1])) * (esi_1 + 1))) / ecx_7)));
0066c857                                      *(uint8_t*)((char*)var_44_1)[1] = ebx_5;
0066c869                                      uint32_t ebx_6;
0066c869                                      ebx_6 = (edx_8 - ((int8_t)(((int64_t)((edx_8 - ((uint32_t)var_40_1)) * (esi_1 + 1))) / ecx_7)));
0066c86b                                      ecx_7 -= 1;
0066c86d                                      var_44_1 = ebx_6;
0066c871                                      ebx_3 = var_1c_1;
0066c875                                      *(uint8_t*)((char*)var_44_1)[3] = ecx_7;
0066c879                                      eax_6 = var_44_1;
0066c792                                  }
0066c792                                  else
0066c792                                  {
0066c799                                      int80_t st1;
0066c799                                      st1 = 0;
0066c7a7                                      uint64_t st2 = _m_punpckhwd(0xffffff, 0);
0066c7b0                                      int64_t st0 = _m_punpckhwd(((uint64_t)ecx_4), 0);
0066c7bf                                      st2 = ((_m_punpckhwd(((uint64_t)var_40_1), 0) & st2) | (st2 & !(st0)));
0066c7c2                                      uint64_t st3 = ((uint64_t)(esi_1 + 1));
0066c7c8                                      uint64_t st4 = _m_punpcklwd(st3, st3);
0066c7d1                                      st3 = _m_punpcklwd(st4, st4);
0066c7da                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066c7ee                                      eax_6 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066c792                                  }
0066c76e                              }
0066c76e                              else
0066c770                                  eax_6 = var_40_1;
0066c770                              
0066c87d                              *(uint32_t*)edi_2 = eax_6;
0066c761                          }
0066c761                          
0066c883                          edx_1 = var_34_1;
0066c887                          cond:3_1 = var_38_1 != 1;
0066c888                          var_38_1 -= 1;
0066c88c                      } while (cond:3_1);
0066c892                      esi = var_2c;
0066c896                      edi_1 = var_30_1;
0066c712                  }
0066c712                  
0066c8ac                  esi += eax_1;
0066c8ae                  cond:2_1 = var_28_1 != 1;
0066c8af                  var_3c += ebx_1;
0066c8b3                  var_2c = esi;
0066c8b7                  var_28_1 -= 1;
0066c8bb              } while (cond:2_1);
0066c6f0          }
0066c6e0      }
0066c6c0  }

0066c8ca                                cc cc cc cc cc cc                                                            ......

0066c8d0  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_XRGB,0>,BlitFormat_XRGB,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066c8d0  {
0066c8dc      void* eax;
0066c8dc      int32_t edx = *(uint32_t*)((char*)eax + 0x14);
0066c8e2      uint32_t edi = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066c8e8      int32_t var_30 = *(uint32_t*)((char*)eax + 8);
0066c8ec      int32_t var_20 = edx;
0066c8ec      
0066c8f0      if (edi != 0)
0066c8f0      {
0066c8f6          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066c8f6          
0066c8fc          if (ecx_1 > 0)
0066c8fc          {
0066c902              int32_t ebx_1 = *(uint32_t*)((char*)eax + 0xc);
0066c905              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066c908              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066c90f              int32_t i_2 = i_3;
0066c917              int32_t var_1c_1 = ecx_1;
0066ca17              bool cond:1_1;
0066ca17              
0066ca17              do
0066ca17              {
0066c922                  if (i_3 > 0)
0066c922                  {
0066c928                      int32_t* ecx_2 = (edx + (i_3 << 2));
0066c935                      int32_t i_1 = i_2;
0066c9ea                      int32_t i;
0066c9ea                      
0066c9ea                      do
0066c9ea                      {
0066c940                          int32_t eax_2 = *(uint32_t*)(((var_30 - edx) + ecx_2) - 4);
0066c944                          ecx_2 -= 4;
0066c94d                          int32_t var_34_1 = eax_2;
0066c951                          *(uint8_t*)((char*)var_34_1)[3] = 0xff;
0066c955                          int32_t eax_3 = 0xff;
0066c955                          
0066c957                          if (edi != 0xff)
0066c957                          {
0066c961                              int32_t eax_6;
0066c961                              char edx_2;
0066c961                              edx_2 = HIGHD(((int64_t)((edi + 1) * 0xff)));
0066c961                              eax_6 = LOWD(((int64_t)((edi + 1) * 0xff)));
0066c966                              eax_3 = ((eax_6 + ((uint32_t)edx_2)) >> 8);
0066c957                          }
0066c957                          
0066c96b                          if ((edi == 0xff || eax_3 != 0))
0066c96b                          {
0066c973                              int32_t eax_9;
0066c973                              
0066c973                              if (eax_3 != 0xff)
0066c973                              {
0066c982                                  int32_t var_2c_1 = *(uint32_t*)ecx_2;
0066c986                                  int80_t st1;
0066c986                                  st1 = 0;
0066c994                                  uint64_t st2 = _m_punpckhwd(0xffffff, 0);
0066c99a                                  *(uint8_t*)((char*)var_2c_1)[3] = 0xff;
0066c9a3                                  int64_t st0 = _m_punpckhwd(((uint64_t)var_2c_1), 0);
0066c9b2                                  st2 = ((_m_punpckhwd(((uint64_t)var_34_1), 0) & st2) | (st2 & !(st0)));
0066c9b5                                  uint64_t st3 = ((uint64_t)(eax_3 + 1));
0066c9bb                                  uint64_t st4 = _m_punpcklwd(st3, st3);
0066c9c4                                  st3 = _m_punpcklwd(st4, st4);
0066c9cd                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066c9e1                                  eax_9 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066c973                              }
0066c973                              else
0066c975                                  eax_9 = var_34_1;
0066c975                              
0066c9e4                              *(uint32_t*)ecx_2 = eax_9;
0066c96b                          }
0066c96b                          
0066c9e6                          i = i_1;
0066c9e6                          i_1 -= 1;
0066c9ea                      } while (i != 1);
0066c9f0                      edx = var_20;
0066c9f4                      i_3 = i_2;
0066c922                  }
0066c922                  
0066ca06                  var_30 += ebx_1;
0066ca0a                  edx += eax_1;
0066ca0e                  cond:1_1 = var_1c_1 != 1;
0066ca0f                  var_20 = edx;
0066ca13                  var_1c_1 -= 1;
0066ca17              } while (cond:1_1);
0066c8fc          }
0066c8f0      }
0066c8d0  }

0066ca26                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

0066ca30  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_RGB,0>,BlitFormat_XRGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066ca30  {
0066ca39      void* eax;
0066ca39      int32_t edx = *(uint32_t*)((char*)eax + 0x14);
0066ca3d      int32_t ebx = *(uint32_t*)((char*)eax + 8);
0066ca42      uint32_t edi = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066ca48      int32_t var_24 = edx;
0066ca48      
0066ca4c      if (edi != 0)
0066ca4c      {
0066ca52          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066ca52          
0066ca58          if (ecx_1 > 0)
0066ca58          {
0066ca5e              int32_t i_1 = *(uint32_t*)((char*)eax + 0x1c);
0066ca65              int32_t esi_1 = *(uint32_t*)((char*)eax + 0xc);
0066ca68              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066ca73              int32_t var_20_1 = ecx_1;
0066cb90              bool cond:1_1;
0066cb90              
0066cb90              do
0066cb90              {
0066ca80                  int32_t i = i_1;
0066ca80                  
0066ca86                  if (i > 0)
0066ca86                  {
0066ca8f                      char* ecx_3 = (((i * 3) + edx) + 2);
0066ca8f                      
0066cb6d                      do
0066cb6d                      {
0066ca93                          uint32_t edx_2 = *(uint32_t*)((ebx + (i << 2)) - 4);
0066ca97                          i -= 1;
0066ca98                          ecx_3 -= 3;
0066caa1                          uint32_t var_28_1 = edx_2;
0066caa5                          *(uint8_t*)((char*)var_28_1)[3] = 0xff;
0066caaa                          int32_t eax_2 = 0xff;
0066caaa                          
0066caaf                          if (edi != 0xff)
0066caaf                          {
0066cab9                              int32_t eax_5;
0066cab9                              char edx_1;
0066cab9                              edx_1 = HIGHD(((int64_t)((edi + 1) * 0xff)));
0066cab9                              eax_5 = LOWD(((int64_t)((edi + 1) * 0xff)));
0066cac2                              eax_2 = ((eax_5 + ((uint32_t)edx_1)) >> 8);
0066caaf                          }
0066caaf                          
0066cac7                          if ((edi == 0xff || eax_2 != 0))
0066cac7                          {
0066cad3                              char var_2c;
0066cad3                              uint32_t eax_8;
0066cad3                              
0066cad3                              if (eax_2 != 0xff)
0066cad3                              {
0066cadb                                  edx_2 = ecx_3[0xfffffffe];
0066cae3                                  var_2c = edx_2;
0066cae7                                  edx_2 = ecx_3[0xffffffff];
0066caea                                  char var_2b_1 = edx_2;
0066caee                                  edx_2 = *(uint8_t*)ecx_3;
0066caf0                                  char var_2a_1 = edx_2;
0066caf4                                  int80_t st1;
0066caf4                                  st1 = 0;
0066cb02                                  int64_t st2 = _m_punpckhwd(0xffffff, 0);
0066cb08                                  char var_29_1 = 0xff;
0066cb12                                  int64_t st0 = _m_punpckhwd(((uint64_t)var_2c), 0);
0066cb21                                  st2 = ((_m_punpckhwd(((uint64_t)var_28_1), 0) & st2) | (st2 & !(st0)));
0066cb24                                  int16_t st3[0x4] = ((uint64_t)(eax_2 + 1));
0066cb2a                                  uint64_t st4 = _m_punpcklwd(st3, st3[0]);
0066cb33                                  st3 = _m_punpcklwd(st4, st4[0]);
0066cb3c                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066cb50                                  eax_8 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066cad3                              }
0066cad3                              else
0066cad5                                  eax_8 = var_28_1;
0066cad5                              
0066cb53                              edx_2 = eax_8;
0066cb55                              var_2c = eax_8;
0066cb59                              ecx_3[0xfffffffe] = edx_2;
0066cb66                              ecx_3[0xffffffff] = ((int8_t)(eax_8 >> 8));
0066cb69                              *(uint8_t*)ecx_3 = ((int8_t)(var_2c >> 0x10));
0066cac7                          }
0066cb6d                      } while (i > 0);
0066ca86                  }
0066ca86                  
0066cb7f                  ebx += esi_1;
0066cb85                  edx = (var_24 + eax_1);
0066cb87                  cond:1_1 = var_20_1 != 1;
0066cb88                  var_24 = edx;
0066cb8c                  var_20_1 -= 1;
0066cb90              } while (cond:1_1);
0066ca58          }
0066ca4c      }
0066ca30  }

0066ca79                                                                             8d a4 24 00 00 00 00                           ..$....
0066cb9f                                                                                               cc                                 .

0066cba0  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_ARGB,1>,BlitFormat_RGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066cba0  {
0066cba9      void* eax;
0066cba9      int32_t edx = *(uint32_t*)((char*)eax + 8);
0066cbb0      uint32_t ebx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066cbb8      int32_t var_3c = edx;
0066cbbc      uint32_t var_40 = *(uint32_t*)((char*)eax + 0x14);
0066cbbc      
0066cbc0      if (ebx != 0)
0066cbc0      {
0066cbc6          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066cbc9          int32_t ebx_1 = (ebx + 1);
0066cbcc          int32_t var_2c_1 = ebx_1;
0066cbcc          
0066cbd0          if (ecx_1 > 0)
0066cbd0          {
0066cbd6              int32_t i_1 = *(uint32_t*)((char*)eax + 0x1c);
0066cbd9              float var_20[0x4];
0066cbd9              float xmm0_1[0x2] = var_20[0];
0066cbde              float xmm1_1[0x4] = var_20;
0066cbf1              int32_t esi_1 = *(uint32_t*)((char*)eax + 0xc);
0066cbfb              int32_t var_24_1 = *(uint32_t*)((char*)eax + 0x18);
0066cbff              int32_t var_38_1 = ecx_1;
0066cde0              bool cond:2_1;
0066cde0              
0066cde0              do
0066cde0              {
0066cc03                  int32_t i = i_1;
0066cc03                  
0066cc09                  if (i > 0)
0066cc09                  {
0066cc12                      char var_45_1 = 0xff;
0066cc17                      char* edi_1 = (((i * 3) + edx) + 2);
0066cc17                      
0066cdb5                      do
0066cdb5                      {
0066cc20                          int32_t eax_1;
0066cc20                          eax_1 = edi_1[0xfffffffb];
0066cc23                          uint32_t edx_1;
0066cc23                          edx_1 = edi_1[0xfffffffc];
0066cc26                          edi_1 -= 3;
0066cc29                          i -= 1;
0066cc30                          char var_48_1 = eax_1;
0066cc34                          eax_1 = *(uint8_t*)edi_1;
0066cc3a                          char var_47_1 = edx_1;
0066cc3e                          char var_46_1 = eax_1;
0066cc42                          int32_t esi_2 = 0xff;
0066cc42                          
0066cc47                          if (ebx_1 != 0x100)
0066cc47                          {
0066cc51                              int32_t eax_4;
0066cc51                              char edx_2;
0066cc51                              edx_2 = HIGHD(((int64_t)(ebx_1 * 0xff)));
0066cc51                              eax_4 = LOWD(((int64_t)(ebx_1 * 0xff)));
0066cc58                              esi_2 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066cc47                          }
0066cc47                          
0066cc5d                          if ((ebx_1 == 0x100 || esi_2 != 0))
0066cc5d                          {
0066cc6a                              if (esi_2 != 0xff)
0066cc6a                              {
0066cc79                                  int32_t ebx_2 = *(uint32_t*)(var_40 + (i << 2));
0066cc80                                  eax_1 = *(uint8_t*)((char*)ebx_2)[3];
0066cc80                                  
0066cc86                                  if (eax_1 == 0)
0066cc88                                      eax_1 = var_48_1;
0066cc86                                  else if (eax_1 != 0xff)
0066cc93                                  {
0066cd06                                      uint64_t st1 = _m_punpckhwd(((uint64_t)ebx_2), 0);
0066cd0f                                      float xmm0_2[0x2] = _mm_cvtpi32_ps(xmm0_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066cd1e                                      float xmm0_4[0x4] = _mm_cvtpi32_ps((xmm0_2 | ((int64_t)(xmm0_2 << 0x40))), _m_punpcklwd(st1, 0));
0066cd26                                      int32_t eax_7;
0066cd26                                      char edx_4;
0066cd26                                      edx_4 = HIGHD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_2 + 1))));
0066cd26                                      eax_7 = LOWD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_2 + 1))));
0066cd27                                      st1 = _m_punpckhwd(((uint64_t)var_48_1), 0);
0066cd3b                                      float xmm1_2[0x2] = _mm_cvtpi32_ps(xmm1_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066cd4b                                      float xmm2_2[0x4] = ((float)(esi_2 + 1));
0066cd4f                                      int32_t ecx_4 = ((((uint32_t)eax_1) + 1) + ((esi_2 + 1) - ((eax_7 + ((uint32_t)edx_4)) >> 8)));
0066cd51                                      float xmm3_2[0x4] = ((float)ecx_4);
0066cd58                                      float xmm4_6[0x4] = _mm_shuffle_ps(xmm2_2, xmm2_2, 0);
0066cd5f                                      st1 = _m_punpcklwd(st1, 0);
0066cd65                                      float xmm4_8[0x4] = _mm_shuffle_ps(xmm3_2, xmm3_2, 0);
0066cd6c                                      xmm1_1 = _mm_cvtpi32_ps((xmm1_2 | ((int64_t)(xmm1_2 << 0x40))), st1);
0066cd7b                                      float xmm0_5[0x4] = _mm_sub_ps(xmm0_4, _mm_div_ps(_mm_mul_ps(_mm_sub_ps(xmm0_4, xmm1_1), xmm4_6), xmm4_8));
0066cd87                                      xmm0_1 = ((int64_t)(xmm0_5 >> 0x40));
0066cd96                                      ecx_4 -= 1;
0066cd98                                      int32_t var_44_2 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm0_5), _mm_cvtps_pi32(xmm0_1)), 0);
0066cd9c                                      *(uint8_t*)((char*)var_44_2)[3] = ecx_4;
0066cda0                                      eax_1 = var_44_2;
0066cc93                                  }
0066cc93                                  else
0066cc93                                  {
0066cca8                                      uint64_t st2 = _m_punpckhwd(0xffffff, 0);
0066ccb1                                      int64_t st0 = _m_punpckhwd(((uint64_t)ebx_2), 0);
0066ccc0                                      st2 = ((_m_punpckhwd(((uint64_t)var_48_1), 0) & st2) | (st2 & !(st0)));
0066ccc3                                      uint64_t st3 = ((uint64_t)(esi_2 + 1));
0066ccc9                                      uint64_t st4 = _m_punpcklwd(st3, st3);
0066ccd2                                      st3 = _m_punpcklwd(st4, st4);
0066ccdb                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066ccef                                      eax_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066cc93                                  }
0066cc6a                              }
0066cc6a                              else
0066cc6c                                  eax_1 = var_48_1;
0066cc6c                              
0066cdac                              ebx_1 = var_2c_1;
0066cdb0                              *(uint32_t*)(var_40 + (i << 2)) = eax_1;
0066cc5d                          }
0066cdb5                      } while (i > 0);
0066cc09                  }
0066cc09                  
0066cdd1                  edx = (var_3c + esi_1);
0066cdd3                  cond:2_1 = var_38_1 != 1;
0066cdd4                  var_3c = edx;
0066cdd8                  var_40 += var_24_1;
0066cddc                  var_38_1 -= 1;
0066cde0              } while (cond:2_1);
0066cbd0          }
0066cbc0      }
0066cba0  }

0066cc1d                                                                                         8d 49 00                               .I.
0066cdef                                               cc                                                                 .

0066cdf0  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_ARGB,0>,BlitFormat_RGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066cdf0  {
0066cdf9      void* eax;
0066cdf9      int32_t edx = *(uint32_t*)((char*)eax + 8);
0066ce00      uint32_t ebx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066ce08      int32_t var_34 = edx;
0066ce0c      uint32_t var_38 = *(uint32_t*)((char*)eax + 0x14);
0066ce0c      
0066ce10      if (ebx != 0)
0066ce10      {
0066ce16          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066ce19          int32_t ebx_1 = (ebx + 1);
0066ce1c          int32_t var_1c_1 = ebx_1;
0066ce1c          
0066ce20          if (ecx_1 > 0)
0066ce20          {
0066ce26              int32_t i_1 = *(uint32_t*)((char*)eax + 0x1c);
0066ce2d              int32_t esi_1 = *(uint32_t*)((char*)eax + 0xc);
0066ce37              int32_t var_14_1 = *(uint32_t*)((char*)eax + 0x18);
0066ce3b              int32_t var_30_1 = ecx_1;
0066cff6              bool cond:2_1;
0066cff6              
0066cff6              do
0066cff6              {
0066ce40                  int32_t i = i_1;
0066ce40                  
0066ce46                  if (i > 0)
0066ce46                  {
0066ce4f                      char var_3d_1 = 0xff;
0066ce54                      char* edi_1 = (((i * 3) + edx) + 2);
0066ce54                      
0066cfcb                      do
0066cfcb                      {
0066ce60                          int32_t eax_1;
0066ce60                          eax_1 = edi_1[0xfffffffb];
0066ce63                          uint32_t edx_1;
0066ce63                          edx_1 = edi_1[0xfffffffc];
0066ce66                          edi_1 -= 3;
0066ce69                          i -= 1;
0066ce70                          char var_40_1 = eax_1;
0066ce74                          eax_1 = *(uint8_t*)edi_1;
0066ce7e                          char var_3e_1 = eax_1;
0066ce82                          int32_t esi_2 = 0xff;
0066ce82                          
0066ce87                          if (ebx_1 != 0x100)
0066ce87                          {
0066ce91                              int32_t eax_4;
0066ce91                              char edx_2;
0066ce91                              edx_2 = HIGHD(((int64_t)(ebx_1 * 0xff)));
0066ce91                              eax_4 = LOWD(((int64_t)(ebx_1 * 0xff)));
0066ce98                              esi_2 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066ce87                          }
0066ce87                          
0066ce9d                          if ((ebx_1 == 0x100 || esi_2 != 0))
0066ce9d                          {
0066ceaa                              if (esi_2 != 0xff)
0066ceaa                              {
0066ceb9                                  int32_t edx_4 = *(uint32_t*)(var_38 + (i << 2));
0066cec0                                  eax_1 = *(uint8_t*)((char*)edx_4)[3];
0066cec0                                  
0066cec6                                  if (eax_1 == 0)
0066cec8                                      eax_1 = var_40_1;
0066cec6                                  else if (eax_1 != 0xff)
0066ced3                                  {
0066cf3a                                      uint32_t ebx_2 = ((uint32_t)*(uint8_t*)((char*)edx_4)[2]);
0066cf45                                      int32_t eax_7;
0066cf45                                      char edx_5;
0066cf45                                      edx_5 = HIGHD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_2 + 1))));
0066cf45                                      eax_7 = LOWD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_2 + 1))));
0066cf55                                      uint32_t eax_10 = ((uint32_t)*(uint8_t*)((char*)edx_4)[1]);
0066cf5a                                      int32_t ecx_4 = ((((uint32_t)eax_1) + 1) + ((esi_2 + 1) - ((eax_7 + ((uint32_t)edx_5)) >> 8)));
0066cf5c                                      uint32_t edx_9 = ((uint32_t)edx_4);
0066cf7d                                      ebx_2 -= ((int8_t)(((int64_t)((ebx_2 - ((uint32_t)var_3e_1)) * (esi_2 + 1))) / ecx_4));
0066cf7f                                      int32_t var_3c_1;
0066cf7f                                      *(uint8_t*)((char*)var_3c_1)[2] = ebx_2;
0066cf96                                      uint32_t ebx_3;
0066cf96                                      ebx_3 = (eax_10 - ((int8_t)(((int64_t)((eax_10 - ((uint32_t)edx_1)) * (esi_2 + 1))) / ecx_4)));
0066cf98                                      *(uint8_t*)((char*)var_3c_1)[1] = ebx_3;
0066cfaa                                      uint32_t ebx_4;
0066cfaa                                      ebx_4 = (edx_9 - ((int8_t)(((int64_t)((edx_9 - ((uint32_t)var_40_1)) * (esi_2 + 1))) / ecx_4)));
0066cfac                                      ecx_4 -= 1;
0066cfae                                      var_3c_1 = ebx_4;
0066cfb2                                      ebx_1 = var_1c_1;
0066cfb6                                      *(uint8_t*)((char*)var_3c_1)[3] = ecx_4;
0066cfba                                      eax_1 = var_3c_1;
0066ced3                                  }
0066ced3                                  else
0066ced3                                  {
0066cedf                                      int80_t st1;
0066cedf                                      st1 = 0;
0066cee8                                      uint64_t st2 = _m_punpckhwd(0xffffff, 0);
0066cef1                                      int64_t st0 = _m_punpckhwd(((uint64_t)edx_4), 0);
0066cf00                                      st2 = ((_m_punpckhwd(((uint64_t)var_40_1), 0) & st2) | (st2 & !(st0)));
0066cf03                                      uint64_t st3 = ((uint64_t)(esi_2 + 1));
0066cf09                                      uint64_t st4 = _m_punpcklwd(st3, st3);
0066cf12                                      st3 = _m_punpcklwd(st4, st4);
0066cf1b                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066cf2f                                      eax_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066ced3                                  }
0066ceaa                              }
0066ceaa                              else
0066ceac                                  eax_1 = var_40_1;
0066ceac                              
0066cfc6                              *(uint32_t*)(var_38 + (i << 2)) = eax_1;
0066ce9d                          }
0066cfcb                      } while (i > 0);
0066ce46                  }
0066ce46                  
0066cfe7                  edx = (var_34 + esi_1);
0066cfe9                  cond:2_1 = var_30_1 != 1;
0066cfea                  var_34 = edx;
0066cfee                  var_38 += var_14_1;
0066cff2                  var_30_1 -= 1;
0066cff6              } while (cond:2_1);
0066ce20          }
0066ce10      }
0066cdf0  }

0066ce5a                                                                                8d 9b 00 00 00 00                            ......
0066d005                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0066d010  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_XRGB,0>,BlitFormat_RGB,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066d010  {
0066d019      void* eax;
0066d019      int32_t edx = *(uint32_t*)((char*)eax + 8);
0066d01d      int32_t ebx = *(uint32_t*)((char*)eax + 0x14);
0066d022      uint32_t edi = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066d028      int32_t var_24 = edx;
0066d028      
0066d02c      if (edi != 0)
0066d02c      {
0066d032          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066d032          
0066d038          if (ecx_1 > 0)
0066d038          {
0066d03e              int32_t i_1 = *(uint32_t*)((char*)eax + 0x1c);
0066d045              int32_t esi_1 = *(uint32_t*)((char*)eax + 0xc);
0066d04f              int32_t var_14_1 = *(uint32_t*)((char*)eax + 0x18);
0066d053              int32_t var_20_1 = ecx_1;
0066d15e              bool cond:1_1;
0066d15e              
0066d15e              do
0066d15e              {
0066d060                  int32_t i = i_1;
0066d060                  
0066d066                  if (i > 0)
0066d066                  {
0066d06f                      char var_29_1 = 0xff;
0066d074                      char* esi_2 = (((i * 3) + edx) + 2);
0066d074                      
0066d13b                      do
0066d13b                      {
0066d080                          int32_t eax_1;
0066d080                          eax_1 = esi_2[0xfffffffb];
0066d083                          uint32_t edx_1;
0066d083                          edx_1 = esi_2[0xfffffffc];
0066d086                          esi_2 -= 3;
0066d089                          char var_2c_1 = eax_1;
0066d08d                          eax_1 = *(uint8_t*)esi_2;
0066d08f                          i -= 1;
0066d096                          char var_2a_1 = eax_1;
0066d09a                          char var_2b_1 = edx_1;
0066d09e                          eax_1 = 0xff;
0066d09e                          
0066d0a3                          if (edi != 0xff)
0066d0a3                          {
0066d0ad                              int32_t eax_4;
0066d0ad                              char edx_2;
0066d0ad                              edx_2 = HIGHD(((int64_t)((edi + 1) * 0xff)));
0066d0ad                              eax_4 = LOWD(((int64_t)((edi + 1) * 0xff)));
0066d0b6                              eax_1 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066d0a3                          }
0066d0a3                          
0066d0bb                          if ((edi == 0xff || eax_1 != 0))
0066d0bb                          {
0066d0c3                              if (eax_1 != 0xff)
0066d0c3                              {
0066d0d3                                  int32_t var_28_1 = *(uint32_t*)(ebx + (i << 2));
0066d0d7                                  int80_t st1;
0066d0d7                                  st1 = 0;
0066d0e5                                  uint64_t st2 = _m_punpckhwd(0xffffff, 0);
0066d0eb                                  *(uint8_t*)((char*)var_28_1)[3] = 0xff;
0066d0f5                                  int64_t st0 = _m_punpckhwd(((uint64_t)var_28_1), 0);
0066d104                                  st2 = ((_m_punpckhwd(((uint64_t)var_2c_1), 0) & st2) | (st2 & !(st0)));
0066d107                                  uint64_t st3 = ((uint64_t)(eax_1 + 1));
0066d10d                                  uint64_t st4 = _m_punpcklwd(st3, st3);
0066d116                                  st3 = _m_punpcklwd(st4, st4);
0066d11f                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066d133                                  eax_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066d0c3                              }
0066d0c3                              else
0066d0c5                                  eax_1 = var_2c_1;
0066d0c5                              
0066d136                              *(uint32_t*)(ebx + (i << 2)) = eax_1;
0066d0bb                          }
0066d13b                      } while (i > 0);
0066d066                  }
0066d066                  
0066d151                  edx = (var_24 + esi_1);
0066d153                  ebx += var_14_1;
0066d155                  cond:1_1 = var_20_1 != 1;
0066d156                  var_24 = edx;
0066d15a                  var_20_1 -= 1;
0066d15e              } while (cond:1_1);
0066d038          }
0066d02c      }
0066d010  }

0066d059                                                                             8d a4 24 00 00 00 00                           ..$....
0066d07a                                                                                8d 9b 00 00 00 00                            ......
0066d16d                                         cc cc cc                                                               ...

0066d170  void __convention("regparm") BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_RGB,0>,BlitFormat_RGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066d170  {
0066d17d      void* eax;
0066d17d      uint32_t ebx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066d184      int32_t esi = *(uint32_t*)((char*)eax + 8);
0066d188      int32_t var_24 = esi;
0066d18c      int32_t var_2c = *(uint32_t*)((char*)eax + 0x14);
0066d18c      
0066d190      if (ebx != 0)
0066d190      {
0066d196          int32_t ecx_1 = *(uint32_t*)((char*)eax + 0x20);
0066d196          
0066d19c          if (ecx_1 > 0)
0066d19c          {
0066d1a2              uint32_t i_2 = *(uint32_t*)((char*)eax + 0x1c);
0066d1a5              int32_t edi_1 = *(uint32_t*)((char*)eax + 0xc);
0066d1a8              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066d1ab              uint32_t i_3 = i_2;
0066d1b7              int32_t var_20_1 = ecx_1;
0066d2fb              bool cond:1_1;
0066d2fb              
0066d2fb              do
0066d2fb              {
0066d1c2                  if (i_2 > 0)
0066d1c2                  {
0066d1cc                      uint32_t eax_2 = (i_2 * 3);
0066d1cf                      void* edi_2 = (eax_2 + esi);
0066d1d2                      void* ecx_3 = ((eax_2 + var_2c) + 2);
0066d1da                      char var_2d_1 = 0xff;
0066d1df                      char* esi_1 = (esi - var_2c);
0066d1e1                      uint32_t i_1 = i_2;
0066d2cc                      uint32_t i;
0066d2cc                      
0066d2cc                      do
0066d2cc                      {
0066d1e5                          i_2 = *(uint8_t*)((char*)edi_2 - 3);
0066d1e8                          int32_t eax_3;
0066d1e8                          eax_3 = *(uint8_t*)((esi_1 + ecx_3) - 4);
0066d1ec                          edi_2 -= 3;
0066d1ef                          ecx_3 -= 3;
0066d1f8                          char var_30_1 = i_2;
0066d1fc                          i_2 = *(uint8_t*)(esi_1 + ecx_3);
0066d1ff                          char var_2f_1 = eax_3;
0066d203                          char var_2e_1 = i_2;
0066d207                          eax_3 = 0xff;
0066d207                          
0066d20c                          if (ebx != 0xff)
0066d20c                          {
0066d216                              int32_t eax_6;
0066d216                              char edx_1;
0066d216                              edx_1 = HIGHD(((int64_t)((ebx + 1) * 0xff)));
0066d216                              eax_6 = LOWD(((int64_t)((ebx + 1) * 0xff)));
0066d21f                              eax_3 = ((eax_6 + ((uint32_t)edx_1)) >> 8);
0066d20c                          }
0066d20c                          
0066d224                          if ((ebx == 0xff || eax_3 != 0))
0066d224                          {
0066d230                              char var_34;
0066d230                              int32_t eax_9;
0066d230                              
0066d230                              if (eax_3 != 0xff)
0066d230                              {
0066d238                                  i_2 = *(uint8_t*)((char*)ecx_3 - 2);
0066d240                                  var_34 = i_2;
0066d244                                  i_2 = *(uint8_t*)((char*)ecx_3 - 1);
0066d247                                  char var_33_1 = i_2;
0066d24b                                  i_2 = *(uint8_t*)ecx_3;
0066d24d                                  char var_32_1 = i_2;
0066d251                                  int80_t st1;
0066d251                                  st1 = 0;
0066d25f                                  uint64_t st2 = _m_punpckhwd(0xffffff, 0);
0066d265                                  char var_31_1 = 0xff;
0066d26f                                  int64_t st0 = _m_punpckhwd(((uint64_t)var_34), 0);
0066d27e                                  st2 = ((_m_punpckhwd(((uint64_t)var_30_1), 0) & st2) | (st2 & !(st0)));
0066d281                                  uint64_t st3 = ((uint64_t)(eax_3 + 1));
0066d287                                  uint64_t st4 = _m_punpcklwd(st3, st3);
0066d290                                  st3 = _m_punpcklwd(st4, st4);
0066d299                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066d2ad                                  eax_9 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066d230                              }
0066d230                              else
0066d232                                  eax_9 = var_30_1;
0066d232                              
0066d2b0                              i_2 = eax_9;
0066d2b2                              var_34 = eax_9;
0066d2b6                              *(uint8_t*)((char*)ecx_3 - 2) = i_2;
0066d2c3                              *(uint8_t*)((char*)ecx_3 - 1) = (eax_9 >> 8);
0066d2c6                              *(uint8_t*)ecx_3 = (var_34 >> 0x10);
0066d224                          }
0066d224                          
0066d2c8                          i = i_1;
0066d2c8                          i_1 -= 1;
0066d2cc                      } while (i != 1);
0066d2d2                      i_2 = i_3;
0066d2d6                      esi = var_24;
0066d1c2                  }
0066d1c2                  
0066d2ec                  esi += edi_1;
0066d2ee                  cond:1_1 = var_20_1 != 1;
0066d2ef                  var_24 = esi;
0066d2f3                  var_2c += eax_1;
0066d2f7                  var_20_1 -= 1;
0066d2fb              } while (cond:1_1);
0066d19c          }
0066d190      }
0066d170  }

0066d1bd                                                                                         8d 49 00                               .I.
0066d30a                                cc cc cc cc cc cc                                                            ......

0066d310  void __convention("regparm") ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB,1>,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066d310  {
0066d31f      void* eax;
0066d31f      int32_t var_60 = *(uint32_t*)((char*)eax + 8);
0066d323      uint32_t ecx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066d327      int32_t var_5c = *(uint32_t*)((char*)eax + 0x14);
0066d32f      int32_t edx_1;
0066d32f      edx_1 = ecx_1 != 0;
0066d335      int32_t ecx_2 = (ecx_1 + edx_1);
0066d337      int32_t edx_2 = *(uint32_t*)((char*)eax + 0x20);
0066d337      
0066d340      if (edx_2 > 0)
0066d340      {
0066d346          int32_t ecx_3 = *(uint32_t*)((char*)eax + 0x1c);
0066d349          float var_20[0x4];
0066d349          float xmm0_1[0x2] = var_20[0];
0066d34e          float xmm1_1[0x4] = var_20;
0066d35d          float xmm4_1[0x2] = var_20[0];
0066d362          float xmm5_1[0x4] = var_20;
0066d369          uint32_t i_2 = (ecx_3 >> 2);
0066d36f          int32_t i_3 = (ecx_3 & 3);
0066d371          int32_t ecx_5 = *(uint32_t*)((char*)eax + 0xc);
0066d374          int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066d377          uint32_t i_5 = i_2;
0066d37b          int32_t i_4 = i_3;
0066d387          int32_t var_44_1 = edx_2;
0066d76a          bool cond:2_1;
0066d76a          
0066d76a          do
0066d76a          {
0066d392              uint32_t i = i_2;
0066d394              int64_t st0;
0066d394              int32_t st1[0x2];
0066d394              int64_t st2;
0066d394              int16_t st3[0x4];
0066d394              uint64_t st4;
0066d394              
0066d394              if (i_2 > 0)
0066d394              {
0066d3a3                  int32_t ebx_3 = ((i_2 << 4) + var_5c);
0066d3a3                  
0066d564                  do
0066d564                  {
0066d3a9                      int32_t edi_1 = *(uint32_t*)((var_60 + (i << 2)) - 4);
0066d3ae                      ebx_3 -= 0x10;
0066d3b1                      int32_t ecx_8 = 3;
0066d3ba                      int32_t var_40_1 = ebx_3;
0066d3be                      int32_t var_58_1 = edi_1;
0066d3c2                      int32_t var_54_1 = 3;
0066d558                      int32_t temp1_1;
0066d558                      
0066d558                      do
0066d558                      {
0066d3dc                          uint32_t edi_3 = ((edi_1 & 0xff000000) | g_SourceColor.__inner0);
0066d3e4                          uint32_t esi_3 = (edi_3 >> 0x18);
0066d3ed                          uint32_t var_64_1 = edi_3;
0066d3ed                          
0066d3f1                          if (ecx_2 != 0x100)
0066d3f1                          {
0066d3f8                              int32_t eax_5;
0066d3f8                              char edx_5;
0066d3f8                              edx_5 = HIGHD(((int64_t)(esi_3 * ecx_2)));
0066d3f8                              eax_5 = LOWD(((int64_t)(esi_3 * ecx_2)));
0066d404                              esi_3 = ((eax_5 + ((uint32_t)edx_5)) >> 8);
0066d3f1                          }
0066d3f1                          
0066d408                          if (esi_3 != 0)
0066d408                          {
0066d415                              if (esi_3 != 0xff)
0066d415                              {
0066d41b                                  int32_t ebx_4 = *(uint32_t*)(ebx_3 + (ecx_8 << 2));
0066d422                                  uint32_t eax_2;
0066d422                                  eax_2 = *(uint8_t*)((char*)ebx_4)[3];
0066d422                                  
0066d428                                  if (eax_2 != 0)
0066d428                                  {
0066d430                                      if (eax_2 != 0xff)
0066d430                                      {
0066d4a1                                          st1 = _m_punpckhwd(((uint64_t)ebx_4), 0);
0066d4aa                                          float xmm0_2[0x2] = _mm_cvtpi32_ps(xmm0_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066d4b9                                          float xmm0_4[0x4] = _mm_cvtpi32_ps((xmm0_2 | ((int64_t)(xmm0_2 << 0x40))), _m_punpcklwd(st1, 0));
0066d4bc                                          int32_t eax_9;
0066d4bc                                          char edx_7;
0066d4bc                                          edx_7 = HIGHD(((int64_t)((((uint32_t)eax_2) + 1) * (esi_3 + 1))));
0066d4bc                                          eax_9 = LOWD(((int64_t)((((uint32_t)eax_2) + 1) * (esi_3 + 1))));
0066d4c8                                          st1 = _m_punpckhwd(((uint64_t)edi_3), 0);
0066d4d1                                          float xmm1_2[0x2] = _mm_cvtpi32_ps(xmm1_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066d4e4                                          float xmm2_2[0x4] = ((float)(esi_3 + 1));
0066d4e8                                          int32_t ecx_11 = ((((uint32_t)eax_2) + 1) + ((esi_3 + 1) - ((eax_9 + ((uint32_t)edx_7)) >> 8)));
0066d4ea                                          float xmm3_2[0x4] = ((float)ecx_11);
0066d4f1                                          float xmm6_6[0x4] = _mm_shuffle_ps(xmm2_2, xmm2_2, 0);
0066d4f8                                          st1 = _m_punpcklwd(st1, 0);
0066d4fe                                          float xmm6_8[0x4] = _mm_shuffle_ps(xmm3_2, xmm3_2, 0);
0066d505                                          xmm1_1 = _mm_cvtpi32_ps((xmm1_2 | ((int64_t)(xmm1_2 << 0x40))), st1);
0066d514                                          float xmm0_5[0x4] = _mm_sub_ps(xmm0_4, _mm_div_ps(_mm_mul_ps(_mm_sub_ps(xmm0_4, xmm1_1), xmm6_6), xmm6_8));
0066d520                                          xmm0_1 = ((int64_t)(xmm0_5 >> 0x40));
0066d52c                                          ecx_11 -= 1;
0066d531                                          uint32_t var_64_3 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm0_5), _mm_cvtps_pi32(xmm0_1)), 0)[0];
0066d535                                          *(uint8_t*)((char*)var_64_3)[3] = ecx_11;
0066d539                                          edi_3 = var_64_3;
0066d53d                                          ecx_8 = var_54_1;
0066d430                                      }
0066d430                                      else
0066d430                                      {
0066d440                                          st2 = _m_punpckhwd(0xffffff, 0);
0066d449                                          st0 = _m_punpckhwd(((uint64_t)ebx_4), 0);
0066d45b                                          st2 = ((_m_punpckhwd(((uint64_t)edi_3), 0) & st2) | (st2 & !(st0)));
0066d45e                                          st3 = ((uint64_t)(esi_3 + 1));
0066d464                                          st4 = _m_punpcklwd(st3, st3[0]);
0066d46d                                          st3 = _m_punpcklwd(st4, st4[0]);
0066d476                                          st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066d48a                                          edi_3 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066d430                                      }
0066d428                                  }
0066d415                              }
0066d415                              
0066d541                              ebx_3 = var_40_1;
0066d545                              *(uint32_t*)(ebx_3 + (ecx_8 << 2)) = edi_3;
0066d408                          }
0066d408                          
0066d54c                          edi_1 = (var_58_1 << 8);
0066d54f                          temp1_1 = ecx_8;
0066d54f                          ecx_8 -= 1;
0066d550                          var_58_1 = edi_1;
0066d554                          var_54_1 = ecx_8;
0066d558                      } while ((temp1_1 - 1) >= 0);
0066d55e                      i -= 1;
0066d564                  } while (i > 0);
0066d564                  
0066d56a                  i_3 = i_4;
0066d56e                  i_2 = i_5;
0066d394              }
0066d394              
0066d574              if (i_3 != 0)
0066d574              {
0066d58a                  int32_t ebx_7 = ((i_2 << 4) + var_5c);
0066d592                  int32_t var_58_2 = ebx_7;
0066d596                  int32_t i_1 = i_3;
0066d596                  
0066d598                  if (i_3 > 0)
0066d598                  {
0066d737                      do
0066d737                      {
0066d5a4                          uint32_t edi_6 = ((uint32_t)*(uint8_t*)((i_1 + (var_60 + (i_2 << 2))) - 1));
0066d5af                          i_1 -= 1;
0066d5b3                          int32_t edi_8 = ((edi_6 << 0x18) | g_SourceColor.__inner0);
0066d5bb                          uint32_t esi_6 = (edi_8 >> 0x18);
0066d5c8                          int32_t var_64_4 = edi_8;
0066d5c8                          
0066d5cc                          if (ecx_2 != 0x100)
0066d5cc                          {
0066d5d3                              int32_t eax_14;
0066d5d3                              char edx_14;
0066d5d3                              edx_14 = HIGHD(((int64_t)(esi_6 * ecx_2)));
0066d5d3                              eax_14 = LOWD(((int64_t)(esi_6 * ecx_2)));
0066d5df                              esi_6 = ((eax_14 + ((uint32_t)edx_14)) >> 8);
0066d5cc                          }
0066d5cc                          
0066d5e3                          if (esi_6 != 0)
0066d5e3                          {
0066d5f0                              if (esi_6 != 0xff)
0066d5f0                              {
0066d5f6                                  int32_t ebx_8 = *(uint32_t*)(ebx_7 + (i_1 << 2));
0066d5fd                                  uint32_t eax_16;
0066d5fd                                  eax_16 = *(uint8_t*)((char*)ebx_8)[3];
0066d5fd                                  
0066d603                                  if (eax_16 != 0)
0066d603                                  {
0066d60b                                      if (eax_16 != 0xff)
0066d60b                                      {
0066d67c                                          st1 = _m_punpckhwd(((uint64_t)ebx_8), 0);
0066d685                                          float xmm4_2[0x2] = _mm_cvtpi32_ps(xmm4_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066d694                                          float xmm4_4[0x4] = _mm_cvtpi32_ps((xmm4_2 | ((int64_t)(xmm4_2 << 0x40))), _m_punpcklwd(st1, 0));
0066d697                                          int32_t eax_19;
0066d697                                          char edx_16;
0066d697                                          edx_16 = HIGHD(((int64_t)((((uint32_t)eax_16) + 1) * (esi_6 + 1))));
0066d697                                          eax_19 = LOWD(((int64_t)((((uint32_t)eax_16) + 1) * (esi_6 + 1))));
0066d69b                                          st1 = _m_punpckhwd(((uint64_t)edi_8), 0);
0066d6aa                                          float xmm5_2[0x2] = _mm_cvtpi32_ps(xmm5_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066d6bd                                          float xmm6_18[0x4] = ((float)(esi_6 + 1));
0066d6c4                                          float xmm7_2[0x4] = _mm_shuffle_ps(xmm6_18, xmm6_18, 0);
0066d6cf                                          int32_t ecx_16 = ((((uint32_t)eax_16) + 1) + ((esi_6 + 1) - ((eax_19 + ((uint32_t)edx_16)) >> 8)));
0066d6db                                          float xmm7_3[0x4] = ((float)ecx_16);
0066d6e2                                          xmm5_1 = _mm_cvtpi32_ps((xmm5_2 | ((int64_t)(xmm5_2 << 0x40))), _m_punpcklwd(st1, 0));
0066d6e8                                          float xmm6_20[0x4] = _mm_shuffle_ps(xmm7_3, xmm7_3, 0);
0066d701                                          float xmm4_5[0x4] = _mm_sub_ps(xmm4_4, __divps_xmmps_memps(__mulps_xmmps_memps(_mm_sub_ps(xmm4_4, xmm5_1), xmm7_2), xmm6_20));
0066d70d                                          xmm4_1 = ((int64_t)(xmm4_5 >> 0x40));
0066d719                                          ecx_16 -= 1;
0066d71e                                          int32_t var_64_6 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm4_5), _mm_cvtps_pi32(xmm4_1)), 0)[0];
0066d722                                          *(uint8_t*)((char*)var_64_6)[3] = ecx_16;
0066d726                                          edi_8 = var_64_6;
0066d60b                                      }
0066d60b                                      else
0066d60b                                      {
0066d61b                                          st2 = _m_punpckhwd(0xffffff, 0);
0066d624                                          st0 = _m_punpckhwd(((uint64_t)ebx_8), 0);
0066d636                                          st2 = ((_m_punpckhwd(((uint64_t)edi_8), 0) & st2) | (st2 & !(st0)));
0066d639                                          st3 = ((uint64_t)(esi_6 + 1));
0066d63f                                          st4 = _m_punpcklwd(st3, st3[0]);
0066d648                                          st3 = _m_punpcklwd(st4, st4[0]);
0066d651                                          st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066d665                                          edi_8 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066d60b                                      }
0066d603                                  }
0066d603                                  
0066d72e                                  ebx_7 = var_58_2;
0066d5f0                              }
0066d5f0                              
0066d732                              *(uint32_t*)(ebx_7 + (i_1 << 2)) = edi_8;
0066d5e3                          }
0066d737                      } while (i_1 > 0);
0066d737                      
0066d73d                      i_3 = i_4;
0066d741                      i_2 = i_5;
0066d598                  }
0066d574              }
0066d574              
0066d757              var_60 += ecx_5;
0066d761              cond:2_1 = var_44_1 != 1;
0066d762              var_5c += eax_1;
0066d766              var_44_1 -= 1;
0066d76a          } while (cond:2_1);
0066d340      }
0066d310  }

0066d38d                                         8d 49 00                                                               .I.
0066d3c8                          8d a4 24 00 00 00 00 90                                                          ..$.....
0066d779                                                                             cc cc cc cc cc cc cc                           .......

0066d780  void __convention("regparm") ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB,0>,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066d780  {
0066d78f      void* eax;
0066d78f      int32_t var_44 = *(uint32_t*)((char*)eax + 8);
0066d793      uint32_t ecx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066d797      int32_t var_40 = *(uint32_t*)((char*)eax + 0x14);
0066d79f      int32_t edx_1;
0066d79f      edx_1 = ecx_1 != 0;
0066d7a5      int32_t ecx_2 = (ecx_1 + edx_1);
0066d7a7      int32_t edx_2 = *(uint32_t*)((char*)eax + 0x20);
0066d7a7      
0066d7b0      if (edx_2 > 0)
0066d7b0      {
0066d7b6          int32_t ecx_3 = *(uint32_t*)((char*)eax + 0x1c);
0066d7bb          uint32_t i_3 = (ecx_3 >> 2);
0066d7c1          int32_t i_2 = (ecx_3 & 3);
0066d7c3          int32_t ecx_5 = *(uint32_t*)((char*)eax + 0xc);
0066d7c6          int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066d7c9          uint32_t i_5 = i_3;
0066d7cd          int32_t i_4 = i_2;
0066d7d9          int32_t var_28_1 = edx_2;
0066db4d          bool cond:1_1;
0066db4d          
0066db4d          do
0066db4d          {
0066d7e2              uint32_t i = i_3;
0066d7e4              uint64_t st0;
0066d7e4              int80_t st1;
0066d7e4              int64_t st2;
0066d7e4              int16_t st3[0x4];
0066d7e4              int64_t st4;
0066d7e4              
0066d7e4              if (i_3 > 0)
0066d7e4              {
0066d7f3                  int32_t edx_5 = ((i_3 << 4) + var_40);
0066d7f3                  
0066d987                  do
0066d987                  {
0066d7f9                      int32_t edi_1 = *(uint32_t*)((var_44 + (i << 2)) - 4);
0066d7fe                      edx_5 -= 0x10;
0066d805                      int32_t var_38_1 = edx_5;
0066d809                      int32_t var_48_1 = 3;
0066d97b                      bool cond:5_1;
0066d97b                      
0066d97b                      do
0066d97b                      {
0066d81f                          int32_t ebx_3 = ((edi_1 & 0xff000000) | g_SourceColor.__inner0);
0066d827                          uint32_t esi_3 = (ebx_3 >> 0x18);
0066d827                          
0066d834                          if (ecx_2 != 0x100)
0066d834                          {
0066d83b                              int32_t eax_5;
0066d83b                              char edx_6;
0066d83b                              edx_6 = HIGHD(((int64_t)(esi_3 * ecx_2)));
0066d83b                              eax_5 = LOWD(((int64_t)(esi_3 * ecx_2)));
0066d844                              edx_5 = var_38_1;
0066d84b                              esi_3 = ((eax_5 + ((uint32_t)edx_6)) >> 8);
0066d834                          }
0066d834                          
0066d84f                          if (esi_3 != 0)
0066d84f                          {
0066d85c                              if (esi_3 != 0xff)
0066d85c                              {
0066d866                                  int32_t ecx_11 = *(uint32_t*)(edx_5 + (var_48_1 << 2));
0066d86d                                  int32_t eax_8;
0066d86d                                  eax_8 = *(uint8_t*)((char*)ecx_11)[3];
0066d86d                                  
0066d873                                  if (eax_8 != 0)
0066d873                                  {
0066d87b                                      if (eax_8 != 0xff)
0066d87b                                      {
0066d8e6                                          int32_t eax_11;
0066d8e6                                          char edx_8;
0066d8e6                                          edx_8 = HIGHD(((int64_t)((((uint32_t)eax_8) + 1) * (esi_3 + 1))));
0066d8e6                                          eax_11 = LOWD(((int64_t)((((uint32_t)eax_8) + 1) * (esi_3 + 1))));
0066d8f6                                          uint32_t eax_14 = ((uint32_t)*(uint8_t*)((char*)ecx_11)[2]);
0066d8fb                                          int32_t ecx_14 = ((((uint32_t)eax_8) + 1) + ((esi_3 + 1) - ((eax_11 + ((uint32_t)edx_8)) >> 8)));
0066d8fd                                          uint32_t edx_12 = ((uint32_t)*(uint8_t*)((char*)ecx_11)[1]);
0066d906                                          uint32_t edx_13 = ((uint32_t)ecx_11);
0066d92a                                          int32_t var_50_1;
0066d92a                                          *(uint8_t*)((char*)var_50_1)[2] = (eax_14 - ((int8_t)(((int64_t)((eax_14 - ((uint32_t)*(uint8_t*)((char*)ebx_3)[2])) * (esi_3 + 1))) / ecx_14)));
0066d93f                                          *(uint8_t*)((char*)var_50_1)[1] = (edx_12 - ((int8_t)(((int64_t)((edx_12 - ((uint32_t)*(uint8_t*)((char*)ebx_3)[1])) * (esi_3 + 1))) / ecx_14)));
0066d954                                          edx_5 = var_38_1;
0066d958                                          uint32_t ebx_4;
0066d958                                          ebx_4 = (edx_13 - ((int8_t)(((int64_t)((edx_13 - ((uint32_t)ebx_3)) * (esi_3 + 1))) / ecx_14)));
0066d95a                                          ecx_14 -= 1;
0066d95c                                          var_50_1 = ebx_4;
0066d960                                          *(uint8_t*)((char*)var_50_1)[3] = ecx_14;
0066d964                                          ebx_3 = var_50_1;
0066d87b                                      }
0066d87b                                      else
0066d87b                                      {
0066d87d                                          st1 = 0;
0066d88b                                          st2 = _m_punpckhwd(0xffffff, 0);
0066d894                                          st0 = _m_punpckhwd(((uint64_t)ecx_11), 0);
0066d8a6                                          st2 = ((_m_punpckhwd(((uint64_t)ebx_3), 0) & st2) | (st2 & !(st0)));
0066d8a9                                          st3 = ((uint64_t)(esi_3 + 1));
0066d8af                                          st4 = _m_punpcklwd(st3, st3[0]);
0066d8b8                                          st3 = _m_punpcklwd(st4, st4[0]);
0066d8c1                                          st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066d8d5                                          ebx_3 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066d87b                                      }
0066d873                                  }
0066d85c                              }
0066d85c                              
0066d96c                              *(uint32_t*)(edx_5 + (var_48_1 << 2)) = ebx_3;
0066d84f                          }
0066d84f                          
0066d973                          edi_1 <<= 8;
0066d976                          cond:5_1 = (var_48_1 - 1) >= 0;
0066d977                          var_48_1 -= 1;
0066d97b                      } while (cond:5_1);
0066d981                      i -= 1;
0066d987                  } while (i > 0);
0066d987                  
0066d98d                  i_2 = i_4;
0066d991                  i_3 = i_5;
0066d7e4              }
0066d7e4              
0066d997              if (i_2 != 0)
0066d997              {
0066d9b1                  int32_t ecx_18 = ((i_3 << 4) + var_40);
0066d9b5                  int32_t var_3c_2 = ecx_18;
0066d9b9                  int32_t i_1 = i_2;
0066d9b9                  
0066d9bb                  if (i_2 > 0)
0066d9bb                  {
0066db1a                      do
0066db1a                      {
0066d9c5                          uint32_t ebx_5 = ((uint32_t)*(uint8_t*)((i_1 + (var_44 + (i_3 << 2))) - 1));
0066d9d0                          i_1 -= 1;
0066d9d4                          int32_t ebx_7 = ((ebx_5 << 0x18) | g_SourceColor.__inner0);
0066d9dc                          uint32_t esi_6 = (ebx_7 >> 0x18);
0066d9dc                          
0066d9e9                          if (ecx_2 != 0x100)
0066d9e9                          {
0066d9f0                              int32_t eax_34;
0066d9f0                              char edx_26;
0066d9f0                              edx_26 = HIGHD(((int64_t)(esi_6 * ecx_2)));
0066d9f0                              eax_34 = LOWD(((int64_t)(esi_6 * ecx_2)));
0066d9fc                              esi_6 = ((eax_34 + ((uint32_t)edx_26)) >> 8);
0066d9e9                          }
0066d9e9                          
0066da00                          if (esi_6 != 0)
0066da00                          {
0066da0d                              if (esi_6 != 0xff)
0066da0d                              {
0066da13                                  int32_t edx_28 = *(uint32_t*)(ecx_18 + (i_1 << 2));
0066da1a                                  int32_t eax_36;
0066da1a                                  eax_36 = *(uint8_t*)((char*)edx_28)[3];
0066da1a                                  
0066da20                                  if (eax_36 != 0)
0066da20                                  {
0066da28                                      if (eax_36 != 0xff)
0066da28                                      {
0066da93                                          int32_t eax_39;
0066da93                                          char edx_29;
0066da93                                          edx_29 = HIGHD(((int64_t)((((uint32_t)eax_36) + 1) * (esi_6 + 1))));
0066da93                                          eax_39 = LOWD(((int64_t)((((uint32_t)eax_36) + 1) * (esi_6 + 1))));
0066daa3                                          uint32_t eax_42 = ((uint32_t)*(uint8_t*)((char*)edx_28)[2]);
0066daa8                                          int32_t ecx_21 = ((((uint32_t)eax_36) + 1) + ((esi_6 + 1) - ((eax_39 + ((uint32_t)edx_29)) >> 8)));
0066daaa                                          uint32_t edx_33 = ((uint32_t)*(uint8_t*)((char*)edx_28)[1]);
0066dab3                                          uint32_t edx_34 = ((uint32_t)edx_28);
0066dad7                                          int32_t var_50_2;
0066dad7                                          *(uint8_t*)((char*)var_50_2)[2] = (eax_42 - ((int8_t)(((int64_t)((eax_42 - ((uint32_t)*(uint8_t*)((char*)ebx_7)[2])) * (esi_6 + 1))) / ecx_21)));
0066daec                                          *(uint8_t*)((char*)var_50_2)[1] = (edx_33 - ((int8_t)(((int64_t)((edx_33 - ((uint32_t)*(uint8_t*)((char*)ebx_7)[1])) * (esi_6 + 1))) / ecx_21)));
0066db01                                          uint32_t ebx_8;
0066db01                                          ebx_8 = (edx_34 - ((int8_t)(((int64_t)((edx_34 - ((uint32_t)ebx_7)) * (esi_6 + 1))) / ecx_21)));
0066db03                                          ecx_21 -= 1;
0066db05                                          *(uint8_t*)((char*)var_50_2)[3] = ecx_21;
0066db09                                          ecx_18 = var_3c_2;
0066db0d                                          var_50_2 = ebx_8;
0066db11                                          ebx_7 = var_50_2;
0066da28                                      }
0066da28                                      else
0066da28                                      {
0066da2a                                          st1 = 0;
0066da38                                          st2 = _m_punpckhwd(0xffffff, 0);
0066da41                                          st0 = _m_punpckhwd(((uint64_t)edx_28), 0);
0066da53                                          st2 = ((_m_punpckhwd(((uint64_t)ebx_7), 0) & st2) | (st2 & !(st0)));
0066da56                                          st3 = ((uint64_t)(esi_6 + 1));
0066da5c                                          st4 = _m_punpcklwd(st3, st3[0]);
0066da65                                          st3 = _m_punpcklwd(st4, st4[0]);
0066da6e                                          st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066da82                                          ebx_7 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066da28                                      }
0066da20                                  }
0066da0d                              }
0066da0d                              
0066db15                              *(uint32_t*)(ecx_18 + (i_1 << 2)) = ebx_7;
0066da00                          }
0066db1a                      } while (i_1 > 0);
0066db1a                      
0066db20                      i_2 = i_4;
0066db24                      i_3 = i_5;
0066d9bb                  }
0066d997              }
0066d997              
0066db40              cond:1_1 = var_28_1 != 1;
0066db41              var_44 += ecx_5;
0066db45              var_40 += eax_1;
0066db49              var_28_1 -= 1;
0066db4d          } while (cond:1_1);
0066d7b0      }
0066d780  }

0066db5c                                                                                      cc cc cc cc                              ....

0066db60  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_ARGB,1>,BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066db60  {
0066db71      void* eax;
0066db71      float var_20[0x4];
0066db71      int64_t st0;
0066db71      uint64_t st1;
0066db71      uint64_t st2;
0066db71      uint64_t st3;
0066db71      uint64_t st4;
0066db71      
0066db71      if (*(uint32_t*)((char*)eax + 8) == 0)
0066db71      {
0066dd82          int32_t edx_10 = *(uint32_t*)((char*)eax + 0x14);
0066dd85          union __inner0 = g_SourceColor.__inner0;
0066dd89          union ecx_6;
0066dd89          *(uint8_t*)((char*)ecx_6 + 0) = *(uint8_t*)((char*)eax + 0x24);
0066dd8c          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_6 + 0);
0066dd90          union ecx_7 = *(uint32_t*)((char*)eax + 0x20);
0066dd95          int32_t var_2c_2 = edx_10;
0066dd95          
0066dd99          if (ecx_7 > 0)
0066dd99          {
0066dd9f              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066dda5              float xmm0_6[0x2] = var_20[0];
0066ddaa              float xmm1_4[0x4] = var_20;
0066ddbd              union var_30_2 = *(uint32_t*)((char*)eax + 0x18);
0066ddc1              union var_28_2 = ecx_7;
0066df53              bool cond:4_1;
0066df53              
0066df53              do
0066df53              {
0066ddd0                  int32_t i = i_3;
0066ddd0                  
0066ddd6                  if (i > 0)
0066ddd6                  {
0066dde0                      uint32_t ecx_9 = (__inner0 >> 0x18);
0066dde0                      
0066df3a                      do
0066df3a                      {
0066ddeb                          i -= 1;
0066ddeb                          
0066ddee                          if (ecx_9 != 0)
0066ddee                          {
0066ddfb                              union __inner0_3;
0066ddfb                              
0066ddfb                              if (ecx_9 != 0xff)
0066ddfb                              {
0066de06                                  int32_t edi_3 = *(uint32_t*)(edx_10 + (i << 2));
0066de0d                                  *(uint8_t*)((char*)__inner0_3 + 0) = *(uint8_t*)((char*)edi_3)[3];
0066de0d                                  
0066de13                                  if (*(uint8_t*)((char*)__inner0_3 + 0) == 0)
0066de15                                      __inner0_3 = __inner0;
0066de13                                  else if (*(uint8_t*)((char*)__inner0_3 + 0) != 0xff)
0066de20                                  {
0066de93                                      st1 = _m_punpckhwd(((uint64_t)edi_3), 0);
0066de9c                                      float xmm0_7[0x2] = _mm_cvtpi32_ps(xmm0_6, __punpckhwd_mmxq_mmxd(st1, 0));
0066deab                                      float xmm0_9[0x4] = _mm_cvtpi32_ps((xmm0_7 | ((int64_t)(xmm0_7 << 0x40))), _m_punpcklwd(st1, 0));
0066deb3                                      int32_t eax_14;
0066deb3                                      char edx_11;
0066deb3                                      edx_11 = HIGHD(((int64_t)((((uint32_t)*(uint8_t*)((char*)__inner0_3 + 0)) + 1) * (ecx_9 + 1))));
0066deb3                                      eax_14 = LOWD(((int64_t)((((uint32_t)*(uint8_t*)((char*)__inner0_3 + 0)) + 1) * (ecx_9 + 1))));
0066debc                                      st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066dec8                                      float xmm1_5[0x2] = _mm_cvtpi32_ps(xmm1_4, __punpckhwd_mmxq_mmxd(st1, 0));
0066ded8                                      float xmm2_5[0x4] = ((float)(ecx_9 + 1));
0066dedc                                      int32_t ecx_12 = ((((uint32_t)*(uint8_t*)((char*)__inner0_3 + 0)) + 1) + ((ecx_9 + 1) - ((eax_14 + ((uint32_t)edx_11)) >> 8)));
0066dede                                      edx_10 = var_2c_2;
0066dee5                                      float xmm4_19[0x4] = _mm_shuffle_ps(xmm2_5, xmm2_5, 0);
0066deec                                      float xmm3_5[0x4] = ((float)ecx_12);
0066def0                                      st1 = _m_punpcklwd(st1, 0);
0066def6                                      float xmm4_21[0x4] = _mm_shuffle_ps(xmm3_5, xmm3_5, 0);
0066defd                                      xmm1_4 = _mm_cvtpi32_ps((xmm1_5 | ((int64_t)(xmm1_5 << 0x40))), st1);
0066df0c                                      float xmm0_10[0x4] = _mm_sub_ps(xmm0_9, _mm_div_ps(_mm_mul_ps(_mm_sub_ps(xmm0_9, xmm1_4), xmm4_19), xmm4_21));
0066df18                                      xmm0_6 = ((int64_t)(xmm0_10 >> 0x40));
0066df27                                      union __inner0_4 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm0_10), _mm_cvtps_pi32(xmm0_6)), 0);
0066df2b                                      ecx_12 -= 1;
0066df2d                                      *(uint8_t*)((char*)__inner0_4 + 3) = ecx_12;
0066df31                                      __inner0_3 = __inner0_4;
0066de20                                  }
0066de20                                  else
0066de20                                  {
0066de35                                      st2 = _m_punpckhwd(0xffffff, 0);
0066de3e                                      st0 = _m_punpckhwd(((uint64_t)edi_3), 0);
0066de4d                                      st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066de50                                      st3 = ((uint64_t)(ecx_9 + 1));
0066de56                                      st4 = _m_punpcklwd(st3, st3);
0066de5f                                      st3 = _m_punpcklwd(st4, st4);
0066de68                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066de7c                                      __inner0_3 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066de20                                  }
0066ddfb                              }
0066ddfb                              else
0066ddfd                                  __inner0_3 = __inner0;
0066ddfd                              
0066df35                              *(uint32_t*)(edx_10 + (i << 2)) = __inner0_3;
0066ddee                          }
0066df3a                      } while (i > 0);
0066ddd6                  }
0066ddd6                  
0066df48                  edx_10 -= var_30_2;
0066df4a                  cond:4_1 = var_28_2 != 1;
0066df4b                  var_2c_2 = edx_10;
0066df4f                  var_28_2 -= 1;
0066df53              } while (cond:4_1);
0066dd99          }
0066db71      }
0066db71      else
0066db71      {
0066db77          uint32_t ecx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066db7b          int32_t edi_1 = *(uint32_t*)((char*)eax + 0x14);
0066db82          int32_t edx;
0066db82          edx = ecx_1 != 0;
0066db85          int32_t var_38_1 = edi_1;
0066db89          int32_t ecx_2 = (ecx_1 + edx);
0066db8b          uint32_t edx_1 = *(uint32_t*)((char*)eax + 0x20);
0066db90          int32_t var_24_1 = ecx_2;
0066db90          
0066db94          if (edx_1 > 0)
0066db94          {
0066db9a              int32_t i_2 = *(uint32_t*)((char*)eax + 0x1c);
0066dba0              float xmm0_1[0x2] = var_20[0];
0066dba5              float xmm1_1[0x4] = var_20;
0066dbb8              uint32_t var_30_1 = *(uint32_t*)((char*)eax + 0x18);
0066dbbc              uint32_t var_2c_1 = edx_1;
0066dd71              bool cond:3_1;
0066dd71              
0066dd71              do
0066dd71              {
0066dbc0                  int32_t i_1 = i_2;
0066dbc0                  
0066dbc6                  if (i_1 > 0)
0066dbc6                  {
0066dbcc                      uint32_t edx_2 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
0066dbcc                      
0066dd58                      do
0066dd58                      {
0066dbe0                          uint32_t esi_1 = edx_2;
0066dbe4                          i_1 -= 1;
0066dbe4                          
0066dbeb                          if (ecx_2 != 0x100)
0066dbeb                          {
0066dbf2                              int32_t eax_3;
0066dbf2                              char edx_3;
0066dbf2                              edx_3 = HIGHD(((int64_t)(esi_1 * ecx_2)));
0066dbf2                              eax_3 = LOWD(((int64_t)(esi_1 * ecx_2)));
0066dbfe                              esi_1 = ((eax_3 + ((uint32_t)edx_3)) >> 8);
0066dbeb                          }
0066dbeb                          
0066dc02                          if (esi_1 != 0)
0066dc02                          {
0066dc0f                              uint32_t __inner0_1;
0066dc0f                              
0066dc0f                              if (esi_1 != 0xff)
0066dc0f                              {
0066dc1b                                  int32_t edi_2 = *(uint32_t*)(edi_1 + (i_1 << 2));
0066dc22                                  __inner0_1 = *(uint8_t*)((char*)edi_2)[3];
0066dc22                                  
0066dc28                                  if (__inner0_1 == 0)
0066dc2a                                      __inner0_1 = g_SourceColor.__inner0;
0066dc28                                  else if (__inner0_1 != 0xff)
0066dc36                                  {
0066dcab                                      st1 = _m_punpckhwd(((uint64_t)edi_2), 0);
0066dcb4                                      float xmm0_2[0x2] = _mm_cvtpi32_ps(xmm0_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066dcc3                                      float xmm0_4[0x4] = _mm_cvtpi32_ps((xmm0_2 | ((int64_t)(xmm0_2 << 0x40))), _m_punpcklwd(st1, 0));
0066dccd                                      int32_t eax_7;
0066dccd                                      char edx_5;
0066dccd                                      edx_5 = HIGHD(((int64_t)((((uint32_t)__inner0_1) + 1) * (esi_1 + 1))));
0066dccd                                      eax_7 = LOWD(((int64_t)((((uint32_t)__inner0_1) + 1) * (esi_1 + 1))));
0066dcce                                      st1 = _m_punpckhwd(((uint64_t)g_SourceColor.__inner0), 0);
0066dce2                                      float xmm1_2[0x2] = _mm_cvtpi32_ps(xmm1_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066dcf2                                      float xmm2_2[0x4] = ((float)(esi_1 + 1));
0066dcf6                                      int32_t ecx_5 = ((((uint32_t)__inner0_1) + 1) + ((esi_1 + 1) - ((eax_7 + ((uint32_t)edx_5)) >> 8)));
0066dcf8                                      float xmm3_2[0x4] = ((float)ecx_5);
0066dcff                                      float xmm4_6[0x4] = _mm_shuffle_ps(xmm2_2, xmm2_2, 0);
0066dd06                                      st1 = _m_punpcklwd(st1, 0);
0066dd0c                                      float xmm4_8[0x4] = _mm_shuffle_ps(xmm3_2, xmm3_2, 0);
0066dd13                                      xmm1_1 = _mm_cvtpi32_ps((xmm1_2 | ((int64_t)(xmm1_2 << 0x40))), st1);
0066dd22                                      float xmm0_5[0x4] = _mm_sub_ps(xmm0_4, _mm_div_ps(_mm_mul_ps(_mm_sub_ps(xmm0_4, xmm1_1), xmm4_6), xmm4_8));
0066dd2e                                      xmm0_1 = ((int64_t)(xmm0_5 >> 0x40));
0066dd3d                                      ecx_5 -= 1;
0066dd3f                                      uint32_t __inner0_2 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm0_5), _mm_cvtps_pi32(xmm0_1)), 0);
0066dd43                                      *(uint8_t*)((char*)__inner0_2)[3] = ecx_5;
0066dd47                                      __inner0_1 = __inner0_2;
0066dd4b                                      ecx_2 = var_24_1;
0066dc36                                  }
0066dc36                                  else
0066dc36                                  {
0066dc4d                                      st2 = _m_punpckhwd(0xffffff, 0);
0066dc56                                      st0 = _m_punpckhwd(((uint64_t)edi_2), 0);
0066dc65                                      st2 = ((_m_punpckhwd(((uint64_t)g_SourceColor.__inner0), 0) & st2) | (st2 & !(st0)));
0066dc68                                      st3 = ((uint64_t)(esi_1 + 1));
0066dc6e                                      st4 = _m_punpcklwd(st3, st3);
0066dc77                                      st3 = _m_punpcklwd(st4, st4);
0066dc80                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066dc94                                      __inner0_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066dc36                                  }
0066dc0f                              }
0066dc0f                              else
0066dc11                                  __inner0_1 = g_SourceColor.__inner0;
0066dc11                              
0066dd4f                              edi_1 = var_38_1;
0066dd53                              *(uint32_t*)(edi_1 + (i_1 << 2)) = __inner0_1;
0066dc02                          }
0066dd58                      } while (i_1 > 0);
0066dbc6                  }
0066dbc6                  
0066dd66                  edi_1 += var_30_1;
0066dd68                  cond:3_1 = var_2c_1 != 1;
0066dd69                  var_38_1 = edi_1;
0066dd6d                  var_2c_1 -= 1;
0066dd71              } while (cond:3_1);
0066db94          }
0066db71      }
0066db60  }

0066dbd9                                                                             8d a4 24 00 00 00 00                           ..$....
0066ddc7                       8d a4 24 00 00 00 00 8b ff                                                         ..$......
0066df62        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0066df70  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_ARGB,0>,BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066df70  {
0066df81      void* eax;
0066df81      uint64_t st0;
0066df81      int80_t st1;
0066df81      int64_t st2;
0066df81      int16_t st3[0x4];
0066df81      int64_t st4;
0066df81      
0066df81      if (*(uint32_t*)((char*)eax + 8) == 0)
0066df81      {
0066e157          int32_t edx_16 = *(uint32_t*)((char*)eax + 0x14);
0066e15a          union __inner0 = g_SourceColor.__inner0;
0066e15e          union ecx_11;
0066e15e          *(uint8_t*)((char*)ecx_11 + 0) = *(uint8_t*)((char*)eax + 0x24);
0066e161          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_11 + 0);
0066e165          union ecx_12 = *(uint32_t*)((char*)eax + 0x20);
0066e16a          int32_t var_24_2 = edx_16;
0066e16a          
0066e16e          if (ecx_12 > 0)
0066e16e          {
0066e174              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066e17e              union var_28_2 = *(uint32_t*)((char*)eax + 0x18);
0066e182              union var_20_2 = ecx_12;
0066e2e9              bool cond:4_1;
0066e2e9              
0066e2e9              do
0066e2e9              {
0066e190                  int32_t i = i_3;
0066e190                  
0066e196                  if (i > 0)
0066e196                  {
0066e1a0                      uint32_t ecx_14 = (__inner0 >> 0x18);
0066e1a0                      
0066e2d0                      do
0066e2d0                      {
0066e1ab                          i -= 1;
0066e1ab                          
0066e1ae                          if (ecx_14 != 0)
0066e1ae                          {
0066e1bb                              union __inner0_3;
0066e1bb                              
0066e1bb                              if (ecx_14 != 0xff)
0066e1bb                              {
0066e1c6                                  union ecx_15 = *(uint32_t*)(edx_16 + (i << 2));
0066e1cd                                  *(uint8_t*)((char*)__inner0_3 + 0) = *(uint8_t*)((char*)ecx_15 + 3);
0066e1cd                                  
0066e1d3                                  if (*(uint8_t*)((char*)__inner0_3 + 0) == 0)
0066e1d5                                      __inner0_3 = __inner0;
0066e1d3                                  else if (*(uint8_t*)((char*)__inner0_3 + 0) != 0xff)
0066e1e0                                  {
0066e247                                      uint32_t ebx_6 = ((uint32_t)*(uint8_t*)((char*)ecx_15 + 2));
0066e252                                      int32_t eax_29;
0066e252                                      char edx_17;
0066e252                                      edx_17 = HIGHD(((int64_t)((((uint32_t)*(uint8_t*)((char*)__inner0_3 + 0)) + 1) * (ecx_14 + 1))));
0066e252                                      eax_29 = LOWD(((int64_t)((((uint32_t)*(uint8_t*)((char*)__inner0_3 + 0)) + 1) * (ecx_14 + 1))));
0066e262                                      uint32_t eax_32 = ((uint32_t)*(uint8_t*)((char*)ecx_15 + 1));
0066e267                                      int32_t ecx_18 = ((((uint32_t)*(uint8_t*)((char*)__inner0_3 + 0)) + 1) + ((ecx_14 + 1) - ((eax_29 + ((uint32_t)edx_17)) >> 8)));
0066e269                                      uint32_t edx_21 = ((uint32_t)*(uint8_t*)((char*)ecx_15 + 0));
0066e28a                                      ebx_6 -= ((int8_t)(((int64_t)((ebx_6 - ((uint32_t)*(uint8_t*)((char*)__inner0 + 2))) * (ecx_14 + 1))) / ecx_18));
0066e28c                                      union __inner0_4;
0066e28c                                      *(uint8_t*)((char*)__inner0_4 + 2) = ebx_6;
0066e2a3                                      uint32_t ebx_7;
0066e2a3                                      ebx_7 = (eax_32 - ((int8_t)(((int64_t)((eax_32 - ((uint32_t)*(uint8_t*)((char*)__inner0 + 1))) * (ecx_14 + 1))) / ecx_18)));
0066e2a5                                      *(uint8_t*)((char*)__inner0_4 + 1) = ebx_7;
0066e2b7                                      edx_16 = var_24_2;
0066e2bb                                      uint32_t ebx_8;
0066e2bb                                      ebx_8 = (edx_21 - ((int8_t)(((int64_t)((edx_21 - ((uint32_t)*(uint8_t*)((char*)__inner0 + 0))) * (ecx_14 + 1))) / ecx_18)));
0066e2bd                                      ecx_18 -= 1;
0066e2bf                                      *(uint8_t*)((char*)__inner0_4 + 0) = ebx_8;
0066e2c3                                      *(uint8_t*)((char*)__inner0_4 + 3) = ecx_18;
0066e2c7                                      __inner0_3 = __inner0_4;
0066e1e0                                  }
0066e1e0                                  else
0066e1e0                                  {
0066e1ec                                      st1 = 0;
0066e1f5                                      st2 = _m_punpckhwd(0xffffff, 0);
0066e1fe                                      st0 = _m_punpckhwd(((uint64_t)ecx_15), 0);
0066e20d                                      st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066e210                                      st3 = ((uint64_t)(ecx_14 + 1));
0066e216                                      st4 = _m_punpcklwd(st3, st3[0]);
0066e21f                                      st3 = _m_punpcklwd(st4, st4[0]);
0066e228                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066e23c                                      __inner0_3 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066e1e0                                  }
0066e1bb                              }
0066e1bb                              else
0066e1bd                                  __inner0_3 = __inner0;
0066e1bd                              
0066e2cb                              *(uint32_t*)(edx_16 + (i << 2)) = __inner0_3;
0066e1ae                          }
0066e2d0                      } while (i > 0);
0066e196                  }
0066e196                  
0066e2de                  edx_16 -= var_28_2;
0066e2e0                  cond:4_1 = var_20_2 != 1;
0066e2e1                  var_24_2 = edx_16;
0066e2e5                  var_20_2 -= 1;
0066e2e9              } while (cond:4_1);
0066e16e          }
0066df81      }
0066df81      else
0066df81      {
0066df87          uint32_t ebx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066df92          int32_t edx;
0066df92          edx = ebx_1 != 0;
0066df95          int32_t var_30 = *(uint32_t*)((char*)eax + 0x14);
0066df99          int32_t ecx_2 = *(uint32_t*)((char*)eax + 0x20);
0066df9c          int32_t ebx_2 = (ebx_1 + edx);
0066dfa0          int32_t var_18_1 = ebx_2;
0066dfa0          
0066dfa4          if (ecx_2 > 0)
0066dfa4          {
0066dfaa              int32_t i_2 = *(uint32_t*)((char*)eax + 0x1c);
0066dfb4              int32_t var_28_1 = *(uint32_t*)((char*)eax + 0x18);
0066dfb8              int32_t var_24_1 = ecx_2;
0066e146              bool cond:3_1;
0066e146              
0066e146              do
0066e146              {
0066dfc0                  int32_t i_1 = i_2;
0066dfc0                  
0066dfc6                  while (i_1 > 0)
0066dfc6                  {
0066dfd0                      uint32_t esi_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
0066dfd7                      i_1 -= 1;
0066dfd7                      
0066dfde                      if (ebx_2 != 0x100)
0066dfde                      {
0066dfe5                          int32_t eax_3;
0066dfe5                          char edx_1;
0066dfe5                          edx_1 = HIGHD(((int64_t)(esi_1 * ebx_2)));
0066dfe5                          eax_3 = LOWD(((int64_t)(esi_1 * ebx_2)));
0066dff1                          esi_1 = ((eax_3 + ((uint32_t)edx_1)) >> 8);
0066dfde                      }
0066dfde                      
0066dff5                      if (esi_1 != 0)
0066dff5                      {
0066e002                          int32_t __inner0_1;
0066e002                          
0066e002                          if (esi_1 != 0xff)
0066e002                          {
0066e012                              int32_t ecx_4 = *(uint32_t*)(var_30 + (i_1 << 2));
0066e019                              __inner0_1 = *(uint8_t*)((char*)ecx_4)[3];
0066e019                              
0066e01f                              if (__inner0_1 == 0)
0066e021                                  __inner0_1 = g_SourceColor.__inner0;
0066e01f                              else if (__inner0_1 != 0xff)
0066e02d                              {
0066e096                                  uint32_t ebx_3 = ((uint32_t)*(uint8_t*)((char*)ecx_4)[2]);
0066e0a1                                  int32_t eax_7;
0066e0a1                                  char edx_3;
0066e0a1                                  edx_3 = HIGHD(((int64_t)((((uint32_t)__inner0_1) + 1) * (esi_1 + 1))));
0066e0a1                                  eax_7 = LOWD(((int64_t)((((uint32_t)__inner0_1) + 1) * (esi_1 + 1))));
0066e0b1                                  uint32_t eax_10 = ((uint32_t)*(uint8_t*)((char*)ecx_4)[1]);
0066e0b6                                  int32_t ecx_7 = ((((uint32_t)__inner0_1) + 1) + ((esi_1 + 1) - ((eax_7 + ((uint32_t)edx_3)) >> 8)));
0066e0b8                                  uint32_t edx_7 = ((uint32_t)ecx_4);
0066e0dd                                  ebx_3 -= ((int8_t)(((int64_t)((ebx_3 - ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 2))) * (esi_1 + 1))) / ecx_7));
0066e0df                                  int32_t __inner0_2;
0066e0df                                  *(uint8_t*)((char*)__inner0_2)[2] = ebx_3;
0066e0f8                                  uint32_t ebx_4;
0066e0f8                                  ebx_4 = (eax_10 - ((int8_t)(((int64_t)((eax_10 - ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 1))) * (esi_1 + 1))) / ecx_7)));
0066e0fa                                  *(uint8_t*)((char*)__inner0_2)[1] = ebx_4;
0066e10c                                  uint32_t ebx_5;
0066e10c                                  ebx_5 = (edx_7 - ((int8_t)(((int64_t)((edx_7 - ((uint32_t)*(uint8_t*)((char*)g_SourceColor.__inner0 + 0))) * (esi_1 + 1))) / ecx_7)));
0066e10e                                  ecx_7 -= 1;
0066e110                                  __inner0_2 = ebx_5;
0066e114                                  ebx_2 = var_18_1;
0066e118                                  *(uint8_t*)((char*)__inner0_2)[3] = ecx_7;
0066e11c                                  __inner0_1 = __inner0_2;
0066e02d                              }
0066e02d                              else
0066e02d                              {
0066e036                                  st1 = 0;
0066e044                                  st2 = _m_punpckhwd(0xffffff, 0);
0066e04d                                  st0 = _m_punpckhwd(((uint64_t)ecx_4), 0);
0066e05c                                  st2 = ((_m_punpckhwd(((uint64_t)g_SourceColor.__inner0), 0) & st2) | (st2 & !(st0)));
0066e05f                                  st3 = ((uint64_t)(esi_1 + 1));
0066e065                                  st4 = _m_punpcklwd(st3, st3[0]);
0066e06e                                  st3 = _m_punpcklwd(st4, st4[0]);
0066e077                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066e08b                                  __inner0_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066e02d                              }
0066e002                          }
0066e002                          else
0066e004                              __inner0_1 = g_SourceColor.__inner0;
0066e004                          
0066e124                          *(uint32_t*)(var_30 + (i_1 << 2)) = __inner0_1;
0066dff5                      }
0066dfc6                  }
0066dfc6                  
0066e13d                  cond:3_1 = var_24_1 != 1;
0066e13e                  var_30 += var_28_1;
0066e142                  var_24_1 -= 1;
0066e146              } while (cond:3_1);
0066dfa4          }
0066df81      }
0066df70  }

0066e188                          8d a4 24 00 00 00 00 90                                                          ..$.....
0066e2f8                                                                          cc cc cc cc cc cc cc cc                          ........

0066e300  void __convention("regparm") ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_XRGB,0>,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066e300  {
0066e30c      void* eax;
0066e30c      int32_t var_3c = *(uint32_t*)((char*)eax + 8);
0066e310      uint32_t ecx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066e318      int32_t edx;
0066e318      edx = ecx_1 != 0;
0066e31c      int32_t ebx = *(uint32_t*)((char*)eax + 0x14);
0066e320      int32_t esi = *(uint32_t*)((char*)eax + 0x20);
0066e324      int32_t var_34 = ebx;
0066e328      int32_t ecx_2 = (ecx_1 + edx);
0066e328      
0066e330      if (esi > 0)
0066e330      {
0066e336          int32_t ecx_3 = *(uint32_t*)((char*)eax + 0x1c);
0066e33b          uint32_t edx_2 = (ecx_3 >> 2);
0066e345          int32_t ecx_5 = *(uint32_t*)((char*)eax + 0xc);
0066e348          int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066e34b          uint32_t var_28_1 = edx_2;
0066e357          int32_t var_24_1 = esi;
0066e55f          bool cond:2_1;
0066e55f          
0066e55f          do
0066e55f          {
0066e362              uint32_t eax_2 = edx_2;
0066e364              uint64_t st0;
0066e364              int80_t st1;
0066e364              int64_t st2;
0066e364              int16_t st3[0x4];
0066e364              int64_t st4;
0066e364              
0066e364              if (edx_2 > 0)
0066e364              {
0066e36f                  int32_t edi_3 = ((edx_2 << 4) + ebx);
0066e36f                  
0066e37b                  while (true)
0066e37b                  {
0066e37b                      int32_t ebx_1 = *(uint32_t*)((var_3c + (eax_2 << 2)) - 4);
0066e384                      edi_3 -= 0x10;
0066e387                      int32_t esi_1 = 3;
0066e43f                      int32_t temp1_1;
0066e43f                      
0066e43f                      do
0066e43f                      {
0066e3a1                          int32_t ecx_9 = ((ebx_1 & 0xff000000) | g_SourceColor.__inner0);
0066e3a5                          uint32_t eax_6 = (ecx_9 >> 0x18);
0066e3ae                          int32_t var_38_1 = ecx_9;
0066e3ae                          
0066e3b2                          if (ecx_2 != 0x100)
0066e3b2                          {
0066e3b7                              int32_t eax_8;
0066e3b7                              char edx_4;
0066e3b7                              edx_4 = HIGHD(((int64_t)(eax_6 * ecx_2)));
0066e3b7                              eax_8 = LOWD(((int64_t)(eax_6 * ecx_2)));
0066e3c0                              eax_6 = ((eax_8 + ((uint32_t)edx_4)) >> 8);
0066e3b2                          }
0066e3b2                          
0066e3c5                          if (eax_6 != 0)
0066e3c5                          {
0066e3cd                              if (eax_6 != 0xff)
0066e3cd                              {
0066e3d2                                  int32_t var_38_2 = *(uint32_t*)(edi_3 + (esi_1 << 2));
0066e3d6                                  st1 = 0;
0066e3e4                                  st2 = _m_punpckhwd(0xffffff, 0);
0066e3ea                                  *(uint8_t*)((char*)var_38_2)[3] = 0xff;
0066e3f4                                  st0 = _m_punpckhwd(((uint64_t)var_38_2), 0);
0066e406                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_9), 0) & st2) | (st2 & !(st0)));
0066e409                                  st3 = ((uint64_t)(eax_6 + 1));
0066e40f                                  st4 = _m_punpcklwd(st3, st3[0]);
0066e418                                  st3 = _m_punpcklwd(st4, st4[0]);
0066e421                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066e435                                  ecx_9 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066e3cd                              }
0066e3cd                              
0066e438                              *(uint32_t*)(edi_3 + (esi_1 << 2)) = ecx_9;
0066e3c5                          }
0066e3c5                          
0066e43b                          ebx_1 <<= 8;
0066e43e                          temp1_1 = esi_1;
0066e43e                          esi_1 -= 1;
0066e43f                      } while ((temp1_1 - 1) >= 0);
0066e43f                      
0066e44b                      if ((eax_2 - 1) <= 0)
0066e44b                          break;
0066e44b                      
0066e373                      eax_2 -= 1;
0066e37b                  }
0066e37b                  
0066e451                  edx_2 = var_28_1;
0066e364              }
0066e364              
0066e455              int32_t i = (ecx_3 & 3);
0066e455              
0066e45b              if (i != 0)
0066e45b              {
0066e465                  int32_t ecx_10 = (var_3c + (edx_2 << 2));
0066e475                  int32_t edi_6 = ((edx_2 << 4) + var_34);
0066e475                  
0066e479                  while (i > 0)
0066e479                  {
0066e484                      uint32_t ecx_12 = ((uint32_t)*(uint8_t*)((i + ecx_10) - 1));
0066e492                      i -= 1;
0066e496                      int32_t ecx_14 = ((ecx_12 << 0x18) | g_SourceColor.__inner0);
0066e49a                      uint32_t eax_16 = (ecx_14 >> 0x18);
0066e4a3                      int32_t var_38_3 = ecx_14;
0066e4a3                      
0066e4a7                      if (ecx_2 != 0x100)
0066e4a7                      {
0066e4ac                          int32_t eax_18;
0066e4ac                          char edx_7;
0066e4ac                          edx_7 = HIGHD(((int64_t)(eax_16 * ecx_2)));
0066e4ac                          eax_18 = LOWD(((int64_t)(eax_16 * ecx_2)));
0066e4b5                          edx_2 = var_28_1;
0066e4b9                          eax_16 = ((eax_18 + ((uint32_t)edx_7)) >> 8);
0066e4a7                      }
0066e4a7                      
0066e4be                      if (eax_16 != 0)
0066e4be                      {
0066e4c6                          if (eax_16 != 0xff)
0066e4c6                          {
0066e4cb                              int32_t var_30_2 = *(uint32_t*)(edi_6 + (i << 2));
0066e4cf                              st1 = 0;
0066e4dd                              st2 = _m_punpckhwd(0xffffff, 0);
0066e4e3                              *(uint8_t*)((char*)var_30_2)[3] = 0xff;
0066e4ed                              st0 = _m_punpckhwd(((uint64_t)var_30_2), 0);
0066e4ff                              st2 = ((_m_punpckhwd(((uint64_t)ecx_14), 0) & st2) | (st2 & !(st0)));
0066e502                              st3 = ((uint64_t)(eax_16 + 1));
0066e508                              st4 = _m_punpcklwd(st3, st3[0]);
0066e511                              st3 = _m_punpcklwd(st4, st4[0]);
0066e51a                              st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066e52e                              ecx_14 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066e4c6                          }
0066e4c6                          
0066e531                          *(uint32_t*)(edi_6 + (i << 2)) = ecx_14;
0066e4be                      }
0066e479                  }
0066e45b              }
0066e45b              
0066e54e              ebx = (var_34 + eax_1);
0066e552              cond:2_1 = var_24_1 != 1;
0066e553              var_3c += ecx_5;
0066e557              var_34 = ebx;
0066e55b              var_24_1 -= 1;
0066e55f          } while (cond:2_1);
0066e330      }
0066e300  }

0066e35d                                                                                         8d 49 00                               .I.
0066e56e                                            cc cc                                                                ..

0066e570  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_XRGB,0>,BlitFormat_Fill,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066e570  {
0066e581      void* eax;
0066e581      int64_t st0;
0066e581      int80_t st1;
0066e581      int64_t st2;
0066e581      int16_t st3[0x4];
0066e581      uint64_t st4;
0066e581      
0066e581      if (*(uint32_t*)((char*)eax + 8) == 0)
0066e581      {
0066e6a0          int32_t edx_5 = *(uint32_t*)((char*)eax + 0x14);
0066e6a3          union __inner0 = g_SourceColor.__inner0;
0066e6a7          union ecx_4;
0066e6a7          *(uint8_t*)((char*)ecx_4 + 0) = *(uint8_t*)((char*)eax + 0x24);
0066e6aa          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_4 + 0);
0066e6ae          int32_t ecx_5 = *(uint32_t*)((char*)eax + 0x20);
0066e6ae          
0066e6b3          if (ecx_5 > 0)
0066e6b3          {
0066e6b9              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066e6bc              int32_t eax_9 = *(uint32_t*)((char*)eax + 0x18);
0066e6cb              int32_t var_14_2 = ecx_5;
0066e779              bool cond:1_1;
0066e779              
0066e779              do
0066e779              {
0066e6d0                  int32_t i = i_3;
0066e6d0                  
0066e6d6                  if (i > 0)
0066e6d6                  {
0066e6e0                      uint32_t edi_4 = (__inner0 >> 0x18);
0066e6e0                      
0066e764                      do
0066e764                      {
0066e6e5                          i -= 1;
0066e6e5                          
0066e6e8                          if (edi_4 != 0)
0066e6e8                          {
0066e6f0                              union __inner0_3;
0066e6f0                              
0066e6f0                              if (edi_4 != 0xff)
0066e6f0                              {
0066e6f9                                  int32_t var_18_2 = *(uint32_t*)(edx_5 + (i << 2));
0066e6fd                                  st1 = 0;
0066e70b                                  st2 = _m_punpckhwd(0xffffff, 0);
0066e711                                  *(uint8_t*)((char*)var_18_2)[3] = 0xff;
0066e71b                                  st0 = _m_punpckhwd(((uint64_t)var_18_2), 0);
0066e72d                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066e730                                  st3 = ((uint64_t)(edi_4 + 1));
0066e736                                  st4 = _m_punpcklwd(st3, st3[0]);
0066e73f                                  st3 = _m_punpcklwd(st4, st4[0]);
0066e748                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066e75c                                  __inner0_3 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066e6f0                              }
0066e6f0                              else
0066e6f2                                  __inner0_3 = __inner0;
0066e6f2                              
0066e75f                              *(uint32_t*)(edx_5 + (i << 2)) = __inner0_3;
0066e6e8                          }
0066e764                      } while (i > 0);
0066e6d6                  }
0066e6d6                  
0066e772                  edx_5 -= eax_9;
0066e774                  cond:1_1 = var_14_2 != 1;
0066e775                  var_14_2 -= 1;
0066e779              } while (cond:1_1);
0066e6b3          }
0066e581      }
0066e581      else
0066e581      {
0066e587          uint32_t edi_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066e58b          int32_t esi_1 = *(uint32_t*)((char*)eax + 0x14);
0066e592          int32_t ecx_1;
0066e592          ecx_1 = edi_1 != 0;
0066e595          int32_t edi_2 = (edi_1 + ecx_1);
0066e597          int32_t ecx_2 = *(uint32_t*)((char*)eax + 0x20);
0066e597          
0066e59c          if (ecx_2 > 0)
0066e59c          {
0066e5a2              int32_t i_2 = *(uint32_t*)((char*)eax + 0x1c);
0066e5a5              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066e5a8              union __inner0_1 = g_SourceColor.__inner0;
0066e5b6              int32_t var_18_1 = ecx_2;
0066e68f              bool cond:2_1;
0066e68f              
0066e68f              do
0066e68f              {
0066e5c0                  int32_t i_1 = i_2;
0066e5c0                  
0066e5c6                  if (i_1 > 0)
0066e5c6                  {
0066e5cc                      uint32_t edx_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
0066e5cc                      
0066e67a                      do
0066e67a                      {
0066e5e0                          uint32_t eax_5 = edx_1;
0066e5e4                          i_1 -= 1;
0066e5e4                          
0066e5eb                          if (edi_2 != 0x100)
0066e5eb                          {
0066e5f0                              int32_t eax_3;
0066e5f0                              char edx_2;
0066e5f0                              edx_2 = HIGHD(((int64_t)(eax_5 * edi_2)));
0066e5f0                              eax_3 = LOWD(((int64_t)(eax_5 * edi_2)));
0066e5f9                              eax_5 = ((eax_3 + ((uint32_t)edx_2)) >> 8);
0066e5eb                          }
0066e5eb                          
0066e5fe                          if (eax_5 != 0)
0066e5fe                          {
0066e606                              union __inner0_2;
0066e606                              
0066e606                              if (eax_5 != 0xff)
0066e606                              {
0066e60f                                  int32_t var_20_1 = *(uint32_t*)(esi_1 + (i_1 << 2));
0066e613                                  st1 = 0;
0066e621                                  st2 = _m_punpckhwd(0xffffff, 0);
0066e627                                  *(uint8_t*)((char*)var_20_1)[3] = 0xff;
0066e631                                  st0 = _m_punpckhwd(((uint64_t)var_20_1), 0);
0066e643                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0_1), 0) & st2) | (st2 & !(st0)));
0066e646                                  st3 = ((uint64_t)(eax_5 + 1));
0066e64c                                  st4 = _m_punpcklwd(st3, st3[0]);
0066e655                                  st3 = _m_punpcklwd(st4, st4[0]);
0066e65e                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066e672                                  __inner0_2 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066e606                              }
0066e606                              else
0066e608                                  __inner0_2 = __inner0_1;
0066e608                              
0066e675                              *(uint32_t*)(esi_1 + (i_1 << 2)) = __inner0_2;
0066e5fe                          }
0066e67a                      } while (i_1 > 0);
0066e5c6                  }
0066e5c6                  
0066e688                  esi_1 += eax_1;
0066e68a                  cond:2_1 = var_18_1 != 1;
0066e68b                  var_18_1 -= 1;
0066e68f              } while (cond:2_1);
0066e59c          }
0066e581      }
0066e570  }

0066e5d9                                                                             8d a4 24 00 00 00 00                           ..$....
0066e788                          cc cc cc cc cc cc cc cc                                                          ........

0066e790  void __convention("regparm") ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB,0>,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066e790  {
0066e79c      void* eax;
0066e79c      int32_t var_3c = *(uint32_t*)((char*)eax + 8);
0066e7a0      uint32_t ecx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066e7a8      int32_t edx;
0066e7a8      edx = ecx_1 != 0;
0066e7ae      int32_t edi = *(uint32_t*)((char*)eax + 0x14);
0066e7b1      int32_t var_34 = edi;
0066e7b5      uint32_t ecx_2 = (ecx_1 + edx);
0066e7b7      int32_t edx_1 = *(uint32_t*)((char*)eax + 0x20);
0066e7b7      
0066e7c0      if (edx_1 > 0)
0066e7c0      {
0066e7c6          int32_t ecx_3 = *(uint32_t*)((char*)eax + 0x1c);
0066e7c9          int32_t ebx_1 = *(uint32_t*)((char*)eax + 0xc);
0066e7cc          int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066e7d1          uint32_t esi_2 = (ecx_3 >> 2);
0066e7d4          int32_t i_2 = (ecx_3 & 3);
0066e7d7          uint32_t var_28_1 = esi_2;
0066e7db          int32_t i_4 = i_2;
0066e7e7          int32_t var_20_1 = edx_1;
0066ea76          bool cond:2_1;
0066ea76          
0066ea76          do
0066ea76          {
0066e7f2              uint32_t eax_2 = esi_2;
0066e7f4              uint64_t st0;
0066e7f4              int80_t st1;
0066e7f4              int64_t st2;
0066e7f4              uint64_t st3;
0066e7f4              uint64_t st4;
0066e7f4              
0066e7f4              if (esi_2 > 0)
0066e7f4              {
0066e7fd                  char* esi_3 = ((edi + (esi_2 * 0xc)) + 0xb);
0066e7fd                  
0066e814                  while (true)
0066e814                  {
0066e814                      int32_t edi_1 = *(uint32_t*)((var_3c + (eax_2 << 2)) - 4);
0066e819                      char* esi_4 = (esi_3 - 0xc);
0066e820                      char* var_1c_1 = esi_4;
0066e824                      int32_t i_3 = 4;
0066e914                      int32_t i;
0066e914                      
0066e914                      do
0066e914                      {
0066e841                          int32_t ecx_7 = ((edi_1 & 0xff000000) | g_SourceColor.__inner0);
0066e845                          uint32_t eax_6 = (ecx_7 >> 0x18);
0066e84e                          int32_t var_38_1 = ecx_7;
0066e84e                          
0066e852                          if (ecx_2 != 0x100)
0066e852                          {
0066e857                              int32_t eax_8;
0066e857                              char edx_4;
0066e857                              edx_4 = HIGHD(((int64_t)(eax_6 * ecx_2)));
0066e857                              eax_8 = LOWD(((int64_t)(eax_6 * ecx_2)));
0066e860                              eax_6 = ((eax_8 + ((uint32_t)edx_4)) >> 8);
0066e852                          }
0066e852                          
0066e865                          if (eax_6 != 0)
0066e865                          {
0066e871                              char var_44;
0066e871                              
0066e871                              if (eax_6 != 0xff)
0066e871                              {
0066e879                                  uint32_t edx_3;
0066e879                                  edx_3 = esi_4[0xfffffffe];
0066e87c                                  var_44 = edx_3;
0066e880                                  edx_3 = esi_4[0xffffffff];
0066e883                                  char var_43_1 = edx_3;
0066e887                                  edx_3 = *(uint8_t*)esi_4;
0066e889                                  char var_42_1 = edx_3;
0066e88d                                  st1 = 0;
0066e89b                                  st2 = _m_punpckhwd(0xffffff, 0);
0066e8a1                                  char var_41_1 = 0xff;
0066e8ab                                  st0 = _m_punpckhwd(((uint64_t)var_44), 0);
0066e8bd                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_7), 0) & st2) | (st2 & !(st0)));
0066e8c0                                  st3 = ((uint64_t)(eax_6 + 1));
0066e8c6                                  st4 = _m_punpcklwd(st3, st3);
0066e8cf                                  st3 = _m_punpcklwd(st4, st4);
0066e8d8                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066e8ef                                  var_44 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066e871                              }
0066e871                              else
0066e873                                  var_44 = ecx_7;
0066e873                              
0066e8fb                              ecx_7 = var_44;
0066e905                              esi_4[0xfffffffe] = ecx_7;
0066e908                              esi_4[0xffffffff] = ((int8_t)(var_44 >> 8));
0066e90b                              *(uint8_t*)esi_4 = ((int8_t)(var_44 >> 0x10));
0066e865                          }
0066e865                          
0066e90d                          edi_1 <<= 8;
0066e910                          esi_4 -= 3;
0066e913                          i = i_3;
0066e913                          i_3 -= 1;
0066e914                      } while (i != 1);
0066e914                      
0066e920                      if ((eax_2 - 1) <= 0)
0066e920                          break;
0066e920                      
0066e803                      esi_3 = var_1c_1;
0066e807                      eax_2 -= 1;
0066e814                  }
0066e814                  
0066e926                  esi_2 = var_28_1;
0066e92a                  i_2 = i_4;
0066e7f4              }
0066e7f4              
0066e930              if (i_2 != 0)
0066e930              {
0066e947                  int32_t i_1 = i_2;
0066e947                  
0066e949                  if (i_2 > 0)
0066e949                  {
0066e952                      char* esi_5 = (((i_2 * 3) + (var_34 + (esi_2 * 0xc))) + 2);
0066e952                      
0066ea43                      do
0066ea43                      {
0066e960                          uint32_t ecx_8 = ((uint32_t)*(uint8_t*)((i_1 + (var_3c + (esi_2 << 2))) - 1));
0066e96e                          i_1 -= 1;
0066e972                          int32_t ecx_10 = ((ecx_8 << 0x18) | g_SourceColor.__inner0);
0066e976                          esi_5 -= 3;
0066e979                          uint32_t eax_20 = (ecx_10 >> 0x18);
0066e982                          int32_t var_38_2 = ecx_10;
0066e982                          
0066e986                          if (ecx_2 != 0x100)
0066e986                          {
0066e98b                              int32_t eax_22;
0066e98b                              char edx_10;
0066e98b                              edx_10 = HIGHD(((int64_t)(eax_20 * ecx_2)));
0066e98b                              eax_22 = LOWD(((int64_t)(eax_20 * ecx_2)));
0066e994                              eax_20 = ((eax_22 + ((uint32_t)edx_10)) >> 8);
0066e986                          }
0066e986                          
0066e999                          if (eax_20 != 0)
0066e999                          {
0066e9a5                              char var_40;
0066e9a5                              
0066e9a5                              if (eax_20 != 0xff)
0066e9a5                              {
0066e9ad                                  uint32_t edx_9;
0066e9ad                                  edx_9 = esi_5[0xfffffffe];
0066e9b0                                  var_40 = edx_9;
0066e9b4                                  edx_9 = esi_5[0xffffffff];
0066e9b7                                  char var_3f_1 = edx_9;
0066e9bb                                  edx_9 = *(uint8_t*)esi_5;
0066e9bd                                  char var_3e_1 = edx_9;
0066e9c1                                  st1 = 0;
0066e9cf                                  st2 = _m_punpckhwd(0xffffff, 0);
0066e9d5                                  char var_3d_1 = 0xff;
0066e9df                                  st0 = _m_punpckhwd(((uint64_t)var_40), 0);
0066e9f1                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_10), 0) & st2) | (st2 & !(st0)));
0066e9f4                                  st3 = ((uint64_t)(eax_20 + 1));
0066e9fa                                  st4 = _m_punpcklwd(st3, st3);
0066ea03                                  st3 = _m_punpcklwd(st4, st4);
0066ea0c                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066ea23                                  var_40 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066e9a5                              }
0066e9a5                              else
0066e9a7                                  var_40 = ecx_10;
0066e9a7                              
0066ea2f                              ecx_10 = var_40;
0066ea39                              esi_5[0xfffffffe] = ecx_10;
0066ea3c                              esi_5[0xffffffff] = ((int8_t)(var_40 >> 8));
0066ea3f                              *(uint8_t*)esi_5 = ((int8_t)(var_40 >> 0x10));
0066e999                          }
0066ea43                      } while (i_1 > 0);
0066ea43                      
0066ea49                      esi_2 = var_28_1;
0066ea4d                      i_2 = i_4;
0066e949                  }
0066e930              }
0066e930              
0066ea63              var_3c += ebx_1;
0066ea6b              edi = (var_34 + eax_1);
0066ea6d              cond:2_1 = var_20_1 != 1;
0066ea6e              var_34 = edi;
0066ea72              var_20_1 -= 1;
0066ea76          } while (cond:2_1);
0066e7c0      }
0066e790  }

0066e7ed                                         8d 49 00                                                               .I.
0066e80d                                         8d 49 00                                                               .I.
0066e958                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0066ea85                 cc cc cc cc cc cc cc cc cc cc cc                                                       ...........

0066ea90  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_RGB,0>,BlitFormat_Fill,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066ea90  {
0066eaa1      void* eax;
0066eaa1      char var_28;
0066eaa1      int64_t st0;
0066eaa1      int80_t st1;
0066eaa1      uint64_t st2;
0066eaa1      uint64_t st3;
0066eaa1      uint64_t st4;
0066eaa1      
0066eaa1      if (*(uint32_t*)((char*)eax + 8) == 0)
0066eaa1      {
0066ebf5          int32_t ebx_1 = *(uint32_t*)((char*)eax + 0x14);
0066ebfb          union __inner0 = g_SourceColor.__inner0;
0066ebff          int32_t ecx_7 = *(uint32_t*)((char*)eax + 0x20);
0066ec04          int32_t var_1c_1 = ebx_1;
0066ec08          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)eax + 0x24);
0066ec08          
0066ec0c          if (ecx_7 > 0)
0066ec0c          {
0066ec12              int32_t i_5 = *(uint32_t*)((char*)eax + 0x1c);
0066ec15              int32_t eax_12 = *(uint32_t*)((char*)eax + 0x18);
0066ec20              int32_t var_14_1 = ecx_7;
0066ed14              bool cond:2_1;
0066ed14              
0066ed14              do
0066ed14              {
0066ec26                  if (i_5 > 0)
0066ec26                  {
0066ec33                      uint32_t esi_4 = (__inner0 >> 0x18);
0066ec36                      char* eax_13 = (((i_5 * 3) + ebx_1) + 2);
0066ec3a                      int32_t i_3 = i_5;
0066ecf7                      int32_t i;
0066ecf7                      
0066ecf7                      do
0066ecf7                      {
0066ec42                          eax_13 -= 3;
0066ec42                          
0066ec47                          if (esi_4 != 0)
0066ec47                          {
0066ec54                              if (esi_4 != 0xff)
0066ec54                              {
0066ec5f                                  ebx_1 = eax_13[0xfffffffe];
0066ec62                                  var_28 = ebx_1;
0066ec66                                  ebx_1 = eax_13[0xffffffff];
0066ec69                                  char var_27_2 = ebx_1;
0066ec6d                                  ebx_1 = *(uint8_t*)eax_13;
0066ec6f                                  char var_26_2 = ebx_1;
0066ec73                                  st1 = 0;
0066ec81                                  st2 = _m_punpckhwd(0xffffff, 0);
0066ec87                                  char var_25_2 = 0xff;
0066ec91                                  st0 = _m_punpckhwd(((uint64_t)var_28), 0);
0066eca3                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066eca6                                  st3 = ((uint64_t)(esi_4 + 1));
0066ecac                                  st4 = _m_punpcklwd(st3, st3);
0066ecb5                                  st3 = _m_punpcklwd(st4, st4);
0066ecbe                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066ecd5                                  var_28 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066ec54                              }
0066ec54                              else
0066ec56                                  var_28 = __inner0;
0066ec56                              
0066ecd9                              int32_t ecx_10;
0066ecd9                              ecx_10 = var_28;
0066ecdd                              eax_13[0xfffffffe] = ecx_10;
0066ece7                              eax_13[0xffffffff] = ((int8_t)(var_28 >> 8));
0066ecf1                              *(uint8_t*)eax_13 = ((int8_t)(var_28 >> 0x10));
0066ec47                          }
0066ec47                          
0066ecf3                          i = i_3;
0066ecf3                          i_3 -= 1;
0066ecf7                      } while (i != 1);
0066ec26                  }
0066ec26                  
0066ed09                  ebx_1 = (var_1c_1 - eax_12);
0066ed0b                  cond:2_1 = var_14_1 != 1;
0066ed0c                  var_1c_1 = ebx_1;
0066ed10                  var_14_1 -= 1;
0066ed14              } while (cond:2_1);
0066ec0c          }
0066eaa1      }
0066eaa1      else
0066eaa1      {
0066eaa7          uint32_t esi_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066eaab          uint32_t edx_1 = *(uint32_t*)((char*)eax + 0x14);
0066eab2          int32_t ecx_1;
0066eab2          ecx_1 = esi_1 != 0;
0066eab5          uint32_t var_1c = edx_1;
0066eab9          int32_t esi_2 = (esi_1 + ecx_1);
0066eabb          int32_t ecx_2 = *(uint32_t*)((char*)eax + 0x20);
0066eabb          
0066eac0          if (ecx_2 > 0)
0066eac0          {
0066eac6              int32_t i_4 = *(uint32_t*)((char*)eax + 0x1c);
0066eac9              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066ead0              int32_t var_18_1 = ecx_2;
0066ebe4              bool cond:3_1;
0066ebe4              
0066ebe4              do
0066ebe4              {
0066ead6                  if (i_4 > 0)
0066ead6                  {
0066eadc                      uint32_t edi_1 = ((uint32_t)*(uint32_t*)((char*)g_SourceColor.__inner0 + 3));
0066eae6                      char* ecx_4 = (((i_4 * 3) + edx_1) + 2);
0066eaea                      int32_t i_2 = i_4;
0066ebc7                      int32_t i_1;
0066ebc7                      
0066ebc7                      do
0066ebc7                      {
0066eaf0                          ecx_4 -= 3;
0066eaf9                          uint32_t eax_2 = edi_1;
0066eaf9                          
0066eafb                          if (esi_2 != 0x100)
0066eafb                          {
0066eb00                              int32_t eax_4;
0066eb00                              char edx_2;
0066eb00                              edx_2 = HIGHD(((int64_t)(eax_2 * esi_2)));
0066eb00                              eax_4 = LOWD(((int64_t)(eax_2 * esi_2)));
0066eb09                              eax_2 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066eafb                          }
0066eafb                          
0066eb0e                          if (eax_2 != 0)
0066eb0e                          {
0066eb1a                              if (eax_2 != 0xff)
0066eb1a                              {
0066eb2b                                  edx_1 = ecx_4[0xfffffffe];
0066eb35                                  var_28 = edx_1;
0066eb39                                  edx_1 = ecx_4[0xffffffff];
0066eb3c                                  char var_27_1 = edx_1;
0066eb40                                  edx_1 = *(uint8_t*)ecx_4;
0066eb42                                  char var_26_1 = edx_1;
0066eb46                                  st1 = 0;
0066eb54                                  st2 = _m_punpckhwd(0xffffff, 0);
0066eb5a                                  char var_25_1 = 0xff;
0066eb64                                  st0 = _m_punpckhwd(((uint64_t)var_28), 0);
0066eb73                                  st2 = ((_m_punpckhwd(((uint64_t)g_SourceColor.__inner0), 0) & st2) | (st2 & !(st0)));
0066eb76                                  st3 = ((uint64_t)(eax_2 + 1));
0066eb7c                                  st4 = _m_punpcklwd(st3, st3);
0066eb85                                  st3 = _m_punpcklwd(st4, st4);
0066eb8e                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066eba5                                  var_28 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066eb1a                              }
0066eb1a                              else
0066eb22                                  var_28 = g_SourceColor.__inner0;
0066eb22                              
0066eba9                              union edx_3;
0066eba9                              *(uint8_t*)((char*)edx_3 + 0) = var_28;
0066ebb1                              ecx_4[0xfffffffe] = *(uint8_t*)((char*)edx_3 + 0);
0066ebbe                              ecx_4[0xffffffff] = ((int8_t)(var_28 >> 8));
0066ebc1                              *(uint8_t*)ecx_4 = (var_28 >> 0x10);
0066eb0e                          }
0066eb0e                          
0066ebc3                          i_1 = i_2;
0066ebc3                          i_2 -= 1;
0066ebc7                      } while (i_1 != 1);
0066ead6                  }
0066ead6                  
0066ebd9                  edx_1 = (var_1c + eax_1);
0066ebdb                  cond:3_1 = var_18_1 != 1;
0066ebdc                  var_1c = edx_1;
0066ebe0                  var_18_1 -= 1;
0066ebe4              } while (cond:3_1);
0066eac0          }
0066eaa1      }
0066ea90  }

0066ed23           cc cc cc cc cc cc cc cc cc cc cc cc cc                                                     .............

0066ed30  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB,1>,BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066ed30  {
0066ed39      void* eax;
0066ed39      int32_t ecx = *(uint32_t*)((char*)eax + 8);
0066ed3e      int32_t ebx;
0066ed3e      int32_t var_58 = ebx;
0066ed41      float var_20[0x4];
0066ed41      int64_t st0;
0066ed41      int32_t st1[0x2];
0066ed41      uint64_t st2;
0066ed41      uint64_t st3;
0066ed41      uint64_t st4;
0066ed41      
0066ed41      if (ecx == 0)
0066ed41      {
0066ef87          int32_t edx_8 = *(uint32_t*)((char*)eax + 0x14);
0066ef8a          int32_t __inner0 = g_SourceColor.__inner0;
0066ef8e          union ecx_8;
0066ef8e          *(uint8_t*)((char*)ecx_8 + 0) = *(uint8_t*)((char*)eax + 0x24);
0066ef91          *(uint8_t*)((char*)__inner0)[3] = *(uint8_t*)((char*)ecx_8 + 0);
0066ef95          int32_t ecx_9 = *(uint32_t*)((char*)eax + 0x20);
0066ef9a          int32_t var_34_2 = edx_8;
0066ef9a          
0066ef9e          if (ecx_9 > 0)
0066ef9e          {
0066efa4              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066efaa              uint64_t xmm0_6 = var_20[0];
0066efaf              float xmm1_4[0x4] = var_20;
0066efc2              int32_t var_44_2 = *(uint32_t*)((char*)eax + 0x18);
0066efc6              int32_t var_38_2 = ecx_9;
0066f153              bool cond:3_1;
0066f153              
0066f153              do
0066f153              {
0066efd0                  int32_t i = i_3;
0066efd0                  
0066efd6                  if (i > 0)
0066efd6                  {
0066efe0                      uint32_t ecx_11 = (__inner0 >> 0x18);
0066efe0                      
0066f13a                      do
0066f13a                      {
0066efeb                          i -= 1;
0066efeb                          
0066efee                          if (ecx_11 != 0)
0066efee                          {
0066effb                              int32_t __inner0_1;
0066effb                              
0066effb                              if (ecx_11 != 0xff)
0066effb                              {
0066f006                                  int32_t edi_5 = *(uint32_t*)(edx_8 + (i << 2));
0066f00d                                  __inner0_1 = *(uint8_t*)((char*)edi_5)[3];
0066f00d                                  
0066f013                                  if (__inner0_1 == 0)
0066f015                                      __inner0_1 = __inner0;
0066f013                                  else if (__inner0_1 != 0xff)
0066f020                                  {
0066f093                                      st1 = _m_punpckhwd(((uint64_t)edi_5), 0);
0066f09c                                      float xmm0_7[0x2] = _mm_cvtpi32_ps(xmm0_6, __punpckhwd_mmxq_mmxd(st1, 0));
0066f0ab                                      float xmm0_9[0x4] = _mm_cvtpi32_ps((xmm0_7 | ((int64_t)(xmm0_7 << 0x40))), _m_punpcklwd(st1, 0));
0066f0b3                                      int32_t eax_14;
0066f0b3                                      char edx_9;
0066f0b3                                      edx_9 = HIGHD(((int64_t)((((uint32_t)__inner0_1) + 1) * (ecx_11 + 1))));
0066f0b3                                      eax_14 = LOWD(((int64_t)((((uint32_t)__inner0_1) + 1) * (ecx_11 + 1))));
0066f0bc                                      st1 = _m_punpckhwd(((uint64_t)__inner0), 0);
0066f0c8                                      float xmm1_5[0x2] = _mm_cvtpi32_ps(xmm1_4, __punpckhwd_mmxq_mmxd(st1, 0));
0066f0d8                                      float xmm2_5[0x4] = ((float)(ecx_11 + 1));
0066f0dc                                      int32_t ecx_14 = ((((uint32_t)__inner0_1) + 1) + ((ecx_11 + 1) - ((eax_14 + ((uint32_t)edx_9)) >> 8)));
0066f0de                                      edx_8 = var_34_2;
0066f0e5                                      float xmm4_19[0x4] = _mm_shuffle_ps(xmm2_5, xmm2_5, 0);
0066f0ec                                      float xmm3_5[0x4] = ((float)ecx_14);
0066f0f0                                      st1 = _m_punpcklwd(st1, 0);
0066f0f6                                      float xmm4_21[0x4] = _mm_shuffle_ps(xmm3_5, xmm3_5, 0);
0066f0fd                                      xmm1_4 = _mm_cvtpi32_ps((xmm1_5 | ((int64_t)(xmm1_5 << 0x40))), st1);
0066f10c                                      float xmm0_10[0x4] = _mm_sub_ps(xmm0_9, _mm_div_ps(_mm_mul_ps(_mm_sub_ps(xmm0_9, xmm1_4), xmm4_19), xmm4_21));
0066f118                                      xmm0_6 = ((int64_t)(xmm0_10 >> 0x40));
0066f127                                      int32_t __inner0_2 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm0_10), _mm_cvtps_pi32(xmm0_6)), 0)[0];
0066f12b                                      ecx_14 -= 1;
0066f12d                                      *(uint8_t*)((char*)__inner0_2)[3] = ecx_14;
0066f131                                      __inner0_1 = __inner0_2;
0066f020                                  }
0066f020                                  else
0066f020                                  {
0066f035                                      st2 = _m_punpckhwd(0xffffff, 0);
0066f03e                                      st0 = _m_punpckhwd(((uint64_t)edi_5), 0);
0066f04d                                      st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066f050                                      st3 = ((uint64_t)(ecx_11 + 1));
0066f056                                      st4 = _m_punpcklwd(st3, st3);
0066f05f                                      st3 = _m_punpcklwd(st4, st4);
0066f068                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066f07c                                      __inner0_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066f020                                  }
0066effb                              }
0066effb                              else
0066effd                                  __inner0_1 = __inner0;
0066effd                              
0066f135                              *(uint32_t*)(edx_8 + (i << 2)) = __inner0_1;
0066efee                          }
0066f13a                      } while (i > 0);
0066efd6                  }
0066efd6                  
0066f148                  edx_8 -= var_44_2;
0066f14a                  cond:3_1 = var_38_2 != 1;
0066f14b                  var_34_2 = edx_8;
0066f14f                  var_38_2 -= 1;
0066f153              } while (cond:3_1);
0066ef9e          }
0066ed41      }
0066ed41      else
0066ed41      {
0066ed47          uint32_t edx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066ed4b          int32_t esi_1 = *(uint32_t*)((char*)eax + 0x14);
0066ed4e          int32_t var_48_1 = ecx;
0066ed56          int32_t ecx_1;
0066ed56          ecx_1 = edx != 0;
0066ed59          int32_t var_38_1 = esi_1;
0066ed5d          int32_t edx_1 = (edx + ecx_1);
0066ed5f          uint32_t ecx_2 = *(uint32_t*)((char*)eax + 0x20);
0066ed64          int32_t var_40_1 = edx_1;
0066ed64          
0066ed68          if (ecx_2 > 0)
0066ed68          {
0066ed6e              int32_t i_4 = *(uint32_t*)((char*)eax + 0x1c);
0066ed71              int32_t ebx_1 = *(uint32_t*)((char*)eax + 0xc);
0066ed77              float xmm0_1[0x2] = var_20[0];
0066ed7c              float xmm1_1[0x4] = var_20;
0066ed8b              int32_t i_5 = i_4;
0066ed93              uint32_t var_44_1 = *(uint32_t*)((char*)eax + 0x18);
0066ed97              uint32_t var_34_1 = ecx_2;
0066ef76              bool cond:4_1;
0066ef76              
0066ef76              do
0066ef76              {
0066eda2                  if (i_4 > 0)
0066eda2                  {
0066edac                      int32_t ebx_3 = (var_48_1 - esi_1);
0066edae                      int32_t* ecx_3 = (esi_1 + (i_4 << 2));
0066edb1                      int32_t var_2c_1 = ebx_3;
0066edb5                      int32_t i_2 = i_4;
0066ef49                      int32_t i_1;
0066ef49                      
0066ef49                      do
0066ef49                      {
0066edc0                          int32_t esi_2 = *(uint32_t*)(((char*)ecx_3 + ebx_3) - 4);
0066edca                          ecx_3 -= 4;
0066edd3                          uint32_t esi_4 = ((esi_2 & 0xff000000) | g_SourceColor.__inner0);
0066edd7                          uint32_t edi_3 = (esi_4 >> 0x18);
0066ede4                          uint32_t var_4c_1 = esi_4;
0066ede4                          
0066ede8                          if (edx_1 != 0x100)
0066ede8                          {
0066edef                              int32_t eax_4;
0066edef                              char edx_2;
0066edef                              edx_2 = HIGHD(((int64_t)(edi_3 * edx_1)));
0066edef                              eax_4 = LOWD(((int64_t)(edi_3 * edx_1)));
0066edf8                              edx_1 = var_40_1;
0066edff                              edi_3 = ((eax_4 + ((uint32_t)edx_2)) >> 8);
0066ede8                          }
0066ede8                          
0066ee03                          if (edi_3 != 0)
0066ee03                          {
0066ee10                              if (edi_3 != 0xff)
0066ee10                              {
0066ee16                                  int32_t ebx_4 = *(uint32_t*)ecx_3;
0066ee1c                                  uint32_t eax_1;
0066ee1c                                  eax_1 = *(uint8_t*)((char*)ebx_4)[3];
0066ee1c                                  
0066ee22                                  if (eax_1 != 0)
0066ee22                                  {
0066ee2a                                      if (eax_1 != 0xff)
0066ee2a                                      {
0066ee9b                                          st1 = _m_punpckhwd(((uint64_t)ebx_4), 0);
0066eea4                                          float xmm0_2[0x2] = _mm_cvtpi32_ps(xmm0_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066eeb3                                          float xmm0_4[0x4] = _mm_cvtpi32_ps((xmm0_2 | ((int64_t)(xmm0_2 << 0x40))), _m_punpcklwd(st1, 0));
0066eeb6                                          int32_t eax_8;
0066eeb6                                          char edx_4;
0066eeb6                                          edx_4 = HIGHD(((int64_t)((((uint32_t)eax_1) + 1) * (edi_3 + 1))));
0066eeb6                                          eax_8 = LOWD(((int64_t)((((uint32_t)eax_1) + 1) * (edi_3 + 1))));
0066eec2                                          st1 = _m_punpckhwd(((uint64_t)esi_4), 0);
0066eecb                                          float xmm1_2[0x2] = _mm_cvtpi32_ps(xmm1_1, __punpckhwd_mmxq_mmxd(st1, 0));
0066eede                                          float xmm2_2[0x4] = ((float)(edi_3 + 1));
0066eee2                                          int32_t ecx_6 = ((((uint32_t)eax_1) + 1) + ((edi_3 + 1) - ((eax_8 + ((uint32_t)edx_4)) >> 8)));
0066eee4                                          float xmm3_2[0x4] = ((float)ecx_6);
0066eeeb                                          float xmm4_6[0x4] = _mm_shuffle_ps(xmm2_2, xmm2_2, 0);
0066eef2                                          st1 = _m_punpcklwd(st1, 0);
0066eef8                                          float xmm4_8[0x4] = _mm_shuffle_ps(xmm3_2, xmm3_2, 0);
0066eeff                                          xmm1_1 = _mm_cvtpi32_ps((xmm1_2 | ((int64_t)(xmm1_2 << 0x40))), st1);
0066ef0e                                          float xmm0_5[0x4] = _mm_sub_ps(xmm0_4, _mm_div_ps(_mm_mul_ps(_mm_sub_ps(xmm0_4, xmm1_1), xmm4_6), xmm4_8));
0066ef1a                                          xmm0_1 = ((int64_t)(xmm0_5 >> 0x40));
0066ef26                                          ecx_6 -= 1;
0066ef2b                                          uint32_t var_4c_3 = _m_packuswb(_m_packssdw(_mm_cvtps_pi32(xmm0_5), _mm_cvtps_pi32(xmm0_1)), 0)[0];
0066ef2f                                          *(uint8_t*)((char*)var_4c_3)[3] = ecx_6;
0066ef33                                          esi_4 = var_4c_3;
0066ee2a                                      }
0066ee2a                                      else
0066ee2a                                      {
0066ee3a                                          st2 = _m_punpckhwd(0xffffff, 0);
0066ee43                                          st0 = _m_punpckhwd(((uint64_t)ebx_4), 0);
0066ee55                                          st2 = ((_m_punpckhwd(((uint64_t)esi_4), 0) & st2) | (st2 & !(st0)));
0066ee58                                          st3 = ((uint64_t)(edi_3 + 1));
0066ee5e                                          st4 = _m_punpcklwd(st3, st3);
0066ee67                                          st3 = _m_punpcklwd(st4, st4);
0066ee70                                          st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066ee84                                          esi_4 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066ee2a                                      }
0066ee22                                  }
0066ee10                              }
0066ee10                              
0066ef3b                              ebx_3 = var_2c_1;
0066ef3f                              edx_1 = var_40_1;
0066ef43                              *(uint32_t*)ecx_3 = esi_4;
0066ee03                          }
0066ee03                          
0066ef45                          i_1 = i_2;
0066ef45                          i_2 -= 1;
0066ef49                      } while (i_1 != 1);
0066ef4f                      esi_1 = var_38_1;
0066ef53                      i_4 = i_5;
0066eda2                  }
0066eda2                  
0066ef65                  esi_1 += var_44_1;
0066ef69                  cond:4_1 = var_34_1 != 1;
0066ef6a                  var_48_1 += ebx_1;
0066ef6e                  var_38_1 = esi_1;
0066ef72                  var_34_1 -= 1;
0066ef76              } while (cond:4_1);
0066ed68          }
0066ed41      }
0066ed30  }

0066ed9d                                                                                         8d 49 00                               .I.
0066f162        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

0066f170  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB,0>,BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066f170  {
0066f179      void* eax;
0066f179      int32_t ecx = *(uint32_t*)((char*)eax + 8);
0066f181      uint64_t st0;
0066f181      int80_t st1;
0066f181      int64_t st2;
0066f181      int16_t st3[0x4];
0066f181      int64_t st4;
0066f181      
0066f181      if (ecx == 0)
0066f181      {
0066f379          int32_t edx_24 = *(uint32_t*)((char*)eax + 0x14);
0066f37c          union __inner0 = g_SourceColor.__inner0;
0066f380          union ecx_10;
0066f380          *(uint8_t*)((char*)ecx_10 + 0) = *(uint8_t*)((char*)eax + 0x24);
0066f383          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_10 + 0);
0066f387          union ecx_11 = *(uint32_t*)((char*)eax + 0x20);
0066f38c          int32_t var_2c_2 = edx_24;
0066f38c          
0066f390          if (ecx_11 > 0)
0066f390          {
0066f396              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066f3a0              union var_40_2 = *(uint32_t*)((char*)eax + 0x18);
0066f3a4              union var_30_2 = ecx_11;
0066f509              bool cond:4_1;
0066f509              
0066f509              do
0066f509              {
0066f3b0                  int32_t i = i_3;
0066f3b0                  
0066f3b6                  if (i > 0)
0066f3b6                  {
0066f3c0                      uint32_t ecx_13 = (__inner0 >> 0x18);
0066f3c0                      
0066f4f0                      do
0066f4f0                      {
0066f3cb                          i -= 1;
0066f3cb                          
0066f3ce                          if (ecx_13 != 0)
0066f3ce                          {
0066f3db                              union __inner0_1;
0066f3db                              
0066f3db                              if (ecx_13 != 0xff)
0066f3db                              {
0066f3e6                                  union ecx_14 = *(uint32_t*)(edx_24 + (i << 2));
0066f3ed                                  *(uint8_t*)((char*)__inner0_1 + 0) = *(uint8_t*)((char*)ecx_14 + 3);
0066f3ed                                  
0066f3f3                                  if (*(uint8_t*)((char*)__inner0_1 + 0) == 0)
0066f3f5                                      __inner0_1 = __inner0;
0066f3f3                                  else if (*(uint8_t*)((char*)__inner0_1 + 0) != 0xff)
0066f400                                  {
0066f467                                      uint32_t ebx_5 = ((uint32_t)*(uint8_t*)((char*)ecx_14 + 2));
0066f472                                      int32_t eax_29;
0066f472                                      char edx_25;
0066f472                                      edx_25 = HIGHD(((int64_t)((((uint32_t)*(uint8_t*)((char*)__inner0_1 + 0)) + 1) * (ecx_13 + 1))));
0066f472                                      eax_29 = LOWD(((int64_t)((((uint32_t)*(uint8_t*)((char*)__inner0_1 + 0)) + 1) * (ecx_13 + 1))));
0066f482                                      uint32_t eax_32 = ((uint32_t)*(uint8_t*)((char*)ecx_14 + 1));
0066f487                                      int32_t ecx_17 = ((((uint32_t)*(uint8_t*)((char*)__inner0_1 + 0)) + 1) + ((ecx_13 + 1) - ((eax_29 + ((uint32_t)edx_25)) >> 8)));
0066f489                                      uint32_t edx_29 = ((uint32_t)*(uint8_t*)((char*)ecx_14 + 0));
0066f4aa                                      ebx_5 -= ((int8_t)(((int64_t)((ebx_5 - ((uint32_t)*(uint8_t*)((char*)__inner0 + 2))) * (ecx_13 + 1))) / ecx_17));
0066f4ac                                      union __inner0_2;
0066f4ac                                      *(uint8_t*)((char*)__inner0_2 + 2) = ebx_5;
0066f4c3                                      uint32_t ebx_6;
0066f4c3                                      ebx_6 = (eax_32 - ((int8_t)(((int64_t)((eax_32 - ((uint32_t)*(uint8_t*)((char*)__inner0 + 1))) * (ecx_13 + 1))) / ecx_17)));
0066f4c5                                      *(uint8_t*)((char*)__inner0_2 + 1) = ebx_6;
0066f4d7                                      edx_24 = var_2c_2;
0066f4db                                      uint32_t ebx_7;
0066f4db                                      ebx_7 = (edx_29 - ((int8_t)(((int64_t)((edx_29 - ((uint32_t)*(uint8_t*)((char*)__inner0 + 0))) * (ecx_13 + 1))) / ecx_17)));
0066f4dd                                      ecx_17 -= 1;
0066f4df                                      *(uint8_t*)((char*)__inner0_2 + 0) = ebx_7;
0066f4e3                                      *(uint8_t*)((char*)__inner0_2 + 3) = ecx_17;
0066f4e7                                      __inner0_1 = __inner0_2;
0066f400                                  }
0066f400                                  else
0066f400                                  {
0066f40c                                      st1 = 0;
0066f415                                      st2 = _m_punpckhwd(0xffffff, 0);
0066f41e                                      st0 = _m_punpckhwd(((uint64_t)ecx_14), 0);
0066f42d                                      st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066f430                                      st3 = ((uint64_t)(ecx_13 + 1));
0066f436                                      st4 = _m_punpcklwd(st3, st3[0]);
0066f43f                                      st3 = _m_punpcklwd(st4, st4[0]);
0066f448                                      st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066f45c                                      __inner0_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066f400                                  }
0066f3db                              }
0066f3db                              else
0066f3dd                                  __inner0_1 = __inner0;
0066f3dd                              
0066f4eb                              *(uint32_t*)(edx_24 + (i << 2)) = __inner0_1;
0066f3ce                          }
0066f4f0                      } while (i > 0);
0066f3b6                  }
0066f3b6                  
0066f4fe                  edx_24 -= var_40_2;
0066f500                  cond:4_1 = var_30_2 != 1;
0066f501                  var_2c_2 = edx_24;
0066f505                  var_30_2 -= 1;
0066f509              } while (cond:4_1);
0066f390          }
0066f181      }
0066f181      else
0066f181      {
0066f187          int32_t esi_1 = *(uint32_t*)((char*)eax + 0x14);
0066f18a          int32_t var_44 = ecx;
0066f18e          uint32_t ecx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066f196          int32_t edx;
0066f196          edx = ecx_1 != 0;
0066f199          int32_t var_30_1 = esi_1;
0066f19d          int32_t ecx_2 = (ecx_1 + edx);
0066f19f          int32_t edx_1 = *(uint32_t*)((char*)eax + 0x20);
0066f19f          
0066f1a8          if (edx_1 > 0)
0066f1a8          {
0066f1ae              int32_t i_4 = *(uint32_t*)((char*)eax + 0x1c);
0066f1b1              int32_t ecx_3 = *(uint32_t*)((char*)eax + 0xc);
0066f1b7              int32_t i_5 = i_4;
0066f1bf              int32_t var_40_1 = *(uint32_t*)((char*)eax + 0x18);
0066f1c3              int32_t var_2c_1 = edx_1;
0066f368              bool cond:3_1;
0066f368              
0066f368              do
0066f368              {
0066f1c9                  if (i_4 > 0)
0066f1c9                  {
0066f1d3                      int32_t ecx_5 = (var_44 - esi_1);
0066f1d5                      int32_t* edi_1 = (esi_1 + (i_4 << 2));
0066f1d8                      int32_t var_1c_1 = ecx_5;
0066f1dc                      int32_t i_2 = i_4;
0066f339                      int32_t i_1;
0066f339                      
0066f339                      do
0066f339                      {
0066f1e0                          int32_t ebx_1 = *(uint32_t*)((ecx_5 + edi_1) - 4);
0066f1ea                          edi_1 -= 4;
0066f1f3                          int32_t ebx_3 = ((ebx_1 & 0xff000000) | g_SourceColor.__inner0);
0066f1fb                          uint32_t esi_3 = (ebx_3 >> 0x18);
0066f1fb                          
0066f208                          if (ecx_2 != 0x100)
0066f208                          {
0066f20f                              int32_t eax_4;
0066f20f                              char edx_4;
0066f20f                              edx_4 = HIGHD(((int64_t)(esi_3 * ecx_2)));
0066f20f                              eax_4 = LOWD(((int64_t)(esi_3 * ecx_2)));
0066f21b                              esi_3 = ((eax_4 + ((uint32_t)edx_4)) >> 8);
0066f208                          }
0066f208                          
0066f21f                          if (esi_3 != 0)
0066f21f                          {
0066f22c                              if (esi_3 != 0xff)
0066f22c                              {
0066f232                                  int32_t edx_6 = *(uint32_t*)edi_1;
0066f238                                  int32_t eax_1;
0066f238                                  eax_1 = *(uint8_t*)((char*)edx_6)[3];
0066f238                                  
0066f23e                                  if (eax_1 != 0)
0066f23e                                  {
0066f246                                      if (eax_1 != 0xff)
0066f246                                      {
0066f2b1                                          int32_t eax_8;
0066f2b1                                          char edx_7;
0066f2b1                                          edx_7 = HIGHD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_3 + 1))));
0066f2b1                                          eax_8 = LOWD(((int64_t)((((uint32_t)eax_1) + 1) * (esi_3 + 1))));
0066f2c1                                          uint32_t eax_11 = ((uint32_t)*(uint8_t*)((char*)edx_6)[2]);
0066f2c6                                          int32_t ecx_8 = ((((uint32_t)eax_1) + 1) + ((esi_3 + 1) - ((eax_8 + ((uint32_t)edx_7)) >> 8)));
0066f2c8                                          uint32_t edx_11 = ((uint32_t)*(uint8_t*)((char*)edx_6)[1]);
0066f2d1                                          uint32_t edx_12 = ((uint32_t)edx_6);
0066f2f5                                          int32_t var_48_1;
0066f2f5                                          *(uint8_t*)((char*)var_48_1)[2] = (eax_11 - ((int8_t)(((int64_t)((eax_11 - ((uint32_t)*(uint8_t*)((char*)ebx_3)[2])) * (esi_3 + 1))) / ecx_8)));
0066f30a                                          *(uint8_t*)((char*)var_48_1)[1] = (edx_11 - ((int8_t)(((int64_t)((edx_11 - ((uint32_t)*(uint8_t*)((char*)ebx_3)[1])) * (esi_3 + 1))) / ecx_8)));
0066f31f                                          uint32_t ebx_4;
0066f31f                                          ebx_4 = (edx_12 - (((int64_t)((edx_12 - ((uint32_t)ebx_3)) * (esi_3 + 1))) / ecx_8));
0066f321                                          ecx_8 -= 1;
0066f323                                          *(uint8_t*)((char*)var_48_1)[3] = ecx_8;
0066f327                                          ecx_5 = var_1c_1;
0066f32b                                          var_48_1 = ebx_4;
0066f32f                                          ebx_3 = var_48_1;
0066f246                                      }
0066f246                                      else
0066f246                                      {
0066f248                                          st1 = 0;
0066f256                                          st2 = _m_punpckhwd(0xffffff, 0);
0066f25f                                          st0 = _m_punpckhwd(((uint64_t)edx_6), 0);
0066f271                                          st2 = ((_m_punpckhwd(((uint64_t)ebx_3), 0) & st2) | (st2 & !(st0)));
0066f274                                          st3 = ((uint64_t)(esi_3 + 1));
0066f27a                                          st4 = _m_punpcklwd(st3, st3[0]);
0066f283                                          st3 = _m_punpcklwd(st4, st4[0]);
0066f28c                                          st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066f2a0                                          ebx_3 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066f246                                      }
0066f23e                                  }
0066f22c                              }
0066f22c                              
0066f333                              *(uint32_t*)edi_1 = ebx_3;
0066f21f                          }
0066f21f                          
0066f335                          i_1 = i_2;
0066f335                          i_2 -= 1;
0066f339                      } while (i_1 != 1);
0066f33f                      esi_1 = var_30_1;
0066f343                      i_4 = i_5;
0066f1c9                  }
0066f1c9                  
0066f359                  esi_1 += var_40_1;
0066f35b                  cond:3_1 = var_2c_1 != 1;
0066f35c                  var_44 += ecx_3;
0066f360                  var_30_1 = esi_1;
0066f364                  var_2c_1 -= 1;
0066f368              } while (cond:3_1);
0066f1a8          }
0066f181      }
0066f170  }

0066f3aa                                8d 9b 00 00 00 00                                                            ......
0066f518                                                                          cc cc cc cc cc cc cc cc                          ........

0066f520  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_XRGB,1>,BlitFormat_AXXX,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066f520  {
0066f529      void* eax;
0066f529      int32_t ecx = *(uint32_t*)((char*)eax + 8);
0066f52e      int32_t edx = *(uint32_t*)((char*)eax + 0x14);
0066f531      int32_t ebx;
0066f531      int32_t var_38 = ebx;
0066f534      uint64_t st0;
0066f534      int80_t st1;
0066f534      int64_t st2;
0066f534      int16_t st3[0x4];
0066f534      int64_t st4;
0066f534      
0066f534      if (ecx == 0)
0066f534      {
0066f67e          union __inner0 = g_SourceColor.__inner0;
0066f682          union ecx_8;
0066f682          *(uint8_t*)((char*)ecx_8 + 0) = *(uint8_t*)((char*)eax + 0x24);
0066f685          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_8 + 0);
0066f689          int32_t ecx_9 = *(uint32_t*)((char*)eax + 0x20);
0066f689          
0066f68e          if (ecx_9 > 0)
0066f68e          {
0066f694              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066f697              int32_t eax_12 = *(uint32_t*)((char*)eax + 0x18);
0066f6a6              int32_t var_1c_2 = ecx_9;
0066f75d              bool cond:1_1;
0066f75d              
0066f75d              do
0066f75d              {
0066f6b0                  int32_t i = i_3;
0066f6b0                  
0066f6b6                  if (i > 0)
0066f6b6                  {
0066f6c0                      uint32_t edi_7 = (__inner0 >> 0x18);
0066f6c0                      
0066f748                      do
0066f748                      {
0066f6c5                          i -= 1;
0066f6c5                          
0066f6c8                          if (edi_7 != 0)
0066f6c8                          {
0066f6d4                              union __inner0_1;
0066f6d4                              
0066f6d4                              if (edi_7 != 0xff)
0066f6d4                              {
0066f6dd                                  int32_t var_18_2 = *(uint32_t*)(edx + (i << 2));
0066f6e1                                  st1 = 0;
0066f6ef                                  st2 = _m_punpckhwd(0xffffff, 0);
0066f6f5                                  *(uint8_t*)((char*)var_18_2)[3] = 0xff;
0066f6ff                                  st0 = _m_punpckhwd(((uint64_t)var_18_2), 0);
0066f711                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066f714                                  st3 = ((uint64_t)(edi_7 + 1));
0066f71a                                  st4 = _m_punpcklwd(st3, st3[0]);
0066f723                                  st3 = _m_punpcklwd(st4, st4[0]);
0066f72c                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066f740                                  __inner0_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066f6d4                              }
0066f6d4                              else
0066f6d6                                  __inner0_1 = __inner0;
0066f6d6                              
0066f743                              *(uint32_t*)(edx + (i << 2)) = __inner0_1;
0066f6c8                          }
0066f748                      } while (i > 0);
0066f6b6                  }
0066f6b6                  
0066f756                  edx -= eax_12;
0066f758                  cond:1_1 = var_1c_2 != 1;
0066f759                  var_1c_2 -= 1;
0066f75d              } while (cond:1_1);
0066f68e          }
0066f534      }
0066f534      else
0066f534      {
0066f53a          uint32_t ebx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066f53e          int32_t var_30 = ecx;
0066f546          int32_t ecx_1;
0066f546          ecx_1 = ebx_1 != 0;
0066f549          int32_t var_1c_1 = edx;
0066f54d          int32_t ebx_2 = (ebx_1 + ecx_1);
0066f54f          int32_t ecx_2 = *(uint32_t*)((char*)eax + 0x20);
0066f54f          
0066f554          if (ecx_2 > 0)
0066f554          {
0066f55a              int32_t i_5 = *(uint32_t*)((char*)eax + 0x1c);
0066f55d              int32_t edi_1 = *(uint32_t*)((char*)eax + 0xc);
0066f560              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066f563              int32_t i_4 = i_5;
0066f56f              int32_t var_18_1 = ecx_2;
0066f66d              bool cond:2_1;
0066f66d              
0066f66d              do
0066f66d              {
0066f575                  if (i_5 > 0)
0066f575                  {
0066f583                      int32_t* esi_1 = (edx + (i_5 << 2));
0066f588                      int32_t i_2 = i_4;
0066f63e                      int32_t i_1;
0066f63e                      
0066f63e                      do
0066f63e                      {
0066f590                          int32_t ecx_4 = *(uint32_t*)(((char*)esi_1 + (var_30 - edx)) - 4);
0066f599                          esi_1 -= 4;
0066f5a2                          int32_t ecx_6 = ((ecx_4 & 0xff000000) | g_SourceColor.__inner0);
0066f5a6                          uint32_t eax_4 = (ecx_6 >> 0x18);
0066f5af                          int32_t var_28_1 = ecx_6;
0066f5af                          
0066f5b3                          if (ebx_2 != 0x100)
0066f5b3                          {
0066f5b8                              int32_t eax_6;
0066f5b8                              char edx_1;
0066f5b8                              edx_1 = HIGHD(((int64_t)(eax_4 * ebx_2)));
0066f5b8                              eax_6 = LOWD(((int64_t)(eax_4 * ebx_2)));
0066f5c1                              eax_4 = ((eax_6 + ((uint32_t)edx_1)) >> 8);
0066f5b3                          }
0066f5b3                          
0066f5c6                          if (eax_4 != 0)
0066f5c6                          {
0066f5ce                              if (eax_4 != 0xff)
0066f5ce                              {
0066f5d2                                  int32_t var_28_2 = *(uint32_t*)esi_1;
0066f5d6                                  st1 = 0;
0066f5e4                                  st2 = _m_punpckhwd(0xffffff, 0);
0066f5ea                                  *(uint8_t*)((char*)var_28_2)[3] = 0xff;
0066f5f4                                  st0 = _m_punpckhwd(((uint64_t)var_28_2), 0);
0066f606                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_6), 0) & st2) | (st2 & !(st0)));
0066f609                                  st3 = ((uint64_t)(eax_4 + 1));
0066f60f                                  st4 = _m_punpcklwd(st3, st3[0]);
0066f618                                  st3 = _m_punpcklwd(st4, st4[0]);
0066f621                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066f635                                  ecx_6 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066f5ce                              }
0066f5ce                              
0066f638                              *(uint32_t*)esi_1 = ecx_6;
0066f5c6                          }
0066f5c6                          
0066f63a                          i_1 = i_2;
0066f63a                          i_2 -= 1;
0066f63e                      } while (i_1 != 1);
0066f644                      edx = var_1c_1;
0066f648                      i_5 = i_4;
0066f575                  }
0066f575                  
0066f65e                  edx += eax_1;
0066f660                  cond:2_1 = var_18_1 != 1;
0066f661                  var_30 += edi_1;
0066f665                  var_1c_1 = edx;
0066f669                  var_18_1 -= 1;
0066f66d              } while (cond:2_1);
0066f554          }
0066f534      }
0066f520  }

0066f76c                                      cc cc cc cc                                                              ....

0066f770  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_XRGB,0>,BlitFormat_AXXX,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066f770  {
0066f779      void* eax;
0066f779      int32_t ecx = *(uint32_t*)((char*)eax + 8);
0066f77e      int32_t edx = *(uint32_t*)((char*)eax + 0x14);
0066f781      int32_t ebx;
0066f781      int32_t var_38 = ebx;
0066f784      uint64_t st0;
0066f784      int80_t st1;
0066f784      int64_t st2;
0066f784      int16_t st3[0x4];
0066f784      int64_t st4;
0066f784      
0066f784      if (ecx == 0)
0066f784      {
0066f8ce          union __inner0 = g_SourceColor.__inner0;
0066f8d2          union ecx_8;
0066f8d2          *(uint8_t*)((char*)ecx_8 + 0) = *(uint8_t*)((char*)eax + 0x24);
0066f8d5          *(uint8_t*)((char*)__inner0 + 3) = *(uint8_t*)((char*)ecx_8 + 0);
0066f8d9          int32_t ecx_9 = *(uint32_t*)((char*)eax + 0x20);
0066f8d9          
0066f8de          if (ecx_9 > 0)
0066f8de          {
0066f8e4              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066f8e7              int32_t eax_12 = *(uint32_t*)((char*)eax + 0x18);
0066f8f6              int32_t var_1c_2 = ecx_9;
0066f9ad              bool cond:1_1;
0066f9ad              
0066f9ad              do
0066f9ad              {
0066f900                  int32_t i = i_3;
0066f900                  
0066f906                  if (i > 0)
0066f906                  {
0066f910                      uint32_t edi_7 = (__inner0 >> 0x18);
0066f910                      
0066f998                      do
0066f998                      {
0066f915                          i -= 1;
0066f915                          
0066f918                          if (edi_7 != 0)
0066f918                          {
0066f924                              union __inner0_1;
0066f924                              
0066f924                              if (edi_7 != 0xff)
0066f924                              {
0066f92d                                  int32_t var_18_2 = *(uint32_t*)(edx + (i << 2));
0066f931                                  st1 = 0;
0066f93f                                  st2 = _m_punpckhwd(0xffffff, 0);
0066f945                                  *(uint8_t*)((char*)var_18_2)[3] = 0xff;
0066f94f                                  st0 = _m_punpckhwd(((uint64_t)var_18_2), 0);
0066f961                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066f964                                  st3 = ((uint64_t)(edi_7 + 1));
0066f96a                                  st4 = _m_punpcklwd(st3, st3[0]);
0066f973                                  st3 = _m_punpcklwd(st4, st4[0]);
0066f97c                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066f990                                  __inner0_1 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066f924                              }
0066f924                              else
0066f926                                  __inner0_1 = __inner0;
0066f926                              
0066f993                              *(uint32_t*)(edx + (i << 2)) = __inner0_1;
0066f918                          }
0066f998                      } while (i > 0);
0066f906                  }
0066f906                  
0066f9a6                  edx -= eax_12;
0066f9a8                  cond:1_1 = var_1c_2 != 1;
0066f9a9                  var_1c_2 -= 1;
0066f9ad              } while (cond:1_1);
0066f8de          }
0066f784      }
0066f784      else
0066f784      {
0066f78a          uint32_t ebx_1 = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066f78e          int32_t var_30 = ecx;
0066f796          int32_t ecx_1;
0066f796          ecx_1 = ebx_1 != 0;
0066f799          int32_t var_1c_1 = edx;
0066f79d          int32_t ebx_2 = (ebx_1 + ecx_1);
0066f79f          int32_t ecx_2 = *(uint32_t*)((char*)eax + 0x20);
0066f79f          
0066f7a4          if (ecx_2 > 0)
0066f7a4          {
0066f7aa              int32_t i_5 = *(uint32_t*)((char*)eax + 0x1c);
0066f7ad              int32_t edi_1 = *(uint32_t*)((char*)eax + 0xc);
0066f7b0              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066f7b3              int32_t i_4 = i_5;
0066f7bf              int32_t var_18_1 = ecx_2;
0066f8bd              bool cond:2_1;
0066f8bd              
0066f8bd              do
0066f8bd              {
0066f7c5                  if (i_5 > 0)
0066f7c5                  {
0066f7d3                      int32_t* esi_1 = (edx + (i_5 << 2));
0066f7d8                      int32_t i_2 = i_4;
0066f88e                      int32_t i_1;
0066f88e                      
0066f88e                      do
0066f88e                      {
0066f7e0                          int32_t ecx_4 = *(uint32_t*)(((var_30 - edx) + esi_1) - 4);
0066f7e9                          esi_1 -= 4;
0066f7f2                          int32_t ecx_6 = ((ecx_4 & 0xff000000) | g_SourceColor.__inner0);
0066f7f6                          uint32_t eax_4 = (ecx_6 >> 0x18);
0066f7ff                          int32_t var_28_1 = ecx_6;
0066f7ff                          
0066f803                          if (ebx_2 != 0x100)
0066f803                          {
0066f808                              int32_t eax_6;
0066f808                              char edx_1;
0066f808                              edx_1 = HIGHD(((int64_t)(eax_4 * ebx_2)));
0066f808                              eax_6 = LOWD(((int64_t)(eax_4 * ebx_2)));
0066f811                              eax_4 = ((eax_6 + ((uint32_t)edx_1)) >> 8);
0066f803                          }
0066f803                          
0066f816                          if (eax_4 != 0)
0066f816                          {
0066f81e                              if (eax_4 != 0xff)
0066f81e                              {
0066f822                                  int32_t var_28_2 = *(uint32_t*)esi_1;
0066f826                                  st1 = 0;
0066f834                                  st2 = _m_punpckhwd(0xffffff, 0);
0066f83a                                  *(uint8_t*)((char*)var_28_2)[3] = 0xff;
0066f844                                  st0 = _m_punpckhwd(((uint64_t)var_28_2), 0);
0066f856                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_6), 0) & st2) | (st2 & !(st0)));
0066f859                                  st3 = ((uint64_t)(eax_4 + 1));
0066f85f                                  st4 = _m_punpcklwd(st3, st3[0]);
0066f868                                  st3 = _m_punpcklwd(st4, st4[0]);
0066f871                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066f885                                  ecx_6 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066f81e                              }
0066f81e                              
0066f888                              *(uint32_t*)esi_1 = ecx_6;
0066f816                          }
0066f816                          
0066f88a                          i_1 = i_2;
0066f88a                          i_2 -= 1;
0066f88e                      } while (i_1 != 1);
0066f894                      edx = var_1c_1;
0066f898                      i_5 = i_4;
0066f7c5                  }
0066f7c5                  
0066f8ae                  edx += eax_1;
0066f8b0                  cond:2_1 = var_18_1 != 1;
0066f8b1                  var_30 += edi_1;
0066f8b5                  var_1c_1 = edx;
0066f8b9                  var_18_1 -= 1;
0066f8bd              } while (cond:2_1);
0066f7a4          }
0066f784      }
0066f770  }

0066f9bc                                                                                      cc cc cc cc                              ....

0066f9c0  void __convention("regparm") ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB,1>,BlitFormat_AXXX,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066f9c0  {
0066f9c9      void* eax;
0066f9c9      uint32_t ecx = *(uint32_t*)((char*)eax + 8);
0066f9d1      char var_30;
0066f9d1      uint64_t st0;
0066f9d1      int80_t st1;
0066f9d1      int64_t st2;
0066f9d1      uint64_t st3;
0066f9d1      int64_t st4;
0066f9d1      
0066f9d1      if (ecx == 0)
0066f9d1      {
0066fb4f          ecx = *(uint8_t*)((char*)eax + 0x24);
0066fb52          int32_t ebx_2 = *(uint32_t*)((char*)eax + 0x14);
0066fb55          union __inner0 = g_SourceColor.__inner0;
0066fb59          *(uint8_t*)((char*)__inner0 + 3) = ecx;
0066fb5d          int32_t ecx_8 = *(uint32_t*)((char*)eax + 0x20);
0066fb62          int32_t var_24_1 = ebx_2;
0066fb62          
0066fb66          if (ecx_8 > 0)
0066fb66          {
0066fb6c              int32_t edx_9 = *(uint32_t*)((char*)eax + 0x18);
0066fb6f              int32_t i_4 = *(uint32_t*)((char*)eax + 0x1c);
0066fb7a              int32_t var_1c_2 = ecx_8;
0066fc71              bool cond:2_1;
0066fc71              
0066fc71              do
0066fc71              {
0066fb82                  if (i_4 > 0)
0066fb82                  {
0066fb8f                      uint32_t esi_5 = (__inner0 >> 0x18);
0066fb92                      char* eax_15 = (((i_4 * 3) + ebx_2) + 2);
0066fb96                      int32_t i_2 = i_4;
0066fc54                      int32_t i;
0066fc54                      
0066fc54                      do
0066fc54                      {
0066fba2                          eax_15 -= 3;
0066fba2                          
0066fba7                          if (esi_5 != 0)
0066fba7                          {
0066fbb4                              if (esi_5 != 0xff)
0066fbb4                              {
0066fbbf                                  var_30 = eax_15[0xfffffffe];
0066fbc6                                  char var_2f_2 = eax_15[0xffffffff];
0066fbcc                                  char var_2e_2 = *(uint8_t*)eax_15;
0066fbd0                                  st1 = 0;
0066fbde                                  st2 = _m_punpckhwd(0xffffff, 0);
0066fbe4                                  char var_2d_2 = 0xff;
0066fbee                                  st0 = _m_punpckhwd(((uint64_t)var_30), 0);
0066fc00                                  st2 = ((_m_punpckhwd(((uint64_t)__inner0), 0) & st2) | (st2 & !(st0)));
0066fc03                                  st3 = ((uint64_t)(esi_5 + 1));
0066fc09                                  st4 = _m_punpcklwd(st3, st3);
0066fc12                                  st3 = _m_punpcklwd(st4, st4);
0066fc1b                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066fc32                                  var_30 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066fbb4                              }
0066fbb4                              else
0066fbb6                                  var_30 = __inner0;
0066fbb6                              
0066fc36                              int32_t ecx_10;
0066fc36                              ecx_10 = var_30;
0066fc3a                              eax_15[0xfffffffe] = ecx_10;
0066fc44                              eax_15[0xffffffff] = ((int8_t)(var_30 >> 8));
0066fc4e                              *(uint8_t*)eax_15 = ((int8_t)(var_30 >> 0x10));
0066fba7                          }
0066fba7                          
0066fc50                          i = i_2;
0066fc50                          i_2 -= 1;
0066fc54                      } while (i != 1);
0066fb82                  }
0066fb82                  
0066fc66                  ebx_2 = (var_24_1 - edx_9);
0066fc68                  cond:2_1 = var_1c_2 != 1;
0066fc69                  var_24_1 = ebx_2;
0066fc6d                  var_1c_2 -= 1;
0066fc71              } while (cond:2_1);
0066fb66          }
0066f9d1      }
0066f9d1      else
0066f9d1      {
0066f9d7          uint32_t ebx = ((uint32_t)*(uint8_t*)((char*)eax + 0x24));
0066f9db          int32_t esi_1 = *(uint32_t*)((char*)eax + 0x14);
0066f9de          uint32_t var_2c = ecx;
0066f9e6          int32_t ecx_1;
0066f9e6          ecx_1 = ebx != 0;
0066f9e9          int32_t var_24 = esi_1;
0066f9ed          int32_t ebx_1 = (ebx + ecx_1);
0066f9ef          int32_t ecx_2 = *(uint32_t*)((char*)eax + 0x20);
0066f9ef          
0066f9f4          if (ecx_2 > 0)
0066f9f4          {
0066f9fa              int32_t i_3 = *(uint32_t*)((char*)eax + 0x1c);
0066fa01              int32_t edx_1 = *(uint32_t*)((char*)eax + 0xc);
0066fa04              int32_t eax_1 = *(uint32_t*)((char*)eax + 0x18);
0066fa0f              int32_t var_20_1 = ecx_2;
0066fb3e              bool cond:3_1;
0066fb3e              
0066fb3e              do
0066fb3e              {
0066fa13                  int32_t i_1 = i_3;
0066fa13                  
0066fa19                  if (i_1 > 0)
0066fa19                  {
0066fa22                      char* esi_2 = (((i_1 * 3) + esi_1) + 2);
0066fa22                      
0066fb15                      do
0066fb15                      {
0066fa34                          int32_t ecx_4 = *(uint32_t*)((var_2c + (i_1 << 2)) - 4);
0066fa3d                          i_1 -= 1;
0066fa44                          int32_t ecx_6 = ((ecx_4 & 0xff000000) | g_SourceColor.__inner0);
0066fa48                          esi_2 -= 3;
0066fa4b                          uint32_t eax_4 = (ecx_6 >> 0x18);
0066fa54                          int32_t var_18_1 = ecx_6;
0066fa54                          
0066fa58                          if (ebx_1 != 0x100)
0066fa58                          {
0066fa5d                              int32_t eax_6;
0066fa5d                              char edx_2;
0066fa5d                              edx_2 = HIGHD(((int64_t)(eax_4 * ebx_1)));
0066fa5d                              eax_6 = LOWD(((int64_t)(eax_4 * ebx_1)));
0066fa66                              eax_4 = ((eax_6 + ((uint32_t)edx_2)) >> 8);
0066fa58                          }
0066fa58                          
0066fa6b                          if (eax_4 != 0)
0066fa6b                          {
0066fa77                              if (eax_4 != 0xff)
0066fa77                              {
0066fa7f                                  uint32_t edx_3;
0066fa7f                                  edx_3 = esi_2[0xfffffffe];
0066fa82                                  var_30 = edx_3;
0066fa86                                  edx_3 = esi_2[0xffffffff];
0066fa89                                  char var_2f_1 = edx_3;
0066fa8d                                  edx_3 = *(uint8_t*)esi_2;
0066fa8f                                  char var_2e_1 = edx_3;
0066fa93                                  st1 = 0;
0066faa1                                  st2 = _m_punpckhwd(0xffffff, 0);
0066faa7                                  char var_2d_1 = 0xff;
0066fab1                                  st0 = _m_punpckhwd(((uint64_t)var_30), 0);
0066fac3                                  st2 = ((_m_punpckhwd(((uint64_t)ecx_6), 0) & st2) | (st2 & !(st0)));
0066fac6                                  st3 = ((uint64_t)(eax_4 + 1));
0066facc                                  st4 = _m_punpcklwd(st3, st3);
0066fad5                                  st3 = _m_punpcklwd(st4, st4);
0066fade                                  st2 = _m_psrlwi(_m_pmullw(st2, st3), 8);
0066faf5                                  var_30 = _m_packuswb(_m_psubw(st0, _m_psubw(_m_psrlwi(_m_pmullw(st0, st3), 8), st2)), 0);
0066fa77                              }
0066fa77                              else
0066fa79                                  var_30 = ecx_6;
0066fa79                              
0066fb01                              ecx_6 = var_30;
0066fb0b                              esi_2[0xfffffffe] = ecx_6;
0066fb0e                              esi_2[0xffffffff] = ((int8_t)(var_30 >> 8));
0066fb11                              *(uint8_t*)esi_2 = ((int8_t)(var_30 >> 0x10));
0066fa6b                          }
0066fb15                      } while (i_1 > 0);
0066fa19                  }
0066fa19                  
0066fb2d                  esi_1 = (var_24 + eax_1);
0066fb31                  cond:3_1 = var_20_1 != 1;
0066fb32                  var_2c += edx_1;
0066fb36                  var_24 = esi_1;
0066fb3a                  var_20_1 -= 1;
0066fb3e              } while (cond:3_1);
0066f9f4          }
0066f9d1      }
0066f9c0  }

0066fa28                          8d a4 24 00 00 00 00 90                                                          ..$.....

0066fc80  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066fc80  {
0066fc8b      if (IsSSEAvailable() == 0)
0066fc92          /* tailcall */
0066fc92          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_ARGB,0>,BlitFormat_ARGB,BlitFormat_ARGB>(arg1);
0066fc92      
0066fc8d      /* tailcall */
0066fc8d      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_ARGB,1>,BlitFormat_ARGB,BlitFormat_ARGB>(arg1);
0066fc80  }

0066fc97                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fca0  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066fca0  {
0066fcab      if (IsSSEAvailable() == 0)
0066fcb2          /* tailcall */
0066fcb2          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_XRGB,0>,BlitFormat_ARGB,BlitFormat_XRGB>(arg1);
0066fcb2      
0066fcad      /* tailcall */
0066fcad      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_XRGB,0>,BlitFormat_ARGB,BlitFormat_XRGB>(arg1);
0066fca0  }

0066fcb7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fcc0  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066fcc0  {
0066fccb      if (IsSSEAvailable() == 0)
0066fcd2          /* tailcall */
0066fcd2          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_RGB,1>,BlitFormat_ARGB,BlitFormat_RGB>(arg1);
0066fcd2      
0066fccd      /* tailcall */
0066fccd      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_ARGB,BlitFormat_RGB,1>,BlitFormat_ARGB,BlitFormat_RGB>(arg1);
0066fcc0  }

0066fcd7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fce0  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066fce0  {
0066fceb      if (IsSSEAvailable() == 0)
0066fcf2          /* tailcall */
0066fcf2          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_ARGB,0>,BlitFormat_XRGB,BlitFormat_ARGB>(arg1);
0066fcf2      
0066fced      /* tailcall */
0066fced      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_ARGB,1>,BlitFormat_XRGB,BlitFormat_ARGB>(arg1);
0066fce0  }

0066fcf7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fd00  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066fd00  {
0066fd0b      if (IsSSEAvailable() == 0)
0066fd12          /* tailcall */
0066fd12          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_XRGB,0>,BlitFormat_XRGB,BlitFormat_XRGB>(arg1);
0066fd12      
0066fd0d      /* tailcall */
0066fd0d      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_XRGB,0>,BlitFormat_XRGB,BlitFormat_XRGB>(arg1);
0066fd00  }

0066fd17                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fd20  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066fd20  {
0066fd2b      if (IsSSEAvailable() == 0)
0066fd32          /* tailcall */
0066fd32          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_RGB,0>,BlitFormat_XRGB,BlitFormat_RGB>(arg1);
0066fd32      
0066fd2d      /* tailcall */
0066fd2d      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_XRGB,BlitFormat_RGB,0>,BlitFormat_XRGB,BlitFormat_RGB>(arg1);
0066fd20  }

0066fd37                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fd40  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_RGB,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066fd40  {
0066fd4b      if (IsSSEAvailable() == 0)
0066fd52          /* tailcall */
0066fd52          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_ARGB,0>,BlitFormat_RGB,BlitFormat_ARGB>(arg1);
0066fd52      
0066fd4d      /* tailcall */
0066fd4d      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_ARGB,1>,BlitFormat_RGB,BlitFormat_ARGB>(arg1);
0066fd40  }

0066fd57                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fd60  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_RGB,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066fd60  {
0066fd6b      if (IsSSEAvailable() == 0)
0066fd72          /* tailcall */
0066fd72          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_XRGB,0>,BlitFormat_RGB,BlitFormat_XRGB>(arg1);
0066fd72      
0066fd6d      /* tailcall */
0066fd6d      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_XRGB,0>,BlitFormat_RGB,BlitFormat_XRGB>(arg1);
0066fd60  }

0066fd77                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fd80  void BlitLoopNoScale_FourChannelAlpha<BlitFormat_RGB,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066fd80  {
0066fd8b      if (IsSSEAvailable() == 0)
0066fd92          /* tailcall */
0066fd92          return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_RGB,0>,BlitFormat_RGB,BlitFormat_RGB>(arg1);
0066fd92      
0066fd8d      /* tailcall */
0066fd8d      return BlitLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_RGB,BlitFormat_RGB,0>,BlitFormat_RGB,BlitFormat_RGB>(arg1);
0066fd80  }

0066fd97                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fda0  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_Fill,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066fda0  {
0066fdab      if (IsSSEAvailable() == 0)
0066fdb2          /* tailcall */
0066fdb2          return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_ARGB,0>,BlitFormat_Fill,BlitFormat_ARGB>(arg1);
0066fdb2      
0066fdad      /* tailcall */
0066fdad      return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_ARGB,1>,BlitFormat_Fill,BlitFormat_ARGB>(arg1);
0066fda0  }

0066fdb7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fdc0  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_Fill,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066fdc0  {
0066fdcb      if (IsSSEAvailable() == 0)
0066fdd2          /* tailcall */
0066fdd2          return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_XRGB,0>,BlitFormat_Fill,BlitFormat_XRGB>(arg1);
0066fdd2      
0066fdcd      /* tailcall */
0066fdcd      return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_XRGB,0>,BlitFormat_Fill,BlitFormat_XRGB>(arg1);
0066fdc0  }

0066fdd7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fde0  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_Fill,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066fde0  {
0066fdeb      if (IsSSEAvailable() == 0)
0066fdf2          /* tailcall */
0066fdf2          return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_RGB,0>,BlitFormat_Fill,BlitFormat_RGB>(arg1);
0066fdf2      
0066fded      /* tailcall */
0066fded      return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_Fill,BlitFormat_RGB,0>,BlitFormat_Fill,BlitFormat_RGB>(arg1);
0066fde0  }

0066fdf7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fe00  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_A,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066fe00  {
0066fe0b      if (IsSSEAvailable() == 0)
0066fe12          /* tailcall */
0066fe12          return ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB,0>,BlitFormat_ARGB>(arg1);
0066fe12      
0066fe0d      /* tailcall */
0066fe0d      return ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB,1>,BlitFormat_ARGB>(arg1);
0066fe00  }

0066fe17                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fe20  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_A,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066fe20  {
0066fe2b      if (IsSSEAvailable() == 0)
0066fe32          /* tailcall */
0066fe32          return ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_XRGB,0>,BlitFormat_XRGB>(arg1);
0066fe32      
0066fe2d      /* tailcall */
0066fe2d      return ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_XRGB,0>,BlitFormat_XRGB>(arg1);
0066fe20  }

0066fe37                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fe40  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_A,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066fe40  {
0066fe4b      if (IsSSEAvailable() == 0)
0066fe52          /* tailcall */
0066fe52          return ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB,0>,BlitFormat_RGB>(arg1);
0066fe52      
0066fe4d      /* tailcall */
0066fe4d      return ColoringLoopNoScale_FromA8<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB,0>,BlitFormat_RGB>(arg1);
0066fe40  }

0066fe57                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fe60  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB>(struct BlitArgs const* arg1)

0066fe60  {
0066fe6b      if (IsSSEAvailable() == 0)
0066fe72          /* tailcall */
0066fe72          return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB,0>,BlitFormat_AXXX,BlitFormat_ARGB>(arg1);
0066fe72      
0066fe6d      /* tailcall */
0066fe6d      return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_ARGB,1>,BlitFormat_AXXX,BlitFormat_ARGB>(arg1);
0066fe60  }

0066fe77                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fe80  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_XRGB>(struct BlitArgs const* arg1)

0066fe80  {
0066fe8b      if (IsSSEAvailable() == 0)
0066fe92          /* tailcall */
0066fe92          return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_XRGB,0>,BlitFormat_AXXX,BlitFormat_XRGB>(arg1);
0066fe92      
0066fe8d      /* tailcall */
0066fe8d      return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_XRGB,1>,BlitFormat_AXXX,BlitFormat_XRGB>(arg1);
0066fe80  }

0066fe97                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fea0  void ColoringLoopNoScale_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB>(struct BlitArgs const* arg1)

0066fea0  {
0066feab      if (IsSSEAvailable() == 0)
0066feb2          /* tailcall */
0066feb2          return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB,1>,BlitFormat_AXXX,BlitFormat_RGB>(arg1);
0066feb2      
0066fead      /* tailcall */
0066fead      return ColoringLoopNoScale<&BlitOp_FourChannelAlpha<BlitFormat_AXXX,BlitFormat_RGB,1>,BlitFormat_AXXX,BlitFormat_RGB>(arg1);
0066fea0  }

0066feb7                                                                       cc cc cc cc cc cc cc cc cc                         .........

0066fec0  void __fastcall DataSource::DataSource(class DataSource* this)

0066fec0  {
0066fec4      this->vtable = 0x7fdb3c;
0066feca      this->pData = nullptr;
0066fecd      this->pStartData = nullptr;
0066fec0  }

0066fed1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0066fee0  void __thiscall DataSource::Open(class DataSource* this, uint8_t* arg2, int32_t arg3)

0066fee0  {
0066fee4      this->pStartData = arg2;
0066fee7      this->pData = arg2;
0066feee      this->dataSize = arg3;
0066fee0  }

0066fef4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0066ff00  void __fastcall DataSource::Close(class DataSource* this)

0066ff00  {
0066ff02      this->pData = nullptr;
0066ff05      this->pStartData = nullptr;
0066ff00  }

0066ff09                             90 90 90 90 90 90 90                                                           .......

0066ff10  void __fastcall DataSource::~DataSource(class DataSource* this)

0066ff10  {
0066ff12      this->vtable = 0x7fdb3c;
0066ff18      this->pData = nullptr;
0066ff1b      this->pStartData = nullptr;
0066ff10  }

0066ff1f                                                                                               90                                 .

0066ff20  void* __thiscall DataSource::`scalar deleting destructor'(class DataSource* this, uint32_t arg2)

0066ff20  {
0066ff25      this->pData = nullptr;
0066ff28      this->pStartData = nullptr;
0066ff30      this->vtable = 0x7fdb3c;
0066ff30      
0066ff36      if ((arg2 & 1) != 0)
0066ff39          operator delete(this);
0066ff39      
0066ff44      return this;
0066ff20  }

0066ff47                       90 90 90 90 90 90 90 90 90                                                         .........

0066ff50  int32_t CompareInts(void const* arg1, void const* arg2)

0066ff50  {
0066ff58      int32_t eax = *(uint32_t*)arg1;
0066ff5a      int32_t ecx_1 = *(uint32_t*)arg2;
0066ff5a      
0066ff5e      if (eax > ecx_1)
0066ff65          return 1;
0066ff65      
0066ff6a      int32_t edx;
0066ff6a      edx = eax >= ecx_1;
0066ff70      return (edx - 1);
0066ff50  }

0066ff71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0066ff80  void __fastcall CMostlyConsecutiveIntSet::Sort(class CMostlyConsecutiveIntSet* this)

0066ff80  {
0066ff88      if (this->m_bSorted == 0)
0066ff88      {
0066ff8e          uint32_t m_num = this->m_Ints.m_num;
0066ff8e          
0066ff93          if (m_num != 0)
0066ff93          {
0066ffac              qsort(this->m_Ints.m_data, m_num, 4, CompareInts);
0066ffb4              uint32_t edx_1;
0066ffb4              edx_1 = 0;
0066ffb6              int32_t i_1 = (this->m_Ints.m_num - 1);
0066ffb6              
0066ffbd              if ((i_1 + 1) > 1)
0066ffbd              {
0066fffa                  int32_t i;
0066fffa                  
0066fffa                  do
0066fffa                  {
0066ffc1                      int32_t* m_data = this->m_Ints.m_data;
0066ffc1                      
0066ffd0                      if (m_data[i_1] == m_data[(i_1 - 1)])
0066ffd0                      {
0066ffd2                          uint32_t m_num_1 = this->m_Ints.m_num;
0066ffd2                          
0066ffd7                          if (i_1 < m_num_1)
0066ffd7                          {
0066ffdc                              this->m_Ints.m_num = (m_num_1 - 1);
0066ffdc                              
0066ffdf                              if (i_1 != (m_num_1 - 1))
0066ffdf                              {
0066ffe1                                  int32_t* m_data_1 = this->m_Ints.m_data;
0066ffe7                                  m_data_1[i_1] = m_data_1[(m_num_1 - 1)];
0066ffed                                  this->m_Ints.m_data[this->m_Ints.m_num] = 0;
0066ffdf                              }
0066ffd7                          }
0066ffd7                          
0066fff7                          edx_1 = 1;
0066ffd0                      }
0066ffd0                      
0066fff9                      i = i_1;
0066fff9                      i_1 -= 1;
0066fffa                  } while (i != 1);
0066fffa                  
00670000                  if (edx_1 != 0)
00670011                      qsort(this->m_Ints.m_data, this->m_Ints.m_num, 4, CompareInts);
0066ffbd              }
0066ff93          }
0066ff93          
00670017          this->m_bSorted = 1;
0066ff88      }
0066ff80  }

0067001d                                                                                         90 90 90                               ...

00670020  void __fastcall CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(class CMostlyConsecutiveIntSet* this)

00670020  {
00670024      this->vtable = 0x7fdb44;
0067002a      this->m_Ints.m_data = 0;
0067002d      this->m_Ints.m_sizeAndDeallocate = 0;
00670030      this->m_Ints.m_num = 0;
00670033      this->m_bSorted = 1;
00670020  }

00670038                                                                          90 90 90 90 90 90 90 90                          ........

00670040  uint8_t __thiscall SmartArray<int,1>::SetNElements(class SmartArray<int,1>* this, uint32_t const arg2, uint8_t arg3)

00670040  {
00670052      uint32_t const i;
00670052      
00670052      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
00670052      {
0067007c          i = arg2;
0067007c          
0067007e          if (arg2 < this->m_num)
0067007e          {
0067008f              do
0067008f              {
00670080                  this->m_data[i] = 0;
0067008c                  i += 1;
0067008f              } while (i < this->m_num);
0067007e          }
00670052      }
00670052      else
00670052      {
00670054          int32_t eax_1;
00670054          eax_1 = arg3;
0067005a          uint32_t const eax_2;
0067005a          
0067005a          if (eax_1 == 0)
00670063              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
0067005a          else
0067005c              eax_2 = arg2;
0067005c          
0067006b          i = SmartArray<unsigned long,1>::grow(this, eax_2);
0067006b          
00670072          if (i == 0)
00670076              return i;
00670052      }
00670052      
00670091      this->m_num = arg2;
00670095      i = 1;
00670098      return 1;
00670040  }

0067009b                                                                                   90 90 90 90 90                             .....

006700a0  void __thiscall CMostlyConsecutiveIntSet::Serialize(class CMostlyConsecutiveIntSet* this, class Archive* arg2)

006700a0  {
006700a0      class CMostlyConsecutiveIntSet* this_1 = this;
006700a4      class Archive* esi = arg2;
006700a8      char eax = esi->m_flags;
006700ad      class CMostlyConsecutiveIntSet* this_2 = this;
006700b0      class CMostlyConsecutiveIntSet* this_3 = this_2;
006700b0      
006700b4      if ((eax & 1) != 0)
006700b4      {
006700ba          CMostlyConsecutiveIntSet::Sort(this);
006700bf          uint32_t m_num = this_2->m_Ints.m_num;
006700c6          arg2 = m_num;
006700ca          int32_t edi_1 = 0;
006700cc          Archive::CheckAlignment(esi, 4);
006700d5          uint8_t* eax_1 = Archive::GetBytes(esi, 4);
006700d5          
006700dc          if (eax_1 != 0)
006700dc          {
006700e2              if ((esi->m_flags & 1) == 0)
006700e2              {
006700e8                  uint32_t m_num_1 = *(uint32_t*)eax_1;
006700ea                  arg2 = m_num_1;
006700ee                  m_num = m_num_1;
006700e2              }
006700e2              else
006700e4                  *(uint32_t*)eax_1 = m_num;
006700dc          }
006700dc          
006700f2          if (m_num > 0)
006700f2          {
00670102              while (true)
00670102              {
00670102                  int32_t eax_2 = edi_1;
00670102                  
00670104                  if (edi_1 < m_num)
00670104                  {
00670109                      void* edx_1 = &this_2->m_Ints.m_data[edi_1];
0067010c                      int32_t i = *(uint32_t*)edx_1;
0067010c                      
00670112                      while (i == *(uint32_t*)edx_1)
00670112                      {
00670114                          eax_2 += 1;
00670115                          i += 1;
00670116                          edx_1 += 4;
00670116                          
0067011b                          if (eax_2 >= m_num)
0067011b                              break;
00670112                      }
00670104                  }
00670104                  
0067011f                  int32_t ebp_1 = (edi_1 - eax_2);
00670126                  int32_t edi_2;
00670126                  
00670126                  if (ebp_1 >= 0xfffffffe)
00670126                  {
00670194                      edi_2 = (edi_1 + 1);
00670195                      int32_t ebp_3 = (this_3->m_Ints.m_data[edi_1] & 0x7fffffff);
0067019b                      Archive::CheckAlignment(esi, 4);
006701a4                      uint8_t* eax_7 = Archive::GetBytes(esi, 4);
006701a4                      
006701b1                      if ((eax_7 != 0 && (esi->m_flags & 1) != 0))
006701b3                          *(uint32_t*)eax_7 = ebp_3;
00670126                  }
00670126                  else
00670126                  {
0067012a                      Archive::CheckAlignment(esi, 4);
00670133                      uint8_t* eax_3 = Archive::GetBytes(esi, 4);
00670133                      
0067013a                      if (eax_3 != 0)
0067013a                      {
00670140                          if ((esi->m_flags & 1) == 0)
00670146                              ebp_1 = *(uint32_t*)eax_3;
00670140                          else
00670142                              *(uint32_t*)eax_3 = ebp_1;
0067013a                      }
0067013a                      
00670153                      void* ebx_1 = &this_3->m_Ints.m_data[edi_1];
00670156                      Archive::CheckAlignment(esi, 4);
0067015f                      uint8_t* eax_5 = Archive::GetBytes(esi, 4);
0067015f                      
00670166                      if (eax_5 == 0)
00670166                      {
0067017e                          m_num = arg2;
00670182                          edi_2 = (edi_1 - ebp_1);
00670166                      }
00670166                      else if ((esi->m_flags & 1) == 0)
0067016c                      {
0067017c                          *(uint32_t*)ebx_1 = *(uint32_t*)eax_5;
0067017e                          m_num = arg2;
00670182                          edi_2 = (edi_1 - ebp_1);
0067016c                      }
0067016c                      else
0067016c                      {
00670170                          m_num = arg2;
00670174                          *(uint32_t*)eax_5 = *(uint32_t*)ebx_1;
00670176                          edi_2 = (edi_1 - ebp_1);
0067016c                      }
00670126                  }
00670126                  
006701b7                  if (edi_2 >= m_num)
006701b7                      break;
006701b7                  
006700fa                  this_2 = this_3;
006700fe                  edi_1 = edi_2;
00670102              }
006700f2          }
006700b4      }
006700b4      else if ((!(eax) & 1) != 0)
006701c9      {
006701cf          uint32_t edi_3 = 0;
006701d5          arg2 = nullptr;
006701d9          int32_t ebp_4 = 0;
006701db          Archive::CheckAlignment(esi, 4);
006701e4          uint32_t* eax_8 = Archive::GetBytes(esi, 4);
006701e4          
006701eb          if (eax_8 != 0)
006701eb          {
006701f1              if ((esi->m_flags & 1) == 0)
006701f1              {
006701f7                  uint32_t eax_9 = *(uint32_t*)eax_8;
006701fe                  arg2 = eax_9;
006701fe                  
00670202                  if (eax_9 > 0x186a0)
00670202                  {
006702d3                  label_6702d3:
006702d3                      Archive::RaiseError(esi);
006702dd                      return;
00670202                  }
00670202                  
00670208                  edi_3 = eax_9;
006701f1              }
006701f1              else
006701f3                  *(uint32_t*)eax_8 = 0;
006701eb          }
006701eb          
00670214          SmartArray<int,1>::SetNElements(&this_3->m_Ints, edi_3, 1);
00670214          
0067021b          if (edi_3 > 0)
0067021b          {
00670221              class Archive* edi_4 = arg2;
00670225              class Archive* ebx_2 = arg2;
00670225              
006702bb              do
006702bb              {
00670234                  Archive::CheckAlignment(esi, 4);
0067023d                  uint8_t* eax_10 = Archive::GetBytes(esi, 4);
0067023d                  
00670244                  if (eax_10 != 0)
00670244                  {
0067024a                      if ((esi->m_flags & 1) == 0)
00670250                          edi_4 = *(uint32_t*)eax_10;
0067024a                      else
0067024c                          *(uint32_t*)eax_10 = edi_4;
00670244                  }
00670244                  
00670254                  if (edi_4 >= 0)
00670254                  {
006702a1                      if ((edi_4 & 0x40000000) != 0)
006702a3                          edi_4 |= 0x80000000;
006702a3                      
006702ad                      this_3->m_Ints.m_data[ebp_4] = edi_4;
006702b6                      ebp_4 += 1;
00670254                  }
00670254                  else
00670254                  {
0067025a                      edi_4 = -(edi_4);
0067025c                      Archive::CheckAlignment(esi, 4);
00670265                      uint8_t* eax_11 = Archive::GetBytes(esi, 4);
00670265                      
0067026c                      if (eax_11 != 0)
0067026c                      {
00670272                          if ((esi->m_flags & 1) == 0)
00670278                              ebx_2 = *(uint32_t*)eax_11;
00670272                          else
00670274                              *(uint32_t*)eax_11 = ebx_2;
0067026c                      }
0067026c                      
0067027a                      int32_t eax_12 = 0;
0067027a                      
0067027e                      if (edi_4 > 0)
0067027e                      {
00670297                          do
00670297                          {
00670284                              if (ebp_4 >= arg2)
00670284                                  goto label_6702d3;
00670284                              
0067028a                              this_3->m_Ints.m_data[ebp_4] = ebx_2;
00670292                              ebp_4 += 1;
00670293                              ebx_2 = (&ebx_2->vtable + 1);
00670294                              eax_12 += 1;
00670297                          } while (eax_12 < edi_4);
0067027e                      }
00670254                  }
006702bb              } while (ebp_4 < arg2);
0067021b          }
0067021b          
006702c5          this_3->m_bSorted = 1;
006701c9      }
006700a0  }


006702e0  uint8_t __thiscall CMostlyConsecutiveIntSet::Add(class CMostlyConsecutiveIntSet* this, int32_t arg2)

006702e0  {
006702e4      this->m_bSorted = 0;
006702ee      int32_t eax_1 = (this->m_Ints.m_sizeAndDeallocate & 0x7fffffff);
006702f5      uint32_t eax_4;
006702f5      
006702f5      if (this->m_Ints.m_num >= eax_1)
00670303          eax_4 = SmartArray<unsigned long,1>::grow(&this->m_Ints, SmartArray<unsigned long,1>::get_new_size(&this->m_Ints, (eax_1 + 1)));
00670303      
0067030a      if ((this->m_Ints.m_num < eax_1 || eax_4 != 0))
0067030a      {
006702e1          this->m_Ints.m_data[this->m_Ints.m_num] = arg2;
006702e1          this->m_Ints.m_num += 1;
0067030a      }
0067030a      
0067031b      eax_4 = 1;
0067031e      return 1;
006702e0  }

00670321     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00670330  void __fastcall DiskFileInfo_t::ClearData(struct DiskFileInfo_t* this)

00670330  {
00670332      this->iBlockSize_ = 0;
00670335      this->fileSize_ = 0;
00670338      this->data_set_lm = UNDEF_DISK;
0067033b      this->data_subset_lm = 0;
0067033e      this->firstFree_ = 0;
00670341      this->finalFree_ = 0;
00670344      this->iFreeBlocks_ = 0;
00670347      this->btreeRoot_ = 0;
0067034a      this->young_lru_lm = 0;
0067034d      this->old_lru_lm = 0;
00670350      this->use_lru_fm = 0;
00670353      this->magic_ = 0x5442;
0067035e      this->master_map_id_m.id = INVALID_DID.id;
00670364      this->eng_pack_vnum = 0xffffffff;
00670367      this->game_pack_vnum = 0xffffffff;
0067036d      /* tailcall */
0067036d      return DatIDStamp::Clear(&this->id_vnum);
00670330  }

00670372                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00670380  class DatIDStamp* __stdcall DiskConBase::GetDatIDStamp(class DiskConBase const* this @ ecx, class DatIDStamp* __return)

00670380  {
00670387      DatIDStamp::DatIDStamp(__return);
0067038f      return __return;
00670380  }

00670392                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006703a0  void* __thiscall DiskConBase::`scalar deleting destructor'(class DiskConBase* this, uint32_t arg2)

006703a0  {
006703a8      this->vtable = 0x7fdb48;
006703a8      
006703ae      if ((arg2 & 1) != 0)
006703b1          operator delete(this);
006703b1      
006703bc      return this;
006703a0  }

006703bf                                                                                               90                                 .

006703c0  uint8_t __fastcall DiskController::Close(class DiskController* this)

006703c0  {
006703c1      class DiskController* this_1 = this;
006703c3      this = this_1->initialized_fm;
006703c6      uint8_t result = 0;
006703c6      
006703ca      if (this != 0)
006703ca      {
006703d1          if (this_1->read_only_fm == 0)
006703d6              BTree::SaveDataToFile(&this_1->did_tree_m);
006703d6          
006703df          int32_t eax = CLBlockAllocator::Close_Data_File(&this_1->block_man_m);
006703e6          uint8_t ebx_2 = ((int8_t)-(eax));
006703ef          BTree::~BTree(&this_1->did_tree_m);
006703f4          result = ((ebx_2 - ebx_2) + 1);
006703f6          this_1->initialized_fm = 0;
006703ca      }
006703ca      
006703fc      return result;
006703c0  }

006703fd                                                                                         90 90 90                               ...

00670400  uint8_t __thiscall DiskController::GetMembers(class DiskController* this, class SmartArray<BTEntry,1>* arg2)

00670400  {
00670403      /* tailcall */
00670403      return BTree::Get_Id_List(&this->did_tree_m, arg2);
00670400  }

00670408                          90 90 90 90 90 90 90 90                                                          ........

00670410  void __thiscall DiskController::SetDatIDStamp(class DiskController* this, class DatIDStamp* arg2)

00670410  {
00670418      if (this->read_only_fm == 0)
00670418      {
00670425          DatIDStamp::DatIDStamp(&this->file_info_m.id_vnum, arg2);
00670425          
0067042f          if (this->initialized_fm != 0)
00670434              BTree::SaveDataToFile(&this->did_tree_m);
00670418      }
00670410  }

0067043d                                                                                         90 90 90                               ...

00670440  void __fastcall DiskFileInfo_t::DiskFileInfo_t(struct DiskFileInfo_t* this)

00670440  {
00670449      DatIDStamp::DatIDStamp(&this->id_vnum);
00670450      __builtin_memset(&this->iBlockSize_, 0, 0x29);
00670471      this->magic_ = 0x5442;
0067047c      this->master_map_id_m.id = INVALID_DID.id;
00670484      this->eng_pack_vnum = 0xffffffff;
00670487      this->game_pack_vnum = 0xffffffff;
0067048a      DatIDStamp::Clear(&this->id_vnum);
00670440  }

00670494                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006704a0  void __thiscall Cache_Pack_t::UpdatePackedSize(class Cache_Pack_t* this, class SmartBuffer const* arg2)

006704a0  {
006704b8      void* ebx_1 = &SmartBuffer::GetBuffer(&this->m_buff)[4];
006704b8      
006704c2      if (SmartBuffer::GetBuffer(arg2) == ebx_1)
006704c2      {
006704d3          SmartBuffer::ReconfigureAllocation(&this->m_buff, (SmartBuffer::GetSize(arg2) + 4), 1);
006704f4          void __return;
006704f4          SmartBuffer::operator=(&this->m_buff, SmartBuffer::MakeWindow(&this->m_buff, &__return, 0, (SmartBuffer::GetSize(arg2) + 4)));
006704fd          SmartBuffer::~SmartBuffer(&__return);
006704c2      }
006704a0  }

0067050b                                   90 90 90 90 90                                                             .....

00670510  uint8_t DiskConBase::SaveData(class DiskConBase* this @ ecx, class IDClass<_tagDataID,32,0> arg2, class Cache_Pack_t* arg3, int32_t arg4) __pure

00670510  {
00670510      int32_t eax;
00670510      eax = 0;
00670512      return 0;
00670510  }

00670515                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00670520  class IDClass<_tagDataID,32,0>* __stdcall DiskConBase::GetMasterMapDID(class DiskConBase* this @ ecx, class IDClass<_tagDataID,32,0>* __return)

00670520  {
0067052a      __return->id = INVALID_DID.id;
0067052c      return __return;
00670520  }

0067052f                                               90                                                                 .

00670530  class IDClass<_tagDataID,32,0>* __stdcall DiskConBase::SetMasterMapDID(class DiskConBase* this @ ecx, class IDClass<_tagDataID,32,0>* __return, class IDClass<_tagDataID,32,0> arg3)

00670530  {
0067053a      __return->id = INVALID_DID.id;
0067053c      return __return;
00670530  }

0067053f                                                                                               90                                 .

00670540  uint8_t __thiscall DiskController::SaveData(class DiskController* this, class IDClass<_tagDataID,32,0> arg2, class Cache_Pack_t* arg3, int32_t arg4)

00670540  {
00670545      int32_t var_10 = 0;
00670549      int32_t var_c = 0;
0067054d      int32_t var_8 = 0;
00670555      class IDClass<_tagDataID,32,0> var_14 = arg2;
00670565      uint32_t var_18 = (arg3->m_iVersion << 0x10);
00670572      int32_t var_4 = arg4;
00670582      return this->vtable->SaveDataEx(&var_18, arg3, 1);
00670540  }

00670585                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00670590  uint8_t __thiscall DiskController::SaveAndCompressData(class DiskController* this, class IDClass<_tagDataID,32,0> arg2, class Cache_Pack_t* arg3, int32_t arg4)

00670590  {
00670595      int32_t var_10 = 0;
00670599      int32_t var_c = 0;
0067059d      int32_t var_8 = 0;
006705a5      class IDClass<_tagDataID,32,0> var_14 = arg2;
006705b5      uint32_t var_18 = (arg3->m_iVersion << 0x10);
006705c2      int32_t var_4 = arg4;
006705d2      return this->vtable->SaveDataEx(&var_18, arg3, 2);
00670590  }

006705d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006705e0  uint8_t __thiscall DiskController::SavePreCompressedData(class DiskController* this, class IDClass<_tagDataID,32,0> arg2, class Cache_Pack_t* arg3, int32_t arg4)

006705e0  {
006705e5      int32_t var_10 = 0;
006705e9      int32_t var_c = 0;
006705ed      int32_t var_8 = 0;
006705f5      class IDClass<_tagDataID,32,0> var_14 = arg2;
00670605      uint32_t var_18 = (arg3->m_iVersion << 0x10);
00670612      int32_t var_4 = arg4;
00670622      return this->vtable->SaveDataEx(&var_18, arg3, 3);
006705e0  }

00670625                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00670630  uint8_t __stdcall DiskController::AttemptToCompress(class DiskController* this @ ecx, class Cache_Pack_t const* arg2, class Cache_Pack_t* arg3)

00670630  {
00670638      class SmartBuffer* edi_1 = &arg2->m_buff;
00670638      
00670645      if ((SmartBuffer::GetSize(edi_1) > 4 && (SmartBuffer::GetSize(edi_1) - 4) > 0x10))
00670645      {
00670669          int32_t eax_4;
00670669          
00670669          if (SmartBuffer::GetSize(edi_1) <= 4)
00670677              eax_4 = 0;
00670669          else
00670672              eax_4 = (SmartBuffer::GetSize(edi_1) - 4);
00670672          
0067068b          SmartBuffer::ReconfigureAllocation(&arg3->m_buff, (eax_4 + 4), 1);
00670692          SmartBuffer::GetSize(&arg3->m_buff);
0067069d          SmartBuffer::ReconfigureAllocation(&arg3->m_buff, 4, 1);
006706ad          void* ebx_1 = &SmartBuffer::GetBuffer(&arg3->m_buff)[4];
006706b8          void* const eax_9;
006706b8          
006706b8          if (SmartBuffer::GetSize(&arg3->m_buff) <= 4)
006706c6              eax_9 = nullptr;
006706b8          else
006706c1              eax_9 = (SmartBuffer::GetSize(&arg3->m_buff) - 4);
006706c1          
006706cd          arg2 = ((char*)eax_9 - 4);
006706d9          int32_t eax_13;
006706d9          
006706d9          if (SmartBuffer::GetSize(edi_1) <= 4)
006706e7              eax_13 = 0;
006706d9          else
006706e2              eax_13 = (SmartBuffer::GetSize(edi_1) - 4);
006706e2          
0067070a          if (j_compress2(((char*)ebx_1 + 4), &arg2, &SmartBuffer::GetBuffer(edi_1)[4], eax_13, 9) != 0)
0067070a          {
00670786              int32_t eax_16;
00670786              eax_16 = 0;
0067078c              return 0;
0067070a          }
0067070a          
00670716          int32_t eax_19;
00670716          
00670716          if (SmartBuffer::GetSize(edi_1) <= 4)
00670724              eax_19 = 0;
00670716          else
0067071f              eax_19 = (SmartBuffer::GetSize(edi_1) - 4);
0067071f          
0067072c          *(uint32_t*)ebx_1 = eax_19;
0067072e          SmartBuffer::ReconfigureAllocation(&arg3->m_buff, 4, 1);
0067073c          void __return;
0067073c          SmartBuffer::MakeWindow(&arg3->m_buff, &__return, 4);
00670754          void __return_1;
00670754          SmartBuffer::MakeWindow(&__return, &__return_1, 0, &arg2->m_iVersion);
0067075d          SmartBuffer::~SmartBuffer(&__return);
00670769          Cache_Pack_t::UpdatePackedSize(arg3, &__return_1);
00670772          SmartBuffer::~SmartBuffer(&__return_1);
0067077a          int32_t eax_22;
0067077a          eax_22 = 1;
00670780          return 1;
00670645      }
00670645      
00670656      uint32_t eax;
00670656      eax = 0;
0067065c      return 0;
00670630  }

0067078f                                               90                                                                 .

00670790  uint8_t __thiscall DiskController::CheckRoom(class DiskController* this, int32_t arg2)

00670790  {
0067079e      int32_t ecx_1 = (this->file_info_m.iBlockSize_ - 4);
006707b1      int32_t eax_2;
006707b1      
006707b1      while (this->file_info_m.iFreeBlocks_ <= ((((int64_t)arg2) / ecx_1) + 0x33))
006707b1      {
006707b3          eax_2 = this->expandable_fm;
006707b3          
006707b8          if (eax_2 == 0)
006707cc              BTree::Try_Delete_Oldest(&this->did_tree_m);
006707b8          else
006707c2              CLBlockAllocator::ExpandFile(&this->block_man_m, 0x100000);
006707b1      }
006707b1      
006707da      eax_2 = 1;
006707dd      return 1;
00670790  }


006707e0  int32_t __thiscall DiskController::GetDatestamp(class DiskController* this, class IDClass<_tagDataID,32,0> arg2)

006707e0  {
006707eb      uint32_t id = INVALID_DID.id;
006707ff      int32_t var_18 = 0;
00670803      int32_t var_10 = 0;
00670807      int32_t var_c = 0;
0067080b      int32_t var_8 = 0;
0067080f      int32_t var_4 = 0;
00670816      int32_t eax_1 = this->vtable->LoadDataEx(arg2, 0x8f76b8, &var_18, 2);
0067081d      char temp1 = eax_1;
0067081d      eax_1 = -(eax_1);
00670826      return ((eax_1 - eax_1) & var_8);
006707e0  }

00670829                             90 90 90 90 90 90 90                                                           .......

00670830  int32_t __thiscall DiskController::GetVersion(class DiskController* this, class IDClass<_tagDataID,32,0> arg2)

00670830  {
00670838      struct DiskController::VTable* vtable = this->vtable;
0067083b      uint32_t id = INVALID_DID.id;
00670852      int32_t var_18 = 0;
00670856      int32_t var_10 = 0;
0067085a      int32_t var_c = 0;
0067085e      int32_t var_8 = 0;
00670862      int32_t var_4 = 0;
00670862      
0067086b      if (vtable->LoadDataEx(arg2, 0x8f76b8, &var_18, 2) == 0)
00670881          return 0;
00670881      
00670878      return (var_18 >> 0x10);
00670830  }

00670884              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00670890  uint8_t __thiscall DiskController::GetIsCompressed(class DiskController* this, class IDClass<_tagDataID,32,0> arg2)

00670890  {
00670898      struct DiskController::VTable* vtable = this->vtable;
0067089b      uint32_t id = INVALID_DID.id;
006708b2      int32_t var_18 = 0;
006708b6      int32_t var_10 = 0;
006708ba      int32_t var_c = 0;
006708be      int32_t var_8 = 0;
006708c2      int32_t var_4 = 0;
006708c2      
006708cb      if (vtable->LoadDataEx(arg2, 0x8f76b8, &var_18, 2) == 0)
006708e0          return 0;
006708e0      
006708d7      return (var_18 & 1);
00670890  }

006708e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006708f0  int32_t __thiscall DiskController::GetIteration(class DiskController* this, class IDClass<_tagDataID,32,0> arg2)

006708f0  {
006708fb      uint32_t id = INVALID_DID.id;
0067090f      int32_t var_18 = 0;
00670913      int32_t var_10 = 0;
00670917      int32_t var_c = 0;
0067091b      int32_t var_8 = 0;
0067091f      int32_t var_4 = 0;
00670926      int32_t eax_1 = this->vtable->LoadDataEx(arg2, 0x8f76b8, &var_18, 2);
0067092d      char temp1 = eax_1;
0067092d      eax_1 = -(eax_1);
00670936      return ((eax_1 - eax_1) & var_4);
006708f0  }

00670939                                                                             90 90 90 90 90 90 90                           .......

00670940  uint32_t __thiscall DiskController::GetDataSize(class DiskController* this, class IDClass<_tagDataID,32,0> arg2)

00670940  {
0067094b      uint32_t id = INVALID_DID.id;
0067095f      int32_t var_18 = 0;
00670963      int32_t var_10 = 0;
00670967      int32_t result = 0;
0067096b      int32_t var_8 = 0;
0067096f      int32_t var_4 = 0;
0067096f      
0067097b      if (this->vtable->LoadDataEx(arg2, 0x8f76b8, &var_18, 2) == 0)
0067098d          return 0xffffffff;
0067098d      
00670984      return result;
00670940  }


00670990  uint32_t __thiscall DiskController::GetUncompressedDataSize(class DiskController* this, class IDClass<_tagDataID,32,0> arg2)

00670990  {
006709a1      uint32_t id = INVALID_DID.id;
006709ae      struct DiskController::VTable* vtable = this->vtable;
006709b6      int32_t var_18 = 0;
006709ba      int32_t var_10 = 0;
006709be      int32_t var_c = 0;
006709c2      int32_t var_8 = 0;
006709c6      int32_t var_4 = 0;
006709c6      
006709cf      if (vtable->LoadDataEx(arg2, 0x8f76b8, &var_18, 2) != 0)
006709cf      {
006709da          if ((var_18 & 1) == 0)
006709e6              return var_c;
006709e6          
006709ed          int32_t var_2c = 0;
006709f1          int32_t var_28_1 = 0;
006709f5          void var_24;
006709f5          SmartBuffer::SmartBuffer(&var_24);
00670a02          SmartBuffer::ReconfigureAllocation(&var_24, 8, 1);
00670a0b          SmartBuffer::GetSize(&var_24);
00670a26          void* ecx_4 = &var_24;
00670a26          
00670a2a          if (this->vtable->LoadDataEx(arg2, &var_2c, &var_18, 5) != 0)
00670a2a          {
00670a30              SmartBuffer::ReconfigureAllocation(ecx_4, 4, 1);
00670a3e              int32_t esi_1 = *(uint32_t*)(SmartBuffer::GetBuffer(&var_24) + 4);
00670a45              SmartBuffer::~SmartBuffer(&var_24);
00670a4e              SmartBuffer::~SmartBuffer(&var_24);
00670a5b              return esi_1;
00670a2a          }
00670a2a          
00670a5e          SmartBuffer::~SmartBuffer(ecx_4);
00670a67          SmartBuffer::~SmartBuffer(&var_24);
006709cf      }
006709cf      
00670a75      return 0xffffffff;
00670990  }

00670a78                                                                          90 90 90 90 90 90 90 90                          ........

00670a80  uint8_t __stdcall DiskController::Decompress(class DiskController* this @ ecx, class Cache_Pack_t const* arg2, class Cache_Pack_t* arg3)

00670a80  {
00670a89      class SmartBuffer* esi_1 = &arg2->m_buff;
00670a89      
00670a96      if (SmartBuffer::GetSize(esi_1) > 4)
00670a96      {
00670aa5          int32_t ebx_2 = (SmartBuffer::GetSize(esi_1) - 4);
00670aa5          
00670aab          if (ebx_2 >= 0x10)
00670aab          {
00670ab4              uint8_t* eax_1 = SmartBuffer::GetBuffer(esi_1);
00670abb              class Cache_Pack_t* edi_1 = *(uint32_t*)(eax_1 + 4);
00670acf              void var_c;
00670acf              SmartBuffer::SmartBuffer(&var_c);
00670ade              SmartBuffer::ReconfigureAllocation(&var_c, &edi_1->m_iVersion, 1);
00670ae7              SmartBuffer::GetSize(&var_c);
00670af4              arg2 = edi_1;
00670af8              SmartBuffer::ReconfigureAllocation(&var_c, 4, 1);
00670af8              
00670b22              if (j_uncompress(&SmartBuffer::GetBuffer(&var_c)[4], &arg2, &eax_1[8], (ebx_2 - 4)) == 0)
00670b22              {
00670b30                  arg3->m_dwOffset = 0;
00670b36                  arg3->m_iVersion = 0;
00670b3d                  SmartBuffer::operator=(&arg3->m_buff, &var_c);
00670b46                  SmartBuffer::~SmartBuffer(&var_c);
00670b4f                  SmartBuffer::~SmartBuffer(&var_c);
00670b55                  int32_t eax_7;
00670b55                  eax_7 = 1;
00670b5b                  return 1;
00670b22              }
00670b22              
00670b62              SmartBuffer::~SmartBuffer(&var_c);
00670b6b              SmartBuffer::~SmartBuffer(&var_c);
00670aab          }
00670a96      }
00670a96      
00670b71      uint32_t eax;
00670b71      eax = 0;
00670b77      return 0;
00670a80  }

00670b7a                                                                                90 90 90 90 90 90                            ......

00670b80  uint8_t __thiscall DiskController::LoadData(class DiskController* this, class IDClass<_tagDataID,32,0> arg2, class Cache_Pack_t* arg3)

00670b80  {
00670b8c      int32_t var_18 = 0;
00670b90      int32_t var_10 = 0;
00670b94      int32_t var_c = 0;
00670b98      int32_t var_8 = 0;
00670b9c      int32_t var_4 = 0;
00670bae      uint32_t id = INVALID_DID.id;
00670bbb      return this->vtable->LoadDataEx(arg2, arg3, &var_18, 0);
00670b80  }

00670bbe                                                                                            90 90                                ..

00670bc0  uint8_t __thiscall DiskController::LoadDataEx(class DiskController* this, class IDClass<_tagDataID,32,0> arg2, class Cache_Pack_t* arg3, struct BTEntry* arg4, uint32_t arg5)

00670bc0  {
00670bd4      int32_t var_20 = 0;
00670bdc      struct BTEntry* eax = BTree::Lookup(&this->did_tree_m, arg2, &var_20);
00670bdc      
00670be3      if (eax == 0)
00670be3      {
00670be5          eax = 0;
00670bea          return 0;
00670be3      }
00670be3      
00670bef      struct BTEntry* ebp = arg4;
00670bf6      uint8_t eax_1 = arg5;
00670c04      __builtin_memcpy(ebp, eax, 0x18);
00670c04      
00670c06      if ((eax_1 & 2) == 0)
00670c06      {
00670c19          int32_t Offset_ = ebp->Offset_;
00670c1c          int32_t ebx;
00670c1c          ebx = (eax_1 & 5) == 5;
00670c21          arg4 = ebx;
00670c29          arg3->m_iVersion = ((uint32_t)*(uint16_t*)((char*)ebp->__bitfield0 + 2));
00670c29          
00670c2c          if (ebx == 0)
00670c2c          {
00670c3c              SmartBuffer::ReconfigureAllocation(&arg3->m_buff, (ebp->size_ + 4), 1);
00670c43              SmartBuffer::GetSize(&arg3->m_buff);
00670c2c          }
00670c2c          
00670c61          if (CLBlockAllocator::Load_Data(&this->block_man_m, arg3, Offset_, arg4) == 0)
00670c61          {
00670c66              SmartBuffer::~SmartBuffer(&arg3->m_buff);
00670c6e              int32_t eax_4;
00670c6e              eax_4 = 0;
00670c74              return 0;
00670c61          }
00670c61          
00670c86          if ((this->file_info_m.use_lru_fm != 0 && this->read_only_fm == 0))
00670c86          {
00670c8c              class IDClass<_tagDataID,32,0> var_34_2 = arg2;
00670c90              BTree::Restamp_Entry(&this->did_tree_m, arg2);
00670c86          }
00670c86          
00670ca4          if (((*(uint8_t*)((char*)ebp->__bitfield0 + 0) & 1) != 0 && ((arg5 & 1) == 0 && ebx == 0)))
00670ca4          {
00670caa              void var_14;
00670caa              Cache_Pack_t::Cache_Pack_t(&var_14);
00670cc1              void var_c;
00670cc1              
00670cc1              if (this->vtable->Decompress(arg3, &var_14) == 0)
00670cc1              {
00670cf1                  SmartBuffer::~SmartBuffer(&var_c);
00670cfa                  SmartBuffer::~SmartBuffer(&var_c);
00670d02                  int32_t eax_7;
00670d02                  eax_7 = 0;
00670d08                  return 0;
00670cc1              }
00670cc1              
00670cca              Cache_Pack_t::operator=(arg3, &var_14);
00670cd3              SmartBuffer::~SmartBuffer(&var_c);
00670cdc              SmartBuffer::~SmartBuffer(&var_c);
00670ca4          }
00670c06      }
00670c06      
00670cea      return 1;
00670bc0  }

00670d0b                                   90 90 90 90 90                                                             .....

00670d10  uint8_t __thiscall DiskController::IsMember(class DiskController* this, class IDClass<_tagDataID,32,0> arg2, struct BTEntry* arg3)

00670d10  {
00670d1b      uint32_t id = INVALID_DID.id;
00670d1f      struct BTEntry* edx_1 = arg3;
00670d25      int32_t var_18 = 0;
00670d29      int32_t var_10 = 0;
00670d2d      int32_t var_c = 0;
00670d31      int32_t var_8 = 0;
00670d35      int32_t var_4 = 0;
00670d35      
00670d39      if (edx_1 == 0)
00670d3b          edx_1 = &var_18;
00670d3b      
00670d54      return this->vtable->LoadDataEx(arg2, 0x8f76b8, edx_1, 2);
00670d10  }

00670d57                                                                       90 90 90 90 90 90 90 90 90                         .........

00670d60  uint8_t __thiscall DiskController::DeleteData(class DiskController* this, class IDClass<_tagDataID,32,0> arg2, int32_t arg3)

00670d60  {
00670d60      struct BTEntry* eax;
00670d60      eax = this->read_only_fm;
00670d60      
00670d67      if (eax == 0)
00670d67      {
00670d75          eax = BTree::Lookup(&this->did_tree_m, arg2, nullptr);
00670d75          
00670d89          if ((eax != 0 && (arg3 == 0 || eax->iter_ <= arg3)))
00670d95              return BTree::Remove(&this->did_tree_m, arg2);
00670d67      }
00670d67      
00670d99      eax = 0;
00670d9c      return 0;
00670d60  }

00670d9f                                                                                               90                                 .

00670da0  class IDClass<_tagDataID,32,0>* __thiscall DiskController::SetMasterMapDID(class DiskController* this, class IDClass<_tagDataID,32,0>* __return, class IDClass<_tagDataID,32,0> arg3)

00670da0  {
00670da5      if (this->read_only_fm != 0)
00670da5      {
00670ddb          __return->id = INVALID_DID.id;
00670ddd          return __return;
00670da5      }
00670da5      
00670dac      uint32_t id = this->file_info_m.master_map_id_m.id;
00670db2      this->file_info_m.master_map_id_m.id = arg3;
00670db8      class IDClass<_tagDataID,32,0> eax_1;
00670db8      eax_1.id = this->initialized_fm;
00670db8      
00670dbd      if (eax_1.id != 0)
00670dc2          BTree::SaveDataToFile(&this->did_tree_m);
00670dc2      
00670dc7      uint32_t* __return_1 = __return;
00670dcb      *(uint32_t*)__return_1 = id;
00670dce      return __return_1;
00670da0  }


00670de0  uint8_t __thiscall DiskController::LoadIterationList(class DiskController* this, class CMostlyConsecutiveIntSet* arg2)

00670de0  {
00670ded      int32_t var_38 = 0;
00670df1      int32_t var_34 = 0;
00670df5      void var_30;
00670df5      SmartBuffer::SmartBuffer(&var_30);
00670e0f      void* ecx_2 = &var_30;
00670e0f      
00670e1e      if ((this->vtable->LoadData(DatFileDataID_IterationList.id, &var_38) == 0 || var_34 != 1))
00670e1e      {
00670ec6          SmartBuffer::~SmartBuffer(ecx_2);
00670ecf          SmartBuffer::~SmartBuffer(&var_30);
00670ed5          int32_t eax_3;
00670ed5          eax_3 = 0;
00670edb          return 0;
00670e1e      }
00670e1e      
00670e29      SmartBuffer::ReconfigureAllocation(ecx_2, 4, 1);
00670e39      void __return;
00670e39      SmartBuffer::MakeWindow(&var_30, &__return, 4);
00670e42      int32_t var_24 = 0x792b3c;
00670e4a      int32_t var_20 = 0;
00670e4e      int32_t var_1c = 0;
00670e52      void var_18;
00670e52      SmartBuffer::SmartBuffer(&var_18);
00670e65      int32_t var_c = 0;
00670e69      int32_t var_8 = 0;
00670e6d      int32_t var_4 = 0;
00670e71      var_24 = 0x792b50;
00670e79      Archive::InitForUnpacking(&var_24, &Archive::SetCurrentCoreVersion, &__return);
00670e82      SmartBuffer::~SmartBuffer(&__return);
00670e8b      arg2->vtable->Serialize(&var_24);
00670ea4      Archive::~Archive(&var_24);
00670ead      SmartBuffer::~SmartBuffer(&var_30);
00670eb6      SmartBuffer::~SmartBuffer(&var_30);
00670ec3      return (!(((int8_t)(var_20 >> 2))) & 1);
00670de0  }

00670ede                                                                                            90 90                                ..

00670ee0  uint8_t __thiscall DiskController::SaveIterationList(class DiskController* this, class CMostlyConsecutiveIntSet* arg2)

00670ee0  {
00670eee      int32_t var_38 = 0;
00670ef2      int32_t var_34 = 0;
00670ef6      void var_30;
00670ef6      SmartBuffer::SmartBuffer(&var_30);
00670eff      int32_t var_24 = 0x792b3c;
00670f07      int32_t var_20 = 0;
00670f0b      int32_t var_1c = 0;
00670f0f      void var_18;
00670f0f      SmartBuffer::SmartBuffer(&var_18);
00670f1c      int32_t var_c = 0;
00670f20      int32_t var_8 = 0;
00670f24      int32_t var_4 = 0;
00670f28      var_24 = 0x792b50;
00670f30      SmartBuffer::ReconfigureAllocation(&var_30, 4, 1);
00670f40      void __return;
00670f40      SmartBuffer::MakeWindow(&var_30, &__return, 4);
00670f53      Archive::InitForPacking(&var_24, &Archive::SetCurrentCoreVersion, &__return);
00670f5c      SmartBuffer::~SmartBuffer(&__return);
00670f65      arg2->vtable->Serialize(&var_24);
00670f77      int32_t var_34_1 = 1;
00670f89      Cache_Pack_t::UpdatePackedSize(&var_38, Archive::GetSerializedBuffer(&var_24, &__return));
00670f92      SmartBuffer::~SmartBuffer(&__return);
00670fb0      int32_t ebx;
00670fb0      ebx = this->vtable->SaveData(DatFileDataID_IterationList.id, &var_38, 1);
00670fb2      Archive::~Archive(&var_24);
00670fbb      SmartBuffer::~SmartBuffer(&var_30);
00670fc4      SmartBuffer::~SmartBuffer(&var_30);
00670fd1      return ebx;
00670ee0  }

00670fd4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00670fe0  void __fastcall DiskController::DiskController(class DiskController* this)

00670fe0  {
00670feb      this->initialized_fm = 0;
00670fee      this->read_only_fm = 0;
00670ff1      this->expandable_fm = 0;
00670ff4      this->data_set_lm = UNDEF_DISK;
00670ff7      this->data_subset_lm = 0;
00670ffa      this->vtable = 0x7fdba8;
00671000      CLBlockAllocator::CLBlockAllocator(&this->block_man_m);
00671009      BTree::BTree(&this->did_tree_m, &this->block_man_m);
0067100e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00671019      this->filename_m.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0067101f      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0067102b      DiskFileInfo_t::DiskFileInfo_t(&this->file_info_m);
00670fe0  }

00671035                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00671040  void __fastcall DiskController::~DiskController(class DiskController* this)

00671040  {
00671046      bool cond:0 = this->initialized_fm == 0;
00671049      this->vtable = 0x7fdba8;
00671049      
0067104f      if (!(cond:0))
0067104f      {
00671056          if (this->read_only_fm == 0)
0067105b              BTree::SaveDataToFile(&this->did_tree_m);
0067105b          
00671063          CLBlockAllocator::Close_Data_File(&this->block_man_m);
0067106b          BTree::~BTree(&this->did_tree_m);
00671070          this->initialized_fm = 0;
0067104f      }
0067104f      
0067107a      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&this->file_info_m.id_vnum);
00671085      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->filename_m.m_charbuffer - 0x14);
00671085      
00671098      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
006710a0          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
006710a0      
006710a5      BTree::~BTree(&this->did_tree_m);
006710ad      CLBlockAllocator::~CLBlockAllocator(&this->block_man_m);
006710b3      this->vtable = 0x7fdb48;
00671040  }

006710bb                                                                                   90 90 90 90 90                             .....

006710c0  uint8_t __thiscall DiskController::SaveDataEx(class DiskController* this, struct BTEntry* arg2, class Cache_Pack_t* arg3, uint32_t arg4)

006710c0  {
006710c6      struct BTEntry* esi = arg2;
006710ca      uint32_t id = esi->GID_.id;
006710dc      int32_t ebx;
006710dc      ebx = 0;
006710de      struct BTMemNode* var_18 = nullptr;
006710e2      int32_t m_dwOffset = 0;
006710e6      int32_t var_10 = 0;
006710ea      void var_c;
006710ea      SmartBuffer::SmartBuffer(&var_c);
006710f6      uint32_t m_iVersion = arg3->m_iVersion;
006710fc      m_dwOffset = arg3->m_dwOffset;
00671105      uint32_t m_iVersion_1 = m_iVersion;
00671109      SmartBuffer::operator=(&var_c, &arg3->m_buff);
00671119      int32_t edi_1 = (arg4 & 7);
0067111f      arg2 = edi_1 == 5;
0067111f      
00671141      if ((this->read_only_fm == 0 && (INVALID_DID.id != id && *(uint16_t*)((char*)esi->__bitfield0 + 2) != 0)))
00671141      {
0067114f          bool cond:0_1 = esi->date_ != 0;
00671151          esi->__bitfield0 &= 0xfffffffe;
00671151          
00671153          if (!(cond:0_1))
0067115a              esi->date_ = Timer::get_real_time();
0067115a          
00671161          if ((edi_1 - 1) <= 4)
00671161              switch (edi_1)
00671161              {
00671167                  case 1:
00671167                  case 5:
00671167                  {
00671167                      goto label_6711ca;
00671167                  }
00671172                  case 2:
00671172                  {
00671172                      SmartBuffer::~SmartBuffer(&var_c);
00671172                      
0067118b                      if (this->vtable->AttemptToCompress(arg3, &m_dwOffset) != 0)
0067118b                          goto label_67118d;
0067118b                      
00671197                      Cache_Pack_t::operator=(&m_dwOffset, arg3);
0067119c                      goto label_6711ca;
00671172                  }
0067118d                  case 3:
0067118d                  {
0067118d                  label_67118d:
0067118d                      esi->__bitfield0 |= 1;
006711ca                  label_6711ca:
006711ca                      esi->size_ = Cache_Pack_t::GetDataSize(&m_dwOffset);
006711ca                      
006711d0                      if ((*(uint8_t*)((char*)esi->__bitfield0 + 0) & 1) == 0)
006711d0                      {
00671200                      label_671200:
00671200                          uint32_t eax_8;
00671200                          eax_8 = arg2;
00671206                          uint8_t eax_11;
00671206                          
00671206                          if (eax_8 == 0)
00671206                          {
0067120d                              if ((arg4 & 8) != 0)
0067120d                              {
00671216                                  Cache_Pack_t::operator=(arg3, &m_dwOffset);
0067121f                                  arg3->m_iVersion = ((uint32_t)*(uint16_t*)((char*)esi->__bitfield0 + 2));
0067120d                              }
0067120d                              
0067122a                              eax_11 = DiskController::CheckRoom(this, esi->size_);
00671206                          }
00671206                          
00671231                          if ((eax_8 != 0 || eax_11 != 0))
00671231                          {
00671246                              struct BTEntry* eax_12 = BTree::Lookup(&this->did_tree_m, id, &var_18);
00671246                              
00671251                              if (arg2 != 0)
00671253                                  esi->size_ = 0xfffffffe;
00671253                              
0067125c                              int32_t eax_14;
0067125c                              
0067125c                              if (eax_12 == 0)
0067125c                              {
00671290                                  eax_14 = BTree::DescendToAdd(&this->did_tree_m, esi, &m_dwOffset);
00671297                              label_671297:
00671297                                  ebx = -(eax_14);
00671299                                  ebx = (ebx - ebx);
0067129b                                  ebx += 1;
0067125c                              }
0067125c                              else
0067125c                              {
0067125e                                  int32_t iter_ = esi->iter_;
0067125e                                  
00671268                                  if ((iter_ == 0 || eax_12->iter_ <= iter_))
00671268                                  {
0067126e                                      struct BTMemNode* eax_13 = var_18;
0067127e                                      esi->Offset_ = eax_13->offset_m;
00671281                                      eax_14 = BTree::Update_Data_Trans(&this->did_tree_m, eax_13, esi, &m_dwOffset);
00671286                                      goto label_671297;
00671268                                  }
00671268                                  
0067126a                                  ebx = 1;
0067125c                              }
00671231                          }
00671231                          
006712a1                          SmartBuffer::~SmartBuffer(&var_c);
006712aa                          SmartBuffer::~SmartBuffer(&var_c);
006712b8                          return ebx;
006711d0                      }
006711d0                      
006711db                      int32_t edi_3 = *(uint32_t*)Cache_Pack_t::GetPackBufferPtr(&m_dwOffset);
006711db                      
006711e9                      if ((Cache_Pack_t::GetDataSize(&m_dwOffset) >= 0x10 && edi_3 >= Cache_Pack_t::GetDataSize(&m_dwOffset)))
006711fa                          goto label_671200;
0067118d                      break;
0067118d                  }
006711a2                  case 4:
006711a2                  {
006711a2                      SmartBuffer::~SmartBuffer(&var_c);
006711a2                      
006711bb                      if (this->vtable->Decompress(arg3, &m_dwOffset) != 0)
006711bb                          goto label_6711ca;
006711a2                      break;
006711a2                  }
00671161              }
00671141      }
00671141      
006712bf      SmartBuffer::~SmartBuffer(&var_c);
006712c8      SmartBuffer::~SmartBuffer(&var_c);
006712d0      int32_t eax_16;
006712d0      eax_16 = 0;
006712d6      return 0;
006710c0  }

006712d9                                                                             8d 49 00                                       .I.
006712dc  uint32_t jump_table_6712dc[0x5] = 
006712dc  {
006712dc      [0x0] =  0x006711c1
006712e0      [0x1] =  0x0067116e
006712e4      [0x2] =  0x0067118d
006712e8      [0x3] =  0x0067119e
006712ec      [0x4] =  0x006711c1
006712f0  }

006712f0  void* __thiscall DiskController::`scalar deleting destructor'(class DiskController* this, uint32_t arg2)

006712f0  {
006712f3      DiskController::~DiskController(this);
006712f3      
006712fd      if ((arg2 & 1) != 0)
00671300          operator delete(this);
00671300      
0067130b      return this;
006712f0  }

0067130e                                            90 90                                                                ..

00671310  uint8_t __thiscall DiskController::DeleteDataByMask(class DiskController* this, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3)

00671310  {
0067131e      if (this->read_only_fm != 0)
00671422          return 0;
00671422      
00671324      class IDClass<_tagDataID,32,0> i_1 = arg3;
00671328      int32_t esi = 0;
00671328      
0067132c      if (i_1 == 0)
00671418          return 1;
00671418      
00671336      void* var_c = nullptr;
0067133a      int32_t var_8 = 0;
0067133e      int32_t var_4 = 0;
00671342      int32_t ebx;
00671342      ebx = 1;
00671342      
00671344      if (i_1 < 0)
00671344      {
00671346          uint32_t id = INVALID_DID.id;
0067134e          class IDClass<_tagDataID,32,0> i = i_1;
00671350          uint32_t id_1 = (i_1 & 1);
00671350          
00671363          do
00671363          {
00671359              if ((id != 0 && id_1 == 0))
0067135b                  ebx = 0;
0067135b              
0067135d              i u>>= 1;
00671361              id = id_1;
00671363          } while (i != 0);
00671344      }
00671344      
00671369      class IDClass<_tagDataID,32,0> ebp_1 = (arg2 & i_1);
00671369      
0067136d      if (ebx == 0)
00671396          BTree::Get_Id_List(&this->did_tree_m, &var_c);
0067136d      else
00671383          BTree::Get_Id_List_Range(&this->did_tree_m, &var_c, ebp_1, (!(i_1) | ebp_1));
00671383      
006713a3      arg3.id = 0;
006713a3      
006713a8      if (var_4 > 0)
006713a8      {
006713aa          int32_t ebx_1 = 0;
006713aa          
006713db          do
006713db          {
006713b4              int32_t eax_6 = *(uint32_t*)((esi + var_c) + 4);
006713b4              
006713be              if ((eax_6 & i_1) == ebp_1)
006713be              {
006713c4                  this->vtable->DeleteData(eax_6, 0);
006713cc                  arg3.id = 1;
006713be              }
006713be              
006713d5              ebx_1 += 1;
006713d6              esi += 0x18;
006713db          } while (ebx_1 < var_4);
006713a8      }
006713a8      
006713ef      void* eax_9;
006713ef      
006713ef      if ((var_8 & 0x80000000) == 0x80000000)
006713ef      {
006713f1          eax_9 = var_c;
006713f1          
006713f7          if (eax_9 != 0)
006713fd              operator delete[](((char*)eax_9 - 4));
006713ef      }
006713ef      
00671405      eax_9 = arg3.id;
0067140e      return eax_9;
00671310  }

00671425                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00671430  uint8_t __thiscall DiskController::InitFile(class DiskController* this, struct DiskConInitInfo* arg2)

00671430  {
00671434      class DiskController* this_1 = this;
00671434      
0067143b      if (this_1->initialized_fm != 0)
0067163f          return 0;
0067163f      
00671444      struct DiskConInitInfo* edi = arg2;
0067144f      this = (((int8_t)edi->open_flags_lm) & 4) == 4;
00671452      this_1->read_only_fm = this;
00671461      this_1->expandable_fm = (((int8_t)edi->open_flags_lm) & 2) == 2;
00671464      uint32_t open_flags_lm = edi->open_flags_lm;
0067146f      bool ecx = (open_flags_lm & 8) == 8;
00671474      arg2 = ecx;
00671478      int32_t ebp_1;
00671478      
00671478      if (ecx != 0)
00671478      {
0067154d      label_67154d:
0067154d          DiskFileInfo_t::ClearData(&this_1->file_info_m);
00671555          this_1->file_info_m.iBlockSize_ = edi->block_size_lm;
0067155e          this_1->file_info_m.fileSize_ = edi->file_size_lm;
00671567          this_1->file_info_m.data_set_lm = edi->data_set_lm;
00671570          this_1->file_info_m.data_subset_lm = edi->data_subset_lm;
00671576          this_1->file_info_m.use_lru_fm = 0;
00671580          this_1->file_info_m.eng_pack_vnum = edi->eng_pack_vnum;
00671589          this_1->file_info_m.game_pack_vnum = edi->game_pack_vnum;
006715a4          ebp_1 = CLBlockAllocator::CreateDataFile(&this_1->block_man_m, &this_1->file_info_m, edi, &edi->path, (edi->open_flags_lm | 8));
006715a4          
006715a8          if (ebp_1 != 0)
00671604              CLBlockAllocator::Close_Data_File(&this_1->block_man_m);
006715a8          else
006715a8          {
006715b3              ebp_1 = BTree::CreateTree(&this_1->did_tree_m, &this_1->file_info_m);
006715b3              
006715b7              if (ebp_1 != 0)
00671604                  CLBlockAllocator::Close_Data_File(&this_1->block_man_m);
006715b7              else
006715b7              {
006715c1                  ebp_1 = CLBlockAllocator::SaveFileInfo(&this_1->block_man_m);
006715c1                  
006715c5                  if (ebp_1 != 0)
00671604                      CLBlockAllocator::Close_Data_File(&this_1->block_man_m);
006715c5                  else
006715c5                  {
006715cb                      void var_14;
006715cb                      CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(&var_14);
006715d0                      this_1->vtable->SaveIterationList(&var_14);
006715ec                      int32_t var_c;
006715ec                      void* var_10;
006715ec                      
006715ec                      if ((var_c & 0x80000000) == 0x80000000)
006715f3                          operator delete[](var_10);
006715c5                  }
006715b7              }
006715a8          }
00671478      }
00671478      else
00671478      {
00671493          void* var_18 = nullptr;
0067149b          int32_t eax_3 = CLBlockAllocator::OpenDataFile(&this_1->block_man_m, &this_1->file_info_m, edi, &edi->path, open_flags_lm, &var_18);
006714a0          this_1->file_info_m.use_lru_fm = 0;
006714ad          bool cond:1_1 = (((int8_t)edi->open_flags_lm) & 0x10) == 0x10;
006714b0          ebp_1 = eax_3;
006714b0          
006714b9          if (ebp_1 != 0)
006714b9              goto label_67151f;
006714b9          
006714c1          edi->data_set_lm = this_1->file_info_m.data_set_lm;
006714ca          edi->data_subset_lm = this_1->file_info_m.data_subset_lm;
006714cd          eax_3 = edi->eng_pack_vnum;
006714cd          
006714da          if ((eax_3 < 0 || eax_3 == this_1->file_info_m.eng_pack_vnum))
006714da          {
006714dc              eax_3 = edi->game_pack_vnum;
006714dc              
006714f0              if (((eax_3 >= 0 && edi->eng_only == 0) && eax_3 != this_1->file_info_m.game_pack_vnum))
006714e1                  goto label_6714f2;
006714e1              
00671502              ebp_1 = BTree::LoadTree(&this_1->did_tree_m, &this_1->file_info_m);
00671502              
00671506              if (ebp_1 != 0)
00671506                  goto label_67151f;
00671506              
00671508              void* eax_5 = var_18;
00671508              
0067150e              if (eax_5 != 0)
0067150e              {
00671519                  ebp_1 = BTree::RecoverTransaction(&this_1->did_tree_m, eax_5);
00671519                  
0067151d                  if (ebp_1 != 0)
0067151d                      goto label_67151f;
0067150e              }
006714da          }
006714da          else
006714da          {
006714f2          label_6714f2:
006714f2              ebp_1 = 0xfffffffa;
0067151f          label_67151f:
0067151f              eax_3 = cond:1_1;
0067151f              
00671525              if (eax_3 != 0)
00671527                  arg2 = 1;
006714da          }
006714da          
00671531          operator delete(var_18);
00671531          
0067153f          if (arg2 != 0)
0067153f              goto label_67154d;
0067153f          
006715ff          if (ebp_1 != 0)
00671604              CLBlockAllocator::Close_Data_File(&this_1->block_man_m);
00671478      }
00671478      
0067160f      enum DATFILE_TYPE data_set_lm = this_1->file_info_m.data_set_lm;
00671615      this_1->data_subset_lm = this_1->file_info_m.data_subset_lm;
0067161f      this_1->data_set_lm = data_set_lm;
00671622      PStringBase<unsigned short>::operator=(&this_1->filename_m.m_charbuffer, edi);
00671628      bool result = ebp_1 == 0;
0067162f      this_1->initialized_fm = result;
00671636      return result;
00671430  }

00671642        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00671650  uint8_t __thiscall SmartArray<QualifiedDataID,1>::SetNElements(class SmartArray<QualifiedDataID,1>* this, uint32_t const arg2, uint8_t arg3)

00671650  {
00671665      int32_t* eax_1;
00671665      
00671665      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
00671665      {
00671693          uint32_t const i = arg2;
00671693          
00671695          if (arg2 < this->m_num)
00671695          {
0067169b              void var_8;
0067169b              eax_1 = Vector3::Vector3(&var_8);
0067169b              
006716b4              do
006716b4              {
006716a2                  struct QualifiedDataID* m_data = this->m_data;
006716a4                  m_data[i].Type = *(uint32_t*)eax_1;
006716aa                  m_data[i].ID.id = eax_1[1];
006716b1                  i += 1;
006716b4              } while (i < this->m_num);
00671695          }
00671665      }
00671665      else
00671665      {
00671667          eax_1 = arg3;
0067166d          uint32_t const eax_2;
0067166d          
0067166d          if (eax_1 == 0)
00671676              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
0067166d          else
0067166f              eax_2 = arg2;
0067166f          
0067167e          eax_1 = SmartArray<FontReference,1>::grow(this, eax_2);
0067167e          
00671685          if (eax_1 == 0)
0067168c              return eax_1;
00671665      }
00671665      
006716b7      this->m_num = arg2;
006716bb      eax_1 = 1;
006716c1      return 1;
00671650  }

006716c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006716d0  void SerializeIDs(class SmartArray<QualifiedDataID,1>* arg1, enum DATFILE_TYPE arg2, class Archive* arg3)

006716d0  {
006716d1      class SmartArray<QualifiedDataID,1>* ebx = arg1;
006716d7      uint32_t m_num = ebx->m_num;
006716e3      arg1 = m_num;
006716e7      Archive::CheckAlignment(arg3, 4);
006716f0      uint8_t* eax = Archive::GetBytes(arg3, 4);
006716f0      
006716f7      if (eax != 0)
006716f7      {
006716fd          if ((arg3->m_flags & 1) == 0)
006716fd          {
00671703              uint32_t m_num_1 = *(uint32_t*)eax;
00671705              arg1 = m_num_1;
00671709              m_num = m_num_1;
006716fd          }
006716fd          else
006716ff              *(uint32_t*)eax = m_num;
006716f7      }
006716f7      
00671713      if ((!(arg3->m_flags) & 1) != 0)
0067171a          SmartArray<QualifiedDataID,1>::SetNElements(ebx, m_num, 1);
0067171a      
0067171f      int32_t ebp = 0;
0067171f      
00671723      if (m_num > 0)
00671723      {
006717a0          do
006717a0          {
0067172b              void* esi = &ebx->m_data[ebp].ID;
0067172f              Archive::CheckAlignment(arg3, 4);
00671738              uint8_t* eax_1 = Archive::GetBytes(arg3, 4);
00671738              
0067173f              if (eax_1 != 0)
0067173f              {
00671745                  if ((arg3->m_flags & 1) == 0)
0067174f                      *(uint32_t*)esi = *(uint32_t*)eax_1;
00671745                  else
00671749                      *(uint32_t*)eax_1 = *(uint32_t*)esi;
0067173f              }
0067173f              
00671751              eax_1 = arg3->m_flags;
00671754              eax_1 = !(eax_1);
00671754              
00671758              if ((eax_1 & 1) != 0)
00671758              {
00671761                  uint32_t eax_2;
00671761                  
00671761                  if (arg2 != CELL_DATFILE)
00671761                  {
00671771                      eax_2 = MasterDBMap::DivineType(ebx->m_data[ebp].ID.id);
00671771                      
0067177b                      if (eax_2 == 0)
0067177b                      {
00671780                          if (arg2 == PORTAL_DATFILE)
0067178f                              eax_2 = 6;
00671780                          else if (arg2 == 2)
00671763                              eax_2 = 1;
00671783                          else if (arg2 == 3)
00671788                              eax_2 = 0x25;
0067177b                      }
00671761                  }
00671761                  else
00671763                      eax_2 = 1;
00671763                  
00671794                  ebx->m_data[ebp].Type = eax_2;
00671758              }
00671758              
0067179d              ebp += 1;
006717a0          } while (ebp < arg1);
00671723      }
006716d0  }

006717a7                       90 90 90 90 90 90 90 90 90                                                         .........

006717b0  void __thiscall MissingIteration::Serialize(class MissingIteration* this, class Archive* arg2)

006717b0  {
006717bd      Archive::CheckAlignment(arg2, 8);
006717c6      uint8_t* eax;
006717c6      int32_t ecx_2;
006717c6      eax = Archive::GetBytes(arg2, 8);
006717c6      
006717cd      if (eax != 0)
006717cd      {
006717d3          if ((arg2->m_flags & 1) == 0)
006717d3          {
006717e4              this->idDatFile = *(uint32_t*)eax;
006717ea              *(uint32_t*)((char*)this->idDatFile)[4] = *(uint32_t*)(eax + 4);
006717d3          }
006717d3          else
006717d3          {
006717d8              *(uint32_t*)eax = this->idDatFile;
006717dd              *(uint32_t*)(eax + 4) = *(uint32_t*)((char*)this->idDatFile)[4];
006717d3          }
006717cd      }
006717cd      
006717ed      this->idDatFile;
006717f0      this->idDatFile;
006717f3      ecx_2 = 0x20;
006717f5      enum DATFILE_TYPE eax_2 = _aullshr();
00671800      Archive::CheckAlignment(arg2, 4);
00671809      int32_t* eax_3 = Archive::GetBytes(arg2, 4);
00671809      
00671810      if (eax_3 != 0)
00671810      {
00671816          if ((arg2->m_flags & 1) == 0)
00671821              this->idIteration = *(uint32_t*)eax_3;
00671816          else
0067181b              *(uint32_t*)eax_3 = this->idIteration;
00671810      }
00671810      
0067182a      SerializeIDs(&this->IDsToDownload, eax_2, arg2);
00671835      SerializeIDs(&this->IDsToPurge, eax_2, arg2);
006717b0  }

00671843           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00671850  class PStringBase<unsigned short>* __thiscall LookFile::GetFoundPath(class LookFile* this, class PStringBase<unsigned short>* __return)

00671850  {
00671850      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->_path.m_charbuffer;
00671857      __return->m_charbuffer = m_charbuffer;
0067185d      InterlockedIncrement(&m_charbuffer->m_data[-8]);
00671866      return __return;
00671850  }

00671869                             90 90 90 90 90 90 90                                                           .......

00671870  uint8_t __thiscall LookFile::IsFileHere(class LookFile* this, class PStringBase<unsigned short> const* arg2, class PStringBase<unsigned short> const* arg3)

00671870  {
00671874      class PStringBase<unsigned short>* edi = arg2;
00671886      class PSRefBufferCharData<unsigned short>* eax;
00671886      
00671886      if (edi->m_charbuffer->m_data[0x7ffffffffffffffe] != 1)
00671886      {
00671893          eax = arg3->m_charbuffer->m_data[0x7ffffffffffffffe];
00671898          class LookFile* this_1;
00671898          
00671898          if (eax == 1)
00671898          {
006718a7          label_6718a7:
006718a7              
006718aa              if (this->_path.m_charbuffer->m_data[0x7ffffffffffffffe] != 1)
006718aa              {
006718ae                  this_1 = this;
006718ae                  
006718b0                  if (eax == 1)
006718b0                      goto label_6718b4;
006718b0                  
006718b0                  goto label_6718b2;
006718aa              }
00671898          }
00671898          else if (this->_path.m_charbuffer->m_data[0x7ffffffffffffffe] == 1)
0067189f          {
006718a3              if (eax == 1)
006718a3                  goto label_6718a7;
006718a3              
006718b2          label_6718b2:
006718b2              this_1 = arg3;
006718b4          label_6718b4:
006718b4              class PSRefBufferCharData<unsigned short>* m_charbuffer = this_1->_path.m_charbuffer;
006718b6              arg2 = m_charbuffer;
006718be              InterlockedIncrement(&m_charbuffer->m_data[-8]);
006718ca              PSUtils::path_append(&arg2, edi);
006718e9              HANDLE hObject = kernel32_CreateFileW_Ptr(arg2, 0x80000000, 3, 0, 3, 0x80, 0);
006718e9              
006718f2              if (hObject != 0xffffffff)
006718f2              {
0067191e                  CloseHandle(hObject);
0067191e                  
00671929                  if (this->_path.m_charbuffer->m_data[0x7ffffffffffffffe] == 1)
0067192e                      PStringBase<unsigned short>::operator=(this, arg3);
0067192e                  
00671937                  void* __offset(PStringBase<unsigned short>, -0x14) esi_4 = &arg2[-5];
00671937                  
0067194a                  if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
00671951                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00671951                  
00671956                  int32_t eax_4;
00671956                  eax_4 = 1;
00671959                  return 1;
006718f2              }
006718f2              
006718f8              void* __offset(PStringBase<unsigned short>, -0x14) esi_2 = &arg2[-5];
006718f8              
0067190b              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00671912                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0067189f          }
00671886      }
00671886      
00671917      eax = 0;
0067191a      return 0;
00671870  }

0067195c                                                                                      90 90 90 90                              ....

00671960  uint8_t __thiscall LookFile::LookForFile(class LookFile* this, class PStringBase<unsigned short> arg2, class PStringBase<unsigned short> arg3, uint8_t arg4)

00671960  {
00671960      class PStringBase<unsigned short> eax_22 = arg2;
00671960      
0067196f      if (*(uint32_t*)(eax_22 - 4) == 1)
0067196f      {
00671986          if ((InterlockedDecrement((eax_22 - 0x10)) == 0 && eax_22 != 0x14))
0067198e              **(uint32_t**)(eax_22 - 0x14)(1);
0067198e          
00671994          int32_t* esi_3 = (arg3 - 0x14);
00671994          
006719a3          if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
006719ab              **(uint32_t**)esi_3(1);
006719ab          
006719ae          int32_t eax_3;
006719ae          eax_3 = 0;
006719b4          return 0;
0067196f      }
0067196f      
006719b7      class PSRefBufferCharData<unsigned short>* m_charbuffer = this->_path.m_charbuffer;
006719b7      
006719cd      if (m_charbuffer != PStringBase<unsigned short>::s_NullBuffer)
006719cd      {
006719de          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
006719e6              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
006719e6          
006719e8          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
006719f3          this->_path.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
006719f5          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
006719cd      }
006719cd      
006719ff      uint8_t var_d = 0;
006719ff      
00671a04      if (*(uint32_t*)(arg3 - 4) == 1)
00671a04      {
00671a23      label_671a23:
00671a23          m_charbuffer = arg4;
00671a23          
00671a29          if (m_charbuffer != 0)
00671a29          {
00671a38              PStringBase<unsigned short>::allocate(&arg3, 0x106);
00671a3d              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00671a42              arg4 = PStringBase<char>::s_NullBuffer_1;
00671a4a              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00671a55              PStringBase<char>::allocate(&arg4, 0x105);
00671a5f              uint8_t eax_7 = PSUtils::get_cwd(&arg4);
00671a69              void __return;
00671a69              uint8_t eax_9;
00671a69              
00671a69              if (eax_7 != 0)
00671a69              {
00671a80                  PStringBase<unsigned short>::operator=(&arg3, PStringBase<char>::to_wpstring(&arg4, &__return, 0));
00671a89                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00671a9a                  eax_9 = LookFile::IsFileHere(this, &arg2, &arg3);
00671aa1                  var_d = eax_9;
00671a69              }
00671a69              
00671aa5              if ((eax_7 == 0 || eax_9 == 0))
00671aa5              {
00671ab4                  PStringBase<unsigned short>::PStringBase<unsigned short>(&__return, u"PROJECT_DAT");
00671ac3                  uint8_t eax_10 = PSUtils::GetEnvironmentVariableA(&__return, &arg3);
00671ad1                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00671ad8                  uint8_t eax_11;
00671ad8                  
00671ad8                  if (eax_10 != 0)
00671ad8                  {
00671ae6                      eax_11 = LookFile::IsFileHere(this, &arg2, &arg3);
00671aed                      var_d = eax_11;
00671ad8                  }
00671ad8                  
00671b09                  if (((eax_10 == 0 || eax_11 == 0) && (this->_key_path.m_charbuffer->m_data[-4] != 1 && this->_key.m_charbuffer->m_data[-4] != 1)))
00671b09                  {
00671b1c                      void __return_1;
00671b1c                      class PStringBase<unsigned short>* eax_12 = PStringBase<char>::to_wpstring(&this->_key, &__return_1, 0);
00671b35                      void var_4;
00671b35                      char eax_14 = RegEdit::QueryWStrValue(&var_4, PStringBase<char>::to_wpstring(&this->_key_path, &__return, 0), eax_12, &arg3, 0x80000002);
00671b40                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00671b49                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
00671b49                      
00671b50                      if (eax_14 != 0)
00671b63                          var_d = LookFile::IsFileHere(this, &arg2, &arg3);
00671b09                  }
00671aa5              }
00671aa5              
00671b6b              int32_t* esi_5 = (arg4 - 0x14);
00671b6b              
00671b7a              if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00671b82                  **(uint32_t**)esi_5(1);
00671a29          }
00671a04      }
00671a04      else
00671a04      {
00671a12          m_charbuffer = LookFile::IsFileHere(this, &arg2, &arg3);
00671a19          var_d = m_charbuffer;
00671a19          
00671a1d          if (m_charbuffer == 0)
00671a1d              goto label_671a23;
00671a04      }
00671a04      
00671b88      int32_t* esi_7 = (arg2 - 0x14);
00671b88      
00671b97      if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
00671b9f          **(uint32_t**)esi_7(1);
00671b9f      
00671ba5      int32_t* esi_9 = (arg3 - 0x14);
00671ba5      
00671bb6      if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
00671bbe          **(uint32_t**)esi_9(1);
00671bbe      
00671bc0      int32_t eax_21;
00671bc0      eax_21 = var_d;
00671bc9      return eax_21;
00671960  }

00671bcc                                      90 90 90 90                                                              ....

00671bd0  uint8_t __thiscall LookFile::LookForFile(class LookFile* this, class PStringBase<char> arg2, class PStringBase<char> arg3, uint8_t arg4)

00671bd0  {
00671bd8      class PStringBase<unsigned short> __return_1 = this;
00671bdd      class PStringBase<unsigned short> __return = 0;
00671be9      __return = PStringBase<char>::to_wpstring(&arg3, &__return_1, __return.m_charbuffer);
00671bf3      PStringBase<char>::to_wpstring(&arg2, &__return, 0);
00671c09      int32_t ebx;
00671c09      ebx = LookFile::LookForFile(this, __return, __return_1, arg4);
00671c0b      int32_t* esi_2 = (arg2 - 0x14);
00671c0b      
00671c1a      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00671c22          **(uint32_t**)esi_2(1);
00671c22      
00671c28      int32_t* esi_4 = (arg3 - 0x14);
00671c28      
00671c37      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00671c3f          **(uint32_t**)esi_4(1);
00671c3f      
00671c43      int32_t eax_4;
00671c43      eax_4 = ebx;
00671c46      return eax_4;
00671bd0  }

00671c49                             90 90 90 90 90 90 90                                                           .......

00671c50  int32_t __stdcall BTree::ExtractEntryShift(class BTree* this @ ecx, struct BTMemNode* arg2, int32_t arg3, struct BTEntry* arg4)

00671c50  {
00671c62      if (arg4 != 0)
00671c74          __builtin_memcpy(arg4, &*(uint1464_t*)((char*)arg2->node_m)[0xfc][arg3], 0x18);
00671c74      
00671c7c      int32_t esi_3 = (arg2->node_m.NumEntries_ - 1);
00671c88      void* ecx_1 = ((char*)arg2 + (arg3 * 0x18));
00671c9c      arg2->node_m.NumEntries_ = esi_3;
00671ca9      memmove(((char*)ecx_1 + 0x110), ((char*)ecx_1 + 0x128), ((esi_3 - arg3) * 0x18));
00671ca9      
00671cb3      if (arg2->node_m.NextNode_[0] != 0)
00671ccb          memmove(&arg2->node_m[(1 + arg3)], &arg2->node_m[(2 + arg3)], ((arg2->node_m.NumEntries_ - arg3) << 2));
00671ccb      
00671cd3      arg2->dirty_fm = 1;
00671cda      return 0;
00671c50  }

00671cdd                                                                                         90 90 90                               ...

00671ce0  void __stdcall BTree::AddLeast(class BTree* this @ ecx, struct BTMemNode* arg2, struct BTEntry* arg3, int32_t arg4)

00671ce0  {
00671d01      memmove(&arg2->node_m.Entry_[1], &arg2->node_m.Entry_, 0x2d0);
00671d07      int32_t eax_1 = arg2->node_m.NextNode_[0];
00671d0f      __builtin_memcpy(&arg2->node_m.Entry_, arg3, 0x18);
00671d20      arg2->node_m.NumEntries_ += 1;
00671d20      
00671d26      if (eax_1 != 0)
00671d26      {
00671d2f          memmove(&arg2->node_m.NextNode_[1], &arg2->node_m, 0x7c);
00671d17          arg2->node_m.NextNode_[0] = arg4;
00671d26      }
00671ce0  }

00671d41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00671d50  void __fastcall BTEntry::`default constructor closure'(struct BTEntry* this)

00671d50  {
00671d56      this->__bitfield0 &= 0xffff0000;
00671d5e      *(uint16_t*)((char*)this->__bitfield0 + 2) = 0;
00671d62      this->GID_.id = INVALID_DID.id;
00671d65      this->Offset_ = 0;
00671d68      this->size_ = 0;
00671d6b      this->date_ = 0;
00671d6e      this->iter_ = 0;
00671d50  }

00671d72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00671d80  uint8_t __stdcall BTree::HasEntry(class BTree* this @ ecx, class IDClass<_tagDataID,32,0> arg2, struct BTMemNode* arg3, int32_t* arg4)

00671d80  {
00671d85      int32_t NumEntries_ = arg3->node_m.NumEntries_;
00671d85      
00671d8e      if (NumEntries_ > 0x3d)
00671d8e      {
00671d90          NumEntries_ = 0;
00671d93          return 0;
00671d8e      }
00671d8e      
00671d98      int32_t ecx = (NumEntries_ - 1);
00671d9b      int32_t ebx;
00671d9b      ebx = 0;
00671d9d      int32_t esi = 0;
00671d9f      int32_t eax = 0;
00671d9f      
00671da8      if (ecx < 0)
00671da8      {
00671de2      label_671de2:
00671de2          
00671de9          if (arg2 > &*(uint32_t*)((char*)*(uint1464_t*)((char*)arg3->node_m)[0xfc][0])[4][(eax * 6)].id)
00671deb              eax += 1;
00671da8      }
00671da8      else
00671da8      {
00671dd9          do
00671dd9          {
00671db3              int32_t eax_2;
00671db3              int32_t edx_1;
00671db3              edx_1 = HIGHD(((int64_t)(ecx + esi)));
00671db3              eax_2 = LOWD(((int64_t)(ecx + esi)));
00671db6              eax = ((eax_2 - edx_1) >> 1);
00671dbb              int32_t id = &*(uint32_t*)((char*)*(uint1464_t*)((char*)arg3->node_m)[0xfc][0])[4][(eax * 6)].id;
00671dbb              
00671dc4              if (arg2 == id)
00671dc4              {
00671dc6                  ebx = 1;
00671dc8                  esi = (ecx + 1);
00671dc4              }
00671dc4              else if (arg2 >= id)
00671dd4                  esi = (eax + 1);
00671dcd              else
00671dcf                  ecx = (eax - 1);
00671dd9          } while (esi <= ecx);
00671dd9          
00671ddd          if (ebx == 0)
00671ddd              goto label_671de2;
00671da8      }
00671da8      
00671df2      *(uint32_t*)arg4 = eax;
00671df4      eax = ebx;
00671df8      return eax;
00671d80  }

00671dfb                                                                                   90 90 90 90 90                             .....

00671e00  struct BTEntry* __stdcall BTree::RemoveLeast(class BTree* this @ ecx, struct BTEntry* __return, struct BTMemNode* arg3, int32_t* arg4)

00671e00  {
00671e1f      void var_18;
00671e1f      __builtin_memcpy(&var_18, &arg3->node_m.Entry_, 0x18);
00671e2a      *(uint32_t*)arg4 = arg3->node_m.NextNode_[0];
00671e35      int32_t ecx_2 = (arg3->node_m.NumEntries_ - 1);
00671e36      arg3->node_m.NumEntries_ = ecx_2;
00671e4a      struct BTEntry (* var_30)[0x3d] = &arg3->node_m.Entry_;
00671e4b      memmove(var_30, &arg3->node_m.Entry_[1], (ecx_2 * 0x18));
00671e4b      
00671e54      if (arg3->node_m.NextNode_[0] != 0)
00671e54      {
00671e5c          void* ecx_5 = ((arg3->node_m.NumEntries_ << 2) + 4);
00671e68          var_30 = &arg3->node_m.NextNode_;
00671e69          memmove(var_30, &arg3->node_m.NextNode_[1], ecx_5);
00671e54      }
00671e54      
00671e7d      __builtin_memcpy(__return, &var_18, 0x18);
00671e85      return __return;
00671e00  }

00671e88                          90 90 90 90 90 90 90 90                                                          ........

00671e90  int32_t __thiscall BTree::UpdateNode(class BTree* this, struct BTMemNode* arg2, struct BTMemNode* arg3)

00671e90  {
00671e99      class BTree* this_1 = this;
00671e9b      this = arg2->dirty_fm;
00671e9b      
00671ea2      if (this != 0)
00671ea4          arg2->dirty_fm = 0;
00671ea4      
00671eab      int32_t var_14 = 0;
00671eaf      int32_t var_10 = 0;
00671eb3      void var_c;
00671eb3      SmartBuffer::SmartBuffer(&var_c);
00671ec5      SmartBuffer::Borrow(&var_c, &arg2->offset_m, 0x6b8);
00671ed8      CLBlockAllocator::Update(this_1->pBlkMan_, &var_14, arg2->offset_m);
00671ee1      SmartBuffer::~SmartBuffer(&var_c);
00671eea      SmartBuffer::~SmartBuffer(&var_c);
00671ef6      return 0;
00671e90  }

00671ef9                                                                             90 90 90 90 90 90 90                           .......

00671f00  void __fastcall BTree::Restamp_Entry(class BTree* this, class IDClass<_tagDataID,32,0> arg2)

00671f00  {
00671f06      class IDClass<_tagDataID,32,0> edx;
00671f06      edx.id = this->file_info_pm->use_lru_fm;
00671f06      
00671f0b      if (edx.id == 0)
00671f18          return;
00671f18      
00671f13      /* tailcall */
00671f13      return LRU_List::Mark_Used(this->lru_man_pm, edx);
00671f00  }

00671f1b                                                                                   90 90 90 90 90                             .....

00671f20  void __fastcall BTNode::BTNode(struct BTNode* this)

00671f20  {
00671f27      this->NumEntries_ = 0;
00671f2d      struct BTEntry (* edx)[0x3d] = &this->Entry_;
00671f33      int32_t i_1 = 0x3d;
00671f63      int32_t i;
00671f63      
00671f63      do
00671f63      {
00671f66          ADJ(edx)->Entry_[0].__bitfield0 &= 0xffff0000;
00671f4c          *(uint16_t*)((char*)ADJ(edx)->Entry_[0].__bitfield0 + 2) = 0;
00671f66          ADJ(edx)->Entry_[0].GID_.id = INVALID_DID.id;
00671f66          ADJ(edx)->Entry_[0].Offset_ = 0;
00671f66          ADJ(edx)->Entry_[0].size_ = 0;
00671f66          ADJ(edx)->Entry_[0].date_ = 0;
00671f66          ADJ(edx)->Entry_[0].iter_ = 0;
00671f5f          edx = &*(uint1464_t*)edx[1];
00671f62          i = i_1;
00671f62          i_1 -= 1;
00671f63      } while (i != 1);
00671f66      this->NextNode_[0] = 0;
00671f20  }

00671f3a                                                                                8d 9b 00 00 00 00                            ......
00671f6b                                   90 90 90 90 90                                                             .....

00671f70  void __thiscall BTree::BTree(class BTree* this, class CLBlockAllocator* arg2)

00671f70  {
00671f79      this->mem_root_node_m.time_stamp_lm = 0;
00671f7b      this->mem_root_node_m.dirty_fm = 0;
00671f7e      this->mem_root_node_m.ahead_pm = nullptr;
00671f81      this->mem_root_node_m.behind_pm = nullptr;
00671f84      this->mem_root_node_m.offset_m = 0;
00671f87      BTNode::BTNode(&this->mem_root_node_m.node_m);
00671f90      this->pBlkMan_ = arg2;
00671f96      this->mem_nodes_pm = nullptr;
00671f9c      this->nodesInMem_ = 0;
00671fa2      this->file_info_pm = nullptr;
00671fa8      this->lru_man_pm = nullptr;
00671fae      this->_time_stamp = 1;
00671f70  }

00671fbf                                                                                               90                                 .

00671fc0  void __fastcall BTree::~BTree(class BTree* this)

00671fc0  {
00671fc3      struct BTMemNode* mem_nodes_pm = this->mem_nodes_pm;
00671fc3      
00671fcc      if (mem_nodes_pm != 0)
00671fd2          operator delete[](((char*)mem_nodes_pm - 4));
00671fd2      
00671fda      class LRU_List* lru_man_pm = this->lru_man_pm;
00671fe2      this->mem_nodes_pm = nullptr;
00671fe2      
00671fec      if (lru_man_pm != 0)
00671fec      {
00671ff0          LRU_List::~LRU_List(lru_man_pm);
00671ff6          operator delete(lru_man_pm);
00671fec      }
00671fec      
00671fff      this->lru_man_pm = nullptr;
00671fc0  }

0067200b                                   90 90 90 90 90                                                             .....

00672010  int32_t __thiscall BTree::CreateTree(class BTree* this, struct DiskFileInfo_t* arg2)

00672010  {
0067201d      int32_t i_1 = 0x64;
00672027      this->file_info_pm = arg2;
0067202d      this->nodesInMem_ = 0x64;
00672033      void* eax = operator new[](0x2a624);
0067203f      struct DiskFileInfo_t* eax_2;
0067203f      
0067203f      if (eax == 0)
00672075          eax_2 = nullptr;
0067203f      else
0067203f      {
00672041          *(uint32_t*)eax = 0x64;
0067204a          void* esi_1 = ((char*)eax + 4);
0067206d          int32_t i;
0067206d          
0067206d          do
0067206d          {
00672053              *(uint32_t*)esi_1 = 0;
00672055              *(uint8_t*)((char*)esi_1 + 4) = 0;
00672058              *(uint32_t*)((char*)esi_1 + 8) = 0;
0067205b              *(uint32_t*)((char*)esi_1 + 0xc) = 0;
0067205e              *(uint32_t*)((char*)esi_1 + 0x10) = 0;
00672061              BTNode::BTNode(((char*)esi_1 + 0x14));
00672066              esi_1 += 0x6c8;
0067206c              i = i_1;
0067206c              i_1 -= 1;
0067206d          } while (i != 1);
0067206f          eax_2 = ((char*)eax + 4);
0067203f      }
0067203f      
00672077      this->mem_nodes_pm = eax_2;
0067207d      struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
00672083      int32_t firstFree_ = file_info_pm->firstFree_;
00672086      this->mem_root_node_m.offset_m = firstFree_;
0067208b      file_info_pm->btreeRoot_ = firstFree_;
00672092      int32_t var_14 = 0;
00672096      int32_t var_10 = 0;
0067209a      void var_c;
0067209a      SmartBuffer::SmartBuffer(&var_c);
006720a9      SmartBuffer::Borrow(&var_c, &this->mem_root_node_m.offset_m, 0x6b8);
006720c1      int32_t result = CLBlockAllocator::Store_Data(this->pBlkMan_, &var_14, this->mem_root_node_m.offset_m);
006720c1      
006720cc      if (this->file_info_pm->use_lru_fm == 0)
006720cc      {
00672116          if (result == 0)
00672123              result = CLBlockAllocator::SaveFileInfo(this->pBlkMan_);
006720cc      }
006720cc      else if (result == 0)
006720d0      {
006720d7          void* eax_5 = operator new(0x104);
006720e1          class LRU_List* eax_6;
006720e1          
006720e1          if (eax_5 == 0)
006720fa              eax_6 = nullptr;
006720e1          else
006720f3              eax_6 = LRU_List::LRU_List(eax_5, this->pBlkMan_, this->file_info_pm);
006720f3          
006720fe          this->lru_man_pm = eax_6;
006720fe          
0067210b          if (LRU_List::Create_List(eax_6) != 0)
00672123              result = CLBlockAllocator::SaveFileInfo(this->pBlkMan_);
0067210b          else
0067210d              result = 0xfffffffe;
006720d0      }
006720d0      
00672129      SmartBuffer::~SmartBuffer(&var_c);
00672132      SmartBuffer::~SmartBuffer(&var_c);
00672140      return result;
00672010  }

00672143           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00672150  int32_t __thiscall BTree::LoadTree(class BTree* this, struct DiskFileInfo_t* arg2)

00672150  {
0067215f      int32_t i_1 = 0x64;
00672169      int32_t result = 0;
0067216d      this->file_info_pm = arg2;
00672173      this->nodesInMem_ = 0x64;
00672179      void* eax_1 = operator new[](0x2a624);
00672183      struct DiskFileInfo_t* eax_3;
00672183      
00672183      if (eax_1 == 0)
006721b5          eax_3 = nullptr;
00672183      else
00672183      {
00672185          *(uint32_t*)eax_1 = 0x64;
0067218e          void* esi_1 = ((char*)eax_1 + 4);
006721ad          int32_t i;
006721ad          
006721ad          do
006721ad          {
00672193              *(uint32_t*)esi_1 = 0;
00672195              *(uint8_t*)((char*)esi_1 + 4) = 0;
00672198              *(uint32_t*)((char*)esi_1 + 8) = 0;
0067219b              *(uint32_t*)((char*)esi_1 + 0xc) = 0;
0067219e              *(uint32_t*)((char*)esi_1 + 0x10) = 0;
006721a1              BTNode::BTNode(((char*)esi_1 + 0x14));
006721a6              esi_1 += 0x6c8;
006721ac              i = i_1;
006721ac              i_1 -= 1;
006721ad          } while (i != 1);
006721af          eax_3 = ((char*)eax_1 + 4);
00672183      }
00672183      
006721b7      struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
006721bd      this->mem_nodes_pm = eax_3;
006721c6      this->mem_root_node_m.offset_m = file_info_pm->btreeRoot_;
006721cf      int32_t var_14 = 0;
006721d3      int32_t var_10 = 0;
006721d7      void var_c;
006721d7      SmartBuffer::SmartBuffer(&var_c);
006721e6      SmartBuffer::Borrow(&var_c, &this->mem_root_node_m.offset_m, 0x6b8);
006721e6      
00672204      if (CLBlockAllocator::Load_Data(this->pBlkMan_, &var_14, this->mem_root_node_m.offset_m, 0) == 0)
00672206          result = 0xffffffff;
00672206      
00672219      if ((this->file_info_pm->use_lru_fm != 0 && result == 0))
00672219      {
00672220          void* eax_6 = operator new(0x104);
0067222a          class LRU_List* eax_7;
0067222a          
0067222a          if (eax_6 == 0)
00672243              eax_7 = nullptr;
0067222a          else
0067223c              eax_7 = LRU_List::LRU_List(eax_6, this->pBlkMan_, this->file_info_pm);
0067223c          
00672247          this->lru_man_pm = eax_7;
00672247          
00672254          if (LRU_List::Load_List(eax_7) == 0)
00672256              result = 0xffffffff;
00672219      }
00672219      
0067225e      SmartBuffer::~SmartBuffer(&var_c);
00672267      SmartBuffer::~SmartBuffer(&var_c);
00672277      return result;
00672150  }

0067227a                                                                                90 90 90 90 90 90                            ......

00672280  int32_t __fastcall BTree::SaveDataToFile(class BTree* this)

00672280  {
00672281      class BTree* this_1 = this;
00672289      this = this_1->file_info_pm->use_lru_fm;
00672289      
0067228f      if (this != 0)
00672297          LRU_List::Write_All_Out(this_1->lru_man_pm);
00672297      
006722a3      int32_t i = 0;
006722a3      
006722a7      if (this_1->nodesInMem_ > 0)
006722a7      {
006722a9          int32_t edi_1 = 0;
006722a9          
006722e0          do
006722e0          {
006722b6              struct BTMemNode* eax_2 = (this_1->mem_nodes_pm + edi_1);
006722b6              
006722be              if (eax_2->offset_m != 0)
006722be              {
006722c0                  int32_t ecx_2;
006722c0                  ecx_2 = eax_2->dirty_fm;
006722c0                  
006722c5                  if (ecx_2 != 0)
006722cc                      BTree::UpdateNode(this_1, eax_2, nullptr);
006722be              }
006722be              
006722d7              i += 1;
006722d8              edi_1 += 0x6c8;
006722e0          } while (i < this_1->nodesInMem_);
006722a7      }
006722a7      
006722e2      struct DiskFileInfo_t* file_info_pm = this_1->file_info_pm;
006722e8      int32_t offset_m = this_1->mem_root_node_m.offset_m;
006722e8      
006722ef      if (file_info_pm->btreeRoot_ != offset_m)
006722f1          file_info_pm->btreeRoot_ = offset_m;
006722f1      
006722fa      int32_t result = CLBlockAllocator::SaveFileInfo(this_1->pBlkMan_);
00672307      CLBlockAllocator::ClearTransaction(this_1->pBlkMan_);
00672310      return result;
00672280  }

006722ad                                         8d 49 00                                                               .I.
00672311                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00672320  struct BTMemNode* __thiscall BTree::FindNode(class BTree* this, int32_t arg2, int32_t* arg3)

00672320  {
00672331      class BTree* eax = nullptr;
00672333      int32_t i = 0;
00672338      int32_t i_1 = 0;
00672338      
0067233c      if (arg2 == this->mem_root_node_m.offset_m)
0067233c      {
00672344          if (arg3 != 0)
00672346              *(uint32_t*)arg3 = 0xffffffff;
00672346          
0067234c          return this;
0067233c      }
0067233c      
0067235a      void* var_18_1 = nullptr;
0067235e      void* edi_1 = nullptr;
00672366      int32_t ecx;
00672366      
00672366      while (i < this->nodesInMem_)
00672366      {
00672368          struct BTMemNode* mem_nodes_pm = this->mem_nodes_pm;
00672376          void* ecx_1 = ((char*)edi_1 + mem_nodes_pm);
00672376          
00672379          if (arg2 == *(uint32_t*)(&mem_nodes_pm->offset_m + edi_1))
00672379          {
00672381              *(uint32_t*)ecx_1 = this->_time_stamp;
0067238a              eax = ecx_1;
0067238c              ecx = arg3;
00672390              this->_time_stamp += 1;
00672390              
0067239a              if (ecx != 0)
0067239c                  *(uint32_t*)ecx = i;
00672379          }
00672379          else if (*(uint32_t*)ecx_1 < *(uint32_t*)((char*)var_18_1 + mem_nodes_pm))
006723a9          {
006723ab              i_1 = i;
006723af              var_18_1 = edi_1;
006723a9          }
006723a9          
006723b5          i += 1;
006723b6          edi_1 += 0x6c8;
006723b6          
006723be          if (eax != 0)
006723c7              return eax;
00672366      }
00672366      
006723cc      if (eax == 0)
006723cc      {
006723d2          struct BTMemNode* mem_nodes_pm_1 = this->mem_nodes_pm;
006723d8          void* edi_3 = (i_1 * 0x6c8);
006723de          ecx = *(uint8_t*)(&mem_nodes_pm_1->dirty_fm + edi_3);
006723de          
006723e7          if (ecx != 0)
006723ed              BTree::UpdateNode(this, ((char*)edi_3 + mem_nodes_pm_1), nullptr);
006723ed          
006723f6          if (arg2 != 0)
006723f6          {
0067241d              int32_t var_14 = 0;
00672421              int32_t var_10_1 = 0;
00672425              void var_c;
00672425              SmartBuffer::SmartBuffer(&var_c);
0067243e              SmartBuffer::Borrow(&var_c, (&this->mem_nodes_pm->offset_m + edi_3), 0x6b8);
00672454              CLBlockAllocator::Load_Data(this->pBlkMan_, &var_14, arg2, 0);
00672463              *(uint32_t*)(&this->mem_nodes_pm->offset_m + edi_3) = arg2;
00672467              SmartBuffer::~SmartBuffer(&var_c);
00672470              SmartBuffer::~SmartBuffer(&var_c);
006723f6          }
006723f6          else
006723f6          {
006723fe              void* eax_4 = (this->mem_nodes_pm + edi_3);
00672400              *(uint32_t*)eax_4 = 0;
00672402              *(uint8_t*)((char*)eax_4 + 4) = 0;
00672405              *(uint32_t*)((char*)eax_4 + 8) = 0;
00672408              *(uint32_t*)((char*)eax_4 + 0xc) = 0;
0067240b              *(uint32_t*)((char*)eax_4 + 0x10) = 0;
0067240e              *(uint32_t*)((char*)eax_4 + 0x10c) = 0;
00672414              *(uint32_t*)((char*)eax_4 + 0x14) = 0;
006723f6          }
006723f6          
00672481          eax = ((char*)edi_3 + this->mem_nodes_pm);
00672488          eax->mem_root_node_m.time_stamp_lm = this->_time_stamp;
00672493          this->_time_stamp += 1;
00672493          
00672499          if (arg3 != 0)
006724a6              *(uint32_t*)arg3 = i_1;
006723cc      }
006723cc      
00672355      return eax;
00672320  }

006724af                                               90                                                                 .

006724b0  struct BTMemNode* __fastcall BTree::AllocateEmptyNode(class BTree* this)

006724b0  {
006724bc      struct BTMemNode* result = BTree::FindNode(this, 0, nullptr);
006724c3      result->node_m.NumEntries_ = 0;
006724d6      result->offset_m = this->file_info_pm->firstFree_;
006724e0      int32_t var_14 = 0;
006724e8      int32_t var_10 = 0;
006724f0      void var_c;
006724f0      SmartBuffer::SmartBuffer(&var_c);
006724ff      SmartBuffer::Borrow(&var_c, &result->offset_m, 0x6b8);
00672512      CLBlockAllocator::Store_Data(this->pBlkMan_, &var_14, result->offset_m);
0067251b      SmartBuffer::~SmartBuffer(&var_c);
00672524      SmartBuffer::~SmartBuffer(&var_c);
00672531      return result;
006724b0  }

00672532                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00672540  int32_t __thiscall BTree::SplitNodeExec(class BTree* this, class SplitNodeTransactInfo const* arg2)

00672540  {
00672546      class SplitNodeTransactInfo* esi = arg2;
0067254e      int32_t m_nSplitIndex = esi->m_nSplitIndex;
00672556      int32_t m_nSplitIndex_1 = m_nSplitIndex;
0067255a      struct BTMemNode* eax_1 = BTree::FindNode(this, esi->m_nParentOffset, nullptr);
0067256a      struct BTMemNode* eax_3 = BTree::FindNode(this, eax_1->node_m.NextNode_[m_nSplitIndex], nullptr);
0067257c      int32_t m_nFirstFreeBlock = esi->m_nFirstFreeBlock;
00672583      struct BTMemNode* eax_4;
00672583      
00672583      if (this->file_info_pm->firstFree_ != m_nFirstFreeBlock)
0067258f          eax_4 = BTree::FindNode(this, m_nFirstFreeBlock, nullptr);
00672583      else
00672585          eax_4 = BTree::AllocateEmptyNode(this);
00672585      
006725a1      if (eax_4->node_m.NumEntries_ != 0x1e)
006725a1      {
006725b8          __builtin_memcpy(&eax_4->node_m.Entry_, &eax_3->node_m.Entry_[0x1f], 0x2d0);
006725b8          
006725c3          if (eax_3->node_m.NextNode_[0] != 0)
006725d3              __builtin_memcpy(&eax_4->node_m, &eax_3->node_m.NextNode_[0x1f], 0x7c);
006725d3          
006725da          eax_4->node_m.NumEntries_ = 0x1e;
006725e0          BTree::UpdateNode(this, eax_4, nullptr);
006725e5          m_nSplitIndex = m_nSplitIndex_1;
006725e9          esi = arg2;
006725a1      }
006725a1      
006725f2      int32_t NumEntries_ = eax_1->node_m.NumEntries_;
006725f2      
006725fb      if (NumEntries_ == esi->m_nParentEntries)
006725fb      {
00672603          if (NumEntries_ > m_nSplitIndex)
00672603          {
00672608              void* eax_5 = &eax_1->node_m[(1 + NumEntries_)];
0067260e              void* edx_2 = &*(uint1464_t*)((char*)eax_1->node_m)[0xfc][NumEntries_];
00672615              int32_t var_c_1 = (NumEntries_ - m_nSplitIndex);
00672643              bool cond:1_1;
00672643              
00672643              do
00672643              {
00672623                  *(uint32_t*)eax_5 = *(uint32_t*)((char*)eax_5 - 4);
00672625                  void* esi_5 = ((char*)edx_2 - 0x18);
00672628                  void* edi_2 = edx_2;
0067262a                  void* var_4_1 = esi_5;
0067262e                  edx_2 = esi_5;
00672635                  __builtin_memcpy(edi_2, esi_5, 0x18);
0067263b                  eax_5 -= 4;
0067263e                  cond:1_1 = var_c_1 != 1;
0067263f                  var_c_1 -= 1;
00672643              } while (cond:1_1);
00672645              m_nSplitIndex = m_nSplitIndex_1;
00672649              esi = arg2;
00672603          }
00672603          
00672654          eax_1->node_m[(1 + m_nSplitIndex)] = esi->m_nFirstFreeBlock;
0067266d          __builtin_memcpy(&*(uint1464_t*)((char*)eax_1->node_m)[0xfc][m_nSplitIndex], &eax_3->node_m.Entry_[0x1e], 0x18);
0067267b          eax_1->node_m.NumEntries_ += 1;
00672681          BTree::UpdateNode(this, eax_1, nullptr);
006725fb      }
006725fb      
00672695      if (eax_3->node_m.NumEntries_ != 0x1e)
00672695      {
0067269c          eax_3->node_m.NumEntries_ = 0x1e;
006726a2          BTree::UpdateNode(this, eax_3, nullptr);
00672695      }
00672695      
006726b0      return 0;
00672540  }

006726b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006726c0  int32_t __thiscall BTree::InsertEntryExec(class BTree* this, class AddObjectTransactInfo const* arg2, class Cache_Pack_t* arg3)

006726c0  {
006726c0      class BTree* this_1 = this;
006726cd      int32_t result = 0;
006726cd      
006726d6      if (arg2->m_entry.size_ == 0xfffffffe)
006726e1          return 0xffffff9b;
006726e1      
006726ed      struct BTMemNode* eax_3 = BTree::FindNode(this, arg2->m_entry.Offset_, nullptr);
006726ed      
006726f6      if (eax_3 == 0)
00672702          return 0xffffffff;
00672702      
0067270a      if (eax_3->node_m.NextNode_[0] != 0)
00672718          return 0xffffff9b;
00672718      
00672724      if (arg2->m_nNodeEntries == eax_3->node_m.NumEntries_)
00672724      {
00672737          SmartBuffer::ReconfigureAllocation(&arg3->m_buff, 4, 1);
00672737          
00672745          if (SmartBuffer::GetBuffer(&arg3->m_buff) == 0)
00672815              return CLBlockAllocator::StoreDataRollback(this->pBlkMan_, arg2->m_entry.size_, arg2->m_nFirstFreeBlock);
00672815          
0067274b          int32_t NumEntries_ = eax_3->node_m.NumEntries_;
00672751          int32_t eax_9 = (NumEntries_ - 1);
00672751          
00672752          if ((NumEntries_ - 1) >= 0)
00672752          {
00672757              void* edx_1 = &*(uint1464_t*)((char*)eax_3->node_m)[0xfc][eax_9];
00672757              
00672766              while (arg2->m_entry.GID_.id < *(uint32_t*)((char*)edx_1 + 4))
00672766              {
00672768                  void* edi_3 = ((char*)edx_1 + 0x18);
0067276b                  void* esi_1 = edx_1;
0067276d                  eax_9 -= 1;
00672773                  edx_1 -= 0x18;
00672778                  __builtin_memcpy(edi_3, esi_1, 0x18);
00672778                  
0067277a                  if (eax_9 < 0)
0067277a                      break;
00672766              }
00672752          }
00672752          
00672780          void* eax_10 = ((char*)eax_3 + (((eax_9 * 3) + 3) << 3));
00672792          __builtin_memcpy(((char*)eax_10 + 0x110), &arg2->m_entry, 0x18);
0067279b          *(uint32_t*)((char*)eax_10 + 0x118) = arg2->m_nFirstFreeBlock;
006727b0          *(int32_t*)((char*)eax_10 + 0x11c) = Cache_Pack_t::GetDataSize(arg3);
006727b6          eax_3->node_m.NumEntries_ += 1;
006727d5          result = CLBlockAllocator::Store_Data(this->pBlkMan_, arg3, arg2->m_nFirstFreeBlock);
006727d7          class IDClass<_tagDataID,32,0> edx_4 = BTree::UpdateNode(this, eax_3, nullptr);
006727d7          
006727e7          if (this->file_info_pm->use_lru_fm != 0)
006727e7          {
006727f2              uint32_t id = arg2->m_entry.GID_.id;
006727f3              LRU_List::Write_Added(this->lru_man_pm, edx_4);
006727e7          }
00672724      }
00672724      
0067281e      return result;
006726c0  }

00672821     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00672830  int32_t __thiscall BTree::UpdateObjectExec(class BTree* this, class UpdateObjectTransactInfo const* arg2, class Cache_Pack_t* arg3)

00672830  {
00672834      class UpdateObjectTransactInfo* ebx = arg2;
00672847      int32_t result = 0;
0067284f      struct BTMemNode* eax_1 = BTree::FindNode(this, ebx->m_entry.Offset_, nullptr);
00672854      int32_t m_nEntryIndex = ebx->m_nEntryIndex;
00672862      arg2 = ebx->m_nFirstFreeBlock;
00672862      
00672866      if (eax_1 == 0)
006729ae          return 0xffffffff;
006729ae      
00672870      int32_t eax_2;
00672870      eax_2 = ebx->m_entry.size_ == 0xfffffffe;
00672870      
00672875      if (eax_2 != 0)
00672875      {
0067291a          *(uint32_t*)((char*)eax_1 + (((m_nEntryIndex * 3) + 0x24) << 3)) = ebx->m_entry.date_;
00672924          void* eax_11 = ((char*)eax_1 + (m_nEntryIndex * 0x18));
00672927          *(uint32_t*)((char*)eax_11 + 0x124) = ebx->m_entry.iter_;
0067292d          int32_t ecx_8;
0067292d          ecx_8 = *(uint16_t*)((char*)ebx->m_entry.__bitfield0 + 2);
00672931          *(uint16_t*)((char*)eax_11 + 0x112) = ecx_8;
0067293d      label_67293d:
0067293d          BTree::UpdateNode(this, eax_1, nullptr);
00672942          struct DiskFileInfo_t* file_info_pm_1 = this->file_info_pm;
00672942          
0067294d          if (file_info_pm_1->use_lru_fm != 0)
0067294d          {
00672958              uint32_t id = ebx->m_entry.GID_.id;
00672959              LRU_List::Mark_Used(this->lru_man_pm, file_info_pm_1);
0067294d          }
00672875      }
00672875      else
00672875      {
0067288a          SmartBuffer::ReconfigureAllocation(&arg3->m_buff, 4, 1);
0067288a          
0067289a          if (SmartBuffer::GetBuffer(&arg3->m_buff) != 0)
0067289a          {
006728a4              void* eax_4 = ((char*)eax_1 + (m_nEntryIndex * 0x18));
006728b5              __builtin_memcpy(((char*)eax_4 + 0x110), &ebx->m_entry, 0x18);
006728c8              *(uint32_t*)((char*)eax_4 + 0x118) = arg2;
006728d6              int32_t eax_7;
006728d6              
006728d6              if (SmartBuffer::GetSize(&arg3->m_buff) <= 4)
006728e4                  eax_7 = 0;
006728d6              else
006728df                  eax_7 = (SmartBuffer::GetSize(&arg3->m_buff) - 4);
006728df              
006728ee              *(uint32_t*)((char*)eax_4 + 0x11c) = eax_7;
0067290d              result = CLBlockAllocator::Store_Data(this->pBlkMan_, arg3, arg2);
00672911              goto label_67293d;
0067289a          }
00672875      }
00672875      
0067295e      int32_t m_nOldOffset = ebx->m_nOldOffset;
00672965      int32_t esi_4 = &*(uint32_t*)((char*)*(uint1464_t*)((char*)eax_1->node_m)[0xfc][0])[8][(m_nEntryIndex * 6)];
00672965      
0067296e      if (esi_4 == m_nOldOffset)
006729bc          return result;
006729bc      
00672974      if (arg2 == esi_4)
00672976          arg2 = m_nOldOffset;
00672976      
0067297a      struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
006729a1      return CLBlockAllocator::DeleteBlocks(this->pBlkMan_, arg2, file_info_pm->finalFree_, file_info_pm->iFreeBlocks_, 1);
00672830  }

006729bf                                                                                               90                                 .

006729c0  int32_t __thiscall BTree::MergeNodesExec(class BTree* this, class MergeNodesTransactInfo const* arg2)

006729c0  {
006729c6      class MergeNodesTransactInfo* esi = arg2;
006729d4      int32_t var_24 = 0xffffffff;
006729d8      int32_t var_20 = 0xffffffff;
006729e8      struct BTMemNode* edi = BTree::FindNode(this, esi->m_nNodeOffset, &arg2);
006729f9      struct BTMemNode* eax_3 = BTree::FindNode(this, esi->m_nLeftOffset, &var_20);
00672a0b      struct BTMemNode* eax_5 = BTree::FindNode(this, esi->m_nRightOffset, &var_24);
00672a17      arg2 = &eax_5->node_m;
00672a17      
00672a31      if ((edi != 0xffffffec && edi->node_m.NumEntries_ == esi->m_nNodeEntries))
00672a31      {
00672a41          int32_t var_18 = 0;
00672a45          int32_t var_10_1 = 0;
00672a49          int32_t var_c_1 = 0;
00672a4d          int32_t var_8_1 = 0;
00672a51          int32_t var_4_1 = 0;
00672a5a          uint32_t id = INVALID_DID.id;
00672a61          BTree::ExtractEntryShift(this, edi, esi->m_nIndex, &var_18);
00672a61          
00672a6c          if (arg2 != 0)
00672a6c          {
00672a76              eax_3->node_m.NextNode_[0x1f] = 0;
00672a8f              __builtin_memcpy(&eax_3->node_m.Entry_[0x1e], &var_18, 0x18);
00672a91              eax_3->node_m.NumEntries_ += 1;
00672a9d              int32_t NumEntries_ = eax_3->node_m.NumEntries_;
00672aa6              int32_t ecx_8 = (eax_5->node_m.NumEntries_ * 0x18);
00672aac              arg2 = &eax_5->node_m;
00672ac8              int32_t esi_2;
00672ac8              int32_t edi_3;
00672ac8              edi_3 = __builtin_memcpy(&eax_3->node_m.Entry_[NumEntries_], &eax_5->node_m.Entry_, ((ecx_8 >> 2) << 2));
00672acf              __builtin_memcpy(edi_3, esi_2, (ecx_8 & 3));
00672ad7              class MergeNodesTransactInfo* esi_3 = arg2;
00672ae1              void* ecx_13 = ((*(int32_t*)((char*)esi_3 + 0xf8) << 2) + 4);
00672af0              int32_t esi_4;
00672af0              int32_t edi_5;
00672af0              edi_5 = __builtin_memcpy((&eax_3->node_m + (eax_3->node_m.NumEntries_ << 2)), esi_3, ((ecx_13 >> 2) << 2));
00672af7              __builtin_memcpy(edi_5, esi_4, (ecx_13 & 3));
00672ab6              eax_3->node_m.NumEntries_ += *(int32_t*)((char*)arg2 + 0xf8);
00672b16              BTree::UpdateNode(this, eax_3, nullptr);
00672b1b              struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
00672b3a              CLBlockAllocator::DeleteBlocks(this->pBlkMan_, eax_5->offset_m, file_info_pm->finalFree_, file_info_pm->iFreeBlocks_, 0);
00672b53              void* eax_15 = ((var_24 * 0x6c8) + this->mem_nodes_pm);
00672b55              *(uint32_t*)eax_15 = 0;
00672b57              *(uint8_t*)((char*)eax_15 + 4) = 0;
00672b5b              *(uint32_t*)((char*)eax_15 + 8) = 0;
00672b5e              *(uint32_t*)((char*)eax_15 + 0xc) = 0;
00672b61              *(uint32_t*)((char*)eax_15 + 0x10) = 0;
00672b64              *(uint32_t*)((char*)eax_15 + 0x10c) = 0;
00672b6a              *(uint32_t*)((char*)eax_15 + 0x14) = 0;
00672a6c          }
00672a6c          
00672b83          if ((&edi->node_m == &this->mem_root_node_m.node_m && this->mem_root_node_m.node_m.NumEntries_ == 0))
00672b83          {
00672b85              this->file_info_pm->btreeRoot_ = eax_3->offset_m;
00672b97              CLBlockAllocator::SaveFileInfo(this->pBlkMan_);
00672b9c              struct DiskFileInfo_t* file_info_pm_1 = this->file_info_pm;
00672bb6              CLBlockAllocator::DeleteBlocks(this->pBlkMan_, edi->offset_m, file_info_pm_1->finalFree_, file_info_pm_1->iFreeBlocks_, 0);
00672bd0              __builtin_memcpy(&this->mem_root_node_m.node_m, &eax_3->node_m, 0x6b4);
00672bd5              this->mem_root_node_m.offset_m = eax_3->offset_m;
00672bd8              void* eax_22 = &this->mem_nodes_pm[var_20];
00672be3              *(uint32_t*)eax_22 = 0;
00672be5              *(uint8_t*)((char*)eax_22 + 4) = 0;
00672be8              *(uint32_t*)((char*)eax_22 + 8) = 0;
00672beb              *(uint32_t*)((char*)eax_22 + 0xc) = 0;
00672bee              *(uint32_t*)((char*)eax_22 + 0x10) = 0;
00672bf1              *(uint32_t*)((char*)eax_22 + 0x10c) = 0;
00672bf7              *(uint32_t*)((char*)eax_22 + 0x14) = 0;
00672c00              return 0;
00672b83          }
00672b83          
00672c08          BTree::UpdateNode(this, edi, nullptr);
00672a31      }
00672a31      
00672c16      return 0;
006729c0  }

00672c19                                                                             90 90 90 90 90 90 90                           .......

00672c20  class IDClass<_tagDataID,32,0>* __thiscall BTree::FindMin(class BTree* this, class IDClass<_tagDataID,32,0>* __return, struct BTMemNode* arg3)

00672c20  {
00672c20      struct BTMemNode* eax = arg3;
00672c20      
00672c2c      for (int32_t i = eax->node_m.NextNode_[0]; i != 0; i = eax->node_m.NextNode_[0])
00672c35          eax = BTree::FindNode(this, i, nullptr);
00672c35      
00672c47      uint32_t* result = __return;
00672c4b      *(uint32_t*)result = eax->node_m.Entry_[0].GID_.id;
00672c4e      return result;
00672c20  }

00672c51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00672c60  class IDClass<_tagDataID,32,0>* __thiscall BTree::FindMax(class BTree* this, class IDClass<_tagDataID,32,0>* __return, struct BTMemNode* arg3)

00672c60  {
00672c60      struct BTMemNode* eax = arg3;
00672c60      
00672c6c      while (eax->node_m.NextNode_[0] != 0)
00672c7f          eax = BTree::FindNode(this, eax->node_m.NextNode_[eax->node_m.NumEntries_], nullptr);
00672c7f      
00672c9f      __return->id = eax->node_m[(0x3a + (eax->node_m.NumEntries_ * 6))];
00672ca2      return __return;
00672c60  }

00672ca5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00672cb0  int32_t __thiscall BTree::DeleteLeafExec(class BTree* this, class DeleteLeafTransactInfo const* arg2)

00672cb0  {
00672cc0      struct BTMemNode* eax_1 = BTree::FindNode(this, arg2->m_nNodeOffset, nullptr);
00672cc5      int32_t m_nIndex = arg2->m_nIndex;
00672cc5      
00672ccc      if (eax_1 == 0)
00672d47          return 0xffffffff;
00672d47      
00672cce      uint32_t id = arg2->m_cObjectDID.id;
00672cd4      void* ecx = ((char*)eax_1 + (m_nIndex * 0x18));
00672cd4      
00672ce3      if (id != *(uint32_t*)((char*)ecx + 0x114))
00672d50          return 0;
00672d50      
00672ce5      class IDClass<_tagDataID,32,0> file_info_pm_1 = this->file_info_pm;
00672ceb      int32_t eax_3;
00672ceb      eax_3 = *(uint8_t*)(file_info_pm_1 + 0x2c);
00672ceb      
00672cf0      if (eax_3 != 0)
00672cf0      {
00672cf8          uint32_t id_1 = id;
00672cf9          LRU_List::Mark_Deleted(this->lru_man_pm, file_info_pm_1);
00672cf0      }
00672cf0      
00672d02      struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
00672d1f      CLBlockAllocator::DeleteBlocks(this->pBlkMan_, *(uint32_t*)((char*)ecx + 0x118), file_info_pm->finalFree_, file_info_pm->iFreeBlocks_, 1);
00672d2a      BTree::ExtractEntryShift(this, eax_1, m_nIndex, nullptr);
00672d34      BTree::UpdateNode(this, eax_1, nullptr);
00672d3d      return 0;
00672cb0  }

00672d53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00672d60  int32_t __thiscall BTree::DeleteInternalExec(class BTree* this, class DeleteInternalTransactInfo const* arg2)

00672d60  {
00672d65      class DeleteInternalTransactInfo* ebp = arg2;
00672d7b      struct BTMemNode* eax_1 = BTree::FindNode(this, ebp->m_nTargetOffset, nullptr);
00672d8c      struct BTMemNode* eax_3 = BTree::FindNode(this, ebp->m_nDonorOffset, nullptr);
00672d97      int32_t m_nDonorIndex = ebp->m_nDonorIndex;
00672d97      
00672daf      if ((eax_1 == 0 || eax_3 == 0))
00672e72          return 0xffffffff;
00672e72      
00672db5      int32_t eax_5 = (ebp->m_nTargetIndex * 3);
00672dbf      void* ecx_2 = ((char*)eax_1 + (eax_5 << 3));
00672dc2      uint32_t id = ebp->m_cTargetDID.id;
00672dc7      arg2 = ecx_2;
00672dcb      int32_t result;
00672dcb      
00672dcb      if (id != &*(uint32_t*)((char*)*(uint1464_t*)((char*)eax_1->node_m)[0xfc][0])[4][(eax_5 * 2)].id)
00672e3e          result = 0;
00672dcb      else
00672dcb      {
00672dcd          struct DiskFileInfo_t* file_info_pm_1 = this->file_info_pm;
00672dcd          
00672dd7          if (file_info_pm_1->use_lru_fm != 0)
00672dd7          {
00672ddf              uint32_t id_1 = id;
00672de0              LRU_List::Mark_Deleted(this->lru_man_pm, file_info_pm_1);
00672de5              ecx_2 = arg2;
00672dd7          }
00672dd7          
00672de9          struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
00672e06          CLBlockAllocator::DeleteBlocks(this->pBlkMan_, *(uint32_t*)((char*)ecx_2 + 0x118), file_info_pm->finalFree_, file_info_pm->iFreeBlocks_, 1);
00672e2a          __builtin_memcpy(((char*)arg2 + 0x110), &*(uint1464_t*)((char*)eax_3->node_m)[0xfc][m_nDonorIndex], 0x18);
00672e2f          result = BTree::UpdateNode(this, eax_1, nullptr);
00672dcb      }
00672dcb      
00672e51      if (ebp->m_cDonorDID.id != &*(uint32_t*)((char*)*(uint1464_t*)((char*)eax_3->node_m)[0xfc][0])[4][(m_nDonorIndex * 6)].id)
00672e7c          return result;
00672e7c      
00672e59      BTree::ExtractEntryShift(this, eax_3, m_nDonorIndex, nullptr);
00672e63      BTree::UpdateNode(this, eax_3, nullptr);
00672e6f      return 0;
00672d60  }

00672e7f                                                                                               90                                 .

00672e80  int32_t __thiscall BTree::RotateEntryExec(class BTree* this, class RotateEntryTransactInfo const* arg2)

00672e80  {
00672e85      class RotateEntryTransactInfo* ebp = arg2;
00672e8c      int32_t m_nIndex = ebp->m_nIndex;
00672e9a      int32_t var_4c = 0;
00672ea2      struct BTMemNode* eax_1 = BTree::FindNode(this, ebp->m_nParentOffset, nullptr);
00672ebb      struct BTMemNode* var_4c_1 = BTree::FindNode(this, eax_1->node_m.NextNode_[m_nIndex], nullptr);
00672ebf      struct BTMemNode* eax_3;
00672ebf      eax_3 = ebp->m_bLeftSibling;
00672ec6      struct BTMemNode* eax_4;
00672ec6      struct BTMemNode* edx;
00672ec6      
00672ec6      if (eax_3 == 0)
00672ec6      {
00672ee3          eax_4 = BTree::FindNode(this, eax_1->node_m[(1 + m_nIndex)], nullptr);
00672ee8          arg2 = eax_4;
00672eec          edx = eax_4;
00672ec6      }
00672ec6      else
00672ec6      {
00672ed4          edx = BTree::FindNode(this, &eax_1->offset_m[m_nIndex], nullptr);
00672ed6          arg2 = edx;
00672ec6      }
00672ec6      
00672eee      int32_t NumEntries_ = edx->node_m.NumEntries_;
00672eee      
00672ef7      if (ebp->m_nSiblingEntryCount == NumEntries_)
00672ef7      {
00672efd          eax_4 = ebp->m_bLeftSibling;
00672f02          int32_t var_54;
00672f02          void var_48;
00672f02          void* esi_2;
00672f02          
00672f02          if (eax_4 == 0)
00672f02          {
00672f3b              void __return;
00672f3b              struct BTEntry* eax_6 = BTree::RemoveLeast(this, &__return, edx, &var_54);
00672f40              edx = arg2;
00672f44              esi_2 = eax_6;
00672f02          }
00672f02          else
00672f02          {
00672f04              int32_t eax_5 = edx->node_m.NextNode_[NumEntries_];
00672f09              edx->node_m.NumEntries_ = (NumEntries_ - 1);
00672f22              __builtin_memcpy(&var_48, &*(uint1464_t*)((char*)edx->node_m)[0xfc][(NumEntries_ - 1)], 0x18);
00672f24              var_54 = eax_5;
00672f28              esi_2 = &var_48;
00672f02          }
00672f02          
00672f46          struct BTMemNode* eax_7 = eax_1;
00672f53          void var_30;
00672f53          __builtin_memcpy(&var_30, esi_2, 0x18);
00672f53          
00672f64          if (ebp->m_cEntryDID.id == &*(uint32_t*)((char*)*(uint1464_t*)((char*)eax_7->node_m)[0xfc][0])[4][(m_nIndex * 6)].id)
00672f64          {
00672f6a              int32_t ecx_8;
00672f6a              ecx_8 = ebp->m_bLeftSibling;
00672f6a              
00672f6f              if (ecx_8 != 0)
00672f71                  m_nIndex -= 1;
00672f71              
00672f8b              __builtin_memcpy(&var_48, &*(uint1464_t*)((char*)eax_7->node_m)[0xfc][m_nIndex], 0x18);
00672f98              __builtin_memcpy(&*(uint1464_t*)((char*)eax_7->node_m)[0xfc][m_nIndex], &var_30, 0x18);
00672f9a              int32_t NumEntries__1 = var_4c_1->node_m.NumEntries_;
00672f9a              
00672fa3              if (ebp->m_nNodeEntryCount == NumEntries__1)
00672fa3              {
00672fa5                  eax_7 = ebp->m_bLeftSibling;
00672fa5                  
00672faa                  if (eax_7 == 0)
00672faa                  {
00672fc3                      var_4c_1->node_m.NumEntries_ = (NumEntries__1 + 1);
00672fc9                      int32_t edx_5 = var_54;
00672fdc                      __builtin_memcpy(&var_4c_1->node_m.Entry_[0x1e], &var_48, 0x18);
00672fde                      var_4c_1->node_m.NextNode_[0x1f] = edx_5;
00672faa                  }
00672faa                  else
00672fbb                      BTree::AddLeast(this, var_4c_1, &var_48, var_54);
00672fbb                  
00672feb                  BTree::UpdateNode(this, var_4c_1, nullptr);
00672ff0                  eax_7 = eax_1;
00672fa3              }
00672fa3              
00672ffb              BTree::UpdateNode(this, eax_7, nullptr);
00673000              edx = arg2;
00672f64          }
00672f64          
0067300b          BTree::UpdateNode(this, edx, nullptr);
00672ef7      }
00672ef7      
0067301a      return 0xffffffff;
00672e80  }

0067301d                                                                                         90 90 90                               ...

00673020  int32_t __thiscall BTree::RecoverTransaction(class BTree* this, class DiskTransactInfo const* arg2)

00673020  {
00673027      int32_t result = 0;
0067302d      int32_t var_14 = 0;
00673031      int32_t var_10 = 0;
00673035      void var_c;
00673035      SmartBuffer::SmartBuffer(&var_c);
0067303e      enum DiskTransactType m_eTransactType = arg2->m_eTransactType;
00673044      int32_t result_1;
00673044      
00673044      if (m_eTransactType > ROTATE_TRANS)
006730f2          result = 0xffffff99;
00673044      else
0067304a          switch (m_eTransactType)
0067304a          {
0067305e              case ADD_OBJ_TRANS:
0067305e              {
0067305e                  result_1 = BTree::InsertEntryExec(this, *(int32_t*)((char*)arg2->vtable + 4)(&var_14));
00673063              label_673063:
00673063                  result = result_1;
00673063                  
00673067                  if (result == 0)
0067306f                      CLBlockAllocator::ClearTransaction(this->pBlkMan_);
0067305e                  break;
0067305e              }
00673098              case DELETE_LEAF_TRANS:
00673098              {
00673098                  result_1 = BTree::DeleteLeafExec(this, *(int32_t*)((char*)arg2->vtable + 0xc)());
0067309d                  goto label_673063;
00673098              }
006730a7              case DELETE_INTERNAL_TRANS:
006730a7              {
006730a7                  result_1 = BTree::DeleteInternalExec(this, *(int32_t*)((char*)arg2->vtable + 0x14)());
006730ac                  goto label_673063;
006730a7              }
006730b6              case MERGE_NODES_TRANS:
006730b6              {
006730b6                  result_1 = BTree::MergeNodesExec(this, *(int32_t*)((char*)arg2->vtable + 0x1c)());
006730bb                  goto label_673063;
006730b6              }
006730ca              case UPDATE_OBJ_TRANS:
006730ca              {
006730ca                  result_1 = BTree::UpdateObjectExec(this, *(int32_t*)((char*)arg2->vtable + 0x24)(&var_14));
006730cf                  goto label_673063;
006730ca              }
006730d9              case SPLIT_NODE_TRANS:
006730d9              {
006730d9                  result_1 = BTree::SplitNodeExec(this, *(int32_t*)((char*)arg2->vtable + 0x2c)());
006730de                  goto label_673063;
006730d9              }
006730e8              case ROTATE_TRANS:
006730e8              {
006730e8                  result_1 = BTree::RotateEntryExec(this, *(int32_t*)((char*)arg2->vtable + 0x34)());
006730ed                  goto label_673063;
006730e8              }
0067304a          }
00673078      SmartBuffer::~SmartBuffer(&var_c);
00673081      SmartBuffer::~SmartBuffer(&var_c);
0067308d      return result;
00673020  }

006730fc  uint32_t jump_table_6730fc[0x8] = 
006730fc  {
006730fc      [0x0] =  0x00673074
00673100      [0x1] =  0x00673051
00673104      [0x2] =  0x00673090
00673108      [0x3] =  0x0067309f
0067310c      [0x4] =  0x006730ae
00673110      [0x5] =  0x006730bd
00673114      [0x6] =  0x006730d1
00673118      [0x7] =  0x006730e0
0067311c  }

0067311c                                                                                      90 90 90 90                              ....

00673120  void __fastcall SmartArray<BTEntry,1>::Reset(class SmartArray<BTEntry,1>* this)

00673120  {
00673126      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0067313a      this->m_num = 0;
0067313a      
0067313d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0067313d      {
0067313f          struct BTEntry* m_data = this->m_data;
0067313f          
00673143          if (m_data != 0)
00673149              operator delete[](((char*)m_data - 4));
00673149          
00673151          this->m_data = 0;
00673153          this->m_sizeAndDeallocate = 0;
0067315b          return;
0067313d      }
0067313d      
0067315e      if (this->m_data != 0)
0067315e      {
00673160          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00673160          
00673168          if ((i_2 - 1) >= 0)
00673168          {
0067316d              int32_t var_18 = 0;
00673171              int32_t var_10_1 = 0;
00673175              int32_t var_c_1 = 0;
00673179              int32_t var_8_1 = 0;
0067317d              int32_t var_4_1 = 0;
00673181              int32_t eax_3 = ((i_2 - 1) * 0x18);
00673184              int32_t i_1 = i_2;
006731ad              int32_t i;
006731ad              
006731ad              do
006731ad              {
00673198                  void* edi_2 = (this->m_data + eax_3);
0067319a                  uint32_t id = INVALID_DID.id;
006731a7                  eax_3 -= 0x18;
006731aa                  i = i_1;
006731aa                  i_1 -= 1;
006731ab                  __builtin_memcpy(edi_2, &var_18, 0x18);
006731ad              } while (i != 1);
00673168          }
0067315e      }
00673120  }

0067318a                                8d 9b 00 00 00 00                                                            ......
006731b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006731c0  struct BTEntry* __thiscall BTree::Search(class BTree* this, struct BTMemNode* arg2, class IDClass<_tagDataID,32,0> arg3, struct BTMemNode** arg4)

006731c0  {
006731c2      struct BTMemNode** ebp = arg4;
006731c2      
006731ce      if (ebp != 0)
006731d0          *(uint32_t*)ebp = nullptr;
006731d0      
006731d3      struct BTMemNode* esi = arg2;
006731d9      int32_t result;
006731d9      
006731d9      if (esi == 0)
00673217          return result;
00673217      
006731e9      while (BTree::HasEntry(this, arg3, esi, &arg4) == 0)
006731e9      {
006731f7          if (esi->node_m.NextNode_[0] != 0)
006731f7          {
0067320b              esi = BTree::FindNode(this, esi->node_m.NextNode_[arg4], nullptr);
0067320b              
0067320f              if (esi != 0)
0067320f                  continue;
006731f7          }
006731f7          
00673211          return 0;
006731e9      }
006731e9      
0067321c      if (ebp != 0)
0067321e          *(uint32_t*)ebp = esi;
0067321e      
00673233      return &*(uint1464_t*)((char*)esi->node_m)[0xfc][arg4];
006731c0  }

00673236                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00673240  int32_t __thiscall BTree::SplitNodeTrans(class BTree* this, struct BTMemNode* arg2, int32_t arg3, struct BTMemNode* arg4)

00673240  {
0067324a      void var_1c;
0067324a      SplitNodeTransactInfo::SplitNodeTransactInfo(&var_1c);
00673260      int32_t offset_m = arg2->offset_m;
0067326a      int32_t var_8 = arg3;
0067326e      int32_t NumEntries_ = arg2->node_m.NumEntries_;
00673272      int32_t firstFree_ = this->file_info_pm->firstFree_;
0067327f      void* var_24 = &var_1c;
00673280      int32_t firstFree = firstFree_;
00673284      CLBlockAllocator::SaveTransaction(this->pBlkMan_, firstFree_);
00673290      BTree::SplitNodeExec(this, &var_1c);
006732a4      return CLBlockAllocator::ClearTransaction(this->pBlkMan_);
00673240  }

006732a7                       90 90 90 90 90 90 90 90 90                                                         .........

006732b0  int32_t __thiscall BTree::InsertEntryTrans(class BTree* this, struct BTMemNode* arg2, struct BTEntry* arg3, class Cache_Pack_t* arg4)

006732b0  {
006732bc      void var_2c;
006732bc      AddObjectTransactInfo::AddObjectTransactInfo(&var_2c);
006732c1      struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
006732d8      void var_20;
006732d8      __builtin_memcpy(&var_20, arg3, 0x18);
006732e3      int32_t firstFree_ = file_info_pm->firstFree_;
006732eb      void* var_3c = &var_2c;
006732f2      int32_t NumEntries_ = arg2->node_m.NumEntries_;
006732f6      CLBlockAllocator::SaveTransaction(this->pBlkMan_, arg2);
00673307      BTree::InsertEntryExec(this, &var_2c, arg4);
0067331d      return CLBlockAllocator::ClearTransaction(this->pBlkMan_);
006732b0  }


00673320  int32_t __thiscall BTree::Update_Data_Trans(class BTree* this, struct BTMemNode* arg2, struct BTEntry* arg3, class Cache_Pack_t* arg4)

00673320  {
00673325      struct BTMemNode* ebp = arg2;
0067333d      BTree::HasEntry(this, arg3->GID_.id, ebp, &arg2);
00673346      void var_34;
00673346      UpdateObjectTransactInfo::UpdateObjectTransactInfo(&var_34);
0067334b      struct BTMemNode* eax = arg2;
0067335b      void var_28;
0067335b      __builtin_memcpy(&var_28, arg3, 0x18);
00673363      struct BTMemNode* var_8 = eax;
0067336e      int32_t var_4 = &*(uint32_t*)((char*)*(uint1464_t*)((char*)ebp->node_m)[0xfc][0])[8][(eax * 6)];
00673372      int32_t firstFree_ = this->file_info_pm->firstFree_;
0067337f      void* var_48_1 = &var_34;
00673380      int32_t firstFree = firstFree_;
00673384      CLBlockAllocator::SaveTransaction(this->pBlkMan_, firstFree_);
00673395      BTree::UpdateObjectExec(this, &var_34, arg4);
006733ac      return CLBlockAllocator::ClearTransaction(this->pBlkMan_);
00673320  }

006733af                                               90                                                                 .

006733b0  int32_t __thiscall BTree::DescendToAdd(class BTree* this, struct BTEntry* arg2, class Cache_Pack_t* arg3)

006733b0  {
006733c7      struct BTEntry* esi = arg2;
006733ca      uint32_t id = esi->GID_.id;
006733ce      class BTree* this_1 = this;
006733d0      class BTree* this_3 = this_1;
006733d4      uint32_t id_1 = id;
006733d4      
006733d8      if (this->mem_root_node_m.node_m.NumEntries_ == 0x3d)
006733d8      {
006733dc          struct BTMemNode* eax_1 = BTree::AllocateEmptyNode(this);
006733ec          void var_6d0;
006733ec          __builtin_memcpy(&var_6d0, this, 0x6c8);
006733f7          __builtin_memcpy(this, eax_1, 0x6c8);
00673404          __builtin_memcpy(eax_1, &var_6d0, 0x6c8);
00673406          struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
0067340c          int32_t offset_m_1 = this->mem_root_node_m.offset_m;
00673416          this->mem_root_node_m.node_m.NextNode_[0] = eax_1->offset_m;
00673419          file_info_pm->btreeRoot_ = offset_m_1;
00673422          CLBlockAllocator::SaveFileInfo(this->pBlkMan_);
00673431          BTree::SplitNodeTrans(this, this, 0, eax_1);
00673436          id = id_1;
0067343a          esi = arg2;
0067343d          this_1 = this;
006733d8      }
006733d8      
00673444      if (this->mem_root_node_m.node_m.NextNode_[0] != 0)
00673444      {
00673450          while (true)
00673450          {
00673450              int32_t NumEntries__1 = this_1->mem_root_node_m.node_m.NumEntries_;
00673456              int32_t esi_3 = (NumEntries__1 - 1);
00673456              
00673457              if ((NumEntries__1 - 1) >= 0)
00673457              {
0067345c                  int32_t* eax_5 = &&*(uint32_t*)((char*)*(uint1464_t*)((char*)*(uint1716_t*)((char*)this_1->mem_root_node_m)[0x14])[0xfc][0])[4][(esi_3 * 6)];
0067345c                  
00673465                  while (id < *(uint32_t*)eax_5)
00673465                  {
00673467                      esi_3 -= 1;
00673468                      eax_5 -= 0x18;
00673468                      
0067346d                      if (esi_3 < 0)
0067346d                          break;
00673465                  }
00673457              }
00673457              
00673479              struct BTMemNode* this_4 = BTree::FindNode(this, *(uint1716_t*)((char*)this_1->mem_root_node_m)[0x14][(1 + esi_3)], nullptr);
00673485              struct BTMemNode* this_5 = this_4;
00673485              
00673489              if (this_4->node_m.NumEntries_ == 0x3d)
00673489              {
0067348f                  void var_6ec;
0067348f                  SplitNodeTransactInfo::SplitNodeTransactInfo(&var_6ec);
00673497                  int32_t NumEntries_ = this_1->mem_root_node_m.node_m.NumEntries_;
006734a3                  int32_t offset_m = this_1->mem_root_node_m.offset_m;
006734a7                  int32_t NumEntries = NumEntries_;
006734ab                  int32_t var_6d8_1 = (esi_3 + 1);
006734b6                  int32_t firstFree_ = this->file_info_pm->firstFree_;
006734c0                  void* var_70c_3 = &var_6ec;
006734c1                  CLBlockAllocator::SaveTransaction(this->pBlkMan_, NumEntries_);
006734cd                  BTree::SplitNodeExec(this, &var_6ec);
006734d8                  CLBlockAllocator::ClearTransaction(this->pBlkMan_);
006734d8                  
006734eb                  if (id_1 > &*(uint32_t*)((char*)*(uint1464_t*)((char*)*(uint1716_t*)((char*)this_1->mem_root_node_m)[0x14])[0xfc][0])[4][((esi_3 + 1) * 6)].id)
006734fb                      this_5 = BTree::FindNode(this, *(uint1716_t*)((char*)this_1->mem_root_node_m)[0x14][(esi_3 + 2)], nullptr);
006734fb                  
006734ff                  this_4 = this_5;
00673489              }
00673489              
00673508              struct BTMemNode* this_6 = this_4;
0067350c              this_1 = this_4;
0067350c              
0067350e              if (this_4->node_m.NextNode_[0] == 0)
0067350e                  break;
0067350e              
0067344c              id = id_1;
00673450          }
00673450          
00673514          esi = arg2;
00673444      }
00673444      
0067351a      esi->Offset_ = this_1->mem_root_node_m.offset_m;
0067352b      uint32_t eax_12;
0067352b      
0067352b      if (SmartBuffer::GetSize(&arg3->m_buff) <= 4)
0067353d          eax_12 = 0;
0067352b      else
00673538          eax_12 = (SmartBuffer::GetSize(&arg3->m_buff) - 4);
00673538      
00673544      struct BTMemNode* this_2 = this_1;
00673547      esi->size_ = eax_12;
00673555      return BTree::InsertEntryTrans(this, this_2, esi, arg3);
006733b0  }

00673558                                                                          90 90 90 90 90 90 90 90                          ........

00673560  int32_t __thiscall BTree::MergeNodesTrans(class BTree* this, struct BTMemNode* arg2, struct BTMemNode* arg3, struct BTMemNode* arg4, int32_t arg5)

00673560  {
0067356a      void var_20;
0067356a      MergeNodesTransactInfo::MergeNodesTransactInfo(&var_20);
00673580      int32_t offset_m = arg2->offset_m;
0067358b      int32_t offset_m_1 = arg3->offset_m;
00673596      int32_t offset_m_2 = arg4->offset_m;
0067359e      void* var_28 = &var_20;
006735a5      int32_t var_8 = arg5;
006735a9      int32_t NumEntries_ = arg2->node_m.NumEntries_;
006735ad      int32_t result = CLBlockAllocator::SaveTransaction(this->pBlkMan_, arg5);
006735ad      
006735b4      if (result != 0)
006735d5          return result;
006735d5      
006735bd      BTree::MergeNodesExec(this, &var_20);
006735cc      return CLBlockAllocator::ClearTransaction(this->pBlkMan_);
00673560  }

006735d8                                                                          90 90 90 90 90 90 90 90                          ........

006735e0  int32_t __thiscall BTree::DeleteLeafTrans(class BTree* this, struct BTMemNode* arg2, int32_t arg3)

006735e0  {
006735ea      void var_18;
006735ea      DeleteLeafTransactInfo::DeleteLeafTransactInfo(&var_18);
006735fa      class DiskTransactInfo* id = &*(uint32_t*)((char*)*(uint1464_t*)((char*)arg2->node_m)[0xfc][0])[4][(arg3 * 6)].id;
00673604      class DiskTransactInfo* id_1 = id;
0067360c      int32_t offset_m = arg2->offset_m;
00673616      void* var_20 = &var_18;
00673617      int32_t var_4 = arg3;
0067361b      CLBlockAllocator::SaveTransaction(this->pBlkMan_, id);
00673627      BTree::DeleteLeafExec(this, &var_18);
0067363b      return CLBlockAllocator::ClearTransaction(this->pBlkMan_);
006735e0  }

0067363e                                                                                            90 90                                ..

00673640  int32_t __thiscall BTree::DeleteInternalTrans(class BTree* this, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3, int32_t arg4, int32_t arg5, int32_t arg6, int32_t arg7)

00673640  {
0067364a      void var_24;
0067364a      DeleteInternalTransactInfo::DeleteInternalTransactInfo(&var_24);
0067365b      class IDClass<_tagDataID,32,0> var_18 = arg2;
00673663      class IDClass<_tagDataID,32,0> var_14 = arg3;
0067366b      int32_t var_c = arg5;
0067366f      int32_t var_10 = arg4;
0067367b      int32_t var_8 = arg6;
00673685      void* var_2c = &var_24;
00673686      int32_t var_4 = arg7;
0067368a      CLBlockAllocator::SaveTransaction(this->pBlkMan_, arg7);
00673696      BTree::DeleteInternalExec(this, &var_24);
006736aa      return CLBlockAllocator::ClearTransaction(this->pBlkMan_);
00673640  }

006736ad                                         90 90 90                                                               ...

006736b0  int32_t __thiscall BTree::RotateEntryTrans(class BTree* this, struct BTMemNode* arg2, int32_t arg3, int32_t arg4, int32_t arg5, uint8_t arg6)

006736b0  {
006736ba      void var_24;
006736ba      RotateEntryTransactInfo::RotateEntryTransactInfo(&var_24);
006736c6      int32_t offset_m = arg2->offset_m;
006736dc      int32_t id = &*(uint32_t*)((char*)*(uint1464_t*)((char*)arg2->node_m)[0xfc][0])[4][(arg3 * 6)].id;
006736e0      int32_t ecx_2;
006736e0      ecx_2 = arg6;
006736e4      int32_t var_c = arg4;
006736e8      int32_t var_10 = arg3;
006736f4      char var_4 = ecx_2;
006736fe      void* var_2c = &var_24;
006736ff      int32_t var_8 = arg5;
00673703      CLBlockAllocator::SaveTransaction(this->pBlkMan_, arg4);
0067370f      BTree::RotateEntryExec(this, &var_24);
00673723      return CLBlockAllocator::ClearTransaction(this->pBlkMan_);
006736b0  }

00673726                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00673730  uint8_t __thiscall SmartArray<BTEntry,1>::grow(class SmartArray<BTEntry,1>* this, uint32_t arg2)

00673730  {
00673738      uint32_t esi = arg2;
0067373e      uint32_t m_data;
0067373e      
0067373e      if (esi >= this->m_num)
0067373e      {
0067374e          if (esi <= (this->m_sizeAndDeallocate & 0x7fffffff))
0067374e          {
006737ef              m_data = 1;
006737f2              return 1;
0067374e          }
0067374e          
00673756          if (esi == 0)
00673756          {
00673758              SmartArray<BTEntry,1>::Reset(this);
0067375f              int32_t eax_1;
0067375f              eax_1 = 1;
00673762              return 1;
00673756          }
00673756          
00673770          m_data = operator new[](((esi * 0x18) + 4));
00673770          
0067377a          if (m_data != 0)
0067377a          {
00673782              void* ebp_1 = (m_data + 4);
00673788              *(uint32_t*)m_data = esi;
0067378a              `vector constructor iterator'(ebp_1, 0x18, esi, BTEntry::`default constructor closure');
0067378a              
00673791              if (ebp_1 != 0)
00673791              {
00673796                  if (this->m_data != 0)
00673796                  {
00673798                      uint32_t m_num = this->m_num;
00673798                      
0067379c                      if ((m_num - 1) >= 0)
0067379c                      {
006737a1                          void* eax_3 = ((m_num - 1) * 0x18);
006737a4                          int32_t edx_2 = m_num;
006737ba                          int32_t i;
006737ba                          
006737ba                          do
006737ba                          {
006737aa                              int32_t esi_2 = (this->m_data + eax_3);
006737ac                              void* edi_1 = ((char*)eax_3 + ebp_1);
006737b4                              eax_3 -= 0x18;
006737b7                              i = edx_2;
006737b7                              edx_2 -= 1;
006737b8                              __builtin_memcpy(edi_1, esi_2, 0x18);
006737ba                          } while (i != 1);
006737bc                          esi = arg2;
0067379c                      }
0067379c                      
006737ce                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
006737ce                      {
006737d0                          m_data = this->m_data;
006737d0                          
006737d4                          if (m_data != 0)
006737da                              operator delete[]((m_data - 4));
006737ce                      }
00673796                  }
00673796                  
006737e8                  this->m_data = ebp_1;
006737ea                  this->m_sizeAndDeallocate = (esi | 0x80000000);
006737ef                  m_data = 1;
006737f2                  return 1;
00673791              }
0067377a          }
0067373e      }
0067373e      
006737f7      m_data = 0;
006737fa      return 0;
00673730  }

006737fd                                                                                         90 90 90                               ...

00673800  struct BTEntry* __thiscall BTree::Lookup(class BTree* this, class IDClass<_tagDataID,32,0> arg2, struct BTMemNode** arg3)

00673800  {
00673814      if ((INVALID_DID.id != arg2 && this->mem_root_node_m.node_m.NumEntries_ != 0))
00673822          return BTree::Search(this, this, arg2, arg3);
00673822      
00673827      return 0;
00673800  }

0067382a                                90 90 90 90 90 90                                                            ......

00673830  int32_t __thiscall BTree::DescendToDelete(class BTree* this, struct BTMemNode* arg2, class IDClass<_tagDataID,32,0> arg3, struct BTMemNode** arg4, int32_t* arg5)

00673830  {
00673835      struct BTMemNode* i_1 = arg2;
00673842      arg2 = nullptr;
00673846      struct BTMemNode* var_4 = nullptr;
0067384a      int32_t var_8 = 0xffffffff;
0067384e      int32_t result;
0067384e      
0067384e      if (i_1 == 0)
0067399e          return result;
00673951      struct BTMemNode* i;
00673951      
00673951      do
00673951      {
0067386a          if (BTree::HasEntry(this, arg3, i_1, &var_8) != 0)
0067386a          {
00673968              int32_t eax_8 = var_8;
00673972              *(uint32_t*)arg4 = i_1;
00673975              *(uint32_t*)arg5 = eax_8;
0067397d              return 0;
0067386a          }
0067386a          
00673875          if (i_1->node_m.NextNode_[0] == 0)
00673875          {
00673989              *(uint32_t*)arg4 = nullptr;
0067398f              *(uint32_t*)arg5 = 0xffffffff;
00673995              return 0xffffffff;
00673875          }
00673875          
0067387b          int32_t edi_1 = var_8;
0067388d          i = BTree::FindNode(this, i_1->node_m.NextNode_[edi_1], nullptr);
0067388d          
00673896          if (i->node_m.NumEntries_ < 0x1f)
00673896          {
0067389e              struct BTMemNode* edx_2;
0067389e              
0067389e              if (edi_1 <= 0)
0067389e              {
006738d4                  edx_2 = arg2;
006738d8              label_6738d8:
006738de                  struct BTMemNode* eax_5;
006738de                  
006738de                  if (i_1->node_m.NumEntries_ <= edi_1)
006738de                  {
00673912                      eax_5 = var_4;
0067391c                  label_67391c:
0067391c                      
00673926                      if ((eax_5 != 0 && i_1->node_m.NumEntries_ > edi_1))
0067392e                          BTree::MergeNodesTrans(this, i_1, i, eax_5, edi_1);
00673926                      else if ((edx_2 != 0 && edi_1 > 0))
0067393b                      {
00673944                          BTree::MergeNodesTrans(this, i_1, edx_2, i, (edi_1 - 1));
00673949                          i = arg2;
0067393b                      }
006738de                  }
006738de                  else
006738de                  {
006738e9                      eax_5 = BTree::FindNode(this, i_1->node_m[(1 + edi_1)], nullptr);
006738ee                      int32_t NumEntries__1 = eax_5->node_m.NumEntries_;
006738f7                      var_4 = eax_5;
006738f7                      
006738fb                      if (NumEntries__1 < 0x1f)
006738fb                      {
00673918                          edx_2 = arg2;
00673918                          goto label_67391c;
006738fb                      }
006738fb                      
0067390b                      BTree::RotateEntryTrans(this, i_1, edi_1, i->node_m.NumEntries_, NumEntries__1, 0);
006738de                  }
0067389e              }
0067389e              else
0067389e              {
006738ae                  edx_2 = BTree::FindNode(this, &i_1->offset_m[edi_1], nullptr);
006738b0                  int32_t NumEntries_ = edx_2->node_m.NumEntries_;
006738b9                  arg2 = edx_2;
006738b9                  
006738bd                  if (NumEntries_ < 0x1f)
006738bd                      goto label_6738d8;
006738bd                  
006738cd                  BTree::RotateEntryTrans(this, i_1, edi_1, i->node_m.NumEntries_, NumEntries_, 1);
0067389e              }
00673896          }
00673896          
0067394f          i_1 = i;
00673951      } while (i != 0);
00673961      return 0xffffffff;
00673830  }

006739a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006739b0  int32_t __thiscall BTree::Delete(class BTree* this, class IDClass<_tagDataID,32,0> arg2, struct BTMemNode* arg3)

006739b0  {
006739b3      struct BTMemNode* edx = arg3;
006739c2      int32_t var_8 = 0xffffffff;
006739c6      int32_t var_10 = 0xffffffff;
006739dc      struct BTMemNode* var_4 = nullptr;
006739e0      struct BTMemNode* var_c = nullptr;
006739e4      int32_t result_1;
006739e4      class IDClass<_tagDataID,32,0> edx_1;
006739e4      result_1 = BTree::DescendToDelete(this, edx, arg2, &var_4, &var_8);
006739e9      int32_t result = result_1;
006739e9      
006739ed      if (result == 0)
006739ed      {
006739f3          struct BTMemNode* edi = var_4;
006739f3          
006739fa          if (edi->node_m.NextNode_[0] == 0)
00673a12              return BTree::DeleteLeafTrans(this, edi, var_8);
00673a12          
00673a15          int32_t ebx_1 = var_8;
00673a21          struct BTMemNode* eax_2 = BTree::FindNode(this, edi->node_m.NextNode_[ebx_1], nullptr);
00673a28          bool cond:0_1 = eax_2->node_m.NumEntries_ < 0x1f;
00673a2f          arg3 = eax_2;
00673a2f          
00673a35          if (!(cond:0_1))
00673a35          {
00673a42              uint32_t id = BTree::FindMax(this, &arg3, eax_2)->id;
00673a52              arg3 = id;
00673a56              BTree::DescendToDelete(this, eax_2, id, &var_c, &var_10);
00673a85              return BTree::DeleteInternalTrans(this, arg2, arg3, edi->offset_m, var_c->offset_m, ebx_1, var_10);
00673a35          }
00673a35          
00673a8f          struct BTMemNode* eax_8 = BTree::FindNode(this, edi->node_m[(1 + ebx_1)], nullptr);
00673a8f          
00673a9d          if (eax_8->node_m.NumEntries_ >= 0x1f)
00673a9d          {
00673aac              uint32_t id_1 = BTree::FindMin(this, &arg3, eax_8)->id;
00673abc              arg3 = id_1;
00673ac0              BTree::DescendToDelete(this, eax_8, id_1, &var_c, &var_10);
00673aef              return BTree::DeleteInternalTrans(this, arg2, arg3, edi->offset_m, var_c->offset_m, ebx_1, var_10);
00673a9d          }
00673a9d          
00673af3          struct BTMemNode* ebx_2 = arg3;
00673b01          result = BTree::MergeNodesTrans(this, edi, ebx_2, eax_8, ebx_1);
00673b01          
00673b05          if (result == 0)
00673b1b              return BTree::Delete(this, arg2, ebx_2);
006739ed      }
006739ed      else if (this->file_info_pm->use_lru_fm != 0)
00673b29      {
00673b31          class IDClass<_tagDataID,32,0> var_24_10 = arg2;
00673b32          LRU_List::Mark_Deleted(this->lru_man_pm, edx_1);
00673b29      }
00673b29      
00673b40      return result;
006739b0  }

00673b43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00673b50  uint8_t __thiscall BTree::Remove(class BTree* this, class IDClass<_tagDataID,32,0> arg2)

00673b50  {
00673b56      int32_t eax = BTree::Delete(this, arg2, this);
00673b5b      char eax_1 = ((int8_t)-(eax));
00673b61      return ((eax_1 - eax_1) + 1);
00673b50  }

00673b64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00673b70  uint8_t __thiscall SmartArray<BTEntry,1>::AddToEnd(class SmartArray<BTEntry,1>* this, struct BTEntry const* arg2)

00673b70  {
00673b79      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00673b79      
00673b80      if (this->m_num >= eax_1)
00673b80      {
00673b8e          uint8_t result = SmartArray<BTEntry,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
00673b8e          
00673b95          if (result == 0)
00673b98              return result;
00673b80      }
00673b80      
00673bb1      __builtin_memcpy(&this->m_data[this->m_num], arg2, 0x18);
00673bb8      this->m_num += 1;
00673bbc      uint32_t eax_7;
00673bbc      eax_7 = 1;
00673bbf      return 1;
00673b70  }

00673bc2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00673bd0  uint8_t __fastcall BTree::Try_Delete_Oldest(class BTree* this)

00673bd0  {
00673bd0      class BTree* __return = this;
00673bd3      class BTree* this_1 = this;
00673bdb      this = this_1->file_info_pm->use_lru_fm;
00673be2      struct DiskFileInfo_t* id;
00673be2      
00673be2      if (this != 0)
00673be2      {
00673bf4          id = LRU_List::Get_Oldest(this_1->lru_man_pm, &__return)->id;
00673bf4          
00673bfc          if (INVALID_DID.id != id)
00673bfc          {
00673c02              int32_t eax_1 = BTree::Delete(this_1, id, this_1);
00673c07              char eax_2 = ((int8_t)-(eax_1));
00673c10              return ((eax_2 - eax_2) + 1);
00673bfc          }
00673be2      }
00673be2      
00673c12      id = 0;
00673c16      return 0;
00673bd0  }

00673c17                                                                       90 90 90 90 90 90 90 90 90                         .........

00673c20  void __thiscall BTree::Build_Id_List(class BTree* this, class SmartArray<BTEntry,1>* arg2, struct BTMemNode* arg3, class IDClass<_tagDataID,32,0> arg4, class IDClass<_tagDataID,32,0> arg5)

00673c20  {
00673c28      class IDClass<_tagDataID,32,0> ebx = arg4;
00673c28      
00673c32      if (ebx <= arg5)
00673c32      {
00673c3e          int32_t NumEntries_ = arg3->node_m.NumEntries_;
00673c3e          
00673c48          if (NumEntries_ <= 0x3d)
00673c48          {
00673c55              arg4 = 0;
00673c5d              BTree::HasEntry(this, ebx, arg3, &arg4);
00673c62              class IDClass<_tagDataID,32,0> eax_1 = arg4;
00673c68              class IDClass<_tagDataID,32,0> edi_1 = eax_1;
00673c68              
00673c6a              if (eax_1 <= NumEntries_)
00673c6a              {
00673c77                  void* eax_2 = &*(uint1464_t*)((char*)arg3->node_m)[0xfc][eax_1];
00673c7e                  arg4 = &arg3->node_m.NextNode_[eax_1];
00673c82                  void* var_8_1 = eax_2;
00673c82                  
00673cfe                  do
00673cfe                  {
00673c88                      class IDClass<_tagDataID,32,0> ebp_2 = ebx;
00673c88                      
00673c8a                      if (edi_1 < NumEntries_)
00673c8a                      {
00673c8c                          ebp_2 = *(uint32_t*)((char*)eax_2 + 4);
00673c8c                          
00673c97                          if ((ebp_2 >= ebx && ebp_2 <= arg5))
00673c9e                              SmartArray<BTEntry,1>::AddToEnd(arg2, eax_2);
00673c8a                      }
00673c8a                      
00673cac                      if (arg3->node_m.NextNode_[0] != 0)
00673cd0                          BTree::Build_Id_List(this, arg2, BTree::FindNode(this, *(uint32_t*)arg4, nullptr), ebx, arg5);
00673cd0                      
00673cd9                      if (ebp_2 > arg5)
00673cd9                          break;
00673cd9                      
00673cea                      arg4 += 4;
00673cee                      NumEntries_ = arg3->node_m.NumEntries_;
00673cf4                      edi_1 += 1;
00673cf5                      eax_2 = ((char*)var_8_1 + 0x18);
00673cfa                      var_8_1 = eax_2;
00673cfe                  } while (edi_1 <= NumEntries_);
00673c6a              }
00673c48          }
00673c32      }
00673c20  }

00673d0a                                90 90 90 90 90 90                                                            ......

00673d10  void __thiscall BTree::Build_Id_List(class BTree* this, class SmartArray<BTEntry,1>* arg2, struct BTMemNode* arg3)

00673d10  {
00673d14      struct BTMemNode* ebx = arg3;
00673d18      int32_t NumEntries_ = ebx->node_m.NumEntries_;
00673d22      class BTree* this_1 = this;
00673d24      class BTree* this_2 = this_1;
00673d24      
00673d28      if (NumEntries_ <= 0x3d)
00673d28      {
00673d30          int32_t offset_m = ebx->offset_m;
00673d34          class SmartArray<BTEntry,1>* ebp_1 = arg2;
00673d3d          arg3 = nullptr;
00673d3d          
00673d45          if (NumEntries_ > 0)
00673d45          {
00673d4d              arg2 = &ebx->node_m.Entry_;
00673d4d              
00673db3              do
00673db3              {
00673d57                  int32_t eax_1 = (ebp_1->m_sizeAndDeallocate & 0x7fffffff);
00673d5e                  uint8_t eax_4;
00673d5e                  
00673d5e                  if (ebp_1->m_num >= eax_1)
00673d6c                      eax_4 = SmartArray<BTEntry,1>::grow(ebp_1, SmartArray<unsigned long,1>::get_new_size(ebp_1, (eax_1 + 1)));
00673d6c                  
00673d73                  if ((ebp_1->m_num < eax_1 || eax_4 != 0))
00673d73                  {
00673d8a                      __builtin_memcpy(&ebp_1->m_data[ebp_1->m_num], arg2, 0x18);
00673d8f                      this_1 = this_2;
00673d94                      ebp_1->m_num += 1;
00673d73                  }
00673d73                  
00673dab                  arg3 = (&arg3->time_stamp_lm + 1);
00673daf                  arg2 = &arg2[2];
00673db3              } while ((&arg3->time_stamp_lm + 1) < ebx->node_m.NumEntries_);
00673d45          }
00673d45          
00673dba          if (ebx->node_m.NextNode_[0] != 0)
00673dba          {
00673dc4              arg3 = nullptr;
00673dc4              
00673dcc              if (ebx->node_m.NumEntries_ >= 0)
00673dcc              {
00673dce                  int32_t* edi_2 = 0x14;
00673dce                  
00673e12                  do
00673e12                  {
00673de4                      BTree::Build_Id_List(this_1, ebp_1, BTree::FindNode(this_1, *(uint32_t*)((char*)edi_2 + ebx), nullptr));
00673de4                      
00673df0                      if (ebx->offset_m != offset_m)
00673dfc                          ebx = BTree::FindNode(this_1, offset_m, nullptr);
00673dfc                      
00673e09                      edi_2 = &edi_2[1];
00673e0e                      arg3 = (&arg3->time_stamp_lm + 1);
00673e12                  } while ((&arg3->time_stamp_lm + 1) <= ebx->node_m.NumEntries_);
00673dcc              }
00673dba          }
00673d28      }
00673d10  }

00673e1e                                                                                            90 90                                ..

00673e20  uint8_t __thiscall BTree::Get_Id_List(class BTree* this, class SmartArray<BTEntry,1>* arg2)

00673e20  {
00673e2a      if (this->mem_root_node_m.node_m.NumEntries_ == 0)
00673e39          return 0;
00673e39      
00673e32      BTree::Build_Id_List(this, arg2, this);
00673e37      return 1;
00673e20  }

00673e3c                                                                                      90 90 90 90                              ....

00673e40  uint8_t __thiscall BTree::Get_Id_List_Range(class BTree* this, class SmartArray<BTEntry,1>* arg2, class IDClass<_tagDataID,32,0> arg3, class IDClass<_tagDataID,32,0> arg4)

00673e40  {
00673e45      arg2->m_num = 0;
00673e45      
00673e54      if (this->mem_root_node_m.node_m.NumEntries_ != 0)
00673e62          BTree::Build_Id_List(this, arg2, this, arg3, arg4);
00673e62      
00673e6c      uint32_t eax_2;
00673e6c      eax_2 = arg2->m_num != 0;
00673e70      return eax_2;
00673e40  }

00673e73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00673e80  void __fastcall CLBlockAllocator::CLBlockAllocator(class CLBlockAllocator* this)

00673e80  {
00673e86      this->file_info_mp = 0;
00673e8c      DiskDev::DiskDev(&this->file_man_m);
00673e91      this->expandable_mf = 0;
00673e80  }

00673e99                                                                             90 90 90 90 90 90 90                           .......

00673ea0  void __fastcall CLBlockAllocator::~CLBlockAllocator(class CLBlockAllocator* this)

00673ea0  {
00673ea3      /* tailcall */
00673ea3      return DiskDev::~DiskDev(&this->file_man_m);
00673ea0  }

00673ea8                          90 90 90 90 90 90 90 90                                                          ........

00673eb0  int32_t __fastcall CLBlockAllocator::Close_Data_File(class CLBlockAllocator* this)

00673eb0  {
00673eb6      int32_t result = DiskDev::Close(&this->file_man_m);
00673ebb      this->file_info_mp = 0;
00673ec2      return result;
00673eb0  }

00673ec3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00673ed0  int32_t __fastcall CLBlockAllocator::SaveFileInfo(class CLBlockAllocator* this)

00673ed0  {
00673ee2      return DiskDev::SyncWrite(&this->file_man_m, this->file_info_mp, 0x50, 0x140);
00673ed0  }

00673ee3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00673ef0  int32_t __thiscall CLBlockAllocator::StoreDataRollback(class CLBlockAllocator* this, uint32_t arg2, int32_t arg3)

00673ef0  {
00673ef0      class CLBlockAllocator* var_4 = this;
00673ef4      int32_t esi = arg3;
00673f08      int32_t ebx = 1;
00673f0d      int32_t result = DiskDev::SyncRead(&this->file_man_m, &var_4, 4, esi);
00673f12      class CLBlockAllocator* firstFree_ = var_4;
00673f12      
00673f18      if (firstFree_ >= 0)
00673f18      {
00673f1a          ebx = 1;
00673f1a          
00673f68          do
00673f68          {
00673f22              if (result != 0)
00673f9f                  return result;
00673f9f              
00673f26              if (firstFree_ == 0)
00673f26              {
00673f2b                  firstFree_ = this->file_info_mp->firstFree_;
00673f2e                  ebx -= 1;
00673f26              }
00673f26              
00673f3c              var_4 = (firstFree_ | 0x80000000);
00673f43              DiskDev::SyncWrite(&this->file_man_m, &var_4, 4, esi);
00673f4c              esi = (var_4 & 0x7fffffff);
00673f5c              ebx += 1;
00673f5d              result = DiskDev::SyncRead(&this->file_man_m, &var_4, 4, esi);
00673f62              firstFree_ = var_4;
00673f68          } while (firstFree_ >= 0);
00673f18      }
00673f18      
00673f6c      if (result == 0)
00673f6c      {
00673f6e          struct DiskFileInfo_t* file_info_mp_1 = this->file_info_mp;
00673f6e          
00673f78          if (arg3 != file_info_mp_1->firstFree_)
00673f78          {
00673f7a              file_info_mp_1->firstFree_ = arg3;
00673f7d              struct DiskFileInfo_t* file_info_mp = this->file_info_mp;
00673f8a              file_info_mp->iFreeBlocks_ += ebx;
00673f95              return DiskDev::SyncWrite(&this->file_man_m, this->file_info_mp, 0x50, 0x140);
00673f78          }
00673f6c      }
00673f6c      
00673f9f      return result;
00673ef0  }

00673fa2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00673fb0  int32_t __thiscall CLBlockAllocator::DeleteBlocks(class CLBlockAllocator* this, int32_t arg2, int32_t arg3, int32_t arg4, uint8_t arg5)

00673fb0  {
00673fb0      class CLBlockAllocator* this_1 = this;
00673fb2      int32_t i_1 = arg2;
00673fb7      int32_t result = 0;
00673fc1      int32_t i_2 = i_1;
00673fc3      arg2 = i_1;
00673fc7      int32_t var_4 = 0;
00673fc7      
00673fcb      if (i_1 != 0)
00673fcb      {
00673fcd          int32_t i = i_1;
00673fcd          
00674039          do
00674039          {
00673fd2              if (result != 0)
00674090                  return result;
00674090              
00673fdf              i_2 = i;
00673fe7              result = DiskDev::SyncRead(&this->file_man_m, &arg2, 4, i);
00673fee              i = arg2;
00673fee              
00673ff2              if (result == 0)
00673ff2              {
00673ff4                  result = arg5;
00673ff4                  
00673ffe                  if ((result != 0 || i >= 0))
00673ffe                  {
0067400e                      arg2 = (i | 0x80000000);
0067401b                      result = DiskDev::SyncWrite(&this->file_man_m, &arg2, 4, i_2);
00674028                      i = (arg2 & 0x7fffffff);
0067402f                      arg2 = i;
00674033                      var_4 += 1;
00673ffe                  }
00673ffe                  else
00674000                      result = 0xffffff9b;
00673ff2              }
00674039          } while (i != 0);
00673fcb      }
00673fcb      
0067403d      if ((i_1 == 0 || result == 0))
0067403d      {
00674056          arg2 = (i_1 | 0x80000000);
0067405a          result = DiskDev::SyncWrite(&this->file_man_m, &arg2, 4, arg3);
0067405a          
00674061          if (result == 0)
00674061          {
00674063              this->file_info_mp->finalFree_ = i_2;
00674071              this->file_info_mp->iFreeBlocks_ = (var_4 + arg4);
00674086              return DiskDev::SyncWrite(&this->file_man_m, this->file_info_mp, 0x50, 0x140);
00674061          }
0067403d      }
0067403d      
00674090      return result;
00673fb0  }

00674093                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006740a0  int32_t __thiscall CLBlockAllocator::ExpandFile(class CLBlockAllocator* this, int32_t arg2)

006740a0  {
006740ab      struct DiskFileInfo_t* file_info_mp = this->file_info_mp;
006740ae      int32_t iBlockSize_ = file_info_mp->iBlockSize_;
006740b2      int32_t temp0 = (((int64_t)arg2) / iBlockSize_);
006740c4      file_info_mp->iFreeBlocks_ += temp0;
006740c7      void* s = operator new[](iBlockSize_);
006740e0      __builtin_memset(__builtin_memset(s, 0, ((iBlockSize_ >> 2) << 2)), 0, (iBlockSize_ & 3));
006740e5      uint32_t fileSize_ = this->file_info_mp->fileSize_;
006740f1      uint32_t fileSize = fileSize_;
006740f3      arg2 = 0;
006740fb      class DiskDev* ebx_1;
006740fb      
006740fb      if (temp0 <= 0)
006740fb      {
0067413e      label_67413e:
0067413e          ebx_1 = &this->file_man_m;
00674144          *(uint32_t*)s = 0x80000000;
0067414a          DiskDev::SyncWrite(ebx_1, s, 4, fileSize_);
00674153          void* eax_9 = *(uint32_t*)this;
00674158          int32_t ecx_9 = *(uint32_t*)((char*)eax_9 + 0x18);
00674161          arg2 = (*(uint32_t*)((char*)eax_9 + 8) | 0x80000000);
00674165          *(uint32_t*)((char*)eax_9 + 8) = fileSize;
0067416c          this->file_info_mp->finalFree_ = fileSize_;
0067417b          DiskDev::SyncWrite(ebx_1, &arg2, 4, ecx_9);
006740fb      }
006740fb      else
006740fb      {
0067410c          while (true)
0067410c          {
0067410c              fileSize_ = fileSize;
0067410f              fileSize += iBlockSize_;
0067411b              *(uint32_t*)s = (fileSize | 0x80000000);
0067411b              
00674124              if (DiskDev::SyncWrite(&this->file_man_m, s, iBlockSize_, fileSize_) != 0)
00674124              {
00674182                  ebx_1 = &this->file_man_m;
00674182                  break;
00674124              }
00674124              
0067412f              bool cond:1_1 = (arg2 + 1) < temp0;
00674131              arg2 += 1;
00674131              
00674135              if (!(cond:1_1))
00674135                  goto label_67413e;
0067410c          }
006740fb      }
006740fb      
00674187      operator delete[](s);
006741ab      return DiskDev::SyncWrite(ebx_1, this->file_info_mp, 0x50, 0x140);
006740a0  }

006741ae                                            90 90                                                                ..

006741b0  int32_t __thiscall CLBlockAllocator::Store_Data(class CLBlockAllocator* this, class Cache_Pack_t* arg2, int32_t arg3)

006741b0  {
006741b9      int32_t ebp = arg3;
006741c6      int32_t var_8 = ebp;
006741d2      int32_t esi_1;
006741d2      
006741d2      if (SmartBuffer::GetSize(&arg2->m_buff) <= 4)
006741e2          esi_1 = 0;
006741d2      else
006741dd          esi_1 = (SmartBuffer::GetSize(&arg2->m_buff) - 4);
006741dd      
006741ea      SmartBuffer::ReconfigureAllocation(&arg2->m_buff, 4, 1);
006741f6      arg2 = SmartBuffer::GetBuffer(&arg2->m_buff);
006741fc      int32_t iBlockSize_ = this->file_info_mp->iBlockSize_;
00674206      int32_t iBlockSize = iBlockSize_;
00674213      int32_t var_10 = (iBlockSize_ - 4);
00674217      int32_t var_14 = 1;
0067421f      int32_t i = DiskDev::SyncRead(&this->file_man_m, &arg3, 4, ebp);
00674228      int32_t ebp_2 = (arg3 & 0x7fffffff);
00674230      arg3 = ebp_2;
00674230      
00674234      if (esi_1 > 0)
00674234      {
00674242          while (i == 0)
00674242          {
0067424c              int32_t m_dwOffset = arg2->m_dwOffset;
0067424c              
00674256              if (esi_1 <= var_10)
00674256              {
00674280                  struct DiskFileInfo_t* file_info_mp = this->file_info_mp;
00674289                  iBlockSize = (esi_1 + 4);
0067428d                  file_info_mp->iFreeBlocks_ -= var_14;
00674290                  this->file_info_mp->firstFree_ = arg3;
006742a5                  ebp_2 = 0;
006742a7                  var_10 = esi_1;
006742ab                  DiskDev::SyncWrite(&this->file_man_m, this->file_info_mp, 0x50, 0x140);
00674256              }
00674256              else
00674256              {
00674262                  DiskDev::SyncRead(&this->file_man_m, &arg3, 4, ebp_2);
00674276                  arg3 &= 0x7fffffff;
0067427a                  var_14 += 1;
00674256              }
00674256              
006742b8              int32_t* eax_8 = arg2;
006742c1              *(uint32_t*)eax_8 = ebp_2;
006742c3              i = DiskDev::SyncWrite(&this->file_man_m, eax_8, iBlockSize, var_8);
006742c3              
006742ca              if (i == 0)
006742ca              {
006742cc                  int32_t* ecx_13 = arg2;
006742d4                  *(uint32_t*)ecx_13 = m_dwOffset;
006742da                  esi_1 -= var_10;
006742de                  var_8 = ebp_2;
006742e2                  arg2 = ((char*)ecx_13 + var_10);
006742ca              }
006742ca              
006742e8              if (esi_1 <= 0)
006742e8                  break;
006742e8              
0067423c              ebp_2 = arg3;
00674242          }
00674234      }
00674234      
006742f5      return i;
006741b0  }

006742f8                                                                          90 90 90 90 90 90 90 90                          ........

00674300  int32_t __thiscall CLBlockAllocator::Update(class CLBlockAllocator* this, class Cache_Pack_t* arg2, int32_t arg3)

00674300  {
00674314      int32_t i = 0;
00674318      int32_t firstFree = arg3;
0067431c      int32_t firstFree_ = 0;
0067431c      
00674328      if (SmartBuffer::GetSize(&arg2->m_buff) <= 4)
0067433a          arg2 = nullptr;
00674328      else
00674334          arg2 = (SmartBuffer::GetSize(&arg2->m_buff) - 4);
00674334      
00674344      SmartBuffer::ReconfigureAllocation(&arg2->m_buff, 4, 1);
00674352      class Cache_Pack_t* edi_2 = arg2;
00674356      uint8_t* ebx = SmartBuffer::GetBuffer(&arg2->m_buff);
00674358      int32_t iBlockSize_ = this->file_info_mp->iBlockSize_;
0067435b      int32_t iBlockSize = iBlockSize_;
00674362      int32_t var_c = (iBlockSize_ - 4);
00674366      int32_t eax_5;
00674366      eax_5 = 0;
0067436a      arg3 = 0;
0067436a      
0067436e      if (edi_2 > 0)
0067436e      {
00674382          while (i == 0)
00674382          {
0067438c              int32_t edx_1 = *(uint32_t*)ebx;
0067438c              
00674392              if (edi_2 <= var_c)
00674392              {
00674487                  if (eax_5 == 0)
00674487                  {
00674498                      DiskDev::SyncRead(&this->file_man_m, &firstFree_, 4, firstFree);
0067449d                      int32_t firstFree_1 = firstFree_;
0067449d                      
006744a3                      if (firstFree_1 != 0)
006744a3                      {
006744a5                          struct DiskFileInfo_t* file_info_mp_5 = this->file_info_mp;
006744b4                          CLBlockAllocator::DeleteBlocks(this, firstFree_1, file_info_mp_5->finalFree_, file_info_mp_5->iFreeBlocks_, 0);
006744a3                      }
00674487                  }
00674487                  
006744bc                  firstFree_ = 0;
006744c4                  var_c = edi_2;
006744c8                  iBlockSize = &edi_2->m_iVersion;
00674392              }
00674392              else
00674392              {
0067439a                  int32_t i_1;
0067439a                  
0067439a                  if (eax_5 == 0)
0067439a                  {
006743e7                      DiskDev::SyncRead(&this->file_man_m, &firstFree_, 4, firstFree);
006743e7                      
006743f2                      if (firstFree_ == 0)
006743f2                      {
006743f4                          struct DiskFileInfo_t* file_info_mp_6 = this->file_info_mp;
006743f6                          i_1 = 0;
0067440b                          arg3 = 1;
00674410                          DiskDev::SyncRead(&this->file_man_m, &i_1, 4, file_info_mp_6->firstFree_);
00674419                          struct DiskFileInfo_t* file_info_mp_3 = this->file_info_mp;
0067441b                          int32_t i_3 = (i_1 & 0x7fffffff);
00674421                          i_1 = i_3;
00674428                          firstFree_ = file_info_mp_3->firstFree_;
0067442c                          file_info_mp_3->firstFree_ = i_3;
0067442f                          struct DiskFileInfo_t* file_info_mp_4 = this->file_info_mp;
00674431                          file_info_mp_4->iFreeBlocks_ -= 1;
006743f2                      }
006743f2                      
00674434                      edi_2 = arg2;
0067439a                  }
0067439a                  else
0067439a                  {
0067439c                      struct DiskFileInfo_t* file_info_mp = this->file_info_mp;
0067439e                      i_1 = i;
006743b0                      DiskDev::SyncRead(&this->file_man_m, &i_1, 4, file_info_mp->firstFree_);
006743b9                      struct DiskFileInfo_t* file_info_mp_1 = this->file_info_mp;
006743bb                      int32_t i_2 = (i_1 & 0x7fffffff);
006743c1                      i_1 = i_2;
006743c8                      firstFree_ = file_info_mp_1->firstFree_;
006743cc                      file_info_mp_1->firstFree_ = i_2;
006743cf                      struct DiskFileInfo_t* file_info_mp_2 = this->file_info_mp;
006743d1                      file_info_mp_2->iFreeBlocks_ -= 1;
0067439a                  }
00674392              }
00674392              
0067444a              *(uint32_t*)ebx = firstFree_;
00674451              i = DiskDev::SyncWrite(&this->file_man_m, ebx, iBlockSize, firstFree);
00674451              
00674455              if (i == 0)
00674455              {
0067445b                  *(uint32_t*)ebx = edx_1;
00674461                  firstFree = firstFree_;
00674469                  edi_2 -= var_c;
0067446b                  arg2 = edi_2;
0067446f                  ebx = &ebx[var_c];
00674455              }
00674455              
00674473              if (edi_2 <= 0)
00674473                  break;
00674473              
00674376              eax_5 = arg3;
00674382          }
0067436e      }
0067436e      
00674482      return i;
00674300  }

006744d1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

006744e0  uint8_t __thiscall CLBlockAllocator::Load_Data(class CLBlockAllocator* this, class Cache_Pack_t* arg2, int32_t arg3, uint8_t arg4)

006744e0  {
006744fa      char var_5 = 1;
006744ff      SmartBuffer::ReconfigureAllocation(&arg2->m_buff, 4, 1);
0067450d      uint8_t* esi = SmartBuffer::GetBuffer(&arg2->m_buff);
00674517      void* edi_3;
00674517      
00674517      if (SmartBuffer::GetSize(&arg2->m_buff) <= 4)
00674527          edi_3 = nullptr;
00674517      else
00674522          edi_3 = (SmartBuffer::GetSize(&arg2->m_buff) - 4);
00674522      
0067452b      int32_t iBlockSize_ = this->file_info_mp->iBlockSize_;
0067452e      int32_t i = arg3;
00674532      arg2 = iBlockSize_;
00674536      void* ebx_1 = (iBlockSize_ - 4);
0067453b      struct DiskFileInfo_t* eax_3;
0067453b      class SmartBuffer* ecx_2;
0067453b      
0067453b      if (edi_3 == 0)
0067453b      {
0067459f          eax_3 = 1;
006745a3      label_6745a3:
006745a3          
006745a9          if ((i != 0 || edi_3 != 0))
006745a9          {
006745ab              ecx_2 = arg4;
006745ab              
006745b1              if (ecx_2 == 0)
006745b3                  eax_3 = 0;
006745a9          }
0067453b      }
0067453b      else
0067453b      {
00674542          while (i != 0)
00674542          {
00674544              eax_3 = var_5;
00674544              
0067454a              if (eax_3 == 0)
006745bc                  return eax_3;
006745bc              
0067454e              int32_t ecx_3 = *(uint32_t*)esi;
0067454e              
00674554              if (ebx_1 > edi_3)
00674554              {
00674559                  ebx_1 = edi_3;
0067455b                  arg2 = ((char*)edi_3 + 4);
00674554              }
00674554              
0067456d              eax_3 = DiskDev::SyncRead(&this->file_man_m, esi, arg2, i);
0067456d              
00674574              if (eax_3 != 0)
0067458c                  var_5 = 0;
00674574              else
00674574              {
00674576                  i = *(uint32_t*)esi;
0067457c                  *(uint32_t*)esi = ecx_3;
0067457e                  edi_3 -= ebx_1;
00674580                  esi += ebx_1;
00674580                  
00674584                  if (i < 0)
00674584                  {
00674586                      i &= 0x7fffffff;
0067458c                      var_5 = 0;
00674584                  }
00674574              }
00674574              
00674593              if (edi_3 == 0)
00674593                  break;
00674542          }
00674542          
00674595          eax_3 = var_5;
00674595          
0067459b          if (eax_3 != 0)
0067459b              goto label_6745a3;
0067453b      }
006745bc      return eax_3;
006744e0  }

006745bf                                                                                               90                                 .

006745c0  void SB_TypeAlloc<DiskTransactInfoResolver,SB_Default>::Serialize(int32_t const* arg1, class DiskTransactInfo** arg2, class Archive* arg3)

006745c0  {
006745c2      class Archive* esi = arg3;
006745cf      enum DiskTransactType m_eTransactType;
006745cf      
006745cf      if ((esi->m_flags & 1) == 0)
006745d8          m_eTransactType = arg3;
006745cf      else
006745d3          m_eTransactType = *(uint32_t*)arg2->m_eTransactType;
006745d3      
006745e0      arg3 = m_eTransactType;
006745e4      Archive::CheckAlignment(esi, 1);
006745ed      char* eax_2 = Archive::GetBytes(esi, 1);
006745ed      
006745f4      if (eax_2 != 0)
006745f4      {
006745fa          if ((esi->m_flags & 1) == 0)
00674602              arg3 = *(uint8_t*)eax_2;
006745fa          else
006745fc              *(uint8_t*)eax_2 = m_eTransactType;
006745f4      }
006745f4      
0067460a      if ((esi->m_flags & 5) == 0)
0067460c          m_eTransactType = ((uint32_t)arg3);
0067460c      
00674619      if ((!(esi->m_flags) & 1) != 0)
00674624          *(uint32_t*)arg2 = DiskTransactInfo::CreateTransactInfo(m_eTransactType);
00674624      
00674626      class DiskTransactInfo* ecx_3 = *(uint32_t*)arg2;
00674626      
0067462a      if (ecx_3 != 0)
0067462c          ecx_3->vtable->Serialize(esi);
006745c0  }

00674635                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00674640  int32_t __fastcall CLBlockAllocator::SaveTransaction(class CLBlockAllocator* this, class DiskTransactInfo* arg2)

00674640  {
00674646      int32_t var_3c = 0;
0067464c      void var_24;
0067464c      enum Archive::tagPacking edx;
0067464c      TransientArchive::TransientArchive(&var_24, edx);
00674660      void var_34;
00674660      SB_TypeAlloc<DiskTransactInfoResolver,SB_Default>::Serialize(&var_34, &arg2, &var_24);
00674671      void __return;
00674671      Archive::GetSerializedBuffer(&var_24, &__return);
00674682      void* ecx_3 = &__return;
00674682      
00674686      if (SmartBuffer::GetSize(&__return) > 0x40)
00674686      {
006746c2          SmartBuffer::~SmartBuffer(ecx_3);
006746cb          Archive::~Archive(&var_24);
006746d9          return 0xffffff9b;
00674686      }
00674686      
0067468d      uint32_t eax_1 = SmartBuffer::GetSize(ecx_3);
006746a0      int32_t result = DiskDev::SyncWrite(&this->file_man_m, SmartBuffer::GetBuffer(&__return), eax_1, 0x100);
006746ab      SmartBuffer::~SmartBuffer(&__return);
006746b4      Archive::~Archive(&var_24);
006746bf      return result;
00674640  }

006746dc                                                                                      90 90 90 90                              ....

006746e0  int32_t __fastcall CLBlockAllocator::ClearTransaction(class CLBlockAllocator* this)

006746e0  {
006746ea      void var_c;
006746ea      DiskTransactInfo::DiskTransactInfo(&var_c);
006746f3      void* var_14 = &var_c;
006746ff      class DiskTransactInfo* edx;
006746ff      return CLBlockAllocator::SaveTransaction(this, edx);
006746e0  }


00674700  int32_t __fastcall CLBlockAllocator::ReadTransaction(class CLBlockAllocator* this, class DiskTransactInfo** arg2)

00674700  {
0067470b      void var_30;
0067470b      SmartBuffer::SmartBuffer(&var_30);
00674718      SmartBuffer::ReconfigureAllocation(&var_30, 0x40, 1);
00674726      uint32_t eax = SmartBuffer::GetSize(&var_30);
0067473e      int32_t result = DiskDev::SyncRead(&this->file_man_m, SmartBuffer::GetBuffer(&var_30), eax, 0x100);
0067473e      
00674744      if (result == 0)
00674744      {
0067474a          int32_t var_24 = 0x792b3c;
00674752          int32_t var_20_1 = 0;
00674756          int32_t var_1c_1 = 0;
0067475a          void var_18;
0067475a          SmartBuffer::SmartBuffer(&var_18);
0067476d          int32_t var_c_1 = 0;
00674771          int32_t var_8_1 = 0;
00674775          int32_t var_4_1 = 0;
00674779          var_24 = 0x792b50;
00674781          Archive::InitForUnpacking(&var_24, &Archive::SetCurrentCoreVersion, &var_30);
00674786          class DiskTransactInfo** edi_1 = arg2;
00674795          SB_TypeAlloc<DiskTransactInfoResolver,SB_Default>::Serialize(&arg2, edi_1, &var_24);
00674795          
006747b1          if (((((int8_t)(var_20_1 >> 2)) & 1) != 0 || *(uint32_t*)edi_1->m_nMagicNumber != 0x4c50))
006747b3              result = 0xffffff9b;
006747b3          
006747bc          Archive::~Archive(&var_24);
00674744      }
00674744      
006747c5      SmartBuffer::~SmartBuffer(&var_30);
006747d1      return result;
00674700  }

006747d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006747e0  int32_t __thiscall CLBlockAllocator::CreateDataFile(class CLBlockAllocator* this, struct DiskFileInfo_t* arg2, class PStringBase<char> const* arg3, class PStringBase<unsigned short> const* arg4, uint32_t arg5)

006747e0  {
006747e8      struct DiskFileInfo_t** this_1 = this;
006747ec      *(uint32_t*)this_1 = arg2;
00674811      this_1[2] = (arg5 & 2) == 2;
0067481f      int32_t eax_3 = DiskDev::Open_File(&this_1[1], PStringBase<char>::to_wpstring(arg3, &arg2, 0), arg4, nullptr, arg5);
00674828      void* __offset(DiskFileInfo_t, -0x14) esi_2 = ((char*)arg2 - 0x14);
00674828      
0067483d      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00674845          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00674845      
00674849      if (eax_3 != 0)
00674853          return eax_3;
00674853      
00674856      struct DiskFileInfo_t* ecx_4 = *(uint32_t*)this_1;
00674862      int32_t iBlockSize_ = ecx_4->iBlockSize_;
00674866      int32_t temp0 = (((int64_t)(ecx_4->fileSize_ - 0x400)) / iBlockSize_);
00674869      arg4 = temp0;
0067486d      ecx_4->iFreeBlocks_ = temp0;
00674870      void* s = operator new[](iBlockSize_);
00674889      __builtin_memset(__builtin_memset(s, 0, ((iBlockSize_ >> 2) << 2)), 0, (iBlockSize_ & 3));
0067488e      int32_t eax_11 = 0x400;
0067488b      *(uint32_t*)this_1->firstFree_ = 0x400;
0067489f      int32_t edi_3 = 0x400;
006748a1      arg5 = 0;
006748a1      
006748a9      if (arg4 > 0)
006748a9      {
006748e8          bool cond:3_1;
006748e8          
006748e8          do
006748e8          {
006748b0              int32_t eax_12 = edi_3;
006748b3              edi_3 += iBlockSize_;
006748c2              arg3 = eax_12;
006748c6              *(uint32_t*)s = (edi_3 | 0x80000000);
006748c8              int32_t eax_13 = DiskDev::SyncWrite(&this_1[1], s, iBlockSize_, eax_12);
006748cf              arg2 = eax_13;
006748cf              
006748d3              if (eax_13 != 0)
006748d3              {
0067495b                  operator delete[](s);
0067496e                  return arg2;
006748d3              }
006748d3              
006748e2              cond:3_1 = (arg5 + 1) < arg4;
006748e4              arg5 += 1;
006748e8          } while (cond:3_1);
006748ea          eax_11 = arg3;
006748a9      }
006748a9      
006748ee      *(uint32_t*)this_1->finalFree_ = eax_11;
006748fd      *(uint32_t*)s = 0x80000000;
00674903      int32_t eax_16 = DiskDev::SyncWrite(&this_1[1], s, 4, eax_11);
00674908      struct DiskFileInfo_t* edx_7 = *(uint32_t*)this_1;
0067490c      arg2 = eax_16;
00674910      edx_7->fileSize_ = edi_3;
00674913      operator delete[](s);
00674918      int32_t eax_17 = arg2;
00674918      
00674921      if (eax_17 == 0)
00674921      {
00674930          class DiskTransactInfo* edx_8;
00674930          eax_17 = DiskDev::SyncWrite(&this_1[1], *(uint32_t*)this_1, 0x50, 0x140);
00674930          
00674937          if (eax_17 == 0)
00674937          {
0067493d              void var_c;
0067493d              DiskTransactInfo::DiskTransactInfo(&var_c);
00674946              void* var_20_4 = &var_c;
00674949              CLBlockAllocator::SaveTransaction(this_1, edx_8);
0067494e              return 0;
00674937          }
00674921      }
00674921      
00674957      return eax_17;
006747e0  }

006748ad                                         8d 49 00                                                               .I.
00674971                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00674980  int32_t __thiscall CLBlockAllocator::OpenDataFile(class CLBlockAllocator* this, struct DiskFileInfo_t* arg2, class PStringBase<char> const* arg3, class PStringBase<unsigned short> const* arg4, uint32_t arg5, class DiskTransactInfo** arg6)

00674980  {
00674986      struct DiskFileInfo_t* ebp = arg2;
006749ac      this->file_info_mp = ebp;
006749ae      this->expandable_mf = (arg5 & 2) == 2;
006749bc      int32_t result_1 = DiskDev::Open_File(&this->file_man_m, PStringBase<char>::to_wpstring(arg3, &arg2, 0), arg4, nullptr, arg5);
006749c5      void* __offset(DiskFileInfo_t, -0x14) edi_1 = ((char*)arg2 - 0x14);
006749c5      
006749dc      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
006749e4          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
006749e4      
006749e6      int32_t result = result_1;
006749e6      
006749ec      if (result == 0)
006749ec      {
006749f8          class DiskTransactInfo** edx_2;
006749f8          result = DiskDev::SyncRead(&this->file_man_m, ebp, 0x50, 0x140);
006749f8          
00674a04          if (ebp->magic_ != 0x5442)
00674a04          {
00674a08              edx_2 = DiskDev::Close(&this->file_man_m);
00674a0d              result = 0xffffff9a;
00674a04          }
00674a04          
00674a14          if (result == 0)
00674a14          {
00674a1a              class DiskTransactInfo** var_14_2 = arg6;
00674a1d              return CLBlockAllocator::ReadTransaction(this, edx_2);
00674a14          }
006749ec      }
006749ec      
00674a26      return result;
00674980  }

00674a29                             90 90 90 90 90 90 90                                                           .......

00674a30  void __thiscall LRUB_Mem_t::LRUB_Mem_t(struct LRUB_Mem_t* this, struct LRUB_Mem_t const* arg2)

00674a30  {
00674a35      this->info_pm = nullptr;
00674a38      this->DIds_pm = nullptr;
00674a3b      this->buffer_cpm = nullptr;
00674a45      this->offset_lm = arg2->offset_lm;
00674a4a      this->size_lm = arg2->size_lm;
00674a50      this->max_lm = arg2->max_lm;
00674a56      this->above_lm = arg2->above_lm;
00674a5c      this->below_lm = arg2->below_lm;
00674a5c      
00674a62      if (arg2->buffer_cpm != 0)
00674a62      {
00674a64          int32_t size_lm = this->size_lm;
00674a64          
00674a69          if (size_lm != 0)
00674a69          {
00674a6d              void* eax_3 = operator new[](size_lm);
00674a72              int32_t size_lm_1 = this->size_lm;
00674a77              this->buffer_cpm = eax_3;
00674a82              int32_t esi_2;
00674a82              int32_t edi_2;
00674a82              edi_2 = __builtin_memcpy(eax_3, arg2->buffer_cpm, ((size_lm_1 >> 2) << 2));
00674a89              __builtin_memcpy(edi_2, esi_2, (size_lm_1 & 3));
00674a8b              uint8_t* buffer_cpm = this->buffer_cpm;
00674a91              this->info_pm = buffer_cpm;
00674a97              this->DIds_pm = &buffer_cpm[0x10];
00674a69          }
00674a62      }
00674a30  }

00674aa2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00674ab0  void __thiscall LRUB_Mem_t::Make_Buffer(struct LRUB_Mem_t* this, int32_t arg2)

00674ab0  {
00674ac0      if ((this->buffer_cpm == 0 && arg2 > 0))
00674ac0      {
00674ac9          this->size_lm = arg2;
00674acc          this->max_lm = ((arg2 - 0x10) >> 2);
00674acf          void* eax_2 = operator new[](arg2);
00674ad4          this->buffer_cpm = eax_2;
00674ad7          this->info_pm = eax_2;
00674ada          *(uint32_t*)eax_2 = 0;
00674ae0          *(uint32_t*)((char*)eax_2 + 4) = 0;
00674ae7          *(uint32_t*)((char*)eax_2 + 8) = 0;
00674aee          *(uint32_t*)((char*)eax_2 + 0xc) = 0;
00674afe          this->DIds_pm = &this->buffer_cpm[0x10];
00674ac0      }
00674ab0  }

00674b05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00674b10  uint8_t __fastcall LRU_List::Create_List(class LRU_List* this)

00674b10  {
00674b12      char result = 0;
00674b12      
00674b2a      if ((this->initialized_fm == 0 && (this->young_pm == 0 && this->old_pm == 0)))
00674b2a      {
00674b2c          struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
00674b2c          
00674b3f          if ((file_info_pm->young_lru_lm == 0 && file_info_pm->old_lru_lm == 0))
00674b3f          {
00674b42              int32_t ebx;
00674b42              ebx = file_info_pm->use_lru_fm;
00674b42              
00674b48              if (ebx != 0)
00674b48              {
00674b4a                  result = 1;
00674b4c                  this->initialized_fm = 1;
00674b4e                  this->empty_fm = 1;
00674b48              }
00674b3f          }
00674b2a      }
00674b2a      
00674b52      return result;
00674b10  }

00674b53                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00674b60  void __thiscall LRUB_Mem_t::LRUB_Mem_t(struct LRUB_Mem_t* this, int32_t arg2)

00674b60  {
00674b6b      this->buffer_cpm = nullptr;
00674b6e      this->offset_lm = 0;
00674b70      this->size_lm = 0;
00674b73      this->max_lm = 0;
00674b76      this->above_lm = 0;
00674b79      this->below_lm = 0xffffffff;
00674b80      this->info_pm = nullptr;
00674b83      this->DIds_pm = nullptr;
00674b83      
00674b86      if (arg2 > 0)
00674b8b          LRUB_Mem_t::Make_Buffer(this, arg2);
00674b60  }

00674b96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00674ba0  class IDClass<_tagDataID,32,0>* __thiscall LRUB_Mem_t::Remove_Below(struct LRUB_Mem_t* this, class IDClass<_tagDataID,32,0>* __return)

00674ba0  {
00674ba6      uint32_t id = INVALID_DID.id;
00674bac      uint32_t id_1 = id;
00674bac      
00674bae      if (this->below_lm >= 0)
00674bae      {
00674bba          for (; id == id_1; id = INVALID_DID.id)
00674bba          {
00674bc2              uint32_t* eax_1 = &this->DIds_pm[this->below_lm];
00674bc5              id_1 = *(uint32_t*)eax_1;
00674bc7              *(uint32_t*)eax_1 = id;
00674bcc              int32_t esi_1 = (this->below_lm - 1);
00674bd1              this->below_lm = esi_1;
00674bd1              
00674bd4              if (esi_1 < 0)
00674bd4                  break;
00674bba          }
00674bae      }
00674bae      
00674bd6      uint32_t* result = __return;
00674bda      *(uint32_t*)result = id_1;
00674bdd      return result;
00674ba0  }


00674be0  class IDClass<_tagDataID,32,0>* __thiscall LRUB_Mem_t::Remove_Above(struct LRUB_Mem_t* this, class IDClass<_tagDataID,32,0>* __return)

00674be0  {
00674be8      uint32_t id = INVALID_DID.id;
00674bf4      uint32_t id_1 = id;
00674bf4      
00674bf6      if (this->above_lm < this->info_pm->used_lm)
00674bf6      {
00674c02          for (; id == id_1; id = INVALID_DID.id)
00674c02          {
00674c0a              uint32_t* eax_1 = &this->DIds_pm[this->above_lm];
00674c0d              id_1 = *(uint32_t*)eax_1;
00674c0f              *(uint32_t*)eax_1 = id;
00674c14              int32_t ebx_2 = (this->above_lm + 1);
00674c15              this->above_lm = ebx_2;
00674c15              
00674c22              if (ebx_2 >= this->info_pm->used_lm)
00674c22                  break;
00674c02          }
00674bf6      }
00674bf6      
00674c24      uint32_t* result = __return;
00674c2a      *(uint32_t*)result = id_1;
00674c2d      return result;
00674be0  }


00674c30  class IDClass<_tagDataID,32,0>* __thiscall LRUB_Mem_t::Peek_Above(struct LRUB_Mem_t* this, class IDClass<_tagDataID,32,0>* __return)

00674c30  {
00674c34      struct LRUB_Info_t* info_pm = this->info_pm;
00674c34      
00674c41      if (this->above_lm < info_pm->used_lm)
00674c41      {
00674c43          class IDClass<_tagDataID,32,0>* DIds_pm = this->DIds_pm;
00674c43          
00674c6b          do
00674c6b          {
00674c50              int32_t above_lm = this->above_lm;
00674c50              
00674c5c              if (INVALID_DID.id != DIds_pm[above_lm].id)
00674c5c                  break;
00674c5c              
00674c5f              this->above_lm = (above_lm + 1);
00674c6b          } while (this->above_lm < this->info_pm->used_lm);
00674c41      }
00674c41      
00674c6e      int32_t above_lm_1 = this->above_lm;
00674c6e      
00674c74      if (above_lm_1 < info_pm->used_lm)
00674c74      {
00674c81          __return->id = this->DIds_pm[above_lm_1].id;
00674c86          return __return;
00674c74      }
00674c74      
00674c89      uint32_t* __return_1 = __return;
00674c8d      *(uint32_t*)__return_1 = INVALID_DID.id;
00674c91      return __return_1;
00674c30  }

00674c49                             8d a4 24 00 00 00 00                                                           ..$....
00674c94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00674ca0  uint8_t __fastcall LRU_List::Load_List(class LRU_List* this)

00674ca0  {
00674cad      int32_t var_14 = 0;
00674cb1      int32_t var_10 = 0;
00674cb5      void var_c;
00674cb5      SmartBuffer::SmartBuffer(&var_c);
00674cb5      
00674cd4      if (((this->initialized_fm != 0 || this->young_pm != 0) || this->old_pm != 0))
00674dda          this->initialized_fm = 0;
00674cd4      else if (this->file_info_pm->young_lru_lm == 0)
00674dd5          this->initialized_fm = 1;
00674ce3      else
00674ce3      {
00674ceb          void* eax_2 = operator new(0x20);
00674cf5          struct LRUB_Mem_t* eax_3;
00674cf5          
00674cf5          if (eax_2 == 0)
00674d0a              eax_3 = nullptr;
00674cf5          else
00674d03              eax_3 = LRUB_Mem_t::LRUB_Mem_t(eax_2, this->file_info_pm->iBlockSize_);
00674d03          
00674d0c          struct DiskFileInfo_t* file_info_pm_1 = this->file_info_pm;
00674d12          this->young_pm = eax_3;
00674d1b          eax_3->offset_lm = file_info_pm_1->young_lru_lm;
00674d1d          struct LRUB_Mem_t* young_pm = this->young_pm;
00674d2f          SmartBuffer::Borrow(&var_c, young_pm->buffer_cpm, young_pm->size_lm);
00674d49          CLBlockAllocator::Load_Data(this->block_man_pm, &var_14, this->young_pm->offset_lm, 0);
00674d4e          struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
00674d54          this->empty_fm = 0;
00674d54          
00674d5d          if (file_info_pm->young_lru_lm == file_info_pm->old_lru_lm)
00674d5d          {
00674dcf              this->old_pm = this->young_pm;
00674dd5              this->initialized_fm = 1;
00674d5d          }
00674d5d          else
00674d5d          {
00674d61              void* eax_5 = operator new(0x20);
00674d6b              struct LRUB_Mem_t* eax_6;
00674d6b              
00674d6b              if (eax_5 == 0)
00674d80                  eax_6 = nullptr;
00674d6b              else
00674d79                  eax_6 = LRUB_Mem_t::LRUB_Mem_t(eax_5, this->file_info_pm->iBlockSize_);
00674d79              
00674d82              struct DiskFileInfo_t* file_info_pm_2 = this->file_info_pm;
00674d88              this->old_pm = eax_6;
00674d91              eax_6->offset_lm = file_info_pm_2->old_lru_lm;
00674d93              struct LRUB_Mem_t* old_pm = this->old_pm;
00674da5              SmartBuffer::Borrow(&var_c, old_pm->buffer_cpm, old_pm->size_lm);
00674daa              struct LRUB_Mem_t* old_pm_1 = this->old_pm;
00674db0              int32_t edx_6;
00674db0              edx_6 = old_pm_1->offset_lm;
00674db0              *(uint8_t*)((char*)edx_6)[1] = *(uint8_t*)((char*)old_pm_1->offset_lm)[1];
00674dbf              CLBlockAllocator::Load_Data(this->block_man_pm, &var_14, edx_6, 0);
00674dc4              this->initialized_fm = 1;
00674d5d          }
00674ce3      }
00674ce3      
00674ddc      uint8_t initialized_fm = this->initialized_fm;
00674de2      SmartBuffer::~SmartBuffer(&var_c);
00674deb      SmartBuffer::~SmartBuffer(&var_c);
00674df7      return initialized_fm;
00674ca0  }

00674df8                                                                          90 90 90 90 90 90 90 90                          ........

00674e00  uint8_t __thiscall LRU_List::Add_Exec(class LRU_List* this, class IDClass<_tagDataID,32,0> arg2)

00674e00  {
00674e0d      int32_t var_14 = 0;
00674e11      int32_t var_10 = 0;
00674e15      void var_c;
00674e15      SmartBuffer::SmartBuffer(&var_c);
00674e1a      struct LRUB_Mem_t* young_pm = this->young_pm;
00674e20      struct LRUB_Info_t* info_pm_1 = young_pm->info_pm;
00674e20      
00674e25      if (info_pm_1 != 0)
00674e25      {
00674e27          class IDClass<_tagDataID,32,0>* DIds_pm = young_pm->DIds_pm;
00674e27          
00674e2c          if (DIds_pm != 0)
00674e2c          {
00674e2e              int32_t used_lm = info_pm_1->used_lm;
00674e2e              
00674e34              if (used_lm < young_pm->max_lm)
00674e34              {
00674e3a                  DIds_pm[used_lm].id = arg2;
00674e3d                  struct LRUB_Info_t* info_pm = young_pm->info_pm;
00674e40                  info_pm->used_lm += 1;
00674e34              }
00674e2c          }
00674e25      }
00674e25      
00674e43      struct LRUB_Mem_t* young_pm_1 = this->young_pm;
00674e55      SmartBuffer::Borrow(&var_c, young_pm_1->buffer_cpm, young_pm_1->size_lm);
00674e6e      CLBlockAllocator::Update(this->block_man_pm, &var_14, this->young_pm->offset_lm);
00674e77      SmartBuffer::~SmartBuffer(&var_c);
00674e80      SmartBuffer::~SmartBuffer(&var_c);
00674e86      int32_t eax_1;
00674e86      eax_1 = 1;
00674e8c      return 1;
00674e00  }

00674e8f                                               90                                                                 .

00674e90  uint8_t __thiscall LRU_List::Expand_Exec(class LRU_List* this, class LRUExpandTransactInfo const* arg2)

00674e90  {
00674e9e      int32_t var_14 = 0;
00674ea2      int32_t var_10 = 0;
00674ea6      void var_c;
00674ea6      SmartBuffer::SmartBuffer(&var_c);
00674eab      struct LRUB_Mem_t* young_pm = this->young_pm;
00674eb1      int32_t offset_lm = young_pm->offset_lm;
00674eb1      
00674ebe      if ((offset_lm != 0 && arg2->m_nYoungOffset == offset_lm))
00674ebe      {
00674ec0          young_pm->info_pm->younger_lm = arg2->m_nFirstFreeBlock;
00674ec9          struct LRUB_Mem_t* young_pm_1 = this->young_pm;
00674edb          SmartBuffer::Borrow(&var_c, young_pm_1->buffer_cpm, young_pm_1->size_lm);
00674ee0          struct LRUB_Mem_t* young_pm_5 = this->young_pm;
00674ee6          int32_t edx_2;
00674ee6          edx_2 = young_pm_5->offset_lm;
00674ee6          *(uint8_t*)((char*)edx_2)[1] = *(uint8_t*)((char*)young_pm_5->offset_lm)[1];
00674ef4          CLBlockAllocator::Update(this->block_man_pm, &var_14, edx_2);
00674ebe      }
00674ebe      
00674ef9      struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
00674eff      int32_t m_nFirstFreeBlock = arg2->m_nFirstFreeBlock;
00674eff      
00674f05      if (file_info_pm->firstFree_ == m_nFirstFreeBlock)
00674f05      {
00674f0b          file_info_pm->young_lru_lm = m_nFirstFreeBlock;
00674f0e          struct LRUB_Mem_t* young_pm_2 = this->young_pm;
00674f0e          
00674f17          if (young_pm_2->buffer_cpm != 0)
00674f17          {
00674f19              young_pm_2->offset_lm = 0;
00674f1b              young_pm_2->above_lm = 0;
00674f1e              young_pm_2->below_lm = 0xffffffff;
00674f25              struct LRUB_Info_t* info_pm = young_pm_2->info_pm;
00674f28              info_pm->link_padding_lm = 0;
00674f2a              info_pm->younger_lm = 0;
00674f2d              info_pm->older_lm = 0;
00674f30              info_pm->used_lm = 0;
00674f17          }
00674f17          
00674f33          struct LRUB_Mem_t* young_pm_3 = this->young_pm;
00674f39          struct LRUB_Info_t* info_pm_2 = young_pm_3->info_pm;
00674f39          
00674f42          if (info_pm_2 != 0)
00674f42          {
00674f44              class IDClass<_tagDataID,32,0>* DIds_pm = young_pm_3->DIds_pm;
00674f44              
00674f49              if (DIds_pm != 0)
00674f49              {
00674f4b                  int32_t used_lm = info_pm_2->used_lm;
00674f4b                  
00674f51                  if (used_lm < young_pm_3->max_lm)
00674f51                  {
00674f53                      DIds_pm[used_lm].id = arg2->m_cTargetDID.id;
00674f56                      struct LRUB_Info_t* info_pm_1 = young_pm_3->info_pm;
00674f59                      info_pm_1->used_lm += 1;
00674f51                  }
00674f49              }
00674f42          }
00674f42          
00674f5c          this->young_pm->info_pm->older_lm = arg2->m_nYoungOffset;
00674f6b          struct LRUB_Mem_t* young_pm_6 = this->young_pm;
00674f71          int16_t m_nFirstFreeBlock_1 = ((int16_t)arg2->m_nFirstFreeBlock);
00674f74          young_pm_6->offset_lm = m_nFirstFreeBlock_1;
00674f74          *(uint8_t*)((char*)young_pm_6->offset_lm)[1] = *(uint8_t*)((char*)m_nFirstFreeBlock_1)[1];
00674f76          struct LRUB_Mem_t* young_pm_4 = this->young_pm;
00674f88          SmartBuffer::Borrow(&var_c, young_pm_4->buffer_cpm, young_pm_4->size_lm);
00674fa1          CLBlockAllocator::Store_Data(this->block_man_pm, &var_14, this->young_pm->offset_lm);
00674f05      }
00674f05      
00674fab      SmartBuffer::~SmartBuffer(&var_c);
00674fb4      SmartBuffer::~SmartBuffer(&var_c);
00674fbb      int32_t eax_4;
00674fbb      eax_4 = 0;
00674fc1      return 0;
00674e90  }

00674fc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00674fd0  uint8_t __thiscall LRU_List::Delete_Exec(class LRU_List* this, class LRUDeleteTransactInfo const* arg2)

00674fd0  {
00674fd9      void* ebp = nullptr;
00674fdf      int32_t var_34 = 0;
00674fe3      int32_t var_30 = 0;
00674fe7      void var_2c;
00674fe7      SmartBuffer::SmartBuffer(&var_2c);
00674ff2      int32_t iBlockSize_ = this->file_info_pm->iBlockSize_;
00674ff7      void* var_4 = nullptr;
00674ffb      int32_t var_20 = 0;
00674fff      uint32_t var_1c = 0;
00675003      int32_t var_18 = 0;
00675007      int32_t var_14 = 0;
0067500b      int32_t var_10 = 0xffffffff;
00675013      void* var_c = nullptr;
00675017      int32_t var_8 = 0;
00675017      
0067501b      if (iBlockSize_ > 0)
0067501b      {
00675022          LRUB_Mem_t::Make_Buffer(&var_20, iBlockSize_);
00675027          ebp = var_c;
0067501b      }
0067501b      
00675039      SmartBuffer::Borrow(&var_2c, var_4, var_1c);
00675042      int32_t m_nOldOffset = arg2->m_nOldOffset;
00675042      
00675047      if (m_nOldOffset == 0)
00675047      {
0067507d          struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
0067507d          
00675089          if (arg2->m_nBlockOffset == file_info_pm->old_lru_lm)
0067508e              file_info_pm->old_lru_lm = arg2->m_nYoungOffset;
00675047      }
00675047      else
00675047      {
00675057          CLBlockAllocator::Load_Data(this->block_man_pm, &var_34, m_nOldOffset, 0);
00675057          
00675062          if (arg2->m_nBlockOffset == *(uint32_t*)((char*)ebp + 4))
00675062          {
0067506c              *(uint32_t*)((char*)ebp + 4) = arg2->m_nYoungOffset;
00675076              CLBlockAllocator::Update(this->block_man_pm, &var_34, m_nOldOffset);
00675062          }
00675047      }
00675047      
00675091      int32_t m_nYoungOffset = arg2->m_nYoungOffset;
00675091      
00675096      if (m_nYoungOffset == 0)
00675096      {
006750cc          struct DiskFileInfo_t* file_info_pm_1 = this->file_info_pm;
006750cc          
006750d8          if (arg2->m_nBlockOffset == file_info_pm_1->young_lru_lm)
006750dd              file_info_pm_1->young_lru_lm = arg2->m_nOldOffset;
00675096      }
00675096      else
00675096      {
006750a6          CLBlockAllocator::Load_Data(this->block_man_pm, &var_34, m_nYoungOffset, 0);
006750a6          
006750b1          if (arg2->m_nBlockOffset == *(uint32_t*)((char*)ebp + 8))
006750b1          {
006750bb              *(uint32_t*)((char*)ebp + 8) = arg2->m_nOldOffset;
006750c5              CLBlockAllocator::Update(this->block_man_pm, &var_34, m_nYoungOffset);
006750b1          }
00675096      }
00675096      
006750e0      struct DiskFileInfo_t* file_info_pm_2 = this->file_info_pm;
006750fa      int32_t eax_1 = CLBlockAllocator::DeleteBlocks(this->block_man_pm, arg2->m_nBlockOffset, file_info_pm_2->finalFree_, file_info_pm_2->iFreeBlocks_, 1);
00675105      char ebx_1 = ((int8_t)-(eax_1));
00675105      
0067510d      if (var_4 != 0)
00675110          operator delete[](var_4);
00675110      
0067511c      SmartBuffer::~SmartBuffer(&var_2c);
00675125      SmartBuffer::~SmartBuffer(&var_2c);
00675133      return ((ebx_1 - ebx_1) + 1);
00674fd0  }

00675136                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00675140  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, uint32_t arg2)

00675140  {
00675143      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_buckets = this->m_buckets;
0067514b      this->vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,struct HashList<class IDClass<struct _tagDataID,32,0>,bool,1>::HashListData*,1>::`vftable';
0067514b      
00675151      if (m_buckets != &this->m_aInplaceBuckets)
00675154          operator delete[](m_buckets);
00675154      
0067515e      this->m_buckets = nullptr;
00675161      this->m_firstInterestingBucket = nullptr;
00675164      this->m_numBuckets = 0;
00675167      this->m_numElements = 0;
00675167      
0067516f      if ((arg2 & 1) != 0)
00675172          operator delete(this);
00675172      
0067517d      return this;
00675140  }


00675180  uint8_t __thiscall LRU_List::Expand_Trans(class LRU_List* this, class IDClass<_tagDataID,32,0> arg2, uint8_t arg3)

00675180  {
00675187      struct LRUB_Mem_t* old_pm = this->old_pm;
00675187      
00675191      if (old_pm == 0)
00675191      {
00675196          void* eax;
00675196          int32_t edx_1;
00675196          eax = operator new(0x20);
0067519b          void* esi_1 = eax;
0067519b          
006751a2          if (esi_1 == 0)
006751d6              esi_1 = nullptr;
006751a2          else
006751a2          {
006751aa              int32_t iBlockSize_ = this->file_info_pm->iBlockSize_;
006751af              *(uint32_t*)((char*)esi_1 + 0x1c) = 0;
006751b2              *(uint32_t*)esi_1 = 0;
006751b4              *(uint32_t*)((char*)esi_1 + 4) = 0;
006751b7              *(uint32_t*)((char*)esi_1 + 8) = 0;
006751ba              *(uint32_t*)((char*)esi_1 + 0xc) = 0;
006751bd              *(uint32_t*)((char*)esi_1 + 0x10) = 0xffffffff;
006751c4              *(uint32_t*)((char*)esi_1 + 0x14) = 0;
006751c7              *(uint32_t*)((char*)esi_1 + 0x18) = 0;
006751c7              
006751ca              if (iBlockSize_ > 0)
006751cf                  LRUB_Mem_t::Make_Buffer(esi_1, iBlockSize_);
006751a2          }
006751a2          
006751d8          struct DiskFileInfo_t* file_info_pm = this->file_info_pm;
006751de          this->young_pm = esi_1;
006751e4          this->old_pm = esi_1;
006751ed          file_info_pm->old_lru_lm = file_info_pm->firstFree_;
006751f0          this->empty_fm = 0;
00675191      }
00675191      else if (old_pm == this->young_pm)
006751fc      {
00675200          void* eax_2 = operator new(0x20);
0067520a          struct LRUB_Mem_t* eax_3;
0067520a          
0067520a          if (eax_2 == 0)
0067521c              eax_3 = nullptr;
0067520a          else
00675215              eax_3 = LRUB_Mem_t::LRUB_Mem_t(eax_2, this->young_pm);
00675215          
0067521e          struct DiskFileInfo_t* file_info_pm_1 = this->file_info_pm;
00675224          this->old_pm = eax_3;
0067522a          eax_3->info_pm->younger_lm = file_info_pm_1->firstFree_;
006751fc      }
006751fc      
00675237      void var_18;
00675237      LRUExpandTransactInfo::LRUExpandTransactInfo(&var_18);
0067523c      struct LRUB_Mem_t* young_pm = this->young_pm;
00675242      int32_t edx_5;
00675242      edx_5 = young_pm->offset_lm;
00675242      *(uint8_t*)((char*)edx_5)[1] = *(uint8_t*)((char*)young_pm->offset_lm)[1];
0067524a      int32_t var_c = edx_5;
00675259      int32_t firstFree_ = this->file_info_pm->firstFree_;
00675263      void* __saved_esi_2 = &var_18;
00675264      class IDClass<_tagDataID,32,0> var_4 = arg2;
00675268      CLBlockAllocator::SaveTransaction(this->block_man_pm, arg2);
00675274      LRU_List::Expand_Exec(this, &var_18);
00675274      
0067527d      if (arg3 != 0)
00675285          CLBlockAllocator::ClearTransaction(this->block_man_pm);
00675285      
0067528b      int32_t eax_6;
0067528b      eax_6 = 0;
00675291      return 0;
00675180  }

00675294                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006752a0  uint8_t __thiscall LRU_List::Delete_Trans(class LRU_List* this, struct LRUB_Mem_t* arg2, uint8_t arg3)

006752a0  {
006752af      int32_t var_2c = 0;
006752b3      int32_t var_28 = 0;
006752b7      void var_24;
006752b7      SmartBuffer::SmartBuffer(&var_24);
006752c0      void var_18;
006752c0      LRUDeleteTransactInfo::LRUDeleteTransactInfo(&var_18);
006752cb      int32_t offset_lm = arg2->offset_lm;
006752cf      struct LRUB_Info_t* info_pm = arg2->info_pm;
006752d5      int32_t older_lm = info_pm->older_lm;
006752d9      int32_t younger_lm_1 = info_pm->younger_lm;
006752e6      void* var_40 = &var_18;
006752e7      int32_t younger_lm_2 = younger_lm_1;
006752eb      CLBlockAllocator::SaveTransaction(this->block_man_pm, younger_lm_1);
006752f7      LRU_List::Delete_Exec(this, &var_18);
006752f7      
00675300      if (arg3 != 0)
00675308          CLBlockAllocator::ClearTransaction(this->block_man_pm);
00675308      
0067530d      struct LRUB_Info_t* info_pm_1 = arg2->info_pm;
00675318      int32_t younger_lm = info_pm_1->younger_lm;
00675318      
0067531b      if (info_pm_1->older_lm != 0)
0067531b      {
006753cc          if (younger_lm == 0)
006753cc          {
006753ce              struct LRUB_Mem_t* young_pm = this->young_pm;
006753ce              
006753d7              if (young_pm->buffer_cpm != 0)
006753d7              {
006753d9                  young_pm->offset_lm = 0;
006753db                  young_pm->above_lm = 0;
006753de                  young_pm->below_lm = 0xffffffff;
006753e1                  struct LRUB_Info_t* info_pm_3 = young_pm->info_pm;
006753e4                  info_pm_3->link_padding_lm = 0;
006753e6                  info_pm_3->younger_lm = 0;
006753e9                  info_pm_3->older_lm = 0;
006753ec                  info_pm_3->used_lm = 0;
006753d7              }
006753d7              
006753fe              *(uint32_t*)this->young_pm = this->file_info_pm->young_lru_lm;
00675400              struct LRUB_Mem_t* young_pm_1 = this->young_pm;
00675412              SmartBuffer::Borrow(&var_24, young_pm_1->buffer_cpm, young_pm_1->size_lm);
0067541f              int32_t var_40_7 = 0;
0067542c              CLBlockAllocator::Load_Data(this->block_man_pm, &var_2c, this->young_pm->offset_lm, 0);
006753cc          }
0067531b      }
0067531b      else if (younger_lm != 0)
00675323      {
00675370          struct LRUB_Mem_t* old_pm = this->old_pm;
00675370          
00675379          if (old_pm->buffer_cpm != 0)
00675379          {
0067537b              old_pm->offset_lm = 0;
0067537d              old_pm->above_lm = 0;
00675380              old_pm->below_lm = 0xffffffff;
00675383              struct LRUB_Info_t* info_pm_2 = old_pm->info_pm;
00675386              info_pm_2->link_padding_lm = 0;
00675388              info_pm_2->younger_lm = 0;
0067538b              info_pm_2->older_lm = 0;
0067538e              info_pm_2->used_lm = 0;
00675379          }
00675379          
006753a0          *(uint32_t*)this->old_pm = this->file_info_pm->old_lru_lm;
006753a2          struct LRUB_Mem_t* old_pm_1 = this->old_pm;
006753b4          SmartBuffer::Borrow(&var_24, old_pm_1->buffer_cpm, old_pm_1->size_lm);
006753b9          struct LRUB_Mem_t* old_pm_2 = this->old_pm;
006753bf          int32_t edx_2;
006753bf          edx_2 = old_pm_2->offset_lm;
006753bf          *(uint8_t*)((char*)edx_2)[1] = *(uint8_t*)((char*)old_pm_2->offset_lm)[1];
006753c1          int32_t var_40_5 = 0;
0067542c          CLBlockAllocator::Load_Data(this->block_man_pm, &var_2c, edx_2, 0);
00675323      }
00675323      else
00675323      {
00675325          struct LRUB_Mem_t* old_pm_3 = this->old_pm;
00675325          
0067532d          if (old_pm_3 != 0)
0067532d          {
0067532f              uint8_t* buffer_cpm = old_pm_3->buffer_cpm;
00675334              old_pm_3->offset_lm = 0;
00675336              old_pm_3->size_lm = 0;
00675339              old_pm_3->max_lm = 0;
0067533c              old_pm_3->above_lm = 0;
0067533f              old_pm_3->below_lm = 0xffffffff;
00675342              old_pm_3->info_pm = nullptr;
00675345              old_pm_3->DIds_pm = nullptr;
00675345              
00675348              if (buffer_cpm != 0)
00675348              {
0067534b                  operator delete[](buffer_cpm);
00675353                  old_pm_3->buffer_cpm = nullptr;
00675348              }
00675348              
00675357              operator delete(old_pm_3);
0067532d          }
0067532d          
0067535f          this->old_pm = nullptr;
00675365          this->young_pm = nullptr;
00675323      }
00675323      
00675431      struct LRUB_Mem_t* young_pm_2 = this->young_pm;
00675431      
00675439      if (young_pm_2 != 0)
00675439      {
0067543b          struct LRUB_Mem_t* old_pm_4 = this->old_pm;
0067543b          
00675445          if (young_pm_2->offset_lm == old_pm_4->offset_lm)
00675445          {
00675449              if (old_pm_4 != 0)
00675449              {
0067544b                  uint8_t* buffer_cpm_1 = old_pm_4->buffer_cpm;
00675450                  old_pm_4->offset_lm = 0;
00675452                  old_pm_4->size_lm = 0;
00675455                  old_pm_4->max_lm = 0;
00675458                  old_pm_4->above_lm = 0;
0067545b                  old_pm_4->below_lm = 0xffffffff;
0067545e                  old_pm_4->info_pm = nullptr;
00675461                  old_pm_4->DIds_pm = nullptr;
00675461                  
00675464                  if (buffer_cpm_1 != 0)
00675464                  {
00675467                      operator delete[](buffer_cpm_1);
0067546f                      old_pm_4->buffer_cpm = nullptr;
00675464                  }
00675464                  
00675473                  operator delete(old_pm_4);
00675449              }
00675449              
0067547b              struct LRUB_Mem_t* young_pm_3 = this->young_pm;
00675481              this->old_pm = young_pm_3;
00675487              young_pm_3->info_pm->younger_lm = 0;
0067548d              this->old_pm->info_pm->older_lm = 0;
00675445          }
00675439      }
00675439      
0067549d      SmartBuffer::~SmartBuffer(&var_24);
006754a6      SmartBuffer::~SmartBuffer(&var_24);
006754ae      int32_t eax_7;
006754ae      eax_7 = 0;
006754b4      return 0;
006752a0  }

006754b7                                                                       90 90 90 90 90 90 90 90 90                         .........

006754c0  class IDClass<_tagDataID,32,0>* __thiscall LRU_List::Get_Oldest(class LRU_List* this, class IDClass<_tagDataID,32,0>* __return)

006754c0  {
006754c8      uint32_t id = INVALID_DID.id;
006754d2      int32_t ebx;
006754d2      ebx = 0;
006754d4      int32_t var_14 = 0;
006754dc      int32_t var_10 = 0;
006754e4      void var_c;
006754e4      SmartBuffer::SmartBuffer(&var_c);
006754e9      struct LRUB_Mem_t* old_pm = this->old_pm;
006754e9      
006754f1      if (old_pm != 0)
006754f1      {
00675506          while (INVALID_DID.id == id)
00675506          {
00675516              void __return_1;
00675516              id = LRUB_Mem_t::Peek_Above(old_pm, &__return_1)->id;
00675516              
0067551e              if (INVALID_DID.id != id)
0067551e              {
00675578                  int32_t* eax_6 = this->used_table_m.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, id) % this->used_table_m.m_ihlIntrusive.m_hash.m_numBuckets)];
00675578                  
0067557c                  if (eax_6 == 0)
0067557c                  {
0067559e                  label_67559e:
0067559e                      int32_t* eax_10 = this->dead_table_m.m_intrusiveTable.m_buckets[(COMBINE(0, id) % this->dead_table_m.m_intrusiveTable.m_numBuckets)];
0067559e                      
006755a2                      if (eax_10 != 0)
006755a2                      {
006755aa                          while (*(uint32_t*)eax_10 != id)
006755aa                          {
006755ac                              eax_10 = eax_10[1];
006755ac                              
006755b1                              if (eax_10 == 0)
006755b1                                  goto label_675635;
006755aa                          }
006755aa                          
0067561d                          if (eax_10 != 0)
0067561d                          {
0067562a                              void __return_3;
0067562a                              LRUB_Mem_t::Remove_Above(this->old_pm, &__return_3);
0067562f                              id = INVALID_DID.id;
0067561d                          }
006755a2                      }
0067557c                  }
0067557c                  else
0067557c                  {
00675582                      while (*(uint32_t*)eax_6 != id)
00675582                      {
00675584                          eax_6 = eax_6[1];
00675584                          
00675589                          if (eax_6 == 0)
00675589                              goto label_67559e;
00675582                      }
00675582                      
006755ba                      if (eax_6 == 0)
006755ba                          goto label_67559e;
006755ba                      
006755cc                      void __return_2;
006755cc                      uint32_t id_1 = LRUB_Mem_t::Remove_Above(this->old_pm, &__return_2)->id;
006755ce                      struct LRUB_Mem_t* young_pm_1 = this->young_pm;
006755d4                      struct LRUB_Info_t* info_pm_1 = young_pm_1->info_pm;
006755d4                      
006755e8                      if (((info_pm_1 == 0 || young_pm_1->DIds_pm == 0) || info_pm_1->used_lm >= young_pm_1->max_lm))
006755e8                      {
006755ef                          LRU_List::Expand_Trans(this, id_1, 0);
006755f4                          ebx = 0;
006755e8                      }
006755e8                      else
006755e8                      {
006755f8                          struct LRUB_Info_t* info_pm_2 = young_pm_1->info_pm;
006755f8                          
006755fd                          if (info_pm_2 != 0)
006755fd                          {
006755ff                              class IDClass<_tagDataID,32,0>* DIds_pm = young_pm_1->DIds_pm;
006755ff                              
00675604                              if (DIds_pm != 0)
00675604                              {
00675606                                  int32_t used_lm = info_pm_2->used_lm;
00675606                                  
0067560c                                  if (used_lm < young_pm_1->max_lm)
0067560c                                  {
0067560e                                      DIds_pm[used_lm].id = id_1;
00675611                                      struct LRUB_Info_t* info_pm = young_pm_1->info_pm;
00675614                                      info_pm->used_lm += 1;
0067560c                                  }
00675604                              }
006755fd                          }
006755fd                          
00675617                          ebx = 1;
006755e8                      }
006755e8                      
0067562f                      id = INVALID_DID.id;
0067557c                  }
0067551e              }
0067551e              else
0067551e              {
00675522                  if (ebx != 0)
00675522                  {
00675524                      struct LRUB_Mem_t* young_pm = this->young_pm;
00675536                      SmartBuffer::Borrow(&var_c, young_pm->buffer_cpm, young_pm->size_lm);
0067554f                      CLBlockAllocator::Update(this->block_man_pm, &var_14, this->young_pm->offset_lm);
00675554                      ebx = 0;
00675522                  }
00675522                  
00675561                  LRU_List::Delete_Trans(this, this->old_pm, 1);
0067551e              }
0067551e              
00675635          label_675635:
00675635              old_pm = this->old_pm;
00675635              
0067563d              if (old_pm == 0)
0067563d                  break;
00675506          }
00675506          
00675645          if (ebx != 0)
00675645          {
00675647              struct LRUB_Mem_t* young_pm_2 = this->young_pm;
00675659              SmartBuffer::Borrow(&var_c, young_pm_2->buffer_cpm, young_pm_2->size_lm);
0067565e              struct LRUB_Mem_t* young_pm_3 = this->young_pm;
00675664              int32_t edx_8;
00675664              edx_8 = young_pm_3->offset_lm;
00675664              *(uint8_t*)((char*)edx_8)[1] = *(uint8_t*)((char*)young_pm_3->offset_lm)[1];
00675672              CLBlockAllocator::Update(this->block_man_pm, &var_14, edx_8);
00675645          }
006754f1      }
006754f1      
0067567f      __return->id = id;
00675681      SmartBuffer::~SmartBuffer(&var_c);
0067568a      SmartBuffer::~SmartBuffer(&var_c);
00675697      return __return;
006754c0  }

006754f9                                                                             8d a4 24 00 00 00 00                           ..$....
0067569a                                                                                90 90 90 90 90 90                            ......

006756a0  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, uint32_t arg2)

006756a0  {
006756ab      arg2 = arg2;
006756af      uint8_t edx = ((int8_t)arg2);
006756b3      this->m_buckets = nullptr;
006756b6      this->m_firstInterestingBucket = nullptr;
006756b9      this->m_numBuckets = 0;
006756bc      this->m_numElements = 0;
006756c0      this->vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,struct HashList<class IDClass<struct _tagDataID,32,0>,bool,1>::HashListData*,1>::`vftable';
006756c6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006756d9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
006756d9      
006756e3      if (eax == bucketSizesEnd_1)
006756e5          eax -= 4;
006756e5      
006756e8      uint32_t eax_1 = *(uint32_t*)eax;
006756ed      this->m_numBuckets = eax_1;
006756ed      
006756f0      if (eax_1 > 0x17)
00675706          this->m_buckets = operator new[]((eax_1 << 2));
006756f0      else
006756f5          this->m_buckets = &this->m_aInplaceBuckets;
006756f5      
0067570c      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_buckets = this->m_buckets;
0067570f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00675715      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00675726      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
006756a0  }

0067572f                                               90                                                                 .

00675730  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, uint32_t arg2)

00675730  {
0067573a      if (arg2 == this->m_numBuckets)
0067573a      {
0067573c          uint32_t eax;
0067573c          eax = 0;
0067573f          return 0;
0067573a      }
0067573a      
00675749      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* m_hashNext_2 = nullptr;
00675749      
0067574e      while (this->m_numElements != 0)
0067574e      {
00675759          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0067575e          struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* m_hashNext_3;
0067575e          int32_t* m_firstInterestingBucket_2;
0067575e          
0067575e          if (this->m_firstInterestingBucket == ecx_1)
0067575e          {
00675771          label_675771:
00675771              m_firstInterestingBucket_2 = nullptr;
00675773              m_hashNext_3 = nullptr;
0067575e          }
0067575e          else
0067575e          {
00675760              while (true)
00675760              {
00675760                  struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
00675760                  
00675765                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00675765                  {
00675777                      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0067577a                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
0067577c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0067577c                      break;
00675765                  }
00675765                  
0067576c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0067576c                  
0067576f                  if (&m_firstInterestingBucket[1] == ecx_1)
0067576f                      goto label_675771;
00675760              }
0067575e          }
0067575e          
0067577e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0067577e          
00675782          if (eax_4 == m_hashNext_3)
00675794              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00675782          else
00675782          {
0067578b              void* edx_2;
0067578b              
0067578b              do
0067578b              {
00675784                  edx_2 = eax_4;
00675786                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0067578b              } while (eax_4 != m_hashNext_3);
0067578b              
0067578f              if (edx_2 != 0)
0067579b                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0067578f              else
00675794                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00675782          }
00675782          
0067579e          this->m_numElements -= 1;
006757a1          m_hashNext_3->m_hashNext = m_hashNext_2;
006757a7          m_hashNext_2 = m_hashNext_3;
0067574e      }
0067574e      
006757ab      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_buckets = this->m_buckets;
006757ab      
006757b3      if (m_buckets != &this->m_aInplaceBuckets)
006757b6          operator delete[](m_buckets);
006757b6      
006757c5      this->m_buckets = nullptr;
006757c8      this->m_firstInterestingBucket = nullptr;
006757cb      this->m_numBuckets = 0;
006757ce      this->m_numElements = 0;
006757d1      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
006757d8      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* m_hashNext_1 = m_hashNext_2;
006757d8      
006757da      if (m_hashNext_2 != 0)
006757da      {
006757ef          struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* m_hashNext;
006757ef          
006757ef          do
006757ef          {
006757e0              m_hashNext = m_hashNext_1->m_hashNext;
006757e6              IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::add_internal(this, m_hashNext_1);
006757ed              m_hashNext_1 = m_hashNext;
006757ef          } while (m_hashNext != 0);
006757da      }
006757da      
006757f4      m_hashNext_1 = 1;
006757f7      return 1;
00675730  }

006757fa                                                                                90 90 90 90 90 90                            ......

00675800  uint8_t __fastcall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::grow(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this)

00675800  {
00675800      class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* m_numBuckets = this;
00675802      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0067580e      m_numBuckets = this->m_numBuckets;
00675825      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00675825      
0067582f      if (eax_2 != bucketSizesEnd_1)
00675838          eax_2 = &eax_2[1];
0067582f      else
0067582f      {
00675831          eax_2 -= 4;
00675831          
00675836          if (eax_2 != bucketSizesEnd_1)
00675838              eax_2 = &eax_2[1];
0067582f      }
0067582f      
00675848      return IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
00675800  }

00675849                             90 90 90 90 90 90 90                                                           .......

00675850  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::add_internal(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* arg2)

00675850  {
0067585e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
00675862          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::grow(this);
00675862      
00675875      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** eax_4 = &this->m_buckets[(COMBINE(0, arg2->m_hashKey.id) % this->m_numBuckets)];
0067587a      arg2->m_hashNext = *(uint32_t*)eax_4;
0067587d      *(uint32_t*)eax_4 = arg2;
0067587d      
00675882      if (eax_4 < this->m_firstInterestingBucket)
00675884          this->m_firstInterestingBucket = eax_4;
00675884      
00675887      this->m_numElements += 1;
00675850  }

0067588e                                            90 90                                                                ..

00675890  uint8_t __fastcall LRU_List::Write_Added(class LRU_List* this, class IDClass<_tagDataID,32,0> arg2)

00675890  {
0067589e      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->dead_table_m.m_intrusiveTable, &arg2);
0067589e      
006758a5      if (eax != 0)
006758a8          operator delete(eax);
006758a8      
006758b0      struct LRUB_Mem_t* young_pm = this->young_pm;
006758b0      
006758b8      if (young_pm != 0)
006758b8      {
006758ba          struct LRUB_Info_t* info_pm = young_pm->info_pm;
006758ba          
006758ce          if ((info_pm != 0 && (young_pm->DIds_pm != 0 && info_pm->used_lm < young_pm->max_lm)))
006758ce          {
006758d7              LRU_List::Add_Exec(this, arg2);
006758dc              int32_t eax_1;
006758dc              eax_1 = 0;
006758df              return 0;
006758ce          }
006758b8      }
006758b8      
006758eb      LRU_List::Expand_Trans(this, arg2, 0);
006758f0      int32_t eax_3;
006758f0      eax_3 = 0;
006758f3      return 0;
00675890  }

006758f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00675900  void __thiscall LRU_List::Purge_Duplicates(class LRU_List* this, int32_t arg2, int32_t arg3)

00675900  {
0067590f      int32_t iBlockSize_ = this->file_info_pm->iBlockSize_;
00675919      uint8_t* var_24 = nullptr;
0067591d      int32_t var_40 = 0;
00675921      uint32_t var_3c = 0;
00675925      int32_t var_38 = 0;
00675929      int32_t var_34 = 0;
0067592d      int32_t var_30 = 0xffffffff;
00675931      int32_t var_2c = 0;
00675935      int32_t var_28 = 0;
00675935      
00675939      if (iBlockSize_ > 0)
00675940          LRUB_Mem_t::Make_Buffer(&var_40, iBlockSize_);
00675940      
0067594b      int32_t iBlockSize__1 = this->file_info_pm->iBlockSize_;
00675950      void* var_4 = nullptr;
00675954      int32_t var_20 = 0;
00675958      int32_t var_1c = 0;
0067595c      int32_t var_18 = 0;
00675960      int32_t var_14 = 0;
00675964      int32_t var_10 = 0xffffffff;
00675968      int32_t var_c = 0;
0067596c      int32_t var_8 = 0;
0067596c      
00675970      if (iBlockSize__1 > 0)
00675977          LRUB_Mem_t::Make_Buffer(&var_20, iBlockSize__1);
00675977      
00675984      int32_t* esi = &var_40;
00675988      int32_t* edi = &var_40;
0067598c      int32_t* var_58 = &var_20;
00675990      int32_t var_54 = 0;
00675994      int32_t var_50 = 0;
00675998      void var_4c;
00675998      SmartBuffer::SmartBuffer(&var_4c);
006759a5      int32_t ebx = arg2;
006759af      var_40 = ebx;
006759b3      SmartBuffer::Borrow(&var_4c, var_24, var_3c);
006759c6      CLBlockAllocator::Load_Data(this->block_man_pm, &var_54, ebx, 0);
006759cf      int32_t var_34_1 = arg3;
006759d4      int32_t var_30_1 = (arg3 - 1);
006759e6      uint32_t id = LRUB_Mem_t::Remove_Below(&var_40, &arg2)->id;
006759ee      arg2 = id;
006759ee      
006759f2      if (INVALID_DID.id != id)
006759f2      {
00675b3c          uint32_t id_1;
00675b3c          
00675b3c          do
00675b3c          {
00675a13              int32_t* eax_8 = this->dead_table_m.m_intrusiveTable.m_buckets[(COMBINE(0, id) % this->dead_table_m.m_intrusiveTable.m_numBuckets)];
00675a13              
00675a17              if (eax_8 == 0)
00675a17              {
00675a31              label_675a31:
00675a31                  int32_t eax_9 = edi[3];
00675a31                  
00675a36                  if (eax_9 > 0)
00675a36                  {
00675a38                      int32_t edx_3 = edi[6];
00675a3c                      edi[3] = (eax_9 - 1);
00675a3f                      *(uint32_t*)(edx_3 + ((eax_9 - 1) << 2)) = id;
00675a36                  }
00675a36                  
00675a4d                  HashSet<IDClass<_tagDataID,32,0> >::add(&this->dead_table_m, &arg2);
00675a17              }
00675a17              else
00675a17              {
00675a22                  while (*(uint32_t*)eax_8 != id)
00675a22                  {
00675a24                      eax_8 = eax_8[1];
00675a24                      
00675a29                      if (eax_8 == 0)
00675a29                          goto label_675a31;
00675a22                  }
00675a22                  
00675a2f                  if (eax_8 == 0)
00675a2f                      goto label_675a31;
00675a17              }
00675a17              
00675a57              if (edi[3] <= 0)
00675a57              {
00675a65                  SmartBuffer::Borrow(&var_4c, edi[7], edi[1]);
00675a78                  CLBlockAllocator::Update(this->block_man_pm, &var_54, *(uint32_t*)edi);
00675a57              }
00675a57              
00675a82              if (esi[4] < 0)
00675a82              {
00675a86                  if (esi == edi)
00675a86                  {
00675aa0                      esi = var_58;
00675aa4                      var_58 = nullptr;
00675a86                  }
00675a86                  else
00675a86                  {
00675a93                      *(uint32_t*)(edi[5] + 8) = *(uint32_t*)(esi[5] + 8);
00675a99                      LRU_List::Delete_Trans(this, esi, 1);
00675a86                  }
00675a86                  
00675aaf                  int32_t eax_15 = *(uint32_t*)(edi[5] + 8);
00675aaf                  
00675ab4                  if (eax_15 != 0)
00675ab4                  {
00675ab6                      uint8_t* ecx_14 = esi[7];
00675ab9                      *(uint32_t*)esi = eax_15;
00675ac4                      SmartBuffer::Borrow(&var_4c, ecx_14, esi[1]);
00675ad9                      CLBlockAllocator::Load_Data(this->block_man_pm, &var_54, *(uint32_t*)esi, 0);
00675ae1                      int32_t eax_17 = *(uint32_t*)(esi[5] + 0xc);
00675ae7                      esi[4] = (eax_17 - 1);
00675aea                      esi[3] = eax_17;
00675ab4                  }
00675a82              }
00675a82              
00675af2              if (edi[3] <= 0)
00675af2              {
00675af4                  var_58 = edi;
00675af8                  edi = esi;
00675af2              }
00675af2              
00675aff              id_1 = INVALID_DID.id;
00675aff              
00675b05              if (esi[4] >= 0)
00675b05              {
00675b2e                  int32_t eax_20;
00675b2e                  
00675b2e                  do
00675b2e                  {
00675b10                      uint32_t id_2 = INVALID_DID.id;
00675b10                      
00675b18                      if (id_2 != id_1)
00675b18                          break;
00675b18                      
00675b1a                      eax_20 = esi[4];
00675b1d                      int32_t ecx_18 = esi[6];
00675b20                      id_1 = *(uint32_t*)(ecx_18 + (eax_20 << 2));
00675b23                      char* ecx_19 = (ecx_18 + (eax_20 << 2));
00675b29                      *(uint8_t*)ecx_19 = id_2;
00675b29                      ecx_19[1] = *(uint8_t*)((char*)id_2)[1];
00675b2b                      esi[4] = (eax_20 - 1);
00675b2e                  } while ((eax_20 - 1) >= 0);
00675b05              }
00675b05              
00675b36              id = id_1;
00675b38              arg2 = id;
00675b3c          } while (INVALID_DID.id != id_1);
006759f2      }
006759f2      
00675b46      SmartBuffer::~SmartBuffer(&var_4c);
00675b4f      SmartBuffer::~SmartBuffer(&var_4c);
00675b4f      
00675b5e      if (var_4 != 0)
00675b61          operator delete[](var_4);
00675b61      
00675b6f      if (var_24 != 0)
00675b72          operator delete[](var_24);
00675900  }

006759fa                                                                                8d 9b 00 00 00 00                            ......
00675b09                             8d a4 24 00 00 00 00                                                           ..$....

00675b80  uint8_t __fastcall HashList<IDClass<_tagDataID,32,0>,bool,1>::pop_tail(class HashList<IDClass<_tagDataID,32,0>,bool,1>* this)

00675b80  {
00675b88      if (this->m_ihlIntrusive.m_hash.m_numElements <= 0)
00675b88      {
00675bc0          uint32_t eax;
00675bc0          eax = 0;
00675bc3          return 0;
00675b88      }
00675b88      
00675b8e      class DLListData* tail_ = this->m_ihlIntrusive.m_list.tail_;
00675b8e      
00675b93      if (tail_ != 0)
00675b96          DLListBase::Remove(&this->m_ihlIntrusive.m_list, tail_);
00675b96      
00675b9d      void* __offset(DLListData, -0x8) esi;
00675b9d      
00675b9d      if ((tail_ == 0 || tail_ == 0))
00675ba4          esi = nullptr;
00675b9d      else
00675b9f          esi = &tail_[-1];
00675b9f      
00675ba9      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, esi);
00675ba9      
00675bb0      if (esi != 0)
00675bb3          operator delete(esi);
00675bb3      
00675bbc      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_1;
00675bbc      eax_1 = 1;
00675bbf      return 1;
00675b80  }

00675bc4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00675bd0  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::add(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* arg2)

00675bd0  {
00675bd8      uint32_t id = arg2->m_hashKey.id;
00675bdb      uint32_t m_numBuckets = this->m_numBuckets;
00675bdb      
00675bee      for (int32_t* i = this->m_buckets[(COMBINE(0, id) % m_numBuckets)]; i != 0; i = i[1])
00675bee      {
00675bf2          if (*(uint32_t*)i == id)
00675bf2          {
00675c3e              if (i == 0)
00675c3e                  break;
00675c3e              
00675c42              i = 0;
00675c45              return 0;
00675bf2          }
00675bee      }
00675bee      
00675c04      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00675c08          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::grow(this);
00675c08      
00675c11      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.id) % this->m_numBuckets);
00675c14      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_buckets = this->m_buckets;
00675c1a      arg2->m_hashNext = m_buckets[temp1_1];
00675c1d      m_buckets[temp1_1] = arg2;
00675c23      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** eax_4 = &m_buckets[temp1_1];
00675c23      
00675c28      if (eax_4 < this->m_firstInterestingBucket)
00675c2a          this->m_firstInterestingBucket = eax_4;
00675c2a      
00675c32      this->m_numElements += 1;
00675c36      uint32_t eax_6;
00675c36      eax_6 = 1;
00675c39      return 1;
00675bd0  }

00675c48                          90 90 90 90 90 90 90 90                                                          ........

00675c50  uint8_t __thiscall IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::place_at_head(class IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* arg2)

00675c50  {
00675c58      uint32_t id = arg2->m_hashKey.id;
00675c67      int32_t* eax_3 = this->m_hash.m_buckets[(COMBINE(0, id) % this->m_hash.m_numBuckets)];
00675c67      
00675c6b      if (eax_3 == 0)
00675c6b      {
00675c7e      label_675c7e:
00675c7e          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::add(this, arg2);
00675c6b      }
00675c6b      else
00675c6b      {
00675c72          while (*(uint32_t*)eax_3 != id)
00675c72          {
00675c74              eax_3 = eax_3[1];
00675c74              
00675c79              if (eax_3 == 0)
00675c79                  goto label_675c7e_1;
00675c72          }
00675c72          
00675ca8          if (eax_3 == 0)
00675ca8          {
00675c7e          label_675c7e_1:
00675c7e              IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::add(this, arg2);
00675ca8          }
00675ca8          else
00675cb1              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
00675c6b      }
00675c6b      
00675c86      arg2->dllist_next = this->m_list.head_;
00675c8b      class DLListData* head_ = this->m_list.head_;
00675c90      class DLListData** eax_4;
00675c90      
00675c90      if (head_ != 0)
00675c90      {
00675c92          head_->dllist_prev = &arg2->dllist_next;
00675c95          this->m_list.head_ = &arg2->dllist_next;
00675c86          arg2->dllist_prev = 0;
00675ca0          eax_4 = 1;
00675ca3          return 1;
00675c90      }
00675c90      
00675cb8      this->m_list.tail_ = &arg2->dllist_next;
00675cbb      this->m_list.head_ = &arg2->dllist_next;
00675c86      arg2->dllist_prev = 0;
00675cc6      eax_4 = 1;
00675cc9      return 1;
00675c50  }

00675ccc                                      90 90 90 90                                                              ....

00675cd0  void __thiscall LRU_List::LRU_List(class LRU_List* this, class CLBlockAllocator* arg2, struct DiskFileInfo_t* arg3)

00675cd0  {
00675ce1      this->initialized_fm = 0;
00675ce3      this->empty_fm = 1;
00675ce7      this->used_count_lm = 0;
00675cea      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>(&this->used_table_m, 0x400);
00675cd7      this->used_table_m.m_ihlIntrusive.m_list.head_ = 0;
00675cd7      this->used_table_m.m_ihlIntrusive.m_list.tail_ = nullptr;
00675d00      this->dead_table_m.vtable = 0x7e1ef8;
00675d0a      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashSetData<IDClass<_tagDataID,32,0> > *,1>(&this->dead_table_m.m_intrusiveTable, 0x400);
00675d17      this->block_man_pm = arg2;
00675d1e      this->young_pm = nullptr;
00675d24      this->old_pm = nullptr;
00675d2a      this->file_info_pm = arg3;
00675cd0  }

00675d37                                                                       90 90 90 90 90 90 90 90 90                         .........

00675d40  void __fastcall LRU_List::~LRU_List(class LRU_List* this)

00675d40  {
00675d45      struct LRUB_Mem_t* young_pm = this->young_pm;
00675d4f      this->initialized_fm = 0;
00675d4f      
00675d51      if (young_pm != 0)
00675d51      {
00675d53          uint8_t* buffer_cpm = young_pm->buffer_cpm;
00675d58          young_pm->offset_lm = 0;
00675d5a          young_pm->size_lm = 0;
00675d5d          young_pm->max_lm = 0;
00675d60          young_pm->above_lm = 0;
00675d63          young_pm->below_lm = 0xffffffff;
00675d6a          young_pm->info_pm = nullptr;
00675d6d          young_pm->DIds_pm = nullptr;
00675d6d          
00675d70          if (buffer_cpm != 0)
00675d70          {
00675d73              operator delete[](buffer_cpm);
00675d7b              young_pm->buffer_cpm = nullptr;
00675d70          }
00675d70          
00675d7f          operator delete(young_pm);
00675d51      }
00675d51      
00675d87      struct LRUB_Mem_t* old_pm = this->old_pm;
00675d8f      this->young_pm = nullptr;
00675d8f      
00675d95      if (old_pm != 0)
00675d95      {
00675d97          uint8_t* buffer_cpm_1 = old_pm->buffer_cpm;
00675d9c          old_pm->offset_lm = 0;
00675d9e          old_pm->size_lm = 0;
00675da1          old_pm->max_lm = 0;
00675da4          old_pm->above_lm = 0;
00675da7          old_pm->below_lm = 0xffffffff;
00675dae          old_pm->info_pm = nullptr;
00675db1          old_pm->DIds_pm = nullptr;
00675db1          
00675db4          if (buffer_cpm_1 != 0)
00675db4          {
00675db7              operator delete[](buffer_cpm_1);
00675dbf              old_pm->buffer_cpm = nullptr;
00675db4          }
00675db4          
00675dc3          operator delete(old_pm);
00675d95      }
00675d95      
00675dd1      this->old_pm = nullptr;
00675dd7      this->block_man_pm = nullptr;
00675ddd      this->file_info_pm = nullptr;
00675de5      this->dead_table_m.vtable = 0x7e1ef8;
00675def      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->dead_table_m.m_intrusiveTable);
00675df4      class HashSetData<IDClass<_tagDataID,32,0> >** m_buckets = this->dead_table_m.m_intrusiveTable.m_buckets;
00675dcb      this->dead_table_m.m_intrusiveTable.vtable = 0x7e1ef4;
00675dcb      
00675e02      if (m_buckets != &this->dead_table_m.m_intrusiveTable.m_aInplaceBuckets)
00675e05          operator delete[](m_buckets);
00675e05      
00675dcb      this->dead_table_m.m_intrusiveTable.m_buckets = nullptr;
00675dcb      this->dead_table_m.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00675dcb      this->dead_table_m.m_intrusiveTable.m_numBuckets = 0;
00675dcb      this->dead_table_m.m_intrusiveTable.m_numElements = 0;
00675e1e      IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->used_table_m);
00675e23      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_buckets_1 = this->used_table_m.m_ihlIntrusive.m_hash.m_buckets;
00675e19      this->used_table_m.m_ihlIntrusive.m_hash.vtable = &IntrusiveHashTable<class IDClass<struct _tagDataID,32,0>,struct HashList<class IDClass<struct _tagDataID,32,0>,bool,1>::HashListData*,1>::`vftable';
00675e19      
00675e31      if (m_buckets_1 != &this->used_table_m.m_ihlIntrusive.m_hash.m_aInplaceBuckets)
00675e34          operator delete[](m_buckets_1);
00675e34      
00675e19      this->used_table_m.m_ihlIntrusive.m_hash.m_buckets = nullptr;
00675e19      this->used_table_m.m_ihlIntrusive.m_hash.m_firstInterestingBucket = nullptr;
00675e19      this->used_table_m.m_ihlIntrusive.m_hash.m_numBuckets = 0;
00675e19      this->used_table_m.m_ihlIntrusive.m_hash.m_numElements = 0;
00675d40  }

00675e4c                                      90 90 90 90                                                              ....

00675e50  void __fastcall LRU_List::Mark_Deleted(class LRU_List* this, class IDClass<_tagDataID,32,0> arg2)

00675e50  {
00675e5b      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->used_table_m, &arg2);
00675e5b      
00675e62      if (eax != 0)
00675e65          operator delete(eax);
00675e65      
00675e78      HashSet<IDClass<_tagDataID,32,0> >::add(&this->dead_table_m, &arg2);
00675e50  }

00675e81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00675e90  uint8_t __fastcall LRU_List::Write_All_Out(class LRU_List* this)

00675e90  {
00675e97      struct LRUB_Mem_t* young_pm = this->young_pm;
00675e9d      void* __offset(DLListData, -0x8) ebx = nullptr;
00675e9d      
00675ea1      if (young_pm != 0)
00675ea1      {
00675ea7          int32_t offset_lm = young_pm->offset_lm;
00675eac          int32_t used_lm = young_pm->info_pm->used_lm;
00675eac          
00675ec3          while (this->used_table_m.m_ihlIntrusive.m_hash.m_numElements > 0)
00675ec3          {
00675ec9              class DLListData* tail_ = this->used_table_m.m_ihlIntrusive.m_list.tail_;
00675ec9              
00675ece              if (tail_ != 0)
00675ece              {
00675ed0                  class DLListData* dllist_prev = tail_->dllist_prev;
00675ed0                  
00675ed5                  if (dllist_prev == 0)
00675ed5                  {
00675edd                      class DLListData* head_ = this->used_table_m.m_ihlIntrusive.m_list.head_;
00675ee0                      void* ecx;
00675ee0                      ecx = head_->dllist_next;
00675ee0                      *(uint8_t*)((char*)ecx)[1] = *(uint8_t*)((char*)head_->dllist_next)[1];
00675ee4                      this->used_table_m.m_ihlIntrusive.m_list.head_ = ecx;
00675ee4                      
00675ee7                      if (ecx != 0)
00675ee9                          *(uint32_t*)((char*)ecx + 4) = 0;
00675ed5                  }
00675ed5                  else
00675ed5                  {
00675ed7                      int16_t dllist_next_1 = ((int16_t)tail_->dllist_next);
00675ed9                      dllist_prev->dllist_next = dllist_next_1;
00675ed9                      *(uint8_t*)((char*)dllist_prev->dllist_next)[1] = *(uint8_t*)((char*)dllist_next_1)[1];
00675ed5                  }
00675ed5                  
00675eec                  class DLListData* dllist_next = tail_->dllist_next;
00675eec                  
00675ef0                  if (dllist_next == 0)
00675ef0                  {
00675efd                      class DLListData* dllist_prev_1 = this->used_table_m.m_ihlIntrusive.m_list.tail_->dllist_prev;
00675f02                      this->used_table_m.m_ihlIntrusive.m_list.tail_ = dllist_prev_1;
00675f02                      
00675f05                      if (dllist_prev_1 != 0)
00675f07                          dllist_prev_1->dllist_next = 0;
00675ef0                  }
00675ef0                  else
00675ef5                      dllist_next->dllist_prev = tail_->dllist_prev;
00675ef5                  
00675f0b                  tail_->dllist_next = 0;
00675f0d                  tail_->dllist_prev = nullptr;
00675f0d                  
00675f10                  if (tail_ != 0)
00675f12                      ebx = &tail_[-1];
00675ece              }
00675ece              
00675f15              int32_t esi_1 = *(int32_t*)((char*)ADJ(ebx) + -8);
00675f1b              uint32_t temp1_1 = (COMBINE(0, esi_1) % this->used_table_m.m_ihlIntrusive.m_hash.m_numBuckets);
00675f1e              struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_buckets = this->used_table_m.m_ihlIntrusive.m_hash.m_buckets;
00675f21              int32_t* i_1 = m_buckets[temp1_1];
00675f27              int32_t* i = i_1;
00675f27              
00675f2b              if (i != 0)
00675f2b              {
00675f2d                  int32_t* i_2 = i_1;
00675f2d                  
00675f39                  do
00675f39                  {
00675f32                      if (*(uint32_t*)i == esi_1)
00675f32                      {
00675f3f                          if (i != 0)
00675f3f                          {
00675f43                              if (i_2 == i)
00675f24                                  m_buckets[temp1_1] = i_2[1];
00675f43                              else
00675f43                              {
00675f4c                                  int32_t* i_3;
00675f4c                                  
00675f4c                                  do
00675f4c                                  {
00675f45                                      i_3 = i_2;
00675f47                                      i_2 = i_2[1];
00675f4c                                  } while (i_2 != i);
00675f4c                                  
00675f50                                  if (i_3 != 0)
00675f5d                                      i_3[1] = i_2[1];
00675f50                                  else
00675f24                                      m_buckets[temp1_1] = i_2[1];
00675f43                              }
00675f43                              
00675f60                              this->used_table_m.m_ihlIntrusive.m_hash.m_numElements -= 1;
00675f3f                          }
00675f3f                          
00675f3f                          break;
00675f32                      }
00675f32                      
00675f34                      i = i[1];
00675f39                  } while (i != 0);
00675f2b              }
00675f2b              
00675f63              class IDClass<_tagDataID,32,0> esi_2 = *(int32_t*)((char*)ADJ(ebx) + -8);
00675f66              class IDClass<_tagDataID,32,0> var_c = esi_2;
00675f6a              operator delete(ebx);
00675f6f              struct LRUB_Mem_t* young_pm_1 = this->young_pm;
00675f75              struct LRUB_Info_t* info_pm_1 = young_pm_1->info_pm;
00675f75              
00675f8c              if (((info_pm_1 == 0 || young_pm_1->DIds_pm == 0) || info_pm_1->used_lm >= young_pm_1->max_lm))
00675f93                  LRU_List::Expand_Trans(this, esi_2, 0);
00675f8c              else
00675f8c              {
00675f9a                  struct LRUB_Info_t* info_pm_2 = young_pm_1->info_pm;
00675f9a                  
00675f9f                  if (info_pm_2 != 0)
00675f9f                  {
00675fa1                      class IDClass<_tagDataID,32,0>* DIds_pm = young_pm_1->DIds_pm;
00675fa1                      
00675fa6                      if (DIds_pm != 0)
00675fa6                      {
00675fa8                          int32_t used_lm_1 = info_pm_2->used_lm;
00675fa8                          
00675fae                          if (used_lm_1 < young_pm_1->max_lm)
00675fae                          {
00675fb0                              DIds_pm[used_lm_1].id = esi_2;
00675fb3                              struct LRUB_Info_t* info_pm = young_pm_1->info_pm;
00675fb6                              info_pm->used_lm += 1;
00675fae                          }
00675fa6                      }
00675f9f                  }
00675f8c              }
00675f8c              
00675fc4              HashSet<IDClass<_tagDataID,32,0> >::add(&this->dead_table_m, &var_c);
00675fc9              ebx = nullptr;
00675ec3          }
00675ec3          
00675fdc          LRU_List::Purge_Duplicates(this, offset_lm, used_lm);
00675ea1      }
00675ea1      
00675fe4      young_pm = 0;
00675fea      return 0;
00675e90  }

00675feb                                   90 90 90 90 90                                                             .....

00675ff0  uint8_t __thiscall HashList<IDClass<_tagDataID,32,0>,bool,1>::move_to_head(class HashList<IDClass<_tagDataID,32,0>,bool,1>* this, class IDClass<_tagDataID,32,0>* arg2)

00675ff0  {
00675ff5      uint32_t id = arg2->id;
00676004      int32_t* eax_3 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, id) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
00676004      
00676008      if (eax_3 != 0)
00676008      {
00676012          while (*(uint32_t*)eax_3 != id)
00676012          {
00676014              eax_3 = eax_3[1];
00676014              
00676019              if (eax_3 == 0)
00676019              {
0067601b                  eax_3 = 0;
0067601e                  return 0;
00676019              }
00676012          }
00676012          
00676023          if (eax_3 != 0)
00676030              /* tailcall */
00676030              return IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::place_at_head(this, eax_3);
00676008      }
00676008      
00676025      eax_3 = 0;
00676028      return 0;
00675ff0  }

00676035                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00676040  uint8_t __thiscall IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::push_head(class IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* arg2)

00676040  {
00676048      uint32_t id = arg2->m_hashKey.id;
00676048      
0067605b      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, id) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
0067605b      {
00676062          if (*(uint32_t*)i == id)
00676062          {
00676098              if (i == 0)
00676098                  break;
00676098              
0067609b              i = 0;
0067609e              return 0;
00676062          }
0067605b      }
0067605b      
0067606e      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::add(this, arg2);
00676076      arg2->dllist_next = this->m_list.head_;
0067607b      class DLListData* head_ = this->m_list.head_;
00676080      class DLListData** eax_3;
00676080      
00676080      if (head_ != 0)
00676080      {
00676082          head_->dllist_prev = &arg2->dllist_next;
00676085          this->m_list.head_ = &arg2->dllist_next;
00676076          arg2->dllist_prev = nullptr;
00676090          eax_3 = 1;
00676093          return 1;
00676080      }
00676080      
006760a1      this->m_list.tail_ = &arg2->dllist_next;
006760a4      this->m_list.head_ = &arg2->dllist_next;
00676076      arg2->dllist_prev = nullptr;
006760af      eax_3 = 1;
006760b2      return 1;
00676040  }

006760b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006760c0  uint8_t __thiscall HashList<IDClass<_tagDataID,32,0>,bool,1>::push_head(class HashList<IDClass<_tagDataID,32,0>,bool,1>* this, class IDClass<_tagDataID,32,0>* arg2, uint8_t const* arg3)

006760c0  {
006760c8      uint32_t id = arg2->id;
006760c8      
006760d9      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, id) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
006760d9      {
006760e2          if (*(uint32_t*)i == id)
006760e2          {
00676121              if (i != 0)
0067612d                  return HashList<IDClass<_tagDataID,32,0>,bool,1>::move_to_head(this, arg2);
0067612d              
00676121              break;
006760e2          }
006760d9      }
006760d9      
006760ed      void* eax_2 = operator new(0x14);
006760f7      void* esi_1;
006760f7      
006760f7      if (eax_2 == 0)
00676130          esi_1 = nullptr;
006760f7      else
006760f7      {
006760ff          *(uint32_t*)eax_2 = arg2->id;
00676101          *(uint32_t*)((char*)eax_2 + 4) = 0;
00676108          *(uint32_t*)((char*)eax_2 + 8) = 0;
0067610f          *(uint32_t*)((char*)eax_2 + 0xc) = 0;
00676116          uint32_t ecx;
00676116          ecx = *(uint8_t*)arg3;
00676118          *(uint8_t*)((char*)eax_2 + 0x10) = ecx;
0067611b          esi_1 = eax_2;
006760f7      }
006760f7      
0067613b      int32_t ebx;
0067613b      ebx = IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::push_head(this, esi_1);
0067613b      
00676143      if ((ebx == 0 && esi_1 != 0))
00676146          operator delete(esi_1);
00676146      
00676153      return ebx;
006760c0  }

006760dd                                                                                         8d 49 00                               .I.
00676156                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00676160  void __fastcall LRU_List::Mark_Used(class LRU_List* this, class IDClass<_tagDataID,32,0> arg2)

00676160  {
00676160      class LRU_List* this_1 = this;
00676170      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->dead_table_m.m_intrusiveTable, &arg2);
00676170      
00676177      if (eax != 0)
0067617a          operator delete(eax);
0067617a      
00676191      *(uint8_t*)((char*)this_1)[3] = 1;
00676196      HashList<IDClass<_tagDataID,32,0>,bool,1>::push_head(&this->used_table_m, &arg2, &*(uint32_t*)((char*)this_1)[3]);
00676196      
006761a2      if (this->used_table_m.m_ihlIntrusive.m_hash.m_numElements >= 0x1000)
006761a6          HashList<IDClass<_tagDataID,32,0>,bool,1>::pop_tail(&this->used_table_m);
00676160  }

006761b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

006761c0  void __fastcall DiskTransactInfo::DiskTransactInfo(class DiskTransactInfo* this)

006761c0  {
006761c2      this->vtable = &DiskTransactInfo::`vftable';
006761c8      this->m_eTransactType = NO_TRANS;
006761cf      this->m_nMagicNumber = 0x4c50;
006761c0  }

006761d7                                                                       90 90 90 90 90 90 90 90 90                         .........

006761e0  void __fastcall MergeNodesTransactInfo::MergeNodesTransactInfo(class MergeNodesTransactInfo* this)

006761e0  {
006761e4      this->m_eTransactType = MERGE_NODES_TRANS;
006761eb      this->m_nMagicNumber = 0x4c50;
006761f2      this->vtable = 0x7fdca0;
006761f8      __builtin_memset(&this->m_nNodeOffset, 0, 0x14);
006761e0  }

00676208                          90 90 90 90 90 90 90 90                                                          ........

00676210  void __fastcall SplitNodeTransactInfo::SplitNodeTransactInfo(class SplitNodeTransactInfo* this)

00676210  {
00676214      this->m_eTransactType = SPLIT_NODE_TRANS;
0067621b      this->m_nMagicNumber = 0x4c50;
00676222      this->vtable = 0x7fdcf0;
00676228      this->m_nParentOffset = 0;
0067622b      this->m_nParentEntries = 0;
0067622e      this->m_nSplitIndex = 0;
00676231      this->m_nFirstFreeBlock = 0;
00676210  }

00676235                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00676240  void __fastcall LRUDeleteTransactInfo::LRUDeleteTransactInfo(class LRUDeleteTransactInfo* this)

00676240  {
00676244      this->m_eTransactType = LRU_DELETE_TRANS;
0067624b      this->m_nMagicNumber = 0x4c50;
00676252      this->vtable = 0x7fdd40;
00676258      this->m_nBlockOffset = 0;
0067625b      this->m_nOldOffset = 0;
0067625e      this->m_nYoungOffset = 0;
00676240  }

00676262        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00676270  void __thiscall DiskTransactInfo::Serialize(class DiskTransactInfo* this, class Archive* arg2)

00676270  {
0067627c      Archive::CheckAlignment(arg2, 4);
00676285      int32_t* eax = Archive::GetBytes(arg2, 4);
00676285      
0067628c      if (eax != 0)
0067628c      {
00676292          if ((arg2->m_flags & 1) != 0)
00676292          {
00676298              *(uint32_t*)eax = this->m_nMagicNumber;
0067629b              return;
00676292          }
00676292          
006762a0          this->m_nMagicNumber = *(uint32_t*)eax;
0067628c      }
00676270  }

006762a8                          90 90 90 90 90 90 90 90                                                          ........

006762b0  void __thiscall AddObjectTransactInfo::Serialize(class AddObjectTransactInfo* this, class Archive* arg2)

006762b0  {
006762bc      Archive::CheckAlignment(arg2, 4);
006762c5      uint8_t* eax = Archive::GetBytes(arg2, 4);
006762c5      
006762cc      if (eax != 0)
006762cc      {
006762d2          if ((arg2->m_flags & 1) == 0)
006762dd              this->m_nMagicNumber = *(uint32_t*)eax;
006762d2          else
006762d7              *(uint32_t*)eax = this->m_nMagicNumber;
006762cc      }
006762cc      
006762e5      struct BTEntry* edi = &this->m_entry;
006762e8      Archive::CheckAlignment(arg2, 0x18);
006762f1      uint8_t* eax_1 = Archive::GetBytes(arg2, 0x18);
006762f1      
006762f8      if (eax_1 != 0)
006762f8      {
00676304          uint8_t* esi_1;
00676304          
00676304          if ((arg2->m_flags & 1) == 0)
0067630c              esi_1 = eax_1;
00676304          else
00676304          {
00676306              esi_1 = edi;
00676308              edi = eax_1;
00676304          }
00676304          
0067630e          __builtin_memcpy(edi, esi_1, 0x18);
006762f8      }
006762f8      
00676315      Archive::CheckAlignment(arg2, 4);
0067631e      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
0067631e      
00676326      if (eax_2 != 0)
00676326      {
0067632c          if ((arg2->m_flags & 1) == 0)
00676337              this->m_nFirstFreeBlock = *(uint32_t*)eax_2;
0067632c          else
00676331              *(uint32_t*)eax_2 = this->m_nFirstFreeBlock;
00676326      }
00676326      
0067633e      Archive::CheckAlignment(arg2, 4);
00676347      int32_t* eax_3 = Archive::GetBytes(arg2, 4);
00676347      
0067634e      if (eax_3 != 0)
0067634e      {
00676354          if ((arg2->m_flags & 1) != 0)
00676354          {
0067635a              *(uint32_t*)eax_3 = this->m_nNodeEntries;
0067635d              return;
00676354          }
00676354          
00676362          this->m_nNodeEntries = *(uint32_t*)eax_3;
0067634e      }
006762b0  }

0067636a                                90 90 90 90 90 90                                                            ......

00676370  void __fastcall DeleteLeafTransactInfo::DeleteLeafTransactInfo(class DeleteLeafTransactInfo* this)

00676370  {
00676372      this->m_eTransactType = DELETE_LEAF_TRANS;
00676379      this->m_nMagicNumber = 0x4c50;
00676380      this->vtable = 0x7fdd90;
0067638c      this->m_cObjectDID.id = INVALID_DID.id;
00676391      this->m_nNodeOffset = 0;
00676394      this->m_nIndex = 0;
00676370  }

00676398                                                                          90 90 90 90 90 90 90 90                          ........

006763a0  void __fastcall DeleteInternalTransactInfo::DeleteInternalTransactInfo(class DeleteInternalTransactInfo* this)

006763a0  {
006763a2      this->m_eTransactType = DELETE_INTERNAL_TRANS;
006763a9      this->m_nMagicNumber = 0x4c50;
006763b0      this->vtable = 0x7fdde0;
006763bc      this->m_cTargetDID.id = INVALID_DID.id;
006763c7      this->m_cDonorDID.id = INVALID_DID.id;
006763ca      this->m_nTargetOffset = 0;
006763cd      this->m_nDonorOffset = 0;
006763d0      this->m_nTargetIndex = 0;
006763d3      this->m_nDonorIndex = 0;
006763a0  }

006763d7                                                                       90 90 90 90 90 90 90 90 90                         .........

006763e0  void __thiscall DeleteInternalTransactInfo::Serialize(class DeleteInternalTransactInfo* this, class Archive* arg2)

006763e0  {
006763ed      Archive::CheckAlignment(arg2, 4);
006763f6      uint8_t* eax = Archive::GetBytes(arg2, 4);
006763f6      
006763ff      if (eax != 0)
006763ff      {
00676404          if ((arg2->m_flags & 1) == 0)
0067640f              this->m_nMagicNumber = *(uint32_t*)eax;
00676404          else
00676409              *(uint32_t*)eax = this->m_nMagicNumber;
006763ff      }
006763ff      
00676416      Archive::CheckAlignment(arg2, 4);
0067641f      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
0067641f      
00676426      if (eax_1 != 0)
00676426      {
0067642b          if ((arg2->m_flags & 1) == 0)
00676436              this->m_cTargetDID.id = *(uint32_t*)eax_1;
0067642b          else
00676430              *(uint32_t*)eax_1 = this->m_cTargetDID.id;
00676426      }
00676426      
0067643d      Archive::CheckAlignment(arg2, 4);
00676446      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
00676446      
0067644d      if (eax_2 != 0)
0067644d      {
00676452          if ((arg2->m_flags & 1) == 0)
0067645d              this->m_cDonorDID.id = *(uint32_t*)eax_2;
00676452          else
00676457              *(uint32_t*)eax_2 = this->m_cDonorDID.id;
0067644d      }
0067644d      
00676464      Archive::CheckAlignment(arg2, 4);
0067646d      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0067646d      
00676474      if (eax_3 != 0)
00676474      {
00676479          if ((arg2->m_flags & 1) == 0)
00676484              this->m_nTargetOffset = *(uint32_t*)eax_3;
00676479          else
0067647e              *(uint32_t*)eax_3 = this->m_nTargetOffset;
00676474      }
00676474      
0067648b      Archive::CheckAlignment(arg2, 4);
00676494      uint8_t* eax_4 = Archive::GetBytes(arg2, 4);
00676494      
0067649b      if (eax_4 != 0)
0067649b      {
006764a0          if ((arg2->m_flags & 1) == 0)
006764ab              this->m_nDonorOffset = *(uint32_t*)eax_4;
006764a0          else
006764a5              *(uint32_t*)eax_4 = this->m_nDonorOffset;
0067649b      }
0067649b      
006764b2      Archive::CheckAlignment(arg2, 4);
006764bb      uint8_t* eax_5 = Archive::GetBytes(arg2, 4);
006764bb      
006764c2      if (eax_5 != 0)
006764c2      {
006764c7          if ((arg2->m_flags & 1) == 0)
006764d2              this->m_nTargetIndex = *(uint32_t*)eax_5;
006764c7          else
006764cc              *(uint32_t*)eax_5 = this->m_nTargetIndex;
006764c2      }
006764c2      
006764d9      Archive::CheckAlignment(arg2, 4);
006764e2      int32_t* eax_6 = Archive::GetBytes(arg2, 4);
006764e2      
006764e9      if (eax_6 != 0)
006764e9      {
006764ee          if ((arg2->m_flags & 1) != 0)
006764ee          {
006764f5              *(uint32_t*)eax_6 = this->m_nDonorIndex;
006764f8              return;
006764ee          }
006764ee          
006764fd          this->m_nDonorIndex = *(uint32_t*)eax_6;
006764e9      }
006763e0  }

00676506                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00676510  void __thiscall MergeNodesTransactInfo::Serialize(class MergeNodesTransactInfo* this, class Archive* arg2)

00676510  {
0067651d      Archive::CheckAlignment(arg2, 4);
00676526      uint8_t* eax = Archive::GetBytes(arg2, 4);
00676526      
0067652f      if (eax != 0)
0067652f      {
00676534          if ((arg2->m_flags & 1) == 0)
0067653f              this->m_nMagicNumber = *(uint32_t*)eax;
00676534          else
00676539              *(uint32_t*)eax = this->m_nMagicNumber;
0067652f      }
0067652f      
00676546      Archive::CheckAlignment(arg2, 4);
0067654f      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
0067654f      
00676556      if (eax_1 != 0)
00676556      {
0067655b          if ((arg2->m_flags & 1) == 0)
00676566              this->m_nNodeOffset = *(uint32_t*)eax_1;
0067655b          else
00676560              *(uint32_t*)eax_1 = this->m_nNodeOffset;
00676556      }
00676556      
0067656d      Archive::CheckAlignment(arg2, 4);
00676576      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
00676576      
0067657d      if (eax_2 != 0)
0067657d      {
00676582          if ((arg2->m_flags & 1) == 0)
0067658d              this->m_nLeftOffset = *(uint32_t*)eax_2;
00676582          else
00676587              *(uint32_t*)eax_2 = this->m_nLeftOffset;
0067657d      }
0067657d      
00676594      Archive::CheckAlignment(arg2, 4);
0067659d      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0067659d      
006765a4      if (eax_3 != 0)
006765a4      {
006765a9          if ((arg2->m_flags & 1) == 0)
006765b4              this->m_nRightOffset = *(uint32_t*)eax_3;
006765a9          else
006765ae              *(uint32_t*)eax_3 = this->m_nRightOffset;
006765a4      }
006765a4      
006765bb      Archive::CheckAlignment(arg2, 4);
006765c4      uint8_t* eax_4 = Archive::GetBytes(arg2, 4);
006765c4      
006765cb      if (eax_4 != 0)
006765cb      {
006765d0          if ((arg2->m_flags & 1) == 0)
006765db              this->m_nIndex = *(uint32_t*)eax_4;
006765d0          else
006765d5              *(uint32_t*)eax_4 = this->m_nIndex;
006765cb      }
006765cb      
006765e2      Archive::CheckAlignment(arg2, 4);
006765eb      int32_t* eax_5 = Archive::GetBytes(arg2, 4);
006765eb      
006765f2      if (eax_5 != 0)
006765f2      {
006765f7          if ((arg2->m_flags & 1) != 0)
006765f7          {
006765fe              *(uint32_t*)eax_5 = this->m_nNodeEntries;
00676601              return;
006765f7          }
006765f7          
00676606          this->m_nNodeEntries = *(uint32_t*)eax_5;
006765f2      }
00676510  }

0067660f                                               90                                                                 .

00676610  void __thiscall UpdateObjectTransactInfo::Serialize(class UpdateObjectTransactInfo* this, class Archive* arg2)

00676610  {
00676619      AddObjectTransactInfo::Serialize(this, arg2);
00676622      Archive::CheckAlignment(arg2, 4);
0067662b      uint8_t* eax = Archive::GetBytes(arg2, 4);
0067662b      
00676632      if (eax != 0)
00676632      {
00676638          if ((arg2->m_flags & 1) == 0)
00676643              this->m_nEntryIndex = *(uint32_t*)eax;
00676638          else
0067663d              *(uint32_t*)eax = this->m_nEntryIndex;
00676632      }
00676632      
0067664a      Archive::CheckAlignment(arg2, 4);
00676653      int32_t* eax_1 = Archive::GetBytes(arg2, 4);
00676653      
0067665a      if (eax_1 != 0)
0067665a      {
00676660          if ((arg2->m_flags & 1) != 0)
00676660          {
00676666              *(uint32_t*)eax_1 = this->m_nOldOffset;
00676669              return;
00676660          }
00676660          
0067666e          this->m_nOldOffset = *(uint32_t*)eax_1;
0067665a      }
00676610  }

00676676                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00676680  void __thiscall SplitNodeTransactInfo::Serialize(class SplitNodeTransactInfo* this, class Archive* arg2)

00676680  {
0067668d      Archive::CheckAlignment(arg2, 4);
00676696      uint8_t* eax = Archive::GetBytes(arg2, 4);
00676696      
0067669f      if (eax != 0)
0067669f      {
006766a4          if ((arg2->m_flags & 1) == 0)
006766af              this->m_nMagicNumber = *(uint32_t*)eax;
006766a4          else
006766a9              *(uint32_t*)eax = this->m_nMagicNumber;
0067669f      }
0067669f      
006766b6      Archive::CheckAlignment(arg2, 4);
006766bf      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
006766bf      
006766c6      if (eax_1 != 0)
006766c6      {
006766cb          if ((arg2->m_flags & 1) == 0)
006766d6              this->m_nParentOffset = *(uint32_t*)eax_1;
006766cb          else
006766d0              *(uint32_t*)eax_1 = this->m_nParentOffset;
006766c6      }
006766c6      
006766dd      Archive::CheckAlignment(arg2, 4);
006766e6      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
006766e6      
006766ed      if (eax_2 != 0)
006766ed      {
006766f2          if ((arg2->m_flags & 1) == 0)
006766fd              this->m_nParentEntries = *(uint32_t*)eax_2;
006766f2          else
006766f7              *(uint32_t*)eax_2 = this->m_nParentEntries;
006766ed      }
006766ed      
00676704      Archive::CheckAlignment(arg2, 4);
0067670d      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0067670d      
00676714      if (eax_3 != 0)
00676714      {
00676719          if ((arg2->m_flags & 1) == 0)
00676724              this->m_nSplitIndex = *(uint32_t*)eax_3;
00676719          else
0067671e              *(uint32_t*)eax_3 = this->m_nSplitIndex;
00676714      }
00676714      
0067672b      Archive::CheckAlignment(arg2, 4);
00676734      int32_t* eax_4 = Archive::GetBytes(arg2, 4);
00676734      
0067673b      if (eax_4 != 0)
0067673b      {
00676740          if ((arg2->m_flags & 1) != 0)
00676740          {
00676747              *(uint32_t*)eax_4 = this->m_nFirstFreeBlock;
0067674a              return;
00676740          }
00676740          
0067674f          this->m_nFirstFreeBlock = *(uint32_t*)eax_4;
0067673b      }
00676680  }

00676758                                                                          90 90 90 90 90 90 90 90                          ........

00676760  void __fastcall RotateEntryTransactInfo::RotateEntryTransactInfo(class RotateEntryTransactInfo* this)

00676760  {
00676764      this->m_eTransactType = ROTATE_TRANS;
0067676b      this->m_nMagicNumber = 0x4c50;
00676772      this->vtable = 0x7fde30;
00676778      this->m_nParentOffset = 0;
00676781      this->m_cEntryDID.id = INVALID_DID.id;
00676784      this->m_nIndex = 0;
00676787      this->m_nNodeEntryCount = 0;
0067678a      this->m_nSiblingEntryCount = 0;
0067678d      this->m_bLeftSibling = 0;
00676760  }

00676791                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

006767a0  void __thiscall RotateEntryTransactInfo::Serialize(class RotateEntryTransactInfo* this, class Archive* arg2)

006767a0  {
006767ad      Archive::CheckAlignment(arg2, 4);
006767b6      uint8_t* eax = Archive::GetBytes(arg2, 4);
006767b6      
006767bf      if (eax != 0)
006767bf      {
006767c4          if ((arg2->m_flags & 1) == 0)
006767cf              this->m_nMagicNumber = *(uint32_t*)eax;
006767c4          else
006767c9              *(uint32_t*)eax = this->m_nMagicNumber;
006767bf      }
006767bf      
006767d6      Archive::CheckAlignment(arg2, 4);
006767df      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
006767df      
006767e6      if (eax_1 != 0)
006767e6      {
006767eb          if ((arg2->m_flags & 1) == 0)
006767f6              this->m_nParentOffset = *(uint32_t*)eax_1;
006767eb          else
006767f0              *(uint32_t*)eax_1 = this->m_nParentOffset;
006767e6      }
006767e6      
006767fd      Archive::CheckAlignment(arg2, 4);
00676806      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
00676806      
0067680d      if (eax_2 != 0)
0067680d      {
00676812          if ((arg2->m_flags & 1) == 0)
0067681d              this->m_cEntryDID.id = *(uint32_t*)eax_2;
00676812          else
00676817              *(uint32_t*)eax_2 = this->m_cEntryDID.id;
0067680d      }
0067680d      
00676824      Archive::CheckAlignment(arg2, 4);
0067682d      uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0067682d      
00676834      if (eax_3 != 0)
00676834      {
00676839          if ((arg2->m_flags & 1) == 0)
00676844              this->m_nIndex = *(uint32_t*)eax_3;
00676839          else
0067683e              *(uint32_t*)eax_3 = this->m_nIndex;
00676834      }
00676834      
0067684b      Archive::CheckAlignment(arg2, 4);
00676854      uint8_t* eax_4 = Archive::GetBytes(arg2, 4);
00676854      
0067685b      if (eax_4 != 0)
0067685b      {
00676860          if ((arg2->m_flags & 1) == 0)
0067686b              this->m_nNodeEntryCount = *(uint32_t*)eax_4;
00676860          else
00676865              *(uint32_t*)eax_4 = this->m_nNodeEntryCount;
0067685b      }
0067685b      
00676872      Archive::CheckAlignment(arg2, 4);
0067687b      int32_t* eax_5 = Archive::GetBytes(arg2, 4);
0067687b      
00676882      if (eax_5 != 0)
00676882      {
00676887          if ((arg2->m_flags & 1) != 0)
00676887          {
00676891              *(uint32_t*)eax_5 = this->m_nSiblingEntryCount;
00676893              Serializer::SerializeObject(&this->m_bLeftSibling, arg2);
0067689e              return;
00676887          }
00676887          
006768a3          this->m_nSiblingEntryCount = *(uint32_t*)eax_5;
00676882      }
00676882      
006768ab      Serializer::SerializeObject(&this->m_bLeftSibling, arg2);
006767a0  }

006768b9                                                                             90 90 90 90 90 90 90                           .......

006768c0  void __fastcall LRUExpandTransactInfo::LRUExpandTransactInfo(class LRUExpandTransactInfo* this)

006768c0  {
006768c4      this->m_eTransactType = LRU_EXPAND_TRANS;
006768cb      this->m_nMagicNumber = 0x4c50;
006768d2      this->vtable = 0x7fde80;
006768d8      this->m_nYoungOffset = 0;
006768db      this->m_nFirstFreeBlock = 0;
006768e4      this->m_cTargetDID.id = INVALID_DID.id;
006768c0  }

006768e8                          90 90 90 90 90 90 90 90                                                          ........

006768f0  void __thiscall DeleteLeafTransactInfo::Serialize(class DeleteLeafTransactInfo* this, class Archive* arg2)

006768f0  {
006768fd      Archive::CheckAlignment(arg2, 4);
00676906      uint8_t* eax = Archive::GetBytes(arg2, 4);
00676906      
0067690f      if (eax != 0)
0067690f      {
00676914          if ((arg2->m_flags & 1) == 0)
0067691f              this->m_nMagicNumber = *(uint32_t*)eax;
00676914          else
00676919              *(uint32_t*)eax = this->m_nMagicNumber;
0067690f      }
0067690f      
00676926      Archive::CheckAlignment(arg2, 4);
0067692f      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
0067692f      
00676936      if (eax_1 != 0)
00676936      {
0067693b          if ((arg2->m_flags & 1) == 0)
00676946              this->m_cObjectDID.id = *(uint32_t*)eax_1;
0067693b          else
00676940              *(uint32_t*)eax_1 = this->m_cObjectDID.id;
00676936      }
00676936      
0067694d      Archive::CheckAlignment(arg2, 4);
00676956      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
00676956      
0067695d      if (eax_2 != 0)
0067695d      {
00676962          if ((arg2->m_flags & 1) == 0)
0067696d              this->m_nNodeOffset = *(uint32_t*)eax_2;
00676962          else
00676967              *(uint32_t*)eax_2 = this->m_nNodeOffset;
0067695d      }
0067695d      
00676974      Archive::CheckAlignment(arg2, 4);
0067697d      int32_t* eax_3 = Archive::GetBytes(arg2, 4);
0067697d      
00676984      if (eax_3 != 0)
00676984      {
00676989          if ((arg2->m_flags & 1) != 0)
00676989          {
00676990              *(uint32_t*)eax_3 = this->m_nIndex;
00676993              return;
00676989          }
00676989          
00676998          this->m_nIndex = *(uint32_t*)eax_3;
00676984      }
006768f0  }

006769a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006769b0  void __fastcall AddObjectTransactInfo::AddObjectTransactInfo(class AddObjectTransactInfo* this)

006769b0  {
006769b2      this->m_eTransactType = ADD_OBJ_TRANS;
006769b9      this->m_nMagicNumber = 0x4c50;
006769c0      this->vtable = 0x7fded0;
006769cc      this->m_entry.__bitfield0 &= 0xffff0000;
006769d5      *(uint16_t*)((char*)this->m_entry.__bitfield0 + 2) = 0;
006769d9      this->m_entry.GID_.id = INVALID_DID.id;
006769dc      __builtin_memset(&this->m_entry.Offset_, 0, 0x18);
006769b0  }

006769ef                                               90                                                                 .

006769f0  void __fastcall UpdateObjectTransactInfo::UpdateObjectTransactInfo(class UpdateObjectTransactInfo* this)

006769f0  {
006769f2      this->m_eTransactType = ADD_OBJ_TRANS;
006769f9      this->vtable = 0x7fded0;
006769ff      this->m_nMagicNumber = 0x4c50;
00676a0c      this->m_entry.__bitfield0 &= 0xffff0000;
00676a15      *(uint16_t*)((char*)this->m_entry.__bitfield0 + 2) = 0;
00676a19      this->m_entry.GID_.id = INVALID_DID.id;
00676a1c      __builtin_memset(&this->m_entry.Offset_, 0, 0x20);
00676a2e      this->vtable = 0x7fdf20;
00676a3a      this->m_eTransactType = UPDATE_OBJ_TRANS;
006769f0  }

00676a42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00676a50  class DiskTransactInfo* DiskTransactInfo::CreateTransactInfo(enum DiskTransactType arg1)

00676a50  {
00676a57      switch (arg1)
00676a57      {
00676a66          case NO_TRANS:
00676a66          {
00676a66              void* result = operator new(0xc);
00676a66              
00676a70              if (result != 0)
00676a70              {
00676a76                  *(uint32_t*)result = &DiskTransactInfo::`vftable';
00676a7c                  *(uint32_t*)((char*)result + 4) = 0;
00676a83                  *(uint32_t*)((char*)result + 8) = 0x4c50;
00676a8a                  return result;
00676a70              }
00676a66              break;
00676a66          }
00676a8d          case ADD_OBJ_TRANS:
00676a8d          {
00676a8d              void* eax = operator new(0x2c);
00676a8d              
00676a97              if (eax != 0)
00676a9f                  /* tailcall */
00676a9f                  return AddObjectTransactInfo::AddObjectTransactInfo(eax);
00676a8d              break;
00676a8d          }
00676aa6          case DELETE_LEAF_TRANS:
00676aa6          {
00676aa6              void* eax_2 = operator new(0x18);
00676aa6              
00676ab0              if (eax_2 != 0)
00676ab8                  /* tailcall */
00676ab8                  return DeleteLeafTransactInfo::DeleteLeafTransactInfo(eax_2);
00676aa6              break;
00676aa6          }
00676abf          case DELETE_INTERNAL_TRANS:
00676abf          {
00676abf              void* eax_4 = operator new(0x24);
00676abf              
00676ac9              if (eax_4 != 0)
00676ad1                  /* tailcall */
00676ad1                  return DeleteInternalTransactInfo::DeleteInternalTransactInfo(eax_4);
00676abf              break;
00676abf          }
00676ad8          case MERGE_NODES_TRANS:
00676ad8          {
00676ad8              void* eax_6 = operator new(0x20);
00676ad8              
00676ae2              if (eax_6 != 0)
00676ae6                  /* tailcall */
00676ae6                  return MergeNodesTransactInfo::MergeNodesTransactInfo(eax_6);
00676ad8              break;
00676ad8          }
00676aed          case UPDATE_OBJ_TRANS:
00676aed          {
00676aed              void* eax_8 = operator new(0x34);
00676aed              
00676af7              if (eax_8 != 0)
00676afb                  /* tailcall */
00676afb                  return UpdateObjectTransactInfo::UpdateObjectTransactInfo(eax_8);
00676aed              break;
00676aed          }
00676b02          case SPLIT_NODE_TRANS:
00676b02          {
00676b02              void* eax_10 = operator new(0x1c);
00676b02              
00676b0c              if (eax_10 != 0)
00676b10                  /* tailcall */
00676b10                  return SplitNodeTransactInfo::SplitNodeTransactInfo(eax_10);
00676b02              break;
00676b02          }
00676b17          case ROTATE_TRANS:
00676b17          {
00676b17              void* eax_12 = operator new(0x24);
00676b17              
00676b21              if (eax_12 != 0)
00676b25                  /* tailcall */
00676b25                  return RotateEntryTransactInfo::RotateEntryTransactInfo(eax_12);
00676b17              break;
00676b17          }
00676b2c          case LRU_EXPAND_TRANS:
00676b2c          {
00676b2c              void* eax_14 = operator new(0x18);
00676b2c              
00676b36              if (eax_14 != 0)
00676b3a                  /* tailcall */
00676b3a                  return LRUExpandTransactInfo::LRUExpandTransactInfo(eax_14);
00676b2c              break;
00676b2c          }
00676b41          case LRU_DELETE_TRANS:
00676b41          {
00676b41              void* eax_16 = operator new(0x18);
00676b41              
00676b4b              if (eax_16 != 0)
00676b4f                  /* tailcall */
00676b4f                  return LRUDeleteTransactInfo::LRUDeleteTransactInfo(eax_16);
00676b41              break;
00676b41          }
00676a57      }
00676a57      
00676b56      return 0;
00676a50  }

00676b57                                                                       90                                                 .
00676b58  uint32_t jump_table_676b58[0xa] = 
00676b58  {
00676b58      [0x0] =  0x00676a64
00676b5c      [0x1] =  0x00676a8b
00676b60      [0x2] =  0x00676aa4
00676b64      [0x3] =  0x00676abd
00676b68      [0x4] =  0x00676ad6
00676b6c      [0x5] =  0x00676aeb
00676b70      [0x6] =  0x00676b00
00676b74      [0x7] =  0x00676b15
00676b78      [0x8] =  0x00676b2a
00676b7c      [0x9] =  0x00676b3f
00676b80  }

00676b80  void __fastcall DiskDev::DiskDev(class DiskDev* this)

00676b80  {
00676b82      this->_fd = 0xffffffff;
00676b80  }

00676b89                             90 90 90 90 90 90 90                                                           .......

00676b90  struct DiskFileInfo_t& __thiscall DiskFileInfo_t::operator=(struct DiskFileInfo_t* this, struct DiskFileInfo_t const& arg2)

00676b90  {
00676b99      this->magic_ = arg2->magic_;
00676b9e      this->iBlockSize_ = arg2->iBlockSize_;
00676ba4      this->fileSize_ = arg2->fileSize_;
00676baa      this->data_set_lm = arg2->data_set_lm;
00676bb0      this->data_subset_lm = arg2->data_subset_lm;
00676bb6      this->firstFree_ = arg2->firstFree_;
00676bbc      this->finalFree_ = arg2->finalFree_;
00676bc2      this->iFreeBlocks_ = arg2->iFreeBlocks_;
00676bc8      this->btreeRoot_ = arg2->btreeRoot_;
00676bce      this->young_lru_lm = arg2->young_lru_lm;
00676bd4      this->old_lru_lm = arg2->old_lru_lm;
00676bd7      int32_t edx_4;
00676bd7      edx_4 = arg2->use_lru_fm;
00676bda      this->use_lru_fm = edx_4;
00676be0      this->master_map_id_m.id = arg2->master_map_id_m.id;
00676be6      this->eng_pack_vnum = arg2->eng_pack_vnum;
00676bef      this->game_pack_vnum = arg2->game_pack_vnum;
00676bf6      DatIDStamp::DatIDStamp(&this->id_vnum, &arg2->id_vnum);
00676bfe      return this;
00676b90  }

00676c01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00676c10  int32_t __fastcall DiskDev::Close(class DiskDev* this)

00676c10  {
00676c13      void* _fd = this->_fd;
00676c13      
00676c1e      if ((_fd != 0xffffffff && CloseHandle(_fd) != 0))
00676c1e      {
00676c2c          this->_fd = 0xffffffff;
00676c35          return 0;
00676c1e      }
00676c1e      
00676c3a      return 0xffffff98;
00676c10  }

00676c3b                                                                                   90 90 90 90 90                             .....

00676c40  void __fastcall DiskDev::~DiskDev(class DiskDev* this)

00676c40  {
00676c43      void* _fd = this->_fd;
00676c43      
00676c48      if ((_fd != 0xffffffff && CloseHandle(_fd) != 0))
00676c55          this->_fd = 0xffffffff;
00676c40  }

00676c5d                                                                                         90 90 90                               ...

00676c60  int32_t __thiscall DiskDev::SyncRead(class DiskDev* this, void* arg2, uint32_t arg3, int32_t arg4)

00676c60  {
00676c78      if (SetFilePointer(this->_fd, arg4, nullptr, FILE_BEGIN) == 0xffffffff)
00676c80          return 0xffffff97;
00676c80      
00676c87      void* _fd = this->_fd;
00676c98      arg4 = 0;
00676ca0      ReadFile(_fd, arg2, arg3, &arg4, nullptr);
00676cae      int32_t eax_3;
00676cae      eax_3 = arg4 == arg3;
00676cb7      return ((eax_3 - 1) & 0xffffff9a);
00676c60  }

00676cba                                                                                90 90 90 90 90 90                            ......

00676cc0  int32_t __thiscall DiskDev::SyncWrite(class DiskDev* this, void* arg2, uint32_t arg3, int32_t arg4)

00676cc0  {
00676cd8      if (SetFilePointer(this->_fd, arg4, nullptr, FILE_BEGIN) == 0xffffffff)
00676ce0          return 0xffffff97;
00676ce0      
00676d00      if (WriteFile(this->_fd, arg2, arg3, &arg4, nullptr) == 0)
00676d02          GetLastError();
00676d02      
00676d10      int32_t eax_4;
00676d10      eax_4 = arg4 == arg3;
00676d19      return ((eax_4 - 1) & 0xffffff99);
00676cc0  }

00676d1c                                                                                      90 90 90 90                              ....

00676d20  int32_t __thiscall DiskDev::Open_File(class DiskDev* this, class PStringBase<unsigned short> const* arg2, class PStringBase<unsigned short> const* arg3, struct DiskFileInfo_t* arg4, uint32_t arg5)

00676d20  {
00676d33      void var_50;
00676d33      DiskFileInfo_t::DiskFileInfo_t(&var_50);
00676d4a      void s;
00676d4a      __builtin_memset(&s, 0, 0x100);
00676d53      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg3->m_charbuffer;
00676d63      char* esi;
00676d63      char* edi;
00676d63      edi = __builtin_strncpy(&s, "\nFile Header Structure Default …", 0x30);
00676d65      *(uint8_t*)edi = *(uint8_t*)esi;
00676d68      int32_t esi_3 = (arg5 & 8);
00676d6e      bool var_195 = esi_3 == 8;
00676d73      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = m_charbuffer;
00676d7b      char var_91 = 0x1a;
00676d83      InterlockedIncrement(&m_charbuffer->m_data[-8]);
00676d96      PSUtils::path_append(&m_charbuffer_1, arg2);
00676da1      int32_t edx = 3;
00676da1      
00676da6      if (esi_3 == 8)
00676da8          edx = 2;
00676da8      
00676db0      int32_t eax_2 = 0xc0000000;
00676db0      
00676db5      if ((arg5 & 4) != 0)
00676db7          eax_2 = 0x80000000;
00676db7      
00676dbc      int32_t ecx_2 = 0;
00676dbc      
00676dc0      if (eax_2 < 0)
00676dc2          ecx_2 = 1;
00676dc2      
00676dc7      int32_t var_1ac_2 = 0;
00676dc9      int32_t var_1b0_1 = 0;
00676dcc      int32_t var_1b8 = 0;
00676dcf      int32_t var_1c0 = eax_2;
00676dd5      class DiskDev eax_4 = kernel32_CreateFileW_Ptr(m_charbuffer_1, var_1c0, ecx_2, var_1b8, edx, var_1b0_1, var_1ac_2);
00676dde      this->_fd = eax_4;
00676de1      int32_t result;
00676de1      
00676de1      if (eax_4 != 0xffffffff)
00676de1      {
00676dea          eax_4._fd = var_195;
00676dee          result = 0;
00676dee          
00676df2          if (eax_4._fd == 0)
00676df2          {
00676e2b              if (arg4 != 0)
00676e2b              {
00676e40                  result = DiskDev::SyncRead(this, &s, 0x190, 0);
00676e4c                  DiskFileInfo_t::operator=(arg4, &var_50);
00676e5b                  SetFilePointer(this->_fd, 0, nullptr, FILE_END);
00676e2b              }
00676df2          }
00676df2          else if (arg4 != 0)
00676dfd          {
00676e07              DiskFileInfo_t::operator=(&var_50, arg4);
00676e1e              result = DiskDev::SyncWrite(this, &s, 0x190, 0);
00676dfd          }
00676de1      }
00676de1      else
00676de3          result = 0xfffffffe;
00676de3      
00676e65      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_6 = &m_charbuffer_1->m_data[-0xa];
00676e65      
00676e78      if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00676e80          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00676e80      
00676e89      void var_14;
00676e89      IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(&var_14);
00676e9a      return result;
00676d20  }

00676e9d                                                                                         90 90 90                               ...

00676ea0  uint8_t __thiscall EnumeratedBitfield<unsigned __int64>::InitByDataID(class EnumeratedBitfield<unsigned __int64>* this, class IDClass<_tagDataID,32,0> arg2)

00676ea0  {
00676eab      class EnumMapper* m_object = this->m_enumMapper.m_object;
00676ec4      void var_8;
00676ec4      this->m_enumMapper.m_object = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x24));
00676ec4      
00676ec6      if (m_object != 0)
00676ec8          m_object->vtable->Release();
00676ec8      
00676ed3      class DBObj* eax_1;
00676ed3      eax_1 = this->m_enumMapper.m_object != 0;
00676eda      return eax_1;
00676ea0  }

00676edd                                                                                         90 90 90                               ...

00676ee0  uint8_t __thiscall EnumeratedBitfield<unsigned long>::FromFileNode(class EnumeratedBitfield<unsigned long>* this, class PFileNode const* arg2, uint32_t* arg3)

00676ee0  {
00676ee6      class PFileNode* esi = arg2;
00676ee6      
00676ef1      if (esi == 0)
00676ef1      {
00677027          int32_t eax;
00677027          eax = 0;
0067702d          return 0;
00676ef1      }
00676ef1      
00676efa      int32_t ebx;
00676efa      ebx = 1;
00676efc      class PFileNode* i_1;
00676efc      uint32_t* this_1;
00676efc      
00676efc      if (this->m_enumMapper.m_object == 0)
00676efc      {
00676efe          this_1 = this;
00676f01          i_1 = "This Enumerated must be initiali…";
00676f06          PStringBase<char>::PStringBase<char>(&this_1, i_1);
00676f0b          i_1 = esi;
00676f0c          PFileNode::ReportError(i_1, this_1);
00676f16          int32_t eax_1;
00676f16          eax_1 = 0;
00676f1f          return 0;
00676efc      }
00676efc      
00676f26      this_1 = esi;
00676f2b      *(uint32_t*)arg3 = 0;
00676f31      void var_c;
00676f31      PFileNodeIter::PFileNodeIter(&var_c, this_1);
00676f31      
00676f43      for (class PFileNode* i = PFileNodeIter::Curr(&var_c); i != 0; i = PFileNodeIter::Next(&var_c))
00676f43      {
00676f50          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00676f55          arg2 = PStringBase<char>::s_NullBuffer_1;
00676f5c          this_1 = &PStringBase<char>::s_NullBuffer_1[-1];
00676f5d          InterlockedIncrement(this_1);
00676f63          this_1 = &arg2;
00676f66          uint8_t eax_5;
00676f66          uint32_t* ecx_4;
00676f66          eax_5 = PFileNode::GetNameAsPString(i, this_1);
00676f6d          class PFileNode* edi_1 = arg2;
00676f6d          
00676f71          if (eax_5 != 0)
00676f71          {
00676f91              uint32_t var_10;
00676f91              this_1 = &var_10;
00676f92              i_1 = ecx_4;
00676f95              i_1 = edi_1;
00676f9b              InterlockedIncrement(&edi_1[0]);
00676fa3              uint8_t eax_7;
00676fa3              class PFileNode* i_2;
00676fa3              eax_7 = EnumMapper::GetEnum(this->m_enumMapper.m_object, i_1, this_1);
00676fa3              
00676faa              if (eax_7 != 0)
00676faa              {
00676fc7                  uint32_t eax_8 = var_10;
00676fc7                  
00676fcd                  if (eax_8 != 0)
00676fd7                      eax_8 = (1 << (eax_8 - 1));
00676fd7                  
00676fd9                  int32_t* ecx_10 = arg3;
00676fdd                  *(uint32_t*)ecx_10 |= eax_8;
00676faa              }
00676faa              else
00676faa              {
00676fac                  this_1 = edi_1;
00676fad                  i_1 = i_2;
00676fb5                  PStringBase<char>::PStringBase<char>(&i_1, "invalid emp value '%s'");
00676fbb                  PFileNode::ReportError(i, i_1);
00676fc3                  ebx = 0;
00676faa              }
00676f71          }
00676f71          else
00676f71          {
00676f73              this_1 = ecx_4;
00676f76              i_1 = "expecting a string node";
00676f7b              PStringBase<char>::PStringBase<char>(&this_1, i_1);
00676f80              i_1 = i;
00676f81              PFileNode::ReportError(i_1, this_1);
00676f89              ebx = 0;
00676f71          }
00676f71          
00676fe5          this_1 = &edi_1[0];
00676fe5          
00676ff2          if ((InterlockedDecrement(this_1) == 0 && edi_1 != 0x14))
00676ff2          {
00676ff4              int32_t eax_10 = *(int32_t*)((char*)edi_1 + -0x14);
00676ff6              this_1 = 1;
00676ffa              *(uint32_t*)eax_10(this_1);
00676ff2          }
00676f43      }
00676f43      
00677013      PFileNodeIter::~PFileNodeIter(&var_c);
00677021      return ebx;
00676ee0  }


00677030  uint8_t __thiscall EnumeratedBitfield<unsigned __int64>::FromFileNode(class EnumeratedBitfield<unsigned __int64>* this, class PFileNode const* arg2, uint64_t* arg3)

00677030  {
00677036      class PFileNode* esi = arg2;
00677036      
00677041      if (esi != 0)
00677041      {
00677046          arg2 = 1;
0067704b          class PFileNode* i_1;
0067704b          uint32_t* this_1;
0067704b          
0067704b          if (this->m_enumMapper.m_object != 0)
0067704b          {
0067706f              uint64_t* ebx = arg3;
00677073              this_1 = esi;
00677078              *(uint32_t*)ebx = 0;
0067707e              *(uint32_t*)((char*)ebx + 4) = 0;
00677085              void var_c;
00677085              PFileNodeIter::PFileNodeIter(&var_c, this_1);
00677085              
00677097              for (class PFileNode* i = PFileNodeIter::Curr(&var_c); i != 0; i = PFileNodeIter::Next(&var_c))
00677097              {
006770a3                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
006770a8                  arg3 = PStringBase<char>::s_NullBuffer_1;
006770af                  this_1 = &PStringBase<char>::s_NullBuffer_1[-1];
006770b0                  InterlockedIncrement(this_1);
006770b6                  this_1 = &arg3;
006770b9                  uint8_t eax_3;
006770b9                  uint32_t* this_2;
006770b9                  eax_3 = PFileNode::GetNameAsPString(i, this_1);
006770c0                  uint64_t* edi_1 = arg3;
006770c0                  
006770c4                  if (eax_3 != 0)
006770c4                  {
006770e7                      uint32_t var_10;
006770e7                      this_1 = &var_10;
006770e8                      i_1 = &var_10;
006770ef                      i_1 = edi_1;
006770f1                      InterlockedIncrement(&edi_1[-2]);
006770f9                      uint8_t eax_5;
006770f9                      class PFileNode* i_2;
006770f9                      eax_5 = EnumMapper::GetEnum(this->m_enumMapper.m_object, i_1, this_1);
006770f9                      
00677100                      if (eax_5 != 0)
00677100                      {
00677120                          uint32_t eax_6 = var_10;
00677126                          int32_t edx_2;
00677126                          
00677126                          if (eax_6 != 0)
00677136                              eax_6 = _allshl();
00677126                          else
00677128                              edx_2 = 0;
00677128                          
00677142                          int32_t eax_9 = (*(uint32_t*)((char*)ebx + 4) | edx_2);
00677144                          *(uint32_t*)ebx |= eax_6;
00677146                          *(uint32_t*)((char*)ebx + 4) = eax_9;
00677100                      }
00677100                      else
00677100                      {
00677102                          this_1 = edi_1;
00677103                          i_1 = i_2;
0067710b                          PStringBase<char>::PStringBase<char>(&i_1, "invalid emp value '%s'");
00677111                          PFileNode::ReportError(i, i_1);
00677119                          arg2 = 0;
00677100                      }
006770c4                  }
006770c4                  else
006770c4                  {
006770c6                      this_1 = this_2;
006770c9                      i_1 = "expecting a string node";
006770ce                      PStringBase<char>::PStringBase<char>(&this_1, i_1);
006770d3                      i_1 = i;
006770d4                      PFileNode::ReportError(i_1, this_1);
006770dc                      arg2 = 0;
006770c4                  }
006770c4                  
0067714f                  this_1 = &edi_1[-2];
0067714f                  
0067715c                  if ((InterlockedDecrement(this_1) == 0 && edi_1 != 0x14))
0067715c                  {
0067715e                      int32_t edx_4 = *(uint32_t*)((char*)edi_1 - 0x14);
00677160                      this_1 = 1;
00677164                      *(uint32_t*)edx_4(this_1);
0067715c                  }
00677097              }
00677097              
0067717d              PFileNodeIter::~PFileNodeIter(&var_c);
0067718d              return arg2;
0067704b          }
0067704b          
0067704d          this_1 = this;
00677050          i_1 = "This Enumerated must be initiali…";
00677055          PStringBase<char>::PStringBase<char>(&this_1, i_1);
0067705a          i_1 = esi;
0067705b          PFileNode::ReportError(i_1, this_1);
00677041      }
00677041      
00677063      int32_t eax;
00677063      eax = 0;
0067706c      return 0;
00677030  }


00677190  uint8_t __thiscall EnumeratedBitfield<unsigned long>::InqStrings(class EnumeratedBitfield<unsigned long> const* this, uint32_t arg2, class PStringBaseArray<char>* arg3)

00677190  {
00677190      class EnumeratedBitfield<unsigned long>* this_1 = this;
0067719c      SmartArray<PStringBase<char>,1>::SetNElements(arg3, 0, 1);
0067719c      
006771a5      if (this->m_enumMapper.m_object == 0)
006771a5      {
006771a7          int32_t eax;
006771a7          eax = 0;
006771ab          return 0;
006771a5      }
006771a5      
006771ae      uint32_t i_1 = arg2;
006771b6      *(uint8_t*)((char*)this_1)[3] = 1;
006771bb      uint32_t edi = 1;
006771c0      uint32_t i = i_1;
006771c0      
006771c2      if (i_1 != 0)
006771c2      {
0067722a          do
0067722a          {
006771c8              if ((i & 1) != 0)
006771c8              {
006771ca                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
006771cf                  arg2 = PStringBase<char>::s_NullBuffer_1;
006771d7                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
006771d7                  
006771ed                  if (EnumMapper::GetString(this->m_enumMapper.m_object, edi, &arg2) == 0)
006771ff                      *(uint8_t*)((char*)this_1)[3] = 0;
006771ed                  else
006771f8                      SmartArray<PStringBase<char>,1>::AddToEnd(arg3, &arg2);
006771f8                  
00677208                  int32_t* esi_2 = (arg2 - 0x14);
00677208                  
0067721b                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00677223                      **(uint32_t**)esi_2(1);
006771c8              }
006771c8              
00677225              i u>>= 1;
00677227              edi += 1;
0067722a          } while (i != 0);
006771c2      }
006771c2      
0067722d      i_1 = *(uint8_t*)((char*)this_1)[3];
00677235      return i_1;
00677190  }

00677238                                                                          90 90 90 90 90 90 90 90                          ........

00677240  uint8_t __thiscall EnumeratedBitfield<unsigned long>::ToFileNode(class EnumeratedBitfield<unsigned long>* this, uint32_t arg2, class PFileNode* arg3)

00677240  {
00677257      if ((arg3 != 0 && this->m_enumMapper.m_object != 0))
00677257      {
00677267          class PStringBase<char>* var_c = nullptr;
0067726b          int32_t var_8_1 = 0;
0067726f          int32_t var_4_1 = 0;
0067727a          class PStringBase<char>* ecx_5;
0067727a          bool cond:2_1;
0067727a          
0067727a          if (EnumeratedBitfield<unsigned long>::InqStrings(this, arg2, &var_c) != 0)
0067727a          {
00677280              class PStringBase<char>* ecx = var_c;
00677288              uint32_t eax_2 = &ecx[var_4_1];
00677291              int32_t* ebx_1 = ecx;
00677291              
00677293              if (ecx == eax_2)
00677293              {
006772f7              label_6772f7:
006772f7                  
00677301                  if (((var_8_1 & 0x80000000) == 0x80000000 && ecx != 0))
00677305                      PStringBase<char>::`vector deleting destructor'(ecx, 3);
00677305                  
0067730a                  eax_2 = 1;
00677313                  return 1;
00677293              }
00677293              
006772a0              while (true)
006772a0              {
006772a0                  class PStringBase<char> esi_1 = *(uint32_t*)ebx_1;
006772a8                  int32_t var_20_3 = InterlockedIncrement((esi_1 - 0x10));
006772ae                  InterlockedIncrement((esi_1 - 0x10));
006772b4                  class PFileNode* eax_3 = PFileNode::MakeSubNodeAsPString(arg3, esi_1);
006772b4                  
006772ce                  if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
006772d6                      **(uint32_t**)(esi_1 - 0x14)(1);
006772d6                  
006772da                  if (eax_3 == 0)
006772da                      break;
006772da                  
006772e0                  ebx_1 = &ebx_1[1];
006772e0                  
006772e5                  if (ebx_1 == eax_2)
006772e5                  {
006772e7                      ecx = var_c;
006772eb                      goto label_6772f7;
006772e5                  }
006772a0              }
006772a0              
00677324              if ((var_8_1 & 0x80000000) == 0x80000000)
00677324              {
00677326                  ecx_5 = var_c;
0067732a                  cond:2_1 = ecx_5 == 0;
0067732c                  goto label_677344;
00677324              }
0067727a          }
0067727a          else if ((var_8_1 & 0x80000000) == 0x80000000)
0067733c          {
0067733e              ecx_5 = var_c;
00677342              cond:2_1 = ecx_5 == 0;
00677344          label_677344:
00677344              
00677344              if (!(cond:2_1))
00677348                  PStringBase<char>::`vector deleting destructor'(ecx_5, 3);
0067733c          }
00677257      }
00677257      
00677350      class PFileNode* eax_6;
00677350      eax_6 = 0;
00677356      return 0;
00677240  }

0067729d                                                                                         8d 49 00                               .I.
00677359                                                                             90 90 90 90 90 90 90                           .......

00677360  uint8_t __thiscall EnumeratedBitfield<unsigned __int64>::InqStrings(class EnumeratedBitfield<unsigned __int64> const* this, uint64_t arg2, class PStringBaseArray<char>* arg3)

00677360  {
00677364      class EnumeratedBitfield<unsigned __int64>* this_1 = this;
0067736e      class EnumeratedBitfield<unsigned __int64>* this_2 = this_1;
00677372      SmartArray<PStringBase<char>,1>::SetNElements(arg3, 0, 1);
00677372      
0067737a      if (this_1->m_enumMapper.m_object == 0)
0067737a      {
0067737c          int32_t eax;
0067737c          eax = 0;
00677382          return 0;
0067737a      }
0067737a      
00677385      int32_t eax_1 = arg2;
00677389      uint32_t ecx_1 = *(uint32_t*)((char*)arg2)[4];
00677390      int32_t edi = eax_1;
00677394      char var_5 = 1;
00677399      uint32_t ebp = 1;
0067739e      uint32_t ebx = ecx_1;
0067739e      
006773a0      if ((eax_1 | ecx_1) != 0)
006773a0      {
006773b1          while (true)
006773b1          {
006773b1              if (((edi & 1) | 0) != 0)
006773b1              {
006773b3                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
006773b8                  arg2 = PStringBase<char>::s_NullBuffer_1;
006773c0                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
006773c0                  
006773d5                  if (EnumMapper::GetString(this_1->m_enumMapper.m_object, ebp, &arg2) == 0)
006773e7                      var_5 = 0;
006773d5                  else
006773e0                      SmartArray<PStringBase<char>,1>::AddToEnd(arg3, &arg2);
006773e0                  
006773f0                  int32_t* esi_1 = (arg2 - 0x14);
006773f0                  
00677403                  if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0067740b                      **(uint32_t**)esi_1(1);
006773b1              }
006773b1              
0067740d              edi = ((edi >> 1) | (ebx << 0x1f));
00677411              ebx u>>= 1;
00677415              ebp += 1;
00677415              
00677418              if ((edi | ebx) == 0)
00677418                  break;
00677418              
006773a4              this_1 = this_2;
006773b1          }
006773a0      }
006773a0      
0067741a      int32_t eax_2;
0067741a      eax_2 = var_5;
00677425      return eax_2;
00677360  }

00677428                          90 90 90 90 90 90 90 90                                                          ........

00677430  uint8_t __thiscall EnumeratedBitfield<unsigned __int64>::ToFileNode(class EnumeratedBitfield<unsigned __int64>* this, uint64_t arg2, class PFileNode* arg3)

00677430  {
00677447      if ((arg3 != 0 && this->m_enumMapper.m_object != 0))
00677447      {
0067745a          int32_t var_24_1 = *(uint32_t*)((char*)arg2)[4];
0067745c          class PStringBase<char>* var_c = nullptr;
00677460          int32_t var_8_1 = 0;
00677464          int32_t var_4_1 = 0;
0067746f          class PStringBase<char>* ecx_4;
0067746f          bool cond:2_1;
0067746f          
0067746f          if (EnumeratedBitfield<unsigned __int64>::InqStrings(this, arg2, &var_c) != 0)
0067746f          {
00677475              class PStringBase<char>* ecx = var_c;
0067747d              void* eax_2 = &ecx[var_4_1];
00677482              arg2 = eax_2;
00677486              int32_t* ebx_1 = ecx;
00677486              
00677488              if (ecx == eax_2)
00677488              {
006774e7              label_6774e7:
006774e7                  
006774f1                  if (((var_8_1 & 0x80000000) == 0x80000000 && ecx != 0))
006774f5                      PStringBase<char>::`vector deleting destructor'(ecx, 3);
006774f5                  
006774fa                  eax_2 = 1;
00677503                  return 1;
00677488              }
00677488              
00677490              while (true)
00677490              {
00677490                  class PStringBase<char> esi_1 = *(uint32_t*)ebx_1;
00677498                  int32_t var_20_3 = InterlockedIncrement((esi_1 - 0x10));
0067749e                  InterlockedIncrement((esi_1 - 0x10));
006774a4                  class PFileNode* eax_3 = PFileNode::MakeSubNodeAsPString(arg3, esi_1);
006774a4                  
006774be                  if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
006774c6                      **(uint32_t**)(esi_1 - 0x14)(1);
006774c6                  
006774ca                  if (eax_3 == 0)
006774ca                      break;
006774ca                  
006774d0                  ebx_1 = &ebx_1[1];
006774d0                  
006774d5                  if (ebx_1 == arg2)
006774d5                  {
006774d7                      ecx = var_c;
006774db                      goto label_6774e7;
006774d5                  }
00677490              }
00677490              
00677514              if ((var_8_1 & 0x80000000) == 0x80000000)
00677514              {
00677516                  ecx_4 = var_c;
0067751a                  cond:2_1 = ecx_4 == 0;
0067751c                  goto label_677534;
00677514              }
0067746f          }
0067746f          else if ((var_8_1 & 0x80000000) == 0x80000000)
0067752c          {
0067752e              ecx_4 = var_c;
00677532              cond:2_1 = ecx_4 == 0;
00677534          label_677534:
00677534              
00677534              if (!(cond:2_1))
00677538                  PStringBase<char>::`vector deleting destructor'(ecx_4, 3);
0067752c          }
00677447      }
00677447      
00677540      class PFileNode* eax_7;
00677540      eax_7 = 0;
00677546      return 0;
00677430  }

00677549                             90 90 90 90 90 90 90                                                           .......

00677550  void __thiscall ThreadedCache::WorkerExecuteRequest(class ThreadedCache* this, struct AsyncCache::CAsyncRequest* arg2)

00677550  {
00677554      union __inner1 = arg2->__inner1;
00677554      
0067755a      if (__inner1 == 0)
0067757a          /* jump -> this->vtable->WorkerExecuteGetRequest */
0067757a      
0067755d      if (__inner1 == 1)
00677571          /* jump -> this->vtable->WorkerExecutePurgeRequest */
00677571      
00677560      if (__inner1 != 2)
0067757d          return;
0067757d      
00677568      /* jump -> this->vtable->WorkerExecuteSaveRequest */
00677550  }


00677580  uint8_t __thiscall ThreadedCache::SetShutdown(class ThreadedCache* this, uint8_t arg2)

00677580  {
00677583      this->vtable->StopThread();
00677596      int32_t eax_1 = DBCache::KeepFreeObjects(this, arg2 == 0, 0);
0067759b      char temp1 = eax_1;
0067759b      eax_1 = -(eax_1);
006775a1      return (((int8_t)(eax_1 - eax_1)) + 1);
00677580  }

006775a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006775b0  void __fastcall ThreadedCache::StopThread(class ThreadedCache* this)

006775b0  {
006775b0      this->vtable->SetShouldExit(1);
006775c7      /* tailcall */
006775c7      return PortalThread::Join(&this->vtable);
006775b0  }

006775cc                                      90 90 90 90                                                              ....

006775d0  void __fastcall ThreadedCache::WakeForTheReaper(class ThreadedCache* this)

006775d0  {
006775d6      /* tailcall */
006775d6      return PortalEvent::Signal(&this->m_BusyCallbacks.m_intrusiveTable.m_aInplaceBuckets);
006775d0  }

006775db                                                                                   90 90 90 90 90                             .....

006775e0  void __thiscall ThreadedCache::WorkerExecuteGetRequest(class ThreadedCache* this, struct CAsyncGetRequest* arg2)

006775e0  {
00677601      int32_t ecx_1;
00677601      ecx_1 = this->vtable->LoadData(&arg2->qdid, &arg2->Buf, 0, 0) == 0;
00677608      arg2->Result = ((ecx_1 * 2) + 1);
006775e0  }

0067760f                                               90                                                                 .

00677610  void __thiscall ThreadedCache::WorkerExecutePurgeRequest(class ThreadedCache* this, struct CAsyncPurgeRequest* arg2)

00677610  {
00677623      int32_t eax = this->vtable->PurgeData(&arg2->qdid, 0, 0);
00677629      char temp1 = eax;
00677629      eax = -(eax);
00677633      arg2->Result = (((eax - eax) & 0xfffffffe) + 3);
00677610  }

0067763a                                                                                90 90 90 90 90 90                            ......

00677640  void __thiscall ThreadedCache::WorkerExecuteSaveRequest(class ThreadedCache* this, struct CAsyncSaveRequest* arg2)

00677640  {
00677648      class DiskController* pDisk = arg2->pDisk;
0067764d      arg2->Result = AsyncResult_Failure;
0067764d      
00677654      if (pDisk == 0)
00677668          pDisk = this->vtable->GetDiskController(&arg2->qdid, arg2->idTargetDatFile, *(uint32_t*)((char*)arg2->idTargetDatFile)[4]);
00677668      
00677674      uint32_t id = arg2->qdid.ID.id;
00677680      int32_t var_10 = 0;
00677688      int32_t var_c = 0;
00677690      int32_t var_8 = 0;
00677698      uint32_t idIteration = arg2->idIteration;
0067769c      uint32_t var_18 = (arg2->Buf.m_iVersion << 0x10);
0067769c      
006776a0      if ((pDisk != 0 && pDisk->vtable->SaveDataEx(&var_18, &arg2->Buf, arg2->dwDiskControllerSaveFlags) != 0))
006776bd          arg2->Result = AsyncResult_Success;
00677640  }

006776cb                                   90 90 90 90 90                                                             .....

006776d0  void __thiscall LFQueue<AsyncCache::CAsyncRequest *>::Produce(class LFQueue<AsyncCache::CAsyncRequest *>* this, struct AsyncCache::CAsyncRequest* arg2)

006776d0  {
006776d8      int32_t volatile m_dwProducerBucketIndex = this->m_dwProducerBucketIndex;
006776df      int32_t eax;
006776df      
006776df      if (m_dwProducerBucketIndex != (this->numBuckets_ - 1))
006776e7          eax = (m_dwProducerBucketIndex + 1);
006776df      else
006776e3          eax = 0;
006776e3      
006776ed      int32_t ebx;
006776ed      ebx = eax != this->m_dwConsumerBucketIndex;
006776ed      
006776f2      while (ebx != 0)
006776f2      {
00677703          if (this->m_backupList._head == 0)
00677703          {
006777ce              if (ebx == 0)
006777ce                  break;
006777ce              
006777d3              this->buckets_[this->m_dwProducerBucketIndex] = arg2;
006777df              int32_t volatile m_dwProducerBucketIndex_3 = this->m_dwProducerBucketIndex;
006777df              
006777e5              if (m_dwProducerBucketIndex_3 != (this->numBuckets_ - 1))
006777e5              {
006777f5                  this->m_dwProducerBucketIndex = (m_dwProducerBucketIndex_3 + 1);
006777fb                  return;
006777e5              }
006777e5              
006777ea              this->m_dwProducerBucketIndex = 0;
006777f0              return;
00677703          }
00677703          
00677709          this->m_backupListCritSec.vtable->EnterCriticalSection();
00677714          class ListNode<AsyncCache::CAsyncRequest *>* _head = this->m_backupList._head;
00677714          
00677719          if (_head == 0)
00677790              SharedCriticalSection::LeaveCriticalSection(&this->m_backupListCritSec);
00677719          else
00677719          {
0067771b              class ListNode<AsyncCache::CAsyncRequest *>* next = _head->next;
00677720              this->m_backupList._head = next;
00677720              
00677723              if (next == 0)
0067772a                  this->m_backupList._tail = nullptr;
00677723              else
00677725                  next->prev = nullptr;
00677725              
0067772d              struct AsyncCache::CAsyncRequest* data = _head->data;
00677730              operator delete(_head);
0067773c              this->m_backupList._num_elements -= 1;
00677742              struct AsyncCache::CAsyncRequest** buckets_ = this->buckets_;
00677745              this->m_dwBackupListLen -= 1;
0067774b              buckets_[this->m_dwProducerBucketIndex] = data;
00677751              int32_t volatile m_dwProducerBucketIndex_1 = this->m_dwProducerBucketIndex;
00677757              int32_t eax_4;
00677757              
00677757              if (m_dwProducerBucketIndex_1 != (this->numBuckets_ - 1))
0067775d                  eax_4 = (m_dwProducerBucketIndex_1 + 1);
00677757              else
00677759                  eax_4 = 0;
00677759              
0067775e              this->m_dwProducerBucketIndex = eax_4;
00677763              SharedCriticalSection::LeaveCriticalSection(&this->m_backupListCritSec);
0067776b              int32_t volatile m_dwProducerBucketIndex_2 = this->m_dwProducerBucketIndex;
0067776b              
00677771              if (m_dwProducerBucketIndex_2 != (this->numBuckets_ - 1))
00677787                  ebx = (m_dwProducerBucketIndex_2 + 1) != this->m_dwConsumerBucketIndex;
00677771              else
0067777a                  ebx = 0 != this->m_dwConsumerBucketIndex;
00677719          }
006776f2      }
006776f2      
0067779d      this->m_backupListCritSec.vtable->EnterCriticalSection();
006777aa      void* eax_7 = operator new(0xc);
006777aa      
006777b4      if (eax_7 != 0)
006777b4      {
006777ba          *(uint32_t*)eax_7 = arg2;
006777bc          *(uint32_t*)((char*)eax_7 + 4) = 0;
006777bf          *(uint32_t*)((char*)eax_7 + 8) = 0;
006777bf          
006777c5          if (this->m_backupList._head != 0)
006777c5          {
006777fe              class ListNode<AsyncCache::CAsyncRequest *>* _tail = this->m_backupList._tail;
00677801              _tail->next = eax_7;
00677804              *(uint32_t*)((char*)eax_7 + 8) = _tail;
006777c5          }
006777c5          else
006777c7              this->m_backupList._head = eax_7;
006777c7          
00677807          this->m_backupList._tail = eax_7;
0067780a          this->m_backupList._num_elements += 1;
006777b4      }
006777b4      
00677813      this->m_dwBackupListLen += 1;
00677816      SharedCriticalSection::LeaveCriticalSection(&this->m_backupListCritSec);
006776d0  }

006776fa                                                                                8d 9b 00 00 00 00                            ......
00677822        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00677830  uint8_t __thiscall LFQueue<AsyncCache::CAsyncRequest *>::Consume(class LFQueue<AsyncCache::CAsyncRequest *>* this, struct AsyncCache::CAsyncRequest** arg2)

00677830  {
0067783c      if (this->m_dwProducerBucketIndex != this->m_dwConsumerBucketIndex)
0067783c      {
0067784a          *(uint32_t*)arg2 = this->buckets_[this->m_dwConsumerBucketIndex];
0067784f          int32_t volatile m_dwConsumerBucketIndex = this->m_dwConsumerBucketIndex;
0067784f          
00677855          if (m_dwConsumerBucketIndex != (this->numBuckets_ - 1))
00677855          {
00677864              this->m_dwConsumerBucketIndex = (m_dwConsumerBucketIndex + 1);
00677868              int32_t eax_3;
00677868              eax_3 = 1;
0067786b              return 1;
00677855          }
00677855          
00677859          this->m_dwConsumerBucketIndex = 0;
0067785d          int32_t eax_2;
0067785d          eax_2 = 1;
00677860          return 1;
0067783c      }
0067783c      
00677873      if (this->m_backupList._head == 0)
00677873      {
00677876          class ListNode<AsyncCache::CAsyncRequest *>* eax_4;
00677876          eax_4 = 0;
00677879          return 0;
00677873      }
00677873      
0067787c      this->m_backupListCritSec.vtable->EnterCriticalSection();
0067787c      
00677893      if ((this->m_dwProducerBucketIndex == this->m_dwConsumerBucketIndex && List<AsyncCache::CAsyncRequest *>::pop_head(&this->m_backupList, arg2) != 0))
00677893      {
006778a8          this->m_dwBackupListLen -= 1;
006778ab          SharedCriticalSection::LeaveCriticalSection(&this->m_backupListCritSec);
006778b3          int32_t eax_9;
006778b3          eax_9 = 1;
006778b6          return 1;
00677893      }
00677893      
006778c1      *(uint32_t*)arg2 = this->buckets_[this->m_dwConsumerBucketIndex];
006778c7      int32_t volatile m_dwConsumerBucketIndex_1 = this->m_dwConsumerBucketIndex;
006778c7      
006778cd      if (m_dwConsumerBucketIndex_1 == (this->numBuckets_ - 1))
006778cd      {
006778d3          this->m_dwConsumerBucketIndex = 0;
006778d6          SharedCriticalSection::LeaveCriticalSection(&this->m_backupListCritSec);
006778de          int32_t eax_11;
006778de          eax_11 = 1;
006778e1          return 1;
006778cd      }
006778cd      
006778e7      this->m_dwConsumerBucketIndex = (m_dwConsumerBucketIndex_1 + 1);
006778ea      SharedCriticalSection::LeaveCriticalSection(&this->m_backupListCritSec);
006778f2      int32_t eax_13;
006778f2      eax_13 = 1;
006778f5      return 1;
00677830  }

006778f8                                                                          90 90 90 90 90 90 90 90                          ........

00677900  int32_t __fastcall ThreadedCache::Startup(class ThreadedCache* this)

00677900  {
00677900      class ThreadedCache* this_1 = this;
00677900      
00677909      for (uint8_t i = *(uint8_t*)((char*)this->m_PendingCallbacks.A)[1]; i == 0; i = *(uint8_t*)((char*)this->m_PendingCallbacks.A)[1])
00677909      {
00677915          this_1 = nullptr;
00677915          
0067791d          if (i == 0)
0067791d          {
00677953              do
00677953              {
00677930                  if (LFQueue<AsyncCache::CAsyncRequest *>::Consume(&this->m_PendingCallbacks.first, &this_1) == 0)
00677930                      break;
00677930                  
00677932                  class ThreadedCache* this_2 = this_1;
0067793c                  this_2->m_PendingCallbacks.vtable = 3;
00677942                  *(uint32_t*)(*(int32_t*)((char*)this + -0x130) + 0x58)(this_2);
00677949                  LFQueue<AsyncCache::CAsyncRequest *>::Produce(&this->m_PendingGets.m_intrusiveTable.m_aInplaceBuckets[0xb], this_2);
00677953              } while (*(uint8_t*)((char*)this->m_PendingCallbacks.A)[1] == 0);
0067791d          }
0067791d          
0067795d          PortalEvent::WaitForSignal(&this->m_BusyCallbacks.m_intrusiveTable.m_aInplaceBuckets, 0xffffffff);
00677909      }
00677909      
00677970      return 0;
00677900  }

00677971                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00677980  void __thiscall ThreadedCache::PutOnWorkerThreadJobQueue(class ThreadedCache* this, struct AsyncCache::CAsyncRequest* arg2)

00677980  {
0067798c      InterlockedIncrement(&arg2->m_cRef);
00677999      LFQueue<AsyncCache::CAsyncRequest *>::Produce(&this->m_WorkerThreadJobQueue, arg2);
006779a4      PortalEvent::Signal(&this->m_evtWorkerHasJobs);
00677980  }

006779ae                                            90 90                                                                ..

006779b0  void __fastcall ThreadedCache::UseTime(class ThreadedCache* this)

006779b0  {
006779b0      class ThreadedCache* this_1 = this;
006779bc      uint32_t eax = GetTickCount();
006779c0      this_1 = nullptr;
006779c0      
006779cf      if ((GetTickCount() - eax) < 0x19)
006779cf      {
00677a1b          uint32_t i;
00677a1b          
00677a1b          do
00677a1b          {
006779e4              if (LFQueue<AsyncCache::CAsyncRequest *>::Consume(&this->m_WorkerThreadJobQueue.m_backupListCritSec.lockCount_, &this_1) == 0)
006779e4                  break;
006779e4              
006779e6              class ThreadedCache* this_2 = this_1;
006779ea              this->vtable->WorkerExecuteGetRequest(this_2);
006779ea              
006779f4              if (this_2 != 0)
006779f4              {
00677a02                  if (InterlockedDecrement(&this_2->vtable) == 0)
00677a04                      this_2->vtable->IUnknown_QueryInterface(1);
00677a04                  
00677a0c                  this_1 = nullptr;
006779f4              }
006779f4              
00677a16              i = (GetTickCount() - eax);
00677a1b          } while (i < 0x19);
006779cf      }
006779cf      
00677a20      DBCache::UseTime(this);
006779b0  }

00677a2a                                90 90 90 90 90 90                                                            ......

00677a30  void __thiscall ThreadedCache::AsyncGetInternal(class ThreadedCache* this, struct CAsyncGetRequest* arg2)

00677a30  {
00677a4a      class DBObj* eax_1 = this->vtable->GetIfInMemory(&arg2->qdid, arg2->pObjCache);
00677a52      uint32_t m_dwGetRequestFlags = arg2->m_dwGetRequestFlags;
00677a52      
00677a55      if (eax_1 != 0)
00677a55      {
00677a5d          arg2->m_dwGetRequestFlags = (m_dwGetRequestFlags | 4);
00677a60          AsyncCache::CAsyncRequest::AdoptDBObj(arg2, eax_1);
00677a65          arg2->Result = AsyncResult_Success;
00677a41          this->vtable->OnGetRequestFinished(arg2);
00677a78          return;
00677a55      }
00677a55      
00677a7e      arg2->m_dwGetRequestFlags = (m_dwGetRequestFlags & 0xfffffffb);
00677a7e      
00677a8b      if ((arg2->pObjCache->vtable->CanLoadFromDisk() != 0 && this->vtable->IsOnDisk(&arg2->qdid) != 0))
00677a8b      {
00677a9c          ThreadedCache::PutOnWorkerThreadJobQueue(this, arg2);
00677aa5          return;
00677a8b      }
00677a8b      
00677ab2      if ((arg2->pObjCache->vtable->CanRequestFromNet() != 0 && this->vtable->AsyncGetFromOtherSources(&arg2->qdid, arg2->pObjCache) != 0))
00677ab2      {
00677ace          arg2->m_dwGetRequestFlags &= 0xfffffffd;
00677ad4          return;
00677ab2      }
00677ab2      
00677ad7      arg2->Result = AsyncResult_Failure;
00677a41      this->vtable->OnRequestFinished(arg2);
00677a30  }

00677aed                                         90 90 90                                                               ...

00677af0  void __fastcall ThreadedCache::ThreadedCache(class ThreadedCache* this)

00677af0  {
00677af5      DBCache::DBCache(this);
00677b05      PortalThread::PortalThread(&this->vtable, 0);
00677afa      this->vtable = &ThreadedCache::`vftable';
00677b10      this->vtable = 0x7fe0b0;
00677b16      this->vtable = &ThreadedCache::`vftable';
00677b1d      this->m_WorkerThreadJobQueue.m_dwProducerBucketIndex = 0;
00677b23      this->m_WorkerThreadJobQueue.m_dwConsumerBucketIndex = 0;
00677b29      this->m_WorkerThreadJobQueue.buckets_ = 0;
00677b2f      this->m_WorkerThreadJobQueue.numBuckets_ = 0x400;
00677b3e      this->m_WorkerThreadJobQueue.m_backupList.vtable = 0x7c5ad8;
00677b44      this->m_WorkerThreadJobQueue.m_backupList._head = nullptr;
00677b4a      this->m_WorkerThreadJobQueue.m_backupList._tail = nullptr;
00677b50      this->m_WorkerThreadJobQueue.m_backupList._num_elements = 0;
00677b5c      this->m_WorkerThreadJobQueue.m_dwBackupListLen = 0;
00677b62      SharedCriticalSection::SharedCriticalSection(&this->m_WorkerThreadJobQueue.m_backupListCritSec);
00677b76      this->m_WorkerThreadJobQueue.buckets_ = operator new[]((this->m_WorkerThreadJobQueue.numBuckets_ << 2));
00677b7c      this->m_WorkerThreadReplyQueue.m_dwProducerBucketIndex = 0;
00677b82      this->m_WorkerThreadReplyQueue.buckets_ = 0;
00677b88      this->m_WorkerThreadReplyQueue.numBuckets_ = 0x400;
00677b92      this->m_WorkerThreadReplyQueue.m_dwConsumerBucketIndex = 0;
00677b98      this->m_WorkerThreadReplyQueue.m_backupList.vtable = 0x7c5ad8;
00677b9e      this->m_WorkerThreadReplyQueue.m_backupList._head = nullptr;
00677ba4      this->m_WorkerThreadReplyQueue.m_backupList._tail = nullptr;
00677baa      this->m_WorkerThreadReplyQueue.m_backupList._num_elements = 0;
00677bb9      this->m_WorkerThreadReplyQueue.m_dwBackupListLen = 0;
00677bbf      SharedCriticalSection::SharedCriticalSection(&this->m_WorkerThreadReplyQueue.m_backupListCritSec);
00677bdc      this->m_WorkerThreadReplyQueue.buckets_ = operator new[]((this->m_WorkerThreadReplyQueue.numBuckets_ << 2));
00677be2      PortalEvent::PortalEvent(&this->m_evtWorkerHasJobs);
00677af0  }

00677bed                                         90 90 90                                                               ...

00677bf0  void* __thiscall ThreadedCache::`vector deleting destructor'(class ThreadedCache* this, uint32_t arg2)

00677bf0  {
00677bf6      /* tailcall */
00677bf6      return ThreadedCache::`scalar deleting destructor'(((char*)this - 0x130), arg2);
00677bf0  }

00677bfb                                                                                   cc cc cc cc cc                             .....

00677c00  void __thiscall ThreadedCache::EnqueueAsyncRequest(class ThreadedCache* this, struct AsyncCache::CAsyncRequest* arg2)

00677c00  {
00677c0d      if (arg2->__inner1 == 0)
00677c0d      {
00677c13          ThreadedCache::AsyncGetInternal(((char*)this - 4), arg2);
00677c1a          return;
00677c0d      }
00677c0d      
00677c21      InterlockedIncrement(&arg2->m_cRef);
00677c2e      LFQueue<AsyncCache::CAsyncRequest *>::Produce(&this->m_fThreadRunning, arg2);
00677c39      PortalEvent::Signal(&this->m_WorkerThreadReplyQueue.m_backupListCritSec.lockCount_);
00677c00  }

00677c43           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00677c50  void* __thiscall ThreadedCache::`scalar deleting destructor'(class ThreadedCache* this, uint32_t arg2)

00677c50  {
00677c53      ThreadedCache::~ThreadedCache(this);
00677c53      
00677c5d      if ((arg2 & 1) != 0)
00677c60          operator delete(this);
00677c60      
00677c6b      return this;
00677c50  }

00677c6e                                            90 90                                                                ..

00677c70  void __thiscall CAllIterationList::PTaggedIterationList::Serialize(class CAllIterationList::PTaggedIterationList* this, class Archive* arg2)

00677c70  {
00677c7c      Archive::CheckAlignment(arg2, 8);
00677c85      uint8_t* eax = Archive::GetBytes(arg2, 8);
00677c85      
00677c8c      if (eax != 0)
00677c8c      {
00677c92          if ((arg2->m_flags & 1) != 0)
00677c92          {
00677c97              *(uint32_t*)eax = this->idDatFile;
00677c9f              *(uint32_t*)(eax + 4) = *(uint32_t*)((char*)this->idDatFile)[4];
00677c9c              this->List.vtable->Serialize(arg2);
00677ca9              return;
00677c92          }
00677c92          
00677cae          this->idDatFile = *(uint32_t*)eax;
00677cb4          *(uint32_t*)((char*)this->idDatFile)[4] = *(uint32_t*)(eax + 4);
00677c8c      }
00677c8c      
00677cb7      this->List.vtable->Serialize(arg2);
00677c70  }

00677cc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00677cd0  void __fastcall CAllIterationList::PTaggedIterationList::PTaggedIterationList(class CAllIterationList::PTaggedIterationList* this)

00677cd0  {
00677cd6      this->vtable = &CAllIterationList::PTaggedIterationList::`vftable';
00677cdc      CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(&this->List);
00677cd0  }

00677ce5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00677cf0  void __fastcall SmartArray<CAllIterationList::PTaggedIterationList,1>::Reset(class SmartArray<CAllIterationList::PTaggedIterationList,1>* this)

00677cf0  {
00677cf6      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00677d0a      this->m_num = 0;
00677d0a      
00677d0d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00677d0d      {
00677d0f          class CAllIterationList::PTaggedIterationList* m_data = this->m_data;
00677d0f          
00677d13          if (m_data != 0)
00677d17              CAllIterationList::PTaggedIterationList::`vector deleting destructor'(m_data, 3);
00677d17          
00677d1c          this->m_data = 0;
00677d1e          this->m_sizeAndDeallocate = 0;
00677d26          return;
00677d0d      }
00677d0d      
00677d29      if (this->m_data != 0)
00677d29      {
00677d2b          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00677d2b          
00677d31          if ((i_2 - 1) >= 0)
00677d31          {
00677d3b              int32_t i_1 = i_2;
00677d3e              int32_t edi_3 = ((i_2 - 1) * 0x28);
00677d98              int32_t i;
00677d98              
00677d98              do
00677d98              {
00677d44                  struct CAllIterationList::PTaggedIterationList::VTable* const var_28_1 = &CAllIterationList::PTaggedIterationList::`vftable';
00677d4c                  void var_18;
00677d4c                  CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(&var_18);
00677d57                  void* esi_2 = (this->m_data + edi_3);
00677d5d                  int32_t var_20;
00677d5d                  *(uint32_t*)((char*)esi_2 + 8) = var_20;
00677d68                  int32_t var_1c;
00677d68                  *(uint32_t*)((char*)esi_2 + 0xc) = var_1c;
00677d6b                  void* var_14;
00677d6b                  SmartArray<unsigned long,1>::operator=(((char*)esi_2 + 0x14), &var_14);
00677d74                  char var_8;
00677d74                  *(uint8_t*)((char*)esi_2 + 0x20) = var_8;
00677d85                  int32_t var_10;
00677d85                  
00677d85                  if ((var_10 & 0x80000000) == 0x80000000)
00677d8c                      operator delete[](var_14);
00677d8c                  
00677d94                  edi_3 -= 0x28;
00677d97                  i = i_1;
00677d97                  i_1 -= 1;
00677d98              } while (i != 1);
00677d31          }
00677d29      }
00677cf0  }

00677da2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00677db0  uint8_t __thiscall SmartArray<CAllIterationList::PTaggedIterationList,1>::grow(class SmartArray<CAllIterationList::PTaggedIterationList,1>* this, uint32_t arg2)

00677db0  {
00677dbb      uint32_t edi = arg2;
00677dc1      uint32_t eax;
00677dc1      
00677dc1      if (edi >= this->m_num)
00677dc1      {
00677dd1          if (edi <= (this->m_sizeAndDeallocate & 0x7fffffff))
00677dd1          {
00677ea9              eax = 1;
00677eaf              return 1;
00677dd1          }
00677dd1          
00677dd9          if (edi == 0)
00677dd9          {
00677ddb              SmartArray<CAllIterationList::PTaggedIterationList,1>::Reset(this);
00677de2              int32_t eax_2;
00677de2              eax_2 = 1;
00677de8              return 1;
00677dd9          }
00677dd9          
00677df6          eax = operator new[](((edi * 0x28) + 4));
00677df6          
00677e00          if (eax != 0)
00677e00          {
00677e0c              void* esi_1 = (eax + 4);
00677e12              *(uint32_t*)eax = edi;
00677e18              `vector constructor iterator'(esi_1, 0x28, edi, CAllIterationList::PTaggedIterationList::PTaggedIterationList);
00677e18              
00677e1f              if (esi_1 != 0)
00677e1f              {
00677e28                  if (this->m_data != 0)
00677e28                  {
00677e2a                      uint32_t m_num = this->m_num;
00677e2a                      
00677e2e                      if ((m_num - 1) >= 0)
00677e2e                      {
00677e3c                          void* edi_1 = (((char*)esi_1 + ((m_num - 1) * 0x28)) + 0x20);
00677e40                          int32_t m_num_1 = m_num;
00677e75                          bool cond:0_1;
00677e75                          
00677e75                          do
00677e75                          {
00677e44                              class CAllIterationList::PTaggedIterationList* m_data = this->m_data;
00677e46                              void* esi_2 = ((char*)edi_1 + (0xffffffe0 - esi_1));
00677e4d                              void* esi_3 = ((char*)esi_2 + m_data);
00677e52                              *(uint32_t*)((char*)edi_1 - 0x18) = *(uint32_t*)(&m_data->idDatFile + esi_2);
00677e5c                              *(uint32_t*)((char*)edi_1 - 0x14) = *(uint32_t*)((char*)esi_3 + 0xc);
00677e5f                              SmartArray<unsigned long,1>::operator=(((char*)edi_1 - 0xc), ((char*)esi_3 + 0x14));
00677e6b                              *(uint8_t*)edi_1 = *(uint8_t*)((char*)esi_3 + 0x20);
00677e6d                              edi_1 -= 0x28;
00677e70                              cond:0_1 = m_num_1 != 1;
00677e71                              m_num_1 -= 1;
00677e75                          } while (cond:0_1);
00677e77                          edi = arg2;
00677e2e                      }
00677e2e                      
00677e8d                      if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00677e8d                      {
00677e8f                          class CAllIterationList::PTaggedIterationList* m_data_1 = this->m_data;
00677e8f                          
00677e93                          if (m_data_1 != 0)
00677e97                              CAllIterationList::PTaggedIterationList::`vector deleting destructor'(m_data_1, 3);
00677e8d                      }
00677e28                  }
00677e28                  
00677ea2                  this->m_data = esi_1;
00677ea4                  this->m_sizeAndDeallocate = (edi | 0x80000000);
00677ea9                  eax = 1;
00677eaf                  return 1;
00677e1f              }
00677e00          }
00677dc1      }
00677dc1      
00677eb4      eax = 0;
00677eba      return 0;
00677db0  }

00677ebd                                                                                         90 90 90                               ...

00677ec0  uint8_t __thiscall SmartArray<CAllIterationList::PTaggedIterationList,1>::SetNElements(class SmartArray<CAllIterationList::PTaggedIterationList,1>* this, uint32_t const arg2, uint8_t arg3)

00677ec0  {
00677ec4      uint32_t const i_1 = arg2;
00677ed5      uint32_t eax_1;
00677ed5      
00677ed5      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= i_1)
00677ed5      {
00677f07          uint32_t const i = i_1;
00677f07          
00677f09          if (i_1 < this->m_num)
00677f09          {
00677f0e              uint32_t ebx_1 = (i_1 * 0x28);
00677f0e              
00677f71              do
00677f71              {
00677f16                  struct CAllIterationList::PTaggedIterationList::VTable* const var_28_1 = &CAllIterationList::PTaggedIterationList::`vftable';
00677f1e                  void var_18;
00677f1e                  CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(&var_18);
00677f29                  void* esi_2 = (this->m_data + ebx_1);
00677f2b                  int32_t var_20;
00677f2b                  *(uint32_t*)((char*)esi_2 + 8) = var_20;
00677f3a                  int32_t var_1c;
00677f3a                  *(uint32_t*)((char*)esi_2 + 0xc) = var_1c;
00677f3d                  void* var_14;
00677f3d                  SmartArray<unsigned long,1>::operator=(((char*)esi_2 + 0x14), &var_14);
00677f46                  char var_8;
00677f46                  *(uint8_t*)((char*)esi_2 + 0x20) = var_8;
00677f59                  int32_t var_10;
00677f59                  
00677f59                  if ((var_10 & 0x80000000) == 0x80000000)
00677f60                      operator delete[](var_14);
00677f60                  
00677f6b                  i += 1;
00677f6c                  ebx_1 += 0x28;
00677f71              } while (i < this->m_num);
00677f71              
00677f73              i_1 = arg2;
00677f09          }
00677ed5      }
00677ed5      else
00677ed5      {
00677ed7          eax_1 = arg3;
00677edd          uint32_t const i_2;
00677edd          
00677edd          if (eax_1 == 0)
00677ee6              i_2 = SmartArray<unsigned long,1>::get_new_size(this, i_1);
00677edd          else
00677edf              i_2 = i_1;
00677edf          
00677eee          eax_1 = SmartArray<CAllIterationList::PTaggedIterationList,1>::grow(this, i_2);
00677eee          
00677ef5          if (eax_1 == 0)
00677f00              return eax_1;
00677ed5      }
00677ed5      
00677f79      this->m_num = i_1;
00677f7d      eax_1 = 1;
00677f83      return 1;
00677ec0  }

00677f86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00677f90  void __thiscall SmartArray<CAllIterationList::PTaggedIterationList,1>::Serialize(class SmartArray<CAllIterationList::PTaggedIterationList,1>* this, class Archive* arg2)

00677f90  {
00677f9a      uint32_t m_num = this->m_num;
00677fa1      Archive::CheckAlignment(arg2, 4);
00677faa      uint8_t* eax = Archive::GetBytes(arg2, 4);
00677faf      int32_t ebp = 0;
00677faf      
00677fb3      if (eax != 0)
00677fb3      {
00677fb9          if ((arg2->m_flags & 1) == 0)
00677fbf              m_num = *(uint32_t*)eax;
00677fb9          else
00677fbb              *(uint32_t*)eax = m_num;
00677fb3      }
00677fb3      
00677fc1      eax = arg2->m_flags;
00677fc4      eax = !(eax);
00677fc4      
00677fc8      if ((eax & 1) != 0)
00677fc8      {
00677fd3          if (m_num > Archive::GetSizeLeft(arg2))
00677fd3          {
00677fd7              Archive::RaiseError(arg2);
00677fe0              return;
00677fd3          }
00677fd3          
00677fe8          this->m_num = 0;
00677feb          SmartArray<CAllIterationList::PTaggedIterationList,1>::SetNElements(this, m_num, 1);
00677fc8      }
00677fc8      
00677ff3      int32_t i = 0;
00677ff3      
00677ff7      if (this->m_num > 0)
00677ff7      {
00678013          do
00678013          {
00678008              **(uint32_t**)(this->m_data + ebp)(arg2);
0067800d              i += 1;
0067800e              ebp += 0x28;
00678013          } while (i < this->m_num);
00677ff7      }
00677f90  }

0067801c                                                                                      90 90 90 90                              ....

00678020  uint8_t __thiscall SmartArray<CAllIterationList::PTaggedIterationList,1>::AddToEnd(class SmartArray<CAllIterationList::PTaggedIterationList,1>* this, class CAllIterationList::PTaggedIterationList const* arg2)

00678020  {
00678029      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00678029      
00678030      if (this->m_num >= eax_1)
00678030      {
0067803e          uint8_t result = SmartArray<CAllIterationList::PTaggedIterationList,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
0067803e          
00678045          if (result == 0)
00678048              return result;
00678030      }
00678030      
0067805c      void* edi = &this->m_data[this->m_num];
00678062      *(uint32_t*)((char*)edi + 8) = arg2->idDatFile;
0067806c      *(uint32_t*)((char*)edi + 0xc) = *(uint32_t*)((char*)arg2->idDatFile)[4];
0067806f      SmartArray<unsigned long,1>::operator=(((char*)edi + 0x14), &arg2->List.m_Ints.m_data);
00678077      *(uint8_t*)((char*)edi + 0x20) = arg2->List.m_bSorted;
0067807f      this->m_num += 1;
00678083      uint32_t eax_8;
00678083      eax_8 = 1;
00678086      return 1;
00678020  }

00678089                             90 90 90 90 90 90 90                                                           .......

00678090  void __thiscall CAllIterationList::Serialize(class CAllIterationList* this, class Archive* arg2)

00678090  {
00678093      /* tailcall */
00678093      return SmartArray<CAllIterationList::PTaggedIterationList,1>::Serialize(&this->m_Lists, arg2);
00678090  }

00678098                                                                          90 90 90 90 90 90 90 90                          ........

006780a0  class CMostlyConsecutiveIntSet* __thiscall CAllIterationList::AddIterationList(class CAllIterationList* this, uint64_t arg2)

006780a0  {
006780ab      struct CAllIterationList::PTaggedIterationList::VTable* const var_28 = &CAllIterationList::PTaggedIterationList::`vftable';
006780b3      void var_18;
006780b3      CMostlyConsecutiveIntSet::CMostlyConsecutiveIntSet(&var_18);
006780c2      SmartArray<CAllIterationList::PTaggedIterationList,1>::AddToEnd(&this->m_Lists, &var_28);
006780d7      int32_t var_10;
006780d7      void* var_14;
006780d7      
006780d7      if ((var_10 & 0x80000000) == 0x80000000)
006780de          operator delete[](var_14);
006780e9      class CAllIterationList::PTaggedIterationList* m_data = this->m_Lists.m_data;
006780e6      this->m_Lists;
006780f6      m_data[(*(uint32_t*)((char*)*(int32_t*)((char*)this + 4))[8] - 1)].idDatFile = arg2;
006780fe      *(uint32_t*)(&m_data[(*(uint32_t*)((char*)*(int32_t*)((char*)this + 4))[8] - 1)].idDatFile + 4) = *(uint32_t*)((char*)arg2)[4];
0067810d      return &this->m_Lists.m_data[(*(uint32_t*)((char*)*(int32_t*)((char*)this + 4))[8] - 1)].List;
006780a0  }


00678110  class PFileNode* __thiscall PFileNode::MakeSubNodeAsBool(class PFileNode* this, uint8_t arg2)

00678110  {
00678113      void* result = *(int32_t*)((char*)this->vtable + 4)();
00678113      
0067811a      if (result == 0)
0067811d          return result;
0067811d      
00678120      int32_t* ecx = *(uint32_t*)((char*)result + 8);
00678120      
00678125      if (ecx != 0)
0067812b          **(uint32_t**)ecx(1);
0067812b      
0067812f      *(uint32_t*)((char*)result + 8) = 0;
00678136      void* eax = operator new(8);
00678136      
00678140      if (eax == 0)
00678140      {
0067815a          *(uint32_t*)((char*)result + 8) = 0;
00678160          return result;
00678140      }
00678140      
00678146      *(uint32_t*)eax = 0x796010;
0067814c      *(uint8_t*)((char*)eax + 4) = arg2;
0067814f      *(uint32_t*)((char*)result + 8) = eax;
00678155      return result;
00678110  }

00678163           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00678170  void __fastcall UILocationData::UILocationData(class UILocationData* this)

00678170  {
00678177      this->m_x0 = 0xc0400000;
00678179      this->m_y0 = -3f;
0067817c      this->m_x1 = -3f;
0067817f      this->m_y1 = -3f;
00678182      this->m_shown = 1;
00678170  }

00678187                       90 90 90 90 90 90 90 90 90                                                         .........

00678190  class IDClass<_tagDataID,32,0>* FileArray::GetDID(class IDClass<_tagDataID,32,0>* __return, class PStringBase<char> const* arg2, uint32_t const arg3)

00678190  {
0067819a      class IDClass<_tagDataID,32,0>* result;
0067819a      
0067819a      if (arg2->m_charbuffer->m_data[-4] == 1)
006781b1          result = __return;
0067819a      else
0067819a      {
006781a2          result = __return;
006781a2          
006781a6          if (arg3 == 0)
006781a6          {
006781ae              result->id = INVALID_DID.id;
006781b0              return result;
006781a6          }
0067819a      }
0067819a      
006781bb      result->id = INVALID_DID.id;
006781bd      return result;
00678190  }

006781be                                                                                            90 90                                ..

006781c0  class PStringBase<char>* FileArray::GetRelativeFilePath(class PStringBase<char>* __return, class IDClass<_tagDataID,32,0> arg2, uint32_t const arg3)

006781c0  {
006781c0      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
006781c8      class PSRefBufferCharData<char>** result = __return;
006781d0      *(uint32_t*)result = m_charbuffer;
006781d2      InterlockedIncrement(((char*)m_charbuffer - 0x10));
006781db      return result;
006781c0  }

006781dc                                                                                      90 90 90 90                              ....

006781e0  class PStringBase<char>* FileArray::GetFileNameForDummies(class PStringBase<char>* __return, class IDClass<_tagDataID,32,0> arg2)

006781e0  {
006781eb      if (arg2 == INVALID_DID.id)
006781eb      {
006781ed          class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
006781f2          class PSRefBufferCharData<char>** __return_1 = __return;
006781fc          *(uint32_t*)__return_1 = m_charbuffer;
006781fe          InterlockedIncrement(((char*)m_charbuffer - 0x10));
00678207          return __return_1;
006781eb      }
006781eb      
00678209      MasterDBMap::DivineType(arg2);
0067820e      class PSRefBufferCharData<char>* m_charbuffer_1 = PStringBase<char>::null_string.m_charbuffer;
00678214      class PSRefBufferCharData<char>** __return_2 = __return;
00678221      *(uint32_t*)__return_2 = m_charbuffer_1;
00678223      InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
0067822c      return __return_2;
006781e0  }

0067822d                                         90 90 90                                                               ...

00678230  class PStringBase<char>* FileArray::GetAbsoluteFilePathForDummies(class PStringBase<char>* __return, class PStringBase<char> const* arg2)

00678230  {
00678244      if (MasterDBMap::DivineType(arg2) == 0)
00678244      {
00678246          class PSRefBufferCharData<char>* m_charbuffer_1 = PStringBase<char>::null_string.m_charbuffer;
00678252          __return->m_charbuffer = m_charbuffer_1;
00678254          InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
0067825d          return __return;
00678244      }
00678244      
0067825e      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
00678269      __return->m_charbuffer = m_charbuffer;
0067826b      InterlockedIncrement(((char*)m_charbuffer - 0x10));
00678274      return __return;
00678230  }

00678275                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00678280  int32_t FileTime2TimeType(struct _FILETIME const* arg1)

00678280  {
00678288      int32_t var_8 = 1;
0067828a      int32_t var_c = 0;
0067828c      int32_t var_10 = 0;
0067828e      uint32_t dwHighDateTime = arg1->dwHighDateTime;
0067828f      int32_t eax_1;
0067828f      int32_t edx;
0067828f      eax_1 = _allmul();
00678294      uint32_t dwLowDateTime = arg1->dwLowDateTime;
00678298      int32_t eax_2 = (eax_1 + dwLowDateTime);
0067829c      int32_t var_8_1 = 0;
006782a2      int32_t var_c_1 = 0x989680;
006782ad      int32_t var_10_1 = ((edx + 0) - 0x19db1df);
006782ae      int32_t var_14 = (eax_2 + 0x2ac18000);
006782b5      return _aulldiv();
00678280  }

006782b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006782c0  uint8_t __stdcall TFile2IDTable::GetFileWriteTimeByEntry(class TFile2IDTable* this @ ecx, class TFileEntry* arg2, int32_t* arg3)

006782c0  {
006782cb      *(uint32_t*)arg3 = arg2->m_tFileWriteTime;
006782cd      class TFileEntry* eax;
006782cd      eax = 1;
006782cf      return 1;
006782c0  }

006782d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006782e0  uint8_t __thiscall TFile2IDTable::GetFileWriteTimeByDID(class TFile2IDTable* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, int32_t* arg4)

006782e0  {
006782e0      class TFile2IDTable* this_1 = this;
006782e8      struct TFile2IDTable::VTable* vtable = this->vtable;
006782f7      this_1 = nullptr;
006782f7      
00678304      if (vtable->FindEntryByDID(arg2, arg3, &this_1) != 0)
00678319          return this->vtable->GetFileWriteTimeByEntry(this_1, arg4);
00678319      
0067832b      *(uint32_t*)arg4 = _ftol2();
0067832d      int32_t eax_3;
0067832d      eax_3 = 0;
00678331      return 0;
006782e0  }

00678334                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00678340  class IDClass<_tagDataID,32,0>* __thiscall TFile2IDTable::GetHighestDID(class TFile2IDTable* this, class IDClass<_tagDataID,32,0>* __return, uint32_t arg3)

00678340  {
00678347      void* eax_1 = this->vtable->GetDBTypeEntry(arg3);
00678347      
0067834c      if (eax_1 != 0)
0067834c      {
00678355          __return->id = *(uint32_t*)((char*)eax_1 + 0x10);
00678357          return __return;
0067834c      }
0067834c      
00678364      __return->id = INVALID_DID.id;
00678366      return __return;
00678340  }

00678369                             90 90 90 90 90 90 90                                                           .......

00678370  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>* this, uint32_t arg2)

00678370  {
00678373      class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** m_buckets = this->m_buckets;
0067837b      this->vtable = 0x7fe138;
0067837b      
00678381      if (m_buckets != &this->m_aInplaceBuckets)
00678384          operator delete[](m_buckets);
00678384      
0067838e      this->m_buckets = nullptr;
00678391      this->m_firstInterestingBucket = nullptr;
00678394      this->m_numBuckets = 0;
00678397      this->m_numElements = 0;
00678397      
0067839f      if ((arg2 & 1) != 0)
006783a2          operator delete(this);
006783a2      
006783ad      return this;
00678370  }


006783b0  void* __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>* this, uint32_t arg2)

006783b0  {
006783b3      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** m_buckets = this->m_buckets;
006783bb      this->vtable = 0x7fe13c;
006783bb      
006783c1      if (m_buckets != &this->m_aInplaceBuckets)
006783c4          operator delete[](m_buckets);
006783c4      
006783ce      this->m_buckets = nullptr;
006783d1      this->m_firstInterestingBucket = nullptr;
006783d4      this->m_numBuckets = 0;
006783d7      this->m_numElements = 0;
006783d7      
006783df      if ((arg2 & 1) != 0)
006783e2          operator delete(this);
006783e2      
006783ed      return this;
006783b0  }


006783f0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>* this, uint32_t arg2)

006783f0  {
006783f3      class HashTableData<unsigned long,TDBTypeEntry *>** m_buckets = this->m_buckets;
006783fb      this->vtable = 0x7fe140;
006783fb      
00678401      if (m_buckets != &this->m_aInplaceBuckets)
00678404          operator delete[](m_buckets);
00678404      
0067840e      this->m_buckets = nullptr;
00678411      this->m_firstInterestingBucket = nullptr;
00678414      this->m_numBuckets = 0;
00678417      this->m_numElements = 0;
00678417      
0067841f      if ((arg2 & 1) != 0)
00678422          operator delete(this);
00678422      
0067842d      return this;
006783f0  }


00678430  class PStringBase<char>* __thiscall TFileEntry::GetFileName(class TFileEntry const* this, class PStringBase<char>* __return)

00678430  {
00678430      class PSRefBufferCharData<char>* m_charbuffer = this->m_pFileName.m_charbuffer;
00678438      __return->m_charbuffer = m_charbuffer;
0067843e      InterlockedIncrement(&m_charbuffer[-1]);
00678447      return __return;
00678430  }

0067844a                                90 90 90 90 90 90                                                            ......

00678450  void __thiscall TFileEntry::SetPath(class TFileEntry* this, class PStringBase<char> const* arg2)

00678450  {
00678458      class PSRefBufferCharData<char>* m_charbuffer = this->m_pPath.m_charbuffer;
00678458      
0067845d      if (m_charbuffer == arg2->m_charbuffer)
00678494          return;
00678494      
00678473      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0067847b          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0067847b      
0067847d      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00678480      this->m_pPath.m_charbuffer = m_charbuffer_1;
00678488      arg2 = &m_charbuffer_1[-1];
0067848c      /* tailcall */
0067848c      return InterlockedIncrement();
00678450  }

00678497                                                                       90 90 90 90 90 90 90 90 90                         .........

006784a0  void __thiscall TFileEntry::SetFileName(class TFileEntry* this, class PStringBase<char> const* arg2)

006784a0  {
006784a8      class PSRefBufferCharData<char>* m_charbuffer = this->m_pFileName.m_charbuffer;
006784a8      
006784ad      if (m_charbuffer == arg2->m_charbuffer)
006784e4          return;
006784e4      
006784c3      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
006784cb          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
006784cb      
006784cd      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
006784d0      this->m_pFileName.m_charbuffer = m_charbuffer_1;
006784d8      arg2 = &m_charbuffer_1[-1];
006784dc      /* tailcall */
006784dc      return InterlockedIncrement();
006784a0  }

006784e7                       90 90 90 90 90 90 90 90 90                                                         .........

006784f0  void __fastcall TFileEntry::~TFileEntry(class TFileEntry* this)

006784f0  {
006784fe      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = (this->m_pFileName.m_charbuffer - 0x14);
00678505      this->vtable = 0x7fe144;
00678505      
00678513      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0067851b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0067851b      
00678520      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->m_pPath.m_charbuffer - 0x14);
00678520      
0067852f      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00678537          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00678537      
00678539      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
006784f0  }

00678543           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00678550  void* __thiscall TFileEntry::`scalar deleting destructor'(class TFileEntry* this, uint32_t arg2)

00678550  {
00678553      TFileEntry::~TFileEntry(this);
00678553      
0067855d      if ((arg2 & 1) != 0)
00678560          operator delete(this);
00678560      
0067856b      return this;
00678550  }

0067856e                                            90 90                                                                ..

00678570  void __thiscall TFileEntry::TFileEntry(class TFileEntry* this, class PStringBase<char> arg2, class PStringBase<char> arg3)

00678570  {
00678583      this->m_cRef = 1;
0067858a      this->vtable = 0x7fe144;
00678591      this->m_pPath.m_charbuffer = arg2;
00678594      InterlockedIncrement((arg2 - 0x10));
0067859e      this->m_pFileName.m_charbuffer = arg3;
006785a1      InterlockedIncrement((arg3 - 0x10));
006785b1      this->m_did.id = INVALID_DID.id;
006785b4      this->m_dbtype = 0;
006785b7      this->m_EntryType = NewName;
006785ba      this->m_bAuthoritative = 1;
006785c9      this->m_tFileWriteTime = _ftol2();
006785c9      
006785db      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
006785e3          **(uint32_t**)(arg2 - 0x14)(1);
006785e3      
006785f4      if ((InterlockedDecrement((arg3 - 0x10)) == 0 && arg3 != 0x14))
006785fd          **(uint32_t**)(arg3 - 0x14)(1);
00678570  }

00678608                          90 90 90 90 90 90 90 90                                                          ........

00678610  class IDClass<_tagDataID,32,0>* __thiscall TFile2IDTable::GetDIDByFileName(class TFile2IDTable* this, class IDClass<_tagDataID,32,0>* __return, class PStringBase<char> arg3, uint32_t arg4)

00678610  {
00678610      class TFile2IDTable* this_1 = this;
00678611      class PStringBase<char> eax = arg3;
00678615      int32_t ebx;
00678615      int32_t var_8 = ebx;
0067861c      int32_t ebp;
0067861c      int32_t var_c = ebp;
0067861d      int32_t esi;
0067861d      int32_t var_10 = esi;
0067861e      int32_t edi;
0067861e      int32_t var_14 = edi;
00678622      arg3 = eax;
0067862c      InterlockedIncrement((eax - 0x10));
00678642      int32_t var_14_1 = PSUtils::strip_directory(&arg_14);
00678643      void* ecx_1 = arg_14;
00678649      arg3 = 0;
0067865b      InterlockedIncrement(((char*)arg_14 - 0x10), ecx_1, &arg3, 1);
00678661      char eax_3 = this->vtable->FindEntryByName();
00678672      int32_t* esi_3 = ((char*)arg_14 - 0x14);
00678677      void* var_c_2;
00678677      
00678677      if (eax_3 == 0)
00678677      {
00678691          *(uint32_t*)result = INVALID_DID.id;
00678694          var_c_2 = &esi_3[1];
00678677      }
00678677      else
00678677      {
00678683          *(uint32_t*)result = *(uint32_t*)(arg3 + 0x10);
00678686          var_c_2 = &esi_3[1];
00678677      }
00678677      
0067869d      if ((InterlockedDecrement(var_c_2) == 0 && esi_3 != 0))
006786a5          **(uint32_t**)esi_3(1);
006786a5      
006786b3      if ((InterlockedDecrement((eax - 0x10)) == 0 && eax != 0x14))
006786bb          **(uint32_t**)(eax - 0x14)(1);
006786bb      
006786c4      return result;
00678610  }

006786c7                       90 90 90 90 90 90 90 90 90                                                         .........

006786d0  uint8_t __thiscall TFile2IDTable::GetFileNameByDID(class TFile2IDTable* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, class PStringBase<char>* arg4)

006786d0  {
006786d0      class TFile2IDTable* this_1 = this;
006786d1      struct TFile2IDTable::VTable* vtable = this->vtable;
006786e2      this_1 = nullptr;
006786e2      
006786ef      if (vtable->FindEntryByDID(arg2, arg3, &this_1) == 0)
00678762          return 0;
00678762      
006786fd      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>* esi = this_1->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[0];
00678705      InterlockedIncrement(&esi[-1]);
0067870b      void* eax_2 = *(uint32_t*)arg3;
0067870b      
0067870f      if (eax_2 != esi)
0067870f      {
00678711          int32_t ebx;
00678711          int32_t var_18_1 = ebx;
00678711          
00678725          if ((InterlockedDecrement(((char*)eax_2 - 0x10)) == 0 && eax_2 != 0x14))
0067872d              **(uint32_t**)((char*)eax_2 - 0x14)(1);
0067872d          
00678734          *(uint32_t*)arg4 = esi;
00678736          InterlockedIncrement(&esi[-1]);
0067870f      }
0067870f      
0067874c      if ((InterlockedDecrement(&esi[-1]) == 0 && esi != 0x14))
00678754          *(uint32_t*)*(int32_t*)((char*)esi + -0x14)(1);
00678754      
00678758      int32_t eax_5;
00678758      eax_5 = 1;
0067875c      return 1;
006786d0  }

00678765                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00678770  uint8_t __thiscall TFile2IDTable::GetFullPathByDID(class TFile2IDTable* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, class PStringBase<char>* arg4)

00678770  {
00678770      class TFile2IDTable* this_1 = this;
00678778      struct TFile2IDTable::VTable* vtable = this->vtable;
00678787      this_1 = nullptr;
00678787      
00678794      if (vtable->FindEntryByDID(arg2, arg3, &this_1) != 0)
006787a9          return this->vtable->GetFullPathByEntry(this_1, arg4);
006787a9      
006787b7      class PSRefBufferCharData<char>* m_charbuffer = arg4->m_charbuffer;
006787b7      
006787bb      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
006787bb      {
006787d0          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
006787d8              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
006787d8          
006787da          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
006787e6          arg4->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
006787e8          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
006787bb      }
006787bb      
006787ef      m_charbuffer = 0;
006787f3      return 0;
00678770  }

006787f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00678800  uint8_t __thiscall TFile2IDTable::GetFullPathByFileName(class TFile2IDTable* this, class PStringBase<char> arg2, uint32_t arg3, class PStringBase<char>* arg4)

00678800  {
00678803      class PStringBase<char> eax = arg2;
00678814      arg2 = eax;
0067881e      InterlockedIncrement((eax - 0x10));
00678834      int32_t var_24 = PSUtils::strip_directory(&arg2);
00678835      class PStringBase<char> ecx_1 = arg2;
0067883d      void* var_8 = nullptr;
0067884b      InterlockedIncrement((arg2 - 0x10));
0067884b      
00678856      if (this->vtable->FindEntryByName(ecx_1, &var_8, 1) != 0)
00678856      {
00678858          void* edx_2 = var_8;
00678863          int32_t var_4;
00678863          int32_t* var_24_2 = &var_4;
00678864          var_4 = 0;
00678868          int32_t eax_4 = *(uint32_t*)((char*)edx_2 + 0xc);
00678873          InterlockedIncrement((eax_4 - 0x10));
00678875          this->vtable->FindEntryByName(eax_4, &var_4, 1);
0067888a          char eax_8 = this->vtable->GetFullPathByEntry(var_8, arg4);
00678897          int32_t* esi_2 = (arg2 - 0x14);
00678897          
006788a8          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
006788b0              **(uint32_t**)esi_2(1);
006788b0          
006788be          if ((InterlockedDecrement((eax - 0x10)) == 0 && eax != 0x14))
006788c7              **(uint32_t**)(eax - 0x14)(1);
006788c7          
006788c9          int32_t eax_11;
006788c9          eax_11 = eax_8;
006788d2          return eax_11;
00678856      }
00678856      
006788d9      class PSRefBufferCharData<char>* m_charbuffer = arg4->m_charbuffer;
006788d9      
006788e1      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
006788e1      {
006788f6          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
006788fe              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
006788fe          
00678900          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0067890b          arg4->m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0067890d          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
006788e1      }
006788e1      
00678919      int32_t* esi_5 = (arg2 - 0x14);
00678919      
00678928      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
00678930          **(uint32_t**)esi_5(1);
00678930      
0067893e      if ((InterlockedDecrement((eax - 0x10)) == 0 && eax != 0x14))
00678947          **(uint32_t**)(eax - 0x14)(1);
00678947      
0067894c      int32_t eax_16;
0067894c      eax_16 = 0;
00678952      return 0;
00678800  }

00678955                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00678960  uint8_t __thiscall TFile2IDTable::GetFileWriteTimeByFileName(class TFile2IDTable* this, class PStringBase<char> arg2, uint32_t arg3, int32_t* arg4)

00678960  {
00678960      class TFile2IDTable* this_2 = this;
00678971      class TFile2IDTable* this_1 = this;
00678974      class PStringBase<char> ecx = arg2;
0067897a      this_2 = nullptr;
0067898b      InterlockedIncrement((ecx - 0x10), ecx, &this_2, 1);
00678991      char eax;
00678991      int32_t ecx_3;
00678991      eax = this->vtable->FindEntryByName();
00678991      
00678996      if (eax == 0)
00678996      {
00678a0d          *(uint32_t*)arg4 = _ftol2();
00678a0d          
00678a1b          if ((InterlockedDecrement((ecx - 0x10)) == 0 && ecx != 0x14))
00678a23              **(uint32_t**)(ecx - 0x14)(1);
00678a23          
00678a27          int32_t eax_9;
00678a27          eax_9 = 0;
00678a2b          return 0;
00678996      }
00678996      
00678998      class TFile2IDTable* this_3 = this_2;
006789a3      int32_t var_1c_1 = ecx_3;
006789a4      arg2 = 0;
006789ac      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>* eax_1 = this_3->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[0];
006789b7      InterlockedIncrement(&eax_1[-1], eax_1, &arg2, 1);
006789b9      this->vtable->FindEntryByName();
006789d5      arg4 = this->vtable->GetFileWriteTimeByEntry(this_2, arg4);
006789d5      
006789e5      if ((InterlockedDecrement((ecx - 0x10)) == 0 && ecx != 0x14))
006789ed          **(uint32_t**)(ecx - 0x14)(1);
006789ed      
006789ef      int32_t eax_6;
006789ef      eax_6 = arg4;
006789f7      return eax_6;
00678960  }

00678a2e                                            90 90                                                                ..

00678a30  class PStringBase<char>* __thiscall TFile2IDTable::GetDBTypeString(class TFile2IDTable* this, class PStringBase<char>* __return, uint32_t arg3)

00678a30  {
00678a38      void* eax_1 = this->vtable->GetDBTypeEntry(arg3);
00678a38      
00678a41      if (eax_1 != 0)
00678a41      {
00678a43          class PStringBase<char> eax_2 = *(uint32_t*)((char*)eax_1 + 0xc);
00678a46          __return->m_charbuffer = eax_2;
00678a4c          InterlockedIncrement((eax_2 - 0x10));
00678a55          return __return;
00678a41      }
00678a41      
00678a58      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
00678a63      __return->m_charbuffer = m_charbuffer;
00678a65      InterlockedIncrement(((char*)m_charbuffer - 0x10));
00678a6e      return __return;
00678a30  }

00678a71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00678a80  uint8_t __thiscall TFile2IDTable::SanitizeEntry(class TFile2IDTable* this, class PStringBase<char> const* arg2, class TFileEntry** arg3)

00678a80  {
00678a80      class TFile2IDTable* var_4 = this;
00678a81      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00678a90      var_4 = PStringBase<char>::s_NullBuffer_1;
00678a98      int32_t ebx;
00678a98      ebx = 0;
00678a9a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00678a9c      class PStringBase<char>* esi = arg2;
00678a9c      
00678ab6      if (PSUtils::GetLongPathNameA(esi, &var_4) != 0)
00678ab6      {
00678ac3          PSUtils::cleanup_filename(&var_4, 1);
00678ac8          class PSRefBufferCharData<char>* m_charbuffer = esi->m_charbuffer;
00678aca          class TFile2IDTable* eax_2 = var_4;
00678ad1          int32_t eax_4;
00678ad1          
00678ad1          while (true)
00678ad1          {
00678ad1              char edx_1 = eax_2->vtable;
00678ad5              char temp1_1 = m_charbuffer->m_data[0];
00678ad5              bool c_1 = edx_1 < temp1_1;
00678ad5              
00678ad7              if (edx_1 == temp1_1)
00678ad7              {
00678adb                  if (edx_1 == 0)
00678adb                  {
00678af1                      eax_4 = 0;
00678af3                      break;
00678adb                  }
00678adb                  
00678add                  edx_1 = *(uint8_t*)((char*)eax_2->vtable)[1];
00678ae2                  char temp4_1 = m_charbuffer->m_data[1];
00678ae2                  c_1 = edx_1 < temp4_1;
00678ae2                  
00678ae5                  if (edx_1 == temp4_1)
00678ae5                  {
00678ae7                      eax_2 = (&eax_2->vtable + 2);
00678aea                      m_charbuffer = &m_charbuffer->m_data[2];
00678aea                      
00678aef                      if (edx_1 != 0)
00678aef                          continue;
00678aef                      
00678af1                      eax_4 = 0;
00678af3                      break;
00678ae5                  }
00678ad7              }
00678ad7              
00678af5              bool c_2 = /* bool c_2 = unimplemented  {sbb eax, eax} */;
00678af7              eax_4 = (((char*)eax_2 - eax_2) + 1);
00678af7              break;
00678ad1          }
00678ad1          
00678afc          if (eax_4 != 0)
00678afc          {
00678afe              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00678b03              arg2 = PStringBase<char>::s_NullBuffer_2;
00678b0b              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00678b17              PSUtils::get_directory(&arg2, &var_4);
00678b21              PSUtils::strip_directory(&var_4);
00678b34              TFileEntry::SetPath(*(uint32_t*)arg3, &arg2);
00678b40              TFileEntry::SetFileName(*(uint32_t*)arg3, &var_4);
00678b49              void* __offset(PStringBase<char>, -0x14) esi_3 = &arg2[-5];
00678b50              ebx = 1;
00678b50              
00678b5a              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00678b62                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00678afc          }
00678ab6      }
00678ab6      
00678b68      void* __offset(TFile2IDTable, -0x14) esi_5 = ((char*)var_4 - 0x14);
00678b68      
00678b77      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
00678b7f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
00678b7f      
00678b84      int32_t eax_8;
00678b84      eax_8 = ebx;
00678b88      return eax_8;
00678a80  }

00678b8b                                   90 90 90 90 90                                                             .....

00678b90  uint8_t __stdcall TFile2IDTable::ReformatDirectoryName(class TFile2IDTable* this @ ecx, class PStringBase<char> arg2, char* arg3)

00678b90  {
00678b9c      this = *(uint8_t*)arg2;
00678b9e      int32_t ebx;
00678b9e      ebx = 0;
00678ba2      char* esi = arg3;
00678ba4      class PStringBase<char> eax = arg2;
00678ba4      
00678ba6      if (this != 0)
00678ba6      {
00678be0          do
00678be0          {
00678bb0              this = *(uint8_t*)eax;
00678bb0              
00678bb5              if (this == 0x3a)
00678bb9                  ebx = ebx == 0;
00678bb9              
00678bbe              if (eax == arg2)
00678bbe              {
00678bc9              label_678bc9:
00678bc9                  
00678bcb                  if (this != 0x2f)
00678bcb                  {
00678bd7                      *(uint8_t*)esi = this;
00678bd9                      esi = &esi[1];
00678bcb                  }
00678bcb                  else if (*(uint8_t*)(eax + 1) != 0x2f)
00678bd0                  {
00678bd2                      *(uint8_t*)esi = 0x5c;
00678bd9                      esi = &esi[1];
00678bd0                  }
00678bbe              }
00678bbe              else if (this != 0x2f)
00678bc2              {
00678bd7                  *(uint8_t*)esi = this;
00678bd9                  esi = &esi[1];
00678bc2              }
00678bc2              else if (*(uint8_t*)(eax + 1) != 0x2f)
00678bc7                  goto label_678bc9;
00678bc7              
00678bda              this = *(uint8_t*)(eax + 1);
00678bdd              eax += 1;
00678be0          } while (this != 0);
00678be0          
00678bea          if ((esi > arg3 && esi[0xffffffff] == 0x5c))
00678bec              esi -= 1;
00678ba6      }
00678ba6      
00678bed      *(uint8_t*)esi = 0;
00678bed      
00678c03      if ((InterlockedDecrement((arg2 - 0x10)) == 0 && arg2 != 0x14))
00678c0b          **(uint32_t**)(arg2 - 0x14)(1);
00678c0b      
00678c10      int32_t eax_2;
00678c10      eax_2 = ebx;
00678c13      return eax_2;
00678b90  }

00678c16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00678c20  uint8_t __convention("regparm") TFile2IDTable::AssignSoonToExistFilePath(class TFile2IDTable* this @ ecx, class PStringBase<char> arg2)

00678c20  {
00678c2d      int32_t ebx;
00678c2d      int32_t var_110 = ebx;
00678c2e      int32_t esi;
00678c2e      int32_t var_114 = esi;
00678c35      int32_t edi;
00678c35      int32_t var_118 = edi;
00678c40      ebx = 0;
00678c42      InterlockedIncrement((arg2 - 0x10));
00678c44      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00678c49      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00678c51      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1], arg2);
00678c58      int32_t var_f4;
00678c58      PSUtils::strip_directory(&var_f4);
00678c77      class PStringBase<char> var_f0;
00678c77      int32_t var_108_1 = PSUtils::get_directory(&var_f0, &arg_1c);
00678c88      int32_t var_ec;
00678c88      InterlockedIncrement((var_f0 - 0x10), var_f0, &var_ec);
00678c93      char* var_f8;
00678c93      void* var_e8;
00678c93      
00678c93      if (TFile2IDTable::ReformatDirectoryName(this, PStringBase<char>::s_NullBuffer_2, var_f8) != 0)
00678c93      {
00678c9b          int32_t eax_4;
00678c9b          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
00678c9b          eax_4 = _ftol2();
00678ca1          PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
00678cae          void var_e0;
00678cae          int32_t var_100_2 = PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_2, &var_e0);
00678cbf          InterlockedIncrement(((char*)var_e8 - 0x10), var_e8, PStringBase<char>::s_NullBuffer_2, eax_4);
00678cbf          
00678cca          if (this->vtable->AssignPathToFileNameInternal() != 0)
00678ccc              ebx = 1;
00678c93      }
00678c93      
00678ce7      void* var_e4;
00678ce7      
00678ce7      if ((InterlockedDecrement(((char*)var_e4 - 0x10)) == 0 && var_e4 != 0x14))
00678cef          **(uint32_t**)((char*)var_e4 - 0x14)(1);
00678cef      
00678d04      if ((InterlockedDecrement(((char*)var_e8 - 0x10)) == 0 && var_e8 != 0x14))
00678d0c          **(uint32_t**)((char*)var_e8 - 0x14)(1);
00678d0c      
00678d24      if ((InterlockedDecrement(((char*)arg_28 - 0x10)) == 0 && arg_28 != 0x14))
00678d2c          **(uint32_t**)((char*)arg_28 - 0x14)(1);
00678d2c      
00678d30      int32_t eax_11;
00678d30      eax_11 = ebx;
00678d39      return eax_11;
00678c20  }

00678d3c                                                                                      90 90 90 90                              ....

00678d40  uint8_t __thiscall TFile2IDTable::RegisterDBType(class TFile2IDTable* this, uint32_t arg2, class PStringBase<char> arg3, class PStringBase<char> arg4, class PStringBase<char> arg5)

00678d40  {
00678d58      char* eax_1;
00678d58      int32_t ecx_2;
00678d58      eax_1 = this->vtable->GetDBTypeEntry(arg2);
00678d5b      char* esi = eax_1;
00678d5d      eax_1 = esi[1];
00678d5d      
00678d62      if (eax_1 != 0)
00678d62      {
00678d80          if ((InterlockedDecrement((arg3 - 0x10)) == 0 && arg3 != 0x14))
00678d88              **(uint32_t**)(arg3 - 0x14)(1);
00678d88          
00678da0          if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
00678da8              **(uint32_t**)(arg4 - 0x14)(1);
00678da8          
00678dc0          if ((InterlockedDecrement((arg5 - 0x10)) == 0 && arg5 != 0x14))
00678dc8              **(uint32_t**)(arg5 - 0x14)(1);
00678dc8          
00678dca          int32_t eax_6;
00678dca          eax_6 = 0;
00678dd6          return 0;
00678d62      }
00678d62      
00678dd9      void* eax_7 = *(uint32_t*)(esi + 0xc);
00678dd9      
00678de9      if (eax_7 != arg3)
00678de9      {
00678dfe          if ((InterlockedDecrement(((char*)eax_7 - 0x10)) == 0 && eax_7 != 0x14))
00678e06              **(uint32_t**)((char*)eax_7 - 0x14)(1);
00678e06          
00678e0f          *(uint32_t*)(esi + 0xc) = arg3;
00678e16          ecx_2 = InterlockedIncrement((arg3 - 0x10));
00678de9      }
00678de9      
00678e1c      void var_104;
00678e1c      void* var_124_10 = &var_104;
00678e1d      int32_t var_128 = ecx_2;
00678e27      int32_t* ebx_2 = (arg5 - 0x14);
00678e2a      esi[1] = 1;
00678e2e      *(uint8_t*)esi = 0;
00678e36      void** var_12c = &ebx_2[1];
00678e37      int32_t* var_10c = ebx_2;
00678e3b      InterlockedIncrement(var_12c);
00678e3f      uint8_t eax_12;
00678e3f      void** ecx_11;
00678e3f      eax_12 = TFile2IDTable::ReformatDirectoryName(this, arg5, var_124_10);
00678e46      void* var_110;
00678e46      class PStringBase<unsigned short> var_108;
00678e46      
00678e46      if (eax_12 != 0)
00678e46      {
00678e48          struct TFile2IDTable::VTable* vtable = this->vtable;
00678e4a          int32_t var_124_11 = 2;
00678e50          void** var_128_2 = &var_110;
00678e51          var_12c = ecx_11;
00678e59          PStringBase<char>::PStringBase<char>(&var_12c, &var_104);
00678e60          vtable->FindEntryByName(var_12c, var_128_2, var_124_11);
00678e6e          *(uint8_t*)esi = *(uint32_t*)((char*)var_110 + 0x18) == 3;
00678e74          class PStringBase<unsigned short> ebx_3 = *(uint32_t*)((char*)var_110 + 8);
00678e77          var_108 = ebx_3;
00678e82          InterlockedIncrement((ebx_3 - 0x10));
00678e8c          PStringBase<unsigned short>::operator=(&esi[4], &var_108);
00678e95          int32_t eax_15;
00678e95          eax_15 = InterlockedDecrement((ebx_3 - 0x10));
00678e95          
00678ea1          if ((eax_15 == 0 && ebx_3 != 0x14))
00678ea9              ecx_11 = **(uint32_t**)(ebx_3 - 0x14)(1);
00678ea9          
00678eab          ebx_2 = var_10c;
00678e46      }
00678e46      
00678eb3      void* var_124_16 = &var_104;
00678eb4      void** var_128_3 = ecx_11;
00678ec3      var_12c = (arg4 - 0x10);
00678ec4      InterlockedIncrement(var_12c);
00678ec4      
00678ecf      if (TFile2IDTable::ReformatDirectoryName(this, arg4, var_124_16) != 0)
00678ecf      {
00678ed1          struct TFile2IDTable::VTable* vtable_1 = this->vtable;
00678ed3          int32_t var_124_17 = 2;
00678ed9          void** var_128_5 = &var_110;
00678eda          var_12c = &var_110;
00678ee2          PStringBase<char>::PStringBase<char>(&var_12c, &var_104);
00678ee9          vtable_1->FindEntryByName(var_12c, var_128_5, var_124_17);
00678efd          *(uint8_t*)esi &= *(uint32_t*)((char*)var_110 + 0x18) == 3;
00678f03          class PStringBase<unsigned short> edi_2 = *(uint32_t*)((char*)var_110 + 8);
00678f0a          var_108 = edi_2;
00678f0e          InterlockedIncrement((edi_2 - 0x10));
00678f18          PStringBase<unsigned short>::operator=(&esi[8], &var_108);
00678f18          
00678f30          if ((InterlockedDecrement((edi_2 - 0x10)) == 0 && edi_2 != 0x14))
00678f38              **(uint32_t**)(edi_2 - 0x14)(1);
00678f38          
00678f3a          ebx_2 = var_10c;
00678ecf      }
00678ecf      
00678f5a      if ((InterlockedDecrement((arg3 - 0x10)) == 0 && arg3 != 0x14))
00678f62          **(uint32_t**)(arg3 - 0x14)(1);
00678f62      
00678f7a      if ((InterlockedDecrement((arg4 - 0x10)) == 0 && arg4 != 0x14))
00678f82          **(uint32_t**)(arg4 - 0x14)(1);
00678f82      
00678f90      if ((InterlockedDecrement(&ebx_2[1]) == 0 && ebx_2 != 0))
00678f98          **(uint32_t**)ebx_2(1);
00678f98      
00678f9d      int32_t eax_25;
00678f9d      eax_25 = 1;
00678fa6      return 1;
00678d40  }

00678fa9                             90 90 90 90 90 90 90                                                           .......

00678fb0  class IntrusiveHashIterator<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1> const* this, class IntrusiveHashIterator<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* __return, class CaseInsensitiveStringBase<PStringBase<char> > const* arg3)

00678fb0  {
00678fc5      uint32_t temp1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<char> >::case_insensitive_hash(arg3)) % this->m_numBuckets);
00678fc7      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long>** m_buckets = this->m_buckets;
00678fd6      int32_t* i;
00678fd6      
00678fd6      for (i = m_buckets[temp1]; i != 0; i = i[1])
00678fd6      {
00678fed          if (_stricmp(*(uint32_t*)i, arg3->m_charbuffer) == 0)
00678fed              break;
00678fd6      }
00678fd6      
00678ffb      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>** result = __return;
00679000      result[2] = i;
00679004      *(uint32_t*)result = this;
00679006      result[1] = &m_buckets[temp1];
0067900a      return result;
00678fb0  }

0067900d                                         90 90 90                                                               ...

00679010  uint8_t __stdcall TFile2IDTable::GetFullPathByEntry(class TFile2IDTable* this @ ecx, class TFileEntry* arg2, class PStringBase<char>* arg3)

00679010  {
00679016      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_pPath.m_charbuffer;
0067901e      InterlockedIncrement(&m_charbuffer_1[-1]);
00679024      class PSRefBufferCharData<char>** ebp = arg3;
00679028      class PSRefBufferCharData<char>* eax = *(uint32_t*)ebp;
00679028      
0067902d      if (eax != m_charbuffer_1)
0067902d      {
00679043          if ((InterlockedDecrement(&eax[-1]) == 0 && eax != 0x14))
0067904b              *(uint32_t*)*(int32_t*)((char*)eax + -0x14)(1);
0067904b          
0067904e          *(uint32_t*)ebp = m_charbuffer_1;
00679051          InterlockedIncrement(&m_charbuffer_1[-1]);
0067902d      }
0067902d      
0067906d      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00679075          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00679075      
0067907e      if (*(uint32_t*)ebp->m_data[-4] != 1)
0067907e      {
00679089          PStringBase<char>::PStringBase<char>(&arg3, &data_79450c);
0067908e          class PStringBase<char>* esi_1 = arg3;
00679092          int32_t m_charbuffer = esi_1->m_charbuffer;
00679092          
00679098          if (m_charbuffer != 1)
00679098          {
0067909f              PStringBase<char>::append_n_chars(ebp, esi_1, (m_charbuffer - 1));
006790a4              esi_1 = arg3;
00679098          }
00679098          
006790b7          if ((InterlockedDecrement(&esi_1[-4]) == 0 && esi_1 != 0x14))
006790bf              *(uint32_t*)*(int32_t*)((char*)esi_1 + -0x14)(1);
0067907e      }
0067907e      
006790c5      class PSRefBufferCharData<char>* m_charbuffer_2 = arg2->m_pFileName.m_charbuffer;
006790cc      InterlockedIncrement(&m_charbuffer_2[-1]);
006790d2      int32_t eax_8 = m_charbuffer_2->m_data[-4];
006790d2      
006790d8      if (eax_8 != 1)
006790df          PStringBase<char>::append_n_chars(ebp, m_charbuffer_2, (eax_8 - 1));
006790df      
006790f3      if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
006790fb          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
006790fb      
006790ff      int32_t eax_10;
006790ff      eax_10 = 1;
00679102      return 1;
00679010  }

00679105                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00679110  uint8_t __thiscall TFile2IDTable::IsDBTypeRegistered(class TFile2IDTable* this, uint32_t arg2)

00679110  {
0067912c      int32_t* i;
0067912c      
0067912c      for (i = this->m_CacheByDID.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_CacheByDID.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0067912c      {
00679132          if (*(uint32_t*)i == arg2)
00679132          {
00679143              if (i != 0)
00679143              {
00679145                  i = i[2];
00679145                  
0067914a                  if (i != 0)
0067914a                  {
0067914c                      i = *(uint8_t*)((char*)i + 1);
00679150                      return i;
0067914a                  }
00679143              }
00679143              
00679143              break;
00679132          }
0067912c      }
0067912c      
0067913b      i = 0;
0067913e      return 0;
00679110  }

00679153                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00679160  uint8_t __thiscall TFile2IDTable::IsDBDirSearched(class TFile2IDTable* this, uint32_t arg2)

00679160  {
0067917c      int32_t* i;
0067917c      
0067917c      for (i = this->m_CacheByDID.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_CacheByDID.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0067917c      {
00679182          if (*(uint32_t*)i == arg2)
00679182          {
00679193              if (i != 0)
00679193              {
00679195                  i = i[2];
00679195                  
0067919a                  if (i != 0)
0067919a                  {
0067919c                      i = *(uint8_t*)i;
0067919f                      return i;
0067919a                  }
00679193              }
00679193              
00679193              break;
00679182          }
0067917c      }
0067917c      
0067918b      i = 0;
0067918e      return 0;
00679160  }

006791a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006791b0  uint8_t __fastcall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::grow(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>* this)

006791b0  {
006791b0      class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>* m_numBuckets = this;
006791b2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006791be      m_numBuckets = this->m_numBuckets;
006791d5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
006791d5      
006791df      if (eax_2 != bucketSizesEnd_1)
006791e8          eax_2 = &eax_2[1];
006791df      else
006791df      {
006791e1          eax_2 -= 4;
006791e1          
006791e6          if (eax_2 != bucketSizesEnd_1)
006791e8              eax_2 = &eax_2[1];
006791df      }
006791df      
006791f8      return IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
006791b0  }

006791f9                                                                             90 90 90 90 90 90 90                           .......

00679200  void __fastcall TDBTypeEntry::~TDBTypeEntry(struct TDBTypeEntry* this)

00679200  {
0067920b      this->DIDs.vtable = 0x7fe148;
00679212      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->DIDs.m_intrusiveTable);
00679217      class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** m_buckets = this->DIDs.m_intrusiveTable.m_buckets;
00679206      this->DIDs.m_intrusiveTable.vtable = 0x7fe138;
00679206      
00679225      if (m_buckets != &this->DIDs.m_intrusiveTable.m_aInplaceBuckets)
00679228          operator delete[](m_buckets);
00679228      
00679206      this->DIDs.m_intrusiveTable.m_buckets = nullptr;
00679206      this->DIDs.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00679206      this->DIDs.m_intrusiveTable.m_numBuckets = 0;
00679206      this->DIDs.m_intrusiveTable.m_numElements = 0;
00679247      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = (this->TypeName.m_charbuffer - 0x14);
00679247      
00679256      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0067925e          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0067925e      
00679263      void* __offset(PSRefBufferCharData<char>, -0x14) esi_4 = (this->pRootEngPath.m_charbuffer - 0x14);
00679263      
00679272      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0067927a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0067927a      
0067927f      void* __offset(PSRefBufferCharData<char>, -0x14) esi_6 = (this->pRootGamePath.m_charbuffer - 0x14);
0067927f      
0067928e      if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
00679296          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
00679200  }

0067929d                                                                                         90 90 90                               ...

006792a0  uint8_t __thiscall TFile2IDTable::FindEntryByDID(class TFile2IDTable* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3, class TFileEntry** arg4)

006792a0  {
006792b1      void* ecx_1 = (this->vtable->GetDBTypeEntry(arg3) + 0x18);
006792c5      int32_t* i;
006792c5      
006792c5      for (i = *(uint32_t*)(*(uint32_t*)((char*)ecx_1 + 0x60) + ((COMBINE(0, arg2) % *(uint32_t*)((char*)ecx_1 + 0x68)) << 2)); i != 0; i = i[1])
006792c5      {
006792c9          if (*(uint32_t*)i == arg2)
006792c9          {
006792da              if (i == 0)
006792da                  break;
006792da              
006792e3              *(uint32_t*)arg4 = i[2];
006792e5              i = 1;
006792e8              return 1;
006792c9          }
006792c5      }
006792c5      
006792d2      i = 0;
006792d5      return 0;
006792a0  }

006792eb                                   90 90 90 90 90                                                             .....

006792f0  uint8_t __fastcall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::grow(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>* this)

006792f0  {
006792f0      class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>* m_numBuckets = this;
006792f2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006792fe      m_numBuckets = this->m_numBuckets;
00679315      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00679315      
0067931f      if (eax_2 != bucketSizesEnd_1)
00679328          eax_2 = &eax_2[1];
0067931f      else
0067931f      {
00679321          eax_2 -= 4;
00679321          
00679326          if (eax_2 != bucketSizesEnd_1)
00679328              eax_2 = &eax_2[1];
0067931f      }
0067931f      
00679338      return IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
006792f0  }

00679339                                                                             90 90 90 90 90 90 90                           .......

00679340  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>* this, uint32_t arg2)

00679340  {
0067934b      arg2 = arg2;
0067934f      uint8_t edx = ((int8_t)arg2);
00679353      this->m_buckets = nullptr;
00679356      this->m_firstInterestingBucket = nullptr;
00679359      this->m_numBuckets = 0;
0067935c      this->m_numElements = 0;
00679360      this->vtable = 0x7fe138;
00679366      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00679379      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00679379      
00679383      if (eax == bucketSizesEnd_1)
00679385          eax -= 4;
00679385      
00679388      uint32_t eax_1 = *(uint32_t*)eax;
0067938d      this->m_numBuckets = eax_1;
0067938d      
00679390      if (eax_1 > 0x17)
006793a6          this->m_buckets = operator new[]((eax_1 << 2));
00679390      else
00679395          this->m_buckets = &this->m_aInplaceBuckets;
00679395      
006793ac      class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** m_buckets = this->m_buckets;
006793af      uint32_t ecx_3 = (this->m_numBuckets << 2);
006793b5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
006793c6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00679340  }

006793cf                                               90                                                                 .

006793d0  void __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>* this, uint32_t arg2)

006793d0  {
006793db      arg2 = arg2;
006793df      uint8_t edx = ((int8_t)arg2);
006793e3      this->m_buckets = nullptr;
006793e6      this->m_firstInterestingBucket = nullptr;
006793e9      this->m_numBuckets = 0;
006793ec      this->m_numElements = 0;
006793f0      this->vtable = 0x7fe13c;
006793f6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00679409      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00679409      
00679413      if (eax == bucketSizesEnd_1)
00679415          eax -= 4;
00679415      
00679418      uint32_t eax_1 = *(uint32_t*)eax;
0067941d      this->m_numBuckets = eax_1;
0067941d      
00679420      if (eax_1 > 0x17)
00679436          this->m_buckets = operator new[]((eax_1 << 2));
00679420      else
00679425          this->m_buckets = &this->m_aInplaceBuckets;
00679425      
0067943c      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** m_buckets = this->m_buckets;
0067943f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00679445      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00679456      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
006793d0  }

0067945f                                                                                               90                                 .

00679460  void __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::add_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>* this, class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>* arg2)

00679460  {
0067946e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
00679472          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::grow(this);
00679472      
00679489      uint32_t temp1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<char> >::case_insensitive_hash(arg2)) % this->m_numBuckets);
0067948b      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** m_buckets = this->m_buckets;
00679491      arg2->m_hashNext = m_buckets[temp1];
00679494      m_buckets[temp1] = arg2;
0067949c      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** eax_3 = &m_buckets[temp1];
0067949c      
006794a1      if (eax_3 < this->m_firstInterestingBucket)
006794a3          this->m_firstInterestingBucket = eax_3;
006794a3      
006794a6      this->m_numElements += 1;
00679460  }

006794ad                                         90 90 90                                                               ...

006794b0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>* this, uint32_t arg2)

006794b0  {
006794bb      arg2 = arg2;
006794bf      uint8_t edx = ((int8_t)arg2);
006794c3      this->m_buckets = nullptr;
006794c6      this->m_firstInterestingBucket = nullptr;
006794c9      this->m_numBuckets = 0;
006794cc      this->m_numElements = 0;
006794d0      this->vtable = 0x7fe140;
006794d6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006794e9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
006794e9      
006794f3      if (eax == bucketSizesEnd_1)
006794f5          eax -= 4;
006794f5      
006794f8      uint32_t eax_1 = *(uint32_t*)eax;
006794fd      this->m_numBuckets = eax_1;
006794fd      
00679500      if (eax_1 > 0x17)
00679516          this->m_buckets = operator new[]((eax_1 << 2));
00679500      else
00679505          this->m_buckets = &this->m_aInplaceBuckets;
00679505      
0067951c      class HashTableData<unsigned long,TDBTypeEntry *>** m_buckets = this->m_buckets;
0067951f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00679525      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00679536      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
006794b0  }

0067953f                                                                                               90                                 .

00679540  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::grow(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>* this)

00679540  {
00679540      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>* m_numBuckets = this;
00679542      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0067954e      m_numBuckets = this->m_numBuckets;
00679565      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00679565      
0067956f      if (eax_2 != bucketSizesEnd_1)
00679578          eax_2 = &eax_2[1];
0067956f      else
0067956f      {
00679571          eax_2 -= 4;
00679571          
00679576          if (eax_2 != bucketSizesEnd_1)
00679578              eax_2 = &eax_2[1];
0067956f      }
0067956f      
00679588      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::resize_internal(this, *(uint32_t*)eax_2);
00679540  }

00679589                             90 90 90 90 90 90 90                                                           .......

00679590  uint8_t __thiscall TFile2IDTable::GetDBTypes(class TFile2IDTable const* this, class SmartArray<unsigned long,1>* arg2)

00679590  {
00679593      class SmartArray<unsigned long,1>* eax = arg2;
0067959e      int32_t i = 0;
0067959e      
006795a2      if (eax->m_num > 0)
006795a2      {
006795c3          do
006795c3          {
006795b0              eax->m_data[i] = 0;
006795b9              eax = arg2;
006795c0              i += 1;
006795c3          } while (i < eax->m_num);
006795a2      }
006795a2      
006795ce      eax->m_num = 0;
006795dc      void __return;
006795dc      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_CacheByDID.m_intrusiveTable, &__return);
006795e1      class HashTableData<unsigned long,DBOCache *>* i_2 = eax_2->m_currElement;
006795e6      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
006795e8      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
006795e8      
006795eb      if (i_2 != 0)
006795eb      {
006795f1          while (true)
006795f1          {
006795f1              class SmartArray<unsigned long,1>* ecx_3 = arg2;
006795fb              int32_t eax_4 = (ecx_3->m_sizeAndDeallocate & 0x7fffffff);
006795fb              
00679602              if (ecx_3->m_num < eax_4)
00679602              {
0067965f                  ecx_3->m_data[ecx_3->m_num] = i_2->m_hashKey;
0067966d                  arg2->m_num += 1;
00679602              }
00679602              else
00679602              {
00679604                  uint32_t edx_3 = (eax_4 + 1);
00679604                  
0067960a                  if (edx_3 <= 8)
0067960c                      edx_3 = 8;
0067960a                  else if (edx_3 <= 0x4000)
00679619                  {
00679638                      int32_t eflags_1;
00679638                      char eax_8;
00679638                      eax_8 = __bsr_gprv_memv(edx_3);
00679644                      int32_t esi_2 = (1 << eax_8);
00679646                      ecx_3 = arg2;
00679646                      
0067964c                      if (edx_3 > esi_2)
0067964e                          edx_3 = (esi_2 * 2);
00679619                  }
00679619                  else
00679619                  {
0067961d                      int32_t eax_6 = (edx_3 & 0x3fff);
0067961d                      
00679622                      if (eax_6 != 0)
0067962b                          edx_3 += (0x4000 - eax_6);
00679619                  }
00679619                  
00679659                  if (SmartArray<unsigned long,1>::grow(ecx_3, edx_3) != 0)
00679659                  {
0067965f                      arg2->m_data[arg2->m_num] = i_2->m_hashKey;
0067966d                      arg2->m_num += 1;
00679659                  }
00679602              }
00679602              
00679670              i_2 = i_2->m_hashNext;
00679670              
00679675              if (i_2 == 0)
00679675              {
0067968f                  class HashTableData<unsigned long,DBOCache *>* i_1;
0067968f                  
0067968f                  do
0067968f                  {
00679684                      m_currBucket = &m_currBucket[1];
00679684                      
00679689                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00679689                          goto label_67969e;
00679689                      
0067968b                      i_1 = *(uint32_t*)m_currBucket;
0067968f                  } while (i_1 == 0);
0067968f                  
00679691                  i_2 = i_1;
00679691                  
00679695                  if (i_2 == 0)
00679695                      break;
00679675              }
006795f1          }
006795eb      }
006795eb      
0067969e  label_67969e:
0067969e      eax_2 = 1;
006796a4      return 1;
00679590  }

006795a6                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.
006796a7                       90 90 90 90 90 90 90 90 90                                                         .........

006796b0  uint8_t __thiscall TFile2IDTable::GetDIDs(class TFile2IDTable const* this, class SmartArray<IDClass<_tagDataID,32,0>,1>* arg2, uint32_t arg3)

006796b0  {
006796b7      class SmartArray<IDClass<_tagDataID,32,0>,1>* ecx = arg2;
006796be      int32_t i = 0;
006796be      
006796c3      if (ecx->m_num > 0)
006796c3      {
006796df          do
006796df          {
006796d0              ecx->m_data[i].id = arg2;
006796d5              ecx = arg2;
006796dc              i += 1;
006796df          } while (i < ecx->m_num);
006796c3      }
006796c3      
006796e1      ecx->m_num = 0;
006796e1      
00679705      for (int32_t* i_1 = this->m_CacheByDID.m_intrusiveTable.m_buckets[(COMBINE(0, arg3) % this->m_CacheByDID.m_intrusiveTable.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
00679705      {
00679709          if (*(uint32_t*)i_1 == arg3)
00679709          {
0067971d              if (i_1 == 0)
0067971d                  break;
0067971d              
0067972d              void __return;
0067972d              class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin((i_1[2] + 0x18), &__return);
00679732              class HashTableData<unsigned long,DBOCache *>* j_1 = eax_2->m_currElement;
00679737              class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
00679739              class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
00679739              
0067973c              if (j_1 != 0)
0067973c              {
00679742                  while (true)
00679742                  {
00679742                      class SmartArray<IDClass<_tagDataID,32,0>,1>* ecx_5 = arg2;
0067974c                      int32_t eax_4 = (ecx_5->m_sizeAndDeallocate & 0x7fffffff);
0067974c                      
00679753                      if (ecx_5->m_num < eax_4)
00679753                      {
006797b0                          ecx_5->m_data[ecx_5->m_num].id = j_1->m_hashKey;
006797be                          arg2->m_num += 1;
00679753                      }
00679753                      else
00679753                      {
00679755                          uint32_t edx_6 = (eax_4 + 1);
00679755                          
0067975b                          if (edx_6 <= 8)
0067975d                              edx_6 = 8;
0067975b                          else if (edx_6 <= 0x4000)
0067976a                          {
00679789                              int32_t eflags_1;
00679789                              char eax_8;
00679789                              eax_8 = __bsr_gprv_memv(edx_6);
00679795                              int32_t esi_4 = (1 << eax_8);
00679797                              ecx_5 = arg2;
00679797                              
0067979d                              if (edx_6 > esi_4)
0067979f                                  edx_6 = (esi_4 * 2);
0067976a                          }
0067976a                          else
0067976a                          {
0067976e                              int32_t eax_6 = (edx_6 & 0x3fff);
0067976e                              
00679773                              if (eax_6 != 0)
0067977c                                  edx_6 += (0x4000 - eax_6);
0067976a                          }
0067976a                          
006797aa                          if (SmartArray<IDClass<_tagDataID,32,0>,1>::grow(ecx_5, edx_6) != 0)
006797aa                          {
006797b0                              arg2->m_data[arg2->m_num].id = j_1->m_hashKey;
006797be                              arg2->m_num += 1;
006797aa                          }
00679753                      }
00679753                      
006797c1                      j_1 = j_1->m_hashNext;
006797c1                      
006797c6                      if (j_1 == 0)
006797c6                      {
006797e0                          class HashTableData<unsigned long,DBOCache *>* j;
006797e0                          
006797e0                          do
006797e0                          {
006797d5                              m_currBucket = &m_currBucket[1];
006797d5                              
006797da                              if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
006797da                                  goto label_6797ef;
006797da                              
006797dc                              j = *(uint32_t*)m_currBucket;
006797e0                          } while (j == 0);
006797e0                          
006797e2                          j_1 = j;
006797e2                          
006797e6                          if (j_1 == 0)
006797e6                              break;
006797c6                      }
00679742                  }
0067973c              }
0067973c              
006797ef          label_6797ef:
006797ef              eax_2 = 1;
006797f5              return 1;
00679709          }
00679705      }
00679705      
00679712      class HashTableData<unsigned long,TDBTypeEntry *>** eax_1;
00679712      eax_1 = 0;
00679718      return 0;
006796b0  }

006797f8                                                                          90 90 90 90 90 90 90 90                          ........

00679800  uint8_t __thiscall TFile2IDTable::GetFilePaths(class TFile2IDTable const* this, class SmartArray<PStringBase<char>,1>* arg2)

00679800  {
00679811      SmartArray<PStringBase<char>,1>::SetNElements(arg2, 0, 1);
0067981e      void __return_2;
0067981e      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_CacheByFileName.m_intrusiveTable, &__return_2);
00679823      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00679829      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0067982c      class HashTableData<unsigned long,DBOCache *>* m_currElement = eax->m_currElement;
00679831      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
00679835      class HashTableData<unsigned long,DBOCache *>* var_10 = m_currElement;
00679835      
00679839      if (m_currElement != 0)
00679839      {
00679849          while (true)
00679849          {
00679849              class DBOCache* m_data = var_10->m_data;
00679849              
0067984e              if (m_data != 0)
0067984e              {
0067985d                  class PStringBase<char> var_2c;
0067985d                  PStringBase<char>::PStringBase<char>(&var_2c, &data_79450c);
00679862                  class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>* ebx_1 = m_data->m_ObjTable.m_intrusiveTable.m_aInplaceBuckets[0];
00679869                  class HashTableData<IDClass<_tagDataID,32,0>,DBObj *>* var_28 = ebx_1;
0067986d                  InterlockedIncrement(&ebx_1[-1]);
00679873                  struct IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::VTable* vtable = m_data->m_ObjTable.m_intrusiveTable.vtable;
0067987a                  struct IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,DBObj *> *,1>::VTable* vtable_1 = vtable;
0067987e                  InterlockedIncrement(&vtable[-4]);
006798ad                  class PStringBase<char> __return;
006798ad                  class PStringBase<char> __return_1;
006798ad                  SmartArray<PStringBase<char>,1>::AddToEnd(arg2, PStringBase<char>::operator+(PStringBase<char>::operator+(&vtable_1, &__return_1, &var_2c), &__return, &var_28));
006798b6                  int32_t* esi_2 = (__return - 0x14);
006798b6                  
006798c5                  if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
006798cd                      **(uint32_t**)esi_2(1);
006798cd                  
006798d3                  int32_t* esi_4 = (__return_1 - 0x14);
006798d3                  
006798e2                  if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
006798ea                      **(uint32_t**)esi_4(1);
006798ea                  
006798fb                  if ((InterlockedDecrement(&vtable[-4]) == 0 && vtable != 0x14))
00679903                      *(uint32_t*)*(int32_t*)((char*)vtable + -0x14)(1);
00679903                  
00679914                  if ((InterlockedDecrement(&ebx_1[-1]) == 0 && ebx_1 != 0x14))
0067991c                      *(uint32_t*)*(int32_t*)((char*)ebx_1 + -0x14)(1);
0067991c                  
00679922                  int32_t* esi_6 = (var_2c - 0x14);
00679922                  
00679931                  if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00679939                      **(uint32_t**)esi_6(1);
00679939                  
0067993b                  m_currBucket = m_currBucket_1;
0067984e              }
0067984e              
00679943              class HashTableData<unsigned long,DBOCache *>* m_hashNext = var_10->m_hashNext;
00679948              var_10 = m_hashNext;
00679948              
0067994c              if (m_hashNext == 0)
0067994c              {
0067996f                  class HashTableData<unsigned long,DBOCache *>* i;
0067996f                  
0067996f                  do
0067996f                  {
00679960                      m_currBucket = &m_currBucket[1];
00679965                      m_currBucket_1 = m_currBucket;
00679965                      
00679969                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00679969                          goto label_679982;
00679969                      
0067996b                      i = *(uint32_t*)m_currBucket;
0067996f                  } while (i == 0);
0067996f                  
00679975                  var_10 = i;
00679975                  
00679979                  if (i == 0)
00679979                      break;
0067994c              }
00679849          }
00679839      }
00679839      
00679982  label_679982:
00679982      m_currElement = 1;
00679988      return 1;
00679800  }

0067998b                                   90 90 90 90 90                                                             .....

00679990  uint8_t __thiscall TFile2IDTable::RemoveFilenameFromCache(class TFile2IDTable* this, class PStringBase<char> const* arg2)

00679990  {
00679997      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
006799a3      class PSRefBufferCharData<char>* m_charbuffer_1 = m_charbuffer;
006799b2      InterlockedIncrement(&m_charbuffer[-1]);
006799b9      PSUtils::strip_directory(&m_charbuffer_1);
006799be      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
006799cb      class TFileEntry* ebp = nullptr;
006799cd      arg2 = m_charbuffer_2;
006799d1      InterlockedIncrement(&m_charbuffer_2[-1]);
006799e0      void __return;
006799e0      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_CacheByFileName.m_intrusiveTable, &__return, &arg2);
006799eb      void* var_4;
006799eb      
006799eb      if (var_4 == 0)
006799f7          arg2 = 0;
006799eb      else
006799eb      {
006799ed          ebp = *(uint32_t*)((char*)var_4 + 8);
006799f0          arg2 = 1;
006799eb      }
006799eb      
00679a11      if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
00679a19          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00679a19      
00679a1b      int32_t eax_4;
00679a1b      eax_4 = arg2;
00679a21      class PSRefBufferCharData<char>* ebx;
00679a21      
00679a21      if (eax_4 == 0)
00679a37          ebx = 1;
00679a21      else if (ebp == 0)
00679a64          ebx = 0;
00679a25      else
00679a25      {
00679a2e          TFileEntry::SetPath(ebp, &PStringBase<char>::null_string);
00679a33          ebp->m_bAuthoritative = 0;
00679a37          ebx = 1;
00679a25      }
00679a25      
00679a3f      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &m_charbuffer_1->m_data[0xffffffec];
00679a3f      
00679a4e      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00679a56          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00679a56      
00679a5b      int32_t eax_6;
00679a5b      eax_6 = ebx;
00679a61      return eax_6;
00679990  }

00679a68                          90 90 90 90 90 90 90 90                                                          ........

00679a70  uint8_t __thiscall TFile2IDTable::RemoveDirectoryFromCache(class TFile2IDTable* this, class PStringBase<char> const* arg2)

00679a70  {
00679a7b      class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_charbuffer;
00679a82      void* ebp = nullptr;
00679a85      void* var_20 = nullptr;
00679a89      class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer_1;
00679a8d      InterlockedIncrement(&m_charbuffer_1[-1]);
00679aa2      void* __return;
00679aa2      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_CacheByFileName.m_intrusiveTable.vtable, &__return, &m_charbuffer_2);
00679aad      void* var_10;
00679aad      int32_t ebx;
00679aad      
00679aad      if (var_10 == 0)
00679abc          ebx = 0;
00679aad      else
00679aad      {
00679aaf          void* ecx_2 = *(uint32_t*)((char*)var_10 + 8);
00679ab2          var_20 = ecx_2;
00679ab6          ebx = 1;
00679ab8          ebp = ecx_2;
00679aad      }
00679aad      
00679ad1      if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00679ad9          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00679ad9      
00679ae5      int32_t eax_2;
00679ae5      
00679ae5      if ((ebx != 0 && ebp != 0))
00679ae5      {
00679aeb          int32_t eax_4 = *(uint32_t*)((char*)ebp + 0x18);
00679aeb          
00679af6          if ((eax_4 == 3 || eax_4 == 2))
00679af8              *(uint32_t*)((char*)ebp + 0x18) = 2;
00679af8          
00679b06          void __return_1;
00679b06          eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_CacheByFileName.m_intrusiveTable.vtable, &__return_1);
00679b0b          void* i_1 = *(uint32_t*)(eax_2 + 8);
00679b12          int32_t* ecx_5 = *(uint32_t*)(eax_2 + 4);
00679b15          __return = *(uint32_t*)eax_2;
00679b19          int32_t* var_14_1 = ecx_5;
00679b19          
00679b1d          if (i_1 != 0)
00679b1d          {
00679b23              while (true)
00679b23              {
00679b23                  class TFileEntry* edi_1 = *(uint32_t*)((char*)i_1 + 8);
00679b23                  
00679b2e                  if ((edi_1 != 0 && edi_1 != var_20))
00679b2e                  {
00679b30                      class PSRefBufferCharData<char>* m_charbuffer = edi_1->m_pPath.m_charbuffer;
00679b37                      InterlockedIncrement(&m_charbuffer[-1]);
00679b45                      int32_t eax_7 = strstr(m_charbuffer, arg2->m_charbuffer);
00679b50                      void* eax_8;
00679b50                      
00679b50                      if (eax_7 != 0)
00679b57                          eax_8 = (eax_7 - m_charbuffer);
00679b50                      else
00679b52                          eax_8 = 0xffffffff;
00679b52                      
00679b5b                      ebx = eax_8 == 0;
00679b5b                      
00679b71                      if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00679b79                          **(uint32_t**)((char*)m_charbuffer - 0x14)(1);
00679b79                      
00679b7d                      if (ebx != 0)
00679b7d                      {
00679b86                          TFileEntry::SetPath(edi_1, &PStringBase<char>::null_string);
00679b8b                          edi_1->m_bAuthoritative = 0;
00679b7d                      }
00679b7d                      
00679b8f                      ecx_5 = var_14_1;
00679b2e                  }
00679b2e                  
00679b93                  i_1 = *(uint32_t*)((char*)i_1 + 4);
00679b93                  
00679b98                  if (i_1 == 0)
00679b98                  {
00679b9a                      void* __return_2 = __return;
00679bb6                      void* i;
00679bb6                      
00679bb6                      do
00679bb6                      {
00679ba7                          ecx_5 = &ecx_5[1];
00679bac                          var_14_1 = ecx_5;
00679bac                          
00679bb0                          if (ecx_5 == (*(uint32_t*)((char*)__return_2 + 0x60) + (*(uint32_t*)((char*)__return_2 + 0x68) << 2)))
00679bb0                              goto label_679bc5;
00679bb0                          
00679bb2                          i = *(uint32_t*)ecx_5;
00679bb6                      } while (i == 0);
00679bb6                      
00679bb8                      i_1 = i;
00679bb8                      
00679bbc                      if (i_1 == 0)
00679bbc                          break;
00679b98                  }
00679b23              }
00679b1d          }
00679ae5      }
00679ae5      
00679bc5  label_679bc5:
00679bc5      eax_2 = 1;
00679bcb      return 1;
00679a70  }

00679bce                                            90 90                                                                ..

00679bd0  uint8_t __fastcall HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>::grow(class HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>* this)

00679bd0  {
00679bd0      class HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>* m_numBuckets = this;
00679bd5      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00679bdf      m_numBuckets = this->m_intrusiveTable.m_numBuckets;
00679bf6      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00679bf6      
00679c00      if (eax_2 != bucketSizesEnd_1)
00679c09          eax_2 = &eax_2[1];
00679c00      else
00679c00      {
00679c02          eax_2 -= 4;
00679c02          
00679c07          if (eax_2 != bucketSizesEnd_1)
00679c09              eax_2 = &eax_2[1];
00679c00      }
00679c00      
00679c19      return IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::resize_internal(&this->m_intrusiveTable, *(uint32_t*)eax_2);
00679bd0  }

00679c1a                                                                                90 90 90 90 90 90                            ......

00679c20  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::add(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>* this, class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>* arg2)

00679c20  {
00679c28      uint32_t id = arg2->m_hashKey.id;
00679c2b      uint32_t m_numBuckets = this->m_numBuckets;
00679c2b      
00679c3e      for (int32_t* i = this->m_buckets[(COMBINE(0, id) % m_numBuckets)]; i != 0; i = i[1])
00679c3e      {
00679c42          if (*(uint32_t*)i == id)
00679c42          {
00679c8e              if (i == 0)
00679c8e                  break;
00679c8e              
00679c92              i = 0;
00679c95              return 0;
00679c42          }
00679c3e      }
00679c3e      
00679c54      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00679c58          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::grow(this);
00679c58      
00679c61      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.id) % this->m_numBuckets);
00679c64      class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** m_buckets = this->m_buckets;
00679c6a      arg2->m_hashNext = m_buckets[temp1_1];
00679c6d      m_buckets[temp1_1] = arg2;
00679c73      class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** eax_4 = &m_buckets[temp1_1];
00679c73      
00679c78      if (eax_4 < this->m_firstInterestingBucket)
00679c7a          this->m_firstInterestingBucket = eax_4;
00679c7a      
00679c82      this->m_numElements += 1;
00679c86      uint32_t eax_6;
00679c86      eax_6 = 1;
00679c89      return 1;
00679c20  }

00679c98                                                                          90 90 90 90 90 90 90 90                          ........

00679ca0  uint8_t __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::resize_internal(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>* this, uint32_t arg2)

00679ca0  {
00679ca1      uint32_t ebp = arg2;
00679ca1      
00679cab      if (ebp == this->m_numBuckets)
00679cab      {
00679cae          int32_t eax;
00679cae          eax = 0;
00679cb1          return 0;
00679cab      }
00679cab      
00679cb9      int32_t* i_1 = nullptr;
00679cb9      
00679cbd      while (this->m_numElements != 0)
00679cbd      {
00679cc6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00679ccc          int32_t* i_2;
00679ccc          int32_t* m_firstInterestingBucket_2;
00679ccc          
00679ccc          if (this->m_firstInterestingBucket == ecx_1)
00679ccc          {
00679ce2          label_679ce2:
00679ce2              m_firstInterestingBucket_2 = nullptr;
00679ce4              i_2 = nullptr;
00679ccc          }
00679ccc          else
00679ccc          {
00679cd0              while (true)
00679cd0              {
00679cd0                  class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00679cd0                  
00679cd6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00679cd6                  {
00679ce8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00679ceb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
00679ced                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00679ced                      break;
00679cd6                  }
00679cd6                  
00679cdd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00679cdd                  
00679ce0                  if (&m_firstInterestingBucket[1] == ecx_1)
00679ce0                      goto label_679ce2;
00679cd0              }
00679ccc          }
00679ccc          
00679cef          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
00679cef          
00679cf3          if (eax_4 == i_2)
00679d05              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00679cf3          else
00679cf3          {
00679cfc              void* edx_1;
00679cfc              
00679cfc              do
00679cfc              {
00679cf5                  edx_1 = eax_4;
00679cf7                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
00679cfc              } while (eax_4 != i_2);
00679cfc              
00679d00              if (edx_1 != 0)
00679d0c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
00679d00              else
00679d05                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00679cf3          }
00679cf3          
00679d0f          this->m_numElements -= 1;
00679d12          i_2[1] = i_1;
00679d1a          i_1 = i_2;
00679cbd      }
00679cbd      
00679d1e      class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** m_buckets = this->m_buckets;
00679d1e      
00679d26      if (m_buckets != &this->m_aInplaceBuckets)
00679d29          operator delete[](m_buckets);
00679d29      
00679d36      this->m_buckets = nullptr;
00679d39      this->m_firstInterestingBucket = nullptr;
00679d3c      this->m_numBuckets = 0;
00679d3f      this->m_numElements = 0;
00679d42      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00679d49      void* eax_7;
00679d49      
00679d49      if (i_1 != 0)
00679d49      {
00679dcb          int32_t* i;
00679dcb          
00679dcb          do
00679dcb          {
00679d50              uint32_t m_numBuckets = this->m_numBuckets;
00679d56              i = i_1[1];
00679d56              
00679d5f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
00679d5f              {
00679d61                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00679d68                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00679d6e                  arg2 = m_numBuckets;
00679d7e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
00679d7e                  
00679d88                  if (eax_8 != bucketSizesEnd_1)
00679d91                      eax_8 = &eax_8[1];
00679d88                  else
00679d88                  {
00679d8a                      eax_8 -= 4;
00679d8a                      
00679d8f                      if (eax_8 != bucketSizesEnd_1)
00679d91                          eax_8 = &eax_8[1];
00679d88                  }
00679d88                  
00679d99                  IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
00679d5f              }
00679d5f              
00679da2              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
00679da5              class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** m_buckets_1 = this->m_buckets;
00679dab              i_1[1] = m_buckets_1[temp1_1];
00679dae              m_buckets_1[temp1_1] = i_1;
00679db4              eax_7 = &m_buckets_1[temp1_1];
00679db4              
00679db9              if (eax_7 < this->m_firstInterestingBucket)
00679dbb                  this->m_firstInterestingBucket = eax_7;
00679dbb              
00679dc6              this->m_numElements += 1;
00679dc9              i_1 = i;
00679dcb          } while (i != 0);
00679d49      }
00679d49      
00679dd0      eax_7 = 1;
00679dd3      return 1;
00679ca0  }

00679dd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00679de0  uint8_t __thiscall IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::resize_internal(class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>* this, uint32_t arg2)

00679de0  {
00679de1      uint32_t ebp = arg2;
00679de1      
00679deb      if (ebp == this->m_numBuckets)
00679deb      {
00679dee          int32_t eax;
00679dee          eax = 0;
00679df1          return 0;
00679deb      }
00679deb      
00679df9      class CaseInsensitiveStringBase<PStringBase<char> >* i_1 = nullptr;
00679df9      
00679dfd      while (this->m_numElements != 0)
00679dfd      {
00679e06          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00679e0c          class CaseInsensitiveStringBase<PStringBase<char> >* i_2;
00679e0c          int32_t* m_firstInterestingBucket_2;
00679e0c          
00679e0c          if (this->m_firstInterestingBucket == ecx_1)
00679e0c          {
00679e22          label_679e22:
00679e22              m_firstInterestingBucket_2 = nullptr;
00679e24              i_2 = nullptr;
00679e0c          }
00679e0c          else
00679e0c          {
00679e10              while (true)
00679e10              {
00679e10                  class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00679e10                  
00679e16                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00679e16                  {
00679e28                      class CaseInsensitiveStringBase<PStringBase<char> >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00679e2b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
00679e2d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00679e2d                      break;
00679e16                  }
00679e16                  
00679e1d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00679e1d                  
00679e20                  if (&m_firstInterestingBucket[1] == ecx_1)
00679e20                      goto label_679e22;
00679e10              }
00679e0c          }
00679e0c          
00679e2f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
00679e2f          
00679e33          if (eax_4 == i_2)
00679e45              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00679e33          else
00679e33          {
00679e3c              void* edx_1;
00679e3c              
00679e3c              do
00679e3c              {
00679e35                  edx_1 = eax_4;
00679e37                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
00679e3c              } while (eax_4 != i_2);
00679e3c              
00679e40              if (edx_1 != 0)
00679e4c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
00679e40              else
00679e45                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00679e33          }
00679e33          
00679e4f          this->m_numElements -= 1;
00679e52          *(int32_t*)((char*)i_2 + 4) = i_1;
00679e5a          i_1 = i_2;
00679dfd      }
00679dfd      
00679e5e      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** m_buckets = this->m_buckets;
00679e5e      
00679e66      if (m_buckets != &this->m_aInplaceBuckets)
00679e69          operator delete[](m_buckets);
00679e69      
00679e76      this->m_buckets = nullptr;
00679e79      this->m_firstInterestingBucket = nullptr;
00679e7c      this->m_numBuckets = 0;
00679e7f      this->m_numElements = 0;
00679e82      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00679e89      void* eax_7;
00679e89      
00679e89      if (i_1 != 0)
00679e89      {
00679f11          class CaseInsensitiveStringBase<PStringBase<char> >* i;
00679f11          
00679f11          do
00679f11          {
00679e90              uint32_t m_numBuckets = this->m_numBuckets;
00679e96              i = *(int32_t*)((char*)i_1 + 4);
00679e96              
00679e9f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
00679e9f              {
00679ea1                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00679ea7                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00679ead                  arg2 = m_numBuckets;
00679ebf                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
00679ebf                  
00679ec9                  if (eax_8 != bucketSizesEnd_1)
00679ed2                      eax_8 = &eax_8[1];
00679ec9                  else
00679ec9                  {
00679ecb                      eax_8 -= 4;
00679ecb                      
00679ed0                      if (eax_8 != bucketSizesEnd_1)
00679ed2                          eax_8 = &eax_8[1];
00679ec9                  }
00679ec9                  
00679eda                  IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
00679e9f              }
00679e9f              
00679eeb              uint32_t temp1_1 = (COMBINE(0, CaseInsensitiveStringBase<PStringBase<char> >::case_insensitive_hash(i_1)) % this->m_numBuckets);
00679eed              class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** m_buckets_1 = this->m_buckets;
00679ef3              *(int32_t*)((char*)i_1 + 4) = m_buckets_1[temp1_1];
00679ef6              m_buckets_1[temp1_1] = i_1;
00679efc              eax_7 = &m_buckets_1[temp1_1];
00679efc              
00679f01              if (eax_7 < this->m_firstInterestingBucket)
00679f03                  this->m_firstInterestingBucket = eax_7;
00679f03              
00679f0c              this->m_numElements += 1;
00679f0f              i_1 = i;
00679f11          } while (i != 0);
00679e89      }
00679e89      
00679f1a      eax_7 = 1;
00679f1d      return 1;
00679de0  }


00679f20  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>* this, uint32_t arg2)

00679f20  {
00679f21      uint32_t ebp = arg2;
00679f21      
00679f2b      if (ebp == this->m_numBuckets)
00679f2b      {
00679f2e          int32_t eax;
00679f2e          eax = 0;
00679f31          return 0;
00679f2b      }
00679f2b      
00679f39      int32_t* i_1 = nullptr;
00679f39      
00679f3d      while (this->m_numElements != 0)
00679f3d      {
00679f46          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00679f4c          int32_t* i_2;
00679f4c          int32_t* m_firstInterestingBucket_2;
00679f4c          
00679f4c          if (this->m_firstInterestingBucket == ecx_1)
00679f4c          {
00679f62          label_679f62:
00679f62              m_firstInterestingBucket_2 = nullptr;
00679f64              i_2 = nullptr;
00679f4c          }
00679f4c          else
00679f4c          {
00679f50              while (true)
00679f50              {
00679f50                  class HashTableData<unsigned long,TDBTypeEntry *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00679f50                  
00679f56                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00679f56                  {
00679f68                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00679f6b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
00679f6d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00679f6d                      break;
00679f56                  }
00679f56                  
00679f5d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00679f5d                  
00679f60                  if (&m_firstInterestingBucket[1] == ecx_1)
00679f60                      goto label_679f62;
00679f50              }
00679f4c          }
00679f4c          
00679f6f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
00679f6f          
00679f73          if (eax_4 == i_2)
00679f85              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00679f73          else
00679f73          {
00679f7c              void* edx_1;
00679f7c              
00679f7c              do
00679f7c              {
00679f75                  edx_1 = eax_4;
00679f77                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
00679f7c              } while (eax_4 != i_2);
00679f7c              
00679f80              if (edx_1 != 0)
00679f8c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
00679f80              else
00679f85                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00679f73          }
00679f73          
00679f8f          this->m_numElements -= 1;
00679f92          i_2[1] = i_1;
00679f9a          i_1 = i_2;
00679f3d      }
00679f3d      
00679f9e      class HashTableData<unsigned long,TDBTypeEntry *>** m_buckets = this->m_buckets;
00679f9e      
00679fa6      if (m_buckets != &this->m_aInplaceBuckets)
00679fa9          operator delete[](m_buckets);
00679fa9      
00679fb6      this->m_buckets = nullptr;
00679fb9      this->m_firstInterestingBucket = nullptr;
00679fbc      this->m_numBuckets = 0;
00679fbf      this->m_numElements = 0;
00679fc2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00679fc9      void* eax_7;
00679fc9      
00679fc9      if (i_1 != 0)
00679fc9      {
0067a04b          int32_t* i;
0067a04b          
0067a04b          do
0067a04b          {
00679fd0              uint32_t m_numBuckets = this->m_numBuckets;
00679fd6              i = i_1[1];
00679fd6              
00679fdf              if ((m_numBuckets * 2) < (this->m_numElements + 1))
00679fdf              {
00679fe1                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00679fe8                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00679fee                  arg2 = m_numBuckets;
00679ffe                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
00679ffe                  
0067a008                  if (eax_8 != bucketSizesEnd_1)
0067a011                      eax_8 = &eax_8[1];
0067a008                  else
0067a008                  {
0067a00a                      eax_8 -= 4;
0067a00a                      
0067a00f                      if (eax_8 != bucketSizesEnd_1)
0067a011                          eax_8 = &eax_8[1];
0067a008                  }
0067a008                  
0067a019                  IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::resize_internal(this, *(uint32_t*)eax_8);
00679fdf              }
00679fdf              
0067a022              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
0067a025              class HashTableData<unsigned long,TDBTypeEntry *>** m_buckets_1 = this->m_buckets;
0067a02b              i_1[1] = m_buckets_1[temp1_1];
0067a02e              m_buckets_1[temp1_1] = i_1;
0067a034              eax_7 = &m_buckets_1[temp1_1];
0067a034              
0067a039              if (eax_7 < this->m_firstInterestingBucket)
0067a03b                  this->m_firstInterestingBucket = eax_7;
0067a03b              
0067a046              this->m_numElements += 1;
0067a049              i_1 = i;
0067a04b          } while (i != 0);
00679fc9      }
00679fc9      
0067a050      eax_7 = 1;
0067a053      return 1;
00679f20  }

0067a056                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0067a060  void* __thiscall HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>::`scalar deleting destructor'(class HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>* this, uint32_t arg2)

0067a060  {
0067a069      this->vtable = 0x7fe148;
0067a06f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0067a074      class HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *>** m_buckets = this->m_intrusiveTable.m_buckets;
0067a064      this->m_intrusiveTable.vtable = 0x7fe138;
0067a064      
0067a082      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0067a085          operator delete[](m_buckets);
0067a085      
0067a064      this->m_intrusiveTable.m_buckets = nullptr;
0067a064      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0067a064      this->m_intrusiveTable.m_numBuckets = 0;
0067a064      this->m_intrusiveTable.m_numElements = 0;
0067a064      
0067a0a0      if ((arg2 & 1) != 0)
0067a0a3          operator delete(this);
0067a0a3      
0067a0af      return this;
0067a060  }

0067a0b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067a0c0  uint8_t __thiscall HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>::add(class HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>* this, class IDClass<_tagDataID,32,0>* arg2, class TFileEntry** arg3)

0067a0c0  {
0067a0c6      void* eax = operator new(0xc);
0067a0d0      void* esi;
0067a0d0      
0067a0d0      if (eax == 0)
0067a0ee          esi = nullptr;
0067a0d0      else
0067a0d0      {
0067a0dc          *(uint32_t*)eax = arg2->id;
0067a0de          *(uint32_t*)((char*)eax + 4) = 0;
0067a0e7          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
0067a0ea          esi = eax;
0067a0d0      }
0067a0d0      
0067a0fb      if (IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::add(&this->m_intrusiveTable, esi) != 0)
0067a115          return 1;
0067a115      
0067a0ff      if (esi != 0)
0067a102          operator delete(esi);
0067a102      
0067a10e      return 0;
0067a0c0  }

0067a118                                                                          90 90 90 90 90 90 90 90                          ........

0067a120  void* __thiscall HashTable<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *,1>::`scalar deleting destructor'(class HashTable<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *,1>* this, uint32_t arg2)

0067a120  {
0067a129      this->vtable = 0x7fe14c;
0067a12f      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_intrusiveTable);
0067a134      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** m_buckets = this->m_intrusiveTable.m_buckets;
0067a124      this->m_intrusiveTable.vtable = 0x7fe13c;
0067a124      
0067a142      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0067a145          operator delete[](m_buckets);
0067a145      
0067a124      this->m_intrusiveTable.m_buckets = nullptr;
0067a124      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0067a124      this->m_intrusiveTable.m_numBuckets = 0;
0067a124      this->m_intrusiveTable.m_numElements = 0;
0067a124      
0067a160      if ((arg2 & 1) != 0)
0067a163          operator delete(this);
0067a163      
0067a16f      return this;
0067a120  }

0067a172                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067a180  uint8_t __thiscall HashTable<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *,1>::add(class HashTable<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *,1>* this, class CaseInsensitiveStringBase<PStringBase<char> > const* arg2, class TFileEntry** arg3)

0067a180  {
0067a18e      void* esi = operator new(0xc);
0067a18e      
0067a195      if (esi == 0)
0067a1bb          esi = nullptr;
0067a195      else
0067a195      {
0067a19b          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0067a19d          *(uint32_t*)esi = m_charbuffer;
0067a1a3          InterlockedIncrement(&m_charbuffer[-1]);
0067a1ad          *(uint32_t*)((char*)esi + 4) = 0;
0067a1b6          *(uint32_t*)((char*)esi + 8) = *(uint32_t*)arg3;
0067a195      }
0067a195      
0067a1c8      void __return;
0067a1c8      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_intrusiveTable.vtable, &__return, esi);
0067a1d3      int32_t var_4;
0067a1d3      
0067a1d3      if (var_4 == 0)
0067a1d3      {
0067a1d8          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::add_internal(&this->m_intrusiveTable, esi);
0067a1de          int32_t eax_4;
0067a1de          eax_4 = 1;
0067a1e4          return 1;
0067a1d3      }
0067a1d3      
0067a1e9      if (esi != 0)
0067a1e9      {
0067a1ed          int32_t* edi_3 = (*(uint32_t*)esi - 0x14);
0067a1ed          
0067a200          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
0067a208              **(uint32_t**)edi_3(1);
0067a208          
0067a20b          operator delete(esi);
0067a1e9      }
0067a1e9      
0067a214      int32_t eax_3;
0067a214      eax_3 = 0;
0067a21a      return 0;
0067a180  }

0067a21d                                                                                         90 90 90                               ...

0067a220  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::add(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>* this, class HashTableData<unsigned long,TDBTypeEntry *>* arg2)

0067a220  {
0067a228      uint32_t m_hashKey = arg2->m_hashKey;
0067a22b      uint32_t m_numBuckets = this->m_numBuckets;
0067a22b      
0067a23e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0067a23e      {
0067a242          if (*(uint32_t*)i == m_hashKey)
0067a242          {
0067a28e              if (i == 0)
0067a28e                  break;
0067a28e              
0067a292              i = 0;
0067a295              return 0;
0067a242          }
0067a23e      }
0067a23e      
0067a254      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0067a258          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::grow(this);
0067a258      
0067a261      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0067a264      class HashTableData<unsigned long,TDBTypeEntry *>** m_buckets = this->m_buckets;
0067a26a      arg2->m_hashNext = m_buckets[temp1_1];
0067a26d      m_buckets[temp1_1] = arg2;
0067a273      class HashTableData<unsigned long,TDBTypeEntry *>** eax_4 = &m_buckets[temp1_1];
0067a273      
0067a278      if (eax_4 < this->m_firstInterestingBucket)
0067a27a          this->m_firstInterestingBucket = eax_4;
0067a27a      
0067a282      this->m_numElements += 1;
0067a286      uint32_t eax_6;
0067a286      eax_6 = 1;
0067a289      return 1;
0067a220  }

0067a298                                                                          90 90 90 90 90 90 90 90                          ........

0067a2a0  void __fastcall TDBTypeEntry::TDBTypeEntry(struct TDBTypeEntry* this)

0067a2a0  {
0067a2a0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0067a2b5      this->pRootGamePath.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0067a2b8      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0067a2ba      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0067a2c6      this->pRootEngPath.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0067a2c9      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
0067a2cb      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0067a2d7      this->TypeName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0067a2da      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0067a2e4      this->DIDs.vtable = 0x7fe148;
0067a2eb      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,TFileEntry *> *,1>(&this->DIDs.m_intrusiveTable, 0x800);
0067a2f1      this->DIDs.vtable = 0x7fe148;
0067a2a0  }

0067a2fc                                                                                      90 90 90 90                              ....

0067a300  uint8_t __thiscall TFile2IDTable::AssignDIDToFileName(class TFile2IDTable* this, class PStringBase<char> arg2, class IDClass<_tagDataID,32,0> arg3, uint32_t arg4)

0067a300  {
0067a300      class TFile2IDTable* this_1 = this;
0067a301      int32_t ebx;
0067a301      int32_t var_8 = ebx;
0067a302      int32_t ebp;
0067a302      int32_t var_c = ebp;
0067a303      int32_t esi;
0067a303      int32_t var_10 = esi;
0067a308      class IDClass<_tagDataID,32,0> edi;
0067a308      class IDClass<_tagDataID,32,0> var_14 = edi;
0067a30c      ebx = 0;
0067a317      int32_t* esp_1 = &var_14;
0067a317      
0067a31c      if (MasterDBMap::DivineType(&arg2) == arg4)
0067a31c      {
0067a322          class PStringBase<char> eax_1 = arg2;
0067a32c          class PStringBase<char> var_4 = eax_1;
0067a334          InterlockedIncrement((eax_1 - 0x10));
0067a343          int32_t var_c_2 = 4;
0067a349          int32_t* var_10_1 = &arg_18;
0067a34a          var_14 = PSUtils::strip_directory(&arg3);
0067a34b          class IDClass<_tagDataID,32,0> ecx_1 = arg3;
0067a351          arg_18 = nullptr;
0067a359          var_14 = ecx_1;
0067a363          InterlockedIncrement((arg3 - 0x10), var_14, var_10_1, var_c_2);
0067a365          this->vtable->FindEntryByName();
0067a36c          class TFileEntry* eax_4 = arg_18;
0067a36c          
0067a372          if (eax_4 == 0)
0067a372          {
0067a4a4              int32_t* esi_14 = (arg3 - 0x14);
0067a4a4              
0067a4b3              if ((InterlockedDecrement(&esi_14[1]) == 0 && esi_14 != 0))
0067a4bb                  **(uint32_t**)esi_14(1);
0067a4bb              
0067a4d0              if ((InterlockedDecrement(((char*)arg_10 - 0x10)) == 0 && arg_10 != 0x14))
0067a4d8                  **(uint32_t**)((char*)arg_10 - 0x14)(1);
0067a4d8              
0067a4dd              int32_t eax_21;
0067a4dd              eax_21 = 0;
0067a4e1              return 0;
0067a372          }
0067a372          
0067a381          if (eax_4->m_did.id != INVALID_DID.id)
0067a381          {
0067a38d              int32_t* esi_3 = (arg3 - 0x14);
0067a38d              
0067a39c              if ((InterlockedDecrement(&esi_3[1]) == 0 && esi_3 != 0))
0067a3a4                  **(uint32_t**)esi_3(1);
0067a3a4              
0067a3b9              if ((InterlockedDecrement(((char*)arg_10 - 0x10)) == 0 && arg_10 != 0x14))
0067a3c1                  **(uint32_t**)((char*)arg_10 - 0x14)(1);
0067a3c1              
0067a3c3              int32_t eax_7;
0067a3c3              eax_7 = 1;
0067a3ca              return 1;
0067a381          }
0067a381          
0067a3cd          class IDClass<_tagDataID,32,0> ebp_2 = arg_14;
0067a3d1          eax_4->m_did.id = ebp_2;
0067a3d4          arg_18->m_dbtype = arg4;
0067a3db          arg_18->m_EntryType = DIDFile;
0067a3eb          void* eax_9 = this->vtable->GetDBTypeEntry(arg4);
0067a3eb          
0067a401          if (HashTable<IDClass<_tagDataID,32,0>,DBObj *,1>::contains(((char*)eax_9 + 0x14), &arg_14) == 0)
0067a401          {
0067a413              if ((*(uint32_t*)((char*)eax_9 + 0x80) << 1) < *(uint32_t*)((char*)eax_9 + 0x84))
0067a417                  HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>::grow(((char*)eax_9 + 0x14));
0067a417              
0067a42f              if (HashTable<IDClass<_tagDataID,32,0>,TFileEntry *,1>::add(((char*)eax_9 + 0x14), &arg_14, &arg_18) != 0)
0067a42f              {
0067a431                  class TFileEntry* eax_13 = arg_18;
0067a435                  eax_13->m_cRef += 1;
0067a42f              }
0067a42f              
0067a440              class IDClass<_tagDataID,32,0>* ecx_16 = ((char*)eax_9 + 0x10);
0067a440              
0067a442              if (ebp_2 >= *(uint32_t*)((char*)eax_9 + 0x10))
0067a444                  ecx_16 = &arg_14;
0067a444              
0067a44a              *(uint32_t*)((char*)eax_9 + 0x10) = ecx_16->id;
0067a44c              ebx = 1;
0067a401          }
0067a401          
0067a452          int32_t* esi_9 = (arg3 - 0x14);
0067a459          esp_1 = &var_8;
0067a459          
0067a465          if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
0067a465          {
0067a46d              **(uint32_t**)esi_9(1);
0067a46d              esp_1 = &var_8;
0067a465          }
0067a31c      }
0067a31c      
0067a473      int32_t* esi_11 = (esp_1[6] - 0x14);
0067a479      *(uint32_t*)((char*)esp_1 - 4) = &esi_11[1];
0067a47a      void* esp_3 = esp_1;
0067a47a      
0067a486      if ((InterlockedDecrement() == 0 && esi_11 != 0))
0067a486      {
0067a488          int32_t edx_7 = *(uint32_t*)esi_11;
0067a48a          *(uint32_t*)((char*)esp_3 - 4) = 1;
0067a48e          *(uint32_t*)edx_7();
0067a486      }
0067a486      
0067a490      int32_t eax_18;
0067a490      eax_18 = ebx;
0067a492      *(uint32_t*)esp_3;
0067a493      *(uint32_t*)((char*)esp_3 + 4);
0067a494      *(uint32_t*)((char*)esp_3 + 8);
0067a495      *(uint32_t*)((char*)esp_3 + 0xc);
0067a496      *(uint32_t*)((char*)esp_3 + 0x10);
0067a497      return eax_18;
0067a300  }

0067a4e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0067a4f0  uint8_t __thiscall TFile2IDTable::AssignNonAuthoritativePathToFileName(class TFile2IDTable* this, class PStringBase<char> arg2, class PStringBase<char> arg3)

0067a4f0  {
0067a4f3      int32_t ebx;
0067a4f3      int32_t var_20 = ebx;
0067a4f4      int32_t ebp;
0067a4f4      int32_t var_24 = ebp;
0067a4f5      int32_t esi;
0067a4f5      int32_t var_28 = esi;
0067a4fa      class PStringBase<char>* edi;
0067a4fa      class PStringBase<char>* var_2c = edi;
0067a4fb      class PStringBase<char>* var_30 = &arg2;
0067a4fe      char var_1a = 0;
0067a503      uint32_t eax;
0067a503      class PStringBase<char> ecx;
0067a503      eax = MasterDBMap::DivineType(var_30);
0067a50e      class PStringBase<char> ebx_1 = arg3;
0067a512      class PStringBase<char>** esp_1 = &var_2c;
0067a517      uint32_t var_14 = eax;
0067a517      
0067a51b      if (eax != 0)
0067a51b      {
0067a521          var_30 = eax;
0067a522          class PStringBase<char> var_34 = ecx;
0067a529          var_34 = ebx_1;
0067a52b          InterlockedIncrement((ebx_1 - 0x10), var_34, var_30);
0067a532          esp_1 = &var_30;
0067a532          
0067a537          if (MasterDBMap::VerifyDirectory() != 0)
0067a537          {
0067a541              void* const __return_addr_1 = __return_addr;
0067a54b              var_34 = ((char*)__return_addr - 0x10);
0067a54c              InterlockedIncrement(var_34);
0067a552              int32_t* var_38_2 = &var_20;
0067a557              uint32_t* __return = &var_14;
0067a565              class IntrusiveHashIterator<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>* eax_2;
0067a565              eax_2 = IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_CacheByFileName.m_intrusiveTable.vtable, __return, var_38_2)->m_currElement != 0;
0067a56e              *(uint8_t*)((char*)var_24)[3] = eax_2 == 0;
0067a573              esp_1 = &var_34;
0067a573              
0067a57f              if ((InterlockedDecrement(((char*)__return_addr - 0x10)) == 0 && __return_addr != 0x14))
0067a57f              {
0067a587                  **(uint32_t**)((char*)__return_addr - 0x14)(1);
0067a587                  esp_1 = &var_34;
0067a57f              }
0067a57f              
0067a589              int32_t eax_3;
0067a589              eax_3 = *(uint8_t*)((char*)var_24)[3];
0067a589              
0067a58f              if (eax_3 != 0)
0067a58f              {
0067a597                  void* eax_5;
0067a597                  int32_t ecx_4;
0067a597                  eax_5 = operator new(0x24);
0067a59e                  uint32_t** esp_2 = &var_34;
0067a5a3                  void* const eax_6;
0067a5a3                  
0067a5a3                  if (eax_5 == 0)
0067a5cc                      eax_6 = nullptr;
0067a5a3                  else
0067a5a3                  {
0067a5a5                      int32_t var_38_6 = ecx_4;
0067a5b5                      void* var_4;
0067a5b5                      __return = ((char*)var_4 - 0x10);
0067a5b8                      int32_t var_40_1 = InterlockedIncrement(__return, var_4);
0067a5c1                      InterlockedIncrement((ebx_1 - 0x10), ebx_1);
0067a5c5                      eax_6 = TFileEntry::TFileEntry(eax_5);
0067a5c5                      esp_2 = &__return;
0067a5a3                  }
0067a5a3                  
0067a5d2                  *(uint32_t*)((char*)eax_6 + 0x14) = esp_2[6];
0067a5d5                  *(uint32_t*)((char*)eax_6 + 0x18) = 4;
0067a5dc                  esp_2[5] = eax_6;
0067a5e0                  *(uint8_t*)((char*)eax_6 + 0x1c) = 0;
0067a5e4                  void* eax_7 = esp_2[0xc];
0067a5ee                  *(uint32_t*)((char*)esp_2 - 4) = ((char*)eax_7 - 0x10);
0067a5ee                  esp_2[6] = eax_7;
0067a5f3                  InterlockedIncrement();
0067a5f9                  *(uint32_t*)((char*)esp_2 - 8) = &esp_2[4];
0067a5fe                  *(uint32_t*)((char*)esp_2 - 0xc) = &esp_2[5];
0067a607                  ebx_1.m_charbuffer = HashTable<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *,1>::add(&this->m_CacheByFileName);
0067a609                  char temp1_1 = ebx_1.m_charbuffer;
0067a609                  ebx_1.m_charbuffer = -(ebx_1.m_charbuffer);
0067a60e                  ebx_1.m_charbuffer = (ebx_1.m_charbuffer - ebx_1.m_charbuffer);
0067a610                  *(uint32_t*)((char*)esp_2 - 8) = ((char*)eax_7 - 0x10);
0067a611                  ebx_1.m_charbuffer += 1;
0067a613                  esp_1 = ((char*)esp_2 - 4);
0067a613                  
0067a61f                  if ((InterlockedDecrement() == 0 && eax_7 != 0x14))
0067a61f                  {
0067a621                      int32_t eax_11 = *(uint32_t*)((char*)eax_7 - 0x14);
0067a623                      *(uint32_t*)((char*)esp_1 - 4) = 1;
0067a627                      *(uint32_t*)eax_11();
0067a61f                  }
0067a61f                  
0067a629                  bool cond:2_1 = ebx_1.m_charbuffer != 0;
0067a62b                  ebx_1 = esp_1[0xd];
0067a62b                  
0067a62f                  if (!(cond:2_1))
0067a631                      *(uint8_t*)((char*)esp_1 + 0x12) = 1;
0067a58f              }
0067a537          }
0067a51b      }
0067a51b      
0067a636      *(uint32_t*)((char*)esp_1 - 4) = 2;
0067a63c      *(uint32_t*)((char*)esp_1 - 8) = &esp_1[7];
0067a63d      *(uint32_t*)((char*)esp_1 - 0xc) = &esp_1[7];
0067a636      esp_1[7] = 0;
0067a64b      *(uint32_t*)((char*)esp_1 - 0x10) = (ebx_1 - 0x10);
0067a64c      *(uint32_t*)((char*)esp_1 - 0xc) = ebx_1;
0067a64e      InterlockedIncrement();
0067a650      this->vtable->FindEntryByName();
0067a662      int32_t* esi_2 = &esp_1[0xc][-5];
0067a668      *(uint32_t*)((char*)esp_1 - 4) = &esi_2[1];
0067a669      void* esp_15 = esp_1;
0067a669      
0067a671      if ((InterlockedDecrement() == 0 && esi_2 != 0))
0067a671      {
0067a673          int32_t edx_9 = *(uint32_t*)esi_2;
0067a675          *(uint32_t*)((char*)esp_15 - 4) = 1;
0067a679          *(uint32_t*)edx_9();
0067a671      }
0067a671      
0067a681      *(uint32_t*)((char*)esp_15 - 4) = (ebx_1 - 0x10);
0067a681      
0067a68a      if ((InterlockedDecrement() == 0 && ebx_1 != 0x14))
0067a68a      {
0067a68c          int32_t edx_10 = *(uint32_t*)(ebx_1 - 0x14);
0067a68e          *(uint32_t*)((char*)esp_15 - 4) = 1;
0067a692          *(uint32_t*)edx_10();
0067a68a      }
0067a68a      
0067a694      int32_t eax_16;
0067a694      eax_16 = *(uint8_t*)((char*)esp_15 + 0x12);
0067a698      *(uint32_t*)esp_15;
0067a699      *(uint32_t*)((char*)esp_15 + 4);
0067a69a      *(uint32_t*)((char*)esp_15 + 8);
0067a69b      *(uint32_t*)((char*)esp_15 + 0xc);
0067a69f      return eax_16;
0067a4f0  }

0067a6a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0067a6b0  uint8_t __thiscall TFile2IDTable::FindEntryByName(class TFile2IDTable* this, class PStringBase<char> arg2, class TFileEntry** arg3, enum FileEntryType arg4)

0067a6b0  {
0067a6b7      int32_t ebx;
0067a6b7      int32_t var_38 = ebx;
0067a6b8      int32_t ebp;
0067a6b8      int32_t var_3c = ebp;
0067a6b9      int32_t esi;
0067a6b9      int32_t var_40 = esi;
0067a6c0      int32_t* edi;
0067a6c0      int32_t* var_44 = edi;
0067a6c4      class PStringBase<char> var_28 = arg2;
0067a6ce      class TFile2IDTable* this_1 = this;
0067a6d2      InterlockedIncrement((arg2 - 0x10));
0067a6d8      int32_t var_2c;
0067a6d8      int32_t* var_4c = &var_2c;
0067a6e3      void __return;
0067a6e3      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_CacheByFileName.m_intrusiveTable, &__return, var_4c);
0067a6f0      void* var_18;
0067a6f0      
0067a6f0      if (var_18 == 0)
0067a6f0      {
0067a702          void* eax_2;
0067a702          eax_2 = arg3 != 1;
0067a707          *(uint8_t*)((char*)var_38)[3] = 1;
0067a707          
0067a70c          if (eax_2 == 0)
0067a70e              *(uint8_t*)((char*)var_38)[3] = 0;
0067a6f0      }
0067a6f0      else
0067a6f0      {
0067a6f9          *(uint32_t*)arg2 = *(uint32_t*)((char*)var_18 + 8);
0067a70e          *(uint8_t*)((char*)var_38)[3] = 0;
0067a6f0      }
0067a6f0      
0067a716      var_4c = (arg2 - 0x10);
0067a717      int32_t* esp_1 = &var_44;
0067a717      
0067a723      if ((InterlockedDecrement(var_4c) == 0 && arg2 != 0x14))
0067a723      {
0067a72b          **(uint32_t**)(arg2 - 0x14)(1);
0067a72b          esp_1 = &var_44;
0067a723      }
0067a723      
0067a72d      char var_31;
0067a72d      int32_t eax_4;
0067a72d      eax_4 = var_31;
0067a72d      
0067a733      if (eax_4 != 0)
0067a733      {
0067a745          int32_t** esp_2;
0067a745          void* const edi_3;
0067a745          
0067a745          if ((arg4 == SearchedDirectory || arg4 == UnsearchedDirectory))
0067a745          {
0067a79c              void* eax_9;
0067a79c              int32_t ecx_7;
0067a79c              eax_9 = operator new(0x24);
0067a7a3              int32_t** esp_3 = &var_44;
0067a7a3              
0067a7a8              if (eax_9 == 0)
0067a7db                  edi_3 = nullptr;
0067a7a8              else
0067a7a8              {
0067a7aa                  int32_t var_48_6 = ecx_7;
0067a7ba                  var_4c = (arg2 - 0x10);
0067a7bd                  int32_t var_50_3 = InterlockedIncrement(var_4c, arg2);
0067a7ce                  InterlockedIncrement(((char*)__return_addr - 0x10), __return_addr);
0067a7d2                  esp_3 = &var_4c;
0067a7d7                  edi_3 = TFileEntry::TFileEntry(eax_9);
0067a7a8              }
0067a7a8              
0067a7dd              int32_t eax_11 = esp_3[0x12];
0067a7e1              esp_3[5] = eax_11;
0067a7e8              *(uint32_t*)((char*)esp_3 - 4) = (eax_11 - 0x10);
0067a7e8              esp_3[6] = edi_3;
0067a7ed              InterlockedIncrement();
0067a7f3              *(uint32_t*)((char*)esp_3 - 8) = &esp_3[0x11];
0067a7f8              *(uint32_t*)((char*)esp_3 - 0xc) = &esp_3[4];
0067a7f9              PSUtils::get_directory();
0067a7e8              esp_3[0xc] = 0x79448c;
0067a7e8              esp_3[0xf] = &esp_3[4];
0067a7e8              esp_3[0xd] = 0;
0067a7e8              esp_3[0xe] = 0;
0067a81d              uint32_t eax_14 = PStringBaseIter_Const<unsigned short>::GetStrLen(&esp_3[0xc]);
0067a81d              
0067a826              if (eax_14 >= 1)
0067a7e8                  esp_3[0xd] = (eax_14 - 1);
0067a826              else
0067a7e8                  esp_3[0xd] = 0;
0067a7e8              
0067a837              PStringBaseIter<char>::Truncate(&esp_3[0xc]);
0067a83c              void* eax_16 = esp_3[4];
0067a7e8              esp_3[6] = 0;
0067a7e8              esp_3[8] = eax_16;
0067a84e              *(uint32_t*)((char*)esp_3 - 8) = ((char*)eax_16 - 0x10);
0067a84f              InterlockedIncrement();
0067a855              *(uint32_t*)((char*)esp_3 - 0xc) = &esp_3[7];
0067a85a              *(uint32_t*)((char*)esp_3 - 0x10) = &esp_3[8];
0067a85d              IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(&this->m_CacheByFileName.m_intrusiveTable);
0067a862              void* eax_18 = esp_3[0xa];
0067a868              class IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>* ebx_2;
0067a868              
0067a868              if (eax_18 == 0)
0067a868              {
0067a981                  eax_18 = esp_3[3][-1] > 3;
0067a981                  
0067a986                  if (eax_18 == 0)
0067a875                      ebx_2 = 0;
0067a986                  else
0067a98c                      ebx_2 = 1;
0067a868              }
0067a868              else
0067a868              {
0067a7e8                  esp_3[5] = *(uint32_t*)((char*)eax_18 + 8);
0067a875                  ebx_2 = 0;
0067a868              }
0067a868              
0067a87a              *(uint32_t*)((char*)esp_3 - 0xc) = ((char*)eax_16 - 0x10);
0067a87b              void* esp_13 = ((char*)esp_3 - 4);
0067a87b              
0067a887              if ((InterlockedDecrement() == 0 && eax_16 != 0x14))
0067a887              {
0067a889                  int32_t eax_21 = *(uint32_t*)((char*)eax_16 - 0x14);
0067a88c                  *(uint32_t*)((char*)esp_13 - 4) = 1;
0067a890                  *(uint32_t*)eax_21();
0067a887              }
0067a887              
0067a894              if (ebx_2 != 0)
0067a894              {
0067a896                  int32_t edx_12 = *(uint32_t*)((char*)esp_13 + 0x14);
0067a89a                  *(uint32_t*)((char*)esp_13 - 4) = 2;
0067a8a0                  *(uint32_t*)((char*)esp_13 - 8) = ((char*)esp_13 + 0x1c);
0067a8a1                  *(uint32_t*)((char*)esp_13 - 0xc) = ((char*)esp_13 + 0x1c);
0067a8a4                  *(uint32_t*)((char*)esp_13 - 0xc) = edx_12;
0067a8ad                  *(uint32_t*)((char*)esp_13 - 0x10) = (*(uint32_t*)((char*)esp_13 + 0x14) - 0x10);
0067a8ae                  InterlockedIncrement();
0067a8b6                  *(uint32_t*)(**(uint32_t**)((char*)esp_13 + 0x1c) + 0x54)();
0067a894              }
0067a894              
0067a8bd              int32_t* ebp_3 = (*(uint32_t*)((char*)esp_13 + 0x14) - 0x14);
0067a8c3              *(uint32_t*)((char*)esp_13 - 4) = &ebp_3[1];
0067a8c4              *(uint32_t*)((char*)esp_13 + 0x34) = 0x794478;
0067a8cc              esp_2 = ((char*)esp_13 + 4);
0067a8cc              
0067a8d8              if ((InterlockedDecrement() == 0 && ebp_3 != 0))
0067a8d8              {
0067a8da                  int32_t edx_14 = *(uint32_t*)ebp_3;
0067a8dd                  *(uint32_t*)((char*)esp_2 - 4) = 1;
0067a8e1                  *(uint32_t*)edx_14();
0067a8d8              }
0067a745          }
0067a745          else
0067a745          {
0067a749              void* eax_7;
0067a749              int32_t ecx_3;
0067a749              eax_7 = operator new(0x24);
0067a750              esp_2 = &var_44;
0067a750              
0067a755              if (eax_7 == 0)
0067a755              {
0067a78f                  edi_3 = nullptr;
0067a791                  var_2c = 0;
0067a755              }
0067a755              else
0067a755              {
0067a757                  int32_t var_48_3 = ecx_3;
0067a767                  var_4c = (arg2 - 0x10);
0067a76a                  int32_t var_50_1 = InterlockedIncrement(var_4c, arg2);
0067a76b                  class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
0067a77b                  InterlockedIncrement(((char*)m_charbuffer - 0x10), m_charbuffer);
0067a77f                  esp_2 = &var_4c;
0067a784                  edi_3 = TFileEntry::TFileEntry(eax_7);
0067a786                  void* const var_34_1 = edi_3;
0067a755              }
0067a745          }
0067a745          
0067a8e8          int32_t ecx_21 = esp_2[0x14];
0067a8ec          *(uint32_t*)((char*)edi_3 + 0x10) = INVALID_DID.id;
0067a8ef          *(uint32_t*)((char*)edi_3 + 0x18) = ecx_21;
0067a8f2          *(uint8_t*)((char*)edi_3 + 0x1c) = 0;
0067a8f6          void* eax_28 = esp_2[0x12];
0067a8ff          *(uint32_t*)((char*)esp_2 - 4) = ((char*)eax_28 - 0x10);
0067a8ff          esp_2[0x14] = eax_28;
0067a904          InterlockedIncrement();
0067a906          int32_t ecx_22 = esp_2[7];
0067a90e          *(uint32_t*)((char*)esp_2 - 8) = &esp_2[5];
0067a913          *(uint32_t*)((char*)esp_2 - 0xc) = &esp_2[0x13];
0067a917          HashTable<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *,1>::add((ecx_22 + 4));
0067a922          *(uint32_t*)((char*)esp_2 - 8) = ((char*)eax_28 - 0x10);
0067a923          esp_1 = esp_2;
0067a923          
0067a92f          if ((InterlockedDecrement() == 0 && eax_28 != 0x14))
0067a92f          {
0067a931              int32_t edx_16 = *(uint32_t*)((char*)eax_28 - 0x14);
0067a933              *(uint32_t*)((char*)esp_1 - 4) = 1;
0067a937              *(uint32_t*)edx_16();
0067a92f          }
0067a92f          
0067a93d          *(uint32_t*)esp_1[0x13] = edi_3;
0067a733      }
0067a733      
0067a94d      int32_t ebx_3;
0067a94d      ebx_3 = *(uint32_t*)esp_1[0x13] != 0;
0067a950      int32_t* esi_3 = (esp_1[0x12] - 0x14);
0067a956      *(uint32_t*)((char*)esp_1 - 4) = &esi_3[1];
0067a957      void* esp_28 = &esp_1[1];
0067a957      
0067a963      if ((InterlockedDecrement() == 0 && esi_3 != 0))
0067a963      {
0067a965          int32_t eax_34 = *(uint32_t*)esi_3;
0067a967          *(uint32_t*)((char*)esp_28 - 4) = 1;
0067a96b          *(uint32_t*)eax_34();
0067a963      }
0067a963      
0067a96d      *(uint32_t*)esp_28;
0067a96e      *(uint32_t*)((char*)esp_28 + 4);
0067a96f      *(uint32_t*)((char*)esp_28 + 8);
0067a970      int32_t eax_33;
0067a970      eax_33 = ebx_3;
0067a972      *(uint32_t*)((char*)esp_28 + 0xc);
0067a976      return eax_33;
0067a6b0  }

0067a993                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0067a9a0  uint8_t __thiscall TFile2IDTable::AssignPathToFileNameInternal(class TFile2IDTable* this, class PStringBase<char> arg2, class PStringBase<char> arg3, int32_t arg4)

0067a9a0  {
0067a9a3      void* __return_7;
0067a9a3      void* __return_3 = __return_7;
0067a9aa      class PStringBase<char>* edi;
0067a9aa      class PStringBase<char>* var_64 = edi;
0067a9ab      class PStringBase<char>* var_68 = &arg2;
0067a9ac      class TFile2IDTable* this_1 = this;
0067a9b0      char var_51 = 0;
0067a9b5      uint32_t eax;
0067a9b5      class PStringBase<char> ecx;
0067a9b5      eax = MasterDBMap::DivineType(var_68);
0067a9c2      class PStringBase<char>** esp_1 = &var_64;
0067a9c2      
0067a9c7      if (eax != 0)
0067a9c7      {
0067a9cd          var_68 = eax;
0067a9ce          class PStringBase<char> var_6c = ecx;
0067a9d5          var_6c = arg3;
0067a9da          int32_t* var_70 = (arg3 - 0x10);
0067a9db          InterlockedIncrement(var_70, var_6c, var_68);
0067a9dd          uint8_t eax_1;
0067a9dd          eax_1 = MasterDBMap::VerifyDirectory();
0067a9e2          esp_1 = &var_68;
0067a9e2          
0067a9e7          if (eax_1 != 0)
0067a9e7          {
0067a9ed              void* const __return_addr_1 = __return_addr;
0067a9f7              class TFile2IDTable* this_2 = nullptr;
0067a9f9              var_6c = ((char*)__return_addr_1 - 0x10);
0067a9fa              void* __offset(IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::VTable, -0x14) __return_1 = nullptr;
0067a9fe              void* const __return_addr_3 = __return_addr_1;
0067aa02              InterlockedIncrement(var_6c);
0067aa04              void* __return_6 = __return_3;
0067aa0c              struct IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::VTable* __return_2;
0067aa0c              var_70 = &__return_2;
0067aa11              void var_38;
0067aa11              void* __return = &var_38;
0067aa15              IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,unsigned long> *,1>::find_internal(((char*)__return_6 + 8), __return, var_70);
0067aa20              void* var_30;
0067aa20              
0067aa20              if (var_30 != 0)
0067aa20              {
0067aa22                  this_2 = *(uint32_t*)((char*)var_30 + 8);
0067aa25                  this_1 = this_2;
0067aa20              }
0067aa20              
0067aa2c              var_70 = ((char*)__return_addr_1 - 0x10);
0067aa2c              
0067aa39              if ((InterlockedDecrement(var_70) == 0 && __return_addr_1 != 0x14))
0067aa39              {
0067aa3b                  int32_t edx_1 = *(uint32_t*)((char*)__return_addr_1 - 0x14);
0067aa3d                  var_70 = 1;
0067aa41                  *(uint32_t*)edx_1(var_70);
0067aa39              }
0067aa39              
0067aa45              class PStringBase<char> var_4;
0067aa45              struct IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::VTable __vecDelDtor;
0067aa45              
0067aa45              if (this_2 == 0)
0067aa45              {
0067ac98                  var_70 = 0x24;
0067ac9a                  void* eax_23;
0067ac9a                  int32_t* ecx_34;
0067ac9a                  eax_23 = operator new(var_70);
0067aca1                  class PStringBase<char>* esp_4 = &var_6c;
0067aca6                  void* const esi_4;
0067aca6                  
0067aca6                  if (eax_23 == 0)
0067acd5                      esi_4 = nullptr;
0067aca6                  else
0067aca6                  {
0067aca8                      var_70 = ecx_34;
0067acaf                      var_70 = var_4;
0067acb8                      __return = (var_4 - 0x10);
0067acbb                      int32_t var_78_18 = InterlockedIncrement(__return, var_70);
0067acbc                      class PStringBase<char> ecx_37 = var_4;
0067acc8                      InterlockedIncrement((ecx_37 - 0x10), ecx_37);
0067accc                      esp_4 = &__return;
0067acd1                      esi_4 = TFileEntry::TFileEntry(eax_23);
0067aca6                  }
0067aca6                  
0067acd7                  int32_t eax_25 = *(int32_t*)((char*)esp_4 + 0x70);
0067acdb                  *(uint32_t*)((char*)esi_4 + 0x14) = eax;
0067acde                  *(uint32_t*)((char*)esi_4 + 0x18) = 4;
0067ace5                  *(uint8_t*)((char*)esi_4 + 0x1c) = 1;
0067ace9                  *(uint32_t*)((char*)esp_4 - 4) = &data_79450c;
0067acf2                  *(int32_t*)((char*)esp_4 + 0x1c) = esi_4;
0067acf6                  *(uint32_t*)((char*)esi_4 + 0x20) = eax_25;
0067acf9                  PStringBase<char>::PStringBase<char>(&esp_4[0x1c]);
0067acfe                  void* esi_5 = *(uint32_t*)((char*)esi_4 + 0xc);
0067ad01                  *(int32_t*)((char*)esp_4 + 0x2c) = esi_5;
0067ace9                  esp_4->m_charbuffer = ((char*)esi_5 - 0x10);
0067ad0c                  InterlockedIncrement();
0067ad12                  *(int32_t*)((char*)esp_4 + -8) = &esp_4[0xa];
0067ad17                  *(int32_t*)((char*)esp_4 + -0xc) = &esp_4[8];
0067ad1c                  *(int32_t*)((char*)esp_4 + -0x10) = &esp_4[0x1b];
0067ad21                  *(int32_t*)((char*)esp_4 + -0x14) = &esp_4[9];
0067ad2d                  PStringBase<char>::operator+(PStringBase<char>::operator+(&esp_4[0x1a]));
0067ad3c                  int32_t* edi_6 = (*(int32_t*)((char*)esp_4 + 0x24) - 0x14);
0067ad42                  *(int32_t*)((char*)esp_4 + -8) = &edi_6[1];
0067ad43                  void* __offset(PStringBase<char>, -0x4) esp_15 = ((char*)esp_4 - 4);
0067ad43                  
0067ad4b                  if ((InterlockedDecrement() == 0 && edi_6 != 0))
0067ad4b                  {
0067ad4d                      int32_t edx_11 = *(uint32_t*)edi_6;
0067ad4f                      *(int32_t*)((char*)ADJ(esp_15) + -8) = 1;
0067ad53                      *(uint32_t*)edx_11();
0067ad4b                  }
0067ad4b                  
0067ad58                  *(int32_t*)((char*)ADJ(esp_15) + -8) = ((char*)esi_5 - 0x10);
0067ad58                  
0067ad61                  if ((InterlockedDecrement() == 0 && esi_5 != 0x14))
0067ad61                  {
0067ad63                      int32_t edx_12 = *(uint32_t*)((char*)esi_5 - 0x14);
0067ad65                      *(int32_t*)((char*)ADJ(esp_15) + -8) = 1;
0067ad69                      *(uint32_t*)edx_12();
0067ad61                  }
0067ad61                  
0067ad6f                  int32_t* esi_8 = (*(int32_t*)((char*)ADJ(esp_15) + 0x6c) - 0x14);
0067ad75                  *(int32_t*)((char*)ADJ(esp_15) + -8) = &esi_8[1];
0067ad75                  
0067ad7e                  if ((InterlockedDecrement() == 0 && esi_8 != 0))
0067ad7e                  {
0067ad80                      int32_t edx_13 = *(uint32_t*)esi_8;
0067ad82                      *(int32_t*)((char*)ADJ(esp_15) + -8) = 1;
0067ad86                      *(uint32_t*)edx_13();
0067ad7e                  }
0067ad7e                  
0067ad88                  class PStringBase<char> edi_7 = *(int32_t*)((char*)ADJ(esp_15) + 0x10);
0067ad90                  *(int32_t*)((char*)ADJ(esp_15) + -8) = ((char*)esp_15 + 0x1c);
0067ad95                  *(int32_t*)((char*)((char*)esp_15 + 4) + -0xc) = ((char*)esp_15 + 0x24);
0067ad98                  TFile2IDTable::SanitizeEntry(edi_7);
0067ad9d                  class PStringBase<char> esi_9 = *(int32_t*)((char*)((char*)esp_15 + 4) + 0x64);
0067ada1                  *(int32_t*)((char*)((char*)esp_15 + 4) + 0x6c) = esi_9;
0067adab                  *(int32_t*)((char*)((char*)esp_15 + 4) + -8) = (esi_9 - 0x10);
0067adac                  InterlockedIncrement();
0067adb2                  *(int32_t*)((char*)((char*)esp_15 + 4) + -0xc) = ((char*)esp_15 + 0x18);
0067adb7                  *(int32_t*)((char*)((char*)esp_15 + 4) + -0x10) = ((char*)esp_15 + 0x6c);
0067adbb                  char eax_36 = HashTable<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *,1>::add((edi_7 + 4));
0067adc8                  char ebx_3 = -(eax_36);
0067adcf                  *(int32_t*)((char*)((char*)esp_15 + 4) + -0xc) = (esi_9 - 0x10);
0067add2                  void* esp_31 = ((char*)esp_15 - 4);
0067add2                  
0067adda                  if ((InterlockedDecrement() == 0 && esi_9 != 0x14))
0067adda                  {
0067addc                      int32_t eax_38 = *(uint32_t*)(esi_9 - 0x14);
0067adde                      *(uint32_t*)((char*)esp_31 - 4) = 1;
0067ade2                      *(uint32_t*)eax_38();
0067adda                  }
0067adda                  
0067ade6                  if ((ebx_3 - ebx_3) == 0xff)
0067ade8                      *(uint8_t*)((char*)esp_31 + 0x13) = 1;
0067ade8                  
0067adf1                  struct IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::VTable* esi_12 = (*(uint32_t*)((char*)esp_31 + 0x24) - 0x14);
0067adf7                  *(uint32_t*)((char*)esp_31 - 4) = &esi_12[1];
0067adf8                  int32_t eax_39;
0067adf8                  eax_39 = InterlockedDecrement();
0067adf8                  esp_1 = esp_31;
0067adf8                  
0067ae00                  if ((eax_39 == 0 && esi_12 != 0))
0067ae00                  {
0067ae02                      __vecDelDtor = esi_12->__vecDelDtor;
0067ae06                      *(uint32_t*)((char*)esp_1 - 4) = 1;
0067ae08                      ecx = *(uint32_t*)__vecDelDtor();
0067ae00                  }
0067aa45              }
0067aa45              else
0067aa45              {
0067aa50                  if (this_2->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[2] == 0)
0067aa52                      this_2->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[2] = eax;
0067aa52                  
0067aa55                  struct IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::VTable* vtable = this_2->m_CacheByFileName.m_intrusiveTable.vtable;
0067aa58                  void* __offset(IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::VTable, -0x14) __return_4 = &vtable[-5];
0067aa5e                  var_70 = ((char*)__return_4 + 4);
0067aa5f                  __return_2 = vtable;
0067aa63                  __return_1 = __return_4;
0067aa67                  InterlockedIncrement(var_70);
0067aa78                  int32_t** esp_2;
0067aa78                  void* __return_5;
0067aa78                  
0067aa78                  if ((vtable->__vecDelDtor == 1 || this_2->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[4] == 0))
0067aa78                  {
0067ab6a                      __return = &data_79450c;
0067ab73                      PStringBase<char>::PStringBase<char>(&__return_1, __return);
0067ab78                      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>* __return_addr_4 = this_2->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[0];
0067ab81                      __return = &__return_addr_4[-1];
0067ab82                      __return_addr_3 = __return_addr_4;
0067ab86                      InterlockedIncrement(__return);
0067aba7                      void var_8;
0067aba7                      PStringBase<char>::operator+(PStringBase<char>::operator+(&var_8, &__return_1, &this_1), &var_4, &__return_2);
0067abb0                      void* __offset(IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::VTable, -0x28) ebx_2 = ((char*)__return_1 - 0x14);
0067abb0                      
0067abc3                      if ((InterlockedDecrement(((char*)ebx_2 + 4)) == 0 && ebx_2 != 0))
0067abc3                      {
0067abc7                          int32_t var_78_7 = 1;
0067abcb                          *(uint32_t*)*(int32_t*)((char*)ADJ(ebx_2) + -0x28)(1);
0067abc3                      }
0067abc3                      
0067abdf                      if ((InterlockedDecrement(&__return_addr_4[-1]) == 0 && __return_addr_4 != 0x14))
0067abdf                      {
0067abe3                          int32_t var_78_9 = 1;
0067abe7                          *(uint32_t*)*(int32_t*)((char*)__return_addr_4 + -0x14)(1);
0067abdf                      }
0067abdf                      
0067abed                      void* __offset(TFile2IDTable, -0x14) edi_4 = ((char*)this_1 - 0x14);
0067abed                      
0067abfc                      if ((InterlockedDecrement(((char*)edi_4 + 4)) == 0 && edi_4 != 0))
0067abfc                      {
0067ac00                          int32_t var_78_11 = 1;
0067ac04                          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_4) + -0x14)(1);
0067abfc                      }
0067abfc                      
0067ac0f                      int32_t var_7c_4 = 0;
0067ac1a                      void lpFileInformation;
0067ac1a                      void var_20;
0067ac1a                      
0067ac1a                      if (GetFileAttributesExA(var_4, GetFileExInfoStandard, &lpFileInformation) != 0)
0067ac29                          this_2->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[5] = FileTime2TimeType(&var_20);
0067ac33                      TFileEntry::SetPath(this_2, &var_8);
0067ac46                      this_2->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[4] = 1;
0067ac4a                      class TFile2IDTable* esi;
0067ac4a                      TFile2IDTable::SanitizeEntry(esi, &var_4, &__return_3);
0067ac53                      int32_t* esi_2 = (var_4 - 0x14);
0067ac5a                      *(uint8_t*)((char*)var_64)[3] = 1;
0067ac5f                      esp_2 = &__return;
0067ac5f                      
0067ac67                      if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0067ac67                      {
0067ac6b                          int32_t var_78_17 = 1;
0067ac6f                          **(uint32_t**)esi_2(1);
0067ac6f                          esp_2 = &__return;
0067ac67                      }
0067ac67                      
0067ac71                      __return_4 = __return_5;
0067aa78                  }
0067aa78                  else
0067aa78                  {
0067aa82                      __return = &var_4;
0067aa87                      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_3, __return);
0067aa90                      __return = &__return_1;
0067aa95                      PStringBase<unsigned short>::PStringBase<unsigned short>(&__return_addr, __return);
0067aa9e                      __return = nullptr;
0067aaa1                      PSUtils::cleanup_directory_name(&__return_3, __return);
0067aaaa                      int32_t var_7c_1 = 0;
0067aaad                      PSUtils::cleanup_directory_name(&__return_addr, 0);
0067aab9                      PStringBase<char>::tolower(&__return_3);
0067aac2                      PStringBase<char>::tolower(&__return_addr);
0067aacb                      void* const __return_addr_2 = __return_addr;
0067aacf                      __return = __return_3;
0067aad7                      esp_2 = &var_70;
0067aad7                      
0067aadc                      if (_stricmp(__return_addr_2, __return) == 0)
0067aadc                      {
0067aade                          __return = &data_79450c;
0067aae7                          this_2->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets[4] = 1;
0067aaeb                          PStringBase<char>::PStringBase<char>(&this_1, __return);
0067aaf4                          __return = &__return_addr_3;
0067aafc                          __return = TFileEntry::GetFileName(this_2, __return);
0067ab17                          PStringBase<char>::operator+(PStringBase<char>::operator+(&var_4, &__return_2, &this_1), &__return_1, __return);
0067ab20                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_2);
0067ab29                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_addr_3);
0067ab32                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&this_1);
0067ab3f                          __return = &__return_5;
0067ab45                          class TFile2IDTable* ebp;
0067ab45                          TFile2IDTable::SanitizeEntry(ebp, &__return_1, __return);
0067ab45                          esp_2 = &var_70;
0067ab4e                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_1);
0067aadc                      }
0067aadc                      
0067ab57                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_addr);
0067ab60                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return_3);
0067aa78                  }
0067ac78                  *(uint32_t*)((char*)esp_2 - 4) = ((char*)__return_4 + 4);
0067ac79                  int32_t eax_22;
0067ac79                  eax_22 = InterlockedDecrement();
0067ac79                  esp_1 = esp_2;
0067ac79                  
0067ac89                  if ((eax_22 == 0 && __return_4 != 0))
0067ac89                  {
0067ac8f                      __vecDelDtor = *(int32_t*)((char*)ADJ(__return_4) + -0x14);
0067ae06                      *(uint32_t*)((char*)esp_1 - 4) = 1;
0067ae08                      ecx = *(uint32_t*)__vecDelDtor();
0067ac89                  }
0067aa45              }
0067a9e7          }
0067a9c7      }
0067a9c7      
0067ae0a      void* edi_8 = esp_1[0x1b];
0067ae0e      *(uint32_t*)((char*)esp_1 - 4) = 2;
0067ae14      *(uint32_t*)((char*)esp_1 - 8) = &esp_1[0xc];
0067ae15      *(uint32_t*)((char*)esp_1 - 0xc) = ecx;
0067ae0e      esp_1[0xc] = 0;
0067ae23      *(uint32_t*)((char*)esp_1 - 0x10) = ((char*)edi_8 - 0x10);
0067ae24      *(uint32_t*)((char*)esp_1 - 0xc) = edi_8;
0067ae26      InterlockedIncrement();
0067ae2e      *(uint32_t*)(esp_1[4]->m_charbuffer + 0x54)();
0067ae3b      int32_t* esi_14 = &esp_1[0x1a][-5];
0067ae41      *(uint32_t*)((char*)esp_1 - 4) = &esi_14[1];
0067ae42      void* esp_41 = esp_1;
0067ae42      
0067ae4a      if ((InterlockedDecrement() == 0 && esi_14 != 0))
0067ae4a      {
0067ae4c          int32_t edx_17 = *(uint32_t*)esi_14;
0067ae4e          *(uint32_t*)((char*)esp_41 - 4) = 1;
0067ae52          *(uint32_t*)edx_17();
0067ae4a      }
0067ae4a      
0067ae5a      *(uint32_t*)((char*)esp_41 - 4) = ((char*)edi_8 - 0x10);
0067ae5a      
0067ae63      if ((InterlockedDecrement() == 0 && edi_8 != 0x14))
0067ae63      {
0067ae65          int32_t edx_18 = *(uint32_t*)((char*)edi_8 - 0x14);
0067ae67          *(uint32_t*)((char*)esp_41 - 4) = 1;
0067ae6b          *(uint32_t*)edx_18();
0067ae63      }
0067ae63      
0067ae6d      int32_t eax_45;
0067ae6d      eax_45 = *(uint8_t*)((char*)esp_41 + 0x13);
0067ae71      *(uint32_t*)esp_41;
0067ae72      *(uint32_t*)((char*)esp_41 + 4);
0067ae73      *(uint32_t*)((char*)esp_41 + 8);
0067ae74      *(uint32_t*)((char*)esp_41 + 0xc);
0067ae78      return eax_45;
0067a9a0  }

0067ae7b                                                                                   90 90 90 90 90                             .....

0067ae80  uint8_t __thiscall HashTable<unsigned long,TDBTypeEntry *,1>::add(class HashTable<unsigned long,TDBTypeEntry *,1>* this, uint32_t const* arg2, struct TDBTypeEntry** arg3)

0067ae80  {
0067ae86      void* eax = operator new(0xc);
0067ae90      void* esi;
0067ae90      
0067ae90      if (eax == 0)
0067aeae          esi = nullptr;
0067ae90      else
0067ae90      {
0067ae9c          *(uint32_t*)eax = *(uint32_t*)arg2;
0067ae9e          *(uint32_t*)((char*)eax + 4) = 0;
0067aea7          *(uint32_t*)((char*)eax + 8) = *(uint32_t*)arg3;
0067aeaa          esi = eax;
0067ae90      }
0067ae90      
0067aebb      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::add(&this->m_intrusiveTable, esi) != 0)
0067aed5          return 1;
0067aed5      
0067aebf      if (esi != 0)
0067aec2          operator delete(esi);
0067aec2      
0067aece      return 0;
0067ae80  }

0067aed8                                                                          90 90 90 90 90 90 90 90                          ........

0067aee0  void __fastcall TFile2IDTable::Clear(class TFile2IDTable* this)

0067aee0  {
0067aef3      void __return;
0067aef3      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_CacheByFileName.m_intrusiveTable, &__return);
0067aef8      class HashTableData<unsigned long,DBOCache *>* i_4 = eax->m_currElement;
0067aefd      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0067aeff      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0067af02      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
0067af02      
0067af06      if (i_4 != 0)
0067af06      {
0067af08          while (true)
0067af08          {
0067af08              class DBOCache* m_data = i_4->m_data;
0067af08              
0067af0d              if (m_data != 0)
0067af0d              {
0067af0f                  m_data->m_ObjTable.vtable -= 1;
0067af0f                  
0067af12                  if (m_data->m_ObjTable.vtable == 1)
0067af12                  {
0067af14                      m_data->vtable->__vecDelDtor(1);
0067af1a                      m_currHashTable = m_currHashTable_1;
0067af12                  }
0067af0d              }
0067af0d              
0067af1e              i_4 = i_4->m_hashNext;
0067af1e              
0067af23              if (i_4 == 0)
0067af23              {
0067af3b                  class HashTableData<unsigned long,DBOCache *>* i;
0067af3b                  
0067af3b                  do
0067af3b                  {
0067af30                      m_currBucket = &m_currBucket[1];
0067af30                      
0067af35                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0067af35                          goto label_67af45;
0067af35                      
0067af37                      i = *(uint32_t*)m_currBucket;
0067af3b                  } while (i == 0);
0067af3b                  
0067af3d                  i_4 = i;
0067af3d                  
0067af41                  if (i_4 == 0)
0067af41                      break;
0067af23              }
0067af08          }
0067af06      }
0067af06      
0067af45  label_67af45:
0067af45      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_CacheByFileName.m_intrusiveTable);
0067af56      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>* ebx_1 = &this->m_CacheByDID.m_intrusiveTable;
0067af59      void* ecx_3 = &this->m_CacheByDID.m_intrusiveTable.m_buckets[this->m_CacheByDID.m_intrusiveTable.m_numBuckets];
0067af63      void* i_6;
0067af63      int32_t* m_firstInterestingBucket_1;
0067af63      
0067af63      if (ebx_1->m_firstInterestingBucket == ecx_3)
0067af63      {
0067af77      label_67af77:
0067af77          m_firstInterestingBucket_1 = nullptr;
0067af79          i_6 = nullptr;
0067af63      }
0067af63      else
0067af63      {
0067af65          while (true)
0067af65          {
0067af65              class HashTableData<unsigned long,TDBTypeEntry *>** m_firstInterestingBucket = ebx_1->m_firstInterestingBucket;
0067af65              
0067af6b              if (*(uint32_t*)m_firstInterestingBucket != 0)
0067af6b              {
0067af7d                  m_firstInterestingBucket_1 = ebx_1->m_firstInterestingBucket;
0067af80                  i_6 = *(uint32_t*)m_firstInterestingBucket_1;
0067af80                  break;
0067af6b              }
0067af6b              
0067af72              ebx_1->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0067af72              
0067af75              if (&m_firstInterestingBucket[1] == ecx_3)
0067af75                  goto label_67af77;
0067af65          }
0067af63      }
0067af63      
0067af84      int32_t* m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0067af88      void* i_3 = i_6;
0067af88      
0067af8a      if (i_6 != 0)
0067af8a      {
0067af90          while (true)
0067af90          {
0067af90              void* ebx_2 = *(uint32_t*)((char*)i_3 + 8);
0067afa6              int32_t ecx_5 = (*(uint32_t*)((char*)ebx_2 + 0x78) + (*(uint32_t*)((char*)ebx_2 + 0x80) << 2));
0067afab              void** eax_8;
0067afab              void* i_5;
0067afab              
0067afab              if (*(uint32_t*)((char*)ebx_2 + 0x7c) == ecx_5)
0067afab              {
0067afc2              label_67afc2:
0067afc2                  eax_8 = nullptr;
0067afc4                  i_5 = nullptr;
0067afab              }
0067afab              else
0067afab              {
0067afb0                  while (true)
0067afb0                  {
0067afb0                      int32_t* eax_6 = *(uint32_t*)((char*)ebx_2 + 0x7c);
0067afb0                      
0067afb6                      if (*(uint32_t*)eax_6 != 0)
0067afb6                      {
0067afc8                          eax_8 = *(uint32_t*)((char*)ebx_2 + 0x7c);
0067afcb                          i_5 = *(uint32_t*)eax_8;
0067afcb                          break;
0067afb6                      }
0067afb6                      
0067afbd                      *(uint32_t*)((char*)ebx_2 + 0x7c) = &eax_6[1];
0067afbd                      
0067afc0                      if (&eax_6[1] == ecx_5)
0067afc0                          goto label_67afc2;
0067afb0                  }
0067afab              }
0067afab              
0067afcf              void** esi = eax_8;
0067afcf              
0067afd1              if (i_5 != 0)
0067afd1              {
0067afd3                  while (true)
0067afd3                  {
0067afd3                      int32_t* ecx_7 = *(uint32_t*)((char*)i_5 + 8);
0067afd3                      
0067afd8                      if (ecx_7 != 0)
0067afd8                      {
0067afda                          int32_t temp1_1 = ecx_7[1];
0067afda                          ecx_7[1] -= 1;
0067afda                          
0067afdd                          if (temp1_1 == 1)
0067afe3                              **(uint32_t**)ecx_7(1);
0067afd8                      }
0067afd8                      
0067afe5                      i_5 = *(uint32_t*)((char*)i_5 + 4);
0067afe5                      
0067afea                      if (i_5 == 0)
0067afea                      {
0067b000                          void* i_1;
0067b000                          
0067b000                          do
0067b000                          {
0067aff5                              esi = &esi[1];
0067aff5                              
0067affa                              if (esi == (*(uint32_t*)((char*)ebx_2 + 0x78) + (*(uint32_t*)((char*)ebx_2 + 0x80) << 2)))
0067affa                                  goto label_67b00a;
0067affa                              
0067affc                              i_1 = *(uint32_t*)esi;
0067b000                          } while (i_1 == 0);
0067b000                          
0067b002                          i_5 = i_1;
0067b002                          
0067b006                          if (i_5 == 0)
0067b006                              break;
0067afea                      }
0067afd3                  }
0067afd1              }
0067afd1              
0067b00a          label_67b00a:
0067b00a              IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(((char*)ebx_2 + 0x18));
0067b00a              
0067b015              if (ebx_2 != 0)
0067b015              {
0067b019                  TDBTypeEntry::~TDBTypeEntry(ebx_2);
0067b01f                  operator delete(ebx_2);
0067b015              }
0067b015              
0067b027              i_3 = *(uint32_t*)((char*)i_3 + 4);
0067b027              
0067b02c              if (i_3 == 0)
0067b02c              {
0067b053                  void* i_2;
0067b053                  
0067b053                  do
0067b053                  {
0067b044                      int32_t* m_firstInterestingBucket_3 = &m_firstInterestingBucket_2[1];
0067b049                      m_firstInterestingBucket_2 = m_firstInterestingBucket_3;
0067b049                      
0067b04d                      if (m_firstInterestingBucket_3 == &ebx_1->m_buckets[ebx_1->m_numBuckets])
0067b04d                          goto label_67b065;
0067b04d                      
0067b04f                      i_2 = *(uint32_t*)m_firstInterestingBucket_3;
0067b053                  } while (i_2 == 0);
0067b053                  
0067b055                  i_3 = i_2;
0067b055                  
0067b059                  if (i_3 == 0)
0067b059                      break;
0067b02c              }
0067af90          }
0067af8a      }
0067af8a      
0067b065  label_67b065:
0067b065      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(ebx_1);
0067aee0  }

0067b072                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067b080  struct TDBTypeEntry* __thiscall TFile2IDTable::GetDBTypeEntry(class TFile2IDTable* this, uint32_t arg2)

0067b080  {
0067b084      class TFile2IDTable* this_1 = this;
0067b086      uint32_t ecx = arg2;
0067b09a      class TFile2IDTable* this_2 = this_1;
0067b09a      
0067b0a5      for (int32_t* i = this_1->m_CacheByDID.m_intrusiveTable.m_buckets[(COMBINE(0, ecx) % this_1->m_CacheByDID.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0067b0a5      {
0067b0a9          if (*(uint32_t*)i == ecx)
0067b0a9          {
0067b0d3              if (i != 0)
0067b0dc                  return i[2];
0067b0dc              
0067b0d3              break;
0067b0a9          }
0067b0a5      }
0067b0a5      
0067b0ba      void* eax_3 = operator new(0x88);
0067b0c4      char* result;
0067b0c4      
0067b0c4      if (eax_3 == 0)
0067b0df          result = nullptr;
0067b0c4      else
0067b0cd          result = TDBTypeEntry::TDBTypeEntry(eax_3);
0067b0cd      
0067b0ed      *(uint8_t*)result = 0;
0067b0f0      result[1] = 0;
0067b0f4      void* eax_6 = *(uint32_t*)(result + 4);
0067b0fd      char* result_1 = result;
0067b0fd      
0067b101      if (eax_6 != PStringBase<char>::null_string.m_charbuffer)
0067b101      {
0067b112          if ((InterlockedDecrement(((char*)eax_6 - 0x10)) == 0 && eax_6 != 0x14))
0067b11a              **(uint32_t**)((char*)eax_6 - 0x14)(1);
0067b11a          
0067b11c          class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
0067b127          *(uint32_t*)(result + 4) = m_charbuffer;
0067b12a          InterlockedIncrement(((char*)m_charbuffer - 0x10));
0067b12c          this_1 = this_2;
0067b101      }
0067b101      
0067b130      void* eax_8 = *(uint32_t*)(result + 8);
0067b130      
0067b139      if (eax_8 != PStringBase<char>::null_string.m_charbuffer)
0067b139      {
0067b14a          if ((InterlockedDecrement(((char*)eax_8 - 0x10)) == 0 && eax_8 != 0x14))
0067b152              **(uint32_t**)((char*)eax_8 - 0x14)(1);
0067b152          
0067b154          class PSRefBufferCharData<char>* m_charbuffer_1 = PStringBase<char>::null_string.m_charbuffer;
0067b160          *(uint32_t*)(result + 8) = m_charbuffer_1;
0067b163          InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
0067b165          this_1 = this_2;
0067b139      }
0067b139      
0067b176      *(uint32_t*)(result + 0x10) = 0;
0067b17d      HashTable<unsigned long,TDBTypeEntry *,1>::add(&this_1->m_CacheByDID, &arg2, &result_1);
0067b18b      return result;
0067b080  }

0067b18e                                            90 90                                                                ..

0067b190  void* __thiscall AutoGrowHashTable<unsigned long,TDBTypeEntry *>::`scalar deleting destructor'(class AutoGrowHashTable<unsigned long,TDBTypeEntry *>* this, uint32_t arg2)

0067b190  {
0067b199      this->vtable = 0x7fe150;
0067b19f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
0067b1a4      class HashTableData<unsigned long,TDBTypeEntry *>** m_buckets = this->m_intrusiveTable.m_buckets;
0067b194      this->m_intrusiveTable.vtable = 0x7fe140;
0067b194      
0067b1b2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0067b1b5          operator delete[](m_buckets);
0067b1b5      
0067b194      this->m_intrusiveTable.m_buckets = nullptr;
0067b194      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0067b194      this->m_intrusiveTable.m_numBuckets = 0;
0067b194      this->m_intrusiveTable.m_numElements = 0;
0067b194      
0067b1d0      if ((arg2 & 1) != 0)
0067b1d3          operator delete(this);
0067b1d3      
0067b1df      return this;
0067b190  }

0067b1e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0067b1f0  void __fastcall TFile2IDTable::~TFile2IDTable(class TFile2IDTable* this)

0067b1f0  {
0067b1f5      this->vtable = 0x7c5860;
0067b1fb      TFile2IDTable::Clear(this);
0067b205      this->m_CacheByDID.vtable = 0x7fe150;
0067b20c      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_CacheByDID.m_intrusiveTable);
0067b211      class HashTableData<unsigned long,TDBTypeEntry *>** m_buckets = this->m_CacheByDID.m_intrusiveTable.m_buckets;
0067b200      this->m_CacheByDID.m_intrusiveTable.vtable = 0x7fe140;
0067b200      
0067b21f      if (m_buckets != &this->m_CacheByDID.m_intrusiveTable.m_aInplaceBuckets)
0067b222          operator delete[](m_buckets);
0067b222      
0067b200      this->m_CacheByDID.m_intrusiveTable.m_buckets = nullptr;
0067b200      this->m_CacheByDID.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0067b200      this->m_CacheByDID.m_intrusiveTable.m_numBuckets = 0;
0067b200      this->m_CacheByDID.m_intrusiveTable.m_numElements = 0;
0067b23d      this->m_CacheByFileName.vtable = 0x7fe14c;
0067b244      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_CacheByFileName.m_intrusiveTable);
0067b249      class HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *>** m_buckets_1 = this->m_CacheByFileName.m_intrusiveTable.m_buckets;
0067b238      this->m_CacheByFileName.m_intrusiveTable.vtable = 0x7fe13c;
0067b238      
0067b257      if (m_buckets_1 != &this->m_CacheByFileName.m_intrusiveTable.m_aInplaceBuckets)
0067b25a          operator delete[](m_buckets_1);
0067b25a      
0067b238      this->m_CacheByFileName.m_intrusiveTable.m_buckets = nullptr;
0067b238      this->m_CacheByFileName.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0067b238      this->m_CacheByFileName.m_intrusiveTable.m_numBuckets = 0;
0067b238      this->m_CacheByFileName.m_intrusiveTable.m_numElements = 0;
0067b1f0  }

0067b272                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067b280  void __fastcall TFile2IDTable::TFile2IDTable(class TFile2IDTable* this, uint32_t arg2)

0067b280  {
0067b283      this->vtable = 0x7c5860;
0067b28e      this->m_CacheByFileName.vtable = 0x7fe14c;
0067b295      IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>(&this->m_CacheByFileName.m_intrusiveTable, 0);
0067b29a      this->m_CacheByFileName.vtable = 0x7fe14c;
0067b2a6      this->m_CacheByDID.vtable = 0x7fe150;
0067b2ad      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,TDBTypeEntry *> *,1>(&this->m_CacheByDID.m_intrusiveTable, 0);
0067b2b2      uint32_t eax = arg2;
0067b2b8      this->m_CacheByDID.vtable = 0x7fe150;
0067b2b8      
0067b2bf      if (eax != 0)
0067b2bf      {
0067b2c1          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0067b2c8          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0067b2d0          arg2 = eax;
0067b2e0          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0067b2e0          
0067b2eb          if (eax_2 == bucketSizesEnd_1)
0067b2ed              eax_2 -= 4;
0067b2ed          
0067b2f6          IntrusiveHashTable<CaseInsensitiveStringBase<PStringBase<char> >,HashTableData<CaseInsensitiveStringBase<PStringBase<char> >,TFileEntry *> *,1>::resize_internal(&this->m_CacheByFileName.m_intrusiveTable, *(uint32_t*)eax_2);
0067b2bf      }
0067b280  }

0067b301     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0067b310  void __thiscall DBFile2IDTable::Serialize(class DBFile2IDTable* this, class Archive* arg2)

0067b310  {
0067b316      class Archive* esi = arg2;
0067b316      
0067b324      if ((!(esi->m_flags) & 1) != 0)
0067b326          this->vtable->Clear();
0067b326      
0067b332      DBObj::Serialize(this, esi);
0067b337      char eax_1 = esi->m_flags;
0067b337      
0067b33c      if ((eax_1 & 1) != 0)
0067b33c      {
0067b342          uint32_t m_numElements = this->m_CacheByDID.m_intrusiveTable.m_numElements;
0067b34c          Archive::CheckAlignment(esi, 4);
0067b355          uint32_t* eax_2 = Archive::GetBytes(esi, 4);
0067b355          
0067b362          if ((eax_2 != 0 && (esi->m_flags & 1) != 0))
0067b364              *(uint32_t*)eax_2 = m_numElements;
0067b364          
0067b371          void __return;
0067b371          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_3 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_CacheByDID.m_intrusiveTable, &__return);
0067b376          class HashTableData<unsigned long,DBOCache *>* m_currElement = eax_3->m_currElement;
0067b37b          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_3->m_currHashTable;
0067b384          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_3->m_currBucket;
0067b388          class HashTableData<unsigned long,DBOCache *>* var_10_1 = m_currElement;
0067b388          
0067b38c          if (m_currElement != 0)
0067b38c          {
0067b398              while (true)
0067b398              {
0067b398                  class DBOCache* m_data = m_currElement->m_data;
0067b3a3                  Archive::CheckAlignment(esi, 4);
0067b3ac                  uint8_t* eax_4 = Archive::GetBytes(esi, 4);
0067b3ac                  
0067b3b3                  if (eax_4 != 0)
0067b3b3                  {
0067b3b9                      if ((esi->m_flags & 1) == 0)
0067b3c3                          m_currElement->m_hashKey = *(uint32_t*)eax_4;
0067b3b9                      else
0067b3bd                          *(uint32_t*)eax_4 = m_currElement->m_hashKey;
0067b3b3                  }
0067b3b3                  
0067b3c9                  PStringBase<char>::Serialize(&m_data->m_ObjTable.m_intrusiveTable.m_aInplaceBuckets, esi);
0067b3ce                  class HashTableData<unsigned long,float>* ebp_1 = m_data->m_fidelityTable.m_intrusiveTable.m_aInplaceBuckets[0];
0067b3d8                  Archive::CheckAlignment(esi, 4);
0067b3e1                  class HashTableData<unsigned long,float>** eax_5 = Archive::GetBytes(esi, 4);
0067b3e1                  
0067b3ee                  if ((eax_5 != 0 && (esi->m_flags & 1) != 0))
0067b3f0                      *(uint32_t*)eax_5 = ebp_1;
0067b3f0                  
0067b3fb                  int32_t ecx_12 = (m_data->m_dbtype + (m_data->m_fidelityTable.m_intrusiveTable.vtable << 2));
0067b401                  struct HashTable<unsigned long,float,0>::VTable* vtable_1;
0067b401                  void* (__thiscall* __vecDelDtor_1)(class HashTable<unsigned long,float,0>* this, uint32_t);
0067b401                  
0067b401                  if (m_data->m_fidelityTable.vtable == ecx_12)
0067b401                  {
0067b415                  label_67b415:
0067b415                      vtable_1 = nullptr;
0067b417                      __vecDelDtor_1 = nullptr;
0067b401                  }
0067b401                  else
0067b401                  {
0067b403                      while (true)
0067b403                      {
0067b403                          struct HashTable<unsigned long,float,0>::VTable* vtable = m_data->m_fidelityTable.vtable;
0067b403                          
0067b409                          if (vtable->__vecDelDtor != 0)
0067b409                          {
0067b41b                              vtable_1 = m_data->m_fidelityTable.vtable;
0067b41e                              __vecDelDtor_1 = vtable_1->__vecDelDtor;
0067b41e                              break;
0067b409                          }
0067b409                          
0067b410                          m_data->m_fidelityTable.vtable = &vtable[1];
0067b410                          
0067b413                          if (&vtable[1] == ecx_12)
0067b413                              goto label_67b415;
0067b403                      }
0067b401                  }
0067b401                  
0067b422                  if (__vecDelDtor_1 != 0)
0067b422                  {
0067b428                      while (true)
0067b428                      {
0067b428                          void* edi_1 = *(uint32_t*)((char*)__vecDelDtor_1 + 8);
0067b432                          arg2 = *(uint32_t*)((char*)edi_1 + 0x10);
0067b436                          Archive::CheckAlignment(esi, 4);
0067b43f                          uint8_t* eax_8 = Archive::GetBytes(esi, 4);
0067b43f                          
0067b44c                          if ((eax_8 != 0 && (esi->m_flags & 1) != 0))
0067b452                              *(uint32_t*)eax_8 = arg2;
0067b452                          
0067b454                          class Archive* edi_2 = *(uint32_t*)((char*)edi_1 + 0xc);
0067b457                          arg2 = edi_2;
0067b45f                          InterlockedIncrement(&edi_2[0]);
0067b46a                          PStringBase<char>::Serialize(&arg2, esi);
0067b473                          void* __offset(Archive, -0x14) edi_5 = ((char*)arg2 - 0x14);
0067b473                          
0067b486                          if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
0067b48e                              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
0067b48e                          
0067b490                          __vecDelDtor_1 = *(uint32_t*)((char*)__vecDelDtor_1 + 4);
0067b490                          
0067b495                          if (__vecDelDtor_1 == 0)
0067b495                          {
0067b4b2                              void* (__thiscall* __vecDelDtor)(class HashTable<unsigned long,float,0>* this, uint32_t);
0067b4b2                              
0067b4b2                              do
0067b4b2                              {
0067b4a7                                  vtable_1 = &vtable_1[1];
0067b4a7                                  
0067b4ac                                  if (vtable_1 == (m_data->m_dbtype + (m_data->m_fidelityTable.m_intrusiveTable.vtable << 2)))
0067b4ac                                      goto label_67b4be;
0067b4ac                                  
0067b4ae                                  __vecDelDtor = vtable_1->__vecDelDtor;
0067b4b2                              } while (__vecDelDtor == 0);
0067b4b2                              
0067b4b4                              __vecDelDtor_1 = __vecDelDtor;
0067b4b4                              
0067b4b8                              if (__vecDelDtor_1 == 0)
0067b4b8                                  break;
0067b495                          }
0067b428                      }
0067b428                      
0067b4be                  label_67b4be:
0067b4be                      m_currElement = var_10_1;
0067b422                  }
0067b422                  
0067b4c2                  class HashTableData<unsigned long,DBOCache *>* m_hashNext = m_currElement->m_hashNext;
0067b4c7                  var_10_1 = m_hashNext;
0067b4c7                  
0067b4cb                  if (m_hashNext == 0)
0067b4cb                  {
0067b4f7                      class HashTableData<unsigned long,DBOCache *>* i;
0067b4f7                      
0067b4f7                      do
0067b4f7                      {
0067b4e4                          class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = &m_currBucket[1];
0067b4e9                          m_currBucket = m_currBucket_1;
0067b4e9                          
0067b4ed                          if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0067b684                              return;
0067b684                          
0067b4f3                          i = *(uint32_t*)m_currBucket_1;
0067b4f7                      } while (i == 0);
0067b4f7                      
0067b4fd                      var_10_1 = i;
0067b4fd                      
0067b501                      if (i == 0)
0067b50e                          return;
0067b4cb                  }
0067b4cb                  
0067b394                  m_currElement = var_10_1;
0067b398              }
0067b38c          }
0067b33c      }
0067b33c      else if ((!(eax_1) & 1) != 0)
0067b515      {
0067b51f          Archive::CheckAlignment(esi, 4);
0067b528          uint8_t* eax_16 = Archive::GetBytes(esi, 4);
0067b52f          class Archive* i_3;
0067b52f          
0067b52f          if (eax_16 == 0)
0067b543              i_3 = arg2;
0067b52f          else if ((esi->m_flags & 1) == 0)
0067b53f              i_3 = *(uint32_t*)eax_16;
0067b535          else
0067b535          {
0067b537              i_3 = arg2;
0067b53b              *(uint32_t*)eax_16 = i_3;
0067b535          }
0067b535          
0067b549          if (i_3 > 0)
0067b549          {
0067b558              class Archive* i_2 = i_3;
0067b677              class Archive* i_1;
0067b677              
0067b677              do
0067b677              {
0067b564                  Archive::CheckAlignment(esi, 4);
0067b56d                  uint8_t* eax_17 = Archive::GetBytes(esi, 4);
0067b574                  int32_t var_2c;
0067b574                  
0067b574                  if (eax_17 != 0)
0067b574                  {
0067b57a                      if ((esi->m_flags & 1) == 0)
0067b586                          var_2c = *(uint32_t*)eax_17;
0067b57a                      else
0067b580                          *(uint32_t*)eax_17 = var_2c;
0067b574                  }
0067b574                  
0067b59b                  PStringBase<char>::Serialize((this->vtable->GetDBTypeEntry(var_2c) + 0xc), esi);
0067b5a4                  Archive::CheckAlignment(esi, 4);
0067b5ad                  uint8_t* eax_20 = Archive::GetBytes(esi, 4);
0067b5b4                  int32_t j_2;
0067b5b4                  
0067b5b4                  if (eax_20 != 0)
0067b5b4                  {
0067b5ba                      if ((esi->m_flags & 1) == 0)
0067b5c6                          j_2 = *(uint32_t*)eax_20;
0067b5ba                      else
0067b5c0                          *(uint32_t*)eax_20 = j_2;
0067b5b4                  }
0067b5b4                  
0067b5d0                  if (j_2 > 0)
0067b5d0                  {
0067b5d6                      int32_t j_1 = j_2;
0067b66d                      int32_t j;
0067b66d                      
0067b66d                      do
0067b66d                      {
0067b5e0                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0067b5e5                          arg2 = PStringBase<char>::s_NullBuffer_1;
0067b5ed                          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0067b5f3                          Archive::CheckAlignment(esi, 4);
0067b5fc                          uint8_t* eax_24 = Archive::GetBytes(esi, 4);
0067b603                          int32_t var_24;
0067b603                          
0067b603                          if (eax_24 != 0)
0067b603                          {
0067b609                              if ((esi->m_flags & 1) == 0)
0067b615                                  var_24 = *(uint32_t*)eax_24;
0067b609                              else
0067b60f                                  *(uint32_t*)eax_24 = var_24;
0067b603                          }
0067b603                          
0067b61e                          PStringBase<char>::Serialize(&arg2, esi);
0067b62b                          class Archive* edx_11 = arg2;
0067b631                          int32_t var_48_1 = var_24;
0067b63e                          InterlockedIncrement(&arg2[0]);
0067b555                          this->vtable->AssignDIDToFileName(edx_11, var_24, var_2c);
0067b64c                          void* __offset(Archive, -0x14) edi_8 = ((char*)arg2 - 0x14);
0067b64c                          
0067b65f                          if ((InterlockedDecrement(((char*)edi_8 + 4)) == 0 && edi_8 != 0))
0067b667                              *(uint32_t*)*(int32_t*)((char*)ADJ(edi_8) + -0x14)(1);
0067b667                          
0067b669                          j = j_1;
0067b669                          j_1 -= 1;
0067b66d                      } while (j != 1);
0067b5d0                  }
0067b5d0                  
0067b673                  i_1 = i_2;
0067b673                  i_2 -= 1;
0067b677              } while (i_1 != 1);
0067b549          }
0067b515      }
0067b310  }

0067b687                       90 90 90 90 90 90 90 90 90                                                         .........

0067b690  uint8_t StringTableMetaLanguage::IsEscapeChar(wchar16 arg1)

0067b690  {
0067b690      int32_t eax_3 = arg1;
0067b690      
0067b697      if ((eax_3 != 0 && wcschr(u"[]!{}#\|^$", eax_3) != 0))
0067b6b1          return 1;
0067b6b1      
0067b6b4      return 0;
0067b690  }

0067b6b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0067b6c0  wchar16 StringTableMetaLanguage::GetEscapedChar(wchar16 arg1)

0067b6c0  {
0067b6c0      int32_t ecx = arg1;
0067b6c5      uint32_t esi = ((uint32_t)ecx);
0067b6ce      uint32_t eax_1;
0067b6ce      
0067b6ce      if ((esi - 9) <= 0x19)
0067b6ce          switch (esi)
0067b6ce          {
0067b6f0              case 9:
0067b6f0              {
0067b6f0                  eax_1 = 0x74;
0067b6f5                  return 0x74;
0067b6f0                  break;
0067b6f0              }
0067b6e4              case 0xa:
0067b6e4              {
0067b6e4                  eax_1 = 0x6e;
0067b6e9                  return 0x6e;
0067b6e4                  break;
0067b6e4              }
0067b6ea              case 0xd:
0067b6ea              {
0067b6ea                  eax_1 = 0x72;
0067b6ef                  return 0x72;
0067b6ea                  break;
0067b6ea              }
0067b6de              case 0x22:
0067b6de              {
0067b6de                  eax_1 = 0x71;
0067b6e3                  return 0x71;
0067b6de                  break;
0067b6de              }
0067b6ce          }
0067b6ce      
0067b6f9      if ((ecx != 0 && wcschr(u"[]!{}#\|^$", ecx) != 0))
0067b711          return esi;
0067b711      
0067b715      return 0;
0067b6c0  }

0067b716                                                                    8b ff                                                ..
0067b718  uint32_t jump_table_67b718[0x5] = 
0067b718  {
0067b718      [0x0] =  0x0067b6f0
0067b71c      [0x1] =  0x0067b6e4
0067b720      [0x2] =  0x0067b6ea
0067b724      [0x3] =  0x0067b6de
0067b728      [0x4] =  0x0067b6f6
0067b72c  }
0067b72c  uint8_t lookup_table_67b72c[0x1a] = 
0067b72c  {
0067b72c      [0x00] =  0x00
0067b72d      [0x01] =  0x01
0067b72e      [0x02] =  0x04
0067b72f      [0x03] =  0x04
0067b730      [0x04] =  0x02
0067b731      [0x05] =  0x04
0067b732      [0x06] =  0x04
0067b733      [0x07] =  0x04
0067b734      [0x08] =  0x04
0067b735      [0x09] =  0x04
0067b736      [0x0a] =  0x04
0067b737      [0x0b] =  0x04
0067b738      [0x0c] =  0x04
0067b739      [0x0d] =  0x04
0067b73a      [0x0e] =  0x04
0067b73b      [0x0f] =  0x04
0067b73c      [0x10] =  0x04
0067b73d      [0x11] =  0x04
0067b73e      [0x12] =  0x04
0067b73f      [0x13] =  0x04
0067b740      [0x14] =  0x04
0067b741      [0x15] =  0x04
0067b742      [0x16] =  0x04
0067b743      [0x17] =  0x04
0067b744      [0x18] =  0x04
0067b745      [0x19] =  0x03
0067b746  }

0067b746                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0067b750  wchar16 StringTableMetaLanguage::GetUnEscapedChar(wchar16 arg1)

0067b750  {
0067b750      int32_t ecx = arg1;
0067b755      uint32_t esi = ((uint32_t)ecx);
0067b75e      int32_t eax;
0067b75e      
0067b75e      if ((esi - 0x6e) <= 6)
0067b75e          switch (esi)
0067b75e          {
0067b76d              case 0x6e:
0067b76d              {
0067b76d                  eax = 0xa;
0067b772                  return 0xa;
0067b76d                  break;
0067b76d              }
0067b767              case 0x71:
0067b767              {
0067b767                  eax = 0x22;
0067b76c                  return 0x22;
0067b767                  break;
0067b767              }
0067b773              case 0x72:
0067b773              {
0067b773                  eax = 0xd;
0067b778                  return 0xd;
0067b773                  break;
0067b773              }
0067b779              case 0x74:
0067b779              {
0067b779                  eax = 9;
0067b77e                  return 9;
0067b779                  break;
0067b779              }
0067b75e          }
0067b75e      
0067b782      if ((ecx != 0 && wcschr(u"[]!{}#\|^$", ecx) != 0))
0067b79a          return esi;
0067b79a      
0067b79e      return 0;
0067b750  }

0067b79f                                                                                               90                                 .
0067b7a0  uint32_t jump_table_67b7a0[0x7] = 
0067b7a0  {
0067b7a0      [0x0] =  0x0067b76d
0067b7a4      [0x1] =  0x0067b77f
0067b7a8      [0x2] =  0x0067b77f
0067b7ac      [0x3] =  0x0067b767
0067b7b0      [0x4] =  0x0067b773
0067b7b4      [0x5] =  0x0067b77f
0067b7b8      [0x6] =  0x0067b779
0067b7bc  }

0067b7bc                                                                                      90 90 90 90                              ....

0067b7c0  uint8_t StringTableMetaLanguage::IsNumberSingular(int32_t arg1)

0067b7c0  {
0067b7c0      class CLanguageInfoInterface* CLanguageInfoInterface::m_instance_1 = CLanguageInfoInterface::m_instance;
0067b7c0      
0067b7cd      if ((CLanguageInfoInterface::m_instance_1 != 0 && CLanguageInfoInterface::m_instance_1->m_pLanguageInfo != 0))
0067b7d9          return CLanguageInfoInterface::IsNumberSingular(CLanguageInfoInterface::m_instance_1, arg1);
0067b7d9      
0067b7e6      return arg1 == 1;
0067b7c0  }

0067b7e7                       90 90 90 90 90 90 90 90 90                                                         .........

0067b7f0  uint8_t PSUtils::TrimExcessSpaces(class PStringBase<unsigned short>* arg1)

0067b7f0  {
0067b7f3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067b7fb      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0067b804      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0067b80a      class PStringBase<unsigned short>* edi = arg1;
0067b810      int32_t esi = edi->m_charbuffer->m_data[0x7ffffffffffffffe];
0067b813      int32_t esi_1 = (esi - 1);
0067b814      char var_d = 0;
0067b819      int32_t var_4 = esi_1;
0067b81d      int32_t ebx;
0067b81d      ebx = 0;
0067b81f      int32_t ebp = 0;
0067b81f      
0067b824      if (esi != 1)
0067b824      {
0067b82a          char ebx_1 = ebx;
0067b82a          
0067b943          do
0067b943          {
0067b830              class PSRefBufferCharData<unsigned short>* m_charbuffer = edi->m_charbuffer;
0067b832              int32_t ecx_1 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067b837              void* edx_1 = &m_charbuffer->m_data[(ecx_1 - 1)];
0067b837              
0067b83b              if (ebp < ecx_1)
0067b83d                  edx_1 = &m_charbuffer->m_data[ebp];
0067b83d              
0067b844              void* edx_2;
0067b844              
0067b844              if (*(uint16_t*)edx_1 != 0x20)
0067b844              {
0067b848                  edx_2 = &m_charbuffer->m_data[(ecx_1 - 1)];
0067b848                  
0067b84c                  if (ebp < ecx_1)
0067b84e                      edx_2 = &m_charbuffer->m_data[ebp];
0067b844              }
0067b844              
0067b855              uint32_t var_8;
0067b855              
0067b855              if ((*(uint16_t*)edx_1 == 0x20 || *(uint16_t*)edx_2 == 9))
0067b855              {
0067b886                  if (ebx_1 != 0)
0067b939                      var_d = 1;
0067b886                  else
0067b886                  {
0067b88e                      void* eax_3;
0067b88e                      
0067b88e                      if (ebp < ecx_1)
0067b896                          eax_3 = &m_charbuffer->m_data[ebp];
0067b88e                      else
0067b890                          eax_3 = &m_charbuffer->m_data[(ecx_1 - 1)];
0067b890                      
0067b899                      uint32_t eax_4 = ((uint32_t)*(uint16_t*)eax_3);
0067b89f                      var_8 = eax_4;
0067b89f                      
0067b8a3                      if (eax_4 != 0)
0067b8a3                      {
0067b8a9                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0067b8b1                          int32_t edi_1 = PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe];
0067b8b1                          
0067b8bc                          if ((*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x10) != 1 || (edi_1 + 1) > *(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0xc)))
0067b8bc                          {
0067b8d7                              PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_2, edi_1);
0067b8e5                              wcscpy(PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::s_NullBuffer_3);
0067b8e5                              
0067b8fe                              if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_3 != 0x14))
0067b906                                  *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x14)(1);
0067b8bc                          }
0067b8bc                          else
0067b8bc                          {
0067b8be                              *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 4) = (edi_1 + 1);
0067b8c5                              *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 8) = 0xffffffff;
0067b8bc                          }
0067b8bc                          
0067b918                          wcsncpy(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[(edi_1 - 1)], &var_8, 1);
0067b91e                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0067b925                          edi = arg1;
0067b929                          esi_1 = var_4;
0067b930                          PStringBase<unsigned short>::s_NullBuffer_4->m_data[(PStringBase<unsigned short>::s_NullBuffer_4->m_data[0x7ffffffffffffffe] - 1)] = 0;
0067b8a3                      }
0067b886                  }
0067b886                  
0067b93e                  ebx_1 = 1;
0067b855              }
0067b855              else
0067b855              {
0067b859                  void* eax_2;
0067b859                  
0067b859                  if (ebp < ecx_1)
0067b861                      eax_2 = &m_charbuffer->m_data[ebp];
0067b859                  else
0067b85b                      eax_2 = &m_charbuffer->m_data[(ecx_1 - 1)];
0067b85b                  
0067b866                  uint32_t ecx_2;
0067b866                  ecx_2 = *(uint16_t*)eax_2;
0067b870                  var_8 = ecx_2;
0067b878                  PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_2, &var_8, 1);
0067b87d                  ebx_1 = 0;
0067b855              }
0067b940              ebp += 1;
0067b943          } while (ebp < esi_1);
0067b824      }
0067b824      
0067b949      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = edi->m_charbuffer;
0067b949      
0067b94f      if (m_charbuffer_1 != PStringBase<unsigned short>::s_NullBuffer_2)
0067b94f      {
0067b964          if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
0067b96c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0067b96c          
0067b96e          class PStringBase<unsigned short> PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_2;
0067b972          edi->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_5;
0067b978          InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_5 - 0x10));
0067b94f      }
0067b94f      
0067b982      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_5 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0067b982      
0067b995      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0067b99d          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0067b99d      
0067b99f      int32_t eax_11;
0067b99f      eax_11 = var_d;
0067b9aa      return eax_11;
0067b7f0  }

0067b9ab                                   90 90 90 90 90                                                             .....

0067b9b0  void StringTableMetaLanguage::TrimExcessSpaces(class PStringBase<unsigned short>* arg1)

0067b9b0  {
0067b9b1      int32_t ecx;
0067b9b1      int32_t var_8 = ecx;
0067b9b2      class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<unsigned short>::whitespace_string.m_charbuffer;
0067b9c2      InterlockedIncrement(((char*)m_charbuffer - 0x10));
0067b9d2      PStringBase<unsigned short>::trim(arg1, 1, 0, m_charbuffer);
0067b9d8      PSUtils::TrimExcessSpaces(arg1);
0067b9b0  }

0067b9e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0067b9f0  class PStringBase<unsigned short>* StringTableMetaLanguage::CapitalizeFirstLetter(class PStringBase<unsigned short>* __return, class PStringBase<unsigned short> const* arg2)

0067b9f0  {
0067b9f4      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0067b9f8      arg2 = m_charbuffer;
0067ba01      InterlockedIncrement(&m_charbuffer->m_data[-8]);
0067ba07      class PStringBase<unsigned short>* eax_1 = arg2;
0067ba0b      int32_t m_charbuffer_3 = eax_1->m_charbuffer;
0067ba0f      uint32_t edi = 0;
0067ba0f      
0067ba14      if (m_charbuffer_3 != 1)
0067ba14      {
0067ba21          while (true)
0067ba21          {
0067ba21              int32_t m_charbuffer_1 = eax_1->m_charbuffer;
0067ba26              void* eax_2;
0067ba26              
0067ba26              if (edi < m_charbuffer_1)
0067ba2e                  eax_2 = ((char*)eax_1 + (edi << 1));
0067ba26              else
0067ba28                  eax_2 = (((char*)eax_1 + (m_charbuffer_1 << 1)) - 2);
0067ba28              
0067ba33              int32_t esi_1;
0067ba33              esi_1 = *(uint16_t*)eax_2;
0067ba37              int32_t eax_3 = iswspace(esi_1);
0067ba3e              int32_t eax_4;
0067ba3e              
0067ba3e              if (eax_3 == 0)
0067ba41                  eax_4 = iswpunct(esi_1);
0067ba41              
0067ba6c              if (((((eax_3 != 0 || eax_4 != 0) || esi_1 == 0xbf) || esi_1 == 0xa1) && (esi_1 != 0x5c && (esi_1 != 0x2f && esi_1 != 0x40))))
0067ba6c              {
0067ba6e                  edi += 1;
0067ba6e                  
0067ba71                  if (edi >= (m_charbuffer_3 - 1))
0067ba71                      break;
0067ba71                  
0067ba73                  eax_1 = arg2;
0067ba77                  continue;
0067ba6c              }
0067ba6c              
0067ba7b              if (edi >= (m_charbuffer_3 - 1))
0067ba7b                  break;
0067ba7b              
0067ba7d              class PStringBase<unsigned short>* eax_5 = arg2;
0067ba81              int32_t m_charbuffer_2 = eax_5->m_charbuffer;
0067ba86              void* eax_6;
0067ba86              
0067ba86              if (edi < m_charbuffer_2)
0067ba8e                  eax_6 = ((char*)eax_5 + (edi << 1));
0067ba86              else
0067ba88                  eax_6 = (((char*)eax_5 + (m_charbuffer_2 << 1)) - 2);
0067ba88              
0067ba93              int32_t ecx_1;
0067ba93              ecx_1 = *(uint16_t*)eax_6;
0067baa6              PStringBase<unsigned short>::SetAtIndex(&arg2, edi, towupper(ecx_1));
0067baa6              break;
0067ba21          }
0067ba21          
0067baab          eax_1 = arg2;
0067ba14      }
0067ba14      
0067bab0      class PStringBase<unsigned short>** result = __return;
0067bab4      *(uint32_t*)result = eax_1;
0067baba      InterlockedIncrement(&eax_1[-4]);
0067bac4      void* __offset(PStringBase<unsigned short>, -0x14) esi_3 = &arg2[-5];
0067bac4      
0067bad7      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0067badf          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0067badf      
0067bae6      return result;
0067b9f0  }

0067bae7                       90 90 90 90 90 90 90 90 90                                                         .........

0067baf0  class PStringBase<unsigned short>* StringTableMetaLanguage::StripMetaLetters(class PStringBase<unsigned short>* __return, class PStringBase<unsigned short> const* arg2)

0067baf0  {
0067baf7      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0067bb00      arg2 = m_charbuffer;
0067bb09      InterlockedIncrement(&m_charbuffer->m_data[-8]);
0067bb14      wchar16* eax_2 = PSUtils::wcschr_skipescapes(arg2, 0x5b, 0x5c);
0067bb14      
0067bb1e      if (eax_2 != 0)
0067bb1e      {
0067bb24          int32_t eax_4 = (((char*)eax_2 - arg2) >> 1);
0067bb2c          int32_t var_10 = 0x79449c;
0067bb34          class PStringBase<unsigned short> const** var_4_1 = &arg2;
0067bb38          int32_t var_8_1 = 0;
0067bb40          int32_t var_c_1 = 0;
0067bb40          
0067bb48          if (eax_4 > 0)
0067bb4f              PStringBaseIter_Common<unsigned short>::Next(&var_10, eax_4);
0067bb4f          
0067bb5d          int32_t var_1c_2 = PStringBaseIter<unsigned short>::Truncate(&var_10);
0067bb5e          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = PStringBase<unsigned short>::whitespace_string.m_charbuffer;
0067bb6e          InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
0067bb78          PStringBase<unsigned short>::trim(&arg2, 0, 1, m_charbuffer_1);
0067bb1e      }
0067bb1e      
0067bb7d      class PStringBase<unsigned short>* eax_5 = arg2;
0067bb85      __return->m_charbuffer = eax_5;
0067bb8b      InterlockedIncrement(&eax_5[-4]);
0067bb91      void* __offset(PStringBase<unsigned short>, -0x14) esi_1 = &arg2[-5];
0067bb91      
0067bba4      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0067bbac          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0067bbac      
0067bbb5      return __return;
0067baf0  }

0067bbb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0067bbc0  class PStringBase<unsigned short>* StringTableMetaLanguage::EscapeString(class PStringBase<unsigned short>* __return, class PStringBase<unsigned short> const* arg2)

0067bbc0  {
0067bbc3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067bbc9      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0067bbd2      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0067bbd8      class PStringBase<unsigned short>* edi = arg2;
0067bbdc      class PSRefBufferCharData<unsigned short>* m_charbuffer = edi->m_charbuffer;
0067bbde      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0067bbe1      int32_t i = 0;
0067bbe8      int32_t i_1 = 0;
0067bbe8      
0067bbec      if ((ecx - 1) > 0)
0067bbec      {
0067bbf2          int32_t ebx;
0067bbf2          int32_t var_18_1 = ebx;
0067bbf2          
0067bd6f          do
0067bd6f          {
0067bc02              void* eax_1;
0067bc02              
0067bc02              if (i < ecx)
0067bc0a                  eax_1 = &m_charbuffer->m_data[i];
0067bc02              else
0067bc04                  eax_1 = &m_charbuffer->m_data[(ecx - 1)];
0067bc04              
0067bc11              uint32_t eax_3 = StringTableMetaLanguage::GetEscapedChar(*(uint16_t*)eax_1);
0067bc1e              uint32_t var_4;
0067bc1e              
0067bc1e              if (eax_3 != 0)
0067bc1e              {
0067bc24                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0067bc28                  var_4 = 0x5c;
0067bc34                  int32_t edi_1 = PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe];
0067bc34                  
0067bc3f                  if ((*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x10) != 1 || (edi_1 + 1) > *(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0xc)))
0067bc3f                  {
0067bc5a                      PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_2, edi_1);
0067bc68                      wcscpy(PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::s_NullBuffer_3);
0067bc68                      
0067bc81                      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_3 != 0x14))
0067bc89                          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x14)(1);
0067bc3f                  }
0067bc3f                  else
0067bc3f                  {
0067bc41                      *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 4) = (edi_1 + 1);
0067bc48                      *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 8) = 0xffffffff;
0067bc3f                  }
0067bc3f                  
0067bc9b                  wcsncpy(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[(edi_1 - 1)], &var_4, 1);
0067bc9d                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0067bca4                  PStringBase<unsigned short>::s_NullBuffer_4->m_data[(PStringBase<unsigned short>::s_NullBuffer_4->m_data[0x7ffffffffffffffe] - 1)] = 0;
0067bcae                  var_4 = eax_3;
0067bcb2                  goto label_67bcd6;
0067bc1e              }
0067bc1e              
0067bcb4              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = edi->m_charbuffer;
0067bcb6              int32_t ecx_9 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0067bcbb              void* eax_6;
0067bcbb              
0067bcbb              if (i < ecx_9)
0067bcc3                  eax_6 = &m_charbuffer_1->m_data[i];
0067bcbb              else
0067bcbd                  eax_6 = &m_charbuffer_1->m_data[(ecx_9 - 1)];
0067bcbd              
0067bcc6              uint32_t eax_7 = ((uint32_t)*(uint16_t*)eax_6);
0067bccc              var_4 = eax_7;
0067bccc              
0067bcd0              if (eax_7 != 0)
0067bcd0              {
0067bcd6              label_67bcd6:
0067bcd6                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_2;
0067bcde                  int32_t edi_2 = PStringBase<unsigned short>::s_NullBuffer_5->m_data[0x7ffffffffffffffe];
0067bcde                  
0067bce9                  if ((*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_5 + -0x10) != 1 || (edi_2 + 1) > *(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_5 + -0xc)))
0067bce9                  {
0067bd04                      PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_2, edi_2);
0067bd12                      wcscpy(PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::s_NullBuffer_5);
0067bd12                      
0067bd2b                      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_5 != 0x14))
0067bd33                          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_5 + -0x14)(1);
0067bce9                  }
0067bce9                  else
0067bce9                  {
0067bceb                      *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_5 - 4) = (edi_2 + 1);
0067bcf2                      *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 8) = 0xffffffff;
0067bce9                  }
0067bce9                  
0067bd45                  wcsncpy(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[(edi_2 - 1)], &var_4, 1);
0067bd47                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_2;
0067bd4e                  i = i_1;
0067bd55                  PStringBase<unsigned short>::s_NullBuffer_6->m_data[(PStringBase<unsigned short>::s_NullBuffer_6->m_data[0x7ffffffffffffffe] - 1)] = 0;
0067bcd0              }
0067bcd0              
0067bd5c              edi = arg2;
0067bd60              m_charbuffer = edi->m_charbuffer;
0067bd62              ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0067bd65              i += 1;
0067bd6b              i_1 = i;
0067bd6f          } while (i < (ecx - 1));
0067bbec      }
0067bbec      
0067bd77      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer_2;
0067bd7f      __return->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_7;
0067bd85      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_7->m_data[-8]);
0067bd8f      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0067bd8f      
0067bda2      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0067bdaa          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0067bdaa      
0067bdb3      return __return;
0067bbc0  }

0067bdb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0067bdc0  class PStringBase<unsigned short>* StringTableMetaLanguage::UnescapeString(class PStringBase<unsigned short>* __return, class PStringBase<unsigned short> const* arg2)

0067bdc0  {
0067bdc3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067bdca      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0067bdd3      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0067bdd9      class PStringBase<unsigned short>* ebp = arg2;
0067bddd      class PSRefBufferCharData<unsigned short>* m_charbuffer = ebp->m_charbuffer;
0067bde0      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0067bde6      int32_t i = 0;
0067bde6      
0067bdea      if ((ecx - 1) > 0)
0067bdea      {
0067bdf6          arg2 = 1;
0067bdfa          class PStringBase<unsigned short>* ebx_1 = 1;
0067bdfa          
0067bf07          do
0067bf07          {
0067be02              void* eax_1;
0067be02              
0067be02              if (ebx_1 < ecx)
0067be0a                  eax_1 = &m_charbuffer->m_data[(1 + i)];
0067be02              else
0067be04                  eax_1 = &m_charbuffer->m_data[(ecx - 1)];
0067be04              
0067be12              class PStringBase<unsigned short>* eax_3 = StringTableMetaLanguage::GetUnEscapedChar(*(uint16_t*)eax_1);
0067be17              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ebp->m_charbuffer;
0067be1a              int32_t edx_1 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0067be22              void* esi_1 = &m_charbuffer_1->m_data[(edx_1 - 1)];
0067be22              
0067be26              if (i < edx_1)
0067be28                  esi_1 = &m_charbuffer_1->m_data[i];
0067be28              
0067be34              if ((*(uint16_t*)esi_1 != 0x5c || eax_3 == 0))
0067be34              {
0067be53                  void* eax_4 = &m_charbuffer_1->m_data[(edx_1 - 1)];
0067be53                  
0067be57                  if (i < edx_1)
0067be59                      eax_4 = &m_charbuffer_1->m_data[i];
0067be59                  
0067be5c                  uint32_t eax_5 = ((uint32_t)*(uint16_t*)eax_4);
0067be62                  uint32_t var_4 = eax_5;
0067be62                  
0067be66                  if (eax_5 != 0)
0067be66                  {
0067be6c                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0067be74                      int32_t ebx_2 = PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe];
0067be74                      
0067be7f                      if ((*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x10) != 1 || (ebx_2 + 1) > *(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0xc)))
0067be7f                      {
0067be9a                          PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_2, ebx_2);
0067bea8                          wcscpy(PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::s_NullBuffer_3);
0067bea8                          
0067bec1                          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_3 != 0x14))
0067bec9                              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x14)(1);
0067be7f                      }
0067be7f                      else
0067be7f                      {
0067be81                          *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 4) = (ebx_2 + 1);
0067be88                          *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 8) = 0xffffffff;
0067be7f                      }
0067be7f                      
0067bedb                      wcsncpy(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[(ebx_2 - 1)], &var_4, 1);
0067bee1                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0067bee8                      ebx_1 = arg2;
0067beef                      PStringBase<unsigned short>::s_NullBuffer_4->m_data[(PStringBase<unsigned short>::s_NullBuffer_4->m_data[0x7ffffffffffffffe] - 1)] = 0;
0067be66                  }
0067be34              }
0067be34              else
0067be34              {
0067be3d                  i += 1;
0067be42                  ebx_1 = (&ebx_1->m_charbuffer + 1);
0067be43                  arg2 = eax_3;
0067be47                  PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_2, &arg2, 1);
0067be34              }
0067be34              
0067bef6              m_charbuffer = ebp->m_charbuffer;
0067bef9              ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0067befc              i += 1;
0067befd              ebx_1 = (&ebx_1->m_charbuffer + 1);
0067bf03              arg2 = ebx_1;
0067bf07          } while (i < (ecx - 1));
0067bdea      }
0067bdea      
0067bf0e      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_2;
0067bf16      __return->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_5;
0067bf1c      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
0067bf26      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_4 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0067bf26      
0067bf39      if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0067bf41          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0067bf41      
0067bf4b      return __return;
0067bdc0  }

0067bf4c                                      90 90 90 90                                                              ....

0067bf50  uint8_t StringTableMetaLanguage::GetMaleMetaLetters(class PStringBase<unsigned short>* arg1)

0067bf50  {
0067bf50      class CLanguageInfoInterface* CLanguageInfoInterface::m_instance_1 = CLanguageInfoInterface::m_instance;
0067bf50      
0067bf5d      if ((CLanguageInfoInterface::m_instance_1 != 0 && CLanguageInfoInterface::m_instance_1->m_pLanguageInfo != 0))
0067bf69          return CLanguageInfoInterface::GetMaleMetaLetters(CLanguageInfoInterface::m_instance_1, arg1);
0067bf69      
0067bf73      PStringBase<unsigned short>::set(arg1, &data_7fe190);
0067bf78      int32_t eax_2;
0067bf78      eax_2 = 1;
0067bf7a      return 1;
0067bf50  }

0067bf7b                                                                                   90 90 90 90 90                             .....

0067bf80  uint8_t StringTableMetaLanguage::GetFemaleMetaLetters(class PStringBase<unsigned short>* arg1)

0067bf80  {
0067bf80      class CLanguageInfoInterface* CLanguageInfoInterface::m_instance_1 = CLanguageInfoInterface::m_instance;
0067bf80      
0067bf8d      if ((CLanguageInfoInterface::m_instance_1 != 0 && CLanguageInfoInterface::m_instance_1->m_pLanguageInfo != 0))
0067bf99          return CLanguageInfoInterface::GetFemaleMetaLetters(CLanguageInfoInterface::m_instance_1, arg1);
0067bf99      
0067bfa3      PStringBase<unsigned short>::set(arg1, &data_7fe198);
0067bfa8      int32_t eax_2;
0067bfa8      eax_2 = 1;
0067bfaa      return 1;
0067bf80  }

0067bfab                                   90 90 90 90 90                                                             .....

0067bfb0  uint8_t StringTableMetaLanguage::GetTreasureMetaLetters(class PStringBase<unsigned short>* arg1, class PStringBase<unsigned short>* arg2, class PStringBase<unsigned short>* arg3)

0067bfb0  {
0067bfb0      class CLanguageInfoInterface* CLanguageInfoInterface::m_instance_1 = CLanguageInfoInterface::m_instance;
0067bfb0      
0067bfbd      if ((CLanguageInfoInterface::m_instance_1 != 0 && CLanguageInfoInterface::m_instance_1->m_pLanguageInfo != 0))
0067bfd3          return CLanguageInfoInterface::GetTreasureMetaLetters(CLanguageInfoInterface::m_instance_1, arg1, arg2, arg3);
0067bfd3      
0067bfdd      PStringBase<unsigned short>::set(arg1, &data_7fe1b0);
0067bfeb      PStringBase<unsigned short>::set(arg2, u"mfnp");
0067bff9      PStringBase<unsigned short>::set(arg3, &data_7fe1a0);
0067bffe      int32_t eax_3;
0067bffe      eax_3 = 1;
0067c000      return 1;
0067bfb0  }

0067c001     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0067c010  uint32_t __thiscall SmartArray<PStringBase<unsigned short>,1>::WhatNum(class SmartArray<PStringBase<unsigned short>,1> const* this, class PStringBase<unsigned short> const* arg2)

0067c010  {
0067c019      int32_t i = 0;
0067c019      
0067c01d      if (this->m_num > 0)
0067c01d      {
0067c01f          class PStringBase<unsigned short>* ebp_1 = arg2;
0067c01f          
0067c068          do
0067c068          {
0067c025              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ebp_1->m_charbuffer;
0067c02e              void* m_charbuffer = this->m_data[i].m_charbuffer;
0067c02e              
0067c035              if (*(uint32_t*)((char*)m_charbuffer - 4) == m_charbuffer_1->m_data[0x7ffffffffffffffe])
0067c035              {
0067c037                  int32_t edx_2 = *(uint32_t*)((char*)m_charbuffer - 8);
0067c03a                  int32_t esi_2 = *(int32_t*)((char*)m_charbuffer_1 + -8);
0067c03a                  
0067c049                  if (((edx_2 == esi_2 || edx_2 == 0xffffffff) || esi_2 == 0xffffffff))
0067c049                  {
0067c04d                      int32_t eax_3 = wcscmp(m_charbuffer, m_charbuffer_1);
0067c056                      char eax_4 = ((int8_t)-(eax_3));
0067c058                      eax_4 = (eax_4 - eax_4);
0067c05c                      arg2 = (eax_4 + 1);
0067c05c                      
0067c060                      if (eax_4 != 0xff)
0067c07a                          return i;
0067c049                  }
0067c035              }
0067c035              
0067c065              i += 1;
0067c068          } while (i < this->m_num);
0067c01d      }
0067c01d      
0067c071      return 0xffffffff;
0067c010  }

0067c07d                                                                                         90 90 90                               ...

0067c080  int32_t StringTableMetaLanguage::GetMatchScore(class PStringBase<unsigned short> const* arg1, class PStringBase<unsigned short> const* arg2)

0067c080  {
0067c080      int32_t ecx;
0067c080      int32_t var_4 = ecx;
0067c089      int32_t edi = arg2->m_charbuffer->m_data[0x7ffffffffffffffe];
0067c08c      int32_t i = 0;
0067c08f      int32_t result = 0;
0067c08f      
0067c093      if (edi == 1)
0067c09d          return 1;
0067c09d      
0067c0a0      if ((edi - 1) > 0)
0067c0a0      {
0067c111          do
0067c111          {
0067c0b4              class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
0067c0b6              int32_t ecx_3 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067c0bb              void* edx_2 = &m_charbuffer->m_data[(ecx_3 - 1)];
0067c0bb              
0067c0bf              if (i < ecx_3)
0067c0c1                  edx_2 = &m_charbuffer->m_data[i];
0067c0c1              
0067c0c8              if (*(uint16_t*)edx_2 != 0x21)
0067c0c8              {
0067c0ec                  void* eax_5;
0067c0ec                  
0067c0ec                  if (i < ecx_3)
0067c0f4                      eax_5 = &m_charbuffer->m_data[i];
0067c0ec                  else
0067c0ee                      eax_5 = &m_charbuffer->m_data[(ecx_3 - 1)];
0067c0ee                  
0067c0f9                  int32_t edx_3;
0067c0f9                  edx_3 = *(uint16_t*)eax_5;
0067c0f9                  
0067c107                  if (wcschr(arg1->m_charbuffer, edx_3) != 0)
0067c109                      result += 2;
0067c0c8              }
0067c0c8              else
0067c0c8              {
0067c0ca                  i += 1;
0067c0cd                  void* eax_2;
0067c0cd                  
0067c0cd                  if (i < ecx_3)
0067c0d5                      eax_2 = &m_charbuffer->m_data[i];
0067c0cd                  else
0067c0cf                      eax_2 = &m_charbuffer->m_data[(ecx_3 - 1)];
0067c0cf                  
0067c0e6                  if (wcschr(arg1->m_charbuffer, ((uint32_t)*(uint16_t*)eax_2)) == 0)
0067c109                      result += 2;
0067c0c8              }
0067c0c8              
0067c10e              i += 1;
0067c111          } while (i < (edi - 1));
0067c0a0      }
0067c0a0      
0067c11c      return result;
0067c080  }

0067c11d                                                                                         90 90 90                               ...

0067c120  void StringTableMetaLanguage::SetError(struct StringTableMetaLanguage::RenderErr const* arg1)

0067c120  {
0067c127      StringTableMetaLanguage::curError.pos = arg1->pos;
0067c12f      class PSRefBufferCharData<char>* m_charbuffer = StringTableMetaLanguage::curError.msg.m_charbuffer;
0067c134      StringTableMetaLanguage::curError.code = arg1->code;
0067c134      
0067c13d      if (m_charbuffer != arg1->msg.m_charbuffer)
0067c13d      {
0067c153          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0067c15b              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0067c15b          
0067c15d          class PSRefBufferCharData<char>* m_charbuffer_1 = arg1->msg.m_charbuffer;
0067c160          StringTableMetaLanguage::curError.msg.m_charbuffer = m_charbuffer_1;
0067c16a          InterlockedIncrement(&m_charbuffer_1[-1]);
0067c13d      }
0067c120  }

0067c173                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0067c180  void StringTableMetaLanguage::SetError(int32_t arg1, enum StringTableMetaLanguage::RenderErrorCode arg2, class PStringBase<char> const* arg3)

0067c180  {
0067c18d      StringTableMetaLanguage::curError.pos = arg1;
0067c192      class PSRefBufferCharData<char>* m_charbuffer = StringTableMetaLanguage::curError.msg.m_charbuffer;
0067c197      StringTableMetaLanguage::curError.code = arg2;
0067c197      
0067c19f      if (m_charbuffer != arg3->m_charbuffer)
0067c19f      {
0067c1b5          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0067c1bd              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0067c1bd          
0067c1bf          class PSRefBufferCharData<char>* m_charbuffer_1 = arg3->m_charbuffer;
0067c1c1          StringTableMetaLanguage::curError.msg.m_charbuffer = m_charbuffer_1;
0067c1ca          InterlockedIncrement(&m_charbuffer_1[-1]);
0067c19f      }
0067c180  }

0067c1d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0067c1e0  class StringTableMetaLanguage::Node const* StringTableMetaLanguage::ChooseChoice(class StringTableMetaLanguage::Node const* arg1, class StringTableMetaLanguage::Node const* arg2)

0067c1e0  {
0067c1e6      class ListNode<StringTableMetaLanguage::Node const *>* i = arg2->children._head;
0067c1ea      class StringTableMetaLanguage::Node* data = nullptr;
0067c1ec      int32_t edi = 0xffffffff;
0067c1ec      
0067c1f1      for (; i != 0; i = i->next)
0067c1f1      {
0067c207          int32_t eax = StringTableMetaLanguage::GetMatchScore(&arg1->flags, &i->data->flags);
0067c207          
0067c215          if ((eax >= edi && eax > 0))
0067c215          {
0067c217              data = i->data;
0067c219              edi = eax;
0067c215          }
0067c1f1      }
0067c1f1      
0067c228      return data;
0067c1e0  }

0067c1fd                                                                                         8d 49 00                               .I.
0067c229                             90 90 90 90 90 90 90                                                           .......

0067c230  class PStringBase<unsigned short>* __convention("regparm") StringTableMetaLanguage::TakeValidLetters(class PStringBase<unsigned short>* __return, class PStringBase<unsigned short> const* arg2, class PStringBase<unsigned short> const* arg3)

0067c230  {
0067c230      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6;
0067c230      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_6;
0067c231      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067c239      PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0067c242      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0067c248      class PStringBase<unsigned short>* ebp = arg3;
0067c24c      class PSRefBufferCharData<unsigned short>* m_charbuffer = ebp->m_charbuffer;
0067c24f      int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0067c255      int32_t i = 0;
0067c255      
0067c259      if ((ecx - 1) > 0)
0067c259      {
0067c33e          do
0067c33e          {
0067c262              void* eax_1;
0067c262              
0067c262              if (i < ecx)
0067c26a                  eax_1 = &m_charbuffer->m_data[i];
0067c262              else
0067c264                  eax_1 = &m_charbuffer->m_data[(ecx - 1)];
0067c264              
0067c274              int32_t edx_1;
0067c274              edx_1 = arg2->m_charbuffer;
0067c274              *(uint16_t*)((char*)edx_1)[2] = *(uint16_t*)((char*)arg2->m_charbuffer)[2];
0067c274              
0067c283              if (wcschr(edx_1, ((uint32_t)*(uint16_t*)eax_1)) != 0)
0067c283              {
0067c289                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = ebp->m_charbuffer;
0067c28c                  int32_t ecx_2 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0067c291                  void* eax_4;
0067c291                  
0067c291                  if (i < ecx_2)
0067c299                      eax_4 = &m_charbuffer_1->m_data[i];
0067c291                  else
0067c293                      eax_4 = &m_charbuffer_1->m_data[(ecx_2 - 1)];
0067c293                  
0067c29c                  uint32_t eax_5 = ((uint32_t)*(uint16_t*)eax_4);
0067c2a2                  arg3 = eax_5;
0067c2a2                  
0067c2a6                  if (eax_5 != 0)
0067c2a6                  {
0067c2ac                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0067c2b4                      int32_t edi_1 = PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe];
0067c2b4                      
0067c2bf                      if ((*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x10) != 1 || (edi_1 + 1) > *(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0xc)))
0067c2bf                      {
0067c2da                          PStringBase<unsigned short>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_2, edi_1);
0067c2e8                          wcscpy(PStringBase<unsigned short>::s_NullBuffer_2, PStringBase<unsigned short>::s_NullBuffer_3);
0067c2e8                          
0067c301                          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_3 != 0x14))
0067c309                              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x14)(1);
0067c2bf                      }
0067c2bf                      else
0067c2bf                      {
0067c2c1                          *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 - 4) = (edi_1 + 1);
0067c2c8                          *(uint32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 8) = 0xffffffff;
0067c2bf                      }
0067c2bf                      
0067c31b                      wcsncpy(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[(edi_1 - 1)], &arg3, 1);
0067c321                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_2;
0067c32b                      PStringBase<unsigned short>::s_NullBuffer_4->m_data[(PStringBase<unsigned short>::s_NullBuffer_4->m_data[0x7ffffffffffffffe] - 1)] = 0;
0067c2a6                  }
0067c283              }
0067c283              
0067c332              m_charbuffer = ebp->m_charbuffer;
0067c335              ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0067c338              i += 1;
0067c33e          } while (i < (ecx - 1));
0067c259      }
0067c259      
0067c344      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_2;
0067c34c      __return->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_5;
0067c352      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
0067c35c      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0067c35c      
0067c36f      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0067c377          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0067c377      
0067c380      return __return;
0067c230  }

0067c381     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0067c390  void* __thiscall List<StringTableMetaLanguage::Node const *>::`scalar deleting destructor'(class List<StringTableMetaLanguage::Node const *>* this, uint32_t arg2)

0067c390  {
0067c393      this->vtable = 0x7fe1e0;
0067c399      List<StringTableMetaLanguage::Node const *>::flush(this);
0067c399      
0067c3a3      if ((arg2 & 1) != 0)
0067c3a6          operator delete(this);
0067c3a6      
0067c3b1      return this;
0067c390  }

0067c3b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0067c3c0  uint8_t StringTableMetaLanguage::RenderNodes(class StringTableMetaLanguage::Node const* arg1, class PStringBase<unsigned short>* arg2, class SmartArray<PStringBase<unsigned short>,1>* arg3, int32_t arg4, int32_t arg5, int32_t arg6)

0067c3c0  {
0067c3cd      int32_t var_20 = 0x7fe1e0;
0067c3d1      int32_t var_10 = 0x7fe1e0;
0067c3da      class ListNode<StringTableMetaLanguage::Node const *>* i = arg1->children._head;
0067c3dd      int32_t* ebx = nullptr;
0067c3df      void* i_19 = nullptr;
0067c3e3      void* var_1c = nullptr;
0067c3e7      void* var_18 = nullptr;
0067c3eb      int32_t var_14 = 0;
0067c3ef      void* var_c = nullptr;
0067c3f3      class StringTableMetaLanguage::Node** var_8 = nullptr;
0067c3f7      int32_t var_4 = 0;
0067c3fb      char var_4d = 0;
0067c3ff      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_12;
0067c3ff      
0067c3ff      if (i != 0)
0067c3ff      {
0067c544          do
0067c544          {
0067c412              enum StringTableMetaLanguage::NodeType type = i->data->type;
0067c412              
0067c418              if (type == ntVar)
0067c418              {
0067c41c                  void* eax_1 = operator new(0xc);
0067c41c                  
0067c426                  if (eax_1 != 0)
0067c426                  {
0067c42e                      *(uint32_t*)eax_1 = i->data;
0067c430                      *(uint32_t*)((char*)eax_1 + 4) = 0;
0067c433                      *(uint32_t*)((char*)eax_1 + 8) = 0;
0067c433                      
0067c43a                      if (var_1c != 0)
0067c43a                      {
0067c451                          *(uint32_t*)((char*)var_18 + 4) = eax_1;
0067c454                          *(uint32_t*)((char*)eax_1 + 8) = var_18;
0067c457                          var_18 = eax_1;
0067c45b                          var_14 += 1;
0067c43a                      }
0067c43a                      else
0067c43a                      {
0067c43c                          var_1c = eax_1;
0067c440                          var_18 = eax_1;
0067c444                          var_14 += 1;
0067c43a                      }
0067c426                  }
0067c418              }
0067c418              else if (type == ntChoiceBlock)
0067c467              {
0067c46b                  class StringTableMetaLanguage::Node** eax_2 = operator new(0xc);
0067c46b                  
0067c475                  if (eax_2 != 0)
0067c475                  {
0067c47d                      *(uint32_t*)eax_2 = i->data;
0067c47f                      eax_2[1] = 0;
0067c482                      eax_2[2] = 0;
0067c482                      
0067c489                      if (var_c != 0)
0067c489                      {
0067c4a0                          var_8[1] = eax_2;
0067c4a3                          eax_2[2] = var_8;
0067c4a6                          var_8 = eax_2;
0067c4aa                          var_4 += 1;
0067c489                      }
0067c489                      else
0067c489                      {
0067c48b                          var_c = eax_2;
0067c48f                          var_8 = eax_2;
0067c493                          var_4 += 1;
0067c489                      }
0067c475                  }
0067c467              }
0067c467              else if (type == ntOutsideVar)
0067c4b6              {
0067c4c5                  PStringBase<unsigned short>::PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_12, u"item");
0067c4cc                  class PSRefBufferCharData<unsigned short>* m_charbuffer = i->data->text.m_charbuffer;
0067c4ce                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_16 = PStringBase<unsigned short>::s_NullBuffer_12;
0067c4ce                  
0067c4d8                  if (m_charbuffer->m_data[0x7ffffffffffffffe] == PStringBase<unsigned short>::s_NullBuffer_16->m_data[0x7ffffffffffffffe])
0067c4d8                  {
0067c4de                      int32_t edx_3 = *(int32_t*)((char*)m_charbuffer + -8);
0067c4e1                      int32_t esi_1 = *(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_16 + -8);
0067c4e1                      
0067c4f0                      if (((edx_3 == esi_1 || edx_3 == 0xffffffff) || esi_1 == 0xffffffff))
0067c4f0                      {
0067c4f8                          int32_t eax_4 = wcscmp(m_charbuffer, PStringBase<unsigned short>::s_NullBuffer_16);
0067c4fe                          PStringBase<unsigned short>::s_NullBuffer_16 = PStringBase<unsigned short>::s_NullBuffer_12;
0067c507                          ebx = -(eax_4);
0067c509                          ebx = (ebx - ebx);
0067c50b                          ebx += 1;
0067c4f0                      }
0067c4f0                      else
0067c4f2                          ebx = 0;
0067c4d8                  }
0067c4d8                  else
0067c4da                      ebx = 0;
0067c4da                  
0067c520                  if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_16->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_16 != 0x14))
0067c528                      *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_16 + -0x14)(1);
0067c528                  
0067c52c                  if (ebx != 0)
0067c52e                      var_4d = 1;
0067c52e                  
0067c538                  SmartArray<PStringBase<unsigned short>,1>::AddToEnd(arg3, i->data);
0067c4b6              }
0067c4b6              
0067c53f              i = i->next;
0067c544          } while (i != 0);
0067c544          
0067c54a          ebx = var_c;
0067c54e          i_19 = var_1c;
0067c3ff      }
0067c3ff      
0067c556      void* i_1 = i_19;
0067c558      void* j_2;
0067c558      
0067c558      if (i_19 != 0)
0067c558      {
0067c5ab          do
0067c5ab          {
0067c562              void* i_20 = i_19;
0067c562              
0067c564              if (i_1 != i_19)
0067c564              {
0067c568                  int32_t edx_6 = *(uint32_t*)(*(uint32_t*)i_1 + 0x18);
0067c568                  
0067c5a0                  do
0067c5a0                  {
0067c575                      if (*(uint32_t*)(*(uint32_t*)i_20 + 0x18) == edx_6)
0067c575                      {
0067c579                          if (edx_6 != 0)
0067c579                          {
0067c76e                              char const* const eax_26 = "multiple variables with the same…";
0067c76e                              
0067c77b                              do
0067c77b                              {
0067c776                                  i_20 = *(uint8_t*)eax_26;
0067c778                                  eax_26 = &eax_26[1];
0067c77b                              } while (i_20 != 0);
0067c77b                              
0067c784                              PStringBase<char>::allocate_ref_buffer(&arg1, (eax_26 - "ultiple variables with the same …"));
0067c789                              uint8_t* edx_13 = arg1;
0067c78d                              char const* const ecx_18 = "multiple variables with the same…";
0067c79a                              uint8_t j;
0067c79a                              
0067c79a                              do
0067c79a                              {
0067c792                                  j = *(uint8_t*)ecx_18;
0067c794                                  ecx_18 = &ecx_18[1];
0067c795                                  *(uint8_t*)edx_13 = j;
0067c797                                  edx_13 = &edx_13[1];
0067c79a                              } while (j != 0);
0067c7a1                              class PSRefBufferCharData<char>* m_charbuffer_3 = StringTableMetaLanguage::curError.msg.m_charbuffer;
0067c7a6                              StringTableMetaLanguage::curError.pos = *(uint32_t*)(*(uint32_t*)i_1 + 0x24);
0067c7ac                              bool cond:9_1 = m_charbuffer_3 == arg1;
0067c7b0                              StringTableMetaLanguage::curError.code = recDuplicateIDs;
0067c7b0                              
0067c7ba                              if (!(cond:9_1))
0067c7ba                              {
0067c7cf                                  if ((InterlockedDecrement(&m_charbuffer_3[-1]) == 0 && m_charbuffer_3 != 0x14))
0067c7d7                                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer_3 + -0x14)(1);
0067c7d7                                  
0067c7d9                                  class StringTableMetaLanguage::Node* eax_31 = arg1;
0067c7dd                                  StringTableMetaLanguage::curError.msg.m_charbuffer = eax_31;
0067c7e6                                  InterlockedIncrement(&eax_31[0]);
0067c7ba                              }
0067c7ba                              
0067c7f0                              void* __offset(StringTableMetaLanguage::Node, -0x14) esi_9 = ((char*)arg1 - 0x14);
0067c7f7                              int32_t eax_33;
0067c7f7                              void* j_13;
0067c7f7                              eax_33 = InterlockedDecrement(((char*)esi_9 + 4));
0067c7f7                              
0067c803                              if ((eax_33 == 0 && esi_9 != 0))
0067c80b                                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
0067c80b                              
0067c80d                              void* j_1 = var_c;
0067c816                              int32_t var_10_2 = 0x7fe1e0;
0067c816                              
0067c822                              while (j_1 != 0)
0067c822                              {
0067c824                                  j_13 = j_1;
0067c826                                  j_1 = *(uint32_t*)((char*)j_1 + 4);
0067c82b                                  void* j_10 = j_1;
0067c82b                                  
0067c82f                                  if (j_1 == 0)
0067c83a                                      int32_t var_8_2 = 0;
0067c82f                                  else
0067c82f                                  {
0067c831                                      *(uint32_t*)((char*)j_1 + 8) = 0;
0067c834                                      j_1 = j_10;
0067c82f                                  }
0067c82f                                  
0067c840                                  if (j_13 != 0)
0067c840                                  {
0067c843                                      operator delete(j_13);
0067c848                                      j_1 = j_10;
0067c840                                  }
0067c840                                  
0067c84f                                  var_4 -= 1;
0067c822                              }
0067c822                              
0067c855                              j_2 = var_1c;
0067c859                              int32_t var_20_2 = 0x7fe1e0;
0067c859                              
0067c862                              while (j_2 != 0)
0067c862                              {
0067c868                                  void* j_14 = j_2;
0067c86a                                  j_2 = *(uint32_t*)((char*)j_2 + 4);
0067c86f                                  void* j_6 = j_2;
0067c86f                                  
0067c873                                  if (j_2 == 0)
0067c87e                                      int32_t var_18_2 = 0;
0067c873                                  else
0067c873                                  {
0067c875                                      *(uint32_t*)((char*)j_2 + 8) = 0;
0067c878                                      j_2 = j_6;
0067c873                                  }
0067c873                                  
0067c884                                  if (j_14 != 0)
0067c884                                  {
0067c887                                      operator delete(j_14);
0067c88c                                      j_2 = j_6;
0067c884                                  }
0067c884                                  
0067c893                                  var_14 -= 1;
0067c862                              }
0067c862                              
0067ce88                          label_67ce88:
0067ce88                              j_2 = 0;
0067ce8e                              return 0;
0067c579                          }
0067c579                          
0067c581                          int32_t* eax_9 = ebx;
0067c581                          
0067c583                          if (ebx != 0)
0067c583                          {
0067c58a                              while (*(uint32_t*)(*(uint32_t*)eax_9 + 0x18) != 0)
0067c58a                              {
0067c590                                  eax_9 = eax_9[1];
0067c590                                  
0067c595                                  if (eax_9 == 0)
0067c595                                  {
0067c597                                      i_19 = var_1c;
0067c597                                      goto label_67c59b;
0067c595                                  }
0067c58a                              }
0067c58a                              
0067c64b                              char* eax_18 = "multiple un-numbered variables; …";
0067c64b                              
0067c658                              do
0067c658                              {
0067c653                                  i_20 = *(uint8_t*)eax_18;
0067c655                                  eax_18 = &eax_18[1];
0067c658                              } while (i_20 != 0);
0067c658                              
0067c661                              PStringBase<char>::allocate_ref_buffer(&arg1, (eax_18 - "ultiple un-numbered variables; a…"));
0067c666                              uint8_t* edx_9 = arg1;
0067c66a                              uint8_t* ecx_13 = "multiple un-numbered variables; …";
0067c678                              uint8_t j_3;
0067c678                              
0067c678                              do
0067c678                              {
0067c670                                  j_3 = *(uint8_t*)ecx_13;
0067c672                                  ecx_13 = &ecx_13[1];
0067c673                                  *(uint8_t*)edx_9 = j_3;
0067c675                                  edx_9 = &edx_9[1];
0067c678                              } while (j_3 != 0);
0067c67f                              class PSRefBufferCharData<char>* m_charbuffer_2 = StringTableMetaLanguage::curError.msg.m_charbuffer;
0067c684                              bool cond:12_1 = m_charbuffer_2 == arg1;
0067c688                              StringTableMetaLanguage::curError.pos = *(uint32_t*)(*(uint32_t*)i_1 + 0x24);
0067c68e                              StringTableMetaLanguage::curError.code = recDuplicateIDs;
0067c68e                              
0067c698                              if (!(cond:12_1))
0067c698                              {
0067c6ad                                  if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
0067c6b5                                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0067c6b5                                  
0067c6b7                                  class StringTableMetaLanguage::Node* eax_22 = arg1;
0067c6bb                                  StringTableMetaLanguage::curError.msg.m_charbuffer = eax_22;
0067c6c4                                  InterlockedIncrement(&eax_22[0]);
0067c698                              }
0067c698                              
0067c6ce                              void* __offset(StringTableMetaLanguage::Node, -0x14) esi_6 = ((char*)arg1 - 0x14);
0067c6ce                              
0067c6e1                              if ((InterlockedDecrement(((char*)esi_6 + 4)) == 0 && esi_6 != 0))
0067c6e9                                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_6) + -0x14)(1);
0067c6e9                              
0067c6eb                              void* j_4 = var_c;
0067c6f4                              int32_t var_10_1 = 0x7fe1e0;
0067c6f4                              
0067c6fa                              while (j_4 != 0)
0067c6fa                              {
0067c6fc                                  void* j_11 = j_4;
0067c6fe                                  j_4 = *(uint32_t*)((char*)j_4 + 4);
0067c703                                  void* j_9 = j_4;
0067c703                                  
0067c707                                  if (j_4 == 0)
0067c712                                      int32_t var_8_1 = 0;
0067c707                                  else
0067c707                                  {
0067c709                                      *(uint32_t*)((char*)j_4 + 8) = 0;
0067c70c                                      j_4 = j_9;
0067c707                                  }
0067c707                                  
0067c718                                  if (j_11 != 0)
0067c718                                  {
0067c71b                                      operator delete(j_11);
0067c720                                      j_4 = j_9;
0067c718                                  }
0067c718                                  
0067c727                                  var_4 -= 1;
0067c6fa                              }
0067c6fa                              
0067c72d                              j_2 = var_1c;
0067c731                              int32_t var_20_1 = 0x7fe1e0;
0067c731                              
0067c737                              while (j_2 != 0)
0067c737                              {
0067c73d                                  void* j_12 = j_2;
0067c73f                                  j_2 = *(uint32_t*)((char*)j_2 + 4);
0067c744                                  void* j_5 = j_2;
0067c744                                  
0067c748                                  if (j_2 == 0)
0067c753                                      int32_t var_18_1 = 0;
0067c748                                  else
0067c748                                  {
0067c74a                                      *(uint32_t*)((char*)j_2 + 8) = 0;
0067c74d                                      j_2 = j_5;
0067c748                                  }
0067c748                                  
0067c759                                  if (j_12 != 0)
0067c759                                  {
0067c75c                                      operator delete(j_12);
0067c761                                      j_2 = j_5;
0067c759                                  }
0067c759                                  
0067c768                                  var_14 -= 1;
0067c737                              }
0067c737                              
0067c58a                              goto label_67ce88;
0067c583                          }
0067c575                      }
0067c575                      
0067c59b                  label_67c59b:
0067c59b                      i_20 = *(uint32_t*)((char*)i_20 + 4);
0067c5a0                  } while (i_1 != i_20);
0067c564              }
0067c564              
0067c5a4              if (i_1 == 0)
0067c5a4                  break;
0067c5a4              
0067c5a6              i_1 = *(uint32_t*)((char*)i_1 + 4);
0067c5ab          } while (i_1 != 0);
0067c558      }
0067c558      
0067c5ad      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067c5b8      class PSRefBufferCharData<unsigned short>* var_44 = PStringBase<unsigned short>::s_NullBuffer_1;
0067c5c0      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0067c5c2      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0067c5c7      class PSRefBufferCharData<unsigned short>* var_48 = PStringBase<unsigned short>::s_NullBuffer_2;
0067c5cf      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0067c5d1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer;
0067c5d6      class PSRefBufferCharData<unsigned short>* var_4c = PStringBase<unsigned short>::s_NullBuffer_3;
0067c5de      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]);
0067c5e4      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg2->m_charbuffer;
0067c5e6      bool cond:2_1 = m_charbuffer_1 == PStringBase<unsigned short>::s_NullBuffer;
0067c5ec      PStringBase<unsigned short>::s_NullBuffer_12 = nullptr;
0067c5ec      
0067c5f6      if (!(cond:2_1))
0067c5f6      {
0067c607          if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
0067c60f              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
0067c60f          
0067c611          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer;
0067c61c          arg2->m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_4;
0067c61e          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_4 - 0x10));
0067c5f6      }
0067c5f6      
0067c624      class ListNode<StringTableMetaLanguage::Node const *>* eax_15 = arg1->children._head;
0067c629      class ListNode<StringTableMetaLanguage::Node const *>* var_28_1 = eax_15;
0067c62d      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_10;
0067c62d      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_11;
0067c62d      class PStringBase<unsigned short> __return;
0067c62d      
0067c62d      if (eax_15 != 0)
0067c62d      {
0067c633          while (true)
0067c633          {
0067c633              class StringTableMetaLanguage::Node* data_1 = eax_15->data;
0067c638              int32_t eax_17 = (data_1->type - 2);
0067c63e              class ListNode<StringTableMetaLanguage::Node const *>* ecx_8;
0067c63e              
0067c63e              if (eax_17 > 3)
0067c63e              {
0067cd09                  char const* const eax_73 = "unknown node type";
0067cd09                  
0067cd16                  do
0067cd16                  {
0067cd11                      ecx_8 = *(uint8_t*)eax_73;
0067cd13                      eax_73 = &eax_73[1];
0067cd16                  } while (ecx_8 != 0);
0067cd16                  
0067cd1f                  PStringBase<char>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_11, (eax_73 - "nknown node type"));
0067cd24                  uint8_t* PStringBase<unsigned short>::s_NullBuffer_18 = PStringBase<unsigned short>::s_NullBuffer_11;
0067cd2d                  char const* const ecx_63 = "unknown node type";
0067cd38                  uint8_t i_2;
0067cd38                  
0067cd38                  do
0067cd38                  {
0067cd30                      i_2 = *(uint8_t*)ecx_63;
0067cd32                      ecx_63 = &ecx_63[1];
0067cd33                      *(uint8_t*)PStringBase<unsigned short>::s_NullBuffer_18 = i_2;
0067cd35                      PStringBase<unsigned short>::s_NullBuffer_18 = &PStringBase<unsigned short>::s_NullBuffer_18[1];
0067cd38                  } while (i_2 != 0);
0067cd43                  class PSRefBufferCharData<char>* m_charbuffer_9 = StringTableMetaLanguage::curError.msg.m_charbuffer;
0067cd48                  bool cond:8_1 = m_charbuffer_9 == PStringBase<unsigned short>::s_NullBuffer_11;
0067cd4c                  StringTableMetaLanguage::curError.pos = var_28_1->data->pos;
0067cd52                  StringTableMetaLanguage::curError.code = recInternalError;
0067cd52                  
0067cd5c                  if (!(cond:8_1))
0067cd5c                  {
0067cd6f                      if ((InterlockedDecrement(&m_charbuffer_9[-1]) == 0 && m_charbuffer_9 != 0x14))
0067cd77                          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_9 + -0x14)(1);
0067cd77                      
0067cd79                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_15 = PStringBase<unsigned short>::s_NullBuffer_11;
0067cd7d                      StringTableMetaLanguage::curError.msg.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_15;
0067cd86                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_15->m_data[-8]);
0067cd5c                  }
0067cd5c                  
0067cd90                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_24 = &PStringBase<unsigned short>::s_NullBuffer_11->m_data[-0xa];
0067cd90                  
0067cd9f                  if ((InterlockedDecrement(((char*)esi_24 + 4)) == 0 && esi_24 != 0))
0067cda7                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_24) + -0x14)(1);
0067cda7                  
0067cdad                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_26 = &var_4c->m_data[-0xa];
0067cdad                  
0067cdbc                  if ((InterlockedDecrement(((char*)esi_26 + 4)) == 0 && esi_26 != 0))
0067cdc4                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_26) + -0x14)(1);
0067cdc4                  
0067cdca                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_28 = &var_48->m_data[-0xa];
0067cdca                  
0067cdd9                  if ((InterlockedDecrement(((char*)esi_28 + 4)) == 0 && esi_28 != 0))
0067cde1                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_28) + -0x14)(1);
0067cde1                  
0067cde7                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_30 = &var_44->m_data[-0xa];
0067cdee                  int32_t eax_86;
0067cdee                  void* ecx_69;
0067cdee                  eax_86 = InterlockedDecrement(((char*)esi_30 + 4));
0067cdee                  
0067cdf6                  if ((eax_86 == 0 && esi_30 != 0))
0067cdfe                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_30) + -0x14)(1);
0067cdfe                  
0067ce00                  void* i_3 = var_c;
0067ce09                  int32_t var_10_4 = 0x7fe1e0;
0067ce09                  
0067ce12                  while (i_3 != 0)
0067ce12                  {
0067ce14                      void* i_16 = i_3;
0067ce16                      i_3 = *(uint32_t*)((char*)i_3 + 4);
0067ce1b                      void* i_13 = i_3;
0067ce1b                      
0067ce1f                      if (i_3 == 0)
0067ce2a                          int32_t var_8_4 = 0;
0067ce1f                      else
0067ce1f                      {
0067ce21                          *(uint32_t*)((char*)i_3 + 8) = 0;
0067ce24                          i_3 = i_13;
0067ce1f                      }
0067ce1f                      
0067ce30                      if (i_16 != 0)
0067ce30                      {
0067ce33                          operator delete(i_16);
0067ce38                          i_3 = i_13;
0067ce30                      }
0067ce30                      
0067ce3f                      var_4 -= 1;
0067ce12                  }
0067ce12                  
0067ce45                  j_2 = var_1c;
0067ce49                  int32_t var_20_4 = 0x7fe1e0;
0067ce49                  
0067ce52                  while (j_2 != 0)
0067ce52                  {
0067ce54                      void* j_16 = j_2;
0067ce56                      j_2 = *(uint32_t*)((char*)j_2 + 4);
0067ce5b                      void* j_8 = j_2;
0067ce5b                      
0067ce5f                      if (j_2 == 0)
0067ce6a                          int32_t var_18_4 = 0;
0067ce5f                      else
0067ce5f                      {
0067ce61                          *(uint32_t*)((char*)j_2 + 8) = 0;
0067ce64                          j_2 = j_8;
0067ce5f                      }
0067ce5f                      
0067ce70                      if (j_16 != 0)
0067ce70                      {
0067ce73                          operator delete(j_16);
0067ce78                          j_2 = j_8;
0067ce70                      }
0067ce70                      
0067ce7f                      var_14 -= 1;
0067ce52                  }
0067ce52                  
0067cd9b                  goto label_67ce88;
0067c63e              }
0067c63e              
0067c644              switch (eax_17)
0067c644              {
0067c899                  case 0:
0067c899                  {
0067c899                      class PSRefBufferCharData<unsigned short>* m_charbuffer_13 = data_1->text.m_charbuffer;
0067c89b                      int32_t eax_34 = m_charbuffer_13->m_data[0x7ffffffffffffffe];
0067c89b                      
0067c8a1                      if (eax_34 != 1)
0067c8ac                          PStringBase<unsigned short>::append_n_chars(arg2, m_charbuffer_13, (eax_34 - 1));
0067c8ac                      
0067c8a1                      goto label_67cb4e;
0067c899                  }
0067c8bb                  case 1:
0067c8bb                  {
0067c8bb                      if (data_1->ID >= 0)
0067c8bb                      {
0067c8c1                          int32_t eax_36;
0067c8c1                          eax_36 = var_4d;
0067c8c1                          
0067c8c7                          if (eax_36 != 0)
0067c8c7                          {
0067c8cd                              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_13 = PStringBase<unsigned short>::s_NullBuffer_12;
0067c8d5                              class PSRefBufferCharData<unsigned short>* m_charbuffer_14;
0067c8d5                              
0067c8d5                              if (PStringBase<unsigned short>::s_NullBuffer_13 == arg4)
0067c8d5                              {
0067c8d7                                  class PSRefBufferCharData<unsigned short>* eax_37 = var_44;
0067c8d7                                  
0067c8de                                  if (eax_37 != data_1->flags.m_charbuffer)
0067c8de                                  {
0067c8f9                                      if ((InterlockedDecrement(&eax_37->m_data[-8]) == 0 && eax_37 != 0x14))
0067c901                                          *(uint32_t*)*(int32_t*)((char*)eax_37 + -0x14)(1);
0067c901                                      
0067c903                                      m_charbuffer_14 = data_1->flags.m_charbuffer;
0067c906                                      var_44 = m_charbuffer_14;
0067c97c                                      InterlockedIncrement(&m_charbuffer_14->m_data[-8]);
0067c8de                                  }
0067c8d5                              }
0067c8d5                              else if (PStringBase<unsigned short>::s_NullBuffer_13 == arg5)
0067c910                              {
0067c912                                  class PSRefBufferCharData<unsigned short>* eax_39 = var_48;
0067c912                                  
0067c919                                  if (eax_39 != data_1->flags.m_charbuffer)
0067c919                                  {
0067c930                                      if ((InterlockedDecrement(&eax_39->m_data[-8]) == 0 && eax_39 != 0x14))
0067c938                                          *(uint32_t*)*(int32_t*)((char*)eax_39 + -0x14)(1);
0067c938                                      
0067c93a                                      m_charbuffer_14 = data_1->flags.m_charbuffer;
0067c93d                                      var_48 = m_charbuffer_14;
0067c97c                                      InterlockedIncrement(&m_charbuffer_14->m_data[-8]);
0067c919                                  }
0067c910                              }
0067c910                              else if (PStringBase<unsigned short>::s_NullBuffer_13 == arg6)
0067c947                              {
0067c949                                  class PSRefBufferCharData<unsigned short>* eax_41 = var_4c;
0067c949                                  
0067c950                                  if (eax_41 != data_1->flags.m_charbuffer)
0067c950                                  {
0067c967                                      if ((InterlockedDecrement(&eax_41->m_data[-8]) == 0 && eax_41 != 0x14))
0067c96f                                          *(uint32_t*)*(int32_t*)((char*)eax_41 + -0x14)(1);
0067c96f                                      
0067c971                                      m_charbuffer_14 = data_1->flags.m_charbuffer;
0067c974                                      var_4c = m_charbuffer_14;
0067c97c                                      InterlockedIncrement(&m_charbuffer_14->m_data[-8]);
0067c950                                  }
0067c947                              }
0067c984                              PStringBase<unsigned short>::s_NullBuffer_12 = (&PStringBase<unsigned short>::s_NullBuffer_12->m_data[0] + 1);
0067c8c7                          }
0067c8c7                          
0067c98c                          class StringTableMetaLanguage::Node* data = var_28_1->data;
0067c98e                          ecx_8 = data->bForceCapital;
0067c993                          void* esi_12;
0067c993                          
0067c993                          if (ecx_8 == 0)
0067c993                          {
0067c9e1                              class PSRefBufferCharData<unsigned short>* m_charbuffer_15 = data->text.m_charbuffer;
0067c9e1                              
0067c9eb                              if ((m_charbuffer_15 == 0 || m_charbuffer_15->m_data[0] == 0))
0067c9eb                              {
0067ca12                                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer;
0067ca17                                  arg1 = PStringBase<unsigned short>::s_NullBuffer_5;
0067ca1f                                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
0067c9eb                              }
0067c9eb                              else
0067c9eb                              {
0067c9fc                                  PStringBase<unsigned short>::allocate_ref_buffer(&arg1, wcslen(m_charbuffer_15));
0067ca07                                  wcscpy(arg1, m_charbuffer_15);
0067c9eb                              }
0067c9eb                              
0067ca21                              class StringTableMetaLanguage::Node* eax_49 = arg1;
0067ca25                              int32_t text = eax_49->text;
0067ca25                              
0067ca2b                              if (text != 1)
0067ca2b                              {
0067ca32                                  PStringBase<unsigned short>::append_n_chars(arg2, eax_49, (text - 1));
0067ca37                                  eax_49 = arg1;
0067ca2b                              }
0067ca2b                              
0067ca3b                              esi_12 = ((char*)eax_49 - 0x14);
0067c993                          }
0067c993                          else
0067c993                          {
0067c9a0                              class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = StringTableMetaLanguage::CapitalizeFirstLetter(&__return, data)->m_charbuffer;
0067c9a2                              int32_t ecx_31 = m_charbuffer_4->m_data[0x7ffffffffffffffe];
0067c9a2                              
0067c9ab                              if (ecx_31 != 1)
0067c9b2                                  PStringBase<unsigned short>::append_n_chars(arg2, m_charbuffer_4, (ecx_31 - 1));
0067c9b2                              
0067c9bb                              esi_12 = (__return - 0x14);
0067c993                          }
0067c993                          
0067c9ce                          if ((InterlockedDecrement(((char*)esi_12 + 4)) == 0 && esi_12 != 0))
0067c9da                              **(uint32_t**)esi_12(1);
0067c8bb                      }
0067c8bb                      
0067c8bb                      goto label_67cb4e;
0067c8bb                  }
0067ca43                  case 2:
0067ca43                  {
0067ca43                      void* i_5 = var_1c;
0067ca49                      void* i_4 = i_5;
0067ca49                      
0067ca4b                      if (i_5 != 0)
0067ca4b                      {
0067ca60                          do
0067ca60                          {
0067ca55                              if (*(uint32_t*)(*(uint32_t*)i_4 + 0x18) == data_1->ID)
0067ca55                              {
0067cb24                                  class StringTableMetaLanguage::Node* eax_56 = StringTableMetaLanguage::ChooseChoice(*(uint32_t*)i_4, data_1);
0067cb24                                  
0067cb2e                                  if (eax_56 != 0)
0067cb2e                                  {
0067cb30                                      class PSRefBufferCharData<unsigned short>* m_charbuffer_6 = eax_56->text.m_charbuffer;
0067cb32                                      int32_t ecx_47 = m_charbuffer_6->m_data[0x7ffffffffffffffe];
0067cb32                                      
0067cb38                                      if (ecx_47 != 1)
0067cb3f                                          PStringBase<unsigned short>::append_n_chars(arg2, m_charbuffer_6, (ecx_47 - 1));
0067cb2e                                  }
0067cb2e                                  
0067cb2e                                  goto label_67cb4e;
0067ca55                              }
0067ca55                              
0067ca5b                              i_4 = *(uint32_t*)((char*)i_4 + 4);
0067ca60                          } while (i_4 != 0);
0067ca4b                      }
0067ca4b                      
0067ca71                      if ((data_1->ID == 0 && i_5 != 0))
0067ca71                      {
0067ca84                          do
0067ca84                          {
0067ca79                              if (*(uint32_t*)(*(uint32_t*)i_5 + 0x18) == 0xffffffff)
0067ca79                              {
0067cb66                                  class StringTableMetaLanguage::Node* eax_58 = StringTableMetaLanguage::ChooseChoice(*(uint32_t*)i_5, data_1);
0067cb66                                  
0067cb70                                  if (eax_58 != 0)
0067cb70                                  {
0067cb72                                      class PSRefBufferCharData<unsigned short>* m_charbuffer_7 = eax_58->text.m_charbuffer;
0067cb74                                      int32_t ecx_50 = m_charbuffer_7->m_data[0x7ffffffffffffffe];
0067cb74                                      
0067cb7a                                      if (ecx_50 != 1)
0067cb81                                          PStringBase<unsigned short>::append_n_chars(arg2, m_charbuffer_7, (ecx_50 - 1));
0067cb70                                  }
0067cb70                                  
0067cb70                                  goto label_67cb4e;
0067ca79                              }
0067ca79                              
0067ca7f                              i_5 = *(uint32_t*)((char*)i_5 + 4);
0067ca84                          } while (i_5 != 0);
0067ca71                      }
0067ca71                      
0067ca91                      class PStringBase<char> PStringBase<unsigned short>::s_NullBuffer_19;
0067ca91                      int32_t ecx_40;
0067ca91                      
0067ca91                      if (var_28_1->data->ID != 0)
0067ca91                      {
0067cb88                          char* eax_59 = "no variable has the same ID as t…";
0067cb88                          
0067cb95                          do
0067cb95                          {
0067cb90                              ecx_40 = *(uint8_t*)eax_59;
0067cb92                              eax_59 = &eax_59[1];
0067cb95                          } while (ecx_40 != 0);
0067cb95                          
0067cb9e                          PStringBase<char>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_10, (eax_59 - "o variable has the same ID as th…"));
0067cba3                          uint8_t* PStringBase<unsigned short>::s_NullBuffer_17 = PStringBase<unsigned short>::s_NullBuffer_10;
0067cba7                          uint8_t* ecx_54 = "no variable has the same ID as t…";
0067cbb8                          uint8_t i_6;
0067cbb8                          
0067cbb8                          do
0067cbb8                          {
0067cbb0                              i_6 = *(uint8_t*)ecx_54;
0067cbb2                              ecx_54 = &ecx_54[1];
0067cbb3                              *(uint8_t*)PStringBase<unsigned short>::s_NullBuffer_17 = i_6;
0067cbb5                              PStringBase<unsigned short>::s_NullBuffer_17 = &PStringBase<unsigned short>::s_NullBuffer_17[1];
0067cbb8                          } while (i_6 != 0);
0067cbc3                          class PSRefBufferCharData<char>* m_charbuffer_8 = StringTableMetaLanguage::curError.msg.m_charbuffer;
0067cbc8                          bool cond:13_1 = m_charbuffer_8 == PStringBase<unsigned short>::s_NullBuffer_10;
0067cbcc                          StringTableMetaLanguage::curError.pos = var_28_1->data->pos;
0067cbd2                          StringTableMetaLanguage::curError.code = recSyntaxError;
0067cbd2                          
0067cbdc                          if (!(cond:13_1))
0067cbdc                          {
0067cbed                              if ((InterlockedDecrement(&m_charbuffer_8[-1]) == 0 && m_charbuffer_8 != 0x14))
0067cbf5                                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_8 + -0x14)(1);
0067cbf5                              
0067cbf7                              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_14 = PStringBase<unsigned short>::s_NullBuffer_10;
0067cbfb                              StringTableMetaLanguage::curError.msg.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_14;
0067cc04                              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_14->m_data[-8]);
0067cbdc                          }
0067cbdc                          
0067cc06                          PStringBase<unsigned short>::s_NullBuffer_19 = PStringBase<unsigned short>::s_NullBuffer_10;
0067ca91                      }
0067ca91                      else
0067ca91                      {
0067ca97                          char* eax_51 = "no default variable exists to ma…";
0067ca97                          
0067caa5                          do
0067caa5                          {
0067caa0                              ecx_40 = *(uint8_t*)eax_51;
0067caa2                              eax_51 = &eax_51[1];
0067caa5                          } while (ecx_40 != 0);
0067caa5                          
0067caae                          class PStringBase<char> PStringBase<unsigned short>::s_NullBuffer_20;
0067caae                          PStringBase<char>::allocate_ref_buffer(&PStringBase<unsigned short>::s_NullBuffer_20, (eax_51 - "o default variable exists to mat…"));
0067cab3                          uint8_t* PStringBase<unsigned short>::s_NullBuffer_23 = PStringBase<unsigned short>::s_NullBuffer_20;
0067cab7                          char const* const ecx_42 = "no default variable exists to ma…";
0067cac8                          uint8_t i_7;
0067cac8                          
0067cac8                          do
0067cac8                          {
0067cac0                              i_7 = *(uint8_t*)ecx_42;
0067cac2                              ecx_42 = &ecx_42[1];
0067cac3                              *(uint8_t*)PStringBase<unsigned short>::s_NullBuffer_23 = i_7;
0067cac5                              PStringBase<unsigned short>::s_NullBuffer_23 = &PStringBase<unsigned short>::s_NullBuffer_23[1];
0067cac8                          } while (i_7 != 0);
0067cad3                          class PStringBase<char> PStringBase<unsigned short>::s_NullBuffer_22 = PStringBase<unsigned short>::s_NullBuffer_20;
0067cad7                          StringTableMetaLanguage::curError.pos = var_28_1->data->pos;
0067cadc                          class PSRefBufferCharData<char>* m_charbuffer_5 = StringTableMetaLanguage::curError.msg.m_charbuffer;
0067cae3                          StringTableMetaLanguage::curError.code = recSyntaxError;
0067cae3                          
0067caed                          if (m_charbuffer_5 != PStringBase<unsigned short>::s_NullBuffer_22)
0067caed                          {
0067cafe                              if ((InterlockedDecrement(&m_charbuffer_5[-1]) == 0 && m_charbuffer_5 != 0x14))
0067cb06                                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_5 + -0x14)(1);
0067cb06                              
0067cb08                              class PStringBase<char> PStringBase<unsigned short>::s_NullBuffer_21 = PStringBase<unsigned short>::s_NullBuffer_20;
0067cb0c                              StringTableMetaLanguage::curError.msg.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_21;
0067cb15                              InterlockedIncrement((PStringBase<unsigned short>::s_NullBuffer_21 - 0x10));
0067caed                          }
0067caed                          
0067cb17                          PStringBase<unsigned short>::s_NullBuffer_19 = PStringBase<unsigned short>::s_NullBuffer_20;
0067ca91                      }
0067ca91                      
0067cc19                      if ((InterlockedDecrement((PStringBase<unsigned short>::s_NullBuffer_19 - 0x10)) == 0 && PStringBase<unsigned short>::s_NullBuffer_19 != 0x14))
0067cc21                          **(uint32_t**)(PStringBase<unsigned short>::s_NullBuffer_19 - 0x14)(1);
0067cc21                      
0067cc27                      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_17 = &var_4c->m_data[-0xa];
0067cc27                      
0067cc38                      if ((InterlockedDecrement(((char*)esi_17 + 4)) == 0 && esi_17 != 0))
0067cc40                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_17) + -0x14)(1);
0067cc40                      
0067cc46                      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_19 = &var_48->m_data[-0xa];
0067cc46                      
0067cc55                      if ((InterlockedDecrement(((char*)esi_19 + 4)) == 0 && esi_19 != 0))
0067cc5d                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_19) + -0x14)(1);
0067cc5d                      
0067cc63                      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_21 = &var_44->m_data[-0xa];
0067cc6a                      int32_t eax_72;
0067cc6a                      void* i_15;
0067cc6a                      eax_72 = InterlockedDecrement(((char*)esi_21 + 4));
0067cc6a                      
0067cc72                      if ((eax_72 == 0 && esi_21 != 0))
0067cc7a                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_21) + -0x14)(1);
0067cc7a                      
0067cc7c                      void* i_8 = var_c;
0067cc85                      int32_t var_10_3 = 0x7fe1e0;
0067cc85                      
0067cc92                      while (i_8 != 0)
0067cc92                      {
0067cc94                          i_15 = i_8;
0067cc96                          i_8 = *(uint32_t*)((char*)i_8 + 4);
0067cc9b                          void* i_12 = i_8;
0067cc9b                          
0067cc9f                          if (i_8 == 0)
0067ccaa                              int32_t var_8_3 = 0;
0067cc9f                          else
0067cc9f                          {
0067cca1                              *(uint32_t*)((char*)i_8 + 8) = 0;
0067cca4                              i_8 = i_12;
0067cc9f                          }
0067cc9f                          
0067ccb0                          if (i_15 != 0)
0067ccb0                          {
0067ccb3                              operator delete(i_15);
0067ccb8                              i_8 = i_12;
0067ccb0                          }
0067ccb0                          
0067ccbf                          var_4 -= 1;
0067cc92                      }
0067cc92                      
0067ccc5                      j_2 = var_1c;
0067ccc9                      int32_t var_20_3 = 0x7fe1e0;
0067ccc9                      
0067ccd2                      while (j_2 != 0)
0067ccd2                      {
0067ccd8                          void* j_15 = j_2;
0067ccda                          j_2 = *(uint32_t*)((char*)j_2 + 4);
0067ccdf                          void* j_7 = j_2;
0067ccdf                          
0067cce3                          if (j_2 == 0)
0067ccee                              int32_t var_18_3 = 0;
0067cce3                          else
0067cce3                          {
0067cce5                              *(uint32_t*)((char*)j_2 + 8) = 0;
0067cce8                              j_2 = j_7;
0067cce3                          }
0067cce3                          
0067ccf4                          if (j_15 != 0)
0067ccf4                          {
0067ccf7                              operator delete(j_15);
0067ccfc                              j_2 = j_7;
0067ccf4                          }
0067ccf4                          
0067cd03                          var_14 -= 1;
0067ccd2                      }
0067ccd2                      
0067ca71                      goto label_67ce88;
0067ca43                  }
0067cb4e                  case 3:
0067cb4e                  {
0067cb4e                  label_67cb4e:
0067cb4e                      eax_15 = var_28_1->next;
0067cb53                      var_28_1 = eax_15;
0067cb53                      
0067cb57                      if (eax_15 == 0)
0067cb57                          break;
0067cb57                      
0067cb57                      continue;
0067cb4e                  }
0067c644              }
0067c633          }
0067c62d      }
0067c62d      
0067ce8f      eax_15 = var_4d;
0067ce8f      
0067ce95      if (eax_15 != 0)
0067ce95      {
0067ce9b          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer;
0067cea0          PStringBase<unsigned short>::s_NullBuffer_10 = PStringBase<unsigned short>::s_NullBuffer_6;
0067cea8          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_6->m_data[-8]);
0067ceaa          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = PStringBase<unsigned short>::s_NullBuffer;
0067ceaf          PStringBase<unsigned short>::s_NullBuffer_11 = PStringBase<unsigned short>::s_NullBuffer_7;
0067ceb7          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_7->m_data[-8]);
0067ceb9          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_8 = PStringBase<unsigned short>::s_NullBuffer;
0067cebe          PStringBase<unsigned short>::s_NullBuffer_12 = PStringBase<unsigned short>::s_NullBuffer_8;
0067cec6          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_8->m_data[-8]);
0067ced7          StringTableMetaLanguage::GetTreasureMetaLetters(&PStringBase<unsigned short>::s_NullBuffer_10, &PStringBase<unsigned short>::s_NullBuffer_11, &PStringBase<unsigned short>::s_NullBuffer_12);
0067cedc          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_9 = PStringBase<unsigned short>::s_NullBuffer;
0067cee1          arg1 = PStringBase<unsigned short>::s_NullBuffer_9;
0067ceec          int32_t __return_1;
0067ceec          class PStringBase<unsigned short>* ecx_72;
0067ceec          class PStringBase<unsigned short>* edx_37;
0067ceec          __return_1 = InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_9->m_data[-8]);
0067cef2          class PSRefBufferCharData<unsigned short>** var_64_64 = &var_44;
0067cef7          class PSRefBufferCharData<unsigned short>** var_68_12 = &PStringBase<unsigned short>::s_NullBuffer_10;
0067cefc          int32_t* var_6c_2 = &__return;
0067cf02          class PSRefBufferCharData<unsigned short>* m_charbuffer_10 = StringTableMetaLanguage::TakeValidLetters(__return_1, edx_37, ecx_72)->m_charbuffer;
0067cf04          int32_t ecx_73 = m_charbuffer_10->m_data[0x7ffffffffffffffe];
0067cf04          
0067cf0d          if (ecx_73 != 1)
0067cf16              PStringBase<unsigned short>::append_n_chars(&arg1, m_charbuffer_10, (ecx_73 - 1));
0067cf16          
0067cf1f          int32_t* esi_32 = (__return - 0x14);
0067cf26          int32_t __return_2;
0067cf26          class PStringBase<unsigned short>* ecx_76;
0067cf26          class PStringBase<unsigned short>* edx_38;
0067cf26          __return_2 = InterlockedDecrement(&esi_32[1]);
0067cf26          
0067cf30          if ((__return_2 == 0 && esi_32 != 0))
0067cf38              __return_2 = **(uint32_t**)esi_32(1);
0067cf38          
0067cf3e          class PSRefBufferCharData<unsigned short>** var_64_67 = &var_48;
0067cf43          class PSRefBufferCharData<unsigned short>** var_68_14 = &PStringBase<unsigned short>::s_NullBuffer_11;
0067cf48          int32_t* var_6c_3 = &__return;
0067cf4e          class PSRefBufferCharData<unsigned short>* m_charbuffer_11 = StringTableMetaLanguage::TakeValidLetters(__return_2, edx_38, ecx_76)->m_charbuffer;
0067cf50          int32_t ecx_78 = m_charbuffer_11->m_data[0x7ffffffffffffffe];
0067cf50          
0067cf59          if (ecx_78 != 1)
0067cf62              PStringBase<unsigned short>::append_n_chars(&arg1, m_charbuffer_11, (ecx_78 - 1));
0067cf62          
0067cf6b          void* esi_34 = (__return - 0x14);
0067cf72          int32_t __return_3;
0067cf72          class PStringBase<unsigned short>* ecx_81;
0067cf72          class PStringBase<unsigned short>* edx_40;
0067cf72          __return_3 = InterlockedDecrement(((char*)esi_34 + 4));
0067cf72          
0067cf7a          if ((__return_3 == 0 && esi_34 != 0))
0067cf82              __return_3 = **(uint32_t**)esi_34(1);
0067cf82          
0067cf88          class PSRefBufferCharData<unsigned short>** var_64_70 = &var_4c;
0067cf8d          class PSRefBufferCharData<unsigned short>** var_68_16 = &PStringBase<unsigned short>::s_NullBuffer_12;
0067cf92          void** var_6c_4 = &__return;
0067cf98          class PSRefBufferCharData<unsigned short>* m_charbuffer_12 = StringTableMetaLanguage::TakeValidLetters(__return_3, edx_40, ecx_81)->m_charbuffer;
0067cf9a          int32_t ecx_83 = m_charbuffer_12->m_data[0x7ffffffffffffffe];
0067cf9a          
0067cfa3          if (ecx_83 != 1)
0067cfac              PStringBase<unsigned short>::append_n_chars(&arg1, m_charbuffer_12, (ecx_83 - 1));
0067cfac          
0067cfb5          void* esi_36 = (__return - 0x14);
0067cfbc          int32_t eax_97;
0067cfbc          uint16_t* edx_42;
0067cfbc          eax_97 = InterlockedDecrement(((char*)esi_36 + 4));
0067cfbc          
0067cfc4          if ((eax_97 == 0 && esi_36 != 0))
0067cfcc              edx_42 = **(uint32_t**)esi_36(1);
0067cfcc          
0067cfce          class StringTableMetaLanguage::Node* eax_98 = arg1;
0067cfd2          class StringTableMetaLanguage::Node* var_64_73 = eax_98;
0067cfd3          wchar16 const* const var_68_18 = u"[%ls]";
0067cfd8          class PStringBase<unsigned short>* var_6c_5 = arg2;
0067cfd9          PStringBase<unsigned short>::sprintf_append(eax_98, edx_42);
0067cfe2          void* __offset(StringTableMetaLanguage::Node, -0x14) esi_38 = ((char*)arg1 - 0x14);
0067cfe2          
0067cff4          if ((InterlockedDecrement(((char*)esi_38 + 4)) == 0 && esi_38 != 0))
0067cffc              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_38) + -0x14)(1);
0067cffc          
0067d002          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_40 = &PStringBase<unsigned short>::s_NullBuffer_12->m_data[-0xa];
0067d002          
0067d011          if ((InterlockedDecrement(((char*)esi_40 + 4)) == 0 && esi_40 != 0))
0067d019              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_40) + -0x14)(1);
0067d019          
0067d01f          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_42 = &PStringBase<unsigned short>::s_NullBuffer_11->m_data[-0xa];
0067d01f          
0067d02e          if ((InterlockedDecrement(((char*)esi_42 + 4)) == 0 && esi_42 != 0))
0067d036              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_42) + -0x14)(1);
0067d036          
0067d03c          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_44 = &PStringBase<unsigned short>::s_NullBuffer_10->m_data[-0xa];
0067d03c          
0067d04b          if ((InterlockedDecrement(((char*)esi_44 + 4)) == 0 && esi_44 != 0))
0067d053              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_44) + -0x14)(1);
0067ce95      }
0067ce95      
0067d05d      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_46 = &var_4c->m_data[-0xa];
0067d05d      
0067d06c      if ((InterlockedDecrement(((char*)esi_46 + 4)) == 0 && esi_46 != 0))
0067d074          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_46) + -0x14)(1);
0067d074      
0067d07a      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_48 = &var_48->m_data[-0xa];
0067d07a      
0067d089      if ((InterlockedDecrement(((char*)esi_48 + 4)) == 0 && esi_48 != 0))
0067d091          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_48) + -0x14)(1);
0067d091      
0067d097      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_50 = &var_44->m_data[-0xa];
0067d09e      int32_t eax_111;
0067d09e      void* ecx_94;
0067d09e      eax_111 = InterlockedDecrement(((char*)esi_50 + 4));
0067d09e      
0067d0a6      if ((eax_111 == 0 && esi_50 != 0))
0067d0ae          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_50) + -0x14)(1);
0067d0ae      
0067d0b0      void* i_9 = var_c;
0067d0b9      int32_t var_10_5 = 0x7fe1e0;
0067d0b9      
0067d0c2      while (i_9 != 0)
0067d0c2      {
0067d0c4          void* i_17 = i_9;
0067d0c6          i_9 = *(uint32_t*)((char*)i_9 + 4);
0067d0cb          void* i_14 = i_9;
0067d0cb          
0067d0cf          if (i_9 == 0)
0067d0da              int32_t var_8_5 = 0;
0067d0cf          else
0067d0cf          {
0067d0d1              *(uint32_t*)((char*)i_9 + 8) = 0;
0067d0d4              i_9 = i_14;
0067d0cf          }
0067d0cf          
0067d0e0          if (i_17 != 0)
0067d0e0          {
0067d0e3              operator delete(i_17);
0067d0e8              i_9 = i_14;
0067d0e0          }
0067d0e0          
0067d0ef          var_4 -= 1;
0067d0c2      }
0067d0c2      
0067d0f5      void* i_10 = var_1c;
0067d0f9      int32_t var_20_5 = 0x7fe1e0;
0067d0f9      
0067d102      while (i_10 != 0)
0067d102      {
0067d104          void* i_18 = i_10;
0067d106          i_10 = *(uint32_t*)((char*)i_10 + 4);
0067d10b          void* i_11 = i_10;
0067d10b          
0067d10f          if (i_10 == 0)
0067d11a              int32_t var_18_5 = 0;
0067d10f          else
0067d10f          {
0067d111              *(uint32_t*)((char*)i_10 + 8) = 0;
0067d114              i_10 = i_11;
0067d10f          }
0067d10f          
0067d120          if (i_18 != 0)
0067d120          {
0067d123              operator delete(i_18);
0067d128              i_10 = i_11;
0067d120          }
0067d120          
0067d12f          var_14 -= 1;
0067d102      }
0067d102      
0067d138      i_10 = 1;
0067d13e      return 1;
0067c3c0  }

0067c56d                                         8d 49 00                                                               .I.
0067d13f                                                                                               90                                 .
0067d140  uint32_t jump_table_67d140[0x4] = 
0067d140  {
0067d140      [0x0] =  0x0067c899
0067d144      [0x1] =  0x0067c8b6
0067d148      [0x2] =  0x0067ca43
0067d14c      [0x3] =  0x0067cb4a
0067d150  }

0067d150  uint8_t StringTableMetaLanguage::RenderString(class SmartArray<PStringBase<unsigned short>,1> const* arg1, class SmartArray<PStringBase<unsigned short>,1> const* arg2, class SmartArray<PStringBase<unsigned short>,1> const* arg3, class PStringBase<unsigned short>* arg4, class SmartArray<PStringBase<unsigned short>,1>* arg5, uint32_t arg6, struct StringTableMetaLanguage::RenderErr* arg7)

0067d150  {
0067d153      int32_t ebx;
0067d153      int32_t var_30 = ebx;
0067d166      StringTableMetaLanguage::curError.pos = 0xffffffff;
0067d16c      StringTableMetaLanguage::curError.code = recSuccess;
0067d172      PStringBase<char>::set(&StringTableMetaLanguage::curError.msg, &data_7928af);
0067d177      class SmartArray<PStringBase<unsigned short>,1>* ebp = arg3;
0067d17e      int32_t var_24 = 0xffffffff;
0067d182      int32_t var_10 = 0xffffffff;
0067d186      int32_t var_28 = 0xffffffff;
0067d18a      int32_t var_2c = 0;
0067d18a      
0067d18e      if (ebp->m_num <= 0)
0067d57c          StringTableMetaLanguage::LoadTokenizer(arg1, arg2);
0067d18e      else
0067d18e      {
0067d41b          bool cond:2_1;
0067d41b          
0067d41b          do
0067d41b          {
0067d1a7              class PStringBase<unsigned short> var_20;
0067d1a7              PStringBase<unsigned short>::allocate_ref_buffer(&var_20, wcslen(&data_798148));
0067d1b6              wcscpy(var_20, &data_798148);
0067d1c3              class PStringBase<unsigned short> ecx_2 = var_20;
0067d1ca              int32_t edi_2 = (var_2c << 2);
0067d1cf              void* eax_5 = *(uint32_t*)(ebp->m_data + edi_2);
0067d1cf              
0067d1d9              if (*(uint32_t*)((char*)eax_5 - 4) == *(uint32_t*)(ecx_2 - 4))
0067d1d9              {
0067d1df                  int32_t edx_2 = *(uint32_t*)((char*)eax_5 - 8);
0067d1e2                  int32_t esi_2 = *(uint32_t*)(ecx_2 - 8);
0067d1e2                  
0067d1f1                  if (((edx_2 == esi_2 || edx_2 == 0xffffffff) || esi_2 == 0xffffffff))
0067d1f1                  {
0067d1f9                      int32_t eax_6 = wcscmp(eax_5, ecx_2);
0067d1ff                      ecx_2 = var_20;
0067d208                      ebx = -(eax_6);
0067d20a                      ebx = (ebx - ebx);
0067d20c                      ebx += 1;
0067d1f1                  }
0067d1f1                  else
0067d1f3                      ebx = 0;
0067d1d9              }
0067d1d9              else
0067d1db                  ebx = 0;
0067d1db              
0067d221              if ((InterlockedDecrement((ecx_2 - 0x10)) == 0 && ecx_2 != 0x14))
0067d229                  **(uint32_t**)(ecx_2 - 0x14)(1);
0067d229              
0067d22d              if (ebx == 0)
0067d22d              {
0067d251                  class PStringBase<unsigned short> var_18;
0067d251                  PStringBase<unsigned short>::allocate_ref_buffer(&var_18, wcslen(&data_798134));
0067d260                  wcscpy(var_18, &data_798134);
0067d269                  class PStringBase<unsigned short> ecx_6 = var_18;
0067d272                  void* eax_13 = *(uint32_t*)(ebp->m_data + edi_2);
0067d272                  
0067d27c                  if (*(uint32_t*)((char*)eax_13 - 4) != *(uint32_t*)(ecx_6 - 4))
0067d27c                  {
0067d2bc                  label_67d2bc:
0067d2bc                      class PStringBase<unsigned short> var_1c;
0067d2bc                      PStringBase<unsigned short>::allocate_ref_buffer(&var_1c, wcslen(u"NAME"));
0067d2cb                      wcscpy(var_1c, u"NAME");
0067d2d4                      class PStringBase<unsigned short> ecx_8 = var_1c;
0067d2dd                      void* eax_20 = *(uint32_t*)(ebp->m_data + edi_2);
0067d2dd                      
0067d2e7                      if (*(uint32_t*)((char*)eax_20 - 4) == *(uint32_t*)(ecx_8 - 4))
0067d2e7                      {
0067d2ed                          int32_t edx_7 = *(uint32_t*)((char*)eax_20 - 8);
0067d2f0                          int32_t esi_7 = *(uint32_t*)(ecx_8 - 8);
0067d2f0                          
0067d2ff                          if (((edx_7 == esi_7 || edx_7 == 0xffffffff) || esi_7 == 0xffffffff))
0067d2ff                          {
0067d307                              int32_t eax_21 = wcscmp(eax_20, ecx_8);
0067d30d                              ecx_8 = var_1c;
0067d316                              ebx = -(eax_21);
0067d318                              ebx = (ebx - ebx);
0067d31a                              ebx += 1;
0067d2ff                          }
0067d2ff                          else
0067d301                              ebx = 0;
0067d2e7                      }
0067d2e7                      else
0067d2e9                          ebx = 0;
0067d2e9                      
0067d32f                      if ((InterlockedDecrement((ecx_8 - 0x10)) == 0 && ecx_8 != 0x14))
0067d337                          **(uint32_t**)(ecx_8 - 0x14)(1);
0067d337                      
0067d33b                      if (ebx != 0)
0067d33d                          ebx = 1;
0067d27c                  }
0067d27c                  else
0067d27c                  {
0067d27e                      int32_t edx_5 = *(uint32_t*)((char*)eax_13 - 8);
0067d281                      int32_t esi_5 = *(uint32_t*)(ecx_6 - 8);
0067d281                      
0067d290                      if (((edx_5 != esi_5 && edx_5 != 0xffffffff) && esi_5 != 0xffffffff))
0067d286                          goto label_67d2bc;
0067d286                      
0067d294                      int32_t eax_14 = wcscmp(eax_13, ecx_6);
0067d29d                      char eax_15 = ((int8_t)-(eax_14));
0067d29f                      eax_15 = (eax_15 - eax_15);
0067d2a3                      arg3 = (eax_15 + 1);
0067d2a3                      
0067d2a7                      if (eax_15 == 0xff)
0067d2a7                          goto label_67d2bc;
0067d2a7                      
0067d33d                      ebx = 1;
0067d27c                  }
0067d27c                  
0067d343                  int32_t* esi_10 = (var_18 - 0x14);
0067d343                  
0067d356                  if ((InterlockedDecrement(&esi_10[1]) == 0 && esi_10 != 0))
0067d35e                      **(uint32_t**)esi_10(1);
0067d35e                  
0067d362                  if (ebx == 0)
0067d362                  {
0067d384                      class PStringBase<unsigned short> var_14;
0067d384                      PStringBase<unsigned short>::allocate_ref_buffer(&var_14, wcslen(u"POST"));
0067d393                      wcscpy(var_14, u"POST");
0067d39c                      class PStringBase<unsigned short> ecx_13 = var_14;
0067d3a5                      void* eax_30 = *(uint32_t*)(ebp->m_data + edi_2);
0067d3a5                      
0067d3af                      if (*(uint32_t*)((char*)eax_30 - 4) == *(uint32_t*)(ecx_13 - 4))
0067d3af                      {
0067d3b5                          int32_t edx_11 = *(uint32_t*)((char*)eax_30 - 8);
0067d3b8                          int32_t esi_12 = *(uint32_t*)(ecx_13 - 8);
0067d3b8                          
0067d3c7                          if (((edx_11 == esi_12 || edx_11 == 0xffffffff) || esi_12 == 0xffffffff))
0067d3c7                          {
0067d3cf                              int32_t eax_31 = wcscmp(eax_30, ecx_13);
0067d3d5                              ecx_13 = var_14;
0067d3de                              ebx = -(eax_31);
0067d3e0                              ebx = (ebx - ebx);
0067d3e2                              ebx += 1;
0067d3c7                          }
0067d3c7                          else
0067d3c9                              ebx = 0;
0067d3af                      }
0067d3af                      else
0067d3b1                          ebx = 0;
0067d3b1                      
0067d3f7                      if ((InterlockedDecrement((ecx_13 - 0x10)) == 0 && ecx_13 != 0x14))
0067d3ff                          **(uint32_t**)(ecx_13 - 0x14)(1);
0067d3ff                      
0067d403                      if (ebx != 0)
0067d409                          var_28 = var_2c;
0067d362                  }
0067d362                  else
0067d368                      var_10 = var_2c;
0067d22d              }
0067d22d              else
0067d233                  var_24 = var_2c;
0067d233              
0067d415              cond:2_1 = (var_2c + 1) < ebp->m_num;
0067d417              var_2c += 1;
0067d41b          } while (cond:2_1);
0067d41b          
0067d45e          if ((var_10 == 0xffffffff || (var_24 == 0xffffffff && var_28 == var_24)))
0067d57c              StringTableMetaLanguage::LoadTokenizer(arg1, arg2);
0067d45e          else
0067d45e          {
0067d44a              class PStringBase<char>* var_c = nullptr;
0067d44e              int32_t var_8_1 = 0;
0067d452              int32_t var_4_1 = 0;
0067d456              SmartArray<PStringBase<unsigned short>,1>::operator=(&var_c, arg2);
0067d456              
0067d45e              if (var_24 != 0xffffffff)
0067d45e              {
0067d464                  int32_t* esi_15 = &var_c[var_24];
0067d478                  ebx = StringTableMetaLanguage::UnescapeString(&arg3, esi_15);
0067d47a                  void* eax_38 = *(uint32_t*)esi_15;
0067d47a                  
0067d483                  if (eax_38 != *(uint32_t*)ebx)
0067d483                  {
0067d494                      if ((InterlockedDecrement(((char*)eax_38 - 0x10)) == 0 && eax_38 != 0x14))
0067d49c                          **(uint32_t**)((char*)eax_38 - 0x14)(1);
0067d49c                      
0067d49e                      int32_t eax_40 = *(uint32_t*)ebx;
0067d4a0                      *(uint32_t*)esi_15 = eax_40;
0067d4a6                      InterlockedIncrement((eax_40 - 0x10));
0067d483                  }
0067d483                  
0067d4b0                  void* __offset(SmartArray<PStringBase<unsigned short>,1>, -0x14) esi_17 = ((char*)arg3 - 0x14);
0067d4b0                  
0067d4bf                  if ((InterlockedDecrement(((char*)esi_17 + 4)) == 0 && esi_17 != 0))
0067d4c7                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_17) + -0x14)(1);
0067d45e              }
0067d45e              
0067d4d8              if (var_28 != 0xffffffff)
0067d4d8              {
0067d4de                  int32_t* esi_18 = &var_c[var_28];
0067d4ec                  ebx = StringTableMetaLanguage::UnescapeString(&arg3, esi_18);
0067d4ee                  void* eax_46 = *(uint32_t*)esi_18;
0067d4ee                  
0067d4f7                  if (eax_46 != *(uint32_t*)ebx)
0067d4f7                  {
0067d508                      if ((InterlockedDecrement(((char*)eax_46 - 0x10)) == 0 && eax_46 != 0x14))
0067d510                          **(uint32_t**)((char*)eax_46 - 0x14)(1);
0067d510                      
0067d512                      int32_t eax_49 = *(uint32_t*)ebx;
0067d514                      *(uint32_t*)esi_18 = eax_49;
0067d51a                      InterlockedIncrement((eax_49 - 0x10));
0067d4f7                  }
0067d4f7                  
0067d524                  void* __offset(SmartArray<PStringBase<unsigned short>,1>, -0x14) esi_20 = ((char*)arg3 - 0x14);
0067d524                  
0067d533                  if ((InterlockedDecrement(((char*)esi_20 + 4)) == 0 && esi_20 != 0))
0067d53b                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_20) + -0x14)(1);
0067d4d8              }
0067d4d8              
0067d547              StringTableMetaLanguage::LoadTokenizer(arg1, &var_c);
0067d547              
0067d55f              if ((var_8_1 & 0x80000000) == 0x80000000)
0067d55f              {
0067d561                  class PStringBase<char>* ecx_27 = var_c;
0067d561                  
0067d567                  if (ecx_27 != 0)
0067d56b                      PStringBase<char>::`vector deleting destructor'(ecx_27, 3);
0067d55f              }
0067d45e          }
0067d18e      }
0067d18e      
0067d58a      StringTableMetaLanguage::InitRules();
0067d58f      stringmeta_parse();
0067d58f      
0067d59b      if (StringTableMetaLanguage::curError.code == recSuccess)
0067d59b      {
0067d5c0          StringTableMetaLanguage::RenderNodes(StringTableMetaLanguage::GetRoot(), arg4, arg5, var_24, var_10, var_28);
0067d5c0          
0067d5d6          if ((StringTableMetaLanguage::curError.code == recSuccess && (arg6 & 1) != 0))
0067d5d6          {
0067d5e1              PStringBase<unsigned short>::PStringBase<unsigned short>(&arg3, u"keepspaces");
0067d5f9              ebx = SmartArray<PStringBase<unsigned short>,1>::WhatNum(arg5, &arg3) == 0xffffffff;
0067d5fc              void* __offset(SmartArray<PStringBase<unsigned short>,1>, -0x14) esi_23 = ((char*)arg3 - 0x14);
0067d5fc              
0067d60b              if ((InterlockedDecrement(((char*)esi_23 + 4)) == 0 && esi_23 != 0))
0067d613                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_23) + -0x14)(1);
0067d613              
0067d617              if (ebx != 0)
0067d61a                  StringTableMetaLanguage::TrimExcessSpaces(arg4);
0067d5d6          }
0067d59b      }
0067d59b      
0067d628      if (arg7 != 0)
0067d628      {
0067d62f          arg7->pos = StringTableMetaLanguage::curError.pos;
0067d637          arg7->code = StringTableMetaLanguage::curError.code;
0067d63a          class PSRefBufferCharData<char>* m_charbuffer = arg7->msg.m_charbuffer;
0067d63a          
0067d643          if (m_charbuffer != StringTableMetaLanguage::curError.msg.m_charbuffer)
0067d643          {
0067d654              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0067d65c                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0067d65c              
0067d65e              class PStringBase<char> m_charbuffer_1 = StringTableMetaLanguage::curError.msg.m_charbuffer;
0067d663              arg7->msg.m_charbuffer = m_charbuffer_1;
0067d66a              InterlockedIncrement((m_charbuffer_1 - 0x10));
0067d643          }
0067d628      }
0067d628      
0067d670      StringTableMetaLanguage::CleanRules();
0067d689      return StringTableMetaLanguage::curError.code == recSuccess;
0067d150  }

0067d68a                                90 90 90 90 90 90                                                            ......

0067d690  class StringTableMetaLanguage::Node const* StringTableMetaLanguage::GetRoot()

0067d690  {
0067d695      return StringTableMetaLanguage::g_Root;
0067d690  }

0067d696                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0067d6a0  uint8_t StringTableMetaLanguage::IsInChoiceBlock()

0067d6a0  {
0067d6a0      class StringTableMetaLanguage::Node* StringTableMetaLanguage::g_curNode_1 = StringTableMetaLanguage::g_curNode;
0067d6a0      
0067d6ad      if ((StringTableMetaLanguage::g_curNode_1 != 0 && StringTableMetaLanguage::g_curNode_1->type == ntChoiceBlock))
0067d6b4          return 1;
0067d6b4      
0067d6b7      return 0;
0067d6a0  }

0067d6b8                                                                          90 90 90 90 90 90 90 90                          ........

0067d6c0  void __thiscall StringTableMetaLanguage::Node::AddChild(class StringTableMetaLanguage::Node* this, class StringTableMetaLanguage::Node const* arg2)

0067d6c0  {
0067d6c5      void* eax = operator new(0xc);
0067d6c5      
0067d6d1      if (eax != 0)
0067d6d1      {
0067d6d7          *(uint32_t*)eax = arg2;
0067d6d9          *(uint32_t*)((char*)eax + 4) = 0;
0067d6dc          *(uint32_t*)((char*)eax + 8) = 0;
0067d6dc          
0067d6e2          if (this->children._head == 0)
0067d6e2          {
0067d6e4              this->children._head = eax;
0067d6e7              this->children._tail = eax;
0067d6ea              this->children._num_elements += 1;
0067d6ee              return;
0067d6e2          }
0067d6e2          
0067d6f1          class ListNode<StringTableMetaLanguage::Node const *>* _tail = this->children._tail;
0067d6f4          _tail->next = eax;
0067d6f7          *(uint32_t*)((char*)eax + 8) = _tail;
0067d6fa          this->children._tail = eax;
0067d6fd          this->children._num_elements += 1;
0067d6d1      }
0067d6c0  }

0067d704              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0067d710  void StringTableMetaLanguage::AddNode(class StringTableMetaLanguage::Node* arg1)

0067d710  {
0067d71b      arg1->pos = (StringTableMetaLanguage::GetCurrentStreamPosition() - 1);
0067d71e      class StringTableMetaLanguage::Node* StringTableMetaLanguage::g_curNode_1 = StringTableMetaLanguage::g_curNode;
0067d726      StringTableMetaLanguage::g_lastAddedNode = arg1;
0067d726      
0067d72c      if (StringTableMetaLanguage::g_curNode_1 != 0)
0067d72c      {
0067d731          if (arg1 != StringTableMetaLanguage::g_curNode_1)
0067d731          {
0067d74a              StringTableMetaLanguage::Node::AddChild(StringTableMetaLanguage::g_curNode_1, arg1);
0067d750              return;
0067d731          }
0067d731          
0067d739          StringTableMetaLanguage::Node::AddChild(StringTableMetaLanguage::g_Root, arg1);
0067d73e          StringTableMetaLanguage::g_curNode = nullptr;
0067d749          return;
0067d72c      }
0067d72c      
0067d75a      class List<StringTableMetaLanguage::Node const *>* esi_1 = &StringTableMetaLanguage::g_Root->children;
0067d75d      class StringTableMetaLanguage::Node** eax_2 = operator new(0xc);
0067d75d      
0067d767      if (eax_2 != 0)
0067d767      {
0067d769          *(uint32_t*)eax_2 = arg1;
0067d76b          eax_2[1] = 0;
0067d772          eax_2[2] = 0;
0067d772          
0067d77e          if (esi_1->_head == 0)
0067d77e          {
0067d780              esi_1->_head = eax_2;
0067d783              esi_1->_tail = eax_2;
0067d786              esi_1->_num_elements += 1;
0067d78b              return;
0067d77e          }
0067d77e          
0067d78c          class ListNode<StringTableMetaLanguage::Node const *>* _tail = esi_1->_tail;
0067d78f          _tail->next = eax_2;
0067d792          eax_2[2] = _tail;
0067d795          esi_1->_tail = eax_2;
0067d798          esi_1->_num_elements += 1;
0067d767      }
0067d710  }

0067d79e                                                                                            90 90                                ..

0067d7a0  void StringTableMetaLanguage::r_Flags(class PStringBase<unsigned short> const* arg1)

0067d7a0  {
0067d7a8      class StringTableMetaLanguage::Node* StringTableMetaLanguage::g_lastAddedNode_1 = StringTableMetaLanguage::g_lastAddedNode;
0067d7ae      class PSRefBufferCharData<unsigned short>* m_charbuffer = StringTableMetaLanguage::g_lastAddedNode_1->flags.m_charbuffer;
0067d7ae      
0067d7b6      if (m_charbuffer != arg1->m_charbuffer)
0067d7b6      {
0067d7cc          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0067d7d4              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0067d7d4          
0067d7d6          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg1->m_charbuffer;
0067d7b1          StringTableMetaLanguage::g_lastAddedNode_1->flags.m_charbuffer = m_charbuffer_1;
0067d7de          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
0067d7b6      }
0067d7a0  }

0067d7e8                          90 90 90 90 90 90 90 90                                                          ........

0067d7f0  uint8_t StringTableMetaLanguage::CheckForErrorsInChoiceBlock(class StringTableMetaLanguage::Node const* arg1)

0067d7f0  {
0067d7f5      class ListNode<StringTableMetaLanguage::Node const *>* i = arg1->children._head;
0067d7f8      class StringTableMetaLanguage::Node* eax;
0067d7f8      eax = 0;
0067d7f8      
0067d7fc      for (; i != 0; i = i->next)
0067d7fc      {
0067d809          if (i->data->flags.m_charbuffer->m_data[0x7ffffffffffffffe] == 1)
0067d809          {
0067d80d              if (eax != 0)
0067d80d              {
0067d825                  PStringBase<char>::PStringBase<char>(&arg1, "multiple default choices in this…");
0067d837                  StringTableMetaLanguage::SetError(i->data->pos, recDuplicateChoices, &arg1);
0067d840                  void* __offset(StringTableMetaLanguage::Node, -0x14) esi_1 = ((char*)arg1 - 0x14);
0067d840                  
0067d856                  if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0067d85e                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0067d85e                  
0067d860                  int32_t eax_2;
0067d860                  eax_2 = 0;
0067d863                  return 0;
0067d80d              }
0067d80d              
0067d80f              eax = 1;
0067d809          }
0067d7fc      }
0067d7fc      
0067d818      eax = 1;
0067d81b      return 1;
0067d7f0  }

0067d864              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0067d870  void __fastcall StringTableMetaLanguage::Node::Reset(class StringTableMetaLanguage::Node* this)

0067d870  {
0067d877      this->type = ntInvalid;
0067d877      
0067d87f      for (class ListNode<StringTableMetaLanguage::Node const *>* i = this->children._head; i != 0; i = i->next)
0067d87f      {
0067d882          class StringTableMetaLanguage::Node* data = i->data;
0067d882          
0067d886          if (data != 0)
0067d886          {
0067d88a              StringTableMetaLanguage::Node::~Node(data);
0067d890              operator delete(data);
0067d886          }
0067d87f      }
0067d87f      
0067d8a0      while (true)
0067d8a0      {
0067d8a0          class ListNode<StringTableMetaLanguage::Node const *>* _head = this->children._head;
0067d8a0          
0067d8a5          if (_head == 0)
0067d8a5              break;
0067d8a5          
0067d8a7          class ListNode<StringTableMetaLanguage::Node const *>* next = _head->next;
0067d8ac          this->children._head = next;
0067d8ac          
0067d8af          if (next == 0)
0067d8b6              this->children._tail = nullptr;
0067d8af          else
0067d8b1              next->prev = nullptr;
0067d8b1          
0067d8bb          if (_head != 0)
0067d8be              operator delete(_head);
0067d8be          
0067d8c6          this->children._num_elements -= 1;
0067d8a0      }
0067d870  }

0067d8cf                                               90                                                                 .

0067d8d0  void StringTableMetaLanguage::r_ChoiceBlockEnd()

0067d8d0  {
0067d8d6      StringTableMetaLanguage::CheckForErrorsInChoiceBlock(StringTableMetaLanguage::g_curNode);
0067d8e2      StringTableMetaLanguage::AddNode(StringTableMetaLanguage::g_curNode);
0067d8d0  }

0067d8eb                                   90 90 90 90 90                                                             .....

0067d8f0  void __thiscall StringTableMetaLanguage::Node::Node(class StringTableMetaLanguage::Node* this, enum StringTableMetaLanguage::NodeType arg2)

0067d8f0  {
0067d8f0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0067d8f7      class PSRefBufferCharData<unsigned short>** this_1 = this;
0067d906      *(uint32_t*)this_1 = PStringBase<unsigned short>::s_NullBuffer_2;
0067d908      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
0067d90e      this_1[1] = arg2;
0067d913      this_1[2] = 0x7fe1e0;
0067d91a      __builtin_memset(&this_1[3], 0, 0x11);
0067d929      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067d934      this_1[8] = PStringBase<unsigned short>::s_NullBuffer_1;
0067d937      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0067d93a      this_1[9] = 0;
0067d8f0  }

0067d944              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0067d950  void __fastcall StringTableMetaLanguage::Node::~Node(class StringTableMetaLanguage::Node* this)

0067d950  {
0067d955      StringTableMetaLanguage::Node::Reset(this);
0067d963      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = (this->flags.m_charbuffer - 0x14);
0067d963      
0067d972      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0067d97a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0067d97a      
0067d97c      this->children.vtable = 0x7fe1e0;
0067d985      List<StringTableMetaLanguage::Node const *>::flush(&this->children);
0067d98c      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3 = (this->text.m_charbuffer - 0x14);
0067d98c      
0067d99b      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0067d9a3          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0067d950  }

0067d9a9                             90 90 90 90 90 90 90                                                           .......

0067d9b0  void StringTableMetaLanguage::InitRules()

0067d9b0  {
0067d9b5      StringTableMetaLanguage::g_lastAddedNode = nullptr;
0067d9bb      StringTableMetaLanguage::g_curNode = nullptr;
0067d9c1      StringTableMetaLanguage::g_Root = nullptr;
0067d9c7      void* eax = operator new(0x28);
0067d9c7      
0067d9d1      if (eax != 0)
0067d9d1      {
0067d9dc          StringTableMetaLanguage::g_Root = StringTableMetaLanguage::Node::Node(eax, ntRootNode);
0067d9e2          return;
0067d9d1      }
0067d9d1      
0067d9e3      StringTableMetaLanguage::g_Root = nullptr;
0067d9b0  }

0067d9eb                                   90 90 90 90 90                                                             .....

0067d9f0  void StringTableMetaLanguage::CleanRules()

0067d9f0  {
0067d9f0      class StringTableMetaLanguage::Node* StringTableMetaLanguage::g_Root_1 = StringTableMetaLanguage::g_Root;
0067d9f0      
0067d9fe      if (StringTableMetaLanguage::g_Root_1 != 0)
0067d9fe      {
0067da00          StringTableMetaLanguage::Node::~Node(StringTableMetaLanguage::g_Root_1);
0067da06          operator delete(StringTableMetaLanguage::g_Root_1);
0067d9fe      }
0067d9fe      
0067da0e      class StringTableMetaLanguage::Node* StringTableMetaLanguage::g_curNode_1 = StringTableMetaLanguage::g_curNode;
0067da16      StringTableMetaLanguage::g_Root = nullptr;
0067da16      
0067da1e      if (StringTableMetaLanguage::g_curNode_1 != 0)
0067da1e      {
0067da20          StringTableMetaLanguage::Node::~Node(StringTableMetaLanguage::g_curNode_1);
0067da26          operator delete(StringTableMetaLanguage::g_curNode_1);
0067da1e      }
0067da1e      
0067da2e      StringTableMetaLanguage::g_curNode = nullptr;
0067da34      StringTableMetaLanguage::g_lastAddedNode = nullptr;
0067d9f0  }

0067da3d                                                                                         90 90 90                               ...

0067da40  void StringTableMetaLanguage::r_Text(class PStringBase<unsigned short> const* arg1)

0067da40  {
0067da44      void* eax = operator new(0x28);
0067da4e      int32_t* esi;
0067da4e      
0067da4e      if (eax == 0)
0067da5d          esi = nullptr;
0067da4e      else
0067da59          esi = StringTableMetaLanguage::Node::Node(eax, ntText);
0067da59      
0067da63      void* eax_2 = *(uint32_t*)esi;
0067da63      
0067da67      if (eax_2 != arg1->m_charbuffer)
0067da67      {
0067da7d          if ((InterlockedDecrement(((char*)eax_2 - 0x10)) == 0 && eax_2 != 0x14))
0067da85              **(uint32_t**)((char*)eax_2 - 0x14)(1);
0067da85          
0067da87          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg1->m_charbuffer;
0067da89          *(uint32_t*)esi = m_charbuffer;
0067da8f          InterlockedIncrement(&m_charbuffer->m_data[-8]);
0067da67      }
0067da67      
0067da97      StringTableMetaLanguage::AddNode(esi);
0067da40  }

0067daa2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0067dab0  void StringTableMetaLanguage::r_Var(class PStringBase<unsigned short> const* arg1, int32_t arg2, uint8_t arg3)

0067dab0  {
0067dab9      void* eax = operator new(0x28);
0067dac3      int32_t* ebp;
0067dac3      
0067dac3      if (eax == 0)
0067dad2          ebp = nullptr;
0067dac3      else
0067dace          ebp = StringTableMetaLanguage::Node::Node(eax, ntVar);
0067dace      
0067dad8      uint8_t ecx_1 = arg3;
0067dadc      class PStringBase<unsigned short>* edi = arg1;
0067dae2      ebp[6] = arg2;
0067dae5      ebp[7] = ecx_1;
0067daed      wchar16* eax_3;
0067daed      int32_t ecx_3;
0067daed      eax_3 = PSUtils::wcschr_skipescapes(edi->m_charbuffer, 0x5b, 0x5c);
0067daf2      wchar16* esi = eax_3;
0067daf9      arg3 = esi;
0067daf9      
0067dafd      if (esi == 0)
0067dafd      {
0067de74          void* eax_33 = *(uint32_t*)ebp;
0067de74          
0067de79          if (eax_33 != edi->m_charbuffer)
0067de79          {
0067de8e              if ((InterlockedDecrement(((char*)eax_33 - 0x10)) == 0 && eax_33 != 0x14))
0067de96                  **(uint32_t**)((char*)eax_33 - 0x14)(1);
0067de96              
0067de98              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = edi->m_charbuffer;
0067de9a              *(uint32_t*)ebp = m_charbuffer_1;
0067dea1              InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
0067de79          }
0067de79          
0067deb1          arg3 = 0;
0067deb9          int32_t eax_36 = wcstol(edi->m_charbuffer, &arg3, 0xa);
0067debf          int16_t* ecx_38 = arg3;
0067debf          
0067dece          if (((ecx_38 != 0 && *(uint16_t*)ecx_38 == 0) && StringTableMetaLanguage::IsNumberSingular(eax_36) != 0))
0067dece          {
0067dee7              arg1 = 0x31;
0067deef              PStringBase<unsigned short>::append_n_chars(&ebp[8], &arg1, 1);
0067dece          }
0067dece          
0067defa          if (edi->m_charbuffer->m_data[0x7ffffffffffffffe] == 1)
0067defa          {
0067df06              arg1 = 0x62;
0067df0e              PStringBase<unsigned short>::append_n_chars(&ebp[8], &arg1, 1);
0067defa          }
0067defa          
0067df14          StringTableMetaLanguage::AddNode(ebp);
0067df14          return;
0067dafd      }
0067dafd      
0067db07      for (class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = edi->m_charbuffer; m_charbuffer_3 != esi; m_charbuffer_3 = &m_charbuffer_3->m_data[1])
0067db07      {
0067db12          int32_t eax_4;
0067db12          eax_4 = m_charbuffer_3->m_data[0];
0067db18          arg2 = eax_4;
0067db18          
0067db1c          if (eax_4 != 0)
0067db1c          {
0067db22              void* eax_5 = *(uint32_t*)ebp;
0067db29              int32_t edi_1 = *(uint32_t*)((char*)eax_5 - 4);
0067db29              
0067db34              if ((*(uint32_t*)((char*)eax_5 - 0x10) != 1 || (edi_1 + 1) > *(uint32_t*)((char*)eax_5 - 0xc)))
0067db34              {
0067db4c                  PStringBase<unsigned short>::allocate_ref_buffer(ebp, edi_1);
0067db59                  wcscpy(*(uint32_t*)ebp, eax_5);
0067db59                  
0067db72                  if ((InterlockedDecrement(((char*)eax_5 - 0x10)) == 0 && eax_5 != 0x14))
0067db7a                      **(uint32_t**)((char*)eax_5 - 0x14)(1);
0067db34              }
0067db34              else
0067db34              {
0067db36                  *(uint32_t*)((char*)eax_5 - 4) = (edi_1 + 1);
0067db3c                  *(uint32_t*)(*(uint32_t*)ebp - 8) = 0xffffffff;
0067db34              }
0067db34              
0067db8b              wcsncpy(((*(uint32_t*)ebp + (edi_1 << 1)) - 2), &arg2, 1);
0067db91              void* eax_9 = *(uint32_t*)ebp;
0067db94              ecx_3 = *(uint32_t*)((char*)eax_9 - 4);
0067db97              edi = arg1;
0067db9b              esi = arg3;
0067dba2              *(uint16_t*)(((char*)eax_9 + (ecx_3 << 1)) - 2) = 0;
0067db1c          }
0067db07      }
0067db07      
0067dbb4      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = PStringBase<unsigned short>::whitespace_string.m_charbuffer;
0067dbc0      int32_t var_24_4 = ecx_3;
0067dbcb      InterlockedIncrement(((char*)m_charbuffer_2 - 0x10));
0067dbd3      PStringBase<unsigned short>::trim(ebp, 0, 1, m_charbuffer_2);
0067dbde      void* esi_2 = &esi[1];
0067dbe2      arg3 = esi_2;
0067dbe6      wchar16* eax_12;
0067dbe6      int32_t ecx_12;
0067dbe6      eax_12 = PSUtils::wcschr_skipescapes(edi->m_charbuffer, 0x5d, 0x5c);
0067dbf0      wchar16* var_4_1 = eax_12;
0067dbf0      
0067dbf4      if (eax_12 == 0)
0067dbf4      {
0067dbff          PStringBase<char>::PStringBase<char>(&arg3, "variable-substitution string is …");
0067dc11          StringTableMetaLanguage::SetError(StringTableMetaLanguage::GetCurrentStreamPosition(), recSyntaxError, &arg3);
0067dc1a          int32_t* esi_4 = (arg3 - 0x14);
0067dc1a          
0067dc34          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0067dc40              **(uint32_t**)esi_4(1);
0067dc40          
0067dc34          return;
0067dbf4      }
0067dbf4      
0067dc4c      if (esi_2 != eax_12)
0067dc4c      {
0067dde3          do
0067dde3          {
0067dc52              eax_12 = *(uint16_t*)esi_2;
0067dc59              class PStringBase<unsigned short>* esi_7;
0067dc59              
0067dc59              if (eax_12 != 0x4d)
0067dc59              {
0067dd39                  if (eax_12 == 0x46)
0067dd39                  {
0067dd3b                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0067dd40                      arg2 = PStringBase<unsigned short>::s_NullBuffer_2;
0067dd48                      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0067dd4f                      StringTableMetaLanguage::GetFemaleMetaLetters(&arg2);
0067dd60                      class PStringBase<unsigned short>* var_10;
0067dd60                      class PStringBase<unsigned short>* __return_1;
0067dd60                      class PStringBase<unsigned short>* edx_9;
0067dd60                      __return_1 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, &data_7fe1b4);
0067dd69                      class PStringBase<unsigned short>** var_24_18 = &var_10;
0067dd6e                      void* var_8;
0067dd6e                      int32_t* var_28_7 = &var_8;
0067dd78                      uint16_t* eax_26 = *(uint32_t*)PStringBase<unsigned short>::operator+(&arg2, __return_1, edx_9);
0067dd7a                      int32_t ecx_27 = *(uint32_t*)((char*)eax_26 - 4);
0067dd7a                      
0067dd80                      if (ecx_27 != 1)
0067dd88                          PStringBase<unsigned short>::append_n_chars(&ebp[8], eax_26, (ecx_27 - 1));
0067dd88                      
0067dd97                      int32_t* esi_12 = ((char*)var_8 - 0x14);
0067dd97                      
0067dda6                      if ((InterlockedDecrement(&esi_12[1]) == 0 && esi_12 != 0))
0067ddae                          **(uint32_t**)esi_12(1);
0067ddae                      
0067ddb0                      esi_7 = var_10;
0067dda2                      goto label_67dcf9;
0067dd39                  }
0067dd39                  
0067ddbd                  if (eax_12 != 0x20)
0067ddbd                  {
0067ddbf                      arg2 = eax_12;
0067ddcd                      PStringBase<unsigned short>::append_n_chars(&ebp[8], &arg2, 1);
0067ddbd                  }
0067dc59              }
0067dc59              else
0067dc59              {
0067dc5f                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067dc64                  arg2 = PStringBase<unsigned short>::s_NullBuffer_1;
0067dc6c                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0067dc73                  StringTableMetaLanguage::GetMaleMetaLetters(&arg2);
0067dc8b                  PStringBase<unsigned short>::allocate_ref_buffer(&arg1, wcslen(&data_7fe1b8));
0067dc9a                  int32_t __return;
0067dc9a                  class PStringBase<unsigned short>* edx_5;
0067dc9a                  __return = wcscpy(arg1, &data_7fe1b8);
0067dca7                  class PStringBase<unsigned short> const** var_24_11 = &arg1;
0067dcac                  void* var_c;
0067dcac                  int32_t* var_28_5 = &var_c;
0067dcb6                  class PSRefBufferCharData<unsigned short>* m_charbuffer = PStringBase<unsigned short>::operator+(&arg2, __return, edx_5)->m_charbuffer;
0067dcb8                  int32_t ecx_18 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067dcb8                  
0067dcbe                  if (ecx_18 != 1)
0067dcc6                      PStringBase<unsigned short>::append_n_chars(&ebp[8], m_charbuffer, (ecx_18 - 1));
0067dcc6                  
0067dcd5                  int32_t* esi_6 = ((char*)var_c - 0x14);
0067dcd5                  
0067dce4                  if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
0067dcec                      **(uint32_t**)esi_6(1);
0067dcec                  
0067dcee                  esi_7 = arg1;
0067dcf9              label_67dcf9:
0067dcf9                  
0067dd01                  if ((InterlockedDecrement(&esi_7[-4]) == 0 && esi_7 != 0x14))
0067dd09                      *(uint32_t*)*(int32_t*)((char*)esi_7 + -0x14)(1);
0067dd09                  
0067dd0f                  int32_t* esi_10 = (arg2 - 0x14);
0067dd16                  int32_t eax_23;
0067dd16                  eax_23 = InterlockedDecrement(&esi_10[1]);
0067dd16                  
0067dd22                  if ((eax_23 == 0 && esi_10 != 0))
0067dd2e                      **(uint32_t**)esi_10(1);
0067dc59              }
0067ddda              esi_2 = (arg3 + 2);
0067dddf              arg3 = esi_2;
0067dde3          } while (esi_2 != var_4_1);
0067dc4c      }
0067dc4c      
0067dde9      eax_12 = *(uint16_t*)((char*)esi_2 + 2);
0067ddf3      arg3 = ((char*)esi_2 + 2);
0067ddf3      
0067ddf7      if (eax_12 != 0)
0067ddf7      {
0067de61          do
0067de61          {
0067de0a              if ((eax_12 != 0x20 && eax_12 != 9))
0067de0a              {
0067de15                  PStringBase<char>::PStringBase<char>(&arg1, "there is text after the ']' in a…");
0067de27                  StringTableMetaLanguage::SetError(StringTableMetaLanguage::GetCurrentStreamPosition(), recSyntaxError, &arg1);
0067de30                  void* __offset(PStringBase<unsigned short>, -0x14) esi_16 = &arg1[-5];
0067de30                  
0067de46                  if ((InterlockedDecrement(((char*)esi_16 + 4)) == 0 && esi_16 != 0))
0067de4e                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_16) + -0x14)(1);
0067de0a              }
0067de0a              
0067de57              arg3 += 2;
0067de5b              eax_12 = *(uint16_t*)(arg3 + 2);
0067de61          } while (eax_12 != 0);
0067de61          
0067de64          StringTableMetaLanguage::AddNode(ebp);
0067de73          return;
0067ddf7      }
0067ddf7      
0067df14      StringTableMetaLanguage::AddNode(ebp);
0067dab0  }

0067df24              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0067df30  void StringTableMetaLanguage::r_ChoiceBlockBegin(int32_t arg1)

0067df30  {
0067df32      void* eax = operator new(0x28);
0067df32      
0067df3c      if (eax == 0)
0067df3c      {
0067df5a          StringTableMetaLanguage::g_curNode = nullptr;
0067df5f          *(uint32_t*)0x18 = arg1;
0067df62          return;
0067df3c      }
0067df3c      
0067df42      class StringTableMetaLanguage::Node* eax_1 = StringTableMetaLanguage::Node::Node(eax, ntChoiceBlock);
0067df4b      StringTableMetaLanguage::g_curNode = eax_1;
0067df50      eax_1->ID = arg1;
0067df30  }

0067df63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0067df70  void StringTableMetaLanguage::r_OutsideInfoBlock(class PStringBase<unsigned short> const* arg1)

0067df70  {
0067df74      void* eax = operator new(0x28);
0067df7e      int32_t* esi;
0067df7e      
0067df7e      if (eax == 0)
0067df8d          esi = nullptr;
0067df7e      else
0067df89          esi = StringTableMetaLanguage::Node::Node(eax, ntOutsideVar);
0067df89      
0067df93      void* eax_2 = *(uint32_t*)esi;
0067df93      
0067df97      if (eax_2 != arg1->m_charbuffer)
0067df97      {
0067dfad          if ((InterlockedDecrement(((char*)eax_2 - 0x10)) == 0 && eax_2 != 0x14))
0067dfb5              **(uint32_t**)((char*)eax_2 - 0x14)(1);
0067dfb5          
0067dfb7          class PSRefBufferCharData<unsigned short>* m_charbuffer = arg1->m_charbuffer;
0067dfb9          *(uint32_t*)esi = m_charbuffer;
0067dfbf          InterlockedIncrement(&m_charbuffer->m_data[-8]);
0067df97      }
0067df97      
0067dfc7      StringTableMetaLanguage::AddNode(esi);
0067df70  }

0067dfd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067dfe0  int32_t stringmeta_parse()

0067dfe0  {
0067dff2      void var_340;
0067dff2      void* esi = &var_340;
0067dff8      int32_t i_5 = 0xc8;
0067e013      int32_t i;
0067e013      
0067e013      do
0067e013      {
0067e000          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067e00b          *(uint32_t*)esi = PStringBase<unsigned short>::s_NullBuffer_1;
0067e00d          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0067e00f          esi += 4;
0067e012          i = i_5;
0067e012          i_5 -= 1;
0067e013      } while (i != 1);
0067e015      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0067e01a      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0067e026      void var_4d0;
0067e026      void* edi = &var_4d0;
0067e02d      void* var_20 = &var_4d0;
0067e030      void* var_c = &var_340;
0067e033      int32_t var_18 = 0xc8;
0067e03a      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0067e044      int32_t var_10 = 0;
0067e047      int32_t var_1c = 0;
0067e04a      stringmeta_nerrs = 0;
0067e04f      stringmeta_char = 0xfffffffe;
0067e059      int32_t __saved_ebx;
0067e059      void* esi_1 = &*(uint32_t*)((char*)__saved_ebx)[2];
0067e05c      void* ebx = &var_340;
0067e05c      
0067e062      while (true)
0067e062      {
0067e062          int32_t ecx_4 = var_10;
0067e062          
0067e068          while (true)
0067e068          {
0067e068              esi_1 += 2;
0067e071              *(uint16_t*)esi_1 = ecx_4;
0067e071              
0067e074              if (esi_1 < (((char*)edi + (var_18 << 1)) - 2))
0067e074                  goto label_67e134;
0067e074              
0067e081              int32_t esi_4 = ((((char*)esi_1 - edi) >> 1) + 1);
0067e087              void* var_8_1 = var_c;
0067e08a              void* var_c_1 = edi;
0067e08a              
0067e08d              if (var_18 >= 0x2710)
0067e08d              {
0067e49b                  stringmeta_error("parser stack overflow");
0067e4a9                  void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_8 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
0067e4a9                  
0067e4bb                  if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
0067e4c3                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
0067e4c3                  
0067e4c5                  void** edi_8 = &var_20;
0067e4c8                  int32_t i_3 = 0xc8;
0067e4f2                  int32_t i_1;
0067e4f2                  
0067e4f2                  do
0067e4f2                  {
0067e4d0                      int32_t esi_9 = edi_8[-1];
0067e4d3                      edi_8 -= 4;
0067e4d3                      
0067e4e5                      if ((InterlockedDecrement((esi_9 - 0x10)) == 0 && esi_9 != 0x14))
0067e4ed                          **(uint32_t**)(esi_9 - 0x14)(1);
0067e4ed                      
0067e4ef                      i_1 = i_3;
0067e4ef                      i_3 -= 1;
0067e4f2                  } while (i_1 != 1);
0067e505                  return 2;
0067e08d              }
0067e08d              
0067e093              int32_t eax_3 = (var_18 * 2);
0067e09a              var_18 = eax_3;
0067e09a              
0067e09d              if (eax_3 > 0x2710)
0067e09f                  var_18 = 0x2710;
0067e09f              
0067e0b1              _chkstk();
0067e0b6              int32_t __saved_edi;
0067e0b6              edi = &__saved_edi;
0067e0b8              int32_t ebx_1 = (esi_4 * 2);
0067e0bd              var_20 = &__saved_edi;
0067e0c0              char* eax_8 = &__saved_edi;
0067e0c0              
0067e0c2              if (ebx_1 > 0)
0067e0c2              {
0067e0c9                  int32_t var_c_2 = ebx_1;
0067e0dd                  bool cond:8_1;
0067e0dd                  
0067e0dd                  do
0067e0dd                  {
0067e0d0                      int32_t edx_2;
0067e0d0                      edx_2 = eax_8[((char*)var_c_1 - &__saved_edi)];
0067e0d3                      *(uint8_t*)eax_8 = edx_2;
0067e0d8                      eax_8 = &eax_8[1];
0067e0d9                      cond:8_1 = var_c_2 != 1;
0067e0da                      var_c_2 -= 1;
0067e0dd                  } while (cond:8_1);
0067e0c2              }
0067e0c2              
0067e0eb              _chkstk();
0067e0f0              int32_t eax_13 = (esi_4 << 2);
0067e0f9              char* ecx_8 = &__saved_edi;
0067e0fb              var_c = &__saved_edi;
0067e0fb              
0067e0fe              if (eax_13 > 0)
0067e0fe              {
0067e105                  int32_t var_8_2 = eax_13;
0067e115                  bool cond:9_1;
0067e115                  
0067e115                  do
0067e115                  {
0067e108                      int32_t edx_4;
0067e108                      edx_4 = ecx_8[((char*)var_8_1 - &__saved_edi)];
0067e10b                      *(uint8_t*)ecx_8 = edx_4;
0067e110                      ecx_8 = &ecx_8[1];
0067e111                      cond:9_1 = var_8_2 != 1;
0067e112                      var_8_2 -= 1;
0067e115                  } while (cond:9_1);
0067e0fe              }
0067e0fe              
0067e11d              esi_1 = ((ebx_1 + &__saved_edi) - 2);
0067e121              ebx = ((eax_13 + var_c) - 4);
0067e121              
0067e12b              if (esi_1 < ((&__saved_edi + (var_18 << 1)) - 2))
0067e12b              {
0067e131                  ecx_4 = var_10;
0067e134              label_67e134:
0067e134                  int32_t edx_7 = ((int32_t)yypact[ecx_4]);
0067e145                  int32_t eax_15;
0067e145                  int32_t edx_8;
0067e145                  
0067e145                  if (edx_7 != 0xffff8000)
0067e145                  {
0067e14b                      int32_t stringmeta_char_1 = stringmeta_char;
0067e14b                      
0067e153                      if (stringmeta_char_1 == 0xfffffffe)
0067e153                      {
0067e155                          stringmeta_char_1 = stringmeta_lex();
0067e15a                          ecx_4 = var_10;
0067e160                          stringmeta_char = stringmeta_char_1;
0067e153                      }
0067e153                      
0067e167                      if (stringmeta_char_1 <= 0)
0067e167                      {
0067e169                          eax_15 = 0;
0067e16b                          stringmeta_char = 0;
0067e167                      }
0067e167                      else if (stringmeta_char_1 > 0x105)
0067e182                          eax_15 = 0x18;
0067e177                      else
0067e179                          eax_15 = ((int32_t)*(uint8_t*)(stringmeta_char_1 + 0x7fe3c8));
0067e179                      
0067e187                      edx_8 = (edx_7 + eax_15);
0067e145                  }
0067e145                  
0067e1a5                  int32_t var_8_6;
0067e1a5                  int32_t eax_18;
0067e1a5                  
0067e1a5                  if ((((edx_7 == 0xffff8000 || (edx_7 + eax_15) < 0) || edx_8 > 0x16) || ((int32_t)yycheck[edx_8]) != eax_15))
0067e1a5                  {
0067e287                      eax_18 = ((int32_t)yydefact[ecx_4]);
0067e291                      var_8_6 = eax_18;
0067e291                      
0067e294                      if (eax_18 != 0)
0067e294                          goto label_67e1d1;
0067e1a5                  }
0067e1a5                  else
0067e1a5                  {
0067e1ae                      int32_t eax_17 = ((int32_t)yytable[edx_8]);
0067e1ae                      
0067e1bb                      if (eax_17 >= 0)
0067e1bb                      {
0067e244                          if (eax_17 != 0)
0067e244                          {
0067e249                              if (eax_17 == 0x21)
0067e249                              {
0067e509                              label_67e509:
0067e509                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_3);
0067e521                                  `vector destructor iterator'(&var_340, 4, 0xc8, PStringBase<unsigned short>::~PStringBase<unsigned short>);
0067e534                                  return 0;
0067e249                              }
0067e249                              
0067e256                              if (stringmeta_char != 0)
0067e258                                  stringmeta_char = 0xfffffffe;
0067e258                              
0067e262                              ebx += 4;
0067e26c                              PStringBase<unsigned short>::operator=(ebx, &stringmeta_lval);
0067e26c                              
0067e276                              if (var_1c != 0)
0067e279                                  var_1c -= 1;
0067e279                              
0067e27f                              var_10 = eax_17;
0067e282                              break;
0067e244                          }
0067e1bb                      }
0067e1bb                      else if (eax_17 != 0xffff8000)
0067e1c6                      {
0067e1cc                          eax_18 = -(eax_17);
0067e1ce                          var_8_6 = eax_18;
0067e1d1                      label_67e1d1:
0067e1d1                          int32_t eax_19 = ((int32_t)yyr2[eax_18]);
0067e1d1                          
0067e1de                          if (eax_19 > 0)
0067e1de                          {
0067e1e0                              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_6 = PStringBase<unsigned short>::s_NullBuffer_3;
0067e1ee                              void* edi_2 = ((char*)ebx - (eax_19 << 2));
0067e1ee                              
0067e1f8                              if (PStringBase<unsigned short>::s_NullBuffer_6 != *(uint32_t*)((char*)edi_2 + 4))
0067e1f8                              {
0067e1ff                                  PStringBase<unsigned short>::s_NullBuffer_3 = &PStringBase<unsigned short>::s_NullBuffer_6->m_data[-0xa];
0067e1ff                                  
0067e20e                                  if (InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_6->m_data[-8]) == 0)
0067e20e                                  {
0067e210                                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_3;
0067e210                                      
0067e215                                      if (PStringBase<unsigned short>::s_NullBuffer_4 != 0)
0067e215                                      {
0067e219                                          int32_t edx_11;
0067e219                                          edx_11 = PStringBase<unsigned short>::s_NullBuffer_4->m_data[0];
0067e219                                          *(uint16_t*)((char*)edx_11)[2] = PStringBase<unsigned short>::s_NullBuffer_4->m_data[1];
0067e21d                                          *(uint32_t*)edx_11(1);
0067e215                                      }
0067e20e                                  }
0067e20e                                  
0067e21f                                  class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_7 = *(uint32_t*)((char*)edi_2 + 4);
0067e225                                  PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_7;
0067e228                                  InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_7->m_data[-8]);
0067e1f8                              }
0067e1de                          }
0067e1de                          
0067e237                          if ((var_8_6 - 9) <= 0xe)
0067e23d                              switch (var_8_6)
0067e23d                              {
0067e36f                                  case 9:
0067e36f                                  {
0067e371                                      int32_t var_4e4_1 = 0xa;
0067e373                                      int32_t var_4e8_1 = 0;
0067e38d                                      StringTableMetaLanguage::r_Var(ebx, wcstol(*(uint32_t*)((char*)ebx - 4), 0, 0xa, 0));
0067e36f                                      break;
0067e36f                                  }
0067e37b                                  case 0xa:
0067e37b                                  {
0067e37d                                      int32_t var_4e4_2 = 0xa;
0067e37f                                      int32_t var_4e8_2 = 0;
0067e38d                                      StringTableMetaLanguage::r_Var(ebx, wcstol(*(uint32_t*)((char*)ebx - 8), 0, 0xa, 1));
0067e37b                                      break;
0067e37b                                  }
0067e39c                                  case 0xb:
0067e39c                                  {
0067e39c                                      StringTableMetaLanguage::r_Var(ebx, 0, 0);
0067e39c                                      break;
0067e39c                                  }
0067e3ab                                  case 0xc:
0067e3ab                                  {
0067e3ab                                      StringTableMetaLanguage::r_Var(ebx, 0, 1);
0067e3ab                                      break;
0067e3ab                                  }
0067e3b7                                  case 0xd:
0067e3b7                                  {
0067e3b7                                      StringTableMetaLanguage::r_ChoiceBlockBegin(0);
0067e3b7                                      break;
0067e3b7                                  }
0067e3d7                                  case 0xe:
0067e3d7                                  case 0x10:
0067e3d7                                  {
0067e3d7                                      StringTableMetaLanguage::r_ChoiceBlockEnd();
0067e3d7                                      break;
0067e3d7                                  }
0067e3cd                                  case 0xf:
0067e3cd                                  {
0067e3cd                                      StringTableMetaLanguage::r_ChoiceBlockBegin(wcstol(*(uint32_t*)((char*)ebx - 4), 0, 0xa));
0067e3cd                                      break;
0067e3cd                                  }
0067e3df                                  case 0x11:
0067e3df                                  {
0067e3df                                      StringTableMetaLanguage::r_OutsideInfoBlock(ebx);
0067e3df                                      break;
0067e3df                                  }
0067e3e7                                  case 0x16:
0067e3e7                                  {
0067e3e7                                      StringTableMetaLanguage::r_Text(ebx);
0067e3e7                                      break;
0067e3e7                                  }
0067e3ef                                  case 0x17:
0067e3ef                                  {
0067e3ef                                      StringTableMetaLanguage::r_Flags(ebx);
0067e3ef                                      break;
0067e3ef                                  }
0067e23d                              }
0067e23d                          
0067e40c                          ebx += (4 - (eax_19 << 2));
0067e40e                          void* eax_41 = *(uint32_t*)ebx;
0067e410                          esi_1 += (-(eax_19) << 1);
0067e410                          
0067e416                          if (eax_41 != PStringBase<unsigned short>::s_NullBuffer_3)
0067e416                          {
0067e42b                              if ((InterlockedDecrement(((char*)eax_41 - 0x10)) == 0 && eax_41 != 0x14))
0067e433                                  **(uint32_t**)((char*)eax_41 - 0x14)(1);
0067e433                              
0067e435                              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_5 = PStringBase<unsigned short>::s_NullBuffer_3;
0067e438                              *(uint32_t*)ebx = PStringBase<unsigned short>::s_NullBuffer_5;
0067e43e                              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_5->m_data[-8]);
0067e416                          }
0067e416                          
0067e447                          int32_t edx_17 = ((int32_t)yyr1[var_8_6]);
0067e44f                          int32_t ecx_16;
0067e44f                          ecx_16 = *(uint16_t*)esi_1;
0067e452                          int32_t eax_45 = ((int32_t)yypact[(0x16 + edx_17)]);
0067e45a                          int32_t edi_7 = ((int32_t)ecx_16);
0067e45d                          int32_t eax_46 = (eax_45 + edi_7);
0067e45d                          
0067e46e                          if (((eax_45 + edi_7) < 0 || (eax_46 > 0x16 || yycheck[eax_46] != ecx_16)))
0067e46e                          {
0067e483                              ecx_4 = ((int32_t)yydefact[(0x16 + edx_17)]);
0067e48b                              edi = var_20;
0067e48e                              var_10 = ecx_4;
0067e491                              continue;
0067e46e                          }
0067e46e                          
0067e470                          ecx_4 = ((int32_t)yytable[eax_46]);
0067e478                          edi = var_20;
0067e47b                          var_10 = ecx_4;
0067e47e                          continue;
0067e1c6                      }
0067e1a5                  }
0067e1a5                  
0067e29f                  if (var_1c == 0)
0067e29f                  {
0067e2ad                      stringmeta_nerrs += 1;
0067e2b3                      stringmeta_error("parse error");
0067e2b8                      ecx_4 = var_10;
0067e2dc                  label_67e2dc:
0067e2dc                      var_1c = 3;
0067e2dc                      
0067e2f0                      while (true)
0067e2f0                      {
0067e2f0                          int32_t eax_34 = ((int32_t)yypact[ecx_4]);
0067e2f0                          
0067e310                          if ((eax_34 != 0xffff8000 && ((eax_34 + 1) >= 0 && ((eax_34 + 1) <= 0x16 && yycheck[(eax_34 + 1)] == 1))))
0067e310                          {
0067e312                              int32_t edi_4 = ((int32_t)yytable[(eax_34 + 1)]);
0067e312                              
0067e31c                              if (edi_4 >= 0)
0067e31c                              {
0067e332                                  if (edi_4 != 0)
0067e332                                  {
0067e34c                                      if (edi_4 == 0x21)
0067e34c                                          goto label_67e509;
0067e34c                                      
0067e352                                      ebx += 4;
0067e35c                                      PStringBase<unsigned short>::operator=(ebx, &stringmeta_lval);
0067e361                                      var_10 = edi_4;
0067e364                                      edi = var_20;
0067e367                                      break;
0067e332                                  }
0067e31c                              }
0067e31c                              else if (edi_4 != 0xffff8000)
0067e324                              {
0067e326                                  int32_t edi_5 = -(edi_4);
0067e328                                  var_8_6 = edi_5;
0067e32b                                  eax_18 = edi_5;
0067e32d                                  goto label_67e1d1;
0067e324                              }
0067e310                          }
0067e310                          
0067e337                          if (esi_1 == var_20)
0067e337                              goto label_67e53e;
0067e337                          
0067e33d                          ecx_4 = ((int32_t)*(uint16_t*)((char*)esi_1 - 2));
0067e341                          ebx -= 4;
0067e344                          esi_1 -= 2;
0067e2f0                      }
0067e2f0                      
0067e337                      break;
0067e29f                  }
0067e29f                  
0067e2c3                  if (var_1c != 3)
0067e2c3                      goto label_67e2dc;
0067e2c3                  
0067e2cc                  if (stringmeta_char != 0)
0067e2cc                  {
0067e2d2                      stringmeta_char = 0xfffffffe;
0067e2d2                      goto label_67e2dc;
0067e2cc                  }
0067e12b              }
0067e12b              
0067e53e          label_67e53e:
0067e53e              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_12 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
0067e53e              
0067e54d              if ((InterlockedDecrement(((char*)esi_12 + 4)) == 0 && esi_12 != 0))
0067e555                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_12) + -0x14)(1);
0067e555              
0067e557              void** edi_9 = &var_20;
0067e55a              int32_t i_4 = 0xc8;
0067e583              int32_t i_2;
0067e583              
0067e583              do
0067e583              {
0067e561                  int32_t esi_13 = edi_9[-1];
0067e564                  edi_9 -= 4;
0067e564                  
0067e576                  if ((InterlockedDecrement((esi_13 - 0x10)) == 0 && esi_13 != 0x14))
0067e57e                      **(uint32_t**)(esi_13 - 0x14)(1);
0067e57e                  
0067e580                  i_2 = i_4;
0067e580                  i_4 -= 1;
0067e583              } while (i_2 != 1);
0067e596              return 1;
0067e068          }
0067e062      }
0067dfe0  }

0067e2e5                 8d a4 24 00 00 00 00 8d 64 24 00                                                       ..$.....d$.
0067e597                                                                       90                                                 .
0067e598  uint32_t jump_table_67e598[0xf] = 
0067e598  {
0067e598      [0x0] =  0x0067e36c
0067e59c      [0x1] =  0x0067e378
0067e5a0      [0x2] =  0x0067e397
0067e5a4      [0x3] =  0x0067e3a6
0067e5a8      [0x4] =  0x0067e3b5
0067e5ac      [0x5] =  0x0067e3d7
0067e5b0      [0x6] =  0x0067e3be
0067e5b4      [0x7] =  0x0067e3d7
0067e5b8      [0x8] =  0x0067e3de
0067e5bc      [0x9] =  0x0067e3f7
0067e5c0      [0xa] =  0x0067e3f7
0067e5c4      [0xb] =  0x0067e3f7
0067e5c8      [0xc] =  0x0067e3f7
0067e5cc      [0xd] =  0x0067e3e6
0067e5d0      [0xe] =  0x0067e3ee
0067e5d4  }

0067e5d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0067e5e0  uint8_t IsSpecialChar(wchar16 arg1)

0067e5e0  {
0067e5e0      uint8_t eax_3 = StringTableMetaLanguage::IsInChoiceBlock();
0067e5ef      int16_t esi;
0067e5ef      
0067e5ef      if ((esi == 0x7d || esi == 0x7c))
0067e5ef      {
0067e5f3          if (eax_3 == 0)
0067e5f7              return 0;
0067e5ef      }
0067e5ef      else if (esi != 0x7b)
0067e5fc      {
0067e60d          if ((esi != 0x5e || eax_3 != 0))
0067e5f7              return 0;
0067e5fc      }
0067e5fc      else if (eax_3 != 0)
0067e604          return 0;
0067e604      
0067e614      return 1;
0067e5e0  }

0067e615                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0067e620  int32_t StringTableMetaLanguage::GetCurrentStreamPosition()

0067e620  {
0067e625      return g_inputidx;
0067e620  }

0067e626                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0067e630  uint8_t __convention("regparm") IsNumberLabel(uint32_t arg1, uint32_t* arg2, int32_t* arg3)

0067e630  {
0067e640      if (StringTableMetaLanguage::IsInChoiceBlock() != 0)
0067e64b          return 0;
0067e64b      
0067e64c      int32_t eax;
0067e64c      int32_t* edi;
0067e64c      *(uint32_t*)edi = eax;
0067e64e      class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = g_input.m_charbuffer;
0067e654      int32_t eax_2 = m_charbuffer_4->m_data[0x7ffffffffffffffe];
0067e659      void* eax_3 = &m_charbuffer_4->m_data[(eax_2 - 1)];
0067e659      
0067e65d      if (eax < eax_2)
0067e65f          eax_3 = &m_charbuffer_4->m_data[eax];
0067e65f      
0067e668      if (*(uint16_t*)eax_3 == 0x23)
0067e668      {
0067e66f          *(uint32_t*)edi = (eax + 1);
0067e671          class PSRefBufferCharData<unsigned short>* m_charbuffer;
0067e671          
0067e671          while (true)
0067e671          {
0067e671              m_charbuffer = g_input.m_charbuffer;
0067e676              int32_t ecx = m_charbuffer->m_data[0x7ffffffffffffffe];
0067e679              int32_t edx_1 = *(uint32_t*)edi;
0067e67d              void* ecx_1 = &m_charbuffer->m_data[(ecx - 1)];
0067e67d              
0067e681              if (edx_1 < ecx)
0067e683                  ecx_1 = &m_charbuffer->m_data[edx_1];
0067e683              
0067e686              ecx_1 = *(uint16_t*)ecx_1;
0067e686              
0067e693              if ((ecx_1 != 0x20 && ecx_1 != 9))
0067e693                  break;
0067e693              
0067e696              *(uint32_t*)edi = (edx_1 + 1);
0067e671          }
0067e671          
0067e69a          int32_t edx_3 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067e69d          int32_t ecx_2 = *(uint32_t*)edi;
0067e6a1          void* esi_2 = &m_charbuffer->m_data[(edx_3 - 1)];
0067e6a1          
0067e6a5          if (ecx_2 < edx_3)
0067e6a7              esi_2 = &m_charbuffer->m_data[ecx_2];
0067e6a7          
0067e6b4          if (*(uint16_t*)esi_2 == 0x2d)
0067e6b4              goto label_67e6d9;
0067e6b4          
0067e6b8          void* eax_4;
0067e6b8          
0067e6b8          if (ecx_2 < edx_3)
0067e6c0              eax_4 = &m_charbuffer->m_data[ecx_2];
0067e6b8          else
0067e6ba              eax_4 = &m_charbuffer->m_data[(edx_3 - 1)];
0067e6ba          
0067e6ce          if (iswdigit(((uint32_t)*(uint16_t*)eax_4)) != 0)
0067e6ce          {
0067e6d4              m_charbuffer = g_input.m_charbuffer;
0067e6d9          label_67e6d9:
0067e6d9              int32_t edx_4 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067e6dc              int32_t ecx_3 = *(uint32_t*)edi;
0067e6e0              int16_t var_800;
0067e6e0              int16_t* ebx_1 = &var_800;
0067e6e4              void* edx_5 = &m_charbuffer->m_data[(edx_4 - 1)];
0067e6e4              
0067e6e8              if (ecx_3 < edx_4)
0067e6ea                  edx_5 = &m_charbuffer->m_data[ecx_3];
0067e6ea              
0067e6f1              if (*(uint16_t*)edx_5 == 0x2d)
0067e6f1              {
0067e6f6                  *(uint32_t*)edi = (ecx_3 + 1);
0067e6f8                  m_charbuffer = g_input.m_charbuffer;
0067e6fd                  int32_t edx_7 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067e702                  void* ecx_4;
0067e702                  
0067e702                  if (ecx_3 < edx_7)
0067e70a                      ecx_4 = &m_charbuffer->m_data[ecx_3];
0067e702                  else
0067e704                      ecx_4 = &m_charbuffer->m_data[(edx_7 - 1)];
0067e704                  
0067e70d                  ecx_4 = *(uint16_t*)ecx_4;
0067e710                  var_800 = ecx_4;
0067e715                  void var_7fe;
0067e715                  ebx_1 = &var_7fe;
0067e6f1              }
0067e6f1              
0067e720              while (true)
0067e720              {
0067e720                  int32_t ecx_5 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067e723                  int32_t edx_8 = *(uint32_t*)edi;
0067e727                  void* ecx_6 = &m_charbuffer->m_data[(ecx_5 - 1)];
0067e727                  
0067e72b                  if (edx_8 < ecx_5)
0067e72d                      ecx_6 = &m_charbuffer->m_data[edx_8];
0067e72d                  
0067e730                  ecx_6 = *(uint16_t*)ecx_6;
0067e730                  
0067e73d                  if ((ecx_6 != 0x20 && ecx_6 != 9))
0067e73d                      break;
0067e73d                  
0067e740                  *(uint32_t*)edi = (edx_8 + 1);
0067e742                  m_charbuffer = g_input.m_charbuffer;
0067e720              }
0067e720              
0067e749              int32_t ecx_7 = *(uint32_t*)edi;
0067e74b              int32_t edx_10 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067e750              void* eax_6;
0067e750              
0067e750              if (ecx_7 < edx_10)
0067e758                  eax_6 = &m_charbuffer->m_data[ecx_7];
0067e750              else
0067e752                  eax_6 = &m_charbuffer->m_data[(edx_10 - 1)];
0067e752              
0067e75d              int32_t edx_11;
0067e75d              edx_11 = *(uint16_t*)eax_6;
0067e75d              
0067e768              if (iswdigit(edx_11) != 0)
0067e768              {
0067e774                  int32_t esi_4 = ((char*)ebx_1 - &var_800);
0067e776                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = g_input.m_charbuffer;
0067e776                  
0067e780                  while (true)
0067e780                  {
0067e780                      int32_t ecx_8 = *(uint32_t*)edi;
0067e782                      int32_t edx_12 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0067e787                      void* eax_7;
0067e787                      
0067e787                      if (ecx_8 < edx_12)
0067e78f                          eax_7 = &m_charbuffer_1->m_data[ecx_8];
0067e787                      else
0067e789                          eax_7 = &m_charbuffer_1->m_data[(edx_12 - 1)];
0067e789                      
0067e794                      int32_t ecx_9;
0067e794                      ecx_9 = *(uint16_t*)eax_7;
0067e794                      
0067e79f                      if (iswdigit(ecx_9) == 0)
0067e79f                          break;
0067e79f                      
0067e7ac                      if ((esi_4 & 0xfffffffe) >= 0x800)
0067e7ac                          break;
0067e7ac                      
0067e7ae                      int32_t ecx_10 = *(uint32_t*)edi;
0067e7b3                      *(uint32_t*)edi = (ecx_10 + 1);
0067e7b5                      m_charbuffer_1 = g_input.m_charbuffer;
0067e7ba                      int32_t edx_15 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0067e7ba                      
0067e7bf                      if (ecx_10 < edx_15)
0067e7bf                      {
0067e7d6                          void* ecx_12;
0067e7d6                          ecx_12 = m_charbuffer_1->m_data[ecx_10];
0067e7d9                          *(uint16_t*)ebx_1 = ecx_12;
0067e7dc                          ebx_1 = &ebx_1[1];
0067e7df                          esi_4 += 2;
0067e7bf                      }
0067e7bf                      else
0067e7bf                      {
0067e7c5                          void* ecx_11;
0067e7c5                          ecx_11 = m_charbuffer_1->m_data[(edx_15 - 1)];
0067e7c8                          *(uint16_t*)ebx_1 = ecx_11;
0067e7cb                          ebx_1 = &ebx_1[1];
0067e7ce                          esi_4 += 2;
0067e7bf                      }
0067e780                  }
0067e780                  
0067e7ed                  *(uint16_t*)ebx_1 = 0;
0067e802                  *(uint32_t*)arg1 = wcstol(&var_800, 0, 0xa);
0067e804                  class PSRefBufferCharData<unsigned short>* m_charbuffer_2;
0067e804                  
0067e804                  while (true)
0067e804                  {
0067e804                      m_charbuffer_2 = g_input.m_charbuffer;
0067e809                      int32_t ecx_14 = m_charbuffer_2->m_data[0x7ffffffffffffffe];
0067e80c                      int32_t edx_16 = *(uint32_t*)edi;
0067e810                      void* ecx_15 = &m_charbuffer_2->m_data[(ecx_14 - 1)];
0067e810                      
0067e814                      if (edx_16 < ecx_14)
0067e816                          ecx_15 = &m_charbuffer_2->m_data[edx_16];
0067e816                      
0067e819                      ecx_15 = *(uint16_t*)ecx_15;
0067e819                      
0067e826                      if ((ecx_15 != 0x20 && ecx_15 != 9))
0067e826                          break;
0067e826                      
0067e829                      *(uint32_t*)edi = (edx_16 + 1);
0067e804                  }
0067e804                  
0067e82d                  int32_t ecx_16 = *(uint32_t*)edi;
0067e82f                  int32_t edx_18 = m_charbuffer_2->m_data[0x7ffffffffffffffe];
0067e82f                  
0067e834                  if (ecx_16 < edx_18)
0067e83c                      eax_3 = &m_charbuffer_2->m_data[ecx_16];
0067e834                  else
0067e836                      eax_3 = &m_charbuffer_2->m_data[(edx_18 - 1)];
0067e836                  
0067e843                  if (*(uint16_t*)eax_3 == 0x3a)
0067e843                  {
0067e845                      uint32_t esi_5 = (ecx_16 + 1);
0067e848                      class PSRefBufferCharData<unsigned short>* m_charbuffer_3;
0067e848                      
0067e848                      while (true)
0067e848                      {
0067e848                          *(uint32_t*)edi = esi_5;
0067e84a                          m_charbuffer_3 = g_input.m_charbuffer;
0067e84f                          int32_t ecx_17 = m_charbuffer_3->m_data[0x7ffffffffffffffe];
0067e854                          void* ecx_18 = &m_charbuffer_3->m_data[(ecx_17 - 1)];
0067e854                          
0067e858                          if (esi_5 < ecx_17)
0067e85a                              ecx_18 = &m_charbuffer_3->m_data[esi_5];
0067e85a                          
0067e85d                          ecx_18 = *(uint16_t*)ecx_18;
0067e85d                          
0067e86a                          if ((ecx_18 != 0x20 && ecx_18 != 9))
0067e86a                              break;
0067e86a                          
0067e86c                          esi_5 += 1;
0067e848                      }
0067e848                      
0067e86f                      int32_t ecx_19 = m_charbuffer_3->m_data[0x7ffffffffffffffe];
0067e86f                      
0067e874                      if (esi_5 < ecx_19)
0067e87c                          eax_3 = &m_charbuffer_3->m_data[esi_5];
0067e874                      else
0067e876                          eax_3 = &m_charbuffer_3->m_data[(ecx_19 - 1)];
0067e876                      
0067e883                      if (*(uint16_t*)eax_3 == 1)
0067e883                      {
0067e8a9                          eax_3 = 1;
0067e8b2                          return 1;
0067e883                      }
0067e883                      
0067e894                      if (*(uint16_t*)PStringBase<unsigned short>::operator[](&g_input, esi_5) == 0x5e)
0067e894                      {
0067e8a9                          eax_3 = 1;
0067e8b2                          return 1;
0067e894                      }
0067e894                      
0067e8a5                      if (*(uint16_t*)PStringBase<unsigned short>::operator[](&g_input, esi_5) == 0x7b)
0067e8a5                      {
0067e8a9                          eax_3 = 1;
0067e8b2                          return 1;
0067e8a5                      }
0067e843                  }
0067e768              }
0067e6ce          }
0067e668      }
0067e668      
0067e8b5      eax_3 = 0;
0067e8be      return 0;
0067e630  }

0067e77d                                                                                         8d 49 00                               .I.
0067e8bf                                                                                               90                                 .

0067e8c0  void stringmeta_error(char const* arg1)

0067e8c0  {
0067e8c3      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0067e8c8      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0067e8d1      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0067e8e5      uint32_t inputidx_1 = g_inputidx;
0067e8e9      int32_t var_8 = 1;
0067e8f1      PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_2, arg1);
0067e8fb      StringTableMetaLanguage::SetError(&inputidx_1);
0067e904      void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0067e904      
0067e91a      if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0067e922          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0067e8c0  }

0067e929                             90 90 90 90 90 90 90                                                           .......

0067e930  uint8_t IsFlagsBlock(uint32_t arg1, uint32_t* arg2, class PStringBase<unsigned short>* arg3)

0067e930  {
0067e933      uint8_t result = StringTableMetaLanguage::IsInChoiceBlock();
0067e933      
0067e93a      if (result == 0)
0067e93f          return result;
0067e93f      
0067e94a      int32_t ebp = g_input.m_charbuffer->m_data[0x7ffffffffffffffe];
0067e94d      uint32_t* ebx;
0067e94d      *(uint32_t*)ebx = arg1;
0067e94f      int32_t* edi;
0067e94f      void* eax_1 = *(uint32_t*)edi;
0067e957      int32_t ebp_1 = (ebp - 1);
0067e95b      int32_t var_4 = ebp_1;
0067e95b      
0067e95f      if (eax_1 != PStringBase<unsigned short>::s_NullBuffer)
0067e95f      {
0067e974          if ((InterlockedDecrement(((char*)eax_1 - 0x10)) == 0 && eax_1 != 0x14))
0067e97c              **(uint32_t**)((char*)eax_1 - 0x14)(1);
0067e97c          
0067e97e          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067e98a          *(uint32_t*)edi = PStringBase<unsigned short>::s_NullBuffer_1;
0067e98c          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0067e95f      }
0067e95f      
0067e992      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = g_input.m_charbuffer;
0067e998      int32_t ecx_3 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0067e99b      uint32_t eax_4 = *(uint32_t*)ebx;
0067e99f      void* ecx_4 = &m_charbuffer_1->m_data[(ecx_3 - 1)];
0067e99f      
0067e9a3      if (eax_4 < ecx_3)
0067e9a5          ecx_4 = &m_charbuffer_1->m_data[eax_4];
0067e9a5      
0067e9ac      if (*(uint16_t*)ecx_4 != 0x5b)
0067e9ac      {
0067eaaf      label_67eaaf:
0067eaaf          eax_4 = 0;
0067eab5          return 0;
0067e9ac      }
0067e9ac      
0067e9b3      *(uint32_t*)ebx = (eax_4 + 1);
0067e9b3      
0067e9b5      while (true)
0067e9b5      {
0067e9b5          class PSRefBufferCharData<unsigned short>* m_charbuffer = g_input.m_charbuffer;
0067e9b5          
0067e9c0          while (true)
0067e9c0          {
0067e9c0              int32_t edx_4 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067e9c3              uint32_t ecx_5 = *(uint32_t*)ebx;
0067e9c7              void* edx_5 = &m_charbuffer->m_data[(edx_4 - 1)];
0067e9c7              
0067e9cb              if (ecx_5 < edx_4)
0067e9cd                  edx_5 = &m_charbuffer->m_data[ecx_5];
0067e9cd              
0067e9dc              if ((*(uint16_t*)edx_5 == 0x5d || ecx_5 >= ebp_1))
0067e9dc              {
0067ea8b                  uint32_t ecx_16 = *(uint32_t*)ebx;
0067ea8d                  int32_t edx_10 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067ea8d                  
0067ea92                  if (ecx_16 < edx_10)
0067ea9a                      eax_4 = &m_charbuffer->m_data[ecx_16];
0067ea92                  else
0067ea94                      eax_4 = &m_charbuffer->m_data[(edx_10 - 1)];
0067ea94                  
0067eaa1                  if (*(uint16_t*)eax_4 == 0x5d)
0067eaa1                  {
0067eaa5                      *(uint32_t*)ebx = (ecx_16 + 1);
0067eaa7                      eax_4 = 1;
0067eaad                      return 1;
0067eaa1                  }
0067eaa1                  
0067eaa1                  goto label_67eaaf;
0067e9dc              }
0067e9dc              
0067e9e5              *(uint32_t*)ebx = (ecx_5 + 1);
0067e9e7              m_charbuffer = g_input.m_charbuffer;
0067e9ec              int32_t edx_6 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067e9f1              void* ecx_6;
0067e9f1              
0067e9f1              if (ecx_5 < edx_6)
0067e9f9                  ecx_6 = &m_charbuffer->m_data[ecx_5];
0067e9f1              else
0067e9f3                  ecx_6 = &m_charbuffer->m_data[(edx_6 - 1)];
0067e9f3              
0067e9fc              uint32_t ecx_7 = ((uint32_t)*(uint16_t*)ecx_6);
0067ea02              uint32_t var_8 = ecx_7;
0067ea02              
0067ea06              if (ecx_7 == 0)
0067ea06                  continue;
0067ea06              
0067ea08              void* eax_7 = *(uint32_t*)edi;
0067ea0e              int32_t ebp_2 = *(uint32_t*)((char*)eax_7 - 4);
0067ea0e              
0067ea19              if ((*(uint32_t*)((char*)eax_7 - 0x10) != 1 || (ebp_2 + 1) > *(uint32_t*)((char*)eax_7 - 0xc)))
0067ea19              {
0067ea30                  PStringBase<unsigned short>::allocate_ref_buffer(edi, ebp_2);
0067ea3c                  wcscpy(*(uint32_t*)edi, eax_7);
0067ea3c                  
0067ea55                  if ((InterlockedDecrement(((char*)eax_7 - 0x10)) == 0 && eax_7 != 0x14))
0067ea5d                      **(uint32_t**)((char*)eax_7 - 0x14)(1);
0067ea19              }
0067ea19              else
0067ea19              {
0067ea1b                  *(uint32_t*)((char*)eax_7 - 4) = (ebp_2 + 1);
0067ea20                  *(uint32_t*)(*(uint32_t*)edi - 8) = 0xffffffff;
0067ea19              }
0067ea19              
0067ea6d              wcsncpy(((*(uint32_t*)edi + (ebp_2 << 1)) - 2), &var_8, 1);
0067ea73              void* eax_10 = *(uint32_t*)edi;
0067ea78              ebp_1 = var_4;
0067ea7f              *(uint16_t*)(((char*)eax_10 + (*(uint32_t*)((char*)eax_10 - 4) << 1)) - 2) = 0;
0067ea86              break;
0067e9c0          }
0067e9b5      }
0067e930  }

0067eab6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0067eac0  int32_t _stringmeta_lex()

0067eac0  {
0067eac3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067eac9      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
0067ead2      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0067ead8      class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = g_input.m_charbuffer;
0067eade      int32_t edx = m_charbuffer_2->m_data[0x7ffffffffffffffe];
0067eae1      uint32_t inputidx_1 = g_inputidx;
0067eae1      
0067eaef      if (inputidx_1 >= (edx - 1))
0067eaef      {
0067eaf5          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_1 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0067eaf5          
0067eb08          if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0067eb10              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0067eb10          
0067eb1a          return 0xffffffff;
0067eaef      }
0067eaef      
0067eb1d      void* esi_2 = &m_charbuffer_2->m_data[(edx - 1)];
0067eb1d      
0067eb21      if (inputidx_1 < edx)
0067eb23          esi_2 = &m_charbuffer_2->m_data[inputidx_1];
0067eb23      
0067eb2c      if (*(uint16_t*)esi_2 == 1)
0067eb2c      {
0067eb32          uint32_t i = (inputidx_1 + 1);
0067eb35          g_inputidx = i;
0067eb3a          uint32_t i_1 = i;
0067eb3a          
0067eb3c          if (i < (edx - 1))
0067eb3c          {
0067eb3e              void* edi_1 = &m_charbuffer_2->m_data[i];
0067eb3e              
0067eb57              do
0067eb57              {
0067eb43                  void* esi_3 = &m_charbuffer_2->m_data[(edx - 1)];
0067eb43                  
0067eb47                  if (i < edx)
0067eb49                      esi_3 = edi_1;
0067eb49                  
0067eb4f                  if (*(uint16_t*)esi_3 == 1)
0067eb4f                      break;
0067eb4f                  
0067eb51                  i += 1;
0067eb52                  edi_1 += 2;
0067eb57              } while (i < (edx - 1));
0067eb57              
0067eb59              g_inputidx = i;
0067eb3c          }
0067eb3c          
0067eb63          PStringBase<unsigned short>::clear(&stringmeta_lval);
0067eb68          uint32_t inputidx_6 = g_inputidx;
0067eb68          
0067eb70          if (inputidx_6 != i_1)
0067eb70          {
0067eb72              class PSRefBufferCharData<unsigned short>* m_charbuffer = g_input.m_charbuffer;
0067eb77              int32_t ecx_1 = m_charbuffer->m_data[0x7ffffffffffffffe];
0067eb7c              void* eax_4;
0067eb7c              
0067eb7c              if (i_1 < ecx_1)
0067eb84                  eax_4 = &m_charbuffer->m_data[i_1];
0067eb7c              else
0067eb7e                  eax_4 = &m_charbuffer->m_data[(ecx_1 - 1)];
0067eb7e              
0067eb8e              PStringBase<unsigned short>::append_n_chars(&stringmeta_lval, eax_4, (inputidx_6 - i_1));
0067eb70          }
0067eb70          
0067eb93          g_inputidx += 1;
0067eb9d          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_5 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0067eb9d          
0067ebb0          if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0067ebb8              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0067ebb8          
0067ebc6          return 0x102;
0067eb2c      }
0067eb2c      
0067ebc9      void* esi_6 = &m_charbuffer_2->m_data[(edx - 1)];
0067ebc9      
0067ebcd      if (inputidx_1 < edx)
0067ebcf          esi_6 = &m_charbuffer_2->m_data[inputidx_1];
0067ebcf      
0067ebd6      if (*(uint16_t*)esi_6 == 0x7b)
0067ebd6      {
0067ebe1          void* edx_4 = &m_charbuffer_2->m_data[(edx - 1)];
0067ebe1          
0067ebe5          if ((inputidx_1 + 1) < edx)
0067ebe7              edx_4 = &m_charbuffer_2->m_data[(inputidx_1 + 1)];
0067ebe7          
0067ebee          if (*(uint16_t*)edx_4 == 0x7b)
0067ebee          {
0067ebf9              bool cond:6_1 = StringTableMetaLanguage::IsInChoiceBlock() != 0;
0067ebfb              inputidx_1 = g_inputidx;
0067ebfb              
0067ec00              if (!(cond:6_1))
0067ec00              {
0067ec06                  class PSRefBufferCharData<unsigned short>* m_charbuffer_6 = g_input.m_charbuffer;
0067ec0c                  int32_t ecx_3 = m_charbuffer_6->m_data[0x7ffffffffffffffe];
0067ec0f                  uint32_t eax_9 = (inputidx_1 + 2);
0067ec12                  g_inputidx = eax_9;
0067ec17                  uint32_t ebp_1 = eax_9;
0067ec19                  int32_t ebx = (eax_9 + 1);
0067ec1c                  void* edi_2 = &m_charbuffer_6->m_data[eax_9];
0067ec1c                  
0067ec22                  while (true)
0067ec22                  {
0067ec22                      void* edx_5 = &m_charbuffer_6->m_data[(ecx_3 - 1)];
0067ec22                      
0067ec26                      if (eax_9 < ecx_3)
0067ec28                          edx_5 = edi_2;
0067ec28                      
0067ec2e                      if (*(uint16_t*)edx_5 == 0x7d)
0067ec2e                      {
0067ec32                          void* edx_6 = &m_charbuffer_6->m_data[(ecx_3 - 1)];
0067ec32                          
0067ec36                          if (ebx < ecx_3)
0067ec38                              edx_6 = ((char*)edi_2 + 2);
0067ec38                          
0067ec3f                          if (*(uint16_t*)edx_6 == 0x7d)
0067ec3f                              break;
0067ec2e                      }
0067ec2e                      
0067ec43                      void* edx_7 = &m_charbuffer_6->m_data[(ecx_3 - 1)];
0067ec43                      
0067ec47                      if (eax_9 < ecx_3)
0067ec49                          edx_7 = edi_2;
0067ec49                      
0067ec4f                      if (*(uint16_t*)edx_7 == 0)
0067ec4f                          break;
0067ec4f                      
0067ec51                      eax_9 += 1;
0067ec52                      ebx += 1;
0067ec53                      edi_2 += 2;
0067ec22                  }
0067ec22                  
0067ec5d                  g_inputidx = eax_9;
0067ec62                  PStringBase<unsigned short>::clear(&stringmeta_lval);
0067ec67                  uint32_t inputidx_7 = g_inputidx;
0067ec67                  
0067ec71                  if (inputidx_7 != ebp_1)
0067ec71                  {
0067ec85                      PStringBase<unsigned short>::append_n_chars(&stringmeta_lval, PStringBase<unsigned short>::operator[](&g_input, ebp_1), (inputidx_7 - ebp_1));
0067ec8a                      inputidx_7 = g_inputidx;
0067ec71                  }
0067ec71                  
0067ec9f                  if ((*(uint16_t*)PStringBase<unsigned short>::operator[](&g_input, inputidx_7) == 0x7d && *(uint16_t*)PStringBase<unsigned short>::operator[](&g_input, (inputidx_7 + 1)) == 0x7d))
0067ecb8                      g_inputidx = (inputidx_7 + 2);
0067ecb8                  
0067ecc2                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_2);
0067ecd3                  return 0x105;
0067ec00              }
0067ec00              
0067ecd4              m_charbuffer_2 = g_input.m_charbuffer;
0067ebee          }
0067ebd6      }
0067ebd6      
0067ecda      uint32_t* edx_8 = m_charbuffer_2->m_data[0x7ffffffffffffffe];
0067ecdf      void* eax_17;
0067ecdf      
0067ecdf      if (inputidx_1 < edx_8)
0067ece7          eax_17 = &m_charbuffer_2->m_data[inputidx_1];
0067ecdf      else
0067ece1          eax_17 = &m_charbuffer_2->m_data[((char*)edx_8 - 1)];
0067ece1      
0067ecea      esi_6 = *(uint16_t*)eax_17;
0067ecf4      wchar16 edi;
0067ecf4      
0067ecf4      if (IsSpecialChar(edi) != 0)
0067ecf4      {
0067ecf6          uint32_t inputidx_3 = g_inputidx;
0067ecfc          class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = g_input.m_charbuffer;
0067ed05          g_inputidx = (inputidx_3 + 1);
0067ed0b          int32_t ecx_6 = m_charbuffer_4->m_data[0x7ffffffffffffffe];
0067ed10          void* eax_20;
0067ed10          
0067ed10          if (inputidx_3 < ecx_6)
0067ed18              eax_20 = &m_charbuffer_4->m_data[inputidx_3];
0067ed10          else
0067ed12              eax_20 = &m_charbuffer_4->m_data[(ecx_6 - 1)];
0067ed12          
0067ed1f          uint32_t result = ((uint32_t)*(uint16_t*)eax_20);
0067ed22          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_9 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
0067ed22          
0067ed35          if ((InterlockedDecrement(((char*)esi_9 + 4)) == 0 && esi_9 != 0))
0067ed3d              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_9) + -0x14)(1);
0067ed3d          
0067ed48          return result;
0067ecf4      }
0067ecf4      
0067ed4d      int32_t var_8;
0067ed4d      int32_t* var_24_7 = &var_8;
0067ed61      uint32_t var_c;
0067ed61      
0067ed61      if (IsNumberLabel(g_inputidx, edx_8, m_charbuffer_2) != 0)
0067ed61      {
0067ed67          g_inputidx = var_c;
0067ed72          PStringBase<unsigned short>::clear(&stringmeta_lval);
0067ed81          PStringBase<unsigned short>::append_int32(&stringmeta_lval, var_8);
0067ed8a          PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_2);
0067ed9b          return 0x103;
0067ed61      }
0067ed61      
0067edb4      if (IsFlagsBlock(g_inputidx) == 0)
0067edb4      {
0067ee88          PStringBase<unsigned short>::clear(&stringmeta_lval);
0067ee88          
0067ee94          for (uint32_t inputidx_2 = g_inputidx; inputidx_2 < (edx - 1); inputidx_2 = g_inputidx)
0067ee94          {
0067eea0              class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = g_input.m_charbuffer;
0067eea6              uint32_t* edx_13 = m_charbuffer_3->m_data[0x7ffffffffffffffe];
0067eeab              void* esi_13 = &m_charbuffer_3->m_data[((char*)edx_13 - 1)];
0067eeab              
0067eeaf              if (inputidx_2 < edx_13)
0067eeb1                  esi_13 = &m_charbuffer_3->m_data[inputidx_2];
0067eeb1              
0067eeb8              if (*(uint16_t*)esi_13 == 1)
0067eeb8                  break;
0067eeb8              
0067eec0              int16_t* eax_33;
0067eec0              
0067eec0              if (inputidx_2 < edx_13)
0067eec8                  eax_33 = &m_charbuffer_3->m_data[inputidx_2];
0067eec0              else
0067eec2                  eax_33 = &m_charbuffer_3->m_data[((char*)edx_13 - 1)];
0067eec2              
0067eecb              esi_13 = *(uint16_t*)eax_33;
0067eece              uint8_t eax_34 = StringTableMetaLanguage::IsInChoiceBlock();
0067eece              
0067eed7              if (esi_13 != 0x7d)
0067eed7              {
0067eee7                  if (esi_13 != 0x7c)
0067eee7                  {
0067ef01                      if (((esi_13 == 0x7b || esi_13 == 0x5e) && eax_34 == 0))
0067ef01                          break;
0067eee7                  }
0067eee7                  else if (eax_34 != 0)
0067eeeb                      break;
0067eed7              }
0067eed7              else if (eax_34 != 0)
0067eedb                  break;
0067eedb              
0067ef0b              int32_t* var_24_11 = &var_8;
0067ef0b              
0067ef1f              if (IsNumberLabel(g_inputidx, edx_13, m_charbuffer_3) != 0)
0067ef1f                  break;
0067ef1f              
0067ef3e              if (IsFlagsBlock(g_inputidx) != 0)
0067ef3e                  break;
0067ef3e              
0067ef44              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = g_input.m_charbuffer;
0067ef49              int32_t edx_14 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0067ef4c              uint32_t inputidx_5 = g_inputidx;
0067ef54              void* esi_14 = &m_charbuffer_1->m_data[(edx_14 - 1)];
0067ef54              
0067ef58              if (inputidx_5 < edx_14)
0067ef5a                  esi_14 = &m_charbuffer_1->m_data[inputidx_5];
0067ef5a              
0067ef60              if (*(uint16_t*)esi_14 == 0x5c)
0067ef60              {
0067ef65                  void* eax_38;
0067ef65                  
0067ef65                  if ((inputidx_5 + 1) < edx_14)
0067ef6d                      eax_38 = &m_charbuffer_1->m_data[(inputidx_5 + 1)];
0067ef65                  else
0067ef67                      eax_38 = &m_charbuffer_1->m_data[(edx_14 - 1)];
0067ef67                  
0067ef80                  if (StringTableMetaLanguage::IsEscapeChar(*(uint16_t*)eax_38) != 0)
0067ef80                  {
0067ef95                      g_inputidx += 1;
0067ef9b                      var_8 = 0x5c;
0067ef9f                      PStringBase<unsigned short>::append_n_chars(&stringmeta_lval, &var_8, 1);
0067ef80                  }
0067ef80                  
0067efa4                  m_charbuffer_1 = g_input.m_charbuffer;
0067efa9                  inputidx_5 = g_inputidx;
0067ef60              }
0067ef60              
0067efb2              g_inputidx = (inputidx_5 + 1);
0067efb8              int32_t ecx_18 = m_charbuffer_1->m_data[0x7ffffffffffffffe];
0067efbd              int16_t* eax_40;
0067efbd              
0067efbd              if (inputidx_5 < ecx_18)
0067efc5                  eax_40 = &m_charbuffer_1->m_data[inputidx_5];
0067efbd              else
0067efbf                  eax_40 = &m_charbuffer_1->m_data[(ecx_18 - 1)];
0067efbf              
0067efca              int32_t ecx_19;
0067efca              ecx_19 = *(uint16_t*)eax_40;
0067efd4              var_8 = ecx_19;
0067efdd              PStringBase<unsigned short>::append_n_chars(&stringmeta_lval, &var_8, 1);
0067ee94          }
0067ee94          
0067eff5          PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<unsigned short>::s_NullBuffer_2);
0067f006          return 0x101;
0067edb4      }
0067edb4      
0067edbe      g_inputidx = var_c;
0067edc9      PStringBase<unsigned short>::clear(&stringmeta_lval);
0067edce      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0067edd5      int32_t edi_4 = (PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe] - 1);
0067edd6      int32_t esi_10 = 0;
0067edd6      
0067edda      if (edi_4 > 0)
0067edda      {
0067ee20          do
0067ee20          {
0067ede0              int32_t eax_28 = PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe];
0067ede5              void* ecx_12 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[(eax_28 - 1)];
0067ede5              
0067ede9              if (esi_10 < eax_28)
0067edeb                  ecx_12 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[esi_10];
0067edeb              
0067edf2              if (*(uint16_t*)ecx_12 != 0x20)
0067edf2              {
0067edf6                  void* eax_29 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[(eax_28 - 1)];
0067edf6                  
0067edfa                  if (esi_10 < eax_28)
0067edfc                      eax_29 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[esi_10];
0067edfc                  
0067ee01                  int32_t edx_11;
0067ee01                  edx_11 = *(uint16_t*)eax_29;
0067ee10                  var_8 = edx_11;
0067ee14                  PStringBase<unsigned short>::append_n_chars(&stringmeta_lval, &var_8, 1);
0067ee19                  PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0067edf2              }
0067edf2              
0067ee1d              esi_10 += 1;
0067ee20          } while (esi_10 < edi_4);
0067edda      }
0067edda      
0067ee22      class PSRefBufferCharData<unsigned short>* m_charbuffer_5 = g_input.m_charbuffer;
0067ee28      uint32_t inputidx_4 = g_inputidx;
0067ee2e      int32_t edi_5 = m_charbuffer_5->m_data[0x7ffffffffffffffe];
0067ee31      void* esi_11 = &m_charbuffer_5->m_data[inputidx_4];
0067ee31      
0067ee36      while (true)
0067ee36      {
0067ee36          void* eax_30 = &m_charbuffer_5->m_data[(edi_5 - 1)];
0067ee36          
0067ee3a          if (inputidx_4 < edi_5)
0067ee3c              eax_30 = esi_11;
0067ee3c          
0067ee3e          eax_30 = *(uint16_t*)eax_30;
0067ee3e          
0067ee4b          if ((eax_30 != 0x20 && eax_30 != 9))
0067ee4b          {
0067ee56              g_inputidx = inputidx_4;
0067ee56              
0067ee6c              if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_3->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_3 != 0x14))
0067ee74                  *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_3 + -0x14)(1);
0067ee74              
0067ee82              return 0x104;
0067ee4b          }
0067ee4b          
0067ee4d          inputidx_4 += 1;
0067ee4e          esi_11 += 2;
0067ee36      }
0067eac0  }

0067f007                       90 90 90 90 90 90 90 90 90                                                         .........

0067f010  int32_t stringmeta_lex()

0067f010  {
0067f010      /* tailcall */
0067f010      return _stringmeta_lex();
0067f010  }

0067f015                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0067f020  void StringTableMetaLanguage::LoadTokenizer(class SmartArray<PStringBase<unsigned short>,1> const* arg1, class SmartArray<PStringBase<unsigned short>,1> const* arg2)

0067f020  {
0067f020      class PSRefBufferCharData<unsigned short>* m_charbuffer_4 = g_input.m_charbuffer;
0067f020      
0067f033      if (m_charbuffer_4 != PStringBase<unsigned short>::s_NullBuffer)
0067f033      {
0067f048          if ((InterlockedDecrement(&m_charbuffer_4->m_data[-8]) == 0 && m_charbuffer_4 != 0x14))
0067f050              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_4 + -0x14)(1);
0067f050          
0067f052          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067f057          g_input.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
0067f060          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
0067f033      }
0067f033      
0067f066      class SmartArray<PStringBase<unsigned short>,1>* ebx = arg1;
0067f06d      int32_t i = 0;
0067f071      int32_t i_1 = 0;
0067f071      
0067f075      if (ebx->m_num <= 0)
0067f075      {
0067f2db          g_inputidx = 0;
0067f2e7          return;
0067f075      }
0067f075      
0067f2c3      do
0067f2c3      {
0067f082          uint16_t* m_charbuffer_5 = ebx->m_data[i].m_charbuffer;
0067f085          int32_t ebp_1 = (i << 2);
0067f094          InterlockedIncrement(&m_charbuffer_5[-8]);
0067f09a          int32_t eax_5 = *(uint32_t*)((char*)m_charbuffer_5 - 4);
0067f09a          
0067f0a0          if (eax_5 != 1)
0067f0aa              PStringBase<unsigned short>::append_n_chars(&g_input, m_charbuffer_5, (eax_5 - 1));
0067f0aa          
0067f0b6          if (i < arg2->m_num)
0067f0b6          {
0067f0bc              class PSRefBufferCharData<unsigned short>* m_charbuffer = g_input.m_charbuffer;
0067f0c6              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = 1;
0067f0cd              int32_t edi = m_charbuffer->m_data[0x7ffffffffffffffe];
0067f0cd              
0067f0d8              if ((*(int32_t*)((char*)m_charbuffer + -0x10) != 1 || (edi + 1) > *(int32_t*)((char*)m_charbuffer + -0xc)))
0067f0d8              {
0067f0f5                  PStringBase<unsigned short>::allocate_ref_buffer(&g_input, edi);
0067f105                  wcscpy(g_input.m_charbuffer, m_charbuffer);
0067f105                  
0067f11e                  if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
0067f126                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0067f0d8              }
0067f0d8              else
0067f0d8              {
0067f0da                  *(uint32_t*)((char*)m_charbuffer - 4) = (edi + 1);
0067f0e2                  *(uint32_t*)(g_input.m_charbuffer - 8) = 0xffffffff;
0067f0d8              }
0067f0d8              
0067f13a              wcsncpy(&g_input.m_charbuffer->m_data[(edi - 1)], &PStringBase<unsigned short>::s_NullBuffer_3, 1);
0067f140              class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = g_input.m_charbuffer;
0067f148              m_charbuffer_1->m_data[(m_charbuffer_1->m_data[0x7ffffffffffffffe] - 1)] = 0;
0067f14f              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
0067f154              PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
0067f15f              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0067f16b              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_3;
0067f174              void* eax_13 = *(uint32_t*)(arg2->m_data + ebp_1);
0067f17b              int32_t edx_7;
0067f17b              int32_t esi_4;
0067f17b              
0067f17b              if (*(uint32_t*)((char*)eax_13 - 4) == PStringBase<unsigned short>::s_NullBuffer_4->m_data[0x7ffffffffffffffe])
0067f17b              {
0067f17d                  edx_7 = *(uint32_t*)((char*)eax_13 - 8);
0067f180                  esi_4 = *(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4 + -8);
0067f17b              }
0067f17b              
0067f18f              if ((*(uint32_t*)((char*)eax_13 - 4) == PStringBase<unsigned short>::s_NullBuffer_4->m_data[0x7ffffffffffffffe] && ((edx_7 == esi_4 || edx_7 == 0xffffffff) || esi_4 == 0xffffffff)))
0067f18f              {
0067f193                  int32_t eax_14 = wcscmp(eax_13, PStringBase<unsigned short>::s_NullBuffer_4);
0067f199                  PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_3;
0067f1a2                  eax_14 = eax_14 != 0;
0067f1a2                  
0067f1a7                  if ((eax_14 == 0 || *(uint32_t*)(*(uint32_t*)(arg2->m_data + ebp_1) - 4) == 1))
0067f1b8                      ebx = 0;
0067f1a7                  else
0067f1b4                      ebx = 1;
0067f18f              }
0067f18f              else if (*(uint32_t*)(*(uint32_t*)(arg2->m_data + ebp_1) - 4) == 1)
0067f1b8                  ebx = 0;
0067f1b2              else
0067f1b4                  ebx = 1;
0067f1b4              
0067f1cd              if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_4 != 0x14))
0067f1d5                  *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4 + -0x14)(1);
0067f1d5              
0067f1d9              if (ebx != 0)
0067f1d9              {
0067f1e3                  uint16_t* eax_21 = *(uint32_t*)(arg2->m_data + ebp_1);
0067f1e5                  int32_t ecx_10 = *(uint32_t*)((char*)eax_21 - 4);
0067f1e5                  
0067f1eb                  if (ecx_10 != 1)
0067f1f5                      PStringBase<unsigned short>::append_n_chars(&g_input, eax_21, (ecx_10 - 1));
0067f1d9              }
0067f1d9              
0067f1fa              class PSRefBufferCharData<unsigned short>* m_charbuffer_2 = g_input.m_charbuffer;
0067f1ff              PStringBase<unsigned short>::s_NullBuffer_3 = 1;
0067f20b              int32_t edi_2 = m_charbuffer_2->m_data[0x7ffffffffffffffe];
0067f20b              
0067f216              if ((*(int32_t*)((char*)m_charbuffer_2 + -0x10) != 1 || (edi_2 + 1) > *(int32_t*)((char*)m_charbuffer_2 + -0xc)))
0067f216              {
0067f234                  PStringBase<unsigned short>::allocate_ref_buffer(&g_input, edi_2);
0067f243                  wcscpy(g_input.m_charbuffer, m_charbuffer_2);
0067f243                  
0067f25c                  if ((InterlockedDecrement(&m_charbuffer_2->m_data[-8]) == 0 && m_charbuffer_2 != 0x14))
0067f264                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0067f216              }
0067f216              else
0067f216              {
0067f218                  *(uint32_t*)((char*)m_charbuffer_2 - 4) = (edi_2 + 1);
0067f221                  *(uint32_t*)(g_input.m_charbuffer - 8) = 0xffffffff;
0067f216              }
0067f216              
0067f278              wcsncpy(&g_input.m_charbuffer->m_data[(edi_2 - 1)], &PStringBase<unsigned short>::s_NullBuffer_3, 1);
0067f27e              class PSRefBufferCharData<unsigned short>* m_charbuffer_3 = g_input.m_charbuffer;
0067f286              ebx = arg1;
0067f28a              i = i_1;
0067f295              m_charbuffer_3->m_data[(m_charbuffer_3->m_data[0x7ffffffffffffffe] - 1)] = 0;
0067f0b6          }
0067f0b6          
0067f2af          if ((InterlockedDecrement(&m_charbuffer_5[-8]) == 0 && m_charbuffer_5 != 0x14))
0067f2b7              **(uint32_t**)((char*)m_charbuffer_5 - 0x14)(1);
0067f2b7          
0067f2bc          i += 1;
0067f2bf          i_1 = i;
0067f2c3      } while (i < ebx->m_num);
0067f2c3      
0067f2cc      g_inputidx = 0;
0067f020  }

0067f2e8                          90 90 90 90 90 90 90 90                                                          ........

0067f2f0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>* this, uint32_t arg2)

0067f2f0  {
0067f2f3      class HashTableData<unsigned long,NameFilterLanguageData>** m_buckets = this->m_buckets;
0067f2fb      this->vtable = 0x7fe690;
0067f2fb      
0067f301      if (m_buckets != &this->m_aInplaceBuckets)
0067f304          operator delete[](m_buckets);
0067f304      
0067f30e      this->m_buckets = nullptr;
0067f311      this->m_firstInterestingBucket = nullptr;
0067f314      this->m_numBuckets = 0;
0067f317      this->m_numElements = 0;
0067f317      
0067f31f      if ((arg2 & 1) != 0)
0067f322          operator delete(this);
0067f322      
0067f32d      return this;
0067f2f0  }


0067f330  void __thiscall NameFilterLanguageData::Serialize(struct NameFilterLanguageData* this, class Archive* arg2)

0067f330  {
0067f33d      Archive::CheckAlignment(arg2, 4);
0067f346      uint8_t* eax = Archive::GetBytes(arg2, 4);
0067f346      
0067f34f      if (eax != 0)
0067f34f      {
0067f354          if ((arg2->m_flags & 1) == 0)
0067f35e              this->m_MaximumSameCharactersInARow = *(uint32_t*)eax;
0067f354          else
0067f358              *(uint32_t*)eax = this->m_MaximumSameCharactersInARow;
0067f34f      }
0067f34f      
0067f364      Archive::CheckAlignment(arg2, 4);
0067f36d      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
0067f36d      
0067f374      if (eax_1 != 0)
0067f374      {
0067f379          if ((arg2->m_flags & 1) == 0)
0067f384              this->m_MaximumVowelsInARow = *(uint32_t*)eax_1;
0067f379          else
0067f37e              *(uint32_t*)eax_1 = this->m_MaximumVowelsInARow;
0067f374      }
0067f374      
0067f38b      Archive::CheckAlignment(arg2, 4);
0067f394      uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
0067f394      
0067f39b      if (eax_2 != 0)
0067f39b      {
0067f3a0          if ((arg2->m_flags & 1) == 0)
0067f3ab              this->m_FirstNCharactersMustHaveAVowel = *(uint32_t*)eax_2;
0067f3a0          else
0067f3a5              *(uint32_t*)eax_2 = this->m_FirstNCharactersMustHaveAVowel;
0067f39b      }
0067f39b      
0067f3b2      Archive::CheckAlignment(arg2, 4);
0067f3bb      uint32_t* eax_3 = Archive::GetBytes(arg2, 4);
0067f3bb      
0067f3c2      if (eax_3 != 0)
0067f3c2      {
0067f3c7          if ((arg2->m_flags & 1) == 0)
0067f3d2              this->m_VowelContainingSubstringLength = *(uint32_t*)eax_3;
0067f3c7          else
0067f3cc              *(uint32_t*)eax_3 = this->m_VowelContainingSubstringLength;
0067f3c2      }
0067f3c2      
0067f3d9      PStringBase<unsigned short>::Serialize(&this->m_ExtraAllowedCharacters, arg2);
0067f3e2      SmartArray<PStringBase<unsigned short>,1>::Serialize(&this->m_CompoundLetterGroups, arg2);
0067f330  }

0067f3ed                                         90 90 90                                                               ...

0067f3f0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>* this, uint32_t arg2)

0067f3f0  {
0067f3fb      arg2 = arg2;
0067f3ff      uint8_t edx = ((int8_t)arg2);
0067f403      this->m_buckets = nullptr;
0067f406      this->m_firstInterestingBucket = nullptr;
0067f409      this->m_numBuckets = 0;
0067f40c      this->m_numElements = 0;
0067f410      this->vtable = 0x7fe690;
0067f416      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0067f429      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0067f429      
0067f433      if (eax == bucketSizesEnd_1)
0067f435          eax -= 4;
0067f435      
0067f438      uint32_t eax_1 = *(uint32_t*)eax;
0067f43d      this->m_numBuckets = eax_1;
0067f43d      
0067f440      if (eax_1 > 0x17)
0067f456          this->m_buckets = operator new[]((eax_1 << 2));
0067f440      else
0067f445          this->m_buckets = &this->m_aInplaceBuckets;
0067f445      
0067f45c      class HashTableData<unsigned long,NameFilterLanguageData>** m_buckets = this->m_buckets;
0067f45f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0067f465      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0067f476      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0067f3f0  }

0067f47f                                                                                               90                                 .

0067f480  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>* this)

0067f480  {
0067f48b      while (this->m_numElements != 0)
0067f48b      {
0067f49a          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0067f4a0          class HashTableData<unsigned long,NameFilterLanguageData>** m_firstInterestingBucket_2;
0067f4a0          void* ebx_1;
0067f4a0          
0067f4a0          if (this->m_firstInterestingBucket == ecx_1)
0067f4a0          {
0067f4b4          label_67f4b4:
0067f4b4              m_firstInterestingBucket_2 = nullptr;
0067f4b6              ebx_1 = nullptr;
0067f4a0          }
0067f4a0          else
0067f4a0          {
0067f4a2              while (true)
0067f4a2              {
0067f4a2                  class HashTableData<unsigned long,NameFilterLanguageData>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0067f4a2                  
0067f4a8                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0067f4a8                  {
0067f4ba                      class HashTableData<unsigned long,NameFilterLanguageData>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0067f4bd                      ebx_1 = *(uint32_t*)m_firstInterestingBucket_1;
0067f4bf                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0067f4bf                      break;
0067f4a8                  }
0067f4a8                  
0067f4af                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0067f4af                  
0067f4b2                  if (&m_firstInterestingBucket[1] == ecx_1)
0067f4b2                      goto label_67f4b4;
0067f4a2              }
0067f4a0          }
0067f4a0          
0067f4c1          class HashTableData<unsigned long,NameFilterLanguageData>* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0067f4c1          
0067f4c5          if (m_hashNext == ebx_1)
0067f4d7              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0067f4c5          else
0067f4c5          {
0067f4ce              class HashTableData<unsigned long,NameFilterLanguageData>* m_hashNext_1;
0067f4ce              
0067f4ce              do
0067f4ce              {
0067f4c7                  m_hashNext_1 = m_hashNext;
0067f4c9                  m_hashNext = m_hashNext->m_hashNext;
0067f4ce              } while (m_hashNext != ebx_1);
0067f4ce              
0067f4d2              if (m_hashNext_1 != 0)
0067f4de                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0067f4d2              else
0067f4d7                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0067f4c5          }
0067f4c5          
0067f4e7          this->m_numElements -= 1;
0067f4e7          
0067f4ea          if (ebx_1 != 0)
0067f4ea          {
0067f4fd              if ((*(uint32_t*)((char*)ebx_1 + 0x20) & 0x80000000) == 0x80000000)
0067f4fd              {
0067f4ff                  void* ecx_4 = *(uint32_t*)((char*)ebx_1 + 0x1c);
0067f4ff                  
0067f504                  if (ecx_4 != 0)
0067f504                  {
0067f506                      int32_t i_2 = *(uint32_t*)((char*)ecx_4 - 4);
0067f50c                      void* edi_1 = ((char*)ecx_4 + (i_2 << 2));
0067f50c                      
0067f514                      if ((i_2 - 1) >= 0)
0067f514                      {
0067f517                          int32_t i_1 = i_2;
0067f547                          int32_t i;
0067f547                          
0067f547                          do
0067f547                          {
0067f520                              int32_t esi_1 = *(uint32_t*)((char*)edi_1 - 4);
0067f523                              edi_1 -= 4;
0067f523                              
0067f539                              if ((InterlockedDecrement((esi_1 - 0x10)) == 0 && esi_1 != 0x14))
0067f541                                  **(uint32_t**)(esi_1 - 0x14)(1);
0067f541                              
0067f543                              i = i_1;
0067f543                              i_1 -= 1;
0067f547                          } while (i != 1);
0067f514                      }
0067f514                      
0067f54e                      operator delete[](((char*)ecx_4 - 4));
0067f504                  }
0067f4fd              }
0067f4fd              
0067f559              int32_t* esi_4 = (*(uint32_t*)((char*)ebx_1 + 0x18) - 0x14);
0067f559              
0067f56c              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0067f574                  **(uint32_t**)esi_4(1);
0067f574              
0067f577              operator delete(ebx_1);
0067f4ea          }
0067f48b      }
0067f480  }

0067f51d                                                                                         8d 49 00                               .I.
0067f592                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067f5a0  void __fastcall HashTable<unsigned long,NameFilterLanguageData,0>::~HashTable<unsigned long,NameFilterLanguageData,0>(class HashTable<unsigned long,NameFilterLanguageData,0>* this)

0067f5a0  {
0067f5a4      this->vtable = 0x7fe694;
0067f5ac      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>::delete_contents(&this->m_intrusiveTable);
0067f5b1      class HashTableData<unsigned long,NameFilterLanguageData>** m_buckets = this->m_intrusiveTable.m_buckets;
0067f5a1      this->m_intrusiveTable.vtable = 0x7fe690;
0067f5a1      
0067f5bf      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0067f5c2          operator delete[](m_buckets);
0067f5c2      
0067f5a1      this->m_intrusiveTable.m_buckets = nullptr;
0067f5a1      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0067f5a1      this->m_intrusiveTable.m_numBuckets = 0;
0067f5a1      this->m_intrusiveTable.m_numElements = 0;
0067f5a0  }

0067f5da                                                                                90 90 90 90 90 90                            ......

0067f5e0  void* __thiscall HashTable<unsigned long,NameFilterLanguageData,0>::`scalar deleting destructor'(class HashTable<unsigned long,NameFilterLanguageData,0>* this, uint32_t arg2)

0067f5e0  {
0067f5e9      this->vtable = 0x7fe694;
0067f5ef      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>::delete_contents(&this->m_intrusiveTable);
0067f5f4      class HashTableData<unsigned long,NameFilterLanguageData>** m_buckets = this->m_intrusiveTable.m_buckets;
0067f5e4      this->m_intrusiveTable.vtable = 0x7fe690;
0067f5e4      
0067f602      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0067f605          operator delete[](m_buckets);
0067f605      
0067f5e4      this->m_intrusiveTable.m_buckets = nullptr;
0067f5e4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0067f5e4      this->m_intrusiveTable.m_numBuckets = 0;
0067f5e4      this->m_intrusiveTable.m_numElements = 0;
0067f5e4      
0067f620      if ((arg2 & 1) != 0)
0067f623          operator delete(this);
0067f623      
0067f62f      return this;
0067f5e0  }

0067f632                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067f640  void __fastcall NameFilterTable::NameFilterTable(class NameFilterTable* this)

0067f640  {
0067f649      DBObj::DBObj(this, INVALID_DID.id);
0067f64e      this->vtable = 0x7fe698;
0067f659      this->m_LanguageData.vtable = 0x7fe694;
0067f660      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>(&this->m_LanguageData.m_intrusiveTable, 0x17);
0067f640  }

0067f669                             90 90 90 90 90 90 90                                                           .......

0067f670  uint32_t NameFilterTable::GetDBOType(class NameFilterTable const* this @ ecx) __pure

0067f670  {
0067f675      return 0x16;
0067f670  }

0067f676                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0067f680  class DBObj* NameFilterTable::Allocate(class NameFilterTable const* this @ ecx)

0067f680  {
0067f680      /* tailcall */
0067f680      return NameFilterTable::Allocator();
0067f680  }

0067f685                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0067f690  void* __thiscall NameFilterTable::`scalar deleting destructor'(class NameFilterTable* this, uint32_t arg2)

0067f690  {
0067f696      HashTable<unsigned long,NameFilterLanguageData,0>::~HashTable<unsigned long,NameFilterLanguageData,0>(&this->m_LanguageData);
0067f69d      DBObj::~DBObj(this);
0067f69d      
0067f6a7      if ((arg2 & 1) != 0)
0067f6aa          operator delete(this);
0067f6aa      
0067f6b5      return this;
0067f690  }

0067f6b8                                                                          90 90 90 90 90 90 90 90                          ........

0067f6c0  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>,HashTableData<unsigned long,NameFilterLanguageData> *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>* arg2, class Archive* arg3)

0067f6c0  {
0067f6c7      class Archive* edi = arg3;
0067f6c7      
0067f6d2      if ((!(edi->m_flags) & 1) != 0)
0067f6d8          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
0067f6d8      
0067f6e6      int32_t ebx;
0067f6e6      
0067f6e6      if ((((int8_t)edi->m_flags) & 5) != 1)
0067f725          ebx = arg3;
0067f6e6      else
0067f6e6      {
0067f6ef          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0067f6f5          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0067f6fd          arg3 = arg2->m_numBuckets;
0067f70d          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0067f70d          
0067f717          if (eax_2 == bucketSizesEnd_1)
0067f719              eax_2 -= 4;
0067f719          
0067f720          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
0067f6e6      }
0067f6e6      
0067f72d      Archive::CheckAlignment(edi, 1);
0067f736      uint8_t* eax_3 = Archive::GetBytes(edi, 1);
0067f736      
0067f73f      if (eax_3 != 0)
0067f73f      {
0067f745          if ((edi->m_flags & 1) == 0)
0067f74b              ebx = *(uint8_t*)eax_3;
0067f745          else
0067f747              *(uint8_t*)eax_3 = ebx;
0067f73f      }
0067f73f      
0067f751      if ((edi->m_flags & 5) == 0)
0067f751      {
0067f759          uint32_t eax_4 = ((uint32_t)ebx);
0067f759          
0067f75e          if (eax_4 < 0x17)
0067f777              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
0067f75e          else
0067f762              Archive::RaiseError(edi);
0067f751      }
0067f751      
0067f783      if ((((int8_t)edi->m_flags) & 5) == 1)
0067f78c          arg3 = arg2->m_numElements;
0067f78c      
0067f79b      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, edi);
0067f79b      
0067f7ac      if ((((int8_t)edi->m_flags) & 5) == 1)
0067f7ac      {
0067f7b7          void __return;
0067f7b7          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0067f7bc          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0067f7be          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
0067f7c1          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
0067f7c1          
0067f7c6          while (i != 0)
0067f7c6          {
0067f7fc              do
0067f7fc              {
0067f7cc                  Archive::CheckAlignment(edi, 4);
0067f7d5                  uint8_t* eax_7 = Archive::GetBytes(edi, 4);
0067f7d5                  
0067f7dc                  if (eax_7 != 0)
0067f7dc                  {
0067f7e2                      if ((edi->m_flags & 1) == 0)
0067f7ec                          i->m_hashKey = *(uint32_t*)eax_7;
0067f7e2                      else
0067f7e6                          *(uint32_t*)eax_7 = i->m_hashKey;
0067f7dc                  }
0067f7dc                  
0067f7f2                  NameFilterLanguageData::Serialize(&i->m_data, edi);
0067f7f7                  i = i->m_hashNext;
0067f7fc              } while (i != 0);
0067f7fc              
0067f807              while (true)
0067f807              {
0067f807                  m_currBucket = &m_currBucket[1];
0067f807                  
0067f80c                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0067f80c                      break;
0067f80c                  
0067f80e                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0067f80e                  
0067f813                  if (i_1 != 0)
0067f813                  {
0067f815                      i = i_1;
0067f817                      break;
0067f813                  }
0067f807              }
0067f7c6          }
0067f7ac      }
0067f7ac      
0067f81f      if ((edi->m_flags & 5) == 0)
0067f81f      {
0067f827          uint32_t eax_10 = Archive::GetSizeLeft(edi);
0067f82c          class Archive* ecx_17 = arg3;
0067f82c          
0067f832          if (ecx_17 > eax_10)
0067f8f0              Archive::RaiseError(edi);
0067f832          else
0067f832          {
0067f838              void* ebx_3 = nullptr;
0067f83c              int32_t var_10_1 = 0;
0067f83c              
0067f840              if (ecx_17 > 0)
0067f840              {
0067f84d                  while (true)
0067f84d                  {
0067f84d                      void* esi_1 = operator new(0x28);
0067f84d                      
0067f854                      if (esi_1 == 0)
0067f885                          esi_1 = nullptr;
0067f854                      else
0067f854                      {
0067f856                          __builtin_memset(((char*)esi_1 + 4), 0, 0x14);
0067f865                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0067f871                          *(uint32_t*)((char*)esi_1 + 0x18) = PStringBase<unsigned short>::s_NullBuffer_1;
0067f874                          InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
0067f87a                          *(uint32_t*)((char*)esi_1 + 0x1c) = 0;
0067f87d                          *(uint32_t*)((char*)esi_1 + 0x20) = 0;
0067f880                          *(uint32_t*)((char*)esi_1 + 0x24) = 0;
0067f854                      }
0067f854                      
0067f88b                      Archive::CheckAlignment(edi, 4);
0067f894                      uint8_t* eax_14 = Archive::GetBytes(edi, 4);
0067f894                      
0067f89b                      if (eax_14 != 0)
0067f89b                      {
0067f8a1                          if ((edi->m_flags & 1) == 0)
0067f8ab                              *(uint32_t*)esi_1 = *(uint32_t*)eax_14;
0067f8a1                          else
0067f8a5                              *(uint32_t*)eax_14 = *(uint32_t*)esi_1;
0067f89b                      }
0067f89b                      
0067f8b1                      NameFilterLanguageData::Serialize(((char*)esi_1 + 8), edi);
0067f8b1                      
0067f8be                      if ((((int8_t)(edi->m_flags >> 2)) & 1) != 0)
0067f8fc                          return;
0067f8fc                      
0067f8cd                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, esi_1, ebx_3) == 0)
0067f8cd                          break;
0067f8cd                      
0067f8d8                      bool cond:1_1 = (var_10_1 + 1) < arg3;
0067f8da                      ebx_3 = esi_1;
0067f8dc                      var_10_1 += 1;
0067f8dc                      
0067f8e0                      if (!(cond:1_1))
0067f8ed                          return;
0067f84d                  }
0067f84d                  
0067f8f0                  Archive::RaiseError(edi);
0067f840              }
0067f832          }
0067f81f      }
0067f6c0  }

0067f8fd                                                                                         90 90 90                               ...

0067f900  void __thiscall NameFilterTable::Serialize(class NameFilterTable* this, class Archive* arg2)

0067f900  {
0067f902      class Archive* edi = arg2;
0067f909      DBObj::Serialize(this, edi);
0067f909      
0067f915      if ((!(edi->m_flags) & 1) != 0)
0067f91a          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>::delete_contents(&this->m_LanguageData.m_intrusiveTable);
0067f91a      
0067f929      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,NameFilterLanguageData> *,0>,HashTableData<unsigned long,NameFilterLanguageData> *,SB_Default>(&arg2, &this->m_LanguageData.m_intrusiveTable, edi);
0067f900  }

0067f936                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0067f940  class BaseProperty* _STL::__copy_backward(class BaseProperty* arg1, class BaseProperty* arg2, class BaseProperty* arg3, struct _STL::random_access_iterator_tag const* arg4, int32_t* arg5)

0067f940  {
0067f946      class BaseProperty* edi = arg2;
0067f94e      int32_t i_2 = (((char*)edi - arg1) >> 3);
0067f94e      
0067f953      if (i_2 <= 0)
0067f97d          return arg3;
0067f97d      
0067f955      class BaseProperty* esi_1 = arg3;
0067f95a      int32_t i_1 = i_2;
0067f96f      int32_t i;
0067f96f      
0067f96f      do
0067f96f      {
0067f960          edi -= 8;
0067f963          esi_1 -= 8;
0067f969          BaseProperty::operator=(esi_1, edi);
0067f96e          i = i_1;
0067f96e          i_1 -= 1;
0067f96f      } while (i != 1);
0067f976      return esi_1;
0067f940  }

0067f97e                                                                                            90 90                                ..

0067f980  uint8_t __stdcall PropertyGroupNameSort::operator()(class PropertyGroupNameSort* this @ ecx, uint32_t const arg2, uint32_t const arg3)

0067f980  {
0067f983      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0067f98f      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_1;
0067f998      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0067f99a      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0067f99f      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0067f9a7      int32_t eax_2;
0067f9a7      class PStringBase<char>* edx;
0067f9a7      eax_2 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0067f9b1      class PSRefBufferCharData<char>** __saved_ebx_2 = &PStringBase<char>::s_NullBuffer_4;
0067f9b2      uint32_t const var_18 = arg2;
0067f9b3      uint8_t eax_3;
0067f9b3      class PStringBase<char>* edx_1;
0067f9b3      eax_3 = MasterProperty::InqPropertyGroupNameStringStatic(eax_2, edx);
0067f9b3      
0067f9bd      if (eax_3 != 0)
0067f9bd      {
0067f9c7          class PSRefBufferCharData<char>** __saved_ebx_3 = &PStringBase<char>::s_NullBuffer_3;
0067f9c8          uint32_t const var_18_1 = arg3;
0067f9c8          
0067f9d3          if (MasterProperty::InqPropertyGroupNameStringStatic(arg3, edx_1) != 0)
0067f9d3          {
0067f9f5              int32_t ebx;
0067f9f5              ebx = _stricmp(PStringBase<char>::s_NullBuffer_4, PStringBase<char>::s_NullBuffer_3) < 0;
0067f9f8              void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
0067f9f8              
0067fa07              if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0067fa0f                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0067fa0f              
0067fa15              void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
0067fa15              
0067fa24              if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0067fa2c                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0067fa2c              
0067fa2e              int32_t eax_10;
0067fa2e              eax_10 = ebx;
0067fa36              return eax_10;
0067f9d3          }
0067f9bd      }
0067f9bd      
0067fa43      void* __offset(PSRefBufferCharData<char>, -0x14) esi_5 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
0067fa43      
0067fa52      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0067fa5a          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0067fa5a      
0067fa60      void* __offset(PSRefBufferCharData<char>, -0x14) esi_7 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
0067fa60      
0067fa6f      if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0067fa77          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0067fa77      
0067fa7a      int32_t eax_14;
0067fa7a      eax_14 = 0;
0067fa80      return 0;
0067f980  }

0067fa83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0067fa90  uint8_t __stdcall BasePropertyNameSort::operator()(class BasePropertyNameSort* this @ ecx, class BaseProperty const* arg2, class BaseProperty const* arg3)

0067fa90  {
0067fa93      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0067fa9f      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_1;
0067faa8      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0067faaa      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0067faaf      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0067fab7      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0067fab7      
0067fac9      if ((BaseProperty::InqPropertyName(arg2, &PStringBase<char>::s_NullBuffer_4) != 0 && BaseProperty::InqPropertyName(arg3, &PStringBase<char>::s_NullBuffer_3) != 0))
0067fac9      {
0067fafd          int32_t ebx;
0067fafd          ebx = _stricmp(PStringBase<char>::s_NullBuffer_4, PStringBase<char>::s_NullBuffer_3) < 0;
0067fb00          void* __offset(PSRefBufferCharData<char>, -0x14) esi_1 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
0067fb00          
0067fb0f          if ((InterlockedDecrement(((char*)esi_1 + 4)) == 0 && esi_1 != 0))
0067fb17              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_1) + -0x14)(1);
0067fb17          
0067fb1d          void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
0067fb1d          
0067fb2c          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0067fb34              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0067fb34          
0067fb36          int32_t eax_8;
0067fb36          eax_8 = ebx;
0067fb3e          return eax_8;
0067fac9      }
0067fac9      
0067fb4b      void* __offset(PSRefBufferCharData<char>, -0x14) esi_5 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
0067fb4b      
0067fb5a      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0067fb62          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0067fb62      
0067fb68      void* __offset(PSRefBufferCharData<char>, -0x14) esi_7 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
0067fb68      
0067fb77      if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0067fb7f          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0067fb7f      
0067fb82      int32_t eax_12;
0067fb82      eax_12 = 0;
0067fb88      return 0;
0067fa90  }

0067fb8b                                   90 90 90 90 90                                                             .....

0067fb90  uint32_t const* _STL::__median(uint32_t const* arg1, uint32_t const* arg2, uint32_t const* arg3, class PropertyGroupNameSort arg4)

0067fb90  {
0067fbb0      if (PropertyGroupNameSort::operator()(&arg4, *(uint32_t*)arg1, *(uint32_t*)arg2) == 0)
0067fbb0      {
0067fbf5          if (PropertyGroupNameSort::operator()(&arg4, *(uint32_t*)arg1, *(uint32_t*)arg3) == 0)
0067fbf5          {
0067fc0a              if (PropertyGroupNameSort::operator()(&arg4, *(uint32_t*)arg2, *(uint32_t*)arg3) != 0)
0067fc11                  return arg3;
0067fc11              
0067fc0c              return arg2;
0067fbf5          }
0067fbb0      }
0067fbb0      else
0067fbb0      {
0067fbc3          if (PropertyGroupNameSort::operator()(&arg4, *(uint32_t*)arg2, *(uint32_t*)arg3) != 0)
0067fc0c              return arg2;
0067fc0c          
0067fbd6          if (PropertyGroupNameSort::operator()(&arg4, *(uint32_t*)arg1, *(uint32_t*)arg3) != 0)
0067fbdd              return arg3;
0067fbb0      }
0067fbb0      
0067fbe3      return arg1;
0067fb90  }

0067fc12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067fc20  uint32_t* _STL::__unguarded_partition(uint32_t* arg1, uint32_t* arg2, uint32_t arg3, class PropertyGroupNameSort arg4)

0067fc20  {
0067fc26      uint32_t* result = arg1;
0067fc2b      uint32_t* edi = arg2;
0067fc2b      
0067fc38      while (true)
0067fc38      {
0067fc3f          if (PropertyGroupNameSort::operator()(&arg4, *(uint32_t*)result, arg3) != 0)
0067fc3f          {
0067fc54              uint8_t i;
0067fc54              
0067fc54              do
0067fc54              {
0067fc41                  uint32_t ecx_2 = result[1];
0067fc44                  result = &result[1];
0067fc4d                  i = PropertyGroupNameSort::operator()(&arg4, ecx_2, arg3);
0067fc54              } while (i != 0);
0067fc3f          }
0067fc3f          
0067fc56          uint32_t edx_1 = edi[-1];
0067fc59          edi -= 4;
0067fc59          
0067fc69          if (PropertyGroupNameSort::operator()(&arg4, arg3, edx_1) != 0)
0067fc69          {
0067fc83              uint8_t i_1;
0067fc83              
0067fc83              do
0067fc83              {
0067fc70                  uint32_t eax_4 = edi[-1];
0067fc73                  edi -= 4;
0067fc7c                  i_1 = PropertyGroupNameSort::operator()(&arg4, arg3, eax_4);
0067fc83              } while (i_1 != 0);
0067fc69          }
0067fc69          
0067fc87          if (result >= edi)
0067fc87              break;
0067fc87          
0067fc89          uint32_t eax_5 = *(uint32_t*)result;
0067fc8d          *(uint32_t*)result = *(uint32_t*)edi;
0067fc8f          *(uint32_t*)edi = eax_5;
0067fc91          result = &result[1];
0067fc38      }
0067fc38      
0067fc9b      return result;
0067fc20  }

0067fc6d                                         8d 49 00                                                               .I.
0067fc9c                                                                                      90 90 90 90                              ....

0067fca0  void _STL::__unguarded_linear_insert(uint32_t* arg1, uint32_t arg2, class PropertyGroupNameSort arg3)

0067fca0  {
0067fca7      uint32_t* edi = arg1;
0067fcae      void* esi = &edi[-1];
0067fcae      
0067fcbe      if (PropertyGroupNameSort::operator()(&arg3, arg2, edi[-1]) != 0)
0067fcbe      {
0067fcd9          uint8_t i;
0067fcd9          
0067fcd9          do
0067fcd9          {
0067fcc2              *(uint32_t*)edi = *(uint32_t*)esi;
0067fcc4              uint32_t edx_1 = *(uint32_t*)((char*)esi - 4);
0067fcc7              edi = esi;
0067fcc9              esi -= 4;
0067fcd2              i = PropertyGroupNameSort::operator()(&arg3, arg2, edx_1);
0067fcd9          } while (i != 0);
0067fcbe      }
0067fcbe      
0067fcdb      *(uint32_t*)edi = arg2;
0067fca0  }

0067fce1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0067fcf0  void _STL::__unguarded_linear_insert(class BaseProperty* arg1, class BaseProperty arg2, class BasePropertyNameSort arg3)

0067fcf0  {
0067fcf2      class BaseProperty* edi = arg1;
0067fcf6      void* __offset(BaseProperty, -0x8) esi = &edi[-1];
0067fcf6      
0067fd0a      if (BasePropertyNameSort::operator()(&arg3, &arg2, esi) != 0)
0067fd0a      {
0067fd2e          uint8_t i;
0067fd2e          
0067fd2e          do
0067fd2e          {
0067fd13              BaseProperty::operator=(edi, esi);
0067fd18              edi = esi;
0067fd1a              esi -= 8;
0067fd27              i = BasePropertyNameSort::operator()(&arg3, &arg2, esi);
0067fd2e          } while (i != 0);
0067fd0a      }
0067fd0a      
0067fd37      BaseProperty::operator=(edi, &arg2);
0067fd3c      class BasePropertyDesc* m_pcPropertyDesc = arg2.m_pcPropertyDesc;
0067fd3c      
0067fd42      if (m_pcPropertyDesc != 0)
0067fd42      {
0067fd4c          uint32_t esi_2 = (m_pcPropertyDesc->m_cRef - 1);
0067fd49          m_pcPropertyDesc->m_cRef = esi_2;
0067fd49          
0067fd53          if (esi_2 == 0)
0067fd55              m_pcPropertyDesc->vtable->__vecDelDtor(1);
0067fd55          
0067fd5b          arg2.m_pcPropertyDesc = 0;
0067fd42      }
0067fd42      
0067fd63      class BasePropertyValue* m_pcPropertyValue = arg2.m_pcPropertyValue;
0067fd63      
0067fd69      if (m_pcPropertyValue != 0)
0067fd69      {
0067fd73          uint32_t esi_4 = (m_pcPropertyValue->m_cRef - 1);
0067fd70          m_pcPropertyValue->m_cRef = esi_4;
0067fd70          
0067fd7a          if (esi_4 == 0)
0067fd7c              m_pcPropertyValue->vtable->__vecDelDtor(1);
0067fd69      }
0067fcf0  }

0067fd85                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0067fd90  void _STL::__push_heap(uint32_t* arg1, int32_t arg2, int32_t arg3, uint32_t arg4, class PropertyGroupNameSort arg5)

0067fd90  {
0067fd92      int32_t edi = arg2;
0067fd99      int32_t eax_1;
0067fd99      int32_t edx;
0067fd99      edx = HIGHD(((int64_t)(edi - 1)));
0067fd99      eax_1 = LOWD(((int64_t)(edi - 1)));
0067fda2      int32_t esi_1 = ((eax_1 - edx) >> 1);
0067fda2      
0067fda6      if (edi <= arg3)
0067fda6      {
0067fdec          arg1[edi] = arg4;
0067fdf1          return;
0067fda6      }
0067fda6      
0067fdda      do
0067fdda      {
0067fdc2          if (PropertyGroupNameSort::operator()(&arg5, arg1[esi_1], arg4) == 0)
0067fdc2              break;
0067fdc2          
0067fdca          int32_t eax_7;
0067fdca          int32_t edx_1;
0067fdca          edx_1 = HIGHD(((int64_t)(esi_1 - 1)));
0067fdca          eax_7 = LOWD(((int64_t)(esi_1 - 1)));
0067fdcf          arg1[edi] = arg1[esi_1];
0067fdd2          edi = esi_1;
0067fdd4          esi_1 = ((eax_7 - edx_1) >> 1);
0067fdda      } while (edi > arg3);
0067fdda      
0067fddc      arg1[edi] = arg4;
0067fd90  }

0067fdf2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067fe00  void _STL::__push_heap(class BaseProperty* arg1, int32_t arg2, int32_t arg3, class BaseProperty arg4, class BasePropertyNameSort arg5)

0067fe00  {
0067fe07      int32_t edi = arg2;
0067fe0e      int32_t eax_1;
0067fe0e      int32_t edx;
0067fe0e      edx = HIGHD(((int64_t)(edi - 1)));
0067fe0e      eax_1 = LOWD(((int64_t)(edi - 1)));
0067fe17      int32_t esi_1 = ((eax_1 - edx) >> 1);
0067fe17      
0067fe1b      while (edi > arg3)
0067fe1b      {
0067fe25          void* ebx_1 = &arg1[esi_1];
0067fe25          
0067fe35          if (BasePropertyNameSort::operator()(&arg5, ebx_1, &arg4) == 0)
0067fe35              break;
0067fe35          
0067fe3c          BaseProperty::operator=(&arg1[edi], ebx_1);
0067fe44          int32_t eax_6;
0067fe44          int32_t edx_1;
0067fe44          edx_1 = HIGHD(((int64_t)(esi_1 - 1)));
0067fe44          eax_6 = LOWD(((int64_t)(esi_1 - 1)));
0067fe49          edi = esi_1;
0067fe4b          esi_1 = ((eax_6 - edx_1) >> 1);
0067fe1b      }
0067fe1b      
0067fe5d      BaseProperty::operator=(&arg1[edi], &arg4);
0067fe62      class BasePropertyDesc* m_pcPropertyDesc = arg4.m_pcPropertyDesc;
0067fe62      
0067fe68      if (m_pcPropertyDesc != 0)
0067fe68      {
0067fe72          uint32_t esi_3 = (m_pcPropertyDesc->m_cRef - 1);
0067fe6f          m_pcPropertyDesc->m_cRef = esi_3;
0067fe6f          
0067fe79          if (esi_3 == 0)
0067fe7b              m_pcPropertyDesc->vtable->__vecDelDtor(1);
0067fe7b          
0067fe81          arg4.m_pcPropertyDesc = 0;
0067fe68      }
0067fe68      
0067fe89      class BasePropertyValue* m_pcPropertyValue = arg4.m_pcPropertyValue;
0067fe89      
0067fe8f      if (m_pcPropertyValue != 0)
0067fe8f      {
0067fe99          uint32_t esi_5 = (m_pcPropertyValue->m_cRef - 1);
0067fe96          m_pcPropertyValue->m_cRef = esi_5;
0067fe96          
0067fea0          if (esi_5 == 0)
0067fea2              m_pcPropertyValue->vtable->__vecDelDtor(1);
0067fe8f      }
0067fe00  }

0067feac                                      90 90 90 90                                                              ....

0067feb0  void __thiscall PropertyCollection::GetSubDataIDs(class PropertyCollection const* this, class QualifiedDataIDArray* arg2)

0067feb0  {
0067febe      void __return;
0067febe      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashProperties.m_intrusiveTable, &__return);
0067fec3      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
0067fec8      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
0067feca      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
0067feca      
0067fecd      if (i_1 != 0)
0067fecd      {
0067fed8          while (true)
0067fed8          {
0067fed8              BaseProperty::GetSubDataIDs(&i_1->m_data, arg2);
0067fedd              i_1 = i_1->m_hashNext;
0067fedd              
0067fee2              if (i_1 == 0)
0067fee2              {
0067fefb                  class HashTableData<unsigned long,DBOCache *>* i;
0067fefb                  
0067fefb                  do
0067fefb                  {
0067fef0                      m_currBucket = &m_currBucket[1];
0067fef0                      
0067fef5                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0067ff0a                          return;
0067ff0a                      
0067fef7                      i = *(uint32_t*)m_currBucket;
0067fefb                  } while (i == 0);
0067fefb                  
0067fefd                  i_1 = i;
0067fefd                  
0067ff01                  if (i_1 == 0)
0067ff01                      break;
0067fee2              }
0067fed8          }
0067fecd      }
0067feb0  }

0067ff0d                                         90 90 90                                                               ...

0067ff10  class BaseProperty* _STL::__unguarded_partition(class BaseProperty* arg1, class BaseProperty* arg2, class BaseProperty arg3, class BasePropertyNameSort arg4)

0067ff10  {
0067ff11      class BaseProperty* esi = arg2;
0067ff16      class BaseProperty* result = arg1;
0067ff16      
0067ff2a      while (true)
0067ff2a      {
0067ff31          if (BasePropertyNameSort::operator()(&arg4, result, &arg3) != 0)
0067ff31          {
0067ff47              uint8_t i;
0067ff47              
0067ff47              do
0067ff47              {
0067ff38                  result = &result[1];
0067ff40                  i = BasePropertyNameSort::operator()(&arg4, result, &arg3);
0067ff47              } while (i != 0);
0067ff31          }
0067ff31          
0067ff49          esi -= 8;
0067ff49          
0067ff5d          if (BasePropertyNameSort::operator()(&arg4, &arg3, esi) != 0)
0067ff5d          {
0067ff74              uint8_t i_1;
0067ff74              
0067ff74              do
0067ff74              {
0067ff60                  esi -= 8;
0067ff6d                  i_1 = BasePropertyNameSort::operator()(&arg4, &arg3, esi);
0067ff74              } while (i_1 != 0);
0067ff5d          }
0067ff5d          
0067ff78          if (result >= esi)
0067ff78              break;
0067ff78          
0067ff7c          _STL::swap(result, esi);
0067ff84          result = &result[1];
0067ff2a      }
0067ff2a      
0067ff89      class BasePropertyDesc* m_pcPropertyDesc = arg3.m_pcPropertyDesc;
0067ff89      
0067ff8f      if (m_pcPropertyDesc != 0)
0067ff8f      {
0067ff99          uint32_t esi_2 = (m_pcPropertyDesc->m_cRef - 1);
0067ff96          m_pcPropertyDesc->m_cRef = esi_2;
0067ff96          
0067ffa0          if (esi_2 == 0)
0067ffa2              m_pcPropertyDesc->vtable->__vecDelDtor(1);
0067ffa2          
0067ffa8          arg3.m_pcPropertyDesc = 0;
0067ff8f      }
0067ff8f      
0067ffb0      class BasePropertyValue* m_pcPropertyValue = arg3.m_pcPropertyValue;
0067ffb0      
0067ffb6      if (m_pcPropertyValue != 0)
0067ffb6      {
0067ffbe          uint32_t esi_4 = (m_pcPropertyValue->m_cRef - 1);
0067ffbb          m_pcPropertyValue->m_cRef = esi_4;
0067ffbb          
0067ffc5          if (esi_4 == 0)
0067ffc7              m_pcPropertyValue->vtable->__vecDelDtor(1);
0067ffb6      }
0067ffb6      
0067ffd1      return result;
0067ff10  }

0067ffd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0067ffe0  void _STL::__unguarded_insertion_sort_aux(uint32_t* arg1, uint32_t* arg2, uint32_t* arg3, class PropertyGroupNameSort arg4)

0067ffe0  {
0067ffe5      uint32_t* ebp = arg1;
0067ffe5      
0067ffeb      if (ebp != arg2)
0067ffeb      {
00680036          bool cond:0_1;
00680036          
00680036          do
00680036          {
0067fff3              uint32_t ebx_1 = *(uint32_t*)ebp;
0067fff6              uint32_t* esi_1 = &ebp[-1];
0067ffff              uint32_t* edi_1 = ebp;
0067ffff              
00680008              if (PropertyGroupNameSort::operator()(&arg2, ebx_1, ebp[-1]) != 0)
00680008              {
00680029                  uint8_t i;
00680029                  
00680029                  do
00680029                  {
00680012                      *(uint32_t*)edi_1 = *(uint32_t*)esi_1;
00680014                      uint32_t edx_1 = esi_1[-1];
00680017                      edi_1 = esi_1;
00680019                      esi_1 -= 4;
00680022                      i = PropertyGroupNameSort::operator()(&arg2, ebx_1, edx_1);
00680029                  } while (i != 0);
00680008              }
00680008              
0068002f              ebp = &ebp[1];
00680032              cond:0_1 = ebp != arg2;
00680034              *(uint32_t*)edi_1 = ebx_1;
00680036          } while (cond:0_1);
0067ffeb      }
0067ffe0  }

0068003d                                                                                         90 90 90                               ...

00680040  void _STL::__unguarded_insertion_sort_aux(class BaseProperty* arg1, class BaseProperty* arg2, class BaseProperty* arg3, class BasePropertyNameSort arg4)

00680040  {
0068004d      for (class BaseProperty* i = arg1; i != arg2; i = &i[1])
0068004d      {
0068005a          int32_t var_18 = 0;
00680060          int32_t var_14_1 = 0;
00680067          BaseProperty::operator=(&var_18, i);
0068006d          _STL::__unguarded_linear_insert(i, var_18, arg4);
0068004d      }
00680040  }


00680080  void _STL::__adjust_heap(uint32_t* arg1, int32_t arg2, int32_t arg3, uint32_t arg4, class PropertyGroupNameSort arg5)

00680080  {
0068008c      int32_t edi = arg2;
00680090      int32_t esi = ((edi * 2) + 2);
00680094      bool cond:1 = esi != arg3;
00680096      arg2 = edi;
00680096      
0068009a      while (esi < arg3)
0068009a      {
006800b4          if (PropertyGroupNameSort::operator()(&arg5, arg1[esi], arg1[(esi - 1)]) != 0)
006800b6              esi -= 1;
006800b6          
006800ba          arg1[edi] = arg1[esi];
006800bd          edi = esi;
006800bf          esi = ((esi * 2) + 2);
006800c3          cond:1 = esi != arg3;
0068009a      }
0068009a      
006800c7      if (!(cond:1))
006800c7      {
006800cd          arg1[edi] = arg1[(esi - 1)];
006800d0          edi = (esi - 1);
006800c7      }
006800c7      
006800e4      _STL::__push_heap(arg1, edi, arg2, arg4, ((int8_t)*(uint32_t*)((char*)arg5 + 0)));
00680080  }

006800f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00680100  void _STL::__adjust_heap(class BaseProperty* arg1, int32_t arg2, int32_t arg3, class BaseProperty arg4, class BasePropertyNameSort arg5)

00680100  {
0068010c      int32_t edi = arg2;
00680110      int32_t esi = ((edi * 2) + 2);
00680114      bool cond:1 = esi != arg3;
00680116      arg2 = edi;
00680116      
0068011a      while (esi < arg3)
0068011a      {
00680120          void* eax_1 = &arg1[esi];
00680120          
00680133          if (BasePropertyNameSort::operator()(&arg5, eax_1, ((char*)eax_1 - 8)) != 0)
00680135              esi -= 1;
00680135          
0068013d          BaseProperty::operator=(&arg1[edi], &arg1[esi]);
00680142          edi = esi;
00680144          esi = ((esi * 2) + 2);
00680148          cond:1 = esi != arg3;
0068011a      }
0068011a      
0068014c      if (!(cond:1))
0068014c      {
00680156          BaseProperty::operator=(&arg1[edi], &arg1[(esi - 1)]);
0068015b          edi = (esi - 1);
0068014c      }
0068014c      
00680162      class BasePropertyNameSort var_14_4 = ((int8_t)*(uint32_t*)((char*)arg5 + 0));
0068016f      int32_t var_1c = 0;
00680171      int32_t var_18_2 = 0;
00680174      BaseProperty::operator=(&var_1c, &arg4);
00680180      _STL::__push_heap(arg1, edi, arg2, var_1c, var_14_4);
00680185      class BasePropertyDesc* m_pcPropertyDesc = arg4.m_pcPropertyDesc;
00680185      
0068018e      if (m_pcPropertyDesc != 0)
0068018e      {
00680198          uint32_t edi_2 = (m_pcPropertyDesc->m_cRef - 1);
00680195          m_pcPropertyDesc->m_cRef = edi_2;
00680195          
0068019f          if (edi_2 == 0)
006801a1              m_pcPropertyDesc->vtable->__vecDelDtor(1);
006801a1          
006801a7          arg4.m_pcPropertyDesc = 0;
0068018e      }
0068018e      
006801ab      class BasePropertyValue* m_pcPropertyValue = arg4.m_pcPropertyValue;
006801ab      
006801b1      if (m_pcPropertyValue != 0)
006801b1      {
006801bb          uint32_t edi_4 = (m_pcPropertyValue->m_cRef - 1);
006801b8          m_pcPropertyValue->m_cRef = edi_4;
006801b8          
006801c2          if (edi_4 == 0)
006801c4              m_pcPropertyValue->vtable->__vecDelDtor(1);
006801b1      }
00680100  }

006801cf                                               90                                                                 .

006801d0  void _STL::__insertion_sort(uint32_t* arg1, uint32_t* arg2, class PropertyGroupNameSort arg3)

006801d0  {
006801d0      uint32_t* eax_3 = arg2;
006801d0      
006801db      if (arg1 != eax_3)
006801db      {
006801de          void* esi_1 = &arg1[1];
006801de          
006801e3          if (esi_1 != eax_3)
006801e3          {
006801e9              int32_t edi_2 = ((char*)esi_1 - arg1);
006801e9              
00680239              do
00680239              {
006801f2                  uint32_t ebp_1 = *(uint32_t*)esi_1;
006801f2                  
00680201                  if (PropertyGroupNameSort::operator()(&arg2, ebp_1, *(uint32_t*)arg1) == 0)
00680225                      _STL::__unguarded_linear_insert(esi_1, ebp_1, arg3);
00680201                  else
00680201                  {
00680205                      if (edi_2 > 0)
00680211                          memmove((((char*)esi_1 - edi_2) + 4), arg1, edi_2);
00680211                      
0068021a                      *(uint32_t*)arg1 = ebp_1;
00680201                  }
00680201                  
00680231                  esi_1 += 4;
00680234                  edi_2 += 4;
00680239              } while (esi_1 != arg2);
006801e3          }
006801db      }
006801d0  }

006801ed                                         8d 49 00                                                               .I.

00680240  void _STL::__linear_insert(class BaseProperty* arg1, class BaseProperty* arg2, class BaseProperty arg3, class BasePropertyNameSort arg4)

00680240  {
00680256      void* __offset(BaseProperty, 0x8) var_10;
00680256      
00680256      if (BasePropertyNameSort::operator()(&arg4, &arg3, arg1) == 0)
00680256      {
00680283          class BasePropertyNameSort var_8_3 = ((int8_t)*(uint32_t*)((char*)arg4 + 0));
0068028e          var_10 = nullptr;
00680294          int32_t var_c_2 = 0;
0068029b          BaseProperty::operator=(&var_10, &arg3);
006802a5          _STL::__unguarded_linear_insert(arg2, var_10, var_8_3);
00680256      }
00680256      else
00680256      {
0068025c          int32_t* var_8_1 = nullptr;
00680262          class BaseProperty* var_c_1 = &arg3;
00680266          var_10 = &arg2[1];
00680269          _STL::__copy_backward(arg1, arg2, var_10, var_c_1, var_8_1);
00680278          BaseProperty::operator=(arg1, &arg3);
00680256      }
006802ad      class BasePropertyDesc* m_pcPropertyDesc = arg3.m_pcPropertyDesc;
006802ad      
006802b3      if (m_pcPropertyDesc != 0)
006802b3      {
006802bd          uint32_t esi_2 = (m_pcPropertyDesc->m_cRef - 1);
006802ba          m_pcPropertyDesc->m_cRef = esi_2;
006802ba          
006802c4          if (esi_2 == 0)
006802c6              m_pcPropertyDesc->vtable->__vecDelDtor(1);
006802c6          
006802cc          arg3.m_pcPropertyDesc = 0;
006802b3      }
006802b3      
006802d4      class BasePropertyValue* m_pcPropertyValue = arg3.m_pcPropertyValue;
006802d4      
006802da      if (m_pcPropertyValue != 0)
006802da      {
006802e4          uint32_t esi_4 = (m_pcPropertyValue->m_cRef - 1);
006802e1          m_pcPropertyValue->m_cRef = esi_4;
006802e1          
006802eb          if (esi_4 == 0)
006802ed              m_pcPropertyValue->vtable->__vecDelDtor(1);
006802da      }
00680240  }

006802f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00680300  void _STL::__pop_heap(class BaseProperty* arg1, class BaseProperty* arg2, class BaseProperty* arg3, class BaseProperty arg4, class BasePropertyNameSort arg5, int32_t* arg6)

00680300  {
0068030a      BaseProperty::operator=(arg3, arg1);
0068031e      int32_t var_10 = 0;
00680324      int32_t var_c = 0;
0068032b      BaseProperty::operator=(&var_10, &arg4);
0068033d      _STL::__adjust_heap(arg1, 0, (((char*)arg2 - arg1) >> 3), var_10, arg5);
00680342      class BasePropertyDesc* m_pcPropertyDesc = arg4.m_pcPropertyDesc;
00680342      
0068034b      if (m_pcPropertyDesc != 0)
0068034b      {
00680355          uint32_t esi_2 = (m_pcPropertyDesc->m_cRef - 1);
00680352          m_pcPropertyDesc->m_cRef = esi_2;
00680352          
0068035c          if (esi_2 == 0)
0068035e              m_pcPropertyDesc->vtable->__vecDelDtor(1);
0068035e          
00680364          arg4.m_pcPropertyDesc = 0;
0068034b      }
0068034b      
0068036c      class BasePropertyValue* m_pcPropertyValue = arg4.m_pcPropertyValue;
0068036c      
00680372      if (m_pcPropertyValue != 0)
00680372      {
0068037c          uint32_t esi_4 = (m_pcPropertyValue->m_cRef - 1);
00680379          m_pcPropertyValue->m_cRef = esi_4;
00680379          
00680383          if (esi_4 == 0)
00680385              m_pcPropertyValue->vtable->__vecDelDtor(1);
00680372      }
00680300  }

0068038d                                         90 90 90                                                               ...

00680390  void _STL::__make_heap(uint32_t* arg1, uint32_t* arg2, class PropertyGroupNameSort arg3, uint32_t* arg4, int32_t* arg5)

00680390  {
0068039c      int32_t ebx_2 = (((char*)arg2 - arg1) >> 2);
0068039c      
006803a2      if (ebx_2 >= 2)
006803a2      {
006803a5          class PropertyGroupNameSort ebp_1 = arg3;
006803ad          int32_t eax_2;
006803ad          int32_t edx_1;
006803ad          edx_1 = HIGHD(((int64_t)(ebx_2 - 2)));
006803ad          eax_2 = LOWD(((int64_t)(ebx_2 - 2)));
006803b2          int32_t i = ((eax_2 - edx_1) >> 1);
006803bc          _STL::__adjust_heap(arg1, i, ebx_2, arg1[i], ebp_1);
006803bc          
006803c6          while (i != 0)
006803c6          {
006803c8              uint32_t ecx_1 = arg1[(i - 1)];
006803cc              i -= 1;
006803d2              _STL::__adjust_heap(arg1, i, ebx_2, ecx_1, ebp_1);
006803c6          }
006803a2      }
00680390  }

006803e3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006803f0  void _STL::__make_heap(class BaseProperty* arg1, class BaseProperty* arg2, class BasePropertyNameSort arg3, class BaseProperty* arg4, int32_t* arg5)

006803f0  {
006803fe      int32_t edi_2 = (((char*)arg2 - arg1) >> 3);
006803fe      
00680404      if (edi_2 >= 2)
00680404      {
00680409          int32_t eax_2;
00680409          int32_t edx_1;
00680409          edx_1 = HIGHD(((int64_t)(edi_2 - 2)));
00680409          eax_2 = LOWD(((int64_t)(edi_2 - 2)));
0068040e          int32_t esi_2 = ((eax_2 - edx_1) >> 1);
00680410          void* ebx_1 = &arg1[esi_2];
00680410          
0068041f          while (true)
0068041f          {
0068041f              int32_t var_1c = 0;
00680425              int32_t var_18_1 = 0;
0068042c              BaseProperty::operator=(&var_1c, ebx_1);
00680434              _STL::__adjust_heap(arg1, esi_2, edi_2, var_1c, arg3);
00680434              
0068043e              if (esi_2 == 0)
0068043e                  break;
0068043e              
00680440              esi_2 -= 1;
00680441              ebx_1 -= 8;
0068041f          }
00680404      }
006803f0  }

0068044b                                   90 90 90 90 90                                                             .....

00680450  void _STL::__insertion_sort(class BaseProperty* arg1, class BaseProperty* arg2, class BasePropertyNameSort arg3)

00680450  {
0068045e      if (arg1 != arg2)
0068045e      {
00680465          for (void* __offset(BaseProperty, 0x8) i = &arg1[1]; i != arg2; i += 8)
00680465          {
00680477              int32_t var_1c = 0;
0068047d              int32_t var_18_1 = 0;
00680484              BaseProperty::operator=(&var_1c, i);
0068048b              _STL::__linear_insert(arg1, i, var_1c, arg3);
00680465          }
0068045e      }
00680450  }

0068046d                                         8d 49 00                                                               .I.
0068049f                                                                                               90                                 .

006804a0  void _STL::sort_heap(uint32_t* arg1, uint32_t* arg2, class PropertyGroupNameSort arg3)

006804a0  {
006804a9      void* eax = ((char*)arg2 - arg1);
006804a9      
006804b3      if ((eax & 0xfffffffc) > 4)
006804b3      {
006804ea          void* edi_1;
006804ea          
006804ea          do
006804ea          {
006804c0              uint32_t ecx_2 = *(uint32_t*)(((char*)arg1 + eax) - 4);
006804c6              edi_1 = ((char*)eax - 4);
006804c9              *(uint32_t*)(((char*)arg1 + eax) - 4) = *(uint32_t*)arg1;
006804d8              _STL::__adjust_heap(arg1, 0, (edi_1 >> 2), ecx_2, arg3);
006804dd              eax = edi_1;
006804ea          } while ((edi_1 & 0xfffffffc) > 4);
006804b3      }
006804a0  }

006804bd                                                                                         8d 49 00                               .I.

006804f0  void _STL::sort_heap(class BaseProperty* arg1, class BaseProperty* arg2, class BasePropertyNameSort arg3)

006804f0  {
00680506      if ((((char*)arg2 - arg1) & 0xfffffff8) > 8)
00680506      {
00680511          void* __offset(BaseProperty, -0x8) esi_1 = &arg2[-1];
00680511          
00680548          do
00680548          {
00680516              int32_t* var_14_1 = nullptr;
0068051f              int32_t var_20 = 0;
00680525              int32_t var_1c_1 = 0;
0068052c              BaseProperty::operator=(&var_20, esi_1);
00680534              _STL::__pop_heap(arg1, esi_1, esi_1, var_20, arg3, var_14_1);
00680539              esi_1 -= 8;
00680548          } while ((((8 - arg1) + esi_1) & 0xfffffff8) > 8);
00680506      }
006804f0  }

0068054f                                               90                                                                 .

00680550  void _STL::__partial_sort(uint32_t* arg1, uint32_t* arg2, uint32_t* arg3, uint32_t* arg4, class PropertyGroupNameSort arg5)

00680550  {
00680556      char ebp = ((int8_t)*(uint32_t*)((char*)arg5 + 0));
00680567      _STL::__make_heap(arg1, arg2, ebp, nullptr, nullptr);
00680575      uint32_t* esi = arg2;
00680575      
00680577      if (arg2 < arg3)
00680577      {
006805b7          do
006805b7          {
00680591              if (PropertyGroupNameSort::operator()(&arg5, *(uint32_t*)esi, *(uint32_t*)arg1) != 0)
00680591              {
00680593                  uint32_t eax_3 = *(uint32_t*)esi;
006805a4                  *(uint32_t*)esi = *(uint32_t*)arg1;
006805a6                  _STL::__adjust_heap(arg1, 0, (((char*)arg2 - arg1) >> 2), eax_3, ebp);
00680591              }
00680591              
006805b2              esi = &esi[1];
006805b7          } while (esi < arg3);
00680577      }
00680577      
006805bc      _STL::sort_heap(arg1, arg2, ebp);
00680550  }

006805c9                             90 90 90 90 90 90 90                                                           .......

006805d0  void _STL::__partial_sort(class BaseProperty* arg1, class BaseProperty* arg2, class BaseProperty* arg3, class BaseProperty* arg4, class BasePropertyNameSort arg5)

006805d0  {
006805d6      char ebp = ((int8_t)*(uint32_t*)((char*)arg5 + 0));
006805e0      int32_t* var_14 = nullptr;
006805e2      class BaseProperty* var_18 = nullptr;
006805e5      class BaseProperty* var_20 = arg2;
006805e7      _STL::__make_heap(arg1, var_20, ebp, var_18, var_14);
006805f5      class BaseProperty* esi = arg2;
006805f5      
006805f7      if (arg2 < arg3)
006805f7      {
0068063e          do
0068063e          {
0068060d              if (BasePropertyNameSort::operator()(&arg5, esi, arg1) != 0)
0068060d              {
0068060f                  int32_t* var_14_2 = nullptr;
00680611                  class BasePropertyNameSort var_18_2 = ebp;
00680618                  var_20 = nullptr;
0068061e                  int32_t var_1c_1 = 0;
00680625                  BaseProperty::operator=(&var_20, esi);
0068062d                  _STL::__pop_heap(arg1, arg2, esi, var_20, var_18_2, var_14_2);
0068060d              }
0068060d              
00680639              esi = &esi[1];
0068063e          } while (esi < arg3);
006805f7      }
006805f7      
00680643      _STL::sort_heap(arg1, arg2, ebp);
006805d0  }


00680650  void _STL::__introsort_loop(uint32_t* arg1, uint32_t* arg2, uint32_t* arg3, int32_t arg4, class PropertyGroupNameSort arg5)

00680650  {
00680656      uint32_t* edi = arg2;
00680656      
00680664      if ((((char*)edi - arg1) & 0xfffffffc) > 0x40)
00680664      {
00680667          class PropertyGroupNameSort ebp_1 = arg5;
00680667          
00680676          while (true)
00680676          {
00680676              class PropertyGroupNameSort var_14_1 = ebp_1;
00680676              
00680677              if (arg4 == 0)
00680677              {
006806cf                  _STL::__partial_sort(arg1, edi, edi, nullptr, var_14_1);
006806d8                  break;
00680677              }
00680677              
00680682              int32_t eax_7;
00680682              int32_t edx_1;
00680682              edx_1 = HIGHD(((int64_t)(((char*)edi - arg1) >> 2)));
00680682              eax_7 = LOWD(((int64_t)(((char*)edi - arg1) >> 2)));
00680686              arg4 -= 1;
006806a0              uint32_t* eax_12 = _STL::__unguarded_partition(arg1, edi, *(uint32_t*)_STL::__median(arg1, &arg1[((eax_7 - edx_1) >> 1)], &edi[-1], var_14_1), ebp_1);
006806b1              _STL::__introsort_loop(eax_12, edi, nullptr, arg4, ebp_1);
006806b6              edi = eax_12;
006806b6              
006806c3              if ((((char*)eax_12 - arg1) & 0xfffffffc) <= 0x40)
006806c9                  return;
00680676          }
00680664      }
00680650  }

006806dc                                                                                      90 90 90 90                              ....

006806e0  void _STL::__introsort_loop(class BaseProperty* arg1, class BaseProperty* arg2, class BaseProperty* arg3, int32_t arg4, class BasePropertyNameSort arg5)

006806e0  {
006806e1      class BaseProperty* ebx = arg2;
006806e1      
006806f8      if ((((char*)ebx - arg1) & 0xfffffff8) > 0x80)
006806f8      {
00680706          class BaseProperty* var_1c;
00680706          
00680706          while (arg4 != 0)
00680706          {
00680715              int32_t eax_7;
00680715              int32_t edx_1;
00680715              edx_1 = HIGHD(((int64_t)(((char*)ebx - arg1) >> 3)));
00680715              eax_7 = LOWD(((int64_t)(((char*)ebx - arg1) >> 3)));
0068071a              void* ebp_1 = &arg1[((eax_7 - edx_1) >> 1)];
0068071f              arg4 -= 1;
00680732              class BaseProperty** ecx_2 = &arg2;
00680737              void* eax_13;
00680737              
00680737              if (BasePropertyNameSort::operator()(&arg2, arg1, ebp_1) == 0)
00680737              {
0068075e                  if (BasePropertyNameSort::operator()(ecx_2, arg1, &ebx[-1]) == 0)
0068075e                  {
00680771                      eax_13 = &ebx[-1];
00680771                      
00680773                      if (BasePropertyNameSort::operator()(&arg2, ebp_1, &ebx[-1]) == 0)
00680775                          eax_13 = ebp_1;
0068075e                  }
0068075e                  else
00680760                      eax_13 = arg1;
00680737              }
00680737              else if (BasePropertyNameSort::operator()(ecx_2, ebp_1, &ebx[-1]) != 0)
00680775                  eax_13 = ebp_1;
00680741              else if (BasePropertyNameSort::operator()(&arg2, arg1, &ebx[-1]) == 0)
00680760                  eax_13 = arg1;
00680750              else
00680752                  eax_13 = &ebx[-1];
00680752              
00680782              var_1c = nullptr;
00680788              int32_t var_18_6 = 0;
0068078f              BaseProperty::operator=(&var_1c, eax_13);
00680796              class BaseProperty* eax_16 = _STL::__unguarded_partition(arg1, ebx, var_1c, arg5);
006807a7              _STL::__introsort_loop(eax_16, ebx, nullptr, arg4, arg5);
006807ac              ebx = eax_16;
006807ac              
006807bc              if ((((char*)eax_16 - arg1) & 0xfffffff8) <= 0x80)
006807c6                  return;
00680706          }
00680706          
006807cc          class BaseProperty* var_18_7 = nullptr;
006807ce          var_1c = ebx;
006807d1          _STL::__partial_sort(arg1, ebx, var_1c, var_18_7, arg5);
006806f8      }
006806e0  }

006807de                                                                                            90 90                                ..

006807e0  uint8_t __thiscall PropertyCollection::UpdateCollection(class PropertyCollection* this, class PropertyCollection const* arg2, uint8_t const arg3)

006807e0  {
006807f5      char var_19 = 1;
006807fa      void __return;
006807fa      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currBucket = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&arg2->m_hashProperties.m_intrusiveTable, &__return);
006807ff      class HashTableData<unsigned long,DBOCache *>* i_2 = m_currBucket->m_currElement;
00680804      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = m_currBucket->m_currHashTable;
00680806      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket->m_currBucket;
00680806      
0068080d      if (i_2 != 0)
0068080d      {
00680813          while (true)
00680813          {
00680813              m_currBucket = arg3;
00680813              
0068081c              if (m_currBucket != 0)
0068081c              {
00680860                  arg2 = BaseProperty::GetPropertyName(&i_2->m_data);
00680869                  var_19 &= HashTable<unsigned long,BaseProperty,1>::set(&this->m_hashProperties.vtable, &arg2, &i_2->m_data);
0068081c              }
0068081c              else
0068081c              {
00680820                  uint32_t i = BaseProperty::GetPropertyName(&i_2->m_data);
00680832                  m_currBucket = this->m_hashProperties.m_intrusiveTable.m_buckets[(COMBINE(0, i) % this->m_hashProperties.m_intrusiveTable.m_numBuckets)];
00680832                  
00680836                  if (m_currBucket != 0)
00680836                  {
0068083a                      while (m_currBucket->m_currHashTable != i)
0068083a                      {
0068083c                          m_currBucket = m_currBucket->m_currBucket;
0068083c                          
00680841                          if (m_currBucket == 0)
00680841                              goto label_68086d;
0068083a                      }
0068083a                      
0068084e                      if ((m_currBucket != 0 && m_currBucket != 0xfffffff8))
0068084e                      {
00680860                          arg2 = BaseProperty::GetPropertyName(&i_2->m_data);
00680869                          var_19 &= HashTable<unsigned long,BaseProperty,1>::set(&this->m_hashProperties.vtable, &arg2, &i_2->m_data);
0068084e                      }
00680836                  }
0068081c              }
0068081c              
0068086d          label_68086d:
0068086d              i_2 = i_2->m_hashNext;
0068086d              
00680872              if (i_2 == 0)
00680872              {
0068088d                  class HashTableData<unsigned long,DBOCache *>* i_1;
0068088d                  
0068088d                  do
0068088d                  {
00680881                      m_currBucket_1 = &m_currBucket_1[1];
00680881                      
00680886                      if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00680886                          goto label_680899;
00680886                      
00680888                      i_1 = *(uint32_t*)m_currBucket_1;
0068088d                  } while (i_1 == 0);
0068088d                  
0068088f                  i_2 = i_1;
0068088f                  
00680893                  if (i_2 == 0)
00680893                      break;
00680872              }
00680813          }
0068080d      }
0068080d      
00680899  label_680899:
00680899      m_currBucket = var_19;
006808a4      return m_currBucket;
006807e0  }

006808a7                       90 90 90 90 90 90 90 90 90                                                         .........

006808b0  uint8_t __thiscall PropertyCollection::InqPropertyGroupNames(class PropertyCollection const* this, class SmartArray<unsigned long,1>* arg2, uint8_t const arg3)

006808b0  {
006808bf      void __return;
006808bf      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashProperties.m_intrusiveTable, &__return);
006808c4      class HashTableData<unsigned long,DBOCache *>* i_4 = eax->m_currElement;
006808c9      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
006808cb      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
006808cb      
006808d6      if (i_4 != 0)
006808d6      {
006808e5          while (true)
006808e5          {
006808e5              uint32_t i = BaseProperty::GetGroupName(&i_4->m_data);
006808ed              int32_t ecx_2 = 0;
006808ed              
006808f1              if (arg2->m_num > 0)
006808f1              {
006808f3                  uint32_t* m_data = arg2->m_data;
006808f3                  
006808f7                  while (*(uint32_t*)m_data != i)
006808f7                  {
006808f9                      ecx_2 += 1;
006808fa                      m_data = &m_data[1];
006808fa                      
00680900                      if (ecx_2 >= arg2->m_num)
00680900                          goto label_68090b;
006808f7                  }
006808f1              }
006808f1              
00680907              if ((arg2->m_num <= 0 || ecx_2 == 0xffffffff))
00680907              {
0068090b              label_68090b:
0068090b                  uint32_t eax_1 = BaseProperty::GetGroupName(&i_4->m_data);
00680918                  int32_t eax_3 = (arg2->m_sizeAndDeallocate & 0x7fffffff);
00680918                  
0068091f                  if (arg2->m_num < eax_3)
0068091f                  {
00680939                      arg2->m_data[arg2->m_num] = eax_1;
0068093e                      arg2->m_num += 1;
0068091f                  }
0068091f                  else if (SmartArray<unsigned long,1>::grow(arg2, SmartArray<unsigned long,1>::get_new_size(arg2, (eax_3 + 1))) != 0)
00680934                  {
00680939                      arg2->m_data[arg2->m_num] = eax_1;
0068093e                      arg2->m_num += 1;
00680934                  }
00680907              }
00680907              
00680941              i_4 = i_4->m_hashNext;
00680941              
00680946              if (i_4 == 0)
00680946              {
00680961                  class HashTableData<unsigned long,DBOCache *>* i_1;
00680961                  
00680961                  do
00680961                  {
00680955                      m_currBucket = &m_currBucket[1];
00680955                      
0068095a                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0068095a                          goto label_68096d;
0068095a                      
0068095c                      i_1 = *(uint32_t*)m_currBucket;
00680961                  } while (i_1 == 0);
00680961                  
00680963                  i_4 = i_1;
00680963                  
00680967                  if (i_4 == 0)
00680967                      break;
00680946              }
006808e5          }
006808d6      }
006808d6      
0068096d  label_68096d:
0068096d      eax = arg3;
0068096d      
00680973      if (eax != 0)
00680973      {
00680975          uint32_t* m_data_1 = arg2->m_data;
0068097a          void* ebx_3 = &m_data_1[arg2->m_num];
0068097a          
0068097f          if (m_data_1 != ebx_3)
0068097f          {
00680985              int32_t i_3 = (((char*)ebx_3 - m_data_1) >> 2);
00680988              int32_t i_2 = i_3;
0068098a              int32_t ecx_8 = 0;
0068098a              
0068098f              while (i_2 != 1)
0068098f              {
00680991                  i_2 s>>= 1;
00680993                  ecx_8 += 1;
0068098f              }
0068098f              
006809a5              _STL::__introsort_loop(m_data_1, ebx_3, nullptr, (ecx_8 * 2), arg3);
006809b0              class PropertyGroupNameSort var_2c_4 = arg3;
006809b0              
006809b1              if (i_3 > 0x10)
006809b1              {
006809b8                  _STL::__insertion_sort(m_data_1, &m_data_1[0x10], var_2c_4);
006809c2                  _STL::__unguarded_insertion_sort_aux(&m_data_1[0x10], ebx_3, nullptr, arg3);
006809cd                  int32_t eax_9;
006809cd                  eax_9 = 1;
006809d3                  return 1;
006809b1              }
006809b1              
006809d8              _STL::__insertion_sort(m_data_1, ebx_3, var_2c_4);
0068097f          }
00680973      }
00680973      
006809e3      eax = 1;
006809e9      return 1;
006808b0  }

006809ec                                      90 90 90 90                                                              ....

006809f0  uint8_t __thiscall PropertyCollection::InqPropertiesByGroup(class PropertyCollection const* this, uint32_t const* arg2, class SmartArray<BaseProperty,1>* arg3, uint8_t const arg4)

006809f0  {
006809ff      void __return;
006809ff      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashProperties.m_intrusiveTable, &__return);
00680a04      class HashTableData<unsigned long,DBOCache *>* i_2 = eax->m_currElement;
00680a09      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00680a0b      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00680a0b      
00680a16      if (i_2 != 0)
00680a16      {
00680a25          while (true)
00680a25          {
00680a30              if (BaseProperty::GetGroupName(&i_2->m_data) == *(uint32_t*)arg2)
00680a30              {
00680a38                  int32_t eax_3 = (arg3->m_sizeAndDeallocate & 0x7fffffff);
00680a38                  
00680a3f                  if (arg3->m_num < eax_3)
00680a3f                  {
00680a5f                      BaseProperty::operator=(&arg3->m_data[arg3->m_num], &i_2->m_data);
00680a64                      arg3->m_num += 1;
00680a3f                  }
00680a3f                  else if (SmartArray<BaseProperty,1>::grow(arg3, SmartArray<unsigned long,1>::get_new_size(arg3, (eax_3 + 1))) != 0)
00680a54                  {
00680a5f                      BaseProperty::operator=(&arg3->m_data[arg3->m_num], &i_2->m_data);
00680a64                      arg3->m_num += 1;
00680a54                  }
00680a30              }
00680a30              
00680a67              i_2 = i_2->m_hashNext;
00680a67              
00680a6c              if (i_2 == 0)
00680a6c              {
00680a8b                  class HashTableData<unsigned long,DBOCache *>* i;
00680a8b                  
00680a8b                  do
00680a8b                  {
00680a80                      m_currBucket = &m_currBucket[1];
00680a80                      
00680a85                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00680a85                          goto label_680a93;
00680a85                      
00680a87                      i = *(uint32_t*)m_currBucket;
00680a8b                  } while (i == 0);
00680a8b                  
00680a8d                  i_2 = i;
00680a8d                  
00680a91                  if (i_2 == 0)
00680a91                      break;
00680a6c              }
00680a25          }
00680a16      }
00680a16      
00680a93  label_680a93:
00680a93      eax = arg4;
00680a93      
00680a99      if (eax != 0)
00680a99      {
00680a9b          class BaseProperty* m_data = arg3->m_data;
00680aa0          void* ebx_1 = &m_data[arg3->m_num];
00680aa0          
00680aa5          if (m_data != ebx_1)
00680aa5          {
00680aab              int32_t i_3 = (((char*)ebx_1 - m_data) >> 3);
00680aae              int32_t i_1 = i_3;
00680ab0              int32_t ecx_8 = 0;
00680ab0              
00680ab5              while (i_1 != 1)
00680ab5              {
00680ab7                  i_1 s>>= 1;
00680ab9                  ecx_8 += 1;
00680ab5              }
00680ab5              
00680acc              _STL::__introsort_loop(m_data, ebx_1, nullptr, (ecx_8 * 2), arg4);
00680acc              
00680ad8              if (i_3 > 0x10)
00680ad8              {
00680ae2                  _STL::__insertion_sort(m_data, &m_data[0x10], arg4);
00680aec                  _STL::__unguarded_insertion_sort_aux(&m_data[0x10], ebx_1, nullptr, arg4);
00680af7                  int32_t eax_10;
00680af7                  eax_10 = 1;
00680afd                  return 1;
00680ad8              }
00680ad8              
00680b02              _STL::__insertion_sort(m_data, ebx_1, arg4);
00680aa5          }
00680a99      }
00680a99      
00680b0d      eax = 1;
00680b13      return 1;
006809f0  }

00680a1a                                                                                8d 9b 00 00 00 00                            ......
00680a7d                                                                                         8d 49 00                               .I.
00680b16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00680b20  void __fastcall PropertyCollection::Destroy(class PropertyCollection* this)

00680b20  {
00680b23      /* tailcall */
00680b23      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::delete_contents(&this->m_hashProperties.m_intrusiveTable);
00680b20  }

00680b28                          90 90 90 90 90 90 90 90                                                          ........

00680b30  uint8_t __thiscall PropertyCollection::ToFileNode(class PropertyCollection const* this, class PFileNode* arg2)

00680b30  {
00680b3e      class PropertyCollection* this_1 = this;
00680b41      class PropertyCollection* this_2 = this_1;
00680b41      
00680b45      if (arg2 != 0)
00680b45      {
00680b52          void* var_18 = nullptr;
00680b56          int32_t var_14_1 = 0;
00680b5a          int32_t var_10_1 = 0;
00680b5a          
00680b65          if (PropertyCollection::InqPropertyGroupNames(this, &var_18, 1) != 0)
00680b65          {
00680b6f              int32_t ebx_1 = 0;
00680b6f              
00680b73              if (var_10_1 <= 0)
00680b73              {
00680b7e              label_680b7e:
00680b7e                  
00680b83                  if ((var_14_1 & 0x80000000) == 0x80000000)
00680b8a                      operator delete[](var_18);
00680b8a                  
00680b92                  int32_t eax_3;
00680b92                  eax_3 = 1;
00680b9b                  return 1;
00680b73              }
00680b73              
00680bad              while (true)
00680bad              {
00680bad                  uint32_t* eax_4 = ((char*)var_18 + (ebx_1 << 2));
00680bb3                  class BaseProperty* var_c = nullptr;
00680bb7                  int32_t var_8_1 = 0;
00680bbb                  int32_t var_4_1 = 0;
00680bbb                  
00680bc6                  if (PropertyCollection::InqPropertiesByGroup(this_1, eax_4, &var_c, 1) != 0)
00680bc6                  {
00680bd0                      if (var_4_1 == 0)
00680bd0                      {
00680c81                      label_680c81:
00680c81                          
00680c81                          if ((var_8_1 & 0x80000000) == 0x80000000)
00680c81                          {
00680c83                              class BaseProperty* ecx_7 = var_c;
00680c83                              
00680c89                              if (ecx_7 != 0)
00680c8d                                  BaseProperty::`vector deleting destructor'(ecx_7, 3);
00680c81                          }
00680c81                          
00680c96                          ebx_1 += 1;
00680c96                          
00680c99                          if (ebx_1 >= var_10_1)
00680c99                              goto label_680b7e;
00680c99                          
00680b9e                          this_1 = this_2;
00680b9e                          continue;
00680bd0                      }
00680bd0                      else
00680bd0                      {
00680bd6                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00680be1                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00680be9                          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00680beb                          void* edx_2 = var_18;
00680bef                          uint32_t eax_7 = *(uint32_t*)((char*)edx_2 + (ebx_1 << 2));
00680bf6                          class PSRefBufferCharData<char>** var_34_3 = &PStringBase<char>::s_NullBuffer_2;
00680bf7                          uint32_t var_38_3 = eax_7;
00680bf8                          uint8_t eax_8;
00680bf8                          int32_t ecx_2;
00680bf8                          eax_8 = MasterProperty::InqPropertyGroupNameStringStatic(eax_7, edx_2);
00680c02                          void* __offset(PSRefBufferCharData<char>, -0x10) var_34_8;
00680c02                          void* __offset(PSRefBufferCharData<char>, -0x14) esi_4;
00680c02                          
00680c02                          if (eax_8 == 0)
00680c02                          {
00680cc0                              esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00680cc6                              var_34_8 = ((char*)esi_4 + 4);
00680cc7                          label_680cc7:
00680cc7                              
00680cd3                              if ((InterlockedDecrement(var_34_8) == 0 && esi_4 != 0))
00680cdb                                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
00680c02                          }
00680c02                          else
00680c02                          {
00680c08                              int32_t var_34_4 = ecx_2;
00680c09                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00680c19                              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00680c1f                              class PFileNode* eax_9 = PFileNode::MakeSubNode(arg2, PStringBase<char>::s_NullBuffer_3);
00680c1f                              
00680c28                              if (eax_9 != 0)
00680c28                              {
00680c32                                  int32_t edi_1 = 0;
00680c32                                  
00680c36                                  if (var_4_1 <= 0)
00680c36                                  {
00680c56                                  label_680c56:
00680c56                                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00680c56                                      
00680c69                                      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00680c71                                          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00680c71                                      
00680c69                                      goto label_680c81;
00680c36                                  }
00680c36                                  
00680c40                                  while (true)
00680c40                                  {
00680c47                                      if (BaseProperty::ToFileNode(&var_c[edi_1], eax_9) == 0)
00680c47                                      {
00680ca8                                          esi_4 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00680cae                                          var_34_8 = ((char*)esi_4 + 4);
00680caf                                          break;
00680c47                                      }
00680c47                                      
00680c4d                                      edi_1 += 1;
00680c4d                                      
00680c50                                      if (edi_1 >= var_4_1)
00680c50                                          goto label_680c56;
00680c40                                  }
00680c40                                  
00680c47                                  goto label_680cc7;
00680c28                              }
00680c28                              
00680cb5                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2);
00680c02                          }
00680bd0                      }
00680bc6                  }
00680bc6                  
00680ceb                  if ((var_8_1 & 0x80000000) == 0x80000000)
00680ceb                  {
00680ced                      class BaseProperty* ecx_11 = var_c;
00680ced                      
00680cf3                      if (ecx_11 != 0)
00680cf7                          BaseProperty::`vector deleting destructor'(ecx_11, 3);
00680ceb                  }
00680ceb                  
00680d0c                  if ((var_14_1 & 0x80000000) != 0x80000000)
00680d0c                      break;
00680d0c                  
00680d13                  operator delete[](var_18);
00680d1b                  int32_t eax_21;
00680d1b                  eax_21 = 0;
00680d24                  return 0;
00680bad              }
00680b65          }
00680b65          else if ((var_14_1 & 0x80000000) == 0x80000000)
00680d3e              operator delete[](var_18);
00680b45      }
00680b45      
00680d49      class PFileNode* eax;
00680d49      eax = 0;
00680d4f      return 0;
00680b30  }

00680d52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00680d60  void __fastcall PropertyCollection::PruneForServer(class PropertyCollection* this)

00680d60  {
00680d6e      void __return;
00680d6e      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashProperties.m_intrusiveTable, &__return);
00680d73      class HashTableData<unsigned long,DBOCache *>* esi = eax->m_currElement;
00680d78      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00680d7a      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00680d7d      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
00680d7d      
00680d81      if (esi != 0)
00680d81      {
00680d8b          while (true)
00680d8b          {
00680d92              if (BaseProperty::IsClientOnlyData(&esi->m_data) == 0)
00680d92              {
00680e2b                  esi = esi->m_hashNext;
00680e2b                  
00680e30                  if (esi != 0)
00680e30                      continue;
00680e30                  else
00680e30                  {
00680e4b                      class HashTableData<unsigned long,DBOCache *>* i;
00680e4b                      
00680e4b                      do
00680e4b                      {
00680e40                          m_currBucket = &m_currBucket[1];
00680e40                          
00680e45                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00680e5e                              return;
00680e5e                          
00680e47                          i = *(uint32_t*)m_currBucket;
00680e4b                      } while (i == 0);
00680e4b                      
00680e4d                      esi = i;
00680e30                  }
00680d92              }
00680d92              else
00680d92              {
00680d98                  class HashTableData<unsigned long,DBOCache *>* m_hashNext_1 = esi->m_hashNext;
00680d9d                  class HashTableData<unsigned long,DBOCache *>* ebp_1 = esi;
00680d9f                  class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
00680d9f                  
00680da1                  if (m_hashNext_1 == 0)
00680da1                  {
00680db0                      while (true)
00680db0                      {
00680db0                          m_currBucket_1 = &m_currBucket_1[1];
00680db0                          
00680db5                          if (m_currBucket_1 == &m_currHashTable_1->m_buckets[m_currHashTable_1->m_numBuckets])
00680db5                              break;
00680db5                          
00680db7                          class HashTableData<unsigned long,DBOCache *>* m_hashNext_2 = *(uint32_t*)m_currBucket_1;
00680db7                          
00680dbb                          if (m_hashNext_2 != 0)
00680dbb                          {
00680dbd                              m_hashNext_1 = m_hashNext_2;
00680dbd                              break;
00680dbb                          }
00680db0                      }
00680da1                  }
00680da1                  
00680dbf                  class HashTableData<unsigned long,DBOCache *>* m_hashNext = *(uint32_t*)m_currBucket;
00680dbf                  
00680dc3                  if (m_hashNext == esi)
00680dd5                      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00680dc3                  else
00680dc3                  {
00680dcc                      class HashTableData<unsigned long,DBOCache *>* m_hashNext_3;
00680dcc                      
00680dcc                      do
00680dcc                      {
00680dc5                          m_hashNext_3 = m_hashNext;
00680dc7                          m_hashNext = m_hashNext->m_hashNext;
00680dcc                      } while (m_hashNext != esi);
00680dcc                      
00680dd0                      if (m_hashNext_3 != 0)
00680ddc                          m_hashNext_3->m_hashNext = m_hashNext->m_hashNext;
00680dd0                      else
00680dd5                          *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00680dc3                  }
00680dc3                  
00680de3                  m_currHashTable_1->m_numElements -= 1;
00680de6                  m_currBucket = m_currBucket_1;
00680de8                  class DBOCache* m_data = ebp_1->m_data;
00680ded                  esi = m_hashNext_1;
00680ded                  
00680def                  if (m_data != 0)
00680def                  {
00680df1                      m_data->m_ObjTable.vtable -= 1;
00680df1                      
00680df4                      if (m_data->m_ObjTable.vtable == 1)
00680df6                          m_data->vtable->__vecDelDtor(1);
00680df6                      
00680dfc                      ebp_1->m_data = nullptr;
00680def                  }
00680def                  
00680e03                  int32_t* ecx_2 = *(int32_t*)((char*)ebp_1 + 0xc);
00680e03                  
00680e08                  if (ecx_2 != 0)
00680e08                  {
00680e0a                      int32_t temp1_1 = ecx_2[1];
00680e0a                      ecx_2[1] -= 1;
00680e0a                      
00680e0d                      if (temp1_1 == 1)
00680e13                          **(uint32_t**)ecx_2(1);
00680e13                      
00680e15                      *(int32_t*)((char*)ebp_1 + 0xc) = 0;
00680e08                  }
00680e08                  
00680e1d                  operator delete(ebp_1);
00680e22                  m_currHashTable = m_currHashTable_1;
00680d92              }
00680d92              
00680e51              if (esi == 0)
00680e51                  break;
00680d8b          }
00680d81      }
00680d60  }

00680e5f                                                                                               90                                 .

00680e60  void __fastcall PropertyCollection::PruneForClient(class PropertyCollection* this)

00680e60  {
00680e6e      void __return;
00680e6e      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_hashProperties.m_intrusiveTable, &__return);
00680e73      class HashTableData<unsigned long,DBOCache *>* esi = eax->m_currElement;
00680e78      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00680e7a      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00680e7d      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
00680e7d      
00680e81      if (esi != 0)
00680e81      {
00680e8b          while (true)
00680e8b          {
00680e92              if (BaseProperty::IsServerOnlyData(&esi->m_data) == 0)
00680e92              {
00680f2b                  esi = esi->m_hashNext;
00680f2b                  
00680f30                  if (esi != 0)
00680f30                      continue;
00680f30                  else
00680f30                  {
00680f4b                      class HashTableData<unsigned long,DBOCache *>* i;
00680f4b                      
00680f4b                      do
00680f4b                      {
00680f40                          m_currBucket = &m_currBucket[1];
00680f40                          
00680f45                          if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00680f5e                              return;
00680f5e                          
00680f47                          i = *(uint32_t*)m_currBucket;
00680f4b                      } while (i == 0);
00680f4b                      
00680f4d                      esi = i;
00680f30                  }
00680e92              }
00680e92              else
00680e92              {
00680e98                  class HashTableData<unsigned long,DBOCache *>* m_hashNext_1 = esi->m_hashNext;
00680e9d                  class HashTableData<unsigned long,DBOCache *>* ebp_1 = esi;
00680e9f                  class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
00680e9f                  
00680ea1                  if (m_hashNext_1 == 0)
00680ea1                  {
00680eb0                      while (true)
00680eb0                      {
00680eb0                          m_currBucket_1 = &m_currBucket_1[1];
00680eb0                          
00680eb5                          if (m_currBucket_1 == &m_currHashTable_1->m_buckets[m_currHashTable_1->m_numBuckets])
00680eb5                              break;
00680eb5                          
00680eb7                          class HashTableData<unsigned long,DBOCache *>* m_hashNext_2 = *(uint32_t*)m_currBucket_1;
00680eb7                          
00680ebb                          if (m_hashNext_2 != 0)
00680ebb                          {
00680ebd                              m_hashNext_1 = m_hashNext_2;
00680ebd                              break;
00680ebb                          }
00680eb0                      }
00680ea1                  }
00680ea1                  
00680ebf                  class HashTableData<unsigned long,DBOCache *>* m_hashNext = *(uint32_t*)m_currBucket;
00680ebf                  
00680ec3                  if (m_hashNext == esi)
00680ed5                      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00680ec3                  else
00680ec3                  {
00680ecc                      class HashTableData<unsigned long,DBOCache *>* m_hashNext_3;
00680ecc                      
00680ecc                      do
00680ecc                      {
00680ec5                          m_hashNext_3 = m_hashNext;
00680ec7                          m_hashNext = m_hashNext->m_hashNext;
00680ecc                      } while (m_hashNext != esi);
00680ecc                      
00680ed0                      if (m_hashNext_3 != 0)
00680edc                          m_hashNext_3->m_hashNext = m_hashNext->m_hashNext;
00680ed0                      else
00680ed5                          *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
00680ec3                  }
00680ec3                  
00680ee3                  m_currHashTable_1->m_numElements -= 1;
00680ee6                  m_currBucket = m_currBucket_1;
00680ee8                  class DBOCache* m_data = ebp_1->m_data;
00680eed                  esi = m_hashNext_1;
00680eed                  
00680eef                  if (m_data != 0)
00680eef                  {
00680ef1                      m_data->m_ObjTable.vtable -= 1;
00680ef1                      
00680ef4                      if (m_data->m_ObjTable.vtable == 1)
00680ef6                          m_data->vtable->__vecDelDtor(1);
00680ef6                      
00680efc                      ebp_1->m_data = nullptr;
00680eef                  }
00680eef                  
00680f03                  int32_t* ecx_2 = *(int32_t*)((char*)ebp_1 + 0xc);
00680f03                  
00680f08                  if (ecx_2 != 0)
00680f08                  {
00680f0a                      int32_t temp1_1 = ecx_2[1];
00680f0a                      ecx_2[1] -= 1;
00680f0a                      
00680f0d                      if (temp1_1 == 1)
00680f13                          **(uint32_t**)ecx_2(1);
00680f13                      
00680f15                      *(int32_t*)((char*)ebp_1 + 0xc) = 0;
00680f08                  }
00680f08                  
00680f1d                  operator delete(ebp_1);
00680f22                  m_currHashTable = m_currHashTable_1;
00680e92              }
00680e92              
00680f51              if (esi == 0)
00680f51                  break;
00680e8b          }
00680e81      }
00680e60  }

00680f5f                                                                                               90                                 .

00680f60  void __fastcall PropertyCollection::~PropertyCollection(class PropertyCollection* this)

00680f60  {
00680f61      this->vtable = 0x79c058;
00680f6a      this->m_hashProperties.vtable = 0x797700;
00680f73      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::delete_contents(&this->m_hashProperties.m_intrusiveTable);
00680f78      class HashTableData<unsigned long,BaseProperty>** m_buckets = this->m_hashProperties.m_intrusiveTable.m_buckets;
00680f67      this->m_hashProperties.m_intrusiveTable.vtable = 0x7970cc;
00680f67      
00680f86      if (m_buckets != &this->m_hashProperties.m_intrusiveTable.m_aInplaceBuckets)
00680f89          operator delete[](m_buckets);
00680f89      
00680f67      this->m_hashProperties.m_intrusiveTable.m_buckets = nullptr;
00680f67      this->m_hashProperties.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00680f67      this->m_hashProperties.m_intrusiveTable.m_numBuckets = 0;
00680f67      this->m_hashProperties.m_intrusiveTable.m_numElements = 0;
00680f60  }

00680fa1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00680fb0  uint8_t __thiscall PropertyCollection::FromFileNode(class PropertyCollection* this, class PFileNode const* arg2)

00680fb0  {
00680fbb      class PFileNode* PStringBase<char>::s_NullBuffer_21 = arg2;
00680fbb      
00680fc7      if (PStringBase<char>::s_NullBuffer_21 != 0)
00680fc7      {
00680fcd          enum ProgramType ProgramTypeSystem::s_eProgramType_1 = ProgramTypeSystem::s_eProgramType;
00680fd7          uint8_t var_31_1;
00680fd7          
00680fd7          if (ProgramTypeSystem::s_eProgramType_1 != 0x80000002)
00680fde              var_31_1 = 0;
00680fde          
00680fe3          if ((ProgramTypeSystem::s_eProgramType_1 == 0x80000002 || ProgramTypeSystem::s_eProgramType_1 == 0x80000001))
00680fe5              var_31_1 = 1;
00680fe5          
00680fec          uint8_t result = 1;
00680ff1          uint32_t eax_1 = PFileNode::GetNumSubNodes(PStringBase<char>::s_NullBuffer_21);
00680ff6          class BaseProperty* PStringBase<char>::s_NullBuffer_9 = nullptr;
00680ffe          class BaseProperty* PStringBase<char>::s_NullBuffer_7 = nullptr;
00680ffe          
00681002          if (eax_1 <= 0)
00681002          {
006812c3          label_6812c3:
006812c3              
006812ca              if (DBCache::IsRunTime() == 0)
006812ca              {
006812d3                  if (DBCache::IsClient() != 0)
006812d7                      PropertyCollection::PruneForClient(this);
006812d7                  
006812e3                  if (DBCache::IsServer() != 0)
006812e7                      PropertyCollection::PruneForServer(this);
006812ca              }
006812ca              
006812f6              return result;
00681002          }
00681002          
00681008          while (true)
00681008          {
00681008              struct PFileNode::VTable* vtable = PStringBase<char>::s_NullBuffer_21->vtable;
0068100a              class BaseProperty* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_9;
0068100d              class PStringBase<char> PStringBase<char>::s_NullBuffer_26;
0068100d              class BaseProperty* PStringBase<char>::s_NullBuffer_16;
0068100d              PStringBase<char>::s_NullBuffer_26 = vtable->GetSubNode(PStringBase<char>::s_NullBuffer_8);
00681010              class PStringBase<char> PStringBase<char>::s_NullBuffer_24 = PStringBase<char>::s_NullBuffer_26;
00681014              class PStringBase<char> PStringBase<char>::s_NullBuffer_25 = PStringBase<char>::s_NullBuffer_24;
00681018              uint32_t* PStringBase<char>::s_NullBuffer_14;
00681018              
00681018              if (PStringBase<char>::s_NullBuffer_24 != 0)
00681018              {
0068103a                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00681045                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_1;
0068104c                  PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_1[-1];
0068104d                  InterlockedIncrement(PStringBase<char>::s_NullBuffer_8);
00681053                  PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_5;
00681056                  uint32_t* PStringBase<char>::s_NullBuffer_18 = PFileNode::GetNameAsPString(PStringBase<char>::s_NullBuffer_24, PStringBase<char>::s_NullBuffer_8);
0068105b                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_5;
00681063                  void var_14;
00681063                  PStringBase<char>::s_NullBuffer_8 = &var_14;
00681064                  PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_18;
00681067                  PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_10;
0068106c                  class PStringBase<char> PStringBase<char>::s_NullBuffer_17 = &PStringBase<char>::s_NullBuffer_10[-1];
0068106d                  InterlockedIncrement(PStringBase<char>::s_NullBuffer_17);
0068106f                  PStringBase<char>::s_NullBuffer_17 = 0xa;
00681071                  uint8_t eax_4;
00681071                  uint32_t* PStringBase<char>::s_NullBuffer_19;
00681071                  eax_4 = EnumMapper::GetEnum(PStringBase<char>::s_NullBuffer_17, PStringBase<char>::s_NullBuffer_14, PStringBase<char>::s_NullBuffer_8);
0068107b                  void* __offset(PSRefBufferCharData<char>, -0x14) ebx_1;
0068107b                  
0068107b                  if (eax_4 != 0)
0068107b                  {
006810a7                      uint32_t eax_5 = PFileNode::GetNumSubNodes(PStringBase<char>::s_NullBuffer_24);
006810b2                      PStringBase<char>::s_NullBuffer_5 = nullptr;
006810b2                      
006810ba                      if (eax_5 > 0)
006810ba                      {
006810c4                          while (true)
006810c4                          {
006810c4                              int32_t eax_6 = *(uint32_t*)PStringBase<char>::s_NullBuffer_24;
006810c6                              PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_5;
006810c9                              class PFileNode* PStringBase<char>::s_NullBuffer_15;
006810c9                              class PFileNode* edx_1;
006810c9                              PStringBase<char>::s_NullBuffer_15 = *(uint32_t*)(eax_6 + 0xc)(PStringBase<char>::s_NullBuffer_8);
006810c9                              
006810d2                              if (PStringBase<char>::s_NullBuffer_15 != 0)
006810d2                              {
006810d8                                  PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_15;
006810dd                                  int32_t* var_10 = nullptr;
006810e1                                  int32_t* var_c_1 = nullptr;
006810ec                                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6;
006810ec                                  
006810ec                                  if (BaseProperty::FromFileNode(&var_10, edx_1) == 0)
006810ec                                  {
006810f2                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
006810f7                                      PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_2;
006810fe                                      PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_2[-1];
006810ff                                      InterlockedIncrement(PStringBase<char>::s_NullBuffer_8);
00681109                                      PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_6;
0068110c                                      class PStringBase<char> PStringBase<char>::s_NullBuffer_22 = PFileNode::GetNameAsPString(PStringBase<char>::s_NullBuffer_15, PStringBase<char>::s_NullBuffer_8);
00681111                                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_6;
00681115                                      PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_10;
00681116                                      PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_11;
00681117                                      PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_22;
0068111f                                      PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_17, "could not parse property [%s] fr…");
00681125                                      PFileNode::ReportError(PStringBase<char>::s_NullBuffer_15, PStringBase<char>::s_NullBuffer_17);
00681133                                      PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_11[-1];
00681134                                      result = 0;
00681134                                      
00681145                                      if ((InterlockedDecrement(PStringBase<char>::s_NullBuffer_8) == 0 && PStringBase<char>::s_NullBuffer_11 != 0x14))
00681145                                      {
00681147                                          int32_t edx_2 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_11 + -0x14);
00681149                                          PStringBase<char>::s_NullBuffer_8 = 1;
0068114d                                          *(uint32_t*)edx_2(PStringBase<char>::s_NullBuffer_8);
00681145                                      }
00681145                                      
0068114f                                      int32_t* eax_11 = var_10;
0068114f                                      
00681155                                      if (eax_11 != 0)
00681155                                      {
0068115f                                          int32_t esi_3 = (eax_11[1] - 1);
0068115c                                          eax_11[1] = esi_3;
0068115c                                          
00681166                                          if (esi_3 == 0)
00681166                                          {
00681168                                              int32_t eax_13 = *(uint32_t*)eax_11;
0068116a                                              PStringBase<char>::s_NullBuffer_8 = 1;
0068116c                                              *(uint32_t*)eax_13(PStringBase<char>::s_NullBuffer_8);
00681166                                          }
00681166                                          
0068116e                                          var_10 = nullptr;
00681155                                      }
00681155                                      
0068117c                                      if (var_c_1 != 0)
0068117c                                      {
0068118a                                          int32_t esi_5 = (var_c_1[1] - 1);
00681187                                          var_c_1[1] = esi_5;
00681187                                          
00681191                                          if (esi_5 == 0)
00681191                                          {
00681193                                              int32_t edx_5 = *(uint32_t*)var_c_1;
00681195                                              PStringBase<char>::s_NullBuffer_8 = 1;
00681197                                              *(uint32_t*)edx_5(PStringBase<char>::s_NullBuffer_8);
00681191                                          }
00681191                                          
00681199                                          int32_t var_c_2 = 0;
0068117c                                      }
0068117c                                      
00681271                                      PStringBase<char>::s_NullBuffer_24 = PStringBase<char>::s_NullBuffer_25;
006810ec                                  }
006810ec                                  else if (var_31_1 == 0)
006811ac                                  {
006811d6                                  label_6811d6:
006811d6                                      PStringBase<char>::s_NullBuffer_8 = BaseProperty::GetPropertyName(&var_10);
006811d6                                      
006811de                                      if (PropertyCollection::ContainsProperty(this, PStringBase<char>::s_NullBuffer_8) != 0)
006811de                                      {
006812f9                                          class BaseProperty* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
006812fe                                          PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_4;
00681305                                          PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_4[-2];
00681306                                          InterlockedIncrement(PStringBase<char>::s_NullBuffer_8);
00681310                                          PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_7;
00681313                                          uint32_t* PStringBase<char>::s_NullBuffer_20 = PFileNode::GetNameAsPString(PStringBase<char>::s_NullBuffer_15, PStringBase<char>::s_NullBuffer_8);
00681318                                          class BaseProperty* PStringBase<char>::s_NullBuffer_13 = PStringBase<char>::s_NullBuffer_7;
0068131c                                          PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_13;
0068131d                                          PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_20;
00681320                                          PStringBase<char>::s_NullBuffer_17 = "Error: Property [%s] occurs twic…";
00681325                                          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_14, PStringBase<char>::s_NullBuffer_17);
0068132a                                          PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_15;
0068132b                                          PFileNode::ReportError(PStringBase<char>::s_NullBuffer_17, PStringBase<char>::s_NullBuffer_14);
0068133f                                          PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_13[-2];
0068133f                                          
00681348                                          if ((InterlockedDecrement(PStringBase<char>::s_NullBuffer_8) == 0 && PStringBase<char>::s_NullBuffer_13 != 0x14))
00681348                                          {
0068134a                                              int32_t edx_8 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_13 + -0x14);
0068134c                                              PStringBase<char>::s_NullBuffer_8 = 1;
00681350                                              *(uint32_t*)edx_8(PStringBase<char>::s_NullBuffer_8);
00681348                                          }
00681348                                          
00681352                                          int32_t* eax_33 = var_10;
00681352                                          
00681358                                          if (eax_33 != 0)
00681358                                          {
00681362                                              int32_t esi_9 = (eax_33[1] - 1);
0068135f                                              eax_33[1] = esi_9;
0068135f                                              
00681369                                              if (esi_9 == 0)
00681369                                              {
0068136b                                                  int32_t eax_35 = *(uint32_t*)eax_33;
0068136d                                                  PStringBase<char>::s_NullBuffer_8 = 1;
0068136f                                                  *(uint32_t*)eax_35(PStringBase<char>::s_NullBuffer_8);
00681369                                              }
00681369                                              
00681371                                              var_10 = nullptr;
00681358                                          }
00681358                                          
0068137f                                          if (var_c_1 != 0)
0068137f                                          {
00681389                                              int32_t esi_11 = (var_c_1[1] - 1);
00681386                                              var_c_1[1] = esi_11;
00681386                                              
00681390                                              if (esi_11 == 0)
00681390                                              {
00681392                                                  int32_t edx_11 = *(uint32_t*)var_c_1;
00681394                                                  PStringBase<char>::s_NullBuffer_8 = 1;
00681396                                                  *(uint32_t*)edx_11(PStringBase<char>::s_NullBuffer_8);
00681390                                              }
00681390                                              
00681398                                              int32_t var_c_3 = 0;
0068137f                                          }
0068137f                                          
006813a6                                          PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_10[-1];
006813a6                                          
006813af                                          if ((InterlockedDecrement(PStringBase<char>::s_NullBuffer_8) == 0 && PStringBase<char>::s_NullBuffer_10 != 0x14))
006813af                                          {
006813b1                                              int32_t edx_12 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_10 + -0x14);
006813b3                                              PStringBase<char>::s_NullBuffer_8 = 1;
006813b7                                              *(uint32_t*)edx_12(PStringBase<char>::s_NullBuffer_8);
006813af                                          }
006813af                                          
00681358                                          break;
006811de                                      }
006811de                                      
006811ed                                      PStringBase<char>::s_NullBuffer_6 = BaseProperty::GetPropertyName(&var_10);
006811f5                                      PStringBase<char>::s_NullBuffer_8 = &var_10;
006811fa                                      PStringBase<char>::s_NullBuffer_14 = &PStringBase<char>::s_NullBuffer_6;
006811fa                                      
00681209                                      if (HashTable<unsigned long,BaseProperty,1>::add(&this->m_hashProperties, PStringBase<char>::s_NullBuffer_14, PStringBase<char>::s_NullBuffer_8) != 0)
006811bf                                          BaseProperty::~BaseProperty(&var_10);
00681209                                      else
00681209                                      {
0068120b                                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
00681210                                          PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_3;
00681217                                          PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_3[-1];
00681218                                          InterlockedIncrement(PStringBase<char>::s_NullBuffer_8);
00681222                                          PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_6;
00681225                                          class PStringBase<char> PStringBase<char>::s_NullBuffer_23 = PFileNode::GetNameAsPString(PStringBase<char>::s_NullBuffer_15, PStringBase<char>::s_NullBuffer_8);
0068122a                                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_6;
0068122e                                          PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_10;
0068122f                                          PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_12;
00681230                                          PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_23;
00681238                                          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_17, "failed adding property [%s] for …");
0068123e                                          PFileNode::ReportError(PStringBase<char>::s_NullBuffer_15, PStringBase<char>::s_NullBuffer_17);
0068124c                                          PStringBase<char>::s_NullBuffer_8 = &PStringBase<char>::s_NullBuffer_12[-1];
0068124d                                          result = 0;
0068124d                                          
0068125e                                          if ((InterlockedDecrement(PStringBase<char>::s_NullBuffer_8) == 0 && PStringBase<char>::s_NullBuffer_12 != 0x14))
0068125e                                          {
00681260                                              int32_t edx_6 = *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_12 + -0x14);
00681262                                              PStringBase<char>::s_NullBuffer_8 = 1;
00681266                                              *(uint32_t*)edx_6(PStringBase<char>::s_NullBuffer_8);
0068125e                                          }
0068125e                                          
0068126c                                          BaseProperty::~BaseProperty(&var_10);
00681271                                          PStringBase<char>::s_NullBuffer_24 = PStringBase<char>::s_NullBuffer_25;
00681209                                      }
006811ac                                  }
006811ac                                  else
006811ac                                  {
006811b9                                      if (BaseProperty::IsToolOnly(&var_10) == 0)
006811b9                                          goto label_6811d6;
006811b9                                      
006811bf                                      BaseProperty::~BaseProperty(&var_10);
006811ac                                  }
006810d2                              }
006810d2                              
00681280                              PStringBase<char>::s_NullBuffer_5 = &PStringBase<char>::s_NullBuffer_5->m_data[1];
00681280                              
00681284                              if (&PStringBase<char>::s_NullBuffer_5->m_data[1] >= eax_5)
00681284                                  goto label_68128a;
006810c4                          }
006810c4                          
00681284                          break;
006810ba                      }
006810ba                      
0068128a                  label_68128a:
0068128a                      ebx_1 = &PStringBase<char>::s_NullBuffer_10->m_data[0xffffffec];
00681290                      PStringBase<char>::s_NullBuffer_8 = ((char*)ebx_1 + 4);
0068107b                  }
0068107b                  else
0068107b                  {
0068107d                      PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_10;
0068107e                      PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_19;
00681081                      PStringBase<char>::s_NullBuffer_17 = "invalid property group '%s'";
00681086                      PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_14, PStringBase<char>::s_NullBuffer_17);
0068108b                      PStringBase<char>::s_NullBuffer_17 = PStringBase<char>::s_NullBuffer_24;
0068108c                      PFileNode::ReportError(PStringBase<char>::s_NullBuffer_17, PStringBase<char>::s_NullBuffer_14);
00681094                      ebx_1 = &PStringBase<char>::s_NullBuffer_10->m_data[0xffffffec];
0068109a                      result = 0;
0068109f                      PStringBase<char>::s_NullBuffer_8 = ((char*)ebx_1 + 4);
0068107b                  }
0068107b                  
0068129d                  if ((InterlockedDecrement() == 0 && ebx_1 != 0))
0068129d                  {
0068129f                      int32_t edx_7 = *(int32_t*)((char*)ADJ(ebx_1) + -0x14);
006812a3                      PStringBase<char>::s_NullBuffer_8 = 1;
006812a5                      *(uint32_t*)edx_7(PStringBase<char>::s_NullBuffer_8);
0068129d                  }
0068129d                  
006812a7                  PStringBase<char>::s_NullBuffer_21 = arg2;
00681018              }
00681018              else
00681018              {
0068101a                  PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_16;
0068101d                  PStringBase<char>::s_NullBuffer_14 = "unexpected end of filenode struc…";
00681022                  PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_8, PStringBase<char>::s_NullBuffer_14);
00681027                  PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_21;
00681028                  PFileNode::ReportError(PStringBase<char>::s_NullBuffer_14, PStringBase<char>::s_NullBuffer_8);
00681030                  result = 0;
00681018              }
006812b2              PStringBase<char>::s_NullBuffer_9 = (&PStringBase<char>::s_NullBuffer_7->m_pcPropertyDesc + 1);
006812b5              PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_9;
006812b5              
006812b9              if (PStringBase<char>::s_NullBuffer_9 >= eax_1)
006812b9                  goto label_6812c3;
00681008          }
00680fc7      }
00680fc7      
006813bb      int32_t eax;
006813bb      eax = 0;
006813c1      return 0;
00680fb0  }

006813c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006813d0  void __fastcall PropertyCollection::PropertyCollection(class PropertyCollection* this)

006813d0  {
006813d3      this->vtable = 0x79c058;
006813de      this->m_hashProperties.vtable = 0x797700;
006813e5      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>(&this->m_hashProperties.m_intrusiveTable, 0);
006813ea      this->m_hashProperties.vtable = 0x797700;
006813d0  }

006813f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00681400  class PropertyCollection& __thiscall PropertyCollection::operator=(class PropertyCollection* this, class PropertyCollection const& arg2)

00681400  {
00681409      if (this != arg2)
00681412          HashTable<unsigned long,BaseProperty,1>::operator=(&this->m_hashProperties, &arg2->m_hashProperties);
00681412      
0068141a      return this;
00681400  }

0068141d                                                                                         90 90 90                               ...

00681420  void __thiscall PropertyCollection::Serialize(class PropertyCollection* this, class Archive* arg2)

00681420  {
00681422      class Archive* edi = arg2;
00681422      
0068142f      if ((!(edi->m_flags) & 1) != 0)
00681434          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>::delete_contents(&this->m_hashProperties.m_intrusiveTable);
00681434      
00681443      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,BaseProperty> *,1>,HashTableData<unsigned long,BaseProperty> *,SB_Default>(&arg2, &this->m_hashProperties.m_intrusiveTable, edi);
00681420  }


00681450  void __fastcall DBPropertyCollection::DBPropertyCollection(class DBPropertyCollection* this)

00681450  {
00681454      PropertyCollection::PropertyCollection(this);
00681464      DBObj::DBObj(&this->vtable, INVALID_DID.id);
0068145e      this->vtable = &DBPropertyCollection::`vftable'.IUnknown_Release;
00681470      this->vtable = 0x7fe7e0;
00681450  }

0068147a                                                                                90 90 90 90 90 90                            ......

00681480  uint32_t DBPropertyCollection::GetDBOType(class DBPropertyCollection const* this @ ecx) __pure

00681480  {
00681485      return 0x31;
00681480  }

00681486                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00681490  void __thiscall DBPropertyCollection::Serialize(class DBPropertyCollection* this, class Archive* arg2)

00681490  {
00681499      DBObj::Serialize(this, arg2);
006814a2      PropertyCollection::Serialize(((char*)this - 0x78), arg2);
00681490  }

006814ac                                      90 90 90 90                                                              ....

006814b0  void __thiscall DBPropertyCollection::GetSubDataIDs(class DBPropertyCollection const* this, class QualifiedDataIDArray* arg2)

006814b0  {
006814b3      /* tailcall */
006814b3      return PropertyCollection::GetSubDataIDs(((char*)this - 0x78), arg2);
006814b0  }

006814b8                                                                          90 90 90 90 90 90 90 90                          ........

006814c0  void __fastcall DBPropertyCollection::Destroy(class DBPropertyCollection* this)

006814c0  {
006814c0      /* tailcall */
006814c0      return PropertyCollection::Destroy(this);
006814c0  }

006814c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

006814d0  void* __thiscall DBPropertyCollection::`vector deleting destructor'(class DBPropertyCollection* this, uint32_t arg2)

006814d0  {
006814d3      /* tailcall */
006814d3      return DBPropertyCollection::`scalar deleting destructor'(((char*)this - 0x78), arg2);
006814d0  }

006814d8                                                                          cc cc cc cc cc cc cc cc                          ........

006814e0  void __fastcall DBPropertyCollection::Destroy(class DBPropertyCollection* this)

006814e0  {
006814e3      /* tailcall */
006814e3      return DBPropertyCollection::Destroy(((char*)this - 0x78));
006814e0  }

006814e8                          cc cc cc cc cc cc cc cc                                                          ........

006814f0  class DBObj* DBPropertyCollection::Allocate(class DBPropertyCollection const* this @ ecx)

006814f0  {
006814f0      /* tailcall */
006814f0      return DBPropertyCollection::Allocator();
006814f0  }

006814f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00681500  void* __thiscall DBPropertyCollection::`scalar deleting destructor'(class DBPropertyCollection* this, uint32_t arg2)

00681500  {
00681506      this->vtable = 0x7fe7e0;
00681503      this->vtable = &DBPropertyCollection::`vftable'.IUnknown_Release;
00681512      DBObj::~DBObj(&this->vtable);
00681519      PropertyCollection::~PropertyCollection(this);
00681519      
00681523      if ((arg2 & 1) != 0)
00681526          operator delete(this);
00681526      
00681531      return this;
00681500  }

00681534                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00681540  uint8_t __thiscall DBPropertyCollection::CopyInto(class DBPropertyCollection const* this, class DBObj* arg2)

00681540  {
00681546      if (arg2 != 0)
00681546      {
00681552          HashTable<unsigned long,BaseProperty,1>::operator=(((char*)arg2 - 0x74), ((char*)this - 0x74));
00681557          void* eax_1;
00681557          eax_1 = 1;
00681559          return 1;
00681546      }
00681546      
00681565      HashTable<unsigned long,BaseProperty,1>::operator=(4, ((char*)this - 0x74));
0068156a      void* eax_2;
0068156a      eax_2 = 1;
0068156c      return 1;
00681540  }

0068156f                                               90                                                                 .

00681570  uint8_t __stdcall TabooTable::CreateCheckString(class TabooTable const* this @ ecx, uint32_t arg2, char const* arg3, uint32_t arg4, char* arg5)

00681570  {
0068157f      char* eax;
0068157f      
0068157f      if ((arg5 != 0 && arg3 != 0))
0068157f      {
00681581          eax = arg4;
00681581          
00681587          if (eax > 0)
00681587          {
0068158c              void* ebp = &eax[0xffffffff];
0068158f              char* ebx = nullptr;
00681591              char* esi = nullptr;
00681591              
00681595              if (ebp > 0)
00681595              {
006815e2                  do
006815e2                  {
0068159e                      if (arg2 != 2)
0068159e                      {
006815b9                          if (arg2 == 3)
006815b9                          {
006815bb                              this = ((int16_t)*(uint8_t*)(esi + arg3));
006815c1                              int32_t eax_2;
006815c1                              eax_2 = iswspace(this);
006815ca                              eax = -(eax_2);
006815cc                              eax = (eax - eax);
006815ce                              eax += 1;
006815ce                              goto label_6815d0;
006815b9                          }
006815b9                          
006815db                          *(uint8_t*)(ebx + arg5) = *(uint8_t*)(esi + arg3);
006815de                          ebx = &ebx[1];
0068159e                      }
0068159e                      else
0068159e                      {
006815a0                          uint32_t eax_1;
006815a0                          eax_1 = ((int16_t)*(uint8_t*)(esi + arg3));
006815a6                          eax = iswalpha(eax_1);
006815b1                          eax = eax != 0;
006815d0                      label_6815d0:
006815d0                          
006815d2                          if (eax != 0)
006815d2                          {
006815db                              *(uint8_t*)(ebx + arg5) = *(uint8_t*)(esi + arg3);
006815de                              ebx = &ebx[1];
006815d2                          }
0068159e                      }
0068159e                      
006815df                      esi = &esi[1];
006815e2                  } while (esi < ebp);
00681595              }
00681595              
006815ea              *(uint8_t*)(ebx + arg5) = 0;
006815ef              eax = 1;
006815f2              return 1;
00681587          }
0068157f      }
0068157f      
006815f5      eax = 0;
006815f8      return 0;
00681570  }

006815fb                                                                                   90 90 90 90 90                             .....

00681600  uint8_t __stdcall TabooTable::StringMatchesFilter(class TabooTable const* this @ ecx, char const* arg2, char const* arg3)

00681600  {
00681612      if ((arg2 != 0 && arg3 != 0))
00681612      {
00681614          char const i = *(uint8_t*)arg3;
00681616          this = *(uint8_t*)arg2;
00681618          int32_t esi_1 = 0;
0068161a          int32_t edx_1 = 0;
0068161c          int32_t ebp_1 = 0xffffffff;
0068161c          
00681622          while (true)
00681622          {
00681622              if (i != 0x2a)
00681622              {
00681641                  while (i == this)
00681641                  {
00681645                      if (this == 0)
00681677                          return 1;
00681677                      
00681647                      i = arg3[(edx_1 + 1)];
0068164b                      this = arg2[(esi_1 + 1)];
0068164f                      edx_1 += 1;
00681650                      esi_1 += 1;
00681650                      
00681653                      if (i == 0x2a)
00681653                          goto label_681624;
00681641                  }
00681641                  
0068165c                  if (ebp_1 == 0xffffffff)
0068165c                      break;
0068165c                  
0068165e                  i = arg3[ebp_1];
00681661                  edx_1 = ebp_1;
00681622              }
00681622              else
00681622              {
00681624              label_681624:
00681624                  i = arg3[(edx_1 + 1)];
00681628                  ebp_1 = edx_1;
0068162a                  edx_1 += 1;
0068162a                  
00681632                  while (true)
00681632                  {
00681632                      if (this == 0)
0068166e                          return i == 0;
0068166e                      
00681636                      if (this == i)
00681636                          break;
00681636                      
00681638                      this = arg2[(esi_1 + 1)];
0068163c                      esi_1 += 1;
00681632                  }
00681622              }
00681622          }
00681612      }
00681612      
00681680      return 0;
00681600  }

0068162d                                         8d 49 00                                                               .I.
00681683           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00681690  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>* this, uint32_t arg2)

00681690  {
00681693      class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >** m_buckets = this->m_buckets;
0068169b      this->vtable = 0x7fe84c;
0068169b      
006816a1      if (m_buckets != &this->m_aInplaceBuckets)
006816a4          operator delete[](m_buckets);
006816a4      
006816ae      this->m_buckets = nullptr;
006816b1      this->m_firstInterestingBucket = nullptr;
006816b4      this->m_numBuckets = 0;
006816b7      this->m_numElements = 0;
006816b7      
006816bf      if ((arg2 & 1) != 0)
006816c2          operator delete(this);
006816c2      
006816cd      return this;
00681690  }


006816d0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>* this, uint32_t arg2)

006816d0  {
006816d3      class HashTableData<unsigned long,List<PStringBase<char> > >** m_buckets = this->m_buckets;
006816db      this->vtable = 0x7fe850;
006816db      
006816e1      if (m_buckets != &this->m_aInplaceBuckets)
006816e4          operator delete[](m_buckets);
006816e4      
006816ee      this->m_buckets = nullptr;
006816f1      this->m_firstInterestingBucket = nullptr;
006816f4      this->m_numBuckets = 0;
006816f7      this->m_numElements = 0;
006816f7      
006816ff      if ((arg2 & 1) != 0)
00681702          operator delete(this);
00681702      
0068170d      return this;
006816d0  }


00681710  class AC1Legacy::PStringBase<char>* GetRandomOlthoiText(class AC1Legacy::PStringBase<char>* __return)

00681710  {
00681713      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00681721      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0068172a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00681738      int32_t eax_2 = (Random::RollDice(1, 0xa) - 1);
00681738      
0068173c      if (eax_2 <= 9)
0068173c      {
00681742          class AC1Legacy::PStringBase<char>* var_1c_2;
00681742          void var_4;
00681742          
00681742          switch (eax_2)
00681742          {
00681749              case 0:
00681749              {
006817eb                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "glares menacingly.");
006817f4                  var_1c_2 = &var_4;
00681749                  break;
00681749              }
0068175c              case 1:
0068175c              {
0068175c                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "clicks its pincers together in a…");
00681765                  var_1c_2 = &var_4;
0068175c                  break;
0068175c              }
00681774              case 2:
00681774              {
00681774                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "screeches in a horrible fashion.");
0068177d                  var_1c_2 = &var_4;
00681774                  break;
00681774              }
00681780              case 3:
00681780              {
006817eb                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "lets out a maddening series of c…");
006817f4                  var_1c_2 = &var_4;
00681780                  break;
00681780              }
00681790              case 4:
00681790              {
00681790                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "surveys the area as acid drips f…");
00681799                  var_1c_2 = &var_4;
00681790                  break;
00681790              }
006817a5              case 5:
006817a5              {
006817a5                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "hisses some kind of threat.");
006817ae                  var_1c_2 = &var_4;
006817a5                  break;
006817a5              }
006817b1              case 6:
006817b1              {
006817eb                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "calls out searching for other Ol…");
006817f4                  var_1c_2 = &var_4;
006817b1                  break;
006817b1              }
006817c1              case 7:
006817c1              {
006817c1                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "cries out to indicate to its kin…");
006817ca                  var_1c_2 = &var_4;
006817c1                  break;
006817c1              }
006817d6              case 8:
006817d6              {
006817d6                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "casts about looking for victims.");
006817df                  var_1c_2 = &var_4;
006817d6                  break;
006817d6              }
006817e2              case 9:
006817e2              {
006817eb                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "prepares to hunt enemies of the …");
006817f4                  var_1c_2 = &var_4;
006817e2                  break;
006817e2              }
00681742          }
00681742          
006817f9          AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, var_1c_2);
00681802          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
0068173c      }
0068173c      
00681807      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00681813      __return->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00681815      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
00681815      
00681824      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
00681826          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
00681826      
00681838      return __return;
00681710  }

00681839                                                                             8d 49 00                                       .I.
0068183c  uint32_t jump_table_68183c[0xa] = 
0068183c  {
0068183c      [0x0] =  0x00681749
00681840      [0x1] =  0x00681753
00681844      [0x2] =  0x0068176b
00681848      [0x3] =  0x00681780
0068184c      [0x4] =  0x00681787
00681850      [0x5] =  0x0068179c
00681854      [0x6] =  0x006817b1
00681858      [0x7] =  0x006817b8
0068185c      [0x8] =  0x006817cd
00681860      [0x9] =  0x006817e2
00681864  }

00681864              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00681870  class AC1Legacy::PStringBase<char>* GetRandomHumanText(class AC1Legacy::PStringBase<char>* __return)

00681870  {
00681873      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00681881      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0068188a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
00681898      int32_t eax_2 = (Random::RollDice(1, 0xa) - 1);
00681898      
0068189c      if (eax_2 <= 9)
0068189c      {
006818a2          class AC1Legacy::PStringBase<char>* var_1c_2;
006818a2          void var_4;
006818a2          
006818a2          switch (eax_2)
006818a2          {
006818a9              case 0:
006818a9              {
0068194b                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "cowers in fear.");
00681954                  var_1c_2 = &var_4;
006818a9                  break;
006818a9              }
006818bc              case 1:
006818bc              {
006818bc                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "calls out for help and prepares …");
006818c5                  var_1c_2 = &var_4;
006818bc                  break;
006818bc              }
006818d4              case 2:
006818d4              {
006818d4                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "seems startled to see Olthoi.");
006818dd                  var_1c_2 = &var_4;
006818d4                  break;
006818d4              }
006818e0              case 3:
006818e0              {
0068194b                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "cries out to warn others that Ol…");
00681954                  var_1c_2 = &var_4;
006818e0                  break;
006818e0              }
006818f0              case 4:
006818f0              {
006818f0                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "surveys the area with weapons at…");
006818f9                  var_1c_2 = &var_4;
006818f0                  break;
006818f0              }
00681905              case 5:
00681905              {
00681905                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "regards you warily.");
0068190e                  var_1c_2 = &var_4;
00681905                  break;
00681905              }
00681911              case 6:
00681911              {
0068194b                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "lets out a battle cry as a chall…");
00681954                  var_1c_2 = &var_4;
00681911                  break;
00681911              }
00681921              case 7:
00681921              {
00681921                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "goes into a defensive posture at…");
0068192a                  var_1c_2 = &var_4;
00681921                  break;
00681921              }
00681936              case 8:
00681936              {
00681936                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "seems to be looking for an escap…");
0068193f                  var_1c_2 = &var_4;
00681936                  break;
00681936              }
00681942              case 9:
00681942              {
0068194b                  AC1Legacy::PStringBase<char>::PStringBase<char>(&var_4, "gestures a challenge to you.");
00681954                  var_1c_2 = &var_4;
00681942                  break;
00681942              }
006818a2          }
006818a2          
00681959          AC1Legacy::PStringBase<char>::operator+=(&AC1Legacy::PStringBase<char>::s_NullBuffer_2, var_1c_2);
00681962          AC1Legacy::PStringBase<char>::~PStringBase<char>(&var_4);
0068189c      }
0068189c      
00681967      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00681973      __return->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00681975      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
00681975      
00681984      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_3 != 0))
00681986          AC1Legacy::PStringBase<char>::s_NullBuffer_3->vtable->__vecDelDtor(1);
00681986      
00681998      return __return;
00681870  }

00681999                                                                             8d 49 00                                       .I.
0068199c  uint32_t jump_table_68199c[0xa] = 
0068199c  {
0068199c      [0x0] =  0x006818a9
006819a0      [0x1] =  0x006818b3
006819a4      [0x2] =  0x006818cb
006819a8      [0x3] =  0x006818e0
006819ac      [0x4] =  0x006818e7
006819b0      [0x5] =  0x006818fc
006819b4      [0x6] =  0x00681911
006819b8      [0x7] =  0x00681918
006819bc      [0x8] =  0x0068192d
006819c0      [0x9] =  0x00681942
006819c4  }

006819c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006819d0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>* this, uint32_t arg2)

006819d0  {
006819db      arg2 = arg2;
006819df      uint8_t edx = ((int8_t)arg2);
006819e3      this->m_buckets = nullptr;
006819e6      this->m_firstInterestingBucket = nullptr;
006819e9      this->m_numBuckets = 0;
006819ec      this->m_numElements = 0;
006819f0      this->vtable = 0x7fe84c;
006819f6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00681a09      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00681a09      
00681a13      if (eax == bucketSizesEnd_1)
00681a15          eax -= 4;
00681a15      
00681a18      uint32_t eax_1 = *(uint32_t*)eax;
00681a1d      this->m_numBuckets = eax_1;
00681a1d      
00681a20      if (eax_1 > 0x17)
00681a36          this->m_buckets = operator new[]((eax_1 << 2));
00681a20      else
00681a25          this->m_buckets = &this->m_aInplaceBuckets;
00681a25      
00681a3c      class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >** m_buckets = this->m_buckets;
00681a3f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00681a45      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00681a56      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
006819d0  }

00681a5f                                                                                               90                                 .

00681a60  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>* this, uint32_t arg2)

00681a60  {
00681a6b      arg2 = arg2;
00681a6f      uint8_t edx = ((int8_t)arg2);
00681a73      this->m_buckets = nullptr;
00681a76      this->m_firstInterestingBucket = nullptr;
00681a79      this->m_numBuckets = 0;
00681a7c      this->m_numElements = 0;
00681a80      this->vtable = 0x7fe850;
00681a86      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00681a99      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00681a99      
00681aa3      if (eax == bucketSizesEnd_1)
00681aa5          eax -= 4;
00681aa5      
00681aa8      uint32_t eax_1 = *(uint32_t*)eax;
00681aad      this->m_numBuckets = eax_1;
00681aad      
00681ab0      if (eax_1 > 0x17)
00681ac6          this->m_buckets = operator new[]((eax_1 << 2));
00681ab0      else
00681ab5          this->m_buckets = &this->m_aInplaceBuckets;
00681ab5      
00681acc      class HashTableData<unsigned long,List<PStringBase<char> > >** m_buckets = this->m_buckets;
00681acf      uint32_t ecx_3 = (this->m_numBuckets << 2);
00681ad5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00681ae6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00681a60  }

00681aef                                               90                                                                 .

00681af0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize_internal(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>* this, uint32_t arg2)

00681af0  {
00681afd      if (arg2 == this->m_numBuckets)
00681afd      {
00681aff          uint32_t eax;
00681aff          eax = 0;
00681b05          return 0;
00681afd      }
00681afd      
00681b0d      class HashTableData<unsigned long,List<PStringBase<char> > >* m_hashNext_2 = nullptr;
00681b0d      
00681b11      while (this->m_numElements != 0)
00681b11      {
00681b1c          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00681b21          class HashTableData<unsigned long,List<PStringBase<char> > >** m_firstInterestingBucket_2;
00681b21          class HashTableData<unsigned long,List<PStringBase<char> > >* m_hashNext_3;
00681b21          
00681b21          if (this->m_firstInterestingBucket == ecx_1)
00681b21          {
00681b34          label_681b34:
00681b34              m_firstInterestingBucket_2 = nullptr;
00681b36              m_hashNext_3 = nullptr;
00681b21          }
00681b21          else
00681b21          {
00681b23              while (true)
00681b23              {
00681b23                  class HashTableData<unsigned long,List<PStringBase<char> > >** m_firstInterestingBucket = this->m_firstInterestingBucket;
00681b23                  
00681b28                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00681b28                  {
00681b3a                      class HashTableData<unsigned long,List<PStringBase<char> > >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00681b3d                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
00681b3f                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00681b3f                      break;
00681b28                  }
00681b28                  
00681b2f                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00681b2f                  
00681b32                  if (&m_firstInterestingBucket[1] == ecx_1)
00681b32                      goto label_681b34;
00681b23              }
00681b21          }
00681b21          
00681b46          class HashTableData<unsigned long,List<PStringBase<char> > >** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
00681b4d          class HashTableData<unsigned long,List<PStringBase<char> > >* m_hashNext_4 = m_hashNext_3;
00681b50          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, this);
00681b55          m_hashNext_3->m_hashNext = m_hashNext_2;
00681b5b          m_hashNext_2 = m_hashNext_3;
00681b11      }
00681b11      
00681b5f      class HashTableData<unsigned long,List<PStringBase<char> > >** m_buckets = this->m_buckets;
00681b5f      
00681b67      if (m_buckets != &this->m_aInplaceBuckets)
00681b6a          operator delete[](m_buckets);
00681b6a      
00681b79      this->m_buckets = nullptr;
00681b7c      this->m_firstInterestingBucket = nullptr;
00681b7f      this->m_numBuckets = 0;
00681b82      this->m_numElements = 0;
00681b85      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
00681b8c      class HashTableData<unsigned long,List<PStringBase<char> > >* m_hashNext_1 = m_hashNext_2;
00681b8e      class HashTableData<unsigned long,List<PStringBase<char> > >** eax_4;
00681b8e      
00681b8e      if (m_hashNext_2 != 0)
00681b8e      {
00681bba          class HashTableData<unsigned long,List<PStringBase<char> > >* m_hashNext;
00681bba          
00681bba          do
00681bba          {
00681b9a              m_hashNext = m_hashNext_1->m_hashNext;
00681b9d              eax_4 = &this->m_buckets[(COMBINE(0, m_hashNext_1->m_hashKey) % this->m_numBuckets)];
00681ba2              m_hashNext_1->m_hashNext = *(uint32_t*)eax_4;
00681ba5              *(uint32_t*)eax_4 = m_hashNext_1;
00681ba5              
00681baa              if (eax_4 < this->m_firstInterestingBucket)
00681bac                  this->m_firstInterestingBucket = eax_4;
00681bac              
00681bb5              this->m_numElements += 1;
00681bb8              m_hashNext_1 = m_hashNext;
00681bba          } while (m_hashNext != 0);
00681b8e      }
00681b8e      
00681bbf      eax_4 = 1;
00681bc2      return 1;
00681af0  }

00681bc5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00681bd0  void __thiscall List<PStringBase<char> >::Serialize(class List<PStringBase<char> >* this, class Archive* arg2)

00681bd0  {
00681bd2      class Archive* esi = arg2;
00681bd9      int32_t eax_1 = (esi->m_flags & 5);
00681bd9      
00681be2      if (eax_1 == 1)
00681be2      {
00681be8          Archive::CheckAlignment(esi, 4);
00681bf1          uint8_t* eax_2 = Archive::GetBytes(esi, 4);
00681bf1          
00681bf8          if (eax_2 != 0)
00681bf8          {
00681bfe              if ((esi->m_flags & 1) == 0)
00681c09                  this->_num_elements = *(uint32_t*)eax_2;
00681bfe              else
00681c03                  *(uint32_t*)eax_2 = this->_num_elements;
00681bf8          }
00681bf8          
00681c0c          class ListNode<PStringBase<char> >* edi_1 = this->_head;
00681c0c          
00681c11          if (edi_1 != 0)
00681c11          {
00681c1a              while (true)
00681c1a              {
00681c1a                  PStringBase<char>::Serialize(edi_1, esi);
00681c1a                  
00681c21                  if (edi_1 == 0)
00681c21                      break;
00681c21                  
00681c27                  edi_1 = edi_1->next;
00681c27                  
00681c2c                  if (edi_1 == 0)
00681c31                      return;
00681c1a              }
00681c11          }
00681be2      }
00681be2      else if (eax_1 == 0)
00681c36      {
00681c3f          List<PStringBase<char> >::flush(this);
00681c48          Archive::CheckAlignment(esi, 4);
00681c51          uint8_t* eax_3 = Archive::GetBytes(esi, 4);
00681c58          class Archive* ebp_1;
00681c58          
00681c58          if (eax_3 == 0)
00681c6c              ebp_1 = arg2;
00681c58          else if ((esi->m_flags & 1) == 0)
00681c68              ebp_1 = *(uint32_t*)eax_3;
00681c5e          else
00681c5e          {
00681c60              ebp_1 = arg2;
00681c64              *(uint32_t*)eax_3 = ebp_1;
00681c5e          }
00681c5e          
00681c7a          if ((!(((int8_t)(esi->m_flags >> 2))) & 1) != 0)
00681c7a          {
00681c85              if (ebp_1 > Archive::GetSizeLeft(esi))
00681c85              {
00681c89                  Archive::RaiseError(esi);
00681c92                  return;
00681c85              }
00681c85              
00681c95              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00681c9a              arg2 = PStringBase<char>::s_NullBuffer_1;
00681ca2              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00681ca2              
00681cac              if (ebp_1 > 0)
00681cac              {
00681cae                  int32_t edi_2 = 0;
00681cae                  
00681cd4                  do
00681cd4                  {
00681cb5                      PStringBase<char>::Serialize(&arg2, esi);
00681cb5                      
00681cc3                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
00681cc3                          break;
00681cc3                      
00681ccc                      List<PStringBase<char> >::push_back(this, &arg2);
00681cd1                      edi_2 += 1;
00681cd4                  } while (edi_2 < ebp_1);
00681cac              }
00681cac              
00681cda              void* __offset(Archive, -0x14) esi_2 = ((char*)arg2 - 0x14);
00681cda              
00681ced              if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00681cf5                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00681c7a          }
00681c36      }
00681bd0  }

00681cfe                                                                                            90 90                                ..

00681d00  void __thiscall List<PStringBase<char> >::List<PStringBase<char> >(class List<PStringBase<char> >* this, class List<PStringBase<char> > const* arg2)

00681d00  {
00681d0a      this->vtable = &List<class PStringBase<char> >::`vftable';
00681d10      this->_head = nullptr;
00681d17      this->_tail = nullptr;
00681d1e      this->_num_elements = 0;
00681d1e      
00681d25      if (this != arg2)
00681d25      {
00681d27          List<PStringBase<char> >::flush(this);
00681d27          
00681d31          for (class ListNode<PStringBase<char> >* i = arg2->_head; i != 0; i = i->next)
00681d31          {
00681d36              List<PStringBase<char> >::push_back(this, i);
00681d36              
00681d3d              if (i == 0)
00681d3d                  break;
00681d31          }
00681d25      }
00681d00  }

00681d4d                                         90 90 90                                                               ...

00681d50  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>* this)

00681d50  {
00681d58      if (this->m_numElements != 0)
00681d58      {
00681d5a          void* edi;
00681d5a          void* var_8_1 = edi;
00681d5a          
00681dd6          do
00681dd6          {
00681d66              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00681d6c              int32_t* m_firstInterestingBucket_2;
00681d6c              
00681d6c              if (this->m_firstInterestingBucket == ecx_1)
00681d6c              {
00681d82              label_681d82:
00681d82                  m_firstInterestingBucket_2 = nullptr;
00681d84                  edi = nullptr;
00681d6c              }
00681d6c              else
00681d6c              {
00681d70                  while (true)
00681d70                  {
00681d70                      class HashTableData<unsigned long,List<PStringBase<char> > >** m_firstInterestingBucket = this->m_firstInterestingBucket;
00681d70                      
00681d76                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00681d76                      {
00681d88                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00681d8b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
00681d8d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00681d8d                          break;
00681d76                      }
00681d76                      
00681d7d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00681d7d                      
00681d80                      if (&m_firstInterestingBucket[1] == ecx_1)
00681d80                          goto label_681d82;
00681d70                  }
00681d6c              }
00681d6c              
00681d8f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
00681d8f              
00681d93              if (eax_3 == edi)
00681da5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00681d93              else
00681d93              {
00681d9c                  void* ecx_2;
00681d9c                  
00681d9c                  do
00681d9c                  {
00681d95                      ecx_2 = eax_3;
00681d97                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
00681d9c                  } while (eax_3 != edi);
00681d9c                  
00681da0                  if (ecx_2 != 0)
00681dac                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00681da0                  else
00681da5                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00681d93              }
00681d93              
00681db5              this->m_numElements -= 1;
00681db5              
00681db8              if (edi != 0)
00681db8              {
00681dbd                  *(uint32_t*)((char*)edi + 8) = &List<class PStringBase<char> >::`vftable';
00681dc3                  List<PStringBase<char> >::flush(((char*)edi + 8));
00681dc9                  operator delete(edi);
00681db8              }
00681dd6          } while (this->m_numElements != 0);
00681d58      }
00681d50  }

00681d5d                                                                                         8d 49 00                               .I.
00681ddb                                                                                   90 90 90 90 90                             .....

00681de0  void* __thiscall HashTable<unsigned long,List<PStringBase<char> >,0>::`scalar deleting destructor'(class HashTable<unsigned long,List<PStringBase<char> >,0>* this, uint32_t arg2)

00681de0  {
00681de9      this->vtable = 0x7feb74;
00681def      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::delete_contents(&this->m_intrusiveTable);
00681df4      class HashTableData<unsigned long,List<PStringBase<char> > >** m_buckets = this->m_intrusiveTable.m_buckets;
00681de4      this->m_intrusiveTable.vtable = 0x7fe850;
00681de4      
00681e02      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00681e05          operator delete[](m_buckets);
00681e05      
00681de4      this->m_intrusiveTable.m_buckets = nullptr;
00681de4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00681de4      this->m_intrusiveTable.m_numBuckets = 0;
00681de4      this->m_intrusiveTable.m_numElements = 0;
00681de4      
00681e20      if ((arg2 & 1) != 0)
00681e23          operator delete(this);
00681e23      
00681e2f      return this;
00681de0  }

00681e32                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00681e40  void* __thiscall HashTable<unsigned long,List<PStringBase<char> >,0>::operator=(void* arg1, uint32_t arg2)

00681e40  {
00681e45      uint32_t edi = arg2;
00681e49      void* ebx = arg1;
00681e4d      void* var_1c = ebx;
00681e4d      
00681e51      if (ebx != edi)
00681e51      {
00681e5e          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::delete_contents(((char*)ebx + 4));
00681e66          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00681e6c          arg2 = *(uint32_t*)(edi + 0x6c);
00681e83          uint32_t* eax_3 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
00681e83          
00681e8d          if (eax_3 == bucketSizesEnd_1)
00681e8f              eax_3 -= 4;
00681e8f          
00681e97          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize_internal(((char*)ebx + 4), *(uint32_t*)eax_3);
00681ea4          void* ebp_1 = nullptr;
00681ea6          void __return;
00681ea6          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin((edi + 4), &__return);
00681eab          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
00681ead          class HashTableData<unsigned long,DBOCache *>* edi_1 = eax_4->m_currElement;
00681eb9          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
00681eb9          
00681ebd          if (edi_1 != 0)
00681ebd          {
00681ed7              while (true)
00681ed7              {
00681ed7                  void* esi_2 = operator new(0x18);
00681ed7                  
00681ede                  if (esi_2 == 0)
00681ef9                      esi_2 = nullptr;
00681ede                  else
00681ede                  {
00681ee9                      *(uint32_t*)esi_2 = edi_1->m_hashKey;
00681eeb                      *(uint32_t*)((char*)esi_2 + 4) = 0;
00681ef2                      List<PStringBase<char> >::List<PStringBase<char> >(((char*)esi_2 + 8), &edi_1->m_data);
00681ede                  }
00681ede                  
00681efe                  int32_t ebx_1 = *(uint32_t*)((char*)ebx + 0x6c);
00681f05                  uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)esi_2) % ebx_1);
00681f05                  
00681f0b                  if (ebp_1 == 0)
00681f0b                  {
00681f2b                  label_681f2b:
00681f2b                      void** eax_13 = (*(uint32_t*)((char*)var_1c + 0x64) + (temp1_1 << 2));
00681f2e                      *(uint32_t*)eax_13 = esi_2;
00681f2e                      
00681f30                      if (ebp_1 == 0)
00681f32                          *(uint32_t*)((char*)var_1c + 0x68) = eax_13;
00681f32                      
00681f40                      *(uint32_t*)((char*)var_1c + 0x70) += 1;
00681f0b                  }
00681f0b                  else
00681f0b                  {
00681f12                      uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)ebp_1) % ebx_1);
00681f12                      
00681f16                      if (temp1_1 == temp1_2)
00681f16                      {
00681f18                          *(uint32_t*)((char*)ebp_1 + 4) = esi_2;
00681f40                          *(uint32_t*)((char*)var_1c + 0x70) += 1;
00681f16                      }
00681f16                      else if (temp1_1 > temp1_2)
00681f1d                          goto label_681f2b;
00681f0b                  }
00681f0b                  
00681f43                  edi_1 = edi_1->m_hashNext;
00681f48                  ebp_1 = esi_2;
00681f48                  
00681f4a                  if (edi_1 == 0)
00681f4a                  {
00681f64                      while (true)
00681f64                      {
00681f64                          void* m_currBucket_1 = &m_currBucket[1];
00681f69                          m_currBucket = m_currBucket_1;
00681f69                          
00681f6d                          if (m_currBucket_1 != &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00681f6d                          {
00681f6f                              class HashTableData<unsigned long,DBOCache *>* edx_9 = *(uint32_t*)m_currBucket_1;
00681f6f                              
00681f73                              if (edx_9 == 0)
00681f73                                  continue;
00681f73                              else
00681f73                              {
00681f75                                  edi_1 = edx_9;
00681f75                                  
00681f79                                  if (edi_1 != 0)
00681f79                                      break;
00681f73                              }
00681f6d                          }
00681f6d                          
00681f7f                          return var_1c;
00681f64                      }
00681f4a                  }
00681f4a                  
00681ec5                  ebx = var_1c;
00681ed7              }
00681ebd          }
00681e51      }
00681e51      
00681f8c      return ebx;
00681e40  }

00681f8f                                               90                                                                 .

00681f90  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>* this)

00681f90  {
00681f9b      while (this->m_numElements != 0)
00681f9b      {
00681fa9          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00681faf          class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >** m_firstInterestingBucket_2;
00681faf          void* edi_1;
00681faf          
00681faf          if (this->m_firstInterestingBucket == ecx_1)
00681faf          {
00681fc2          label_681fc2:
00681fc2              m_firstInterestingBucket_2 = nullptr;
00681fc4              edi_1 = nullptr;
00681faf          }
00681faf          else
00681faf          {
00681fb1              while (true)
00681fb1              {
00681fb1                  class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
00681fb1                  
00681fb6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00681fb6                  {
00681fc8                      class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00681fcb                      edi_1 = *(uint32_t*)m_firstInterestingBucket_1;
00681fcd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00681fcd                      break;
00681fb6                  }
00681fb6                  
00681fbd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00681fbd                  
00681fc0                  if (&m_firstInterestingBucket[1] == ecx_1)
00681fc0                      goto label_681fc2;
00681fb1              }
00681faf          }
00681faf          
00681fcf          class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
00681fcf          
00681fd3          if (m_hashNext == edi_1)
00681fe5              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00681fd3          else
00681fd3          {
00681fdc              class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >* m_hashNext_1;
00681fdc              
00681fdc              do
00681fdc              {
00681fd5                  m_hashNext_1 = m_hashNext;
00681fd7                  m_hashNext = m_hashNext->m_hashNext;
00681fdc              } while (m_hashNext != edi_1);
00681fdc              
00681fe0              if (m_hashNext_1 != 0)
00681fec                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
00681fe0              else
00681fe5                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
00681fd3          }
00681fd3          
00681ff5          this->m_numElements -= 1;
00681ff5          
00681ff8          if (edi_1 != 0)
00681ff8          {
00681fff              *(uint32_t*)((char*)edi_1 + 8) = 0x7feb74;
00682006              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::delete_contents(((char*)edi_1 + 0xc));
0068200b              void* eax_4 = *(uint32_t*)((char*)edi_1 + 0x6c);
00682013              *(uint32_t*)((char*)edi_1 + 0xc) = 0x7fe850;
00682013              
00682019              if (eax_4 != ((char*)edi_1 + 0x10))
0068201c                  operator delete[](eax_4);
0068201c              
00682025              *(uint32_t*)((char*)edi_1 + 0x6c) = 0;
00682028              *(uint32_t*)((char*)edi_1 + 0x70) = 0;
0068202b              *(uint32_t*)((char*)edi_1 + 0x74) = 0;
0068202e              *(uint32_t*)((char*)edi_1 + 0x78) = 0;
00682031              operator delete(edi_1);
00681ff8          }
00681f9b      }
00681f90  }

00682047                       90 90 90 90 90 90 90 90 90                                                         .........

00682050  uint32_t __thiscall TabooTable::CheckCensors(class TabooTable const* this, class PStringBase<char> const* arg2, uint32_t arg3, uint32_t arg4, class PStringBase<char>* arg5)

00682050  {
00682066      int32_t result = 0;
0068206a      int32_t var_74 = 0x7feb74;
00682072      int32_t var_70;
00682072      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>(&var_70, 0x17);
0068208e      uint32_t m_hashKey_1 = 0;
0068208e      
00682099      for (int32_t* i = this->m_audienceToBannedPatterns.m_intrusiveTable.m_buckets[(COMBINE(0, arg3) % this->m_audienceToBannedPatterns.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00682099      {
006820a2          if (*(uint32_t*)i == arg3)
006820a2          {
006820b2              if (i != 0)
006820b2              {
006820c2                  HashTable<unsigned long,List<PStringBase<char> >,0>::operator=(&var_74, &i[2]);
006820d0                  struct List<PStringBase<char> >::VTable* const __return;
006820d0                  class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&var_70, &__return);
006820d5                  class HashTableData<unsigned long,DBOCache *>* ebp_1 = eax_4->m_currElement;
006820da                  class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
006820e3                  class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
006820e3                  
006820e7                  if (ebp_1 != 0)
006820e7                  {
006820f0                      while (true)
006820f0                      {
006820f0                      label_6820f0:
006820f0                          uint32_t m_hashKey = ebp_1->m_hashKey;
006820ff                          List<PStringBase<char> >::List<PStringBase<char> >(&__return, &ebp_1->m_data);
0068210b                          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0068210d                          class PSRefBufferCharData<char>* m_charbuffer_2 = m_charbuffer;
00682115                          InterlockedIncrement(&m_charbuffer[-1]);
0068211b                          class PSRefBufferCharData<char>* m_charbuffer_3 = m_charbuffer_2;
0068211b                          
00682123                          if (*(int32_t*)((char*)m_charbuffer_3 + -0x10) != 1)
00682123                          {
0068213a                              PStringBase<char>::allocate_ref_buffer(&m_charbuffer_2, (m_charbuffer_3->m_data[-4] - 1));
0068213f                              class PSRefBufferCharData<char>* m_charbuffer_5 = m_charbuffer_2;
00682143                              int32_t ecx_9 = m_charbuffer_5->m_data[-4];
0068214e                              int32_t esi_2;
0068214e                              int32_t edi_1;
0068214e                              edi_1 = __builtin_memcpy(m_charbuffer_5, m_charbuffer_3, ((ecx_9 >> 2) << 2));
00682155                              __builtin_memcpy(edi_1, esi_2, (ecx_9 & 3));
00682155                              
00682167                              if ((InterlockedDecrement(&m_charbuffer_3[-1]) == 0 && m_charbuffer_3 != 0x14))
0068216f                                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_3 + -0x14)(1);
00682123                          }
00682123                          else
00682125                              *(uint32_t*)((char*)m_charbuffer_3 - 8) = 0xffffffff;
00682125                          
00682176                          _strlwr(m_charbuffer_2);
0068217c                          class PSRefBufferCharData<char>* m_charbuffer_4 = m_charbuffer_2;
00682180                          uint32_t esi_3 = m_charbuffer_4->m_data[-4];
00682186                          void* eax_10 = operator new[](esi_3);
00682186                          
006821a8                          if (TabooTable::CreateCheckString(this, arg4, m_charbuffer_4, esi_3, eax_10) == 0)
00682213                              result = 2;
006821a8                          else
006821a8                          {
006821b0                              char** j_1;
006821b0                              
006821b0                              for (char** j = j_1; j != 0; j = j[1])
006821b0                              {
006821bf                                  if (TabooTable::StringMatchesFilter(this, eax_10, *(uint32_t*)j) != 0)
006821bf                                  {
006821d1                                      class PSRefBufferCharData<char>* m_charbuffer_1 = arg5->m_charbuffer;
006821d1                                      
006821d5                                      if (m_charbuffer_1 != *(uint32_t*)j)
006821d5                                      {
006821ea                                          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
006821f2                                              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
006821f2                                          
006821f4                                          char* esi_4 = *(uint32_t*)j;
006821fd                                          *(uint32_t*)arg5 = esi_4;
00682203                                          InterlockedIncrement(&esi_4[0xfffffff0]);
006821d5                                      }
006821d5                                      
0068220d                                      m_hashKey_1 = m_hashKey;
00682211                                      break;
006821bf                                  }
006821b0                              }
006821a8                          }
006821a8                          
0068221c                          operator delete[](eax_10);
0068222c                          void* __offset(PSRefBufferCharData<char>, -0x14) esi_7 = &m_charbuffer_2->m_data[0xffffffec];
0068222c                          
00682231                          if (m_hashKey_1 != 0)
00682231                          {
006822a7                              if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
006822af                                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
006822af                              
006822b5                              __return = &List<class PStringBase<char> >::`vftable';
006822bd                              List<PStringBase<char> >::flush(&__return);
006822bd                              break;
00682231                          }
00682231                          
00682243                          if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0068224b                              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0068224b                          
00682251                          __return = &List<class PStringBase<char> >::`vftable';
00682259                          List<PStringBase<char> >::flush(&__return);
0068225e                          ebp_1 = ebp_1->m_hashNext;
0068225e                          
00682263                          if (ebp_1 == 0)
00682263                          {
0068227a                              while (true)
0068227a                              {
0068227a                                  void* m_currBucket_1 = &m_currBucket[1];
0068227f                                  m_currBucket = m_currBucket_1;
0068227f                                  
00682283                                  if (m_currBucket_1 == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00682283                                      break;
00682283                                  
00682285                                  class HashTableData<unsigned long,DBOCache *>* edx_9 = *(uint32_t*)m_currBucket_1;
00682285                                  
00682289                                  if (edx_9 != 0)
00682289                                  {
0068228b                                      ebp_1 = edx_9;
0068228b                                      
0068228f                                      if (ebp_1 != 0)
0068228f                                          goto label_6820f0;
0068228f                                      
0068228f                                      goto label_6822c9;
00682289                                  }
0068227a                              }
0068227a                              
00682283                              break;
00682263                          }
006820f0                      }
006820e7                  }
006820b2              }
006820b2              
006820b2              break;
006820a2          }
00682099      }
00682099      
006822c9  label_6822c9:
006822c9      
006822ce      if ((m_hashKey_1 - 1) <= 3)
006822d0          switch (m_hashKey_1)
006822d0          {
006822d7              case 1:
006822d7              {
006822d7                  result = 3;
006822d7                  break;
006822d7              }
006822e1              case 2:
006822e1              {
006822e1                  result = 4;
006822e1                  break;
006822e1              }
006822f5              case 3:
006822f5              {
006822f5                  result = 6;
006822f5                  break;
006822f5              }
006822eb              case 4:
006822eb              {
006822eb                  result = 5;
006822eb                  break;
006822eb              }
006822d0          }
006822d0      
00682301      var_74 = 0x7feb74;
00682309      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::delete_contents(&var_70);
0068231b      var_70 = 0x7fe850;
00682323      void var_6c;
00682323      void* var_10;
00682323      
00682323      if (var_10 != &var_6c)
00682326          operator delete[](var_10);
00682326      
00682338      return result;
00682050  }

0068233b                                                                                   90                                         .
0068233c  uint32_t jump_table_68233c[0x4] = 
0068233c  {
0068233c      [0x0] =  0x006822d7
00682340      [0x1] =  0x006822e1
00682344      [0x2] =  0x006822f5
00682348      [0x3] =  0x006822eb
0068234c  }

0068234c                                      90 90 90 90                                                              ....

00682350  uint32_t __thiscall TabooTable::CheckCensorsW(class TabooTable const* this, class PStringBase<unsigned short> const* arg2, uint32_t arg3, uint32_t arg4, class PStringBase<unsigned short>* arg5)

00682350  {
00682350      class TabooTable* var_4 = this;
00682351      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068235f      var_4 = PStringBase<char>::s_NullBuffer_1;
0068236a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00682370      uint32_t edx = arg3;
00682379      class PStringBase<char>* __return = arg2;
0068237f      class PStringBase<char>* __return_2 = __return;
00682384      uint32_t* var_28 = &arg3;
00682390      uint32_t result = TabooTable::CheckCensors(this, PSUtils::narrowify(__return, edx), edx, arg4, &var_4);
0068239f      int32_t* esi_2 = (arg3 - 0x14);
006823aa      int32_t __return_1;
006823aa      class PStringBase<char>* edx_2;
006823aa      __return_1 = InterlockedDecrement(&esi_2[1]);
006823aa      
006823b2      if ((__return_1 == 0 && esi_2 != 0))
006823ba          __return_1 = **(uint32_t**)esi_2(1);
006823ba      
006823c0      class TabooTable** var_18_3 = &var_4;
006823c5      uint32_t* var_1c_1 = &arg3;
006823c6      class PStringBase<unsigned short>* eax_3 = PSUtils::widify(__return_1, edx_2);
006823d1      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg5->m_charbuffer;
006823d1      
006823da      if (m_charbuffer != eax_3->m_charbuffer)
006823da      {
006823eb          if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
006823f3              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
006823f3          
006823f5          class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = eax_3->m_charbuffer;
006823fb          arg5->m_charbuffer = m_charbuffer_1;
00682401          InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
006823da      }
006823da      
00682407      int32_t* esi_5 = (arg3 - 0x14);
00682407      
00682416      if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0068241e          **(uint32_t**)esi_5(1);
0068241e      
00682424      void* __offset(TabooTable, -0x14) esi_7 = ((char*)var_4 - 0x14);
00682424      
00682433      if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
0068243b          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
0068243b      
00682446      return result;
00682350  }

00682449                             90 90 90 90 90 90 90                                                           .......

00682450  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>,HashTableData<unsigned long,List<PStringBase<char> > > *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>* arg2, class Archive* arg3)

00682450  {
00682456      class Archive* esi = arg3;
00682456      
00682462      if ((!(esi->m_flags) & 1) != 0)
00682468          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
00682468      
00682476      int32_t ebx;
00682476      
00682476      if ((((int8_t)esi->m_flags) & 5) != 1)
006824b5          ebx = arg3;
00682476      else
00682476      {
0068247f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00682485          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0068248d          arg3 = arg2->m_numBuckets;
0068249d          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0068249d          
006824a7          if (eax_2 == bucketSizesEnd_1)
006824a9              eax_2 -= 4;
006824a9          
006824b0          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
00682476      }
00682476      
006824bd      Archive::CheckAlignment(esi, 1);
006824c6      char* eax_3 = Archive::GetBytes(esi, 1);
006824cb      void* edi_1 = nullptr;
006824cb      
006824cf      if (eax_3 != 0)
006824cf      {
006824d5          if ((esi->m_flags & 1) == 0)
006824db              ebx = *(uint8_t*)eax_3;
006824d5          else
006824d7              *(uint8_t*)eax_3 = ebx;
006824cf      }
006824cf      
006824e1      if ((esi->m_flags & 5) == 0)
006824e1      {
006824e9          uint32_t eax_4 = ((uint32_t)ebx);
006824e9          
006824ee          if (eax_4 < 0x17)
00682507              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
006824ee          else
006824f2              Archive::RaiseError(esi);
006824e1      }
006824e1      
00682513      if ((((int8_t)esi->m_flags) & 5) == 1)
0068251c          arg3 = arg2->m_numElements;
0068251c      
0068252b      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
0068252b      
0068253c      if ((((int8_t)esi->m_flags) & 5) == 1)
0068253c      {
00682547          void __return;
00682547          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0068254c          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0068254e          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
00682551          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
00682551          
00682556          while (i != 0)
00682556          {
0068258c              do
0068258c              {
0068255c                  Archive::CheckAlignment(esi, 4);
00682565                  uint8_t* eax_7 = Archive::GetBytes(esi, 4);
00682565                  
0068256c                  if (eax_7 != 0)
0068256c                  {
00682572                      if ((esi->m_flags & 1) == 0)
0068257c                          i->m_hashKey = *(uint32_t*)eax_7;
00682572                      else
00682576                          *(uint32_t*)eax_7 = i->m_hashKey;
0068256c                  }
0068256c                  
00682582                  List<PStringBase<char> >::Serialize(&i->m_data, esi);
00682587                  i = i->m_hashNext;
0068258c              } while (i != 0);
0068258c              
00682597              while (true)
00682597              {
00682597                  m_currBucket = &m_currBucket[1];
00682597                  
0068259c                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0068259c                      break;
0068259c                  
0068259e                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0068259e                  
006825a3                  if (i_1 != 0)
006825a3                  {
006825a5                      i = i_1;
006825a7                      break;
006825a3                  }
00682597              }
00682556          }
00682556          
006825a9          edi_1 = nullptr;
0068253c      }
0068253c      
006825af      if ((esi->m_flags & 5) == 0)
006825af      {
006825b7          uint32_t eax_10 = Archive::GetSizeLeft(esi);
006825bc          class Archive* ecx_17 = arg3;
006825bc          
006825c2          if (ecx_17 > eax_10)
00682659              Archive::RaiseError(esi);
006825c2          else
006825c2          {
006825c8              void* ebx_3 = nullptr;
006825ca              int32_t ebp_1 = 0;
006825ca              
006825ce              if (ecx_17 > 0)
006825ce              {
006825da                  while (true)
006825da                  {
006825da                      void* eax_11 = operator new(0x18);
006825da                      
006825e4                      if (eax_11 != 0)
006825e4                      {
006825e6                          *(uint32_t*)((char*)eax_11 + 4) = 0;
006825e9                          *(uint32_t*)((char*)eax_11 + 0xc) = 0;
006825ec                          *(uint32_t*)((char*)eax_11 + 0x10) = 0;
006825ef                          *(uint32_t*)((char*)eax_11 + 0x14) = 0;
006825f2                          *(uint32_t*)((char*)eax_11 + 8) = &List<class PStringBase<char> >::`vftable';
006825f9                          edi_1 = eax_11;
006825e4                      }
006825e4                      
006825ff                      Archive::CheckAlignment(esi, 4);
00682608                      uint8_t* eax_12 = Archive::GetBytes(esi, 4);
00682608                      
0068260f                      if (eax_12 != 0)
0068260f                      {
00682615                          if ((esi->m_flags & 1) == 0)
0068261f                              *(uint32_t*)edi_1 = *(uint32_t*)eax_12;
00682615                          else
00682619                              *(uint32_t*)eax_12 = *(uint32_t*)edi_1;
0068260f                      }
0068260f                      
00682625                      List<PStringBase<char> >::Serialize(((char*)edi_1 + 8), esi);
00682625                      
00682633                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
00682665                          return;
00682665                      
00682642                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebx_3) == 0)
00682642                          break;
00682642                      
00682648                      ebp_1 += 1;
0068264b                      ebx_3 = edi_1;
0068264b                      
0068264d                      if (ebp_1 >= arg3)
00682656                          return;
00682656                      
006825d6                      edi_1 = nullptr;
006825da                  }
006825da                  
00682659                  Archive::RaiseError(esi);
006825ce              }
006825c2          }
006825af      }
00682450  }

00682666                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00682670  void __fastcall HashTable<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0>,0>::~HashTable<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0>,0>(class HashTable<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0>,0>* this)

00682670  {
00682674      this->vtable = 0x7feb70;
0068267c      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>::delete_contents(&this->m_intrusiveTable);
00682681      class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >** m_buckets = this->m_intrusiveTable.m_buckets;
00682671      this->m_intrusiveTable.vtable = 0x7fe84c;
00682671      
0068268f      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00682692          operator delete[](m_buckets);
00682692      
00682671      this->m_intrusiveTable.m_buckets = nullptr;
00682671      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00682671      this->m_intrusiveTable.m_numBuckets = 0;
00682671      this->m_intrusiveTable.m_numElements = 0;
00682670  }

006826aa                                90 90 90 90 90 90                                                            ......

006826b0  void* __thiscall HashTable<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0>,0>::`scalar deleting destructor'(class HashTable<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0>,0>* this, uint32_t arg2)

006826b0  {
006826b9      this->vtable = 0x7feb70;
006826bf      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>::delete_contents(&this->m_intrusiveTable);
006826c4      class HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> >** m_buckets = this->m_intrusiveTable.m_buckets;
006826b4      this->m_intrusiveTable.vtable = 0x7fe84c;
006826b4      
006826d2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
006826d5          operator delete[](m_buckets);
006826d5      
006826b4      this->m_intrusiveTable.m_buckets = nullptr;
006826b4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
006826b4      this->m_intrusiveTable.m_numBuckets = 0;
006826b4      this->m_intrusiveTable.m_numElements = 0;
006826b4      
006826f0      if ((arg2 & 1) != 0)
006826f3          operator delete(this);
006826f3      
006826ff      return this;
006826b0  }

00682702        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00682710  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::Serialize(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>* this, class Archive* arg2)

00682710  {
0068271b      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>,HashTableData<unsigned long,List<PStringBase<char> > > *,SB_Default>(&arg2, this, arg2);
00682710  }

00682726                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00682730  void __fastcall TabooTable::TabooTable(class TabooTable* this)

00682730  {
00682739      DBObj::DBObj(this, INVALID_DID.id);
0068273e      this->vtable = 0x7feb78;
00682749      this->m_audienceToBannedPatterns.vtable = 0x7feb70;
00682750      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>(&this->m_audienceToBannedPatterns.m_intrusiveTable, 0x17);
00682730  }

00682759                                                                             90 90 90 90 90 90 90                           .......

00682760  uint32_t TabooTable::GetDBOType(class TabooTable const* this @ ecx) __pure

00682760  {
00682765      return 0x14;
00682760  }

00682766                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00682770  class DBObj* TabooTable::Allocate(class TabooTable const* this @ ecx)

00682770  {
00682770      /* tailcall */
00682770      return TabooTable::Allocator();
00682770  }

00682775                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00682780  void* __thiscall TabooTable::`scalar deleting destructor'(class TabooTable* this, uint32_t arg2)

00682780  {
00682786      HashTable<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0>,0>::~HashTable<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0>,0>(&this->m_audienceToBannedPatterns);
0068278d      DBObj::~DBObj(this);
0068278d      
00682797      if ((arg2 & 1) != 0)
0068279a          operator delete(this);
0068279a      
006827a5      return this;
00682780  }

006827a8                          90 90 90 90 90 90 90 90                                                          ........

006827b0  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>* arg2, class Archive* arg3)

006827b0  {
006827b7      class Archive* edi = arg3;
006827b7      
006827c2      if ((!(edi->m_flags) & 1) != 0)
006827c8          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
006827c8      
006827d6      int32_t ebx;
006827d6      
006827d6      if ((((int8_t)edi->m_flags) & 5) != 1)
00682815          ebx = arg3;
006827d6      else
006827d6      {
006827df          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006827e5          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
006827ed          arg3 = arg2->m_numBuckets;
006827fd          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
006827fd          
00682807          if (eax_2 == bucketSizesEnd_1)
00682809              eax_2 -= 4;
00682809          
00682810          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
006827d6      }
006827d6      
0068281d      Archive::CheckAlignment(edi, 1);
00682826      char* eax_3 = Archive::GetBytes(edi, 1);
00682826      
0068282d      if (eax_3 != 0)
0068282d      {
00682833          if ((edi->m_flags & 1) == 0)
00682839              ebx = *(uint8_t*)eax_3;
00682833          else
00682835              *(uint8_t*)eax_3 = ebx;
0068282d      }
0068282d      
0068283f      if ((edi->m_flags & 5) == 0)
0068283f      {
00682847          uint32_t eax_4 = ((uint32_t)ebx);
00682847          
0068284c          if (eax_4 < 0x17)
00682865              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
0068284c          else
00682850              Archive::RaiseError(edi);
0068283f      }
0068283f      
00682871      if ((((int8_t)edi->m_flags) & 5) == 1)
0068287a          arg3 = arg2->m_numElements;
0068287a      
00682889      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, edi);
00682889      
0068289a      if ((((int8_t)edi->m_flags) & 5) == 1)
0068289a      {
006828a5          void __return;
006828a5          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
006828aa          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
006828ac          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
006828af          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
006828af          
006828b4          while (i != 0)
006828b4          {
006828fb              do
006828fb              {
006828ba                  Archive::CheckAlignment(edi, 4);
006828c3                  uint8_t* eax_7 = Archive::GetBytes(edi, 4);
006828c3                  
006828ca                  if (eax_7 != 0)
006828ca                  {
006828d0                      if ((edi->m_flags & 1) == 0)
006828da                          i->m_hashKey = *(uint32_t*)eax_7;
006828d0                      else
006828d4                          *(uint32_t*)eax_7 = i->m_hashKey;
006828ca                  }
006828ca                  
006828dc                  eax_7 = edi->m_flags;
006828df                  eax_7 = !(eax_7);
006828df                  
006828e3                  if ((eax_7 & 1) != 0)
006828e8                      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::delete_contents(&i[1]);
006828e8                  
006828f1                  IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::Serialize(&i[1], edi);
006828f6                  i = i->m_hashNext;
006828fb              } while (i != 0);
006828fb              
00682906              while (true)
00682906              {
00682906                  m_currBucket = &m_currBucket[1];
00682906                  
0068290b                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0068290b                      break;
0068290b                  
0068290d                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0068290d                  
00682912                  if (i_1 != 0)
00682912                  {
00682914                      i = i_1;
00682916                      break;
00682912                  }
00682906              }
006828b4          }
0068289a      }
0068289a      
0068291c      if ((edi->m_flags & 5) == 0)
0068291c      {
00682924          uint32_t eax_9 = Archive::GetSizeLeft(edi);
00682929          class Archive* ecx_18 = arg3;
00682929          
0068292f          if (ecx_18 > eax_9)
006829e0              Archive::RaiseError(edi);
0068292f          else
0068292f          {
00682935              void* ebx_3 = nullptr;
00682937              int32_t ebp_1 = 0;
00682937              
0068293b              if (ecx_18 > 0)
0068293b              {
00682948                  while (true)
00682948                  {
00682948                      void* esi_1 = operator new(0x7c);
00682948                      
0068294f                      if (esi_1 == 0)
0068296b                          esi_1 = nullptr;
0068294f                      else
0068294f                      {
00682951                          *(uint32_t*)((char*)esi_1 + 4) = 0;
0068295d                          *(uint32_t*)((char*)esi_1 + 8) = 0x7feb74;
00682964                          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>(((char*)esi_1 + 0xc), 0x17);
0068294f                      }
0068294f                      
00682971                      Archive::CheckAlignment(edi, 4);
0068297a                      uint8_t* eax_11 = Archive::GetBytes(edi, 4);
0068297a                      
00682981                      if (eax_11 != 0)
00682981                      {
00682987                          if ((edi->m_flags & 1) == 0)
00682991                              *(uint32_t*)esi_1 = *(uint32_t*)eax_11;
00682987                          else
0068298b                              *(uint32_t*)eax_11 = *(uint32_t*)esi_1;
00682981                      }
00682981                      
00682993                      eax_11 = edi->m_flags;
00682996                      eax_11 = !(eax_11);
00682996                      
0068299a                      if ((eax_11 & 1) != 0)
0068299f                          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::delete_contents(((char*)esi_1 + 0xc));
0068299f                      
006829a8                      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::Serialize(((char*)esi_1 + 0xc), edi);
006829a8                      
006829b6                      if ((((int8_t)(edi->m_flags >> 2)) & 1) != 0)
006829ec                          return;
006829ec                      
006829c5                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, esi_1, ebx_3) == 0)
006829c5                          break;
006829c5                      
006829cb                      ebp_1 += 1;
006829ce                      ebx_3 = esi_1;
006829ce                      
006829d0                      if (ebp_1 >= arg3)
006829dd                          return;
00682948                  }
00682948                  
006829e0                  Archive::RaiseError(edi);
0068293b              }
0068292f          }
0068291c      }
006827b0  }

006829ed                                         90 90 90                                                               ...

006829f0  void __thiscall TabooTable::Serialize(class TabooTable* this, class Archive* arg2)

006829f0  {
006829f2      class Archive* edi = arg2;
006829f9      DBObj::Serialize(this, edi);
006829f9      
00682a05      if ((!(edi->m_flags) & 1) != 0)
00682a0a          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>::delete_contents(&this->m_audienceToBannedPatterns.m_intrusiveTable);
00682a0a      
00682a19      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,0>,HashTableData<unsigned long,HashTable<unsigned long,List<PStringBase<char> >,0> > *,SB_Default>(&arg2, &this->m_audienceToBannedPatterns.m_intrusiveTable, edi);
006829f0  }

00682a26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00682a30  uint32_t TabooTableAdaptor::CheckCensorsW(class PStringBase<unsigned short> const* arg1, uint32_t arg2, uint32_t arg3, class PStringBase<unsigned short>* arg4)

00682a30  {
00682a31      int32_t __saved_edi = 0x14;
00682a33      int32_t var_c = 2;
00682a35      int32_t var_10 = 0x11;
00682a37      int32_t eax;
00682a37      uint32_t ecx;
00682a37      int32_t edx;
00682a37      class DBObj* eax_1 = DBObj::GetByEnum(eax, edx, ecx);
00682a37      
00682a43      if (eax_1 == 0)
00682a4b          return 2;
00682a4b      
00682a63      uint32_t result = TabooTable::CheckCensorsW(eax_1, arg1, arg2, arg3, arg4);
00682a68      eax_1->vtable->Release();
00682a75      return result;
00682a30  }

00682a76                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00682a80  class PerfMonCounterInfo* PerfMonCounterInfo::LookupExistingCounterByName(class PStringBase<unsigned short> const* arg1, uint16_t const arg2)

00682a80  {
00682a80      class PerfMonCounterManager* PerfMonCounterManager::Sm_pPerfMonCounterManager_1 = PerfMonCounterManager::Sm_pPerfMonCounterManager;
00682a80      
00682a88      if (PerfMonCounterManager::Sm_pPerfMonCounterManager_1 == 0)
00682a9c          return 0;
00682a9c      
00682a99      return PerfMonCounterManager::LookupExistingCounterByName(PerfMonCounterManager::Sm_pPerfMonCounterManager_1, arg1, arg2);
00682a80  }

00682a9d                                                                                         cc cc cc                               ...

00682aa0  void __thiscall ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>::ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>(class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* this, class PerfMonCounterInfo::PerfMonCounterNameHelp const* arg2)

00682aa0  {
00682aa0      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00682ab5      this->data.m_name.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_1;
00682ab8      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00682aba      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00682ac6      this->data.m_help.m_charbuffer = PStringBase<unsigned short>::s_NullBuffer_2;
00682ac9      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
00682ad2      PerfMonCounterInfo::PerfMonCounterNameHelp::operator=(this, arg2);
00682ad9      this->next = nullptr;
00682adc      this->prev = nullptr;
00682aa0  }

00682ae6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

00682af0  class PStringBase<unsigned short>* __thiscall PerfMonCounterInfo::GetFirstName(class PerfMonCounterInfo const* this, class PStringBase<unsigned short>* __return, uint16_t* arg3)

00682af0  {
00682af0      class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* _head = this->m_CounterNamesList._head;
00682af0      
00682afa      if (_head == 0)
00682afa      {
00682b26          *(uint16_t*)arg3 = 0;
00682b2b          PStringBase<unsigned short>::PStringBase<unsigned short>(__return, &data_794320);
00682b33          return __return;
00682afa      }
00682afa      
00682afc      this = _head->data.m_languageID;
00682b03      *(uint16_t*)arg3 = this;
00682b06      class PSRefBufferCharData<unsigned short>* m_charbuffer = _head->data.m_name.m_charbuffer;
00682b09      __return->m_charbuffer = m_charbuffer;
00682b0f      InterlockedIncrement(&m_charbuffer->m_data[-8]);
00682b18      return __return;
00682af0  }

00682b36                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

00682b40  uint8_t __thiscall PerfMonCounterInfo::LookupByLanguage(class PerfMonCounterInfo const* this, uint16_t const arg2, class PStringBase<unsigned short>* arg3)

00682b40  {
00682b45      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00682b5f      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00682b61      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00682b6b      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00682b73      uint16_t const var_c = arg2;
00682b78      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
00682b7c      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
00682b83      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00682b87      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00682b87      
00682b9e      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_2 != 0x14))
00682ba6          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_2 + -0x14)(1);
00682ba6      
00682bb7      if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_1 != 0x14))
00682bbf          *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_1 + -0x14)(1);
00682bbf      
00682bca      for (class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* i = this->m_CounterNamesList._head; i != 0; i = i->next)
00682bca      {
00682bd8          if (i->data.m_languageID == arg2)
00682bd8          {
00682be5              if (i == 0)
00682be5                  break;
00682be5              
00682c0e              class PSRefBufferCharData<unsigned short>* m_charbuffer = arg3->m_charbuffer;
00682c0e              
00682c13              if (m_charbuffer != i->data.m_name.m_charbuffer)
00682c13              {
00682c24                  if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00682c2d                      *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00682c2d                  
00682c2f                  class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = i->data.m_name.m_charbuffer;
00682c36                  arg3->m_charbuffer = m_charbuffer_1;
00682c3c                  InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00682c13              }
00682c13              
00682c42              PerfMonCounterInfo::PerfMonCounterNameHelp::~PerfMonCounterNameHelp(&var_c);
00682c4a              int32_t eax_10;
00682c4a              eax_10 = 1;
00682c50              return 1;
00682bd8          }
00682bca      }
00682bca      
00682bf0      PStringBase<unsigned short>::set(arg3, &data_794320);
00682bf9      PerfMonCounterInfo::PerfMonCounterNameHelp::~PerfMonCounterNameHelp(&var_c);
00682c01      int32_t eax_6;
00682c01      eax_6 = 0;
00682c07      return 0;
00682b40  }

00682c53                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

00682c60  uint8_t __thiscall List<PerfMonCounterInfo::PerfMonCounterNameHelp>::insert(class List<PerfMonCounterInfo::PerfMonCounterNameHelp>* this, class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* arg2, class PerfMonCounterInfo::PerfMonCounterNameHelp const* arg3)

00682c60  {
00682c65      void* eax = operator new(0x14);
00682c65      
00682c6f      if (eax != 0)
00682c6f      {
00682c78          eax = ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>::ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>(eax, arg3);
00682c78          
00682c7f          if (eax != 0)
00682c7f          {
00682c8b              if (this->_head == 0)
00682c8b              {
00682c8d                  this->_head = eax;
00682c90                  this->_tail = eax;
00682c98                  this->_num_elements += 1;
00682c9c                  return eax;
00682c8b              }
00682c8b              
00682ca3              *(uint32_t*)((char*)eax + 0xc) = arg2;
00682ca9              *(uint32_t*)((char*)eax + 0x10) = arg2->prev;
00682cac              class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* prev = arg2->prev;
00682cac              
00682cb1              if (prev == 0)
00682cb1              {
00682cc5                  this->_head = eax;
00682cc8                  arg2->prev = eax;
00682cd0                  this->_num_elements += 1;
00682cd4                  return eax;
00682cb1              }
00682cb1              
00682cb3              prev->next = eax;
00682cb6              arg2->prev = eax;
00682cbe              this->_num_elements += 1;
00682cc2              return eax;
00682c7f          }
00682c6f      }
00682c6f      
00682c81      eax = 0;
00682c84      return 0;
00682c60  }

00682cd7                                                                       cc cc cc cc cc cc cc cc cc                         .........

00682ce0  uint8_t __thiscall List<PerfMonCounterInfo::PerfMonCounterNameHelp>::insert_sort(class List<PerfMonCounterInfo::PerfMonCounterNameHelp>* this, class PerfMonCounterInfo::PerfMonCounterNameHelp const* arg2)

00682ce0  {
00682ce6      class List<PerfMonCounterInfo::PerfMonCounterNameHelp>* this_1 = this;
00682ce8      class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* i = this_1->_head;
00682ce8      
00682ced      if (i != 0)
00682ced      {
00682cef          this = arg2->m_languageID;
00682cef          
00682cfc          do
00682cfc          {
00682cf5              if (this < i->data.m_languageID)
00682cf5              {
00682d02                  if (i != 0)
00682d98                      return List<PerfMonCounterInfo::PerfMonCounterNameHelp>::insert(this_1, i, arg2);
00682d98                  
00682d02                  break;
00682cf5              }
00682cf5              
00682cf7              i = i->next;
00682cfc          } while (i != 0);
00682ced      }
00682ced      
00682d0b      void* eax = operator new(0x14);
00682d0b      
00682d17      if (eax == 0)
00682d17      {
00682d6d          eax = 0;
00682d70          return 0;
00682d17      }
00682d17      
00682d19      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00682d2b      *(uint32_t*)((char*)eax + 4) = PStringBase<unsigned short>::s_NullBuffer_1;
00682d2e      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_1 - 0x10));
00682d30      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
00682d3c      *(uint32_t*)((char*)eax + 8) = PStringBase<unsigned short>::s_NullBuffer_2;
00682d3f      InterlockedIncrement(((char*)PStringBase<unsigned short>::s_NullBuffer_2 - 0x10));
00682d44      char result = PerfMonCounterInfo::PerfMonCounterNameHelp::operator=(eax, arg2);
00682d4b      *(uint32_t*)((char*)eax + 0xc) = 0;
00682d4e      *(uint32_t*)((char*)eax + 0x10) = 0;
00682d4e      
00682d55      if (this_1->_head == 0)
00682d55      {
00682d57          this_1->_head = eax;
00682d5a          this_1->_tail = eax;
00682d62          this_1->_num_elements += 1;
00682d68          return result;
00682d55      }
00682d55      
00682d73      class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* _tail = this_1->_tail;
00682d76      _tail->next = eax;
00682d79      *(uint32_t*)((char*)eax + 0x10) = _tail;
00682d7c      this_1->_tail = eax;
00682d84      this_1->_num_elements += 1;
00682d8a      return _tail;
00682ce0  }

00682d9b                                                                                   cc cc cc cc cc                             .....

00682da0  uint8_t __thiscall PerfMonCounterInfo::AddLanguageNameAndHelp(class PerfMonCounterInfo* this, uint16_t const arg2, class PStringBase<unsigned short> const* arg3, class PStringBase<unsigned short> const* arg4)

00682da0  {
00682db1      class PSRefBufferCharData<unsigned short>* m_charbuffer = arg3->m_charbuffer;
00682dbe      uint16_t const var_c = arg2;
00682dc7      InterlockedIncrement(&m_charbuffer->m_data[-8]);
00682dcd      class PSRefBufferCharData<unsigned short>* m_charbuffer_1 = arg4->m_charbuffer;
00682dd7      InterlockedIncrement(&m_charbuffer_1->m_data[-8]);
00682dd9      class ListNode<PerfMonCounterInfo::PerfMonCounterNameHelp>* eax_2 = this->m_CounterNamesList._head;
00682dd9      
00682de1      if (eax_2 == 0)
00682de1      {
00682e06      label_682e06:
00682e06          arg2 = List<PerfMonCounterInfo::PerfMonCounterNameHelp>::insert_sort(&this->m_CounterNamesList, &var_c);
00682de1      }
00682de1      else
00682de1      {
00682deb          while (eax_2->data.m_languageID != arg2)
00682deb          {
00682ded              eax_2 = eax_2->next;
00682ded              
00682df2              if (eax_2 == 0)
00682df2                  goto label_682e06;
00682deb          }
00682deb          
00682e50          arg2 = 0;
00682de1      }
00682de1      
00682e1f      if ((InterlockedDecrement(&m_charbuffer_1->m_data[-8]) == 0 && m_charbuffer_1 != 0x14))
00682e27          *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00682e27      
00682e38      if ((InterlockedDecrement(&m_charbuffer->m_data[-8]) == 0 && m_charbuffer != 0x14))
00682e40          *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00682e40      
00682e42      int32_t eax_6;
00682e42      eax_6 = arg2;
00682e4d      return eax_6;
00682da0  }

00682e57                                                                       cc cc cc cc cc cc cc cc cc                         .........

00682e60  void __thiscall PerfMonCounterInfo::PerfMonCounterInfo(class PerfMonCounterInfo* this, enum PerfMonCounterInfo::EPerfCounterType const arg2, class PStringBase<unsigned short> const* arg3, class PStringBase<unsigned short> const* arg4, uint16_t const arg5)

00682e60  {
00682e72      this->m_cRef = 1;
00682e79      this->vtable = 0x7febf0;
00682e7f      this->m_CounterType = 0x10100;
00682e8a      this->m_CounterNamesList.vtable = 0x7c9e90;
00682e91      this->m_CounterNamesList._head = nullptr;
00682e94      this->m_CounterNamesList._tail = nullptr;
00682e97      this->m_CounterNamesList._num_elements = 0;
00682e9c      this->m_fCounterExistedPreviously = 0;
00682e9f      PerfMonCounterInfo::AddLanguageNameAndHelp(this, arg5, arg3, arg4);
00682e9f      
00682eaa      if (arg2 == NORMAL)
00682ec8          this->m_CounterType = 0x10100;
00682eaa      else if (arg2 == 1)
00682ebf          this->m_CounterType = 0x100;
00682eaf      else if (arg2 == 2)
00682eb6          this->m_CounterType = 0x10410500;
00682eb6      
00682ed5      if (arg3->m_charbuffer->m_data[0x7ffffffffffffffe] != 1)
00682ed5      {
00682ed7          class PerfMonCounterManager* PerfMonCounterManager::Sm_pPerfMonCounterManager_1 = PerfMonCounterManager::Sm_pPerfMonCounterManager;
00682ed7          
00682edf          if (PerfMonCounterManager::Sm_pPerfMonCounterManager_1 != 0)
00682ee2              PerfMonCounterManager::AddCounter(PerfMonCounterManager::Sm_pPerfMonCounterManager_1, this);
00682ed5      }
00682e60  }

00682eef                                               cc                                                                 .

00682ef0  void* __thiscall PerfMonCounterInfo::`scalar deleting destructor'(class PerfMonCounterInfo* this, uint32_t arg2)

00682ef0  {
00682ef6      List<PerfMonCounterInfo::PerfMonCounterNameHelp>::~List<PerfMonCounterInfo::PerfMonCounterNameHelp>(&this->m_CounterNamesList);
00682f00      this->vtable = 0x7942f4;
00682f00      
00682f06      if ((arg2 & 1) != 0)
00682f09          operator delete(this);
00682f09      
00682f14      return this;
00682ef0  }

00682f17                                                                       cc cc cc cc cc cc cc cc cc                         .........

00682f20  void __fastcall PerfMonCounterManager::CrashCleanup(class PerfMonCounterManager* this)

00682f20  {
00682f22      this->m_pRpcServer = nullptr;
00682f25      PerfMonCounterManager::Sm_pPerfMonCounterManager = nullptr;
00682f20  }

00682f2b                                   cc cc cc cc cc                                                             .....

00682f30  uint32_t __fastcall GetNumberPerfCounters(void* arg1, uint32_t* arg2)

00682f30  {
00682f30      class PerfMonCounterManager* PerfMonCounterManager::Sm_pPerfMonCounterManager_1 = PerfMonCounterManager::Sm_pPerfMonCounterManager;
00682f37      uint32_t* edx;
00682f37      
00682f37      if (PerfMonCounterManager::Sm_pPerfMonCounterManager_1 != 0)
00682f37      {
00682f3c          *(uint32_t*)edx = PerfMonCounterManager::Sm_pPerfMonCounterManager_1->m_counters._num_elements;
00682f43          return 1;
00682f37      }
00682f37      
00682f44      *(uint32_t*)edx = 0;
00682f4c      return 0;
00682f30  }

00682f4d                                         cc cc cc                                                               ...

00682f50  uint8_t __thiscall List<PerfMonCounterInfo *>::push_back(class List<PerfMonCounterInfo *>* this, class PerfMonCounterInfo** arg2)

00682f50  {
00682f55      void* eax = operator new(0xc);
00682f55      
00682f61      if (eax == 0)
00682f61      {
00682f88          eax = 0;
00682f8b          return 0;
00682f61      }
00682f61      
00682f69      *(uint32_t*)eax = *(uint32_t*)arg2;
00682f6b      *(uint32_t*)((char*)eax + 4) = 0;
00682f6e      *(uint32_t*)((char*)eax + 8) = 0;
00682f6e      
00682f74      if (this->_head == 0)
00682f74      {
00682f76          this->_head = eax;
00682f79          this->_tail = eax;
00682f81          this->_num_elements += 1;
00682f85          return eax;
00682f74      }
00682f74      
00682f8e      class ListNode<PerfMonCounterInfo *>* _tail = this->_tail;
00682f91      _tail->next = eax;
00682f94      *(uint32_t*)((char*)eax + 8) = _tail;
00682f97      this->_tail = eax;
00682f9f      this->_num_elements += 1;
00682fa3      return eax;
00682f50  }

00682fa6                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

00682fb0  class PerfMonCounterInfo* __thiscall PerfMonCounterManager::LookupExistingCounterByName(class PerfMonCounterManager* this, class PStringBase<unsigned short> const* arg2, uint16_t const arg3)

00682fb0  {
00682fb0      class PerfMonCounterManager* var_4 = this;
00682fb1      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00682fb9      class ListNode<PerfMonCounterInfo *>* i = this->m_counters._head;
00682fbc      var_4 = PStringBase<unsigned short>::s_NullBuffer_1;
00682fc5      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00682fcd      class PerfMonCounterManager* ecx_3;
00682fcd      
00682fcd      if (i == 0)
0068306e          ecx_3 = var_4;
00682fcd      else
00682fcd      {
00683031          do
00683031          {
00682ff3              if (i->data->vtable->LookupByLanguage(arg3, &var_4) == 0)
00683028                  ecx_3 = var_4;
00682ff3              else
00682ff3              {
00682ff5                  class PSRefBufferCharData<unsigned short>* m_charbuffer = arg2->m_charbuffer;
00682ffb                  ecx_3 = var_4;
00682ffb                  
00683002                  if (m_charbuffer->m_data[0x7ffffffffffffffe] == ecx_3->vtable)
00683002                  {
00683004                      int32_t edx_3 = *(int32_t*)((char*)m_charbuffer + -8);
00683007                      int32_t edi_1 = *(int32_t*)((char*)ecx_3 + -8);
00683007                      
00683016                      if (((edx_3 == edi_1 || edx_3 == 0xffffffff) || edi_1 == 0xffffffff))
00683016                      {
00683021                          int32_t eax_3;
00683021                          eax_3 = wcscmp(m_charbuffer, ecx_3) == 0;
00683021                          
00683026                          if (eax_3 != 0)
00683026                          {
0068303b                              InterlockedIncrement(&i->data->m_cRef);
00683045                              class PerfMonCounterInfo* data = i->data;
00683047                              void* __offset(PerfMonCounterManager, -0x14) edi_3 = ((char*)var_4 - 0x14);
00683047                              
0068305a                              if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
00683062                                  *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
00683062                              
0068306b                              return data;
00683026                          }
00683026                          
00683028                          ecx_3 = var_4;
00683016                      }
00683002                  }
00682ff3              }
00682ff3              
0068302c              i = i->next;
00683031          } while (i != 0);
00682fcd      }
00682fcd      
00683085      if ((InterlockedDecrement(((char*)ecx_3 - 0x10)) == 0 && ecx_3 != 0x14))
0068308d          *(uint32_t*)*(int32_t*)((char*)ecx_3 + -0x14)(1);
0068308d      
00683096      return 0;
00682fb0  }

00683099                                                                             cc cc cc cc cc cc cc                           .......

006830a0  uint8_t __thiscall PerfMonCounterManager::AddCounter(class PerfMonCounterManager* this, class PerfMonCounterInfo* arg2)

006830a0  {
006830a6      class RpcServer* m_pRpcServer = this->m_pRpcServer;
006830a6      
006830b7      if (((m_pRpcServer != 0 && m_pRpcServer->m_fServerStarted != 0) || this->m_fInstalling != 0))
006830b7      {
006830b9          m_pRpcServer = 0;
006830bf          return 0;
006830b7      }
006830b7      
006830c3      class PerfMonCounterInfo* edi = arg2;
006830d3      int32_t var_4 = 0;
006830db      class PStringBase<unsigned short> __return;
006830db      PerfMonCounterInfo::GetFirstName(edi, &__return, &var_4);
006830ec      class PerfMonCounterInfo* eax = PerfMonCounterManager::LookupExistingCounterByName(this, &__return, ((int16_t)var_4));
006830ec      
006830f3      if (eax != 0)
006830f3      {
006830f7          ReferenceCountTemplate<1048576,0>::Release(eax);
00683100          int32_t* esi_2 = (__return - 0x14);
00683100          
00683113          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0068311b              **(uint32_t**)esi_2(1);
0068311b          
0068311e          int32_t eax_1;
0068311e          eax_1 = 0;
00683124          return 0;
006830f3      }
006830f3      
0068312c      InterlockedIncrement(&edi->m_cRef);
0068313a      uint8_t eax_2 = List<PerfMonCounterInfo *>::push_back(&this->m_counters, &arg2);
00683143      int32_t* esi_4 = (__return - 0x14);
0068314a      int32_t ebx;
0068314a      ebx = eax_2;
0068314a      
00683158      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00683160          **(uint32_t**)esi_4(1);
00683160      
00683162      int32_t eax_3;
00683162      eax_3 = ebx;
0068316a      return eax_3;
006830a0  }

0068316d                                         cc cc cc                                                               ...

00683170  void __fastcall SmartArray<__int64,1>::Reset(class SmartArray<__int64,1>* this)

00683170  {
00683173      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00683187      this->m_num = 0;
00683187      
0068318a      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0068318a      {
0068318f          operator delete[](this->m_data);
00683197          this->m_data = 0;
00683199          this->m_sizeAndDeallocate = 0;
0068319e          return;
0068318a      }
0068318a      
006831a1      if (this->m_data != 0)
006831a1      {
006831a3          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
006831a8          int32_t eax_1 = (eax - 1);
006831a8          
006831ab          if ((eax - 1) >= 0)
006831ab          {
006831bd              int32_t temp1_1;
006831bd              
006831bd              do
006831bd              {
006831b0                  temp1_1 = eax_1;
006831b0                  eax_1 -= 1;
006831b3                  int64_t* m_data = this->m_data;
006831b5                  m_data[(eax_1 + 1)] = 0;
006831b9                  *(uint32_t*)(&m_data[eax_1] + 0xc) = 0;
006831bd              } while ((temp1_1 - 1) >= 0);
006831ab          }
006831a1      }
00683170  }

006831c2        cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                    ..............

006831d0  uint8_t __fastcall PerfMonCounterManager::ShutdownAndResetInternal(class PerfMonCounterManager* this)

006831d0  {
006831d6      class RpcServer* m_pRpcServer = this->m_pRpcServer;
006831d6      
006831dd      if (m_pRpcServer != 0)
006831dd      {
006831e1          RpcServer::~RpcServer(m_pRpcServer);
006831e7          operator delete(m_pRpcServer);
006831ef          this->m_pRpcServer = nullptr;
006831dd      }
006831dd      
006831fb      void* _head;
006831fb      
006831fb      while (this->m_counters._head != 0)
006831fb      {
006831fd          _head = this->m_counters._head;
006831fd          
00683202          if (_head != 0)
00683202          {
00683204              class ListNode<PerfMonCounterInfo *>* ecx_1 = *(uint32_t*)((char*)_head + 4);
00683209              this->m_counters._head = ecx_1;
00683209              
0068320c              if (ecx_1 == 0)
00683213                  this->m_counters._tail = nullptr;
0068320c              else
0068320e                  ecx_1->prev = nullptr;
0068320e              
00683216              int32_t* edi = *(uint32_t*)_head;
00683219              operator delete(_head);
0068321e              this->m_counters._num_elements -= 1;
0068321e              
0068322d              if ((InterlockedDecrement(&edi[1]) == 0 && edi != 0))
00683239                  **(uint32_t**)edi(1);
00683202          }
006831fb      }
006831fb      
00683240      _head = 1;
00683243      return 1;
006831d0  }

00683244              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

00683250  uint8_t __thiscall SmartArray<__int64,1>::grow(class SmartArray<__int64,1>* this, uint32_t arg2)

00683250  {
0068325b      if (arg2 < this->m_num)
0068325b      {
006832ee          int32_t eax;
006832ee          eax = 0;
006832f1          return 0;
0068325b      }
0068325b      
0068326b      if (arg2 > (this->m_sizeAndDeallocate & 0x7fffffff))
0068326b      {
0068326f          if (arg2 != 0)
0068326f          {
0068328b              void* edi = operator new[]((arg2 << 3));
00683292              void* eax_3;
00683292              
00683292              if (edi == 0)
00683292              {
006832e7                  eax_3 = 0;
006832ea                  return 0;
00683292              }
00683292              
00683297              if (this->m_data != 0)
00683297              {
00683299                  uint32_t m_num = this->m_num;
0068329c                  int32_t eax_4 = (m_num - 1);
0068329c                  
0068329f                  if ((m_num - 1) >= 0)
0068329f                  {
006832b6                      int32_t temp2_1;
006832b6                      
006832b6                      do
006832b6                      {
006832a1                          temp2_1 = eax_4;
006832a1                          eax_4 -= 1;
006832a4                          int64_t* m_data = this->m_data;
006832aa                          *(uint32_t*)(((char*)edi + (eax_4 << 3)) + 8) = m_data[(eax_4 + 1)];
006832b2                          *(uint32_t*)(((char*)edi + (eax_4 << 3)) + 0xc) = *(uint32_t*)(&m_data[eax_4] + 0xc);
006832b6                      } while ((temp2_1 - 1) >= 0);
0068329f                  }
0068329f                  
006832c5                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
006832ca                      operator delete[](this->m_data);
00683297              }
00683297              
006832d2              this->m_data = edi;
006832db              this->m_sizeAndDeallocate = (arg2 | 0x80000000);
006832df              eax_3 = 1;
006832e2              return 1;
0068326f          }
0068326f          
00683271          SmartArray<__int64,1>::Reset(this);
0068326b      }
0068326b      
00683277      int32_t eax_2;
00683277      eax_2 = 1;
0068327a      return 1;
00683250  }

006832f4                                                              cc cc cc cc cc cc cc cc cc cc cc cc                      ............

00683300  void __fastcall List<PerfMonCounterInfo *>::flush(class List<PerfMonCounterInfo *>* this)

00683300  {
00683306      while (true)
00683306      {
00683306          class ListNode<PerfMonCounterInfo *>* _head = this->_head;
00683306          
0068330b          if (_head == 0)
0068330b              break;
0068330b          
0068330d          class ListNode<PerfMonCounterInfo *>* next = _head->next;
00683312          this->_head = next;
00683312          
00683315          if (next == 0)
0068331c              this->_tail = nullptr;
00683315          else
00683317              next->prev = nullptr;
00683317          
00683321          if (_head != 0)
00683324              operator delete(_head);
00683324          
0068332c          this->_num_elements -= 1;
00683306      }
00683300  }

00683335                                                                 cc cc cc cc cc cc cc cc cc cc cc                       ...........

00683340  void* __thiscall List<PerfMonCounterInfo *>::`scalar deleting destructor'(class List<PerfMonCounterInfo *>* this, uint32_t arg2)

00683340  {
00683343      this->vtable = &List<class PerfMonCounterInfo*>::`vftable';
00683349      List<PerfMonCounterInfo *>::flush(this);
00683349      
00683353      if ((arg2 & 1) != 0)
00683356          operator delete(this);
00683356      
00683361      return this;
00683340  }

00683364              cc cc cc cc cc cc cc cc cc cc cc cc                                                      ............

00683370  uint32_t __thiscall PerfMonCounterManager::FillInCounterTypes(class PerfMonCounterManager* this, class SmartArray<unsigned long,1>* arg2)

00683370  {
00683370      class PerfMonCounterManager* this_1 = this;
00683372      class ListNode<PerfMonCounterInfo *>* _head = this->m_counters._head;
00683379      int32_t var_4 = 0;
0068337d      int32_t eax;
0068337d      
0068337d      if (_head == 0)
00683418          return eax;
0068338a      class ListNode<PerfMonCounterInfo *>* next = _head;
0068338a      
0068340d      do
0068340d      {
00683392          uint32_t m_CounterType = next->data->m_CounterType;
00683398          int32_t eax_3 = (arg2->m_sizeAndDeallocate & 0x7fffffff);
006833a0          uint8_t eax_8;
006833a0          
006833a0          if (arg2->m_num >= eax_3)
006833a0          {
006833a2              uint32_t edx_1 = (eax_3 + 1);
006833a2              
006833a8              if (edx_1 <= 8)
006833aa                  edx_1 = 8;
006833a8              else if (edx_1 <= 0x4000)
006833b7              {
006833d6                  int32_t eflags_1;
006833d6                  char eax_7;
006833d6                  eax_7 = __bsr_gprv_memv(edx_1);
006833e2                  int32_t esi_1 = (1 << eax_7);
006833e2                  
006833e6                  if (edx_1 > esi_1)
006833e8                      edx_1 = (esi_1 * 2);
006833b7              }
006833b7              else
006833b7              {
006833bb                  int32_t eax_5 = (edx_1 & 0x3fff);
006833bb                  
006833c0                  if (eax_5 != 0)
006833c9                      edx_1 += (0x4000 - eax_5);
006833b7              }
006833b7              
006833ee              eax_8 = SmartArray<unsigned long,1>::grow(arg2, edx_1);
006833a0          }
006833a0          
006833f5          if ((arg2->m_num < eax_3 || eax_8 != 0))
006833f5          {
006833fa              arg2->m_data[arg2->m_num] = m_CounterType;
006833ff              arg2->m_num += 1;
006833f5          }
006833f5          
00683403          next = next->next;
00683406          var_4 += 1;
0068340d      } while (next != 0);
0068340d      
0068340f      return var_4;
00683370  }

0068341b                                                                                   cc cc cc cc cc                             .....

00683420  uint32_t __thiscall PerfMonCounterManager::FillInCounterValues(class PerfMonCounterManager* this, class SmartArray<__int64,1>* arg2)

00683420  {
00683424      class ListNode<PerfMonCounterInfo *>* i = this->m_counters._head;
0068342b      int32_t var_c = 0;
0068342f      int32_t eax;
0068342f      
0068342f      if (i == 0)
006834de          return eax;
006834de      
006834cd      do
006834cd      {
00683444          int32_t eax_2;
00683444          int32_t edx_1;
00683444          eax_2 = i->data->vtable->GetValueAsInt64();
0068344c          int32_t eax_4 = (arg2->m_sizeAndDeallocate & 0x7fffffff);
00683458          uint8_t eax_9;
00683458          
00683458          if (arg2->m_num >= eax_4)
00683458          {
0068345a              uint32_t edx_2 = (eax_4 + 1);
0068345a              
00683460              if (edx_2 <= 8)
00683462                  edx_2 = 8;
00683460              else if (edx_2 <= 0x4000)
0068346f              {
0068348e                  int32_t eflags_1;
0068348e                  char eax_8;
0068348e                  eax_8 = __bsr_gprv_memv(edx_2);
0068349a                  int32_t edi_1 = (1 << eax_8);
0068349a                  
0068349e                  if (edx_2 > edi_1)
006834a0                      edx_2 = (edi_1 * 2);
0068346f              }
0068346f              else
0068346f              {
00683473                  int32_t eax_6 = (edx_2 & 0x3fff);
00683473                  
00683478                  if (eax_6 != 0)
00683481                      edx_2 += (0x4000 - eax_6);
0068346f              }
0068346f              
006834a6              eax_9 = SmartArray<__int64,1>::grow(arg2, edx_2);
00683458          }
00683458          
006834ad          if ((arg2->m_num < eax_4 || eax_9 != 0))
006834ad          {
006834af              uint32_t m_num = arg2->m_num;
006834b2              int64_t* m_data = arg2->m_data;
006834b8              m_data[m_num] = eax_2;
006834bb              *(uint32_t*)(&m_data[m_num] + 4) = edx_1;
006834bf              arg2->m_num += 1;
006834ad          }
006834ad          
006834c3          i = i->next;
006834c6          var_c += 1;
006834cd      } while (i != 0);
006834cd      
006834d3      return var_c;
00683420  }

006834e1     cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc                                                   ...............

006834f0  uint32_t __fastcall GetPerfCounterDescriptions(void* arg1, uint32_t arg2, uint32_t* arg3)

006834f0  {
006834f9      int32_t edx;
006834f9      int32_t esi = (edx << 2);
00683513      __builtin_memset(__builtin_memset(arg1, 0, ((esi >> 2) << 2)), 0, (esi & 3));
00683515      class PerfMonCounterManager* PerfMonCounterManager::Sm_pPerfMonCounterManager_1 = PerfMonCounterManager::Sm_pPerfMonCounterManager;
00683515      
0068351e      if (PerfMonCounterManager::Sm_pPerfMonCounterManager_1 != 0)
0068351e      {
00683520          uint32_t _num_elements = PerfMonCounterManager::Sm_pPerfMonCounterManager_1->m_counters._num_elements;
00683523          void* var_c = nullptr;
00683527          int32_t var_8_1 = 0;
0068352b          int32_t var_4_1 = 0;
0068352b          
0068353b          if (SmartArray<unsigned long,1>::grow(&var_c, _num_elements) != 0)
0068353b          {
00683570              PerfMonCounterManager::FillInCounterTypes(PerfMonCounterManager::Sm_pPerfMonCounterManager, &var_c);
00683575              void* eax_4 = var_c;
00683584              int32_t esi_2;
00683584              int32_t edi_3;
00683584              edi_3 = __builtin_memcpy(arg1, eax_4, ((esi >> 2) << 2));
0068358b              __builtin_memcpy(edi_3, esi_2, (esi & 3));
0068358b              
0068359d              if ((var_8_1 & 0x80000000) == 0x80000000)
006835a0                  operator delete[](eax_4);
006835a0              
006835b3              return 1;
0068353b          }
0068353b          
0068354b          if ((var_8_1 & 0x80000000) == 0x80000000)
00683552              operator delete[](var_c);
0068351e      }
0068351e      
00683562      return 0;
006834f0  }

006835b6                                                                    cc cc cc cc cc cc cc cc cc cc                        ..........

006835c0  uint32_t __fastcall GetPerfCounterValues(void* arg1, uint32_t arg2, uint64_t* arg3)

006835c0  {
006835c9      int32_t edx;
006835c9      int32_t esi = (edx << 3);
006835e3      __builtin_memset(__builtin_memset(arg1, 0, ((esi >> 2) << 2)), 0, (esi & 3));
006835e5      class PerfMonCounterManager* PerfMonCounterManager::Sm_pPerfMonCounterManager_1 = PerfMonCounterManager::Sm_pPerfMonCounterManager;
006835e5      
006835ee      if (PerfMonCounterManager::Sm_pPerfMonCounterManager_1 != 0)
006835ee      {
006835f0          uint32_t _num_elements = PerfMonCounterManager::Sm_pPerfMonCounterManager_1->m_counters._num_elements;
006835f3          void* var_c = nullptr;
006835f7          int32_t var_8_1 = 0;
006835fb          int32_t var_4_1 = 0;
006835fb          
0068360b          if (SmartArray<__int64,1>::grow(&var_c, _num_elements) != 0)
0068360b          {
00683640              PerfMonCounterManager::FillInCounterValues(PerfMonCounterManager::Sm_pPerfMonCounterManager, &var_c);
00683645              void* eax_4 = var_c;
00683654              int32_t esi_2;
00683654              int32_t edi_3;
00683654              edi_3 = __builtin_memcpy(arg1, eax_4, ((esi >> 2) << 2));
0068365b              __builtin_memcpy(edi_3, esi_2, (esi & 3));
0068365b              
0068366d              if ((var_8_1 & 0x80000000) == 0x80000000)
00683670                  operator delete[](eax_4);
00683670              
00683683              return 1;
0068360b          }
0068360b          
0068361b          if ((var_8_1 & 0x80000000) == 0x80000000)
00683622              operator delete[](var_c);
006835ee      }
006835ee      
00683632      return 0;
006835c0  }

00683686                    cc cc cc cc cc cc cc cc cc cc                                                        ..........

00683690  void* __thiscall PerfMonCounterManager::`scalar deleting destructor'(class PerfMonCounterManager* this, uint32_t arg2)

00683690  {
00683693      this->vtable = 0x7fec24;
00683699      PerfMonCounterManager::ShutdownAndResetInternal(this);
006836a1      PerfMonCounterManager::Sm_pPerfMonCounterManager = nullptr;
0068369e      this->m_counters.vtable = &List<class PerfMonCounterInfo*>::`vftable';
006836b1      List<PerfMonCounterInfo *>::flush(&this->m_counters);
006836b8      CrashCleaner::~CrashCleaner(this);
006836b8      
006836c2      if ((arg2 & 1) != 0)
006836c5          operator delete(this);
006836c5      
006836d0      return this;
00683690  }

006836d3                                                           cc cc cc cc cc cc cc cc cc cc cc cc cc                     .............

006836e0  void __stdcall turbineperfmonrpcserverapi_GetNumberPerfCounters(struct _RPC_MESSAGE* arg1)

006836e0  {
006836e3      int32_t var_8 = 0xffffffff;
006836e5      int32_t var_c = 0x7fed10;
006836ea      int32_t (* var_10)() = j__except_handler3;
006836f5      TEB* fsbase;
006836f5      int32_t var_14 = *(uint32_t*)fsbase;
006836f6      *(uint32_t*)fsbase = &var_14;
00683706      int32_t __saved_edi;
00683706      int32_t* var_1c = &__saved_edi;
00683719      void pStubMsg;
00683719      NdrServerInitializeNew(arg1, &pStubMsg, &turbineperfmonrpcserverapi_StubDesc);
0068371f      void* Handle = arg1->Handle;
00683721      int32_t var_8_1 = 0;
00683728      int32_t var_8_2 = 1;
00683728      
0068373b      if (((uint32_t)((int16_t)arg1->DataRepresentation)) != 0x10)
00683749          NdrConvert(&pStubMsg, &__MIDL_ProcFormatString.Format);
00683749      
00683758      int32_t var_100;
00683758      uint32_t* eax_3 = ((var_100 + 3) & 0xfffffffc);
0068375b      uint32_t* var_100_1 = eax_3;
00683763      uint32_t* var_28 = eax_3;
00683769      void* var_100_2 = &eax_3[1];
00683775      int32_t var_f8;
00683775      
00683775      if (&eax_3[1] > var_f8)
00683775      {
0068377c          RpcRaiseException(0x6f7);
0068377c          /* no return */
00683775      }
00683775      
00683782      int32_t var_8_3 = 0;
0068378d      uint32_t eax_5 = GetNumberPerfCounters(Handle, eax_3);
00683794      uint32_t var_20 = eax_5;
0068379c      int32_t var_f0 = 0x24;
006837a2      arg1->BufferLength = 0x24;
006837a6      enum RPC_STATUS exception = I_RpcGetBuffer(arg1);
006837ac      enum RPC_STATUS exception_1 = exception;
006837ac      
006837b1      if (exception != 0)
006837b1      {
006837b4          RpcRaiseException(exception);
006837b4          /* no return */
006837b1      }
006837b1      
006837ba      void* Buffer = arg1->Buffer;
006837bd      void* Buffer_1 = Buffer;
006837c6      uint32_t* eax_7 = (((char*)Buffer + 3) & 0xfffffffc);
006837d1      *(uint32_t*)eax_7 = *(uint32_t*)eax_3;
006837dc      void* var_100_4 = &eax_7[1];
006837e5      uint32_t* eax_11 = (((char*)eax_7 + 7) & 0xfffffffc);
006837ee      *(uint32_t*)eax_11 = eax_5;
006837f9      void* var_100_6 = &eax_11[1];
006837ff      int32_t var_8_4 = 0xffffffff;
00683806      sub_683867();
0068380e      arg1->BufferLength = (&eax_11[1] - arg1->Buffer);
00683814      *(uint32_t*)fsbase = var_14;
006836e0  }

00683824              8b 55 ec 8b 02 8b 00 3d 05 00 00 c0 74 18 3d 02 00 00 80 74 11 3d f7 06 00 00 74 0a      .U.....=....t.=....t.=....t.
00683840  3d c6 06 00 00 74 03 33 c0 c3 b8 01 00 00 00 c3 8b 65 e8 68 f7 06 00 00 ff 15 08 24 79 00 8b 75  =....t.3.........e.h.......$y..u
00683860  08 8b 85 04 ff ff ff                                                                             .......

00683867  int32_t sub_683867()

00683867  {
00683867      return;
00683867  }

00683868                          cc cc cc cc cc cc cc cc                                                          ........

00683870  void __stdcall turbineperfmonrpcserverapi_GetPerfCounterDescriptions(struct _RPC_MESSAGE* arg1)

00683870  {
00683873      int32_t var_8 = 0xffffffff;
00683875      int32_t var_c = 0x7fed28;
0068387a      int32_t (* var_10)() = j__except_handler3;
00683885      TEB* fsbase;
00683885      int32_t var_14 = *(uint32_t*)fsbase;
00683886      *(uint32_t*)fsbase = &var_14;
00683896      int32_t __saved_edi;
00683896      int32_t* var_1c = &__saved_edi;
006838a9      void pStubMsg;
006838a9      NdrServerInitializeNew(arg1, &pStubMsg, &turbineperfmonrpcserverapi_StubDesc);
006838af      void* Handle = arg1->Handle;
006838b6      int32_t var_20 = 0;
006838b9      int32_t var_8_1 = 0;
006838bc      int32_t var_8_2 = 1;
006838bc      
006838cf      if (((uint32_t)((int16_t)arg1->DataRepresentation)) != 0x10)
006838dd          NdrConvert(&pStubMsg, &*(uint29_t*)__MIDL_ProcFormatString.Format[8]);
006838dd      
006838ec      int32_t var_108;
006838ec      int32_t* eax_3 = ((var_108 + 3) & 0xfffffffc);
006838ef      int32_t* var_108_1 = eax_3;
00683900      int32_t var_100;
00683900      
00683900      if (&eax_3[1] > var_100)
00683900      {
00683907          RpcRaiseException(0x6f7);
00683907          /* no return */
00683900      }
00683900      
0068390d      uint32_t esi = *(uint32_t*)eax_3;
0068390f      uint32_t var_2c = esi;
00683912      void* var_108_2 = &eax_3[1];
00683912      
0068391a      if (&eax_3[1] > var_100)
0068391a      {
00683921          RpcRaiseException(0x6f7);
00683921          /* no return */
0068391a      }
0068391a      
00683927      int32_t var_8_3 = 0;
00683939      void* pMemory = NdrAllocate(&pStubMsg, (esi << 2));
00683941      void* pMemory_1 = pMemory;
0068394a      uint32_t eax_4 = GetPerfCounterDescriptions(Handle, esi, pMemory);
00683952      uint32_t var_f8 = 8;
0068395c      uint32_t var_d0 = esi;
0068396f      NdrConformantArrayBufferSize(&pStubMsg, pMemory, &*(uint27_t*)__MIDL_TypeFormatString.Format[6]);
0068397b      arg1->BufferLength = var_f8;
0068397f      enum RPC_STATUS exception = I_RpcGetBuffer(arg1);
00683985      enum RPC_STATUS exception_1 = exception;
00683985      
0068398a      if (exception != 0)
0068398a      {
0068398d          RpcRaiseException(exception);
0068398d          /* no return */
0068398a      }
0068398a      
00683993      void* Buffer = arg1->Buffer;
0068399c      uint32_t var_d0_1 = esi;
006839af      NdrConformantArrayMarshall(&pStubMsg, pMemory, &*(uint27_t*)__MIDL_TypeFormatString.Format[6]);
006839be      uint32_t* eax_7 = (((char*)Buffer + 3) & 0xfffffffc);
006839ca      *(uint32_t*)eax_7 = eax_4;
006839cc      void* var_108_5 = &eax_7[1];
006839d3      int32_t var_8_4 = 0xffffffff;
006839da      sub_683a3e(pMemory);
006839e8      arg1->BufferLength = ((char*)var_108_5 - arg1->Buffer);
006839ee      *(uint32_t*)fsbase = var_14;
00683870  }

006839fe                                                                                            8b 55                                .U
00683a00  ec 8b 02 8b 00 3d 05 00 00 c0 74 18 3d 02 00 00 80 74 11 3d f7 06 00 00 74 0a 3d c6 06 00 00 74  .....=....t.=....t.=....t.=....t
00683a20  03 33 c0 c3 b8 01 00 00 00 c3 8b 65 e8 68 f7 06 00 00 ff 15 08 24 79 00 8b 5d 08 8b 7d e4        .3.........e.h.......$y..]..}.

00683a3e  void sub_683a3e(int32_t arg1 @ edi)

00683a3e  {
00683a40      int32_t ebp;
00683a40      
00683a40      if (arg1 != 0)
00683a43          *(uint32_t*)(ebp - 0xbc)(arg1);
00683a3e  }

00683a4a                                cc cc cc cc cc cc                                                            ......

00683a50  void __stdcall turbineperfmonrpcserverapi_GetPerfCounterValues(struct _RPC_MESSAGE* arg1)

00683a50  {
00683a53      int32_t var_8 = 0xffffffff;
00683a55      int32_t var_c = 0x7fed40;
00683a5a      int32_t (* var_10)() = j__except_handler3;
00683a65      TEB* fsbase;
00683a65      int32_t var_14 = *(uint32_t*)fsbase;
00683a66      *(uint32_t*)fsbase = &var_14;
00683a76      int32_t __saved_edi;
00683a76      int32_t* var_1c = &__saved_edi;
00683a89      void pStubMsg;
00683a89      NdrServerInitializeNew(arg1, &pStubMsg, &turbineperfmonrpcserverapi_StubDesc);
00683a8f      void* Handle = arg1->Handle;
00683a96      int32_t var_20 = 0;
00683a99      int32_t var_8_1 = 0;
00683a9c      int32_t var_8_2 = 1;
00683a9c      
00683aaf      if (((uint32_t)((int16_t)arg1->DataRepresentation)) != 0x10)
00683abd          NdrConvert(&pStubMsg, &*(uint29_t*)__MIDL_ProcFormatString.Format[0x12]);
00683abd      
00683acc      int32_t var_108;
00683acc      int32_t* eax_3 = ((var_108 + 3) & 0xfffffffc);
00683acf      int32_t* var_108_1 = eax_3;
00683ae0      int32_t var_100;
00683ae0      
00683ae0      if (&eax_3[1] > var_100)
00683ae0      {
00683ae7          RpcRaiseException(0x6f7);
00683ae7          /* no return */
00683ae0      }
00683ae0      
00683aed      uint32_t esi = *(uint32_t*)eax_3;
00683aef      uint32_t var_2c = esi;
00683af2      void* var_108_2 = &eax_3[1];
00683af2      
00683afa      if (&eax_3[1] > var_100)
00683afa      {
00683b01          RpcRaiseException(0x6f7);
00683b01          /* no return */
00683afa      }
00683afa      
00683b07      int32_t var_8_3 = 0;
00683b19      void* pMemory = NdrAllocate(&pStubMsg, (esi << 3));
00683b21      void* pMemory_1 = pMemory;
00683b2a      uint32_t eax_4 = GetPerfCounterValues(Handle, esi, pMemory);
00683b32      uint32_t var_f8 = 8;
00683b3c      uint32_t var_d0 = esi;
00683b4f      NdrConformantArrayBufferSize(&pStubMsg, pMemory, &*(uint27_t*)__MIDL_TypeFormatString.Format[0x10]);
00683b5b      arg1->BufferLength = var_f8;
00683b5f      enum RPC_STATUS exception = I_RpcGetBuffer(arg1);
00683b65      enum RPC_STATUS exception_1 = exception;
00683b65      
00683b6a      if (exception != 0)
00683b6a      {
00683b6d          RpcRaiseException(exception);
00683b6d          /* no return */
00683b6a      }
00683b6a      
00683b73      void* Buffer = arg1->Buffer;
00683b7c      uint32_t var_d0_1 = esi;
00683b8f      NdrConformantArrayMarshall(&pStubMsg, pMemory, &*(uint27_t*)__MIDL_TypeFormatString.Format[0x10]);
00683b9e      uint32_t* eax_7 = (((char*)Buffer + 3) & 0xfffffffc);
00683baa      *(uint32_t*)eax_7 = eax_4;
00683bac      void* var_108_5 = &eax_7[1];
00683bb3      int32_t var_8_4 = 0xffffffff;
00683bba      sub_683c1e(pMemory);
00683bc8      arg1->BufferLength = ((char*)var_108_5 - arg1->Buffer);
00683bce      *(uint32_t*)fsbase = var_14;
00683a50  }

00683bde                                                                                            8b 55                                .U
00683be0  ec 8b 02 8b 00 3d 05 00 00 c0 74 18 3d 02 00 00 80 74 11 3d f7 06 00 00 74 0a 3d c6 06 00 00 74  .....=....t.=....t.=....t.=....t
00683c00  03 33 c0 c3 b8 01 00 00 00 c3 8b 65 e8 68 f7 06 00 00 ff 15 08 24 79 00 8b 5d 08 8b 7d e4        .3.........e.h.......$y..]..}.

00683c1e  void sub_683c1e(int32_t arg1 @ edi)

00683c1e  {
00683c20      int32_t ebp;
00683c20      
00683c20      if (arg1 != 0)
00683c23          *(uint32_t*)(ebp - 0xbc)(arg1);
00683c1e  }

00683c2a                                cc cc cc cc cc cc                                                            ......

00683c30  char const* __thiscall AC1Legacy::PStringBaseIter<char>::IndexToConstPointer(class AC1Legacy::PStringBaseIter<char> const* this, uint32_t arg2)

00683c30  {
00683c33      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->pstring_ptr->m_buffer;
00683c35      uint32_t m_len = m_buffer->m_len;
00683c35      
00683c3e      if (arg2 < m_len)
00683c4b          return &&m_buffer->m_data[arg2];
00683c4b      
00683c44      return ((m_len + m_buffer) + 0x13);
00683c30  }

00683c4e                                            90 90                                                                ..

00683c50  char __thiscall AC1Legacy::PStringBaseIter<char>::IndexToChar(class AC1Legacy::PStringBaseIter<char> const* this, uint32_t arg2)

00683c50  {
00683c53      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->pstring_ptr->m_buffer;
00683c55      uint32_t m_len = m_buffer->m_len;
00683c55      
00683c5e      if (arg2 >= m_len)
00683c5e      {
00683c60          m_buffer = *(uint8_t*)((m_len + m_buffer) + 0x13);
00683c64          return m_buffer;
00683c5e      }
00683c5e      
00683c67      m_buffer = &m_buffer->m_data[arg2];
00683c6b      return m_buffer;
00683c50  }

00683c6e                                            90 90                                                                ..

00683c70  uint32_t __fastcall AC1Legacy::PStringBaseIter<char>::GetStrLen(class AC1Legacy::PStringBaseIter<char> const* this)

00683c70  {
00683c79      return (this->pstring_ptr->m_buffer->m_len - 1);
00683c70  }

00683c7a                                                                                90 90 90 90 90 90                            ......

00683c80  int32_t __fastcall AC1Legacy::PStringBaseIter<char>::Truncate(class AC1Legacy::PStringBaseIter<char>* this)

00683c80  {
00683c88      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->pstring_ptr->m_buffer;
00683c8f      InterlockedIncrement(&m_buffer->m_cRef);
00683c95      class AC1Legacy::PStringBase<char>* pstring_ptr = this->pstring_ptr;
00683c98      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = pstring_ptr->m_buffer;
00683c98      
00683ca0      if (m_buffer_1 != AC1Legacy::PStringBase<char>::s_NullBuffer)
00683ca0      {
00683cb2          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
00683cb4              m_buffer_1->vtable->__vecDelDtor(1);
00683cb4          
00683cbc          class AC1Legacy::PStringBase<char> AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
00683cc7          pstring_ptr->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
00683cc9          InterlockedIncrement((AC1Legacy::PStringBase<char>::s_NullBuffer_1 + 4));
00683ca0      }
00683ca0      
00683ccf      uint32_t curr = this->curr;
00683ccf      
00683cd4      if (curr > 0)
00683cde          AC1Legacy::PStringBase<char>::append_n_chars(this->pstring_ptr, &m_buffer->m_data, curr);
00683cde      
00683ce3      uint32_t curr_1 = this->curr;
00683ce3      
00683ce9      if (this->mark > curr_1)
00683ceb          this->mark = curr_1;
00683ceb      
00683cfe      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
00683d00          m_buffer->vtable->__vecDelDtor(1);
00683d00      
00683d12      return 1;
00683c80  }

00683d13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00683d20  int32_t __thiscall AC1Legacy::PStringBaseIter<char>::Split(class AC1Legacy::PStringBaseIter<char> const* this, class AC1Legacy::PStringBase<char>* arg2, class AC1Legacy::PStringBase<char>* arg3, class AC1Legacy::PStringBase<char>* arg4)

00683d20  {
00683d27      uint32_t curr = this->curr;
00683d2a      uint32_t mark = this->mark;
00683d31      uint32_t var_8;
00683d31      uint32_t ebx;
00683d31      
00683d31      if (curr >= mark)
00683d31      {
00683d3b          ebx = mark;
00683d3d          var_8 = curr;
00683d31      }
00683d31      else
00683d31      {
00683d33          ebx = curr;
00683d35          var_8 = mark;
00683d31      }
00683d31      
00683d4f      int32_t* __return;
00683d4f      class AC1Legacy::PStringBase<char>* eax_1 = AC1Legacy::PStringBase<char>::substring(this->pstring_ptr, &__return, 0, (ebx - 1));
00683d58      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg2->m_buffer;
00683d58      
00683d5e      if (m_buffer_2 != eax_1->m_buffer)
00683d5e      {
00683d70          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
00683d72              m_buffer_2->vtable->__vecDelDtor(1);
00683d72          
00683d7a          class AC1Legacy::PSRefBuffer<char>* m_buffer_6 = eax_1->m_buffer;
00683d7c          arg2->m_buffer = m_buffer_6;
00683d86          InterlockedIncrement(&m_buffer_6->m_cRef);
00683d5e      }
00683d5e      
00683d8c      int32_t* __return_1 = __return;
00683d8c      
00683da2      if ((InterlockedDecrement(&__return_1[1]) == 0 && __return_1 != 0))
00683daa          **(uint32_t**)__return_1(1);
00683daa      
00683db2      if (ebx != var_8)
00683db2      {
00683dfc          class AC1Legacy::PStringBase<char>* eax_10 = AC1Legacy::PStringBase<char>::substring(this->pstring_ptr, &arg2, ebx, (var_8 - 1));
00683e05          class AC1Legacy::PSRefBuffer<char>* m_buffer_4 = arg3->m_buffer;
00683e05          
00683e0b          if (m_buffer_4 != eax_10->m_buffer)
00683e0b          {
00683e1d              if ((InterlockedDecrement(&m_buffer_4->m_cRef) == 0 && m_buffer_4 != 0))
00683e1f                  m_buffer_4->vtable->__vecDelDtor(1);
00683e1f              
00683e27              class AC1Legacy::PSRefBuffer<char>* m_buffer_7 = eax_10->m_buffer;
00683e29              arg3->m_buffer = m_buffer_7;
00683e2f              InterlockedIncrement(&m_buffer_7->m_cRef);
00683e0b          }
00683e0b          
00683e35          class AC1Legacy::PStringBase<char>* esi = arg2;
00683e35          
00683e49          if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
00683e4b              esi->m_buffer->vtable(1);
00683db2      }
00683db2      else
00683db2      {
00683db8          class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = arg3->m_buffer;
00683db8          
00683dc0          if (m_buffer_3 != AC1Legacy::PStringBase<char>::null_string.m_buffer)
00683dc0          {
00683dd2              if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
00683dd4                  m_buffer_3->vtable->__vecDelDtor(1);
00683dd4              
00683ddc              class AC1Legacy::PStringBase<char> m_buffer = AC1Legacy::PStringBase<char>::null_string.m_buffer;
00683de7              arg3->m_buffer = m_buffer;
00683de9              InterlockedIncrement((m_buffer + 4));
00683dc0          }
00683db2      }
00683db2      
00683e5e      uint32_t eax_16 = this->vtable->GetStrLen();
00683e6e      class AC1Legacy::PStringBase<char>* eax_17 = AC1Legacy::PStringBase<char>::substring(this->pstring_ptr, &arg2, var_8, eax_16);
00683e77      class AC1Legacy::PSRefBuffer<char>* m_buffer_5 = arg4->m_buffer;
00683e77      
00683e7e      if (m_buffer_5 != eax_17->m_buffer)
00683e7e      {
00683e8c          if ((InterlockedDecrement(&m_buffer_5->m_cRef) == 0 && m_buffer_5 != 0))
00683e8e              m_buffer_5->vtable->__vecDelDtor(1);
00683e8e          
00683e96          class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = eax_17->m_buffer;
00683e98          arg4->m_buffer = m_buffer_1;
00683e9f          InterlockedIncrement(&m_buffer_1->m_cRef);
00683e7e      }
00683e7e      
00683ea5      class AC1Legacy::PStringBase<char>* esi_1 = arg2;
00683ea5      
00683eb5      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00683eb7          esi_1->m_buffer->vtable(1);
00683eb7      
00683ecb      return 1;
00683d20  }

00683ece                                            90 90                                                                ..

00683ed0  int32_t __thiscall AC1Legacy::PStringBaseIter<char>::Split(class AC1Legacy::PStringBaseIter<char> const* this, class AC1Legacy::PStringBase<char>* arg2, class AC1Legacy::PStringBase<char>* arg3)

00683ed0  {
00683ed0      class AC1Legacy::PStringBaseIter<char>* __return = this;
00683ee6      class AC1Legacy::PStringBase<char>* eax_2 = AC1Legacy::PStringBase<char>::substring(this->pstring_ptr, &__return, 0, (this->curr - 1));
00683eeb      class AC1Legacy::PStringBase<char>* ebp = arg2;
00683eef      class AC1Legacy::PSRefBuffer<char>* m_buffer_3 = ebp->m_buffer;
00683eef      
00683ef6      if (m_buffer_3 != eax_2->m_buffer)
00683ef6      {
00683f08          if ((InterlockedDecrement(&m_buffer_3->m_cRef) == 0 && m_buffer_3 != 0))
00683f0a              m_buffer_3->vtable->__vecDelDtor(1);
00683f0a          
00683f12          class AC1Legacy::PStringBase<char> m_buffer_1 = eax_2->m_buffer;
00683f14          ebp->m_buffer = m_buffer_1;
00683f1b          InterlockedIncrement((m_buffer_1 + 4));
00683ef6      }
00683ef6      
00683f21      class AC1Legacy::PStringBaseIter<char>* __return_1 = __return;
00683f21      
00683f37      if ((InterlockedDecrement(&__return_1->curr) == 0 && __return_1 != 0))
00683f39          __return_1->vtable->GetStrLen(1);
00683f39      
00683f45      uint32_t eax_7 = this->vtable->GetStrLen();
00683f54      class AC1Legacy::PStringBase<char>* eax_8 = AC1Legacy::PStringBase<char>::substring(this->pstring_ptr, &arg2, this->curr, eax_7);
00683f5d      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = arg3->m_buffer;
00683f5d      
00683f63      if (m_buffer_2 != eax_8->m_buffer)
00683f63      {
00683f71          if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
00683f73              m_buffer_2->vtable->__vecDelDtor(1);
00683f73          
00683f7b          class AC1Legacy::PStringBase<char> m_buffer = eax_8->m_buffer;
00683f7d          arg3->m_buffer = m_buffer;
00683f83          InterlockedIncrement((m_buffer + 4));
00683f63      }
00683f63      
00683f89      class AC1Legacy::PStringBase<char>* esi_1 = arg2;
00683f89      
00683f99      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
00683f9b          esi_1->m_buffer->vtable(1);
00683f9b      
00683fad      return 1;
00683ed0  }


00683fb0  int32_t PSUtils::change_extension(class AC1Legacy::PStringBase<char>* arg1, class AC1Legacy::PStringBase<char> const* arg2)

00683fb0  {
00683fb4      class AC1Legacy::PStringBase<char>* ebx = arg1;
00683fbf      AC1Legacy::PStringBaseIter<char>::VTable* const var_10 = &AC1Legacy::PStringBaseIter<char>::`vftable';
00683fc7      class AC1Legacy::PStringBase<char>* var_4 = ebx;
00683fcb      int32_t var_c = 0;
00683fcf      int32_t var_8 = 0;
00683fd3      class AC1Legacy::PStringBaseIter<char>* ecx;
00683fd3      uint32_t eax = AC1Legacy::PStringBaseIter<char>::GetStrLen(ecx);
00683fd3      
00683fe3      while (true)
00683fe3      {
00683fe3          if (eax < 1)
00683fe3          {
00684000              int32_t var_c_2 = 0;
00684004              break;
00683fe3          }
00683fe3          
00683ff8          if (*(uint32_t*)((char*)var_10 + 0x10)((eax - 1)) == 0x2e)
00683ff8          {
0068400a              AC1Legacy::PStringBaseIter<char>::Truncate(&var_10);
0068400a              break;
00683ff8          }
00683ff8          
00683ffa          eax -= 1;
00683fe3      }
00683fe3      
00684014      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->m_buffer;
00684016      uint32_t m_len = m_buffer_1->m_len;
00684016      
0068401c      if (m_len != 1)
0068401c      {
00684020          char (* eax_4)[0x1] = ((m_len + m_buffer_1) + 0x13);
00684020          
00684024          if (m_len > 0)
00684026              eax_4 = &m_buffer_1->m_data;
00684026          
0068402c          if (ADJ(eax_4)->m_data != 0x2e)
0068402c          {
00684037              AC1Legacy::PStringBase<char>::PStringBase<char>(&arg1, &*U"mh,."[3]);
0068403c              class AC1Legacy::PStringBase<char>* esi_1 = arg1;
00684040              int32_t eax_5 = *(int32_t*)((char*)esi_1 + 8);
00684040              
0068404e              if ((eax_5 != 1 && esi_1 != AC1Legacy::PStringBase<char>::s_NullBuffer))
00684058                  AC1Legacy::PStringBase<char>::append_n_chars(ebx, &esi_1[5], (eax_5 - 1));
00684058              
00684069              if (InterlockedDecrement(&esi_1[1]) == 0)
0068406b                  esi_1->m_buffer->vtable(1);
0068402c          }
0068401c      }
0068401c      
00684073      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
00684075      uint32_t m_len_1 = m_buffer->m_len;
00684075      
00684084      if ((m_len_1 != 1 && m_buffer != AC1Legacy::PStringBase<char>::s_NullBuffer))
0068408e          AC1Legacy::PStringBase<char>::append_n_chars(ebx, &m_buffer->m_data, (m_len_1 - 1));
0068408e      
0068409d      return 1;
00683fb0  }

0068409e                                                                                            90 90                                ..

006840a0  int32_t __convention("regparm") PSUtils::narrowify(class AC1Legacy::PStringBase<char>* arg1, class AC1Legacy::PStringBase<unsigned short> const* arg2)

006840a0  {
006840a0      class AC1Legacy::PStringBase<char> __return_1;
006840a0      class AC1Legacy::PStringBase<char> __return = __return_1;
006840b0      AC1Legacy::PStringBase<unsigned short>::to_spstring(arg2, &__return, 0);
006840b9      class AC1Legacy::PSRefBuffer<char>* m_buffer = arg1->m_buffer;
006840bb      class AC1Legacy::PStringBase<char> __return_2 = __return;
006840bb      
006840c7      if (m_buffer != __return_2)
006840c7      {
006840d5          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
006840d7              m_buffer->vtable->__vecDelDtor(1);
006840d7          
006840e3          arg1->m_buffer = __return_2;
006840e5          InterlockedIncrement((__return_2 + 4));
006840c7      }
006840c7      
006840f7      if ((InterlockedDecrement((__return_2 + 4)) == 0 && __return_2 != 0))
006840ff          **(uint32_t**)__return_2(1);
006840ff      
0068410b      return 1;
006840a0  }

0068410c                                      90 90 90 90                                                              ....

00684110  class AC1Legacy::PStringBase<char>* __convention("regparm") PSUtils::narrowify(class AC1Legacy::PStringBase<char>* __return, class AC1Legacy::PStringBase<unsigned short> const* arg2)

00684110  {
00684110      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00684110      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
00684111      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
0068411f      AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
0068412e      class AC1Legacy::PStringBase<unsigned short>* var_18_1 = arg2;
00684133      class AC1Legacy::PSRefBuffer<char>** var_1c = &AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00684134      PSUtils::narrowify(arg2, InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef));
00684139      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
00684148      __return->m_buffer = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
0068414b      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
0068414b      
0068415a      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
0068415c          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
0068415c      
0068416b      return __return;
00684110  }

0068416c                                      90 90 90 90                                                              ....

00684170  uint8_t TimeUtils::QueryDuration(int32_t arg1, class StringInfo* arg2)

00684170  {
00684177      int32_t edx = 0;
0068417e      uint32_t temp0 = (COMBINE(edx, arg1) / 0x1e13380);
0068417e      uint32_t temp1 = (COMBINE(edx, arg1) % 0x1e13380);
0068418d      int32_t var_20 = 2;
00684193      int32_t edx_2 = 0;
00684195      uint32_t temp0_1 = (COMBINE(edx_2, temp1) / 0x278d00);
00684195      uint32_t temp1_1 = (COMBINE(edx_2, temp1) % 0x278d00);
006841a0      int32_t edx_4 = 0;
006841a2      uint32_t temp0_2 = (COMBINE(edx_4, temp1_1) / 0x93a80);
006841a2      uint32_t temp1_2 = (COMBINE(edx_4, temp1_1) % 0x93a80);
006841ad      int32_t edx_6 = 0;
006841af      uint32_t temp0_3 = (COMBINE(edx_6, temp1_2) / 0x15180);
006841af      uint32_t temp1_3 = (COMBINE(edx_6, temp1_2) % 0x15180);
006841bc      int32_t edx_8 = 0;
006841be      uint32_t temp0_4 = (COMBINE(edx_8, temp1_3) / 0xe10);
006841be      uint32_t temp1_4 = (COMBINE(edx_8, temp1_3) % 0xe10);
006841cb      int32_t edx_10 = 0;
006841cd      uint32_t temp0_5 = (COMBINE(edx_10, temp1_4) / 0x3c);
006841cd      uint32_t temp1_5 = (COMBINE(edx_10, temp1_4) % 0x3c);
006841d9      StringInfo::SetTableEnum(arg2, var_20);
006841de      var_20 = "ID_DurationFormat";
006841ed      arg2->m_stringID = compute_str_hash(var_20);
006841ed      
006841f0      if (temp0 == 0)
006841f0      {
0068420c          var_20 = "YEARS";
00684211          uint32_t eax_14 = compute_str_hash(var_20);
0068421f          PStringBase<char>::PStringBase<char>(&var_20, &data_7928af);
00684227          StringInfo::AddVariable_String(arg2, eax_14);
006841f0      }
006841f0      else
006841f0      {
006841f2          var_20 = 0;
00684205          StringInfo::AddVariable_UInt(arg2, compute_str_hash("YEARS"), temp0);
006841f0      }
006841f0      
0068422e      if (temp0_1 == 0)
0068422e      {
0068424a          var_20 = "MONTHS";
0068424f          uint32_t eax_16 = compute_str_hash(var_20);
0068425d          PStringBase<char>::PStringBase<char>(&var_20, &data_7928af);
00684265          StringInfo::AddVariable_String(arg2, eax_16);
0068422e      }
0068422e      else
0068422e      {
00684230          var_20 = 0;
00684243          StringInfo::AddVariable_UInt(arg2, compute_str_hash("MONTHS"), temp0_1);
0068422e      }
0068422e      
0068426c      if (temp0_2 == 0)
0068426c      {
00684288          var_20 = "WEEKS";
0068428d          uint32_t eax_18 = compute_str_hash(var_20);
0068429b          PStringBase<char>::PStringBase<char>(&var_20, &data_7928af);
006842a3          StringInfo::AddVariable_String(arg2, eax_18);
0068426c      }
0068426c      else
0068426c      {
0068426e          var_20 = 0;
00684281          StringInfo::AddVariable_UInt(arg2, compute_str_hash("WEEKS"), temp0_2);
0068426c      }
0068426c      
006842ae      if (temp0_3 == 0)
006842ae      {
006842ca          var_20 = "DAYS";
006842cf          uint32_t eax_21 = compute_str_hash(var_20);
006842dd          PStringBase<char>::PStringBase<char>(&var_20, &data_7928af);
006842e5          StringInfo::AddVariable_String(arg2, eax_21);
006842ae      }
006842ae      else
006842ae      {
006842b0          var_20 = 0;
006842c3          StringInfo::AddVariable_UInt(arg2, compute_str_hash("DAYS"), temp0_3);
006842ae      }
006842ae      
006842f0      if (temp0_4 == 0)
006842f0      {
0068430c          var_20 = "HOURS";
00684311          uint32_t eax_24 = compute_str_hash(var_20);
0068431f          PStringBase<char>::PStringBase<char>(&var_20, &data_7928af);
00684327          StringInfo::AddVariable_String(arg2, eax_24);
006842f0      }
006842f0      else
006842f0      {
006842f2          var_20 = 0;
00684305          StringInfo::AddVariable_UInt(arg2, compute_str_hash("HOURS"), temp0_4);
006842f0      }
006842f0      
00684332      if (temp0_5 == 0)
00684332      {
0068434e          var_20 = "MINUTES";
00684353          uint32_t eax_27 = compute_str_hash(var_20);
00684361          PStringBase<char>::PStringBase<char>(&var_20, &data_7928af);
00684369          StringInfo::AddVariable_String(arg2, eax_27);
00684332      }
00684332      else
00684332      {
00684334          var_20 = 0;
00684347          StringInfo::AddVariable_UInt(arg2, compute_str_hash("MINUTES"), temp0_5);
00684332      }
00684332      
00684374      if (temp1_5 != 0)
00684374      {
00684376          var_20 = 0;
00684389          StringInfo::AddVariable_UInt(arg2, compute_str_hash("SECONDS"), temp1_5);
0068438e          int32_t eax_30;
0068438e          eax_30 = 1;
00684397          return 1;
00684374      }
00684374      
00684398      var_20 = "SECONDS";
0068439d      uint32_t eax_31 = compute_str_hash(var_20);
006843ab      PStringBase<char>::PStringBase<char>(&var_20, &data_7928af);
006843b3      StringInfo::AddVariable_String(arg2, eax_31);
006843bb      int32_t eax_32;
006843bb      eax_32 = 1;
006843c1      return 1;
00684170  }

006843c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006843d0  int32_t __convention("regparm") RandDouble(double const arg1, double const arg2)

006843d0  {
006843f4      int32_t ecx;
006843f4      return rand(ecx);
006843d0  }

006843f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00684400  int32_t RandInt(int32_t const arg1)

00684400  {
0068440b      int32_t eax_1;
0068440b      int32_t edx;
0068440b      edx = HIGHD(((int64_t)(rand() * arg1)));
0068440b      eax_1 = LOWD(((int64_t)(rand() * arg1)));
00684417      return ((eax_1 + (edx & 0x7fff)) >> 0xf);
00684400  }

00684418                                                                          90 90 90 90 90 90 90 90                          ........

00684420  int32_t RandInt(int32_t const arg1, int32_t const arg2)

00684420  {
00684428      if (arg1 <= 1)
0068442d          return 0;
0068442d      
00684453      int32_t result;
00684453      
00684453      do
00684453      {
00684445          int32_t eax_4;
00684445          int32_t edx_1;
00684445          edx_1 = HIGHD(((int64_t)(rand() * arg1)));
00684445          eax_4 = LOWD(((int64_t)(rand() * arg1)));
0068444e          result = ((eax_4 + (edx_1 & 0x7fff)) >> 0xf);
00684453      } while (result == arg2);
00684453      
00684458      return result;
00684420  }

00684459                                                                             90 90 90 90 90 90 90                           .......

00684460  int32_t LowestSetBit(uint32_t arg1) __pure

00684460  {
00684478      for (int32_t i = 0; i < 0x20; i += 1)
00684478      {
00684472          if ((arg1 & (1 << i)) != 0)
0068447e              return i;
00684478      }
00684478      
0068447a      return 0xffffffff;
00684460  }

0068447f                                                                                               90                                 .

00684480  uint32_t Pack_AsDataIDOfKnownType(uint32_t arg1, class IDClass<_tagDataID,32,0> arg2, void** arg3, uint32_t arg4)

00684480  {
00684480      class IDClass<_tagDataID,32,0> ecx = arg2;
00684480      
0068448a      if (ecx == 0)
0068448c          ecx = arg1;
0068448c      
0068448e      int32_t ecx_1 = (ecx - arg1);
0068448e      
00684496      if (ecx_1 <= 0x3fff)
00684496      {
0068449d          if (arg4 >= 2)
0068449d          {
006844a5              **(uint16_t**)arg3 = ecx_1;
006844a8              *(uint32_t*)arg3 += 2;
0068449d          }
0068449d          
006844b0          return 2;
00684496      }
00684496      
006844b7      if (ecx_1 > 0x3fffffff)
006844eb          return 0;
006844eb      
006844be      if (arg4 >= 4)
006844be      {
006844d2          **(uint16_t**)arg3 = (((int16_t)(ecx_1 >> 0x10)) | 0x8000);
006844d7          void* edx_6 = (*(uint32_t*)arg3 + 2);
006844da          *(uint32_t*)arg3 = edx_6;
006844dc          *(uint16_t*)edx_6 = ecx_1;
006844df          *(uint32_t*)arg3 += 2;
006844be      }
006844be      
006844e8      return 4;
00684480  }

006844ec                                      90 90 90 90                                                              ....

006844f0  uint8_t Unpack_AsDataIDOfKnownType(uint32_t arg1, class IDClass<_tagDataID,32,0>* arg2, void** arg3)

006844f0  {
006844f4      void* ecx = *(uint32_t*)arg3;
006844f6      int32_t eax;
006844f6      eax = *(uint16_t*)ecx;
006844fe      *(uint32_t*)arg3 = ((char*)ecx + 2);
006844fe      
00684500      if (*(uint8_t*)((char*)eax)[1] >= 0)
00684500      {
00684533          arg2->id = (((uint32_t)eax) + arg1);
00684535          uint32_t eax_6;
00684535          eax_6 = 1;
00684537          return 1;
00684500      }
00684500      
00684503      int32_t esi;
00684503      esi = *(uint16_t*)((char*)ecx + 2);
00684509      *(uint32_t*)arg3 = ((char*)ecx + 4);
00684520      arg2->id = ((((eax & 0x3fff) << 0x10) | ((uint32_t)esi)) + arg1);
00684523      class IDClass<_tagDataID,32,0> eax_4;
00684523      eax_4.id = 1;
00684525      return 1;
006844f0  }

00684538                                                                          90 90 90 90 90 90 90 90                          ........

00684540  uint32_t Pack_AsWClassIDCompressed(class IDClass<_tagDataID,32,0> arg1, void** arg2, uint32_t arg3)

00684540  {
0068454e      if (arg1 <= 0x7fff)
0068454e      {
00684553          if (arg3 >= 2)
00684553          {
0068455b              **(uint16_t**)arg2 = arg1.id;
0068455e              *(uint32_t*)arg2 += 2;
00684553          }
00684553          
00684566          return 2;
0068454e      }
0068454e      
0068456a      if (arg3 >= 4)
0068456a      {
0068456c          int16_t** eax_3 = arg2;
0068457e          **(uint16_t**)eax_3 = (((int16_t)(arg1 >> 0x10)) | 0x8000);
00684583          int16_t* edx_6 = &*(uint32_t*)eax_3[1];
00684586          *(uint32_t*)eax_3 = edx_6;
00684588          *(uint16_t*)edx_6 = arg1.id;
0068458b          *(uint32_t*)eax_3 = &*(uint32_t*)eax_3[1];
0068456a      }
0068456a      
00684594      return 4;
00684540  }

00684595                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006845a0  uint8_t Unpack_AsWClassIDCompressed(class IDClass<_tagDataID,32,0>* arg1, void** arg2)

006845a0  {
006845a4      void* ecx = *(uint32_t*)arg2;
006845a6      int32_t eax;
006845a6      eax = *(uint16_t*)ecx;
006845ae      *(uint32_t*)arg2 = ((char*)ecx + 2);
006845ae      
006845b0      if (*(uint8_t*)((char*)eax)[1] >= 0)
006845b0      {
006845d9          arg1->id = ((uint32_t)eax);
006845db          class IDClass<_tagDataID,32,0> eax_4;
006845db          eax_4.id = 1;
006845dd          return 1;
006845b0      }
006845b0      
006845b3      int32_t esi;
006845b3      esi = *(uint16_t*)((char*)ecx + 2);
006845b9      *(uint32_t*)arg2 = ((char*)ecx + 4);
006845cc      arg1->id = (((eax & 0x7fff) << 0x10) | ((uint32_t)esi));
006845cf      class IDClass<_tagDataID,32,0> eax_3;
006845cf      eax_3.id = 1;
006845d1      return 1;
006845a0  }

006845de                                                                                            90 90                                ..

006845e0  uint8_t __thiscall ActionMapValue::GetDescriptionValues(class ActionMapValue const* this, class IDClass<_tagDataID,32,0> arg2, class PStringBase<unsigned short>* arg3, class PStringBase<unsigned short>* arg4)

006845e0  {
006845ed      void var_90;
006845ed      StringInfo::StringInfo(&var_90);
00684602      StringInfo::SetStringIDandTableID(&var_90, this->m_userBindingData.m_action_name, arg2);
00684615      uint8_t eax_1;
00684615      void* esi_1;
00684615      eax_1 = StringInfo::InqString(&var_90, arg3, 0);
00684615      
0068461c      if (eax_1 == 0)
0068461c      {
00684622          StringInfo::~StringInfo(&var_90);
00684627          int32_t eax_2;
00684627          eax_2 = 0;
00684630          return 0;
0068461c      }
0068461c      
00684633      int32_t eax_3 = *(uint32_t*)((char*)esi_1 + 0xc);
00684633      
00684638      if (eax_3 != 0)
00684638      {
0068463a          int32_t var_8c_1 = eax_3;
0068464c          StringInfo::InqString(&var_90, arg4, 0);
00684638      }
00684638      
00684655      StringInfo::~StringInfo(&var_90);
0068465a      int32_t eax_5;
0068465a      eax_5 = 1;
00684663      return 1;
006845e0  }

00684666                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00684670  void* __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this, uint32_t arg2)

00684670  {
00684673      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_buckets = this->m_buckets;
0068467b      this->vtable = &IntrusiveHashTable<unsigned long,struct HashList<unsigned long,class HashList<unsigned long,class ActionMapValue,1>,1>::HashListData*,1>::`vftable';
0068467b      
00684681      if (m_buckets != &this->m_aInplaceBuckets)
00684684          operator delete[](m_buckets);
00684684      
0068468e      this->m_buckets = nullptr;
00684691      this->m_firstInterestingBucket = nullptr;
00684694      this->m_numBuckets = 0;
00684697      this->m_numElements = 0;
00684697      
0068469f      if ((arg2 & 1) != 0)
006846a2          operator delete(this);
006846a2      
006846ad      return this;
00684670  }


006846b0  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>* this, uint32_t arg2)

006846b0  {
006846b3      class HashTableData<unsigned long,InputMapConflictsValue>** m_buckets = this->m_buckets;
006846bb      this->vtable = 0x7fee08;
006846bb      
006846c1      if (m_buckets != &this->m_aInplaceBuckets)
006846c4          operator delete[](m_buckets);
006846c4      
006846ce      this->m_buckets = nullptr;
006846d1      this->m_firstInterestingBucket = nullptr;
006846d4      this->m_numBuckets = 0;
006846d7      this->m_numElements = 0;
006846d7      
006846df      if ((arg2 & 1) != 0)
006846e2          operator delete(this);
006846e2      
006846ed      return this;
006846b0  }


006846f0  void Serializer::SerializeMagicNumber(uint32_t arg1, class Archive* arg2)

006846f0  {
006846f8      int32_t eax_1 = (arg2->m_flags & 5);
006846f8      
006846fe      if (eax_1 == 1)
006846fe      {
00684704          Archive::CheckAlignment(arg2, 4);
0068470d          uint8_t* eax_2 = Archive::GetBytes(arg2, 4);
0068470d          
0068471a          if ((eax_2 != 0 && (arg2->m_flags & 1) != 0))
00684720              *(uint32_t*)eax_2 = arg1;
006846fe      }
006846fe      else if (eax_1 == 0)
00684726      {
0068472c          Archive::CheckAlignment(arg2, 4);
00684735          uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0068473c          class Archive* ecx_6;
0068473c          
0068473c          if (eax_3 == 0)
00684750              ecx_6 = arg2;
0068473c          else if ((arg2->m_flags & 1) == 0)
0068474c              ecx_6 = *(uint32_t*)eax_3;
00684742          else
00684742          {
00684744              ecx_6 = arg2;
00684748              *(uint32_t*)eax_3 = ecx_6;
00684742          }
00684742          
00684758          if (ecx_6 != arg1)
0068475d              /* tailcall */
0068475d              return Archive::RaiseError(arg2);
00684726      }
006846f0  }

00684762        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00684770  uint8_t __convention("regparm") FileNodeUtils::GetNameAsEnum(class PFileNode const* arg1, uint32_t arg2, uint32_t* arg3)

00684770  {
00684770      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
00684770      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
00684771      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00684780      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00684788      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00684795      PFileNode::GetNameAsPString(arg1, &PStringBase<char>::s_NullBuffer_2);
0068479e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
006847a3      uint32_t* PStringBase<char>::s_NullBuffer_5 = arg3;
006847aa      int32_t ebx;
006847aa      ebx = 1;
006847ac      PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
006847ae      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
006847b5      uint8_t eax_2;
006847b5      uint32_t* PStringBase<char>::s_NullBuffer_7;
006847b5      eax_2 = EnumMapper::GetEnum(arg2, PStringBase<char>::s_NullBuffer_5, arg3);
006847b5      
006847bf      if (eax_2 == 0)
006847bf      {
006847c1          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_4;
006847c2          PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_7;
006847ca          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_5, "invalid emp value '%s'");
006847d0          PFileNode::ReportError(arg1, PStringBase<char>::s_NullBuffer_5);
006847d8          ebx = 0;
006847bf      }
006847bf      
006847ed      if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
006847f5          *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
006847f5      
006847fa      int32_t eax_3;
006847fa      eax_3 = ebx;
006847fe      return eax_3;
00684770  }

006847ff                                                                                               90                                 .

00684800  uint8_t __thiscall HashList<unsigned long,ActionMapValue,1>::contains(class HashList<unsigned long,ActionMapValue,1> const* this, uint32_t const* arg2)

00684800  {
00684805      uint32_t const i = *(uint32_t*)arg2;
00684814      int32_t* eax_2 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
00684816      bool cond:0 = eax_2 != 0;
00684816      
00684818      if (eax_2 != 0)
00684818      {
00684822          while (*(uint32_t*)eax_2 != i)
00684822          {
00684824              eax_2 = eax_2[1];
00684824              
00684829              if (eax_2 == 0)
00684829                  break;
00684822          }
00684822          
0068482b          cond:0 = eax_2 != 0;
00684818      }
00684818      
0068482d      eax_2 = cond:0;
00684831      return eax_2;
00684800  }

00684834                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00684840  uint8_t __thiscall HashList<unsigned long,ActionMapValue,1>::find(class HashList<unsigned long,ActionMapValue,1> const* this, uint32_t const* arg2, class ActionMapValue* arg3)

00684840  {
00684845      uint32_t const esi = *(uint32_t*)arg2;
00684858      int32_t* i;
00684858      
00684858      for (i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, esi) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
00684858      {
00684862          if (*(uint32_t*)i == esi)
00684862          {
00684873              if (i == 0)
00684873                  break;
00684873              
0068487e              arg3->m_eToggleType = i[4];
00684883              arg3->m_userBindingData.m_eActionClass = i[5];
00684889              arg3->m_userBindingData.m_action_name = i[6];
0068488f              arg3->m_userBindingData.m_description = i[7];
00684892              uint32_t eax_3;
00684892              eax_3 = 1;
00684895              return 1;
00684862          }
00684858      }
00684858      
0068486b      i = 0;
0068486e      return 0;
00684840  }

00684898                                                                          90 90 90 90 90 90 90 90                          ........

006848a0  void __thiscall List<unsigned long>::Serialize(class List<unsigned long>* this, class Archive* arg2)

006848a0  {
006848a2      class Archive* esi = arg2;
006848a9      int32_t eax_1 = (esi->m_flags & 5);
006848a9      
006848b2      if (eax_1 == 1)
006848b2      {
006848b8          Archive::CheckAlignment(esi, 4);
006848c1          uint8_t* eax_2 = Archive::GetBytes(esi, 4);
006848c1          
006848c8          if (eax_2 != 0)
006848c8          {
006848ce              if ((esi->m_flags & 1) == 0)
006848d9                  this->_num_elements = *(uint32_t*)eax_2;
006848ce              else
006848d3                  *(uint32_t*)eax_2 = this->_num_elements;
006848c8          }
006848c8          
006848dc          class ListNode<unsigned long>* edi_1 = this->_head;
006848dc          
006848e1          if (edi_1 != 0)
006848e1          {
006848eb              while (true)
006848eb              {
006848eb                  Archive::CheckAlignment(esi, 4);
006848f4                  uint32_t* eax_3 = Archive::GetBytes(esi, 4);
006848f4                  
006848fb                  if (eax_3 != 0)
006848fb                  {
00684901                      if ((esi->m_flags & 1) == 0)
0068490b                          edi_1->data = *(uint32_t*)eax_3;
00684901                      else
00684905                          *(uint32_t*)eax_3 = edi_1->data;
006848fb                  }
006848fb                  
0068490f                  if (edi_1 == 0)
0068490f                      break;
0068490f                  
00684915                  edi_1 = edi_1->next;
00684915                  
0068491a                  if (edi_1 == 0)
0068491f                      return;
006848eb              }
006848e1          }
006848b2      }
006848b2      else if (eax_1 == 0)
00684924      {
0068492d          List<StringTableMetaLanguage::Node const *>::flush(this);
00684936          Archive::CheckAlignment(esi, 4);
0068493f          uint8_t* eax_4 = Archive::GetBytes(esi, 4);
00684946          class Archive* ebp_1;
00684946          
00684946          if (eax_4 == 0)
0068495a              ebp_1 = arg2;
00684946          else if ((esi->m_flags & 1) == 0)
00684956              ebp_1 = *(uint32_t*)eax_4;
0068494c          else
0068494c          {
0068494e              ebp_1 = arg2;
00684952              *(uint32_t*)eax_4 = ebp_1;
0068494c          }
0068494c          
00684968          if ((!(((int8_t)(esi->m_flags >> 2))) & 1) != 0)
00684968          {
00684973              if (ebp_1 > Archive::GetSizeLeft(esi))
00684973              {
00684977                  Archive::RaiseError(esi);
00684980                  return;
00684973              }
00684973              
00684983              int32_t edi_2 = 0;
00684983              
00684987              if (ebp_1 > 0)
00684987              {
006849d3                  do
006849d3                  {
00684994                      Archive::CheckAlignment(esi, 4);
0068499d                      uint8_t* eax_8 = Archive::GetBytes(esi, 4);
0068499d                      
006849a4                      if (eax_8 != 0)
006849a4                      {
006849aa                          if ((esi->m_flags & 1) == 0)
006849b6                              arg2 = *(uint32_t*)eax_8;
006849aa                          else
006849b0                              *(uint32_t*)eax_8 = arg2;
006849a4                      }
006849a4                      
006849c2                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
006849c2                          break;
006849c2                      
006849cb                      List<PFileNode *>::push_back(this, &arg2);
006849d0                      edi_2 += 1;
006849d3                  } while (edi_2 < ebp_1);
00684987              }
00684968          }
00684924      }
006848a0  }

006849dc                                                                                      90 90 90 90                              ....

006849e0  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::grow(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this)

006849e0  {
006849e0      class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* m_numBuckets = this;
006849e2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006849ee      m_numBuckets = this->m_numBuckets;
00684a05      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00684a05      
00684a0f      if (eax_2 != bucketSizesEnd_1)
00684a18          eax_2 = &eax_2[1];
00684a0f      else
00684a0f      {
00684a11          eax_2 -= 4;
00684a11          
00684a16          if (eax_2 != bucketSizesEnd_1)
00684a18              eax_2 = &eax_2[1];
00684a0f      }
00684a0f      
00684a28      return IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
006849e0  }

00684a29                             90 90 90 90 90 90 90                                                           .......

00684a30  void __thiscall ActionMapValue::Serialize(class ActionMapValue* this, class Archive* arg2)

00684a30  {
00684a3f      Serializer::SerializeMagicNumber(0, arg2);
00684a4b      int32_t ebx;
00684a4b      ebx = 0;
00684a4d      Archive::CheckAlignment(arg2, 1);
00684a56      uint8_t* eax = Archive::GetBytes(arg2, 1);
00684a56      
00684a5d      if (eax != 0)
00684a5d      {
00684a63          if ((arg2->m_flags & 1) == 0)
00684a69              ebx = *(uint8_t*)eax;
00684a63          else
00684a65              *(uint8_t*)eax = 0;
00684a5d      }
00684a5d      
00684a78      if (((arg2->m_flags & 5) == 0 && (ebx != 0 && ebx != 1)))
00684a7c          Archive::RaiseError(arg2);
00684a7c      
00684a85      Archive::CheckAlignment(arg2, 4);
00684a8e      uint32_t* eax_1 = Archive::GetBytes(arg2, 4);
00684a8e      
00684a95      if (eax_1 != 0)
00684a95      {
00684a9b          if ((arg2->m_flags & 1) == 0)
00684aa5              this->m_eToggleType = *(uint32_t*)eax_1;
00684a9b          else
00684a9f              *(uint32_t*)eax_1 = this->m_eToggleType;
00684a95      }
00684a95      
00684ab1      int32_t var_10 = 0x7a2be4;
00684ab5      int32_t var_c = 0;
00684abd      int32_t var_8 = 0;
00684ac5      int32_t var_4 = 0;
00684acd      List<unsigned long>::Serialize(&var_10, arg2);
00684ad6      UserBindingValue::Serialize(&this->m_userBindingData, arg2);
00684adf      var_10 = 0x7a2be4;
00684ae3      List<StringTableMetaLanguage::Node const *>::flush(&var_10);
00684a30  }

00684af1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00684b00  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>* this, uint32_t arg2)

00684b00  {
00684b0b      arg2 = arg2;
00684b0f      uint8_t edx = ((int8_t)arg2);
00684b13      this->m_buckets = nullptr;
00684b16      this->m_firstInterestingBucket = nullptr;
00684b19      this->m_numBuckets = 0;
00684b1c      this->m_numElements = 0;
00684b20      this->vtable = 0x7fee08;
00684b26      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00684b39      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00684b39      
00684b43      if (eax == bucketSizesEnd_1)
00684b45          eax -= 4;
00684b45      
00684b48      uint32_t eax_1 = *(uint32_t*)eax;
00684b4d      this->m_numBuckets = eax_1;
00684b4d      
00684b50      if (eax_1 > 0x17)
00684b66          this->m_buckets = operator new[]((eax_1 << 2));
00684b50      else
00684b55          this->m_buckets = &this->m_aInplaceBuckets;
00684b55      
00684b6c      class HashTableData<unsigned long,InputMapConflictsValue>** m_buckets = this->m_buckets;
00684b6f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00684b75      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00684b86      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00684b00  }

00684b8f                                               90                                                                 .

00684b90  void __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this, uint32_t arg2)

00684b90  {
00684b9b      arg2 = arg2;
00684b9f      uint8_t edx = ((int8_t)arg2);
00684ba3      this->m_buckets = nullptr;
00684ba6      this->m_firstInterestingBucket = nullptr;
00684ba9      this->m_numBuckets = 0;
00684bac      this->m_numElements = 0;
00684bb0      this->vtable = &IntrusiveHashTable<unsigned long,struct HashList<unsigned long,class HashList<unsigned long,class ActionMapValue,1>,1>::HashListData*,1>::`vftable';
00684bb6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00684bc9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00684bc9      
00684bd3      if (eax == bucketSizesEnd_1)
00684bd5          eax -= 4;
00684bd5      
00684bd8      uint32_t eax_1 = *(uint32_t*)eax;
00684bdd      this->m_numBuckets = eax_1;
00684bdd      
00684be0      if (eax_1 > 0x17)
00684bf6          this->m_buckets = operator new[]((eax_1 << 2));
00684be0      else
00684be5          this->m_buckets = &this->m_aInplaceBuckets;
00684be5      
00684bfc      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_buckets = this->m_buckets;
00684bff      uint32_t ecx_3 = (this->m_numBuckets << 2);
00684c05      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00684c16      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00684b90  }

00684c1f                                                                                               90                                 .

00684c20  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this, uint32_t arg2)

00684c20  {
00684c2d      if (arg2 == this->m_numBuckets)
00684c2d      {
00684c2f          uint32_t eax;
00684c2f          eax = 0;
00684c35          return 0;
00684c2d      }
00684c2d      
00684c3d      int32_t* i_2 = nullptr;
00684c3d      
00684c41      while (this->m_numElements != 0)
00684c41      {
00684c4c          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00684c51          int32_t** m_firstInterestingBucket_2;
00684c51          int32_t* i_3;
00684c51          
00684c51          if (this->m_firstInterestingBucket == ecx_1)
00684c51          {
00684c64          label_684c64:
00684c64              m_firstInterestingBucket_2 = nullptr;
00684c66              i_3 = nullptr;
00684c51          }
00684c51          else
00684c51          {
00684c53              while (true)
00684c53              {
00684c53                  struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
00684c53                  
00684c58                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00684c58                  {
00684c6a                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00684c6d                      i_3 = *(uint32_t*)m_firstInterestingBucket_1;
00684c6f                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00684c6f                      break;
00684c58                  }
00684c58                  
00684c5f                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00684c5f                  
00684c62                  if (&m_firstInterestingBucket[1] == ecx_1)
00684c62                      goto label_684c64;
00684c53              }
00684c51          }
00684c51          
00684c76          int32_t** m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
00684c7d          int32_t* i_4 = i_3;
00684c80          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, this);
00684c85          i_3[1] = i_2;
00684c8b          i_2 = i_3;
00684c41      }
00684c41      
00684c8f      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_buckets = this->m_buckets;
00684c8f      
00684c97      if (m_buckets != &this->m_aInplaceBuckets)
00684c9a          operator delete[](m_buckets);
00684c9a      
00684ca2      uint32_t edx_2 = arg2;
00684ca9      this->m_buckets = nullptr;
00684cac      this->m_firstInterestingBucket = nullptr;
00684caf      this->m_numBuckets = 0;
00684cb2      this->m_numElements = 0;
00684cb5      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, edx_2);
00684cbc      int32_t* i_1 = i_2;
00684cbe      void** eax_4;
00684cbe      
00684cbe      if (i_2 != 0)
00684cbe      {
00684d36          int32_t* i;
00684d36          
00684d36          do
00684d36          {
00684cc0              uint32_t m_numBuckets = this->m_numBuckets;
00684cc6              i = i_1[1];
00684cc6              
00684ccf              if ((m_numBuckets * 2) < (this->m_numElements + 1))
00684ccf              {
00684cd1                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00684cd7                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00684cdf                  arg2 = m_numBuckets;
00684cef                  uint32_t* eax_6 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
00684cef                  
00684cf9                  if (eax_6 != bucketSizesEnd_1)
00684d02                      eax_6 = &eax_6[1];
00684cf9                  else
00684cf9                  {
00684cfb                      eax_6 -= 4;
00684cfb                      
00684d00                      if (eax_6 != bucketSizesEnd_1)
00684d02                          eax_6 = &eax_6[1];
00684cf9                  }
00684cf9                  
00684d0a                  IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_6);
00684ccf              }
00684ccf              
00684d19              eax_4 = &this->m_buckets[(COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets)];
00684d1e              i_1[1] = *(uint32_t*)eax_4;
00684d21              *(uint32_t*)eax_4 = i_1;
00684d21              
00684d26              if (eax_4 < this->m_firstInterestingBucket)
00684d28                  this->m_firstInterestingBucket = eax_4;
00684d28              
00684d31              this->m_numElements += 1;
00684d34              i_1 = i;
00684d36          } while (i != 0);
00684cbe      }
00684cbe      
00684d3b      eax_4 = 1;
00684d3e      return 1;
00684c20  }

00684d41     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00684d50  uint8_t __thiscall HashTable<unsigned long,InputMapConflictsValue,0>::find(class HashTable<unsigned long,InputMapConflictsValue,0> const* this, uint32_t const* arg2, class InputMapConflictsValue* arg3)

00684d50  {
00684d55      uint32_t const esi = *(uint32_t*)arg2;
00684d68      int32_t* i;
00684d68      
00684d68      for (i = this->m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00684d68      {
00684d72          if (*(uint32_t*)i == esi)
00684d72          {
00684d83              if (i == 0)
00684d83                  break;
00684d83              
00684d88              int32_t* ecx_1 = arg3;
00684d8f              *(uint32_t*)ecx_1 = i[2];
00684d95              List<unsigned long>::operator=(&ecx_1[1], &i[3]);
00684d9a              class List<StringTableMetaLanguage::Node const *>* eax_3;
00684d9a              eax_3 = 1;
00684d9d              return 1;
00684d72          }
00684d68      }
00684d68      
00684d7b      i = 0;
00684d7e      return 0;
00684d50  }


00684da0  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>* this)

00684da0  {
00684dab      while (this->m_numElements != 0)
00684dab      {
00684db8          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00684dbe          int32_t* m_firstInterestingBucket_2;
00684dbe          void* esi_1;
00684dbe          
00684dbe          if (this->m_firstInterestingBucket == ecx_1)
00684dbe          {
00684dd1          label_684dd1:
00684dd1              m_firstInterestingBucket_2 = nullptr;
00684dd3              esi_1 = nullptr;
00684dbe          }
00684dbe          else
00684dbe          {
00684dc0              while (true)
00684dc0              {
00684dc0                  class HashTableData<unsigned long,InputMapConflictsValue>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00684dc0                  
00684dc5                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00684dc5                  {
00684dd7                      int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00684dda                      esi_1 = *(uint32_t*)m_firstInterestingBucket_1;
00684ddc                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00684ddc                      break;
00684dc5                  }
00684dc5                  
00684dcc                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00684dcc                  
00684dcf                  if (&m_firstInterestingBucket[1] == ecx_1)
00684dcf                      goto label_684dd1;
00684dc0              }
00684dbe          }
00684dbe          
00684dde          void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
00684dde          
00684de2          if (eax_3 == esi_1)
00684df4              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00684de2          else
00684de2          {
00684deb              void* ecx_2;
00684deb              
00684deb              do
00684deb              {
00684de4                  ecx_2 = eax_3;
00684de6                  eax_3 = *(uint32_t*)((char*)eax_3 + 4);
00684deb              } while (eax_3 != esi_1);
00684deb              
00684def              if (ecx_2 != 0)
00684dfb                  *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00684def              else
00684df4                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00684de2          }
00684de2          
00684e04          this->m_numElements -= 1;
00684e04          
00684e07          if (esi_1 != 0)
00684e07          {
00684e09              *(uint32_t*)((char*)esi_1 + 0xc) = 0x7a2be4;
00684e09              
00684e10              while (true)
00684e10              {
00684e10                  void* ecx_5 = *(uint32_t*)((char*)esi_1 + 0x10);
00684e10                  
00684e15                  if (ecx_5 == 0)
00684e15                      break;
00684e15                  
00684e17                  void* eax_5 = *(uint32_t*)((char*)ecx_5 + 4);
00684e1c                  *(uint32_t*)((char*)esi_1 + 0x10) = eax_5;
00684e1c                  
00684e1f                  if (eax_5 == 0)
00684e26                      *(uint32_t*)((char*)esi_1 + 0x14) = 0;
00684e1f                  else
00684e21                      *(uint32_t*)((char*)eax_5 + 8) = 0;
00684e21                  
00684e2b                  if (ecx_5 != 0)
00684e2e                      operator delete(ecx_5);
00684e2e                  
00684e36                  *(uint32_t*)((char*)esi_1 + 0x18) -= 1;
00684e10              }
00684e10              
00684e3c              operator delete(esi_1);
00684e07          }
00684dab      }
00684da0  }

00684e51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00684e60  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::add(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this, struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData* arg2)

00684e60  {
00684e68      uint32_t m_hashKey = arg2->m_hashKey;
00684e6b      uint32_t m_numBuckets = this->m_numBuckets;
00684e6b      
00684e7e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
00684e7e      {
00684e82          if (*(uint32_t*)i == m_hashKey)
00684e82          {
00684ece              if (i == 0)
00684ece                  break;
00684ece              
00684ed2              i = 0;
00684ed5              return 0;
00684e82          }
00684e7e      }
00684e7e      
00684e94      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00684e98          IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::grow(this);
00684e98      
00684ea1      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
00684ea4      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_buckets = this->m_buckets;
00684eaa      arg2->m_hashNext = m_buckets[temp1_1];
00684ead      m_buckets[temp1_1] = arg2;
00684eb3      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** eax_4 = &m_buckets[temp1_1];
00684eb3      
00684eb8      if (eax_4 < this->m_firstInterestingBucket)
00684eba          this->m_firstInterestingBucket = eax_4;
00684eba      
00684ec2      this->m_numElements += 1;
00684ec6      uint32_t eax_6;
00684ec6      eax_6 = 1;
00684ec9      return 1;
00684e60  }

00684ed8                                                                          90 90 90 90 90 90 90 90                          ........

00684ee0  uint8_t __thiscall ActionMap::GetConflictingInputMaps(class ActionMap const* this, uint32_t arg2, class List<unsigned long>* arg3)

00684ee0  {
00684ee4      uint32_t esi = arg2;
00684ee4      
00684f01      for (int32_t* i = this->m_hashConflictingMaps.m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_hashConflictingMaps.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00684f01      {
00684f05          if (*(uint32_t*)i == esi)
00684f05          {
00684f30              if (i == 0)
00684f30                  break;
00684f30              
00684f32              int32_t var_14 = 0;
00684f36              int32_t var_c = 0;
00684f3a              int32_t var_8 = 0;
00684f3e              int32_t var_4 = 0;
00684f57              int32_t var_10 = 0x7a2be4;
00684f5b              HashTable<unsigned long,InputMapConflictsValue,0>::find(&this->m_hashConflictingMaps, &arg2, &var_14);
00684f69              List<unsigned long>::operator=(arg3, &var_10);
00684f72              var_10 = 0x7a2be4;
00684f76              List<StringTableMetaLanguage::Node const *>::flush(&var_10);
00684f7b              int32_t eax_4;
00684f7b              eax_4 = 1;
00684f81              return 1;
00684f05          }
00684f01      }
00684f01      
00684f14      List<StringTableMetaLanguage::Node const *>::flush(arg3);
00684f20      List<PFileNode *>::push_back(arg3, &arg2);
00684f25      int32_t eax_3;
00684f25      eax_3 = 1;
00684f2b      return 1;
00684ee0  }

00684f84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00684f90  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::push_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this, struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData* arg2)

00684f90  {
00684f98      uint32_t m_hashKey = arg2->m_hashKey;
00684f98      
00684fab      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
00684fab      {
00684fb2          if (*(uint32_t*)i == m_hashKey)
00684fb2          {
00684fdc              if (i == 0)
00684fdc                  break;
00684fdc              
00684fdf              i = 0;
00684fe2              return 0;
00684fb2          }
00684fab      }
00684fab      
00684fbe      IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::add(this, arg2);
00684fce      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
00684fd4      int32_t eax_4;
00684fd4      eax_4 = 1;
00684fd7      return 1;
00684f90  }

00684fe5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00684ff0  void SerializeHashTableData<int,unsigned long,InputMapConflictsValue,SB_Default,SB_Default>(int32_t const* arg1, class HashTableData<unsigned long,InputMapConflictsValue>* arg2, class Archive* arg3)

00684ff0  {
00684ffa      Archive::CheckAlignment(arg3, 4);
00685003      uint8_t* eax = Archive::GetBytes(arg3, 4);
00685003      
0068500e      if (eax != 0)
0068500e      {
00685014          if ((arg3->m_flags & 1) == 0)
0068501e              arg2->m_hashKey = *(uint32_t*)eax;
00685014          else
00685018              *(uint32_t*)eax = arg2->m_hashKey;
0068500e      }
0068500e      
00685024      Archive::CheckAlignment(arg3, 4);
0068502d      uint32_t* eax_1 = Archive::GetBytes(arg3, 4);
0068502d      
00685034      if (eax_1 != 0)
00685034      {
0068503a          if ((arg3->m_flags & 1) != 0)
0068503a          {
0068503f              *(uint32_t*)eax_1 = arg2->m_data.m_eInputMap;
00685045              List<unsigned long>::Serialize(&arg2->m_data.m_listConflictingInputMaps, arg3);
0068504c              return;
0068503a          }
0068503a          
0068504f          arg2->m_data.m_eInputMap = *(uint32_t*)eax_1;
00685034      }
00685034      
00685056      List<unsigned long>::Serialize(&arg2->m_data.m_listConflictingInputMaps, arg3);
00684ff0  }

0068505e                                                                                            90 90                                ..

00685060  void* __thiscall HashTable<unsigned long,InputMapConflictsValue,0>::`scalar deleting destructor'(class HashTable<unsigned long,InputMapConflictsValue,0>* this, uint32_t arg2)

00685060  {
00685069      this->vtable = &HashTable<unsigned long,class InputMapConflictsValue,0>::`vftable';
0068506f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>::delete_contents(&this->m_intrusiveTable);
00685074      class HashTableData<unsigned long,InputMapConflictsValue>** m_buckets = this->m_intrusiveTable.m_buckets;
00685064      this->m_intrusiveTable.vtable = 0x7fee08;
00685064      
00685082      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00685085          operator delete[](m_buckets);
00685085      
00685064      this->m_intrusiveTable.m_buckets = nullptr;
00685064      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00685064      this->m_intrusiveTable.m_numBuckets = 0;
00685064      this->m_intrusiveTable.m_numElements = 0;
00685064      
006850a0      if ((arg2 & 1) != 0)
006850a3          operator delete(this);
006850a3      
006850af      return this;
00685060  }

006850b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006850c0  void __fastcall IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::flush(class IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this)

006850c0  {
00685108      class DLListData* head_;
00685108      
00685108      do
00685108      {
006850c4          head_ = this->m_list.head_;
006850c4          
006850c9          if (head_ == 0)
006850c9              break;
006850c9          
006850cb          class DLListData* dllist_prev = head_->dllist_prev;
006850cb          
006850d0          if (dllist_prev == 0)
006850d0          {
006850d8              class DLListData* dllist_next = head_->dllist_next;
006850dc              this->m_list.head_ = dllist_next;
006850dc              
006850df              if (dllist_next != 0)
006850e1                  dllist_next->dllist_prev = nullptr;
006850d0          }
006850d0          else
006850d4              dllist_prev->dllist_next = head_->dllist_next;
006850d4          
006850e4          class DLListData* dllist_next_1 = head_->dllist_next;
006850e4          
006850e8          if (dllist_next_1 == 0)
006850e8          {
006850f5              class DLListData* dllist_prev_1 = this->m_list.tail_->dllist_prev;
006850fa              this->m_list.tail_ = dllist_prev_1;
006850fa              
006850fd              if (dllist_prev_1 != 0)
006850ff                  dllist_prev_1->dllist_next = 0;
006850e8          }
006850e8          else
006850ed              dllist_next_1->dllist_prev = head_->dllist_prev;
006850ed          
00685103          head_->dllist_next = 0;
00685105          head_->dllist_prev = nullptr;
00685108      } while (head_ != 0);
0068510c      /* tailcall */
0068510c      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(this);
006850c0  }

00685111                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00685120  void __convention("regparm") <int32_t,class IntrusiveHashList<unsigned long,struct HashList<unsigned long,class ActionMapValue,1>::HashListData*,1>,struct HashList<unsigned long,class ActionMapValue,1>::HashListData*,struct SB_Default>::SerializeIntrusiveHashList(int32_t const* arg1, class IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* arg2, class Archive* arg3)

00685120  {
00685120      uint32_t m_numBuckets_1;
00685120      uint32_t m_numBuckets = m_numBuckets_1;
00685122      class Archive* esi = arg3;
00685122      
00685130      if ((!(((int8_t)(esi->m_flags >> 2))) & 1) != 0)
00685130      {
00685136          m_numBuckets_1 = esi->m_flags;
0068513f          m_numBuckets_1 = !(m_numBuckets_1);
0068513f          
00685145          if ((m_numBuckets_1 & 1) != 0)
00685149              IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::flush(arg2);
00685149          
0068515c          m_numBuckets = arg2->m_hash.m_numBuckets;
00685160          SB_As32Bit_Compressed::Serialize(&arg3, &m_numBuckets, esi);
00685173          arg3 = arg2->m_hash.m_numElements;
00685177          SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
0068517c          uint32_t m_flags = esi->m_flags;
0068517c          
0068518a          if ((((int8_t)(m_flags >> 2)) & 1) == 0)
0068518a          {
00685190              class Archive* edi_1 = arg3;
00685190              
00685199              if ((m_numBuckets * 2) < edi_1)
006851ac                  Archive::RaiseError(esi);
00685199              else if (((m_flags & 5) == 0 && edi_1 > Archive::GetSizeLeft(esi)))
006851ac                  Archive::RaiseError(esi);
0068518a          }
0068518a          
006851b1          uint32_t m_flags_1 = esi->m_flags;
006851b1          
006851be          if ((m_flags_1 & 5) == 1)
006851be          {
006851c3              void* __offset(DLListData, -0x8) i = nullptr;
006851c3              
006851c7              if (arg2->m_hash.m_numElements > 0)
006851c7              {
006851c9                  class DLListData* head_ = arg2->m_list.head_;
006851c9                  
006851ce                  if (head_ == 0)
006851d5                      i = nullptr;
006851ce                  else
006851d0                      i = &head_[-1];
006851c7              }
006851c7              
006851de              if ((!(((int8_t)(m_flags_1 >> 2))) & 1) != 0)
006851de              {
006851e2                  while (i != 0)
006851e2                  {
006851e8                      Archive::CheckAlignment(esi, 4);
006851f1                      uint8_t* eax_4 = Archive::GetBytes(esi, 4);
006851f1                      
006851f8                      if (eax_4 != 0)
006851f8                      {
006851fe                          if ((esi->m_flags & 1) == 0)
00685208                              *(int32_t*)((char*)ADJ(i) + -8) = *(uint32_t*)eax_4;
006851fe                          else
00685202                              *(uint32_t*)eax_4 = *(int32_t*)((char*)ADJ(i) + -8);
006851f8                      }
006851f8                      
0068520e                      ActionMapValue::Serialize(((char*)i + 0x10), esi);
00685213                      class DLListData* dllist_next = ADJ(i)->dllist_next;
00685213                      
00685218                      if (dllist_next == 0)
0068521f                          i = nullptr;
00685218                      else
0068521a                          i = &dllist_next[-1];
0068521a                      
0068522c                      if ((!(((int8_t)(esi->m_flags >> 2))) & 1) == 0)
0068522c                          break;
006851e2                  }
006851de              }
006851be          }
006851be          
00685232          if ((esi->m_flags & 5) == 0)
00685232          {
00685238              char eax_6 = ((int8_t)arg3);
00685240              uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068524d              m_numBuckets = m_numBuckets;
00685259              uint32_t* eax_7 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, eax_6, nullptr);
00685259              
00685263              if (eax_7 == bucketSizesEnd_1)
00685265                  eax_7 -= 4;
00685265              
0068526d              IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::resize_internal(arg2, *(uint32_t*)eax_7);
00685276              int32_t ebp_2 = 0;
00685276              
0068527a              if (arg3 > 0)
0068527a              {
006852f3                  do
006852f3                  {
00685282                      void* eax_10 = operator new(0x20);
0068528c                      void* edi_2;
0068528c                      
0068528c                      if (eax_10 == 0)
006852a7                          edi_2 = nullptr;
0068528c                      else
0068528c                      {
0068528e                          __builtin_memset(((char*)eax_10 + 4), 0, 0x1c);
006852a3                          edi_2 = eax_10;
0068528c                      }
0068528c                      
006852ad                      Archive::CheckAlignment(esi, 4);
006852b6                      uint8_t* eax_11 = Archive::GetBytes(esi, 4);
006852b6                      
006852bd                      if (eax_11 != 0)
006852bd                      {
006852c3                          if ((esi->m_flags & 1) == 0)
006852cd                              *(uint32_t*)edi_2 = *(uint32_t*)eax_11;
006852c3                          else
006852c7                              *(uint32_t*)eax_11 = *(uint32_t*)edi_2;
006852bd                      }
006852bd                      
006852d3                      ActionMapValue::Serialize(((char*)edi_2 + 0x10), esi);
006852d3                      
006852e0                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
006852e0                          break;
006852e0                      
006852e7                      IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::push_tail(arg2, edi_2);
006852f0                      ebp_2 += 1;
006852f3                  } while (ebp_2 < arg3);
0068527a              }
00685232          }
00685130      }
00685120  }

006852fb                                                                                   90 90 90 90 90                             .....

00685300  uint8_t __thiscall HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::find(class HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1> const* this, uint32_t const* arg2, class HashList<unsigned long,ActionMapValue,1>* arg3)

00685300  {
00685305      uint32_t const esi = *(uint32_t*)arg2;
00685318      int32_t* i;
00685318      
00685318      for (i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, esi) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
00685318      {
00685322          if (*(uint32_t*)i == esi)
00685322          {
00685333              if (i == 0)
00685333                  break;
00685333              
0068533d              HashList<unsigned long,ActionMapValue,1>::operator=(arg3, &i[4]);
00685342              class HashList<ControlSpecification,unsigned long,1>* eax_3;
00685342              eax_3 = 1;
00685345              return 1;
00685322          }
00685318      }
00685318      
0068532b      i = 0;
0068532e      return 0;
00685300  }

00685348                          90 90 90 90 90 90 90 90                                                          ........

00685350  uint32_t __fastcall ActionMap::GetToggleType(class ActionMap const* this, uint32_t arg2, uint32_t arg3)

00685350  {
0068535f      int32_t var_78;
0068535f      IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>(&var_78, 0);
00685374      int32_t var_8 = 0;
0068537f      int32_t var_4 = 0;
00685392      void var_74;
00685392      void* var_18;
00685392      
00685392      if (HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::find(&this->m_hashInputMaps, &arg3, &var_78) != 0)
00685392      {
006853a5          int32_t result = 0;
006853a5          
006853b4          if (HashList<unsigned long,ActionMapValue,1>::find(&var_78, &arg2, &result) != 0)
006853b4          {
006853ba              IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
006853c9              var_78 = 0x7be66c;
006853c9              
006853d1              if (var_18 != &var_74)
006853d4                  operator delete[](var_18);
006853d4              
006853e6              return result;
006853b4          }
00685392      }
00685392      
006853ed      IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
006853fc      var_78 = 0x7be66c;
006853fc      
00685404      if (var_18 != &var_74)
00685407          operator delete[](var_18);
00685407      
00685417      return 0;
00685350  }

0068541a                                                                                90 90 90 90 90 90                            ......

00685420  uint8_t __thiscall ActionMap::IsActionAllowedInInputMap(class ActionMap const* this, uint32_t arg2, uint32_t arg3)

00685420  {
00685434      void* eax;
00685434      
00685434      if (arg2 != 1)
00685434      {
00685440          int32_t var_78;
00685440          IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>(&var_78, 0);
00685455          int32_t var_8_1 = 0;
0068545d          int32_t var_4_1 = 0;
0068546f          int32_t* ecx_3 = &var_78;
00685473          void var_74;
00685473          void* var_18;
00685473          
00685473          if (HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::find(&this->m_hashInputMaps, &arg3, &var_78) != 0)
00685473          {
00685487              int32_t ebx;
00685487              ebx = HashList<unsigned long,ActionMapValue,1>::contains(ecx_3, &arg2);
00685489              IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
00685498              var_78 = 0x7be66c;
00685498              
006854a0              if (var_18 != &var_74)
006854a3                  operator delete[](var_18);
006854a3              
006854ab              void* eax_3;
006854ab              eax_3 = ebx;
006854b2              return eax_3;
00685473          }
00685473          
006854b5          IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(ecx_3);
006854c4          var_78 = 0x7be66c;
006854c4          
006854cc          if (var_18 != &var_74)
006854cf              operator delete[](var_18);
006854cf          
006854d7          eax = 0;
00685434      }
00685434      
006854dd      return eax;
00685420  }


006854e0  uint8_t __fastcall ActionMap::IsUserBindable(class ActionMap const* this, uint32_t arg2, uint32_t arg3)

006854e0  {
006854ea      char ebx = 0;
006854f1      int32_t var_78;
006854f1      IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>(&var_78, 0);
00685506      int32_t var_8 = 0;
0068550d      int32_t var_4 = 0;
0068551b      void var_74;
0068551b      void* var_18;
0068551b      
0068551b      if (HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::find(&this->m_hashInputMaps, &arg3, &var_78) != 0)
0068551b      {
0068552e          int32_t var_84_1 = 0;
00685532          int32_t var_80_1 = 0;
0068553d          void var_88;
0068553d          
0068553d          if (HashList<unsigned long,ActionMapValue,1>::find(&var_78, &arg2, &var_88) != 0)
0068553d          {
00685549              if ((var_84_1 != 0 && var_80_1 != 0))
0068554b                  ebx = 1;
0068554b              
00685551              IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
00685560              var_78 = 0x7be66c;
00685560              
00685568              if (var_18 != &var_74)
0068556b                  operator delete[](var_18);
0068556b              
00685574              void* eax_2;
00685574              eax_2 = ebx;
0068557d              return eax_2;
0068553d          }
0068551b      }
0068551b      
00685584      IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
00685593      var_78 = 0x7be66c;
00685593      
0068559b      if (var_18 != &var_74)
0068559e          operator delete[](var_18);
0068559e      
006855a7      void* eax_3;
006855a7      eax_3 = 0;
006855b0      return 0;
006854e0  }

006855b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006855c0  uint32_t __fastcall ActionMap::GetActionClass(class ActionMap const* this, uint32_t arg2, uint32_t arg3)

006855c0  {
006855cf      int32_t var_78;
006855cf      IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>(&var_78, 0);
006855e4      int32_t var_8 = 0;
006855ef      int32_t var_4 = 0;
00685602      void var_74;
00685602      void* var_18;
00685602      
00685602      if (HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::find(&this->m_hashInputMaps, &arg3, &var_78) != 0)
00685602      {
00685615          int32_t result = 0;
00685624          void var_88;
00685624          
00685624          if (HashList<unsigned long,ActionMapValue,1>::find(&var_78, &arg2, &var_88) != 0)
00685624          {
0068562a              IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
00685639              var_78 = 0x7be66c;
00685639              
00685641              if (var_18 != &var_74)
00685644                  operator delete[](var_18);
00685644              
00685656              return result;
00685624          }
00685602      }
00685602      
0068565d      IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
0068566c      var_78 = 0x7be66c;
0068566c      
00685674      if (var_18 != &var_74)
00685677          operator delete[](var_18);
00685677      
00685687      return 0;
006855c0  }

0068568a                                90 90 90 90 90 90                                                            ......

00685690  uint8_t __thiscall ActionMap::GetDescripValues(class ActionMap const* this, uint32_t arg2, uint32_t arg3, class PStringBase<unsigned short>* arg4, class PStringBase<unsigned short>* arg5)

00685690  {
006856a1      int32_t var_78;
006856a1      IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>(&var_78, 0);
006856b6      int32_t var_8 = 0;
006856bd      int32_t var_4 = 0;
006856cb      void var_74;
006856cb      void* var_18;
006856cb      
006856cb      if (HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::find(&this->m_hashInputMaps, &arg3, &var_78) != 0)
006856cb      {
006856e2          int32_t var_88 = 0;
006856e6          int32_t var_84_1 = 0;
006856ea          int32_t var_80_1 = 0;
006856ee          int32_t var_7c_1 = 0;
006856ee          
006856f9          if (HashList<unsigned long,ActionMapValue,1>::find(&var_78, &arg2, &var_88) != 0)
006856f9          {
00685720              int32_t ebx;
00685720              ebx = ActionMapValue::GetDescriptionValues(&var_88, this->m_didStringTable.id, arg4, arg5);
00685722              IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
00685731              var_78 = 0x7be66c;
00685731              
00685739              if (var_18 != &var_74)
0068573c                  operator delete[](var_18);
0068573c              
00685744              void* eax_4;
00685744              eax_4 = ebx;
0068574f              return eax_4;
006856f9          }
006856cb      }
006856cb      
00685756      IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_78);
00685765      var_78 = 0x7be66c;
00685765      
0068576d      if (var_18 != &var_74)
00685770          operator delete[](var_18);
00685770      
00685779      void* eax_5;
00685779      eax_5 = 0;
00685782      return 0;
00685690  }

00685785                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00685790  void __fastcall IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::delete_contents(class IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this)

00685790  {
0068579b      while (this->m_numElements != 0)
0068579b      {
006857a9          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
006857af          struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_firstInterestingBucket_2;
006857af          void* ebx_1;
006857af          
006857af          if (this->m_firstInterestingBucket == ecx_1)
006857af          {
006857c2          label_6857c2:
006857c2              m_firstInterestingBucket_2 = nullptr;
006857c4              ebx_1 = nullptr;
006857af          }
006857af          else
006857af          {
006857b1              while (true)
006857b1              {
006857b1                  struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
006857b1                  
006857b6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
006857b6                  {
006857c8                      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
006857cb                      ebx_1 = *(uint32_t*)m_firstInterestingBucket_1;
006857cd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
006857cd                      break;
006857b6                  }
006857b6                  
006857bd                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
006857bd                  
006857c0                  if (&m_firstInterestingBucket[1] == ecx_1)
006857c0                      goto label_6857c2;
006857b1              }
006857af          }
006857af          
006857cf          struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
006857cf          
006857d3          if (m_hashNext == ebx_1)
006857e5              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
006857d3          else
006857d3          {
006857dc              struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData* m_hashNext_1;
006857dc              
006857dc              do
006857dc              {
006857d5                  m_hashNext_1 = m_hashNext;
006857d7                  m_hashNext = m_hashNext->m_hashNext;
006857dc              } while (m_hashNext != ebx_1);
006857dc              
006857e0              if (m_hashNext_1 != 0)
006857ec                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
006857e0              else
006857e5                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
006857d3          }
006857d3          
006857f5          this->m_numElements -= 1;
006857f5          
006857f8          if (ebx_1 != 0)
006857f8          {
006857ff              IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(((char*)ebx_1 + 0x10));
00685804              void* eax_4 = *(uint32_t*)((char*)ebx_1 + 0x70);
0068580c              *(uint32_t*)((char*)ebx_1 + 0x10) = 0x7be66c;
0068580c              
00685812              if (eax_4 != ((char*)ebx_1 + 0x14))
00685815                  operator delete[](eax_4);
00685815              
0068581e              *(uint32_t*)((char*)ebx_1 + 0x70) = 0;
00685821              *(uint32_t*)((char*)ebx_1 + 0x74) = 0;
00685824              *(uint32_t*)((char*)ebx_1 + 0x78) = 0;
00685827              *(uint32_t*)((char*)ebx_1 + 0x7c) = 0;
0068582a              operator delete(ebx_1);
006857f8          }
0068579b      }
00685790  }


00685840  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>,HashTableData<unsigned long,InputMapConflictsValue> *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>* arg2, class Archive* arg3)

00685840  {
00685845      class Archive* ebp = arg3;
00685845      
00685852      if ((!(ebp->m_flags) & 1) != 0)
00685858          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
00685858      
00685866      int32_t ebx;
00685866      
00685866      if ((((int8_t)ebp->m_flags) & 5) != 1)
006858a5          ebx = arg3;
00685866      else
00685866      {
0068586f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00685875          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0068587d          arg3 = arg2->m_numBuckets;
0068588d          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0068588d          
00685897          if (eax_2 == bucketSizesEnd_1)
00685899              eax_2 -= 4;
00685899          
006858a0          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
00685866      }
00685866      
006858ad      Archive::CheckAlignment(ebp, 1);
006858b6      uint8_t* eax_3 = Archive::GetBytes(ebp, 1);
006858bb      void* esi_1 = nullptr;
006858bb      
006858bf      if (eax_3 != 0)
006858bf      {
006858c5          if ((ebp->m_flags & 1) == 0)
006858cb              ebx = *(uint8_t*)eax_3;
006858c5          else
006858c7              *(uint8_t*)eax_3 = ebx;
006858bf      }
006858bf      
006858d1      if ((ebp->m_flags & 5) == 0)
006858d1      {
006858d9          uint32_t eax_4 = ((uint32_t)ebx);
006858d9          
006858de          if (eax_4 < 0x17)
006858f7              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
006858de          else
006858e2              Archive::RaiseError(ebp);
006858d1      }
006858d1      
00685903      if ((((int8_t)ebp->m_flags) & 5) == 1)
0068590c          arg3 = arg2->m_numElements;
0068590c      
0068591b      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, ebp);
0068591b      
0068592c      if ((((int8_t)ebp->m_flags) & 5) == 1)
0068592c      {
00685937          void __return;
00685937          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0068593c          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0068593e          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
00685941          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
00685941          
00685946          while (i != 0)
00685946          {
0068595c              do
0068595c              {
0068594f                  SerializeHashTableData<int,unsigned long,InputMapConflictsValue,SB_Default,SB_Default>(&arg3, i, ebp);
00685954                  i = i->m_hashNext;
0068595c              } while (i != 0);
0068595c              
00685967              while (true)
00685967              {
00685967                  m_currBucket = &m_currBucket[1];
00685967                  
0068596c                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0068596c                      break;
0068596c                  
0068596e                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0068596e                  
00685972                  if (i_1 != 0)
00685972                  {
00685974                      i = i_1;
00685976                      break;
00685972                  }
00685967              }
00685946          }
00685946          
00685978          esi_1 = nullptr;
0068592c      }
0068592c      
0068597e      if ((ebp->m_flags & 5) == 0)
0068597e      {
00685986          uint32_t eax_9 = Archive::GetSizeLeft(ebp);
0068598b          class Archive* ecx_12 = arg3;
0068598b          
00685991          if (ecx_12 > eax_9)
00685a04              Archive::RaiseError(ebp);
00685991          else
00685991          {
00685993              void* ebx_3 = nullptr;
00685995              int32_t edi_1 = 0;
00685995              
00685999              if (ecx_12 > 0)
00685999              {
006859a2                  while (true)
006859a2                  {
006859a2                      void* eax_10 = operator new(0x1c);
006859a2                      
006859ac                      if (eax_10 != 0)
006859ac                      {
006859ae                          *(uint32_t*)((char*)eax_10 + 4) = 0;
006859b1                          *(uint32_t*)((char*)eax_10 + 8) = 0;
006859b4                          *(uint32_t*)((char*)eax_10 + 0x10) = 0;
006859b7                          *(uint32_t*)((char*)eax_10 + 0x14) = 0;
006859ba                          *(uint32_t*)((char*)eax_10 + 0x18) = 0;
006859bd                          *(uint32_t*)((char*)eax_10 + 0xc) = 0x7a2be4;
006859c4                          esi_1 = eax_10;
006859ac                      }
006859ac                      
006859cd                      SerializeHashTableData<int,unsigned long,InputMapConflictsValue,SB_Default,SB_Default>(&arg3, esi_1, ebp);
006859cd                      
006859de                      if ((((int8_t)(ebp->m_flags >> 2)) & 1) != 0)
00685a10                          return;
00685a10                      
006859ed                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, esi_1, ebx_3) == 0)
006859ed                          break;
006859ed                      
006859f3                      edi_1 += 1;
006859f6                      ebx_3 = esi_1;
006859f6                      
006859f8                      if (edi_1 >= arg3)
00685a01                          return;
00685a01                      
0068599d                      esi_1 = nullptr;
006859a2                  }
006859a2                  
00685a04                  Archive::RaiseError(ebp);
00685999              }
00685991          }
0068597e      }
00685840  }

00685a11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00685a20  void __fastcall HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::flush(class HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>* this)

00685a20  {
00685a29      while (true)
00685a29      {
00685a29          void* __offset(DLListData, -0x8) ebx_1 = nullptr;
00685a29          
00685a2d          if (this->m_ihlIntrusive.m_hash.m_numElements <= 0)
00685a2d              break;
00685a2d          
00685a33          class DLListData* head_ = this->m_ihlIntrusive.m_list.head_;
00685a33          
00685a38          if (head_ != 0)
00685a38          {
00685a3a              class DLListData* dllist_prev = head_->dllist_prev;
00685a3a              
00685a3f              if (dllist_prev == 0)
00685a3f              {
00685a47                  class DLListData* dllist_next = head_->dllist_next;
00685a4b                  this->m_ihlIntrusive.m_list.head_ = dllist_next;
00685a4b                  
00685a4e                  if (dllist_next != 0)
00685a50                      dllist_next->dllist_prev = nullptr;
00685a3f              }
00685a3f              else
00685a43                  dllist_prev->dllist_next = head_->dllist_next;
00685a43              
00685a53              class DLListData* dllist_next_1 = head_->dllist_next;
00685a53              
00685a57              if (dllist_next_1 == 0)
00685a57              {
00685a64                  class DLListData* dllist_prev_1 = this->m_ihlIntrusive.m_list.tail_->dllist_prev;
00685a69                  this->m_ihlIntrusive.m_list.tail_ = dllist_prev_1;
00685a69                  
00685a6c                  if (dllist_prev_1 != 0)
00685a6e                      dllist_prev_1->dllist_next = 0;
00685a57              }
00685a57              else
00685a5c                  dllist_next_1->dllist_prev = head_->dllist_prev;
00685a5c              
00685a72              head_->dllist_next = 0;
00685a74              head_->dllist_prev = nullptr;
00685a74              
00685a77              if (head_ != 0)
00685a79                  ebx_1 = &head_[-1];
00685a38          }
00685a38          
00685a7c          int32_t esi_1 = *(int32_t*)((char*)ADJ(ebx_1) + -8);
00685a82          uint32_t temp1_1 = (COMBINE(0, esi_1) % this->m_ihlIntrusive.m_hash.m_numBuckets);
00685a85          struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_buckets = this->m_ihlIntrusive.m_hash.m_buckets;
00685a88          int32_t* i_1 = m_buckets[temp1_1];
00685a88          
00685a92          for (int32_t* i = i_1; i != 0; i = i[1])
00685a92          {
00685a96              if (*(uint32_t*)i == esi_1)
00685a96              {
00685aa3                  if (i != 0)
00685aa3                  {
00685aa7                      if (i_1 == i)
00685a8b                          m_buckets[temp1_1] = i_1[1];
00685aa7                      else
00685aa7                      {
00685ab7                          int32_t* i_2;
00685ab7                          
00685ab7                          do
00685ab7                          {
00685ab0                              i_2 = i_1;
00685ab2                              i_1 = i_1[1];
00685ab7                          } while (i_1 != i);
00685ab7                          
00685abb                          if (i_2 != 0)
00685ac7                              i_2[1] = i_1[1];
00685abb                          else
00685a8b                              m_buckets[temp1_1] = i_1[1];
00685aa7                      }
00685aa7                      
00685aca                      this->m_ihlIntrusive.m_hash.m_numElements -= 1;
00685aa3                  }
00685aa3                  
00685aa3                  break;
00685a96              }
00685a92          }
00685a92          
00685ad2          IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(((char*)ebx_1 + 0x10));
00685ad7          void* eax_4 = *(int32_t*)((char*)((char*)ebx_1 + 8) + 0x68);
00685adf          *(int32_t*)((char*)((char*)ebx_1 + 8) + 8) = 0x7be66c;
00685adf          
00685ae5          if (eax_4 != ((char*)ebx_1 + 0x14))
00685ae8              operator delete[](eax_4);
00685ae8          
00685af3          *(int32_t*)((char*)((char*)ebx_1 + 8) + 0x68) = 0;
00685af6          *(int32_t*)((char*)((char*)ebx_1 + 8) + 0x6c) = 0;
00685af9          *(int32_t*)((char*)((char*)ebx_1 + 8) + 0x70) = 0;
00685afc          *(int32_t*)((char*)((char*)ebx_1 + 8) + 0x74) = 0;
00685aff          operator delete(ebx_1);
00685a29      }
00685a20  }

00685b11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00685b20  void __fastcall IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::delete_contents(class IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* this)

00685b20  {
00685b68      class DLListData* head_;
00685b68      
00685b68      do
00685b68      {
00685b24          head_ = this->m_list.head_;
00685b24          
00685b29          if (head_ == 0)
00685b29              break;
00685b29          
00685b2b          class DLListData* dllist_prev = head_->dllist_prev;
00685b2b          
00685b30          if (dllist_prev == 0)
00685b30          {
00685b38              class DLListData* dllist_next = head_->dllist_next;
00685b3c              this->m_list.head_ = dllist_next;
00685b3c              
00685b3f              if (dllist_next != 0)
00685b41                  dllist_next->dllist_prev = nullptr;
00685b30          }
00685b30          else
00685b34              dllist_prev->dllist_next = head_->dllist_next;
00685b34          
00685b44          class DLListData* dllist_next_1 = head_->dllist_next;
00685b44          
00685b48          if (dllist_next_1 == 0)
00685b48          {
00685b55              class DLListData* dllist_prev_1 = this->m_list.tail_->dllist_prev;
00685b5a              this->m_list.tail_ = dllist_prev_1;
00685b5a              
00685b5d              if (dllist_prev_1 != 0)
00685b5f                  dllist_prev_1->dllist_next = 0;
00685b48          }
00685b48          else
00685b4d              dllist_next_1->dllist_prev = head_->dllist_prev;
00685b4d          
00685b63          head_->dllist_next = 0;
00685b65          head_->dllist_prev = nullptr;
00685b68      } while (head_ != 0);
00685b6c      /* tailcall */
00685b6c      return IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::delete_contents(this);
00685b20  }

00685b71                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00685b80  void __fastcall ActionMap::Destroy(class ActionMap* this)

00685b80  {
00685b85      this->m_didStringTable.id = INVALID_DID.id;
00685b8e      /* tailcall */
00685b8e      return HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::flush(&this->m_hashInputMaps);
00685b80  }

00685b93                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00685ba0  void __fastcall ActionMap::ActionMap(class ActionMap* this)

00685ba0  {
00685baa      DBObj::DBObj(this, INVALID_DID.id);
00685bb6      this->vtable = 0x7fee10;
00685bbc      IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>(&this->m_hashInputMaps, 0);
00685baf      this->m_hashInputMaps.m_ihlIntrusive.m_list.head_ = 0;
00685baf      this->m_hashInputMaps.m_ihlIntrusive.m_list.tail_ = nullptr;
00685bd5      this->m_didStringTable.id = INVALID_DID.id;
00685be3      this->m_hashConflictingMaps.vtable = &HashTable<unsigned long,class InputMapConflictsValue,0>::`vftable';
00685bed      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>(&this->m_hashConflictingMaps.m_intrusiveTable, 0x17);
00685ba0  }

00685bf7                                                                       90 90 90 90 90 90 90 90 90                         .........

00685c00  uint32_t ActionMap::GetDBOType(class ActionMap const* this @ ecx) __pure

00685c00  {
00685c05      return 0x27;
00685c00  }

00685c06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00685c10  void __fastcall ActionMap::~ActionMap(class ActionMap* this)

00685c10  {
00685c1b      this->vtable = 0x7fee10;
00685c23      this->m_hashConflictingMaps.vtable = &HashTable<unsigned long,class InputMapConflictsValue,0>::`vftable';
00685c2d      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>::delete_contents(&this->m_hashConflictingMaps.m_intrusiveTable);
00685c32      class HashTableData<unsigned long,InputMapConflictsValue>** m_buckets = this->m_hashConflictingMaps.m_intrusiveTable.m_buckets;
00685c15      this->m_hashConflictingMaps.m_intrusiveTable.vtable = 0x7fee08;
00685c15      
00685c40      if (m_buckets != &this->m_hashConflictingMaps.m_intrusiveTable.m_aInplaceBuckets)
00685c43          operator delete[](m_buckets);
00685c43      
00685c15      this->m_hashConflictingMaps.m_intrusiveTable.m_buckets = nullptr;
00685c15      this->m_hashConflictingMaps.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00685c15      this->m_hashConflictingMaps.m_intrusiveTable.m_numBuckets = 0;
00685c15      this->m_hashConflictingMaps.m_intrusiveTable.m_numElements = 0;
00685c5e      IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::delete_contents(&this->m_hashInputMaps);
00685c63      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** m_buckets_1 = this->m_hashInputMaps.m_ihlIntrusive.m_hash.m_buckets;
00685c59      this->m_hashInputMaps.m_ihlIntrusive.m_hash.vtable = &IntrusiveHashTable<unsigned long,struct HashList<unsigned long,class HashList<unsigned long,class ActionMapValue,1>,1>::HashListData*,1>::`vftable';
00685c59      
00685c71      if (m_buckets_1 != &this->m_hashInputMaps.m_ihlIntrusive.m_hash.m_aInplaceBuckets)
00685c74          operator delete[](m_buckets_1);
00685c74      
00685c59      this->m_hashInputMaps.m_ihlIntrusive.m_hash.m_buckets = nullptr;
00685c59      this->m_hashInputMaps.m_ihlIntrusive.m_hash.m_firstInterestingBucket = nullptr;
00685c59      this->m_hashInputMaps.m_ihlIntrusive.m_hash.m_numBuckets = 0;
00685c59      this->m_hashInputMaps.m_ihlIntrusive.m_hash.m_numElements = 0;
00685c8d      /* tailcall */
00685c8d      return DBObj::~DBObj(this);
00685c10  }

00685c92                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00685ca0  class DBObj* ActionMap::Allocate(class ActionMap const* this @ ecx)

00685ca0  {
00685ca0      /* tailcall */
00685ca0      return ActionMap::Allocator();
00685ca0  }

00685ca5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00685cb0  void* __thiscall ActionMap::`scalar deleting destructor'(class ActionMap* this, uint32_t arg2)

00685cb0  {
00685cb3      ActionMap::~ActionMap(this);
00685cb3      
00685cbd      if ((arg2 & 1) != 0)
00685cc0          operator delete(this);
00685cc0      
00685ccb      return this;
00685cb0  }

00685cce                                            90 90                                                                ..

00685cd0  void Serializer::SerializeObject(struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData* arg1, class Archive* arg2)

00685cd0  {
00685cd9      Archive::CheckAlignment(arg2, 4);
00685ce2      uint8_t* eax;
00685ce2      class IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* edx;
00685ce2      eax = Archive::GetBytes(arg2, 4);
00685ce9      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData* ecx_2 = arg1;
00685ce9      
00685ced      if (eax != 0)
00685ced      {
00685cf3          if ((arg2->m_flags & 1) != 0)
00685cf3          {
00685cf5              class IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* m_hashKey = ecx_2->m_hashKey;
00685cfa              class Archive* var_8 = arg2;
00685cfb              class Archive* var_c = &ecx_2->m_data.m_ihlIntrusive.m_hash.vtable;
00685d00              struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** var_10 = &arg1;
00685d01              *(uint32_t*)eax = m_hashKey;
00685d03              <int32_t,class IntrusiveHashList<unsigned long,struct HashList<unsigned long,class ActionMapValue,1>::HashListData*,1>,struct HashList<unsigned long,class ActionMapValue,1>::HashListData*,struct SB_Default>::SerializeIntrusiveHashList(eax, m_hashKey, &ecx_2->m_data.m_ihlIntrusive.m_hash.vtable);
00685d0c              return;
00685cf3          }
00685cf3          
00685d0d          eax = *(uint32_t*)eax;
00685d0f          ecx_2->m_hashKey = eax;
00685ced      }
00685ced      
00685d14      class Archive* var_8_1 = arg2;
00685d15      class HashList<unsigned long,ActionMapValue,1>* var_c_1 = &ecx_2->m_data;
00685d1a      struct HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData** var_10_1 = &arg1;
00685d1b      <int32_t,class IntrusiveHashList<unsigned long,struct HashList<unsigned long,class ActionMapValue,1>::HashListData*,1>,struct HashList<unsigned long,class ActionMapValue,1>::HashListData*,struct SB_Default>::SerializeIntrusiveHashList(eax, edx, &ecx_2->m_data);
00685cd0  }

00685d25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00685d30  void __convention("regparm") <int32_t,class IntrusiveHashList<unsigned long,struct HashList<unsigned long,class HashList<unsigned long,class ActionMapValue,1>,1>::HashListData*,1>,struct HashList<unsigned long,class HashList<unsigned long,class ActionMapValue,1>,1>::HashListData*,struct SB_Default>::SerializeIntrusiveHashList(int32_t const* arg1, class IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* arg2, class Archive* arg3)

00685d30  {
00685d30      uint32_t m_numBuckets_1;
00685d30      uint32_t m_numBuckets = m_numBuckets_1;
00685d32      class Archive* edi = arg3;
00685d32      
00685d40      if ((!(((int8_t)(edi->m_flags >> 2))) & 1) != 0)
00685d40      {
00685d46          m_numBuckets_1 = edi->m_flags;
00685d4e          m_numBuckets_1 = !(m_numBuckets_1);
00685d4e          
00685d55          if ((m_numBuckets_1 & 1) != 0)
00685d59              IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::flush(arg2);
00685d59          
00685d6c          m_numBuckets = arg2->m_hash.m_numBuckets;
00685d70          SB_As32Bit_Compressed::Serialize(&arg3, &m_numBuckets, edi);
00685d83          arg3 = arg2->m_hash.m_numElements;
00685d87          SB_As32Bit_Compressed::Serialize(&arg3, &arg3, edi);
00685d8c          uint32_t m_flags = edi->m_flags;
00685d8c          
00685d9a          if ((((int8_t)(m_flags >> 2)) & 1) == 0)
00685d9a          {
00685da0              class Archive* esi_1 = arg3;
00685da0              
00685da9              if ((m_numBuckets * 2) < esi_1)
00685dbc                  Archive::RaiseError(edi);
00685da9              else if (((m_flags & 5) == 0 && esi_1 > Archive::GetSizeLeft(edi)))
00685dbc                  Archive::RaiseError(edi);
00685d9a          }
00685d9a          
00685dc1          uint32_t m_flags_1 = edi->m_flags;
00685dc1          
00685dcc          if ((m_flags_1 & 5) == 1)
00685dcc          {
00685dd1              void* __offset(DLListData, -0x8) i = nullptr;
00685dd1              
00685dd5              if (arg2->m_hash.m_numElements > 0)
00685dd5              {
00685dd7                  class DLListData* head_ = arg2->m_list.head_;
00685dd7                  
00685ddc                  if (head_ == 0)
00685de3                      i = nullptr;
00685ddc                  else
00685dde                      i = &head_[-1];
00685dd5              }
00685dd5              
00685ded              if ((!(((int8_t)(m_flags_1 >> 2))) & 1) != 0)
00685ded              {
00685df2                  while (i != 0)
00685df2                  {
00685df6                      Serializer::SerializeObject(i, edi);
00685dfb                      class DLListData* dllist_next = ADJ(i)->dllist_next;
00685dfb                      
00685e03                      if (dllist_next == 0)
00685e0a                          i = nullptr;
00685e03                      else
00685e05                          i = &dllist_next[-1];
00685e05                      
00685e17                      if ((!(((int8_t)(edi->m_flags >> 2))) & 1) == 0)
00685e17                          break;
00685df2                  }
00685ded              }
00685dcc          }
00685dcc          
00685e1d          if ((edi->m_flags & 5) == 0)
00685e1d          {
00685e23              char eax_5 = ((int8_t)arg3);
00685e2b              uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00685e38              m_numBuckets = m_numBuckets;
00685e44              uint32_t* eax_6 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, eax_5, nullptr);
00685e44              
00685e4e              if (eax_6 == bucketSizesEnd_1)
00685e50                  eax_6 -= 4;
00685e50              
00685e58              IntrusiveHashTable<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::resize_internal(arg2, *(uint32_t*)eax_6);
00685e61              int32_t ebx_2 = 0;
00685e61              
00685e65              if (arg3 > 0)
00685e65              {
00685efa                  do
00685efa                  {
00685e7a                      void* esi_2 = operator new(0x88);
00685e7a                      
00685e81                      if (esi_2 == 0)
00685ea4                          esi_2 = nullptr;
00685e81                      else
00685e81                      {
00685e83                          *(uint32_t*)((char*)esi_2 + 4) = 0;
00685e86                          *(uint32_t*)((char*)esi_2 + 8) = 0;
00685e89                          *(uint32_t*)((char*)esi_2 + 0xc) = 0;
00685e93                          IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>(((char*)esi_2 + 0x10), 0);
00685e9a                          *(uint32_t*)((char*)esi_2 + 0x80) = 0;
00685e9d                          *(uint32_t*)((char*)esi_2 + 0x84) = 0;
00685e81                      }
00685e81                      
00685eaa                      Archive::CheckAlignment(edi, 4);
00685eb3                      uint8_t* eax_10;
00685eb3                      class Archive* ecx_11;
00685eb3                      class IntrusiveHashList<unsigned long,HashList<unsigned long,ActionMapValue,1>::HashListData *,1>* edx_8;
00685eb3                      eax_10 = Archive::GetBytes(edi, 4);
00685eb3                      
00685eba                      if (eax_10 != 0)
00685eba                      {
00685ec0                          if ((edi->m_flags & 1) == 0)
00685ec0                          {
00685ec8                              edx_8 = *(uint32_t*)eax_10;
00685eca                              *(uint32_t*)esi_2 = edx_8;
00685ec0                          }
00685ec0                          else
00685ec0                          {
00685ec2                              ecx_11 = *(uint32_t*)esi_2;
00685ec4                              *(uint32_t*)eax_10 = ecx_11;
00685ec0                          }
00685eba                      }
00685eba                      
00685ecc                      class Archive* var_18_4 = edi;
00685ed0                      void* var_1c_4 = ((char*)esi_2 + 0x10);
00685ed5                      class Archive** var_20_3 = &arg3;
00685ed6                      <int32_t,class IntrusiveHashList<unsigned long,struct HashList<unsigned long,class ActionMapValue,1>::HashListData*,1>,struct HashList<unsigned long,class ActionMapValue,1>::HashListData*,struct SB_Default>::SerializeIntrusiveHashList(((char*)esi_2 + 0x10), edx_8, ecx_11);
00685ed6                      
00685ee7                      if ((((int8_t)(edi->m_flags >> 2)) & 1) != 0)
00685ee7                          break;
00685ee7                      
00685eee                      IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>::push_tail(arg2, esi_2);
00685ef7                      ebx_2 += 1;
00685efa                  } while (ebx_2 < arg3);
00685e65              }
00685e1d          }
00685d40      }
00685d30  }

00685e6d                                         8d 49 00                                                               .I.
00685f06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00685f10  void __thiscall ActionMap::Serialize(class ActionMap* this, class Archive* arg2)

00685f10  {
00685f11      class Archive* esi = arg2;
00685f19      class Archive* ecx;
00685f19      class IntrusiveHashList<unsigned long,HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>::HashListData *,1>* edx;
00685f19      ecx = DBObj::Serialize(this, esi);
00685f1e      class Archive* var_c_1 = esi;
00685f22      class HashList<unsigned long,HashList<unsigned long,ActionMapValue,1>,1>* var_10 = &this->m_hashInputMaps;
00685f27      class Archive** var_14 = &arg2;
00685f28      <int32_t,class IntrusiveHashList<unsigned long,struct HashList<unsigned long,class HashList<unsigned long,class ActionMapValue,1>,1>::HashListData*,1>,struct HashList<unsigned long,class HashList<unsigned long,class ActionMapValue,1>,1>::HashListData*,struct SB_Default>::SerializeIntrusiveHashList(&this->m_hashInputMaps, edx, ecx);
00685f34      Archive::CheckAlignment(esi, 4);
00685f3d      uint32_t* eax_1 = Archive::GetBytes(esi, 4);
00685f3d      
00685f44      if (eax_1 != 0)
00685f44      {
00685f4a          if ((esi->m_flags & 1) == 0)
00685f58              this->m_didStringTable.id = *(uint32_t*)eax_1;
00685f4a          else
00685f52              *(uint32_t*)eax_1 = this->m_didStringTable.id;
00685f44      }
00685f44      
00685f66      if ((!(esi->m_flags) & 1) != 0)
00685f6e          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>::delete_contents(&this->m_hashConflictingMaps.m_intrusiveTable);
00685f6e      
00685f80      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,InputMapConflictsValue> *,0>,HashTableData<unsigned long,InputMapConflictsValue> *,SB_Default>(&arg2, &this->m_hashConflictingMaps.m_intrusiveTable, esi);
00685f10  }

00685f8d                                         90 90 90                                                               ...

00685f90  uint32_t __thiscall ControlSpecification::operator%(class ControlSpecification const* this, uint32_t arg2)

00685f90  {
00685f9a      return (COMBINE(0, this->__inner0) % arg2);
00685f90  }

00685f9d                                                                                         90 90 90                               ...

00685fa0  void __fastcall CInputManager_WIN32::InputDevice::InputDevice(struct CInputManager_WIN32::InputDevice* this)

00685fa0  {
00685fa5      __builtin_memset(this, 0, 0x24);
00685ff3      this->iDeviceIndex = 0xffffffff;
00685ffa      this->nType = 0;
00685ffd      this->bActive = 0;
00685fa0  }

00686002        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00686010  uint8_t __fastcall CInputManager_WIN32::InitializeKeymap(class CInputManager_WIN32* this)

00686010  {
00686013      this->vtable->ClearKeyMap();
00686018      class ActionMap* m_action_map = this->m_action_map;
00686018      
00686021      if (m_action_map != 0)
00686023          m_action_map->vtable->ReloadFromDisk();
00686023      
00686028      int32_t eax_1;
00686028      eax_1 = 1;
0068602a      return 1;
00686010  }

0068602b                                   90 90 90 90 90                                                             .....

00686030  uint8_t __thiscall CInputManager_WIN32::AddDeviceToInputMap(class CInputManager_WIN32* this, struct CInputManager_WIN32::InputDevice* arg2)

00686030  {
00686038      uint32_t nType = arg2->nType;
0068603e      int32_t var_14;
0068603e      
0068603e      if (nType == 0x12)
00686066          var_14 = 2;
0068603e      else if (nType == 0x13)
0068605c          var_14 = 1;
00686041      else if (nType == 0x1c)
00686052          var_14 = 4;
00686046      else
00686048          var_14 = 3;
00686048      
00686073      uint32_t Data1 = arg2->guidInstance.Data1;
00686077      int32_t edx_1;
00686077      edx_1 = arg2->guidInstance.Data2;
00686077      *(uint16_t*)((char*)edx_1)[2] = arg2->guidInstance.Data3;
0068607a      int32_t var_c = edx_1;
0068607e      int32_t edx_2;
0068607e      edx_2 = arg2->guidInstance.Data4[0];
0068607e      *(uint8_t*)((char*)edx_2)[1] = arg2->guidInstance.Data4[1];
0068607e      *(uint8_t*)((char*)edx_2)[2] = arg2->guidInstance.Data4[2];
0068607e      *(uint8_t*)((char*)edx_2)[3] = arg2->guidInstance.Data4[3];
00686081      int32_t eax_4;
00686081      eax_4 = arg2->guidInstance.Data4[4];
00686081      *(uint8_t*)((char*)eax_4)[1] = arg2->guidInstance.Data4[5];
00686081      *(uint8_t*)((char*)eax_4)[2] = arg2->guidInstance.Data4[6];
00686081      *(uint8_t*)((char*)eax_4)[3] = arg2->guidInstance.Data4[7];
00686084      int32_t var_8 = edx_2;
00686093      int32_t var_4 = eax_4;
0068609c      arg2->iDeviceIndex = CMasterInputMap::AddDeviceEntry(&this->m_InputMap, &var_14);
0068609f      uint32_t eax_5;
0068609f      eax_5 = 1;
006860a5      return 1;
00686030  }

006860a8                          90 90 90 90 90 90 90 90                                                          ........

006860b0  uint8_t __fastcall CInputManager_WIN32::ClearKeyMap(class CInputManager_WIN32* this)

006860b0  {
006860b6      CMasterInputMap::Clear(&this->m_InputMap);
006860bb      int32_t eax;
006860bb      eax = 1;
006860bd      return 1;
006860b0  }

006860be                                                                                            90 90                                ..

006860c0  uint8_t __thiscall CInputManager_WIN32::IsMetaKey(class CInputManager_WIN32 const* this, class ControlSpecification arg2)

006860c0  {
006860c4      class CInputManager_WIN32* this_1 = this;
006860d4      return CMasterInputMap::IsMetaKey(&this->m_InputMap, arg2);
006860c0  }

006860d7                                                                       90 90 90 90 90 90 90 90 90                         .........

006860e0  uint8_t __stdcall CInputManager_WIN32::PollDevice(class CInputManager_WIN32* this @ ecx, struct IDirectInputDevice8A* arg2, uint8_t arg3)

006860e0  {
006860e7      if (arg2 == 0)
006860e7      {
00686131          int32_t eax;
00686131          eax = 0;
00686134          return 0;
006860e7      }
006860e7      
006860ea      int32_t ebx;
006860ea      ebx = arg3;
006860f3      int32_t eax_2;
006860f3      
006860f3      while (true)
006860f3      {
006860f3          eax_2 = arg2->vtable->Poll(arg2);
006860f3          
006860f8          if (eax_2 >= 0)
006860f8              break;
006860f8          
006860ff          bool cond:1_1;
006860ff          
006860ff          if (eax_2 > 0x80070015)
00686118              cond:1_1 = eax_2 != 0x8007001e;
006860ff          else
006860ff          {
0068610f              if (((eax_2 == 0x80070015 || eax_2 == 0x80040207) || eax_2 == 0x80040209))
0068610f              {
00686138                  eax_2 = 0;
0068613b                  return 0;
0068610f              }
0068610f              
00686111              cond:1_1 = eax_2 != 0x8007000c;
006860ff          }
006860ff          
00686121          if ((cond:1_1 || ebx == 0))
00686121          {
00686138              eax_2 = 0;
0068613b              return 0;
00686121          }
00686121          
0068612b          if (arg2->vtable->Acquire(arg2) < 0)
0068612b          {
00686138              eax_2 = 0;
0068613b              return 0;
0068612b          }
0068612b          
0068612d          ebx = 0;
006860f3      }
006860f3      
0068613f      eax_2 = 1;
00686142      return 1;
006860e0  }

00686145                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00686150  void __thiscall CInputManager_WIN32::UpdateCharacter(class CInputManager_WIN32* this, wchar16 arg2)

00686150  {
0068616b      if ((this->m_bIgnoreNextChar == 0 && (this->m_textMode != 0 && this->m_fMainWindowHasFocus != 0)))
00686172          CInputManager::CallCharacterHandler(this, arg2);
00686172      
00686177      this->m_bIgnoreNextChar = 0;
00686150  }

00686182        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00686190  enum ControlType __stdcall CInputManager_WIN32::DITypeToControlType(class CInputManager_WIN32* this @ ecx, uint32_t arg2)

00686190  {
00686199      if ((((uint32_t)arg2) - 1) <= 0xf)
006861a2          switch (arg2)
006861a2          {
006861b6              case 1:
006861b6              {
006861b6                  return 2;
006861b6                  break;
006861b6              }
006861be              case 2:
006861be              {
006861be                  return 3;
006861be                  break;
006861be              }
006861ae              case 4:
006861ae              case 8:
006861ae              {
006861ae                  return 1;
006861ae                  break;
006861ae              }
006861c6              case 0x10:
006861c6              {
006861c6                  return 4;
006861c6                  break;
006861c6              }
006861a2          }
006861a2      
006861cb      return 0;
00686190  }

006861ce                                            8b ff                                                                ..
006861d0  uint32_t jump_table_6861d0[0x5] = 
006861d0  {
006861d0      [0x0] =  0x006861b1
006861d4      [0x1] =  0x006861b9
006861d8      [0x2] =  0x006861a9
006861dc      [0x3] =  0x006861c1
006861e0      [0x4] =  0x006861c9
006861e4  }
006861e4  uint8_t lookup_table_6861e4[0x10] = 
006861e4  {
006861e4      [0x0] =  0x00
006861e5      [0x1] =  0x01
006861e6      [0x2] =  0x04
006861e7      [0x3] =  0x02
006861e8      [0x4] =  0x04
006861e9      [0x5] =  0x04
006861ea      [0x6] =  0x04
006861eb      [0x7] =  0x02
006861ec      [0x8] =  0x04
006861ed      [0x9] =  0x04
006861ee      [0xa] =  0x04
006861ef      [0xb] =  0x04
006861f0      [0xc] =  0x04
006861f1      [0xd] =  0x04
006861f2      [0xe] =  0x04
006861f3      [0xf] =  0x03
006861f4  }

006861f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00686200  uint32_t __stdcall CInputManager_WIN32::DIDataToActivationType(class CInputManager_WIN32* this @ ecx, enum ControlType arg2, uint32_t arg3, float* arg4)

00686200  {
00686208      if ((arg2 - 1) > 3)
006862b5          return 0;
006862b5      
0068620e      switch (arg2)
0068620e      {
0068621d          case ct_Button:
0068621d          {
0068621d              if (arg3 == 0x80)
0068621d              {
00686223                  *(uint32_t*)arg4 = 1f;
0068622e                  return 1;
0068621d              }
0068621d              
00686235              *(uint32_t*)arg4 = 0f;
00686240              return 2;
0068621d              break;
0068621d          }
00686250          case ct_RelAxis:
00686250          {
00686250              *(uint32_t*)arg4 = ((float)((long double)arg3));
00686252              return 0x80;
00686250              break;
00686250          }
00686263          case ct_AbsAxis:
00686263          {
00686263              *(uint32_t*)arg4 = ((float)(((long double)arg3) * ((long double)0.0625f)));
0068626a              return 0x80;
00686263              break;
00686263          }
00686279          case ct_POV:
00686279          {
00686279              if ((arg3 == 0xffffffff || arg3 == 1))
00686279              {
006862a5                  *(uint32_t*)arg4 = -1f;
006862b0                  return 0x80;
00686279              }
00686279              
00686281              long double x87_r7_3 = ((long double)arg3);
00686281              
00686285              if (!(arg3 >= 0))
00686287                  x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
00686287              
0068629c              *(uint32_t*)arg4 = ((float)(x87_r7_3 * ((long double)0.000277777785f)));
0068629e              return 0x80;
00686279              break;
00686279          }
0068620e      }
00686200  }

006862b8  uint32_t jump_table_6862b8[0x4] = 
006862b8  {
006862b8      [0x0] =  0x00686215
006862bc      [0x1] =  0x00686243
006862c0      [0x2] =  0x00686255
006862c4      [0x3] =  0x0068626d
006862c8  }

006862c8                          90 90 90 90 90 90 90 90                                                          ........

006862d0  enum SubControlIndex __stdcall CInputManager_WIN32::SubControlFromData(class CInputManager_WIN32* this @ ecx, enum ControlType arg2, uint32_t arg3) __pure

006862d0  {
006862d7      if (arg2 >= ct_RelAxis)
006862d7      {
006862dc          if (arg2 <= ct_AbsAxis)
006862dc          {
00686334              if (arg3 > 0)
0068633b                  return 1;
0068633b              
00686342              int32_t ecx;
00686342              ecx = arg3 >= 0;
0068634b              return ((ecx - 1) & 2);
006862dc          }
006862dc          
006862ef          if ((arg2 == ct_POV && (arg3 != 0xffffffff && arg3 != 1)))
006862ef          {
006862f6              if (arg3 < 0x1c2)
006862fd                  return 3;
006862fd              
00686305              if (arg3 < 0x546)
0068630c                  return 4;
0068630c              
00686314              if (arg3 >= 0x8ca)
0068632b                  return (((arg3 - arg3) & 3) + 3);
0068632b              
0068631b              return 5;
006862ef          }
006862d7      }
006862d7      
00686350      return 0;
006862d0  }

00686353                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00686360  void __fastcall CInputManager_WIN32::SyncCursorToMousePos(class CInputManager_WIN32* this)

00686360  {
00686366      int32_t y = this->m_ptMousePos.y;
00686369      struct HWND__* m_hwnd = this->m_hwnd;
0068636f      int32_t x = this->m_ptMousePos.x;
0068636f      
00686385      if (ClientToScreen(m_hwnd, &x) != 0)
00686391          SetCursorPos(x, y);
00686360  }

0068639b                                                                                   90 90 90 90 90                             .....

006863a0  uint8_t __thiscall CInputManager_WIN32::BindAction(class CInputManager_WIN32* this, class QualifiedControl arg2, uint32_t arg3, uint32_t arg4)

006863a0  {
006863a4      uint32_t var_4 = arg4;
006863ab      uint32_t edx;
006863ab      class CInputMap* eax = CMasterInputMap::CreateInputMap(&this->m_InputMap, edx);
006863ab      
006863b2      if (eax == 0)
006863b2      {
006863dc          eax = 0;
006863de          return 0;
006863b2      }
006863b2      
006863bd      union __inner0 = arg2.m_key.__inner0;
006863c3      uint32_t m_metamode = arg2.m_metamode;
006863ca      uint32_t m_activation = arg2.m_activation;
006863d9      return CInputMap::AddMapping(eax, arg3, arg3);
006863a0  }

006863e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006863f0  uint8_t __thiscall CInputManager_WIN32::FindConflictingInputMaps(class CInputManager_WIN32 const* this, uint32_t arg2, class List<unsigned long>* arg3)

006863f0  {
006863f0      class ActionMap* m_action_map = this->m_action_map;
006863f0      
006863f8      if (m_action_map != 0)
006863fa          /* tailcall */
006863fa          return ActionMap::GetConflictingInputMaps(m_action_map, arg2, arg3);
006863fa      
006863ff      int32_t eax;
006863ff      eax = 0;
00686401      return 0;
006863f0  }

00686404              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00686410  void __thiscall CInputManager_WIN32::SendActionToListeners(class CInputManager_WIN32* this, class InputEvent* arg2)

00686410  {
0068641b      if (this->m_bProcessingKeyDown != 0)
0068641d          this->m_bProcessingActionInResponseToKeyDown = 1;
0068641d      
0068642b      CInputManager::SendActionToListeners(this, arg2);
00686430      this->m_bProcessingActionInResponseToKeyDown = 0;
00686410  }

0068643b                                                                                   90 90 90 90 90                             .....

00686440  void __fastcall SmartArray<CInputManager_WIN32::InputDevice,1>::Reset(class SmartArray<CInputManager_WIN32::InputDevice,1>* this)

00686440  {
00686446      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0068645a      this->m_num = 0;
0068645a      
0068645d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0068645d      {
00686463          operator delete[](this->m_data);
0068646b          this->m_data = 0;
0068646e          this->m_sizeAndDeallocate = 0;
00686476          return;
0068645d      }
0068645d      
0068647a      if (this->m_data != 0)
0068647a      {
0068647c          int32_t eax = (m_sizeAndDeallocate & 0x7fffffff);
0068647c          
00686482          if ((eax - 1) >= 0)
00686482          {
00686488              int32_t ebx_2 = ((eax - 1) * 0x30);
0068648d              int32_t var_34_1 = eax;
006864b4              bool cond:1_1;
006864b4              
006864b4              do
006864b4              {
00686495                  void var_30;
00686495                  int32_t eax_3 = CInputManager_WIN32::InputDevice::InputDevice(&var_30);
006864a3                  void* edi_2 = (this->m_data + ebx_2);
006864a5                  ebx_2 -= 0x30;
006864ad                  cond:1_1 = var_34_1 != 1;
006864ae                  __builtin_memcpy(edi_2, eax_3, 0x30);
006864b0                  var_34_1 -= 1;
006864b4              } while (cond:1_1);
00686482          }
0068647a      }
00686440  }

006864be                                                                                            90 90                                ..

006864c0  uint8_t __thiscall CInputManager_WIN32::AddKeyMap(class CInputManager_WIN32* this, uint32_t arg2)

006864c0  {
006864c6      int32_t __saved_ebx = 0x1d;
006864c8      int32_t var_10 = 0xa;
006864ca      uint32_t var_14 = arg2;
006864d2      int32_t edx;
006864d2      class DBObj* esi = DBObj::GetByEnum(arg2, edx, this);
006864d7      class DBObj* eax;
006864d7      eax = 0;
006864d7      
006864db      if (esi != 0)
006864db      {
006864f0          int32_t ebx;
006864f0          ebx = CMasterInputMap::Merge(&this->m_InputMap, esi, 1);
006864ec          esi->vtable->Release();
006864f5          eax = ebx;
006864db      }
006864db      
006864fa      return eax;
006864c0  }

006864fd                                                                                         90 90 90                               ...

00686500  void __fastcall CInputManager_WIN32::AcquireAll(class CInputManager_WIN32* this)

00686500  {
00686500      class CInputManager_WIN32* this_1 = this;
0068650b      int32_t i = 0;
0068650b      
0068650f      if (this->m_aDevices.m_num > 0)
0068650f      {
00686512          int32_t* edi_1 = nullptr;
00686512          
00686564          do
00686564          {
0068651a              int32_t* ecx = *(uint32_t*)(this->m_aDevices.m_data + edi_1);
0068651a              
00686521              if (ecx != 0)
00686521              {
00686528                  *(uint32_t*)(*(uint32_t*)ecx + 0x1c)(ecx);
0068652b                  struct CInputManager_WIN32::InputDevice* m_data = this->m_aDevices.m_data;
00686531                  this_1 = 0xffffffff;
00686539                  int32_t* eax_4 = *(uint32_t*)((char*)edi_1 + m_data);
0068654a                  *(uint32_t*)(*(uint32_t*)eax_4 + 0x28)(eax_4, 0x14, 0, &this_1, 0);
00686521              }
00686521              
00686553              *(uint8_t*)(&this->m_aDevices.m_data->bActive + edi_1) = 1;
0068655e              i += 1;
0068655f              edi_1 = &edi_1[0xc];
00686564          } while (i < this->m_aDevices.m_num);
0068650f      }
00686500  }

0068656b                                   90 90 90 90 90                                                             .....

00686570  void __fastcall CInputManager_WIN32::UnacquireAll(class CInputManager_WIN32* this)

00686570  {
0068657a      int32_t i = 0;
0068657a      
0068657e      if (this->m_aDevices.m_num > 0)
0068657e      {
00686581          int32_t* edi_1 = nullptr;
00686581          
006865ad          do
006865ad          {
00686589              int32_t* eax_2 = *(uint32_t*)((char*)edi_1 + this->m_aDevices.m_data);
00686589              
0068658e              if (eax_2 != 0)
0068658e              {
00686593                  *(uint32_t*)(*(uint32_t*)eax_2 + 0x20)(eax_2);
0068659c                  *(uint8_t*)(&this->m_aDevices.m_data->bActive + edi_1) = 0;
0068658e              }
0068658e              
006865a7              i += 1;
006865a8              edi_1 = &edi_1[0xc];
006865ad          } while (i < this->m_aDevices.m_num);
0068657e      }
00686570  }

006865b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006865c0  void __fastcall CInputManager_WIN32::ReleaseDevices(class CInputManager_WIN32* this)

006865c0  {
006865c4      CInputManager_WIN32::UnacquireAll(this);
006865cf      int32_t i = 0;
006865cf      
006865d3      if (this->m_aDevices.m_num > 0)
006865d3      {
006865d6          int32_t* edi_1 = nullptr;
006865d6          
006865ff          do
006865ff          {
006865e6              int32_t* eax_2 = *(uint32_t*)((char*)edi_1 + this->m_aDevices.m_data);
006865e6              
006865eb              if (eax_2 != 0)
006865f0                  *(uint32_t*)(*(uint32_t*)eax_2 + 8)(eax_2);
006865f0              
006865f9              i += 1;
006865fa              edi_1 = &edi_1[0xc];
006865ff          } while (i < this->m_aDevices.m_num);
006865d3      }
006865d3      
00686602      this->m_aDevices.m_num = 0;
006865c0  }

006865da                                                                                8d 9b 00 00 00 00                            ......
0068660f                                               90                                                                 .

00686610  uint8_t __thiscall CInputManager_WIN32::IsMetaKeyDown(class CInputManager_WIN32 const* this, uint32_t arg2)

00686610  {
00686610      class CInputManager_WIN32* this_1 = this;
0068661a      struct CInputManager_WIN32::InputDevice* m_data = this->m_aDevices.m_data;
0068662a      uint32_t eax_2;
0068662a      eax_2 = arg2;
0068662f      struct CInputManager_WIN32::InputDevice* m_data_1 = m_data;
00686630      *(uint16_t*)((char*)this_1)[2] = eax_2;
00686635      this_1 = m_data[this->m_nKeyboardDevice].iDeviceIndex;
00686639      *(uint8_t*)((char*)this_1)[1] = 0;
0068664c      uint32_t eax_3 = CMasterInputMap::MetaModeFromKey(&this->m_InputMap, this_1);
0068664c      
00686655      if (eax_3 == 0)
00686655      {
0068666a          eax_3 = 0;
0068666e          return 0;
00686655      }
00686655      
0068665d      uint32_t eax_5 = (this->m_metaKeyMode & eax_3);
0068665f      int32_t eax_6 = -(eax_5);
00686667      return ((int8_t)-((eax_6 - eax_6)));
00686610  }

00686671                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00686680  uint8_t __fastcall CInputManager_WIN32::ShiftKeyDown(class CInputManager_WIN32 const* this)

00686680  {
00686687      return CInputManager_WIN32::IsMetaKeyDown(this, 0x2a);
00686680  }

00686688                          90 90 90 90 90 90 90 90                                                          ........

00686690  uint8_t __fastcall CInputManager_WIN32::CtrlKeyDown(class CInputManager_WIN32 const* this)

00686690  {
00686697      return CInputManager_WIN32::IsMetaKeyDown(this, 0x1d);
00686690  }

00686698                                                                          90 90 90 90 90 90 90 90                          ........

006866a0  uint8_t __fastcall CInputManager_WIN32::AltKeyDown(class CInputManager_WIN32 const* this)

006866a0  {
006866a7      return CInputManager_WIN32::IsMetaKeyDown(this, 0x38);
006866a0  }

006866a8                          90 90 90 90 90 90 90 90                                                          ........

006866b0  void __thiscall CInputManager_WIN32::OnSwitchTextMode(class CInputManager_WIN32* this, uint8_t arg2)

006866b0  {
006866c0      if ((arg2 != 0 && this->m_bProcessingActionInResponseToKeyDown != 0))
006866c2          this->m_bIgnoreNextChar = 1;
006866b0  }

006866cc                                      90 90 90 90                                                              ....

006866d0  void* __thiscall IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,enum ControlType> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,enum ControlType> *,0>* this, uint32_t arg2)

006866d0  {
006866d3      class HashTableData<ControlSpecification,enum ControlType>** m_buckets = this->m_buckets;
006866db      this->vtable = 0x7fef48;
006866db      
006866e1      if (m_buckets != &this->m_aInplaceBuckets)
006866e4          operator delete[](m_buckets);
006866e4      
006866ee      this->m_buckets = nullptr;
006866f1      this->m_firstInterestingBucket = nullptr;
006866f4      this->m_numBuckets = 0;
006866f7      this->m_numElements = 0;
006866f7      
006866ff      if ((arg2 & 1) != 0)
00686702          operator delete(this);
00686702      
0068670d      return this;
006866d0  }


00686710  void* __thiscall IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState> *,0>* this, uint32_t arg2)

00686710  {
00686713      class HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState>** m_buckets = this->m_buckets;
0068671b      this->vtable = 0x7fef4c;
0068671b      
00686721      if (m_buckets != &this->m_aInplaceBuckets)
00686724          operator delete[](m_buckets);
00686724      
0068672e      this->m_buckets = nullptr;
00686731      this->m_firstInterestingBucket = nullptr;
00686734      this->m_numBuckets = 0;
00686737      this->m_numElements = 0;
00686737      
0068673f      if ((arg2 & 1) != 0)
00686742          operator delete(this);
00686742      
0068674d      return this;
00686710  }


00686750  void* __thiscall IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, uint32_t arg2)

00686750  {
00686753      class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_buckets = this->m_buckets;
0068675b      this->vtable = &IntrusiveHashTable<class ControlSpecification,class PriorityHash<class ControlSpecification,struct CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData*,1>::`vftable';
0068675b      
00686761      if (m_buckets != &this->m_aInplaceBuckets)
00686764          operator delete[](m_buckets);
00686764      
0068676e      this->m_buckets = nullptr;
00686771      this->m_firstInterestingBucket = nullptr;
00686774      this->m_numBuckets = 0;
00686777      this->m_numElements = 0;
00686777      
0068677f      if ((arg2 & 1) != 0)
00686782          operator delete(this);
00686782      
0068678d      return this;
00686750  }


00686790  uint8_t __thiscall SmartArray<CInputManager_WIN32::InputDevice,1>::grow(class SmartArray<CInputManager_WIN32::InputDevice,1>* this, uint32_t arg2)

00686790  {
00686798      uint32_t esi = arg2;
0068679e      uint32_t eax;
0068679e      
0068679e      if (esi >= this->m_num)
0068679e      {
006867ae          int32_t eax_2;
006867ae          
006867ae          if (esi <= (this->m_sizeAndDeallocate & 0x7fffffff))
006867ae          {
00686842              eax_2 = 1;
00686845              return 1;
006867ae          }
006867ae          
006867b6          if (esi == 0)
006867b6          {
006867b8              SmartArray<CInputManager_WIN32::InputDevice,1>::Reset(this);
006867bf              int32_t eax_3;
006867bf              eax_3 = 1;
006867c2              return 1;
006867b6          }
006867b6          
006867cc          eax = operator new[]((esi * 0x30));
006867cc          
006867d8          if (eax != 0)
006867d8          {
006867e3              `vector constructor iterator'(eax, 0x30, esi, CInputManager_WIN32::InputDevice::InputDevice);
006867e3              
006867eb              if (this->m_data != 0)
006867eb              {
006867ed                  uint32_t m_num = this->m_num;
006867ed                  
006867f1                  if ((m_num - 1) >= 0)
006867f1                  {
006867f6                      eax_2 = ((m_num - 1) * 0x30);
006867f9                      int32_t edx_1 = m_num;
00686812                      int32_t i;
00686812                      
00686812                      do
00686812                      {
00686802                          void* esi_2 = (this->m_data + eax_2);
00686804                          int32_t edi_1 = (eax_2 + eax);
0068680c                          eax_2 -= 0x30;
0068680f                          i = edx_1;
0068680f                          edx_1 -= 1;
00686810                          __builtin_memcpy(edi_1, esi_2, 0x30);
00686812                      } while (i != 1);
00686814                      esi = arg2;
006867f1                  }
006867f1                  
00686828                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0068682d                      operator delete[](this->m_data);
006867eb              }
006867eb              
0068683b              this->m_data = eax;
0068683d              this->m_sizeAndDeallocate = (esi | 0x80000000);
00686842              eax_2 = 1;
00686845              return 1;
006867d8          }
0068679e      }
0068679e      
0068684a      eax = 0;
0068684d      return 0;
00686790  }


00686850  void __fastcall SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>::Reset(class SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>* this)

00686850  {
00686853      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
00686867      this->m_num = 0;
00686867      
0068686a      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0068686a      {
0068686f          operator delete[](this->m_data);
00686877          this->m_data = 0;
00686879          this->m_sizeAndDeallocate = 0;
0068687e          return;
0068686a      }
0068686a      
00686881      if (this->m_data != 0)
00686881      {
00686883          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00686883          
00686889          if ((i_2 - 1) >= 0)
00686889          {
0068688d              int32_t ecx_3 = ((i_2 - 1) << 4);
00686890              int32_t i_1 = i_2;
006868aa              int32_t i;
006868aa              
006868aa              do
006868aa              {
00686895                  void* eax_2 = (this->m_data + ecx_3);
00686897                  ecx_3 -= 0x10;
0068689a                  i = i_1;
0068689a                  i_1 -= 1;
0068689b                  *(uint32_t*)eax_2 = 0xffffffff;
006868a1                  *(uint32_t*)((char*)eax_2 + 4) = 0;
006868a4                  *(uint32_t*)((char*)eax_2 + 8) = 0;
006868a7                  *(uint32_t*)((char*)eax_2 + 0xc) = 0;
006868aa              } while (i != 1);
00686889          }
00686881      }
00686850  }

006868af                                               90                                                                 .

006868b0  enum DeviceType __thiscall CInputManager_WIN32::GetDeviceTypeFromKey(class CInputManager_WIN32 const* this, class ControlSpecification arg2)

006868b0  {
006868b1      uint32_t m_num = this->m_aDevices.m_num;
006868c2      int32_t eax = 0;
006868c2      
006868c6      if (m_num > 0)
006868c6      {
006868ce          int32_t* edx_2 = &this->m_aDevices.m_data->iDeviceIndex;
006868ce          
006868d3          while (*(uint32_t*)edx_2 != ((uint32_t)*(uint8_t*)((char*)arg2.__inner0 + 0)))
006868d3          {
006868d5              eax += 1;
006868d6              edx_2 = &edx_2[0xc];
006868d6              
006868db              if (eax >= m_num)
006868db                  break;
006868d3          }
006868c6      }
006868c6      
006868e1      if (eax >= m_num)
00686915          return 0;
00686915      
006868ef      int32_t nType = this->m_aDevices.m_data[eax].nType;
006868ef      
006868f6      if (nType == 0x12)
00686910          return 2;
00686910      
006868f9      if (nType == 0x13)
00686908          return 1;
00686908      
00686900      return 3;
006868b0  }

00686918                                                                          90 90 90 90 90 90 90 90                          ........

00686920  uint8_t __thiscall SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>::grow(class SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>* this, uint32_t arg2)

00686920  {
00686921      uint32_t ebx = arg2;
0068692c      void* eax;
0068692c      
0068692c      if (ebx >= this->m_num)
0068692c      {
0068693c          int32_t eax_2;
0068693c          
0068693c          if (ebx <= (this->m_sizeAndDeallocate & 0x7fffffff))
0068693c          {
006869e9              eax_2 = 1;
006869ec              return 1;
0068693c          }
0068693c          
00686944          if (ebx == 0)
00686944          {
00686946              SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>::Reset(this);
0068694d              int32_t eax_3;
0068694d              eax_3 = 1;
00686950              return 1;
00686944          }
00686944          
00686959          eax = operator new[]((ebx << 4));
00686959          
00686965          if (eax != 0)
00686965          {
00686974              `vector constructor iterator'(eax, 0x10, ebx, _STL::pair<QualifiedControl,unsigned long>::pair<QualifiedControl,unsigned long>);
00686974              
0068697c              if (this->m_data != 0)
0068697c              {
0068697e                  uint32_t m_num = this->m_num;
0068697e                  
00686982                  if ((m_num - 1) >= 0)
00686982                  {
00686989                      void* ecx_2 = ((((m_num - 1) << 4) + eax) + 8);
00686994                      int32_t ebx_1 = m_num;
006869b9                      int32_t i;
006869b9                      
006869b9                      do
006869b9                      {
0068699d                          void* eax_5 = (((0xfffffff8 - eax) + ecx_2) + this->m_data);
006869a1                          *(uint32_t*)((char*)ecx_2 - 8) = *(uint32_t*)eax_5;
006869a7                          *(uint32_t*)((char*)ecx_2 - 4) = *(uint32_t*)((char*)eax_5 + 4);
006869ad                          *(uint32_t*)ecx_2 = *(uint32_t*)((char*)eax_5 + 8);
006869b2                          *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_5 + 0xc);
006869b5                          ecx_2 -= 0x10;
006869b8                          i = ebx_1;
006869b8                          ebx_1 -= 1;
006869b9                      } while (i != 1);
006869bb                      ebx = arg2;
00686982                  }
00686982                  
006869cf                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
006869d4                      operator delete[](this->m_data);
0068697c              }
0068697c              
006869e2              this->m_data = eax;
006869e4              this->m_sizeAndDeallocate = (ebx | 0x80000000);
006869e9              eax_2 = 1;
006869ec              return 1;
00686965          }
0068692c      }
0068692c      
006869f1      eax = 0;
006869f4      return 0;
00686920  }

006869f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00686a00  class IntrusiveHashIterator<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* __thiscall IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::find_iterator(class IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, class IntrusiveHashIterator<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* __return, class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* arg3)

00686a00  {
00686a05      uint32_t m_numBuckets = this->m_numBuckets;
00686a0b      union __inner0 = arg3->m_hashKey.__inner0;
00686a11      uint32_t temp1 = (COMBINE(0, __inner0) % m_numBuckets);
00686a13      class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_buckets = this->m_buckets;
00686a16      int32_t* eax_1 = m_buckets[temp1];
00686a1c      void* edx_2 = &m_buckets[temp1];
00686a1c      
00686a20      if (eax_1 != 0)
00686a20      {
00686a24          while (*(uint32_t*)eax_1 != __inner0)
00686a24          {
00686a26              eax_1 = eax_1[1];
00686a26              
00686a2b              if (eax_1 == 0)
00686a2b                  break;
00686a24          }
00686a20      }
00686a20      
00686a2f      int32_t* esi = eax_1;
00686a2f      
00686a31      if (eax_1 != 0)
00686a31      {
00686a37          while (esi != arg3)
00686a37          {
00686a3b              if (*(uint32_t*)esi != __inner0)
00686a3b              {
00686a73                  __return->m_currHashTable = this;
00686a78                  __return->m_currBucket = nullptr;
00686a7b                  __return->m_currElement = nullptr;
00686a7f                  return __return;
00686a3b              }
00686a3b              
00686a3d              esi = esi[1];
00686a3d              
00686a42              if (esi == 0)
00686a42              {
00686a52                  do
00686a52                  {
00686a48                      edx_2 += 4;
00686a48                      
00686a4d                      if (edx_2 == &m_buckets[m_numBuckets])
00686a4d                          goto label_686a5a;
00686a52                  } while (*(uint32_t*)edx_2 == 0);
00686a52                  
00686a54                  esi = *(uint32_t*)edx_2;
00686a54                  
00686a58                  if (esi == 0)
00686a58                      break;
00686a42              }
00686a37          }
00686a31      }
00686a31      
00686a5a  label_686a5a:
00686a5a      class IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>** __return_1 = __return;
00686a5f      __return_1[2] = esi;
00686a64      *(uint32_t*)__return_1 = this;
00686a66      __return_1[1] = edx_2;
00686a6a      return __return_1;
00686a00  }

00686a82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00686a90  uint8_t __fastcall CInputManager_WIN32::AddKeyMap(class CInputManager_WIN32* this, class PStringBase<char> arg2)

00686a90  {
00686aa1      if (PFileNode::s_fallocPool.m_firstFreeChunk == 0)
00686aa8          FallocPool::AllocateNewPool(&PFileNode::s_fallocPool);
00686aa8      
00686aad      uint8_t* m_firstFreeChunk = PFileNode::s_fallocPool.m_firstFreeChunk;
00686ab5      PFileNode::s_fallocPool.m_firstFreeChunk = *(uint32_t*)m_firstFreeChunk;
00686aba      class PFileNode* eax_1 = PFileNode::PFileNode(m_firstFreeChunk);
00686ac5      void var_168;
00686ac5      PFileParser::PFileParser(&var_168);
00686ac5      
00686ae0      if (PFileParser::LoadFromFile(&var_168, eax_1, &arg2, 0) != 0)
00686ae0      {
00686b38          void var_148;
00686b38          CMasterInputMap::CMasterInputMap(&var_148);
00686b38          
00686b49          if (CMasterInputMap::FromFileNode(&var_148, eax_1) != 0)
00686b49          {
00686bbd              int32_t ebx;
00686bbd              ebx = CMasterInputMap::Merge(&this->m_InputMap, &var_148, 1);
00686bbf              CMasterInputMap::~CMasterInputMap(&var_148);
00686bc8              PFileParser::~PFileParser(&var_168);
00686bc8              
00686bd5              if ((eax_1 != 0 && InterlockedDecrement(&eax_1->m_cRef) == 0))
00686be1                  eax_1->vtable->__vecDelDtor(1);
00686be1              
00686bf0              int32_t* esi_6 = (arg2 - 0x14);
00686bf0              
00686bff              if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00686c07                  **(uint32_t**)esi_6(1);
00686c07              
00686c09              int32_t eax_14;
00686c09              eax_14 = ebx;
00686c14              return eax_14;
00686b49          }
00686b49          
00686b4f          CMasterInputMap::~CMasterInputMap(&var_148);
00686b58          PFileParser::~PFileParser(&var_168);
00686b58          
00686b65          if ((eax_1 != 0 && InterlockedDecrement(&eax_1->m_cRef) == 0))
00686b71              eax_1->vtable->__vecDelDtor(1);
00686b71          
00686b80          int32_t* esi_4 = (arg2 - 0x14);
00686b80          
00686b8f          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00686b97              **(uint32_t**)esi_4(1);
00686ae0      }
00686ae0      else
00686ae0      {
00686ae6          PFileParser::~PFileParser(&var_168);
00686ae6          
00686af3          if ((eax_1 != 0 && InterlockedDecrement(&eax_1->m_cRef) == 0))
00686aff              eax_1->vtable->__vecDelDtor(1);
00686aff          
00686b0e          int32_t* esi_2 = (arg2 - 0x14);
00686b0e          
00686b1d          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00686b1d          {
00686b25              **(uint32_t**)esi_2(1);
00686b28              int32_t eax_6;
00686b28              eax_6 = 0;
00686b31              return 0;
00686b1d          }
00686ae0      }
00686ae0      
00686b9a      int32_t eax_5;
00686b9a      eax_5 = 0;
00686ba3      return 0;
00686a90  }

00686c17                                                                       90 90 90 90 90 90 90 90 90                         .........

00686c20  uint8_t __fastcall CInputManager_WIN32::SaveKeyMap(class CInputManager_WIN32* this, class PStringBase<char> arg2)

00686c20  {
00686c2e      if (PFileNode::s_fallocPool.m_firstFreeChunk == 0)
00686c35          FallocPool::AllocateNewPool(&PFileNode::s_fallocPool);
00686c35      
00686c3a      uint8_t* m_firstFreeChunk = PFileNode::s_fallocPool.m_firstFreeChunk;
00686c42      PFileNode::s_fallocPool.m_firstFreeChunk = *(uint32_t*)m_firstFreeChunk;
00686c47      class PFileNode* eax_1 = PFileNode::PFileNode(m_firstFreeChunk);
00686c47      
00686c5c      if (CMasterInputMap::ToFileNode(&this->m_InputMap, eax_1) != 0)
00686c5c      {
00686c62          void var_20;
00686c62          PFileParser::PFileParser(&var_20);
00686c78          void* ecx_3 = &var_20;
00686c78          
00686c7c          if (PFileParser::SaveToFile(&var_20, eax_1, &arg2) != 0)
00686c7c          {
00686c7e              PFileParser::~PFileParser(ecx_3);
00686c7e              
00686c8b              if ((eax_1 != 0 && InterlockedDecrement(&eax_1->m_cRef) == 0))
00686c97                  eax_1->vtable->__vecDelDtor(1);
00686c97              
00686ca3              int32_t* esi_2 = (arg2 - 0x14);
00686ca3              
00686cb2              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00686cba                  **(uint32_t**)esi_2(1);
00686cba              
00686cbd              int32_t eax_6;
00686cbd              eax_6 = 1;
00686cc3              return 1;
00686c7c          }
00686c7c          
00686cc6          PFileParser::~PFileParser(ecx_3);
00686c5c      }
00686c5c      
00686cd3      if ((eax_1 != 0 && InterlockedDecrement(&eax_1->m_cRef) == 0))
00686cdf          eax_1->vtable->__vecDelDtor(1);
00686cdf      
00686ceb      int32_t* esi_4 = (arg2 - 0x14);
00686ceb      
00686cfa      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
00686d02          **(uint32_t**)esi_4(1);
00686d02      
00686d05      int32_t eax_10;
00686d05      eax_10 = 0;
00686d0b      return 0;
00686c20  }

00686d0e                                            90 90                                                                ..

00686d10  uint8_t __thiscall SmartArray<CInputManager_WIN32::InputDevice,1>::AddToEnd(class SmartArray<CInputManager_WIN32::InputDevice,1>* this, struct CInputManager_WIN32::InputDevice const* arg2)

00686d10  {
00686d19      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00686d19      
00686d20      if (this->m_num >= eax_1)
00686d20      {
00686d2e          uint8_t result = SmartArray<CInputManager_WIN32::InputDevice,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
00686d2e          
00686d35          if (result == 0)
00686d38              return result;
00686d20      }
00686d20      
00686d53      __builtin_memcpy(&this->m_data[this->m_num], arg2, 0x30);
00686d5a      this->m_num += 1;
00686d5e      uint32_t eax_6;
00686d5e      eax_6 = 1;
00686d61      return 1;
00686d10  }

00686d64              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00686d70  uint8_t __thiscall SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>::SetNElements(class SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>* this, uint32_t const arg2, uint8_t arg3)

00686d70  {
00686d82      uint32_t eax_1;
00686d82      
00686d82      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
00686d82      {
00686dac          uint32_t const i = arg2;
00686dac          
00686dae          if (arg2 < this->m_num)
00686dae          {
00686db3              uint32_t ecx_3 = (arg2 << 4);
00686db3              
00686ddc              do
00686ddc              {
00686dc2                  void* eax_4 = (this->m_data + ecx_3);
00686dc4                  *(uint32_t*)eax_4 = 0xffffffff;
00686dca                  *(uint32_t*)((char*)eax_4 + 4) = 0;
00686dcd                  *(uint32_t*)((char*)eax_4 + 8) = 0;
00686dd0                  *(uint32_t*)((char*)eax_4 + 0xc) = 0;
00686dd6                  i += 1;
00686dd7                  ecx_3 += 0x10;
00686ddc              } while (i < this->m_num);
00686dae          }
00686d82      }
00686d82      else
00686d82      {
00686d84          eax_1 = arg3;
00686d8a          uint32_t const eax_2;
00686d8a          
00686d8a          if (eax_1 == 0)
00686d93              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
00686d8a          else
00686d8c              eax_2 = arg2;
00686d8c          
00686d9b          eax_1 = SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>::grow(this, eax_2);
00686d9b          
00686da2          if (eax_1 == 0)
00686da6              return eax_1;
00686d82      }
00686d82      
00686ddf      this->m_num = arg2;
00686de3      eax_1 = 1;
00686de6      return 1;
00686d70  }

00686dba                                                                                8d 9b 00 00 00 00                            ......
00686de9                             90 90 90 90 90 90 90                                                           .......

00686df0  void __thiscall IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_up(class IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, uint32_t arg2, class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* arg3)

00686df0  {
00686df0      class IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this_1 = this;
00686df2      uint32_t i = arg2;
00686dfa      uint32_t i_1 = ((i - 1) >> 1);
00686dfa      
00686e02      while (i > 0)
00686e02      {
00686e0a          class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_data = this->m_array.m_data;
00686e14          int32_t m_timestamp = m_data[i_1]->m_PriorityHashPriority.m_timestamp;
00686e17          uint32_t m_timestamp_1 = arg3->m_PriorityHashPriority.m_timestamp;
00686e17          
00686e1c          if (m_timestamp_1 == m_timestamp)
00686e1c              break;
00686e1c          
00686e20          int32_t ebx_2 = (m_timestamp_1 - m_timestamp);
00686e24          int32_t ebp_1 = 1;
00686e24          
00686e29          if (m_timestamp_1 < m_timestamp)
00686e29          {
00686e2d              ebx_2 = (m_timestamp - m_timestamp_1);
00686e2f              ebp_1 = 0xffffffff;
00686e29          }
00686e29          
00686e38          if (ebx_2 > 0x7fffffff)
00686e3a              ebp_1 = -(ebp_1);
00686e3a          
00686e3e          if (ebp_1 >= 0)
00686e3e              break;
00686e3e          
00686e43          m_data[i] = m_data[i_1];
00686e4a          this->m_array.m_data[i]->m_PriorityHashArrayIndex = i;
00686e53          i = i_1;
00686e56          i_1 = ((i_1 - 1) >> 1);
00686e02      }
00686e02      
00686e62      this->m_array.m_data[i] = arg3;
00686e6d      arg3->m_PriorityHashArrayIndex = i;
00686df0  }

00686e75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00686e80  void __thiscall IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_down(class IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, uint32_t arg2, class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* arg3)

00686e80  {
00686e86      class IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this_1 = this;
00686e89      uint32_t edi = arg2;
00686e8d      class IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this_2 = this_1;
00686e8d      
00686ea2      while (true)
00686ea2      {
00686ea2          if (((edi * 2) + 2) < this_1->m_hashTable.m_numElements)
00686ea2          {
00686ea8              class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_data = this_1->m_array.m_data;
00686eae              uint32_t edx_2 = m_data[((edi * 2) + 2)];
00686eb4              int32_t m_timestamp = m_data[((edi * 2) + 1)]->m_PriorityHashPriority.m_timestamp;
00686eba              int32_t edx_3 = *(uint32_t*)(edx_2 + 8);
00686eba              
00686ebf              if (edx_3 != m_timestamp)
00686ebf              {
00686ec3                  int32_t esi_2 = (edx_3 - m_timestamp);
00686ec7                  int32_t ebp = 1;
00686ec7                  
00686ecc                  if (edx_3 < m_timestamp)
00686ecc                  {
00686ed0                      esi_2 = (m_timestamp - edx_3);
00686ed2                      ebp = 0xffffffff;
00686ecc                  }
00686ecc                  
00686edb                  if (esi_2 > 0x7fffffff)
00686edd                      ebp = -(ebp);
00686edd                  
00686ee1                  if (ebp >= 0)
00686f36                      this_1 = this_2;
00686ee1                  else
00686ee1                  {
00686eeb                      uint32_t m_timestamp_1 = arg3->m_PriorityHashPriority.m_timestamp;
00686eee                      int32_t edx_4 = *(uint32_t*)(edx_2 + 8);
00686eee                      
00686ef3                      if (edx_4 == m_timestamp_1)
00686ef3                      {
00686f93                          this_1 = this_2;
00686f93                          break;
00686ef3                      }
00686ef3                      
00686efb                      int32_t esi_4 = (edx_4 - m_timestamp_1);
00686eff                      int32_t ebp_1 = 1;
00686eff                      
00686f04                      if (edx_4 < m_timestamp_1)
00686f04                      {
00686f08                          esi_4 = (m_timestamp_1 - edx_4);
00686f0a                          ebp_1 = 0xffffffff;
00686f04                      }
00686f04                      
00686f13                      if (esi_4 > 0x7fffffff)
00686f15                          ebp_1 = -(ebp_1);
00686f15                      
00686f19                      this_1 = this_2;
00686f19                      
00686f1d                      if (ebp_1 >= 0)
00686f1d                          break;
00686f1d                      
00686f1f                      m_data[edi] = edx_2;
00686f24                      this_1->m_array.m_data[edi]->m_PriorityHashArrayIndex = edi;
00686f2d                      edi = ((edi * 2) + 2);
00686f31                      continue;
00686ee1                  }
00686ebf              }
00686ea2          }
00686ea2          
00686f3d          if (((edi * 2) + 1) >= this_1->m_hashTable.m_numElements)
00686f3d              break;
00686f3d          
00686f43          uint32_t m_timestamp_2 = arg3->m_PriorityHashPriority.m_timestamp;
00686f49          uint32_t edx_8 = this_1->m_array.m_data[((edi * 2) + 1)];
00686f50          int32_t edx_9 = *(uint32_t*)(edx_8 + 8);
00686f50          
00686f55          if (edx_9 == m_timestamp_2)
00686f55              break;
00686f55          
00686f59          int32_t esi_6 = (edx_9 - m_timestamp_2);
00686f5d          int32_t ebx_1 = 1;
00686f5d          
00686f62          if (edx_9 < m_timestamp_2)
00686f62          {
00686f66              esi_6 = (m_timestamp_2 - edx_9);
00686f68              ebx_1 = 0xffffffff;
00686f62          }
00686f62          
00686f71          if (esi_6 > 0x7fffffff)
00686f73              ebx_1 = -(ebx_1);
00686f73          
00686f77          if (ebx_1 >= 0)
00686f77              break;
00686f77          
00686f79          this_1->m_array.m_data[edi] = edx_8;
00686f83          this_1->m_array.m_data[edi]->m_PriorityHashArrayIndex = edi;
00686f8c          edi = ((edi * 2) + 1);
00686ea2      }
00686ea2      
00686f97      this_1->m_array.m_data[edi] = arg3;
00686fa1      arg3->m_PriorityHashArrayIndex = edi;
00686e80  }

00686fae                                            90 90                                                                ..

00686fb0  void __thiscall IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_up_or_down(class IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, uint32_t arg2, class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* arg3)

00686fb0  {
00686fbc      if (arg2 > 0)
00686fbc      {
00686fc9          uint32_t m_timestamp_1 = arg3->m_PriorityHashPriority.m_timestamp;
00686fcf          int32_t m_timestamp = this->m_array.m_data[((arg2 - 1) >> 1)]->m_PriorityHashPriority.m_timestamp;
00686fcf          
00686fd3          if (m_timestamp_1 != m_timestamp)
00686fd3          {
00686fd8              int32_t esi_2 = (m_timestamp_1 - m_timestamp);
00686fdd              int32_t edi_1 = 1;
00686fdd              
00686fe2              if (m_timestamp_1 < m_timestamp)
00686fe2              {
00686fe6                  esi_2 = (m_timestamp - m_timestamp_1);
00686fe8                  edi_1 = 0xffffffff;
00686fe2              }
00686fe2              
00686ff1              if (esi_2 > 0x7fffffff)
00686ff3                  edi_1 = -(edi_1);
00686ff3              
00686ff9              if (edi_1 < 0)
00686ff9              {
00686ffd                  IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_up(this, arg2, arg3);
00687004                  return;
00686ff9              }
00686fd3          }
00686fbc      }
00686fbc      
00687009      IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_down(this, arg2, arg3);
00686fb0  }

00687013                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00687020  void __thiscall CInputManager_WIN32::AddDevicePointer(class CInputManager_WIN32* this, uint32_t arg2, struct _GUID const* arg3, struct _GUID const* arg4, struct IDirectInputDevice8A* arg5)

00687020  {
0068702a      struct IDirectInputDevice8A* var_30;
0068702a      CInputManager_WIN32::InputDevice::InputDevice(&var_30);
00687037      uint32_t Data1_1 = arg3->Data1;
00687039      var_30 = arg5;
0068703d      int32_t eax_1;
0068703d      eax_1 = arg3->Data2;
0068703d      *(uint16_t*)((char*)eax_1)[2] = arg3->Data3;
00687040      uint32_t Data1_2 = Data1_1;
00687044      int32_t edx;
00687044      edx = arg3->Data4[0];
00687044      *(uint8_t*)((char*)edx)[1] = arg3->Data4[1];
00687044      *(uint8_t*)((char*)edx)[2] = arg3->Data4[2];
00687044      *(uint8_t*)((char*)edx)[3] = arg3->Data4[3];
00687047      int32_t var_28 = eax_1;
0068704b      int32_t eax_2;
0068704b      eax_2 = arg3->Data4[4];
0068704b      *(uint8_t*)((char*)eax_2)[1] = arg3->Data4[5];
0068704b      *(uint8_t*)((char*)eax_2)[2] = arg3->Data4[6];
0068704b      *(uint8_t*)((char*)eax_2)[3] = arg3->Data4[7];
00687052      int32_t var_24 = edx;
00687058      int32_t var_20 = eax_2;
0068705c      int32_t eax_3;
0068705c      eax_3 = arg4->Data2;
0068705c      *(uint16_t*)((char*)eax_3)[2] = arg4->Data3;
0068705f      uint32_t Data1 = arg4->Data1;
00687063      int32_t edx_2;
00687063      edx_2 = arg4->Data4[0];
00687063      *(uint8_t*)((char*)edx_2)[1] = arg4->Data4[1];
00687063      *(uint8_t*)((char*)edx_2)[2] = arg4->Data4[2];
00687063      *(uint8_t*)((char*)edx_2)[3] = arg4->Data4[3];
00687066      int32_t var_18 = eax_3;
0068706a      int32_t eax_4;
0068706a      eax_4 = arg4->Data4[4];
0068706a      *(uint8_t*)((char*)eax_4)[1] = arg4->Data4[5];
0068706a      *(uint8_t*)((char*)eax_4)[2] = arg4->Data4[6];
0068706a      *(uint8_t*)((char*)eax_4)[3] = arg4->Data4[7];
00687072      int32_t var_14 = edx_2;
0068707a      uint32_t var_8 = ((uint32_t)arg2);
00687081      int32_t var_10 = eax_4;
00687085      char var_4 = 1;
0068708a      CInputManager_WIN32::AddDeviceToInputMap(this, &var_30);
0068709a      SmartArray<CInputManager_WIN32::InputDevice,1>::AddToEnd(&this->m_aDevices, &var_30);
00687020  }

006870a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006870b0  uint8_t __thiscall HashTable<ControlSpecification,CInputManager_WIN32::RecentControlState,0>::find(class HashTable<ControlSpecification,CInputManager_WIN32::RecentControlState,0> const* this, class ControlSpecification const* arg2, struct CInputManager_WIN32::RecentControlState* arg3)

006870b0  {
006870b5      union __inner0 = arg2->__inner0;
006870c8      int32_t* i;
006870c8      
006870c8      for (i = this->m_intrusiveTable.m_buckets[(COMBINE(0, __inner0) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
006870c8      {
006870d2          if (*(uint32_t*)i == __inner0)
006870d2          {
006870e3              if (i == 0)
006870e3                  break;
006870e3              
006870f2              __builtin_memcpy(arg3, &i[2], 0x18);
006870f5              i = 1;
006870f8              return 1;
006870d2          }
006870c8      }
006870c8      
006870db      i = 0;
006870de      return 0;
006870b0  }

006870fb                                                                                   90 90 90 90 90                             .....

00687100  void __thiscall List<CInputManager::InputMapEntry>::List<CInputManager::InputMapEntry>(class List<CInputManager::InputMapEntry>* this, class List<CInputManager::InputMapEntry> const* arg2)

00687100  {
0068710a      this->vtable = 0x79831c;
00687110      this->_head = nullptr;
00687117      this->_tail = nullptr;
0068711e      this->_num_elements = 0;
0068711e      
00687125      if (this != arg2)
00687125      {
00687127          List<CInputManager::InputMapEntry>::flush(this);
00687127          
00687131          for (class ListNode<CInputManager::InputMapEntry>* i = arg2->_head; i != 0; i = i->next)
00687131          {
00687136              List<CInputManager::InputMapEntry>::push_back(this, i);
00687136              
0068713d              if (i == 0)
0068713d                  break;
00687131          }
00687125      }
00687100  }

0068714d                                         90 90 90                                                               ...

00687150  uint8_t __thiscall PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::lookup(class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1> const* this, class ControlSpecification arg2, struct CInputManager_WIN32::ButtonHistoryEntry* arg3)

00687150  {
00687166      int32_t* i;
00687166      
00687166      for (i = this->m_cIntrusivePriorityHash.m_hashTable.m_buckets[(COMBINE(0, arg2) % this->m_cIntrusivePriorityHash.m_hashTable.m_numBuckets)]; i != 0; i = i[1])
00687166      {
0068716a          if (*(uint32_t*)i == arg2)
0068716a          {
0068717b              if (i == 0)
0068717b                  break;
0068717b              
0068718a              arg3->ptMousePos.x = i[3];
0068718d              arg3->ptMousePos.y = i[4];
00687190              arg3->m_timestamp = i[2];
00687192              int32_t eax_3;
00687192              eax_3 = 1;
00687195              return 1;
0068716a          }
00687166      }
00687166      
00687173      i = 0;
00687176      return 0;
00687150  }

00687198                                                                          90 90 90 90 90 90 90 90                          ........

006871a0  uint8_t __fastcall IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::grow(class IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this)

006871a0  {
006871a0      class IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* m_numBuckets = this;
006871a2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006871ae      m_numBuckets = this->m_numBuckets;
006871c5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
006871c5      
006871cf      if (eax_2 != bucketSizesEnd_1)
006871d8          eax_2 = &eax_2[1];
006871cf      else
006871cf      {
006871d1          eax_2 -= 4;
006871d1          
006871d6          if (eax_2 != bucketSizesEnd_1)
006871d8              eax_2 = &eax_2[1];
006871cf      }
006871cf      
006871e8      return IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::resize_internal(this, *(uint32_t*)eax_2);
006871a0  }

006871e9                             90 90 90 90 90 90 90                                                           .......

006871f0  HRESULT __thiscall CInputManager_WIN32::AddDevice(class CInputManager_WIN32* this, uint32_t arg2, struct _GUID const* arg3, struct _GUID const* arg4)

006871f0  {
00687200      int32_t i = 0;
00687200      
00687205      if (this->m_aDevices.m_num > 0)
00687205      {
0068720d          struct _GUID* eax_2 = &this->m_aDevices.m_data->guidInstance;
0068720d          
00687231          do
00687231          {
00687210              struct _GUID* edi_1 = arg3;
00687214              int32_t j = 4;
00687219              struct _GUID* esi_1 = eax_2;
0068721b              bool cond:4_1 = true;
0068721b              
0068721d              while (j != 0)
0068721d              {
0068721d                  uint32_t Data1 = esi_1->Data1;
0068721d                  uint32_t Data1_1 = edi_1->Data1;
0068721d                  cond:4_1 = Data1 == Data1_1;
0068721d                  esi_1 = &esi_1->Data2;
0068721d                  edi_1 = &edi_1->Data2;
0068721d                  j -= 1;
0068721d                  
0068721d                  if (Data1 != Data1_1)
0068721d                      break;
0068721d              }
0068721d              
0068721f              if (cond:4_1)
006873d8                  return 0;
006873d8              
0068722b              i += 1;
0068722c              eax_2 = &eax_2[3];
00687231          } while (i < this->m_aDevices.m_num);
00687205      }
00687205      
00687235      struct IDirectInput8A* m_pDI = this->m_pDI;
00687246      int32_t* var_30 = nullptr;
0068724d      int32_t eax_3 = m_pDI->vtable->CreateDevice(m_pDI, arg3, &var_30, 0);
0068724d      
00687252      if (eax_3 < 0)
006873e1          return eax_3;
006873e1      
0068725e      int32_t* eax_4 = var_30;
0068726b      int32_t edi_2 = *(uint32_t*)(*(uint32_t*)eax_4 + 0x34)(eax_4, this->m_hwnd, 0x16);
0068726f      int32_t* eax_6 = var_30;
0068726f      
00687273      if (edi_2 < 0)
00687273      {
00687353          *(uint32_t*)(*(uint32_t*)eax_6 + 8)(eax_6);
0068735f          return edi_2;
00687273      }
00687273      
00687285      int32_t var_2c = 0x14;
0068728d      int32_t var_28_1 = 0x10;
00687291      int32_t var_24_1 = 0;
00687295      int32_t var_20_1 = 0;
00687299      int32_t var_1c_1 = 0x80;
006872a4      int32_t eax_7 = *(uint32_t*)(*(uint32_t*)eax_6 + 0x18)(eax_6, 1, &var_2c);
006872ab      int32_t* eax_8 = var_30;
006872ab      
006872af      if (eax_7 < 0)
006872af      {
006872b4          *(uint32_t*)(*(uint32_t*)eax_8 + 8)(eax_8);
006872c0          return eax_7;
006872af      }
006872af      
006872ca      int32_t var_18 = 0x18;
006872d2      int32_t var_14_1 = 0x10;
006872d6      int32_t var_10_1 = 0;
006872da      int32_t var_c_1 = 0;
006872de      int32_t var_8_1 = 0xfffffff0;
006872e6      int32_t var_4_1 = 0x10;
006872ed      *(uint32_t*)(*(uint32_t*)eax_8 + 0x18)(eax_8, 4, &var_18);
006872f4      uint32_t eax_10 = ((uint32_t)arg2);
006872f4      
006872fa      if (eax_10 == 0x12)
006872fa      {
00687381          int32_t* eax_18 = var_30;
0068738c          int32_t var_1c_4 = 1;
0068739a          edi_2 = *(uint32_t*)(*(uint32_t*)eax_18 + 0x18)(eax_18, 2, &var_2c);
0068739e          eax_6 = var_30;
0068739e          
006873a2          if (edi_2 < 0)
006873a2          {
00687353              *(uint32_t*)(*(uint32_t*)eax_6 + 8)(eax_6);
0068735f              return edi_2;
006873a2          }
006873a2          
006873af          edi_2 = *(uint32_t*)(*(uint32_t*)eax_6 + 0x2c)(eax_6, 0x80691c);
006873af          
006873b3          if (edi_2 < 0)
006873b3          {
0068734c          label_68734c:
0068734c              eax_6 = var_30;
00687353              *(uint32_t*)(*(uint32_t*)eax_6 + 8)(eax_6);
0068735f              return edi_2;
006873b3          }
006873b3          
006873bb          this->m_nMouseDevice = this->m_aDevices.m_num;
006873d3          CInputManager_WIN32::AddDevicePointer(this, arg2, arg3, arg4, var_30);
006872fa      }
006872fa      else
006872fa      {
00687301          int32_t* eax_12 = var_30;
00687301          
00687305          if (eax_10 == 0x13)
00687305          {
0068736d              edi_2 = *(uint32_t*)(*(uint32_t*)eax_12 + 0x2c)(eax_12, 0x806934);
0068736d              
00687371              if (edi_2 < 0)
00687371                  goto label_68734c;
00687371              
00687379              this->m_nKeyboardDevice = this->m_aDevices.m_num;
006873d3              CInputManager_WIN32::AddDevicePointer(this, arg2, arg3, arg4, var_30);
00687305          }
00687305          else
00687305          {
0068730e              int32_t var_1c_2 = 0;
00687315              *(uint32_t*)(*(uint32_t*)eax_12 + 0x18)(eax_12, 2, &var_2c);
00687318              int32_t* eax_13 = var_30;
00687323              int32_t var_1c_3 = 0x5dc;
00687331              edi_2 = *(uint32_t*)(*(uint32_t*)eax_13 + 0x18)(eax_13, 5, &var_2c);
00687335              eax_6 = var_30;
00687335              
00687339              if (edi_2 < 0)
00687339              {
00687353                  *(uint32_t*)(*(uint32_t*)eax_6 + 8)(eax_6);
0068735f                  return edi_2;
00687339              }
00687339              
00687346              edi_2 = *(uint32_t*)(*(uint32_t*)eax_6 + 0x2c)(eax_6, 0x80694c);
00687346              
0068734a              if (edi_2 < 0)
0068734a                  goto label_68734c;
0068734a              
006873d3              CInputManager_WIN32::AddDevicePointer(this, arg2, arg3, arg4, var_30);
00687305          }
006872fa      }
006872fa      
006873d8      return 0;
006871f0  }

006873e4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006873f0  int32_t __stdcall CInputManager_WIN32::EnumSuitableDevicesCB(struct DIDEVICEINSTANCEA const* arg1, void* arg2)

006873f0  {
006873f4      char eax = arg1->dwDevType;
006873f4      
006873fd      if ((eax < 0x12 || eax > 0x13))
0068740f          CInputManager_WIN32::AddDevice(arg2, arg1->dwDevType, &arg1->guidInstance, &arg1->guidProduct);
0068740f      
00687419      return 1;
006873f0  }

0068741c                                                                                      90 90 90 90                              ....

00687420  uint8_t __thiscall CInputManager_WIN32::GetPreviousControlState(class CInputManager_WIN32* this, class ControlSpecification arg2, enum ControlType arg3, struct CInputManager_WIN32::RecentControlState* arg4)

00687420  {
0068743e      if (HashTable<ControlSpecification,CInputManager_WIN32::RecentControlState,0>::find(&this->m_hashActiveControls, &arg2, arg4) != 0)
0068748b          return 1;
0068748b      
00687447      arg4->type = arg3;
00687450      arg4->mode = this->m_metaKeyMode;
00687450      
00687453      if (arg3 == ct_POV)
00687453      {
00687456          arg4->dwData = 0xffffffff;
0068745c          arg4->activation = 0x80;
00687464          enum ControlType eax_1;
00687464          eax_1 = 0;
00687467          return 0;
00687453      }
00687453      
0068746b      int32_t eax_3 = -((arg3 - 1));
00687476      arg4->activation = (((eax_3 - eax_3) & 0x7e) + 2);
00687479      arg4->dwData = 0;
00687480      uint32_t eax_6;
00687480      eax_6 = 0;
00687483      return 0;
00687420  }

0068748e                                            90 90                                                                ..

00687490  void __thiscall IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,enum ControlType> *,0>::IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,enum ControlType> *,0>(class IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,enum ControlType> *,0>* this, uint32_t arg2)

00687490  {
0068749b      arg2 = arg2;
0068749f      uint8_t edx = ((int8_t)arg2);
006874a3      this->m_buckets = nullptr;
006874a6      this->m_firstInterestingBucket = nullptr;
006874a9      this->m_numBuckets = 0;
006874ac      this->m_numElements = 0;
006874b0      this->vtable = 0x7fef48;
006874b6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006874c9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
006874c9      
006874d3      if (eax == bucketSizesEnd_1)
006874d5          eax -= 4;
006874d5      
006874d8      uint32_t eax_1 = *(uint32_t*)eax;
006874dd      this->m_numBuckets = eax_1;
006874dd      
006874e0      if (eax_1 > 0x17)
006874f6          this->m_buckets = operator new[]((eax_1 << 2));
006874e0      else
006874e5          this->m_buckets = &this->m_aInplaceBuckets;
006874e5      
006874fc      class HashTableData<ControlSpecification,enum ControlType>** m_buckets = this->m_buckets;
006874ff      uint32_t ecx_3 = (this->m_numBuckets << 2);
00687505      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00687516      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00687490  }

0068751f                                                                                               90                                 .

00687520  void __thiscall IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState> *,0>::IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState> *,0>(class IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState> *,0>* this, uint32_t arg2)

00687520  {
0068752b      arg2 = arg2;
0068752f      uint8_t edx = ((int8_t)arg2);
00687533      this->m_buckets = nullptr;
00687536      this->m_firstInterestingBucket = nullptr;
00687539      this->m_numBuckets = 0;
0068753c      this->m_numElements = 0;
00687540      this->vtable = 0x7fef4c;
00687546      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00687559      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00687559      
00687563      if (eax == bucketSizesEnd_1)
00687565          eax -= 4;
00687565      
00687568      uint32_t eax_1 = *(uint32_t*)eax;
0068756d      this->m_numBuckets = eax_1;
0068756d      
00687570      if (eax_1 > 0x17)
00687586          this->m_buckets = operator new[]((eax_1 << 2));
00687570      else
00687575          this->m_buckets = &this->m_aInplaceBuckets;
00687575      
0068758c      class HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState>** m_buckets = this->m_buckets;
0068758f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00687595      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
006875a6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00687520  }

006875af                                               90                                                                 .

006875b0  void __thiscall IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>(class IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, uint32_t arg2)

006875b0  {
006875bb      arg2 = arg2;
006875bf      uint8_t edx = ((int8_t)arg2);
006875c3      this->m_buckets = nullptr;
006875c6      this->m_firstInterestingBucket = nullptr;
006875c9      this->m_numBuckets = 0;
006875cc      this->m_numElements = 0;
006875d0      this->vtable = &IntrusiveHashTable<class ControlSpecification,class PriorityHash<class ControlSpecification,struct CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData*,1>::`vftable';
006875d6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006875e9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
006875e9      
006875f3      if (eax == bucketSizesEnd_1)
006875f5          eax -= 4;
006875f5      
006875f8      uint32_t eax_1 = *(uint32_t*)eax;
006875fd      this->m_numBuckets = eax_1;
006875fd      
00687600      if (eax_1 > 0x17)
00687616          this->m_buckets = operator new[]((eax_1 << 2));
00687600      else
00687605          this->m_buckets = &this->m_aInplaceBuckets;
00687605      
0068761c      class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_buckets = this->m_buckets;
0068761f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00687625      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00687636      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
006875b0  }

0068763f                                                                                               90                                 .

00687640  uint8_t __thiscall IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::resize_internal(class IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, uint32_t arg2)

00687640  {
00687641      uint32_t ebp = arg2;
00687641      
0068764b      if (ebp == this->m_numBuckets)
0068764b      {
0068764e          int32_t eax;
0068764e          eax = 0;
00687651          return 0;
0068764b      }
0068764b      
00687659      int32_t* i_1 = nullptr;
00687659      
0068765d      while (this->m_numElements != 0)
0068765d      {
00687666          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0068766c          int32_t* i_2;
0068766c          int32_t* m_firstInterestingBucket_2;
0068766c          
0068766c          if (this->m_firstInterestingBucket == ecx_1)
0068766c          {
00687682          label_687682:
00687682              m_firstInterestingBucket_2 = nullptr;
00687684              i_2 = nullptr;
0068766c          }
0068766c          else
0068766c          {
00687670              while (true)
00687670              {
00687670                  class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_firstInterestingBucket = this->m_firstInterestingBucket;
00687670                  
00687676                  if (*(uint32_t*)m_firstInterestingBucket != 0)
00687676                  {
00687688                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0068768b                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0068768d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0068768d                      break;
00687676                  }
00687676                  
0068767d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0068767d                  
00687680                  if (&m_firstInterestingBucket[1] == ecx_1)
00687680                      goto label_687682;
00687670              }
0068766c          }
0068766c          
0068768f          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0068768f          
00687693          if (eax_4 == i_2)
006876a5              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00687693          else
00687693          {
0068769c              void* edx_1;
0068769c              
0068769c              do
0068769c              {
00687695                  edx_1 = eax_4;
00687697                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0068769c              } while (eax_4 != i_2);
0068769c              
006876a0              if (edx_1 != 0)
006876ac                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
006876a0              else
006876a5                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00687693          }
00687693          
006876af          this->m_numElements -= 1;
006876b2          i_2[1] = i_1;
006876ba          i_1 = i_2;
0068765d      }
0068765d      
006876be      class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_buckets = this->m_buckets;
006876be      
006876c6      if (m_buckets != &this->m_aInplaceBuckets)
006876c9          operator delete[](m_buckets);
006876c9      
006876d6      this->m_buckets = nullptr;
006876d9      this->m_firstInterestingBucket = nullptr;
006876dc      this->m_numBuckets = 0;
006876df      this->m_numElements = 0;
006876e2      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
006876e9      void* eax_7;
006876e9      
006876e9      if (i_1 != 0)
006876e9      {
0068776b          int32_t* i;
0068776b          
0068776b          do
0068776b          {
006876f0              uint32_t m_numBuckets = this->m_numBuckets;
006876f6              i = i_1[1];
006876f6              
006876ff              if ((m_numBuckets * 2) < (this->m_numElements + 1))
006876ff              {
00687701                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00687708                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068770e                  arg2 = m_numBuckets;
0068771e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0068771e                  
00687728                  if (eax_8 != bucketSizesEnd_1)
00687731                      eax_8 = &eax_8[1];
00687728                  else
00687728                  {
0068772a                      eax_8 -= 4;
0068772a                      
0068772f                      if (eax_8 != bucketSizesEnd_1)
00687731                          eax_8 = &eax_8[1];
00687728                  }
00687728                  
00687739                  IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::resize_internal(this, *(uint32_t*)eax_8);
006876ff              }
006876ff              
00687742              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
00687745              class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_buckets_1 = this->m_buckets;
0068774b              i_1[1] = m_buckets_1[temp1_1];
0068774e              m_buckets_1[temp1_1] = i_1;
00687754              eax_7 = &m_buckets_1[temp1_1];
00687754              
00687759              if (eax_7 < this->m_firstInterestingBucket)
0068775b                  this->m_firstInterestingBucket = eax_7;
0068775b              
00687766              this->m_numElements += 1;
00687769              i_1 = i;
0068776b          } while (i != 0);
006876e9      }
006876e9      
00687770      eax_7 = 1;
00687773      return 1;
00687640  }

00687776                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00687780  uint8_t __fastcall CInputManager_WIN32::EnumSuitableDevices(class CInputManager_WIN32* this)

00687780  {
0068778b      if (this->m_pDI == 0)
0068778b      {
0068778d          struct IDirectInput8A* eax;
0068778d          eax = 0;
00687790          return 0;
0068778b      }
0068778b      
0068779f      CInputManager_WIN32::AddDevice(this, 0x13, &GUID_SysKeyboard, &GUID_SysKeyboard);
006877b2      CInputManager_WIN32::AddDevice(this, 0x12, &GUID_SysMouse, &GUID_SysMouse);
006877cd      this->m_nVirtualDevice = this->m_aDevices.m_num;
006877d3      CInputManager_WIN32::AddDevicePointer(this, 0x1c, &GUID_Virtual, &GUID_Virtual, nullptr);
006877d8      struct IDirectInput8A* m_pDI = this->m_pDI;
006877f5      int32_t eax_2;
006877f5      eax_2 = m_pDI->vtable->EnumDevices(m_pDI, 0, CInputManager_WIN32::EnumSuitableDevicesCB, this, 0) >= 0;
006877f8      return eax_2;
00687780  }

006877f9                                                                             90 90 90 90 90 90 90                           .......

00687800  class PStringBase<char>* __thiscall CInputManager_WIN32::GetNameFromKey_Internal(class CInputManager_WIN32 const* this, class PStringBase<char>* __return, class ControlSpecification arg3, uint32_t arg4)

00687800  {
0068780c      class ControlSpecification eax = arg3;
00687819      uint32_t __return_1 = (eax >> 0x10);
0068781d      uint32_t m_num = this->m_aDevices.m_num;
00687829      int32_t esi = 0;
00687829      
0068782d      if (m_num > 0)
0068782d      {
00687835          int32_t* edx_2 = &this->m_aDevices.m_data->iDeviceIndex;
00687835          
0068783a          while (*(uint32_t*)edx_2 != ((uint32_t)*(uint8_t*)((char*)eax.__inner0 + 0)))
0068783a          {
0068783c              esi += 1;
0068783d              edx_2 = &edx_2[0xc];
0068783d              
00687842              if (esi >= m_num)
00687842                  break;
0068783a          }
0068782d      }
0068782d      
00687846      if (esi >= m_num)
00687846      {
00687b38          PStringBase<char>::PStringBase<char>(__return, &data_7928af);
00687b45          return __return;
00687846      }
00687846      
0068784c      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00687851      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00687859      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00687867      char* __return_3;
00687867      ControlSpecification::GetDIKName(&arg3, &__return_3);
0068786c      char* __return_5 = __return_3;
00687870      uint32_t eax_3 = *(uint32_t*)(__return_5 - 8);
00687870      
00687876      if (eax_3 == 0xffffffff)
00687876      {
00687879          eax_3 = compute_str_hash(__return_5);
00687881          *(uint32_t*)(__return_5 - 8) = eax_3;
00687876      }
00687876      
0068788d      void var_268;
0068788d      StringInfo::StringInfo(&var_268);
0068789e      StringInfo::SetStringIDandTableEnum(&var_268, eax_3, arg4);
006878b9      class PStringBase<char> __return_2;
006878b9      
006878b9      if (StringInfo::IsValid(&var_268, 1) == 0)
006878b9      {
00687931          struct CInputManager_WIN32::InputDevice* m_data = this->m_aDevices.m_data;
0068793d          void* edx_5 = &m_data[esi];
0068793d          
00687943          if (*(uint32_t*)edx_5 == 0)
00687943          {
0068798e              class ControlSpecification eax_14 = arg3;
0068798e              
006879ae              if ((((uint32_t)*(uint8_t*)((char*)eax_14.__inner0 + 0)) == m_data[this->m_nVirtualDevice].iDeviceIndex && (eax_14 & 0xffff0000) == 0x10000))
006879b9                  PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_2, "Mouse-Look");
00687943          }
00687943          else
00687943          {
00687953              int32_t s;
00687953              __builtin_memset(&s, 0, 0x13c);
00687955              uint32_t __return_4 = __return_1;
0068795c              s = 0x13c;
00687967              int32_t* edx_6 = *(uint32_t*)edx_5;
00687979              void var_128;
00687979              
00687979              if (*(uint32_t*)(*(uint32_t*)edx_6 + 0x38)(edx_6, &s, __return_4, 1) >= 0)
006879b9                  PStringBase<char>::set(&PStringBase<char>::s_NullBuffer_2, &var_128);
00687943          }
006878b9      }
006878b9      else
006878b9      {
006878d7          PStringBase<unsigned short>::to_spstring(StringInfo::GetString(&var_268, &__return_1, 0), &__return_2, 0);
006878e5          PStringBase<unsigned short>::operator=(&PStringBase<char>::s_NullBuffer_2, &__return_2);
006878ee          int32_t* esi_2 = (__return_2 - 0x14);
006878ee          
006878fd          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00687905              **(uint32_t**)esi_2(1);
00687905          
0068790b          int32_t* esi_4 = (__return_1 - 0x14);
0068790b          
0068791e          if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0068792a              **(uint32_t**)esi_4(1);
006878b9      }
006878b9      
006879be      uint32_t esi_7 = ((uint32_t)*(uint8_t*)((char*)arg3.__inner0 + 1));
006879c9      void var_1d8;
006879c9      StringInfo::StringInfo(&var_1d8);
006879c9      
006879e1      if (SubControlIndexToStringInfo(esi_7, &var_1d8) != 0)
006879e1      {
006879eb          void var_2f8;
006879eb          StringInfo::StringInfo(&var_2f8);
006879fd          int32_t ecx_17 = StringInfo::SetStringIDandTableEnum(&var_2f8, 0, 3);
00687a02          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
00687a06          int32_t var_31c_9 = ecx_17;
00687a13          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
00687a24          StringInfo::AddVariable_String(&var_2f8, 0, PStringBase<char>::s_NullBuffer_4);
00687a3b          StringInfo::AddVariable_StringInfo(&var_2f8, 0, &var_1d8);
00687a3b          
00687a4d          if (StringInfo::IsValid(&var_2f8, 1) != 0)
00687a4d          {
00687a68              PStringBase<unsigned short>::to_spstring(StringInfo::GetString(&var_2f8, &__return_1, 0), &__return_2, 0);
00687a76              PStringBase<unsigned short>::operator=(&PStringBase<char>::s_NullBuffer_2, &__return_2);
00687a7f              int32_t* esi_9 = (__return_2 - 0x14);
00687a7f              
00687a8e              if ((InterlockedDecrement(&esi_9[1]) == 0 && esi_9 != 0))
00687a96                  **(uint32_t**)esi_9(1);
00687a96              
00687a9c              int32_t* esi_11 = (__return_1 - 0x14);
00687a9c              
00687aab              if ((InterlockedDecrement(&esi_11[1]) == 0 && esi_11 != 0))
00687ab3                  **(uint32_t**)esi_11(1);
00687a4d          }
00687a4d          
00687ab9          StringInfo::~StringInfo(&var_2f8);
006879e1      }
006879e1      
00687abe      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00687ac5      __return->m_charbuffer = PStringBase<char>::s_NullBuffer_3;
00687acb      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_3[-1]);
00687ad8      StringInfo::~StringInfo(&var_1d8);
00687ae4      StringInfo::~StringInfo(&var_268);
00687aed      int32_t* esi_13 = &__return_3[0xffffffec];
00687aed      
00687afc      if ((InterlockedDecrement(&esi_13[1]) == 0 && esi_13 != 0))
00687b04          **(uint32_t**)esi_13(1);
00687b04      
00687b0a      void* __offset(PSRefBufferCharData<char>, -0x14) esi_15 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00687b0a      
00687b19      if ((InterlockedDecrement(((char*)esi_15 + 4)) == 0 && esi_15 != 0))
00687b21          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_15) + -0x14)(1);
00687b21      
00687b2b      return __return;
00687800  }

00687b48                          90 90 90 90 90 90 90 90                                                          ........

00687b50  uint8_t __thiscall CInputManager_WIN32::UnbindByKey(class CInputManager_WIN32* this, class QualifiedControl arg2, uint32_t arg3)

00687b50  {
00687b6c      int32_t* i;
00687b6c      
00687b6c      for (i = this->m_InputMap.m_hashSections.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, arg3) % this->m_InputMap.m_hashSections.m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
00687b6c      {
00687b72          if (*(uint32_t*)i == arg3)
00687b72          {
00687b83              if (i != 0)
00687b83              {
00687b85                  i = i[4];
00687b85                  
00687b8a                  if (i != 0)
00687b8a                  {
00687b9b                      uint32_t m_metamode = arg2.m_metamode;
00687ba2                      uint32_t m_activation = arg2.m_activation;
00687bad                      return CInputMap::UnbindByKey(i, arg2.m_key.__inner0);
00687b8a                  }
00687b83              }
00687b83              
00687b83              break;
00687b72          }
00687b6c      }
00687b6c      
00687b7b      i = 0;
00687b7e      return 0;
00687b50  }


00687bb0  uint8_t __thiscall CInputManager_WIN32::FindKeysForAction(class CInputManager_WIN32* this, uint32_t arg2, uint32_t arg3, class List<QualifiedControl>* arg4)

00687bb0  {
00687bb6      uint32_t eax;
00687bb6      
00687bb6      if (arg3 != 0)
00687bb6      {
00687bbf          eax = CMasterInputMap::GetInputMapByID(&this->m_InputMap, arg3);
00687bbf          
00687bc6          if (eax != 0)
00687bd9              return CInputMap::FindKeysForAction(eax, arg2, arg4);
00687bb6      }
00687bb6      
00687bdc      eax = 0;
00687bde      return 0;
00687bb0  }

00687be1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00687bf0  uint8_t __thiscall CInputManager_WIN32::FindConflictingControls(class CInputManager_WIN32 const* this, class QualifiedControl const* arg2, uint32_t arg3, class SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>* arg4)

00687bf0  {
00687bfe      SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>::SetNElements(arg4, 0, 1);
00687c03      class CInputMap* eax = arg3;
00687c03      
00687c09      if (eax != 0)
00687c09      {
00687c12          eax = CMasterInputMap::GetInputMapByID(&this->m_InputMap, eax);
00687c12          
00687c19          if (eax != 0)
00687c2a              return CInputMap::FindConflictingControls(eax, arg2, arg4);
00687c09      }
00687c09      
00687c2e      eax = 0;
00687c31      return 0;
00687bf0  }

00687c34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00687c40  uint8_t __thiscall CInputManager_WIN32::UnbindAllByAction(class CInputManager_WIN32* this, uint32_t arg2, uint32_t arg3)

00687c40  {
00687c5f      int32_t* i;
00687c5f      
00687c5f      for (i = this->m_InputMap.m_hashSections.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, arg3) % this->m_InputMap.m_hashSections.m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
00687c5f      {
00687c63          if (*(uint32_t*)i == arg3)
00687c63          {
00687c75              if (i != 0)
00687c75              {
00687c77                  i = i[4];
00687c77                  
00687c7c                  if (i != 0)
00687c8c                      return CInputMap::UnbindAllByAction(i, arg2);
00687c75              }
00687c75              
00687c75              break;
00687c63          }
00687c5f      }
00687c5f      
00687c6d      i = 0;
00687c70      return 0;
00687c40  }

00687c8f                                               90                                                                 .

00687c90  struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this, class IDClass<_tagDataID,32,0>* arg2)

00687c90  {
00687c97      uint32_t id = arg2->id;
00687c9d      uint32_t temp1 = (COMBINE(0, id) % this->m_numBuckets);
00687ca0      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData** m_buckets = this->m_buckets;
00687ca0      
00687cad      for (int32_t* i = m_buckets[temp1]; i != 0; i = i[1])
00687cad      {
00687cb2          if (*(uint32_t*)i == id)
00687cb2          {
00687cc5              if (i == 0)
00687cc5                  break;
00687cc5              
00687cce              void* var_14 = &m_buckets[temp1];
00687cd1              int32_t* i_1 = i;
00687cd4              IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, this);
00687cde              return i;
00687cb2          }
00687cad      }
00687cad      
00687cc0      return 0;
00687c90  }

00687ce1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00687cf0  uint8_t __thiscall IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::add(class IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* arg2)

00687cf0  {
00687cf8      union __inner0 = arg2->m_hashKey.__inner0;
00687cfb      uint32_t m_numBuckets = this->m_numBuckets;
00687cfb      
00687d0e      for (int32_t* i = this->m_buckets[(COMBINE(0, __inner0) % m_numBuckets)]; i != 0; i = i[1])
00687d0e      {
00687d12          if (*(uint32_t*)i == __inner0)
00687d12          {
00687d5e              if (i == 0)
00687d5e                  break;
00687d5e              
00687d62              i = 0;
00687d65              return 0;
00687d12          }
00687d0e      }
00687d0e      
00687d24      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00687d28          IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::grow(this);
00687d28      
00687d31      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.__inner0) % this->m_numBuckets);
00687d34      class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_buckets = this->m_buckets;
00687d3a      arg2->m_hashNext = m_buckets[temp1_1];
00687d3d      m_buckets[temp1_1] = arg2;
00687d43      class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** eax_4 = &m_buckets[temp1_1];
00687d43      
00687d48      if (eax_4 < this->m_firstInterestingBucket)
00687d4a          this->m_firstInterestingBucket = eax_4;
00687d4a      
00687d52      this->m_numElements += 1;
00687d56      uint32_t eax_6;
00687d56      eax_6 = 1;
00687d59      return 1;
00687cf0  }

00687d68                          90 90 90 90 90 90 90 90                                                          ........

00687d70  uint8_t __thiscall CInputManager_WIN32::OnStartup(class CInputManager_WIN32* this, int32_t arg2)

00687d70  {
00687d70      int32_t __saved_esi_1;
00687d70      int32_t __saved_esi = __saved_esi_1;
00687d71      int32_t __saved_edi_2;
00687d71      int32_t __saved_edi_1 = __saved_edi_2;
00687d76      int32_t var_c = arg2;
00687d79      int32_t __saved_edi;
00687d79      int32_t* esp_1 = &__saved_edi;
00687d80      int32_t edx;
00687d80      
00687d80      if (CInputManager::OnStartup(this, edx) != 0)
00687d80      {
00687d86          char const* const lpLibFileName = "DINPUT8.DLL";
00687d8b          this->m_hwnd = arg2;
00687d91          HINSTANCE eax_1;
00687d91          HINSTANCE ecx;
00687d91          eax_1 = LoadLibraryA(lpLibFileName);
00687d99          this->m_hDInputDLL = eax_1;
00687d9f          uint16_t* lpModuleName;
00687d9f          uint16_t* var_18;
00687d9f          uint16_t* var_14;
00687d9f          HINSTANCE var_10;
00687d9f          
00687d9f          if (eax_1 == 0)
00687d9f          {
00687da1              HINSTANCE var_c_1 = eax_1;
00687da2              var_10 = ecx;
00687da5              var_14 = &data_794320;
00687daf              var_14 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, var_14);
00687db2              var_18 = &data_794320;
00687dbc              var_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, var_18);
00687dbf              lpModuleName = u"DINPUT8.DLL";
00687dc4              uint16_t eax_2;
00687dc4              class PStringBase<unsigned short> ecx_6;
00687dc4              class PStringBase<unsigned short> edx_1;
00687dc4              eax_2 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, lpModuleName);
00687dc9              lpModuleName = 0x65;
00687dcb              PlatformString::DisplayString(eax_2, edx_1, ecx_6, lpModuleName, var_18);
00687dd7              *(uint32_t*)0xc4830697();
00687dda              int32_t eax_3;
00687dda              eax_3 = 0;
00687dde              return 0;
00687d9f          }
00687d9f          
00687de1          char const* const var_c_2 = "DirectInput8Create";
00687de6          var_10 = eax_1;
00687de7          HRESULT (* eax_4)(struct HINSTANCE__*, uint32_t, struct _GUID const*, void**, IUnknown*);
00687de7          HINSTANCE ecx_8;
00687de7          eax_4 = kernel32_GetProcAddress_Ptr(var_10, var_c_2);
00687def          this->m_pfnDirectInputCreate = eax_4;
00687df5          int32_t var_c_3 = 0;
00687df7          uint16_t** esp_2;
00687df7          
00687df7          if (eax_4 != 0)
00687df7          {
00687e2a              var_10 = &this->m_pDI;
00687e2b              var_14 = &IID_IDirectInput8A;
00687e30              var_18 = 0x800;
00687e35              lpModuleName = nullptr;
00687e3d              lpModuleName = GetModuleHandleA(lpModuleName);
00687e3e              int32_t eax_7;
00687e3e              uint16_t* ecx_14;
00687e3e              eax_7 = this->m_pfnDirectInputCreate(lpModuleName, var_18, var_14, var_10);
00687e46              class PStringBase<unsigned short> var_20;
00687e46              
00687e46              if (eax_7 >= 0)
00687e46              {
00687e8b                  uint8_t eax_8;
00687e8b                  uint16_t* ecx_22;
00687e8b                  eax_8 = CInputManager_WIN32::EnumSuitableDevices(this);
00687e8b                  
00687e92                  if (eax_8 != 0)
00687e92                  {
00687e96                      CInputManager_WIN32::AcquireAll(this);
00687e9b                      struct CInputManager_WIN32::VTable* vtable = this->vtable;
00687e9d                      var_10 = nullptr;
00687ea1                      vtable->SetMouseLookMode(var_10);
00687ea4                      struct CInputManager_WIN32::VTable* vtable_1 = this->vtable;
00687ea6                      var_10 = 1;
00687eaf                      return vtable_1->AddKeyMap(var_10, var_c_3);
00687e92                  }
00687e92                  
00687eb2                  var_10 = nullptr;
00687eb4                  var_14 = ecx_22;
00687eb7                  var_18 = &data_794320;
00687ec1                  var_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, var_18);
00687ec4                  lpModuleName = &data_794320;
00687ece                  lpModuleName = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, lpModuleName);
00687ed1                  var_20 = 0x794320;
00687ed6                  uint16_t eax_10;
00687ed6                  class PStringBase<unsigned short> ecx_31;
00687ed6                  class PStringBase<unsigned short> edx_2;
00687ed6                  eax_10 = PStringBase<unsigned short>::PStringBase<unsigned short>(&lpModuleName, var_20);
00687edb                  var_20 = 0x68;
00687edd                  PlatformString::DisplayString(eax_10, edx_2, ecx_31, var_20, lpModuleName);
00687ee7                  var_10 = 1;
00687ef0                  return *(uint32_t*)0xc48316b7(var_10, var_c_3);
00687e46              }
00687e46              
00687e48              var_10 = nullptr;
00687e4a              var_14 = ecx_14;
00687e4d              var_18 = &data_794320;
00687e57              var_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, var_18);
00687e5a              lpModuleName = &data_794320;
00687e64              lpModuleName = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, lpModuleName);
00687e67              var_20 = 0x794320;
00687e6c              PStringBase<unsigned short>::PStringBase<unsigned short>(&lpModuleName, var_20);
00687e71              var_20 = 0x67;
00687e71              esp_2 = &var_20;
00687df7          }
00687df7          else
00687df7          {
00687df9              var_10 = ecx_8;
00687dfc              var_14 = &data_794320;
00687e06              var_14 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_10, var_14);
00687e09              var_18 = &data_794320;
00687e13              var_18 = PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, var_18);
00687e16              lpModuleName = u"DINPUT8.DLL";
00687e1b              PStringBase<unsigned short>::PStringBase<unsigned short>(&var_18, lpModuleName);
00687e20              lpModuleName = 0x66;
00687e20              esp_2 = &lpModuleName;
00687df7          }
00687df7          
00687e73          PlatformString::DisplayString();
00687e7a          esp_1 = &esp_2[5];
00687e7f          *(uint32_t*)0xc4831697();
00687d80      }
00687d80      
00687e84      *(uint32_t*)esp_1;
00687e84      esp_1[1];
00687e86      return 0;
00687d70  }

00687ef3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00687f00  class PStringBase<char>* __thiscall CInputManager_WIN32::GetNameFromKey(class CInputManager_WIN32 const* this, class PStringBase<char>* __return, class ControlSpecification arg3)

00687f00  {
00687f0b      class CInputManager_WIN32* this_1 = this;
00687f11      CInputManager_WIN32::GetNameFromKey_Internal(this, __return, arg3, 4);
00687f19      return __return;
00687f00  }

00687f1c                                                                                      90 90 90 90                              ....

00687f20  class PStringBase<char>* __thiscall CInputManager_WIN32::GetNameFromMetaKey(class CInputManager_WIN32 const* this, class PStringBase<char>* __return, class ControlSpecification arg3)

00687f20  {
00687f2b      class CInputManager_WIN32* this_1 = this;
00687f31      CInputManager_WIN32::GetNameFromKey_Internal(this, __return, arg3, 5);
00687f39      return __return;
00687f20  }

00687f3c                                                                                      90 90 90 90                              ....

00687f40  class PStringBase<char>* __thiscall CInputManager_WIN32::GetNameFromKey(class CInputManager_WIN32 const* this, class PStringBase<char>* __return, class QualifiedControl const* arg3)

00687f40  {
00687f4d      int32_t ebx;
00687f4d      int32_t var_b4 = ebx;
00687f4e      int32_t ebp;
00687f4e      int32_t var_b8 = ebp;
00687f4f      int32_t esi;
00687f4f      int32_t var_bc = esi;
00687f50      int32_t edi;
00687f50      int32_t var_c0 = edi;
00687f53      uint32_t m_metamode = arg3->m_metamode;
00687f58      struct List<PStringBase<char> >::VTable* const var_a0 = &List<class PStringBase<char> >::`vftable';
00687f60      int32_t* i_2 = nullptr;
00687f68      int32_t var_98 = 0;
00687f70      int32_t var_94 = 0;
00687f7d      uint32_t __inner0;
00687f7d      class PStringBase<char> __return_1;
00687f7d      class ControlSpecification __return_2;
00687f7d      
00687f7d      if (m_metamode != 0)
00687f7d      {
00687ffb          for (uint32_t i = 1; i != 0; i <<= 1)
00687ffb          {
00687f81              m_metamode = arg3;
00687f81              
00687f8b              if ((*(uint32_t*)(m_metamode + 4) & i) != 0)
00687f8b              {
00687f8d                  __inner0 = i;
00687f99                  CMasterInputMap::KeyFromMetaMode(&this->m_InputMap, &__return_2, __inner0);
00687f9e                  m_metamode = __return_2;
00687f9e                  
00687fa5                  if (m_metamode != 0xffffffff)
00687fa5                  {
00687fa7                      __inner0 = m_metamode;
00687faa                      __inner0 = m_metamode;
00687fac                      this->vtable->GetNameFromMetaKey(&__return_1, __inner0);
00687fbb                      class PStringBase<char> __return_3 = __return_1;
00687fc2                      void* esi_1;
00687fc2                      
00687fc2                      if (*(uint32_t*)(__return_3 - 4) != 1)
00687fc2                      {
00687fcd                          __inner0 = &__return_1;
00687fd2                          List<PStringBase<char> >::push_back(&var_a0, __inner0);
00687fdb                          esi_1 = (__return_1 - 0x14);
00687fc2                      }
00687fc2                      else
00687fc4                          esi_1 = (__return_3 - 0x14);
00687fc4                      
00687fe1                      __inner0 = ((char*)esi_1 + 4);
00687fe2                      int32_t eax_2;
00687fe2                      eax_2 = InterlockedDecrement(__inner0);
00687fe2                      
00687fee                      if ((eax_2 == 0 && esi_1 != 0))
00687fee                      {
00687ff0                          int32_t eax_3 = *(uint32_t*)esi_1;
00687ff4                          __inner0 = 1;
00687ff5                          m_metamode = *(uint32_t*)eax_3(__inner0);
00687fee                      }
00687fa5                  }
00687f8b              }
00687ffb          }
00687f7d      }
00687f7d      
00687ffd      __inner0 = m_metamode;
0068800d      __inner0 = arg3->m_key.__inner0;
00688014      void* var_a8;
0068800f      this->vtable->GetNameFromKey(&var_a8, __inner0);
00688021      int32_t* esp;
00688021      class PStringBase<char>* result;
00688021      int32_t* esi_4;
00688021      
00688021      if (*(uint32_t*)((char*)var_a8 - 4) != 1)
00688021      {
00688061          __inner0 = &var_a8;
00688066          List<PStringBase<char> >::push_back(&var_a0, __inner0);
0068806f          void var_90;
0068806f          StringInfo::StringInfo(&var_90);
0068807a          __inner0 = 3;
00688081          StringInfo::SetStringIDandTableEnum(&var_90, 0, __inner0);
00688086          __inner0 = 0;
00688091          class PStringBase<unsigned short>* eax_7 = StringInfo::GetString(&var_90, &__return_2, __inner0);
00688096          __inner0 = 0;
0068809f          PStringBase<unsigned short>::to_spstring(eax_7, &__return_1, __inner0);
006880a8          int32_t* esi_6 = (__return_2 - 0x14);
006880ae          __inner0 = &esi_6[1];
006880ae          
006880bb          if ((InterlockedDecrement(__inner0) == 0 && esi_6 != 0))
006880bb          {
006880bd              int32_t eax_9 = *(uint32_t*)esi_6;
006880bf              __inner0 = 1;
006880c2              *(uint32_t*)eax_9(__inner0);
006880bb          }
006880bb          
006880c4          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
006880cf          class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
006880d6          __inner0 = &PStringBase<char>::s_NullBuffer_1[-1];
006880d7          InterlockedIncrement(__inner0);
006880d9          int32_t* i_1 = i_2;
006880df          char* __return_4 = __return_1;
006880df          
006880e3          for (; i_1 != 0; i_1 = i_1[1])
006880e3          {
006880ed              if (*(uint32_t*)(PStringBase<char>::s_NullBuffer_2 - 4) != 1)
006880ed              {
006880ef                  int32_t eax_11 = *(uint32_t*)(__return_4 - 4);
006880ef                  
006880f5                  if (eax_11 != 1)
006880f5                  {
006880f8                      __inner0 = (eax_11 - 1);
006880fe                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, __return_4, __inner0);
006880f5                  }
006880ed              }
006880ed              
00688103              char* eax_13 = *(uint32_t*)i_1;
00688105              int32_t ecx_15 = *(uint32_t*)(eax_13 - 4);
00688105              
0068810b              if (ecx_15 != 1)
0068810b              {
0068810e                  __inner0 = (ecx_15 - 1);
00688114                  PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_2, eax_13, __inner0);
0068810b              }
006880e3          }
006880e3          
00688120          class PStringBase<char> PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00688124          result = __return;
0068812b          result->m_charbuffer = PStringBase<char>::s_NullBuffer_3;
00688130          __inner0 = (PStringBase<char>::s_NullBuffer_3 - 0x10);
00688131          InterlockedIncrement(__inner0);
0068813d          int32_t* esi_8 = (PStringBase<char>::s_NullBuffer_2 - 0x14);
00688143          __inner0 = &esi_8[1];
00688143          
0068814c          if ((InterlockedDecrement(__inner0) == 0 && esi_8 != 0))
0068814c          {
0068814e              int32_t eax_16 = *(uint32_t*)esi_8;
00688150              __inner0 = 1;
00688154              *(uint32_t*)eax_16(__inner0);
0068814c          }
0068814c          
0068815c          __inner0 = &__return_4[0xfffffff0];
0068815c          
00688165          if ((InterlockedDecrement(__inner0) == 0 && __return_4 != 0x14))
00688165          {
00688167              int32_t edx_6 = *(uint32_t*)(__return_4 - 0x14);
00688169              __inner0 = 1;
0068816d              *(uint32_t*)edx_6(__inner0);
00688165          }
00688165          
00688173          StringInfo::~StringInfo(&var_90);
0068817c          esi_4 = ((char*)var_a8 - 0x14);
00688182          __inner0 = &esi_4[1];
00688183          esp = &var_c0;
00688183          
0068818b          if ((InterlockedDecrement(__inner0) == 0 && esi_4 != 0))
0068818b          {
0068818d              __inner0 = 1;
0068818d              esp = &__inner0;
00688193              **(uint32_t**)esi_4();
0068818b          }
00688021      }
00688021      else
00688021      {
00688023          result = __return;
0068802a          __inner0 = 0x7928af;
00688031          PStringBase<char>::PStringBase<char>(result, __inner0);
0068803a          esi_4 = ((char*)var_a8 - 0x14);
00688040          __inner0 = &esi_4[1];
00688041          esp = &var_c0;
00688041          
00688051          if ((InterlockedDecrement(__inner0) == 0 && esi_4 != 0))
00688051          {
00688057              __inner0 = 1;
00688057              esp = &__inner0;
00688193              **(uint32_t**)esi_4();
00688051          }
00688021      }
00688199      esp[8] = &List<class PStringBase<char> >::`vftable';
006881a1      List<PStringBase<char> >::flush(&esp[8]);
006881a8      *(uint32_t*)esp;
006881a8      esp[1];
006881a8      esp[2];
006881a8      esp[3];
006881b2      return result;
00687f40  }

006881b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006881c0  uint8_t __thiscall HashTable<ControlSpecification,CInputManager_WIN32::RecentControlState,0>::set(class HashTable<ControlSpecification,CInputManager_WIN32::RecentControlState,0>* this, class ControlSpecification const* arg2, struct CInputManager_WIN32::RecentControlState const* arg3)

006881c0  {
006881c9      union __inner0 = arg2->__inner0;
006881c9      
006881dd      for (int32_t* i = this->m_intrusiveTable.m_buckets[(COMBINE(0, __inner0) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
006881dd      {
006881e2          if (*(uint32_t*)i == __inner0)
006881e2          {
00688224              if (i == 0)
00688224                  break;
00688224              
00688232              __builtin_memcpy(&i[2], arg3, 0x18);
00688236              i = 1;
00688239              return 1;
006881e2          }
006881dd      }
006881dd      
006881ed      void* eax_3 = operator new(0x20);
006881ed      
006881f7      if (eax_3 == 0)
006881f7      {
00688241          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, nullptr);
00688248          int32_t eax_5;
00688248          eax_5 = 1;
0068824b          return 1;
006881f7      }
006881f7      
006881ff      *(uint32_t*)eax_3 = arg2->__inner0;
00688204      *(uint32_t*)((char*)eax_3 + 4) = 0;
00688210      __builtin_memcpy(((char*)eax_3 + 8), arg3, 0x18);
00688215      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, eax_3);
0068821c      int32_t eax_4;
0068821c      eax_4 = 1;
0068821f      return 1;
006881c0  }

0068824e                                            90 90                                                                ..

00688250  uint8_t __thiscall IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::insert(class IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* arg2)

00688250  {
00688259      uint8_t result = IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::add(this, arg2);
00688259      
00688260      if (result == 0)
00688264          return result;
00688264      
00688268      uint32_t m_num = this->m_array.m_num;
0068826f      arg2->m_PriorityHashArrayIndex = m_num;
00688278      int32_t eax_1 = (this->m_array.m_sizeAndDeallocate & 0x7fffffff);
0068827f      uint8_t eax_4;
0068827f      
0068827f      if (this->m_array.m_num >= eax_1)
0068828d          eax_4 = SmartArray<unsigned long,1>::grow(&this->m_array, SmartArray<unsigned long,1>::get_new_size(&this->m_array, (eax_1 + 1)));
0068828d      
00688294      if ((this->m_array.m_num < eax_1 || eax_4 != 0))
00688294      {
0068826c          this->m_array.m_data[this->m_array.m_num] = arg2;
0068826c          this->m_array.m_num += 1;
00688294      }
00688294      
006882a5      IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_up(this, m_num, arg2);
006882ad      int32_t eax_6;
006882ad      eax_6 = 1;
006882b0      return 1;
00688250  }

006882b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006882c0  class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* __fastcall IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::remove(class IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>* this, class ControlSpecification arg2)

006882c0  {
006882c9      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* result = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(this, &arg2);
006882c9      
006882d2      if (result != 0)
006882d2      {
006882d4          uint32_t eax = *(int32_t*)((char*)result + 0x14);
006882d7          uint32_t m_num = this->m_array.m_num;
006882d7          
006882dc          if (eax < m_num)
006882dc          {
006882e1              this->m_array.m_num = (m_num - 1);
006882e1              
006882e4              if (eax != (m_num - 1))
006882e4              {
006882e6                  class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_data = this->m_array.m_data;
006882ec                  m_data[eax] = m_data[(m_num - 1)];
006882f2                  this->m_array.m_data[this->m_array.m_num] = 0;
006882e4              }
006882dc          }
006882dc          
006882ff          if (eax < this->m_hashTable.m_numElements)
0068830b              IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_up_or_down(this, eax, this->m_array.m_data[eax]);
006882d2      }
006882d2      
00688314      return result;
006882c0  }

00688317                                                                       90 90 90 90 90 90 90 90 90                         .........

00688320  void __fastcall CInputManager_WIN32::OnShutdown(class CInputManager_WIN32* this)

00688320  {
00688326      List<CInputManager::InputMapEntry>::flush(&this->m_inputMapList);
00688331      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashActiveControls.m_intrusiveTable);
0068833c      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashControlToType.m_intrusiveTable);
00688343      CInputManager_WIN32::ReleaseDevices(this);
00688348      struct IDirectInput8A* m_pDI = this->m_pDI;
00688348      
00688350      if (m_pDI != 0)
00688350      {
00688352          m_pDI->vtable->Release(m_pDI);
00688358          this->m_pDI = nullptr;
00688350      }
00688320  }

00688364              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00688370  void* __thiscall HashTable<ControlSpecification,enum ControlType,0>::`scalar deleting destructor'(class HashTable<ControlSpecification,enum ControlType,0>* this, uint32_t arg2)

00688370  {
00688379      this->vtable = 0x7fef60;
0068837f      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
00688384      class HashTableData<ControlSpecification,enum ControlType>** m_buckets = this->m_intrusiveTable.m_buckets;
00688374      this->m_intrusiveTable.vtable = 0x7fef48;
00688374      
00688392      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00688395          operator delete[](m_buckets);
00688395      
00688374      this->m_intrusiveTable.m_buckets = nullptr;
00688374      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00688374      this->m_intrusiveTable.m_numBuckets = 0;
00688374      this->m_intrusiveTable.m_numElements = 0;
00688374      
006883b0      if ((arg2 & 1) != 0)
006883b3          operator delete(this);
006883b3      
006883bf      return this;
00688370  }

006883c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006883d0  void* __thiscall HashTable<ControlSpecification,CInputManager_WIN32::RecentControlState,0>::`scalar deleting destructor'(class HashTable<ControlSpecification,CInputManager_WIN32::RecentControlState,0>* this, uint32_t arg2)

006883d0  {
006883d9      this->vtable = 0x7fef64;
006883df      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_intrusiveTable);
006883e4      class HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState>** m_buckets = this->m_intrusiveTable.m_buckets;
006883d4      this->m_intrusiveTable.vtable = 0x7fef4c;
006883d4      
006883f2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
006883f5          operator delete[](m_buckets);
006883f5      
006883d4      this->m_intrusiveTable.m_buckets = nullptr;
006883d4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
006883d4      this->m_intrusiveTable.m_numBuckets = 0;
006883d4      this->m_intrusiveTable.m_numElements = 0;
006883d4      
00688410      if ((arg2 & 1) != 0)
00688413          operator delete(this);
00688413      
0068841f      return this;
006883d0  }

00688422        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00688430  void __fastcall PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::~PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>(class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>* this)

00688430  {
00688434      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(this);
0068843e      SmartArray<unsigned long,1>::Reset(&this->m_cIntrusivePriorityHash.m_array);
0068843e      
00688450      if ((this->m_cIntrusivePriorityHash.m_array.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00688455          operator delete[](this->m_cIntrusivePriorityHash.m_array.m_data);
00688455      
0068845d      class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_buckets = this->m_cIntrusivePriorityHash.m_hashTable.m_buckets;
00688465      this->m_cIntrusivePriorityHash.m_hashTable.vtable = &IntrusiveHashTable<class ControlSpecification,class PriorityHash<class ControlSpecification,struct CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData*,1>::`vftable';
00688465      
0068846b      if (m_buckets != &this->m_cIntrusivePriorityHash.m_hashTable.m_aInplaceBuckets)
0068846e          operator delete[](m_buckets);
0068846e      
00688479      this->m_cIntrusivePriorityHash.m_hashTable.m_buckets = nullptr;
0068847c      this->m_cIntrusivePriorityHash.m_hashTable.m_firstInterestingBucket = nullptr;
0068847f      this->m_cIntrusivePriorityHash.m_hashTable.m_numBuckets = 0;
00688482      this->m_cIntrusivePriorityHash.m_hashTable.m_numElements = 0;
00688430  }

00688487                       90 90 90 90 90 90 90 90 90                                                         .........

00688490  void __thiscall PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::insert(class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>* this, class ControlSpecification arg2, struct CInputManager_WIN32::ButtonHistoryEntry arg3)

00688490  {
006884a9      for (int32_t* i = this->m_cIntrusivePriorityHash.m_hashTable.m_buckets[(COMBINE(0, arg2) % this->m_cIntrusivePriorityHash.m_hashTable.m_numBuckets)]; i != 0; i = i[1])
006884a9      {
006884b2          if (*(uint32_t*)i == arg2)
006884b2          {
006884fd              if (i == 0)
006884fd                  break;
006884fd              
00688507              i[2] = arg3.m_timestamp;
0068850e              i[4] = arg3.ptMousePos.y;
00688511              i[3] = arg3.ptMousePos.x;
0068851b              IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_up_or_down(this, i[5], i);
00688522              return;
006884b2          }
006884a9      }
006884a9      
006884bd      void* eax_3 = operator new(0x18);
006884bd      
006884c7      if (eax_3 == 0)
006884c7      {
0068852a          IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::insert(this, nullptr);
00688531          return;
006884c7      }
006884c7      
006884d1      *(uint32_t*)eax_3 = arg2;
006884d3      *(uint32_t*)((char*)eax_3 + 4) = 0;
006884da      *(uint32_t*)((char*)eax_3 + 8) = arg3.m_timestamp;
006884e1      *(uint32_t*)((char*)eax_3 + 0x10) = arg3.ptMousePos.y;
006884e4      *(uint32_t*)((char*)eax_3 + 0xc) = arg3.ptMousePos.x;
006884ea      *(uint32_t*)((char*)eax_3 + 0x14) = 0;
006884f1      IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::insert(this, eax_3);
00688490  }

006884ad                                         8d 49 00                                                               .I.
00688534                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00688540  void __fastcall CInputManager_WIN32::CInputManager_WIN32(class CInputManager_WIN32* this)

00688540  {
00688545      CInputManager::CInputManager(this);
0068854c      this->vtable = 0x7fefa0;
00688552      __builtin_memset(&this->m_pfnDirectInputCreate, 0, 0x1c);
0068857f      this->m_nKeyboardDevice = 0xffffffff;
00688585      this->m_nMouseDevice = 0xffffffff;
0068858b      this->m_nVirtualDevice = 0xffffffff;
00688599      this->m_hashControlToType.vtable = 0x7fef60;
006885a3      IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,enum ControlType> *,0>::IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,enum ControlType> *,0>(&this->m_hashControlToType.m_intrusiveTable, 0x17);
006885b0      this->m_hashActiveControls.vtable = 0x7fef64;
006885ba      IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState> *,0>::IntrusiveHashTable<ControlSpecification,HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState> *,0>(&this->m_hashActiveControls.m_intrusiveTable, 0x17);
006885c5      CMasterInputMap::CMasterInputMap(&this->m_InputMap);
006885d4      this->m_metaKeyMode = 0;
006885da      IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>(&this->m_ButtonHistory, 0x17);
006885ca      this->m_ButtonHistory.m_cIntrusivePriorityHash.m_array.m_data = 0;
006885ca      this->m_ButtonHistory.m_cIntrusivePriorityHash.m_array.m_sizeAndDeallocate = 0;
006885ca      this->m_ButtonHistory.m_cIntrusivePriorityHash.m_array.m_num = 0;
006885ee      this->m_eMouseLookBehavior = mlb_Remember;
006885f4      this->m_fMainWindowHasFocus = 1;
006885fa      this->m_cSetCapture = 0;
00688600      this->m_bProcessingKeyDown = 0;
00688606      this->m_bProcessingActionInResponseToKeyDown = 0;
0068860c      this->m_bIgnoreNextChar = 0;
00688612      this->m_ptNonMousePointerMovement.x = 0;
00688618      this->m_ptNonMousePointerMovement.y = 0;
0068861e      CoInitialize(nullptr);
00688540  }

0068862a                                90 90 90 90 90 90                                                            ......

00688630  void __thiscall CInputManager_WIN32::ConfigureMouseLookMode(class CInputManager_WIN32* this, enum MouseLookBehavior arg2, int32_t arg3, int32_t arg4)

00688630  {
00688637      this->m_eMouseLookBehavior = arg2;
00688637      
0068863d      if (arg2 == mlb_GotoXY)
0068863d      {
00688647          this->m_ptMousePosBeforeMouseLookMode.x = arg3;
0068864d          this->m_ptMousePosBeforeMouseLookMode.y = arg4;
0068863d      }
00688630  }

00688656                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00688660  uint32_t CInputManager_WIN32::GetDoubleClickDelay(class CInputManager_WIN32* this @ ecx)

00688660  {
00688665      return CInputManager_WIN32::sm_timeDoubleClick;
00688660  }

00688666                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00688670  uint32_t CInputManager_WIN32::GetTapDelay(class CInputManager_WIN32* this @ ecx)

00688670  {
00688675      return CInputManager_WIN32::sm_timeTap;
00688670  }

00688676                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00688680  uint8_t __thiscall CInputManager_WIN32::SetMouseXY(class CInputManager_WIN32* this, int32_t arg2, int32_t arg3)

00688680  {
00688688      if (this->m_fWantMouseLookMode != 0)
006886d3          return 0;
006886d3      
00688692      this->m_ptMousePos.x = arg2;
00688695      int32_t var_8 = arg2;
0068869d      this->m_ptMousePos.y = arg3;
0068869d      
006886b4      if (ClientToScreen(this->m_hwnd, &var_8) != 0)
006886c0          SetCursorPos(var_8, arg3);
006886c0      
006886c6      BOOL eax_2;
006886c6      eax_2 = 1;
006886cb      return 1;
00688680  }

006886d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006886e0  void __fastcall CInputManager_WIN32::~CInputManager_WIN32(class CInputManager_WIN32* this)

006886e0  {
006886e8      this->vtable = 0x7fefa0;
006886ee      List<CInputManager::InputMapEntry>::flush(&this->m_inputMapList);
006886f9      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashActiveControls.m_intrusiveTable);
00688704      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashControlToType.m_intrusiveTable);
0068870b      CInputManager_WIN32::ReleaseDevices(this);
00688710      struct IDirectInput8A* m_pDI = this->m_pDI;
00688710      
0068871a      if (m_pDI != 0)
0068871a      {
0068871c          m_pDI->vtable->Release(m_pDI);
00688722          this->m_pDI = nullptr;
0068871a      }
0068871a      
00688728      struct HINSTANCE__* m_hDInputDLL = this->m_hDInputDLL;
00688728      
00688730      if (m_hDInputDLL != 0)
00688730      {
00688733          FreeLibrary(m_hDInputDLL);
00688739          this->m_hDInputDLL = nullptr;
0068873f          CoUninitialize();
00688730      }
00688730      
0068874b      PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::~PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>(&this->m_ButtonHistory);
00688756      CMasterInputMap::~CMasterInputMap(&this->m_InputMap);
00688763      this->m_hashActiveControls.vtable = 0x7fef64;
0068876d      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashActiveControls.m_intrusiveTable);
00688772      class HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState>** m_buckets = this->m_hashActiveControls.m_intrusiveTable.m_buckets;
0068875b      this->m_hashActiveControls.m_intrusiveTable.vtable = 0x7fef4c;
0068875b      
00688780      if (m_buckets != &this->m_hashActiveControls.m_intrusiveTable.m_aInplaceBuckets)
00688783          operator delete[](m_buckets);
00688783      
0068875b      this->m_hashActiveControls.m_intrusiveTable.m_buckets = nullptr;
0068875b      this->m_hashActiveControls.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0068875b      this->m_hashActiveControls.m_intrusiveTable.m_numBuckets = 0;
0068875b      this->m_hashActiveControls.m_intrusiveTable.m_numElements = 0;
0068879f      this->m_hashControlToType.vtable = 0x7fef60;
006887a9      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashControlToType.m_intrusiveTable);
006887ae      class HashTableData<ControlSpecification,enum ControlType>** m_buckets_1 = this->m_hashControlToType.m_intrusiveTable.m_buckets;
00688797      this->m_hashControlToType.m_intrusiveTable.vtable = 0x7fef48;
00688797      
006887bc      if (m_buckets_1 != &this->m_hashControlToType.m_intrusiveTable.m_aInplaceBuckets)
006887bf          operator delete[](m_buckets_1);
006887bf      
00688797      this->m_hashControlToType.m_intrusiveTable.m_buckets = nullptr;
00688797      this->m_hashControlToType.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00688797      this->m_hashControlToType.m_intrusiveTable.m_numBuckets = 0;
00688797      this->m_hashControlToType.m_intrusiveTable.m_numElements = 0;
00688797      
006887e5      if ((this->m_aDevices.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
006887ee          operator delete[](this->m_aDevices.m_data);
006887ee      
006887fb      /* tailcall */
006887fb      return CInputManager::~CInputManager(this);
006886e0  }


00688800  void __thiscall CInputManager_WIN32::FireInputEvent(class CInputManager_WIN32* this, class ControlSpecification arg2, enum ControlType arg3, uint32_t arg4, uint32_t arg5)

00688800  {
0068880d      class ControlSpecification ebp = arg2;
0068881f      int32_t ecx = *(int32_t*)((char*)Timer::cur_time + 4);
0068882b      int32_t var_e8 = ecx;
0068882c      this->m_ttLastInputEvent = (*(uint32_t*)Timer::cur_time);
0068882f      *(uint32_t*)((char*)this->m_ttLastInputEvent)[4] = ecx;
00688836      int32_t* var_b0 = nullptr;
0068884e      uint32_t var_6c;
0068884e      uint32_t i;
0068884e      
0068884e      if (CInputManager_WIN32::GetPreviousControlState(this, ebp, arg3, &var_6c) != 0)
0068884e      {
00688863          int32_t* eax_5 = this->m_hashActionStates.m_buckets[(COMBINE(0, i) % this->m_hashActionStates.m_numBuckets)];
00688863          
00688867          if (eax_5 != 0)
00688867          {
00688872              while (*(uint32_t*)eax_5 != i)
00688872              {
00688874                  eax_5 = eax_5[1];
00688874                  
00688879                  if (eax_5 == 0)
00688879                      break;
00688872              }
00688867          }
00688867          
0068887b          var_b0 = eax_5;
0068884e      }
0068884e      
0068888f      float var_c0 = 0f;
00688897      uint32_t eax_6 = CInputManager_WIN32::DIDataToActivationType(this, arg3, arg4, &var_c0);
0068889c      int32_t x = this->m_ptMousePos.x;
0068889f      int32_t y_2 = this->m_ptMousePos.y;
006888aa      int32_t ebx_1 = (eax_6 | 0x80000000);
006888b3      int32_t var_c8 = ebx_1;
006888b7      uint32_t m_metaKeyMode = this->m_metaKeyMode;
006888bb      int32_t x_6 = x;
006888bf      int32_t y_3 = y_2;
006888c3      char var_cb = 0;
006888c8      class ControlSpecification var_bc;
006888c8      int32_t __return;
006888c8      int32_t lprc;
006888c8      int32_t y_7;
006888c8      int32_t y_8;
006888c8      uint32_t m_metaKeyMode_2;
006888c8      char var_60;
006888c8      
006888c8      if (arg3 != ct_Button)
00688b33          var_cb = 1;
006888c8      else
006888c8      {
006888d1          int32_t __return_1;
006888d1          class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>* edi_1;
006888d1          
006888d1          if ((ebx_1 & 2) == 0)
006888d1          {
0068896a              int32_t x_3 = x;
0068896d              edi_1 = &this->m_ButtonHistory;
00688975              var_cb = 1;
0068897a              var_bc = 0;
0068897a              
006889ad              if ((PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::lookup(edi_1, ebp, &var_bc) != 0 && ((var_60 & 0x10) == 0 && (arg5 - var_bc) <= CInputManager_WIN32::sm_timeDoubleClick)))
006889ad              {
006889b7                  int32_t CInputManager_WIN32::sm_cyDblClick_1 = CInputManager_WIN32::sm_cyDblClick;
006889bd                  int32_t lprc_1;
006889bd                  x_6 = lprc_1;
006889c1                  int32_t lprc_2 = lprc_1;
006889c5                  lprc = lprc_1;
006889cf                  int32_t y_4;
006889cf                  y_3 = y_4;
006889d3                  y_8 = y_4;
006889d7                  y_7 = y_4;
006889e0                  ebx_1 |= 8;
006889e4                  var_c8 = ebx_1;
006889e8                  InflateRect(&lprc, CInputManager_WIN32::sm_cxDblClick, CInputManager_WIN32::sm_cyDblClick_1);
006889f4                  int32_t y = this->m_ptMousePos.y;
006889f4                  
00688a03                  if (PtInRect(&lprc, this->m_ptMousePos.x) != 0)
00688a03                  {
00688a05                      ebx_1 |= 0x20;
00688a08                      var_c8 = ebx_1;
00688a03                  }
006889ad              }
006889ad              
00688a0c              int32_t x_1 = this->m_ptMousePos.x;
00688a20              ebp = arg2;
00688a27              int32_t x_4 = x_1;
00688a2a              int32_t x_2 = x_1;
00688a2b              int32_t y_1 = this->m_ptMousePos.y;
00688a34              __return_1 = PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::insert(edi_1, ebp, arg5);
006888d1          }
006888d1          else
006888d1          {
006888db              m_metaKeyMode = m_metaKeyMode_2;
006888db              
006888e4              if ((var_60 & 8) != 0)
006888e4              {
006888e6                  int32_t x_5 = x;
006888e9                  ebx_1 |= 0x10;
006888f2                  var_c8 = ebx_1;
006888f6                  class ControlSpecification var_e0_2 = ebp;
006888f8                  class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* eax_9 = IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::remove(&this->m_ButtonHistory.m_cIntrusivePriorityHash, y_2);
006888f8                  
006888ff                  if (eax_9 != 0)
00688902                      operator delete(eax_9);
00688902                  
0068890f                  if ((var_60 & 0x20) != 0)
0068890f                  {
00688911                      ebx_1 |= 0x40;
00688914                      var_c8 = ebx_1;
0068890f                  }
006888e4              }
006888e4              
0068891d              int32_t* var_e4_2 = &__return;
00688920              edi_1 = &this->m_ButtonHistory;
00688928              __return = 0;
00688932              uint8_t eax_10;
00688932              eax_10 = PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::lookup(edi_1, ebp, &__return);
00688932              
00688939              if (eax_10 != 0)
00688939              {
00688946                  __return_1 = __return;
00688946                  
00688953                  if ((arg5 - __return_1) <= CInputManager_WIN32::sm_timeTap)
00688953                  {
00688959                      ebx_1 |= 4;
0068895c                      var_c8 = ebx_1;
00688953                  }
00688939              }
006888d1          }
006888d1          
00688a39          int32_t __return_3 = __return_1;
00688a44          uint32_t eax_19 = CMasterInputMap::MetaModeFromKey(&this->m_InputMap, ebp);
00688a44          
00688a4b          if (eax_19 != 0)
00688a4b          {
00688a50              uint32_t m_metaKeyMode_1 = this->m_metaKeyMode;
00688a50              
00688a56              if ((ebx_1 & 1) == 0)
00688a66                  this->m_metaKeyMode = (m_metaKeyMode_1 & !(eax_19));
00688a56              else
00688a5a                  this->m_metaKeyMode = (m_metaKeyMode_1 | eax_19);
00688a4b          }
00688a4b          
00688a7a          uint32_t eax_21;
00688a7a          
00688a7a          while (edi_1->m_cIntrusivePriorityHash.m_hashTable.m_numElements != 0)
00688a7a          {
00688a80              class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_data_1 = edi_1->m_cIntrusivePriorityHash.m_array.m_data;
00688a83              eax_21 = *(uint32_t*)m_data_1;
00688a83              
00688a87              if (eax_21 == 0)
00688a87                  break;
00688a87              
00688a9f              if ((arg5 - *(uint32_t*)(eax_21 + 8)) < 0x1388)
00688a9f                  break;
00688a9f              
00688aaa              if (edi_1->m_cIntrusivePriorityHash.m_hashTable.m_numElements == 0)
00688aaa                  break;
00688aaa              
00688ab0              class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData* ebp_2 = *(uint32_t*)m_data_1;
00688aba              IntrusiveHashTable<ControlSpecification,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::find_iterator(edi_1, &__return, ebp_2);
00688ac5              int32_t var_9c;
00688ac5              
00688ac5              if (var_9c != 0)
00688ac5              {
00688ad6                  int32_t var_e0_9 = var_9c;
00688adb                  int32_t var_a0;
00688adb                  int32_t var_e4_8 = var_a0;
00688ade                  IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(edi_1, __return);
00688ac5              }
00688ac5              
00688ae3              uint32_t m_num = edi_1->m_cIntrusivePriorityHash.m_array.m_num;
00688ae3              
00688ae8              if (m_num > 0)
00688ae8              {
00688aed                  edi_1->m_cIntrusivePriorityHash.m_array.m_num = (m_num - 1);
00688aed                  
00688af0                  if (m_num != 1)
00688af0                  {
00688af2                      class PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData** m_data = edi_1->m_cIntrusivePriorityHash.m_array.m_data;
00688af8                      *(uint32_t*)m_data = m_data[(m_num - 1)];
00688afd                      edi_1->m_cIntrusivePriorityHash.m_array.m_data[edi_1->m_cIntrusivePriorityHash.m_array.m_num] = 0;
00688af0                  }
00688ae8              }
00688ae8              
00688b0c              if (edi_1->m_cIntrusivePriorityHash.m_hashTable.m_numElements > 0)
00688b18                  IntrusivePriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,PriorityHash<ControlSpecification,CInputManager_WIN32::ButtonHistoryEntry,1>::PriorityHashData *,1>::bubble_down(edi_1, 0, *(uint32_t*)edi_1->m_cIntrusivePriorityHash.m_array.m_data);
00688b18              
00688b1f              if (ebp_2 != 0)
00688b26                  operator delete(ebp_2);
00688b26              
00688a6e              ebp = arg2;
00688a7a          }
00688a7a          
00688b3a          eax_21 = var_cb;
00688b3a          
00688b40          if (eax_21 == 0)
00688b40          {
00688b50              struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax_26 = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_hashActiveControls.m_intrusiveTable.vtable, &arg2);
00688b50              
00688b57              if (eax_26 != 0)
00688b5a                  operator delete(eax_26);
00688b40          }
006888c8      }
006888c8      
00688b65      uint8_t var_ca = 0;
00688b65      
00688b72      if (((ebx_1 & 2) != 0 && var_b0 != 0))
00688b72      {
00688b74          int32_t eax_28 = var_b0[5];
00688b74          
00688b84          if (((eax_28 == 1 || eax_28 == 5) || eax_28 == 4))
00688b86              var_ca = 1;
00688b72      }
00688b72      
00688b93      uint32_t m_metaKeyMode_4 = m_metaKeyMode;
00688ba3      int32_t __return_5 = 0;
00688ba8      uint32_t lpPoint_1 = 0;
00688bac      int32_t __return_4 = 0;
00688bb0      class ControlSpecification var_78 = ebp;
00688bb4      int32_t var_70 = ebx_1;
00688bb8      class ControlSpecification var_54 = ebp;
00688bbf      char var_4c = ebx_1;
00688bc6      int32_t var_a0_1 = 0;
00688bca      uint8_t eax_30 = CInputManager::CallKeyHitHandler(this, &var_78, &lpPoint_1);
00688bd1      uint32_t lpPoint;
00688bd1      
00688bd1      if (eax_30 == 0)
00688bd1      {
00688bdf          uint8_t var_c9_1 = eax_30;
00688be3          List<CInputManager::InputMapEntry>::List<CInputManager::InputMapEntry>(&lprc, &this->m_inputMapList);
00688be3          
00688be8          while (true)
00688be8          {
00688be8              int32_t y_9 = y_7;
00688be8              
00688bf0              if (y_9 == 0)
00688bf0                  break;
00688bf0              
00688bf2              int32_t y_10 = *(uint32_t*)(y_9 + 0xc);
00688bf7              y_7 = y_10;
00688bf7              
00688bfb              if (y_10 == 0)
00688c02                  int32_t var_8c_1 = 0;
00688bfb              else
00688bfd                  *(uint32_t*)(y_10 + 0x10) = 0;
00688bfd              
00688c08              int32_t __return_2 = *(uint32_t*)y_9;
00688c0a              int32_t ebp_3 = *(uint32_t*)(y_9 + 4);
00688c0d              int32_t ebx_2 = *(uint32_t*)(y_9 + 8);
00688c11              operator delete(y_9);
00688c21              y_8 -= 1;
00688c21              
00688c25              if (__return_2 != 1)
00688c25              {
00688e47                  if (__return_2 == 2)
00688e47                      break;
00688e47                  
00688e5d                  int32_t* i_1 = this->m_InputMap.m_hashSections.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, __return_2) % this->m_InputMap.m_hashSections.m_ihlIntrusive.m_hash.m_numBuckets)];
00688e5d                  
00688e62                  if (i_1 != 0)
00688e62                  {
00688e71                      do
00688e71                      {
00688e6a                          if (*(uint32_t*)i_1 == __return_2)
00688e6a                          {
00688e7a                              if (i_1 == 0)
00688e7a                                  break;
00688e7a                              
00688e80                              class CInputMap* ecx_43 = i_1[4];
00688e80                              
00688e85                              if (ecx_43 == 0)
00688e85                                  break;
00688e85                              
00688e92                              int32_t var_b8 = 0;
00688e96                              char var_b4 = 0;
00688ea4                              var_bc = 0xffffffff;
00688ea4                              
00688eb3                              if (CInputMap::FindBestMatch(ecx_43, &var_78, &lpPoint, &var_bc) == 0)
00688eb3                                  break;
00688eb3                              
00688ebf                              if ((var_c9_1 != 0 && QualifiedControl::IsBetterMatch(&var_78, &var_54, &var_bc) == 0))
00688ed9                                  break;
00688ed9                              
00688ee3                              class ControlSpecification eax_46 = var_bc;
00688eeb                              lpPoint_1 = lpPoint;
00688ef3                              __return_4 = __return_2;
00688ef7                              var_54 = eax_46;
00688efe                              int32_t var_50 = var_b8;
00688f05                              var_4c = var_b4;
00688f0c                              var_c9_1 = 1;
00688f11                              __return = __return_2;
00688f15                              var_a0_1 = ebp_3;
00688f19                              int32_t var_9c_1 = ebx_2;
00688f1d                              break;
00688e6a                          }
00688e6a                          
00688e6c                          i_1 = i_1[1];
00688e71                      } while (i_1 != 0);
00688e62                  }
00688c25              }
00688c25              else if (((uint32_t)((int8_t)arg2)) == this->m_aDevices.m_data[this->m_nKeyboardDevice].iDeviceIndex)
00688c50                  break;
00688be8          }
00688be8          
00688c56          lprc = 0x79831c;
00688c5e          List<CInputManager::InputMapEntry>::flush(&lprc);
00688c63          ebx_1 = var_c8;
00688c67          __return_5 = __return_4;
00688c6b          ebp = arg2;
00688bd1      }
00688bd1      
00688c78      uint32_t i_2;
00688c78      
00688c78      if (var_ca != 0)
00688c78      {
00688c85          InputEvent::InputEvent(&i_2);
00688c9c          i_2 = i;
00688ca7          int32_t var_58;
00688ca7          int32_t var_44_1 = var_58;
00688cb5          int32_t var_38_1 = var_60;
00688cc0          uint32_t m_metaKeyMode_6 = m_metaKeyMode_2;
00688ccb          uint32_t var_30_1 = arg5;
00688cd6          int32_t y_5 = y_3;
00688cdd          int32_t x_7 = x_6;
00688cf1          class ControlSpecification var_40_1 = ebp;
00688cf8          int32_t var_34_1 = 0;
00688d03          int32_t var_8_1 = var_b0[6];
00688d0a          CInputManager::DeactivateActionKey(this, &i_2);
00688c78      }
00688c78      
00688d0f      uint32_t lpPoint_3 = lpPoint_1;
00688d0f      
00688d15      if ((lpPoint_3 != 0 && lpPoint_3 != 1))
00688d15      {
00688d23          if (lpPoint_3 == 2)
00688f48              this->m_ptNonMousePointerMovement.x += arg4;
00688d23          else if (lpPoint_3 == 3)
00688f31              this->m_ptNonMousePointerMovement.y += arg4;
00688d2a          else if (KeyStone::IsHelpFocused() == 0)
00688d37          {
00688d3d              lpPoint_3 = lpPoint_1;
00688d3d              
00688d53              if ((((lpPoint_3 == 7 || lpPoint_3 == 8) || lpPoint_3 == 0xa) || lpPoint_3 == 0xb))
00688d53              {
00688d62                  if (GetCursorPos(&lpPoint) == 0)
00688d62                      goto label_688d9c;
00688d62                  
00688d78                  if (ScreenToClient(this->m_hwnd, &lpPoint) == 0)
00688d78                      goto label_688d9c;
00688d78                  
00688d82                  int32_t var_7c;
00688d82                  int32_t var_e0_20 = var_7c;
00688d82                  
00688d8e                  if (KeyStone::IsOverKeystoneWindow(lpPoint) == 0)
00688d8e                      goto label_688d9c;
00688d53              }
00688d53              else
00688d53              {
00688d9c              label_688d9c:
00688d9c                  
00688d9c                  if ((var_4c & 0xa9) == 0)
00688d9c                  {
00688d9e                      long double x87_r7_1 = ((long double)var_c0);
00688da2                      long double temp6_1 = ((long double)0f);
00688da2                      (x87_r7_1 - temp6_1);
00688da8                      lpPoint_3 = ((((x87_r7_1 < temp6_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp6_1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp6_1) ? 1 : 0) << 0xe) | 0))));
00688daa                      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x44} */;
00688daa                      
00688dad                      if (!(p_1))
00688daf                          var_c0 = 1f;
00688d9c                  }
00688d9c                  
00688dbe                  InputEvent::InputEvent(&i_2);
00688dc7                  class ControlSpecification ecx_39 = var_78;
00688dcf                  i_2 = lpPoint_1;
00688dda                  class ControlSpecification var_40_2 = ecx_39;
00688de5                  int32_t var_38_2 = var_70;
00688df0                  uint32_t m_metaKeyMode_5 = m_metaKeyMode;
00688dfe                  float var_34_2 = var_c0;
00688e09                  int32_t x_8 = x_6;
00688e10                  uint32_t var_30_2 = arg5;
00688e22                  int32_t y_6 = y_3;
00688e2c                  int32_t __return_7 = __return_5;
00688e33                  int32_t var_8_2 = var_a0_1;
00688e3a                  int80_t st0_2;
00688e3a                  lpPoint_3 = CInputManager::FireActionEvent(this, &i_2);
00688d53              }
00688d37          }
00688d15      }
00688d15      
00688f4e      lpPoint_3 = var_cb;
00688f4e      
00688f54      if (lpPoint_3 != 0)
00688f54      {
00688f68          enum ControlType var_68_1 = arg3;
00688f70          uint32_t m_metaKeyMode_3 = m_metaKeyMode;
00688f75          var_6c = arg4;
00688f8b          var_60 = ebx_1;
00688f92          uint32_t lpPoint_2 = lpPoint_1;
00688f99          int32_t __return_6 = __return_5;
00688fa0          HashTable<ControlSpecification,CInputManager_WIN32::RecentControlState,0>::set(&this->m_hashActiveControls, &arg2, &var_6c);
00688f54      }
00688f54      
00688fa8      lpPoint_3 = 1;
00688800  }

00688fb4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00688fc0  void* __thiscall CInputManager_WIN32::`scalar deleting destructor'(class CInputManager_WIN32* this, uint32_t arg2)

00688fc0  {
00688fc3      CInputManager_WIN32::~CInputManager_WIN32(this);
00688fc3      
00688fcd      if ((arg2 & 1) != 0)
00688fd0          operator delete(this);
00688fd0      
00688fdb      return this;
00688fc0  }

00688fde                                                                                            90 90                                ..

00688fe0  uint8_t __thiscall CInputManager_WIN32::ProcessDeviceData(class CInputManager_WIN32* this, uint32_t arg2, struct DIDEVICEOBJECTDATA const* arg3)

00688fe0  {
00688ff6      uint32_t dwOfs = arg3->dwOfs;
00689007      void* ecx_1 = &this->m_aDevices.m_data[arg2];
00689018      uint32_t i = (((uint32_t)((int8_t)*(uint32_t*)((char*)ecx_1 + 0x24))) | (dwOfs << 0x10));
0068902a      uint32_t i_1 = i;
00689031      int32_t* dwData = this->m_hashControlToType.m_intrusiveTable.m_buckets[(COMBINE(0, i) % this->m_hashControlToType.m_intrusiveTable.m_numBuckets)];
00689035      enum ControlType var_15c;
00689035      enum ControlType ebp;
00689035      
00689035      if (dwData != 0)
00689035      {
00689039          while (*(uint32_t*)dwData != i)
00689039          {
0068903f              dwData = dwData[1];
0068903f              
00689044              if (dwData == 0)
00689044                  goto label_689046;
00689039          }
00689039          
006890c6          if (dwData == 0)
006890c6              goto label_689046;
006890c6          
006890cc          ebp = dwData[2];
006890cf          var_15c = ebp;
006890d3          goto label_68908b;
00689035      }
00689035      
00689046  label_689046:
00689046      int32_t* ecx_2 = *(uint32_t*)ecx_1;
00689050      int32_t var_13c = 0x13c;
00689050      
00689060      if (*(uint32_t*)(*(uint32_t*)ecx_2 + 0x38)(ecx_2, &var_13c, dwOfs, 1) >= 0)
00689060      {
00689072          uint32_t var_124;
00689072          var_15c = CInputManager_WIN32::DITypeToControlType(this, var_124);
00689082          HashTable<ControlSpecification,enum ControlType,0>::add(&this->m_hashControlToType, &i_1, &var_15c);
00689087          ebp = var_15c;
0068908b      label_68908b:
0068908b          
0068908d          if (ebp != ct_Invalid)
0068908d          {
00689095              uint32_t var_154;
00689095              int32_t* var_178_2 = &var_154;
0068909c              CInputManager_WIN32::GetPreviousControlState(this, i, ebp, &var_154);
006890a1              dwData = arg3->dwData;
006890a4              uint32_t edx_5 = var_154;
006890a4              
006890aa              if (edx_5 != dwData)
006890aa              {
006890d8                  enum ControlType var_178_5;
006890d8                  uint32_t var_174_6;
006890d8                  uint32_t dwTimeStamp;
006890d8                  enum ControlType ecx_15;
006890d8                  class ControlSpecification ebp_5;
006890d8                  
006890d8                  if (ebp == ct_RelAxis)
006890d8                  {
006891a3                  label_6891a3:
006891a3                      enum SubControlIndex eax_23;
006891a3                      int32_t ecx_17;
006891a3                      eax_23 = CInputManager_WIN32::SubControlFromData(this, ct_RelAxis, dwData);
006891a3                      
006891aa                      if (eax_23 != sci_None)
006891aa                      {
006891c3                          int32_t var_17c_7 = ecx_17;
006891c4                          ebp_5 = ((((eax_23 << 8) ^ i) & 0xff00) ^ i);
006891cc                          int80_t st0_3;
006891cc                          st0_3 = CInputManager_WIN32::FireInputEvent(this, ebp_5, ct_Button, 0x80, arg3->dwTimeStamp);
006891d4                          dwTimeStamp = arg3->dwTimeStamp;
006891d5                          var_174_6 = 0;
006891d7                          var_178_5 = ct_Button;
006891d9                      label_6891d9:
006891d9                          enum ControlType var_17c_9 = ecx_15;
006891e0                          CInputManager_WIN32::FireInputEvent(this, ebp_5, var_178_5, var_174_6, dwTimeStamp);
006891e0                          /* unimplemented  {call CInputManager_WIN32::FireInputEvent} */;
006891e5                          ebp = var_15c;
006891aa                      }
006890d8                  }
006890d8                  else if ((ebp > ct_RelAxis && ebp <= ct_POV))
006890e7                  {
006890f1                      enum SubControlIndex eax_7 = CInputManager_WIN32::SubControlFromData(this, ebp, dwData);
00689100                      enum SubControlIndex eax_8;
00689100                      int32_t ecx_9;
00689100                      eax_8 = CInputManager_WIN32::SubControlFromData(this, var_15c, edx_5);
00689100                      
00689107                      if (eax_8 == eax_7)
00689107                          goto label_689179;
00689107                      
0068910b                      if (eax_8 != sci_None)
0068910b                      {
0068910d                          uint32_t dwTimeStamp_1 = arg3->dwTimeStamp;
0068911a                          uint32_t dwTimeStamp_3 = dwTimeStamp_1;
00689120                          class ControlSpecification i_2 = ((((eax_8 << 8) ^ i) & 0xff00) ^ i);
00689128                          i_1 = i_2;
0068912c                          int32_t ecx_11;
0068912c                          int80_t st0_1;
0068912c                          st0_1 = CInputManager_WIN32::FireInputEvent(this, i_2, ct_Button, 0, dwTimeStamp_1);
0068913c                          int32_t var_17c_3 = ecx_11;
00689147                          int80_t st0_2;
00689147                          st0_2 = CInputManager_WIN32::FireInputEvent(this, i_1, var_15c, 0, arg3->dwTimeStamp);
0068910b                      }
0068910b                      
0068914e                      if (eax_7 == sci_None)
006891e5                          ebp = var_15c;
0068914e                      else
0068914e                      {
00689166                          int32_t var_17c_5 = ecx_9;
00689174                          CInputManager_WIN32::FireInputEvent(this, ((((eax_7 << 8) ^ i) & 0xff00) ^ i), ct_Button, 0x80, arg3->dwTimeStamp);
00689174                          /* unimplemented  {call CInputManager_WIN32::FireInputEvent} */;
00689179                      label_689179:
00689179                          
0068917b                          if (eax_7 != sci_None)
0068917b                          {
00689180                              ecx_15 = var_15c;
00689184                              dwTimeStamp = arg3->dwTimeStamp;
0068918d                              int32_t eax_20;
0068918d                              int32_t edx_9;
0068918d                              edx_9 = HIGHD(((int64_t)arg3->dwData));
0068918d                              eax_20 = LOWD(((int64_t)arg3->dwData));
00689196                              ebp_5 = ((((eax_7 << 8) ^ i) & 0xff00) ^ i);
0068919a                              var_174_6 = ((eax_20 ^ edx_9) - edx_9);
0068919b                              var_178_5 = ecx_15;
0068919c                              goto label_6891d9;
0068917b                          }
0068917b                          
006891e5                          ebp = var_15c;
0068914e                      }
006890e7                  }
006891e9                  uint32_t dwTimeStamp_2 = arg3->dwTimeStamp;
006891f2                  uint32_t dwTimeStamp_4 = dwTimeStamp_2;
006891f9                  char result = CInputManager_WIN32::FireInputEvent(this, i, ebp, arg3->dwData, dwTimeStamp_2);
006891f9                  /* unimplemented  {call CInputManager_WIN32::FireInputEvent} */;
00689208                  return result;
006890aa              }
006890aa              
006890af              if (ebp == ct_RelAxis)
006890af                  goto label_6891a3;
0068908d          }
00689060      }
00689060      
006890b5      dwData = 0;
006890c1      return 0;
00688fe0  }

0068920b                                   90 90 90 90 90                                                             .....

00689210  void __thiscall CInputManager_WIN32::OnSwitchMouseMode(class CInputManager_WIN32* this, uint8_t arg2)

00689210  {
00689211      int32_t ebx = arg2;
00689211      
0068921a      if (ebx == 0)
0068921a      {
0068926a          enum MouseLookBehavior m_eMouseLookBehavior = this->m_eMouseLookBehavior;
0068926a          
00689272          if (m_eMouseLookBehavior == mlb_Center)
00689272          {
0068929c              this->m_ptMousePos.x = (RenderDevice::GetDisplayWidth(RenderDevice::render_device) >> 1);
006892ac              this->m_ptMousePos.y = (RenderDevice::GetDisplayHeight(RenderDevice::render_device) >> 1);
00689272          }
00689272          else if ((m_eMouseLookBehavior > mlb_Center && m_eMouseLookBehavior <= mlb_GotoXY))
00689279          {
00689287              this->m_ptMousePos.x = this->m_ptMousePosBeforeMouseLookMode.x;
0068928a              this->m_ptMousePos.y = this->m_ptMousePosBeforeMouseLookMode.y;
00689279          }
00689279          
006892af          m_eMouseLookBehavior = this->m_fClientIsActive;
006892af          
006892b7          if (m_eMouseLookBehavior != 0)
006892bb              CInputManager_WIN32::SyncCursorToMousePos(this);
006892bb          
006892c0          int32_t m_cSetCapture = this->m_cSetCapture;
006892c0          
006892c8          if (m_cSetCapture != 0)
006892c8          {
006892cd              this->m_cSetCapture = (m_cSetCapture - 1);
006892cd              
006892d3              if (m_cSetCapture == 1)
006892d5                  ReleaseCapture();
006892c8          }
006892c8          
006892dd          Device::ShowCursor(1);
0068921a      }
0068921a      else if (this->m_fClientIsActive != 0)
00689224      {
00689231          if (this->m_eMouseLookBehavior == mlb_Remember)
00689231          {
00689239              this->m_ptMousePosBeforeMouseLookMode.x = this->m_ptMousePos.x;
0068923f              this->m_ptMousePosBeforeMouseLookMode.y = this->m_ptMousePos.y;
00689231          }
00689231          
0068924b          int32_t ecx_2 = (this->m_cSetCapture + 1);
00689251          this->m_cSetCapture = ecx_2;
00689251          
00689257          if (ecx_2 == 1)
00689260              SetCapture(this->m_hwnd);
00689260          
006892dd          Device::ShowCursor(0);
00689224      }
00689224      
006892e8      CInputManager::OnSwitchMouseMode(this, ebx);
00689303      arg2 = this->m_aDevices.m_data[this->m_nVirtualDevice].iDeviceIndex;
00689307      uint32_t eax_9;
00689307      class ControlSpecification ecx_9;
00689307      eax_9 = GetTickCount();
00689311      char temp2 = ebx;
00689311      ebx = -(ebx);
0068931f      class ControlSpecification var_18 = ecx_9;
00689322      *(uint8_t*)((char*)var_18.__inner0 + 0) = arg2;
00689324      *(uint8_t*)((char*)var_18.__inner0 + 1) = 0;
0068932a      *(uint16_t*)((char*)var_18.__inner0 + 2) = 1;
00689330      CInputManager_WIN32::FireInputEvent(this, var_18, ct_Button, ((ebx - ebx) & 0x80), eax_9);
00689210  }

0068933a                                                                                90 90 90 90 90 90                            ......

00689340  void __thiscall CInputManager_WIN32::GenerateKeyboardEvent(class CInputManager_WIN32* this, struct tagMSG const* arg2)

00689340  {
00689344      struct tagMSG* ebx = arg2;
00689348      int32_t lParam = ebx->lParam;
0068935d      int32_t ecx_1;
0068935d      ecx_1 = (lParam & 0xc0000000) == 0x40000000;
00689363      arg2 = lParam;
00689363      
00689367      if (ecx_1 == 0)
00689367      {
00689372          uint32_t ecx_4 = ((uint32_t)((int8_t)(lParam >> 0x10)));
00689378          uint32_t eax;
00689378          eax = ((lParam >> 0x18) & 1);
00689378          
0068937d          if (ecx_4 == 0x45)
00689381              eax = eax == 0;
0068937d          else if (ecx_4 == 0x36)
0068938b              ecx_4 = 0x2a;
0068938b          
00689390          char temp1_1 = eax;
00689390          eax = -(eax);
00689399          int32_t eax_3 = (((eax - eax) & 0x80) | ecx_4);
006893bf          class ControlSpecification edi_1 = (((uint32_t)((int8_t)this->m_aDevices.m_data[this->m_nKeyboardDevice].iDeviceIndex)) | (eax_3 << 0x10));
006893c1          uint32_t message = ebx->message;
006893c1          
006893d0          if ((message == 0x100 || message == 0x104))
006893d6              message = 1;
006893d0          else
006893d2              message = 0;
006893d2          
006893d8          int32_t edx_4;
006893d8          edx_4 = message;
006893da          char temp2_1 = edx_4;
006893da          edx_4 = -(edx_4);
006893de          uint32_t edx_6 = ((edx_4 - edx_4) & 0x80);
006893de          
006893f0          if ((message == 0 && eax_3 == 0xb7))
006893f0          {
006893fd              int32_t var_38_1 = eax_3;
00689404              CInputManager_WIN32::FireInputEvent(this, edi_1, ct_Button, 0x80, ebx->time);
006893f0          }
006893f0          
00689410          int32_t var_18;
00689410          int32_t* var_34_1 = &var_18;
00689417          int32_t ecx_8 = CInputManager_WIN32::GetPreviousControlState(this, edi_1, ct_Button, &var_18);
00689417          
00689420          if (var_18 != edx_6)
00689420          {
00689429              int32_t var_38_3 = ecx_8;
00689430              CInputManager_WIN32::FireInputEvent(this, edi_1, ct_Button, edx_6, ebx->time);
00689430              /* unimplemented  {call CInputManager_WIN32::FireInputEvent} */;
00689420          }
00689367      }
00689340  }

0068943f                                                                                               90                                 .

00689440  void __thiscall CInputManager_WIN32::GenerateMouseButtonEvent(class CInputManager_WIN32* this, int32_t arg2, uint8_t arg3, uint32_t arg4)

00689440  {
00689444      int32_t ebx;
00689444      ebx = arg3;
00689444      
0068944f      if (ebx == 0)
0068944f      {
00689457          int32_t ecx_1 = (this->m_cSetCapture + 1);
0068945d          this->m_cSetCapture = ecx_1;
0068945d          
00689463          if (ecx_1 == 1)
0068946c              SetCapture(this->m_hwnd);
0068944f      }
0068944f      
0068949d      class ControlSpecification esi_3 = ((((arg2 + 0xc) << 0x10) & 0xffff0000) | ((uint32_t)((int8_t)this->m_aDevices.m_data[this->m_nMouseDevice].iDeviceIndex)));
006894a3      int32_t edx_1;
006894a3      edx_1 = ebx != 0;
006894ad      int32_t var_34 = arg2;
006894b3      uint32_t edx_3 = ((edx_1 - 1) & 0x80);
006894bd      int32_t var_18;
006894bd      CInputManager_WIN32::GetPreviousControlState(this, esi_3, ct_Button, &var_18);
006894bd      
006894c6      if (var_18 != edx_3)
006894c6      {
006894d0          uint32_t var_38_1 = arg4;
006894d7          CInputManager_WIN32::FireInputEvent(this, esi_3, ct_Button, edx_3, arg4);
006894c6      }
006894c6      
006894de      if (ebx != 0)
006894de      {
006894e0          int32_t m_cSetCapture = this->m_cSetCapture;
006894e0          
006894e8          if (m_cSetCapture != 0)
006894e8          {
006894ed              this->m_cSetCapture = (m_cSetCapture - 1);
006894ed              
006894f3              if (m_cSetCapture == 1)
006894f5                  ReleaseCapture();
006894e8          }
006894de      }
00689440  }

00689505                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00689510  void __thiscall CInputManager_WIN32::GenerateMouseWheelEvent(class CInputManager_WIN32* this, int32_t arg2, uint32_t arg3)

00689510  {
00689533      int32_t eax_5 = (((uint32_t)((int8_t)this->m_aDevices.m_data[this->m_nMouseDevice].iDeviceIndex)) | 0x80000);
0068953b      class ControlSpecification eax_7;
0068953b      
0068953b      if (arg2 <= 0)
0068954e          eax_7 = ((eax_5 & 0xffff02ff) | 0x200);
0068953b      else
00689542          eax_7 = ((eax_5 & 0xffff01ff) | 0x100);
00689542      
0068955f      int32_t var_1c = arg2;
00689568      int32_t ecx_3;
00689568      int80_t st0;
00689568      st0 = CInputManager_WIN32::FireInputEvent(this, eax_7, ct_Button, 0x80, arg3);
00689572      int32_t var_1c_2 = ecx_3;
00689579      CInputManager_WIN32::FireInputEvent(this, eax_7, ct_Button, 0, arg3);
00689510  }

00689584              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00689590  void __fastcall CInputManager_WIN32::ReleasePressedKeys(class CInputManager_WIN32* this)

00689590  {
00689599      uint32_t eax = timeGetTime();
00689599      
006895ab      while (this->m_hashActiveControls.m_intrusiveTable.m_numElements != 0)
006895ab      {
006895bd          void* ecx_1 = &this->m_hashActiveControls.m_intrusiveTable.m_buckets[this->m_hashActiveControls.m_intrusiveTable.m_numBuckets];
006895c6          int32_t* eax_4;
006895c6          int32_t** m_firstInterestingBucket_2;
006895c6          
006895c6          if (this->m_hashActiveControls.m_intrusiveTable.m_firstInterestingBucket == ecx_1)
006895c6          {
006895e8          label_6895e8:
006895e8              m_firstInterestingBucket_2 = nullptr;
006895ea              eax_4 = nullptr;
006895c6          }
006895c6          else
006895c6          {
006895d0              while (true)
006895d0              {
006895d0                  class HashTableData<ControlSpecification,CInputManager_WIN32::RecentControlState>** m_firstInterestingBucket = this->m_hashActiveControls.m_intrusiveTable.m_firstInterestingBucket;
006895d0                  
006895d9                  if (*(uint32_t*)m_firstInterestingBucket != 0)
006895d9                  {
006895ee                      int32_t** m_firstInterestingBucket_1 = this->m_hashActiveControls.m_intrusiveTable.m_firstInterestingBucket;
006895f4                      eax_4 = *(uint32_t*)m_firstInterestingBucket_1;
006895f6                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
006895f6                      break;
006895d9                  }
006895d9                  
006895e0                  this->m_hashActiveControls.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
006895e0                  
006895e6                  if (&m_firstInterestingBucket[1] == ecx_1)
006895e6                      goto label_6895e8;
006895d0              }
006895c6          }
006895c6          
006895f8          class ControlSpecification edx_1 = *(uint32_t*)eax_4;
00689601          bool cond:0_1 = eax_4[1] != 0;
0068960f          void var_60;
0068960f          __builtin_memcpy(&var_60, &eax_4[2], 0x18);
00689611          int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
00689611          
00689613          if (!(cond:0_1))
00689613          {
0068962e              do
0068962e              {
00689624                  m_firstInterestingBucket_3 = &m_firstInterestingBucket_3[1];
00689624                  
00689629                  if (m_firstInterestingBucket_3 == &this->m_hashActiveControls.m_intrusiveTable.m_buckets[this->m_hashActiveControls.m_intrusiveTable.m_numBuckets])
00689629                      break;
0068962e              } while (*(uint32_t*)m_firstInterestingBucket_3 == 0);
00689613          }
00689613          
00689630          int32_t* ecx_2 = *(uint32_t*)m_firstInterestingBucket_2;
00689630          
00689635          if (ecx_2 == eax_4)
00689647              *(uint32_t*)m_firstInterestingBucket_2 = ecx_2[1];
00689635          else
00689635          {
0068963e              int32_t* edx_5;
0068963e              
0068963e              do
0068963e              {
00689637                  edx_5 = ecx_2;
00689639                  ecx_2 = ecx_2[1];
0068963e              } while (ecx_2 != eax_4);
0068963e              
00689642              if (edx_5 != 0)
0068964f                  edx_5[1] = ecx_2[1];
00689642              else
00689647                  *(uint32_t*)m_firstInterestingBucket_2 = ecx_2[1];
00689635          }
00689635          
0068965a          this->m_hashActiveControls.m_intrusiveTable.m_numElements -= 1;
00689660          operator delete(eax_4);
00689673          uint32_t eax_5 = CMasterInputMap::MetaModeFromKey(&this->m_InputMap, edx_1);
00689673          
0068967a          if (eax_5 != 0)
00689686              this->m_metaKeyMode &= !(eax_5);
00689686          
006896a8          int32_t var_50;
006896a8          
006896a8          for (int32_t* i = this->m_hashActionStates.m_buckets[(COMBINE(0, var_50) % this->m_hashActionStates.m_numBuckets)]; i != 0; i = i[1])
006896a8          {
006896b2              if (*(uint32_t*)i == var_50)
006896b2              {
006896bf                  if (i != 0)
006896bf                  {
006896c5                      int32_t var_48;
006896c5                      InputEvent::InputEvent(&var_48);
006896d6                      int32_t var_58;
006896d6                      int32_t var_3c_1 = var_58;
006896dd                      int32_t x = this->m_ptMousePos.x;
006896e5                      int32_t var_54;
006896e5                      int32_t var_38_1 = var_54;
006896e9                      int32_t y = this->m_ptMousePos.y;
006896ec                      uint32_t var_30_1 = eax;
006896f0                      int32_t eax_11 = i[6];
006896f6                      var_48 = var_50;
006896fa                      class ControlSpecification var_40_1 = edx_1;
006896fe                      int32_t var_34_1 = 0;
00689706                      int32_t y_1 = y;
0068970a                      int32_t var_8_1 = eax_11;
0068970e                      CInputManager::FireActionEvent(this, &var_48);
006896bf                  }
006896bf                  
006896bf                  break;
006896b2              }
006896a8          }
006895ab      }
006895ab      
00689727      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashActiveControls.m_intrusiveTable);
0068972c      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
0068972c      
00689733      if (SmartBox::smartbox_1 != 0)
00689733      {
00689735          class CommandInterpreter* cmdinterp = SmartBox::smartbox_1->cmdinterp;
00689735          
0068973d          if (cmdinterp != 0)
0068973f              cmdinterp->vtable->LoseKeyboardFocus();
00689733      }
00689733      
00689744      SmartBox::smartbox_1 = this->m_fInMouseLookMode;
00689744      
00689753      if ((SmartBox::smartbox_1 != 0 && this->m_aDevices.m_num != 0))
00689753      {
0068976c          class ControlSpecification iDeviceIndex = this->m_aDevices.m_data[this->m_nVirtualDevice].iDeviceIndex;
00689777          class ControlSpecification iDeviceIndex_1 = iDeviceIndex;
0068977a          *(uint8_t*)((char*)iDeviceIndex_1.__inner0 + 0) = *(uint8_t*)((char*)iDeviceIndex.__inner0 + 0);
0068977c          *(uint8_t*)((char*)iDeviceIndex_1.__inner0 + 1) = 0;
00689782          *(uint16_t*)((char*)iDeviceIndex_1.__inner0 + 2) = 1;
00689788          CInputManager_WIN32::FireInputEvent(this, iDeviceIndex_1, ct_Button, 0x80, eax);
00689753      }
00689590  }

006895ca                                8d 9b 00 00 00 00                                                            ......
00689795                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006897a0  void __fastcall CInputManager_WIN32::GetInput(class CInputManager_WIN32* this)

006897a0  {
006897b1      class CInputManager_WIN32* this_1 = this;
006897b1      
006897b3      if (((*(uint8_t*)$S139) & 1) == 0)
006897b3      {
006897b5          $S139 |= 1;
006897bf          ptPreviousMousePos.x = this_1->m_ptMousePos.x;
006897c7          ptPreviousMousePos.y = this_1->m_ptMousePos.y;
006897b3      }
006897b3      
006897d3      uint32_t X_3 = 0;
006897d5      bool cond:1 = this_1->m_aDevices.m_num <= 0;
006897d7      uint32_t X_1 = 0;
006897d7      
006897db      if (!(cond:1))
006897db      {
006897e1          int32_t* edi_1 = nullptr;
0068992d          bool cond:2_1;
0068992d          
0068992d          do
0068992d          {
006897e3              struct CInputManager_WIN32::InputDevice* m_data_3 = this_1->m_aDevices.m_data;
006897e9              this = *(uint8_t*)(&m_data_3->bActive + edi_1);
006897e9              
006897f2              if (this != 0)
006897f2              {
006897ff                  uint8_t eax_5;
006897ff                  eax_5 = CInputManager_WIN32::PollDevice(this_1, *(uint32_t*)((char*)edi_1 + m_data_3), 1);
006897ff                  
00689806                  if (eax_5 != 0)
00689806                  {
00689812                      int32_t* eax_8;
00689812                      
00689812                      if (X_3 == this_1->m_nKeyboardDevice)
00689812                      {
00689814                          struct CInputManager_WIN32::InputDevice* m_data_2 = this_1->m_aDevices.m_data;
0068981a                          X_1 = 0xffffffff;
00689822                          int32_t* eax_6 = *(uint32_t*)((char*)edi_1 + m_data_2);
00689828                          *(uint32_t*)(*(uint32_t*)eax_6 + 0x64)(eax_6);
00689831                          eax_8 = *(uint32_t*)((char*)edi_1 + this_1->m_aDevices.m_data);
0068986c                          *(uint32_t*)(*(uint32_t*)eax_8 + 0x28)(eax_8, 0x14, 0, &X_1, 0);
00689812                      }
00689812                      else if (X_3 == this_1->m_nMouseDevice)
0068983c                      {
0068983e                          struct CInputManager_WIN32::InputDevice* m_data = this_1->m_aDevices.m_data;
00689844                          X_1 = 0xffffffff;
0068984c                          int32_t* eax_9 = *(uint32_t*)((char*)edi_1 + m_data);
00689852                          *(uint32_t*)(*(uint32_t*)eax_9 + 0x64)(eax_9);
0068985b                          eax_8 = *(uint32_t*)((char*)edi_1 + this_1->m_aDevices.m_data);
0068986c                          *(uint32_t*)(*(uint32_t*)eax_8 + 0x28)(eax_8, 0x14, 0, &X_1, 0);
0068983c                      }
0068983c                      else if (X_3 != this_1->m_nVirtualDevice)
0068987a                      {
00689880                          class CInputManager_WIN32** m_data_1 = this_1->m_aDevices.m_data;
00689880                          
0068988d                          if (*(uint32_t*)((char*)m_data_1 + edi_1) != 0)
0068988d                          {
0068989f                              int32_t var_a04 = 0x80;
006898a7                              int32_t* eax_11 = *(uint32_t*)((char*)m_data_1 + edi_1);
006898ae                              void var_a00;
006898ae                              int32_t eax_12;
006898ae                              eax_12 = *(uint32_t*)(*(uint32_t*)eax_11 + 0x28)(eax_11, 0x14, &var_a00, &var_a04, 0);
006898ae                              
006898b3                              if (eax_12 >= 0)
006898b3                              {
006898e5                                  eax_12 = this_1->m_fMainWindowHasFocus;
006898e5                                  
006898ed                                  if (eax_12 != 0)
006898ed                                  {
006898f3                                      int32_t ebp_1 = 0;
006898f3                                      
006898f7                                      if (var_a04 > 0)
006898f7                                      {
006898f9                                          struct DIDEVICEOBJECTDATA* ebx = &var_a00;
006898f9                                          
00689917                                          do
00689917                                          {
00689908                                              CInputManager_WIN32::ProcessDeviceData(this_1, X_1, ebx);
00689911                                              ebp_1 += 1;
00689912                                              ebx = &ebx[1];
00689917                                          } while (ebp_1 < var_a04);
00689917                                          
00689919                                          X_3 = X_1;
006898f7                                      }
006898ed                                  }
006898b3                              }
006898b3                              else if (eax_12 == 0x8007000c)
006898ba                              {
006898da                                  int32_t* eax_15 = *(uint32_t*)((char*)edi_1 + this_1->m_aDevices.m_data);
006898e0                                  *(uint32_t*)(*(uint32_t*)eax_15 + 0x1c)(eax_15);
006898ba                              }
006898ba                              else if (eax_12 == 0x8007001e)
006898c1                              {
006898c9                                  int32_t* eax_14 = *(uint32_t*)((char*)edi_1 + this_1->m_aDevices.m_data);
006898cf                                  *(uint32_t*)(*(uint32_t*)eax_14 + 0x1c)(eax_14);
006898c1                              }
0068988d                          }
0068987a                      }
00689806                  }
006897f2              }
006897f2              
00689923              X_3 += 1;
00689924              edi_1 = &edi_1[0xc];
00689927              cond:2_1 = X_3 < this_1->m_aDevices.m_num;
00689929              X_1 = X_3;
0068992d          } while (cond:2_1);
006897db      }
006897db      
0068994b      if ((this_1->m_ptNonMousePointerMovement.x != 0 || this_1->m_ptNonMousePointerMovement.y != 0))
0068994b      {
0068995a          if (GetCursorPos(&X_1) != 0)
0068995a          {
0068996c              int32_t X = (X_1 + this_1->m_ptNonMousePointerMovement.x);
00689972              int32_t var_a08;
00689972              int32_t Y = (var_a08 + this_1->m_ptNonMousePointerMovement.y);
00689976              X_1 = X;
0068997a              int32_t Y_2 = Y;
0068997e              SetCursorPos(X, Y);
0068998e              this_1->m_ptMousePos.x += this_1->m_ptNonMousePointerMovement.x;
00689999              this_1->m_ptMousePos.y += this_1->m_ptNonMousePointerMovement.y;
0068995a          }
0068995a          
0068999c          this_1->m_ptNonMousePointerMovement.x = 0;
006899a2          this_1->m_ptNonMousePointerMovement.y = 0;
0068994b      }
0068994b      
006899a8      int32_t x = this_1->m_ptMousePos.x;
006899a8      
006899bc      if ((ptPreviousMousePos.x != x || ptPreviousMousePos.y != this_1->m_ptMousePos.y))
006899bc      {
00689a03          *(uint32_t*)((char*)this_1->m_ttLastInputEvent)[4] = *(int32_t*)((char*)Timer::cur_time + 4);
00689a06          int32_t ecx_13;
00689a06          ecx_13 = this_1->m_fInMouseLookMode;
00689a0b          this_1->m_ttLastInputEvent = (*(uint32_t*)Timer::cur_time);
00689a0b          
00689a0e          if (ecx_13 == 0)
00689a7f              CInputManager::CallMouseMoveHandler(this_1, x, this_1->m_ptMousePos.y);
00689a0e          else
00689a0e          {
00689a23              CInputManager::CallMouseLookHandler(this_1, (x - ptPreviousMousePos.x), (this_1->m_ptMousePos.y - ptPreviousMousePos.y));
00689a3b              uint32_t Y_1 = (RenderDevice::GetDisplayHeight(RenderDevice::render_device) >> 1);
00689a42              uint32_t X_2 = (RenderDevice::GetDisplayWidth(RenderDevice::render_device) >> 1);
00689a48              this_1->m_ptMousePos.x = X_2;
00689a4b              X_1 = X_2;
00689a59              this_1->m_ptMousePos.y = Y_1;
00689a59              
00689a68              if (ClientToScreen(this_1->m_hwnd, &X_1) != 0)
00689a74                  SetCursorPos(X_1, Y_1);
00689a0e          }
00689a0e          
00689a87          ptPreviousMousePos.x = this_1->m_ptMousePos.x;
00689a90          ptPreviousMousePos.y = this_1->m_ptMousePos.y;
006899bc      }
006899bc      else
006899bc      {
006899be          x = this_1->m_fInMouseLookMode;
006899be          
006899c3          if (x != 0)
006899c3          {
006899cc              long double x87_r7_2 = (((long double)this_1->m_ttLastInputEvent) + ((long double)0.20000000000000001));
006899d2              long double temp0_1 = ((long double)Timer::cur_time);
006899d2              (x87_r7_2 - temp0_1);
006899d8              x = ((((x87_r7_2 < temp0_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp0_1))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp0_1) ? 1 : 0) << 0xe) | 0))));
006899da              bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
006899da              
006899dd              if (!(p_1))
006899e7                  CInputManager::CallMouseLookHandler(this_1, 0, 0);
006899c3          }
006899bc      }
006897a0  }


00689aa0  void __thiscall CInputManager_WIN32::Activate(class CInputManager_WIN32* this, uint8_t arg2)

00689aa0  {
00689aad      if (arg2 != this->m_fClientIsActive)
00689aad      {
00689ab1          this->m_fClientIsActive = arg2;
00689ab1          
00689ab9          if (arg2 == 0)
00689ab9          {
00689ac2              CInputManager_WIN32::UnacquireAll(this);
00689ac9              CInputManager_WIN32::ReleasePressedKeys(this);
00689ab9          }
00689ab9          else
00689abb              CInputManager_WIN32::AcquireAll(this);
00689abb          
00689ad9          CInputManager::CallFocusSwitchHandler(this, this->m_fClientIsActive);
00689ad9          
00689ae3          if (this->m_fWantMouseLookMode != 0)
00689ae3          {
00689ae9              int32_t eax_3;
00689ae9              eax_3 = this->m_fClientIsActive;
00689ae5              this->vtable->OnSwitchMouseMode(eax_3);
00689af9              return;
00689ae3          }
00689ae3          
00689b04          if (this->m_fClientIsActive != 0)
00689b08              Device::ShowCursor(1);
00689aad      }
00689aa0  }

00689b14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00689b20  void __fastcall CInputManager_WIN32::UseTime(class CInputManager_WIN32* this)

00689b20  {
00689b23      CInputManager_WIN32::GetInput(this);
00689b2b      /* tailcall */
00689b2b      return CInputManager::UseTime(this);
00689b20  }


00689b30  int32_t __thiscall CInputManager_WIN32::OnMessage(class CInputManager_WIN32* this, struct tagMSG const* arg2, uint8_t* arg3)

00689b30  {
00689b30      struct tagMSG* eax = arg2;
00689b38      uint8_t* edi = arg3;
00689b3e      *(uint8_t*)edi = 1;
00689b41      uint32_t message = eax->message;
00689b41      
00689b4e      if (message > 0x106)
00689b4e      {
00689ce9          if ((message - 0x200) > 0xa3)
00689ce9          {
00689e22          label_689e22:
00689e22              *(uint8_t*)edi = 0;
00689e26              this->m_bProcessingKeyDown = 0;
00689e32              return 0;
00689ce9          }
00689ce9          
00689b4e          switch (message)
00689b4e          {
00689da7              case 0x200:
00689da7              {
00689da7                  this->m_ptMousePos.x = ((int32_t)eax->lParam);
00689daf                  this->m_ptMousePos.y = ((int32_t)*(uint16_t*)((char*)eax->lParam)[2]);
00689db2                  this->m_bProcessingKeyDown = 0;
00689dbe                  return 0;
00689da7                  break;
00689da7              }
00689d06              case 0x201:
00689d06              case 0x202:
00689d06              case 0x203:
00689d06              {
00689d06                  message = message == 0x202;
00689d0e                  CInputManager_WIN32::GenerateMouseButtonEvent(this, 0, message, eax->time);
00689d14                  this->m_bProcessingKeyDown = 0;
00689d20                  return 0;
00689d06                  break;
00689d06              }
00689d23              case 0x204:
00689d23              case 0x205:
00689d23              case 0x206:
00689d23              {
00689d23                  uint32_t time = eax->time;
00689d2c                  eax = message == 0x205;
00689d35                  CInputManager_WIN32::GenerateMouseButtonEvent(this, 1, eax, time);
00689d3b                  this->m_bProcessingKeyDown = 0;
00689d47                  return 0;
00689d23                  break;
00689d23              }
00689d4a              case 0x207:
00689d4a              case 0x208:
00689d4a              case 0x209:
00689d4a              {
00689d4a                  uint32_t time_1 = eax->time;
00689d53                  eax = message == 0x208;
00689d5c                  CInputManager_WIN32::GenerateMouseButtonEvent(this, 2, eax, time_1);
00689d62                  this->m_bProcessingKeyDown = 0;
00689d6e                  return 0;
00689d4a                  break;
00689d4a              }
00689deb              case 0x20a:
00689deb              {
00689deb                  CInputManager_WIN32::GenerateMouseWheelEvent(this, ((int32_t)*(uint16_t*)((char*)eax->wParam)[2]), eax->time);
00689df1                  this->m_bProcessingKeyDown = 0;
00689dfd                  return 0;
00689deb                  break;
00689deb              }
00689d7a              case 0x20b:
00689d7a              case 0x20c:
00689d7a              case 0x20d:
00689d7a              {
00689d7a                  message = message == 0x20c;
00689d89                  CInputManager_WIN32::GenerateMouseButtonEvent(this, (((uint32_t)*(uint16_t*)((char*)eax->wParam)[2]) + 2), message, eax->time);
00689d94                  this->m_bProcessingKeyDown = 0;
00689da0                  return 1;
00689d7a                  break;
00689d7a              }
00689cf6              case 0x20e:
00689cf6              case 0x20f:
00689cf6              case 0x210:
00689cf6              case 0x211:
00689cf6              case 0x212:
00689cf6              case 0x213:
00689cf6              case 0x214:
00689cf6              case 0x215:
00689cf6              case 0x216:
00689cf6              case 0x217:
00689cf6              case 0x218:
00689cf6              case 0x21a:
00689cf6              case 0x21b:
00689cf6              case 0x21c:
00689cf6              case 0x21d:
00689cf6              case 0x21e:
00689cf6              case 0x21f:
00689cf6              case 0x220:
00689cf6              case 0x221:
00689cf6              case 0x222:
00689cf6              case 0x223:
00689cf6              case 0x224:
00689cf6              case 0x225:
00689cf6              case 0x226:
00689cf6              case 0x227:
00689cf6              case 0x228:
00689cf6              case 0x229:
00689cf6              case 0x22a:
00689cf6              case 0x22b:
00689cf6              case 0x22c:
00689cf6              case 0x22d:
00689cf6              case 0x22e:
00689cf6              case 0x22f:
00689cf6              case 0x230:
00689cf6              case 0x231:
00689cf6              case 0x232:
00689cf6              case 0x233:
00689cf6              case 0x234:
00689cf6              case 0x235:
00689cf6              case 0x236:
00689cf6              case 0x237:
00689cf6              case 0x238:
00689cf6              case 0x239:
00689cf6              case 0x23a:
00689cf6              case 0x23b:
00689cf6              case 0x23c:
00689cf6              case 0x23d:
00689cf6              case 0x23e:
00689cf6              case 0x23f:
00689cf6              case 0x240:
00689cf6              case 0x241:
00689cf6              case 0x242:
00689cf6              case 0x243:
00689cf6              case 0x244:
00689cf6              case 0x245:
00689cf6              case 0x246:
00689cf6              case 0x247:
00689cf6              case 0x248:
00689cf6              case 0x249:
00689cf6              case 0x24a:
00689cf6              case 0x24b:
00689cf6              case 0x24c:
00689cf6              case 0x24d:
00689cf6              case 0x24e:
00689cf6              case 0x24f:
00689cf6              case 0x250:
00689cf6              case 0x251:
00689cf6              case 0x252:
00689cf6              case 0x253:
00689cf6              case 0x254:
00689cf6              case 0x255:
00689cf6              case 0x256:
00689cf6              case 0x257:
00689cf6              case 0x258:
00689cf6              case 0x259:
00689cf6              case 0x25a:
00689cf6              case 0x25b:
00689cf6              case 0x25c:
00689cf6              case 0x25d:
00689cf6              case 0x25e:
00689cf6              case 0x25f:
00689cf6              case 0x260:
00689cf6              case 0x261:
00689cf6              case 0x262:
00689cf6              case 0x263:
00689cf6              case 0x264:
00689cf6              case 0x265:
00689cf6              case 0x266:
00689cf6              case 0x267:
00689cf6              case 0x268:
00689cf6              case 0x269:
00689cf6              case 0x26a:
00689cf6              case 0x26b:
00689cf6              case 0x26c:
00689cf6              case 0x26d:
00689cf6              case 0x26e:
00689cf6              case 0x26f:
00689cf6              case 0x270:
00689cf6              case 0x271:
00689cf6              case 0x272:
00689cf6              case 0x273:
00689cf6              case 0x274:
00689cf6              case 0x275:
00689cf6              case 0x276:
00689cf6              case 0x277:
00689cf6              case 0x278:
00689cf6              case 0x279:
00689cf6              case 0x27a:
00689cf6              case 0x27b:
00689cf6              case 0x27c:
00689cf6              case 0x27d:
00689cf6              case 0x27e:
00689cf6              case 0x27f:
00689cf6              case 0x280:
00689cf6              case 0x281:
00689cf6              case 0x282:
00689cf6              case 0x283:
00689cf6              case 0x284:
00689cf6              case 0x285:
00689cf6              case 0x286:
00689cf6              case 0x287:
00689cf6              case 0x288:
00689cf6              case 0x289:
00689cf6              case 0x28a:
00689cf6              case 0x28b:
00689cf6              case 0x28c:
00689cf6              case 0x28d:
00689cf6              case 0x28e:
00689cf6              case 0x28f:
00689cf6              case 0x290:
00689cf6              case 0x291:
00689cf6              case 0x292:
00689cf6              case 0x293:
00689cf6              case 0x294:
00689cf6              case 0x295:
00689cf6              case 0x296:
00689cf6              case 0x297:
00689cf6              case 0x298:
00689cf6              case 0x299:
00689cf6              case 0x29a:
00689cf6              case 0x29b:
00689cf6              case 0x29c:
00689cf6              case 0x29d:
00689cf6              case 0x29e:
00689cf6              case 0x29f:
00689cf6              case 0x2a0:
00689cf6              case 0x2a1:
00689cf6              case 0x2a2:
00689cf6              {
00689cf6                  goto label_689e22;
00689cf6              }
00689e04              case 0x219:
00689e04              {
00689e04                  if (eax->wParam == 7)
00689e08                      CInputManager_WIN32::EnumSuitableDevices(this);
00689e08                  
00689e13                  this->m_bProcessingKeyDown = 0;
00689e1f                  return 1;
00689e04                  break;
00689e04              }
00689dc1              case 0x2a3:
00689dc1              {
00689dc1                  class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
00689dc1                  
00689dc9                  if (UIElementManager::s_pInstance_1 == 0)
00689dc9                  {
00689e26                      this->m_bProcessingKeyDown = 0;
00689e32                      return 0;
00689dc9                  }
00689dc9                  
00689dcb                  UIElementManager::MouseLeaveEvent(UIElementManager::s_pInstance_1);
00689dd1                  this->m_bProcessingKeyDown = 0;
00689ddd                  return 0;
00689dc1                  break;
00689dc1              }
00689b4e          }
00689b4e          
00689b4e          return;
00689b4e      }
00689b4e      
00689b54      if (message == 0x106)
00689b54      {
00689c45      label_689c45:
00689c45          int32_t ebx;
00689c45          ebx = eax->wParam;
00689c48          eax = prevLeadByte;
00689c4f          arg3 = ebx;
00689c4f          
00689c53          if (eax != 0)
00689c53          {
00689c66              arg3 = eax;
00689c6a              *(uint8_t*)((char*)arg3)[1] = ebx;
00689c6e              *(uint8_t*)((char*)arg3)[2] = 0;
00689c73              kernel32_MultiByteToWideChar_Ptr(0, 1, &arg3, 0xffffffff, &arg2, 1);
00689c80              CInputManager_WIN32::UpdateCharacter(this, ((int16_t)arg2));
00689c86              this->m_bProcessingKeyDown = 0;
00689c91              prevLeadByte = 0;
00689c99              return 0;
00689c53          }
00689c53          
00689ca9          if (IsDBCSLeadByte(((int8_t)arg3)) == 0)
00689ca9          {
00689cc8              CInputManager_WIN32::UpdateCharacter(this, ((uint16_t)ebx));
00689cce              this->m_bProcessingKeyDown = 0;
00689cda              return 0;
00689ca9          }
00689ca9          
00689cac          this->m_bProcessingKeyDown = 0;
00689cb7          prevLeadByte = ebx;
00689cbe          return 0;
00689b54      }
00689b54      
00689b63      if ((message - 7) > 0xfe)
00689b63          goto label_689e22;
00689b63      
00689b4e      switch (message)
00689b4e      {
00689b7e          case 7:
00689b7e          {
00689b7e              if (this->m_fMainWindowHasFocus != 1)
00689b7e              {
00689b84                  eax = this->m_fWantMouseLookMode;
00689b89                  this->m_fMainWindowHasFocus = 1;
00689b89                  
00689b90                  if (eax != 0)
00689b90                  {
00689b96                      this->vtable->OnSwitchMouseMode(1);
00689ba3                      this->m_bProcessingKeyDown = 0;
00689baf                      return 0;
00689b90                  }
00689b7e              }
00689b7e              
00689e26              this->m_bProcessingKeyDown = 0;
00689e32              return 0;
00689b7e              break;
00689b7e          }
00689bb2          case 8:
00689bb2          {
00689bb2              eax = this->m_fMainWindowHasFocus;
00689bb2              
00689bba              if (eax != 0)
00689bba              {
00689bc2                  CInputManager_WIN32::ReleasePressedKeys(this);
00689bca                  bool cond:3_1 = this->m_fWantMouseLookMode == 0;
00689bcc                  this->m_fMainWindowHasFocus = 0;
00689bcc                  
00689bd3                  if (!(cond:3_1))
00689bd3                  {
00689bd9                      this->vtable->OnSwitchMouseMode(0);
00689be5                      this->m_bProcessingKeyDown = 0;
00689bf1                      return 0;
00689bd3                  }
00689bba              }
00689bba              
00689e26              this->m_bProcessingKeyDown = 0;
00689e32              return 0;
00689bb2              break;
00689bb2          }
00689b70          case 9:
00689b70          case 0xa:
00689b70          case 0xb:
00689b70          case 0xc:
00689b70          case 0xd:
00689b70          case 0xe:
00689b70          case 0xf:
00689b70          case 0x10:
00689b70          case 0x11:
00689b70          case 0x12:
00689b70          case 0x13:
00689b70          case 0x14:
00689b70          case 0x15:
00689b70          case 0x16:
00689b70          case 0x17:
00689b70          case 0x18:
00689b70          case 0x19:
00689b70          case 0x1a:
00689b70          case 0x1b:
00689b70          case 0x1c:
00689b70          case 0x1d:
00689b70          case 0x1e:
00689b70          case 0x20:
00689b70          case 0x21:
00689b70          case 0x22:
00689b70          case 0x23:
00689b70          case 0x24:
00689b70          case 0x25:
00689b70          case 0x26:
00689b70          case 0x27:
00689b70          case 0x28:
00689b70          case 0x29:
00689b70          case 0x2a:
00689b70          case 0x2b:
00689b70          case 0x2c:
00689b70          case 0x2d:
00689b70          case 0x2e:
00689b70          case 0x2f:
00689b70          case 0x30:
00689b70          case 0x31:
00689b70          case 0x32:
00689b70          case 0x33:
00689b70          case 0x34:
00689b70          case 0x35:
00689b70          case 0x36:
00689b70          case 0x37:
00689b70          case 0x38:
00689b70          case 0x39:
00689b70          case 0x3a:
00689b70          case 0x3b:
00689b70          case 0x3c:
00689b70          case 0x3d:
00689b70          case 0x3e:
00689b70          case 0x3f:
00689b70          case 0x40:
00689b70          case 0x41:
00689b70          case 0x42:
00689b70          case 0x43:
00689b70          case 0x44:
00689b70          case 0x45:
00689b70          case 0x46:
00689b70          case 0x47:
00689b70          case 0x48:
00689b70          case 0x49:
00689b70          case 0x4a:
00689b70          case 0x4b:
00689b70          case 0x4c:
00689b70          case 0x4d:
00689b70          case 0x4e:
00689b70          case 0x4f:
00689b70          case 0x50:
00689b70          case 0x51:
00689b70          case 0x52:
00689b70          case 0x53:
00689b70          case 0x54:
00689b70          case 0x55:
00689b70          case 0x56:
00689b70          case 0x57:
00689b70          case 0x58:
00689b70          case 0x59:
00689b70          case 0x5a:
00689b70          case 0x5b:
00689b70          case 0x5c:
00689b70          case 0x5d:
00689b70          case 0x5e:
00689b70          case 0x5f:
00689b70          case 0x60:
00689b70          case 0x61:
00689b70          case 0x62:
00689b70          case 0x63:
00689b70          case 0x64:
00689b70          case 0x65:
00689b70          case 0x66:
00689b70          case 0x67:
00689b70          case 0x68:
00689b70          case 0x69:
00689b70          case 0x6a:
00689b70          case 0x6b:
00689b70          case 0x6c:
00689b70          case 0x6d:
00689b70          case 0x6e:
00689b70          case 0x6f:
00689b70          case 0x70:
00689b70          case 0x71:
00689b70          case 0x72:
00689b70          case 0x73:
00689b70          case 0x74:
00689b70          case 0x75:
00689b70          case 0x76:
00689b70          case 0x77:
00689b70          case 0x78:
00689b70          case 0x79:
00689b70          case 0x7a:
00689b70          case 0x7b:
00689b70          case 0x7c:
00689b70          case 0x7d:
00689b70          case 0x7e:
00689b70          case 0x7f:
00689b70          case 0x80:
00689b70          case 0x81:
00689b70          case 0x82:
00689b70          case 0x83:
00689b70          case 0x84:
00689b70          case 0x85:
00689b70          case 0x86:
00689b70          case 0x87:
00689b70          case 0x88:
00689b70          case 0x89:
00689b70          case 0x8a:
00689b70          case 0x8b:
00689b70          case 0x8c:
00689b70          case 0x8d:
00689b70          case 0x8e:
00689b70          case 0x8f:
00689b70          case 0x90:
00689b70          case 0x91:
00689b70          case 0x92:
00689b70          case 0x93:
00689b70          case 0x94:
00689b70          case 0x95:
00689b70          case 0x96:
00689b70          case 0x97:
00689b70          case 0x98:
00689b70          case 0x99:
00689b70          case 0x9a:
00689b70          case 0x9b:
00689b70          case 0x9c:
00689b70          case 0x9d:
00689b70          case 0x9e:
00689b70          case 0x9f:
00689b70          case 0xa0:
00689b70          case 0xa1:
00689b70          case 0xa2:
00689b70          case 0xa3:
00689b70          case 0xa4:
00689b70          case 0xa5:
00689b70          case 0xa6:
00689b70          case 0xa7:
00689b70          case 0xa8:
00689b70          case 0xa9:
00689b70          case 0xaa:
00689b70          case 0xab:
00689b70          case 0xac:
00689b70          case 0xad:
00689b70          case 0xae:
00689b70          case 0xaf:
00689b70          case 0xb0:
00689b70          case 0xb1:
00689b70          case 0xb2:
00689b70          case 0xb3:
00689b70          case 0xb4:
00689b70          case 0xb5:
00689b70          case 0xb6:
00689b70          case 0xb7:
00689b70          case 0xb8:
00689b70          case 0xb9:
00689b70          case 0xba:
00689b70          case 0xbb:
00689b70          case 0xbc:
00689b70          case 0xbd:
00689b70          case 0xbe:
00689b70          case 0xbf:
00689b70          case 0xc0:
00689b70          case 0xc1:
00689b70          case 0xc2:
00689b70          case 0xc3:
00689b70          case 0xc4:
00689b70          case 0xc5:
00689b70          case 0xc6:
00689b70          case 0xc7:
00689b70          case 0xc8:
00689b70          case 0xc9:
00689b70          case 0xca:
00689b70          case 0xcb:
00689b70          case 0xcc:
00689b70          case 0xcd:
00689b70          case 0xce:
00689b70          case 0xcf:
00689b70          case 0xd0:
00689b70          case 0xd1:
00689b70          case 0xd2:
00689b70          case 0xd3:
00689b70          case 0xd4:
00689b70          case 0xd5:
00689b70          case 0xd6:
00689b70          case 0xd7:
00689b70          case 0xd8:
00689b70          case 0xd9:
00689b70          case 0xda:
00689b70          case 0xdb:
00689b70          case 0xdc:
00689b70          case 0xdd:
00689b70          case 0xde:
00689b70          case 0xdf:
00689b70          case 0xe0:
00689b70          case 0xe1:
00689b70          case 0xe2:
00689b70          case 0xe3:
00689b70          case 0xe4:
00689b70          case 0xe5:
00689b70          case 0xe6:
00689b70          case 0xe7:
00689b70          case 0xe8:
00689b70          case 0xe9:
00689b70          case 0xea:
00689b70          case 0xeb:
00689b70          case 0xec:
00689b70          case 0xed:
00689b70          case 0xee:
00689b70          case 0xef:
00689b70          case 0xf0:
00689b70          case 0xf1:
00689b70          case 0xf2:
00689b70          case 0xf3:
00689b70          case 0xf4:
00689b70          case 0xf5:
00689b70          case 0xf6:
00689b70          case 0xf7:
00689b70          case 0xf8:
00689b70          case 0xf9:
00689b70          case 0xfa:
00689b70          case 0xfb:
00689b70          case 0xfc:
00689b70          case 0xfd:
00689b70          case 0xfe:
00689b70          case 0xff:
00689b70          case 0x103:
00689b70          {
00689b70              goto label_689e22;
00689b70          }
00689c20          case 0x1f:
00689c20          {
00689c20              if (this->m_cSetCapture != 0)
00689c20              {
00689c22                  this->m_cSetCapture = 0;
00689c28                  ReleaseCapture();
00689c20              }
00689c20              
00689c30              CInputManager_WIN32::ReleasePressedKeys(this);
00689c36              this->m_bProcessingKeyDown = 0;
00689c42              return 0;
00689c20              break;
00689c20          }
00689bf4          case 0x100:
00689bf4          case 0x104:
00689bf4          {
00689bf4              this->m_bProcessingKeyDown = 1;
00689bfb              this->m_bIgnoreNextChar = 0;
00689c05          label_689c05:
00689c05              CInputManager_WIN32::GenerateKeyboardEvent(this, eax);
00689c0b              this->m_bProcessingKeyDown = 0;
00689c17              return 0;
00689bf4              break;
00689bf4          }
00689b70          case 0x101:
00689b70          case 0x105:
00689b70          {
00689b70              goto label_689c05;
00689b70          }
00689b70          case 0x102:
00689b70          {
00689b70              goto label_689c45;
00689b70          }
00689b4e      }
00689b30  }

00689e35                                                                 8d 49 00                                               .I.
00689e38  uint32_t jump_table_689e38[0x7] = 
00689e38  {
00689e38      [0x0] =  0x00689b77
00689e3c      [0x1] =  0x00689bb2
00689e40      [0x2] =  0x00689c1a
00689e44      [0x3] =  0x00689bf4
00689e48      [0x4] =  0x00689c02
00689e4c      [0x5] =  0x00689c45
00689e50      [0x6] =  0x00689e22
00689e54  }
00689e54  uint8_t lookup_table_689e54[0xff] = 
00689e54  {
00689e54      [0x00] =  0x00
00689e55      [0x01] =  0x01
00689e56      [0x02] =  0x06
00689e57      [0x03] =  0x06
00689e58      [0x04] =  0x06
00689e59      [0x05] =  0x06
00689e5a      [0x06] =  0x06
00689e5b      [0x07] =  0x06
00689e5c      [0x08] =  0x06
00689e5d      [0x09] =  0x06
00689e5e      [0x0a] =  0x06
00689e5f      [0x0b] =  0x06
00689e60      [0x0c] =  0x06
00689e61      [0x0d] =  0x06
00689e62      [0x0e] =  0x06
00689e63      [0x0f] =  0x06
00689e64      [0x10] =  0x06
00689e65      [0x11] =  0x06
00689e66      [0x12] =  0x06
00689e67      [0x13] =  0x06
00689e68      [0x14] =  0x06
00689e69      [0x15] =  0x06
00689e6a      [0x16] =  0x06
00689e6b      [0x17] =  0x06
00689e6c      [0x18] =  0x02
00689e6d      [0x19] =  0x06
00689e6e      [0x1a] =  0x06
00689e6f      [0x1b] =  0x06
00689e70      [0x1c] =  0x06
00689e71      [0x1d] =  0x06
00689e72      [0x1e] =  0x06
00689e73      [0x1f] =  0x06
00689e74      [0x20] =  0x06
00689e75      [0x21] =  0x06
00689e76      [0x22] =  0x06
00689e77      [0x23] =  0x06
00689e78      [0x24] =  0x06
00689e79      [0x25] =  0x06
00689e7a      [0x26] =  0x06
00689e7b      [0x27] =  0x06
00689e7c      [0x28] =  0x06
00689e7d      [0x29] =  0x06
00689e7e      [0x2a] =  0x06
00689e7f      [0x2b] =  0x06
00689e80      [0x2c] =  0x06
00689e81      [0x2d] =  0x06
00689e82      [0x2e] =  0x06
00689e83      [0x2f] =  0x06
00689e84      [0x30] =  0x06
00689e85      [0x31] =  0x06
00689e86      [0x32] =  0x06
00689e87      [0x33] =  0x06
00689e88      [0x34] =  0x06
00689e89      [0x35] =  0x06
00689e8a      [0x36] =  0x06
00689e8b      [0x37] =  0x06
00689e8c      [0x38] =  0x06
00689e8d      [0x39] =  0x06
00689e8e      [0x3a] =  0x06
00689e8f      [0x3b] =  0x06
00689e90      [0x3c] =  0x06
00689e91      [0x3d] =  0x06
00689e92      [0x3e] =  0x06
00689e93      [0x3f] =  0x06
00689e94      [0x40] =  0x06
00689e95      [0x41] =  0x06
00689e96      [0x42] =  0x06
00689e97      [0x43] =  0x06
00689e98      [0x44] =  0x06
00689e99      [0x45] =  0x06
00689e9a      [0x46] =  0x06
00689e9b      [0x47] =  0x06
00689e9c      [0x48] =  0x06
00689e9d      [0x49] =  0x06
00689e9e      [0x4a] =  0x06
00689e9f      [0x4b] =  0x06
00689ea0      [0x4c] =  0x06
00689ea1      [0x4d] =  0x06
00689ea2      [0x4e] =  0x06
00689ea3      [0x4f] =  0x06
00689ea4      [0x50] =  0x06
00689ea5      [0x51] =  0x06
00689ea6      [0x52] =  0x06
00689ea7      [0x53] =  0x06
00689ea8      [0x54] =  0x06
00689ea9      [0x55] =  0x06
00689eaa      [0x56] =  0x06
00689eab      [0x57] =  0x06
00689eac      [0x58] =  0x06
00689ead      [0x59] =  0x06
00689eae      [0x5a] =  0x06
00689eaf      [0x5b] =  0x06
00689eb0      [0x5c] =  0x06
00689eb1      [0x5d] =  0x06
00689eb2      [0x5e] =  0x06
00689eb3      [0x5f] =  0x06
00689eb4      [0x60] =  0x06
00689eb5      [0x61] =  0x06
00689eb6      [0x62] =  0x06
00689eb7      [0x63] =  0x06
00689eb8      [0x64] =  0x06
00689eb9      [0x65] =  0x06
00689eba      [0x66] =  0x06
00689ebb      [0x67] =  0x06
00689ebc      [0x68] =  0x06
00689ebd      [0x69] =  0x06
00689ebe      [0x6a] =  0x06
00689ebf      [0x6b] =  0x06
00689ec0      [0x6c] =  0x06
00689ec1      [0x6d] =  0x06
00689ec2      [0x6e] =  0x06
00689ec3      [0x6f] =  0x06
00689ec4      [0x70] =  0x06
00689ec5      [0x71] =  0x06
00689ec6      [0x72] =  0x06
00689ec7      [0x73] =  0x06
00689ec8      [0x74] =  0x06
00689ec9      [0x75] =  0x06
00689eca      [0x76] =  0x06
00689ecb      [0x77] =  0x06
00689ecc      [0x78] =  0x06
00689ecd      [0x79] =  0x06
00689ece      [0x7a] =  0x06
00689ecf      [0x7b] =  0x06
00689ed0      [0x7c] =  0x06
00689ed1      [0x7d] =  0x06
00689ed2      [0x7e] =  0x06
00689ed3      [0x7f] =  0x06
00689ed4      [0x80] =  0x06
00689ed5      [0x81] =  0x06
00689ed6      [0x82] =  0x06
00689ed7      [0x83] =  0x06
00689ed8      [0x84] =  0x06
00689ed9      [0x85] =  0x06
00689eda      [0x86] =  0x06
00689edb      [0x87] =  0x06
00689edc      [0x88] =  0x06
00689edd      [0x89] =  0x06
00689ede      [0x8a] =  0x06
00689edf      [0x8b] =  0x06
00689ee0      [0x8c] =  0x06
00689ee1      [0x8d] =  0x06
00689ee2      [0x8e] =  0x06
00689ee3      [0x8f] =  0x06
00689ee4      [0x90] =  0x06
00689ee5      [0x91] =  0x06
00689ee6      [0x92] =  0x06
00689ee7      [0x93] =  0x06
00689ee8      [0x94] =  0x06
00689ee9      [0x95] =  0x06
00689eea      [0x96] =  0x06
00689eeb      [0x97] =  0x06
00689eec      [0x98] =  0x06
00689eed      [0x99] =  0x06
00689eee      [0x9a] =  0x06
00689eef      [0x9b] =  0x06
00689ef0      [0x9c] =  0x06
00689ef1      [0x9d] =  0x06
00689ef2      [0x9e] =  0x06
00689ef3      [0x9f] =  0x06
00689ef4      [0xa0] =  0x06
00689ef5      [0xa1] =  0x06
00689ef6      [0xa2] =  0x06
00689ef7      [0xa3] =  0x06
00689ef8      [0xa4] =  0x06
00689ef9      [0xa5] =  0x06
00689efa      [0xa6] =  0x06
00689efb      [0xa7] =  0x06
00689efc      [0xa8] =  0x06
00689efd      [0xa9] =  0x06
00689efe      [0xaa] =  0x06
00689eff      [0xab] =  0x06
00689f00      [0xac] =  0x06
00689f01      [0xad] =  0x06
00689f02      [0xae] =  0x06
00689f03      [0xaf] =  0x06
00689f04      [0xb0] =  0x06
00689f05      [0xb1] =  0x06
00689f06      [0xb2] =  0x06
00689f07      [0xb3] =  0x06
00689f08      [0xb4] =  0x06
00689f09      [0xb5] =  0x06
00689f0a      [0xb6] =  0x06
00689f0b      [0xb7] =  0x06
00689f0c      [0xb8] =  0x06
00689f0d      [0xb9] =  0x06
00689f0e      [0xba] =  0x06
00689f0f      [0xbb] =  0x06
00689f10      [0xbc] =  0x06
00689f11      [0xbd] =  0x06
00689f12      [0xbe] =  0x06
00689f13      [0xbf] =  0x06
00689f14      [0xc0] =  0x06
00689f15      [0xc1] =  0x06
00689f16      [0xc2] =  0x06
00689f17      [0xc3] =  0x06
00689f18      [0xc4] =  0x06
00689f19      [0xc5] =  0x06
00689f1a      [0xc6] =  0x06
00689f1b      [0xc7] =  0x06
00689f1c      [0xc8] =  0x06
00689f1d      [0xc9] =  0x06
00689f1e      [0xca] =  0x06
00689f1f      [0xcb] =  0x06
00689f20      [0xcc] =  0x06
00689f21      [0xcd] =  0x06
00689f22      [0xce] =  0x06
00689f23      [0xcf] =  0x06
00689f24      [0xd0] =  0x06
00689f25      [0xd1] =  0x06
00689f26      [0xd2] =  0x06
00689f27      [0xd3] =  0x06
00689f28      [0xd4] =  0x06
00689f29      [0xd5] =  0x06
00689f2a      [0xd6] =  0x06
00689f2b      [0xd7] =  0x06
00689f2c      [0xd8] =  0x06
00689f2d      [0xd9] =  0x06
00689f2e      [0xda] =  0x06
00689f2f      [0xdb] =  0x06
00689f30      [0xdc] =  0x06
00689f31      [0xdd] =  0x06
00689f32      [0xde] =  0x06
00689f33      [0xdf] =  0x06
00689f34      [0xe0] =  0x06
00689f35      [0xe1] =  0x06
00689f36      [0xe2] =  0x06
00689f37      [0xe3] =  0x06
00689f38      [0xe4] =  0x06
00689f39      [0xe5] =  0x06
00689f3a      [0xe6] =  0x06
00689f3b      [0xe7] =  0x06
00689f3c      [0xe8] =  0x06
00689f3d      [0xe9] =  0x06
00689f3e      [0xea] =  0x06
00689f3f      [0xeb] =  0x06
00689f40      [0xec] =  0x06
00689f41      [0xed] =  0x06
00689f42      [0xee] =  0x06
00689f43      [0xef] =  0x06
00689f44      [0xf0] =  0x06
00689f45      [0xf1] =  0x06
00689f46      [0xf2] =  0x06
00689f47      [0xf3] =  0x06
00689f48      [0xf4] =  0x06
00689f49      [0xf5] =  0x06
00689f4a      [0xf6] =  0x06
00689f4b      [0xf7] =  0x06
00689f4c      [0xf8] =  0x06
00689f4d      [0xf9] =  0x03
00689f4e      [0xfa] =  0x04
00689f4f      [0xfb] =  0x05
00689f50      [0xfc] =  0x06
00689f51      [0xfd] =  0x03
00689f52      [0xfe] =  0x04
00689f53  }

00689f53                                                           90                                                         .
00689f54  uint32_t jump_table_689f54[0x9] = 
00689f54  {
00689f54      [0x0] =  0x00689da3
00689f58      [0x1] =  0x00689cfd
00689f5c      [0x2] =  0x00689d23
00689f60      [0x3] =  0x00689d4a
00689f64      [0x4] =  0x00689de0
00689f68      [0x5] =  0x00689d71
00689f6c      [0x6] =  0x00689e00
00689f70      [0x7] =  0x00689dc1
00689f74      [0x8] =  0x00689e22
00689f78  }
00689f78  uint8_t lookup_table_689f78[0xa4] = 
00689f78  {
00689f78      [0x00] =  0x00
00689f79      [0x01] =  0x01
00689f7a      [0x02] =  0x01
00689f7b      [0x03] =  0x01
00689f7c      [0x04] =  0x02
00689f7d      [0x05] =  0x02
00689f7e      [0x06] =  0x02
00689f7f      [0x07] =  0x03
00689f80      [0x08] =  0x03
00689f81      [0x09] =  0x03
00689f82      [0x0a] =  0x04
00689f83      [0x0b] =  0x05
00689f84      [0x0c] =  0x05
00689f85      [0x0d] =  0x05
00689f86      [0x0e] =  0x08
00689f87      [0x0f] =  0x08
00689f88      [0x10] =  0x08
00689f89      [0x11] =  0x08
00689f8a      [0x12] =  0x08
00689f8b      [0x13] =  0x08
00689f8c      [0x14] =  0x08
00689f8d      [0x15] =  0x08
00689f8e      [0x16] =  0x08
00689f8f      [0x17] =  0x08
00689f90      [0x18] =  0x08
00689f91      [0x19] =  0x06
00689f92      [0x1a] =  0x08
00689f93      [0x1b] =  0x08
00689f94      [0x1c] =  0x08
00689f95      [0x1d] =  0x08
00689f96      [0x1e] =  0x08
00689f97      [0x1f] =  0x08
00689f98      [0x20] =  0x08
00689f99      [0x21] =  0x08
00689f9a      [0x22] =  0x08
00689f9b      [0x23] =  0x08
00689f9c      [0x24] =  0x08
00689f9d      [0x25] =  0x08
00689f9e      [0x26] =  0x08
00689f9f      [0x27] =  0x08
00689fa0      [0x28] =  0x08
00689fa1      [0x29] =  0x08
00689fa2      [0x2a] =  0x08
00689fa3      [0x2b] =  0x08
00689fa4      [0x2c] =  0x08
00689fa5      [0x2d] =  0x08
00689fa6      [0x2e] =  0x08
00689fa7      [0x2f] =  0x08
00689fa8      [0x30] =  0x08
00689fa9      [0x31] =  0x08
00689faa      [0x32] =  0x08
00689fab      [0x33] =  0x08
00689fac      [0x34] =  0x08
00689fad      [0x35] =  0x08
00689fae      [0x36] =  0x08
00689faf      [0x37] =  0x08
00689fb0      [0x38] =  0x08
00689fb1      [0x39] =  0x08
00689fb2      [0x3a] =  0x08
00689fb3      [0x3b] =  0x08
00689fb4      [0x3c] =  0x08
00689fb5      [0x3d] =  0x08
00689fb6      [0x3e] =  0x08
00689fb7      [0x3f] =  0x08
00689fb8      [0x40] =  0x08
00689fb9      [0x41] =  0x08
00689fba      [0x42] =  0x08
00689fbb      [0x43] =  0x08
00689fbc      [0x44] =  0x08
00689fbd      [0x45] =  0x08
00689fbe      [0x46] =  0x08
00689fbf      [0x47] =  0x08
00689fc0      [0x48] =  0x08
00689fc1      [0x49] =  0x08
00689fc2      [0x4a] =  0x08
00689fc3      [0x4b] =  0x08
00689fc4      [0x4c] =  0x08
00689fc5      [0x4d] =  0x08
00689fc6      [0x4e] =  0x08
00689fc7      [0x4f] =  0x08
00689fc8      [0x50] =  0x08
00689fc9      [0x51] =  0x08
00689fca      [0x52] =  0x08
00689fcb      [0x53] =  0x08
00689fcc      [0x54] =  0x08
00689fcd      [0x55] =  0x08
00689fce      [0x56] =  0x08
00689fcf      [0x57] =  0x08
00689fd0      [0x58] =  0x08
00689fd1      [0x59] =  0x08
00689fd2      [0x5a] =  0x08
00689fd3      [0x5b] =  0x08
00689fd4      [0x5c] =  0x08
00689fd5      [0x5d] =  0x08
00689fd6      [0x5e] =  0x08
00689fd7      [0x5f] =  0x08
00689fd8      [0x60] =  0x08
00689fd9      [0x61] =  0x08
00689fda      [0x62] =  0x08
00689fdb      [0x63] =  0x08
00689fdc      [0x64] =  0x08
00689fdd      [0x65] =  0x08
00689fde      [0x66] =  0x08
00689fdf      [0x67] =  0x08
00689fe0      [0x68] =  0x08
00689fe1      [0x69] =  0x08
00689fe2      [0x6a] =  0x08
00689fe3      [0x6b] =  0x08
00689fe4      [0x6c] =  0x08
00689fe5      [0x6d] =  0x08
00689fe6      [0x6e] =  0x08
00689fe7      [0x6f] =  0x08
00689fe8      [0x70] =  0x08
00689fe9      [0x71] =  0x08
00689fea      [0x72] =  0x08
00689feb      [0x73] =  0x08
00689fec      [0x74] =  0x08
00689fed      [0x75] =  0x08
00689fee      [0x76] =  0x08
00689fef      [0x77] =  0x08
00689ff0      [0x78] =  0x08
00689ff1      [0x79] =  0x08
00689ff2      [0x7a] =  0x08
00689ff3      [0x7b] =  0x08
00689ff4      [0x7c] =  0x08
00689ff5      [0x7d] =  0x08
00689ff6      [0x7e] =  0x08
00689ff7      [0x7f] =  0x08
00689ff8      [0x80] =  0x08
00689ff9      [0x81] =  0x08
00689ffa      [0x82] =  0x08
00689ffb      [0x83] =  0x08
00689ffc      [0x84] =  0x08
00689ffd      [0x85] =  0x08
00689ffe      [0x86] =  0x08
00689fff      [0x87] =  0x08
0068a000      [0x88] =  0x08
0068a001      [0x89] =  0x08
0068a002      [0x8a] =  0x08
0068a003      [0x8b] =  0x08
0068a004      [0x8c] =  0x08
0068a005      [0x8d] =  0x08
0068a006      [0x8e] =  0x08
0068a007      [0x8f] =  0x08
0068a008      [0x90] =  0x08
0068a009      [0x91] =  0x08
0068a00a      [0x92] =  0x08
0068a00b      [0x93] =  0x08
0068a00c      [0x94] =  0x08
0068a00d      [0x95] =  0x08
0068a00e      [0x96] =  0x08
0068a00f      [0x97] =  0x08
0068a010      [0x98] =  0x08
0068a011      [0x99] =  0x08
0068a012      [0x9a] =  0x08
0068a013      [0x9b] =  0x08
0068a014      [0x9c] =  0x08
0068a015      [0x9d] =  0x08
0068a016      [0x9e] =  0x08
0068a017      [0x9f] =  0x08
0068a018      [0xa0] =  0x08
0068a019      [0xa1] =  0x08
0068a01a      [0xa2] =  0x08
0068a01b      [0xa3] =  0x07
0068a01c  }

0068a01c                                                                                      90 90 90 90                              ....

0068a020  uint8_t SubControlIndexToStringInfo(enum SubControlIndex arg1, class StringInfo* arg2)

0068a020  {
0068a027      switch (arg1)
0068a027      {
0068a040          case sci_PositiveAxis:
0068a040          {
0068a040              StringInfo::SetStringIDandTableEnum(arg2, 0, 3);
0068a045              int32_t eax;
0068a045              eax = 1;
0068a047              return 1;
0068a040              break;
0068a040          }
0068a055          case sci_NegativeAxis:
0068a055          {
0068a055              StringInfo::SetStringIDandTableEnum(arg2, 0, 3);
0068a05a              int32_t eax_1;
0068a05a              eax_1 = 1;
0068a05c              return 1;
0068a055              break;
0068a055          }
0068a06a          case sci_POVUp:
0068a06a          {
0068a06a              StringInfo::SetStringIDandTableEnum(arg2, 0, 3);
0068a06f              int32_t eax_2;
0068a06f              eax_2 = 1;
0068a071              return 1;
0068a06a              break;
0068a06a          }
0068a07e          case sci_POVRight:
0068a07e          {
0068a07e              StringInfo::SetStringIDandTableEnum(arg2, 0, 3);
0068a083              int32_t eax_3;
0068a083              eax_3 = 1;
0068a085              return 1;
0068a07e              break;
0068a07e          }
0068a093          case sci_POVDown:
0068a093          {
0068a093              StringInfo::SetStringIDandTableEnum(arg2, 0, 3);
0068a098              int32_t eax_4;
0068a098              eax_4 = 1;
0068a09a              return 1;
0068a093              break;
0068a093          }
0068a0a8          case sci_POVLeft:
0068a0a8          {
0068a0a8              StringInfo::SetStringIDandTableEnum(arg2, 0, 3);
0068a0ad              int32_t eax_5;
0068a0ad              eax_5 = 1;
0068a0af              return 1;
0068a0a8              break;
0068a0a8          }
0068a027      }
0068a027      
0068a0b0      enum SubControlIndex eax_6;
0068a0b0      eax_6 = 0;
0068a0b2      return 0;
0068a020  }

0068a0b3                                                           90                                                         .
0068a0b4  uint32_t jump_table_68a0b4[0x7] = 
0068a0b4  {
0068a0b4      [0x0] =  0x0068a0b0
0068a0b8      [0x1] =  0x0068a034
0068a0bc      [0x2] =  0x0068a048
0068a0c0      [0x3] =  0x0068a05d
0068a0c4      [0x4] =  0x0068a072
0068a0c8      [0x5] =  0x0068a086
0068a0cc      [0x6] =  0x0068a09b
0068a0d0  }

0068a0d0  uint8_t __thiscall QualifiedControl::IsExactlyEqual(class QualifiedControl const* this, class QualifiedControl const* arg2)

0068a0d0  {
0068a0e8      if ((this->m_key.__inner0 == arg2->m_key.__inner0 && (this->m_metamode == arg2->m_metamode && this->m_activation == arg2->m_activation)))
0068a0ef          return 1;
0068a0ef      
0068a0f4      return 0;
0068a0d0  }

0068a0f7                                                                       90 90 90 90 90 90 90 90 90                         .........

0068a100  uint8_t __thiscall QualifiedControl::IsConflicting(class QualifiedControl const* this, class QualifiedControl const* arg2)

0068a100  {
0068a118      class QualifiedControl* eax;
0068a118      
0068a118      if ((this->m_key.__inner0 != arg2->m_key.__inner0 || (this->m_metamode != arg2->m_metamode || (this->m_activation & arg2->m_activation) == 0)))
0068a118      {
0068a11f          eax = 0;
0068a121          return 0;
0068a118      }
0068a118      
0068a11a      eax = 1;
0068a11c      return 1;
0068a100  }

0068a124              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0068a130  uint32_t BitUtils::CountHighBits(uint32_t arg1) __pure

0068a130  {
0068a143      int32_t eax_3 = (((arg1 >> 1) & 0x55555555) + (arg1 & 0x55555555));
0068a155      int32_t ecx_4 = (((eax_3 >> 2) & 0x33333333) + (eax_3 & 0x33333333));
0068a167      int32_t eax_8 = (((ecx_4 >> 4) & 0xf0f0f0f) + (ecx_4 & 0xf0f0f0f));
0068a179      int32_t ecx_9 = (((eax_8 >> 8) & 0xff00ff) + (eax_8 & 0xff00ff));
0068a188      return ((ecx_9 >> 0x10) + (ecx_9 & 0xffff));
0068a130  }

0068a189                             90 90 90 90 90 90 90                                                           .......

0068a190  void __thiscall AvailableProperty::Serialize(class AvailableProperty* this, class Archive* arg2)

0068a190  {
0068a19c      Archive::CheckAlignment(arg2, 4);
0068a1a5      uint32_t* eax = Archive::GetBytes(arg2, 4);
0068a1a5      
0068a1ac      if (eax != 0)
0068a1ac      {
0068a1b2          if ((arg2->m_flags & 1) != 0)
0068a1b2          {
0068a1b7              *(uint32_t*)eax = this->m_name;
0068a1ba              return;
0068a1b2          }
0068a1b2          
0068a1bf          this->m_name = *(uint32_t*)eax;
0068a1ac      }
0068a190  }

0068a1c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0068a1d0  uint8_t __thiscall QualifiedControl::operator==(class QualifiedControl const* this, class QualifiedControl const* arg2)

0068a1d0  {
0068a1d6      uint32_t m_activation = arg2->m_activation;
0068a1da      uint32_t m_activation_1 = this->m_activation;
0068a1e7      uint32_t eax_1;
0068a1e7      eax_1 = ((m_activation_1 >> 0x1f) & 1);
0068a1e9      uint8_t edx_1 = (((int8_t)(m_activation >> 0x1f)) & 1);
0068a1ee      bool cond:1_1;
0068a1ee      
0068a1ee      if (eax_1 == 0)
0068a1ee      {
0068a219          eax_1 = arg2->m_key.__inner0;
0068a21d          union __inner0 = this->m_key.__inner0;
0068a21f          uint32_t m_metamode;
0068a21f          
0068a21f          if (edx_1 != 0)
0068a21f          {
0068a241              if (__inner0 == eax_1)
0068a241              {
0068a243                  m_metamode = this->m_metamode;
0068a249                  eax_1 = (arg2->m_metamode & m_metamode);
0068a24b              label_68a24b:
0068a24b                  cond:1_1 = eax_1 != m_metamode;
0068a24b                  goto label_68a24d;
0068a241              }
0068a21f          }
0068a21f          else if (__inner0 == eax_1)
0068a223          {
0068a225              eax_1 = this->m_metamode;
0068a228              m_metamode = arg2->m_metamode;
0068a22b              goto label_68a24b;
0068a223          }
0068a1ee      }
0068a1ee      else
0068a1ee      {
0068a1f2          if (edx_1 != 0)
0068a1f2          {
0068a204              if ((this->m_key.__inner0 == arg2->m_key.__inner0 && (this->m_metamode == arg2->m_metamode && m_activation_1 == m_activation)))
0068a20e                  return 1;
0068a20e              
0068a216              return 0;
0068a1f2          }
0068a1f2          
0068a231          if (arg2->m_key.__inner0 == this->m_key.__inner0)
0068a231          {
0068a233              uint32_t m_metamode_1 = arg2->m_metamode;
0068a23b              cond:1_1 = (this->m_metamode & m_metamode_1) != m_metamode_1;
0068a24d          label_68a24d:
0068a24d              
0068a251              if ((!(cond:1_1) && (m_activation_1 & m_activation) != 0))
0068a251              {
0068a255                  eax_1 = 1;
0068a258                  return 1;
0068a251              }
0068a231          }
0068a1ee      }
0068a25d      eax_1 = 0;
0068a260      return 0;
0068a1d0  }

0068a263           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0068a270  uint8_t __thiscall QualifiedControl::IsBetterMatch(class QualifiedControl const* this, class QualifiedControl const* arg2, class QualifiedControl const* arg3)

0068a270  {
0068a274      union eax = arg3->m_key.__inner0;
0068a276      int32_t ebx;
0068a276      int32_t var_4 = ebx;
0068a276      
0068a28f      if ((arg2->m_key.__inner0 == eax && (arg2->m_metamode == arg3->m_metamode && arg2->m_activation == arg3->m_activation)))
0068a28f      {
0068a293          *(uint8_t*)((char*)eax + 0) = 0;
0068a296          return 0;
0068a28f      }
0068a28f      
0068a29c      if (eax == this->m_key.__inner0)
0068a29c      {
0068a29e          uint32_t m_metamode = this->m_metamode;
0068a2a1          eax = arg3->m_metamode;
0068a2a6          uint32_t edi_4 = (m_metamode & eax);
0068a2a6          
0068a2aa          if (edi_4 == eax)
0068a2aa          {
0068a2ac              uint32_t m_activation = arg3->m_activation;
0068a2ac              
0068a2b2              if ((this->m_activation & m_activation) != 0)
0068a2b2              {
0068a2b4                  eax = arg2->m_activation;
0068a2b9                  ebx = 1;
0068a2b9                  
0068a2bb                  if (m_activation >= eax)
0068a2bb                  {
0068a2bd                      if (m_activation != eax)
0068a2bd                      {
0068a2e3                          *(uint8_t*)((char*)eax + 0) = ebx;
0068a2e6                          return *(uint8_t*)((char*)eax + 0);
0068a2bd                      }
0068a2bd                      
0068a2c3                      uint32_t esi_2 = (arg2->m_metamode & m_metamode);
0068a2c5                      uint32_t eax_1 = BitUtils::CountHighBits(edi_4);
0068a2cd                      eax = BitUtils::CountHighBits(esi_2);
0068a2cd                      
0068a2d7                      if (eax_1 >= eax)
0068a2d7                      {
0068a2d9                          if (eax_1 == eax)
0068a2dd                              ebx = edi_4 > esi_2;
0068a2dd                          
0068a2e3                          *(uint8_t*)((char*)eax + 0) = ebx;
0068a2e6                          return *(uint8_t*)((char*)eax + 0);
0068a2d7                      }
0068a2bb                  }
0068a2b2              }
0068a2aa          }
0068a29c      }
0068a29c      
0068a2ee      *(uint8_t*)((char*)eax + 0) = 0;
0068a2f1      return 0;
0068a270  }

0068a2f4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0068a300  class PFileNode* __thiscall PFileNode::MakeSubNodeAsUInt32(class PFileNode* this, uint32_t arg2)

0068a300  {
0068a303      void* result = *(int32_t*)((char*)this->vtable + 4)();
0068a303      
0068a30a      if (result == 0)
0068a30d          return result;
0068a30d      
0068a310      int32_t* ecx = *(uint32_t*)((char*)result + 8);
0068a310      
0068a315      if (ecx != 0)
0068a31b          **(uint32_t**)ecx(1);
0068a31b      
0068a31f      *(uint32_t*)((char*)result + 8) = 0;
0068a326      void* eax = operator new(8);
0068a326      
0068a330      if (eax == 0)
0068a330      {
0068a34a          *(uint32_t*)((char*)result + 8) = 0;
0068a350          return result;
0068a330      }
0068a330      
0068a336      *(uint32_t*)eax = 0x797108;
0068a33c      *(uint32_t*)((char*)eax + 4) = arg2;
0068a33f      *(uint32_t*)((char*)result + 8) = eax;
0068a345      return result;
0068a300  }

0068a353                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0068a360  void* __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>* this, uint32_t arg2)

0068a360  {
0068a363      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_buckets;
0068a36b      this->vtable = 0x7ff098;
0068a36b      
0068a371      if (m_buckets != &this->m_aInplaceBuckets)
0068a374          operator delete[](m_buckets);
0068a374      
0068a37e      this->m_buckets = nullptr;
0068a381      this->m_firstInterestingBucket = nullptr;
0068a384      this->m_numBuckets = 0;
0068a387      this->m_numElements = 0;
0068a387      
0068a38f      if ((arg2 & 1) != 0)
0068a392          operator delete(this);
0068a392      
0068a39d      return this;
0068a360  }


0068a3a0  void __thiscall UserBindingValue::Serialize(class UserBindingValue* this, class Archive* arg2)

0068a3a0  {
0068a3ac      Archive::CheckAlignment(arg2, 4);
0068a3b5      uint8_t* eax = Archive::GetBytes(arg2, 4);
0068a3b5      
0068a3bc      if (eax != 0)
0068a3bc      {
0068a3c2          if ((arg2->m_flags & 1) == 0)
0068a3cc              this->m_eActionClass = *(uint32_t*)eax;
0068a3c2          else
0068a3c6              *(uint32_t*)eax = this->m_eActionClass;
0068a3bc      }
0068a3bc      
0068a3d2      Archive::CheckAlignment(arg2, 4);
0068a3db      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
0068a3db      
0068a3e2      if (eax_1 != 0)
0068a3e2      {
0068a3e8          if ((arg2->m_flags & 1) == 0)
0068a3f3              this->m_action_name = *(uint32_t*)eax_1;
0068a3e8          else
0068a3ed              *(uint32_t*)eax_1 = this->m_action_name;
0068a3e2      }
0068a3e2      
0068a3fa      Archive::CheckAlignment(arg2, 4);
0068a403      uint32_t* eax_2 = Archive::GetBytes(arg2, 4);
0068a403      
0068a40a      if (eax_2 != 0)
0068a40a      {
0068a410          if ((arg2->m_flags & 1) != 0)
0068a410          {
0068a416              *(uint32_t*)eax_2 = this->m_description;
0068a419              return;
0068a410          }
0068a410          
0068a41e          this->m_description = *(uint32_t*)eax_2;
0068a40a      }
0068a3a0  }

0068a426                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0068a430  uint8_t __convention("regparm") StringToDeviceType(class PStringBase<char> const* arg1, enum DeviceType* arg2)

0068a430  {
0068a430      void* ecx;
0068a430      void* var_4 = ecx;
0068a43e      PStringBase<char>::PStringBase<char>(&var_4, "Keyboard");
0068a455      int32_t eax_1 = _stricmp(arg1->m_charbuffer, var_4);
0068a460      char ebx_1 = ((int8_t)-(eax_1));
0068a464      int32_t* esi_1 = ((char*)var_4 - 0x14);
0068a464      
0068a479      if ((InterlockedDecrement(&esi_1[1]) == 0 && esi_1 != 0))
0068a481          **(uint32_t**)esi_1(1);
0068a481      
0068a485      if ((ebx_1 - ebx_1) != 0xff)
0068a485      {
0068a48e          *(uint32_t*)arg2 = dt_Keyboard;
0068a494          int32_t eax_2;
0068a494          eax_2 = 1;
0068a498          return 1;
0068a485      }
0068a485      
0068a4a2      PStringBase<char>::PStringBase<char>(&var_4, "Mouse");
0068a4af      int32_t eax_5 = _stricmp(arg1->m_charbuffer, var_4);
0068a4ba      char ebx_3 = ((int8_t)-(eax_5));
0068a4be      void* esi_3 = ((char*)var_4 - 0x14);
0068a4be      
0068a4d3      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0068a4db          **(uint32_t**)esi_3(1);
0068a4db      
0068a4df      if ((ebx_3 - ebx_3) != 0xff)
0068a4df      {
0068a4e8          *(uint32_t*)arg2 = dt_Mouse;
0068a4ee          enum DeviceType* eax_8;
0068a4ee          eax_8 = 1;
0068a4f2          return 1;
0068a4df      }
0068a4df      
0068a4fc      PStringBase<char>::PStringBase<char>(&var_4, "Joystick");
0068a509      int32_t eax_10 = _stricmp(arg1->m_charbuffer, var_4);
0068a514      char ebx_5 = ((int8_t)-(eax_10));
0068a518      void* esi_5 = ((char*)var_4 - 0x14);
0068a518      
0068a52d      if ((InterlockedDecrement(((char*)esi_5 + 4)) == 0 && esi_5 != 0))
0068a535          **(uint32_t**)esi_5(1);
0068a535      
0068a539      if ((ebx_5 - ebx_5) != 0xff)
0068a539      {
0068a542          *(uint32_t*)arg2 = dt_Joystick;
0068a548          int32_t eax_11;
0068a548          eax_11 = 1;
0068a54c          return 1;
0068a539      }
0068a539      
0068a556      PStringBase<char>::PStringBase<char>(&var_4, "Virtual");
0068a563      int32_t eax_13 = _stricmp(arg1->m_charbuffer, var_4);
0068a56e      char ebx_7 = ((int8_t)-(eax_13));
0068a572      void* edi_3 = ((char*)var_4 - 0x14);
0068a572      
0068a587      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0068a58f          **(uint32_t**)edi_3(1);
0068a58f      
0068a593      if ((ebx_7 - ebx_7) == 0xff)
0068a593      {
0068a5ae          *(uint32_t*)arg2 = dt_Invalid;
0068a5b4          int32_t eax_15;
0068a5b4          eax_15 = 0;
0068a5b8          return 0;
0068a593      }
0068a593      
0068a59c      *(uint32_t*)arg2 = dt_Virtual;
0068a5a2      enum DeviceType* eax_16;
0068a5a2      eax_16 = 1;
0068a5a6      return 1;
0068a430  }

0068a5b9                                                                             90 90 90 90 90 90 90                           .......

0068a5c0  uint8_t __convention("regparm") StringToSubControlIndex(class PStringBase<char> const* arg1, enum SubControlIndex* arg2)

0068a5c0  {
0068a5c0      void* ecx;
0068a5c0      void* var_4 = ecx;
0068a5ce      PStringBase<char>::PStringBase<char>(&var_4, "AxisPositive");
0068a5e5      int32_t eax_1 = _stricmp(arg1->m_charbuffer, var_4);
0068a5f0      char ebx_1 = ((int8_t)-(eax_1));
0068a5f4      int32_t* ebp_1 = ((char*)var_4 - 0x14);
0068a5f4      
0068a609      if ((InterlockedDecrement(&ebp_1[1]) == 0 && ebp_1 != 0))
0068a612          **(uint32_t**)ebp_1(1);
0068a612      
0068a616      if ((ebx_1 - ebx_1) != 0xff)
0068a616      {
0068a61f          *(uint32_t*)arg2 = sci_PositiveAxis;
0068a625          int32_t eax_2;
0068a625          eax_2 = 1;
0068a629          return 1;
0068a616      }
0068a616      
0068a633      PStringBase<char>::PStringBase<char>(&var_4, "AxisNegative");
0068a640      int32_t eax_5 = _stricmp(arg1->m_charbuffer, var_4);
0068a64b      char ebx_3 = ((int8_t)-(eax_5));
0068a64f      void* ebp_3 = ((char*)var_4 - 0x14);
0068a64f      
0068a664      if ((InterlockedDecrement(((char*)ebp_3 + 4)) == 0 && ebp_3 != 0))
0068a66d          **(uint32_t**)ebp_3(1);
0068a66d      
0068a671      if ((ebx_3 - ebx_3) != 0xff)
0068a671      {
0068a67a          *(uint32_t*)arg2 = sci_NegativeAxis;
0068a680          enum SubControlIndex* eax_8;
0068a680          eax_8 = 1;
0068a684          return 1;
0068a671      }
0068a671      
0068a68e      PStringBase<char>::PStringBase<char>(&var_4, "POVUp");
0068a69b      int32_t eax_10 = _stricmp(arg1->m_charbuffer, var_4);
0068a6a6      char ebx_5 = ((int8_t)-(eax_10));
0068a6aa      void* ebp_5 = ((char*)var_4 - 0x14);
0068a6aa      
0068a6bf      if ((InterlockedDecrement(((char*)ebp_5 + 4)) == 0 && ebp_5 != 0))
0068a6c8          **(uint32_t**)ebp_5(1);
0068a6c8      
0068a6cc      if ((ebx_5 - ebx_5) != 0xff)
0068a6cc      {
0068a6d5          *(uint32_t*)arg2 = sci_POVUp;
0068a6db          int32_t eax_11;
0068a6db          eax_11 = 1;
0068a6df          return 1;
0068a6cc      }
0068a6cc      
0068a6e9      PStringBase<char>::PStringBase<char>(&var_4, "POVRight");
0068a6f6      int32_t eax_14 = _stricmp(arg1->m_charbuffer, var_4);
0068a701      char ebx_7 = ((int8_t)-(eax_14));
0068a705      void* ebp_7 = ((char*)var_4 - 0x14);
0068a705      
0068a71a      if ((InterlockedDecrement(((char*)ebp_7 + 4)) == 0 && ebp_7 != 0))
0068a723          **(uint32_t**)ebp_7(1);
0068a723      
0068a727      if ((ebx_7 - ebx_7) != 0xff)
0068a727      {
0068a730          *(uint32_t*)arg2 = sci_POVRight;
0068a736          enum SubControlIndex* eax_17;
0068a736          eax_17 = 1;
0068a73a          return 1;
0068a727      }
0068a727      
0068a744      PStringBase<char>::PStringBase<char>(&var_4, "POVDown");
0068a751      int32_t eax_19 = _stricmp(arg1->m_charbuffer, var_4);
0068a75c      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0068a75c      
0068a763      if (eax_19 == 0)
0068a763      {
0068a76c          *(uint32_t*)arg2 = sci_POVDown;
0068a772          int32_t eax_20;
0068a772          eax_20 = 1;
0068a776          return 1;
0068a763      }
0068a763      
0068a780      PStringBase<char>::PStringBase<char>(&var_4, "POVLeft");
0068a78d      int32_t eax_22 = _stricmp(arg1->m_charbuffer, var_4);
0068a798      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0068a798      
0068a79f      if (eax_22 == 0)
0068a79f      {
0068a7a8          *(uint32_t*)arg2 = sci_POVLeft;
0068a7ae          int32_t eax_23;
0068a7ae          eax_23 = 1;
0068a7b2          return 1;
0068a79f      }
0068a79f      
0068a7bc      PStringBase<char>::PStringBase<char>(&var_4, "None");
0068a7c9      int32_t eax_25 = _stricmp(arg1->m_charbuffer, var_4);
0068a7d4      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_4);
0068a7db      int32_t eax_26;
0068a7db      
0068a7db      if (eax_25 == 0)
0068a7db      {
0068a7e2          *(uint32_t*)arg2 = eax_25;
0068a7e6          eax_26 = 1;
0068a7ea          return 1;
0068a7db      }
0068a7db      
0068a7f2      *(uint32_t*)arg2 = sci_None;
0068a7f8      eax_26 = 0;
0068a7fc      return 0;
0068a5c0  }

0068a7fd                                                                                         90 90 90                               ...

0068a800  class PStringBase<char>* __thiscall ControlNameMapper::GetNameBySemantic(class ControlNameMapper const* this, class PStringBase<char>* __return, enum DeviceType arg3, uint32_t arg4)

0068a800  {
0068a809      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* __saved_edi_1;
0068a809      class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>* ecx_2;
0068a809      void var_c;
0068a809      
0068a809      if (arg3 == dt_Keyboard)
0068a809      {
0068a843          ecx_2 = &this->m_hashKeyboardSemantics.m_intrusiveTable;
0068a84a          __saved_edi_1 = &var_c;
0068a809      }
0068a809      else if (arg3 == 2)
0068a80c      {
0068a83d          __saved_edi_1 = &var_c;
0068a83e          ecx_2 = &this->m_hashMouseSemantics.m_intrusiveTable;
0068a80c      }
0068a80c      else
0068a80c      {
0068a80f          if (arg3 != 3)
0068a80f          {
0068a811              class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
0068a816              class PSRefBufferCharData<char>** __return_1 = __return;
0068a820              *(uint32_t*)__return_1 = m_charbuffer;
0068a822              InterlockedIncrement(((char*)m_charbuffer - 0x10));
0068a82e              return __return_1;
0068a80f          }
0068a80f          
0068a831          ecx_2 = &this->m_hashJoystickSemantics.m_intrusiveTable;
0068a84a          __saved_edi_1 = &var_c;
0068a80c      }
0068a84b      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(ecx_2, __saved_edi_1);
0068a850      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
0068a852      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
0068a855      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_4->m_currElement;
0068a855      
0068a85b      if (i_1 != 0)
0068a85b      {
0068a864          while (true)
0068a864          {
0068a864              if (i_1->m_data == arg4)
0068a864              {
0068a8ab                  uint32_t m_hashKey = i_1->m_hashKey;
0068a8ad                  uint32_t* __return_3 = __return;
0068a8b1                  *(uint32_t*)__return_3 = m_hashKey;
0068a8b7                  InterlockedIncrement((m_hashKey - 0x10));
0068a8c4                  return __return_3;
0068a864              }
0068a864              
0068a866              i_1 = i_1->m_hashNext;
0068a866              
0068a86b              if (i_1 == 0)
0068a86b              {
0068a881                  class HashTableData<unsigned long,DBOCache *>* i;
0068a881                  
0068a881                  do
0068a881                  {
0068a876                      m_currBucket = &m_currBucket[1];
0068a876                      
0068a87b                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0068a87b                          goto label_68a889;
0068a87b                      
0068a87d                      i = *(uint32_t*)m_currBucket;
0068a881                  } while (i == 0);
0068a881                  
0068a883                  i_1 = i;
0068a883                  
0068a887                  if (i_1 == 0)
0068a887                      break;
0068a86b              }
0068a864          }
0068a85b      }
0068a85b      
0068a889  label_68a889:
0068a889      class PSRefBufferCharData<char>* m_charbuffer_1 = PStringBase<char>::null_string.m_charbuffer;
0068a88f      class PSRefBufferCharData<char>** __return_2 = __return;
0068a899      *(uint32_t*)__return_2 = m_charbuffer_1;
0068a89b      InterlockedIncrement(((char*)m_charbuffer_1 - 0x10));
0068a8a8      return __return_2;
0068a800  }

0068a8c7                       90 90 90 90 90 90 90 90 90                                                         .........

0068a8d0  uint8_t DeviceTypeToString(enum DeviceType arg1, class PStringBase<char>* arg2)

0068a8d0  {
0068a8d8      if ((arg1 - 1) > 3)
0068a8d8      {
0068a925          int32_t eax;
0068a925          eax = 0;
0068a927          return 0;
0068a8d8      }
0068a8d8      
0068a8da      switch (arg1)
0068a8da      {
0068a8ea          case dt_Keyboard:
0068a8ea          {
0068a8ea              PStringBase<char>::set(arg2, "Keyboard");
0068a8ef              int32_t eax_1;
0068a8ef              eax_1 = 1;
0068a8f1              return 1;
0068a8ea              break;
0068a8ea          }
0068a8fb          case dt_Mouse:
0068a8fb          {
0068a8fb              PStringBase<char>::set(arg2, "Mouse");
0068a900              int32_t eax_2;
0068a900              eax_2 = 1;
0068a902              return 1;
0068a8fb              break;
0068a8fb          }
0068a90c          case dt_Joystick:
0068a90c          {
0068a90c              PStringBase<char>::set(arg2, "Joystick");
0068a911              int32_t eax_3;
0068a911              eax_3 = 1;
0068a913              return 1;
0068a90c              break;
0068a90c          }
0068a91d          case dt_Virtual:
0068a91d          {
0068a91d              PStringBase<char>::set(arg2, "Virtual");
0068a922              int32_t eax_4;
0068a922              eax_4 = 1;
0068a924              return 1;
0068a91d              break;
0068a91d          }
0068a8da      }
0068a8d0  }

0068a928  uint32_t jump_table_68a928[0x4] = 
0068a928  {
0068a928      [0x0] =  0x0068a8e1
0068a92c      [0x1] =  0x0068a8f2
0068a930      [0x2] =  0x0068a903
0068a934      [0x3] =  0x0068a914
0068a938  }

0068a938                                                                          90 90 90 90 90 90 90 90                          ........

0068a940  uint8_t ControlActivationTypeToString(uint32_t arg1, class PStringBase<char>* arg2)

0068a940  {
0068a94d      if (((arg1 & 0x7fffffff) - 1) <= 0x7f)
0068a95a          switch ((arg1 & 0x7fffffff))
0068a95a          {
0068a96a              case 1:
0068a96a              {
0068a96a                  PStringBase<char>::set(arg2, "Down");
0068a96f                  int32_t eax_2;
0068a96f                  eax_2 = 1;
0068a971                  return 1;
0068a96a                  break;
0068a96a              }
0068a97b              case 2:
0068a97b              {
0068a97b                  PStringBase<char>::set(arg2, &data_7ff16c);
0068a980                  int32_t eax_3;
0068a980                  eax_3 = 1;
0068a982                  return 1;
0068a97b                  break;
0068a97b              }
0068a98c              case 3:
0068a98c              {
0068a98c                  PStringBase<char>::set(arg2, "Click");
0068a991                  int32_t eax_4;
0068a991                  eax_4 = 1;
0068a993                  return 1;
0068a98c                  break;
0068a98c              }
0068a99d              case 4:
0068a99d              {
0068a99d                  PStringBase<char>::set(arg2, &data_7ff160);
0068a9a2                  int32_t eax_5;
0068a9a2                  eax_5 = 1;
0068a9a4                  return 1;
0068a99d                  break;
0068a99d              }
0068a9ae              case 8:
0068a9ae              {
0068a9ae                  PStringBase<char>::set(arg2, "DblClickDown");
0068a9b3                  int32_t eax_6;
0068a9b3                  eax_6 = 1;
0068a9b5                  return 1;
0068a9ae                  break;
0068a9ae              }
0068a9bf              case 0x10:
0068a9bf              {
0068a9bf                  PStringBase<char>::set(arg2, "DblClickUp");
0068a9c4                  int32_t eax_7;
0068a9c4                  eax_7 = 1;
0068a9c6                  return 1;
0068a9bf                  break;
0068a9bf              }
0068a9d0              case 0x18:
0068a9d0              {
0068a9d0                  PStringBase<char>::set(arg2, "DblClick");
0068a9d5                  int32_t eax_8;
0068a9d5                  eax_8 = 1;
0068a9d7                  return 1;
0068a9d0                  break;
0068a9d0              }
0068a9e1              case 0x20:
0068a9e1              {
0068a9e1                  PStringBase<char>::set(arg2, "NearbyDown");
0068a9e6                  int32_t eax_9;
0068a9e6                  eax_9 = 1;
0068a9e8                  return 1;
0068a9e1                  break;
0068a9e1              }
0068a9f2              case 0x40:
0068a9f2              {
0068a9f2                  PStringBase<char>::set(arg2, "NearbyUp");
0068a9f7                  int32_t eax_10;
0068a9f7                  eax_10 = 1;
0068a9f9                  return 1;
0068a9f2                  break;
0068a9f2              }
0068aa03              case 0x60:
0068aa03              {
0068aa03                  PStringBase<char>::set(arg2, "MouseDblClick");
0068aa08                  int32_t eax_11;
0068aa08                  eax_11 = 1;
0068aa0a                  return 1;
0068aa03                  break;
0068aa03              }
0068aa14              case 0x80:
0068aa14              {
0068aa14                  PStringBase<char>::set(arg2, "Analog");
0068aa19                  int32_t eax_12;
0068aa19                  eax_12 = 1;
0068aa1b                  return 1;
0068aa14                  break;
0068aa14              }
0068a95a          }
0068a95a      
0068aa1c      uint32_t eax_1;
0068aa1c      eax_1 = 0;
0068aa1e      return 0;
0068a940  }

0068aa1f                                                                                               90                                 .
0068aa20  uint32_t jump_table_68aa20[0xc] = 
0068aa20  {
0068aa20      [0x0] =  0x0068a961
0068aa24      [0x1] =  0x0068a972
0068aa28      [0x2] =  0x0068a983
0068aa2c      [0x3] =  0x0068a994
0068aa30      [0x4] =  0x0068a9a5
0068aa34      [0x5] =  0x0068a9b6
0068aa38      [0x6] =  0x0068a9c7
0068aa3c      [0x7] =  0x0068a9d8
0068aa40      [0x8] =  0x0068a9e9
0068aa44      [0x9] =  0x0068a9fa
0068aa48      [0xa] =  0x0068aa0b
0068aa4c      [0xb] =  0x0068aa1c
0068aa50  }
0068aa50  uint8_t lookup_table_68aa50[0x80] = 
0068aa50  {
0068aa50      [0x00] =  0x00
0068aa51      [0x01] =  0x01
0068aa52      [0x02] =  0x02
0068aa53      [0x03] =  0x03
0068aa54      [0x04] =  0x0b
0068aa55      [0x05] =  0x0b
0068aa56      [0x06] =  0x0b
0068aa57      [0x07] =  0x04
0068aa58      [0x08] =  0x0b
0068aa59      [0x09] =  0x0b
0068aa5a      [0x0a] =  0x0b
0068aa5b      [0x0b] =  0x0b
0068aa5c      [0x0c] =  0x0b
0068aa5d      [0x0d] =  0x0b
0068aa5e      [0x0e] =  0x0b
0068aa5f      [0x0f] =  0x05
0068aa60      [0x10] =  0x0b
0068aa61      [0x11] =  0x0b
0068aa62      [0x12] =  0x0b
0068aa63      [0x13] =  0x0b
0068aa64      [0x14] =  0x0b
0068aa65      [0x15] =  0x0b
0068aa66      [0x16] =  0x0b
0068aa67      [0x17] =  0x06
0068aa68      [0x18] =  0x0b
0068aa69      [0x19] =  0x0b
0068aa6a      [0x1a] =  0x0b
0068aa6b      [0x1b] =  0x0b
0068aa6c      [0x1c] =  0x0b
0068aa6d      [0x1d] =  0x0b
0068aa6e      [0x1e] =  0x0b
0068aa6f      [0x1f] =  0x07
0068aa70      [0x20] =  0x0b
0068aa71      [0x21] =  0x0b
0068aa72      [0x22] =  0x0b
0068aa73      [0x23] =  0x0b
0068aa74      [0x24] =  0x0b
0068aa75      [0x25] =  0x0b
0068aa76      [0x26] =  0x0b
0068aa77      [0x27] =  0x0b
0068aa78      [0x28] =  0x0b
0068aa79      [0x29] =  0x0b
0068aa7a      [0x2a] =  0x0b
0068aa7b      [0x2b] =  0x0b
0068aa7c      [0x2c] =  0x0b
0068aa7d      [0x2d] =  0x0b
0068aa7e      [0x2e] =  0x0b
0068aa7f      [0x2f] =  0x0b
0068aa80      [0x30] =  0x0b
0068aa81      [0x31] =  0x0b
0068aa82      [0x32] =  0x0b
0068aa83      [0x33] =  0x0b
0068aa84      [0x34] =  0x0b
0068aa85      [0x35] =  0x0b
0068aa86      [0x36] =  0x0b
0068aa87      [0x37] =  0x0b
0068aa88      [0x38] =  0x0b
0068aa89      [0x39] =  0x0b
0068aa8a      [0x3a] =  0x0b
0068aa8b      [0x3b] =  0x0b
0068aa8c      [0x3c] =  0x0b
0068aa8d      [0x3d] =  0x0b
0068aa8e      [0x3e] =  0x0b
0068aa8f      [0x3f] =  0x08
0068aa90      [0x40] =  0x0b
0068aa91      [0x41] =  0x0b
0068aa92      [0x42] =  0x0b
0068aa93      [0x43] =  0x0b
0068aa94      [0x44] =  0x0b
0068aa95      [0x45] =  0x0b
0068aa96      [0x46] =  0x0b
0068aa97      [0x47] =  0x0b
0068aa98      [0x48] =  0x0b
0068aa99      [0x49] =  0x0b
0068aa9a      [0x4a] =  0x0b
0068aa9b      [0x4b] =  0x0b
0068aa9c      [0x4c] =  0x0b
0068aa9d      [0x4d] =  0x0b
0068aa9e      [0x4e] =  0x0b
0068aa9f      [0x4f] =  0x0b
0068aaa0      [0x50] =  0x0b
0068aaa1      [0x51] =  0x0b
0068aaa2      [0x52] =  0x0b
0068aaa3      [0x53] =  0x0b
0068aaa4      [0x54] =  0x0b
0068aaa5      [0x55] =  0x0b
0068aaa6      [0x56] =  0x0b
0068aaa7      [0x57] =  0x0b
0068aaa8      [0x58] =  0x0b
0068aaa9      [0x59] =  0x0b
0068aaaa      [0x5a] =  0x0b
0068aaab      [0x5b] =  0x0b
0068aaac      [0x5c] =  0x0b
0068aaad      [0x5d] =  0x0b
0068aaae      [0x5e] =  0x0b
0068aaaf      [0x5f] =  0x09
0068aab0      [0x60] =  0x0b
0068aab1      [0x61] =  0x0b
0068aab2      [0x62] =  0x0b
0068aab3      [0x63] =  0x0b
0068aab4      [0x64] =  0x0b
0068aab5      [0x65] =  0x0b
0068aab6      [0x66] =  0x0b
0068aab7      [0x67] =  0x0b
0068aab8      [0x68] =  0x0b
0068aab9      [0x69] =  0x0b
0068aaba      [0x6a] =  0x0b
0068aabb      [0x6b] =  0x0b
0068aabc      [0x6c] =  0x0b
0068aabd      [0x6d] =  0x0b
0068aabe      [0x6e] =  0x0b
0068aabf      [0x6f] =  0x0b
0068aac0      [0x70] =  0x0b
0068aac1      [0x71] =  0x0b
0068aac2      [0x72] =  0x0b
0068aac3      [0x73] =  0x0b
0068aac4      [0x74] =  0x0b
0068aac5      [0x75] =  0x0b
0068aac6      [0x76] =  0x0b
0068aac7      [0x77] =  0x0b
0068aac8      [0x78] =  0x0b
0068aac9      [0x79] =  0x0b
0068aaca      [0x7a] =  0x0b
0068aacb      [0x7b] =  0x0b
0068aacc      [0x7c] =  0x0b
0068aacd      [0x7d] =  0x0b
0068aace      [0x7e] =  0x0b
0068aacf      [0x7f] =  0x0a
0068aad0  }

0068aad0  uint8_t SubControlIndexToString(enum SubControlIndex arg1, class PStringBase<char>* arg2)

0068aad0  {
0068aad7      if (arg1 > sci_POVLeft)
0068aad7      {
0068ab57          enum SubControlIndex eax_7;
0068ab57          eax_7 = 0;
0068ab59          return 0;
0068aad7      }
0068aad7      
0068aad7      switch (arg1)
0068aad7      {
0068aae9          case sci_None:
0068aae9          {
0068aae9              PStringBase<char>::set(arg2, "None");
0068aaee              int32_t eax;
0068aaee              eax = 1;
0068aaf0              return 1;
0068aae9              break;
0068aae9          }
0068aafa          case sci_PositiveAxis:
0068aafa          {
0068aafa              PStringBase<char>::set(arg2, "AxisPositive");
0068aaff              int32_t eax_1;
0068aaff              eax_1 = 1;
0068ab01              return 1;
0068aafa              break;
0068aafa          }
0068ab0b          case sci_NegativeAxis:
0068ab0b          {
0068ab0b              PStringBase<char>::set(arg2, "AxisNegative");
0068ab10              int32_t eax_2;
0068ab10              eax_2 = 1;
0068ab12              return 1;
0068ab0b              break;
0068ab0b          }
0068ab1c          case sci_POVUp:
0068ab1c          {
0068ab1c              PStringBase<char>::set(arg2, "POVUp");
0068ab21              int32_t eax_3;
0068ab21              eax_3 = 1;
0068ab23              return 1;
0068ab1c              break;
0068ab1c          }
0068ab2d          case sci_POVRight:
0068ab2d          {
0068ab2d              PStringBase<char>::set(arg2, "POVRight");
0068ab32              int32_t eax_4;
0068ab32              eax_4 = 1;
0068ab34              return 1;
0068ab2d              break;
0068ab2d          }
0068ab3e          case sci_POVDown:
0068ab3e          {
0068ab3e              PStringBase<char>::set(arg2, "POVDown");
0068ab43              int32_t eax_5;
0068ab43              eax_5 = 1;
0068ab45              return 1;
0068ab3e              break;
0068ab3e          }
0068ab4f          case sci_POVLeft:
0068ab4f          {
0068ab4f              PStringBase<char>::set(arg2, "POVLeft");
0068ab54              int32_t eax_6;
0068ab54              eax_6 = 1;
0068ab56              return 1;
0068ab4f              break;
0068ab4f          }
0068aad7      }
0068aad0  }

0068ab5a                                                                                8b ff                                        ..
0068ab5c  uint32_t jump_table_68ab5c[0x7] = 
0068ab5c  {
0068ab5c      [0x0] =  0x0068aae0
0068ab60      [0x1] =  0x0068aaf1
0068ab64      [0x2] =  0x0068ab02
0068ab68      [0x3] =  0x0068ab13
0068ab6c      [0x4] =  0x0068ab24
0068ab70      [0x5] =  0x0068ab35
0068ab74      [0x6] =  0x0068ab46
0068ab78  }

0068ab78                                                                          90 90 90 90 90 90 90 90                          ........

0068ab80  uint8_t __thiscall ControlSpecification::ToFileNode(class ControlSpecification const* this, class PFileNode* arg2, enum DeviceType arg3)

0068ab80  {
0068ab92      PFileNode::MakeSubNodeAsUInt32(arg2, ((uint32_t)((int8_t)this->__inner0)));
0068abab      ControlNameMapper::GetNameBySemantic(&g_ControlNameMapper, &arg3, arg3, ((uint32_t)*(uint16_t*)((char*)this->__inner0 + 2)));
0068abb0      enum DeviceType edi = arg3;
0068abc0      int32_t var_14_3 = InterlockedIncrement((edi - 0x10));
0068abc6      InterlockedIncrement((edi - 0x10));
0068abcc      PFileNode::MakeSubNodeAsPString(arg2, edi);
0068abcc      
0068abe6      if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0068abee          **(uint32_t**)(edi - 0x14)(1);
0068abee      
0068abf0      int32_t eax_2;
0068abf0      eax_2 = *(uint8_t*)((char*)this->__inner0 + 1);
0068abf0      
0068abf5      if (eax_2 != 0)
0068abf5      {
0068abf7          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068abfc          arg3 = PStringBase<char>::s_NullBuffer_1;
0068ac04          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0068ac10          uint8_t eax_4;
0068ac10          int32_t ecx_7;
0068ac10          eax_4 = SubControlIndexToString(((uint32_t)*(uint8_t*)((char*)this->__inner0 + 1)), &arg3);
0068ac10          
0068ac1a          if (eax_4 == 0)
0068ac1a          {
0068ac78              int32_t* esi_4 = (arg3 - 0x14);
0068ac78              
0068ac87              if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0068ac8f                  **(uint32_t**)esi_4(1);
0068ac8f              
0068ac9d              if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0068aca5                  **(uint32_t**)(edi - 0x14)(1);
0068aca5              
0068acaa              int32_t eax_13;
0068acaa              eax_13 = 0;
0068acad              return 0;
0068ac1a          }
0068ac1a          
0068ac1c          enum DeviceType edx_2 = arg3;
0068ac20          int32_t var_14_8 = ecx_7;
0068ac2d          InterlockedIncrement((arg3 - 0x10));
0068ac33          PFileNode::MakeSubNode(arg2, edx_2);
0068ac3c          int32_t* esi_2 = (arg3 - 0x14);
0068ac3c          
0068ac4b          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0068ac53              **(uint32_t**)esi_2(1);
0068abf5      }
0068abf5      
0068ac61      if ((InterlockedDecrement((edi - 0x10)) == 0 && edi != 0x14))
0068ac69          **(uint32_t**)(edi - 0x14)(1);
0068ac69      
0068ac6b      int32_t eax_9;
0068ac6b      eax_9 = 1;
0068ac71      return 1;
0068ab80  }


0068acb0  class PStringBase<char>* __thiscall ControlSpecification::GetDIKName(class ControlSpecification const* this, class PStringBase<char>* __return)

0068acb0  {
0068acb3      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0068acb3      
0068acbb      if (ICIDM::s_cidm_1 != 0)
0068acbb      {
0068acdc          class ICIDM* ICIDM::s_cidm_2 = ICIDM::s_cidm_1;
0068acf6          ControlNameMapper::GetNameBySemantic(&g_ControlNameMapper, __return, ICIDM::s_cidm_1->vtable->GetDeviceTypeFromKey(this->__inner0), ((uint32_t)*(uint16_t*)((char*)this->__inner0 + 2)));
0068acfe          return __return;
0068acbb      }
0068acbb      
0068acbd      class PSRefBufferCharData<char>* m_charbuffer = PStringBase<char>::null_string.m_charbuffer;
0068acc2      class PSRefBufferCharData<char>** __return_1 = __return;
0068accc      *(uint32_t*)__return_1 = m_charbuffer;
0068acce      InterlockedIncrement(((char*)m_charbuffer - 0x10));
0068acd7      return __return_1;
0068acb0  }

0068ad01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0068ad10  uint8_t __thiscall HashTable<PStringBase<char>,unsigned long,0>::find(class HashTable<PStringBase<char>,unsigned long,0> const* this, class PStringBase<char> const* arg2, uint32_t* arg3)

0068ad10  {
0068ad20      void __return;
0068ad20      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&this->m_intrusiveTable.vtable, &__return, arg2);
0068ad2b      void* var_4;
0068ad2b      
0068ad2b      if (var_4 == 0)
0068ad2b      {
0068ad3e          void* eax;
0068ad3e          eax = 0;
0068ad43          return 0;
0068ad2b      }
0068ad2b      
0068ad34      *(uint32_t*)arg3 = *(uint32_t*)((char*)var_4 + 8);
0068ad36      uint32_t eax_1;
0068ad36      eax_1 = 1;
0068ad3b      return 1;
0068ad10  }

0068ad46                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0068ad50  uint32_t __thiscall ControlNameMapper::GetSemanticByName(class ControlNameMapper* this, class PStringBase<char> const* arg2)

0068ad50  {
0068ad64      int32_t result = 0xffffffff;
0068ad6c      void __return;
0068ad6c      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&this->m_hashKeyboardSemantics.m_intrusiveTable, &__return, arg2);
0068ad71      void* var_4;
0068ad71      void* eax = var_4;
0068ad71      
0068ad77      if (eax == 0)
0068ad77      {
0068ad82          IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&this->m_hashMouseSemantics.m_intrusiveTable.vtable, &__return, arg2);
0068ad87          eax = var_4;
0068ad87          
0068ad8d          if (eax == 0)
0068ad8d          {
0068ad9b              IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&this->m_hashJoystickSemantics.m_intrusiveTable.vtable, &__return, arg2);
0068ada0              eax = var_4;
0068ada0              
0068ada6              if (eax == 0)
0068ada6              {
0068adbf                  HashTable<PStringBase<char>,unsigned long,0>::find(&this->m_hashVirtualSemantics, arg2, &result);
0068adcd                  return result;
0068ada6              }
0068ad8d          }
0068ad77      }
0068ad77      
0068adb0      return *(uint32_t*)((char*)eax + 8);
0068ad50  }


0068add0  void __thiscall IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>(class IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>* this, uint32_t arg2)

0068add0  {
0068addb      arg2 = arg2;
0068addf      uint8_t edx = ((int8_t)arg2);
0068ade3      this->m_buckets = nullptr;
0068ade6      this->m_firstInterestingBucket = nullptr;
0068ade9      this->m_numBuckets = 0;
0068adec      this->m_numElements = 0;
0068adf0      this->vtable = 0x7ff098;
0068adf6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068ae09      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0068ae09      
0068ae13      if (eax == bucketSizesEnd_1)
0068ae15          eax -= 4;
0068ae15      
0068ae18      uint32_t eax_1 = *(uint32_t*)eax;
0068ae1d      this->m_numBuckets = eax_1;
0068ae1d      
0068ae20      if (eax_1 > 0x17)
0068ae36          this->m_buckets = operator new[]((eax_1 << 2));
0068ae20      else
0068ae25          this->m_buckets = &this->m_aInplaceBuckets;
0068ae25      
0068ae3c      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_buckets;
0068ae3f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0068ae45      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0068ae56      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0068add0  }

0068ae5f                                                                                               90                                 .

0068ae60  uint8_t StringToControlActivationType(class PStringBase<char> const* arg1, uint32_t* arg2)

0068ae60  {
0068ae79      *(uint32_t*)arg2 = 0;
0068ae7b      struct List<PStringBase<char> >::VTable* const var_10 = &List<class PStringBase<char> >::`vftable';
0068ae83      int32_t var_c = 0;
0068ae87      int32_t var_8 = 0;
0068ae8b      int32_t var_4 = 0;
0068ae8f      PSUtils::explode(arg1, 0x2f, &var_10);
0068ae94      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068ae99      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0068aea4      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0068aea4      
0068aeba      if (List<PStringBase<char> >::pop_front(&var_10, &PStringBase<char>::s_NullBuffer_2) != 0)
0068aeba      {
0068b225          uint8_t i;
0068b225          
0068b225          do
0068b225          {
0068aec6              char const* const eax_3 = "Down";
0068aed5              char const j;
0068aed5              
0068aed5              do
0068aed5              {
0068aed0                  j = *(uint8_t*)eax_3;
0068aed2                  eax_3 = &eax_3[1];
0068aed5              } while (j != 0);
0068aede              class PStringBase<char> var_3c;
0068aede              PStringBase<char>::allocate_ref_buffer(&var_3c, (eax_3 - "own"));
0068aee3              class PStringBase<char> edx_1 = var_3c;
0068aee7              char const* const ecx_2 = "Down";
0068aef8              uint8_t j_1;
0068aef8              
0068aef8              do
0068aef8              {
0068aef0                  j_1 = *(uint8_t*)ecx_2;
0068aef2                  ecx_2 = &ecx_2[1];
0068aef3                  *(uint8_t*)edx_1 = j_1;
0068aef5                  edx_1 += 1;
0068aef8              } while (j_1 != 0);
0068aefe              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0068af04              int32_t eax_5 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_3c);
0068af0f              char ebx_2 = ((int8_t)-(eax_5));
0068af13              int32_t* ebp_2 = (var_3c - 0x14);
0068af13              
0068af28              if ((InterlockedDecrement(&ebp_2[1]) == 0 && ebp_2 != 0))
0068af31                  **(uint32_t**)ebp_2(1);
0068af31              
0068af35              uint32_t* eax_8;
0068af35              uint32_t ecx_6;
0068af35              
0068af35              if ((ebx_2 - ebx_2) == 0xff)
0068af35              {
0068af4e                  void* var_38;
0068af4e                  PStringBase<char>::PStringBase<char>(&var_38, &data_7ff16c);
0068af59                  int32_t eax_9 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_38);
0068af64                  char ebx_4 = ((int8_t)-(eax_9));
0068af68                  int32_t* ebp_4 = ((char*)var_38 - 0x14);
0068af68                  
0068af7d                  if ((InterlockedDecrement(&ebp_4[1]) == 0 && ebp_4 != 0))
0068af86                      **(uint32_t**)ebp_4(1);
0068af86                  
0068af8a                  if ((ebx_4 - ebx_4) == 0xff)
0068af8a                  {
0068afa3                      void* var_34;
0068afa3                      PStringBase<char>::PStringBase<char>(&var_34, "Click");
0068afae                      int32_t eax_12 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_34);
0068afb9                      char ebx_6 = ((int8_t)-(eax_12));
0068afbd                      int32_t* ebp_6 = ((char*)var_34 - 0x14);
0068afbd                      
0068afd2                      if ((InterlockedDecrement(&ebp_6[1]) == 0 && ebp_6 != 0))
0068afdb                          **(uint32_t**)ebp_6(1);
0068afdb                      
0068afdf                      if ((ebx_6 - ebx_6) == 0xff)
0068afdf                      {
0068aff8                          void* var_30;
0068aff8                          PStringBase<char>::PStringBase<char>(&var_30, &data_7ff160);
0068b003                          int32_t eax_15 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_30);
0068b00e                          char ebx_8 = ((int8_t)-(eax_15));
0068b012                          int32_t* ebp_8 = ((char*)var_30 - 0x14);
0068b012                          
0068b027                          if ((InterlockedDecrement(&ebp_8[1]) == 0 && ebp_8 != 0))
0068b030                              **(uint32_t**)ebp_8(1);
0068b030                          
0068b034                          if ((ebx_8 - ebx_8) == 0xff)
0068b034                          {
0068b04d                              void* var_2c;
0068b04d                              PStringBase<char>::PStringBase<char>(&var_2c, "DblClickDown");
0068b058                              int32_t eax_18 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_2c);
0068b063                              char ebx_10 = ((int8_t)-(eax_18));
0068b067                              int32_t* ebp_10 = ((char*)var_2c - 0x14);
0068b067                              
0068b07c                              if ((InterlockedDecrement(&ebp_10[1]) == 0 && ebp_10 != 0))
0068b085                                  **(uint32_t**)ebp_10(1);
0068b085                              
0068b089                              if ((ebx_10 - ebx_10) == 0xff)
0068b089                              {
0068b0a2                                  void* var_28;
0068b0a2                                  PStringBase<char>::PStringBase<char>(&var_28, "DblClickUp");
0068b0ad                                  int32_t eax_21 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_28);
0068b0b8                                  char ebx_12 = ((int8_t)-(eax_21));
0068b0bc                                  int32_t* ebp_12 = ((char*)var_28 - 0x14);
0068b0bc                                  
0068b0d1                                  if ((InterlockedDecrement(&ebp_12[1]) == 0 && ebp_12 != 0))
0068b0da                                      **(uint32_t**)ebp_12(1);
0068b0da                                  
0068b0de                                  if ((ebx_12 - ebx_12) == 0xff)
0068b0de                                  {
0068b0f7                                      void* var_24;
0068b0f7                                      PStringBase<char>::PStringBase<char>(&var_24, "DblClick");
0068b102                                      int32_t eax_24 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_24);
0068b10d                                      char ebx_14 = ((int8_t)-(eax_24));
0068b111                                      int32_t* ebp_14 = ((char*)var_24 - 0x14);
0068b111                                      
0068b126                                      if ((InterlockedDecrement(&ebp_14[1]) == 0 && ebp_14 != 0))
0068b12f                                          **(uint32_t**)ebp_14(1);
0068b12f                                      
0068b133                                      if ((ebx_14 - ebx_14) == 0xff)
0068b133                                      {
0068b14c                                          int32_t var_20;
0068b14c                                          PStringBase<char>::PStringBase<char>(&var_20, "NearbyDown");
0068b157                                          int32_t eax_27 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_20);
0068b162                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_20);
0068b162                                          
0068b169                                          if (eax_27 != 0)
0068b169                                          {
0068b182                                              int32_t var_1c;
0068b182                                              PStringBase<char>::PStringBase<char>(&var_1c, "NearbyUp");
0068b18d                                              int32_t eax_28 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_1c);
0068b198                                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_1c);
0068b198                                              
0068b19f                                              if (eax_28 != 0)
0068b19f                                              {
0068b1b5                                                  int32_t var_18;
0068b1b5                                                  PStringBase<char>::PStringBase<char>(&var_18, "MouseDblClick");
0068b1c0                                                  int32_t eax_30 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_18);
0068b1cb                                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_18);
0068b1cb                                                  
0068b1d2                                                  if (eax_30 != 0)
0068b1d2                                                  {
0068b1e8                                                      int32_t var_14;
0068b1e8                                                      PStringBase<char>::PStringBase<char>(&var_14, "Analog");
0068b1f3                                                      int32_t eax_31 = _stricmp(PStringBase<char>::s_NullBuffer_3, var_14);
0068b1fe                                                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_14);
0068b1fe                                                      
0068b205                                                      if (eax_31 != 0)
0068b205                                                      {
0068b27c                                                          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_3[-1]) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
0068b284                                                              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x14)(1);
0068b284                                                          
0068b28a                                                          var_10 = &List<class PStringBase<char> >::`vftable';
0068b292                                                          List<PStringBase<char> >::flush(&var_10);
0068b29a                                                          int32_t eax_37;
0068b29a                                                          eax_37 = 0;
0068b2a0                                                          return 0;
0068b205                                                      }
0068b205                                                      
0068b207                                                      eax_8 = arg2;
0068b20d                                                      ecx_6 = (*(uint32_t*)eax_8 | 0x80);
0068b1d2                                                  }
0068b1d2                                                  else
0068b1d2                                                  {
0068b1d4                                                      eax_8 = arg2;
0068b1da                                                      ecx_6 = (*(uint32_t*)eax_8 | 0x60);
0068b1d2                                                  }
0068b19f                                              }
0068b19f                                              else
0068b19f                                              {
0068b1a1                                                  eax_8 = arg2;
0068b1a7                                                  ecx_6 = (*(uint32_t*)eax_8 | 0x40);
0068b19f                                              }
0068b169                                          }
0068b169                                          else
0068b169                                          {
0068b16b                                              eax_8 = arg2;
0068b171                                              ecx_6 = (*(uint32_t*)eax_8 | 0x20);
0068b169                                          }
0068b133                                      }
0068b133                                      else
0068b133                                      {
0068b135                                          eax_8 = arg2;
0068b13b                                          ecx_6 = (*(uint32_t*)eax_8 | 0x18);
0068b133                                      }
0068b0de                                  }
0068b0de                                  else
0068b0de                                  {
0068b0e0                                      eax_8 = arg2;
0068b0e6                                      ecx_6 = (*(uint32_t*)eax_8 | 0x10);
0068b0de                                  }
0068b089                              }
0068b089                              else
0068b089                              {
0068b08b                                  eax_8 = arg2;
0068b091                                  ecx_6 = (*(uint32_t*)eax_8 | 8);
0068b089                              }
0068b034                          }
0068b034                          else
0068b034                          {
0068b036                              eax_8 = arg2;
0068b03c                              ecx_6 = (*(uint32_t*)eax_8 | 4);
0068b034                          }
0068afdf                      }
0068afdf                      else
0068afdf                      {
0068afe1                          eax_8 = arg2;
0068afe7                          ecx_6 = (*(uint32_t*)eax_8 | 3);
0068afdf                      }
0068af8a                  }
0068af8a                  else
0068af8a                  {
0068af8c                      eax_8 = arg2;
0068af92                      ecx_6 = (*(uint32_t*)eax_8 | 2);
0068af8a                  }
0068af35              }
0068af35              else
0068af35              {
0068af37                  eax_8 = arg2;
0068af3d                  ecx_6 = (*(uint32_t*)eax_8 | 1);
0068af35              }
0068af35              
0068b217              *(uint32_t*)eax_8 = ecx_6;
0068b21e              i = List<PStringBase<char> >::pop_front(&var_10, &PStringBase<char>::s_NullBuffer_2);
0068b225          } while (i != 0);
0068aeba      }
0068aeba      
0068b231      void* __offset(PSRefBufferCharData<char>, -0x14) esi_2 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0068b231      
0068b244      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0068b24c          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
0068b24c      
0068b252      var_10 = &List<class PStringBase<char> >::`vftable';
0068b25a      List<PStringBase<char> >::flush(&var_10);
0068b262      int32_t eax_34;
0068b262      eax_34 = 1;
0068b268      return 1;
0068ae60  }

0068b2a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0068b2b0  uint8_t __thiscall ControlSpecification::FromFileNode(class ControlSpecification* this, class PFileNode const* arg2)

0068b2b0  {
0068b2b6      class PFileNode* esi = arg2;
0068b2b6      
0068b2bf      if (esi != 0)
0068b2bf      {
0068b2c7          uint32_t eax_1 = PFileNode::GetNumSubNodes(esi);
0068b2d8          class PFileNode* var_24;
0068b2d8          
0068b2d8          if ((eax_1 < 2 || eax_1 > 3))
0068b2d8          {
0068b498              uint32_t var_20_16 = eax_1;
0068b499              var_24 = esi;
0068b4a1              PStringBase<char>::PStringBase<char>(&var_24, "ERROR - Must have 2 or 3 sub nod…");
0068b4a7              PFileNode::ReportError(esi, var_24);
0068b2d8          }
0068b2d8          else
0068b2d8          {
0068b2e4              class PFileNode* eax_3 = esi->vtable->GetSubNode(0);
0068b2ed              int32_t var_8;
0068b2ed              int32_t* var_20_2 = &var_8;
0068b2f0              var_8 = 0xffffffff;
0068b2f0              
0068b30d              if ((PFileNode::GetNameAsUInt32(eax_3, var_20_2) != 0 && var_8 < 0x100))
0068b30d              {
0068b319                  class PFileNode* eax_5 = esi->vtable->GetSubNode(1);
0068b322                  PStringBase<char>::PStringBase<char>(&arg2);
0068b32e                  PFileNode::GetNameAsPString(eax_5, &arg2);
0068b33d                  uint32_t eax_6 = ControlNameMapper::GetSemanticByName(&g_ControlNameMapper, &arg2);
0068b33d                  
0068b355                  if ((eax_6 == 0xffffffff || ((int16_t)(eax_6 >> 0x10)) != 0))
0068b355                  {
0068b405                      class PFileNode* ecx_15 = arg2;
0068b409                      class PFileNode* var_20_10 = ecx_15;
0068b40a                      var_24 = ecx_15;
0068b412                      PStringBase<char>::PStringBase<char>(&var_24, "ERROR - invalid device constant …");
0068b418                      PFileNode::ReportError(eax_5, var_24);
0068b424                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0068b429                      int32_t eax_12;
0068b429                      eax_12 = 0;
0068b432                      return 0;
0068b355                  }
0068b355                  
0068b35b                  struct PFileNode::VTable* vtable = esi->vtable;
0068b35d                  int32_t var_20_6 = 2;
0068b361                  int32_t var_4 = 0;
0068b369                  class PFileNode* eax_7 = vtable->GetSubNode(var_20_6);
0068b369                  
0068b370                  if (eax_7 != 0)
0068b370                  {
0068b376                      class PFileNode* var_c;
0068b376                      PStringBase<char>::PStringBase<char>(&var_c);
0068b382                      class PStringBase<char>* eax_8;
0068b382                      enum SubControlIndex* edx_4;
0068b382                      eax_8 = PFileNode::GetNameAsPString(eax_7, &var_c);
0068b38b                      int32_t* var_20_8 = &var_4;
0068b390                      var_24 = &var_c;
0068b390                      
0068b39b                      if (StringToSubControlIndex(eax_8, edx_4) == 0)
0068b39b                      {
0068b39d                          class PFileNode* ecx_9 = var_c;
0068b3a1                          class PFileNode* var_20_9 = ecx_9;
0068b3a2                          var_24 = ecx_9;
0068b3aa                          PStringBase<char>::PStringBase<char>(&var_24, "ERROR - invalid sub control inde…");
0068b3b0                          PFileNode::ReportError(eax_7, var_24);
0068b3bc                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0068b3c5                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0068b3ca                          int32_t eax_10;
0068b3ca                          eax_10 = 0;
0068b3d3                          return 0;
0068b39b                      }
0068b39b                      
0068b3da                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0068b370                  }
0068b370                  
0068b3e3                  eax_7 = var_4;
0068b3e7                  *(uint8_t*)((char*)this->__inner0 + 0) = var_8;
0068b3e9                  *(uint8_t*)((char*)this->__inner0 + 1) = eax_7;
0068b3f0                  *(uint16_t*)((char*)this->__inner0 + 2) = eax_6;
0068b3f4                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0068b3f9                  int32_t eax_11;
0068b3f9                  eax_11 = 1;
0068b402                  return 1;
0068b30d              }
0068b30d              
0068b435              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068b43a              arg2 = PStringBase<char>::s_NullBuffer_1;
0068b442              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0068b44f              class PFileNode* ecx_19 = PFileNode::GetNameAsPString(eax_3, &arg2);
0068b454              class PFileNode* esi_2 = arg2;
0068b458              class PFileNode* var_20_13 = esi_2;
0068b459              var_24 = ecx_19;
0068b461              PStringBase<char>::PStringBase<char>(&var_24, "ERROR - invalid device index "%s…");
0068b467              PFileNode::ReportError(eax_3, var_24);
0068b467              
0068b482              if ((InterlockedDecrement(&esi_2[0]) == 0 && esi_2 != 0x14))
0068b482              {
0068b48a                  *(uint32_t*)*(int32_t*)((char*)esi_2 + -0x14)(1);
0068b48c                  int32_t eax_15;
0068b48c                  eax_15 = 0;
0068b495                  return 0;
0068b482              }
0068b2d8          }
0068b2bf      }
0068b2bf      
0068b4b2      int32_t eax;
0068b4b2      eax = 0;
0068b4b8      return 0;
0068b2b0  }

0068b4bb                                                                                   90 90 90 90 90                             .....

0068b4c0  void __fastcall IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(class IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>* this)

0068b4c0  {
0068b4c8      while (this->m_numElements != 0)
0068b4c8      {
0068b4dd          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0068b4e3          int32_t* m_firstInterestingBucket_2;
0068b4e3          int32_t* ebx_1;
0068b4e3          
0068b4e3          if (this->m_firstInterestingBucket == ecx_1)
0068b4e3          {
0068b4f7          label_68b4f7:
0068b4f7              m_firstInterestingBucket_2 = nullptr;
0068b4f9              ebx_1 = nullptr;
0068b4e3          }
0068b4e3          else
0068b4e3          {
0068b4e5              while (true)
0068b4e5              {
0068b4e5                  class HashSetData<PStringBase<char> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0068b4e5                  
0068b4eb                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0068b4eb                  {
0068b4fd                      int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0068b500                      ebx_1 = *(uint32_t*)m_firstInterestingBucket_1;
0068b502                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0068b502                      break;
0068b4eb                  }
0068b4eb                  
0068b4f2                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0068b4f2                  
0068b4f5                  if (&m_firstInterestingBucket[1] == ecx_1)
0068b4f5                      goto label_68b4f7;
0068b4e5              }
0068b4e3          }
0068b4e3          
0068b504          void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0068b504          
0068b508          if (eax_3 == ebx_1)
0068b520              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0068b508          else
0068b508          {
0068b517              void* ecx_2;
0068b517              
0068b517              do
0068b517              {
0068b510                  ecx_2 = eax_3;
0068b512                  eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0068b517              } while (eax_3 != ebx_1);
0068b517              
0068b51b              if (ecx_2 != 0)
0068b527                  *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
0068b51b              else
0068b520                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0068b508          }
0068b508          
0068b530          this->m_numElements -= 1;
0068b530          
0068b533          if (ebx_1 != 0)
0068b533          {
0068b537              int32_t* edi_2 = (*(uint32_t*)ebx_1 - 0x14);
0068b537              
0068b546              if ((InterlockedDecrement(&edi_2[1]) == 0 && edi_2 != 0))
0068b54e                  **(uint32_t**)edi_2(1);
0068b54e              
0068b551              operator delete(ebx_1);
0068b533          }
0068b4c8      }
0068b4c0  }

0068b569                             90 90 90 90 90 90 90                                                           .......

0068b570  uint8_t __thiscall HashTable<PStringBase<char>,unsigned long,0>::add(class HashTable<PStringBase<char>,unsigned long,0>* this, class PStringBase<char> const* arg2, uint32_t const* arg3)

0068b570  {
0068b57e      void* esi = operator new(0xc);
0068b57e      
0068b585      if (esi == 0)
0068b5ab          esi = nullptr;
0068b585      else
0068b585      {
0068b58b          class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
0068b58d          *(uint32_t*)esi = m_charbuffer;
0068b593          InterlockedIncrement(&m_charbuffer[-1]);
0068b59d          *(uint32_t*)((char*)esi + 4) = 0;
0068b5a6          *(uint32_t*)((char*)esi + 8) = *(uint32_t*)arg3;
0068b585      }
0068b585      
0068b5b8      void __return;
0068b5b8      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::find_internal(&this->m_intrusiveTable.vtable, &__return, esi);
0068b5c3      int32_t var_4;
0068b5c3      
0068b5c3      if (var_4 == 0)
0068b5c3      {
0068b5c8          IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>::add_internal(&this->m_intrusiveTable, esi);
0068b5ce          int32_t eax_4;
0068b5ce          eax_4 = 1;
0068b5d4          return 1;
0068b5c3      }
0068b5c3      
0068b5d9      if (esi != 0)
0068b5d9      {
0068b5dd          int32_t* edi_3 = (*(uint32_t*)esi - 0x14);
0068b5dd          
0068b5f0          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
0068b5f8              **(uint32_t**)edi_3(1);
0068b5f8          
0068b5fb          operator delete(esi);
0068b5d9      }
0068b5d9      
0068b604      int32_t eax_3;
0068b604      eax_3 = 0;
0068b60a      return 0;
0068b570  }

0068b60d                                         90 90 90                                                               ...

0068b610  void __thiscall ControlNameMapper::AddKeySemantic(class ControlNameMapper const* this, char const* arg2, uint32_t arg3)

0068b610  {
0068b61c      PStringBase<char>::PStringBase<char>(&arg2, arg2);
0068b621      char const* ecx_1 = arg2;
0068b625      int32_t eax = *(uint32_t*)(ecx_1 - 4);
0068b62b      void* eax_1 = &ecx_1[(eax - 1)];
0068b62b      
0068b62f      if (eax > 2)
0068b631          eax_1 = &ecx_1[2];
0068b631      
0068b646      class HashTable<PStringBase<char>,unsigned long,0>* this_1;
0068b646      
0068b646      switch ((((int32_t)*(uint8_t*)eax_1) - 0x4a))
0068b646      {
0068b668          case nullptr:
0068b668          {
0068b682              HashTable<PStringBase<char>,unsigned long,0>::add(&this->m_hashJoystickSemantics, &arg2, &arg3);
0068b668              break;
0068b668          }
0068b64d          case 1:
0068b64d          {
0068b64d              this_1 = this;
0068b680          label_68b680:
0068b682              HashTable<PStringBase<char>,unsigned long,0>::add(this_1, &arg2, &arg3);
0068b64d              break;
0068b64d          }
0068b655          case 3:
0068b655          {
0068b682              HashTable<PStringBase<char>,unsigned long,0>::add(&this->m_hashMouseSemantics, &arg2, &arg3);
0068b655              break;
0068b655          }
0068b672          case 0xc:
0068b672          {
0068b672              this_1 = &this->m_hashVirtualSemantics;
0068b672              goto label_68b680;
0068b672          }
0068b646      }
0068b646      
0068b68b      void* esi_2 = &arg2[0xffffffec];
0068b68b      
0068b69e      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
0068b6a6          **(uint32_t**)esi_2(1);
0068b610  }

0068b6ac  uint32_t jump_table_68b6ac[0x5] = 
0068b6ac  {
0068b6ac      [0x0] =  0x0068b660
0068b6b0      [0x1] =  0x0068b64d
0068b6b4      [0x2] =  0x0068b651
0068b6b8      [0x3] =  0x0068b672
0068b6bc      [0x4] =  0x0068b687
0068b6c0  }
0068b6c0  uint8_t lookup_table_68b6c0[0xd] = 
0068b6c0  {
0068b6c0      [0x0] =  0x00
0068b6c1      [0x1] =  0x01
0068b6c2      [0x2] =  0x04
0068b6c3      [0x3] =  0x02
0068b6c4      [0x4] =  0x04
0068b6c5      [0x5] =  0x04
0068b6c6      [0x6] =  0x04
0068b6c7      [0x7] =  0x04
0068b6c8      [0x8] =  0x04
0068b6c9      [0x9] =  0x04
0068b6ca      [0xa] =  0x04
0068b6cb      [0xb] =  0x04
0068b6cc      [0xc] =  0x03
0068b6cd  }

0068b6cd                                         90 90 90                                                               ...

0068b6d0  void* __thiscall HashTable<PStringBase<char>,unsigned long,0>::`scalar deleting destructor'(class HashTable<PStringBase<char>,unsigned long,0>* this, uint32_t arg2)

0068b6d0  {
0068b6d9      this->vtable = 0x7ff228;
0068b6df      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_intrusiveTable);
0068b6e4      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_intrusiveTable.m_buckets;
0068b6d4      this->m_intrusiveTable.vtable = 0x7ff098;
0068b6d4      
0068b6f2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0068b6f5          operator delete[](m_buckets);
0068b6f5      
0068b6d4      this->m_intrusiveTable.m_buckets = nullptr;
0068b6d4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0068b6d4      this->m_intrusiveTable.m_numBuckets = 0;
0068b6d4      this->m_intrusiveTable.m_numElements = 0;
0068b6d4      
0068b710      if ((arg2 & 1) != 0)
0068b713          operator delete(this);
0068b713      
0068b71f      return this;
0068b6d0  }

0068b722        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0068b730  void __fastcall ControlNameMapper::~ControlNameMapper(class ControlNameMapper* this)

0068b730  {
0068b73d      this->m_hashVirtualSemantics.vtable = 0x7ff228;
0068b747      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_hashVirtualSemantics.m_intrusiveTable);
0068b74c      class HashTableData<PStringBase<char>,unsigned long>** m_buckets = this->m_hashVirtualSemantics.m_intrusiveTable.m_buckets;
0068b735      this->m_hashVirtualSemantics.m_intrusiveTable.vtable = 0x7ff098;
0068b735      
0068b75a      if (m_buckets != &this->m_hashVirtualSemantics.m_intrusiveTable.m_aInplaceBuckets)
0068b75d          operator delete[](m_buckets);
0068b75d      
0068b735      this->m_hashVirtualSemantics.m_intrusiveTable.m_buckets = nullptr;
0068b735      this->m_hashVirtualSemantics.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0068b735      this->m_hashVirtualSemantics.m_intrusiveTable.m_numBuckets = 0;
0068b735      this->m_hashVirtualSemantics.m_intrusiveTable.m_numElements = 0;
0068b77b      this->m_hashJoystickSemantics.vtable = 0x7ff228;
0068b785      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_hashJoystickSemantics.m_intrusiveTable);
0068b78a      class HashTableData<PStringBase<char>,unsigned long>** m_buckets_1 = this->m_hashJoystickSemantics.m_intrusiveTable.m_buckets;
0068b773      this->m_hashJoystickSemantics.m_intrusiveTable.vtable = 0x7ff098;
0068b773      
0068b798      if (m_buckets_1 != &this->m_hashJoystickSemantics.m_intrusiveTable.m_aInplaceBuckets)
0068b79b          operator delete[](m_buckets_1);
0068b79b      
0068b773      this->m_hashJoystickSemantics.m_intrusiveTable.m_buckets = nullptr;
0068b773      this->m_hashJoystickSemantics.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0068b773      this->m_hashJoystickSemantics.m_intrusiveTable.m_numBuckets = 0;
0068b773      this->m_hashJoystickSemantics.m_intrusiveTable.m_numElements = 0;
0068b7b4      this->m_hashMouseSemantics.vtable = 0x7ff228;
0068b7bb      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_hashMouseSemantics.m_intrusiveTable);
0068b7c0      class HashTableData<PStringBase<char>,unsigned long>** m_buckets_2 = this->m_hashMouseSemantics.m_intrusiveTable.m_buckets;
0068b7af      this->m_hashMouseSemantics.m_intrusiveTable.vtable = 0x7ff098;
0068b7af      
0068b7ce      if (m_buckets_2 != &this->m_hashMouseSemantics.m_intrusiveTable.m_aInplaceBuckets)
0068b7d1          operator delete[](m_buckets_2);
0068b7d1      
0068b7af      this->m_hashMouseSemantics.m_intrusiveTable.m_buckets = nullptr;
0068b7af      this->m_hashMouseSemantics.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0068b7af      this->m_hashMouseSemantics.m_intrusiveTable.m_numBuckets = 0;
0068b7af      this->m_hashMouseSemantics.m_intrusiveTable.m_numElements = 0;
0068b7ea      this->m_hashKeyboardSemantics.vtable = 0x7ff228;
0068b7f0      IntrusiveHashTable<PStringBase<char>,HashSetData<PStringBase<char> > *,1>::delete_contents(&this->m_hashKeyboardSemantics.m_intrusiveTable);
0068b7f5      class HashTableData<PStringBase<char>,unsigned long>** m_buckets_3 = this->m_hashKeyboardSemantics.m_intrusiveTable.m_buckets;
0068b7e5      this->m_hashKeyboardSemantics.m_intrusiveTable.vtable = 0x7ff098;
0068b7e5      
0068b803      if (m_buckets_3 != &this->m_hashKeyboardSemantics.m_intrusiveTable.m_aInplaceBuckets)
0068b806          operator delete[](m_buckets_3);
0068b806      
0068b7e5      this->m_hashKeyboardSemantics.m_intrusiveTable.m_buckets = nullptr;
0068b7e5      this->m_hashKeyboardSemantics.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0068b7e5      this->m_hashKeyboardSemantics.m_intrusiveTable.m_numBuckets = 0;
0068b7e5      this->m_hashKeyboardSemantics.m_intrusiveTable.m_numElements = 0;
0068b730  }

0068b81e                                                                                            90 90                                ..

0068b820  void __fastcall ControlNameMapper::LoadSemantics(class ControlNameMapper const* this)

0068b820  {
0068b82a      ControlNameMapper::AddKeySemantic(this, "DIK_ESCAPE", 1);
0068b838      ControlNameMapper::AddKeySemantic(this, "DIK_1", 2);
0068b846      ControlNameMapper::AddKeySemantic(this, "DIK_2", 3);
0068b854      ControlNameMapper::AddKeySemantic(this, "DIK_3", 4);
0068b862      ControlNameMapper::AddKeySemantic(this, "DIK_4", 5);
0068b870      ControlNameMapper::AddKeySemantic(this, "DIK_5", 6);
0068b87e      ControlNameMapper::AddKeySemantic(this, "DIK_6", 7);
0068b88c      ControlNameMapper::AddKeySemantic(this, "DIK_7", 8);
0068b89a      ControlNameMapper::AddKeySemantic(this, "DIK_8", 9);
0068b8a8      ControlNameMapper::AddKeySemantic(this, "DIK_9", 0xa);
0068b8b6      ControlNameMapper::AddKeySemantic(this, "DIK_0", 0xb);
0068b8c4      ControlNameMapper::AddKeySemantic(this, "DIK_MINUS", 0xc);
0068b8d2      ControlNameMapper::AddKeySemantic(this, "DIK_EQUALS", 0xd);
0068b8e0      ControlNameMapper::AddKeySemantic(this, "DIK_BACK", 0xe);
0068b8ee      ControlNameMapper::AddKeySemantic(this, "DIK_TAB", 0xf);
0068b8fc      ControlNameMapper::AddKeySemantic(this, "DIK_Q", 0x10);
0068b90a      ControlNameMapper::AddKeySemantic(this, "DIK_W", 0x11);
0068b918      ControlNameMapper::AddKeySemantic(this, "DIK_E", 0x12);
0068b926      ControlNameMapper::AddKeySemantic(this, "DIK_R", 0x13);
0068b934      ControlNameMapper::AddKeySemantic(this, "DIK_T", 0x14);
0068b942      ControlNameMapper::AddKeySemantic(this, "DIK_Y", 0x15);
0068b950      ControlNameMapper::AddKeySemantic(this, "DIK_U", 0x16);
0068b95e      ControlNameMapper::AddKeySemantic(this, "DIK_I", 0x17);
0068b96c      ControlNameMapper::AddKeySemantic(this, "DIK_O", 0x18);
0068b97a      ControlNameMapper::AddKeySemantic(this, "DIK_P", 0x19);
0068b988      ControlNameMapper::AddKeySemantic(this, "DIK_LBRACKET", 0x1a);
0068b996      ControlNameMapper::AddKeySemantic(this, "DIK_RBRACKET", 0x1b);
0068b9a4      ControlNameMapper::AddKeySemantic(this, "DIK_RETURN", 0x1c);
0068b9b2      ControlNameMapper::AddKeySemantic(this, "DIK_LCONTROL", 0x1d);
0068b9c0      ControlNameMapper::AddKeySemantic(this, "DIK_A", 0x1e);
0068b9ce      ControlNameMapper::AddKeySemantic(this, "DIK_S", 0x1f);
0068b9dc      ControlNameMapper::AddKeySemantic(this, "DIK_D", 0x20);
0068b9ea      ControlNameMapper::AddKeySemantic(this, "DIK_F", 0x21);
0068b9f8      ControlNameMapper::AddKeySemantic(this, "DIK_G", 0x22);
0068ba06      ControlNameMapper::AddKeySemantic(this, "DIK_H", 0x23);
0068ba14      ControlNameMapper::AddKeySemantic(this, "DIK_J", 0x24);
0068ba22      ControlNameMapper::AddKeySemantic(this, "DIK_K", 0x25);
0068ba30      ControlNameMapper::AddKeySemantic(this, "DIK_L", 0x26);
0068ba3e      ControlNameMapper::AddKeySemantic(this, "DIK_SEMICOLON", 0x27);
0068ba4c      ControlNameMapper::AddKeySemantic(this, "DIK_APOSTROPHE", 0x28);
0068ba5a      ControlNameMapper::AddKeySemantic(this, "DIK_GRAVE", 0x29);
0068ba68      ControlNameMapper::AddKeySemantic(this, "DIK_LSHIFT", 0x2a);
0068ba76      ControlNameMapper::AddKeySemantic(this, "DIK_BACKSLASH", 0x2b);
0068ba84      ControlNameMapper::AddKeySemantic(this, "DIK_Z", 0x2c);
0068ba92      ControlNameMapper::AddKeySemantic(this, "DIK_X", 0x2d);
0068baa0      ControlNameMapper::AddKeySemantic(this, "DIK_C", 0x2e);
0068baae      ControlNameMapper::AddKeySemantic(this, "DIK_V", 0x2f);
0068babc      ControlNameMapper::AddKeySemantic(this, "DIK_B", 0x30);
0068baca      ControlNameMapper::AddKeySemantic(this, "DIK_N", 0x31);
0068bad8      ControlNameMapper::AddKeySemantic(this, "DIK_M", 0x32);
0068bae6      ControlNameMapper::AddKeySemantic(this, "DIK_COMMA", 0x33);
0068baf4      ControlNameMapper::AddKeySemantic(this, "DIK_PERIOD", 0x34);
0068bb02      ControlNameMapper::AddKeySemantic(this, "DIK_SLASH", 0x35);
0068bb10      ControlNameMapper::AddKeySemantic(this, "DIK_RSHIFT", 0x36);
0068bb1e      ControlNameMapper::AddKeySemantic(this, "DIK_MULTIPLY", 0x37);
0068bb2c      ControlNameMapper::AddKeySemantic(this, "DIK_LMENU", 0x38);
0068bb3a      ControlNameMapper::AddKeySemantic(this, "DIK_SPACE", 0x39);
0068bb48      ControlNameMapper::AddKeySemantic(this, "DIK_CAPITAL", 0x3a);
0068bb56      ControlNameMapper::AddKeySemantic(this, "DIK_F1", 0x3b);
0068bb64      ControlNameMapper::AddKeySemantic(this, "DIK_F2", 0x3c);
0068bb72      ControlNameMapper::AddKeySemantic(this, "DIK_F3", 0x3d);
0068bb80      ControlNameMapper::AddKeySemantic(this, "DIK_F4", 0x3e);
0068bb8e      ControlNameMapper::AddKeySemantic(this, "DIK_F5", 0x3f);
0068bb9c      ControlNameMapper::AddKeySemantic(this, "DIK_F6", 0x40);
0068bbaa      ControlNameMapper::AddKeySemantic(this, "DIK_F7", 0x41);
0068bbb8      ControlNameMapper::AddKeySemantic(this, "DIK_F8", 0x42);
0068bbc6      ControlNameMapper::AddKeySemantic(this, "DIK_F9", 0x43);
0068bbd4      ControlNameMapper::AddKeySemantic(this, "DIK_F10", 0x44);
0068bbe2      ControlNameMapper::AddKeySemantic(this, "DIK_F11", 0x57);
0068bbf0      ControlNameMapper::AddKeySemantic(this, "DIK_F12", 0x58);
0068bbfe      ControlNameMapper::AddKeySemantic(this, "DIK_F13", 0x64);
0068bc0c      ControlNameMapper::AddKeySemantic(this, "DIK_F14", 0x65);
0068bc1a      ControlNameMapper::AddKeySemantic(this, "DIK_F15", 0x66);
0068bc28      ControlNameMapper::AddKeySemantic(this, "DIK_NUMLOCK", 0x45);
0068bc36      ControlNameMapper::AddKeySemantic(this, "DIK_SCROLL", 0x46);
0068bc44      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD7", 0x47);
0068bc52      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD8", 0x48);
0068bc60      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD9", 0x49);
0068bc6e      ControlNameMapper::AddKeySemantic(this, "DIK_SUBTRACT", 0x4a);
0068bc7c      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD4", 0x4b);
0068bc8a      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD5", 0x4c);
0068bc98      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD6", 0x4d);
0068bca6      ControlNameMapper::AddKeySemantic(this, "DIK_ADD", 0x4e);
0068bcb4      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD1", 0x4f);
0068bcc2      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD2", 0x50);
0068bcd0      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD3", 0x51);
0068bcde      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPAD0", 0x52);
0068bcec      ControlNameMapper::AddKeySemantic(this, "DIK_DECIMAL", 0x53);
0068bcfd      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPADENTER", 0x9c);
0068bd0e      ControlNameMapper::AddKeySemantic(this, "DIK_RCONTROL", 0x9d);
0068bd1f      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPADCOMMA", 0xb3);
0068bd30      ControlNameMapper::AddKeySemantic(this, "DIK_DIVIDE", 0xb5);
0068bd41      ControlNameMapper::AddKeySemantic(this, "DIK_SYSRQ", 0xb7);
0068bd52      ControlNameMapper::AddKeySemantic(this, "DIK_RMENU", 0xb8);
0068bd63      ControlNameMapper::AddKeySemantic(this, "DIK_PAUSE", 0xc5);
0068bd74      ControlNameMapper::AddKeySemantic(this, "DIK_HOME", 0xc7);
0068bd85      ControlNameMapper::AddKeySemantic(this, "DIK_UP", 0xc8);
0068bd96      ControlNameMapper::AddKeySemantic(this, "DIK_PRIOR", 0xc9);
0068bda7      ControlNameMapper::AddKeySemantic(this, "DIK_LEFT", 0xcb);
0068bdb8      ControlNameMapper::AddKeySemantic(this, "DIK_RIGHT", 0xcd);
0068bdc9      ControlNameMapper::AddKeySemantic(this, "DIK_END", 0xcf);
0068bdda      ControlNameMapper::AddKeySemantic(this, "DIK_DOWN", 0xd0);
0068bdeb      ControlNameMapper::AddKeySemantic(this, "DIK_NEXT", 0xd1);
0068bdfc      ControlNameMapper::AddKeySemantic(this, "DIK_INSERT", 0xd2);
0068be0d      ControlNameMapper::AddKeySemantic(this, "DIK_DELETE", 0xd3);
0068be1e      ControlNameMapper::AddKeySemantic(this, "DIK_LWIN", 0xdb);
0068be2f      ControlNameMapper::AddKeySemantic(this, "DIK_RWIN", 0xdc);
0068be40      ControlNameMapper::AddKeySemantic(this, "DIK_APPS", 0xdd);
0068be51      ControlNameMapper::AddKeySemantic(this, "DIK_MUTE", 0xa0);
0068be62      ControlNameMapper::AddKeySemantic(this, "DIK_CALCULATOR", 0xa1);
0068be73      ControlNameMapper::AddKeySemantic(this, "DIK_PLAYPAUSE", 0xa2);
0068be84      ControlNameMapper::AddKeySemantic(this, "DIK_MEDIASTOP", 0xa4);
0068be95      ControlNameMapper::AddKeySemantic(this, "DIK_VOLUMEDOWN", 0xae);
0068bea6      ControlNameMapper::AddKeySemantic(this, "DIK_VOLUMEUP", 0xb0);
0068beb7      ControlNameMapper::AddKeySemantic(this, "DIK_WEBHOME", 0xb2);
0068bec8      ControlNameMapper::AddKeySemantic(this, "DIK_WEBSEARCH", 0xe5);
0068bed9      ControlNameMapper::AddKeySemantic(this, "DIK_WEBFAVORITES", 0xe6);
0068beea      ControlNameMapper::AddKeySemantic(this, "DIK_WEBREFRESH", 0xe7);
0068befb      ControlNameMapper::AddKeySemantic(this, "DIK_WEBSTOP", 0xe8);
0068bf0c      ControlNameMapper::AddKeySemantic(this, "DIK_WEBFORWARD", 0xe9);
0068bf1d      ControlNameMapper::AddKeySemantic(this, "DIK_WEBBACK", 0xea);
0068bf2e      ControlNameMapper::AddKeySemantic(this, "DIK_MYCOMPUTER", 0xeb);
0068bf3f      ControlNameMapper::AddKeySemantic(this, "DIK_MAIL", 0xec);
0068bf50      ControlNameMapper::AddKeySemantic(this, "DIK_MEDIASELECT", 0xed);
0068bf5e      ControlNameMapper::AddKeySemantic(this, "DIK_OEM_102", 0x56);
0068bf6c      ControlNameMapper::AddKeySemantic(this, "DIK_ABNT_C1", 0x73);
0068bf7a      ControlNameMapper::AddKeySemantic(this, "DIK_YEN", 0x7d);
0068bf88      ControlNameMapper::AddKeySemantic(this, "DIK_ABNT_C2", 0x7e);
0068bf99      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPADEQUALS", 0x8d);
0068bfaa      ControlNameMapper::AddKeySemantic(this, "DIK_PREVTRACK", 0x90);
0068bfbb      ControlNameMapper::AddKeySemantic(this, "DIK_AT", 0x91);
0068bfcc      ControlNameMapper::AddKeySemantic(this, "DIK_COLON", 0x92);
0068bfdd      ControlNameMapper::AddKeySemantic(this, "DIK_UNDERLINE", 0x93);
0068bfee      ControlNameMapper::AddKeySemantic(this, "DIK_STOP", 0x95);
0068bfff      ControlNameMapper::AddKeySemantic(this, "DIK_AX", 0x96);
0068c010      ControlNameMapper::AddKeySemantic(this, "DIK_UNLABELED", 0x97);
0068c021      ControlNameMapper::AddKeySemantic(this, "DIK_NEXTTRACK", 0x99);
0068c02f      ControlNameMapper::AddKeySemantic(this, "DIK_BACKSPACE", 0xe);
0068c03d      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPADSTAR", 0x37);
0068c04b      ControlNameMapper::AddKeySemantic(this, "DIK_LALT", 0x38);
0068c059      ControlNameMapper::AddKeySemantic(this, "DIK_CAPSLOCK", 0x3a);
0068c067      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPADMINUS", 0x4a);
0068c075      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPADPLUS", 0x4e);
0068c083      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPADPERIOD", 0x53);
0068c094      ControlNameMapper::AddKeySemantic(this, "DIK_NUMPADSLASH", 0xb5);
0068c0a5      ControlNameMapper::AddKeySemantic(this, "DIK_RALT", 0xb8);
0068c0b6      ControlNameMapper::AddKeySemantic(this, "DIK_UPARROW", 0xc8);
0068c0c7      ControlNameMapper::AddKeySemantic(this, "DIK_PGUP", 0xc9);
0068c0d8      ControlNameMapper::AddKeySemantic(this, "DIK_LEFTARROW", 0xcb);
0068c0e9      ControlNameMapper::AddKeySemantic(this, "DIK_RIGHTARROW", 0xcd);
0068c0fa      ControlNameMapper::AddKeySemantic(this, "DIK_DOWNARROW", 0xd0);
0068c10b      ControlNameMapper::AddKeySemantic(this, "DIK_PGDN", 0xd1);
0068c11c      ControlNameMapper::AddKeySemantic(this, "DIK_CIRCUMFLEX", 0x90);
0068c12a      ControlNameMapper::AddKeySemantic(this, "DIMOFS_WHEEL", 8);
0068c138      ControlNameMapper::AddKeySemantic(this, "DIMOFS_X", 0);
0068c146      ControlNameMapper::AddKeySemantic(this, "DIMOFS_Y", 4);
0068c154      ControlNameMapper::AddKeySemantic(this, "DIMOFS_Z", 8);
0068c162      ControlNameMapper::AddKeySemantic(this, "DIMOFS_BUTTON0", 0xc);
0068c170      ControlNameMapper::AddKeySemantic(this, "DIMOFS_BUTTON1", 0xd);
0068c17e      ControlNameMapper::AddKeySemantic(this, "DIMOFS_BUTTON2", 0xe);
0068c18c      ControlNameMapper::AddKeySemantic(this, "DIMOFS_BUTTON3", 0xf);
0068c19a      ControlNameMapper::AddKeySemantic(this, "DIMOFS_BUTTON4", 0x10);
0068c1a8      ControlNameMapper::AddKeySemantic(this, "DIMOFS_BUTTON5", 0x11);
0068c1b6      ControlNameMapper::AddKeySemantic(this, "DIMOFS_BUTTON6", 0x12);
0068c1c4      ControlNameMapper::AddKeySemantic(this, "DIMOFS_BUTTON7", 0x13);
0068c1d2      ControlNameMapper::AddKeySemantic(this, "DIJOFS_X", 0);
0068c1e0      ControlNameMapper::AddKeySemantic(this, "DIJOFS_Y", 4);
0068c1ee      ControlNameMapper::AddKeySemantic(this, "DIJOFS_Z", 8);
0068c1fc      ControlNameMapper::AddKeySemantic(this, "DIJOFS_RX", 0xc);
0068c20a      ControlNameMapper::AddKeySemantic(this, "DIJOFS_RY", 0x10);
0068c218      ControlNameMapper::AddKeySemantic(this, "DIJOFS_RZ", 0x14);
0068c226      ControlNameMapper::AddKeySemantic(this, "DIJOFS_SLIDER0", 0x18);
0068c234      ControlNameMapper::AddKeySemantic(this, "DIJOFS_SLIDER1", 0x1c);
0068c242      ControlNameMapper::AddKeySemantic(this, "DIJOFS_SLIDER(0)", 0x18);
0068c250      ControlNameMapper::AddKeySemantic(this, "DIJOFS_SLIDER(1)", 0x1c);
0068c25e      ControlNameMapper::AddKeySemantic(this, "DIJOFS_POV0", 0x20);
0068c26c      ControlNameMapper::AddKeySemantic(this, "DIJOFS_POV1", 0x24);
0068c27a      ControlNameMapper::AddKeySemantic(this, "DIJOFS_POV2", 0x28);
0068c288      ControlNameMapper::AddKeySemantic(this, "DIJOFS_POV3", 0x2c);
0068c296      ControlNameMapper::AddKeySemantic(this, "DIJOFS_POV(0)", 0x20);
0068c2a4      ControlNameMapper::AddKeySemantic(this, "DIJOFS_POV(1)", 0x24);
0068c2b2      ControlNameMapper::AddKeySemantic(this, "DIJOFS_POV(2)", 0x28);
0068c2c0      ControlNameMapper::AddKeySemantic(this, "DIJOFS_POV(3)", 0x2c);
0068c2ce      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON0", 0x30);
0068c2dc      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON1", 0x31);
0068c2ea      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON2", 0x32);
0068c2f8      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON3", 0x33);
0068c306      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON4", 0x34);
0068c314      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON5", 0x35);
0068c322      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON6", 0x36);
0068c330      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON7", 0x37);
0068c33e      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON8", 0x38);
0068c34c      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON9", 0x39);
0068c35a      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON10", 0x3a);
0068c368      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON11", 0x3b);
0068c376      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON12", 0x3c);
0068c384      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON13", 0x3d);
0068c392      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON14", 0x3e);
0068c3a0      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON15", 0x3f);
0068c3ae      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON16", 0x40);
0068c3bc      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON17", 0x41);
0068c3ca      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON18", 0x42);
0068c3d8      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON19", 0x43);
0068c3e6      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON20", 0x44);
0068c3f4      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON21", 0x45);
0068c402      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON22", 0x46);
0068c410      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON23", 0x47);
0068c41e      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON24", 0x48);
0068c42c      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON25", 0x49);
0068c43a      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON26", 0x4a);
0068c448      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON27", 0x4b);
0068c456      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON28", 0x4c);
0068c464      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON29", 0x4d);
0068c472      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON30", 0x4e);
0068c480      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON31", 0x4f);
0068c48e      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(0)", 0x30);
0068c49c      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(1)", 0x31);
0068c4aa      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(2)", 0x32);
0068c4b8      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(3)", 0x33);
0068c4c6      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(4)", 0x34);
0068c4d4      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(5)", 0x35);
0068c4e2      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(6)", 0x36);
0068c4f0      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(7)", 0x37);
0068c4fe      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(8)", 0x38);
0068c50c      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(9)", 0x39);
0068c51a      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(10)", 0x3a);
0068c528      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(11)", 0x3b);
0068c536      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(12)", 0x3c);
0068c544      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(13)", 0x3d);
0068c552      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(14)", 0x3e);
0068c560      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(15)", 0x3f);
0068c56e      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(16)", 0x40);
0068c57c      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(17)", 0x41);
0068c58a      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(18)", 0x42);
0068c598      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(19)", 0x43);
0068c5a6      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(20)", 0x44);
0068c5b4      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(21)", 0x45);
0068c5c2      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(22)", 0x46);
0068c5d0      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(23)", 0x47);
0068c5de      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(24)", 0x48);
0068c5ec      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(25)", 0x49);
0068c5fa      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(26)", 0x4a);
0068c608      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(27)", 0x4b);
0068c616      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(28)", 0x4c);
0068c624      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(29)", 0x4d);
0068c632      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(30)", 0x4e);
0068c640      ControlNameMapper::AddKeySemantic(this, "DIJOFS_BUTTON(31)", 0x4f);
0068c64e      ControlNameMapper::AddKeySemantic(this, "DIV_MOUSELOOK", 1);
0068b820  }

0068c655                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0068c660  void __fastcall ControlNameMapper::ControlNameMapper(class ControlNameMapper* this)

0068c660  {
0068c668      this->m_hashKeyboardSemantics.vtable = 0x7ff228;
0068c66e      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>(&this->m_hashKeyboardSemantics.m_intrusiveTable, 0x17);
0068c678      this->m_hashMouseSemantics.vtable = 0x7ff228;
0068c67f      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>(&this->m_hashMouseSemantics.m_intrusiveTable, 0x17);
0068c68c      this->m_hashJoystickSemantics.vtable = 0x7ff228;
0068c696      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>(&this->m_hashJoystickSemantics.m_intrusiveTable, 0x17);
0068c6a3      this->m_hashVirtualSemantics.vtable = 0x7ff228;
0068c6ad      IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>::IntrusiveHashTable<PStringBase<char>,HashTableData<PStringBase<char>,unsigned long> *,0>(&this->m_hashVirtualSemantics.m_intrusiveTable, 0x17);
0068c6b4      ControlNameMapper::LoadSemantics(this);
0068c660  }

0068c6bd                                                                                         90 90 90                               ...

0068c6c0  void __thiscall PFileNode::SetNameAsGuid(class PFileNode* this, struct Turbine_GUID arg2)

0068c6c0  {
0068c6c3      class IFileNodeName* m_pcName = this->m_pcName;
0068c6c3      
0068c6c8      if (m_pcName != 0)
0068c6ca          m_pcName->vtable->__vecDelDtor(1);
0068c6ca      
0068c6d2      this->m_pcName = nullptr;
0068c6d9      class IFileNodeName* eax_2 = operator new(0x14);
0068c6d9      
0068c6e3      if (eax_2 == 0)
0068c6e3      {
0068c712          this->m_pcName = nullptr;
0068c716          return;
0068c6e3      }
0068c6e3      
0068c6ec      *(int32_t*)((char*)eax_2 + 4) = arg2.m_data1;
0068c6ee      int32_t edx_1;
0068c6ee      edx_1 = arg2.m_data2;
0068c6ee      *(uint16_t*)((char*)edx_1)[2] = arg2.m_data3;
0068c6f2      *(int32_t*)((char*)eax_2 + 8) = edx_1;
0068c6f5      int32_t edx_2;
0068c6f5      edx_2 = arg2.m_data4[0];
0068c6f5      *(uint8_t*)((char*)edx_2)[1] = arg2.m_data4[1];
0068c6f5      *(uint8_t*)((char*)edx_2)[2] = arg2.m_data4[2];
0068c6f5      *(uint8_t*)((char*)edx_2)[3] = arg2.m_data4[3];
0068c6f9      *(int32_t*)((char*)eax_2 + 0xc) = edx_2;
0068c6fc      int32_t edx_3;
0068c6fc      edx_3 = arg2.m_data4[4];
0068c6fc      *(uint8_t*)((char*)edx_3)[1] = arg2.m_data4[5];
0068c6fc      *(uint8_t*)((char*)edx_3)[2] = arg2.m_data4[6];
0068c6fc      *(uint8_t*)((char*)edx_3)[3] = arg2.m_data4[7];
0068c700      eax_2->vtable = 0x7fd8d8;
0068c706      *(int32_t*)((char*)eax_2 + 0x10) = edx_3;
0068c709      this->m_pcName = eax_2;
0068c6c0  }

0068c719                                                                             90 90 90 90 90 90 90                           .......

0068c720  class PFileNode* __thiscall PFileNode::MakeSubNodeAsGuid(class PFileNode* this, struct Turbine_GUID arg2)

0068c720  {
0068c723      class PFileNode* result = *(int32_t*)((char*)this->vtable + 4)();
0068c723      
0068c72a      if (result == 0)
0068c72d          return result;
0068c72d      
0068c734      int32_t eax;
0068c734      eax = arg2.m_data2;
0068c734      *(uint16_t*)((char*)eax)[2] = arg2.m_data3;
0068c73f      int32_t edx_1;
0068c73f      edx_1 = arg2.m_data4[0];
0068c73f      *(uint8_t*)((char*)edx_1)[1] = arg2.m_data4[1];
0068c73f      *(uint8_t*)((char*)edx_1)[2] = arg2.m_data4[2];
0068c73f      *(uint8_t*)((char*)edx_1)[3] = arg2.m_data4[3];
0068c743      int32_t var_10 = eax;
0068c746      int32_t eax_1;
0068c746      eax_1 = arg2.m_data4[4];
0068c746      *(uint8_t*)((char*)eax_1)[1] = arg2.m_data4[5];
0068c746      *(uint8_t*)((char*)eax_1)[2] = arg2.m_data4[6];
0068c746      *(uint8_t*)((char*)eax_1)[3] = arg2.m_data4[7];
0068c74a      int32_t var_c = edx_1;
0068c74d      int32_t var_8 = eax_1;
0068c752      PFileNode::SetNameAsGuid(result, arg2.m_data1);
0068c75a      return result;
0068c720  }

0068c75d                                                                                         90 90 90                               ...

0068c760  void Serializer::SerializePrimitive(struct Turbine_GUID* arg1, class Archive* arg2)

0068c760  {
0068c769      Archive::CheckAlignment(arg2, 0x10);
0068c772      uint8_t* eax = Archive::GetBytes(arg2, 0x10);
0068c772      
0068c779      if (eax != 0)
0068c779      {
0068c77f          if ((arg2->m_flags & 1) != 0)
0068c77f          {
0068c787              *(uint32_t*)eax = arg1->m_data1;
0068c789              int32_t edx_2;
0068c789              edx_2 = arg1->m_data2;
0068c789              *(uint16_t*)((char*)edx_2)[2] = arg1->m_data3;
0068c78c              *(uint32_t*)(eax + 4) = edx_2;
0068c78f              int32_t edx_3;
0068c78f              edx_3 = arg1->m_data4[0];
0068c78f              *(uint8_t*)((char*)edx_3)[1] = arg1->m_data4[1];
0068c78f              *(uint8_t*)((char*)edx_3)[2] = arg1->m_data4[2];
0068c78f              *(uint8_t*)((char*)edx_3)[3] = arg1->m_data4[3];
0068c792              *(uint32_t*)(eax + 8) = edx_3;
0068c795              int32_t ecx_3;
0068c795              ecx_3 = arg1->m_data4[4];
0068c795              *(uint8_t*)((char*)ecx_3)[1] = arg1->m_data4[5];
0068c795              *(uint8_t*)((char*)ecx_3)[2] = arg1->m_data4[6];
0068c795              *(uint8_t*)((char*)ecx_3)[3] = arg1->m_data4[7];
0068c798              *(uint32_t*)(eax + 0xc) = ecx_3;
0068c79c              return;
0068c77f          }
0068c77f          
0068c7a3          arg1->m_data1 = *(uint32_t*)eax;
0068c7a5          int32_t ecx_5 = *(uint32_t*)(eax + 4);
0068c7a8          arg1->m_data2 = ecx_5;
0068c7a8          arg1->m_data3 = *(uint16_t*)((char*)ecx_5)[2];
0068c7ab          int32_t ecx_6 = *(uint32_t*)(eax + 8);
0068c7ae          arg1->m_data4[0] = ecx_6;
0068c7ae          arg1->m_data4[1] = *(uint8_t*)((char*)ecx_6)[1];
0068c7ae          arg1->m_data4[2] = *(uint8_t*)((char*)ecx_6)[2];
0068c7ae          arg1->m_data4[3] = *(uint8_t*)((char*)ecx_6)[3];
0068c7b1          int32_t eax_1 = *(uint32_t*)(eax + 0xc);
0068c7b4          arg1->m_data4[4] = eax_1;
0068c7b4          arg1->m_data4[5] = *(uint8_t*)((char*)eax_1)[1];
0068c7b4          arg1->m_data4[6] = *(uint8_t*)((char*)eax_1)[2];
0068c7b4          arg1->m_data4[7] = *(uint8_t*)((char*)eax_1)[3];
0068c779      }
0068c760  }

0068c7b9                                                                             90 90 90 90 90 90 90                           .......

0068c7c0  uint32_t BitUtils::ReverseBits(uint32_t arg1) __pure

0068c7c0  {
0068c7c0      uint32_t i = arg1;
0068c7c4      int32_t result = 0;
0068c7c8      uint32_t edx = 0x80000000;
0068c7c8      
0068c7cd      while (i != 0)
0068c7cd      {
0068c7d3          if ((i & 1) != 0)
0068c7d5              result |= edx;
0068c7d5          
0068c7d7          i u>>= 1;
0068c7d9          edx u>>= 1;
0068c7cd      }
0068c7cd      
0068c7df      return result;
0068c7c0  }


0068c7e0  void __fastcall SmartArray<DeviceKeyMapEntry,1>::Reset(class SmartArray<DeviceKeyMapEntry,1>* this)

0068c7e0  {
0068c7e6      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0068c7fa      this->m_num = 0;
0068c7fa      
0068c7fd      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0068c7fd      {
0068c802          operator delete[](this->m_data);
0068c80a          this->m_data = 0;
0068c80c          this->m_sizeAndDeallocate = 0;
0068c814          return;
0068c7fd      }
0068c7fd      
0068c817      if (this->m_data != 0)
0068c817      {
0068c819          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
0068c819          
0068c821          if ((i_2 - 1) >= 0)
0068c821          {
0068c826              int32_t eax_2 = ((i_2 - 1) * 0x14);
0068c829              int32_t i_1 = i_2;
0068c843              int32_t i;
0068c843              
0068c843              do
0068c843              {
0068c832                  void* edi_2 = (this->m_data + eax_2);
0068c83d                  eax_2 -= 0x14;
0068c840                  i = i_1;
0068c840                  i_1 -= 1;
0068c841                  void var_14;
0068c841                  __builtin_memcpy(edi_2, &var_14, 0x14);
0068c843              } while (i != 1);
0068c821          }
0068c817      }
0068c7e0  }

0068c84c                                      90 90 90 90                                                              ....

0068c850  class PFileNode* __thiscall PFileNode::MakeSubNodeAsHex(class PFileNode* this, uint32_t arg2)

0068c850  {
0068c853      void* result = *(int32_t*)((char*)this->vtable + 4)();
0068c853      
0068c85a      if (result == 0)
0068c85d          return result;
0068c85d      
0068c860      int32_t* ecx = *(uint32_t*)((char*)result + 8);
0068c860      
0068c865      if (ecx != 0)
0068c86b          **(uint32_t**)ecx(1);
0068c86b      
0068c86f      *(uint32_t*)((char*)result + 8) = 0;
0068c876      void* eax = operator new(8);
0068c876      
0068c880      if (eax == 0)
0068c880      {
0068c89a          *(uint32_t*)((char*)result + 8) = 0;
0068c8a0          return result;
0068c880      }
0068c880      
0068c886      *(uint32_t*)((char*)eax + 4) = arg2;
0068c889      *(uint32_t*)eax = 0x7970ec;
0068c88f      *(uint32_t*)((char*)result + 8) = eax;
0068c895      return result;
0068c850  }

0068c8a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0068c8b0  void* __thiscall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, uint32_t arg2)

0068c8b0  {
0068c8b3      struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068c8bb      this->vtable = 0x7fffe0;
0068c8bb      
0068c8c1      if (m_buckets != &this->m_aInplaceBuckets)
0068c8c4          operator delete[](m_buckets);
0068c8c4      
0068c8ce      this->m_buckets = nullptr;
0068c8d1      this->m_firstInterestingBucket = nullptr;
0068c8d4      this->m_numBuckets = 0;
0068c8d7      this->m_numElements = 0;
0068c8d7      
0068c8df      if ((arg2 & 1) != 0)
0068c8e2          operator delete(this);
0068c8e2      
0068c8ed      return this;
0068c8b0  }


0068c8f0  void* __thiscall IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* this, uint32_t arg2)

0068c8f0  {
0068c8f3      struct HashList<ControlSpecification,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068c8fb      this->vtable = 0x7fffe4;
0068c8fb      
0068c901      if (m_buckets != &this->m_aInplaceBuckets)
0068c904          operator delete[](m_buckets);
0068c904      
0068c90e      this->m_buckets = nullptr;
0068c911      this->m_firstInterestingBucket = nullptr;
0068c914      this->m_numBuckets = 0;
0068c917      this->m_numElements = 0;
0068c917      
0068c91f      if ((arg2 & 1) != 0)
0068c922          operator delete(this);
0068c922      
0068c92d      return this;
0068c8f0  }


0068c930  void* __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* this, uint32_t arg2)

0068c930  {
0068c933      struct HashList<unsigned long,CInputMap *,1>::HashListData** m_buckets = this->m_buckets;
0068c93b      this->vtable = 0x7fffe8;
0068c93b      
0068c941      if (m_buckets != &this->m_aInplaceBuckets)
0068c944          operator delete[](m_buckets);
0068c944      
0068c94e      this->m_buckets = nullptr;
0068c951      this->m_firstInterestingBucket = nullptr;
0068c954      this->m_numBuckets = 0;
0068c957      this->m_numElements = 0;
0068c957      
0068c95f      if ((arg2 & 1) != 0)
0068c962          operator delete(this);
0068c962      
0068c96d      return this;
0068c930  }


0068c970  uint32_t __thiscall SmartArray<DeviceKeyMapEntry,1>::WhatNum(class SmartArray<DeviceKeyMapEntry,1> const* this, class DeviceKeyMapEntry const* arg2)

0068c970  {
0068c972      uint32_t m_num = this->m_num;
0068c975      int32_t result = 0;
0068c975      
0068c97a      if (m_num > 0)
0068c97a      {
0068c985          uint8_t (* ecx_1)[0x8] = &this->m_data->guid.m_data4;
0068c985          
0068c9aa          do
0068c9aa          {
0068c98b              if (ADJ(ecx_1)->guid.m_data1 == arg2->guid.m_data1)
0068c98b              {
0068c98d                  int32_t ebx_1;
0068c98d                  ebx_1 = ADJ(ecx_1)->guid.m_data2;
0068c98d                  *(uint16_t*)((char*)ebx_1)[2] = ADJ(ecx_1)->guid.m_data3;
0068c98d                  
0068c993                  if (ebx_1 == arg2->guid.m_data2)
0068c993                  {
0068c995                      int32_t ebx_2;
0068c995                      ebx_2 = ADJ(ecx_1)->guid.m_data4[0];
0068c995                      *(uint8_t*)((char*)ebx_2)[1] = ADJ(ecx_1)->guid.m_data4[1];
0068c995                      *(uint8_t*)((char*)ebx_2)[2] = ADJ(ecx_1)->guid.m_data4[2];
0068c995                      *(uint8_t*)((char*)ebx_2)[3] = ADJ(ecx_1)->guid.m_data4[3];
0068c995                      
0068c99a                      if (ebx_2 == arg2->guid.m_data4[0])
0068c99a                      {
0068c99c                          int32_t ebx_3;
0068c99c                          ebx_3 = ADJ(ecx_1)->guid.m_data4[4];
0068c99c                          *(uint8_t*)((char*)ebx_3)[1] = ADJ(ecx_1)->guid.m_data4[5];
0068c99c                          *(uint8_t*)((char*)ebx_3)[2] = ADJ(ecx_1)->guid.m_data4[6];
0068c99c                          *(uint8_t*)((char*)ebx_3)[3] = ADJ(ecx_1)->guid.m_data4[7];
0068c99c                          
0068c9a2                          if (ebx_3 == arg2->guid.m_data4[4])
0068c9b2                              return result;
0068c99a                      }
0068c993                  }
0068c98b              }
0068c98b              
0068c9a4              result += 1;
0068c9a5              ecx_1 = &*(uint64_t*)ecx_1[0x14];
0068c9aa          } while (result < m_num);
0068c97a      }
0068c97a      
0068c9ac      return 0xffffffff;
0068c970  }

0068c9b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0068c9c0  uint8_t __thiscall SmartArray<DeviceKeyMapEntry,1>::grow(class SmartArray<DeviceKeyMapEntry,1>* this, uint32_t arg2)

0068c9c0  {
0068c9c8      uint32_t esi = arg2;
0068c9ce      uint32_t eax;
0068c9ce      
0068c9ce      if (esi >= this->m_num)
0068c9ce      {
0068c9de          if (esi <= (this->m_sizeAndDeallocate & 0x7fffffff))
0068c9de          {
0068ca62              eax = 1;
0068ca65              return 1;
0068c9de          }
0068c9de          
0068c9e6          if (esi == 0)
0068c9e6          {
0068c9e8              SmartArray<DeviceKeyMapEntry,1>::Reset(this);
0068c9ef              int32_t eax_2;
0068c9ef              eax_2 = 1;
0068c9f2              return 1;
0068c9e6          }
0068c9e6          
0068ca01          uint32_t ebp_1 = operator new[]((esi * 0x14));
0068ca01          
0068ca08          if (ebp_1 != 0)
0068ca08          {
0068ca0d              if (this->m_data != 0)
0068ca0d              {
0068ca0f                  uint32_t m_num = this->m_num;
0068ca0f                  
0068ca13                  if ((m_num - 1) >= 0)
0068ca13                  {
0068ca18                      eax = ((m_num - 1) * 0x14);
0068ca1b                      int32_t edx_1 = m_num;
0068ca32                      int32_t i;
0068ca32                      
0068ca32                      do
0068ca32                      {
0068ca22                          void* esi_2 = (this->m_data + eax);
0068ca24                          uint32_t edi_1 = (eax + ebp_1);
0068ca2c                          eax -= 0x14;
0068ca2f                          i = edx_1;
0068ca2f                          edx_1 -= 1;
0068ca30                          __builtin_memcpy(edi_1, esi_2, 0x14);
0068ca32                      } while (i != 1);
0068ca34                      esi = arg2;
0068ca13                  }
0068ca13                  
0068ca48                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0068ca4d                      operator delete[](this->m_data);
0068ca0d              }
0068ca0d              
0068ca5b              this->m_data = ebp_1;
0068ca5d              this->m_sizeAndDeallocate = (esi | 0x80000000);
0068ca62              eax = 1;
0068ca65              return 1;
0068ca08          }
0068c9ce      }
0068c9ce      
0068ca6a      eax = 0;
0068ca6d      return 0;
0068c9c0  }


0068ca70  uint8_t __thiscall SmartArray<DeviceKeyMapEntry,1>::SetNElements(class SmartArray<DeviceKeyMapEntry,1>* this, uint32_t const arg2, uint8_t arg3)

0068ca70  {
0068ca85      uint32_t eax_1;
0068ca85      
0068ca85      if ((this->m_sizeAndDeallocate & 0x7fffffff) >= arg2)
0068ca85      {
0068cab2          uint32_t const i = arg2;
0068cab2          
0068cab4          if (arg2 < this->m_num)
0068cab4          {
0068cabb              eax_1 = (arg2 * 0x14);
0068cabb              
0068cad8              do
0068cad8              {
0068cacd                  void var_14;
0068cacd                  __builtin_memcpy((this->m_data + eax_1), &var_14, 0x14);
0068cad2                  i += 1;
0068cad3                  eax_1 += 0x14;
0068cad8              } while (i < this->m_num);
0068cab4          }
0068ca85      }
0068ca85      else
0068ca85      {
0068ca87          eax_1 = arg3;
0068ca8d          uint32_t const eax_2;
0068ca8d          
0068ca8d          if (eax_1 == 0)
0068ca96              eax_2 = SmartArray<unsigned long,1>::get_new_size(this, arg2);
0068ca8d          else
0068ca8f              eax_2 = arg2;
0068ca8f          
0068ca9e          eax_1 = SmartArray<DeviceKeyMapEntry,1>::grow(this, eax_2);
0068ca9e          
0068caa5          if (eax_1 == 0)
0068caac              return eax_1;
0068ca85      }
0068ca85      
0068cadc      this->m_num = arg2;
0068cae0      eax_1 = 1;
0068cae6      return 1;
0068ca70  }

0068cae9                             90 90 90 90 90 90 90                                                           .......

0068caf0  uint8_t __thiscall PFileNode::GetNameAsGuid(class PFileNode const* this, struct Turbine_GUID* arg2)

0068caf0  {
0068caf0      class PFileNode* this_1 = this;
0068caf5      class IFileNodeName* m_pcName = this->m_pcName;
0068caf8      int32_t ebx;
0068caf8      ebx = 0;
0068caf8      
0068cafc      if (m_pcName != 0)
0068cafc      {
0068cb0a          if (m_pcName->vtable->GetType() == 0xe)
0068cb0a          {
0068cb13              void* __offset(IFileNodeName, 0x4) esi_2 = &this->m_pcName[1];
0068cb18              arg2->m_data1 = *(int32_t*)((char*)ADJ(esi_2) + 4);
0068cb1a              class IFileNodeName eax_3 = *(int32_t*)((char*)ADJ(esi_2) + 8);
0068cb1d              arg2->m_data2 = eax_3.vtable;
0068cb1d              arg2->m_data3 = *(uint16_t*)((char*)eax_3.vtable)[2];
0068cb20              class IFileNodeName edx_2 = *(int32_t*)((char*)ADJ(esi_2) + 0xc);
0068cb23              arg2->m_data4[0] = edx_2.vtable;
0068cb23              arg2->m_data4[1] = *(uint8_t*)((char*)edx_2.vtable)[1];
0068cb23              arg2->m_data4[2] = *(uint8_t*)((char*)edx_2.vtable)[2];
0068cb23              arg2->m_data4[3] = *(uint8_t*)((char*)edx_2.vtable)[3];
0068cb26              class IFileNodeName eax_4 = *(int32_t*)((char*)ADJ(esi_2) + 0x10);
0068cb2a              arg2->m_data4[4] = eax_4.vtable;
0068cb2a              arg2->m_data4[5] = *(uint8_t*)((char*)eax_4.vtable)[1];
0068cb2a              arg2->m_data4[6] = *(uint8_t*)((char*)eax_4.vtable)[2];
0068cb2a              arg2->m_data4[7] = *(uint8_t*)((char*)eax_4.vtable)[3];
0068cb2d              eax_4.vtable = 1;
0068cb31              return 1;
0068cb0a          }
0068cb0a          
0068cb34          this->m_pcName->vtable->ToPString(&this_1);
0068cb44          void* eax_5 = operator new(0x14);
0068cb4e          class IFileNodeName* edi_1;
0068cb4e          
0068cb4e          if (eax_5 == 0)
0068cb5a              edi_1 = nullptr;
0068cb4e          else
0068cb4e          {
0068cb50              *(uint32_t*)eax_5 = 0x7fd8d8;
0068cb56              edi_1 = eax_5;
0068cb4e          }
0068cb4e          
0068cb6a          if (edi_1->vtable->FromPString(&this_1) == 0)
0068cb9d              edi_1->vtable->__vecDelDtor(1);
0068cb6a          else
0068cb6a          {
0068cb75              arg2->m_data1 = *(int32_t*)((char*)edi_1 + 4);
0068cb77              class IFileNodeName eax_8 = *(int32_t*)((char*)edi_1 + 8);
0068cb7a              arg2->m_data2 = eax_8.vtable;
0068cb7a              arg2->m_data3 = *(uint16_t*)((char*)eax_8.vtable)[2];
0068cb7d              class IFileNodeName eax_9 = *(int32_t*)((char*)edi_1 + 0xc);
0068cb80              arg2->m_data4[0] = eax_9.vtable;
0068cb80              arg2->m_data4[1] = *(uint8_t*)((char*)eax_9.vtable)[1];
0068cb80              arg2->m_data4[2] = *(uint8_t*)((char*)eax_9.vtable)[2];
0068cb80              arg2->m_data4[3] = *(uint8_t*)((char*)eax_9.vtable)[3];
0068cb83              class IFileNodeName ecx_5 = *(int32_t*)((char*)edi_1 + 0x10);
0068cb86              arg2->m_data4[4] = ecx_5.vtable;
0068cb86              arg2->m_data4[5] = *(uint8_t*)((char*)ecx_5.vtable)[1];
0068cb86              arg2->m_data4[6] = *(uint8_t*)((char*)ecx_5.vtable)[2];
0068cb86              arg2->m_data4[7] = *(uint8_t*)((char*)ecx_5.vtable)[3];
0068cb89              class IFileNodeName* m_pcName_1 = this->m_pcName;
0068cb89              
0068cb8e              if (m_pcName_1 != 0)
0068cb90                  m_pcName_1->vtable->__vecDelDtor(1);
0068cb90              
0068cb96              this->m_pcName = edi_1;
0068cb99              ebx = 1;
0068cb6a          }
0068cb6a          
0068cba9          void* __offset(PFileNode, -0x14) esi_4 = ((char*)this_1 - 0x14);
0068cba9          
0068cbbd          if ((InterlockedDecrement(((char*)esi_4 + 4)) == 0 && esi_4 != 0))
0068cbc5              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_4) + -0x14)(1);
0068cafc      }
0068cafc      
0068cbc8      int32_t eax;
0068cbc8      eax = ebx;
0068cbcc      return eax;
0068caf0  }

0068cbcf                                               90                                                                 .

0068cbd0  class IntrusiveHashIterator<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* __thiscall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1> const* this, class IntrusiveHashIterator<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* __return, class QualifiedControl const* arg3)

0068cbd0  {
0068cbdf      uint32_t temp1 = (COMBINE(0, arg3->m_key.__inner0) % this->m_numBuckets);
0068cbe2      struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068cbed      class QualifiedControl* i;
0068cbed      
0068cbed      for (i = m_buckets[temp1]; i != 0; i = *(int32_t*)((char*)i + 0xc))
0068cbed      {
0068cbfa          if (QualifiedControl::operator==(i, arg3) != 0)
0068cbfa              break;
0068cbed      }
0068cbed      
0068cc03      class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>** result = __return;
0068cc07      *(uint32_t*)result = this;
0068cc0a      result[2] = i;
0068cc0f      result[1] = &m_buckets[temp1];
0068cc13      return result;
0068cbd0  }

0068cc16                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0068cc20  uint8_t __thiscall SmartArray<DeviceKeyMapEntry,1>::AddToEnd(class SmartArray<DeviceKeyMapEntry,1>* this, class DeviceKeyMapEntry const* arg2)

0068cc20  {
0068cc29      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
0068cc29      
0068cc30      if (this->m_num >= eax_1)
0068cc30      {
0068cc3e          uint8_t result = SmartArray<DeviceKeyMapEntry,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
0068cc3e          
0068cc45          if (result == 0)
0068cc48              return result;
0068cc30      }
0068cc30      
0068cc61      __builtin_memcpy(&this->m_data[this->m_num], arg2, 0x14);
0068cc68      this->m_num += 1;
0068cc6c      uint32_t eax_7;
0068cc6c      eax_7 = 1;
0068cc6f      return 1;
0068cc20  }

0068cc72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0068cc80  uint8_t __convention("regparm") FileNodeUtils::SetNameAsEnum(class PFileNode* arg1, uint32_t arg2, uint32_t arg3)

0068cc80  {
0068cc80      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
0068cc80      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_3;
0068cc81      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068cc8f      PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0068cc98      int32_t ebx;
0068cc98      ebx = 0;
0068cc9a      InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0068cc9a      
0068ccb5      if (EnumMapper::GetString(arg2, arg3, &PStringBase<char>::s_NullBuffer_2) != 0)
0068ccb5      {
0068ccb7          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
0068ccc1          int32_t var_18_3 = InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]);
0068ccc5          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_4;
0068cccd          PFileNode::SetNameAsPString(arg1, InterlockedIncrement(&PStringBase<char>::s_NullBuffer_4[-1]));
0068cccd          
0068cce5          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_4[-1]) == 0 && PStringBase<char>::s_NullBuffer_4 != 0x14))
0068cced              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_4 + -0x14)(1);
0068cced          
0068ccef          ebx = 1;
0068ccb5      }
0068ccb5      
0068ccf5      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0068ccf5      
0068cd08      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0068cd10          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0068cd10      
0068cd15      int32_t eax_5;
0068cd15      eax_5 = ebx;
0068cd19      return eax_5;
0068cc80  }

0068cd1a                                                                                90 90 90 90 90 90                            ......

0068cd20  class PFileNode* FileNodeUtils::MakeSubNodeAsEnum(class PFileNode* arg1, uint32_t arg2, uint32_t arg3)

0068cd20  {
0068cd2a      class PFileNode* result = *(int32_t*)((char*)arg1->vtable + 4)();
0068cd2a      
0068cd31      if (result != 0)
0068cd31      {
0068cd3b          uint32_t var_c_1 = arg3;
0068cd3c          uint32_t var_10_1 = arg2;
0068cd3d          class PFileNode* result_1 = result;
0068cd3d          
0068cd48          if (FileNodeUtils::SetNameAsEnum(result, arg2, arg3) == 0)
0068cd48          {
0068cd4d              PFileNode::RemoveSubNodePtr(arg1, result);
0068cd56              return 0;
0068cd48          }
0068cd31      }
0068cd31      
0068cd5b      return result;
0068cd20  }

0068cd5c                                                                                      90 90 90 90                              ....

0068cd60  uint8_t __thiscall CInputMap::VerifyActivationAndToggleType(class CInputMap* this, class QualifiedControl const* arg2, uint32_t arg3, class PFileNode const* arg4)

0068cd60  {
0068cd60      class CInputMap* this_1 = this;
0068cd65      int32_t var_18 = 0x27;
0068cd67      int32_t var_1c = 8;
0068cd69      int32_t var_20 = 1;
0068cd6d      int32_t ebx;
0068cd6d      ebx = 1;
0068cd6f      int32_t eax;
0068cd6f      class DBObj* eax_1;
0068cd6f      int32_t edx;
0068cd6f      uint32_t edx_1;
0068cd6f      eax_1 = DBObj::GetByEnum(eax, edx, this);
0068cd6f      
0068cd7b      if (eax_1 != 0)
0068cd7b      {
0068cd84          uint32_t edi_1 = arg3;
0068cd88          uint32_t m_eInputMapID = this->m_eInputMapID;
0068cd8c          uint32_t eax_3 = ActionMap::GetToggleType(eax_1, edx_1, edi_1);
0068cd8c          
0068cd9d          if ((eax_3 >= 4 && eax_3 <= 5))
0068cd9d          {
0068cda3              class QualifiedControl* ebp_1 = arg2;
0068cda3              
0068cdab              if ((ebp_1->m_activation & 0xa9) == 0)
0068cdab              {
0068cdb1                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068cdb6                  arg2 = PStringBase<char>::s_NullBuffer_1;
0068cdbe                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0068cdcd                  PStringBase<char>::PStringBase<char>(&this_1, "momentary, etc.");
0068cddb                  PStringBase<char>::PStringBase<char>(&arg3, "tap, dblclick, etc");
0068cde8                  EnumMapper::GetString(0x19, edi_1, &arg2);
0068cded                  uint32_t m_activation = ebp_1->m_activation;
0068cdf4                  class CInputMap* this_3 = &arg3;
0068cdf6                  ControlActivationTypeToString(m_activation, this_3);
0068cdfb                  class CInputMap* this_2 = this_1;
0068ce0a                  class CInputMap* this_4 = this_2;
0068ce0b                  class QualifiedControl* var_1c_3 = arg2;
0068ce0c                  uint32_t var_20_2 = arg3;
0068ce0d                  this_3 = this_2;
0068ce15                  PStringBase<char>::PStringBase<char>(&this_3, "Cannot use that activation type …");
0068ce1f                  PFileNode::ReportError(arg4, this_3);
0068ce2b                  ebx = 0;
0068ce2d                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg3);
0068ce36                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&this_1);
0068ce3f                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0068cdab              }
0068cd9d          }
0068cd9d          
0068ce44          eax_1->vtable->Release();
0068cd7b      }
0068cd7b      
0068ce4e      eax_1 = ebx;
0068ce52      return eax_1;
0068cd60  }

0068ce55                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0068ce60  uint8_t __stdcall CMasterInputMap::ReadGuidFromFileNode(class CMasterInputMap* this @ ecx, class PFileNode const* arg2, struct Turbine_GUID* arg3)

0068ce60  {
0068ce6d      if (arg2 != 0)
0068ce6d      {
0068ce73          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068ce78          class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0068ce80          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0068ce8d          PFileNode::GetNameAsPString(arg2, &PStringBase<char>::s_NullBuffer_2);
0068ce9b          class PStringBase<char> var_4;
0068ce9b          PStringBase<char>::PStringBase<char>(&var_4, "GUID_SysMouse");
0068cea0          class PStringBase<char> ecx_2 = var_4;
0068cea4          class PStringBase<char> PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0068cea9          class PStringBase<char> PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
0068ceaa          int32_t eax_2 = _stricmp(PStringBase<char>::s_NullBuffer_4, ecx_2);
0068cebf          char ebx_2 = ((int8_t)-(eax_2));
0068cec3          int32_t* esi_2 = (var_4 - 0x14);
0068cec3          
0068ced4          if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
0068cedc              **(uint32_t**)esi_2(1);
0068cedc          
0068cee0          if ((ebx_2 - ebx_2) != 0xff)
0068cee0          {
0068ceec              arg3->m_data1 = 0x6f1d2b60;
0068cef3              arg3->m_data2 = 0xd5a0;
0068cef3              arg3->m_data3 = 0x11cf;
0068cefc              arg3->m_data4[0] = 0xbf;
0068cefc              arg3->m_data4[1] = 0xc7;
0068cefc              arg3->m_data4[2] = 0x44;
0068cefc              arg3->m_data4[3] = 0x45;
0068cf04              arg3->m_data4[4] = 0x53;
0068cf04              arg3->m_data4[5] = 0x54;
0068cf04              arg3->m_data4[6] = 0;
0068cf04              arg3->m_data4[7] = 0;
0068cf04              
0068cf16              if ((InterlockedDecrement((PStringBase<char>::s_NullBuffer_3 - 0x10)) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
0068cf1e                  **(uint32_t**)(PStringBase<char>::s_NullBuffer_3 - 0x14)(1);
0068cf1e              
0068cf20              int32_t eax_5;
0068cf20              eax_5 = 1;
0068cf29              return 1;
0068cee0          }
0068cee0          
0068cf35          PStringBase<char>::PStringBase<char>(&var_4, "GUID_SysKeyboard");
0068cf3a          class PStringBase<char> eax_6 = var_4;
0068cf3f          PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
0068cf40          int32_t eax_7 = _stricmp(PStringBase<char>::s_NullBuffer_4, eax_6);
0068cf4f          char ebx_4 = ((int8_t)-(eax_7));
0068cf53          int32_t* esi_5 = (var_4 - 0x14);
0068cf53          
0068cf64          if ((InterlockedDecrement(&esi_5[1]) == 0 && esi_5 != 0))
0068cf6c              **(uint32_t**)esi_5(1);
0068cf6c          
0068cf70          if ((ebx_4 - ebx_4) != 0xff)
0068cf70          {
0068cf7c              arg3->m_data1 = 0x6f1d2b61;
0068cf84              arg3->m_data2 = 0xd5a0;
0068cf84              arg3->m_data3 = 0x11cf;
0068cf8d              arg3->m_data4[0] = 0xbf;
0068cf8d              arg3->m_data4[1] = 0xc7;
0068cf8d              arg3->m_data4[2] = 0x44;
0068cf8d              arg3->m_data4[3] = 0x45;
0068cf96              arg3->m_data4[4] = 0x53;
0068cf96              arg3->m_data4[5] = 0x54;
0068cf96              arg3->m_data4[6] = 0;
0068cf96              arg3->m_data4[7] = 0;
0068cf96              
0068cfa8              if ((InterlockedDecrement((PStringBase<char>::s_NullBuffer_3 - 0x10)) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
0068cfb1                  **(uint32_t**)(PStringBase<char>::s_NullBuffer_3 - 0x14)(1);
0068cfb1              
0068cfb3              int32_t eax_11;
0068cfb3              eax_11 = 1;
0068cfbc              return 1;
0068cf70          }
0068cf70          
0068cfc8          PStringBase<char>::PStringBase<char>(&var_4, "GUID_Virtual");
0068cfcd          class PStringBase<char> eax_12 = var_4;
0068cfd2          PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
0068cfd3          int32_t eax_13 = _stricmp(PStringBase<char>::s_NullBuffer_4, eax_12);
0068cfe2          char ebx_6 = ((int8_t)-(eax_13));
0068cfe6          int32_t* esi_7 = (var_4 - 0x14);
0068cfe6          
0068cff7          if ((InterlockedDecrement(&esi_7[1]) == 0 && esi_7 != 0))
0068cfff              **(uint32_t**)esi_7(1);
0068cfff          
0068d007          if ((ebx_6 - ebx_6) != 0xff)
0068d007          {
0068d00f              arg3->m_data1 = 0xc8854010;
0068d017              __builtin_strncpy(&arg3->m_data2, "6M[D", 4);
0068d020              arg3->m_data4[0] = 0x85;
0068d020              arg3->m_data4[1] = 0xed;
0068d020              arg3->m_data4[2] = 0x5d;
0068d020              arg3->m_data4[3] = 0xa6;
0068d029              arg3->m_data4[4] = 0x2c;
0068d029              arg3->m_data4[5] = 0xba;
0068d029              arg3->m_data4[6] = 0x27;
0068d029              arg3->m_data4[7] = 0xe4;
0068d030          label_68d030:
0068d030              PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2);
0068d035              int32_t eax_16;
0068d035              eax_16 = 1;
0068d03e              return 1;
0068d007          }
0068d007          
0068d048          uint8_t eax_17;
0068d048          class PStringBase<char> PStringBase<char>::s_NullBuffer_6;
0068d048          eax_17 = PFileNode::GetNameAsGuid(arg2, arg3);
0068d048          
0068d04f          if (eax_17 != 0)
0068d04f              goto label_68d030;
0068d04f          
0068d051          class PStringBase<char> PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
0068d052          PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_6;
0068d05a          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_4, "ERROR - invalid GUID "%s"\n");
0068d060          PFileNode::ReportError(arg2, PStringBase<char>::s_NullBuffer_4);
0068d06c          PStringBase<unsigned short>::~PStringBase<unsigned short>(&PStringBase<char>::s_NullBuffer_2);
0068ce6d      }
0068ce6d      
0068d074      int32_t eax;
0068d074      eax = 0;
0068d07a      return 0;
0068ce60  }

0068d07d                                                                                         90 90 90                               ...

0068d080  uint8_t __stdcall CMasterInputMap::WriteGuidToFileNode(class CMasterInputMap const* this @ ecx, struct Turbine_GUID const* arg2, class PFileNode* arg3)

0068d080  {
0068d086      class PStringBase<char> i = 4;
0068d08b      struct Turbine_GUID* edi = arg2;
0068d08d      int32_t* esi = &GUID_SysKeyboard;
0068d092      bool cond:1 = false;
0068d092      
0068d094      while (i != 0)
0068d094      {
0068d094          int32_t temp1_1 = *(uint32_t*)esi;
0068d094          uint32_t m_data1_1 = edi->m_data1;
0068d094          cond:1 = temp1_1 != m_data1_1;
0068d094          esi = &esi[1];
0068d094          edi = &edi->m_data2;
0068d094          i -= 1;
0068d094          
0068d094          if (temp1_1 != m_data1_1)
0068d094              break;
0068d094      }
0068d094      
0068d096      class PStringBase<char> i_3;
0068d096      
0068d096      if (!(cond:1))
0068d096      {
0068d098          i_3 = i;
0068d0a0          PStringBase<char>::PStringBase<char>(&i_3, "GUID_SysKeyboard");
0068d0b0          class PFileNode* eax;
0068d0b0          eax = PFileNode::MakeSubNodeAsPString(arg3, i_3) != 0;
0068d0b5          return eax;
0068d096      }
0068d096      
0068d0b8      class PStringBase<char> i_1 = 4;
0068d0bd      struct Turbine_GUID* edi_1 = arg2;
0068d0bf      int32_t* esi_1 = &GUID_SysMouse;
0068d0c4      bool cond:3 = false;
0068d0c4      
0068d0c6      while (i_1 != 0)
0068d0c6      {
0068d0c6          int32_t temp3_1 = *(uint32_t*)esi_1;
0068d0c6          uint32_t m_data1_2 = edi_1->m_data1;
0068d0c6          cond:3 = temp3_1 != m_data1_2;
0068d0c6          esi_1 = &esi_1[1];
0068d0c6          edi_1 = &edi_1->m_data2;
0068d0c6          i_1 -= 1;
0068d0c6          
0068d0c6          if (temp3_1 != m_data1_2)
0068d0c6              break;
0068d0c6      }
0068d0c6      
0068d0c8      if (!(cond:3))
0068d0c8      {
0068d0ca          i_3 = i_1;
0068d0d2          PStringBase<char>::PStringBase<char>(&i_3, "GUID_SysMouse");
0068d0e2          class PFileNode* eax_1;
0068d0e2          eax_1 = PFileNode::MakeSubNodeAsPString(arg3, i_3) != 0;
0068d0e7          return eax_1;
0068d0c8      }
0068d0c8      
0068d0ea      class PStringBase<char> i_2 = 4;
0068d0ef      struct Turbine_GUID* edi_2 = arg2;
0068d0f1      int32_t* esi_2 = &GUID_Virtual;
0068d0f6      bool cond:5 = false;
0068d0f6      
0068d0f8      while (i_2 != 0)
0068d0f8      {
0068d0f8          int32_t temp5_1 = *(uint32_t*)esi_2;
0068d0f8          uint32_t m_data1_3 = edi_2->m_data1;
0068d0f8          cond:5 = temp5_1 != m_data1_3;
0068d0f8          esi_2 = &esi_2[1];
0068d0f8          edi_2 = &edi_2->m_data2;
0068d0f8          i_2 -= 1;
0068d0f8          
0068d0f8          if (temp5_1 != m_data1_3)
0068d0f8              break;
0068d0f8      }
0068d0f8      
0068d0fa      if (!(cond:5))
0068d0fa      {
0068d0fc          i_3 = i_2;
0068d104          PStringBase<char>::PStringBase<char>(&i_3, "GUID_Virtual");
0068d114          class PFileNode* eax_2;
0068d114          eax_2 = PFileNode::MakeSubNodeAsPString(arg3, i_3) != 0;
0068d119          return eax_2;
0068d0fa      }
0068d0fa      
0068d11c      uint32_t m_data1 = arg2->m_data1;
0068d125      int32_t edx;
0068d125      edx = arg2->m_data2;
0068d125      *(uint16_t*)((char*)edx)[2] = arg2->m_data3;
0068d128      int32_t var_14 = edx;
0068d12b      int32_t edx_1;
0068d12b      edx_1 = arg2->m_data4[0];
0068d12b      *(uint8_t*)((char*)edx_1)[1] = arg2->m_data4[1];
0068d12b      *(uint8_t*)((char*)edx_1)[2] = arg2->m_data4[2];
0068d12b      *(uint8_t*)((char*)edx_1)[3] = arg2->m_data4[3];
0068d12e      class PStringBase<char> i_4;
0068d12e      i_4.m_charbuffer = arg2->m_data4[4];
0068d12e      *(uint8_t*)((char*)i_4.m_charbuffer)[1] = arg2->m_data4[5];
0068d12e      *(uint8_t*)((char*)i_4.m_charbuffer)[2] = arg2->m_data4[6];
0068d12e      *(uint8_t*)((char*)i_4.m_charbuffer)[3] = arg2->m_data4[7];
0068d131      int32_t var_10 = edx_1;
0068d134      i_3 = i_4;
0068d143      class PFileNode* eax_3;
0068d143      eax_3 = PFileNode::MakeSubNodeAsGuid(arg3, m_data1) != 0;
0068d147      return eax_3;
0068d080  }

0068d14a                                90 90 90 90 90 90                                                            ......

0068d150  int32_t __thiscall CMasterInputMap::AddDeviceEntry(class CMasterInputMap* this, class DeviceKeyMapEntry const* arg2)

0068d150  {
0068d15f      uint32_t eax = SmartArray<DeviceKeyMapEntry,1>::WhatNum(&this->m_rgDevices, arg2);
0068d15f      
0068d167      if (eax != 0xffffffff)
0068d179          return eax;
0068d179      
0068d169      uint32_t m_num = this->m_rgDevices.m_num;
0068d16f      SmartArray<DeviceKeyMapEntry,1>::AddToEnd(&this->m_rgDevices, arg2);
0068d174      return m_num;
0068d150  }

0068d17c                                                                                      90 90 90 90                              ....

0068d180  void __thiscall SmartArray<DeviceKeyMapEntry,1>::Serialize(class SmartArray<DeviceKeyMapEntry,1>* this, class Archive* arg2)

0068d180  {
0068d180      class SmartArray<DeviceKeyMapEntry,1>* this_1 = this;
0068d185      class Archive* edi = arg2;
0068d18b      uint32_t m_num = this->m_num;
0068d192      Archive::CheckAlignment(edi, 4);
0068d19b      uint8_t* eax = Archive::GetBytes(edi, 4);
0068d19b      
0068d1a4      if (eax != 0)
0068d1a4      {
0068d1aa          if ((edi->m_flags & 1) == 0)
0068d1b0              m_num = *(uint32_t*)eax;
0068d1aa          else
0068d1ac              *(uint32_t*)eax = m_num;
0068d1a4      }
0068d1a4      
0068d1b2      eax = edi->m_flags;
0068d1b5      eax = !(eax);
0068d1b5      
0068d1b9      if ((eax & 1) != 0)
0068d1b9      {
0068d1c4          if (m_num > Archive::GetSizeLeft(edi))
0068d1c4          {
0068d1c8              Archive::RaiseError(edi);
0068d1d2              return;
0068d1c4          }
0068d1c4          
0068d1da          this->m_num = 0;
0068d1dd          SmartArray<DeviceKeyMapEntry,1>::SetNElements(this, m_num, 1);
0068d1b9      }
0068d1b9      
0068d1e5      int32_t var_4 = 0;
0068d1e5      
0068d1e9      if (this->m_num > 0)
0068d1e9      {
0068d1ef          arg2 = nullptr;
0068d292          bool cond:1_1;
0068d292          
0068d292          do
0068d292          {
0068d1f3              class DeviceKeyMapEntry* m_data = this->m_data;
0068d1fa              uint8_t ebx_1 = *(uint8_t*)((char*)m_data + arg2);
0068d1fd              void* esi = ((char*)m_data + arg2);
0068d203              Archive::CheckAlignment(edi, 1);
0068d20c              uint8_t* eax_2 = Archive::GetBytes(edi, 1);
0068d20c              
0068d213              if (eax_2 != 0)
0068d213              {
0068d219                  if ((edi->m_flags & 1) == 0)
0068d21f                      ebx_1 = *(uint8_t*)eax_2;
0068d219                  else
0068d21b                      *(uint8_t*)eax_2 = ebx_1;
0068d213              }
0068d213              
0068d225              if ((edi->m_flags & 5) == 0)
0068d22a                  *(uint32_t*)esi = ((uint32_t)ebx_1);
0068d22a              
0068d233              Archive::CheckAlignment(edi, 0x10);
0068d23c              uint8_t* eax_3 = Archive::GetBytes(edi, 0x10);
0068d23c              
0068d243              if (eax_3 != 0)
0068d243              {
0068d249                  if ((edi->m_flags & 1) == 0)
0068d249                  {
0068d265                      *(uint32_t*)((char*)esi + 4) = *(uint32_t*)eax_3;
0068d26a                      *(uint32_t*)((char*)esi + 8) = *(uint32_t*)(eax_3 + 4);
0068d270                      *(uint32_t*)((char*)esi + 0xc) = *(uint32_t*)(eax_3 + 8);
0068d276                      *(uint32_t*)((char*)esi + 0x10) = *(uint32_t*)(eax_3 + 0xc);
0068d249                  }
0068d249                  else
0068d249                  {
0068d24d                      *(uint32_t*)eax_3 = *(uint32_t*)((char*)esi + 4);
0068d252                      *(uint32_t*)(eax_3 + 4) = *(uint32_t*)((char*)esi + 8);
0068d258                      *(uint32_t*)(eax_3 + 8) = *(uint32_t*)((char*)esi + 0xc);
0068d25e                      *(uint32_t*)(eax_3 + 0xc) = *(uint32_t*)((char*)esi + 0x10);
0068d249                  }
0068d243              }
0068d243              
0068d288              cond:1_1 = (var_4 + 1) < this->m_num;
0068d28a              var_4 += 1;
0068d28e              arg2 = &arg2->m_buffer.m_masterBuffer;
0068d292          } while (cond:1_1);
0068d1e9      }
0068d180  }


0068d2a0  uint8_t __thiscall CInputMap::ToFileNode(class CInputMap const* this, class PFileNode* arg2)

0068d2a0  {
0068d2a4      class PFileNode* ebx = arg2;
0068d2a4      
0068d2b1      if (ebx == 0)
0068d2b1      {
0068d450          int32_t eax;
0068d450          eax = 0;
0068d456          return 0;
0068d2b1      }
0068d2b1      
0068d2bd      void* __offset(DLListData, -0x10) i_1 = nullptr;
0068d2c1      char var_19 = 1;
0068d2c1      
0068d2c6      if (this->m_listMappings.m_ihlIntrusive.m_hash.m_numElements > 0)
0068d2c6      {
0068d2c8          class DLListData* head_ = this->m_listMappings.m_ihlIntrusive.m_list.head_;
0068d2c8          
0068d2cd          if (head_ == 0)
0068d2d4              i_1 = nullptr;
0068d2cd          else
0068d2cf              i_1 = &head_[-2];
0068d2c6      }
0068d2c6      
0068d2d8      void* __offset(DLListData, -0x20) i = i_1;
0068d2da      class CInputMap::ActionBindingList* var_14 = &this->m_listMappings;
0068d2da      
0068d2de      if (i_1 != 0)
0068d2de      {
0068d439          do
0068d439          {
0068d2e7              class PFileNode* dt_2 = *(int32_t*)((char*)ADJ(i) + -0x1c);
0068d2ea              uint32_t edx_1 = *(int32_t*)((char*)ADJ(i) + -0x18);
0068d2ed              class PFileNode* dt_7 = *(int32_t*)((char*)ADJ(i) + -8);
0068d2f0              int32_t var_c = *(int32_t*)((char*)ADJ(i) + -0x20);
0068d300              class PFileNode* dt_1;
0068d300              uint32_t dt_3;
0068d300              uint32_t edx_2;
0068d300              dt_1 = *(int32_t*)((char*)ebx->vtable + 4)();
0068d300              
0068d307              if (dt_1 == 0)
0068d307                  goto label_68d321;
0068d307              
0068d309              class PFileNode* dt = dt_7;
0068d30a              int32_t var_34_1 = 0x19;
0068d30c              class PFileNode* dt_8 = dt_1;
0068d30c              
0068d317              if (FileNodeUtils::SetNameAsEnum(dt_1, edx_2, dt_3) != 0)
0068d317              {
0068d345                  class PFileNode* eax_4 = *(int32_t*)((char*)dt_1->vtable + 4)();
0068d361                  dt = this->m_pParent->m_rgDevices.m_data[((uint32_t)((int8_t)var_c))].dt;
0068d367                  uint8_t eax_5;
0068d367                  class PFileNode* dt_4;
0068d367                  eax_5 = ControlSpecification::ToFileNode(&var_c, eax_4, dt);
0068d367                  
0068d36e                  if (eax_5 != 0)
0068d36e                  {
0068d3a3                      ebx = edx_1 != 3;
0068d3a3                      
0068d3ac                      if ((dt_2 != 0 || ebx != 0))
0068d3ac                      {
0068d3ae                          dt = dt_2;
0068d3b7                          dt = BitUtils::ReverseBits(dt);
0068d3ba                          PFileNode::MakeSubNodeAsHex(dt_1, dt);
0068d3ba                          
0068d3c1                          if (ebx != 0)
0068d3c1                          {
0068d3c3                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068d3ce                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0068d3d5                              dt = &PStringBase<char>::s_NullBuffer_1[-1];
0068d3d6                              InterlockedIncrement(dt);
0068d3e0                              dt = &PStringBase<char>::s_NullBuffer_2;
0068d3e2                              uint8_t eax_9;
0068d3e2                              class PFileNode* dt_5;
0068d3e2                              eax_9 = ControlActivationTypeToString(edx_1, dt);
0068d3e2                              
0068d3ec                              if (eax_9 != 0)
0068d3ec                              {
0068d3ee                                  class PSRefBufferCharData<char>* dt_6 = PStringBase<char>::s_NullBuffer_2;
0068d3f2                                  dt = dt_5;
0068d3f5                                  dt = dt_6;
0068d3ff                                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0068d403                                  PFileNode::MakeSubNode(dt_1, dt);
0068d3ec                              }
0068d3ec                              
0068d40c                              void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0068d412                              dt = ((char*)esi_3 + 4);
0068d412                              
0068d41f                              if ((InterlockedDecrement(dt) == 0 && esi_3 != 0))
0068d41f                              {
0068d421                                  int32_t edx_8 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
0068d423                                  dt = 1;
0068d427                                  *(uint32_t*)edx_8(dt);
0068d41f                              }
0068d3c1                          }
0068d3ac                      }
0068d3ac                      
0068d429                      ebx = arg2;
0068d36e                  }
0068d36e                  else
0068d36e                  {
0068d370                      dt = dt_4;
0068d378                      PStringBase<char>::PStringBase<char>(&dt, "ERROR - failed to write control …");
0068d37e                      PFileNode::ReportError(dt_1, dt);
0068d386                      dt = dt_1;
0068d389                      PFileNode::RemoveSubNodePtr(ebx, dt);
0068d38e                      var_19 = 0;
0068d36e                  }
0068d317              }
0068d317              else
0068d317              {
0068d319                  dt = dt_1;
0068d31c                  dt_3 = PFileNode::RemoveSubNodePtr(ebx, dt);
0068d321              label_68d321:
0068d321                  dt = dt_3;
0068d329                  PStringBase<char>::PStringBase<char>(&dt, "ERROR - failed to write action.\n");
0068d32f                  PFileNode::ReportError(ebx, dt);
0068d337                  var_19 = 0;
0068d317              }
0068d317              
0068d42d              i_1 = *(int32_t*)((char*)ADJ(i) + -0x10);
0068d42d              
0068d432              if (i_1 == 0)
0068d432                  break;
0068d432              
0068d434              i = ((char*)i_1 - 0x10);
0068d439          } while (i != 0);
0068d2de      }
0068d2de      
0068d43f      i_1 = var_19;
0068d44a      return i_1;
0068d2a0  }

0068d459                                                                             90 90 90 90 90 90 90                           .......

0068d460  uint8_t __thiscall CInputMap::ActionBindingList::FindBestMatch(class CInputMap::ActionBindingList const* this, class QualifiedControl const* arg2, uint32_t* arg3, class QualifiedControl* arg4)

0068d460  {
0068d46f      void __return;
0068d46f      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(this, &__return, arg2);
0068d474      class QualifiedControl* i_2;
0068d474      class QualifiedControl* i_1 = i_2;
0068d474      
0068d47a      if (i_1 == 0)
0068d47a      {
0068d4c3          class IntrusiveHashIterator<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* eax;
0068d4c3          eax = 0;
0068d4c9          return 0;
0068d47a      }
0068d47a      
0068d482      for (class QualifiedControl* i = *(int32_t*)((char*)i_1 + 0xc); i != 0; i = *(int32_t*)((char*)i + 0xc))
0068d482      {
0068d48f          if (QualifiedControl::IsBetterMatch(arg2, i_1, i) != 0)
0068d491              i_1 = i;
0068d482      }
0068d482      
0068d49c      int32_t* eax_2 = arg4;
0068d4a0      *(uint32_t*)eax_2 = i_1->m_key.__inner0;
0068d4a5      eax_2[1] = i_1->m_metamode;
0068d4ab      eax_2[2] = i_1->m_activation;
0068d4b7      *(uint32_t*)arg3 = *(int32_t*)((char*)i_1 + 0x18);
0068d4b9      uint32_t* eax_3;
0068d4b9      eax_3 = 1;
0068d4bf      return 1;
0068d460  }

0068d4cc                                      90 90 90 90                                                              ....

0068d4d0  uint8_t __thiscall CInputMap::ActionBindingList::FindConflictingControls(class CInputMap::ActionBindingList const* this, class QualifiedControl const* arg2, class SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>* arg3)

0068d4d0  {
0068d4e0      SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>::SetNElements(arg3, 0, 1);
0068d4f3      void __return;
0068d4f3      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(this, &__return, arg2);
0068d4fe      int32_t* i_1;
0068d4fe      
0068d4fe      for (int32_t* i = i_1; i != 0; i = i[3])
0068d4fe      {
0068d51c          if (QualifiedControl::IsConflicting(arg2, i) != 0)
0068d51c          {
0068d522              int32_t eax_2 = i[6];
0068d525              class SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>* ecx_3 = arg3;
0068d529              int32_t edx_1 = i[2];
0068d52c              int32_t ebx_1 = *(uint32_t*)i;
0068d52e              int32_t ebp_1 = i[1];
0068d53f              int32_t eax_4 = (ecx_3->m_sizeAndDeallocate & 0x7fffffff);
0068d53f              
0068d546              if (ecx_3->m_num < eax_4)
0068d546                  goto label_68d5af;
0068d546              
0068d548              uint32_t edx_3 = (eax_4 + 1);
0068d548              
0068d54e              if (edx_3 <= 8)
0068d550                  edx_3 = 8;
0068d54e              else if (edx_3 <= 0x4000)
0068d55d              {
0068d57c                  int32_t eflags_1;
0068d57c                  char eax_8;
0068d57c                  eax_8 = __bsr_gprv_memv(edx_3);
0068d588                  int32_t edi_2 = (1 << eax_8);
0068d58a                  ecx_3 = arg3;
0068d58a                  
0068d590                  if (edx_3 > edi_2)
0068d592                      edx_3 = (edi_2 * 2);
0068d55d              }
0068d55d              else
0068d55d              {
0068d561                  int32_t eax_6 = (edx_3 & 0x3fff);
0068d561                  
0068d566                  if (eax_6 != 0)
0068d56f                      edx_3 += (0x4000 - eax_6);
0068d55d              }
0068d55d              
0068d59d              if (SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>::grow(ecx_3, edx_3) != 0)
0068d59d              {
0068d59f                  ecx_3 = arg3;
0068d5af              label_68d5af:
0068d5af                  void* eax_12 = &ecx_3->m_data[ecx_3->m_num];
0068d5b5                  *(uint32_t*)((char*)eax_12 + 8) = edx_1;
0068d5b8                  *(uint32_t*)eax_12 = ebx_1;
0068d5ba                  *(uint32_t*)((char*)eax_12 + 4) = ebp_1;
0068d5bd                  *(uint32_t*)((char*)eax_12 + 0xc) = eax_2;
0068d5c4                  arg3->m_num += 1;
0068d59d              }
0068d51c          }
0068d4fe      }
0068d4fe      
0068d5e7      return arg3->m_num != 0;
0068d4d0  }

0068d509                             8d a4 24 00 00 00 00                                                           ..$....
0068d5ea                                90 90 90 90 90 90                                                            ......

0068d5f0  uint8_t __thiscall CInputMap::FindBestMatch(class CInputMap const* this, class QualifiedControl const* arg2, uint32_t* arg3, class QualifiedControl* arg4)

0068d5f0  {
0068d5f3      /* tailcall */
0068d5f3      return CInputMap::ActionBindingList::FindBestMatch(&this->m_listMappings, arg2, arg3, arg4);
0068d5f0  }

0068d5f8                                                                          90 90 90 90 90 90 90 90                          ........

0068d600  uint8_t __thiscall CInputMap::FindConflictingControls(class CInputMap const* this, class QualifiedControl const* arg2, class SmartArray<_STL::pair<QualifiedControl,unsigned long>,1>* arg3)

0068d600  {
0068d603      /* tailcall */
0068d603      return CInputMap::ActionBindingList::FindConflictingControls(&this->m_listMappings, arg2, arg3);
0068d600  }

0068d608                          90 90 90 90 90 90 90 90                                                          ........

0068d610  uint8_t __thiscall CInputMap::FindKeysForAction(class CInputMap* this, uint32_t arg2, class List<QualifiedControl>* arg3)

0068d610  {
0068d61e      int32_t edx;
0068d61e      edx = 0;
0068d620      void* __offset(DLListData, -0x10) i = nullptr;
0068d620      
0068d625      if (this->m_listMappings.m_ihlIntrusive.m_hash.m_numElements > 0)
0068d625      {
0068d627          class DLListData* head_ = this->m_listMappings.m_ihlIntrusive.m_list.head_;
0068d627          
0068d62c          if (head_ == 0)
0068d633              i = nullptr;
0068d62c          else
0068d62e              i = &head_[-2];
0068d625      }
0068d625      
0068d637      class CInputMap::ActionBindingList* var_4 = &this->m_listMappings;
0068d63b      class CInputMap::ActionBindingList* eax;
0068d63b      
0068d63b      if (i != 0)
0068d63b      {
0068d63d          class List<QualifiedControl>* edi_1 = arg3;
0068d63d          
0068d69c          do
0068d69c          {
0068d648              if (*(int32_t*)((char*)ADJ(i) + 8) == arg2)
0068d648              {
0068d64c                  arg3 = 1;
0068d651                  eax = operator new(0x14);
0068d651                  
0068d65b                  if (eax != 0)
0068d65b                  {
0068d65f                      eax->m_ihlIntrusive.m_hash.vtable = *(int32_t*)((char*)ADJ(i) + -0x10);
0068d664                      eax->m_ihlIntrusive.m_hash.m_aInplaceBuckets[0] = *(int32_t*)((char*)ADJ(i) + -0xc);
0068d66a                      eax->m_ihlIntrusive.m_hash.m_aInplaceBuckets[1] = *(int32_t*)((char*)ADJ(i) + -8);
0068d66d                      eax->m_ihlIntrusive.m_hash.m_aInplaceBuckets[2] = nullptr;
0068d670                      eax->m_ihlIntrusive.m_hash.m_aInplaceBuckets[3] = nullptr;
0068d670                      
0068d676                      if (edi_1->_head != 0)
0068d676                      {
0068d67d                          class ListNode<QualifiedControl>* _tail = edi_1->_tail;
0068d680                          _tail->next = eax;
0068d683                          eax->m_ihlIntrusive.m_hash.m_aInplaceBuckets[3] = _tail;
0068d676                      }
0068d676                      else
0068d678                          edi_1->_head = eax;
0068d678                      
0068d686                      edi_1->_tail = eax;
0068d689                      edi_1->_num_elements += 1;
0068d65b                  }
0068d65b                  
0068d68c                  edx = 1;
0068d648              }
0068d648              
0068d690              class DLListData* dllist_next = ADJ(i)->dllist_next;
0068d690              
0068d695              if (dllist_next == 0)
0068d695                  break;
0068d695              
0068d697              i = &dllist_next[-2];
0068d69c          } while (i != 0);
0068d63b      }
0068d63b      
0068d6a1      eax = edx;
0068d6a7      return eax;
0068d610  }

0068d6aa                                90 90 90 90 90 90                                                            ......

0068d6b0  uint8_t __thiscall CMasterInputMap::ReadDevicesFromFileNode(class CMasterInputMap* this, class PFileNode const* arg2)

0068d6b0  {
0068d6b7      class PFileNode* edi = arg2;
0068d6bb      class CMasterInputMap* this_1 = this;
0068d6bf      class CMasterInputMap* this_2 = this_1;
0068d6c3      uint32_t eax = PFileNode::GetNumSubNodes(edi);
0068d6c8      int32_t ebp = 0;
0068d6c8      
0068d6d0      if (eax <= 0)
0068d6d0      {
0068d6d2          eax = 1;
0068d6db          return 1;
0068d6d0      }
0068d6d0      
0068d6e7      int32_t eax_20;
0068d6e7      void* __offset(PSRefBufferCharData<char>, -0x14) esi_5;
0068d6e7      
0068d6e7      while (true)
0068d6e7      {
0068d6e7          class PFileNode* eax_2 = edi->vtable->GetSubNode(ebp);
0068d6ec          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068d6f1          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0068d6f9          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0068d706          class PStringBase<char>* eax_4;
0068d706          enum DeviceType* edx_1;
0068d706          eax_4 = PFileNode::GetNameAsPString(eax_2, &PStringBase<char>::s_NullBuffer_2);
0068d70f          void var_14;
0068d70f          void* var_34_4 = &var_14;
0068d714          class PSRefBufferCharData<char>** PStringBase<char>::s_NullBuffer_4 = &PStringBase<char>::s_NullBuffer_2;
0068d714          
0068d71f          if (StringToDeviceType(eax_4, edx_1) != 0)
0068d71f          {
0068d725              struct PFileNode::VTable* vtable = eax_2->vtable;
0068d72b              void var_10;
0068d72b              struct Turbine_GUID* var_34_5 = &var_10;
0068d72c              PStringBase<char>::s_NullBuffer_4 = nullptr;
0068d733              PStringBase<char>::s_NullBuffer_4 = vtable->GetSubNode(PStringBase<char>::s_NullBuffer_4);
0068d733              
0068d73d              if (CMasterInputMap::ReadGuidFromFileNode(this_1, PStringBase<char>::s_NullBuffer_4, var_34_5) != 0)
0068d73d              {
0068d74c                  int32_t eax_9 = (this_1->m_rgDevices.m_sizeAndDeallocate & 0x7fffffff);
0068d753                  uint8_t eax_12;
0068d753                  
0068d753                  if (this_1->m_rgDevices.m_num >= eax_9)
0068d761                      eax_12 = SmartArray<DeviceKeyMapEntry,1>::grow(&this_1->m_rgDevices, SmartArray<unsigned long,1>::get_new_size(&this_1->m_rgDevices, (eax_9 + 1)));
0068d761                  
0068d768                  if ((this_1->m_rgDevices.m_num < eax_9 || eax_12 != 0))
0068d768                  {
0068d77e                      __builtin_memcpy(&this_1->m_rgDevices.m_data[this_1->m_rgDevices.m_num], &var_14, 0x14);
0068d783                      edi = arg2;
0068d749                      this_1->m_rgDevices.m_num += 1;
0068d768                  }
0068d768                  
0068d78f                  void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0068d78f                  
0068d7a2                  if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0068d7aa                      *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0068d7aa                  
0068d7b0                  ebp += 1;
0068d7b0                  
0068d7b3                  if (ebp < eax)
0068d7b3                  {
0068d6de                      this_1 = this_2;
0068d6de                      continue;
0068d7b3                  }
0068d7b3                  
0068d7b9                  uint32_t eax_19;
0068d7b9                  eax_19 = 1;
0068d7c2                  return 1;
0068d73d              }
0068d71f          }
0068d71f          
0068d7c5          class PSRefBufferCharData<char>** PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0068d7c9          class PSRefBufferCharData<char>** PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
0068d7ca          PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_3;
0068d7d2          PStringBase<char>::PStringBase<char>(&PStringBase<char>::s_NullBuffer_4, "ERROR - not a valid device "%s"\n");
0068d7d8          PFileNode::ReportError(eax_2, PStringBase<char>::s_NullBuffer_4);
0068d7e1          esi_5 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0068d7eb          eax_20 = InterlockedDecrement(((char*)esi_5 + 4));
0068d7f3          break;
0068d6e7      }
0068d6e7      
0068d7f7      if ((eax_20 == 0 && esi_5 != 0))
0068d7ff          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_5) + -0x14)(1);
0068d7ff      
0068d804      eax_20 = 0;
0068d80a      return 0;
0068d6b0  }

0068d80d                                         90 90 90                                                               ...

0068d810  uint8_t __thiscall CMasterInputMap::IsMetaKey(class CMasterInputMap const* this, class ControlSpecification arg2)

0068d810  {
0068d828      int32_t* eax_3 = this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, arg2) % this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numBuckets)];
0068d82a      bool cond:0 = eax_3 != 0;
0068d82a      
0068d82c      if (eax_3 != 0)
0068d82c      {
0068d832          while (*(uint32_t*)eax_3 != arg2)
0068d832          {
0068d834              eax_3 = eax_3[1];
0068d834              
0068d839              if (eax_3 == 0)
0068d839                  break;
0068d832          }
0068d832          
0068d83b          cond:0 = eax_3 != 0;
0068d82c      }
0068d82c      
0068d83d      eax_3 = cond:0;
0068d841      return eax_3;
0068d810  }

0068d844              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0068d850  uint32_t __thiscall CMasterInputMap::MetaModeFromKey(class CMasterInputMap const* this, class ControlSpecification arg2)

0068d850  {
0068d86f      for (int32_t* i = this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, arg2) % this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
0068d86f      {
0068d873          if (*(uint32_t*)i == arg2)
0068d873          {
0068d885              if (i != 0)
0068d88c                  return i[4];
0068d88c              
0068d885              break;
0068d873          }
0068d86f      }
0068d86f      
0068d880      return 0;
0068d850  }

0068d88f                                               90                                                                 .

0068d890  class ControlSpecification* __thiscall CMasterInputMap::KeyFromMetaMode(class CMasterInputMap const* this, class ControlSpecification* __return, uint32_t arg3)

0068d890  {
0068d89d      void* __offset(DLListData, -0x8) i = nullptr;
0068d89d      
0068d8a1      if (this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numElements > 0)
0068d8a1      {
0068d8a3          class DLListData* head_ = this->m_listMetaKeys.m_ihlIntrusive.m_list.head_;
0068d8a3          
0068d8a8          if (head_ == 0)
0068d8af              i = nullptr;
0068d8a8          else
0068d8aa              i = &head_[-1];
0068d8a1      }
0068d8a1      
0068d8b3      class HashList<ControlSpecification,unsigned long,1>* var_4 = &this->m_listMetaKeys;
0068d8b7      class DLListData* dllist_next;
0068d8b7      
0068d8b7      for (; i != 0; i = &dllist_next[-1])
0068d8b7      {
0068d8c3          if (arg3 == *(int32_t*)((char*)ADJ(i) + 8))
0068d8c3          {
0068d8e6              __return->__inner0 = *(int32_t*)((char*)ADJ(i) + -8);
0068d8ee              return __return;
0068d8c3          }
0068d8c3          
0068d8c5          dllist_next = ADJ(i)->dllist_next;
0068d8c5          
0068d8ca          if (dllist_next == 0)
0068d8ca              break;
0068d8b7      }
0068d8b7      
0068d8d7      __return->__inner0 = 0xffffffff;
0068d8dd      return __return;
0068d890  }

0068d8f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0068d900  uint8_t __thiscall CMasterInputMap::ToFileNode(class CMasterInputMap const* this, class PFileNode* arg2)

0068d900  {
0068d913      class PSRefBufferCharData<char>* m_charbuffer = this->m_strName.m_charbuffer;
0068d91a      void* __offset(PSRefBufferCharData<char>, -0x10) dt = &m_charbuffer[-1];
0068d91d      dt = InterlockedIncrement(dt);
0068d921      dt = m_charbuffer;
0068d923      InterlockedIncrement(&m_charbuffer[-1]);
0068d937      class PFileNode* dt_3 = PFileNode::MakeSubNodeAsPString(arg2, dt);
0068d93f      dt = &m_charbuffer[-1];
0068d93f      
0068d948      if ((InterlockedDecrement(dt) == 0 && m_charbuffer != 0x14))
0068d948      {
0068d94a          int32_t edx_1 = *(int32_t*)((char*)m_charbuffer + -0x14);
0068d94c          dt = 1;
0068d950          *(uint32_t*)edx_1(dt);
0068d948      }
0068d948      
0068d956      void var_90;
0068d956      StringInfo::StringInfo(&var_90);
0068d95b      dt = 3;
0068d96f      StringInfo::SetStringIDandTableEnum(&var_90, compute_str_hash("ID_KeymapHelp"), dt);
0068d974      dt = nullptr;
0068d97f      int32_t __return_1;
0068d97f      class PStringBase<unsigned short>* eax_4 = StringInfo::GetString(&var_90, &__return_1, dt);
0068d984      dt = nullptr;
0068d98d      class PStringBase<char> __return;
0068d98d      PStringBase<unsigned short>::to_spstring(eax_4, &__return, dt);
0068d996      dt = &__return;
0068d999      PFileNode::AddComment(dt_3, dt);
0068d9a2      int32_t* esi_2 = (__return - 0x14);
0068d9a8      dt = &esi_2[1];
0068d9a8      
0068d9b1      if ((InterlockedDecrement(dt) == 0 && esi_2 != 0))
0068d9b1      {
0068d9b3          int32_t edx_2 = *(uint32_t*)esi_2;
0068d9b5          dt = 1;
0068d9b9          *(uint32_t*)edx_2(dt);
0068d9b1      }
0068d9b1      
0068d9bf      int32_t* esi_4 = (__return_1 - 0x14);
0068d9c5      dt = &esi_4[1];
0068d9c5      
0068d9ce      if ((InterlockedDecrement(dt) == 0 && esi_4 != 0))
0068d9ce      {
0068d9d0          int32_t edx_3 = *(uint32_t*)esi_4;
0068d9d2          dt = 1;
0068d9d6          *(uint32_t*)edx_3(dt);
0068d9ce      }
0068d9ce      
0068d9dc      dt = dt_3;
0068d9e6      dt = CMasterInputMap::WriteGuidToFileNode(this, &this->m_guidMap, dt);
0068d9ee      PStringBase<char>::PStringBase<char>(&dt, "Devices");
0068d9fa      class PFileNode* eax_10 = PFileNode::MakeSubNodeAsPString(arg2, dt);
0068d9ff      class CMasterInputMap* ecx_14 = this;
0068da0a      bool cond:0 = ecx_14->m_rgDevices.m_num <= 0;
0068da0c      __return_1 = 0;
0068da10      uint8_t* var_9c;
0068da10      
0068da10      if (!(cond:0))
0068da10      {
0068da16          var_9c = nullptr;
0068dadb          bool cond:2_1;
0068dadb          
0068dadb          do
0068dadb          {
0068da20              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068da25              __return = PStringBase<char>::s_NullBuffer_1;
0068da2c              dt = &PStringBase<char>::s_NullBuffer_1[-1];
0068da2d              InterlockedIncrement(dt);
0068da33              class DeviceKeyMapEntry* m_data_1 = this->m_rgDevices.m_data;
0068da3a              dt = &__return;
0068da3a              
0068da4d              if (DeviceTypeToString(*(uint32_t*)((char*)m_data_1 + var_9c), dt) != 0)
0068da4d              {
0068da4f                  class PStringBase<char> esi_5 = __return;
0068da56                  dt = (esi_5 - 0x10);
0068da59                  dt = InterlockedIncrement(dt);
0068da5d                  dt = esi_5;
0068da5f                  InterlockedIncrement((esi_5 - 0x10));
0068da63                  class PFileNode* dt_1 = PFileNode::MakeSubNodeAsPString(eax_10, dt);
0068da6e                  dt = (esi_5 - 0x10);
0068da6e                  
0068da7d                  if ((InterlockedDecrement(dt) == 0 && esi_5 != 0x14))
0068da7d                  {
0068da7f                      int32_t edx_6 = *(uint32_t*)(esi_5 - 0x14);
0068da81                      dt = 1;
0068da85                      *(uint32_t*)edx_6(dt);
0068da7d                  }
0068da7d                  
0068da8b                  class DeviceKeyMapEntry* m_data = this->m_rgDevices.m_data;
0068da8e                  uint8_t* edx_7 = var_9c;
0068da92                  dt = dt_1;
0068da98                  CMasterInputMap::WriteGuidToFileNode(this, (&m_data->guid + edx_7), dt);
0068da4d              }
0068da4d              
0068daa1              int32_t* esi_8 = (__return - 0x14);
0068daa7              dt = &esi_8[1];
0068daa7              
0068dab4              if ((InterlockedDecrement(dt) == 0 && esi_8 != 0))
0068dab4              {
0068dab6                  int32_t edx_8 = *(uint32_t*)esi_8;
0068dab8                  dt = 1;
0068dabc                  *(uint32_t*)edx_8(dt);
0068dab4              }
0068dab4              
0068dac6              ecx_14 = this;
0068dad1              cond:2_1 = (__return_1 + 1) < ecx_14->m_rgDevices.m_num;
0068dad3              __return_1 += 1;
0068dad7              var_9c = &var_9c[0x14];
0068dadb          } while (cond:2_1);
0068da10      }
0068da10      
0068dae1      dt = ecx_14;
0068dae9      PStringBase<char>::PStringBase<char>(&dt, "MetaKeys");
0068daf5      class PFileNode* eax_20 = PFileNode::MakeSubNodeAsPString(arg2, dt);
0068db09      void* __offset(DLListData, -0x8) i = nullptr;
0068db09      
0068db0d      if (this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numElements > 0)
0068db0d      {
0068db0f          class DLListData* head_ = this->m_listMetaKeys.m_ihlIntrusive.m_list.head_;
0068db0f          
0068db14          if (head_ == 0)
0068db1b              i = nullptr;
0068db14          else
0068db16              i = &head_[-1];
0068db0d      }
0068db0d      
0068db1f      class HashList<ControlSpecification,unsigned long,1>* var_94 = &this->m_listMetaKeys;
0068db23      uint32_t ecx_24;
0068db23      class DLListData* dllist_next;
0068db23      
0068db23      for (; i != 0; i = &dllist_next[-1])
0068db23      {
0068db33          __return_1 = *(int32_t*)((char*)ADJ(i) + 8);
0068db3c          int32_t eflags_1;
0068db3c          int32_t eax_24;
0068db3c          eax_24 = __bsf_gprv_memv(__return_1);
0068db46          int32_t esi_11 = (0x20 - eax_24);
0068db46          
0068db4b          if (esi_11 == 0x21)
0068db4d              esi_11 = 0;
0068db4d          
0068db56          dt_3 = *(int32_t*)((char*)eax_20->vtable + 4)();
0068db56          
0068db5a          if (dt_3 != 0)
0068db5a          {
0068db5c              class IFileNodeName* m_pcName = dt_3->m_pcName;
0068db5c              
0068db61              if (m_pcName != 0)
0068db61              {
0068db63                  struct IFileNodeName::VTable* vtable = m_pcName->vtable;
0068db65                  dt = 1;
0068db67                  vtable->__vecDelDtor(dt);
0068db61              }
0068db61              
0068db69              dt = 8;
0068db6b              dt_3->m_pcName = nullptr;
0068db72              class IFileNodeName* eax_27 = operator new(dt);
0068db72              
0068db7c              if (eax_27 == 0)
0068db89                  eax_27 = nullptr;
0068db7c              else
0068db7c              {
0068db7e                  eax_27->vtable = 0x797108;
0068db84                  *(int32_t*)((char*)eax_27 + 4) = esi_11;
0068db7c              }
0068db7c              
0068db8b              dt_3->m_pcName = eax_27;
0068db5a          }
0068db5a          
0068dba3          dt = this->m_rgDevices.m_data[((uint32_t)((int8_t)*(int32_t*)((char*)ADJ(i) + -8)))].dt;
0068dba7          uint8_t eax_32;
0068dba7          eax_32 = ControlSpecification::ToFileNode(i, dt_3, dt);
0068dba7          
0068dbae          if (eax_32 == 0)
0068dbae          {
0068dd39          label_68dd39:
0068dd39              StringInfo::~StringInfo(&var_90);
0068dd3e              int32_t eax_47;
0068dd3e              eax_47 = 0;
0068dd4a              return 0;
0068dbae          }
0068dbae          
0068dbb4          dllist_next = ADJ(i)->dllist_next;
0068dbb4          
0068dbb9          if (dllist_next == 0)
0068dbb9              break;
0068db23      }
0068db23      
0068dbc6      char* eax_33 = "Bindings";
0068dbc6      
0068dbd5      do
0068dbd5      {
0068dbd0          ecx_24 = *(uint8_t*)eax_33;
0068dbd2          eax_33 = &eax_33[1];
0068dbd5      } while (ecx_24 != 0);
0068dbd5      
0068dbd9      dt = (eax_33 - "indings");
0068dbde      PStringBase<char>::allocate_ref_buffer(&var_9c, dt);
0068dbe3      uint8_t* edx_12 = var_9c;
0068dbe7      char const* const ecx_29 = "Bindings";
0068dbf8      uint8_t i_1;
0068dbf8      
0068dbf8      do
0068dbf8      {
0068dbf0          i_1 = *(uint8_t*)ecx_29;
0068dbf2          ecx_29 = &ecx_29[1];
0068dbf3          *(uint8_t*)edx_12 = i_1;
0068dbf5          edx_12 = &edx_12[1];
0068dbf8      } while (i_1 != 0);
0068dc03      class PStringBase<char> __return_2 = *(int32_t*)((char*)arg2->vtable + 4)();
0068dc0a      class PStringBase<char> __return_3;
0068dc0a      
0068dc0a      if (__return_2 != 0)
0068dc0a      {
0068dc38          uint8_t* eax_37 = var_9c;
0068dc3f          dt = &eax_37[0xfffffff0];
0068dc42          InterlockedIncrement(dt);
0068dc48          int32_t* ecx_33 = *(uint32_t*)(__return_2 + 8);
0068dc48          
0068dc4d          if (ecx_33 != 0)
0068dc4d          {
0068dc4f              int32_t eax_38 = *(uint32_t*)ecx_33;
0068dc51              dt = 1;
0068dc53              *(uint32_t*)eax_38(dt);
0068dc4d          }
0068dc4d          
0068dc55          dt = 8;
0068dc57          *(uint32_t*)(__return_2 + 8) = 0;
0068dc63          void* esi_14 = operator new(dt);
0068dc63          
0068dc6a          if (esi_14 == 0)
0068dc7e              esi_14 = nullptr;
0068dc6a          else
0068dc6a          {
0068dc6c              *(uint32_t*)esi_14 = 0x797140;
0068dc72              dt = &eax_37[0xfffffff0];
0068dc73              *(uint32_t*)((char*)esi_14 + 4) = eax_37;
0068dc76              InterlockedIncrement(dt);
0068dc6a          }
0068dc6a          
0068dc86          *(uint32_t*)(__return_2 + 8) = esi_14;
0068dc8f          dt = &eax_37[0xfffffff0];
0068dc8f          
0068dc98          if ((InterlockedDecrement(dt) == 0 && eax_37 != 0x14))
0068dc98          {
0068dc9a              int32_t edx_14 = *(uint32_t*)(eax_37 - 0x14);
0068dc9c              dt = 1;
0068dca0              *(uint32_t*)edx_14(dt);
0068dc98          }
0068dc98          
0068dca6          void* esi_17 = &var_9c[0xffffffec];
0068dcac          dt = ((char*)esi_17 + 4);
0068dcac          
0068dcb5          if ((InterlockedDecrement(dt) == 0 && esi_17 != 0))
0068dcb5          {
0068dcb7              int32_t edx_15 = *(uint32_t*)esi_17;
0068dcb9              dt = 1;
0068dcbd              *(uint32_t*)edx_15(dt);
0068dcb5          }
0068dcb5          
0068dcbf          __return = __return_2;
0068dcc3          __return_3 = __return_2;
0068dc0a      }
0068dc0a      else
0068dc0a      {
0068dc10          int32_t* esi_13 = &var_9c[0xffffffec];
0068dc16          dt = &esi_13[1];
0068dc16          
0068dc23          if ((InterlockedDecrement(dt) == 0 && esi_13 != 0))
0068dc23          {
0068dc25              int32_t edx_13 = *(uint32_t*)esi_13;
0068dc27              dt = 1;
0068dc2b              *(uint32_t*)edx_13(dt);
0068dc23          }
0068dc23          
0068dc2d          __return_3 = 0;
0068dc2f          __return = 0;
0068dc0a      }
0068dc0a      
0068dcd4      void* __offset(DLListData, -0x8) esi_18 = nullptr;
0068dcd4      
0068dcd8      if (this->m_hashSections.m_ihlIntrusive.m_hash.m_numElements > 0)
0068dcd8      {
0068dcda          class DLListData* head__1 = this->m_hashSections.m_ihlIntrusive.m_list.head_;
0068dcda          
0068dcdf          if (head__1 == 0)
0068dce6              esi_18 = nullptr;
0068dcdf          else
0068dce1              esi_18 = &head__1[-1];
0068dcd8      }
0068dcd8      
0068dcea      class HashList<unsigned long,CInputMap *,1>* var_94_1 = &this->m_hashSections;
0068dcea      
0068dcee      if (esi_18 != 0)
0068dcee      {
0068dcf2          while (true)
0068dcf2          {
0068dcf2              void* dt_2 = *(int32_t*)((char*)ADJ(esi_18) + -8);
0068dcf4              class CInputMap* ebp_1 = *(int32_t*)((char*)ADJ(esi_18) + 8);
0068dcf7              class PFileNode* dt_6;
0068dcf7              uint32_t ecx_37;
0068dcf7              uint32_t edx_17;
0068dcf7              dt_6 = *(uint32_t*)(*(uint32_t*)__return_3 + 4)();
0068dcfa              void* dt_4 = dt_6;
0068dcfa              
0068dcfe              if (dt_4 == 0)
0068dcfe                  goto label_68dd39;
0068dcfe              
0068dd00              dt = dt_2;
0068dd01              int32_t var_bc_9 = 0x1a;
0068dd03              void* dt_5 = dt_4;
0068dd0c              bool cond:4_1 = FileNodeUtils::SetNameAsEnum(dt_6, edx_17, ecx_37) == 0;
0068dd0e              dt = dt_4;
0068dd0e              
0068dd0f              if (cond:4_1)
0068dd0f              {
0068dd30                  PFileNode::RemoveSubNodePtr(__return, dt);
0068dd30                  goto label_68dd39;
0068dd0f              }
0068dd0f              
0068dd13              CInputMap::ToFileNode(ebp_1, dt);
0068dd18              class DLListData* dllist_next_1 = ADJ(esi_18)->dllist_next;
0068dd18              
0068dd1d              if (dllist_next_1 == 0)
0068dd1d                  break;
0068dd1d              
0068dd1f              esi_18 = &dllist_next_1[-1];
0068dd1f              
0068dd24              if (esi_18 == 0)
0068dd24                  break;
0068dd24              
0068dd26              __return_3 = __return;
0068dcf2          }
0068dcee      }
0068dcee      
0068dd51      StringInfo::~StringInfo(&var_90);
0068dd59      int32_t eax_48;
0068dd59      eax_48 = 1;
0068dd62      return 1;
0068d900  }

0068dd65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0068dd70  void __thiscall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, uint32_t arg2)

0068dd70  {
0068dd7b      arg2 = arg2;
0068dd7f      uint8_t edx = ((int8_t)arg2);
0068dd83      this->m_buckets = nullptr;
0068dd86      this->m_firstInterestingBucket = nullptr;
0068dd89      this->m_numBuckets = 0;
0068dd8c      this->m_numElements = 0;
0068dd90      this->vtable = 0x7fffe0;
0068dd96      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068dda9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0068dda9      
0068ddb3      if (eax == bucketSizesEnd_1)
0068ddb5          eax -= 4;
0068ddb5      
0068ddb8      uint32_t eax_1 = *(uint32_t*)eax;
0068ddbd      this->m_numBuckets = eax_1;
0068ddbd      
0068ddc0      if (eax_1 > 0x17)
0068ddd6          this->m_buckets = operator new[]((eax_1 << 2));
0068ddc0      else
0068ddc5          this->m_buckets = &this->m_aInplaceBuckets;
0068ddc5      
0068dddc      struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068dddf      uint32_t ecx_3 = (this->m_numBuckets << 2);
0068dde5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0068ddf6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0068dd70  }

0068ddff                                                                                               90                                 .

0068de00  void __thiscall IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>(class IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* this, uint32_t arg2)

0068de00  {
0068de0b      arg2 = arg2;
0068de0f      uint8_t edx = ((int8_t)arg2);
0068de13      this->m_buckets = nullptr;
0068de16      this->m_firstInterestingBucket = nullptr;
0068de19      this->m_numBuckets = 0;
0068de1c      this->m_numElements = 0;
0068de20      this->vtable = 0x7fffe4;
0068de26      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068de39      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0068de39      
0068de43      if (eax == bucketSizesEnd_1)
0068de45          eax -= 4;
0068de45      
0068de48      uint32_t eax_1 = *(uint32_t*)eax;
0068de4d      this->m_numBuckets = eax_1;
0068de4d      
0068de50      if (eax_1 > 0x17)
0068de66          this->m_buckets = operator new[]((eax_1 << 2));
0068de50      else
0068de55          this->m_buckets = &this->m_aInplaceBuckets;
0068de55      
0068de6c      struct HashList<ControlSpecification,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068de6f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0068de75      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0068de86      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0068de00  }

0068de8f                                               90                                                                 .

0068de90  void __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>(class IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* this, uint32_t arg2)

0068de90  {
0068de9b      arg2 = arg2;
0068de9f      uint8_t edx = ((int8_t)arg2);
0068dea3      this->m_buckets = nullptr;
0068dea6      this->m_firstInterestingBucket = nullptr;
0068dea9      this->m_numBuckets = 0;
0068deac      this->m_numElements = 0;
0068deb0      this->vtable = 0x7fffe8;
0068deb6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068dec9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0068dec9      
0068ded3      if (eax == bucketSizesEnd_1)
0068ded5          eax -= 4;
0068ded5      
0068ded8      uint32_t eax_1 = *(uint32_t*)eax;
0068dedd      this->m_numBuckets = eax_1;
0068dedd      
0068dee0      if (eax_1 > 0x17)
0068def6          this->m_buckets = operator new[]((eax_1 << 2));
0068dee0      else
0068dee5          this->m_buckets = &this->m_aInplaceBuckets;
0068dee5      
0068defc      struct HashList<unsigned long,CInputMap *,1>::HashListData** m_buckets = this->m_buckets;
0068deff      uint32_t ecx_3 = (this->m_numBuckets << 2);
0068df05      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0068df16      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0068de90  }

0068df1f                                                                                               90                                 .

0068df20  void __thiscall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::remove(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, class IntrusiveHashIterator<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1> arg2)

0068df20  {
0068df21      struct HashList<QualifiedControl,unsigned long,1>::HashListData* m_currElement = arg2.m_currElement;
0068df26      struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_currBucket = arg2.m_currBucket;
0068df2a      struct HashList<QualifiedControl,unsigned long,1>::HashListData* m_hashNext = *(uint32_t*)m_currBucket;
0068df2a      
0068df2e      if (m_hashNext != m_currElement)
0068df2e      {
0068df37          struct HashList<QualifiedControl,unsigned long,1>::HashListData* m_hashNext_1;
0068df37          
0068df37          do
0068df37          {
0068df30              m_hashNext_1 = m_hashNext;
0068df32              m_hashNext = m_hashNext->m_hashNext;
0068df37          } while (m_hashNext != m_currElement);
0068df37          
0068df3b          if (m_hashNext_1 != 0)
0068df3b          {
0068df51              m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0068df59              this->m_numElements -= 1;
0068df5d              return;
0068df3b          }
0068df2e      }
0068df2e      
0068df40      *(uint32_t*)m_currBucket = m_hashNext->m_hashNext;
0068df47      this->m_numElements -= 1;
0068df20  }


0068df60  uint8_t __thiscall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, uint32_t arg2)

0068df60  {
0068df6a      if (arg2 == this->m_numBuckets)
0068df6a      {
0068df6c          uint32_t eax;
0068df6c          eax = 0;
0068df6f          return 0;
0068df6a      }
0068df6a      
0068df79      struct HashList<QualifiedControl,unsigned long,1>::HashListData* m_hashNext_2 = nullptr;
0068df79      
0068df7e      while (this->m_numElements != 0)
0068df7e      {
0068df89          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0068df8e          struct HashList<QualifiedControl,unsigned long,1>::HashListData* m_hashNext_3;
0068df8e          int32_t* m_firstInterestingBucket_2;
0068df8e          
0068df8e          if (this->m_firstInterestingBucket == ecx_1)
0068df8e          {
0068dfa1          label_68dfa1:
0068dfa1              m_firstInterestingBucket_2 = nullptr;
0068dfa3              m_hashNext_3 = nullptr;
0068df8e          }
0068df8e          else
0068df8e          {
0068df90              while (true)
0068df90              {
0068df90                  struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
0068df90                  
0068df95                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0068df95                  {
0068dfa7                      struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0068dfaa                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
0068dfac                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0068dfac                      break;
0068df95                  }
0068df95                  
0068df9c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0068df9c                  
0068df9f                  if (&m_firstInterestingBucket[1] == ecx_1)
0068df9f                      goto label_68dfa1;
0068df90              }
0068df8e          }
0068df8e          
0068dfae          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0068dfae          
0068dfb2          if (eax_4 == m_hashNext_3)
0068dfc4              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 0xc);
0068dfb2          else
0068dfb2          {
0068dfbb              void* edx_2;
0068dfbb              
0068dfbb              do
0068dfbb              {
0068dfb4                  edx_2 = eax_4;
0068dfb6                  eax_4 = *(uint32_t*)((char*)eax_4 + 0xc);
0068dfbb              } while (eax_4 != m_hashNext_3);
0068dfbb              
0068dfbf              if (edx_2 != 0)
0068dfcb                  *(uint32_t*)((char*)edx_2 + 0xc) = *(uint32_t*)((char*)eax_4 + 0xc);
0068dfbf              else
0068dfc4                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 0xc);
0068dfb2          }
0068dfb2          
0068dfce          this->m_numElements -= 1;
0068dfd1          m_hashNext_3->m_hashNext = m_hashNext_2;
0068dfd7          m_hashNext_2 = m_hashNext_3;
0068df7e      }
0068df7e      
0068dfdb      struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068dfdb      
0068dfe3      if (m_buckets != &this->m_aInplaceBuckets)
0068dfe6          operator delete[](m_buckets);
0068dfe6      
0068dff5      this->m_buckets = nullptr;
0068dff8      this->m_firstInterestingBucket = nullptr;
0068dffb      this->m_numBuckets = 0;
0068dffe      this->m_numElements = 0;
0068e001      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
0068e008      struct HashList<QualifiedControl,unsigned long,1>::HashListData* m_hashNext_1 = m_hashNext_2;
0068e008      
0068e00a      if (m_hashNext_2 != 0)
0068e00a      {
0068e01f          struct HashList<QualifiedControl,unsigned long,1>::HashListData* m_hashNext;
0068e01f          
0068e01f          do
0068e01f          {
0068e010              m_hashNext = m_hashNext_1->m_hashNext;
0068e016              IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::add_internal(this, m_hashNext_1);
0068e01d              m_hashNext_1 = m_hashNext;
0068e01f          } while (m_hashNext != 0);
0068e00a      }
0068e00a      
0068e024      m_hashNext_1 = 1;
0068e027      return 1;
0068df60  }

0068e02a                                90 90 90 90 90 90                                                            ......

0068e030  uint8_t __thiscall IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* this, uint32_t arg2)

0068e030  {
0068e03a      if (arg2 == this->m_numBuckets)
0068e03a      {
0068e03c          uint32_t eax;
0068e03c          eax = 0;
0068e03f          return 0;
0068e03a      }
0068e03a      
0068e049      struct HashList<ControlSpecification,unsigned long,1>::HashListData* m_hashNext_2 = nullptr;
0068e049      
0068e04e      while (this->m_numElements != 0)
0068e04e      {
0068e059          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0068e05e          struct HashList<ControlSpecification,unsigned long,1>::HashListData* m_hashNext_3;
0068e05e          int32_t* m_firstInterestingBucket_2;
0068e05e          
0068e05e          if (this->m_firstInterestingBucket == ecx_1)
0068e05e          {
0068e071          label_68e071:
0068e071              m_firstInterestingBucket_2 = nullptr;
0068e073              m_hashNext_3 = nullptr;
0068e05e          }
0068e05e          else
0068e05e          {
0068e060              while (true)
0068e060              {
0068e060                  struct HashList<ControlSpecification,unsigned long,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
0068e060                  
0068e065                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0068e065                  {
0068e077                      struct HashList<ControlSpecification,unsigned long,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0068e07a                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
0068e07c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0068e07c                      break;
0068e065                  }
0068e065                  
0068e06c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0068e06c                  
0068e06f                  if (&m_firstInterestingBucket[1] == ecx_1)
0068e06f                      goto label_68e071;
0068e060              }
0068e05e          }
0068e05e          
0068e07e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0068e07e          
0068e082          if (eax_4 == m_hashNext_3)
0068e094              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0068e082          else
0068e082          {
0068e08b              void* edx_2;
0068e08b              
0068e08b              do
0068e08b              {
0068e084                  edx_2 = eax_4;
0068e086                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0068e08b              } while (eax_4 != m_hashNext_3);
0068e08b              
0068e08f              if (edx_2 != 0)
0068e09b                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0068e08f              else
0068e094                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0068e082          }
0068e082          
0068e09e          this->m_numElements -= 1;
0068e0a1          m_hashNext_3->m_hashNext = m_hashNext_2;
0068e0a7          m_hashNext_2 = m_hashNext_3;
0068e04e      }
0068e04e      
0068e0ab      struct HashList<ControlSpecification,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068e0ab      
0068e0b3      if (m_buckets != &this->m_aInplaceBuckets)
0068e0b6          operator delete[](m_buckets);
0068e0b6      
0068e0c5      this->m_buckets = nullptr;
0068e0c8      this->m_firstInterestingBucket = nullptr;
0068e0cb      this->m_numBuckets = 0;
0068e0ce      this->m_numElements = 0;
0068e0d1      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
0068e0d8      struct HashList<ControlSpecification,unsigned long,1>::HashListData* m_hashNext_1 = m_hashNext_2;
0068e0d8      
0068e0da      if (m_hashNext_2 != 0)
0068e0da      {
0068e0ef          struct HashList<ControlSpecification,unsigned long,1>::HashListData* m_hashNext;
0068e0ef          
0068e0ef          do
0068e0ef          {
0068e0e0              m_hashNext = m_hashNext_1->m_hashNext;
0068e0e6              IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::add_internal(this, m_hashNext_1);
0068e0ed              m_hashNext_1 = m_hashNext;
0068e0ef          } while (m_hashNext != 0);
0068e0da      }
0068e0da      
0068e0f4      m_hashNext_1 = 1;
0068e0f7      return 1;
0068e030  }

0068e0fa                                                                                90 90 90 90 90 90                            ......

0068e100  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::resize_internal(class IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* this, uint32_t arg2)

0068e100  {
0068e10a      if (arg2 == this->m_numBuckets)
0068e10a      {
0068e10c          uint32_t eax;
0068e10c          eax = 0;
0068e10f          return 0;
0068e10a      }
0068e10a      
0068e119      struct HashList<unsigned long,CInputMap *,1>::HashListData* m_hashNext_2 = nullptr;
0068e119      
0068e11e      while (this->m_numElements != 0)
0068e11e      {
0068e129          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0068e12e          struct HashList<unsigned long,CInputMap *,1>::HashListData* m_hashNext_3;
0068e12e          int32_t* m_firstInterestingBucket_2;
0068e12e          
0068e12e          if (this->m_firstInterestingBucket == ecx_1)
0068e12e          {
0068e141          label_68e141:
0068e141              m_firstInterestingBucket_2 = nullptr;
0068e143              m_hashNext_3 = nullptr;
0068e12e          }
0068e12e          else
0068e12e          {
0068e130              while (true)
0068e130              {
0068e130                  struct HashList<unsigned long,CInputMap *,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
0068e130                  
0068e135                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0068e135                  {
0068e147                      struct HashList<unsigned long,CInputMap *,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0068e14a                      m_hashNext_3 = *(uint32_t*)m_firstInterestingBucket_1;
0068e14c                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0068e14c                      break;
0068e135                  }
0068e135                  
0068e13c                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0068e13c                  
0068e13f                  if (&m_firstInterestingBucket[1] == ecx_1)
0068e13f                      goto label_68e141;
0068e130              }
0068e12e          }
0068e12e          
0068e14e          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
0068e14e          
0068e152          if (eax_4 == m_hashNext_3)
0068e164              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0068e152          else
0068e152          {
0068e15b              void* edx_2;
0068e15b              
0068e15b              do
0068e15b              {
0068e154                  edx_2 = eax_4;
0068e156                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0068e15b              } while (eax_4 != m_hashNext_3);
0068e15b              
0068e15f              if (edx_2 != 0)
0068e16b                  *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0068e15f              else
0068e164                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
0068e152          }
0068e152          
0068e16e          this->m_numElements -= 1;
0068e171          m_hashNext_3->m_hashNext = m_hashNext_2;
0068e177          m_hashNext_2 = m_hashNext_3;
0068e11e      }
0068e11e      
0068e17b      struct HashList<unsigned long,CInputMap *,1>::HashListData** m_buckets = this->m_buckets;
0068e17b      
0068e183      if (m_buckets != &this->m_aInplaceBuckets)
0068e186          operator delete[](m_buckets);
0068e186      
0068e195      this->m_buckets = nullptr;
0068e198      this->m_firstInterestingBucket = nullptr;
0068e19b      this->m_numBuckets = 0;
0068e19e      this->m_numElements = 0;
0068e1a1      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, arg2);
0068e1a8      struct HashList<unsigned long,CInputMap *,1>::HashListData* m_hashNext_1 = m_hashNext_2;
0068e1a8      
0068e1aa      if (m_hashNext_2 != 0)
0068e1aa      {
0068e1bf          struct HashList<unsigned long,CInputMap *,1>::HashListData* m_hashNext;
0068e1bf          
0068e1bf          do
0068e1bf          {
0068e1b0              m_hashNext = m_hashNext_1->m_hashNext;
0068e1b6              IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::add_internal(this, m_hashNext_1);
0068e1bd              m_hashNext_1 = m_hashNext;
0068e1bf          } while (m_hashNext != 0);
0068e1aa      }
0068e1aa      
0068e1c4      m_hashNext_1 = 1;
0068e1c7      return 1;
0068e100  }

0068e1ca                                90 90 90 90 90 90                                                            ......

0068e1d0  struct HashList<QualifiedControl,unsigned long,1>::HashListData* __thiscall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::remove(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, class QualifiedControl const* arg2)

0068e1d0  {
0068e1e6      int32_t __return;
0068e1e6      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(this, &__return, arg2);
0068e1f1      int32_t result;
0068e1f1      
0068e1f1      if (result == 0)
0068e222          return 0;
0068e222      
0068e200      int32_t var_8;
0068e200      int32_t var_20_1 = var_8;
0068e207      int32_t result_1 = result;
0068e20a      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::remove(this, __return);
0068e217      return result;
0068e1d0  }

0068e225                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0068e230  void __fastcall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::delete_contents(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this)

0068e230  {
0068e238      if (this->m_numElements != 0)
0068e238      {
0068e23a          int32_t* m_firstInterestingBucket_2;
0068e23a          int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
0068e23a          
0068e2a8          do
0068e2a8          {
0068e246              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0068e24c              void* ecx_2;
0068e24c              
0068e24c              if (this->m_firstInterestingBucket == ecx_1)
0068e24c              {
0068e262              label_68e262:
0068e262                  m_firstInterestingBucket_2 = nullptr;
0068e264                  ecx_2 = nullptr;
0068e24c              }
0068e24c              else
0068e24c              {
0068e250                  while (true)
0068e250                  {
0068e250                      struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_firstInterestingBucket = this->m_firstInterestingBucket;
0068e250                      
0068e256                      if (*(uint32_t*)m_firstInterestingBucket != 0)
0068e256                      {
0068e268                          struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0068e26b                          ecx_2 = *(uint32_t*)m_firstInterestingBucket_1;
0068e26d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0068e26d                          break;
0068e256                      }
0068e256                      
0068e25d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0068e25d                      
0068e260                      if (&m_firstInterestingBucket[1] == ecx_1)
0068e260                          goto label_68e262;
0068e250                  }
0068e24c              }
0068e24c              
0068e26f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0068e26f              
0068e273              if (eax_3 == ecx_2)
0068e285                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 0xc);
0068e273              else
0068e273              {
0068e27c                  void* edx_1;
0068e27c                  
0068e27c                  do
0068e27c                  {
0068e275                      edx_1 = eax_3;
0068e277                      eax_3 = *(uint32_t*)((char*)eax_3 + 0xc);
0068e27c                  } while (eax_3 != ecx_2);
0068e27c                  
0068e280                  if (edx_1 != 0)
0068e28c                      *(uint32_t*)((char*)edx_1 + 0xc) = *(uint32_t*)((char*)eax_3 + 0xc);
0068e280                  else
0068e285                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 0xc);
0068e273              }
0068e273              
0068e295              this->m_numElements -= 1;
0068e295              
0068e298              if (ecx_2 != 0)
0068e29b                  operator delete(ecx_2);
0068e2a8          } while (this->m_numElements != 0);
0068e238      }
0068e230  }

0068e23d                                                                                         8d 49 00                               .I.
0068e2ad                                         90 90 90                                                               ...

0068e2b0  uint8_t __fastcall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::grow(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this)

0068e2b0  {
0068e2b0      class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* m_numBuckets = this;
0068e2b2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068e2be      m_numBuckets = this->m_numBuckets;
0068e2d5      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0068e2d5      
0068e2df      if (eax_2 != bucketSizesEnd_1)
0068e2e8          eax_2 = &eax_2[1];
0068e2df      else
0068e2df      {
0068e2e1          eax_2 -= 4;
0068e2e1          
0068e2e6          if (eax_2 != bucketSizesEnd_1)
0068e2e8              eax_2 = &eax_2[1];
0068e2df      }
0068e2df      
0068e2f8      return IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
0068e2b0  }

0068e2f9                                                                             90 90 90 90 90 90 90                           .......

0068e300  uint8_t __fastcall IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::grow(class IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* this)

0068e300  {
0068e300      class IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* m_numBuckets = this;
0068e302      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068e30e      m_numBuckets = this->m_numBuckets;
0068e325      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0068e325      
0068e32f      if (eax_2 != bucketSizesEnd_1)
0068e338          eax_2 = &eax_2[1];
0068e32f      else
0068e32f      {
0068e331          eax_2 -= 4;
0068e331          
0068e336          if (eax_2 != bucketSizesEnd_1)
0068e338              eax_2 = &eax_2[1];
0068e32f      }
0068e32f      
0068e348      return IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
0068e300  }

0068e349                             90 90 90 90 90 90 90                                                           .......

0068e350  uint8_t __fastcall IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::grow(class IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* this)

0068e350  {
0068e350      class IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* m_numBuckets = this;
0068e352      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0068e35e      m_numBuckets = this->m_numBuckets;
0068e375      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
0068e375      
0068e37f      if (eax_2 != bucketSizesEnd_1)
0068e388          eax_2 = &eax_2[1];
0068e37f      else
0068e37f      {
0068e381          eax_2 -= 4;
0068e381          
0068e386          if (eax_2 != bucketSizesEnd_1)
0068e388              eax_2 = &eax_2[1];
0068e37f      }
0068e37f      
0068e398      return IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::resize_internal(this, *(uint32_t*)eax_2);
0068e350  }

0068e399                                                                             90 90 90 90 90 90 90                           .......

0068e3a0  void __fastcall IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::delete_contents(class IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this)

0068e3a0  {
0068e3e8      class DLListData* head_;
0068e3e8      
0068e3e8      do
0068e3e8      {
0068e3a4          head_ = this->m_list.head_;
0068e3a4          
0068e3a9          if (head_ == 0)
0068e3a9              break;
0068e3a9          
0068e3ab          class DLListData* dllist_prev = head_->dllist_prev;
0068e3ab          
0068e3b0          if (dllist_prev == 0)
0068e3b0          {
0068e3b8              class DLListData* dllist_next = head_->dllist_next;
0068e3bc              this->m_list.head_ = dllist_next;
0068e3bc              
0068e3bf              if (dllist_next != 0)
0068e3c1                  dllist_next->dllist_prev = nullptr;
0068e3b0          }
0068e3b0          else
0068e3b4              dllist_prev->dllist_next = head_->dllist_next;
0068e3b4          
0068e3c4          class DLListData* dllist_next_1 = head_->dllist_next;
0068e3c4          
0068e3c8          if (dllist_next_1 == 0)
0068e3c8          {
0068e3d5              class DLListData* dllist_prev_1 = this->m_list.tail_->dllist_prev;
0068e3da              this->m_list.tail_ = dllist_prev_1;
0068e3da              
0068e3dd              if (dllist_prev_1 != 0)
0068e3df                  dllist_prev_1->dllist_next = 0;
0068e3c8          }
0068e3c8          else
0068e3cd              dllist_next_1->dllist_prev = head_->dllist_prev;
0068e3cd          
0068e3e3          head_->dllist_next = 0;
0068e3e5          head_->dllist_prev = nullptr;
0068e3e8      } while (head_ != 0);
0068e3ec      /* tailcall */
0068e3ec      return IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::delete_contents(this);
0068e3a0  }

0068e3f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0068e400  void __thiscall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::add_internal(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, struct HashList<QualifiedControl,unsigned long,1>::HashListData* arg2)

0068e400  {
0068e40e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
0068e412          IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::grow(this);
0068e412      
0068e425      struct HashList<QualifiedControl,unsigned long,1>::HashListData** eax_4 = &this->m_buckets[(COMBINE(0, arg2->m_hashKey.m_key.__inner0) % this->m_numBuckets)];
0068e42a      arg2->m_hashNext = *(uint32_t*)eax_4;
0068e42d      *(uint32_t*)eax_4 = arg2;
0068e42d      
0068e432      if (eax_4 < this->m_firstInterestingBucket)
0068e434          this->m_firstInterestingBucket = eax_4;
0068e434      
0068e437      this->m_numElements += 1;
0068e400  }

0068e43e                                                                                            90 90                                ..

0068e440  void __thiscall IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::add_internal(class IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* this, struct HashList<ControlSpecification,unsigned long,1>::HashListData* arg2)

0068e440  {
0068e44e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
0068e452          IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::grow(this);
0068e452      
0068e465      struct HashList<ControlSpecification,unsigned long,1>::HashListData** eax_4 = &this->m_buckets[(COMBINE(0, arg2->m_hashKey.__inner0) % this->m_numBuckets)];
0068e46a      arg2->m_hashNext = *(uint32_t*)eax_4;
0068e46d      *(uint32_t*)eax_4 = arg2;
0068e46d      
0068e472      if (eax_4 < this->m_firstInterestingBucket)
0068e474          this->m_firstInterestingBucket = eax_4;
0068e474      
0068e477      this->m_numElements += 1;
0068e440  }

0068e47e                                                                                            90 90                                ..

0068e480  void __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::add_internal(class IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* this, struct HashList<unsigned long,CInputMap *,1>::HashListData* arg2)

0068e480  {
0068e48e      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
0068e492          IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::grow(this);
0068e492      
0068e4a5      struct HashList<unsigned long,CInputMap *,1>::HashListData** eax_4 = &this->m_buckets[(COMBINE(0, arg2->m_hashKey) % this->m_numBuckets)];
0068e4aa      arg2->m_hashNext = *(uint32_t*)eax_4;
0068e4ad      *(uint32_t*)eax_4 = arg2;
0068e4ad      
0068e4b2      if (eax_4 < this->m_firstInterestingBucket)
0068e4b4          this->m_firstInterestingBucket = eax_4;
0068e4b4      
0068e4b7      this->m_numElements += 1;
0068e480  }

0068e4be                                                                                            90 90                                ..

0068e4c0  uint8_t __thiscall IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::add(class IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, struct HashList<QualifiedControl,unsigned long,1>::HashListData* arg2)

0068e4c0  {
0068e4d1      void __return;
0068e4d1      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(this, &__return, arg2);
0068e4dc      int32_t var_4;
0068e4dc      
0068e4dc      if (var_4 != 0)
0068e4dc      {
0068e4df          int32_t eax;
0068e4df          eax = 0;
0068e4e5          return 0;
0068e4dc      }
0068e4dc      
0068e4f3      if ((this->m_numBuckets << 1) < (this->m_numElements + 1))
0068e4f7          IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::grow(this);
0068e4f7      
0068e500      uint32_t temp1 = (COMBINE(0, arg2->m_hashKey.m_key.__inner0) % this->m_numBuckets);
0068e503      struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068e509      arg2->m_hashNext = m_buckets[temp1];
0068e50c      m_buckets[temp1] = arg2;
0068e512      struct HashList<QualifiedControl,unsigned long,1>::HashListData** eax_2 = &m_buckets[temp1];
0068e512      
0068e517      if (eax_2 < this->m_firstInterestingBucket)
0068e519          this->m_firstInterestingBucket = eax_2;
0068e519      
0068e51c      this->m_numElements += 1;
0068e520      eax_2 = 1;
0068e526      return 1;
0068e4c0  }

0068e529                             90 90 90 90 90 90 90                                                           .......

0068e530  uint8_t __thiscall IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::add(class IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* this, struct HashList<ControlSpecification,unsigned long,1>::HashListData* arg2)

0068e530  {
0068e538      union __inner0 = arg2->m_hashKey.__inner0;
0068e53b      uint32_t m_numBuckets = this->m_numBuckets;
0068e53b      
0068e54e      for (int32_t* i = this->m_buckets[(COMBINE(0, __inner0) % m_numBuckets)]; i != 0; i = i[1])
0068e54e      {
0068e552          if (*(uint32_t*)i == __inner0)
0068e552          {
0068e59e              if (i == 0)
0068e59e                  break;
0068e59e              
0068e5a2              i = 0;
0068e5a5              return 0;
0068e552          }
0068e54e      }
0068e54e      
0068e564      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0068e568          IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::grow(this);
0068e568      
0068e571      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey.__inner0) % this->m_numBuckets);
0068e574      struct HashList<ControlSpecification,unsigned long,1>::HashListData** m_buckets = this->m_buckets;
0068e57a      arg2->m_hashNext = m_buckets[temp1_1];
0068e57d      m_buckets[temp1_1] = arg2;
0068e583      struct HashList<ControlSpecification,unsigned long,1>::HashListData** eax_4 = &m_buckets[temp1_1];
0068e583      
0068e588      if (eax_4 < this->m_firstInterestingBucket)
0068e58a          this->m_firstInterestingBucket = eax_4;
0068e58a      
0068e592      this->m_numElements += 1;
0068e596      uint32_t eax_6;
0068e596      eax_6 = 1;
0068e599      return 1;
0068e530  }

0068e5a8                          90 90 90 90 90 90 90 90                                                          ........

0068e5b0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::add(class IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* this, struct HashList<unsigned long,CInputMap *,1>::HashListData* arg2)

0068e5b0  {
0068e5b8      uint32_t m_hashKey = arg2->m_hashKey;
0068e5bb      uint32_t m_numBuckets = this->m_numBuckets;
0068e5bb      
0068e5ce      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0068e5ce      {
0068e5d2          if (*(uint32_t*)i == m_hashKey)
0068e5d2          {
0068e61e              if (i == 0)
0068e61e                  break;
0068e61e              
0068e622              i = 0;
0068e625              return 0;
0068e5d2          }
0068e5ce      }
0068e5ce      
0068e5e4      if ((m_numBuckets * 2) < (this->m_numElements + 1))
0068e5e8          IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::grow(this);
0068e5e8      
0068e5f1      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
0068e5f4      struct HashList<unsigned long,CInputMap *,1>::HashListData** m_buckets = this->m_buckets;
0068e5fa      arg2->m_hashNext = m_buckets[temp1_1];
0068e5fd      m_buckets[temp1_1] = arg2;
0068e603      struct HashList<unsigned long,CInputMap *,1>::HashListData** eax_4 = &m_buckets[temp1_1];
0068e603      
0068e608      if (eax_4 < this->m_firstInterestingBucket)
0068e60a          this->m_firstInterestingBucket = eax_4;
0068e60a      
0068e612      this->m_numElements += 1;
0068e616      uint32_t eax_6;
0068e616      eax_6 = 1;
0068e619      return 1;
0068e5b0  }

0068e628                          90 90 90 90 90 90 90 90                                                          ........

0068e630  uint8_t __thiscall IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::place_at_tail(class IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, struct HashList<QualifiedControl,unsigned long,1>::HashListData* arg2)

0068e630  {
0068e64b      void __return;
0068e64b      
0068e64b      if (IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(this, &__return, arg2)->m_currElement == 0)
0068e66f          IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::add(this, arg2);
0068e64b      else if (arg2 == 0)
0068e665          DLListBase::Remove(&this->m_list, nullptr);
0068e64f      else
0068e658          DLListBase::Remove(&this->m_list, &arg2->dllist_next);
0068e658      
0068e676      class DLListData** eax_2;
0068e676      
0068e676      if (arg2 == 0)
0068e67d          eax_2 = nullptr;
0068e676      else
0068e678          eax_2 = &arg2->dllist_next;
0068e678      
0068e687      DLListBase::InsertAfter(&this->m_list, eax_2, this->m_list.tail_);
0068e68d      int32_t eax_3;
0068e68d      eax_3 = 1;
0068e693      return 1;
0068e630  }

0068e696                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0068e6a0  uint8_t __thiscall IntrusiveHashList<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::place_at_tail(class IntrusiveHashList<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* this, struct HashList<ControlSpecification,unsigned long,1>::HashListData* arg2)

0068e6a0  {
0068e6a8      union __inner0 = arg2->m_hashKey.__inner0;
0068e6b7      int32_t* eax_3 = this->m_hash.m_buckets[(COMBINE(0, __inner0) % this->m_hash.m_numBuckets)];
0068e6b7      
0068e6bb      if (eax_3 == 0)
0068e6bb      {
0068e6ce      label_68e6ce:
0068e6ce          IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::add(this, arg2);
0068e6bb      }
0068e6bb      else
0068e6bb      {
0068e6c2          while (*(uint32_t*)eax_3 != __inner0)
0068e6c2          {
0068e6c4              eax_3 = eax_3[1];
0068e6c4              
0068e6c9              if (eax_3 == 0)
0068e6c9                  goto label_68e6ce_1;
0068e6c2          }
0068e6c2          
0068e6ec          if (eax_3 == 0)
0068e6ec          {
0068e6ce          label_68e6ce_1:
0068e6ce              IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::add(this, arg2);
0068e6ec          }
0068e6ec          else
0068e6f5              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
0068e6bb      }
0068e6bb      
0068e6de      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
0068e6e4      int32_t eax_5;
0068e6e4      eax_5 = 1;
0068e6e7      return 1;
0068e6a0  }

0068e6fc                                                                                      90 90 90 90                              ....

0068e700  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::place_at_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* this, struct HashList<unsigned long,CInputMap *,1>::HashListData* arg2)

0068e700  {
0068e708      uint32_t m_hashKey = arg2->m_hashKey;
0068e717      int32_t* eax_3 = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)];
0068e717      
0068e71b      if (eax_3 == 0)
0068e71b      {
0068e72e      label_68e72e:
0068e72e          IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::add(this, arg2);
0068e71b      }
0068e71b      else
0068e71b      {
0068e722          while (*(uint32_t*)eax_3 != m_hashKey)
0068e722          {
0068e724              eax_3 = eax_3[1];
0068e724              
0068e729              if (eax_3 == 0)
0068e729                  goto label_68e72e_1;
0068e722          }
0068e722          
0068e74c          if (eax_3 == 0)
0068e74c          {
0068e72e          label_68e72e_1:
0068e72e              IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::add(this, arg2);
0068e74c          }
0068e74c          else
0068e755              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
0068e71b      }
0068e71b      
0068e73e      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
0068e744      int32_t eax_5;
0068e744      eax_5 = 1;
0068e747      return 1;
0068e700  }

0068e75c                                                                                      90 90 90 90                              ....

0068e760  uint8_t __fastcall CInputMap::UnbindByKey(class CInputMap* this, class QualifiedControl arg2)

0068e760  {
0068e774      void __return;
0068e774      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(&this->m_listMappings.m_ihlIntrusive.m_hash, &__return, &arg2);
0068e77f      void* var_4;
0068e77f      
0068e77f      if (var_4 != 0)
0068e77f      {
0068e788          DLListBase::Remove(&this->m_listMappings.m_ihlIntrusive.m_list, ((char*)var_4 + 0x10));
0068e794          IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::remove(&this->m_listMappings, &arg2);
0068e79a          operator delete(var_4);
0068e77f      }
0068e77f      
0068e7ae      return var_4 != 0;
0068e760  }

0068e7b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0068e7c0  void __fastcall CMasterInputMap::CMasterInputMap(class CMasterInputMap* this)

0068e7c0  {
0068e7cb      DBObj::DBObj(this, INVALID_DID.id);
0068e7d8      this->vtable = 0x800158;
0068e7de      PStringBase<char>::PStringBase<char>(&this->m_strName, "User Defined Keymap");
0068e7eb      this->m_rgDevices.m_data = 0;
0068e7ee      this->m_rgDevices.m_sizeAndDeallocate = 0;
0068e7f1      this->m_rgDevices.m_num = 0;
0068e7f4      IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>(&this->m_listMetaKeys, 0);
0068e7e5      this->m_listMetaKeys.m_ihlIntrusive.m_list.head_ = 0;
0068e7e5      this->m_listMetaKeys.m_ihlIntrusive.m_list.tail_ = nullptr;
0068e808      IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>(&this->m_hashSections, 0);
0068e7ff      this->m_hashSections.m_ihlIntrusive.m_list.head_ = 0;
0068e7ff      this->m_hashSections.m_ihlIntrusive.m_list.tail_ = nullptr;
0068e814      this->m_dwUsedMetaKeys = 0;
0068e7c0  }

0068e81f                                                                                               90                                 .

0068e820  uint32_t CMasterInputMap::GetDBOType(class CMasterInputMap const* this @ ecx) __pure

0068e820  {
0068e825      return 0x1d;
0068e820  }

0068e826                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0068e830  uint8_t __thiscall IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::push_tail(class IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* this, struct HashList<QualifiedControl,unsigned long,1>::HashListData* arg2)

0068e830  {
0068e84b      void __return;
0068e84b      
0068e84b      if (IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(this, &__return, arg2)->m_currElement != 0)
0068e84b      {
0068e84e          class IntrusiveHashIterator<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>* eax;
0068e84e          eax = 0;
0068e854          return 0;
0068e84b      }
0068e84b      
0068e85a      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::add(this, arg2);
0068e861      class DLListData** eax_1;
0068e861      
0068e861      if (arg2 == 0)
0068e868          eax_1 = nullptr;
0068e861      else
0068e863          eax_1 = &arg2->dllist_next;
0068e863      
0068e872      DLListBase::InsertAfter(&this->m_list, eax_1, this->m_list.tail_);
0068e878      int32_t eax_2;
0068e878      eax_2 = 1;
0068e87e      return 1;
0068e830  }

0068e881     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0068e890  uint8_t __thiscall HashList<ControlSpecification,unsigned long,1>::move_to_tail(class HashList<ControlSpecification,unsigned long,1>* this, class ControlSpecification const* arg2)

0068e890  {
0068e895      union __inner0 = arg2->__inner0;
0068e8a4      int32_t* eax_3 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, __inner0) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
0068e8a4      
0068e8a8      if (eax_3 != 0)
0068e8a8      {
0068e8b2          while (*(uint32_t*)eax_3 != __inner0)
0068e8b2          {
0068e8b4              eax_3 = eax_3[1];
0068e8b4              
0068e8b9              if (eax_3 == 0)
0068e8b9              {
0068e8bb                  eax_3 = 0;
0068e8be                  return 0;
0068e8b9              }
0068e8b2          }
0068e8b2          
0068e8c3          if (eax_3 != 0)
0068e8d0              /* tailcall */
0068e8d0              return IntrusiveHashList<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::place_at_tail(this, eax_3);
0068e8a8      }
0068e8a8      
0068e8c5      eax_3 = 0;
0068e8c8      return 0;
0068e890  }

0068e8d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0068e8e0  uint8_t __thiscall IntrusiveHashList<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::push_tail(class IntrusiveHashList<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>* this, struct HashList<ControlSpecification,unsigned long,1>::HashListData* arg2)

0068e8e0  {
0068e8e8      union __inner0 = arg2->m_hashKey.__inner0;
0068e8e8      
0068e8fb      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, __inner0) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
0068e8fb      {
0068e902          if (*(uint32_t*)i == __inner0)
0068e902          {
0068e92c              if (i == 0)
0068e92c                  break;
0068e92c              
0068e92f              i = 0;
0068e932              return 0;
0068e902          }
0068e8fb      }
0068e8fb      
0068e90e      IntrusiveHashTable<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::add(this, arg2);
0068e91e      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
0068e924      int32_t eax_4;
0068e924      eax_4 = 1;
0068e927      return 1;
0068e8e0  }

0068e935                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0068e940  uint8_t __thiscall HashList<unsigned long,CInputMap *,1>::move_to_tail(class HashList<unsigned long,CInputMap *,1>* this, uint32_t const* arg2)

0068e940  {
0068e945      uint32_t const i = *(uint32_t*)arg2;
0068e954      int32_t* eax_3 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
0068e954      
0068e958      if (eax_3 != 0)
0068e958      {
0068e962          while (*(uint32_t*)eax_3 != i)
0068e962          {
0068e964              eax_3 = eax_3[1];
0068e964              
0068e969              if (eax_3 == 0)
0068e969              {
0068e96b                  eax_3 = 0;
0068e96e                  return 0;
0068e969              }
0068e962          }
0068e962          
0068e973          if (eax_3 != 0)
0068e980              /* tailcall */
0068e980              return IntrusiveHashList<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::place_at_tail(this, eax_3);
0068e958      }
0068e958      
0068e975      eax_3 = 0;
0068e978      return 0;
0068e940  }

0068e985                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0068e990  uint8_t __thiscall IntrusiveHashList<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::push_tail(class IntrusiveHashList<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>* this, struct HashList<unsigned long,CInputMap *,1>::HashListData* arg2)

0068e990  {
0068e998      uint32_t m_hashKey = arg2->m_hashKey;
0068e998      
0068e9ab      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, m_hashKey) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
0068e9ab      {
0068e9b2          if (*(uint32_t*)i == m_hashKey)
0068e9b2          {
0068e9dc              if (i == 0)
0068e9dc                  break;
0068e9dc              
0068e9df              i = 0;
0068e9e2              return 0;
0068e9b2          }
0068e9ab      }
0068e9ab      
0068e9be      IntrusiveHashTable<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::add(this, arg2);
0068e9ce      DLListBase::InsertAfter(&this->m_list, &arg2->dllist_next, this->m_list.tail_);
0068e9d4      int32_t eax_4;
0068e9d4      eax_4 = 1;
0068e9d7      return 1;
0068e990  }

0068e9e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0068e9f0  class DBObj* CMasterInputMap::Allocate(class CMasterInputMap const* this @ ecx)

0068e9f0  {
0068e9f0      /* tailcall */
0068e9f0      return CMasterInputMap::Allocator();
0068e9f0  }

0068e9f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0068ea00  uint8_t __thiscall CInputMap::UnbindAllByAction(class CInputMap* this, uint32_t arg2)

0068ea00  {
0068ea0f      int32_t edx;
0068ea0f      edx = 0;
0068ea11      void* __offset(DLListData, -0x10) dllist_next = nullptr;
0068ea11      
0068ea15      if (this->m_listMappings.m_ihlIntrusive.m_hash.m_numElements > 0)
0068ea15      {
0068ea17          class DLListData* head_ = this->m_listMappings.m_ihlIntrusive.m_list.head_;
0068ea17          
0068ea1c          if (head_ == 0)
0068ea23              dllist_next = nullptr;
0068ea1c          else
0068ea1e              dllist_next = &head_[-2];
0068ea15      }
0068ea15      
0068ea27      class CInputMap::ActionBindingList* dllist_next_4 = &this->m_listMappings;
0068ea29      void* __offset(DLListData, -0x10) i = dllist_next;
0068ea2b      class CInputMap::ActionBindingList* dllist_next_3 = dllist_next_4;
0068ea2b      
0068ea2f      if (dllist_next != 0)
0068ea2f      {
0068eb1c          do
0068eb1c          {
0068ea47              if (*(int32_t*)((char*)ADJ(i) + 8) != arg2)
0068ea47              {
0068eb2e                  dllist_next = ADJ(i)->dllist_next;
0068eb2e                  
0068eb33                  if (dllist_next == 0)
0068eb33                      break;
0068eb33                  
0068eb35                  i = ((char*)dllist_next - 0x10);
0068ea47              }
0068ea47              else
0068ea47              {
0068ea4d                  class DLListData* dllist_next_1 = ADJ(i)->dllist_next;
0068ea52                  class DLListData* ecx_1 = ((char*)i + 0x10);
0068ea5a                  void* __offset(DLListData, -0x10) i_1 = i;
0068ea5a                  
0068ea5c                  if (dllist_next_1 == 0)
0068ea63                      i = nullptr;
0068ea5c                  else
0068ea5e                      i = &dllist_next_1[-2];
0068ea5e                  
0068ea67                  int32_t eax_2 = -(i_1);
0068ea6b                  void* eax_4 = ((eax_2 - eax_2) & ecx_1);
0068ea6d                  int32_t* ecx_2 = *(uint32_t*)((char*)eax_4 + 4);
0068ea6d                  
0068ea72                  if (ecx_2 == 0)
0068ea72                  {
0068ea7d                      class DLListData* dllist_next_2 = dllist_next_4->m_ihlIntrusive.m_list.head_->dllist_next;
0068ea81                      dllist_next_4->m_ihlIntrusive.m_list.head_ = dllist_next_2;
0068ea81                      
0068ea84                      if (dllist_next_2 != 0)
0068ea86                          dllist_next_2->dllist_prev = nullptr;
0068ea72                  }
0068ea72                  else
0068ea76                      *(uint32_t*)ecx_2 = *(uint32_t*)eax_4;
0068ea76                  
0068ea89                  void* ecx_4 = *(uint32_t*)eax_4;
0068ea89                  
0068ea8d                  if (ecx_4 == 0)
0068ea8d                  {
0068ea9a                      class DLListData* dllist_prev = dllist_next_4->m_ihlIntrusive.m_list.tail_->dllist_prev;
0068ea9f                      dllist_next_4->m_ihlIntrusive.m_list.tail_ = dllist_prev;
0068ea9f                      
0068eaa2                      if (dllist_prev != 0)
0068eaa4                          dllist_prev->dllist_next = 0;
0068ea8d                  }
0068ea8d                  else
0068ea92                      *(uint32_t*)((char*)ecx_4 + 4) = *(uint32_t*)((char*)eax_4 + 4);
0068ea92                  
0068eaa6                  *(uint32_t*)eax_4 = 0;
0068eaa8                  *(uint32_t*)((char*)eax_4 + 4) = 0;
0068eab1                  dllist_next = ControlSpecification::operator%(i_1, dllist_next_4->m_ihlIntrusive.m_hash.m_numBuckets);
0068eab6                  struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_buckets = dllist_next_4->m_ihlIntrusive.m_hash.m_buckets;
0068eab9                  class QualifiedControl* j = m_buckets[dllist_next];
0068eabe                  void* edi_1 = &m_buckets[dllist_next];
0068eabe                  
0068eac1                  for (; j != 0; j = *(int32_t*)((char*)j + 0xc))
0068eac1                  {
0068eac6                      dllist_next = QualifiedControl::operator==(j, i_1);
0068eac6                      
0068eacd                      if (dllist_next != 0)
0068eacd                      {
0068eada                          if (j != 0)
0068eada                          {
0068eadc                              void* eax_5 = *(uint32_t*)edi_1;
0068eadc                              
0068eae0                              if (eax_5 == j)
0068eaf2                                  *(uint32_t*)edi_1 = *(uint32_t*)((char*)eax_5 + 0xc);
0068eae0                              else
0068eae0                              {
0068eae9                                  void* ecx_8;
0068eae9                                  
0068eae9                                  do
0068eae9                                  {
0068eae2                                      ecx_8 = eax_5;
0068eae4                                      eax_5 = *(uint32_t*)((char*)eax_5 + 0xc);
0068eae9                                  } while (eax_5 != j);
0068eae9                                  
0068eaed                                  if (ecx_8 != 0)
0068eaf9                                      *(uint32_t*)((char*)ecx_8 + 0xc) = *(uint32_t*)((char*)eax_5 + 0xc);
0068eaed                                  else
0068eaf2                                      *(uint32_t*)edi_1 = *(uint32_t*)((char*)eax_5 + 0xc);
0068eae0                              }
0068eae0                              
0068eafc                              dllist_next = dllist_next_3;
0068eb00                              *(int32_t*)((char*)ADJ(dllist_next) + 0x5c) -= 1;
0068eada                          }
0068eada                          
0068eada                          break;
0068eacd                      }
0068eac1                  }
0068eac1                  
0068eb05                  if (i_1 != 0)
0068eb08                      dllist_next = operator delete(i_1);
0068eb08                  
0068eb10                  dllist_next_4 = dllist_next_3;
0068eb14                  edx = 1;
0068ea47              }
0068eb1c          } while (i != 0);
0068ea2f      }
0068ea2f      
0068eb25      dllist_next = edx;
0068eb2b      return dllist_next;
0068ea00  }

0068ea37                                                                       8d a4 24 00 00 00 00 8b ff                         ..$......
0068eb3a                                                                                90 90 90 90 90 90                            ......

0068eb40  void __fastcall CMasterInputMap::Clear(class CMasterInputMap* this)

0068eb40  {
0068eb45      int32_t edi;
0068eb45      int32_t var_10 = edi;
0068eb49      HashList<ControlSpecification,unsigned long,1>::flush(&this->m_listMetaKeys);
0068eb49      
0068eb56      while (true)
0068eb56      {
0068eb56          void* __offset(DLListData, -0x8) ebx_1 = nullptr;
0068eb56          
0068eb5a          if (this->m_hashSections.m_ihlIntrusive.m_hash.m_numElements <= 0)
0068eb5a              break;
0068eb5a          
0068eb60          class DLListData* head_ = this->m_hashSections.m_ihlIntrusive.m_list.head_;
0068eb60          
0068eb68          if (head_ != 0)
0068eb68          {
0068eb6a              class DLListData* dllist_prev = head_->dllist_prev;
0068eb6a              
0068eb6f              if (dllist_prev == 0)
0068eb6f              {
0068eb77                  class DLListData* dllist_next = head_->dllist_next;
0068eb7b                  this->m_hashSections.m_ihlIntrusive.m_list.head_ = dllist_next;
0068eb7b                  
0068eb81                  if (dllist_next != 0)
0068eb83                      dllist_next->dllist_prev = nullptr;
0068eb6f              }
0068eb6f              else
0068eb73                  dllist_prev->dllist_next = head_->dllist_next;
0068eb73              
0068eb86              class DLListData* dllist_next_1 = head_->dllist_next;
0068eb86              
0068eb8a              if (dllist_next_1 == 0)
0068eb8a              {
0068eb9a                  class DLListData* dllist_prev_1 = this->m_hashSections.m_ihlIntrusive.m_list.tail_->dllist_prev;
0068eb9f                  this->m_hashSections.m_ihlIntrusive.m_list.tail_ = dllist_prev_1;
0068eb9f                  
0068eba5                  if (dllist_prev_1 != 0)
0068eba7                      dllist_prev_1->dllist_next = 0;
0068eb8a              }
0068eb8a              else
0068eb8f                  dllist_next_1->dllist_prev = head_->dllist_prev;
0068eb8f              
0068ebab              head_->dllist_next = 0;
0068ebad              head_->dllist_prev = nullptr;
0068ebad              
0068ebb0              if (head_ != 0)
0068ebb2                  ebx_1 = &head_[-1];
0068eb68          }
0068eb68          
0068ebb5          int32_t esi_1 = *(int32_t*)((char*)ADJ(ebx_1) + -8);
0068ebbb          uint32_t temp1_1 = (COMBINE(0, esi_1) % this->m_hashSections.m_ihlIntrusive.m_hash.m_numBuckets);
0068ebc1          struct HashList<unsigned long,CInputMap *,1>::HashListData** m_buckets = this->m_hashSections.m_ihlIntrusive.m_hash.m_buckets;
0068ebc7          int32_t* i_1 = m_buckets[temp1_1];
0068ebc7          
0068ebd1          for (int32_t* i = i_1; i != 0; i = i[1])
0068ebd1          {
0068ebd5              if (*(uint32_t*)i == esi_1)
0068ebd5              {
0068ebe2                  if (i != 0)
0068ebe2                  {
0068ebe6                      if (i_1 == i)
0068ebca                          m_buckets[temp1_1] = i_1[1];
0068ebe6                      else
0068ebe6                      {
0068ebef                          int32_t* i_2;
0068ebef                          
0068ebef                          do
0068ebef                          {
0068ebe8                              i_2 = i_1;
0068ebea                              i_1 = i_1[1];
0068ebef                          } while (i_1 != i);
0068ebef                          
0068ebf3                          if (i_2 != 0)
0068ebff                              i_2[1] = i_1[1];
0068ebf3                          else
0068ebca                              m_buckets[temp1_1] = i_1[1];
0068ebe6                      }
0068ebe6                      
0068ec02                      this->m_hashSections.m_ihlIntrusive.m_hash.m_numElements -= 1;
0068ebe2                  }
0068ebe2                  
0068ebe2                  break;
0068ebd5              }
0068ebd1          }
0068ebd1          
0068ec08          void* edi_3 = *(int32_t*)((char*)ADJ(ebx_1) + 8);
0068ec0c          operator delete(ebx_1);
0068ec0c          
0068ec16          if (edi_3 != 0)
0068ec16          {
0068ec21              IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::delete_contents(((char*)edi_3 + 8));
0068ec26              void* eax_4 = *(uint32_t*)((char*)edi_3 + 0x68);
0068ec2e              *(uint32_t*)((char*)edi_3 + 8) = 0x7fffe0;
0068ec2e              
0068ec34              if (eax_4 != ((char*)edi_3 + 0xc))
0068ec37                  operator delete[](eax_4);
0068ec37              
0068ec42              *(uint32_t*)((char*)edi_3 + 0x68) = 0;
0068ec45              *(uint32_t*)((char*)edi_3 + 0x6c) = 0;
0068ec48              *(uint32_t*)((char*)edi_3 + 0x70) = 0;
0068ec4b              *(uint32_t*)((char*)edi_3 + 0x74) = 0;
0068ec4e              operator delete(edi_3);
0068ec16          }
0068eb56      }
0068eb40  }


0068ec60  uint8_t __thiscall HashList<QualifiedControl,unsigned long,1>::push_tail(class HashList<QualifiedControl,unsigned long,1>* this, class QualifiedControl const* arg2, uint32_t const* arg3)

0068ec60  {
0068ec7b      void __return;
0068ec7b      
0068ec7b      if (IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(this, &__return, arg2)->m_currElement != 0)
0068ec7b      {
0068ec85          IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::find_internal(this, &__return, arg2);
0068ec90          struct HashList<QualifiedControl,unsigned long,1>::HashListData* var_4;
0068ec90          
0068ec90          if (var_4 != 0)
0068eca9              return IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::place_at_tail(this, var_4);
0068eca9          
0068ec93          struct HashList<QualifiedControl,unsigned long,1>::HashListData* eax_1;
0068ec93          eax_1 = 0;
0068ec99          return 0;
0068ec7b      }
0068ec7b      
0068ecae      void* eax_3 = operator new(0x1c);
0068ecb8      void* esi_1;
0068ecb8      
0068ecb8      if (eax_3 == 0)
0068ecec          esi_1 = nullptr;
0068ecb8      else
0068ecb8      {
0068ecbc          *(uint32_t*)eax_3 = arg2->m_key.__inner0;
0068ecc1          *(uint32_t*)((char*)eax_3 + 4) = arg2->m_metamode;
0068eccb          *(uint32_t*)((char*)eax_3 + 8) = arg2->m_activation;
0068ecce          *(uint32_t*)((char*)eax_3 + 0xc) = 0;
0068ecd5          *(uint32_t*)((char*)eax_3 + 0x10) = 0;
0068ecdc          *(uint32_t*)((char*)eax_3 + 0x14) = 0;
0068ece5          *(uint32_t*)((char*)eax_3 + 0x18) = *(uint32_t*)arg3;
0068ece8          esi_1 = eax_3;
0068ecb8      }
0068ecb8      
0068ecf7      int32_t ebx;
0068ecf7      ebx = IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::push_tail(this, esi_1);
0068ecf7      
0068ecff      if ((ebx == 0 && esi_1 != 0))
0068ed02          operator delete(esi_1);
0068ed02      
0068ed12      return ebx;
0068ec60  }

0068ed15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0068ed20  uint8_t __thiscall HashList<ControlSpecification,unsigned long,1>::push_tail(class HashList<ControlSpecification,unsigned long,1>* this, class ControlSpecification const* arg2, uint32_t const* arg3)

0068ed20  {
0068ed28      union __inner0 = arg2->__inner0;
0068ed28      
0068ed39      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, __inner0) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
0068ed39      {
0068ed42          if (*(uint32_t*)i == __inner0)
0068ed42          {
0068ed81              if (i != 0)
0068ed8d                  return HashList<ControlSpecification,unsigned long,1>::move_to_tail(this, arg2);
0068ed8d              
0068ed81              break;
0068ed42          }
0068ed39      }
0068ed39      
0068ed4d      void* eax_2 = operator new(0x14);
0068ed57      void* esi_1;
0068ed57      
0068ed57      if (eax_2 == 0)
0068ed90          esi_1 = nullptr;
0068ed57      else
0068ed57      {
0068ed5f          *(uint32_t*)eax_2 = arg2->__inner0;
0068ed61          *(uint32_t*)((char*)eax_2 + 4) = 0;
0068ed68          *(uint32_t*)((char*)eax_2 + 8) = 0;
0068ed6f          *(uint32_t*)((char*)eax_2 + 0xc) = 0;
0068ed78          *(uint32_t*)((char*)eax_2 + 0x10) = *(uint32_t*)arg3;
0068ed7b          esi_1 = eax_2;
0068ed57      }
0068ed57      
0068ed9b      int32_t ebx;
0068ed9b      ebx = IntrusiveHashList<ControlSpecification,HashList<ControlSpecification,unsigned long,1>::HashListData *,1>::push_tail(this, esi_1);
0068ed9b      
0068eda3      if ((ebx == 0 && esi_1 != 0))
0068eda6          operator delete(esi_1);
0068eda6      
0068edb3      return ebx;
0068ed20  }

0068ed3d                                                                                         8d 49 00                               .I.
0068edb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0068edc0  uint8_t __thiscall HashList<unsigned long,CInputMap *,1>::push_tail(class HashList<unsigned long,CInputMap *,1>* this, uint32_t const* arg2, class CInputMap** arg3)

0068edc0  {
0068edc8      uint32_t const ecx = *(uint32_t*)arg2;
0068edc8      
0068edd9      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ecx) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
0068edd9      {
0068ede2          if (*(uint32_t*)i == ecx)
0068ede2          {
0068ee21              if (i != 0)
0068ee2d                  return HashList<unsigned long,CInputMap *,1>::move_to_tail(this, arg2);
0068ee2d              
0068ee21              break;
0068ede2          }
0068edd9      }
0068edd9      
0068eded      void* eax_2 = operator new(0x14);
0068edf7      void* esi_1;
0068edf7      
0068edf7      if (eax_2 == 0)
0068ee30          esi_1 = nullptr;
0068edf7      else
0068edf7      {
0068edff          *(uint32_t*)eax_2 = *(uint32_t*)arg2;
0068ee01          *(uint32_t*)((char*)eax_2 + 4) = 0;
0068ee08          *(uint32_t*)((char*)eax_2 + 8) = 0;
0068ee0f          *(uint32_t*)((char*)eax_2 + 0xc) = 0;
0068ee18          *(uint32_t*)((char*)eax_2 + 0x10) = *(uint32_t*)arg3;
0068ee1b          esi_1 = eax_2;
0068edf7      }
0068edf7      
0068ee3b      int32_t ebx;
0068ee3b      ebx = IntrusiveHashList<unsigned long,HashList<unsigned long,CInputMap *,1>::HashListData *,1>::push_tail(this, esi_1);
0068ee3b      
0068ee43      if ((ebx == 0 && esi_1 != 0))
0068ee46          operator delete(esi_1);
0068ee46      
0068ee53      return ebx;
0068edc0  }

0068eddd                                                                                         8d 49 00                               .I.
0068ee56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0068ee60  void __thiscall CInputMap::Serialize(class CInputMap* this, class Archive* arg2)

0068ee60  {
0068ee65      class Archive* esi = arg2;
0068ee6c      uint32_t m_numElements = this->m_listMappings.m_ihlIntrusive.m_hash.m_numElements;
0068ee73      Archive::CheckAlignment(esi, 4);
0068ee7c      uint32_t* eax = Archive::GetBytes(esi, 4);
0068ee7c      
0068ee85      if (eax != 0)
0068ee85      {
0068ee8b          if ((esi->m_flags & 1) == 0)
0068ee91              m_numElements = *(uint32_t*)eax;
0068ee8b          else
0068ee8d              *(uint32_t*)eax = m_numElements;
0068ee85      }
0068ee85      
0068ee97      if ((esi->m_flags & 1) == 0)
0068ee97      {
0068ef0c          int32_t ebx_1 = 0;
0068ef0c          
0068ef10          if (m_numElements > 0)
0068ef10          {
0068ef83              do
0068ef83              {
0068ef25                  int32_t var_c = 0xffffffff;
0068ef2d                  int32_t var_8_2 = 0;
0068ef31                  int32_t var_4_1 = 0;
0068ef35                  UserBindingValue::Serialize(&var_c, esi);
0068ef3e                  Archive::CheckAlignment(esi, 4);
0068ef47                  uint8_t* eax_3 = Archive::GetBytes(esi, 4);
0068ef47                  
0068ef4e                  if (eax_3 != 0)
0068ef4e                  {
0068ef54                      if ((esi->m_flags & 1) == 0)
0068ef60                          arg2 = *(uint32_t*)eax_3;
0068ef54                      else
0068ef5a                          *(uint32_t*)eax_3 = arg2;
0068ef4e                  }
0068ef4e                  
0068ef6c                  if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
0068ef6c                      break;
0068ef6c                  
0068ef7b                  HashList<QualifiedControl,unsigned long,1>::push_tail(&this->m_listMappings, &var_c, &arg2);
0068ef80                  ebx_1 += 1;
0068ef83              } while (ebx_1 < m_numElements);
0068ef10          }
0068ee97      }
0068ee97      else
0068ee97      {
0068ee9f          void* __offset(DLListData, -0x10) edi = nullptr;
0068ee9f          
0068eea3          if (this->m_listMappings.m_ihlIntrusive.m_hash.m_numElements > 0)
0068eea3          {
0068eea5              class DLListData* head_ = this->m_listMappings.m_ihlIntrusive.m_list.head_;
0068eea5              
0068eeaa              if (head_ == 0)
0068eeb1                  edi = nullptr;
0068eeaa              else
0068eeac                  edi = &head_[-2];
0068eea3          }
0068eea3          
0068eeb5          class CInputMap::ActionBindingList* var_8_1 = &this->m_listMappings;
0068eeb5          
0068eeb9          if (edi != 0)
0068eeb9          {
0068eec3              while (true)
0068eec3              {
0068eec3                  UserBindingValue::Serialize(edi, esi);
0068eecc                  Archive::CheckAlignment(esi, 4);
0068eed5                  uint8_t* eax_2 = Archive::GetBytes(esi, 4);
0068eed5                  
0068eedc                  if (eax_2 != 0)
0068eedc                  {
0068eee2                      if ((esi->m_flags & 1) == 0)
0068eeed                          *(int32_t*)((char*)ADJ(edi) + 8) = *(uint32_t*)eax_2;
0068eee2                      else
0068eee7                          *(uint32_t*)eax_2 = *(int32_t*)((char*)ADJ(edi) + 8);
0068eedc                  }
0068eedc                  
0068eef0                  class DLListData* dllist_next = ADJ(edi)->dllist_next;
0068eef0                  
0068eef5                  if (dllist_next == 0)
0068eef5                      break;
0068eef5                  
0068eefb                  edi = &dllist_next[-2];
0068eefb                  
0068ef00                  if (edi == 0)
0068ef08                      return;
0068eec3              }
0068eeb9          }
0068ee97      }
0068ee60  }

0068ef18                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0068ef8f                                               90                                                                 .

0068ef90  uint8_t __fastcall CInputMap::AddMapping(class CInputMap* this, uint32_t arg2, class QualifiedControl arg3)

0068ef90  {
0068ef96      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0068ef96      
0068efa3      if (ICIDM::s_cidm_1 != 0)
0068efa3      {
0068efa9          uint32_t m_eInputMapID = this->m_eInputMapID;
0068efac          struct ICIDM::VTable* vtable = ICIDM::s_cidm_1->vtable;
0068efb6          int32_t var_10 = 0x7a2be4;
0068efbe          int32_t* i_1 = nullptr;
0068efc2          int32_t var_8_1 = 0;
0068efc6          int32_t var_4_1 = 0;
0068efc6          
0068efd2          if (vtable->FindConflictingInputMaps(m_eInputMapID, &var_10) != 0)
0068efd2          {
0068efda              for (int32_t* i = i_1; i != 0; i = i[1])
0068efda              {
0068efe0                  int32_t eax_2 = *(uint32_t*)i;
0068efe0                  
0068efe5                  if (this->m_eInputMapID != eax_2)
0068efe5                  {
0068efe7                      struct ICIDM::VTable* vtable_1 = ICIDM::s_cidm_1->vtable;
0068eff6                      void* var_1c = nullptr;
0068effa                      int32_t var_18_1 = 0;
0068effe                      int32_t var_14_1 = 0;
0068effe                      
0068f00a                      if (vtable_1->FindConflictingControls(&arg3, eax_2, &var_1c) != 0)
0068f00a                      {
0068f06d                          if ((var_18_1 & 0x80000000) == 0x80000000)
0068f074                              operator delete[](var_1c);
0068f074                          
0068f080                          var_10 = 0x7a2be4;
0068f088                          List<StringTableMetaLanguage::Node const *>::flush(&var_10);
0068f090                          int32_t eax_7;
0068f090                          eax_7 = 0;
0068f096                          return 0;
0068f00a                      }
0068f00a                      
0068f01c                      if ((var_18_1 & 0x80000000) == 0x80000000)
0068f023                          operator delete[](var_1c);
0068efe5                  }
0068efda              }
0068efd2          }
0068efd2          
0068f036          var_10 = 0x7a2be4;
0068f03e          List<StringTableMetaLanguage::Node const *>::flush(&var_10);
0068efa3      }
0068efa3      
0068f05c      return HashList<QualifiedControl,unsigned long,1>::push_tail(&this->m_listMappings, &arg3, &arg2);
0068ef90  }

0068f099                                                                             90 90 90 90 90 90 90                           .......

0068f0a0  uint8_t __thiscall CInputMap::Merge(class CInputMap* this, class CInputMap const* arg2, class HashTable<unsigned long,unsigned long,0> const* arg3, uint8_t arg4)

0068f0a0  {
0068f0b2      void* __offset(DLListData, -0x10) i = nullptr;
0068f0b2      
0068f0b6      if (arg2->m_listMappings.m_ihlIntrusive.m_hash.m_numElements > 0)
0068f0b6      {
0068f0b8          class DLListData* head_ = arg2->m_listMappings.m_ihlIntrusive.m_list.head_;
0068f0b8          
0068f0bd          if (head_ == 0)
0068f0c4              i = nullptr;
0068f0bd          else
0068f0bf              i = &head_[-2];
0068f0b6      }
0068f0b6      
0068f0c8      class CInputMap::ActionBindingList* var_4 = &arg2->m_listMappings;
0068f0cc      class CInputMap::ActionBindingList* eax;
0068f0cc      
0068f0cc      if (i != 0)
0068f0cc      {
0068f0ce          int32_t ebx;
0068f0ce          ebx = arg4;
0068f0ce          
0068f106          do
0068f106          {
0068f0d9              int32_t var_20_1 = *(int32_t*)((char*)ADJ(i) + -0x10);
0068f0de              int32_t var_1c_1 = *(int32_t*)((char*)ADJ(i) + -0xc);
0068f0e4              int32_t var_18_1 = *(int32_t*)((char*)ADJ(i) + -8);
0068f0e7              uint32_t edx_2 = *(int32_t*)((char*)ADJ(i) + 8);
0068f0e7              
0068f0f8              if ((CInputMap::AddMapping(this, edx_2, edx_2) == 0 && ebx == 0))
0068f0f8              {
0068f115                  eax = 0;
0068f11b                  return 0;
0068f0f8              }
0068f0f8              
0068f0fa              class DLListData* dllist_next = ADJ(i)->dllist_next;
0068f0fa              
0068f0ff              if (dllist_next == 0)
0068f0ff                  break;
0068f0ff              
0068f101              i = &dllist_next[-2];
0068f106          } while (i != 0);
0068f0cc      }
0068f0cc      
0068f108      eax = 1;
0068f110      return 1;
0068f0a0  }

0068f11e                                                                                            90 90                                ..

0068f120  void __fastcall CMasterInputMap::~CMasterInputMap(class CMasterInputMap* this)

0068f120  {
0068f125      this->vtable = 0x800158;
0068f12b      CMasterInputMap::Clear(this);
0068f138      IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_hashSections);
0068f13d      struct HashList<unsigned long,CInputMap *,1>::HashListData** m_buckets = this->m_hashSections.m_ihlIntrusive.m_hash.m_buckets;
0068f130      this->m_hashSections.m_ihlIntrusive.m_hash.vtable = 0x7fffe8;
0068f130      
0068f14b      if (m_buckets != &this->m_hashSections.m_ihlIntrusive.m_hash.m_aInplaceBuckets)
0068f14e          operator delete[](m_buckets);
0068f14e      
0068f130      this->m_hashSections.m_ihlIntrusive.m_hash.m_buckets = nullptr;
0068f130      this->m_hashSections.m_ihlIntrusive.m_hash.m_firstInterestingBucket = nullptr;
0068f130      this->m_hashSections.m_ihlIntrusive.m_hash.m_numBuckets = 0;
0068f130      this->m_hashSections.m_ihlIntrusive.m_hash.m_numElements = 0;
0068f169      IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_listMetaKeys);
0068f16e      struct HashList<ControlSpecification,unsigned long,1>::HashListData** m_buckets_1 = this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_buckets;
0068f164      this->m_listMetaKeys.m_ihlIntrusive.m_hash.vtable = 0x7fffe4;
0068f164      
0068f17c      if (m_buckets_1 != &this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_aInplaceBuckets)
0068f17f          operator delete[](m_buckets_1);
0068f17f      
0068f164      this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_buckets = nullptr;
0068f164      this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_firstInterestingBucket = nullptr;
0068f164      this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numBuckets = 0;
0068f164      this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numElements = 0;
0068f164      
0068f1a0      if ((this->m_rgDevices.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0068f1a6          operator delete[](this->m_rgDevices.m_data);
0068f1a6      
0068f1b1      void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = (this->m_strName.m_charbuffer - 0x14);
0068f1b1      
0068f1c4      if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
0068f1cc          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
0068f1cc      
0068f1d3      /* tailcall */
0068f1d3      return DBObj::~DBObj(this);
0068f120  }

0068f1d8                                                                          90 90 90 90 90 90 90 90                          ........

0068f1e0  uint8_t __thiscall CMasterInputMap::ReadMetaKeysFromFileNode(class CMasterInputMap* this, class PFileNode const* arg2)

0068f1e0  {
0068f1e6      class PFileNode* esi = arg2;
0068f1ef      uint32_t eax = PFileNode::GetNumSubNodes(esi);
0068f1f4      int32_t* ebx = nullptr;
0068f1f4      
0068f1fc      if (eax <= 0)
0068f1fc      {
0068f1fe          eax = 1;
0068f207          return 1;
0068f1fc      }
0068f1fc      
0068f210      while (true)
0068f210      {
0068f210          struct PFileNode::VTable* vtable = esi->vtable;
0068f212          int32_t* var_20 = ebx;
0068f215          class PFileNode* eax_1 = vtable->GetSubNode(var_20);
0068f21e          int32_t var_8;
0068f21e          var_20 = &var_8;
0068f221          var_8 = 0;
0068f229          uint8_t eax_2;
0068f229          class ControlSpecification* ecx_3;
0068f229          eax_2 = PFileNode::GetNameAsUInt32(eax_1, var_20);
0068f230          int32_t eax_3 = var_8;
0068f246          class ControlSpecification* var_24;
0068f246          
0068f246          if (((eax_2 == 0 || eax_3 < 1) || eax_3 > 0x20))
0068f246          {
0068f2e0              var_20 = eax_3;
0068f2e1              var_24 = ecx_3;
0068f2e9              PStringBase<char>::PStringBase<char>(&var_24, "ERROR - Invalid index %d, index …");
0068f2ef              PFileNode::ReportError(eax_1, var_24);
0068f2fa              int32_t eax_8;
0068f2fa              eax_8 = 0;
0068f300              return 0;
0068f246          }
0068f246          
0068f258          int32_t esi_1 = (1 << (0x20 - eax_3));
0068f25a          var_20 = eax_1;
0068f25f          class ControlSpecification var_c = 0xffffffff;
0068f267          var_8 = esi_1;
0068f26b          uint8_t eax_4;
0068f26b          int32_t* ecx_6;
0068f26b          eax_4 = ControlSpecification::FromFileNode(&var_c, var_20);
0068f26b          
0068f283          if ((eax_4 == 0 || this->m_rgDevices.m_num <= ((uint32_t)((int8_t)var_c))))
0068f283          {
0068f2be              var_20 = ecx_6;
0068f2c1              var_24 = "ERROR - Invalid device.\n";
0068f2c6              PStringBase<char>::PStringBase<char>(&var_20, var_24);
0068f2cb              var_24 = eax_1;
0068f2cc              PFileNode::ReportError(var_24, var_20);
0068f2d4              int32_t eax_7;
0068f2d4              eax_7 = 0;
0068f2dd              return 0;
0068f283          }
0068f283          
0068f289          var_20 = &var_8;
0068f28e          var_24 = &var_c;
0068f292          HashList<ControlSpecification,unsigned long,1>::push_tail(&this->m_listMetaKeys, var_24, var_20);
0068f2a3          ebx += 1;
0068f2a6          this->m_dwUsedMetaKeys |= esi_1;
0068f2a6          
0068f2ac          if (ebx >= eax)
0068f2ac              break;
0068f2ac          
0068f20a          esi = arg2;
0068f210      }
0068f210      
0068f2b2      uint32_t eax_6;
0068f2b2      eax_6 = 1;
0068f2bb      return 1;
0068f1e0  }

0068f303           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0068f310  class CInputMap* __fastcall CMasterInputMap::CreateInputMap(class CMasterInputMap* this, uint32_t arg2)

0068f310  {
0068f310      class CMasterInputMap* this_1 = this;
0068f313      uint32_t ebp = arg2;
0068f32a      int32_t ecx = 0;
0068f32a      
0068f333      for (int32_t* i = this->m_hashSections.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ebp) % this->m_hashSections.m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
0068f333      {
0068f337          if (*(uint32_t*)i == ebp)
0068f337          {
0068f344              if (i != 0)
0068f346                  ecx = i[4];
0068f346              
0068f344              break;
0068f337          }
0068f333      }
0068f333      
0068f34b      if (ecx != 0)
0068f3a3          return ecx;
0068f3a3      
0068f358      void* this_2 = operator new(0x80);
0068f358      
0068f35f      if (this_2 == 0)
0068f37c          this_2 = nullptr;
0068f35f      else
0068f35f      {
0068f361          *(uint32_t*)this_2 = this;
0068f36a          *(uint32_t*)((char*)this_2 + 4) = ebp;
0068f36d          IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>(((char*)this_2 + 8), 0);
0068f374          *(uint32_t*)((char*)this_2 + 0x78) = 0;
0068f377          *(uint32_t*)((char*)this_2 + 0x7c) = 0;
0068f35f      }
0068f35f      
0068f38a      this_1 = this_2;
0068f38e      HashList<unsigned long,CInputMap *,1>::push_tail(&this->m_hashSections, &arg2, &this_1);
0068f39a      return this_2;
0068f310  }

0068f3a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0068f3b0  uint8_t __thiscall CInputMap::FromFileNode(class CInputMap* this, class PFileNode const* arg2)

0068f3b0  {
0068f3b4      class PFileNode* ebx = arg2;
0068f3bc      class CInputMap* this_1 = this;
0068f3bf      class CInputMap* this_2 = this_1;
0068f3bf      
0068f3c3      if (ebx == 0)
0068f3c3      {
0068f6b8          int32_t eax;
0068f6b8          eax = 0;
0068f6be          return 0;
0068f3c3      }
0068f3c3      
0068f3cb      uint8_t var_3d = 1;
0068f3d0      uint32_t eax_1 = PFileNode::GetNumSubNodes(ebx);
0068f3d5      int32_t* m_eInputMapID_6 = nullptr;
0068f3dd      int32_t* m_eInputMapID_25 = nullptr;
0068f3dd      
0068f3e1      if (eax_1 > 0)
0068f3e1      {
0068f3f0          while (true)
0068f3f0          {
0068f3f0              struct PFileNode::VTable* vtable = ebx->vtable;
0068f3f2              int32_t* m_eInputMapID = m_eInputMapID_6;
0068f3f5              class PFileNode* m_eInputMapID_15;
0068f3f5              uint32_t* ecx_2;
0068f3f5              uint32_t edx_1;
0068f3f5              m_eInputMapID_15 = vtable->GetSubNode(m_eInputMapID);
0068f3f8              uint32_t m_eInputMapID_10 = m_eInputMapID_15;
0068f3f8              
0068f3fc              if (m_eInputMapID_10 != 0)
0068f3fc              {
0068f406                  uint32_t m_eInputMapID_23;
0068f406                  m_eInputMapID = &m_eInputMapID_23;
0068f407                  uint32_t m_eInputMapID_2 = 0x19;
0068f409                  uint32_t m_eInputMapID_11 = m_eInputMapID_10;
0068f40a                  m_eInputMapID_23 = 0;
0068f412                  uint8_t eax_2 = FileNodeUtils::GetNameAsEnum(m_eInputMapID_15, edx_1, ecx_2);
0068f412                  
0068f41c                  if (eax_2 != 0)
0068f41c                  {
0068f427                      uint32_t m_eInputMapID_7 = m_eInputMapID_10;
0068f429                      class ControlSpecification m_eInputMapID_30 = 0xffffffff;
0068f431                      uint32_t eax_3 = PFileNode::GetNumSubNodes(m_eInputMapID_7);
0068f438                      uint8_t eax_5;
0068f438                      
0068f438                      if (eax_3 != 0)
0068f438                      {
0068f43e                          int32_t edx_2 = *(uint32_t*)m_eInputMapID_10;
0068f440                          m_eInputMapID = nullptr;
0068f447                          m_eInputMapID = *(uint32_t*)(edx_2 + 0xc)(m_eInputMapID);
0068f44c                          eax_5 = ControlSpecification::FromFileNode(&m_eInputMapID_30, m_eInputMapID);
0068f438                      }
0068f438                      
0068f453                      if ((eax_3 == 0 || eax_5 == 0))
0068f453                      {
0068f698                          m_eInputMapID = m_eInputMapID_7;
0068f69b                          m_eInputMapID_2 = "ERROR - invalid Control Specific…";
0068f6a0                          PStringBase<char>::PStringBase<char>(&m_eInputMapID, m_eInputMapID_2);
0068f6a5                          m_eInputMapID_2 = m_eInputMapID_10;
0068f6a6                          PFileNode::ReportError(m_eInputMapID_2, m_eInputMapID);
0068f6ae                          var_3d = 0;
0068f453                      }
0068f453                      else
0068f453                      {
0068f459                          int32_t eax_6 = *(uint32_t*)m_eInputMapID_10;
0068f45b                          m_eInputMapID = 1;
0068f45f                          class PFileNode* m_eInputMapID_27 = *(uint32_t*)(eax_6 + 0xc)(m_eInputMapID);
0068f466                          int32_t* m_eInputMapID_5 = nullptr;
0068f46e                          uint8_t eax_7;
0068f46e                          
0068f46e                          if (m_eInputMapID_27 != 0)
0068f46e                          {
0068f474                              m_eInputMapID = &m_eInputMapID_5;
0068f477                              eax_7 = PFileNode::GetNameAsUInt32(m_eInputMapID_27, m_eInputMapID);
0068f46e                          }
0068f46e                          
0068f47e                          if ((m_eInputMapID_27 == 0 || eax_7 != 0))
0068f47e                          {
0068f4c3                              int32_t* m_eInputMapID_13 = 3;
0068f4cb                              int32_t edx_3 = *(uint32_t*)m_eInputMapID_10;
0068f4cd                              m_eInputMapID = 2;
0068f4d1                              class PFileNode* m_eInputMapID_28 = *(uint32_t*)(edx_3 + 0xc)(m_eInputMapID);
0068f4d1                              
0068f4d8                              if (m_eInputMapID_28 == 0)
0068f4d8                                  goto label_68f546;
0068f4d8                              
0068f4da                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068f4df                              class PSRefBufferCharData<char>* var_3c = PStringBase<char>::s_NullBuffer_1;
0068f4e6                              m_eInputMapID = &PStringBase<char>::s_NullBuffer_1[-1];
0068f4e7                              InterlockedIncrement(m_eInputMapID);
0068f4f1                              m_eInputMapID = &var_3c;
0068f4f4                              PFileNode::GetNameAsPString(m_eInputMapID_28, m_eInputMapID);
0068f4fd                              m_eInputMapID = &m_eInputMapID_13;
0068f502                              m_eInputMapID_2 = &var_3c;
0068f503                              uint8_t eax_10;
0068f503                              uint32_t m_eInputMapID_19;
0068f503                              eax_10 = StringToControlActivationType(m_eInputMapID_2, m_eInputMapID);
0068f503                              
0068f50d                              if (eax_10 != 0)
0068f50d                              {
0068f541                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c);
0068f546                              label_68f546:
0068f546                                  class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
0068f546                                  
0068f54e                                  if (ICIDM::s_cidm_1 != 0)
0068f54e                                  {
0068f556                                      class ActionMap* eax_12 = ICIDM::s_cidm_1->vtable->GetActionMap();
0068f556                                      
0068f55b                                      if (eax_12 != 0)
0068f55b                                      {
0068f560                                          uint32_t m_eInputMapID_22 = m_eInputMapID_23;
0068f564                                          m_eInputMapID = this_1->m_eInputMapID;
0068f565                                          m_eInputMapID_2 = m_eInputMapID_22;
0068f565                                          
0068f56f                                          if (ActionMap::IsActionAllowedInInputMap(eax_12, m_eInputMapID_2, m_eInputMapID) == 0)
0068f56f                                          {
0068f575                                              uint32_t m_eInputMapID_24;
0068f575                                              PStringBase<char>::PStringBase<char>(&m_eInputMapID_24);
0068f57e                                              m_eInputMapID = &m_eInputMapID_24;
0068f581                                              PFileNode::GetNameAsPString(m_eInputMapID_10, m_eInputMapID);
0068f58a                                              int32_t* m_eInputMapID_4;
0068f58a                                              PStringBase<char>::PStringBase<char>(&m_eInputMapID_4);
0068f58f                                              uint32_t m_eInputMapID_1 = this_1->m_eInputMapID;
0068f596                                              m_eInputMapID = &m_eInputMapID_4;
0068f597                                              m_eInputMapID_2 = m_eInputMapID_1;
0068f598                                              m_eInputMapID_11 = 0x1a;
0068f59a                                              EnumMapper::GetString(m_eInputMapID_11, m_eInputMapID_2, m_eInputMapID);
0068f5a3                                              uint32_t m_eInputMapID_20 = m_eInputMapID_24;
0068f5aa                                              m_eInputMapID = m_eInputMapID_4;
0068f5ab                                              m_eInputMapID_2 = m_eInputMapID_20;
0068f5ac                                              m_eInputMapID_11 = m_eInputMapID_20;
0068f5b4                                              PStringBase<char>::PStringBase<char>(&m_eInputMapID_11, "Control '%s' is not allowed in t…");
0068f5ba                                              PFileNode::ReportError(m_eInputMapID_10, m_eInputMapID_11);
0068f5c6                                              var_3d = 0;
0068f5cb                                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_eInputMapID_4);
0068f5d4                                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_eInputMapID_24);
0068f56f                                          }
0068f55b                                      }
0068f54e                                  }
0068f54e                                  
0068f5dd                                  class ControlSpecification m_eInputMapID_29 = m_eInputMapID_30;
0068f5e1                                  m_eInputMapID = m_eInputMapID_5;
0068f5e2                                  class ControlSpecification m_eInputMapID_31 = m_eInputMapID_29;
0068f5e6                                  uint32_t m_eInputMapID_16 = BitUtils::ReverseBits(m_eInputMapID);
0068f5eb                                  int32_t* m_eInputMapID_9 = m_eInputMapID_13;
0068f5f4                                  uint32_t m_eInputMapID_17 = m_eInputMapID_23;
0068f5f8                                  m_eInputMapID = m_eInputMapID_10;
0068f5f9                                  m_eInputMapID_2 = m_eInputMapID_17;
0068f5fe                                  m_eInputMapID_11 = &m_eInputMapID_31;
0068f603                                  uint32_t m_eInputMapID_26 = m_eInputMapID_16;
0068f607                                  int32_t* m_eInputMapID_14 = m_eInputMapID_9;
0068f607                                  
0068f612                                  if (CInputMap::VerifyActivationAndToggleType(this_2, m_eInputMapID_11, m_eInputMapID_2, m_eInputMapID) != 0)
0068f612                                  {
0068f61d                                      m_eInputMapID_11 = m_eInputMapID_29;
0068f61f                                      m_eInputMapID_2 = m_eInputMapID_16;
0068f622                                      m_eInputMapID = m_eInputMapID_9;
0068f625                                      uint32_t m_eInputMapID_32 = m_eInputMapID_23;
0068f625                                      
0068f631                                      if (CInputMap::AddMapping(this_2, m_eInputMapID_32, m_eInputMapID_32) == 0)
0068f631                                      {
0068f637                                          int32_t* m_eInputMapID_12;
0068f637                                          PStringBase<char>::PStringBase<char>(&m_eInputMapID_12);
0068f640                                          m_eInputMapID = &m_eInputMapID_12;
0068f643                                          PFileNode::GetNameAsPString(m_eInputMapID_10, m_eInputMapID);
0068f648                                          int32_t* m_eInputMapID_8 = m_eInputMapID_12;
0068f64c                                          m_eInputMapID = m_eInputMapID_8;
0068f64d                                          m_eInputMapID_2 = m_eInputMapID_8;
0068f650                                          m_eInputMapID_11 = "ERROR - Control conflicts with a…";
0068f655                                          PStringBase<char>::PStringBase<char>(&m_eInputMapID_2, m_eInputMapID_11);
0068f65a                                          m_eInputMapID_11 = m_eInputMapID_10;
0068f65b                                          PFileNode::ReportError(m_eInputMapID_11, m_eInputMapID_2);
0068f667                                          var_3d = 0;
0068f66c                                          PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_eInputMapID_12);
0068f631                                      }
0068f612                                  }
0068f612                                  
0068f671                                  ebx = arg2;
0068f50d                              }
0068f50d                              else
0068f50d                              {
0068f513                                  m_eInputMapID = var_3c;
0068f514                                  m_eInputMapID_2 = m_eInputMapID_19;
0068f517                                  m_eInputMapID_11 = "ERROR - invalid control range "%…";
0068f51c                                  PStringBase<char>::PStringBase<char>(&m_eInputMapID_2, m_eInputMapID_11);
0068f521                                  m_eInputMapID_11 = m_eInputMapID_28;
0068f522                                  PFileNode::ReportError(m_eInputMapID_11, m_eInputMapID_2);
0068f52e                                  var_3d = 0;
0068f533                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_3c);
0068f50d                              }
0068f47e                          }
0068f47e                          else
0068f47e                          {
0068f484                              int32_t* m_eInputMapID_3;
0068f484                              PStringBase<char>::PStringBase<char>(&m_eInputMapID_3);
0068f48d                              m_eInputMapID = &m_eInputMapID_3;
0068f490                              uint32_t m_eInputMapID_18 = PFileNode::GetNameAsPString(m_eInputMapID_27, m_eInputMapID);
0068f499                              m_eInputMapID = m_eInputMapID_3;
0068f49a                              m_eInputMapID_2 = m_eInputMapID_18;
0068f49d                              m_eInputMapID_11 = "ERROR - invalid MetaKey flags "%…";
0068f4a2                              PStringBase<char>::PStringBase<char>(&m_eInputMapID_2, m_eInputMapID_11);
0068f4a7                              m_eInputMapID_11 = m_eInputMapID_27;
0068f4a8                              PFileNode::ReportError(m_eInputMapID_11, m_eInputMapID_2);
0068f4b4                              var_3d = 0;
0068f4b9                              PStringBase<unsigned short>::~PStringBase<unsigned short>(&m_eInputMapID_3);
0068f47e                          }
0068f453                      }
0068f41c                  }
0068f41c                  else
0068f41e                      var_3d = eax_2;
0068f3fc              }
0068f3fc              
0068f67d              int32_t* m_eInputMapID_21 = ((char*)m_eInputMapID_25 + 1);
0068f680              m_eInputMapID_25 = m_eInputMapID_21;
0068f680              
0068f684              if (m_eInputMapID_21 >= eax_1)
0068f684                  break;
0068f684              
0068f3e9              this_1 = this_2;
0068f3ed              m_eInputMapID_6 = m_eInputMapID_21;
0068f3f0          }
0068f3e1      }
0068f3e1      
0068f68a      eax_1 = var_3d;
0068f695      return eax_1;
0068f3b0  }

0068f6c1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0068f6d0  void* __thiscall CMasterInputMap::`scalar deleting destructor'(class CMasterInputMap* this, uint32_t arg2)

0068f6d0  {
0068f6d3      CMasterInputMap::~CMasterInputMap(this);
0068f6d3      
0068f6dd      if ((arg2 & 1) != 0)
0068f6e0          operator delete(this);
0068f6e0      
0068f6eb      return this;
0068f6d0  }

0068f6ee                                            90 90                                                                ..

0068f6f0  uint8_t __thiscall CMasterInputMap::Merge(class CMasterInputMap* this, class CMasterInputMap const* arg2, uint8_t arg3)

0068f6f0  {
0068f704      int32_t var_74 = 0x79c9ac;
0068f70c      int32_t var_70;
0068f70c      uint32_t edx = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,unsigned long> *,0>(&var_70, 0x17);
0068f718      uint32_t m_num = arg2->m_rgDevices.m_num;
0068f71b      int32_t edi = 0;
0068f71f      uint32_t var_7c = m_num;
0068f723      int32_t var_80 = 0;
0068f727      void* var_10;
0068f727      int32_t var_8;
0068f727      
0068f727      if (m_num > 0)
0068f727      {
0068f72d          int32_t var_84_1 = 0;
0068f72d          
0068f743          while (true)
0068f743          {
0068f743              uint32_t m_num_1 = this->m_rgDevices.m_num;
0068f749              void* ebp_2 = (arg2->m_rgDevices.m_data + var_84_1);
0068f74b              uint32_t m_num_3 = 0;
0068f74b              
0068f74f              if (m_num_1 <= 0)
0068f74f              {
0068f784              label_68f784:
0068f784                  m_num_3 = 0xffffffff;
0068f74f              }
0068f74f              else
0068f74f              {
0068f756                  uint8_t (* eax_4)[0x8] = &this->m_rgDevices.m_data->guid.m_data4;
0068f756                  
0068f763                  while (true)
0068f763                  {
0068f763                      if (ADJ(eax_4)->guid.m_data1 == *(uint32_t*)((char*)ebp_2 + 4))
0068f763                      {
0068f765                          int32_t ebx_2;
0068f765                          ebx_2 = ADJ(eax_4)->guid.m_data2;
0068f765                          *(uint16_t*)((char*)ebx_2)[2] = ADJ(eax_4)->guid.m_data3;
0068f765                          
0068f76b                          if (ebx_2 == *(uint32_t*)((char*)ebp_2 + 8))
0068f76b                          {
0068f76d                              int32_t ebx_3;
0068f76d                              ebx_3 = ADJ(eax_4)->guid.m_data4[0];
0068f76d                              *(uint8_t*)((char*)ebx_3)[1] = ADJ(eax_4)->guid.m_data4[1];
0068f76d                              *(uint8_t*)((char*)ebx_3)[2] = ADJ(eax_4)->guid.m_data4[2];
0068f76d                              *(uint8_t*)((char*)ebx_3)[3] = ADJ(eax_4)->guid.m_data4[3];
0068f76d                              
0068f772                              if (ebx_3 == *(uint32_t*)((char*)ebp_2 + 0xc))
0068f772                              {
0068f774                                  int32_t ebx_4;
0068f774                                  ebx_4 = ADJ(eax_4)->guid.m_data4[4];
0068f774                                  *(uint8_t*)((char*)ebx_4)[1] = ADJ(eax_4)->guid.m_data4[5];
0068f774                                  *(uint8_t*)((char*)ebx_4)[2] = ADJ(eax_4)->guid.m_data4[6];
0068f774                                  *(uint8_t*)((char*)ebx_4)[3] = ADJ(eax_4)->guid.m_data4[7];
0068f774                                  
0068f77a                                  if (ebx_4 == *(uint32_t*)((char*)ebp_2 + 0x10))
0068f77a                                      break;
0068f772                              }
0068f76b                          }
0068f763                      }
0068f763                      
0068f77c                      m_num_3 += 1;
0068f77d                      eax_4 = &*(uint64_t*)eax_4[0x14];
0068f77d                      
0068f782                      if (m_num_3 >= m_num_1)
0068f782                          goto label_68f784;
0068f763                  }
0068f74f              }
0068f74f              
0068f78a              uint32_t m_num_2 = m_num_3;
0068f78a              
0068f78c              if (m_num_3 == 0xffffffff)
0068f78c              {
0068f792                  m_num_2 = this->m_rgDevices.m_num;
0068f79e                  int32_t eax_6 = (this->m_rgDevices.m_sizeAndDeallocate & 0x7fffffff);
0068f7a5                  uint8_t eax_9;
0068f7a5                  
0068f7a5                  if (this->m_rgDevices.m_num >= eax_6)
0068f7b3                      eax_9 = SmartArray<DeviceKeyMapEntry,1>::grow(&this->m_rgDevices, SmartArray<unsigned long,1>::get_new_size(&this->m_rgDevices, (eax_6 + 1)));
0068f7b3                  
0068f7ba                  if ((this->m_rgDevices.m_num < eax_6 || eax_9 != 0))
0068f7ba                  {
0068f7d5                      __builtin_memcpy(&this->m_rgDevices.m_data[this->m_rgDevices.m_num], ebp_2, 0x14);
0068f7da                      edi = var_80;
0068f7cb                      this->m_rgDevices.m_num += 1;
0068f7ba                  }
0068f78c              }
0068f78c              
0068f7e9              int32_t ebp_3 = *(uint32_t*)ebp_2;
0068f7f2              void* eax_15 = &this->m_rgDevices.m_data[m_num_2];
0068f7f2              
0068f7f7              if (*(uint32_t*)eax_15 != ebp_3)
0068f7f7              {
0068f7f9                  uint32_t ecx_7;
0068f7f9                  ecx_7 = arg3;
0068f7f9                  
0068f802                  if (ecx_7 == 0)
0068f802                      break;
0068f802                  
0068f808                  *(uint32_t*)eax_15 = ebp_3;
0068f7f7              }
0068f7f7              
0068f80c              void* eax_16 = operator new(0xc);
0068f811              void* esi_5 = nullptr;
0068f811              
0068f818              if (eax_16 != 0)
0068f818              {
0068f81a                  *(uint32_t*)((char*)eax_16 + 4) = 0;
0068f81d                  *(uint32_t*)eax_16 = edi;
0068f81f                  *(uint32_t*)((char*)eax_16 + 8) = m_num_2;
0068f822                  esi_5 = eax_16;
0068f818              }
0068f818              
0068f824              int32_t i = *(uint32_t*)esi_5;
0068f838              edx = ((char*)var_10 + ((COMBINE(0, i) % var_8) << 2));
0068f83b              int32_t* eax_19 = *(uint32_t*)edx;
0068f83b              
0068f83f              if (eax_19 == 0)
0068f83f              {
0068f854              label_68f854:
0068f854                  *(uint32_t*)((char*)esi_5 + 4) = *(uint32_t*)edx;
0068f857                  *(uint32_t*)edx = esi_5;
0068f860                  uint32_t var_c;
0068f860                  
0068f860                  if (edx < var_c)
0068f862                      var_c = edx;
0068f862                  
0068f869                  int32_t var_4 = (var_4 + 1);
0068f83f              }
0068f83f              else
0068f83f              {
0068f843                  while (*(uint32_t*)eax_19 != i)
0068f843                  {
0068f845                      eax_19 = eax_19[1];
0068f845                      
0068f84a                      if (eax_19 == 0)
0068f84a                          goto label_68f854;
0068f843                  }
0068f843                  
0068f850                  if (eax_19 == 0)
0068f850                      goto label_68f854;
0068f850                  
0068f873                  edx = operator delete(esi_5);
0068f83f              }
0068f83f              
0068f883              edi += 1;
0068f889              var_80 = edi;
0068f88d              var_84_1 += 0x14;
0068f88d              
0068f891              if (edi >= var_7c)
0068f891                  goto label_68f8a7;
0068f743          }
0068f743          
0068f818          goto label_68fa4a;
0068f727      }
0068f727      
0068f8a7  label_68f8a7:
0068f8a7      void* __offset(DLListData, -0x8) ebx_5 = nullptr;
0068f8a7      
0068f8ab      if (arg2->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numElements > 0)
0068f8ab      {
0068f8ad          class DLListData* head_ = arg2->m_listMetaKeys.m_ihlIntrusive.m_list.head_;
0068f8ad          
0068f8b2          if (head_ == 0)
0068f8b9              ebx_5 = nullptr;
0068f8b2          else
0068f8b4              ebx_5 = &head_[-1];
0068f8ab      }
0068f8ab      
0068f8bd      class HashList<ControlSpecification,unsigned long,1>* var_78_1 = &arg2->m_listMetaKeys;
0068f8c1      void* eax_30;
0068f8c1      bool cond:6;
0068f8c1      void var_6c;
0068f8c1      
0068f8c1      if (ebx_5 == 0)
0068f8c1      {
0068f971      label_68f971:
0068f971          void* __offset(DLListData, -0x8) esi_8 = nullptr;
0068f971          
0068f975          if (arg2->m_hashSections.m_ihlIntrusive.m_hash.m_numElements > 0)
0068f975          {
0068f977              class DLListData* head__1 = arg2->m_hashSections.m_ihlIntrusive.m_list.head_;
0068f977              
0068f97c              if (head__1 == 0)
0068f9bf                  esi_8 = nullptr;
0068f97c              else
0068f97e                  esi_8 = &head__1[-1];
0068f975          }
0068f975          
0068f9c3          class HashList<unsigned long,CInputMap *,1>* var_78_2 = &arg2->m_hashSections;
0068f9c3          
0068f9c7          if (esi_8 == 0)
0068f9c7          {
0068fa0a          label_68fa0a:
0068fa0a              var_74 = 0x79c9ac;
0068fa12              IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_70);
0068fa24              var_70 = 0x79c9a8;
0068fa24              
0068fa2c              if (var_10 != &var_6c)
0068fa2f                  operator delete[](var_10);
0068fa2f              
0068fa37              void* eax_34;
0068fa37              eax_34 = 1;
0068fa43              return 1;
0068f9c7          }
0068f9c7          
0068f9d9          while (true)
0068f9d9          {
0068f9d9              int32_t var_9c_5 = *(int32_t*)((char*)ADJ(esi_8) + -8);
0068f9ef              uint8_t eax_33;
0068f9ef              eax_33 = CInputMap::Merge(CMasterInputMap::CreateInputMap(this, edx), *(int32_t*)((char*)ADJ(esi_8) + 8), &var_74, arg3);
0068f9ef              
0068f9f6              if (eax_33 == 0)
0068f9f6                  break;
0068f9f6              
0068f9f8              class DLListData* dllist_next_1 = ADJ(esi_8)->dllist_next;
0068f9f8              
0068f9fd              if (dllist_next_1 == 0)
0068f9fd                  goto label_68fa0a;
0068f9fd              
0068f9ff              esi_8 = &dllist_next_1[-1];
0068f9ff              
0068fa04              if (esi_8 == 0)
0068fa04                  goto label_68fa0a;
0068f9d9          }
0068f9d9          
0068fa4a      label_68fa4a:
0068fa4a          var_74 = 0x79c9ac;
0068fa52          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_70);
0068fa57          eax_30 = var_10;
0068fa62          cond:6 = eax_30 == &var_6c;
0068f8c1      }
0068f8c1      else
0068f8c1      {
0068f8d0          while (true)
0068f8d0          {
0068f8d0              int32_t esi_6 = *(int32_t*)((char*)ADJ(ebx_5) + -8);
0068f8d4              uint32_t ecx_13 = ((uint32_t)esi_6);
0068f8d4              
0068f8f1              for (int32_t* i_1 = *(uint32_t*)((char*)var_10 + ((COMBINE(0, ecx_13) % var_8) << 2)); i_1 != 0; i_1 = i_1[1])
0068f8f1              {
0068f8f5                  if (*(uint32_t*)i_1 == ecx_13)
0068f8f5                  {
0068f902                      if (i_1 != 0)
0068f904                          ecx_13 = i_1[2];
0068f904                      
0068f902                      break;
0068f8f5                  }
0068f8f1              }
0068f8f1              
0068f90f              uint32_t i_2 = (((uint32_t)(ecx_13 ^ esi_6)) ^ esi_6);
0068f91b              var_7c = i_2;
0068f91f              int32_t* edx_9 = this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i_2) % this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numBuckets)];
0068f91f              
0068f924              if (edx_9 == 0)
0068f924              {
0068f93c              label_68f93c:
0068f93c                  HashList<ControlSpecification,unsigned long,1>::push_tail(&this->m_listMetaKeys, &var_7c, ((char*)ebx_5 + 0x10));
0068f945                  edx = *(uint32_t*)((char*)ebx_5 + 0x10);
0068f947                  this->m_dwUsedMetaKeys |= edx;
0068f924              }
0068f924              else
0068f924              {
0068f928                  while (*(uint32_t*)edx_9 != i_2)
0068f928                  {
0068f92a                      edx_9 = edx_9[1];
0068f92a                      
0068f92f                      if (edx_9 == 0)
0068f92f                          goto label_68f93c;
0068f928                  }
0068f928                  
0068f985                  if (edx_9 == 0)
0068f985                      goto label_68f93c;
0068f985                  
0068f987                  edx = edx_9[4];
0068f987                  
0068f98d                  if (edx != *(int32_t*)((char*)ADJ(ebx_5) + 8))
0068f98d                  {
0068f98f                      struct HashList<ControlSpecification,unsigned long,1>::HashListData** eax_26;
0068f98f                      eax_26 = arg3;
0068f98f                      
0068f998                      if (eax_26 == 0)
0068f998                      {
0068f9a0                          var_74 = 0x79c9ac;
0068f9a8                          IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&var_70);
0068f9ad                          eax_30 = var_10;
0068f9b8                          cond:6 = eax_30 == &var_6c;
0068f9ba                          break;
0068f998                      }
0068f98d                  }
0068f924              }
0068f924              
0068f94d              class DLListData* dllist_next = ADJ(ebx_5)->dllist_next;
0068f94d              
0068f952              if (dllist_next == 0)
0068f952                  goto label_68f971;
0068f952              
0068f954              ebx_5 = &dllist_next[-1];
0068f954              
0068f959              if (ebx_5 == 0)
0068f959                  goto label_68f971;
0068f8d0          }
0068f8c1      }
0068fa64      var_70 = 0x79c9a8;
0068fa64      
0068fa6c      if (!(cond:6))
0068fa6f          operator delete[](eax_30);
0068fa6f      
0068fa7a      eax_30 = 0;
0068fa83      return 0;
0068f6f0  }

0068fa86                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0068fa90  uint8_t __thiscall CMasterInputMap::ReadBindingsFromFileNode(class CMasterInputMap* this, class PFileNode const* arg2)

0068fa90  {
0068fa96      class PFileNode* esi = arg2;
0068fa9a      class CMasterInputMap* this_1 = this;
0068faa1      class CMasterInputMap* this_2 = this_1;
0068faa5      char var_15 = 1;
0068faa9      uint32_t eax = PFileNode::GetNumSubNodes(esi);
0068fab4      int32_t var_10 = 0;
0068fab4      
0068fabc      if (eax <= 0)
0068fabc      {
0068fabe          eax = 1;
0068fac7          return 1;
0068fabc      }
0068fabc      
0068fad9      while (true)
0068fad9      {
0068fad9          class PFileNode* eax_2;
0068fad9          uint32_t* ecx_3;
0068fad9          uint32_t edx_1;
0068fad9          eax_2 = esi->vtable->GetSubNode(var_10);
0068fae0          int32_t i_1;
0068fae0          int32_t* var_2c_2 = &i_1;
0068fae3          class PStringBase<char> var_30 = 0x1a;
0068fae5          class PFileNode* var_34_1 = eax_2;
0068faf0          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
0068faf0          class CMasterInputMap** PStringBase<char>::s_NullBuffer_5;
0068faf0          
0068faf0          if (FileNodeUtils::GetNameAsEnum(eax_2, edx_1, ecx_3) != 0)
0068faf0          {
0068fb5b              int32_t i = i_1;
0068fb5f              class HashList<unsigned long,CInputMap *,1>* ebx_1 = &this_1->m_hashSections;
0068fb72              int32_t* eax_9 = ebx_1->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, i) % ebx_1->m_ihlIntrusive.m_hash.m_numBuckets)];
0068fb72              
0068fb76              if (eax_9 == 0)
0068fb76              {
0068fb8d              label_68fb8d:
0068fb8d                  PStringBase<char>::s_NullBuffer_5 = operator new(0x80);
0068fb94                  class CMasterInputMap** PStringBase<char>::s_NullBuffer_4;
0068fb94                  
0068fb94                  if (PStringBase<char>::s_NullBuffer_5 == 0)
0068fc21                      PStringBase<char>::s_NullBuffer_4 = nullptr;
0068fb94                  else
0068fb94                  {
0068fb9a                      int32_t i_2 = i_1;
0068fb9e                      *(uint32_t*)PStringBase<char>::s_NullBuffer_5 = this_1;
0068fba3                      uint32_t var_2c_8 = 0;
0068fba7                      PStringBase<char>::s_NullBuffer_5[1] = i_2;
0068fbaa                      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>(&PStringBase<char>::s_NullBuffer_5[2], var_2c_8);
0068fba0                      PStringBase<char>::s_NullBuffer_5[0x1e] = 0;
0068fba0                      PStringBase<char>::s_NullBuffer_5[0x1f] = 0;
0068fbb7                      this_1 = this_2;
0068fbbb                      PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_5;
0068fb94                  }
0068fb94                  
0068fc24                  PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_4;
0068fc2d                  var_15 &= CInputMap::FromFileNode(PStringBase<char>::s_NullBuffer_4, eax_2);
0068fc35                  class CInputMap** var_2c_14 = &PStringBase<char>::s_NullBuffer_3;
0068fc3a                  var_30 = &i_1;
0068fc3d                  HashList<unsigned long,CInputMap *,1>::push_tail(ebx_1, var_30, var_2c_14);
0068fb76              }
0068fb76              else
0068fb76              {
0068fb7a                  while (*(uint32_t*)eax_9 != i)
0068fb7a                  {
0068fb7c                      eax_9 = eax_9[1];
0068fb7c                      
0068fb81                      if (eax_9 == 0)
0068fb81                          goto label_68fb8d;
0068fb7a                  }
0068fb7a                  
0068fbc1                  if (eax_9 == 0)
0068fbc1                      goto label_68fb8d;
0068fbc1                  
0068fbc3                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0068fbc8                  PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0068fbd0                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_2[-1]);
0068fbdd                  class PStringBase<char> ecx_11 = PFileNode::GetNameAsPString(eax_2, &PStringBase<char>::s_NullBuffer_3);
0068fbe2                  PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
0068fbe6                  class CMasterInputMap** PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_5;
0068fbe7                  var_30 = ecx_11;
0068fbef                  PStringBase<char>::PStringBase<char>(&var_30, "ERROR - duplicate input map name…");
0068fbf5                  PFileNode::ReportError(eax_2, var_30);
0068fc04                  var_15 = 0;
0068fc04                  
0068fc15                  if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_5[-4]) == 0 && PStringBase<char>::s_NullBuffer_5 != 0x14))
0068fbfa                      PStringBase<char>::s_NullBuffer_5[-5]->vtable(1);
0068fb76              }
0068faf0          }
0068faf0          else
0068faf0          {
0068faf2              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0068faf7              PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
0068faff              InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
0068fb0c              class PStringBase<char> ecx_5 = PFileNode::GetNameAsPString(eax_2, &PStringBase<char>::s_NullBuffer_3);
0068fb11              PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_3;
0068fb15              class CMasterInputMap** PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_5;
0068fb16              var_30 = ecx_5;
0068fb1e              PStringBase<char>::PStringBase<char>(&var_30, "ERROR - invalid input map name "…");
0068fb24              PFileNode::ReportError(eax_2, var_30);
0068fb33              var_15 = 0;
0068fb33              
0068fb48              if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_5[-4]) == 0 && PStringBase<char>::s_NullBuffer_5 != 0x14))
0068fb29                  PStringBase<char>::s_NullBuffer_5[-5]->vtable(1);
0068faf0          }
0068fc4b          bool cond:1_1 = (var_10 + 1) < eax;
0068fc4d          var_10 += 1;
0068fc4d          
0068fc51          if (!(cond:1_1))
0068fc51              break;
0068fc51          
0068faca          esi = arg2;
0068fad9      }
0068fad9      
0068fc57      int32_t eax_16;
0068fc57      eax_16 = var_15;
0068fc62      return eax_16;
0068fa90  }

0068fc65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0068fc70  uint8_t __thiscall CMasterInputMap::CopyInto(class CMasterInputMap const* this, class DBObj* arg2)

0068fc70  {
0068fc76      void* eax = *(int32_t*)((char*)arg2 + 0x30);
0068fc76      
0068fc7e      if (eax != this->m_strName.m_charbuffer)
0068fc7e      {
0068fc94          if ((InterlockedDecrement(((char*)eax - 0x10)) == 0 && eax != 0x14))
0068fc9c              **(uint32_t**)((char*)eax - 0x14)(1);
0068fc9c          
0068fc9e          class PSRefBufferCharData<char>* m_charbuffer = this->m_strName.m_charbuffer;
0068fca1          *(int32_t*)((char*)arg2 + 0x30) = m_charbuffer;
0068fca8          InterlockedIncrement(&m_charbuffer[-1]);
0068fc7e      }
0068fc7e      
0068fcb7      *(uint32_t*)((char*)arg2 + 0x34) = this->m_guidMap.m_data1;
0068fcb9      int32_t edx_3;
0068fcb9      edx_3 = this->m_guidMap.m_data2;
0068fcb9      *(uint16_t*)((char*)edx_3)[2] = this->m_guidMap.m_data3;
0068fcbc      *(uint32_t*)((char*)arg2 + 0x38) = edx_3;
0068fcbf      int32_t edx_4;
0068fcbf      edx_4 = this->m_guidMap.m_data4[0];
0068fcbf      *(uint8_t*)((char*)edx_4)[1] = this->m_guidMap.m_data4[1];
0068fcbf      *(uint8_t*)((char*)edx_4)[2] = this->m_guidMap.m_data4[2];
0068fcbf      *(uint8_t*)((char*)edx_4)[3] = this->m_guidMap.m_data4[3];
0068fcc2      *(uint32_t*)((char*)arg2 + 0x3c) = edx_4;
0068fcc5      int32_t eax_5;
0068fcc5      eax_5 = this->m_guidMap.m_data4[4];
0068fcc5      *(uint8_t*)((char*)eax_5)[1] = this->m_guidMap.m_data4[5];
0068fcc5      *(uint8_t*)((char*)eax_5)[2] = this->m_guidMap.m_data4[6];
0068fcc5      *(uint8_t*)((char*)eax_5)[3] = this->m_guidMap.m_data4[7];
0068fcca      *(uint32_t*)((char*)arg2 + 0x40) = eax_5;
0068fcd7      return CMasterInputMap::Merge(arg2, this, 0);
0068fc70  }

0068fcda                                                                                90 90 90 90 90 90                            ......

0068fce0  void __thiscall CMasterInputMap::Serialize(class CMasterInputMap* this, class Archive* arg2)

0068fce0  {
0068fce6      class Archive* esi = arg2;
0068fcee      DBObj::Serialize(this, esi);
0068fcf7      PStringBase<char>::Serialize(&this->m_strName, esi);
0068fd01      Serializer::SerializePrimitive(&this->m_guidMap, esi);
0068fd0d      SmartArray<DeviceKeyMapEntry,1>::Serialize(&this->m_rgDevices, esi);
0068fd12      uint32_t m_numElements_1 = this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numElements;
0068fd1c      Archive::CheckAlignment(esi, 4);
0068fd25      uint32_t* eax_1 = Archive::GetBytes(esi, 4);
0068fd25      
0068fd2c      if (eax_1 != 0)
0068fd2c      {
0068fd32          if ((esi->m_flags & 1) == 0)
0068fd38              m_numElements_1 = *(uint32_t*)eax_1;
0068fd32          else
0068fd34              *(uint32_t*)eax_1 = m_numElements_1;
0068fd2c      }
0068fd2c      
0068fd3e      uint32_t var_10;
0068fd3e      
0068fd3e      if ((esi->m_flags & 1) == 0)
0068fd3e      {
0068fdb0          int32_t ebp_1 = 0;
0068fdb0          
0068fdb4          if (m_numElements_1 > 0)
0068fdb4          {
0068fe1b              do
0068fe1b              {
0068fdc5                  var_10 = 0xffffffff;
0068fdcd                  AvailableProperty::Serialize(&var_10, esi);
0068fdd6                  Archive::CheckAlignment(esi, 4);
0068fddf                  uint8_t* eax_4 = Archive::GetBytes(esi, 4);
0068fddf                  
0068fde6                  if (eax_4 != 0)
0068fde6                  {
0068fdec                      if ((esi->m_flags & 1) == 0)
0068fdf8                          arg2 = *(uint32_t*)eax_4;
0068fdec                      else
0068fdf2                          *(uint32_t*)eax_4 = arg2;
0068fde6                  }
0068fde6                  
0068fe04                  if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
0068fe04                      break;
0068fe04                  
0068fe13                  HashList<ControlSpecification,unsigned long,1>::push_tail(&this->m_listMetaKeys, &var_10, &arg2);
0068fe18                  ebp_1 += 1;
0068fe1b              } while (ebp_1 < m_numElements_1);
0068fdb4          }
0068fd3e      }
0068fd3e      else
0068fd3e      {
0068fd49          void* __offset(DLListData, -0x8) i = nullptr;
0068fd49          
0068fd4d          if (this->m_listMetaKeys.m_ihlIntrusive.m_hash.m_numElements > 0)
0068fd4d          {
0068fd4f              class DLListData* head_ = this->m_listMetaKeys.m_ihlIntrusive.m_list.head_;
0068fd4f              
0068fd54              if (head_ == 0)
0068fd5b                  i = nullptr;
0068fd54              else
0068fd56                  i = &head_[-1];
0068fd4d          }
0068fd4d          
0068fd5f          class HashList<ControlSpecification,unsigned long,1>* var_4_1 = &this->m_listMetaKeys;
0068fd63          class DLListData* dllist_next;
0068fd63          
0068fd63          for (; i != 0; i = &dllist_next[-1])
0068fd63          {
0068fd73              AvailableProperty::Serialize(i, esi);
0068fd7c              Archive::CheckAlignment(esi, 4);
0068fd85              uint8_t* eax_3 = Archive::GetBytes(esi, 4);
0068fd85              
0068fd8c              if (eax_3 != 0)
0068fd8c              {
0068fd92                  if ((esi->m_flags & 1) == 0)
0068fd9d                      *(int32_t*)((char*)ADJ(i) + 8) = *(uint32_t*)eax_3;
0068fd92                  else
0068fd97                      *(uint32_t*)eax_3 = *(int32_t*)((char*)ADJ(i) + 8);
0068fd8c              }
0068fd8c              
0068fda0              dllist_next = ADJ(i)->dllist_next;
0068fda0              
0068fda5              if (dllist_next == 0)
0068fda5                  break;
0068fd63          }
0068fd3e      }
0068fd3e      
0068fe1d      uint32_t m_numElements = this->m_hashSections.m_ihlIntrusive.m_hash.m_numElements;
0068fe27      arg2 = m_numElements;
0068fe2b      Archive::CheckAlignment(esi, 4);
0068fe34      uint8_t* eax_7 = Archive::GetBytes(esi, 4);
0068fe34      
0068fe3b      if (eax_7 != 0)
0068fe3b      {
0068fe41          if ((esi->m_flags & 1) == 0)
0068fe41          {
0068fe47              uint32_t m_numElements_2 = *(uint32_t*)eax_7;
0068fe49              arg2 = m_numElements_2;
0068fe4d              m_numElements = m_numElements_2;
0068fe41          }
0068fe41          else
0068fe43              *(uint32_t*)eax_7 = m_numElements;
0068fe3b      }
0068fe3b      
0068fe53      if ((esi->m_flags & 1) == 0)
0068fe53      {
0068fece          int32_t var_8_1 = 0;
0068fece          
0068fed6          if (m_numElements > 0)
0068fed6          {
0068fee4              class CInputMap* edi_1;
0068fee4              
0068fee4              while (true)
0068fee4              {
0068fee4                  Archive::CheckAlignment(esi, 4);
0068feed                  uint8_t* eax_10 = Archive::GetBytes(esi, 4);
0068feed                  
0068fef4                  if (eax_10 != 0)
0068fef4                  {
0068fefa                      if ((esi->m_flags & 1) == 0)
0068ff06                          var_10 = *(uint32_t*)eax_10;
0068fefa                      else
0068ff00                          *(uint32_t*)eax_10 = var_10;
0068fef4                  }
0068fef4                  
0068ff14                  edi_1 = operator new(0x80);
0068ff14                  
0068ff1b                  if (edi_1 == 0)
0068ff40                      edi_1 = nullptr;
0068ff1b                  else
0068ff1b                  {
0068ff1d                      uint32_t eax_12 = var_10;
0068ff28                      edi_1->m_pParent = this;
0068ff2a                      edi_1->m_eInputMapID = eax_12;
0068ff2d                      IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::IntrusiveHashTable<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>(&edi_1->m_listMappings, 0);
0068ff21                      edi_1->m_listMappings.m_ihlIntrusive.m_list.head_ = 0;
0068ff21                      edi_1->m_listMappings.m_ihlIntrusive.m_list.tail_ = nullptr;
0068ff3a                      m_numElements = arg2;
0068ff1b                  }
0068ff1b                  
0068ff45                  class CInputMap* var_c = edi_1;
0068ff49                  CInputMap::Serialize(edi_1, esi);
0068ff49                  
0068ff57                  if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
0068ff57                      break;
0068ff57                  
0068ff69                  HashList<unsigned long,CInputMap *,1>::push_tail(&this->m_hashSections, &var_10, &var_c);
0068ff73                  bool cond:3_1 = (var_8_1 + 1) < m_numElements;
0068ff75                  var_8_1 += 1;
0068ff75                  
0068ff79                  if (!(cond:3_1))
0068ff86                      return;
0068fee4              }
0068fee4              
0068ff8d              if (edi_1 != 0)
0068ff8d              {
0068ff94                  IntrusiveHashList<QualifiedControl,HashList<QualifiedControl,unsigned long,1>::HashListData *,1>::delete_contents(&edi_1->m_listMappings);
0068ff99                  struct HashList<QualifiedControl,unsigned long,1>::HashListData** m_buckets = edi_1->m_listMappings.m_ihlIntrusive.m_hash.m_buckets;
0068ff8f                  edi_1->m_listMappings.m_ihlIntrusive.m_hash.vtable = 0x7fffe0;
0068ff8f                  
0068ffa7                  if (m_buckets != &edi_1->m_listMappings.m_ihlIntrusive.m_hash.m_aInplaceBuckets)
0068ffaa                      operator delete[](m_buckets);
0068ffaa                  
0068ff8f                  edi_1->m_listMappings.m_ihlIntrusive.m_hash.m_buckets = nullptr;
0068ff8f                  edi_1->m_listMappings.m_ihlIntrusive.m_hash.m_firstInterestingBucket = nullptr;
0068ff8f                  edi_1->m_listMappings.m_ihlIntrusive.m_hash.m_numBuckets = 0;
0068ff8f                  edi_1->m_listMappings.m_ihlIntrusive.m_hash.m_numElements = 0;
0068ffbf                  operator delete(edi_1);
0068ff8d              }
0068fed6          }
0068fe53      }
0068fe53      else
0068fe53      {
0068fe61          void* __offset(DLListData, -0x8) edi = nullptr;
0068fe61          
0068fe65          if (this->m_hashSections.m_ihlIntrusive.m_hash.m_numElements > 0)
0068fe65          {
0068fe67              class DLListData* head__1 = this->m_hashSections.m_ihlIntrusive.m_list.head_;
0068fe67              
0068fe6c              if (head__1 == 0)
0068fe73                  edi = nullptr;
0068fe6c              else
0068fe6e                  edi = &head__1[-1];
0068fe65          }
0068fe65          
0068fe77          class HashList<unsigned long,CInputMap *,1>* var_4_2 = &this->m_hashSections;
0068fe77          
0068fe7b          if (edi != 0)
0068fe7b          {
0068fe85              while (true)
0068fe85              {
0068fe85                  Archive::CheckAlignment(esi, 4);
0068fe8e                  uint8_t* eax_9 = Archive::GetBytes(esi, 4);
0068fe8e                  
0068fe95                  if (eax_9 != 0)
0068fe95                  {
0068fe9b                      if ((esi->m_flags & 1) == 0)
0068fea5                          *(int32_t*)((char*)ADJ(edi) + -8) = *(uint32_t*)eax_9;
0068fe9b                      else
0068fe9f                          *(uint32_t*)eax_9 = *(int32_t*)((char*)ADJ(edi) + -8);
0068fe95                  }
0068fe95                  
0068feab                  CInputMap::Serialize(*(int32_t*)((char*)ADJ(edi) + 8), esi);
0068feb0                  class DLListData* dllist_next_1 = ADJ(edi)->dllist_next;
0068feb0                  
0068feb5                  if (dllist_next_1 == 0)
0068feb5                      break;
0068feb5                  
0068febb                  edi = &dllist_next_1[-1];
0068febb                  
0068fec0                  if (edi == 0)
0068fec9                      return;
0068fe85              }
0068fe7b          }
0068fe53      }
0068fce0  }

0068fdb8                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0068ffd1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0068ffe0  uint8_t __thiscall CMasterInputMap::FromFileNode(class CMasterInputMap* this, class PFileNode const* arg2)

0068ffe0  {
0068fff3      class PFileNode* var_10;
0068fff3      
0068fff3      if (PFileNode::GetNumSubNodes(arg2) == 4)
0068fff3      {
00690013          struct PFileNode::VTable* vtable = arg2->vtable;
00690015          var_10 = nullptr;
00690019          class PFileNode* eax_2 = vtable->GetSubNode(var_10);
00690024          PFileNode::GetNameAsPString(eax_2, &this->m_strName);
00690024          
00690040          if (CMasterInputMap::ReadGuidFromFileNode(this, eax_2->vtable->GetSubNode(0, &this->m_guidMap)) != 0)
00690040          {
00690042              struct PFileNode::VTable* vtable_2 = arg2->vtable;
00690044              var_10 = 1;
0069004b              var_10 = vtable_2->GetSubNode(var_10);
0069004b              
00690055              if (CMasterInputMap::ReadDevicesFromFileNode(this, var_10) != 0)
00690055              {
00690057                  struct PFileNode::VTable* vtable_1 = arg2->vtable;
00690059                  var_10 = 2;
00690060                  var_10 = vtable_1->GetSubNode(var_10);
00690060                  
0069006a                  if (CMasterInputMap::ReadMetaKeysFromFileNode(this, var_10) != 0)
0069006a                  {
0069006c                      struct PFileNode::VTable* vtable_3 = arg2->vtable;
0069006e                      var_10 = 3;
00690075                      var_10 = vtable_3->GetSubNode(var_10);
00690085                      return CMasterInputMap::ReadBindingsFromFileNode(this, var_10) != 0;
0069006a                  }
00690055              }
00690040          }
0068fff3      }
0068fff3      else
0068fff3      {
0068fff5          var_10 = arg2;
0068fffd          PStringBase<char>::PStringBase<char>(&var_10, "ERROR - must have exactly 4 part…");
00690003          PFileNode::ReportError(arg2, var_10);
0068fff3      }
00690010      return 0;
0068ffe0  }

00690088                          90 90 90 90 90 90 90 90                                                          ........

00690090  uint8_t DebugConsole::ConsoleCommand_Clear()

00690090  {
00690090      class DebugConsole* DebugConsole::sm_pCurrentDebugConsole_1 = DebugConsole::sm_pCurrentDebugConsole;
00690090      
00690097      if (DebugConsole::sm_pCurrentDebugConsole_1 == 0)
00690097      {
006900ad          DebugConsole::sm_pCurrentDebugConsole_1 = 1;
006900af          return 1;
00690097      }
00690097      
0069009c      GlyphList::Flush(DebugConsole::sm_pCurrentDebugConsole_1->m_pOutputBuffer);
006900a1      DebugConsole::sm_pCurrentDebugConsole->m_OutputBufferIsDirty = 1;
006900ac      return 1;
00690090  }


006900b0  void __fastcall DebugConsole::InputMoveCursorToPreviousWord(class DebugConsole* this)

006900b0  {
006900b0      class DebugConsole* this_1 = this;
006900b0      
006900c7      if (GlyphList::FindPrevWord(this->m_pInputBuffer, this->m_InputCursorPos, &this_1) != 0)
006900cd          this->m_InputCursorPos = this_1;
006900b0  }

006900d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006900e0  void __fastcall DebugConsole::InputMoveCursorToNextWord(class DebugConsole* this)

006900e0  {
006900e0      class DebugConsole* this_1 = this;
006900e0      
006900f7      if (GlyphList::FindNextWord(this->m_pInputBuffer, this->m_InputCursorPos, &this_1) != 0)
006900fd          this->m_InputCursorPos = this_1;
006900e0  }

00690103           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00690110  void __fastcall DebugConsole::Think(class DebugConsole* this)

00690110  {
00690111      class DebugConsole* this_1 = this;
00690113      uint8_t m_WantActivateInput = this_1->m_WantActivateInput;
00690113      
00690118      if (m_WantActivateInput == 0)
0069011a          this = this_1->m_WantDeactivateInput;
0069011a      
0069011f      if ((m_WantActivateInput != 0 || this != 0))
0069011f      {
00690125          this_1->m_IsInputActive = m_WantActivateInput;
00690128          this_1->m_WantActivateInput = 0;
0069012c          this_1->m_WantDeactivateInput = 0;
00690130          class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00690130          
00690138          if (ICIDM::s_cidm_1 != 0)
00690138          {
00690142              if (m_WantActivateInput != 0)
00690142              {
00690144                  ICIDM::s_cidm_1->vtable->RegisterInputHandler(&this_1->vtable, 2);
0069014d                  ICIDM::s_cidm->vtable->RegisterInputMap(7, &this_1->vtable, 0xfa0);
00690163                  ICIDM::s_cidm->vtable->RegisterInputMap(1, &this_1->vtable, 0xf9f);
00690176                  ICIDM::s_cidm->vtable->SetTextMode(1);
00690187                  return;
00690142              }
00690142              
00690188              ICIDM::s_cidm_1->vtable->UnregisterInputHandler(&this_1->vtable, 2);
00690191              ICIDM::s_cidm->vtable->UnregisterInputMap(7, &this_1->vtable);
006901a2              ICIDM::s_cidm->vtable->UnregisterInputMap(1, &this_1->vtable);
006901b0              ICIDM::s_cidm->vtable->SetTextMode(0);
00690138          }
0069011f      }
00690110  }

006901c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006901d0  void __fastcall DebugConsole::InvalidateTabCompletion(class DebugConsole* this)

006901d0  {
006901e1      class PSRefBufferCharData<char>* m_charbuffer = this->m_LastTabCompletionWord.m_charbuffer;
006901e1      
006901eb      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
006901eb      {
006901fc          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00690204              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00690204          
00690206          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00690211          this->m_LastTabCompletionWord.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00690214          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
006901eb      }
006901eb      
00690216      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_LastTabCompletionString.m_charbuffer;
00690216      
0069021f      if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer)
0069021f      {
00690230          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00690238              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00690238          
0069023a          class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00690246          this->m_LastTabCompletionString.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00690249          InterlockedIncrement((PStringBase<char>::s_NullBuffer_2 - 0x10));
0069021f      }
006901d0  }


00690250  void __fastcall DebugConsole::InputBackspaceCharacter(class DebugConsole* this)

00690250  {
00690253      uint32_t m_InputCursorPos = this->m_InputCursorPos;
00690253      
00690258      if (m_InputCursorPos <= 0)
0069027b          return;
0069027b      
0069025f      class GlyphList* m_pInputBuffer = this->m_pInputBuffer;
00690263      this->m_InputCursorPos = (m_InputCursorPos - 1);
00690266      GlyphList::Delete(m_pInputBuffer, (m_InputCursorPos - 1), m_InputCursorPos);
0069026b      this->m_LastInputHistoryPos = 0xffffffff;
00690275      /* tailcall */
00690275      return DebugConsole::InvalidateTabCompletion(this);
00690250  }

0069027c                                                                                      90 90 90 90                              ....

00690280  void __thiscall DebugConsole::InputScrollOutputBufferUp(class DebugConsole* this, uint32_t const arg2)

00690280  {
00690284      if (this->m_OutputScrollPos == 0xffffffff)
00690284      {
0069028c          uint32_t eax_3 = (this->m_pOutputBuffer->m_glyphLines.m_num - this->m_NumOutputLines);
0069028c          
00690291          if (eax_3 > 0)
00690293              this->m_OutputScrollPos = eax_3;
00690284      }
00690284      
00690296      uint32_t m_OutputScrollPos = this->m_OutputScrollPos;
00690296      
0069029c      if (m_OutputScrollPos != 0xffffffff)
0069029c      {
0069029e          uint32_t eax_4 = (m_OutputScrollPos - arg2);
0069029e          
006902a2          if ((m_OutputScrollPos - arg2) < 0)
006902a4              eax_4 = 0;
006902a4          
006902a6          this->m_OutputScrollPos = eax_4;
0069029c      }
0069029c      
006902a9      this->m_OutputBufferIsDirty = 1;
00690280  }


006902b0  void __thiscall DebugConsole::InputScrollOutputBufferDown(class DebugConsole* this, uint32_t const arg2)

006902b0  {
006902b0      uint32_t m_OutputScrollPos = this->m_OutputScrollPos;
006902b8      class GlyphList* m_pOutputBuffer;
006902b8      uint32_t m_NumOutputLines;
006902b8      
006902b8      if (m_OutputScrollPos != 0xffffffff)
006902b8      {
006902ba          m_pOutputBuffer = this->m_pOutputBuffer;
006902bd          m_NumOutputLines = this->m_NumOutputLines;
006902b8      }
006902b8      
006902c7      if ((m_OutputScrollPos == 0xffffffff || m_OutputScrollPos >= (m_pOutputBuffer->m_glyphLines.m_num - m_NumOutputLines)))
006902c7      {
006902eb          this->m_OutputBufferIsDirty = 1;
006902ef          this->m_OutputScrollPos = 0xffffffff;
006902ef          return;
006902c7      }
006902c7      
006902cd      uint32_t eax = (m_OutputScrollPos + arg2);
006902cf      this->m_OutputScrollPos = eax;
006902d7      bool cond:1_1 = eax < (m_pOutputBuffer->m_glyphLines.m_num - m_NumOutputLines);
006902d9      this->m_OutputBufferIsDirty = 1;
006902d9      
006902dd      if (!(cond:1_1))
006902e0          this->m_OutputScrollPos = 0xffffffff;
006902b0  }

006902fb                                                                                   90 90 90 90 90                             .....

00690300  void __fastcall DebugConsole::InputScrollOutputBufferToTop(class DebugConsole* this)

00690300  {
00690306      bool cond:0 = this->m_pOutputBuffer->m_glyphLines.m_num <= this->m_NumOutputLines;
00690309      this->m_OutputBufferIsDirty = 1;
00690309      
0069030d      if (!(cond:0))
0069030f          this->m_OutputScrollPos = 0;
00690300  }

00690317                                                                       90 90 90 90 90 90 90 90 90                         .........

00690320  void __fastcall DebugConsole::InputDeleteCharacter(class DebugConsole* this)

00690320  {
00690323      class GlyphList* m_pInputBuffer = this->m_pInputBuffer;
00690326      uint32_t m_InputCursorPos = this->m_InputCursorPos;
00690326      
0069032c      if (m_InputCursorPos >= m_pInputBuffer->m_glyphList._num_elements)
00690348          return;
00690348      
00690333      GlyphList::Delete(m_pInputBuffer, m_InputCursorPos, (m_InputCursorPos + 1));
00690338      this->m_LastInputHistoryPos = 0xffffffff;
00690342      /* tailcall */
00690342      return DebugConsole::InvalidateTabCompletion(this);
00690320  }

00690349                             90 90 90 90 90 90 90                                                           .......

00690350  void __thiscall DebugConsole::SetInputBufferContents(class DebugConsole* this, class PStringBase<char> const* arg2)

00690350  {
00690357      class GlyphList* m_pInputBuffer = this->m_pInputBuffer;
0069035a      this->m_InputCursorPos = 0;
0069035a      
00690367      if (m_pInputBuffer->m_glyphList._num_elements > 0)
00690369          GlyphList::Flush(m_pInputBuffer);
00690369      
00690372      class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
00690374      int32_t ecx = m_charbuffer->m_data[-4];
0069037a      int32_t i = 0;
0069037a      
0069037e      if ((ecx - 1) > 0)
0069037e      {
006903e6          do
006903e6          {
00690382              void* ecx_1 = &m_charbuffer->m_data[(ecx - 1)];
00690382              
00690386              if (i < ecx)
00690388                  ecx_1 = &m_charbuffer->m_data[i];
00690388              
0069038e              if (*(uint8_t*)ecx_1 != 0xa)
0069038e              {
00690390                  int32_t ecx_2 = m_charbuffer->m_data[-4];
00690395                  void* eax_1;
00690395                  
00690395                  if (i < ecx_2)
0069039d                      eax_1 = &m_charbuffer->m_data[i];
00690395                  else
00690397                      eax_1 = &m_charbuffer->m_data[(ecx_2 - 1)];
00690397                  
0069039f                  eax_1 = ((int16_t)*(uint8_t*)eax_1);
006903b5                  void var_24;
006903b5                  Glyph::Glyph(&var_24, eax_1, &RGBAColor_White, nullptr, nullptr, 8, 0xc);
006903c6                  GlyphList::Insert(this->m_pInputBuffer, this->m_InputCursorPos, &var_24);
006903d3                  this->m_InputCursorPos += 1;
006903d6                  Glyph::~Glyph(&var_24);
0069038e              }
0069038e              
006903db              m_charbuffer = arg2->m_charbuffer;
006903dd              ecx = m_charbuffer->m_data[-4];
006903e0              i += 1;
006903e6          } while (i < (ecx - 1));
0069037e      }
00690350  }

006903f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00690400  void __fastcall DebugConsole::SelectPreviousCommandInInputHistory(class DebugConsole* this)

00690400  {
00690400      uint32_t m_num = this->m_InputHistory.m_num;
00690400      
00690405      if (m_num > 0)
00690405      {
00690407          int32_t m_LastInputHistoryPos = this->m_LastInputHistoryPos;
00690407          
00690411          if ((m_LastInputHistoryPos != 0xffffffff && m_LastInputHistoryPos != 0))
00690411          {
00690413              class PStringBase<char>* m_data = this->m_InputHistory.m_data;
00690417              this->m_LastInputHistoryPos = (m_LastInputHistoryPos - 1);
0069041e              DebugConsole::SetInputBufferContents(this, &m_data[(m_LastInputHistoryPos - 1)]);
00690423              return;
00690411          }
00690411          
00690427          this->m_LastInputHistoryPos = (m_num - 1);
00690431          DebugConsole::SetInputBufferContents(this, &this->m_InputHistory.m_data[(m_num - 1)]);
00690405      }
00690400  }

00690437                                                                       90 90 90 90 90 90 90 90 90                         .........

00690440  void __fastcall DebugConsole::SelectNextCommandInInputHistory(class DebugConsole* this)

00690440  {
00690440      uint32_t m_num = this->m_InputHistory.m_num;
00690440      
00690445      if (m_num > 0)
00690445      {
00690447          int32_t m_LastInputHistoryPos = this->m_LastInputHistoryPos;
00690447          
00690452          if ((m_LastInputHistoryPos != 0xffffffff && m_LastInputHistoryPos != (m_num - 1)))
00690452          {
00690454              class PStringBase<char>* m_data = this->m_InputHistory.m_data;
00690458              this->m_LastInputHistoryPos = (m_LastInputHistoryPos + 1);
0069045f              DebugConsole::SetInputBufferContents(this, &m_data[(m_LastInputHistoryPos + 1)]);
00690464              return;
00690452          }
00690452          
00690465          class PStringBase<char>* m_data_1 = this->m_InputHistory.m_data;
00690468          this->m_LastInputHistoryPos = 0;
00690476          DebugConsole::SetInputBufferContents(this, &m_data_1[this->m_LastInputHistoryPos]);
00690445      }
00690440  }

0069047c                                                                                      90 90 90 90                              ....

00690480  uint8_t __fastcall DebugConsole::Startup(class DebugConsole* this)

00690480  {
00690483      class PStringBase<char> ebx;
00690483      class PStringBase<char> var_c = ebx;
00690488      struct IConsoleCallbackObject::VTable** eax;
00690488      
00690488      if (this == 0)
0069048f          eax = nullptr;
00690488      else
0069048a          eax = &this->vtable;
0069048a      
00690491      struct IConsoleCallbackObject::VTable** var_10 = eax;
00690492      GlobalRegistry::RegisterConsoleCallbackObject(var_10);
0069049a      var_10 = "Force console output to always b…";
006904a3      void var_4;
006904a3      PStringBase<char>::PStringBase<char>(&var_4, var_10);
006904a8      var_10 = "Console.AlwaysDrawOutput";
006904b1      class PStringBase<char> var_8;
006904b1      PStringBase<char>::PStringBase<char>(&var_8, var_10);
006904bb      uint32_t* var_20;
006904bb      void (* var_1c)(class PStringBase<char> const*);
006904bb      uint32_t var_18;
006904bb      class PStringBase<char>* var_14;
006904bb      
006904bb      if (this != 0xffffffe5)
006904bb      {
006904bd          var_10 = nullptr;
006904bf          var_14 = nullptr;
006904c1          var_18 = 0;
006904c3          var_1c = nullptr;
006904c9          var_20 = &var_4;
006904d2          GlobalRegistry::RegisterVariableInternal(&this->m_AlwaysDrawOutput, GRVDataType_Bool, &var_8, var_20, var_1c, var_18, var_14, var_10);
006904bb      }
006904bb      
006904da      struct IConsoleCallbackObject::VTable** esi;
006904da      var_10 = esi;
006904db      class PStringBase<char> esi_1 = var_8;
006904df      class PStringBase<char>* edi;
006904df      var_14 = edi;
006904ec      var_18 = (esi_1 - 0x10);
006904ec      
006904f5      if ((InterlockedDecrement(var_18) == 0 && esi_1 != 0x14))
006904f5      {
006904f7          int32_t edx_1 = *(uint32_t*)(esi_1 - 0x14);
006904f9          var_1c = 1;
006904fd          *(uint32_t*)edx_1(var_1c);
006904f5      }
006904f5      
00690503      int32_t* esi_4 = (var_8 - 0x14);
00690509      var_1c = &esi_4[1];
00690509      
00690512      if ((InterlockedDecrement(var_1c) == 0 && esi_4 != 0))
00690512      {
00690514          int32_t edx_2 = *(uint32_t*)esi_4;
00690516          var_20 = 1;
0069051a          *(uint32_t*)edx_2(var_20);
00690512      }
00690512      
0069051c      var_20 = "Print all typed console commands…";
00690525      PStringBase<char>::PStringBase<char>(&var_10, var_20);
0069052a      var_20 = "Console.EchoInput";
00690533      PStringBase<char>::PStringBase<char>(&var_c, var_20);
00690533      
00690540      if (this != 0xffffff80)
00690540      {
00690542          var_20 = nullptr;
00690557          GlobalRegistry::RegisterVariableInternal(&this->m_EchoInput, GRVDataType_Bool, &var_c, &var_10, nullptr, 0, nullptr, var_20);
00690540      }
00690540      
00690563      int32_t* esi_6 = (var_c - 0x14);
00690569      var_20 = &esi_6[1];
00690569      
00690572      if ((InterlockedDecrement(var_20) == 0 && esi_6 != 0))
0069057a          **(uint32_t**)esi_6(1);
0069057a      
00690580      void* __offset(PStringBase<char>, -0x14) esi_8 = &var_14[-5];
00690580      
0069058f      if ((InterlockedDecrement(((char*)esi_8 + 4)) == 0 && esi_8 != 0))
00690597          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_8) + -0x14)(1);
00690597      
006905a2      PStringBase<char>::PStringBase<char>(&var_18, "Console background window opacit…");
006905b0      PStringBase<char>::PStringBase<char>(&var_14, "Console.BackgroundOpacity");
006905b0      
006905ba      if (this != 0xffffffe4)
006905d1          GlobalRegistry::RegisterVariableInternal(&this->m_BackgroundOpacity, GRVDataType_Float32, &var_14, &var_18, nullptr, 0, nullptr, nullptr);
006905d1      
006905dd      void* __offset(PStringBase<char>, -0x14) esi_10 = &var_14[-5];
006905dd      
006905ec      if ((InterlockedDecrement(((char*)esi_10 + 4)) == 0 && esi_10 != 0))
006905f4          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_10) + -0x14)(1);
006905f4      
006905fa      void (* esi_12)(class PStringBase<char> const*) = ((char*)var_1c - 0x14);
006905fa      
00690609      if ((InterlockedDecrement(((char*)esi_12 + 4)) == 0 && esi_12 != 0))
00690611          **(uint32_t**)esi_12(1);
00690611      
0069061c      PStringBase<char>::PStringBase<char>(&var_20, "Clears the console output buffer");
0069062a      PStringBase<char>::PStringBase<char>(&var_1c, "Clear");
0069063e      GlobalRegistry::RegisterCommand(DebugConsole::ConsoleCommand_Clear, &var_1c, &var_20);
00690647      void (* esi_14)(class PStringBase<char> const*) = ((char*)var_1c - 0x14);
00690647      
00690659      if ((InterlockedDecrement(((char*)esi_14 + 4)) == 0 && esi_14 != 0))
00690661          **(uint32_t**)esi_14(1);
00690661      
00690676      if ((InterlockedDecrement(((char*)esi_8 - 0xc)) == 0 && esi_8 != 0x10))
0069067e          *(uint32_t*)*(int32_t*)((char*)((char*)esi_8 + 0x14) + -0x24)(1);
0069067e      
00690680      GlobalEventHandler::GetGlobalEventHandler();
00690685      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00690685      
0069068f      if (ICIDM::s_cidm_1 != 0)
0069068f      {
00690693          if (this != 0)
00690693          {
00690695              ICIDM::s_cidm_1->vtable->RegisterInputMap(0xb, &this->vtable, 0xfa0);
006906a5              int32_t eax_20;
006906a5              eax_20 = 1;
006906ab              return 1;
00690693          }
00690693          
006906ac          ICIDM::s_cidm_1->vtable->RegisterInputMap(0xb, 0, 0xfa0);
0069068f      }
0069068f      
006906bb      class GlobalEventHandler* eax_21;
006906bb      eax_21 = 1;
006906c1      return 1;
00690480  }

006906c2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006906d0  void __fastcall DebugConsole::Shutdown(class DebugConsole* this)

006906d0  {
006906d0      class DebugConsole* this_1 = this;
006906d1      void* ebx;
006906d1      void* var_8 = ebx;
006906d6      struct IConsoleCallbackObject::VTable** eax;
006906d6      
006906d6      if (this == 0)
006906dd          eax = nullptr;
006906d6      else
006906d8          eax = &this->vtable;
006906d8      
006906df      void* esi;
006906df      void* var_c = esi;
006906e0      void* edi;
006906e0      void* var_10 = edi;
006906e2      GlobalRegistry::UnregisterConsoleCallbackObject(eax);
006906f3      PStringBase<char>::PStringBase<char>(&this_1, "Clear");
006906fd      GlobalRegistry::UnregisterCommand(&this_1);
0069070c      void* __offset(DebugConsole, -0x14) esi_2 = ((char*)this_1 - 0x14);
0069070c      
0069071e      if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
00690726          *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
00690726      
00690731      PStringBase<char>::PStringBase<char>(&var_8, "Console.EchoInput");
0069073b      GlobalRegistry::UnregisterVariable(&var_8);
00690744      int32_t* esi_4 = ((char*)var_8 - 0x14);
00690744      
00690756      if ((InterlockedDecrement(&esi_4[1]) == 0 && esi_4 != 0))
0069075e          **(uint32_t**)esi_4(1);
0069075e      
00690769      PStringBase<char>::PStringBase<char>(&var_c, "Console.AlwaysDrawOutput");
00690773      GlobalRegistry::UnregisterVariable(&var_c);
0069077c      int32_t* esi_6 = ((char*)var_c - 0x14);
0069077c      
0069078e      if ((InterlockedDecrement(&esi_6[1]) == 0 && esi_6 != 0))
00690796          **(uint32_t**)esi_6(1);
00690796      
006907a1      PStringBase<char>::PStringBase<char>(&var_10, "Console.BackgroundOpacity");
006907ab      GlobalRegistry::UnregisterVariable(&var_10);
006907b4      int32_t* esi_8 = ((char*)var_10 - 0x14);
006907b4      
006907c6      if ((InterlockedDecrement(&esi_8[1]) == 0 && esi_8 != 0))
006907ce          **(uint32_t**)esi_8(1);
006907ce      
006907d0      class GlobalEventHandler* eax_5 = GlobalEventHandler::GetGlobalEventHandler();
006907d0      
006907d7      if (eax_5 != 0)
006907d7      {
006907db          struct NoticeHandler::VTable** edx_5;
006907db          
006907db          if (this == 0)
006907e2              edx_5 = nullptr;
006907db          else
006907dd              edx_5 = &this->vtable;
006907dd          
006907e4          eax_5->vtable->UnRegisterAllNoticeHandlers(edx_5);
006907d7      }
006907d7      
006907ec      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
006907ec      
006907f6      if (ICIDM::s_cidm_1 != 0)
006907f6      {
006907fa          if (this != 0)
006907fa          {
006907fc              ICIDM::s_cidm_1->vtable->UnregisterCallback(&this->vtable);
00690807              return;
006907fa          }
006907fa          
00690808          ICIDM::s_cidm_1->vtable->UnregisterCallback(0);
006907f6      }
006906d0  }

00690813                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

00690820  void __fastcall DebugConsole::UpdateCoordinates(class DebugConsole* this)

00690820  {
00690823      class QuickWindow* m_pOutputWindow = this->m_pOutputWindow;
0069082b      int32_t eax;
0069082b      int32_t edx;
0069082b      edx = HIGHD((0xaaaaaaab * m_pOutputWindow->m_ClientAreaHeight));
0069082b      eax = LOWD((0xaaaaaaab * m_pOutputWindow->m_ClientAreaHeight));
00690831      this->m_NumOutputLines = (edx >> 3);
00690840      this->m_NumOutputCharactersPerLine = (m_pOutputWindow->m_ClientAreaWidth >> 3);
00690843      SmartArray<PStringBase<char>,1>::Reset(&this->m_OutputLines);
00690850      SmartArray<PStringBase<char>,1>::SetNElements(&this->m_OutputLines, this->m_NumOutputLines, 1);
0069085f      this->m_NumInputCharactersPerLine = (this->m_pInputWindow->m_ClientAreaWidth >> 3);
00690862      this->m_OutputBufferIsDirty = 1;
00690820  }

00690868                          90 90 90 90 90 90 90 90                                                          ........

00690870  void __thiscall DebugConsole::AppendTextToOutputBuffer(class DebugConsole* this, class PStringBase<char> const* arg2)

00690870  {
0069087f      int32_t esi = arg2->m_charbuffer->m_data[-4];
0069087f      
00690886      if (esi > 0)
00690886      {
00690893          if (((*(uint8_t*)$S138) & 1) == 0)
00690893          {
006908a3              $S138 |= 1;
006908a9              GlyphText.m_data = 0;
006908af              GlyphText.m_sizeAndDeallocate = 0;
006908b5              GlyphText.m_num = 0;
006908bb              atexit($E139);
00690893          }
00690893          
006908c8          int32_t i = 0;
006908cc          GlyphText.m_num = 0;
006908cc          
006908d2          if ((esi - 1) > 0)
006908d2          {
006909a8              do
006909a8              {
006908e4                  class PSRefBufferCharData<char>* m_charbuffer = arg2->m_charbuffer;
006908e6                  int32_t ecx_1 = m_charbuffer->m_data[-4];
006908eb                  void* eax_1;
006908eb                  
006908eb                  if (i < ecx_1)
006908f3                      eax_1 = &m_charbuffer->m_data[i];
006908eb                  else
006908ed                      eax_1 = &m_charbuffer->m_data[(ecx_1 - 1)];
006908ed                  
006908f5                  eax_1 = ((int16_t)*(uint8_t*)eax_1);
00690909                  void var_24;
00690909                  Glyph::Glyph(&var_24, eax_1, &RGBAColor_White, nullptr, nullptr, 8, 0xc);
00690913                  uint32_t m_num = GlyphText.m_num;
00690919                  int32_t eax_3 = (GlyphText.m_sizeAndDeallocate & 0x7fffffff);
00690919                  
00690920                  if (m_num < eax_3)
00690920                  {
00690991                      Glyph::operator=(&GlyphText.m_data[m_num], &var_24);
00690996                      GlyphText.m_num += 1;
00690920                  }
00690920                  else
00690920                  {
00690922                      uint32_t edx_4 = (eax_3 + 1);
00690922                      
00690928                      if (edx_4 <= 8)
0069092a                          edx_4 = 8;
00690928                      else if (edx_4 <= 0x4000)
00690937                      {
00690956                          int32_t eflags_1;
00690956                          char eax_7;
00690956                          eax_7 = __bsr_gprv_memv(edx_4);
00690962                          int32_t esi_1 = (1 << eax_7);
00690962                          
00690966                          if (edx_4 > esi_1)
00690968                              edx_4 = (esi_1 * 2);
00690937                      }
00690937                      else
00690937                      {
0069093b                          int32_t eax_5 = (edx_4 & 0x3fff);
0069093b                          
00690940                          if (eax_5 != 0)
00690949                              edx_4 += (0x4000 - eax_5);
00690937                      }
00690937                      
00690978                      if (SmartArray<Glyph,1>::grow(&GlyphText, edx_4) != 0)
00690978                      {
00690991                          Glyph::operator=(&GlyphText.m_data[GlyphText.m_num], &var_24);
00690996                          GlyphText.m_num += 1;
00690978                      }
00690920                  }
00690920                  
006909a0                  Glyph::~Glyph(&var_24);
006909a5                  i += 1;
006909a8              } while (i < (esi - 1));
006908d2          }
006908d2          
006909b2          class GlyphList* m_pOutputBuffer = this->m_pOutputBuffer;
006909be          GlyphList::AddText(m_pOutputBuffer, m_pOutputBuffer->m_glyphList._num_elements, &GlyphText);
006909c8          this->m_OutputBufferIsDirty = 1;
00690886      }
00690870  }

006908da                                                                                8d 9b 00 00 00 00                            ......
006909d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006909e0  void __fastcall DebugConsole::InitOutputBuffer(class DebugConsole* this)

006909e0  {
006909e5      class DebugConsole* this_1 = this;
006909ea      class DebugConsole* this_2 = this_1;
006909ee      GlyphList::Flush(this_1->m_pOutputBuffer);
006909f3      class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
006909f3      
006909fa      if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
006909fa      {
00690a01          void* eax = operator new(0x8100);
00690a01          
00690a0b          if (eax == 0)
00690a16              GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00690a0b          else
00690a0f              GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax);
00690a0f          
00690a18          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
006909fa      }
006909fa      
00690a1d      uint32_t m_nNumElements = GlobalRegistry::s_pcGlobalRegistry_1->m_Characters.m_nNumElements;
00690a1d      
00690a22      if (m_nNumElements > 0)
00690a22      {
00690a28          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00690a2d          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00690a36          InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00690a3c          int32_t esi = (m_nNumElements - 1);
00690a3d          int32_t ebp_1 = 0;
00690a41          int32_t var_4_1 = esi;
00690a41          
00690a45          if (esi > 0)
00690a45          {
00690a4b              class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry;
00690a4b              
00690b2a              do
00690b2a              {
00690a52                  if (GlobalRegistry::s_pcGlobalRegistry_2 == 0)
00690a52                  {
00690a59                      void* eax_2 = operator new(0x8100);
00690a59                      
00690a63                      if (eax_2 == 0)
00690a6e                          GlobalRegistry::s_pcGlobalRegistry_2 = nullptr;
00690a63                      else
00690a67                          GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistryInstance::GlobalRegistryInstance(eax_2);
00690a67                      
00690a70                      GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_2;
00690a52                  }
00690a52                  
00690a77                  int32_t ecx_4 = (GlobalRegistry::s_pcGlobalRegistry_2->m_Characters.m_nStartIndex + ebp_1);
00690a77                  
00690a7f                  if (ecx_4 >= 0x8000)
00690a81                      ecx_4 -= 0x8000;
00690a81                  
00690a87                  ecx_4 = *(uint32768_t*)((char*)GlobalRegistry::s_pcGlobalRegistry_2->m_Characters)[0xc][ecx_4];
00690a8d                  char var_10 = ecx_4;
00690a8d                  
00690a91                  if (ecx_4 != 0)
00690a91                  {
00690a97                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00690a9f                      int32_t edi = PStringBase<char>::s_NullBuffer_3->m_data[-4];
00690a9f                      
00690aaa                      if ((*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x10) != 1 || (edi + 1) > *(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0xc)))
00690aaa                      {
00690ac5                          PStringBase<char>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_2, edi);
00690aca                          char* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_2;
00690ace                          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_3;
00690ad9                          char i;
00690ad9                          
00690ad9                          do
00690ad9                          {
00690ad1                              i = PStringBase<char>::s_NullBuffer_6->m_data[0];
00690ad3                              PStringBase<char>::s_NullBuffer_6 = &PStringBase<char>::s_NullBuffer_6->m_data[1];
00690ad4                              *(uint8_t*)PStringBase<char>::s_NullBuffer_5 = i;
00690ad6                              PStringBase<char>::s_NullBuffer_5 = &PStringBase<char>::s_NullBuffer_5[1];
00690ad9                          } while (i != 0);
00690ad9                          
00690aeb                          if ((InterlockedDecrement(&PStringBase<char>::s_NullBuffer_3[-1]) == 0 && PStringBase<char>::s_NullBuffer_3 != 0x14))
00690af3                              *(uint32_t*)*(int32_t*)((char*)PStringBase<char>::s_NullBuffer_3 + -0x14)(1);
00690aaa                      }
00690aaa                      else
00690aaa                      {
00690aac                          *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_3 - 4) = (edi + 1);
00690ab3                          *(uint32_t*)((char*)PStringBase<char>::s_NullBuffer_2 - 8) = 0xffffffff;
00690aaa                      }
00690aaa                      
00690b05                      strncpy(&PStringBase<char>::s_NullBuffer_2->m_data[(edi - 1)], &var_10, 1);
00690b0b                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
00690b12                      this_1 = this_2;
00690b16                      esi = var_4_1;
00690b1a                      PStringBase<char>::s_NullBuffer_4->m_data[(PStringBase<char>::s_NullBuffer_4->m_data[-4] - 1)] = 0;
00690b1f                      GlobalRegistry::s_pcGlobalRegistry_2 = GlobalRegistry::s_pcGlobalRegistry;
00690a91                  }
00690a91                  
00690b27                  ebp_1 += 1;
00690b2a              } while (ebp_1 < esi);
00690a45          }
00690a45          
00690b37          DebugConsole::AppendTextToOutputBuffer(this_1, &PStringBase<char>::s_NullBuffer_2);
00690b40          void* __offset(PSRefBufferCharData<char>, -0x14) esi_3 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
00690b40          
00690b54          if ((InterlockedDecrement(((char*)esi_3 + 4)) == 0 && esi_3 != 0))
00690b5c              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_3) + -0x14)(1);
00690a22      }
00690a22      
00690b5e      this_1->m_OutputBufferIsDirty = 1;
006909e0  }

00690b68                          90 90 90 90 90 90 90 90                                                          ........

00690b70  void __fastcall DebugConsole::DebugConsole(class DebugConsole* this)

00690b70  {
00690b70      class DebugConsole* __return = this;
00690b7e      this->m_cRef = 1;
00690b85      this->vtable = &CInputHandler::`vftable';
00690b8c      this->vtable = &CObjectMaint::`vftable';
00690b93      this->vtable = &IConsoleCallbackObject::`vftable';
00690b9a      this->vtable = &IInputActionCallback::`vftable';
00690ba1      this->vtable = 0x80055c;
00690ba7      this->vtable = &DebugConsole::`vftable';
00690bae      this->vtable = &CObjectMaint::`vftable';
00690bb5      this->vtable = &DebugConsole::`vftable';
00690bbc      this->vtable = &DebugConsole::`vftable';
00690bc3      this->m_WantActivateInput = 0;
00690bc6      this->m_WantDeactivateInput = 0;
00690bc9      this->m_IsInputActive = 0;
00690bcc      this->m_AlwaysDrawOutput = 0;
00690bcf      this->m_BackgroundOpacity = 1f;
00690bd6      this->m_pInputBuffer = nullptr;
00690bd9      this->m_pOutputBuffer = nullptr;
00690bdc      this->m_OutputBufferIsDirty = 1;
00690be0      this->m_pOutputWindow = nullptr;
00690be3      this->m_pInputWindow = nullptr;
00690be6      this->m_NumOutputLines = 0;
00690be9      this->m_NumOutputCharactersPerLine = 0;
00690bec      this->m_OutputScrollPos = 0xffffffff;
00690bf3      __builtin_memset(&this->m_OutputLines, 0, 0x15);
00690c06      __builtin_memset(&this->m_LastInputCursorStateTime, 0, 0x14);
00690c18      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00690c23      this->m_LastTabCompletionWord.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00690c26      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00690c28      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00690c34      this->m_LastTabCompletionString.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00690c37      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
00690c3b      this->m_LastInputHistoryPos = 0xffffffff;
00690c42      this->m_pOutputBackgroundTexture = nullptr;
00690c45      this->m_pInputBackgroundTexture = nullptr;
00690c48      this->m_EchoInput = 0;
00690c4e      void* eax_2 = operator new(0x34);
00690c58      class GlyphList* eax_3;
00690c58      
00690c58      if (eax_2 == 0)
00690c63          eax_3 = nullptr;
00690c58      else
00690c5c          eax_3 = GlyphList::GlyphList(eax_2);
00690c5c      
00690c67      this->m_pInputBuffer = eax_3;
00690c6a      class GlyphList* eax_4 = operator new(0x34);
00690c74      class GlyphList* eax_5;
00690c74      
00690c74      if (eax_4 == 0)
00690c7f          eax_5 = nullptr;
00690c74      else
00690c78          eax_5 = GlyphList::GlyphList(eax_4);
00690c78      
00690c81      class GlyphList* m_pInputBuffer = this->m_pInputBuffer;
00690c88      this->m_pOutputBuffer = eax_5;
00690c8b      m_pInputBuffer->m_nMaxCharacters = 0x400;
00690c92      this->m_pInputBuffer->m_bTrimFromTop = 0;
00690ca2      this->m_pOutputBuffer->m_nMaxCharacters = 0xffff;
00690cb0      this->m_pOutputBuffer->m_bTrimFromTop = 1;
00690cb0      
00690cc9      if ((QuickWindow::Create(&__return, &this->m_pOutputWindow, 0x14, 0x14, 0x320, 0x12c, 8, 6)->m_val >= 0 && QuickWindow::Create(&__return, &this->m_pInputWindow, 0x14, 0x14a, 0x320, 0x19, 8, 6)->m_val >= 0))
00690cc9      {
00690cf6          DebugConsole::UpdateCoordinates(this);
00690cfd          DebugConsole::InitOutputBuffer(this);
00690cc9      }
00690b70  }

00690d0a                                90 90 90 90 90 90                                                            ......

00690d10  void* __thiscall DebugConsole::`vector deleting destructor'(class DebugConsole* this, uint32_t arg2)

00690d10  {
00690d13      /* tailcall */
00690d13      return DebugConsole::`scalar deleting destructor'(((char*)this - 0x14), arg2);
00690d10  }

00690d18                                                                          cc cc cc cc cc cc cc cc                          ........

00690d20  void __fastcall DebugConsole::~DebugConsole(class DebugConsole* this)

00690d20  {
00690d24      this->vtable = 0x80055c;
00690d2a      this->vtable = &DebugConsole::`vftable';
00690d31      this->vtable = &CObjectMaint::`vftable';
00690d38      this->vtable = &DebugConsole::`vftable';
00690d3f      this->vtable = &DebugConsole::`vftable';
00690d48      DebugConsole::sm_pCurrentDebugConsole = nullptr;
00690d4e      DebugConsole::Shutdown(this);
00690d53      class GlyphList* m_pInputBuffer = this->m_pInputBuffer;
00690d58      this->m_AlwaysDrawOutput = 0;
00690d5b      this->m_BackgroundOpacity = 1f;
00690d62      this->m_IsInputActive = 0;
00690d62      
00690d65      if (m_pInputBuffer != 0)
00690d67          m_pInputBuffer->vtable->__vecDelDtor(1);
00690d67      
00690d6d      class GlyphList* m_pOutputBuffer = this->m_pOutputBuffer;
00690d72      this->m_pInputBuffer = nullptr;
00690d72      
00690d75      if (m_pOutputBuffer != 0)
00690d77          m_pOutputBuffer->vtable->__vecDelDtor(1);
00690d77      
00690d7d      class QuickWindow* m_pOutputWindow = this->m_pOutputWindow;
00690d82      this->m_pOutputBuffer = nullptr;
00690d82      
00690d85      if (m_pOutputWindow != 0)
00690d85      {
00690d87          uint32_t m_cRef = m_pOutputWindow->m_cRef;
00690d87          m_pOutputWindow->m_cRef -= 1;
00690d87          
00690d8a          if (m_cRef == 1)
00690d8c              m_pOutputWindow->vtable->__vecDelDtor(1);
00690d8c          
00690d92          this->m_pOutputWindow = nullptr;
00690d85      }
00690d85      
00690d95      class QuickWindow* m_pInputWindow = this->m_pInputWindow;
00690d95      
00690d9a      if (m_pInputWindow != 0)
00690d9a      {
00690d9c          uint32_t m_cRef_1 = m_pInputWindow->m_cRef;
00690d9c          m_pInputWindow->m_cRef -= 1;
00690d9c          
00690d9f          if (m_cRef_1 == 1)
00690da1              m_pInputWindow->vtable->__vecDelDtor(1);
00690da1          
00690da7          this->m_pInputWindow = nullptr;
00690d9a      }
00690d9a      
00690daa      class RenderTexture* m_pOutputBackgroundTexture = this->m_pOutputBackgroundTexture;
00690daa      
00690daf      if (m_pOutputBackgroundTexture != 0)
00690daf      {
00690db1          m_pOutputBackgroundTexture->vtable->Release();
00690db6          this->m_pOutputBackgroundTexture = nullptr;
00690daf      }
00690daf      
00690db9      class RenderTexture* m_pInputBackgroundTexture = this->m_pInputBackgroundTexture;
00690db9      
00690dbe      if (m_pInputBackgroundTexture != 0)
00690dbe      {
00690dc0          m_pInputBackgroundTexture->vtable->Release();
00690dc5          this->m_pInputBackgroundTexture = nullptr;
00690dbe      }
00690dbe      
00690dd3      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_LastTabCompletionString.m_charbuffer - 0x14);
00690dd3      
00690de2      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
00690dea          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
00690dea      
00690def      void* __offset(PSRefBufferCharData<char>, -0x14) edi_3 = (this->m_LastTabCompletionWord.m_charbuffer - 0x14);
00690def      
00690dfe      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
00690e06          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
00690e06      
00690e17      if ((this->m_InputHistory.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00690e17      {
00690e19          class PStringBase<char>* m_data = this->m_InputHistory.m_data;
00690e19          
00690e1e          if (m_data != 0)
00690e22              PStringBase<char>::`vector deleting destructor'(m_data, 3);
00690e17      }
00690e17      
00690e36      if ((this->m_OutputLines.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00690e36      {
00690e38          class PStringBase<char>* m_data_1 = this->m_OutputLines.m_data;
00690e38          
00690e3d          if (m_data_1 != 0)
00690e41              PStringBase<char>::`vector deleting destructor'(m_data_1, 3);
00690e36      }
00690e36      
00690e46      this->vtable = &IInputActionCallback::`vftable';
00690e4f      class ICIDM* ICIDM::s_cidm_1 = ICIDM::s_cidm;
00690e4f      
00690e57      if (ICIDM::s_cidm_1 != 0)
00690e59          ICIDM::s_cidm_1->vtable->UnregisterCallback(&this->vtable);
00690e59      
00690e62      NoticeHandler::~NoticeHandler(&this->vtable);
00690e67      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00690d20  }


00690e70  class TResult* DebugConsole::Create(class TResult* __return, class DebugConsole** arg2)

00690e70  {
00690e75      void* eax = operator new(0x88);
00690e7f      class DebugConsole* eax_1;
00690e7f      
00690e7f      if (eax == 0)
00690e8a          eax_1 = nullptr;
00690e7f      else
00690e83          eax_1 = DebugConsole::DebugConsole(eax);
00690e83      
00690e93      *(uint32_t*)arg2 = eax_1;
00690e93      
00690e95      if (eax_1 != 0)
00690e95      {
00690e9e          bool cond:0_1 = DebugConsole::Startup(eax_1) != 0;
00690ea0          class DebugConsole* ecx_3 = *(uint32_t*)arg2;
00690ea0          
00690ea2          if (cond:0_1)
00690ea2          {
00690ec4              DebugConsole::sm_pCurrentDebugConsole = ecx_3;
00690eca              __return->m_val = 0;
00690ed1              return __return;
00690ea2          }
00690ea2          
00690ea6          if (ecx_3 != 0)
00690ea8              ecx_3->vtable->__vecDelDtor(1);
00690ea8          
00690eae          *(uint32_t*)arg2 = nullptr;
00690e95      }
00690e95      
00690eb8      __return->m_val = 0x80004005;
00690ebf      return __return;
00690e70  }

00690ed2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00690ee0  void __thiscall DebugConsole::ConsoleCallback_OnTextAdded(class DebugConsole* this, class PStringBase<char> const* arg2)

00690ee0  {
00690ee3      /* tailcall */
00690ee3      return DebugConsole::AppendTextToOutputBuffer(((char*)this - 0x10), arg2);
00690ee0  }

00690ee8                          90 90 90 90 90 90 90 90                                                          ........

00690ef0  void* __thiscall DebugConsole::`scalar deleting destructor'(class DebugConsole* this, uint32_t arg2)

00690ef0  {
00690ef3      DebugConsole::~DebugConsole(this);
00690ef3      
00690efd      if ((arg2 & 1) != 0)
00690f00          operator delete(this);
00690f00      
00690f0b      return this;
00690ef0  }

00690f0e                                            90 90                                                                ..

00690f10  uint8_t __fastcall DebugConsole::OnAction(class DebugConsole* this, class InputEvent const* arg2)

00690f10  {
00690f10      class DebugConsole* __return = this;
00690f14      class InputEvent* ecx = arg2;
00690f18      uint32_t m_InputAction = ecx->m_InputAction;
00690f18      
00690f1d      if (m_InputAction != 0x56)
00690f1d      {
00690f3f          if (((*(uint8_t*)((char*)this->m_cRef)[2] == 0 || ecx->m_fStart == 0) || (m_InputAction - 5) > 0x23))
00690f3f          {
006910b4              m_InputAction = 0;
006910b8              return 0;
00690f3f          }
00690f3f          
00690f3f          switch (m_InputAction)
00690f3f          {
00690f76              case 5:
00690f76              {
00690f76                  DebugConsole::InputScrollOutputBufferUp(((char*)this - 0x14), 1);
00690f7b                  int32_t eax_2;
00690f7b                  eax_2 = 1;
00690f7f                  return 1;
00690f76                  break;
00690f76              }
00690f87              case 6:
00690f87              {
00690f87                  DebugConsole::InputScrollOutputBufferDown(((char*)this - 0x14), 1);
00690f8c                  int32_t eax_3;
00690f8c                  eax_3 = 1;
00690f90                  return 1;
00690f87                  break;
00690f87              }
006910b4              case 7:
006910b4              case 8:
006910b4              case 9:
006910b4              case 0xa:
006910b4              case 0xb:
006910b4              case 0xc:
006910b4              case 0xd:
006910b4              case 0xe:
006910b4              case 0xf:
006910b4              case 0x10:
006910b4              case 0x11:
006910b4              case 0x12:
006910b4              case 0x13:
006910b4              case 0x14:
006910b4              case 0x15:
006910b4              case 0x25:
006910b4              case 0x27:
006910b4              {
006910b4                  m_InputAction = 0;
006910b8                  return 0;
006910b4                  break;
006910b4              }
00690f93              case 0x16:
00690f93              {
00690f93                  uint32_t m_OutputScrollPos = this->m_OutputScrollPos;
00690f93                  
00690f98                  if (m_OutputScrollPos > 0)
00690f9b                      this->m_OutputScrollPos = (m_OutputScrollPos - 1);
00690f9b                  
00690f9e                  m_OutputScrollPos = 1;
00690fa2                  return 1;
00690f93                  break;
00690f93              }
00690fb7              case 0x17:
00690fb7              {
00690fb7                  uint32_t m_OutputScrollPos_1 = this->m_OutputScrollPos;
00690fb7                  
00690fbd                  if (m_OutputScrollPos_1 < this->vtable->RecvNotice_ItemAttributesChanged)
00690fc0                      this->m_OutputScrollPos = (m_OutputScrollPos_1 + 1);
00690fc0                  
00690fc3                  m_OutputScrollPos_1 = 1;
00690fc7                  return 1;
00690fb7                  break;
00690fb7              }
00690fa8              case 0x18:
00690fa8              {
00690fa8                  DebugConsole::InputMoveCursorToPreviousWord(((char*)this - 0x14));
00690fad                  int32_t eax_4;
00690fad                  eax_4 = 1;
00690fb1                  return 1;
00690fa8                  break;
00690fa8              }
00690fcd              case 0x19:
00690fcd              {
00690fcd                  DebugConsole::InputMoveCursorToNextWord(((char*)this - 0x14));
00690fd2                  int32_t eax_5;
00690fd2                  eax_5 = 1;
00690fd6                  return 1;
00690fcd                  break;
00690fcd              }
00690fd9              case 0x1a:
00690fd9              {
00690fd9                  this->m_OutputScrollPos = 0;
00690fe0                  m_InputAction = 1;
00690fe4                  return 1;
00690fd9                  break;
00690fd9              }
00690ffc              case 0x1b:
00690ffc              {
00690ffc                  this->m_OutputScrollPos = this->vtable->RecvNotice_ItemAttributesChanged;
00690fff                  void (__thiscall* eax_7)(class NoticeHandler* this, uint32_t, uint32_t);
00690fff                  eax_7 = 1;
00691003                  return 1;
00690ffc                  break;
00690ffc              }
00690fea              case 0x1c:
00690fea              {
00690fea                  DebugConsole::InputScrollOutputBufferToTop(((char*)this - 0x14));
00690fef                  int32_t eax_6;
00690fef                  eax_6 = 1;
00690ff3                  return 1;
00690fea                  break;
00690fea              }
00691006              case 0x1d:
00691006              {
00691006                  this->m_OutputBufferIsDirty*(int32_t*)((char*)this + 0x28) = 0xffffffff;
0069100d                  this->vtable = 1;
00691011                  m_InputAction = 1;
00691015                  return 1;
00691006                  break;
00691006              }
00690f56              case 0x1e:
00690f56              {
00690f56                  DebugConsole::SelectPreviousCommandInInputHistory(((char*)this - 0x14));
00690f5b                  int32_t eax;
00690f5b                  eax = 1;
00690f5f                  return 1;
00690f56                  break;
00690f56              }
00690f65              case 0x1f:
00690f65              {
00690f65                  DebugConsole::SelectNextCommandInInputHistory(((char*)this - 0x14));
00690f6a                  int32_t eax_1;
00690f6a                  eax_1 = 1;
00690f6e                  return 1;
00690f65                  break;
00690f65              }
0069102f              case 0x20:
0069102f              {
0069102f                  DebugConsole::InputScrollOutputBufferUp(((char*)this - 0x14), (this->m_pInputBuffer - 1));
00691034                  int32_t eax_9;
00691034                  eax_9 = 1;
00691038                  return 1;
0069102f                  break;
0069102f              }
00691043              case 0x21:
00691043              {
00691043                  DebugConsole::InputScrollOutputBufferDown(((char*)this - 0x14), (this->m_pInputBuffer - 1));
00691048                  int32_t eax_10;
00691048                  eax_10 = 1;
0069104c                  return 1;
00691043                  break;
00691043              }
0069104f              case 0x23:
0069104f              {
0069104f                  this->m_InputHistory.m_data = 0xffffffff;
00691056                  m_InputAction = 1;
0069105a                  return 1;
0069104f                  break;
0069104f              }
00691061              case 0x24:
00691061              {
00691061                  PStringBase<unsigned short>::PStringBase<unsigned short>(&arg2);
00691061                  
00691075                  if (Device::GetStringFromClipboard(&arg2) != 0)
00691075                  {
00691082                      PStringBase<unsigned short>::to_spstring(&arg2, &__return, 0);
0069108f                      DebugConsole::SetInputBufferContents(((char*)this - 0x14), &__return);
00691098                      PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
00691075                  }
00691075                  
006910a1                  this->m_InputHistory.m_data = 0xffffffff;
006910a8                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
00691061                  break;
00691061              }
0069101b              case 0x26:
0069101b              {
0069101b                  DebugConsole::InputDeleteCharacter(((char*)this - 0x14));
00691020                  int32_t eax_8;
00691020                  eax_8 = 1;
00691024                  return 1;
0069101b                  break;
0069101b              }
00690f3f          }
00690f1d      }
00690f1d      
006910ad      m_InputAction = 1;
006910b1      return 1;
00690f10  }

006910bb                                                                                   90                                         .
006910bc  uint32_t jump_table_6910bc[0x13] = 
006910bc  {
006910bc      [0x00] =  0x00690f71
006910c0      [0x01] =  0x00690f82
006910c4      [0x02] =  0x00690f93
006910c8      [0x03] =  0x00690fb4
006910cc      [0x04] =  0x00690fa5
006910d0      [0x05] =  0x00690fca
006910d4      [0x06] =  0x00690fd9
006910d8      [0x07] =  0x00690ff6
006910dc      [0x08] =  0x00690fe7
006910e0      [0x09] =  0x00691006
006910e4      [0x0a] =  0x00690f53
006910e8      [0x0b] =  0x00690f62
006910ec      [0x0c] =  0x00691027
006910f0      [0x0d] =  0x0069103b
006910f4      [0x0e] =  0x006910ad
006910f8      [0x0f] =  0x0069104f
006910fc      [0x10] =  0x0069105d
00691100      [0x11] =  0x00691018
00691104      [0x12] =  0x006910b4
00691108  }
00691108  uint8_t lookup_table_691108[0x24] = 
00691108  {
00691108      [0x00] =  0x00
00691109      [0x01] =  0x01
0069110a      [0x02] =  0x12
0069110b      [0x03] =  0x12
0069110c      [0x04] =  0x12
0069110d      [0x05] =  0x12
0069110e      [0x06] =  0x12
0069110f      [0x07] =  0x12
00691110      [0x08] =  0x12
00691111      [0x09] =  0x12
00691112      [0x0a] =  0x12
00691113      [0x0b] =  0x12
00691114      [0x0c] =  0x12
00691115      [0x0d] =  0x12
00691116      [0x0e] =  0x12
00691117      [0x0f] =  0x12
00691118      [0x10] =  0x12
00691119      [0x11] =  0x02
0069111a      [0x12] =  0x03
0069111b      [0x13] =  0x04
0069111c      [0x14] =  0x05
0069111d      [0x15] =  0x06
0069111e      [0x16] =  0x07
0069111f      [0x17] =  0x08
00691120      [0x18] =  0x09
00691121      [0x19] =  0x0a
00691122      [0x1a] =  0x0b
00691123      [0x1b] =  0x0c
00691124      [0x1c] =  0x0d
00691125      [0x1d] =  0x0e
00691126      [0x1e] =  0x0f
00691127      [0x1f] =  0x10
00691128      [0x20] =  0x12
00691129      [0x21] =  0x11
0069112a      [0x22] =  0x12
0069112b      [0x23] =  0x0e
0069112c  }

0069112c                                      90 90 90 90                                                              ....

00691130  void __fastcall DebugConsole::InputEnter(class DebugConsole* this)

00691130  {
0069113f      if (this->m_OutputScrollPos != 0xffffffff)
0069113f      {
00691141          this->m_OutputScrollPos = 0xffffffff;
00691144          this->m_OutputBufferIsDirty = 1;
0069113f      }
0069113f      
00691150      if (this->m_pInputBuffer->m_glyphList._num_elements <= 0)
00691150      {
006912a3          GlyphList::Flush(this->m_pInputBuffer);
006912a8          this->m_InputCursorPos = 0;
006912a8          return;
00691150      }
00691150      
00691156      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
0069115b      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
00691163      InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00691163      
0069117a      if (GlyphList::InqText(this->m_pInputBuffer, 0, &PStringBase<unsigned short>::s_NullBuffer_2) == 0)
0069117a      {
006912b9          void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_2 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
006912b9          
006912cc          if ((InterlockedDecrement(((char*)esi_2 + 4)) == 0 && esi_2 != 0))
006912d4              *(uint32_t*)*(int32_t*)((char*)ADJ(esi_2) + -0x14)(1);
006912d4          
006912cc          return;
0069117a      }
0069117a      
0069118d      class PStringBase<char> __return;
0069118d      PStringBase<unsigned short>::to_spstring(&PStringBase<unsigned short>::s_NullBuffer_2, &__return, 0);
0069118d      
006911a0      if (this->m_EchoInput != 0)
006911a0      {
006911af          class PStringBase<char> var_10;
006911af          PStringBase<char>::PStringBase<char>(&var_10, &DebugConsole::`vftable'.RecvNotice_CharacterError);
006911b4          class PStringBase<char> __return_1 = __return;
006911b8          int32_t eax_5 = *(uint32_t*)(__return_1 - 4);
006911b8          
006911be          if (eax_5 != 1)
006911c7              PStringBase<char>::append_n_chars(&var_10, __return_1, (eax_5 - 1));
006911c7          
006911d5          char* var_4;
006911d5          PStringBase<char>::PStringBase<char>(&var_4, &DebugConsole::`vftable'.RecvNotice_SetSelectedItem);
006911da          char* eax_7 = var_4;
006911de          int32_t ecx_6 = *(uint32_t*)(eax_7 - 4);
006911de          
006911e4          if (ecx_6 != 1)
006911e4          {
006911ed              PStringBase<char>::append_n_chars(&var_10, eax_7, (ecx_6 - 1));
006911f2              eax_7 = var_4;
006911e4          }
006911e4          
00691205          if ((InterlockedDecrement(&eax_7[0xfffffff0]) == 0 && eax_7 != 0x14))
0069120d              **(uint32_t**)(eax_7 - 0x14)(1);
0069120d          
00691214          GlobalRegistry::OutputText(&var_10);
0069121d          int32_t* edi_3 = (var_10 - 0x14);
0069121d          
0069122f          if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00691237              **(uint32_t**)edi_3(1);
006911a0      }
006911a0      
0069123e      GlobalRegistry::ProcessCommand(&__return);
0069123e      
0069124b      if (this->m_LastInputHistoryPos == 0xffffffff)
00691255          SmartArray<PStringBase<char>,1>::AddToEnd(&this->m_InputHistory, &__return);
00691255      
0069125c      this->m_LastInputHistoryPos = 0xffffffff;
0069125f      DebugConsole::InvalidateTabCompletion(this);
00691268      int32_t* edi_5 = (__return - 0x14);
00691268      
00691277      if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
0069127f          **(uint32_t**)edi_5(1);
0069127f      
00691285      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) edi_7 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
00691285      
00691294      if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
0069129c          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_7) + -0x14)(1);
0069129c      
006912a3      GlyphList::Flush(this->m_pInputBuffer);
006912a8      this->m_InputCursorPos = 0;
00691130  }

006912dc                                                                                      90 90 90 90                              ....

006912e0  void __fastcall DebugConsole::RefreshOutputBuffer(class DebugConsole* this)

006912e0  {
006912eb      if (this->m_OutputBufferIsDirty != 0)
006912eb      {
006912f1          class QuickWindow* m_pOutputWindow = this->m_pOutputWindow;
006912fb          class GlyphList* m_pOutputBuffer_2 = this->m_pOutputBuffer;
00691305          int32_t var_18 = 0;
00691309          int32_t var_1c = 0;
00691309          
00691319          if (GlyphList::Recalculate(m_pOutputBuffer_2, m_pOutputWindow->m_ClientAreaWidth, 0, &var_18, &var_1c) != 0)
00691319          {
0069131f              class GlyphList* m_pOutputBuffer = this->m_pOutputBuffer;
0069132b              uint32_t m_OutputScrollPos = this->m_OutputScrollPos;
0069132e              uint32_t m_OutputScrollPos_1 = (m_pOutputBuffer->m_glyphLines.m_num - this->m_NumOutputLines);
00691333              class ListNode<Glyph>* _head = m_pOutputBuffer->m_glyphList._head;
00691337              int32_t var_20_1 = 0;
00691337              
0069133b              if (m_OutputScrollPos != 0xffffffff)
0069133b              {
0069133f                  if (m_OutputScrollPos < m_OutputScrollPos_1)
0069134a                      m_OutputScrollPos_1 = m_OutputScrollPos;
0069133f                  else
00691341                      this->m_OutputScrollPos = 0xffffffff;
0069133b              }
0069133b              
0069134c              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00691351              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_1;
00691359              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
00691362              int32_t var_2c_1 = 0;
00691362              
00691366              if (this->m_NumOutputLines > 0)
00691366              {
0069136d                  uint32_t m_OutputScrollPos_2 = m_OutputScrollPos_1;
00691372                  uint32_t m_OutputScrollPos_3 = m_OutputScrollPos_2;
00691376                  uint32_t var_28_1 = (m_OutputScrollPos_1 << 4);
00691376                  
00691380                  while (true)
00691380                  {
00691380                      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_4 = PStringBase<unsigned short>::s_NullBuffer_3;
00691380                      
0069138a                      if (PStringBase<unsigned short>::s_NullBuffer_4 != PStringBase<unsigned short>::s_NullBuffer)
0069138a                      {
0069139f                          if ((InterlockedDecrement(&PStringBase<unsigned short>::s_NullBuffer_4->m_data[-8]) == 0 && PStringBase<unsigned short>::s_NullBuffer_4 != 0x14))
006913a7                              *(uint32_t*)*(int32_t*)((char*)PStringBase<unsigned short>::s_NullBuffer_4 + -0x14)(1);
006913a7                          
006913a9                          class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer;
006913ae                          PStringBase<unsigned short>::s_NullBuffer_3 = PStringBase<unsigned short>::s_NullBuffer_2;
006913b6                          InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_2->m_data[-8]);
0069138a                      }
0069138a                      
006913bc                      class GlyphList* m_pOutputBuffer_1 = this->m_pOutputBuffer;
006913bf                      uint32_t m_num = m_pOutputBuffer_1->m_glyphLines.m_num;
006913bf                      
006913c4                      if (m_OutputScrollPos_2 < m_num)
006913c4                      {
006913ca                          class GlyphLine* m_data = m_pOutputBuffer_1->m_glyphLines.m_data;
006913d1                          int32_t edi_2 = *(uint32_t*)(&m_data->m_nIndex + var_28_1);
006913d7                          int32_t esi_3 = 0xffffffff;
006913d7                          
006913dd                          if ((m_OutputScrollPos_2 + 1) < m_num)
006913df                              esi_3 = *(uint32_t*)((var_28_1 + m_data) + 0x14);
006913df                          
006913e6                          while (true)
006913e6                          {
006913e6                              int32_t eax_9 = PStringBase<unsigned short>::s_NullBuffer_3->m_data[0x7ffffffffffffffe];
006913e6                              
006913f3                              if ((eax_9 > 0 && (eax_9 - 1) >= this->m_NumOutputCharactersPerLine))
006913f3                                  break;
006913f3                              
006913fb                              if (edi_2 >= this->m_pOutputBuffer->m_glyphList._num_elements)
006913fb                                  break;
006913fb                              
00691404                              if ((esi_3 != 0xffffffff && edi_2 >= esi_3))
00691404                                  break;
00691404                              
0069140c                              class ListNode<Glyph>* ebp_2;
0069140c                              
0069140c                              if (var_20_1 >= edi_2)
0069142e                                  ebp_2 = _head;
0069140c                              else
0069140c                              {
00691410                                  int32_t i_1 = (edi_2 - var_20_1);
00691414                                  var_20_1 += i_1;
0069142a                                  int32_t i;
0069142a                                  
0069142a                                  do
0069142a                                  {
00691418                                      ebp_2 = _head;
00691418                                      
0069141e                                      if (ebp_2 != 0)
0069141e                                      {
00691420                                          class ListNode<Glyph>* next = ebp_2->next;
00691423                                          _head = next;
00691427                                          ebp_2 = next;
0069141e                                      }
0069141e                                      
00691429                                      i = i_1;
00691429                                      i_1 -= 1;
0069142a                                  } while (i != 1);
0069140c                              }
0069140c                              
0069143b                              if (Glyph::IsNewLine(ebp_2) != 0)
0069143b                                  break;
0069143b                              
0069143f                              int32_t edx_4;
0069143f                              edx_4 = ebp_2->data.m_data;
0069144e                              int32_t var_14 = edx_4;
00691452                              PStringBase<unsigned short>::append_n_chars(&PStringBase<unsigned short>::s_NullBuffer_3, &var_14, 1);
00691457                              edi_2 += 1;
006913e6                          }
006913c4                      }
006913c4                      
00691465                      class PStringBase<char> __return;
00691465                      PStringBase<unsigned short>::to_spstring(&PStringBase<unsigned short>::s_NullBuffer_3, &__return, 0);
00691471                      class PStringBase<char> __return_1 = __return;
00691475                      class PStringBase<char>* ebp_3 = &this->m_OutputLines.m_data[var_2c_1];
00691478                      class PSRefBufferCharData<char>* m_charbuffer = ebp_3->m_charbuffer;
00691478                      
0069147d                      if (m_charbuffer != __return_1)
0069147d                      {
00691492                          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0069149a                              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0069149a                          
006914a0                          ebp_3->m_charbuffer = __return_1;
006914a3                          InterlockedIncrement((__return_1 - 0x10));
0069147d                      }
0069147d                      
006914bc                      if ((InterlockedDecrement((__return_1 - 0x10)) == 0 && __return_1 != 0x14))
006914c4                          **(uint32_t**)(__return_1 - 0x14)(1);
006914c4                      
006914da                      bool cond:2_1 = (var_2c_1 + 1) < this->m_NumOutputLines;
006914dc                      var_2c_1 += 1;
006914e0                      var_28_1 += 0x10;
006914e4                      m_OutputScrollPos_3 += 1;
006914e4                      
006914e8                      if (!(cond:2_1))
006914e8                          break;
006914e8                      
0069137c                      m_OutputScrollPos_2 = m_OutputScrollPos_3;
00691380                  }
00691366              }
00691366              
006914f5              void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_7 = &PStringBase<unsigned short>::s_NullBuffer_3->m_data[-0xa];
006914fc              this->m_OutputBufferIsDirty = 0;
006914fc              
0069150c              if ((InterlockedDecrement(((char*)esi_7 + 4)) == 0 && esi_7 != 0))
00691514                  *(uint32_t*)*(int32_t*)((char*)ADJ(esi_7) + -0x14)(1);
00691319          }
006912eb      }
006912e0  }

0069151d                                                                                         90 90 90                               ...

00691520  void __fastcall DebugConsole::Render(class DebugConsole* this)

00691520  {
00691535      if ((this->m_IsInputActive != 0 || this->m_AlwaysDrawOutput != 0))
00691535      {
00691546          int32_t edx_1 = RenderDeviceD3D::SetFillMode(RenderDevice::render_device, FILLMODE_SOLID);
0069154b          float m_pOutputBuffer_3 = this->m_BackgroundOpacity;
0069154e          float m_pOutputBuffer = m_pOutputBuffer_3;
00691550          float m_pOutputBuffer_4 = m_pOutputBuffer_3;
00691557          m_pOutputBuffer_3 = this->m_IsInputActive;
00691574          int32_t var_40;
00691574          __builtin_memcpy(&var_40, "\xcd\xcc\xcc\x3e\xcd\xcc\xcc\x3e\xcd\xcc\xcc\x3e\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f", 0x1c);
006915b5          float m_pOutputBuffer_2 = m_pOutputBuffer;
006915bc          int32_t var_20;
006915bc          __builtin_memcpy(&var_20, "\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f", 0x1c);
006915e8          float PStringBase<char>::s_NullBuffer_2;
006915e8          float PStringBase<unsigned short>::s_NullBuffer_2;
006915e8          float __return;
006915e8          int32_t __return_8;
006915e8          float __return_1;
006915e8          float __return_9;
006915e8          float __return_2;
006915e8          
006915e8          if (m_pOutputBuffer_3 != 0)
006915e8          {
006915f7          label_6915f7:
006915f7              uint32_t ecx_2;
006915f7              int32_t edx_2;
006915f7              ecx_2 = DebugConsole::RefreshOutputBuffer(this);
006915fc              class RenderTexture* m_pOutputBackgroundTexture = this->m_pOutputBackgroundTexture;
006915fc              
00691601              if (m_pOutputBackgroundTexture == 0)
00691601              {
00691603                  int32_t var_a8_1 = 0x1e;
00691605                  int32_t var_ac_1 = 2;
00691607                  int32_t var_b0_1 = 0x12;
00691609                  class DBObj* eax_1 = DBObj::GetByEnum(m_pOutputBackgroundTexture, edx_2, ecx_2);
0069160e                  class QuickWindow* m_pOutputWindow_1 = this->m_pOutputWindow;
00691615                  this->m_pOutputBackgroundTexture = eax_1;
00691618                  QuickWindow::SetBackgroundTexture(m_pOutputWindow_1, eax_1);
00691601              }
00691601              
00691625              int32_t var_30;
00691625              QuickWindow::SetColorAndOpacity(this->m_pOutputWindow, &var_30);
0069162a              this->m_pOutputWindow->vtable->Render();
00691632              class QuickWindow* m_pOutputWindow = this->m_pOutputWindow;
0069163b              int32_t m_ClientAreaY = m_pOutputWindow->m_ClientAreaY;
0069163e              uint32_t m_ClientAreaHeight = m_pOutputWindow->m_ClientAreaHeight;
00691644              int32_t ecx_6 = (m_pOutputWindow->m_ClientAreaWidth + m_pOutputWindow->m_ClientAreaX);
0069164c              bool cond:1_1 = this->m_OutputScrollPos == 0xffffffff;
0069164f              __return_8 = (ecx_6 - 5);
00691653              m_pOutputBuffer = (m_ClientAreaY + 4);
00691656              edx_1 = (m_ClientAreaY + 0xe);
00691659              float m_pOutputBuffer_1 = m_pOutputBuffer;
0069165d              int32_t var_78_1 = edx_1;
00691661              int32_t var_7c;
00691661              
00691661              if (!(cond:1_1))
00691661              {
00691667                  SceneTool::IdentityMatrices();
0069167c                  SceneTool::ViewportToClip((ecx_6 - 0xf), ((m_ClientAreaY + m_ClientAreaHeight) - 0xf), &PStringBase<unsigned short>::s_NullBuffer_2, &PStringBase<char>::s_NullBuffer_2);
00691695                  SceneTool::ViewportToClip(__return_8, ((m_ClientAreaY + m_ClientAreaHeight) - 5), &__return, &var_7c);
0069169e                  long double x87_r7_2 = (((long double)__return) - ((long double)PStringBase<unsigned short>::s_NullBuffer_2));
006916a6                  int32_t eax_5 = var_7c;
006916aa                  float PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_2;
006916b6                  __return_1 = PStringBase<unsigned short>::s_NullBuffer_2;
006916be                  int32_t var_60_1 = eax_5;
006916d2                  __return_2 = __return;
006916e4                  float PStringBase<char>::s_NullBuffer_11 = PStringBase<char>::s_NullBuffer_8;
006916e8                  float PStringBase<char>::s_NullBuffer_14 = PStringBase<char>::s_NullBuffer_8;
006916f4                  __return_9 = ((float)((x87_r7_2 * ((long double)0.5f)) + ((long double)PStringBase<unsigned short>::s_NullBuffer_2)));
006916fe                  int32_t var_70_1 = 0;
00691706                  int32_t var_64_1 = 0;
00691711                  int32_t var_58_1 = 0;
0069171c                  m_pOutputBuffer = SceneTool::DrawTriangle(&__return_1, &__return_9, &__return_2, &var_40, 0, 0, CULLMODE_CW, BLEND_SRCALPHA, BLEND_INVSRCALPHA);
00691661              }
00691661              
00691724              m_pOutputBuffer_3 = this->m_OutputScrollPos;
00691724              
0069172a              if (m_pOutputBuffer_3 != 0xffffffff)
0069172a              {
00691741              label_691741:
00691741                  
00691743                  if (m_pOutputBuffer_3 != 0)
00691743                      goto label_691749;
0069172a              }
0069172a              else
0069172a              {
0069172c                  m_pOutputBuffer = this->m_pOutputBuffer;
00691732                  edx_1 = (*(uint32_t*)(m_pOutputBuffer + 0x1c) - this->m_NumOutputLines);
00691732                  
00691737                  if (edx_1 > 0)
00691737                  {
00691749                  label_691749:
00691749                      SceneTool::IdentityMatrices();
0069175e                      SceneTool::ViewportToClip((ecx_6 - 0xf), m_pOutputBuffer_1, &PStringBase<unsigned short>::s_NullBuffer_2, &var_7c);
00691777                      SceneTool::ViewportToClip(__return_8, var_78_1, &__return, &PStringBase<char>::s_NullBuffer_2);
0069178d                      `vector constructor iterator'(&__return_1, 0xc, 3, Vector3::Vector3);
00691796                      long double x87_r7_6 = (((long double)__return) - ((long double)PStringBase<unsigned short>::s_NullBuffer_2));
0069179e                      int32_t ecx_10 = var_7c;
006917a2                      float PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_2;
006917ae                      __return_1 = __return;
006917b6                      int32_t var_60_2 = ecx_10;
006917c7                      __return_2 = PStringBase<unsigned short>::s_NullBuffer_2;
006917d3                      float PStringBase<char>::s_NullBuffer_12 = PStringBase<char>::s_NullBuffer_4;
006917d7                      float PStringBase<char>::s_NullBuffer_15 = PStringBase<char>::s_NullBuffer_4;
006917e0                      __return_9 = ((float)((x87_r7_6 * ((long double)0.5f)) + ((long double)PStringBase<unsigned short>::s_NullBuffer_2)));
006917ea                      int32_t var_70_2 = 0;
006917f2                      int32_t var_64_2 = 0;
006917fa                      int32_t var_58_2 = 0;
00691802                      m_pOutputBuffer_3 = SceneTool::DrawTriangle(&__return_1, &__return_9, &__return_2, &var_40, 0, 0, CULLMODE_CW, BLEND_SRCALPHA, BLEND_INVSRCALPHA);
00691737                  }
00691737                  else if (m_pOutputBuffer_3 != m_pOutputBuffer_3)
0069173b                      goto label_691741;
0069172a              }
006915e8          }
006915e8          else
006915e8          {
006915ea              m_pOutputBuffer_3 = this->m_AlwaysDrawOutput;
006915ea              
006915ef              if (m_pOutputBuffer_3 != 0)
006915ef                  goto label_6915f7;
006915e8          }
006915e8          
0069180a          m_pOutputBuffer_3 = this->m_IsInputActive;
0069180a          
0069180f          if (m_pOutputBuffer_3 != 0)
0069180f          {
00691811              int32_t m_pInputBackgroundTexture = this->m_pInputBackgroundTexture;
00691811              
00691816              if (m_pInputBackgroundTexture == 0)
00691816              {
00691818                  int32_t var_a8_6 = 0x1e;
0069181a                  int32_t var_ac_4 = 2;
0069181c                  int32_t var_b0_4 = 0x13;
0069181e                  class DBObj* eax_7 = DBObj::GetByEnum(m_pInputBackgroundTexture, edx_1, m_pOutputBuffer);
00691823                  class QuickWindow* m_pInputWindow_2 = this->m_pInputWindow;
0069182a                  this->m_pInputBackgroundTexture = eax_7;
0069182d                  QuickWindow::SetBackgroundTexture(m_pInputWindow_2, eax_7);
00691816              }
00691816              
0069183d              int32_t var_10;
0069183d              QuickWindow::SetColorAndOpacity(this->m_pInputWindow, &var_10);
00691842              this->m_pInputWindow->vtable->Render();
0069180f          }
0069180f          
00691850          RenderDeviceD3D::BeginRenderingDebugText(RenderDevice::render_device);
00691855          uint32_t eax_9;
00691855          eax_9 = this->m_IsInputActive;
00691855          
0069185a          if (eax_9 != 0)
0069185a          {
00691865          label_691865:
00691865              DebugConsole::RefreshOutputBuffer(this);
0069186d              int32_t i = 0;
0069186d              
00691871              if (this->m_NumOutputLines > 0)
00691871              {
00691873                  int32_t ebp_1 = 0;
00691873                  
00691895                  do
00691895                  {
00691887                      QuickWindow::RenderText(this->m_pOutputWindow, 0, ebp_1, this->m_OutputLines.m_data[i].m_charbuffer, 0xffeaeaea);
0069188f                      i += 1;
00691890                      ebp_1 += 0xc;
00691895                  } while (i < this->m_NumOutputLines);
00691871              }
0069185a          }
0069185a          else
0069185a          {
0069185c              eax_9 = this->m_AlwaysDrawOutput;
0069185c              
00691861              if (eax_9 != 0)
00691861                  goto label_691865;
0069185a          }
0069185a          
00691897          eax_9 = this->m_IsInputActive;
0069189c          char var_85_1 = 0;
0069189c          
006918a1          if (eax_9 == 0)
006918a1          {
00691a63          label_691a63:
00691a63              int16_t eax_22;
00691a63              int32_t edx_19;
00691a63              eax_22 = RenderDeviceD3D::EndRenderingDebugText(RenderDevice::render_device);
00691a68              eax_22 = this->m_IsInputActive;
00691a68              
00691a6d              if (eax_22 != 0)
00691a6d              {
00691a73                  eax_22 = var_85_1;
00691a73                  
00691a79                  if (eax_22 != 0)
00691a79                  {
00691a7f                      long double x87_r7_9 = ((long double)Timer::local_time);
00691a87                      long double x87_r6_2 = (x87_r7_9 - ((long double)this->m_LastInputCursorStateTime));
00691a8a                      long double temp1_1 = ((long double)0.20000000298023224);
00691a8a                      (x87_r6_2 - temp1_1);
00691a8a                      
00691a95                      if ((*(uint8_t*)((char*)((((x87_r6_2 < temp1_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r6_2, temp1_1))) ? 1 : 0) << 0xa) | ((((x87_r6_2 == temp1_1) ? 1 : 0) << 0xe) | 0x3800)))))[1] & 0x41) == 0)
00691a95                      {
00691a97                          eax_22 = this->m_IsInputCursorVisible;
00691a9a                          this->m_LastInputCursorStateTime = ((double)x87_r7_9);
00691a9f                          eax_22 = eax_22 == 0;
00691aa2                          this->m_IsInputCursorVisible = eax_22;
00691a95                      }
00691a95                      
00691add                      eax_22 = this->m_IsInputCursorVisible;
00691add                      
00691ae2                      if (eax_22 != 0)
00691ae2                      {
00691ae8                          SceneTool::IdentityMatrices();
00691aed                          class QuickWindow* m_pInputWindow = this->m_pInputWindow;
00691b09                          SceneTool::ViewportToClip(((m_pInputWindow->m_ClientAreaX + (this->m_InputCursorPos << 3)) + 8), m_pInputWindow->m_ClientAreaY, &__return_8, &PStringBase<char>::s_NullBuffer_2);
00691b0e                          class QuickWindow* m_pInputWindow_1 = this->m_pInputWindow;
00691b2d                          SceneTool::ViewportToClip(((m_pInputWindow_1->m_ClientAreaX + (this->m_InputCursorPos << 3)) + 0xf), (m_pInputWindow_1->m_ClientAreaY + 0xb), &PStringBase<unsigned short>::s_NullBuffer_2, &__return);
00691b32                          int32_t __return_7 = __return_8;
00691b36                          float PStringBase<char>::s_NullBuffer_10 = PStringBase<char>::s_NullBuffer_2;
00691b40                          __return_1 = __return_7;
00691b44                          float __return_4 = __return;
00691b4a                          __return_9 = __return_7;
00691b52                          float PStringBase<char>::s_NullBuffer_13 = PStringBase<char>::s_NullBuffer_10;
00691b56                          float edx_25 = PStringBase<unsigned short>::s_NullBuffer_2;
00691b5a                          float __return_5 = __return_4;
00691b5e                          float __return_6 = __return_4;
00691b71                          float var_50_1 = edx_25;
00691b78                          __return_2 = edx_25;
00691b8a                          int32_t var_70_3 = 0;
00691b92                          int32_t var_64_3 = 0;
00691b9d                          int32_t var_58_3 = 0;
00691ba8                          int32_t var_4c_1 = 0;
00691bb3                          float PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
00691bba                          int80_t st0_1;
00691bba                          edx_19 = SceneTool::DrawPolygon(&__return_1, 4, &var_20, 0, 0, CULLMODE_CW, BLEND_SRCALPHA, BLEND_INVSRCALPHA);
00691ae2                      }
00691a79                  }
00691a6d              }
00691a6d              
00691bc2              class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00691bc8              edx_19 = RenderDevice::render_device_1->m_WireframeMode;
00691bce              char temp0_1 = edx_19;
00691bce              edx_19 = -(edx_19);
00691bd6              RenderDeviceD3D::SetFillMode(RenderDevice::render_device_1, ((edx_19 - edx_19) + 3));
006918a1          }
006918a1          else
006918a1          {
006918b8              QuickWindow::RenderText(this->m_pInputWindow, 0, 0, &DebugConsole::`vftable'.RecvNotice_CloseDialog, 0xff999999);
006918bd              class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
006918c8              PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
006918d0              InterlockedIncrement(&PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8]);
006918d0              
006918e3              if (GlyphList::InqText(this->m_pInputBuffer, 0, &PStringBase<unsigned short>::s_NullBuffer_2) != 0)
006918e3              {
006918f4                  PStringBase<unsigned short>::to_spstring(&PStringBase<unsigned short>::s_NullBuffer_2, &__return, 0);
006918f9                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
006918fe                  uint32_t m_NumInputCharactersPerLine = this->m_NumInputCharactersPerLine;
00691901                  PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
00691908                  int32_t ebp_2 = (m_NumInputCharactersPerLine - 1);
0069190a                  int32_t var_78_2 = ebp_2;
0069190e                  InterlockedIncrement(&PStringBase<char>::s_NullBuffer_1[-1]);
00691910                  float __return_3 = __return;
00691914                  int32_t eax_13 = *(uint32_t*)(__return_3 - 4);
0069191a                  void* ebx_2 = nullptr;
0069191a                  
0069191e                  if ((eax_13 - 1) > 0)
0069191e                  {
00691926                      while (ebx_2 < ebp_2)
00691926                      {
0069192e                          char* eax_14 = ((eax_13 + __return_3) - 1);
0069192e                          
00691932                          if (ebx_2 < eax_13)
00691934                              eax_14 = ((char*)ebx_2 + __return_3);
00691934                          
00691937                          eax_14 = *(uint8_t*)eax_14;
0069193b                          char var_84 = eax_14;
0069193b                          
0069193f                          if (eax_14 != 0)
0069193f                          {
00691945                              float PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_2;
0069194d                              int32_t ebp_3 = *(uint32_t*)(PStringBase<char>::s_NullBuffer_5 - 4);
0069194d                              
00691958                              if ((*(uint32_t*)(PStringBase<char>::s_NullBuffer_5 - 0x10) != 1 || (ebp_3 + 1) > *(uint32_t*)(PStringBase<char>::s_NullBuffer_5 - 0xc)))
00691958                              {
00691973                                  PStringBase<char>::allocate_ref_buffer(&PStringBase<char>::s_NullBuffer_2, ebp_3);
00691978                                  float PStringBase<char>::s_NullBuffer_9 = PStringBase<char>::s_NullBuffer_2;
0069197c                                  uint8_t* PStringBase<char>::s_NullBuffer_16 = PStringBase<char>::s_NullBuffer_5;
00691988                                  uint8_t i_1;
00691988                                  
00691988                                  do
00691988                                  {
00691980                                      i_1 = *(uint8_t*)PStringBase<char>::s_NullBuffer_16;
00691982                                      PStringBase<char>::s_NullBuffer_16 = &PStringBase<char>::s_NullBuffer_16[1];
00691983                                      *(uint8_t*)PStringBase<char>::s_NullBuffer_9 = i_1;
00691985                                      PStringBase<char>::s_NullBuffer_9 += 1;
00691988                                  } while (i_1 != 0);
00691988                                  
0069199a                                  if ((InterlockedDecrement((PStringBase<char>::s_NullBuffer_5 - 0x10)) == 0 && PStringBase<char>::s_NullBuffer_5 != 0x14))
006919a2                                      **(uint32_t**)(PStringBase<char>::s_NullBuffer_5 - 0x14)(1);
00691958                              }
00691958                              else
00691958                              {
0069195a                                  *(uint32_t*)(PStringBase<char>::s_NullBuffer_5 - 4) = (ebp_3 + 1);
00691961                                  *(uint32_t*)(PStringBase<char>::s_NullBuffer_2 - 8) = 0xffffffff;
00691958                              }
00691958                              
006919b4                              strncpy(((PStringBase<char>::s_NullBuffer_2 + ebp_3) - 1), &var_84, 1);
006919ba                              float PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_2;
006919c1                              ebp_2 = var_78_2;
006919c5                              *(uint8_t*)((*(uint32_t*)(PStringBase<char>::s_NullBuffer_6 - 4) + PStringBase<char>::s_NullBuffer_6) - 1) = 0;
006919ca                              __return_3 = __return;
0069193f                          }
0069193f                          
006919d1                          eax_13 = *(uint32_t*)(__return_3 - 4);
006919d4                          ebx_2 += 1;
006919d4                          
006919da                          if (ebx_2 >= (eax_13 - 1))
006919da                              break;
00691926                      }
0069191e                  }
0069191e                  
006919e0                  float PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_2;
006919e0                  
006919ea                  if ((*(uint32_t*)(PStringBase<char>::s_NullBuffer_7 - 4) - 1) < ebp_2)
006919ec                      var_85_1 = 1;
006919ec                  
006919fb                  QuickWindow::RenderText(this->m_pInputWindow, 8, 0, PStringBase<char>::s_NullBuffer_7, 0xffffffff);
00691a0a                  int32_t* edi_3 = (PStringBase<char>::s_NullBuffer_2 - 0x14);
00691a0a                  
00691a19                  if ((InterlockedDecrement(&edi_3[1]) == 0 && edi_3 != 0))
00691a21                      **(uint32_t**)edi_3(1);
00691a21                  
00691a27                  int32_t* edi_5 = (__return - 0x14);
00691a27                  
00691a36                  if ((InterlockedDecrement(&edi_5[1]) == 0 && edi_5 != 0))
00691a3e                      **(uint32_t**)edi_5(1);
00691a3e                  
00691a44                  int32_t* edi_7 = (PStringBase<unsigned short>::s_NullBuffer_2 - 0x14);
00691a44                  
00691a53                  if ((InterlockedDecrement(&edi_7[1]) == 0 && edi_7 != 0))
00691a5b                      **(uint32_t**)edi_7(1);
00691a5b                  
006919ea                  goto label_691a63;
006918e3              }
006918e3              
00691aab              int32_t* esi_2 = (PStringBase<unsigned short>::s_NullBuffer_2 - 0x14);
00691aab              
00691ac2              if ((InterlockedDecrement(&esi_2[1]) == 0 && esi_2 != 0))
00691ace                  **(uint32_t**)esi_2(1);
006918a1          }
00691535      }
00691520  }

00691be6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00691bf0  void __fastcall DebugConsole::InputTabCompletion(class DebugConsole* this, uint8_t const arg2)

00691bf0  {
00691bf3      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_1 = PStringBase<unsigned short>::s_NullBuffer;
00691c01      class PSRefBufferCharData<unsigned short>* PStringBase<unsigned short>::s_NullBuffer_2 = PStringBase<unsigned short>::s_NullBuffer_1;
00691c0b      void* __offset(PSRefBufferCharData<unsigned short>, -0x10) m_charbuffer = &PStringBase<unsigned short>::s_NullBuffer_1->m_data[-8];
00691c10      InterlockedIncrement(m_charbuffer);
00691c19      m_charbuffer = &PStringBase<unsigned short>::s_NullBuffer_2;
00691c23      int32_t eax_4;
00691c23      void* __offset(PSRefBufferCharData<unsigned short>, -0x14) esi_3;
00691c23      
00691c23      if (GlyphList::InqText(this->m_pInputBuffer, 0, m_charbuffer) == 0)
00691c23      {
006923eb          esi_3 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
006923f1          m_charbuffer = ((char*)esi_3 + 4);
006923f2          eax_4 = InterlockedDecrement(m_charbuffer);
00691c23      }
00691c23      else
00691c23      {
00691c29          m_charbuffer = nullptr;
00691c39          void* __return;
00691c39          m_charbuffer = PStringBase<unsigned short>::to_spstring(&PStringBase<unsigned short>::s_NullBuffer_2, &__return, m_charbuffer);
00691c41          PStringBase<char>::PStringBase<char>(&m_charbuffer, &data_794098);
00691c4e          PStringBase<char>::trim(&__return, 1, 1, m_charbuffer);
00691c53          void* __return_1 = __return;
00691c5a          int32_t edi_2 = (*(uint32_t*)((char*)__return_1 - 4) - 1);
00691c5a          
00691c5e          if (edi_2 < 1)
00691c5e          {
00691c6c              m_charbuffer = ((char*)__return_1 - 0x10);
00691c6c              
00691c75              if ((InterlockedDecrement(m_charbuffer) == 0 && __return_1 != 0x14))
00691c75              {
00691c77                  int32_t eax_3 = *(uint32_t*)((char*)__return_1 - 0x14);
00691c79                  m_charbuffer = 1;
00691c7d                  *(uint32_t*)eax_3(m_charbuffer);
00691c75              }
00691c75              
00691c83              esi_3 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
00691c89              m_charbuffer = ((char*)esi_3 + 4);
00691c8a              eax_4 = InterlockedDecrement(m_charbuffer);
00691c5e          }
00691c5e          else if (this->m_InputCursorPos == edi_2)
00691c94          {
00691cc7              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00691ccc              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer_1;
00691cd3              m_charbuffer = &PStringBase<char>::s_NullBuffer_1[-1];
00691cd4              int32_t ebx_1 = 0;
00691cd6              InterlockedIncrement(m_charbuffer);
00691cd8              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00691cdd              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_5 = PStringBase<char>::s_NullBuffer_2;
00691ce4              m_charbuffer = &PStringBase<char>::s_NullBuffer_2[-1];
00691ce5              InterlockedIncrement(m_charbuffer);
00691ce7              void* esi_6 = nullptr;
00691ceb              char var_4c;
00691ceb              
00691ceb              if (edi_2 > 0)
00691ceb              {
00691d7e                  do
00691d7e                  {
00691cf1                      void* __return_2 = __return;
00691cf5                      int32_t ecx_8 = *(uint32_t*)((char*)__return_2 - 4);
00691cfa                      char* edx_3 = ((ecx_8 + __return_2) - 1);
00691cfa                      
00691cfe                      if (esi_6 < ecx_8)
00691d00                          edx_3 = ((char*)esi_6 + __return_2);
00691d00                      
00691d06                      if (*(uint8_t*)edx_3 == 0x20)
00691d08                          ebx_1 += 1;
00691d08                      
00691d0b                      if (esi_6 > 0)
00691d0b                      {
00691d0f                          void* edx_4 = ((ecx_8 + __return_2) - 1);
00691d0f                          
00691d13                          if (esi_6 < ecx_8)
00691d15                              edx_4 = ((char*)esi_6 + __return_2);
00691d15                          
00691d1b                          if (*(uint8_t*)edx_4 != 0x20)
00691d1b                          {
00691d22                              void* ecx_9 = ((ecx_8 + __return_2) - 1);
00691d22                              
00691d26                              if (((char*)esi_6 - 1) < ecx_8)
00691d28                                  ecx_9 = (((char*)esi_6 + __return_2) - 1);
00691d28                              
00691d2f                              if (*(uint8_t*)ecx_9 == 0x20)
00691d2f                              {
00691d31                                  char* PStringBase<char>::s_NullBuffer_8 = PStringBase<char>::s_NullBuffer_4;
00691d35                                  int32_t eax_10 = *(uint32_t*)(PStringBase<char>::s_NullBuffer_8 - 4);
00691d35                                  
00691d3b                                  if (eax_10 != 1)
00691d3b                                  {
00691d3e                                      m_charbuffer = (eax_10 - 1);
00691d44                                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_5, PStringBase<char>::s_NullBuffer_8, m_charbuffer);
00691d3b                                  }
00691d3b                                  
00691d4d                                  PStringBase<char>::clear(&PStringBase<char>::s_NullBuffer_4);
00691d52                                  __return_2 = __return;
00691d2f                              }
00691d1b                          }
00691d0b                      }
00691d0b                      
00691d56                      int32_t ecx_12 = *(uint32_t*)((char*)__return_2 - 4);
00691d5b                      char* eax_12;
00691d5b                      
00691d5b                      if (esi_6 < ecx_12)
00691d63                          eax_12 = ((char*)__return_2 + esi_6);
00691d5b                      else
00691d5d                          eax_12 = ((ecx_12 + __return_2) - 1);
00691d5d                      
00691d65                      eax_12 = *(uint8_t*)eax_12;
00691d67                      m_charbuffer = 1;
00691d72                      var_4c = eax_12;
00691d76                      PStringBase<char>::append_n_chars(&PStringBase<char>::s_NullBuffer_4, &var_4c, m_charbuffer);
00691d7b                      esi_6 += 1;
00691d7e                  } while (esi_6 < edi_2);
00691ceb              }
00691ceb              
00691d94              if (this->m_LastTabCompletionWord.m_charbuffer->m_data[-4] != 1)
00691d94              {
00691d96                  m_charbuffer = &this->m_LastTabCompletionWord;
00691d9b                  PStringBase<unsigned short>::operator=(&PStringBase<char>::s_NullBuffer_4, m_charbuffer);
00691d94              }
00691d94              
00691da0              class PSRefBufferCharData<char>* eax_15 = PStringBase<char>::s_NullBuffer_4;
00691da4              class PSRefBufferCharData<char>* m_charbuffer_8 = eax_15;
00691dab              m_charbuffer = &eax_15[-1];
00691dac              InterlockedIncrement(m_charbuffer);
00691db2              PStringBase<char>::break_reference(&m_charbuffer_8);
00691dbb              m_charbuffer = m_charbuffer_8;
00691dbc              _strlwr(m_charbuffer);
00691dc2              class GlobalRegistryInstance* GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistry::s_pcGlobalRegistry;
00691dce              class PStringBase<char>* var_18 = nullptr;
00691dd2              int32_t var_14_1 = 0;
00691dd6              int32_t var_10_1 = 0;
00691dda              void var_c;
00691dda              
00691dda              if (ebx_1 != 0)
00691dda              {
00691e9e                  if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00691e9e                  {
00691ea0                      m_charbuffer = 0x8100;
00691ea5                      class GlobalRegistryInstance* eax_25 = operator new(m_charbuffer);
00691ea5                      
00691eaf                      if (eax_25 == 0)
00691eba                          GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00691eaf                      else
00691eb3                          GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_25);
00691eb3                      
00691ebc                      GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00691e9e                  }
00691e9e                  
00691ec5                  m_charbuffer = &var_c;
00691ecc                  class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_26 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&GlobalRegistry::s_pcGlobalRegistry_1->m_ObjectHash.m_intrusiveTable, m_charbuffer);
00691ed1                  class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_26->m_currHashTable;
00691ed3                  class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_26->m_currBucket;
00691ed6                  class HashTableData<unsigned long,DBOCache *>* i_4 = eax_26->m_currElement;
00691ed6                  
00691ee0                  if (GlobalRegistry::s_pcGlobalRegistry == 0)
00691ee0                  {
00691ee2                      m_charbuffer = 0x8100;
00691ee7                      void* eax_28 = operator new(m_charbuffer);
00691ee7                      
00691ef1                      if (eax_28 == 0)
00691f01                          GlobalRegistry::s_pcGlobalRegistry = nullptr;
00691ef1                      else
00691efa                          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistryInstance::GlobalRegistryInstance(eax_28);
00691ee0                  }
00691ee0                  
00691f0d                  if (i_4 != 0)
00691f0d                  {
00691f10                      while (true)
00691f10                      {
00691f10                          class DBOCache* m_data = i_4->m_data;
00691f10                          
00691f1d                          if (m_data->vtable->RemoveObj_Internal() == 0)
00691f1d                          {
00691f22                              m_charbuffer = &m_data->m_ObjTable;
00691f27                              SmartArray<PStringBase<char>,1>::AddToEnd(&var_18, m_charbuffer);
00691f1d                          }
00691f1d                          
00691f2c                          i_4 = i_4->m_hashNext;
00691f2c                          
00691f31                          if (i_4 == 0)
00691f31                          {
00691f4b                              class HashTableData<unsigned long,DBOCache *>* i;
00691f4b                              
00691f4b                              do
00691f4b                              {
00691f40                                  m_currBucket = &m_currBucket[1];
00691f40                                  
00691f45                                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00691f45                                      goto label_691f53;
00691f45                                  
00691f47                                  i = *(uint32_t*)m_currBucket;
00691f4b                              } while (i == 0);
00691f4b                              
00691f4d                              i_4 = i;
00691f4d                              
00691f51                              if (i_4 == 0)
00691f51                                  break;
00691f31                          }
00691f10                      }
00691f0d                  }
00691dda              }
00691dda              else
00691dda              {
00691de2                  if (GlobalRegistry::s_pcGlobalRegistry_1 == 0)
00691de2                  {
00691de4                      m_charbuffer = 0x8100;
00691de9                      void* eax_18 = operator new(m_charbuffer);
00691de9                      
00691df3                      if (eax_18 == 0)
00691dfe                          GlobalRegistry::s_pcGlobalRegistry_1 = nullptr;
00691df3                      else
00691df7                          GlobalRegistry::s_pcGlobalRegistry_1 = GlobalRegistryInstance::GlobalRegistryInstance(eax_18);
00691df7                      
00691e00                      GlobalRegistry::s_pcGlobalRegistry = GlobalRegistry::s_pcGlobalRegistry_1;
00691de2                  }
00691de2                  
00691e09                  m_charbuffer = &var_c;
00691e10                  class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_19 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&GlobalRegistry::s_pcGlobalRegistry_1->m_CommandHash.m_intrusiveTable, m_charbuffer);
00691e15                  class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = eax_19->m_currHashTable;
00691e17                  class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = eax_19->m_currBucket;
00691e1a                  class HashTableData<unsigned long,DBOCache *>* i_3 = eax_19->m_currElement;
00691e1a                  
00691e24                  if (GlobalRegistry::s_pcGlobalRegistry == 0)
00691e24                  {
00691e26                      m_charbuffer = 0x8100;
00691e2b                      void* eax_21 = operator new(m_charbuffer);
00691e2b                      
00691e35                      if (eax_21 == 0)
00691e45                          GlobalRegistry::s_pcGlobalRegistry = nullptr;
00691e35                      else
00691e3e                          GlobalRegistry::s_pcGlobalRegistry = GlobalRegistryInstance::GlobalRegistryInstance(eax_21);
00691e24                  }
00691e24                  
00691e51                  if (i_3 != 0)
00691e51                  {
00691e5d                      while (true)
00691e5d                      {
00691e5d                          m_charbuffer = &i_3->m_data->m_ObjTable;
00691e62                          SmartArray<PStringBase<char>,1>::AddToEnd(&var_18, m_charbuffer);
00691e67                          i_3 = i_3->m_hashNext;
00691e67                          
00691e6c                          if (i_3 == 0)
00691e6c                          {
00691e8f                              class HashTableData<unsigned long,DBOCache *>* i_1;
00691e8f                              
00691e8f                              do
00691e8f                              {
00691e80                                  m_currBucket_1 = &m_currBucket_1[1];
00691e80                                  
00691e85                                  if (m_currBucket_1 == &m_currHashTable_1->m_buckets[m_currHashTable_1->m_numBuckets])
00691e85                                      goto label_691f53;
00691e85                                  
00691e8b                                  i_1 = *(uint32_t*)m_currBucket_1;
00691e8f                              } while (i_1 == 0);
00691e8f                              
00691e91                              i_3 = i_1;
00691e91                              
00691e95                              if (i_3 == 0)
00691e95                                  break;
00691e6c                          }
00691e5d                      }
00691e51                  }
00691dda              }
00691f53          label_691f53:
00691f53              class PStringBase<char>* ecx_28 = var_18;
00691f5b              class PStringBase<char>* edi_3 = &ecx_28[var_10_1];
00691f5b              
00691f62              if (ecx_28 != edi_3)
00691f62              {
00691f66                  int32_t esi_8 = ((char*)edi_3 - ecx_28);
00691f6a                  int32_t i_2 = (esi_8 >> 2);
00691f6d                  void* edx_10 = nullptr;
00691f6d                  
00691f72                  while (i_2 != 1)
00691f72                  {
00691f74                      i_2 s>>= 1;
00691f76                      edx_10 += 1;
00691f72                  }
00691f72                  
00691f7c                  void* m_charbuffer_9 = arg2;
00691f80                  m_charbuffer = m_charbuffer_9;
00691f81                  class PStringBase<char>* edx_11 = (edx_10 * 2);
00691f83                  class PStringBase<char>* var_64_4 = edx_11;
00691f84                  int32_t var_68_1 = 0;
00691f88                  _STL::__introsort_loop(m_charbuffer_9, edx_11, ecx_28, ecx_28, edi_3);
00691f88                  
00691f96                  if ((esi_8 & 0xfffffffc) <= 0x40)
00691f96                  {
00691fba                      m_charbuffer = arg2;
00691fbd                      _STL::__insertion_sort(ecx_28, edi_3, m_charbuffer);
00691f96                  }
00691f96                  else
00691f96                  {
00691f98                      void* m_charbuffer_10 = arg2;
00691f9c                      m_charbuffer = m_charbuffer_10;
00691fa2                      _STL::__insertion_sort(ecx_28, &ecx_28[0x10], m_charbuffer);
00691fac                      _STL::__unguarded_insertion_sort_aux(&ecx_28[0x10], edi_3, nullptr, m_charbuffer_10);
00691f96                  }
00691f96                  
00691fc5                  ecx_28 = var_18;
00691f62              }
00691f62              
00691fd3              int32_t ebx_3 = 0;
00691fd3              
00691fd8              if (this->m_LastTabCompletionString.m_charbuffer->m_data[-4] != 1)
00691fd8              {
00691fde                  int32_t esi_11 = 0;
00691fde                  
00691fe2                  if (var_10_1 > 0)
00691fe2                  {
00691ff7                      while (true)
00691ff7                      {
00691ff7                          int32_t m_charbuffer_5 = ecx_28[esi_11].m_charbuffer;
00691ffa                          m_charbuffer = this->m_LastTabCompletionString.m_charbuffer;
00691ffa                          
00692003                          if (_stricmp(m_charbuffer_5, m_charbuffer) == 0)
00692003                          {
00692010                              int32_t eax_39;
00692010                              eax_39 = arg2;
00692010                              
00692016                              if (eax_39 == 0)
00692016                              {
0069202c                                  if (esi_11 <= 0)
00692037                                      ebx_3 = (var_10_1 - 1);
0069202c                                  else
0069202e                                      ebx_3 = (esi_11 - 1);
00692016                              }
00692016                              else if (esi_11 == (var_10_1 - 1))
00692026                                  ebx_3 = 0;
0069201f                              else
00692021                                  ebx_3 = (esi_11 + 1);
00692021                              
00692016                              break;
00692003                          }
00692003                          
00692009                          esi_11 += 1;
00692009                          
0069200c                          if (esi_11 >= var_10_1)
0069200c                              break;
0069200c                          
00691ff0                          ecx_28 = var_18;
00691ff7                      }
00691fe2                  }
00691fd8              }
00691fd8              
00692038              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0069203d              class PSRefBufferCharData<char>* var_24_1 = PStringBase<char>::s_NullBuffer_3;
00692044              m_charbuffer = &PStringBase<char>::s_NullBuffer_3[-1];
00692045              var_4c = 0;
0069204a              InterlockedIncrement(m_charbuffer);
00692050              int32_t eax_42 = var_10_1;
00692056              int32_t var_1c_1 = 0;
00692056              
0069205e              if (eax_42 > 0)
0069205e              {
00692064                  int32_t edx_14 = ebx_3;
00692066                  int32_t var_2c_1 = edx_14;
0069206a                  int32_t var_28_1 = ebx_3;
00692255                  bool cond:8_1;
00692255                  
00692255                  do
00692255                  {
00692070                      int32_t ecx_31;
00692070                      ecx_31 = arg2;
00692076                      int32_t var_38_1;
00692076                      int32_t ecx_32;
00692076                      
00692076                      if (ecx_31 == 0)
00692076                      {
00692088                          ecx_32 = ebx_3;
0069208a                          var_38_1 = ecx_32;
0069208a                          
0069208e                          if (ebx_3 < 0)
0069208e                          {
00692090                              ecx_32 = (eax_42 + ebx_3);
00692093                              var_38_1 = ecx_32;
0069208e                          }
00692076                      }
00692076                      else
00692076                      {
0069207a                          ecx_32 = edx_14;
0069207c                          var_38_1 = ecx_32;
0069207c                          
00692080                          if (edx_14 >= eax_42)
00692080                          {
00692082                              ecx_32 -= eax_42;
00692093                              var_38_1 = ecx_32;
00692080                          }
00692076                      }
00692076                      
00692097                      class PStringBase<char>* esi_12 = var_18;
00692097                      
006920a8                      if (*(uint32_t*)(esi_12[ecx_32].m_charbuffer - 4) >= PStringBase<char>::s_NullBuffer_4->m_data[-4])
006920a8                      {
006920ae                          void* m_charbuffer_1 = esi_12[ecx_32].m_charbuffer;
006920b1                          void* m_charbuffer_7 = m_charbuffer_1;
006920b8                          m_charbuffer = ((char*)m_charbuffer_1 - 0x10);
006920b9                          InterlockedIncrement(m_charbuffer);
006920bf                          void* m_charbuffer_11 = m_charbuffer_7;
006920bf                          
006920c7                          if (*(uint32_t*)((char*)m_charbuffer_11 - 0x10) != 1)
006920c7                          {
006920d6                              m_charbuffer = (*(uint32_t*)((char*)m_charbuffer_11 - 4) - 1);
006920de                              PStringBase<char>::allocate_ref_buffer(&m_charbuffer_7, m_charbuffer);
006920e3                              void* m_charbuffer_14 = m_charbuffer_7;
006920e7                              int32_t ecx_34 = *(uint32_t*)((char*)m_charbuffer_14 - 4);
006920f2                              int32_t esi_14;
006920f2                              int32_t edi_7;
006920f2                              edi_7 = __builtin_memcpy(m_charbuffer_14, m_charbuffer_11, ((ecx_34 >> 2) << 2));
006920f9                              __builtin_memcpy(edi_7, esi_14, (ecx_34 & 3));
006920fe                              m_charbuffer = ((char*)m_charbuffer_11 - 0x10);
006920fe                              
0069210b                              if ((InterlockedDecrement(m_charbuffer) == 0 && m_charbuffer_11 != 0x14))
0069210b                              {
0069210d                                  int32_t edx_17 = *(uint32_t*)((char*)m_charbuffer_11 - 0x14);
00692110                                  m_charbuffer = 1;
00692114                                  *(uint32_t*)edx_17(m_charbuffer);
0069210b                              }
006920c7                          }
006920c7                          else
006920c9                              *(uint32_t*)((char*)m_charbuffer_11 - 8) = 0xffffffff;
006920c9                          
0069211a                          m_charbuffer = m_charbuffer_7;
0069211b                          _strlwr(m_charbuffer);
00692121                          class PSRefBufferCharData<char>* m_charbuffer_12 = m_charbuffer_8;
00692125                          int32_t edi_8 = m_charbuffer_12->m_data[-4];
00692128                          void* m_charbuffer_13 = m_charbuffer_7;
00692132                          void* eax_47 = nullptr;
00692132                          
00692136                          if ((edi_8 - 1) <= 0)
00692136                          {
0069216f                          label_69216f:
0069216f                              class PStringBase<char>* ecx_45 = var_18;
0069217e                              bool cond:9_1 = var_24_1 == ecx_45[var_38_1].m_charbuffer;
00692183                              var_4c = 1;
00692183                              
00692188                              if (!(cond:9_1))
00692188                              {
00692190                                  m_charbuffer = &var_24_1[-1];
00692190                                  
0069219d                                  if ((InterlockedDecrement(m_charbuffer) == 0 && var_24_1 != 0x14))
0069219d                                  {
0069219f                                      int32_t edx_19 = *(int32_t*)((char*)var_24_1 + -0x14);
006921a1                                      m_charbuffer = 1;
006921a5                                      *(uint32_t*)edx_19(m_charbuffer);
0069219d                                  }
0069219d                                  
006921a7                                  class PSRefBufferCharData<char>* m_charbuffer_6 = ecx_45[var_38_1].m_charbuffer;
006921ac                                  m_charbuffer = &m_charbuffer_6[-1];
006921ad                                  var_24_1 = m_charbuffer_6;
006921b1                                  InterlockedIncrement(m_charbuffer);
006921b7                                  m_charbuffer_13 = m_charbuffer_7;
00692188                              }
00692188                              
006921c1                              m_charbuffer = ((char*)m_charbuffer_13 - 0x10);
006921c1                              
006921ce                              if ((InterlockedDecrement(m_charbuffer) == 0 && m_charbuffer_13 != 0x14))
006921ce                              {
006921d0                                  int32_t edx_20 = *(uint32_t*)((char*)m_charbuffer_13 - 0x14);
006921d2                                  m_charbuffer = 1;
006921d6                                  *(uint32_t*)edx_20(m_charbuffer);
006921ce                              }
006921ce                              
006921ca                              break;
00692136                          }
00692136                          
00692140                          while (true)
00692140                          {
00692140                              int32_t ecx_41 = *(uint32_t*)((char*)m_charbuffer_13 - 4);
00692145                              void* ecx_42;
00692145                              
00692145                              if (eax_47 < ecx_41)
00692150                                  ecx_42 = ((((char*)m_charbuffer_13 - m_charbuffer_12) + eax_47) + m_charbuffer_12);
00692145                              else
00692147                                  ecx_42 = ((ecx_41 + m_charbuffer_13) - 1);
00692147                              
00692154                              void* esi_15 = &m_charbuffer_12->m_data[(edi_8 - 1)];
00692154                              
00692158                              if (eax_47 < edi_8)
0069215a                                  esi_15 = ((char*)eax_47 + m_charbuffer_12);
0069215a                              
0069215d                              ecx_42 = *(uint8_t*)ecx_42;
0069215d                              
00692161                              if (ecx_42 != *(uint8_t*)esi_15)
00692161                              {
0069221d                                  m_charbuffer = ((char*)m_charbuffer_13 - 0x10);
0069221d                                  
0069222a                                  if ((InterlockedDecrement(m_charbuffer) == 0 && m_charbuffer_13 != 0x14))
0069222a                                  {
0069222c                                      int32_t eax_58 = *(uint32_t*)((char*)m_charbuffer_13 - 0x14);
0069222e                                      m_charbuffer = 1;
00692232                                      *(uint32_t*)eax_58(m_charbuffer);
0069222a                                  }
0069222a                                  
00692234                                  eax_42 = var_10_1;
00692238                                  ebx_3 = var_28_1;
0069223c                                  edx_14 = var_2c_1;
0069223c                                  break;
00692161                              }
00692161                              
00692167                              eax_47 += 1;
00692167                              
0069216d                              if (eax_47 >= (edi_8 - 1))
0069216d                                  goto label_69216f;
00692140                          }
006920a8                      }
006920a8                      
00692245                      edx_14 += 1;
00692246                      ebx_3 -= 1;
00692247                      cond:8_1 = (var_1c_1 + 1) < eax_42;
00692249                      var_1c_1 += 1;
0069224d                      var_2c_1 = edx_14;
00692251                      var_28_1 = ebx_3;
00692255                  } while (cond:8_1);
0069205e              }
0069205e              
006921dc              class PSRefBufferCharData<char>* m_charbuffer_2 = this->m_LastTabCompletionWord.m_charbuffer;
006921dc              
006921e3              if (m_charbuffer_2 != PStringBase<char>::s_NullBuffer_4)
006921e3              {
006921eb                  m_charbuffer = &m_charbuffer_2[-1];
006921eb                  
006921f8                  if ((InterlockedDecrement(m_charbuffer) == 0 && m_charbuffer_2 != 0x14))
006921f8                  {
006921fa                      int32_t edx_21 = *(int32_t*)((char*)m_charbuffer_2 + -0x14);
006921fc                      m_charbuffer = 1;
00692200                      *(uint32_t*)edx_21(m_charbuffer);
006921f8                  }
006921f8                  
00692202                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_6 = PStringBase<char>::s_NullBuffer_4;
0069220c                  this->m_LastTabCompletionWord.m_charbuffer = PStringBase<char>::s_NullBuffer_6;
00692212                  m_charbuffer = &PStringBase<char>::s_NullBuffer_6[-1];
00692213                  InterlockedIncrement(m_charbuffer);
006921e3              }
006921e3              
00692266              class PSRefBufferCharData<char>* m_charbuffer_3 = this->m_LastTabCompletionString.m_charbuffer;
00692269              class PStringBase<char> edi_11 = var_24_1;
00692269              
0069226f              if (m_charbuffer_3 != edi_11)
0069226f              {
00692277                  m_charbuffer = &m_charbuffer_3[-1];
00692277                  
00692284                  if ((InterlockedDecrement(m_charbuffer) == 0 && m_charbuffer_3 != 0x14))
00692284                  {
00692286                      int32_t edx_23 = *(int32_t*)((char*)m_charbuffer_3 + -0x14);
00692288                      m_charbuffer = 1;
0069228c                      *(uint32_t*)edx_23(m_charbuffer);
00692284                  }
00692284                  
00692291                  m_charbuffer = (edi_11 - 0x10);
00692292                  this->m_LastTabCompletionString.m_charbuffer = edi_11;
00692295                  InterlockedIncrement(m_charbuffer);
0069226f              }
0069226f              
00692297              m_charbuffer_3 = var_4c;
00692297              
0069229d              if (m_charbuffer_3 != 0)
0069229d              {
0069229f                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_7 = PStringBase<char>::s_NullBuffer_5;
006922a3                  arg2 = PStringBase<char>::s_NullBuffer_7;
006922aa                  m_charbuffer = &PStringBase<char>::s_NullBuffer_7[-1];
006922ab                  InterlockedIncrement(m_charbuffer);
006922ad                  int32_t eax_63 = *(uint32_t*)(edi_11 - 4);
006922ad                  
006922b3                  if (eax_63 != 1)
006922b3                  {
006922b6                      m_charbuffer = (eax_63 - 1);
006922bc                      PStringBase<char>::append_n_chars(&arg2, edi_11, m_charbuffer);
006922b3                  }
006922b3                  
006922c5                  m_charbuffer = &arg2;
006922c8                  DebugConsole::SetInputBufferContents(this, m_charbuffer);
006922d1                  int32_t* esi_22 = (arg2 - 0x14);
006922d7                  m_charbuffer = &esi_22[1];
006922d7                  
006922e4                  if ((InterlockedDecrement(m_charbuffer) == 0 && esi_22 != 0))
006922e4                  {
006922e6                      int32_t edx_24 = *(uint32_t*)esi_22;
006922e8                      m_charbuffer = 1;
006922ec                      *(uint32_t*)edx_24(m_charbuffer);
006922e4                  }
0069229d              }
0069229d              
006922fa              m_charbuffer = (edi_11 - 0x10);
006922fa              
00692303              if ((InterlockedDecrement(m_charbuffer) == 0 && edi_11 != 0x14))
00692303              {
00692305                  int32_t edx_25 = *(uint32_t*)(edi_11 - 0x14);
00692307                  m_charbuffer = 1;
0069230b                  *(uint32_t*)edx_25(m_charbuffer);
00692303              }
00692303              
0069231b              if ((var_14_1 & 0x80000000) == 0x80000000)
0069231b              {
0069231d                  class PStringBase<char>* edi_12 = var_18;
0069231d                  
00692323                  if (edi_12 != 0)
00692323                  {
00692325                      int32_t m_charbuffer_4 = edi_12->m_charbuffer;
0069232b                      void* edi_13 = &edi_12[m_charbuffer_4];
0069232b                      
0069232f                      if ((m_charbuffer_4 - 1) >= 0)
0069232f                      {
00692332                          arg2 = m_charbuffer_4;
00692332                          
00692359                          do
00692359                          {
00692336                              int32_t esi_24 = *(uint32_t*)((char*)edi_13 - 4);
00692339                              edi_13 -= 4;
00692342                              m_charbuffer = (esi_24 - 0x10);
00692342                              
0069234b                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_24 != 0x14))
0069234b                              {
0069234d                                  int32_t edx_26 = *(uint32_t*)(esi_24 - 0x14);
0069234f                                  m_charbuffer = 1;
00692353                                  *(uint32_t*)edx_26(m_charbuffer);
0069234b                              }
0069234b                              
00692355                              arg2 -= 1;
00692359                          } while (arg2 != 1);
0069232f                      }
0069232f                      
0069235b                      m_charbuffer = &edi_12[-1];
0069235c                      operator delete[](m_charbuffer);
00692323                  }
0069231b              }
0069231b              
00692368              void* __offset(PSRefBufferCharData<char>, -0x14) esi_27 = &m_charbuffer_8->m_data[0xffffffec];
0069236e              m_charbuffer = ((char*)esi_27 + 4);
0069236e              
00692377              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_27 != 0))
00692377              {
00692379                  int32_t edx_27 = *(int32_t*)((char*)ADJ(esi_27) + -0x14);
0069237b                  m_charbuffer = 1;
0069237f                  *(uint32_t*)edx_27(m_charbuffer);
00692377              }
00692377              
00692385              void* __offset(PSRefBufferCharData<char>, -0x14) esi_29 = &PStringBase<char>::s_NullBuffer_5->m_data[0xffffffec];
0069238b              m_charbuffer = ((char*)esi_29 + 4);
0069238b              
00692394              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_29 != 0))
00692394              {
00692396                  int32_t edx_28 = *(int32_t*)((char*)ADJ(esi_29) + -0x14);
00692398                  m_charbuffer = 1;
0069239c                  *(uint32_t*)edx_28(m_charbuffer);
00692394              }
00692394              
006923a2              void* __offset(PSRefBufferCharData<char>, -0x14) esi_31 = &PStringBase<char>::s_NullBuffer_4->m_data[0xffffffec];
006923a8              m_charbuffer = ((char*)esi_31 + 4);
006923a8              
006923b1              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_31 != 0))
006923b1              {
006923b3                  int32_t edx_29 = *(int32_t*)((char*)ADJ(esi_31) + -0x14);
006923b5                  m_charbuffer = 1;
006923b9                  *(uint32_t*)edx_29(m_charbuffer);
006923b1              }
006923b1              
006923bf              void* esi_33 = ((char*)__return - 0x14);
006923c5              m_charbuffer = ((char*)esi_33 + 4);
006923c5              
006923ce              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_33 != 0))
006923ce              {
006923d0                  int32_t edx_30 = *(uint32_t*)esi_33;
006923d2                  m_charbuffer = 1;
006923d6                  *(uint32_t*)edx_30(m_charbuffer);
006923ce              }
006923ce              
006923dc              esi_3 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
006923e2              m_charbuffer = ((char*)esi_3 + 4);
006923e3              eax_4 = InterlockedDecrement(m_charbuffer);
00691c94          }
00691c94          else
00691c94          {
00691ca2              m_charbuffer = ((char*)__return_1 - 0x10);
00691ca2              
00691cab              if ((InterlockedDecrement(m_charbuffer) == 0 && __return_1 != 0x14))
00691cab              {
00691cad                  int32_t edx_2 = *(uint32_t*)((char*)__return_1 - 0x14);
00691caf                  m_charbuffer = 1;
00691cb3                  *(uint32_t*)edx_2(m_charbuffer);
00691cab              }
00691cab              
00691cb9              esi_3 = &PStringBase<unsigned short>::s_NullBuffer_2->m_data[-0xa];
00691cbf              m_charbuffer = ((char*)esi_3 + 4);
00691cc0              eax_4 = InterlockedDecrement(m_charbuffer);
00691c94          }
00691c23      }
00691c23      
006923fe      if ((eax_4 == 0 && esi_3 != 0))
006923fe      {
00692400          int32_t edx_31 = *(int32_t*)((char*)ADJ(esi_3) + -0x14);
00692404          m_charbuffer = 1;
00692406          *(uint32_t*)edx_31(m_charbuffer);
006923fe      }
00691bf0  }

00691e79                                                                             8d a4 24 00 00 00 00                           ..$....
00692412                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00692420  void __thiscall DebugConsole::CharacterHandler(class DebugConsole* this, wchar16 arg2)

00692420  {
0069242d      if (arg2 != 0)
0069242d      {
0069243c          if ((((uint32_t)arg2) - 8) <= 5)
00692494              switch (arg2)
00692494              {
00692457                  case 8:
00692457                  {
00692457                      DebugConsole::InputBackspaceCharacter(((char*)this - 8));
00692460                      return;
00692457                      break;
00692457                  }
00692465                  case 9:
00692465                  {
00692465                      int16_t eax;
00692465                      uint8_t edx_1;
00692465                      eax = GetAsyncKeyState(0x10);
0069246b                      int16_t temp1 = eax;
0069246b                      eax = -(eax);
0069246e                      eax = (eax - eax);
00692470                      eax += 1;
00692472                      arg2 = eax;
0069247a                      int32_t var_2c_1 = arg2;
0069247e                      DebugConsole::InputTabCompletion(((char*)this - 8), edx_1);
00692487                      return;
00692465                      break;
00692465                  }
00692448                  case 0xa:
00692448                  case 0xd:
00692448                  {
00692448                      DebugConsole::InputEnter(((char*)this - 8));
00692451                      return;
00692448                      break;
00692448                  }
00692494              }
00692494          
00692494          if ((arg2 >= 0x20 && arg2 <= 0x7f))
00692494          {
006924a8              void var_24;
006924a8              Glyph::Glyph(&var_24, arg2, &RGBAColor_White, nullptr, nullptr, 8, 0xc);
006924b5              class GlyphList* ecx_6;
006924b5              ecx_6 = this->m_WantActivateInput;
006924b5              *(uint8_t*)((char*)ecx_6)[1] = this->m_WantDeactivateInput;
006924b5              *(uint8_t*)((char*)ecx_6)[2] = this->m_IsInputActive;
006924b5              *(uint8_t*)((char*)ecx_6)[3] = this->m_AlwaysDrawOutput;
006924b9              GlyphList::Insert(ecx_6, this->m_OutputLines.m_num, &var_24);
006924c5              this->m_OutputLines.m_num += 1;
006924c8              this->m_LastTabCompletionWord.m_charbuffer = 0xffffffff;
006924cf              DebugConsole::InvalidateTabCompletion(((char*)this - 8));
006924d8              Glyph::~Glyph(&var_24);
00692494          }
0069242d      }
00692420  }

006924e4  uint32_t jump_table_6924e4[0x6] = 
006924e4  {
006924e4      [0x0] =  0x00692454
006924e8      [0x1] =  0x00692463
006924ec      [0x2] =  0x00692445
006924f0      [0x3] =  0x0069248a
006924f4      [0x4] =  0x0069248a
006924f8      [0x5] =  0x00692445
006924fc  }

006924fc                                                                                      90 90 90 90                              ....

00692500  uint8_t ECM_UI::SendNotice_CloseDialog(uint32_t arg1, class PropertyCollection const* arg2)

00692500  {
0069250e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a4);
0069250e      
00692513      if (eax != 0)
00692513      {
00692516          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692516          
0069251b          while (i != 0)
0069251b          {
00692527              int32_t* ecx_1 = *(uint32_t*)i;
0069252b              i = i[1];
0069252b              
0069252e              if (ecx_1 != 0)
00692534                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x34)(arg1, arg2);
0069251b          }
00692513      }
00692513      
0069253e      eax = 1;
00692540      return 1;
00692500  }

00692541     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00692550  uint8_t ECM_UI::SendNotice_DisplayFinalStringInfo(uint32_t arg1, class StringInfo const* arg2, class StringInfo const* arg3, uint32_t arg4)

00692550  {
0069255e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186b6);
0069255e      
00692563      if (eax != 0)
00692563      {
00692566          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692566          
0069256b          while (i != 0)
0069256b          {
00692580              int32_t* ecx_1 = *(uint32_t*)i;
00692584              i = i[1];
00692584              
00692587              if (ecx_1 != 0)
00692593                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x38)(arg1, arg2, arg3, arg4);
0069256b          }
00692563      }
00692563      
0069259e      eax = 1;
006925a0      return 1;
00692550  }

006925a1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006925b0  uint8_t ECM_UI::SendNotice_DisplayStringInfo(uint32_t arg1, class StringInfo const* arg2)

006925b0  {
006925be      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a5);
006925be      
006925c3      if (eax != 0)
006925c3      {
006925c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006925c6          
006925cb          while (i != 0)
006925cb          {
006925d7              int32_t* ecx_1 = *(uint32_t*)i;
006925db              i = i[1];
006925db              
006925de              if (ecx_1 != 0)
006925e4                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x3c)(arg1, arg2);
006925cb          }
006925c3      }
006925c3      
006925ee      eax = 1;
006925f0      return 1;
006925b0  }

006925f1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00692600  uint8_t ECM_UI::SendNotice_DisplayWeenieError(uint32_t arg1, class AC1Legacy::PStringBase<char> const* arg2)

00692600  {
0069260e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186b7);
0069260e      
00692613      if (eax != 0)
00692613      {
00692616          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692616          
0069261b          while (i != 0)
0069261b          {
00692627              int32_t* ecx_1 = *(uint32_t*)i;
0069262b              i = i[1];
0069262b              
0069262e              if (ecx_1 != 0)
00692634                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x40)(arg1, arg2);
0069261b          }
00692613      }
00692613      
0069263e      eax = 1;
00692640      return 1;
00692600  }

00692641     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00692650  uint8_t ECM_UI::SendNotice_OpenDialog(uint32_t arg1)

00692650  {
0069265e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a3);
0069265e      
00692663      if (eax != 0)
00692663      {
00692666          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692666          
0069266b          while (i != 0)
0069266b          {
00692672              int32_t* ecx_1 = *(uint32_t*)i;
00692676              i = i[1];
00692676              
00692679              if (ecx_1 != 0)
0069267e                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x44)(arg1);
0069266b          }
00692663      }
00692663      
00692687      eax = 1;
00692689      return 1;
00692650  }

0069268a                                90 90 90 90 90 90                                                            ......

00692690  uint8_t ECM_UI::SendNotice_SmartBoxObjectFound(uint32_t arg1)

00692690  {
0069269e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a7);
0069269e      
006926a3      if (eax != 0)
006926a3      {
006926a6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006926a6          
006926ab          while (i != 0)
006926ab          {
006926b2              int32_t* ecx_1 = *(uint32_t*)i;
006926b6              i = i[1];
006926b6              
006926b9              if (ecx_1 != 0)
006926be                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x48)(arg1);
006926ab          }
006926a3      }
006926a3      
006926c7      eax = 1;
006926c9      return 1;
00692690  }

006926ca                                90 90 90 90 90 90                                                            ......

006926d0  uint8_t ECM_UI::SendNotice_TextTag_DIDClick(uint32_t arg1, class IDClass<_tagDataID,32,0> arg2)

006926d0  {
006926de      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186b3);
006926de      
006926e3      if (eax != 0)
006926e3      {
006926e6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006926e6          
006926eb          while (i != 0)
006926eb          {
006926f7              int32_t* ecx_1 = *(uint32_t*)i;
006926fb              i = i[1];
006926fb              
006926fe              if (ecx_1 != 0)
00692704                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x4c)(arg1, arg2);
006926eb          }
006926e3      }
006926e3      
0069270e      eax = 1;
00692710      return 1;
006926d0  }

00692711                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00692720  uint8_t ECM_UI::SendNotice_TextTag_IIDClick(uint32_t arg1, uint32_t arg2)

00692720  {
0069272e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186b5);
0069272e      
00692733      if (eax != 0)
00692733      {
00692736          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692736          
0069273b          while (i != 0)
0069273b          {
00692747              int32_t* ecx_1 = *(uint32_t*)i;
0069274b              i = i[1];
0069274b              
0069274e              if (ecx_1 != 0)
00692754                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x50)(arg1, arg2);
0069273b          }
00692733      }
00692733      
0069275e      eax = 1;
00692760      return 1;
00692720  }

00692761     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00692770  uint8_t ECM_UI::SendNotice_TextTag_IIDEnumClick(uint32_t arg1, uint32_t arg2, uint32_t arg3)

00692770  {
0069277e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186b4);
0069277e      
00692783      if (eax != 0)
00692783      {
00692786          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692786          
0069278b          while (i != 0)
0069278b          {
006927a0              int32_t* ecx_1 = *(uint32_t*)i;
006927a4              i = i[1];
006927a4              
006927a7              if (ecx_1 != 0)
006927ae                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x54)(arg1, arg2, arg3);
0069278b          }
00692783      }
00692783      
006927b9      eax = 1;
006927bb      return 1;
00692770  }

006927bc                                                                                      90 90 90 90                              ....

006927c0  uint8_t ECM_UI::SendNotice_TextTag_IIDStringClick(uint32_t arg1, uint32_t arg2, class PStringBase<unsigned short> const* arg3)

006927c0  {
006927ce      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186b2);
006927ce      
006927d3      if (eax != 0)
006927d3      {
006927d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006927d6          
006927db          while (i != 0)
006927db          {
006927f0              int32_t* ecx_1 = *(uint32_t*)i;
006927f4              i = i[1];
006927f4              
006927f7              if (ecx_1 != 0)
006927fe                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x58)(arg1, arg2, arg3);
006927db          }
006927d3      }
006927d3      
00692809      eax = 1;
0069280b      return 1;
006927c0  }

0069280c                                      90 90 90 90                                                              ....

00692810  uint8_t ECM_UI::SendNotice_UpdateGameView(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4)

00692810  {
0069281e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186ad);
0069281e      
00692823      if (eax != 0)
00692823      {
00692826          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692826          
0069282b          while (i != 0)
0069282b          {
00692840              int32_t* ecx_1 = *(uint32_t*)i;
00692844              i = i[1];
00692844              
00692847              if (ecx_1 != 0)
00692853                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x5c)(arg1, arg2, arg3, arg4);
0069282b          }
00692823      }
00692823      
0069285e      eax = 1;
00692860      return 1;
00692810  }

00692861     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00692870  uint8_t ECM_DDD::SendNotice_RuntimeDDDStatus(uint8_t arg1, uint32_t arg2, uint32_t arg3)

00692870  {
0069287e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186b1);
0069287e      
00692883      if (eax != 0)
00692883      {
00692886          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692886          
0069288b          while (i != 0)
0069288b          {
006928a0              int32_t* ecx_1 = *(uint32_t*)i;
006928a4              i = i[1];
006928a4              
006928a7              if (ecx_1 != 0)
006928ae                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0xc)(arg1, arg2, arg3);
0069288b          }
00692883      }
00692883      
006928b9      eax = 1;
006928bb      return 1;
00692870  }

006928bc                                                                                      90 90 90 90                              ....

006928c0  uint8_t ECM_Item::SendNotice_ItemAttributesChanged(uint32_t arg1, uint32_t arg2)

006928c0  {
006928ce      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186ab);
006928ce      
006928d3      if (eax != 0)
006928d3      {
006928d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006928d6          
006928db          while (i != 0)
006928db          {
006928e7              int32_t* ecx_1 = *(uint32_t*)i;
006928eb              i = i[1];
006928eb              
006928ee              if (ecx_1 != 0)
006928f4                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x10)(arg1, arg2);
006928db          }
006928d3      }
006928d3      
006928fe      eax = 1;
00692900      return 1;
006928c0  }

00692901     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00692910  uint8_t ECM_Item::SendNotice_ServerSaysAttemptFailed(uint32_t arg1)

00692910  {
0069291e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a9);
0069291e      
00692923      if (eax != 0)
00692923      {
00692926          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692926          
0069292b          while (i != 0)
0069292b          {
00692932              int32_t* ecx_1 = *(uint32_t*)i;
00692936              i = i[1];
00692936              
00692939              if (ecx_1 != 0)
0069293e                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x14)(arg1);
0069292b          }
00692923      }
00692923      
00692947      eax = 1;
00692949      return 1;
00692910  }

0069294a                                90 90 90 90 90 90                                                            ......

00692950  uint8_t ECM_Item::SendNotice_ServerSaysMoveItem(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, int32_t arg6, uint32_t arg7, uint32_t arg8)

00692950  {
0069295e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a8);
0069295e      
00692963      if (eax != 0)
00692963      {
00692966          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692966          
0069296b          while (i != 0)
0069296b          {
00692980              int32_t* ecx_1 = *(uint32_t*)i;
00692984              i = i[1];
00692984              
00692987              if (ecx_1 != 0)
006929a7                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x18)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
0069296b          }
00692963      }
00692963      
006929b2      eax = 1;
006929b4      return 1;
00692950  }

006929b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006929c0  uint8_t ECM_Item::SendNotice_SetSelectedItem(uint32_t arg1, uint32_t arg2)

006929c0  {
006929ce      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186aa);
006929ce      
006929d3      if (eax != 0)
006929d3      {
006929d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006929d6          
006929db          while (i != 0)
006929db          {
006929e7              int32_t* ecx_1 = *(uint32_t*)i;
006929eb              i = i[1];
006929eb              
006929ee              if (ecx_1 != 0)
006929f4                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x1c)(arg1, arg2);
006929db          }
006929d3      }
006929d3      
006929fe      eax = 1;
00692a00      return 1;
006929c0  }

00692a01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00692a10  uint8_t ECM_Physics::SendNotice_BeingDeleted(class CWeenieObject* arg1)

00692a10  {
00692a20      void* eax_1 = arg1->vtable->GetNoticeHandlers(0x186af);
00692a20      
00692a25      if (eax_1 != 0)
00692a25      {
00692a28          int32_t* i = *(uint32_t*)((char*)eax_1 + 4);
00692a28          
00692a2d          while (i != 0)
00692a2d          {
00692a30              int32_t* ecx_1 = *(uint32_t*)i;
00692a34              i = i[1];
00692a34              
00692a37              if (ecx_1 != 0)
00692a3c                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x2c)(arg1);
00692a2d          }
00692a25      }
00692a25      
00692a44      eax_1 = 1;
00692a47      return 1;
00692a10  }

00692a48                          90 90 90 90 90 90 90 90                                                          ........

00692a50  uint8_t ECM_Physics::SendNotice_CreateObject(uint32_t arg1)

00692a50  {
00692a5e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186ae);
00692a5e      
00692a63      if (eax != 0)
00692a63      {
00692a66          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692a66          
00692a6b          while (i != 0)
00692a6b          {
00692a72              int32_t* ecx_1 = *(uint32_t*)i;
00692a76              i = i[1];
00692a76              
00692a79              if (ecx_1 != 0)
00692a7e                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x30)(arg1);
00692a6b          }
00692a63      }
00692a63      
00692a87      eax = 1;
00692a89      return 1;
00692a50  }

00692a8a                                90 90 90 90 90 90                                                            ......

00692a90  uint8_t ECM_Login::SendNotice_CharacterError(enum charError arg1)

00692a90  {
00692a9e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a1);
00692a9e      
00692aa3      if (eax != 0)
00692aa3      {
00692aa6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692aa6          
00692aab          while (i != 0)
00692aab          {
00692ab2              int32_t* ecx_1 = *(uint32_t*)i;
00692ab6              i = i[1];
00692ab6              
00692ab9              if (ecx_1 != 0)
00692abe                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x20)(arg1);
00692aab          }
00692aa3      }
00692aa3      
00692ac7      eax = 1;
00692ac9      return 1;
00692a90  }

00692aca                                90 90 90 90 90 90                                                            ......

00692ad0  uint8_t ECM_Login::SendNotice_ServerDied()

00692ad0  {
00692ade      void* eax;
00692ade      int32_t ecx_1;
00692ade      eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a0);
00692ade      
00692ae3      if (eax != 0)
00692ae3      {
00692ae6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692ae6          
00692aeb          while (i != 0)
00692aeb          {
00692af0              int32_t* ecx_3 = *(uint32_t*)i;
00692af4              i = i[1];
00692af4              
00692af7              if (ecx_3 != 0)
00692afb                  *(uint32_t*)(*(uint32_t*)ecx_3 + 0x24)();
00692aeb          }
00692ae3      }
00692ae3      
00692b03      eax = 1;
00692b05      return 1;
00692ad0  }

00692b06                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00692b10  uint8_t ECM_Login::SendNotice_WorldName(class AC1Legacy::PStringBase<char> const* arg1)

00692b10  {
00692b1e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a2);
00692b1e      
00692b23      if (eax != 0)
00692b23      {
00692b26          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692b26          
00692b2b          while (i != 0)
00692b2b          {
00692b32              int32_t* ecx_1 = *(uint32_t*)i;
00692b36              i = i[1];
00692b36              
00692b39              if (ecx_1 != 0)
00692b3e                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x28)(arg1);
00692b2b          }
00692b23      }
00692b23      
00692b47      eax = 1;
00692b49      return 1;
00692b10  }

00692b4a                                90 90 90 90 90 90                                                            ......

00692b50  uint8_t ECM_Character::SendNotice_CharacterSet(class CharacterSet const* arg1)

00692b50  {
00692b5e      void* eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186a6);
00692b5e      
00692b63      if (eax != 0)
00692b63      {
00692b66          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692b66          
00692b6b          while (i != 0)
00692b6b          {
00692b72              int32_t* ecx_1 = *(uint32_t*)i;
00692b76              i = i[1];
00692b76              
00692b79              if (ecx_1 != 0)
00692b7e                  *(uint32_t*)(*(uint32_t*)ecx_1 + 4)(arg1);
00692b6b          }
00692b63      }
00692b63      
00692b87      eax = 1;
00692b89      return 1;
00692b50  }

00692b8a                                90 90 90 90 90 90                                                            ......

00692b90  uint8_t ECM_Character::SendNotice_PlayerObjDescChanged()

00692b90  {
00692b9e      void* eax;
00692b9e      int32_t ecx_1;
00692b9e      eax = GlobalEventHandler::GetGlobalEventHandler()->vtable->GetNoticeHandlers(0x186b0);
00692b9e      
00692ba3      if (eax != 0)
00692ba3      {
00692ba6          int32_t* i = *(uint32_t*)((char*)eax + 4);
00692ba6          
00692bab          while (i != 0)
00692bab          {
00692bb0              int32_t* ecx_3 = *(uint32_t*)i;
00692bb4              i = i[1];
00692bb4              
00692bb7              if (ecx_3 != 0)
00692bbb                  *(uint32_t*)(*(uint32_t*)ecx_3 + 8)();
00692bab          }
00692ba3      }
00692ba3      
00692bc3      eax = 1;
00692bc5      return 1;
00692b90  }

00692bc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00692bd0  uint8_t __thiscall SmartArray<IConsoleCallbackObject *,1>::RemoveUnOrdered(class SmartArray<IConsoleCallbackObject *,1>* this, class IConsoleCallbackObject** arg2)

00692bd0  {
00692bd0      uint32_t m_num = this->m_num;
00692bd6      class IConsoleCallbackObject** m_data = this->m_data;
00692bd9      class IConsoleCallbackObject** i = m_data;
00692bd9      
00692be0      if (i < &m_data[m_num])
00692be0      {
00692bfa          do
00692bfa          {
00692bea              if (*(uint32_t*)i == *(uint32_t*)arg2)
00692bea              {
00692c06                  this->m_num = (m_num - 1);
00692c0c                  *(uint32_t*)i = m_data[(m_num - 1)];
00692c11                  this->m_data[this->m_num] = 0;
00692c1d                  uint32_t eax;
00692c1d                  eax = 1;
00692c20                  return 1;
00692bea              }
00692bea              
00692bf1              i = &i[1];
00692bfa          } while (i < &this->m_data[this->m_num]);
00692be0      }
00692be0      
00692bff      i = 0;
00692c02      return 0;
00692bd0  }

00692c23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00692c30  void* __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>* this, uint32_t arg2)

00692c30  {
00692c33      class HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *>** m_buckets = this->m_buckets;
00692c3b      this->vtable = &IntrusiveHashTable<uint64_t,class HashTableData<uint64_t,class SmartArray<class QualityChangeHandler*,1>*>*,0>::`vftable';
00692c3b      
00692c41      if (m_buckets != &this->m_aInplaceBuckets)
00692c44          operator delete[](m_buckets);
00692c44      
00692c4e      this->m_buckets = nullptr;
00692c51      this->m_firstInterestingBucket = nullptr;
00692c54      this->m_numBuckets = 0;
00692c57      this->m_numElements = 0;
00692c57      
00692c5f      if ((arg2 & 1) != 0)
00692c62          operator delete(this);
00692c62      
00692c6d      return this;
00692c30  }


00692c70  void* __thiscall IntrusiveHashTable<unsigned long,QualityHandler *,1>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,QualityHandler *,1>* this, uint32_t arg2)

00692c70  {
00692c73      class QualityHandler** m_buckets = this->m_buckets;
00692c7b      this->vtable = &IntrusiveHashTable<unsigned long,class QualityHandler*,1>::`vftable';
00692c7b      
00692c81      if (m_buckets != &this->m_aInplaceBuckets)
00692c84          operator delete[](m_buckets);
00692c84      
00692c8e      this->m_buckets = nullptr;
00692c91      this->m_firstInterestingBucket = nullptr;
00692c94      this->m_numBuckets = 0;
00692c97      this->m_numElements = 0;
00692c97      
00692c9f      if ((arg2 & 1) != 0)
00692ca2          operator delete(this);
00692ca2      
00692cad      return this;
00692c70  }


00692cb0  uint8_t __thiscall QualityHandler::Remove(class QualityHandler* this, class QualityChangeHandler* arg2)

00692cb0  {
00692cbf      void __return;
00692cbf      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_handlers.m_intrusiveTable.vtable, &__return);
00692cc4      class HashTableData<unsigned long,DBOCache *>* i_3 = eax->m_currElement;
00692cc9      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
00692ccb      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00692cd2      class HashTableData<unsigned long,DBOCache *>** m_currBucket_1 = m_currBucket;
00692cd2      
00692cd6      if (i_3 != 0)
00692cd6      {
00692cd8          while (true)
00692cd8          {
00692cd8              int32_t* eax_1 = *(int32_t*)((char*)i_3 + 0x10);
00692cdb              int32_t* i_2 = *(uint32_t*)eax_1;
00692cdd              int32_t edx_1 = eax_1[2];
00692ce0              int32_t* i = i_2;
00692ce0              
00692ce7              if (i < &i_2[edx_1])
00692ce7              {
00692d0a                  do
00692d0a                  {
00692cf6                      if (*(uint32_t*)i == arg2)
00692cf6                      {
00692d0f                          eax_1[2] = (edx_1 - 1);
00692d15                          *(uint32_t*)i = i_2[(edx_1 - 1)];
00692d1c                          *(uint32_t*)(*(uint32_t*)eax_1 + (eax_1[2] << 2)) = 0;
00692d1c                          break;
00692cf6                      }
00692cf6                      
00692d01                      i = &i[1];
00692d06                      m_currBucket = m_currBucket_1;
00692d0a                  } while (i < (*(uint32_t*)eax_1 + (eax_1[2] << 2)));
00692ce7              }
00692ce7              
00692d23              i_3 = i_3->m_data;
00692d23              
00692d28              if (i_3 == 0)
00692d28              {
00692d46                  class HashTableData<unsigned long,DBOCache *>* i_1;
00692d46                  
00692d46                  do
00692d46                  {
00692d37                      m_currBucket = &m_currBucket[1];
00692d3c                      m_currBucket_1 = m_currBucket;
00692d3c                      
00692d40                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00692d40                          goto label_692d51;
00692d40                      
00692d42                      i_1 = *(uint32_t*)m_currBucket;
00692d46                  } while (i_1 == 0);
00692d46                  
00692d48                  i_3 = i_1;
00692d48                  
00692d4c                  if (i_3 == 0)
00692d4c                      break;
00692d28              }
00692cd8          }
00692cd6      }
00692cd6      
00692d51  label_692d51:
00692d51      eax = 1;
00692d57      return 1;
00692cb0  }

00692d5a                                                                                90 90 90 90 90 90                            ......

00692d60  uint8_t __thiscall QualityRegistrar::UnRegisterAllQualityHandler(class QualityRegistrar* this, class QualityChangeHandler* arg2)

00692d60  {
00692d70      void* __return;
00692d70      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_handlers, &__return);
00692d75      class QualityHandler* m_hashNext_1;
00692d75      class QualityHandler* m_hashNext = m_hashNext_1;
00692d75      
00692d7f      if (m_hashNext != 0)
00692d7f      {
00692d82          class QualityHandler** var_8;
00692d82          class QualityHandler** edi_1 = var_8;
00692d82          
00692d89          while (true)
00692d89          {
00692d89              QualityHandler::Remove(m_hashNext, arg2);
00692d8e              m_hashNext = m_hashNext->m_hashNext;
00692d8e              
00692d93              if (m_hashNext == 0)
00692d93              {
00692d95                  void* __return_1 = __return;
00692dad                  class QualityHandler* i;
00692dad                  
00692dad                  do
00692dad                  {
00692da2                      edi_1 = &edi_1[1];
00692da2                      
00692da7                      if (edi_1 == (*(uint32_t*)((char*)__return_1 + 0x60) + (*(uint32_t*)((char*)__return_1 + 0x68) << 2)))
00692da7                          goto label_692dba;
00692da7                      
00692da9                      i = *(uint32_t*)edi_1;
00692dad                  } while (i == 0);
00692dad                  
00692daf                  m_hashNext = i;
00692daf                  
00692db3                  if (m_hashNext == 0)
00692db3                      break;
00692d93              }
00692d89          }
00692d7f      }
00692d7f      
00692dba  label_692dba:
00692dba      QualityHandler::Remove(&this->m_PlayerQualityHandler, arg2);
00692dc6      QualityHandler::Remove(&this->m_GlobalQualityHandler, arg2);
00692dcd      int32_t eax_2;
00692dcd      eax_2 = 1;
00692dd3      return 1;
00692d60  }

00692dd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00692de0  uint8_t __fastcall IntrusiveHashTable<unsigned long,QualityHandler *,1>::grow(class IntrusiveHashTable<unsigned long,QualityHandler *,1>* this)

00692de0  {
00692de0      class IntrusiveHashTable<unsigned long,QualityHandler *,1>* m_numBuckets = this;
00692de2      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00692dee      m_numBuckets = this->m_numBuckets;
00692e05      uint32_t* eax_2 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &m_numBuckets, ((int8_t)m_numBuckets), nullptr);
00692e05      
00692e0f      if (eax_2 != bucketSizesEnd_1)
00692e18          eax_2 = &eax_2[1];
00692e0f      else
00692e0f      {
00692e11          eax_2 -= 4;
00692e11          
00692e16          if (eax_2 != bucketSizesEnd_1)
00692e18              eax_2 = &eax_2[1];
00692e0f      }
00692e0f      
00692e28      return IntrusiveHashTable<unsigned long,QualityHandler *,1>::resize_internal(this, *(uint32_t*)eax_2);
00692de0  }

00692e29                             90 90 90 90 90 90 90                                                           .......

00692e30  uint8_t __thiscall QualityHandler::Remove(class QualityHandler* this, uint64_t arg2, class QualityChangeHandler* arg3)

00692e30  {
00692e3b      int32_t var_14 = arg2;
00692e43      int32_t var_10 = *(uint32_t*)((char*)arg2)[4];
00692e50      void __return;
00692e50      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_handlers.m_intrusiveTable, &__return, &var_14);
00692e5b      void* var_4;
00692e5b      
00692e5b      if (var_4 != 0)
00692e5b      {
00692e5d          class SmartArray<IConsoleCallbackObject *,1>* ecx_1 = *(uint32_t*)((char*)var_4 + 0x10);
00692e5d          
00692e62          if (ecx_1 != 0)
00692e71              return SmartArray<IConsoleCallbackObject *,1>::RemoveUnOrdered(ecx_1, &arg3);
00692e5b      }
00692e5b      
00692e74      void* eax_1;
00692e74      eax_1 = 0;
00692e79      return 0;
00692e30  }

00692e7c                                                                                      90 90 90 90                              ....

00692e80  uint8_t __thiscall QualityHandler::CallChangeHandler(class QualityHandler* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

00692e80  {
00692e90      int32_t eax_1;
00692e90      int32_t edx;
00692e90      edx = HIGHD(((int64_t)arg3));
00692e90      eax_1 = LOWD(((int64_t)arg3));
00692e93      int32_t i = 0;
00692e9a      int32_t var_10 = (eax_1 | 0);
00692ea2      int32_t var_14 = (0 | arg4);
00692eaf      void __return;
00692eaf      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_handlers.m_intrusiveTable, &__return, &var_14);
00692eba      void* var_4;
00692eba      
00692eba      if (var_4 != 0)
00692eba      {
00692ebc          int32_t* edi_1 = *(uint32_t*)((char*)var_4 + 0x10);
00692ebc          
00692ec1          if (edi_1 != 0)
00692ec1          {
00692ec8              if (edi_1[2] > 0)
00692ec8              {
00692ee6                  do
00692ee6                  {
00692ede                      ***(uint32_t***)(*(uint32_t*)edi_1 + (i << 2))(arg2, arg3, arg4);
00692ee3                      i += 1;
00692ee6                  } while (i < edi_1[2]);
00692ec8              }
00692ec8              
00692eeb              int32_t eax_4;
00692eeb              eax_4 = 1;
00692ef1              return 1;
00692ec1          }
00692eba      }
00692eba      
00692ef7      void* eax_3;
00692ef7      eax_3 = 0;
00692efd      return 0;
00692e80  }


00692f00  uint8_t __thiscall QualityHandler::CallRemoveHandler(class QualityHandler* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

00692f00  {
00692f10      int32_t eax_1;
00692f10      int32_t edx;
00692f10      edx = HIGHD(((int64_t)arg3));
00692f10      eax_1 = LOWD(((int64_t)arg3));
00692f13      int32_t i = 0;
00692f1a      int32_t var_10 = (eax_1 | 0);
00692f22      int32_t var_14 = (0 | arg4);
00692f2f      void __return;
00692f2f      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_handlers.m_intrusiveTable, &__return, &var_14);
00692f3a      void* var_4;
00692f3a      
00692f3a      if (var_4 != 0)
00692f3a      {
00692f3c          int32_t* edi_1 = *(uint32_t*)((char*)var_4 + 0x10);
00692f3c          
00692f41          if (edi_1 != 0)
00692f41          {
00692f48              if (edi_1[2] > 0)
00692f48              {
00692f67                  do
00692f67                  {
00692f5e                      *(uint32_t*)(**(uint32_t**)(*(uint32_t*)edi_1 + (i << 2)) + 4)(arg2, arg3, arg4);
00692f64                      i += 1;
00692f67                  } while (i < edi_1[2]);
00692f48              }
00692f48              
00692f6c              int32_t eax_4;
00692f6c              eax_4 = 1;
00692f72              return 1;
00692f41          }
00692f3a      }
00692f3a      
00692f78      void* eax_3;
00692f78      eax_3 = 0;
00692f7e      return 0;
00692f00  }

00692f81     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00692f90  uint8_t __thiscall QualityRegistrar::UnRegisterQualityHandler(class QualityRegistrar* this, uint32_t arg2, enum StatType arg3, uint32_t arg4, class QualityChangeHandler* arg5)

00692f90  {
00692f97      int32_t* eax;
00692f97      int32_t* ecx;
00692f97      
00692f97      if (arg2 == 0)
00692fbf          ecx = &this->m_GlobalQualityHandler;
00692f97      else
00692f97      {
00692fa6          eax = this->m_handlers.m_buckets[(COMBINE(0, arg2) % this->m_handlers.m_numBuckets)];
00692fa6          
00692faa          if (eax != 0)
00692faa          {
00692fb2              while (*(uint32_t*)eax != arg2)
00692fb2              {
00692fb4                  eax = eax[1];
00692fb4                  
00692fb9                  if (eax == 0)
00692fb9                      break;
00692fb2              }
00692faa          }
00692faa          
00692fbb          ecx = eax;
00692f97      }
00692f97      
00692fc7      if (ecx == 0)
00692fc7      {
00692fec          eax = 0;
00692fef          return 0;
00692fc7      }
00692fc7      
00692fd7      int32_t eax_5;
00692fd7      int32_t edx_4;
00692fd7      edx_4 = HIGHD(((int64_t)arg3));
00692fd7      eax_5 = LOWD(((int64_t)arg3));
00692fe0      int32_t var_10 = (eax_5 | 0);
00692fe9      return QualityHandler::Remove(ecx, (0 | arg4), arg5);
00692f90  }

00692ff2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00693000  uint8_t __thiscall QualityRegistrar::UnRegisterQualityHandlerForThePlayer(class QualityRegistrar* this, enum StatType arg2, uint32_t arg3, class QualityChangeHandler* arg4)

00693000  {
00693007      arg4 = arg4;
00693015      int32_t eax_2;
00693015      int32_t edx;
00693015      edx = HIGHD(((int64_t)arg2));
00693015      eax_2 = LOWD(((int64_t)arg2));
0069301e      int32_t var_10 = (eax_2 | 0);
00693026      int32_t var_14 = (0 | arg3);
00693036      void __return;
00693036      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_PlayerQualityHandler.m_handlers.m_intrusiveTable, &__return, &var_14);
00693043      void* var_4;
00693043      
00693043      if (var_4 != 0)
00693043      {
00693045          class SmartArray<IConsoleCallbackObject *,1>* ecx_1 = *(uint32_t*)((char*)var_4 + 0x10);
00693045          
0069304a          if (ecx_1 != 0)
00693059              return SmartArray<IConsoleCallbackObject *,1>::RemoveUnOrdered(ecx_1, &arg4);
00693043      }
00693043      
0069305c      void* eax_4;
0069305c      eax_4 = 0;
00693061      return 0;
00693000  }

00693064              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00693070  uint8_t __thiscall QualityRegistrar::CallChangeHandler(class QualityRegistrar* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

00693070  {
00693079      uint32_t id = arg2->id;
0069307f      int32_t* eax_3;
0069307f      bool cond:2_1;
0069307f      
0069307f      if (id == 0)
0069307f      {
006930a1          eax_3 = &this->m_GlobalQualityHandler;
006930a7          cond:2_1 = eax_3 == 0;
0069307f      }
0069307f      else
0069307f      {
0069308e          eax_3 = this->m_handlers.m_buckets[(COMBINE(0, id) % this->m_handlers.m_numBuckets)];
00693090          cond:2_1 = eax_3 == 0;
00693090          
00693092          if (eax_3 != 0)
00693092          {
00693096              while (*(uint32_t*)eax_3 != id)
00693096              {
00693098                  eax_3 = eax_3[1];
00693098                  
0069309d                  if (eax_3 == 0)
0069309d                      break;
00693096              }
00693096              
006930a7              cond:2_1 = eax_3 == 0;
00693092          }
0069307f      }
0069307f      
006930b1      if (!(cond:2_1))
006930b8          QualityHandler::CallChangeHandler(eax_3, arg2, arg3, arg4);
006930b8      
006930bd      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
006930c7      uint32_t player_id;
006930c7      
006930c7      if (SmartBox::smartbox_1 == 0)
006930d1          player_id = 0;
006930c7      else
006930c9          player_id = SmartBox::smartbox_1->player_id;
006930c9      
006930d5      if (arg2->id == player_id)
006930dd          QualityHandler::CallChangeHandler(&this->m_PlayerQualityHandler, arg2, arg3, arg4);
006930dd      
006930eb      QualityHandler::CallChangeHandler(&this->m_GlobalQualityHandler, arg2, arg3, arg4);
006930f3      int32_t eax_4;
006930f3      eax_4 = 1;
006930f6      return 1;
00693070  }

006930f9                                                                             90 90 90 90 90 90 90                           .......

00693100  uint8_t __thiscall QualityRegistrar::CallRemoveHandler(class QualityRegistrar* this, class CWeenieObject* arg2, enum StatType arg3, uint32_t arg4)

00693100  {
00693109      uint32_t id = arg2->id;
0069310f      int32_t* eax_3;
0069310f      bool cond:2_1;
0069310f      
0069310f      if (id == 0)
0069310f      {
00693131          eax_3 = &this->m_GlobalQualityHandler;
00693137          cond:2_1 = eax_3 == 0;
0069310f      }
0069310f      else
0069310f      {
0069311e          eax_3 = this->m_handlers.m_buckets[(COMBINE(0, id) % this->m_handlers.m_numBuckets)];
00693120          cond:2_1 = eax_3 == 0;
00693120          
00693122          if (eax_3 != 0)
00693122          {
00693126              while (*(uint32_t*)eax_3 != id)
00693126              {
00693128                  eax_3 = eax_3[1];
00693128                  
0069312d                  if (eax_3 == 0)
0069312d                      break;
00693126              }
00693126              
00693137              cond:2_1 = eax_3 == 0;
00693122          }
0069310f      }
0069310f      
00693141      if (!(cond:2_1))
00693148          QualityHandler::CallRemoveHandler(eax_3, arg2, arg3, arg4);
00693148      
0069314d      class SmartBox* SmartBox::smartbox_1 = SmartBox::smartbox;
00693157      uint32_t player_id;
00693157      
00693157      if (SmartBox::smartbox_1 == 0)
00693161          player_id = 0;
00693157      else
00693159          player_id = SmartBox::smartbox_1->player_id;
00693159      
00693165      if (arg2->id == player_id)
0069316d          QualityHandler::CallRemoveHandler(&this->m_PlayerQualityHandler, arg2, arg3, arg4);
0069316d      
0069317b      QualityHandler::CallRemoveHandler(&this->m_GlobalQualityHandler, arg2, arg3, arg4);
00693183      int32_t eax_4;
00693183      eax_4 = 1;
00693186      return 1;
00693100  }

00693189                             90 90 90 90 90 90 90                                                           .......

00693190  void __thiscall IntrusiveHashTable<unsigned long,QualityHandler *,1>::IntrusiveHashTable<unsigned long,QualityHandler *,1>(class IntrusiveHashTable<unsigned long,QualityHandler *,1>* this, uint32_t arg2)

00693190  {
0069319b      arg2 = arg2;
0069319f      uint8_t edx = ((int8_t)arg2);
006931a3      this->m_buckets = nullptr;
006931a6      this->m_firstInterestingBucket = nullptr;
006931a9      this->m_numBuckets = 0;
006931ac      this->m_numElements = 0;
006931b0      this->vtable = &IntrusiveHashTable<unsigned long,class QualityHandler*,1>::`vftable';
006931b6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
006931c9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
006931c9      
006931d3      if (eax == bucketSizesEnd_1)
006931d5          eax -= 4;
006931d5      
006931d8      uint32_t eax_1 = *(uint32_t*)eax;
006931dd      this->m_numBuckets = eax_1;
006931dd      
006931e0      if (eax_1 > 0x17)
006931f6          this->m_buckets = operator new[]((eax_1 << 2));
006931e0      else
006931e5          this->m_buckets = &this->m_aInplaceBuckets;
006931e5      
006931fc      class QualityHandler** m_buckets = this->m_buckets;
006931ff      uint32_t ecx_3 = (this->m_numBuckets << 2);
00693205      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00693216      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00693190  }

0069321f                                                                                               90                                 .

00693220  void __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>* this, uint32_t arg2)

00693220  {
0069322b      arg2 = arg2;
0069322f      uint8_t edx = ((int8_t)arg2);
00693233      this->m_buckets = nullptr;
00693236      this->m_firstInterestingBucket = nullptr;
00693239      this->m_numBuckets = 0;
0069323c      this->m_numElements = 0;
00693240      this->vtable = &IntrusiveHashTable<uint64_t,class HashTableData<uint64_t,class SmartArray<class QualityChangeHandler*,1>*>*,0>::`vftable';
00693246      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00693259      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00693259      
00693263      if (eax == bucketSizesEnd_1)
00693265          eax -= 4;
00693265      
00693268      uint32_t eax_1 = *(uint32_t*)eax;
0069326d      this->m_numBuckets = eax_1;
0069326d      
00693270      if (eax_1 > 0x17)
00693286          this->m_buckets = operator new[]((eax_1 << 2));
00693270      else
00693275          this->m_buckets = &this->m_aInplaceBuckets;
00693275      
0069328c      class HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *>** m_buckets = this->m_buckets;
0069328f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00693295      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
006932a6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00693220  }

006932af                                               90                                                                 .

006932b0  uint8_t __thiscall IntrusiveHashTable<unsigned long,QualityHandler *,1>::resize_internal(class IntrusiveHashTable<unsigned long,QualityHandler *,1>* this, uint32_t arg2)

006932b0  {
006932b1      uint32_t ebp = arg2;
006932b1      
006932bb      if (ebp == this->m_numBuckets)
006932bb      {
006932be          int32_t eax;
006932be          eax = 0;
006932c1          return 0;
006932bb      }
006932bb      
006932c9      int32_t* i_1 = nullptr;
006932c9      
006932cd      while (this->m_numElements != 0)
006932cd      {
006932d6          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
006932dc          int32_t* i_2;
006932dc          int32_t* m_firstInterestingBucket_2;
006932dc          
006932dc          if (this->m_firstInterestingBucket == ecx_1)
006932dc          {
006932f2          label_6932f2:
006932f2              m_firstInterestingBucket_2 = nullptr;
006932f4              i_2 = nullptr;
006932dc          }
006932dc          else
006932dc          {
006932e0              while (true)
006932e0              {
006932e0                  class QualityHandler** m_firstInterestingBucket = this->m_firstInterestingBucket;
006932e0                  
006932e6                  if (*(uint32_t*)m_firstInterestingBucket != 0)
006932e6                  {
006932f8                      int32_t** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
006932fb                      i_2 = *(uint32_t*)m_firstInterestingBucket_1;
006932fd                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
006932fd                      break;
006932e6                  }
006932e6                  
006932ed                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
006932ed                  
006932f0                  if (&m_firstInterestingBucket[1] == ecx_1)
006932f0                      goto label_6932f2;
006932e0              }
006932dc          }
006932dc          
006932ff          void* eax_4 = *(uint32_t*)m_firstInterestingBucket_2;
006932ff          
00693303          if (eax_4 == i_2)
00693315              *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00693303          else
00693303          {
0069330c              void* edx_1;
0069330c              
0069330c              do
0069330c              {
00693305                  edx_1 = eax_4;
00693307                  eax_4 = *(uint32_t*)((char*)eax_4 + 4);
0069330c              } while (eax_4 != i_2);
0069330c              
00693310              if (edx_1 != 0)
0069331c                  *(uint32_t*)((char*)edx_1 + 4) = *(uint32_t*)((char*)eax_4 + 4);
00693310              else
00693315                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_4 + 4);
00693303          }
00693303          
0069331f          this->m_numElements -= 1;
00693322          i_2[1] = i_1;
0069332a          i_1 = i_2;
006932cd      }
006932cd      
0069332e      class QualityHandler** m_buckets = this->m_buckets;
0069332e      
00693336      if (m_buckets != &this->m_aInplaceBuckets)
00693339          operator delete[](m_buckets);
00693339      
00693346      this->m_buckets = nullptr;
00693349      this->m_firstInterestingBucket = nullptr;
0069334c      this->m_numBuckets = 0;
0069334f      this->m_numElements = 0;
00693352      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::init(this, ebp);
00693359      void* eax_7;
00693359      
00693359      if (i_1 != 0)
00693359      {
006933db          int32_t* i;
006933db          
006933db          do
006933db          {
00693360              uint32_t m_numBuckets = this->m_numBuckets;
00693366              i = i_1[1];
00693366              
0069336f              if ((m_numBuckets * 2) < (this->m_numElements + 1))
0069336f              {
00693371                  uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00693378                  uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0069337e                  arg2 = m_numBuckets;
0069338e                  uint32_t* eax_8 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0069338e                  
00693398                  if (eax_8 != bucketSizesEnd_1)
006933a1                      eax_8 = &eax_8[1];
00693398                  else
00693398                  {
0069339a                      eax_8 -= 4;
0069339a                      
0069339f                      if (eax_8 != bucketSizesEnd_1)
006933a1                          eax_8 = &eax_8[1];
00693398                  }
00693398                  
006933a9                  IntrusiveHashTable<unsigned long,QualityHandler *,1>::resize_internal(this, *(uint32_t*)eax_8);
0069336f              }
0069336f              
006933b2              uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)i_1) % this->m_numBuckets);
006933b5              class QualityHandler** m_buckets_1 = this->m_buckets;
006933bb              i_1[1] = m_buckets_1[temp1_1];
006933be              m_buckets_1[temp1_1] = i_1;
006933c4              eax_7 = &m_buckets_1[temp1_1];
006933c4              
006933c9              if (eax_7 < this->m_firstInterestingBucket)
006933cb                  this->m_firstInterestingBucket = eax_7;
006933cb              
006933d6              this->m_numElements += 1;
006933d9              i_1 = i;
006933db          } while (i != 0);
00693359      }
00693359      
006933e0      eax_7 = 1;
006933e3      return 1;
006932b0  }

006933e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006933f0  uint8_t __thiscall IntrusiveHashTable<unsigned long,QualityHandler *,1>::add(class IntrusiveHashTable<unsigned long,QualityHandler *,1>* this, class QualityHandler* arg2)

006933f0  {
006933f8      uint32_t m_hashKey = arg2->m_hashKey;
006933fb      uint32_t m_numBuckets = this->m_numBuckets;
006933fb      
0069340e      for (int32_t* i = this->m_buckets[(COMBINE(0, m_hashKey) % m_numBuckets)]; i != 0; i = i[1])
0069340e      {
00693412          if (*(uint32_t*)i == m_hashKey)
00693412          {
0069345e              if (i == 0)
0069345e                  break;
0069345e              
00693462              i = 0;
00693465              return 0;
00693412          }
0069340e      }
0069340e      
00693424      if ((m_numBuckets * 2) < (this->m_numElements + 1))
00693428          IntrusiveHashTable<unsigned long,QualityHandler *,1>::grow(this);
00693428      
00693431      uint32_t temp1_1 = (COMBINE(0, arg2->m_hashKey) % this->m_numBuckets);
00693434      class QualityHandler** m_buckets = this->m_buckets;
0069343a      arg2->m_hashNext = m_buckets[temp1_1];
0069343d      m_buckets[temp1_1] = arg2;
00693443      class QualityHandler** eax_4 = &m_buckets[temp1_1];
00693443      
00693448      if (eax_4 < this->m_firstInterestingBucket)
0069344a          this->m_firstInterestingBucket = eax_4;
0069344a      
00693452      this->m_numElements += 1;
00693456      uint32_t eax_6;
00693456      eax_6 = 1;
00693459      return 1;
006933f0  }

00693468                          90 90 90 90 90 90 90 90                                                          ........

00693470  uint8_t __thiscall IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::add(class IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>* this, class HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *>* arg2)

00693470  {
00693481      void __return;
00693481      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(this, &__return, arg2);
0069348c      int32_t var_4;
0069348c      
0069348c      if (var_4 != 0)
0069348c      {
0069348f          int32_t eax;
0069348f          eax = 0;
00693495          return 0;
0069348c      }
0069348c      
006934a0      int32_t var_18_1 = 0;
006934a2      uint32_t m_numBuckets = this->m_numBuckets;
006934a3      int32_t var_20 = *(uint32_t*)((char*)arg2->m_hashKey)[4];
006934a4      int32_t var_24 = arg2->m_hashKey;
006934a5      int32_t eax_2 = _aullrem();
006934aa      class HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *>** m_buckets = this->m_buckets;
006934b0      class HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *>** eax_3 = &m_buckets[eax_2];
006934b3      arg2->m_hashNext = m_buckets[eax_2];
006934b6      *(uint32_t*)eax_3 = arg2;
006934b6      
006934bb      if (eax_3 < this->m_firstInterestingBucket)
006934bd          this->m_firstInterestingBucket = eax_3;
006934bd      
006934c0      this->m_numElements += 1;
006934c4      eax_3 = 1;
006934ca      return 1;
00693470  }

006934cd                                         90 90 90                                                               ...

006934d0  void __fastcall IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(class IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>* this)

006934d0  {
006934d8      if (this->m_numElements != 0)
006934d8      {
006934da          int32_t* m_firstInterestingBucket_2;
006934da          int32_t* m_firstInterestingBucket_3 = m_firstInterestingBucket_2;
006934da          
00693548          do
00693548          {
006934e6              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
006934ec              void* ecx_2;
006934ec              
006934ec              if (this->m_firstInterestingBucket == ecx_1)
006934ec              {
00693502              label_693502:
00693502                  m_firstInterestingBucket_2 = nullptr;
00693504                  ecx_2 = nullptr;
006934ec              }
006934ec              else
006934ec              {
006934f0                  while (true)
006934f0                  {
006934f0                      class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_firstInterestingBucket = this->m_firstInterestingBucket;
006934f0                      
006934f6                      if (*(uint32_t*)m_firstInterestingBucket != 0)
006934f6                      {
00693508                          class HashTableData<QualifiedDataID,CAsyncGetRequest *>** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0069350b                          ecx_2 = *(uint32_t*)m_firstInterestingBucket_1;
0069350d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0069350d                          break;
006934f6                      }
006934f6                      
006934fd                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
006934fd                      
00693500                      if (&m_firstInterestingBucket[1] == ecx_1)
00693500                          goto label_693502;
006934f0                  }
006934ec              }
006934ec              
0069350f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0069350f              
00693513              if (eax_3 == ecx_2)
00693525                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 8);
00693513              else
00693513              {
0069351c                  void* edx_1;
0069351c                  
0069351c                  do
0069351c                  {
00693515                      edx_1 = eax_3;
00693517                      eax_3 = *(uint32_t*)((char*)eax_3 + 8);
0069351c                  } while (eax_3 != ecx_2);
0069351c                  
00693520                  if (edx_1 != 0)
0069352c                      *(uint32_t*)((char*)edx_1 + 8) = *(uint32_t*)((char*)eax_3 + 8);
00693520                  else
00693525                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 8);
00693513              }
00693513              
00693535              this->m_numElements -= 1;
00693535              
00693538              if (ecx_2 != 0)
0069353b                  operator delete(ecx_2);
00693548          } while (this->m_numElements != 0);
006934d8      }
006934d0  }

006934dd                                                                                         8d 49 00                               .I.
0069354d                                         90 90 90                                                               ...

00693550  uint8_t __fastcall QualityRegistrar::UnRegisterAllQualityHandler(class QualityRegistrar* this, uint32_t arg2)

00693550  {
0069355f      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax;
0069355f      eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_handlers.vtable, &arg2) != 0;
00693562      return eax;
00693550  }

00693565                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00693570  uint8_t __thiscall HashTable<unsigned __int64,SmartArray<QualityChangeHandler *,1> *,0>::add(class HashTable<unsigned __int64,SmartArray<QualityChangeHandler *,1> *,0>* this, uint64_t const* arg2, class SmartArray<QualityChangeHandler *,1>** arg3)

00693570  {
00693576      void* eax = operator new(0x18);
00693580      void* esi;
00693580      
00693580      if (eax == 0)
006935a4          esi = nullptr;
00693580      else
00693580      {
00693588          *(uint32_t*)eax = *(uint32_t*)arg2;
00693591          *(uint32_t*)((char*)eax + 4) = *(uint32_t*)((char*)arg2 + 4);
00693594          *(uint32_t*)((char*)eax + 8) = 0;
0069359d          *(uint32_t*)((char*)eax + 0x10) = *(uint32_t*)arg3;
006935a0          esi = eax;
00693580      }
00693580      
006935b1      if (IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::add(&this->m_intrusiveTable, esi) != 0)
006935cb          return 1;
006935cb      
006935b5      if (esi != 0)
006935b8          operator delete(esi);
006935b8      
006935c4      return 0;
00693570  }

006935ce                                            90 90                                                                ..

006935d0  uint8_t __thiscall QualityHandler::Add(class QualityHandler* this, uint64_t arg2, class QualityChangeHandler* arg3)

006935d0  {
006935db      int32_t ecx = *(uint32_t*)((char*)arg2)[4];
006935e3      void* var_14 = arg2;
006935ec      int32_t var_10 = ecx;
006935f4      void* esi = nullptr;
006935f6      void __return;
006935f6      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::find_internal(&this->m_handlers.m_intrusiveTable, &__return, &var_14);
00693601      void* var_4;
00693601      
00693601      if (var_4 != 0)
00693603          esi = *(uint32_t*)((char*)var_4 + 0x10);
00693603      
00693608      if (esi == 0)
00693608      {
0069360c          void* eax_2 = operator new(0xc);
0069360c          
00693616          if (eax_2 == 0)
00693624              esi = nullptr;
00693616          else
00693616          {
00693618              *(uint32_t*)eax_2 = esi;
0069361a              *(uint32_t*)((char*)eax_2 + 4) = esi;
0069361d              *(uint32_t*)((char*)eax_2 + 8) = esi;
00693620              esi = eax_2;
00693616          }
00693616          
00693633          var_14 = esi;
00693637          HashTable<unsigned __int64,SmartArray<QualityChangeHandler *,1> *,0>::add(&this->m_handlers, &arg2, &var_14);
00693608      }
00693608      
0069364d      return SmartArray<unsigned long,1>::add_unique(esi, &arg3);
006935d0  }


00693650  uint8_t __thiscall QualityRegistrar::RegisterQualityHandlerForThePlayer(class QualityRegistrar* this, enum StatType arg2, uint32_t arg3, class QualityChangeHandler* arg4)

00693650  {
0069365f      int32_t eax_1;
0069365f      int32_t edx;
0069365f      edx = HIGHD(((int64_t)arg2));
0069365f      eax_1 = LOWD(((int64_t)arg2));
00693668      int32_t var_10 = (eax_1 | 0);
00693674      return QualityHandler::Add(&this->m_PlayerQualityHandler, (0 | arg3), arg4);
00693650  }

00693677                                                                       90 90 90 90 90 90 90 90 90                         .........

00693680  void* __thiscall HashTable<unsigned __int64,SmartArray<QualityChangeHandler *,1> *,0>::`scalar deleting destructor'(class HashTable<unsigned __int64,SmartArray<QualityChangeHandler *,1> *,0>* this, uint32_t arg2)

00693680  {
00693689      this->vtable = 0x800604;
0069368f      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_intrusiveTable);
00693694      class HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *>** m_buckets = this->m_intrusiveTable.m_buckets;
00693684      this->m_intrusiveTable.vtable = &IntrusiveHashTable<uint64_t,class HashTableData<uint64_t,class SmartArray<class QualityChangeHandler*,1>*>*,0>::`vftable';
00693684      
006936a2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
006936a5          operator delete[](m_buckets);
006936a5      
00693684      this->m_intrusiveTable.m_buckets = nullptr;
00693684      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00693684      this->m_intrusiveTable.m_numBuckets = 0;
00693684      this->m_intrusiveTable.m_numElements = 0;
00693684      
006936c0      if ((arg2 & 1) != 0)
006936c3          operator delete(this);
006936c3      
006936cf      return this;
00693680  }

006936d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006936e0  void __fastcall QualityHandler::~QualityHandler(class QualityHandler* this)

006936e0  {
006936f1      void __return;
006936f1      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_handlers.m_intrusiveTable, &__return);
006936f6      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
006936f9      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
006936fb      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
00693702      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable_1 = m_currHashTable;
00693702      
00693706      if (i_1 != 0)
00693706      {
00693708          while (true)
00693708          {
00693708              int32_t* ebx_1 = *(int32_t*)((char*)i_1 + 0x10);
00693708              
0069370d              if (ebx_1 != 0)
0069370d              {
0069371e                  if ((ebx_1[1] & 0x80000000) == 0x80000000)
00693723                      operator delete[](*(uint32_t*)ebx_1);
00693723                  
0069372c                  operator delete(ebx_1);
00693731                  m_currHashTable = m_currHashTable_1;
0069370d              }
0069370d              
00693738              i_1 = i_1->m_data;
00693738              
0069373d              if (i_1 == 0)
0069373d              {
00693753                  class HashTableData<unsigned long,DBOCache *>* i;
00693753                  
00693753                  do
00693753                  {
00693748                      m_currBucket = &m_currBucket[1];
00693748                      
0069374d                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0069374d                          goto label_693760;
0069374d                      
0069374f                      i = *(uint32_t*)m_currBucket;
00693753                  } while (i == 0);
00693753                  
00693755                  i_1 = i;
00693755                  
00693759                  if (i_1 == 0)
00693759                      break;
0069373d              }
00693708          }
00693706      }
00693706      
00693760  label_693760:
00693760      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_handlers.m_intrusiveTable);
0069376a      this->m_handlers.vtable = 0x800604;
00693771      IntrusiveHashTable<QualifiedDataID,HashTableData<QualifiedDataID,CAsyncGetRequest *> *,1>::delete_contents(&this->m_handlers.m_intrusiveTable);
00693776      class HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *>** m_buckets = this->m_handlers.m_intrusiveTable.m_buckets;
00693765      this->m_handlers.m_intrusiveTable.vtable = &IntrusiveHashTable<uint64_t,class HashTableData<uint64_t,class SmartArray<class QualityChangeHandler*,1>*>*,0>::`vftable';
00693765      
00693784      if (m_buckets != &this->m_handlers.m_intrusiveTable.m_aInplaceBuckets)
00693787          operator delete[](m_buckets);
00693787      
00693765      this->m_handlers.m_intrusiveTable.m_buckets = nullptr;
00693765      this->m_handlers.m_intrusiveTable.m_firstInterestingBucket = nullptr;
00693765      this->m_handlers.m_intrusiveTable.m_numBuckets = 0;
00693765      this->m_handlers.m_intrusiveTable.m_numElements = 0;
006936e0  }

006937a3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006937b0  void __fastcall QualityRegistrar::QualityRegistrar(class QualityRegistrar* this)

006937b0  {
006937b9      this->vtable = 0x800608;
006937bf      IntrusiveHashTable<unsigned long,QualityHandler *,1>::IntrusiveHashTable<unsigned long,QualityHandler *,1>(&this->m_handlers, 7);
006937c6      this->m_PlayerQualityHandler.m_hashKey = 0;
006937c9      this->m_PlayerQualityHandler.m_hashNext = nullptr;
006937d4      this->m_PlayerQualityHandler.m_handlers.vtable = 0x800604;
006937db      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>(&this->m_PlayerQualityHandler.m_handlers.m_intrusiveTable, 0x17);
006937e0      this->m_GlobalQualityHandler.m_hashKey = 0;
006937e6      this->m_GlobalQualityHandler.m_hashNext = nullptr;
006937f4      this->m_GlobalQualityHandler.m_handlers.vtable = 0x800604;
006937fe      IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>(&this->m_GlobalQualityHandler.m_handlers.m_intrusiveTable, 0x17);
00693804      QualityRegistrar::s_pQR = this;
006937b0  }

0069380e                                            90 90                                                                ..

00693810  uint8_t __thiscall QualityRegistrar::RegisterQualityHandler(class QualityRegistrar* this, uint32_t arg2, enum StatType arg3, uint32_t arg4, class QualityChangeHandler* arg5)

00693810  {
00693819      int32_t eax_1;
00693819      int32_t edx;
00693819      edx = HIGHD(((int64_t)arg3));
00693819      eax_1 = LOWD(((int64_t)arg3));
00693836      int32_t* eax_6;
00693836      
00693836      if (arg2 == 0)
0069385d          eax_6 = &this->m_GlobalQualityHandler;
00693836      else
00693836      {
00693843          eax_6 = this->m_handlers.m_buckets[(COMBINE(0, arg2) % this->m_handlers.m_numBuckets)];
00693843          
00693847          if (eax_6 != 0)
00693847          {
00693852              while (*(uint32_t*)eax_6 != arg2)
00693852              {
00693854                  eax_6 = eax_6[1];
00693854                  
00693859                  if (eax_6 == 0)
00693859                      break;
00693852              }
00693847          }
00693836      }
00693836      
00693865      uint32_t* esi = eax_6;
00693865      
00693867      if (eax_6 == 0)
00693867      {
00693870          esi = operator new(0x7c);
00693870          
00693877          if (esi == 0)
00693895              esi = nullptr;
00693877          else
00693877          {
00693879              *(uint32_t*)esi = arg2;
0069387b              esi[1] = 0;
00693887              esi[2] = 0x800604;
0069388e              IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>::IntrusiveHashTable<unsigned __int64,HashTableData<unsigned __int64,SmartArray<QualityChangeHandler *,1> *> *,0>(&esi[3], 0x17);
00693877          }
00693877          
0069389b          IntrusiveHashTable<unsigned long,QualityHandler *,1>::add(&this->m_handlers, esi);
00693867      }
00693867      
006938a9      int32_t var_20 = (eax_1 | 0);
006938b9      return QualityHandler::Add(esi, (0 | arg4), arg5);
00693810  }

006938bc                                                                                      90 90 90 90                              ....

006938c0  void __fastcall IntrusiveHashTable<unsigned long,QualityHandler *,1>::delete_contents(class IntrusiveHashTable<unsigned long,QualityHandler *,1>* this)

006938c0  {
006938c8      if (this->m_numElements != 0)
006938c8      {
006938ca          class QualityHandler* edi;
006938ca          class QualityHandler* var_8_1 = edi;
006938ca          
0069393f          do
0069393f          {
006938d6              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
006938dc              int32_t* m_firstInterestingBucket_2;
006938dc              
006938dc              if (this->m_firstInterestingBucket == ecx_1)
006938dc              {
006938f2              label_6938f2:
006938f2                  m_firstInterestingBucket_2 = nullptr;
006938f4                  edi = nullptr;
006938dc              }
006938dc              else
006938dc              {
006938e0                  while (true)
006938e0                  {
006938e0                      class QualityHandler** m_firstInterestingBucket = this->m_firstInterestingBucket;
006938e0                      
006938e6                      if (*(uint32_t*)m_firstInterestingBucket != 0)
006938e6                      {
006938f8                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
006938fb                          edi = *(uint32_t*)m_firstInterestingBucket_1;
006938fd                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
006938fd                          break;
006938e6                      }
006938e6                      
006938ed                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
006938ed                      
006938f0                      if (&m_firstInterestingBucket[1] == ecx_1)
006938f0                          goto label_6938f2;
006938e0                  }
006938dc              }
006938dc              
006938ff              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
006938ff              
00693903              if (eax_3 == edi)
00693915                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00693903              else
00693903              {
0069390c                  void* ecx_2;
0069390c                  
0069390c                  do
0069390c                  {
00693905                      ecx_2 = eax_3;
00693907                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0069390c                  } while (eax_3 != edi);
0069390c                  
00693910                  if (ecx_2 != 0)
0069391c                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00693910                  else
00693915                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00693903              }
00693903              
00693925              this->m_numElements -= 1;
00693925              
00693928              if (edi != 0)
00693928              {
0069392c                  QualityHandler::~QualityHandler(edi);
00693932                  operator delete(edi);
00693928              }
0069393f          } while (this->m_numElements != 0);
006938c8      }
006938c0  }

006938cd                                         8d 49 00                                                               .I.
00693944              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00693950  void __fastcall QualityRegistrar::~QualityRegistrar(class QualityRegistrar* this)

00693950  {
00693958      this->vtable = 0x800608;
00693962      QualityRegistrar::s_pQR = nullptr;
00693968      IntrusiveHashTable<unsigned long,QualityHandler *,1>::delete_contents(&this->m_handlers);
00693973      QualityHandler::~QualityHandler(&this->m_GlobalQualityHandler);
0069397b      QualityHandler::~QualityHandler(&this->m_PlayerQualityHandler);
00693980      class QualityHandler** m_buckets = this->m_handlers.m_buckets;
00693955      this->m_handlers.vtable = &IntrusiveHashTable<unsigned long,class QualityHandler*,1>::`vftable';
00693955      
0069398e      if (m_buckets != &this->m_handlers.m_aInplaceBuckets)
00693991          operator delete[](m_buckets);
00693991      
00693955      this->m_handlers.m_buckets = nullptr;
00693955      this->m_handlers.m_firstInterestingBucket = nullptr;
00693955      this->m_handlers.m_numBuckets = 0;
00693955      this->m_handlers.m_numElements = 0;
00693950  }

006939a9                             90 90 90 90 90 90 90                                                           .......

006939b0  void* __thiscall QualityRegistrar::`scalar deleting destructor'(class QualityRegistrar* this, uint32_t arg2)

006939b0  {
006939b3      QualityRegistrar::~QualityRegistrar(this);
006939b3      
006939bd      if ((arg2 & 1) != 0)
006939c0          operator delete(this);
006939c0      
006939cb      return this;
006939b0  }

006939ce                                            90 90                                                                ..

006939d0  int32_t __fastcall Graphic::GetWidth(class Graphic const* this)

006939d0  {
006939d0      class RenderSurface* m_image = this->m_image;
006939d0      
006939d5      if (m_image == 0)
006939e0          return 0;
006939e0      
006939dd      return m_image->width;
006939d0  }

006939e1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006939f0  int32_t __fastcall Graphic::GetHeight(class Graphic const* this)

006939f0  {
006939f0      class RenderSurface* m_image = this->m_image;
006939f0      
006939f5      if (m_image == 0)
00693a00          return 0;
00693a00      
006939fd      return m_image->height;
006939f0  }

00693a01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00693a10  uint8_t __thiscall Graphic::PointTest(class Graphic const* this, int32_t arg2, int32_t arg3)

00693a10  {
00693a10      class RenderSurface* m_image = this->m_image;
00693a10      
00693a15      if (m_image != 0)
00693a1d          /* tailcall */
00693a1d          return SurfaceWindow::PointTestOverlay(&m_image->window, arg2, arg3);
00693a1d      
00693a22      m_image = 0;
00693a24      return 0;
00693a10  }

00693a27                       90 90 90 90 90 90 90 90 90                                                         .........

00693a30  void __thiscall Graphic::PutImage(class Graphic* this, enum BlitMode arg2, float arg3, class Box2D const* arg4, class Box2D const* arg5, class UISurface* arg6)

00693a30  {
00693a30      class RenderSurface* m_image = this->m_image;
00693a30      
00693a38      if (m_image != 0)
00693a38      {
00693a3f          class UISurface* esi_1 = arg6;
00693a3f          
00693a45          if (esi_1 != 0)
00693a45          {
00693a66              int32_t var_2c;
00693a66              SurfaceWindow::SurfaceWindow(&var_2c, m_image, arg4->m_x0, arg4->m_y0, arg4->m_x1, arg4->m_y1);
00693a71              int32_t m_y1 = arg5->m_y1;
00693a74              int32_t m_x1 = arg5->m_x1;
00693a77              int32_t m_y0 = arg5->m_y0;
00693a7a              arg6 = arg5->m_x0;
00693a80              UISurface::PrepareSurface(esi_1);
00693a95              int32_t var_58;
00693a95              SurfaceWindow::SurfaceWindow(&var_58, esi_1->m_pLocalSurface, arg6, m_y0, m_x1, m_y1);
00693aad              SurfaceWindow::Blit(&var_58, &var_2c, arg2, arg3);
00693abb              var_58 = 0x798d14;
00693abf              SurfaceWindow::End(&var_58);
00693ac8              var_2c = 0x798d14;
00693acc              SurfaceWindow::End(&var_2c);
00693a45          }
00693a38      }
00693a30  }

00693adb                                                                                   90 90 90 90 90                             .....

00693ae0  void __thiscall Graphic::Graphic(class Graphic* this, class Graphic const* arg2)

00693ae0  {
00693ae3      this->vtable = 0x800638;
00693aee      this->m_id.id = INVALID_DID.id;
00693af7      this->m_image = nullptr;
00693af7      
00693afe      if (this != arg2)
00693afe      {
00693b03          this->m_id.id = arg2->m_id.id;
00693b06          class RenderSurface* m_image = arg2->m_image;
00693b06          
00693b0b          if (m_image != 0)
00693b0b          {
00693b0d              this->m_image = m_image;
00693b10              m_image->vtable->AddRef();
00693b0b          }
00693afe      }
00693ae0  }

00693b1b                                                                                   90 90 90 90 90                             .....

00693b20  void __thiscall Graphic::Draw(class Graphic* this, enum BlitMode arg2, float arg3, class Box2D const* arg4, class Box2D const* arg5, class Box2D const* arg6, struct tagPOINT const* arg7, class UISurface* arg8)

00693b20  {
00693b23      class Box2D* edx = arg4;
00693b27      int32_t m_x0 = edx->m_x0;
00693b2f      int32_t ebx_2 = ((edx->m_x1 - m_x0) + 1);
00693b2f      
00693b3a      if (ebx_2 > 0)
00693b3a      {
00693b40          int32_t m_y0 = edx->m_y0;
00693b4e          class Box2D* eax = ((edx->m_y1 - m_y0) + 1);
00693b4e          
00693b9b          if ((eax > 0 && (((arg5->m_x1 - arg5->m_x0) + 1) > 0 && (((arg5->m_y1 - arg5->m_y0) + 1) > 0 && (((arg6->m_x1 - arg6->m_x0) + 1) > 0 && ((arg6->m_y1 - arg6->m_y0) + 1) > 0)))))
00693b9b          {
00693ba1              class RenderSurface* m_image = this->m_image;
00693ba1              
00693bce              if ((m_image != 0 && (m_image->width != 0 && (m_image->height != 0 && arg8 != 0))))
00693bce              {
00693bd8                  int32_t x = arg7->x;
00693bd8                  
00693be1                  if ((((x == 0 && arg7->y == x) && ebx_2 <= Graphic::GetWidth(this)) && eax <= Graphic::GetHeight(this)))
00693be1                  {
00693c08                      Graphic::PutImage(this, arg2, arg3, arg6, arg5, arg8);
00693c14                      return;
00693be1                  }
00693be1                  
00693c17                  int32_t eax_12 = Graphic::GetWidth(this);
00693c27                  int32_t ebx_3 = Graphic::GetHeight(this);
00693c2b                  int32_t var_30 = 0;
00693c2f                  struct tagPOINT* var_2c_1 = nullptr;
00693c33                  int32_t var_28_1 = 0;
00693c37                  int32_t var_24_1 = 0;
00693c3f                  int32_t* var_50_2 = &var_30;
00693c43                  arg4 = ebx_3;
00693c43                  
00693c4e                  if (Box2D::Intersection(arg5, edx, edx) != 0)
00693c4e                  {
00693c58                      int32_t eax_15 = var_30;
00693c5c                      int32_t esi_11 = (x - m_x0);
00693c5e                      class Box2D* esi_12 = (esi_11 + eax_15);
00693c62                      arg6 = esi_12;
00693c62                      
00693c66                      if (esi_11 != -(eax_15))
00693c66                      {
00693c69                          int32_t temp1_1 = (((int64_t)esi_12) % eax_12);
00693c6d                          arg6 = temp1_1;
00693c6d                          
00693c71                          if (temp1_1 < 0)
00693c77                              arg6 = (temp1_1 + eax_12);
00693c66                      }
00693c66                      
00693c82                      int32_t edx_6 = (arg7->y - m_y0);
00693c86                      struct tagPOINT* ecx_3 = var_2c_1;
00693c8a                      int32_t edx_7 = (edx_6 + ecx_3);
00693c8a                      
00693c8c                      if (edx_6 != -(ecx_3))
00693c8c                      {
00693c91                          edx_7 = (((int64_t)edx_7) % ebx_3);
00693c91                          
00693c95                          if (edx_7 < 0)
00693c97                              edx_7 += ebx_3;
00693c8c                      }
00693c8c                      
00693c99                      int32_t esi_13 = var_24_1;
00693c9f                      arg7 = ecx_3;
00693c9f                      
00693ca3                      if (ecx_3 <= esi_13)
00693ca3                      {
00693cb3                          while (true)
00693cb3                          {
00693cb3                              int32_t ebx_6 = (ebx_3 - edx_7);
00693cb3                              
00693cbd                              if ((ebx_6 + ecx_3) > (esi_13 + 1))
00693cc3                                  ebx_6 = ((esi_13 - ecx_3) + 1);
00693cc3                              
00693cc4                              int32_t edi_4 = var_30;
00693cca                              class Box2D* eax_25 = arg6;
00693cca                              
00693cce                              if (edi_4 <= var_28_1)
00693cce                              {
00693cd0                                  struct tagPOINT* var_1c_1 = ecx_3;
00693cd4                                  int32_t var_c_1 = edx_7;
00693ce0                                  void* var_14_1 = ((ebx_6 + ecx_3) - 1);
00693ce4                                  int32_t var_4_1 = ((ebx_6 + edx_7) - 1);
00693ce4                                  
00693d45                                  do
00693d45                                  {
00693cf4                                      int32_t esi_15 = (eax_12 - eax_25);
00693cf4                                      
00693cfe                                      if ((esi_15 + edi_4) > (var_28_1 + 1))
00693d04                                          esi_15 = ((var_28_1 - edi_4) + 1);
00693d04                                      
00693d09                                      class Box2D* var_10 = eax_25;
00693d1a                                      int32_t var_18_1 = ((esi_15 + edi_4) - 1);
00693d27                                      void* var_8_1 = ((esi_15 + eax_25) - 1);
00693d36                                      int32_t var_20 = edi_4;
00693d3a                                      Graphic::PutImage(this, arg2, arg3, &var_10, &var_20, arg8);
00693d3f                                      edi_4 += esi_15;
00693d41                                      eax_25 = nullptr;
00693d45                                  } while (edi_4 <= var_28_1);
00693d45                                  
00693d47                                  ecx_3 = arg7;
00693d4b                                  esi_13 = var_24_1;
00693cce                              }
00693cce                              
00693d4f                              ecx_3 += ebx_6;
00693d51                              edx_7 = 0;
00693d55                              arg7 = ecx_3;
00693d55                              
00693d59                              if (ecx_3 > esi_13)
00693d59                                  break;
00693d59                              
00693caf                              ebx_3 = arg4;
00693cb3                          }
00693ca3                      }
00693c4e                  }
00693bce              }
00693b9b          }
00693b3a      }
00693b20  }

00693cea                                8d 9b 00 00 00 00                                                            ......
00693d69                             90 90 90 90 90 90 90                                                           .......

00693d70  void __fastcall Graphic::SetToDefaultGraphic(class Graphic* this)

00693d70  {
00693d80      class RenderSurface* eax_1 = RenderDevice::render_device->vtable->CreateLocalSurface();
00693d83      this->m_image = eax_1;
00693d8c      struct RenderSurface::VTable* vtable = eax_1->vtable;
00693d90      enum PixelFormatID eax_2 = RenderDevice::GetUISurfaceFormat(RenderDevice::render_device);
00693d95      this->m_image;
00693d95      
00693da7      if (vtable->Create(0x20, 0x20, eax_2, 1) == 0)
00693da7      {
00693da9          class RenderSurface* m_image_1 = this->m_image;
00693da9          
00693dae          if (m_image_1 != 0)
00693dae          {
00693db4              m_image_1->vtable->Release();
00693dba              this->m_image = nullptr;
00693dae          }
00693dae          
00693dae          return;
00693da7      }
00693da7      
00693dc3      class RenderSurface* m_image = this->m_image;
00693dc3      
00693dc8      if (m_image != 0)
00693dc8      {
00693dd9          int32_t var_30 = 0x3e99999a;
00693de1          int32_t var_2c_1 = 0x3e99999a;
00693de9          int32_t var_28_1 = 0x3ecccccd;
00693df1          int32_t var_24_1 = 0x3f800000;
00693df9          SurfaceWindow::Fill(&m_image->window, &var_30);
00693e16          int32_t var_20 = 0x1d;
00693e1a          int32_t var_c_1 = 0x1d;
00693e1e          int32_t var_1c_1 = 0;
00693e22          int32_t var_10 = 0;
00693e26          int32_t var_18_1 = 0x20;
00693e2a          int32_t var_4_1 = 0x20;
00693e2e          int32_t var_14_1 = 0x20;
00693e32          int32_t var_8_1 = 0x20;
00693e36          SurfaceWindow::FillArea(&this->m_image->window, &RGBAColor_White, &var_20);
00693e4e          SurfaceWindow::FillArea(&this->m_image->window, &RGBAColor_White, &var_10);
00693dc8      }
00693d70  }

00693e5a                                                                                90 90 90 90 90 90                            ......

00693e60  void __thiscall Graphic::Graphic(class Graphic* this, class RenderSurface* arg2)

00693e60  {
00693e6a      this->vtable = 0x800638;
00693e75      this->m_id.id = INVALID_DID.id;
00693e78      this->m_image = arg2;
00693e78      
00693e7b      if (arg2 == 0)
00693e7b      {
00693e7d          Graphic::SetToDefaultGraphic(this);
00693e86          return;
00693e7b      }
00693e7b      
00693e89      arg2->vtable->AddRef();
00693e93      this->m_id.id = arg2->m_DID.id;
00693e60  }

00693e9d                                                                                         90 90 90                               ...

00693ea0  void* __thiscall Graphic::`scalar deleting destructor'(class Graphic* this, uint32_t arg2)

00693ea0  {
00693ea3      class RenderSurface* m_image = this->m_image;
00693ea8      this->vtable = 0x800638;
00693ea8      
00693eae      if (m_image != 0)
00693eae      {
00693eb0          m_image->vtable->Release();
00693eb5          this->m_image = nullptr;
00693eae      }
00693eae      
00693ec7      this->m_id.id = INVALID_DID.id;
00693ec7      
00693eca      if ((arg2 & 1) != 0)
00693ecd          operator delete(this);
00693ecd      
00693ed8      return this;
00693ea0  }

00693edb                                                                                   90 90 90 90 90                             .....

00693ee0  void __thiscall Graphic::Graphic(class Graphic* this, class IDClass<_tagDataID,32,0> arg2)

00693ee0  {
00693ef1      this->vtable = 0x800638;
00693ef7      this->m_id.id = arg2;
00693efa      this->m_image = nullptr;
00693f07      void var_8;
00693f07      class DBObj* eax_1 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0xc));
00693f11      this->m_image = eax_1;
00693f11      
00693f14      if (eax_1 == 0)
00693f18          Graphic::SetToDefaultGraphic(this);
00693ee0  }

00693f26                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00693f30  void __thiscall UISurfaceObject::SetTransform(class UISurfaceObject* this, class Matrix4 const* arg2)

00693f30  {
00693f42      __builtin_memcpy(&this->m_transform, arg2, 0x40);
00693f4b      Matrix4::Inverse(&this->m_invTransform, &this->m_transform);
00693f30  }

00693f57                                                                       90 90 90 90 90 90 90 90 90                         .........

00693f60  void __thiscall UISurfaceObject::InqRotateVals(class UISurfaceObject const* this, int32_t* arg2, int32_t* arg3, int32_t* arg4)

00693f60  {
00693f6a      *(uint32_t*)arg2 = this->m_virtualXRot;
00693f76      *(uint32_t*)arg3 = this->m_virtualYRot;
00693f82      *(uint32_t*)arg4 = this->m_virtualZRot;
00693f60  }

00693f87                       90 90 90 90 90 90 90 90 90                                                         .........

00693f90  uint8_t const __thiscall UISurfaceObject::SetPhysicalSize(class UISurfaceObject* this, uint32_t const arg2, uint32_t const arg3)

00693f90  {
00693f90      class UISurface* m_surface = this->m_surface;
00693f90      
00693f98      if (m_surface != 0)
00693f9a          /* tailcall */
00693f9a          return UISurface::Resize(m_surface, arg2, arg3);
00693f9a      
00693f9f      int32_t eax;
00693f9f      eax = 0;
00693fa1      return 0;
00693f90  }

00693fa4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00693fb0  uint8_t const __thiscall UISurfaceObject::GetPhysicalSize(class UISurfaceObject const* this, uint32_t* arg2, uint32_t* arg3)

00693fb0  {
00693fb0      class UISurface* m_surface = this->m_surface;
00693fb0      
00693fb8      if (m_surface == 0)
00693fb8      {
00693fd7          m_surface = 0;
00693fd9          return 0;
00693fb8      }
00693fb8      
00693fc1      *(uint32_t*)arg2 = m_surface->m_nPhysicalWidth;
00693fd0      *(uint32_t*)arg3 = this->m_surface->m_nPhysicalHeight;
00693fd2      class UISurface* eax_1;
00693fd2      eax_1 = 1;
00693fd4      return 1;
00693fb0  }

00693fdc                                                                                      90 90 90 90                              ....

00693fe0  void __thiscall UISurfaceObject::ObjectToUISurface(class UISurfaceObject const* this, float const* arg2, float const* arg3, int32_t* arg4, int32_t* arg5)

00693fe0  {
00693fe3      class UISurface* m_surface = this->m_surface;
00693fe3      
00693feb      if (m_surface != 0)
00693feb      {
00693ff1          *(uint32_t*)arg2;
00693ffe          m_surface->m_nPhysicalWidth;
00693ff3          m_surface->m_nPhysicalWidth;
00694014          *(uint32_t*)arg4 = _ftol2();
00694016          class UISurface* m_surface_1 = this->m_surface;
0069401f          m_surface_1->m_nPhysicalHeight;
0069401c          m_surface_1->m_nPhysicalHeight;
00694036          *(uint32_t*)arg3;
00694043          *(uint32_t*)arg5 = _ftol2();
00693feb      }
00693fe0  }

00694049                             90 90 90 90 90 90 90                                                           .......

00694050  void __thiscall UISurfaceObject::SetSurface(class UISurfaceObject* this, class UISurface* arg2, uint8_t const arg3)

00694050  {
00694058      arg2->m_cRef += 1;
0069405b      class UISurface* m_surface_1 = this->m_surface;
0069405b      
00694063      if (m_surface_1 != 0)
00694063      {
00694065          uint32_t m_cRef = m_surface_1->m_cRef;
00694065          m_surface_1->m_cRef -= 1;
00694065          
00694068          if (m_cRef == 1)
0069406a              m_surface_1->vtable->__vecDelDtor(1);
0069406a          
00694070          this->m_surface = nullptr;
00694063      }
00694063      
00694080      bool cond:0 = this->m_material != 0;
00694082      m_surface_1 = arg3;
00694086      this->m_surface = arg2;
0069408c      this->m_bTile = m_surface_1;
0069408c      
00694092      if (!(cond:0))
00694099          this->vtable->SetMaterial(INVALID_DID.id);
00694099      
006940a1      class UISurface* m_surface = this->m_surface;
006940a1      
006940a9      if (m_surface != 0)
006940a9      {
006940ae          this->m_nVirtualWidth = m_surface->m_nPhysicalWidth;
006940b4          this->m_nVirtualHeight = m_surface->m_nPhysicalHeight;
006940a9      }
00694050  }

006940bc                                                                                      90 90 90 90                              ....

006940c0  void __thiscall UISurfaceObject::SetMaterialColor(class UISurfaceObject* this, class RGBAColor const* arg2)

006940c0  {
006940c0      class RenderMaterial* m_material = this->m_material;
006940c0      
006940d6      if ((m_material != 0 && m_material->m_DID.id == INVALID_DID.id))
006940d6      {
006940db          class MaterialLayer* eax_1 = *(uint32_t*)m_material->layers.m_data;
006940ee          float a = arg2->a;
006940f2          float a_1 = eax_1->m_cDiffuse.a;
006940f8          eax_1->m_cDiffuse.r = arg2->r;
006940f8          eax_1->m_cDiffuse.g = arg2->g;
00694102          float a_2 = a_1;
006940f8          eax_1->m_cDiffuse.b = arg2->b;
006940f8          eax_1->m_cDiffuse.a = a_1;
006940d6      }
006940c0  }

00694114                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00694120  void __thiscall UISurfaceObject::SetMaterialOpacity(class UISurfaceObject* this, float const arg2)

00694120  {
00694120      class RenderMaterial* m_material = this->m_material;
00694120      
00694137      if ((m_material != 0 && m_material->m_DID.id == INVALID_DID.id))
00694137      {
0069413c          class MaterialLayer* eax_1 = *(uint32_t*)m_material->layers.m_data;
00694150          eax_1->m_cDiffuse.r = eax_1->m_cDiffuse.r;
00694155          float a = eax_1->m_cDiffuse.a;
00694150          eax_1->m_cDiffuse.g = eax_1->m_cDiffuse.g;
00694150          eax_1->m_cDiffuse.b = eax_1->m_cDiffuse.b;
00694150          eax_1->m_cDiffuse.a = arg2;
0069416b          float const var_4_1 = arg2;
0069416f          this->m_opacity = arg2;
00694137      }
00694120  }

0069417d                                                                                         90 90 90                               ...

00694180  void __thiscall UISurfaceObject::SetMaterialAlphaEnable(class UISurfaceObject* this, uint8_t const arg2)

00694180  {
00694180      class RenderMaterial* m_material = this->m_material;
00694180      
00694193      if ((m_material != 0 && m_material->m_DID.id == INVALID_DID.id))
00694193      {
00694195          class UISurface* m_surface = this->m_surface;
00694195          
0069419d          if (m_surface != 0)
0069419d          {
0069419f              this = m_surface->m_bHasAlpha;
006941a4              enum TextureOp eax_2;
006941a4              
006941a4              if (this != 0)
006941a4              {
006941a6                  m_surface = arg2;
006941ac                  eax_2 = TEXOP_MODULATE;
006941a4              }
006941a4              
006941b1              if ((this == 0 || m_surface == 0))
006941b3                  eax_2 = TEXOP_SELECTARG2;
006941b3              
006941c0              *(uint32_t*)*(uint32_t*)m_material->layers.m_data->m_Stages.m_data->m_FFAlphaOp = eax_2;
0069419d          }
00694193      }
00694180  }

006941c8                          90 90 90 90 90 90 90 90                                                          ........

006941d0  void __thiscall UISurfaceObject::SetMaterialFiltering(class UISurfaceObject* this, uint8_t const arg2)

006941d0  {
006941d0      class RenderMaterial* m_material = this->m_material;
006941d0      
006941e3      if ((m_material != 0 && m_material->m_DID.id == INVALID_DID.id))
006941e3      {
006941f0          int32_t ebx;
006941f0          ebx = arg2;
006941f8          int32_t eax_2;
006941f8          eax_2 = ebx != 0;
006941ed          *(uint32_t*)*(uint32_t*)m_material->layers.m_data->m_Stages.m_data->m_MinFilterMode = (eax_2 + 1);
00694210          *(uint32_t*)(*(uint32_t*)*(uint32_t*)this->m_material->layers.m_data->m_Stages.m_data + 0x20) = (eax_2 + 1);
006941e3      }
006941d0  }

00694216                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00694220  void __fastcall UISurfaceObject::Render(class UISurfaceObject const* this)

00694220  {
00694227      class UISurface* m_surface = this->m_surface;
0069422f      UISurface::RefreshHardware(m_surface);
0069422f      
00694239      if (m_surface->m_pRemoteTexture == 0)
006943af          return;
006943af      
00694241      SceneTool::StoreMatrices();
00694246      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00694250      int32_t var_34 = 0;
00694258      int32_t var_38 = 0;
00694260      int32_t var_3c = 0;
00694268      int32_t var_24 = 0;
00694270      int32_t var_28 = 0;
00694278      int32_t var_30 = 0;
00694280      int32_t var_14 = 0;
00694288      int32_t var_1c = 0;
00694290      int32_t var_20 = 0;
00694298      int32_t var_8 = 0;
006942a0      int32_t var_c = 0;
006942a8      int32_t var_10 = 0;
006942b0      int32_t var_4 = 0x3f800000;
006942b8      int32_t var_18 = 0x3f800000;
006942c0      int32_t var_2c = 0x3f800000;
006942c8      int32_t var_40 = 0x3f800000;
006942d0      RenderDeviceD3D::SetModelToWorldMatrix(RenderDevice::render_device_1, &this->m_transform);
006942e0      RenderDeviceD3D::SetWorldToViewMatrix(RenderDevice::render_device, &var_40);
006942f0      RenderDeviceD3D::SetViewToClipMatrix(RenderDevice::render_device, &var_40);
00694300      class UISurface* m_surface_1 = this->m_surface;
00694309      class LayerStage* ebx = *(uint32_t*)*(uint32_t*)this->m_material->layers.m_data->m_Stages.m_data;
0069430d      UISurface::RefreshHardware(m_surface_1);
00694318      LayerStage::SetTexture(ebx, m_surface_1->m_pRemoteTexture);
00694325      RenderDeviceD3D::SetMultiSampleAntialias(RenderDevice::render_device, 0);
0069432a      class RenderIndexBuffer* RenderUI::s_pUISurfaceIB_1 = RenderUI::s_pUISurfaceIB;
00694332      RenderIndexBuffer::RecalculateMinMaxIndices(RenderUI::s_pUISurfaceIB_1);
00694337      uint32_t m_nMaxVertexIndex = RenderUI::s_pUISurfaceIB_1->m_nMaxVertexIndex;
0069433c      RenderIndexBuffer::RecalculateMinMaxIndices(RenderUI::s_pUISurfaceIB_1);
00694341      uint32_t m_nMinVertexIndex = RenderUI::s_pUISurfaceIB_1->m_nMinVertexIndex;
00694346      RenderIndexBuffer::RecalculateMinMaxIndices(RenderUI::s_pUISurfaceIB_1);
0069434b      class RenderMaterial* m_material = this->m_material;
00694379      int32_t eax_4;
00694379      int32_t edx_2;
00694379      edx_2 = HIGHD((0xaaaaaaab * RenderUI::s_pUISurfaceIB_1->m_nNumIndices));
00694379      eax_4 = LOWD((0xaaaaaaab * RenderUI::s_pUISurfaceIB_1->m_nNumIndices));
0069438c      RenderVertexBuffer::RenderIndexedUsingMaterial(this->m_surface->m_pVertexBuffer, PRIMTYPE_TRIANGLELIST, 0, (edx_2 >> 1), RenderUI::s_pUISurfaceIB_1->m_nMinVertexIndex, ((m_nMaxVertexIndex - m_nMinVertexIndex) + 1), 0, RenderUI::s_pUISurfaceIB_1, m_material, m_material, RenderPass_Default, &RGBAColor_White, &RGBAColor_Black, 0, 1, nullptr, nullptr, 0);
00694399      RenderDeviceD3D::SetMultiSampleAntialias(RenderDevice::render_device, 1);
006943a5      /* tailcall */
006943a5      return SceneTool::RestoreMatrices();
00694220  }


006943b0  void __fastcall UISurfaceObject::UpdateTransform(class UISurfaceObject* this)

006943b0  {
006943e3      float var_108;
006943e3      int32_t var_104;
006943e3      SurfaceWindow::WindowToClip(&RenderDevice::render_device->m_pFrameBufferSurface->window, this->m_nVirtualX, ((this->m_nVirtualY + this->m_nVirtualHeight) - 1), &var_108, &var_104);
006943e8      long double x87_r7 = ((long double)this->m_nVirtualWidth);
006943e8      
006943f0      if (this->m_nVirtualWidth < 0)
006943f2          x87_r7 = (x87_r7 + ((long double)4.2949673e+09f));
006943f2      
00694408      uint32_t eax_3 = RenderDevice::GetDisplayWidth(RenderDevice::render_device);
00694413      long double x87_r7_2 = ((long double)eax_3);
00694413      
00694417      if (eax_3 < 0)
00694419          x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
00694419      
0069441f      long double x87_r7_3 = (((long double)((float)(x87_r7 - ((long double)0.25f)))) / x87_r7_2);
0069442e      long double x87_r7_5 = ((long double)this->m_nVirtualHeight);
0069442e      
00694431      if (this->m_nVirtualHeight < 0)
00694433          x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
00694433      
00694449      uint32_t eax_5 = RenderDevice::GetDisplayHeight(RenderDevice::render_device);
00694454      long double x87_r7_7 = ((long double)eax_5);
00694454      
00694458      if (eax_5 < 0)
0069445a          x87_r7_7 = (x87_r7_7 + ((long double)4.2949673e+09f));
0069445a      
00694460      long double x87_r7_8 = (((long double)((float)(x87_r7_5 - ((long double)0.25f)))) / x87_r7_7);
0069447d      void var_80;
0069447d      Matrix4::Translate(&var_80, 0.5f, 0.5f, 0f);
0069448a      float eax_6 = var_108;
0069448e      float var_100 = ((float)(x87_r7_3 + x87_r7_3));
00694496      float var_ec = ((float)(x87_r7_8 + x87_r7_8));
0069449e      float var_d0 = eax_6;
006944aa      int32_t var_cc = var_104;
006944b3      int32_t var_f4 = 0;
006944bb      int32_t var_f8 = 0;
006944c3      int32_t var_fc = 0;
006944cb      int32_t var_e4 = 0;
006944d3      int32_t var_e8 = 0;
006944db      int32_t var_f0 = 0;
006944e3      int32_t var_d4 = 0;
006944eb      int32_t var_dc = 0;
006944f3      int32_t var_e0 = 0;
006944fb      int32_t var_c8 = 0;
00694503      int32_t var_c4 = 0x3f800000;
0069450b      int32_t var_d8 = 0x3f800000;
00694513      void var_c0;
00694513      Matrix4::Multiply_C(&var_c0, &var_80, &var_100);
0069452b      void var_40;
0069452b      Matrix4::Multiply_C(&var_40, &this->m_rotMatrix, &var_c0);
00694530      this->vtable->SetTransform(&var_40);
00694530      
00694555      if ((this->m_bTile != 0 && this->m_surface != 0))
00694555      {
0069455b          class RenderMaterial* m_material = this->m_material;
0069455b          
00694563          if (m_material != 0)
00694563          {
00694570              int32_t i = 0;
00694570              
00694574              if (m_material->layers.m_num > 0)
00694574              {
00694683                  do
00694683                  {
00694583                      void* edi_1 = m_material->layers.m_data[i];
00694583                      
0069458b                      if (*(uint32_t*)((char*)edi_1 + 0x30) > 0)
0069458b                      {
00694594                          long double x87_r7_10 = ((long double)this->m_nVirtualWidth);
0069459c                          class LM_UVScale* ebx_1 = **(uint32_t**)((char*)edi_1 + 0x28);
0069459c                          
0069459e                          if (this->m_nVirtualWidth < 0)
006945a0                              x87_r7_10 = (x87_r7_10 + ((long double)4.2949673e+09f));
006945a0                          
006945a6                          class UISurface* m_surface_1 = this->m_surface;
006945af                          long double x87_r6_1 = ((long double)m_surface_1->m_nPhysicalWidth);
006945af                          
006945b4                          if (m_surface_1->m_nPhysicalWidth < 0)
006945b6                              x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
006945b6                          
006945c2                          float var_110_2 = ((float)(x87_r7_10 / x87_r6_1));
006945d3                          LM_UVScale::SetUScale(ebx_1, Waveform::Waveform(&var_c0, var_110_2));
006945d8                          long double x87_r7_12 = ((long double)this->m_nVirtualHeight);
006945d8                          
006945e0                          if (this->m_nVirtualHeight < 0)
006945e2                              x87_r7_12 = (x87_r7_12 + ((long double)4.2949673e+09f));
006945e2                          
006945e8                          class UISurface* m_surface_2 = this->m_surface;
006945f1                          long double x87_r6_2 = ((long double)m_surface_2->m_nPhysicalHeight);
006945f1                          
006945f6                          if (m_surface_2->m_nPhysicalHeight < 0)
006945f8                              x87_r6_2 = (x87_r6_2 + ((long double)4.2949673e+09f));
006945f8                          
00694600                          float var_114_3 = ((float)(x87_r7_12 / x87_r6_2));
00694615                          LM_UVScale::SetVScale(ebx_1, Waveform::Waveform(&var_100, var_114_3));
00694628                          (fabsl((fabsl(((long double)var_110_2)) - ((long double)1f))) - ((long double)0.000199999995f));
00694630                          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00694633                          int32_t eax_16 = 3;
00694633                          
00694638                          if (p_1)
0069463a                              eax_16 = 1;
0069463a                          
00694650                          *(uint32_t*)(**(uint32_t**)((char*)edi_1 + 0x1c) + 0x14) = eax_16;
00694655                          (fabsl((fabsl(((long double)var_114_3)) - ((long double)1f))) - ((long double)0.000199999995f));
0069465d                          bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
00694660                          int32_t eax_17 = 3;
00694660                          
00694665                          if (p_2)
00694667                              eax_17 = 1;
00694667                          
00694671                          *(uint32_t*)(**(uint32_t**)((char*)edi_1 + 0x1c) + 0x18) = eax_17;
0069458b                      }
0069458b                      
00694674                      m_material = this->m_material;
00694680                      i += 1;
00694683                  } while (i < m_material->layers.m_num);
00694574              }
00694563          }
00694555      }
00694555      
0069468c      class UISurface* m_surface = this->m_surface;
0069468c      
006946a0      if ((this->m_nVirtualWidth != m_surface->m_nPhysicalWidth || this->m_nVirtualHeight != m_surface->m_nPhysicalHeight))
006946be          m_surface = 1;
006946a0      else if (Matrix4::AreEqual(&this->m_rotMatrix, (&Matrix4_IdentityMatrix__)) == 0)
006946be          m_surface = 1;
006946b8      else
006946ba          m_surface = 0;
006946ba      
006946c8      if (this->m_surface != 0)
006946c8      {
006946ce          if (m_surface != 0)
006946ce          {
006946d0              this->vtable->SetMaterialFiltering(1);
006946de              return;
006946ce          }
006946ce          
006946df          this->vtable->SetMaterialFiltering(0);
006946c8      }
006943b0  }

006946ee                                            90 90                                                                ..

006946f0  void __thiscall UISurfaceObject::ClipToUISurface(class UISurfaceObject const* this, float const* arg2, float const* arg3, int32_t* arg4, int32_t* arg5)

006946f0  {
00694700      float const eax_1 = *(uint32_t*)arg3;
00694702      float const var_18 = *(uint32_t*)arg2;
00694716      float const var_14 = eax_1;
0069471a      int32_t var_10 = 0;
00694722      void var_c;
00694722      Matrix4::TransformVector_C(&this->m_invTransform, &var_18, &var_c);
0069473d      void var_8;
0069473d      UISurfaceObject::ObjectToUISurface(this, &var_c, &var_8, arg4, arg5);
006946f0  }

00694749                             90 90 90 90 90 90 90                                                           .......

00694750  void IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(class IDClass<_tagDataID,32,0>* this @ ecx) __pure

00694750  {
00694750      return;
00694750  }

00694751                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

00694760  void* __thiscall UIRectangleObject::`scalar deleting destructor'(class UIRectangleObject* this, uint32_t arg2)

00694760  {
00694763      this->vtable = &UIObject::`vftable';
00694763      
00694776      if ((this->m_dirtyRects.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069477c          operator delete[](this->m_dirtyRects.m_data);
0069477c      
00694789      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00694789      
0069478f      if ((arg2 & 1) != 0)
00694792          operator delete(this);
00694792      
0069479d      return this;
00694760  }


006947a0  void __fastcall UISurfaceObject::UISurfaceObject(class UISurfaceObject* this)

006947a0  {
006947a3      UIObject::UIObject(this);
006947a8      this->vtable = 0x8006b0;
006947b0      this->m_surface = nullptr;
006947b6      this->m_material = nullptr;
006947bc      this->m_bTile = 0;
006947c2      this->m_virtualXRot = 0;
006947c8      this->m_virtualYRot = 0;
006947ce      this->m_virtualZRot = 0;
006947d9      this->m_opacity = 1f;
006947df      this->m_transform._14 = 0f;
006947e2      this->m_transform._13 = 0f;
006947e5      this->m_transform._12 = 0f;
006947e8      this->m_transform._24 = 0f;
006947eb      this->m_transform._23 = 0f;
006947ee      this->m_transform._21 = 0f;
006947f1      this->m_transform._34 = 0f;
006947f4      this->m_transform._32 = 0f;
006947f7      this->m_transform._31 = 0f;
006947fa      this->m_transform._43 = 0f;
00694800      this->m_transform._42 = 0f;
00694806      this->m_transform._41 = 0f;
0069480c      this->m_transform._44 = 1f;
00694812      this->m_transform._33 = 1f;
00694815      this->m_transform._22 = 1f;
00694818      this->m_transform._11 = 0x3f800000;
0069481b      this->m_invTransform._14 = 0f;
00694821      this->m_invTransform._13 = 0f;
00694827      this->m_invTransform._12 = 0f;
0069482d      this->m_invTransform._24 = 0f;
00694833      this->m_invTransform._23 = 0f;
00694839      this->m_invTransform._21 = 0f;
0069483f      this->m_invTransform._34 = 0f;
00694845      this->m_invTransform._32 = 0f;
0069484b      this->m_invTransform._31 = 0f;
00694851      this->m_invTransform._43 = 0f;
00694857      this->m_invTransform._42 = 0f;
0069485d      this->m_invTransform._41 = 0f;
00694863      this->m_invTransform._44 = 1f;
00694869      this->m_invTransform._33 = 1f;
0069486f      this->m_invTransform._22 = 1f;
00694875      this->m_invTransform._11 = 0x3f800000;
0069487b      this->m_rotMatrix._14 = 0f;
00694881      this->m_rotMatrix._13 = 0f;
00694887      this->m_rotMatrix._12 = 0f;
0069488d      this->m_rotMatrix._24 = 0f;
00694893      this->m_rotMatrix._23 = 0f;
00694899      this->m_rotMatrix._21 = 0f;
0069489f      this->m_rotMatrix._34 = 0f;
006948a5      this->m_rotMatrix._32 = 0f;
006948ab      this->m_rotMatrix._31 = 0f;
006948b1      this->m_rotMatrix._43 = 0f;
006948b7      this->m_rotMatrix._42 = 0f;
006948bd      this->m_rotMatrix._41 = 0f;
006948c3      this->m_rotMatrix._44 = 1f;
006948c9      this->m_rotMatrix._33 = 1f;
006948cf      this->m_rotMatrix._22 = 1f;
006948d5      this->m_rotMatrix._11 = 0x3f800000;
006947a0  }

006948df                                                                                               90                                 .

006948e0  float __fastcall UISurfaceObject::GetMaterialOpacity(class UISurfaceObject* this)

006948e0  {
006948e6      return ((int32_t)((long double)this->m_opacity));
006948e0  }

006948e7                       90 90 90 90 90 90 90 90 90                                                         .........

006948f0  void __fastcall UISurfaceObject::ForceUpdate(class UISurfaceObject* this)

006948f0  {
006948f0      /* tailcall */
006948f0      return UISurfaceObject::UpdateTransform(this);
006948f0  }

006948f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00694900  void __fastcall UISurfaceObject::~UISurfaceObject(class UISurfaceObject* this)

00694900  {
00694903      class UISurface* m_surface = this->m_surface;
0069490b      this->vtable = 0x8006b0;
0069490b      
00694911      if (m_surface != 0)
00694911      {
00694913          uint32_t m_cRef = m_surface->m_cRef;
00694913          m_surface->m_cRef -= 1;
00694913          
00694916          if (m_cRef == 1)
00694918              m_surface->vtable->__vecDelDtor(1);
00694918          
0069491e          this->m_surface = nullptr;
00694911      }
00694911      
00694928      class RenderMaterial* m_material = this->m_material;
00694928      
00694930      if (m_material != 0)
00694930      {
00694932          m_material->vtable->Release();
00694937          this->m_material = nullptr;
00694930      }
00694930      
00694941      this->vtable = &UIObject::`vftable';
00694941      
00694954      if ((this->m_dirtyRects.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069495a          operator delete[](this->m_dirtyRects.m_data);
0069495a      
00694962      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00694900  }

0069496a                                90 90 90 90 90 90                                                            ......

00694970  void __thiscall UISurfaceObject::SetRotateVals(class UISurfaceObject* this, int32_t arg2, int32_t arg3, int32_t arg4)

00694970  {
00694981      this->m_virtualXRot = arg2;
0069499e      int32_t var_114 = 0x168;
006949a3      this->m_virtualYRot = arg3;
006949a9      this->m_virtualZRot = arg4;
006949c0      void var_100;
006949c0      Matrix4::RotateX(&var_100, ((float)(((long double)(((int64_t)arg2) % 0x168)) * ((long double)0.0174532924f))));
006949cf      int32_t var_114_2 = 0x168;
006949e8      void var_80;
006949e8      Matrix4::RotateY(&var_80, ((float)(((long double)(((int64_t)arg3) % 0x168)) * ((long double)0.0174532924f))));
006949f7      int32_t var_114_4 = 0x168;
00694a0d      void var_c0;
00694a0d      Matrix4::RotateZ(&var_c0, ((float)(((long double)(((int64_t)arg4) % 0x168)) * ((long double)0.0174532924f))));
00694a26      void var_40;
00694a26      Matrix4::Multiply_C(&var_40, &var_100, &var_80);
00694a3e      Matrix4::Multiply_C(&this->m_rotMatrix, &var_40, &var_c0);
00694a45      UISurfaceObject::UpdateTransform(this);
00694970  }

00694a56                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00694a60  void __thiscall UISurfaceObject::SetVirtualScreenPosition(class UISurfaceObject* this, uint32_t const arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5)

00694a60  {
00694a79      UIObject::SetVirtualScreenPosition(this, arg2, arg3, arg4, arg5);
00694a80      UISurfaceObject::UpdateTransform(this);
00694a60  }

00694a89                             90 90 90 90 90 90 90                                                           .......

00694a90  void* __thiscall UISurfaceObject::`scalar deleting destructor'(class UISurfaceObject* this, uint32_t arg2)

00694a90  {
00694a93      UISurfaceObject::~UISurfaceObject(this);
00694a93      
00694a9d      if ((arg2 & 1) != 0)
00694aa0          operator delete(this);
00694aa0      
00694aab      return this;
00694a90  }

00694aae                                            90 90                                                                ..

00694ab0  uint8_t const __thiscall UISurfaceObject::RayTest(class UISurfaceObject const* this, uint32_t const* arg2, uint32_t const* arg3)

00694ab0  {
00694ae0      SurfaceWindow::WindowToClip(&RenderDevice::render_device->m_pFrameBufferSurface->window, *(uint32_t*)arg2, *(uint32_t*)arg3, &arg2, &arg3);
00694ae5      class UISurface* m_surface = this->m_surface;
00694aed      int32_t eax_2;
00694aed      
00694aed      if (m_surface != 0)
00694aed      {
00694b05          int32_t var_8;
00694b05          int32_t var_4;
00694b05          UISurfaceObject::ClipToUISurface(this, &arg2, &arg3, &var_8, &var_4);
00694b0a          eax_2 = var_8;
00694b0a          
00694b10          if (eax_2 >= 0)
00694b10          {
00694b12              int32_t ecx_4 = var_4;
00694b12              
00694b22              if ((ecx_4 >= 0 && (eax_2 <= m_surface->m_nPhysicalWidth && ecx_4 <= m_surface->m_nPhysicalHeight)))
00694b22              {
00694b25                  eax_2 = 1;
00694b2b                  return 1;
00694b22              }
00694b10          }
00694aed      }
00694aed      
00694b2f      eax_2 = 0;
00694b35      return 0;
00694ab0  }

00694b38                                                                          90 90 90 90 90 90 90 90                          ........

00694b40  class RenderMaterial* __fastcall UISurfaceObject::GenerateMaterial(class UISurfaceObject const* this)

00694b40  {
00694b4e      void* eax = operator new(0x4e0);
00694b58      class RenderMaterial* result;
00694b58      
00694b58      if (eax == 0)
00694b67          result = nullptr;
00694b58      else
00694b61          result = RenderMaterial::RenderMaterial(eax);
00694b61      
00694b74      void* eax_2 = operator new(0xd8);
00694b7e      float edi;
00694b7e      
00694b7e      if (eax_2 == 0)
00694b8b          edi = 0f;
00694b7e      else
00694b87          edi = MaterialLayer::MaterialLayer(eax_2);
00694b87      
00694b8f      void* eax_4 = operator new(0x48);
00694b99      float esi;
00694b99      
00694b99      if (eax_4 == 0)
00694ba6          esi = 0f;
00694b99      else
00694ba2          esi = LayerStage::LayerStage(eax_4);
00694ba2      
00694bbe      if ((result != 0 && (edi != 0 && esi != 0)))
00694bbe      {
00694bc4          int32_t ebx;
00694bc4          ebx = this->m_bTile;
00694bce          int32_t eax_7;
00694bce          eax_7 = ebx == 0;
00694be0          *(uint32_t*)(esi + 0x1c) = 1;
00694be3          *(uint32_t*)(esi + 0x20) = 1;
00694be6          *(uint32_t*)(esi + 0x28) = 4;
00694bed          *(uint32_t*)(esi + 0x14) = ((eax_7 * 2) + 1);
00694bf0          *(uint32_t*)(esi + 0x18) = ((eax_7 * 2) + 1);
00694bf8          __builtin_memcpy((esi + 0x2c), "\x02\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00", 0x14);
00694c07          class UISurface* m_surface = this->m_surface;
00694c07          
00694c16          if ((m_surface != 0 && m_surface->m_bHasAlpha != 0))
00694c18              *(uint32_t*)(esi + 0x34) = 4;
00694c18          
00694c1b          *(uint32_t*)(edi + 0x48) = 1;
00694c1e          *(uint32_t*)(edi + 0x34) = 5;
00694c25          *(uint32_t*)(edi + 0x38) = 6;
00694c2c          *(uint32_t*)(edi + 0x40) = 8;
00694c33          *(uint8_t*)(edi + 0x44) = 0;
00694c40          *(uint32_t*)(edi + 0x7c) = RGBAColor_White.r;
00694c48          *(uint32_t*)(edi + 0x80) = RGBAColor_White.g;
00694c51          *(uint32_t*)(edi + 0x84) = RGBAColor_White.b;
00694c5a          *(uint32_t*)(edi + 0x88) = RGBAColor_White.a;
00694c5d          uint32_t eax_10 = *(uint32_t*)(edi + 0x24);
00694c69          float var_30 = esi;
00694c6d          SmartArray<LayerModifier *,1>::InsertOrderedByIndex((edi + 0x1c), &var_30, eax_10);
00694c6d          
00694c88          if ((this->m_bTile == 0 || this->m_surface == 0))
00694c88          {
00694da3          label_694da3:
00694da3              uint32_t m_num = result->layers.m_num;
00694db2              var_30 = edi;
00694db6              SmartArray<LayerModifier *,1>::InsertOrderedByIndex(&result->layers.m_data, &var_30, m_num);
00694dbd              RenderMaterial::Optimize(result);
00694dcb              return result;
00694c88          }
00694c88          
00694c90          void* eax_13 = operator new(0x60);
00694c90          
00694c9a          if (eax_13 != 0)
00694c9a          {
00694ca2              float eax_14 = LM_UVScale::LM_UVScale(eax_13);
00694ca2              
00694cab              if (eax_14 != 0)
00694cab              {
00694cb1                  *(uint32_t*)(eax_14 + 4) = 0;
00694cb8                  long double x87_r7_1 = ((long double)this->m_nVirtualWidth);
00694cb8                  
00694cc0                  if (this->m_nVirtualWidth < 0)
00694cc2                      x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
00694cc2                  
00694cc8                  class UISurface* m_surface_1 = this->m_surface;
00694cd1                  long double x87_r6_1 = ((long double)m_surface_1->m_nPhysicalWidth);
00694cd1                  
00694cd6                  if (m_surface_1->m_nPhysicalWidth < 0)
00694cd8                      x87_r6_1 = (x87_r6_1 + ((long double)4.2949673e+09f));
00694cd8                  
00694ce4                  float var_34_1 = ((float)(x87_r7_1 / x87_r6_1));
00694cf5                  void var_2c;
00694cf5                  LM_UVScale::SetUScale(eax_14, Waveform::Waveform(&var_2c, var_34_1));
00694cfa                  long double x87_r7_3 = ((long double)this->m_nVirtualHeight);
00694cfa                  
00694d02                  if (this->m_nVirtualHeight < 0)
00694d04                      x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
00694d04                  
00694d0a                  class UISurface* m_surface_2 = this->m_surface;
00694d13                  long double x87_r6_2 = ((long double)m_surface_2->m_nPhysicalHeight);
00694d13                  
00694d18                  if (m_surface_2->m_nPhysicalHeight < 0)
00694d1a                      x87_r6_2 = (x87_r6_2 + ((long double)4.2949673e+09f));
00694d1a                  
00694d26                  var_30 = ((float)(x87_r7_3 / x87_r6_2));
00694d37                  LM_UVScale::SetVScale(eax_14, Waveform::Waveform(&var_2c, var_30));
00694d4a                  (fabsl((fabsl(((long double)var_34_1)) - ((long double)1f))) - ((long double)0.000199999995f));
00694d52                  bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00694d55                  int32_t eax_19 = 3;
00694d55                  
00694d5a                  if (p_1)
00694d5c                      eax_19 = 1;
00694d5c                  
00694d61                  long double x87_r7_9 = ((long double)var_30);
00694d65                  *(uint32_t*)(esi + 0x14) = eax_19;
00694d72                  (fabsl((fabsl(x87_r7_9) - ((long double)1f))) - ((long double)0.000199999995f));
00694d7a                  bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x41} */;
00694d7d                  int32_t eax_20 = 3;
00694d7d                  
00694d82                  if (p_2)
00694d84                      eax_20 = 1;
00694d84                  
00694d93                  *(uint32_t*)(esi + 0x18) = eax_20;
00694d96                  var_30 = eax_14;
00694d9a                  SmartArray<LayerModifier *,1>::InsertOrderedByIndex((edi + 0x28), &var_30, 0);
00694cd6                  goto label_694da3;
00694cab              }
00694c9a          }
00694bbe      }
00694bbe      
00694dd5      return 0;
00694b40  }

00694dd6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00694de0  void __thiscall UISurfaceObject::SetMaterial(class UISurfaceObject* this, class IDClass<_tagDataID,32,0> arg2)

00694de0  {
00694de6      class RenderMaterial* m_material = this->m_material;
00694de6      
00694dee      if (m_material != 0)
00694dee      {
00694df0          m_material->vtable->Release();
00694df5          this->m_material = nullptr;
00694dee      }
00694dee      
00694e09      if (arg2 == INVALID_DID.id)
00694e09      {
00694e12          this->m_material = UISurfaceObject::GenerateMaterial(this);
00694e1c          return;
00694e09      }
00694e09      
00694e2c      void var_8;
00694e2c      class DBObj* eax_5 = DBObj::Get(QualifiedDataID::QualifiedDataID(&var_8, arg2, 0x1f));
00694e36      this->m_material = eax_5;
00694e36      
00694e3c      if (eax_5 == 0)
00694e43          this->vtable->SetMaterial(INVALID_DID.id);
00694de0  }

00694e52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00694e60  void __fastcall UIRectangleObject::Render(class UIRectangleObject const* this)

00694e60  {
00694e8a      float var_28;
00694e8a      int32_t var_1c;
00694e8a      SurfaceWindow::WindowToClip(&RenderDevice::render_device->m_pFrameBufferSurface->window, this->m_nVirtualX, this->m_nVirtualY, &var_28, &var_1c);
00694ec1      int32_t var_24;
00694ec1      float var_20;
00694ec1      SurfaceWindow::WindowToClip(&RenderDevice::render_device->m_pFrameBufferSurface->window, ((this->m_nVirtualWidth + this->m_nVirtualX) - 1), ((this->m_nVirtualHeight + this->m_nVirtualY) - 1), &var_20, &var_24);
00694ec6      SceneTool::StoreMatrices();
00694ecb      SceneTool::IdentityMatrices();
00694ed4      int32_t eax_3 = var_1c;
00694ed8      float ecx_8 = var_28;
00694ee0      float var_18 = var_20;
00694ee6      int32_t var_10 = eax_3;
00694ef2      float var_c = ecx_8;
00694efc      int32_t var_14 = 0x3f800000;
00694f04      int32_t var_8 = 0x3f800000;
00694f0c      int32_t var_4 = eax_3;
00694f10      SceneTool::DrawLine(&var_c, &var_18, &this->m_color, 0, 0);
00694f15      float edx_5 = var_28;
00694f23      int32_t var_4_1 = var_24;
00694f2c      var_18 = edx_5;
00694f30      var_c = edx_5;
00694f3e      int32_t var_8_1 = 0x3f800000;
00694f46      int32_t var_14_1 = 0x3f800000;
00694f4e      int32_t var_10_1 = var_1c;
00694f52      SceneTool::DrawLine(&var_18, &var_c, &this->m_color, 0, 0);
00694f5b      int32_t eax_5 = var_24;
00694f5f      float ecx_10 = var_28;
00694f63      var_c = var_20;
00694f6b      int32_t var_8_2 = 0x3f800000;
00694f73      int32_t var_4_2 = eax_5;
00694f77      var_18 = ecx_10;
00694f7b      int32_t var_14_2 = 0x3f800000;
00694f83      int32_t var_10_2 = eax_5;
00694f94      SceneTool::DrawLine(&var_18, &var_c, &this->m_color, 0, 0);
00694f99      float edx_9 = var_20;
00694fa7      int32_t var_4_3 = var_24;
00694fb0      var_18 = edx_9;
00694fb4      var_c = edx_9;
00694fc2      int32_t var_8_3 = 0x3f800000;
00694fca      int32_t var_14_3 = 0x3f800000;
00694fd2      int32_t var_10_3 = var_1c;
00694fd6      SceneTool::DrawLine(&var_18, &var_c, &this->m_color, 0, 0);
00694fe2      /* tailcall */
00694fe2      return SceneTool::RestoreMatrices();
00694e60  }

00694fe7                       90 90 90 90 90 90 90 90 90                                                         .........

00694ff0  void __fastcall UIRectangleObject::UIRectangleObject(class UIRectangleObject* this)

00694ff0  {
00694ff3      UIObject::UIObject(this);
00694ff8      this->vtable = &UIRectangleObject::`vftable';
00695004      this->m_color.r = RGBAColor_White.r;
00695004      this->m_color.g = RGBAColor_White.g;
00695004      this->m_color.b = RGBAColor_White.b;
00695004      this->m_color.a = RGBAColor_White.a;
00694ff0  }

00695028                          90 90 90 90 90 90 90 90                                                          ........

00695030  void __fastcall UIViewportObject::Render(class UIViewportObject const* this)

00695030  {
00695036      class UIRegion* m_pOwner = this->m_pOwner;
00695036      
0069503b      if ((m_pOwner != 0 && CreatureMode::GetObjectByIndex(((char*)m_pOwner + 0x5f0), 0) != 0))
0069503b      {
0069505d          SceneTool::StoreMatrices();
00695062          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00695068          float m_ViewportAspectRatio = RenderDevice::render_device_1->m_ViewportAspectRatio;
0069506e          uint32_t m_viewportHeight = RenderDevice::render_device_1->m_viewportHeight;
00695074          uint32_t m_viewportX = RenderDevice::render_device_1->m_viewportX;
0069507a          uint32_t m_viewportY = RenderDevice::render_device_1->m_viewportY;
00695080          uint32_t m_viewportWidth = RenderDevice::render_device_1->m_viewportWidth;
0069509f          RenderDevice::render_device_1->vtable->SetViewport(this->m_nVirtualX, this->m_nVirtualY, this->m_nVirtualWidth, this->m_nVirtualHeight, 1);
006950a5          RenderDevice::render_device->vtable->Clear(4, 0x834630, 0x3f800000);
006950c0          CreatureMode::Render(((char*)m_pOwner + 0x5f0));
006950c9          RenderDevice::render_device->vtable->SetViewport(m_viewportX, m_viewportY, m_viewportWidth, m_viewportHeight, 0);
006950de          RenderDevice::render_device->m_ViewportAspectRatio = ((float)((long double)m_ViewportAspectRatio));
006950f1          /* tailcall */
006950f1          return SceneTool::RestoreMatrices();
0069503b      }
00695030  }

006950fb                                                                                   90 90 90 90 90                             .....

00695100  void __fastcall UIViewportObject::UIViewportObject(class UIViewportObject* this)

00695100  {
00695103      UIObject::UIObject(this);
00695108      this->vtable = &UIViewportObject::`vftable';
00695100  }

00695112                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00695120  void __fastcall D3DLevelResourceType::D3DLevelResourceType(class D3DLevelResourceType* this)

00695120  {
0069512c      __builtin_memset(this, 0, 0x18);
00695120  }

00695132                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00695140  uint8_t __fastcall RenderTextureD3D::GetSubObjects(class RenderTextureD3D* this)

00695140  {
0069514a      if (DBCache::IsRunTime() == 0)
0069514f          return 1;
0069514f      
00695157      if (Render::m_pRenderer != 0)
00695166          return RenderTexture::GetSubObjects(this) != 0;
00695166      
00695167      class Render* eax_1;
00695167      eax_1 = 0;
0069516a      return 0;
00695140  }

0069516b                                   90 90 90 90 90                                                             .....

00695170  void __fastcall SmartArray<D3DLevelResourceType,1>::Reset(class SmartArray<D3DLevelResourceType,1>* this)

00695170  {
00695176      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0069518a      this->m_num = 0;
0069518a      
0069518d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069518d      {
00695192          operator delete[](this->m_data);
0069519a          this->m_data = 0;
0069519c          this->m_sizeAndDeallocate = 0;
006951a4          return;
0069518d      }
0069518d      
006951a7      if (this->m_data != 0)
006951a7      {
006951a9          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
006951a9          
006951af          if ((i_2 - 1) >= 0)
006951af          {
006951b6              int32_t edx_3 = ((i_2 - 1) * 0x18);
006951b9              int32_t i_1 = i_2;
006951e0              int32_t i;
006951e0              
006951e0              do
006951e0              {
006951cb                  void s;
006951cb                  __builtin_memset(&s, 0, 0x18);
006951cf                  void* edi_2 = (this->m_data + edx_3);
006951da                  edx_3 -= 0x18;
006951dd                  i = i_1;
006951dd                  i_1 -= 1;
006951de                  __builtin_memcpy(edi_2, &s, 0x18);
006951e0              } while (i != 1);
006951af          }
006951a7      }
00695170  }

006951ea                                90 90 90 90 90 90                                                            ......

006951f0  uint8_t __thiscall SmartArray<D3DLevelResourceType,1>::grow(class SmartArray<D3DLevelResourceType,1>* this, uint32_t arg2)

006951f0  {
006951f8      uint32_t esi = arg2;
006951fe      uint32_t eax;
006951fe      
006951fe      if (esi >= this->m_num)
006951fe      {
0069520e          int32_t eax_2;
0069520e          
0069520e          if (esi <= (this->m_sizeAndDeallocate & 0x7fffffff))
0069520e          {
006952a2              eax_2 = 1;
006952a5              return 1;
0069520e          }
0069520e          
00695216          if (esi == 0)
00695216          {
00695218              SmartArray<D3DLevelResourceType,1>::Reset(this);
0069521f              int32_t eax_3;
0069521f              eax_3 = 1;
00695222              return 1;
00695216          }
00695216          
0069522c          eax = operator new[]((esi * 0x18));
0069522c          
00695238          if (eax != 0)
00695238          {
00695243              `vector constructor iterator'(eax, 0x18, esi, D3DLevelResourceType::D3DLevelResourceType);
00695243              
0069524b              if (this->m_data != 0)
0069524b              {
0069524d                  uint32_t m_num = this->m_num;
0069524d                  
00695251                  if ((m_num - 1) >= 0)
00695251                  {
00695256                      eax_2 = ((m_num - 1) * 0x18);
00695259                      int32_t edx_1 = m_num;
00695272                      int32_t i;
00695272                      
00695272                      do
00695272                      {
00695262                          void* esi_2 = (this->m_data + eax_2);
00695264                          int32_t edi_1 = (eax_2 + eax);
0069526c                          eax_2 -= 0x18;
0069526f                          i = edx_1;
0069526f                          edx_1 -= 1;
00695270                          __builtin_memcpy(edi_1, esi_2, 0x18);
00695272                      } while (i != 1);
00695274                      esi = arg2;
00695251                  }
00695251                  
00695288                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069528d                      operator delete[](this->m_data);
0069524b              }
0069524b              
0069529b              this->m_data = eax;
0069529d              this->m_sizeAndDeallocate = (esi | 0x80000000);
006952a2              eax_2 = 1;
006952a5              return 1;
00695238          }
006951fe      }
006951fe      
006952aa      eax = 0;
006952ad      return 0;
006951f0  }


006952b0  void __fastcall RenderTextureD3D::ReleaseD3DSurfaces(class RenderTextureD3D* this)

006952b0  {
006952ba      int32_t i = 0;
006952ba      
006952be      if (this->m_D3DSurfaces.m_num > 0)
006952be      {
006952c2          int32_t* esi_1 = nullptr;
006952c2          
00695303          do
00695303          {
006952d0              int32_t j_1 = 6;
006952f8              int32_t j;
006952f8              
006952f8              do
006952f8              {
006952db                  int32_t* ecx = *(uint32_t*)((char*)esi_1 + this->m_D3DSurfaces.m_data);
006952db                  
006952e0                  if (ecx != 0)
006952e0                  {
006952e4                      *(uint32_t*)(*(uint32_t*)ecx + 0x14)();
006952ed                      *(uint32_t*)((char*)esi_1 + this->m_D3DSurfaces.m_data) = 0;
006952e0                  }
006952e0                  
006952f4                  esi_1 = &esi_1[1];
006952f7                  j = j_1;
006952f7                  j_1 -= 1;
006952f8              } while (j != 1);
00695300              i += 1;
00695303          } while (i < this->m_D3DSurfaces.m_num);
006952be      }
006952be      
0069530f      /* tailcall */
0069530f      return SmartArray<D3DLevelResourceType,1>::Reset(&this->m_D3DSurfaces);
006952b0  }

006952c6                    8d a4 24 00 00 00 00 8d 49 00                                                        ..$.....I.
00695314                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00695320  void __fastcall RenderTextureD3D::ReleaseD3DTexture(class RenderTextureD3D* this)

00695320  {
00695323      RenderTextureD3D::ReleaseD3DSurfaces(this);
00695328      struct IDirect3DTexture9* m_p2DTextureD3D = this->m_p2DTextureD3D;
00695328      
00695330      if (m_p2DTextureD3D != 0)
00695330      {
00695332          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00695332          
0069533a          if (RenderDevice::render_device_1 != 0)
0069533d              RenderDeviceD3D::InvalidateCachedTexturePointer(RenderDevice::render_device_1, m_p2DTextureD3D);
0069533d          
00695342          struct IDirect3DTexture9* m_p2DTextureD3D_1 = this->m_p2DTextureD3D;
00695342          
0069534a          if (m_p2DTextureD3D_1 != 0)
0069534a          {
0069534c              m_p2DTextureD3D_1->vtable->Release(m_p2DTextureD3D_1);
00695352              this->m_p2DTextureD3D = nullptr;
0069534a          }
0069534a          
0069535f          g_nTotalTextureRemoteBytes -= this->m_nResourceSize;
00695330      }
00695330      
00695365      struct IDirect3DCubeTexture9* m_pCubeTextureD3D = this->m_pCubeTextureD3D;
00695365      
0069536d      if (m_pCubeTextureD3D != 0)
0069536d      {
0069536f          class RenderDevice* RenderDevice::render_device_2 = RenderDevice::render_device;
0069536f          
00695377          if (RenderDevice::render_device_2 != 0)
0069537a              RenderDeviceD3D::InvalidateCachedTexturePointer(RenderDevice::render_device_2, m_pCubeTextureD3D);
0069537a          
0069537f          struct IDirect3DCubeTexture9* m_pCubeTextureD3D_1 = this->m_pCubeTextureD3D;
0069537f          
00695387          if (m_pCubeTextureD3D_1 != 0)
00695387          {
00695389              m_pCubeTextureD3D_1->vtable->Release(m_pCubeTextureD3D_1);
0069538f              this->m_pCubeTextureD3D = nullptr;
00695387          }
00695387          
0069539c          g_nTotalTextureRemoteBytes -= this->m_nResourceSize;
0069536d      }
00695320  }

006953a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006953b0  uint8_t __fastcall RenderTextureD3D::PurgeResource(class RenderTextureD3D* this)

006953b0  {
006953b3      uint8_t result = ArgumentParser::OnCommandLineEvaluationDone(this);
006953b3      
006953ba      if (result == 0)
006953bd          return result;
006953bd      
006953c1      RenderTextureD3D::ReleaseD3DTexture(((char*)this - 0x30));
006953c6      int32_t eax;
006953c6      eax = 1;
006953c9      return 1;
006953b0  }

006953ca                                90 90 90 90 90 90                                                            ......

006953d0  uint8_t __thiscall SmartArray<D3DLevelResourceType,1>::SetNElements(class SmartArray<D3DLevelResourceType,1>* this, uint32_t const arg2, uint8_t arg3)

006953d0  {
006953da      uint32_t const i = arg2;
006953e5      uint32_t eax_1;
006953e5      
006953e5      if ((this->m_sizeAndDeallocate & 0x7fffffff) < i)
006953e5      {
006953e7          eax_1 = arg3;
006953ed          uint32_t const i_1;
006953ed          
006953ed          if (eax_1 == 0)
006953f6              i_1 = SmartArray<unsigned long,1>::get_new_size(this, i);
006953ed          else
006953ef              i_1 = i;
006953ef          
006953fe          eax_1 = SmartArray<D3DLevelResourceType,1>::grow(this, i_1);
006953fe          
00695405          if (eax_1 == 0)
0069540c              return eax_1;
006953e5      }
006953e5      else if (i < this->m_num)
00695412      {
00695419          uint32_t edx_2 = (i * 0x18);
00695419          
00695445          do
00695445          {
0069542b              void s;
0069542b              __builtin_memset(&s, 0, 0x18);
0069543a              __builtin_memcpy((this->m_data + edx_2), &s, 0x18);
0069543f              i += 1;
00695440              edx_2 += 0x18;
00695445          } while (i < this->m_num);
00695445          
00695447          i = arg2;
00695412      }
00695412      
0069544d      this->m_num = i;
00695451      eax_1 = 1;
00695457      return 1;
006953d0  }

0069545a                                                                                90 90 90 90 90 90                            ......

00695460  uint8_t __thiscall RenderTextureD3D::CopyInto(class RenderTextureD3D const* this, class DBObj* arg2)

00695460  {
00695460      class RenderTextureD3D* this_1 = this;
00695463      class DBObj* esi = arg2;
0069546a      uint8_t result = RenderTexture::CopyInto(this, esi);
0069546a      
00695471      if (result == 0)
00695476          return result;
00695476      
0069547c      RenderTextureD3D::ReleaseD3DSurfaces(esi);
00695481      uint32_t m_num = this->m_D3DSurfaces.m_num;
00695481      
0069548b      if (m_num != 0)
0069548b      {
00695499          SmartArray<D3DLevelResourceType,1>::SetNElements(((char*)esi + 0xa0), m_num, 1);
006954a4          this_1 = nullptr;
006954a4          
006954a8          if (this->m_D3DSurfaces.m_num > 0)
006954a8          {
006954aa              int32_t* esi_1 = nullptr;
006954aa              
006954e8              do
006954e8              {
006954b0                  int32_t i_1 = 6;
006954d5                  int32_t i;
006954d5                  
006954d5                  do
006954d5                  {
006954c0                      *(uint32_t*)((char*)esi_1 + ((char*)esi + 0xa0)->m_data) = *(uint32_t*)((char*)esi_1 + this->m_D3DSurfaces.m_data);
006954c5                      int32_t* ecx_4 = *(uint32_t*)((char*)esi_1 + ((char*)esi + 0xa0)->m_data);
006954c5                      
006954ca                      if (ecx_4 != 0)
006954ce                          *(uint32_t*)(*(uint32_t*)ecx_4 + 0x10)();
006954ce                      
006954d1                      esi_1 = &esi_1[1];
006954d4                      i = i_1;
006954d4                      i_1 -= 1;
006954d5                  } while (i != 1);
006954e4                  this_1 = (&this_1->vtable + 1);
006954e8              } while ((&this_1->vtable + 1) < this->m_D3DSurfaces.m_num);
006954e8              
006954ea              esi = arg2;
006954a8          }
0069548b      }
0069548b      
006954f1      int32_t eax_4 = *(int32_t*)((char*)esi + 0x30);
006954f4      *(int32_t*)((char*)esi + 0x98) = 0;
006954fa      *(int32_t*)((char*)esi + 0x9c) = 0;
006954fa      
0069550b      if (*(uint32_t*)(eax_4 + 8)() != 0)
0069550f          GraphicsResource::MarkResourceAsLost(&esi[1]);
0069550f      
00695519      return 1;
00695460  }

0069551c                                                                                      90 90 90 90                              ....

00695520  uint8_t __fastcall RenderTextureD3D::ReleaseSubObjects(class RenderTextureD3D* this)

00695520  {
0069552a      if (DBCache::IsRunTime() == 0)
0069552f          return 1;
0069552f      
00695532      RenderTextureD3D::ReleaseD3DTexture(this);
00695544      return RenderTexture::ReleaseSubObjects(this) != 0;
00695520  }

00695545                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00695550  uint8_t __fastcall RenderTextureD3D::CreateD3DTexture(class RenderTextureD3D* this)

00695550  {
0069555d      if (this->m_TextureType == TEXTURETYPE_MOVIE2D)
0069555d      {
006958dd      label_6958dd:
006958dd          int32_t eax;
006958dd          eax = 1;
006958e3          return 1;
0069555d      }
0069555d      
00695568      uint32_t eax_1;
00695568      
00695568      if (this->m_nNumLevels > 0)
00695568      {
0069556e          int32_t var_54_1 = 0;
00695576          RenderTextureD3D::ReleaseD3DSurfaces(this);
00695576          
0069557f          if ((this->m_Flags & 1) != 0)
00695581              var_54_1 = 1;
00695581          
00695589          uint32_t m_Flags = this->m_Flags;
00695593          int32_t var_4c_1 = 0;
00695593          
0069559b          if ((((int8_t)(m_Flags >> 1)) & 1) != 0)
0069559d              var_4c_1 = 2;
0069559d          
006955a7          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
006955a7          
006955b4          if (((m_Flags & 4) != 0 && RenderDevice::render_device_1->m_caps.bAutoGenMipMaps != 0))
006955b6              var_54_1 |= 0x400;
006955b6          
006955c0          if ((m_Flags & 8) != 0)
006955c0          {
006955c2              m_Flags = RenderDevice::render_device_1->m_caps.bDynamicTextures;
006955c2              
006955c7              if (m_Flags != 0)
006955c9                  var_54_1 |= 0x200;
006955c0          }
006955c0          
006955d5          void var_38;
006955d5          AvailableProperty::AvailableProperty(&var_38);
006955e2          PixelFormatDesc::SetFormat(&var_38, this->m_PixelFormat);
006955e7          int32_t var_3c;
006955e7          int32_t ebx_1 = var_3c;
006955eb          uint8_t var_55_1 = 1;
006955eb          
006955f0          while (true)
006955f0          {
006955f0              eax_1 = this->m_TextureType;
006955f3              uint32_t ebp_1 = 0;
006955f8              uint32_t var_40_1 = 0;
006955fc              char var_2c;
006955fc              
006955fc              if (eax_1 == 2)
006955fc              {
00695607                  int32_t* eax_3 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
00695638                  int32_t eax_4 = *(uint32_t*)(*(uint32_t*)eax_3 + 0x5c)(eax_3, this->m_nWidth, this->m_nHeight, this->m_nNumLevels, var_54_1, this->m_PixelFormat, var_4c_1, &this->m_p2DTextureD3D, 0);
0069563b                  uint32_t m_nNumLevels_1 = this->m_nNumLevels;
00695646                  ebx_1 = eax_4;
00695648                  eax_1 = this->m_nWidth;
00695648                  
0069564e                  if (m_nNumLevels_1 > 0)
0069564e                  {
00695659                      uint32_t var_40_2 = m_nNumLevels_1;
0069565d                      uint32_t m_nHeight = this->m_nHeight;
0069567d                      uint32_t i;
0069567d                      
0069567d                      do
0069567d                      {
0069566b                          ebp_1 += (((((uint32_t)var_2c) * m_nHeight) * eax_1) >> 3);
0069566b                          
0069566f                          if (eax_1 > 0)
00695671                              eax_1 u>>= 1;
00695671                          
00695675                          if (m_nHeight > 0)
00695677                              m_nHeight u>>= 1;
00695677                          
00695679                          i = var_40_2;
00695679                          var_40_2 -= 1;
0069567d                      } while (i != 1);
0069567f                      var_40_1 = ebp_1;
0069564e                  }
006955fc              }
006955fc              else if (eax_1 == 4)
00695688              {
0069568f                  int32_t* eax_6 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
006956ba                  int32_t eax_7 = *(uint32_t*)(*(uint32_t*)eax_6 + 0x64)(eax_6, this->m_nEdgeLength, this->m_nNumLevels, var_54_1, this->m_PixelFormat, var_4c_1, &this->m_pCubeTextureD3D, 0);
006956bd                  uint32_t m_nNumLevels = this->m_nNumLevels;
006956c2                  ebx_1 = eax_7;
006956c4                  eax_1 = this->m_nEdgeLength;
006956c4                  
006956ca                  if (m_nNumLevels > 0)
006956ca                  {
006956e5                      uint32_t i_1;
006956e5                      
006956e5                      do
006956e5                      {
006956dc                          ebp_1 += (((((uint32_t)var_2c) * eax_1) * eax_1) >> 3);
006956dc                          
006956e0                          if (eax_1 > 0)
006956e2                              eax_1 u>>= 1;
006956e2                          
006956e4                          i_1 = m_nNumLevels;
006956e4                          m_nNumLevels -= 1;
006956e5                      } while (i_1 != 1);
006956e7                      var_40_1 = ebp_1;
006956ca                  }
00695688              }
00695688              else if (eax_1 != 5)
006956f0                  goto label_6958f5;
006956f0              
006956f8              if (ebx_1 != 0)
006956f8              {
00695700                  if (ebx_1 == 0x8876017c)
00695700                  {
00695702                      eax_1 = var_55_1;
00695702                      
00695708                      if (eax_1 == 0)
00695708                          goto label_6958f5;
00695708                      
00695717                      var_55_1 = GraphicsResource::DiscardResourceBytes(ebp_1);
0069571b                      continue;
00695700                  }
00695700                  else if (ebx_1 < 0)
00695722                      goto label_6958f5;
006956f8              }
006956f8              
0069573a              if ((this->m_p2DTextureD3D == 0 && this->m_pCubeTextureD3D == 0))
0069573a                  break;
0069573a              
0069574e              SmartArray<D3DLevelResourceType,1>::SetNElements(&this->m_D3DSurfaces, this->m_nNumLevels, 1);
00695756              int32_t i_2 = 0;
0069575a              int32_t i_3 = 0;
0069575a              
0069575e              if (this->m_nNumLevels > 0)
0069575e              {
00695764                  int32_t var_44_1 = 0;
00695768                  int32_t var_4c_2 = 0;
00695768                  
006958a6                  do
006958a6                  {
0069577f                      __builtin_memset((this->m_D3DSurfaces.m_data + var_4c_2), 0, 0x18);
00695789                      int32_t ecx_8;
00695789                      ecx_8 = this->m_TextureType != TEXTURETYPE_CUBE;
0069578c                      int32_t j = 0;
00695792                      int32_t ecx_10 = ((ecx_8 - 1) & 5);
00695792                      
0069579a                      if (ecx_10 != 0xffffffff)
0069579a                      {
00695880                          do
00695880                          {
006957a0                              eax_1 = this->m_TextureType;
006957a8                              uint32_t var_50 = 0;
006957a8                              
006957ac                              if (eax_1 != 2)
006957ac                              {
006957c5                                  if (eax_1 != 4)
006957c5                                      goto label_6958f5;
006957c5                                  
006957d0                                  switch (j)
006957d0                                  {
006957d7                                      case 0:
006957d7                                      {
006957d7                                          var_54_1 = 0;
006957d7                                          break;
006957d7                                      }
006957dd                                      case 1:
006957dd                                      {
006957dd                                          var_54_1 = 1;
006957dd                                          break;
006957dd                                      }
006957e7                                      case 2:
006957e7                                      {
006957e7                                          var_54_1 = 2;
006957e7                                          break;
006957e7                                      }
006957f1                                      case 3:
006957f1                                      {
006957f1                                          var_54_1 = 3;
006957f1                                          break;
006957f1                                      }
006957fb                                      case 4:
006957fb                                      {
006957fb                                          var_54_1 = 4;
006957fb                                          break;
006957fb                                      }
00695805                                      case 5:
00695805                                      {
00695805                                          var_54_1 = 5;
00695805                                          break;
00695805                                      }
006957d0                                  }
006957d0                                  
0069580d                                  struct IDirect3DCubeTexture9* m_pCubeTextureD3D = this->m_pCubeTextureD3D;
00695821                                  eax_1 = m_pCubeTextureD3D->vtable->GetCubeMapSurface(m_pCubeTextureD3D, var_54_1, i_2, &var_50);
006957ac                              }
006957ac                              else
006957ac                              {
006957ae                                  struct IDirect3DTexture9* m_p2DTextureD3D = this->m_p2DTextureD3D;
006957bd                                  eax_1 = m_p2DTextureD3D->vtable->GetSurfaceLevel(m_p2DTextureD3D, i_2, &var_50);
006957ac                              }
006957ac                              
00695826                              if (eax_1 < 0)
00695826                                  goto label_6958f5;
00695826                              
00695832                              if (var_50 == 0)
00695832                                  goto label_6958f5;
00695832                              
0069584d                              *(uint32_t*)((this->m_D3DSurfaces.m_data + var_4c_2) + (j << 2)) = RenderDevice::render_device->vtable->CreateSurface();
00695854                              int32_t* ecx_17 = this->m_D3DSurfaces.m_data->m_Resources[(var_44_1 + j)];
00695854                              
00695859                              if (ecx_17 == 0)
00695859                              {
006958e4                                  eax_1 = var_50;
006958e4                                  
006958ea                                  if (eax_1 != 0)
006958ef                                      *(uint32_t*)(*(uint32_t*)eax_1 + 8)(eax_1);
006958ef                                  
006958ea                                  goto label_6958f5;
00695859                              }
00695859                              
0069586f                              if (*(uint32_t*)(*(uint32_t*)ecx_17 + 0x70)(var_50, 0, 0) == 0)
0069586f                                  goto label_6958f5;
0069586f                              
00695879                              i_2 = i_3;
0069587d                              j += 1;
00695880                          } while (j < (ecx_10 + 1));
0069579a                      }
0069579a                      
00695891                      i_2 += 1;
0069589a                      i_3 = i_2;
0069589e                      var_4c_2 += 0x18;
006958a2                      var_44_1 += 6;
006958a6                  } while (i_2 < this->m_nNumLevels);
006958a6                  
006958ac                  ebp_1 = var_40_1;
0069575e              }
0069575e              
006958b0              enum TextureType m_TextureType = this->m_TextureType;
006958b0              
006958b6              if (m_TextureType == TEXTURETYPE_2D)
006958c2                  g_nTotalTextureRemoteBytes += ebp_1;
006958b6              else if ((m_TextureType != TEXTURETYPE_3D && m_TextureType == TEXTURETYPE_CUBE))
006958c2                  g_nTotalTextureRemoteBytes += ebp_1;
006958c2              
006958ce              GraphicsResource::SetResourceSize(&this->vtable, ebp_1);
006958d5              GraphicsResource::MarkResourceAsNotLost(&this->vtable);
006958b6              goto label_6958dd;
006955f0          }
00695568      }
00695568      
006958f5  label_6958f5:
006958f5      eax_1 = 0;
006958fb      return 0;
00695550  }

006958fc  uint32_t jump_table_6958fc[0x6] = 
006958fc  {
006958fc      [0x0] =  0x006957d7
00695900      [0x1] =  0x006957dd
00695904      [0x2] =  0x006957e7
00695908      [0x3] =  0x006957f1
0069590c      [0x4] =  0x006957fb
00695910      [0x5] =  0x00695805
00695914  }

00695914                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00695920  uint8_t __fastcall RenderTextureD3D::RestoreResource(class RenderTextureD3D* this)

00695920  {
00695923      uint8_t eax = GraphicsResource::RestoreResource(this);
00695923      
0069592a      if (eax != 0)
0069592a      {
00695935          if (*(int32_t*)((char*)this + -8) != INVALID_DID.id)
0069593d              eax = *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x54)();
0069593d          
00695942          if ((*(int32_t*)((char*)this + -8) != INVALID_DID.id && eax != 0))
00695957              return 1;
00695957          
0069594e          if (RenderTextureD3D::CreateD3DTexture(((char*)this - 0x30)) != 0)
00695957              return 1;
0069592a      }
0069592a      
00695953      return 0;
00695920  }

00695958                                                                          90 90 90 90 90 90 90 90                          ........

00695960  void __fastcall RenderTextureD3D::Destroy(class RenderTextureD3D* this)

00695960  {
0069596a      if (DBCache::IsRunTime() != 0)
0069596a      {
0069596e          RenderTextureD3D::ReleaseD3DTexture(this);
00695975          RenderTexture::ReleaseSubObjects(this);
0069596a      }
0069596a      
0069597d      GraphicsResource::MarkResourceAsNotLost(&this->vtable);
00695984      RenderTexture::Destroy(this);
0069598f      this->m_p2DTextureD3D = nullptr;
00695999      SmartArray<D3DLevelResourceType,1>::Reset(&this->m_D3DSurfaces);
0069599e      this->m_pCubeTextureD3D = nullptr;
00695960  }

006959aa                                90 90 90 90 90 90                                                            ......

006959b0  struct IDirect3DTexture9* __fastcall RenderTextureD3D::Get2DTextureD3D(class RenderTextureD3D* this)

006959b0  {
006959b8      if ((this->m_bIsLost != 0 && this->vtable->RestoreResource() == 0))
006959ca          return 0;
006959ca      
006959d7      this->m_TimeUsed = (*(uint32_t*)Timer::local_time);
006959da      *(uint32_t*)((char*)this->m_TimeUsed)[4] = *(int32_t*)((char*)Timer::local_time + 4);
006959dd      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
006959dd      
006959e4      if (RenderDevice::render_device_1 != 0)
006959ec          this->m_FrameUsed = RenderDevice::render_device_1->m_nFrameStamp;
006959ec      
006959f7      if (this->m_p2DTextureD3D == 0)
006959fb          RenderTextureD3D::CreateD3DTexture(this);
006959fb      
00695a07      return this->m_p2DTextureD3D;
006959b0  }

00695a08                          90 90 90 90 90 90 90 90                                                          ........

00695a10  struct IDirect3DCubeTexture9* __fastcall RenderTextureD3D::GetCubeTextureD3D(class RenderTextureD3D* this)

00695a10  {
00695a18      if ((this->m_bIsLost != 0 && this->vtable->RestoreResource() == 0))
00695a2a          return 0;
00695a2a      
00695a37      this->m_TimeUsed = (*(uint32_t*)Timer::local_time);
00695a3a      *(uint32_t*)((char*)this->m_TimeUsed)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00695a3d      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00695a3d      
00695a44      if (RenderDevice::render_device_1 != 0)
00695a4c          this->m_FrameUsed = RenderDevice::render_device_1->m_nFrameStamp;
00695a4c      
00695a57      if (this->m_pCubeTextureD3D == 0)
00695a5b          RenderTextureD3D::CreateD3DTexture(this);
00695a5b      
00695a67      return this->m_pCubeTextureD3D;
00695a10  }

00695a68                          90 90 90 90 90 90 90 90                                                          ........

00695a70  void __fastcall RenderTextureD3D::RenderTextureD3D(class RenderTextureD3D* this)

00695a70  {
00695a74      RenderTexture::RenderTexture(this);
00695a81      this->vtable = 0x800898;
00695a87      this->vtable = &RenderTextureD3D::`vftable';
00695a79      this->m_D3DSurfaces.m_data = 0;
00695a79      this->m_D3DSurfaces.m_sizeAndDeallocate = 0;
00695a79      this->m_D3DSurfaces.m_num = 0;
00695a96      this->m_p2DTextureD3D = nullptr;
00695a9c      SmartArray<D3DLevelResourceType,1>::Reset(&this->m_D3DSurfaces);
00695aa1      this->m_pCubeTextureD3D = nullptr;
00695a70  }

00695aac                                      90 90 90 90                                                              ....

00695ab0  void* __thiscall RenderTextureD3D::`vector deleting destructor'(class RenderTextureD3D* this, uint32_t arg2)

00695ab0  {
00695ab3      /* tailcall */
00695ab3      return RenderTextureD3D::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00695ab0  }

00695ab8                                                                          cc cc cc cc cc cc cc cc                          ........

00695ac0  void __fastcall RenderTextureD3D::~RenderTextureD3D(class RenderTextureD3D* this)

00695ac0  {
00695ac7      this->vtable = 0x800898;
00695ac4      this->vtable = &RenderTextureD3D::`vftable';
00695ac4      
00695ada      if (DBCache::IsRunTime() != 0)
00695ada      {
00695ade          RenderTextureD3D::ReleaseD3DTexture(this);
00695ae5          RenderTexture::ReleaseSubObjects(this);
00695ada      }
00695ada      
00695aec      GraphicsResource::MarkResourceAsNotLost(&this->vtable);
00695aec      
00695b01      if ((this->m_D3DSurfaces.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00695b0a          operator delete[](this->m_D3DSurfaces.m_data);
00695b0a      
00695b14      this->vtable = 0x79b1a8;
00695ac4      this->vtable = &RenderTexture::`vftable';
00695b20      RenderTexture::End(this);
00695b28      SmartArray<DBLevelInfo,1>::~SmartArray<DBLevelInfo,1>(&this->m_SourceLevels);
00695b2f      GraphicsResource::~GraphicsResource(&this->vtable);
00695b38      /* tailcall */
00695b38      return DBObj::~DBObj(this);
00695ac0  }

00695b3d                                                                                         90 90 90                               ...

00695b40  class GraphicsResource* __thiscall RenderTextureD3D::GetLevelRef(class RenderTextureD3D* this, uint32_t const arg2, uint32_t const arg3)

00695b40  {
00695b43      enum TextureType m_TextureType = this->m_TextureType;
00695b4a      int32_t* edi_2;
00695b4a      
00695b4a      if (m_TextureType == TEXTURETYPE_2D)
00695b4a      {
00695b5f          if ((RenderTextureD3D::Get2DTextureD3D(this) != 0 && arg2 < this->m_D3DSurfaces.m_num))
00695b5f          {
00695b71              edi_2 = ((arg3 + (arg2 * 6)) << 2);
00695b74              int32_t* ecx_1 = *(uint32_t*)((char*)edi_2 + this->m_D3DSurfaces.m_data);
00695b74              
00695b79              if (ecx_1 != 0)
00695b79              {
00695b7d                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x10)();
00695b88              label_695b88:
00695b88                  int32_t esi_3 = *(uint32_t*)(this->m_D3DSurfaces.m_data + edi_2);
00695b88                  
00695b8c                  if (esi_3 != 0)
00695b93                      return (esi_3 + 0x30);
00695b79              }
00695b5f          }
00695b4a      }
00695b4a      else if ((m_TextureType == TEXTURETYPE_CUBE && (RenderTextureD3D::GetCubeTextureD3D(this) != 0 && arg2 < this->m_D3DSurfaces.m_num)))
00695b99      {
00695bc2          edi_2 = ((arg3 + (arg2 * 6)) << 2);
00695bc5          int32_t* ecx_4 = *(uint32_t*)((char*)edi_2 + this->m_D3DSurfaces.m_data);
00695bc5          
00695bca          if (ecx_4 != 0)
00695bca          {
00695bce              *(uint32_t*)(*(uint32_t*)ecx_4 + 0x10)();
00695bd1              goto label_695b88;
00695bca          }
00695b99      }
00695bd7      return 0;
00695b40  }

00695bda                                                                                90 90 90 90 90 90                            ......

00695be0  uint8_t __thiscall RenderTextureD3D::LoadTexture(class RenderTextureD3D* this, class RenderTexture const* arg2)

00695be0  {
00695bf9      struct IDirect3DCubeTexture9* m_TextureType;
00695bf9      
00695bf9      if ((((arg2->m_Flags >> 1) & 1) != 0 && (((int8_t)(this->m_Flags >> 1)) & 1) == 0))
00695bf9      {
00695bfb          m_TextureType = this->m_TextureType;
00695bfb          
00695c01          if (m_TextureType == arg2->m_TextureType)
00695c01          {
00695c0b              struct IDirect3DCubeTexture9* edi_1;
00695c0b              
00695c0b              if ((m_TextureType == 2 || m_TextureType == 5))
00695c0b              {
00695c30                  edi_1 = RenderTextureD3D::Get2DTextureD3D(arg2);
00695c30                  
00695c34                  if (edi_1 != 0)
00695c34                  {
00695c38                      m_TextureType = RenderTextureD3D::Get2DTextureD3D(this);
00695c3d                  label_695c3d:
00695c3d                      
00695c3f                      if (m_TextureType != 0)
00695c3f                      {
00695c47                          int32_t* ecx_4 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
00695c47                          
00695c57                          if (*(uint32_t*)(*(uint32_t*)ecx_4 + 0x7c)(ecx_4, edi_1, m_TextureType) >= 0)
00695c57                          {
00695c5a                              m_TextureType = 1;
00695c5d                              return 1;
00695c57                          }
00695c3f                      }
00695c34                  }
00695c0b              }
00695c0b              else
00695c0b              {
00695c10                  if (m_TextureType == 3)
00695c10                  {
00695c5a                      m_TextureType = 1;
00695c5d                      return 1;
00695c10                  }
00695c10                  
00695c15                  if (m_TextureType == 4)
00695c15                  {
00695c1c                      edi_1 = RenderTextureD3D::GetCubeTextureD3D(arg2);
00695c1c                      
00695c20                      if (edi_1 != 0)
00695c20                      {
00695c24                          m_TextureType = RenderTextureD3D::GetCubeTextureD3D(this);
00695c29                          goto label_695c3d;
00695c20                      }
00695c15                  }
00695c0b              }
00695c01          }
00695bf9      }
00695bf9      
00695c61      m_TextureType = 0;
00695c64      return 0;
00695be0  }

00695c67                       90 90 90 90 90 90 90 90 90                                                         .........

00695c70  void* __thiscall RenderTextureD3D::`scalar deleting destructor'(class RenderTextureD3D* this, uint32_t arg2)

00695c70  {
00695c73      RenderTextureD3D::~RenderTextureD3D(this);
00695c73      
00695c7d      if ((arg2 & 1) != 0)
00695c80          operator delete(this);
00695c80      
00695c8b      return this;
00695c70  }

00695c8e                                            90 90                                                                ..

00695c90  uint8_t __thiscall RenderSurfaceD3D::CreateFromD3DSurface(class RenderSurfaceD3D* this, struct IDirect3DSurface9* arg2, uint8_t const arg3, uint8_t const arg4)

00695c90  {
00695c9d      if (arg2 != 0)
00695c9d      {
00695cab          enum PixelFormatID var_20;
00695ca3          arg2->vtable->GetDesc(arg2, &var_20);
00695cc8          uint32_t var_8;
00695cc8          uint32_t var_4;
00695cc8          
00695cc8          if (RenderSurface::Create(this, var_8, var_4, var_20, 0) != 0)
00695cc8          {
00695cdf              uint32_t eax_6 = (((((uint32_t)this->pfDesc.bitsPerPixel) * this->height) * this->width) >> 3);
00695ce6              this->m_pD3DSurface = arg2;
00695cec              this->size = eax_6;
00695cf2              GraphicsResource::SetResourceSize(&this->vtable, eax_6);
00695cf7              uint32_t eax_7;
00695cf7              eax_7 = arg4;
00695d01              this->m_CountAsSystemMemory = arg3;
00695d07              this->m_CountAsVideoMemory = eax_7;
00695d07              
00695d0d              if (eax_7 != 0)
00695d15                  g_nTotalSurfaceRemoteBytes += this->size;
00695d15              
00695d1c              eax_7 = 1;
00695d22              return 1;
00695cc8          }
00695c9d      }
00695c9d      
00695d2c      return 0;
00695c90  }

00695d2f                                               90                                                                 .

00695d30  struct IDirect3DSurface9* __fastcall RenderSurfaceD3D::GetDirect3DSurface(class RenderSurfaceD3D* this)

00695d30  {
00695d38      if ((this->m_bIsLost != 0 && this->vtable->RestoreResource() == 0))
00695d4a          return 0;
00695d4a      
00695d57      this->m_TimeUsed = (*(uint32_t*)Timer::local_time);
00695d5a      *(uint32_t*)((char*)this->m_TimeUsed)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00695d5d      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00695d5d      
00695d64      if (RenderDevice::render_device_1 != 0)
00695d6c          this->m_FrameUsed = RenderDevice::render_device_1->m_nFrameStamp;
00695d6c      
00695d76      return this->m_pD3DSurface;
00695d30  }

00695d77                                                                       90 90 90 90 90 90 90 90 90                         .........

00695d80  uint8_t __thiscall RenderSurfaceD3D::Convert(class RenderSurfaceD3D* this, class RenderSurface const* arg2)

00695d80  {
00695d99      if ((this->m_pSurfaceBits != 0 || arg2->m_pSurfaceBits != 0))
00695dcf          return RenderSurface::Convert(this, arg2);
00695dcf      
00695d9b      int32_t var_8 = 0;
00695d9d      int32_t var_c = 2;
00695da3      struct IDirect3DSurface9* eax_2 = RenderSurfaceD3D::GetDirect3DSurface(arg2);
00695db5      _D3DXLoadSurfaceFromSurface@32(RenderSurfaceD3D::GetDirect3DSurface(this), nullptr, nullptr, eax_2, 0, 0);
00695dbc      this->m_IsDirty = 1;
00695dc3      return 1;
00695d80  }

00695dd2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00695de0  uint8_t __fastcall RenderSurfaceD3D::CreateD3DSurface(class RenderSurfaceD3D* this)

00695de0  {
00695deb      uint32_t eax;
00695deb      
00695deb      if (this->m_pSurfaceBits == 0)
00695deb      {
00695df2          int32_t* eax_2 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
00695e20          *(uint32_t*)(*(uint32_t*)eax_2 + 0x90)(eax_2, this->width, this->height, this->pfDesc.format, this->m_pool, &this->m_pD3DSurface, 0);
00695e3b          uint32_t eax_6 = (((((uint32_t)this->pfDesc.bitsPerPixel) * this->height) * this->width) >> 3);
00695e42          this->size = eax_6;
00695e48          GraphicsResource::SetResourceSize(&this->vtable, eax_6);
00695e4d          eax = this->m_CountAsVideoMemory;
00695e4d          
00695e55          if (eax != 0)
00695e5d              g_nTotalSurfaceRemoteBytes += this->size;
00695deb      }
00695deb      
00695e66      GraphicsResource::MarkResourceAsNotLost(&this->vtable);
00695e6b      eax = 1;
00695e6e      return 1;
00695de0  }

00695e6f                                               90                                                                 .

00695e70  uint8_t __fastcall RenderSurfaceD3D::PurgeResource(class RenderSurfaceD3D* this)

00695e70  {
00695e73      uint8_t result = ArgumentParser::OnCommandLineEvaluationDone(this);
00695e73      
00695e7a      if (result == 0)
00695e7d          return result;
00695e7d      
00695e86      uint32_t greenBitMask;
00695e86      
00695e86      if (this->pfDesc.fourCC == 0)
00695e86      {
00695e88          greenBitMask = this->pfDesc.greenBitMask;
00695e88          
00695e90          if (greenBitMask != 0)
00695e90          {
00695e95              *(uint32_t*)(*(uint32_t*)greenBitMask + 8)(greenBitMask);
00695e98              greenBitMask = *(uint8_t*)((char*)this->pfDesc.alphaBitMask)[1];
00695ea0              this->pfDesc.greenBitMask = 0;
00695ea0              
00695eaa              if (greenBitMask != 0)
00695eaf                  g_nTotalSurfaceRemoteBytes -= this->m_pMaintainer;
00695e90          }
00695e86      }
00695e86      
00695eb5      greenBitMask = 1;
00695eb8      return 1;
00695e70  }

00695eb9                                                                             90 90 90 90 90 90 90                           .......

00695ec0  void __fastcall RenderSurfaceD3D::RenderSurfaceD3D(class RenderSurfaceD3D* this)

00695ec0  {
00695ec3      RenderSurface::RenderSurface(this);
00695eca      this->m_pD3DSurface = nullptr;
00695ed0      this->m_CountAsSystemMemory = 0;
00695ed6      this->m_CountAsVideoMemory = 0;
00695edc      this->vtable = 0x800918;
00695ee2      this->vtable = &RenderSurfaceD3D::`vftable';
00695ee9      this->m_pool = D3DPOOL_SCRATCH;
00695ec0  }

00695ef7                                                                       90 90 90 90 90 90 90 90 90                         .........

00695f00  void* __thiscall RenderSurfaceD3D::`vector deleting destructor'(class RenderSurfaceD3D* this, uint32_t arg2)

00695f00  {
00695f03      /* tailcall */
00695f03      return RenderSurfaceD3D::`scalar deleting destructor'(((char*)this - 0x30), arg2);
00695f00  }

00695f08                          cc cc cc cc cc cc cc cc                                                          ........

00695f10  uint8_t __thiscall RenderSurfaceD3D::Create(class RenderSurfaceD3D* this, uint32_t arg2, uint32_t arg3, enum PixelFormatID arg4, uint8_t arg5)

00695f10  {
00695f2d      if (RenderSurface::Create(this, arg2, arg3, arg4, 0) != 0)
00695f2d      {
00695f2f          void* m_pSurfaceBits = this->m_pSurfaceBits;
00695f35          bool cond:0_1 = m_pSurfaceBits == 0;
00695f35          
00695f37          if (m_pSurfaceBits != 0)
00695f37              goto label_695f79;
00695f37          
00695f42          if (RenderSurfaceD3D::CreateD3DSurface(this) != 0)
00695f42          {
00695f5f              uint32_t eax_4 = (((((uint32_t)this->pfDesc.bitsPerPixel) * this->height) * this->width) >> 3);
00695f66              this->size = eax_4;
00695f6c              GraphicsResource::SetResourceSize(&this->vtable, eax_4);
00695f77              cond:0_1 = this->m_pSurfaceBits == 0;
00695f79          label_695f79:
00695f79              m_pSurfaceBits = cond:0_1;
00695f7c              this->m_CountAsSystemMemory = m_pSurfaceBits;
00695f82              this->m_CountAsVideoMemory = 0;
00695f89              m_pSurfaceBits = 1;
00695f8c              return 1;
00695f42          }
00695f2d      }
00695f2d      
00695f47      return 0;
00695f10  }

00695f8f                                               90                                                                 .

00695f90  void __fastcall RenderSurfaceD3D::Destroy(class RenderSurfaceD3D* this)

00695f90  {
00695f9e      if (this->m_pSurfaceBits == 0)
00695f9e      {
00695fa0          struct IDirect3DSurface9* m_pD3DSurface = this->m_pD3DSurface;
00695fa0          
00695fa8          if (m_pD3DSurface != 0)
00695fa8          {
00695faa              m_pD3DSurface->vtable->Release(m_pD3DSurface);
00695fb0              bool cond:0_1 = this->m_CountAsVideoMemory == 0;
00695fb6              this->m_pD3DSurface = nullptr;
00695fb6              
00695fbc              if (!(cond:0_1))
00695fc1                  g_nTotalSurfaceRemoteBytes -= this->m_nResourceSize;
00695fa8          }
00695f9e      }
00695f9e      
00695fca      GraphicsResource::MarkResourceAsNotLost(&this->vtable);
00695fd1      RenderSurface::Destroy(this);
00695fd6      this->m_pD3DSurface = nullptr;
00695fdc      this->m_CountAsSystemMemory = 0;
00695fe2      this->m_CountAsVideoMemory = 0;
00695f90  }

00695feb                                   90 90 90 90 90                                                             .....

00695ff0  uint8_t __thiscall RenderSurfaceD3D::Lock(class RenderSurfaceD3D* this, struct tagRECT const* arg2, uint32_t const arg3, int32_t* arg4, void** arg5)

00695ff0  {
00695ffe      if ((this->m_pSurfaceBits == 0 && RenderSurfaceD3D::GetDirect3DSurface(this) == 0))
00695ffe      {
00696009          struct IDirect3DSurface9* eax_1;
00696009          eax_1 = 0;
0069600f          return 0;
00695ffe      }
00695ffe      
0069602b      uint8_t result = RenderSurface::Lock(this, arg2, arg3, arg4, arg5);
0069602b      
00696032      if (result == 0)
0069603b          return result;
0069603b      
00696046      void* eax_3;
00696046      
00696046      if (this->m_pSurfaceBits == 0)
00696046      {
00696048          eax_3 = arg3;
0069604e          int32_t ecx_1 = 0x800;
0069604e          
00696053          if ((eax_3 & 2) != 0)
00696055              ecx_1 = 0x810;
00696055          
0069605c          if ((eax_3 & 4) != 0)
0069605e              ecx_1 |= 0x8000;
0069605e          
00696064          struct IDirect3DSurface9* m_pD3DSurface = this->m_pD3DSurface;
00696074          int32_t var_8;
0069606a          m_pD3DSurface->vtable->LockRect(m_pD3DSurface, &var_8, arg2, ecx_1);
0069607f          *(uint32_t*)arg4 = var_8;
00696082          void* var_4;
00696082          *(uint32_t*)arg5 = var_4;
00696046      }
00696046      
00696087      eax_3 = 1;
0069608d      return 1;
00695ff0  }


00696090  void __fastcall RenderSurfaceD3D::Unlock(class RenderSurfaceD3D* this)

00696090  {
0069609b      if (this->m_pSurfaceBits == 0)
0069609b      {
006960a4          if (RenderSurfaceD3D::GetDirect3DSurface(this) == 0)
006960bb              return;
006960bb          
006960a6          struct IDirect3DSurface9* m_pD3DSurface = this->m_pD3DSurface;
006960ac          m_pD3DSurface->vtable->UnlockRect(m_pD3DSurface);
0069609b      }
0069609b      
006960b5      /* tailcall */
006960b5      return RenderSurface::Unlock(this);
00696090  }

006960bc                                                                                      90 90 90 90                              ....

006960c0  uint8_t __fastcall RenderSurfaceD3D::RestoreResource(class RenderSurfaceD3D* this)

006960c0  {
006960c3      uint32_t eax = GraphicsResource::RestoreResource(this);
006960c3      
006960ca      if (eax != 0)
006960ca      {
006960d4          if (this->pfDesc.fourCC != 0)
006960d4          {
006960fe              eax = 1;
00696101              return 1;
006960d4          }
006960d4          
006960df          if (*(int32_t*)((char*)this + -8) != INVALID_DID.id)
006960e7              eax = *(uint32_t*)(*(int32_t*)((char*)this + -0x30) + 0x54)();
006960e7          
006960ec          if ((*(int32_t*)((char*)this + -8) != INVALID_DID.id && eax != 0))
006960ec          {
006960fe              eax = 1;
00696101              return 1;
006960ec          }
006960ec          
006960f8          if (RenderSurfaceD3D::CreateD3DSurface(((char*)this - 0x30)) != 0)
006960f8          {
006960fe              eax = 1;
00696101              return 1;
006960f8          }
006960ca      }
006960ca      
006960fa      eax = 0;
006960fd      return 0;
006960c0  }

00696102        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00696110  void __fastcall RenderSurfaceD3D::~RenderSurfaceD3D(class RenderSurfaceD3D* this)

00696110  {
00696119      bool cond:0 = this->m_pSurfaceBits != 0;
0069611f      this->vtable = 0x800918;
0069611c      this->vtable = &RenderSurfaceD3D::`vftable';
0069611c      
0069612b      if (!(cond:0))
0069612b      {
0069612d          struct IDirect3DSurface9* m_pD3DSurface = this->m_pD3DSurface;
0069612d          
00696135          if (m_pD3DSurface != 0)
00696135          {
00696137              m_pD3DSurface->vtable->Release(m_pD3DSurface);
00696143              bool cond:1_1 = this->m_CountAsVideoMemory == 0;
00696145              this->m_pD3DSurface = nullptr;
00696145              
0069614f              if (!(cond:1_1))
00696154                  g_nTotalSurfaceRemoteBytes -= this->m_nResourceSize;
00696135          }
0069612b      }
0069612b      
0069615c      GraphicsResource::MarkResourceAsNotLost(&this->vtable);
00696165      /* tailcall */
00696165      return RenderSurface::~RenderSurface(this);
00696110  }

0069616a                                90 90 90 90 90 90                                                            ......

00696170  void* __thiscall RenderSurfaceD3D::`scalar deleting destructor'(class RenderSurfaceD3D* this, uint32_t arg2)

00696170  {
00696173      RenderSurfaceD3D::~RenderSurfaceD3D(this);
00696173      
0069617d      if ((arg2 & 1) != 0)
00696180          operator delete(this);
00696180      
0069618b      return this;
00696170  }

0069618e                                            90 90                                                                ..

00696190  void __fastcall TextureBasedFont::BeginRenderingText(class TextureBasedFont* this)

00696190  {
00696192      g_FontVertices.m_num = 0;
00696197      this->m_IsReadyToRender = 1;
0069619b      this->m_QueuedTextUsesScaling = 0;
00696190  }

0069619f                                                                                               90                                 .

006961a0  uint32_t __stdcall SmartArray<unsigned long,1>::get_new_size(class SmartArray<unsigned long,1> const* this @ ecx, uint32_t arg2)

006961a0  {
006961a0      class SmartArray<unsigned long,1>* this_1 = this;
006961a1      uint32_t result = arg2;
006961a1      
006961a8      if (result <= 8)
006961b0          return 8;
006961b0      
006961b8      if (result <= 0x4000)
006961b8      {
006961da          int32_t eflags_1;
006961da          char eax_3;
006961da          eax_3 = __bsr_gprv_memv(result);
006961e1          result = arg2;
006961ea          int32_t edx_2 = (1 << eax_3);
006961ea          
006961ee          if (result > edx_2)
006961f0              return (edx_2 * 2);
006961b8      }
006961b8      else
006961b8      {
006961bc          int32_t ecx_2 = (result & 0x3fff);
006961bc          
006961c2          if (ecx_2 != 0)
006961ce              return (result + (0x4000 - ecx_2));
006961b8      }
006961b8      
006961f4      return result;
006961a0  }

006961f7                                                                       90 90 90 90 90 90 90 90 90                         .........

00696200  void __fastcall SmartArray<TextureBasedFontVertexType,1>::Reset(class SmartArray<TextureBasedFontVertexType,1>* this)

00696200  {
00696206      uint32_t m_sizeAndDeallocate = this->m_sizeAndDeallocate;
0069621a      this->m_num = 0;
0069621a      
0069621d      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069621d      {
00696222          operator delete[](this->m_data);
0069622a          this->m_data = 0;
0069622c          this->m_sizeAndDeallocate = 0;
00696234          return;
0069621d      }
0069621d      
00696237      if (this->m_data != 0)
00696237      {
00696239          int32_t i_2 = (m_sizeAndDeallocate & 0x7fffffff);
00696239          
00696241          if ((i_2 - 1) >= 0)
00696241          {
00696249              void var_18;
00696249              int32_t eax_1 = Vector3::Vector3(&var_18);
00696251              int32_t edx_3 = ((i_2 - 1) * 0x18);
00696254              int32_t i_1 = i_2;
00696268              int32_t i;
00696268              
00696268              do
00696268              {
00696259                  void* edi_2 = (this->m_data + edx_3);
00696262                  edx_3 -= 0x18;
00696265                  i = i_1;
00696265                  i_1 -= 1;
00696266                  __builtin_memcpy(edi_2, eax_1, 0x18);
00696268              } while (i != 1);
00696241          }
00696237      }
00696200  }

00696272                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

00696280  uint8_t __fastcall TextureBasedFont::SetupFontTexture(class TextureBasedFont* this)

00696280  {
00696292      class Font* ebx = FontMapper::GetFontByDataID(this->m_SourceFontDID.id);
0069629b      class Font* var_28 = ebx;
0069629f      class Font* eax_1;
0069629f      
0069629f      if (ebx != 0)
0069629f      {
006962a5          uint16_t minUnicodeChar = ebx->minUnicodeChar;
006962ad          this->m_FirstUnicodeCharacter = minUnicodeChar;
006962b1          eax_1 = ebx->maxUnicodeChar;
006962b5          this->m_LastUnicodeCharacter = eax_1;
006962b5          
006962c7          if ((minUnicodeChar <= 0x20 && eax_1 >= 0x7f))
006962c7          {
006962d1              if (minUnicodeChar < 0x20)
006962d3                  this->m_FirstUnicodeCharacter = 0x20;
006962d3              
006962dd              if (this->m_LastUnicodeCharacter > 0x7f)
006962df                  this->m_LastUnicodeCharacter = 0x7f;
006962df              
006962f1              uint32_t esi_3 = ((((uint32_t)this->m_LastUnicodeCharacter) - ((uint32_t)this->m_FirstUnicodeCharacter)) + 1);
006962f2              operator delete[](this->m_Characters.m_data);
006962fd              this->m_Characters.m_data = 0;
00696300              this->m_Characters.m_num = 0;
00696304              this->m_Characters.m_num = esi_3;
0069630c              this->m_Characters.m_data = operator new[]((esi_3 * 0x18));
0069631d              class Font* ebp_1 = RenderDevice::render_device->vtable->CreateTexture();
00696321              class Font* var_1c_1 = ebp_1;
00696321              
00696325              if (ebp_1 != 0)
00696325              {
00696347                  if (*(int32_t*)((char*)ebp_1->vtable + 0x58)(0x100, 0x100, 1, 0x15, 2) == 0)
00696347                  {
00696349                      ebp_1->vtable->Release();
00696352                      int32_t eax_6;
00696352                      eax_6 = 0;
00696358                      return 0;
00696347                  }
00696347                  
00696360                  void* eax_8 = *(int32_t*)((char*)ebp_1->vtable + 0x64)(0, 0);
00696365                  int32_t* esi_4;
00696365                  
00696365                  if (eax_8 != 0)
00696367                      esi_4 = ((char*)eax_8 - 0x30);
00696367                  
00696370                  if ((eax_8 == 0 || esi_4 == 0))
00696370                  {
00696372                      ebp_1->vtable->Release();
0069637d                      int32_t eax_9;
0069637d                      eax_9 = 0;
00696383                      return 0;
00696370                  }
00696370                  
0069638f                  int32_t var_10 = 0x3f800000;
00696397                  int32_t var_c_1 = 0x3f800000;
0069639f                  int32_t var_8_1 = 0x3f800000;
006963a7                  int32_t var_4_1 = 0;
006963af                  SurfaceWindow::Fill(&esi_4[0x2b], &var_10);
006963b7                  bool cond:5_1 = this->m_VerticalSpacing != 0;
006963b9                  uint32_t maxCharHeight = ebx->maxCharHeight;
006963bc                  this->m_MaxCharacterHeight = maxCharHeight;
006963bc                  
006963bf                  if (!(cond:5_1))
006963c1                      this->m_VerticalSpacing = maxCharHeight;
006963c1                  
006963c9                  if (this->m_HorizontalSpacing == 0)
006963c9                  {
006963cb                      uint32_t m_FirstUnicodeCharacter_1 = ((uint32_t)this->m_FirstUnicodeCharacter);
006963d3                      bool cond:6_1 = m_FirstUnicodeCharacter_1 > ((uint32_t)this->m_LastUnicodeCharacter);
006963d5                      this->m_HorizontalSpacing = 0;
006963d5                      
006963dc                      if (!(cond:6_1))
006963dc                      {
006963fc                          do
006963fc                          {
006963eb                              uint32_t eax_12 = ((uint32_t)Font::GetCharWidthA(ebx, m_FirstUnicodeCharacter_1));
006963eb                              
006963f0                              if (eax_12 > this->m_HorizontalSpacing)
006963f2                                  this->m_HorizontalSpacing = eax_12;
006963f2                              
006963f9                              m_FirstUnicodeCharacter_1 += 1;
006963fc                          } while (m_FirstUnicodeCharacter_1 <= ((uint32_t)this->m_LastUnicodeCharacter));
006963dc                      }
006963dc                      
006963fe                      ebp_1 = var_1c_1;
006963c9                  }
006963c9                  
00696411                  if ((SurfaceWindow::Lock(&esi_4[0x2b], 0) != 0 && Font::LockSurfaces(ebx) != 0))
00696411                  {
00696426                      uint32_t m_FirstUnicodeCharacter = ((uint32_t)this->m_FirstUnicodeCharacter);
00696430                      int32_t ebp_2 = 0;
00696434                      int32_t var_30 = 0;
00696438                      bool var_32 = true;
0069643d                      uint32_t m_FirstUnicodeCharacter_2 = m_FirstUnicodeCharacter;
0069643d                      
00696441                      if (m_FirstUnicodeCharacter <= ((uint32_t)this->m_LastUnicodeCharacter))
00696441                      {
00696447                          int32_t var_24_1 = 0;
00696447                          
00696454                          while (true)
00696454                          {
00696454                              void* esi_6 = (this->m_Characters.m_data + var_24_1);
00696460                              class FontCharDesc* ebx_1 = Font::GetCharDesc(ebx, m_FirstUnicodeCharacter);
00696462                              class FontCharDesc* eax_15;
00696462                              eax_15 = ebx_1->m_Width;
00696469                              uint32_t eax_16 = ((uint32_t)eax_15);
00696469                              
00696477                              if ((eax_16 + ebp_2) >= 0x100)
00696477                              {
00696480                                  int32_t eax_19 = ((this->m_MaxCharacterHeight + var_30) + 1);
00696480                                  
00696489                                  if (eax_19 >= 0x100)
00696489                                  {
00696593                                      ebx = var_28;
00696597                                      var_32 = false;
00696597                                      break;
00696489                                  }
00696489                                  
0069648f                                  ebp_2 = 0;
00696491                                  var_30 = eax_19;
00696477                              }
00696477                              
006964bb                              SurfaceWindow::DrawCharacter(&esi_4[0x2b], ebp_2, var_30, var_28, m_FirstUnicodeCharacter_2, 0xffffffff, 0x100, 0xff000000);
006964cd                              long double x87_r7_1 = ((long double)ebp_2);
006964d1                              int32_t eax_21 = ((this->m_MaxCharacterHeight + var_30) - 1);
006964d1                              
006964d5                              if (ebp_2 < 0)
006964d7                                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
006964d7                              
006964e9                              *(uint32_t*)esi_6 = ((float)(x87_r7_1 * ((long double)0.00390625f)));
006964eb                              long double x87_r7_3 = ((long double)var_30);
006964eb                              
006964ef                              if (var_30 < 0)
006964f1                                  x87_r7_3 = (x87_r7_3 + ((long double)4.2949673e+09f));
006964f1                              
0069650b                              *(uint32_t*)((char*)esi_6 + 4) = ((float)(x87_r7_3 * ((long double)0.00390625f)));
0069650e                              long double x87_r7_5 = ((long double)((eax_16 + ebp_2) - 1));
0069650e                              
00696512                              if (((eax_16 + ebp_2) - 1) < 0)
00696514                                  x87_r7_5 = (x87_r7_5 + ((long double)4.2949673e+09f));
00696514                              
0069652c                              *(uint32_t*)((char*)esi_6 + 8) = ((float)((x87_r7_5 + ((long double)1f)) * ((long double)0.00390625f)));
0069652f                              long double x87_r7_8 = ((long double)eax_21);
0069652f                              
00696533                              if (eax_21 < 0)
00696535                                  x87_r7_8 = (x87_r7_8 + ((long double)4.2949673e+09f));
00696535                              
00696541                              eax_21 = eax_15;
00696545                              *(uint8_t*)((char*)esi_6 + 0x10) = eax_21;
00696548                              ebp_2 = ((eax_16 + ebp_2) + 1);
00696552                              *(uint32_t*)((char*)esi_6 + 0xc) = ((float)((x87_r7_8 + ((long double)1f)) * ((long double)0.00390625f)));
00696555                              int32_t edx_9;
00696555                              edx_9 = ebx_1->m_HorizontalOffsetBefore;
00696558                              *(uint8_t*)((char*)esi_6 + 0x12) = edx_9;
0069655b                              eax_21 = ebx_1->m_HorizontalOffsetAfter;
0069655e                              *(uint8_t*)((char*)esi_6 + 0x13) = eax_21;
00696561                              edx_9 = this->m_MaxCharacterHeight;
00696564                              *(uint8_t*)((char*)esi_6 + 0x11) = edx_9;
00696567                              eax_21 = ebx_1->m_VerticalOffsetBefore;
0069656e                              *(uint8_t*)((char*)esi_6 + 0x14) = eax_21;
0069657d                              bool cond:14_1 = (m_FirstUnicodeCharacter_2 + 1) <= ((uint32_t)this->m_LastUnicodeCharacter);
0069657f                              var_24_1 += 0x18;
00696583                              ebx = var_28;
00696587                              m_FirstUnicodeCharacter_2 += 1;
00696587                              
0069658b                              if (!(cond:14_1))
0069658b                                  break;
0069658b                              
0069644d                              m_FirstUnicodeCharacter = m_FirstUnicodeCharacter_2;
00696454                          }
00696441                      }
00696441                      
006965a6                      SurfaceWindow::Unlock(&esi_4[0x2b]);
006965ad                      Font::UnlockSurfaces(ebx);
006965b6                      *(uint32_t*)(*(uint32_t*)esi_4 + 0x14)();
006965b6                      
006965cc                      if (this->m_pTexture->vtable->LoadTexture(var_1c_1) != 0)
006965cc                      {
006965dd                          var_1c_1->vtable->Release();
006965f2                          return var_32 != 0;
006965cc                      }
006965cc                      
006965ce                      var_1c_1->vtable->Release();
006965d6                      int32_t eax_26;
006965d6                      eax_26 = 0;
006965dc                      return 0;
00696411                  }
00696411                  
006965f3                  ebp_1->vtable->Release();
006965ff                  *(uint32_t*)(*(uint32_t*)esi_4 + 0x14)();
00696325              }
006962c7          }
0069629f      }
0069629f      
00696605      eax_1 = 0;
0069660b      return 0;
00696280  }

0069660c                                      90 90 90 90                                                              ....

00696610  void __fastcall TextureBasedFont::EndRenderingText(class TextureBasedFont* this)

00696610  {
00696611      class TextureBasedFont* this_1 = this;
00696616      this = this_1->m_pTexture->m_bIsLost;
0069661b      uint8_t eax_1;
0069661b      
0069661b      if (this != 0)
0069661f          eax_1 = TextureBasedFont::SetupFontTexture(this_1);
0069661f      
00696626      if ((this == 0 || eax_1 != 0))
00696626      {
00696633          if (g_FontVertices.m_num > 0)
00696633          {
00696639              uint32_t eax_2;
00696639              eax_2 = this_1->m_QueuedTextUsesScaling;
00696639              
0069663e              if (eax_2 == 0)
0069663e              {
00696672                  *(uint32_t*)*(uint32_t*)this_1->m_pMaterial->layers.m_data->m_Stages.m_data->m_MinFilterMode = TEXFILTER_POINT;
00696687                  *(uint32_t*)*(uint32_t*)this_1->m_pMaterial->layers.m_data->m_Stages.m_data->m_MagFilterMode = TEXFILTER_POINT;
0069663e              }
0069663e              else
0069663e              {
0069664b                  *(uint32_t*)*(uint32_t*)this_1->m_pMaterial->layers.m_data->m_Stages.m_data->m_MinFilterMode = TEXFILTER_LINEAR;
00696660                  *(uint32_t*)*(uint32_t*)this_1->m_pMaterial->layers.m_data->m_Stages.m_data->m_MagFilterMode = TEXFILTER_LINEAR;
0069663e              }
0069663e              
0069668c              SceneTool::StoreMatrices();
00696691              SceneTool::IdentityMatrices();
00696696              class RenderMaterial* m_pMaterial = this_1->m_pMaterial;
006966b6              int32_t eax_6;
006966b6              int32_t edx_10;
006966b6              edx_10 = HIGHD((0xaaaaaaab * g_FontVertices.m_num));
006966b6              eax_6 = LOWD((0xaaaaaaab * g_FontVertices.m_num));
006966c1              RenderDeviceD3D::RenderDynamicPrimitivesUsingMaterial(RenderDevice::render_device, PRIMTYPE_TRIANGLELIST, (edx_10 >> 1), g_FontVertices.m_data, 0x142, m_pMaterial, m_pMaterial, &RGBAColor_White);
006966c6              g_FontVertices.m_num = 0;
006966d0              SceneTool::RestoreMatrices();
00696633          }
00696633          
006966d5          this_1->m_IsReadyToRender = 0;
00696626      }
00696610  }

006966db                                                                                   90 90 90 90 90                             .....

006966e0  uint32_t __thiscall TextureBasedFont::ComputeTextWidth(class TextureBasedFont* this, char const* arg2, uint32_t const arg3)

006966e0  {
006966e3      char const* eax = arg2;
006966ef      void* esi = &eax[1];
006966f7      char const i;
006966f7      
006966f7      do
006966f7      {
006966f2          i = *(uint8_t*)eax;
006966f4          eax = &eax[1];
006966f7      } while (i != 0);
006966fb      void* ecx = (eax - esi);
006966fd      void* var_4 = ecx;
006966fd      
00696701      if (eax == esi)
0069670a          return 0;
0069670a      
0069670d      char* esi_1 = nullptr;
00696711      int32_t result = 0;
00696711      
00696715      if (ecx > 0)
00696715      {
00696772          do
00696772          {
00696734              char const* edx;
00696734              edx = ((int16_t)*(uint8_t*)(esi_1 + arg2));
00696743              void* edi_1 = &this->m_Characters.m_data[((uint32_t)(edx - this->m_FirstUnicodeCharacter))];
00696746              uint32_t m_HorizontalSpacing;
00696746              
00696746              if ((arg3 & 1) == 0)
00696746              {
0069675f                  m_HorizontalSpacing = ((((int32_t)*(uint8_t*)((char*)edi_1 + 0x13)) + ((int32_t)*(uint8_t*)((char*)edi_1 + 0x12))) + ((uint32_t)*(uint8_t*)((char*)edi_1 + 0x10)));
00696761                  ecx = var_4;
00696746              }
00696746              else
0069674c                  m_HorizontalSpacing = this->m_HorizontalSpacing;
0069674c              
0069676b              esi_1 = &esi_1[1];
0069676e              result += m_HorizontalSpacing;
00696772          } while (esi_1 < ecx);
00696715      }
00696715      
0069677f      return result;
006966e0  }

00696782        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00696790  uint8_t __thiscall SmartArray<TextureBasedFontVertexType,1>::grow(class SmartArray<TextureBasedFontVertexType,1>* this, uint32_t arg2)

00696790  {
00696798      uint32_t esi = arg2;
0069679e      uint32_t eax;
0069679e      
0069679e      if (esi >= this->m_num)
0069679e      {
006967ae          int32_t eax_2;
006967ae          
006967ae          if (esi <= (this->m_sizeAndDeallocate & 0x7fffffff))
006967ae          {
00696842              eax_2 = 1;
00696845              return 1;
006967ae          }
006967ae          
006967b6          if (esi == 0)
006967b6          {
006967b8              SmartArray<TextureBasedFontVertexType,1>::Reset(this);
006967bf              int32_t eax_3;
006967bf              eax_3 = 1;
006967c2              return 1;
006967b6          }
006967b6          
006967cc          eax = operator new[]((esi * 0x18));
006967cc          
006967d8          if (eax != 0)
006967d8          {
006967e3              `vector constructor iterator'(eax, 0x18, esi, Vector3::Vector3);
006967e3              
006967eb              if (this->m_data != 0)
006967eb              {
006967ed                  uint32_t m_num = this->m_num;
006967ed                  
006967f1                  if ((m_num - 1) >= 0)
006967f1                  {
006967f6                      eax_2 = ((m_num - 1) * 0x18);
006967f9                      int32_t edx_1 = m_num;
00696812                      int32_t i;
00696812                      
00696812                      do
00696812                      {
00696802                          void* esi_2 = (this->m_data + eax_2);
00696804                          int32_t edi_1 = (eax_2 + eax);
0069680c                          eax_2 -= 0x18;
0069680f                          i = edx_1;
0069680f                          edx_1 -= 1;
00696810                          __builtin_memcpy(edi_1, esi_2, 0x18);
00696812                      } while (i != 1);
00696814                      esi = arg2;
006967f1                  }
006967f1                  
00696828                  if ((this->m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069682d                      operator delete[](this->m_data);
006967eb              }
006967eb              
0069683b              this->m_data = eax;
0069683d              this->m_sizeAndDeallocate = (esi | 0x80000000);
00696842              eax_2 = 1;
00696845              return 1;
006967d8          }
0069679e      }
0069679e      
0069684a      eax = 0;
0069684d      return 0;
00696790  }


00696850  void* __thiscall TextureBasedFont::`scalar deleting destructor'(class TextureBasedFont* this, uint32_t arg2)

00696850  {
00696853      class RenderTexture* m_pTexture = this->m_pTexture;
0069685b      this->vtable = &TextureBasedFont::`vftable';
0069685b      
00696861      if (m_pTexture != 0)
00696861      {
00696863          m_pTexture->vtable->Release();
00696868          this->m_pTexture = nullptr;
00696861      }
00696861      
0069686b      class RenderMaterial* m_pMaterial = this->m_pMaterial;
0069686b      
00696870      if (m_pMaterial != 0)
00696870      {
00696872          m_pMaterial->vtable->Release();
00696877          this->m_pMaterial = nullptr;
00696870      }
00696870      
0069687e      operator delete[](this->m_Characters.m_data);
0069688c      this->m_Characters.m_data = 0;
0069688f      this->m_Characters.m_num = 0;
00696892      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00696892      
00696898      if ((arg2 & 1) != 0)
0069689b          operator delete(this);
0069689b      
006968a7      return this;
00696850  }

006968aa                                90 90 90 90 90 90                                                            ......

006968b0  void __thiscall TextureBasedFont::RenderText(class TextureBasedFont* this, float const arg2, float const arg3, float const arg4, char const* arg5, uint32_t const arg6, uint32_t const arg7)

006968b0  {
006968b9      class TextureBasedFont* this_1 = this;
006968bb      char const* eax = arg5;
006968c2      void* edi = &eax[1];
006968c2      
006968cc      do
006968cc      {
006968c7          this = *(uint8_t*)eax;
006968c9          eax = &eax[1];
006968cc      } while (this != 0);
006968cc      
006968ce      void* eax_1 = (eax - edi);
006968ce      
006968d6      if (eax != edi)
006968d6      {
006968e4          float const var_20_1 = arg2;
006968e8          uint32_t const eax_3 = arg7;
006968ee          float const var_1c_1 = arg3;
006968ee          
006968f2          if ((eax_3 & 8) != 0)
006968f2          {
006968f8              uint32_t eax_4 = TextureBasedFont::ComputeTextWidth(this_1, arg5, eax_3);
00696903              long double x87_r7_1 = ((long double)eax_4);
00696903              
00696907              if (eax_4 < 0)
00696909                  x87_r7_1 = (x87_r7_1 + ((long double)4.2949673e+09f));
00696909              
00696942              eax_3 = arg7;
00696946              var_20_1 = ((float)(((long double)arg2) - (x87_r7_1 * ((long double)arg4))));
006968f2          }
006968f2          else if ((eax_3 & 0x10) != 0)
00696917          {
0069691d              int32_t eax_5 = TextureBasedFont::ComputeTextWidth(this_1, arg5, eax_3);
00696928              long double x87_r7_2 = ((long double)eax_5);
00696928              
0069692c              if (eax_5 < 0)
0069692e                  x87_r7_2 = (x87_r7_2 + ((long double)4.2949673e+09f));
0069692e              
00696942              eax_3 = arg7;
00696946              var_20_1 = ((float)(((long double)arg2) - ((x87_r7_2 * ((long double)arg4)) * ((long double)0.5f))));
00696917          }
00696917          
0069694c          if ((eax_3 & 0x40) != 0)
0069694c          {
00696951              long double x87_r7_6 = ((long double)this_1->m_MaxCharacterHeight);
00696951              
00696956              if (this_1->m_MaxCharacterHeight < 0)
00696958                  x87_r7_6 = (x87_r7_6 + ((long double)4.2949673e+09f));
00696958              
00696986              var_1c_1 = ((float)(((long double)arg3) - (x87_r7_6 * ((long double)arg4))));
0069694c          }
0069694c          else if (eax_3 < 0)
00696966          {
0069696b              long double x87_r7_7 = ((long double)this_1->m_MaxCharacterHeight);
0069696b              
00696970              if (this_1->m_MaxCharacterHeight < 0)
00696972                  x87_r7_7 = (x87_r7_7 + ((long double)4.2949673e+09f));
00696972              
00696986              var_1c_1 = ((float)(((long double)arg3) - ((x87_r7_7 * ((long double)arg4)) * ((long double)0.5f))));
00696966          }
00696966          
0069698a          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00696996          long double x87_r7_11 = ((long double)RenderDevice::render_device_1->m_viewportWidth);
00696996          
0069699e          if (RenderDevice::render_device_1->m_viewportWidth < 0)
006969a0              x87_r7_11 = (x87_r7_11 + ((long double)4.2949673e+09f));
006969a0          
006969ac          uint32_t m_viewportHeight = RenderDevice::render_device_1->m_viewportHeight;
006969b8          arg2 = ((float)(((long double)1f) / x87_r7_11));
006969bc          long double x87_r7_13 = ((long double)m_viewportHeight);
006969bc          
006969c0          if (m_viewportHeight < 0)
006969c2              x87_r7_13 = (x87_r7_13 + ((long double)4.2949673e+09f));
006969c2          
006969ce          uint32_t m_num = g_FontVertices.m_num;
006969dd          int32_t edi_2 = (m_num + (eax_1 * 6));
006969e8          arg3 = ((float)(((long double)1f) / x87_r7_13));
006969ec          bool cond:6_1;
006969ec          
006969ec          if ((g_FontVertices.m_sizeAndDeallocate & 0x7fffffff) < edi_2)
006969ec          {
00696a04              cond:6_1 = SmartArray<TextureBasedFontVertexType,1>::grow(&g_FontVertices, SmartArray<unsigned long,1>::get_new_size(&g_FontVertices, edi_2)) == 0;
00696a06              eax_3 = arg7;
006969ec          }
006969ec          
00696a0a          if (((g_FontVertices.m_sizeAndDeallocate & 0x7fffffff) >= edi_2 || !(cond:6_1)))
00696a0c              g_FontVertices.m_num = edi_2;
00696a0c          
00696a17          int32_t edi_3 = 0;
00696a19          int32_t ebp_1 = 0;
00696a1e          uint32_t const ecx_7 = arg6;
00696a22          int32_t var_28_1 = 0;
00696a26          int32_t var_10_1 = 0;
00696a26          
00696a2a          if (eax_1 >= 4)
00696a2a          {
00696a34              int32_t eax_8 = (eax_3 & 1);
00696a3e              void* var_18_1 = &arg5[1];
00696a4a              uint32_t eax_10 = (m_num * 0x18);
00697225              int32_t ebp_97;
00697225              
00697225              do
00697225              {
00696a57                  void* edx_6;
00696a57                  edx_6 = ((int16_t)*(uint8_t*)((char*)var_18_1 - 1));
00696a60                  edx_6 -= this_1->m_FirstUnicodeCharacter;
00696a6d                  void* edx_9 = &this_1->m_Characters.m_data[((uint32_t)edx_6)];
00696a75                  arg6 = 0;
00696a79                  int32_t var_30_1 = 0;
00696a7d                  uint32_t m_HorizontalSpacing;
00696a7d                  int32_t ebp_7;
00696a7d                  
00696a7d                  if (eax_8 == 0)
00696a7d                  {
00696aaa                      m_HorizontalSpacing = (((uint32_t)*(uint8_t*)((char*)edx_9 + 0x10)) + (((int32_t)*(uint8_t*)((char*)edx_9 + 0x12)) + ((int32_t)*(uint8_t*)((char*)edx_9 + 0x13))));
00696aae                      ebp_7 = ((int32_t)*(uint8_t*)((char*)edx_9 + 0x12));
00696ab2                      var_30_1 = ((int32_t)*(uint8_t*)((char*)edx_9 + 0x14));
00696ab6                      edi_3 = var_28_1;
00696a7d                  }
00696a7d                  else
00696a7d                  {
00696a86                      m_HorizontalSpacing = this_1->m_HorizontalSpacing;
00696a8a                      ebp_7 = 0;
00696a7d                  }
00696a7d                  
00696ad5                  int32_t edi_11 = (((uint32_t)*(uint8_t*)((char*)edx_9 + 0x11)) - 1);
00696ad6                  long double x87_r7_17 = ((((long double)(ebp_7 + edi_3)) * ((long double)arg4)) + ((long double)var_20_1));
00696ade                  long double x87_r7_18 = (x87_r7_17 * ((long double)arg2));
00696aea                  long double x87_r7_21 = (((x87_r7_18 + x87_r7_18) - ((long double)1f)) - ((long double)arg2));
00696afc                  void* edi_13 = (g_FontVertices.m_data + eax_10);
00696afe                  long double x87_r6_2 = (((long double)(((uint32_t)*(uint8_t*)((char*)edx_9 + 0x10)) - 1)) * ((long double)arg4));
00696b02                  *(uint32_t*)((char*)edi_13 + 8) = 0;
00696b05                  *(uint32_t*)((char*)edi_13 + 0xc) = ecx_7;
00696b10                  long double x87_r6_4 = ((x87_r6_2 + ((long double)((float)x87_r7_17))) * ((long double)arg2));
00696b1c                  long double x87_r6_7 = (((x87_r6_4 + x87_r6_4) - ((long double)1f)) + ((long double)arg2));
00696b28                  long double x87_r5_3 = ((((long double)var_30_1) * ((long double)arg4)) + ((long double)var_1c_1));
00696b30                  long double x87_r4_2 = (((long double)arg3) * x87_r5_3);
00696b40                  arg6 = ((float)-((((x87_r4_2 + x87_r4_2) - ((long double)1f)) - ((long double)arg3))));
00696b4c                  *(uint32_t*)((char*)edi_13 + 4) = arg6;
00696b55                  long double x87_r5_5 = ((x87_r5_3 + (((long double)edi_11) * ((long double)arg4))) * ((long double)arg3));
00696b65                  long double x87_r5_9 = -((((x87_r5_5 + x87_r5_5) - ((long double)1f)) + ((long double)arg3)));
00696b69                  *(uint32_t*)edi_13 = ((float)x87_r7_21);
00696b6d                  *(uint32_t*)((char*)edi_13 + 0x10) = *(uint32_t*)edx_9;
00696b75                  *(uint32_t*)((char*)edi_13 + 0x14) = *(uint32_t*)((char*)edx_9 + 4);
00696b78                  float* m_data_4 = g_FontVertices.m_data;
00696b7e                  *(uint32_t*)((char*)m_data_4 + (eax_10 + 0x18)) = ((float)x87_r7_21);
00696b81                  void* edi_14 = ((char*)m_data_4 + (eax_10 + 0x18));
00696b83                  *(uint32_t*)((char*)edi_14 + 4) = ((float)x87_r5_9);
00696b86                  *(uint32_t*)((char*)edi_14 + 8) = 0;
00696b89                  *(uint32_t*)((char*)edi_14 + 0xc) = ecx_7;
00696b8e                  *(uint32_t*)((char*)edi_14 + 0x10) = *(uint32_t*)edx_9;
00696b97                  *(uint32_t*)((char*)edi_14 + 0x14) = *(uint32_t*)((char*)edx_9 + 0xc);
00696ba1                  float* edi_16 = (g_FontVertices.m_data + (eax_10 + 0x30));
00696ba7                  edi_16[2] = 0;
00696bac                  *(uint32_t*)edi_16 = ((float)x87_r6_7);
00696bae                  edi_16[3] = ecx_7;
00696bb1                  int32_t var_30_2 = 0;
00696bb5                  edi_16[1] = ((float)x87_r5_9);
00696bbb                  edi_16[4] = *(uint32_t*)((char*)edx_9 + 8);
00696bc3                  edi_16[5] = *(uint32_t*)((char*)edx_9 + 0xc);
00696bc6                  float* m_data_5 = g_FontVertices.m_data;
00696bcc                  *(uint32_t*)((char*)m_data_5 + (eax_10 + 0x48)) = ((float)x87_r6_7);
00696bcf                  *(uint32_t*)(((char*)m_data_5 + (eax_10 + 0x48)) + 8) = 0;
00696bd3                  *(uint32_t*)(((char*)m_data_5 + (eax_10 + 0x48)) + 4) = ((float)x87_r5_9);
00696bd7                  *(uint32_t*)(((char*)m_data_5 + (eax_10 + 0x48)) + 0xc) = ecx_7;
00696bde                  *(uint32_t*)(((char*)m_data_5 + (eax_10 + 0x48)) + 0x10) = *(uint32_t*)((char*)edx_9 + 8);
00696be7                  *(uint32_t*)(((char*)m_data_5 + (eax_10 + 0x48)) + 0x14) = *(uint32_t*)((char*)edx_9 + 0xc);
00696bea                  float* m_data_6 = g_FontVertices.m_data;
00696bf7                  *(uint32_t*)(((char*)m_data_6 + (eax_10 + 0x60)) + 4) = arg6;
00696bfb                  *(uint32_t*)((char*)m_data_6 + (eax_10 + 0x60)) = ((float)x87_r6_7);
00696bfe                  void* edi_18 = ((char*)m_data_6 + (eax_10 + 0x60));
00696c00                  *(uint32_t*)((char*)edi_18 + 8) = 0;
00696c03                  *(uint32_t*)((char*)edi_18 + 0xc) = ecx_7;
00696c09                  *(uint32_t*)((char*)edi_18 + 0x10) = *(uint32_t*)((char*)edx_9 + 8);
00696c0f                  *(uint32_t*)((char*)edi_18 + 0x14) = *(uint32_t*)((char*)edx_9 + 4);
00696c1f                  float* edi_20 = (g_FontVertices.m_data + (eax_10 + 0x78));
00696c21                  edi_20[1] = arg6;
00696c24                  *(uint32_t*)edi_20 = ((float)x87_r7_21);
00696c26                  edi_20[2] = 0;
00696c29                  edi_20[3] = ecx_7;
00696c2e                  edi_20[4] = *(uint32_t*)edx_9;
00696c38                  edi_20[5] = *(uint32_t*)((char*)edx_9 + 4);
00696c3f                  int32_t ebp_27 = (var_28_1 + m_HorizontalSpacing);
00696c45                  void* edx_12;
00696c45                  edx_12 = ((int16_t)*(uint8_t*)var_18_1);
00696c51                  edx_12 -= this_1->m_FirstUnicodeCharacter;
00696c60                  void* edx_15 = &this_1->m_Characters.m_data[((uint32_t)edx_12)];
00696c67                  int32_t edi_22 = 0;
00696c6d                  uint32_t m_HorizontalSpacing_1;
00696c6d                  
00696c6d                  if (eax_8 == 0)
00696c6d                  {
00696c90                      edi_22 = ((int32_t)*(uint8_t*)((char*)edx_15 + 0x12));
00696c94                      m_HorizontalSpacing_1 = (((uint32_t)*(uint8_t*)((char*)edx_15 + 0x10)) + (((int32_t)*(uint8_t*)((char*)edx_15 + 0x12)) + ((int32_t)*(uint8_t*)((char*)edx_15 + 0x13))));
00696c9c                      var_30_2 = ((int32_t)*(uint8_t*)((char*)edx_15 + 0x14));
00696c6d                  }
00696c6d                  else
00696c72                      m_HorizontalSpacing_1 = this_1->m_HorizontalSpacing;
00696c72                  
00696cbf                  long double x87_r7_24 = ((((long double)(edi_22 + ebp_27)) * ((long double)arg4)) + ((long double)var_20_1));
00696cc3                  int32_t edi_30 = (((uint32_t)*(uint8_t*)((char*)edx_15 + 0x11)) - 1);
00696cc8                  long double x87_r7_25 = (x87_r7_24 * ((long double)arg2));
00696cd4                  long double x87_r7_28 = (((x87_r7_25 + x87_r7_25) - ((long double)1f)) - ((long double)arg2));
00696ce6                  void* edi_32 = (g_FontVertices.m_data + (eax_10 + 0x90));
00696ce8                  long double x87_r6_9 = (((long double)(((uint32_t)*(uint8_t*)((char*)edx_15 + 0x10)) - 1)) * ((long double)arg4));
00696cec                  *(uint32_t*)((char*)edi_32 + 8) = 0;
00696cef                  *(uint32_t*)((char*)edi_32 + 0xc) = ecx_7;
00696cfa                  long double x87_r6_11 = ((x87_r6_9 + ((long double)((float)x87_r7_24))) * ((long double)arg2));
00696d06                  long double x87_r6_14 = (((x87_r6_11 + x87_r6_11) - ((long double)1f)) + ((long double)arg2));
00696d12                  long double x87_r5_12 = ((((long double)var_30_2) * ((long double)arg4)) + ((long double)var_1c_1));
00696d1a                  long double x87_r4_14 = (((long double)arg3) * x87_r5_12);
00696d2a                  arg6 = ((float)-((((x87_r4_14 + x87_r4_14) - ((long double)1f)) - ((long double)arg3))));
00696d36                  *(uint32_t*)((char*)edi_32 + 4) = arg6;
00696d3f                  long double x87_r5_14 = ((x87_r5_12 + (((long double)edi_30) * ((long double)arg4))) * ((long double)arg3));
00696d4f                  long double x87_r5_18 = -((((x87_r5_14 + x87_r5_14) - ((long double)1f)) + ((long double)arg3)));
00696d53                  *(uint32_t*)edi_32 = ((float)x87_r7_28);
00696d57                  *(uint32_t*)((char*)edi_32 + 0x10) = *(uint32_t*)edx_15;
00696d5f                  *(uint32_t*)((char*)edi_32 + 0x14) = *(uint32_t*)((char*)edx_15 + 4);
00696d62                  float* m_data_7 = g_FontVertices.m_data;
00696d68                  *(uint32_t*)((char*)m_data_7 + (eax_10 + 0xa8)) = ((float)x87_r7_28);
00696d6b                  void* edi_33 = ((char*)m_data_7 + (eax_10 + 0xa8));
00696d6d                  *(uint32_t*)((char*)edi_33 + 4) = ((float)x87_r5_18);
00696d70                  *(uint32_t*)((char*)edi_33 + 8) = 0;
00696d73                  *(uint32_t*)((char*)edi_33 + 0xc) = ecx_7;
00696d78                  *(uint32_t*)((char*)edi_33 + 0x10) = *(uint32_t*)edx_15;
00696d7e                  *(uint32_t*)((char*)edi_33 + 0x14) = *(uint32_t*)((char*)edx_15 + 0xc);
00696d8b                  float* edi_35 = (g_FontVertices.m_data + (eax_10 + 0xc0));
00696d8e                  edi_35[2] = 0;
00696d93                  *(uint32_t*)edi_35 = ((float)x87_r6_14);
00696d95                  edi_35[3] = ecx_7;
00696d9b                  edi_35[1] = ((float)x87_r5_18);
00696da1                  edi_35[4] = *(uint32_t*)((char*)edx_15 + 8);
00696da9                  edi_35[5] = *(uint32_t*)((char*)edx_15 + 0xc);
00696dac                  float* m_data_8 = g_FontVertices.m_data;
00696db2                  *(uint32_t*)((char*)m_data_8 + (eax_10 + 0xd8)) = ((float)x87_r6_14);
00696db5                  *(uint32_t*)(((char*)m_data_8 + (eax_10 + 0xd8)) + 8) = 0;
00696db9                  *(uint32_t*)(((char*)m_data_8 + (eax_10 + 0xd8)) + 4) = ((float)x87_r5_18);
00696dbd                  *(uint32_t*)(((char*)m_data_8 + (eax_10 + 0xd8)) + 0xc) = ecx_7;
00696dc4                  *(uint32_t*)(((char*)m_data_8 + (eax_10 + 0xd8)) + 0x10) = *(uint32_t*)((char*)edx_15 + 8);
00696dcd                  *(uint32_t*)(((char*)m_data_8 + (eax_10 + 0xd8)) + 0x14) = *(uint32_t*)((char*)edx_15 + 0xc);
00696dd0                  float* m_data_9 = g_FontVertices.m_data;
00696ddd                  *(uint32_t*)(((char*)m_data_9 + (eax_10 + 0xf0)) + 4) = arg6;
00696de1                  *(uint32_t*)((char*)m_data_9 + (eax_10 + 0xf0)) = ((float)x87_r6_14);
00696de4                  void* edi_37 = ((char*)m_data_9 + (eax_10 + 0xf0));
00696de6                  *(uint32_t*)((char*)edi_37 + 8) = 0;
00696de9                  *(uint32_t*)((char*)edi_37 + 0xc) = ecx_7;
00696def                  *(uint32_t*)((char*)edi_37 + 0x10) = *(uint32_t*)((char*)edx_15 + 8);
00696df5                  *(uint32_t*)((char*)edi_37 + 0x14) = *(uint32_t*)((char*)edx_15 + 4);
00696e05                  float* edi_39 = (g_FontVertices.m_data + (eax_10 + 0x108));
00696e07                  edi_39[1] = arg6;
00696e0a                  *(uint32_t*)edi_39 = ((float)x87_r7_28);
00696e0c                  edi_39[2] = 0;
00696e0f                  edi_39[3] = ecx_7;
00696e14                  edi_39[4] = *(uint32_t*)edx_15;
00696e1e                  edi_39[5] = *(uint32_t*)((char*)edx_15 + 4);
00696e25                  int32_t ebp_50 = (ebp_27 + m_HorizontalSpacing_1);
00696e2b                  void* edx_18;
00696e2b                  edx_18 = ((int16_t)*(uint8_t*)((char*)var_18_1 + 1));
00696e38                  edx_18 -= this_1->m_FirstUnicodeCharacter;
00696e47                  void* edx_21 = &this_1->m_Characters.m_data[((uint32_t)edx_18)];
00696e4e                  int32_t edi_41 = 0;
00696e54                  int32_t var_30_3 = 0;
00696e58                  uint32_t m_HorizontalSpacing_2;
00696e58                  
00696e58                  if (eax_8 == 0)
00696e58                  {
00696e7b                      edi_41 = ((int32_t)*(uint8_t*)((char*)edx_21 + 0x12));
00696e7f                      m_HorizontalSpacing_2 = (((uint32_t)*(uint8_t*)((char*)edx_21 + 0x10)) + (((int32_t)*(uint8_t*)((char*)edx_21 + 0x12)) + ((int32_t)*(uint8_t*)((char*)edx_21 + 0x13))));
00696e87                      var_30_3 = ((int32_t)*(uint8_t*)((char*)edx_21 + 0x14));
00696e58                  }
00696e58                  else
00696e5d                      m_HorizontalSpacing_2 = this_1->m_HorizontalSpacing;
00696e5d                  
00696eaa                  long double x87_r7_31 = ((((long double)(edi_41 + ebp_50)) * ((long double)arg4)) + ((long double)var_20_1));
00696eae                  int32_t edi_49 = (((uint32_t)*(uint8_t*)((char*)edx_21 + 0x11)) - 1);
00696eb3                  long double x87_r7_32 = (x87_r7_31 * ((long double)arg2));
00696ebf                  long double x87_r7_35 = (((x87_r7_32 + x87_r7_32) - ((long double)1f)) - ((long double)arg2));
00696ed1                  void* edi_51 = (g_FontVertices.m_data + (eax_10 + 0x120));
00696ed3                  long double x87_r6_16 = (((long double)(((uint32_t)*(uint8_t*)((char*)edx_21 + 0x10)) - 1)) * ((long double)arg4));
00696ed7                  *(uint32_t*)((char*)edi_51 + 8) = 0;
00696eda                  *(uint32_t*)((char*)edi_51 + 0xc) = ecx_7;
00696ee5                  long double x87_r6_18 = ((x87_r6_16 + ((long double)((float)x87_r7_31))) * ((long double)arg2));
00696ef1                  long double x87_r6_21 = (((x87_r6_18 + x87_r6_18) - ((long double)1f)) + ((long double)arg2));
00696efd                  long double x87_r5_21 = ((((long double)var_30_3) * ((long double)arg4)) + ((long double)var_1c_1));
00696f05                  long double x87_r4_26 = (((long double)arg3) * x87_r5_21);
00696f15                  arg6 = ((float)-((((x87_r4_26 + x87_r4_26) - ((long double)1f)) - ((long double)arg3))));
00696f21                  *(uint32_t*)((char*)edi_51 + 4) = arg6;
00696f2a                  long double x87_r5_23 = ((x87_r5_21 + (((long double)edi_49) * ((long double)arg4))) * ((long double)arg3));
00696f3a                  long double x87_r5_27 = -((((x87_r5_23 + x87_r5_23) - ((long double)1f)) + ((long double)arg3)));
00696f3e                  *(uint32_t*)edi_51 = ((float)x87_r7_35);
00696f42                  *(uint32_t*)((char*)edi_51 + 0x10) = *(uint32_t*)edx_21;
00696f4a                  *(uint32_t*)((char*)edi_51 + 0x14) = *(uint32_t*)((char*)edx_21 + 4);
00696f4d                  float* m_data_10 = g_FontVertices.m_data;
00696f53                  *(uint32_t*)((char*)m_data_10 + (eax_10 + 0x138)) = ((float)x87_r7_35);
00696f56                  void* edi_52 = ((char*)m_data_10 + (eax_10 + 0x138));
00696f58                  *(uint32_t*)((char*)edi_52 + 4) = ((float)x87_r5_27);
00696f5b                  *(uint32_t*)((char*)edi_52 + 8) = 0;
00696f5e                  *(uint32_t*)((char*)edi_52 + 0xc) = ecx_7;
00696f63                  *(uint32_t*)((char*)edi_52 + 0x10) = *(uint32_t*)edx_21;
00696f69                  *(uint32_t*)((char*)edi_52 + 0x14) = *(uint32_t*)((char*)edx_21 + 0xc);
00696f76                  float* edi_54 = (g_FontVertices.m_data + (eax_10 + 0x150));
00696f79                  edi_54[2] = 0;
00696f7e                  *(uint32_t*)edi_54 = ((float)x87_r6_21);
00696f80                  edi_54[3] = ecx_7;
00696f86                  edi_54[1] = ((float)x87_r5_27);
00696f8c                  edi_54[4] = *(uint32_t*)((char*)edx_21 + 8);
00696f94                  edi_54[5] = *(uint32_t*)((char*)edx_21 + 0xc);
00696f97                  float* m_data_11 = g_FontVertices.m_data;
00696f9d                  *(uint32_t*)((char*)m_data_11 + (eax_10 + 0x168)) = ((float)x87_r6_21);
00696fa0                  *(uint32_t*)(((char*)m_data_11 + (eax_10 + 0x168)) + 8) = 0;
00696fa4                  *(uint32_t*)(((char*)m_data_11 + (eax_10 + 0x168)) + 4) = ((float)x87_r5_27);
00696fa8                  *(uint32_t*)(((char*)m_data_11 + (eax_10 + 0x168)) + 0xc) = ecx_7;
00696faf                  *(uint32_t*)(((char*)m_data_11 + (eax_10 + 0x168)) + 0x10) = *(uint32_t*)((char*)edx_21 + 8);
00696fb8                  *(uint32_t*)(((char*)m_data_11 + (eax_10 + 0x168)) + 0x14) = *(uint32_t*)((char*)edx_21 + 0xc);
00696fbb                  float* m_data_12 = g_FontVertices.m_data;
00696fc8                  *(uint32_t*)(((char*)m_data_12 + (eax_10 + 0x180)) + 4) = arg6;
00696fcc                  *(uint32_t*)((char*)m_data_12 + (eax_10 + 0x180)) = ((float)x87_r6_21);
00696fcf                  void* edi_56 = ((char*)m_data_12 + (eax_10 + 0x180));
00696fd1                  *(uint32_t*)((char*)edi_56 + 8) = 0;
00696fd4                  *(uint32_t*)((char*)edi_56 + 0xc) = ecx_7;
00696fda                  *(uint32_t*)((char*)edi_56 + 0x10) = *(uint32_t*)((char*)edx_21 + 8);
00696fe0                  *(uint32_t*)((char*)edi_56 + 0x14) = *(uint32_t*)((char*)edx_21 + 4);
00696ff0                  float* edi_58 = (g_FontVertices.m_data + (eax_10 + 0x198));
00696ff2                  edi_58[1] = arg6;
00696ff5                  *(uint32_t*)edi_58 = ((float)x87_r7_35);
00696ff7                  edi_58[2] = 0;
00696ffa                  edi_58[3] = ecx_7;
00696fff                  edi_58[4] = *(uint32_t*)edx_21;
00697009                  edi_58[5] = *(uint32_t*)((char*)edx_21 + 4);
00697010                  int32_t ebp_73 = (ebp_50 + m_HorizontalSpacing_2);
00697016                  void* edx_24;
00697016                  edx_24 = ((int16_t)*(uint8_t*)((char*)var_18_1 + 2));
00697023                  edx_24 -= this_1->m_FirstUnicodeCharacter;
00697032                  void* edx_27 = &this_1->m_Characters.m_data[((uint32_t)edx_24)];
00697039                  int32_t edi_60 = 0;
0069703f                  int32_t var_30_4 = 0;
00697043                  uint32_t m_HorizontalSpacing_3;
00697043                  
00697043                  if (eax_8 == 0)
00697043                  {
00697066                      edi_60 = ((int32_t)*(uint8_t*)((char*)edx_27 + 0x12));
0069706a                      m_HorizontalSpacing_3 = (((uint32_t)*(uint8_t*)((char*)edx_27 + 0x10)) + (((int32_t)*(uint8_t*)((char*)edx_27 + 0x12)) + ((int32_t)*(uint8_t*)((char*)edx_27 + 0x13))));
00697072                      var_30_4 = ((int32_t)*(uint8_t*)((char*)edx_27 + 0x14));
00697043                  }
00697043                  else
00697048                      m_HorizontalSpacing_3 = this_1->m_HorizontalSpacing;
00697048                  
00697095                  long double x87_r7_38 = ((((long double)(edi_60 + ebp_73)) * ((long double)arg4)) + ((long double)var_20_1));
00697099                  int32_t edi_68 = (((uint32_t)*(uint8_t*)((char*)edx_27 + 0x11)) - 1);
0069709e                  long double x87_r7_39 = (x87_r7_38 * ((long double)arg2));
006970aa                  long double x87_r7_42 = (((x87_r7_39 + x87_r7_39) - ((long double)1f)) - ((long double)arg2));
006970bc                  void* edi_70 = (g_FontVertices.m_data + (eax_10 + 0x1b0));
006970be                  long double x87_r6_23 = (((long double)(((uint32_t)*(uint8_t*)((char*)edx_27 + 0x10)) - 1)) * ((long double)arg4));
006970c2                  *(uint32_t*)((char*)edi_70 + 8) = 0;
006970c5                  *(uint32_t*)((char*)edi_70 + 0xc) = ecx_7;
006970d0                  long double x87_r6_25 = ((x87_r6_23 + ((long double)((float)x87_r7_38))) * ((long double)arg2));
006970dc                  long double x87_r6_28 = (((x87_r6_25 + x87_r6_25) - ((long double)1f)) + ((long double)arg2));
006970e8                  long double x87_r5_30 = ((((long double)var_30_4) * ((long double)arg4)) + ((long double)var_1c_1));
006970f0                  long double x87_r4_38 = (((long double)arg3) * x87_r5_30);
00697100                  arg6 = ((float)-((((x87_r4_38 + x87_r4_38) - ((long double)1f)) - ((long double)arg3))));
0069710c                  *(uint32_t*)((char*)edi_70 + 4) = arg6;
00697115                  long double x87_r5_32 = ((x87_r5_30 + (((long double)edi_68) * ((long double)arg4))) * ((long double)arg3));
00697125                  long double x87_r5_36 = -((((x87_r5_32 + x87_r5_32) - ((long double)1f)) + ((long double)arg3)));
00697129                  *(uint32_t*)edi_70 = ((float)x87_r7_42);
0069712d                  *(uint32_t*)((char*)edi_70 + 0x10) = *(uint32_t*)edx_27;
00697135                  *(uint32_t*)((char*)edi_70 + 0x14) = *(uint32_t*)((char*)edx_27 + 4);
00697138                  float* m_data_13 = g_FontVertices.m_data;
0069713e                  *(uint32_t*)((char*)m_data_13 + (eax_10 + 0x1c8)) = ((float)x87_r7_42);
00697141                  void* edi_71 = ((char*)m_data_13 + (eax_10 + 0x1c8));
00697143                  *(uint32_t*)((char*)edi_71 + 4) = ((float)x87_r5_36);
00697146                  *(uint32_t*)((char*)edi_71 + 8) = 0;
00697149                  *(uint32_t*)((char*)edi_71 + 0xc) = ecx_7;
0069714e                  *(uint32_t*)((char*)edi_71 + 0x10) = *(uint32_t*)edx_27;
00697154                  *(uint32_t*)((char*)edi_71 + 0x14) = *(uint32_t*)((char*)edx_27 + 0xc);
00697161                  void* edi_73 = (g_FontVertices.m_data + (eax_10 + 0x1e0));
00697164                  *(uint32_t*)((char*)edi_73 + 8) = 0;
00697169                  *(uint32_t*)edi_73 = ((float)x87_r6_28);
0069716b                  *(uint32_t*)((char*)edi_73 + 0xc) = ecx_7;
00697171                  *(uint32_t*)((char*)edi_73 + 4) = ((float)x87_r5_36);
00697177                  *(uint32_t*)((char*)edi_73 + 0x10) = *(uint32_t*)((char*)edx_27 + 8);
0069717f                  *(uint32_t*)((char*)edi_73 + 0x14) = *(uint32_t*)((char*)edx_27 + 0xc);
00697182                  float* m_data_14 = g_FontVertices.m_data;
00697188                  *(uint32_t*)((char*)m_data_14 + (eax_10 + 0x1f8)) = ((float)x87_r6_28);
0069718b                  void* edi_74 = ((char*)m_data_14 + (eax_10 + 0x1f8));
0069718d                  *(uint32_t*)((char*)edi_74 + 4) = ((float)x87_r5_36);
00697190                  *(uint32_t*)((char*)edi_74 + 8) = 0;
00697193                  *(uint32_t*)((char*)edi_74 + 0xc) = ecx_7;
00697199                  *(uint32_t*)((char*)edi_74 + 0x10) = *(uint32_t*)((char*)edx_27 + 8);
0069719f                  *(uint32_t*)((char*)edi_74 + 0x14) = *(uint32_t*)((char*)edx_27 + 0xc);
006971a2                  float* m_data_15 = g_FontVertices.m_data;
006971af                  *(uint32_t*)(((char*)m_data_15 + (eax_10 + 0x210)) + 4) = arg6;
006971b3                  *(uint32_t*)((char*)m_data_15 + (eax_10 + 0x210)) = ((float)x87_r6_28);
006971b6                  void* edi_75 = ((char*)m_data_15 + (eax_10 + 0x210));
006971b8                  *(uint32_t*)((char*)edi_75 + 8) = 0;
006971bb                  *(uint32_t*)((char*)edi_75 + 0xc) = ecx_7;
006971c1                  *(uint32_t*)((char*)edi_75 + 0x10) = *(uint32_t*)((char*)edx_27 + 8);
006971c7                  *(uint32_t*)((char*)edi_75 + 0x14) = *(uint32_t*)((char*)edx_27 + 4);
006971d7                  float* edi_77 = (g_FontVertices.m_data + (eax_10 + 0x228));
006971d9                  edi_77[1] = arg6;
006971dc                  *(uint32_t*)edi_77 = ((float)x87_r7_42);
006971de                  edi_77[2] = 0;
006971e1                  edi_77[3] = ecx_7;
006971e6                  edi_77[4] = *(uint32_t*)edx_27;
006971f0                  edi_77[5] = *(uint32_t*)((char*)edx_27 + 4);
006971fe                  var_10_1 += 4;
00697206                  edi_3 = (ebp_73 + m_HorizontalSpacing_3);
00697211                  ebp_97 = ((2 - arg5) + ((char*)var_18_1 + 4));
00697213                  var_18_1 += 4;
0069721b                  m_num += 0x18;
0069721c                  eax_10 += 0x240;
00697221                  var_28_1 = edi_3;
00697225              } while (ebp_97 < eax_1);
0069722b              eax_3 = arg7;
0069722f              ebp_1 = var_10_1;
00696a2a          }
00696a2a          
00697237          if (ebp_1 < eax_1)
00697237          {
0069723f              int32_t edx_35 = (eax_3 & 1);
00697245              int32_t var_14_2 = edx_35;
00697249              uint32_t esi_24 = (m_num * 0x18);
00697249              
00697256              while (true)
00697256              {
00697256                  char const* eax_34;
00697256                  eax_34 = ((int16_t)arg5[ebp_1]);
0069725f                  eax_34 -= this_1->m_FirstUnicodeCharacter;
0069726c                  void* eax_37 = &this_1->m_Characters.m_data[((uint32_t)eax_34)];
00697270                  int32_t ebp_100 = 0;
00697274                  int32_t var_30_5 = 0;
00697278                  uint32_t m_HorizontalSpacing_4;
00697278                  
00697278                  if (edx_35 == 0)
00697278                  {
006972a3                      m_HorizontalSpacing_4 = (((uint32_t)*(uint8_t*)((char*)eax_37 + 0x10)) + (((int32_t)*(uint8_t*)((char*)eax_37 + 0x12)) + ((int32_t)*(uint8_t*)((char*)eax_37 + 0x13))));
006972a7                      ebp_100 = ((int32_t)*(uint8_t*)((char*)eax_37 + 0x12));
006972ab                      var_30_5 = ((int32_t)*(uint8_t*)((char*)eax_37 + 0x14));
00697278                  }
00697278                  else
00697281                      m_HorizontalSpacing_4 = this_1->m_HorizontalSpacing;
00697281                  
006972ca                  uint32_t edx_45 = (((uint32_t)*(uint8_t*)((char*)eax_37 + 0x11)) - 1);
006972cb                  long double x87_r7_45 = ((((long double)(ebp_100 + edi_3)) * ((long double)arg4)) + ((long double)var_20_1));
006972d3                  long double x87_r7_46 = (x87_r7_45 * ((long double)arg2));
006972df                  long double x87_r7_49 = (((x87_r7_46 + x87_r7_46) - ((long double)1f)) - ((long double)arg2));
006972e3                  long double x87_r6_29 = ((long double)(((uint32_t)*(uint8_t*)((char*)eax_37 + 0x10)) - 1));
006972eb                  struct TextureBasedFontVertexType* m_data = g_FontVertices.m_data;
006972f1                  *(uint32_t*)(&*(uint32_t*)((char*)m_data->Origin)[8] + esi_24) = 0;
006972f9                  *(uint32_t*)(&m_data->Diffuse + esi_24) = ecx_7;
006972fd                  void* edx_46 = ((char*)m_data + esi_24);
00697306                  long double x87_r6_32 = (((x87_r6_29 * ((long double)arg4)) + ((long double)((float)x87_r7_45))) * ((long double)arg2));
00697312                  long double x87_r6_35 = (((x87_r6_32 + x87_r6_32) - ((long double)1f)) + ((long double)arg2));
0069731e                  long double x87_r5_39 = ((((long double)var_30_5) * ((long double)arg4)) + ((long double)var_1c_1));
00697326                  long double x87_r4_50 = (((long double)arg3) * x87_r5_39);
00697336                  arg6 = ((float)-((((x87_r4_50 + x87_r4_50) - ((long double)1f)) - ((long double)arg3))));
00697342                  *(uint32_t*)((char*)edx_46 + 4) = arg6;
0069734b                  long double x87_r5_41 = ((x87_r5_39 + (((long double)edx_45) * ((long double)arg4))) * ((long double)arg3));
0069735b                  long double x87_r5_45 = -((((x87_r5_41 + x87_r5_41) - ((long double)1f)) + ((long double)arg3)));
0069735f                  *(uint32_t*)edx_46 = ((float)x87_r7_49);
00697363                  *(uint32_t*)((char*)edx_46 + 0x10) = *(uint32_t*)eax_37;
0069736b                  *(uint32_t*)((char*)edx_46 + 0x14) = *(uint32_t*)((char*)eax_37 + 4);
0069736e                  float* m_data_1 = g_FontVertices.m_data;
00697374                  *(uint32_t*)((char*)m_data_1 + (esi_24 + 0x18)) = ((float)x87_r7_49);
00697377                  void* edx_47 = ((char*)m_data_1 + (esi_24 + 0x18));
00697379                  *(uint32_t*)((char*)edx_47 + 4) = ((float)x87_r5_45);
0069737c                  *(uint32_t*)((char*)edx_47 + 8) = 0;
0069737f                  *(uint32_t*)((char*)edx_47 + 0xc) = ecx_7;
00697386                  *(uint32_t*)((char*)edx_47 + 0x10) = *(uint32_t*)eax_37;
0069738c                  *(uint32_t*)((char*)edx_47 + 0x14) = *(uint32_t*)((char*)eax_37 + 0xc);
00697398                  float* edx_49 = (g_FontVertices.m_data + (esi_24 + 0x30));
0069739a                  *(uint32_t*)edx_49 = ((float)x87_r6_35);
0069739f                  edx_49[1] = ((float)x87_r5_45);
006973a2                  edx_49[2] = 0;
006973a7                  edx_49[3] = ecx_7;
006973ad                  edx_49[4] = *(uint32_t*)((char*)eax_37 + 8);
006973b3                  edx_49[5] = *(uint32_t*)((char*)eax_37 + 0xc);
006973b6                  float* m_data_2 = g_FontVertices.m_data;
006973bc                  *(uint32_t*)((char*)m_data_2 + (esi_24 + 0x48)) = ((float)x87_r6_35);
006973bf                  *(uint32_t*)(((char*)m_data_2 + (esi_24 + 0x48)) + 8) = 0;
006973c3                  *(uint32_t*)(((char*)m_data_2 + (esi_24 + 0x48)) + 4) = ((float)x87_r5_45);
006973c7                  *(uint32_t*)(((char*)m_data_2 + (esi_24 + 0x48)) + 0xc) = ecx_7;
006973ce                  *(uint32_t*)(((char*)m_data_2 + (esi_24 + 0x48)) + 0x10) = *(uint32_t*)((char*)eax_37 + 8);
006973d7                  *(uint32_t*)(((char*)m_data_2 + (esi_24 + 0x48)) + 0x14) = *(uint32_t*)((char*)eax_37 + 0xc);
006973da                  float* m_data_3 = g_FontVertices.m_data;
006973e7                  *(uint32_t*)(((char*)m_data_3 + (esi_24 + 0x60)) + 4) = arg6;
006973eb                  *(uint32_t*)((char*)m_data_3 + (esi_24 + 0x60)) = ((float)x87_r6_35);
006973ee                  void* edx_51 = ((char*)m_data_3 + (esi_24 + 0x60));
006973f0                  *(uint32_t*)((char*)edx_51 + 8) = 0;
006973f3                  *(uint32_t*)((char*)edx_51 + 0xc) = ecx_7;
006973f9                  *(uint32_t*)((char*)edx_51 + 0x10) = *(uint32_t*)((char*)eax_37 + 8);
006973ff                  *(uint32_t*)((char*)edx_51 + 0x14) = *(uint32_t*)((char*)eax_37 + 4);
0069740f                  float* edx_53 = (g_FontVertices.m_data + (esi_24 + 0x78));
00697411                  edx_53[1] = arg6;
00697414                  *(uint32_t*)edx_53 = ((float)x87_r7_49);
00697416                  edx_53[2] = 0;
00697419                  edx_53[3] = ecx_7;
0069741e                  edx_53[4] = *(uint32_t*)eax_37;
00697428                  edi_3 += m_HorizontalSpacing_4;
0069742e                  esi_24 += 0x90;
00697431                  edx_53[5] = *(uint32_t*)((char*)eax_37 + 4);
00697438                  ebp_1 = (var_10_1 + 1);
0069743b                  var_10_1 = ebp_1;
0069743b                  
0069743f                  if (ebp_1 >= eax_1)
0069743f                      break;
0069743f                  
0069724e                  edx_35 = var_14_2;
00697256              }
00697237          }
00697237          
0069744a          long double x87_r7_51 = fabsl(((long double)arg4));
0069744c          long double temp2_1 = ((long double)0.000199999995f);
0069744c          (x87_r7_51 - temp2_1);
00697452          eax_3 = ((((x87_r7_51 < temp2_1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_51, temp2_1))) ? 1 : 0) << 0xa) | ((((x87_r7_51 == temp2_1) ? 1 : 0) << 0xe) | 0))));
00697454          bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x41} */;
00697454          
00697457          if (p_1)
0069745d              this_1->m_QueuedTextUsesScaling = 1;
006968d6      }
006968b0  }

0069746a                                90 90 90 90 90 90                                                            ......

00697470  void __thiscall TextureBasedFont::RenderText(class TextureBasedFont* this, int32_t const arg2, int32_t const arg3, char const* arg4, uint32_t const arg5, uint32_t const arg6)

00697470  {
00697496      TextureBasedFont::RenderText(this, ((float)((long double)arg2)), ((float)((long double)arg3)), 1f, arg4, arg5, arg6);
00697470  }

0069749e                                                                                            90 90                                ..

006974a0  uint8_t __fastcall TextureBasedFont::InitFromFont(class TextureBasedFont* this, uint32_t const arg2)

006974a0  {
006974a6      this->m_IsReadyToRender = 0;
006974b3      class RenderTexture* eax_1 = RenderDevice::render_device->vtable->CreateTexture();
006974b8      this->m_pTexture = eax_1;
006974b8      
006974bb      if (eax_1 != 0)
006974bb      {
006974c1          eax_1->m_AllowManagement = 0;
006974c1          
006974c7          if (this->m_pMaterial != 0)
006974c7              goto label_6975d6;
006974c7          
006974d2          void* eax_2 = operator new(0x4e0);
006974d2          
006974dc          if (eax_2 == 0)
006974e7              eax_1 = nullptr;
006974dc          else
006974e0              eax_1 = RenderMaterial::RenderMaterial(eax_2);
006974e0          
006974eb          this->m_pMaterial = eax_1;
006974eb          
006974ee          if (eax_1 != 0)
006974ee          {
006974f9              eax_1 = operator new(0xd8);
006974f9              
00697503              if (eax_1 != 0)
00697503              {
00697510                  class RenderTexture* edi_1 = MaterialLayer::MaterialLayer(eax_1);
00697510                  
00697514                  if (edi_1 != 0)
00697514                  {
0069751c                      eax_1 = operator new(0x48);
0069751c                      
00697526                      if (eax_1 != 0)
00697526                      {
0069752e                          eax_1 = LayerStage::LayerStage(eax_1);
0069752e                          
00697537                          if (eax_1 != 0)
00697537                          {
00697544                              MaterialLayer::InsertStage(edi_1, edi_1->m_numLinks, eax_1);
00697549                              class RenderMaterial* m_pMaterial = this->m_pMaterial;
00697554                              RenderMaterial::InsertLayer(m_pMaterial, m_pMaterial->layers.m_num, edi_1);
00697559                              edi_1->vtable |= 0x20;
0069755c                              *(int32_t*)((char*)edi_1 + 0x34) = 5;
00697563                              edi_1->m_bIsLost*(int32_t*)((char*)edi_1 + 0x38) = 6;
0069756a                              *(uint8_t*)((char*)edi_1->m_TimeUsed)[4] = 0;
0069756d                              edi_1->m_TimeUsed = 1.12103877e-44f;
00697574                              edi_1->m_FrameUsed = 1;
00697581                              LayerStage::SetTexture(eax_1, this->m_pTexture);
0069758b                              eax_1->m_pLast = 1;
0069758e                              eax_1->m_pMaintainer = 1;
00697596                              *(uint32_t*)((char*)eax_1->m_timeStamp)[4] = 3;
00697599                              eax_1->m_pNext = 3;
0069759c                              eax_1->m_DID.id = 3;
006975a4                              eax_1->m_TimeUsed = 0f;
006975a7                              eax_1->m_AllowedInFreeList*(int32_t*)((char*)eax_1 + 0x2c) = 2;
006975aa                              eax_1->vtable = nullptr;
006975ad                              *(int32_t*)((char*)eax_1 + 0x34) = 4;
006975b4                              eax_1->m_bIsLost*(int32_t*)((char*)eax_1 + 0x38) = 2;
006975b7                              *(int32_t*)((char*)eax_1 + 0x3c) = 0;
006975bd                              RenderMaterial::Optimize(this->m_pMaterial);
006975d6                          label_6975d6:
006975d6                              
006975db                              if (this->m_pTexture->vtable->Create2D(0x100, 0x100, 1, 0x15, 0) != 0)
006975db                              {
00697606                                  eax_1 = *(uint32_t*)DBObj::GetDIDByEnum(&arg2, arg2, 9);
00697608                                  this->m_SourceFontDID.id = eax_1;
00697608                                  
00697616                                  if (eax_1 != INVALID_DID.id)
00697628                                      return TextureBasedFont::SetupFontTexture(this) != 0;
006975db                              }
006975db                              else
006975db                              {
006975dd                                  class RenderTexture* m_pTexture = this->m_pTexture;
006975dd                                  
006975e2                                  if (m_pTexture != 0)
006975e2                                  {
006975e4                                      m_pTexture->vtable->Release();
006975e9                                      this->m_pTexture = nullptr;
006975e2                                  }
006975db                              }
00697537                          }
00697526                      }
00697514                  }
00697503              }
006974ee          }
006974bb      }
006974bb      
006975ef      eax_1 = 0;
006975f2      return 0;
006974a0  }

0069762b                                   90 90 90 90 90                                                             .....

00697630  class TResult* TextureBasedFont::CreateFromFont(class TResult* __return, uint32_t const arg2, class TextureBasedFont** arg3)

00697630  {
00697634      void* eax = operator new(0x30);
00697634      
00697640      if (eax == 0)
0069767a          eax = nullptr;
00697640      else
00697640      {
00697642          *(uint32_t*)((char*)eax + 4) = 1;
00697649          *(uint32_t*)eax = &TextureBasedFont::`vftable';
00697655          *(uint32_t*)((char*)eax + 8) = INVALID_DID.id;
00697658          __builtin_memset(((char*)eax + 0x10), 0, 0x1e);
00697640      }
00697640      
0069767e      void** esi = arg3;
00697682      *(uint32_t*)esi = eax;
00697682      
00697684      if (eax != 0)
00697684      {
0069768a          uint32_t var_c_1 = arg2;
0069768a          
00697694          if (TextureBasedFont::InitFromFont(eax, arg2) != 0)
00697694          {
006976bb              __return->m_val = 0;
006976be              return __return;
00697694          }
00697694          
00697696          void* ecx_3 = *(uint32_t*)esi;
00697696          
0069769a          if (ecx_3 != 0)
0069769a          {
0069769c              int32_t temp0_1 = *(uint32_t*)((char*)ecx_3 + 4);
0069769c              *(uint32_t*)((char*)ecx_3 + 4) -= 1;
0069769c              
0069769f              if (temp0_1 == 1)
006976a5                  **(uint32_t**)ecx_3(1);
006976a5              
006976a7              *(uint32_t*)esi = nullptr;
0069769a          }
00697684      }
00697684      
006976ae      __return->m_val = 0x80004005;
006976b5      return __return;
00697630  }

006976bf                                                                                               90                                 .

006976c0  void __fastcall RenderVertexStreamD3D::Begin(class RenderVertexStreamD3D* this)

006976c0  {
006976c6      this->m_pD3DVertexBuffer = nullptr;
006976c9      this->m_nNumVertices = 0;
006976d6      __builtin_memset(&this->m_VertexFormatInfo, 0, 0x74);
006976d9      __builtin_memset(&this->m_Flags, 0, 0x14);
006976c0  }

006976f9                                                                             90 90 90 90 90 90 90                           .......

00697700  uint8_t __thiscall RenderVertexStreamD3D::Create(class RenderVertexStreamD3D* this, uint32_t const arg2, uint32_t const arg3, uint32_t const arg4)

00697700  {
00697709      if (arg2 > 0)
00697709      {
0069770b          this->m_nNumVertices = arg2;
00697712          this->m_VertexFormatInfo.format = arg3;
00697717          VertexFormatInfo::GenerateOffsets(&this->m_VertexFormatInfo.format);
0069771f          bool cond:1_1 = this->m_VertexFormatInfo.numMatrices != 0;
00697725          this->m_Flags = arg4;
00697725          
0069772b          if (!(cond:1_1))
0069772b          {
0069773a              GraphicsResource::SetResourceIsThrashable(this, (!(((int8_t)(arg4 >> 2))) & 1));
0069773f              this->m_nStreamFrameID = 0;
00697749              int32_t eax_4;
00697749              eax_4 = 1;
0069774c              return 1;
0069772b          }
00697709      }
00697709      
0069774f      uint32_t const eax_1;
0069774f      eax_1 = 0;
00697752      return 0;
00697700  }

00697755                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00697760  uint8_t __fastcall RenderVertexStreamD3D::CreateD3DVertexBuffer(class RenderVertexStreamD3D* this)

00697760  {
00697766      class RenderVertexStreamD3D* this_1 = this;
00697768      uint32_t m_Flags = this_1->m_Flags;
00697771      int32_t var_8 = 8;
00697771      
0069777d      if (((m_Flags & 1) != 0 || (m_Flags & 0x10) == 0))
0069777f          var_8 = 0x208;
0069777f      
00697787      uint32_t format = this_1->m_VertexFormatInfo.format;
00697787      
00697791      if (((format & 0x20) != 0 || (m_Flags & 2) != 0))
00697791      {
0069779d          var_8 |= 0x40;
006977a1          this_1->m_Flags = (m_Flags | 2);
00697791      }
00697791      
006977ac      this = RenderDevice::render_device->m_caps.bHardwareVertexProcessing;
006977ac      
006977b1      if (this == 0)
006977b3          var_8 |= 0x10;
006977b3      
006977b8      uint32_t m_Flags_1 = this_1->m_Flags;
006977be      int32_t ebx = 0;
006977be      
006977c6      if (((m_Flags_1 & 4) != 0 || this == 0))
006977c6      {
006977cb          ebx = 2;
006977d0          this_1->m_Flags = (m_Flags_1 | 4);
006977c6      }
006977c6      
006977d6      m_Flags_1 = this_1->m_VertexFormatInfo.bFVFCompatible;
006977db      uint32_t format_1 = 0;
006977db      
006977e3      if (m_Flags_1 != 0)
006977e5          format_1 = format;
006977e5      
006977ec      uint32_t edi_4 = (this_1->m_VertexFormatInfo.size * this_1->m_nNumVertices);
006977f0      uint8_t var_9 = 1;
006977f0      
00697806      while (true)
00697806      {
00697806          int32_t* eax_2 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
0069781e          int32_t eax_3 = *(uint32_t*)(*(uint32_t*)eax_2 + 0x68)(eax_2, edi_4, var_8, format_1, ebx, &this_1->m_pD3DVertexBuffer, 0);
0069781e          
00697823          if (eax_3 == 0)
00697823              break;
00697823          
0069782a          if (eax_3 != 0x8876017c)
0069782a          {
00697876              eax_3 = 0;
0069787c              return 0;
0069782a          }
0069782a          
0069782c          eax_3 = var_9;
0069782c          
00697832          if (eax_3 == 0)
00697832          {
00697876              eax_3 = 0;
0069787c              return 0;
00697832          }
00697832          
0069783d          var_9 = GraphicsResource::DiscardResourceBytes(edi_4);
00697806      }
00697806      
00697846      GraphicsResource::SetResourceSize(this_1, edi_4);
0069784d      GraphicsResource::MarkResourceAsNotLost(this_1);
0069785a      this_1->m_nStreamFrameID += 1;
00697860      this_1->m_nNextVertexIndex = 0;
0069786c      uint32_t eax_6;
0069786c      eax_6 = 1;
00697872      return 1;
00697760  }

006977fa                                                                                8d 9b 00 00 00 00                            ......
0069787d                                                                                         90 90 90                               ...

00697880  struct IDirect3DVertexBuffer9* __fastcall RenderVertexStreamD3D::GetD3DVertexBuffer(class RenderVertexStreamD3D* this)

00697880  {
00697888      if ((this->m_bIsLost != 0 && this->vtable->RestoreResource() == 0))
00697896          return 0;
00697896      
006978a3      this->m_TimeUsed = (*(uint32_t*)Timer::local_time);
006978a6      *(uint32_t*)((char*)this->m_TimeUsed)[4] = *(int32_t*)((char*)Timer::local_time + 4);
006978a9      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
006978a9      
006978b0      if (RenderDevice::render_device_1 != 0)
006978b8          this->m_FrameUsed = RenderDevice::render_device_1->m_nFrameStamp;
006978b8      
006978c0      if (this->m_pD3DVertexBuffer == 0)
006978c4          RenderVertexStreamD3D::CreateD3DVertexBuffer(this);
006978c4      
006978cd      return this->m_pD3DVertexBuffer;
00697880  }

006978ce                                            90 90                                                                ..

006978d0  uint8_t __thiscall RenderVertexStreamD3D::FillData(class RenderVertexStreamD3D* this, uint32_t const arg2, uint32_t const arg3, void const* arg4, class VertexFormatInfo const* arg5, uint8_t const arg6, uint32_t* arg7)

006978d0  {
006978d9      struct IDirect3DVertexBuffer9* m_nNumVertices = RenderVertexStreamD3D::GetD3DVertexBuffer(this);
006978e0      struct IDirect3DVertexBuffer9* m_nNumVertices_3 = m_nNumVertices;
006978e0      
006978e4      if (m_nNumVertices != 0)
006978e4      {
006978f4          int32_t eax_1 = (this->m_Flags & 1);
006978f7          int32_t edx_1 = 0x800;
006978f7          
00697900          if (eax_1 == 0)
00697900          {
0069795a              this->m_nNextVertexIndex = arg2;
00697960          label_697960:
00697960              uint32_t m_nNextVertexIndex_1 = this->m_nNextVertexIndex;
00697966              uint32_t m_nNumVertices_1 = this->m_nNumVertices;
00697966              
0069796e              if ((arg3 + m_nNextVertexIndex_1) <= m_nNumVertices_1)
0069796e              {
00697974                  uint32_t size = this->m_VertexFormatInfo.size;
0069797c                  int32_t ecx_4 = (size * m_nNextVertexIndex_1);
00697989                  uint32_t eax_3;
00697989                  
00697989                  if ((ecx_4 != 0 || arg3 != m_nNumVertices_1))
0069798f                      eax_3 = 0;
00697989                  else
0069798b                      eax_3 = 1;
0069798b                  
00697997                  struct IDirect3DVertexBuffer9* m_nNumVertices_2 = nullptr;
00697997                  
006979a8                  if ((eax_1 == 0 && this->m_WriteLockCount >= 1))
006979a8                  {
006979ac                      if (eax_3 == 0)
006979b6                          edx_1 |= 0x1000;
006979ac                      else
006979ae                          edx_1 |= 0x2000;
006979a8                  }
006979a8                  
006979d1                  int32_t edx_7;
006979d1                  edx_7 = eax_3 != 0;
006979d1                  
006979df                  if (m_nNumVertices_3->vtable->Lock(m_nNumVertices_3, ecx_4, ((edx_7 - 1) & (size * arg3)), &m_nNumVertices_2, edx_1) >= 0)
006979df                  {
006979e1                      m_nNumVertices = m_nNumVertices_2;
006979e1                      
006979e7                      if (m_nNumVertices != 0)
006979e7                      {
00697a05                          this->m_WriteLockCount += 1;
00697a0b                          RenderVertexBuffer::TransferVertices(arg4, arg5, m_nNumVertices, &this->m_VertexFormatInfo, arg3, arg6);
00697a10                          m_nNumVertices_3->vtable->Unlock(m_nNumVertices_3);
00697a24                          *(uint32_t*)arg7 = this->m_nNextVertexIndex;
00697a24                          
00697a2d                          if ((this->m_Flags & 1) != 0)
00697a2f                              this->m_nNextVertexIndex += arg3;
00697a2f                          
00697a38                          uint32_t eax_6;
00697a38                          eax_6 = 1;
00697a3e                          return 1;
006979e7                      }
006979df                  }
0069796e              }
00697900          }
00697900          else
00697900          {
00697908              m_nNumVertices = this->m_nNumVertices;
0069790f              this->m_nIdealVertexCount += arg3;
0069790f              
00697915              if (arg3 <= m_nNumVertices)
00697915              {
00697925                  if ((this->m_nNextVertexIndex + arg3) > m_nNumVertices)
00697925                  {
0069792d                      m_nNumVertices = (this->m_nStreamFrameID + 1);
0069792e                      this->m_nNextVertexIndex = 0;
00697938                      this->m_nStreamFrameID = m_nNumVertices;
00697925                  }
00697925                  
0069793e                  uint32_t m_nNextVertexIndex = this->m_nNextVertexIndex;
00697944                  int32_t edx_4 = -(m_nNextVertexIndex);
0069794e                  edx_1 = (((edx_4 - edx_4) & 0xfffff000) + 0x2800);
00697954                  goto label_697960;
00697915              }
00697900          }
006978e4      }
006978e4      
00697a44      m_nNumVertices = 0;
00697a4a      return 0;
006978d0  }

00697a4d                                         90 90 90                                                               ...

00697a50  void __fastcall RenderVertexStreamD3D::ResetVertexIndices(class RenderVertexStreamD3D* this)

00697a50  {
00697a52      this->m_nNextVertexIndex = 0;
00697a58      this->m_nIdealVertexCount = 0;
00697a5e      this->m_nStreamFrameID += 1;
00697a50  }

00697a65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00697a70  uint8_t __fastcall RenderVertexStreamD3D::PurgeResource(class RenderVertexStreamD3D* this)

00697a70  {
00697a73      uint8_t result = ArgumentParser::OnCommandLineEvaluationDone(this);
00697a73      
00697a7a      if (result == 0)
00697a7d          return result;
00697a7d      
00697a7e      struct IDirect3DVertexBuffer9* m_pD3DVertexBuffer = this->m_pD3DVertexBuffer;
00697a7e      
00697a83      if (m_pD3DVertexBuffer != 0)
00697a83      {
00697a85          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00697a85          
00697a8d          if (RenderDevice::render_device_1 != 0)
00697a90              RenderDeviceD3D::InvalidateCachedVertexBufferPointer(RenderDevice::render_device_1, m_pD3DVertexBuffer);
00697a90          
00697a95          m_pD3DVertexBuffer = this->m_pD3DVertexBuffer;
00697a95          
00697a9a          if (m_pD3DVertexBuffer != 0)
00697a9a          {
00697a9c              m_pD3DVertexBuffer->vtable->Release(m_pD3DVertexBuffer);
00697aa2              this->m_pD3DVertexBuffer = nullptr;
00697a9a          }
00697a9a          
00697aa9          this->m_WriteLockCount = 0;
00697a83      }
00697a83      
00697ab3      m_pD3DVertexBuffer = 1;
00697ab6      return 1;
00697a70  }

00697ab7                                                                       90 90 90 90 90 90 90 90 90                         .........

00697ac0  void __fastcall RenderVertexStreamD3D::End(class RenderVertexStreamD3D* this)

00697ac0  {
00697ac3      struct IDirect3DVertexBuffer9* m_pD3DVertexBuffer = this->m_pD3DVertexBuffer;
00697ac3      
00697ac8      if (m_pD3DVertexBuffer != 0)
00697ac8      {
00697aca          class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00697aca          
00697ad2          if (RenderDevice::render_device_1 != 0)
00697ad5              RenderDeviceD3D::InvalidateCachedVertexBufferPointer(RenderDevice::render_device_1, m_pD3DVertexBuffer);
00697ad5          
00697ada          struct IDirect3DVertexBuffer9* m_pD3DVertexBuffer_1 = this->m_pD3DVertexBuffer;
00697ada          
00697adf          if (m_pD3DVertexBuffer_1 != 0)
00697adf          {
00697ae1              m_pD3DVertexBuffer_1->vtable->Release(m_pD3DVertexBuffer_1);
00697ae7              this->m_pD3DVertexBuffer = nullptr;
00697adf          }
00697adf          
00697aee          this->m_WriteLockCount = 0;
00697ac8      }
00697ac8      
00697afb      /* tailcall */
00697afb      return GraphicsResource::MarkResourceAsNotLost(this);
00697ac0  }


00697b00  void __fastcall RenderVertexStreamD3D::Destroy(class RenderVertexStreamD3D* this)

00697b00  {
00697b04      struct IDirect3DVertexBuffer9* m_pD3DVertexBuffer = this->m_pD3DVertexBuffer;
00697b04      
00697b0c      if (m_pD3DVertexBuffer != 0)
00697b0c      {
00697b0e          class RenderDeviceD3D* RenderDevice::render_device_1 = RenderDevice::render_device;
00697b0e          
00697b16          if (RenderDevice::render_device_1 != 0)
00697b19              RenderDeviceD3D::InvalidateCachedVertexBufferPointer(RenderDevice::render_device_1, m_pD3DVertexBuffer);
00697b19          
00697b1e          struct IDirect3DVertexBuffer9* m_pD3DVertexBuffer_1 = this->m_pD3DVertexBuffer;
00697b1e          
00697b23          if (m_pD3DVertexBuffer_1 != 0)
00697b23          {
00697b25              m_pD3DVertexBuffer_1->vtable->Release(m_pD3DVertexBuffer_1);
00697b2b              this->m_pD3DVertexBuffer = nullptr;
00697b23          }
00697b23          
00697b2e          this->m_WriteLockCount = 0;
00697b0c      }
00697b0c      
00697b36      GraphicsResource::MarkResourceAsNotLost(this);
00697b3b      this->m_pD3DVertexBuffer = nullptr;
00697b3e      this->m_nNumVertices = 0;
00697b4b      __builtin_memset(&this->m_VertexFormatInfo, 0, 0x74);
00697b4e      __builtin_memset(&this->m_Flags, 0, 0x14);
00697b00  }

00697b6f                                               90                                                                 .

00697b70  void __fastcall RenderIndexStreamD3D::RenderIndexStreamD3D(class RenderIndexStreamD3D* this)

00697b70  {
00697b73      GraphicsResource::GraphicsResource(this);
00697b7a      this->m_Flags = 0;
00697b7d      __builtin_memset(&this->m_NumIndices, 0, 0x14);
00697b8c      this->vtable = 0x8009d4;
00697b92      this->m_IndexSizeInBytes = 2;
00697b70  }

00697b9d                                                                                         90 90 90                               ...

00697ba0  uint8_t __thiscall RenderIndexStreamD3D::Init(class RenderIndexStreamD3D* this, uint32_t const arg2, uint32_t const arg3)

00697ba0  {
00697ba9      if (arg2 <= 0)
00697ba9      {
00697bd1          uint32_t const eax_4;
00697bd1          eax_4 = 0;
00697bd4          return 0;
00697ba9      }
00697ba9      
00697bab      this->m_NumIndices = arg2;
00697bb2      this->m_Flags = arg3;
00697bbf      GraphicsResource::SetResourceIsThrashable(this, (!(((int8_t)(arg3 >> 1))) & 1));
00697bc4      this->m_StreamFrameID = 0;
00697bcb      int32_t eax_3;
00697bcb      eax_3 = 1;
00697bce      return 1;
00697ba0  }

00697bd7                                                                       90 90 90 90 90 90 90 90 90                         .........

00697be0  uint8_t __fastcall RenderIndexStreamD3D::CreateDirect3DIndexBuffer(class RenderIndexStreamD3D* this)

00697be0  {
00697be6      uint8_t m_Flags = ((int8_t)this->m_Flags);
00697beb      int32_t var_8 = 8;
00697beb      
00697bf7      if (((m_Flags & 1) != 0 || (m_Flags & 4) == 0))
00697bf9          var_8 = 0x208;
00697bf9      
00697c07      class RenderDevice* ecx;
00697c07      ecx = RenderDevice::render_device->m_caps.bHardwareVertexProcessing;
00697c07      
00697c0c      if (ecx == 0)
00697c0e          var_8 |= 0x10;
00697c0e      
00697c15      int32_t var_4 = 0;
00697c15      
00697c21      if (((m_Flags & 2) != 0 || ecx == 0))
00697c23          var_4 = 2;
00697c23      
00697c2b      uint32_t m_IndexSizeInBytes = this->m_IndexSizeInBytes;
00697c2b      
00697c36      if ((m_IndexSizeInBytes != 2 && m_IndexSizeInBytes != 4))
00697c36      {
00697c38          m_IndexSizeInBytes = 0;
00697c3e          return 0;
00697c36      }
00697c36      
00697c45      int32_t ebx;
00697c45      
00697c45      if (m_IndexSizeInBytes != 2)
00697c45      {
00697c51          ebx = 0x66;
00697c51          
00697c56          if (m_IndexSizeInBytes != 4)
00697c58              ebx = var_4;
00697c45      }
00697c45      else
00697c47          ebx = 0x65;
00697c47      
00697c5f      uint32_t esi_1 = (this->m_NumIndices * m_IndexSizeInBytes);
00697c62      uint8_t var_9 = 1;
00697c62      
00697c76      while (true)
00697c76      {
00697c76          int32_t* eax = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
00697c8e          int32_t eax_1 = *(uint32_t*)(*(uint32_t*)eax + 0x6c)(eax, esi_1, var_8, ebx, var_4, &this->m_pDirect3DIndexBuffer, 0);
00697c8e          
00697c93          if (eax_1 == 0)
00697c93              break;
00697c93          
00697c9a          if (eax_1 != 0x8876017c)
00697c9a          {
00697ce9              eax_1 = 0;
00697cef              return 0;
00697c9a          }
00697c9a          
00697c9c          eax_1 = var_9;
00697c9c          
00697ca2          if (eax_1 == 0)
00697ca2          {
00697ce9              eax_1 = 0;
00697cef              return 0;
00697ca2          }
00697ca2          
00697cad          var_9 = GraphicsResource::DiscardResourceBytes(esi_1);
00697c76      }
00697c76      
00697cb6      GraphicsResource::SetResourceSize(this, esi_1);
00697cbd      GraphicsResource::MarkResourceAsNotLost(this);
00697cc5      uint32_t ecx_5 = (this->m_StreamFrameID + 1);
00697cc6      this->m_NextRemoteIndex = 0;
00697ccd      this->m_StreamFrameID = ecx_5;
00697cda      g_TotalIndexBufferRemoteBytes += esi_1;
00697cdf      int32_t eax_4;
00697cdf      eax_4 = 1;
00697ce5      return 1;
00697be0  }


00697cf0  uint8_t __fastcall RenderIndexStreamD3D::PurgeResource(class RenderIndexStreamD3D* this)

00697cf0  {
00697cf3      uint8_t result = ArgumentParser::OnCommandLineEvaluationDone(this);
00697cf3      
00697cfa      if (result == 0)
00697cfd          return result;
00697cfd      
00697cfe      struct IDirect3DIndexBuffer9* m_pDirect3DIndexBuffer = this->m_pDirect3DIndexBuffer;
00697cfe      
00697d03      if (m_pDirect3DIndexBuffer != 0)
00697d03      {
00697d05          m_pDirect3DIndexBuffer->vtable->Release(m_pDirect3DIndexBuffer);
00697d0e          int32_t edx_2 = (this->m_NumIndices * this->m_IndexSizeInBytes);
00697d12          this->m_pDirect3DIndexBuffer = nullptr;
00697d19          this->m_WriteLockCount = 0;
00697d20          g_TotalIndexBufferRemoteBytes -= edx_2;
00697d03      }
00697d03      
00697d26      m_pDirect3DIndexBuffer = 1;
00697d29      return 1;
00697cf0  }

00697d2a                                90 90 90 90 90 90                                                            ......

00697d30  uint8_t __fastcall RenderVertexStreamD3D::RestoreResource(class RenderVertexStreamD3D* this)

00697d30  {
00697d3a      return GraphicsResource::RestoreResource(this) != 0;
00697d30  }

00697d3b                                                                                   90 90 90 90 90                             .....

00697d40  struct IDirect3DIndexBuffer9* __fastcall RenderIndexStreamD3D::GetDirect3DIndexBuffer(class RenderIndexStreamD3D* this)

00697d40  {
00697d48      if ((this->m_bIsLost != 0 && this->vtable->RestoreResource() == 0))
00697d56          return 0;
00697d56      
00697d63      this->m_TimeUsed = (*(uint32_t*)Timer::local_time);
00697d66      *(uint32_t*)((char*)this->m_TimeUsed)[4] = *(int32_t*)((char*)Timer::local_time + 4);
00697d69      class RenderDevice* RenderDevice::render_device_1 = RenderDevice::render_device;
00697d69      
00697d70      if (RenderDevice::render_device_1 != 0)
00697d78          this->m_FrameUsed = RenderDevice::render_device_1->m_nFrameStamp;
00697d78      
00697d80      if (this->m_pDirect3DIndexBuffer == 0)
00697d84          RenderIndexStreamD3D::CreateDirect3DIndexBuffer(this);
00697d84      
00697d8d      return this->m_pDirect3DIndexBuffer;
00697d40  }

00697d8e                                            90 90                                                                ..

00697d90  uint8_t __thiscall RenderIndexStreamD3D::FillData(class RenderIndexStreamD3D* this, uint32_t const arg2, void const* arg3, uint32_t* arg4)

00697d90  {
00697d99      struct IDirect3DIndexBuffer9* eax = RenderIndexStreamD3D::GetDirect3DIndexBuffer(this);
00697da0      struct IDirect3DIndexBuffer9* var_4 = eax;
00697da0      
00697da4      if (eax != 0)
00697da4      {
00697daa          uint32_t m_NumIndices = this->m_NumIndices;
00697db3          int32_t esi_1 = 0x800;
00697db3          
00697db8          if (arg2 <= m_NumIndices)
00697db8          {
00697dc1              eax = (this->m_Flags & 1);
00697dc4              struct IDirect3DIndexBuffer9* var_8_1 = eax;
00697dc4              
00697dc8              if (eax != 0)
00697dc8              {
00697dd1                  if ((this->m_NextRemoteIndex + arg2) > m_NumIndices)
00697dd1                  {
00697dd6                      eax = (this->m_StreamFrameID + 1);
00697dd7                      this->m_NextRemoteIndex = 0;
00697dde                      this->m_StreamFrameID = eax;
00697dd1                  }
00697dd1                  
00697de1                  uint32_t m_NextRemoteIndex_1 = this->m_NextRemoteIndex;
00697de4                  int32_t esi_2 = -(m_NextRemoteIndex_1);
00697dee                  esi_1 = (((esi_2 - esi_2) & 0xfffff000) + 0x2800);
00697dc8              }
00697dc8              
00697df4              uint32_t m_NextRemoteIndex = this->m_NextRemoteIndex;
00697df4              
00697dfc              if ((m_NextRemoteIndex + arg2) <= m_NumIndices)
00697dfc              {
00697e02                  uint32_t m_IndexSizeInBytes = this->m_IndexSizeInBytes;
00697e0a                  int32_t ecx_2 = (m_IndexSizeInBytes * m_NextRemoteIndex);
00697e0f                  int32_t edi_2 = (m_IndexSizeInBytes * arg2);
00697e17                  int32_t eax_4;
00697e17                  
00697e17                  if ((ecx_2 != 0 || arg2 != m_NumIndices))
00697e1d                      eax_4 = 0;
00697e17                  else
00697e19                      eax_4 = 1;
00697e19                  
00697e25                  struct IDirect3DIndexBuffer9* var_c = nullptr;
00697e25                  
00697e33                  if ((var_8_1 == 0 && this->m_WriteLockCount >= 1))
00697e33                  {
00697e37                      if (eax_4 == 0)
00697e41                          esi_1 |= 0x1000;
00697e37                      else
00697e39                          esi_1 |= 0x2000;
00697e33                  }
00697e33                  
00697e55                  int32_t edx_3;
00697e55                  edx_3 = eax_4 != 0;
00697e55                  
00697e6d                  if (var_4->vtable->Lock(var_4, ecx_2, ((edx_3 - 1) & edi_2), &var_c, esi_1) >= 0)
00697e6d                  {
00697e6f                      eax = var_c;
00697e6f                      
00697e75                      if (eax != 0)
00697e75                      {
00697e7d                          this->m_WriteLockCount += 1;
00697e8b                          int32_t esi_8;
00697e8b                          int32_t edi_4;
00697e8b                          edi_4 = __builtin_memcpy(eax, arg3, ((edi_2 >> 2) << 2));
00697e92                          __builtin_memcpy(edi_4, esi_8, (edi_2 & 3));
00697e94                          var_4->vtable->Unlock(var_4);
00697ea1                          *(uint32_t*)arg4 = this->m_NextRemoteIndex;
00697ea1                          
00697ea7                          if ((this->m_Flags & 1) != 0)
00697eb2                              this->m_NextRemoteIndex += arg2;
00697eb2                          
00697eb8                          uint32_t eax_6;
00697eb8                          eax_6 = 1;
00697ebe                          return 1;
00697e75                      }
00697e6d                  }
00697dfc              }
00697db8          }
00697da4      }
00697da4      
00697ec4      eax = 0;
00697eca      return 0;
00697d90  }

00697ecd                                         90 90 90                                                               ...

00697ed0  void __fastcall RenderIndexStreamD3D::NotifyFrameChanged(class RenderIndexStreamD3D* this)

00697ed0  {
00697ed3      uint32_t eax = (this->m_StreamFrameID + 1);
00697ed4      this->m_NextRemoteIndex = 0;
00697edb      this->m_StreamFrameID = eax;
00697ed0  }

00697edf                                                                                               90                                 .

00697ee0  void* __thiscall RenderIndexStreamD3D::`scalar deleting destructor'(class RenderIndexStreamD3D* this, uint32_t arg2)

00697ee0  {
00697ee3      struct IDirect3DIndexBuffer9* m_pDirect3DIndexBuffer = this->m_pDirect3DIndexBuffer;
00697ee8      this->vtable = 0x8009d4;
00697ee8      
00697eee      if (m_pDirect3DIndexBuffer != 0)
00697eee      {
00697ef0          m_pDirect3DIndexBuffer->vtable->Release(m_pDirect3DIndexBuffer);
00697ef9          int32_t edx_2 = (this->m_NumIndices * this->m_IndexSizeInBytes);
00697efd          this->m_pDirect3DIndexBuffer = nullptr;
00697f04          this->m_WriteLockCount = 0;
00697f0b          g_TotalIndexBufferRemoteBytes -= edx_2;
00697eee      }
00697eee      
00697f13      GraphicsResource::MarkResourceAsNotLost(this);
00697f1a      GraphicsResource::~GraphicsResource(this);
00697f1a      
00697f24      if ((arg2 & 1) != 0)
00697f27          operator delete(this);
00697f27      
00697f32      return this;
00697ee0  }

00697f35                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

00697f40  void __fastcall RenderIndexBufferD3D::Begin(class RenderIndexBufferD3D* this)

00697f40  {
00697f40      this->m_pIndexStream = nullptr;
00697f40  }

00697f48                          90 90 90 90 90 90 90 90                                                          ........

00697f50  void __fastcall RenderIndexBufferD3D::End(class RenderIndexBufferD3D* this)

00697f50  {
00697f58      if (this->staticData != 0)
00697f58      {
00697f5a          class RenderIndexStreamD3D* m_pIndexStream = this->m_pIndexStream;
00697f5a          
00697f5f          if (m_pIndexStream != 0)
00697f61              m_pIndexStream->vtable->__vecDelDtor(1);
00697f58      }
00697f58      
00697f67      this->m_pIndexStream = nullptr;
00697f50  }


00697f70  uint8_t __thiscall RenderIndexBufferD3D::Startup(class RenderIndexBufferD3D* this, uint32_t const arg2, uint8_t const arg3, uint8_t const arg4, uint8_t const arg5, uint8_t const arg6)

00697f70  {
00697f8f      RenderIndexBuffer::Startup(this, arg2, arg3, arg4, arg5, arg6);
00697f98      class RenderIndexStreamD3D* eax_1;
00697f98      eax_1 = this->staticData;
00697f98      
00697f9d      if (eax_1 == 0)
00697f9d      {
00697ff7          eax_1 = D3DPolyRender::ReferenceDynamicIndexStream(Render::m_pRenderer);
00697ffe          this->m_pIndexStream = eax_1;
00697ffe          
00698001          if (eax_1 != 0)
00698001          {
00698004              eax_1 = 1;
00698007              return 1;
00698001          }
00697f9d      }
00697f9d      else
00697f9d      {
00697fa1          void* eax_2;
00697fa1          int32_t ecx_2;
00697fa1          eax_2 = operator new(0x48);
00697fa1          
00697fab          if (eax_2 == 0)
00697fb6              eax_1 = nullptr;
00697fab          else
00697faf              eax_1 = RenderIndexStreamD3D::RenderIndexStreamD3D(eax_2);
00697faf          
00697fba          this->m_pIndexStream = eax_1;
00697fba          
00697fbd          if (eax_1 != 0)
00697fbd          {
00697fbf              ecx_2 = this->m_OnlyWriteOnce;
00697fc2              char temp1_1 = ecx_2;
00697fc2              ecx_2 = -(ecx_2);
00697fc2              
00697fd4              if (RenderIndexStreamD3D::Init(eax_1, arg2, ((ecx_2 - ecx_2) & 4)) != 0)
00697fd4              {
00698004                  eax_1 = 1;
00698007                  return 1;
00697fd4              }
00697fd4              
00697fd6              class RenderIndexStreamD3D* m_pIndexStream = this->m_pIndexStream;
00697fd6              
00697fdb              if (m_pIndexStream != 0)
00697fdd                  m_pIndexStream->vtable->__vecDelDtor(1);
00697fdd              
00697fe3              this->m_pIndexStream = nullptr;
00697fbd          }
00697f9d      }
00697f9d      
00697feb      eax_1 = 0;
00697fee      return 0;
00697f70  }

0069800a                                90 90 90 90 90 90                                                            ......

00698010  void __fastcall RenderIndexBufferD3D::Shutdown(class RenderIndexBufferD3D* this)

00698010  {
00698018      if (this->staticData != 0)
00698018      {
0069801a          class RenderIndexStreamD3D* m_pIndexStream = this->m_pIndexStream;
0069801a          
0069801f          if (m_pIndexStream != 0)
00698021              m_pIndexStream->vtable->__vecDelDtor(1);
00698018      }
00698018      
00698029      this->m_pIndexStream = nullptr;
00698030      RenderIndexBuffer::Shutdown(this);
00698035      this->m_pIndexStream = nullptr;
00698010  }

0069803e                                                                                            90 90                                ..

00698040  uint8_t __fastcall RenderIndexBufferD3D::UpdateIndexBuffer(class RenderIndexBufferD3D* this)

00698040  {
00698040      class RenderIndexBufferD3D* this_1 = this;
00698040      
0069804e      if (this->m_pIndexStream->m_bIsLost != 0)
00698050          this->needRefresh = 1;
00698050      
00698053      class RenderIndexStreamD3D* ecx;
00698053      ecx = this->needRefresh;
00698053      
00698058      if (ecx == 0)
00698111          return 1;
00698111      
00698066      uint32_t m_nMinVertexIndex;
00698066      
00698066      if (this->m_bUseIndexCaching == 0)
00698074          m_nMinVertexIndex = 0;
00698066      else
00698066      {
0069806a          RenderIndexBuffer::RecalculateMinMaxIndices(this);
0069806f          m_nMinVertexIndex = this->m_nMinVertexIndex;
00698066      }
00698066      
00698076      uint8_t* indices = this->indices;
00698079      void* indices_3 = nullptr;
00698079      
0069807d      if (m_nMinVertexIndex > 0)
0069807d      {
0069808d          indices_3 = operator new[]((((uint32_t)this->indexSize) * this->m_nNumIndices));
00698094          void* eax_1;
00698094          
00698094          if (indices_3 == 0)
00698094          {
00698115              eax_1 = 0;
00698119              return 0;
00698094          }
00698094          
00698096          eax_1 = this->indexSize;
00698099          uint32_t m_nNumIndices_1 = this->m_nNumIndices;
0069809c          uint8_t* indices_1 = this->indices;
0069809f          int32_t i = 0;
006980a3          void* indices_4 = indices_3;
006980a3          
006980a5          if (eax_1 != 2)
006980a5          {
006980cb              if (m_nNumIndices_1 > 0)
006980cb              {
006980cd                  uint8_t* indices_2 = indices_1;
006980cd                  
006980e2                  do
006980e2                  {
006980d4                      *(uint32_t*)indices_4 = (*(uint32_t*)indices_2 - m_nMinVertexIndex);
006980d9                      indices_4 += 4;
006980dc                      indices_2 = &indices_2[4];
006980df                      i += 1;
006980e2                  } while (i < this->m_nNumIndices);
006980cb              }
006980a5          }
006980a5          else if (m_nNumIndices_1 > 0)
006980a9          {
006980c5              do
006980c5              {
006980b0                  m_nNumIndices_1 = *(uint16_t*)indices_1;
006980b3                  m_nNumIndices_1 -= m_nMinVertexIndex;
006980b6                  *(uint16_t*)indices_4 = m_nNumIndices_1;
006980bc                  indices_4 += 2;
006980bf                  indices_1 = &indices_1[2];
006980c2                  i += 1;
006980c5              } while (i < this->m_nNumIndices);
006980a9          }
006980a9          
006980e4          indices = indices_3;
0069807d      }
0069807d      
006980e6      uint32_t m_nNumIndices = this->m_nNumIndices;
006980ee      class RenderIndexStreamD3D* m_pIndexStream = this->m_pIndexStream;
006980f5      this_1 = nullptr;
006980f9      RenderIndexStreamD3D::FillData(m_pIndexStream, m_nNumIndices, indices, &this_1);
006980ff      operator delete[](indices_3);
00698109      this->needRefresh = 0;
0069810c      return 1;
00698040  }

006980ad                                         8d 49 00                                                               .I.
0069811a                                                                                90 90 90 90 90 90                            ......

00698120  class RenderIndexBuffer* __fastcall RenderIndexBufferD3D::Duplicate(class RenderIndexBufferD3D const* this)

00698120  {
0069812b      void* result = operator new(0x2c);
0069812b      
00698132      if (result == 0)
00698150          result = nullptr;
00698132      else
00698132      {
00698136          *(uint32_t*)result = 0x79b26c;
0069813c          RenderIndexBuffer::Begin(result);
00698141          *(uint32_t*)result = 0x7e57a0;
00698147          *(uint32_t*)((char*)result + 0x28) = 0;
00698132      }
00698132      
0069815c      if (RenderIndexBuffer::SetRenderIndexBuffer(result, this) != 0)
00698173          return result;
00698173      
00698160      if (result != 0)
00698168          **(uint32_t**)result(1);
00698168      
0069816e      return 0;
00698120  }

00698174                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00698180  void* __thiscall RenderVertexBufferD3D::Lock(class RenderVertexBufferD3D* this, uint32_t const arg2, uint32_t const arg3)

00698180  {
00698198      void* result = VertexArray::Lock(this, arg2, arg3);
00698198      
0069819c      if (result != 0)
0069819c      {
0069819e          void* eax;
0069819e          eax = this->staticVertices;
0069819e          
006981a6          if (eax != 0)
006981a6          {
006981a8              struct RenderVertexBufferD3D::VTable* vtable = this->vtable;
006981b1              uint32_t const var_8 = arg2;
006981b5              uint32_t const var_4_1 = arg3;
006981b9              vtable->AddDirtyRange(&var_8);
006981a6          }
0069819c      }
0069819c      
006981c5      return result;
00698180  }

006981c8                          90 90 90 90 90 90 90 90                                                          ........

006981d0  uint8_t __thiscall SmartArray<VertexRange,1>::RemoveUnOrderedByIndex(class SmartArray<VertexRange,1>* this, uint32_t arg2)

006981d0  {
006981d0      uint32_t m_num = this->m_num;
006981d0      
006981dd      if (arg2 >= m_num)
006981dd      {
00698218          m_num = 0;
0069821e          return 0;
006981dd      }
006981dd      
006981e4      this->m_num = (m_num - 1);
006981e4      
006981e7      if (arg2 != (m_num - 1))
006981e7      {
006981e9          class VertexRange* m_data = this->m_data;
006981ef          m_data[arg2].m_nFirstVertex = m_data[(m_num - 1)].m_nFirstVertex;
006981f6          m_data[arg2].m_nNumVertices = m_data[(m_num - 1)].m_nNumVertices;
006981fa          m_num = this->m_num;
006981fd          class VertexRange* m_data_1 = this->m_data;
00698203          int32_t var_8;
00698203          m_data_1[m_num].m_nFirstVertex = var_8;
0069820a          int32_t var_4;
0069820a          m_data_1[m_num].m_nNumVertices = var_4;
006981e7      }
006981e7      
0069820f      m_num = 1;
00698215      return 1;
006981d0  }

00698221     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00698230  void __fastcall RenderVertexBufferD3D::SetupVertexStreams(class RenderVertexBufferD3D* this)

00698230  {
0069823a      uint32_t i = 0;
0069823a      
0069823e      if (this->m_saVertexStreams.m_num > 0)
0069823e      {
0069825f          do
0069825f          {
00698251              RenderDeviceD3D::SetVertexStream(RenderDevice::render_device, i, this->m_saVertexStreams.m_data[i]);
0069825c              i += 1;
0069825f          } while (i < this->m_saVertexStreams.m_num);
0069823e      }
0069823e      
0069826e      RenderDeviceD3D::ApplyVertexFormat(RenderDevice::render_device, &this->m_HardwareVertexFormat);
00698230  }

00698276                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00698280  void __fastcall RenderVertexBufferD3D::Begin(class RenderVertexBufferD3D* this)

00698280  {
00698289      SmartArray<VertexRange,1>::Reset(&this->m_saDirtyVertices);
00698295      /* tailcall */
00698295      return SmartArray<unsigned long,1>::Reset(&this->m_saVertexStreams);
00698280  }

0069829a                                                                                90 90 90 90 90 90                            ......

006982a0  void __fastcall RenderVertexBufferD3D::ReleaseVertexStreams(class RenderVertexBufferD3D* this)

006982a0  {
006982aa      int32_t i = 0;
006982aa      
006982ae      if (this->m_saVertexStreams.m_num > 0)
006982ae      {
006982f2          do
006982f2          {
006982b0              uint32_t eax;
006982b0              eax = this->staticVertices;
006982b0              
006982b8              if (eax == 0)
006982dc                  this->m_saVertexStreams.m_data[i] = 0;
006982b8              else
006982b8              {
006982c0                  int32_t* ecx = this->m_saVertexStreams.m_data[i];
006982c0                  
006982c5                  if (ecx != 0)
006982cb                      **(uint32_t**)ecx(1);
006982cb                  
006982cd                  this->m_saVertexStreams.m_data[i] = 0;
006982b8              }
006982b8              
006982ef              i += 1;
006982f2          } while (i < this->m_saVertexStreams.m_num);
006982ae      }
006982ae      
006982f4      uint32_t m_sizeAndDeallocate = this->m_saVertexStreams.m_sizeAndDeallocate;
00698308      this->m_saVertexStreams.m_num = 0;
00698308      
00698312      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
00698312      {
0069831b          operator delete[](this->m_saVertexStreams.m_data);
00698324          this->m_saVertexStreams.m_data = 0;
0069832e          this->m_saVertexStreams.m_sizeAndDeallocate = 0;
0069833f          /* tailcall */
0069833f          return SmartArray<VertexRange,1>::Reset(&this->m_saDirtyVertices);
00698312      }
00698312      
0069834c      if (this->m_saVertexStreams.m_data != 0)
0069834c      {
0069834e          int32_t eax_5 = (m_sizeAndDeallocate & 0x7fffffff);
00698353          int32_t eax_6 = (eax_5 - 1);
00698353          
00698354          if ((eax_5 - 1) >= 0)
00698354          {
0069836f              int32_t temp1_1;
0069836f              
0069836f              do
0069836f              {
00698360                  temp1_1 = eax_6;
00698360                  eax_6 -= 1;
00698361                  this->m_saVertexStreams.m_data[(eax_6 + 1)] = 0;
0069836f              } while ((temp1_1 - 1) >= 0);
00698354          }
0069834c      }
0069834c      
00698379      /* tailcall */
00698379      return SmartArray<VertexRange,1>::Reset(&this->m_saDirtyVertices);
006982a0  }

00698358                                                                          8d a4 24 00 00 00 00 90                          ..$.....
0069837e                                                                                            90 90                                ..

00698380  void __fastcall RenderVertexBufferD3D::End(class RenderVertexBufferD3D* this)

00698380  {
00698380      /* tailcall */
00698380      return RenderVertexBufferD3D::ReleaseVertexStreams(this);
00698380  }

00698385                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00698390  void __fastcall RenderVertexBufferD3D::Shutdown(class RenderVertexBufferD3D* this)

00698390  {
00698393      RenderVertexBufferD3D::ReleaseVertexStreams(this);
0069839a      RenderVertexBuffer::Shutdown(this);
006983a5      SmartArray<VertexRange,1>::Reset(&this->m_saDirtyVertices);
006983b1      /* tailcall */
006983b1      return SmartArray<unsigned long,1>::Reset(&this->m_saVertexStreams);
00698390  }

006983b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006983c0  uint8_t __thiscall SmartArray<VertexRange,1>::AddToEnd(class SmartArray<VertexRange,1>* this, class VertexRange const* arg2)

006983c0  {
006983c9      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
006983c9      
006983d0      if (this->m_num >= eax_1)
006983d0      {
006983de          uint8_t result = SmartArray<VertexRange,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
006983de          
006983e5          if (result == 0)
006983e8              return result;
006983d0      }
006983d0      
006983eb      uint32_t m_num = this->m_num;
006983f2      class VertexRange* m_data = this->m_data;
006983f7      m_data[m_num].m_nFirstVertex = arg2->m_nFirstVertex;
006983fd      m_data[m_num].m_nNumVertices = arg2->m_nNumVertices;
00698401      this->m_num += 1;
00698405      uint32_t eax_5;
00698405      eax_5 = 1;
00698408      return 1;
006983c0  }

0069840b                                   90 90 90 90 90                                                             .....

00698410  uint8_t __thiscall RenderVertexBufferD3D::UpdateVertexBuffer(class RenderVertexBufferD3D* this, uint32_t arg2, uint32_t arg3, uint32_t* arg4)

00698410  {
00698415      uint32_t* ebp = arg4;
0069841c      class RenderVertexBufferD3D* this_1 = this;
0069841e      *(uint32_t*)ebp = 0;
00698428      class RenderVertexStreamD3D* edi = *(uint32_t*)this_1->m_saVertexStreams.m_data;
00698434      uint32_t eax_1;
00698434      
00698434      if (this_1->staticVertices == 0)
00698434      {
0069851d          class VertexFormatInfo* ecx_7;
0069851d          void* ebx_1;
0069851d          
0069851d          if (this_1->m_UseVirtualArray == 0)
0069851d          {
00698537              ebx_1 = this_1->vertices;
0069853d              this = this_1->m_IsYAndZSwapped == 0;
00698540              arg4 = this;
00698544              ecx_7 = &this_1->vertexFormat;
0069851d          }
0069851d          else
0069851d          {
0069851f              arg4 = 0;
00698523              ebx_1 = this_1->m_pVirtualArray;
00698529              ecx_7 = &this_1->m_HardwareVertexFormat;
0069851d          }
0069851d          
00698566          if (RenderVertexStreamD3D::FillData(edi, arg2, arg3, ((ecx_7->size * arg2) + ebx_1), ecx_7, arg4, ebp) == 0)
00698566          {
0069856b          label_69856b:
0069856b              eax_1 = 0;
00698571              return 0;
00698566          }
00698434      }
00698434      else
00698434      {
0069843d          if (edi->m_bIsLost != 0)
0069843d          {
00698446              uint32_t numVertices = this_1->numVertices;
00698451              this_1->m_saDirtyVertices.m_num = 0;
00698457              int32_t var_8 = 0;
0069845b              SmartArray<VertexRange,1>::AddToEnd(&this_1->m_saDirtyVertices, &var_8);
0069843d          }
0069843d          
00698466          eax_1 = 0;
0069846a          arg3 = 0;
0069846a          
0069846e          if (this_1->m_saDirtyVertices.m_num > 0)
0069846e          {
00698486              while (true)
00698486              {
00698486                  void* edi_1 = &this_1->m_saDirtyVertices.m_data[eax_1];
0069848f                  void* eax_4;
0069848f                  class VertexFormatInfo* ecx_4;
0069848f                  uint32_t edx_1;
0069848f                  
0069848f                  if (this_1->m_UseVirtualArray == 0)
0069848f                  {
006984ba                      ecx_4 = &this_1->vertexFormat;
006984bd                      arg2 = this_1->m_IsYAndZSwapped == 0;
006984c1                      edx_1 = *(uint32_t*)edi_1;
006984c6                      eax_4 = ((this_1->vertexFormat.size * edx_1) + this_1->vertices);
0069848f                  }
0069848f                  else
0069848f                  {
00698491                      edx_1 = *(uint32_t*)edi_1;
00698499                      ecx_4 = &this_1->m_HardwareVertexFormat;
006984a2                      eax_4 = ((this_1->m_HardwareVertexFormat.size * edx_1) + this_1->m_pVirtualArray);
006984a8                      arg2 = 0;
0069848f                  }
0069848f                  
006984e4                  if (RenderVertexStreamD3D::FillData(edi, edx_1, *(uint32_t*)((char*)edi_1 + 4), eax_4, ecx_4, arg2, ebp) == 0)
006984e4                      goto label_69856b;
006984e4                  
006984f4                  eax_1 = (arg3 + 1);
006984f7                  arg3 = eax_1;
006984f7                  
006984fb                  if (eax_1 >= this_1->m_saDirtyVertices.m_num)
006984fb                      break;
006984fb                  
00698476                  ebp = arg4;
00698486              }
0069846e          }
0069846e          
00698501          this_1->m_saDirtyVertices.m_num = 0;
00698434      }
00698434      
0069850a      eax_1 = 1;
00698510      return 1;
00698410  }

00698574                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00698580  uint8_t __thiscall RenderVertexBufferD3D::AddDirtyRange(class RenderVertexBufferD3D* this, class VertexRange const* arg2)

00698580  {
00698580      class RenderVertexBufferD3D* this_1 = this;
00698582      class VertexRange* ebx = arg2;
00698586      uint32_t m_nFirstVertex = ebx->m_nFirstVertex;
0069858b      uint32_t numVertices = this->numVertices;
0069858b      
0069859b      if ((m_nFirstVertex >= numVertices || (ebx->m_nNumVertices + m_nFirstVertex) > numVertices))
0069859b      {
00698612          m_nFirstVertex = 0;
00698616          return 0;
0069859b      }
0069859b      
006985a2      int32_t edx_3 = ((ebx->m_nNumVertices + m_nFirstVertex) - 1);
006985ac      uint32_t i = 0;
006985b0      int32_t var_4 = edx_3;
006985b4      int32_t eax_3;
006985b4      
006985b4      if (this->m_saDirtyVertices.m_num > 0)
006985b4      {
006985f3          do
006985f3          {
006985c2              void* ecx = &this->m_saDirtyVertices.m_data[i];
006985c5              eax_3 = *(uint32_t*)ecx;
006985cc              int32_t ecx_2 = ((*(uint32_t*)((char*)ecx + 4) + eax_3) - 1);
006985cc              
006985d0              if (m_nFirstVertex >= eax_3)
006985d0              {
006985d4                  if (ecx_2 >= edx_3)
006985d4                      goto label_698608;
006985d4                  
006985d8                  if ((m_nFirstVertex >= eax_3 || edx_3 <= ecx_2))
006985ec                      i += 1;
006985d8                  else
006985d8                  {
006985e1                      SmartArray<VertexRange,1>::RemoveUnOrderedByIndex(&this->m_saDirtyVertices, i);
006985e6                      edx_3 = var_4;
006985d8                  }
006985d0              }
006985d0              else if (edx_3 <= ecx_2)
006985ec                  i += 1;
006985dc              else
006985dc              {
006985e1                  SmartArray<VertexRange,1>::RemoveUnOrderedByIndex(&this->m_saDirtyVertices, i);
006985e6                  edx_3 = var_4;
006985dc              }
006985f3          } while (i < this->m_saDirtyVertices.m_num);
006985f3          
006985f5          ebx = arg2;
006985b4      }
006985b4      
00698600      SmartArray<VertexRange,1>::AddToEnd(&this->m_saDirtyVertices, ebx);
00698608  label_698608:
00698608      eax_3 = 1;
0069860c      return 1;
00698580  }

00698619                                                                             90 90 90 90 90 90 90                           .......

00698620  uint8_t __fastcall RenderVertexBufferD3D::CreateVertexStreams(class RenderVertexBufferD3D* this)

00698620  {
00698630      uint32_t format = this->m_HardwareVertexFormat.format;
00698636      void* eax_1;
00698636      void* var_c;
00698636      
00698636      if (this->staticVertices == 0)
00698636      {
006986ba          eax_1 = D3DPolyRender::ReferenceVertexStream(Render::m_pRenderer, format, this->numVertices);
006986c1          var_c = eax_1;
006986c1          
006986c5          if (eax_1 != 0)
006986c5              goto label_6986d2;
00698636      }
00698636      else
00698636      {
0069863d          eax_1 = operator new(0xb8);
0069863d          
00698649          if (eax_1 != 0)
00698649          {
0069864d              GraphicsResource::GraphicsResource(eax_1);
00698654              *(uint32_t*)eax_1 = 0x7e5438;
0069865a              RenderVertexStreamD3D::Begin(eax_1);
0069865f              int32_t eax_2;
0069865f              eax_2 = this->m_OnlyWriteOnce;
00698665              uint32_t numVertices_1 = this->numVertices;
00698668              int32_t edx_1 = *(uint32_t*)eax_1;
0069866a              char temp0_1 = eax_2;
0069866a              eax_2 = -(eax_2);
0069866c              var_c = eax_1;
0069866c              
0069867f              if (*(uint32_t*)(edx_1 + 0x10)(numVertices_1, format, ((eax_2 - eax_2) & 0x10)) != 0)
0069867f              {
00698695                  struct RenderVertexBufferD3D::VTable* vtable = this->vtable;
0069869b                  uint32_t numVertices = this->numVertices;
006986a2                  int32_t var_8 = 0;
006986aa                  vtable->AddDirtyRange(&var_8);
006986d2              label_6986d2:
006986d2                  SmartArray<unsigned long,1>::AddToEnd(&this->m_saVertexStreams.m_data, &var_c);
006986d9                  int32_t eax_8;
006986d9                  eax_8 = 1;
006986df                  return 1;
0069867f              }
0069867f              
00698687              **(uint32_t**)eax_1(1);
00698649          }
00698636      }
0069868b      eax_1 = 0;
00698691      return 0;
00698620  }


006986e0  uint8_t __thiscall RenderVertexBufferD3D::RenderIndexedPrimitives(class RenderVertexBufferD3D* this, enum PrimType const arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7, class RenderIndexBuffer* arg8, uint8_t const arg9, uint32_t* arg10, uint32_t* arg11, uint8_t const arg12)

006986e0  {
006986f2      class RenderVertexStreamD3D* ecx = *(uint32_t*)this->m_saVertexStreams.m_data;
006986f4      class RenderVertexStreamD3D** eax;
006986f4      eax = this->m_NeedRefreshVirtualArray;
006986fa      uint32_t const ebx = 0;
00698707      uint32_t const var_8 = 0;
0069870b      uint32_t* ecx_1;
0069870b      
0069870b      if (eax == 0)
0069870b      {
0069870d          eax = this->staticVertices;
0069870d          
00698715          if (eax != 0)
00698715              goto label_69874c;
00698715          
00698717          eax = arg9;
00698717          
00698725          if ((eax != 0 || arg10 == 0))
0069871d              goto label_69874c;
0069871d          
00698727          ecx_1 = arg11;
00698727          
0069872d          if (ecx_1 == 0)
0069872d              goto label_69874c;
0069872d          
0069872f          uint32_t eax_2 = *(uint32_t*)arg10;
0069872f          
00698740          if ((eax_2 == 0xffffffff || ecx->m_nStreamFrameID != eax_2))
00698734              goto label_69874c;
00698734          
00698744          var_8 = *(uint32_t*)ecx_1;
00698748          goto label_69877e;
0069870b      }
0069870b      
0069874c  label_69874c:
0069874c      RenderVertexBuffer::RefreshVirtualArray(this);
00698759      uint32_t const eax_4 = arg5;
00698759      
0069875b      if (this->staticVertices == 0)
0069875d          eax_4 = (arg5 + arg7);
0069875d      
00698774      uint32_t eax_3;
00698774      
00698774      if (RenderVertexBufferD3D::UpdateVertexBuffer(this, eax_4, arg6, &var_8) != 0)
00698774      {
0069877a          ecx_1 = arg11;
0069877e      label_69877e:
0069877e          eax_3 = this->staticVertices;
0069877e          
00698786          if (eax_3 != 0)
00698786          {
00698788              eax_3 = arg12;
00698788              
0069878e              if (eax_3 == 0)
0069878e              {
0069879a                  ebx = arg5;
0069879c                  var_8 = arg7;
0069878e              }
0069878e              else
0069878e              {
00698790                  ebx = 0;
00698794                  var_8 = (arg5 + arg7);
0069878e              }
00698786          }
00698786          
006987aa          if ((arg10 != 0 && ecx_1 != 0))
006987aa          {
006987b6              *(uint32_t*)arg10 = ecx->m_nStreamFrameID;
006987bc              *(uint32_t*)ecx_1 = var_8;
006987aa          }
006987aa          
006987c0          RenderVertexBufferD3D::SetupVertexStreams(this);
006987c5          class RenderIndexBufferD3D* esi_1 = arg8;
006987d2          class RenderIndexStreamD3D* m_pIndexStream;
006987d2          
006987d2          if (RenderIndexBufferD3D::UpdateIndexBuffer(esi_1) == 0)
006987d9              m_pIndexStream = nullptr;
006987d2          else
006987d4              m_pIndexStream = esi_1->m_pIndexStream;
006987d4          
006987db          eax_3 = RenderIndexStreamD3D::GetDirect3DIndexBuffer(m_pIndexStream);
006987db          
006987e2          if (eax_3 != 0)
006987e2          {
006987ea              int32_t* ecx_8 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
006987f4              *(uint32_t*)(*(uint32_t*)ecx_8 + 0x1a0)(ecx_8, eax_3);
00698803              int32_t* eax_9 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
00698822              *(uint32_t*)(*(uint32_t*)eax_9 + 0x148)(eax_9, arg2, var_8, ebx, arg6, arg3, arg4);
0069882b              int32_t eax_10;
0069882b              eax_10 = 1;
00698831              return 1;
006987e2          }
00698774      }
00698774      
00698837      eax_3 = 0;
0069883d      return 0;
006986e0  }


00698840  uint8_t __thiscall RenderVertexBufferD3D::RenderPrimitives(class RenderVertexBufferD3D* this, enum PrimType const arg2, uint32_t const arg3, uint32_t const arg4, uint32_t* arg5, uint32_t* arg6)

00698840  {
0069884a      uint32_t esi = 0;
0069884a      
00698853      if ((arg2 - 1) <= 5)
00698855          switch (arg2)
00698855          {
0069885c              case PRIMTYPE_POINTLIST:
0069885c              {
0069885c                  esi = arg4;
0069885c                  break;
0069885c              }
00698866              case PRIMTYPE_LINELIST:
00698866              {
00698866                  esi = (arg4 * 2);
00698866                  break;
00698866              }
0069886e              case PRIMTYPE_LINESTRIP:
0069886e              {
0069886e                  esi = (arg4 + 1);
0069886e                  break;
0069886e              }
00698875              case PRIMTYPE_TRIANGLELIST:
00698875              {
00698875                  esi = (arg4 * 3);
00698875                  break;
00698875              }
0069887e              case PRIMTYPE_TRIANGLESTRIP:
0069887e              case PRIMTYPE_TRIANGLEFAN:
0069887e              {
0069887e                  esi = (arg4 + 2);
0069887e                  break;
0069887e              }
00698855          }
00698855      
00698887      class RenderVertexStreamD3D* ecx = *(uint32_t*)this->m_saVertexStreams.m_data;
00698889      class RenderVertexStreamD3D** eax_1;
00698889      eax_1 = this->m_NeedRefreshVirtualArray;
0069889d      uint32_t var_8 = 0;
0069889d      
006988a5      if (eax_1 != 0)
006988a5      {
006988d3      label_6988d3:
006988d3          RenderVertexBuffer::RefreshVirtualArray(this);
006988e5          uint8_t result = RenderVertexBufferD3D::UpdateVertexBuffer(this, arg3, esi, &var_8);
006988e5          
006988ec          if (result == 0)
006988f5              return result;
006988a5      }
006988a5      else
006988a5      {
006988a7          eax_1 = this->staticVertices;
006988a7          
006988b7          if (((eax_1 != 0 || arg5 == 0) || arg6 == 0))
006988af              goto label_6988d3;
006988af          
006988b9          uint32_t eax_2 = *(uint32_t*)arg5;
006988b9          
006988c7          if ((eax_2 == 0xffffffff || ecx->m_nStreamFrameID != eax_2))
006988bf              goto label_6988d3;
006988bf          
006988cb          var_8 = *(uint32_t*)arg6;
006988a5      }
006988a5      
00698902      if ((arg5 != 0 && arg6 != 0))
00698902      {
0069890a          uint32_t eax_3 = var_8;
0069890e          *(uint32_t*)arg5 = ecx->m_nStreamFrameID;
00698911          *(uint32_t*)arg6 = eax_3;
00698902      }
00698902      
00698915      RenderVertexBufferD3D::SetupVertexStreams(this);
00698920      int32_t* eax_4 = *(int32_t*)((char*)RenderDevice::render_device + 0x468);
00698938      *(uint32_t*)(*(uint32_t*)eax_4 + 0x144)(eax_4, arg2, var_8, arg4);
00698941      int32_t eax_5;
00698941      eax_5 = 1;
00698947      return 1;
00698840  }

0069894a                                8b ff                                                                        ..
0069894c  uint32_t jump_table_69894c[0x6] = 
0069894c  {
0069894c      [0x0] =  0x0069885c
00698950      [0x1] =  0x00698862
00698954      [0x2] =  0x0069886a
00698958      [0x3] =  0x00698871
0069895c      [0x4] =  0x0069887a
00698960      [0x5] =  0x0069887a
00698964  }

00698964              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00698970  uint8_t __thiscall RenderVertexBufferD3D::Startup(class RenderVertexBufferD3D* this, uint32_t const arg2, uint32_t const arg3, uint8_t const arg4, uint8_t const arg5, uint32_t const arg6)

00698970  {
00698979      if ((arg2 > 0 && RenderVertexBuffer::Startup(this, arg2, arg3, arg4, arg5, arg6) != 0))
006989a8          return RenderVertexBufferD3D::CreateVertexStreams(this) != 0;
006989a8      
006989ab      uint32_t const eax;
006989ab      eax = 0;
006989ae      return 0;
00698970  }

006989b1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

006989c0  void __fastcall QuickWindow::~QuickWindow(class QuickWindow* this)

006989c0  {
006989c7      this->vtable = 0x800a98;
006989cd      Render::SafelyStopUsingAndReleaseTexture(&this->m_pBackgroundTexture);
006989d5      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
006989c0  }

006989dd                                                                                         90 90 90                               ...

006989e0  void __thiscall QuickWindow::SetColorAndOpacity(class QuickWindow* this, class RGBAColor const* arg2)

006989e0  {
006989e6      this->m_ColorAndOpacity.r = arg2->r;
006989e6      this->m_ColorAndOpacity.g = arg2->g;
006989e6      this->m_ColorAndOpacity.b = arg2->b;
006989e6      this->m_ColorAndOpacity.a = arg2->a;
006989e0  }


00698a00  void __thiscall QuickWindow::SetBackgroundTexture(class QuickWindow* this, class RenderTexture* arg2)

00698a00  {
00698a0a      if (arg2 != 0)
00698a0a      {
00698a0c          class RenderTexture* var_c_1 = arg2;
00698a0d          IDClass<_tagDataID,32,0>::~IDClass<_tagDataID,32,0>(this);
00698a12          arg2->vtable->AddRef();
00698a0a      }
00698a0a      
00698a20      Render::SafelyStopUsingAndReleaseTexture(&this->m_pBackgroundTexture);
00698a1c      this->m_pBackgroundTexture = arg2;
00698a00  }

00698a2f                                               90                                                                 .

00698a30  void __thiscall QuickWindow::RenderWindowBackground(class QuickWindow* this, class RenderTexture* arg2, class RGBAColor const* arg3)

00698a30  {
00698a36      SceneTool::IdentityMatrices();
00698a4d      float var_60;
00698a4d      int32_t var_54;
00698a4d      SceneTool::ViewportToClip(this->m_X, this->m_Y, &var_60, &var_54);
00698a72      int32_t var_5c;
00698a72      float var_58;
00698a72      SceneTool::ViewportToClip(((this->m_Width + this->m_X) - 1), ((this->m_Height + this->m_Y) - 1), &var_58, &var_5c);
00698a77      float eax_3 = var_60;
00698a7b      int32_t ecx_2 = var_54;
00698a81      float var_30 = eax_3;
00698a85      int32_t eax_4 = var_5c;
00698a89      int32_t var_28 = ecx_2;
00698a8d      float ecx_3 = var_58;
00698a91      float var_24 = eax_3;
00698a97      int32_t var_1c = eax_4;
00698a9d      float var_c = ecx_3;
00698aad      float var_18 = ecx_3;
00698ab5      int32_t var_10 = eax_4;
00698abd      int32_t var_2c = 0;
00698ac5      int32_t var_20 = 0;
00698acd      int32_t var_14 = 0;
00698ad5      int32_t var_8 = 0;
00698add      int32_t var_4 = var_54;
00698ae1      int32_t var_50 = 0;
00698ae9      int32_t var_4c = 0;
00698af1      int32_t var_48 = 0;
00698af9      int32_t var_44 = 0x3f800000;
00698b01      int32_t var_40 = 0x3f800000;
00698b09      int32_t var_3c = 0x3f800000;
00698b11      int32_t var_38 = 0x3f800000;
00698b19      int32_t var_34 = 0;
00698b19      
00698b22      if (arg2 != 0)
00698b22      {
00698b3e          SceneTool::DrawTexturedPolygon(&var_30, 4, &var_50, arg2, arg3, 0, 0, CULLMODE_CW, BLEND_SRCALPHA, BLEND_INVSRCALPHA, 1);
00698b49          return;
00698b22      }
00698b22      
00698b5e      SceneTool::DrawPolygon(&var_30, 4, arg3, 0, 0, CULLMODE_CW, BLEND_SRCALPHA, BLEND_INVSRCALPHA);
00698a30  }

00698b6c                                      90 90 90 90                                                              ....

00698b70  void __thiscall QuickWindow::RenderText(class QuickWindow* this, int32_t const arg2, int32_t const arg3, char const* arg4, uint32_t const arg5)

00698b70  {
00698b81      if ((arg2 < this->m_ClientAreaWidth && arg3 < this->m_ClientAreaHeight))
00698b9f          RenderDeviceD3D::RenderDebugText(RenderDevice::render_device, (this->m_ClientAreaX + arg2), (this->m_ClientAreaY + arg3), arg4, arg5);
00698b70  }

00698ba8                          90 90 90 90 90 90 90 90                                                          ........

00698bb0  void __fastcall QuickWindow::QuickWindow(class QuickWindow* this)

00698bb0  {
00698bb5      this->m_cRef = 1;
00698bbc      this->vtable = 0x800a98;
00698bc2      __builtin_memset(&this->m_WindowID, 0, 0x1c);
00698bdd      this->m_ColorAndOpacity.r = RGBAColor_Black.r;
00698bdd      this->m_ColorAndOpacity.g = RGBAColor_Black.g;
00698bdd      this->m_ColorAndOpacity.b = RGBAColor_Black.b;
00698bdd      this->m_ColorAndOpacity.a = RGBAColor_Black.a;
00698bfd      __builtin_memset(&this->m_pBackgroundTexture, 0, 0x14);
00698bb0  }

00698c0e                                            90 90                                                                ..

00698c10  void* __thiscall QuickWindow::`scalar deleting destructor'(class QuickWindow* this, uint32_t arg2)

00698c10  {
00698c17      this->vtable = 0x800a98;
00698c1d      Render::SafelyStopUsingAndReleaseTexture(&this->m_pBackgroundTexture);
00698c2b      this->vtable = &ReferenceCountTemplate<1048576,1>::`vftable';
00698c2b      
00698c31      if ((arg2 & 1) != 0)
00698c34          operator delete(this);
00698c34      
00698c3f      return this;
00698c10  }

00698c42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

00698c50  uint8_t __thiscall QuickWindow::Init(class QuickWindow* this, int32_t const arg2, int32_t const arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7)

00698c50  {
00698c67      this->m_X = arg2;
00698c71      this->m_BorderWidth = arg6;
00698c74      this->m_Width = arg4;
00698c7b      this->m_Y = arg3;
00698c80      this->m_ClientAreaWidth = (arg4 - (arg6 * 2));
00698c86      this->m_BorderHeight = arg7;
00698c8b      this->m_Height = arg5;
00698c8e      this->m_ClientAreaY = (arg3 + arg7);
00698c94      this->m_ClientAreaX = (arg2 + arg6);
00698c97      this->m_ClientAreaHeight = (arg5 - (arg7 * 2));
00698c9a      uint32_t eax_1;
00698c9a      eax_1 = 1;
00698c9d      return 1;
00698c50  }


00698ca0  void __thiscall QuickWindow::SetPosition(class QuickWindow* this, int32_t const arg2, int32_t const arg3)

00698ca0  {
00698ca4      uint32_t m_BorderWidth = this->m_BorderWidth;
00698cac      this->m_X = arg2;
00698cb1      this->m_Y = arg3;
00698cb4      this->m_ClientAreaX = (arg2 + m_BorderWidth);
00698cb7      uint32_t m_BorderHeight = this->m_BorderHeight;
00698cbc      this->m_ClientAreaY = (arg3 + m_BorderHeight);
00698ccb      uint32_t eax_2 = (this->m_Height - (m_BorderHeight * 2));
00698ccd      this->m_ClientAreaWidth = (this->m_Width - (m_BorderWidth * 2));
00698cd0      this->m_ClientAreaHeight = eax_2;
00698ca0  }

00698cd7                                                                       90 90 90 90 90 90 90 90 90                         .........

00698ce0  void __fastcall QuickWindow::Render(class QuickWindow* this)

00698ce0  {
00698ce8      QuickWindow::RenderWindowBackground(this, this->m_pBackgroundTexture, &this->m_ColorAndOpacity);
00698ce0  }

00698cee                                            90 90                                                                ..

00698cf0  class TResult* QuickWindow::Create(class TResult* __return, class QuickWindow** arg2, int32_t const arg3, int32_t const arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7, uint32_t const arg8)

00698cf0  {
00698cf2      void* eax = operator new(0x48);
00698cfc      class QuickWindow* eax_1;
00698cfc      
00698cfc      if (eax == 0)
00698d07          eax_1 = nullptr;
00698cfc      else
00698d00          eax_1 = QuickWindow::QuickWindow(eax);
00698d00      
00698d0f      *(uint32_t*)arg2 = eax_1;
00698d0f      
00698d11      if (eax_1 == 0)
00698d11      {
00698d6d          __return->m_val = 0x80004005;
00698d73          return __return;
00698d11      }
00698d11      
00698d2a      eax_1->m_X = arg3;
00698d2f      eax_1->m_BorderWidth = arg7;
00698d37      eax_1->m_Width = arg5;
00698d3e      eax_1->m_Y = arg4;
00698d43      eax_1->m_ClientAreaWidth = (arg5 - (arg7 * 2));
00698d46      eax_1->m_BorderHeight = arg8;
00698d49      eax_1->m_Height = arg6;
00698d50      eax_1->m_ClientAreaX = (arg3 + arg7);
00698d53      eax_1->m_ClientAreaY = (arg4 + arg8);
00698d59      eax_1->m_ClientAreaHeight = (arg6 - (arg8 * 2));
00698d61      __return->m_val = 0;
00698d68      return __return;
00698cf0  }

00698d74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

00698d80  uint8_t __thiscall QuickButton::LeftMouseButtonPressed(class QuickButton* this, int32_t const arg2, int32_t const arg3)

00698d80  {
00698d80      int32_t m_X = this->m_X;
00698d88      char result = 0;
00698d88      
00698d8c      if (arg2 >= m_X)
00698d8c      {
00698d94          int32_t m_Y = this->m_Y;
00698d94          
00698dad          if ((arg3 >= m_Y && (arg2 < (this->m_Width + m_X) && arg3 < (this->m_Height + m_Y))))
00698dad          {
00698daf              result = 1;
00698db1              this->m_IsPressed = 1;
00698dad          }
00698d8c      }
00698d8c      
00698db7      return result;
00698d80  }

00698dba                                                                                90 90 90 90 90 90                            ......

00698dc0  uint8_t __thiscall QuickButton::LeftMouseButtonReleased(class QuickButton* this, int32_t const arg2, int32_t const arg3)

00698dc0  {
00698dc0      int32_t m_X;
00698dc0      m_X = this->m_IsPressed;
00698dc0      
00698dc7      if (m_X != 0)
00698dc7      {
00698dc9          m_X = this->m_X;
00698dd2          this->m_IsPressed = 0;
00698dd2          
00698dd6          if (arg2 >= m_X)
00698dd6          {
00698dd8              int32_t m_Y = this->m_Y;
00698dd8              
00698df5              if ((arg3 >= m_Y && (arg2 < (this->m_Width + m_X) && arg3 < (this->m_Height + m_Y))))
00698df5              {
00698df8                  m_X = 1;
00698dfb                  return 1;
00698df5              }
00698dd6          }
00698dc7      }
00698dc7      
00698dff      m_X = 0;
00698e02      return 0;
00698dc0  }

00698e05                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00698e10  void __thiscall QuickButton::SetCheckedState(class QuickButton* this, uint8_t const arg2)

00698e10  {
00698e14      this->m_IsChecked = arg2;
00698e10  }

00698e1a                                                                                90 90 90 90 90 90                            ......

00698e20  void __fastcall QuickButton::Render(class QuickButton* this)

00698e20  {
00698e2e      float r_1 = this->m_ColorAndOpacity.r;
00698e35      float g_1 = this->m_ColorAndOpacity.g;
00698e41      float a_1 = this->m_ColorAndOpacity.a;
00698e45      long double x87_r7 = ((long double)a_1);
00698e49      long double temp0 = ((long double)0f);
00698e49      (x87_r7 - temp0);
00698e4f      float b_1 = RGBAColor_White.b;
00698e55      float r = RGBAColor_White.r;
00698e5e      float a = RGBAColor_White.a;
00698e62      float eax_2;
00698e62      eax_2 = ((((x87_r7 < temp0) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7, temp0))) ? 1 : 0) << 0xa) | ((((x87_r7 == temp0) ? 1 : 0) << 0xe) | 0))));
00698e64      float b = this->m_ColorAndOpacity.b;
00698e6e      bool p = /* bool p = unimplemented  {test ah, 0x5} */;
00698e72      float g = RGBAColor_White.g;
00698e76      float b_2 = b_1;
00698e76      
00698e7a      if (!(p))
00698e7c          a_1 = 0f;
00698e7c      
00698e84      long double x87_r7_1 = ((long double)r_1);
00698e88      long double temp1 = ((long double)0f);
00698e88      (x87_r7_1 - temp1);
00698e8e      eax_2 = ((((x87_r7_1 < temp1) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_1, temp1))) ? 1 : 0) << 0xa) | ((((x87_r7_1 == temp1) ? 1 : 0) << 0xe) | 0))));
00698e90      bool p_1 = /* bool p_1 = unimplemented  {test ah, 0x5} */;
00698e90      
00698e93      if (!(p_1))
00698e95          r_1 = 0f;
00698e95      
00698e9d      long double x87_r7_2 = ((long double)g_1);
00698ea1      long double temp2 = ((long double)0f);
00698ea1      (x87_r7_2 - temp2);
00698ea7      eax_2 = ((((x87_r7_2 < temp2) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_2, temp2))) ? 1 : 0) << 0xa) | ((((x87_r7_2 == temp2) ? 1 : 0) << 0xe) | 0))));
00698ea9      bool p_2 = /* bool p_2 = unimplemented  {test ah, 0x5} */;
00698ea9      
00698eac      if (!(p_2))
00698eae          g_1 = 0f;
00698eae      
00698eb6      long double x87_r7_3 = ((long double)b);
00698eba      long double temp3 = ((long double)0f);
00698eba      (x87_r7_3 - temp3);
00698ec0      eax_2 = ((((x87_r7_3 < temp3) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_3, temp3))) ? 1 : 0) << 0xa) | ((((x87_r7_3 == temp3) ? 1 : 0) << 0xe) | 0))));
00698ec2      bool p_3 = /* bool p_3 = unimplemented  {test ah, 0x5} */;
00698ec2      
00698ec5      if (!(p_3))
00698ec7          b = 0f;
00698ec7      
00698ed3      RGBAColor::CapHigh(&r_1);
00698ed8      long double x87_r7_4 = ((long double)RGBAColor_White.a);
00698ede      long double temp4 = ((long double)0f);
00698ede      (x87_r7_4 - temp4);
00698ee4      int32_t eax_3;
00698ee4      eax_3 = ((((x87_r7_4 < temp4) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_4, temp4))) ? 1 : 0) << 0xa) | ((((x87_r7_4 == temp4) ? 1 : 0) << 0xe) | 0))));
00698ee6      bool p_4 = /* bool p_4 = unimplemented  {test ah, 0x5} */;
00698ee6      
00698ee9      if (!(p_4))
00698eeb          a = 0f;
00698eeb      
00698ef3      long double x87_r7_5 = ((long double)r);
00698ef7      long double temp5 = ((long double)0f);
00698ef7      (x87_r7_5 - temp5);
00698efd      eax_3 = ((((x87_r7_5 < temp5) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_5, temp5))) ? 1 : 0) << 0xa) | ((((x87_r7_5 == temp5) ? 1 : 0) << 0xe) | 0))));
00698eff      bool p_5 = /* bool p_5 = unimplemented  {test ah, 0x5} */;
00698eff      
00698f02      if (!(p_5))
00698f04          r = 0f;
00698f04      
00698f0c      long double x87_r7_6 = ((long double)g);
00698f10      long double temp6 = ((long double)0f);
00698f10      (x87_r7_6 - temp6);
00698f16      eax_3 = ((((x87_r7_6 < temp6) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_6, temp6))) ? 1 : 0) << 0xa) | ((((x87_r7_6 == temp6) ? 1 : 0) << 0xe) | 0))));
00698f18      bool p_6 = /* bool p_6 = unimplemented  {test ah, 0x5} */;
00698f18      
00698f1b      if (!(p_6))
00698f1d          g = 0f;
00698f1d      
00698f25      long double x87_r7_7 = ((long double)b_2);
00698f29      long double temp7 = ((long double)0f);
00698f29      (x87_r7_7 - temp7);
00698f2f      eax_3 = ((((x87_r7_7 < temp7) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_7, temp7))) ? 1 : 0) << 0xa) | ((((x87_r7_7 == temp7) ? 1 : 0) << 0xe) | 0))));
00698f31      bool p_7 = /* bool p_7 = unimplemented  {test ah, 0x5} */;
00698f31      
00698f34      if (!(p_7))
00698f36          b_2 = 0f;
00698f36      
00698f42      RGBAColor::CapHigh(&r);
00698f4c      long double x87_r7_13;
00698f4c      
00698f4c      if (this->m_IsPressed != 0)
00698f4c      {
00698f58          r_1 = ((float)(((long double)r_1) * ((long double)0.25f)));
00698f66          g_1 = ((float)(((long double)g_1) * ((long double)0.25f)));
00698f6e          x87_r7_13 = (((long double)b) * ((long double)0.25f));
00698fa3      label_698fa3:
00698fa3          b = ((float)x87_r7_13);
00698fb1          r = ((float)(((long double)r) * ((long double)0.25f)));
00698fbf          g = ((float)(((long double)g) * ((long double)0.25f)));
00698fcd          b_2 = ((float)(((long double)b_2) * ((long double)0.25f)));
00698f4c      }
00698f4c      else if (this->m_IsChecked != 0)
00698f7b      {
00698f87          r_1 = ((float)(((long double)r_1) * ((long double)1.75f)));
00698f95          g_1 = ((float)(((long double)g_1) * ((long double)1.75f)));
00698f9d          x87_r7_13 = (((long double)b) * ((long double)1.75f));
00698f9d          goto label_698fa3;
00698f7b      }
00698fd5      (((long double)a_1) - ((long double)0f));
00698fdd      bool p_8 = /* bool p_8 = unimplemented  {test ah, 0x5} */;
00698fdd      
00698fe0      if (!(p_8))
00698fe2          int32_t var_4 = 0;
00698fe2      
00698fee      (((long double)r_1) - ((long double)0f));
00698ff6      bool p_9 = /* bool p_9 = unimplemented  {test ah, 0x5} */;
00698ff6      
00698ff9      if (!(p_9))
00698ffb          r_1 = 0f;
00698ffb      
00699007      (((long double)g_1) - ((long double)0f));
0069900f      bool p_10 = /* bool p_10 = unimplemented  {test ah, 0x5} */;
0069900f      
00699012      if (!(p_10))
00699014          int32_t var_c = 0;
00699014      
00699020      (((long double)b) - ((long double)0f));
00699028      bool p_11 = /* bool p_11 = unimplemented  {test ah, 0x5} */;
00699028      
0069902b      if (!(p_11))
0069902d          int32_t var_8 = 0;
0069902d      
00699039      RGBAColor::CapHigh(&r_1);
0069903e      long double x87_r7_29 = ((long double)a);
00699042      long double temp12 = ((long double)0f);
00699042      (x87_r7_29 - temp12);
00699048      int32_t eax_5;
00699048      eax_5 = ((((x87_r7_29 < temp12) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_29, temp12))) ? 1 : 0) << 0xa) | ((((x87_r7_29 == temp12) ? 1 : 0) << 0xe) | 0))));
0069904a      bool p_12 = /* bool p_12 = unimplemented  {test ah, 0x5} */;
0069904a      
0069904d      if (!(p_12))
0069904f          a = 0f;
0069904f      
00699057      long double x87_r7_30 = ((long double)r);
0069905b      long double temp13 = ((long double)0f);
0069905b      (x87_r7_30 - temp13);
00699061      eax_5 = ((((x87_r7_30 < temp13) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_30, temp13))) ? 1 : 0) << 0xa) | ((((x87_r7_30 == temp13) ? 1 : 0) << 0xe) | 0))));
00699063      bool p_13 = /* bool p_13 = unimplemented  {test ah, 0x5} */;
00699063      
00699066      if (!(p_13))
00699068          r = 0f;
00699068      
00699070      long double x87_r7_31 = ((long double)g);
00699074      long double temp14 = ((long double)0f);
00699074      (x87_r7_31 - temp14);
0069907a      eax_5 = ((((x87_r7_31 < temp14) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_31, temp14))) ? 1 : 0) << 0xa) | ((((x87_r7_31 == temp14) ? 1 : 0) << 0xe) | 0))));
0069907c      bool p_14 = /* bool p_14 = unimplemented  {test ah, 0x5} */;
0069907c      
0069907f      if (!(p_14))
00699081          g = 0f;
00699081      
00699089      long double x87_r7_32 = ((long double)b_2);
0069908d      long double temp15 = ((long double)0f);
0069908d      (x87_r7_32 - temp15);
00699093      eax_5 = ((((x87_r7_32 < temp15) ? 1 : 0) << 8) | ((((0) ? 1 : 0) << 9) | (((((FCMP_UO(x87_r7_32, temp15))) ? 1 : 0) << 0xa) | ((((x87_r7_32 == temp15) ? 1 : 0) << 0xe) | 0))));
00699095      bool p_15 = /* bool p_15 = unimplemented  {test ah, 0x5} */;
00699095      
00699098      if (!(p_15))
0069909a          b_2 = 0f;
0069909a      
006990a6      RGBAColor::CapHigh(&r);
006990b6      QuickWindow::RenderWindowBackground(this, this->m_pBackgroundTexture, &r_1);
00699106      uint32_t edi_6 = ((((((_ftol2() << 8) | _ftol2()) << 8) | _ftol2()) << 8) | _ftol2());
00699113      QuickWindow::RenderText(this, 0, 0, this->m_ButtonLabel.m_charbuffer, edi_6);
00698e20  }

0069911e                                                                                            90 90                                ..

00699120  void __fastcall QuickButton::~QuickButton(class QuickButton* this)

00699120  {
0069912a      this->vtable = 0x800aa4;
00699130      this->m_IsPressed = 0;
00699134      this->m_IsChecked = 0;
00699138      class PSRefBufferCharData<char>* m_charbuffer = this->m_ButtonLabel.m_charbuffer;
00699138      
00699142      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
00699142      {
00699153          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0069915b              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0069915b          
0069915d          class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00699168          this->m_ButtonLabel.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0069916b          InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
00699142      }
00699142      
00699174      void* __offset(PSRefBufferCharData<char>, -0x14) edi_3 = (this->m_ButtonLabel.m_charbuffer - 0x14);
00699174      
00699183      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0069918b          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0069918b      
00699192      /* tailcall */
00699192      return QuickWindow::~QuickWindow(this);
00699120  }

00699197                                                                       90 90 90 90 90 90 90 90 90                         .........

006991a0  uint8_t __thiscall QuickButton::InitButton(class QuickButton* this, int32_t const arg2, int32_t const arg3, uint32_t const arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7, class PStringBase<char> const* arg8)

006991a0  {
006991ca      if (QuickWindow::Init(this, arg2, arg3, arg4, arg5, arg6, arg7) == 0)
0069921a          return 0;
0069921a      
006991d1      this->m_IsPressed = 0;
006991d5      this->m_IsChecked = 0;
006991d9      class PSRefBufferCharData<char>* m_charbuffer = this->m_ButtonLabel.m_charbuffer;
006991d9      
006991df      if (m_charbuffer != arg8->m_charbuffer)
006991df      {
006991f5          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
006991fd              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
006991fd          
006991ff          class PStringBase<char> m_charbuffer_1 = arg8->m_charbuffer;
00699202          this->m_ButtonLabel.m_charbuffer = m_charbuffer_1;
00699209          InterlockedIncrement((m_charbuffer_1 - 0x10));
006991df      }
006991df      
00699211      m_charbuffer = 1;
00699214      return 1;
006991a0  }

0069921d                                                                                         90 90 90                               ...

00699220  void* __thiscall QuickButton::`scalar deleting destructor'(class QuickButton* this, uint32_t arg2)

00699220  {
00699223      QuickButton::~QuickButton(this);
00699223      
0069922d      if ((arg2 & 1) != 0)
00699230          operator delete(this);
00699230      
0069923b      return this;
00699220  }

0069923e                                                                                            90 90                                ..

00699240  class TResult* QuickButton::Create(class TResult* __return, class QuickButton** arg2, int32_t const arg3, int32_t const arg4, uint32_t const arg5, uint32_t const arg6, uint32_t const arg7, uint32_t const arg8, class PStringBase<char> const* arg9)

00699240  {
00699243      void* eax = operator new(0x50);
0069924f      void* ecx_3;
0069924f      
0069924f      if (eax == 0)
0069927e          ecx_3 = nullptr;
0069924f      else
0069924f      {
00699253          QuickWindow::QuickWindow(eax);
00699258          *(uint32_t*)eax = 0x800aa4;
0069925e          *(uint8_t*)((char*)eax + 0x48) = 0;
00699262          *(uint8_t*)((char*)eax + 0x49) = 0;
00699266          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00699271          *(uint32_t*)((char*)eax + 0x4c) = PStringBase<char>::s_NullBuffer_1;
00699274          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0069927a          ecx_3 = eax;
0069924f      }
0069924f      
00699286      *(uint32_t*)arg2 = ecx_3;
00699286      
00699288      if (ecx_3 != 0)
00699288      {
006992b4          if (QuickButton::InitButton(ecx_3, arg3, arg4, arg5, arg6, arg7, arg8, arg9) != 0)
006992b4          {
006992dd              __return->m_val = 0;
006992e4              return __return;
006992b4          }
006992b4          
006992b6          class QuickButton* ecx_4 = *(uint32_t*)arg2;
006992b6          
006992ba          if (ecx_4 != 0)
006992ba          {
006992bc              uint32_t m_cRef = ecx_4->m_cRef;
006992bc              ecx_4->m_cRef -= 1;
006992bc              
006992bf              if (m_cRef == 1)
006992c1                  ecx_4->vtable->__vecDelDtor(1);
006992c1              
006992c7              *(uint32_t*)arg2 = nullptr;
006992ba          }
00699288      }
00699288      
006992d1      __return->m_val = 0x80004005;
006992d8      return __return;
00699240  }

006992e5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

006992f0  uint8_t __thiscall Box2D::Includes(class Box2D const* this, class Box2D const* arg2)

006992f0  {
006992f0      class Box2D* var_4 = this;
006992f4      class Box2D* esi = arg2;
006992f8      int32_t m_x0 = esi->m_x0;
006992fa      int32_t m_y0 = esi->m_y0;
006992fe      int32_t m_x0_1 = this->m_x0;
006992fe      
00699302      if (m_x0 >= m_x0_1)
00699302      {
00699304          int32_t m_x1_1 = this->m_x1;
00699309          var_4 = m_x1_1;
00699309          
0069930d          if (m_x0 <= m_x1_1)
0069930d          {
0069930f              int32_t m_y0_1 = this->m_y0;
00699314              arg2 = m_y0_1;
00699314              
00699318              if (m_y0 >= m_y0_1)
00699318              {
0069931a                  int32_t m_y1 = this->m_y1;
0069931a                  
0069931f                  if (m_y0 <= m_y1)
0069931f                  {
00699321                      int32_t m_x1 = esi->m_x1;
00699321                      
00699336                      if ((m_x1 >= m_x0_1 && (m_x1 <= m_x1_1 && (m_y0 >= arg2 && m_y0 <= m_y1))))
00699336                      {
0069933a                          int32_t m_y1_1 = esi->m_y1;
0069933a                          
0069935d                          if ((m_x0 >= m_x0_1 && (m_x0 <= var_4 && (m_y1_1 >= arg2 && (m_y1_1 <= m_y1 && (m_x1 >= m_x0_1 && (m_x1 <= var_4 && (m_y1_1 >= arg2 && m_y1_1 <= m_y1))))))))
00699369                              return 1;
00699336                      }
0069931f                  }
00699318              }
0069930d          }
00699302      }
00699302      
00699373      return 0;
006992f0  }

00699376                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

00699380  uint8_t __thiscall Box2D::Collide(class Box2D const* this, class Box2D const* arg2)

00699380  {
00699384      int32_t m_x1 = this->m_x1;
00699388      int32_t m_x0_1 = this->m_x0;
0069938e      int32_t eax;
0069938e      eax = 0;
0069938e      
00699393      if (((m_x1 - m_x0_1) + 1) > 0)
00699393      {
00699395          int32_t m_y1 = this->m_y1;
00699398          int32_t m_y0 = this->m_y0;
00699398          
006993a8          if (((m_y1 - m_y0) + 1) > 0)
006993a8          {
006993ae              int32_t m_x0 = arg2->m_x0;
006993b2              int32_t m_x1_1 = arg2->m_x1;
006993b2              
006993bc              if (((m_x1_1 - m_x0) + 1) > 0)
006993bc              {
006993be                  int32_t m_y1_1 = arg2->m_y1;
006993c1                  int32_t m_y0_1 = arg2->m_y0;
006993c1                  
006993df                  if ((((m_y1_1 - m_y0_1) + 1) > 0 && (m_x0_1 <= m_x1_1 && (m_x1 >= m_x0 && (m_y0 <= m_y1_1 && m_y1 >= m_y0_1)))))
006993df                  {
006993e4                      eax = 1;
006993ea                      return 1;
006993df                  }
006993df                  
006993ed                  eax = 0;
006993bc              }
006993a8          }
00699393      }
00699393      
006993f6      return eax;
00699380  }

006993f9                                                                             90 90 90 90 90 90 90                           .......

00699400  void __thiscall UIObject::SetVirtualScreenPosition(class UIObject* this, uint32_t const arg2, uint32_t const arg3, uint32_t const arg4, uint32_t const arg5)

00699400  {
00699408      this->m_nVirtualX = arg2;
0069940f      this->m_nVirtualY = arg3;
00699416      this->m_nVirtualWidth = arg4;
00699419      this->m_nVirtualHeight = arg5;
0069941c      RenderUI::RecalculateClampedPosition();
00699400  }

00699424              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

00699430  uint8_t __thiscall SmartArray<Box2D,1>::RemoveUnOrderedByIndex(class SmartArray<Box2D,1>* this, uint32_t arg2)

00699430  {
00699430      uint32_t m_num = this->m_num;
00699430      
0069943c      if (arg2 >= m_num)
0069943c      {
00699495          m_num = 0;
0069949a          return 0;
0069943c      }
0069943c      
00699441      this->m_num = (m_num - 1);
00699444      uint32_t eax;
00699444      
00699444      if (arg2 != (m_num - 1))
00699444      {
00699447          class Box2D* m_data = this->m_data;
0069944f          void* eax_2 = &m_data[(m_num - 1)];
00699451          void* edx_2 = &m_data[arg2];
00699451          
00699455          if (edx_2 != eax_2)
00699455          {
00699459              *(uint32_t*)edx_2 = *(uint32_t*)eax_2;
0069945e              *(uint32_t*)((char*)edx_2 + 8) = *(uint32_t*)((char*)eax_2 + 8);
00699464              *(uint32_t*)((char*)edx_2 + 4) = *(uint32_t*)((char*)eax_2 + 4);
0069946a              *(uint32_t*)((char*)edx_2 + 0xc) = *(uint32_t*)((char*)eax_2 + 0xc);
00699455          }
00699455          
00699475          eax = &this->m_data[this->m_num];
0069947e          void var_10;
0069947e          
0069947e          if (eax != &var_10)
0069947e          {
00699482              *(uint32_t*)eax = 0;
00699484              *(uint32_t*)(eax + 8) = 0;
00699487              *(uint32_t*)(eax + 4) = 0;
0069948a              *(uint32_t*)(eax + 0xc) = 0;
0069947e          }
00699444      }
00699444      
0069948d      eax = 1;
00699492      return 1;
00699430  }

0069949d                                                                                         90 90 90                               ...

006994a0  void __fastcall UIObject::UIObject(class UIObject* this)

006994a0  {
006994a8      this->m_tTouchTime = 0f;
006994b0      this->m_cRef = 1;
006994b3      this->m_bVisible = 1;
006994b8      this->vtable = &UIObject::`vftable';
006994be      this->m_bTemporary = 0;
006994c1      this->m_eClampGameView = 0;
006994c4      this->m_nDepth = 0;
006994c7      this->m_nVirtualX = 0;
006994ca      this->m_nVirtualY = 0;
006994cd      this->m_nVirtualWidth = 0;
006994d0      this->m_nVirtualHeight = 0;
006994da      *(uint32_t*)((char*)this->m_tTouchTime)[4] = 0xbff00000;
006994e2      this->m_vScale.x = 0x3f800000;
006994e5      this->m_vScale.y = 1f;
006994e8      this->m_vScale.z = 1f;
006994eb      this->m_pOwner = nullptr;
006994ee      this->m_dirtyRects.m_data = 0;
006994f1      this->m_dirtyRects.m_sizeAndDeallocate = 0;
006994f4      this->m_dirtyRects.m_num = 0;
006994a0  }

006994f9                                                                             90 90 90 90 90 90 90                           .......

00699500  uint8_t __thiscall SmartArray<Box2D,1>::AddToEnd(class SmartArray<Box2D,1>* this, class Box2D const* arg2)

00699500  {
00699509      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00699509      
00699510      if (this->m_num >= eax_1)
00699510      {
0069951e          uint8_t result = SmartArray<Box2D,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
0069951e          
00699525          if (result == 0)
00699528              return result;
00699510      }
00699510      
00699533      void* eax_6 = &this->m_data[this->m_num];
00699533      
0069953b      if (eax_6 != arg2)
0069953b      {
0069953f          *(uint32_t*)eax_6 = arg2->m_x0;
00699544          *(uint32_t*)((char*)eax_6 + 8) = arg2->m_x1;
0069954a          *(uint32_t*)((char*)eax_6 + 4) = arg2->m_y0;
00699550          *(uint32_t*)((char*)eax_6 + 0xc) = arg2->m_y1;
0069953b      }
0069953b      
00699553      this->m_num += 1;
00699556      eax_6 = 1;
00699559      return 1;
00699500  }

0069955c                                                                                      90 90 90 90                              ....

00699560  uint8_t __thiscall Box2D::Subtract(class Box2D const* this, class Box2D const* arg2, class SmartArray<Box2D,1>* arg3)

00699560  {
0069956b      uint8_t result = Box2D::Collide(this, arg2);
0069956b      
00699572      if (result == 0)
00699578          return result;
00699578      
00699584      int32_t m_x0_2;
00699584      int32_t m_y1;
00699584      int32_t m_x1_1;
00699584      int32_t m_y0_1;
00699584      int32_t m_x0_1;
00699584      
00699584      if (&m_x0_2 == this)
00699584      {
00699597          int32_t m_y0_2;
00699597          m_y0_1 = m_y0_2;
0069959b          int32_t m_x1_2;
0069959b          m_x1_1 = m_x1_2;
0069959f          m_x0_1 = m_x0_2;
00699584      }
00699584      else
00699584      {
00699589          m_x0_1 = this->m_x0;
0069958b          m_x1_1 = this->m_x1;
0069958e          m_y0_1 = this->m_y0;
00699591          m_y1 = this->m_y1;
00699584      }
00699584      
006995a7      int32_t m_x0 = arg2->m_x0;
006995af      int32_t m_x0_3;
006995af      
006995af      if (m_x0_1 <= m_x0)
006995af      {
006995b5          m_x0_3 = m_x0_1;
006995bc          m_x0_1 = m_x0;
006995c2          int32_t m_y1_2 = m_y1;
006995c9          int32_t m_y0_3 = m_y0_1;
006995cd          int32_t var_8_1 = (m_x0 - 1);
006995d1          SmartArray<Box2D,1>::AddToEnd(arg3, &m_x0_3);
006995af      }
006995af      
006995da      int32_t m_x1 = arg2->m_x1;
006995da      
006995df      if (m_x1_1 >= m_x1)
006995df      {
006995e8          int32_t m_y1_3 = m_y1;
006995f0          m_x0_3 = (m_x1 + 1);
006995f4          int32_t m_x1_3 = m_x1_1;
006995fb          int32_t m_y0_4 = m_y0_1;
006995ff          m_x1_1 = m_x1;
00699601          SmartArray<Box2D,1>::AddToEnd(arg3, &m_x0_3);
006995df      }
006995df      
0069960a      int32_t m_y0 = arg2->m_y0;
0069960a      
0069960f      if (m_y0_1 <= m_y0)
0069960f      {
00699619          m_x0_3 = m_x0_1;
0069961d          int32_t m_x1_4 = m_x1_1;
00699621          int32_t m_y0_5 = m_y0_1;
00699625          int32_t var_4_1 = (m_y0 - 1);
00699629          SmartArray<Box2D,1>::AddToEnd(arg3, &m_x0_3);
0069960f      }
0069960f      
00699632      int32_t m_y1_1 = arg2->m_y1;
00699632      
0069963b      if (m_y1 >= m_y1_1)
0069963b      {
0069963e          int32_t var_c_1 = (m_y1_1 + 1);
00699646          int32_t m_y1_4 = m_y1;
0069964d          m_x0_3 = m_x0_1;
00699651          int32_t m_x1_5 = m_x1_1;
00699655          SmartArray<Box2D,1>::AddToEnd(arg3, &m_x0_3);
0069963b      }
0069963b      
0069966b      return arg3->m_num != 0;
00699560  }

0069966e                                            90 90                                                                ..

00699670  void __thiscall UIObject::AddDirtyRect(class UIObject* this, class Box2D const* arg2)

00699670  {
00699682      class UIObject* this_1 = this;
00699682      
00699695      if ((((arg2->m_x1 - arg2->m_x0) + 1) > 0 && ((arg2->m_y1 - arg2->m_y0) + 1) > 0))
00699695      {
0069969f          uint32_t i = 0;
0069969f          
006996a4          if (this->m_dirtyRects.m_num > 0)
006996a4          {
006996aa              int32_t ebx_1 = 0;
006996aa              
00699738              do
00699738              {
006996b6                  void* esi_2 = (this->m_dirtyRects.m_data + ebx_1);
006996b6                  
006996c2                  if (Box2D::Includes(esi_2, arg2) != 0)
00699794                      return;
00699794                  
006996d2                  if (Box2D::Includes(arg2, esi_2) == 0)
006996d2                  {
006996e9                      void* var_c = nullptr;
006996ed                      int32_t var_8_1 = 0;
006996f1                      int32_t var_4_1 = 0;
006996f1                      
00699704                      if (Box2D::Subtract(arg2, esi_2, &var_c) != 0)
00699704                      {
0069979b                          int32_t edi_1 = 0;
0069979b                          
0069979f                          if (var_4_1 > 0)
0069979f                          {
006997a1                              void* esi_4 = nullptr;
006997a1                              
006997be                              do
006997be                              {
006997af                                  UIObject::AddDirtyRect(this_1, ((char*)esi_4 + var_c));
006997b8                                  edi_1 += 1;
006997b9                                  esi_4 += 0x10;
006997be                              } while (edi_1 < var_4_1);
0069979f                          }
0069979f                          
006997ce                          if ((var_8_1 & 0x80000000) != 0x80000000)
00699794                              return;
00699794                          
006997d5                          operator delete[](var_c);
006997e4                          return;
00699704                      }
00699704                      
0069971a                      if ((var_8_1 & 0x80000000) == 0x80000000)
00699721                          operator delete[](var_c);
006996d2                  }
006996d2                  else
006996d2                  {
006996dc                      SmartArray<Box2D,1>::RemoveUnOrderedByIndex(&this_1->m_dirtyRects, i);
006996e1                      i -= 1;
006996e2                      ebx_1 -= 0x10;
006996d2                  }
006996d2                  
00699730                  i += 1;
00699731                  ebx_1 += 0x10;
00699736                  this = this_1;
00699738              } while (i < this_1->m_dirtyRects.m_num);
006996a4          }
006996a4          
00699747          int32_t eax_10 = (this->m_dirtyRects.m_sizeAndDeallocate & 0x7fffffff);
0069974e          uint8_t eax_13;
0069974e          
0069974e          if (this->m_dirtyRects.m_num >= eax_10)
0069975c              eax_13 = SmartArray<Box2D,1>::grow(&this->m_dirtyRects, SmartArray<unsigned long,1>::get_new_size(&this->m_dirtyRects, (eax_10 + 1)));
0069975c          
00699763          if ((this->m_dirtyRects.m_num < eax_10 || eax_13 != 0))
00699763          {
0069976d              void* eax_16 = &this->m_dirtyRects.m_data[this->m_dirtyRects.m_num];
0069976d              
00699771              if (eax_16 != arg2)
00699771              {
00699776                  *(uint32_t*)eax_16 = arg2->m_x0;
0069977b                  *(uint32_t*)((char*)eax_16 + 8) = arg2->m_x1;
00699781                  *(uint32_t*)((char*)eax_16 + 4) = arg2->m_y0;
00699787                  *(uint32_t*)((char*)eax_16 + 0xc) = arg2->m_y1;
00699771              }
00699771              
00699741              this->m_dirtyRects.m_num += 1;
00699763          }
00699695      }
00699670  }

006997e7                       90 90 90 90 90 90 90 90 90                                                         .........

006997f0  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::~IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>* this)

006997f0  {
006997f3      class HashTableData<unsigned long,ElementDesc>** m_buckets = this->m_buckets;
006997fb      this->vtable = 0x800abc;
006997fb      
00699801      if (m_buckets != &this->m_aInplaceBuckets)
00699804          operator delete[](m_buckets);
00699804      
0069980e      this->m_buckets = nullptr;
00699811      this->m_firstInterestingBucket = nullptr;
00699814      this->m_numBuckets = 0;
00699817      this->m_numElements = 0;
006997f0  }

0069981c                                                                                      90 90 90 90                              ....

00699820  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>* this, uint32_t arg2)

00699820  {
00699823      class HashTableData<unsigned long,ElementDesc>** m_buckets = this->m_buckets;
0069982b      this->vtable = 0x800abc;
0069982b      
00699831      if (m_buckets != &this->m_aInplaceBuckets)
00699834          operator delete[](m_buckets);
00699834      
0069983e      this->m_buckets = nullptr;
00699841      this->m_firstInterestingBucket = nullptr;
00699844      this->m_numBuckets = 0;
00699847      this->m_numElements = 0;
00699847      
0069984f      if ((arg2 & 1) != 0)
00699852          operator delete(this);
00699852      
0069985d      return this;
00699820  }


00699860  void* __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> > *,0>::`scalar deleting destructor'(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> > *,0>* this, uint32_t arg2)

00699860  {
00699863      class HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> >** m_buckets = this->m_buckets;
0069986b      this->vtable = 0x800ac0;
0069986b      
00699871      if (m_buckets != &this->m_aInplaceBuckets)
00699874          operator delete[](m_buckets);
00699874      
0069987e      this->m_buckets = nullptr;
00699881      this->m_firstInterestingBucket = nullptr;
00699884      this->m_numBuckets = 0;
00699887      this->m_numElements = 0;
00699887      
0069988f      if ((arg2 & 1) != 0)
00699892          operator delete(this);
00699892      
0069989d      return this;
00699860  }


006998a0  uint8_t __thiscall SmartArray<BaseInfo,1>::contains(class SmartArray<BaseInfo,1> const* this, struct BaseInfo const* arg2)

006998a0  {
006998a2      uint32_t m_num = this->m_num;
006998a5      int32_t edx = 0;
006998a5      
006998aa      if (m_num > 0)
006998aa      {
006998b2          int32_t* m_data = this->m_data;
006998b2          
006998c6          do
006998c6          {
006998be              if ((*(uint32_t*)m_data == arg2->elementID && m_data[1] == arg2->layoutID.id))
006998d6                  return edx != 0xffffffff;
006998d6              
006998c0              edx += 1;
006998c1              m_data = &m_data[2];
006998c6          } while (edx < m_num);
006998aa      }
006998aa      
006998d6      return 0xffffffff != 0xffffffff;
006998a0  }

006998d9                                                                             90 90 90 90 90 90 90                           .......

006998e0  void __thiscall LayoutDesc::GetSubDataIDs(class LayoutDesc const* this, class QualifiedDataIDArray* arg2)

006998e0  {
006998ee      void __return;
006998ee      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_elements.m_intrusiveTable, &__return);
006998f3      class HashTableData<unsigned long,DBOCache *>* i_1 = eax->m_currElement;
006998f8      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax->m_currHashTable;
006998fa      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax->m_currBucket;
006998fa      
006998fd      if (i_1 != 0)
006998fd      {
0069990b          while (true)
0069990b          {
00699904              i_1->m_data->m_ObjTable.m_intrusiveTable.vtable(arg2);
0069990e              i_1 = i_1->m_hashNext;
0069990e              
00699913              if (i_1 == 0)
00699913              {
0069992b                  class HashTableData<unsigned long,DBOCache *>* i;
0069992b                  
0069992b                  do
0069992b                  {
00699920                      m_currBucket = &m_currBucket[1];
00699920                      
00699925                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0069993a                          return;
0069993a                      
00699927                      i = *(uint32_t*)m_currBucket;
0069992b                  } while (i == 0);
0069992b                  
0069992d                  i_1 = i;
0069992d                  
00699931                  if (i_1 == 0)
00699931                      break;
00699913              }
0069990b          }
006998fd      }
006998e0  }

0069993d                                                                                         90 90 90                               ...

00699940  uint8_t __thiscall HashTable<unsigned long,ElementDesc,0>::find(class HashTable<unsigned long,ElementDesc,0> const* this, uint32_t const* arg2, class ElementDesc* arg3)

00699940  {
00699945      uint32_t const esi = *(uint32_t*)arg2;
00699958      int32_t* i;
00699958      
00699958      for (i = this->m_intrusiveTable.m_buckets[(COMBINE(0, esi) % this->m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
00699958      {
00699962          if (*(uint32_t*)i == esi)
00699962          {
00699973              if (i == 0)
00699973                  break;
00699973              
0069997d              ElementDesc::operator=(arg3, &i[2]);
00699982              class ElementDesc* eax_3;
00699982              eax_3 = 1;
00699985              return 1;
00699962          }
00699958      }
00699958      
0069996b      i = 0;
0069996e      return 0;
00699940  }

00699988                          90 90 90 90 90 90 90 90                                                          ........

00699990  class ElementDesc* __thiscall LayoutDesc::AccessElementDesc(class LayoutDesc const* this, uint32_t arg2)

00699990  {
006999ac      for (int32_t* i = this->m_elements.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_elements.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
006999ac      {
006999b2          if (*(uint32_t*)i == arg2)
006999b2          {
006999c3              if (i != 0)
006999c9                  return &i[2];
006999c9              
006999c3              break;
006999b2          }
006999ac      }
006999ac      
006999be      return 0;
00699990  }

006999cc                                      90 90 90 90                                                              ....

006999d0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>* this, uint32_t arg2)

006999d0  {
006999db      arg2 = arg2;
006999df      uint8_t edx = ((int8_t)arg2);
006999e3      this->m_buckets = nullptr;
006999e6      this->m_firstInterestingBucket = nullptr;
006999e9      this->m_numBuckets = 0;
006999ec      this->m_numElements = 0;
006999f0      this->vtable = 0x800abc;
006999f6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00699a09      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00699a09      
00699a13      if (eax == bucketSizesEnd_1)
00699a15          eax -= 4;
00699a15      
00699a18      uint32_t eax_1 = *(uint32_t*)eax;
00699a1d      this->m_numBuckets = eax_1;
00699a1d      
00699a20      if (eax_1 > 0x17)
00699a36          this->m_buckets = operator new[]((eax_1 << 2));
00699a20      else
00699a25          this->m_buckets = &this->m_aInplaceBuckets;
00699a25      
00699a3c      class HashTableData<unsigned long,ElementDesc>** m_buckets = this->m_buckets;
00699a3f      uint32_t ecx_3 = (this->m_numBuckets << 2);
00699a45      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00699a56      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
006999d0  }

00699a5f                                                                                               90                                 .

00699a60  void __thiscall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> > *,0>::IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> > *,0>(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> > *,0>* this, uint32_t arg2)

00699a60  {
00699a6b      arg2 = arg2;
00699a6f      uint8_t edx = ((int8_t)arg2);
00699a73      this->m_buckets = nullptr;
00699a76      this->m_firstInterestingBucket = nullptr;
00699a79      this->m_numBuckets = 0;
00699a7c      this->m_numElements = 0;
00699a80      this->vtable = 0x800ac0;
00699a86      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00699a99      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
00699a99      
00699aa3      if (eax == bucketSizesEnd_1)
00699aa5          eax -= 4;
00699aa5      
00699aa8      uint32_t eax_1 = *(uint32_t*)eax;
00699aad      this->m_numBuckets = eax_1;
00699aad      
00699ab0      if (eax_1 > 0x17)
00699ac6          this->m_buckets = operator new[]((eax_1 << 2));
00699ab0      else
00699ab5          this->m_buckets = &this->m_aInplaceBuckets;
00699ab5      
00699acc      class HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> >** m_buckets = this->m_buckets;
00699acf      uint32_t ecx_3 = (this->m_numBuckets << 2);
00699ad5      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
00699ae6      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
00699a60  }

00699aef                                               90                                                                 .

00699af0  uint8_t __thiscall SmartArray<BaseInfo,1>::add(class SmartArray<BaseInfo,1>* this, struct BaseInfo const* arg2)

00699af0  {
00699af9      int32_t eax_1 = (this->m_sizeAndDeallocate & 0x7fffffff);
00699af9      
00699b00      if (this->m_num >= eax_1)
00699b00      {
00699b0e          uint8_t result = SmartArray<FontReference,1>::grow(this, SmartArray<unsigned long,1>::get_new_size(this, (eax_1 + 1)));
00699b0e          
00699b15          if (result == 0)
00699b18              return result;
00699b00      }
00699b00      
00699b1b      uint32_t m_num = this->m_num;
00699b22      struct BaseInfo* m_data = this->m_data;
00699b27      m_data[m_num].elementID = arg2->elementID;
00699b2d      m_data[m_num].layoutID.id = arg2->layoutID.id;
00699b31      this->m_num += 1;
00699b35      uint32_t eax_5;
00699b35      eax_5 = 1;
00699b38      return 1;
00699af0  }

00699b3b                                                                                   90 90 90 90 90                             .....

00699b40  uint8_t __thiscall SmartArray<BaseInfo,1>::add_unique(class SmartArray<BaseInfo,1>* this, struct BaseInfo const* arg2)

00699b40  {
00699b50      if (SmartArray<BaseInfo,1>::contains(this, arg2) == 0)
00699b63          return SmartArray<BaseInfo,1>::add(this, arg2);
00699b63      
00699b56      return 0;
00699b40  }

00699b66                    90 90 90 90 90 90 90 90 90 90                                                        ..........

00699b70  uint8_t __thiscall HashTable<unsigned long,ElementDesc,0>::add(class HashTable<unsigned long,ElementDesc,0>* this, uint32_t const* arg2, class ElementDesc const* arg3)

00699b70  {
00699b7e      void* esi = operator new(0x1cc);
00699b7e      
00699b85      if (esi == 0)
00699ba5          esi = nullptr;
00699b85      else
00699b85      {
00699b91          *(uint32_t*)esi = *(uint32_t*)arg2;
00699b97          *(uint32_t*)((char*)esi + 4) = 0;
00699b9e          ElementDesc::ElementDesc(((char*)esi + 8), arg3);
00699b85      }
00699b85      
00699bb2      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
00699bd4          return 1;
00699bd4      
00699bb6      if (esi != 0)
00699bb6      {
00699bbb          ElementDesc::~ElementDesc(((char*)esi + 8));
00699bc1          operator delete(esi);
00699bb6      }
00699bb6      
00699bcd      return 0;
00699b70  }

00699bd7                                                                       90 90 90 90 90 90 90 90 90                         .........

00699be0  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>* this)

00699be0  {
00699be8      if (this->m_numElements != 0)
00699be8      {
00699bea          void* edi;
00699bea          void* var_8_1 = edi;
00699bea          
00699c60          do
00699c60          {
00699bf6              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
00699bfc              int32_t* m_firstInterestingBucket_2;
00699bfc              
00699bfc              if (this->m_firstInterestingBucket == ecx_1)
00699bfc              {
00699c12              label_699c12:
00699c12                  m_firstInterestingBucket_2 = nullptr;
00699c14                  edi = nullptr;
00699bfc              }
00699bfc              else
00699bfc              {
00699c00                  while (true)
00699c00                  {
00699c00                      class HashTableData<unsigned long,ElementDesc>** m_firstInterestingBucket = this->m_firstInterestingBucket;
00699c00                      
00699c06                      if (*(uint32_t*)m_firstInterestingBucket != 0)
00699c06                      {
00699c18                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
00699c1b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
00699c1d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
00699c1d                          break;
00699c06                      }
00699c06                      
00699c0d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
00699c0d                      
00699c10                      if (&m_firstInterestingBucket[1] == ecx_1)
00699c10                          goto label_699c12;
00699c00                  }
00699bfc              }
00699bfc              
00699c1f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
00699c1f              
00699c23              if (eax_3 == edi)
00699c35                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00699c23              else
00699c23              {
00699c2c                  void* ecx_2;
00699c2c                  
00699c2c                  do
00699c2c                  {
00699c25                      ecx_2 = eax_3;
00699c27                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
00699c2c                  } while (eax_3 != edi);
00699c2c                  
00699c30                  if (ecx_2 != 0)
00699c3c                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
00699c30                  else
00699c35                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
00699c23              }
00699c23              
00699c45              this->m_numElements -= 1;
00699c45              
00699c48              if (edi != 0)
00699c48              {
00699c4d                  ElementDesc::~ElementDesc(((char*)edi + 8));
00699c53                  operator delete(edi);
00699c48              }
00699c60          } while (this->m_numElements != 0);
00699be8      }
00699be0  }

00699bed                                         8d 49 00                                                               .I.
00699c65                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

00699c70  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>,HashTableData<unsigned long,ElementDesc> *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>* arg2, class Archive* arg3)

00699c70  {
00699c76      class Archive* esi = arg3;
00699c76      
00699c82      if ((!(esi->m_flags) & 1) != 0)
00699c88          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
00699c88      
00699c96      int32_t ebx;
00699c96      
00699c96      if ((((int8_t)esi->m_flags) & 5) != 1)
00699cd5          ebx = arg3;
00699c96      else
00699c96      {
00699c9f          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
00699ca5          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
00699cad          arg3 = arg2->m_numBuckets;
00699cbd          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
00699cbd          
00699cc7          if (eax_2 == bucketSizesEnd_1)
00699cc9              eax_2 -= 4;
00699cc9          
00699cd0          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
00699c96      }
00699c96      
00699cdd      Archive::CheckAlignment(esi, 1);
00699ce6      char* eax_3 = Archive::GetBytes(esi, 1);
00699ce6      
00699ced      if (eax_3 != 0)
00699ced      {
00699cf3          if ((esi->m_flags & 1) == 0)
00699cf9              ebx = *(uint8_t*)eax_3;
00699cf3          else
00699cf5              *(uint8_t*)eax_3 = ebx;
00699ced      }
00699ced      
00699cff      if ((esi->m_flags & 5) == 0)
00699cff      {
00699d07          uint32_t eax_4 = ((uint32_t)ebx);
00699d07          
00699d0c          if (eax_4 < 0x17)
00699d25              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
00699d0c          else
00699d10              Archive::RaiseError(esi);
00699cff      }
00699cff      
00699d31      if ((((int8_t)esi->m_flags) & 5) == 1)
00699d3a          arg3 = arg2->m_numElements;
00699d3a      
00699d49      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
00699d49      
00699d5a      if ((((int8_t)esi->m_flags) & 5) == 1)
00699d5a      {
00699d65          void __return;
00699d65          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
00699d6a          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
00699d6c          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
00699d6f          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
00699d6f          
00699d74          while (i != 0)
00699d74          {
00699dab              do
00699dab              {
00699d7a                  Archive::CheckAlignment(esi, 4);
00699d83                  uint8_t* eax_7 = Archive::GetBytes(esi, 4);
00699d83                  
00699d8a                  if (eax_7 != 0)
00699d8a                  {
00699d90                      if ((esi->m_flags & 1) == 0)
00699d9a                          i->m_hashKey = *(uint32_t*)eax_7;
00699d90                      else
00699d94                          *(uint32_t*)eax_7 = i->m_hashKey;
00699d8a                  }
00699d8a                  
00699d9c                  i->m_data->m_ObjTable.vtable(esi);
00699da6                  i = i->m_hashNext;
00699dab              } while (i != 0);
00699dab              
00699db6              while (true)
00699db6              {
00699db6                  m_currBucket = &m_currBucket[1];
00699db6                  
00699dbb                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
00699dbb                      break;
00699dbb                  
00699dbd                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
00699dbd                  
00699dc2                  if (i_1 != 0)
00699dc2                  {
00699dc4                      i = i_1;
00699dc6                      break;
00699dc2                  }
00699db6              }
00699d74          }
00699d5a      }
00699d5a      
00699dcc      if ((esi->m_flags & 5) == 0)
00699dcc      {
00699dd4          uint32_t eax_10 = Archive::GetSizeLeft(esi);
00699dd9          class Archive* ecx_17 = arg3;
00699dd9          
00699ddf          if (ecx_17 > eax_10)
00699e76              Archive::RaiseError(esi);
00699ddf          else
00699ddf          {
00699de5              void* ebx_3 = nullptr;
00699de7              int32_t ebp_1 = 0;
00699de7              
00699deb              if (ecx_17 > 0)
00699deb              {
00699dfb                  while (true)
00699dfb                  {
00699dfb                      void* edi_1 = operator new(0x1cc);
00699dfb                      
00699e02                      if (edi_1 == 0)
00699e15                          edi_1 = nullptr;
00699e02                      else
00699e02                      {
00699e07                          *(uint32_t*)((char*)edi_1 + 4) = 0;
00699e0e                          ElementDesc::ElementDesc(((char*)edi_1 + 8));
00699e02                      }
00699e02                      
00699e1b                      Archive::CheckAlignment(esi, 4);
00699e24                      uint8_t* eax_12 = Archive::GetBytes(esi, 4);
00699e24                      
00699e2b                      if (eax_12 != 0)
00699e2b                      {
00699e31                          if ((esi->m_flags & 1) == 0)
00699e3b                              *(uint32_t*)edi_1 = *(uint32_t*)eax_12;
00699e31                          else
00699e35                              *(uint32_t*)eax_12 = *(uint32_t*)edi_1;
00699e2b                      }
00699e2b                      
00699e44                      *(uint32_t*)(*(uint32_t*)((char*)edi_1 + 8) + 4)(esi);
00699e44                      
00699e50                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
00699e82                          return;
00699e82                      
00699e5f                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebx_3) == 0)
00699e5f                          break;
00699e5f                      
00699e65                      ebp_1 += 1;
00699e68                      ebx_3 = edi_1;
00699e68                      
00699e6a                      if (ebp_1 >= arg3)
00699e73                          return;
00699dfb                  }
00699dfb                  
00699e76                  Archive::RaiseError(esi);
00699deb              }
00699ddf          }
00699dcc      }
00699c70  }

00699e83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

00699e90  void __fastcall LayoutDesc::Destroy(class LayoutDesc* this)

00699e90  {
00699e9b      this->m_displayHeight = 0;
00699e9e      this->m_displayWidth = 0;
00699ea1      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(&this->m_elements.m_intrusiveTable);
00699ea6      class PSRefBufferCharData<char>* m_charbuffer = this->m_strElementHeader.m_charbuffer;
00699ea6      
00699ebe      if (m_charbuffer != PStringBase<char>::s_NullBuffer)
00699ebe      {
00699ecf          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
00699ed7              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
00699ed7          
00699ed9          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
00699ee4          this->m_strElementHeader.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
00699eea          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
00699ebe      }
00699ebe      
00699eec      class PSRefBufferCharData<char>* m_charbuffer_1 = this->m_strElementWHeader.m_charbuffer;
00699eec      
00699ef8      if (m_charbuffer_1 != PStringBase<char>::s_NullBuffer)
00699ef8      {
00699f09          if ((InterlockedDecrement(&m_charbuffer_1[-1]) == 0 && m_charbuffer_1 != 0x14))
00699f11              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_1 + -0x14)(1);
00699f11          
00699f13          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
00699f1f          this->m_strElementWHeader.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
00699f25          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_3 - 0x10));
00699ef8      }
00699ef8      
00699f27      class PSRefBufferCharData<char>* m_charbuffer_2 = this->m_strStateHeader.m_charbuffer;
00699f27      
00699f33      if (m_charbuffer_2 != PStringBase<char>::s_NullBuffer)
00699f33      {
00699f44          if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
00699f4c              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
00699f4c          
00699f4e          class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
00699f59          this->m_strStateHeader.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
00699f5f          InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
00699f33      }
00699f33      
00699f61      class PSRefBufferCharData<char>* m_charbuffer_3 = this->m_strStateWHeader.m_charbuffer;
00699f61      
00699f6d      if (m_charbuffer_3 != PStringBase<char>::s_NullBuffer)
00699f6d      {
00699f7e          if ((InterlockedDecrement(&m_charbuffer_3[-1]) == 0 && m_charbuffer_3 != 0x14))
00699f86              *(uint32_t*)*(int32_t*)((char*)m_charbuffer_3 + -0x14)(1);
00699f86          
00699f88          class PStringBase<char> PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
00699f94          this->m_strStateWHeader.m_charbuffer = PStringBase<char>::s_NullBuffer_4;
00699f9a          InterlockedIncrement((PStringBase<char>::s_NullBuffer_4 - 0x10));
00699f6d      }
00699e90  }

00699fa1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

00699fb0  void __fastcall HashTable<unsigned long,ElementDesc,0>::~HashTable<unsigned long,ElementDesc,0>(class HashTable<unsigned long,ElementDesc,0>* this)

00699fb0  {
00699fb4      this->vtable = 0x800ac4;
00699fbc      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(&this->m_intrusiveTable);
00699fc1      class HashTableData<unsigned long,ElementDesc>** m_buckets = this->m_intrusiveTable.m_buckets;
00699fb1      this->m_intrusiveTable.vtable = 0x800abc;
00699fb1      
00699fcf      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
00699fd2          operator delete[](m_buckets);
00699fd2      
00699fb1      this->m_intrusiveTable.m_buckets = nullptr;
00699fb1      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
00699fb1      this->m_intrusiveTable.m_numBuckets = 0;
00699fb1      this->m_intrusiveTable.m_numElements = 0;
00699fb0  }

00699fea                                90 90 90 90 90 90                                                            ......

00699ff0  void* __thiscall HashTable<unsigned long,ElementDesc,0>::operator=(void* arg1, uint32_t arg2)

00699ff0  {
00699ff5      uint32_t edi = arg2;
00699ff9      void* ebx = arg1;
00699ffd      void* var_1c = ebx;
00699ffd      
0069a001      if (ebx != edi)
0069a001      {
0069a00e          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(((char*)ebx + 4));
0069a016          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0069a01c          arg2 = *(uint32_t*)(edi + 0x6c);
0069a033          uint32_t* eax_3 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0069a033          
0069a03d          if (eax_3 == bucketSizesEnd_1)
0069a03f              eax_3 -= 4;
0069a03f          
0069a047          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize_internal(((char*)ebx + 4), *(uint32_t*)eax_3);
0069a054          void* ebp_1 = nullptr;
0069a056          void __return;
0069a056          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin((edi + 4), &__return);
0069a05b          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
0069a05d          class HashTableData<unsigned long,DBOCache *>* edi_1 = eax_4->m_currElement;
0069a069          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
0069a069          
0069a06d          if (edi_1 != 0)
0069a06d          {
0069a08a              while (true)
0069a08a              {
0069a08a                  void* esi_2 = operator new(0x1cc);
0069a08a                  
0069a091                  if (esi_2 == 0)
0069a0ac                      esi_2 = nullptr;
0069a091                  else
0069a091                  {
0069a09c                      *(uint32_t*)esi_2 = edi_1->m_hashKey;
0069a09e                      *(uint32_t*)((char*)esi_2 + 4) = 0;
0069a0a5                      ElementDesc::ElementDesc(((char*)esi_2 + 8), &edi_1->m_data);
0069a091                  }
0069a091                  
0069a0b1                  int32_t ebx_1 = *(uint32_t*)((char*)ebx + 0x6c);
0069a0b8                  uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)esi_2) % ebx_1);
0069a0b8                  
0069a0be                  if (ebp_1 == 0)
0069a0be                  {
0069a0de                  label_69a0de:
0069a0de                      void** eax_13 = (*(uint32_t*)((char*)var_1c + 0x64) + (temp1_1 << 2));
0069a0e1                      *(uint32_t*)eax_13 = esi_2;
0069a0e1                      
0069a0e3                      if (ebp_1 == 0)
0069a0e5                          *(uint32_t*)((char*)var_1c + 0x68) = eax_13;
0069a0e5                      
0069a0f3                      *(uint32_t*)((char*)var_1c + 0x70) += 1;
0069a0be                  }
0069a0be                  else
0069a0be                  {
0069a0c5                      uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)ebp_1) % ebx_1);
0069a0c5                      
0069a0c9                      if (temp1_1 == temp1_2)
0069a0c9                      {
0069a0cb                          *(uint32_t*)((char*)ebp_1 + 4) = esi_2;
0069a0f3                          *(uint32_t*)((char*)var_1c + 0x70) += 1;
0069a0c9                      }
0069a0c9                      else if (temp1_1 > temp1_2)
0069a0d0                          goto label_69a0de;
0069a0be                  }
0069a0be                  
0069a0f6                  edi_1 = edi_1->m_hashNext;
0069a0fb                  ebp_1 = esi_2;
0069a0fb                  
0069a0fd                  if (edi_1 == 0)
0069a0fd                  {
0069a114                      while (true)
0069a114                      {
0069a114                          void* m_currBucket_1 = &m_currBucket[1];
0069a119                          m_currBucket = m_currBucket_1;
0069a119                          
0069a11d                          if (m_currBucket_1 != &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0069a11d                          {
0069a11f                              class HashTableData<unsigned long,DBOCache *>* edx_9 = *(uint32_t*)m_currBucket_1;
0069a11f                              
0069a123                              if (edx_9 == 0)
0069a123                                  continue;
0069a123                              else
0069a123                              {
0069a125                                  edi_1 = edx_9;
0069a125                                  
0069a129                                  if (edi_1 != 0)
0069a129                                      break;
0069a123                              }
0069a11d                          }
0069a11d                          
0069a12f                          return var_1c;
0069a114                      }
0069a0fd                  }
0069a0fd                  
0069a075                  ebx = var_1c;
0069a08a              }
0069a06d          }
0069a001      }
0069a001      
0069a13c      return ebx;
00699ff0  }

0069a13f                                                                                               90                                 .

0069a140  void* __thiscall HashTable<unsigned long,ElementDesc,0>::`scalar deleting destructor'(class HashTable<unsigned long,ElementDesc,0>* this, uint32_t arg2)

0069a140  {
0069a149      this->vtable = 0x800ac4;
0069a14f      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(&this->m_intrusiveTable);
0069a154      class HashTableData<unsigned long,ElementDesc>** m_buckets = this->m_intrusiveTable.m_buckets;
0069a144      this->m_intrusiveTable.vtable = 0x800abc;
0069a144      
0069a162      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0069a165          operator delete[](m_buckets);
0069a165      
0069a144      this->m_intrusiveTable.m_buckets = nullptr;
0069a144      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0069a144      this->m_intrusiveTable.m_numBuckets = 0;
0069a144      this->m_intrusiveTable.m_numElements = 0;
0069a144      
0069a180      if ((arg2 & 1) != 0)
0069a183          operator delete(this);
0069a183      
0069a18f      return this;
0069a140  }

0069a192                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0069a1a0  void __fastcall LayoutDesc::LayoutDesc(class LayoutDesc* this)

0069a1a0  {
0069a1aa      DBObj::DBObj(this, INVALID_DID.id);
0069a1b1      this->vtable = 0x800ad0;
0069a1b7      this->m_displayWidth = 0;
0069a1ba      this->m_displayHeight = 0;
0069a1c2      this->m_elements.vtable = 0x800ac4;
0069a1c9      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>(&this->m_elements.m_intrusiveTable, 0x17);
0069a1ce      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0069a1e0      this->m_strElementHeader.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0069a1e6      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0069a1e8      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069a1f3      this->m_strElementWHeader.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0069a1f9      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0069a1fb      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_4 = PStringBase<char>::s_NullBuffer;
0069a207      this->m_strStateHeader.m_charbuffer = PStringBase<char>::s_NullBuffer_4;
0069a20d      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_4 - 0x10));
0069a20f      class PStringBase<char> PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer;
0069a21b      this->m_strStateWHeader.m_charbuffer = PStringBase<char>::s_NullBuffer_3;
0069a221      InterlockedIncrement((PStringBase<char>::s_NullBuffer_3 - 0x10));
0069a1a0  }

0069a228                          90 90 90 90 90 90 90 90                                                          ........

0069a230  void __fastcall LayoutDesc::~LayoutDesc(class LayoutDesc* this)

0069a230  {
0069a236      this->vtable = 0x800ad0;
0069a23c      LayoutDesc::Destroy(this);
0069a24d      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_strStateWHeader.m_charbuffer - 0x14);
0069a24d      
0069a25e      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0069a266          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0069a266      
0069a26e      void* __offset(PSRefBufferCharData<char>, -0x14) edi_3 = (this->m_strStateHeader.m_charbuffer - 0x14);
0069a26e      
0069a27d      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0069a285          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0069a285      
0069a28d      void* __offset(PSRefBufferCharData<char>, -0x14) edi_5 = (this->m_strElementWHeader.m_charbuffer - 0x14);
0069a28d      
0069a29c      if ((InterlockedDecrement(((char*)edi_5 + 4)) == 0 && edi_5 != 0))
0069a2a4          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_5) + -0x14)(1);
0069a2a4      
0069a2ac      void* __offset(PSRefBufferCharData<char>, -0x14) edi_7 = (this->m_strElementHeader.m_charbuffer - 0x14);
0069a2ac      
0069a2bb      if ((InterlockedDecrement(((char*)edi_7 + 4)) == 0 && edi_7 != 0))
0069a2c3          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_7) + -0x14)(1);
0069a2c3      
0069a2ca      this->m_elements.vtable = 0x800ac4;
0069a2d1      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(&this->m_elements.m_intrusiveTable);
0069a2d6      class HashTableData<unsigned long,ElementDesc>** m_buckets = this->m_elements.m_intrusiveTable.m_buckets;
0069a2c5      this->m_elements.m_intrusiveTable.vtable = 0x800abc;
0069a2c5      
0069a2e4      if (m_buckets != &this->m_elements.m_intrusiveTable.m_aInplaceBuckets)
0069a2e7          operator delete[](m_buckets);
0069a2e7      
0069a2c5      this->m_elements.m_intrusiveTable.m_buckets = nullptr;
0069a2c5      this->m_elements.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0069a2c5      this->m_elements.m_intrusiveTable.m_numBuckets = 0;
0069a2c5      this->m_elements.m_intrusiveTable.m_numElements = 0;
0069a301      /* tailcall */
0069a301      return DBObj::~DBObj(this);
0069a230  }

0069a306                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0069a310  void __fastcall IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> > *,0>::delete_contents(class IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> > *,0>* this)

0069a310  {
0069a31b      while (this->m_numElements != 0)
0069a31b      {
0069a329          void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0069a32f          class HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> >** m_firstInterestingBucket_2;
0069a32f          void* edi_1;
0069a32f          
0069a32f          if (this->m_firstInterestingBucket == ecx_1)
0069a32f          {
0069a342          label_69a342:
0069a342              m_firstInterestingBucket_2 = nullptr;
0069a344              edi_1 = nullptr;
0069a32f          }
0069a32f          else
0069a32f          {
0069a331              while (true)
0069a331              {
0069a331                  class HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> >** m_firstInterestingBucket = this->m_firstInterestingBucket;
0069a331                  
0069a336                  if (*(uint32_t*)m_firstInterestingBucket != 0)
0069a336                  {
0069a348                      class HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> >** m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0069a34b                      edi_1 = *(uint32_t*)m_firstInterestingBucket_1;
0069a34d                      m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0069a34d                      break;
0069a336                  }
0069a336                  
0069a33d                  this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0069a33d                  
0069a340                  if (&m_firstInterestingBucket[1] == ecx_1)
0069a340                      goto label_69a342;
0069a331              }
0069a32f          }
0069a32f          
0069a34f          class HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> >* m_hashNext = *(uint32_t*)m_firstInterestingBucket_2;
0069a34f          
0069a353          if (m_hashNext == edi_1)
0069a365              *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0069a353          else
0069a353          {
0069a35c              class HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> >* m_hashNext_1;
0069a35c              
0069a35c              do
0069a35c              {
0069a355                  m_hashNext_1 = m_hashNext;
0069a357                  m_hashNext = m_hashNext->m_hashNext;
0069a35c              } while (m_hashNext != edi_1);
0069a35c              
0069a360              if (m_hashNext_1 != 0)
0069a36c                  m_hashNext_1->m_hashNext = m_hashNext->m_hashNext;
0069a360              else
0069a365                  *(uint32_t*)m_firstInterestingBucket_2 = m_hashNext->m_hashNext;
0069a353          }
0069a353          
0069a375          this->m_numElements -= 1;
0069a375          
0069a378          if (edi_1 != 0)
0069a378          {
0069a37f              *(uint32_t*)((char*)edi_1 + 8) = 0x800ac4;
0069a386              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(((char*)edi_1 + 0xc));
0069a38b              void* eax_4 = *(uint32_t*)((char*)edi_1 + 0x6c);
0069a393              *(uint32_t*)((char*)edi_1 + 0xc) = 0x800abc;
0069a393              
0069a399              if (eax_4 != ((char*)edi_1 + 0x10))
0069a39c                  operator delete[](eax_4);
0069a39c              
0069a3a5              *(uint32_t*)((char*)edi_1 + 0x6c) = 0;
0069a3a8              *(uint32_t*)((char*)edi_1 + 0x70) = 0;
0069a3ab              *(uint32_t*)((char*)edi_1 + 0x74) = 0;
0069a3ae              *(uint32_t*)((char*)edi_1 + 0x78) = 0;
0069a3b1              operator delete(edi_1);
0069a378          }
0069a31b      }
0069a310  }

0069a3c7                       90 90 90 90 90 90 90 90 90                                                         .........

0069a3d0  uint8_t __thiscall HashTable<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0>,0>::add(class HashTable<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0>,0>* this, class IDClass<_tagDataID,32,0>* arg2, class HashTable<unsigned long,ElementDesc,0> const* arg3)

0069a3d0  {
0069a3d0      class HashTable<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0>,0>* this_1 = this;
0069a3df      void* esi = operator new(0x7c);
0069a3df      
0069a3e8      if (esi == 0)
0069a41a          esi = nullptr;
0069a3e8      else
0069a3e8      {
0069a3f5          *(uint32_t*)esi = arg2->id;
0069a3f7          *(uint32_t*)((char*)esi + 4) = 0;
0069a3fd          *(uint32_t*)((char*)esi + 8) = 0x800ac4;
0069a40a          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>(((char*)esi + 0xc), arg3->m_intrusiveTable.m_numBuckets);
0069a412          HashTable<unsigned long,ElementDesc,0>::operator=(((char*)esi + 8), arg3);
0069a3e8      }
0069a3e8      
0069a42b      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
0069a47f          return 1;
0069a47f      
0069a42f      if (esi != 0)
0069a42f      {
0069a436          *(uint32_t*)((char*)esi + 8) = 0x800ac4;
0069a43d          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(((char*)esi + 0xc));
0069a442          void* eax_3 = *(uint32_t*)((char*)esi + 0x6c);
0069a44a          *(uint32_t*)((char*)esi + 0xc) = 0x800abc;
0069a44a          
0069a450          if (eax_3 != ((char*)esi + 0x10))
0069a453              operator delete[](eax_3);
0069a453          
0069a45c          *(uint32_t*)((char*)esi + 0x6c) = 0;
0069a45f          *(uint32_t*)((char*)esi + 0x70) = 0;
0069a462          *(uint32_t*)((char*)esi + 0x74) = 0;
0069a465          *(uint32_t*)((char*)esi + 0x78) = 0;
0069a468          operator delete(esi);
0069a42f      }
0069a42f      
0069a476      return 0;
0069a3d0  }

0069a482        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0069a490  void __thiscall LayoutDesc::Serialize(class LayoutDesc* this, class Archive* arg2)

0069a490  {
0069a491      class Archive* esi = arg2;
0069a499      DBObj::Serialize(this, esi);
0069a4a2      Archive::CheckAlignment(esi, 4);
0069a4ab      uint8_t* eax = Archive::GetBytes(esi, 4);
0069a4ab      
0069a4b2      if (eax != 0)
0069a4b2      {
0069a4b8          if ((esi->m_flags & 1) == 0)
0069a4c3              this->m_displayWidth = *(uint32_t*)eax;
0069a4b8          else
0069a4bd              *(uint32_t*)eax = this->m_displayWidth;
0069a4b2      }
0069a4b2      
0069a4ca      Archive::CheckAlignment(esi, 4);
0069a4d3      uint32_t* eax_1 = Archive::GetBytes(esi, 4);
0069a4d3      
0069a4da      if (eax_1 != 0)
0069a4da      {
0069a4e0          if ((esi->m_flags & 1) == 0)
0069a4eb              this->m_displayHeight = *(uint32_t*)eax_1;
0069a4e0          else
0069a4e5              *(uint32_t*)eax_1 = this->m_displayHeight;
0069a4da      }
0069a4da      
0069a4ee      eax_1 = esi->m_flags;
0069a4f1      eax_1 = !(eax_1);
0069a4f1      
0069a4f5      if ((eax_1 & 1) != 0)
0069a4fa          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(&this->m_elements.m_intrusiveTable);
0069a4fa      
0069a509      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>,HashTableData<unsigned long,ElementDesc> *,SB_Default>(&arg2, &this->m_elements.m_intrusiveTable, esi);
0069a490  }

0069a516                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0069a520  uint8_t LayoutDesc::InqFullDesc(class ElementDesc const* arg1, class ElementDesc* arg2, class SmartArray<BaseInfo,1>* arg3)

0069a520  {
0069a536      if (arg1->m_type != 0)
0069a536      {
0069a540          ElementDesc::operator=(arg2, arg1);
0069a545          class ElementDesc* eax_1;
0069a545          eax_1 = 1;
0069a54e          return 1;
0069a536      }
0069a536      
0069a54f      uint32_t eax;
0069a54f      eax = LayoutDesc::s_bUseDescCache;
0069a555      uint32_t m_baseElement = arg1->m_baseElement;
0069a55c      uint32_t id = arg1->m_baseLayout.id;
0069a563      class List<NoticeHandler *>** esi = nullptr;
0069a567      uint32_t id_1 = id;
0069a56b      uint32_t m_baseElement_1 = m_baseElement;
0069a56f      class List<NoticeHandler *>** id_3;
0069a56f      
0069a56f      if (eax == 0)
0069a56f      {
0069a5fd      label_69a5fd:
0069a5fd          uint32_t m_baseElement_2;
0069a5fd          id_3 = DBObj::Get(QualifiedDataID::QualifiedDataID(&m_baseElement_2, id, 0x23));
0069a609          id_1 = id_3;
0069a609          
0069a60d          if (id_3 != 0)
0069a60d          {
0069a610              class ElementDesc* eax_4 = LayoutDesc::AccessElementDesc(id_3, m_baseElement);
0069a610              
0069a619              if (eax_4 != 0)
0069a619              {
0069a62d                  m_baseElement_2 = m_baseElement;
0069a63f                  uint32_t id_2 = id;
0069a643                  uint8_t eax_6 = SmartArray<BaseInfo,1>::add_unique(arg3, &m_baseElement_2);
0069a64a                  uint8_t eax_8;
0069a64a                  
0069a64a                  if (eax_6 != 0)
0069a66c                      eax_8 = LayoutDesc::InqFullDesc(eax_4, arg2, arg3);
0069a66c                  
0069a676                  if ((eax_6 == 0 || eax_8 == 0))
0069a676                  {
0069a650                      MasterPropertyGrabber::~MasterPropertyGrabber(&id_1);
0069a658                      int32_t eax_7;
0069a658                      eax_7 = 0;
0069a661                      return 0;
0069a676                  }
0069a676                  
0069a67f                  if (LayoutDesc::s_bUseDescCache != 0)
0069a689                      HashTable<unsigned long,ElementDesc,0>::add(esi, &m_baseElement_1, arg2);
0069a689                  
0069a692                  MasterPropertyGrabber::~MasterPropertyGrabber(&id_1);
0069a6ba                  return ElementDesc::Incorporate(arg2, arg1) != 0;
0069a619              }
0069a619              
0069a61d              *(int32_t*)((char*)*(uint32_t*)id_3 + 0x14)();
0069a60d          }
0069a56f      }
0069a56f      else
0069a56f      {
0069a580          esi = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&LayoutDesc::s_DescCache, &id_1);
0069a580          
0069a584          if (esi != 0)
0069a584          {
0069a5cb          label_69a5cb:
0069a5cb              id_3 = LayoutDesc::s_bUseDescCache;
0069a5cb              
0069a5d2              if (id_3 == 0)
0069a5d2                  goto label_69a5fd;
0069a5d2              
0069a5ea              if (HashTable<unsigned long,ElementDesc,0>::find(esi, &m_baseElement_1, arg2) != 0)
0069a6ba                  return ElementDesc::Incorporate(arg2, arg1) != 0;
0069a6ba              
0069a5ea              goto label_69a5fd;
0069a584          }
0069a584          
0069a58c          int32_t var_74 = 0x800ac4;
0069a594          void var_70;
0069a594          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>(&var_70, 0x17);
0069a5a8          HashTable<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0>,0>::add(&LayoutDesc::s_DescCache, &id_1, &var_74);
0069a5b1          HashTable<unsigned long,ElementDesc,0>::~HashTable<unsigned long,ElementDesc,0>(&var_74);
0069a5c5          esi = HashTable<unsigned long,List<NoticeHandler *> *,0>::find(&LayoutDesc::s_DescCache, &id_1);
0069a5c5          
0069a5c9          if (esi != 0)
0069a5c9              goto label_69a5cb;
0069a56f      }
0069a56f      
0069a623      id_3 = 0;
0069a62c      return 0;
0069a520  }

0069a6bb                                                                                   90 90 90 90 90                             .....

0069a6c0  void* __thiscall HashTable<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0>,0>::`scalar deleting destructor'(class HashTable<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0>,0>* this, uint32_t arg2)

0069a6c0  {
0069a6c9      this->vtable = 0x800ac8;
0069a6cf      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> > *,0>::delete_contents(&this->m_intrusiveTable);
0069a6d4      class HashTableData<IDClass<_tagDataID,32,0>,HashTable<unsigned long,ElementDesc,0> >** m_buckets = this->m_intrusiveTable.m_buckets;
0069a6c4      this->m_intrusiveTable.vtable = 0x800ac0;
0069a6c4      
0069a6e2      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0069a6e5          operator delete[](m_buckets);
0069a6e5      
0069a6c4      this->m_intrusiveTable.m_buckets = nullptr;
0069a6c4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0069a6c4      this->m_intrusiveTable.m_numBuckets = 0;
0069a6c4      this->m_intrusiveTable.m_numElements = 0;
0069a6c4      
0069a700      if ((arg2 & 1) != 0)
0069a703          operator delete(this);
0069a703      
0069a70f      return this;
0069a6c0  }

0069a712                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0069a720  class PFileNode* __thiscall PFileNode::MakeSubNodeAsInt32(class PFileNode* this, int32_t arg2)

0069a720  {
0069a723      void* result = *(int32_t*)((char*)this->vtable + 4)();
0069a723      
0069a72a      if (result == 0)
0069a72d          return result;
0069a72d      
0069a730      int32_t* ecx = *(uint32_t*)((char*)result + 8);
0069a730      
0069a735      if (ecx != 0)
0069a73b          **(uint32_t**)ecx(1);
0069a73b      
0069a73f      *(uint32_t*)((char*)result + 8) = 0;
0069a746      void* eax = operator new(8);
0069a746      
0069a750      if (eax == 0)
0069a750      {
0069a76a          *(uint32_t*)((char*)result + 8) = 0;
0069a770          return result;
0069a750      }
0069a750      
0069a756      *(uint32_t*)eax = 0x797124;
0069a75c      *(uint32_t*)((char*)eax + 4) = arg2;
0069a75f      *(uint32_t*)((char*)result + 8) = eax;
0069a765      return result;
0069a720  }

0069a773                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069a780  void* __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::`scalar deleting destructor'(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>* this, uint32_t arg2)

0069a780  {
0069a783      class HashTableData<unsigned long,StateDesc>** m_buckets = this->m_buckets;
0069a78b      this->vtable = 0x800d30;
0069a78b      
0069a791      if (m_buckets != &this->m_aInplaceBuckets)
0069a794          operator delete[](m_buckets);
0069a794      
0069a79e      this->m_buckets = nullptr;
0069a7a1      this->m_firstInterestingBucket = nullptr;
0069a7a4      this->m_numBuckets = 0;
0069a7a7      this->m_numElements = 0;
0069a7a7      
0069a7af      if ((arg2 & 1) != 0)
0069a7b2          operator delete(this);
0069a7b2      
0069a7bd      return this;
0069a780  }


0069a7c0  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>* this, class HashTableData<unsigned long,PStringBase<char> >* arg2, class HashTableData<unsigned long,PStringBase<char> >* arg3)

0069a7c0  {
0069a7c1      uint32_t m_numBuckets = this->m_numBuckets;
0069a7ce      uint32_t temp1 = (COMBINE(0, arg2->m_hashKey) % m_numBuckets);
0069a7ce      
0069a7da      if (arg3 != 0)
0069a7da      {
0069a7e0          uint32_t temp1_1 = (COMBINE(0, arg3->m_hashKey) % m_numBuckets);
0069a7e0          
0069a7e4          if (temp1 == temp1_1)
0069a7e4          {
0069a7e6              arg3->m_hashNext = arg2;
0069a7f0              this->m_numElements += 1;
0069a7f3              uint32_t eax_5;
0069a7f3              eax_5 = 1;
0069a7f6              return 1;
0069a7e4          }
0069a7e4          
0069a7f9          if (temp1 <= temp1_1)
0069a7f9          {
0069a7fe              uint32_t eax_3;
0069a7fe              eax_3 = 0;
0069a801              return 0;
0069a7f9          }
0069a7da      }
0069a7da      
0069a809      void* eax_7 = &this->m_buckets[temp1];
0069a80c      *(uint32_t*)eax_7 = arg2;
0069a80c      
0069a80e      if (arg3 == 0)
0069a810          this->m_firstInterestingBucket = eax_7;
0069a810      
0069a81a      this->m_numElements += 1;
0069a81d      uint32_t eax_9;
0069a81d      eax_9 = 1;
0069a820      return 1;
0069a7c0  }

0069a823           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0069a830  void __thiscall ElementDesc::UpdateSizeAndPosition(class ElementDesc* this, class Box2D const* arg2, class Box2D const* arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, uint32_t arg7)

0069a830  {
0069a837      int32_t m_x = this->m_x;
0069a83a      int32_t m_width = this->m_width;
0069a83d      int32_t m_y = this->m_y;
0069a840      int32_t m_x_3 = m_x;
0069a84c      int32_t var_8 = ((m_width + m_x) - 1);
0069a859      int32_t m_y_3 = m_y;
0069a86a      int32_t var_4 = ((this->m_height + m_y) - 1);
0069a87c      StateDesc::UpdateSizeAndPosition(this, arg2, arg3, arg4, arg5, arg6, arg7);
0069a881      int32_t m_x_1 = this->m_x;
0069a884      int32_t m_width_1 = this->m_width;
0069a887      int32_t m_y_1 = this->m_y;
0069a88a      int32_t m_x_2 = m_x_1;
0069a895      int32_t var_18 = ((m_width_1 + m_x_1) - 1);
0069a89d      int32_t m_y_2 = m_y_1;
0069a8ac      int32_t var_14 = ((this->m_height + m_y_1) - 1);
0069a8b0      void __return;
0069a8b0      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_children.m_intrusiveTable, &__return);
0069a8b5      class HashTableData<unsigned long,DBOCache *>* i_1 = eax_4->m_currElement;
0069a8ba      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
0069a8bc      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
0069a8bc      
0069a8bf      if (i_1 != 0)
0069a8bf      {
0069a8ed          while (true)
0069a8ed          {
0069a8c7              i_1->m_data->m_ObjTable.m_intrusiveTable.m_aInplaceBuckets[5](&m_x_3, &m_x_2, *(int32_t*)((char*)i_1 + 0xc8), *(int32_t*)((char*)i_1 + 0xcc), *(int32_t*)((char*)i_1 + 0xd0), *(int32_t*)((char*)i_1 + 0xd4));
0069a8f0              i_1 = i_1->m_hashNext;
0069a8f0              
0069a8f5              if (i_1 == 0)
0069a8f5              {
0069a90b                  class HashTableData<unsigned long,DBOCache *>* i;
0069a90b                  
0069a90b                  do
0069a90b                  {
0069a900                      m_currBucket = &m_currBucket[1];
0069a900                      
0069a905                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0069a919                          return;
0069a919                      
0069a907                      i = *(uint32_t*)m_currBucket;
0069a90b                  } while (i == 0);
0069a90b                  
0069a90d                  i_1 = i;
0069a90d                  
0069a911                  if (i_1 == 0)
0069a911                      break;
0069a8f5              }
0069a8ed          }
0069a8bf      }
0069a830  }

0069a91c                                                                                      90 90 90 90                              ....

0069a920  void __thiscall ElementDesc::GetSubDataIDs(class ElementDesc const* this, class QualifiedDataIDArray* arg2)

0069a920  {
0069a92e      StateDesc::GetSubDataIDs(this, arg2);
0069a94a      void __return;
0069a94a      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&__return, this->m_baseLayout.id, 0), 0);
0069a95a      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_2 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&this->m_children.m_intrusiveTable, &__return);
0069a95f      class HashTableData<unsigned long,DBOCache *>* i_2 = eax_2->m_currElement;
0069a964      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_2->m_currHashTable;
0069a966      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_2->m_currBucket;
0069a966      
0069a969      if (i_2 != 0)
0069a969      {
0069a97b          while (true)
0069a97b          {
0069a974              i_2->m_data->m_ObjTable.m_intrusiveTable.vtable(arg2);
0069a97e              i_2 = i_2->m_hashNext;
0069a97e              
0069a983              if (i_2 == 0)
0069a983              {
0069a99b                  class HashTableData<unsigned long,DBOCache *>* i;
0069a99b                  
0069a99b                  do
0069a99b                  {
0069a990                      m_currBucket = &m_currBucket[1];
0069a990                      
0069a995                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0069a995                          goto label_69a9af;
0069a995                      
0069a997                      i = *(uint32_t*)m_currBucket;
0069a99b                  } while (i == 0);
0069a99b                  
0069a99d                  i_2 = i;
0069a99d                  
0069a9a1                  if (i_2 == 0)
0069a9a1                      break;
0069a983              }
0069a97b          }
0069a969      }
0069a969      
0069a9af  label_69a9af:
0069a9af      void* ecx_6 = &this->m_states.m_intrusiveTable.m_buckets[this->m_states.m_intrusiveTable.m_numBuckets];
0069a9b8      void** m_firstInterestingBucket_1;
0069a9b8      void* i_3;
0069a9b8      
0069a9b8      if (this->m_states.m_intrusiveTable.m_firstInterestingBucket == ecx_6)
0069a9b8      {
0069a9d8      label_69a9d8:
0069a9d8          m_firstInterestingBucket_1 = nullptr;
0069a9da          i_3 = nullptr;
0069a9b8      }
0069a9b8      else
0069a9b8      {
0069a9c0          while (true)
0069a9c0          {
0069a9c0              class HashTableData<unsigned long,StateDesc>** m_firstInterestingBucket = this->m_states.m_intrusiveTable.m_firstInterestingBucket;
0069a9c0              
0069a9c9              if (*(uint32_t*)m_firstInterestingBucket != 0)
0069a9c9              {
0069a9de                  m_firstInterestingBucket_1 = this->m_states.m_intrusiveTable.m_firstInterestingBucket;
0069a9e4                  i_3 = *(uint32_t*)m_firstInterestingBucket_1;
0069a9e4                  break;
0069a9c9              }
0069a9c9              
0069a9d0              this->m_states.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
0069a9d0              
0069a9d6              if (&m_firstInterestingBucket[1] == ecx_6)
0069a9d6                  goto label_69a9d8;
0069a9c0          }
0069a9b8      }
0069a9b8      
0069a9e8      void** m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0069a9e8      
0069a9ea      if (i_3 != 0)
0069a9ea      {
0069a9fb          while (true)
0069a9fb          {
0069a9fb              *(uint32_t*)(*(uint32_t*)((char*)i_3 + 8) + 8)(arg2);
0069a9fe              i_3 = *(uint32_t*)((char*)i_3 + 4);
0069a9fe              
0069aa03              if (i_3 == 0)
0069aa03              {
0069aa1f                  void* i_1;
0069aa1f                  
0069aa1f                  do
0069aa1f                  {
0069aa14                      m_firstInterestingBucket_2 = &m_firstInterestingBucket_2[1];
0069aa14                      
0069aa19                      if (m_firstInterestingBucket_2 == &this->m_states.m_intrusiveTable.m_buckets[this->m_states.m_intrusiveTable.m_numBuckets])
0069aa2e                          return;
0069aa2e                      
0069aa1b                      i_1 = *(uint32_t*)m_firstInterestingBucket_2;
0069aa1f                  } while (i_1 == 0);
0069aa1f                  
0069aa21                  i_3 = i_1;
0069aa21                  
0069aa25                  if (i_3 == 0)
0069aa25                      break;
0069aa03              }
0069a9fb          }
0069a9ea      }
0069a920  }

0069a96d                                         8d 49 00                                                               .I.
0069aa31                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0069aa40  uint8_t __thiscall ElementDesc::PositionToFileNode(class ElementDesc const* this, class PFileNode* arg2)

0069aa40  {
0069aa40      class ElementDesc* this_5 = this;
0069aa4f      class ElementDesc* this_6 = this;
0069aa59      class PFileNode* eax;
0069aa59      
0069aa59      if ((this_6->m_uiIncorporationFlags & 2) == 0)
0069aa59      {
0069aaba      label_69aaba:
0069aaba          
0069aabe          if ((this_6->m_uiIncorporationFlags & 4) == 0)
0069aabe          {
0069aaf1          label_69aaf1:
0069aaf1              
0069aaf5              if ((this_6->m_uiIncorporationFlags & 8) == 0)
0069aaf5              {
0069ab28              label_69ab28:
0069ab28                  
0069ab2c                  if ((this_6->m_uiIncorporationFlags & 0x10) == 0)
0069ab2c                  {
0069ab67                  label_69ab67:
0069ab67                      
0069ab6b                      if ((this_6->m_uiIncorporationFlags & 0x20) == 0)
0069ab6b                      {
0069aba9                          eax = 1;
0069abad                          return 1;
0069ab6b                      }
0069ab6b                      
0069ab6d                      class ElementDesc* this_4 = this;
0069ab82                      InterlockedIncrement(&KW_ZLEVEL.m_charbuffer[-1]);
0069ab86                      eax = PFileNode::MakeSubNode(arg2, KW_ZLEVEL.m_charbuffer);
0069ab86                      
0069ab8d                      if ((eax != 0 && PFileNode::MakeSubNodeAsInt32(eax, this_6->m_zLevel) != 0))
0069ab8d                      {
0069aba9                          eax = 1;
0069abad                          return 1;
0069ab8d                      }
0069ab2c                  }
0069ab2c                  else
0069ab2c                  {
0069ab2e                      class ElementDesc* this_3 = this;
0069ab43                      InterlockedIncrement(&KW_HEIGHT.m_charbuffer[-1]);
0069ab47                      eax = PFileNode::MakeSubNode(arg2, KW_HEIGHT.m_charbuffer);
0069ab47                      
0069ab4e                      if (eax != 0)
0069ab4e                      {
0069ab5a                          eax = PFileNode::MakeSubNodeAsInt32(eax, this_6->m_height);
0069ab5a                          
0069ab61                          if (eax != 0)
0069ab61                              goto label_69ab67;
0069ab4e                      }
0069ab2c                  }
0069aaf5              }
0069aaf5              else
0069aaf5              {
0069aaf7                  class ElementDesc* this_2 = this;
0069ab0c                  InterlockedIncrement(&KW_WIDTH.m_charbuffer[-1]);
0069ab10                  eax = PFileNode::MakeSubNode(arg2, KW_WIDTH.m_charbuffer);
0069ab10                  
0069ab17                  if (eax != 0)
0069ab17                  {
0069ab1f                      eax = PFileNode::MakeSubNodeAsInt32(eax, this_6->m_width);
0069ab1f                      
0069ab26                      if (eax != 0)
0069ab26                          goto label_69ab28;
0069ab17                  }
0069aaf5              }
0069aabe          }
0069aabe          else
0069aabe          {
0069aac0              class ElementDesc* this_1 = this;
0069aad5              InterlockedIncrement(&KW_Y.m_charbuffer[-1]);
0069aad9              eax = PFileNode::MakeSubNode(arg2, KW_Y.m_charbuffer);
0069aad9              
0069aae0              if (eax != 0)
0069aae0              {
0069aae8                  eax = PFileNode::MakeSubNodeAsInt32(eax, this_6->m_y);
0069aae8                  
0069aaef                  if (eax != 0)
0069aaef                      goto label_69aaf1;
0069aae0              }
0069aabe          }
0069aa59      }
0069aa59      else
0069aa59      {
0069aa5b          class PSRefBufferCharData<char>* m_charbuffer = KW_X.m_charbuffer;
0069aa67          int32_t var_18_2 = InterlockedIncrement(&m_charbuffer[-1]);
0069aa6d          InterlockedIncrement(&m_charbuffer[-1]);
0069aa71          class PFileNode* eax_1 = PFileNode::MakeSubNodeAsPString(arg2, m_charbuffer);
0069aa71          
0069aa8b          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0069aa93              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0069aa93          
0069aa97          if (eax_1 != 0)
0069aa97          {
0069aaa3              eax = PFileNode::MakeSubNodeAsInt32(eax_1, this_6->m_x);
0069aaa3              
0069aaaa              if (eax != 0)
0069aaaa                  goto label_69aaba;
0069aa97          }
0069aa59      }
0069aa59      
0069aaac      eax = 0;
0069aab3      return 0;
0069aa40  }


0069abb0  uint8_t __thiscall ElementDesc::CheckFFN(class ElementDesc* this, class PFileNode const* arg2)

0069abb0  {
0069abc1      uint32_t edx;
0069abc1      edx = this->m_type != 0;
0069abc7      char result = 1;
0069abd7      uint32_t ecx;
0069abd7      
0069abd7      if ((this->m_baseElement != 0 || this->m_baseLayout.id != INVALID_DID.id))
0069abdd          ecx = 1;
0069abd7      else
0069abd9          ecx = 0;
0069abd9      
0069abe5      uint32_t var_c;
0069abe5      char* var_10_1;
0069abe5      uint32_t* ecx_1;
0069abe5      
0069abe5      if (edx == 0)
0069abe5      {
0069abf7          if (ecx == 0)
0069abf7          {
0069abf9              var_c = ecx;
0069abfa              ecx_1 = &var_c;
0069abfc              var_10_1 = "ElementDesc::CheckFFN, use eithe…";
0069ac01          label_69ac01:
0069ac01              PStringBase<char>::PStringBase<char>(ecx_1, var_10_1);
0069ac07              PFileNode::ReportError(arg2, var_c);
0069ac0f              result = 0;
0069abf7          }
0069abe5      }
0069abe5      else if (ecx != 0)
0069abe9      {
0069abeb          var_c = ecx;
0069abec          ecx_1 = &var_c;
0069abee          var_10_1 = "ElementDesc::CheckFFN, use only …";
0069abf3          goto label_69ac01;
0069abe9      }
0069ac11      uint32_t m_stateID = this->m_stateID;
0069ac11      
0069ac16      if (m_stateID != 0)
0069ac16      {
0069ac18          var_c = m_stateID;
0069ac20          PStringBase<char>::PStringBase<char>(&var_c, "ElementDesc::CheckFFN, dont use …");
0069ac26          PFileNode::ReportError(arg2, var_c);
0069ac2e          result = 0;
0069ac16      }
0069ac16      
0069ac30      uint32_t m_elementID = this->m_elementID;
0069ac30      
0069ac38      if (m_elementID != 0)
0069ac54          return result;
0069ac54      
0069ac3a      var_c = m_elementID;
0069ac42      PStringBase<char>::PStringBase<char>(&var_c, "ElementDesc::CheckFFN, you must …");
0069ac48      PFileNode::ReportError(arg2, var_c);
0069ac50      return 0;
0069abb0  }

0069ac57                                                                       90 90 90 90 90 90 90 90 90                         .........

0069ac60  class StateDesc* __thiscall ElementDesc::AccessStateDesc(class ElementDesc const* this, uint32_t arg2)

0069ac60  {
0069ac7c      for (int32_t* i = this->m_states.m_intrusiveTable.m_buckets[(COMBINE(0, arg2) % this->m_states.m_intrusiveTable.m_numBuckets)]; i != 0; i = i[1])
0069ac7c      {
0069ac82          if (*(uint32_t*)i == arg2)
0069ac82          {
0069ac93              if (i != 0)
0069ac99                  return &i[2];
0069ac99              
0069ac93              break;
0069ac82          }
0069ac7c      }
0069ac7c      
0069ac8e      return 0;
0069ac60  }

0069ac9c                                                                                      90 90 90 90                              ....

0069aca0  void __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>* this, uint32_t arg2)

0069aca0  {
0069acab      arg2 = arg2;
0069acaf      uint8_t edx = ((int8_t)arg2);
0069acb3      this->m_buckets = nullptr;
0069acb6      this->m_firstInterestingBucket = nullptr;
0069acb9      this->m_numBuckets = 0;
0069acbc      this->m_numElements = 0;
0069acc0      this->vtable = 0x800d30;
0069acc6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0069acd9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0069acd9      
0069ace3      if (eax == bucketSizesEnd_1)
0069ace5          eax -= 4;
0069ace5      
0069ace8      uint32_t eax_1 = *(uint32_t*)eax;
0069aced      this->m_numBuckets = eax_1;
0069aced      
0069acf0      if (eax_1 > 0x17)
0069ad06          this->m_buckets = operator new[]((eax_1 << 2));
0069acf0      else
0069acf5          this->m_buckets = &this->m_aInplaceBuckets;
0069acf5      
0069ad0c      class HashTableData<unsigned long,StateDesc>** m_buckets = this->m_buckets;
0069ad0f      uint32_t ecx_3 = (this->m_numBuckets << 2);
0069ad15      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
0069ad26      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0069aca0  }

0069ad2f                                               90                                                                 .

0069ad30  uint8_t __thiscall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>* this, uint32_t arg2)

0069ad30  {
0069ad35      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0069ad3c      arg2 = arg2;
0069ad55      uint32_t* eax_1 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0069ad55      
0069ad5f      if (eax_1 == bucketSizesEnd_1)
0069ad61          eax_1 -= 4;
0069ad61      
0069ad70      return IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize_internal(this, *(uint32_t*)eax_1);
0069ad30  }

0069ad73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069ad80  uint8_t __thiscall HashTable<unsigned long,StateDesc,0>::add(class HashTable<unsigned long,StateDesc,0>* this, uint32_t const* arg2, class StateDesc const* arg3)

0069ad80  {
0069ad8e      void* esi = operator new(0xb0);
0069ad8e      
0069ad95      if (esi == 0)
0069adb5          esi = nullptr;
0069ad95      else
0069ad95      {
0069ada1          *(uint32_t*)esi = *(uint32_t*)arg2;
0069ada7          *(uint32_t*)((char*)esi + 4) = 0;
0069adae          StateDesc::StateDesc(((char*)esi + 8), arg3);
0069ad95      }
0069ad95      
0069adc2      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ArchiveVersionRow> *,0>::add(&this->m_intrusiveTable, esi) != 0)
0069ade4          return 1;
0069ade4      
0069adc6      if (esi != 0)
0069adc6      {
0069adcb          StateDesc::~StateDesc(((char*)esi + 8));
0069add1          operator delete(esi);
0069adc6      }
0069adc6      
0069addd      return 0;
0069ad80  }

0069ade7                       90 90 90 90 90 90 90 90 90                                                         .........

0069adf0  void __fastcall IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::delete_contents(class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>* this)

0069adf0  {
0069adf8      if (this->m_numElements != 0)
0069adf8      {
0069adfa          void* edi;
0069adfa          void* var_8_1 = edi;
0069adfa          
0069ae70          do
0069ae70          {
0069ae06              void* ecx_1 = &this->m_buckets[this->m_numBuckets];
0069ae0c              int32_t* m_firstInterestingBucket_2;
0069ae0c              
0069ae0c              if (this->m_firstInterestingBucket == ecx_1)
0069ae0c              {
0069ae22              label_69ae22:
0069ae22                  m_firstInterestingBucket_2 = nullptr;
0069ae24                  edi = nullptr;
0069ae0c              }
0069ae0c              else
0069ae0c              {
0069ae10                  while (true)
0069ae10                  {
0069ae10                      class HashTableData<unsigned long,StateDesc>** m_firstInterestingBucket = this->m_firstInterestingBucket;
0069ae10                      
0069ae16                      if (*(uint32_t*)m_firstInterestingBucket != 0)
0069ae16                      {
0069ae28                          int32_t* m_firstInterestingBucket_1 = this->m_firstInterestingBucket;
0069ae2b                          edi = *(uint32_t*)m_firstInterestingBucket_1;
0069ae2d                          m_firstInterestingBucket_2 = m_firstInterestingBucket_1;
0069ae2d                          break;
0069ae16                      }
0069ae16                      
0069ae1d                      this->m_firstInterestingBucket = &m_firstInterestingBucket[1];
0069ae1d                      
0069ae20                      if (&m_firstInterestingBucket[1] == ecx_1)
0069ae20                          goto label_69ae22;
0069ae10                  }
0069ae0c              }
0069ae0c              
0069ae2f              void* eax_3 = *(uint32_t*)m_firstInterestingBucket_2;
0069ae2f              
0069ae33              if (eax_3 == edi)
0069ae45                  *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0069ae33              else
0069ae33              {
0069ae3c                  void* ecx_2;
0069ae3c                  
0069ae3c                  do
0069ae3c                  {
0069ae35                      ecx_2 = eax_3;
0069ae37                      eax_3 = *(uint32_t*)((char*)eax_3 + 4);
0069ae3c                  } while (eax_3 != edi);
0069ae3c                  
0069ae40                  if (ecx_2 != 0)
0069ae4c                      *(uint32_t*)((char*)ecx_2 + 4) = *(uint32_t*)((char*)eax_3 + 4);
0069ae40                  else
0069ae45                      *(uint32_t*)m_firstInterestingBucket_2 = *(uint32_t*)((char*)eax_3 + 4);
0069ae33              }
0069ae33              
0069ae55              this->m_numElements -= 1;
0069ae55              
0069ae58              if (edi != 0)
0069ae58              {
0069ae5d                  StateDesc::~StateDesc(((char*)edi + 8));
0069ae63                  operator delete(edi);
0069ae58              }
0069ae70          } while (this->m_numElements != 0);
0069adf8      }
0069adf0  }

0069adfd                                                                                         8d 49 00                               .I.
0069ae75                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0069ae80  void SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>,HashTableData<unsigned long,StateDesc> *,SB_Default>(int32_t const* arg1, class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>* arg2, class Archive* arg3)

0069ae80  {
0069ae86      class Archive* esi = arg3;
0069ae86      
0069ae92      if ((!(esi->m_flags) & 1) != 0)
0069ae98          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,IDClass<_tagDataID,32,0> > *,0>::clear(arg2);
0069ae98      
0069aea6      int32_t ebx;
0069aea6      
0069aea6      if ((((int8_t)esi->m_flags) & 5) != 1)
0069aee5          ebx = arg3;
0069aea6      else
0069aea6      {
0069aeaf          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0069aeb5          uint32_t const* bucketSizesBegin_1 = g_bucketSizesBegin;
0069aebd          arg3 = arg2->m_numBuckets;
0069aecd          uint32_t* eax_2 = _STL::__lower_bound(bucketSizesBegin_1, bucketSizesEnd_1, &arg3, ((int8_t)arg3), nullptr);
0069aecd          
0069aed7          if (eax_2 == bucketSizesEnd_1)
0069aed9              eax_2 -= 4;
0069aed9          
0069aee0          ebx = (((char*)eax_2 - bucketSizesBegin_1) >> 2);
0069aea6      }
0069aea6      
0069aeed      Archive::CheckAlignment(esi, 1);
0069aef6      char* eax_3 = Archive::GetBytes(esi, 1);
0069aef6      
0069aefd      if (eax_3 != 0)
0069aefd      {
0069af03          if ((esi->m_flags & 1) == 0)
0069af09              ebx = *(uint8_t*)eax_3;
0069af03          else
0069af05              *(uint8_t*)eax_3 = ebx;
0069aefd      }
0069aefd      
0069af0f      if ((esi->m_flags & 5) == 0)
0069af0f      {
0069af17          uint32_t eax_4 = ((uint32_t)ebx);
0069af17          
0069af1c          if (eax_4 < 0x17)
0069af35              IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize(arg2, g_bucketSizesBegin[eax_4]);
0069af1c          else
0069af20              Archive::RaiseError(esi);
0069af0f      }
0069af0f      
0069af41      if ((((int8_t)esi->m_flags) & 5) == 1)
0069af4a          arg3 = arg2->m_numElements;
0069af4a      
0069af59      SB_As32Bit_Compressed::Serialize(&arg3, &arg3, esi);
0069af59      
0069af6a      if ((((int8_t)esi->m_flags) & 5) == 1)
0069af6a      {
0069af75          void __return;
0069af75          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_6 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(arg2, &__return);
0069af7a          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_6->m_currHashTable;
0069af7c          class HashTableData<unsigned long,DBOCache *>* i = eax_6->m_currElement;
0069af7f          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_6->m_currBucket;
0069af7f          
0069af84          while (i != 0)
0069af84          {
0069afbb              do
0069afbb              {
0069af8a                  Archive::CheckAlignment(esi, 4);
0069af93                  uint8_t* eax_7 = Archive::GetBytes(esi, 4);
0069af93                  
0069af9a                  if (eax_7 != 0)
0069af9a                  {
0069afa0                      if ((esi->m_flags & 1) == 0)
0069afaa                          i->m_hashKey = *(uint32_t*)eax_7;
0069afa0                      else
0069afa4                          *(uint32_t*)eax_7 = i->m_hashKey;
0069af9a                  }
0069af9a                  
0069afac                  i->m_data->m_ObjTable.vtable(esi);
0069afb6                  i = i->m_hashNext;
0069afbb              } while (i != 0);
0069afbb              
0069afc6              while (true)
0069afc6              {
0069afc6                  m_currBucket = &m_currBucket[1];
0069afc6                  
0069afcb                  if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0069afcb                      break;
0069afcb                  
0069afcd                  class HashTableData<unsigned long,DBOCache *>* i_1 = *(uint32_t*)m_currBucket;
0069afcd                  
0069afd2                  if (i_1 != 0)
0069afd2                  {
0069afd4                      i = i_1;
0069afd6                      break;
0069afd2                  }
0069afc6              }
0069af84          }
0069af6a      }
0069af6a      
0069afdc      if ((esi->m_flags & 5) == 0)
0069afdc      {
0069afe4          uint32_t eax_10 = Archive::GetSizeLeft(esi);
0069afe9          class Archive* ecx_17 = arg3;
0069afe9          
0069afef          if (ecx_17 > eax_10)
0069b086              Archive::RaiseError(esi);
0069afef          else
0069afef          {
0069aff5              void* ebx_3 = nullptr;
0069aff7              int32_t ebp_1 = 0;
0069aff7              
0069affb              if (ecx_17 > 0)
0069affb              {
0069b00b                  while (true)
0069b00b                  {
0069b00b                      void* edi_1 = operator new(0xb0);
0069b00b                      
0069b012                      if (edi_1 == 0)
0069b025                          edi_1 = nullptr;
0069b012                      else
0069b012                      {
0069b017                          *(uint32_t*)((char*)edi_1 + 4) = 0;
0069b01e                          StateDesc::StateDesc(((char*)edi_1 + 8));
0069b012                      }
0069b012                      
0069b02b                      Archive::CheckAlignment(esi, 4);
0069b034                      uint8_t* eax_12 = Archive::GetBytes(esi, 4);
0069b034                      
0069b03b                      if (eax_12 != 0)
0069b03b                      {
0069b041                          if ((esi->m_flags & 1) == 0)
0069b04b                              *(uint32_t*)edi_1 = *(uint32_t*)eax_12;
0069b041                          else
0069b045                              *(uint32_t*)eax_12 = *(uint32_t*)edi_1;
0069b03b                      }
0069b03b                      
0069b054                      *(uint32_t*)(*(uint32_t*)((char*)edi_1 + 8) + 4)(esi);
0069b054                      
0069b060                      if ((((int8_t)(esi->m_flags >> 2)) & 1) != 0)
0069b092                          return;
0069b092                      
0069b06f                      if (IntrusiveHashTable<unsigned long,HashTableData<unsigned long,PStringBase<char> > *,0>::add_for_unpacking(arg2, edi_1, ebx_3) == 0)
0069b06f                          break;
0069b06f                      
0069b075                      ebp_1 += 1;
0069b078                      ebx_3 = edi_1;
0069b078                      
0069b07a                      if (ebp_1 >= arg3)
0069b083                          return;
0069b00b                  }
0069b00b                  
0069b086                  Archive::RaiseError(esi);
0069affb              }
0069afef          }
0069afdc      }
0069ae80  }

0069b093                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069b0a0  void* __thiscall HashTable<unsigned long,StateDesc,0>::operator=(void* arg1, uint32_t arg2)

0069b0a0  {
0069b0a5      uint32_t edi = arg2;
0069b0a9      void* ebx = arg1;
0069b0ad      void* var_1c = ebx;
0069b0ad      
0069b0b1      if (ebx != edi)
0069b0b1      {
0069b0be          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::delete_contents(((char*)ebx + 4));
0069b0c6          uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0069b0cc          arg2 = *(uint32_t*)(edi + 0x6c);
0069b0e3          uint32_t* eax_3 = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, ((int8_t)arg2), nullptr);
0069b0e3          
0069b0ed          if (eax_3 == bucketSizesEnd_1)
0069b0ef              eax_3 -= 4;
0069b0ef          
0069b0f7          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,List<PStringBase<char> > > *,0>::resize_internal(((char*)ebx + 4), *(uint32_t*)eax_3);
0069b104          void* ebp_1 = nullptr;
0069b106          void __return;
0069b106          class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_4 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin((edi + 4), &__return);
0069b10b          class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_4->m_currHashTable;
0069b10d          class HashTableData<unsigned long,DBOCache *>* edi_1 = eax_4->m_currElement;
0069b119          class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_4->m_currBucket;
0069b119          
0069b11d          if (edi_1 != 0)
0069b11d          {
0069b13a              while (true)
0069b13a              {
0069b13a                  void* esi_2 = operator new(0xb0);
0069b13a                  
0069b141                  if (esi_2 == 0)
0069b15c                      esi_2 = nullptr;
0069b141                  else
0069b141                  {
0069b14c                      *(uint32_t*)esi_2 = edi_1->m_hashKey;
0069b14e                      *(uint32_t*)((char*)esi_2 + 4) = 0;
0069b155                      StateDesc::StateDesc(((char*)esi_2 + 8), &edi_1->m_data);
0069b141                  }
0069b141                  
0069b161                  int32_t ebx_1 = *(uint32_t*)((char*)ebx + 0x6c);
0069b168                  uint32_t temp1_1 = (COMBINE(0, *(uint32_t*)esi_2) % ebx_1);
0069b168                  
0069b16e                  if (ebp_1 == 0)
0069b16e                  {
0069b18e                  label_69b18e:
0069b18e                      void** eax_13 = (*(uint32_t*)((char*)var_1c + 0x64) + (temp1_1 << 2));
0069b191                      *(uint32_t*)eax_13 = esi_2;
0069b191                      
0069b193                      if (ebp_1 == 0)
0069b195                          *(uint32_t*)((char*)var_1c + 0x68) = eax_13;
0069b195                      
0069b1a3                      *(uint32_t*)((char*)var_1c + 0x70) += 1;
0069b16e                  }
0069b16e                  else
0069b16e                  {
0069b175                      uint32_t temp1_2 = (COMBINE(0, *(uint32_t*)ebp_1) % ebx_1);
0069b175                      
0069b179                      if (temp1_1 == temp1_2)
0069b179                      {
0069b17b                          *(uint32_t*)((char*)ebp_1 + 4) = esi_2;
0069b1a3                          *(uint32_t*)((char*)var_1c + 0x70) += 1;
0069b179                      }
0069b179                      else if (temp1_1 > temp1_2)
0069b180                          goto label_69b18e;
0069b16e                  }
0069b16e                  
0069b1a6                  edi_1 = edi_1->m_hashNext;
0069b1ab                  ebp_1 = esi_2;
0069b1ab                  
0069b1ad                  if (edi_1 == 0)
0069b1ad                  {
0069b1c4                      while (true)
0069b1c4                      {
0069b1c4                          void* m_currBucket_1 = &m_currBucket[1];
0069b1c9                          m_currBucket = m_currBucket_1;
0069b1c9                          
0069b1cd                          if (m_currBucket_1 != &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0069b1cd                          {
0069b1cf                              class HashTableData<unsigned long,DBOCache *>* edx_9 = *(uint32_t*)m_currBucket_1;
0069b1cf                              
0069b1d3                              if (edx_9 == 0)
0069b1d3                                  continue;
0069b1d3                              else
0069b1d3                              {
0069b1d5                                  edi_1 = edx_9;
0069b1d5                                  
0069b1d9                                  if (edi_1 != 0)
0069b1d9                                      break;
0069b1d3                              }
0069b1cd                          }
0069b1cd                          
0069b1df                          return var_1c;
0069b1c4                      }
0069b1ad                  }
0069b1ad                  
0069b125                  ebx = var_1c;
0069b13a              }
0069b11d          }
0069b0b1      }
0069b0b1      
0069b1ec      return ebx;
0069b0a0  }

0069b1ef                                               90                                                                 .

0069b1f0  void* __thiscall HashTable<unsigned long,StateDesc,0>::`scalar deleting destructor'(class HashTable<unsigned long,StateDesc,0>* this, uint32_t arg2)

0069b1f0  {
0069b1f9      this->vtable = 0x800e40;
0069b1ff      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::delete_contents(&this->m_intrusiveTable);
0069b204      class HashTableData<unsigned long,StateDesc>** m_buckets = this->m_intrusiveTable.m_buckets;
0069b1f4      this->m_intrusiveTable.vtable = 0x800d30;
0069b1f4      
0069b212      if (m_buckets != &this->m_intrusiveTable.m_aInplaceBuckets)
0069b215          operator delete[](m_buckets);
0069b215      
0069b1f4      this->m_intrusiveTable.m_buckets = nullptr;
0069b1f4      this->m_intrusiveTable.m_firstInterestingBucket = nullptr;
0069b1f4      this->m_intrusiveTable.m_numBuckets = 0;
0069b1f4      this->m_intrusiveTable.m_numElements = 0;
0069b1f4      
0069b230      if ((arg2 & 1) != 0)
0069b233          operator delete(this);
0069b233      
0069b23f      return this;
0069b1f0  }

0069b242        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0069b250  void __fastcall ElementDesc::~ElementDesc(class ElementDesc* this)

0069b250  {
0069b262      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_strName.m_charbuffer - 0x14);
0069b269      this->vtable = 0x79bd34;
0069b269      
0069b279      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0069b281          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0069b281      
0069b289      void* __offset(PSRefBufferCharData<char>, -0x14) edi_3 = (this->m_strComments.m_charbuffer - 0x14);
0069b289      
0069b298      if ((InterlockedDecrement(((char*)edi_3 + 4)) == 0 && edi_3 != 0))
0069b2a0          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_3) + -0x14)(1);
0069b2a0      
0069b2aa      this->m_children.vtable = 0x800ac4;
0069b2b4      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(&this->m_children.m_intrusiveTable);
0069b2bb      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::~IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>(&this->m_children.m_intrusiveTable);
0069b2c8      this->m_states.vtable = 0x800e40;
0069b2d2      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::delete_contents(&this->m_states.m_intrusiveTable);
0069b2d7      class HashTableData<unsigned long,StateDesc>** m_buckets = this->m_states.m_intrusiveTable.m_buckets;
0069b2c0      this->m_states.m_intrusiveTable.vtable = 0x800d30;
0069b2c0      
0069b2e5      if (m_buckets != &this->m_states.m_intrusiveTable.m_aInplaceBuckets)
0069b2e8          operator delete[](m_buckets);
0069b2e8      
0069b2c0      this->m_states.m_intrusiveTable.m_buckets = nullptr;
0069b2c0      this->m_states.m_intrusiveTable.m_firstInterestingBucket = nullptr;
0069b2c0      this->m_states.m_intrusiveTable.m_numBuckets = 0;
0069b2c0      this->m_states.m_intrusiveTable.m_numElements = 0;
0069b302      /* tailcall */
0069b302      return StateDesc::~StateDesc(this);
0069b250  }

0069b307                       90 90 90 90 90 90 90 90 90                                                         .........

0069b310  void __fastcall ElementDesc::ElementDesc(class ElementDesc* this)

0069b310  {
0069b314      StateDesc::StateDesc(this);
0069b31b      this->vtable = 0x79bd34;
0069b321      this->m_elementID = 0;
0069b327      this->m_type = 0;
0069b32d      this->m_engineType = 0;
0069b333      this->m_baseElement = 0;
0069b33e      this->m_baseLayout.id = INVALID_DID.id;
0069b344      __builtin_memset(&this->m_defaultState, 0, 0x14);
0069b36a      this->m_states.vtable = 0x800e40;
0069b374      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>(&this->m_states.m_intrusiveTable, 0x17);
0069b381      this->m_children.vtable = 0x800ac4;
0069b38b      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>(&this->m_children.m_intrusiveTable, 0x17);
0069b390      this->m_uiReadOrder = 0;
0069b396      class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069b3a2      this->m_strComments.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0069b3a8      InterlockedIncrement((PStringBase<char>::s_NullBuffer_1 - 0x10));
0069b3b9      PStringBase<char>::PStringBase<char>(&this->m_strName, &data_7928af);
0069b310  }

0069b3c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0069b3d0  class ElementDesc& __thiscall ElementDesc::operator=(class ElementDesc* this, class ElementDesc const& arg2)

0069b3d0  {
0069b3dc      if (this != arg2)
0069b3dc      {
0069b3e3          StateDesc::operator=(this, arg2);
0069b3ee          this->m_elementID = arg2->m_elementID;
0069b3fa          this->m_type = arg2->m_type;
0069b406          this->m_engineType = arg2->m_engineType;
0069b412          this->m_baseElement = arg2->m_baseElement;
0069b41e          this->m_baseLayout.id = arg2->m_baseLayout.id;
0069b42a          this->m_defaultState = arg2->m_defaultState;
0069b436          this->m_leftEdge = arg2->m_leftEdge;
0069b442          this->m_topEdge = arg2->m_topEdge;
0069b454          this->m_rightEdge = arg2->m_rightEdge;
0069b467          this->m_bottomEdge = arg2->m_bottomEdge;
0069b46d          HashTable<unsigned long,StateDesc,0>::operator=(&this->m_states, &arg2->m_states);
0069b47f          HashTable<unsigned long,ElementDesc,0>::operator=(&this->m_children, &arg2->m_children);
0069b490          this->m_uiReadOrder = arg2->m_uiReadOrder;
0069b496          class PSRefBufferCharData<char>* m_charbuffer = this->m_strComments.m_charbuffer;
0069b496          
0069b4a2          if (m_charbuffer != arg2->m_strComments.m_charbuffer)
0069b4a2          {
0069b4b3              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0069b4bb                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0069b4bb              
0069b4bd              class PStringBase<char> m_charbuffer_1 = arg2->m_strComments.m_charbuffer;
0069b4c3              this->m_strComments.m_charbuffer = m_charbuffer_1;
0069b4cd              InterlockedIncrement((m_charbuffer_1 - 0x10));
0069b4a2          }
0069b4a2          
0069b4d3          class PSRefBufferCharData<char>* m_charbuffer_2 = this->m_strName.m_charbuffer;
0069b4d3          
0069b4df          if (m_charbuffer_2 != arg2->m_strName.m_charbuffer)
0069b4df          {
0069b4f0              if ((InterlockedDecrement(&m_charbuffer_2[-1]) == 0 && m_charbuffer_2 != 0x14))
0069b4f8                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer_2 + -0x14)(1);
0069b4f8              
0069b4fa              class PSRefBufferCharData<char>* m_charbuffer_3 = arg2->m_strName.m_charbuffer;
0069b500              this->m_strName.m_charbuffer = m_charbuffer_3;
0069b50a              InterlockedIncrement(&m_charbuffer_3[-1]);
0069b4df          }
0069b3dc      }
0069b3dc      
0069b516      return this;
0069b3d0  }

0069b519                                                                             90 90 90 90 90 90 90                           .......

0069b520  void __thiscall ElementDesc::ElementDesc(class ElementDesc* this, class ElementDesc const* arg2)

0069b520  {
0069b524      StateDesc::StateDesc(this);
0069b529      this->vtable = 0x79bd34;
0069b537      this->m_states.vtable = 0x800e40;
0069b541      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>(&this->m_states.m_intrusiveTable, 0x17);
0069b54e      this->m_children.vtable = 0x800ac4;
0069b558      IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>(&this->m_children.m_intrusiveTable, 0x17);
0069b55d      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069b56e      this->m_strComments.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0069b574      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0069b576      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0069b582      this->m_strName.m_charbuffer = PStringBase<char>::s_NullBuffer_2;
0069b588      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_2 - 0x10));
0069b591      ElementDesc::operator=(this, arg2);
0069b520  }

0069b59d                                                                                         90 90 90                               ...

0069b5a0  uint8_t __thiscall ElementDesc::Incorporate(class ElementDesc* this, class ElementDesc const* arg2)

0069b5a0  {
0069b5a8      int32_t m_x = this->m_x;
0069b5ab      int32_t m_width = this->m_width;
0069b5ae      int32_t m_y = this->m_y;
0069b5b1      int32_t m_x_3 = m_x;
0069b5c9      int32_t eax = ((this->m_height + m_y) - 1);
0069b5d0      uint8_t var_45 = 1;
0069b5d9      uint8_t eax_1 = StateDesc::Incorporate(this, arg2);
0069b5d9      
0069b5e0      if (eax_1 == 0)
0069b5e2          var_45 = eax_1;
0069b5e2      
0069b5e6      int32_t m_x_1 = this->m_x;
0069b5ec      int32_t m_y_1 = this->m_y;
0069b5ef      int32_t ebx = ((this->m_width + m_x_1) - 1);
0069b5f3      int32_t m_x_2 = m_x_1;
0069b5fa      int32_t edx_2 = ((this->m_height + m_y_1) - 1);
0069b608      this->m_elementID = arg2->m_elementID;
0069b614      this->m_defaultState = arg2->m_defaultState;
0069b624      this->m_leftEdge = arg2->m_leftEdge;
0069b630      this->m_topEdge = arg2->m_topEdge;
0069b63c      this->m_rightEdge = arg2->m_rightEdge;
0069b648      this->m_bottomEdge = arg2->m_bottomEdge;
0069b65f      int32_t var_18 = ebx;
0069b663      this->m_uiReadOrder = arg2->m_uiReadOrder;
0069b66d      void __return;
0069b66d      class IntrusiveHashIterator<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* eax_5 = IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>::begin(&arg2->m_states.m_intrusiveTable, &__return);
0069b672      class HashTableData<unsigned long,DBOCache *>* i_9 = eax_5->m_currElement;
0069b677      class IntrusiveHashTable<unsigned long,HashTableData<unsigned long,DBOCache *> *,0>* m_currHashTable = eax_5->m_currHashTable;
0069b679      class HashTableData<unsigned long,DBOCache *>** m_currBucket = eax_5->m_currBucket;
0069b680      uint32_t m_buckets;
0069b680      
0069b680      if (i_9 != 0)
0069b680      {
0069b682          while (true)
0069b682          {
0069b682              uint32_t m_hashKey = i_9->m_hashKey;
0069b688              uint32_t temp1_1 = (COMBINE(0, m_hashKey) % this->m_states.m_intrusiveTable.m_numBuckets);
0069b68e              class HashTableData<unsigned long,StateDesc>** m_buckets_1 = this->m_states.m_intrusiveTable.m_buckets;
0069b694              m_buckets = m_hashKey;
0069b69b              int32_t* edx_7 = m_buckets_1[temp1_1];
0069b69b              
0069b6a0              if (edx_7 == 0)
0069b6a0              {
0069b6bd              label_69b6bd:
0069b6bd                  HashTable<unsigned long,StateDesc,0>::add(&this->m_states, &m_buckets, &i_9->m_data);
0069b6a0              }
0069b6a0              else
0069b6a0              {
0069b6a4                  while (*(uint32_t*)edx_7 != m_hashKey)
0069b6a4                  {
0069b6aa                      edx_7 = edx_7[1];
0069b6aa                      
0069b6af                      if (edx_7 == 0)
0069b6af                          goto label_69b6bd_1;
0069b6a4                  }
0069b6a4                  
0069b73b                  if ((edx_7 == 0 || edx_7 == 0xfffffff8))
0069b73b                  {
0069b6bd                  label_69b6bd_1:
0069b6bd                      HashTable<unsigned long,StateDesc,0>::add(&this->m_states, &m_buckets, &i_9->m_data);
0069b73b                  }
0069b73b                  else
0069b73b                  {
0069b744                      uint8_t eax_12 = StateDesc::Incorporate(&edx_7[2], &i_9->m_data);
0069b744                      
0069b74b                      if (eax_12 == 0)
0069b751                          var_45 = eax_12;
0069b73b                  }
0069b6a0              }
0069b6a0              
0069b6c2              i_9 = i_9->m_hashNext;
0069b6c2              
0069b6c7              if (i_9 == 0)
0069b6c7              {
0069b6e2                  class HashTableData<unsigned long,DBOCache *>* i;
0069b6e2                  
0069b6e2                  do
0069b6e2                  {
0069b6d6                      m_currBucket = &m_currBucket[1];
0069b6d6                      
0069b6db                      if (m_currBucket == &m_currHashTable->m_buckets[m_currHashTable->m_numBuckets])
0069b6db                          goto label_69b6ea;
0069b6db                      
0069b6dd                      i = *(uint32_t*)m_currBucket;
0069b6e2                  } while (i == 0);
0069b6e2                  
0069b6e4                  i_9 = i;
0069b6e4                  
0069b6e8                  if (i_9 == 0)
0069b6e8                      break;
0069b6c7              }
0069b682          }
0069b682          
0069b6ea      label_69b6ea:
0069b6ea          ebx = var_18;
0069b680      }
0069b680      
0069b700      void* ecx_8 = &this->m_children.m_intrusiveTable.m_buckets[this->m_children.m_intrusiveTable.m_numBuckets];
0069b705      int32_t var_44 = 0;
0069b70d      int32_t** m_firstInterestingBucket_1;
0069b70d      int32_t* i_2;
0069b70d      
0069b70d      if (this->m_children.m_intrusiveTable.m_firstInterestingBucket == ecx_8)
0069b70d      {
0069b728      label_69b728:
0069b728          m_firstInterestingBucket_1 = nullptr;
0069b72a          i_2 = nullptr;
0069b70d      }
0069b70d      else
0069b70d      {
0069b710          while (true)
0069b710          {
0069b710              class HashTableData<unsigned long,ElementDesc>** m_firstInterestingBucket = this->m_children.m_intrusiveTable.m_firstInterestingBucket;
0069b710              
0069b719              if (*(uint32_t*)m_firstInterestingBucket != 0)
0069b719              {
0069b75a                  m_firstInterestingBucket_1 = this->m_children.m_intrusiveTable.m_firstInterestingBucket;
0069b760                  i_2 = *(uint32_t*)m_firstInterestingBucket_1;
0069b760                  break;
0069b719              }
0069b719              
0069b720              this->m_children.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket[1];
0069b720              
0069b726              if (&m_firstInterestingBucket[1] == ecx_8)
0069b726                  goto label_69b728;
0069b710          }
0069b70d      }
0069b70d      
0069b764      int32_t** m_firstInterestingBucket_9 = m_firstInterestingBucket_1;
0069b764      
0069b766      if (i_2 != 0)
0069b766      {
0069b76c          uint32_t m_numBuckets = arg2->m_children.m_intrusiveTable.m_numBuckets;
0069b778          m_buckets = arg2->m_children.m_intrusiveTable.m_buckets;
0069b778          
0069b780          while (true)
0069b780          {
0069b780              int32_t i_1 = *(uint32_t*)i_2;
0069b78c              int32_t* edx_13 = *(uint32_t*)(m_buckets + ((COMBINE(0, i_1) % m_numBuckets) << 2));
0069b78c              
0069b791              if (edx_13 == 0)
0069b791              {
0069b7a4              label_69b7a4:
0069b7a4                  var_44 += 1;
0069b791              }
0069b791              else
0069b791              {
0069b795                  while (*(uint32_t*)edx_13 != i_1)
0069b795                  {
0069b797                      edx_13 = edx_13[1];
0069b797                      
0069b79c                      if (edx_13 == 0)
0069b79c                          goto label_69b7a4_1;
0069b795                  }
0069b795                  
0069b7a2                  if (edx_13 == 0)
0069b7a2                  {
0069b7a4                  label_69b7a4_1:
0069b7a4                      var_44 += 1;
0069b7a2                  }
0069b791              }
0069b791              
0069b7a8              i_2 = i_2[1];
0069b7a8              
0069b7ad              if (i_2 == 0)
0069b7ad              {
0069b7cc                  do
0069b7cc                  {
0069b7c0                      m_firstInterestingBucket_9 = &m_firstInterestingBucket_9[1];
0069b7c0                      
0069b7c5                      if (m_firstInterestingBucket_9 == &this->m_children.m_intrusiveTable.m_buckets[this->m_children.m_intrusiveTable.m_numBuckets])
0069b7c5                          goto label_69b7d2;
0069b7c5                      
0069b7c7                      i_2 = *(uint32_t*)m_firstInterestingBucket_9;
0069b7cc                  } while (i_2 == 0);
0069b7cc                  
0069b7d0                  if (i_2 == 0)
0069b7d0                      break;
0069b7ad              }
0069b780          }
0069b780          
0069b7d2      label_69b7d2:
0069b7d2          ebx = var_18;
0069b766      }
0069b766      
0069b7e6      void* edx_16 = &arg2->m_children.m_intrusiveTable.m_buckets[arg2->m_children.m_intrusiveTable.m_numBuckets];
0069b7ef      class HashTableData<unsigned long,ElementDesc>* m_hashNext_2;
0069b7ef      class HashTableData<unsigned long,ElementDesc>** m_firstInterestingBucket_7;
0069b7ef      
0069b7ef      if (arg2->m_children.m_intrusiveTable.m_firstInterestingBucket == edx_16)
0069b7ef      {
0069b809      label_69b809:
0069b809          m_firstInterestingBucket_7 = nullptr;
0069b80b          m_hashNext_2 = nullptr;
0069b7ef      }
0069b7ef      else
0069b7ef      {
0069b7f1          while (true)
0069b7f1          {
0069b7f1              class HashTableData<unsigned long,ElementDesc>** m_firstInterestingBucket_2 = arg2->m_children.m_intrusiveTable.m_firstInterestingBucket;
0069b7f1              
0069b7fa              if (*(uint32_t*)m_firstInterestingBucket_2 != 0)
0069b7fa              {
0069b80f                  m_firstInterestingBucket_7 = arg2->m_children.m_intrusiveTable.m_firstInterestingBucket;
0069b815                  m_hashNext_2 = *(uint32_t*)m_firstInterestingBucket_7;
0069b815                  break;
0069b7fa              }
0069b7fa              
0069b801              arg2->m_children.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket_2[1];
0069b801              
0069b807              if (&m_firstInterestingBucket_2[1] == edx_16)
0069b807                  goto label_69b809;
0069b7f1          }
0069b7ef      }
0069b7ef      
0069b819      class HashTableData<unsigned long,ElementDesc>** m_firstInterestingBucket_8 = m_firstInterestingBucket_7;
0069b81d      class HashTableData<unsigned long,ElementDesc>* m_hashNext_1 = m_hashNext_2;
0069b81d      
0069b821      if (m_hashNext_2 != 0)
0069b821      {
0069b827          class HashTableData<unsigned long,ElementDesc>* m_hashNext = m_hashNext_2;
0069b829          class HashTableData<unsigned long,ElementDesc>** m_firstInterestingBucket_10 = m_firstInterestingBucket_7;
0069b829          
0069b830          while (true)
0069b830          {
0069b830              uint32_t m_hashKey_1 = m_hashNext->m_hashKey;
0069b835              m_buckets = &m_hashNext->m_data;
0069b849              int32_t* edx_19 = this->m_children.m_intrusiveTable.m_buckets[(COMBINE(0, m_hashKey_1) % this->m_children.m_intrusiveTable.m_numBuckets)];
0069b849              
0069b84e              if (edx_19 == 0)
0069b84e              {
0069b865              label_69b865:
0069b865                  void* edi_2 = operator new(0x1cc);
0069b865                  
0069b86c                  if (edi_2 == 0)
0069b8ae                      edi_2 = nullptr;
0069b86c                  else
0069b86c                  {
0069b86e                      uint32_t m_buckets_2 = m_buckets;
0069b876                      *(uint32_t*)edi_2 = m_hashKey_1;
0069b878                      *(uint32_t*)((char*)edi_2 + 4) = 0;
0069b87f                      ElementDesc::ElementDesc(((char*)edi_2 + 8), m_buckets_2);
0069b86c                  }
0069b86c                  
0069b8b0                  int32_t i_3 = *(uint32_t*)edi_2;
0069b8c2                  void* ecx_15 = &this->m_children.m_intrusiveTable.m_buckets[(COMBINE(0, i_3) % this->m_children.m_intrusiveTable.m_numBuckets)];
0069b8c5                  int32_t* eax_28 = *(uint32_t*)ecx_15;
0069b8c5                  
0069b8c9                  if (eax_28 == 0)
0069b8c9                  {
0069b8e3                  label_69b8e3:
0069b8e3                      *(uint32_t*)((char*)edi_2 + 4) = *(uint32_t*)ecx_15;
0069b8e6                      *(uint32_t*)ecx_15 = edi_2;
0069b8e6                      
0069b8ee                      if (ecx_15 < this->m_children.m_intrusiveTable.m_firstInterestingBucket)
0069b8f0                          this->m_children.m_intrusiveTable.m_firstInterestingBucket = ecx_15;
0069b8f0                      
0069b8f6                      this->m_children.m_intrusiveTable.m_numElements += 1;
0069b8c9                  }
0069b8c9                  else
0069b8c9                  {
0069b8d2                      while (*(uint32_t*)eax_28 != i_3)
0069b8d2                      {
0069b8d4                          eax_28 = eax_28[1];
0069b8d4                          
0069b8d9                          if (eax_28 == 0)
0069b8d9                              goto label_69b8e3;
0069b8d2                      }
0069b8d2                      
0069b8df                      if (eax_28 == 0)
0069b8df                          goto label_69b8e3;
0069b8df                      
0069b901                      ElementDesc::~ElementDesc(((char*)edi_2 + 8));
0069b907                      operator delete(edi_2);
0069b8c9                  }
0069b8c9                  
0069b91f                  int32_t* edx_26 = this->m_children.m_intrusiveTable.m_buckets[(COMBINE(0, m_hashKey_1) % this->m_children.m_intrusiveTable.m_numBuckets)];
0069b924                  void* edx_27;
0069b924                  
0069b924                  if (edx_26 == 0)
0069b924                  {
0069b935                  label_69b935:
0069b935                      edx_27 = nullptr;
0069b924                  }
0069b924                  else
0069b924                  {
0069b928                      while (*(uint32_t*)edx_26 != m_hashKey_1)
0069b928                      {
0069b92e                          edx_26 = edx_26[1];
0069b92e                          
0069b933                          if (edx_26 == 0)
0069b933                              goto label_69b935_1;
0069b928                      }
0069b928                      
0069ba02                      if (edx_26 == 0)
0069ba02                      {
0069b935                      label_69b935_1:
0069b935                          edx_27 = nullptr;
0069ba02                      }
0069ba02                      else
0069ba08                          edx_27 = &edx_26[2];
0069b924                  }
0069b924                  
0069b941                  m_hashNext = m_hashNext_1;
0069b945                  m_firstInterestingBucket_10 = m_firstInterestingBucket_8;
0069b94b                  *(uint32_t*)((char*)edx_27 + 0x1b8) += var_44;
0069b84e              }
0069b84e              else
0069b84e              {
0069b852                  while (*(uint32_t*)edx_19 != m_hashKey_1)
0069b852                  {
0069b854                      edx_19 = edx_19[1];
0069b854                      
0069b859                      if (edx_19 == 0)
0069b859                          goto label_69b865;
0069b852                  }
0069b852                  
0069b88f                  if ((edx_19 == 0 || edx_19 == 0xfffffff8))
0069b888                      goto label_69b865;
0069b888                  
0069b898                  uint8_t eax_25 = ElementDesc::Incorporate(&edx_19[2], m_buckets);
0069b898                  
0069b89f                  if (eax_25 == 0)
0069b8a5                      var_45 = eax_25;
0069b84e              }
0069b84e              
0069b951              m_hashNext = m_hashNext->m_hashNext;
0069b956              m_hashNext_1 = m_hashNext;
0069b956              
0069b95a              if (m_hashNext == 0)
0069b95a              {
0069b983                  class HashTableData<unsigned long,ElementDesc>* i_4;
0069b983                  
0069b983                  do
0069b983                  {
0069b973                      m_firstInterestingBucket_10 = &m_firstInterestingBucket_10[1];
0069b978                      m_firstInterestingBucket_8 = m_firstInterestingBucket_10;
0069b978                      
0069b97c                      if (m_firstInterestingBucket_10 == &arg2->m_children.m_intrusiveTable.m_buckets[arg2->m_children.m_intrusiveTable.m_numBuckets])
0069b97c                          goto label_69b993;
0069b97c                      
0069b97e                      i_4 = *(uint32_t*)m_firstInterestingBucket_10;
0069b983                  } while (i_4 == 0);
0069b983                  
0069b985                  m_hashNext = i_4;
0069b989                  m_hashNext_1 = m_hashNext;
0069b989                  
0069b98d                  if (m_hashNext == 0)
0069b98d                      break;
0069b95a              }
0069b830          }
0069b830          
0069b993      label_69b993:
0069b993          ebx = var_18;
0069b821      }
0069b821      
0069b9c5      void* m_firstInterestingBucket_3;
0069b9c5      
0069b9c5      if ((((((m_width + m_x) - 1) - m_x_3) + 1) != ((ebx - m_x_2) + 1) || ((eax - m_y) + 1) != ((edx_2 - m_y_1) + 1)))
0069b9c5      {
0069b9d7          void* ecx_23 = &this->m_states.m_intrusiveTable.m_buckets[this->m_states.m_intrusiveTable.m_numBuckets];
0069b9e0          int32_t* m_firstInterestingBucket_5;
0069b9e0          int32_t* i_10;
0069b9e0          
0069b9e0          if (this->m_states.m_intrusiveTable.m_firstInterestingBucket == ecx_23)
0069b9e0          {
0069b9fa          label_69b9fa:
0069b9fa              m_firstInterestingBucket_5 = nullptr;
0069b9fc              i_10 = nullptr;
0069b9e0          }
0069b9e0          else
0069b9e0          {
0069b9e2              while (true)
0069b9e2              {
0069b9e2                  class HashTableData<unsigned long,StateDesc>** m_firstInterestingBucket_4 = this->m_states.m_intrusiveTable.m_firstInterestingBucket;
0069b9e2                  
0069b9eb                  if (*(uint32_t*)m_firstInterestingBucket_4 != 0)
0069b9eb                  {
0069ba10                      m_firstInterestingBucket_5 = this->m_states.m_intrusiveTable.m_firstInterestingBucket;
0069ba16                      i_10 = *(uint32_t*)m_firstInterestingBucket_5;
0069ba16                      break;
0069b9eb                  }
0069b9eb                  
0069b9f2                  this->m_states.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket_4[1];
0069b9f2                  
0069b9f8                  if (&m_firstInterestingBucket_4[1] == ecx_23)
0069b9f8                      goto label_69b9fa;
0069b9e2              }
0069b9e0          }
0069b9e0          
0069ba1a          int32_t* m_firstInterestingBucket_11 = m_firstInterestingBucket_5;
0069ba1a          
0069ba1c          if (i_10 != 0)
0069ba1c          {
0069ba26              while (true)
0069ba26              {
0069ba26                  int32_t i_5 = *(uint32_t*)i_10;
0069ba32                  int32_t* edx_35 = arg2->m_states.m_intrusiveTable.m_buckets[(COMBINE(0, i_5) % arg2->m_states.m_intrusiveTable.m_numBuckets)];
0069ba32                  
0069ba37                  if (edx_35 == 0)
0069ba37                  {
0069ba7d                  label_69ba7d:
0069ba7d                      *(uint32_t*)(i_10[2] + 0x20)(&m_x_3, &m_x_2, this->m_leftEdge, this->m_topEdge, this->m_rightEdge, this->m_bottomEdge);
0069ba37                  }
0069ba37                  else
0069ba37                  {
0069ba42                      while (*(uint32_t*)edx_35 != i_5)
0069ba42                      {
0069ba44                          edx_35 = edx_35[1];
0069ba44                          
0069ba49                          if (edx_35 == 0)
0069ba49                              goto label_69ba7d_1;
0069ba42                      }
0069ba42                      
0069ba4f                      if (edx_35 == 0)
0069ba4f                      {
0069ba7d                      label_69ba7d_1:
0069ba7d                          *(uint32_t*)(i_10[2] + 0x20)(&m_x_3, &m_x_2, this->m_leftEdge, this->m_topEdge, this->m_rightEdge, this->m_bottomEdge);
0069ba4f                      }
0069ba37                  }
0069ba37                  
0069ba80                  i_10 = i_10[1];
0069ba80                  
0069ba85                  if (i_10 == 0)
0069ba85                  {
0069baa2                      int32_t* i_6;
0069baa2                      
0069baa2                      do
0069baa2                      {
0069ba96                          m_firstInterestingBucket_11 = &m_firstInterestingBucket_11[1];
0069ba96                          
0069ba9b                          if (m_firstInterestingBucket_11 == &this->m_states.m_intrusiveTable.m_buckets[this->m_states.m_intrusiveTable.m_numBuckets])
0069ba9b                              goto label_69babe;
0069ba9b                          
0069ba9d                          i_6 = *(uint32_t*)m_firstInterestingBucket_11;
0069baa2                      } while (i_6 == 0);
0069baa2                      
0069baa4                      i_10 = i_6;
0069baa4                      
0069baa8                      if (i_10 == 0)
0069baa8                          break;
0069ba85                  }
0069ba26              }
0069ba1c          }
0069ba1c          
0069babe      label_69babe:
0069babe          void* ecx_27 = &this->m_children.m_intrusiveTable.m_buckets[this->m_children.m_intrusiveTable.m_numBuckets];
0069bac7          int32_t* i_11;
0069bac7          
0069bac7          if (this->m_children.m_intrusiveTable.m_firstInterestingBucket == ecx_27)
0069bac7          {
0069bae8          label_69bae8:
0069bae8              m_firstInterestingBucket_3 = nullptr;
0069baea              i_11 = nullptr;
0069bac7          }
0069bac7          else
0069bac7          {
0069bad0              while (true)
0069bad0              {
0069bad0                  class HashTableData<unsigned long,ElementDesc>** m_firstInterestingBucket_6 = this->m_children.m_intrusiveTable.m_firstInterestingBucket;
0069bad0                  
0069bad9                  if (*(uint32_t*)m_firstInterestingBucket_6 != 0)
0069bad9                  {
0069baee                      m_firstInterestingBucket_3 = this->m_children.m_intrusiveTable.m_firstInterestingBucket;
0069baf4                      i_11 = *(uint32_t*)m_firstInterestingBucket_3;
0069baf4                      break;
0069bad9                  }
0069bad9                  
0069bae0                  this->m_children.m_intrusiveTable.m_firstInterestingBucket = &m_firstInterestingBucket_6[1];
0069bae0                  
0069bae6                  if (&m_firstInterestingBucket_6[1] == ecx_27)
0069bae6                      goto label_69bae8;
0069bad0              }
0069bac7          }
0069bac7          
0069baf8          void* m_firstInterestingBucket_12 = m_firstInterestingBucket_3;
0069baf8          
0069bafa          if (i_11 != 0)
0069bafa          {
0069bb00              while (true)
0069bb00              {
0069bb00                  int32_t i_7 = *(uint32_t*)i_11;
0069bb12                  int32_t* edx_40 = arg2->m_children.m_intrusiveTable.m_buckets[(COMBINE(0, i_7) % arg2->m_children.m_intrusiveTable.m_numBuckets)];
0069bb12                  
0069bb17                  if (edx_40 == 0)
0069bb17                  {
0069bb5d                  label_69bb5d:
0069bb5d                      *(uint32_t*)(i_11[2] + 0x20)(&m_x_3, &m_x_2, i_11[0x32], i_11[0x33], i_11[0x34], i_11[0x35]);
0069bb17                  }
0069bb17                  else
0069bb17                  {
0069bb22                      while (*(uint32_t*)edx_40 != i_7)
0069bb22                      {
0069bb24                          edx_40 = edx_40[1];
0069bb24                          
0069bb29                          if (edx_40 == 0)
0069bb29                              goto label_69bb5d_1;
0069bb22                      }
0069bb22                      
0069bb2f                      if (edx_40 == 0)
0069bb2f                      {
0069bb5d                      label_69bb5d_1:
0069bb5d                          *(uint32_t*)(i_11[2] + 0x20)(&m_x_3, &m_x_2, i_11[0x32], i_11[0x33], i_11[0x34], i_11[0x35]);
0069bb2f                      }
0069bb17                  }
0069bb17                  
0069bb60                  i_11 = i_11[1];
0069bb60                  
0069bb65                  if (i_11 == 0)
0069bb65                  {
0069bb82                      int32_t* i_8;
0069bb82                      
0069bb82                      do
0069bb82                      {
0069bb76                          m_firstInterestingBucket_12 += 4;
0069bb76                          
0069bb7b                          if (m_firstInterestingBucket_12 == &this->m_children.m_intrusiveTable.m_buckets[this->m_children.m_intrusiveTable.m_numBuckets])
0069bb7b                              goto label_69bb8e;
0069bb7b                          
0069bb7d                          i_8 = *(uint32_t*)m_firstInterestingBucket_12;
0069bb82                      } while (i_8 == 0);
0069bb82                      
0069bb84                      i_11 = i_8;
0069bb84                      
0069bb88                      if (i_11 == 0)
0069bb88                          break;
0069bb65                  }
0069bb00              }
0069bafa          }
0069b9c5      }
0069b9c5      
0069bb8e  label_69bb8e:
0069bb8e      m_firstInterestingBucket_3 = var_45;
0069bb99      return m_firstInterestingBucket_3;
0069b5a0  }

0069b82d                                         8d 49 00                                                               .I.
0069b8cd                                         8d 49 00                                                               .I.
0069bb9c                                                                                      90 90 90 90                              ....

0069bba0  void __thiscall ElementDesc::Serialize(class ElementDesc* this, class Archive* arg2)

0069bba0  {
0069bba3      class Archive* esi = arg2;
0069bbb1      uint32_t eax = Archive::GetVersionByToken(esi, 0x55494c20);
0069bbbb      StateDesc::Serialize(this, esi);
0069bbc4      Archive::CheckAlignment(esi, 4);
0069bbcd      uint8_t* eax_1 = Archive::GetBytes(esi, 4);
0069bbcd      
0069bbd9      if (eax_1 != 0)
0069bbd9      {
0069bbde          if ((esi->m_flags & 1) == 0)
0069bbec              this->m_uiReadOrder = *(uint32_t*)eax_1;
0069bbde          else
0069bbe6              *(uint32_t*)eax_1 = this->m_uiReadOrder;
0069bbd9      }
0069bbd9      
0069bbf6      Archive::CheckAlignment(esi, 4);
0069bbff      uint8_t* eax_2 = Archive::GetBytes(esi, 4);
0069bbff      
0069bc06      if (eax_2 != 0)
0069bc06      {
0069bc0b          if ((esi->m_flags & 1) == 0)
0069bc19              this->m_elementID = *(uint32_t*)eax_2;
0069bc0b          else
0069bc13              *(uint32_t*)eax_2 = this->m_elementID;
0069bc06      }
0069bc06      
0069bc23      Archive::CheckAlignment(esi, 4);
0069bc2c      uint8_t* eax_3 = Archive::GetBytes(esi, 4);
0069bc2c      
0069bc33      if (eax_3 != 0)
0069bc33      {
0069bc38          if ((esi->m_flags & 1) == 0)
0069bc46              this->m_type = *(uint32_t*)eax_3;
0069bc38          else
0069bc40              *(uint32_t*)eax_3 = this->m_type;
0069bc33      }
0069bc33      
0069bc50      Archive::CheckAlignment(esi, 4);
0069bc59      uint8_t* eax_4 = Archive::GetBytes(esi, 4);
0069bc59      
0069bc60      if (eax_4 != 0)
0069bc60      {
0069bc65          if ((esi->m_flags & 1) == 0)
0069bc73              this->m_baseElement = *(uint32_t*)eax_4;
0069bc65          else
0069bc6d              *(uint32_t*)eax_4 = this->m_baseElement;
0069bc60      }
0069bc60      
0069bc7d      Archive::CheckAlignment(esi, 4);
0069bc86      uint8_t* eax_5 = Archive::GetBytes(esi, 4);
0069bc86      
0069bc8d      if (eax_5 != 0)
0069bc8d      {
0069bc92          if ((esi->m_flags & 1) == 0)
0069bca0              this->m_baseLayout.id = *(uint32_t*)eax_5;
0069bc92          else
0069bc9a              *(uint32_t*)eax_5 = this->m_baseLayout.id;
0069bc8d      }
0069bc8d      
0069bcaa      Archive::CheckAlignment(esi, 4);
0069bcb3      uint8_t* eax_6 = Archive::GetBytes(esi, 4);
0069bcb3      
0069bcba      if (eax_6 != 0)
0069bcba      {
0069bcbf          if ((esi->m_flags & 1) == 0)
0069bccd              this->m_defaultState = *(uint32_t*)eax_6;
0069bcbf          else
0069bcc7              *(uint32_t*)eax_6 = this->m_defaultState;
0069bcba      }
0069bcba      
0069bcd5      if (eax >= 1)
0069bcd5      {
0069bcdf          if ((this->m_uiIncorporationFlags & 2) != 0)
0069bcdf          {
0069bce5              Archive::CheckAlignment(esi, 4);
0069bcee              uint8_t* eax_7 = Archive::GetBytes(esi, 4);
0069bcee              
0069bcf5              if (eax_7 != 0)
0069bcf5              {
0069bcfa                  if ((esi->m_flags & 1) == 0)
0069bd05                      this->m_x = *(uint32_t*)eax_7;
0069bcfa                  else
0069bcff                      *(uint32_t*)eax_7 = this->m_x;
0069bcf5              }
0069bcdf          }
0069bcdf          
0069bd0c          if ((this->m_uiIncorporationFlags & 4) != 0)
0069bd0c          {
0069bd12              Archive::CheckAlignment(esi, 4);
0069bd1b              uint8_t* eax_8 = Archive::GetBytes(esi, 4);
0069bd1b              
0069bd22              if (eax_8 != 0)
0069bd22              {
0069bd27                  if ((esi->m_flags & 1) == 0)
0069bd32                      this->m_y = *(uint32_t*)eax_8;
0069bd27                  else
0069bd2c                      *(uint32_t*)eax_8 = this->m_y;
0069bd22              }
0069bd0c          }
0069bd0c          
0069bd39          if ((this->m_uiIncorporationFlags & 8) != 0)
0069bd39          {
0069bd3f              Archive::CheckAlignment(esi, 4);
0069bd48              uint8_t* eax_9 = Archive::GetBytes(esi, 4);
0069bd48              
0069bd4f              if (eax_9 != 0)
0069bd4f              {
0069bd54                  if ((esi->m_flags & 1) == 0)
0069bd5f                      this->m_width = *(uint32_t*)eax_9;
0069bd54                  else
0069bd59                      *(uint32_t*)eax_9 = this->m_width;
0069bd4f              }
0069bd39          }
0069bd39          
0069bd66          if ((this->m_uiIncorporationFlags & 0x10) != 0)
0069bd66          {
0069bd6c              Archive::CheckAlignment(esi, 4);
0069bd75              uint8_t* eax_10 = Archive::GetBytes(esi, 4);
0069bd75              
0069bd7c              if (eax_10 != 0)
0069bd7c              {
0069bd81                  if ((esi->m_flags & 1) == 0)
0069bd8c                      this->m_height = *(uint32_t*)eax_10;
0069bd81                  else
0069bd86                      *(uint32_t*)eax_10 = this->m_height;
0069bd7c              }
0069bd66          }
0069bd66          
0069bd93          if ((this->m_uiIncorporationFlags & 0x20) != 0)
0069bd93          {
0069bd99              Archive::CheckAlignment(esi, 4);
0069bda2              int32_t* eax_11 = Archive::GetBytes(esi, 4);
0069bda2              
0069bda9              if (eax_11 != 0)
0069bda9              {
0069bdae                  if ((esi->m_flags & 1) == 0)
0069bdb9                      this->m_zLevel = *(uint32_t*)eax_11;
0069bdae                  else
0069bdb3                      *(uint32_t*)eax_11 = this->m_zLevel;
0069bda9              }
0069bd93          }
0069bcd5      }
0069bcd5      
0069bdc0      Archive::CheckAlignment(esi, 4);
0069bdc9      uint8_t* eax_12 = Archive::GetBytes(esi, 4);
0069bdc9      
0069bdd0      if (eax_12 != 0)
0069bdd0      {
0069bdd5          if ((esi->m_flags & 1) == 0)
0069bde3              this->m_leftEdge = *(uint32_t*)eax_12;
0069bdd5          else
0069bddd              *(uint32_t*)eax_12 = this->m_leftEdge;
0069bdd0      }
0069bdd0      
0069bded      Archive::CheckAlignment(esi, 4);
0069bdf6      uint8_t* eax_13 = Archive::GetBytes(esi, 4);
0069bdf6      
0069bdfd      if (eax_13 != 0)
0069bdfd      {
0069be02          if ((esi->m_flags & 1) == 0)
0069be10              this->m_topEdge = *(uint32_t*)eax_13;
0069be02          else
0069be0a              *(uint32_t*)eax_13 = this->m_topEdge;
0069bdfd      }
0069bdfd      
0069be1a      Archive::CheckAlignment(esi, 4);
0069be23      uint8_t* eax_14 = Archive::GetBytes(esi, 4);
0069be23      
0069be2a      if (eax_14 != 0)
0069be2a      {
0069be2f          if ((esi->m_flags & 1) == 0)
0069be3d              this->m_rightEdge = *(uint32_t*)eax_14;
0069be2f          else
0069be37              *(uint32_t*)eax_14 = this->m_rightEdge;
0069be2a      }
0069be2a      
0069be47      Archive::CheckAlignment(esi, 4);
0069be50      uint8_t* eax_15 = Archive::GetBytes(esi, 4);
0069be50      
0069be57      if (eax_15 != 0)
0069be57      {
0069be5c          if ((esi->m_flags & 1) == 0)
0069be6a              this->m_bottomEdge = *(uint32_t*)eax_15;
0069be5c          else
0069be64              *(uint32_t*)eax_15 = this->m_bottomEdge;
0069be57      }
0069be57      
0069be70      eax_15 = esi->m_flags;
0069be73      eax_15 = !(eax_15);
0069be73      
0069be77      if ((1 & eax_15) != 0)
0069be7f          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>::delete_contents(&this->m_states.m_intrusiveTable);
0069be7f      
0069be91      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,StateDesc> *,0>,HashTableData<unsigned long,StateDesc> *,SB_Default>(&arg2, &this->m_states.m_intrusiveTable, esi);
0069be91      
0069bea0      if ((1 & !(esi->m_flags)) != 0)
0069bea8          IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>::delete_contents(&this->m_children.m_intrusiveTable);
0069bea8      
0069beba      SerializeIntrusiveHashTable<int,IntrusiveHashTable<unsigned long,HashTableData<unsigned long,ElementDesc> *,0>,HashTableData<unsigned long,ElementDesc> *,SB_Default>(&arg2, &this->m_children.m_intrusiveTable, esi);
0069bba0  }

0069bec9                             90 90 90 90 90 90 90                                                           .......

0069bed0  void __thiscall StateDesc::GetSubDataIDs(class StateDesc const* this, class QualifiedDataIDArray* arg2)

0069bed0  {
0069bedd      PropertyCollection::GetSubDataIDs(&this->m_properties, arg2);
0069bedd      
0069beec      if (this->m_media.m_num > 0)
0069beec      {
0069beee          int32_t i = 0;
0069beee          
0069bf0c          do
0069bf0c          {
0069bef6              int32_t* ecx_1 = this->m_media.m_data[i];
0069bef6              
0069befb              if (ecx_1 != 0)
0069bf00                  *(uint32_t*)(*(uint32_t*)ecx_1 + 8)(arg2);
0069bf00              
0069bf09              i += 1;
0069bf0c          } while (i < this->m_media.m_num);
0069beec      }
0069bed0  }

0069bf14                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0069bf20  void __thiscall StateDesc::UpdateSizeAndPosition(class StateDesc* this, class Box2D const* arg2, class Box2D const* arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, uint32_t arg7)

0069bf20  {
0069bf29      int32_t m_y = this->m_y;
0069bf2f      int32_t m_x = this->m_x;
0069bf35      int32_t edx_1 = ((this->m_height + m_y) - 1);
0069bf48      int32_t m_x0 = arg3->m_x0;
0069bf4a      void* ecx_1 = ((this->m_width + m_x) - 1);
0069bf4e      int32_t var_8 = ecx_1;
0069bf56      class Box2D* ecx_2 = arg2;
0069bf5a      arg2 = arg3->m_x1;
0069bf5e      int32_t m_x0_1 = ecx_2->m_x0;
0069bf72      int32_t m_y_1 = m_y;
0069bf76      int32_t m_x1 = ecx_2->m_x1;
0069bf7f      void* esi_3 = (((m_x0_1 - m_x0) - m_x1) + arg2);
0069bf8e      int32_t m_y1 = arg3->m_y1;
0069bf91      arg3 = arg3->m_y0;
0069bfa5      void* ebx_6 = (((m_y1 - arg3) - ecx_2->m_y1) + ecx_2->m_y0);
0069bfae      int32_t m_x_1 = m_x;
0069bfae      
0069bfb6      if ((m_x1 - m_x0_1) != 0xffffffff)
0069bfd9          float var_38_1 = ((float)(((long double)(((char*)arg2 - m_x0) + 1)) / ((long double)((m_x1 - m_x0_1) + 1))));
0069bfb6      else
0069bfb8          var_38_1 = ((m_x1 - m_x0_1) + 1);
0069bfb8      
0069c00e      if (arg4 == 2)
0069c052          m_x_1 = ((char*)esi_3 + m_x);
0069c00e      else if (arg4 == 3)
0069c011      {
0069c034          int32_t eax_14;
0069c034          int32_t edx_6;
0069c034          edx_6 = HIGHD(((int64_t)(((char*)arg2 - m_x0) + 1)));
0069c034          eax_14 = LOWD(((int64_t)(((char*)arg2 - m_x0) + 1)));
0069c042          int32_t eax_19;
0069c042          int32_t edx_7;
0069c042          edx_7 = HIGHD(((int64_t)((var_8 - m_x) + 1)));
0069c042          eax_19 = LOWD(((int64_t)((var_8 - m_x) + 1)));
0069c049          m_x_1 = (((eax_14 - edx_6) >> 1) - ((eax_19 - edx_7) >> 1));
0069c011      }
0069c011      else if (arg4 == 4)
0069c023          m_x_1 = _ftol2();
0069c023      
0069c05b      void* esi_4;
0069c05b      
0069c05b      if (arg6 == 1)
0069c0a6          esi_4 = (var_8 + esi_3);
0069c05b      else if (arg6 == 3)
0069c060      {
0069c07f          int32_t eax_30;
0069c07f          int32_t edx_9;
0069c07f          edx_9 = HIGHD(((int64_t)(((char*)arg2 - m_x0) + 1)));
0069c07f          eax_30 = LOWD(((int64_t)(((char*)arg2 - m_x0) + 1)));
0069c08d          int32_t eax_35;
0069c08d          int32_t edx_10;
0069c08d          edx_10 = HIGHD(((int64_t)((var_8 - m_x) + 1)));
0069c08d          eax_35 = LOWD(((int64_t)((var_8 - m_x) + 1)));
0069c0a6          esi_4 = ((((eax_30 - edx_9) >> 1) + ((eax_35 - edx_10) >> 1)) - 1);
0069c060      }
0069c060      else if (arg6 != 4)
0069c0a6          esi_4 = ecx_1;
0069c063      else
0069c072          esi_4 = _ftol2();
0069c072      
0069c0b1      if (arg5 == 2)
0069c0f6          m_y_1 = (m_y + ebx_6);
0069c0b1      else if (arg5 == 3)
0069c0b4      {
0069c0d9          int32_t eax_48;
0069c0d9          int32_t edx_12;
0069c0d9          edx_12 = HIGHD(((int64_t)((m_y1 - arg3) + 1)));
0069c0d9          eax_48 = LOWD(((int64_t)((m_y1 - arg3) + 1)));
0069c0e7          int32_t eax_53;
0069c0e7          int32_t edx_13;
0069c0e7          edx_13 = HIGHD(((int64_t)((edx_1 - m_y) + 1)));
0069c0e7          eax_53 = LOWD(((int64_t)((edx_1 - m_y) + 1)));
0069c0f6          m_y_1 = (((eax_48 - edx_12) >> 1) - ((eax_53 - edx_13) >> 1));
0069c0b4      }
0069c0b4      else if (arg5 == 4)
0069c0c4          m_y_1 = _ftol2();
0069c0c4      
0069c0ff      int32_t eax_60;
0069c0ff      
0069c0ff      if (arg7 == 1)
0069c14c          eax_60 = (edx_1 + ebx_6);
0069c0ff      else if (arg7 == 3)
0069c104      {
0069c121          int32_t eax_64;
0069c121          int32_t edx_15;
0069c121          edx_15 = HIGHD(((int64_t)((m_y1 - arg3) + 1)));
0069c121          eax_64 = LOWD(((int64_t)((m_y1 - arg3) + 1)));
0069c133          int32_t eax_69;
0069c133          int32_t edx_17;
0069c133          edx_17 = HIGHD(((int64_t)((edx_1 - m_y) + 1)));
0069c133          eax_69 = LOWD(((int64_t)((edx_1 - m_y) + 1)));
0069c14c          eax_60 = ((((eax_64 - edx_15) >> 1) + ((eax_69 - edx_17) >> 1)) - 1);
0069c104      }
0069c104      else if (arg7 != 4)
0069c14c          eax_60 = edx_1;
0069c107      else
0069c10f          eax_60 = _ftol2();
0069c10f      
0069c160      this->m_width = (((char*)esi_4 - m_x_1) + 1);
0069c163      this->m_x = m_x_1;
0069c166      this->m_y = m_y_1;
0069c169      this->m_height = ((eax_60 - m_y_1) + 1);
0069bf20  }

0069c176                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

0069c180  void __fastcall StateDesc::StateDesc(class StateDesc* this)

0069c180  {
0069c189      this->vtable = 0x800e44;
0069c18f      this->m_uiIncorporationFlags = 0;
0069c192      this->m_stateID = 0;
0069c195      this->m_bIsCode = 0;
0069c198      this->m_bPassToChildren = 0;
0069c19b      __builtin_memset(&this->m_x, 0, 0x14);
0069c1aa      PropertyCollection::PropertyCollection(&this->m_properties);
0069c1af      this->m_media.m_data = 0;
0069c1b5      this->m_media.m_sizeAndDeallocate = 0;
0069c1bb      this->m_media.m_num = 0;
0069c180  }

0069c1c6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0069c1d0  uint8_t Client::OnAction(class Client* this @ ecx, class InputEvent const* arg2) __pure

0069c1d0  {
0069c1d0      int32_t eax;
0069c1d0      eax = 1;
0069c1d2      return 1;
0069c1d0  }

0069c1d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0069c1e0  void __fastcall StateDesc::CleanupMedia(class StateDesc* this)

0069c1e0  {
0069c1ea      int32_t i = 0;
0069c1ea      
0069c1ee      if (this->m_media.m_num > 0)
0069c1ee      {
0069c20c          do
0069c20c          {
0069c1f6              int32_t* ecx = this->m_media.m_data[i];
0069c1f6              
0069c1fb              if (ecx != 0)
0069c201                  **(uint32_t**)ecx(1);
0069c201              
0069c209              i += 1;
0069c20c          } while (i < this->m_media.m_num);
0069c1ee      }
0069c1ee      
0069c20e      uint32_t m_sizeAndDeallocate = this->m_media.m_sizeAndDeallocate;
0069c222      this->m_media.m_num = 0;
0069c222      
0069c22c      if ((m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069c22c      {
0069c235          operator delete[](this->m_media.m_data);
0069c23e          this->m_media.m_data = 0;
0069c248          this->m_media.m_sizeAndDeallocate = 0;
0069c253          return;
0069c22c      }
0069c22c      
0069c25c      if (this->m_media.m_data != 0)
0069c25c      {
0069c25e          int32_t eax_3 = (m_sizeAndDeallocate & 0x7fffffff);
0069c263          int32_t eax_4 = (eax_3 - 1);
0069c263          
0069c264          if ((eax_3 - 1) >= 0)
0069c264          {
0069c27f              int32_t temp1_1;
0069c27f              
0069c27f              do
0069c27f              {
0069c270                  temp1_1 = eax_4;
0069c270                  eax_4 -= 1;
0069c271                  this->m_media.m_data[(eax_4 + 1)] = 0;
0069c27f              } while ((temp1_1 - 1) >= 0);
0069c264          }
0069c25c      }
0069c1e0  }

0069c268                          8d a4 24 00 00 00 00 90                                                          ..$.....
0069c284              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0069c290  void __fastcall StateDesc::~StateDesc(class StateDesc* this)

0069c290  {
0069c293      this->vtable = 0x800e44;
0069c299      StateDesc::CleanupMedia(this);
0069c299      
0069c2ae      if ((this->m_media.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069c2b7          operator delete[](this->m_media.m_data);
0069c2b7      
0069c2c3      /* tailcall */
0069c2c3      return PropertyCollection::~PropertyCollection(&this->m_properties);
0069c290  }

0069c2c8                          90 90 90 90 90 90 90 90                                                          ........

0069c2d0  uint8_t __thiscall StateDesc::ToFileNode(class StateDesc const* this, class PFileNode* arg2)

0069c2d0  {
0069c2d1      class PFileNode* ebx = arg2;
0069c2da      class StateDesc* this_1 = this;
0069c2dc      class PFileNode* eax;
0069c2dc      
0069c2dc      if (ebx != 0)
0069c2dc      {
0069c2e7          class PStringBase<char> var_14;
0069c2e7          
0069c2e7          if (this_1->m_stateID == 0)
0069c2e7          {
0069c34f          label_69c34f:
0069c34f              
0069c353              if ((this_1->m_uiIncorporationFlags & 1) == 0)
0069c353              {
0069c399              label_69c399:
0069c399                  struct StateDesc::VTable* vtable = this_1->vtable;
0069c39b                  var_14 = ebx;
0069c39e                  class PStringBase<char> ecx_9;
0069c39e                  eax = vtable->PositionToFileNode(var_14);
0069c39e                  
0069c3a3                  if (eax != 0)
0069c3a3                  {
0069c3b1                      if (this_1->m_properties.m_hashProperties.m_intrusiveTable.m_numElements == 0)
0069c3b1                      {
0069c3de                      label_69c3de:
0069c3de                          int32_t i = 0;
0069c3de                          
0069c3e2                          if (this_1->m_media.m_num > 0)
0069c3e2                          {
0069c42b                              do
0069c42b                              {
0069c3e4                                  class MediaDesc** m_data = this_1->m_media.m_data;
0069c3ea                                  int32_t* edi_2 = m_data[i];
0069c3ea                                  
0069c3ef                                  if (edi_2 != 0)
0069c3ef                                  {
0069c3f7                                      var_14 = m_data;
0069c3fa                                      var_14 = KW_MEDIA.m_charbuffer;
0069c405                                      InterlockedIncrement(&KW_MEDIA.m_charbuffer[-1]);
0069c40d                                      eax = PFileNode::MakeSubNode(ebx, var_14);
0069c40d                                      
0069c414                                      if (eax == 0)
0069c414                                          goto label_69c439;
0069c414                                      
0069c416                                      int32_t edx_6 = *(uint32_t*)edi_2;
0069c418                                      var_14 = eax;
0069c418                                      
0069c420                                      if (*(uint32_t*)(edx_6 + 0x68)(var_14) == 0)
0069c420                                          goto label_69c439;
0069c3ef                                  }
0069c3ef                                  
0069c428                                  i += 1;
0069c42b                              } while (i < this_1->m_media.m_num);
0069c3e2                          }
0069c3e2                          
0069c42d                          uint32_t eax_5;
0069c42d                          eax_5 = 1;
0069c433                          return 1;
0069c3b1                      }
0069c3b1                      
0069c3b3                      var_14 = ecx_9;
0069c3bb                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, &KW_PROPERTIES);
0069c3c2                      eax = PFileNode::MakeSubNode(ebx, var_14);
0069c3c2                      
0069c3c9                      if (eax != 0)
0069c3c9                      {
0069c3cb                          var_14 = eax;
0069c3cb                          
0069c3d6                          if (PropertyCollection::ToFileNode(&this_1->m_properties, var_14) != 0)
0069c3d6                              goto label_69c3de;
0069c3c9                      }
0069c3a3                  }
0069c353              }
0069c353              else
0069c353              {
0069c35b                  var_14 = this;
0069c35e                  var_14 = KW_PASSTOCHILDREN.m_charbuffer;
0069c369                  InterlockedIncrement(&KW_PASSTOCHILDREN.m_charbuffer[-1]);
0069c371                  eax = PFileNode::MakeSubNode(ebx, var_14);
0069c371                  
0069c378                  if (eax != 0)
0069c378                  {
0069c381                      arg2 = this_1->m_bPassToChildren;
0069c389                      var_14 = arg2;
0069c389                      
0069c393                      if (PFileNode::MakeSubNodeAsBool(eax, var_14.m_charbuffer) != 0)
0069c393                          goto label_69c399;
0069c378                  }
0069c353              }
0069c2e7          }
0069c2e7          else
0069c2e7          {
0069c2e9              var_14 = this;
0069c2f2              var_14 = KW_STATEID.m_charbuffer;
0069c2fe              InterlockedIncrement(&KW_STATEID.m_charbuffer[-1]);
0069c306              eax = PFileNode::MakeSubNode(ebx, var_14);
0069c306              
0069c30d              if (eax != 0)
0069c30d              {
0069c316                  var_14 = this_1->m_stateID;
0069c31a                  eax = FileNodeUtils::MakeSubNodeAsEnum(eax, 0x14, var_14);
0069c31f                  class PFileNode* edi_1 = eax;
0069c31f                  
0069c326                  if (edi_1 != 0)
0069c326                  {
0069c32c                      eax = this_1->m_bIsCode;
0069c32c                      
0069c331                      if (eax == 0)
0069c331                          goto label_69c34f;
0069c331                      
0069c333                      var_14 = this;
0069c33b                      PStringBase<unsigned short>::PStringBase<unsigned short>(&var_14, &KW_CODE);
0069c342                      eax = PFileNode::MakeSubNode(edi_1, var_14);
0069c342                      
0069c349                      if (eax != 0)
0069c349                          goto label_69c34f;
0069c326                  }
0069c30d              }
0069c2e7          }
0069c2dc      }
0069c2dc      
0069c439  label_69c439:
0069c439      eax = 0;
0069c43c      return 0;
0069c2d0  }

0069c43f                                                                                               90                                 .

0069c440  uint8_t __thiscall StateDesc::CheckFFN(class StateDesc* this, class PFileNode const* arg2)

0069c440  {
0069c447      if (this->m_stateID != 0)
0069c465          return 1;
0069c465      
0069c449      class StateDesc* this_1 = this;
0069c451      PStringBase<char>::PStringBase<char>(&this_1, "StateDesc::CheckFFN, you must us…");
0069c45b      PFileNode::ReportError(arg2, this_1);
0069c463      return 0;
0069c440  }

0069c468                          90 90 90 90 90 90 90 90                                                          ........

0069c470  void __convention("regparm") SB_Container<SB_TypeAlloc<MediaDescResolver,SB_Default>,&SB_DEFAULT_ITEM_NAME>::Serialize(int32_t const* arg1, class SmartArray<MediaDesc *,1>* arg2, class Archive* arg3)

0069c470  {
0069c470      uint32_t m_num_2;
0069c470      uint32_t m_num = m_num_2;
0069c476      class SmartArray<MediaDesc *,1>* ebp = arg2;
0069c48a      m_num = ebp->m_num;
0069c48e      SB_As32Bit_Compressed::Serialize(arg1, &m_num, arg3);
0069c49d      arg2 = 0;
0069c49d      
0069c4a2      if ((!(arg3->m_flags) & 1) != 0)
0069c4a2      {
0069c4a6          uint32_t eax_2 = Archive::GetSizeLeft(arg3);
0069c4ab          uint32_t m_num_3 = m_num;
0069c4ab          
0069c4b1          if (m_num_3 > eax_2)
0069c4b1          {
0069c4b5              Archive::RaiseError(arg3);
0069c4be              return;
0069c4b1          }
0069c4b1          
0069c4bf          uint32_t m_num_1 = ebp->m_num;
0069c4bf          
0069c4c4          if (m_num_3 > m_num_1)
0069c4c4          {
0069c4c9              SmartArray<unsigned long,1>::grow(ebp, m_num_3);
0069c4ce              ebp->m_num = m_num_3;
0069c4c4          }
0069c4c4          else if (m_num_3 < m_num_1)
0069c4d3          {
0069c4d7              ebp->m_num = m_num_3;
0069c4da              SmartArray<MediaDesc *,1>::shrink(ebp);
0069c4d3          }
0069c4d3          
0069c4df          arg2 = 1;
0069c4a2      }
0069c4a2      
0069c4e4      class MediaDesc** m_data = ebp->m_data;
0069c4e4      
0069c4ef      if (m_data != &m_data[ebp->m_num])
0069c4ef      {
0069c4fa          class SmartArray<MediaDesc *,1>* m_type = arg2;
0069c4fa          
0069c504          while (true)
0069c504          {
0069c504              if ((arg3->m_flags & 1) != 0)
0069c508                  m_type = *(uint32_t*)m_data->m_type;
0069c508              
0069c50f              Archive::CheckAlignment(arg3, 4);
0069c518              class SmartArray<MediaDesc *,1>** eax_4 = Archive::GetBytes(arg3, 4);
0069c518              
0069c51f              if (eax_4 != 0)
0069c51f              {
0069c525                  if ((arg3->m_flags & 1) == 0)
0069c52b                      m_type = *(uint32_t*)eax_4;
0069c525                  else
0069c527                      *(uint32_t*)eax_4 = m_type;
0069c51f              }
0069c51f              
0069c535              if ((!(arg3->m_flags) & 1) != 0)
0069c540                  *(uint32_t*)m_data = MediaDesc::CreateMediaType(m_type);
0069c540              
0069c542              class MediaDesc* ecx_9 = *(uint32_t*)m_data;
0069c542              
0069c546              if (ecx_9 != 0)
0069c548                  ecx_9->vtable->Serialize(arg3);
0069c548              
0069c556              if ((((int8_t)(arg3->m_flags >> 2)) & 1) != 0)
0069c556                  break;
0069c556              
0069c55e              m_data = &m_data[1];
0069c55e              
0069c566              if (m_data == &ebp->m_data[ebp->m_num])
0069c56d                  return;
0069c504          }
0069c504          
0069c57b          if ((arg2 != 0 && ebp->m_num > 0))
0069c57b          {
0069c57f              ebp->m_num = 0;
0069c586              SmartArray<MediaDesc *,1>::shrink(ebp);
0069c57b          }
0069c4ef      }
0069c470  }

0069c591                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0069c5a0  void* __thiscall StateDesc::`scalar deleting destructor'(class StateDesc* this, uint32_t arg2)

0069c5a0  {
0069c5a3      this->vtable = 0x800e44;
0069c5a9      StateDesc::CleanupMedia(this);
0069c5a9      
0069c5be      if ((this->m_media.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
0069c5c7          operator delete[](this->m_media.m_data);
0069c5c7      
0069c5d2      PropertyCollection::~PropertyCollection(&this->m_properties);
0069c5d2      
0069c5dc      if ((arg2 & 1) != 0)
0069c5df          operator delete(this);
0069c5df      
0069c5ea      return this;
0069c5a0  }

0069c5ed                                         90 90 90                                                               ...

0069c5f0  void __thiscall StateDesc::Serialize(class StateDesc* this, class Archive* arg2)

0069c5f0  {
0069c5f3      class Archive* esi = arg2;
0069c606      uint32_t ebp = Archive::GetVersionByToken(esi, 0x55494c20);
0069c608      uint32_t eax;
0069c608      eax = esi->m_flags;
0069c608      
0069c613      if (((1 & eax) != 0 && ebp == 0))
0069c613      {
0069c617          Archive::RaiseError(esi);
0069c620          return;
0069c613      }
0069c613      
0069c627      Archive::CheckAlignment(esi, 4);
0069c630      uint8_t* eax_1 = Archive::GetBytes(esi, 4);
0069c630      
0069c637      if (eax_1 != 0)
0069c637      {
0069c63c          if ((esi->m_flags & 1) == 0)
0069c647              this->m_stateID = *(uint32_t*)eax_1;
0069c63c          else
0069c641              *(uint32_t*)eax_1 = this->m_stateID;
0069c637      }
0069c637      
0069c64f      Serializer::SerializeObject(&this->m_bPassToChildren, esi);
0069c64f      
0069c659      if (ebp == 0)
0069c659      {
0069c663          Archive::CheckAlignment(esi, 4);
0069c66c          uint8_t* eax_3 = Archive::GetBytes(esi, 4);
0069c66c          
0069c673          if (eax_3 != 0)
0069c673          {
0069c678              if ((esi->m_flags & 1) == 0)
0069c683                  this->m_x = *(uint32_t*)eax_3;
0069c678              else
0069c67d                  *(uint32_t*)eax_3 = this->m_x;
0069c673          }
0069c673          
0069c68a          Archive::CheckAlignment(esi, 4);
0069c693          uint8_t* eax_4 = Archive::GetBytes(esi, 4);
0069c693          
0069c69a          if (eax_4 != 0)
0069c69a          {
0069c69f              if ((esi->m_flags & 1) == 0)
0069c6aa                  this->m_y = *(uint32_t*)eax_4;
0069c69f              else
0069c6a4                  *(uint32_t*)eax_4 = this->m_y;
0069c69a          }
0069c69a          
0069c6b1          Archive::CheckAlignment(esi, 4);
0069c6ba          uint8_t* eax_5 = Archive::GetBytes(esi, 4);
0069c6ba          
0069c6c1          if (eax_5 != 0)
0069c6c1          {
0069c6c6              if ((esi->m_flags & 1) == 0)
0069c6d1                  this->m_width = *(uint32_t*)eax_5;
0069c6c6              else
0069c6cb                  *(uint32_t*)eax_5 = this->m_width;
0069c6c1          }
0069c6c1          
0069c6d8          Archive::CheckAlignment(esi, 4);
0069c6e1          uint8_t* eax_6 = Archive::GetBytes(esi, 4);
0069c6e1          
0069c6e8          if (eax_6 != 0)
0069c6e8          {
0069c6ed              if ((esi->m_flags & 1) == 0)
0069c6f8                  this->m_height = *(uint32_t*)eax_6;
0069c6ed              else
0069c6f2                  *(uint32_t*)eax_6 = this->m_height;
0069c6e8          }
0069c6e8          
0069c6ff          Archive::CheckAlignment(esi, 4);
0069c708          int32_t* eax_7 = Archive::GetBytes(esi, 4);
0069c708          
0069c70f          if (eax_7 != 0)
0069c70f          {
0069c714              if ((esi->m_flags & 1) == 0)
0069c71f                  this->m_zLevel = *(uint32_t*)eax_7;
0069c714              else
0069c719                  *(uint32_t*)eax_7 = this->m_zLevel;
0069c70f          }
0069c70f          
0069c728          Serializer::SerializeObject(&arg2, esi);
0069c736          this->m_uiIncorporationFlags |= 0x3e;
0069c659      }
0069c659      else if (ebp > 0)
0069c73b      {
0069c741          Archive::CheckAlignment(esi, 4);
0069c74a          uint32_t* eax_10 = Archive::GetBytes(esi, 4);
0069c74a          
0069c751          if (eax_10 != 0)
0069c751          {
0069c756              if ((esi->m_flags & 1) == 0)
0069c761                  this->m_uiIncorporationFlags = *(uint32_t*)eax_10;
0069c756              else
0069c75b                  *(uint32_t*)eax_10 = this->m_uiIncorporationFlags;
0069c751          }
0069c73b      }
0069c73b      
0069c768      int32_t* eax_11;
0069c768      class Archive* ecx_24;
0069c768      class SmartArray<MediaDesc *,1>* edx_8;
0069c768      eax_11 = PropertyCollection::Serialize(&this->m_properties, esi);
0069c76d      class Archive* var_14_3 = esi;
0069c778      class SmartArray<MediaDesc *,1>* var_18_2 = &this->m_media;
0069c779      class Archive** var_1c = &arg2;
0069c77a      SB_Container<SB_TypeAlloc<MediaDescResolver,SB_Default>,&SB_DEFAULT_ITEM_NAME>::Serialize(eax_11, edx_8, ecx_24);
0069c5f0  }

0069c789                             90 90 90 90 90 90 90                                                           .......

0069c790  uint8_t __thiscall StateDesc::InqProperty(class StateDesc const* this, uint32_t const arg2, class BaseProperty* arg3)

0069c790  {
0069c798      arg2 = arg2;
0069c7aa      return HashTable<unsigned long,BaseProperty,1>::find(&this->m_properties.m_hashProperties.vtable, &arg2, arg3);
0069c790  }

0069c7ad                                         90 90 90                                                               ...

0069c7b0  uint8_t __thiscall StateDesc::FromFileNode(class StateDesc* this, class PFileNode const* arg2)

0069c7b0  {
0069c7b6      class PFileNode* __return_4 = arg2;
0069c7b6      
0069c7c3      if (__return_4 == 0)
0069c7c3      {
0069c943          int32_t eax;
0069c943          eax = 0;
0069c949          return 0;
0069c7c3      }
0069c7c3      
0069c7cb      int32_t ebx;
0069c7cb      ebx = 1;
0069c7cd      uint32_t i = PFileNode::GetNumSubNodes(__return_4);
0069c7d8      char* __return_2 = nullptr;
0069c7e0      char* __return;
0069c7e0      
0069c7e0      if (i > 0)
0069c7e0      {
0069c91c          do
0069c91c          {
0069c7f4              struct PFileNode::VTable* vtable = __return_4->vtable;
0069c7f6              __return = __return_2;
0069c7f9              class PFileNode* eax_1 = vtable->GetSubNode(__return);
0069c7f9              
0069c800              if (eax_1 != 0)
0069c800              {
0069c80a                  struct StateDesc::VTable* vtable_2 = this->vtable;
0069c810                  char var_1d;
0069c810                  __return = &var_1d;
0069c812                  var_1d = 0;
0069c812                  
0069c81c                  if (vtable_2->HandleNode(eax_1, __return) == 0)
0069c81e                      ebx = 0;
0069c81e                  
0069c826                  if (var_1d == 0)
0069c826                  {
0069c82c                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069c831                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0069c838                      __return = &PStringBase<char>::s_NullBuffer_1[-1];
0069c839                      InterlockedIncrement(__return);
0069c843                      __return = &PStringBase<char>::s_NullBuffer_2;
0069c846                      PFileNode::GetNameAsPString(eax_1, __return);
0069c84b                      __return = "] ignored";
0069c854                      void* var_10;
0069c854                      PStringBase<char>::PStringBase<char>(&var_10, __return);
0069c85d                      __return = &PStringBase<char>::s_NullBuffer_2;
0069c873                      class PStringBase<char> __return_1;
0069c873                      void* var_8;
0069c873                      PStringBase<char>::operator+(PStringBase<char>::PStringBase<char>(&var_8, "Unknown Keyword: ["), &__return_1, __return);
0069c87c                      int32_t* esi_1 = ((char*)var_8 - 0x14);
0069c882                      __return = &esi_1[1];
0069c883                      int32_t eax_5;
0069c883                      char* __return_3;
0069c883                      eax_5 = InterlockedDecrement(__return);
0069c883                      
0069c88b                      if ((eax_5 == 0 && esi_1 != 0))
0069c88b                      {
0069c88d                          int32_t edx_1 = *(uint32_t*)esi_1;
0069c88f                          __return = 1;
0069c893                          __return_3 = *(uint32_t*)edx_1(__return);
0069c88b                      }
0069c88b                      
0069c895                      __return = __return_3;
0069c8a2                      PStringBase<char>::operator+(&__return_1, &__return, &var_10);
0069c8a8                      PFileNode::ReportError(eax_1, __return);
0069c8b1                      int32_t* esi_3 = (__return_1 - 0x14);
0069c8ba                      __return = &esi_3[1];
0069c8ba                      
0069c8c3                      if ((InterlockedDecrement(__return) == 0 && esi_3 != 0))
0069c8c3                      {
0069c8c5                          int32_t eax_7 = *(uint32_t*)esi_3;
0069c8c7                          __return = 1;
0069c8cb                          *(uint32_t*)eax_7(__return);
0069c8c3                      }
0069c8c3                      
0069c8d1                      int32_t* esi_5 = ((char*)var_10 - 0x14);
0069c8d7                      __return = &esi_5[1];
0069c8d7                      
0069c8e0                      if ((InterlockedDecrement(__return) == 0 && esi_5 != 0))
0069c8e0                      {
0069c8e2                          int32_t edx_3 = *(uint32_t*)esi_5;
0069c8e4                          __return = 1;
0069c8e8                          *(uint32_t*)edx_3(__return);
0069c8e0                      }
0069c8e0                      
0069c8ee                      void* __offset(PSRefBufferCharData<char>, -0x14) esi_7 = &PStringBase<char>::s_NullBuffer_2->m_data[0xffffffec];
0069c8f4                      __return = ((char*)esi_7 + 4);
0069c8f5                      ebx = 0;
0069c8f5                      
0069c8ff                      if ((InterlockedDecrement(__return) == 0 && esi_7 != 0))
0069c8ff                      {
0069c901                          int32_t edx_4 = *(int32_t*)((char*)ADJ(esi_7) + -0x14);
0069c903                          __return = 1;
0069c907                          *(uint32_t*)edx_4(__return);
0069c8ff                      }
0069c8ff                      
0069c909                      __return_4 = arg2;
0069c826                  }
0069c800              }
0069c800              
0069c918              __return_2 = &__return_2[1];
0069c91c          } while (&__return_2[1] < i);
0069c7e0      }
0069c7e0      
0069c926      struct StateDesc::VTable* vtable_1 = this->vtable;
0069c928      __return = __return_4;
0069c928      
0069c930      if (vtable_1->CheckFFN(__return) == 0)
0069c932          ebx = 0;
0069c932      
0069c93d      return ebx;
0069c7b0  }

0069c94c                                      90 90 90 90                                                              ....

0069c950  uint8_t __thiscall StateDesc::LoadMedia(class StateDesc* this, class PFileNode const* arg2)

0069c950  {
0069c951      class PFileNode* esi = arg2;
0069c95a      class MediaDesc* eax;
0069c95a      
0069c95a      if (esi != 0)
0069c95a      {
0069c95c          class PStringBase<char> var_c = esi;
0069c95d          eax = MediaDesc::CreateFromFileNode(var_c);
0069c967          arg2 = eax;
0069c967          
0069c96b          if (eax != 0)
0069c96b          {
0069c971              var_c = &arg2;
0069c978              uint8_t eax_1;
0069c978              class PStringBase<char> ecx_1;
0069c978              eax_1 = SmartArray<unsigned long,1>::AddToEnd(&this->m_media, var_c);
0069c978              
0069c97f              if (eax_1 != 0)
0069c9a2                  return 1;
0069c9a2              
0069c981              var_c = ecx_1;
0069c989              PStringBase<char>::PStringBase<char>(&var_c, "StateDesc::LoadMedia, failed add…");
0069c98f              PFileNode::ReportError(esi, var_c);
0069c96b          }
0069c95a      }
0069c95a      
0069c997      eax = 0;
0069c99b      return 0;
0069c950  }

0069c9a5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0069c9b0  void __thiscall StateDesc::ConcatenateMedia(class StateDesc* this, class StateDesc const* arg2)

0069c9b0  {
0069c9b0      class StateDesc* this_1 = this;
0069c9b7      class StateDesc* this_2 = this;
0069c9bb      class StateDesc* this_3 = this_2;
0069c9bb      
0069c9bf      if (this_2 != arg2)
0069c9bf      {
0069c9c8          int32_t ebx_1 = 0;
0069c9c8          
0069c9cc          if (arg2->m_media.m_num > 0)
0069c9cc          {
0069c9db              while (true)
0069c9db              {
0069c9db                  class MediaDesc* eax_3 = arg2->m_media.m_data[ebx_1];
0069c9db                  
0069c9e0                  if (eax_3 != 0)
0069c9e0                  {
0069c9e3                      class MediaDesc* eax_4 = MediaDesc::CreateMediaType(eax_3);
0069c9e3                      
0069c9ef                      if (eax_4 != 0)
0069c9ef                      {
0069ca03                          int32_t eax_6 = (this_2->m_media.m_sizeAndDeallocate & 0x7fffffff);
0069ca0a                          uint8_t eax_9;
0069ca0a                          
0069ca0a                          if (this_2->m_media.m_num >= eax_6)
0069ca18                              eax_9 = SmartArray<unsigned long,1>::grow(&this_2->m_media, SmartArray<unsigned long,1>::get_new_size(&this_2->m_media, (eax_6 + 1)));
0069ca18                          
0069ca1f                          if ((this_2->m_media.m_num < eax_6 || eax_9 != 0))
0069ca1f                          {
0069c9fd                              this_2->m_media.m_data[this_2->m_media.m_num] = eax_4;
0069c9fd                              this_2->m_media.m_num += 1;
0069ca1f                          }
0069c9ef                      }
0069c9e0                  }
0069c9e0                  
0069ca32                  ebx_1 += 1;
0069ca32                  
0069ca35                  if (ebx_1 >= arg2->m_media.m_num)
0069ca35                      break;
0069ca35                  
0069c9d1                  this_2 = this_3;
0069c9db              }
0069c9cc          }
0069c9bf      }
0069c9b0  }

0069ca3f                                                                                               90                                 .

0069ca40  uint8_t __thiscall StateDesc::ContainsProperty(class StateDesc const* this, uint32_t const arg2)

0069ca40  {
0069ca43      /* tailcall */
0069ca43      return PropertyCollection::ContainsProperty(&this->m_properties, arg2);
0069ca40  }

0069ca48                          90 90 90 90 90 90 90 90                                                          ........

0069ca50  void __thiscall StateDesc::SetMediaImage(class StateDesc* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)

0069ca50  {
0069ca50      class StateDesc* this_1 = this;
0069ca57      void* eax = operator new(0x10);
0069ca57      
0069ca61      if (eax != 0)
0069ca61      {
0069ca6b          void* eax_1 = MD_Data_Image::MD_Data_Image(eax);
0069ca6b          
0069ca74          if (eax_1 != 0)
0069ca74          {
0069ca7e              *(uint32_t*)((char*)eax_1 + 8) = arg2;
0069ca85              *(uint32_t*)((char*)eax_1 + 0xc) = arg3;
0069ca85              
0069ca9b              if (this->m_media.m_num > 0)
0069ca9b              {
0069ca9d                  int32_t i = 0;
0069ca9d                  
0069caaf                  do
0069caaf                  {
0069ca92                      this->m_media.m_data[i] = 0;
0069caac                      i += 1;
0069caaf                  } while (i < this->m_media.m_num);
0069ca9b              }
0069ca9b              
0069ca92              this->m_media.m_num = 0;
0069cace              int32_t eax_6 = (this->m_media.m_sizeAndDeallocate & 0x7fffffff);
0069cad5              uint8_t eax_9;
0069cad5              
0069cad5              if (this->m_media.m_num >= eax_6)
0069cae3                  eax_9 = SmartArray<unsigned long,1>::grow(&this->m_media.m_data, SmartArray<unsigned long,1>::get_new_size(&this->m_media, (eax_6 + 1)));
0069cae3              
0069caea              if ((this->m_media.m_num < eax_6 || eax_9 != 0))
0069caea              {
0069cac8                  this->m_media.m_data[this->m_media.m_num] = eax_1;
0069cac8                  this->m_media.m_num += 1;
0069caea              }
0069ca74          }
0069ca61      }
0069ca50  }

0069cafd                                                                                         90 90 90                               ...

0069cb00  uint8_t __thiscall StateDesc::HandleNode(class StateDesc* this, class PFileNode const* arg2, uint8_t* arg3)

0069cb00  {
0069cb12      if (arg2 == 0)
0069cb12      {
0069cc8b          int32_t eax;
0069cc8b          eax = 0;
0069cc91          return 0;
0069cb12      }
0069cb12      
0069cb1f      int32_t ebx;
0069cb1f      ebx = 1;
0069cb21      class PStringBase<char> m_charbuffer = 0x8f9188;
0069cb28      *(uint8_t*)arg3 = 1;
0069cb34      class PFileNode* var_90;
0069cb34      
0069cb34      if (PFileNode::IsKeyword(arg2, m_charbuffer) == 0)
0069cb34      {
0069cb84          m_charbuffer = 0x8f915c;
0069cb84          
0069cb92          if (PFileNode::IsKeyword(arg2, m_charbuffer) == 0)
0069cb92          {
0069cbe7              m_charbuffer = 0x8f9164;
0069cbe7              
0069cbf3              if (PFileNode::IsKeyword(arg2, m_charbuffer) == 0)
0069cbf3              {
0069cc4e                  m_charbuffer = 0x8f9148;
0069cc4e                  
0069cc5c                  if (PFileNode::IsKeyword(arg2, m_charbuffer) == 0)
0069cc78                      *(uint8_t*)arg3 = 0;
0069cc5c                  else
0069cc5c                  {
0069cc5e                      m_charbuffer = arg2;
0069cc5e                      
0069cc68                      if (StateDesc::LoadMedia(this, m_charbuffer) == 0)
0069cc75                          return 0;
0069cc5c                  }
0069cc5c                  
0069cc85                  return 1;
0069cbf3              }
0069cbf3              
0069cbf9              void var_78;
0069cbf9              PropertyCollection::PropertyCollection(&var_78);
0069cbfe              m_charbuffer = arg2;
0069cbfe              
0069cc0a              if (PropertyCollection::FromFileNode(&var_78, m_charbuffer) == 0)
0069cc0c                  ebx = 0;
0069cc0c              
0069cc0e              m_charbuffer = 1;
0069cc14              var_90 = &var_78;
0069cc18              uint8_t eax_11;
0069cc18              class PStringBase<char> m_charbuffer_1;
0069cc18              eax_11 = PropertyCollection::UpdateCollection(&this->m_properties, var_90, m_charbuffer.m_charbuffer);
0069cc18              
0069cc1f              if (eax_11 == 0)
0069cc1f              {
0069cc21                  m_charbuffer = m_charbuffer_1;
0069cc24                  var_90 = "StateDesc::HandleNode, error upd…";
0069cc29                  PStringBase<char>::PStringBase<char>(&m_charbuffer, var_90);
0069cc2e                  var_90 = arg2;
0069cc2f                  PFileNode::ReportError(var_90, m_charbuffer);
0069cc37                  ebx = 0;
0069cc1f              }
0069cc1f              
0069cc3d              PropertyCollection::~PropertyCollection(&var_78);
0069cc4b              return ebx;
0069cb92          }
0069cb92          
0069cb94          class PFileNode* eax_7;
0069cb94          class PFileNode* ecx_7;
0069cb94          eax_7 = PFileNode::GetLeaf(arg2);
0069cb94          
0069cb9b          if (eax_7 != 0)
0069cb9b          {
0069cba0              m_charbuffer = &this->m_bPassToChildren;
0069cba3              uint8_t eax_8;
0069cba3              eax_8 = PFileNode::GetNameAsBool(eax_7, m_charbuffer);
0069cba3              
0069cbaa              if (eax_8 != 0)
0069cbaa              {
0069cbd7                  this->m_uiIncorporationFlags |= 1;
0069cbe4                  return 1;
0069cbaa              }
0069cb9b          }
0069cb9b          
0069cbb2          m_charbuffer = KW_PASSTOCHILDREN.m_charbuffer;
0069cbb3          var_90 = ecx_7;
0069cbbb          PStringBase<char>::PStringBase<char>(&var_90, "StateDesc::HandleNode, %s expect…");
0069cbc1          PFileNode::ReportError(arg2, var_90);
0069cb34      }
0069cb34      else
0069cb34      {
0069cb36          class PFileNode* eax_2;
0069cb36          class PFileNode* ecx_2;
0069cb36          uint32_t edx;
0069cb36          eax_2 = PFileNode::GetOnlyChild(arg2);
0069cb36          
0069cb3f          if (eax_2 != 0)
0069cb3f          {
0069cb54              m_charbuffer = &this->m_stateID;
0069cb55              var_90 = 0x14;
0069cb57              class PFileNode* var_94_1 = eax_2;
0069cb57              
0069cb62              if (FileNodeUtils::GetNameAsEnum(eax_2, edx, &this->m_stateID) != 0)
0069cb62              {
0069cb64                  m_charbuffer = 0x8f90f8;
0069cb75                  this->m_bIsCode = PFileNode::FindSubNode(eax_2, m_charbuffer) != 0;
0069cb78                  class PFileNode* eax_5;
0069cb78                  eax_5 = 1;
0069cb81                  return 1;
0069cb62              }
0069cb3f          }
0069cb3f          else
0069cb3f          {
0069cb46              m_charbuffer = KW_STATEID.m_charbuffer;
0069cb47              var_90 = ecx_2;
0069cbbb              PStringBase<char>::PStringBase<char>(&var_90, "StateDesc::HandleNode, %s expect…");
0069cbc1              PFileNode::ReportError(arg2, var_90);
0069cb3f          }
0069cb34      }
0069cbd4      return 0;
0069cb00  }

0069cc94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0069cca0  uint8_t __thiscall StateDesc::Incorporate(class StateDesc* this, class StateDesc const* arg2)

0069cca0  {
0069cca9      class StateDesc* this_1 = this;
0069ccab      this_1->m_uiIncorporationFlags |= arg2->m_uiIncorporationFlags;
0069ccab      
0069ccb2      if ((arg2->m_uiIncorporationFlags & 1) != 0)
0069ccb2      {
0069ccb4          this = arg2->m_bPassToChildren;
0069ccb7          this_1->m_bPassToChildren = this;
0069ccb2      }
0069ccb2      
0069ccbe      if ((arg2->m_uiIncorporationFlags & 2) != 0)
0069ccc3          this_1->m_x = arg2->m_x;
0069ccc3      
0069ccca      if ((arg2->m_uiIncorporationFlags & 4) != 0)
0069cccf          this_1->m_y = arg2->m_y;
0069cccf      
0069ccd6      if ((arg2->m_uiIncorporationFlags & 8) != 0)
0069ccdb          this_1->m_width = arg2->m_width;
0069ccdb      
0069cce2      if ((arg2->m_uiIncorporationFlags & 0x10) != 0)
0069cce7          this_1->m_height = arg2->m_height;
0069cce7      
0069ccee      if ((arg2->m_uiIncorporationFlags & 0x20) != 0)
0069ccf3          this_1->m_zLevel = arg2->m_zLevel;
0069ccf3      
0069ccf9      StateDesc::ConcatenateMedia(this_1, arg2);
0069cd07      PropertyCollection::UpdateCollection(&this_1->m_properties, &arg2->m_properties, 1);
0069cd0d      int32_t eax_3;
0069cd0d      eax_3 = 1;
0069cd10      return 1;
0069cca0  }

0069cd13                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069cd20  class StateDesc& __thiscall StateDesc::operator=(class StateDesc* this, class StateDesc const& arg2)

0069cd20  {
0069cd2a      if (this != arg2)
0069cd2a      {
0069cd2f          this->m_uiIncorporationFlags = arg2->m_uiIncorporationFlags;
0069cd35          this->m_stateID = arg2->m_stateID;
0069cd3b          this->m_bIsCode = arg2->m_bIsCode;
0069cd3e          uint32_t eax_1;
0069cd3e          eax_1 = arg2->m_bPassToChildren;
0069cd41          this->m_bPassToChildren = eax_1;
0069cd47          this->m_x = arg2->m_x;
0069cd4d          this->m_y = arg2->m_y;
0069cd53          this->m_width = arg2->m_width;
0069cd59          this->m_height = arg2->m_height;
0069cd66          this->m_zLevel = arg2->m_zLevel;
0069cd69          PropertyCollection::operator=(&this->m_properties, &arg2->m_properties);
0069cd70          StateDesc::CleanupMedia(this);
0069cd78          StateDesc::ConcatenateMedia(this, arg2);
0069cd2a      }
0069cd2a      
0069cd81      return this;
0069cd20  }

0069cd84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0069cd90  void __thiscall StateDesc::StateDesc(class StateDesc* this, class StateDesc const* arg2)

0069cd90  {
0069cd96      this->vtable = 0x800e44;
0069cd9c      PropertyCollection::PropertyCollection(&this->m_properties);
0069cda3      this->m_media.m_data = 0;
0069cda9      this->m_media.m_sizeAndDeallocate = 0;
0069cdaf      this->m_media.m_num = 0;
0069cdbc      StateDesc::operator=(this, arg2);
0069cd90  }

0069cdc7                       90 90 90 90 90 90 90 90 90                                                         .........

0069cdd0  void __fastcall MD_Data_Image::MD_Data_Image(class MD_Data_Image* this)

0069cdd0  {
0069cdd5      MediaDesc::MediaDesc(this, 5);
0069cdda      this->vtable = 0x800f90;
0069cde5      this->m_file.id = INVALID_DID.id;
0069cde8      this->m_drawMode = 1;
0069cdd0  }

0069cdf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069ce00  float MediaDesc::GetDuration(class MediaDesc const* this @ ecx) __pure

0069ce00  {
0069ce06      return ((int32_t)((long double)0f));
0069ce00  }

0069ce07                       90 90 90 90 90 90 90 90 90                                                         .........

0069ce10  void __thiscall MD_Data_Image::MD_Data_Image(class MD_Data_Image* this, class MD_Data_Image const* arg2)

0069ce10  {
0069ce14      MediaDesc::MediaDesc(this);
0069ce1f      this->vtable = 0x800f90;
0069ce2a      this->m_file.id = INVALID_DID.id;
0069ce2d      this->m_drawMode = 1;
0069ce2d      
0069ce34      if (this != arg2)
0069ce34      {
0069ce39          MediaDesc::operator=(this, arg2);
0069ce41          this->m_file.id = arg2->m_file.id;
0069ce47          this->m_drawMode = arg2->m_drawMode;
0069ce34      }
0069ce10  }

0069ce51                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0069ce60  void __thiscall MD_Data_Image::Serialize(class MD_Data_Image* this, class Archive* arg2)

0069ce60  {
0069ce69      FileNodeName_UInt32::Serialize(this, arg2);
0069ce72      Archive::CheckAlignment(arg2, 4);
0069ce7b      uint8_t* eax = Archive::GetBytes(arg2, 4);
0069ce7b      
0069ce82      if (eax != 0)
0069ce82      {
0069ce88          if ((arg2->m_flags & 1) == 0)
0069ce93              this->m_file.id = *(uint32_t*)eax;
0069ce88          else
0069ce8d              *(uint32_t*)eax = this->m_file.id;
0069ce82      }
0069ce82      
0069ce9a      Archive::CheckAlignment(arg2, 4);
0069cea3      uint32_t* eax_1 = Archive::GetBytes(arg2, 4);
0069cea3      
0069ceaa      if (eax_1 != 0)
0069ceaa      {
0069ceb0          if ((arg2->m_flags & 1) != 0)
0069ceb0          {
0069ceb6              *(uint32_t*)eax_1 = this->m_drawMode;
0069ceb9              return;
0069ceb0          }
0069ceb0          
0069cebe          this->m_drawMode = *(uint32_t*)eax_1;
0069ceaa      }
0069ce60  }

0069cec6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0069ced0  void MD_Data_Movie::GetSubDataIDs(class MD_Data_Movie const* this @ ecx, class QualifiedDataIDArray* arg2)

0069ced0  {
0069ced0      /* tailcall */
0069ced0      return NoticeHandler::RecvNotice_WorldName(this, arg2);
0069ced0  }

0069ced5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0069cee0  void __fastcall MD_Data_Movie::MD_Data_Movie(class MD_Data_Movie* this)

0069cee0  {
0069cee5      MediaDesc::MediaDesc(this, 1);
0069ceea      this->vtable = 0x801028;
0069cef0      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069cefb      this->m_strFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0069cefe      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0069cf06      this->m_StretchToFullScreen = 0;
0069cf09      this->m_pMovieTheatre = nullptr;
0069cee0  }


0069cf10  class MD_Data_Movie& __thiscall MD_Data_Movie::operator=(class MD_Data_Movie* this, class MD_Data_Movie const& arg2)

0069cf10  {
0069cf1a      if (this != arg2)
0069cf1a      {
0069cf1d          MediaDesc::operator=(this, arg2);
0069cf22          class PSRefBufferCharData<char>* m_charbuffer = this->m_strFileName.m_charbuffer;
0069cf22          
0069cf28          if (m_charbuffer != arg2->m_strFileName.m_charbuffer)
0069cf28          {
0069cf3e              if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0069cf46                  *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0069cf46              
0069cf48              class PSRefBufferCharData<char>* m_charbuffer_1 = arg2->m_strFileName.m_charbuffer;
0069cf4b              this->m_strFileName.m_charbuffer = m_charbuffer_1;
0069cf52              InterlockedIncrement(&m_charbuffer_1[-1]);
0069cf28          }
0069cf28          
0069cf59          class MovieTheatre* m_pMovieTheatre = this->m_pMovieTheatre;
0069cf5e          m_charbuffer = arg2->m_StretchToFullScreen;
0069cf61          this->m_StretchToFullScreen = m_charbuffer;
0069cf61          
0069cf64          if (m_pMovieTheatre != 0)
0069cf64          {
0069cf66              uint32_t m_cRef = m_pMovieTheatre->m_cRef;
0069cf66              m_pMovieTheatre->m_cRef -= 1;
0069cf66              
0069cf69              if (m_cRef == 1)
0069cf6b                  m_pMovieTheatre->vtable->__vecDelDtor(1);
0069cf6b              
0069cf71              this->m_pMovieTheatre = nullptr;
0069cf64          }
0069cf64          
0069cf78          class MovieTheatre* m_pMovieTheatre_1 = arg2->m_pMovieTheatre;
0069cf7d          this->m_pMovieTheatre = m_pMovieTheatre_1;
0069cf7d          
0069cf80          if (m_pMovieTheatre_1 != 0)
0069cf82              m_pMovieTheatre_1->m_cRef += 1;
0069cf1a      }
0069cf1a      
0069cf89      return this;
0069cf10  }

0069cf8c                                      90 90 90 90                                                              ....

0069cf90  void* __thiscall MD_Data_Movie::`scalar deleting destructor'(class MD_Data_Movie* this, uint32_t arg2)

0069cf90  {
0069cf93      class MovieTheatre* m_pMovieTheatre = this->m_pMovieTheatre;
0069cf98      this->vtable = 0x801028;
0069cf98      
0069cf9e      if (m_pMovieTheatre != 0)
0069cf9e      {
0069cfa0          uint32_t m_cRef = m_pMovieTheatre->m_cRef;
0069cfa0          m_pMovieTheatre->m_cRef -= 1;
0069cfa0          
0069cfa3          if (m_cRef == 1)
0069cfa5              m_pMovieTheatre->vtable->__vecDelDtor(1);
0069cfa5          
0069cfab          this->m_pMovieTheatre = nullptr;
0069cf9e      }
0069cf9e      
0069cfb6      void* __offset(PSRefBufferCharData<char>, -0x14) edi_1 = (this->m_strFileName.m_charbuffer - 0x14);
0069cfb6      
0069cfc9      if ((InterlockedDecrement(((char*)edi_1 + 4)) == 0 && edi_1 != 0))
0069cfd1          *(uint32_t*)*(int32_t*)((char*)ADJ(edi_1) + -0x14)(1);
0069cfd1      
0069cfd5      MediaDesc::~MediaDesc(this);
0069cfd5      
0069cfe0      if ((arg2 & 1) != 0)
0069cfe3          operator delete(this);
0069cfe3      
0069cfee      return this;
0069cf90  }

0069cff1                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0069d000  void __thiscall MD_Data_Movie::MD_Data_Movie(class MD_Data_Movie* this, class MD_Data_Movie const* arg2)

0069d000  {
0069d003      MediaDesc::MediaDesc(this);
0069d008      this->vtable = 0x801028;
0069d00e      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069d019      this->m_strFileName.m_charbuffer = PStringBase<char>::s_NullBuffer_1;
0069d01c      InterlockedIncrement(((char*)PStringBase<char>::s_NullBuffer_1 - 0x10));
0069d02b      this->m_StretchToFullScreen = 0;
0069d02e      this->m_pMovieTheatre = nullptr;
0069d031      MD_Data_Movie::operator=(this, arg2);
0069d000  }

0069d03c                                                                                      90 90 90 90                              ....

0069d040  uint8_t __thiscall MD_Data_Movie::Update(class MD_Data_Movie* this, class UIElement* arg2)

0069d040  {
0069d049      class MovieTheatre* eax_1;
0069d049      
0069d049      if ((this->m_pMovieTheatre == 0 && MovieTheatre::CreateTheatreForMovie(&arg2, &this->m_strFileName, 0, arg2, &this->m_pMovieTheatre)->vtable < 0))
0069d049      {
0069d06a          eax_1 = 1;
0069d06d          return 1;
0069d049      }
0069d049      
0069d070      class MovieTheatre* m_pMovieTheatre = this->m_pMovieTheatre;
0069d070      
0069d075      if (m_pMovieTheatre == 0)
0069d075      {
0069d0a2          eax_1 = 0;
0069d0a6          return 0;
0069d075      }
0069d075      
0069d07c      int32_t ebx;
0069d07c      ebx = MovieTheatre::HasFinishedPlaying(m_pMovieTheatre);
0069d07c      
0069d080      if (ebx != 0)
0069d080      {
0069d082          class MovieTheatre* m_pMovieTheatre_1 = this->m_pMovieTheatre;
0069d082          
0069d086          if (m_pMovieTheatre_1 != 0)
0069d086          {
0069d088              uint32_t m_cRef = m_pMovieTheatre_1->m_cRef;
0069d088              m_pMovieTheatre_1->m_cRef -= 1;
0069d088              
0069d08b              if (m_cRef == 1)
0069d08d                  m_pMovieTheatre_1->vtable->__vecDelDtor(1);
0069d08d              
0069d046              this->m_pMovieTheatre = nullptr;
0069d086          }
0069d080      }
0069d080      
0069d09d      return ebx;
0069d040  }

0069d0a9                             90 90 90 90 90 90 90                                                           .......

0069d0b0  void __thiscall MD_Data_Movie::Serialize(class MD_Data_Movie* this, class Archive* arg2)

0069d0b0  {
0069d0b9      FileNodeName_UInt32::Serialize(this, arg2);
0069d0c2      PStringBase<char>::Serialize(&this->m_strFileName, arg2);
0069d0cc      Serializer::SerializeObject(&this->m_StretchToFullScreen, arg2);
0069d0b0  }

0069d0d9                                                                             90 90 90 90 90 90 90                           .......

0069d0e0  uint8_t __thiscall MD_Data_Movie::ToFileNode(class MD_Data_Movie const* this, class PFileNode* arg2)

0069d0e0  {
0069d0ec      class PFileNode* eax;
0069d0ec      
0069d0ec      if ((arg2 != 0 && MediaDesc::ToFileNode(this, arg2) != 0))
0069d0ec      {
0069d106          class MD_Data_Movie* this_1 = this;
0069d11b          InterlockedIncrement(&KW_NO_DB_FILE.m_charbuffer[-1]);
0069d11f          int32_t ecx_2;
0069d11f          eax = PFileNode::MakeSubNode(arg2, KW_NO_DB_FILE.m_charbuffer);
0069d11f          
0069d128          if (eax != 0)
0069d128          {
0069d12a              class PSRefBufferCharData<char>* m_charbuffer = this->m_strFileName.m_charbuffer;
0069d12d              int32_t var_14_3 = ecx_2;
0069d136              InterlockedIncrement(&m_charbuffer[-1]);
0069d13a              int32_t ecx_4;
0069d13a              eax = PFileNode::MakeSubNode(eax, m_charbuffer);
0069d13a              
0069d141              if (eax != 0)
0069d141              {
0069d143                  int32_t var_14_5 = ecx_4;
0069d158                  InterlockedIncrement(&KW_STRETCH_TO_FULL_SCREEN.m_charbuffer[-1]);
0069d15c                  eax = PFileNode::MakeSubNode(arg2, KW_STRETCH_TO_FULL_SCREEN.m_charbuffer);
0069d15c                  
0069d163                  if (eax != 0)
0069d163                  {
0069d168                      arg2 = this->m_StretchToFullScreen;
0069d17a                      class PFileNode* eax_2;
0069d17a                      eax_2 = PFileNode::MakeSubNodeAsBool(eax, arg2) != 0;
0069d181                      return eax_2;
0069d163                  }
0069d141              }
0069d128          }
0069d0ec      }
0069d0ec      
0069d187      eax = 0;
0069d18a      return 0;
0069d0e0  }

0069d18d                                         90 90 90                                                               ...

0069d190  uint8_t __thiscall MD_Data_Movie::FromFileNode(class MD_Data_Movie* this, class PFileNode const* arg2)

0069d190  {
0069d197      class PFileNode* edi = arg2;
0069d197      
0069d1a1      if (edi == 0)
0069d1a1      {
0069d3b5          int32_t eax;
0069d3b5          eax = 0;
0069d3bb          return 0;
0069d1a1      }
0069d1a1      
0069d1a9      int32_t ebx;
0069d1a9      ebx = 1;
0069d1ab      uint32_t eax_1 = PFileNode::GetNumSubNodes(edi);
0069d1b6      uint32_t __return_2 = 0;
0069d1b6      
0069d1be      if (eax_1 > 0)
0069d1be      {
0069d297          bool cond:2_1;
0069d297          
0069d297          do
0069d297          {
0069d1d4              struct PFileNode::VTable* vtable = edi->vtable;
0069d1d6              uint32_t __return = __return_2;
0069d1d9              class PFileNode* eax_2 = vtable->GetSubNode(__return);
0069d1d9              
0069d1e0              if (eax_2 != 0)
0069d1e0              {
0069d1e9                  __return = 0x8f9338;
0069d1e9                  
0069d1f7                  if (PFileNode::IsKeyword(eax_2, __return) == 0)
0069d1f7                  {
0069d1fd                      __return = 0x8f9340;
0069d20d                      class PFileNode* var_30;
0069d20d                      class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_3;
0069d20d                      
0069d20d                      if (PFileNode::IsKeyword(eax_2, __return) == 0)
0069d20d                      {
0069d2a9                          __return = 0x8f9344;
0069d2a9                          
0069d2b5                          if (PFileNode::IsKeyword(eax_2, __return) == 0)
0069d2b5                          {
0069d2ef                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer;
0069d2f4                              PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_2;
0069d2fb                              __return = &PStringBase<char>::s_NullBuffer_2[-1];
0069d2fc                              InterlockedIncrement(__return);
0069d306                              __return = &PStringBase<char>::s_NullBuffer_3;
0069d309                              PFileNode::GetNameAsPString(eax_2, __return);
0069d30e                              __return = "] ignored";
0069d31c                              void* var_c;
0069d31c                              __return = PStringBase<char>::PStringBase<char>(&var_c, __return);
0069d323                              var_30 = &var_c;
0069d33e                              class PStringBase<char> __return_1;
0069d33e                              PStringBase<char>::operator+(operator+(&__return_1, "Unknown Keyword: [", &PStringBase<char>::s_NullBuffer_3), &__return, var_30);
0069d343                              var_30 = eax_2;
0069d344                              PFileNode::ReportError(var_30, __return);
0069d34d                              int32_t* esi_4 = (__return_1 - 0x14);
0069d356                              __return = &esi_4[1];
0069d356                              
0069d35f                              if ((InterlockedDecrement(__return) == 0 && esi_4 != 0))
0069d35f                              {
0069d361                                  int32_t edx_4 = *(uint32_t*)esi_4;
0069d363                                  __return = 1;
0069d367                                  *(uint32_t*)edx_4(__return);
0069d35f                              }
0069d35f                              
0069d36d                              int32_t* esi_6 = ((char*)var_c - 0x14);
0069d373                              __return = &esi_6[1];
0069d373                              
0069d37c                              if ((InterlockedDecrement(__return) == 0 && esi_6 != 0))
0069d37c                              {
0069d37e                                  int32_t edx_5 = *(uint32_t*)esi_6;
0069d380                                  __return = 1;
0069d384                                  *(uint32_t*)edx_5(__return);
0069d37c                              }
0069d37c                              
0069d38a                              void* __offset(PSRefBufferCharData<char>, -0x14) esi_8 = &PStringBase<char>::s_NullBuffer_3->m_data[0xffffffec];
0069d390                              __return = ((char*)esi_8 + 4);
0069d391                              ebx = 0;
0069d391                              
0069d39f                              if ((InterlockedDecrement(__return) == 0 && esi_8 != 0))
0069d39f                              {
0069d3a5                                  int32_t edx_6 = *(int32_t*)((char*)ADJ(esi_8) + -0x14);
0069d3a7                                  __return = 1;
0069d3ab                                  *(uint32_t*)edx_6(__return);
0069d39f                              }
0069d2b5                          }
0069d2b5                          else
0069d2b5                          {
0069d2b9                              class PFileNode* eax_11;
0069d2b9                              uint32_t __return_3;
0069d2b9                              eax_11 = PFileNode::GetLeaf(eax_2);
0069d2c0                              uint8_t eax_12;
0069d2c0                              
0069d2c0                              if (eax_11 != 0)
0069d2c0                              {
0069d2c9                                  __return = &this->m_StretchToFullScreen;
0069d2cc                                  eax_12 = PFileNode::GetNameAsBool(eax_11, __return);
0069d2c0                              }
0069d2c0                              
0069d2d3                              if ((eax_11 == 0 || eax_12 == 0))
0069d2d3                              {
0069d2d5                                  __return = __return_3;
0069d2d8                                  var_30 = "MD_Data_Movie::FromFileNode, cou…";
0069d2dd                                  PStringBase<char>::PStringBase<char>(&__return, var_30);
0069d2e2                                  var_30 = eax_2;
0069d2e3                                  PFileNode::ReportError(var_30, __return);
0069d2eb                                  ebx = 0;
0069d2d3                              }
0069d2b5                          }
0069d20d                      }
0069d20d                      else
0069d20d                      {
0069d213                          class PFileNode* eax_5 = PFileNode::GetLeaf(eax_2);
0069d21a                          uint8_t eax_6;
0069d21a                          
0069d21a                          if (eax_5 != 0)
0069d21a                          {
0069d223                              __return = &this->m_strFileName;
0069d226                              eax_6 = PFileNode::GetNameAsPString(eax_5, __return);
0069d21a                          }
0069d21a                          
0069d22d                          if ((eax_5 == 0 || eax_6 == 0))
0069d22d                          {
0069d22f                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069d234                              PStringBase<char>::s_NullBuffer_3 = PStringBase<char>::s_NullBuffer_1;
0069d23b                              __return = &PStringBase<char>::s_NullBuffer_1[-1];
0069d23c                              InterlockedIncrement(__return);
0069d246                              __return = &PStringBase<char>::s_NullBuffer_3;
0069d249                              class PFileNode* ecx_8 = PFileNode::GetNameAsPString(eax_2, __return);
0069d24e                              class PSRefBufferCharData<char>* __return_4 = PStringBase<char>::s_NullBuffer_3;
0069d252                              __return = __return_4;
0069d253                              var_30 = ecx_8;
0069d25b                              PStringBase<char>::PStringBase<char>(&var_30, "MD_Data_Movie::HandleNode, %s ex…");
0069d261                              PFileNode::ReportError(eax_2, var_30);
0069d26f                              __return = &__return_4[-1];
0069d270                              ebx = 0;
0069d270                              
0069d27a                              if ((InterlockedDecrement(__return) == 0 && __return_4 != 0x14))
0069d27a                              {
0069d27c                                  int32_t edx_3 = *(int32_t*)((char*)__return_4 + -0x14);
0069d27e                                  __return = 1;
0069d282                                  *(uint32_t*)edx_3(__return);
0069d27a                              }
0069d27a                              
0069d284                              edi = arg2;
0069d22d                          }
0069d20d                      }
0069d1f7                  }
0069d1e0              }
0069d1e0              else
0069d1e2                  ebx = 0;
0069d1e2              
0069d291              cond:2_1 = (__return_2 + 1) < eax_1;
0069d293              __return_2 += 1;
0069d297          } while (cond:2_1);
0069d1be      }
0069d1be      
0069d29d      eax_1 = ebx;
0069d2a6      return eax_1;
0069d190  }

0069d3be                                                                                            90 90                                ..

0069d3c0  void __fastcall MediaDesc::MediaDesc(class MediaDesc* this)

0069d3c0  {
0069d3c2      this->vtable = 0x801118;
0069d3c8      this->m_type = 0;
0069d3c0  }


0069d3d0  void __thiscall MediaDesc::MediaDesc(class MediaDesc* this, uint32_t arg2)

0069d3d0  {
0069d3d6      this->vtable = 0x801118;
0069d3dc      this->m_type = arg2;
0069d3d0  }

0069d3e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0069d3f0  void __fastcall MediaDesc::~MediaDesc(class MediaDesc* this)

0069d3f0  {
0069d3f0      this->vtable = 0x801118;
0069d3f0  }

0069d3f7                                                                       90 90 90 90 90 90 90 90 90                         .........

0069d400  class MediaDesc& __thiscall MediaDesc::operator=(class MediaDesc* this, class MediaDesc const& arg2)

0069d400  {
0069d408      if (this != arg2)
0069d40d          this->m_type = arg2->m_type;
0069d40d      
0069d410      return this;
0069d400  }

0069d413                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069d420  class MediaDesc* MediaDesc::CreateMediaType(uint32_t arg1)

0069d420  {
0069d42a      if ((arg1 - 1) <= 0xa)
0069d430          switch (arg1)
0069d430          {
0069d50a              case 1:
0069d50a              {
0069d50a                  void* eax_19 = operator new(0x14);
0069d50a                  
0069d514                  if (eax_19 != 0)
0069d518                      /* tailcall */
0069d518                      return MD_Data_Movie::MD_Data_Movie(eax_19);
0069d50a                  break;
0069d50a              }
0069d452              case 2:
0069d452              {
0069d452                  void* eax_3 = operator new(0xc);
0069d452                  
0069d45c                  if (eax_3 != 0)
0069d464                      /* tailcall */
0069d464                      return MD_Data_Alpha::MD_Data_Alpha(eax_3);
0069d452                  break;
0069d452              }
0069d439              case 3:
0069d439              {
0069d439                  void* eax_1 = operator new(0x30);
0069d439                  
0069d443                  if (eax_1 != 0)
0069d44b                      /* tailcall */
0069d44b                      return MD_Data_Anim::MD_Data_Anim(eax_1);
0069d439                  break;
0069d439              }
0069d51f              case 4:
0069d51f              {
0069d51f                  void* eax_21 = operator new(0x14);
0069d51f                  
0069d529                  if (eax_21 != 0)
0069d52d                      /* tailcall */
0069d52d                      return MD_Data_Cursor::MD_Data_Cursor(eax_21);
0069d51f                  break;
0069d51f              }
0069d484              case 5:
0069d484              {
0069d484                  void* eax_7 = operator new(0x10);
0069d484                  
0069d48e                  if (eax_7 != 0)
0069d496                      /* tailcall */
0069d496                      return MD_Data_Image::MD_Data_Image(eax_7);
0069d484                  break;
0069d484              }
0069d4b6              case 6:
0069d4b6              {
0069d4b6                  void* eax_11 = operator new(0x10);
0069d4b6                  
0069d4c0                  if (eax_11 != 0)
0069d4c4                      /* tailcall */
0069d4c4                      return MD_Data_Jump::MD_Data_Jump(eax_11);
0069d4b6                  break;
0069d4b6              }
0069d4e0              case 7:
0069d4e0              {
0069d4e0                  void* eax_15 = operator new(0x10);
0069d4e0                  
0069d4ea                  if (eax_15 != 0)
0069d4ee                      /* tailcall */
0069d4ee                      return MD_Data_Message::MD_Data_Message(eax_15);
0069d4e0                  break;
0069d4e0              }
0069d46b              case 8:
0069d46b              {
0069d46b                  void* eax_5 = operator new(0x18);
0069d46b                  
0069d475                  if (eax_5 != 0)
0069d47d                      /* tailcall */
0069d47d                      return MD_Data_Pause::MD_Data_Pause(eax_5);
0069d46b                  break;
0069d46b              }
0069d49d              case 9:
0069d49d              {
0069d49d                  void* eax_9 = operator new(0x10);
0069d49d                  
0069d4a7                  if (eax_9 != 0)
0069d4af                      /* tailcall */
0069d4af                      return MD_Data_Sound::MD_Data_Sound(eax_9);
0069d49d                  break;
0069d49d              }
0069d4f5              case 0xa:
0069d4f5              {
0069d4f5                  void* eax_17 = operator new(0x10);
0069d4f5                  
0069d4ff                  if (eax_17 != 0)
0069d503                      /* tailcall */
0069d503                      return MD_Data_State::MD_Data_State(eax_17);
0069d4f5                  break;
0069d4f5              }
0069d4cb              case 0xb:
0069d4cb              {
0069d4cb                  void* eax_13 = operator new(0x20);
0069d4cb                  
0069d4d5                  if (eax_13 != 0)
0069d4d9                      /* tailcall */
0069d4d9                      return MD_Data_Fade::MD_Data_Fade(eax_13);
0069d4cb                  break;
0069d4cb              }
0069d430          }
0069d430      
0069d534      return 0;
0069d420  }

0069d535                                                                 8d 49 00                                               .I.
0069d538  uint32_t jump_table_69d538[0xb] = 
0069d538  {
0069d538      [0x0] =  0x0069d508
0069d53c      [0x1] =  0x0069d450
0069d540      [0x2] =  0x0069d437
0069d544      [0x3] =  0x0069d51d
0069d548      [0x4] =  0x0069d482
0069d54c      [0x5] =  0x0069d4b4
0069d550      [0x6] =  0x0069d4de
0069d554      [0x7] =  0x0069d469
0069d558      [0x8] =  0x0069d49b
0069d55c      [0x9] =  0x0069d4f3
0069d560      [0xa] =  0x0069d4c9
0069d564  }

0069d564              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0069d570  class MediaDesc* MediaDesc::CreateMediaType(class MediaDesc const* arg1)

0069d570  {
0069d584      switch ((arg1->m_type - 1))
0069d584      {
0069d67d          case 0:
0069d67d          {
0069d67d              class MD_Data_Movie* eax_19 = operator new(0x14);
0069d67d              
0069d687              if (eax_19 != 0)
0069d692                  return MD_Data_Movie::MD_Data_Movie(eax_19, arg1);
0069d67d              break;
0069d67d          }
0069d5a9          case 1:
0069d5a9          {
0069d5a9              class MD_Data_Alpha* eax_3 = operator new(0xc);
0069d5a9              
0069d5b3              if (eax_3 != 0)
0069d5c2                  return MD_Data_Alpha::MD_Data_Alpha(eax_3, arg1);
0069d5a9              break;
0069d5a9          }
0069d58d          case 2:
0069d58d          {
0069d58d              class MD_Data_Anim* eax_1 = operator new(0x30);
0069d58d              
0069d597              if (eax_1 != 0)
0069d5a6                  return MD_Data_Anim::MD_Data_Anim(eax_1, arg1);
0069d58d              break;
0069d58d          }
0069d695          case 3:
0069d695          {
0069d695              class MD_Data_Cursor* eax_21 = operator new(0x14);
0069d695              
0069d69f              if (eax_21 != 0)
0069d6aa                  return MD_Data_Cursor::MD_Data_Cursor(eax_21, arg1);
0069d695              break;
0069d695          }
0069d5e1          case 4:
0069d5e1          {
0069d5e1              class MD_Data_Image* eax_7 = operator new(0x10);
0069d5e1              
0069d5eb              if (eax_7 != 0)
0069d5fa                  return MD_Data_Image::MD_Data_Image(eax_7, arg1);
0069d5e1              break;
0069d5e1          }
0069d619          case 5:
0069d619          {
0069d619              class MD_Data_Jump* eax_11 = operator new(0x10);
0069d619              
0069d623              if (eax_11 != 0)
0069d632                  return MD_Data_Jump::MD_Data_Jump(eax_11, arg1);
0069d619              break;
0069d619          }
0069d64d          case 6:
0069d64d          {
0069d64d              class MD_Data_Message* eax_15 = operator new(0x10);
0069d64d              
0069d657              if (eax_15 != 0)
0069d662                  return MD_Data_Message::MD_Data_Message(eax_15, arg1);
0069d64d              break;
0069d64d          }
0069d5c5          case 7:
0069d5c5          {
0069d5c5              class MD_Data_Pause* eax_5 = operator new(0x18);
0069d5c5              
0069d5cf              if (eax_5 != 0)
0069d5de                  return MD_Data_Pause::MD_Data_Pause(eax_5, arg1);
0069d5c5              break;
0069d5c5          }
0069d5fd          case 8:
0069d5fd          {
0069d5fd              class MD_Data_Sound* eax_9 = operator new(0x10);
0069d5fd              
0069d607              if (eax_9 != 0)
0069d616                  return MD_Data_Sound::MD_Data_Sound(eax_9, arg1);
0069d5fd              break;
0069d5fd          }
0069d665          case 9:
0069d665          {
0069d665              class MD_Data_State* eax_17 = operator new(0x10);
0069d665              
0069d66f              if (eax_17 != 0)
0069d67a                  return MD_Data_State::MD_Data_State(eax_17, arg1);
0069d665              break;
0069d665          }
0069d635          case 0xa:
0069d635          {
0069d635              class MD_Data_Fade* eax_13 = operator new(0x20);
0069d635              
0069d63f              if (eax_13 != 0)
0069d64a                  return MD_Data_Fade::MD_Data_Fade(eax_13, arg1);
0069d635              break;
0069d635          }
0069d584      }
0069d584      
0069d6ae      return 0;
0069d570  }

0069d6af                                               90                                                                 .
0069d6b0  uint32_t jump_table_69d6b0[0xb] = 
0069d6b0  {
0069d6b0      [0x0] =  0x0069d67b
0069d6b4      [0x1] =  0x0069d5a7
0069d6b8      [0x2] =  0x0069d58b
0069d6bc      [0x3] =  0x0069d693
0069d6c0      [0x4] =  0x0069d5df
0069d6c4      [0x5] =  0x0069d617
0069d6c8      [0x6] =  0x0069d64b
0069d6cc      [0x7] =  0x0069d5c3
0069d6d0      [0x8] =  0x0069d5fb
0069d6d4      [0x9] =  0x0069d663
0069d6d8      [0xa] =  0x0069d633
0069d6dc  }

0069d6dc                                                                                      90 90 90 90                              ....

0069d6e0  void* __thiscall MediaDesc::`scalar deleting destructor'(class MediaDesc* this, uint32_t arg2)

0069d6e0  {
0069d6e8      this->vtable = 0x801118;
0069d6e8      
0069d6ee      if ((arg2 & 1) != 0)
0069d6f1          operator delete(this);
0069d6f1      
0069d6fc      return this;
0069d6e0  }

0069d6ff                                                                                               90                                 .

0069d700  void __thiscall FileNodeName_UInt32::Serialize(class FileNodeName_UInt32* this, class Archive* arg2)

0069d700  {
0069d70c      Archive::CheckAlignment(arg2, 4);
0069d715      uint32_t* eax = Archive::GetBytes(arg2, 4);
0069d715      
0069d71c      if (eax != 0)
0069d71c      {
0069d722          if ((arg2->m_flags & 1) != 0)
0069d722          {
0069d728              *(uint32_t*)eax = this->m_name;
0069d72b              return;
0069d722          }
0069d722          
0069d730          this->m_name = *(uint32_t*)eax;
0069d71c      }
0069d700  }

0069d738                                                                          90 90 90 90 90 90 90 90                          ........

0069d740  uint8_t __thiscall MediaDesc::ToFileNode(class MediaDesc const* this, class PFileNode* arg2)

0069d740  {
0069d740      class MediaDesc* this_1 = this;
0069d74f      int32_t eax;
0069d74f      
0069d74f      if (arg2 != 0)
0069d74f      {
0069d751          class PSRefBufferCharData<char>* m_charbuffer = KW_MEDIATYPE.m_charbuffer;
0069d763          int32_t var_18_2 = InterlockedIncrement(&m_charbuffer[-1]);
0069d769          InterlockedIncrement(&m_charbuffer[-1]);
0069d76d          class PFileNode* eax_1 = PFileNode::MakeSubNodeAsPString(arg2, m_charbuffer);
0069d76d          
0069d787          if ((InterlockedDecrement(&m_charbuffer[-1]) == 0 && m_charbuffer != 0x14))
0069d78f              *(uint32_t*)*(int32_t*)((char*)m_charbuffer + -0x14)(1);
0069d78f          
0069d793          if (eax_1 != 0)
0069d793          {
0069d79b              uint32_t m_type = this->m_type;
0069d7a0              uint32_t ecx_4;
0069d7a0              uint32_t edx_3;
0069d7a0              eax = *(int32_t*)((char*)eax_1->vtable + 4)();
0069d7a0              
0069d7a7              if (eax != 0)
0069d7a7              {
0069d7a9                  uint32_t m_type_1 = m_type;
0069d7aa                  int32_t var_1c_2 = 0xe;
0069d7ac                  int32_t var_20_1 = eax;
0069d7ac                  
0069d7b7                  if (FileNodeUtils::SetNameAsEnum(eax, edx_3, ecx_4) != 0)
0069d7d2                      return 1;
0069d7d2                  
0069d7bc                  PFileNode::RemoveSubNodePtr(eax_1, eax);
0069d7a7              }
0069d793          }
0069d74f      }
0069d74f      
0069d7c1      eax = 0;
0069d7c8      return 0;
0069d740  }

0069d7d5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0069d7e0  class MediaDesc* MediaDesc::CreateFromFileNode(class PFileNode const* arg1)

0069d7e0  {
0069d7e1      class PFileNode* ebx = arg1;
0069d7e1      
0069d7e9      if (ebx == 0)
0069d896          return 0;
0069d896      
0069d7ef      class PFileNode* var_10 = &KW_MEDIATYPE;
0069d7f6      class MediaDesc* result = nullptr;
0069d7f8      class PFileNode* eax;
0069d7f8      class PFileNode* ecx_1;
0069d7f8      eax = PFileNode::FindSubNode(ebx, var_10);
0069d7f8      
0069d801      if (eax == 0)
0069d801      {
0069d803          var_10 = ecx_1;
0069d80b          PStringBase<char>::PStringBase<char>(&var_10, "MediaDesc::CreateFromFileNode, m…");
0069d811          PFileNode::ReportError(ebx, var_10);
0069d81e          return 0;
0069d801      }
0069d801      
0069d821      arg1 = nullptr;
0069d829      class PFileNode* eax_2;
0069d829      uint32_t* ecx_4;
0069d829      uint32_t edx;
0069d829      eax_2 = PFileNode::GetLeaf(eax);
0069d829      
0069d830      if (eax_2 == 0)
0069d830      {
0069d875          var_10 = ecx_4;
0069d87d          PStringBase<char>::PStringBase<char>(&var_10, "Expecting a leaf node");
0069d883          PFileNode::ReportError(eax, var_10);
0069d890          return 0;
0069d830      }
0069d830      
0069d836      var_10 = &arg1;
0069d837      int32_t var_14_1 = 0xe;
0069d839      class PFileNode* var_18 = eax_2;
0069d839      
0069d844      if (FileNodeUtils::GetNameAsEnum(eax_2, edx, ecx_4) != 0)
0069d844      {
0069d84a          var_10 = arg1;
0069d850          result = MediaDesc::CreateMediaType(var_10);
0069d850          
0069d857          if (result != 0)
0069d857          {
0069d859              struct MediaDesc::VTable* vtable = result->vtable;
0069d85b              var_10 = ebx;
0069d85b              
0069d863              if (vtable->FromFileNode(var_10) == 0)
0069d863              {
0069d865                  struct MediaDesc::VTable* vtable_1 = result->vtable;
0069d867                  var_10 = 1;
0069d86b                  vtable_1->__vecDelDtor(var_10);
0069d86d                  return nullptr;
0069d863              }
0069d857          }
0069d844      }
0069d844      
0069d874      return result;
0069d7e0  }

0069d897                                                                       90 90 90 90 90 90 90 90 90                         .........

0069d8a0  void __fastcall MD_Data_Cursor::MD_Data_Cursor(class MD_Data_Cursor* this)

0069d8a0  {
0069d8a5      MediaDesc::MediaDesc(this, 4);
0069d8aa      this->vtable = 0x8011c0;
0069d8b5      this->m_file.id = INVALID_DID.id;
0069d8ba      this->m_xHotspot = 0;
0069d8bd      this->m_yHotspot = 0;
0069d8a0  }

0069d8c4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0069d8d0  void __thiscall MD_Data_Cursor::MD_Data_Cursor(class MD_Data_Cursor* this, class MD_Data_Cursor const* arg2)

0069d8d0  {
0069d8d4      MediaDesc::MediaDesc(this);
0069d8dd      this->vtable = 0x8011c0;
0069d8e8      this->m_file.id = INVALID_DID.id;
0069d8ef      this->m_xHotspot = 0;
0069d8f2      this->m_yHotspot = 0;
0069d8f2      
0069d8f5      if (this != arg2)
0069d8f5      {
0069d8fa          MediaDesc::operator=(this, arg2);
0069d902          this->m_file.id = arg2->m_file.id;
0069d908          this->m_xHotspot = arg2->m_xHotspot;
0069d90e          this->m_yHotspot = arg2->m_yHotspot;
0069d8f5      }
0069d8d0  }

0069d918                                                                          90 90 90 90 90 90 90 90                          ........

0069d920  void __thiscall MD_Data_Cursor::Serialize(class MD_Data_Cursor* this, class Archive* arg2)

0069d920  {
0069d929      FileNodeName_UInt32::Serialize(this, arg2);
0069d932      Archive::CheckAlignment(arg2, 4);
0069d93b      uint8_t* eax = Archive::GetBytes(arg2, 4);
0069d93b      
0069d942      if (eax != 0)
0069d942      {
0069d948          if ((arg2->m_flags & 1) == 0)
0069d953              this->m_file.id = *(uint32_t*)eax;
0069d948          else
0069d94d              *(uint32_t*)eax = this->m_file.id;
0069d942      }
0069d942      
0069d95a      Archive::CheckAlignment(arg2, 4);
0069d963      uint8_t* eax_1 = Archive::GetBytes(arg2, 4);
0069d963      
0069d96a      if (eax_1 != 0)
0069d96a      {
0069d970          if ((arg2->m_flags & 1) == 0)
0069d97b              this->m_xHotspot = *(uint32_t*)eax_1;
0069d970          else
0069d975              *(uint32_t*)eax_1 = this->m_xHotspot;
0069d96a      }
0069d96a      
0069d982      Archive::CheckAlignment(arg2, 4);
0069d98b      int32_t* eax_2 = Archive::GetBytes(arg2, 4);
0069d98b      
0069d992      if (eax_2 != 0)
0069d992      {
0069d998          if ((arg2->m_flags & 1) != 0)
0069d998          {
0069d99e              *(uint32_t*)eax_2 = this->m_yHotspot;
0069d9a1              return;
0069d998          }
0069d998          
0069d9a6          this->m_yHotspot = *(uint32_t*)eax_2;
0069d992      }
0069d920  }

0069d9ae                                            90 90                                                                ..

0069d9b0  void __fastcall MD_Data_State::MD_Data_State(class MD_Data_State* this)

0069d9b0  {
0069d9b5      MediaDesc::MediaDesc(this, 0xa);
0069d9ba      this->vtable = 0x801230;
0069d9c0      this->m_stateID = 0;
0069d9c7      this->m_probability = 1f;
0069d9b0  }

0069d9d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

0069d9e0  void __thiscall MD_Data_State::MD_Data_State(class MD_Data_State* this, class MD_Data_State const* arg2)

0069d9e0  {
0069d9e4      MediaDesc::MediaDesc(this);
0069d9ef      this->vtable = 0x801230;
0069d9f5      this->m_stateID = 0;
0069d9fc      this->m_probability = 1f;
0069d9fc      
0069da03      if (this != arg2)
0069da03      {
0069da08          MediaDesc::operator=(this, arg2);
0069da10          this->m_stateID = arg2->m_stateID;
0069da16          this->m_probability = arg2->m_probability;
0069da03      }
0069d9e0  }


0069da20  uint8_t __thiscall MD_Data_State::ToFileNode(class MD_Data_State const* this, class PFileNode* arg2)

0069da20  {
0069da2b      class PFileNode* eax;
0069da2b      
0069da2b      if ((arg2 != 0 && MediaDesc::ToFileNode(this, arg2) != 0))
0069da2b      {
0069da41          class MD_Data_State* this_1 = this;
0069da56          InterlockedIncrement(&KW_STATE.m_charbuffer[-1]);
0069da5a          eax = PFileNode::MakeSubNode(arg2, KW_STATE.m_charbuffer);
0069da5a          
0069da61          if (eax != 0)
0069da61          {
0069da6a              int32_t ecx_3;
0069da6a              eax = FileNodeUtils::MakeSubNodeAsEnum(eax, 0x14, this->m_stateID);
0069da6a              
0069da74              if (eax != 0)
0069da74              {
0069da7c                  int32_t var_10_4 = ecx_3;
0069da8a                  InterlockedIncrement(&KW_PROBABILITY.m_charbuffer[-1]);
0069da8e                  eax = PFileNode::MakeSubNode(arg2, KW_PROBABILITY.m_charbuffer);
0069da8e                  
0069da95                  if (eax != 0)
0069da95                  {
0069da97                      float m_probability = this->m_probability;
0069da9c                      arg2 = m_probability;
0069daaa                      class PFileNode* eax_3;
0069daaa                      eax_3 = PFileNode::MakeSubNodeAsFloat(eax, m_probability) != 0;
0069dab0                      return eax_3;
0069da95                  }
0069da74              }
0069da61          }
0069da2b      }
0069da2b      
0069dab5      eax = 0;
0069dab8      return 0;
0069da20  }

0069dabb                                                                                   90 90 90 90 90                             .....

0069dac0  uint8_t __thiscall MD_Data_State::FromFileNode(class MD_Data_State* this, class PFileNode const* arg2)

0069dac0  {
0069dac6      class PFileNode* esi = arg2;
0069dac6      
0069dad1      if (esi == 0)
0069dad1      {
0069dcb4          int32_t eax;
0069dcb4          eax = 0;
0069dcba          return 0;
0069dad1      }
0069dad1      
0069dad9      int32_t ebx;
0069dad9      ebx = 1;
0069dadb      uint32_t eax_1 = PFileNode::GetNumSubNodes(esi);
0069dae6      uint32_t m_charbuffer_1 = 0;
0069dae6      
0069daee      if (eax_1 > 0)
0069daee      {
0069db0a          while (true)
0069db0a          {
0069db0a              struct PFileNode::VTable* vtable = esi->vtable;
0069db0c              uint32_t m_charbuffer = m_charbuffer_1;
0069db0f              class PFileNode* eax_2 = vtable->GetSubNode(m_charbuffer);
0069db0f              
0069db16              if (eax_2 != 0)
0069db16              {
0069db1c                  m_charbuffer = 0x8f95ac;
0069db1c                  
0069db2a                  if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069db2a                  {
0069db30                      m_charbuffer = 0x8f95dc;
0069db40                      class PStringBase<char> var_30;
0069db40                      
0069db40                      if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069db40                      {
0069db8a                          m_charbuffer = 0x8f95c0;
0069db8a                          
0069db96                          if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069db96                          {
0069dbde                              class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069dbe3                              class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0069dbea                              m_charbuffer = (PStringBase<char>::s_NullBuffer_1 - 0x10);
0069dbeb                              InterlockedIncrement(m_charbuffer);
0069dbf1                              m_charbuffer = &PStringBase<char>::s_NullBuffer_2;
0069dbf4                              PFileNode::GetNameAsPString(eax_2, m_charbuffer);
0069dbf9                              m_charbuffer = "] ignored";
0069dc07                              void* var_c;
0069dc07                              m_charbuffer = PStringBase<char>::PStringBase<char>(&var_c, m_charbuffer);
0069dc0e                              var_30 = &var_c;
0069dc29                              class PStringBase<char> __return;
0069dc29                              PStringBase<char>::operator+(operator+(&__return, "Unknown Keyword: [", &PStringBase<char>::s_NullBuffer_2), &m_charbuffer, var_30);
0069dc2e                              var_30 = eax_2;
0069dc2f                              PFileNode::ReportError(var_30, m_charbuffer);
0069dc38                              int32_t* esi_3 = (__return - 0x14);
0069dc41                              m_charbuffer = &esi_3[1];
0069dc41                              
0069dc4a                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_3 != 0))
0069dc4a                              {
0069dc4c                                  int32_t eax_13 = *(uint32_t*)esi_3;
0069dc4e                                  m_charbuffer = 1;
0069dc52                                  *(uint32_t*)eax_13(m_charbuffer);
0069dc4a                              }
0069dc4a                              
0069dc58                              int32_t* esi_5 = ((char*)var_c - 0x14);
0069dc5e                              m_charbuffer = &esi_5[1];
0069dc5e                              
0069dc67                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_5 != 0))
0069dc67                              {
0069dc69                                  int32_t edx_5 = *(uint32_t*)esi_5;
0069dc6b                                  m_charbuffer = 1;
0069dc6f                                  *(uint32_t*)edx_5(m_charbuffer);
0069dc67                              }
0069dc67                              
0069dc75                              int32_t* esi_7 = (PStringBase<char>::s_NullBuffer_2 - 0x14);
0069dc7b                              m_charbuffer = &esi_7[1];
0069dc7c                              ebx = 0;
0069dc7c                              
0069dc86                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_7 != 0))
0069dc86                              {
0069dc88                                  int32_t edx_6 = *(uint32_t*)esi_7;
0069dc8a                                  m_charbuffer = 1;
0069dc8e                                  *(uint32_t*)edx_6(m_charbuffer);
0069dc86                              }
0069db96                          }
0069db96                          else
0069db96                          {
0069db9a                              class PFileNode* eax_8;
0069db9a                              class PStringBase<char> ecx_8;
0069db9a                              eax_8 = PFileNode::GetLeaf(eax_2);
0069dba1                              uint8_t eax_9;
0069dba1                              
0069dba1                              if (eax_8 != 0)
0069dba1                              {
0069dbaa                                  m_charbuffer = &this->m_probability;
0069dbad                                  eax_9 = PFileNode::GetNameAsFloat(eax_8, m_charbuffer);
0069dba1                              }
0069dba1                              
0069dbb4                              if ((eax_8 == 0 || eax_9 == 0))
0069dbb4                              {
0069dbc0                                  m_charbuffer = KW_PROBABILITY.m_charbuffer;
0069dbc1                                  var_30 = ecx_8;
0069dbc9                                  PStringBase<char>::PStringBase<char>(&var_30, "MD_Data_State::FromFileNode, %s …");
0069dbcf                                  PFileNode::ReportError(eax_2, var_30);
0069dbd7                                  ebx = 0;
0069dbb4                              }
0069db96                          }
0069db40                      }
0069db40                      else
0069db40                      {
0069db42                          class PFileNode* eax_5;
0069db42                          uint32_t* m_charbuffer_2;
0069db42                          eax_5 = PFileNode::GetLeaf(eax_2);
0069db42                          
0069db49                          if (eax_5 == 0)
0069db49                          {
0069db6d                              m_charbuffer = m_charbuffer_2;
0069db70                              var_30 = "Expecting a leaf node";
0069db75                              PStringBase<char>::PStringBase<char>(&m_charbuffer, var_30);
0069db7a                              var_30 = eax_2;
0069db7b                              PFileNode::ReportError(var_30, m_charbuffer);
0069db83                              ebx = 0;
0069db49                          }
0069db49                          else
0069db49                          {
0069db52                              m_charbuffer = &this->m_stateID;
0069db53                              var_30 = 0x14;
0069db55                              class PFileNode* var_34_1 = eax_5;
0069db55                              
0069db60                              if (FileNodeUtils::GetNameAsEnum(eax_5, &this->m_stateID, m_charbuffer_2) == 0)
0069db66                                  ebx = 0;
0069db49                          }
0069db40                      }
0069db2a                  }
0069db16              }
0069db16              
0069dc99              bool cond:2_1 = (m_charbuffer_1 + 1) < eax_1;
0069dc9b              m_charbuffer_1 += 1;
0069dc9b              
0069dc9f              if (!(cond:2_1))
0069dc9f                  break;
0069dc9f              
0069db02              esi = arg2;
0069db0a          }
0069daee      }
0069daee      
0069dca5      eax_1 = ebx;
0069dcae      return eax_1;
0069dac0  }

0069dcbd                                                                                         90 90 90                               ...

0069dcc0  void __fastcall MD_Data_Message::MD_Data_Message(class MD_Data_Message* this)

0069dcc0  {
0069dcc5      MediaDesc::MediaDesc(this, 7);
0069dccc      this->m_messageID = 0;
0069dccf      this->m_probability = 0f;
0069dcd2      this->vtable = 0x8012d8;
0069dcc0  }

0069dcdc                                                                                      90 90 90 90                              ....

0069dce0  void __thiscall MD_Data_Message::MD_Data_Message(class MD_Data_Message* this, class MD_Data_Message const* arg2)

0069dce0  {
0069dce4      MediaDesc::MediaDesc(this);
0069dcf1      this->vtable = 0x8012d8;
0069dcf7      this->m_messageID = 0;
0069dcfa      this->m_probability = 0f;
0069dcfa      
0069dcfd      if (this != arg2)
0069dcfd      {
0069dd02          MediaDesc::operator=(this, arg2);
0069dd0a          this->m_messageID = arg2->m_messageID;
0069dd10          this->m_probability = arg2->m_probability;
0069dcfd      }
0069dce0  }

0069dd1a                                                                                90 90 90 90 90 90                            ......

0069dd20  uint8_t __thiscall MD_Data_Message::ToFileNode(class MD_Data_Message const* this, class PFileNode* arg2)

0069dd20  {
0069dd2b      class PFileNode* eax;
0069dd2b      
0069dd2b      if ((arg2 != 0 && MediaDesc::ToFileNode(this, arg2) != 0))
0069dd2b      {
0069dd41          class MD_Data_Message* this_1 = this;
0069dd56          InterlockedIncrement(&KW_EVENTID.m_charbuffer[-1]);
0069dd5a          eax = PFileNode::MakeSubNode(arg2, KW_EVENTID.m_charbuffer);
0069dd5a          
0069dd61          if (eax != 0)
0069dd61          {
0069dd6a              int32_t ecx_3;
0069dd6a              eax = FileNodeUtils::MakeSubNodeAsEnum(eax, 0x12, this->m_messageID);
0069dd6a              
0069dd74              if (eax != 0)
0069dd74              {
0069dd7c                  int32_t var_10_4 = ecx_3;
0069dd8a                  InterlockedIncrement(&KW_PROBABILITY.m_charbuffer[-1]);
0069dd8e                  eax = PFileNode::MakeSubNode(arg2, KW_PROBABILITY.m_charbuffer);
0069dd8e                  
0069dd95                  if (eax != 0)
0069dd95                  {
0069dd97                      float m_probability = this->m_probability;
0069dd9c                      arg2 = m_probability;
0069ddaa                      class PFileNode* eax_3;
0069ddaa                      eax_3 = PFileNode::MakeSubNodeAsFloat(eax, m_probability) != 0;
0069ddb0                      return eax_3;
0069dd95                  }
0069dd74              }
0069dd61          }
0069dd2b      }
0069dd2b      
0069ddb5      eax = 0;
0069ddb8      return 0;
0069dd20  }

0069ddbb                                                                                   90 90 90 90 90                             .....

0069ddc0  uint8_t __thiscall MD_Data_Message::FromFileNode(class MD_Data_Message* this, class PFileNode const* arg2)

0069ddc0  {
0069ddc6      class PFileNode* esi = arg2;
0069ddc6      
0069ddd1      if (esi == 0)
0069ddd1      {
0069dfb7          int32_t eax;
0069dfb7          eax = 0;
0069dfbd          return 0;
0069ddd1      }
0069ddd1      
0069ddd9      int32_t ebx;
0069ddd9      ebx = 1;
0069dddb      uint32_t eax_1 = PFileNode::GetNumSubNodes(esi);
0069dde6      uint32_t m_charbuffer_1 = 0;
0069dde6      
0069ddee      if (eax_1 > 0)
0069ddee      {
0069de0a          while (true)
0069de0a          {
0069de0a              struct PFileNode::VTable* vtable = esi->vtable;
0069de0c              uint32_t m_charbuffer = m_charbuffer_1;
0069de0f              class PFileNode* eax_2 = vtable->GetSubNode(m_charbuffer);
0069de0f              
0069de16              if (eax_2 != 0)
0069de16              {
0069de1f                  m_charbuffer = 0x8f967c;
0069de1f                  
0069de2d                  if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069de2d                  {
0069de33                      m_charbuffer = 0x8f9658;
0069de43                      class PStringBase<char> var_30;
0069de43                      
0069de43                      if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069de43                      {
0069de8d                          m_charbuffer = 0x8f9690;
0069de8d                          
0069de99                          if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069de99                          {
0069dee1                              class PStringBase<char> PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069dee6                              class PStringBase<char> PStringBase<char>::s_NullBuffer_2 = PStringBase<char>::s_NullBuffer_1;
0069deed                              m_charbuffer = (PStringBase<char>::s_NullBuffer_1 - 0x10);
0069deee                              InterlockedIncrement(m_charbuffer);
0069def4                              m_charbuffer = &PStringBase<char>::s_NullBuffer_2;
0069def7                              PFileNode::GetNameAsPString(eax_2, m_charbuffer);
0069defc                              m_charbuffer = "] ignored";
0069df0a                              void* var_c;
0069df0a                              m_charbuffer = PStringBase<char>::PStringBase<char>(&var_c, m_charbuffer);
0069df11                              var_30 = &var_c;
0069df2c                              class PStringBase<char> __return;
0069df2c                              PStringBase<char>::operator+(operator+(&__return, "Unknown Keyword: [", &PStringBase<char>::s_NullBuffer_2), &m_charbuffer, var_30);
0069df31                              var_30 = eax_2;
0069df32                              PFileNode::ReportError(var_30, m_charbuffer);
0069df3b                              int32_t* esi_3 = (__return - 0x14);
0069df44                              m_charbuffer = &esi_3[1];
0069df44                              
0069df4d                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_3 != 0))
0069df4d                              {
0069df4f                                  int32_t eax_13 = *(uint32_t*)esi_3;
0069df51                                  m_charbuffer = 1;
0069df55                                  *(uint32_t*)eax_13(m_charbuffer);
0069df4d                              }
0069df4d                              
0069df5b                              int32_t* esi_5 = ((char*)var_c - 0x14);
0069df61                              m_charbuffer = &esi_5[1];
0069df61                              
0069df6a                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_5 != 0))
0069df6a                              {
0069df6c                                  int32_t edx_5 = *(uint32_t*)esi_5;
0069df6e                                  m_charbuffer = 1;
0069df72                                  *(uint32_t*)edx_5(m_charbuffer);
0069df6a                              }
0069df6a                              
0069df78                              int32_t* esi_7 = (PStringBase<char>::s_NullBuffer_2 - 0x14);
0069df7e                              m_charbuffer = &esi_7[1];
0069df7f                              ebx = 0;
0069df7f                              
0069df89                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_7 != 0))
0069df89                              {
0069df8b                                  int32_t edx_6 = *(uint32_t*)esi_7;
0069df8d                                  m_charbuffer = 1;
0069df91                                  *(uint32_t*)edx_6(m_charbuffer);
0069df89                              }
0069de99                          }
0069de99                          else
0069de99                          {
0069de9d                              class PFileNode* eax_8;
0069de9d                              class PStringBase<char> ecx_8;
0069de9d                              eax_8 = PFileNode::GetLeaf(eax_2);
0069dea4                              uint8_t eax_9;
0069dea4                              
0069dea4                              if (eax_8 != 0)
0069dea4                              {
0069dead                                  m_charbuffer = &this->m_probability;
0069deb0                                  eax_9 = PFileNode::GetNameAsFloat(eax_8, m_charbuffer);
0069dea4                              }
0069dea4                              
0069deb7                              if ((eax_8 == 0 || eax_9 == 0))
0069deb7                              {
0069dec3                                  m_charbuffer = KW_PROBABILITY.m_charbuffer;
0069dec4                                  var_30 = ecx_8;
0069decc                                  PStringBase<char>::PStringBase<char>(&var_30, "MD_Data_Message::FromFileNode, %…");
0069ded2                                  PFileNode::ReportError(eax_2, var_30);
0069deda                                  ebx = 0;
0069deb7                              }
0069de99                          }
0069de43                      }
0069de43                      else
0069de43                      {
0069de45                          class PFileNode* eax_5;
0069de45                          uint32_t* m_charbuffer_2;
0069de45                          eax_5 = PFileNode::GetLeaf(eax_2);
0069de45                          
0069de4c                          if (eax_5 == 0)
0069de4c                          {
0069de70                              m_charbuffer = m_charbuffer_2;
0069de73                              var_30 = "Expecting a leaf node";
0069de78                              PStringBase<char>::PStringBase<char>(&m_charbuffer, var_30);
0069de7d                              var_30 = eax_2;
0069de7e                              PFileNode::ReportError(var_30, m_charbuffer);
0069de86                              ebx = 0;
0069de4c                          }
0069de4c                          else
0069de4c                          {
0069de55                              m_charbuffer = &this->m_messageID;
0069de56                              var_30 = 0x12;
0069de58                              class PFileNode* var_34_1 = eax_5;
0069de58                              
0069de63                              if (FileNodeUtils::GetNameAsEnum(eax_5, &this->m_messageID, m_charbuffer_2) == 0)
0069de69                                  ebx = 0;
0069de4c                          }
0069de43                      }
0069de2d                  }
0069de16              }
0069de16              else
0069de18                  ebx = 0;
0069de18              
0069df9c              bool cond:2_1 = (m_charbuffer_1 + 1) < eax_1;
0069df9e              m_charbuffer_1 += 1;
0069df9e              
0069dfa2              if (!(cond:2_1))
0069dfa2                  break;
0069dfa2              
0069de02              esi = arg2;
0069de0a          }
0069ddee      }
0069ddee      
0069dfa8      eax_1 = ebx;
0069dfb1      return eax_1;
0069ddc0  }


0069dfc0  void __fastcall MD_Data_Fade::MD_Data_Fade(class MD_Data_Fade* this)

0069dfc0  {
0069dfc5      MediaDesc::MediaDesc(this, 0xb);
0069dfd2      this->m_endAlpha = 0f;
0069dfd5      this->m_duration = 0f;
0069dfdd      this->m_startTime = 0f;
0069dfe0      this->vtable = 0x801388;
0069dfe6      this->m_startAlpha = 1f;
0069dfed      *(uint32_t*)((char*)this->m_startTime)[4] = 0xbff00000;
0069dfc0  }

0069dff4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0069e000  float __fastcall MD_Data_Fade::GetDuration(class MD_Data_Fade const* this)

0069e000  {
0069e003      return ((int32_t)((long double)this->m_duration));
0069e000  }

0069e004              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0069e010  void __thiscall MD_Data_Fade::MD_Data_Fade(class MD_Data_Fade* this, class MD_Data_Fade const* arg2)

0069e010  {
0069e014      MediaDesc::MediaDesc(this);
0069e027      this->m_endAlpha = 0f;
0069e02a      this->m_duration = 0f;
0069e032      this->vtable = 0x801388;
0069e038      this->m_startAlpha = 1f;
0069e03f      this->m_startTime = 0f;
0069e042      *(uint32_t*)((char*)this->m_startTime)[4] = 0xbff00000;
0069e042      
0069e045      if (this != arg2)
0069e045      {
0069e04a          MediaDesc::operator=(this, arg2);
0069e052          this->m_startAlpha = arg2->m_startAlpha;
0069e058          this->m_endAlpha = arg2->m_endAlpha;
0069e05e          this->m_duration = arg2->m_duration;
0069e045      }
0069e010  }

0069e068                          90 90 90 90 90 90 90 90                                                          ........

0069e070  uint8_t __thiscall MD_Data_Fade::ToFileNode(class MD_Data_Fade const* this, class PFileNode* arg2)

0069e070  {
0069e072      class PFileNode* m_charbuffer_3 = arg2;
0069e07b      class PFileNode* eax;
0069e07b      
0069e07b      if (m_charbuffer_3 != 0)
0069e07b      {
0069e081          class PStringBase<char> m_charbuffer = m_charbuffer_3;
0069e081          
0069e089          if (MediaDesc::ToFileNode(this, m_charbuffer) != 0)
0069e089          {
0069e095              m_charbuffer = this;
0069e09e              m_charbuffer = KW_STARTALPHA.m_charbuffer;
0069e0aa              InterlockedIncrement(&KW_STARTALPHA.m_charbuffer[-1]);
0069e0ae              eax = PFileNode::MakeSubNode(m_charbuffer_3, m_charbuffer);
0069e0ae              
0069e0b5              if (eax != 0)
0069e0b5              {
0069e0bb                  float m_startAlpha = this->m_startAlpha;
0069e0c0                  arg2 = m_startAlpha;
0069e0c4                  m_charbuffer = m_startAlpha;
0069e0c7                  class PStringBase<char> m_charbuffer_1;
0069e0c7                  eax = PFileNode::MakeSubNodeAsFloat(eax, m_charbuffer);
0069e0c7                  
0069e0ce                  if (eax != 0)
0069e0ce                  {
0069e0d0                      m_charbuffer = m_charbuffer_1;
0069e0d9                      m_charbuffer = KW_ENDALPHA.m_charbuffer;
0069e0e5                      InterlockedIncrement(&KW_ENDALPHA.m_charbuffer[-1]);
0069e0e9                      eax = PFileNode::MakeSubNode(m_charbuffer_3, m_charbuffer);
0069e0e9                      
0069e0f0                      if (eax != 0)
0069e0f0                      {
0069e0f2                          float m_endAlpha = this->m_endAlpha;
0069e0f7                          arg2 = m_endAlpha;
0069e0fb                          m_charbuffer = m_endAlpha;
0069e0fe                          class PStringBase<char> m_charbuffer_2;
0069e0fe                          eax = PFileNode::MakeSubNodeAsFloat(eax, m_charbuffer);
0069e0fe                          
0069e105                          if (eax != 0)
0069e105                          {
0069e107                              m_charbuffer = m_charbuffer_2;
0069e10f                              PStringBase<unsigned short>::PStringBase<unsigned short>(&m_charbuffer, &KW_DURATION);
0069e116                              eax = PFileNode::MakeSubNode(m_charbuffer_3, m_charbuffer);
0069e116                              
0069e11d                              if (eax != 0)
0069e11d                              {
0069e11f                                  float m_duration = this->m_duration;
0069e124                                  arg2 = m_duration;
0069e128                                  m_charbuffer = m_duration;
0069e132                                  class PFileNode* eax_1;
0069e132                                  eax_1 = PFileNode::MakeSubNodeAsFloat(eax, m_charbuffer) != 0;
0069e138                                  return eax_1;
0069e11d                              }
0069e105                          }
0069e0f0                      }
0069e0ce                  }
0069e0b5              }
0069e089          }
0069e07b      }
0069e07b      
0069e13d      eax = 0;
0069e140      return 0;
0069e070  }

0069e143           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

0069e150  uint8_t __thiscall MD_Data_Fade::FromFileNode(class MD_Data_Fade* this, class PFileNode const* arg2)

0069e150  {
0069e155      class PFileNode* ebp = arg2;
0069e155      
0069e15f      if (ebp == 0)
0069e15f      {
0069e305          int32_t eax;
0069e305          eax = 0;
0069e30b          return 0;
0069e15f      }
0069e15f      
0069e167      int32_t ebx;
0069e167      ebx = 1;
0069e169      uint32_t eax_1 = PFileNode::GetNumSubNodes(ebp);
0069e174      uint32_t m_charbuffer_1 = 0;
0069e174      
0069e17c      if (eax_1 > 0)
0069e17c      {
0069e2f0          bool cond:2_1;
0069e2f0          
0069e2f0          do
0069e2f0          {
0069e186              struct PFileNode::VTable* vtable = ebp->vtable;
0069e189              float* m_charbuffer = m_charbuffer_1;
0069e18c              class PFileNode* eax_2 = vtable->GetSubNode(m_charbuffer);
0069e18c              
0069e193              if (eax_2 == 0)
0069e1f3                  ebx = 0;
0069e193              else
0069e193              {
0069e195                  m_charbuffer = &KW_MEDIATYPE;
0069e195                  
0069e1a3                  if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e1a3                  {
0069e1a9                      m_charbuffer = &KW_STARTALPHA;
0069e1b9                      class PStringBase<char> var_28;
0069e1b9                      class PStringBase<char> ecx_6;
0069e1b9                      
0069e1b9                      if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e1b9                      {
0069e1fa                          m_charbuffer = &KW_ENDALPHA;
0069e1fa                          
0069e208                          if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e208                          {
0069e22f                              m_charbuffer = &KW_DURATION;
0069e22f                              
0069e23b                              if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e23b                              {
0069e267                                  class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069e26c                                  arg2 = PStringBase<char>::s_NullBuffer_1;
0069e273                                  m_charbuffer = &PStringBase<char>::s_NullBuffer_1[-1];
0069e274                                  InterlockedIncrement(m_charbuffer);
0069e27e                                  m_charbuffer = &arg2;
0069e281                                  PFileNode::GetNameAsPString(eax_2, m_charbuffer);
0069e286                                  m_charbuffer = "] ignored";
0069e294                                  void var_c;
0069e294                                  m_charbuffer = PStringBase<char>::PStringBase<char>(&var_c, m_charbuffer);
0069e29b                                  var_28 = &var_c;
0069e2b6                                  void __return;
0069e2b6                                  PStringBase<char>::operator+(operator+(&__return, "Unknown Keyword: [", &arg2), &m_charbuffer, var_28);
0069e2bb                                  var_28 = eax_2;
0069e2bc                                  PFileNode::ReportError(var_28, m_charbuffer);
0069e2c8                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&__return);
0069e2d1                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&var_c);
0069e2da                                  ebx = 0;
0069e2dc                                  PStringBase<unsigned short>::~PStringBase<unsigned short>(&arg2);
0069e23b                              }
0069e23b                              else
0069e23b                              {
0069e23f                                  class PFileNode* eax_12;
0069e23f                                  eax_12 = PFileNode::GetLeaf(eax_2);
0069e246                                  uint8_t eax_13;
0069e246                                  
0069e246                                  if (eax_12 != 0)
0069e246                                  {
0069e24b                                      m_charbuffer = &this->m_duration;
0069e24e                                      eax_13 = PFileNode::GetNameAsFloat(eax_12, m_charbuffer);
0069e246                                  }
0069e246                                  
0069e255                                  if ((eax_12 == 0 || eax_13 == 0))
0069e255                                  {
0069e261                                      m_charbuffer = KW_DURATION.m_charbuffer;
0069e262                                      goto label_69e1dd;
0069e255                                  }
0069e23b                              }
0069e208                          }
0069e208                          else
0069e208                          {
0069e20a                              class PFileNode* eax_9;
0069e20a                              eax_9 = PFileNode::GetLeaf(eax_2);
0069e211                              uint8_t eax_10;
0069e211                              
0069e211                              if (eax_9 != 0)
0069e211                              {
0069e216                                  m_charbuffer = &this->m_endAlpha;
0069e219                                  eax_10 = PFileNode::GetNameAsFloat(eax_9, m_charbuffer);
0069e211                              }
0069e211                              
0069e220                              if ((eax_9 == 0 || eax_10 == 0))
0069e220                              {
0069e22c                                  m_charbuffer = KW_ENDALPHA.m_charbuffer;
0069e22d                                  goto label_69e1dd;
0069e220                              }
0069e208                          }
0069e1b9                      }
0069e1b9                      else
0069e1b9                      {
0069e1bb                          class PFileNode* eax_5;
0069e1bb                          eax_5 = PFileNode::GetLeaf(eax_2);
0069e1c2                          uint8_t eax_6;
0069e1c2                          
0069e1c2                          if (eax_5 != 0)
0069e1c2                          {
0069e1c7                              m_charbuffer = &this->m_startAlpha;
0069e1ca                              eax_6 = PFileNode::GetNameAsFloat(eax_5, m_charbuffer);
0069e1c2                          }
0069e1c2                          
0069e1d1                          if ((eax_5 == 0 || eax_6 == 0))
0069e1d1                          {
0069e1dc                              m_charbuffer = KW_STARTALPHA.m_charbuffer;
0069e1dd                          label_69e1dd:
0069e1dd                              var_28 = ecx_6;
0069e1e5                              PStringBase<char>::PStringBase<char>(&var_28, "MD_Data_Fade::FromFileNode, %s e…");
0069e1eb                              PFileNode::ReportError(eax_2, var_28);
0069e1f3                              ebx = 0;
0069e1d1                          }
0069e1b9                      }
0069e1a3                  }
0069e193              }
0069e193              
0069e2ea              cond:2_1 = (m_charbuffer_1 + 1) < eax_1;
0069e2ec              m_charbuffer_1 += 1;
0069e2f0          } while (cond:2_1);
0069e17c      }
0069e17c      
0069e2f6      eax_1 = ebx;
0069e2ff      return eax_1;
0069e150  }

0069e30e                                            90 90                                                                ..

0069e310  void __fastcall MD_Data_Jump::MD_Data_Jump(class MD_Data_Jump* this)

0069e310  {
0069e315      MediaDesc::MediaDesc(this, 6);
0069e31c      this->m_jumpItemIndex = 0;
0069e31f      this->m_probability = 0f;
0069e322      this->vtable = 0x801430;
0069e310  }

0069e32c                                      90 90 90 90                                                              ....

0069e330  void __thiscall MD_Data_Jump::MD_Data_Jump(class MD_Data_Jump* this, class MD_Data_Jump const* arg2)

0069e330  {
0069e334      MediaDesc::MediaDesc(this);
0069e341      this->vtable = 0x801430;
0069e347      this->m_jumpItemIndex = 0;
0069e34a      this->m_probability = 0f;
0069e34a      
0069e34d      if (this != arg2)
0069e34d      {
0069e352          MediaDesc::operator=(this, arg2);
0069e35a          this->m_jumpItemIndex = arg2->m_jumpItemIndex;
0069e360          this->m_probability = arg2->m_probability;
0069e34d      }
0069e330  }

0069e36a                                90 90 90 90 90 90                                                            ......

0069e370  uint8_t __thiscall MD_Data_Jump::ToFileNode(class MD_Data_Jump const* this, class PFileNode* arg2)

0069e370  {
0069e37b      class PFileNode* eax;
0069e37b      
0069e37b      if ((arg2 != 0 && MediaDesc::ToFileNode(this, arg2) != 0))
0069e37b      {
0069e38d          class MD_Data_Jump* this_1 = this;
0069e3a2          InterlockedIncrement(&KW_JUMPITEMINDEX.m_charbuffer[-1]);
0069e3a6          eax = PFileNode::MakeSubNode(arg2, KW_JUMPITEMINDEX.m_charbuffer);
0069e3a6          
0069e3ad          if (eax != 0)
0069e3ad          {
0069e3b5              int32_t ecx_4;
0069e3b5              eax = PFileNode::MakeSubNodeAsUInt32(eax, this->m_jumpItemIndex);
0069e3b5              
0069e3bc              if (eax != 0)
0069e3bc              {
0069e3be                  int32_t var_10_4 = ecx_4;
0069e3d3                  InterlockedIncrement(&KW_PROBABILITY.m_charbuffer[-1]);
0069e3d7                  eax = PFileNode::MakeSubNode(arg2, KW_PROBABILITY.m_charbuffer);
0069e3d7                  
0069e3de                  if (eax != 0)
0069e3de                  {
0069e3e0                      float m_probability = this->m_probability;
0069e3e5                      arg2 = m_probability;
0069e3f3                      class PFileNode* eax_1;
0069e3f3                      eax_1 = PFileNode::MakeSubNodeAsFloat(eax, m_probability) != 0;
0069e3f9                      return eax_1;
0069e3de                  }
0069e3bc              }
0069e3ad          }
0069e37b      }
0069e37b      
0069e3fe      eax = 0;
0069e401      return 0;
0069e370  }

0069e404              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0069e410  uint8_t __thiscall MD_Data_Jump::FromFileNode(class MD_Data_Jump* this, class PFileNode const* arg2)

0069e410  {
0069e415      class PFileNode* ebp = arg2;
0069e415      
0069e421      if (ebp == 0)
0069e421      {
0069e5e7          int32_t eax;
0069e5e7          eax = 0;
0069e5ed          return 0;
0069e421      }
0069e421      
0069e429      int32_t ebx;
0069e429      ebx = 1;
0069e42b      uint32_t eax_1 = PFileNode::GetNumSubNodes(ebp);
0069e436      uint32_t m_charbuffer_1 = 0;
0069e436      
0069e43e      if (eax_1 > 0)
0069e43e      {
0069e5d2          bool cond:2_1;
0069e5d2          
0069e5d2          do
0069e5d2          {
0069e454              struct PFileNode::VTable* vtable = ebp->vtable;
0069e457              uint32_t m_charbuffer = m_charbuffer_1;
0069e45a              class PFileNode* eax_2 = vtable->GetSubNode(m_charbuffer);
0069e45a              
0069e461              if (eax_2 == 0)
0069e4c5                  ebx = 0;
0069e461              else
0069e461              {
0069e463                  m_charbuffer = 0x8f9814;
0069e463                  
0069e471                  if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e471                  {
0069e477                      m_charbuffer = 0x8f9804;
0069e487                      char* var_30_1;
0069e487                      class PStringBase<char> var_2c;
0069e487                      int32_t* ecx_8;
0069e487                      
0069e487                      if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e487                      {
0069e4cc                          m_charbuffer = 0x8f9828;
0069e4cc                          
0069e4d8                          if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e4d8                          {
0069e50d                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069e512                              arg2 = PStringBase<char>::s_NullBuffer_1;
0069e519                              m_charbuffer = &PStringBase<char>::s_NullBuffer_1[-1];
0069e51a                              InterlockedIncrement(m_charbuffer);
0069e524                              m_charbuffer = &arg2;
0069e527                              PFileNode::GetNameAsPString(eax_2, m_charbuffer);
0069e52c                              m_charbuffer = "] ignored";
0069e53a                              void* var_c;
0069e53a                              m_charbuffer = PStringBase<char>::PStringBase<char>(&var_c, m_charbuffer);
0069e541                              var_2c = &var_c;
0069e55c                              class PStringBase<char> __return;
0069e55c                              PStringBase<char>::operator+(operator+(&__return, "Unknown Keyword: [", &arg2), &m_charbuffer, var_2c);
0069e561                              var_2c = eax_2;
0069e562                              PFileNode::ReportError(var_2c, m_charbuffer);
0069e56b                              int32_t* esi_3 = (__return - 0x14);
0069e574                              m_charbuffer = &esi_3[1];
0069e574                              
0069e57d                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_3 != 0))
0069e57d                              {
0069e57f                                  int32_t eax_14 = *(uint32_t*)esi_3;
0069e581                                  m_charbuffer = 1;
0069e585                                  *(uint32_t*)eax_14(m_charbuffer);
0069e57d                              }
0069e57d                              
0069e58b                              int32_t* esi_5 = ((char*)var_c - 0x14);
0069e591                              m_charbuffer = &esi_5[1];
0069e591                              
0069e59a                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_5 != 0))
0069e59a                              {
0069e59c                                  int32_t edx_5 = *(uint32_t*)esi_5;
0069e59e                                  m_charbuffer = 1;
0069e5a2                                  *(uint32_t*)edx_5(m_charbuffer);
0069e59a                              }
0069e59a                              
0069e5a8                              void* __offset(PFileNode, -0x14) esi_7 = ((char*)arg2 - 0x14);
0069e5ae                              m_charbuffer = ((char*)esi_7 + 4);
0069e5af                              ebx = 0;
0069e5af                              
0069e5b9                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_7 != 0))
0069e5b9                              {
0069e5bb                                  int32_t edx_6 = *(int32_t*)((char*)ADJ(esi_7) + -0x14);
0069e5bd                                  m_charbuffer = 1;
0069e5c1                                  *(uint32_t*)edx_6(m_charbuffer);
0069e5b9                              }
0069e4d8                          }
0069e4d8                          else
0069e4d8                          {
0069e4dc                              class PFileNode* eax_9;
0069e4dc                              class PStringBase<char> ecx_10;
0069e4dc                              eax_9 = PFileNode::GetLeaf(eax_2);
0069e4e3                              uint8_t eax_10;
0069e4e3                              
0069e4e3                              if (eax_9 != 0)
0069e4e3                              {
0069e4ec                                  m_charbuffer = &this->m_probability;
0069e4ef                                  eax_10 = PFileNode::GetNameAsFloat(eax_9, m_charbuffer);
0069e4e3                              }
0069e4e3                              
0069e4f6                              if ((eax_9 == 0 || eax_10 == 0))
0069e4f6                              {
0069e502                                  m_charbuffer = KW_PROBABILITY.m_charbuffer;
0069e503                                  var_2c = ecx_10;
0069e504                                  ecx_8 = &var_2c;
0069e506                                  var_30_1 = "MD_Data_Jump::FromFileNode, %s e…";
0069e50b                                  goto label_69e4b7;
0069e4f6                              }
0069e4d8                          }
0069e487                      }
0069e487                      else
0069e487                      {
0069e489                          class PFileNode* eax_5;
0069e489                          class PStringBase<char> ecx_6;
0069e489                          eax_5 = PFileNode::GetLeaf(eax_2);
0069e490                          uint8_t eax_6;
0069e490                          
0069e490                          if (eax_5 != 0)
0069e490                          {
0069e499                              m_charbuffer = &this->m_jumpItemIndex;
0069e49c                              eax_6 = PFileNode::GetNameAsUInt32(eax_5, m_charbuffer);
0069e490                          }
0069e490                          
0069e4a3                          if ((eax_5 == 0 || eax_6 == 0))
0069e4a3                          {
0069e4ae                              m_charbuffer = KW_JUMPITEMINDEX.m_charbuffer;
0069e4af                              var_2c = ecx_6;
0069e4b0                              ecx_8 = &var_2c;
0069e4b2                              var_30_1 = "MD_Data_Jump::FromFileNode, %s e…";
0069e4b7                          label_69e4b7:
0069e4b7                              PStringBase<char>::PStringBase<char>(ecx_8, var_30_1);
0069e4bd                              PFileNode::ReportError(eax_2, var_2c);
0069e4c5                              ebx = 0;
0069e4a3                          }
0069e487                      }
0069e471                  }
0069e461              }
0069e461              
0069e5cc              cond:2_1 = (m_charbuffer_1 + 1) < eax_1;
0069e5ce              m_charbuffer_1 += 1;
0069e5d2          } while (cond:2_1);
0069e43e      }
0069e43e      
0069e5d8      eax_1 = ebx;
0069e5e1      return eax_1;
0069e410  }


0069e5f0  void __fastcall MD_Data_Sound::MD_Data_Sound(class MD_Data_Sound* this)

0069e5f0  {
0069e5f5      MediaDesc::MediaDesc(this, 9);
0069e5fa      this->vtable = 0x801508;
0069e605      this->m_file.id = INVALID_DID.id;
0069e608      this->m_stype = Sound_Invalid;
0069e5f0  }

0069e613                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069e620  void __thiscall MD_Data_Sound::MD_Data_Sound(class MD_Data_Sound* this, class MD_Data_Sound const* arg2)

0069e620  {
0069e624      MediaDesc::MediaDesc(this);
0069e62f      this->vtable = 0x801508;
0069e63a      this->m_file.id = INVALID_DID.id;
0069e63d      this->m_stype = Sound_Invalid;
0069e63d      
0069e644      if (this != arg2)
0069e644      {
0069e649          MediaDesc::operator=(this, arg2);
0069e651          this->m_file.id = arg2->m_file.id;
0069e657          this->m_stype = arg2->m_stype;
0069e644      }
0069e620  }

0069e661     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0069e670  void __thiscall MD_Data_Sound::Serialize(class MD_Data_Sound* this, class Archive* arg2)

0069e670  {
0069e67a      FileNodeName_UInt32::Serialize(this, arg2);
0069e683      Archive::CheckAlignment(arg2, 4);
0069e68c      uint8_t* eax = Archive::GetBytes(arg2, 4);
0069e68c      
0069e693      if (eax != 0)
0069e693      {
0069e699          if ((arg2->m_flags & 1) == 0)
0069e6a4              this->m_file.id = *(uint32_t*)eax;
0069e699          else
0069e69e              *(uint32_t*)eax = this->m_file.id;
0069e693      }
0069e693      
0069e6a7      enum SoundType m_stype = this->m_stype;
0069e6ae      Archive::CheckAlignment(arg2, 4);
0069e6b7      enum SoundType* eax_1 = Archive::GetBytes(arg2, 4);
0069e6b7      
0069e6be      if (eax_1 != 0)
0069e6be      {
0069e6c4          if ((arg2->m_flags & 1) == 0)
0069e6ca              m_stype = *(uint32_t*)eax_1;
0069e6c4          else
0069e6c6              *(uint32_t*)eax_1 = m_stype;
0069e6be      }
0069e6be      
0069e6d0      if ((arg2->m_flags & 5) == 0)
0069e6d2          this->m_stype = m_stype;
0069e670  }

0069e6db                                                                                   90 90 90 90 90                             .....

0069e6e0  void __fastcall MD_Data_Pause::MD_Data_Pause(class MD_Data_Pause* this)

0069e6e0  {
0069e6e5      MediaDesc::MediaDesc(this, 8);
0069e6f2      this->m_minDuration = 0f;
0069e6f5      this->m_maxDuration = 0f;
0069e6fd      this->m_endTime = 0f;
0069e700      this->vtable = 0x801580;
0069e706      *(uint32_t*)((char*)this->m_endTime)[4] = 0xbff00000;
0069e6e0  }

0069e70d                                         90 90 90                                                               ...

0069e710  float __fastcall MD_Data_Pause::GetDuration(class MD_Data_Pause const* this)

0069e710  {
0069e713      return ((int32_t)((long double)this->m_maxDuration));
0069e710  }

0069e714                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0069e720  void __thiscall MD_Data_Pause::MD_Data_Pause(class MD_Data_Pause* this, class MD_Data_Pause const* arg2)

0069e720  {
0069e724      MediaDesc::MediaDesc(this);
0069e737      this->m_minDuration = 0f;
0069e73a      this->m_maxDuration = 0f;
0069e742      this->vtable = 0x801580;
0069e748      this->m_endTime = 0f;
0069e74b      *(uint32_t*)((char*)this->m_endTime)[4] = 0xbff00000;
0069e74b      
0069e74e      if (this != arg2)
0069e74e      {
0069e753          MediaDesc::operator=(this, arg2);
0069e75b          this->m_minDuration = arg2->m_minDuration;
0069e761          this->m_maxDuration = arg2->m_maxDuration;
0069e74e      }
0069e720  }

0069e76b                                   90 90 90 90 90                                                             .....

0069e770  uint8_t __thiscall MD_Data_Pause::ToFileNode(class MD_Data_Pause const* this, class PFileNode* arg2)

0069e770  {
0069e772      class PFileNode* esi = arg2;
0069e77b      class PFileNode* eax;
0069e77b      
0069e77b      if ((esi != 0 && MediaDesc::ToFileNode(this, esi) != 0))
0069e77b      {
0069e791          class MD_Data_Pause* this_1 = this;
0069e7a6          InterlockedIncrement(&KW_MINDURATION.m_charbuffer[-1]);
0069e7aa          eax = PFileNode::MakeSubNode(esi, KW_MINDURATION.m_charbuffer);
0069e7aa          
0069e7b1          if (eax != 0)
0069e7b1          {
0069e7b3              float m_minDuration = this->m_minDuration;
0069e7b8              arg2 = m_minDuration;
0069e7bf              int32_t ecx_3;
0069e7bf              eax = PFileNode::MakeSubNodeAsFloat(eax, m_minDuration);
0069e7bf              
0069e7c6              if (eax != 0)
0069e7c6              {
0069e7c8                  int32_t var_10_4 = ecx_3;
0069e7dd                  InterlockedIncrement(&KW_MAXDURATION.m_charbuffer[-1]);
0069e7e1                  eax = PFileNode::MakeSubNode(esi, KW_MAXDURATION.m_charbuffer);
0069e7e1                  
0069e7e8                  if (eax != 0)
0069e7e8                  {
0069e7ea                      float m_maxDuration = this->m_maxDuration;
0069e7ef                      arg2 = m_maxDuration;
0069e7fd                      class PFileNode* eax_1;
0069e7fd                      eax_1 = PFileNode::MakeSubNodeAsFloat(eax, m_maxDuration) != 0;
0069e803                      return eax_1;
0069e7e8                  }
0069e7c6              }
0069e7b1          }
0069e77b      }
0069e77b      
0069e808      eax = 0;
0069e80b      return 0;
0069e770  }

0069e80e                                            90 90                                                                ..

0069e810  uint8_t __thiscall MD_Data_Pause::FromFileNode(class MD_Data_Pause* this, class PFileNode const* arg2)

0069e810  {
0069e815      class PFileNode* ebp = arg2;
0069e815      
0069e821      if (ebp == 0)
0069e821      {
0069e9df          int32_t eax;
0069e9df          eax = 0;
0069e9e5          return 0;
0069e821      }
0069e821      
0069e829      int32_t ebx;
0069e829      ebx = 1;
0069e82b      uint32_t eax_1 = PFileNode::GetNumSubNodes(ebp);
0069e836      uint32_t m_charbuffer_1 = 0;
0069e836      
0069e83e      if (eax_1 > 0)
0069e83e      {
0069e9ca          bool cond:2_1;
0069e9ca          
0069e9ca          do
0069e9ca          {
0069e854              struct PFileNode::VTable* vtable = ebp->vtable;
0069e857              uint32_t m_charbuffer = m_charbuffer_1;
0069e85a              class PFileNode* eax_2 = vtable->GetSubNode(m_charbuffer);
0069e85a              
0069e861              if (eax_2 == 0)
0069e8c5                  ebx = 0;
0069e861              else
0069e861              {
0069e863                  m_charbuffer = 0x8f99b4;
0069e863                  
0069e871                  if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e871                  {
0069e877                      m_charbuffer = 0x8f99b8;
0069e887                      class PStringBase<char> var_2c;
0069e887                      class PStringBase<char> ecx_6;
0069e887                      
0069e887                      if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e887                      {
0069e8cc                          m_charbuffer = 0x8f99ac;
0069e8cc                          
0069e8d8                          if (PFileNode::IsKeyword(eax_2, m_charbuffer) == 0)
0069e8d8                          {
0069e905                              class PSRefBufferCharData<char>* PStringBase<char>::s_NullBuffer_1 = PStringBase<char>::s_NullBuffer;
0069e90a                              arg2 = PStringBase<char>::s_NullBuffer_1;
0069e911                              m_charbuffer = &PStringBase<char>::s_NullBuffer_1[-1];
0069e912                              InterlockedIncrement(m_charbuffer);
0069e91c                              m_charbuffer = &arg2;
0069e91f                              PFileNode::GetNameAsPString(eax_2, m_charbuffer);
0069e924                              m_charbuffer = "] ignored";
0069e932                              void* var_c;
0069e932                              m_charbuffer = PStringBase<char>::PStringBase<char>(&var_c, m_charbuffer);
0069e939                              var_2c = &var_c;
0069e954                              class PStringBase<char> __return;
0069e954                              PStringBase<char>::operator+(operator+(&__return, "Unknown Keyword: [", &arg2), &m_charbuffer, var_2c);
0069e959                              var_2c = eax_2;
0069e95a                              PFileNode::ReportError(var_2c, m_charbuffer);
0069e963                              int32_t* esi_3 = (__return - 0x14);
0069e96c                              m_charbuffer = &esi_3[1];
0069e96c                              
0069e975                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_3 != 0))
0069e975                              {
0069e977                                  int32_t eax_14 = *(uint32_t*)esi_3;
0069e979                                  m_charbuffer = 1;
0069e97d                                  *(uint32_t*)eax_14(m_charbuffer);
0069e975                              }
0069e975                              
0069e983                              int32_t* esi_5 = ((char*)var_c - 0x14);
0069e989                              m_charbuffer = &esi_5[1];
0069e989                              
0069e992                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_5 != 0))
0069e992                              {
0069e994                                  int32_t edx_5 = *(uint32_t*)esi_5;
0069e996                                  m_charbuffer = 1;
0069e99a                                  *(uint32_t*)edx_5(m_charbuffer);
0069e992                              }
0069e992                              
0069e9a0                              void* __offset(PFileNode, -0x14) esi_7 = ((char*)arg2 - 0x14);
0069e9a6                              m_charbuffer = ((char*)esi_7 + 4);
0069e9a7                              ebx = 0;
0069e9a7                              
0069e9b1                              if ((InterlockedDecrement(m_charbuffer) == 0 && esi_7 != 0))
0069e9b1                              {
0069e9b3                                  int32_t edx_6 = *(int32_t*)((char*)ADJ(esi_7) + -0x14);
0069e9b5                                  m_charbuffer = 1;
0069e9b9                                  *(uint32_t*)edx_6(m_charbuffer);
0069e9b1                              }
0069e8d8                          }
0069e8d8                          else
0069e8d8                          {
0069e8dc                              class PFileNode* eax_9;
0069e8dc                              eax_9 = PFileNode::GetLeaf(eax_2);
0069e8e3                              uint8_t eax_10;
0069e8e3                              
0069e8e3                              if (eax_9 != 0)
0069e8e3                              {
0069e8ec                                  m_charbuffer = &this->m_maxDuration;
0069e8ef                                  eax_10 = PFileNode::GetNameAsFloat(eax_9, m_charbuffer);
0069e8e3                              }
0069e8e3                              
0069e8f6                              if ((eax_9 == 0 || eax_10 == 0))
0069e8f6                              {
0069e902                                  m_charbuffer = KW_MAXDURATION.m_charbuffer;
0069e903                                  goto label_69e8af;
0069e8f6                              }
0069e8d8                          }
0069e887                      }
0069e887                      else
0069e887                      {
0069e889                          class PFileNode* eax_5;
0069e889                          eax_5 = PFileNode::GetLeaf(eax_2);
0069e890                          uint8_t eax_6;
0069e890                          
0069e890                          if (eax_5 != 0)
0069e890                          {
0069e899                              m_charbuffer = &this->m_minDuration;
0069e89c                              eax_6 = PFileNode::GetNameAsFloat(eax_5, m_charbuffer);
0069e890                          }
0069e890                          
0069e8a3                          if ((eax_5 == 0 || eax_6 == 0))
0069e8a3                          {
0069e8ae                              m_charbuffer = KW_MINDURATION.m_charbuffer;
0069e8af                          label_69e8af:
0069e8af                              var_2c = ecx_6;
0069e8b7                              PStringBase<char>::PStringBase<char>(&var_2c, "MD_Data_Pause::FromFileNode, %s …");
0069e8bd                              PFileNode::ReportError(eax_2, var_2c);
0069e8c5                              ebx = 0;
0069e8a3                          }
0069e887                      }
0069e871                  }
0069e861              }
0069e861              
0069e9c4              cond:2_1 = (m_charbuffer_1 + 1) < eax_1;
0069e9c6              m_charbuffer_1 += 1;
0069e9ca          } while (cond:2_1);
0069e83e      }
0069e83e      
0069e9d0      eax_1 = ebx;
0069e9d9      return eax_1;
0069e810  }

0069e9e8                          90 90 90 90 90 90 90 90                                                          ........

0069e9f0  void __fastcall MD_Data_Alpha::MD_Data_Alpha(class MD_Data_Alpha* this)

0069e9f0  {
0069e9f5      MediaDesc::MediaDesc(this, 2);
0069e9fa      this->vtable = 0x801628;
0069ea05      this->m_file.id = INVALID_DID.id;
0069e9f0  }

0069ea0c                                      90 90 90 90                                                              ....

0069ea10  void __thiscall MD_Data_Alpha::MD_Data_Alpha(class MD_Data_Alpha* this, class MD_Data_Alpha const* arg2)

0069ea10  {
0069ea14      MediaDesc::MediaDesc(this);
0069ea1f      this->vtable = 0x801628;
0069ea2a      this->m_file.id = INVALID_DID.id;
0069ea2a      
0069ea2d      if (this != arg2)
0069ea2d      {
0069ea32          MediaDesc::operator=(this, arg2);
0069ea3a          this->m_file.id = arg2->m_file.id;
0069ea2d      }
0069ea10  }

0069ea44              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

0069ea50  void __thiscall MD_Data_Alpha::Serialize(class MD_Data_Alpha* this, class Archive* arg2)

0069ea50  {
0069ea59      FileNodeName_UInt32::Serialize(this, arg2);
0069ea62      Archive::CheckAlignment(arg2, 4);
0069ea6b      uint32_t* eax = Archive::GetBytes(arg2, 4);
0069ea6b      
0069ea72      if (eax != 0)
0069ea72      {
0069ea78          if ((arg2->m_flags & 1) != 0)
0069ea78          {
0069ea7e              *(uint32_t*)eax = this->m_file.id;
0069ea81              return;
0069ea78          }
0069ea78          
0069ea86          this->m_file.id = *(uint32_t*)eax;
0069ea72      }
0069ea50  }

0069ea8e                                            90 90                                                                ..

0069ea90  void* __thiscall MD_Data_Alpha::`scalar deleting destructor'(class MD_Data_Alpha* this, uint32_t arg2)

0069ea90  {
0069ea93      MediaDesc::~MediaDesc(this);
0069ea93      
0069ea9d      if ((arg2 & 1) != 0)
0069eaa0          operator delete(this);
0069eaa0      
0069eaab      return this;
0069ea90  }

0069eaae                                            90 90                                                                ..

0069eab0  void __thiscall MD_Data_Alpha::GetSubDataIDs(class MD_Data_Alpha const* this, class QualifiedDataIDArray* arg2)

0069eab0  {
0069eabc      NoticeHandler::RecvNotice_WorldName(this, arg2);
0069ead5      void var_8;
0069ead5      QualifiedDataIDArray::AddQDID(arg2, QualifiedDataID::QualifiedDataID(&var_8, this->m_file.id, 0), 0);
0069eab0  }

0069eae2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

0069eaf0  void __thiscall MD_Data_Anim::GetSubDataIDs(class MD_Data_Anim const* this, class QualifiedDataIDArray* arg2)

0069eaf0  {
0069eaf9      NoticeHandler::RecvNotice_WorldName(this, arg2);
0069eb06      QualifiedDataIDArray::CopyDIDs(arg2, &this->m_frames, 0);
0069eaf0  }


0069eb10  uint8_t IInputActionCallback::OnAction(class IInputActionCallback* this @ ecx, class InputEvent const* arg2) __pure

0069eb10  {
0069eb10      int32_t eax;
0069eb10      eax = 0;
0069eb12      return 0;
0069eb10  }

0069eb15                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0069eb20  void __fastcall MD_Data_Anim::MD_Data_Anim(class MD_Data_Anim* this)

0069eb20  {
0069eb25      MediaDesc::MediaDesc(this, 3);
0069eb32      this->m_duration = 0f;
0069eb35      this->vtable = 0x8016a0;
0069eb3b      this->m_drawMode = 1;
0069eb42      this->m_frames.m_data = 0;
0069eb45      this->m_frames.m_sizeAndDeallocate = 0;
0069eb48      this->m_frames.m_num = 0;
0069eb50      this->m_StartTime = 0f;
0069eb53      *(uint32_t*)((char*)this->m_StartTime)[4] = 0xbff00000;
0069eb56      this->m_displayedFrameNum = 0xffffffff;
0069eb20  }

0069eb61     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0069eb70  float __fastcall MD_Data_Anim::GetDuration(class MD_Data_Anim const* this)

0069eb70  {
0069eb73      return ((int32_t)((long double)this->m_duration));
0069eb70  }

0069eb74                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0069eb80  void __thiscall SmartArray<IDClass<_tagDataID,32,0>,1>::Serialize(class SmartArray<IDClass<_tagDataID,32,0>,1>* this, class Archive* arg2)

0069eb80  {
0069eb89      uint32_t m_num = this->m_num;
0069eb90      Archive::CheckAlignment(arg2, 4);
0069eb99      uint8_t* eax = Archive::GetBytes(arg2, 4);
0069eb99      
0069eba0      if (eax != 0)
0069eba0      {
0069eba6          if ((arg2->m_flags & 1) == 0)
0069ebac              m_num = *(uint32_t*)eax;
0069eba6          else
0069eba8              *(uint32_t*)eax = m_num;
0069eba0      }
0069eba0      
0069ebae      eax = arg2->m_flags;
0069ebb1      eax = !(eax);
0069ebb1      
0069ebb5      if ((eax & 1) != 0)
0069ebb5      {
0069ebc0          if (m_num > Archive::GetSizeLeft(arg2))
0069ebc0          {
0069ebc4              Archive::RaiseError(arg2);
0069ebcc              return;
0069ebc0          }
0069ebc0          
0069ebd4          this->m_num = 0;
0069ebdb          SmartArray<IDClass<_tagDataID,32,0>,1>::SetNElements(this, m_num, 1);
0069ebb5      }
0069ebb5      
0069ebe7      if (this->m_num > 0)
0069ebe7      {
0069ebea          int32_t i = 0;
0069ebea          
0069ec23          do
0069ec23          {
0069ebf2              void* ebp_1 = &this->m_data[i];
0069ebf9              Archive::CheckAlignment(arg2, 4);
0069ec02              uint8_t* eax_3 = Archive::GetBytes(arg2, 4);
0069ec02              
0069ec09              if (eax_3 != 0)
0069ec09              {
0069ec0f                  if ((arg2->m_flags & 1) == 0)
0069ec1a                      *(uint32_t*)ebp_1 = *(uint32_t*)eax_3;
0069ec0f                  else
0069ec14                      *(uint32_t*)eax_3 = *(uint32_t*)ebp_1;
0069ec09              }
0069ec09              
0069ec20              i += 1;
0069ec23          } while (i < this->m_num);
0069ebe7      }
0069eb80  }

0069ec2c                                      90 90 90 90                                                              ....

0069ec30  void* __thiscall MD_Data_Anim::`scalar deleting destructor'(class MD_Data_Anim* this, uint32_t arg2)

0069ec30  {
0069ec36      SmartArray<IDClass<_tagDataID,32,0>,1>::~SmartArray<IDClass<_tagDataID,32,0>,1>(&this->m_frames);
0069ec3d      MediaDesc::~MediaDesc(this);
0069ec3d      
0069ec47      if ((arg2 & 1) != 0)
0069ec4a          operator delete(this);
0069ec4a      
0069ec55      return this;
0069ec30  }

0069ec58                                                                          90 90 90 90 90 90 90 90                          ........

0069ec60  void __thiscall MD_Data_Anim::MD_Data_Anim(class MD_Data_Anim* this, class MD_Data_Anim const* arg2)

0069ec60  {
0069ec65      MediaDesc::MediaDesc(this);
0069ec78      this->m_duration = 0f;
0069ec7e      this->vtable = 0x8016a0;
0069ec84      this->m_drawMode = 1;
0069ec7b      this->m_frames.m_data = 0;
0069ec7b      this->m_frames.m_sizeAndDeallocate = 0;
0069ec7b      this->m_frames.m_num = 0;
0069ec98      this->m_StartTime = 0f;
0069ec9b      *(uint32_t*)((char*)this->m_StartTime)[4] = 0xbff00000;
0069ec9e      this->m_displayedFrameNum = 0xffffffff;
0069ec9e      
0069eca5      if (this != arg2)
0069eca5      {
0069ecaa          MediaDesc::operator=(this, arg2);
0069ecb2          this->m_duration = arg2->m_duration;
0069ecbe          this->m_drawMode = arg2->m_drawMode;
0069ecc1          SmartArray<IDClass<_tagDataID,32,0>,1>::operator=(&this->m_frames.m_data, &arg2->m_frames);
0069eca5      }
0069ec60  }

0069ecce                                            90 90                                                                ..

0069ecd0  void __thiscall MD_Data_Anim::Serialize(class MD_Data_Anim* this, class Archive* arg2)

0069ecd0  {
0069ecd9      FileNodeName_UInt32::Serialize(this, arg2);
0069ece2      Archive::CheckAlignment(arg2, 4);
0069eceb      uint8_t* eax = Archive::GetBytes(arg2, 4);
0069eceb      
0069ecf2      if (eax != 0)
0069ecf2      {
0069ecf8          if ((arg2->m_flags & 1) == 0)
0069ed03              this->m_duration = *(uint32_t*)eax;
0069ecf8          else
0069ecfd              *(uint32_t*)eax = this->m_duration;
0069ecf2      }
0069ecf2      
0069ed0a      Archive::CheckAlignment(arg2, 4);
0069ed13      uint32_t* eax_1 = Archive::GetBytes(arg2, 4);
0069ed13      
0069ed1a      if (eax_1 != 0)
0069ed1a      {
0069ed20          if ((arg2->m_flags & 1) != 0)
0069ed20          {
0069ed25              *(uint32_t*)eax_1 = this->m_drawMode;
0069ed2b              SmartArray<IDClass<_tagDataID,32,0>,1>::Serialize(&this->m_frames, arg2);
0069ed32              return;
0069ed20          }
0069ed20          
0069ed37          this->m_drawMode = *(uint32_t*)eax_1;
0069ed1a      }
0069ed1a      
0069ed3e      SmartArray<IDClass<_tagDataID,32,0>,1>::Serialize(&this->m_frames, arg2);
0069ecd0  }

0069ed48                          90 90 90 90 90 90 90 90                                                          ........

0069ed50  void __fastcall UIRegion::ClearAlphaImage(class UIRegion* this)

0069ed50  {
0069ed53      class Graphic* m_alphaImage = this->m_alphaImage;
0069ed53      
0069ed5b      if (m_alphaImage != 0)
0069ed5d          m_alphaImage->vtable->__vecDelDtor(1);
0069ed5d      
0069ed63      this->m_alphaImage = nullptr;
0069ed50  }

0069ed6f                                               90                                                                 .

0069ed70  void __stdcall UIRegion::EraseBackground(class UIRegion* this @ ecx, class Box2D const* arg2, class UISurface* arg3)

0069ed70  {
0069ed7c      int32_t m_y0 = arg2->m_y0;
0069ed80      int32_t m_x0 = arg2->m_x0;
0069ed83      int32_t m_y1 = arg2->m_y1;
0069ed87      int32_t m_x1 = arg2->m_x1;
0069ed8a      UISurface::PrepareSurface(arg3);
0069ed9f      int32_t var_2c;
0069ed9f      SurfaceWindow::SurfaceWindow(&var_2c, arg3->m_pLocalSurface, m_x0, m_y0, m_x1, m_y1);
0069edad      SurfaceWindow::Fill(&var_2c, &RGBAColor_Null);
0069edb6      var_2c = 0x798d14;
0069edbe      SurfaceWindow::End(&var_2c);
0069ed70  }

0069edcd                                         90 90 90                                                               ...

0069edd0  void __thiscall UIRegion::SetShouldBlockClicks(class UIRegion* this, uint8_t arg2)

0069edd0  {
0069edd5      union __bitfield164 = this->__bitfield164;
0069ede5      this->__bitfield164 = (__bitfield164 ^ (((((uint32_t)arg2) << 6) ^ __bitfield164) & 0x40));
0069edd0  }

0069edee                                            90 90                                                                ..

0069edf0  void __thiscall UIRegion::SetClampGameViewEdge(class UIRegion* this, uint32_t arg2)

0069edf0  {
0069edf0      class UIObject* m_object = this->m_object;
0069edf0      
0069edf8      if (m_object != 0)
0069edf8      {
0069ee0d          m_object->m_eClampGameView = arg2;
0069ee10          RenderUI::RecalculateClampedPosition();
0069ee10          return;
0069edf8      }
0069edf8      
0069edfa      class UIRegion* m_parent = this->m_parent;
0069edfa      
0069ee02      if (m_parent != 0)
0069ee06          /* jump -> m_parent->vtable->SetClampGameViewEdge */
0069edf0  }

0069ee18                                                                          90 90 90 90 90 90 90 90                          ........

0069ee20  void __fastcall UIRegion::BringToFront(class UIRegion* this)

0069ee20  {
0069ee20      class UIRegion* m_parent = this->m_parent;
0069ee20      
0069ee28      if (m_parent != 0)
0069ee2f          *(int32_t*)((char*)m_parent->vtable + 0x48)(this);
0069ee20  }

0069ee33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069ee40  uint8_t __thiscall UIRegion::PointIsOverRegion(class UIRegion const* this, int32_t arg2, int32_t arg3)

0069ee40  {
0069ee6b      class UIRegion* eax;
0069ee6b      
0069ee6b      if ((arg2 >= this->m_box.m_x0 && (arg2 <= this->m_box.m_x1 && (arg3 >= this->m_box.m_y0 && arg3 <= this->m_box.m_y1))))
0069ee6b      {
0069ee6d          class Graphic* m_alphaImage = this->m_alphaImage;
0069ee75          bool cond:1_1;
0069ee75          
0069ee75          if (m_alphaImage != 0)
0069ee8c              cond:1_1 = Graphic::PointTest(m_alphaImage, (arg2 - this->m_box.m_x0), (arg3 - this->m_box.m_y0)) == 0;
0069ee8c          
0069ee8f          if ((m_alphaImage == 0 || cond:1_1))
0069ee8f          {
0069ee99              eax = 1;
0069ee9c              return 1;
0069ee8f          }
0069ee6b      }
0069ee6b      
0069ee92      eax = 0;
0069ee95      return 0;
0069ee40  }

0069ee9f                                                                                               90                                 .

0069eea0  void __thiscall UIRegion::NotifyMouseMove(class UIRegion* this, int32_t arg2, int32_t arg3)

0069eea0  {
0069eea2      /* jump -> this->vtable->MouseMove */
0069eea0  }

0069eea5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0069eeb0  void __thiscall UIRegion::NotifyMouseTap(class UIRegion* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

0069eeb0  {
0069eeb2      /* jump -> this->vtable->MouseTap */
0069eeb0  }

0069eeb8                                                                          90 90 90 90 90 90 90 90                          ........

0069eec0  int32_t __fastcall UIRegion::GetObjectX0(class UIRegion const* this)

0069eec0  {
0069eecb      if (this->m_object == 0)
0069eecb      {
0069eecd          class UIRegion* m_parent = this->m_parent;
0069eecd          
0069eed5          if (m_parent != 0)
0069eee0              return (UIRegion::GetObjectX0(m_parent) + this->m_box.m_x0);
0069eecb      }
0069eecb      
0069eee4      return 0;
0069eec0  }

0069eee5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0069eef0  int32_t __fastcall UIRegion::GetObjectY0(class UIRegion const* this)

0069eef0  {
0069eefb      if (this->m_object == 0)
0069eefb      {
0069eefd          class UIRegion* m_parent = this->m_parent;
0069eefd          
0069ef05          if (m_parent != 0)
0069ef13              return (UIRegion::GetObjectY0(m_parent) + this->m_box.m_y0);
0069eefb      }
0069eefb      
0069ef17      return 0;
0069eef0  }

0069ef18                                                                          90 90 90 90 90 90 90 90                          ........

0069ef20  class Box2D* __fastcall UIRegion::GetSurfaceBox(class UIRegion const* this, class Box2D* __return)

0069ef20  {
0069ef20      void* const* var_8;
0069ef20      int32_t* esp = &var_8;
0069ef23      class UIObject* m_object = this->m_object;
0069ef2b      var_8 = nullptr;
0069ef33      int32_t var_4 = 0;
0069ef33      
0069ef3b      if (m_object != 0)
0069ef3b      {
0069ef3f          int32_t* eax_2 = *(int32_t*)((char*)m_object->vtable + 0x1c)();
0069ef3f          esp = &__return_addr;
0069ef3f          
0069ef44          if (eax_2 != 0)
0069ef44          {
0069ef46              int32_t edx_1 = *(uint32_t*)eax_2;
0069ef4c              class Box2D** var_4_1 = &__return;
0069ef51              var_8 = &__return_addr;
0069ef51              esp = &var_8;
0069ef54              *(uint32_t*)(edx_1 + 0x14)(var_8, var_4_1);
0069ef44          }
0069ef3b      }
0069ef3b      
0069ef57      int32_t* result = esp[3];
0069ef63      int32_t edx_3 = (*(uint32_t*)esp - 1);
0069ef64      int32_t ecx_2 = (esp[1] - 1);
0069ef65      *(uint32_t*)result = 0;
0069ef6b      result[1] = 0;
0069ef72      result[2] = edx_3;
0069ef75      result[3] = ecx_2;
0069ef7b      return result;
0069ef20  }

0069ef7e                                                                                            90 90                                ..

0069ef80  int32_t __fastcall UIRegion::GetScreenX0(class UIRegion const* this)

0069ef80  {
0069ef83      class UIObject* m_object = this->m_object;
0069ef83      
0069ef8b      if (m_object != 0)
0069ef91          return m_object->m_nVirtualX;
0069ef91      
0069ef92      class UIRegion* m_parent = this->m_parent;
0069ef92      
0069ef9a      if (m_parent == 0)
0069efa9          return 0;
0069efa9      
0069efa5      return (UIRegion::GetScreenX0(m_parent) + this->m_box.m_x0);
0069ef80  }

0069efaa                                90 90 90 90 90 90                                                            ......

0069efb0  int32_t __fastcall UIRegion::GetScreenY0(class UIRegion const* this)

0069efb0  {
0069efb3      class UIObject* m_object = this->m_object;
0069efb3      
0069efbb      if (m_object != 0)
0069efc1          return m_object->m_nVirtualY;
0069efc1      
0069efc2      class UIRegion* m_parent = this->m_parent;
0069efc2      
0069efca      if (m_parent == 0)
0069efdc          return 0;
0069efdc      
0069efd8      return (UIRegion::GetScreenY0(m_parent) + this->m_box.m_y0);
0069efb0  }

0069efdd                                                                                         90 90 90                               ...

0069efe0  int32_t __fastcall UIRegion::GetWidth(class UIRegion const* this)

0069efe0  {
0069efea      return ((this->m_box.m_x1 - this->m_box.m_x0) + 1);
0069efe0  }

0069efeb                                   90 90 90 90 90                                                             .....

0069eff0  int32_t __fastcall UIRegion::GetHeight(class UIRegion const* this)

0069eff0  {
0069effd      return ((this->m_box.m_y1 - this->m_box.m_y0) + 1);
0069eff0  }

0069effe                                                                                            90 90                                ..

0069f000  int32_t __thiscall UIRegion::CompareZLevel(class UIRegion const* this, class UIRegion const* arg2)

0069f000  {
0069f000      int32_t m_zlevel = this->m_zlevel;
0069f00a      int32_t m_zlevel_1 = arg2->m_zlevel;
0069f00a      
0069f012      if (m_zlevel < m_zlevel_1)
0069f017          return 0xffffffff;
0069f017      
0069f01e      int32_t result;
0069f01e      result = m_zlevel != m_zlevel_1;
0069f023      return result;
0069f000  }

0069f026                    90 90 90 90 90 90 90 90 90 90                                                        ..........

0069f030  void __thiscall UIRegion::SetAlphaImageByDID(class UIRegion* this, class IDClass<_tagDataID,32,0> arg2)

0069f030  {
0069f033      class Graphic* m_alphaImage = this->m_alphaImage;
0069f033      
0069f03b      if (m_alphaImage != 0)
0069f03d          m_alphaImage->vtable->__vecDelDtor(1);
0069f03d      
0069f045      this->m_alphaImage = nullptr;
0069f04f      void* eax_2 = operator new(0xc);
0069f04f      
0069f059      if (eax_2 != 0)
0069f059      {
0069f067          this->m_alphaImage = Graphic::Graphic(eax_2, arg2);
0069f06e          return;
0069f059      }
0069f059      
0069f073      this->m_alphaImage = nullptr;
0069f030  }

0069f07d                                                                                         90 90 90                               ...

0069f080  void __thiscall UIRegion::AddDirtyRect(class UIRegion* this, class Box2D const* arg2)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069f15a                                                                                90 90 90 90 90 90                            ......

0069f160  void __thiscall UIRegion::EraseSelf(class UIRegion* this, class Box2D const* arg2, class Box2D const* arg3, class SmartArray<Box2D,1> const* arg4, class UISurface* arg5)

0069f160  {
0069f166      uint32_t m_num = arg4->m_num;
0069f166      
0069f16e      if (m_num > 0)
0069f16e      {
0069f173          uint32_t esi_2 = (m_num << 4);
0069f18c          uint32_t i;
0069f18c          
0069f18c          do
0069f18c          {
0069f17f              esi_2 -= 0x10;
0069f17d              this->vtable->EraseBackground((arg4->m_data + esi_2), arg5);
0069f18b              i = m_num;
0069f18b              m_num -= 1;
0069f18c          } while (i != 1);
0069f16e      }
0069f160  }

0069f195                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0069f1a0  void __thiscall UIRegion::DrawSelf(class UIRegion* this, class Box2D const* arg2, class Box2D const* arg3, class SmartArray<Box2D,1> const* arg4, class UISurface* arg5)

0069f1a0  {
0069f1a0      class Box2D* edx = arg2;
0069f1a8      int32_t m_y0 = edx->m_y0;
0069f1b7      int32_t m_x0 = edx->m_x0;
0069f1b7      
0069f1b9      if (this->m_image != 0)
0069f1b9      {
0069f1c3          uint32_t m_num = arg4->m_num;
0069f1c3          
0069f1c8          if (m_num > 0)
0069f1c8          {
0069f1d1              uint32_t ebp_2 = (m_num << 4);
0069f1d4              uint32_t m_num_1 = m_num;
0069f1d4              
0069f1e6              while (true)
0069f1e6              {
0069f1e6                  ebp_2 -= 0x10;
0069f1e9                  void* eax_3 = (arg4->m_data + ebp_2);
0069f1f1                  int32_t var_10;
0069f1f1                  
0069f1f1                  if (&var_10 != eax_3)
0069f1f1                  {
0069f1f5                      var_10 = *(uint32_t*)eax_3;
0069f1fc                      int32_t var_8_1 = *(uint32_t*)((char*)eax_3 + 8);
0069f203                      int32_t var_c_1 = *(uint32_t*)((char*)eax_3 + 4);
0069f20a                      int32_t var_4_1 = *(uint32_t*)((char*)eax_3 + 0xc);
0069f1f1                  }
0069f1f1                  
0069f212                  var_10 = (*(uint32_t*)eax_3 - m_x0);
0069f21b                  int32_t var_c_2 = (*(uint32_t*)((char*)eax_3 + 4) - m_y0);
0069f224                  int32_t var_8_2 = (*(uint32_t*)((char*)eax_3 + 8) - m_x0);
0069f22d                  int32_t var_4_2 = (*(uint32_t*)((char*)eax_3 + 0xc) - m_y0);
0069f258                  Graphic::Draw(this->m_image, this->m_eBlitMode, this->m_alphaBlendMod, edx, eax_3, &var_10, &this->m_ptTilingOffset, arg5);
0069f25d                  uint32_t m_num_2 = m_num_1;
0069f25d                  m_num_1 -= 1;
0069f25d                  
0069f261                  if (m_num_2 == 1)
0069f261                      break;
0069f261                  
0069f1da                  edx = arg2;
0069f1e6              }
0069f1c8          }
0069f1b9      }
0069f1a0  }

0069f271                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0069f280  class Box2D* __thiscall UIRegion::GetObjectBox(class UIRegion const* this, class Box2D* __return)

0069f280  {
0069f284      class UIRegion* this_1 = this;
0069f286      class UIObject* m_object = this_1->m_object;
0069f28e      int32_t m_x1 = this_1->m_box.m_x1;
0069f294      int32_t m_x0 = this_1->m_box.m_x0;
0069f298      int32_t m_y0 = this_1->m_box.m_y0;
0069f29f      int32_t m_y1 = this_1->m_box.m_y1;
0069f2ae      class UIRegion* m_parent;
0069f2ae      
0069f2ae      if (m_object == 0)
0069f2b0          m_parent = this_1->m_parent;
0069f2b0      
0069f2b8      int32_t edi_1;
0069f2b8      
0069f2b8      if ((m_object != 0 || m_parent == 0))
0069f2c7          edi_1 = 0;
0069f2b8      else
0069f2b8      {
0069f2ba          int32_t eax;
0069f2ba          eax = UIRegion::GetObjectY0(m_parent);
0069f2c3          edi_1 = (eax + m_y0);
0069f2b8      }
0069f2b8      
0069f2cb      class UIRegion* m_parent_1;
0069f2cb      
0069f2cb      if (m_object == 0)
0069f2cd          m_parent_1 = this_1->m_parent;
0069f2cd      
0069f2d5      int32_t eax_3;
0069f2d5      
0069f2d5      if ((m_object != 0 || m_parent_1 == 0))
0069f2e1          eax_3 = 0;
0069f2d5      else
0069f2d5      {
0069f2d7          int32_t eax_2;
0069f2d7          int32_t edx;
0069f2d7          eax_2 = UIRegion::GetObjectX0(m_parent_1);
0069f2dc          eax_3 = (eax_2 + *(uint32_t*)(edx + 0x7c));
0069f2d5      }
0069f2d5      
0069f2e3      int32_t* result = __return;
0069f2ef      *(uint32_t*)result = eax_3;
0069f2f9      result[1] = edi_1;
0069f2fd      result[3] = ((m_y1 - m_y0) + edi_1);
0069f302      result[2] = ((eax_3 - m_x0) + m_x1);
0069f30b      return result;
0069f280  }

0069f30e                                            90 90                                                                ..

0069f310  int32_t __fastcall UIRegion::GetScreenX1(class UIRegion const* this)

0069f310  {
0069f312      class UIObject* m_object = this->m_object;
0069f312      
0069f31a      if (m_object != 0)
0069f32a          return ((this->m_box.m_x1 - this->m_box.m_x0) + m_object->m_nVirtualX);
0069f32a      
0069f32b      class UIRegion* m_parent = this->m_parent;
0069f32b      
0069f333      if (m_parent == 0)
0069f358          return (this->m_box.m_x1 - this->m_box.m_x0);
0069f358      
0069f335      int32_t eax_3;
0069f335      void* edx;
0069f335      eax_3 = UIRegion::GetScreenX0(m_parent);
0069f34a      return ((*(uint32_t*)((char*)edx + 0x84) - *(uint32_t*)((char*)edx + 0x7c)) + (eax_3 + *(uint32_t*)((char*)edx + 0x7c)));
0069f310  }

0069f359                                                                             90 90 90 90 90 90 90                           .......

0069f360  int32_t __fastcall UIRegion::GetScreenY1(class UIRegion const* this)

0069f360  {
0069f362      class UIObject* m_object = this->m_object;
0069f362      
0069f36a      if (m_object != 0)
0069f37d          return ((this->m_box.m_y1 - this->m_box.m_y0) + m_object->m_nVirtualY);
0069f37d      
0069f37e      class UIRegion* m_parent = this->m_parent;
0069f37e      
0069f386      if (m_parent == 0)
0069f3b4          return (this->m_box.m_y1 - this->m_box.m_y0);
0069f3b4      
0069f388      int32_t eax_3;
0069f388      void* edx;
0069f388      eax_3 = UIRegion::GetScreenY0(m_parent);
0069f3a3      return ((*(uint32_t*)((char*)edx + 0x88) - *(uint32_t*)((char*)edx + 0x80)) + (eax_3 + *(uint32_t*)((char*)edx + 0x80)));
0069f360  }

0069f3b5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

0069f3c0  class Box2D* __thiscall UIRegion::GetClipBox(class UIRegion const* this, class Box2D* __return)

0069f3c0  {
0069f3c8      class UIObject* m_object = this->m_object;
0069f3d5      int32_t m_x0 = 0;
0069f3d9      int32_t var_28 = 0xffffffff;
0069f3dd      int32_t var_2c = 0;
0069f3e1      int32_t var_24 = 0xffffffff;
0069f3e5      int32_t __return_1;
0069f3e5      
0069f3e5      if (m_object == 0)
0069f3e5      {
0069f401          class UIRegion* m_parent = this->m_parent;
0069f401          
0069f409          if (m_parent != 0)
0069f409          {
0069f410              class Box2D* eax_3 = UIRegion::GetClipBox(m_parent, &__return_1);
0069f410              
0069f41b              if (&m_x0 != eax_3)
0069f41b              {
0069f41f                  int32_t m_x1 = eax_3->m_x1;
0069f422                  m_x0 = eax_3->m_x0;
0069f42c                  int32_t m_x1_1 = m_x1;
0069f430                  int32_t m_y0 = eax_3->m_y0;
0069f434                  int32_t m_y1 = eax_3->m_y1;
0069f41b              }
0069f409          }
0069f3e5      }
0069f3e5      else
0069f3e5      {
0069f3ed          int32_t eax_2 = (m_object->m_nVirtualWidth - 1);
0069f3ee          int32_t ecx_1 = (m_object->m_nVirtualHeight - 1);
0069f3ef          m_x0 = 0;
0069f3f3          int32_t var_28_1 = eax_2;
0069f3f7          int32_t var_2c_1 = 0;
0069f3fb          int32_t var_24_1 = ecx_1;
0069f3e5      }
0069f3e5      
0069f43c      int32_t* var_40_2 = &__return_1;
0069f444      __return_1 = 0;
0069f448      int32_t var_1c = 0;
0069f44c      int32_t var_18 = 0;
0069f450      int32_t var_14 = 0;
0069f454      void __return_2;
0069f454      class Box2D* eax_5;
0069f454      class Box2D* edx_3;
0069f454      eax_5 = UIRegion::GetObjectBox(this, &__return_2);
0069f454      
0069f469      if (Box2D::Intersection(&m_x0, edx_3, eax_5) != 0)
0069f469      {
0069f48d          if (__return != &__return_1)
0069f48d          {
0069f497              __return->m_x0 = __return_1;
0069f49d              __return->m_x1 = var_18;
0069f4a4              __return->m_y0 = var_1c;
0069f4a7              __return->m_y1 = var_14;
0069f48d          }
0069f469      }
0069f469      else if (__return != &__return_2)
0069f471      {
0069f474          __return->m_x0 = 0;
0069f476          __return->m_y0 = 0;
0069f47a          __return->m_x1 = 0xffffffff;
0069f47d          __return->m_y1 = 0xffffffff;
0069f471      }
0069f471      
0069f4b0      return __return;
0069f3c0  }

0069f4b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069f4c0  class Box2D* __thiscall UIRegion::GetScreenClipBox(class UIRegion const* this, class Box2D* __return)

0069f4c0  {
0069f4cd      int32_t __return_1;
0069f4cd      UIRegion::GetClipBox(this, &__return_1);
0069f4d9      int32_t __return_2;
0069f4d9      UIRegion::GetObjectBox(this, &__return_2);
0069f4de      class UIObject* m_object = this->m_object;
0069f4e6      uint32_t m_nVirtualY;
0069f4e6      
0069f4e6      if (m_object == 0)
0069f4e6      {
0069f4ed          class UIRegion* m_parent = this->m_parent;
0069f4ed          
0069f4f5          if (m_parent == 0)
0069f506              m_nVirtualY = 0;
0069f4f5          else
0069f4fe              m_nVirtualY = (UIRegion::GetScreenY0(m_parent) + this->m_box.m_y0);
0069f4e6      }
0069f4e6      else
0069f4e8          m_nVirtualY = m_object->m_nVirtualY;
0069f4e8      
0069f50a      uint32_t m_nVirtualX;
0069f50a      
0069f50a      if (m_object == 0)
0069f50a      {
0069f511          class UIRegion* m_parent_1 = this->m_parent;
0069f511          
0069f519          if (m_parent_1 == 0)
0069f525              m_nVirtualX = 0;
0069f519          else
0069f519          {
0069f51b              int32_t eax_2;
0069f51b              eax_2 = UIRegion::GetScreenX0(m_parent_1);
0069f520              m_nVirtualX = (eax_2 + this->m_box.m_x0);
0069f519          }
0069f50a      }
0069f50a      else
0069f50c          m_nVirtualX = m_object->m_nVirtualX;
0069f50c      
0069f53b      int32_t __return_3 = __return_1;
0069f53f      int32_t var_1c;
0069f53f      int32_t var_c;
0069f53f      int32_t ecx_3 = ((var_1c - var_c) + m_nVirtualY);
0069f541      int32_t eax_4 = ((m_nVirtualX - __return_2) + __return_3);
0069f54d      __return->m_y0 = ecx_3;
0069f550      __return->m_x0 = eax_4;
0069f55c      int32_t var_18;
0069f55c      __return->m_x1 = ((var_18 - __return_3) + eax_4);
0069f55f      int32_t var_14;
0069f55f      __return->m_y1 = ((ecx_3 - var_1c) + var_14);
0069f566      return __return;
0069f4c0  }

0069f569                             90 90 90 90 90 90 90                                                           .......

0069f570  void* __thiscall IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::`scalar deleting destructor'(class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, uint32_t arg2)

0069f570  {
0069f573      struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_buckets = this->m_buckets;
0069f57b      this->vtable = 0x801714;
0069f57b      
0069f581      if (m_buckets != &this->m_aInplaceBuckets)
0069f584          operator delete[](m_buckets);
0069f584      
0069f58e      this->m_buckets = nullptr;
0069f591      this->m_firstInterestingBucket = nullptr;
0069f594      this->m_numBuckets = 0;
0069f597      this->m_numElements = 0;
0069f597      
0069f59f      if ((arg2 & 1) != 0)
0069f5a2          operator delete(this);
0069f5a2      
0069f5ad      return this;
0069f570  }


0069f5b0  void __thiscall UIRegion::MakeRootDirtyHere(class UIRegion* this)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069f5d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069f5e0  void __thiscall UIRegion::SetAlphaBlendMod(class UIRegion* this, float arg2)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...


0069f660  void __thiscall UIRegion::SetParent(class UIRegion* this, class UIRegion* arg2)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069f6e8                          90 90 90 90 90 90 90 90                                                          ........

0069f6f0  void __thiscall UIRegion::SetBlitMode(class UIRegion* this, enum BlitMode arg2)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069f727                       90 90 90 90 90 90 90 90 90                                                         .........

0069f730  void __thiscall UIRegion::SetTilingOffset(class UIRegion* this, struct tagPOINT const* arg2)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069f781     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

0069f790  void __thiscall UIRegion::SetImage(class UIRegion* this, class Graphic* arg2)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069f7d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

0069f7e0  void __thiscall UIRegion::ClearImage(class UIRegion* this)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069f825                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0069f830  void __thiscall UIRegion::MoveTo(class UIRegion* this, int32_t const arg2, int32_t const arg3)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...


0069f8c0  void __thiscall UIRegion::ResizeTo(class UIRegion* this, int32_t const arg2, int32_t const arg3)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069f951                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

0069f960  void __thiscall UIRegion::SetImageByDID(class UIRegion* this, class IDClass<_tagDataID,32,0> arg2, uint32_t arg3)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069fa25                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

0069fa30  void __thiscall UIRegion::DrawHere(class UIRegion* this, class Box2D const* arg2, class Box2D const* arg3, class SmartArray<Box2D,1> const* arg4, class UISurface* arg5)

0069fa30  {
0069fa5c      if ((arg4->m_num != 0 && (arg5 != 0 && (((int8_t)(this->__bitfield164 >> 1)) & 1) != 0)))
0069fa5c      {
0069fa66          int32_t m_x0_1 = arg2->m_x0;
0069fa69          int32_t m_x1 = arg2->m_x1;
0069fa69          
0069fa79          if (((m_x1 - m_x0_1) + 1) > 0)
0069fa79          {
0069fa7f              int32_t m_y1 = arg2->m_y1;
0069fa82              int32_t m_y0_1 = arg2->m_y0;
0069fa82              
0069fa8c              if ((((m_y1 - m_y0_1) + 1) > 0 && Box2D::IsValid(arg3) != 0))
0069fa8c              {
0069faa7                  int32_t eax_7 = 0;
0069faaa                  int32_t var_20 = (m_x1 + 1);
0069fab2                  int32_t ebp_1 = (m_y1 + 1);
0069fab3                  int32_t ebx_3 = (m_x0_1 - 1);
0069fab6                  int32_t esi_1 = (m_y0_1 - 1);
0069fab7                  bool cond:2_1 = arg4->m_num <= 0;
0069faba                  void* var_2c = nullptr;
0069fabe                  int32_t var_28_1 = 0;
0069fac2                  int32_t var_24_1 = 0;
0069fac6                  int32_t var_1c_1 = ebp_1;
0069faca                  int32_t var_18_1 = ebx_3;
0069face                  int32_t var_14_1 = esi_1;
0069fad2                  int32_t var_30_2 = 0;
0069fad2                  
0069fad6                  if (!(cond:2_1))
0069fad6                  {
0069fadc                      int32_t var_34_1 = 0;
0069fb82                      int32_t var_10;
0069fb82                      bool cond:3_1;
0069fb82                      
0069fb82                      do
0069fb82                      {
0069fae4                          var_10 = 0;
0069fae8                          int32_t var_c_1 = 0;
0069faec                          int32_t var_8_1 = 0;
0069faf0                          int32_t var_4_1 = 0;
0069fb02                          void* edx_6 = (arg4->m_data + var_34_1);
0069fb08                          int32_t* var_48_1 = &var_10;
0069fb08                          
0069fb11                          if (Box2D::Intersection(arg3, edx_6, edx_6) != 0)
0069fb11                          {
0069fb1c                              SmartArray<Box2D,1>::AddToEnd(&var_2c, &var_10);
0069fb21                              int32_t eax_9 = var_10;
0069fb21                              
0069fb29                              if (eax_9 < var_20)
0069fb2b                                  var_20 = eax_9;
0069fb2b                              
0069fb33                              ebp_1 = var_1c_1;
0069fb33                              
0069fb39                              if (var_c_1 < ebp_1)
0069fb39                              {
0069fb3b                                  ebp_1 = var_c_1;
0069fb3d                                  var_1c_1 = ebp_1;
0069fb39                              }
0069fb39                              
0069fb45                              ebx_3 = var_18_1;
0069fb45                              
0069fb4b                              if (var_8_1 > ebx_3)
0069fb4b                              {
0069fb4d                                  ebx_3 = var_8_1;
0069fb4f                                  var_18_1 = ebx_3;
0069fb4b                              }
0069fb4b                              
0069fb57                              esi_1 = var_14_1;
0069fb57                              
0069fb5d                              if (var_4_1 > esi_1)
0069fb5d                              {
0069fb5f                                  esi_1 = var_4_1;
0069fb61                                  var_14_1 = esi_1;
0069fb5d                              }
0069fb11                          }
0069fb11                          
0069fb70                          var_34_1 += 0x10;
0069fb7c                          cond:3_1 = (var_30_2 + 1) < arg4->m_num;
0069fb7e                          var_30_2 += 1;
0069fb82                      } while (cond:3_1);
0069fb82                      
0069fb8e                      if (var_24_1 != 0)
0069fb8e                      {
0069fb98                          int32_t m_x0 = arg2->m_x0;
0069fb9e                          int32_t m_y0 = arg2->m_y0;
0069fba3                          var_10 = (var_20 - m_x0);
0069fbb9                          int32_t var_8_2 = (ebx_3 - m_x0);
0069fbc1                          int32_t var_4_2 = (esi_1 - m_y0);
0069fbc9                          int32_t var_c_2 = (ebp_1 - m_y0);
0069fbc9                          
0069fbcd                          if ((((int8_t)(this->__bitfield164 >> 3)) & 1) != 0)
0069fbcf                              this->vtable->EraseSelf(arg2, &var_20, &var_2c, arg5);
0069fbcf                          
0069fbed                          if ((((int8_t)(this->__bitfield164 >> 7)) & 1) != 0)
0069fbef                              this->vtable->DrawChildren(arg2, &var_20, &var_2c, arg5);
0069fbef                          
0069fc05                          this->vtable->DrawStart();
0069fc0c                          this->vtable->PreBlit(&var_10, arg5);
0069fc19                          this->vtable->DrawSelf(arg2, &var_20, &var_2c, arg5);
0069fc2f                          this->vtable->PostBlit(&var_10, arg5);
0069fc2f                          
0069fc4b                          if ((((int8_t)(this->__bitfield164 >> 7)) & 1) == 0)
0069fc4d                              this->vtable->DrawChildren(arg2, &var_20, &var_2c, arg5);
0069fc4d                          
0069fc63                          this->vtable->DrawDone();
0069fb8e                      }
0069fb8e                      
0069fc6d                      eax_7 = var_28_1;
0069fad6                  }
0069fad6                  
0069fc7b                  if ((eax_7 & 0x80000000) == 0x80000000)
0069fc82                      operator delete[](var_2c);
0069fa8c              }
0069fa79          }
0069fa5c      }
0069fa30  }

0069fc94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

0069fca0  void __thiscall UIRegion::DrawChildren(class UIRegion* this, class Box2D const* arg2, class Box2D const* arg3, class SmartArray<Box2D,1> const* arg4, class UISurface* arg5)

0069fca0  {
0069fcb2      void* __offset(DLListData, -0x8) i = nullptr;
0069fcb2      
0069fcb6      if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
0069fcb6      {
0069fcb8          class DLListData* head_ = this->m_children.m_ihlIntrusive.m_list.head_;
0069fcb8          
0069fcbd          if (head_ == 0)
0069fcc4              i = nullptr;
0069fcbd          else
0069fcbf              i = &head_[-1];
0069fcb6      }
0069fcb6      
0069fcc8      void* __offset(DLListData, -0x8) i_1 = i;
0069fccc      class HashList<UIRegion *,UIRegion *,1>* var_34 = &this->m_children;
0069fccc      
0069fcd0      while (i != 0)
0069fcd0      {
0069fcd9          int32_t* esi_1 = *(int32_t*)((char*)ADJ(i) + 8);
0069fcd9          
0069fce6          if (esi_1[0x2c] == 0)
0069fce6          {
0069fcf5              int32_t var_10;
0069fcf5              *(uint32_t*)(*(uint32_t*)esi_1 + 0x34)(&var_10);
0069fcfd              int32_t edi_2 = var_10;
0069fd09              class Box2D* var_c;
0069fd09              void* eax_2 = (arg2->m_y0 + var_c);
0069fd0b              int32_t ecx_3 = (arg2->m_x0 + edi_2);
0069fd11              void* var_1c_1 = eax_2;
0069fd17              int32_t var_8;
0069fd17              int32_t var_18_1 = ((var_8 - edi_2) + ecx_3);
0069fd23              int32_t var_4;
0069fd23              void* var_14_1 = (((char*)eax_2 - var_c) + var_4);
0069fd27              int32_t var_30;
0069fd27              int32_t* var_4c_2 = &var_30;
0069fd2c              int32_t var_20 = ecx_3;
0069fd35              var_30 = 0;
0069fd39              int32_t var_2c_1 = 0;
0069fd3d              int32_t var_28_1 = 0;
0069fd41              int32_t var_24_1 = 0;
0069fd41              
0069fd4c              if (Box2D::Intersection(arg3, var_c, &var_20) != 0)
0069fd66                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x3c)(&var_20, &var_30, arg4, arg5);
0069fd66              
0069fd69              i = i_1;
0069fce6          }
0069fce6          
0069fd6d          class DLListData* dllist_next = ADJ(i)->dllist_next;
0069fd6d          
0069fd72          if (dllist_next == 0)
0069fd72              break;
0069fd72          
0069fd74          i = &dllist_next[-1];
0069fd79          i_1 = i;
0069fcd0      }
0069fca0  }

0069fd8d                                         90 90 90                                                               ...

0069fd90  void __thiscall UIRegion::ForceUpdate(class UIRegion* this, uint32_t arg2)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069fe1f                                                                                               90                                 .

0069fe20  void __thiscall UIRegion::NotifyMouseDown(class UIRegion* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

0069fe20  {
0069fe30      if ((arg4 == 5 || arg4 == 6))
0069fe30      {
0069fe5c      label_69fe5c:
0069fe5c          
0069fe63          if ((*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) != 0)
0069fe6d              this->vtable->MouseDown(arg2, arg3, arg4);
0069fe6d          
0069fe63          return;
0069fe30      }
0069fe30      
0069fe3a      if (UIRegion::IsMouseDown(this, arg4) == 0)
0069fe3a          goto label_69fe5c;
0069fe3a      
0069fe43      if ((*(uint8_t*)((char*)this->__bitfield164 + 0) & 1) == 0)
0069fe4d          this->vtable->MouseUp(arg2, arg3, arg4);
0069fe20  }

0069fe7c                                                                                      90 90 90 90                              ....

0069fe80  void __thiscall UIRegion::NotifyMouseUp(class UIRegion* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

0069fe80  {
0069fe98      int32_t* eax_3 = this->m_mouseDownTable.m_intrusiveTable.m_buckets[(COMBINE(0, arg4) % this->m_mouseDownTable.m_intrusiveTable.m_numBuckets)];
0069fe98      
0069fe9c      if (eax_3 != 0)
0069fe9c      {
0069fea2          while (*(uint32_t*)eax_3 != arg4)
0069fea2          {
0069fea4              eax_3 = eax_3[1];
0069fea4              
0069fea9              if (eax_3 == 0)
0069feac                  return;
0069fea2          }
0069fea2          
0069feb1          if (eax_3 != 0)
0069feb7              this->vtable->MouseUp(arg2, arg3, arg4);
0069fe9c      }
0069fe80  }

0069fec7                       90 90 90 90 90 90 90 90 90                                                         .........

0069fed0  void __thiscall UIRegion::SetVisible(class UIRegion* this, uint8_t arg2)
// This function is generating excessive incremental updates. Force analysis of this function (this may take a while).

Loading...

0069ff88                          90 90 90 90 90 90 90 90                                                          ........

0069ff90  void __thiscall IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>(class IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, uint32_t arg2)

0069ff90  {
0069ff9b      arg2 = arg2;
0069ff9f      uint8_t edx = ((int8_t)arg2);
0069ffa3      this->m_buckets = nullptr;
0069ffa6      this->m_firstInterestingBucket = nullptr;
0069ffa9      this->m_numBuckets = 0;
0069ffac      this->m_numElements = 0;
0069ffb0      this->vtable = 0x801714;
0069ffb6      uint32_t const* bucketSizesEnd_1 = g_bucketSizesEnd;
0069ffc9      uint32_t* eax = _STL::__lower_bound(g_bucketSizesBegin, bucketSizesEnd_1, &arg2, edx, nullptr);
0069ffc9      
0069ffd3      if (eax == bucketSizesEnd_1)
0069ffd5          eax -= 4;
0069ffd5      
0069ffd8      uint32_t eax_1 = *(uint32_t*)eax;
0069ffdd      this->m_numBuckets = eax_1;
0069ffdd      
0069ffe0      if (eax_1 > 0x17)
0069fff6          this->m_buckets = operator new[]((eax_1 << 2));
0069ffe0      else
0069ffe5          this->m_buckets = &this->m_aInplaceBuckets;
0069ffe5      
0069fffc      struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_buckets = this->m_buckets;
0069ffff      uint32_t ecx_3 = (this->m_numBuckets << 2);
006a0005      this->m_firstInterestingBucket = &m_buckets[*(int32_t*)((char*)this + 0x68)];
006a0016      __builtin_memset(__builtin_memset(m_buckets, 0, ((ecx_3 >> 2) << 2)), 0, (ecx_3 & 3));
0069ff90  }

006a001f                                                                                               90                                 .

006a0020  void __fastcall IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(class IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>* this)

006a0020  {
006a0068      class DLListData* head_;
006a0068      
006a0068      do
006a0068      {
006a0024          head_ = this->m_list.head_;
006a0024          
006a0029          if (head_ == 0)
006a0029              break;
006a0029          
006a002b          class DLListData* dllist_prev = head_->dllist_prev;
006a002b          
006a0030          if (dllist_prev == 0)
006a0030          {
006a0038              class DLListData* dllist_next = head_->dllist_next;
006a003c              this->m_list.head_ = dllist_next;
006a003c              
006a003f              if (dllist_next != 0)
006a0041                  dllist_next->dllist_prev = nullptr;
006a0030          }
006a0030          else
006a0034              dllist_prev->dllist_next = head_->dllist_next;
006a0034          
006a0044          class DLListData* dllist_next_1 = head_->dllist_next;
006a0044          
006a0048          if (dllist_next_1 == 0)
006a0048          {
006a0055              class DLListData* dllist_prev_1 = this->m_list.tail_->dllist_prev;
006a005a              this->m_list.tail_ = dllist_prev_1;
006a005a              
006a005d              if (dllist_prev_1 != 0)
006a005f                  dllist_prev_1->dllist_next = 0;
006a0048          }
006a0048          else
006a004d              dllist_next_1->dllist_prev = head_->dllist_prev;
006a004d          
006a0063          head_->dllist_next = 0;
006a0065          head_->dllist_prev = nullptr;
006a0068      } while (head_ != 0);
006a006c      /* tailcall */
006a006c      return IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(this);
006a0020  }

006a0071                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

006a0080  void __fastcall UIRegion::MouseDown(class UIRegion* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

006a0080  {
006a008b      HashSet<unsigned long>::add(&this->m_mouseDownTable, &arg4);
006a0080  }

006a0093                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a00a0  void __fastcall UIRegion::MouseUp(class UIRegion* this, uint32_t arg2, uint32_t arg3, uint32_t arg4)

006a00a0  {
006a00ab      struct HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData* eax = IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::remove(&this->m_mouseDownTable.m_intrusiveTable, &arg4);
006a00ab      
006a00b2      if (eax != 0)
006a00b5          operator delete(eax);
006a00a0  }

006a00be                                                                                            90 90                                ..

006a00c0  uint8_t __thiscall IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::place_at_head(class IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg2)

006a00c0  {
006a00c8      class UIRegion* m_hashKey = arg2->m_hashKey;
006a00e1      int32_t* eax_5 = this->m_hash.m_buckets[(COMBINE(0, ((m_hashKey << 0x18) | (m_hashKey >> 8))) % this->m_hash.m_numBuckets)];
006a00e1      
006a00e5      if (eax_5 == 0)
006a00e5      {
006a00f5      label_6a00f5:
006a00f5          IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(this, arg2);
006a00e5      }
006a00e5      else
006a00e5      {
006a00e9          while (*(uint32_t*)eax_5 != m_hashKey)
006a00e9          {
006a00eb              eax_5 = eax_5[1];
006a00eb              
006a00f0              if (eax_5 == 0)
006a00f0                  goto label_6a00f5_1;
006a00e9          }
006a00e9          
006a011f          if (eax_5 == 0)
006a011f          {
006a00f5          label_6a00f5_1:
006a00f5              IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(this, arg2);
006a011f          }
006a011f          else
006a0128              DLListBase::Remove(&this->m_list, &arg2->dllist_next);
006a00e5      }
006a00e5      
006a00fd      arg2->dllist_next = this->m_list.head_;
006a0102      class DLListData* head_ = this->m_list.head_;
006a0107      class DLListData** eax_6;
006a0107      
006a0107      if (head_ != 0)
006a0107      {
006a0109          head_->dllist_prev = &arg2->dllist_next;
006a010c          this->m_list.head_ = &arg2->dllist_next;
006a00fd          arg2->dllist_prev = 0;
006a0117          eax_6 = 1;
006a011a          return 1;
006a0107      }
006a0107      
006a012f      this->m_list.tail_ = &arg2->dllist_next;
006a0132      this->m_list.head_ = &arg2->dllist_next;
006a00fd      arg2->dllist_prev = 0;
006a013d      eax_6 = 1;
006a0140      return 1;
006a00c0  }

006a0143           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a0150  void __thiscall UIRegion::UIRegion(class UIRegion* this, class UIRegion* arg2, int32_t arg3, int32_t arg4, int32_t arg5, int32_t arg6)

006a0150  {
006a0155      UIListener::UIListener(this);
006a0166      this->vtable = 0x801718;
006a016c      this->m_box.m_x0 = arg3;
006a016f      this->m_box.m_y0 = arg4;
006a017d      this->m_box.m_x1 = ((arg3 + arg5) - 1);
006a0187      this->m_box.m_y1 = ((arg4 + arg6) - 1);
006a019e      this->__bitfield164 = ((this->__bitfield164 & 0xffffff06) | 2);
006a01ad      this->m_zlevel = 0;
006a01b3      this->m_image = nullptr;
006a01b9      this->m_alphaImage = nullptr;
006a01bf      this->m_alphaBlendMod = 1f;
006a01c9      this->m_eBlitMode = Blit_Normal;
006a01cf      this->m_parent = nullptr;
006a01d5      this->m_object = nullptr;
006a01db      IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>(&this->m_children, 0);
006a01a4      this->m_children.m_ihlIntrusive.m_list.head_ = 0;
006a01a4      this->m_children.m_ihlIntrusive.m_list.tail_ = nullptr;
006a01ee      this->m_mouseDownTable.vtable = 0x79bd74;
006a01f8      IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>::IntrusiveHashTable<unsigned long,HashSetData<unsigned long> *,1>(&this->m_mouseDownTable.m_intrusiveTable, 4);
006a01fd      this->m_ptTilingOffset.x = 0;
006a0203      this->m_ptTilingOffset.y = 0;
006a0150  }

006a0211                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

006a0220  uint8_t DiskConBase::DeleteData(class DiskConBase* this @ ecx, class IDClass<_tagDataID,32,0> arg2, int32_t arg3) __pure

006a0220  {
006a0220      int32_t eax;
006a0220      eax = 0;
006a0222      return 0;
006a0220  }

006a0225                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

006a0230  uint8_t DiskConBase::Close(class DiskConBase* this @ ecx) __pure

006a0230  {
006a0230      int32_t eax;
006a0230      eax = 0;
006a0232      return 0;
006a0230  }

006a0233                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a0240  void NoticeHandler::RecvNotice_TextTag_IIDEnumClick(class NoticeHandler* this @ ecx, uint32_t arg2, uint32_t arg3, uint32_t arg4) __pure

006a0240  {
006a0240      return;
006a0240  }

006a0243           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a0250  void __fastcall UIRegion::~UIRegion(class UIRegion* this)

006a0250  {
006a0255      class Graphic* m_image = this->m_image;
006a025f      this->vtable = 0x801718;
006a025f      
006a0265      if (m_image != 0)
006a0267          m_image->vtable->__vecDelDtor(1);
006a0267      
006a026d      class Graphic* m_alphaImage = this->m_alphaImage;
006a0275      this->m_image = nullptr;
006a0275      
006a027b      if (m_alphaImage != 0)
006a027d          m_alphaImage->vtable->__vecDelDtor(1);
006a027d      
006a028b      this->m_alphaImage = nullptr;
006a0291      HashList<UIRegion *,UIRegion *,1>::flush(&this->m_children);
006a0296      class UIObject* m_object = this->m_object;
006a0296      
006a029e      if (m_object != 0)
006a029e      {
006a02a0          uint32_t m_cRef = m_object->m_cRef;
006a02a0          m_object->m_cRef -= 1;
006a02a0          
006a02a3          if (m_cRef == 1)
006a02a5              m_object->vtable->__vecDelDtor(1);
006a02a5          
006a02ab          this->m_object = nullptr;
006a029e      }
006a029e      
006a02b8      this->m_parent = nullptr;
006a02c0      this->m_mouseDownTable.vtable = 0x79bd74;
006a02ca      IntrusiveHashTable<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_mouseDownTable.m_intrusiveTable);
006a02cf      class HashSetData<unsigned long>** m_buckets = this->m_mouseDownTable.m_intrusiveTable.m_buckets;
006a02b2      this->m_mouseDownTable.m_intrusiveTable.vtable = 0x79bd6c;
006a02b2      
006a02dd      if (m_buckets != &this->m_mouseDownTable.m_intrusiveTable.m_aInplaceBuckets)
006a02e0          operator delete[](m_buckets);
006a02e0      
006a02b2      this->m_mouseDownTable.m_intrusiveTable.m_buckets = nullptr;
006a02b2      this->m_mouseDownTable.m_intrusiveTable.m_firstInterestingBucket = nullptr;
006a02b2      this->m_mouseDownTable.m_intrusiveTable.m_numBuckets = 0;
006a02b2      this->m_mouseDownTable.m_intrusiveTable.m_numElements = 0;
006a02f6      IntrusiveHashList<IDClass<_tagDataID,32,0>,HashList<IDClass<_tagDataID,32,0>,bool,1>::HashListData *,1>::delete_contents(&this->m_children);
006a02fb      struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_buckets_1 = this->m_children.m_ihlIntrusive.m_hash.m_buckets;
006a0283      this->m_children.m_ihlIntrusive.m_hash.vtable = 0x801714;
006a0283      
006a030a      if (m_buckets_1 != &this->m_children.m_ihlIntrusive.m_hash.m_aInplaceBuckets)
006a030d          operator delete[](m_buckets_1);
006a030d      
006a0283      this->m_children.m_ihlIntrusive.m_hash.m_buckets = nullptr;
006a0283      this->m_children.m_ihlIntrusive.m_hash.m_firstInterestingBucket = nullptr;
006a0283      this->m_children.m_ihlIntrusive.m_hash.m_numBuckets = 0;
006a0283      this->m_children.m_ihlIntrusive.m_hash.m_numElements = 0;
006a0326      /* tailcall */
006a0326      return UIListener::~UIListener(this);
006a0250  }

006a032b                                   90 90 90 90 90                                                             .....

006a0330  void __fastcall UIRegion::RemoveChild(class UIRegion* this, class UIRegion* arg2)

006a0330  {
006a033b      struct HashList<UIRegion *,UIRegion *,1>::HashListData* eax = IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::remove(&this->m_children, &arg2);
006a033b      
006a0342      if (eax != 0)
006a0345          operator delete(eax);
006a0330  }

006a034e                                            90 90                                                                ..

006a0350  uint8_t __thiscall HashList<UIRegion *,UIRegion *,1>::move_to_head(class HashList<UIRegion *,UIRegion *,1>* this, class UIRegion** arg2)

006a0350  {
006a0355      class UIRegion* i = *(uint32_t*)arg2;
006a036e      int32_t* eax_5 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
006a036e      
006a0372      if (eax_5 != 0)
006a0372      {
006a0376          while (*(uint32_t*)eax_5 != i)
006a0376          {
006a0378              eax_5 = eax_5[1];
006a0378              
006a037d              if (eax_5 == 0)
006a037d              {
006a037f                  eax_5 = 0;
006a0382                  return 0;
006a037d              }
006a0376          }
006a0376          
006a0387          if (eax_5 != 0)
006a0394              /* tailcall */
006a0394              return IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::place_at_head(this, eax_5);
006a0372      }
006a0372      
006a0389      eax_5 = 0;
006a038c      return 0;
006a0350  }

006a0399                                                                             90 90 90 90 90 90 90                           .......

006a03a0  uint8_t __thiscall IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::push_head(class IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg2)

006a03a0  {
006a03a8      class UIRegion* m_hashKey = arg2->m_hashKey;
006a03a8      
006a03c5      for (int32_t* i = this->m_hash.m_buckets[(COMBINE(0, ((m_hashKey << 0x18) | (m_hashKey >> 8))) % this->m_hash.m_numBuckets)]; i != 0; i = i[1])
006a03c5      {
006a03c9          if (*(uint32_t*)i == m_hashKey)
006a03c9          {
006a03ff              if (i == 0)
006a03ff                  break;
006a03ff              
006a0402              i = 0;
006a0405              return 0;
006a03c9          }
006a03c5      }
006a03c5      
006a03d5      IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(this, arg2);
006a03dd      arg2->dllist_next = this->m_list.head_;
006a03e2      class DLListData* head_ = this->m_list.head_;
006a03e7      class DLListData** eax_5;
006a03e7      
006a03e7      if (head_ != 0)
006a03e7      {
006a03e9          head_->dllist_prev = &arg2->dllist_next;
006a03ec          this->m_list.head_ = &arg2->dllist_next;
006a03dd          arg2->dllist_prev = nullptr;
006a03f7          eax_5 = 1;
006a03fa          return 1;
006a03e7      }
006a03e7      
006a0408      this->m_list.tail_ = &arg2->dllist_next;
006a040b      this->m_list.head_ = &arg2->dllist_next;
006a03dd      arg2->dllist_prev = nullptr;
006a0416      eax_5 = 1;
006a0419      return 1;
006a03a0  }

006a041c                                                                                      90 90 90 90                              ....

006a0420  uint8_t __thiscall IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::insert_after(class IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg2, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg3)

006a0420  {
006a042a      if (arg2 == 0)
006a0438          return IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::push_head(this, arg3);
006a0438      
006a0448      if (IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::contains(this, arg3) != 0)
006a044f          return 0;
006a044f      
006a0455      IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(this, arg3);
006a0455      
006a045f      if (arg3 != 0)
006a045f      {
006a0469          DLListBase::InsertAfter(&this->m_list, &arg3->dllist_next, &arg2->dllist_next);
006a0470          int32_t eax_4;
006a0470          eax_4 = 1;
006a0473          return 1;
006a045f      }
006a045f      
006a047d      DLListBase::InsertAfter(&this->m_list, nullptr, &arg2->dllist_next);
006a0484      int32_t eax_5;
006a0484      eax_5 = 1;
006a0487      return 1;
006a0420  }

006a048a                                90 90 90 90 90 90                                                            ......

006a0490  uint8_t __thiscall IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::place_after(class IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>* this, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg2, struct HashList<UIRegion *,UIRegion *,1>::HashListData* arg3)

006a0490  {
006a049a      if (arg2 == 0)
006a04a8          return IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::place_at_head(this, arg3);
006a04a8      
006a04b8      if (IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::contains(this, arg3) == 0)
006a04dc          IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::add(this, arg3);
006a04b8      else if (arg3 == 0)
006a04d2          DLListBase::Remove(&this->m_list, nullptr);
006a04bc      else
006a04c5          DLListBase::Remove(&this->m_list, &arg3->dllist_next);
006a04c5      
006a04e6      if (arg3 == 0)
006a04e6      {
006a0504          DLListBase::InsertAfter(&this->m_list, nullptr, &arg2->dllist_next);
006a050b          int32_t eax_6;
006a050b          eax_6 = 1;
006a050e          return 1;
006a04e6      }
006a04e6      
006a04f0      DLListBase::InsertAfter(&this->m_list, &arg3->dllist_next, &arg2->dllist_next);
006a04f7      int32_t eax_5;
006a04f7      eax_5 = 1;
006a04fa      return 1;
006a0490  }

006a0511                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

006a0520  void* __thiscall UIRegion::`scalar deleting destructor'(class UIRegion* this, uint32_t arg2)

006a0520  {
006a0523      UIRegion::~UIRegion(this);
006a0523      
006a052d      if ((arg2 & 1) != 0)
006a0530          operator delete(this);
006a0530      
006a053b      return this;
006a0520  }

006a053e                                                                                            90 90                                ..

006a0540  uint8_t __thiscall HashList<UIRegion *,UIRegion *,1>::push_head(class HashList<UIRegion *,UIRegion *,1>* this, class UIRegion** arg2, class UIRegion** arg3)

006a0540  {
006a0548      class UIRegion* ecx = *(uint32_t*)arg2;
006a0548      
006a0563      for (int32_t* i = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((ecx << 0x18) | (ecx >> 8))) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i != 0; i = i[1])
006a0563      {
006a0567          if (*(uint32_t*)i == ecx)
006a0567          {
006a05a6              if (i != 0)
006a05b2                  return HashList<UIRegion *,UIRegion *,1>::move_to_head(this, arg2);
006a05b2              
006a05a6              break;
006a0567          }
006a0563      }
006a0563      
006a0572      void* eax_4 = operator new(0x14);
006a057c      void* esi_1;
006a057c      
006a057c      if (eax_4 == 0)
006a05b5          esi_1 = nullptr;
006a057c      else
006a057c      {
006a0584          *(uint32_t*)eax_4 = *(uint32_t*)arg2;
006a0586          *(uint32_t*)((char*)eax_4 + 4) = 0;
006a058d          *(uint32_t*)((char*)eax_4 + 8) = 0;
006a0594          *(uint32_t*)((char*)eax_4 + 0xc) = 0;
006a059d          *(uint32_t*)((char*)eax_4 + 0x10) = *(uint32_t*)arg3;
006a05a0          esi_1 = eax_4;
006a057c      }
006a057c      
006a05c0      int32_t ebx;
006a05c0      ebx = IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::push_head(this, esi_1);
006a05c0      
006a05c8      if ((ebx == 0 && esi_1 != 0))
006a05cb          operator delete(esi_1);
006a05cb      
006a05d8      return ebx;
006a0540  }

006a05db                                                                                   90 90 90 90 90                             .....

006a05e0  uint8_t __thiscall HashList<UIRegion *,UIRegion *,1>::move_to_middle(class HashList<UIRegion *,UIRegion *,1>* this, class UIRegion** arg2, class UIRegion** arg3)

006a05e0  {
006a05e5      uint32_t m_numBuckets = this->m_ihlIntrusive.m_hash.m_numBuckets;
006a05eb      class UIRegion* i = *(uint32_t*)arg2;
006a05fd      struct HashList<UIRegion *,UIRegion *,1>::HashListData** m_buckets = this->m_ihlIntrusive.m_hash.m_buckets;
006a0600      int32_t* esi = m_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % m_numBuckets)];
006a0600      
006a060a      if (esi != 0)
006a060a      {
006a0612          while (*(uint32_t*)esi != i)
006a0612          {
006a0614              esi = esi[1];
006a0614              
006a0619              if (esi == 0)
006a0619                  break;
006a0612          }
006a060a      }
006a060a      
006a061f      class UIRegion* i_1 = *(uint32_t*)arg3;
006a0635      int32_t* eax_9 = m_buckets[(COMBINE(0, ((i_1 << 0x18) | (i_1 >> 8))) % m_numBuckets)];
006a0635      
006a0639      if (eax_9 != 0)
006a0639      {
006a0642          while (*(uint32_t*)eax_9 != i_1)
006a0642          {
006a0644              eax_9 = eax_9[1];
006a0644              
006a0649              if (eax_9 == 0)
006a0649                  break;
006a0642          }
006a0639      }
006a0639      
006a0651      if ((esi != 0 && eax_9 != 0))
006a065e          return IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::place_after(this, esi, eax_9);
006a065e      
006a0664      eax_9 = 0;
006a0667      return 0;
006a05e0  }

006a063d                                                                                         8d 49 00                               .I.
006a066a                                90 90 90 90 90 90                                                            ......

006a0670  uint8_t __thiscall HashList<UIRegion *,UIRegion *,1>::insert_after(class HashList<UIRegion *,UIRegion *,1>* this, class UIRegion** arg2, class UIRegion** arg3, class UIRegion** arg4)

006a0670  {
006a0678      class UIRegion* i = *(uint32_t*)arg2;
006a068e      int32_t* edx_4 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % this->m_ihlIntrusive.m_hash.m_numBuckets)];
006a0693      struct HashList<UIRegion *,UIRegion *,1>::HashListData** eax_3;
006a0693      
006a0693      if (edx_4 != 0)
006a0693      {
006a0697          while (*(uint32_t*)edx_4 != i)
006a0697          {
006a0699              edx_4 = edx_4[1];
006a0699              
006a069e              if (edx_4 == 0)
006a069e              {
006a06a1                  eax_3 = 0;
006a06a4                  return 0;
006a069e              }
006a0697          }
006a0697          
006a06a9          if (edx_4 != 0)
006a06a9          {
006a06c1              if (IntrusiveHashTable<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::contains(this, arg3) != 0)
006a06cf                  return HashList<UIRegion *,UIRegion *,1>::move_to_middle(this, arg2, arg3);
006a06cf              
006a06d4              void* eax_6 = operator new(0x14);
006a06de              void* edi_1;
006a06de              
006a06de              if (eax_6 == 0)
006a0706                  edi_1 = nullptr;
006a06de              else
006a06de              {
006a06e6                  *(uint32_t*)eax_6 = *(uint32_t*)arg3;
006a06e8                  *(uint32_t*)((char*)eax_6 + 4) = 0;
006a06ef                  *(uint32_t*)((char*)eax_6 + 8) = 0;
006a06f6                  *(uint32_t*)((char*)eax_6 + 0xc) = 0;
006a06ff                  *(uint32_t*)((char*)eax_6 + 0x10) = *(uint32_t*)arg4;
006a0702                  edi_1 = eax_6;
006a06de              }
006a06de              
006a0708              class UIRegion* ecx_4 = *(uint32_t*)arg2;
006a0723              struct HashList<UIRegion *,UIRegion *,1>::HashListData** eax_10;
006a0723              
006a0723              for (int32_t* i_1 = this->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((ecx_4 << 0x18) | (ecx_4 >> 8))) % this->m_ihlIntrusive.m_hash.m_numBuckets)]; i_1 != 0; i_1 = i_1[1])
006a0723              {
006a0727                  if (*(uint32_t*)i_1 == ecx_4)
006a0727                  {
006a0747                      if ((i_1 != 0 && IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::insert_after(this, i_1, edi_1) != 0))
006a0747                      {
006a0758                          eax_10 = 1;
006a075b                          return 1;
006a0747                      }
006a0747                      
006a0747                      break;
006a0727                  }
006a0723              }
006a0723              
006a0732              if (edi_1 != 0)
006a0735                  operator delete(edi_1);
006a0735              
006a073f              eax_10 = 0;
006a0742              return 0;
006a06a9          }
006a0693      }
006a0693      
006a06ac      eax_3 = 0;
006a06af      return 0;
006a0670  }

006a075e                                                                                            90 90                                ..

006a0760  void __thiscall UIRegion::AddChild(class UIRegion* this, class UIRegion* arg2)

006a0760  {
006a0764      class UIRegion* ebx = arg2;
006a0764      
006a076a      if (ebx != 0)
006a076a      {
006a077a          void* __offset(DLListData, -0x8) i = nullptr;
006a077a          
006a077e          if (this->m_children.m_ihlIntrusive.m_hash.m_numElements > 0)
006a077e          {
006a0780              class DLListData* tail_ = this->m_children.m_ihlIntrusive.m_list.tail_;
006a0780              
006a0785              if (tail_ == 0)
006a078c                  i = nullptr;
006a0785              else
006a0787                  i = &tail_[-1];
006a077e          }
006a077e          
006a0790          class HashList<UIRegion *,UIRegion *,1>* var_4_1 = &this->m_children;
006a0794          class DLListData* dllist_prev;
006a0794          
006a0794          for (; i != 0; i = &dllist_prev[-1])
006a0794          {
006a0796              int32_t* ecx = *(int32_t*)((char*)ADJ(i) + 8);
006a0799              int32_t eax_2 = *(uint32_t*)ecx;
006a079c              int32_t* var_8 = ecx;
006a079c              
006a07a5              if (*(uint32_t*)(eax_2 + 0x38)(ebx) >= 0)
006a07a5              {
006a07e0                  HashList<UIRegion *,UIRegion *,1>::insert_after(&this->m_children, &var_8, &arg2, &arg2);
006a07eb                  return;
006a07a5              }
006a07a5              
006a07a7              dllist_prev = ADJ(i)->dllist_prev;
006a07a7              
006a07ac              if (dllist_prev == 0)
006a07ac                  break;
006a0794          }
006a0794          
006a07c1          HashList<UIRegion *,UIRegion *,1>::push_head(&this->m_children, &arg2, &arg2);
006a076a      }
006a0760  }

006a07ee                                            90 90                                                                ..

006a07f0  void __thiscall UIRegion::BringToFront(class UIRegion* this, class UIRegion* arg2)

006a07f0  {
006a07f4      class UIRegion* i = arg2;
006a07f9      class HashList<UIRegion *,UIRegion *,1>* edi = &this->m_children;
006a0813      int32_t* edx_2 = edi->m_ihlIntrusive.m_hash.m_buckets[(COMBINE(0, ((i << 0x18) | (i >> 8))) % edi->m_ihlIntrusive.m_hash.m_numBuckets)];
006a0813      
006a0818      if (edx_2 != 0)
006a0818      {
006a0822          while (*(uint32_t*)edx_2 != i)
006a0822          {
006a0824              edx_2 = edx_2[1];
006a0824              
006a0829              if (edx_2 == 0)
006a0829                  break;
006a0822          }
006a0818      }
006a0818      
006a0831      class HashList<UIRegion *,UIRegion *,1>* var_c = edi;
006a0831      
006a0835      if (edx_2 != 0)
006a0835      {
006a083b          int32_t* var_8_1 = edx_2;
006a083f          void* edx_3 = edx_2[2];
006a0845          int32_t* esi_1;
006a0845          
006a0845          if (edx_3 == 0)
006a0845          {
006a088f              esi_1 = nullptr;
006a086a          label_6a086a:
006a086a              struct HashList<UIRegion *,UIRegion *,1>::HashListData* eax_4 = IntrusiveHashList<UIRegion *,HashList<UIRegion *,UIRegion *,1>::HashListData *,1>::remove(edi, &arg2);
006a086a              
006a0871              if (eax_4 != 0)
006a0874                  operator delete(eax_4);
006a0874              
006a0881              if (edi->m_ihlIntrusive.m_hash.m_numElements > 0)
006a0881              {
006a0883                  class DLListData* tail_ = edi->m_ihlIntrusive.m_list.tail_;
006a0888                  void* __offset(DLListData, -0x8) eax_6;
006a0888                  
006a0888                  if (tail_ == 0)
006a0893                      eax_6 = nullptr;
006a0888                  else
006a088a                      eax_6 = &tail_[-1];
006a088a                  
006a0898                  int32_t m_zlevel = i->m_zlevel;
006a0898                  
006a08a4                  if (*(uint32_t*)(*(int32_t*)((char*)ADJ(eax_6) + 8) + 0x94) < m_zlevel)
006a08a4                  {
006a08a8                      int32_t* eax_8 = edx_2;
006a08a8                      
006a08ac                      if (esi_1 != 0)
006a08ac                      {
006a08b9                          while (*(uint32_t*)(esi_1[4] + 0x94) >= m_zlevel)
006a08b9                          {
006a08bb                              eax_8 = esi_1;
006a08bd                              void* esi_2 = esi_1[2];
006a08c2                              class HashList<UIRegion *,UIRegion *,1>* var_c_1 = edi;
006a08c2                              
006a08c6                              if (esi_2 == 0)
006a08c6                                  break;
006a08c6                              
006a08c8                              esi_1 = ((char*)esi_2 - 8);
006a08c8                              
006a08cd                              if (esi_1 == 0)
006a08cd                                  break;
006a08b9                          }
006a08ac                      }
006a08ac                      
006a08df                      HashList<UIRegion *,UIRegion *,1>::insert_after(edi, &eax_8[4], &arg2, &arg2);
006a08ea                      return;
006a08a4                  }
006a0881              }
006a0881              
006a08f9              HashList<UIRegion *,UIRegion *,1>::push_tail(edi, &arg2, &arg2);
006a0845          }
006a0845          else
006a0845          {
006a0847              esi_1 = ((char*)edx_3 - 8);
006a0847              
006a085d              if ((esi_1 == 0 || *(uint32_t*)(esi_1[4] + 0x94) == i->m_zlevel))
006a084c                  goto label_6a086a;
006a0845          }
006a0835      }
006a07f0  }

006a0907                       90 90 90 90 90 90 90 90 90                                                         .........

006a0910  class UIPersistantData* __thiscall UIFramework::GetPersistantData(class UIFramework const* this)

006a0910  {
006a0918      /* jump -> UIFlow::m_instance->vtable->GetPersistantData */
006a0910  }

006a091b                                                                                   90 90 90 90 90                             .....

006a0920  void __thiscall UIFramework::QueueUIMode(class UIFramework* this, uint32_t const arg2)

006a0920  {
006a0928      /* jump -> UIFlow::m_instance->vtable->QueueUIMode */
006a0920  }

006a092b                                   90 90 90 90 90                                                             .....

006a0930  void __thiscall UIFramework::Show(class UIFramework* this, uint8_t arg2)

006a0930  {
006a0940      if ((this->m_bCanForceHide == 0 || this->m_bIsForcedHidden == 0))
006a0946          this->m_shown = arg2;
006a0946      
006a094f      int32_t i = 0;
006a094f      
006a0953      if (this->m_children.m_num > 0)
006a0953      {
006a098f          do
006a098f          {
006a095b              int32_t* ecx_1 = this->m_children.m_data[i];
006a095b              
006a0960              if (ecx_1 != 0)
006a0960              {
006a0962                  uint32_t eax_1;
006a0962                  eax_1 = ecx_1[0x1f];
006a096a                  arg2 = *(uint8_t*)((char*)ecx_1 + 0x7e);
006a096a                  
006a096e                  if (eax_1 != 0)
006a096e                  {
006a0970                      eax_1 = *(uint8_t*)((char*)ecx_1 + 0x7d);
006a0970                      
006a0975                      if (eax_1 != 0)
006a0977                          arg2 = 0;
006a096e                  }
006a096e                  
006a0983                  *(uint32_t*)(*(uint32_t*)ecx_1 + 0x24)(arg2);
006a0960              }
006a0960              
006a098c              i += 1;
006a098f          } while (i < this->m_children.m_num);
006a0953      }
006a0930  }

006a0996                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a09a0  void __thiscall UIFramework::ForceHidden(class UIFramework* this, uint8_t arg2)

006a09a0  {
006a09a1      int32_t ebx = arg2;
006a09af      int32_t i = 0;
006a09b1      bool cond:0 = this->m_children.m_num <= 0;
006a09b3      this->m_bIsForcedHidden = ebx;
006a09b3      
006a09b6      if (!(cond:0))
006a09b6      {
006a09dc          do
006a09dc          {
006a09c6              int32_t* ecx = this->m_children.m_data[i];
006a09c6              
006a09cb              if (ecx != 0)
006a09d0                  *(uint32_t*)(*(uint32_t*)ecx + 0x2c)(ebx);
006a09d0              
006a09d9              i += 1;
006a09dc          } while (i < this->m_children.m_num);
006a09b6      }
006a09b6      
006a09de      class UIElementManager* UIElementManager::s_pInstance_1 = UIElementManager::s_pInstance;
006a09de      
006a09e7      if (UIElementManager::s_pInstance_1 == 0)
006a09fe          return;
006a09fe      
006a09e9      ebx = this->m_bIsForcedHidden;
006a09ef      uint32_t eax;
006a09ef      eax = ebx == 0;
006a09f3      arg2 = eax;
006a09f7      /* tailcall */
006a09f7      return UIElementManager::SetVisible(UIElementManager::s_pInstance_1, arg2);
006a09a0  }

006a09ba                                                                                8d 9b 00 00 00 00                            ......
006a0a01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006a0a10  int32_t __thiscall UIFramework::FindChild(class UIFramework* this, class UIChildFramework* arg2)

006a0a10  {
006a0a10      uint32_t m_num = this->m_children.m_num;
006a0a17      int32_t result = 0;
006a0a17      
006a0a1b      if (m_num > 0)
006a0a1b      {
006a0a1d          class UIChildFramework** m_data = this->m_children.m_data;
006a0a1d          
006a0a31          do
006a0a31          {
006a0a29              if (*(uint32_t*)m_data == arg2)
006a0a37                  return result;
006a0a37              
006a0a2b              result += 1;
006a0a2c              m_data = &m_data[1];
006a0a31          } while (result < m_num);
006a0a1b      }
006a0a1b      
006a0a33      return 0xffffffff;
006a0a10  }

006a0a3a                                                                                90 90 90 90 90 90                            ......

006a0a40  enum UIElementMessageListenResult __thiscall UIFramework::ListenToElementMessage(class UIFramework* this, struct UIElementMessageInfo const* arg2)

006a0a40  {
006a0a4a      uint32_t m_num = this->m_children.m_num;
006a0a50      int32_t result = 0;
006a0a50      
006a0a54      while (true)
006a0a54      {
006a0a54          if (m_num > 0)
006a0a54          {
006a0a60              int32_t vtable = this->m_children.m_data[(m_num - 1)]->vtable;
006a0a62              m_num -= 1;
006a0a64              int32_t result_1 = *(uint32_t*)(vtable + 0xc)(arg2);
006a0a64              
006a0a6a              if (result_1 == 2)
006a0a6a                  break;
006a0a6a              
006a0a6e              if (result_1 != 0)
006a0a70                  result = result_1;
006a0a70              
006a0a75              if (result != 2)
006a0a75                  continue;
006a0a54          }
006a0a54          
006a0a7d          return result;
006a0a54      }
006a0a54      
006a0a89      return 2;
006a0a40  }

006a0a8c                                      90 90 90 90                                                              ....

006a0a90  void __thiscall UIFramework::RemoveChild(class UIFramework* this, class UIChildFramework* arg2)

006a0a90  {
006a0a9c      int32_t eax_1 = this->vtable->FindChild(arg2);
006a0a9c      
006a0aa2      if (eax_1 != 0xffffffff)
006a0aa2      {
006a0aa4          uint32_t m_num = this->m_children.m_num;
006a0aa4          
006a0aac          if (eax_1 < m_num)
006a0aac          {
006a0ab1              this->m_children.m_num = (m_num - 1);
006a0ab1              
006a0ab7              if (eax_1 != (m_num - 1))
006a0ab7              {
006a0ab9                  class UIChildFramework** m_data = this->m_children.m_data;
006a0ac2                  m_data[eax_1] = m_data[(m_num - 1)];
006a0acb                  this->m_children.m_data[this->m_children.m_num] = 0;
006a0ab7              }
006a0aac          }
006a0aa2      }
006a0a90  }

006a0adc                                                                                      90 90 90 90                              ....

006a0ae0  void __fastcall UIFramework::UIFramework(class UIFramework* this)

006a0ae0  {
006a0ae3      UIListener::UIListener(this);
006a0aea      this->m_bCanForceHide = 0;
006a0aed      this->m_bIsForcedHidden = 0;
006a0af0      this->vtable = 0x8017bc;
006a0af6      this->m_shown = 1;
006a0afa      this->m_children.m_data = 0;
006a0b00      this->m_children.m_sizeAndDeallocate = 0;
006a0b06      this->m_children.m_num = 0;
006a0ae0  }


006a0b10  void __fastcall UIFramework::~UIFramework(class UIFramework* this)

006a0b10  {
006a0b13      this->vtable = 0x8017bc;
006a0b13      
006a0b29      if ((this->m_children.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
006a0b32          operator delete[](this->m_children.m_data);
006a0b32      
006a0b3d      /* tailcall */
006a0b3d      return UIListener::~UIListener(this);
006a0b10  }

006a0b42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006a0b50  void* __thiscall UIFramework::`scalar deleting destructor'(class UIFramework* this, uint32_t arg2)

006a0b50  {
006a0b53      this->vtable = 0x8017bc;
006a0b53      
006a0b69      if ((this->m_children.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
006a0b72          operator delete[](this->m_children.m_data);
006a0b72      
006a0b7c      UIListener::~UIListener(this);
006a0b7c      
006a0b86      if ((arg2 & 1) != 0)
006a0b89          operator delete(this);
006a0b89      
006a0b94      return this;
006a0b50  }

006a0b97                                                                       90 90 90 90 90 90 90 90 90                         .........

006a0ba0  void __thiscall UIFramework::AddChild(class UIFramework* this, class UIChildFramework* arg2)

006a0ba0  {
006a0bb1      if (this->vtable->FindChild(arg2) == 0xffffffff)
006a0bb1      {
006a0bc5          int32_t eax_3 = (this->m_children.m_sizeAndDeallocate & 0x7fffffff);
006a0bcc          uint8_t eax_6;
006a0bcc          
006a0bcc          if (this->m_children.m_num >= eax_3)
006a0bda              eax_6 = SmartArray<unsigned long,1>::grow(&this->m_children.m_data, SmartArray<unsigned long,1>::get_new_size(&this->m_children, (eax_3 + 1)));
006a0bda          
006a0be1          if ((this->m_children.m_num < eax_3 || eax_6 != 0))
006a0be1          {
006a0bbf              this->m_children.m_data[this->m_children.m_num] = arg2;
006a0bbf              this->m_children.m_num += 1;
006a0be1          }
006a0bb1      }
006a0ba0  }

006a0bf3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a0c00  class UIElement* __thiscall UIMainFramework::CreateAndAddRootElement(class UIMainFramework* this, uint32_t const arg2, uint32_t const arg3)

006a0c00  {
006a0c0f      DBObj::GetDIDByEnum(&arg2, arg2, 5);
006a0c14      uint32_t const ecx = arg2;
006a0c14      
006a0c25      if (ecx == INVALID_DID.id)
006a0c35          return 0;
006a0c35      
006a0c31      return this->vtable->CreateAndAddRootElementByDataID(ecx, arg3);
006a0c00  }

006a0c38                                                                          90 90 90 90 90 90 90 90                          ........

006a0c40  void __thiscall UIMainFramework::RemoveRootElement(class UIMainFramework* this, class UIElement** arg2)

006a0c40  {
006a0c4b      if (*(uint32_t*)arg2 != 0)
006a0c4b      {
006a0c5d          int32_t ebx;
006a0c5d          ebx = SmartArray<IConsoleCallbackObject *,1>::RemoveUnOrdered(&this->m_rootElements.m_data, arg2);
006a0c5f          UIElement::UnregisterForElementMessages(*(uint32_t*)arg2, this);
006a0c5f          
006a0c67          if (ebx != 0)
006a0c72              UIElementManager::RemoveAndDeleteRootElement(UIElementManager::s_pInstance, *(uint32_t*)arg2);
006a0c72          
006a0c77          *(uint32_t*)arg2 = nullptr;
006a0c4b      }
006a0c40  }

006a0c82        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006a0c90  void __fastcall UIMainFramework::UIMainFramework(class UIMainFramework* this)

006a0c90  {
006a0c93      UIFramework::UIFramework(this);
006a0c9a      this->vtable = 0x801800;
006a0ca0      this->m_rootElements.m_data = 0;
006a0ca6      this->m_rootElements.m_sizeAndDeallocate = 0;
006a0cac      this->m_rootElements.m_num = 0;
006a0c90  }

006a0cb6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a0cc0  void __fastcall UIMainFramework::~UIMainFramework(class UIMainFramework* this)

006a0cc0  {
006a0cc3      this->vtable = 0x801800;
006a0cc9      DialogFactory::Reset();
006a0cc9      
006a0cde      if ((this->m_rootElements.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
006a0ce7          operator delete[](this->m_rootElements.m_data);
006a0ce7      
006a0cf2      /* tailcall */
006a0cf2      return UIFramework::~UIFramework(this);
006a0cc0  }

006a0cf7                                                                       90 90 90 90 90 90 90 90 90                         .........

006a0d00  void* __thiscall UIMainFramework::`scalar deleting destructor'(class UIMainFramework* this, uint32_t arg2)

006a0d00  {
006a0d03      this->vtable = 0x801800;
006a0d09      DialogFactory::Reset();
006a0d09      
006a0d1e      if ((this->m_rootElements.m_sizeAndDeallocate & 0x80000000) == 0x80000000)
006a0d27          operator delete[](this->m_rootElements.m_data);
006a0d27      
006a0d31      UIFramework::~UIFramework(this);
006a0d31      
006a0d3b      if ((arg2 & 1) != 0)
006a0d3e          operator delete(this);
006a0d3e      
006a0d49      return this;
006a0d00  }

006a0d4c                                      90 90 90 90                                                              ....

006a0d50  class UIElement* __thiscall UIMainFramework::CreateAndAddRootElementByDataID(class UIMainFramework* this, class IDClass<_tagDataID,32,0> arg2, uint32_t const arg3)

006a0d50  {
006a0d64      class UIElement* result;
006a0d64      class UIListener* edx;
006a0d64      result = UIElementManager::CreateRootElementByDataID(UIElementManager::s_pInstance, arg2, arg3);
006a0d6d      arg3 = result;
006a0d6d      
006a0d71      if (result == 0)
006a0d75          return result;
006a0d75      
006a0d78      class UIMainFramework* this_1 = this;
006a0d7b      UIElement::RegisterForElementMessages(result, edx);
006a0d8b      SmartArray<unsigned long,1>::add_unique(&this->m_rootElements, &arg3);
006a0d94      return result;
006a0d50  }

006a0d97                                                                       90 90 90 90 90 90 90 90 90                         .........

006a0da0  void __fastcall GamePlayUI::GamePlayUI(class GamePlayUI* this)

006a0da0  {
006a0da3      UIMainFramework::UIMainFramework(this);
006a0da8      this->vtable = 0x8018b0;
006a0db4      SmartBox::Show(SmartBox::smartbox);
006a0da0  }

006a0dbd                                                                                         90 90 90                               ...

006a0dc0  void __fastcall GamePlayUI::~GamePlayUI(class GamePlayUI* this)

006a0dc0  {
006a0dc3      this->vtable = 0x8018b0;
006a0dcf      SmartBox::Hide(SmartBox::smartbox);
006a0dd7      /* tailcall */
006a0dd7      return UIMainFramework::~UIMainFramework(this);
006a0dc0  }

006a0ddc                                                                                      90 90 90 90                              ....

006a0de0  void* __thiscall GamePlayUI::`scalar deleting destructor'(class GamePlayUI* this, uint32_t arg2)

006a0de0  {
006a0de3      this->vtable = 0x8018b0;
006a0def      SmartBox::Hide(SmartBox::smartbox);
006a0df6      UIMainFramework::~UIMainFramework(this);
006a0df6      
006a0e00      if ((arg2 & 1) != 0)
006a0e03          operator delete(this);
006a0e03      
006a0e0e      return this;
006a0de0  }

006a0e11                                                     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                   ...............

006a0e20  uint32_t CM_Character::DispatchUI_ConfirmationDone(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a0e20  {
006a0e26      if (arg1 != 0)
006a0e26      {
006a0e28          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a0e28          
006a0e3e          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x276))
006a0e4a              ClientUISystem::Handle_Character__ConfirmationDone(m_pUISystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006a0e26      }
006a0e26      
006a0e42      return 0;
006a0e20  }


006a0e50  uint32_t CM_Character::DispatchUI_EnterGame_ServerReady(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a0e50  {
006a0e56      if (arg1 != 0)
006a0e56      {
006a0e58          class CPlayerSystem* m_pPlayerSystem = arg1->m_pPlayerSystem;
006a0e58          
006a0e69          if ((m_pPlayerSystem != 0 && *(uint32_t*)arg2 == 0xf7df))
006a0e6e              /* tailcall */
006a0e6e              return CPlayerSystem::Handle_Character__EnterGame_ServerReady(m_pPlayerSystem);
006a0e56      }
006a0e56      
006a0e6d      return 0;
006a0e50  }

006a0e73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a0e80  uint32_t CM_Character::DispatchUI_ReturnPing(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a0e80  {
006a0e86      if (arg1 != 0)
006a0e86      {
006a0e88          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a0e88          
006a0e99          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x1ea))
006a0e9e              /* tailcall */
006a0e9e              return ClientUISystem::Handle_Character__ReturnPing(m_pUISystem);
006a0e86      }
006a0e86      
006a0e9d      return 0;
006a0e80  }

006a0ea3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a0eb0  uint8_t CM_Character::Event_AddShortCut(class CShortCutData const* arg1)

006a0eb0  {
006a0eb6      uint32_t eax = Proto_UI::GetNextUICounter();
006a0ec9      struct CShortCutData::VTable* vtable = arg1->vtable;
006a0ece      int32_t var_8 = 0x801ad4;
006a0ed6      void* var_c = nullptr;
006a0ede      int32_t eax_1 = vtable->Pack(&var_c, 0);
006a0eee      OrderHdr::Pack(&var_8, &var_c, 0);
006a0ef8      void* eax_2 = operator new[]((eax_1 + 0xc));
006a0f00      var_c = eax_2;
006a0f10      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a0f19      *(uint32_t*)var_c = 0x19c;
006a0f23      struct CShortCutData::VTable* vtable_1 = arg1->vtable;
006a0f2c      void* ecx_6 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a0f2e      var_c += 4;
006a0f3a      vtable_1->Pack(&var_c, ecx_6);
006a0f44      void* ebx;
006a0f44      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a0f44      
006a0f4b      if (ebx == 0)
006a0f52          Proto_UI::UICounterFailedSend(eax);
006a0f52      
006a0f62      return ebx;
006a0eb0  }

006a0f63           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a0f70  uint8_t CM_Character::Event_AddSpellFavorite(uint32_t arg1, int32_t arg2, int32_t arg3)

006a0f70  {
006a0f76      uint32_t eax = Proto_UI::GetNextUICounter();
006a0f8a      int32_t var_8 = 0x801ad4;
006a0f92      void* var_c = nullptr;
006a0f9a      OrderHdr::Pack(&var_8, &var_c, 0);
006a0fa5      void* eax_1 = operator new[](0x18);
006a0fb7      var_c = eax_1;
006a0fbd      OrderHdr::Pack(&var_8, &var_c, 0x18);
006a0fca      *(uint32_t*)var_c = 0x1e3;
006a0fd4      uint32_t* eax_3 = ((char*)var_c + 4);
006a0fd7      var_c = eax_3;
006a0fdb      *(uint32_t*)eax_3 = arg1;
006a0fe1      void* eax_5 = ((char*)var_c + 4);
006a0fe6      void* ecx_4 = (eax_5 & 0x80000003);
006a0fe6      bool cond:1 = ecx_4 == 0;
006a0fec      var_c = eax_5;
006a0fec      
006a0ff0      if (ecx_4 < 0)
006a0ff0      {
006a0ff3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a0ff6          ecx_4 = ((char*)ecx_6 + 1);
006a0ff6          cond:1 = ecx_6 == 0xffffffff;
006a0ff0      }
006a0ff0      
006a0ff7      if (!(cond:1))
006a0ff7      {
006a0ffe          void* i_4 = (4 - ecx_4);
006a0ffe          
006a1000          if (4 != ecx_4)
006a1000          {
006a100f              void* i;
006a100f              
006a100f              do
006a100f              {
006a1002                  *(uint8_t*)eax_5 = 0;
006a1009                  eax_5 = ((char*)var_c + 1);
006a100a                  i = i_4;
006a100a                  i_4 -= 1;
006a100b                  var_c = eax_5;
006a100f              } while (i != 1);
006a1000          }
006a0ff7      }
006a0ff7      
006a1015      *(uint32_t*)eax_5 = arg2;
006a101b      void* eax_8 = ((char*)var_c + 4);
006a1020      void* ecx_8 = (eax_8 & 0x80000003);
006a1020      bool cond:3 = ecx_8 == 0;
006a1026      var_c = eax_8;
006a1026      
006a102a      if (ecx_8 < 0)
006a102a      {
006a102d          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006a1030          ecx_8 = ((char*)ecx_10 + 1);
006a1030          cond:3 = ecx_10 == 0xffffffff;
006a102a      }
006a102a      
006a1031      if (!(cond:3))
006a1031      {
006a1038          void* i_5 = (4 - ecx_8);
006a1038          
006a103a          if (4 != ecx_8)
006a103a          {
006a104d              void* i_1;
006a104d              
006a104d              do
006a104d              {
006a1040                  *(uint8_t*)eax_8 = 0;
006a1047                  eax_8 = ((char*)var_c + 1);
006a1048                  i_1 = i_5;
006a1048                  i_5 -= 1;
006a1049                  var_c = eax_8;
006a104d              } while (i_1 != 1);
006a103a          }
006a1031      }
006a1031      
006a1053      *(uint32_t*)eax_8 = arg3;
006a1059      void* eax_11 = ((char*)var_c + 4);
006a105c      var_c = eax_11;
006a1060      void* eax_12 = (eax_11 & 0x80000003);
006a1060      bool cond:5 = eax_12 == 0;
006a1060      
006a1065      if (eax_12 < 0)
006a1065      {
006a1068          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006a106b          eax_12 = ((char*)eax_14 + 1);
006a106b          cond:5 = eax_14 == 0xffffffff;
006a1065      }
006a1065      
006a106c      if (!(cond:5))
006a106c      {
006a1073          void* i_3 = (4 - eax_12);
006a1073          
006a1075          if (4 != eax_12)
006a1075          {
006a1091              void* i_2;
006a1091              
006a1091              do
006a1091              {
006a1084                  *(uint8_t*)var_c = 0;
006a108c                  i_2 = i_3;
006a108c                  i_3 -= 1;
006a108d                  var_c += 1;
006a1091              } while (i_2 != 1);
006a1075          }
006a106c      }
006a106c      
006a109a      int32_t ebx;
006a109a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006a109a      
006a10a1      if (ebx == 0)
006a10a8          Proto_UI::UICounterFailedSend(eax);
006a10a8      
006a10b2      uint32_t eax_15;
006a10b2      eax_15 = ebx;
006a10b8      return eax_15;
006a0f70  }

006a1079                                                                             8d a4 24 00 00 00 00                           ..$....
006a10b9                                                                             90 90 90 90 90 90 90                           .......

006a10c0  uint8_t CM_Character::Event_CharacterOptionsEvent(class PlayerModule const* arg1)

006a10c0  {
006a10c6      uint32_t eax = Proto_UI::GetNextUICounter();
006a10d9      struct PlayerModule::VTable* vtable = arg1->vtable;
006a10de      int32_t var_8 = 0x801ad4;
006a10e6      void* var_c = nullptr;
006a10ee      int32_t eax_1 = vtable->Pack(&var_c, 0);
006a10fe      OrderHdr::Pack(&var_8, &var_c, 0);
006a1108      void* eax_2 = operator new[]((eax_1 + 0xc));
006a1110      var_c = eax_2;
006a1120      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a1129      *(uint32_t*)var_c = 0x1a1;
006a1133      struct PlayerModule::VTable* vtable_1 = arg1->vtable;
006a113c      void* ecx_6 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a113e      var_c += 4;
006a114a      vtable_1->Pack(&var_c, ecx_6);
006a1154      void* ebx;
006a1154      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a1154      
006a115b      if (ebx == 0)
006a1162          Proto_UI::UICounterFailedSend(eax);
006a1162      
006a1172      return ebx;
006a10c0  }

006a1173                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a1180  uint8_t CM_Character::Event_ClearPlayerConsentList()

006a1180  {
006a1186      uint32_t eax = Proto_UI::GetNextUICounter();
006a119a      int32_t var_8 = 0x801ad4;
006a11a2      void* var_c = nullptr;
006a11aa      OrderHdr::Pack(&var_8, &var_c, 0);
006a11b5      void* eax_1 = operator new[](0xc);
006a11c7      var_c = eax_1;
006a11cd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a11d6      *(uint32_t*)var_c = 0x216;
006a11e5      var_c += 4;
006a11ee      int32_t ebx;
006a11ee      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a11ee      
006a11f5      if (ebx == 0)
006a11fc          Proto_UI::UICounterFailedSend(eax);
006a11fc      
006a1206      uint32_t eax_4;
006a1206      eax_4 = ebx;
006a120c      return eax_4;
006a1180  }

006a120d                                         90 90 90                                                               ...

006a1210  uint8_t CM_Character::Event_ConfirmationResponse(int32_t arg1, uint32_t arg2, int32_t arg3)

006a1210  {
006a1216      uint32_t eax = Proto_UI::GetNextUICounter();
006a122a      int32_t var_8 = 0x801ad4;
006a1232      void* var_c = nullptr;
006a123a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1245      void* eax_1 = operator new[](0x18);
006a1257      var_c = eax_1;
006a125d      OrderHdr::Pack(&var_8, &var_c, 0x18);
006a126a      *(uint32_t*)var_c = 0x275;
006a1274      int32_t* eax_3 = ((char*)var_c + 4);
006a1277      var_c = eax_3;
006a127b      *(uint32_t*)eax_3 = arg1;
006a1281      void* eax_5 = ((char*)var_c + 4);
006a1286      void* ecx_4 = (eax_5 & 0x80000003);
006a1286      bool cond:1 = ecx_4 == 0;
006a128c      var_c = eax_5;
006a128c      
006a1290      if (ecx_4 < 0)
006a1290      {
006a1293          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a1296          ecx_4 = ((char*)ecx_6 + 1);
006a1296          cond:1 = ecx_6 == 0xffffffff;
006a1290      }
006a1290      
006a1297      if (!(cond:1))
006a1297      {
006a129e          void* i_4 = (4 - ecx_4);
006a129e          
006a12a0          if (4 != ecx_4)
006a12a0          {
006a12af              void* i;
006a12af              
006a12af              do
006a12af              {
006a12a2                  *(uint8_t*)eax_5 = 0;
006a12a9                  eax_5 = ((char*)var_c + 1);
006a12aa                  i = i_4;
006a12aa                  i_4 -= 1;
006a12ab                  var_c = eax_5;
006a12af              } while (i != 1);
006a12a0          }
006a1297      }
006a1297      
006a12b5      *(uint32_t*)eax_5 = arg2;
006a12bb      void* eax_8 = ((char*)var_c + 4);
006a12c0      void* ecx_8 = (eax_8 & 0x80000003);
006a12c0      bool cond:3 = ecx_8 == 0;
006a12c6      var_c = eax_8;
006a12c6      
006a12ca      if (ecx_8 < 0)
006a12ca      {
006a12cd          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006a12d0          ecx_8 = ((char*)ecx_10 + 1);
006a12d0          cond:3 = ecx_10 == 0xffffffff;
006a12ca      }
006a12ca      
006a12d1      if (!(cond:3))
006a12d1      {
006a12d8          void* i_5 = (4 - ecx_8);
006a12d8          
006a12da          if (4 != ecx_8)
006a12da          {
006a12ed              void* i_1;
006a12ed              
006a12ed              do
006a12ed              {
006a12e0                  *(uint8_t*)eax_8 = 0;
006a12e7                  eax_8 = ((char*)var_c + 1);
006a12e8                  i_1 = i_5;
006a12e8                  i_5 -= 1;
006a12e9                  var_c = eax_8;
006a12ed              } while (i_1 != 1);
006a12da          }
006a12d1      }
006a12d1      
006a12f3      *(uint32_t*)eax_8 = arg3;
006a12f9      void* eax_11 = ((char*)var_c + 4);
006a12fc      var_c = eax_11;
006a1300      void* eax_12 = (eax_11 & 0x80000003);
006a1300      bool cond:5 = eax_12 == 0;
006a1300      
006a1305      if (eax_12 < 0)
006a1305      {
006a1308          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006a130b          eax_12 = ((char*)eax_14 + 1);
006a130b          cond:5 = eax_14 == 0xffffffff;
006a1305      }
006a1305      
006a130c      if (!(cond:5))
006a130c      {
006a1313          void* i_3 = (4 - eax_12);
006a1313          
006a1315          if (4 != eax_12)
006a1315          {
006a1331              void* i_2;
006a1331              
006a1331              do
006a1331              {
006a1324                  *(uint8_t*)var_c = 0;
006a132c                  i_2 = i_3;
006a132c                  i_3 -= 1;
006a132d                  var_c += 1;
006a1331              } while (i_2 != 1);
006a1315          }
006a130c      }
006a130c      
006a133a      int32_t ebx;
006a133a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006a133a      
006a1341      if (ebx == 0)
006a1348          Proto_UI::UICounterFailedSend(eax);
006a1348      
006a1352      uint32_t eax_15;
006a1352      eax_15 = ebx;
006a1358      return eax_15;
006a1210  }

006a1319                                                                             8d a4 24 00 00 00 00                           ..$....
006a1359                                                                             90 90 90 90 90 90 90                           .......

006a1360  uint8_t CM_Character::Event_DisplayPlayerConsentList()

006a1360  {
006a1366      uint32_t eax = Proto_UI::GetNextUICounter();
006a137a      int32_t var_8 = 0x801ad4;
006a1382      void* var_c = nullptr;
006a138a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1395      void* eax_1 = operator new[](0xc);
006a13a7      var_c = eax_1;
006a13ad      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a13b6      *(uint32_t*)var_c = 0x217;
006a13c5      var_c += 4;
006a13ce      int32_t ebx;
006a13ce      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a13ce      
006a13d5      if (ebx == 0)
006a13dc          Proto_UI::UICounterFailedSend(eax);
006a13dc      
006a13e6      uint32_t eax_4;
006a13e6      eax_4 = ebx;
006a13ec      return eax_4;
006a1360  }

006a13ed                                         90 90 90                                                               ...

006a13f0  uint8_t CM_Character::Event_EnterPKLite()

006a13f0  {
006a13f6      uint32_t eax = Proto_UI::GetNextUICounter();
006a140a      int32_t var_8 = 0x801ad4;
006a1412      void* var_c = nullptr;
006a141a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1425      void* eax_1 = operator new[](0xc);
006a1437      var_c = eax_1;
006a143d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a1446      *(uint32_t*)var_c = 0x28f;
006a1455      var_c += 4;
006a145e      int32_t ebx;
006a145e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a145e      
006a1465      if (ebx == 0)
006a146c          Proto_UI::UICounterFailedSend(eax);
006a146c      
006a1476      uint32_t eax_4;
006a1476      eax_4 = ebx;
006a147c      return eax_4;
006a13f0  }

006a147d                                                                                         90 90 90                               ...

006a1480  uint8_t CM_Character::Event_LoginCompleteNotification()

006a1480  {
006a1486      uint32_t eax = Proto_UI::GetNextUICounter();
006a149a      int32_t var_8 = 0x801ad4;
006a14a2      void* var_c = nullptr;
006a14aa      OrderHdr::Pack(&var_8, &var_c, 0);
006a14b5      void* eax_1 = operator new[](0xc);
006a14c7      var_c = eax_1;
006a14cd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a14d6      *(uint32_t*)var_c = 0xa1;
006a14e5      var_c += 4;
006a14ee      int32_t ebx;
006a14ee      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a14ee      
006a14f5      if (ebx == 0)
006a14fc          Proto_UI::UICounterFailedSend(eax);
006a14fc      
006a1506      uint32_t eax_4;
006a1506      eax_4 = ebx;
006a150c      return eax_4;
006a1480  }

006a150d                                         90 90 90                                                               ...

006a1510  uint8_t CM_Character::Event_PlayerOptionChangedEvent(enum PlayerOption arg1, int32_t arg2)

006a1510  {
006a1516      uint32_t eax = Proto_UI::GetNextUICounter();
006a152a      int32_t var_8 = 0x801ad4;
006a1532      void* var_c = nullptr;
006a153a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1545      void* eax_1 = operator new[](0x14);
006a1557      var_c = eax_1;
006a155d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a156a      *(uint32_t*)var_c = 5;
006a1574      enum PlayerOption* eax_3 = ((char*)var_c + 4);
006a1577      var_c = eax_3;
006a157b      *(uint32_t*)eax_3 = arg1;
006a1581      void* eax_5 = ((char*)var_c + 4);
006a1586      void* ecx_4 = (eax_5 & 0x80000003);
006a1586      bool cond:1 = ecx_4 == 0;
006a158c      var_c = eax_5;
006a158c      
006a1590      if (ecx_4 < 0)
006a1590      {
006a1593          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a1596          ecx_4 = ((char*)ecx_6 + 1);
006a1596          cond:1 = ecx_6 == 0xffffffff;
006a1590      }
006a1590      
006a1597      if (!(cond:1))
006a1597      {
006a159e          void* i_3 = (4 - ecx_4);
006a159e          
006a15a0          if (4 != ecx_4)
006a15a0          {
006a15af              void* i;
006a15af              
006a15af              do
006a15af              {
006a15a2                  *(uint8_t*)eax_5 = 0;
006a15a9                  eax_5 = ((char*)var_c + 1);
006a15aa                  i = i_3;
006a15aa                  i_3 -= 1;
006a15ab                  var_c = eax_5;
006a15af              } while (i != 1);
006a15a0          }
006a1597      }
006a1597      
006a15b5      *(uint32_t*)eax_5 = arg2;
006a15bb      void* eax_8 = ((char*)var_c + 4);
006a15be      var_c = eax_8;
006a15c2      void* eax_9 = (eax_8 & 0x80000003);
006a15c2      bool cond:2 = eax_9 == 0;
006a15c2      
006a15c7      if (eax_9 < 0)
006a15c7      {
006a15ca          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a15cd          eax_9 = ((char*)eax_11 + 1);
006a15cd          cond:2 = eax_11 == 0xffffffff;
006a15c7      }
006a15c7      
006a15ce      if (!(cond:2))
006a15ce      {
006a15d5          void* i_2 = (4 - eax_9);
006a15d5          
006a15d7          if (4 != eax_9)
006a15d7          {
006a15f1              void* i_1;
006a15f1              
006a15f1              do
006a15f1              {
006a15e4                  *(uint8_t*)var_c = 0;
006a15ec                  i_1 = i_2;
006a15ec                  i_2 -= 1;
006a15ed                  var_c += 1;
006a15f1              } while (i_1 != 1);
006a15d7          }
006a15ce      }
006a15ce      
006a15fa      int32_t ebx;
006a15fa      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a15fa      
006a1601      if (ebx == 0)
006a1608          Proto_UI::UICounterFailedSend(eax);
006a1608      
006a1618      return ebx;
006a1510  }

006a1619                                                                             90 90 90 90 90 90 90                           .......

006a1620  uint8_t CM_Character::Event_QueryAge(uint32_t arg1)

006a1620  {
006a1626      uint32_t eax = Proto_UI::GetNextUICounter();
006a163a      int32_t var_8 = 0x801ad4;
006a1642      void* var_c = nullptr;
006a164a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1655      void* eax_1 = operator new[](0x10);
006a1667      var_c = eax_1;
006a166d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a167a      *(uint32_t*)var_c = 0x1c2;
006a1684      uint32_t* eax_3 = ((char*)var_c + 4);
006a1687      var_c = eax_3;
006a168b      *(uint32_t*)eax_3 = arg1;
006a1691      void* eax_5 = ((char*)var_c + 4);
006a1694      var_c = eax_5;
006a1698      void* eax_6 = (eax_5 & 0x80000003);
006a1698      bool cond:0 = eax_6 == 0;
006a1698      
006a169d      if (eax_6 < 0)
006a169d      {
006a16a0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a16a3          eax_6 = ((char*)eax_8 + 1);
006a16a3          cond:0 = eax_8 == 0xffffffff;
006a169d      }
006a169d      
006a16a4      if (!(cond:0))
006a16a4      {
006a16ab          void* i_1 = (4 - eax_6);
006a16ab          
006a16ad          if (4 != eax_6)
006a16ad          {
006a16c1              void* i;
006a16c1              
006a16c1              do
006a16c1              {
006a16b4                  *(uint8_t*)var_c = 0;
006a16bc                  i = i_1;
006a16bc                  i_1 -= 1;
006a16bd                  var_c += 1;
006a16c1              } while (i != 1);
006a16ad          }
006a16a4      }
006a16a4      
006a16ca      int32_t ebx;
006a16ca      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a16ca      
006a16d1      if (ebx == 0)
006a16d8          Proto_UI::UICounterFailedSend(eax);
006a16d8      
006a16e2      uint32_t eax_9;
006a16e2      eax_9 = ebx;
006a16e8      return eax_9;
006a1620  }

006a16e9                             90 90 90 90 90 90 90                                                           .......

006a16f0  uint8_t CM_Character::Event_QueryBirth(uint32_t arg1)

006a16f0  {
006a16f6      uint32_t eax = Proto_UI::GetNextUICounter();
006a170a      int32_t var_8 = 0x801ad4;
006a1712      void* var_c = nullptr;
006a171a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1725      void* eax_1 = operator new[](0x10);
006a1737      var_c = eax_1;
006a173d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a174a      *(uint32_t*)var_c = 0x1c4;
006a1754      uint32_t* eax_3 = ((char*)var_c + 4);
006a1757      var_c = eax_3;
006a175b      *(uint32_t*)eax_3 = arg1;
006a1761      void* eax_5 = ((char*)var_c + 4);
006a1764      var_c = eax_5;
006a1768      void* eax_6 = (eax_5 & 0x80000003);
006a1768      bool cond:0 = eax_6 == 0;
006a1768      
006a176d      if (eax_6 < 0)
006a176d      {
006a1770          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a1773          eax_6 = ((char*)eax_8 + 1);
006a1773          cond:0 = eax_8 == 0xffffffff;
006a176d      }
006a176d      
006a1774      if (!(cond:0))
006a1774      {
006a177b          void* i_1 = (4 - eax_6);
006a177b          
006a177d          if (4 != eax_6)
006a177d          {
006a1791              void* i;
006a1791              
006a1791              do
006a1791              {
006a1784                  *(uint8_t*)var_c = 0;
006a178c                  i = i_1;
006a178c                  i_1 -= 1;
006a178d                  var_c += 1;
006a1791              } while (i != 1);
006a177d          }
006a1774      }
006a1774      
006a179a      int32_t ebx;
006a179a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a179a      
006a17a1      if (ebx == 0)
006a17a8          Proto_UI::UICounterFailedSend(eax);
006a17a8      
006a17b2      uint32_t eax_9;
006a17b2      eax_9 = ebx;
006a17b8      return eax_9;
006a16f0  }

006a17b9                                                                             90 90 90 90 90 90 90                           .......

006a17c0  uint8_t CM_Character::Event_RemoveShortCut(int32_t arg1)

006a17c0  {
006a17c6      uint32_t eax = Proto_UI::GetNextUICounter();
006a17da      int32_t var_8 = 0x801ad4;
006a17e2      void* var_c = nullptr;
006a17ea      OrderHdr::Pack(&var_8, &var_c, 0);
006a17f5      void* eax_1 = operator new[](0x10);
006a1807      var_c = eax_1;
006a180d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a181a      *(uint32_t*)var_c = 0x19d;
006a1824      int32_t* eax_3 = ((char*)var_c + 4);
006a1827      var_c = eax_3;
006a182b      *(uint32_t*)eax_3 = arg1;
006a1831      void* eax_5 = ((char*)var_c + 4);
006a1834      var_c = eax_5;
006a1838      void* eax_6 = (eax_5 & 0x80000003);
006a1838      bool cond:0 = eax_6 == 0;
006a1838      
006a183d      if (eax_6 < 0)
006a183d      {
006a1840          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a1843          eax_6 = ((char*)eax_8 + 1);
006a1843          cond:0 = eax_8 == 0xffffffff;
006a183d      }
006a183d      
006a1844      if (!(cond:0))
006a1844      {
006a184b          void* i_1 = (4 - eax_6);
006a184b          
006a184d          if (4 != eax_6)
006a184d          {
006a1861              void* i;
006a1861              
006a1861              do
006a1861              {
006a1854                  *(uint8_t*)var_c = 0;
006a185c                  i = i_1;
006a185c                  i_1 -= 1;
006a185d                  var_c += 1;
006a1861              } while (i != 1);
006a184d          }
006a1844      }
006a1844      
006a186a      int32_t ebx;
006a186a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a186a      
006a1871      if (ebx == 0)
006a1878          Proto_UI::UICounterFailedSend(eax);
006a1878      
006a1882      uint32_t eax_9;
006a1882      eax_9 = ebx;
006a1888      return eax_9;
006a17c0  }

006a1889                             90 90 90 90 90 90 90                                                           .......

006a1890  uint8_t CM_Character::Event_RemoveSpellFavorite(uint32_t arg1, int32_t arg2)

006a1890  {
006a1896      uint32_t eax = Proto_UI::GetNextUICounter();
006a18aa      int32_t var_8 = 0x801ad4;
006a18b2      void* var_c = nullptr;
006a18ba      OrderHdr::Pack(&var_8, &var_c, 0);
006a18c5      void* eax_1 = operator new[](0x14);
006a18d7      var_c = eax_1;
006a18dd      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a18ea      *(uint32_t*)var_c = 0x1e4;
006a18f4      uint32_t* eax_3 = ((char*)var_c + 4);
006a18f7      var_c = eax_3;
006a18fb      *(uint32_t*)eax_3 = arg1;
006a1901      void* eax_5 = ((char*)var_c + 4);
006a1906      void* ecx_4 = (eax_5 & 0x80000003);
006a1906      bool cond:1 = ecx_4 == 0;
006a190c      var_c = eax_5;
006a190c      
006a1910      if (ecx_4 < 0)
006a1910      {
006a1913          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a1916          ecx_4 = ((char*)ecx_6 + 1);
006a1916          cond:1 = ecx_6 == 0xffffffff;
006a1910      }
006a1910      
006a1917      if (!(cond:1))
006a1917      {
006a191e          void* i_3 = (4 - ecx_4);
006a191e          
006a1920          if (4 != ecx_4)
006a1920          {
006a192f              void* i;
006a192f              
006a192f              do
006a192f              {
006a1922                  *(uint8_t*)eax_5 = 0;
006a1929                  eax_5 = ((char*)var_c + 1);
006a192a                  i = i_3;
006a192a                  i_3 -= 1;
006a192b                  var_c = eax_5;
006a192f              } while (i != 1);
006a1920          }
006a1917      }
006a1917      
006a1935      *(uint32_t*)eax_5 = arg2;
006a193b      void* eax_8 = ((char*)var_c + 4);
006a193e      var_c = eax_8;
006a1942      void* eax_9 = (eax_8 & 0x80000003);
006a1942      bool cond:2 = eax_9 == 0;
006a1942      
006a1947      if (eax_9 < 0)
006a1947      {
006a194a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a194d          eax_9 = ((char*)eax_11 + 1);
006a194d          cond:2 = eax_11 == 0xffffffff;
006a1947      }
006a1947      
006a194e      if (!(cond:2))
006a194e      {
006a1955          void* i_2 = (4 - eax_9);
006a1955          
006a1957          if (4 != eax_9)
006a1957          {
006a1971              void* i_1;
006a1971              
006a1971              do
006a1971              {
006a1964                  *(uint8_t*)var_c = 0;
006a196c                  i_1 = i_2;
006a196c                  i_2 -= 1;
006a196d                  var_c += 1;
006a1971              } while (i_1 != 1);
006a1957          }
006a194e      }
006a194e      
006a197a      int32_t ebx;
006a197a      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a197a      
006a1981      if (ebx == 0)
006a1988          Proto_UI::UICounterFailedSend(eax);
006a1988      
006a1998      return ebx;
006a1890  }

006a1999                                                                             90 90 90 90 90 90 90                           .......

006a19a0  uint8_t CM_Character::Event_RequestPing()

006a19a0  {
006a19a6      uint32_t eax = Proto_UI::GetNextUICounter();
006a19ba      int32_t var_8 = 0x801ad4;
006a19c2      void* var_c = nullptr;
006a19ca      OrderHdr::Pack(&var_8, &var_c, 0);
006a19d5      void* eax_1 = operator new[](0xc);
006a19e7      var_c = eax_1;
006a19ed      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a19f6      *(uint32_t*)var_c = 0x1e9;
006a1a05      var_c += 4;
006a1a0e      int32_t ebx;
006a1a0e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a1a0e      
006a1a15      if (ebx == 0)
006a1a1c          Proto_UI::UICounterFailedSend(eax);
006a1a1c      
006a1a26      uint32_t eax_4;
006a1a26      eax_4 = ebx;
006a1a2c      return eax_4;
006a19a0  }

006a1a2d                                         90 90 90                                                               ...

006a1a30  uint8_t CM_Character::Event_SpellbookFilterEvent(uint32_t arg1)

006a1a30  {
006a1a36      uint32_t eax = Proto_UI::GetNextUICounter();
006a1a4a      int32_t var_8 = 0x801ad4;
006a1a52      void* var_c = nullptr;
006a1a5a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1a65      void* eax_1 = operator new[](0x10);
006a1a77      var_c = eax_1;
006a1a7d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a1a8a      *(uint32_t*)var_c = 0x286;
006a1a94      uint32_t* eax_3 = ((char*)var_c + 4);
006a1a97      var_c = eax_3;
006a1a9b      *(uint32_t*)eax_3 = arg1;
006a1aa1      void* eax_5 = ((char*)var_c + 4);
006a1aa4      var_c = eax_5;
006a1aa8      void* eax_6 = (eax_5 & 0x80000003);
006a1aa8      bool cond:0 = eax_6 == 0;
006a1aa8      
006a1aad      if (eax_6 < 0)
006a1aad      {
006a1ab0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a1ab3          eax_6 = ((char*)eax_8 + 1);
006a1ab3          cond:0 = eax_8 == 0xffffffff;
006a1aad      }
006a1aad      
006a1ab4      if (!(cond:0))
006a1ab4      {
006a1abb          void* i_1 = (4 - eax_6);
006a1abb          
006a1abd          if (4 != eax_6)
006a1abd          {
006a1ad1              void* i;
006a1ad1              
006a1ad1              do
006a1ad1              {
006a1ac4                  *(uint8_t*)var_c = 0;
006a1acc                  i = i_1;
006a1acc                  i_1 -= 1;
006a1acd                  var_c += 1;
006a1ad1              } while (i != 1);
006a1abd          }
006a1ab4      }
006a1ab4      
006a1ada      int32_t ebx;
006a1ada      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a1ada      
006a1ae1      if (ebx == 0)
006a1ae8          Proto_UI::UICounterFailedSend(eax);
006a1ae8      
006a1af2      uint32_t eax_9;
006a1af2      eax_9 = ebx;
006a1af8      return eax_9;
006a1a30  }

006a1af9                                                                             90 90 90 90 90 90 90                           .......

006a1b00  uint8_t CM_Character::Event_Suicide()

006a1b00  {
006a1b06      uint32_t eax = Proto_UI::GetNextUICounter();
006a1b1a      int32_t var_8 = 0x801ad4;
006a1b22      void* var_c = nullptr;
006a1b2a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1b35      void* eax_1 = operator new[](0xc);
006a1b47      var_c = eax_1;
006a1b4d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a1b56      *(uint32_t*)var_c = 0x279;
006a1b65      var_c += 4;
006a1b6e      int32_t ebx;
006a1b6e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a1b6e      
006a1b75      if (ebx == 0)
006a1b7c          Proto_UI::UICounterFailedSend(eax);
006a1b7c      
006a1b86      uint32_t eax_4;
006a1b86      eax_4 = ebx;
006a1b8c      return eax_4;
006a1b00  }

006a1b8d                                         90 90 90                                                               ...

006a1b90  uint8_t CM_Character::Event_TeleToLifestone()

006a1b90  {
006a1b96      uint32_t eax = Proto_UI::GetNextUICounter();
006a1baa      int32_t var_8 = 0x801ad4;
006a1bb2      void* var_c = nullptr;
006a1bba      OrderHdr::Pack(&var_8, &var_c, 0);
006a1bc5      void* eax_1 = operator new[](0xc);
006a1bd7      var_c = eax_1;
006a1bdd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a1be6      *(uint32_t*)var_c = 0x63;
006a1bf5      var_c += 4;
006a1bfe      int32_t ebx;
006a1bfe      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a1bfe      
006a1c05      if (ebx == 0)
006a1c0c          Proto_UI::UICounterFailedSend(eax);
006a1c0c      
006a1c16      uint32_t eax_4;
006a1c16      eax_4 = ebx;
006a1c1c      return eax_4;
006a1b90  }

006a1c1d                                                                                         90 90 90                               ...

006a1c20  uint8_t CM_Character::Event_TeleToMarketplace()

006a1c20  {
006a1c26      uint32_t eax = Proto_UI::GetNextUICounter();
006a1c3a      int32_t var_8 = 0x801ad4;
006a1c42      void* var_c = nullptr;
006a1c4a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1c55      void* eax_1 = operator new[](0xc);
006a1c67      var_c = eax_1;
006a1c6d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a1c76      *(uint32_t*)var_c = 0x28d;
006a1c85      var_c += 4;
006a1c8e      int32_t ebx;
006a1c8e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a1c8e      
006a1c95      if (ebx == 0)
006a1c9c          Proto_UI::UICounterFailedSend(eax);
006a1c9c      
006a1ca6      uint32_t eax_4;
006a1ca6      eax_4 = ebx;
006a1cac      return eax_4;
006a1c20  }

006a1cad                                         90 90 90                                                               ...

006a1cb0  uint8_t CM_Character::Event_TeleToPKArena()

006a1cb0  {
006a1cb6      uint32_t eax = Proto_UI::GetNextUICounter();
006a1cca      int32_t var_8 = 0x801ad4;
006a1cd2      void* var_c = nullptr;
006a1cda      OrderHdr::Pack(&var_8, &var_c, 0);
006a1ce5      void* eax_1 = operator new[](0xc);
006a1cf7      var_c = eax_1;
006a1cfd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a1d06      *(uint32_t*)var_c = 0x27;
006a1d15      var_c += 4;
006a1d1e      int32_t ebx;
006a1d1e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a1d1e      
006a1d25      if (ebx == 0)
006a1d2c          Proto_UI::UICounterFailedSend(eax);
006a1d2c      
006a1d36      uint32_t eax_4;
006a1d36      eax_4 = ebx;
006a1d3c      return eax_4;
006a1cb0  }

006a1d3d                                                                                         90 90 90                               ...

006a1d40  uint8_t CM_Character::Event_TeleToPKLArena()

006a1d40  {
006a1d46      uint32_t eax = Proto_UI::GetNextUICounter();
006a1d5a      int32_t var_8 = 0x801ad4;
006a1d62      void* var_c = nullptr;
006a1d6a      OrderHdr::Pack(&var_8, &var_c, 0);
006a1d75      void* eax_1 = operator new[](0xc);
006a1d87      var_c = eax_1;
006a1d8d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a1d96      *(uint32_t*)var_c = 0x26;
006a1da5      var_c += 4;
006a1dae      int32_t ebx;
006a1dae      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a1dae      
006a1db5      if (ebx == 0)
006a1dbc          Proto_UI::UICounterFailedSend(eax);
006a1dbc      
006a1dc6      uint32_t eax_4;
006a1dc6      eax_4 = ebx;
006a1dcc      return eax_4;
006a1d40  }

006a1dcd                                         90 90 90                                                               ...

006a1dd0  uint32_t CM_Character::DispatchUI_StartBarber(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a1dd0  {
006a1dd9      if (arg1 != 0)
006a1dd9      {
006a1ddb          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a1ddb          
006a1df2          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x75))
006a1ea8              ClientUISystem::Handle_Character__StartBarber(m_pUISystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8), *(uint32_t*)((char*)arg2 + 0xc), *(uint32_t*)((char*)arg2 + 0x10), *(uint32_t*)((char*)arg2 + 0x14), *(uint32_t*)((char*)arg2 + 0x18), *(uint32_t*)((char*)arg2 + 0x1c), *(uint32_t*)((char*)arg2 + 0x20), *(uint32_t*)((char*)arg2 + 0x24), *(uint32_t*)((char*)arg2 + 0x28), *(uint32_t*)((char*)arg2 + 0x2c), *(uint32_t*)((char*)arg2 + 0x30), *(uint32_t*)((char*)arg2 + 0x34), *(uint32_t*)((char*)arg2 + 0x38), *(uint32_t*)((char*)arg2 + 0x3c), *(uint32_t*)((char*)arg2 + 0x40));
006a1dd9      }
006a1dd9      
006a1df9      return 0;
006a1dd0  }

006a1eb5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006a1ec0  uint8_t CM_Character::Event_FinishBarber(class IDClass<_tagDataID,32,0> arg1, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3, class IDClass<_tagDataID,32,0> arg4, class IDClass<_tagDataID,32,0> arg5, class IDClass<_tagDataID,32,0> arg6, class IDClass<_tagDataID,32,0> arg7, class IDClass<_tagDataID,32,0> arg8, class IDClass<_tagDataID,32,0> arg9, class IDClass<_tagDataID,32,0> arg10, class IDClass<_tagDataID,32,0> arg11, class IDClass<_tagDataID,32,0> arg12, class IDClass<_tagDataID,32,0> arg13, class IDClass<_tagDataID,32,0> arg14, int32_t arg15, int32_t arg16)

006a1ec0  {
006a1ec3      int32_t ebx;
006a1ec3      int32_t var_10 = ebx;
006a1ec6      uint32_t eax = Proto_UI::GetNextUICounter();
006a1eda      int32_t var_8 = 0x801ad4;
006a1ee2      void* var_c = nullptr;
006a1eea      OrderHdr::Pack(&var_8, &var_c, 0);
006a1ef5      void* eax_1 = operator new[](0x4c);
006a1f07      var_c = eax_1;
006a1f0d      OrderHdr::Pack(&var_8, &var_c, 0x4c);
006a1f1a      *(uint32_t*)var_c = 0x311;
006a1f24      class IDClass<_tagDataID,32,0>* eax_3 = ((char*)var_c + 4);
006a1f27      var_c = eax_3;
006a1f2b      eax_3->id = arg1;
006a1f31      void* eax_5 = ((char*)var_c + 4);
006a1f36      void* ecx_4 = (eax_5 & 0x80000003);
006a1f36      bool cond:1 = ecx_4 == 0;
006a1f3c      var_c = eax_5;
006a1f3c      
006a1f40      if (ecx_4 < 0)
006a1f40      {
006a1f43          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a1f46          ecx_4 = ((char*)ecx_6 + 1);
006a1f46          cond:1 = ecx_6 == 0xffffffff;
006a1f40      }
006a1f40      
006a1f47      if (!(cond:1))
006a1f47      {
006a1f4e          void* i_17 = (4 - ecx_4);
006a1f4e          
006a1f50          if (4 != ecx_4)
006a1f50          {
006a1f5f              void* i;
006a1f5f              
006a1f5f              do
006a1f5f              {
006a1f52                  *(uint8_t*)eax_5 = 0;
006a1f59                  eax_5 = ((char*)var_c + 1);
006a1f5a                  i = i_17;
006a1f5a                  i_17 -= 1;
006a1f5b                  var_c = eax_5;
006a1f5f              } while (i != 1);
006a1f50          }
006a1f47      }
006a1f47      
006a1f65      *(uint32_t*)eax_5 = arg2;
006a1f6b      void* eax_8 = ((char*)var_c + 4);
006a1f70      void* ecx_8 = (eax_8 & 0x80000003);
006a1f70      bool cond:3 = ecx_8 == 0;
006a1f76      var_c = eax_8;
006a1f76      
006a1f7a      if (ecx_8 < 0)
006a1f7a      {
006a1f7d          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006a1f80          ecx_8 = ((char*)ecx_10 + 1);
006a1f80          cond:3 = ecx_10 == 0xffffffff;
006a1f7a      }
006a1f7a      
006a1f81      if (!(cond:3))
006a1f81      {
006a1f88          void* i_18 = (4 - ecx_8);
006a1f88          
006a1f8a          if (4 != ecx_8)
006a1f8a          {
006a1f9d              void* i_1;
006a1f9d              
006a1f9d              do
006a1f9d              {
006a1f90                  *(uint8_t*)eax_8 = 0;
006a1f97                  eax_8 = ((char*)var_c + 1);
006a1f98                  i_1 = i_18;
006a1f98                  i_18 -= 1;
006a1f99                  var_c = eax_8;
006a1f9d              } while (i_1 != 1);
006a1f8a          }
006a1f81      }
006a1f81      
006a1fa3      *(uint32_t*)eax_8 = arg3;
006a1fa9      void* eax_11 = ((char*)var_c + 4);
006a1fae      void* ecx_13 = (eax_11 & 0x80000003);
006a1fae      bool cond:6 = ecx_13 == 0;
006a1fb4      var_c = eax_11;
006a1fb4      
006a1fb8      if (ecx_13 < 0)
006a1fb8      {
006a1fbb          void* ecx_15 = (((char*)ecx_13 - 1) | 0xfffffffc);
006a1fbe          ecx_13 = ((char*)ecx_15 + 1);
006a1fbe          cond:6 = ecx_15 == 0xffffffff;
006a1fb8      }
006a1fb8      
006a1fbf      if (!(cond:6))
006a1fbf      {
006a1fc6          void* i_19 = (4 - ecx_13);
006a1fc6          
006a1fc8          if (4 != ecx_13)
006a1fc8          {
006a1fdd              void* i_2;
006a1fdd              
006a1fdd              do
006a1fdd              {
006a1fd0                  *(uint8_t*)eax_11 = 0;
006a1fd7                  eax_11 = ((char*)var_c + 1);
006a1fd8                  i_2 = i_19;
006a1fd8                  i_19 -= 1;
006a1fd9                  var_c = eax_11;
006a1fdd              } while (i_2 != 1);
006a1fc8          }
006a1fbf      }
006a1fbf      
006a1fe3      *(uint32_t*)eax_11 = arg4;
006a1fe9      void* eax_14 = ((char*)var_c + 4);
006a1fee      void* ecx_17 = (eax_14 & 0x80000003);
006a1fee      bool cond:9 = ecx_17 == 0;
006a1ff4      var_c = eax_14;
006a1ff4      
006a1ff8      if (ecx_17 < 0)
006a1ff8      {
006a1ffb          void* ecx_19 = (((char*)ecx_17 - 1) | 0xfffffffc);
006a1ffe          ecx_17 = ((char*)ecx_19 + 1);
006a1ffe          cond:9 = ecx_19 == 0xffffffff;
006a1ff8      }
006a1ff8      
006a1fff      if (!(cond:9))
006a1fff      {
006a2006          void* i_20 = (4 - ecx_17);
006a2006          
006a2008          if (4 != ecx_17)
006a2008          {
006a201d              void* i_3;
006a201d              
006a201d              do
006a201d              {
006a2010                  *(uint8_t*)eax_14 = 0;
006a2017                  eax_14 = ((char*)var_c + 1);
006a2018                  i_3 = i_20;
006a2018                  i_20 -= 1;
006a2019                  var_c = eax_14;
006a201d              } while (i_3 != 1);
006a2008          }
006a1fff      }
006a1fff      
006a2023      *(uint32_t*)eax_14 = arg5;
006a2029      void* eax_17 = ((char*)var_c + 4);
006a202e      void* ecx_22 = (eax_17 & 0x80000003);
006a202e      bool cond:12 = ecx_22 == 0;
006a2034      var_c = eax_17;
006a2034      
006a2038      if (ecx_22 < 0)
006a2038      {
006a203b          void* ecx_24 = (((char*)ecx_22 - 1) | 0xfffffffc);
006a203e          ecx_22 = ((char*)ecx_24 + 1);
006a203e          cond:12 = ecx_24 == 0xffffffff;
006a2038      }
006a2038      
006a203f      if (!(cond:12))
006a203f      {
006a2046          void* i_21 = (4 - ecx_22);
006a2046          
006a2048          if (4 != ecx_22)
006a2048          {
006a205d              void* i_4;
006a205d              
006a205d              do
006a205d              {
006a2050                  *(uint8_t*)eax_17 = 0;
006a2057                  eax_17 = ((char*)var_c + 1);
006a2058                  i_4 = i_21;
006a2058                  i_21 -= 1;
006a2059                  var_c = eax_17;
006a205d              } while (i_4 != 1);
006a2048          }
006a203f      }
006a203f      
006a2063      *(uint32_t*)eax_17 = arg6;
006a2069      void* eax_20 = ((char*)var_c + 4);
006a206e      void* ecx_26 = (eax_20 & 0x80000003);
006a206e      bool cond:15 = ecx_26 == 0;
006a2074      var_c = eax_20;
006a2074      
006a2078      if (ecx_26 < 0)
006a2078      {
006a207b          void* ecx_28 = (((char*)ecx_26 - 1) | 0xfffffffc);
006a207e          ecx_26 = ((char*)ecx_28 + 1);
006a207e          cond:15 = ecx_28 == 0xffffffff;
006a2078      }
006a2078      
006a207f      if (!(cond:15))
006a207f      {
006a2086          void* i_22 = (4 - ecx_26);
006a2086          
006a2088          if (4 != ecx_26)
006a2088          {
006a209d              void* i_5;
006a209d              
006a209d              do
006a209d              {
006a2090                  *(uint8_t*)eax_20 = 0;
006a2097                  eax_20 = ((char*)var_c + 1);
006a2098                  i_5 = i_22;
006a2098                  i_22 -= 1;
006a2099                  var_c = eax_20;
006a209d              } while (i_5 != 1);
006a2088          }
006a207f      }
006a207f      
006a20a3      *(uint32_t*)eax_20 = arg7;
006a20a9      void* eax_23 = ((char*)var_c + 4);
006a20ae      void* ecx_31 = (eax_23 & 0x80000003);
006a20ae      bool cond:18 = ecx_31 == 0;
006a20b4      var_c = eax_23;
006a20b4      
006a20b8      if (ecx_31 < 0)
006a20b8      {
006a20bb          void* ecx_33 = (((char*)ecx_31 - 1) | 0xfffffffc);
006a20be          ecx_31 = ((char*)ecx_33 + 1);
006a20be          cond:18 = ecx_33 == 0xffffffff;
006a20b8      }
006a20b8      
006a20bf      if (!(cond:18))
006a20bf      {
006a20c6          void* i_23 = (4 - ecx_31);
006a20c6          
006a20c8          if (4 != ecx_31)
006a20c8          {
006a20dd              void* i_6;
006a20dd              
006a20dd              do
006a20dd              {
006a20d0                  *(uint8_t*)eax_23 = 0;
006a20d7                  eax_23 = ((char*)var_c + 1);
006a20d8                  i_6 = i_23;
006a20d8                  i_23 -= 1;
006a20d9                  var_c = eax_23;
006a20dd              } while (i_6 != 1);
006a20c8          }
006a20bf      }
006a20bf      
006a20e3      *(uint32_t*)eax_23 = arg8;
006a20e9      void* eax_26 = ((char*)var_c + 4);
006a20ee      void* ecx_35 = (eax_26 & 0x80000003);
006a20ee      bool cond:21 = ecx_35 == 0;
006a20f4      var_c = eax_26;
006a20f4      
006a20f8      if (ecx_35 < 0)
006a20f8      {
006a20fb          void* ecx_37 = (((char*)ecx_35 - 1) | 0xfffffffc);
006a20fe          ecx_35 = ((char*)ecx_37 + 1);
006a20fe          cond:21 = ecx_37 == 0xffffffff;
006a20f8      }
006a20f8      
006a20ff      if (!(cond:21))
006a20ff      {
006a2106          void* i_24 = (4 - ecx_35);
006a2106          
006a2108          if (4 != ecx_35)
006a2108          {
006a211d              void* i_7;
006a211d              
006a211d              do
006a211d              {
006a2110                  *(uint8_t*)eax_26 = 0;
006a2117                  eax_26 = ((char*)var_c + 1);
006a2118                  i_7 = i_24;
006a2118                  i_24 -= 1;
006a2119                  var_c = eax_26;
006a211d              } while (i_7 != 1);
006a2108          }
006a20ff      }
006a20ff      
006a2123      *(uint32_t*)eax_26 = arg9;
006a2129      void* eax_29 = ((char*)var_c + 4);
006a212e      void* ecx_40 = (eax_29 & 0x80000003);
006a212e      bool cond:24 = ecx_40 == 0;
006a2134      var_c = eax_29;
006a2134      
006a2138      if (ecx_40 < 0)
006a2138      {
006a213b          void* ecx_42 = (((char*)ecx_40 - 1) | 0xfffffffc);
006a213e          ecx_40 = ((char*)ecx_42 + 1);
006a213e          cond:24 = ecx_42 == 0xffffffff;
006a2138      }
006a2138      
006a213f      if (!(cond:24))
006a213f      {
006a2146          void* i_25 = (4 - ecx_40);
006a2146          
006a2148          if (4 != ecx_40)
006a2148          {
006a215d              void* i_8;
006a215d              
006a215d              do
006a215d              {
006a2150                  *(uint8_t*)eax_29 = 0;
006a2157                  eax_29 = ((char*)var_c + 1);
006a2158                  i_8 = i_25;
006a2158                  i_25 -= 1;
006a2159                  var_c = eax_29;
006a215d              } while (i_8 != 1);
006a2148          }
006a213f      }
006a213f      
006a2163      *(uint32_t*)eax_29 = arg10;
006a2169      void* eax_32 = ((char*)var_c + 4);
006a216e      void* ecx_44 = (eax_32 & 0x80000003);
006a216e      bool cond:27 = ecx_44 == 0;
006a2174      var_c = eax_32;
006a2174      
006a2178      if (ecx_44 < 0)
006a2178      {
006a217b          void* ecx_46 = (((char*)ecx_44 - 1) | 0xfffffffc);
006a217e          ecx_44 = ((char*)ecx_46 + 1);
006a217e          cond:27 = ecx_46 == 0xffffffff;
006a2178      }
006a2178      
006a217f      if (!(cond:27))
006a217f      {
006a2186          void* i_26 = (4 - ecx_44);
006a2186          
006a2188          if (4 != ecx_44)
006a2188          {
006a219d              void* i_9;
006a219d              
006a219d              do
006a219d              {
006a2190                  *(uint8_t*)eax_32 = 0;
006a2197                  eax_32 = ((char*)var_c + 1);
006a2198                  i_9 = i_26;
006a2198                  i_26 -= 1;
006a2199                  var_c = eax_32;
006a219d              } while (i_9 != 1);
006a2188          }
006a217f      }
006a217f      
006a21a3      *(uint32_t*)eax_32 = arg11;
006a21a9      void* eax_35 = ((char*)var_c + 4);
006a21ae      void* ecx_49 = (eax_35 & 0x80000003);
006a21ae      bool cond:30 = ecx_49 == 0;
006a21b4      var_c = eax_35;
006a21b4      
006a21b8      if (ecx_49 < 0)
006a21b8      {
006a21bb          void* ecx_51 = (((char*)ecx_49 - 1) | 0xfffffffc);
006a21be          ecx_49 = ((char*)ecx_51 + 1);
006a21be          cond:30 = ecx_51 == 0xffffffff;
006a21b8      }
006a21b8      
006a21bf      if (!(cond:30))
006a21bf      {
006a21c6          void* i_27 = (4 - ecx_49);
006a21c6          
006a21c8          if (4 != ecx_49)
006a21c8          {
006a21dd              void* i_10;
006a21dd              
006a21dd              do
006a21dd              {
006a21d0                  *(uint8_t*)eax_35 = 0;
006a21d7                  eax_35 = ((char*)var_c + 1);
006a21d8                  i_10 = i_27;
006a21d8                  i_27 -= 1;
006a21d9                  var_c = eax_35;
006a21dd              } while (i_10 != 1);
006a21c8          }
006a21bf      }
006a21bf      
006a21e3      *(uint32_t*)eax_35 = arg12;
006a21e9      void* eax_38 = ((char*)var_c + 4);
006a21ee      void* ecx_53 = (eax_38 & 0x80000003);
006a21ee      bool cond:33 = ecx_53 == 0;
006a21f4      var_c = eax_38;
006a21f4      
006a21f8      if (ecx_53 < 0)
006a21f8      {
006a21fb          void* ecx_55 = (((char*)ecx_53 - 1) | 0xfffffffc);
006a21fe          ecx_53 = ((char*)ecx_55 + 1);
006a21fe          cond:33 = ecx_55 == 0xffffffff;
006a21f8      }
006a21f8      
006a21ff      if (!(cond:33))
006a21ff      {
006a2206          void* i_28 = (4 - ecx_53);
006a2206          
006a2208          if (4 != ecx_53)
006a2208          {
006a221d              void* i_11;
006a221d              
006a221d              do
006a221d              {
006a2210                  *(uint8_t*)eax_38 = 0;
006a2217                  eax_38 = ((char*)var_c + 1);
006a2218                  i_11 = i_28;
006a2218                  i_28 -= 1;
006a2219                  var_c = eax_38;
006a221d              } while (i_11 != 1);
006a2208          }
006a21ff      }
006a21ff      
006a2223      *(uint32_t*)eax_38 = arg13;
006a2229      void* eax_41 = ((char*)var_c + 4);
006a222e      void* ecx_58 = (eax_41 & 0x80000003);
006a222e      bool cond:36 = ecx_58 == 0;
006a2234      var_c = eax_41;
006a2234      
006a2238      if (ecx_58 < 0)
006a2238      {
006a223b          void* ecx_60 = (((char*)ecx_58 - 1) | 0xfffffffc);
006a223e          ecx_58 = ((char*)ecx_60 + 1);
006a223e          cond:36 = ecx_60 == 0xffffffff;
006a2238      }
006a2238      
006a223f      if (!(cond:36))
006a223f      {
006a2246          void* i_29 = (4 - ecx_58);
006a2246          
006a2248          if (4 != ecx_58)
006a2248          {
006a225d              void* i_12;
006a225d              
006a225d              do
006a225d              {
006a2250                  *(uint8_t*)eax_41 = 0;
006a2257                  eax_41 = ((char*)var_c + 1);
006a2258                  i_12 = i_29;
006a2258                  i_29 -= 1;
006a2259                  var_c = eax_41;
006a225d              } while (i_12 != 1);
006a2248          }
006a223f      }
006a223f      
006a2263      *(uint32_t*)eax_41 = arg14;
006a2269      void* eax_44 = ((char*)var_c + 4);
006a226e      void* ecx_62 = (eax_44 & 0x80000003);
006a226e      bool cond:39 = ecx_62 == 0;
006a2274      var_c = eax_44;
006a2274      
006a2278      if (ecx_62 < 0)
006a2278      {
006a227b          void* ecx_64 = (((char*)ecx_62 - 1) | 0xfffffffc);
006a227e          ecx_62 = ((char*)ecx_64 + 1);
006a227e          cond:39 = ecx_64 == 0xffffffff;
006a2278      }
006a2278      
006a227f      if (!(cond:39))
006a227f      {
006a2286          void* i_30 = (4 - ecx_62);
006a2286          
006a2288          if (4 != ecx_62)
006a2288          {
006a229d              void* i_13;
006a229d              
006a229d              do
006a229d              {
006a2290                  *(uint8_t*)eax_44 = 0;
006a2297                  eax_44 = ((char*)var_c + 1);
006a2298                  i_13 = i_30;
006a2298                  i_30 -= 1;
006a2299                  var_c = eax_44;
006a229d              } while (i_13 != 1);
006a2288          }
006a227f      }
006a227f      
006a22a3      *(uint32_t*)eax_44 = arg15;
006a22a9      void* eax_47 = ((char*)var_c + 4);
006a22ae      void* ecx_67 = (eax_47 & 0x80000003);
006a22ae      bool cond:42 = ecx_67 == 0;
006a22b4      var_c = eax_47;
006a22b4      
006a22b8      if (ecx_67 < 0)
006a22b8      {
006a22bb          void* ecx_69 = (((char*)ecx_67 - 1) | 0xfffffffc);
006a22be          ecx_67 = ((char*)ecx_69 + 1);
006a22be          cond:42 = ecx_69 == 0xffffffff;
006a22b8      }
006a22b8      
006a22bf      if (!(cond:42))
006a22bf      {
006a22c6          void* i_31 = (4 - ecx_67);
006a22c6          
006a22c8          if (4 != ecx_67)
006a22c8          {
006a22dd              void* i_14;
006a22dd              
006a22dd              do
006a22dd              {
006a22d0                  *(uint8_t*)eax_47 = 0;
006a22d7                  eax_47 = ((char*)var_c + 1);
006a22d8                  i_14 = i_31;
006a22d8                  i_31 -= 1;
006a22d9                  var_c = eax_47;
006a22dd              } while (i_14 != 1);
006a22c8          }
006a22bf      }
006a22bf      
006a22e3      *(uint32_t*)eax_47 = arg16;
006a22e9      void* eax_50 = ((char*)var_c + 4);
006a22ec      var_c = eax_50;
006a22f0      void* eax_51 = (eax_50 & 0x80000003);
006a22f0      bool cond:44 = eax_51 == 0;
006a22f0      
006a22f5      if (eax_51 < 0)
006a22f5      {
006a22f8          void* eax_53 = (((char*)eax_51 - 1) | 0xfffffffc);
006a22fb          eax_51 = ((char*)eax_53 + 1);
006a22fb          cond:44 = eax_53 == 0xffffffff;
006a22f5      }
006a22f5      
006a22fc      if (!(cond:44))
006a22fc      {
006a2303          void* i_16 = (4 - eax_51);
006a2303          
006a2305          if (4 != eax_51)
006a2305          {
006a2321              void* i_15;
006a2321              
006a2321              do
006a2321              {
006a2314                  *(uint8_t*)var_c = 0;
006a231c                  i_15 = i_16;
006a231c                  i_16 -= 1;
006a231d                  var_c += 1;
006a2321              } while (i_15 != 1);
006a2305          }
006a22fc      }
006a22fc      
006a232a      ebx = Proto_UI::SendToWeenie(eax_1, 0x4c);
006a232a      
006a2331      if (ebx == 0)
006a2338          Proto_UI::UICounterFailedSend(eax);
006a2338      
006a2348      return ebx;
006a1ec0  }

006a2309                             8d a4 24 00 00 00 00                                                           ..$....
006a2349                             90 90 90 90 90 90 90                                                           .......

006a2350  uint8_t CM_Character::Event_SetDesiredComponentLevel(class IDClass<_tagDataID,32,0> arg1, int32_t arg2)

006a2350  {
006a2356      uint32_t eax = Proto_UI::GetNextUICounter();
006a236a      int32_t var_8 = 0x801ad4;
006a2372      void* var_c = nullptr;
006a237a      OrderHdr::Pack(&var_8, &var_c, 0);
006a2385      void* eax_1 = operator new[](0x14);
006a2397      var_c = eax_1;
006a239d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a23aa      *(uint32_t*)var_c = 0x224;
006a23b4      class IDClass<_tagDataID,32,0>* eax_3 = ((char*)var_c + 4);
006a23b7      var_c = eax_3;
006a23bb      eax_3->id = arg1;
006a23c1      void* eax_5 = ((char*)var_c + 4);
006a23c6      void* ecx_4 = (eax_5 & 0x80000003);
006a23c6      bool cond:1 = ecx_4 == 0;
006a23cc      var_c = eax_5;
006a23cc      
006a23d0      if (ecx_4 < 0)
006a23d0      {
006a23d3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a23d6          ecx_4 = ((char*)ecx_6 + 1);
006a23d6          cond:1 = ecx_6 == 0xffffffff;
006a23d0      }
006a23d0      
006a23d7      if (!(cond:1))
006a23d7      {
006a23de          void* i_3 = (4 - ecx_4);
006a23de          
006a23e0          if (4 != ecx_4)
006a23e0          {
006a23ef              void* i;
006a23ef              
006a23ef              do
006a23ef              {
006a23e2                  *(uint8_t*)eax_5 = 0;
006a23e9                  eax_5 = ((char*)var_c + 1);
006a23ea                  i = i_3;
006a23ea                  i_3 -= 1;
006a23eb                  var_c = eax_5;
006a23ef              } while (i != 1);
006a23e0          }
006a23d7      }
006a23d7      
006a23f5      *(uint32_t*)eax_5 = arg2;
006a23fb      void* eax_8 = ((char*)var_c + 4);
006a23fe      var_c = eax_8;
006a2402      void* eax_9 = (eax_8 & 0x80000003);
006a2402      bool cond:2 = eax_9 == 0;
006a2402      
006a2407      if (eax_9 < 0)
006a2407      {
006a240a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a240d          eax_9 = ((char*)eax_11 + 1);
006a240d          cond:2 = eax_11 == 0xffffffff;
006a2407      }
006a2407      
006a240e      if (!(cond:2))
006a240e      {
006a2415          void* i_2 = (4 - eax_9);
006a2415          
006a2417          if (4 != eax_9)
006a2417          {
006a2431              void* i_1;
006a2431              
006a2431              do
006a2431              {
006a2424                  *(uint8_t*)var_c = 0;
006a242c                  i_1 = i_2;
006a242c                  i_2 -= 1;
006a242d                  var_c += 1;
006a2431              } while (i_1 != 1);
006a2417          }
006a240e      }
006a240e      
006a243a      int32_t ebx;
006a243a      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a243a      
006a2441      if (ebx == 0)
006a2448          Proto_UI::UICounterFailedSend(eax);
006a2448      
006a2458      return ebx;
006a2350  }

006a2459                                                                             90 90 90 90 90 90 90                           .......

006a2460  uint8_t CM_Character::SendNotice_AbortConfirmationRequest(int32_t arg1, uint32_t arg2)

006a2460  {
006a246e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd20d);
006a246e      
006a2473      if (eax != 0)
006a2473      {
006a2476          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a2476          
006a247b          while (i != 0)
006a247b          {
006a2488              int32_t* esi_1 = *(uint32_t*)i;
006a248c              i = i[1];
006a248c              
006a248f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a24a1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x78)(arg1, arg2);
006a247b          }
006a2473      }
006a2473      
006a24ac      eax = 1;
006a24ae      return 1;
006a2460  }

006a24af                                               90                                                                 .

006a24b0  uint8_t CM_Character::SendNotice_AbuseReportResponse(uint32_t arg1)

006a24b0  {
006a24be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd221);
006a24be      
006a24c3      if (eax != 0)
006a24c3      {
006a24c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a24c6          
006a24cb          while (i != 0)
006a24cb          {
006a24d3              int32_t* edi_1 = *(uint32_t*)i;
006a24d7              i = i[1];
006a24d7              
006a24da              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a24eb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x7c)(arg1);
006a24cb          }
006a24c3      }
006a24c3      
006a24f5      eax = 1;
006a24f7      return 1;
006a24b0  }

006a24f8                                                                          90 90 90 90 90 90 90 90                          ........

006a2500  uint8_t CM_Character::SendNotice_AlterAttribute_ConfirmationRequest(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a2500  {
006a250e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd20a);
006a250e      
006a2513      if (eax != 0)
006a2513      {
006a2516          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a2516          
006a251b          while (i != 0)
006a251b          {
006a2528              int32_t* esi_1 = *(uint32_t*)i;
006a252c              i = i[1];
006a252c              
006a252f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a2541                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x84)(arg1, arg2);
006a251b          }
006a2513      }
006a2513      
006a254f      eax = 1;
006a2551      return 1;
006a2500  }

006a2552                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a2560  uint8_t CM_Character::SendNotice_AlterSkill_ConfirmationRequest(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a2560  {
006a256e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd209);
006a256e      
006a2573      if (eax != 0)
006a2573      {
006a2576          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a2576          
006a257b          while (i != 0)
006a257b          {
006a2588              int32_t* esi_1 = *(uint32_t*)i;
006a258c              i = i[1];
006a258c              
006a258f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a25a1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x88)(arg1, arg2);
006a257b          }
006a2573      }
006a2573      
006a25af      eax = 1;
006a25b1      return 1;
006a2560  }

006a25b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a25c0  uint8_t CM_Character::SendNotice_Augmentation_ConfirmationRequest(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a25c0  {
006a25ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd20b);
006a25ce      
006a25d3      if (eax != 0)
006a25d3      {
006a25d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a25d6          
006a25db          while (i != 0)
006a25db          {
006a25e8              int32_t* esi_1 = *(uint32_t*)i;
006a25ec              i = i[1];
006a25ec              
006a25ef              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a2601                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x8c)(arg1, arg2);
006a25db          }
006a25d3      }
006a25d3      
006a260f      eax = 1;
006a2611      return 1;
006a25c0  }

006a2612                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a2620  uint8_t CM_Character::SendNotice_BeginPowerbar(enum PowerBarMode arg1)

006a2620  {
006a262e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1fd);
006a262e      
006a2633      if (eax != 0)
006a2633      {
006a2636          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a2636          
006a263b          while (i != 0)
006a263b          {
006a2643              int32_t* edi_1 = *(uint32_t*)i;
006a2647              i = i[1];
006a2647              
006a264a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a265b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x90)(arg1);
006a263b          }
006a2633      }
006a2633      
006a2668      eax = 1;
006a266a      return 1;
006a2620  }

006a266b                                   90 90 90 90 90                                                             .....

006a2670  uint8_t CM_Character::SendNotice_ChangeRadarLook(class CWeenieObject* arg1)

006a2670  {
006a2680      void* eax_1 = arg1->vtable->GetNoticeHandlers(0x4dd245);
006a2680      
006a2685      if (eax_1 != 0)
006a2685      {
006a2688          int32_t* i = *(uint32_t*)((char*)eax_1 + 4);
006a2688          
006a268d          while (i != 0)
006a268d          {
006a2690              int32_t* edi_1 = *(uint32_t*)i;
006a2694              i = i[1];
006a2694              
006a2697              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a26a8                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x94)(arg1);
006a268d          }
006a2685      }
006a2685      
006a26b4      eax_1 = 1;
006a26b7      return 1;
006a2670  }

006a26b8                                                                          90 90 90 90 90 90 90 90                          ........

006a26c0  uint8_t CM_Character::SendNotice_CraftInteraction_ConfirmationRequest(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a26c0  {
006a26ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd20c);
006a26ce      
006a26d3      if (eax != 0)
006a26d3      {
006a26d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a26d6          
006a26db          while (i != 0)
006a26db          {
006a26e8              int32_t* esi_1 = *(uint32_t*)i;
006a26ec              i = i[1];
006a26ec              
006a26ef              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a2701                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x98)(arg1, arg2);
006a26db          }
006a26d3      }
006a26d3      
006a270f      eax = 1;
006a2711      return 1;
006a26c0  }

006a2712                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a2720  uint8_t CM_Character::SendNotice_FinishPowerbar(enum PowerBarMode arg1)

006a2720  {
006a272e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1fe);
006a272e      
006a2733      if (eax != 0)
006a2733      {
006a2736          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a2736          
006a273b          while (i != 0)
006a273b          {
006a2743              int32_t* edi_1 = *(uint32_t*)i;
006a2747              i = i[1];
006a2747              
006a274a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a275b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x9c)(arg1);
006a273b          }
006a2733      }
006a2733      
006a2768      eax = 1;
006a276a      return 1;
006a2720  }

006a276b                                   90 90 90 90 90                                                             .....

006a2770  uint8_t CM_Character::SendNotice_LoadChanged(float arg1)

006a2770  {
006a277e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd220);
006a277e      
006a2783      if (eax != 0)
006a2783      {
006a2786          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a2786          
006a278b          while (i != 0)
006a278b          {
006a2793              int32_t* edi_1 = *(uint32_t*)i;
006a2797              i = i[1];
006a2797              
006a279a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a27ab                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xa0)(arg1);
006a278b          }
006a2783      }
006a2783      
006a27b8      eax = 1;
006a27ba      return 1;
006a2770  }

006a27bb                                                                                   90 90 90 90 90                             .....

006a27c0  uint8_t CM_Character::SendNotice_Ping()

006a27c0  {
006a27ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd21d);
006a27ce      
006a27d3      if (eax != 0)
006a27d3      {
006a27d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a27d6          
006a27db          if (i != 0)
006a27db          {
006a27dd              int32_t edi;
006a27dd              int32_t var_8_1 = edi;
006a27dd              
006a27ff              do
006a27ff              {
006a27e0                  int32_t* edi_2 = *(uint32_t*)i;
006a27e4                  i = i[1];
006a27e4                  
006a27e7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a27f7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0xa4)();
006a27ff              } while (i != 0);
006a27db          }
006a27d3      }
006a27d3      
006a2803      eax = 1;
006a2805      return 1;
006a27c0  }

006a2806                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a2810  uint8_t CM_Character::SendNotice_RefreshActionKeyMapping(class QualifiedControl const* arg1)

006a2810  {
006a281e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd242);
006a281e      
006a2823      if (eax != 0)
006a2823      {
006a2826          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a2826          
006a282b          while (i != 0)
006a282b          {
006a2833              int32_t* edi_1 = *(uint32_t*)i;
006a2837              i = i[1];
006a2837              
006a283a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a284b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xa8)(arg1);
006a282b          }
006a2823      }
006a2823      
006a2858      eax = 1;
006a285a      return 1;
006a2810  }

006a285b                                                                                   90 90 90 90 90                             .....

006a2860  uint8_t CM_Character::SendNotice_ReloadOptions()

006a2860  {
006a286e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd216);
006a286e      
006a2873      if (eax != 0)
006a2873      {
006a2876          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a2876          
006a287b          if (i != 0)
006a287b          {
006a287d              int32_t edi;
006a287d              int32_t var_8_1 = edi;
006a287d              
006a289f              do
006a289f              {
006a2880                  int32_t* edi_2 = *(uint32_t*)i;
006a2884                  i = i[1];
006a2884                  
006a2887                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a2897                      *(uint32_t*)(*(uint32_t*)edi_2 + 0xac)();
006a289f              } while (i != 0);
006a287b          }
006a2873      }
006a2873      
006a28a3      eax = 1;
006a28a5      return 1;
006a2860  }

006a28a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a28b0  uint8_t CM_Character::SendNotice_SetPowerbarLevel(enum PowerBarMode arg1, float arg2)

006a28b0  {
006a28be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1e6);
006a28be      
006a28c3      if (eax != 0)
006a28c3      {
006a28c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a28c6          
006a28cb          while (i != 0)
006a28cb          {
006a28d8              int32_t* esi_1 = *(uint32_t*)i;
006a28dc              i = i[1];
006a28dc              
006a28df              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a28f1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0xb4)(arg1, arg2);
006a28cb          }
006a28c3      }
006a28c3      
006a28ff      eax = 1;
006a2901      return 1;
006a28b0  }

006a2902        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006a2910  uint8_t CM_Character::SendNotice_StartBarberNotice(class IDClass<_tagDataID,32,0> arg1, class IDClass<_tagDataID,32,0> arg2, class IDClass<_tagDataID,32,0> arg3, class IDClass<_tagDataID,32,0> arg4, class IDClass<_tagDataID,32,0> arg5, class IDClass<_tagDataID,32,0> arg6, class IDClass<_tagDataID,32,0> arg7, class IDClass<_tagDataID,32,0> arg8, class IDClass<_tagDataID,32,0> arg9, class IDClass<_tagDataID,32,0> arg10, class IDClass<_tagDataID,32,0> arg11, class IDClass<_tagDataID,32,0> arg12, class IDClass<_tagDataID,32,0> arg13, class IDClass<_tagDataID,32,0> arg14, int32_t arg15, int32_t arg16)

006a2910  {
006a2921      int32_t* eax_1;
006a2921      int32_t ecx_1;
006a2921      eax_1 = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd27e);
006a2921      
006a2926      if (eax_1 != 0)
006a2926      {
006a292c          eax_1 = eax_1[1];
006a292c          
006a2931          if (eax_1 != 0)
006a2931          {
006a2950              while (true)
006a2950              {
006a2950                  int32_t* esi_1 = *(uint32_t*)eax_1;
006a2954                  int32_t* eax_2 = eax_1[1];
006a2954                  
006a295b                  if (esi_1 != 0)
006a295b                  {
006a2961                      char eax_3;
006a2961                      eax_3 = **(uint32_t**)esi_1();
006a2961                      
006a2965                      if (eax_3 == 0)
006a29af                          *(uint32_t*)(*(uint32_t*)esi_1 + 0xb8)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16);
006a295b                  }
006a295b                  
006a29bb                  if (eax_2 == 0)
006a29bb                      break;
006a29bb                  
006a2949                  eax_1 = eax_2;
006a2950              }
006a2931          }
006a2926      }
006a2926      
006a29c1      eax_1 = 1;
006a29c6      return 1;
006a2910  }

006a29c7                       90 90 90 90 90 90 90 90 90                                                         .........

006a29d0  uint8_t CM_Character::SendNotice_YesNo_ConfirmationRequest(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a29d0  {
006a29de      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd27a);
006a29de      
006a29e3      if (eax != 0)
006a29e3      {
006a29e6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a29e6          
006a29eb          while (i != 0)
006a29eb          {
006a29f8              int32_t* esi_1 = *(uint32_t*)i;
006a29fc              i = i[1];
006a29fc              
006a29ff              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a2a11                  *(uint32_t*)(*(uint32_t*)esi_1 + 0xc0)(arg1, arg2);
006a29eb          }
006a29e3      }
006a29e3      
006a2a1f      eax = 1;
006a2a21      return 1;
006a29d0  }

006a2a22        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006a2a30  uint8_t CM_Character::Event_AbuseLogRequest(class AC1Legacy::PStringBase<char> const* arg1, int32_t arg2, class AC1Legacy::PStringBase<char> const* arg3)

006a2a30  {
006a2a37      uint32_t eax = Proto_UI::GetNextUICounter();
006a2a4d      int32_t var_8 = 0x801ad4;
006a2a55      void* var_c = nullptr;
006a2a81      uint32_t esi_1 = (AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0) + AC1Legacy::PStringBase<char>::Pack(arg3, &var_c, 0));
006a2a83      OrderHdr::Pack(&var_8, &var_c, 0);
006a2a8d      void* eax_3 = operator new[]((esi_1 + 0x10));
006a2a95      var_c = eax_3;
006a2aa5      OrderHdr::Pack(&var_8, &var_c, (esi_1 + 0x10));
006a2aae      *(uint32_t*)var_c = 0x140;
006a2abf      uint32_t edx_2 = (((char*)eax_3 - ((char*)var_c + 4)) + (esi_1 + 0x10));
006a2ac1      var_c += 4;
006a2acd      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, edx_2);
006a2ada      *(uint32_t*)var_c = arg2;
006a2ae0      void* eax_7 = ((char*)var_c + 4);
006a2ae5      void* ecx_8 = (eax_7 & 0x80000003);
006a2ae5      bool cond:1 = ecx_8 == 0;
006a2aeb      var_c = eax_7;
006a2aeb      
006a2aef      if (ecx_8 < 0)
006a2aef      {
006a2af2          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006a2af5          ecx_8 = ((char*)ecx_10 + 1);
006a2af5          cond:1 = ecx_10 == 0xffffffff;
006a2aef      }
006a2aef      
006a2af6      if (!(cond:1))
006a2af6      {
006a2afd          void* i_1 = (4 - ecx_8);
006a2afd          
006a2aff          if (4 != ecx_8)
006a2aff          {
006a2b0e              void* i;
006a2b0e              
006a2b0e              do
006a2b0e              {
006a2b01                  *(uint8_t*)eax_7 = 0;
006a2b08                  eax_7 = ((char*)var_c + 1);
006a2b09                  i = i_1;
006a2b09                  i_1 -= 1;
006a2b0a                  var_c = eax_7;
006a2b0e              } while (i != 1);
006a2aff          }
006a2af6      }
006a2af6      
006a2b1e      AC1Legacy::PStringBase<char>::Pack(arg3, &var_c, (((char*)eax_3 - eax_7) + (esi_1 + 0x10)));
006a2b2a      class AC1Legacy::PStringBase<char>* ebx;
006a2b2a      ebx = Proto_UI::SendToWeenie(eax_3, (esi_1 + 0x10));
006a2b2a      
006a2b31      if (ebx == 0)
006a2b38          Proto_UI::UICounterFailedSend(eax);
006a2b38      
006a2b43      uint32_t eax_9;
006a2b43      eax_9 = ebx;
006a2b49      return eax_9;
006a2a30  }

006a2b4a                                90 90 90 90 90 90                                                            ......

006a2b50  uint8_t CM_Character::Event_AddPlayerPermission(class AC1Legacy::PStringBase<char> const* arg1)

006a2b50  {
006a2b56      uint32_t eax = Proto_UI::GetNextUICounter();
006a2b6c      int32_t var_8 = 0x801ad4;
006a2b74      void* var_c = nullptr;
006a2b7c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a2b8e      OrderHdr::Pack(&var_8, &var_c, 0);
006a2b98      void* eax_2 = operator new[]((eax_1 + 0xc));
006a2baa      var_c = eax_2;
006a2bb0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a2bb9      *(uint32_t*)var_c = 0x219;
006a2bca      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a2bd4      var_c += 4;
006a2bd8      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a2be4      class AC1Legacy::PStringBase<char>* ebx;
006a2be4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a2be4      
006a2beb      if (ebx == 0)
006a2bf2          Proto_UI::UICounterFailedSend(eax);
006a2bf2      
006a2bfc      uint32_t eax_6;
006a2bfc      eax_6 = ebx;
006a2c02      return eax_6;
006a2b50  }

006a2c03           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a2c10  uint8_t CM_Character::Event_RemoveFromPlayerConsentList(class AC1Legacy::PStringBase<char> const* arg1)

006a2c10  {
006a2c16      uint32_t eax = Proto_UI::GetNextUICounter();
006a2c2c      int32_t var_8 = 0x801ad4;
006a2c34      void* var_c = nullptr;
006a2c3c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a2c4e      OrderHdr::Pack(&var_8, &var_c, 0);
006a2c58      void* eax_2 = operator new[]((eax_1 + 0xc));
006a2c6a      var_c = eax_2;
006a2c70      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a2c79      *(uint32_t*)var_c = 0x218;
006a2c8a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a2c94      var_c += 4;
006a2c98      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a2ca4      class AC1Legacy::PStringBase<char>* ebx;
006a2ca4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a2ca4      
006a2cab      if (ebx == 0)
006a2cb2          Proto_UI::UICounterFailedSend(eax);
006a2cb2      
006a2cbc      uint32_t eax_6;
006a2cbc      eax_6 = ebx;
006a2cc2      return eax_6;
006a2c10  }

006a2cc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a2cd0  uint8_t CM_Character::Event_RemovePlayerPermission(class AC1Legacy::PStringBase<char> const* arg1)

006a2cd0  {
006a2cd6      uint32_t eax = Proto_UI::GetNextUICounter();
006a2cec      int32_t var_8 = 0x801ad4;
006a2cf4      void* var_c = nullptr;
006a2cfc      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a2d0e      OrderHdr::Pack(&var_8, &var_c, 0);
006a2d18      void* eax_2 = operator new[]((eax_1 + 0xc));
006a2d2a      var_c = eax_2;
006a2d30      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a2d39      *(uint32_t*)var_c = 0x21a;
006a2d4a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a2d54      var_c += 4;
006a2d58      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a2d64      class AC1Legacy::PStringBase<char>* ebx;
006a2d64      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a2d64      
006a2d6b      if (ebx == 0)
006a2d72          Proto_UI::UICounterFailedSend(eax);
006a2d72      
006a2d7c      uint32_t eax_6;
006a2d7c      eax_6 = ebx;
006a2d82      return eax_6;
006a2cd0  }

006a2d83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a2d90  uint32_t CM_Character::DispatchUI_ConfirmationRequest(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a2d90  {
006a2d9e      if ((arg1 == 0 || arg1->m_pUISystem == 0))
006a2da3          return 0;
006a2da3      
006a2da5      void* esi = arg2;
006a2da5      
006a2db6      if (*(uint32_t*)esi != 0x274)
006a2dbd          return 0;
006a2dbd      
006a2dbe      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a2dc4      int32_t ebx = *(uint32_t*)((char*)esi + 4);
006a2dc7      uint32_t ebp = *(uint32_t*)((char*)esi + 8);
006a2dd8      arg2 = ((char*)esi + 0xc);
006a2ddc      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a2df2      class AC1Legacy::PStringBase<char> __saved_ecx;
006a2df2      AC1Legacy::PStringBase<char>::UnPack(&__saved_ecx, &arg2, (((esi * 0) - 0xc) + arg3));
006a2e05      ClientUISystem::Handle_Character__ConfirmationRequest(arg1->m_pUISystem, ebx, ebp, &__saved_ecx);
006a2e05      
006a2e24      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
006a2e26          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
006a2e26      
006a2e33      return 0;
006a2d90  }

006a2e34                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006a2e40  uint32_t CM_Character::DispatchUI_QueryAgeResponse(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a2e40  {
006a2e42      class UIQueueManager* ebp = arg1;
006a2e42      
006a2e4f      if ((ebp == 0 || ebp->m_pCommunicationSystem == 0))
006a2e55          return 0;
006a2e55      
006a2e57      void* ebx = arg2;
006a2e63      bool cond:0 = *(uint32_t*)ebx == 0x1c3;
006a2e68      arg2 = ((char*)ebx + 4);
006a2e68      
006a2e6c      if (!(cond:0))
006a2e74          return 0;
006a2e74      
006a2e75      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a2e89      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a2e9f      class AC1Legacy::PStringBase<char> __saved_ecx;
006a2e9f      AC1Legacy::PStringBase<char>::UnPack(&__saved_ecx, &arg2, (((ebx * 0) - 4) + arg3));
006a2ea4      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a2ea9      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
006a2eb1      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
006a2ec3      class AC1Legacy::PStringBase<char>* edx = AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((char*)ebx - arg2) + arg3));
006a2ecc      class UIQueueManager** var_18_4 = &arg1;
006a2ed5      ClientCommunicationSystem::Handle_Character__QueryAgeResponse(ebp->m_pCommunicationSystem, edx, &__saved_ecx);
006a2ee2      class UIQueueManager* eax_10 = arg1;
006a2ee2      
006a2ef4      if ((InterlockedDecrement(&eax_10->m_cTurbineRefCount) == 0 && eax_10 != 0))
006a2ef6          eax_10->vtable->IUnknown_QueryInterface(1);
006a2ef6      
006a2f0f      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
006a2f11          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
006a2f11      
006a2f1f      return 0;
006a2e40  }


006a2f20  uint32_t CM_Magic::DispatchUI_DispelEnchantment(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a2f20  {
006a2f26      if (arg1 != 0)
006a2f26      {
006a2f28          class ClientMagicSystem* m_pMagicSystem = arg1->m_pMagicSystem;
006a2f28          
006a2f39          if ((m_pMagicSystem != 0 && *(uint32_t*)arg2 == 0x2c7))
006a2f47              return ClientMagicSystem::Handle_Magic__DispelEnchantment(m_pMagicSystem, *(uint32_t*)((char*)arg2 + 4));
006a2f26      }
006a2f26      
006a2f3d      return 0;
006a2f20  }

006a2f48                          90 90 90 90 90 90 90 90                                                          ........

006a2f50  uint32_t CM_Magic::DispatchUI_PurgeBadEnchantments(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a2f50  {
006a2f56      if (arg1 != 0)
006a2f56      {
006a2f58          class ClientMagicSystem* m_pMagicSystem = arg1->m_pMagicSystem;
006a2f58          
006a2f69          if ((m_pMagicSystem != 0 && *(uint32_t*)arg2 == 0x312))
006a2f6e              /* tailcall */
006a2f6e              return ClientMagicSystem::Handle_Magic__PurgeBadEnchantments(m_pMagicSystem);
006a2f56      }
006a2f56      
006a2f6d      return 0;
006a2f50  }

006a2f73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a2f80  uint32_t CM_Magic::DispatchUI_PurgeEnchantments(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a2f80  {
006a2f86      if (arg1 != 0)
006a2f86      {
006a2f88          class ClientMagicSystem* m_pMagicSystem = arg1->m_pMagicSystem;
006a2f88          
006a2f99          if ((m_pMagicSystem != 0 && *(uint32_t*)arg2 == 0x2c6))
006a2f9e              /* tailcall */
006a2f9e              return ClientMagicSystem::Handle_Magic__PurgeEnchantments(m_pMagicSystem);
006a2f86      }
006a2f86      
006a2f9d      return 0;
006a2f80  }

006a2fa3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a2fb0  uint32_t CM_Magic::DispatchUI_RemoveEnchantment(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a2fb0  {
006a2fb6      if (arg1 != 0)
006a2fb6      {
006a2fb8          class ClientMagicSystem* m_pMagicSystem = arg1->m_pMagicSystem;
006a2fb8          
006a2fc9          if ((m_pMagicSystem != 0 && *(uint32_t*)arg2 == 0x2c3))
006a2fc9          {
006a2fd1              int32_t var_4 = 1;
006a2fd9              uint32_t edx;
006a2fd9              return ClientMagicSystem::Handle_Magic__RemoveEnchantment(m_pMagicSystem, edx, ((int8_t)*(uint32_t*)((char*)arg2 + 4)));
006a2fc9          }
006a2fb6      }
006a2fb6      
006a2fcd      return 0;
006a2fb0  }

006a2fda                                                                                90 90 90 90 90 90                            ......

006a2fe0  uint32_t CM_Magic::DispatchUI_RemoveSpell(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a2fe0  {
006a2fe6      if (arg1 != 0)
006a2fe6      {
006a2fe8          class ClientMagicSystem* m_pMagicSystem = arg1->m_pMagicSystem;
006a2fe8          
006a2ff9          if ((m_pMagicSystem != 0 && *(uint32_t*)arg2 == 0x1a8))
006a3007              return ClientMagicSystem::Handle_Magic__RemoveSpell(m_pMagicSystem, *(uint32_t*)((char*)arg2 + 4));
006a2fe6      }
006a2fe6      
006a2ffd      return 0;
006a2fe0  }

006a3008                          90 90 90 90 90 90 90 90                                                          ........

006a3010  uint32_t CM_Magic::DispatchUI_UpdateSpell(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a3010  {
006a3016      if (arg1 != 0)
006a3016      {
006a3018          class ClientMagicSystem* m_pMagicSystem = arg1->m_pMagicSystem;
006a3018          
006a3029          if ((m_pMagicSystem != 0 && *(uint32_t*)arg2 == 0x2c1))
006a3037              return ClientMagicSystem::Handle_Magic__UpdateSpell(m_pMagicSystem, *(uint32_t*)((char*)arg2 + 4));
006a3016      }
006a3016      
006a302d      return 0;
006a3010  }

006a3038                                                                          90 90 90 90 90 90 90 90                          ........

006a3040  uint8_t CM_Magic::Event_CastTargetedSpell(uint32_t arg1, uint32_t arg2)

006a3040  {
006a3046      uint32_t eax = Proto_UI::GetNextUICounter();
006a305a      int32_t var_8 = 0x801ad4;
006a3062      void* var_c = nullptr;
006a306a      OrderHdr::Pack(&var_8, &var_c, 0);
006a3075      void* eax_1 = operator new[](0x14);
006a3087      var_c = eax_1;
006a308d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a309a      *(uint32_t*)var_c = 0x4a;
006a30a4      uint32_t* eax_3 = ((char*)var_c + 4);
006a30a7      var_c = eax_3;
006a30ab      *(uint32_t*)eax_3 = arg1;
006a30b1      void* eax_5 = ((char*)var_c + 4);
006a30b6      void* ecx_4 = (eax_5 & 0x80000003);
006a30b6      bool cond:1 = ecx_4 == 0;
006a30bc      var_c = eax_5;
006a30bc      
006a30c0      if (ecx_4 < 0)
006a30c0      {
006a30c3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a30c6          ecx_4 = ((char*)ecx_6 + 1);
006a30c6          cond:1 = ecx_6 == 0xffffffff;
006a30c0      }
006a30c0      
006a30c7      if (!(cond:1))
006a30c7      {
006a30ce          void* i_3 = (4 - ecx_4);
006a30ce          
006a30d0          if (4 != ecx_4)
006a30d0          {
006a30df              void* i;
006a30df              
006a30df              do
006a30df              {
006a30d2                  *(uint8_t*)eax_5 = 0;
006a30d9                  eax_5 = ((char*)var_c + 1);
006a30da                  i = i_3;
006a30da                  i_3 -= 1;
006a30db                  var_c = eax_5;
006a30df              } while (i != 1);
006a30d0          }
006a30c7      }
006a30c7      
006a30e5      *(uint32_t*)eax_5 = arg2;
006a30eb      void* eax_8 = ((char*)var_c + 4);
006a30ee      var_c = eax_8;
006a30f2      void* eax_9 = (eax_8 & 0x80000003);
006a30f2      bool cond:2 = eax_9 == 0;
006a30f2      
006a30f7      if (eax_9 < 0)
006a30f7      {
006a30fa          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a30fd          eax_9 = ((char*)eax_11 + 1);
006a30fd          cond:2 = eax_11 == 0xffffffff;
006a30f7      }
006a30f7      
006a30fe      if (!(cond:2))
006a30fe      {
006a3105          void* i_2 = (4 - eax_9);
006a3105          
006a3107          if (4 != eax_9)
006a3107          {
006a3121              void* i_1;
006a3121              
006a3121              do
006a3121              {
006a3114                  *(uint8_t*)var_c = 0;
006a311c                  i_1 = i_2;
006a311c                  i_2 -= 1;
006a311d                  var_c += 1;
006a3121              } while (i_1 != 1);
006a3107          }
006a30fe      }
006a30fe      
006a312a      int32_t ebx;
006a312a      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a312a      
006a3131      if (ebx == 0)
006a3138          Proto_UI::UICounterFailedSend(eax);
006a3138      
006a3148      return ebx;
006a3040  }

006a3149                             90 90 90 90 90 90 90                                                           .......

006a3150  uint8_t CM_Magic::Event_CastUntargetedSpell(uint32_t arg1)

006a3150  {
006a3156      uint32_t eax = Proto_UI::GetNextUICounter();
006a316a      int32_t var_8 = 0x801ad4;
006a3172      void* var_c = nullptr;
006a317a      OrderHdr::Pack(&var_8, &var_c, 0);
006a3185      void* eax_1 = operator new[](0x10);
006a3197      var_c = eax_1;
006a319d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a31aa      *(uint32_t*)var_c = 0x48;
006a31b4      uint32_t* eax_3 = ((char*)var_c + 4);
006a31b7      var_c = eax_3;
006a31bb      *(uint32_t*)eax_3 = arg1;
006a31c1      void* eax_5 = ((char*)var_c + 4);
006a31c4      var_c = eax_5;
006a31c8      void* eax_6 = (eax_5 & 0x80000003);
006a31c8      bool cond:0 = eax_6 == 0;
006a31c8      
006a31cd      if (eax_6 < 0)
006a31cd      {
006a31d0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a31d3          eax_6 = ((char*)eax_8 + 1);
006a31d3          cond:0 = eax_8 == 0xffffffff;
006a31cd      }
006a31cd      
006a31d4      if (!(cond:0))
006a31d4      {
006a31db          void* i_1 = (4 - eax_6);
006a31db          
006a31dd          if (4 != eax_6)
006a31dd          {
006a31f1              void* i;
006a31f1              
006a31f1              do
006a31f1              {
006a31e4                  *(uint8_t*)var_c = 0;
006a31ec                  i = i_1;
006a31ec                  i_1 -= 1;
006a31ed                  var_c += 1;
006a31f1              } while (i != 1);
006a31dd          }
006a31d4      }
006a31d4      
006a31fa      int32_t ebx;
006a31fa      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a31fa      
006a3201      if (ebx == 0)
006a3208          Proto_UI::UICounterFailedSend(eax);
006a3208      
006a3212      uint32_t eax_9;
006a3212      eax_9 = ebx;
006a3218      return eax_9;
006a3150  }

006a3219                                                                             90 90 90 90 90 90 90                           .......

006a3220  uint8_t CM_Magic::Event_RemoveSpell(uint32_t arg1)

006a3220  {
006a3226      uint32_t eax = Proto_UI::GetNextUICounter();
006a323a      int32_t var_8 = 0x801ad4;
006a3242      void* var_c = nullptr;
006a324a      OrderHdr::Pack(&var_8, &var_c, 0);
006a3255      void* eax_1 = operator new[](0x10);
006a3267      var_c = eax_1;
006a326d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a327a      *(uint32_t*)var_c = 0x1a8;
006a3284      uint32_t* eax_3 = ((char*)var_c + 4);
006a3287      var_c = eax_3;
006a328b      *(uint32_t*)eax_3 = arg1;
006a3291      void* eax_5 = ((char*)var_c + 4);
006a3294      var_c = eax_5;
006a3298      void* eax_6 = (eax_5 & 0x80000003);
006a3298      bool cond:0 = eax_6 == 0;
006a3298      
006a329d      if (eax_6 < 0)
006a329d      {
006a32a0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a32a3          eax_6 = ((char*)eax_8 + 1);
006a32a3          cond:0 = eax_8 == 0xffffffff;
006a329d      }
006a329d      
006a32a4      if (!(cond:0))
006a32a4      {
006a32ab          void* i_1 = (4 - eax_6);
006a32ab          
006a32ad          if (4 != eax_6)
006a32ad          {
006a32c1              void* i;
006a32c1              
006a32c1              do
006a32c1              {
006a32b4                  *(uint8_t*)var_c = 0;
006a32bc                  i = i_1;
006a32bc                  i_1 -= 1;
006a32bd                  var_c += 1;
006a32c1              } while (i != 1);
006a32ad          }
006a32a4      }
006a32a4      
006a32ca      int32_t ebx;
006a32ca      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a32ca      
006a32d1      if (ebx == 0)
006a32d8          Proto_UI::UICounterFailedSend(eax);
006a32d8      
006a32e2      uint32_t eax_9;
006a32e2      eax_9 = ebx;
006a32e8      return eax_9;
006a3220  }

006a32e9                             90 90 90 90 90 90 90                                                           .......

006a32f0  uint32_t CM_Magic::DispatchUI_UpdateEnchantment(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a32f0  {
006a3301      if ((arg1 == 0 || arg1->m_pMagicSystem == 0))
006a3309          return 0;
006a3309      
006a330a      void* eax_3 = arg2;
006a3316      bool cond:0 = *(uint32_t*)eax_3 == 0x2c2;
006a331c      arg2 = ((char*)eax_3 + 4);
006a331c      
006a3320      if (!(cond:0))
006a3329          return 0;
006a3329      
006a332e      void var_50;
006a332e      Enchantment::Enchantment(&var_50);
006a3349      Enchantment::UnPack(&var_50, &arg2, (((char*)eax_3 - arg2) + arg3));
006a3360      return ClientMagicSystem::Handle_Magic__UpdateEnchantment(arg1->m_pMagicSystem, &var_50);
006a32f0  }

006a3361     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006a3370  uint8_t CM_Magic::SendNotice_AddSpellShortcut(uint32_t arg1)

006a3370  {
006a337e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd202);
006a337e      
006a3383      if (eax != 0)
006a3383      {
006a3386          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3386          
006a338b          while (i != 0)
006a338b          {
006a3393              int32_t* edi_1 = *(uint32_t*)i;
006a3397              i = i[1];
006a3397              
006a339a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a33ab                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x168)(arg1);
006a338b          }
006a3383      }
006a3383      
006a33b8      eax = 1;
006a33ba      return 1;
006a3370  }

006a33bb                                                                                   90 90 90 90 90                             .....

006a33c0  uint8_t CM_Magic::SendNotice_CastCurrentSpell()

006a33c0  {
006a33ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd24e);
006a33ce      
006a33d3      if (eax != 0)
006a33d3      {
006a33d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a33d6          
006a33db          if (i != 0)
006a33db          {
006a33dd              int32_t edi;
006a33dd              int32_t var_8_1 = edi;
006a33dd              
006a33ff              do
006a33ff              {
006a33e0                  int32_t* edi_2 = *(uint32_t*)i;
006a33e4                  i = i[1];
006a33e4                  
006a33e7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a33f7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x16c)();
006a33ff              } while (i != 0);
006a33db          }
006a33d3      }
006a33d3      
006a3403      eax = 1;
006a3405      return 1;
006a33c0  }

006a3406                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a3410  uint8_t CM_Magic::SendNotice_CastQuickslotSpell(int32_t arg1)

006a3410  {
006a341e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd24f);
006a341e      
006a3423      if (eax != 0)
006a3423      {
006a3426          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3426          
006a342b          while (i != 0)
006a342b          {
006a3433              int32_t* edi_1 = *(uint32_t*)i;
006a3437              i = i[1];
006a3437              
006a343a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a344b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x170)(arg1);
006a342b          }
006a3423      }
006a3423      
006a3458      eax = 1;
006a345a      return 1;
006a3410  }

006a345b                                                                                   90 90 90 90 90                             .....

006a3460  uint8_t CM_Magic::SendNotice_EnchantmentsChanged()

006a3460  {
006a346e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd201);
006a346e      
006a3473      if (eax != 0)
006a3473      {
006a3476          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3476          
006a347b          if (i != 0)
006a347b          {
006a347d              int32_t edi;
006a347d              int32_t var_8_1 = edi;
006a347d              
006a349f              do
006a349f              {
006a3480                  int32_t* edi_2 = *(uint32_t*)i;
006a3484                  i = i[1];
006a3484                  
006a3487                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a3497                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x174)();
006a349f              } while (i != 0);
006a347b          }
006a3473      }
006a3473      
006a34a3      eax = 1;
006a34a5      return 1;
006a3460  }

006a34a6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a34b0  uint8_t CM_Magic::SendNotice_FirstSpellSelection()

006a34b0  {
006a34be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd26a);
006a34be      
006a34c3      if (eax != 0)
006a34c3      {
006a34c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a34c6          
006a34cb          if (i != 0)
006a34cb          {
006a34cd              int32_t edi;
006a34cd              int32_t var_8_1 = edi;
006a34cd              
006a34ef              do
006a34ef              {
006a34d0                  int32_t* edi_2 = *(uint32_t*)i;
006a34d4                  i = i[1];
006a34d4                  
006a34d7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a34e7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x178)();
006a34ef              } while (i != 0);
006a34cb          }
006a34c3      }
006a34c3      
006a34f3      eax = 1;
006a34f5      return 1;
006a34b0  }

006a34f6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a3500  uint8_t CM_Magic::SendNotice_FirstSpellTab()

006a3500  {
006a350e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd268);
006a350e      
006a3513      if (eax != 0)
006a3513      {
006a3516          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3516          
006a351b          if (i != 0)
006a351b          {
006a351d              int32_t edi;
006a351d              int32_t var_8_1 = edi;
006a351d              
006a353f              do
006a353f              {
006a3520                  int32_t* edi_2 = *(uint32_t*)i;
006a3524                  i = i[1];
006a3524                  
006a3527                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a3537                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x17c)();
006a353f              } while (i != 0);
006a351b          }
006a3513      }
006a3513      
006a3543      eax = 1;
006a3545      return 1;
006a3500  }

006a3546                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a3550  uint8_t CM_Magic::SendNotice_LastSpellSelection()

006a3550  {
006a355e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd269);
006a355e      
006a3563      if (eax != 0)
006a3563      {
006a3566          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3566          
006a356b          if (i != 0)
006a356b          {
006a356d              int32_t edi;
006a356d              int32_t var_8_1 = edi;
006a356d              
006a358f              do
006a358f              {
006a3570                  int32_t* edi_2 = *(uint32_t*)i;
006a3574                  i = i[1];
006a3574                  
006a3577                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a3587                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x180)();
006a358f              } while (i != 0);
006a356b          }
006a3563      }
006a3563      
006a3593      eax = 1;
006a3595      return 1;
006a3550  }

006a3596                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a35a0  uint8_t CM_Magic::SendNotice_LastSpellTab()

006a35a0  {
006a35ae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd26b);
006a35ae      
006a35b3      if (eax != 0)
006a35b3      {
006a35b6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a35b6          
006a35bb          if (i != 0)
006a35bb          {
006a35bd              int32_t edi;
006a35bd              int32_t var_8_1 = edi;
006a35bd              
006a35df              do
006a35df              {
006a35c0                  int32_t* edi_2 = *(uint32_t*)i;
006a35c4                  i = i[1];
006a35c4                  
006a35c7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a35d7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x184)();
006a35df              } while (i != 0);
006a35bb          }
006a35b3      }
006a35b3      
006a35e3      eax = 1;
006a35e5      return 1;
006a35a0  }

006a35e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a35f0  uint8_t CM_Magic::SendNotice_NextSpellSelection()

006a35f0  {
006a35fe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd24c);
006a35fe      
006a3603      if (eax != 0)
006a3603      {
006a3606          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3606          
006a360b          if (i != 0)
006a360b          {
006a360d              int32_t edi;
006a360d              int32_t var_8_1 = edi;
006a360d              
006a362f              do
006a362f              {
006a3610                  int32_t* edi_2 = *(uint32_t*)i;
006a3614                  i = i[1];
006a3614                  
006a3617                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a3627                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x188)();
006a362f              } while (i != 0);
006a360b          }
006a3603      }
006a3603      
006a3633      eax = 1;
006a3635      return 1;
006a35f0  }

006a3636                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a3640  uint8_t CM_Magic::SendNotice_NextSpellTab()

006a3640  {
006a364e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd24a);
006a364e      
006a3653      if (eax != 0)
006a3653      {
006a3656          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3656          
006a365b          if (i != 0)
006a365b          {
006a365d              int32_t edi;
006a365d              int32_t var_8_1 = edi;
006a365d              
006a367f              do
006a367f              {
006a3660                  int32_t* edi_2 = *(uint32_t*)i;
006a3664                  i = i[1];
006a3664                  
006a3667                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a3677                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x18c)();
006a367f              } while (i != 0);
006a365b          }
006a3653      }
006a3653      
006a3683      eax = 1;
006a3685      return 1;
006a3640  }

006a3686                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a3690  uint8_t CM_Magic::SendNotice_PrevSpellSelection()

006a3690  {
006a369e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd24d);
006a369e      
006a36a3      if (eax != 0)
006a36a3      {
006a36a6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a36a6          
006a36ab          if (i != 0)
006a36ab          {
006a36ad              int32_t edi;
006a36ad              int32_t var_8_1 = edi;
006a36ad              
006a36cf              do
006a36cf              {
006a36b0                  int32_t* edi_2 = *(uint32_t*)i;
006a36b4                  i = i[1];
006a36b4                  
006a36b7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a36c7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x190)();
006a36cf              } while (i != 0);
006a36ab          }
006a36a3      }
006a36a3      
006a36d3      eax = 1;
006a36d5      return 1;
006a3690  }

006a36d6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a36e0  uint8_t CM_Magic::SendNotice_PrevSpellTab()

006a36e0  {
006a36ee      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd24b);
006a36ee      
006a36f3      if (eax != 0)
006a36f3      {
006a36f6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a36f6          
006a36fb          if (i != 0)
006a36fb          {
006a36fd              int32_t edi;
006a36fd              int32_t var_8_1 = edi;
006a36fd              
006a371f              do
006a371f              {
006a3700                  int32_t* edi_2 = *(uint32_t*)i;
006a3704                  i = i[1];
006a3704                  
006a3707                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a3717                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x194)();
006a371f              } while (i != 0);
006a36fb          }
006a36f3      }
006a36f3      
006a3723      eax = 1;
006a3725      return 1;
006a36e0  }

006a3726                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a3730  uint8_t CM_Magic::SendNotice_SpellAdded(uint32_t arg1)

006a3730  {
006a373e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd25f);
006a373e      
006a3743      if (eax != 0)
006a3743      {
006a3746          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3746          
006a374b          while (i != 0)
006a374b          {
006a3753              int32_t* edi_1 = *(uint32_t*)i;
006a3757              i = i[1];
006a3757              
006a375a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a376b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1a0)(arg1);
006a374b          }
006a3743      }
006a3743      
006a3778      eax = 1;
006a377a      return 1;
006a3730  }

006a377b                                                                                   90 90 90 90 90                             .....

006a3780  uint8_t CM_Magic::SendNotice_SpellRemoved(uint32_t arg1)

006a3780  {
006a378e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd260);
006a378e      
006a3793      if (eax != 0)
006a3793      {
006a3796          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3796          
006a379b          while (i != 0)
006a379b          {
006a37a3              int32_t* edi_1 = *(uint32_t*)i;
006a37a7              i = i[1];
006a37a7              
006a37aa              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a37bb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1a4)(arg1);
006a379b          }
006a3793      }
006a3793      
006a37c8      eax = 1;
006a37ca      return 1;
006a3780  }

006a37cb                                   90 90 90 90 90                                                             .....

006a37d0  uint8_t CM_Magic::SendNotice_UpdateSpellComponents(int32_t arg1)

006a37d0  {
006a37de      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd255);
006a37de      
006a37e3      if (eax != 0)
006a37e3      {
006a37e6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a37e6          
006a37eb          while (i != 0)
006a37eb          {
006a37f3              int32_t* edi_1 = *(uint32_t*)i;
006a37f7              i = i[1];
006a37f7              
006a37fa              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a380b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1a8)(arg1);
006a37eb          }
006a37e3      }
006a37e3      
006a3818      eax = 1;
006a381a      return 1;
006a37d0  }

006a381b                                                                                   90 90 90 90 90                             .....

006a3820  uint8_t CM_Magic::SendNotice_VitaeChanged()

006a3820  {
006a382e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd215);
006a382e      
006a3833      if (eax != 0)
006a3833      {
006a3836          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a3836          
006a383b          if (i != 0)
006a383b          {
006a383d              int32_t edi;
006a383d              int32_t var_8_1 = edi;
006a383d              
006a385f              do
006a385f              {
006a3840                  int32_t* edi_2 = *(uint32_t*)i;
006a3844                  i = i[1];
006a3844                  
006a3847                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a3857                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x1ac)();
006a385f              } while (i != 0);
006a383b          }
006a3833      }
006a3833      
006a3863      eax = 1;
006a3865      return 1;
006a3820  }

006a3866                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a3870  uint32_t CM_Magic::DispatchUI_DispelMultipleEnchantments(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a3870  {
006a3881      if ((arg1 == 0 || arg1->m_pMagicSystem == 0))
006a3889          return 0;
006a3889      
006a388a      void* ecx = arg2;
006a3896      bool cond:0 = *(uint32_t*)ecx == 0x2c8;
006a389c      arg2 = ((char*)ecx + 4);
006a389c      
006a38a0      if (!(cond:0))
006a38a9          return 0;
006a38a9      
006a38bf      int32_t var_10 = 0x7a3e80;
006a38c3      int32_t var_c = 0;
006a38c7      int32_t var_8 = 0;
006a38cb      int32_t var_4 = 0;
006a38cf      PackableList<unsigned long>::UnPack(&var_10, &arg2, (((ecx * 0) - 4) + arg3));
006a38dc      uint32_t result = ClientMagicSystem::Handle_Magic__DispelMultipleEnchantments(arg1->m_pMagicSystem, &var_10);
006a38e7      var_10 = 0x7a3e80;
006a38eb      PackableList<unsigned long>::Flush(&var_10);
006a38f7      return result;
006a3870  }

006a38f8                                                                          90 90 90 90 90 90 90 90                          ........

006a3900  uint32_t CM_Magic::DispatchUI_RemoveMultipleEnchantments(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a3900  {
006a3911      if ((arg1 == 0 || arg1->m_pMagicSystem == 0))
006a3919          return 0;
006a3919      
006a391a      void* ecx = arg2;
006a3926      bool cond:0 = *(uint32_t*)ecx == 0x2c5;
006a392c      arg2 = ((char*)ecx + 4);
006a392c      
006a3930      if (!(cond:0))
006a3939          return 0;
006a3939      
006a393c      int32_t var_c = 0;
006a3940      int32_t var_8 = 0;
006a3944      int32_t var_4 = 0;
006a395b      int32_t var_10 = 0x7a3e80;
006a395f      PackableList<unsigned long>::UnPack(&var_10, &arg2, (((ecx * 0) - 4) + arg3));
006a396e      uint32_t result = ClientMagicSystem::Handle_Magic__RemoveMultipleEnchantments(arg1->m_pMagicSystem, &var_10, 1);
006a3979      var_10 = 0x7a3e80;
006a397d      PackableList<unsigned long>::Flush(&var_10);
006a3989      return result;
006a3900  }

006a398a                                90 90 90 90 90 90                                                            ......

006a3990  uint32_t CM_Magic::DispatchUI_UpdateMultipleEnchantments(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a3990  {
006a39a1      if ((arg1 == 0 || arg1->m_pMagicSystem == 0))
006a39a9          return 0;
006a39a9      
006a39aa      void* ecx = arg2;
006a39b6      bool cond:0 = *(uint32_t*)ecx == 0x2c4;
006a39bc      arg2 = ((char*)ecx + 4);
006a39bc      
006a39c0      if (!(cond:0))
006a39c9          return 0;
006a39c9      
006a39df      int32_t var_10 = 0x7b15c4;
006a39e3      int32_t var_c = 0;
006a39e7      int32_t var_8 = 0;
006a39eb      int32_t var_4 = 0;
006a39ef      PackableList<Enchantment>::UnPack(&var_10, &arg2, (((ecx * 0) - 4) + arg3));
006a39fc      uint32_t result = ClientMagicSystem::Handle_Magic__UpdateMultipleEnchantments(arg1->m_pMagicSystem, &var_10);
006a3a07      var_10 = 0x7b15c4;
006a3a0b      PackableList<Enchantment>::Flush(&var_10);
006a3a17      return result;
006a3990  }

006a3a18                                                                          90 90 90 90 90 90 90 90                          ........

006a3a20  uint32_t CM_Communication::DispatchUI_SetSquelchDB(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a3a20  {
006a3a31      if ((arg1 == 0 || arg1->m_pCommunicationSystem == 0))
006a3a39          return 0;
006a3a39      
006a3a3a      void* eax_3 = arg2;
006a3a46      bool cond:0 = *(uint32_t*)eax_3 == 0x1f4;
006a3a4c      arg2 = ((char*)eax_3 + 4);
006a3a4c      
006a3a50      if (!(cond:0))
006a3a59          return 0;
006a3a59      
006a3a5e      void var_44;
006a3a5e      SquelchDB::SquelchDB(&var_44);
006a3a79      SquelchDB::UnPack(&var_44, &arg2, (((char*)eax_3 - arg2) + arg3));
006a3a86      ClientCommunicationSystem::Handle_Communication__SetSquelchDB(arg1->m_pCommunicationSystem, &var_44);
006a3a91      SquelchDB::~SquelchDB(&var_44);
006a3a9d      return 0;
006a3a20  }

006a3a9e                                                                                            90 90                                ..

006a3aa0  uint32_t CM_Communication::DispatchUI_WeenieError(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a3aa0  {
006a3aa6      if (arg1 != 0)
006a3aa6      {
006a3aa8          class ClientCommunicationSystem* m_pCommunicationSystem = arg1->m_pCommunicationSystem;
006a3aa8          
006a3ab9          if ((m_pCommunicationSystem != 0 && *(uint32_t*)arg2 == 0x28a))
006a3ac2              ClientCommunicationSystem::Handle_Communication__WeenieError(m_pCommunicationSystem, *(uint32_t*)((char*)arg2 + 4));
006a3aa6      }
006a3aa6      
006a3abd      return 0;
006a3aa0  }

006a3ac8                          90 90 90 90 90 90 90 90                                                          ........

006a3ad0  uint8_t CM_Communication::Event_AddToChannel(uint32_t arg1)

006a3ad0  {
006a3ad6      uint32_t eax = Proto_UI::GetNextUICounter();
006a3aea      int32_t var_8 = 0x801ad4;
006a3af2      void* var_c = nullptr;
006a3afa      OrderHdr::Pack(&var_8, &var_c, 0);
006a3b05      void* eax_1 = operator new[](0x10);
006a3b17      var_c = eax_1;
006a3b1d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a3b2a      *(uint32_t*)var_c = 0x145;
006a3b34      uint32_t* eax_3 = ((char*)var_c + 4);
006a3b37      var_c = eax_3;
006a3b3b      *(uint32_t*)eax_3 = arg1;
006a3b41      void* eax_5 = ((char*)var_c + 4);
006a3b44      var_c = eax_5;
006a3b48      void* eax_6 = (eax_5 & 0x80000003);
006a3b48      bool cond:0 = eax_6 == 0;
006a3b48      
006a3b4d      if (eax_6 < 0)
006a3b4d      {
006a3b50          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a3b53          eax_6 = ((char*)eax_8 + 1);
006a3b53          cond:0 = eax_8 == 0xffffffff;
006a3b4d      }
006a3b4d      
006a3b54      if (!(cond:0))
006a3b54      {
006a3b5b          void* i_1 = (4 - eax_6);
006a3b5b          
006a3b5d          if (4 != eax_6)
006a3b5d          {
006a3b71              void* i;
006a3b71              
006a3b71              do
006a3b71              {
006a3b64                  *(uint8_t*)var_c = 0;
006a3b6c                  i = i_1;
006a3b6c                  i_1 -= 1;
006a3b6d                  var_c += 1;
006a3b71              } while (i != 1);
006a3b5d          }
006a3b54      }
006a3b54      
006a3b7a      int32_t ebx;
006a3b7a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a3b7a      
006a3b81      if (ebx == 0)
006a3b88          Proto_UI::UICounterFailedSend(eax);
006a3b88      
006a3b92      uint32_t eax_9;
006a3b92      eax_9 = ebx;
006a3b98      return eax_9;
006a3ad0  }

006a3b99                                                                             90 90 90 90 90 90 90                           .......

006a3ba0  uint8_t CM_Communication::Event_ChannelIndex()

006a3ba0  {
006a3ba6      uint32_t eax = Proto_UI::GetNextUICounter();
006a3bba      int32_t var_8 = 0x801ad4;
006a3bc2      void* var_c = nullptr;
006a3bca      OrderHdr::Pack(&var_8, &var_c, 0);
006a3bd5      void* eax_1 = operator new[](0xc);
006a3be7      var_c = eax_1;
006a3bed      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a3bf6      *(uint32_t*)var_c = 0x149;
006a3c05      var_c += 4;
006a3c0e      int32_t ebx;
006a3c0e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a3c0e      
006a3c15      if (ebx == 0)
006a3c1c          Proto_UI::UICounterFailedSend(eax);
006a3c1c      
006a3c26      uint32_t eax_4;
006a3c26      eax_4 = ebx;
006a3c2c      return eax_4;
006a3ba0  }

006a3c2d                                         90 90 90                                                               ...

006a3c30  uint8_t CM_Communication::Event_ChannelList(uint32_t arg1)

006a3c30  {
006a3c36      uint32_t eax = Proto_UI::GetNextUICounter();
006a3c4a      int32_t var_8 = 0x801ad4;
006a3c52      void* var_c = nullptr;
006a3c5a      OrderHdr::Pack(&var_8, &var_c, 0);
006a3c65      void* eax_1 = operator new[](0x10);
006a3c77      var_c = eax_1;
006a3c7d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a3c8a      *(uint32_t*)var_c = 0x148;
006a3c94      uint32_t* eax_3 = ((char*)var_c + 4);
006a3c97      var_c = eax_3;
006a3c9b      *(uint32_t*)eax_3 = arg1;
006a3ca1      void* eax_5 = ((char*)var_c + 4);
006a3ca4      var_c = eax_5;
006a3ca8      void* eax_6 = (eax_5 & 0x80000003);
006a3ca8      bool cond:0 = eax_6 == 0;
006a3ca8      
006a3cad      if (eax_6 < 0)
006a3cad      {
006a3cb0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a3cb3          eax_6 = ((char*)eax_8 + 1);
006a3cb3          cond:0 = eax_8 == 0xffffffff;
006a3cad      }
006a3cad      
006a3cb4      if (!(cond:0))
006a3cb4      {
006a3cbb          void* i_1 = (4 - eax_6);
006a3cbb          
006a3cbd          if (4 != eax_6)
006a3cbd          {
006a3cd1              void* i;
006a3cd1              
006a3cd1              do
006a3cd1              {
006a3cc4                  *(uint8_t*)var_c = 0;
006a3ccc                  i = i_1;
006a3ccc                  i_1 -= 1;
006a3ccd                  var_c += 1;
006a3cd1              } while (i != 1);
006a3cbd          }
006a3cb4      }
006a3cb4      
006a3cda      int32_t ebx;
006a3cda      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a3cda      
006a3ce1      if (ebx == 0)
006a3ce8          Proto_UI::UICounterFailedSend(eax);
006a3ce8      
006a3cf2      uint32_t eax_9;
006a3cf2      eax_9 = ebx;
006a3cf8      return eax_9;
006a3c30  }

006a3cf9                                                                             90 90 90 90 90 90 90                           .......

006a3d00  uint8_t CM_Communication::Event_ModifyGlobalSquelch(int32_t arg1, uint32_t arg2)

006a3d00  {
006a3d06      uint32_t eax = Proto_UI::GetNextUICounter();
006a3d1a      int32_t var_8 = 0x801ad4;
006a3d22      void* var_c = nullptr;
006a3d2a      OrderHdr::Pack(&var_8, &var_c, 0);
006a3d35      void* eax_1 = operator new[](0x14);
006a3d47      var_c = eax_1;
006a3d4d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a3d5a      *(uint32_t*)var_c = 0x5b;
006a3d64      int32_t* eax_3 = ((char*)var_c + 4);
006a3d67      var_c = eax_3;
006a3d6b      *(uint32_t*)eax_3 = arg1;
006a3d71      void* eax_5 = ((char*)var_c + 4);
006a3d76      void* ecx_4 = (eax_5 & 0x80000003);
006a3d76      bool cond:1 = ecx_4 == 0;
006a3d7c      var_c = eax_5;
006a3d7c      
006a3d80      if (ecx_4 < 0)
006a3d80      {
006a3d83          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a3d86          ecx_4 = ((char*)ecx_6 + 1);
006a3d86          cond:1 = ecx_6 == 0xffffffff;
006a3d80      }
006a3d80      
006a3d87      if (!(cond:1))
006a3d87      {
006a3d8e          void* i_3 = (4 - ecx_4);
006a3d8e          
006a3d90          if (4 != ecx_4)
006a3d90          {
006a3d9f              void* i;
006a3d9f              
006a3d9f              do
006a3d9f              {
006a3d92                  *(uint8_t*)eax_5 = 0;
006a3d99                  eax_5 = ((char*)var_c + 1);
006a3d9a                  i = i_3;
006a3d9a                  i_3 -= 1;
006a3d9b                  var_c = eax_5;
006a3d9f              } while (i != 1);
006a3d90          }
006a3d87      }
006a3d87      
006a3da5      *(uint32_t*)eax_5 = arg2;
006a3dab      void* eax_8 = ((char*)var_c + 4);
006a3dae      var_c = eax_8;
006a3db2      void* eax_9 = (eax_8 & 0x80000003);
006a3db2      bool cond:2 = eax_9 == 0;
006a3db2      
006a3db7      if (eax_9 < 0)
006a3db7      {
006a3dba          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a3dbd          eax_9 = ((char*)eax_11 + 1);
006a3dbd          cond:2 = eax_11 == 0xffffffff;
006a3db7      }
006a3db7      
006a3dbe      if (!(cond:2))
006a3dbe      {
006a3dc5          void* i_2 = (4 - eax_9);
006a3dc5          
006a3dc7          if (4 != eax_9)
006a3dc7          {
006a3de1              void* i_1;
006a3de1              
006a3de1              do
006a3de1              {
006a3dd4                  *(uint8_t*)var_c = 0;
006a3ddc                  i_1 = i_2;
006a3ddc                  i_2 -= 1;
006a3ddd                  var_c += 1;
006a3de1              } while (i_1 != 1);
006a3dc7          }
006a3dbe      }
006a3dbe      
006a3dea      int32_t ebx;
006a3dea      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a3dea      
006a3df1      if (ebx == 0)
006a3df8          Proto_UI::UICounterFailedSend(eax);
006a3df8      
006a3e08      return ebx;
006a3d00  }

006a3e09                             90 90 90 90 90 90 90                                                           .......

006a3e10  uint8_t CM_Communication::Event_RemoveFromChannel(uint32_t arg1)

006a3e10  {
006a3e16      uint32_t eax = Proto_UI::GetNextUICounter();
006a3e2a      int32_t var_8 = 0x801ad4;
006a3e32      void* var_c = nullptr;
006a3e3a      OrderHdr::Pack(&var_8, &var_c, 0);
006a3e45      void* eax_1 = operator new[](0x10);
006a3e57      var_c = eax_1;
006a3e5d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a3e6a      *(uint32_t*)var_c = 0x146;
006a3e74      uint32_t* eax_3 = ((char*)var_c + 4);
006a3e77      var_c = eax_3;
006a3e7b      *(uint32_t*)eax_3 = arg1;
006a3e81      void* eax_5 = ((char*)var_c + 4);
006a3e84      var_c = eax_5;
006a3e88      void* eax_6 = (eax_5 & 0x80000003);
006a3e88      bool cond:0 = eax_6 == 0;
006a3e88      
006a3e8d      if (eax_6 < 0)
006a3e8d      {
006a3e90          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a3e93          eax_6 = ((char*)eax_8 + 1);
006a3e93          cond:0 = eax_8 == 0xffffffff;
006a3e8d      }
006a3e8d      
006a3e94      if (!(cond:0))
006a3e94      {
006a3e9b          void* i_1 = (4 - eax_6);
006a3e9b          
006a3e9d          if (4 != eax_6)
006a3e9d          {
006a3eb1              void* i;
006a3eb1              
006a3eb1              do
006a3eb1              {
006a3ea4                  *(uint8_t*)var_c = 0;
006a3eac                  i = i_1;
006a3eac                  i_1 -= 1;
006a3ead                  var_c += 1;
006a3eb1              } while (i != 1);
006a3e9d          }
006a3e94      }
006a3e94      
006a3eba      int32_t ebx;
006a3eba      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a3eba      
006a3ec1      if (ebx == 0)
006a3ec8          Proto_UI::UICounterFailedSend(eax);
006a3ec8      
006a3ed2      uint32_t eax_9;
006a3ed2      eax_9 = ebx;
006a3ed8      return eax_9;
006a3e10  }

006a3ed9                                                                             90 90 90 90 90 90 90                           .......

006a3ee0  uint8_t CM_Communication::Event_SetAFKMode(int32_t arg1)

006a3ee0  {
006a3ee6      uint32_t eax = Proto_UI::GetNextUICounter();
006a3efa      int32_t var_8 = 0x801ad4;
006a3f02      void* var_c = nullptr;
006a3f0a      OrderHdr::Pack(&var_8, &var_c, 0);
006a3f15      void* eax_1 = operator new[](0x10);
006a3f27      var_c = eax_1;
006a3f2d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a3f3a      *(uint32_t*)var_c = 0xf;
006a3f44      int32_t* eax_3 = ((char*)var_c + 4);
006a3f47      var_c = eax_3;
006a3f4b      *(uint32_t*)eax_3 = arg1;
006a3f51      void* eax_5 = ((char*)var_c + 4);
006a3f54      var_c = eax_5;
006a3f58      void* eax_6 = (eax_5 & 0x80000003);
006a3f58      bool cond:0 = eax_6 == 0;
006a3f58      
006a3f5d      if (eax_6 < 0)
006a3f5d      {
006a3f60          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a3f63          eax_6 = ((char*)eax_8 + 1);
006a3f63          cond:0 = eax_8 == 0xffffffff;
006a3f5d      }
006a3f5d      
006a3f64      if (!(cond:0))
006a3f64      {
006a3f6b          void* i_1 = (4 - eax_6);
006a3f6b          
006a3f6d          if (4 != eax_6)
006a3f6d          {
006a3f81              void* i;
006a3f81              
006a3f81              do
006a3f81              {
006a3f74                  *(uint8_t*)var_c = 0;
006a3f7c                  i = i_1;
006a3f7c                  i_1 -= 1;
006a3f7d                  var_c += 1;
006a3f81              } while (i != 1);
006a3f6d          }
006a3f64      }
006a3f64      
006a3f8a      int32_t ebx;
006a3f8a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a3f8a      
006a3f91      if (ebx == 0)
006a3f98          Proto_UI::UICounterFailedSend(eax);
006a3f98      
006a3fa2      uint32_t eax_9;
006a3fa2      eax_9 = ebx;
006a3fa8      return eax_9;
006a3ee0  }

006a3fa9                             90 90 90 90 90 90 90                                                           .......

006a3fb0  uint32_t CM_Communication::DispatchUI_Recv_ChatRoomTracker(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a3fb0  {
006a3fc1      if ((arg1 == 0 || arg1->m_pCommunicationSystem == 0))
006a3fc9          return 0;
006a3fc9      
006a3fca      void* eax_3 = arg2;
006a3fd6      bool cond:0 = *(uint32_t*)eax_3 == 0x295;
006a3fdc      arg2 = ((char*)eax_3 + 4);
006a3fdc      
006a3fe0      if (!(cond:0))
006a3fe9          return 0;
006a3fe9      
006a3fee      void var_2c;
006a3fee      ChatRoomTracker::ChatRoomTracker(&var_2c);
006a4009      ChatRoomTracker::UnPack(&var_2c, &arg2, (((char*)eax_3 - arg2) + arg3));
006a4016      ClientCommunicationSystem::Handle_Communication__Recv_ChatRoomTracker(arg1->m_pCommunicationSystem, &var_2c);
006a4020      return 0;
006a3fb0  }

006a4021     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006a4030  uint8_t CM_Communication::Event_ChannelBroadcast(uint32_t arg1, class AC1Legacy::PStringBase<char> const* arg2)

006a4030  {
006a4036      uint32_t eax = Proto_UI::GetNextUICounter();
006a404c      int32_t var_8 = 0x801ad4;
006a4054      void* var_c = nullptr;
006a405c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, 0);
006a406e      OrderHdr::Pack(&var_8, &var_c, 0);
006a4078      void* eax_2 = operator new[]((eax_1 + 0x10));
006a408a      var_c = eax_2;
006a4090      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a409d      *(uint32_t*)var_c = 0x147;
006a40a7      uint32_t* eax_5 = ((char*)var_c + 4);
006a40aa      var_c = eax_5;
006a40ae      *(uint32_t*)eax_5 = arg1;
006a40b4      void* eax_7 = ((char*)var_c + 4);
006a40b9      void* ecx_5 = (eax_7 & 0x80000003);
006a40b9      bool cond:1 = ecx_5 == 0;
006a40bf      var_c = eax_7;
006a40bf      
006a40c3      if (ecx_5 < 0)
006a40c3      {
006a40c6          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006a40c9          ecx_5 = ((char*)ecx_7 + 1);
006a40c9          cond:1 = ecx_7 == 0xffffffff;
006a40c3      }
006a40c3      
006a40ca      if (!(cond:1))
006a40ca      {
006a40d1          void* i_1 = (4 - ecx_5);
006a40d1          
006a40d3          if (4 != ecx_5)
006a40d3          {
006a40e2              void* i;
006a40e2              
006a40e2              do
006a40e2              {
006a40d5                  *(uint8_t*)eax_7 = 0;
006a40dc                  eax_7 = ((char*)var_c + 1);
006a40dd                  i = i_1;
006a40dd                  i_1 -= 1;
006a40de                  var_c = eax_7;
006a40e2              } while (i != 1);
006a40d3          }
006a40ca      }
006a40ca      
006a40f2      AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, (((char*)eax_2 - eax_7) + (eax_1 + 0x10)));
006a40fe      class AC1Legacy::PStringBase<char>* ebx;
006a40fe      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a40fe      
006a4105      if (ebx == 0)
006a410c          Proto_UI::UICounterFailedSend(eax);
006a410c      
006a411c      return ebx;
006a4030  }

006a411d                                                                                         90 90 90                               ...

006a4120  uint8_t CM_Communication::Event_Emote(class AC1Legacy::PStringBase<char> const* arg1)

006a4120  {
006a4126      uint32_t eax = Proto_UI::GetNextUICounter();
006a413c      int32_t var_8 = 0x801ad4;
006a4144      void* var_c = nullptr;
006a414c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a415e      OrderHdr::Pack(&var_8, &var_c, 0);
006a4168      void* eax_2 = operator new[]((eax_1 + 0xc));
006a417a      var_c = eax_2;
006a4180      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a4189      *(uint32_t*)var_c = 0x1df;
006a419a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a41a4      var_c += 4;
006a41a8      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a41b4      class AC1Legacy::PStringBase<char>* ebx;
006a41b4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a41b4      
006a41bb      if (ebx == 0)
006a41c2          Proto_UI::UICounterFailedSend(eax);
006a41c2      
006a41cc      uint32_t eax_6;
006a41cc      eax_6 = ebx;
006a41d2      return eax_6;
006a4120  }

006a41d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a41e0  uint8_t CM_Communication::Event_ModifyAccountSquelch(int32_t arg1, class AC1Legacy::PStringBase<char> const* arg2)

006a41e0  {
006a41e6      uint32_t eax = Proto_UI::GetNextUICounter();
006a41fc      int32_t var_8 = 0x801ad4;
006a4204      void* var_c = nullptr;
006a420c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, 0);
006a421e      OrderHdr::Pack(&var_8, &var_c, 0);
006a4228      void* eax_2 = operator new[]((eax_1 + 0x10));
006a423a      var_c = eax_2;
006a4240      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a424d      *(uint32_t*)var_c = 0x59;
006a4257      int32_t* eax_5 = ((char*)var_c + 4);
006a425a      var_c = eax_5;
006a425e      *(uint32_t*)eax_5 = arg1;
006a4264      void* eax_7 = ((char*)var_c + 4);
006a4269      void* ecx_5 = (eax_7 & 0x80000003);
006a4269      bool cond:1 = ecx_5 == 0;
006a426f      var_c = eax_7;
006a426f      
006a4273      if (ecx_5 < 0)
006a4273      {
006a4276          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006a4279          ecx_5 = ((char*)ecx_7 + 1);
006a4279          cond:1 = ecx_7 == 0xffffffff;
006a4273      }
006a4273      
006a427a      if (!(cond:1))
006a427a      {
006a4281          void* i_1 = (4 - ecx_5);
006a4281          
006a4283          if (4 != ecx_5)
006a4283          {
006a4292              void* i;
006a4292              
006a4292              do
006a4292              {
006a4285                  *(uint8_t*)eax_7 = 0;
006a428c                  eax_7 = ((char*)var_c + 1);
006a428d                  i = i_1;
006a428d                  i_1 -= 1;
006a428e                  var_c = eax_7;
006a4292              } while (i != 1);
006a4283          }
006a427a      }
006a427a      
006a42a2      AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, (((char*)eax_2 - eax_7) + (eax_1 + 0x10)));
006a42ae      class AC1Legacy::PStringBase<char>* ebx;
006a42ae      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a42ae      
006a42b5      if (ebx == 0)
006a42bc          Proto_UI::UICounterFailedSend(eax);
006a42bc      
006a42cc      return ebx;
006a41e0  }

006a42cd                                         90 90 90                                                               ...

006a42d0  uint8_t CM_Communication::Event_ModifyCharacterSquelch(int32_t arg1, uint32_t arg2, class AC1Legacy::PStringBase<char> const* arg3, uint32_t arg4)

006a42d0  {
006a42d6      uint32_t eax = Proto_UI::GetNextUICounter();
006a42ec      int32_t var_8 = 0x801ad4;
006a42f4      void* var_c = nullptr;
006a42fc      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg3, &var_c, 0);
006a430e      OrderHdr::Pack(&var_8, &var_c, 0);
006a4318      void* eax_2 = operator new[]((eax_1 + 0x18));
006a432a      var_c = eax_2;
006a4330      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x18));
006a433d      *(uint32_t*)var_c = 0x58;
006a4347      int32_t* eax_5 = ((char*)var_c + 4);
006a434a      var_c = eax_5;
006a434e      *(uint32_t*)eax_5 = arg1;
006a4354      void* eax_7 = ((char*)var_c + 4);
006a4359      void* ecx_5 = (eax_7 & 0x80000003);
006a4359      bool cond:1 = ecx_5 == 0;
006a435f      var_c = eax_7;
006a435f      
006a4363      if (ecx_5 < 0)
006a4363      {
006a4366          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006a4369          ecx_5 = ((char*)ecx_7 + 1);
006a4369          cond:1 = ecx_7 == 0xffffffff;
006a4363      }
006a4363      
006a436a      if (!(cond:1))
006a436a      {
006a4371          void* i_4 = (4 - ecx_5);
006a4371          
006a4373          if (4 != ecx_5)
006a4373          {
006a4382              void* i;
006a4382              
006a4382              do
006a4382              {
006a4375                  *(uint8_t*)eax_7 = 0;
006a437c                  eax_7 = ((char*)var_c + 1);
006a437d                  i = i_4;
006a437d                  i_4 -= 1;
006a437e                  var_c = eax_7;
006a4382              } while (i != 1);
006a4373          }
006a436a      }
006a436a      
006a4388      *(uint32_t*)eax_7 = arg2;
006a438e      void* eax_10 = ((char*)var_c + 4);
006a4393      void* ecx_9 = (eax_10 & 0x80000003);
006a4393      bool cond:3 = ecx_9 == 0;
006a4399      var_c = eax_10;
006a4399      
006a439d      if (ecx_9 < 0)
006a439d      {
006a43a0          void* ecx_11 = (((char*)ecx_9 - 1) | 0xfffffffc);
006a43a3          ecx_9 = ((char*)ecx_11 + 1);
006a43a3          cond:3 = ecx_11 == 0xffffffff;
006a439d      }
006a439d      
006a43a4      if (!(cond:3))
006a43a4      {
006a43ab          void* i_5 = (4 - ecx_9);
006a43ab          
006a43ad          if (4 != ecx_9)
006a43ad          {
006a43bd              void* i_1;
006a43bd              
006a43bd              do
006a43bd              {
006a43b0                  *(uint8_t*)eax_10 = 0;
006a43b7                  eax_10 = ((char*)var_c + 1);
006a43b8                  i_1 = i_5;
006a43b8                  i_5 -= 1;
006a43b9                  var_c = eax_10;
006a43bd              } while (i_1 != 1);
006a43ad          }
006a43a4      }
006a43a4      
006a43cd      AC1Legacy::PStringBase<char>::Pack(arg3, &var_c, (((char*)eax_2 - eax_10) + (eax_1 + 0x18)));
006a43da      *(uint32_t*)var_c = arg4;
006a43e0      void* eax_14 = ((char*)var_c + 4);
006a43e3      var_c = eax_14;
006a43e7      void* eax_15 = (eax_14 & 0x80000003);
006a43e7      bool cond:5 = eax_15 == 0;
006a43e7      
006a43ec      if (eax_15 < 0)
006a43ec      {
006a43ef          void* eax_17 = (((char*)eax_15 - 1) | 0xfffffffc);
006a43f2          eax_15 = ((char*)eax_17 + 1);
006a43f2          cond:5 = eax_17 == 0xffffffff;
006a43ec      }
006a43ec      
006a43f3      if (!(cond:5))
006a43f3      {
006a43fa          void* i_3 = (4 - eax_15);
006a43fa          
006a43fc          if (4 != eax_15)
006a43fc          {
006a4411              void* i_2;
006a4411              
006a4411              do
006a4411              {
006a4404                  *(uint8_t*)var_c = 0;
006a440c                  i_2 = i_3;
006a440c                  i_3 -= 1;
006a440d                  var_c += 1;
006a4411              } while (i_2 != 1);
006a43fc          }
006a43f3      }
006a43f3      
006a441a      void* ebx;
006a441a      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x18));
006a441a      
006a4421      if (ebx == 0)
006a4428          Proto_UI::UICounterFailedSend(eax);
006a4428      
006a4432      uint32_t eax_18;
006a4432      eax_18 = ebx;
006a4438      return eax_18;
006a42d0  }

006a4439                                                                             90 90 90 90 90 90 90                           .......

006a4440  uint8_t CM_Communication::Event_SetAFKMessage(class AC1Legacy::PStringBase<char> const* arg1)

006a4440  {
006a4446      uint32_t eax = Proto_UI::GetNextUICounter();
006a445c      int32_t var_8 = 0x801ad4;
006a4464      void* var_c = nullptr;
006a446c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a447e      OrderHdr::Pack(&var_8, &var_c, 0);
006a4488      void* eax_2 = operator new[]((eax_1 + 0xc));
006a449a      var_c = eax_2;
006a44a0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a44a9      *(uint32_t*)var_c = 0x10;
006a44ba      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a44c4      var_c += 4;
006a44c8      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a44d4      class AC1Legacy::PStringBase<char>* ebx;
006a44d4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a44d4      
006a44db      if (ebx == 0)
006a44e2          Proto_UI::UICounterFailedSend(eax);
006a44e2      
006a44ec      uint32_t eax_6;
006a44ec      eax_6 = ebx;
006a44f2      return eax_6;
006a4440  }

006a44f3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a4500  uint8_t CM_Communication::Event_SoulEmote(class AC1Legacy::PStringBase<char> const* arg1)

006a4500  {
006a4506      uint32_t eax = Proto_UI::GetNextUICounter();
006a451c      int32_t var_8 = 0x801ad4;
006a4524      void* var_c = nullptr;
006a452c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a453e      OrderHdr::Pack(&var_8, &var_c, 0);
006a4548      void* eax_2 = operator new[]((eax_1 + 0xc));
006a455a      var_c = eax_2;
006a4560      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a4569      *(uint32_t*)var_c = 0x1e1;
006a457a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a4584      var_c += 4;
006a4588      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a4594      class AC1Legacy::PStringBase<char>* ebx;
006a4594      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a4594      
006a459b      if (ebx == 0)
006a45a2          Proto_UI::UICounterFailedSend(eax);
006a45a2      
006a45ac      uint32_t eax_6;
006a45ac      eax_6 = ebx;
006a45b2      return eax_6;
006a4500  }

006a45b3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a45c0  uint8_t CM_Communication::Event_Talk(class AC1Legacy::PStringBase<char> const* arg1)

006a45c0  {
006a45c6      uint32_t eax = Proto_UI::GetNextUICounter();
006a45dc      int32_t var_8 = 0x801ad4;
006a45e4      void* var_c = nullptr;
006a45ec      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a45fe      OrderHdr::Pack(&var_8, &var_c, 0);
006a4608      void* eax_2 = operator new[]((eax_1 + 0xc));
006a461a      var_c = eax_2;
006a4620      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a4629      *(uint32_t*)var_c = 0x15;
006a463a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a4644      var_c += 4;
006a4648      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a4654      class AC1Legacy::PStringBase<char>* ebx;
006a4654      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a4654      
006a465b      if (ebx == 0)
006a4662          Proto_UI::UICounterFailedSend(eax);
006a4662      
006a466c      uint32_t eax_6;
006a466c      eax_6 = ebx;
006a4672      return eax_6;
006a45c0  }

006a4673                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a4680  uint8_t CM_Communication::Event_TalkDirect(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a4680  {
006a4686      uint32_t eax = Proto_UI::GetNextUICounter();
006a469c      int32_t var_8 = 0x801ad4;
006a46a4      void* var_c = nullptr;
006a46ac      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a46be      OrderHdr::Pack(&var_8, &var_c, 0);
006a46c8      void* eax_2 = operator new[]((eax_1 + 0x10));
006a46da      var_c = eax_2;
006a46e0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a46e9      *(uint32_t*)var_c = 0x32;
006a46fa      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0x10));
006a4704      var_c += 4;
006a4708      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a4715      *(uint32_t*)var_c = arg2;
006a471b      void* eax_8 = ((char*)var_c + 4);
006a471e      var_c = eax_8;
006a4722      void* eax_9 = (eax_8 & 0x80000003);
006a4722      bool cond:0 = eax_9 == 0;
006a4722      
006a4727      if (eax_9 < 0)
006a4727      {
006a472a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a472d          eax_9 = ((char*)eax_11 + 1);
006a472d          cond:0 = eax_11 == 0xffffffff;
006a4727      }
006a4727      
006a472e      if (!(cond:0))
006a472e      {
006a4735          void* i_1 = (4 - eax_9);
006a4735          
006a4737          if (4 != eax_9)
006a4737          {
006a4751              void* i;
006a4751              
006a4751              do
006a4751              {
006a4744                  *(uint8_t*)var_c = 0;
006a474c                  i = i_1;
006a474c                  i_1 -= 1;
006a474d                  var_c += 1;
006a4751              } while (i != 1);
006a4737          }
006a472e      }
006a472e      
006a475a      void* ebx;
006a475a      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a475a      
006a4761      if (ebx == 0)
006a4768          Proto_UI::UICounterFailedSend(eax);
006a4768      
006a4772      uint32_t eax_12;
006a4772      eax_12 = ebx;
006a4778      return eax_12;
006a4680  }

006a4779                                                                             90 90 90 90 90 90 90                           .......

006a4780  uint8_t CM_Communication::Event_TalkDirectByName(class AC1Legacy::PStringBase<char> const* arg1, class AC1Legacy::PStringBase<char> const* arg2)

006a4780  {
006a4787      uint32_t eax = Proto_UI::GetNextUICounter();
006a479d      int32_t var_8 = 0x801ad4;
006a47a5      void* var_c = nullptr;
006a47d1      uint32_t esi_1 = (AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0) + AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, 0));
006a47d3      OrderHdr::Pack(&var_8, &var_c, 0);
006a47dd      void* eax_3 = operator new[]((esi_1 + 0xc));
006a47e5      var_c = eax_3;
006a47f5      OrderHdr::Pack(&var_8, &var_c, (esi_1 + 0xc));
006a47fe      *(uint32_t*)var_c = 0x5d;
006a480f      uint32_t edx_2 = (((char*)eax_3 - ((char*)var_c + 4)) + (esi_1 + 0xc));
006a4811      var_c += 4;
006a481d      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, edx_2);
006a4834      AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, (((char*)eax_3 - var_c) + (esi_1 + 0xc)));
006a4840      class AC1Legacy::PStringBase<char>* ebx;
006a4840      ebx = Proto_UI::SendToWeenie(eax_3, (esi_1 + 0xc));
006a4840      
006a4847      if (ebx == 0)
006a484e          Proto_UI::UICounterFailedSend(eax);
006a484e      
006a4859      uint32_t eax_7;
006a4859      eax_7 = ebx;
006a485f      return eax_7;
006a4780  }


006a4860  uint32_t __thiscall PackableList<AC1Legacy::PStringBase<char> >::InsertTail(class PackableList<AC1Legacy::PStringBase<char> >* this, class AC1Legacy::PStringBase<char> const* arg2)

006a4860  {
006a486b      void* esi = operator new(0xc);
006a486b      
006a4872      if (esi == 0)
006a4896          esi = nullptr;
006a4872      else
006a4872      {
006a4878          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->m_buffer;
006a487a          *(uint32_t*)esi = m_buffer;
006a4880          InterlockedIncrement(&m_buffer->m_cRef);
006a4886          *(uint32_t*)((char*)esi + 4) = 0;
006a488d          *(uint32_t*)((char*)esi + 8) = 0;
006a4872      }
006a4872      
006a489d      if (this->head == 0)
006a489d      {
006a48a2          uint32_t eax_5 = (this->curNum + 1);
006a48a3          this->head = esi;
006a48a6          this->tail = esi;
006a48a9          this->curNum = eax_5;
006a48ae          return eax_5;
006a489d      }
006a489d      
006a48b1      class PackableLLNode<AC1Legacy::PStringBase<char> >* tail = this->tail;
006a48b4      tail->next = esi;
006a48b7      *(uint32_t*)((char*)esi + 8) = tail;
006a48bd      uint32_t eax_7 = (this->curNum + 1);
006a48be      this->tail = esi;
006a48c1      this->curNum = eax_7;
006a48c6      return eax_7;
006a4860  }

006a48c9                             90 90 90 90 90 90 90                                                           .......

006a48d0  uint32_t CM_Communication::DispatchUI_ChannelBroadcast(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a48d0  {
006a48e0      if ((arg1 == 0 || arg1->m_pCommunicationSystem == 0))
006a48e7          return 0;
006a48e7      
006a48ea      void* edi = arg2;
006a48ea      
006a48fa      if (*(uint32_t*)edi != 0x147)
006a4903          return 0;
006a4903      
006a4904      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a490a      uint32_t ebx = *(uint32_t*)((char*)edi + 4);
006a4913      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a491e      arg2 = ((char*)edi + 8);
006a4922      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a4938      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, &arg2, (((edi * 0) - 8) + arg3));
006a493d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4942      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
006a494a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
006a495c      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &arg2, (((char*)edi - arg2) + arg3));
006a4973      ClientCommunicationSystem::Handle_Communication__ChannelBroadcast(arg1->m_pCommunicationSystem, ebx, &AC1Legacy::PStringBase<char>::s_NullBuffer_4, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
006a4980      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
006a4980      
006a4992      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
006a4994          AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
006a4994      
006a499c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
006a499c      
006a49ac      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0))
006a49ae          AC1Legacy::PStringBase<char>::s_NullBuffer_6->vtable->__vecDelDtor(1);
006a49ae      
006a49bf      return 0;
006a48d0  }


006a49c0  uint32_t CM_Communication::DispatchUI_HearDirectSpeech(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a49c0  {
006a49c2      class UIQueueManager* ebp = arg1;
006a49c2      
006a49cf      if ((ebp == 0 || ebp->m_pCommunicationSystem == 0))
006a49d5          return 0;
006a49d5      
006a49d7      void* ebx = arg2;
006a49e3      bool cond:0 = *(uint32_t*)ebx == 0x2bd;
006a49e8      arg2 = ((char*)ebx + 4);
006a49e8      
006a49ec      if (!(cond:0))
006a49f4          return 0;
006a49f4      
006a49f5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4a09      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a4a1f      class AC1Legacy::PStringBase<char> __saved_ecx;
006a4a1f      AC1Legacy::PStringBase<char>::UnPack(&__saved_ecx, &arg2, (((ebx * 0) - 4) + arg3));
006a4a24      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4a29      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
006a4a31      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
006a4a43      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((char*)ebx - arg2) + arg3));
006a4a48      void* eax_10 = arg2;
006a4a70      ClientCommunicationSystem::Handle_Communication__HearDirectSpeech(ebp->m_pCommunicationSystem, &__saved_ecx, &arg1, *(uint32_t*)eax_10, *(uint32_t*)((char*)eax_10 + 4), *(uint32_t*)((char*)eax_10 + 8), *(uint32_t*)((char*)eax_10 + 0xc));
006a4a7d      class UIQueueManager* eax_15 = arg1;
006a4a7d      
006a4a8f      if ((InterlockedDecrement(&eax_15->m_cTurbineRefCount) == 0 && eax_15 != 0))
006a4a91          eax_15->vtable->IUnknown_QueryInterface(1);
006a4a91      
006a4aaa      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
006a4aac          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
006a4aac      
006a4aba      return 0;
006a49c0  }

006a4abb                                                                                   90 90 90 90 90                             .....

006a4ac0  uint32_t CM_Communication::DispatchUI_HearEmote(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a4ac0  {
006a4ad0      if ((arg1 == 0 || arg1->m_pCommunicationSystem == 0))
006a4ad7          return 0;
006a4ad7      
006a4ada      void* edi = arg2;
006a4ada      
006a4aea      if (*(uint32_t*)edi != 0x1e0)
006a4af3          return 0;
006a4af3      
006a4af4      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4afa      uint32_t ebx = *(uint32_t*)((char*)edi + 4);
006a4b03      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a4b0e      arg2 = ((char*)edi + 8);
006a4b12      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a4b28      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, &arg2, (((edi * 0) - 8) + arg3));
006a4b2d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4b32      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
006a4b3a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
006a4b4c      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &arg2, (((char*)edi - arg2) + arg3));
006a4b63      uint32_t result = ClientCommunicationSystem::Handle_Communication__HearEmote(arg1->m_pCommunicationSystem, ebx, &AC1Legacy::PStringBase<char>::s_NullBuffer_4, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
006a4b70      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
006a4b70      
006a4b82      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
006a4b84          AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
006a4b84      
006a4b8c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
006a4b8c      
006a4b9c      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0))
006a4b9e          AC1Legacy::PStringBase<char>::s_NullBuffer_6->vtable->__vecDelDtor(1);
006a4b9e      
006a4baf      return result;
006a4ac0  }


006a4bb0  uint32_t CM_Communication::DispatchUI_HearRangedSpeech(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a4bb0  {
006a4bb4      class UIQueueManager* ebp = arg1;
006a4bb4      
006a4bc1      if ((ebp == 0 || ebp->m_pCommunicationSystem == 0))
006a4bc9          return 0;
006a4bc9      
006a4bcb      void* ebx = arg2;
006a4bd7      bool cond:0 = *(uint32_t*)ebx == 0x2bc;
006a4bdc      arg2 = ((char*)ebx + 4);
006a4bdc      
006a4be0      if (!(cond:0))
006a4bea          return 0;
006a4bea      
006a4beb      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4bf7      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a4bff      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a4c15      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &arg2, (((ebx * 0) - 4) + arg3));
006a4c1a      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4c1f      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
006a4c27      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
006a4c39      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((char*)ebx - arg2) + arg3));
006a4c3e      void* eax_10 = arg2;
006a4c44      float edx = *(uint32_t*)((char*)eax_10 + 4);
006a4c58      float var_4 = edx;
006a4c65      ClientCommunicationSystem::Handle_Communication__HearRangedSpeech(ebp->m_pCommunicationSystem, &AC1Legacy::PStringBase<char>::s_NullBuffer_3, &arg1, *(uint32_t*)eax_10, edx, *(uint32_t*)((char*)eax_10 + 8));
006a4c72      class UIQueueManager* eax_15 = arg1;
006a4c72      
006a4c84      if ((InterlockedDecrement(&eax_15->m_cTurbineRefCount) == 0 && eax_15 != 0))
006a4c86          eax_15->vtable->IUnknown_QueryInterface(1);
006a4c86      
006a4c8e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
006a4c8e      
006a4c9f      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_4 != 0))
006a4ca1          AC1Legacy::PStringBase<char>::s_NullBuffer_4->vtable->__vecDelDtor(1);
006a4ca1      
006a4cb1      return 0;
006a4bb0  }

006a4cb2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a4cc0  uint32_t CM_Communication::DispatchUI_HearSoulEmote(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a4cc0  {
006a4cd0      if ((arg1 == 0 || arg1->m_pCommunicationSystem == 0))
006a4cd7          return 0;
006a4cd7      
006a4cda      void* edi = arg2;
006a4cda      
006a4cea      if (*(uint32_t*)edi != 0x1e2)
006a4cf3          return 0;
006a4cf3      
006a4cf4      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4cfa      uint32_t ebx = *(uint32_t*)((char*)edi + 4);
006a4d03      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a4d0e      arg2 = ((char*)edi + 8);
006a4d12      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a4d28      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_4, &arg2, (((edi * 0) - 8) + arg3));
006a4d2d      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4d32      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
006a4d3a      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
006a4d4c      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_3, &arg2, (((char*)edi - arg2) + arg3));
006a4d63      uint32_t result = ClientCommunicationSystem::Handle_Communication__HearSoulEmote(arg1->m_pCommunicationSystem, ebx, &AC1Legacy::PStringBase<char>::s_NullBuffer_4, &AC1Legacy::PStringBase<char>::s_NullBuffer_3);
006a4d70      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
006a4d70      
006a4d82      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_5 != 0))
006a4d84          AC1Legacy::PStringBase<char>::s_NullBuffer_5->vtable->__vecDelDtor(1);
006a4d84      
006a4d8c      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
006a4d8c      
006a4d9c      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_6->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_6 != 0))
006a4d9e          AC1Legacy::PStringBase<char>::s_NullBuffer_6->vtable->__vecDelDtor(1);
006a4d9e      
006a4daf      return result;
006a4cc0  }


006a4db0  uint32_t CM_Communication::DispatchUI_HearSpeech(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a4db0  {
006a4db2      class UIQueueManager* ebp = arg1;
006a4db2      
006a4dbf      if ((ebp == 0 || ebp->m_pCommunicationSystem == 0))
006a4dc5          return 0;
006a4dc5      
006a4dc7      void* ebx = arg2;
006a4dd3      bool cond:0 = *(uint32_t*)ebx == 0x2bb;
006a4dd8      arg2 = ((char*)ebx + 4);
006a4dd8      
006a4ddc      if (!(cond:0))
006a4de4          return 0;
006a4de4      
006a4de5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4df9      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a4e0f      class AC1Legacy::PStringBase<char> __saved_ecx;
006a4e0f      AC1Legacy::PStringBase<char>::UnPack(&__saved_ecx, &arg2, (((ebx * 0) - 4) + arg3));
006a4e14      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4e19      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
006a4e21      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
006a4e33      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((char*)ebx - arg2) + arg3));
006a4e38      void* eax_10 = arg2;
006a4e52      ClientCommunicationSystem::Handle_Communication__HearSpeech(ebp->m_pCommunicationSystem, &__saved_ecx, &arg1, *(uint32_t*)eax_10, *(uint32_t*)((char*)eax_10 + 4));
006a4e5f      class UIQueueManager* eax_13 = arg1;
006a4e5f      
006a4e71      if ((InterlockedDecrement(&eax_13->m_cTurbineRefCount) == 0 && eax_13 != 0))
006a4e73          eax_13->vtable->IUnknown_QueryInterface(1);
006a4e73      
006a4e8c      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
006a4e8e          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
006a4e8e      
006a4e9c      return 0;
006a4db0  }

006a4e9d                                                                                         90 90 90                               ...

006a4ea0  uint32_t CM_Communication::DispatchUI_PopUpString(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a4ea0  {
006a4ea1      class UIQueueManager* ebx = arg1;
006a4ea1      
006a4eae      if ((ebx == 0 || ebx->m_pCommunicationSystem == 0))
006a4eb3          return 0;
006a4eb3      
006a4eb6      void* edi = arg2;
006a4ec1      bool cond:0 = *(uint32_t*)edi == 4;
006a4ec4      arg2 = ((char*)edi + 4);
006a4ec4      
006a4ec8      if (!(cond:0))
006a4ecf          return 0;
006a4ecf      
006a4ed0      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4ed5      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a4edd      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a4ef5      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((edi * 0) - 4) + arg3));
006a4f02      ClientCommunicationSystem::Handle_Communication__PopUpString(ebx->m_pCommunicationSystem, &arg1);
006a4f09      class UIQueueManager* eax_6 = arg1;
006a4f09      
006a4f1f      if ((InterlockedDecrement(&eax_6->m_cTurbineRefCount) == 0 && eax_6 != 0))
006a4f21          eax_6->vtable->IUnknown_QueryInterface(1);
006a4f21      
006a4f2e      return 0;
006a4ea0  }

006a4f2f                                               90                                                                 .

006a4f30  uint32_t CM_Communication::DispatchUI_TextboxString(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a4f30  {
006a4f31      class UIQueueManager* ebx = arg1;
006a4f31      
006a4f3e      if ((ebx == 0 || ebx->m_pCommunicationSystem == 0))
006a4f43          return 0;
006a4f43      
006a4f46      void* edi = arg2;
006a4f51      bool cond:0 = *(uint32_t*)edi == 0xf7e0;
006a4f56      arg2 = ((char*)edi + 4);
006a4f56      
006a4f5a      if (!(cond:0))
006a4f61          return 0;
006a4f61      
006a4f62      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a4f67      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a4f6f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a4f85      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((edi * 0) - 4) + arg3));
006a4f99      ClientCommunicationSystem::Handle_Communication__TextboxString(ebx->m_pCommunicationSystem, &arg1, *(uint32_t*)arg2);
006a4fa0      class UIQueueManager* eax_7 = arg1;
006a4fa0      
006a4fb6      if ((InterlockedDecrement(&eax_7->m_cTurbineRefCount) == 0 && eax_7 != 0))
006a4fb8          eax_7->vtable->IUnknown_QueryInterface(1);
006a4fb8      
006a4fc5      return 0;
006a4f30  }

006a4fc6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a4fd0  uint32_t CM_Communication::DispatchUI_TransientString(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a4fd0  {
006a4fd1      class UIQueueManager* ebx = arg1;
006a4fd1      
006a4fde      if ((ebx == 0 || ebx->m_pCommunicationSystem == 0))
006a4fe3          return 0;
006a4fe3      
006a4fe6      void* edi = arg2;
006a4ff1      bool cond:0 = *(uint32_t*)edi == 0x2eb;
006a4ff6      arg2 = ((char*)edi + 4);
006a4ff6      
006a4ffa      if (!(cond:0))
006a5001          return 0;
006a5001      
006a5002      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a5007      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a500f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a5027      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((edi * 0) - 4) + arg3));
006a5034      ClientCommunicationSystem::Handle_Communication__TransientString(ebx->m_pCommunicationSystem, &arg1);
006a503b      class UIQueueManager* eax_6 = arg1;
006a503b      
006a5051      if ((InterlockedDecrement(&eax_6->m_cTurbineRefCount) == 0 && eax_6 != 0))
006a5053          eax_6->vtable->IUnknown_QueryInterface(1);
006a5053      
006a5060      return 0;
006a4fd0  }

006a5061     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006a5070  uint32_t CM_Communication::DispatchUI_WeenieErrorWithString(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5070  {
006a5071      class UIQueueManager* ebp = arg1;
006a5071      
006a507e      if ((ebp == 0 || ebp->m_pCommunicationSystem == 0))
006a5083          return 0;
006a5083      
006a5086      void* edi = arg2;
006a5086      
006a5096      if (*(uint32_t*)edi != 0x28b)
006a509d          return 0;
006a509d      
006a509e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a50a4      uint32_t ebx = *(uint32_t*)((char*)edi + 4);
006a50a6      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a50b1      arg2 = ((char*)edi + 8);
006a50b5      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a50cb      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((edi * 0) - 8) + arg3));
006a50d9      ClientCommunicationSystem::Handle_Communication__WeenieErrorWithString(ebp->m_pCommunicationSystem, ebx, &arg1);
006a50e0      class UIQueueManager* eax_6 = arg1;
006a50e0      
006a50f7      if ((InterlockedDecrement(&eax_6->m_cTurbineRefCount) == 0 && eax_6 != 0))
006a50f9          eax_6->vtable->IUnknown_QueryInterface(1);
006a50f9      
006a5106      return 0;
006a5070  }

006a5107                       90 90 90 90 90 90 90 90 90                                                         .........

006a5110  uint32_t __thiscall PackableList<AC1Legacy::PStringBase<char> >::Pack(class PackableList<AC1Legacy::PStringBase<char> >* this, void** arg2, uint32_t arg3)

006a5110  {
006a5115      uint32_t result = PackableList<AC1Legacy::PStringBase<char> >::pack_size(this);
006a5115      
006a5122      if (arg3 >= result)
006a5122      {
006a512c          if (arg3 >= 4)
006a512c          {
006a5133              **(uint32_t**)arg2 = this->curNum;
006a5135              *(uint32_t*)arg2 += 4;
006a512c          }
006a512c          
006a513d          for (class PackableLLNode<AC1Legacy::PStringBase<char> >* i = this->head; i != 0; i = i->next)
006a5144              AC1Legacy::PStringBase<char>::Pack(i, arg2, arg3);
006a5122      }
006a5122      
006a5156      return result;
006a5110  }

006a5159                                                                             90 90 90 90 90 90 90                           .......

006a5160  uint32_t __fastcall PackableList<AC1Legacy::PStringBase<char> >::pack_size(class PackableList<AC1Legacy::PStringBase<char> >* this)

006a5160  {
006a5160      class PackableList<AC1Legacy::PStringBase<char> >* this_1 = this;
006a5162      class PackableLLNode<AC1Legacy::PStringBase<char> >* i = this->head;
006a5168      int32_t result = 4;
006a516d      this_1 = nullptr;
006a516d      
006a5175      while (i != 0)
006a5175      {
006a5180          uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(i, &this_1, 0);
006a5185          i = i->next;
006a5188          result += eax_1;
006a5175      }
006a5175      
006a5193      return result;
006a5160  }

006a5194                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006a51a0  int32_t __thiscall PackableList<AC1Legacy::PStringBase<char> >::RemoveHead(class PackableList<AC1Legacy::PStringBase<char> >* this, class AC1Legacy::PStringBase<char>* arg2)

006a51a0  {
006a51a4      class PackableLLNode<AC1Legacy::PStringBase<char> >* head = this->head;
006a51a4      
006a51ab      if (head == 0)
006a51b1          return 0;
006a51b1      
006a51b4      class PackableLLNode<AC1Legacy::PStringBase<char> >* next = head->next;
006a51b9      this->head = next;
006a51b9      
006a51bc      if (next == 0)
006a51c3          this->tail = nullptr;
006a51bc      else
006a51be          next->prev = nullptr;
006a51be      
006a51ce      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = arg2->m_buffer;
006a51ce      
006a51d3      if (m_buffer_1 != head->data.m_buffer)
006a51d3      {
006a51e5          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
006a51e7              m_buffer_1->vtable->__vecDelDtor(1);
006a51e7          
006a51ef          class AC1Legacy::PSRefBuffer<char>* m_buffer = head->data.m_buffer;
006a51f1          arg2->m_buffer = m_buffer;
006a51f8          InterlockedIncrement(&m_buffer->m_cRef);
006a51d3      }
006a51d3      
006a51fe      class AC1Legacy::PSRefBuffer<char>* m_buffer_2 = head->data.m_buffer;
006a51fe      
006a5210      if ((InterlockedDecrement(&m_buffer_2->m_cRef) == 0 && m_buffer_2 != 0))
006a5212          m_buffer_2->vtable->__vecDelDtor(1);
006a5212      
006a521b      operator delete(head);
006a5229      this->curNum -= 1;
006a5233      return 1;
006a51a0  }

006a5236                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a5240  void __fastcall PackableList<AC1Legacy::PStringBase<char> >::Flush(class PackableList<AC1Legacy::PStringBase<char> >* this)

006a5240  {
006a5240      class PackableList<AC1Legacy::PStringBase<char> >* var_4 = this;
006a5243      class PackableList<AC1Legacy::PStringBase<char> >* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a524f      var_4 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a5253      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->head);
006a5253      
006a525e      if (this->head != 0)
006a525e      {
006a5271          do
006a5267              PackableList<AC1Legacy::PStringBase<char> >::RemoveHead(this, &var_4);
006a5271           while (this->head != 0);
006a5271          
006a5273          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = var_4;
006a525e      }
006a525e      
006a5287      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->head) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
006a5289          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
006a5240  }

006a5295                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006a52a0  int32_t __thiscall PackableList<AC1Legacy::PStringBase<char> >::UnPack(class PackableList<AC1Legacy::PStringBase<char> >* this, void** arg2, uint32_t arg3)

006a52a0  {
006a52a0      class PackableList<AC1Legacy::PStringBase<char> >* this_1 = this;
006a52a5      PackableList<AC1Legacy::PStringBase<char> >::Flush(this);
006a52a5      
006a52af      if (arg3 < 4)
006a5336          return 0;
006a5336      
006a52b7      void** ebp = arg2;
006a52bb      void* eax = *(uint32_t*)ebp;
006a52be      int32_t ebx = *(uint32_t*)eax;
006a52c4      *(uint32_t*)ebp = ((char*)eax + 4);
006a52c7      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006a52d2      arg2 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006a52d6      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006a52dc      int32_t edi = 0;
006a52dc      
006a52e0      if (ebx > 0)
006a52e0      {
006a5306          do
006a5306          {
006a52f3              if (AC1Legacy::PStringBase<char>::UnPack(&arg2, ebp, arg3) == 0)
006a52f3              {
006a5339                  void** esi = arg2;
006a5339                  
006a534d                  if ((InterlockedDecrement(&esi[1]) == 0 && esi != 0))
006a5355                      **(uint32_t**)esi(1);
006a5355                  
006a535e                  return 0;
006a52f3              }
006a52f3              
006a52fe              PackableList<AC1Legacy::PStringBase<char> >::InsertTail(this, &arg2);
006a5303              edi += 1;
006a5306          } while (edi < ebx);
006a5306          
006a5308          AC1Legacy::PStringBase<char>::s_NullBuffer_1 = arg2;
006a52e0      }
006a52e0      
006a531c      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
006a531e          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
006a531e      
006a5330      return 1;
006a52a0  }

006a5361     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006a5370  void* __thiscall PackableList<AC1Legacy::PStringBase<char> >::`scalar deleting destructor'(class PackableList<AC1Legacy::PStringBase<char> >* this, uint32_t arg2)

006a5370  {
006a5373      this->vtable = &PackableList<class AC1Legacy::PStringBase<char> >::`vftable';
006a5379      PackableList<AC1Legacy::PStringBase<char> >::Flush(this);
006a5383      this->vtable = 0x79285c;
006a5383      
006a5389      if ((arg2 & 1) != 0)
006a538c          operator delete(this);
006a538c      
006a5397      return this;
006a5370  }

006a539a                                                                                90 90 90 90 90 90                            ......

006a53a0  uint32_t CM_Communication::DispatchUI_ChannelIndex(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a53a0  {
006a53b1      if ((arg1 == 0 || arg1->m_pCommunicationSystem == 0))
006a53b9          return 0;
006a53b9      
006a53ba      void* ecx = arg2;
006a53c6      bool cond:0 = *(uint32_t*)ecx == 0x149;
006a53cc      arg2 = ((char*)ecx + 4);
006a53cc      
006a53d0      if (!(cond:0))
006a53d9          return 0;
006a53d9      
006a53ef      struct PackableList<AC1Legacy::PStringBase<char> >::VTable* const var_10 = &PackableList<class AC1Legacy::PStringBase<char> >::`vftable';
006a53f3      int32_t var_c = 0;
006a53f7      int32_t var_8 = 0;
006a53fb      int32_t var_4 = 0;
006a53ff      class PackableList<AC1Legacy::PStringBase<char> >* edx = PackableList<AC1Legacy::PStringBase<char> >::UnPack(&var_10, &arg2, (((ecx * 0) - 4) + arg3));
006a5408      struct PackableList<AC1Legacy::PStringBase<char> >::VTable* const* var_1c_1 = &var_10;
006a540c      ClientCommunicationSystem::Handle_Communication__ChannelIndex(arg1->m_pCommunicationSystem, edx);
006a5417      var_10 = &PackableList<class AC1Legacy::PStringBase<char> >::`vftable';
006a541b      PackableList<AC1Legacy::PStringBase<char> >::Flush(&var_10);
006a5427      return 0;
006a53a0  }

006a5428                          90 90 90 90 90 90 90 90                                                          ........

006a5430  uint32_t CM_Communication::DispatchUI_ChannelList(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5430  {
006a5441      if ((arg1 == 0 || arg1->m_pCommunicationSystem == 0))
006a5449          return 0;
006a5449      
006a544a      void* ecx = arg2;
006a5456      bool cond:0 = *(uint32_t*)ecx == 0x148;
006a545c      arg2 = ((char*)ecx + 4);
006a545c      
006a5460      if (!(cond:0))
006a5469          return 0;
006a5469      
006a547f      struct PackableList<AC1Legacy::PStringBase<char> >::VTable* const var_10 = &PackableList<class AC1Legacy::PStringBase<char> >::`vftable';
006a5483      int32_t var_c = 0;
006a5487      int32_t var_8 = 0;
006a548b      int32_t var_4 = 0;
006a548f      class PackableList<AC1Legacy::PStringBase<char> >* edx = PackableList<AC1Legacy::PStringBase<char> >::UnPack(&var_10, &arg2, (((ecx * 0) - 4) + arg3));
006a5498      struct PackableList<AC1Legacy::PStringBase<char> >::VTable* const* var_1c_1 = &var_10;
006a549c      ClientCommunicationSystem::Handle_Communication__ChannelList(arg1->m_pCommunicationSystem, edx);
006a54a7      var_10 = &PackableList<class AC1Legacy::PStringBase<char> >::`vftable';
006a54ab      PackableList<AC1Legacy::PStringBase<char> >::Flush(&var_10);
006a54b7      return 0;
006a5430  }

006a54b8                                                                          90 90 90 90 90 90 90 90                          ........

006a54c0  uint32_t CM_Social::DispatchUI_AddOrSetCharacterTitle(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a54c0  {
006a54c6      if (arg1 != 0)
006a54c6      {
006a54c8          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a54c8          
006a54db          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x2b))
006a54e7              ClientUISystem::Handle_Social__AddOrSetCharacterTitle(m_pUISystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006a54c6      }
006a54c6      
006a54df      return 0;
006a54c0  }

006a54ed                                         90 90 90                                                               ...

006a54f0  uint8_t CM_Social::Event_AbandonContract(uint32_t arg1)

006a54f0  {
006a54f6      uint32_t eax = Proto_UI::GetNextUICounter();
006a550a      int32_t var_8 = 0x801ad4;
006a5512      void* var_c = nullptr;
006a551a      OrderHdr::Pack(&var_8, &var_c, 0);
006a5525      void* eax_1 = operator new[](0x10);
006a5537      var_c = eax_1;
006a553d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a554a      *(uint32_t*)var_c = 0x316;
006a5554      uint32_t* eax_3 = ((char*)var_c + 4);
006a5557      var_c = eax_3;
006a555b      *(uint32_t*)eax_3 = arg1;
006a5561      void* eax_5 = ((char*)var_c + 4);
006a5564      var_c = eax_5;
006a5568      void* eax_6 = (eax_5 & 0x80000003);
006a5568      bool cond:0 = eax_6 == 0;
006a5568      
006a556d      if (eax_6 < 0)
006a556d      {
006a5570          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a5573          eax_6 = ((char*)eax_8 + 1);
006a5573          cond:0 = eax_8 == 0xffffffff;
006a556d      }
006a556d      
006a5574      if (!(cond:0))
006a5574      {
006a557b          void* i_1 = (4 - eax_6);
006a557b          
006a557d          if (4 != eax_6)
006a557d          {
006a5591              void* i;
006a5591              
006a5591              do
006a5591              {
006a5584                  *(uint8_t*)var_c = 0;
006a558c                  i = i_1;
006a558c                  i_1 -= 1;
006a558d                  var_c += 1;
006a5591              } while (i != 1);
006a557d          }
006a5574      }
006a5574      
006a559a      int32_t ebx;
006a559a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a559a      
006a55a1      if (ebx == 0)
006a55a8          Proto_UI::UICounterFailedSend(eax);
006a55a8      
006a55b2      uint32_t eax_9;
006a55b2      eax_9 = ebx;
006a55b8      return eax_9;
006a54f0  }

006a55b9                                                                             90 90 90 90 90 90 90                           .......

006a55c0  uint8_t CM_Social::Event_ClearFriends()

006a55c0  {
006a55c6      uint32_t eax = Proto_UI::GetNextUICounter();
006a55da      int32_t var_8 = 0x801ad4;
006a55e2      void* var_c = nullptr;
006a55ea      OrderHdr::Pack(&var_8, &var_c, 0);
006a55f5      void* eax_1 = operator new[](0xc);
006a5607      var_c = eax_1;
006a560d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a5616      *(uint32_t*)var_c = 0x25;
006a5625      var_c += 4;
006a562e      int32_t ebx;
006a562e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a562e      
006a5635      if (ebx == 0)
006a563c          Proto_UI::UICounterFailedSend(eax);
006a563c      
006a5646      uint32_t eax_4;
006a5646      eax_4 = ebx;
006a564c      return eax_4;
006a55c0  }

006a564d                                         90 90 90                                                               ...

006a5650  uint8_t CM_Social::Event_RemoveFriend(uint32_t arg1)

006a5650  {
006a5656      uint32_t eax = Proto_UI::GetNextUICounter();
006a566a      int32_t var_8 = 0x801ad4;
006a5672      void* var_c = nullptr;
006a567a      OrderHdr::Pack(&var_8, &var_c, 0);
006a5685      void* eax_1 = operator new[](0x10);
006a5697      var_c = eax_1;
006a569d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a56aa      *(uint32_t*)var_c = 0x17;
006a56b4      uint32_t* eax_3 = ((char*)var_c + 4);
006a56b7      var_c = eax_3;
006a56bb      *(uint32_t*)eax_3 = arg1;
006a56c1      void* eax_5 = ((char*)var_c + 4);
006a56c4      var_c = eax_5;
006a56c8      void* eax_6 = (eax_5 & 0x80000003);
006a56c8      bool cond:0 = eax_6 == 0;
006a56c8      
006a56cd      if (eax_6 < 0)
006a56cd      {
006a56d0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a56d3          eax_6 = ((char*)eax_8 + 1);
006a56d3          cond:0 = eax_8 == 0xffffffff;
006a56cd      }
006a56cd      
006a56d4      if (!(cond:0))
006a56d4      {
006a56db          void* i_1 = (4 - eax_6);
006a56db          
006a56dd          if (4 != eax_6)
006a56dd          {
006a56f1              void* i;
006a56f1              
006a56f1              do
006a56f1              {
006a56e4                  *(uint8_t*)var_c = 0;
006a56ec                  i = i_1;
006a56ec                  i_1 -= 1;
006a56ed                  var_c += 1;
006a56f1              } while (i != 1);
006a56dd          }
006a56d4      }
006a56d4      
006a56fa      int32_t ebx;
006a56fa      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a56fa      
006a5701      if (ebx == 0)
006a5708          Proto_UI::UICounterFailedSend(eax);
006a5708      
006a5712      uint32_t eax_9;
006a5712      eax_9 = ebx;
006a5718      return eax_9;
006a5650  }

006a5719                                                                             90 90 90 90 90 90 90                           .......

006a5720  uint8_t CM_Social::Event_SetDisplayCharacterTitle(uint32_t arg1)

006a5720  {
006a5726      uint32_t eax = Proto_UI::GetNextUICounter();
006a573a      int32_t var_8 = 0x801ad4;
006a5742      void* var_c = nullptr;
006a574a      OrderHdr::Pack(&var_8, &var_c, 0);
006a5755      void* eax_1 = operator new[](0x10);
006a5767      var_c = eax_1;
006a576d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a577a      *(uint32_t*)var_c = 0x2c;
006a5784      uint32_t* eax_3 = ((char*)var_c + 4);
006a5787      var_c = eax_3;
006a578b      *(uint32_t*)eax_3 = arg1;
006a5791      void* eax_5 = ((char*)var_c + 4);
006a5794      var_c = eax_5;
006a5798      void* eax_6 = (eax_5 & 0x80000003);
006a5798      bool cond:0 = eax_6 == 0;
006a5798      
006a579d      if (eax_6 < 0)
006a579d      {
006a57a0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a57a3          eax_6 = ((char*)eax_8 + 1);
006a57a3          cond:0 = eax_8 == 0xffffffff;
006a579d      }
006a579d      
006a57a4      if (!(cond:0))
006a57a4      {
006a57ab          void* i_1 = (4 - eax_6);
006a57ab          
006a57ad          if (4 != eax_6)
006a57ad          {
006a57c1              void* i;
006a57c1              
006a57c1              do
006a57c1              {
006a57b4                  *(uint8_t*)var_c = 0;
006a57bc                  i = i_1;
006a57bc                  i_1 -= 1;
006a57bd                  var_c += 1;
006a57c1              } while (i != 1);
006a57ad          }
006a57a4      }
006a57a4      
006a57ca      int32_t ebx;
006a57ca      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a57ca      
006a57d1      if (ebx == 0)
006a57d8          Proto_UI::UICounterFailedSend(eax);
006a57d8      
006a57e2      uint32_t eax_9;
006a57e2      eax_9 = ebx;
006a57e8      return eax_9;
006a5720  }

006a57e9                             90 90 90 90 90 90 90                                                           .......

006a57f0  uint32_t CM_Social::DispatchUI_SendClientContractTracker(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a57f0  {
006a5801      if ((arg1 == 0 || arg1->m_pUISystem == 0))
006a5809          return 0;
006a5809      
006a580a      void* eax_3 = arg2;
006a5816      bool cond:0 = *(uint32_t*)eax_3 == 0x315;
006a581c      arg2 = ((char*)eax_3 + 4);
006a581c      
006a5820      if (!(cond:0))
006a5829          return 0;
006a5829      
006a582e      void var_28;
006a582e      CContractTracker::CContractTracker(&var_28);
006a5849      CContractTracker::UnPack(&var_28, &arg2, (((char*)eax_3 - arg2) + arg3));
006a584e      void* eax_6 = arg2;
006a5852      int32_t ecx_4 = *(uint32_t*)eax_6;
006a5857      arg2 = ((char*)eax_6 + 4);
006a585b      int32_t edx_1 = *(uint32_t*)((char*)eax_6 + 4);
006a5867      class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a586a      arg2 = ((char*)eax_6 + 8);
006a586e      ClientUISystem::Handle_Social__SendClientContractTracker(m_pUISystem, &var_28, ecx_4, edx_1);
006a5878      return 0;
006a57f0  }

006a5879                                                                             90 90 90 90 90 90 90                           .......

006a5880  uint8_t CM_Social::SendNotice_AddCharacterTitle(uint32_t arg1)

006a5880  {
006a588e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd279);
006a588e      
006a5893      if (eax != 0)
006a5893      {
006a5896          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5896          
006a589b          while (i != 0)
006a589b          {
006a58a3              int32_t* edi_1 = *(uint32_t*)i;
006a58a7              i = i[1];
006a58a7              
006a58aa              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a58bb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1b8)(arg1);
006a589b          }
006a5893      }
006a5893      
006a58c8      eax = 1;
006a58ca      return 1;
006a5880  }

006a58cb                                   90 90 90 90 90                                                             .....

006a58d0  uint8_t CM_Social::SendNotice_ChatCommand_AddFriend(class PStringBase<char> const* arg1)

006a58d0  {
006a58de      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd272);
006a58de      
006a58e3      if (eax != 0)
006a58e3      {
006a58e6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a58e6          
006a58eb          while (i != 0)
006a58eb          {
006a58f3              int32_t* edi_1 = *(uint32_t*)i;
006a58f7              i = i[1];
006a58f7              
006a58fa              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a590b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1bc)(arg1);
006a58eb          }
006a58e3      }
006a58e3      
006a5918      eax = 1;
006a591a      return 1;
006a58d0  }

006a591b                                                                                   90 90 90 90 90                             .....

006a5920  uint8_t CM_Social::SendNotice_ChatCommand_DisplayFriends(uint8_t arg1)

006a5920  {
006a592e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd273);
006a592e      
006a5933      if (eax != 0)
006a5933      {
006a5936          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5936          
006a593b          while (i != 0)
006a593b          {
006a5943              int32_t* edi_1 = *(uint32_t*)i;
006a5947              i = i[1];
006a5947              
006a594a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a595b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1c0)(arg1);
006a593b          }
006a5933      }
006a5933      
006a5968      eax = 1;
006a596a      return 1;
006a5920  }

006a596b                                   90 90 90 90 90                                                             .....

006a5970  uint8_t CM_Social::SendNotice_ChatCommand_RemoveAllFriends()

006a5970  {
006a597e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd275);
006a597e      
006a5983      if (eax != 0)
006a5983      {
006a5986          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5986          
006a598b          if (i != 0)
006a598b          {
006a598d              int32_t edi;
006a598d              int32_t var_8_1 = edi;
006a598d              
006a59af              do
006a59af              {
006a5990                  int32_t* edi_2 = *(uint32_t*)i;
006a5994                  i = i[1];
006a5994                  
006a5997                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a59a7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x1c4)();
006a59af              } while (i != 0);
006a598b          }
006a5983      }
006a5983      
006a59b3      eax = 1;
006a59b5      return 1;
006a5970  }

006a59b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a59c0  uint8_t CM_Social::SendNotice_ChatCommand_RemoveFriend(class PStringBase<char> const* arg1)

006a59c0  {
006a59ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd274);
006a59ce      
006a59d3      if (eax != 0)
006a59d3      {
006a59d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a59d6          
006a59db          while (i != 0)
006a59db          {
006a59e3              int32_t* edi_1 = *(uint32_t*)i;
006a59e7              i = i[1];
006a59e7              
006a59ea              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a59fb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1c8)(arg1);
006a59db          }
006a59d3      }
006a59d3      
006a5a08      eax = 1;
006a5a0a      return 1;
006a59c0  }

006a5a0b                                   90 90 90 90 90                                                             .....

006a5a10  uint8_t CM_Social::SendNotice_SetDisplayCharacterTitle(uint32_t arg1)

006a5a10  {
006a5a1e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd278);
006a5a1e      
006a5a23      if (eax != 0)
006a5a23      {
006a5a26          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5a26          
006a5a2b          while (i != 0)
006a5a2b          {
006a5a33              int32_t* edi_1 = *(uint32_t*)i;
006a5a37              i = i[1];
006a5a37              
006a5a3a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a5a4b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1cc)(arg1);
006a5a2b          }
006a5a23      }
006a5a23      
006a5a58      eax = 1;
006a5a5a      return 1;
006a5a10  }

006a5a5b                                                                                   90 90 90 90 90                             .....

006a5a60  uint8_t CM_Social::SendNotice_SetDisplayContractTracker(class CContractTracker const* arg1)

006a5a60  {
006a5a6e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd27f);
006a5a6e      
006a5a73      if (eax != 0)
006a5a73      {
006a5a76          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5a76          
006a5a7b          while (i != 0)
006a5a7b          {
006a5a83              int32_t* edi_1 = *(uint32_t*)i;
006a5a87              i = i[1];
006a5a87              
006a5a8a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a5a9b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1d0)(arg1);
006a5a7b          }
006a5a73      }
006a5a73      
006a5aa8      eax = 1;
006a5aaa      return 1;
006a5a60  }

006a5aab                                   90 90 90 90 90                                                             .....

006a5ab0  uint8_t CM_Social::SendNotice_UpdateCharacterTitleTable(class CharacterTitleTable const* arg1)

006a5ab0  {
006a5abe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd277);
006a5abe      
006a5ac3      if (eax != 0)
006a5ac3      {
006a5ac6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5ac6          
006a5acb          while (i != 0)
006a5acb          {
006a5ad3              int32_t* edi_1 = *(uint32_t*)i;
006a5ad7              i = i[1];
006a5ad7              
006a5ada              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a5aeb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1d4)(arg1);
006a5acb          }
006a5ac3      }
006a5ac3      
006a5af8      eax = 1;
006a5afa      return 1;
006a5ab0  }

006a5afb                                                                                   90 90 90 90 90                             .....

006a5b00  uint8_t CM_Social::SendNotice_UpdateContractTracker(class CContractTracker const* arg1, int32_t arg2)

006a5b00  {
006a5b0e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd282);
006a5b0e      
006a5b13      if (eax != 0)
006a5b13      {
006a5b16          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5b16          
006a5b1b          while (i != 0)
006a5b1b          {
006a5b28              int32_t* esi_1 = *(uint32_t*)i;
006a5b2c              i = i[1];
006a5b2c              
006a5b2f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a5b41                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x1d8)(arg1, arg2);
006a5b1b          }
006a5b13      }
006a5b13      
006a5b4f      eax = 1;
006a5b51      return 1;
006a5b00  }

006a5b52                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a5b60  uint8_t CM_Social::SendNotice_UpdateContractTrackerTable(class CContractTrackerTable const* arg1)

006a5b60  {
006a5b6e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd281);
006a5b6e      
006a5b73      if (eax != 0)
006a5b73      {
006a5b76          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5b76          
006a5b7b          while (i != 0)
006a5b7b          {
006a5b83              int32_t* edi_1 = *(uint32_t*)i;
006a5b87              i = i[1];
006a5b87              
006a5b8a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a5b9b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1dc)(arg1);
006a5b7b          }
006a5b73      }
006a5b73      
006a5ba8      eax = 1;
006a5baa      return 1;
006a5b60  }

006a5bab                                   90 90 90 90 90                                                             .....

006a5bb0  uint8_t CM_Social::SendNotice_UpdateFriendsList(class FriendDataList const* arg1, int32_t arg2)

006a5bb0  {
006a5bbe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd26f);
006a5bbe      
006a5bc3      if (eax != 0)
006a5bc3      {
006a5bc6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a5bc6          
006a5bcb          while (i != 0)
006a5bcb          {
006a5bd8              int32_t* esi_1 = *(uint32_t*)i;
006a5bdc              i = i[1];
006a5bdc              
006a5bdf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a5bf1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x1e0)(arg1, arg2);
006a5bcb          }
006a5bc3      }
006a5bc3      
006a5bff      eax = 1;
006a5c01      return 1;
006a5bb0  }

006a5c02        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006a5c10  uint8_t CM_Social::Event_AddFriend(class AC1Legacy::PStringBase<char> const* arg1)

006a5c10  {
006a5c16      uint32_t eax = Proto_UI::GetNextUICounter();
006a5c2c      int32_t var_8 = 0x801ad4;
006a5c34      void* var_c = nullptr;
006a5c3c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a5c4e      OrderHdr::Pack(&var_8, &var_c, 0);
006a5c58      void* eax_2 = operator new[]((eax_1 + 0xc));
006a5c6a      var_c = eax_2;
006a5c70      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a5c79      *(uint32_t*)var_c = 0x18;
006a5c8a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a5c94      var_c += 4;
006a5c98      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a5ca4      class AC1Legacy::PStringBase<char>* ebx;
006a5ca4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a5ca4      
006a5cab      if (ebx == 0)
006a5cb2          Proto_UI::UICounterFailedSend(eax);
006a5cb2      
006a5cbc      uint32_t eax_6;
006a5cbc      eax_6 = ebx;
006a5cc2      return eax_6;
006a5c10  }

006a5cc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a5cd0  uint32_t CM_Social::DispatchUI_SendClientContractTrackerTable(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5cd0  {
006a5ce1      if ((arg1 == 0 || arg1->m_pUISystem == 0))
006a5ce9          return 0;
006a5ce9      
006a5cea      void* eax_3 = arg2;
006a5cf6      bool cond:0 = *(uint32_t*)eax_3 == 0x314;
006a5cfc      arg2 = ((char*)eax_3 + 4);
006a5cfc      
006a5d00      if (!(cond:0))
006a5d09          return 0;
006a5d09      
006a5d0e      void var_18;
006a5d0e      CContractTrackerTable::CContractTrackerTable(&var_18);
006a5d29      CContractTrackerTable::UnPack(&var_18, &arg2, (((char*)eax_3 - arg2) + arg3));
006a5d36      ClientUISystem::Handle_Social__SendClientContractTrackerTable(arg1->m_pUISystem, &var_18);
006a5d41      CContractTrackerTable::~CContractTrackerTable(&var_18);
006a5d4d      return 0;
006a5cd0  }

006a5d4e                                            90 90                                                                ..

006a5d50  uint32_t CM_Social::DispatchUI_CharacterTitleTable(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5d50  {
006a5d61      if ((arg1 == 0 || arg1->m_pUISystem == 0))
006a5d69          return 0;
006a5d69      
006a5d6a      void* eax_3 = arg2;
006a5d76      bool cond:0 = *(uint32_t*)eax_3 == 0x29;
006a5d79      arg2 = ((char*)eax_3 + 4);
006a5d79      
006a5d7d      if (!(cond:0))
006a5d86          return 0;
006a5d86      
006a5d8b      void var_1c;
006a5d8b      CharacterTitleTable::CharacterTitleTable(&var_1c);
006a5da6      CharacterTitleTable::UnPack(&var_1c, &arg2, (((char*)eax_3 - arg2) + arg3));
006a5db3      ClientUISystem::Handle_Social__CharacterTitleTable(arg1->m_pUISystem, &var_1c);
006a5dbe      CharacterTitleTable::~CharacterTitleTable(&var_1c);
006a5dca      return 0;
006a5d50  }

006a5dcb                                   90 90 90 90 90                                                             .....

006a5dd0  uint32_t CM_Social::DispatchUI_FriendsUpdate(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5dd0  {
006a5de1      if ((arg1 == 0 || arg1->m_pUISystem == 0))
006a5de9          return 0;
006a5de9      
006a5dea      void* ecx = arg2;
006a5df6      bool cond:0 = *(uint32_t*)ecx == 0x21;
006a5df9      arg2 = ((char*)ecx + 4);
006a5df9      
006a5dfd      if (!(cond:0))
006a5e06          return 0;
006a5e06      
006a5e19      int32_t var_10 = 0;
006a5e1d      int32_t var_c = 0;
006a5e21      int32_t var_8 = 0;
006a5e25      int32_t var_14 = 0x7a4150;
006a5e2d      int32_t var_4 = 0x7a413c;
006a5e35      PList<FriendData>::UnPack(&var_4, &arg2, (((ecx * 0) - 4) + arg3));
006a5e3a      void* eax_5 = arg2;
006a5e3e      int32_t ecx_3 = *(uint32_t*)eax_5;
006a5e49      class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a5e4c      arg2 = ((char*)eax_5 + 4);
006a5e50      ClientUISystem::Handle_Social__FriendsUpdate(m_pUISystem, &var_14, ecx_3);
006a5e5b      var_4 = 0x79285c;
006a5e63      var_14 = 0x7a410c;
006a5e6b      AC1Legacy::List<FriendData>::flush(&var_14);
006a5e77      return 0;
006a5dd0  }

006a5e78                                                                          90 90 90 90 90 90 90 90                          ........

006a5e80  uint32_t CM_Fellowship::DispatchUI_Disband(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5e80  {
006a5e86      if (arg1 != 0)
006a5e86      {
006a5e88          class ClientFellowshipSystem* m_pFellowshipSystem = arg1->m_pFellowshipSystem;
006a5e88          
006a5e99          if ((m_pFellowshipSystem != 0 && *(uint32_t*)arg2 == 0x2bf))
006a5e9e              /* tailcall */
006a5e9e              return ClientFellowshipSystem::Handle_Fellowship__Disband(m_pFellowshipSystem);
006a5e86      }
006a5e86      
006a5e9d      return 0;
006a5e80  }

006a5ea3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a5eb0  uint32_t CM_Fellowship::DispatchUI_Dismiss(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5eb0  {
006a5eb6      if (arg1 != 0)
006a5eb6      {
006a5eb8          class ClientFellowshipSystem* m_pFellowshipSystem = arg1->m_pFellowshipSystem;
006a5eb8          
006a5ec9          if ((m_pFellowshipSystem != 0 && *(uint32_t*)arg2 == 0xa4))
006a5ed2              ClientFellowshipSystem::Handle_Fellowship__Dismiss(m_pFellowshipSystem, *(uint32_t*)((char*)arg2 + 4));
006a5eb6      }
006a5eb6      
006a5ecd      return 0;
006a5eb0  }

006a5ed8                                                                          90 90 90 90 90 90 90 90                          ........

006a5ee0  uint32_t CM_Fellowship::DispatchUI_FellowStatsDone(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5ee0  {
006a5ee6      if (arg1 != 0)
006a5ee6      {
006a5ee8          class ClientFellowshipSystem* m_pFellowshipSystem = arg1->m_pFellowshipSystem;
006a5ee8          
006a5ef9          if ((m_pFellowshipSystem != 0 && *(uint32_t*)arg2 == 0x1ca))
006a5f02              DBOCache::GetCollection(m_pFellowshipSystem, *(uint32_t*)((char*)arg2 + 4));
006a5ee6      }
006a5ee6      
006a5efd      return 0;
006a5ee0  }

006a5f08                          90 90 90 90 90 90 90 90                                                          ........

006a5f10  uint32_t CM_Fellowship::DispatchUI_FellowUpdateDone(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5f10  {
006a5f16      if (arg1 != 0)
006a5f16      {
006a5f18          class ClientFellowshipSystem* m_pFellowshipSystem = arg1->m_pFellowshipSystem;
006a5f18          
006a5f29          if ((m_pFellowshipSystem != 0 && *(uint32_t*)arg2 == 0x1c9))
006a5f32              DBOCache::GetCollection(m_pFellowshipSystem, *(uint32_t*)((char*)arg2 + 4));
006a5f16      }
006a5f16      
006a5f2d      return 0;
006a5f10  }

006a5f38                                                                          90 90 90 90 90 90 90 90                          ........

006a5f40  uint32_t CM_Fellowship::DispatchUI_Quit(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a5f40  {
006a5f46      if (arg1 != 0)
006a5f46      {
006a5f48          class ClientFellowshipSystem* m_pFellowshipSystem = arg1->m_pFellowshipSystem;
006a5f48          
006a5f59          if ((m_pFellowshipSystem != 0 && *(uint32_t*)arg2 == 0xa3))
006a5f62              ClientFellowshipSystem::Handle_Fellowship__Quit(m_pFellowshipSystem, *(uint32_t*)((char*)arg2 + 4));
006a5f46      }
006a5f46      
006a5f5d      return 0;
006a5f40  }

006a5f68                          90 90 90 90 90 90 90 90                                                          ........

006a5f70  uint8_t CM_Fellowship::Event_AssignNewLeader(uint32_t arg1)

006a5f70  {
006a5f76      uint32_t eax = Proto_UI::GetNextUICounter();
006a5f8a      int32_t var_8 = 0x801ad4;
006a5f92      void* var_c = nullptr;
006a5f9a      OrderHdr::Pack(&var_8, &var_c, 0);
006a5fa5      void* eax_1 = operator new[](0x10);
006a5fb7      var_c = eax_1;
006a5fbd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a5fca      *(uint32_t*)var_c = 0x290;
006a5fd4      uint32_t* eax_3 = ((char*)var_c + 4);
006a5fd7      var_c = eax_3;
006a5fdb      *(uint32_t*)eax_3 = arg1;
006a5fe1      void* eax_5 = ((char*)var_c + 4);
006a5fe4      var_c = eax_5;
006a5fe8      void* eax_6 = (eax_5 & 0x80000003);
006a5fe8      bool cond:0 = eax_6 == 0;
006a5fe8      
006a5fed      if (eax_6 < 0)
006a5fed      {
006a5ff0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a5ff3          eax_6 = ((char*)eax_8 + 1);
006a5ff3          cond:0 = eax_8 == 0xffffffff;
006a5fed      }
006a5fed      
006a5ff4      if (!(cond:0))
006a5ff4      {
006a5ffb          void* i_1 = (4 - eax_6);
006a5ffb          
006a5ffd          if (4 != eax_6)
006a5ffd          {
006a6011              void* i;
006a6011              
006a6011              do
006a6011              {
006a6004                  *(uint8_t*)var_c = 0;
006a600c                  i = i_1;
006a600c                  i_1 -= 1;
006a600d                  var_c += 1;
006a6011              } while (i != 1);
006a5ffd          }
006a5ff4      }
006a5ff4      
006a601a      int32_t ebx;
006a601a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a601a      
006a6021      if (ebx == 0)
006a6028          Proto_UI::UICounterFailedSend(eax);
006a6028      
006a6032      uint32_t eax_9;
006a6032      eax_9 = ebx;
006a6038      return eax_9;
006a5f70  }

006a6039                                                                             90 90 90 90 90 90 90                           .......

006a6040  uint8_t CM_Fellowship::Event_ChangeFellowOpeness(int32_t arg1)

006a6040  {
006a6046      uint32_t eax = Proto_UI::GetNextUICounter();
006a605a      int32_t var_8 = 0x801ad4;
006a6062      void* var_c = nullptr;
006a606a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6075      void* eax_1 = operator new[](0x10);
006a6087      var_c = eax_1;
006a608d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a609a      *(uint32_t*)var_c = 0x291;
006a60a4      int32_t* eax_3 = ((char*)var_c + 4);
006a60a7      var_c = eax_3;
006a60ab      *(uint32_t*)eax_3 = arg1;
006a60b1      void* eax_5 = ((char*)var_c + 4);
006a60b4      var_c = eax_5;
006a60b8      void* eax_6 = (eax_5 & 0x80000003);
006a60b8      bool cond:0 = eax_6 == 0;
006a60b8      
006a60bd      if (eax_6 < 0)
006a60bd      {
006a60c0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a60c3          eax_6 = ((char*)eax_8 + 1);
006a60c3          cond:0 = eax_8 == 0xffffffff;
006a60bd      }
006a60bd      
006a60c4      if (!(cond:0))
006a60c4      {
006a60cb          void* i_1 = (4 - eax_6);
006a60cb          
006a60cd          if (4 != eax_6)
006a60cd          {
006a60e1              void* i;
006a60e1              
006a60e1              do
006a60e1              {
006a60d4                  *(uint8_t*)var_c = 0;
006a60dc                  i = i_1;
006a60dc                  i_1 -= 1;
006a60dd                  var_c += 1;
006a60e1              } while (i != 1);
006a60cd          }
006a60c4      }
006a60c4      
006a60ea      int32_t ebx;
006a60ea      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a60ea      
006a60f1      if (ebx == 0)
006a60f8          Proto_UI::UICounterFailedSend(eax);
006a60f8      
006a6102      uint32_t eax_9;
006a6102      eax_9 = ebx;
006a6108      return eax_9;
006a6040  }

006a6109                             90 90 90 90 90 90 90                                                           .......

006a6110  uint8_t CM_Fellowship::Event_Dismiss(uint32_t arg1)

006a6110  {
006a6116      uint32_t eax = Proto_UI::GetNextUICounter();
006a612a      int32_t var_8 = 0x801ad4;
006a6132      void* var_c = nullptr;
006a613a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6145      void* eax_1 = operator new[](0x10);
006a6157      var_c = eax_1;
006a615d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a616a      *(uint32_t*)var_c = 0xa4;
006a6174      uint32_t* eax_3 = ((char*)var_c + 4);
006a6177      var_c = eax_3;
006a617b      *(uint32_t*)eax_3 = arg1;
006a6181      void* eax_5 = ((char*)var_c + 4);
006a6184      var_c = eax_5;
006a6188      void* eax_6 = (eax_5 & 0x80000003);
006a6188      bool cond:0 = eax_6 == 0;
006a6188      
006a618d      if (eax_6 < 0)
006a618d      {
006a6190          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a6193          eax_6 = ((char*)eax_8 + 1);
006a6193          cond:0 = eax_8 == 0xffffffff;
006a618d      }
006a618d      
006a6194      if (!(cond:0))
006a6194      {
006a619b          void* i_1 = (4 - eax_6);
006a619b          
006a619d          if (4 != eax_6)
006a619d          {
006a61b1              void* i;
006a61b1              
006a61b1              do
006a61b1              {
006a61a4                  *(uint8_t*)var_c = 0;
006a61ac                  i = i_1;
006a61ac                  i_1 -= 1;
006a61ad                  var_c += 1;
006a61b1              } while (i != 1);
006a619d          }
006a6194      }
006a6194      
006a61ba      int32_t ebx;
006a61ba      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a61ba      
006a61c1      if (ebx == 0)
006a61c8          Proto_UI::UICounterFailedSend(eax);
006a61c8      
006a61d2      uint32_t eax_9;
006a61d2      eax_9 = ebx;
006a61d8      return eax_9;
006a6110  }

006a61d9                                                                             90 90 90 90 90 90 90                           .......

006a61e0  uint8_t CM_Fellowship::Event_Quit(int32_t arg1)

006a61e0  {
006a61e6      uint32_t eax = Proto_UI::GetNextUICounter();
006a61fa      int32_t var_8 = 0x801ad4;
006a6202      void* var_c = nullptr;
006a620a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6215      void* eax_1 = operator new[](0x10);
006a6227      var_c = eax_1;
006a622d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a623a      *(uint32_t*)var_c = 0xa3;
006a6244      int32_t* eax_3 = ((char*)var_c + 4);
006a6247      var_c = eax_3;
006a624b      *(uint32_t*)eax_3 = arg1;
006a6251      void* eax_5 = ((char*)var_c + 4);
006a6254      var_c = eax_5;
006a6258      void* eax_6 = (eax_5 & 0x80000003);
006a6258      bool cond:0 = eax_6 == 0;
006a6258      
006a625d      if (eax_6 < 0)
006a625d      {
006a6260          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a6263          eax_6 = ((char*)eax_8 + 1);
006a6263          cond:0 = eax_8 == 0xffffffff;
006a625d      }
006a625d      
006a6264      if (!(cond:0))
006a6264      {
006a626b          void* i_1 = (4 - eax_6);
006a626b          
006a626d          if (4 != eax_6)
006a626d          {
006a6281              void* i;
006a6281              
006a6281              do
006a6281              {
006a6274                  *(uint8_t*)var_c = 0;
006a627c                  i = i_1;
006a627c                  i_1 -= 1;
006a627d                  var_c += 1;
006a6281              } while (i != 1);
006a626d          }
006a6264      }
006a6264      
006a628a      int32_t ebx;
006a628a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a628a      
006a6291      if (ebx == 0)
006a6298          Proto_UI::UICounterFailedSend(eax);
006a6298      
006a62a2      uint32_t eax_9;
006a62a2      eax_9 = ebx;
006a62a8      return eax_9;
006a61e0  }

006a62a9                             90 90 90 90 90 90 90                                                           .......

006a62b0  uint8_t CM_Fellowship::Event_Recruit(uint32_t arg1)

006a62b0  {
006a62b6      uint32_t eax = Proto_UI::GetNextUICounter();
006a62ca      int32_t var_8 = 0x801ad4;
006a62d2      void* var_c = nullptr;
006a62da      OrderHdr::Pack(&var_8, &var_c, 0);
006a62e5      void* eax_1 = operator new[](0x10);
006a62f7      var_c = eax_1;
006a62fd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a630a      *(uint32_t*)var_c = 0xa5;
006a6314      uint32_t* eax_3 = ((char*)var_c + 4);
006a6317      var_c = eax_3;
006a631b      *(uint32_t*)eax_3 = arg1;
006a6321      void* eax_5 = ((char*)var_c + 4);
006a6324      var_c = eax_5;
006a6328      void* eax_6 = (eax_5 & 0x80000003);
006a6328      bool cond:0 = eax_6 == 0;
006a6328      
006a632d      if (eax_6 < 0)
006a632d      {
006a6330          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a6333          eax_6 = ((char*)eax_8 + 1);
006a6333          cond:0 = eax_8 == 0xffffffff;
006a632d      }
006a632d      
006a6334      if (!(cond:0))
006a6334      {
006a633b          void* i_1 = (4 - eax_6);
006a633b          
006a633d          if (4 != eax_6)
006a633d          {
006a6351              void* i;
006a6351              
006a6351              do
006a6351              {
006a6344                  *(uint8_t*)var_c = 0;
006a634c                  i = i_1;
006a634c                  i_1 -= 1;
006a634d                  var_c += 1;
006a6351              } while (i != 1);
006a633d          }
006a6334      }
006a6334      
006a635a      int32_t ebx;
006a635a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a635a      
006a6361      if (ebx == 0)
006a6368          Proto_UI::UICounterFailedSend(eax);
006a6368      
006a6372      uint32_t eax_9;
006a6372      eax_9 = ebx;
006a6378      return eax_9;
006a62b0  }

006a6379                                                                             90 90 90 90 90 90 90                           .......

006a6380  uint8_t CM_Fellowship::Event_UpdateRequest(int32_t arg1)

006a6380  {
006a6386      uint32_t eax = Proto_UI::GetNextUICounter();
006a639a      int32_t var_8 = 0x801ad4;
006a63a2      void* var_c = nullptr;
006a63aa      OrderHdr::Pack(&var_8, &var_c, 0);
006a63b5      void* eax_1 = operator new[](0x10);
006a63c7      var_c = eax_1;
006a63cd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a63da      *(uint32_t*)var_c = 0xa6;
006a63e4      int32_t* eax_3 = ((char*)var_c + 4);
006a63e7      var_c = eax_3;
006a63eb      *(uint32_t*)eax_3 = arg1;
006a63f1      void* eax_5 = ((char*)var_c + 4);
006a63f4      var_c = eax_5;
006a63f8      void* eax_6 = (eax_5 & 0x80000003);
006a63f8      bool cond:0 = eax_6 == 0;
006a63f8      
006a63fd      if (eax_6 < 0)
006a63fd      {
006a6400          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a6403          eax_6 = ((char*)eax_8 + 1);
006a6403          cond:0 = eax_8 == 0xffffffff;
006a63fd      }
006a63fd      
006a6404      if (!(cond:0))
006a6404      {
006a640b          void* i_1 = (4 - eax_6);
006a640b          
006a640d          if (4 != eax_6)
006a640d          {
006a6421              void* i;
006a6421              
006a6421              do
006a6421              {
006a6414                  *(uint8_t*)var_c = 0;
006a641c                  i = i_1;
006a641c                  i_1 -= 1;
006a641d                  var_c += 1;
006a6421              } while (i != 1);
006a640d          }
006a6404      }
006a6404      
006a642a      int32_t ebx;
006a642a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a642a      
006a6431      if (ebx == 0)
006a6438          Proto_UI::UICounterFailedSend(eax);
006a6438      
006a6442      uint32_t eax_9;
006a6442      eax_9 = ebx;
006a6448      return eax_9;
006a6380  }

006a6449                             90 90 90 90 90 90 90                                                           .......

006a6450  uint8_t CM_Fellowship::SendNotice_FellowAdded(uint32_t arg1)

006a6450  {
006a645e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd246);
006a645e      
006a6463      if (eax != 0)
006a6463      {
006a6466          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a6466          
006a646b          while (i != 0)
006a646b          {
006a6473              int32_t* edi_1 = *(uint32_t*)i;
006a6477              i = i[1];
006a6477              
006a647a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a648b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xe0)(arg1);
006a646b          }
006a6463      }
006a6463      
006a6498      eax = 1;
006a649a      return 1;
006a6450  }

006a649b                                                                                   90 90 90 90 90                             .....

006a64a0  uint8_t CM_Fellowship::SendNotice_FellowDismissed(uint32_t arg1)

006a64a0  {
006a64ae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd213);
006a64ae      
006a64b3      if (eax != 0)
006a64b3      {
006a64b6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a64b6          
006a64bb          while (i != 0)
006a64bb          {
006a64c3              int32_t* edi_1 = *(uint32_t*)i;
006a64c7              i = i[1];
006a64c7              
006a64ca              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a64db                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xe4)(arg1);
006a64bb          }
006a64b3      }
006a64b3      
006a64e8      eax = 1;
006a64ea      return 1;
006a64a0  }

006a64eb                                   90 90 90 90 90                                                             .....

006a64f0  uint8_t CM_Fellowship::SendNotice_FellowQuit(uint32_t arg1)

006a64f0  {
006a64fe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd212);
006a64fe      
006a6503      if (eax != 0)
006a6503      {
006a6506          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a6506          
006a650b          while (i != 0)
006a650b          {
006a6513              int32_t* edi_1 = *(uint32_t*)i;
006a6517              i = i[1];
006a6517              
006a651a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a652b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xe8)(arg1);
006a650b          }
006a6503      }
006a6503      
006a6538      eax = 1;
006a653a      return 1;
006a64f0  }

006a653b                                                                                   90 90 90 90 90                             .....

006a6540  uint8_t CM_Fellowship::SendNotice_FellowUpdated(uint32_t arg1, class Fellow const* arg2, uint32_t arg3)

006a6540  {
006a654e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd214);
006a654e      
006a6553      if (eax != 0)
006a6553      {
006a6556          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a6556          
006a655b          while (i != 0)
006a655b          {
006a6568              int32_t* esi_1 = *(uint32_t*)i;
006a656c              i = i[1];
006a656c              
006a656f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a6586                  *(uint32_t*)(*(uint32_t*)esi_1 + 0xec)(arg1, arg2, arg3);
006a655b          }
006a6553      }
006a6553      
006a6594      eax = 1;
006a6596      return 1;
006a6540  }

006a6597                                                                       90 90 90 90 90 90 90 90 90                         .........

006a65a0  uint8_t CM_Fellowship::SendNotice_FellowshipDisbanded()

006a65a0  {
006a65ae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd211);
006a65ae      
006a65b3      if (eax != 0)
006a65b3      {
006a65b6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a65b6          
006a65bb          if (i != 0)
006a65bb          {
006a65bd              int32_t edi;
006a65bd              int32_t var_8_1 = edi;
006a65bd              
006a65df              do
006a65df              {
006a65c0                  int32_t* edi_2 = *(uint32_t*)i;
006a65c4                  i = i[1];
006a65c4                  
006a65c7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a65d7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0xf0)();
006a65df              } while (i != 0);
006a65bb          }
006a65b3      }
006a65b3      
006a65e3      eax = 1;
006a65e5      return 1;
006a65a0  }

006a65e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a65f0  uint8_t CM_Fellowship::SendNotice_FellowshipLeaderChanged(uint32_t arg1, uint32_t arg2)

006a65f0  {
006a65fe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd247);
006a65fe      
006a6603      if (eax != 0)
006a6603      {
006a6606          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a6606          
006a660b          while (i != 0)
006a660b          {
006a6618              int32_t* esi_1 = *(uint32_t*)i;
006a661c              i = i[1];
006a661c              
006a661f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a6631                  *(uint32_t*)(*(uint32_t*)esi_1 + 0xf4)(arg1, arg2);
006a660b          }
006a6603      }
006a6603      
006a663f      eax = 1;
006a6641      return 1;
006a65f0  }

006a6642        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006a6650  uint8_t CM_Fellowship::SendNotice_FellowshipRequest(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a6650  {
006a665e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd20f);
006a665e      
006a6663      if (eax != 0)
006a6663      {
006a6666          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a6666          
006a666b          while (i != 0)
006a666b          {
006a6678              int32_t* esi_1 = *(uint32_t*)i;
006a667c              i = i[1];
006a667c              
006a667f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a6691                  *(uint32_t*)(*(uint32_t*)esi_1 + 0xf8)(arg1, arg2);
006a666b          }
006a6663      }
006a6663      
006a669f      eax = 1;
006a66a1      return 1;
006a6650  }

006a66a2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006a66b0  uint8_t CM_Fellowship::SendNotice_FellowshipUpdate(class CFellowship const* arg1)

006a66b0  {
006a66be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd210);
006a66be      
006a66c3      if (eax != 0)
006a66c3      {
006a66c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a66c6          
006a66cb          while (i != 0)
006a66cb          {
006a66d3              int32_t* edi_1 = *(uint32_t*)i;
006a66d7              i = i[1];
006a66d7              
006a66da              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a66eb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xfc)(arg1);
006a66cb          }
006a66c3      }
006a66c3      
006a66f8      eax = 1;
006a66fa      return 1;
006a66b0  }

006a66fb                                                                                   90 90 90 90 90                             .....

006a6700  uint32_t CM_Fellowship::DispatchUI_UpdateFellow(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a6700  {
006a6711      if ((arg1 == 0 || arg1->m_pFellowshipSystem == 0))
006a6719          return 0;
006a6719      
006a671a      void* eax_3 = arg2;
006a6726      bool cond:0 = *(uint32_t*)eax_3 == 0x2c0;
006a672c      arg2 = ((char*)eax_3 + 4);
006a672c      
006a6730      if (!(cond:0))
006a6739          return 0;
006a6739      
006a673b      uint32_t edi = *(uint32_t*)((char*)eax_3 + 4);
006a6744      arg2 = ((char*)eax_3 + 8);
006a6748      void var_30;
006a6748      Fellow::Fellow(&var_30);
006a6763      Fellow::UnPack(&var_30, &arg2, (((char*)eax_3 - arg2) + arg3));
006a6768      void* eax_7 = arg2;
006a676c      uint32_t ecx_4 = *(uint32_t*)eax_7;
006a6774      class ClientFellowshipSystem* m_pFellowshipSystem = arg1->m_pFellowshipSystem;
006a677b      arg2 = ((char*)eax_7 + 4);
006a677f      ClientFellowshipSystem::Handle_Fellowship__UpdateFellow(m_pFellowshipSystem, edi, &var_30, ecx_4);
006a678a      Fellow::~Fellow(&var_30);
006a6797      return 0;
006a6700  }

006a6798                                                                          90 90 90 90 90 90 90 90                          ........

006a67a0  uint8_t CM_Fellowship::Event_Create(class AC1Legacy::PStringBase<char> const* arg1, int32_t arg2)

006a67a0  {
006a67a6      uint32_t eax = Proto_UI::GetNextUICounter();
006a67bc      int32_t var_8 = 0x801ad4;
006a67c4      void* var_c = nullptr;
006a67cc      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a67de      OrderHdr::Pack(&var_8, &var_c, 0);
006a67e8      void* eax_2 = operator new[]((eax_1 + 0x10));
006a67fa      var_c = eax_2;
006a6800      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a6809      *(uint32_t*)var_c = 0xa2;
006a681a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0x10));
006a6824      var_c += 4;
006a6828      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a6835      *(uint32_t*)var_c = arg2;
006a683b      void* eax_8 = ((char*)var_c + 4);
006a683e      var_c = eax_8;
006a6842      void* eax_9 = (eax_8 & 0x80000003);
006a6842      bool cond:0 = eax_9 == 0;
006a6842      
006a6847      if (eax_9 < 0)
006a6847      {
006a684a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a684d          eax_9 = ((char*)eax_11 + 1);
006a684d          cond:0 = eax_11 == 0xffffffff;
006a6847      }
006a6847      
006a684e      if (!(cond:0))
006a684e      {
006a6855          void* i_1 = (4 - eax_9);
006a6855          
006a6857          if (4 != eax_9)
006a6857          {
006a6871              void* i;
006a6871              
006a6871              do
006a6871              {
006a6864                  *(uint8_t*)var_c = 0;
006a686c                  i = i_1;
006a686c                  i_1 -= 1;
006a686d                  var_c += 1;
006a6871              } while (i != 1);
006a6857          }
006a684e      }
006a684e      
006a687a      void* ebx;
006a687a      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a687a      
006a6881      if (ebx == 0)
006a6888          Proto_UI::UICounterFailedSend(eax);
006a6888      
006a6892      uint32_t eax_12;
006a6892      eax_12 = ebx;
006a6898      return eax_12;
006a67a0  }

006a6899                                                                             90 90 90 90 90 90 90                           .......

006a68a0  uint32_t CM_Fellowship::DispatchUI_FullUpdate(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a68a0  {
006a68b1      if ((arg1 == 0 || arg1->m_pFellowshipSystem == 0))
006a68b9          return 0;
006a68b9      
006a68ba      void* eax_3 = arg2;
006a68c6      bool cond:0 = *(uint32_t*)eax_3 == 0x2be;
006a68cc      arg2 = ((char*)eax_3 + 4);
006a68cc      
006a68d0      if (!(cond:0))
006a68d9          return 0;
006a68d9      
006a68de      void var_44;
006a68de      CFellowship::CFellowship(&var_44);
006a68f9      Fellowship::UnPack(&var_44, &arg2, (((char*)eax_3 - arg2) + arg3));
006a6906      ClientFellowshipSystem::Handle_Fellowship__FullUpdate(arg1->m_pFellowshipSystem, &var_44);
006a6911      Fellowship::~Fellowship(&var_44);
006a691d      return 0;
006a68a0  }

006a691e                                                                                            90 90                                ..

006a6920  uint32_t CM_Allegiance::DispatchUI_AllegianceLoginNotificationEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a6920  {
006a6926      if (arg1 != 0)
006a6926      {
006a6928          class ClientAllegianceSystem* m_pAllegianceSystem = arg1->m_pAllegianceSystem;
006a6928          
006a693e          if ((m_pAllegianceSystem != 0 && *(uint32_t*)arg2 == 0x27a))
006a694a              ClientAllegianceSystem::Handle_Allegiance__AllegianceLoginNotificationEvent(m_pAllegianceSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006a6926      }
006a6926      
006a6942      return 0;
006a6920  }


006a6950  uint32_t CM_Allegiance::DispatchUI_AllegianceUpdateAborted(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a6950  {
006a6956      if (arg1 != 0)
006a6956      {
006a6958          class ClientAllegianceSystem* m_pAllegianceSystem = arg1->m_pAllegianceSystem;
006a6958          
006a6966          if ((m_pAllegianceSystem != 0 && *(uint32_t*)arg2 == 3))
006a696f              ClientAllegianceSystem::Handle_Allegiance__AllegianceUpdateAborted(m_pAllegianceSystem, *(uint32_t*)((char*)arg2 + 4));
006a6956      }
006a6956      
006a696a      return 0;
006a6950  }

006a6975                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006a6980  uint8_t CM_Allegiance::Event_BreakAllegiance(uint32_t arg1)

006a6980  {
006a6986      uint32_t eax = Proto_UI::GetNextUICounter();
006a699a      int32_t var_8 = 0x801ad4;
006a69a2      void* var_c = nullptr;
006a69aa      OrderHdr::Pack(&var_8, &var_c, 0);
006a69b5      void* eax_1 = operator new[](0x10);
006a69c7      var_c = eax_1;
006a69cd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a69da      *(uint32_t*)var_c = 0x1e;
006a69e4      uint32_t* eax_3 = ((char*)var_c + 4);
006a69e7      var_c = eax_3;
006a69eb      *(uint32_t*)eax_3 = arg1;
006a69f1      void* eax_5 = ((char*)var_c + 4);
006a69f4      var_c = eax_5;
006a69f8      void* eax_6 = (eax_5 & 0x80000003);
006a69f8      bool cond:0 = eax_6 == 0;
006a69f8      
006a69fd      if (eax_6 < 0)
006a69fd      {
006a6a00          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a6a03          eax_6 = ((char*)eax_8 + 1);
006a6a03          cond:0 = eax_8 == 0xffffffff;
006a69fd      }
006a69fd      
006a6a04      if (!(cond:0))
006a6a04      {
006a6a0b          void* i_1 = (4 - eax_6);
006a6a0b          
006a6a0d          if (4 != eax_6)
006a6a0d          {
006a6a21              void* i;
006a6a21              
006a6a21              do
006a6a21              {
006a6a14                  *(uint8_t*)var_c = 0;
006a6a1c                  i = i_1;
006a6a1c                  i_1 -= 1;
006a6a1d                  var_c += 1;
006a6a21              } while (i != 1);
006a6a0d          }
006a6a04      }
006a6a04      
006a6a2a      int32_t ebx;
006a6a2a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a6a2a      
006a6a31      if (ebx == 0)
006a6a38          Proto_UI::UICounterFailedSend(eax);
006a6a38      
006a6a42      uint32_t eax_9;
006a6a42      eax_9 = ebx;
006a6a48      return eax_9;
006a6980  }

006a6a49                             90 90 90 90 90 90 90                                                           .......

006a6a50  uint8_t CM_Allegiance::Event_ClearAllegianceName()

006a6a50  {
006a6a56      uint32_t eax = Proto_UI::GetNextUICounter();
006a6a6a      int32_t var_8 = 0x801ad4;
006a6a72      void* var_c = nullptr;
006a6a7a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6a85      void* eax_1 = operator new[](0xc);
006a6a97      var_c = eax_1;
006a6a9d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a6aa6      *(uint32_t*)var_c = 0x31;
006a6ab5      var_c += 4;
006a6abe      int32_t ebx;
006a6abe      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a6abe      
006a6ac5      if (ebx == 0)
006a6acc          Proto_UI::UICounterFailedSend(eax);
006a6acc      
006a6ad6      uint32_t eax_4;
006a6ad6      eax_4 = ebx;
006a6adc      return eax_4;
006a6a50  }

006a6add                                                                                         90 90 90                               ...

006a6ae0  uint8_t CM_Allegiance::Event_ClearAllegianceOfficerTitles()

006a6ae0  {
006a6ae6      uint32_t eax = Proto_UI::GetNextUICounter();
006a6afa      int32_t var_8 = 0x801ad4;
006a6b02      void* var_c = nullptr;
006a6b0a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6b15      void* eax_1 = operator new[](0xc);
006a6b27      var_c = eax_1;
006a6b2d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a6b36      *(uint32_t*)var_c = 0x3e;
006a6b45      var_c += 4;
006a6b4e      int32_t ebx;
006a6b4e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a6b4e      
006a6b55      if (ebx == 0)
006a6b5c          Proto_UI::UICounterFailedSend(eax);
006a6b5c      
006a6b66      uint32_t eax_4;
006a6b66      eax_4 = ebx;
006a6b6c      return eax_4;
006a6ae0  }

006a6b6d                                         90 90 90                                                               ...

006a6b70  uint8_t CM_Allegiance::Event_ClearAllegianceOfficers()

006a6b70  {
006a6b76      uint32_t eax = Proto_UI::GetNextUICounter();
006a6b8a      int32_t var_8 = 0x801ad4;
006a6b92      void* var_c = nullptr;
006a6b9a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6ba5      void* eax_1 = operator new[](0xc);
006a6bb7      var_c = eax_1;
006a6bbd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a6bc6      *(uint32_t*)var_c = 0x2a7;
006a6bd5      var_c += 4;
006a6bde      int32_t ebx;
006a6bde      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a6bde      
006a6be5      if (ebx == 0)
006a6bec          Proto_UI::UICounterFailedSend(eax);
006a6bec      
006a6bf6      uint32_t eax_4;
006a6bf6      eax_4 = ebx;
006a6bfc      return eax_4;
006a6b70  }

006a6bfd                                                                                         90 90 90                               ...

006a6c00  uint8_t CM_Allegiance::Event_ClearMotd()

006a6c00  {
006a6c06      uint32_t eax = Proto_UI::GetNextUICounter();
006a6c1a      int32_t var_8 = 0x801ad4;
006a6c22      void* var_c = nullptr;
006a6c2a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6c35      void* eax_1 = operator new[](0xc);
006a6c47      var_c = eax_1;
006a6c4d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a6c56      *(uint32_t*)var_c = 0x256;
006a6c65      var_c += 4;
006a6c6e      int32_t ebx;
006a6c6e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a6c6e      
006a6c75      if (ebx == 0)
006a6c7c          Proto_UI::UICounterFailedSend(eax);
006a6c7c      
006a6c86      uint32_t eax_4;
006a6c86      eax_4 = ebx;
006a6c8c      return eax_4;
006a6c00  }

006a6c8d                                         90 90 90                                                               ...

006a6c90  uint8_t CM_Allegiance::Event_DoAllegianceHouseAction(uint32_t arg1)

006a6c90  {
006a6c96      uint32_t eax = Proto_UI::GetNextUICounter();
006a6caa      int32_t var_8 = 0x801ad4;
006a6cb2      void* var_c = nullptr;
006a6cba      OrderHdr::Pack(&var_8, &var_c, 0);
006a6cc5      void* eax_1 = operator new[](0x10);
006a6cd7      var_c = eax_1;
006a6cdd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a6cea      *(uint32_t*)var_c = 0x42;
006a6cf4      uint32_t* eax_3 = ((char*)var_c + 4);
006a6cf7      var_c = eax_3;
006a6cfb      *(uint32_t*)eax_3 = arg1;
006a6d01      void* eax_5 = ((char*)var_c + 4);
006a6d04      var_c = eax_5;
006a6d08      void* eax_6 = (eax_5 & 0x80000003);
006a6d08      bool cond:0 = eax_6 == 0;
006a6d08      
006a6d0d      if (eax_6 < 0)
006a6d0d      {
006a6d10          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a6d13          eax_6 = ((char*)eax_8 + 1);
006a6d13          cond:0 = eax_8 == 0xffffffff;
006a6d0d      }
006a6d0d      
006a6d14      if (!(cond:0))
006a6d14      {
006a6d1b          void* i_1 = (4 - eax_6);
006a6d1b          
006a6d1d          if (4 != eax_6)
006a6d1d          {
006a6d31              void* i;
006a6d31              
006a6d31              do
006a6d31              {
006a6d24                  *(uint8_t*)var_c = 0;
006a6d2c                  i = i_1;
006a6d2c                  i_1 -= 1;
006a6d2d                  var_c += 1;
006a6d31              } while (i != 1);
006a6d1d          }
006a6d14      }
006a6d14      
006a6d3a      int32_t ebx;
006a6d3a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a6d3a      
006a6d41      if (ebx == 0)
006a6d48          Proto_UI::UICounterFailedSend(eax);
006a6d48      
006a6d52      uint32_t eax_9;
006a6d52      eax_9 = ebx;
006a6d58      return eax_9;
006a6c90  }

006a6d59                                                                             90 90 90 90 90 90 90                           .......

006a6d60  uint8_t CM_Allegiance::Event_DoAllegianceLockAction(uint32_t arg1)

006a6d60  {
006a6d66      uint32_t eax = Proto_UI::GetNextUICounter();
006a6d7a      int32_t var_8 = 0x801ad4;
006a6d82      void* var_c = nullptr;
006a6d8a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6d95      void* eax_1 = operator new[](0x10);
006a6da7      var_c = eax_1;
006a6dad      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a6dba      *(uint32_t*)var_c = 0x3f;
006a6dc4      uint32_t* eax_3 = ((char*)var_c + 4);
006a6dc7      var_c = eax_3;
006a6dcb      *(uint32_t*)eax_3 = arg1;
006a6dd1      void* eax_5 = ((char*)var_c + 4);
006a6dd4      var_c = eax_5;
006a6dd8      void* eax_6 = (eax_5 & 0x80000003);
006a6dd8      bool cond:0 = eax_6 == 0;
006a6dd8      
006a6ddd      if (eax_6 < 0)
006a6ddd      {
006a6de0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a6de3          eax_6 = ((char*)eax_8 + 1);
006a6de3          cond:0 = eax_8 == 0xffffffff;
006a6ddd      }
006a6ddd      
006a6de4      if (!(cond:0))
006a6de4      {
006a6deb          void* i_1 = (4 - eax_6);
006a6deb          
006a6ded          if (4 != eax_6)
006a6ded          {
006a6e01              void* i;
006a6e01              
006a6e01              do
006a6e01              {
006a6df4                  *(uint8_t*)var_c = 0;
006a6dfc                  i = i_1;
006a6dfc                  i_1 -= 1;
006a6dfd                  var_c += 1;
006a6e01              } while (i != 1);
006a6ded          }
006a6de4      }
006a6de4      
006a6e0a      int32_t ebx;
006a6e0a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a6e0a      
006a6e11      if (ebx == 0)
006a6e18          Proto_UI::UICounterFailedSend(eax);
006a6e18      
006a6e22      uint32_t eax_9;
006a6e22      eax_9 = ebx;
006a6e28      return eax_9;
006a6d60  }

006a6e29                             90 90 90 90 90 90 90                                                           .......

006a6e30  uint8_t CM_Allegiance::Event_ListAllegianceBans()

006a6e30  {
006a6e36      uint32_t eax = Proto_UI::GetNextUICounter();
006a6e4a      int32_t var_8 = 0x801ad4;
006a6e52      void* var_c = nullptr;
006a6e5a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6e65      void* eax_1 = operator new[](0xc);
006a6e77      var_c = eax_1;
006a6e7d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a6e86      *(uint32_t*)var_c = 0x2a3;
006a6e95      var_c += 4;
006a6e9e      int32_t ebx;
006a6e9e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a6e9e      
006a6ea5      if (ebx == 0)
006a6eac          Proto_UI::UICounterFailedSend(eax);
006a6eac      
006a6eb6      uint32_t eax_4;
006a6eb6      eax_4 = ebx;
006a6ebc      return eax_4;
006a6e30  }

006a6ebd                                                                                         90 90 90                               ...

006a6ec0  uint8_t CM_Allegiance::Event_ListAllegianceOfficerTitles()

006a6ec0  {
006a6ec6      uint32_t eax = Proto_UI::GetNextUICounter();
006a6eda      int32_t var_8 = 0x801ad4;
006a6ee2      void* var_c = nullptr;
006a6eea      OrderHdr::Pack(&var_8, &var_c, 0);
006a6ef5      void* eax_1 = operator new[](0xc);
006a6f07      var_c = eax_1;
006a6f0d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a6f16      *(uint32_t*)var_c = 0x3d;
006a6f25      var_c += 4;
006a6f2e      int32_t ebx;
006a6f2e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a6f2e      
006a6f35      if (ebx == 0)
006a6f3c          Proto_UI::UICounterFailedSend(eax);
006a6f3c      
006a6f46      uint32_t eax_4;
006a6f46      eax_4 = ebx;
006a6f4c      return eax_4;
006a6ec0  }

006a6f4d                                         90 90 90                                                               ...

006a6f50  uint8_t CM_Allegiance::Event_ListAllegianceOfficers()

006a6f50  {
006a6f56      uint32_t eax = Proto_UI::GetNextUICounter();
006a6f6a      int32_t var_8 = 0x801ad4;
006a6f72      void* var_c = nullptr;
006a6f7a      OrderHdr::Pack(&var_8, &var_c, 0);
006a6f85      void* eax_1 = operator new[](0xc);
006a6f97      var_c = eax_1;
006a6f9d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a6fa6      *(uint32_t*)var_c = 0x2a6;
006a6fb5      var_c += 4;
006a6fbe      int32_t ebx;
006a6fbe      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a6fbe      
006a6fc5      if (ebx == 0)
006a6fcc          Proto_UI::UICounterFailedSend(eax);
006a6fcc      
006a6fd6      uint32_t eax_4;
006a6fd6      eax_4 = ebx;
006a6fdc      return eax_4;
006a6f50  }

006a6fdd                                                                                         90 90 90                               ...

006a6fe0  uint8_t CM_Allegiance::Event_QueryAllegianceName()

006a6fe0  {
006a6fe6      uint32_t eax = Proto_UI::GetNextUICounter();
006a6ffa      int32_t var_8 = 0x801ad4;
006a7002      void* var_c = nullptr;
006a700a      OrderHdr::Pack(&var_8, &var_c, 0);
006a7015      void* eax_1 = operator new[](0xc);
006a7027      var_c = eax_1;
006a702d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a7036      *(uint32_t*)var_c = 0x30;
006a7045      var_c += 4;
006a704e      int32_t ebx;
006a704e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a704e      
006a7055      if (ebx == 0)
006a705c          Proto_UI::UICounterFailedSend(eax);
006a705c      
006a7066      uint32_t eax_4;
006a7066      eax_4 = ebx;
006a706c      return eax_4;
006a6fe0  }

006a706d                                         90 90 90                                                               ...

006a7070  uint8_t CM_Allegiance::Event_QueryMotd()

006a7070  {
006a7076      uint32_t eax = Proto_UI::GetNextUICounter();
006a708a      int32_t var_8 = 0x801ad4;
006a7092      void* var_c = nullptr;
006a709a      OrderHdr::Pack(&var_8, &var_c, 0);
006a70a5      void* eax_1 = operator new[](0xc);
006a70b7      var_c = eax_1;
006a70bd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a70c6      *(uint32_t*)var_c = 0x255;
006a70d5      var_c += 4;
006a70de      int32_t ebx;
006a70de      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a70de      
006a70e5      if (ebx == 0)
006a70ec          Proto_UI::UICounterFailedSend(eax);
006a70ec      
006a70f6      uint32_t eax_4;
006a70f6      eax_4 = ebx;
006a70fc      return eax_4;
006a7070  }

006a70fd                                                                                         90 90 90                               ...

006a7100  uint8_t CM_Allegiance::Event_RecallAllegianceHometown()

006a7100  {
006a7106      uint32_t eax = Proto_UI::GetNextUICounter();
006a711a      int32_t var_8 = 0x801ad4;
006a7122      void* var_c = nullptr;
006a712a      OrderHdr::Pack(&var_8, &var_c, 0);
006a7135      void* eax_1 = operator new[](0xc);
006a7147      var_c = eax_1;
006a714d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a7156      *(uint32_t*)var_c = 0x2ab;
006a7165      var_c += 4;
006a716e      int32_t ebx;
006a716e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a716e      
006a7175      if (ebx == 0)
006a717c          Proto_UI::UICounterFailedSend(eax);
006a717c      
006a7186      uint32_t eax_4;
006a7186      eax_4 = ebx;
006a718c      return eax_4;
006a7100  }

006a718d                                         90 90 90                                                               ...

006a7190  uint8_t CM_Allegiance::Event_SwearAllegiance(uint32_t arg1)

006a7190  {
006a7196      uint32_t eax = Proto_UI::GetNextUICounter();
006a71aa      int32_t var_8 = 0x801ad4;
006a71b2      void* var_c = nullptr;
006a71ba      OrderHdr::Pack(&var_8, &var_c, 0);
006a71c5      void* eax_1 = operator new[](0x10);
006a71d7      var_c = eax_1;
006a71dd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a71ea      *(uint32_t*)var_c = 0x1d;
006a71f4      uint32_t* eax_3 = ((char*)var_c + 4);
006a71f7      var_c = eax_3;
006a71fb      *(uint32_t*)eax_3 = arg1;
006a7201      void* eax_5 = ((char*)var_c + 4);
006a7204      var_c = eax_5;
006a7208      void* eax_6 = (eax_5 & 0x80000003);
006a7208      bool cond:0 = eax_6 == 0;
006a7208      
006a720d      if (eax_6 < 0)
006a720d      {
006a7210          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a7213          eax_6 = ((char*)eax_8 + 1);
006a7213          cond:0 = eax_8 == 0xffffffff;
006a720d      }
006a720d      
006a7214      if (!(cond:0))
006a7214      {
006a721b          void* i_1 = (4 - eax_6);
006a721b          
006a721d          if (4 != eax_6)
006a721d          {
006a7231              void* i;
006a7231              
006a7231              do
006a7231              {
006a7224                  *(uint8_t*)var_c = 0;
006a722c                  i = i_1;
006a722c                  i_1 -= 1;
006a722d                  var_c += 1;
006a7231              } while (i != 1);
006a721d          }
006a7214      }
006a7214      
006a723a      int32_t ebx;
006a723a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a723a      
006a7241      if (ebx == 0)
006a7248          Proto_UI::UICounterFailedSend(eax);
006a7248      
006a7252      uint32_t eax_9;
006a7252      eax_9 = ebx;
006a7258      return eax_9;
006a7190  }

006a7259                                                                             90 90 90 90 90 90 90                           .......

006a7260  uint8_t CM_Allegiance::Event_UpdateRequest(int32_t arg1)

006a7260  {
006a7266      uint32_t eax = Proto_UI::GetNextUICounter();
006a727a      int32_t var_8 = 0x801ad4;
006a7282      void* var_c = nullptr;
006a728a      OrderHdr::Pack(&var_8, &var_c, 0);
006a7295      void* eax_1 = operator new[](0x10);
006a72a7      var_c = eax_1;
006a72ad      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a72ba      *(uint32_t*)var_c = 0x1f;
006a72c4      int32_t* eax_3 = ((char*)var_c + 4);
006a72c7      var_c = eax_3;
006a72cb      *(uint32_t*)eax_3 = arg1;
006a72d1      void* eax_5 = ((char*)var_c + 4);
006a72d4      var_c = eax_5;
006a72d8      void* eax_6 = (eax_5 & 0x80000003);
006a72d8      bool cond:0 = eax_6 == 0;
006a72d8      
006a72dd      if (eax_6 < 0)
006a72dd      {
006a72e0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a72e3          eax_6 = ((char*)eax_8 + 1);
006a72e3          cond:0 = eax_8 == 0xffffffff;
006a72dd      }
006a72dd      
006a72e4      if (!(cond:0))
006a72e4      {
006a72eb          void* i_1 = (4 - eax_6);
006a72eb          
006a72ed          if (4 != eax_6)
006a72ed          {
006a7301              void* i;
006a7301              
006a7301              do
006a7301              {
006a72f4                  *(uint8_t*)var_c = 0;
006a72fc                  i = i_1;
006a72fc                  i_1 -= 1;
006a72fd                  var_c += 1;
006a7301              } while (i != 1);
006a72ed          }
006a72e4      }
006a72e4      
006a730a      int32_t ebx;
006a730a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a730a      
006a7311      if (ebx == 0)
006a7318          Proto_UI::UICounterFailedSend(eax);
006a7318      
006a7322      uint32_t eax_9;
006a7322      eax_9 = ebx;
006a7328      return eax_9;
006a7260  }

006a7329                             90 90 90 90 90 90 90                                                           .......

006a7330  uint8_t CM_Allegiance::SendNotice_AllegianceLogin(uint32_t arg1, uint8_t arg2)

006a7330  {
006a733e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd205);
006a733e      
006a7343      if (eax != 0)
006a7343      {
006a7346          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a7346          
006a734b          while (i != 0)
006a734b          {
006a7358              int32_t* esi_1 = *(uint32_t*)i;
006a735c              i = i[1];
006a735c              
006a735f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a7371                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x64)(arg1, arg2);
006a734b          }
006a7343      }
006a7343      
006a737c      eax = 1;
006a737e      return 1;
006a7330  }

006a737f                                                                                               90                                 .

006a7380  uint8_t CM_Allegiance::SendNotice_AllegianceUpdate(class CAllegianceProfile const* arg1, uint32_t arg2)

006a7380  {
006a738e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd206);
006a738e      
006a7393      if (eax != 0)
006a7393      {
006a7396          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a7396          
006a739b          while (i != 0)
006a739b          {
006a73a8              int32_t* esi_1 = *(uint32_t*)i;
006a73ac              i = i[1];
006a73ac              
006a73af              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a73c1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x68)(arg1, arg2);
006a739b          }
006a7393      }
006a7393      
006a73cc      eax = 1;
006a73ce      return 1;
006a7380  }

006a73cf                                               90                                                                 .

006a73d0  uint8_t CM_Allegiance::SendNotice_AllegianceUpdateAborted(uint32_t arg1)

006a73d0  {
006a73de      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd207);
006a73de      
006a73e3      if (eax != 0)
006a73e3      {
006a73e6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a73e6          
006a73eb          while (i != 0)
006a73eb          {
006a73f3              int32_t* edi_1 = *(uint32_t*)i;
006a73f7              i = i[1];
006a73f7              
006a73fa              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a740b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x6c)(arg1);
006a73eb          }
006a73e3      }
006a73e3      
006a7415      eax = 1;
006a7417      return 1;
006a73d0  }

006a7418                                                                          90 90 90 90 90 90 90 90                          ........

006a7420  uint8_t CM_Allegiance::SendNotice_SwearAllegianceRequest(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a7420  {
006a742e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd208);
006a742e      
006a7433      if (eax != 0)
006a7433      {
006a7436          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a7436          
006a743b          while (i != 0)
006a743b          {
006a7448              int32_t* esi_1 = *(uint32_t*)i;
006a744c              i = i[1];
006a744c              
006a744f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a7461                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x70)(arg1, arg2);
006a743b          }
006a7433      }
006a7433      
006a746c      eax = 1;
006a746e      return 1;
006a7420  }

006a746f                                               90                                                                 .

006a7470  uint32_t CM_Allegiance::DispatchUI_AllegianceInfoResponseEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a7470  {
006a7487      if ((arg1 == 0 || arg1->m_pAllegianceSystem == 0))
006a7492          return 0;
006a7492      
006a7493      void* eax_3 = arg2;
006a74a2      bool cond:0 = *(uint32_t*)eax_3 == 0x27c;
006a74a8      arg2 = ((char*)eax_3 + 4);
006a74a8      
006a74af      if (!(cond:0))
006a74bb          return 0;
006a74bb      
006a74bd      uint32_t edi = *(uint32_t*)((char*)eax_3 + 4);
006a74c6      arg2 = ((char*)eax_3 + 8);
006a74cd      void var_118;
006a74cd      CAllegianceProfile::CAllegianceProfile(&var_118);
006a74f1      AllegianceProfile::UnPack(&var_118, &arg2, (((char*)eax_3 - arg2) + arg3));
006a74ff      ClientAllegianceSystem::Handle_Allegiance__AllegianceInfoResponseEvent(arg1->m_pAllegianceSystem, edi, &var_118);
006a750a      void var_114;
006a750a      AllegianceHierarchy::~AllegianceHierarchy(&var_114);
006a751a      return 0;
006a7470  }

006a751b                                                                                   90 90 90 90 90                             .....

006a7520  uint8_t CM_Allegiance::Event_AddAllegianceBan(class AC1Legacy::PStringBase<char> const* arg1)

006a7520  {
006a7526      uint32_t eax = Proto_UI::GetNextUICounter();
006a753c      int32_t var_8 = 0x801ad4;
006a7544      void* var_c = nullptr;
006a754c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a755e      OrderHdr::Pack(&var_8, &var_c, 0);
006a7568      void* eax_2 = operator new[]((eax_1 + 0xc));
006a757a      var_c = eax_2;
006a7580      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a7589      *(uint32_t*)var_c = 0x2a1;
006a759a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a75a4      var_c += 4;
006a75a8      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a75b4      class AC1Legacy::PStringBase<char>* ebx;
006a75b4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a75b4      
006a75bb      if (ebx == 0)
006a75c2          Proto_UI::UICounterFailedSend(eax);
006a75c2      
006a75cc      uint32_t eax_6;
006a75cc      eax_6 = ebx;
006a75d2      return eax_6;
006a7520  }

006a75d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a75e0  uint8_t CM_Allegiance::Event_AllegianceChatBoot(class AC1Legacy::PStringBase<char> const* arg1, class AC1Legacy::PStringBase<char> const* arg2)

006a75e0  {
006a75e7      uint32_t eax = Proto_UI::GetNextUICounter();
006a75fd      int32_t var_8 = 0x801ad4;
006a7605      void* var_c = nullptr;
006a7631      uint32_t esi_1 = (AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0) + AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, 0));
006a7633      OrderHdr::Pack(&var_8, &var_c, 0);
006a763d      void* eax_3 = operator new[]((esi_1 + 0xc));
006a7645      var_c = eax_3;
006a7655      OrderHdr::Pack(&var_8, &var_c, (esi_1 + 0xc));
006a765e      *(uint32_t*)var_c = 0x2a0;
006a766f      uint32_t edx_2 = (((char*)eax_3 - ((char*)var_c + 4)) + (esi_1 + 0xc));
006a7671      var_c += 4;
006a767d      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, edx_2);
006a7694      AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, (((char*)eax_3 - var_c) + (esi_1 + 0xc)));
006a76a0      class AC1Legacy::PStringBase<char>* ebx;
006a76a0      ebx = Proto_UI::SendToWeenie(eax_3, (esi_1 + 0xc));
006a76a0      
006a76a7      if (ebx == 0)
006a76ae          Proto_UI::UICounterFailedSend(eax);
006a76ae      
006a76b9      uint32_t eax_7;
006a76b9      eax_7 = ebx;
006a76bf      return eax_7;
006a75e0  }


006a76c0  uint8_t CM_Allegiance::Event_AllegianceChatGag(class AC1Legacy::PStringBase<char> const* arg1, int32_t arg2)

006a76c0  {
006a76c6      uint32_t eax = Proto_UI::GetNextUICounter();
006a76dc      int32_t var_8 = 0x801ad4;
006a76e4      void* var_c = nullptr;
006a76ec      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a76fe      OrderHdr::Pack(&var_8, &var_c, 0);
006a7708      void* eax_2 = operator new[]((eax_1 + 0x10));
006a771a      var_c = eax_2;
006a7720      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a7729      *(uint32_t*)var_c = 0x41;
006a773a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0x10));
006a7744      var_c += 4;
006a7748      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7755      *(uint32_t*)var_c = arg2;
006a775b      void* eax_8 = ((char*)var_c + 4);
006a775e      var_c = eax_8;
006a7762      void* eax_9 = (eax_8 & 0x80000003);
006a7762      bool cond:0 = eax_9 == 0;
006a7762      
006a7767      if (eax_9 < 0)
006a7767      {
006a776a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a776d          eax_9 = ((char*)eax_11 + 1);
006a776d          cond:0 = eax_11 == 0xffffffff;
006a7767      }
006a7767      
006a776e      if (!(cond:0))
006a776e      {
006a7775          void* i_1 = (4 - eax_9);
006a7775          
006a7777          if (4 != eax_9)
006a7777          {
006a7791              void* i;
006a7791              
006a7791              do
006a7791              {
006a7784                  *(uint8_t*)var_c = 0;
006a778c                  i = i_1;
006a778c                  i_1 -= 1;
006a778d                  var_c += 1;
006a7791              } while (i != 1);
006a7777          }
006a776e      }
006a776e      
006a779a      void* ebx;
006a779a      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a779a      
006a77a1      if (ebx == 0)
006a77a8          Proto_UI::UICounterFailedSend(eax);
006a77a8      
006a77b2      uint32_t eax_12;
006a77b2      eax_12 = ebx;
006a77b8      return eax_12;
006a76c0  }

006a77b9                                                                             90 90 90 90 90 90 90                           .......

006a77c0  uint8_t CM_Allegiance::Event_AllegianceInfoRequest(class AC1Legacy::PStringBase<char> const* arg1)

006a77c0  {
006a77c6      uint32_t eax = Proto_UI::GetNextUICounter();
006a77dc      int32_t var_8 = 0x801ad4;
006a77e4      void* var_c = nullptr;
006a77ec      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a77fe      OrderHdr::Pack(&var_8, &var_c, 0);
006a7808      void* eax_2 = operator new[]((eax_1 + 0xc));
006a781a      var_c = eax_2;
006a7820      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a7829      *(uint32_t*)var_c = 0x27b;
006a783a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a7844      var_c += 4;
006a7848      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7854      class AC1Legacy::PStringBase<char>* ebx;
006a7854      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a7854      
006a785b      if (ebx == 0)
006a7862          Proto_UI::UICounterFailedSend(eax);
006a7862      
006a786c      uint32_t eax_6;
006a786c      eax_6 = ebx;
006a7872      return eax_6;
006a77c0  }

006a7873                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a7880  uint8_t CM_Allegiance::Event_BreakAllegianceBoot(class AC1Legacy::PStringBase<char> const* arg1, int32_t arg2)

006a7880  {
006a7886      uint32_t eax = Proto_UI::GetNextUICounter();
006a789c      int32_t var_8 = 0x801ad4;
006a78a4      void* var_c = nullptr;
006a78ac      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a78be      OrderHdr::Pack(&var_8, &var_c, 0);
006a78c8      void* eax_2 = operator new[]((eax_1 + 0x10));
006a78da      var_c = eax_2;
006a78e0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a78e9      *(uint32_t*)var_c = 0x277;
006a78fa      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0x10));
006a7904      var_c += 4;
006a7908      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7915      *(uint32_t*)var_c = arg2;
006a791b      void* eax_8 = ((char*)var_c + 4);
006a791e      var_c = eax_8;
006a7922      void* eax_9 = (eax_8 & 0x80000003);
006a7922      bool cond:0 = eax_9 == 0;
006a7922      
006a7927      if (eax_9 < 0)
006a7927      {
006a792a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a792d          eax_9 = ((char*)eax_11 + 1);
006a792d          cond:0 = eax_11 == 0xffffffff;
006a7927      }
006a7927      
006a792e      if (!(cond:0))
006a792e      {
006a7935          void* i_1 = (4 - eax_9);
006a7935          
006a7937          if (4 != eax_9)
006a7937          {
006a7951              void* i;
006a7951              
006a7951              do
006a7951              {
006a7944                  *(uint8_t*)var_c = 0;
006a794c                  i = i_1;
006a794c                  i_1 -= 1;
006a794d                  var_c += 1;
006a7951              } while (i != 1);
006a7937          }
006a792e      }
006a792e      
006a795a      void* ebx;
006a795a      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a795a      
006a7961      if (ebx == 0)
006a7968          Proto_UI::UICounterFailedSend(eax);
006a7968      
006a7972      uint32_t eax_12;
006a7972      eax_12 = ebx;
006a7978      return eax_12;
006a7880  }

006a7979                                                                             90 90 90 90 90 90 90                           .......

006a7980  uint8_t CM_Allegiance::Event_RemoveAllegianceBan(class AC1Legacy::PStringBase<char> const* arg1)

006a7980  {
006a7986      uint32_t eax = Proto_UI::GetNextUICounter();
006a799c      int32_t var_8 = 0x801ad4;
006a79a4      void* var_c = nullptr;
006a79ac      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a79be      OrderHdr::Pack(&var_8, &var_c, 0);
006a79c8      void* eax_2 = operator new[]((eax_1 + 0xc));
006a79da      var_c = eax_2;
006a79e0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a79e9      *(uint32_t*)var_c = 0x2a2;
006a79fa      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a7a04      var_c += 4;
006a7a08      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7a14      class AC1Legacy::PStringBase<char>* ebx;
006a7a14      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a7a14      
006a7a1b      if (ebx == 0)
006a7a22          Proto_UI::UICounterFailedSend(eax);
006a7a22      
006a7a2c      uint32_t eax_6;
006a7a2c      eax_6 = ebx;
006a7a32      return eax_6;
006a7980  }

006a7a33                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a7a40  uint8_t CM_Allegiance::Event_RemoveAllegianceOfficer(class AC1Legacy::PStringBase<char> const* arg1)

006a7a40  {
006a7a46      uint32_t eax = Proto_UI::GetNextUICounter();
006a7a5c      int32_t var_8 = 0x801ad4;
006a7a64      void* var_c = nullptr;
006a7a6c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a7a7e      OrderHdr::Pack(&var_8, &var_c, 0);
006a7a88      void* eax_2 = operator new[]((eax_1 + 0xc));
006a7a9a      var_c = eax_2;
006a7aa0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a7aa9      *(uint32_t*)var_c = 0x2a5;
006a7aba      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a7ac4      var_c += 4;
006a7ac8      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7ad4      class AC1Legacy::PStringBase<char>* ebx;
006a7ad4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a7ad4      
006a7adb      if (ebx == 0)
006a7ae2          Proto_UI::UICounterFailedSend(eax);
006a7ae2      
006a7aec      uint32_t eax_6;
006a7aec      eax_6 = ebx;
006a7af2      return eax_6;
006a7a40  }

006a7af3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a7b00  uint8_t CM_Allegiance::Event_SetAllegianceApprovedVassal(class AC1Legacy::PStringBase<char> const* arg1)

006a7b00  {
006a7b06      uint32_t eax = Proto_UI::GetNextUICounter();
006a7b1c      int32_t var_8 = 0x801ad4;
006a7b24      void* var_c = nullptr;
006a7b2c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a7b3e      OrderHdr::Pack(&var_8, &var_c, 0);
006a7b48      void* eax_2 = operator new[]((eax_1 + 0xc));
006a7b5a      var_c = eax_2;
006a7b60      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a7b69      *(uint32_t*)var_c = 0x40;
006a7b7a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a7b84      var_c += 4;
006a7b88      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7b94      class AC1Legacy::PStringBase<char>* ebx;
006a7b94      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a7b94      
006a7b9b      if (ebx == 0)
006a7ba2          Proto_UI::UICounterFailedSend(eax);
006a7ba2      
006a7bac      uint32_t eax_6;
006a7bac      eax_6 = ebx;
006a7bb2      return eax_6;
006a7b00  }

006a7bb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a7bc0  uint8_t CM_Allegiance::Event_SetAllegianceName(class AC1Legacy::PStringBase<char> const* arg1)

006a7bc0  {
006a7bc6      uint32_t eax = Proto_UI::GetNextUICounter();
006a7bdc      int32_t var_8 = 0x801ad4;
006a7be4      void* var_c = nullptr;
006a7bec      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a7bfe      OrderHdr::Pack(&var_8, &var_c, 0);
006a7c08      void* eax_2 = operator new[]((eax_1 + 0xc));
006a7c1a      var_c = eax_2;
006a7c20      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a7c29      *(uint32_t*)var_c = 0x33;
006a7c3a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a7c44      var_c += 4;
006a7c48      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7c54      class AC1Legacy::PStringBase<char>* ebx;
006a7c54      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a7c54      
006a7c5b      if (ebx == 0)
006a7c62          Proto_UI::UICounterFailedSend(eax);
006a7c62      
006a7c6c      uint32_t eax_6;
006a7c6c      eax_6 = ebx;
006a7c72      return eax_6;
006a7bc0  }

006a7c73                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006a7c80  uint8_t CM_Allegiance::Event_SetAllegianceOfficer(class AC1Legacy::PStringBase<char> const* arg1, uint32_t arg2)

006a7c80  {
006a7c86      uint32_t eax = Proto_UI::GetNextUICounter();
006a7c9c      int32_t var_8 = 0x801ad4;
006a7ca4      void* var_c = nullptr;
006a7cac      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a7cbe      OrderHdr::Pack(&var_8, &var_c, 0);
006a7cc8      void* eax_2 = operator new[]((eax_1 + 0x10));
006a7cda      var_c = eax_2;
006a7ce0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a7ce9      *(uint32_t*)var_c = 0x3b;
006a7cfa      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0x10));
006a7d04      var_c += 4;
006a7d08      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7d15      *(uint32_t*)var_c = arg2;
006a7d1b      void* eax_8 = ((char*)var_c + 4);
006a7d1e      var_c = eax_8;
006a7d22      void* eax_9 = (eax_8 & 0x80000003);
006a7d22      bool cond:0 = eax_9 == 0;
006a7d22      
006a7d27      if (eax_9 < 0)
006a7d27      {
006a7d2a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a7d2d          eax_9 = ((char*)eax_11 + 1);
006a7d2d          cond:0 = eax_11 == 0xffffffff;
006a7d27      }
006a7d27      
006a7d2e      if (!(cond:0))
006a7d2e      {
006a7d35          void* i_1 = (4 - eax_9);
006a7d35          
006a7d37          if (4 != eax_9)
006a7d37          {
006a7d51              void* i;
006a7d51              
006a7d51              do
006a7d51              {
006a7d44                  *(uint8_t*)var_c = 0;
006a7d4c                  i = i_1;
006a7d4c                  i_1 -= 1;
006a7d4d                  var_c += 1;
006a7d51              } while (i != 1);
006a7d37          }
006a7d2e      }
006a7d2e      
006a7d5a      void* ebx;
006a7d5a      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a7d5a      
006a7d61      if (ebx == 0)
006a7d68          Proto_UI::UICounterFailedSend(eax);
006a7d68      
006a7d72      uint32_t eax_12;
006a7d72      eax_12 = ebx;
006a7d78      return eax_12;
006a7c80  }

006a7d79                                                                             90 90 90 90 90 90 90                           .......

006a7d80  uint8_t CM_Allegiance::Event_SetAllegianceOfficerTitle(uint32_t arg1, class AC1Legacy::PStringBase<char> const* arg2)

006a7d80  {
006a7d86      uint32_t eax = Proto_UI::GetNextUICounter();
006a7d9c      int32_t var_8 = 0x801ad4;
006a7da4      void* var_c = nullptr;
006a7dac      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, 0);
006a7dbe      OrderHdr::Pack(&var_8, &var_c, 0);
006a7dc8      void* eax_2 = operator new[]((eax_1 + 0x10));
006a7dda      var_c = eax_2;
006a7de0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a7ded      *(uint32_t*)var_c = 0x3c;
006a7df7      uint32_t* eax_5 = ((char*)var_c + 4);
006a7dfa      var_c = eax_5;
006a7dfe      *(uint32_t*)eax_5 = arg1;
006a7e04      void* eax_7 = ((char*)var_c + 4);
006a7e09      void* ecx_5 = (eax_7 & 0x80000003);
006a7e09      bool cond:1 = ecx_5 == 0;
006a7e0f      var_c = eax_7;
006a7e0f      
006a7e13      if (ecx_5 < 0)
006a7e13      {
006a7e16          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006a7e19          ecx_5 = ((char*)ecx_7 + 1);
006a7e19          cond:1 = ecx_7 == 0xffffffff;
006a7e13      }
006a7e13      
006a7e1a      if (!(cond:1))
006a7e1a      {
006a7e21          void* i_1 = (4 - ecx_5);
006a7e21          
006a7e23          if (4 != ecx_5)
006a7e23          {
006a7e32              void* i;
006a7e32              
006a7e32              do
006a7e32              {
006a7e25                  *(uint8_t*)eax_7 = 0;
006a7e2c                  eax_7 = ((char*)var_c + 1);
006a7e2d                  i = i_1;
006a7e2d                  i_1 -= 1;
006a7e2e                  var_c = eax_7;
006a7e32              } while (i != 1);
006a7e23          }
006a7e1a      }
006a7e1a      
006a7e42      AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, (((char*)eax_2 - eax_7) + (eax_1 + 0x10)));
006a7e4e      class AC1Legacy::PStringBase<char>* ebx;
006a7e4e      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a7e4e      
006a7e55      if (ebx == 0)
006a7e5c          Proto_UI::UICounterFailedSend(eax);
006a7e5c      
006a7e6c      return ebx;
006a7d80  }

006a7e6d                                         90 90 90                                                               ...

006a7e70  uint8_t CM_Allegiance::Event_SetMotd(class AC1Legacy::PStringBase<char> const* arg1)

006a7e70  {
006a7e76      uint32_t eax = Proto_UI::GetNextUICounter();
006a7e8c      int32_t var_8 = 0x801ad4;
006a7e94      void* var_c = nullptr;
006a7e9c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006a7eae      OrderHdr::Pack(&var_8, &var_c, 0);
006a7eb8      void* eax_2 = operator new[]((eax_1 + 0xc));
006a7eca      var_c = eax_2;
006a7ed0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006a7ed9      *(uint32_t*)var_c = 0x254;
006a7eea      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006a7ef4      var_c += 4;
006a7ef8      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006a7f04      class AC1Legacy::PStringBase<char>* ebx;
006a7f04      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006a7f04      
006a7f0b      if (ebx == 0)
006a7f12          Proto_UI::UICounterFailedSend(eax);
006a7f12      
006a7f1c      uint32_t eax_6;
006a7f1c      eax_6 = ebx;
006a7f22      return eax_6;
006a7e70  }

006a7f23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006a7f30  uint8_t CM_Train::Event_TrainAttribute(uint32_t arg1, uint32_t arg2)

006a7f30  {
006a7f36      uint32_t eax = Proto_UI::GetNextUICounter();
006a7f4a      int32_t var_8 = 0x801ad4;
006a7f52      void* var_c = nullptr;
006a7f5a      OrderHdr::Pack(&var_8, &var_c, 0);
006a7f65      void* eax_1 = operator new[](0x14);
006a7f77      var_c = eax_1;
006a7f7d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a7f8a      *(uint32_t*)var_c = 0x45;
006a7f94      uint32_t* eax_3 = ((char*)var_c + 4);
006a7f97      var_c = eax_3;
006a7f9b      *(uint32_t*)eax_3 = arg1;
006a7fa1      void* eax_5 = ((char*)var_c + 4);
006a7fa6      void* ecx_4 = (eax_5 & 0x80000003);
006a7fa6      bool cond:1 = ecx_4 == 0;
006a7fac      var_c = eax_5;
006a7fac      
006a7fb0      if (ecx_4 < 0)
006a7fb0      {
006a7fb3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a7fb6          ecx_4 = ((char*)ecx_6 + 1);
006a7fb6          cond:1 = ecx_6 == 0xffffffff;
006a7fb0      }
006a7fb0      
006a7fb7      if (!(cond:1))
006a7fb7      {
006a7fbe          void* i_3 = (4 - ecx_4);
006a7fbe          
006a7fc0          if (4 != ecx_4)
006a7fc0          {
006a7fcf              void* i;
006a7fcf              
006a7fcf              do
006a7fcf              {
006a7fc2                  *(uint8_t*)eax_5 = 0;
006a7fc9                  eax_5 = ((char*)var_c + 1);
006a7fca                  i = i_3;
006a7fca                  i_3 -= 1;
006a7fcb                  var_c = eax_5;
006a7fcf              } while (i != 1);
006a7fc0          }
006a7fb7      }
006a7fb7      
006a7fd5      *(uint32_t*)eax_5 = arg2;
006a7fdb      void* eax_8 = ((char*)var_c + 4);
006a7fde      var_c = eax_8;
006a7fe2      void* eax_9 = (eax_8 & 0x80000003);
006a7fe2      bool cond:2 = eax_9 == 0;
006a7fe2      
006a7fe7      if (eax_9 < 0)
006a7fe7      {
006a7fea          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a7fed          eax_9 = ((char*)eax_11 + 1);
006a7fed          cond:2 = eax_11 == 0xffffffff;
006a7fe7      }
006a7fe7      
006a7fee      if (!(cond:2))
006a7fee      {
006a7ff5          void* i_2 = (4 - eax_9);
006a7ff5          
006a7ff7          if (4 != eax_9)
006a7ff7          {
006a8011              void* i_1;
006a8011              
006a8011              do
006a8011              {
006a8004                  *(uint8_t*)var_c = 0;
006a800c                  i_1 = i_2;
006a800c                  i_2 -= 1;
006a800d                  var_c += 1;
006a8011              } while (i_1 != 1);
006a7ff7          }
006a7fee      }
006a7fee      
006a801a      int32_t ebx;
006a801a      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a801a      
006a8021      if (ebx == 0)
006a8028          Proto_UI::UICounterFailedSend(eax);
006a8028      
006a8038      return ebx;
006a7f30  }

006a8039                                                                             90 90 90 90 90 90 90                           .......

006a8040  uint8_t CM_Train::Event_TrainAttribute2nd(uint32_t arg1, uint32_t arg2)

006a8040  {
006a8046      uint32_t eax = Proto_UI::GetNextUICounter();
006a805a      int32_t var_8 = 0x801ad4;
006a8062      void* var_c = nullptr;
006a806a      OrderHdr::Pack(&var_8, &var_c, 0);
006a8075      void* eax_1 = operator new[](0x14);
006a8087      var_c = eax_1;
006a808d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a809a      *(uint32_t*)var_c = 0x44;
006a80a4      uint32_t* eax_3 = ((char*)var_c + 4);
006a80a7      var_c = eax_3;
006a80ab      *(uint32_t*)eax_3 = arg1;
006a80b1      void* eax_5 = ((char*)var_c + 4);
006a80b6      void* ecx_4 = (eax_5 & 0x80000003);
006a80b6      bool cond:1 = ecx_4 == 0;
006a80bc      var_c = eax_5;
006a80bc      
006a80c0      if (ecx_4 < 0)
006a80c0      {
006a80c3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a80c6          ecx_4 = ((char*)ecx_6 + 1);
006a80c6          cond:1 = ecx_6 == 0xffffffff;
006a80c0      }
006a80c0      
006a80c7      if (!(cond:1))
006a80c7      {
006a80ce          void* i_3 = (4 - ecx_4);
006a80ce          
006a80d0          if (4 != ecx_4)
006a80d0          {
006a80df              void* i;
006a80df              
006a80df              do
006a80df              {
006a80d2                  *(uint8_t*)eax_5 = 0;
006a80d9                  eax_5 = ((char*)var_c + 1);
006a80da                  i = i_3;
006a80da                  i_3 -= 1;
006a80db                  var_c = eax_5;
006a80df              } while (i != 1);
006a80d0          }
006a80c7      }
006a80c7      
006a80e5      *(uint32_t*)eax_5 = arg2;
006a80eb      void* eax_8 = ((char*)var_c + 4);
006a80ee      var_c = eax_8;
006a80f2      void* eax_9 = (eax_8 & 0x80000003);
006a80f2      bool cond:2 = eax_9 == 0;
006a80f2      
006a80f7      if (eax_9 < 0)
006a80f7      {
006a80fa          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a80fd          eax_9 = ((char*)eax_11 + 1);
006a80fd          cond:2 = eax_11 == 0xffffffff;
006a80f7      }
006a80f7      
006a80fe      if (!(cond:2))
006a80fe      {
006a8105          void* i_2 = (4 - eax_9);
006a8105          
006a8107          if (4 != eax_9)
006a8107          {
006a8121              void* i_1;
006a8121              
006a8121              do
006a8121              {
006a8114                  *(uint8_t*)var_c = 0;
006a811c                  i_1 = i_2;
006a811c                  i_2 -= 1;
006a811d                  var_c += 1;
006a8121              } while (i_1 != 1);
006a8107          }
006a80fe      }
006a80fe      
006a812a      int32_t ebx;
006a812a      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a812a      
006a8131      if (ebx == 0)
006a8138          Proto_UI::UICounterFailedSend(eax);
006a8138      
006a8148      return ebx;
006a8040  }

006a8149                             90 90 90 90 90 90 90                                                           .......

006a8150  uint8_t CM_Train::Event_TrainSkill(uint32_t arg1, uint32_t arg2)

006a8150  {
006a8156      uint32_t eax = Proto_UI::GetNextUICounter();
006a816a      int32_t var_8 = 0x801ad4;
006a8172      void* var_c = nullptr;
006a817a      OrderHdr::Pack(&var_8, &var_c, 0);
006a8185      void* eax_1 = operator new[](0x14);
006a8197      var_c = eax_1;
006a819d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a81aa      *(uint32_t*)var_c = 0x46;
006a81b4      uint32_t* eax_3 = ((char*)var_c + 4);
006a81b7      var_c = eax_3;
006a81bb      *(uint32_t*)eax_3 = arg1;
006a81c1      void* eax_5 = ((char*)var_c + 4);
006a81c6      void* ecx_4 = (eax_5 & 0x80000003);
006a81c6      bool cond:1 = ecx_4 == 0;
006a81cc      var_c = eax_5;
006a81cc      
006a81d0      if (ecx_4 < 0)
006a81d0      {
006a81d3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a81d6          ecx_4 = ((char*)ecx_6 + 1);
006a81d6          cond:1 = ecx_6 == 0xffffffff;
006a81d0      }
006a81d0      
006a81d7      if (!(cond:1))
006a81d7      {
006a81de          void* i_3 = (4 - ecx_4);
006a81de          
006a81e0          if (4 != ecx_4)
006a81e0          {
006a81ef              void* i;
006a81ef              
006a81ef              do
006a81ef              {
006a81e2                  *(uint8_t*)eax_5 = 0;
006a81e9                  eax_5 = ((char*)var_c + 1);
006a81ea                  i = i_3;
006a81ea                  i_3 -= 1;
006a81eb                  var_c = eax_5;
006a81ef              } while (i != 1);
006a81e0          }
006a81d7      }
006a81d7      
006a81f5      *(uint32_t*)eax_5 = arg2;
006a81fb      void* eax_8 = ((char*)var_c + 4);
006a81fe      var_c = eax_8;
006a8202      void* eax_9 = (eax_8 & 0x80000003);
006a8202      bool cond:2 = eax_9 == 0;
006a8202      
006a8207      if (eax_9 < 0)
006a8207      {
006a820a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a820d          eax_9 = ((char*)eax_11 + 1);
006a820d          cond:2 = eax_11 == 0xffffffff;
006a8207      }
006a8207      
006a820e      if (!(cond:2))
006a820e      {
006a8215          void* i_2 = (4 - eax_9);
006a8215          
006a8217          if (4 != eax_9)
006a8217          {
006a8231              void* i_1;
006a8231              
006a8231              do
006a8231              {
006a8224                  *(uint8_t*)var_c = 0;
006a822c                  i_1 = i_2;
006a822c                  i_2 -= 1;
006a822d                  var_c += 1;
006a8231              } while (i_1 != 1);
006a8217          }
006a820e      }
006a820e      
006a823a      int32_t ebx;
006a823a      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a823a      
006a8241      if (ebx == 0)
006a8248          Proto_UI::UICounterFailedSend(eax);
006a8248      
006a8258      return ebx;
006a8150  }

006a8259                                                                             90 90 90 90 90 90 90                           .......

006a8260  uint8_t CM_Train::Event_TrainSkillAdvancementClass(uint32_t arg1, uint32_t arg2)

006a8260  {
006a8266      uint32_t eax = Proto_UI::GetNextUICounter();
006a827a      int32_t var_8 = 0x801ad4;
006a8282      void* var_c = nullptr;
006a828a      OrderHdr::Pack(&var_8, &var_c, 0);
006a8295      void* eax_1 = operator new[](0x14);
006a82a7      var_c = eax_1;
006a82ad      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a82ba      *(uint32_t*)var_c = 0x47;
006a82c4      uint32_t* eax_3 = ((char*)var_c + 4);
006a82c7      var_c = eax_3;
006a82cb      *(uint32_t*)eax_3 = arg1;
006a82d1      void* eax_5 = ((char*)var_c + 4);
006a82d6      void* ecx_4 = (eax_5 & 0x80000003);
006a82d6      bool cond:1 = ecx_4 == 0;
006a82dc      var_c = eax_5;
006a82dc      
006a82e0      if (ecx_4 < 0)
006a82e0      {
006a82e3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a82e6          ecx_4 = ((char*)ecx_6 + 1);
006a82e6          cond:1 = ecx_6 == 0xffffffff;
006a82e0      }
006a82e0      
006a82e7      if (!(cond:1))
006a82e7      {
006a82ee          void* i_3 = (4 - ecx_4);
006a82ee          
006a82f0          if (4 != ecx_4)
006a82f0          {
006a82ff              void* i;
006a82ff              
006a82ff              do
006a82ff              {
006a82f2                  *(uint8_t*)eax_5 = 0;
006a82f9                  eax_5 = ((char*)var_c + 1);
006a82fa                  i = i_3;
006a82fa                  i_3 -= 1;
006a82fb                  var_c = eax_5;
006a82ff              } while (i != 1);
006a82f0          }
006a82e7      }
006a82e7      
006a8305      *(uint32_t*)eax_5 = arg2;
006a830b      void* eax_8 = ((char*)var_c + 4);
006a830e      var_c = eax_8;
006a8312      void* eax_9 = (eax_8 & 0x80000003);
006a8312      bool cond:2 = eax_9 == 0;
006a8312      
006a8317      if (eax_9 < 0)
006a8317      {
006a831a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a831d          eax_9 = ((char*)eax_11 + 1);
006a831d          cond:2 = eax_11 == 0xffffffff;
006a8317      }
006a8317      
006a831e      if (!(cond:2))
006a831e      {
006a8325          void* i_2 = (4 - eax_9);
006a8325          
006a8327          if (4 != eax_9)
006a8327          {
006a8341              void* i_1;
006a8341              
006a8341              do
006a8341              {
006a8334                  *(uint8_t*)var_c = 0;
006a833c                  i_1 = i_2;
006a833c                  i_2 -= 1;
006a833d                  var_c += 1;
006a8341              } while (i_1 != 1);
006a8327          }
006a831e      }
006a831e      
006a834a      int32_t ebx;
006a834a      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a834a      
006a8351      if (ebx == 0)
006a8358          Proto_UI::UICounterFailedSend(eax);
006a8358      
006a8368      return ebx;
006a8260  }

006a8369                             90 90 90 90 90 90 90                                                           .......

006a8370  uint8_t CM_Train::SendNotice_SkillAdvancementClassChanged()

006a8370  {
006a837e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd241);
006a837e      
006a8383      if (eax != 0)
006a8383      {
006a8386          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a8386          
006a838b          if (i != 0)
006a838b          {
006a838d              int32_t edi;
006a838d              int32_t var_8_1 = edi;
006a838d              
006a83af              do
006a83af              {
006a8390                  int32_t* edi_2 = *(uint32_t*)i;
006a8394                  i = i[1];
006a8394                  
006a8397                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a83a7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x210)();
006a83af              } while (i != 0);
006a838b          }
006a8383      }
006a8383      
006a83b3      eax = 1;
006a83b5      return 1;
006a8370  }

006a83b6                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a83c0  uint8_t CM_Advocate::Event_Teleport(class AC1Legacy::PStringBase<char> const* arg1, class Position const* arg2)

006a83c0  {
006a83c7      uint32_t eax = Proto_UI::GetNextUICounter();
006a83dd      int32_t var_8 = 0x801ad4;
006a83e5      void* var_c = nullptr;
006a8411      int32_t esi_1 = (AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0) + arg2->vtable->Pack(&var_c, 0));
006a8413      OrderHdr::Pack(&var_8, &var_c, 0);
006a841d      void* eax_3 = operator new[]((esi_1 + 0xc));
006a842f      var_c = eax_3;
006a8435      OrderHdr::Pack(&var_8, &var_c, (esi_1 + 0xc));
006a843e      *(uint32_t*)var_c = 0xd6;
006a844f      uint32_t ecx_6 = (((char*)eax_3 - ((char*)var_c + 4)) + (esi_1 + 0xc));
006a8459      var_c += 4;
006a845d      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_6);
006a8466      arg2->vtable->Pack(&var_c, (((char*)eax_3 - var_c) + (esi_1 + 0xc)));
006a8480      void* ebx;
006a8480      ebx = Proto_UI::SendToWeenie(eax_3, (esi_1 + 0xc));
006a8480      
006a8487      if (ebx == 0)
006a848e          Proto_UI::UICounterFailedSend(eax);
006a848e      
006a8499      uint32_t eax_8;
006a8499      eax_8 = ebx;
006a849f      return eax_8;
006a83c0  }


006a84a0  uint32_t CM_Item::DispatchUI_AppraiseDone(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a84a0  {
006a84a6      if (arg1 != 0)
006a84a6      {
006a84a8          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a84a8          
006a84b9          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x1cb))
006a84c2              DBOCache::GetCollection(m_pUISystem, *(uint32_t*)((char*)arg2 + 4));
006a84a6      }
006a84a6      
006a84bd      return 0;
006a84a0  }

006a84c8                          90 90 90 90 90 90 90 90                                                          ........

006a84d0  uint32_t CM_Item::DispatchUI_QueryItemManaResponse(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a84d0  {
006a84d6      if (arg1 != 0)
006a84d6      {
006a84d8          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a84d8          
006a84ee          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x264))
006a84ee          {
006a84f6              class UIQueueManager* esi = *(uint32_t*)((char*)arg2 + 8);
006a8504              arg1 = esi;
006a8508              ClientUISystem::Handle_Item__QueryItemManaResponse(m_pUISystem, *(uint32_t*)((char*)arg2 + 4), esi, *(uint32_t*)((char*)arg2 + 0xc));
006a84ee          }
006a84d6      }
006a84d6      
006a84f2      return 0;
006a84d0  }

006a850f                                               90                                                                 .

006a8510  uint32_t CM_Item::DispatchUI_UseDone(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a8510  {
006a8516      if (arg1 != 0)
006a8516      {
006a8518          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006a8518          
006a8529          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x1c7))
006a8532              ClientUISystem::Handle_Item__UseDone(m_pUISystem, *(uint32_t*)((char*)arg2 + 4));
006a8516      }
006a8516      
006a852d      return 0;
006a8510  }

006a8538                                                                          90 90 90 90 90 90 90 90                          ........

006a8540  uint8_t CM_Item::Event_Appraise(uint32_t arg1)

006a8540  {
006a8546      uint32_t eax = Proto_UI::GetNextUICounter();
006a855a      int32_t var_8 = 0x801ad4;
006a8562      void* var_c = nullptr;
006a856a      OrderHdr::Pack(&var_8, &var_c, 0);
006a8575      void* eax_1 = operator new[](0x10);
006a8587      var_c = eax_1;
006a858d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a859a      *(uint32_t*)var_c = 0xc8;
006a85a4      uint32_t* eax_3 = ((char*)var_c + 4);
006a85a7      var_c = eax_3;
006a85ab      *(uint32_t*)eax_3 = arg1;
006a85b1      void* eax_5 = ((char*)var_c + 4);
006a85b4      var_c = eax_5;
006a85b8      void* eax_6 = (eax_5 & 0x80000003);
006a85b8      bool cond:0 = eax_6 == 0;
006a85b8      
006a85bd      if (eax_6 < 0)
006a85bd      {
006a85c0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a85c3          eax_6 = ((char*)eax_8 + 1);
006a85c3          cond:0 = eax_8 == 0xffffffff;
006a85bd      }
006a85bd      
006a85c4      if (!(cond:0))
006a85c4      {
006a85cb          void* i_1 = (4 - eax_6);
006a85cb          
006a85cd          if (4 != eax_6)
006a85cd          {
006a85e1              void* i;
006a85e1              
006a85e1              do
006a85e1              {
006a85d4                  *(uint8_t*)var_c = 0;
006a85dc                  i = i_1;
006a85dc                  i_1 -= 1;
006a85dd                  var_c += 1;
006a85e1              } while (i != 1);
006a85cd          }
006a85c4      }
006a85c4      
006a85ea      int32_t ebx;
006a85ea      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a85ea      
006a85f1      if (ebx == 0)
006a85f8          Proto_UI::UICounterFailedSend(eax);
006a85f8      
006a8602      uint32_t eax_9;
006a8602      eax_9 = ebx;
006a8608      return eax_9;
006a8540  }

006a8609                             90 90 90 90 90 90 90                                                           .......

006a8610  uint8_t CM_Item::Event_QueryItemMana(uint32_t arg1)

006a8610  {
006a8616      uint32_t eax = Proto_UI::GetNextUICounter();
006a862a      int32_t var_8 = 0x801ad4;
006a8632      void* var_c = nullptr;
006a863a      OrderHdr::Pack(&var_8, &var_c, 0);
006a8645      void* eax_1 = operator new[](0x10);
006a8657      var_c = eax_1;
006a865d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a866a      *(uint32_t*)var_c = 0x263;
006a8674      uint32_t* eax_3 = ((char*)var_c + 4);
006a8677      var_c = eax_3;
006a867b      *(uint32_t*)eax_3 = arg1;
006a8681      void* eax_5 = ((char*)var_c + 4);
006a8684      var_c = eax_5;
006a8688      void* eax_6 = (eax_5 & 0x80000003);
006a8688      bool cond:0 = eax_6 == 0;
006a8688      
006a868d      if (eax_6 < 0)
006a868d      {
006a8690          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a8693          eax_6 = ((char*)eax_8 + 1);
006a8693          cond:0 = eax_8 == 0xffffffff;
006a868d      }
006a868d      
006a8694      if (!(cond:0))
006a8694      {
006a869b          void* i_1 = (4 - eax_6);
006a869b          
006a869d          if (4 != eax_6)
006a869d          {
006a86b1              void* i;
006a86b1              
006a86b1              do
006a86b1              {
006a86a4                  *(uint8_t*)var_c = 0;
006a86ac                  i = i_1;
006a86ac                  i_1 -= 1;
006a86ad                  var_c += 1;
006a86b1              } while (i != 1);
006a869d          }
006a8694      }
006a8694      
006a86ba      int32_t ebx;
006a86ba      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a86ba      
006a86c1      if (ebx == 0)
006a86c8          Proto_UI::UICounterFailedSend(eax);
006a86c8      
006a86d2      uint32_t eax_9;
006a86d2      eax_9 = ebx;
006a86d8      return eax_9;
006a8610  }

006a86d9                                                                             90 90 90 90 90 90 90                           .......

006a86e0  uint8_t CM_Item::SendNotice_BeginDrag(uint32_t arg1, uint32_t arg2, uint8_t arg3)

006a86e0  {
006a86ee      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd263);
006a86ee      
006a86f3      if (eax != 0)
006a86f3      {
006a86f6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a86f6          
006a86fb          while (i != 0)
006a86fb          {
006a8708              int32_t* esi_1 = *(uint32_t*)i;
006a870c              i = i[1];
006a870c              
006a870f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a8726                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x144)(arg1, arg2, arg3);
006a86fb          }
006a86f3      }
006a86f3      
006a8734      eax = 1;
006a8736      return 1;
006a86e0  }

006a8737                                                                       90 90 90 90 90 90 90 90 90                         .........

006a8740  uint8_t CM_Item::SendNotice_EndPendingInPlayer()

006a8740  {
006a874e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd25d);
006a874e      
006a8753      if (eax != 0)
006a8753      {
006a8756          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a8756          
006a875b          if (i != 0)
006a875b          {
006a875d              int32_t edi;
006a875d              int32_t var_8_1 = edi;
006a875d              
006a877f              do
006a877f              {
006a8760                  int32_t* edi_2 = *(uint32_t*)i;
006a8764                  i = i[1];
006a8764                  
006a8767                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a8777                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x148)();
006a877f              } while (i != 0);
006a875b          }
006a8753      }
006a8753      
006a8783      eax = 1;
006a8785      return 1;
006a8740  }

006a8786                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006a8790  uint8_t CM_Item::SendNotice_ItemListBeginDrag(class UIElement const* arg1, int32_t arg2)

006a8790  {
006a879e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd256);
006a879e      
006a87a3      if (eax != 0)
006a87a3      {
006a87a6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a87a6          
006a87ab          while (i != 0)
006a87ab          {
006a87b8              int32_t* esi_1 = *(uint32_t*)i;
006a87bc              i = i[1];
006a87bc              
006a87bf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a87d1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x14c)(arg1, arg2);
006a87ab          }
006a87a3      }
006a87a3      
006a87df      eax = 1;
006a87e1      return 1;
006a8790  }

006a87e2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006a87f0  uint8_t CM_Item::SendNotice_SetGroundObject(uint32_t arg1)

006a87f0  {
006a87fe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1f9);
006a87fe      
006a8803      if (eax != 0)
006a8803      {
006a8806          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a8806          
006a880b          while (i != 0)
006a880b          {
006a8813              int32_t* edi_1 = *(uint32_t*)i;
006a8817              i = i[1];
006a8817              
006a881a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a882b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x154)(arg1);
006a880b          }
006a8803      }
006a8803      
006a8838      eax = 1;
006a883a      return 1;
006a87f0  }

006a883b                                                                                   90 90 90 90 90                             .....

006a8840  uint8_t CM_Item::SendNotice_ShowPendingInPlayer(uint32_t arg1)

006a8840  {
006a884e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd25b);
006a884e      
006a8853      if (eax != 0)
006a8853      {
006a8856          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a8856          
006a885b          while (i != 0)
006a885b          {
006a8863              int32_t* edi_1 = *(uint32_t*)i;
006a8867              i = i[1];
006a8867              
006a886a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a887b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x158)(arg1);
006a885b          }
006a8853      }
006a8853      
006a8888      eax = 1;
006a888a      return 1;
006a8840  }

006a888b                                   90 90 90 90 90                                                             .....

006a8890  uint8_t CM_Item::SendNotice_UpdateItemMana(uint32_t arg1, float arg2, uint8_t arg3)

006a8890  {
006a889e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1f5);
006a889e      
006a88a3      if (eax != 0)
006a88a3      {
006a88a6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a88a6          
006a88ab          while (i != 0)
006a88ab          {
006a88b8              int32_t* esi_1 = *(uint32_t*)i;
006a88bc              i = i[1];
006a88bc              
006a88bf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a88d6                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x160)(arg1, arg2, arg3);
006a88ab          }
006a88a3      }
006a88a3      
006a88e4      eax = 1;
006a88e6      return 1;
006a8890  }

006a88e7                       90 90 90 90 90 90 90 90 90                                                         .........

006a88f0  uint32_t CM_Game::DispatchUI_Recv_GameOver(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a88f0  {
006a88f6      if (arg1 != 0)
006a88f6      {
006a88f8          class ClientMiniGameSystem* m_pMiniGameSystem = arg1->m_pMiniGameSystem;
006a88f8          
006a890e          if ((m_pMiniGameSystem != 0 && *(uint32_t*)arg2 == 0x28c))
006a891a              ClientMiniGameSystem::Handle_Game__Recv_GameOver(m_pMiniGameSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006a88f6      }
006a88f6      
006a8912      return 0;
006a88f0  }


006a8920  uint32_t CM_Game::DispatchUI_Recv_JoinGameResponse(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a8920  {
006a8926      if (arg1 != 0)
006a8926      {
006a8928          class ClientMiniGameSystem* m_pMiniGameSystem = arg1->m_pMiniGameSystem;
006a8928          
006a893e          if ((m_pMiniGameSystem != 0 && *(uint32_t*)arg2 == 0x281))
006a894a              ClientMiniGameSystem::Handle_Game__Recv_JoinGameResponse(m_pMiniGameSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006a8926      }
006a8926      
006a8942      return 0;
006a8920  }


006a8950  uint32_t CM_Game::DispatchUI_Recv_MoveResponse(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a8950  {
006a8956      if (arg1 != 0)
006a8956      {
006a8958          class ClientMiniGameSystem* m_pMiniGameSystem = arg1->m_pMiniGameSystem;
006a8958          
006a896e          if ((m_pMiniGameSystem != 0 && *(uint32_t*)arg2 == 0x283))
006a897a              ClientMiniGameSystem::Handle_Game__Recv_MoveResponse(m_pMiniGameSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006a8956      }
006a8956      
006a8972      return 0;
006a8950  }


006a8980  uint32_t CM_Game::DispatchUI_Recv_OppenentStalemateState(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a8980  {
006a8986      if (arg1 != 0)
006a8986      {
006a8988          class ClientMiniGameSystem* m_pMiniGameSystem = arg1->m_pMiniGameSystem;
006a8988          
006a899e          if ((m_pMiniGameSystem != 0 && *(uint32_t*)arg2 == 0x285))
006a89b2              ClientMiniGameSystem::Handle_Game__Recv_OppenentStalemateState(m_pMiniGameSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8), *(uint32_t*)((char*)arg2 + 0xc));
006a8986      }
006a8986      
006a89a2      return 0;
006a8980  }

006a89b9                                                                             90 90 90 90 90 90 90                           .......

006a89c0  uint32_t CM_Game::DispatchUI_Recv_StartGame(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a89c0  {
006a89c6      if (arg1 != 0)
006a89c6      {
006a89c8          class ClientMiniGameSystem* m_pMiniGameSystem = arg1->m_pMiniGameSystem;
006a89c8          
006a89de          if ((m_pMiniGameSystem != 0 && *(uint32_t*)arg2 == 0x282))
006a89ea              ClientMiniGameSystem::Handle_Game__Recv_StartGame(m_pMiniGameSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006a89c6      }
006a89c6      
006a89e2      return 0;
006a89c0  }


006a89f0  uint8_t CM_Game::Event_Join(uint32_t arg1, uint32_t arg2)

006a89f0  {
006a89f6      uint32_t eax = Proto_UI::GetNextUICounter();
006a8a0a      int32_t var_8 = 0x801ad4;
006a8a12      void* var_c = nullptr;
006a8a1a      OrderHdr::Pack(&var_8, &var_c, 0);
006a8a25      void* eax_1 = operator new[](0x14);
006a8a37      var_c = eax_1;
006a8a3d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a8a4a      *(uint32_t*)var_c = 0x269;
006a8a54      uint32_t* eax_3 = ((char*)var_c + 4);
006a8a57      var_c = eax_3;
006a8a5b      *(uint32_t*)eax_3 = arg1;
006a8a61      void* eax_5 = ((char*)var_c + 4);
006a8a66      void* ecx_4 = (eax_5 & 0x80000003);
006a8a66      bool cond:1 = ecx_4 == 0;
006a8a6c      var_c = eax_5;
006a8a6c      
006a8a70      if (ecx_4 < 0)
006a8a70      {
006a8a73          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a8a76          ecx_4 = ((char*)ecx_6 + 1);
006a8a76          cond:1 = ecx_6 == 0xffffffff;
006a8a70      }
006a8a70      
006a8a77      if (!(cond:1))
006a8a77      {
006a8a7e          void* i_3 = (4 - ecx_4);
006a8a7e          
006a8a80          if (4 != ecx_4)
006a8a80          {
006a8a8f              void* i;
006a8a8f              
006a8a8f              do
006a8a8f              {
006a8a82                  *(uint8_t*)eax_5 = 0;
006a8a89                  eax_5 = ((char*)var_c + 1);
006a8a8a                  i = i_3;
006a8a8a                  i_3 -= 1;
006a8a8b                  var_c = eax_5;
006a8a8f              } while (i != 1);
006a8a80          }
006a8a77      }
006a8a77      
006a8a95      *(uint32_t*)eax_5 = arg2;
006a8a9b      void* eax_8 = ((char*)var_c + 4);
006a8a9e      var_c = eax_8;
006a8aa2      void* eax_9 = (eax_8 & 0x80000003);
006a8aa2      bool cond:2 = eax_9 == 0;
006a8aa2      
006a8aa7      if (eax_9 < 0)
006a8aa7      {
006a8aaa          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a8aad          eax_9 = ((char*)eax_11 + 1);
006a8aad          cond:2 = eax_11 == 0xffffffff;
006a8aa7      }
006a8aa7      
006a8aae      if (!(cond:2))
006a8aae      {
006a8ab5          void* i_2 = (4 - eax_9);
006a8ab5          
006a8ab7          if (4 != eax_9)
006a8ab7          {
006a8ad1              void* i_1;
006a8ad1              
006a8ad1              do
006a8ad1              {
006a8ac4                  *(uint8_t*)var_c = 0;
006a8acc                  i_1 = i_2;
006a8acc                  i_2 -= 1;
006a8acd                  var_c += 1;
006a8ad1              } while (i_1 != 1);
006a8ab7          }
006a8aae      }
006a8aae      
006a8ada      int32_t ebx;
006a8ada      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a8ada      
006a8ae1      if (ebx == 0)
006a8ae8          Proto_UI::UICounterFailedSend(eax);
006a8ae8      
006a8af8      return ebx;
006a89f0  }

006a8af9                                                                             90 90 90 90 90 90 90                           .......

006a8b00  uint8_t CM_Game::Event_Move(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4)

006a8b00  {
006a8b03      int32_t ebx;
006a8b03      int32_t var_10 = ebx;
006a8b06      uint32_t eax = Proto_UI::GetNextUICounter();
006a8b1a      int32_t var_8 = 0x801ad4;
006a8b22      void* var_c = nullptr;
006a8b2a      OrderHdr::Pack(&var_8, &var_c, 0);
006a8b35      void* eax_1 = operator new[](0x1c);
006a8b47      var_c = eax_1;
006a8b4d      OrderHdr::Pack(&var_8, &var_c, 0x1c);
006a8b5a      *(uint32_t*)var_c = 0x26b;
006a8b64      int32_t* eax_3 = ((char*)var_c + 4);
006a8b67      var_c = eax_3;
006a8b6b      *(uint32_t*)eax_3 = arg1;
006a8b71      void* eax_5 = ((char*)var_c + 4);
006a8b76      void* ecx_4 = (eax_5 & 0x80000003);
006a8b76      bool cond:1 = ecx_4 == 0;
006a8b7c      var_c = eax_5;
006a8b7c      
006a8b80      if (ecx_4 < 0)
006a8b80      {
006a8b83          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a8b86          ecx_4 = ((char*)ecx_6 + 1);
006a8b86          cond:1 = ecx_6 == 0xffffffff;
006a8b80      }
006a8b80      
006a8b87      if (!(cond:1))
006a8b87      {
006a8b8e          void* i_5 = (4 - ecx_4);
006a8b8e          
006a8b90          if (4 != ecx_4)
006a8b90          {
006a8b9f              void* i;
006a8b9f              
006a8b9f              do
006a8b9f              {
006a8b92                  *(uint8_t*)eax_5 = 0;
006a8b99                  eax_5 = ((char*)var_c + 1);
006a8b9a                  i = i_5;
006a8b9a                  i_5 -= 1;
006a8b9b                  var_c = eax_5;
006a8b9f              } while (i != 1);
006a8b90          }
006a8b87      }
006a8b87      
006a8ba5      *(uint32_t*)eax_5 = arg2;
006a8bab      void* eax_8 = ((char*)var_c + 4);
006a8bb0      void* ecx_8 = (eax_8 & 0x80000003);
006a8bb0      bool cond:3 = ecx_8 == 0;
006a8bb6      var_c = eax_8;
006a8bb6      
006a8bba      if (ecx_8 < 0)
006a8bba      {
006a8bbd          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006a8bc0          ecx_8 = ((char*)ecx_10 + 1);
006a8bc0          cond:3 = ecx_10 == 0xffffffff;
006a8bba      }
006a8bba      
006a8bc1      if (!(cond:3))
006a8bc1      {
006a8bc8          void* i_6 = (4 - ecx_8);
006a8bc8          
006a8bca          if (4 != ecx_8)
006a8bca          {
006a8bdd              void* i_1;
006a8bdd              
006a8bdd              do
006a8bdd              {
006a8bd0                  *(uint8_t*)eax_8 = 0;
006a8bd7                  eax_8 = ((char*)var_c + 1);
006a8bd8                  i_1 = i_6;
006a8bd8                  i_6 -= 1;
006a8bd9                  var_c = eax_8;
006a8bdd              } while (i_1 != 1);
006a8bca          }
006a8bc1      }
006a8bc1      
006a8be3      *(uint32_t*)eax_8 = arg3;
006a8be9      void* eax_11 = ((char*)var_c + 4);
006a8bee      void* ecx_13 = (eax_11 & 0x80000003);
006a8bee      bool cond:6 = ecx_13 == 0;
006a8bf4      var_c = eax_11;
006a8bf4      
006a8bf8      if (ecx_13 < 0)
006a8bf8      {
006a8bfb          void* ecx_15 = (((char*)ecx_13 - 1) | 0xfffffffc);
006a8bfe          ecx_13 = ((char*)ecx_15 + 1);
006a8bfe          cond:6 = ecx_15 == 0xffffffff;
006a8bf8      }
006a8bf8      
006a8bff      if (!(cond:6))
006a8bff      {
006a8c06          void* i_7 = (4 - ecx_13);
006a8c06          
006a8c08          if (4 != ecx_13)
006a8c08          {
006a8c1d              void* i_2;
006a8c1d              
006a8c1d              do
006a8c1d              {
006a8c10                  *(uint8_t*)eax_11 = 0;
006a8c17                  eax_11 = ((char*)var_c + 1);
006a8c18                  i_2 = i_7;
006a8c18                  i_7 -= 1;
006a8c19                  var_c = eax_11;
006a8c1d              } while (i_2 != 1);
006a8c08          }
006a8bff      }
006a8bff      
006a8c23      *(uint32_t*)eax_11 = arg4;
006a8c29      void* eax_14 = ((char*)var_c + 4);
006a8c2c      var_c = eax_14;
006a8c30      void* eax_15 = (eax_14 & 0x80000003);
006a8c30      bool cond:8 = eax_15 == 0;
006a8c30      
006a8c35      if (eax_15 < 0)
006a8c35      {
006a8c38          void* eax_17 = (((char*)eax_15 - 1) | 0xfffffffc);
006a8c3b          eax_15 = ((char*)eax_17 + 1);
006a8c3b          cond:8 = eax_17 == 0xffffffff;
006a8c35      }
006a8c35      
006a8c3c      if (!(cond:8))
006a8c3c      {
006a8c43          void* i_4 = (4 - eax_15);
006a8c43          
006a8c45          if (4 != eax_15)
006a8c45          {
006a8c61              void* i_3;
006a8c61              
006a8c61              do
006a8c61              {
006a8c54                  *(uint8_t*)var_c = 0;
006a8c5c                  i_3 = i_4;
006a8c5c                  i_4 -= 1;
006a8c5d                  var_c += 1;
006a8c61              } while (i_3 != 1);
006a8c45          }
006a8c3c      }
006a8c3c      
006a8c6a      ebx = Proto_UI::SendToWeenie(eax_1, 0x1c);
006a8c6a      
006a8c71      if (ebx == 0)
006a8c78          Proto_UI::UICounterFailedSend(eax);
006a8c78      
006a8c88      return ebx;
006a8b00  }

006a8c49                             8d a4 24 00 00 00 00                                                           ..$....
006a8c89                             90 90 90 90 90 90 90                                                           .......

006a8c90  uint8_t CM_Game::Event_MovePass()

006a8c90  {
006a8c96      uint32_t eax = Proto_UI::GetNextUICounter();
006a8caa      int32_t var_8 = 0x801ad4;
006a8cb2      void* var_c = nullptr;
006a8cba      OrderHdr::Pack(&var_8, &var_c, 0);
006a8cc5      void* eax_1 = operator new[](0xc);
006a8cd7      var_c = eax_1;
006a8cdd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a8ce6      *(uint32_t*)var_c = 0x26d;
006a8cf5      var_c += 4;
006a8cfe      int32_t ebx;
006a8cfe      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a8cfe      
006a8d05      if (ebx == 0)
006a8d0c          Proto_UI::UICounterFailedSend(eax);
006a8d0c      
006a8d16      uint32_t eax_4;
006a8d16      eax_4 = ebx;
006a8d1c      return eax_4;
006a8c90  }

006a8d1d                                                                                         90 90 90                               ...

006a8d20  uint8_t CM_Game::Event_Quit()

006a8d20  {
006a8d26      uint32_t eax = Proto_UI::GetNextUICounter();
006a8d3a      int32_t var_8 = 0x801ad4;
006a8d42      void* var_c = nullptr;
006a8d4a      OrderHdr::Pack(&var_8, &var_c, 0);
006a8d55      void* eax_1 = operator new[](0xc);
006a8d67      var_c = eax_1;
006a8d6d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a8d76      *(uint32_t*)var_c = 0x26a;
006a8d85      var_c += 4;
006a8d8e      int32_t ebx;
006a8d8e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a8d8e      
006a8d95      if (ebx == 0)
006a8d9c          Proto_UI::UICounterFailedSend(eax);
006a8d9c      
006a8da6      uint32_t eax_4;
006a8da6      eax_4 = ebx;
006a8dac      return eax_4;
006a8d20  }

006a8dad                                         90 90 90                                                               ...

006a8db0  uint8_t CM_Game::Event_Stalemate(int32_t arg1)

006a8db0  {
006a8db6      uint32_t eax = Proto_UI::GetNextUICounter();
006a8dca      int32_t var_8 = 0x801ad4;
006a8dd2      void* var_c = nullptr;
006a8dda      OrderHdr::Pack(&var_8, &var_c, 0);
006a8de5      void* eax_1 = operator new[](0x10);
006a8df7      var_c = eax_1;
006a8dfd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a8e0a      *(uint32_t*)var_c = 0x26e;
006a8e14      int32_t* eax_3 = ((char*)var_c + 4);
006a8e17      var_c = eax_3;
006a8e1b      *(uint32_t*)eax_3 = arg1;
006a8e21      void* eax_5 = ((char*)var_c + 4);
006a8e24      var_c = eax_5;
006a8e28      void* eax_6 = (eax_5 & 0x80000003);
006a8e28      bool cond:0 = eax_6 == 0;
006a8e28      
006a8e2d      if (eax_6 < 0)
006a8e2d      {
006a8e30          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a8e33          eax_6 = ((char*)eax_8 + 1);
006a8e33          cond:0 = eax_8 == 0xffffffff;
006a8e2d      }
006a8e2d      
006a8e34      if (!(cond:0))
006a8e34      {
006a8e3b          void* i_1 = (4 - eax_6);
006a8e3b          
006a8e3d          if (4 != eax_6)
006a8e3d          {
006a8e51              void* i;
006a8e51              
006a8e51              do
006a8e51              {
006a8e44                  *(uint8_t*)var_c = 0;
006a8e4c                  i = i_1;
006a8e4c                  i_1 -= 1;
006a8e4d                  var_c += 1;
006a8e51              } while (i != 1);
006a8e3d          }
006a8e34      }
006a8e34      
006a8e5a      int32_t ebx;
006a8e5a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a8e5a      
006a8e61      if (ebx == 0)
006a8e68          Proto_UI::UICounterFailedSend(eax);
006a8e68      
006a8e72      uint32_t eax_9;
006a8e72      eax_9 = ebx;
006a8e78      return eax_9;
006a8db0  }

006a8e79                                                                             90 90 90 90 90 90 90                           .......

006a8e80  uint32_t CM_Game::DispatchUI_Recv_OpponentTurn(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a8e80  {
006a8e91      if ((arg1 != 0 && arg1->m_pMiniGameSystem != 0))
006a8e91      {
006a8e93          void* eax_2 = arg2;
006a8e9e          bool cond:0_1 = *(uint32_t*)eax_2 == 0x284;
006a8ea4          arg2 = ((char*)eax_2 + 4);
006a8ea4          
006a8ea8          if (cond:0_1)
006a8ea8          {
006a8eb2              uint32_t esi = *(uint32_t*)((char*)eax_2 + 4);
006a8eb7              arg2 = ((char*)eax_2 + 8);
006a8ebc              int32_t edi = *(uint32_t*)((char*)eax_2 + 8);
006a8ec3              arg2 = ((char*)eax_2 + 0xc);
006a8ed5              int32_t var_1c = 0x802894;
006a8edd              int32_t var_18 = 0;
006a8ee5              GameMoveData::UnPack(&var_1c, &arg2, (((eax_2 * 0) - 0xc) + arg3));
006a8ef4              ClientMiniGameSystem::Handle_Game__Recv_OpponentTurn(arg1->m_pMiniGameSystem, esi, edi, &var_1c);
006a8ea8          }
006a8e91      }
006a8e91      
006a8eb0      return 0;
006a8e80  }


006a8f00  uint8_t CM_Game::SendNotice_BeginGame(uint32_t arg1)

006a8f00  {
006a8f0e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd219);
006a8f0e      
006a8f13      if (eax != 0)
006a8f13      {
006a8f16          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a8f16          
006a8f1b          while (i != 0)
006a8f1b          {
006a8f23              int32_t* edi_1 = *(uint32_t*)i;
006a8f27              i = i[1];
006a8f27              
006a8f2a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a8f3b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x100)(arg1);
006a8f1b          }
006a8f13      }
006a8f13      
006a8f48      eax = 1;
006a8f4a      return 1;
006a8f00  }

006a8f4b                                   90 90 90 90 90                                                             .....

006a8f50  uint8_t CM_Game::SendNotice_EndGame()

006a8f50  {
006a8f5e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd21a);
006a8f5e      
006a8f63      if (eax != 0)
006a8f63      {
006a8f66          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a8f66          
006a8f6b          if (i != 0)
006a8f6b          {
006a8f6d              int32_t edi;
006a8f6d              int32_t var_8_1 = edi;
006a8f6d              
006a8f8f              do
006a8f8f              {
006a8f70                  int32_t* edi_2 = *(uint32_t*)i;
006a8f74                  i = i[1];
006a8f74                  
006a8f77                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006a8f87                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x104)();
006a8f8f              } while (i != 0);
006a8f6b          }
006a8f63      }
006a8f63      
006a8f93      eax = 1;
006a8f95      return 1;
006a8f50  }

006a8f96                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a8fa0  uint8_t CM_Game::SendNotice_GameOver(uint32_t arg1, int32_t arg2)

006a8fa0  {
006a8fae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd240);
006a8fae      
006a8fb3      if (eax != 0)
006a8fb3      {
006a8fb6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a8fb6          
006a8fbb          while (i != 0)
006a8fbb          {
006a8fc8              int32_t* esi_1 = *(uint32_t*)i;
006a8fcc              i = i[1];
006a8fcc              
006a8fcf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a8fe1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x108)(arg1, arg2);
006a8fbb          }
006a8fb3      }
006a8fb3      
006a8fef      eax = 1;
006a8ff1      return 1;
006a8fa0  }

006a8ff2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a9000  uint8_t CM_Game::SendNotice_JoinGameResponse(uint32_t arg1, int32_t arg2)

006a9000  {
006a900e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd23b);
006a900e      
006a9013      if (eax != 0)
006a9013      {
006a9016          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9016          
006a901b          while (i != 0)
006a901b          {
006a9028              int32_t* esi_1 = *(uint32_t*)i;
006a902c              i = i[1];
006a902c              
006a902f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a9041                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x10c)(arg1, arg2);
006a901b          }
006a9013      }
006a9013      
006a904f      eax = 1;
006a9051      return 1;
006a9000  }

006a9052                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a9060  uint8_t CM_Game::SendNotice_MoveResponse(uint32_t arg1, int32_t arg2)

006a9060  {
006a906e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd23d);
006a906e      
006a9073      if (eax != 0)
006a9073      {
006a9076          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9076          
006a907b          while (i != 0)
006a907b          {
006a9088              int32_t* esi_1 = *(uint32_t*)i;
006a908c              i = i[1];
006a908c              
006a908f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a90a1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x110)(arg1, arg2);
006a907b          }
006a9073      }
006a9073      
006a90af      eax = 1;
006a90b1      return 1;
006a9060  }

006a90b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a90c0  uint8_t CM_Game::SendNotice_OpponentOffersStalemate(uint32_t arg1, int32_t arg2, int32_t arg3)

006a90c0  {
006a90ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd23f);
006a90ce      
006a90d3      if (eax != 0)
006a90d3      {
006a90d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a90d6          
006a90db          while (i != 0)
006a90db          {
006a90e8              int32_t* esi_1 = *(uint32_t*)i;
006a90ec              i = i[1];
006a90ec              
006a90ef              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a9106                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x114)(arg1, arg2, arg3);
006a90db          }
006a90d3      }
006a90d3      
006a9114      eax = 1;
006a9116      return 1;
006a90c0  }

006a9117                                                                       90 90 90 90 90 90 90 90 90                         .........

006a9120  uint8_t CM_Game::SendNotice_OpponentTurn(uint32_t arg1, int32_t arg2, class GameMoveData const* arg3)

006a9120  {
006a912e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd23e);
006a912e      
006a9133      if (eax != 0)
006a9133      {
006a9136          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9136          
006a913b          while (i != 0)
006a913b          {
006a9148              int32_t* esi_1 = *(uint32_t*)i;
006a914c              i = i[1];
006a914c              
006a914f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a9166                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x118)(arg1, arg2, arg3);
006a913b          }
006a9133      }
006a9133      
006a9174      eax = 1;
006a9176      return 1;
006a9120  }

006a9177                                                                       90 90 90 90 90 90 90 90 90                         .........

006a9180  uint8_t CM_Game::SendNotice_StartGame(uint32_t arg1, int32_t arg2)

006a9180  {
006a918e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd23c);
006a918e      
006a9193      if (eax != 0)
006a9193      {
006a9196          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9196          
006a919b          while (i != 0)
006a919b          {
006a91a8              int32_t* esi_1 = *(uint32_t*)i;
006a91ac              i = i[1];
006a91ac              
006a91af              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a91c1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x11c)(arg1, arg2);
006a919b          }
006a9193      }
006a9193      
006a91cf      eax = 1;
006a91d1      return 1;
006a9180  }

006a91d2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006a91e0  uint8_t CM_Game::SendNotice_TryToQuitGame(uint8_t arg1)

006a91e0  {
006a91ee      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd250);
006a91ee      
006a91f3      if (eax != 0)
006a91f3      {
006a91f6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a91f6          
006a91fb          while (i != 0)
006a91fb          {
006a9203              int32_t* edi_1 = *(uint32_t*)i;
006a9207              i = i[1];
006a9207              
006a920a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a921b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x120)(arg1);
006a91fb          }
006a91f3      }
006a91f3      
006a9228      eax = 1;
006a922a      return 1;
006a91e0  }

006a922b                                   90 90 90 90 90                                                             .....

006a9230  uint8_t CM_Writing::Event_BookAddPage(uint32_t arg1)

006a9230  {
006a9236      uint32_t eax = Proto_UI::GetNextUICounter();
006a924a      int32_t var_8 = 0x801ad4;
006a9252      void* var_c = nullptr;
006a925a      OrderHdr::Pack(&var_8, &var_c, 0);
006a9265      void* eax_1 = operator new[](0x10);
006a9277      var_c = eax_1;
006a927d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a928a      *(uint32_t*)var_c = 0xac;
006a9294      uint32_t* eax_3 = ((char*)var_c + 4);
006a9297      var_c = eax_3;
006a929b      *(uint32_t*)eax_3 = arg1;
006a92a1      void* eax_5 = ((char*)var_c + 4);
006a92a4      var_c = eax_5;
006a92a8      void* eax_6 = (eax_5 & 0x80000003);
006a92a8      bool cond:0 = eax_6 == 0;
006a92a8      
006a92ad      if (eax_6 < 0)
006a92ad      {
006a92b0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a92b3          eax_6 = ((char*)eax_8 + 1);
006a92b3          cond:0 = eax_8 == 0xffffffff;
006a92ad      }
006a92ad      
006a92b4      if (!(cond:0))
006a92b4      {
006a92bb          void* i_1 = (4 - eax_6);
006a92bb          
006a92bd          if (4 != eax_6)
006a92bd          {
006a92d1              void* i;
006a92d1              
006a92d1              do
006a92d1              {
006a92c4                  *(uint8_t*)var_c = 0;
006a92cc                  i = i_1;
006a92cc                  i_1 -= 1;
006a92cd                  var_c += 1;
006a92d1              } while (i != 1);
006a92bd          }
006a92b4      }
006a92b4      
006a92da      int32_t ebx;
006a92da      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a92da      
006a92e1      if (ebx == 0)
006a92e8          Proto_UI::UICounterFailedSend(eax);
006a92e8      
006a92f2      uint32_t eax_9;
006a92f2      eax_9 = ebx;
006a92f8      return eax_9;
006a9230  }

006a92f9                                                                             90 90 90 90 90 90 90                           .......

006a9300  uint8_t CM_Writing::Event_BookData(uint32_t arg1)

006a9300  {
006a9306      uint32_t eax = Proto_UI::GetNextUICounter();
006a931a      int32_t var_8 = 0x801ad4;
006a9322      void* var_c = nullptr;
006a932a      OrderHdr::Pack(&var_8, &var_c, 0);
006a9335      void* eax_1 = operator new[](0x10);
006a9347      var_c = eax_1;
006a934d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a935a      *(uint32_t*)var_c = 0xaa;
006a9364      uint32_t* eax_3 = ((char*)var_c + 4);
006a9367      var_c = eax_3;
006a936b      *(uint32_t*)eax_3 = arg1;
006a9371      void* eax_5 = ((char*)var_c + 4);
006a9374      var_c = eax_5;
006a9378      void* eax_6 = (eax_5 & 0x80000003);
006a9378      bool cond:0 = eax_6 == 0;
006a9378      
006a937d      if (eax_6 < 0)
006a937d      {
006a9380          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a9383          eax_6 = ((char*)eax_8 + 1);
006a9383          cond:0 = eax_8 == 0xffffffff;
006a937d      }
006a937d      
006a9384      if (!(cond:0))
006a9384      {
006a938b          void* i_1 = (4 - eax_6);
006a938b          
006a938d          if (4 != eax_6)
006a938d          {
006a93a1              void* i;
006a93a1              
006a93a1              do
006a93a1              {
006a9394                  *(uint8_t*)var_c = 0;
006a939c                  i = i_1;
006a939c                  i_1 -= 1;
006a939d                  var_c += 1;
006a93a1              } while (i != 1);
006a938d          }
006a9384      }
006a9384      
006a93aa      int32_t ebx;
006a93aa      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a93aa      
006a93b1      if (ebx == 0)
006a93b8          Proto_UI::UICounterFailedSend(eax);
006a93b8      
006a93c2      uint32_t eax_9;
006a93c2      eax_9 = ebx;
006a93c8      return eax_9;
006a9300  }

006a93c9                             90 90 90 90 90 90 90                                                           .......

006a93d0  uint8_t CM_Writing::Event_BookDeletePage(uint32_t arg1, int32_t arg2)

006a93d0  {
006a93d6      uint32_t eax = Proto_UI::GetNextUICounter();
006a93ea      int32_t var_8 = 0x801ad4;
006a93f2      void* var_c = nullptr;
006a93fa      OrderHdr::Pack(&var_8, &var_c, 0);
006a9405      void* eax_1 = operator new[](0x14);
006a9417      var_c = eax_1;
006a941d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a942a      *(uint32_t*)var_c = 0xad;
006a9434      uint32_t* eax_3 = ((char*)var_c + 4);
006a9437      var_c = eax_3;
006a943b      *(uint32_t*)eax_3 = arg1;
006a9441      void* eax_5 = ((char*)var_c + 4);
006a9446      void* ecx_4 = (eax_5 & 0x80000003);
006a9446      bool cond:1 = ecx_4 == 0;
006a944c      var_c = eax_5;
006a944c      
006a9450      if (ecx_4 < 0)
006a9450      {
006a9453          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a9456          ecx_4 = ((char*)ecx_6 + 1);
006a9456          cond:1 = ecx_6 == 0xffffffff;
006a9450      }
006a9450      
006a9457      if (!(cond:1))
006a9457      {
006a945e          void* i_3 = (4 - ecx_4);
006a945e          
006a9460          if (4 != ecx_4)
006a9460          {
006a946f              void* i;
006a946f              
006a946f              do
006a946f              {
006a9462                  *(uint8_t*)eax_5 = 0;
006a9469                  eax_5 = ((char*)var_c + 1);
006a946a                  i = i_3;
006a946a                  i_3 -= 1;
006a946b                  var_c = eax_5;
006a946f              } while (i != 1);
006a9460          }
006a9457      }
006a9457      
006a9475      *(uint32_t*)eax_5 = arg2;
006a947b      void* eax_8 = ((char*)var_c + 4);
006a947e      var_c = eax_8;
006a9482      void* eax_9 = (eax_8 & 0x80000003);
006a9482      bool cond:2 = eax_9 == 0;
006a9482      
006a9487      if (eax_9 < 0)
006a9487      {
006a948a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a948d          eax_9 = ((char*)eax_11 + 1);
006a948d          cond:2 = eax_11 == 0xffffffff;
006a9487      }
006a9487      
006a948e      if (!(cond:2))
006a948e      {
006a9495          void* i_2 = (4 - eax_9);
006a9495          
006a9497          if (4 != eax_9)
006a9497          {
006a94b1              void* i_1;
006a94b1              
006a94b1              do
006a94b1              {
006a94a4                  *(uint8_t*)var_c = 0;
006a94ac                  i_1 = i_2;
006a94ac                  i_2 -= 1;
006a94ad                  var_c += 1;
006a94b1              } while (i_1 != 1);
006a9497          }
006a948e      }
006a948e      
006a94ba      int32_t ebx;
006a94ba      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a94ba      
006a94c1      if (ebx == 0)
006a94c8          Proto_UI::UICounterFailedSend(eax);
006a94c8      
006a94d8      return ebx;
006a93d0  }

006a94d9                                                                             90 90 90 90 90 90 90                           .......

006a94e0  uint8_t CM_Writing::Event_BookPageData(uint32_t arg1, int32_t arg2)

006a94e0  {
006a94e6      uint32_t eax = Proto_UI::GetNextUICounter();
006a94fa      int32_t var_8 = 0x801ad4;
006a9502      void* var_c = nullptr;
006a950a      OrderHdr::Pack(&var_8, &var_c, 0);
006a9515      void* eax_1 = operator new[](0x14);
006a9527      var_c = eax_1;
006a952d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006a953a      *(uint32_t*)var_c = 0xae;
006a9544      uint32_t* eax_3 = ((char*)var_c + 4);
006a9547      var_c = eax_3;
006a954b      *(uint32_t*)eax_3 = arg1;
006a9551      void* eax_5 = ((char*)var_c + 4);
006a9556      void* ecx_4 = (eax_5 & 0x80000003);
006a9556      bool cond:1 = ecx_4 == 0;
006a955c      var_c = eax_5;
006a955c      
006a9560      if (ecx_4 < 0)
006a9560      {
006a9563          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a9566          ecx_4 = ((char*)ecx_6 + 1);
006a9566          cond:1 = ecx_6 == 0xffffffff;
006a9560      }
006a9560      
006a9567      if (!(cond:1))
006a9567      {
006a956e          void* i_3 = (4 - ecx_4);
006a956e          
006a9570          if (4 != ecx_4)
006a9570          {
006a957f              void* i;
006a957f              
006a957f              do
006a957f              {
006a9572                  *(uint8_t*)eax_5 = 0;
006a9579                  eax_5 = ((char*)var_c + 1);
006a957a                  i = i_3;
006a957a                  i_3 -= 1;
006a957b                  var_c = eax_5;
006a957f              } while (i != 1);
006a9570          }
006a9567      }
006a9567      
006a9585      *(uint32_t*)eax_5 = arg2;
006a958b      void* eax_8 = ((char*)var_c + 4);
006a958e      var_c = eax_8;
006a9592      void* eax_9 = (eax_8 & 0x80000003);
006a9592      bool cond:2 = eax_9 == 0;
006a9592      
006a9597      if (eax_9 < 0)
006a9597      {
006a959a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006a959d          eax_9 = ((char*)eax_11 + 1);
006a959d          cond:2 = eax_11 == 0xffffffff;
006a9597      }
006a9597      
006a959e      if (!(cond:2))
006a959e      {
006a95a5          void* i_2 = (4 - eax_9);
006a95a5          
006a95a7          if (4 != eax_9)
006a95a7          {
006a95c1              void* i_1;
006a95c1              
006a95c1              do
006a95c1              {
006a95b4                  *(uint8_t*)var_c = 0;
006a95bc                  i_1 = i_2;
006a95bc                  i_2 -= 1;
006a95bd                  var_c += 1;
006a95c1              } while (i_1 != 1);
006a95a7          }
006a959e      }
006a959e      
006a95ca      int32_t ebx;
006a95ca      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006a95ca      
006a95d1      if (ebx == 0)
006a95d8          Proto_UI::UICounterFailedSend(eax);
006a95d8      
006a95e8      return ebx;
006a94e0  }

006a95e9                             90 90 90 90 90 90 90                                                           .......

006a95f0  uint8_t CM_Writing::SendNotice_BookAddPageResponse(uint32_t arg1, int32_t arg2, int32_t arg3)

006a95f0  {
006a95fe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1ea);
006a95fe      
006a9603      if (eax != 0)
006a9603      {
006a9606          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9606          
006a960b          while (i != 0)
006a960b          {
006a9618              int32_t* esi_1 = *(uint32_t*)i;
006a961c              i = i[1];
006a961c              
006a961f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a9636                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x298)(arg1, arg2, arg3);
006a960b          }
006a9603      }
006a9603      
006a9644      eax = 1;
006a9646      return 1;
006a95f0  }

006a9647                       90 90 90 90 90 90 90 90 90                                                         .........

006a9650  uint8_t CM_Writing::SendNotice_BookDeletePageResponse(uint32_t arg1, int32_t arg2, int32_t arg3)

006a9650  {
006a965e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1eb);
006a965e      
006a9663      if (eax != 0)
006a9663      {
006a9666          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9666          
006a966b          while (i != 0)
006a966b          {
006a9678              int32_t* esi_1 = *(uint32_t*)i;
006a967c              i = i[1];
006a967c              
006a967f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a9696                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x29c)(arg1, arg2, arg3);
006a966b          }
006a9663      }
006a9663      
006a96a4      eax = 1;
006a96a6      return 1;
006a9650  }

006a96a7                       90 90 90 90 90 90 90 90 90                                                         .........

006a96b0  uint8_t CM_Writing::SendNotice_BookPageDataResponse(uint32_t arg1, int32_t arg2, class PageData const* arg3)

006a96b0  {
006a96be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1ec);
006a96be      
006a96c3      if (eax != 0)
006a96c3      {
006a96c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a96c6          
006a96cb          while (i != 0)
006a96cb          {
006a96d8              int32_t* esi_1 = *(uint32_t*)i;
006a96dc              i = i[1];
006a96dc              
006a96df              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a96f6                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x2a0)(arg1, arg2, arg3);
006a96cb          }
006a96c3      }
006a96c3      
006a9704      eax = 1;
006a9706      return 1;
006a96b0  }

006a9707                       90 90 90 90 90 90 90 90 90                                                         .........

006a9710  uint8_t CM_Writing::SendNotice_OpenBook(uint32_t arg1, int32_t arg2, class PageDataList const* arg3, class AC1Legacy::PStringBase<char> const* arg4, uint32_t arg5, class AC1Legacy::PStringBase<char> const* arg6)

006a9710  {
006a971e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1e9);
006a971e      
006a9723      if (eax != 0)
006a9723      {
006a9726          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9726          
006a972b          while (i != 0)
006a972b          {
006a9738              int32_t* esi_1 = *(uint32_t*)i;
006a973c              i = i[1];
006a973c              
006a973f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a9765                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x2a4)(arg1, arg2, arg3, arg4, arg5, arg6);
006a972b          }
006a9723      }
006a9723      
006a9773      eax = 1;
006a9775      return 1;
006a9710  }

006a9776                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006a9780  uint8_t CM_Writing::Event_BookModifyPage(uint32_t arg1, int32_t arg2, class AC1Legacy::PStringBase<char> const* arg3)

006a9780  {
006a9786      uint32_t eax = Proto_UI::GetNextUICounter();
006a979c      int32_t var_8 = 0x801ad4;
006a97a4      void* var_c = nullptr;
006a97ac      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg3, &var_c, 0);
006a97be      OrderHdr::Pack(&var_8, &var_c, 0);
006a97c8      void* eax_2 = operator new[]((eax_1 + 0x14));
006a97da      var_c = eax_2;
006a97e0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x14));
006a97ed      *(uint32_t*)var_c = 0xab;
006a97f7      uint32_t* eax_5 = ((char*)var_c + 4);
006a97fa      var_c = eax_5;
006a97fe      *(uint32_t*)eax_5 = arg1;
006a9804      void* eax_7 = ((char*)var_c + 4);
006a9809      void* ecx_5 = (eax_7 & 0x80000003);
006a9809      bool cond:1 = ecx_5 == 0;
006a980f      var_c = eax_7;
006a980f      
006a9813      if (ecx_5 < 0)
006a9813      {
006a9816          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006a9819          ecx_5 = ((char*)ecx_7 + 1);
006a9819          cond:1 = ecx_7 == 0xffffffff;
006a9813      }
006a9813      
006a981a      if (!(cond:1))
006a981a      {
006a9821          void* i_2 = (4 - ecx_5);
006a9821          
006a9823          if (4 != ecx_5)
006a9823          {
006a9832              void* i;
006a9832              
006a9832              do
006a9832              {
006a9825                  *(uint8_t*)eax_7 = 0;
006a982c                  eax_7 = ((char*)var_c + 1);
006a982d                  i = i_2;
006a982d                  i_2 -= 1;
006a982e                  var_c = eax_7;
006a9832              } while (i != 1);
006a9823          }
006a981a      }
006a981a      
006a9838      *(uint32_t*)eax_7 = arg2;
006a983e      void* eax_10 = ((char*)var_c + 4);
006a9843      void* ecx_9 = (eax_10 & 0x80000003);
006a9843      bool cond:3 = ecx_9 == 0;
006a9849      var_c = eax_10;
006a9849      
006a984d      if (ecx_9 < 0)
006a984d      {
006a9850          void* ecx_11 = (((char*)ecx_9 - 1) | 0xfffffffc);
006a9853          ecx_9 = ((char*)ecx_11 + 1);
006a9853          cond:3 = ecx_11 == 0xffffffff;
006a984d      }
006a984d      
006a9854      if (!(cond:3))
006a9854      {
006a985b          void* i_3 = (4 - ecx_9);
006a985b          
006a985d          if (4 != ecx_9)
006a985d          {
006a986d              void* i_1;
006a986d              
006a986d              do
006a986d              {
006a9860                  *(uint8_t*)eax_10 = 0;
006a9867                  eax_10 = ((char*)var_c + 1);
006a9868                  i_1 = i_3;
006a9868                  i_3 -= 1;
006a9869                  var_c = eax_10;
006a986d              } while (i_1 != 1);
006a985d          }
006a9854      }
006a9854      
006a987d      AC1Legacy::PStringBase<char>::Pack(arg3, &var_c, (((char*)eax_2 - eax_10) + (eax_1 + 0x14)));
006a9889      class AC1Legacy::PStringBase<char>* ebx;
006a9889      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x14));
006a9889      
006a9890      if (ebx == 0)
006a9897          Proto_UI::UICounterFailedSend(eax);
006a9897      
006a98a1      uint32_t eax_12;
006a98a1      eax_12 = ebx;
006a98a7      return eax_12;
006a9780  }

006a98a8                          90 90 90 90 90 90 90 90                                                          ........

006a98b0  uint8_t CM_Writing::Event_SetInscription(uint32_t arg1, class AC1Legacy::PStringBase<char> const* arg2)

006a98b0  {
006a98b6      uint32_t eax = Proto_UI::GetNextUICounter();
006a98cc      int32_t var_8 = 0x801ad4;
006a98d4      void* var_c = nullptr;
006a98dc      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, 0);
006a98ee      OrderHdr::Pack(&var_8, &var_c, 0);
006a98f8      void* eax_2 = operator new[]((eax_1 + 0x10));
006a990a      var_c = eax_2;
006a9910      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006a991d      *(uint32_t*)var_c = 0xbf;
006a9927      uint32_t* eax_5 = ((char*)var_c + 4);
006a992a      var_c = eax_5;
006a992e      *(uint32_t*)eax_5 = arg1;
006a9934      void* eax_7 = ((char*)var_c + 4);
006a9939      void* ecx_5 = (eax_7 & 0x80000003);
006a9939      bool cond:1 = ecx_5 == 0;
006a993f      var_c = eax_7;
006a993f      
006a9943      if (ecx_5 < 0)
006a9943      {
006a9946          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006a9949          ecx_5 = ((char*)ecx_7 + 1);
006a9949          cond:1 = ecx_7 == 0xffffffff;
006a9943      }
006a9943      
006a994a      if (!(cond:1))
006a994a      {
006a9951          void* i_1 = (4 - ecx_5);
006a9951          
006a9953          if (4 != ecx_5)
006a9953          {
006a9962              void* i;
006a9962              
006a9962              do
006a9962              {
006a9955                  *(uint8_t*)eax_7 = 0;
006a995c                  eax_7 = ((char*)var_c + 1);
006a995d                  i = i_1;
006a995d                  i_1 -= 1;
006a995e                  var_c = eax_7;
006a9962              } while (i != 1);
006a9953          }
006a994a      }
006a994a      
006a9972      AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, (((char*)eax_2 - eax_7) + (eax_1 + 0x10)));
006a997e      class AC1Legacy::PStringBase<char>* ebx;
006a997e      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006a997e      
006a9985      if (ebx == 0)
006a998c          Proto_UI::UICounterFailedSend(eax);
006a998c      
006a999c      return ebx;
006a98b0  }

006a999d                                                                                         90 90 90                               ...

006a99a0  uint32_t CM_Combat::DispatchUI_QueryHealthResponse(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006a99a0  {
006a99a6      if (arg1 != 0)
006a99a6      {
006a99a8          class ClientCombatSystem* m_pCombatSystem = arg1->m_pCombatSystem;
006a99a8          
006a99be          if ((m_pCombatSystem != 0 && *(uint32_t*)arg2 == 0x1c0))
006a99be          {
006a99c5              float eax_3 = *(uint32_t*)((char*)arg2 + 8);
006a99ca              arg1 = eax_3;
006a99ce              ClientCombatSystem::Handle_Combat__QueryHealthResponse(m_pCombatSystem, *(uint32_t*)((char*)arg2 + 4), eax_3);
006a99be          }
006a99a6      }
006a99a6      
006a99c2      return 0;
006a99a0  }

006a99d4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006a99e0  uint8_t CM_Combat::Event_CancelAttack()

006a99e0  {
006a99e6      uint32_t eax = Proto_UI::GetNextUICounter();
006a99fa      int32_t var_8 = 0x801ad4;
006a9a02      void* var_c = nullptr;
006a9a0a      OrderHdr::Pack(&var_8, &var_c, 0);
006a9a15      void* eax_1 = operator new[](0xc);
006a9a27      var_c = eax_1;
006a9a2d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006a9a36      *(uint32_t*)var_c = 0x1b7;
006a9a45      var_c += 4;
006a9a4e      int32_t ebx;
006a9a4e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006a9a4e      
006a9a55      if (ebx == 0)
006a9a5c          Proto_UI::UICounterFailedSend(eax);
006a9a5c      
006a9a66      uint32_t eax_4;
006a9a66      eax_4 = ebx;
006a9a6c      return eax_4;
006a99e0  }

006a9a6d                                         90 90 90                                                               ...

006a9a70  uint8_t CM_Combat::Event_ChangeCombatMode(enum COMBAT_MODE arg1)

006a9a70  {
006a9a76      uint32_t eax = Proto_UI::GetNextUICounter();
006a9a8a      int32_t var_8 = 0x801ad4;
006a9a92      void* var_c = nullptr;
006a9a9a      OrderHdr::Pack(&var_8, &var_c, 0);
006a9aa5      void* eax_1 = operator new[](0x10);
006a9ab7      var_c = eax_1;
006a9abd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a9aca      *(uint32_t*)var_c = 0x53;
006a9ad4      enum COMBAT_MODE* eax_3 = ((char*)var_c + 4);
006a9ad7      var_c = eax_3;
006a9adb      *(uint32_t*)eax_3 = arg1;
006a9ae1      void* eax_5 = ((char*)var_c + 4);
006a9ae4      var_c = eax_5;
006a9ae8      void* eax_6 = (eax_5 & 0x80000003);
006a9ae8      bool cond:0 = eax_6 == 0;
006a9ae8      
006a9aed      if (eax_6 < 0)
006a9aed      {
006a9af0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a9af3          eax_6 = ((char*)eax_8 + 1);
006a9af3          cond:0 = eax_8 == 0xffffffff;
006a9aed      }
006a9aed      
006a9af4      if (!(cond:0))
006a9af4      {
006a9afb          void* i_1 = (4 - eax_6);
006a9afb          
006a9afd          if (4 != eax_6)
006a9afd          {
006a9b11              void* i;
006a9b11              
006a9b11              do
006a9b11              {
006a9b04                  *(uint8_t*)var_c = 0;
006a9b0c                  i = i_1;
006a9b0c                  i_1 -= 1;
006a9b0d                  var_c += 1;
006a9b11              } while (i != 1);
006a9afd          }
006a9af4      }
006a9af4      
006a9b1a      int32_t ebx;
006a9b1a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a9b1a      
006a9b21      if (ebx == 0)
006a9b28          Proto_UI::UICounterFailedSend(eax);
006a9b28      
006a9b32      uint32_t eax_9;
006a9b32      eax_9 = ebx;
006a9b38      return eax_9;
006a9a70  }

006a9b39                                                                             90 90 90 90 90 90 90                           .......

006a9b40  uint8_t CM_Combat::Event_QueryHealth(uint32_t arg1)

006a9b40  {
006a9b46      uint32_t eax = Proto_UI::GetNextUICounter();
006a9b5a      int32_t var_8 = 0x801ad4;
006a9b62      void* var_c = nullptr;
006a9b6a      OrderHdr::Pack(&var_8, &var_c, 0);
006a9b75      void* eax_1 = operator new[](0x10);
006a9b87      var_c = eax_1;
006a9b8d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006a9b9a      *(uint32_t*)var_c = 0x1bf;
006a9ba4      uint32_t* eax_3 = ((char*)var_c + 4);
006a9ba7      var_c = eax_3;
006a9bab      *(uint32_t*)eax_3 = arg1;
006a9bb1      void* eax_5 = ((char*)var_c + 4);
006a9bb4      var_c = eax_5;
006a9bb8      void* eax_6 = (eax_5 & 0x80000003);
006a9bb8      bool cond:0 = eax_6 == 0;
006a9bb8      
006a9bbd      if (eax_6 < 0)
006a9bbd      {
006a9bc0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006a9bc3          eax_6 = ((char*)eax_8 + 1);
006a9bc3          cond:0 = eax_8 == 0xffffffff;
006a9bbd      }
006a9bbd      
006a9bc4      if (!(cond:0))
006a9bc4      {
006a9bcb          void* i_1 = (4 - eax_6);
006a9bcb          
006a9bcd          if (4 != eax_6)
006a9bcd          {
006a9be1              void* i;
006a9be1              
006a9be1              do
006a9be1              {
006a9bd4                  *(uint8_t*)var_c = 0;
006a9bdc                  i = i_1;
006a9bdc                  i_1 -= 1;
006a9bdd                  var_c += 1;
006a9be1              } while (i != 1);
006a9bcd          }
006a9bc4      }
006a9bc4      
006a9bea      int32_t ebx;
006a9bea      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006a9bea      
006a9bf1      if (ebx == 0)
006a9bf8          Proto_UI::UICounterFailedSend(eax);
006a9bf8      
006a9c02      uint32_t eax_9;
006a9c02      eax_9 = ebx;
006a9c08      return eax_9;
006a9b40  }

006a9c09                             90 90 90 90 90 90 90                                                           .......

006a9c10  uint8_t CM_Combat::Event_TargetedMeleeAttack(uint32_t arg1, enum ATTACK_HEIGHT arg2, float arg3)

006a9c10  {
006a9c16      uint32_t eax = Proto_UI::GetNextUICounter();
006a9c2a      int32_t var_8 = 0x801ad4;
006a9c32      void* var_c = nullptr;
006a9c3a      OrderHdr::Pack(&var_8, &var_c, 0);
006a9c45      void* eax_1 = operator new[](0x18);
006a9c57      var_c = eax_1;
006a9c5d      OrderHdr::Pack(&var_8, &var_c, 0x18);
006a9c6a      *(uint32_t*)var_c = 8;
006a9c74      uint32_t* eax_3 = ((char*)var_c + 4);
006a9c77      var_c = eax_3;
006a9c7b      *(uint32_t*)eax_3 = arg1;
006a9c81      void* eax_5 = ((char*)var_c + 4);
006a9c86      void* ecx_4 = (eax_5 & 0x80000003);
006a9c86      bool cond:1 = ecx_4 == 0;
006a9c8c      var_c = eax_5;
006a9c8c      
006a9c90      if (ecx_4 < 0)
006a9c90      {
006a9c93          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a9c96          ecx_4 = ((char*)ecx_6 + 1);
006a9c96          cond:1 = ecx_6 == 0xffffffff;
006a9c90      }
006a9c90      
006a9c97      if (!(cond:1))
006a9c97      {
006a9c9e          void* i_4 = (4 - ecx_4);
006a9c9e          
006a9ca0          if (4 != ecx_4)
006a9ca0          {
006a9caf              void* i;
006a9caf              
006a9caf              do
006a9caf              {
006a9ca2                  *(uint8_t*)eax_5 = 0;
006a9ca9                  eax_5 = ((char*)var_c + 1);
006a9caa                  i = i_4;
006a9caa                  i_4 -= 1;
006a9cab                  var_c = eax_5;
006a9caf              } while (i != 1);
006a9ca0          }
006a9c97      }
006a9c97      
006a9cb5      *(uint32_t*)eax_5 = arg2;
006a9cbb      void* eax_8 = ((char*)var_c + 4);
006a9cc0      void* ecx_8 = (eax_8 & 0x80000003);
006a9cc0      bool cond:3 = ecx_8 == 0;
006a9cc6      var_c = eax_8;
006a9cc6      
006a9cca      if (ecx_8 < 0)
006a9cca      {
006a9ccd          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006a9cd0          ecx_8 = ((char*)ecx_10 + 1);
006a9cd0          cond:3 = ecx_10 == 0xffffffff;
006a9cca      }
006a9cca      
006a9cd1      if (!(cond:3))
006a9cd1      {
006a9cd8          void* i_5 = (4 - ecx_8);
006a9cd8          
006a9cda          if (4 != ecx_8)
006a9cda          {
006a9ced              void* i_1;
006a9ced              
006a9ced              do
006a9ced              {
006a9ce0                  *(uint8_t*)eax_8 = 0;
006a9ce7                  eax_8 = ((char*)var_c + 1);
006a9ce8                  i_1 = i_5;
006a9ce8                  i_5 -= 1;
006a9ce9                  var_c = eax_8;
006a9ced              } while (i_1 != 1);
006a9cda          }
006a9cd1      }
006a9cd1      
006a9cf3      *(uint32_t*)eax_8 = arg3;
006a9cf9      void* eax_11 = ((char*)var_c + 4);
006a9cfc      var_c = eax_11;
006a9d00      void* eax_12 = (eax_11 & 0x80000003);
006a9d00      bool cond:5 = eax_12 == 0;
006a9d00      
006a9d05      if (eax_12 < 0)
006a9d05      {
006a9d08          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006a9d0b          eax_12 = ((char*)eax_14 + 1);
006a9d0b          cond:5 = eax_14 == 0xffffffff;
006a9d05      }
006a9d05      
006a9d0c      if (!(cond:5))
006a9d0c      {
006a9d13          void* i_3 = (4 - eax_12);
006a9d13          
006a9d15          if (4 != eax_12)
006a9d15          {
006a9d31              void* i_2;
006a9d31              
006a9d31              do
006a9d31              {
006a9d24                  *(uint8_t*)var_c = 0;
006a9d2c                  i_2 = i_3;
006a9d2c                  i_3 -= 1;
006a9d2d                  var_c += 1;
006a9d31              } while (i_2 != 1);
006a9d15          }
006a9d0c      }
006a9d0c      
006a9d3a      int32_t ebx;
006a9d3a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006a9d3a      
006a9d41      if (ebx == 0)
006a9d48          Proto_UI::UICounterFailedSend(eax);
006a9d48      
006a9d52      uint32_t eax_15;
006a9d52      eax_15 = ebx;
006a9d58      return eax_15;
006a9c10  }

006a9d19                                                                             8d a4 24 00 00 00 00                           ..$....
006a9d59                                                                             90 90 90 90 90 90 90                           .......

006a9d60  uint8_t CM_Combat::Event_TargetedMissileAttack(uint32_t arg1, enum ATTACK_HEIGHT arg2, float arg3)

006a9d60  {
006a9d66      uint32_t eax = Proto_UI::GetNextUICounter();
006a9d7a      int32_t var_8 = 0x801ad4;
006a9d82      void* var_c = nullptr;
006a9d8a      OrderHdr::Pack(&var_8, &var_c, 0);
006a9d95      void* eax_1 = operator new[](0x18);
006a9da7      var_c = eax_1;
006a9dad      OrderHdr::Pack(&var_8, &var_c, 0x18);
006a9dba      *(uint32_t*)var_c = 0xa;
006a9dc4      uint32_t* eax_3 = ((char*)var_c + 4);
006a9dc7      var_c = eax_3;
006a9dcb      *(uint32_t*)eax_3 = arg1;
006a9dd1      void* eax_5 = ((char*)var_c + 4);
006a9dd6      void* ecx_4 = (eax_5 & 0x80000003);
006a9dd6      bool cond:1 = ecx_4 == 0;
006a9ddc      var_c = eax_5;
006a9ddc      
006a9de0      if (ecx_4 < 0)
006a9de0      {
006a9de3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006a9de6          ecx_4 = ((char*)ecx_6 + 1);
006a9de6          cond:1 = ecx_6 == 0xffffffff;
006a9de0      }
006a9de0      
006a9de7      if (!(cond:1))
006a9de7      {
006a9dee          void* i_4 = (4 - ecx_4);
006a9dee          
006a9df0          if (4 != ecx_4)
006a9df0          {
006a9dff              void* i;
006a9dff              
006a9dff              do
006a9dff              {
006a9df2                  *(uint8_t*)eax_5 = 0;
006a9df9                  eax_5 = ((char*)var_c + 1);
006a9dfa                  i = i_4;
006a9dfa                  i_4 -= 1;
006a9dfb                  var_c = eax_5;
006a9dff              } while (i != 1);
006a9df0          }
006a9de7      }
006a9de7      
006a9e05      *(uint32_t*)eax_5 = arg2;
006a9e0b      void* eax_8 = ((char*)var_c + 4);
006a9e10      void* ecx_8 = (eax_8 & 0x80000003);
006a9e10      bool cond:3 = ecx_8 == 0;
006a9e16      var_c = eax_8;
006a9e16      
006a9e1a      if (ecx_8 < 0)
006a9e1a      {
006a9e1d          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006a9e20          ecx_8 = ((char*)ecx_10 + 1);
006a9e20          cond:3 = ecx_10 == 0xffffffff;
006a9e1a      }
006a9e1a      
006a9e21      if (!(cond:3))
006a9e21      {
006a9e28          void* i_5 = (4 - ecx_8);
006a9e28          
006a9e2a          if (4 != ecx_8)
006a9e2a          {
006a9e3d              void* i_1;
006a9e3d              
006a9e3d              do
006a9e3d              {
006a9e30                  *(uint8_t*)eax_8 = 0;
006a9e37                  eax_8 = ((char*)var_c + 1);
006a9e38                  i_1 = i_5;
006a9e38                  i_5 -= 1;
006a9e39                  var_c = eax_8;
006a9e3d              } while (i_1 != 1);
006a9e2a          }
006a9e21      }
006a9e21      
006a9e43      *(uint32_t*)eax_8 = arg3;
006a9e49      void* eax_11 = ((char*)var_c + 4);
006a9e4c      var_c = eax_11;
006a9e50      void* eax_12 = (eax_11 & 0x80000003);
006a9e50      bool cond:5 = eax_12 == 0;
006a9e50      
006a9e55      if (eax_12 < 0)
006a9e55      {
006a9e58          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006a9e5b          eax_12 = ((char*)eax_14 + 1);
006a9e5b          cond:5 = eax_14 == 0xffffffff;
006a9e55      }
006a9e55      
006a9e5c      if (!(cond:5))
006a9e5c      {
006a9e63          void* i_3 = (4 - eax_12);
006a9e63          
006a9e65          if (4 != eax_12)
006a9e65          {
006a9e81              void* i_2;
006a9e81              
006a9e81              do
006a9e81              {
006a9e74                  *(uint8_t*)var_c = 0;
006a9e7c                  i_2 = i_3;
006a9e7c                  i_3 -= 1;
006a9e7d                  var_c += 1;
006a9e81              } while (i_2 != 1);
006a9e65          }
006a9e5c      }
006a9e5c      
006a9e8a      int32_t ebx;
006a9e8a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006a9e8a      
006a9e91      if (ebx == 0)
006a9e98          Proto_UI::UICounterFailedSend(eax);
006a9e98      
006a9ea2      uint32_t eax_15;
006a9ea2      eax_15 = ebx;
006a9ea8      return eax_15;
006a9d60  }

006a9e69                             8d a4 24 00 00 00 00                                                           ..$....
006a9ea9                             90 90 90 90 90 90 90                                                           .......

006a9eb0  uint8_t CM_Combat::SendNotice_AttackHeightChanged(enum ATTACK_HEIGHT arg1)

006a9eb0  {
006a9ebe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1fc);
006a9ebe      
006a9ec3      if (eax != 0)
006a9ec3      {
006a9ec6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9ec6          
006a9ecb          while (i != 0)
006a9ecb          {
006a9ed3              int32_t* edi_1 = *(uint32_t*)i;
006a9ed7              i = i[1];
006a9ed7              
006a9eda              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a9eeb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xc4)(arg1);
006a9ecb          }
006a9ec3      }
006a9ec3      
006a9ef8      eax = 1;
006a9efa      return 1;
006a9eb0  }

006a9efb                                                                                   90 90 90 90 90                             .....

006a9f00  uint8_t CM_Combat::SendNotice_DesiredAttackPowerChanged(float arg1)

006a9f00  {
006a9f0e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd249);
006a9f0e      
006a9f13      if (eax != 0)
006a9f13      {
006a9f16          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9f16          
006a9f1b          while (i != 0)
006a9f1b          {
006a9f23              int32_t* edi_1 = *(uint32_t*)i;
006a9f27              i = i[1];
006a9f27              
006a9f2a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a9f3b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xc8)(arg1);
006a9f1b          }
006a9f13      }
006a9f13      
006a9f48      eax = 1;
006a9f4a      return 1;
006a9f00  }

006a9f4b                                   90 90 90 90 90                                                             .....

006a9f50  uint8_t CM_Combat::SendNotice_SetCombatMode(enum COMBAT_MODE arg1)

006a9f50  {
006a9f5e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1fb);
006a9f5e      
006a9f63      if (eax != 0)
006a9f63      {
006a9f66          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9f66          
006a9f6b          while (i != 0)
006a9f6b          {
006a9f73              int32_t* edi_1 = *(uint32_t*)i;
006a9f77              i = i[1];
006a9f77              
006a9f7a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006a9f8b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xcc)(arg1);
006a9f6b          }
006a9f63      }
006a9f63      
006a9f98      eax = 1;
006a9f9a      return 1;
006a9f50  }

006a9f9b                                                                                   90 90 90 90 90                             .....

006a9fa0  uint8_t CM_Combat::SendNotice_UpdateObjectHealth(uint32_t arg1, float arg2)

006a9fa0  {
006a9fae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1f4);
006a9fae      
006a9fb3      if (eax != 0)
006a9fb3      {
006a9fb6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006a9fb6          
006a9fbb          while (i != 0)
006a9fbb          {
006a9fc8              int32_t* esi_1 = *(uint32_t*)i;
006a9fcc              i = i[1];
006a9fcc              
006a9fcf              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006a9fe1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0xd0)(arg1, arg2);
006a9fbb          }
006a9fb3      }
006a9fb3      
006a9fef      eax = 1;
006a9ff1      return 1;
006a9fa0  }

006a9ff2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006aa000  uint8_t CM_Vendor::Event_Sell(uint32_t arg1, class PackableList<ItemProfile> const* arg2)

006aa000  {
006aa006      uint32_t eax = Proto_UI::GetNextUICounter();
006aa019      struct PackableList<ItemProfile>::VTable* vtable = arg2->vtable;
006aa01e      int32_t var_8 = 0x801ad4;
006aa026      void* var_c = nullptr;
006aa02e      int32_t eax_1 = vtable->Pack(&var_c, 0);
006aa03e      OrderHdr::Pack(&var_8, &var_c, 0);
006aa048      void* eax_2 = operator new[]((eax_1 + 0x10));
006aa050      var_c = eax_2;
006aa060      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006aa06d      *(uint32_t*)var_c = 0x60;
006aa077      uint32_t* eax_4 = ((char*)var_c + 4);
006aa07a      var_c = eax_4;
006aa07e      *(uint32_t*)eax_4 = arg1;
006aa084      void* eax_6 = ((char*)var_c + 4);
006aa089      void* ecx_5 = (eax_6 & 0x80000003);
006aa089      bool cond:1 = ecx_5 == 0;
006aa08f      var_c = eax_6;
006aa08f      
006aa093      if (ecx_5 < 0)
006aa093      {
006aa096          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006aa099          ecx_5 = ((char*)ecx_7 + 1);
006aa099          cond:1 = ecx_7 == 0xffffffff;
006aa093      }
006aa093      
006aa09a      if (!(cond:1))
006aa09a      {
006aa0a1          void* i_1 = (4 - ecx_5);
006aa0a1          
006aa0a3          if (4 != ecx_5)
006aa0a3          {
006aa0b2              void* i;
006aa0b2              
006aa0b2              do
006aa0b2              {
006aa0a5                  *(uint8_t*)eax_6 = 0;
006aa0ac                  eax_6 = ((char*)var_c + 1);
006aa0ad                  i = i_1;
006aa0ad                  i_1 -= 1;
006aa0ae                  var_c = eax_6;
006aa0b2              } while (i != 1);
006aa0a3          }
006aa09a      }
006aa09a      
006aa0b4      arg2->vtable->Pack(&var_c, (((char*)eax_2 - eax_6) + (eax_1 + 0x10)));
006aa0ce      void* ebx;
006aa0ce      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006aa0ce      
006aa0d5      if (ebx == 0)
006aa0dc          Proto_UI::UICounterFailedSend(eax);
006aa0dc      
006aa0ec      return ebx;
006aa000  }

006aa0ed                                         90 90 90                                                               ...

006aa0f0  uint8_t CM_Vendor::Event_Buy(uint32_t arg1, class PackableList<ItemProfile> const* arg2, class IDClass<_tagDataID,32,0> arg3)

006aa0f0  {
006aa0f6      uint32_t eax = Proto_UI::GetNextUICounter();
006aa109      struct PackableList<ItemProfile>::VTable* vtable = arg2->vtable;
006aa10e      int32_t var_8 = 0x801ad4;
006aa116      void* var_c = nullptr;
006aa11e      int32_t eax_1 = vtable->Pack(&var_c, 0);
006aa12e      OrderHdr::Pack(&var_8, &var_c, 0);
006aa138      void* eax_2 = operator new[]((eax_1 + 0x14));
006aa140      var_c = eax_2;
006aa150      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x14));
006aa15d      *(uint32_t*)var_c = 0x5f;
006aa167      uint32_t* eax_4 = ((char*)var_c + 4);
006aa16a      var_c = eax_4;
006aa16e      *(uint32_t*)eax_4 = arg1;
006aa174      void* eax_6 = ((char*)var_c + 4);
006aa179      void* ecx_5 = (eax_6 & 0x80000003);
006aa179      bool cond:1 = ecx_5 == 0;
006aa17f      var_c = eax_6;
006aa17f      
006aa183      if (ecx_5 < 0)
006aa183      {
006aa186          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006aa189          ecx_5 = ((char*)ecx_7 + 1);
006aa189          cond:1 = ecx_7 == 0xffffffff;
006aa183      }
006aa183      
006aa18a      if (!(cond:1))
006aa18a      {
006aa191          void* i_3 = (4 - ecx_5);
006aa191          
006aa193          if (4 != ecx_5)
006aa193          {
006aa1a2              void* i;
006aa1a2              
006aa1a2              do
006aa1a2              {
006aa195                  *(uint8_t*)eax_6 = 0;
006aa19c                  eax_6 = ((char*)var_c + 1);
006aa19d                  i = i_3;
006aa19d                  i_3 -= 1;
006aa19e                  var_c = eax_6;
006aa1a2              } while (i != 1);
006aa193          }
006aa18a      }
006aa18a      
006aa1a4      arg2->vtable->Pack(&var_c, (((char*)eax_2 - eax_6) + (eax_1 + 0x14)));
006aa1bf      *(uint32_t*)var_c = arg3;
006aa1c5      void* eax_9 = ((char*)var_c + 4);
006aa1c8      var_c = eax_9;
006aa1cc      void* eax_10 = (eax_9 & 0x80000003);
006aa1cc      bool cond:2 = eax_10 == 0;
006aa1cc      
006aa1d1      if (eax_10 < 0)
006aa1d1      {
006aa1d4          void* eax_12 = (((char*)eax_10 - 1) | 0xfffffffc);
006aa1d7          eax_10 = ((char*)eax_12 + 1);
006aa1d7          cond:2 = eax_12 == 0xffffffff;
006aa1d1      }
006aa1d1      
006aa1d8      if (!(cond:2))
006aa1d8      {
006aa1df          void* i_2 = (4 - eax_10);
006aa1df          
006aa1e1          if (4 != eax_10)
006aa1e1          {
006aa1f4              void* i_1;
006aa1f4              
006aa1f4              do
006aa1f4              {
006aa1e7                  *(uint8_t*)var_c = 0;
006aa1ef                  i_1 = i_2;
006aa1ef                  i_2 -= 1;
006aa1f0                  var_c += 1;
006aa1f4              } while (i_1 != 1);
006aa1e1          }
006aa1d8      }
006aa1d8      
006aa1fd      void* ebx;
006aa1fd      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x14));
006aa1fd      
006aa204      if (ebx == 0)
006aa20b          Proto_UI::UICounterFailedSend(eax);
006aa20b      
006aa21b      return ebx;
006aa0f0  }

006aa21c                                                                                      90 90 90 90                              ....

006aa220  uint8_t CM_Vendor::SendNotice_AddItemToSell(uint32_t arg1)

006aa220  {
006aa22e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd218);
006aa22e      
006aa233      if (eax != 0)
006aa233      {
006aa236          int32_t* i = *(uint32_t*)((char*)eax + 4);
006aa236          
006aa23b          while (i != 0)
006aa23b          {
006aa243              int32_t* edi_1 = *(uint32_t*)i;
006aa247              i = i[1];
006aa247              
006aa24a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006aa25b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x28c)(arg1);
006aa23b          }
006aa233      }
006aa233      
006aa268      eax = 1;
006aa26a      return 1;
006aa220  }

006aa26b                                   90 90 90 90 90                                                             .....

006aa270  uint8_t CM_Vendor::SendNotice_CloseVendor(uint8_t arg1)

006aa270  {
006aa27e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd253);
006aa27e      
006aa283      if (eax != 0)
006aa283      {
006aa286          int32_t* i = *(uint32_t*)((char*)eax + 4);
006aa286          
006aa28b          while (i != 0)
006aa28b          {
006aa293              int32_t* edi_1 = *(uint32_t*)i;
006aa297              i = i[1];
006aa297              
006aa29a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006aa2ab                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x290)(arg1);
006aa28b          }
006aa283      }
006aa283      
006aa2b8      eax = 1;
006aa2ba      return 1;
006aa270  }

006aa2bb                                                                                   90 90 90 90 90                             .....

006aa2c0  uint8_t CM_Vendor::SendNotice_OpenVendor(uint32_t arg1, class VendorProfile const* arg2, class PackableList<ItemProfile> const* arg3, enum ShopMode arg4)

006aa2c0  {
006aa2ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd20e);
006aa2ce      
006aa2d3      if (eax != 0)
006aa2d3      {
006aa2d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006aa2d6          
006aa2db          while (i != 0)
006aa2db          {
006aa2e8              int32_t* esi_1 = *(uint32_t*)i;
006aa2ec              i = i[1];
006aa2ec              
006aa2ef              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006aa30b                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x294)(arg1, arg2, arg3, arg4);
006aa2db          }
006aa2d3      }
006aa2d3      
006aa319      eax = 1;
006aa31b      return 1;
006aa2c0  }

006aa31c                                                                                      90 90 90 90                              ....

006aa320  uint32_t CM_House::DispatchUI_Recv_HouseStatus(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aa320  {
006aa326      if (arg1 != 0)
006aa326      {
006aa328          class ClientHousingSystem* m_pHousingSystem = arg1->m_pHousingSystem;
006aa328          
006aa339          if ((m_pHousingSystem != 0 && *(uint32_t*)arg2 == 0x226))
006aa342              ClientHousingSystem::Handle_House__Recv_HouseStatus(m_pHousingSystem, *(uint32_t*)((char*)arg2 + 4));
006aa326      }
006aa326      
006aa33d      return 0;
006aa320  }

006aa348                          90 90 90 90 90 90 90 90                                                          ........

006aa350  uint32_t CM_House::DispatchUI_Recv_HouseTransaction(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aa350  {
006aa356      if (arg1 != 0)
006aa356      {
006aa358          class ClientHousingSystem* m_pHousingSystem = arg1->m_pHousingSystem;
006aa358          
006aa369          if ((m_pHousingSystem != 0 && *(uint32_t*)arg2 == 0x259))
006aa372              ClientHousingSystem::Handle_House__Recv_HouseStatus(m_pHousingSystem, *(uint32_t*)((char*)arg2 + 4));
006aa356      }
006aa356      
006aa36d      return 0;
006aa350  }

006aa378                                                                          90 90 90 90 90 90 90 90                          ........

006aa380  uint32_t CM_House::DispatchUI_Recv_UpdateHAR(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aa380  {
006aa391      if ((arg1 == 0 || arg1->m_pHousingSystem == 0))
006aa399          return 0;
006aa399      
006aa39a      void* eax_3 = arg2;
006aa3a6      bool cond:0 = *(uint32_t*)eax_3 == 0x257;
006aa3ac      arg2 = ((char*)eax_3 + 4);
006aa3ac      
006aa3b0      if (!(cond:0))
006aa3b9          return 0;
006aa3b9      
006aa3be      void var_34;
006aa3be      HAR::HAR(&var_34);
006aa3d9      class HAR* edx = HAR::UnPack(&var_34, &arg2, (((char*)eax_3 - arg2) + arg3));
006aa3e2      void* var_40_1 = &var_34;
006aa3e6      ClientHousingSystem::Handle_House__Recv_UpdateHAR(arg1->m_pHousingSystem, edx);
006aa3f1      HAR::~HAR(&var_34);
006aa3fd      return 0;
006aa380  }

006aa3fe                                                                                            90 90                                ..

006aa400  uint32_t CM_House::DispatchUI_Recv_UpdateRentTime(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aa400  {
006aa406      if (arg1 != 0)
006aa406      {
006aa408          class ClientHousingSystem* m_pHousingSystem = arg1->m_pHousingSystem;
006aa408          
006aa419          if ((m_pHousingSystem != 0 && *(uint32_t*)arg2 == 0x227))
006aa422              ClientHousingSystem::Handle_House__Recv_UpdateRentTime(m_pHousingSystem, *(uint32_t*)((char*)arg2 + 4));
006aa406      }
006aa406      
006aa41d      return 0;
006aa400  }

006aa428                          90 90 90 90 90 90 90 90                                                          ........

006aa430  uint32_t CM_House::DispatchUI_Recv_UpdateRestrictions(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aa430  {
006aa447      if ((arg1 == 0 || arg1->m_pHousingSystem == 0))
006aa452          return 0;
006aa452      
006aa453      void* eax_3 = arg2;
006aa462      bool cond:0 = *(uint32_t*)eax_3 == 0x248;
006aa468      arg2 = ((char*)eax_3 + 4);
006aa468      
006aa46f      if (!(cond:0))
006aa47b          return 0;
006aa47b      
006aa47c      int32_t ecx;
006aa47c      ecx = *(uint8_t*)((char*)eax_3 + 4);
006aa47f      arg2 = ((char*)eax_3 + 5);
006aa487      uint32_t edi = *(uint32_t*)((char*)eax_3 + 5);
006aa494      arg2 = ((char*)eax_3 + 9);
006aa49b      void var_84;
006aa49b      RestrictionDB::RestrictionDB(&var_84);
006aa4bf      RestrictionDB::UnPack(&var_84, &arg2, (((char*)eax_3 - arg2) + arg3));
006aa4d2      ClientHousingSystem::Handle_House__Recv_UpdateRestrictions(arg1->m_pHousingSystem, ecx, edi, &var_84);
006aa4dd      RestrictionDB::~RestrictionDB(&var_84);
006aa4ed      return 0;
006aa430  }

006aa4ee                                            90 90                                                                ..

006aa4f0  uint8_t CM_House::Event_AbandonHouse()

006aa4f0  {
006aa4f6      uint32_t eax = Proto_UI::GetNextUICounter();
006aa50a      int32_t var_8 = 0x801ad4;
006aa512      void* var_c = nullptr;
006aa51a      OrderHdr::Pack(&var_8, &var_c, 0);
006aa525      void* eax_1 = operator new[](0xc);
006aa537      var_c = eax_1;
006aa53d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006aa546      *(uint32_t*)var_c = 0x21f;
006aa555      var_c += 4;
006aa55e      int32_t ebx;
006aa55e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006aa55e      
006aa565      if (ebx == 0)
006aa56c          Proto_UI::UICounterFailedSend(eax);
006aa56c      
006aa576      uint32_t eax_4;
006aa576      eax_4 = ebx;
006aa57c      return eax_4;
006aa4f0  }

006aa57d                                                                                         90 90 90                               ...

006aa580  uint8_t CM_House::Event_AddAllStoragePermission()

006aa580  {
006aa586      uint32_t eax = Proto_UI::GetNextUICounter();
006aa59a      int32_t var_8 = 0x801ad4;
006aa5a2      void* var_c = nullptr;
006aa5aa      OrderHdr::Pack(&var_8, &var_c, 0);
006aa5b5      void* eax_1 = operator new[](0xc);
006aa5c7      var_c = eax_1;
006aa5cd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006aa5d6      *(uint32_t*)var_c = 0x25c;
006aa5e5      var_c += 4;
006aa5ee      int32_t ebx;
006aa5ee      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006aa5ee      
006aa5f5      if (ebx == 0)
006aa5fc          Proto_UI::UICounterFailedSend(eax);
006aa5fc      
006aa606      uint32_t eax_4;
006aa606      eax_4 = ebx;
006aa60c      return eax_4;
006aa580  }

006aa60d                                         90 90 90                                                               ...

006aa610  uint8_t CM_House::Event_BootEveryone_Event()

006aa610  {
006aa616      uint32_t eax = Proto_UI::GetNextUICounter();
006aa62a      int32_t var_8 = 0x801ad4;
006aa632      void* var_c = nullptr;
006aa63a      OrderHdr::Pack(&var_8, &var_c, 0);
006aa645      void* eax_1 = operator new[](0xc);
006aa657      var_c = eax_1;
006aa65d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006aa666      *(uint32_t*)var_c = 0x25f;
006aa675      var_c += 4;
006aa67e      int32_t ebx;
006aa67e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006aa67e      
006aa685      if (ebx == 0)
006aa68c          Proto_UI::UICounterFailedSend(eax);
006aa68c      
006aa696      uint32_t eax_4;
006aa696      eax_4 = ebx;
006aa69c      return eax_4;
006aa610  }

006aa69d                                                                                         90 90 90                               ...

006aa6a0  uint8_t CM_House::Event_BuyHouse(uint32_t arg1, class PackableList<unsigned long> const* arg2)

006aa6a0  {
006aa6a6      uint32_t eax = Proto_UI::GetNextUICounter();
006aa6b9      struct PackableList<unsigned long>::VTable* vtable = arg2->vtable;
006aa6be      int32_t var_8 = 0x801ad4;
006aa6c6      void* var_c = nullptr;
006aa6ce      int32_t eax_1 = vtable->Pack(&var_c, 0);
006aa6de      OrderHdr::Pack(&var_8, &var_c, 0);
006aa6e8      void* eax_2 = operator new[]((eax_1 + 0x10));
006aa6f0      var_c = eax_2;
006aa700      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006aa70d      *(uint32_t*)var_c = 0x21c;
006aa717      uint32_t* eax_4 = ((char*)var_c + 4);
006aa71a      var_c = eax_4;
006aa71e      *(uint32_t*)eax_4 = arg1;
006aa724      void* eax_6 = ((char*)var_c + 4);
006aa729      void* ecx_5 = (eax_6 & 0x80000003);
006aa729      bool cond:1 = ecx_5 == 0;
006aa72f      var_c = eax_6;
006aa72f      
006aa733      if (ecx_5 < 0)
006aa733      {
006aa736          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006aa739          ecx_5 = ((char*)ecx_7 + 1);
006aa739          cond:1 = ecx_7 == 0xffffffff;
006aa733      }
006aa733      
006aa73a      if (!(cond:1))
006aa73a      {
006aa741          void* i_1 = (4 - ecx_5);
006aa741          
006aa743          if (4 != ecx_5)
006aa743          {
006aa752              void* i;
006aa752              
006aa752              do
006aa752              {
006aa745                  *(uint8_t*)eax_6 = 0;
006aa74c                  eax_6 = ((char*)var_c + 1);
006aa74d                  i = i_1;
006aa74d                  i_1 -= 1;
006aa74e                  var_c = eax_6;
006aa752              } while (i != 1);
006aa743          }
006aa73a      }
006aa73a      
006aa754      arg2->vtable->Pack(&var_c, (((char*)eax_2 - eax_6) + (eax_1 + 0x10)));
006aa76e      void* ebx;
006aa76e      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006aa76e      
006aa775      if (ebx == 0)
006aa77c          Proto_UI::UICounterFailedSend(eax);
006aa77c      
006aa78c      return ebx;
006aa6a0  }

006aa78d                                         90 90 90                                                               ...

006aa790  uint8_t CM_House::Event_ListAvailableHouses(uint32_t arg1)

006aa790  {
006aa796      uint32_t eax = Proto_UI::GetNextUICounter();
006aa7aa      int32_t var_8 = 0x801ad4;
006aa7b2      void* var_c = nullptr;
006aa7ba      OrderHdr::Pack(&var_8, &var_c, 0);
006aa7c5      void* eax_1 = operator new[](0x10);
006aa7d7      var_c = eax_1;
006aa7dd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006aa7ea      *(uint32_t*)var_c = 0x270;
006aa7f4      uint32_t* eax_3 = ((char*)var_c + 4);
006aa7f7      var_c = eax_3;
006aa7fb      *(uint32_t*)eax_3 = arg1;
006aa801      void* eax_5 = ((char*)var_c + 4);
006aa804      var_c = eax_5;
006aa808      void* eax_6 = (eax_5 & 0x80000003);
006aa808      bool cond:0 = eax_6 == 0;
006aa808      
006aa80d      if (eax_6 < 0)
006aa80d      {
006aa810          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006aa813          eax_6 = ((char*)eax_8 + 1);
006aa813          cond:0 = eax_8 == 0xffffffff;
006aa80d      }
006aa80d      
006aa814      if (!(cond:0))
006aa814      {
006aa81b          void* i_1 = (4 - eax_6);
006aa81b          
006aa81d          if (4 != eax_6)
006aa81d          {
006aa831              void* i;
006aa831              
006aa831              do
006aa831              {
006aa824                  *(uint8_t*)var_c = 0;
006aa82c                  i = i_1;
006aa82c                  i_1 -= 1;
006aa82d                  var_c += 1;
006aa831              } while (i != 1);
006aa81d          }
006aa814      }
006aa814      
006aa83a      int32_t ebx;
006aa83a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006aa83a      
006aa841      if (ebx == 0)
006aa848          Proto_UI::UICounterFailedSend(eax);
006aa848      
006aa852      uint32_t eax_9;
006aa852      eax_9 = ebx;
006aa858      return eax_9;
006aa790  }

006aa859                                                                             90 90 90 90 90 90 90                           .......

006aa860  uint8_t CM_House::Event_ModifyAllegianceGuestPermission(int32_t arg1)

006aa860  {
006aa866      uint32_t eax = Proto_UI::GetNextUICounter();
006aa87a      int32_t var_8 = 0x801ad4;
006aa882      void* var_c = nullptr;
006aa88a      OrderHdr::Pack(&var_8, &var_c, 0);
006aa895      void* eax_1 = operator new[](0x10);
006aa8a7      var_c = eax_1;
006aa8ad      OrderHdr::Pack(&var_8, &var_c, 0x10);
006aa8ba      *(uint32_t*)var_c = 0x267;
006aa8c4      int32_t* eax_3 = ((char*)var_c + 4);
006aa8c7      var_c = eax_3;
006aa8cb      *(uint32_t*)eax_3 = arg1;
006aa8d1      void* eax_5 = ((char*)var_c + 4);
006aa8d4      var_c = eax_5;
006aa8d8      void* eax_6 = (eax_5 & 0x80000003);
006aa8d8      bool cond:0 = eax_6 == 0;
006aa8d8      
006aa8dd      if (eax_6 < 0)
006aa8dd      {
006aa8e0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006aa8e3          eax_6 = ((char*)eax_8 + 1);
006aa8e3          cond:0 = eax_8 == 0xffffffff;
006aa8dd      }
006aa8dd      
006aa8e4      if (!(cond:0))
006aa8e4      {
006aa8eb          void* i_1 = (4 - eax_6);
006aa8eb          
006aa8ed          if (4 != eax_6)
006aa8ed          {
006aa901              void* i;
006aa901              
006aa901              do
006aa901              {
006aa8f4                  *(uint8_t*)var_c = 0;
006aa8fc                  i = i_1;
006aa8fc                  i_1 -= 1;
006aa8fd                  var_c += 1;
006aa901              } while (i != 1);
006aa8ed          }
006aa8e4      }
006aa8e4      
006aa90a      int32_t ebx;
006aa90a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006aa90a      
006aa911      if (ebx == 0)
006aa918          Proto_UI::UICounterFailedSend(eax);
006aa918      
006aa922      uint32_t eax_9;
006aa922      eax_9 = ebx;
006aa928      return eax_9;
006aa860  }

006aa929                             90 90 90 90 90 90 90                                                           .......

006aa930  uint8_t CM_House::Event_ModifyAllegianceStoragePermission(int32_t arg1)

006aa930  {
006aa936      uint32_t eax = Proto_UI::GetNextUICounter();
006aa94a      int32_t var_8 = 0x801ad4;
006aa952      void* var_c = nullptr;
006aa95a      OrderHdr::Pack(&var_8, &var_c, 0);
006aa965      void* eax_1 = operator new[](0x10);
006aa977      var_c = eax_1;
006aa97d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006aa98a      *(uint32_t*)var_c = 0x268;
006aa994      int32_t* eax_3 = ((char*)var_c + 4);
006aa997      var_c = eax_3;
006aa99b      *(uint32_t*)eax_3 = arg1;
006aa9a1      void* eax_5 = ((char*)var_c + 4);
006aa9a4      var_c = eax_5;
006aa9a8      void* eax_6 = (eax_5 & 0x80000003);
006aa9a8      bool cond:0 = eax_6 == 0;
006aa9a8      
006aa9ad      if (eax_6 < 0)
006aa9ad      {
006aa9b0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006aa9b3          eax_6 = ((char*)eax_8 + 1);
006aa9b3          cond:0 = eax_8 == 0xffffffff;
006aa9ad      }
006aa9ad      
006aa9b4      if (!(cond:0))
006aa9b4      {
006aa9bb          void* i_1 = (4 - eax_6);
006aa9bb          
006aa9bd          if (4 != eax_6)
006aa9bd          {
006aa9d1              void* i;
006aa9d1              
006aa9d1              do
006aa9d1              {
006aa9c4                  *(uint8_t*)var_c = 0;
006aa9cc                  i = i_1;
006aa9cc                  i_1 -= 1;
006aa9cd                  var_c += 1;
006aa9d1              } while (i != 1);
006aa9bd          }
006aa9b4      }
006aa9b4      
006aa9da      int32_t ebx;
006aa9da      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006aa9da      
006aa9e1      if (ebx == 0)
006aa9e8          Proto_UI::UICounterFailedSend(eax);
006aa9e8      
006aa9f2      uint32_t eax_9;
006aa9f2      eax_9 = ebx;
006aa9f8      return eax_9;
006aa930  }

006aa9f9                                                                             90 90 90 90 90 90 90                           .......

006aaa00  uint8_t CM_House::Event_QueryHouse()

006aaa00  {
006aaa06      uint32_t eax = Proto_UI::GetNextUICounter();
006aaa1a      int32_t var_8 = 0x801ad4;
006aaa22      void* var_c = nullptr;
006aaa2a      OrderHdr::Pack(&var_8, &var_c, 0);
006aaa35      void* eax_1 = operator new[](0xc);
006aaa47      var_c = eax_1;
006aaa4d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006aaa56      *(uint32_t*)var_c = 0x21e;
006aaa65      var_c += 4;
006aaa6e      int32_t ebx;
006aaa6e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006aaa6e      
006aaa75      if (ebx == 0)
006aaa7c          Proto_UI::UICounterFailedSend(eax);
006aaa7c      
006aaa86      uint32_t eax_4;
006aaa86      eax_4 = ebx;
006aaa8c      return eax_4;
006aaa00  }

006aaa8d                                         90 90 90                                                               ...

006aaa90  uint8_t CM_House::Event_QueryLord(uint32_t arg1)

006aaa90  {
006aaa96      uint32_t eax = Proto_UI::GetNextUICounter();
006aaaaa      int32_t var_8 = 0x801ad4;
006aaab2      void* var_c = nullptr;
006aaaba      OrderHdr::Pack(&var_8, &var_c, 0);
006aaac5      void* eax_1 = operator new[](0x10);
006aaad7      var_c = eax_1;
006aaadd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006aaaea      *(uint32_t*)var_c = 0x258;
006aaaf4      uint32_t* eax_3 = ((char*)var_c + 4);
006aaaf7      var_c = eax_3;
006aaafb      *(uint32_t*)eax_3 = arg1;
006aab01      void* eax_5 = ((char*)var_c + 4);
006aab04      var_c = eax_5;
006aab08      void* eax_6 = (eax_5 & 0x80000003);
006aab08      bool cond:0 = eax_6 == 0;
006aab08      
006aab0d      if (eax_6 < 0)
006aab0d      {
006aab10          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006aab13          eax_6 = ((char*)eax_8 + 1);
006aab13          cond:0 = eax_8 == 0xffffffff;
006aab0d      }
006aab0d      
006aab14      if (!(cond:0))
006aab14      {
006aab1b          void* i_1 = (4 - eax_6);
006aab1b          
006aab1d          if (4 != eax_6)
006aab1d          {
006aab31              void* i;
006aab31              
006aab31              do
006aab31              {
006aab24                  *(uint8_t*)var_c = 0;
006aab2c                  i = i_1;
006aab2c                  i_1 -= 1;
006aab2d                  var_c += 1;
006aab31              } while (i != 1);
006aab1d          }
006aab14      }
006aab14      
006aab3a      int32_t ebx;
006aab3a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006aab3a      
006aab41      if (ebx == 0)
006aab48          Proto_UI::UICounterFailedSend(eax);
006aab48      
006aab52      uint32_t eax_9;
006aab52      eax_9 = ebx;
006aab58      return eax_9;
006aaa90  }

006aab59                                                                             90 90 90 90 90 90 90                           .......

006aab60  uint8_t CM_House::Event_RemoveAllPermanentGuests_Event()

006aab60  {
006aab66      uint32_t eax = Proto_UI::GetNextUICounter();
006aab7a      int32_t var_8 = 0x801ad4;
006aab82      void* var_c = nullptr;
006aab8a      OrderHdr::Pack(&var_8, &var_c, 0);
006aab95      void* eax_1 = operator new[](0xc);
006aaba7      var_c = eax_1;
006aabad      OrderHdr::Pack(&var_8, &var_c, 0xc);
006aabb6      *(uint32_t*)var_c = 0x25e;
006aabc5      var_c += 4;
006aabce      int32_t ebx;
006aabce      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006aabce      
006aabd5      if (ebx == 0)
006aabdc          Proto_UI::UICounterFailedSend(eax);
006aabdc      
006aabe6      uint32_t eax_4;
006aabe6      eax_4 = ebx;
006aabec      return eax_4;
006aab60  }

006aabed                                         90 90 90                                                               ...

006aabf0  uint8_t CM_House::Event_RemoveAllStoragePermission()

006aabf0  {
006aabf6      uint32_t eax = Proto_UI::GetNextUICounter();
006aac0a      int32_t var_8 = 0x801ad4;
006aac12      void* var_c = nullptr;
006aac1a      OrderHdr::Pack(&var_8, &var_c, 0);
006aac25      void* eax_1 = operator new[](0xc);
006aac37      var_c = eax_1;
006aac3d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006aac46      *(uint32_t*)var_c = 0x24c;
006aac55      var_c += 4;
006aac5e      int32_t ebx;
006aac5e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006aac5e      
006aac65      if (ebx == 0)
006aac6c          Proto_UI::UICounterFailedSend(eax);
006aac6c      
006aac76      uint32_t eax_4;
006aac76      eax_4 = ebx;
006aac7c      return eax_4;
006aabf0  }

006aac7d                                                                                         90 90 90                               ...

006aac80  uint8_t CM_House::Event_RentHouse(uint32_t arg1, class PackableList<unsigned long> const* arg2)

006aac80  {
006aac86      uint32_t eax = Proto_UI::GetNextUICounter();
006aac99      struct PackableList<unsigned long>::VTable* vtable = arg2->vtable;
006aac9e      int32_t var_8 = 0x801ad4;
006aaca6      void* var_c = nullptr;
006aacae      int32_t eax_1 = vtable->Pack(&var_c, 0);
006aacbe      OrderHdr::Pack(&var_8, &var_c, 0);
006aacc8      void* eax_2 = operator new[]((eax_1 + 0x10));
006aacd0      var_c = eax_2;
006aace0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006aaced      *(uint32_t*)var_c = 0x221;
006aacf7      uint32_t* eax_4 = ((char*)var_c + 4);
006aacfa      var_c = eax_4;
006aacfe      *(uint32_t*)eax_4 = arg1;
006aad04      void* eax_6 = ((char*)var_c + 4);
006aad09      void* ecx_5 = (eax_6 & 0x80000003);
006aad09      bool cond:1 = ecx_5 == 0;
006aad0f      var_c = eax_6;
006aad0f      
006aad13      if (ecx_5 < 0)
006aad13      {
006aad16          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006aad19          ecx_5 = ((char*)ecx_7 + 1);
006aad19          cond:1 = ecx_7 == 0xffffffff;
006aad13      }
006aad13      
006aad1a      if (!(cond:1))
006aad1a      {
006aad21          void* i_1 = (4 - ecx_5);
006aad21          
006aad23          if (4 != ecx_5)
006aad23          {
006aad32              void* i;
006aad32              
006aad32              do
006aad32              {
006aad25                  *(uint8_t*)eax_6 = 0;
006aad2c                  eax_6 = ((char*)var_c + 1);
006aad2d                  i = i_1;
006aad2d                  i_1 -= 1;
006aad2e                  var_c = eax_6;
006aad32              } while (i != 1);
006aad23          }
006aad1a      }
006aad1a      
006aad34      arg2->vtable->Pack(&var_c, (((char*)eax_2 - eax_6) + (eax_1 + 0x10)));
006aad4e      void* ebx;
006aad4e      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006aad4e      
006aad55      if (ebx == 0)
006aad5c          Proto_UI::UICounterFailedSend(eax);
006aad5c      
006aad6c      return ebx;
006aac80  }

006aad6d                                         90 90 90                                                               ...

006aad70  uint8_t CM_House::Event_RequestFullGuestList_Event()

006aad70  {
006aad76      uint32_t eax = Proto_UI::GetNextUICounter();
006aad8a      int32_t var_8 = 0x801ad4;
006aad92      void* var_c = nullptr;
006aad9a      OrderHdr::Pack(&var_8, &var_c, 0);
006aada5      void* eax_1 = operator new[](0xc);
006aadb7      var_c = eax_1;
006aadbd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006aadc6      *(uint32_t*)var_c = 0x24d;
006aadd5      var_c += 4;
006aadde      int32_t ebx;
006aadde      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006aadde      
006aade5      if (ebx == 0)
006aadec          Proto_UI::UICounterFailedSend(eax);
006aadec      
006aadf6      uint32_t eax_4;
006aadf6      eax_4 = ebx;
006aadfc      return eax_4;
006aad70  }

006aadfd                                                                                         90 90 90                               ...

006aae00  uint8_t CM_House::Event_SetHooksVisibility(int32_t arg1)

006aae00  {
006aae06      uint32_t eax = Proto_UI::GetNextUICounter();
006aae1a      int32_t var_8 = 0x801ad4;
006aae22      void* var_c = nullptr;
006aae2a      OrderHdr::Pack(&var_8, &var_c, 0);
006aae35      void* eax_1 = operator new[](0x10);
006aae47      var_c = eax_1;
006aae4d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006aae5a      *(uint32_t*)var_c = 0x266;
006aae64      int32_t* eax_3 = ((char*)var_c + 4);
006aae67      var_c = eax_3;
006aae6b      *(uint32_t*)eax_3 = arg1;
006aae71      void* eax_5 = ((char*)var_c + 4);
006aae74      var_c = eax_5;
006aae78      void* eax_6 = (eax_5 & 0x80000003);
006aae78      bool cond:0 = eax_6 == 0;
006aae78      
006aae7d      if (eax_6 < 0)
006aae7d      {
006aae80          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006aae83          eax_6 = ((char*)eax_8 + 1);
006aae83          cond:0 = eax_8 == 0xffffffff;
006aae7d      }
006aae7d      
006aae84      if (!(cond:0))
006aae84      {
006aae8b          void* i_1 = (4 - eax_6);
006aae8b          
006aae8d          if (4 != eax_6)
006aae8d          {
006aaea1              void* i;
006aaea1              
006aaea1              do
006aaea1              {
006aae94                  *(uint8_t*)var_c = 0;
006aae9c                  i = i_1;
006aae9c                  i_1 -= 1;
006aae9d                  var_c += 1;
006aaea1              } while (i != 1);
006aae8d          }
006aae84      }
006aae84      
006aaeaa      int32_t ebx;
006aaeaa      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006aaeaa      
006aaeb1      if (ebx == 0)
006aaeb8          Proto_UI::UICounterFailedSend(eax);
006aaeb8      
006aaec2      uint32_t eax_9;
006aaec2      eax_9 = ebx;
006aaec8      return eax_9;
006aae00  }

006aaec9                             90 90 90 90 90 90 90                                                           .......

006aaed0  uint8_t CM_House::Event_SetOpenHouseStatus_Event(int32_t arg1)

006aaed0  {
006aaed6      uint32_t eax = Proto_UI::GetNextUICounter();
006aaeea      int32_t var_8 = 0x801ad4;
006aaef2      void* var_c = nullptr;
006aaefa      OrderHdr::Pack(&var_8, &var_c, 0);
006aaf05      void* eax_1 = operator new[](0x10);
006aaf17      var_c = eax_1;
006aaf1d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006aaf2a      *(uint32_t*)var_c = 0x247;
006aaf34      int32_t* eax_3 = ((char*)var_c + 4);
006aaf37      var_c = eax_3;
006aaf3b      *(uint32_t*)eax_3 = arg1;
006aaf41      void* eax_5 = ((char*)var_c + 4);
006aaf44      var_c = eax_5;
006aaf48      void* eax_6 = (eax_5 & 0x80000003);
006aaf48      bool cond:0 = eax_6 == 0;
006aaf48      
006aaf4d      if (eax_6 < 0)
006aaf4d      {
006aaf50          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006aaf53          eax_6 = ((char*)eax_8 + 1);
006aaf53          cond:0 = eax_8 == 0xffffffff;
006aaf4d      }
006aaf4d      
006aaf54      if (!(cond:0))
006aaf54      {
006aaf5b          void* i_1 = (4 - eax_6);
006aaf5b          
006aaf5d          if (4 != eax_6)
006aaf5d          {
006aaf71              void* i;
006aaf71              
006aaf71              do
006aaf71              {
006aaf64                  *(uint8_t*)var_c = 0;
006aaf6c                  i = i_1;
006aaf6c                  i_1 -= 1;
006aaf6d                  var_c += 1;
006aaf71              } while (i != 1);
006aaf5d          }
006aaf54      }
006aaf54      
006aaf7a      int32_t ebx;
006aaf7a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006aaf7a      
006aaf81      if (ebx == 0)
006aaf88          Proto_UI::UICounterFailedSend(eax);
006aaf88      
006aaf92      uint32_t eax_9;
006aaf92      eax_9 = ebx;
006aaf98      return eax_9;
006aaed0  }

006aaf99                                                                             90 90 90 90 90 90 90                           .......

006aafa0  uint8_t CM_House::Event_TeleToHouse_Event()

006aafa0  {
006aafa6      uint32_t eax = Proto_UI::GetNextUICounter();
006aafba      int32_t var_8 = 0x801ad4;
006aafc2      void* var_c = nullptr;
006aafca      OrderHdr::Pack(&var_8, &var_c, 0);
006aafd5      void* eax_1 = operator new[](0xc);
006aafe7      var_c = eax_1;
006aafed      OrderHdr::Pack(&var_8, &var_c, 0xc);
006aaff6      *(uint32_t*)var_c = 0x262;
006ab005      var_c += 4;
006ab00e      int32_t ebx;
006ab00e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006ab00e      
006ab015      if (ebx == 0)
006ab01c          Proto_UI::UICounterFailedSend(eax);
006ab01c      
006ab026      uint32_t eax_4;
006ab026      eax_4 = ebx;
006ab02c      return eax_4;
006aafa0  }

006ab02d                                         90 90 90                                                               ...

006ab030  uint8_t CM_House::Event_TeleToMansion_Event()

006ab030  {
006ab036      uint32_t eax = Proto_UI::GetNextUICounter();
006ab04a      int32_t var_8 = 0x801ad4;
006ab052      void* var_c = nullptr;
006ab05a      OrderHdr::Pack(&var_8, &var_c, 0);
006ab065      void* eax_1 = operator new[](0xc);
006ab077      var_c = eax_1;
006ab07d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006ab086      *(uint32_t*)var_c = 0x278;
006ab095      var_c += 4;
006ab09e      int32_t ebx;
006ab09e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006ab09e      
006ab0a5      if (ebx == 0)
006ab0ac          Proto_UI::UICounterFailedSend(eax);
006ab0ac      
006ab0b6      uint32_t eax_4;
006ab0b6      eax_4 = ebx;
006ab0bc      return eax_4;
006ab030  }

006ab0bd                                                                                         90 90 90                               ...

006ab0c0  uint8_t CM_House::SendNotice_FailedHouseTransaction(uint32_t arg1)

006ab0c0  {
006ab0ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd226);
006ab0ce      
006ab0d3      if (eax != 0)
006ab0d3      {
006ab0d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ab0d6          
006ab0db          while (i != 0)
006ab0db          {
006ab0e3              int32_t* edi_1 = *(uint32_t*)i;
006ab0e7              i = i[1];
006ab0e7              
006ab0ea              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ab0fb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x124)(arg1);
006ab0db          }
006ab0d3      }
006ab0d3      
006ab108      eax = 1;
006ab10a      return 1;
006ab0c0  }

006ab10b                                   90 90 90 90 90                                                             .....

006ab110  uint8_t CM_House::SendNotice_UpdateHouseData(class HouseData const* arg1)

006ab110  {
006ab11e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd225);
006ab11e      
006ab123      if (eax != 0)
006ab123      {
006ab126          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ab126          
006ab12b          while (i != 0)
006ab12b          {
006ab133              int32_t* edi_1 = *(uint32_t*)i;
006ab137              i = i[1];
006ab137              
006ab13a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ab14b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x128)(arg1);
006ab12b          }
006ab123      }
006ab123      
006ab158      eax = 1;
006ab15a      return 1;
006ab110  }

006ab15b                                                                                   90 90 90 90 90                             .....

006ab160  uint8_t CM_House::SendNotice_UpdateHouseProfile(uint32_t arg1, class HouseProfile const* arg2)

006ab160  {
006ab16e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd229);
006ab16e      
006ab173      if (eax != 0)
006ab173      {
006ab176          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ab176          
006ab17b          while (i != 0)
006ab17b          {
006ab188              int32_t* esi_1 = *(uint32_t*)i;
006ab18c              i = i[1];
006ab18c              
006ab18f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006ab1a1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x12c)(arg1, arg2);
006ab17b          }
006ab173      }
006ab173      
006ab1af      eax = 1;
006ab1b1      return 1;
006ab160  }

006ab1b2                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006ab1c0  uint8_t CM_House::SendNotice_UpdateRentPayment(class HousePaymentList const* arg1)

006ab1c0  {
006ab1ce      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd228);
006ab1ce      
006ab1d3      if (eax != 0)
006ab1d3      {
006ab1d6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ab1d6          
006ab1db          while (i != 0)
006ab1db          {
006ab1e3              int32_t* edi_1 = *(uint32_t*)i;
006ab1e7              i = i[1];
006ab1e7              
006ab1ea              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ab1fb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x130)(arg1);
006ab1db          }
006ab1d3      }
006ab1d3      
006ab208      eax = 1;
006ab20a      return 1;
006ab1c0  }

006ab20b                                   90 90 90 90 90                                                             .....

006ab210  uint8_t CM_House::SendNotice_UpdateRentTime(int32_t arg1)

006ab210  {
006ab21e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd227);
006ab21e      
006ab223      if (eax != 0)
006ab223      {
006ab226          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ab226          
006ab22b          while (i != 0)
006ab22b          {
006ab233              int32_t* edi_1 = *(uint32_t*)i;
006ab237              i = i[1];
006ab237              
006ab23a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ab24b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x134)(arg1);
006ab22b          }
006ab223      }
006ab223      
006ab258      eax = 1;
006ab25a      return 1;
006ab210  }

006ab25b                                                                                   90 90 90 90 90                             .....

006ab260  uint8_t CM_House::Event_AddPermanentGuest_Event(class AC1Legacy::PStringBase<char> const* arg1)

006ab260  {
006ab266      uint32_t eax = Proto_UI::GetNextUICounter();
006ab27c      int32_t var_8 = 0x801ad4;
006ab284      void* var_c = nullptr;
006ab28c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006ab29e      OrderHdr::Pack(&var_8, &var_c, 0);
006ab2a8      void* eax_2 = operator new[]((eax_1 + 0xc));
006ab2ba      var_c = eax_2;
006ab2c0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006ab2c9      *(uint32_t*)var_c = 0x245;
006ab2da      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006ab2e4      var_c += 4;
006ab2e8      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006ab2f4      class AC1Legacy::PStringBase<char>* ebx;
006ab2f4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006ab2f4      
006ab2fb      if (ebx == 0)
006ab302          Proto_UI::UICounterFailedSend(eax);
006ab302      
006ab30c      uint32_t eax_6;
006ab30c      eax_6 = ebx;
006ab312      return eax_6;
006ab260  }

006ab313                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006ab320  uint8_t CM_House::Event_BootSpecificHouseGuest_Event(class AC1Legacy::PStringBase<char> const* arg1)

006ab320  {
006ab326      uint32_t eax = Proto_UI::GetNextUICounter();
006ab33c      int32_t var_8 = 0x801ad4;
006ab344      void* var_c = nullptr;
006ab34c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006ab35e      OrderHdr::Pack(&var_8, &var_c, 0);
006ab368      void* eax_2 = operator new[]((eax_1 + 0xc));
006ab37a      var_c = eax_2;
006ab380      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006ab389      *(uint32_t*)var_c = 0x24a;
006ab39a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006ab3a4      var_c += 4;
006ab3a8      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006ab3b4      class AC1Legacy::PStringBase<char>* ebx;
006ab3b4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006ab3b4      
006ab3bb      if (ebx == 0)
006ab3c2          Proto_UI::UICounterFailedSend(eax);
006ab3c2      
006ab3cc      uint32_t eax_6;
006ab3cc      eax_6 = ebx;
006ab3d2      return eax_6;
006ab320  }

006ab3d3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006ab3e0  uint8_t CM_House::Event_ChangeStoragePermission_Event(class AC1Legacy::PStringBase<char> const* arg1, int32_t arg2)

006ab3e0  {
006ab3e6      uint32_t eax = Proto_UI::GetNextUICounter();
006ab3fc      int32_t var_8 = 0x801ad4;
006ab404      void* var_c = nullptr;
006ab40c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006ab41e      OrderHdr::Pack(&var_8, &var_c, 0);
006ab428      void* eax_2 = operator new[]((eax_1 + 0x10));
006ab43a      var_c = eax_2;
006ab440      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006ab449      *(uint32_t*)var_c = 0x249;
006ab45a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0x10));
006ab464      var_c += 4;
006ab468      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006ab475      *(uint32_t*)var_c = arg2;
006ab47b      void* eax_8 = ((char*)var_c + 4);
006ab47e      var_c = eax_8;
006ab482      void* eax_9 = (eax_8 & 0x80000003);
006ab482      bool cond:0 = eax_9 == 0;
006ab482      
006ab487      if (eax_9 < 0)
006ab487      {
006ab48a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006ab48d          eax_9 = ((char*)eax_11 + 1);
006ab48d          cond:0 = eax_11 == 0xffffffff;
006ab487      }
006ab487      
006ab48e      if (!(cond:0))
006ab48e      {
006ab495          void* i_1 = (4 - eax_9);
006ab495          
006ab497          if (4 != eax_9)
006ab497          {
006ab4b1              void* i;
006ab4b1              
006ab4b1              do
006ab4b1              {
006ab4a4                  *(uint8_t*)var_c = 0;
006ab4ac                  i = i_1;
006ab4ac                  i_1 -= 1;
006ab4ad                  var_c += 1;
006ab4b1              } while (i != 1);
006ab497          }
006ab48e      }
006ab48e      
006ab4ba      void* ebx;
006ab4ba      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006ab4ba      
006ab4c1      if (ebx == 0)
006ab4c8          Proto_UI::UICounterFailedSend(eax);
006ab4c8      
006ab4d2      uint32_t eax_12;
006ab4d2      eax_12 = ebx;
006ab4d8      return eax_12;
006ab3e0  }

006ab4d9                                                                             90 90 90 90 90 90 90                           .......

006ab4e0  uint8_t CM_House::Event_RemovePermanentGuest_Event(class AC1Legacy::PStringBase<char> const* arg1)

006ab4e0  {
006ab4e6      uint32_t eax = Proto_UI::GetNextUICounter();
006ab4fc      int32_t var_8 = 0x801ad4;
006ab504      void* var_c = nullptr;
006ab50c      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, 0);
006ab51e      OrderHdr::Pack(&var_8, &var_c, 0);
006ab528      void* eax_2 = operator new[]((eax_1 + 0xc));
006ab53a      var_c = eax_2;
006ab540      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006ab549      *(uint32_t*)var_c = 0x246;
006ab55a      uint32_t ecx_5 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006ab564      var_c += 4;
006ab568      AC1Legacy::PStringBase<char>::Pack(arg1, &var_c, ecx_5);
006ab574      class AC1Legacy::PStringBase<char>* ebx;
006ab574      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006ab574      
006ab57b      if (ebx == 0)
006ab582          Proto_UI::UICounterFailedSend(eax);
006ab582      
006ab58c      uint32_t eax_6;
006ab58c      eax_6 = ebx;
006ab592      return eax_6;
006ab4e0  }

006ab593                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006ab5a0  uint32_t CM_House::DispatchUI_Recv_AvailableHouses(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ab5a0  {
006ab5b1      if ((arg1 == 0 || arg1->m_pHousingSystem == 0))
006ab5b9          return 0;
006ab5b9      
006ab5ba      void* ecx = arg2;
006ab5ba      
006ab5cc      if (*(uint32_t*)ecx != 0x271)
006ab5d5          return 0;
006ab5d5      
006ab5d6      uint32_t esi_1 = *(uint32_t*)((char*)ecx + 4);
006ab5dd      arg2 = ((char*)ecx + 8);
006ab5ef      int32_t var_10 = 0x7a3e80;
006ab5f7      int32_t var_c = 0;
006ab5fb      int32_t var_8 = 0;
006ab5ff      int32_t var_4 = 0;
006ab603      PackableList<unsigned long>::UnPack(&var_10, &arg2, (((ecx * 0) - 8) + arg3));
006ab618      ClientHousingSystem::Handle_House__Recv_AvailableHouses(arg1->m_pHousingSystem, esi_1, &var_10, *(uint32_t*)arg2);
006ab623      var_10 = 0x7a3e80;
006ab62b      PackableList<unsigned long>::Flush(&var_10);
006ab637      return 0;
006ab5a0  }

006ab638                                                                          90 90 90 90 90 90 90 90                          ........

006ab640  void __fastcall HouseData::~HouseData(class HouseData* this)

006ab640  {
006ab647      this->m_pos.vtable = 0x79285c;
006ab644      this->m_rent.vtable = 0x7e72e4;
006ab656      PackableList<HousePayment>::Flush(&this->m_rent);
006ab644      this->m_rent.vtable = 0x79285c;
006ab661      this->m_buy.vtable = 0x7e72e4;
006ab66c      PackableList<HousePayment>::Flush(&this->m_buy);
006ab661      this->m_buy.vtable = 0x79285c;
006ab678      this->vtable = 0x79285c;
006ab640  }


006ab680  uint32_t CM_House::DispatchUI_Recv_HouseProfile(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ab680  {
006ab691      if ((arg1 == 0 || arg1->m_pHousingSystem == 0))
006ab699          return 0;
006ab699      
006ab69a      void* eax_3 = arg2;
006ab6a6      bool cond:0 = *(uint32_t*)eax_3 == 0x21d;
006ab6ac      arg2 = ((char*)eax_3 + 4);
006ab6ac      
006ab6b0      if (!(cond:0))
006ab6b9          return 0;
006ab6b9      
006ab6bb      uint32_t edi = *(uint32_t*)((char*)eax_3 + 4);
006ab6c4      arg2 = ((char*)eax_3 + 8);
006ab6c8      void var_4c;
006ab6c8      HouseProfile::HouseProfile(&var_4c);
006ab6e3      HouseProfile::UnPack(&var_4c, &arg2, (((char*)eax_3 - arg2) + arg3));
006ab6f1      ClientHousingSystem::Handle_House__Recv_HouseProfile(arg1->m_pHousingSystem, edi, &var_4c);
006ab6fc      HouseProfile::~HouseProfile(&var_4c);
006ab709      return 0;
006ab680  }

006ab70a                                90 90 90 90 90 90                                                            ......

006ab710  uint32_t CM_House::DispatchUI_Recv_UpdateRentPayment(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ab710  {
006ab721      if ((arg1 != 0 && arg1->m_pHousingSystem != 0))
006ab721      {
006ab723          void* ecx_1 = arg2;
006ab72e          bool cond:0_1 = *(uint32_t*)ecx_1 == 0x228;
006ab734          arg2 = ((char*)ecx_1 + 4);
006ab734          
006ab738          if (cond:0_1)
006ab738          {
006ab751              int32_t var_c = 0;
006ab759              int32_t var_8 = 0;
006ab761              int32_t var_4 = 0;
006ab769              int32_t var_10 = 0x7e72e4;
006ab771              PackableList<HousePayment>::UnPack(&var_10, &arg2, (((ecx_1 * 0) - 4) + arg3));
006ab77e              ClientHousingSystem::Handle_House__Recv_UpdateRentPayment(arg1->m_pHousingSystem, &var_10);
006ab789              var_10 = 0x7e72e4;
006ab791              PackableList<HousePayment>::Flush(&var_10);
006ab738          }
006ab721      }
006ab721      
006ab740      return 0;
006ab710  }

006ab79d                                                                                         90 90 90                               ...

006ab7a0  uint32_t CM_House::DispatchUI_Recv_HouseData(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ab7a0  {
006ab7b4      if ((arg1 == 0 || arg1->m_pHousingSystem == 0))
006ab7bc          return 0;
006ab7bc      
006ab7bd      void* eax_3 = arg2;
006ab7cc      bool cond:0 = *(uint32_t*)eax_3 == 0x225;
006ab7d2      arg2 = ((char*)eax_3 + 4);
006ab7d2      
006ab7d9      if (!(cond:0))
006ab7e2          return 0;
006ab7e2      
006ab7e7      void var_7c;
006ab7e7      HouseData::HouseData(&var_7c);
006ab80b      HouseData::UnPack(&var_7c, &arg2, (((char*)eax_3 - arg2) + arg3));
006ab818      ClientHousingSystem::Handle_House__Recv_HouseData(arg1->m_pHousingSystem, &var_7c);
006ab823      HouseData::~HouseData(&var_7c);
006ab82f      return 0;
006ab7a0  }


006ab830  uint8_t CM_Inventory::Event_CreateTinkeringTool(uint32_t arg1, class PackableList<unsigned long> const* arg2)

006ab830  {
006ab836      uint32_t eax = Proto_UI::GetNextUICounter();
006ab849      struct PackableList<unsigned long>::VTable* vtable = arg2->vtable;
006ab84e      int32_t var_8 = 0x801ad4;
006ab856      void* var_c = nullptr;
006ab85e      int32_t eax_1 = vtable->Pack(&var_c, 0);
006ab86e      OrderHdr::Pack(&var_8, &var_c, 0);
006ab878      void* eax_2 = operator new[]((eax_1 + 0x10));
006ab880      var_c = eax_2;
006ab890      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006ab89d      *(uint32_t*)var_c = 0x27d;
006ab8a7      uint32_t* eax_4 = ((char*)var_c + 4);
006ab8aa      var_c = eax_4;
006ab8ae      *(uint32_t*)eax_4 = arg1;
006ab8b4      void* eax_6 = ((char*)var_c + 4);
006ab8b9      void* ecx_5 = (eax_6 & 0x80000003);
006ab8b9      bool cond:1 = ecx_5 == 0;
006ab8bf      var_c = eax_6;
006ab8bf      
006ab8c3      if (ecx_5 < 0)
006ab8c3      {
006ab8c6          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006ab8c9          ecx_5 = ((char*)ecx_7 + 1);
006ab8c9          cond:1 = ecx_7 == 0xffffffff;
006ab8c3      }
006ab8c3      
006ab8ca      if (!(cond:1))
006ab8ca      {
006ab8d1          void* i_1 = (4 - ecx_5);
006ab8d1          
006ab8d3          if (4 != ecx_5)
006ab8d3          {
006ab8e2              void* i;
006ab8e2              
006ab8e2              do
006ab8e2              {
006ab8d5                  *(uint8_t*)eax_6 = 0;
006ab8dc                  eax_6 = ((char*)var_c + 1);
006ab8dd                  i = i_1;
006ab8dd                  i_1 -= 1;
006ab8de                  var_c = eax_6;
006ab8e2              } while (i != 1);
006ab8d3          }
006ab8ca      }
006ab8ca      
006ab8e4      arg2->vtable->Pack(&var_c, (((char*)eax_2 - eax_6) + (eax_1 + 0x10)));
006ab8fe      void* ebx;
006ab8fe      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006ab8fe      
006ab905      if (ebx == 0)
006ab90c          Proto_UI::UICounterFailedSend(eax);
006ab90c      
006ab91c      return ebx;
006ab830  }

006ab91d                                                                                         90 90 90                               ...

006ab920  uint8_t CM_Inventory::Event_DropItem(uint32_t arg1)

006ab920  {
006ab926      uint32_t eax = Proto_UI::GetNextUICounter();
006ab93a      int32_t var_8 = 0x801ad4;
006ab942      void* var_c = nullptr;
006ab94a      OrderHdr::Pack(&var_8, &var_c, 0);
006ab955      void* eax_1 = operator new[](0x10);
006ab967      var_c = eax_1;
006ab96d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006ab97a      *(uint32_t*)var_c = 0x1b;
006ab984      uint32_t* eax_3 = ((char*)var_c + 4);
006ab987      var_c = eax_3;
006ab98b      *(uint32_t*)eax_3 = arg1;
006ab991      void* eax_5 = ((char*)var_c + 4);
006ab994      var_c = eax_5;
006ab998      void* eax_6 = (eax_5 & 0x80000003);
006ab998      bool cond:0 = eax_6 == 0;
006ab998      
006ab99d      if (eax_6 < 0)
006ab99d      {
006ab9a0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006ab9a3          eax_6 = ((char*)eax_8 + 1);
006ab9a3          cond:0 = eax_8 == 0xffffffff;
006ab99d      }
006ab99d      
006ab9a4      if (!(cond:0))
006ab9a4      {
006ab9ab          void* i_1 = (4 - eax_6);
006ab9ab          
006ab9ad          if (4 != eax_6)
006ab9ad          {
006ab9c1              void* i;
006ab9c1              
006ab9c1              do
006ab9c1              {
006ab9b4                  *(uint8_t*)var_c = 0;
006ab9bc                  i = i_1;
006ab9bc                  i_1 -= 1;
006ab9bd                  var_c += 1;
006ab9c1              } while (i != 1);
006ab9ad          }
006ab9a4      }
006ab9a4      
006ab9ca      int32_t ebx;
006ab9ca      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006ab9ca      
006ab9d1      if (ebx == 0)
006ab9d8          Proto_UI::UICounterFailedSend(eax);
006ab9d8      
006ab9e2      uint32_t eax_9;
006ab9e2      eax_9 = ebx;
006ab9e8      return eax_9;
006ab920  }

006ab9e9                             90 90 90 90 90 90 90                                                           .......

006ab9f0  uint8_t CM_Inventory::Event_GetAndWieldItem(uint32_t arg1, uint32_t arg2)

006ab9f0  {
006ab9f6      uint32_t eax = Proto_UI::GetNextUICounter();
006aba0a      int32_t var_8 = 0x801ad4;
006aba12      void* var_c = nullptr;
006aba1a      OrderHdr::Pack(&var_8, &var_c, 0);
006aba25      void* eax_1 = operator new[](0x14);
006aba37      var_c = eax_1;
006aba3d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006aba4a      *(uint32_t*)var_c = 0x1a;
006aba54      uint32_t* eax_3 = ((char*)var_c + 4);
006aba57      var_c = eax_3;
006aba5b      *(uint32_t*)eax_3 = arg1;
006aba61      void* eax_5 = ((char*)var_c + 4);
006aba66      void* ecx_4 = (eax_5 & 0x80000003);
006aba66      bool cond:1 = ecx_4 == 0;
006aba6c      var_c = eax_5;
006aba6c      
006aba70      if (ecx_4 < 0)
006aba70      {
006aba73          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006aba76          ecx_4 = ((char*)ecx_6 + 1);
006aba76          cond:1 = ecx_6 == 0xffffffff;
006aba70      }
006aba70      
006aba77      if (!(cond:1))
006aba77      {
006aba7e          void* i_3 = (4 - ecx_4);
006aba7e          
006aba80          if (4 != ecx_4)
006aba80          {
006aba8f              void* i;
006aba8f              
006aba8f              do
006aba8f              {
006aba82                  *(uint8_t*)eax_5 = 0;
006aba89                  eax_5 = ((char*)var_c + 1);
006aba8a                  i = i_3;
006aba8a                  i_3 -= 1;
006aba8b                  var_c = eax_5;
006aba8f              } while (i != 1);
006aba80          }
006aba77      }
006aba77      
006aba95      *(uint32_t*)eax_5 = arg2;
006aba9b      void* eax_8 = ((char*)var_c + 4);
006aba9e      var_c = eax_8;
006abaa2      void* eax_9 = (eax_8 & 0x80000003);
006abaa2      bool cond:2 = eax_9 == 0;
006abaa2      
006abaa7      if (eax_9 < 0)
006abaa7      {
006abaaa          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006abaad          eax_9 = ((char*)eax_11 + 1);
006abaad          cond:2 = eax_11 == 0xffffffff;
006abaa7      }
006abaa7      
006abaae      if (!(cond:2))
006abaae      {
006abab5          void* i_2 = (4 - eax_9);
006abab5          
006abab7          if (4 != eax_9)
006abab7          {
006abad1              void* i_1;
006abad1              
006abad1              do
006abad1              {
006abac4                  *(uint8_t*)var_c = 0;
006abacc                  i_1 = i_2;
006abacc                  i_2 -= 1;
006abacd                  var_c += 1;
006abad1              } while (i_1 != 1);
006abab7          }
006abaae      }
006abaae      
006abada      int32_t ebx;
006abada      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006abada      
006abae1      if (ebx == 0)
006abae8          Proto_UI::UICounterFailedSend(eax);
006abae8      
006abaf8      return ebx;
006ab9f0  }

006abaf9                                                                             90 90 90 90 90 90 90                           .......

006abb00  uint8_t CM_Inventory::Event_GiveObjectRequest(uint32_t arg1, uint32_t arg2, uint32_t arg3)

006abb00  {
006abb06      uint32_t eax = Proto_UI::GetNextUICounter();
006abb1a      int32_t var_8 = 0x801ad4;
006abb22      void* var_c = nullptr;
006abb2a      OrderHdr::Pack(&var_8, &var_c, 0);
006abb35      void* eax_1 = operator new[](0x18);
006abb47      var_c = eax_1;
006abb4d      OrderHdr::Pack(&var_8, &var_c, 0x18);
006abb5a      *(uint32_t*)var_c = 0xcd;
006abb64      uint32_t* eax_3 = ((char*)var_c + 4);
006abb67      var_c = eax_3;
006abb6b      *(uint32_t*)eax_3 = arg1;
006abb71      void* eax_5 = ((char*)var_c + 4);
006abb76      void* ecx_4 = (eax_5 & 0x80000003);
006abb76      bool cond:1 = ecx_4 == 0;
006abb7c      var_c = eax_5;
006abb7c      
006abb80      if (ecx_4 < 0)
006abb80      {
006abb83          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006abb86          ecx_4 = ((char*)ecx_6 + 1);
006abb86          cond:1 = ecx_6 == 0xffffffff;
006abb80      }
006abb80      
006abb87      if (!(cond:1))
006abb87      {
006abb8e          void* i_4 = (4 - ecx_4);
006abb8e          
006abb90          if (4 != ecx_4)
006abb90          {
006abb9f              void* i;
006abb9f              
006abb9f              do
006abb9f              {
006abb92                  *(uint8_t*)eax_5 = 0;
006abb99                  eax_5 = ((char*)var_c + 1);
006abb9a                  i = i_4;
006abb9a                  i_4 -= 1;
006abb9b                  var_c = eax_5;
006abb9f              } while (i != 1);
006abb90          }
006abb87      }
006abb87      
006abba5      *(uint32_t*)eax_5 = arg2;
006abbab      void* eax_8 = ((char*)var_c + 4);
006abbb0      void* ecx_8 = (eax_8 & 0x80000003);
006abbb0      bool cond:3 = ecx_8 == 0;
006abbb6      var_c = eax_8;
006abbb6      
006abbba      if (ecx_8 < 0)
006abbba      {
006abbbd          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006abbc0          ecx_8 = ((char*)ecx_10 + 1);
006abbc0          cond:3 = ecx_10 == 0xffffffff;
006abbba      }
006abbba      
006abbc1      if (!(cond:3))
006abbc1      {
006abbc8          void* i_5 = (4 - ecx_8);
006abbc8          
006abbca          if (4 != ecx_8)
006abbca          {
006abbdd              void* i_1;
006abbdd              
006abbdd              do
006abbdd              {
006abbd0                  *(uint8_t*)eax_8 = 0;
006abbd7                  eax_8 = ((char*)var_c + 1);
006abbd8                  i_1 = i_5;
006abbd8                  i_5 -= 1;
006abbd9                  var_c = eax_8;
006abbdd              } while (i_1 != 1);
006abbca          }
006abbc1      }
006abbc1      
006abbe3      *(uint32_t*)eax_8 = arg3;
006abbe9      void* eax_11 = ((char*)var_c + 4);
006abbec      var_c = eax_11;
006abbf0      void* eax_12 = (eax_11 & 0x80000003);
006abbf0      bool cond:5 = eax_12 == 0;
006abbf0      
006abbf5      if (eax_12 < 0)
006abbf5      {
006abbf8          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006abbfb          eax_12 = ((char*)eax_14 + 1);
006abbfb          cond:5 = eax_14 == 0xffffffff;
006abbf5      }
006abbf5      
006abbfc      if (!(cond:5))
006abbfc      {
006abc03          void* i_3 = (4 - eax_12);
006abc03          
006abc05          if (4 != eax_12)
006abc05          {
006abc21              void* i_2;
006abc21              
006abc21              do
006abc21              {
006abc14                  *(uint8_t*)var_c = 0;
006abc1c                  i_2 = i_3;
006abc1c                  i_3 -= 1;
006abc1d                  var_c += 1;
006abc21              } while (i_2 != 1);
006abc05          }
006abbfc      }
006abbfc      
006abc2a      int32_t ebx;
006abc2a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006abc2a      
006abc31      if (ebx == 0)
006abc38          Proto_UI::UICounterFailedSend(eax);
006abc38      
006abc42      uint32_t eax_15;
006abc42      eax_15 = ebx;
006abc48      return eax_15;
006abb00  }

006abc09                             8d a4 24 00 00 00 00                                                           ..$....
006abc49                             90 90 90 90 90 90 90                                                           .......

006abc50  uint8_t CM_Inventory::Event_NoLongerViewingContents(uint32_t arg1)

006abc50  {
006abc56      uint32_t eax = Proto_UI::GetNextUICounter();
006abc6a      int32_t var_8 = 0x801ad4;
006abc72      void* var_c = nullptr;
006abc7a      OrderHdr::Pack(&var_8, &var_c, 0);
006abc85      void* eax_1 = operator new[](0x10);
006abc97      var_c = eax_1;
006abc9d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006abcaa      *(uint32_t*)var_c = 0x195;
006abcb4      uint32_t* eax_3 = ((char*)var_c + 4);
006abcb7      var_c = eax_3;
006abcbb      *(uint32_t*)eax_3 = arg1;
006abcc1      void* eax_5 = ((char*)var_c + 4);
006abcc4      var_c = eax_5;
006abcc8      void* eax_6 = (eax_5 & 0x80000003);
006abcc8      bool cond:0 = eax_6 == 0;
006abcc8      
006abccd      if (eax_6 < 0)
006abccd      {
006abcd0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006abcd3          eax_6 = ((char*)eax_8 + 1);
006abcd3          cond:0 = eax_8 == 0xffffffff;
006abccd      }
006abccd      
006abcd4      if (!(cond:0))
006abcd4      {
006abcdb          void* i_1 = (4 - eax_6);
006abcdb          
006abcdd          if (4 != eax_6)
006abcdd          {
006abcf1              void* i;
006abcf1              
006abcf1              do
006abcf1              {
006abce4                  *(uint8_t*)var_c = 0;
006abcec                  i = i_1;
006abcec                  i_1 -= 1;
006abced                  var_c += 1;
006abcf1              } while (i != 1);
006abcdd          }
006abcd4      }
006abcd4      
006abcfa      int32_t ebx;
006abcfa      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006abcfa      
006abd01      if (ebx == 0)
006abd08          Proto_UI::UICounterFailedSend(eax);
006abd08      
006abd12      uint32_t eax_9;
006abd12      eax_9 = ebx;
006abd18      return eax_9;
006abc50  }

006abd19                                                                             90 90 90 90 90 90 90                           .......

006abd20  uint8_t CM_Inventory::Event_PutItemInContainer(uint32_t arg1, uint32_t arg2, uint32_t arg3)

006abd20  {
006abd26      uint32_t eax = Proto_UI::GetNextUICounter();
006abd3a      int32_t var_8 = 0x801ad4;
006abd42      void* var_c = nullptr;
006abd4a      OrderHdr::Pack(&var_8, &var_c, 0);
006abd55      void* eax_1 = operator new[](0x18);
006abd67      var_c = eax_1;
006abd6d      OrderHdr::Pack(&var_8, &var_c, 0x18);
006abd7a      *(uint32_t*)var_c = 0x19;
006abd84      uint32_t* eax_3 = ((char*)var_c + 4);
006abd87      var_c = eax_3;
006abd8b      *(uint32_t*)eax_3 = arg1;
006abd91      void* eax_5 = ((char*)var_c + 4);
006abd96      void* ecx_4 = (eax_5 & 0x80000003);
006abd96      bool cond:1 = ecx_4 == 0;
006abd9c      var_c = eax_5;
006abd9c      
006abda0      if (ecx_4 < 0)
006abda0      {
006abda3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006abda6          ecx_4 = ((char*)ecx_6 + 1);
006abda6          cond:1 = ecx_6 == 0xffffffff;
006abda0      }
006abda0      
006abda7      if (!(cond:1))
006abda7      {
006abdae          void* i_4 = (4 - ecx_4);
006abdae          
006abdb0          if (4 != ecx_4)
006abdb0          {
006abdbf              void* i;
006abdbf              
006abdbf              do
006abdbf              {
006abdb2                  *(uint8_t*)eax_5 = 0;
006abdb9                  eax_5 = ((char*)var_c + 1);
006abdba                  i = i_4;
006abdba                  i_4 -= 1;
006abdbb                  var_c = eax_5;
006abdbf              } while (i != 1);
006abdb0          }
006abda7      }
006abda7      
006abdc5      *(uint32_t*)eax_5 = arg2;
006abdcb      void* eax_8 = ((char*)var_c + 4);
006abdd0      void* ecx_8 = (eax_8 & 0x80000003);
006abdd0      bool cond:3 = ecx_8 == 0;
006abdd6      var_c = eax_8;
006abdd6      
006abdda      if (ecx_8 < 0)
006abdda      {
006abddd          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006abde0          ecx_8 = ((char*)ecx_10 + 1);
006abde0          cond:3 = ecx_10 == 0xffffffff;
006abdda      }
006abdda      
006abde1      if (!(cond:3))
006abde1      {
006abde8          void* i_5 = (4 - ecx_8);
006abde8          
006abdea          if (4 != ecx_8)
006abdea          {
006abdfd              void* i_1;
006abdfd              
006abdfd              do
006abdfd              {
006abdf0                  *(uint8_t*)eax_8 = 0;
006abdf7                  eax_8 = ((char*)var_c + 1);
006abdf8                  i_1 = i_5;
006abdf8                  i_5 -= 1;
006abdf9                  var_c = eax_8;
006abdfd              } while (i_1 != 1);
006abdea          }
006abde1      }
006abde1      
006abe03      *(uint32_t*)eax_8 = arg3;
006abe09      void* eax_11 = ((char*)var_c + 4);
006abe0c      var_c = eax_11;
006abe10      void* eax_12 = (eax_11 & 0x80000003);
006abe10      bool cond:5 = eax_12 == 0;
006abe10      
006abe15      if (eax_12 < 0)
006abe15      {
006abe18          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006abe1b          eax_12 = ((char*)eax_14 + 1);
006abe1b          cond:5 = eax_14 == 0xffffffff;
006abe15      }
006abe15      
006abe1c      if (!(cond:5))
006abe1c      {
006abe23          void* i_3 = (4 - eax_12);
006abe23          
006abe25          if (4 != eax_12)
006abe25          {
006abe41              void* i_2;
006abe41              
006abe41              do
006abe41              {
006abe34                  *(uint8_t*)var_c = 0;
006abe3c                  i_2 = i_3;
006abe3c                  i_3 -= 1;
006abe3d                  var_c += 1;
006abe41              } while (i_2 != 1);
006abe25          }
006abe1c      }
006abe1c      
006abe4a      int32_t ebx;
006abe4a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006abe4a      
006abe51      if (ebx == 0)
006abe58          Proto_UI::UICounterFailedSend(eax);
006abe58      
006abe62      uint32_t eax_15;
006abe62      eax_15 = ebx;
006abe68      return eax_15;
006abd20  }

006abe29                             8d a4 24 00 00 00 00                                                           ..$....
006abe69                             90 90 90 90 90 90 90                                                           .......

006abe70  uint8_t CM_Inventory::Event_StackableMerge(uint32_t arg1, uint32_t arg2, int32_t arg3)

006abe70  {
006abe76      uint32_t eax = Proto_UI::GetNextUICounter();
006abe8a      int32_t var_8 = 0x801ad4;
006abe92      void* var_c = nullptr;
006abe9a      OrderHdr::Pack(&var_8, &var_c, 0);
006abea5      void* eax_1 = operator new[](0x18);
006abeb7      var_c = eax_1;
006abebd      OrderHdr::Pack(&var_8, &var_c, 0x18);
006abeca      *(uint32_t*)var_c = 0x54;
006abed4      uint32_t* eax_3 = ((char*)var_c + 4);
006abed7      var_c = eax_3;
006abedb      *(uint32_t*)eax_3 = arg1;
006abee1      void* eax_5 = ((char*)var_c + 4);
006abee6      void* ecx_4 = (eax_5 & 0x80000003);
006abee6      bool cond:1 = ecx_4 == 0;
006abeec      var_c = eax_5;
006abeec      
006abef0      if (ecx_4 < 0)
006abef0      {
006abef3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006abef6          ecx_4 = ((char*)ecx_6 + 1);
006abef6          cond:1 = ecx_6 == 0xffffffff;
006abef0      }
006abef0      
006abef7      if (!(cond:1))
006abef7      {
006abefe          void* i_4 = (4 - ecx_4);
006abefe          
006abf00          if (4 != ecx_4)
006abf00          {
006abf0f              void* i;
006abf0f              
006abf0f              do
006abf0f              {
006abf02                  *(uint8_t*)eax_5 = 0;
006abf09                  eax_5 = ((char*)var_c + 1);
006abf0a                  i = i_4;
006abf0a                  i_4 -= 1;
006abf0b                  var_c = eax_5;
006abf0f              } while (i != 1);
006abf00          }
006abef7      }
006abef7      
006abf15      *(uint32_t*)eax_5 = arg2;
006abf1b      void* eax_8 = ((char*)var_c + 4);
006abf20      void* ecx_8 = (eax_8 & 0x80000003);
006abf20      bool cond:3 = ecx_8 == 0;
006abf26      var_c = eax_8;
006abf26      
006abf2a      if (ecx_8 < 0)
006abf2a      {
006abf2d          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006abf30          ecx_8 = ((char*)ecx_10 + 1);
006abf30          cond:3 = ecx_10 == 0xffffffff;
006abf2a      }
006abf2a      
006abf31      if (!(cond:3))
006abf31      {
006abf38          void* i_5 = (4 - ecx_8);
006abf38          
006abf3a          if (4 != ecx_8)
006abf3a          {
006abf4d              void* i_1;
006abf4d              
006abf4d              do
006abf4d              {
006abf40                  *(uint8_t*)eax_8 = 0;
006abf47                  eax_8 = ((char*)var_c + 1);
006abf48                  i_1 = i_5;
006abf48                  i_5 -= 1;
006abf49                  var_c = eax_8;
006abf4d              } while (i_1 != 1);
006abf3a          }
006abf31      }
006abf31      
006abf53      *(uint32_t*)eax_8 = arg3;
006abf59      void* eax_11 = ((char*)var_c + 4);
006abf5c      var_c = eax_11;
006abf60      void* eax_12 = (eax_11 & 0x80000003);
006abf60      bool cond:5 = eax_12 == 0;
006abf60      
006abf65      if (eax_12 < 0)
006abf65      {
006abf68          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006abf6b          eax_12 = ((char*)eax_14 + 1);
006abf6b          cond:5 = eax_14 == 0xffffffff;
006abf65      }
006abf65      
006abf6c      if (!(cond:5))
006abf6c      {
006abf73          void* i_3 = (4 - eax_12);
006abf73          
006abf75          if (4 != eax_12)
006abf75          {
006abf91              void* i_2;
006abf91              
006abf91              do
006abf91              {
006abf84                  *(uint8_t*)var_c = 0;
006abf8c                  i_2 = i_3;
006abf8c                  i_3 -= 1;
006abf8d                  var_c += 1;
006abf91              } while (i_2 != 1);
006abf75          }
006abf6c      }
006abf6c      
006abf9a      int32_t ebx;
006abf9a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006abf9a      
006abfa1      if (ebx == 0)
006abfa8          Proto_UI::UICounterFailedSend(eax);
006abfa8      
006abfb2      uint32_t eax_15;
006abfb2      eax_15 = ebx;
006abfb8      return eax_15;
006abe70  }

006abf79                                                                             8d a4 24 00 00 00 00                           ..$....
006abfb9                                                                             90 90 90 90 90 90 90                           .......

006abfc0  uint8_t CM_Inventory::Event_StackableSplitTo3D(uint32_t arg1, int32_t arg2)

006abfc0  {
006abfc6      uint32_t eax = Proto_UI::GetNextUICounter();
006abfda      int32_t var_8 = 0x801ad4;
006abfe2      void* var_c = nullptr;
006abfea      OrderHdr::Pack(&var_8, &var_c, 0);
006abff5      void* eax_1 = operator new[](0x14);
006ac007      var_c = eax_1;
006ac00d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006ac01a      *(uint32_t*)var_c = 0x56;
006ac024      uint32_t* eax_3 = ((char*)var_c + 4);
006ac027      var_c = eax_3;
006ac02b      *(uint32_t*)eax_3 = arg1;
006ac031      void* eax_5 = ((char*)var_c + 4);
006ac036      void* ecx_4 = (eax_5 & 0x80000003);
006ac036      bool cond:1 = ecx_4 == 0;
006ac03c      var_c = eax_5;
006ac03c      
006ac040      if (ecx_4 < 0)
006ac040      {
006ac043          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006ac046          ecx_4 = ((char*)ecx_6 + 1);
006ac046          cond:1 = ecx_6 == 0xffffffff;
006ac040      }
006ac040      
006ac047      if (!(cond:1))
006ac047      {
006ac04e          void* i_3 = (4 - ecx_4);
006ac04e          
006ac050          if (4 != ecx_4)
006ac050          {
006ac05f              void* i;
006ac05f              
006ac05f              do
006ac05f              {
006ac052                  *(uint8_t*)eax_5 = 0;
006ac059                  eax_5 = ((char*)var_c + 1);
006ac05a                  i = i_3;
006ac05a                  i_3 -= 1;
006ac05b                  var_c = eax_5;
006ac05f              } while (i != 1);
006ac050          }
006ac047      }
006ac047      
006ac065      *(uint32_t*)eax_5 = arg2;
006ac06b      void* eax_8 = ((char*)var_c + 4);
006ac06e      var_c = eax_8;
006ac072      void* eax_9 = (eax_8 & 0x80000003);
006ac072      bool cond:2 = eax_9 == 0;
006ac072      
006ac077      if (eax_9 < 0)
006ac077      {
006ac07a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006ac07d          eax_9 = ((char*)eax_11 + 1);
006ac07d          cond:2 = eax_11 == 0xffffffff;
006ac077      }
006ac077      
006ac07e      if (!(cond:2))
006ac07e      {
006ac085          void* i_2 = (4 - eax_9);
006ac085          
006ac087          if (4 != eax_9)
006ac087          {
006ac0a1              void* i_1;
006ac0a1              
006ac0a1              do
006ac0a1              {
006ac094                  *(uint8_t*)var_c = 0;
006ac09c                  i_1 = i_2;
006ac09c                  i_2 -= 1;
006ac09d                  var_c += 1;
006ac0a1              } while (i_1 != 1);
006ac087          }
006ac07e      }
006ac07e      
006ac0aa      int32_t ebx;
006ac0aa      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006ac0aa      
006ac0b1      if (ebx == 0)
006ac0b8          Proto_UI::UICounterFailedSend(eax);
006ac0b8      
006ac0c8      return ebx;
006abfc0  }

006ac0c9                             90 90 90 90 90 90 90                                                           .......

006ac0d0  uint8_t CM_Inventory::Event_StackableSplitToContainer(uint32_t arg1, uint32_t arg2, int32_t arg3, int32_t arg4)

006ac0d0  {
006ac0d3      int32_t ebx;
006ac0d3      int32_t var_10 = ebx;
006ac0d6      uint32_t eax = Proto_UI::GetNextUICounter();
006ac0ea      int32_t var_8 = 0x801ad4;
006ac0f2      void* var_c = nullptr;
006ac0fa      OrderHdr::Pack(&var_8, &var_c, 0);
006ac105      void* eax_1 = operator new[](0x1c);
006ac117      var_c = eax_1;
006ac11d      OrderHdr::Pack(&var_8, &var_c, 0x1c);
006ac12a      *(uint32_t*)var_c = 0x55;
006ac134      uint32_t* eax_3 = ((char*)var_c + 4);
006ac137      var_c = eax_3;
006ac13b      *(uint32_t*)eax_3 = arg1;
006ac141      void* eax_5 = ((char*)var_c + 4);
006ac146      void* ecx_4 = (eax_5 & 0x80000003);
006ac146      bool cond:1 = ecx_4 == 0;
006ac14c      var_c = eax_5;
006ac14c      
006ac150      if (ecx_4 < 0)
006ac150      {
006ac153          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006ac156          ecx_4 = ((char*)ecx_6 + 1);
006ac156          cond:1 = ecx_6 == 0xffffffff;
006ac150      }
006ac150      
006ac157      if (!(cond:1))
006ac157      {
006ac15e          void* i_5 = (4 - ecx_4);
006ac15e          
006ac160          if (4 != ecx_4)
006ac160          {
006ac16f              void* i;
006ac16f              
006ac16f              do
006ac16f              {
006ac162                  *(uint8_t*)eax_5 = 0;
006ac169                  eax_5 = ((char*)var_c + 1);
006ac16a                  i = i_5;
006ac16a                  i_5 -= 1;
006ac16b                  var_c = eax_5;
006ac16f              } while (i != 1);
006ac160          }
006ac157      }
006ac157      
006ac175      *(uint32_t*)eax_5 = arg2;
006ac17b      void* eax_8 = ((char*)var_c + 4);
006ac180      void* ecx_8 = (eax_8 & 0x80000003);
006ac180      bool cond:3 = ecx_8 == 0;
006ac186      var_c = eax_8;
006ac186      
006ac18a      if (ecx_8 < 0)
006ac18a      {
006ac18d          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006ac190          ecx_8 = ((char*)ecx_10 + 1);
006ac190          cond:3 = ecx_10 == 0xffffffff;
006ac18a      }
006ac18a      
006ac191      if (!(cond:3))
006ac191      {
006ac198          void* i_6 = (4 - ecx_8);
006ac198          
006ac19a          if (4 != ecx_8)
006ac19a          {
006ac1ad              void* i_1;
006ac1ad              
006ac1ad              do
006ac1ad              {
006ac1a0                  *(uint8_t*)eax_8 = 0;
006ac1a7                  eax_8 = ((char*)var_c + 1);
006ac1a8                  i_1 = i_6;
006ac1a8                  i_6 -= 1;
006ac1a9                  var_c = eax_8;
006ac1ad              } while (i_1 != 1);
006ac19a          }
006ac191      }
006ac191      
006ac1b3      *(uint32_t*)eax_8 = arg3;
006ac1b9      void* eax_11 = ((char*)var_c + 4);
006ac1be      void* ecx_13 = (eax_11 & 0x80000003);
006ac1be      bool cond:6 = ecx_13 == 0;
006ac1c4      var_c = eax_11;
006ac1c4      
006ac1c8      if (ecx_13 < 0)
006ac1c8      {
006ac1cb          void* ecx_15 = (((char*)ecx_13 - 1) | 0xfffffffc);
006ac1ce          ecx_13 = ((char*)ecx_15 + 1);
006ac1ce          cond:6 = ecx_15 == 0xffffffff;
006ac1c8      }
006ac1c8      
006ac1cf      if (!(cond:6))
006ac1cf      {
006ac1d6          void* i_7 = (4 - ecx_13);
006ac1d6          
006ac1d8          if (4 != ecx_13)
006ac1d8          {
006ac1ed              void* i_2;
006ac1ed              
006ac1ed              do
006ac1ed              {
006ac1e0                  *(uint8_t*)eax_11 = 0;
006ac1e7                  eax_11 = ((char*)var_c + 1);
006ac1e8                  i_2 = i_7;
006ac1e8                  i_7 -= 1;
006ac1e9                  var_c = eax_11;
006ac1ed              } while (i_2 != 1);
006ac1d8          }
006ac1cf      }
006ac1cf      
006ac1f3      *(uint32_t*)eax_11 = arg4;
006ac1f9      void* eax_14 = ((char*)var_c + 4);
006ac1fc      var_c = eax_14;
006ac200      void* eax_15 = (eax_14 & 0x80000003);
006ac200      bool cond:8 = eax_15 == 0;
006ac200      
006ac205      if (eax_15 < 0)
006ac205      {
006ac208          void* eax_17 = (((char*)eax_15 - 1) | 0xfffffffc);
006ac20b          eax_15 = ((char*)eax_17 + 1);
006ac20b          cond:8 = eax_17 == 0xffffffff;
006ac205      }
006ac205      
006ac20c      if (!(cond:8))
006ac20c      {
006ac213          void* i_4 = (4 - eax_15);
006ac213          
006ac215          if (4 != eax_15)
006ac215          {
006ac231              void* i_3;
006ac231              
006ac231              do
006ac231              {
006ac224                  *(uint8_t*)var_c = 0;
006ac22c                  i_3 = i_4;
006ac22c                  i_4 -= 1;
006ac22d                  var_c += 1;
006ac231              } while (i_3 != 1);
006ac215          }
006ac20c      }
006ac20c      
006ac23a      ebx = Proto_UI::SendToWeenie(eax_1, 0x1c);
006ac23a      
006ac241      if (ebx == 0)
006ac248          Proto_UI::UICounterFailedSend(eax);
006ac248      
006ac258      return ebx;
006ac0d0  }

006ac219                                                                             8d a4 24 00 00 00 00                           ..$....
006ac259                                                                             90 90 90 90 90 90 90                           .......

006ac260  uint8_t CM_Inventory::Event_StackableSplitToWield(uint32_t arg1, uint32_t arg2, int32_t arg3)

006ac260  {
006ac266      uint32_t eax = Proto_UI::GetNextUICounter();
006ac27a      int32_t var_8 = 0x801ad4;
006ac282      void* var_c = nullptr;
006ac28a      OrderHdr::Pack(&var_8, &var_c, 0);
006ac295      void* eax_1 = operator new[](0x18);
006ac2a7      var_c = eax_1;
006ac2ad      OrderHdr::Pack(&var_8, &var_c, 0x18);
006ac2ba      *(uint32_t*)var_c = 0x19b;
006ac2c4      uint32_t* eax_3 = ((char*)var_c + 4);
006ac2c7      var_c = eax_3;
006ac2cb      *(uint32_t*)eax_3 = arg1;
006ac2d1      void* eax_5 = ((char*)var_c + 4);
006ac2d6      void* ecx_4 = (eax_5 & 0x80000003);
006ac2d6      bool cond:1 = ecx_4 == 0;
006ac2dc      var_c = eax_5;
006ac2dc      
006ac2e0      if (ecx_4 < 0)
006ac2e0      {
006ac2e3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006ac2e6          ecx_4 = ((char*)ecx_6 + 1);
006ac2e6          cond:1 = ecx_6 == 0xffffffff;
006ac2e0      }
006ac2e0      
006ac2e7      if (!(cond:1))
006ac2e7      {
006ac2ee          void* i_4 = (4 - ecx_4);
006ac2ee          
006ac2f0          if (4 != ecx_4)
006ac2f0          {
006ac2ff              void* i;
006ac2ff              
006ac2ff              do
006ac2ff              {
006ac2f2                  *(uint8_t*)eax_5 = 0;
006ac2f9                  eax_5 = ((char*)var_c + 1);
006ac2fa                  i = i_4;
006ac2fa                  i_4 -= 1;
006ac2fb                  var_c = eax_5;
006ac2ff              } while (i != 1);
006ac2f0          }
006ac2e7      }
006ac2e7      
006ac305      *(uint32_t*)eax_5 = arg2;
006ac30b      void* eax_8 = ((char*)var_c + 4);
006ac310      void* ecx_8 = (eax_8 & 0x80000003);
006ac310      bool cond:3 = ecx_8 == 0;
006ac316      var_c = eax_8;
006ac316      
006ac31a      if (ecx_8 < 0)
006ac31a      {
006ac31d          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006ac320          ecx_8 = ((char*)ecx_10 + 1);
006ac320          cond:3 = ecx_10 == 0xffffffff;
006ac31a      }
006ac31a      
006ac321      if (!(cond:3))
006ac321      {
006ac328          void* i_5 = (4 - ecx_8);
006ac328          
006ac32a          if (4 != ecx_8)
006ac32a          {
006ac33d              void* i_1;
006ac33d              
006ac33d              do
006ac33d              {
006ac330                  *(uint8_t*)eax_8 = 0;
006ac337                  eax_8 = ((char*)var_c + 1);
006ac338                  i_1 = i_5;
006ac338                  i_5 -= 1;
006ac339                  var_c = eax_8;
006ac33d              } while (i_1 != 1);
006ac32a          }
006ac321      }
006ac321      
006ac343      *(uint32_t*)eax_8 = arg3;
006ac349      void* eax_11 = ((char*)var_c + 4);
006ac34c      var_c = eax_11;
006ac350      void* eax_12 = (eax_11 & 0x80000003);
006ac350      bool cond:5 = eax_12 == 0;
006ac350      
006ac355      if (eax_12 < 0)
006ac355      {
006ac358          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006ac35b          eax_12 = ((char*)eax_14 + 1);
006ac35b          cond:5 = eax_14 == 0xffffffff;
006ac355      }
006ac355      
006ac35c      if (!(cond:5))
006ac35c      {
006ac363          void* i_3 = (4 - eax_12);
006ac363          
006ac365          if (4 != eax_12)
006ac365          {
006ac381              void* i_2;
006ac381              
006ac381              do
006ac381              {
006ac374                  *(uint8_t*)var_c = 0;
006ac37c                  i_2 = i_3;
006ac37c                  i_3 -= 1;
006ac37d                  var_c += 1;
006ac381              } while (i_2 != 1);
006ac365          }
006ac35c      }
006ac35c      
006ac38a      int32_t ebx;
006ac38a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006ac38a      
006ac391      if (ebx == 0)
006ac398          Proto_UI::UICounterFailedSend(eax);
006ac398      
006ac3a2      uint32_t eax_15;
006ac3a2      eax_15 = ebx;
006ac3a8      return eax_15;
006ac260  }

006ac369                             8d a4 24 00 00 00 00                                                           ..$....
006ac3a9                             90 90 90 90 90 90 90                                                           .......

006ac3b0  uint8_t CM_Inventory::Event_UseEvent(uint32_t arg1)

006ac3b0  {
006ac3b6      uint32_t eax = Proto_UI::GetNextUICounter();
006ac3ca      int32_t var_8 = 0x801ad4;
006ac3d2      void* var_c = nullptr;
006ac3da      OrderHdr::Pack(&var_8, &var_c, 0);
006ac3e5      void* eax_1 = operator new[](0x10);
006ac3f7      var_c = eax_1;
006ac3fd      OrderHdr::Pack(&var_8, &var_c, 0x10);
006ac40a      *(uint32_t*)var_c = 0x36;
006ac414      uint32_t* eax_3 = ((char*)var_c + 4);
006ac417      var_c = eax_3;
006ac41b      *(uint32_t*)eax_3 = arg1;
006ac421      void* eax_5 = ((char*)var_c + 4);
006ac424      var_c = eax_5;
006ac428      void* eax_6 = (eax_5 & 0x80000003);
006ac428      bool cond:0 = eax_6 == 0;
006ac428      
006ac42d      if (eax_6 < 0)
006ac42d      {
006ac430          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006ac433          eax_6 = ((char*)eax_8 + 1);
006ac433          cond:0 = eax_8 == 0xffffffff;
006ac42d      }
006ac42d      
006ac434      if (!(cond:0))
006ac434      {
006ac43b          void* i_1 = (4 - eax_6);
006ac43b          
006ac43d          if (4 != eax_6)
006ac43d          {
006ac451              void* i;
006ac451              
006ac451              do
006ac451              {
006ac444                  *(uint8_t*)var_c = 0;
006ac44c                  i = i_1;
006ac44c                  i_1 -= 1;
006ac44d                  var_c += 1;
006ac451              } while (i != 1);
006ac43d          }
006ac434      }
006ac434      
006ac45a      int32_t ebx;
006ac45a      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006ac45a      
006ac461      if (ebx == 0)
006ac468          Proto_UI::UICounterFailedSend(eax);
006ac468      
006ac472      uint32_t eax_9;
006ac472      eax_9 = ebx;
006ac478      return eax_9;
006ac3b0  }

006ac479                                                                             90 90 90 90 90 90 90                           .......

006ac480  uint8_t CM_Inventory::Event_UseWithTargetEvent(uint32_t arg1, uint32_t arg2)

006ac480  {
006ac486      uint32_t eax = Proto_UI::GetNextUICounter();
006ac49a      int32_t var_8 = 0x801ad4;
006ac4a2      void* var_c = nullptr;
006ac4aa      OrderHdr::Pack(&var_8, &var_c, 0);
006ac4b5      void* eax_1 = operator new[](0x14);
006ac4c7      var_c = eax_1;
006ac4cd      OrderHdr::Pack(&var_8, &var_c, 0x14);
006ac4da      *(uint32_t*)var_c = 0x35;
006ac4e4      uint32_t* eax_3 = ((char*)var_c + 4);
006ac4e7      var_c = eax_3;
006ac4eb      *(uint32_t*)eax_3 = arg1;
006ac4f1      void* eax_5 = ((char*)var_c + 4);
006ac4f6      void* ecx_4 = (eax_5 & 0x80000003);
006ac4f6      bool cond:1 = ecx_4 == 0;
006ac4fc      var_c = eax_5;
006ac4fc      
006ac500      if (ecx_4 < 0)
006ac500      {
006ac503          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006ac506          ecx_4 = ((char*)ecx_6 + 1);
006ac506          cond:1 = ecx_6 == 0xffffffff;
006ac500      }
006ac500      
006ac507      if (!(cond:1))
006ac507      {
006ac50e          void* i_3 = (4 - ecx_4);
006ac50e          
006ac510          if (4 != ecx_4)
006ac510          {
006ac51f              void* i;
006ac51f              
006ac51f              do
006ac51f              {
006ac512                  *(uint8_t*)eax_5 = 0;
006ac519                  eax_5 = ((char*)var_c + 1);
006ac51a                  i = i_3;
006ac51a                  i_3 -= 1;
006ac51b                  var_c = eax_5;
006ac51f              } while (i != 1);
006ac510          }
006ac507      }
006ac507      
006ac525      *(uint32_t*)eax_5 = arg2;
006ac52b      void* eax_8 = ((char*)var_c + 4);
006ac52e      var_c = eax_8;
006ac532      void* eax_9 = (eax_8 & 0x80000003);
006ac532      bool cond:2 = eax_9 == 0;
006ac532      
006ac537      if (eax_9 < 0)
006ac537      {
006ac53a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006ac53d          eax_9 = ((char*)eax_11 + 1);
006ac53d          cond:2 = eax_11 == 0xffffffff;
006ac537      }
006ac537      
006ac53e      if (!(cond:2))
006ac53e      {
006ac545          void* i_2 = (4 - eax_9);
006ac545          
006ac547          if (4 != eax_9)
006ac547          {
006ac561              void* i_1;
006ac561              
006ac561              do
006ac561              {
006ac554                  *(uint8_t*)var_c = 0;
006ac55c                  i_1 = i_2;
006ac55c                  i_2 -= 1;
006ac55d                  var_c += 1;
006ac561              } while (i_1 != 1);
006ac547          }
006ac53e      }
006ac53e      
006ac56a      int32_t ebx;
006ac56a      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006ac56a      
006ac571      if (ebx == 0)
006ac578          Proto_UI::UICounterFailedSend(eax);
006ac578      
006ac588      return ebx;
006ac480  }

006ac589                             90 90 90 90 90 90 90                                                           .......

006ac590  uint8_t CM_Inventory::SendNotice_OpenSalvagePanel(uint32_t arg1)

006ac590  {
006ac59e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd222);
006ac59e      
006ac5a3      if (eax != 0)
006ac5a3      {
006ac5a6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ac5a6          
006ac5ab          while (i != 0)
006ac5ab          {
006ac5b3              int32_t* edi_1 = *(uint32_t*)i;
006ac5b7              i = i[1];
006ac5b7              
006ac5ba              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ac5cb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x13c)(arg1);
006ac5ab          }
006ac5a3      }
006ac5a3      
006ac5d8      eax = 1;
006ac5da      return 1;
006ac590  }

006ac5db                                                                                   90 90 90 90 90                             .....

006ac5e0  void __fastcall SalvageOperationsResultData::~SalvageOperationsResultData(class SalvageOperationsResultData* this)

006ac5e0  {
006ac5e4      this->m_salvageResults.vtable = 0x7e7f1c;
006ac5ef      PackableList<SalvageResult>::Flush(&this->m_salvageResults);
006ac5e4      this->m_salvageResults.vtable = 0x79285c;
006ac5fa      this->m_notSalvagable.vtable = 0x7a3e80;
006ac605      PackableList<unsigned long>::Flush(&this->m_notSalvagable);
006ac5fa      this->m_notSalvagable.vtable = 0x79285c;
006ac611      this->vtable = 0x79285c;
006ac5e0  }

006ac619                                                                             90 90 90 90 90 90 90                           .......

006ac620  uint32_t CM_Inventory::DispatchUI_Recv_SalvageOperationsResultData(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ac620  {
006ac631      if ((arg1 == 0 || arg1->m_pUISystem == 0))
006ac639          return 0;
006ac639      
006ac63a      void* eax_3 = arg2;
006ac646      bool cond:0 = *(uint32_t*)eax_3 == 0x2b4;
006ac64c      arg2 = ((char*)eax_3 + 4);
006ac64c      
006ac650      if (!(cond:0))
006ac659          return 0;
006ac659      
006ac65e      void var_38;
006ac65e      SalvageOperationsResultData::SalvageOperationsResultData(&var_38);
006ac679      class SalvageOperationsResultData* edx = SalvageOperationsResultData::UnPack(&var_38, &arg2, (((char*)eax_3 - arg2) + arg3));
006ac682      void* var_44_1 = &var_38;
006ac686      ClientUISystem::Handle_Inventory__Recv_SalvageOperationsResultData(arg1->m_pUISystem, edx);
006ac691      SalvageOperationsResultData::~SalvageOperationsResultData(&var_38);
006ac69d      return 0;
006ac620  }

006ac69e                                                                                            90 90                                ..

006ac6a0  enum NetBlobProcessedStatus CM_Physics::DispatchSB_DeleteObject(class SmartBox* arg1, class NetBlob* arg2)

006ac6a0  {
006ac6af      if ((arg2 != 0 && arg1 != 0))
006ac6af      {
006ac6b1          uint8_t* buf_ = arg2->buf_;
006ac6b1          
006ac6bf          if (*(uint32_t*)buf_ == 0xf747)
006ac6d7              return SmartBox::HandleDeleteObject(arg1, arg2, *(uint32_t*)(buf_ + 4), *(uint16_t*)(buf_ + 8));
006ac6af      }
006ac6af      
006ac6c7      return 3;
006ac6a0  }

006ac6d8                                                                          90 90 90 90 90 90 90 90                          ........

006ac6e0  enum NetBlobProcessedStatus CM_Physics::DispatchSB_PlayScriptType(class SmartBox* arg1, class NetBlob* arg2)

006ac6e0  {
006ac6ef      if ((arg2 != 0 && arg1 != 0))
006ac6ef      {
006ac6f1          uint8_t* buf_ = arg2->buf_;
006ac6f1          
006ac6ff          if (*(uint32_t*)buf_ == 0xf755)
006ac6ff          {
006ac711              float eax_4 = *(uint32_t*)(buf_ + 0xc);
006ac717              class NetBlob* var_18 = arg2;
006ac718              arg2 = eax_4;
006ac723              return SmartBox::HandlePlayScriptType(arg1, var_18, *(uint32_t*)(buf_ + 4), *(uint32_t*)(buf_ + 8), eax_4);
006ac6ff          }
006ac6ef      }
006ac6ef      
006ac707      return 3;
006ac6e0  }

006ac724              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006ac730  enum NetBlobProcessedStatus CM_Physics::DispatchSB_PlayerTeleport(class SmartBox* arg1, class NetBlob* arg2)

006ac730  {
006ac73e      if ((arg2 != 0 && arg1 != 0))
006ac73e      {
006ac740          uint8_t* buf_ = arg2->buf_;
006ac740          
006ac749          if (*(uint32_t*)buf_ == 0xf751)
006ac749          {
006ac757              SmartBox::HandlePlayerTeleport(arg1, arg2, *(uint16_t*)(buf_ + 4));
006ac75c              return 1;
006ac749          }
006ac73e      }
006ac73e      
006ac750      return 3;
006ac730  }

006ac75d                                                                                         90 90 90                               ...

006ac760  enum NetBlobProcessedStatus CM_Physics::DispatchSB_SoundEvent(class SmartBox* arg1, class NetBlob* arg2)

006ac760  {
006ac76f      if ((arg2 != 0 && arg1 != 0))
006ac76f      {
006ac771          uint8_t* buf_ = arg2->buf_;
006ac771          
006ac77f          if (*(uint32_t*)buf_ == 0xf750)
006ac77f          {
006ac791              float eax_4 = *(uint32_t*)(buf_ + 0xc);
006ac797              class NetBlob* var_18 = arg2;
006ac798              arg2 = eax_4;
006ac7a3              return SmartBox::HandleSoundEvent(arg1, var_18, *(uint32_t*)(buf_ + 4), *(uint32_t*)(buf_ + 8), eax_4);
006ac77f          }
006ac76f      }
006ac76f      
006ac787      return 3;
006ac760  }

006ac7a4              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006ac7b0  enum NetBlobProcessedStatus CM_Physics::DispatchSB_UpdateObject(class SmartBox* arg1, class NetBlob* arg2)

006ac7b0  {
006ac7cb      if ((arg2 == 0 || arg1 == 0))
006ac7d9          return 3;
006ac7d9      
006ac7da      uint8_t* buf_ = arg2->buf_;
006ac7de      uint32_t bufSize_ = arg2->bufSize_;
006ac7e1      uint8_t* buf = buf_;
006ac7ed      bool cond:0 = *(uint32_t*)buf_ == 0xf7db;
006ac7f3      buf = &buf_[4];
006ac7f3      
006ac7f7      if (!(cond:0))
006ac807          return 3;
006ac807      
006ac809      uint32_t ebp = *(uint32_t*)(buf_ + 4);
006ac812      buf = &buf_[8];
006ac816      void var_1b4;
006ac816      ObjDesc::ObjDesc(&var_1b4);
006ac82f      ObjDesc::UnPack(&var_1b4, &buf, ((bufSize_ - buf) + buf_));
006ac83b      void var_d8;
006ac83b      PhysicsDesc::PhysicsDesc(&var_d8);
006ac857      PhysicsDesc::UnPack(&var_d8, &buf, ((bufSize_ - buf) + buf_));
006ac860      void var_188;
006ac860      PublicWeenieDesc::PublicWeenieDesc(&var_188);
006ac875      PublicWeenieDesc::UnPack(&var_188, &buf, ((bufSize_ - buf) + buf_));
006ac895      int32_t result;
006ac895      int80_t st0;
006ac895      st0 = SmartBox::HandleUpdateObject(arg1, arg2, ebp, &var_1b4, &var_d8, &var_188);
006ac8a0      PublicWeenieDesc::~PublicWeenieDesc(&var_188);
006ac8ac      PhysicsDesc::~PhysicsDesc(&var_d8);
006ac8b5      ObjDesc::~ObjDesc(&var_1b4);
006ac8c6      return result;
006ac7b0  }

006ac8c7                       90 90 90 90 90 90 90 90 90                                                         .........

006ac8d0  enum NetBlobProcessedStatus CM_Physics::DispatchSB_CreateObject(class SmartBox* arg1, class NetBlob* arg2)

006ac8d0  {
006ac8eb      if ((arg2 == 0 || arg1 == 0))
006ac8f9          return 3;
006ac8f9      
006ac8fa      uint8_t* buf_ = arg2->buf_;
006ac8fe      uint32_t bufSize_ = arg2->bufSize_;
006ac901      uint8_t* buf = buf_;
006ac90d      bool cond:0 = *(uint32_t*)buf_ == 0xf745;
006ac913      buf = &buf_[4];
006ac913      
006ac917      if (!(cond:0))
006ac927          return 3;
006ac927      
006ac929      uint32_t ebp = *(uint32_t*)(buf_ + 4);
006ac932      buf = &buf_[8];
006ac936      void var_1b4;
006ac936      ObjDesc::ObjDesc(&var_1b4);
006ac94f      ObjDesc::UnPack(&var_1b4, &buf, ((bufSize_ - buf) + buf_));
006ac95b      void var_d8;
006ac95b      PhysicsDesc::PhysicsDesc(&var_d8);
006ac977      PhysicsDesc::UnPack(&var_d8, &buf, ((bufSize_ - buf) + buf_));
006ac980      void var_188;
006ac980      PublicWeenieDesc::PublicWeenieDesc(&var_188);
006ac995      PublicWeenieDesc::UnPack(&var_188, &buf, ((bufSize_ - buf) + buf_));
006ac9b7      int32_t result;
006ac9b7      int80_t st0;
006ac9b7      st0 = SmartBox::HandleCreateObject(arg1, arg2, ebp, &var_1b4, &var_d8, &var_188, 0);
006ac9c2      PublicWeenieDesc::~PublicWeenieDesc(&var_188);
006ac9ce      PhysicsDesc::~PhysicsDesc(&var_d8);
006ac9d7      ObjDesc::~ObjDesc(&var_1b4);
006ac9e8      return result;
006ac8d0  }

006ac9e9                             90 90 90 90 90 90 90                                                           .......

006ac9f0  enum NetBlobProcessedStatus CM_Physics::DispatchSB_CreatePlayer(class SmartBox* arg1, class NetBlob* arg2)

006ac9f0  {
006ac9fe      if ((arg2 != 0 && arg1 != 0))
006ac9fe      {
006aca00          uint8_t* buf_ = arg2->buf_;
006aca00          
006aca09          if (*(uint32_t*)buf_ == 0xf746)
006aca1b              return SmartBox::HandleCreatePlayer(arg1, arg2, *(uint32_t*)(buf_ + 4));
006ac9fe      }
006ac9fe      
006aca10      return 3;
006ac9f0  }

006aca1c                                                                                      90 90 90 90                              ....

006aca20  enum NetBlobProcessedStatus CM_Physics::DispatchSB_ObjDescEvent(class SmartBox* arg1, class NetBlob* arg2)

006aca20  {
006aca24      class NetBlob* ebx = arg2;
006aca24      
006aca32      if ((ebx == 0 || arg1 == 0))
006aca3d          return 3;
006aca3d      
006aca3e      uint8_t* buf_ = ebx->buf_;
006aca42      uint32_t bufSize_ = ebx->bufSize_;
006aca45      arg2 = buf_;
006aca51      bool cond:0 = *(uint32_t*)buf_ == 0xf625;
006aca57      arg2 = &buf_[4];
006aca57      
006aca5b      if (!(cond:0))
006aca68          return 3;
006aca68      
006aca6a      uint32_t ebp = *(uint32_t*)(buf_ + 4);
006aca73      arg2 = &buf_[8];
006aca77      void var_2c;
006aca77      ObjDesc::ObjDesc(&var_2c);
006aca90      ObjDesc::UnPack(&var_2c, &arg2, ((bufSize_ - arg2) + buf_));
006aca99      int32_t var_34;
006aca99      PhysicsTimestampPack::PhysicsTimestampPack(&var_34);
006acaae      PhysicsTimestampPack::UnPack(&var_34, &arg2, ((bufSize_ - arg2) + buf_));
006acac3      enum NetBlobProcessedStatus result = SmartBox::HandleObjDescEvent(arg1, ebx, ebp, &var_2c, &var_34);
006acace      var_34 = 0x79285c;
006acad6      ObjDesc::~ObjDesc(&var_2c);
006acae4      return result;
006aca20  }

006acae5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

006acaf0  enum NetBlobProcessedStatus CM_Physics::DispatchSB_ParentEvent(class SmartBox* arg1, class NetBlob* arg2)

006acaf0  {
006acaf4      class NetBlob* edi = arg2;
006acaf4      
006acb02      if ((edi == 0 || arg1 == 0))
006acb0d          return 3;
006acb0d      
006acb0e      uint8_t* buf_ = edi->buf_;
006acb11      arg2 = buf_;
006acb1e      bool cond:0 = *(uint32_t*)buf_ == 0xf749;
006acb25      uint32_t bufSize_ = edi->bufSize_;
006acb28      arg2 = &buf_[4];
006acb28      
006acb2c      if (!(cond:0))
006acb38          return 3;
006acb38      
006acb3d      uint32_t ebx = *(uint32_t*)(buf_ + 4);
006acb40      arg2 = &buf_[8];
006acb48      uint32_t ebp = *(uint32_t*)(buf_ + 8);
006acb4b      arg2 = &buf_[0xc];
006acb4f      uint32_t ecx_1 = *(uint32_t*)(buf_ + 0xc);
006acb54      arg2 = &buf_[0x10];
006acb58      uint32_t edx = *(uint32_t*)(buf_ + 0x10);
006acb69      arg2 = &buf_[0x14];
006acb6d      void var_8;
006acb6d      PhysicsTimestampPack::PhysicsTimestampPack(&var_8);
006acb88      PhysicsTimestampPack::UnPack(&var_8, &arg2, ((bufSize_ - arg2) + buf_));
006acbaf      return SmartBox::HandleParentEvent(arg1, edi, ebx, ebp, ecx_1, edx, &var_8);
006acaf0  }


006acbb0  enum NetBlobProcessedStatus CM_Physics::DispatchSB_PickupEvent(class SmartBox* arg1, class NetBlob* arg2)

006acbb0  {
006acbb4      class NetBlob* edi = arg2;
006acbb4      
006acbc2      if ((edi == 0 || arg1 == 0))
006acbcd          return 3;
006acbcd      
006acbce      uint8_t* buf_ = edi->buf_;
006acbd1      arg2 = buf_;
006acbdd      bool cond:0 = *(uint32_t*)buf_ == 0xf74a;
006acbe4      uint32_t bufSize_ = edi->bufSize_;
006acbe7      arg2 = &buf_[4];
006acbe7      
006acbeb      if (!(cond:0))
006acbf8          return 3;
006acbf8      
006acbfa      uint32_t ebx = *(uint32_t*)(buf_ + 4);
006acc03      arg2 = &buf_[8];
006acc07      void var_8;
006acc07      PhysicsTimestampPack::PhysicsTimestampPack(&var_8);
006acc1c      PhysicsTimestampPack::UnPack(&var_8, &arg2, ((bufSize_ - arg2) + buf_));
006acc38      return SmartBox::HandlePickupEvent(arg1, edi, ebx, &var_8);
006acbb0  }

006acc39                                                                             90 90 90 90 90 90 90                           .......

006acc40  enum NetBlobProcessedStatus CM_Physics::DispatchSB_PlayScriptID(class SmartBox* arg1, class NetBlob* arg2)

006acc40  {
006acc4f      if ((arg2 != 0 && arg1 != 0))
006acc4f      {
006acc51          uint8_t* buf_ = arg2->buf_;
006acc51          
006acc5f          if (*(uint32_t*)buf_ == 0xf754)
006acc76              return SmartBox::HandlePlayScriptID(arg1, arg2, *(uint32_t*)(buf_ + 4), *(uint32_t*)(buf_ + 8));
006acc4f      }
006acc4f      
006acc67      return 3;
006acc40  }

006acc77                                                                       90 90 90 90 90 90 90 90 90                         .........

006acc80  enum NetBlobProcessedStatus CM_Physics::DispatchSB_SetState(class SmartBox* arg1, class NetBlob* arg2)

006acc80  {
006acc84      class NetBlob* edi = arg2;
006acc84      
006acc92      if ((edi == 0 || arg1 == 0))
006acc9d          return 3;
006acc9d      
006acc9e      uint8_t* buf_ = edi->buf_;
006acca1      arg2 = buf_;
006accae      bool cond:0 = *(uint32_t*)buf_ == 0xf74b;
006accb5      uint32_t bufSize_ = edi->bufSize_;
006accb8      arg2 = &buf_[4];
006accb8      
006accbc      if (!(cond:0))
006accc8          return 3;
006accc8      
006accca      uint32_t ebx = *(uint32_t*)(buf_ + 4);
006acccf      arg2 = &buf_[8];
006accd4      uint32_t ebp = *(uint32_t*)(buf_ + 8);
006accdd      arg2 = &buf_[0xc];
006acce1      void var_8;
006acce1      PhysicsTimestampPack::PhysicsTimestampPack(&var_8);
006accfc      PhysicsTimestampPack::UnPack(&var_8, &arg2, ((bufSize_ - arg2) + buf_));
006acd19      return SmartBox::HandleSetState(arg1, edi, ebx, ebp, &var_8);
006acc80  }

006acd1a                                                                                90 90 90 90 90 90                            ......

006acd20  enum NetBlobProcessedStatus CM_Physics::DispatchSB_VectorUpdate(class SmartBox* arg1, class NetBlob* arg2)

006acd20  {
006acd24      class NetBlob* ebx = arg2;
006acd24      
006acd32      if ((ebx == 0 || arg1 == 0))
006acd3d          return 3;
006acd3d      
006acd3e      uint8_t* buf_ = ebx->buf_;
006acd42      uint32_t bufSize_ = ebx->bufSize_;
006acd45      arg2 = buf_;
006acd51      bool cond:0 = *(uint32_t*)buf_ == 0xf74e;
006acd57      arg2 = &buf_[4];
006acd57      
006acd5b      if (!(cond:0))
006acd68          return 3;
006acd68      
006acd6a      uint32_t ebp = *(uint32_t*)(buf_ + 4);
006acd7f      arg2 = &buf_[8];
006acd83      void var_c;
006acd83      AC1Legacy::Vector3::UnPack(&var_c, &arg2, ((bufSize_ - &buf_[8]) + buf_));
006acd9c      void var_18;
006acd9c      AC1Legacy::Vector3::UnPack(&var_18, &arg2, ((bufSize_ - arg2) + buf_));
006acda5      void var_20;
006acda5      PhysicsTimestampPack::PhysicsTimestampPack(&var_20);
006acdba      PhysicsTimestampPack::UnPack(&var_20, &arg2, ((bufSize_ - arg2) + buf_));
006acde0      return SmartBox::HandleVectorUpdate(arg1, ebx, ebp, &var_c, &var_18, &var_20);
006acd20  }

006acde1     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006acdf0  uint32_t CM_Trade::DispatchUI_Recv_AcceptTrade(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006acdf0  {
006acdf6      if (arg1 != 0)
006acdf6      {
006acdf8          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006acdf8          
006ace09          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x202))
006ace12              ClientTradeSystem::Handle_Trade__Recv_AcceptTrade(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4));
006acdf6      }
006acdf6      
006ace0d      return 0;
006acdf0  }

006ace18                                                                          90 90 90 90 90 90 90 90                          ........

006ace20  uint32_t CM_Trade::DispatchUI_Recv_AddToTrade(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ace20  {
006ace26      if (arg1 != 0)
006ace26      {
006ace28          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006ace28          
006ace3e          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x200))
006ace52              ClientTradeSystem::Handle_Trade__Recv_AddToTrade(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8), *(uint32_t*)((char*)arg2 + 0xc));
006ace26      }
006ace26      
006ace42      return 0;
006ace20  }

006ace59                                                                             90 90 90 90 90 90 90                           .......

006ace60  uint32_t CM_Trade::DispatchUI_Recv_ClearTradeAcceptance(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ace60  {
006ace66      if (arg1 != 0)
006ace66      {
006ace68          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006ace68          
006ace79          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x208))
006ace7e              /* tailcall */
006ace7e              return ClientTradeSystem::Handle_Trade__Recv_ClearTradeAcceptance(m_pTradeSystem);
006ace66      }
006ace66      
006ace7d      return 0;
006ace60  }

006ace83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006ace90  uint32_t CM_Trade::DispatchUI_Recv_CloseTrade(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ace90  {
006ace96      if (arg1 != 0)
006ace96      {
006ace98          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006ace98          
006acea9          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x1ff))
006aceb2              ClientTradeSystem::Handle_Trade__Recv_CloseTrade(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4));
006ace96      }
006ace96      
006acead      return 0;
006ace90  }

006aceb8                                                                          90 90 90 90 90 90 90 90                          ........

006acec0  uint32_t CM_Trade::DispatchUI_Recv_DeclineTrade(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006acec0  {
006acec6      if (arg1 != 0)
006acec6      {
006acec8          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006acec8          
006aced9          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x203))
006acee2              ClientTradeSystem::Handle_Trade__Recv_DeclineTrade(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4));
006acec6      }
006acec6      
006acedd      return 0;
006acec0  }

006acee8                          90 90 90 90 90 90 90 90                                                          ........

006acef0  uint32_t CM_Trade::DispatchUI_Recv_OpenTrade(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006acef0  {
006acef6      if (arg1 != 0)
006acef6      {
006acef8          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006acef8          
006acf09          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x1fe))
006acf12              ClientTradeSystem::Handle_Trade__Recv_OpenTrade(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4));
006acef6      }
006acef6      
006acf0d      return 0;
006acef0  }

006acf18                                                                          90 90 90 90 90 90 90 90                          ........

006acf20  uint32_t CM_Trade::DispatchUI_Recv_RegisterTrade(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006acf20  {
006acf29      if (arg1 != 0)
006acf29      {
006acf2b          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006acf2b          
006acf41          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x1fd))
006acf41          {
006acf50              int32_t edi = *(uint32_t*)((char*)arg2 + 0xc);
006acf56              int32_t eax_4 = *(uint32_t*)((char*)arg2 + 0x10);
006acf59              int32_t var_14 = eax_4;
006acf5a              int32_t var_4 = eax_4;
006acf63              int32_t var_8 = edi;
006acf67              ClientTradeSystem::Handle_Trade__Recv_RegisterTrade(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8), edi);
006acf41          }
006acf29      }
006acf29      
006acf48      return 0;
006acf20  }

006acf72                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006acf80  uint32_t CM_Trade::DispatchUI_Recv_RemoveFromTrade(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006acf80  {
006acf86      if (arg1 != 0)
006acf86      {
006acf88          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006acf88          
006acf9e          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x201))
006acfaa              ClientTradeSystem::Handle_Trade__Recv_RemoveFromTrade(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006acf86      }
006acf86      
006acfa2      return 0;
006acf80  }


006acfb0  uint32_t CM_Trade::DispatchUI_Recv_ResetTrade(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006acfb0  {
006acfb6      if (arg1 != 0)
006acfb6      {
006acfb8          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006acfb8          
006acfc9          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x205))
006acfd2              ClientTradeSystem::Handle_Trade__Recv_ResetTrade(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4));
006acfb6      }
006acfb6      
006acfcd      return 0;
006acfb0  }

006acfd8                                                                          90 90 90 90 90 90 90 90                          ........

006acfe0  uint32_t CM_Trade::DispatchUI_Recv_TradeFailure(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006acfe0  {
006acfe6      if (arg1 != 0)
006acfe6      {
006acfe8          class ClientTradeSystem* m_pTradeSystem = arg1->m_pTradeSystem;
006acfe8          
006acffe          if ((m_pTradeSystem != 0 && *(uint32_t*)arg2 == 0x207))
006ad00a              ClientTradeSystem::Handle_Trade__Recv_TradeFailure(m_pTradeSystem, *(uint32_t*)((char*)arg2 + 4), *(uint32_t*)((char*)arg2 + 8));
006acfe6      }
006acfe6      
006ad002      return 0;
006acfe0  }


006ad010  uint8_t CM_Trade::Event_AcceptTrade(class Trade const* arg1)

006ad010  {
006ad016      uint32_t eax = Proto_UI::GetNextUICounter();
006ad029      struct Trade::VTable* vtable = arg1->vtable;
006ad02e      int32_t var_8 = 0x801ad4;
006ad036      void* var_c = nullptr;
006ad03e      int32_t eax_1 = vtable->Pack(&var_c, 0);
006ad04e      OrderHdr::Pack(&var_8, &var_c, 0);
006ad058      void* eax_2 = operator new[]((eax_1 + 0xc));
006ad060      var_c = eax_2;
006ad070      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006ad079      *(uint32_t*)var_c = 0x1fa;
006ad083      struct Trade::VTable* vtable_1 = arg1->vtable;
006ad08c      void* ecx_6 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006ad08e      var_c += 4;
006ad09a      vtable_1->Pack(&var_c, ecx_6);
006ad0a4      void* ebx;
006ad0a4      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006ad0a4      
006ad0ab      if (ebx == 0)
006ad0b2          Proto_UI::UICounterFailedSend(eax);
006ad0b2      
006ad0c2      return ebx;
006ad010  }

006ad0c3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006ad0d0  uint8_t CM_Trade::Event_AddToTrade(uint32_t arg1, uint32_t arg2)

006ad0d0  {
006ad0d6      uint32_t eax = Proto_UI::GetNextUICounter();
006ad0ea      int32_t var_8 = 0x801ad4;
006ad0f2      void* var_c = nullptr;
006ad0fa      OrderHdr::Pack(&var_8, &var_c, 0);
006ad105      void* eax_1 = operator new[](0x14);
006ad117      var_c = eax_1;
006ad11d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006ad12a      *(uint32_t*)var_c = 0x1f8;
006ad134      uint32_t* eax_3 = ((char*)var_c + 4);
006ad137      var_c = eax_3;
006ad13b      *(uint32_t*)eax_3 = arg1;
006ad141      void* eax_5 = ((char*)var_c + 4);
006ad146      void* ecx_4 = (eax_5 & 0x80000003);
006ad146      bool cond:1 = ecx_4 == 0;
006ad14c      var_c = eax_5;
006ad14c      
006ad150      if (ecx_4 < 0)
006ad150      {
006ad153          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006ad156          ecx_4 = ((char*)ecx_6 + 1);
006ad156          cond:1 = ecx_6 == 0xffffffff;
006ad150      }
006ad150      
006ad157      if (!(cond:1))
006ad157      {
006ad15e          void* i_3 = (4 - ecx_4);
006ad15e          
006ad160          if (4 != ecx_4)
006ad160          {
006ad16f              void* i;
006ad16f              
006ad16f              do
006ad16f              {
006ad162                  *(uint8_t*)eax_5 = 0;
006ad169                  eax_5 = ((char*)var_c + 1);
006ad16a                  i = i_3;
006ad16a                  i_3 -= 1;
006ad16b                  var_c = eax_5;
006ad16f              } while (i != 1);
006ad160          }
006ad157      }
006ad157      
006ad175      *(uint32_t*)eax_5 = arg2;
006ad17b      void* eax_8 = ((char*)var_c + 4);
006ad17e      var_c = eax_8;
006ad182      void* eax_9 = (eax_8 & 0x80000003);
006ad182      bool cond:2 = eax_9 == 0;
006ad182      
006ad187      if (eax_9 < 0)
006ad187      {
006ad18a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006ad18d          eax_9 = ((char*)eax_11 + 1);
006ad18d          cond:2 = eax_11 == 0xffffffff;
006ad187      }
006ad187      
006ad18e      if (!(cond:2))
006ad18e      {
006ad195          void* i_2 = (4 - eax_9);
006ad195          
006ad197          if (4 != eax_9)
006ad197          {
006ad1b1              void* i_1;
006ad1b1              
006ad1b1              do
006ad1b1              {
006ad1a4                  *(uint8_t*)var_c = 0;
006ad1ac                  i_1 = i_2;
006ad1ac                  i_2 -= 1;
006ad1ad                  var_c += 1;
006ad1b1              } while (i_1 != 1);
006ad197          }
006ad18e      }
006ad18e      
006ad1ba      int32_t ebx;
006ad1ba      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006ad1ba      
006ad1c1      if (ebx == 0)
006ad1c8          Proto_UI::UICounterFailedSend(eax);
006ad1c8      
006ad1d8      return ebx;
006ad0d0  }

006ad1d9                                                                             90 90 90 90 90 90 90                           .......

006ad1e0  uint8_t CM_Trade::Event_CloseTradeNegotiations()

006ad1e0  {
006ad1e6      uint32_t eax = Proto_UI::GetNextUICounter();
006ad1fa      int32_t var_8 = 0x801ad4;
006ad202      void* var_c = nullptr;
006ad20a      OrderHdr::Pack(&var_8, &var_c, 0);
006ad215      void* eax_1 = operator new[](0xc);
006ad227      var_c = eax_1;
006ad22d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006ad236      *(uint32_t*)var_c = 0x1f7;
006ad245      var_c += 4;
006ad24e      int32_t ebx;
006ad24e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006ad24e      
006ad255      if (ebx == 0)
006ad25c          Proto_UI::UICounterFailedSend(eax);
006ad25c      
006ad266      uint32_t eax_4;
006ad266      eax_4 = ebx;
006ad26c      return eax_4;
006ad1e0  }

006ad26d                                         90 90 90                                                               ...

006ad270  uint8_t CM_Trade::Event_DeclineTrade()

006ad270  {
006ad276      uint32_t eax = Proto_UI::GetNextUICounter();
006ad28a      int32_t var_8 = 0x801ad4;
006ad292      void* var_c = nullptr;
006ad29a      OrderHdr::Pack(&var_8, &var_c, 0);
006ad2a5      void* eax_1 = operator new[](0xc);
006ad2b7      var_c = eax_1;
006ad2bd      OrderHdr::Pack(&var_8, &var_c, 0xc);
006ad2c6      *(uint32_t*)var_c = 0x1fb;
006ad2d5      var_c += 4;
006ad2de      int32_t ebx;
006ad2de      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006ad2de      
006ad2e5      if (ebx == 0)
006ad2ec          Proto_UI::UICounterFailedSend(eax);
006ad2ec      
006ad2f6      uint32_t eax_4;
006ad2f6      eax_4 = ebx;
006ad2fc      return eax_4;
006ad270  }

006ad2fd                                                                                         90 90 90                               ...

006ad300  uint8_t CM_Trade::Event_OpenTradeNegotiations(uint32_t arg1)

006ad300  {
006ad306      uint32_t eax = Proto_UI::GetNextUICounter();
006ad31a      int32_t var_8 = 0x801ad4;
006ad322      void* var_c = nullptr;
006ad32a      OrderHdr::Pack(&var_8, &var_c, 0);
006ad335      void* eax_1 = operator new[](0x10);
006ad347      var_c = eax_1;
006ad34d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006ad35a      *(uint32_t*)var_c = 0x1f6;
006ad364      uint32_t* eax_3 = ((char*)var_c + 4);
006ad367      var_c = eax_3;
006ad36b      *(uint32_t*)eax_3 = arg1;
006ad371      void* eax_5 = ((char*)var_c + 4);
006ad374      var_c = eax_5;
006ad378      void* eax_6 = (eax_5 & 0x80000003);
006ad378      bool cond:0 = eax_6 == 0;
006ad378      
006ad37d      if (eax_6 < 0)
006ad37d      {
006ad380          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006ad383          eax_6 = ((char*)eax_8 + 1);
006ad383          cond:0 = eax_8 == 0xffffffff;
006ad37d      }
006ad37d      
006ad384      if (!(cond:0))
006ad384      {
006ad38b          void* i_1 = (4 - eax_6);
006ad38b          
006ad38d          if (4 != eax_6)
006ad38d          {
006ad3a1              void* i;
006ad3a1              
006ad3a1              do
006ad3a1              {
006ad394                  *(uint8_t*)var_c = 0;
006ad39c                  i = i_1;
006ad39c                  i_1 -= 1;
006ad39d                  var_c += 1;
006ad3a1              } while (i != 1);
006ad38d          }
006ad384      }
006ad384      
006ad3aa      int32_t ebx;
006ad3aa      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006ad3aa      
006ad3b1      if (ebx == 0)
006ad3b8          Proto_UI::UICounterFailedSend(eax);
006ad3b8      
006ad3c2      uint32_t eax_9;
006ad3c2      eax_9 = ebx;
006ad3c8      return eax_9;
006ad300  }

006ad3c9                             90 90 90 90 90 90 90                                                           .......

006ad3d0  uint8_t CM_Trade::Event_ResetTrade()

006ad3d0  {
006ad3d6      uint32_t eax = Proto_UI::GetNextUICounter();
006ad3ea      int32_t var_8 = 0x801ad4;
006ad3f2      void* var_c = nullptr;
006ad3fa      OrderHdr::Pack(&var_8, &var_c, 0);
006ad405      void* eax_1 = operator new[](0xc);
006ad417      var_c = eax_1;
006ad41d      OrderHdr::Pack(&var_8, &var_c, 0xc);
006ad426      *(uint32_t*)var_c = 0x204;
006ad435      var_c += 4;
006ad43e      int32_t ebx;
006ad43e      ebx = Proto_UI::SendToWeenie(eax_1, 0xc);
006ad43e      
006ad445      if (ebx == 0)
006ad44c          Proto_UI::UICounterFailedSend(eax);
006ad44c      
006ad456      uint32_t eax_4;
006ad456      eax_4 = ebx;
006ad45c      return eax_4;
006ad3d0  }

006ad45d                                                                                         90 90 90                               ...

006ad460  uint8_t CM_Trade::SendNotice_AcceptTrade(uint32_t arg1)

006ad460  {
006ad46e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd235);
006ad46e      
006ad473      if (eax != 0)
006ad473      {
006ad476          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad476          
006ad47b          while (i != 0)
006ad47b          {
006ad483              int32_t* edi_1 = *(uint32_t*)i;
006ad487              i = i[1];
006ad487              
006ad48a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ad49b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1e4)(arg1);
006ad47b          }
006ad473      }
006ad473      
006ad4a8      eax = 1;
006ad4aa      return 1;
006ad460  }

006ad4ab                                   90 90 90 90 90                                                             .....

006ad4b0  uint8_t CM_Trade::SendNotice_AddItemToTrade(uint32_t arg1, uint32_t arg2, uint32_t arg3)

006ad4b0  {
006ad4be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd233);
006ad4be      
006ad4c3      if (eax != 0)
006ad4c3      {
006ad4c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad4c6          
006ad4cb          while (i != 0)
006ad4cb          {
006ad4d8              int32_t* esi_1 = *(uint32_t*)i;
006ad4dc              i = i[1];
006ad4dc              
006ad4df              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006ad4f6                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x1e8)(arg1, arg2, arg3);
006ad4cb          }
006ad4c3      }
006ad4c3      
006ad504      eax = 1;
006ad506      return 1;
006ad4b0  }

006ad507                       90 90 90 90 90 90 90 90 90                                                         .........

006ad510  uint8_t CM_Trade::SendNotice_ClearTradeAcceptance()

006ad510  {
006ad51e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd239);
006ad51e      
006ad523      if (eax != 0)
006ad523      {
006ad526          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad526          
006ad52b          if (i != 0)
006ad52b          {
006ad52d              int32_t edi;
006ad52d              int32_t var_8_1 = edi;
006ad52d              
006ad54f              do
006ad54f              {
006ad530                  int32_t* edi_2 = *(uint32_t*)i;
006ad534                  i = i[1];
006ad534                  
006ad537                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006ad547                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x1ec)();
006ad54f              } while (i != 0);
006ad52b          }
006ad523      }
006ad523      
006ad553      eax = 1;
006ad555      return 1;
006ad510  }

006ad556                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006ad560  uint8_t CM_Trade::SendNotice_CloseTrade(uint32_t arg1)

006ad560  {
006ad56e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd232);
006ad56e      
006ad573      if (eax != 0)
006ad573      {
006ad576          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad576          
006ad57b          while (i != 0)
006ad57b          {
006ad583              int32_t* edi_1 = *(uint32_t*)i;
006ad587              i = i[1];
006ad587              
006ad58a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ad59b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1f0)(arg1);
006ad57b          }
006ad573      }
006ad573      
006ad5a8      eax = 1;
006ad5aa      return 1;
006ad560  }

006ad5ab                                   90 90 90 90 90                                                             .....

006ad5b0  uint8_t CM_Trade::SendNotice_DeclineTrade(uint32_t arg1)

006ad5b0  {
006ad5be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd236);
006ad5be      
006ad5c3      if (eax != 0)
006ad5c3      {
006ad5c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad5c6          
006ad5cb          while (i != 0)
006ad5cb          {
006ad5d3              int32_t* edi_1 = *(uint32_t*)i;
006ad5d7              i = i[1];
006ad5d7              
006ad5da              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ad5eb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1f4)(arg1);
006ad5cb          }
006ad5c3      }
006ad5c3      
006ad5f8      eax = 1;
006ad5fa      return 1;
006ad5b0  }

006ad5fb                                                                                   90 90 90 90 90                             .....

006ad600  uint8_t CM_Trade::SendNotice_OpenTrade(uint32_t arg1)

006ad600  {
006ad60e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd231);
006ad60e      
006ad613      if (eax != 0)
006ad613      {
006ad616          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad616          
006ad61b          while (i != 0)
006ad61b          {
006ad623              int32_t* edi_1 = *(uint32_t*)i;
006ad627              i = i[1];
006ad627              
006ad62a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ad63b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1f8)(arg1);
006ad61b          }
006ad613      }
006ad613      
006ad648      eax = 1;
006ad64a      return 1;
006ad600  }

006ad64b                                   90 90 90 90 90                                                             .....

006ad650  uint8_t CM_Trade::SendNotice_RegisterTrade(uint32_t arg1, uint32_t arg2, double arg3)

006ad650  {
006ad65e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(gmKeyboardUI::ListenToElementMessage);
006ad65e      
006ad663      if (eax != 0)
006ad663      {
006ad666          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad666          
006ad66b          while (i != 0)
006ad66b          {
006ad673              int32_t* esi_1 = *(uint32_t*)i;
006ad677              i = i[1];
006ad677              
006ad67a              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006ad69a                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x1fc)(arg1, arg2, arg3, *(uint32_t*)((char*)arg3)[4]);
006ad66b          }
006ad663      }
006ad663      
006ad6a7      eax = 1;
006ad6a9      return 1;
006ad650  }

006ad6aa                                90 90 90 90 90 90                                                            ......

006ad6b0  uint8_t CM_Trade::SendNotice_RemoveItemFromTrade(uint32_t arg1, uint32_t arg2)

006ad6b0  {
006ad6be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd234);
006ad6be      
006ad6c3      if (eax != 0)
006ad6c3      {
006ad6c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad6c6          
006ad6cb          while (i != 0)
006ad6cb          {
006ad6d8              int32_t* esi_1 = *(uint32_t*)i;
006ad6dc              i = i[1];
006ad6dc              
006ad6df              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006ad6f1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x200)(arg1, arg2);
006ad6cb          }
006ad6c3      }
006ad6c3      
006ad6ff      eax = 1;
006ad701      return 1;
006ad6b0  }

006ad702        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006ad710  uint8_t CM_Trade::SendNotice_ResetTrade(uint32_t arg1)

006ad710  {
006ad71e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd237);
006ad71e      
006ad723      if (eax != 0)
006ad723      {
006ad726          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad726          
006ad72b          while (i != 0)
006ad72b          {
006ad733              int32_t* edi_1 = *(uint32_t*)i;
006ad737              i = i[1];
006ad737              
006ad73a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ad74b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x204)(arg1);
006ad72b          }
006ad723      }
006ad723      
006ad758      eax = 1;
006ad75a      return 1;
006ad710  }

006ad75b                                                                                   90 90 90 90 90                             .....

006ad760  uint8_t CM_Trade::SendNotice_TradeAnItemForDummies(uint32_t arg1)

006ad760  {
006ad76e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd23a);
006ad76e      
006ad773      if (eax != 0)
006ad773      {
006ad776          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad776          
006ad77b          while (i != 0)
006ad77b          {
006ad783              int32_t* edi_1 = *(uint32_t*)i;
006ad787              i = i[1];
006ad787              
006ad78a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006ad79b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x208)(arg1);
006ad77b          }
006ad773      }
006ad773      
006ad7a8      eax = 1;
006ad7aa      return 1;
006ad760  }

006ad7ab                                   90 90 90 90 90                                                             .....

006ad7b0  uint8_t CM_Trade::SendNotice_TradeFailure(uint32_t arg1, uint32_t arg2)

006ad7b0  {
006ad7be      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd238);
006ad7be      
006ad7c3      if (eax != 0)
006ad7c3      {
006ad7c6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad7c6          
006ad7cb          while (i != 0)
006ad7cb          {
006ad7d8              int32_t* esi_1 = *(uint32_t*)i;
006ad7dc              i = i[1];
006ad7dc              
006ad7df              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006ad7f1                  *(uint32_t*)(*(uint32_t*)esi_1 + 0x20c)(arg1, arg2);
006ad7cb          }
006ad7c3      }
006ad7c3      
006ad7ff      eax = 1;
006ad801      return 1;
006ad7b0  }

006ad802        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006ad810  uint8_t CM_Login::SendNotice_BeginEnterWorld()

006ad810  {
006ad81e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1e1);
006ad81e      
006ad823      if (eax != 0)
006ad823      {
006ad826          int32_t* i = *(uint32_t*)((char*)eax + 4);
006ad826          
006ad82b          if (i != 0)
006ad82b          {
006ad82d              int32_t edi;
006ad82d              int32_t var_8_1 = edi;
006ad82d              
006ad84f              do
006ad84f              {
006ad830                  int32_t* edi_2 = *(uint32_t*)i;
006ad834                  i = i[1];
006ad834                  
006ad837                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006ad847                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x164)();
006ad84f              } while (i != 0);
006ad82b          }
006ad823      }
006ad823      
006ad853      eax = 1;
006ad855      return 1;
006ad810  }

006ad856                                                                    90 90 90 90 90 90 90 90 90 90                        ..........

006ad860  uint32_t CM_Login::DispatchUI_WorldInfo(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ad860  {
006ad86e      if ((arg1 == 0 || arg1->m_pUISystem == 0))
006ad873          return 0;
006ad873      
006ad875      void* esi = arg2;
006ad875      
006ad886      if (*(uint32_t*)esi != 0xf7e1)
006ad88d          return 0;
006ad88d      
006ad88e      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006ad894      int32_t ebx = *(uint32_t*)((char*)esi + 4);
006ad897      int32_t ebp = *(uint32_t*)((char*)esi + 8);
006ad8a8      arg2 = ((char*)esi + 0xc);
006ad8ac      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006ad8c2      class AC1Legacy::PStringBase<char> __saved_ecx;
006ad8c2      AC1Legacy::PStringBase<char>::UnPack(&__saved_ecx, &arg2, (((esi * 0) - 0xc) + arg3));
006ad8d5      ClientUISystem::Handle_Login__WorldInfo(arg1->m_pUISystem, ebx, ebp, &__saved_ecx);
006ad8d5      
006ad8f4      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_1 != 0))
006ad8f6          AC1Legacy::PStringBase<char>::s_NullBuffer_1->vtable->__vecDelDtor(1);
006ad8f6      
006ad903      return 0;
006ad860  }

006ad904              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006ad910  uint32_t CM_Admin::DispatchUI_Environs(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ad910  {
006ad916      if (arg1 != 0)
006ad916      {
006ad918          class CPlayerSystem* m_pPlayerSystem = arg1->m_pPlayerSystem;
006ad918          
006ad929          if ((m_pPlayerSystem != 0 && *(uint32_t*)arg2 == 0xea60))
006ad932              CPlayerSystem::Handle_Admin__Environs(m_pPlayerSystem, *(uint32_t*)((char*)arg2 + 4));
006ad916      }
006ad916      
006ad92d      return 0;
006ad910  }

006ad938                                                                          90 90 90 90 90 90 90 90                          ........

006ad940  uint32_t CM_Admin::DispatchUI_Recv_QueryPluginList(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ad940  {
006ad946      if (arg1 != 0)
006ad946      {
006ad948          class ClientAdminSystem* m_pAdminSystem = arg1->m_pAdminSystem;
006ad948          
006ad959          if ((m_pAdminSystem != 0 && *(uint32_t*)arg2 == 0x2ae))
006ad962              ClientAdminSystem::Handle_Admin__Recv_QueryPluginList(m_pAdminSystem, *(uint32_t*)((char*)arg2 + 4));
006ad946      }
006ad946      
006ad95d      return 0;
006ad940  }

006ad968                          90 90 90 90 90 90 90 90                                                          ........

006ad970  void* __thiscall AdminAccountData::`scalar deleting destructor'(class AdminAccountData* this, uint32_t arg2)

006ad970  {
006ad974      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->accountName.m_buffer;
006ad97b      this->vtable = 0x803534;
006ad97b      
006ad98d      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
006ad98f          m_buffer->vtable->__vecDelDtor(1);
006ad98f      
006ad99c      this->vtable = 0x79285c;
006ad99c      
006ad9a2      if ((arg2 & 1) != 0)
006ad9a5          operator delete(this);
006ad9a5      
006ad9b1      return this;
006ad970  }

006ad9b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006ad9c0  void* __thiscall AdminPlayerData::`scalar deleting destructor'(class AdminPlayerData* this, uint32_t arg2)

006ad9c0  {
006ad9c4      class AC1Legacy::PSRefBuffer<char>* m_buffer = this->name.m_buffer;
006ad9cb      this->vtable = 0x803548;
006ad9cb      
006ad9dd      if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
006ad9df          m_buffer->vtable->__vecDelDtor(1);
006ad9df      
006ad9ec      this->vtable = 0x79285c;
006ad9ec      
006ad9f2      if ((arg2 & 1) != 0)
006ad9f5          operator delete(this);
006ad9f5      
006ada01      return this;
006ad9c0  }

006ada04              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006ada10  uint32_t __thiscall PackableList<AdminAccountData>::Pack(class PackableList<AdminAccountData>* this, void** arg2, uint32_t arg3)

006ada10  {
006ada15      uint32_t result = PackableList<AdminPlayerData>::pack_size(this);
006ada15      
006ada22      if (arg3 >= result)
006ada22      {
006ada2c          if (arg3 >= 4)
006ada2c          {
006ada33              **(uint32_t**)arg2 = this->curNum;
006ada35              *(uint32_t*)arg2 += 4;
006ada2c          }
006ada2c          
006ada3d          for (class PackableLLNode<AdminAccountData>* i = this->head; i != 0; i = i->next)
006ada40              i->data.vtable->Pack(arg2, arg3);
006ada22      }
006ada22      
006ada56      return result;
006ada10  }

006ada59                                                                             90 90 90 90 90 90 90                           .......

006ada60  uint32_t __fastcall PackableList<AdminPlayerData>::pack_size(class PackableList<AdminPlayerData>* this)

006ada60  {
006ada60      class PackableList<AdminPlayerData>* this_1 = this;
006ada62      class PackableLLNode<AdminPlayerData>* i = this->head;
006ada68      int32_t result = 4;
006ada6d      this_1 = nullptr;
006ada6d      
006ada75      while (i != 0)
006ada75      {
006ada82          int32_t eax_2 = i->data.vtable->Pack(&this_1, 0);
006ada85          i = i->next;
006ada88          result += eax_2;
006ada75      }
006ada75      
006ada93      return result;
006ada60  }

006ada94                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006adaa0  uint8_t CM_Admin::Event_QueryPluginListResponse(uint32_t arg1, class AC1Legacy::PStringBase<char> const* arg2)

006adaa0  {
006adaa6      uint32_t eax = Proto_UI::GetNextUICounter();
006adabc      int32_t var_8 = 0x801ad4;
006adac4      void* var_c = nullptr;
006adacc      uint32_t eax_1 = AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, 0);
006adade      OrderHdr::Pack(&var_8, &var_c, 0);
006adae8      void* eax_2 = operator new[]((eax_1 + 0x10));
006adafa      var_c = eax_2;
006adb00      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0x10));
006adb0d      *(uint32_t*)var_c = 0x2af;
006adb17      uint32_t* eax_5 = ((char*)var_c + 4);
006adb1a      var_c = eax_5;
006adb1e      *(uint32_t*)eax_5 = arg1;
006adb24      void* eax_7 = ((char*)var_c + 4);
006adb29      void* ecx_5 = (eax_7 & 0x80000003);
006adb29      bool cond:1 = ecx_5 == 0;
006adb2f      var_c = eax_7;
006adb2f      
006adb33      if (ecx_5 < 0)
006adb33      {
006adb36          void* ecx_7 = (((char*)ecx_5 - 1) | 0xfffffffc);
006adb39          ecx_5 = ((char*)ecx_7 + 1);
006adb39          cond:1 = ecx_7 == 0xffffffff;
006adb33      }
006adb33      
006adb3a      if (!(cond:1))
006adb3a      {
006adb41          void* i_1 = (4 - ecx_5);
006adb41          
006adb43          if (4 != ecx_5)
006adb43          {
006adb52              void* i;
006adb52              
006adb52              do
006adb52              {
006adb45                  *(uint8_t*)eax_7 = 0;
006adb4c                  eax_7 = ((char*)var_c + 1);
006adb4d                  i = i_1;
006adb4d                  i_1 -= 1;
006adb4e                  var_c = eax_7;
006adb52              } while (i != 1);
006adb43          }
006adb3a      }
006adb3a      
006adb62      AC1Legacy::PStringBase<char>::Pack(arg2, &var_c, (((char*)eax_2 - eax_7) + (eax_1 + 0x10)));
006adb6e      class AC1Legacy::PStringBase<char>* ebx;
006adb6e      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0x10));
006adb6e      
006adb75      if (ebx == 0)
006adb7c          Proto_UI::UICounterFailedSend(eax);
006adb7c      
006adb8c      return ebx;
006adaa0  }

006adb8d                                         90 90 90                                                               ...

006adb90  uint8_t CM_Admin::Event_QueryPluginResponse(uint32_t arg1, int32_t arg2, class AC1Legacy::PStringBase<char> const* arg3, class AC1Legacy::PStringBase<char> const* arg4, class AC1Legacy::PStringBase<char> const* arg5, class AC1Legacy::PStringBase<char> const* arg6)

006adb90  {
006adb97      uint32_t eax = Proto_UI::GetNextUICounter();
006adbad      int32_t var_8 = 0x801ad4;
006adbb5      void* var_c = nullptr;
006adc05      uint32_t esi_3 = (((AC1Legacy::PStringBase<char>::Pack(arg3, &var_c, 0) + AC1Legacy::PStringBase<char>::Pack(arg4, &var_c, 0)) + AC1Legacy::PStringBase<char>::Pack(arg5, &var_c, 0)) + AC1Legacy::PStringBase<char>::Pack(arg6, &var_c, 0));
006adc07      OrderHdr::Pack(&var_8, &var_c, 0);
006adc11      void* eax_5 = operator new[]((esi_3 + 0x14));
006adc23      var_c = eax_5;
006adc29      OrderHdr::Pack(&var_8, &var_c, (esi_3 + 0x14));
006adc36      *(uint32_t*)var_c = 0x2b2;
006adc40      uint32_t* eax_8 = ((char*)var_c + 4);
006adc43      var_c = eax_8;
006adc47      *(uint32_t*)eax_8 = arg1;
006adc4d      void* ecx_8 = ((char*)var_c + 4);
006adc52      void* eax_10 = (ecx_8 & 0x80000003);
006adc52      bool cond:1 = eax_10 == 0;
006adc57      var_c = ecx_8;
006adc57      
006adc5b      if (eax_10 < 0)
006adc5b      {
006adc5e          void* eax_12 = (((char*)eax_10 - 1) | 0xfffffffc);
006adc61          eax_10 = ((char*)eax_12 + 1);
006adc61          cond:1 = eax_12 == 0xffffffff;
006adc5b      }
006adc5b      
006adc62      if (!(cond:1))
006adc62      {
006adc69          void* i_2 = (4 - eax_10);
006adc69          
006adc6b          if (4 != eax_10)
006adc6b          {
006adc7d              void* i;
006adc7d              
006adc7d              do
006adc7d              {
006adc70                  *(uint8_t*)ecx_8 = 0;
006adc77                  ecx_8 = ((char*)var_c + 1);
006adc78                  i = i_2;
006adc78                  i_2 -= 1;
006adc79                  var_c = ecx_8;
006adc7d              } while (i != 1);
006adc6b          }
006adc62      }
006adc62      
006adc83      *(uint32_t*)ecx_8 = arg2;
006adc89      void* eax_14 = ((char*)var_c + 4);
006adc8e      void* ecx_11 = (eax_14 & 0x80000003);
006adc8e      bool cond:3 = ecx_11 == 0;
006adc94      var_c = eax_14;
006adc94      
006adc98      if (ecx_11 < 0)
006adc98      {
006adc9b          void* ecx_13 = (((char*)ecx_11 - 1) | 0xfffffffc);
006adc9e          ecx_11 = ((char*)ecx_13 + 1);
006adc9e          cond:3 = ecx_13 == 0xffffffff;
006adc98      }
006adc98      
006adc9f      if (!(cond:3))
006adc9f      {
006adca6          void* i_3 = (4 - ecx_11);
006adca6          
006adca8          if (4 != ecx_11)
006adca8          {
006adcbd              void* i_1;
006adcbd              
006adcbd              do
006adcbd              {
006adcb0                  *(uint8_t*)eax_14 = 0;
006adcb7                  eax_14 = ((char*)var_c + 1);
006adcb8                  i_1 = i_3;
006adcb8                  i_3 -= 1;
006adcb9                  var_c = eax_14;
006adcbd              } while (i_1 != 1);
006adca8          }
006adc9f      }
006adc9f      
006adccd      AC1Legacy::PStringBase<char>::Pack(arg3, &var_c, (((char*)eax_5 - eax_14) + (esi_3 + 0x14)));
006adce4      AC1Legacy::PStringBase<char>::Pack(arg4, &var_c, (((char*)eax_5 - var_c) + (esi_3 + 0x14)));
006adcfd      AC1Legacy::PStringBase<char>::Pack(arg5, &var_c, (((char*)eax_5 - var_c) + (esi_3 + 0x14)));
006add16      AC1Legacy::PStringBase<char>::Pack(arg6, &var_c, (((char*)eax_5 - var_c) + (esi_3 + 0x14)));
006add22      void* ebx_3;
006add22      ebx_3 = Proto_UI::SendToWeenie(eax_5, (esi_3 + 0x14));
006add22      
006add29      if (ebx_3 == 0)
006add30          Proto_UI::UICounterFailedSend(eax);
006add30      
006add3b      uint32_t eax_19;
006add3b      eax_19 = ebx_3;
006add41      return eax_19;
006adb90  }

006add42        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006add50  class AdminPlayerData& __thiscall AdminPlayerData::operator=(class AdminPlayerData* this, class AdminPlayerData const& arg2)

006add50  {
006add5c      class AC1Legacy::PSRefBuffer<char>* m_buffer_1 = this->name.m_buffer;
006add5c      
006add61      if (m_buffer_1 != arg2->name.m_buffer)
006add61      {
006add73          if ((InterlockedDecrement(&m_buffer_1->m_cRef) == 0 && m_buffer_1 != 0))
006add75              m_buffer_1->vtable->__vecDelDtor(1);
006add75          
006add7d          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->name.m_buffer;
006add80          this->name.m_buffer = m_buffer;
006add87          InterlockedIncrement(&m_buffer->m_cRef);
006add61      }
006add61      
006add90      this->bookieID = arg2->bookieID;
006add98      return this;
006add50  }

006add9b                                                                                   90 90 90 90 90                             .....

006adda0  uint32_t CM_Admin::DispatchUI_Recv_QueryPlugin(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006adda0  {
006adda1      class UIQueueManager* ebp = arg1;
006adda1      
006addae      if ((ebp == 0 || ebp->m_pAdminSystem == 0))
006addb3          return 0;
006addb3      
006addb6      void* edi = arg2;
006addb6      
006addc6      if (*(uint32_t*)edi != 0x2b1)
006addcd          return 0;
006addcd      
006addce      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006addd4      uint32_t ebx = *(uint32_t*)((char*)edi + 4);
006addd6      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006adde1      arg2 = ((char*)edi + 8);
006adde5      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006addfb      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((edi * 0) - 8) + arg3));
006ade09      ClientAdminSystem::Handle_Admin__Recv_QueryPlugin(ebp->m_pAdminSystem, ebx, &arg1);
006ade10      class UIQueueManager* eax_6 = arg1;
006ade10      
006ade27      if ((InterlockedDecrement(&eax_6->m_cTurbineRefCount) == 0 && eax_6 != 0))
006ade29          eax_6->vtable->IUnknown_QueryInterface(1);
006ade29      
006ade36      return 0;
006adda0  }

006ade37                                                                       90 90 90 90 90 90 90 90 90                         .........

006ade40  uint32_t CM_Admin::DispatchUI_Recv_QueryPluginResponse(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ade40  {
006ade44      class UIQueueManager* ebp = arg1;
006ade44      
006ade51      if ((ebp == 0 || ebp->m_pAdminSystem == 0))
006ade59          return 0;
006ade59      
006ade5b      void* ebx = arg2;
006ade67      bool cond:0 = *(uint32_t*)ebx == 0x2b3;
006ade6c      arg2 = ((char*)ebx + 4);
006ade6c      
006ade70      if (!(cond:0))
006ade7a          return 0;
006ade7a      
006ade7b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_1 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006ade87      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_9 = AC1Legacy::PStringBase<char>::s_NullBuffer_1;
006ade8f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_1->m_cRef);
006adea5      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_9, &arg2, (((ebx * 0) - 4) + arg3));
006adeaa      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_2 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006adeaf      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_8 = AC1Legacy::PStringBase<char>::s_NullBuffer_2;
006adeb7      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_2->m_cRef);
006adecd      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_8, &arg2, (((char*)ebx - arg2) + arg3));
006aded2      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_3 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006aded7      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_7 = AC1Legacy::PStringBase<char>::s_NullBuffer_3;
006adedf      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_3->m_cRef);
006adef5      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_7, &arg2, (((char*)ebx - arg2) + arg3));
006adefa      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_4 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006adeff      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_6 = AC1Legacy::PStringBase<char>::s_NullBuffer_4;
006adf07      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_4->m_cRef);
006adf1d      AC1Legacy::PStringBase<char>::UnPack(&AC1Legacy::PStringBase<char>::s_NullBuffer_6, &arg2, (((char*)ebx - arg2) + arg3));
006adf22      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_5 = AC1Legacy::PStringBase<char>::s_NullBuffer;
006adf27      arg1 = AC1Legacy::PStringBase<char>::s_NullBuffer_5;
006adf2f      InterlockedIncrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_5->m_cRef);
006adf41      AC1Legacy::PStringBase<char>::UnPack(&arg1, &arg2, (((char*)ebx - arg2) + arg3));
006adf62      ClientAdminSystem::Handle_Admin__Recv_QueryPluginResponse(ebp->m_pAdminSystem, &AC1Legacy::PStringBase<char>::s_NullBuffer_9, &AC1Legacy::PStringBase<char>::s_NullBuffer_8, &AC1Legacy::PStringBase<char>::s_NullBuffer_7, &AC1Legacy::PStringBase<char>::s_NullBuffer_6, &arg1);
006adf6f      class UIQueueManager* eax_17 = arg1;
006adf6f      
006adf81      if ((InterlockedDecrement(&eax_17->m_cTurbineRefCount) == 0 && eax_17 != 0))
006adf83          eax_17->vtable->IUnknown_QueryInterface(1);
006adf83      
006adf8b      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_10 = AC1Legacy::PStringBase<char>::s_NullBuffer_6;
006adf8b      
006adf9b      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_10->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_10 != 0))
006adf9d          AC1Legacy::PStringBase<char>::s_NullBuffer_10->vtable->__vecDelDtor(1);
006adf9d      
006adfa5      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_11 = AC1Legacy::PStringBase<char>::s_NullBuffer_7;
006adfa5      
006adfb5      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_11->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_11 != 0))
006adfb7          AC1Legacy::PStringBase<char>::s_NullBuffer_11->vtable->__vecDelDtor(1);
006adfb7      
006adfbf      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_12 = AC1Legacy::PStringBase<char>::s_NullBuffer_8;
006adfbf      
006adfcf      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_12->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_12 != 0))
006adfd1          AC1Legacy::PStringBase<char>::s_NullBuffer_12->vtable->__vecDelDtor(1);
006adfd1      
006adfd9      class AC1Legacy::PSRefBuffer<char>* AC1Legacy::PStringBase<char>::s_NullBuffer_13 = AC1Legacy::PStringBase<char>::s_NullBuffer_9;
006adfd9      
006adfea      if ((InterlockedDecrement(&AC1Legacy::PStringBase<char>::s_NullBuffer_13->m_cRef) == 0 && AC1Legacy::PStringBase<char>::s_NullBuffer_13 != 0))
006adfec          AC1Legacy::PStringBase<char>::s_NullBuffer_13->vtable->__vecDelDtor(1);
006adfec      
006adffc      return 0;
006ade40  }

006adffd                                                                                         90 90 90                               ...

006ae000  uint32_t __thiscall PackableList<AdminAccountData>::InsertTail(class PackableList<AdminAccountData>* this, class AdminAccountData const* arg2)

006ae000  {
006ae00b      void* esi = operator new(0x14);
006ae00b      
006ae012      if (esi == 0)
006ae046          esi = nullptr;
006ae012      else
006ae012      {
006ae019          *(uint32_t*)esi = 0x803534;
006ae01f          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->accountName.m_buffer;
006ae022          *(uint32_t*)((char*)esi + 4) = m_buffer;
006ae029          InterlockedIncrement(&m_buffer->m_cRef);
006ae032          *(uint32_t*)((char*)esi + 8) = arg2->bookieID;
006ae035          *(uint32_t*)((char*)esi + 0xc) = 0;
006ae03c          *(uint32_t*)((char*)esi + 0x10) = 0;
006ae012      }
006ae012      
006ae04d      if (this->head == 0)
006ae04d      {
006ae052          uint32_t eax_5 = (this->curNum + 1);
006ae053          this->head = esi;
006ae056          this->tail = esi;
006ae059          this->curNum = eax_5;
006ae05e          return eax_5;
006ae04d      }
006ae04d      
006ae061      class PackableLLNode<AdminAccountData>* tail = this->tail;
006ae064      tail->next = esi;
006ae067      *(uint32_t*)((char*)esi + 0x10) = tail;
006ae06d      uint32_t eax_7 = (this->curNum + 1);
006ae06e      this->tail = esi;
006ae071      this->curNum = eax_7;
006ae076      return eax_7;
006ae000  }

006ae079                                                                             90 90 90 90 90 90 90                           .......

006ae080  uint32_t __thiscall PackableList<AdminPlayerData>::InsertTail(class PackableList<AdminPlayerData>* this, class AdminPlayerData const* arg2)

006ae080  {
006ae08b      void* esi = operator new(0x14);
006ae08b      
006ae092      if (esi == 0)
006ae0c6          esi = nullptr;
006ae092      else
006ae092      {
006ae099          *(uint32_t*)esi = 0x803548;
006ae09f          class AC1Legacy::PSRefBuffer<char>* m_buffer = arg2->name.m_buffer;
006ae0a2          *(uint32_t*)((char*)esi + 4) = m_buffer;
006ae0a9          InterlockedIncrement(&m_buffer->m_cRef);
006ae0b2          *(uint32_t*)((char*)esi + 8) = arg2->bookieID;
006ae0b5          *(uint32_t*)((char*)esi + 0xc) = 0;
006ae0bc          *(uint32_t*)((char*)esi + 0x10) = 0;
006ae092      }
006ae092      
006ae0cd      if (this->head == 0)
006ae0cd      {
006ae0d2          uint32_t eax_5 = (this->curNum + 1);
006ae0d3          this->head = esi;
006ae0d6          this->tail = esi;
006ae0d9          this->curNum = eax_5;
006ae0de          return eax_5;
006ae0cd      }
006ae0cd      
006ae0e1      class PackableLLNode<AdminPlayerData>* tail = this->tail;
006ae0e4      tail->next = esi;
006ae0e7      *(uint32_t*)((char*)esi + 0x10) = tail;
006ae0ed      uint32_t eax_7 = (this->curNum + 1);
006ae0ee      this->tail = esi;
006ae0f1      this->curNum = eax_7;
006ae0f6      return eax_7;
006ae080  }

006ae0f9                                                                             90 90 90 90 90 90 90                           .......

006ae100  int32_t __thiscall PackableList<AdminAccountData>::RemoveHead(class PackableList<AdminAccountData>* this, class AdminAccountData* arg2)

006ae100  {
006ae104      class PackableLLNode<AdminAccountData>* head = this->head;
006ae104      
006ae109      if (head == 0)
006ae10f          return 0;
006ae10f      
006ae112      class PackableLLNode<AdminAccountData>* next = head->next;
006ae117      this->head = next;
006ae117      
006ae11a      if (next == 0)
006ae125          this->tail = nullptr;
006ae11a      else
006ae11c          next->prev = nullptr;
006ae11c      
006ae131      AdminPlayerData::operator=(arg2, head);
006ae131      
006ae138      if (head != 0)
006ae138      {
006ae13b          class AC1Legacy::PSRefBuffer<char>* m_buffer = head->data.accountName.m_buffer;
006ae142          head->data.vtable = 0x803534;
006ae142          
006ae154          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
006ae156              m_buffer->vtable->__vecDelDtor(1);
006ae156          
006ae15f          head->data.vtable = 0x79285c;
006ae165          operator delete(head);
006ae138      }
006ae138      
006ae16e      this->curNum -= 1;
006ae178      return 1;
006ae100  }

006ae17b                                                                                   90 90 90 90 90                             .....

006ae180  int32_t __thiscall PackableList<AdminPlayerData>::RemoveHead(class PackableList<AdminPlayerData>* this, class AdminPlayerData* arg2)

006ae180  {
006ae184      class PackableLLNode<AdminPlayerData>* head = this->head;
006ae184      
006ae189      if (head == 0)
006ae18f          return 0;
006ae18f      
006ae192      class PackableLLNode<AdminPlayerData>* next = head->next;
006ae197      this->head = next;
006ae197      
006ae19a      if (next == 0)
006ae1a5          this->tail = nullptr;
006ae19a      else
006ae19c          next->prev = nullptr;
006ae19c      
006ae1b1      AdminPlayerData::operator=(arg2, head);
006ae1b1      
006ae1b8      if (head != 0)
006ae1b8      {
006ae1bb          class AC1Legacy::PSRefBuffer<char>* m_buffer = head->data.name.m_buffer;
006ae1c2          head->data.vtable = 0x803548;
006ae1c2          
006ae1d4          if ((InterlockedDecrement(&m_buffer->m_cRef) == 0 && m_buffer != 0))
006ae1d6              m_buffer->vtable->__vecDelDtor(1);
006ae1d6          
006ae1df          head->data.vtable = 0x79285c;
006ae1e5          operator delete(head);
006ae1b8      }
006ae1b8      
006ae1ee      this->curNum -= 1;
006ae1f8      return 1;
006ae180  }

006ae1fb                                                                                   90 90 90 90 90                             .....

006ae200  void __fastcall PackableList<AdminAccountData>::Flush(class PackableList<AdminAccountData>* this)

006ae200  {
006ae20a      int32_t var_c;
006ae20a      AdminAccountData::AdminAccountData(&var_c);
006ae20a      
006ae214      while (this->head != 0)
006ae21d          PackableList<AdminAccountData>::RemoveHead(this, &var_c);
006ae21d      
006ae231      var_c = 0x803534;
006ae245      int32_t* var_8;
006ae245      
006ae245      if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
006ae24d          **(uint32_t**)var_8(1);
006ae200  }

006ae254                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006ae260  void __fastcall PackableList<AdminPlayerData>::Flush(class PackableList<AdminPlayerData>* this)

006ae260  {
006ae26a      int32_t var_c;
006ae26a      AdminPlayerData::AdminPlayerData(&var_c);
006ae26a      
006ae274      while (this->head != 0)
006ae27d          PackableList<AdminPlayerData>::RemoveHead(this, &var_c);
006ae27d      
006ae291      var_c = 0x803548;
006ae2a5      int32_t* var_8;
006ae2a5      
006ae2a5      if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
006ae2ad          **(uint32_t**)var_8(1);
006ae260  }

006ae2b4                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006ae2c0  int32_t __thiscall PackableList<AdminAccountData>::UnPack(class PackableList<AdminAccountData>* this, void** arg2, uint32_t arg3)

006ae2c0  {
006ae2c6      PackableList<AdminAccountData>::Flush(this);
006ae2c6      
006ae2d0      if (arg3 < 4)
006ae352          return 0;
006ae352      
006ae2d7      void* eax = *(uint32_t*)arg2;
006ae2db      int32_t edi = *(uint32_t*)eax;
006ae2e4      *(uint32_t*)arg2 = ((char*)eax + 4);
006ae2e6      int32_t var_c;
006ae2e6      AdminAccountData::AdminAccountData(&var_c);
006ae2eb      int32_t esi = 0;
006ae2ef      int32_t* var_8;
006ae2ef      
006ae2ef      if (edi > 0)
006ae2ef      {
006ae315          do
006ae315          {
006ae304              if (*(uint32_t*)(var_c + 0x10)(arg2, arg3) == 0)
006ae304              {
006ae35d                  var_c = 0x803534;
006ae35d                  
006ae371                  if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
006ae379                      **(uint32_t**)var_8(1);
006ae379                  
006ae384                  return 0;
006ae304              }
006ae304              
006ae30d              PackableList<AdminAccountData>::InsertTail(this, &var_c);
006ae312              esi += 1;
006ae315          } while (esi < edi);
006ae2ef      }
006ae2ef      
006ae31f      var_c = 0x803534;
006ae31f      
006ae333      if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
006ae33b          **(uint32_t**)var_8(1);
006ae33b      
006ae349      return 1;
006ae2c0  }

006ae387                       90 90 90 90 90 90 90 90 90                                                         .........

006ae390  int32_t __thiscall PackableList<AdminPlayerData>::UnPack(class PackableList<AdminPlayerData>* this, void** arg2, uint32_t arg3)

006ae390  {
006ae396      PackableList<AdminPlayerData>::Flush(this);
006ae396      
006ae3a0      if (arg3 < 4)
006ae422          return 0;
006ae422      
006ae3a7      void* eax = *(uint32_t*)arg2;
006ae3ab      int32_t edi = *(uint32_t*)eax;
006ae3b4      *(uint32_t*)arg2 = ((char*)eax + 4);
006ae3b6      int32_t var_c;
006ae3b6      AdminPlayerData::AdminPlayerData(&var_c);
006ae3bb      int32_t esi = 0;
006ae3bf      int32_t* var_8;
006ae3bf      
006ae3bf      if (edi > 0)
006ae3bf      {
006ae3e5          do
006ae3e5          {
006ae3d4              if (*(uint32_t*)(var_c + 0x10)(arg2, arg3) == 0)
006ae3d4              {
006ae42d                  var_c = 0x803548;
006ae42d                  
006ae441                  if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
006ae449                      **(uint32_t**)var_8(1);
006ae449                  
006ae454                  return 0;
006ae3d4              }
006ae3d4              
006ae3dd              PackableList<AdminPlayerData>::InsertTail(this, &var_c);
006ae3e2              esi += 1;
006ae3e5          } while (esi < edi);
006ae3bf      }
006ae3bf      
006ae3ef      var_c = 0x803548;
006ae3ef      
006ae403      if ((InterlockedDecrement(&var_8[1]) == 0 && var_8 != 0))
006ae40b          **(uint32_t**)var_8(1);
006ae40b      
006ae419      return 1;
006ae390  }

006ae457                                                                       90 90 90 90 90 90 90 90 90                         .........

006ae460  void* __thiscall PackableList<AdminAccountData>::`scalar deleting destructor'(class PackableList<AdminAccountData>* this, uint32_t arg2)

006ae460  {
006ae463      this->vtable = 0x80350c;
006ae469      PackableList<AdminAccountData>::Flush(this);
006ae473      this->vtable = 0x79285c;
006ae473      
006ae479      if ((arg2 & 1) != 0)
006ae47c          operator delete(this);
006ae47c      
006ae487      return this;
006ae460  }

006ae48a                                90 90 90 90 90 90                                                            ......

006ae490  void* __thiscall PackableList<AdminPlayerData>::`scalar deleting destructor'(class PackableList<AdminPlayerData>* this, uint32_t arg2)

006ae490  {
006ae493      this->vtable = 0x803520;
006ae499      PackableList<AdminPlayerData>::Flush(this);
006ae4a3      this->vtable = 0x79285c;
006ae4a3      
006ae4a9      if ((arg2 & 1) != 0)
006ae4ac          operator delete(this);
006ae4ac      
006ae4b7      return this;
006ae490  }

006ae4ba                                                                                90 90 90 90 90 90                            ......

006ae4c0  uint32_t CM_Admin::DispatchUI_ReceiveAccountData(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae4c0  {
006ae4d1      if ((arg1 == 0 || arg1->m_pAdminSystem == 0))
006ae4d9          return 0;
006ae4d9      
006ae4da      void* ecx = arg2;
006ae4e6      bool cond:0 = *(uint32_t*)ecx == 0xf7ca;
006ae4ec      arg2 = ((char*)ecx + 4);
006ae4ec      
006ae4f0      if (!(cond:0))
006ae4f9          return 0;
006ae4f9      
006ae4fa      uint32_t esi_1 = *(uint32_t*)((char*)ecx + 4);
006ae501      arg2 = ((char*)ecx + 8);
006ae513      int32_t var_10 = 0x80350c;
006ae51b      int32_t var_c = 0;
006ae51f      int32_t var_8 = 0;
006ae523      int32_t var_4 = 0;
006ae527      PackableList<AdminAccountData>::UnPack(&var_10, &arg2, (((ecx * 0) - 8) + arg3));
006ae535      RenderTexture::GetLevelRef(arg1->m_pAdminSystem, esi_1, &var_10);
006ae540      var_10 = 0x80350c;
006ae548      PackableList<AdminAccountData>::Flush(&var_10);
006ae554      return 0;
006ae4c0  }

006ae555                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006ae560  uint32_t CM_Admin::DispatchUI_ReceivePlayerData(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae560  {
006ae571      if ((arg1 == 0 || arg1->m_pAdminSystem == 0))
006ae579          return 0;
006ae579      
006ae57a      void* ecx = arg2;
006ae586      bool cond:0 = *(uint32_t*)ecx == 0xf7cb;
006ae58c      arg2 = ((char*)ecx + 4);
006ae58c      
006ae590      if (!(cond:0))
006ae599          return 0;
006ae599      
006ae59a      uint32_t esi_1 = *(uint32_t*)((char*)ecx + 4);
006ae5a1      arg2 = ((char*)ecx + 8);
006ae5b3      int32_t var_10 = 0x803520;
006ae5bb      int32_t var_c = 0;
006ae5bf      int32_t var_8 = 0;
006ae5c3      int32_t var_4 = 0;
006ae5c7      PackableList<AdminPlayerData>::UnPack(&var_10, &arg2, (((ecx * 0) - 8) + arg3));
006ae5d5      RenderTexture::GetLevelRef(arg1->m_pAdminSystem, esi_1, &var_10);
006ae5e0      var_10 = 0x803520;
006ae5e8      PackableList<AdminPlayerData>::Flush(&var_10);
006ae5f4      return 0;
006ae560  }

006ae5f5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006ae600  uint32_t CM_Qualities::DispatchUI_PrivateRemoveBoolEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae600  {
006ae606      if (arg1 != 0)
006ae606      {
006ae608          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae608          
006ae61e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d3))
006ae61e          {
006ae623              int32_t edx_1;
006ae623              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae628              arg1 = edx_1;
006ae632              ClientObjMaintSystem::Handle_Qualities__PrivateRemoveBoolEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5));
006ae61e          }
006ae606      }
006ae606      
006ae622      return 0;
006ae600  }

006ae638                                                                          90 90 90 90 90 90 90 90                          ........

006ae640  uint32_t CM_Qualities::DispatchUI_PrivateRemoveDataIDEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae640  {
006ae646      if (arg1 != 0)
006ae646      {
006ae648          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae648          
006ae65e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d9))
006ae65e          {
006ae663              int32_t edx_1;
006ae663              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae668              arg1 = edx_1;
006ae672              ClientObjMaintSystem::Handle_Qualities__PrivateRemoveDataIDEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5));
006ae65e          }
006ae646      }
006ae646      
006ae662      return 0;
006ae640  }

006ae678                                                                          90 90 90 90 90 90 90 90                          ........

006ae680  uint32_t CM_Qualities::DispatchUI_PrivateRemoveFloatEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae680  {
006ae686      if (arg1 != 0)
006ae686      {
006ae688          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae688          
006ae69e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d5))
006ae69e          {
006ae6a3              int32_t edx_1;
006ae6a3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae6a8              arg1 = edx_1;
006ae6b2              ClientObjMaintSystem::Handle_Qualities__PrivateRemoveFloatEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5));
006ae69e          }
006ae686      }
006ae686      
006ae6a2      return 0;
006ae680  }

006ae6b8                                                                          90 90 90 90 90 90 90 90                          ........

006ae6c0  uint32_t CM_Qualities::DispatchUI_PrivateRemoveInstanceIDEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae6c0  {
006ae6c6      if (arg1 != 0)
006ae6c6      {
006ae6c8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae6c8          
006ae6de          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1db))
006ae6de          {
006ae6e3              int32_t edx_1;
006ae6e3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae6e8              arg1 = edx_1;
006ae6f2              ClientObjMaintSystem::Handle_Qualities__PrivateRemoveInstanceIDEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5));
006ae6de          }
006ae6c6      }
006ae6c6      
006ae6e2      return 0;
006ae6c0  }

006ae6f8                                                                          90 90 90 90 90 90 90 90                          ........

006ae700  uint32_t CM_Qualities::DispatchUI_PrivateRemoveInt64Event(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae700  {
006ae706      if (arg1 != 0)
006ae706      {
006ae708          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae708          
006ae71e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2b8))
006ae71e          {
006ae723              int32_t edx_1;
006ae723              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae728              arg1 = edx_1;
006ae732              ClientObjMaintSystem::Handle_Qualities__PrivateRemoveInt64Event(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5));
006ae71e          }
006ae706      }
006ae706      
006ae722      return 0;
006ae700  }

006ae738                                                                          90 90 90 90 90 90 90 90                          ........

006ae740  uint32_t CM_Qualities::DispatchUI_PrivateRemoveIntEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae740  {
006ae746      if (arg1 != 0)
006ae746      {
006ae748          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae748          
006ae75e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d1))
006ae75e          {
006ae763              int32_t edx_1;
006ae763              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae768              arg1 = edx_1;
006ae772              ClientObjMaintSystem::Handle_Qualities__PrivateRemoveIntEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5));
006ae75e          }
006ae746      }
006ae746      
006ae762      return 0;
006ae740  }

006ae778                                                                          90 90 90 90 90 90 90 90                          ........

006ae780  uint32_t CM_Qualities::DispatchUI_PrivateRemovePositionEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae780  {
006ae786      if (arg1 != 0)
006ae786      {
006ae788          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae788          
006ae79e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1dd))
006ae79e          {
006ae7a3              int32_t edx_1;
006ae7a3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae7a8              arg1 = edx_1;
006ae7b2              ClientObjMaintSystem::Handle_Qualities__PrivateRemovePositionEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5));
006ae79e          }
006ae786      }
006ae786      
006ae7a2      return 0;
006ae780  }

006ae7b8                                                                          90 90 90 90 90 90 90 90                          ........

006ae7c0  uint32_t CM_Qualities::DispatchUI_PrivateRemoveStringEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae7c0  {
006ae7c6      if (arg1 != 0)
006ae7c6      {
006ae7c8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae7c8          
006ae7de          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d7))
006ae7de          {
006ae7e3              int32_t edx_1;
006ae7e3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae7e8              arg1 = edx_1;
006ae7f2              ClientObjMaintSystem::Handle_Qualities__PrivateRemoveStringEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5));
006ae7de          }
006ae7c6      }
006ae7c6      
006ae7e2      return 0;
006ae7c0  }

006ae7f8                                                                          90 90 90 90 90 90 90 90                          ........

006ae800  uint32_t CM_Qualities::DispatchUI_PrivateUpdateAttribute(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae800  {
006ae804      class UIQueueManager* edi = arg1;
006ae804      
006ae811      if ((edi != 0 && edi->m_pObjMaintSystem != 0))
006ae811      {
006ae813          void* eax_2 = arg2;
006ae81e          bool cond:0_1 = *(uint32_t*)eax_2 == 0x2e3;
006ae824          arg2 = ((char*)eax_2 + 4);
006ae824          
006ae828          if (cond:0_1)
006ae828          {
006ae831              int32_t edx_1;
006ae831              edx_1 = *(uint8_t*)((char*)eax_2 + 4);
006ae834              arg2 = ((char*)eax_2 + 5);
006ae839              uint32_t esi = *(uint32_t*)((char*)eax_2 + 5);
006ae840              arg2 = ((char*)eax_2 + 9);
006ae852              arg1 = edx_1;
006ae856              int32_t var_10 = 0x7a7b14;
006ae85e              int32_t var_c = 0;
006ae866              int32_t var_8 = 0;
006ae86e              int32_t var_4 = 0;
006ae876              Attribute::UnPack(&var_10, &arg2, (((eax_2 * 0) - 9) + arg3));
006ae889              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateAttribute(edi->m_pObjMaintSystem, arg1, esi, &var_10);
006ae828          }
006ae811      }
006ae811      
006ae830      return 0;
006ae800  }

006ae894                                                              90 90 90 90 90 90 90 90 90 90 90 90                      ............

006ae8a0  uint32_t CM_Qualities::DispatchUI_PrivateUpdateAttribute2nd(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae8a0  {
006ae8a4      class UIQueueManager* ebp = arg1;
006ae8a4      
006ae8b2      if ((ebp != 0 && ebp->m_pObjMaintSystem != 0))
006ae8b2      {
006ae8b4          void* eax_1 = arg2;
006ae8bf          bool cond:0_1 = *(uint32_t*)eax_1 == 0x2e7;
006ae8c5          arg2 = ((char*)eax_1 + 4);
006ae8c5          
006ae8c9          if (cond:0_1)
006ae8c9          {
006ae8d3              int32_t edx_1;
006ae8d3              edx_1 = *(uint8_t*)((char*)eax_1 + 4);
006ae8d6              arg2 = ((char*)eax_1 + 5);
006ae8db              uint32_t esi = *(uint32_t*)((char*)eax_1 + 5);
006ae8e2              arg1 = edx_1;
006ae8ea              arg2 = ((char*)eax_1 + 9);
006ae8f8              int32_t var_10 = 0;
006ae8fc              int32_t var_c = 0;
006ae900              int32_t var_8 = 0;
006ae904              int32_t var_14 = 0x7a7b30;
006ae90c              int32_t var_4 = 0;
006ae910              SecondaryAttribute::UnPack(&var_14, &arg2, (((eax_1 * 0) - 9) + arg3));
006ae923              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateAttribute2nd(ebp->m_pObjMaintSystem, arg1, esi, &var_14);
006ae8c9          }
006ae8b2      }
006ae8b2      
006ae8d2      return 0;
006ae8a0  }

006ae92f                                               90                                                                 .

006ae930  uint32_t CM_Qualities::DispatchUI_PrivateUpdateAttribute2ndLevel(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae930  {
006ae936      if (arg1 != 0)
006ae936      {
006ae938          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae938          
006ae94e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2e9))
006ae94e          {
006ae953              int32_t edx_1;
006ae953              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae956              arg1 = edx_1;
006ae966              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateAttribute2ndLevel(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006ae94e          }
006ae936      }
006ae936      
006ae952      return 0;
006ae930  }

006ae96c                                      90 90 90 90                                                              ....

006ae970  uint32_t CM_Qualities::DispatchUI_PrivateUpdateAttributeLevel(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae970  {
006ae976      if (arg1 != 0)
006ae976      {
006ae978          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae978          
006ae98e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2e5))
006ae98e          {
006ae993              int32_t edx_1;
006ae993              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae996              arg1 = edx_1;
006ae9a6              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateAttributeLevel(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006ae98e          }
006ae976      }
006ae976      
006ae992      return 0;
006ae970  }

006ae9ac                                      90 90 90 90                                                              ....

006ae9b0  uint32_t CM_Qualities::DispatchUI_PrivateUpdateBool(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae9b0  {
006ae9b6      if (arg1 != 0)
006ae9b6      {
006ae9b8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae9b8          
006ae9ce          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2d1))
006ae9ce          {
006ae9d3              int32_t edx_1;
006ae9d3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006ae9d6              arg1 = edx_1;
006ae9e6              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateBool(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006ae9ce          }
006ae9b6      }
006ae9b6      
006ae9d2      return 0;
006ae9b0  }

006ae9ec                                      90 90 90 90                                                              ....

006ae9f0  uint32_t CM_Qualities::DispatchUI_PrivateUpdateFloat(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006ae9f0  {
006ae9f9      if (arg1 != 0)
006ae9f9      {
006ae9fb          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006ae9fb          
006aea11          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2d3))
006aea11          {
006aea19              int32_t edx_1;
006aea19              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aea1c              int32_t esi = *(uint32_t*)((char*)arg2 + 9);
006aea20              arg1 = edx_1;
006aea26              int32_t eax_4 = *(uint32_t*)((char*)arg2 + 0xd);
006aea29              int32_t var_10 = eax_4;
006aea2a              int32_t var_4 = eax_4;
006aea37              int32_t var_8 = esi;
006aea3b              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateFloat(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), esi);
006aea11          }
006ae9f9      }
006ae9f9      
006aea18      return 0;
006ae9f0  }

006aea45                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

006aea50  uint32_t CM_Qualities::DispatchUI_PrivateUpdateInstanceID(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aea50  {
006aea56      if (arg1 != 0)
006aea56      {
006aea58          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aea58          
006aea6e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2d9))
006aea6e          {
006aea73              int32_t edx_1;
006aea73              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aea76              arg1 = edx_1;
006aea86              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateInstanceID(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aea6e          }
006aea56      }
006aea56      
006aea72      return 0;
006aea50  }

006aea8c                                      90 90 90 90                                                              ....

006aea90  uint32_t CM_Qualities::DispatchUI_PrivateUpdateInt(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aea90  {
006aea96      if (arg1 != 0)
006aea96      {
006aea98          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aea98          
006aeaae          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2cd))
006aeaae          {
006aeab3              int32_t edx_1;
006aeab3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aeab6              arg1 = edx_1;
006aeac6              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateInt(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aeaae          }
006aea96      }
006aea96      
006aeab2      return 0;
006aea90  }

006aeacc                                      90 90 90 90                                                              ....

006aead0  uint32_t CM_Qualities::DispatchUI_PrivateUpdateInt64(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aead0  {
006aead6      if (arg1 != 0)
006aead6      {
006aead8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aead8          
006aeaee          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2cf))
006aeaee          {
006aeaf3              int32_t edx_1;
006aeaf3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aeafa              arg1 = edx_1;
006aeb03              int32_t var_8 = *(uint32_t*)((char*)arg2 + 0xd);
006aeb0b              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateInt64(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aeaee          }
006aead6      }
006aead6      
006aeaf2      return 0;
006aead0  }

006aeb12                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006aeb20  uint32_t CM_Qualities::DispatchUI_PrivateUpdateSkill(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aeb20  {
006aeb24      class UIQueueManager* ebp = arg1;
006aeb24      
006aeb32      if ((ebp != 0 && ebp->m_pObjMaintSystem != 0))
006aeb32      {
006aeb34          void* eax_1 = arg2;
006aeb3f          bool cond:0_1 = *(uint32_t*)eax_1 == 0x2dd;
006aeb45          arg2 = ((char*)eax_1 + 4);
006aeb45          
006aeb49          if (cond:0_1)
006aeb49          {
006aeb53              int32_t edx_1;
006aeb53              edx_1 = *(uint8_t*)((char*)eax_1 + 4);
006aeb56              arg2 = ((char*)eax_1 + 5);
006aeb5b              uint32_t edi = *(uint32_t*)((char*)eax_1 + 5);
006aeb62              arg1 = edx_1;
006aeb6a              arg2 = ((char*)eax_1 + 9);
006aeb78              int32_t var_20 = 0x7a7408;
006aeb80              int32_t s;
006aeb80              __builtin_memset(&s, 0, 0x1c);
006aeba4              Skill::UnPack(&var_20, &arg2, (((eax_1 * 0) - 9) + arg3));
006aebb7              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateSkill(ebp->m_pObjMaintSystem, arg1, edi, &var_20);
006aeb49          }
006aeb32      }
006aeb32      
006aeb52      return 0;
006aeb20  }

006aebc3           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006aebd0  uint32_t CM_Qualities::DispatchUI_PrivateUpdateSkillAC(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aebd0  {
006aebd6      if (arg1 != 0)
006aebd6      {
006aebd8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aebd8          
006aebee          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2e1))
006aebee          {
006aebf3              int32_t edx_1;
006aebf3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aebf6              arg1 = edx_1;
006aec06              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateSkillAC(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aebee          }
006aebd6      }
006aebd6      
006aebf2      return 0;
006aebd0  }

006aec0c                                      90 90 90 90                                                              ....

006aec10  uint32_t CM_Qualities::DispatchUI_PrivateUpdateSkillLevel(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aec10  {
006aec16      if (arg1 != 0)
006aec16      {
006aec18          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aec18          
006aec2e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2df))
006aec2e          {
006aec33              int32_t edx_1;
006aec33              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aec36              arg1 = edx_1;
006aec46              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateSkillLevel(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aec2e          }
006aec16      }
006aec16      
006aec32      return 0;
006aec10  }

006aec4c                                      90 90 90 90                                                              ....

006aec50  uint32_t CM_Qualities::DispatchUI_RemoveBoolEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aec50  {
006aec56      if (arg1 != 0)
006aec56      {
006aec58          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aec58          
006aec6e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d4))
006aec6e          {
006aec73              int32_t edx_1;
006aec73              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aec76              arg1 = edx_1;
006aec86              ClientObjMaintSystem::Handle_Qualities__RemoveBoolEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aec6e          }
006aec56      }
006aec56      
006aec72      return 0;
006aec50  }

006aec8c                                      90 90 90 90                                                              ....

006aec90  uint32_t CM_Qualities::DispatchUI_RemoveDataIDEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aec90  {
006aec96      if (arg1 != 0)
006aec96      {
006aec98          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aec98          
006aecae          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1da))
006aecae          {
006aecb3              int32_t edx_1;
006aecb3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aecb6              arg1 = edx_1;
006aecc6              ClientObjMaintSystem::Handle_Qualities__RemoveDataIDEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aecae          }
006aec96      }
006aec96      
006aecb2      return 0;
006aec90  }

006aeccc                                      90 90 90 90                                                              ....

006aecd0  uint32_t CM_Qualities::DispatchUI_RemoveFloatEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aecd0  {
006aecd6      if (arg1 != 0)
006aecd6      {
006aecd8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aecd8          
006aecee          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d6))
006aecee          {
006aecf3              int32_t edx_1;
006aecf3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aecf6              arg1 = edx_1;
006aed06              ClientObjMaintSystem::Handle_Qualities__RemoveFloatEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aecee          }
006aecd6      }
006aecd6      
006aecf2      return 0;
006aecd0  }

006aed0c                                      90 90 90 90                                                              ....

006aed10  uint32_t CM_Qualities::DispatchUI_RemoveInstanceIDEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aed10  {
006aed16      if (arg1 != 0)
006aed16      {
006aed18          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aed18          
006aed2e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1dc))
006aed2e          {
006aed33              int32_t edx_1;
006aed33              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aed36              arg1 = edx_1;
006aed46              ClientObjMaintSystem::Handle_Qualities__RemoveInstanceIDEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aed2e          }
006aed16      }
006aed16      
006aed32      return 0;
006aed10  }

006aed4c                                      90 90 90 90                                                              ....

006aed50  uint32_t CM_Qualities::DispatchUI_RemoveInt64Event(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aed50  {
006aed56      if (arg1 != 0)
006aed56      {
006aed58          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aed58          
006aed6e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2b9))
006aed6e          {
006aed73              int32_t edx_1;
006aed73              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aed76              arg1 = edx_1;
006aed86              ClientObjMaintSystem::Handle_Qualities__RemoveInt64Event(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aed6e          }
006aed56      }
006aed56      
006aed72      return 0;
006aed50  }

006aed8c                                      90 90 90 90                                                              ....

006aed90  uint32_t CM_Qualities::DispatchUI_RemoveIntEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aed90  {
006aed96      if (arg1 != 0)
006aed96      {
006aed98          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aed98          
006aedae          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d2))
006aedae          {
006aedb3              int32_t edx_1;
006aedb3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aedb6              arg1 = edx_1;
006aedc6              ClientObjMaintSystem::Handle_Qualities__RemoveIntEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aedae          }
006aed96      }
006aed96      
006aedb2      return 0;
006aed90  }

006aedcc                                      90 90 90 90                                                              ....

006aedd0  uint32_t CM_Qualities::DispatchUI_RemovePositionEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aedd0  {
006aedd6      if (arg1 != 0)
006aedd6      {
006aedd8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aedd8          
006aedee          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1de))
006aedee          {
006aedf3              int32_t edx_1;
006aedf3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aedf6              arg1 = edx_1;
006aee06              ClientObjMaintSystem::Handle_Qualities__RemovePositionEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aedee          }
006aedd6      }
006aedd6      
006aedf2      return 0;
006aedd0  }

006aee0c                                      90 90 90 90                                                              ....

006aee10  uint32_t CM_Qualities::DispatchUI_RemoveStringEvent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aee10  {
006aee16      if (arg1 != 0)
006aee16      {
006aee18          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aee18          
006aee2e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x1d8))
006aee2e          {
006aee33              int32_t edx_1;
006aee33              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aee36              arg1 = edx_1;
006aee46              ClientObjMaintSystem::Handle_Qualities__RemoveStringEvent(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006aee2e          }
006aee16      }
006aee16      
006aee32      return 0;
006aee10  }

006aee4c                                      90 90 90 90                                                              ....

006aee50  uint32_t CM_Qualities::DispatchUI_UpdateAttribute(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aee50  {
006aee54      class UIQueueManager* ebp = arg1;
006aee54      
006aee61      if ((ebp == 0 || ebp->m_pObjMaintSystem == 0))
006aee69          return 0;
006aee69      
006aee6a      void* eax_1 = arg2;
006aee76      bool cond:0 = *(uint32_t*)eax_1 == 0x2e4;
006aee7c      arg2 = ((char*)eax_1 + 4);
006aee7c      
006aee80      if (!(cond:0))
006aee89          return 0;
006aee89      
006aee8b      int32_t ebx;
006aee8b      ebx = *(uint8_t*)((char*)eax_1 + 4);
006aee8e      arg2 = ((char*)eax_1 + 5);
006aee92      uint32_t esi_1 = *(uint32_t*)((char*)eax_1 + 5);
006aee97      arg2 = ((char*)eax_1 + 9);
006aee9c      uint32_t edi = *(uint32_t*)((char*)eax_1 + 9);
006aeea3      arg1 = ebx;
006aeeab      arg2 = ((char*)eax_1 + 0xd);
006aeeb9      int32_t var_10 = 0x7a7b14;
006aeec1      int32_t var_c = 0;
006aeec5      int32_t var_8 = 0;
006aeec9      int32_t var_4 = 0;
006aeecd      Attribute::UnPack(&var_10, &arg2, (((eax_1 * 0) - 0xd) + arg3));
006aeee1      ClientObjMaintSystem::Handle_Qualities__UpdateAttribute(ebp->m_pObjMaintSystem, arg1, esi_1, edi, &var_10);
006aeeed      return 0;
006aee50  }

006aeeee                                            90 90                                                                ..

006aeef0  uint32_t CM_Qualities::DispatchUI_UpdateAttribute2nd(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aeef0  {
006aeef4      class UIQueueManager* ebx = arg1;
006aeef4      
006aef02      if ((ebx != 0 && ebx->m_pObjMaintSystem != 0))
006aef02      {
006aef04          void* eax_1 = arg2;
006aef0f          bool cond:0_1 = *(uint32_t*)eax_1 == 0x2e8;
006aef15          arg2 = ((char*)eax_1 + 4);
006aef15          
006aef19          if (cond:0_1)
006aef19          {
006aef23              int32_t edx_1;
006aef23              edx_1 = *(uint8_t*)((char*)eax_1 + 4);
006aef26              arg2 = ((char*)eax_1 + 5);
006aef2b              uint32_t esi = *(uint32_t*)((char*)eax_1 + 5);
006aef30              arg2 = ((char*)eax_1 + 9);
006aef35              uint32_t edi = *(uint32_t*)((char*)eax_1 + 9);
006aef3c              int32_t var_10 = 0;
006aef40              int32_t var_c = 0;
006aef44              int32_t var_8 = 0;
006aef48              int32_t var_4 = 0;
006aef50              arg2 = ((char*)eax_1 + 0xd);
006aef5e              arg1 = edx_1;
006aef62              int32_t var_14 = 0x7a7b30;
006aef6a              SecondaryAttribute::UnPack(&var_14, &arg2, (((eax_1 * 0) - 0xd) + arg3));
006aef7e              ClientObjMaintSystem::Handle_Qualities__UpdateAttribute2nd(ebx->m_pObjMaintSystem, arg1, esi, edi, &var_14);
006aef19          }
006aef02      }
006aef02      
006aef22      return 0;
006aeef0  }

006aef8b                                   90 90 90 90 90                                                             .....

006aef90  uint32_t CM_Qualities::DispatchUI_UpdateAttribute2ndLevel(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aef90  {
006aef96      if (arg1 != 0)
006aef96      {
006aef98          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aef98          
006aefae          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2ea))
006aefae          {
006aefb3              int32_t edx_1;
006aefb3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006aefba              arg1 = edx_1;
006aefce              ClientObjMaintSystem::Handle_Qualities__UpdateAttribute2ndLevel(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006aefae          }
006aef96      }
006aef96      
006aefb2      return 0;
006aef90  }

006aefd5                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006aefe0  uint32_t CM_Qualities::DispatchUI_UpdateAttributeLevel(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006aefe0  {
006aefe6      if (arg1 != 0)
006aefe6      {
006aefe8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006aefe8          
006aeffe          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2e6))
006aeffe          {
006af003              int32_t edx_1;
006af003              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af00a              arg1 = edx_1;
006af01e              ClientObjMaintSystem::Handle_Qualities__UpdateAttributeLevel(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006aeffe          }
006aefe6      }
006aefe6      
006af002      return 0;
006aefe0  }

006af025                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

006af030  uint32_t CM_Qualities::DispatchUI_UpdateBool(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af030  {
006af036      if (arg1 != 0)
006af036      {
006af038          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af038          
006af04e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2d2))
006af04e          {
006af053              int32_t edx_1;
006af053              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af05a              arg1 = edx_1;
006af06e              ClientObjMaintSystem::Handle_Qualities__UpdateBool(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006af04e          }
006af036      }
006af036      
006af052      return 0;
006af030  }

006af075                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006af080  uint32_t CM_Qualities::DispatchUI_UpdateFloat(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af080  {
006af089      if (arg1 != 0)
006af089      {
006af08b          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af08b          
006af0a1          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2d4))
006af0a1          {
006af0a9              int32_t edx_1;
006af0a9              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af0b1              int32_t edi = *(uint32_t*)((char*)arg2 + 0xd);
006af0b4              arg1 = edx_1;
006af0bd              int32_t eax_5 = *(uint32_t*)((char*)arg2 + 0x11);
006af0c0              int32_t var_14 = eax_5;
006af0c1              int32_t var_4 = eax_5;
006af0cf              int32_t var_8 = edi;
006af0d3              ClientObjMaintSystem::Handle_Qualities__UpdateFloat(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), edi);
006af0a1          }
006af089      }
006af089      
006af0a8      return 0;
006af080  }

006af0de                                                                                            90 90                                ..

006af0e0  uint32_t CM_Qualities::DispatchUI_UpdateInstanceID(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af0e0  {
006af0e6      if (arg1 != 0)
006af0e6      {
006af0e8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af0e8          
006af0fe          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2da))
006af0fe          {
006af103              int32_t edx_1;
006af103              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af10a              arg1 = edx_1;
006af11e              ClientObjMaintSystem::Handle_Qualities__UpdateInstanceID(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006af0fe          }
006af0e6      }
006af0e6      
006af102      return 0;
006af0e0  }

006af125                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

006af130  uint32_t CM_Qualities::DispatchUI_UpdateInt(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af130  {
006af136      if (arg1 != 0)
006af136      {
006af138          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af138          
006af14e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2ce))
006af14e          {
006af153              int32_t edx_1;
006af153              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af15a              arg1 = edx_1;
006af16e              ClientObjMaintSystem::Handle_Qualities__UpdateInt(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006af14e          }
006af136      }
006af136      
006af152      return 0;
006af130  }

006af175                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006af180  uint32_t CM_Qualities::DispatchUI_UpdateInt64(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af180  {
006af186      if (arg1 != 0)
006af186      {
006af188          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af188          
006af19e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2d0))
006af19e          {
006af1a3              int32_t edx_1;
006af1a3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af1ae              arg1 = edx_1;
006af1ba              int32_t var_c = *(uint32_t*)((char*)arg2 + 0x11);
006af1c3              ClientObjMaintSystem::Handle_Qualities__UpdateInt64(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006af19e          }
006af186      }
006af186      
006af1a2      return 0;
006af180  }

006af1cb                                   90 90 90 90 90                                                             .....

006af1d0  uint32_t CM_Qualities::DispatchUI_UpdateSkill(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af1d0  {
006af1d4      class UIQueueManager* ebp = arg1;
006af1d4      
006af1e2      if ((ebp != 0 && ebp->m_pObjMaintSystem != 0))
006af1e2      {
006af1e4          void* eax_1 = arg2;
006af1ef          bool cond:0_1 = *(uint32_t*)eax_1 == 0x2de;
006af1f5          arg2 = ((char*)eax_1 + 4);
006af1f5          
006af1f9          if (cond:0_1)
006af1f9          {
006af203              int32_t edx_1;
006af203              edx_1 = *(uint8_t*)((char*)eax_1 + 4);
006af207              arg2 = ((char*)eax_1 + 5);
006af20c              uint32_t edi = *(uint32_t*)((char*)eax_1 + 5);
006af211              arg2 = ((char*)eax_1 + 9);
006af215              uint32_t ebx = *(uint32_t*)((char*)eax_1 + 9);
006af21c              int32_t s;
006af21c              __builtin_memset(&s, 0, 0x1c);
006af234              arg2 = ((char*)eax_1 + 0xd);
006af242              arg1 = edx_1;
006af246              int32_t var_20 = 0x7a7408;
006af25e              Skill::UnPack(&var_20, &arg2, (((eax_1 * 0) - 0xd) + arg3));
006af272              ClientObjMaintSystem::Handle_Qualities__UpdateSkill(ebp->m_pObjMaintSystem, arg1, edi, ebx, &var_20);
006af1f9          }
006af1e2      }
006af1e2      
006af202      return 0;
006af1d0  }

006af27f                                                                                               90                                 .

006af280  uint32_t CM_Qualities::DispatchUI_UpdateSkillAC(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af280  {
006af286      if (arg1 != 0)
006af286      {
006af288          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af288          
006af29e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2e2))
006af29e          {
006af2a3              int32_t edx_1;
006af2a3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af2aa              arg1 = edx_1;
006af2be              ClientObjMaintSystem::Handle_Qualities__UpdateSkillAC(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006af29e          }
006af286      }
006af286      
006af2a2      return 0;
006af280  }

006af2c5                 90 90 90 90 90 90 90 90 90 90 90                                                       ...........

006af2d0  uint32_t CM_Qualities::DispatchUI_UpdateSkillLevel(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af2d0  {
006af2d6      if (arg1 != 0)
006af2d6      {
006af2d8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af2d8          
006af2ee          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2e0))
006af2ee          {
006af2f3              int32_t edx_1;
006af2f3              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af2fa              arg1 = edx_1;
006af30e              ClientObjMaintSystem::Handle_Qualities__UpdateSkillLevel(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006af2ee          }
006af2d6      }
006af2d6      
006af2f2      return 0;
006af2d0  }

006af315                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006af320  uint32_t CM_Qualities::DispatchUI_PrivateUpdateDataID(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af320  {
006af326      if (arg1 != 0)
006af326      {
006af328          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af328          
006af33e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2d7))
006af33e          {
006af343              int32_t edx_1;
006af343              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af346              arg1 = edx_1;
006af356              ClientObjMaintSystem::Handle_Qualities__PrivateUpdateDataID(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9));
006af33e          }
006af326      }
006af326      
006af342      return 0;
006af320  }

006af35c                                                                                      90 90 90 90                              ....

006af360  uint32_t CM_Qualities::DispatchUI_PrivateUpdatePosition(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af360  {
006af364      class UIQueueManager* ebx = arg1;
006af364      
006af371      if ((ebx == 0 || ebx->m_pObjMaintSystem == 0))
006af379          return 0;
006af379      
006af37a      void* eax_3 = arg2;
006af386      bool cond:0 = *(uint32_t*)eax_3 == 0x2db;
006af38c      arg2 = ((char*)eax_3 + 4);
006af38c      
006af390      if (!(cond:0))
006af399          return 0;
006af399      
006af39a      int32_t ecx;
006af39a      ecx = *(uint8_t*)((char*)eax_3 + 4);
006af39d      arg2 = ((char*)eax_3 + 5);
006af3a2      uint32_t edi = *(uint32_t*)((char*)eax_3 + 5);
006af3a4      arg1 = ecx;
006af3af      arg2 = ((char*)eax_3 + 9);
006af3b3      void var_48;
006af3b3      Position::Position(&var_48);
006af3ce      Position::UnPack(&var_48, &arg2, (((char*)eax_3 - arg2) + arg3));
006af3e1      ClientObjMaintSystem::Handle_Qualities__PrivateUpdatePosition(ebx->m_pObjMaintSystem, arg1, edi, &var_48);
006af3ec      return 0;
006af360  }

006af3ed                                         90 90 90                                                               ...

006af3f0  uint32_t CM_Qualities::DispatchUI_UpdateDataID(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af3f0  {
006af3f6      if (arg1 != 0)
006af3f6      {
006af3f8          class ClientObjMaintSystem* m_pObjMaintSystem = arg1->m_pObjMaintSystem;
006af3f8          
006af40e          if ((m_pObjMaintSystem != 0 && *(uint32_t*)arg2 == 0x2d8))
006af40e          {
006af413              int32_t edx_1;
006af413              edx_1 = *(uint8_t*)((char*)arg2 + 4);
006af41a              arg1 = edx_1;
006af42e              ClientObjMaintSystem::Handle_Qualities__UpdateDataID(m_pObjMaintSystem, arg1, *(uint32_t*)((char*)arg2 + 5), *(uint32_t*)((char*)arg2 + 9), *(uint32_t*)((char*)arg2 + 0xd));
006af40e          }
006af3f6      }
006af3f6      
006af412      return 0;
006af3f0  }

006af435                                                                 90 90 90 90 90 90 90 90 90 90 90                       ...........

006af440  uint32_t CM_Qualities::DispatchUI_UpdatePosition(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af440  {
006af444      class UIQueueManager* ebp = arg1;
006af444      
006af451      if ((ebp == 0 || ebp->m_pObjMaintSystem == 0))
006af459          return 0;
006af459      
006af45a      void* eax_3 = arg2;
006af466      bool cond:0 = *(uint32_t*)eax_3 == 0x2dc;
006af46c      arg2 = ((char*)eax_3 + 4);
006af46c      
006af470      if (!(cond:0))
006af479          return 0;
006af479      
006af47a      int32_t ecx;
006af47a      ecx = *(uint8_t*)((char*)eax_3 + 4);
006af47d      arg2 = ((char*)eax_3 + 5);
006af483      uint32_t edi = *(uint32_t*)((char*)eax_3 + 5);
006af488      arg2 = ((char*)eax_3 + 9);
006af48c      uint32_t ebx = *(uint32_t*)((char*)eax_3 + 9);
006af48e      arg1 = ecx;
006af499      arg2 = ((char*)eax_3 + 0xd);
006af49d      void var_48;
006af49d      Position::Position(&var_48);
006af4b8      Position::UnPack(&var_48, &arg2, (((char*)eax_3 - arg2) + arg3));
006af4cc      ClientObjMaintSystem::Handle_Qualities__UpdatePosition(ebp->m_pObjMaintSystem, arg1, edi, ebx, &var_48);
006af4d8      return 0;
006af440  }

006af4d9                                                                             90 90 90 90 90 90 90                           .......

006af4e0  uint32_t CM_Misc::DispatchUI_PortalStorm(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af4e0  {
006af4e6      if (arg1 != 0)
006af4e6      {
006af4e8          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006af4e8          
006af4f9          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x2cb))
006af4fe              /* tailcall */
006af4fe              return ClientUISystem::Handle_Misc__PortalStorm(m_pUISystem);
006af4e6      }
006af4e6      
006af4fd      return 0;
006af4e0  }

006af503           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006af510  uint32_t CM_Misc::DispatchUI_PortalStormBrewing(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af510  {
006af516      if (arg1 != 0)
006af516      {
006af518          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006af518          
006af529          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x2c9))
006af529          {
006af52e              float eax_2 = *(uint32_t*)((char*)arg2 + 4);
006af534              arg1 = eax_2;
006af538              ClientUISystem::Handle_Misc__PortalStormBrewing(m_pUISystem, eax_2);
006af529          }
006af516      }
006af516      
006af52d      return 0;
006af510  }

006af53e                                                                                            90 90                                ..

006af540  uint32_t CM_Misc::DispatchUI_PortalStormImminent(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af540  {
006af546      if (arg1 != 0)
006af546      {
006af548          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006af548          
006af559          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x2ca))
006af559          {
006af55e              float eax_2 = *(uint32_t*)((char*)arg2 + 4);
006af564              arg1 = eax_2;
006af568              ClientUISystem::Handle_Misc__PortalStormImminent(m_pUISystem, eax_2);
006af559          }
006af546      }
006af546      
006af55d      return 0;
006af540  }

006af56e                                            90 90                                                                ..

006af570  uint32_t CM_Misc::DispatchUI_PortalStormSubsided(class UIQueueManager* arg1, void* arg2, uint32_t arg3)

006af570  {
006af576      if (arg1 != 0)
006af576      {
006af578          class ClientUISystem* m_pUISystem = arg1->m_pUISystem;
006af578          
006af589          if ((m_pUISystem != 0 && *(uint32_t*)arg2 == 0x2cc))
006af58e              /* tailcall */
006af58e              return ClientUISystem::Handle_Misc__PortalStormSubsided(m_pUISystem);
006af576      }
006af576      
006af58d      return 0;
006af570  }

006af593                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006af5a0  uint8_t CM_Misc::SendNotice_PlayerPortalStormed()

006af5a0  {
006af5ae      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd21c);
006af5ae      
006af5b3      if (eax != 0)
006af5b3      {
006af5b6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006af5b6          
006af5bb          if (i != 0)
006af5bb          {
006af5bd              int32_t edi;
006af5bd              int32_t var_8_1 = edi;
006af5bd              
006af5df              do
006af5df              {
006af5c0                  int32_t* edi_2 = *(uint32_t*)i;
006af5c4                  i = i[1];
006af5c4                  
006af5c7                  if ((edi_2 != 0 && **(uint32_t**)edi_2() == 0))
006af5d7                      *(uint32_t*)(*(uint32_t*)edi_2 + 0x1b0)();
006af5df              } while (i != 0);
006af5bb          }
006af5b3      }
006af5b3      
006af5e3      eax = 1;
006af5e5      return 1;
006af5a0  }

006af5e6                    90 90 90 90 90 90 90 90 90 90                                                        ..........

006af5f0  uint8_t CM_Misc::SendNotice_PortalStormLevel(float arg1)

006af5f0  {
006af5fe      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd21b);
006af5fe      
006af603      if (eax != 0)
006af603      {
006af606          int32_t* i = *(uint32_t*)((char*)eax + 4);
006af606          
006af60b          while (i != 0)
006af60b          {
006af613              int32_t* edi_1 = *(uint32_t*)i;
006af617              i = i[1];
006af617              
006af61a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006af62b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x1b4)(arg1);
006af60b          }
006af603      }
006af603      
006af638      eax = 1;
006af63a      return 1;
006af5f0  }

006af63b                                                                                   90 90 90 90 90                             .....

006af640  uint8_t CM_Examine::SendNotice_ExamineObject(uint32_t arg1)

006af640  {
006af64e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1ed);
006af64e      
006af653      if (eax != 0)
006af653      {
006af656          int32_t* i = *(uint32_t*)((char*)eax + 4);
006af656          
006af65b          while (i != 0)
006af65b          {
006af663              int32_t* edi_1 = *(uint32_t*)i;
006af667              i = i[1];
006af667              
006af66a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006af67b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xd4)(arg1);
006af65b          }
006af653      }
006af653      
006af688      eax = 1;
006af68a      return 1;
006af640  }

006af68b                                   90 90 90 90 90                                                             .....

006af690  uint8_t CM_Examine::SendNotice_ExamineSpell(uint32_t arg1)

006af690  {
006af69e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1ee);
006af69e      
006af6a3      if (eax != 0)
006af6a3      {
006af6a6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006af6a6          
006af6ab          while (i != 0)
006af6ab          {
006af6b3              int32_t* edi_1 = *(uint32_t*)i;
006af6b7              i = i[1];
006af6b7              
006af6ba              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006af6cb                  *(uint32_t*)(*(uint32_t*)edi_1 + 0xd8)(arg1);
006af6ab          }
006af6a3      }
006af6a3      
006af6d8      eax = 1;
006af6da      return 1;
006af690  }

006af6db                                                                                   90 90 90 90 90                             .....

006af6e0  uint8_t CM_Examine::SendNotice_SetAppraiseInfo(uint32_t arg1, class AppraisalProfile const* arg2)

006af6e0  {
006af6ee      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd1e7);
006af6ee      
006af6f3      if (eax != 0)
006af6f3      {
006af6f6          int32_t* i = *(uint32_t*)((char*)eax + 4);
006af6f6          
006af6fb          while (i != 0)
006af6fb          {
006af708              int32_t* esi_1 = *(uint32_t*)i;
006af70c              i = i[1];
006af70c              
006af70f              if ((esi_1 != 0 && **(uint32_t**)esi_1() == 0))
006af721                  *(uint32_t*)(*(uint32_t*)esi_1 + 0xdc)(arg1, arg2);
006af6fb          }
006af6f3      }
006af6f3      
006af72f      eax = 1;
006af731      return 1;
006af6e0  }

006af732                                                        90 90 90 90 90 90 90 90 90 90 90 90 90 90                    ..............

006af740  uint8_t CM_CharGen::SendNotice_CharGenVerificationResponse(enum CG_VERIFICATION_RESPONSE arg1)

006af740  {
006af74e      void* eax = gmGlobalEventHandler::gmGetGlobalEventHandler()->vtable->GetNoticeHandlers(0x4dd22c);
006af74e      
006af753      if (eax != 0)
006af753      {
006af756          int32_t* i = *(uint32_t*)((char*)eax + 4);
006af756          
006af75b          while (i != 0)
006af75b          {
006af763              int32_t* edi_1 = *(uint32_t*)i;
006af767              i = i[1];
006af767              
006af76a              if ((edi_1 != 0 && **(uint32_t**)edi_1() == 0))
006af77b                  *(uint32_t*)(*(uint32_t*)edi_1 + 0x74)(arg1);
006af75b          }
006af753      }
006af753      
006af785      eax = 1;
006af787      return 1;
006af740  }

006af788                          90 90 90 90 90 90 90 90                                                          ........

006af790  uint8_t CM_Movement::Event_AutonomousPosition(class AutonomousPositionPack const* arg1)

006af790  {
006af796      uint32_t eax = Proto_UI::GetNextUICounter();
006af7a9      struct AutonomousPositionPack::VTable* vtable = arg1->vtable;
006af7ae      int32_t var_8 = 0x801ad4;
006af7b6      void* var_c = nullptr;
006af7be      int32_t eax_1 = vtable->Pack(&var_c, 0);
006af7ce      OrderHdr::Pack(&var_8, &var_c, 0);
006af7d8      void* eax_2 = operator new[]((eax_1 + 0xc));
006af7e0      var_c = eax_2;
006af7f0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006af7f9      *(uint32_t*)var_c = 0xf753;
006af803      struct AutonomousPositionPack::VTable* vtable_1 = arg1->vtable;
006af80c      void* ecx_6 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006af80e      var_c += 4;
006af81a      vtable_1->Pack(&var_c, ecx_6);
006af824      void* ebx;
006af824      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006af824      
006af82b      if (ebx == 0)
006af832          Proto_UI::UICounterFailedSend(eax);
006af832      
006af842      return ebx;
006af790  }

006af843           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006af850  uint8_t CM_Movement::Event_AutonomyLevel(uint32_t arg1)

006af850  {
006af856      uint32_t eax = Proto_UI::GetNextUICounter();
006af86a      int32_t var_8 = 0x801ad4;
006af872      void* var_c = nullptr;
006af87a      OrderHdr::Pack(&var_8, &var_c, 0);
006af885      void* eax_1 = operator new[](0x10);
006af897      var_c = eax_1;
006af89d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006af8aa      *(uint32_t*)var_c = 0xf752;
006af8b4      uint32_t* eax_3 = ((char*)var_c + 4);
006af8b7      var_c = eax_3;
006af8bb      *(uint32_t*)eax_3 = arg1;
006af8c1      void* eax_5 = ((char*)var_c + 4);
006af8c4      var_c = eax_5;
006af8c8      void* eax_6 = (eax_5 & 0x80000003);
006af8c8      bool cond:0 = eax_6 == 0;
006af8c8      
006af8cd      if (eax_6 < 0)
006af8cd      {
006af8d0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006af8d3          eax_6 = ((char*)eax_8 + 1);
006af8d3          cond:0 = eax_8 == 0xffffffff;
006af8cd      }
006af8cd      
006af8d4      if (!(cond:0))
006af8d4      {
006af8db          void* i_1 = (4 - eax_6);
006af8db          
006af8dd          if (4 != eax_6)
006af8dd          {
006af8f1              void* i;
006af8f1              
006af8f1              do
006af8f1              {
006af8e4                  *(uint8_t*)var_c = 0;
006af8ec                  i = i_1;
006af8ec                  i_1 -= 1;
006af8ed                  var_c += 1;
006af8f1              } while (i != 1);
006af8dd          }
006af8d4      }
006af8d4      
006af8fa      int32_t ebx;
006af8fa      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006af8fa      
006af901      if (ebx == 0)
006af908          Proto_UI::UICounterFailedSend(eax);
006af908      
006af912      uint32_t eax_9;
006af912      eax_9 = ebx;
006af918      return eax_9;
006af850  }

006af919                                                                             90 90 90 90 90 90 90                           .......

006af920  uint8_t CM_Movement::Event_DoMovementCommand(uint32_t arg1, float arg2, enum HoldKey arg3)

006af920  {
006af926      uint32_t eax = Proto_UI::GetNextUICounter();
006af93a      int32_t var_8 = 0x801ad4;
006af942      void* var_c = nullptr;
006af94a      OrderHdr::Pack(&var_8, &var_c, 0);
006af955      void* eax_1 = operator new[](0x18);
006af967      var_c = eax_1;
006af96d      OrderHdr::Pack(&var_8, &var_c, 0x18);
006af97a      *(uint32_t*)var_c = 0xf61e;
006af984      uint32_t* eax_3 = ((char*)var_c + 4);
006af987      var_c = eax_3;
006af98b      *(uint32_t*)eax_3 = arg1;
006af991      void* eax_5 = ((char*)var_c + 4);
006af996      void* ecx_4 = (eax_5 & 0x80000003);
006af996      bool cond:1 = ecx_4 == 0;
006af99c      var_c = eax_5;
006af99c      
006af9a0      if (ecx_4 < 0)
006af9a0      {
006af9a3          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006af9a6          ecx_4 = ((char*)ecx_6 + 1);
006af9a6          cond:1 = ecx_6 == 0xffffffff;
006af9a0      }
006af9a0      
006af9a7      if (!(cond:1))
006af9a7      {
006af9ae          void* i_4 = (4 - ecx_4);
006af9ae          
006af9b0          if (4 != ecx_4)
006af9b0          {
006af9bf              void* i;
006af9bf              
006af9bf              do
006af9bf              {
006af9b2                  *(uint8_t*)eax_5 = 0;
006af9b9                  eax_5 = ((char*)var_c + 1);
006af9ba                  i = i_4;
006af9ba                  i_4 -= 1;
006af9bb                  var_c = eax_5;
006af9bf              } while (i != 1);
006af9b0          }
006af9a7      }
006af9a7      
006af9c5      *(uint32_t*)eax_5 = arg2;
006af9cb      void* eax_8 = ((char*)var_c + 4);
006af9d0      void* ecx_8 = (eax_8 & 0x80000003);
006af9d0      bool cond:3 = ecx_8 == 0;
006af9d6      var_c = eax_8;
006af9d6      
006af9da      if (ecx_8 < 0)
006af9da      {
006af9dd          void* ecx_10 = (((char*)ecx_8 - 1) | 0xfffffffc);
006af9e0          ecx_8 = ((char*)ecx_10 + 1);
006af9e0          cond:3 = ecx_10 == 0xffffffff;
006af9da      }
006af9da      
006af9e1      if (!(cond:3))
006af9e1      {
006af9e8          void* i_5 = (4 - ecx_8);
006af9e8          
006af9ea          if (4 != ecx_8)
006af9ea          {
006af9fd              void* i_1;
006af9fd              
006af9fd              do
006af9fd              {
006af9f0                  *(uint8_t*)eax_8 = 0;
006af9f7                  eax_8 = ((char*)var_c + 1);
006af9f8                  i_1 = i_5;
006af9f8                  i_5 -= 1;
006af9f9                  var_c = eax_8;
006af9fd              } while (i_1 != 1);
006af9ea          }
006af9e1      }
006af9e1      
006afa03      *(uint32_t*)eax_8 = arg3;
006afa09      void* eax_11 = ((char*)var_c + 4);
006afa0c      var_c = eax_11;
006afa10      void* eax_12 = (eax_11 & 0x80000003);
006afa10      bool cond:5 = eax_12 == 0;
006afa10      
006afa15      if (eax_12 < 0)
006afa15      {
006afa18          void* eax_14 = (((char*)eax_12 - 1) | 0xfffffffc);
006afa1b          eax_12 = ((char*)eax_14 + 1);
006afa1b          cond:5 = eax_14 == 0xffffffff;
006afa15      }
006afa15      
006afa1c      if (!(cond:5))
006afa1c      {
006afa23          void* i_3 = (4 - eax_12);
006afa23          
006afa25          if (4 != eax_12)
006afa25          {
006afa41              void* i_2;
006afa41              
006afa41              do
006afa41              {
006afa34                  *(uint8_t*)var_c = 0;
006afa3c                  i_2 = i_3;
006afa3c                  i_3 -= 1;
006afa3d                  var_c += 1;
006afa41              } while (i_2 != 1);
006afa25          }
006afa1c      }
006afa1c      
006afa4a      int32_t ebx;
006afa4a      ebx = Proto_UI::SendToWeenie(eax_1, 0x18);
006afa4a      
006afa51      if (ebx == 0)
006afa58          Proto_UI::UICounterFailedSend(eax);
006afa58      
006afa62      uint32_t eax_15;
006afa62      eax_15 = ebx;
006afa68      return eax_15;
006af920  }

006afa29                             8d a4 24 00 00 00 00                                                           ..$....
006afa69                             90 90 90 90 90 90 90                                                           .......

006afa70  uint8_t CM_Movement::Event_Jump(class JumpPack const* arg1)

006afa70  {
006afa76      uint32_t eax = Proto_UI::GetNextUICounter();
006afa89      struct JumpPack::VTable* vtable = arg1->vtable;
006afa8e      int32_t var_8 = 0x801ad4;
006afa96      void* var_c = nullptr;
006afa9e      int32_t eax_1 = vtable->Pack(&var_c, 0);
006afaae      OrderHdr::Pack(&var_8, &var_c, 0);
006afab8      void* eax_2 = operator new[]((eax_1 + 0xc));
006afac0      var_c = eax_2;
006afad0      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006afad9      *(uint32_t*)var_c = 0xf61b;
006afae3      struct JumpPack::VTable* vtable_1 = arg1->vtable;
006afaec      void* ecx_6 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006afaee      var_c += 4;
006afafa      vtable_1->Pack(&var_c, ecx_6);
006afb04      void* ebx;
006afb04      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006afb04      
006afb0b      if (ebx == 0)
006afb12          Proto_UI::UICounterFailedSend(eax);
006afb12      
006afb22      return ebx;
006afa70  }

006afb23           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006afb30  uint8_t CM_Movement::Event_Jump_NonAutonomous(float arg1)

006afb30  {
006afb36      uint32_t eax = Proto_UI::GetNextUICounter();
006afb4a      int32_t var_8 = 0x801ad4;
006afb52      void* var_c = nullptr;
006afb5a      OrderHdr::Pack(&var_8, &var_c, 0);
006afb65      void* eax_1 = operator new[](0x10);
006afb77      var_c = eax_1;
006afb7d      OrderHdr::Pack(&var_8, &var_c, 0x10);
006afb8a      *(uint32_t*)var_c = 0xf7c9;
006afb94      float* eax_3 = ((char*)var_c + 4);
006afb97      var_c = eax_3;
006afb9b      *(uint32_t*)eax_3 = arg1;
006afba1      void* eax_5 = ((char*)var_c + 4);
006afba4      var_c = eax_5;
006afba8      void* eax_6 = (eax_5 & 0x80000003);
006afba8      bool cond:0 = eax_6 == 0;
006afba8      
006afbad      if (eax_6 < 0)
006afbad      {
006afbb0          void* eax_8 = (((char*)eax_6 - 1) | 0xfffffffc);
006afbb3          eax_6 = ((char*)eax_8 + 1);
006afbb3          cond:0 = eax_8 == 0xffffffff;
006afbad      }
006afbad      
006afbb4      if (!(cond:0))
006afbb4      {
006afbbb          void* i_1 = (4 - eax_6);
006afbbb          
006afbbd          if (4 != eax_6)
006afbbd          {
006afbd1              void* i;
006afbd1              
006afbd1              do
006afbd1              {
006afbc4                  *(uint8_t*)var_c = 0;
006afbcc                  i = i_1;
006afbcc                  i_1 -= 1;
006afbcd                  var_c += 1;
006afbd1              } while (i != 1);
006afbbd          }
006afbb4      }
006afbb4      
006afbda      int32_t ebx;
006afbda      ebx = Proto_UI::SendToWeenie(eax_1, 0x10);
006afbda      
006afbe1      if (ebx == 0)
006afbe8          Proto_UI::UICounterFailedSend(eax);
006afbe8      
006afbf2      uint32_t eax_9;
006afbf2      eax_9 = ebx;
006afbf8      return eax_9;
006afb30  }

006afbf9                                                                             90 90 90 90 90 90 90                           .......

006afc00  uint8_t CM_Movement::Event_MoveToState(class MoveToStatePack const* arg1)

006afc00  {
006afc06      uint32_t eax = Proto_UI::GetNextUICounter();
006afc19      struct MoveToStatePack::VTable* vtable = arg1->vtable;
006afc1e      int32_t var_8 = 0x801ad4;
006afc26      void* var_c = nullptr;
006afc2e      int32_t eax_1 = vtable->Pack(&var_c, 0);
006afc3e      OrderHdr::Pack(&var_8, &var_c, 0);
006afc48      void* eax_2 = operator new[]((eax_1 + 0xc));
006afc50      var_c = eax_2;
006afc60      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006afc69      *(uint32_t*)var_c = 0xf61c;
006afc73      struct MoveToStatePack::VTable* vtable_1 = arg1->vtable;
006afc7c      void* ecx_6 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006afc7e      var_c += 4;
006afc8a      vtable_1->Pack(&var_c, ecx_6);
006afc94      void* ebx;
006afc94      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006afc94      
006afc9b      if (ebx == 0)
006afca2          Proto_UI::UICounterFailedSend(eax);
006afca2      
006afcb2      return ebx;
006afc00  }

006afcb3                                                           90 90 90 90 90 90 90 90 90 90 90 90 90                     .............

006afcc0  uint8_t CM_Movement::Event_StopMovementCommand(uint32_t arg1, enum HoldKey arg2)

006afcc0  {
006afcc6      uint32_t eax = Proto_UI::GetNextUICounter();
006afcda      int32_t var_8 = 0x801ad4;
006afce2      void* var_c = nullptr;
006afcea      OrderHdr::Pack(&var_8, &var_c, 0);
006afcf5      void* eax_1 = operator new[](0x14);
006afd07      var_c = eax_1;
006afd0d      OrderHdr::Pack(&var_8, &var_c, 0x14);
006afd1a      *(uint32_t*)var_c = 0xf661;
006afd24      uint32_t* eax_3 = ((char*)var_c + 4);
006afd27      var_c = eax_3;
006afd2b      *(uint32_t*)eax_3 = arg1;
006afd31      void* eax_5 = ((char*)var_c + 4);
006afd36      void* ecx_4 = (eax_5 & 0x80000003);
006afd36      bool cond:1 = ecx_4 == 0;
006afd3c      var_c = eax_5;
006afd3c      
006afd40      if (ecx_4 < 0)
006afd40      {
006afd43          void* ecx_6 = (((char*)ecx_4 - 1) | 0xfffffffc);
006afd46          ecx_4 = ((char*)ecx_6 + 1);
006afd46          cond:1 = ecx_6 == 0xffffffff;
006afd40      }
006afd40      
006afd47      if (!(cond:1))
006afd47      {
006afd4e          void* i_3 = (4 - ecx_4);
006afd4e          
006afd50          if (4 != ecx_4)
006afd50          {
006afd5f              void* i;
006afd5f              
006afd5f              do
006afd5f              {
006afd52                  *(uint8_t*)eax_5 = 0;
006afd59                  eax_5 = ((char*)var_c + 1);
006afd5a                  i = i_3;
006afd5a                  i_3 -= 1;
006afd5b                  var_c = eax_5;
006afd5f              } while (i != 1);
006afd50          }
006afd47      }
006afd47      
006afd65      *(uint32_t*)eax_5 = arg2;
006afd6b      void* eax_8 = ((char*)var_c + 4);
006afd6e      var_c = eax_8;
006afd72      void* eax_9 = (eax_8 & 0x80000003);
006afd72      bool cond:2 = eax_9 == 0;
006afd72      
006afd77      if (eax_9 < 0)
006afd77      {
006afd7a          void* eax_11 = (((char*)eax_9 - 1) | 0xfffffffc);
006afd7d          eax_9 = ((char*)eax_11 + 1);
006afd7d          cond:2 = eax_11 == 0xffffffff;
006afd77      }
006afd77      
006afd7e      if (!(cond:2))
006afd7e      {
006afd85          void* i_2 = (4 - eax_9);
006afd85          
006afd87          if (4 != eax_9)
006afd87          {
006afda1              void* i_1;
006afda1              
006afda1              do
006afda1              {
006afd94                  *(uint8_t*)var_c = 0;
006afd9c                  i_1 = i_2;
006afd9c                  i_2 -= 1;
006afd9d                  var_c += 1;
006afda1              } while (i_1 != 1);
006afd87          }
006afd7e      }
006afd7e      
006afdaa      int32_t ebx;
006afdaa      ebx = Proto_UI::SendToWeenie(eax_1, 0x14);
006afdaa      
006afdb1      if (ebx == 0)
006afdb8          Proto_UI::UICounterFailedSend(eax);
006afdb8      
006afdc8      return ebx;
006afcc0  }

006afdc9                             90 90 90 90 90 90 90                                                           .......

006afdd0  uint8_t CM_Movement::Event_TurnToEvent(class TurnToEventPack const* arg1)

006afdd0  {
006afdd6      uint32_t eax = Proto_UI::GetNextUICounter();
006afde9      struct TurnToEventPack::VTable* vtable = arg1->vtable;
006afdee      int32_t var_8 = 0x801ad4;
006afdf6      void* var_c = nullptr;
006afdfe      int32_t eax_1 = vtable->Pack(&var_c, 0);
006afe0e      OrderHdr::Pack(&var_8, &var_c, 0);
006afe18      void* eax_2 = operator new[]((eax_1 + 0xc));
006afe20      var_c = eax_2;
006afe30      OrderHdr::Pack(&var_8, &var_c, (eax_1 + 0xc));
006afe39      *(uint32_t*)var_c = 0xf649;
006afe43      struct TurnToEventPack::VTable* vtable_1 = arg1->vtable;
006afe4c      void* ecx_6 = (((char*)eax_2 - ((char*)var_c + 4)) + (eax_1 + 0xc));
006afe4e      var_c += 4;
006afe5a      vtable_1->Pack(&var_c, ecx_6);
006afe64      void* ebx;
006afe64      ebx = Proto_UI::SendToWeenie(eax_2, (eax_1 + 0xc));
006afe64      
006afe6b      if (ebx == 0)
006afe72          Proto_UI::UICounterFailedSend(eax);
006afe72      
006afe82      return ebx;
006afdd0  }

006afe83           90 90 90 90 90 90 90 90 90 90 90 90 90                                                     .............

006afe90  uint8_t ClientRegKey::GetClientOptions(class PStringBase<char> const* arg1, class PStringBase<char>* arg2)

006afe90  {
006afeaf      int32_t __saved_ecx;
006afeaf      return RegEdit::QueryStrValue(&__saved_ecx, &g_strClientRegKeyBasePath, arg1, arg2, 0x80000002);
006afe90  }


006afeb0  int32_t __thiscall ContentProfile::operator==(class ContentProfile* this, class ContentProfile const* arg2)

006afeb0  {
006afeb7      uint32_t eax = (this->m_iid - arg2->m_iid);
006afeba      int32_t eax_1 = -(eax);
006afebf      return ((eax_1 - eax_1) + 1);
006afeb0  }

006afec2        90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                    ..............

006afed0  void __thiscall ContentProfile::ContentProfile(class ContentProfile* this, uint32_t arg2)

006afed0  {
006afed6      this->vtable = 0x7cc40c;
006afedc      this->m_iid = arg2;
006afedf      this->m_uContainerProperties = 0;
006afed0  }

006afee9                             90 90 90 90 90 90 90                                                           .......

006afef0  void __fastcall ContentProfile::ContentProfile(class ContentProfile* this)

006afef0  {
006afef4      this->vtable = 0x7cc40c;
006afefa      this->m_iid = 0;
006afefd      this->m_uContainerProperties = 0;
006afef0  }

006aff01     90 90 90 90 90 90 90 90 90 90 90 90 90 90 90                                                   ...............

006aff10  int32_t __thiscall ContentProfile::UnPack(class ContentProfile* this, void** arg2, uint32_t arg3)

006aff10  {
006aff15      if (arg3 < 8)
006aff19          return 0;
006aff19      
006aff24      this->m_iid = **(uint32_t**)arg2;
006aff29      void* edx_3 = (*(uint32_t*)arg2 + 4);
006aff2c      *(uint32_t*)arg2 = edx_3;
006aff30      this->m_uContainerProperties = *(uint32_t*)edx_3;
006aff33      *(uint32_t*)arg2 += 4;
006aff3b      return 1;
006aff10  }

006aff3e                                                                                            90 90                                ..

006aff40  int32_t LogTextTypeEnumMapper::IsLegalChannel(uint32_t const arg1)

006aff40  {
006aff4a      if ((arg1 - 2) <= 0x17)
006aff53          switch (arg1)
006aff53          {
006aff5f              case 2:
006aff5f              case 3:
006aff5f              case 6:
006aff5f              case 7:
006aff5f              case 0xc:
006aff5f              case 0x10:
006aff5f              case 0x11:
006aff5f              case 0x12:
006aff5f              case 0x13:
006aff5f              case 0x15:
006aff5f              case 0x16:
006aff5f              case 0x17:
006aff5f              case 0x18:
006aff5f              case 0x19:
006aff5f              {
006aff5f                  return 1;
006aff5f                  break;
006aff5f              }
006aff53          }
006aff53      
006aff62      return 0;
006aff40  }

006aff63           90                                                                                         .
006aff64  uint32_t jump_table_6aff64[0x2] = 
006aff64  {
006aff64      [0x0] =  0x006aff5a
006aff68      [0x1] =  0x006aff60
006aff6c  }
006aff6c  uint8_t lookup_table_6aff6c[0x18] = 
006aff6c  {
006aff6c      [0x00] =  0x00
006aff6d      [0x01] =  0x00
006aff6e      [0x02] =  0x01
006aff6f      [0x03] =  0x01
006aff70      [0x04] =  0x00
006aff71      [0x05] =  0x00
006aff72      [0x06] =  0x01
006aff73      [0x07] =  0x01
006aff74      [0x08] =  0x01
006aff75      [0x09] =  0x01
006aff76      [0x0a] =  0x00
006aff77      [0x0b] =  0x01
006aff78      [0x0c] =  0x01
006aff79      [0x0d] =  0x01
006aff7a      [0x0e] =  0x00
006aff7b      [0x0f] =  0x00
006aff7c      [0x10] =  0x00
006aff7d      [0x11] =  0x00
006aff7e      [0x12] =  0x01
006aff7f      [0x13] =  0x00
006aff80      [0x14] =  0x00
006aff81      [0x15] =  0x00
006aff82      [0x16] =  0x00
006aff83      [0x17] =  0x00
006aff84  }

006aff84              90 90 90 90 90 90 90 90 90 90 90 90                                                      ............

006aff90  uint32_t LogTextTypeEnumMapper::LogTextTypeToString(uint32_t const arg1, char* arg2, uint32_t const arg3)

006aff90  {
006aff90      uint32_t const result = arg1;
006aff90      
006aff97      if (result > 0x1f)
006aff97      {
006b04ee      label_6b04ee:
006b04ee          
006b04f0          if (arg3 >= 8)
006b04f0          {
006b04fc              __builtin_strncpy(arg2, "Unkn", 4);
006b0504              *(uint32_t*)(arg2 + 4) = &data_6e776f;
006b0507              return 0;
006b04f0          }
006aff97      }
006aff97      else
006aff9d          switch (result)
006aff9d          {
006affaf              case 0:
006affaf              {
006affaf                  if (arg3 >= 8)
006affaf                  {
006affbf                      __builtin_strcpy(arg2, "Default");
006affcc                      return 0;
006affaf                  }
006affaf                  break;
006affaf              }
006b0329              case 1:
006b0329              {
006b0329                  if (arg3 >= 4)
006b0329                  {
006b0333                      *(uint32_t*)arg2 = 0x6c6c41;
006b033b                      return 0;
006b0329                  }
006b0329                  break;
006b0329              }
006affd8              case 2:
006affd8              {
006affd8                  if (arg3 >= 7)
006affd8                  {
006affe8                      __builtin_strncpy(arg2, "Speech", 7);
006b0000                      return 0;
006affd8                  }
006affd8                  break;
006affd8              }
006b000c              case 3:
006b000c              {
006b000c                  if (arg3 >= 5)
006b000c                  {
006b001b                      __builtin_strncpy(arg2, "Tell", 5);
006b0028                      return 0;
006b000c                  }
006b000c                  break;
006b000c              }
006b0034              case 4:
006b0034              {
006b0034                  if (arg3 >= 0x13)
006b0034                  {
006b0043                      __builtin_strncpy(arg2, "Speech_Direct_Send", 0x13);
006b0074                      return 0;
006b0034                  }
006b0034                  break;
006b0034              }
006b00b9              case 5:
006b00b9              {
006b00b9                  if (arg3 >= 7)
006b00b9                  {
006b00c8                      __builtin_strncpy(arg2, "System", 7);
006b00df                      return 0;
006b00b9                  }
006b00b9                  break;
006b00b9              }
006b00e4              case 6:
006b00e4              {
006b00e4                  result = 7;
006b00e4                  
006b00eb               